From d577d991b97ae2b5ee1af23641bcffc3f83af5b2 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 4 Nov 2009 11:56:41 -0800 Subject: Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux. --- Makefile | 496 + Makefile.mingw32 | 464 + cd/etc/arial.ttf | Bin 0 -> 65412 bytes cd/etc/arialbd.ttf | Bin 0 -> 66952 bytes cd/etc/arialbi.ttf | Bin 0 -> 73984 bytes cd/etc/ariali.ttf | Bin 0 -> 62968 bytes cd/etc/cour.ttf | Bin 0 -> 98872 bytes cd/etc/courbd.ttf | Bin 0 -> 84360 bytes cd/etc/courbi.ttf | Bin 0 -> 85152 bytes cd/etc/couri.ttf | Bin 0 -> 82092 bytes cd/etc/seed2d.dgn | Bin 0 -> 13824 bytes cd/etc/times.ttf | Bin 0 -> 85240 bytes cd/etc/timesbd.ttf | Bin 0 -> 83228 bytes cd/etc/timesbi.ttf | Bin 0 -> 77080 bytes cd/etc/timesi.ttf | Bin 0 -> 79672 bytes cd/etc/vectorfont00.txt | 3802 +++++++ cd/etc/vectorfont01.txt | 2879 +++++ cd/etc/vectorfont02.txt | 2642 +++++ cd/etc/vectorfont03.txt | 2879 +++++ cd/etc/vectorfont04.txt | 2642 +++++ cd/etc/vectorfont05.txt | 2776 +++++ cd/etc/vectorfont06.txt | 3799 +++++++ cd/etc/vectorfont07.txt | 1357 +++ cd/etc/vectorfont08.txt | 2177 ++++ cd/etc/vectorfont09.txt | 2686 +++++ cd/etc/vectorfont10.txt | 3973 +++++++ cd/etc/vectorfont11.txt | 4170 ++++++++ cd/etc/vectorfont12.txt | 3321 ++++++ cd/etc/vectorfont13.txt | 2112 ++++ cd/etc/vectorfont14.txt | 1102 ++ cd/etc/vectorfont15.txt | 1722 +++ cd/etc/vectorfont16.txt | 1988 ++++ cd/etc/vectorfont17.txt | 2100 ++++ cd/etc/vectorfont18.txt | 8163 +++++++++++++++ cd/etc/vectorfont19.txt | 1032 ++ cd/etc/vectorfont20.txt | 1375 +++ cd/etc/vectorfont21.txt | 8699 ++++++++++++++++ cd/etc/vectorfont22.txt | 5646 ++++++++++ cd/etc/vectorfont23.txt | 2161 ++++ cd/etc/vectorfont24.txt | 6167 +++++++++++ cd/etc/vectorfont25.txt | 5091 +++++++++ cd/etc/vectorfont26.txt | 1036 ++ cd/etc/vectorfont27.txt | 7946 ++++++++++++++ cd/etc/vectorfont28.txt | 8062 ++++++++++++++ cd/etc/vectorfont29.txt | 3828 +++++++ cd/etc/vectorfont30.txt | 2145 ++++ cd/etc/vectorfont31.txt | 2302 ++++ cd/etc/vectorfont32.txt | 1252 +++ cd/etc/vectorfont33.txt | 799 ++ cd/etc/vectorfont34.txt | 359 + cd/include/cd.h | 496 + cd/include/cd_canvas.hpp | 358 + cd/include/cd_old.h | 158 + cd/include/cd_private.h | 360 + cd/include/cdcgm.h | 34 + cd/include/cdclipbd.h | 22 + cd/include/cddbuf.h | 23 + cd/include/cddebug.h | 24 + cd/include/cddgn.h | 23 + cd/include/cddxf.h | 22 + cd/include/cdemf.h | 22 + cd/include/cdgdiplus.h | 29 + cd/include/cdimage.h | 23 + cd/include/cdirgb.h | 30 + cd/include/cdiup.h | 22 + cd/include/cdlua.h | 39 + cd/include/cdlua3_private.h | 120 + cd/include/cdlua5_private.h | 141 + cd/include/cdluaim.h | 24 + cd/include/cdluaiup.h | 27 + cd/include/cdluapdf.h | 27 + cd/include/cdmf.h | 24 + cd/include/cdmf_private.h | 32 + cd/include/cdnative.h | 26 + cd/include/cdpdf.h | 38 + cd/include/cdpicture.h | 22 + cd/include/cdprint.h | 23 + cd/include/cdps.h | 37 + cd/include/cdwmf.h | 22 + cd/include/wd.h | 79 + cd/include/wd_old.h | 85 + cd/mak.vc6/cd.dsp | 549 + cd/mak.vc6/cd.dsw | 173 + cd/mak.vc6/cd_freetype.dsp | 243 + cd/mak.vc6/cd_pdflib.dsp | 697 ++ cd/mak.vc6/cdgdiplus.dsp | 103 + cd/mak.vc6/cdlua3.dsp | 99 + cd/mak.vc6/cdlua5.dsp | 99 + cd/mak.vc6/cdluacontextplus5.dsp | 75 + cd/mak.vc6/cdluaim5.dsp | 75 + cd/mak.vc6/cdluapdf3.dsp | 75 + cd/mak.vc6/cdluapdf5.dsp | 75 + cd/mak.vc6/cdpdf.dsp | 75 + cd/mak.vc6/cdx11.dsp | 107 + cd/mak.vc6/cdxrender.dsp | 71 + cd/mak.vc7/cd.sln | 121 + cd/mak.vc7/cd.vcproj | 621 ++ cd/mak.vc7/cd_freetype.vcproj | 273 + cd/mak.vc7/cd_pdflib.vcproj | 732 ++ cd/mak.vc7/cdgdiplus.vcproj | 133 + cd/mak.vc7/cdlua3.vcproj | 129 + cd/mak.vc7/cdlua5.vcproj | 129 + cd/mak.vc7/cdluacontextplus5.vcproj | 105 + cd/mak.vc7/cdluaim5.vcproj | 110 + cd/mak.vc7/cdluapdf3.vcproj | 105 + cd/mak.vc7/cdluapdf5.vcproj | 105 + cd/mak.vc7/cdpdf.vcproj | 107 + cd/mak.vc7/cdx11.vcproj | 138 + cd/mak.vc7/cdxrender.vcproj | 100 + cd/mak.vc8/cd.sln | 122 + cd/mak.vc8/cd.vcproj | 621 ++ cd/mak.vc8/cd_freetype.vcproj | 273 + cd/mak.vc8/cd_pdflib.vcproj | 732 ++ cd/mak.vc8/cdgdiplus.vcproj | 133 + cd/mak.vc8/cdlua3.vcproj | 129 + cd/mak.vc8/cdlua5.vcproj | 129 + cd/mak.vc8/cdluacontextplus5.vcproj | 105 + cd/mak.vc8/cdluaim5.vcproj | 110 + cd/mak.vc8/cdluapdf3.vcproj | 105 + cd/mak.vc8/cdluapdf5.vcproj | 105 + cd/mak.vc8/cdpdf.vcproj | 107 + cd/mak.vc8/cdx11.vcproj | 138 + cd/mak.vc8/cdxrender.vcproj | 100 + cd/mak.vc9/cd.sln | 142 + cd/mak.vc9/cd.vcproj | 621 ++ cd/mak.vc9/cd_freetype.vcproj | 273 + cd/mak.vc9/cd_pdflib.vcproj | 732 ++ cd/mak.vc9/cdgdiplus.vcproj | 134 + cd/mak.vc9/cdlua3.vcproj | 129 + cd/mak.vc9/cdlua5.vcproj | 129 + cd/mak.vc9/cdluacontextplus5.vcproj | 105 + cd/mak.vc9/cdluaim5.vcproj | 110 + cd/mak.vc9/cdluapdf3.vcproj | 105 + cd/mak.vc9/cdluapdf5.vcproj | 105 + cd/mak.vc9/cdpdf.vcproj | 107 + cd/mak.vc9/cdtest.vcproj | 159 + cd/mak.vc9/cdtestsimple.vcproj | 131 + cd/mak.vc9/cdx11.vcproj | 139 + cd/mak.vc9/cdxrender.vcproj | 100 + cd/src/COPYRIGHT | 32 + cd/src/Makefile | 19 + cd/src/README | 11 + cd/src/cd.c | 739 ++ cd/src/cd.def | 384 + cd/src/cd.dep | 120 + cd/src/cd.rc | 19 + cd/src/cd_active.c | 1006 ++ cd/src/cd_attributes.c | 1017 ++ cd/src/cd_bitmap.c | 293 + cd/src/cd_image.c | 441 + cd/src/cd_primitives.c | 702 ++ cd/src/cd_text.c | 810 ++ cd/src/cd_util.c | 351 + cd/src/cd_vectortext.c | 5189 +++++++++ cd/src/cdcontextplus.dep | 4 + cd/src/cdcontextplus.mak | 25 + cd/src/cdlua3.mak | 12 + cd/src/cdlua5.mak | 14 + cd/src/cdlua51.dep | 28 + cd/src/cdluacontextplus5.mak | 17 + cd/src/cdluacontextplus51.dep | 3 + cd/src/cdluaim5.mak | 16 + cd/src/cdluaim51.dep | 6 + cd/src/config.mak | 47 + cd/src/drv/cd0emf.c | 17 + cd/src/drv/cd0prn.c | 17 + cd/src/drv/cd0wmf.c | 16 + cd/src/drv/cdcgm.c | 1135 ++ cd/src/drv/cddebug.c | 733 ++ cd/src/drv/cddgn.c | 1691 +++ cd/src/drv/cddxf.c | 1188 +++ cd/src/drv/cdirgb.c | 2051 ++++ cd/src/drv/cdmf.c | 1192 +++ cd/src/drv/cdpdf.c | 1491 +++ cd/src/drv/cdpicture.c | 1133 ++ cd/src/drv/cdps.c | 1838 ++++ cd/src/drv/cgm.c | 2280 ++++ cd/src/drv/cgm.h | 156 + cd/src/gdiplus/cdcontextplus.def | 9 + cd/src/gdiplus/cdwclpp.cpp | 206 + cd/src/gdiplus/cdwdbufp.cpp | 164 + cd/src/gdiplus/cdwemfp.cpp | 105 + cd/src/gdiplus/cdwgdiplus.c | 42 + cd/src/gdiplus/cdwimgp.cpp | 65 + cd/src/gdiplus/cdwinp.cpp | 2338 +++++ cd/src/gdiplus/cdwinp.h | 112 + cd/src/gdiplus/cdwnativep.cpp | 138 + cd/src/gdiplus/cdwprnp.cpp | 158 + cd/src/intcgm/bparse.c | 1660 +++ cd/src/intcgm/bparse.h | 117 + cd/src/intcgm/circle.c | 100 + cd/src/intcgm/circle.h | 3 + cd/src/intcgm/ellipse.c | 143 + cd/src/intcgm/ellipse.h | 3 + cd/src/intcgm/intcgm.h | 84 + cd/src/intcgm/intcgm1.c | 291 + cd/src/intcgm/intcgm2.c | 1651 +++ cd/src/intcgm/intcgm2.h | 52 + cd/src/intcgm/intcgm4.c | 1265 +++ cd/src/intcgm/intcgm4.h | 28 + cd/src/intcgm/intcgm6.c | 253 + cd/src/intcgm/intcgm6.h | 15 + cd/src/intcgm/list.c | 117 + cd/src/intcgm/list.h | 30 + cd/src/intcgm/sism.c | 392 + cd/src/intcgm/sism.h | 3 + cd/src/intcgm/tparse.c | 1370 +++ cd/src/intcgm/tparse.h | 101 + cd/src/intcgm/types.h | 225 + cd/src/lua3/cdlua.c | 4366 ++++++++ cd/src/lua3/cdlua.def | 7 + cd/src/lua3/cdluactx.c | 950 ++ cd/src/lua3/cdluapdf.c | 43 + cd/src/lua3/cdluapdf.def | 2 + cd/src/lua3/cdvoid.c | 126 + cd/src/lua3/cdvoid.h | 17 + cd/src/lua3/toluacd.c | 585 ++ cd/src/lua3/toluawd.c | 228 + cd/src/lua5/cdlua5.c | 1823 ++++ cd/src/lua5/cdlua5.def | 13 + cd/src/lua5/cdlua5_active.c | 2163 ++++ cd/src/lua5/cdlua5_canvas.c | 2405 +++++ cd/src/lua5/cdlua5ctx.c | 802 ++ cd/src/lua5/cdluacontextplus5.c | 44 + cd/src/lua5/cdluacontextplus5.def | 4 + cd/src/lua5/cdluaim5.c | 265 + cd/src/lua5/cdluaim5.def | 4 + cd/src/lua5/cdluapdf5.c | 53 + cd/src/lua5/cdluapdf5.def | 4 + cd/src/lua5/cdvoid5.c | 130 + cd/src/lua5/cdvoid5.h | 18 + cd/src/make_uname | 16 + cd/src/make_uname.bat | 57 + cd/src/rgb2map.c | 976 ++ cd/src/sim/cd_truetype.c | 177 + cd/src/sim/cd_truetype.h | 46 + cd/src/sim/cdfontex.c | 646 ++ cd/src/sim/sim.c | 326 + cd/src/sim/sim.h | 55 + cd/src/sim/sim_linepolyfill.c | 1000 ++ cd/src/sim/sim_other.c | 411 + cd/src/sim/sim_primitives.c | 524 + cd/src/sim/truetype.h | 46 + cd/src/tecmake_compact.mak | 1172 +++ cd/src/wd.c | 473 + cd/src/wdhdcpy.c | 101 + cd/src/win32/cdwclp.c | 552 + cd/src/win32/cdwdbuf.c | 181 + cd/src/win32/cdwdib.c | 662 ++ cd/src/win32/cdwemf.c | 117 + cd/src/win32/cdwimg.c | 83 + cd/src/win32/cdwin.c | 2368 +++++ cd/src/win32/cdwin.h | 181 + cd/src/win32/cdwnative.c | 209 + cd/src/win32/cdwprn.c | 184 + cd/src/win32/cdwwmf.c | 109 + cd/src/win32/wmf_emf.c | 2121 ++++ cd/src/x11/cdx11.c | 2446 +++++ cd/src/x11/cdx11.h | 85 + cd/src/x11/cdxclp.c | 136 + cd/src/x11/cdxdbuf.c | 168 + cd/src/x11/cdximg.c | 52 + cd/src/x11/cdxnative.c | 165 + cd/src/x11/xvertex.c | 1431 +++ cd/src/x11/xvertex.h | 31 + cd/src/xrender/cdxrender.c | 1137 ++ cd/src/xrender/cdxrplus.c | 26 + cd/test/cdtest/cdtest.bat | 3 + cd/test/cdtest/cdtest.c | 2669 +++++ cd/test/cdtest/cdtest.h | 415 + cd/test/cdtest/cdtest.ico | Bin 0 -> 766 bytes cd/test/cdtest/cdtest.led | 1508 +++ cd/test/cdtest/cdtest.rc | 1 + cd/test/cdtest/cdtest_led.c | 1590 +++ cd/test/cdtest/colobar.h | 7 + cd/test/cdtest/colorbar.c | 565 + cd/test/cdtest/config.mak | 24 + cd/test/cdtest/drivers.c | 457 + cd/test/cdtest/list.c | 278 + cd/test/cdtest/rubber.c | 387 + cd/test/lua/cdalign.wlua | 67 + cd/test/lua/cdtext.wlua | 59 + cd/test/lua/imagergb.wlua | 35 + cd/test/lua/iupcdaux.lua | 45 + cd/test/lua/iuplua_cdlua.wlua | 58 + cd/test/lua/rubberband.wlua | 54 + cd/test/metafile.c | 109 + cd/test/mf/align.mf | 45 + cd/test/mf/alignorient.mf | 44 + cd/test/mf/alignxor.mf | 44 + cd/test/mf/arc.mf | 25 + cd/test/mf/circles.mf | 47 + cd/test/mf/cliparea.mf | 80 + cd/test/mf/fill.mf | 48 + cd/test/mf/fill_x_hollow.mf | 170 + cd/test/mf/font.mf | 49 + cd/test/mf/grays.mf | 59 + cd/test/mf/hatch.mf | 47 + cd/test/mf/lines.mf | 44 + cd/test/mf/marks.mf | 33 + cd/test/mf/natal.mf | 1933 ++++ cd/test/mf/poly.mf | 88 + cd/test/mf/poly2.mf | 88 + cd/test/mf/poly3.mf | 136 + cd/test/mf/poly4.mf | 136 + cd/test/mf/poly5.mf | 89 + cd/test/mf/sector.mf | 22 + cd/test/screencapture.c | 36 + cd/test/screencapture.mak | 8 + cd/test/simple/config.mak | 24 + cd/test/simple/gdiplustest.cpp | 116 + cd/test/simple/iupmain.c | 83 + cd/test/simple/simple.bat | 3 + cd/test/simple/simple.c | 1313 +++ cd/test/simple/simple.h | 54 + cd/test/simple/simple.led | 93 + cd/test/simple/simple_led.c | 125 + im/dox/im.dox | 1528 +++ im/include/im.h | 287 + im/include/im_attrib.h | 120 + im/include/im_attrib_flat.h | 39 + im/include/im_binfile.h | 224 + im/include/im_capture.h | 365 + im/include/im_color.h | 465 + im/include/im_colorhsi.h | 56 + im/include/im_complex.h | 180 + im/include/im_convert.h | 142 + im/include/im_counter.h | 69 + im/include/im_dib.h | 195 + im/include/im_file.h | 115 + im/include/im_format.h | 97 + im/include/im_format_all.h | 360 + im/include/im_format_avi.h | 88 + im/include/im_format_ecw.h | 93 + im/include/im_format_jp2.h | 79 + im/include/im_format_raw.h | 74 + im/include/im_format_wmv.h | 101 + im/include/im_image.h | 411 + im/include/im_kernel.h | 315 + im/include/im_lib.h | 191 + im/include/im_math.h | 368 + im/include/im_math_op.h | 214 + im/include/im_palette.h | 172 + im/include/im_plus.h | 73 + im/include/im_process.h | 36 + im/include/im_process_ana.h | 222 + im/include/im_process_glo.h | 170 + im/include/im_process_loc.h | 606 ++ im/include/im_process_pon.h | 720 ++ im/include/im_raw.h | 34 + im/include/im_util.h | 277 + im/include/imlua.h | 83 + im/include/old_im.h | 59 + im/mak.vc8/im.sln | 177 + im/mak.vc8/im.vcproj | 1224 +++ im/mak.vc8/im_avi.vcproj | 120 + im/mak.vc8/im_capture.vcproj | 120 + im/mak.vc8/im_copy.vcproj | 116 + im/mak.vc8/im_ecw.vcproj | 120 + im/mak.vc8/im_fftw.vcproj | 425 + im/mak.vc8/im_info.vcproj | 116 + im/mak.vc8/im_jp2.vcproj | 444 + im/mak.vc8/im_process.vcproj | 224 + im/mak.vc8/im_view.vcproj | 116 + im/mak.vc8/im_wmv.vcproj | 120 + im/mak.vc8/imlua3.vcproj | 120 + im/mak.vc8/imlua5.vcproj | 164 + im/mak.vc8/imlua_capture5.vcproj | 111 + im/mak.vc8/imlua_fftw5.vcproj | 115 + im/mak.vc8/imlua_process5.vcproj | 119 + im/mak.vc9/im.sln | 177 + im/mak.vc9/im.vcproj | 1224 +++ im/mak.vc9/im_avi.vcproj | 120 + im/mak.vc9/im_capture.vcproj | 120 + im/mak.vc9/im_copy.vcproj | 116 + im/mak.vc9/im_ecw.vcproj | 120 + im/mak.vc9/im_fftw.vcproj | 425 + im/mak.vc9/im_info.vcproj | 116 + im/mak.vc9/im_jp2.vcproj | 444 + im/mak.vc9/im_process.vcproj | 224 + im/mak.vc9/im_view.vcproj | 116 + im/mak.vc9/im_wmv.vcproj | 120 + im/mak.vc9/imlua3.vcproj | 120 + im/mak.vc9/imlua5.vcproj | 164 + im/mak.vc9/imlua_capture5.vcproj | 111 + im/mak.vc9/imlua_fftw5.vcproj | 115 + im/mak.vc9/imlua_process5.vcproj | 119 + im/src/COPYRIGHT | 32 + im/src/Makefile | 15 + im/src/README | 11 + im/src/config.mak | 89 + im/src/im.def | 200 + im/src/im.dep | 121 + im/src/im.rc | 19 + im/src/im_attrib.cpp | 319 + im/src/im_bin.cpp | 111 + im/src/im_binfile.cpp | 710 ++ im/src/im_capture.def | 27 + im/src/im_capture.mak | 73 + im/src/im_capture.wlib | 22 + im/src/im_capture_dx.cpp | 2255 ++++ im/src/im_colorhsi.cpp | 265 + im/src/im_colormode.cpp | 87 + im/src/im_colorutil.cpp | 27 + im/src/im_convertbitmap.cpp | 284 + im/src/im_convertcolor.cpp | 985 ++ im/src/im_converttype.cpp | 555 + im/src/im_counter.cpp | 151 + im/src/im_datatype.cpp | 54 + im/src/im_dib.cpp | 1136 ++ im/src/im_dibxbitmap.cpp | 181 + im/src/im_ecw.def | 2 + im/src/im_ecw.mak | 16 + im/src/im_file.cpp | 465 + im/src/im_filebuffer.cpp | 695 ++ im/src/im_fileraw.cpp | 66 + im/src/im_format.cpp | 299 + im/src/im_format_all.cpp | 34 + im/src/im_format_bmp.cpp | 949 ++ im/src/im_format_ecw.cpp | 385 + im/src/im_format_gif.cpp | 1510 +++ im/src/im_format_ico.cpp | 660 ++ im/src/im_format_krn.cpp | 325 + im/src/im_format_led.cpp | 341 + im/src/im_format_pcx.cpp | 711 ++ im/src/im_format_pnm.cpp | 483 + im/src/im_format_ras.cpp | 608 ++ im/src/im_format_raw.cpp | 366 + im/src/im_format_sgi.cpp | 616 ++ im/src/im_format_tga.cpp | 1113 ++ im/src/im_format_wmv.cpp | 1633 +++ im/src/im_image.cpp | 695 ++ im/src/im_lib.cpp | 38 + im/src/im_lua3.c | 1297 +++ im/src/im_palette.cpp | 551 + im/src/im_process.def | 165 + im/src/im_process.dep | 84 + im/src/im_process.mak | 36 + im/src/im_rgb2map.cpp | 964 ++ im/src/im_str.cpp | 67 + im/src/im_sysfile_unix.cpp | 211 + im/src/im_sysfile_win32.cpp | 207 + im/src/im_wmv.def | 2 + im/src/im_wmv.mak | 23 + im/src/imlua3.def | 2 + im/src/imlua3.mak | 12 + im/src/imlua5.mak | 18 + im/src/imlua51.dep | 38 + im/src/imlua_capture5.mak | 18 + im/src/imlua_process5.mak | 19 + im/src/imlua_process51.dep | 17 + im/src/imlua_wmv.mak | 17 + im/src/jas_binfile.c | 97 + im/src/lua5/im_convert.lua | 18 + im/src/lua5/im_fftw.lua | 57 + im/src/lua5/im_image.lua | 24 + im/src/lua5/im_process.lua | 329 + im/src/lua5/imlua.c | 252 + im/src/lua5/imlua.def | 24 + im/src/lua5/imlua_aux.c | 256 + im/src/lua5/imlua_aux.h | 82 + im/src/lua5/imlua_avi.c | 44 + im/src/lua5/imlua_avi.def | 4 + im/src/lua5/imlua_capture.c | 443 + im/src/lua5/imlua_capture.def | 5 + im/src/lua5/imlua_convert.c | 96 + im/src/lua5/imlua_fftw.c | 162 + im/src/lua5/imlua_fftw.def | 4 + im/src/lua5/imlua_file.c | 661 ++ im/src/lua5/imlua_image.c | 1083 ++ im/src/lua5/imlua_image.h | 38 + im/src/lua5/imlua_jp2.c | 44 + im/src/lua5/imlua_jp2.def | 4 + im/src/lua5/imlua_kernel.c | 182 + im/src/lua5/imlua_palette.c | 399 + im/src/lua5/imlua_palette.h | 32 + im/src/lua5/imlua_process.c | 3143 ++++++ im/src/lua5/imlua_process.def | 4 + im/src/lua5/imlua_util.c | 279 + im/src/lua5/imlua_wmv.c | 44 + im/src/lua5/imlua_wmv.def | 4 + im/src/lua5/loh/im_convert.loh | 87 + im/src/lua5/loh/im_convert_be32.loh | 87 + im/src/lua5/loh/im_convert_be64.loh | 95 + im/src/lua5/loh/im_convert_le64.loh | 95 + im/src/lua5/loh/im_fftw.loh | 110 + im/src/lua5/loh/im_fftw_be32.loh | 110 + im/src/lua5/loh/im_fftw_be64.loh | 122 + im/src/lua5/loh/im_fftw_le64.loh | 122 + im/src/lua5/loh/im_fftw_le64w.loh | 115 + im/src/lua5/loh/im_image.loh | 63 + im/src/lua5/loh/im_image_be32.loh | 63 + im/src/lua5/loh/im_image_be64.loh | 68 + im/src/lua5/loh/im_image_le64.loh | 68 + im/src/lua5/loh/im_process.loh | 817 ++ im/src/lua5/loh/im_process_be32.loh | 817 ++ im/src/lua5/loh/im_process_be64.loh | 897 ++ im/src/lua5/loh/im_process_le64.loh | 897 ++ im/src/lua5/loh/im_process_le64w.loh | 890 ++ im/src/make_uname | 13 + im/src/make_uname.bat | 74 + im/src/old_im.cpp | 440 + im/src/old_imcolor.c | 75 + im/src/old_imresize.c | 117 + im/src/process/im_analyze.cpp | 1268 +++ im/src/process/im_arithmetic_bin.cpp | 587 ++ im/src/process/im_arithmetic_un.cpp | 256 + im/src/process/im_canny.cpp | 254 + im/src/process/im_color.cpp | 255 + im/src/process/im_convolve.cpp | 1594 +++ im/src/process/im_convolve_rank.cpp | 701 ++ im/src/process/im_distance.cpp | 512 + im/src/process/im_effects.cpp | 86 + im/src/process/im_fft.cpp | 198 + im/src/process/im_geometric.cpp | 724 ++ im/src/process/im_histogram.cpp | 105 + im/src/process/im_houghline.cpp | 435 + im/src/process/im_kernel.cpp | 293 + im/src/process/im_logic.cpp | 136 + im/src/process/im_morphology_bin.cpp | 317 + im/src/process/im_morphology_gray.cpp | 231 + im/src/process/im_quantize.cpp | 64 + im/src/process/im_render.cpp | 532 + im/src/process/im_resize.cpp | 332 + im/src/process/im_statistics.cpp | 341 + im/src/process/im_threshold.cpp | 391 + im/src/process/im_tonegamut.cpp | 322 + im/src/tecmake_compact.mak | 1170 +++ im/test/glut_capture.c | 415 + im/test/im_copy.cpp | 145 + im/test/im_info.cpp | 211 + im/test/im_info.mak | 11 + im/test/im_view.c | 182 + im/test/im_view.mak | 14 + im/test/iupglview.c | 237 + iup/COPYRIGHT | 32 + iup/Makefile | 29 + iup/README | 12 + iup/dox/iup.dox | 264 + iup/etc/iup.manifest | 22 + iup/etc/iup.rc | 44 + iup/etc/iup64.manifest | 22 + iup/etc/pen.cur | Bin 0 -> 326 bytes iup/etc/tecgraf.ico | Bin 0 -> 7438 bytes iup/fix_permission | 1 + iup/include/iup.h | 363 + iup/include/iup_pplot.h | 40 + iup/include/iupcb.h | 1 + iup/include/iupcbox.h | 1 + iup/include/iupcbs.h | 43 + iup/include/iupcells.h | 1 + iup/include/iupcolorbar.h | 1 + iup/include/iupcontrols.h | 46 + iup/include/iupdef.h | 725 ++ iup/include/iupdial.h | 1 + iup/include/iupgauge.h | 1 + iup/include/iupgc.h | 1 + iup/include/iupgetparam.h | 1 + iup/include/iupgl.h | 96 + iup/include/iupim.h | 27 + iup/include/iupkey.h | 457 + iup/include/iuplua.h | 41 + iup/include/iuplua_pplot.h | 26 + iup/include/iupluacontrols.h | 27 + iup/include/iupluagl.h | 26 + iup/include/iupluaim.h | 26 + iup/include/iupluaole.h | 26 + iup/include/iupmask.h | 41 + iup/include/iupmatrix.h | 1 + iup/include/iupole.h | 24 + iup/include/iupsbox.h | 1 + iup/include/iupspin.h | 1 + iup/include/iuptabs.h | 1 + iup/include/iuptree.h | 1 + iup/include/iupval.h | 1 + iup/mak.vc8/iup.sln | 347 + iup/mak.vc8/iup_pplot.vcproj | 137 + iup/mak.vc8/iupcd.vcproj | 104 + iup/mak.vc8/iupcontrols.vcproj | 335 + iup/mak.vc8/iupcore.vcproj | 600 ++ iup/mak.vc8/iupgl.vcproj | 127 + iup/mak.vc8/iupgtk.vcproj | 217 + iup/mak.vc8/iupim.vcproj | 103 + iup/mak.vc8/iupimglib.vcproj | 142 + iup/mak.vc8/iuplua3.vcproj | 194 + iup/mak.vc8/iuplua5.vcproj | 462 + iup/mak.vc8/iuplua_pplot3.vcproj | 110 + iup/mak.vc8/iuplua_pplot5.vcproj | 122 + iup/mak.vc8/iupluacd3.vcproj | 99 + iup/mak.vc8/iupluacd5.vcproj | 99 + iup/mak.vc8/iupluacontrols3.vcproj | 170 + iup/mak.vc8/iupluacontrols5.vcproj | 182 + iup/mak.vc8/iupluaexe3.vcproj | 120 + iup/mak.vc8/iupluaexe5.vcproj | 121 + iup/mak.vc8/iupluaexe5gtk.vcproj | 117 + iup/mak.vc8/iupluagl3.vcproj | 101 + iup/mak.vc8/iupluagl5.vcproj | 118 + iup/mak.vc8/iupluaim3.vcproj | 101 + iup/mak.vc8/iupluaim5.vcproj | 101 + iup/mak.vc8/iupluaimglib5.vcproj | 97 + iup/mak.vc8/iupluaole3.vcproj | 101 + iup/mak.vc8/iupluaole5.vcproj | 114 + iup/mak.vc8/iupmot.vcproj | 235 + iup/mak.vc8/iupole.vcproj | 182 + iup/mak.vc8/iupsample.vcproj | 1172 +++ iup/mak.vc8/iupsamplegtk.vcproj | 791 ++ iup/mak.vc8/iuptest.vcproj | 304 + iup/mak.vc8/iuptestgtk.vcproj | 295 + iup/mak.vc8/iupview.vcproj | 117 + iup/mak.vc8/iupviewgtk.vcproj | 113 + iup/mak.vc8/iupwin.vcproj | 250 + iup/mak.vc8/ledc.vcproj | 120 + iup/mak.vc9/iup.sln | 347 + iup/mak.vc9/iup_pplot.vcproj | 137 + iup/mak.vc9/iupcd.vcproj | 104 + iup/mak.vc9/iupcontrols.vcproj | 335 + iup/mak.vc9/iupcore.vcproj | 600 ++ iup/mak.vc9/iupgl.vcproj | 127 + iup/mak.vc9/iupgtk.vcproj | 221 + iup/mak.vc9/iupim.vcproj | 103 + iup/mak.vc9/iupimglib.vcproj | 142 + iup/mak.vc9/iuplua3.vcproj | 194 + iup/mak.vc9/iuplua5.vcproj | 470 + iup/mak.vc9/iuplua_pplot3.vcproj | 110 + iup/mak.vc9/iuplua_pplot5.vcproj | 122 + iup/mak.vc9/iupluacd3.vcproj | 99 + iup/mak.vc9/iupluacd5.vcproj | 99 + iup/mak.vc9/iupluacontrols3.vcproj | 170 + iup/mak.vc9/iupluacontrols5.vcproj | 182 + iup/mak.vc9/iupluaexe3.vcproj | 120 + iup/mak.vc9/iupluaexe5.vcproj | 121 + iup/mak.vc9/iupluaexe5gtk.vcproj | 117 + iup/mak.vc9/iupluagl3.vcproj | 101 + iup/mak.vc9/iupluagl5.vcproj | 118 + iup/mak.vc9/iupluaim3.vcproj | 101 + iup/mak.vc9/iupluaim5.vcproj | 101 + iup/mak.vc9/iupluaimglib5.vcproj | 97 + iup/mak.vc9/iupluaole3.vcproj | 101 + iup/mak.vc9/iupluaole5.vcproj | 114 + iup/mak.vc9/iupmot.vcproj | 239 + iup/mak.vc9/iupole.vcproj | 182 + iup/mak.vc9/iupsample.vcproj | 1179 +++ iup/mak.vc9/iupsamplegtk.vcproj | 798 ++ iup/mak.vc9/iuptest.vcproj | 320 + iup/mak.vc9/iuptestgtk.vcproj | 311 + iup/mak.vc9/iupview.vcproj | 117 + iup/mak.vc9/iupviewgtk.vcproj | 113 + iup/mak.vc9/iupwin.vcproj | 254 + iup/mak.vc9/ledc.vcproj | 120 + iup/make_uname | 49 + iup/make_uname.bat | 5 + iup/make_uname_lib.bat | 6 + iup/src/Makefile | 9 + iup/src/config.mak | 118 + iup/src/gtk/iupgtk_button.c | 477 + iup/src/gtk/iupgtk_canvas.c | 624 ++ iup/src/gtk/iupgtk_clipboard.c | 125 + iup/src/gtk/iupgtk_colordlg.c | 211 + iup/src/gtk/iupgtk_common.c | 830 ++ iup/src/gtk/iupgtk_dialog.c | 1023 ++ iup/src/gtk/iupgtk_drv.h | 82 + iup/src/gtk/iupgtk_filedlg.c | 536 + iup/src/gtk/iupgtk_focus.c | 44 + iup/src/gtk/iupgtk_font.c | 413 + iup/src/gtk/iupgtk_fontdlg.c | 91 + iup/src/gtk/iupgtk_frame.c | 155 + iup/src/gtk/iupgtk_globalattrib.c | 211 + iup/src/gtk/iupgtk_help.c | 52 + iup/src/gtk/iupgtk_image.c | 430 + iup/src/gtk/iupgtk_key.c | 422 + iup/src/gtk/iupgtk_label.c | 318 + iup/src/gtk/iupgtk_list.c | 1439 +++ iup/src/gtk/iupgtk_loop.c | 93 + iup/src/gtk/iupgtk_menu.c | 525 + iup/src/gtk/iupgtk_messagedlg.c | 128 + iup/src/gtk/iupgtk_open.c | 172 + iup/src/gtk/iupgtk_progressbar.c | 131 + iup/src/gtk/iupgtk_tabs.c | 444 + iup/src/gtk/iupgtk_text.c | 1716 +++ iup/src/gtk/iupgtk_timer.c | 61 + iup/src/gtk/iupgtk_tips.c | 100 + iup/src/gtk/iupgtk_toggle.c | 519 + iup/src/gtk/iupgtk_tree.c | 2369 +++++ iup/src/gtk/iupgtk_val.c | 208 + iup/src/iup.c | 86 + iup/src/iup.def | 353 + iup/src/iup.dep | 334 + iup/src/iup_array.c | 108 + iup/src/iup_array.h | 63 + iup/src/iup_assert.c | 54 + iup/src/iup_assert.h | 68 + iup/src/iup_attrib.c | 673 ++ iup/src/iup_attrib.h | 137 + iup/src/iup_box.c | 238 + iup/src/iup_box.h | 40 + iup/src/iup_button.c | 206 + iup/src/iup_button.h | 39 + iup/src/iup_callback.c | 90 + iup/src/iup_canvas.c | 169 + iup/src/iup_canvas.h | 37 + iup/src/iup_cbox.c | 143 + iup/src/iup_childtree.c | 455 + iup/src/iup_childtree.h | 54 + iup/src/iup_class.c | 314 + iup/src/iup_class.h | 414 + iup/src/iup_classattrib.c | 508 + iup/src/iup_classbase.c | 466 + iup/src/iup_classbase.h | 175 + iup/src/iup_colordlg.c | 44 + iup/src/iup_dialog.c | 747 ++ iup/src/iup_dialog.h | 89 + iup/src/iup_dlglist.c | 130 + iup/src/iup_dlglist.h | 58 + iup/src/iup_dll.rc | 41 + iup/src/iup_drv.h | 99 + iup/src/iup_drvfont.h | 116 + iup/src/iup_drvinfo.h | 103 + iup/src/iup_filedlg.c | 67 + iup/src/iup_fill.c | 242 + iup/src/iup_focus.c | 281 + iup/src/iup_focus.h | 53 + iup/src/iup_font.c | 714 ++ iup/src/iup_fontdlg.c | 48 + iup/src/iup_frame.c | 165 + iup/src/iup_frame.h | 22 + iup/src/iup_func.c | 78 + iup/src/iup_func.h | 28 + iup/src/iup_getparam.c | 1254 +++ iup/src/iup_globalattrib.c | 153 + iup/src/iup_globalattrib.h | 33 + iup/src/iup_hbox.c | 309 + iup/src/iup_image.c | 1017 ++ iup/src/iup_image.h | 61 + iup/src/iup_key.c | 269 + iup/src/iup_key.h | 70 + iup/src/iup_label.c | 183 + iup/src/iup_label.h | 37 + iup/src/iup_layout.c | 273 + iup/src/iup_layout.h | 28 + iup/src/iup_ledlex.c | 366 + iup/src/iup_ledlex.h | 54 + iup/src/iup_ledparse.c | 288 + iup/src/iup_list.c | 711 ++ iup/src/iup_list.h | 53 + iup/src/iup_mask.c | 146 + iup/src/iup_mask.h | 55 + iup/src/iup_maskmatch.c | 582 ++ iup/src/iup_maskmatch.h | 62 + iup/src/iup_maskparse.c | 547 + iup/src/iup_maskparse.h | 46 + iup/src/iup_menu.c | 364 + iup/src/iup_menu.h | 35 + iup/src/iup_messagedlg.c | 70 + iup/src/iup_names.c | 193 + iup/src/iup_names.h | 34 + iup/src/iup_normalizer.c | 188 + iup/src/iup_object.c | 180 + iup/src/iup_object.h | 132 + iup/src/iup_open.c | 119 + iup/src/iup_predial.c | 510 + iup/src/iup_predial.h | 32 + iup/src/iup_progressbar.c | 118 + iup/src/iup_progressbar.h | 35 + iup/src/iup_radio.c | 195 + iup/src/iup_register.c | 123 + iup/src/iup_register.h | 47 + iup/src/iup_sbox.c | 413 + iup/src/iup_scanf.c | 200 + iup/src/iup_show.c | 256 + iup/src/iup_spin.c | 301 + iup/src/iup_stdcontrols.h | 76 + iup/src/iup_str.c | 716 ++ iup/src/iup_str.h | 183 + iup/src/iup_strmessage.c | 137 + iup/src/iup_strmessage.h | 45 + iup/src/iup_table.c | 736 ++ iup/src/iup_table.h | 143 + iup/src/iup_tabs.c | 471 + iup/src/iup_tabs.h | 50 + iup/src/iup_text.c | 513 + iup/src/iup_text.h | 48 + iup/src/iup_timer.c | 80 + iup/src/iup_timer.h | 24 + iup/src/iup_toggle.c | 140 + iup/src/iup_toggle.h | 37 + iup/src/iup_tree.c | 499 + iup/src/iup_tree.h | 57 + iup/src/iup_user.c | 41 + iup/src/iup_val.c | 209 + iup/src/iup_val.h | 42 + iup/src/iup_vbox.c | 311 + iup/src/iup_zbox.c | 375 + iup/src/iupgtk.dep | 259 + iup/src/iupstub.mak | 12 + iup/src/make_uname | 4 + iup/src/make_uname.bat | 55 + iup/src/mot/iupmot_button.c | 301 + iup/src/mot/iupmot_canvas.c | 639 ++ iup/src/mot/iupmot_clipboard.c | 208 + iup/src/mot/iupmot_color.c | 380 + iup/src/mot/iupmot_color.h | 36 + iup/src/mot/iupmot_colordlg.c | 31 + iup/src/mot/iupmot_common.c | 630 ++ iup/src/mot/iupmot_dialog.c | 1069 ++ iup/src/mot/iupmot_drv.h | 75 + iup/src/mot/iupmot_filedlg.c | 578 ++ iup/src/mot/iupmot_focus.c | 35 + iup/src/mot/iupmot_font.c | 443 + iup/src/mot/iupmot_fontdlg.c | 31 + iup/src/mot/iupmot_frame.c | 257 + iup/src/mot/iupmot_globalattrib.c | 155 + iup/src/mot/iupmot_image.c | 397 + iup/src/mot/iupmot_key.c | 425 + iup/src/mot/iupmot_label.c | 256 + iup/src/mot/iupmot_list.c | 1404 +++ iup/src/mot/iupmot_loop.c | 108 + iup/src/mot/iupmot_menu.c | 457 + iup/src/mot/iupmot_messagedlg.c | 191 + iup/src/mot/iupmot_open.c | 141 + iup/src/mot/iupmot_progressbar.c | 165 + iup/src/mot/iupmot_tabs.c | 593 ++ iup/src/mot/iupmot_text.c | 1165 +++ iup/src/mot/iupmot_timer.c | 70 + iup/src/mot/iupmot_tips.c | 226 + iup/src/mot/iupmot_toggle.c | 469 + iup/src/mot/iupmot_tree.c | 2848 +++++ iup/src/mot/iupmot_val.c | 488 + iup/src/mot/iupunix_help.c | 44 + iup/src/mot/iupunix_info.c | 305 + iup/src/win/iupwin_brush.c | 62 + iup/src/win/iupwin_brush.h | 26 + iup/src/win/iupwin_button.c | 715 ++ iup/src/win/iupwin_canvas.c | 724 ++ iup/src/win/iupwin_clipboard.c | 190 + iup/src/win/iupwin_colordlg.c | 133 + iup/src/win/iupwin_common.c | 865 ++ iup/src/win/iupwin_dialog.c | 1439 +++ iup/src/win/iupwin_draw.c | 328 + iup/src/win/iupwin_draw.h | 47 + iup/src/win/iupwin_drv.h | 113 + iup/src/win/iupwin_filedlg.c | 580 ++ iup/src/win/iupwin_focus.c | 62 + iup/src/win/iupwin_font.c | 342 + iup/src/win/iupwin_fontdlg.c | 160 + iup/src/win/iupwin_frame.c | 203 + iup/src/win/iupwin_globalattrib.c | 243 + iup/src/win/iupwin_handle.c | 56 + iup/src/win/iupwin_handle.h | 28 + iup/src/win/iupwin_image.c | 668 ++ iup/src/win/iupwin_info.c | 277 + iup/src/win/iupwin_info.h | 29 + iup/src/win/iupwin_key.c | 348 + iup/src/win/iupwin_label.c | 339 + iup/src/win/iupwin_list.c | 1460 +++ iup/src/win/iupwin_loop.c | 135 + iup/src/win/iupwin_menu.c | 667 ++ iup/src/win/iupwin_messagedlg.c | 105 + iup/src/win/iupwin_open.c | 124 + iup/src/win/iupwin_progressbar.c | 164 + iup/src/win/iupwin_tabs.c | 680 ++ iup/src/win/iupwin_text.c | 1993 ++++ iup/src/win/iupwin_timer.c | 88 + iup/src/win/iupwin_tips.c | 191 + iup/src/win/iupwin_toggle.c | 693 ++ iup/src/win/iupwin_tree.c | 2542 +++++ iup/src/win/iupwin_val.c | 315 + iup/src/win/iupwindows_help.c | 32 + iup/src/win/iupwindows_info.c | 212 + iup/src/win/iupwindows_main.c | 66 + iup/srccd/Makefile | 6 + iup/srccd/config.mak | 14 + iup/srccd/iup_cd.c | 70 + iup/srccd/iupcd.def | 2 + iup/srccd/iupcd.dep | 3 + iup/srccd/make_uname | 3 + iup/srccd/make_uname.bat | 4 + iup/srcconsole/Makefile | 12 + iup/srcconsole/config.mak | 138 + iup/srcconsole/console3.lua | 181 + iup/srcconsole/console5.lua | 204 + iup/srcconsole/copy_all_so | 11 + iup/srcconsole/copy_dll.bat | 10 + iup/srcconsole/copy_dll_64.bat | 10 + iup/srcconsole/copy_so | 4 + iup/srcconsole/iup_lua3.c | 128 + iup/srcconsole/iup_lua51.c | 493 + iup/srcconsole/iuplua3.bat | 3 + iup/srcconsole/iuplua3.mak | 90 + iup/srcconsole/iuplua3.rc | 45 + iup/srcconsole/iuplua5.rc | 59 + iup/srcconsole/iuplua51 | 6 + iup/srcconsole/iuplua51.bat | 3 + iup/srcconsole/iuplua51.dep | 4 + iup/srcconsole/iuplua51mot | 6 + iup/srcconsole/iuplua51mot.dep | 12 + iup/srcconsole/loh/console3.loh | 254 + iup/srcconsole/loh/console3_be32.loh | 254 + iup/srcconsole/loh/console3_be64.loh | 254 + iup/srcconsole/loh/console3_le64.loh | 251 + iup/srcconsole/loh/console3_le64w.loh | 251 + iup/srcconsole/loh/console5.loh | 475 + iup/srcconsole/loh/console5_be32.loh | 475 + iup/srcconsole/loh/console5_be64.loh | 524 + iup/srcconsole/loh/console5_le64.loh | 524 + iup/srcconsole/loh/console5_le64w.loh | 525 + iup/srcconsole/lua.ico | Bin 0 -> 22486 bytes iup/srcconsole/make_uname | 6 + iup/srcconsole/make_uname.bat | 30 + iup/srcconsole/wlua_dll8_x64.manifest | 33 + iup/srcconsole/wlua_dll8_x86.manifest | 33 + iup/srcconsole/wlua_dll9_x64.manifest | 33 + iup/srcconsole/wlua_dll9_x86.manifest | 33 + iup/srccontrols/Makefile | 6 + iup/srccontrols/color/iup_colorbrowser.c | 849 ++ iup/srccontrols/color/iup_colorbrowserdlg.c | 1120 ++ iup/srccontrols/color/iup_colorhsi.c | 358 + iup/srccontrols/color/iup_colorhsi.h | 44 + iup/srccontrols/config.mak | 48 + iup/srccontrols/iup_cdutil.c | 153 + iup/srccontrols/iup_cdutil.h | 35 + iup/srccontrols/iup_cells.c | 974 ++ iup/srccontrols/iup_colorbar.c | 1082 ++ iup/srccontrols/iup_controls.c | 56 + iup/srccontrols/iup_controls.h | 33 + iup/srccontrols/iup_dial.c | 864 ++ iup/srccontrols/iup_gauge.c | 435 + iup/srccontrols/iup_oldmask.c | 208 + iup/srccontrols/iup_oldtabs.c | 2616 +++++ iup/srccontrols/iup_oldval.c | 809 ++ iup/srccontrols/iupcontrols.def | 35 + iup/srccontrols/iupcontrols.dep | 173 + iup/srccontrols/make_uname | 3 + iup/srccontrols/make_uname.bat | 4 + iup/srccontrols/matrix/iupmat_aux.c | 480 + iup/srccontrols/matrix/iupmat_aux.h | 37 + iup/srccontrols/matrix/iupmat_cd.h | 25 + iup/srccontrols/matrix/iupmat_colres.c | 182 + iup/srccontrols/matrix/iupmat_colres.h | 24 + iup/srccontrols/matrix/iupmat_def.h | 122 + iup/srccontrols/matrix/iupmat_draw.c | 866 ++ iup/srccontrols/matrix/iupmat_draw.h | 31 + iup/srccontrols/matrix/iupmat_edit.c | 450 + iup/srccontrols/matrix/iupmat_edit.h | 26 + iup/srccontrols/matrix/iupmat_focus.c | 58 + iup/srccontrols/matrix/iupmat_focus.h | 21 + iup/srccontrols/matrix/iupmat_getset.c | 358 + iup/srccontrols/matrix/iupmat_getset.h | 37 + iup/srccontrols/matrix/iupmat_key.c | 229 + iup/srccontrols/matrix/iupmat_key.h | 23 + iup/srccontrols/matrix/iupmat_mark.c | 720 ++ iup/srccontrols/matrix/iupmat_mark.h | 42 + iup/srccontrols/matrix/iupmat_mem.c | 319 + iup/srccontrols/matrix/iupmat_mem.h | 24 + iup/srccontrols/matrix/iupmat_mouse.c | 212 + iup/srccontrols/matrix/iupmat_mouse.h | 22 + iup/srccontrols/matrix/iupmat_numlc.c | 495 + iup/srccontrols/matrix/iupmat_numlc.h | 27 + iup/srccontrols/matrix/iupmat_scroll.c | 495 + iup/srccontrols/matrix/iupmat_scroll.h | 69 + iup/srccontrols/matrix/iupmatrix.c | 980 ++ iup/srcgl/Makefile | 6 + iup/srcgl/config.mak | 20 + iup/srcgl/iup_glcanvas_win.c | 411 + iup/srcgl/iup_glcanvas_x.c | 448 + iup/srcgl/iupgl.def | 9 + iup/srcgl/iupgl.dep | 5 + iup/srcgl/make_uname | 3 + iup/srcgl/make_uname.bat | 4 + iup/srcim/Makefile | 6 + iup/srcim/config.mak | 15 + iup/srcim/iup_im.c | 306 + iup/srcim/iupim.def | 3 + iup/srcim/iupim.dep | 7 + iup/srcim/make_uname | 3 + iup/srcim/make_uname.bat | 4 + iup/srcimglib/Makefile | 6 + iup/srcimglib/config.mak | 14 + iup/srcimglib/iup_image_library.c | 403 + iup/srcimglib/iup_imglib_bitmaps.h | 1248 +++ iup/srcimglib/iup_imglib_bitmaps8.h | 14421 ++++++++++++++++++++++++++ iup/srcimglib/iup_imglib_bitmapsgtk.h | 224 + iup/srcimglib/iup_imglib_icons.h | 240 + iup/srcimglib/iup_imglib_icons8.h | 1788 ++++ iup/srcimglib/iup_imglib_logos.h | 1319 +++ iup/srcimglib/iup_imglib_logos8.h | 1915 ++++ iup/srcimglib/iupimglib.def | 4 + iup/srcimglib/iupimglib.dep | 5 + iup/srcimglib/make_uname | 3 + iup/srcimglib/make_uname.bat | 4 + iup/srcledc/Makefile | 6 + iup/srcledc/config.mak | 22 + iup/srcledc/ledc | 6 + iup/srcledc/ledc.bat | 3 + iup/srcledc/ledc.c | 920 ++ iup/srcledc/ledc.dep | 3 + iup/srcledc/ledc.h | 84 + iup/srcledc/ledc.l | 65 + iup/srcledc/ledc.y | 189 + iup/srcledc/lex.yy.c | 1604 +++ iup/srcledc/make_uname | 3 + iup/srcledc/make_uname.bat | 22 + iup/srcledc/y.tab.c | 507 + iup/srcledc/y.tab.h | 10 + iup/srclua3/Makefile | 21 + iup/srclua3/cells.lua | 37 + iup/srclua3/colorbar.lua | 21 + iup/srclua3/colorbrowser.lua | 17 + iup/srclua3/config.mak | 19 + iup/srclua3/constants.lua | 148 + iup/srclua3/dial.lua | 15 + iup/srclua3/gauge.lua | 10 + iup/srclua3/il.h | 81 + iup/srclua3/il_cbox.c | 36 + iup/srclua3/il_cells.c | 150 + iup/srclua3/il_colorbar.c | 97 + iup/srclua3/il_colorbrowser.c | 72 + iup/srclua3/il_controls.h | 26 + iup/srclua3/il_dial.c | 53 + iup/srclua3/il_gauge.c | 52 + iup/srclua3/il_getcolor.c | 42 + iup/srclua3/il_getparam.c | 171 + iup/srclua3/il_mask.c | 138 + iup/srclua3/il_matrix.c | 308 + iup/srclua3/il_sbox.c | 50 + iup/srclua3/il_scanf.c | 181 + iup/srclua3/il_spin.c | 66 + iup/srclua3/il_tabs.c | 67 + iup/srclua3/il_tree.c | 283 + iup/srclua3/il_val.c | 77 + iup/srclua3/iup_pplot.mak | 15 + iup/srclua3/iupcd.mak | 19 + iup/srclua3/iupcontrols.mak | 19 + iup/srclua3/iupgl.mak | 12 + iup/srclua3/iupim.mak | 12 + iup/srclua3/iuplua.c | 494 + iup/srclua3/iuplua.lua | 134 + iup/srclua3/iuplua3.def | 16 + iup/srclua3/iuplua_api.c | 762 ++ iup/srclua3/iuplua_cd.c | 43 + iup/srclua3/iuplua_controls.c | 25 + iup/srclua3/iuplua_glcanvas.c | 112 + iup/srclua3/iuplua_im.c | 39 + iup/srclua3/iuplua_olecontrol.c | 34 + iup/srclua3/iuplua_pplot.c | 241 + iup/srclua3/iuplua_pplot3.def | 2 + iup/srclua3/iuplua_widgets.c | 662 ++ iup/srclua3/iuplua_widgets.lua | 942 ++ iup/srclua3/iupluacd3.def | 3 + iup/srclua3/iupluacontrols3.def | 2 + iup/srclua3/iupluagl3.def | 2 + iup/srclua3/iupluaim3.def | 2 + iup/srclua3/iupluaole3.def | 2 + iup/srclua3/iupole.mak | 13 + iup/srclua3/loh/cells.loh | 76 + iup/srclua3/loh/cells_be32.loh | 76 + iup/srclua3/loh/cells_be64.loh | 75 + iup/srclua3/loh/cells_le64.loh | 76 + iup/srclua3/loh/cells_le64w.loh | 76 + iup/srclua3/loh/colorbar.loh | 49 + iup/srclua3/loh/colorbar_be32.loh | 49 + iup/srclua3/loh/colorbar_be64.loh | 48 + iup/srclua3/loh/colorbar_le64.loh | 49 + iup/srclua3/loh/colorbar_le64w.loh | 49 + iup/srclua3/loh/colorbrowser.loh | 39 + iup/srclua3/loh/colorbrowser_be32.loh | 39 + iup/srclua3/loh/colorbrowser_be64.loh | 40 + iup/srclua3/loh/colorbrowser_le64.loh | 39 + iup/srclua3/loh/colorbrowser_le64w.loh | 39 + iup/srclua3/loh/constants.loh | 301 + iup/srclua3/loh/constants_be32.loh | 289 + iup/srclua3/loh/constants_be64.loh | 301 + iup/srclua3/loh/constants_le64.loh | 289 + iup/srclua3/loh/constants_le64w.loh | 301 + iup/srclua3/loh/dial.loh | 31 + iup/srclua3/loh/dial_be32.loh | 31 + iup/srclua3/loh/dial_be64.loh | 30 + iup/srclua3/loh/dial_le64.loh | 31 + iup/srclua3/loh/dial_le64w.loh | 31 + iup/srclua3/loh/gauge.loh | 28 + iup/srclua3/loh/gauge_be32.loh | 28 + iup/srclua3/loh/gauge_be64.loh | 27 + iup/srclua3/loh/gauge_le64.loh | 28 + iup/srclua3/loh/gauge_le64w.loh | 28 + iup/srclua3/loh/iuplua.loh | 170 + iup/srclua3/loh/iuplua_be32.loh | 170 + iup/srclua3/loh/iuplua_be64.loh | 170 + iup/srclua3/loh/iuplua_le64.loh | 170 + iup/srclua3/loh/iuplua_le64w.loh | 170 + iup/srclua3/loh/iuplua_widgets.loh | 939 ++ iup/srclua3/loh/iuplua_widgets_be32.loh | 939 ++ iup/srclua3/loh/iuplua_widgets_be64.loh | 939 ++ iup/srclua3/loh/iuplua_widgets_le64.loh | 939 ++ iup/srclua3/loh/iuplua_widgets_le64w.loh | 920 ++ iup/srclua3/loh/matrix.loh | 120 + iup/srclua3/loh/matrix_be32.loh | 120 + iup/srclua3/loh/matrix_be64.loh | 120 + iup/srclua3/loh/matrix_le64.loh | 120 + iup/srclua3/loh/matrix_le64w.loh | 118 + iup/srclua3/loh/pplot.loh | 68 + iup/srclua3/loh/pplot_be32.loh | 68 + iup/srclua3/loh/pplot_be64.loh | 68 + iup/srclua3/loh/pplot_le64.loh | 68 + iup/srclua3/loh/pplot_le64w.loh | 69 + iup/srclua3/loh/sbox.loh | 27 + iup/srclua3/loh/sbox_be32.loh | 27 + iup/srclua3/loh/sbox_be64.loh | 27 + iup/srclua3/loh/sbox_le64.loh | 27 + iup/srclua3/loh/sbox_le64w.loh | 27 + iup/srclua3/loh/spin.loh | 43 + iup/srclua3/loh/spin_be32.loh | 43 + iup/srclua3/loh/spin_be64.loh | 43 + iup/srclua3/loh/spin_le64.loh | 43 + iup/srclua3/loh/spin_le64w.loh | 44 + iup/srclua3/loh/tabs.loh | 33 + iup/srclua3/loh/tabs_be32.loh | 33 + iup/srclua3/loh/tabs_be64.loh | 33 + iup/srclua3/loh/tabs_le64.loh | 33 + iup/srclua3/loh/tabs_le64w.loh | 34 + iup/srclua3/loh/tree.loh | 115 + iup/srclua3/loh/tree_be32.loh | 115 + iup/srclua3/loh/tree_be64.loh | 115 + iup/srclua3/loh/tree_le64.loh | 115 + iup/srclua3/loh/tree_le64w.loh | 116 + iup/srclua3/loh/val.loh | 45 + iup/srclua3/loh/val_be32.loh | 45 + iup/srclua3/loh/val_be64.loh | 45 + iup/srclua3/loh/val_le64.loh | 45 + iup/srclua3/loh/val_le64w.loh | 45 + iup/srclua3/make_uname | 8 + iup/srclua3/make_uname.bat | 10 + iup/srclua3/matrix.lua | 54 + iup/srclua3/pplot.lua | 23 + iup/srclua3/sbox.lua | 10 + iup/srclua3/spin.lua | 24 + iup/srclua3/tabs.lua | 13 + iup/srclua3/tree.lua | 68 + iup/srclua3/val.lua | 22 + iup/srclua5/Makefile | 24 + iup/srclua5/button.lua | 18 + iup/srclua5/canvas.lua | 29 + iup/srclua5/cbox.lua | 28 + iup/srclua5/cells.lua | 32 + iup/srclua5/clipboard.lua | 17 + iup/srclua5/colorbar.lua | 26 + iup/srclua5/colorbrowser.lua | 21 + iup/srclua5/colordlg.lua | 26 + iup/srclua5/config.mak | 31 + iup/srclua5/constants.lua | 72 + iup/srclua5/ctrl_template.lua | 94 + iup/srclua5/dial.lua | 21 + iup/srclua5/dialog.lua | 36 + iup/srclua5/filedlg.lua | 28 + iup/srclua5/fill.lua | 16 + iup/srclua5/fontdlg.lua | 26 + iup/srclua5/frame.lua | 16 + iup/srclua5/gauge.lua | 17 + iup/srclua5/generator.lua | 222 + iup/srclua5/glcanvas.lua | 46 + iup/srclua5/hbox.lua | 20 + iup/srclua5/il.h | 161 + iup/srclua5/il_button.c | 59 + iup/srclua5/il_canvas.c | 159 + iup/srclua5/il_cbox.c | 53 + iup/srclua5/il_cells.c | 136 + iup/srclua5/il_clipboard.c | 52 + iup/srclua5/il_colorbar.c | 87 + iup/srclua5/il_colorbrowser.c | 73 + iup/srclua5/il_colordlg.c | 52 + iup/srclua5/il_controls.h | 26 + iup/srclua5/il_dial.c | 61 + iup/srclua5/il_dialog.c | 111 + iup/srclua5/il_filedlg.c | 61 + iup/srclua5/il_fill.c | 52 + iup/srclua5/il_fontdlg.c | 52 + iup/srclua5/il_frame.c | 52 + iup/srclua5/il_gauge.c | 53 + iup/srclua5/il_getcolor.c | 46 + iup/srclua5/il_getparam.c | 177 + iup/srclua5/il_glcanvas.c | 90 + iup/srclua5/il_hbox.c | 52 + iup/srclua5/il_image.c | 119 + iup/srclua5/il_imagergb.c | 57 + iup/srclua5/il_imagergba.c | 57 + iup/srclua5/il_item.c | 66 + iup/srclua5/il_label.c | 52 + iup/srclua5/il_list.c | 96 + iup/srclua5/il_mask.c | 132 + iup/srclua5/il_matrix.c | 247 + iup/srclua5/il_matrix_aux.c | 85 + iup/srclua5/il_menu.c | 66 + iup/srclua5/il_messagedlg.c | 52 + iup/srclua5/il_multiline.c | 61 + iup/srclua5/il_normalizer.c | 52 + iup/srclua5/il_olecontrol.c | 77 + iup/srclua5/il_pplot.c | 151 + iup/srclua5/il_progressbar.c | 52 + iup/srclua5/il_radio.c | 52 + iup/srclua5/il_sbox.c | 52 + iup/srclua5/il_scanf.c | 197 + iup/srclua5/il_separator.c | 52 + iup/srclua5/il_spin.c | 60 + iup/srclua5/il_spinbox.c | 60 + iup/srclua5/il_submenu.c | 52 + iup/srclua5/il_tabs.c | 63 + iup/srclua5/il_text.c | 78 + iup/srclua5/il_timer.c | 59 + iup/srclua5/il_toggle.c | 60 + iup/srclua5/il_tree.c | 152 + iup/srclua5/il_tree_aux.c | 184 + iup/srclua5/il_user.c | 52 + iup/srclua5/il_val.c | 76 + iup/srclua5/il_vbox.c | 52 + iup/srclua5/il_zbox.c | 52 + iup/srclua5/image.lua | 96 + iup/srclua5/imagergb.lua | 31 + iup/srclua5/imagergba.lua | 31 + iup/srclua5/item.lua | 19 + iup/srclua5/iup_pplot.mak | 26 + iup/srclua5/iupcd.mak | 21 + iup/srclua5/iupcontrols.mak | 26 + iup/srclua5/iupgl.mak | 27 + iup/srclua5/iupim.mak | 17 + iup/srclua5/iupimglib.mak | 17 + iup/srclua5/iuplua.c | 918 ++ iup/srclua5/iuplua.lua | 285 + iup/srclua5/iuplua5.def | 27 + iup/srclua5/iuplua51.dep | 177 + iup/srclua5/iuplua_api.c | 874 ++ iup/srclua5/iuplua_cd.c | 56 + iup/srclua5/iuplua_controls.c | 55 + iup/srclua5/iuplua_glcanvas.c | 82 + iup/srclua5/iuplua_im.c | 54 + iup/srclua5/iuplua_imglib.c | 44 + iup/srclua5/iuplua_pplot.c | 159 + iup/srclua5/iuplua_pplot5.def | 4 + iup/srclua5/iuplua_pplot51.dep | 11 + iup/srclua5/iupluacd5.def | 4 + iup/srclua5/iupluacd51.dep | 6 + iup/srclua5/iupluacontrols5.def | 6 + iup/srclua5/iupluacontrols51.dep | 46 + iup/srclua5/iupluagl5.def | 5 + iup/srclua5/iupluagl51.dep | 10 + iup/srclua5/iupluaim5.def | 5 + iup/srclua5/iupluaim51.dep | 5 + iup/srclua5/iupluaimglib5.def | 4 + iup/srclua5/iupluaimglib51.dep | 4 + iup/srclua5/iupluaole5.def | 5 + iup/srclua5/iupole.mak | 23 + iup/srclua5/label.lua | 16 + iup/srclua5/list.lua | 22 + iup/srclua5/loh/button.loh | 38 + iup/srclua5/loh/button_be32.loh | 38 + iup/srclua5/loh/button_be64.loh | 42 + iup/srclua5/loh/button_le64.loh | 42 + iup/srclua5/loh/button_le64w.loh | 42 + iup/srclua5/loh/canvas.loh | 54 + iup/srclua5/loh/canvas_be32.loh | 54 + iup/srclua5/loh/canvas_be64.loh | 61 + iup/srclua5/loh/canvas_le64.loh | 61 + iup/srclua5/loh/canvas_le64w.loh | 61 + iup/srclua5/loh/cbox.loh | 50 + iup/srclua5/loh/cbox_be32.loh | 52 + iup/srclua5/loh/cbox_be64.loh | 54 + iup/srclua5/loh/cbox_le64.loh | 56 + iup/srclua5/loh/cbox_le64w.loh | 54 + iup/srclua5/loh/cells.loh | 57 + iup/srclua5/loh/cells_be32.loh | 57 + iup/srclua5/loh/cells_be64.loh | 64 + iup/srclua5/loh/cells_le64.loh | 64 + iup/srclua5/loh/cells_le64w.loh | 64 + iup/srclua5/loh/clipboard.loh | 36 + iup/srclua5/loh/clipboard_be32.loh | 36 + iup/srclua5/loh/clipboard_be64.loh | 40 + iup/srclua5/loh/clipboard_le64.loh | 40 + iup/srclua5/loh/colorbar.loh | 53 + iup/srclua5/loh/colorbar_be32.loh | 49 + iup/srclua5/loh/colorbar_be64.loh | 59 + iup/srclua5/loh/colorbar_le64.loh | 55 + iup/srclua5/loh/colorbar_le64w.loh | 59 + iup/srclua5/loh/colorbrowser.loh | 45 + iup/srclua5/loh/colorbrowser_be32.loh | 44 + iup/srclua5/loh/colorbrowser_be64.loh | 49 + iup/srclua5/loh/colorbrowser_le64.loh | 49 + iup/srclua5/loh/colorbrowser_le64w.loh | 49 + iup/srclua5/loh/colordlg.loh | 54 + iup/srclua5/loh/colordlg_be32.loh | 54 + iup/srclua5/loh/colordlg_be64.loh | 60 + iup/srclua5/loh/colordlg_le64.loh | 60 + iup/srclua5/loh/colordlg_le64w.loh | 60 + iup/srclua5/loh/constants.loh | 102 + iup/srclua5/loh/constants_be32.loh | 88 + iup/srclua5/loh/constants_be64.loh | 113 + iup/srclua5/loh/constants_le64.loh | 97 + iup/srclua5/loh/constants_le64w.loh | 113 + iup/srclua5/loh/dial.loh | 40 + iup/srclua5/loh/dial_be32.loh | 40 + iup/srclua5/loh/dial_be64.loh | 44 + iup/srclua5/loh/dial_le64.loh | 44 + iup/srclua5/loh/dial_le64w.loh | 44 + iup/srclua5/loh/dialog.loh | 72 + iup/srclua5/loh/dialog_be32.loh | 72 + iup/srclua5/loh/dialog_be64.loh | 81 + iup/srclua5/loh/dialog_le64.loh | 81 + iup/srclua5/loh/dialog_le64w.loh | 79 + iup/srclua5/loh/filedlg.loh | 55 + iup/srclua5/loh/filedlg_be32.loh | 55 + iup/srclua5/loh/filedlg_be64.loh | 61 + iup/srclua5/loh/filedlg_le64.loh | 61 + iup/srclua5/loh/filedlg_le64w.loh | 61 + iup/srclua5/loh/fill.loh | 36 + iup/srclua5/loh/fill_be32.loh | 36 + iup/srclua5/loh/fill_be64.loh | 39 + iup/srclua5/loh/fill_le64.loh | 39 + iup/srclua5/loh/fill_le64w.loh | 39 + iup/srclua5/loh/fontdlg.loh | 54 + iup/srclua5/loh/fontdlg_be32.loh | 54 + iup/srclua5/loh/fontdlg_be64.loh | 59 + iup/srclua5/loh/fontdlg_le64.loh | 59 + iup/srclua5/loh/fontdlg_le64w.loh | 59 + iup/srclua5/loh/frame.loh | 37 + iup/srclua5/loh/frame_be32.loh | 37 + iup/srclua5/loh/frame_be64.loh | 40 + iup/srclua5/loh/frame_le64.loh | 40 + iup/srclua5/loh/frame_le64w.loh | 40 + iup/srclua5/loh/gauge.loh | 39 + iup/srclua5/loh/gauge_be32.loh | 39 + iup/srclua5/loh/gauge_be64.loh | 43 + iup/srclua5/loh/gauge_le64.loh | 43 + iup/srclua5/loh/gauge_le64w.loh | 43 + iup/srclua5/loh/glcanvas.loh | 65 + iup/srclua5/loh/glcanvas_be32.loh | 65 + iup/srclua5/loh/glcanvas_be64.loh | 70 + iup/srclua5/loh/glcanvas_le64.loh | 70 + iup/srclua5/loh/glcanvas_le64w.loh | 70 + iup/srclua5/loh/hbox.loh | 43 + iup/srclua5/loh/hbox_be32.loh | 43 + iup/srclua5/loh/hbox_be64.loh | 48 + iup/srclua5/loh/hbox_le64.loh | 48 + iup/srclua5/loh/hbox_le64w.loh | 48 + iup/srclua5/loh/image.loh | 127 + iup/srclua5/loh/image_be32.loh | 127 + iup/srclua5/loh/image_be64.loh | 132 + iup/srclua5/loh/image_le64.loh | 132 + iup/srclua5/loh/image_le64w.loh | 90 + iup/srclua5/loh/imagergb.loh | 58 + iup/srclua5/loh/imagergb_be32.loh | 58 + iup/srclua5/loh/imagergb_be64.loh | 62 + iup/srclua5/loh/imagergb_le64.loh | 62 + iup/srclua5/loh/imagergb_le64w.loh | 62 + iup/srclua5/loh/imagergba.loh | 58 + iup/srclua5/loh/imagergba_be32.loh | 58 + iup/srclua5/loh/imagergba_be64.loh | 63 + iup/srclua5/loh/imagergba_le64.loh | 63 + iup/srclua5/loh/imagergba_le64w.loh | 63 + iup/srclua5/loh/item.loh | 39 + iup/srclua5/loh/item_be32.loh | 39 + iup/srclua5/loh/item_be64.loh | 44 + iup/srclua5/loh/item_le64.loh | 44 + iup/srclua5/loh/item_le64w.loh | 44 + iup/srclua5/loh/iuplua.loh | 487 + iup/srclua5/loh/iuplua_be32.loh | 489 + iup/srclua5/loh/iuplua_be64.loh | 545 + iup/srclua5/loh/iuplua_le64.loh | 545 + iup/srclua5/loh/iuplua_le64w.loh | 531 + iup/srclua5/loh/label.loh | 37 + iup/srclua5/loh/label_be32.loh | 37 + iup/srclua5/loh/label_be64.loh | 40 + iup/srclua5/loh/label_le64.loh | 40 + iup/srclua5/loh/label_le64w.loh | 40 + iup/srclua5/loh/list.loh | 43 + iup/srclua5/loh/list_be32.loh | 40 + iup/srclua5/loh/list_be64.loh | 48 + iup/srclua5/loh/list_le64.loh | 45 + iup/srclua5/loh/list_le64w.loh | 48 + iup/srclua5/loh/matrix.loh | 94 + iup/srclua5/loh/matrix_be32.loh | 94 + iup/srclua5/loh/matrix_be64.loh | 107 + iup/srclua5/loh/matrix_le64.loh | 107 + iup/srclua5/loh/matrix_le64w.loh | 103 + iup/srclua5/loh/menu.loh | 122 + iup/srclua5/loh/menu_be32.loh | 122 + iup/srclua5/loh/menu_be64.loh | 134 + iup/srclua5/loh/menu_le64.loh | 134 + iup/srclua5/loh/menu_le64w.loh | 136 + iup/srclua5/loh/messagedlg.loh | 54 + iup/srclua5/loh/messagedlg_be32.loh | 54 + iup/srclua5/loh/messagedlg_be64.loh | 60 + iup/srclua5/loh/messagedlg_le64.loh | 60 + iup/srclua5/loh/messagedlg_le64w.loh | 60 + iup/srclua5/loh/multiline.loh | 40 + iup/srclua5/loh/multiline_be32.loh | 40 + iup/srclua5/loh/multiline_be64.loh | 44 + iup/srclua5/loh/multiline_le64.loh | 44 + iup/srclua5/loh/multiline_le64w.loh | 44 + iup/srclua5/loh/normalizer.loh | 63 + iup/srclua5/loh/normalizer_be32.loh | 63 + iup/srclua5/loh/normalizer_be64.loh | 70 + iup/srclua5/loh/normalizer_le64.loh | 70 + iup/srclua5/loh/normalizer_le64w.loh | 72 + iup/srclua5/loh/olecontrol.loh | 79 + iup/srclua5/loh/olecontrol_be64.loh | 85 + iup/srclua5/loh/olecontrol_le64w.loh | 80 + iup/srclua5/loh/pplot.loh | 58 + iup/srclua5/loh/pplot_be32.loh | 58 + iup/srclua5/loh/pplot_be64.loh | 65 + iup/srclua5/loh/pplot_le64.loh | 65 + iup/srclua5/loh/pplot_le64w.loh | 65 + iup/srclua5/loh/progressbar.loh | 39 + iup/srclua5/loh/progressbar_be32.loh | 39 + iup/srclua5/loh/progressbar_be64.loh | 43 + iup/srclua5/loh/progressbar_le64.loh | 43 + iup/srclua5/loh/progressbar_le64w.loh | 43 + iup/srclua5/loh/radio.loh | 64 + iup/srclua5/loh/radio_be32.loh | 64 + iup/srclua5/loh/radio_be64.loh | 70 + iup/srclua5/loh/radio_le64.loh | 70 + iup/srclua5/loh/radio_le64w.loh | 70 + iup/srclua5/loh/sbox.loh | 37 + iup/srclua5/loh/sbox_be32.loh | 37 + iup/srclua5/loh/sbox_be64.loh | 40 + iup/srclua5/loh/sbox_le64.loh | 40 + iup/srclua5/loh/sbox_le64w.loh | 40 + iup/srclua5/loh/separator.loh | 36 + iup/srclua5/loh/separator_be32.loh | 36 + iup/srclua5/loh/separator_be64.loh | 40 + iup/srclua5/loh/separator_le64.loh | 40 + iup/srclua5/loh/separator_le64w.loh | 40 + iup/srclua5/loh/spin.loh | 38 + iup/srclua5/loh/spin_be32.loh | 38 + iup/srclua5/loh/spin_be64.loh | 42 + iup/srclua5/loh/spin_le64.loh | 44 + iup/srclua5/loh/spin_le64w.loh | 44 + iup/srclua5/loh/spinbox.loh | 38 + iup/srclua5/loh/spinbox_be32.loh | 40 + iup/srclua5/loh/spinbox_be64.loh | 44 + iup/srclua5/loh/spinbox_le64.loh | 44 + iup/srclua5/loh/spinbox_le64w.loh | 44 + iup/srclua5/loh/submenu.loh | 38 + iup/srclua5/loh/submenu_be32.loh | 38 + iup/srclua5/loh/submenu_be64.loh | 42 + iup/srclua5/loh/submenu_le64.loh | 42 + iup/srclua5/loh/submenu_le64w.loh | 42 + iup/srclua5/loh/tabs.loh | 51 + iup/srclua5/loh/tabs_be32.loh | 51 + iup/srclua5/loh/tabs_be64.loh | 56 + iup/srclua5/loh/tabs_le64.loh | 56 + iup/srclua5/loh/tabs_le64w.loh | 56 + iup/srclua5/loh/text.loh | 40 + iup/srclua5/loh/text_be32.loh | 40 + iup/srclua5/loh/text_be64.loh | 45 + iup/srclua5/loh/text_le64.loh | 45 + iup/srclua5/loh/text_le64w.loh | 43 + iup/srclua5/loh/timer.loh | 37 + iup/srclua5/loh/timer_be32.loh | 37 + iup/srclua5/loh/timer_be64.loh | 41 + iup/srclua5/loh/timer_le64.loh | 41 + iup/srclua5/loh/timer_le64w.loh | 41 + iup/srclua5/loh/toggle.loh | 38 + iup/srclua5/loh/toggle_be32.loh | 38 + iup/srclua5/loh/toggle_be64.loh | 42 + iup/srclua5/loh/toggle_le64.loh | 42 + iup/srclua5/loh/toggle_le64w.loh | 42 + iup/srclua5/loh/tree.loh | 177 + iup/srclua5/loh/tree_be32.loh | 177 + iup/srclua5/loh/tree_be64.loh | 195 + iup/srclua5/loh/tree_le64.loh | 195 + iup/srclua5/loh/tree_le64w.loh | 112 + iup/srclua5/loh/user.loh | 36 + iup/srclua5/loh/user_be32.loh | 36 + iup/srclua5/loh/user_be64.loh | 39 + iup/srclua5/loh/user_le64.loh | 39 + iup/srclua5/loh/user_le64w.loh | 39 + iup/srclua5/loh/val.loh | 41 + iup/srclua5/loh/val_be32.loh | 43 + iup/srclua5/loh/val_be64.loh | 45 + iup/srclua5/loh/val_le64.loh | 47 + iup/srclua5/loh/val_le64w.loh | 45 + iup/srclua5/loh/vbox.loh | 43 + iup/srclua5/loh/vbox_be32.loh | 43 + iup/srclua5/loh/vbox_be64.loh | 48 + iup/srclua5/loh/vbox_le64.loh | 48 + iup/srclua5/loh/vbox_le64w.loh | 48 + iup/srclua5/loh/zbox.loh | 61 + iup/srclua5/loh/zbox_be32.loh | 61 + iup/srclua5/loh/zbox_be64.loh | 67 + iup/srclua5/loh/zbox_le64.loh | 67 + iup/srclua5/loh/zbox_le64w.loh | 67 + iup/srclua5/make_uname | 9 + iup/srclua5/make_uname.bat | 11 + iup/srclua5/matrix.lua | 46 + iup/srclua5/menu.lua | 55 + iup/srclua5/messagedlg.lua | 26 + iup/srclua5/multiline.lua | 19 + iup/srclua5/normalizer.lua | 28 + iup/srclua5/olecontrol.lua | 54 + iup/srclua5/pplot.lua | 31 + iup/srclua5/progressbar.lua | 17 + iup/srclua5/radio.lua | 33 + iup/srclua5/sbox.lua | 16 + iup/srclua5/separator.lua | 16 + iup/srclua5/spin.lua | 18 + iup/srclua5/spinbox.lua | 18 + iup/srclua5/submenu.lua | 19 + iup/srclua5/tabs.lua | 31 + iup/srclua5/text.lua | 20 + iup/srclua5/timer.lua | 18 + iup/srclua5/toggle.lua | 18 + iup/srclua5/tree.lua | 76 + iup/srclua5/user.lua | 17 + iup/srclua5/val.lua | 20 + iup/srclua5/vbox.lua | 20 + iup/srclua5/zbox.lua | 32 + iup/srcole/config.mak | 17 + iup/srcole/iup_olecontrol.cpp | 200 + iup/srcole/iupole.def | 3 + iup/srcole/make_uname.bat | 4 + iup/srcole/tAmbientProperties.cpp | 157 + iup/srcole/tAmbientProperties.h | 47 + iup/srcole/tDispatch.cpp | 236 + iup/srcole/tDispatch.h | 40 + iup/srcole/tLegacy.cpp | 240 + iup/srcole/tLegacy.h | 550 + iup/srcole/tOleClientSite.cpp | 148 + iup/srcole/tOleClientSite.h | 40 + iup/srcole/tOleControlSite.cpp | 301 + iup/srcole/tOleControlSite.h | 39 + iup/srcole/tOleHandler.cpp | 1123 ++ iup/srcole/tOleHandler.h | 139 + iup/srcole/tOleInPlaceFrame.cpp | 429 + iup/srcole/tOleInPlaceFrame.h | 67 + iup/srcole/tOleInPlaceSite.cpp | 485 + iup/srcole/tOleInPlaceSite.h | 47 + iup/srcpplot/Makefile | 6 + iup/srcpplot/config.mak | 25 + iup/srcpplot/iupPPlot.cpp | 2470 +++++ iup/srcpplot/iupPPlot.h | 645 ++ iup/srcpplot/iupPPlotInteraction.cpp | 832 ++ iup/srcpplot/iupPPlotInteraction.h | 328 + iup/srcpplot/iup_pplot.cpp | 2959 ++++++ iup/srcpplot/iup_pplot.def | 11 + iup/srcpplot/iup_pplot.dep | 12 + iup/srcpplot/iuppplot.hpp | 137 + iup/srcpplot/make_uname | 3 + iup/srcpplot/make_uname.bat | 4 + iup/srcview/Makefile | 9 + iup/srcview/config.mak | 59 + iup/srcview/iup_view.c | 851 ++ iup/srcview/iupview | 6 + iup/srcview/iupview.bat | 3 + iup/srcview/iupview.dep | 3 + iup/srcview/make_uname | 4 + iup/srcview/make_uname.bat | 26 + iup/tecmake_compact.mak | 1172 +++ iup/test/bigtest.c | 194 + iup/test/button.c | 411 + iup/test/canvas.c | 346 + iup/test/canvas_cddbuffer.c | 124 + iup/test/canvas_cdsimple.c | 91 + iup/test/canvas_scrollbar.c | 191 + iup/test/cells_checkboard.c | 83 + iup/test/cells_degrade.c | 150 + iup/test/cells_numbering.c | 102 + iup/test/class_conf.c | 278 + iup/test/clipboard.c | 53 + iup/test/colorbar.c | 162 + iup/test/colorbrowser.c | 91 + iup/test/config.mak | 115 + iup/test/dial.c | 111 + iup/test/dial.led | 49 + iup/test/dialog.c | 473 + iup/test/file_large.xbm | 14 + iup/test/frame.c | 68 + iup/test/gauge.c | 305 + iup/test/getcolor.c | 28 + iup/test/getparam.c | 98 + iup/test/glcanvas.c | 77 + iup/test/glcanvas_cube.c | 234 + iup/test/hbox.c | 114 + iup/test/idle.c | 55 + iup/test/iuptest.rc | 31 + iup/test/label.c | 217 + iup/test/list.c | 366 + iup/test/make_uname | 4 + iup/test/matrix.c | 115 + iup/test/matrix_cbmode.c | 85 + iup/test/matrix_cbs.c | 341 + iup/test/mdi.c | 150 + iup/test/menu.c | 396 + iup/test/ole.cpp | 108 + iup/test/pplot.c | 699 ++ iup/test/predialogs.c | 472 + iup/test/progressbar.c | 330 + iup/test/sample.c | 407 + iup/test/sbox.c | 46 + iup/test/scanf.c | 39 + iup/test/spin.c | 43 + iup/test/sysinfo.c | 60 + iup/test/tabs.c | 403 + iup/test/tecgraf.bmp | Bin 0 -> 6966 bytes iup/test/text.c | 433 + iup/test/text_spin.c | 74 + iup/test/timer.c | 70 + iup/test/toggle.c | 306 + iup/test/tray.c | 120 + iup/test/tree.c | 518 + iup/test/val.c | 199 + iup/test/vbox.c | 122 + iup/test/zbox.c | 98 + 1608 files changed, 481794 insertions(+) create mode 100644 Makefile create mode 100644 Makefile.mingw32 create mode 100755 cd/etc/arial.ttf create mode 100755 cd/etc/arialbd.ttf create mode 100755 cd/etc/arialbi.ttf create mode 100755 cd/etc/ariali.ttf create mode 100755 cd/etc/cour.ttf create mode 100755 cd/etc/courbd.ttf create mode 100755 cd/etc/courbi.ttf create mode 100755 cd/etc/couri.ttf create mode 100755 cd/etc/seed2d.dgn create mode 100755 cd/etc/times.ttf create mode 100755 cd/etc/timesbd.ttf create mode 100755 cd/etc/timesbi.ttf create mode 100755 cd/etc/timesi.ttf create mode 100755 cd/etc/vectorfont00.txt create mode 100755 cd/etc/vectorfont01.txt create mode 100755 cd/etc/vectorfont02.txt create mode 100755 cd/etc/vectorfont03.txt create mode 100755 cd/etc/vectorfont04.txt create mode 100755 cd/etc/vectorfont05.txt create mode 100755 cd/etc/vectorfont06.txt create mode 100755 cd/etc/vectorfont07.txt create mode 100755 cd/etc/vectorfont08.txt create mode 100755 cd/etc/vectorfont09.txt create mode 100755 cd/etc/vectorfont10.txt create mode 100755 cd/etc/vectorfont11.txt create mode 100755 cd/etc/vectorfont12.txt create mode 100755 cd/etc/vectorfont13.txt create mode 100755 cd/etc/vectorfont14.txt create mode 100755 cd/etc/vectorfont15.txt create mode 100755 cd/etc/vectorfont16.txt create mode 100755 cd/etc/vectorfont17.txt create mode 100755 cd/etc/vectorfont18.txt create mode 100755 cd/etc/vectorfont19.txt create mode 100755 cd/etc/vectorfont20.txt create mode 100755 cd/etc/vectorfont21.txt create mode 100755 cd/etc/vectorfont22.txt create mode 100755 cd/etc/vectorfont23.txt create mode 100755 cd/etc/vectorfont24.txt create mode 100755 cd/etc/vectorfont25.txt create mode 100755 cd/etc/vectorfont26.txt create mode 100755 cd/etc/vectorfont27.txt create mode 100755 cd/etc/vectorfont28.txt create mode 100755 cd/etc/vectorfont29.txt create mode 100755 cd/etc/vectorfont30.txt create mode 100755 cd/etc/vectorfont31.txt create mode 100755 cd/etc/vectorfont32.txt create mode 100755 cd/etc/vectorfont33.txt create mode 100755 cd/etc/vectorfont34.txt create mode 100755 cd/include/cd.h create mode 100755 cd/include/cd_canvas.hpp create mode 100755 cd/include/cd_old.h create mode 100755 cd/include/cd_private.h create mode 100755 cd/include/cdcgm.h create mode 100755 cd/include/cdclipbd.h create mode 100755 cd/include/cddbuf.h create mode 100755 cd/include/cddebug.h create mode 100755 cd/include/cddgn.h create mode 100755 cd/include/cddxf.h create mode 100755 cd/include/cdemf.h create mode 100755 cd/include/cdgdiplus.h create mode 100755 cd/include/cdimage.h create mode 100755 cd/include/cdirgb.h create mode 100755 cd/include/cdiup.h create mode 100755 cd/include/cdlua.h create mode 100755 cd/include/cdlua3_private.h create mode 100755 cd/include/cdlua5_private.h create mode 100755 cd/include/cdluaim.h create mode 100755 cd/include/cdluaiup.h create mode 100755 cd/include/cdluapdf.h create mode 100755 cd/include/cdmf.h create mode 100755 cd/include/cdmf_private.h create mode 100755 cd/include/cdnative.h create mode 100755 cd/include/cdpdf.h create mode 100755 cd/include/cdpicture.h create mode 100755 cd/include/cdprint.h create mode 100755 cd/include/cdps.h create mode 100755 cd/include/cdwmf.h create mode 100755 cd/include/wd.h create mode 100755 cd/include/wd_old.h create mode 100755 cd/mak.vc6/cd.dsp create mode 100755 cd/mak.vc6/cd.dsw create mode 100755 cd/mak.vc6/cd_freetype.dsp create mode 100755 cd/mak.vc6/cd_pdflib.dsp create mode 100755 cd/mak.vc6/cdgdiplus.dsp create mode 100755 cd/mak.vc6/cdlua3.dsp create mode 100755 cd/mak.vc6/cdlua5.dsp create mode 100755 cd/mak.vc6/cdluacontextplus5.dsp create mode 100755 cd/mak.vc6/cdluaim5.dsp create mode 100755 cd/mak.vc6/cdluapdf3.dsp create mode 100755 cd/mak.vc6/cdluapdf5.dsp create mode 100755 cd/mak.vc6/cdpdf.dsp create mode 100755 cd/mak.vc6/cdx11.dsp create mode 100755 cd/mak.vc6/cdxrender.dsp create mode 100755 cd/mak.vc7/cd.sln create mode 100755 cd/mak.vc7/cd.vcproj create mode 100755 cd/mak.vc7/cd_freetype.vcproj create mode 100755 cd/mak.vc7/cd_pdflib.vcproj create mode 100755 cd/mak.vc7/cdgdiplus.vcproj create mode 100755 cd/mak.vc7/cdlua3.vcproj create mode 100755 cd/mak.vc7/cdlua5.vcproj create mode 100755 cd/mak.vc7/cdluacontextplus5.vcproj create mode 100755 cd/mak.vc7/cdluaim5.vcproj create mode 100755 cd/mak.vc7/cdluapdf3.vcproj create mode 100755 cd/mak.vc7/cdluapdf5.vcproj create mode 100755 cd/mak.vc7/cdpdf.vcproj create mode 100755 cd/mak.vc7/cdx11.vcproj create mode 100755 cd/mak.vc7/cdxrender.vcproj create mode 100755 cd/mak.vc8/cd.sln create mode 100755 cd/mak.vc8/cd.vcproj create mode 100755 cd/mak.vc8/cd_freetype.vcproj create mode 100755 cd/mak.vc8/cd_pdflib.vcproj create mode 100755 cd/mak.vc8/cdgdiplus.vcproj create mode 100755 cd/mak.vc8/cdlua3.vcproj create mode 100755 cd/mak.vc8/cdlua5.vcproj create mode 100755 cd/mak.vc8/cdluacontextplus5.vcproj create mode 100755 cd/mak.vc8/cdluaim5.vcproj create mode 100755 cd/mak.vc8/cdluapdf3.vcproj create mode 100755 cd/mak.vc8/cdluapdf5.vcproj create mode 100755 cd/mak.vc8/cdpdf.vcproj create mode 100755 cd/mak.vc8/cdx11.vcproj create mode 100755 cd/mak.vc8/cdxrender.vcproj create mode 100755 cd/mak.vc9/cd.sln create mode 100755 cd/mak.vc9/cd.vcproj create mode 100755 cd/mak.vc9/cd_freetype.vcproj create mode 100755 cd/mak.vc9/cd_pdflib.vcproj create mode 100755 cd/mak.vc9/cdgdiplus.vcproj create mode 100755 cd/mak.vc9/cdlua3.vcproj create mode 100755 cd/mak.vc9/cdlua5.vcproj create mode 100755 cd/mak.vc9/cdluacontextplus5.vcproj create mode 100755 cd/mak.vc9/cdluaim5.vcproj create mode 100755 cd/mak.vc9/cdluapdf3.vcproj create mode 100755 cd/mak.vc9/cdluapdf5.vcproj create mode 100755 cd/mak.vc9/cdpdf.vcproj create mode 100755 cd/mak.vc9/cdtest.vcproj create mode 100755 cd/mak.vc9/cdtestsimple.vcproj create mode 100755 cd/mak.vc9/cdx11.vcproj create mode 100755 cd/mak.vc9/cdxrender.vcproj create mode 100755 cd/src/COPYRIGHT create mode 100755 cd/src/Makefile create mode 100755 cd/src/README create mode 100755 cd/src/cd.c create mode 100755 cd/src/cd.def create mode 100644 cd/src/cd.dep create mode 100755 cd/src/cd.rc create mode 100755 cd/src/cd_active.c create mode 100755 cd/src/cd_attributes.c create mode 100755 cd/src/cd_bitmap.c create mode 100755 cd/src/cd_image.c create mode 100755 cd/src/cd_primitives.c create mode 100755 cd/src/cd_text.c create mode 100755 cd/src/cd_util.c create mode 100755 cd/src/cd_vectortext.c create mode 100644 cd/src/cdcontextplus.dep create mode 100755 cd/src/cdcontextplus.mak create mode 100755 cd/src/cdlua3.mak create mode 100755 cd/src/cdlua5.mak create mode 100644 cd/src/cdlua51.dep create mode 100755 cd/src/cdluacontextplus5.mak create mode 100644 cd/src/cdluacontextplus51.dep create mode 100755 cd/src/cdluaim5.mak create mode 100644 cd/src/cdluaim51.dep create mode 100755 cd/src/config.mak create mode 100755 cd/src/drv/cd0emf.c create mode 100755 cd/src/drv/cd0prn.c create mode 100755 cd/src/drv/cd0wmf.c create mode 100755 cd/src/drv/cdcgm.c create mode 100755 cd/src/drv/cddebug.c create mode 100755 cd/src/drv/cddgn.c create mode 100755 cd/src/drv/cddxf.c create mode 100755 cd/src/drv/cdirgb.c create mode 100755 cd/src/drv/cdmf.c create mode 100755 cd/src/drv/cdpdf.c create mode 100755 cd/src/drv/cdpicture.c create mode 100755 cd/src/drv/cdps.c create mode 100755 cd/src/drv/cgm.c create mode 100755 cd/src/drv/cgm.h create mode 100755 cd/src/gdiplus/cdcontextplus.def create mode 100755 cd/src/gdiplus/cdwclpp.cpp create mode 100755 cd/src/gdiplus/cdwdbufp.cpp create mode 100755 cd/src/gdiplus/cdwemfp.cpp create mode 100755 cd/src/gdiplus/cdwgdiplus.c create mode 100755 cd/src/gdiplus/cdwimgp.cpp create mode 100755 cd/src/gdiplus/cdwinp.cpp create mode 100755 cd/src/gdiplus/cdwinp.h create mode 100755 cd/src/gdiplus/cdwnativep.cpp create mode 100755 cd/src/gdiplus/cdwprnp.cpp create mode 100755 cd/src/intcgm/bparse.c create mode 100755 cd/src/intcgm/bparse.h create mode 100755 cd/src/intcgm/circle.c create mode 100755 cd/src/intcgm/circle.h create mode 100755 cd/src/intcgm/ellipse.c create mode 100755 cd/src/intcgm/ellipse.h create mode 100755 cd/src/intcgm/intcgm.h create mode 100755 cd/src/intcgm/intcgm1.c create mode 100755 cd/src/intcgm/intcgm2.c create mode 100755 cd/src/intcgm/intcgm2.h create mode 100755 cd/src/intcgm/intcgm4.c create mode 100755 cd/src/intcgm/intcgm4.h create mode 100755 cd/src/intcgm/intcgm6.c create mode 100755 cd/src/intcgm/intcgm6.h create mode 100755 cd/src/intcgm/list.c create mode 100755 cd/src/intcgm/list.h create mode 100755 cd/src/intcgm/sism.c create mode 100755 cd/src/intcgm/sism.h create mode 100755 cd/src/intcgm/tparse.c create mode 100755 cd/src/intcgm/tparse.h create mode 100755 cd/src/intcgm/types.h create mode 100755 cd/src/lua3/cdlua.c create mode 100755 cd/src/lua3/cdlua.def create mode 100755 cd/src/lua3/cdluactx.c create mode 100755 cd/src/lua3/cdluapdf.c create mode 100755 cd/src/lua3/cdluapdf.def create mode 100755 cd/src/lua3/cdvoid.c create mode 100755 cd/src/lua3/cdvoid.h create mode 100755 cd/src/lua3/toluacd.c create mode 100755 cd/src/lua3/toluawd.c create mode 100755 cd/src/lua5/cdlua5.c create mode 100755 cd/src/lua5/cdlua5.def create mode 100755 cd/src/lua5/cdlua5_active.c create mode 100755 cd/src/lua5/cdlua5_canvas.c create mode 100755 cd/src/lua5/cdlua5ctx.c create mode 100755 cd/src/lua5/cdluacontextplus5.c create mode 100755 cd/src/lua5/cdluacontextplus5.def create mode 100755 cd/src/lua5/cdluaim5.c create mode 100755 cd/src/lua5/cdluaim5.def create mode 100755 cd/src/lua5/cdluapdf5.c create mode 100755 cd/src/lua5/cdluapdf5.def create mode 100755 cd/src/lua5/cdvoid5.c create mode 100755 cd/src/lua5/cdvoid5.h create mode 100755 cd/src/make_uname create mode 100755 cd/src/make_uname.bat create mode 100755 cd/src/rgb2map.c create mode 100755 cd/src/sim/cd_truetype.c create mode 100755 cd/src/sim/cd_truetype.h create mode 100755 cd/src/sim/cdfontex.c create mode 100755 cd/src/sim/sim.c create mode 100755 cd/src/sim/sim.h create mode 100755 cd/src/sim/sim_linepolyfill.c create mode 100755 cd/src/sim/sim_other.c create mode 100755 cd/src/sim/sim_primitives.c create mode 100755 cd/src/sim/truetype.h create mode 100755 cd/src/tecmake_compact.mak create mode 100755 cd/src/wd.c create mode 100755 cd/src/wdhdcpy.c create mode 100755 cd/src/win32/cdwclp.c create mode 100755 cd/src/win32/cdwdbuf.c create mode 100755 cd/src/win32/cdwdib.c create mode 100755 cd/src/win32/cdwemf.c create mode 100755 cd/src/win32/cdwimg.c create mode 100755 cd/src/win32/cdwin.c create mode 100755 cd/src/win32/cdwin.h create mode 100755 cd/src/win32/cdwnative.c create mode 100755 cd/src/win32/cdwprn.c create mode 100755 cd/src/win32/cdwwmf.c create mode 100755 cd/src/win32/wmf_emf.c create mode 100755 cd/src/x11/cdx11.c create mode 100755 cd/src/x11/cdx11.h create mode 100755 cd/src/x11/cdxclp.c create mode 100755 cd/src/x11/cdxdbuf.c create mode 100755 cd/src/x11/cdximg.c create mode 100755 cd/src/x11/cdxnative.c create mode 100755 cd/src/x11/xvertex.c create mode 100755 cd/src/x11/xvertex.h create mode 100755 cd/src/xrender/cdxrender.c create mode 100755 cd/src/xrender/cdxrplus.c create mode 100755 cd/test/cdtest/cdtest.bat create mode 100755 cd/test/cdtest/cdtest.c create mode 100755 cd/test/cdtest/cdtest.h create mode 100755 cd/test/cdtest/cdtest.ico create mode 100755 cd/test/cdtest/cdtest.led create mode 100755 cd/test/cdtest/cdtest.rc create mode 100644 cd/test/cdtest/cdtest_led.c create mode 100755 cd/test/cdtest/colobar.h create mode 100755 cd/test/cdtest/colorbar.c create mode 100755 cd/test/cdtest/config.mak create mode 100755 cd/test/cdtest/drivers.c create mode 100755 cd/test/cdtest/list.c create mode 100755 cd/test/cdtest/rubber.c create mode 100755 cd/test/lua/cdalign.wlua create mode 100755 cd/test/lua/cdtext.wlua create mode 100755 cd/test/lua/imagergb.wlua create mode 100755 cd/test/lua/iupcdaux.lua create mode 100755 cd/test/lua/iuplua_cdlua.wlua create mode 100755 cd/test/lua/rubberband.wlua create mode 100755 cd/test/metafile.c create mode 100755 cd/test/mf/align.mf create mode 100755 cd/test/mf/alignorient.mf create mode 100755 cd/test/mf/alignxor.mf create mode 100755 cd/test/mf/arc.mf create mode 100755 cd/test/mf/circles.mf create mode 100755 cd/test/mf/cliparea.mf create mode 100755 cd/test/mf/fill.mf create mode 100755 cd/test/mf/fill_x_hollow.mf create mode 100755 cd/test/mf/font.mf create mode 100755 cd/test/mf/grays.mf create mode 100755 cd/test/mf/hatch.mf create mode 100755 cd/test/mf/lines.mf create mode 100755 cd/test/mf/marks.mf create mode 100755 cd/test/mf/natal.mf create mode 100755 cd/test/mf/poly.mf create mode 100755 cd/test/mf/poly2.mf create mode 100755 cd/test/mf/poly3.mf create mode 100755 cd/test/mf/poly4.mf create mode 100755 cd/test/mf/poly5.mf create mode 100755 cd/test/mf/sector.mf create mode 100755 cd/test/screencapture.c create mode 100755 cd/test/screencapture.mak create mode 100755 cd/test/simple/config.mak create mode 100755 cd/test/simple/gdiplustest.cpp create mode 100755 cd/test/simple/iupmain.c create mode 100755 cd/test/simple/simple.bat create mode 100755 cd/test/simple/simple.c create mode 100755 cd/test/simple/simple.h create mode 100755 cd/test/simple/simple.led create mode 100755 cd/test/simple/simple_led.c create mode 100755 im/dox/im.dox create mode 100755 im/include/im.h create mode 100755 im/include/im_attrib.h create mode 100755 im/include/im_attrib_flat.h create mode 100755 im/include/im_binfile.h create mode 100755 im/include/im_capture.h create mode 100755 im/include/im_color.h create mode 100755 im/include/im_colorhsi.h create mode 100755 im/include/im_complex.h create mode 100755 im/include/im_convert.h create mode 100755 im/include/im_counter.h create mode 100755 im/include/im_dib.h create mode 100755 im/include/im_file.h create mode 100755 im/include/im_format.h create mode 100755 im/include/im_format_all.h create mode 100755 im/include/im_format_avi.h create mode 100755 im/include/im_format_ecw.h create mode 100755 im/include/im_format_jp2.h create mode 100755 im/include/im_format_raw.h create mode 100755 im/include/im_format_wmv.h create mode 100755 im/include/im_image.h create mode 100755 im/include/im_kernel.h create mode 100755 im/include/im_lib.h create mode 100755 im/include/im_math.h create mode 100755 im/include/im_math_op.h create mode 100755 im/include/im_palette.h create mode 100755 im/include/im_plus.h create mode 100755 im/include/im_process.h create mode 100755 im/include/im_process_ana.h create mode 100755 im/include/im_process_glo.h create mode 100755 im/include/im_process_loc.h create mode 100755 im/include/im_process_pon.h create mode 100755 im/include/im_raw.h create mode 100755 im/include/im_util.h create mode 100755 im/include/imlua.h create mode 100755 im/include/old_im.h create mode 100755 im/mak.vc8/im.sln create mode 100755 im/mak.vc8/im.vcproj create mode 100755 im/mak.vc8/im_avi.vcproj create mode 100755 im/mak.vc8/im_capture.vcproj create mode 100755 im/mak.vc8/im_copy.vcproj create mode 100755 im/mak.vc8/im_ecw.vcproj create mode 100755 im/mak.vc8/im_fftw.vcproj create mode 100755 im/mak.vc8/im_info.vcproj create mode 100755 im/mak.vc8/im_jp2.vcproj create mode 100755 im/mak.vc8/im_process.vcproj create mode 100755 im/mak.vc8/im_view.vcproj create mode 100755 im/mak.vc8/im_wmv.vcproj create mode 100755 im/mak.vc8/imlua3.vcproj create mode 100755 im/mak.vc8/imlua5.vcproj create mode 100755 im/mak.vc8/imlua_capture5.vcproj create mode 100755 im/mak.vc8/imlua_fftw5.vcproj create mode 100755 im/mak.vc8/imlua_process5.vcproj create mode 100755 im/mak.vc9/im.sln create mode 100755 im/mak.vc9/im.vcproj create mode 100755 im/mak.vc9/im_avi.vcproj create mode 100755 im/mak.vc9/im_capture.vcproj create mode 100755 im/mak.vc9/im_copy.vcproj create mode 100755 im/mak.vc9/im_ecw.vcproj create mode 100755 im/mak.vc9/im_fftw.vcproj create mode 100755 im/mak.vc9/im_info.vcproj create mode 100755 im/mak.vc9/im_jp2.vcproj create mode 100755 im/mak.vc9/im_process.vcproj create mode 100755 im/mak.vc9/im_view.vcproj create mode 100755 im/mak.vc9/im_wmv.vcproj create mode 100755 im/mak.vc9/imlua3.vcproj create mode 100755 im/mak.vc9/imlua5.vcproj create mode 100755 im/mak.vc9/imlua_capture5.vcproj create mode 100755 im/mak.vc9/imlua_fftw5.vcproj create mode 100755 im/mak.vc9/imlua_process5.vcproj create mode 100755 im/src/COPYRIGHT create mode 100755 im/src/Makefile create mode 100755 im/src/README create mode 100755 im/src/config.mak create mode 100755 im/src/im.def create mode 100644 im/src/im.dep create mode 100755 im/src/im.rc create mode 100755 im/src/im_attrib.cpp create mode 100755 im/src/im_bin.cpp create mode 100755 im/src/im_binfile.cpp create mode 100755 im/src/im_capture.def create mode 100755 im/src/im_capture.mak create mode 100644 im/src/im_capture.wlib create mode 100755 im/src/im_capture_dx.cpp create mode 100755 im/src/im_colorhsi.cpp create mode 100755 im/src/im_colormode.cpp create mode 100755 im/src/im_colorutil.cpp create mode 100755 im/src/im_convertbitmap.cpp create mode 100755 im/src/im_convertcolor.cpp create mode 100755 im/src/im_converttype.cpp create mode 100755 im/src/im_counter.cpp create mode 100755 im/src/im_datatype.cpp create mode 100755 im/src/im_dib.cpp create mode 100755 im/src/im_dibxbitmap.cpp create mode 100755 im/src/im_ecw.def create mode 100755 im/src/im_ecw.mak create mode 100755 im/src/im_file.cpp create mode 100755 im/src/im_filebuffer.cpp create mode 100755 im/src/im_fileraw.cpp create mode 100755 im/src/im_format.cpp create mode 100755 im/src/im_format_all.cpp create mode 100755 im/src/im_format_bmp.cpp create mode 100755 im/src/im_format_ecw.cpp create mode 100755 im/src/im_format_gif.cpp create mode 100755 im/src/im_format_ico.cpp create mode 100755 im/src/im_format_krn.cpp create mode 100755 im/src/im_format_led.cpp create mode 100755 im/src/im_format_pcx.cpp create mode 100755 im/src/im_format_pnm.cpp create mode 100755 im/src/im_format_ras.cpp create mode 100755 im/src/im_format_raw.cpp create mode 100755 im/src/im_format_sgi.cpp create mode 100755 im/src/im_format_tga.cpp create mode 100755 im/src/im_format_wmv.cpp create mode 100755 im/src/im_image.cpp create mode 100755 im/src/im_lib.cpp create mode 100755 im/src/im_lua3.c create mode 100755 im/src/im_palette.cpp create mode 100755 im/src/im_process.def create mode 100644 im/src/im_process.dep create mode 100755 im/src/im_process.mak create mode 100755 im/src/im_rgb2map.cpp create mode 100755 im/src/im_str.cpp create mode 100755 im/src/im_sysfile_unix.cpp create mode 100755 im/src/im_sysfile_win32.cpp create mode 100755 im/src/im_wmv.def create mode 100755 im/src/im_wmv.mak create mode 100755 im/src/imlua3.def create mode 100755 im/src/imlua3.mak create mode 100755 im/src/imlua5.mak create mode 100644 im/src/imlua51.dep create mode 100755 im/src/imlua_capture5.mak create mode 100755 im/src/imlua_process5.mak create mode 100644 im/src/imlua_process51.dep create mode 100755 im/src/imlua_wmv.mak create mode 100755 im/src/jas_binfile.c create mode 100755 im/src/lua5/im_convert.lua create mode 100755 im/src/lua5/im_fftw.lua create mode 100755 im/src/lua5/im_image.lua create mode 100755 im/src/lua5/im_process.lua create mode 100755 im/src/lua5/imlua.c create mode 100755 im/src/lua5/imlua.def create mode 100755 im/src/lua5/imlua_aux.c create mode 100755 im/src/lua5/imlua_aux.h create mode 100755 im/src/lua5/imlua_avi.c create mode 100755 im/src/lua5/imlua_avi.def create mode 100755 im/src/lua5/imlua_capture.c create mode 100755 im/src/lua5/imlua_capture.def create mode 100755 im/src/lua5/imlua_convert.c create mode 100755 im/src/lua5/imlua_fftw.c create mode 100755 im/src/lua5/imlua_fftw.def create mode 100755 im/src/lua5/imlua_file.c create mode 100755 im/src/lua5/imlua_image.c create mode 100755 im/src/lua5/imlua_image.h create mode 100755 im/src/lua5/imlua_jp2.c create mode 100755 im/src/lua5/imlua_jp2.def create mode 100755 im/src/lua5/imlua_kernel.c create mode 100755 im/src/lua5/imlua_palette.c create mode 100755 im/src/lua5/imlua_palette.h create mode 100755 im/src/lua5/imlua_process.c create mode 100755 im/src/lua5/imlua_process.def create mode 100755 im/src/lua5/imlua_util.c create mode 100755 im/src/lua5/imlua_wmv.c create mode 100755 im/src/lua5/imlua_wmv.def create mode 100644 im/src/lua5/loh/im_convert.loh create mode 100755 im/src/lua5/loh/im_convert_be32.loh create mode 100644 im/src/lua5/loh/im_convert_be64.loh create mode 100755 im/src/lua5/loh/im_convert_le64.loh create mode 100755 im/src/lua5/loh/im_fftw.loh create mode 100755 im/src/lua5/loh/im_fftw_be32.loh create mode 100644 im/src/lua5/loh/im_fftw_be64.loh create mode 100755 im/src/lua5/loh/im_fftw_le64.loh create mode 100755 im/src/lua5/loh/im_fftw_le64w.loh create mode 100644 im/src/lua5/loh/im_image.loh create mode 100755 im/src/lua5/loh/im_image_be32.loh create mode 100644 im/src/lua5/loh/im_image_be64.loh create mode 100755 im/src/lua5/loh/im_image_le64.loh create mode 100755 im/src/lua5/loh/im_process.loh create mode 100755 im/src/lua5/loh/im_process_be32.loh create mode 100644 im/src/lua5/loh/im_process_be64.loh create mode 100755 im/src/lua5/loh/im_process_le64.loh create mode 100755 im/src/lua5/loh/im_process_le64w.loh create mode 100755 im/src/make_uname create mode 100755 im/src/make_uname.bat create mode 100755 im/src/old_im.cpp create mode 100755 im/src/old_imcolor.c create mode 100755 im/src/old_imresize.c create mode 100755 im/src/process/im_analyze.cpp create mode 100755 im/src/process/im_arithmetic_bin.cpp create mode 100755 im/src/process/im_arithmetic_un.cpp create mode 100755 im/src/process/im_canny.cpp create mode 100755 im/src/process/im_color.cpp create mode 100755 im/src/process/im_convolve.cpp create mode 100755 im/src/process/im_convolve_rank.cpp create mode 100755 im/src/process/im_distance.cpp create mode 100755 im/src/process/im_effects.cpp create mode 100755 im/src/process/im_fft.cpp create mode 100755 im/src/process/im_geometric.cpp create mode 100755 im/src/process/im_histogram.cpp create mode 100755 im/src/process/im_houghline.cpp create mode 100755 im/src/process/im_kernel.cpp create mode 100755 im/src/process/im_logic.cpp create mode 100755 im/src/process/im_morphology_bin.cpp create mode 100755 im/src/process/im_morphology_gray.cpp create mode 100755 im/src/process/im_quantize.cpp create mode 100755 im/src/process/im_render.cpp create mode 100755 im/src/process/im_resize.cpp create mode 100755 im/src/process/im_statistics.cpp create mode 100755 im/src/process/im_threshold.cpp create mode 100755 im/src/process/im_tonegamut.cpp create mode 100755 im/src/tecmake_compact.mak create mode 100644 im/test/glut_capture.c create mode 100755 im/test/im_copy.cpp create mode 100644 im/test/im_info.cpp create mode 100755 im/test/im_info.mak create mode 100644 im/test/im_view.c create mode 100644 im/test/im_view.mak create mode 100644 im/test/iupglview.c create mode 100755 iup/COPYRIGHT create mode 100755 iup/Makefile create mode 100755 iup/README create mode 100755 iup/dox/iup.dox create mode 100755 iup/etc/iup.manifest create mode 100755 iup/etc/iup.rc create mode 100755 iup/etc/iup64.manifest create mode 100755 iup/etc/pen.cur create mode 100755 iup/etc/tecgraf.ico create mode 100755 iup/fix_permission create mode 100755 iup/include/iup.h create mode 100755 iup/include/iup_pplot.h create mode 100755 iup/include/iupcb.h create mode 100755 iup/include/iupcbox.h create mode 100755 iup/include/iupcbs.h create mode 100755 iup/include/iupcells.h create mode 100755 iup/include/iupcolorbar.h create mode 100755 iup/include/iupcontrols.h create mode 100755 iup/include/iupdef.h create mode 100755 iup/include/iupdial.h create mode 100755 iup/include/iupgauge.h create mode 100755 iup/include/iupgc.h create mode 100755 iup/include/iupgetparam.h create mode 100755 iup/include/iupgl.h create mode 100755 iup/include/iupim.h create mode 100755 iup/include/iupkey.h create mode 100755 iup/include/iuplua.h create mode 100755 iup/include/iuplua_pplot.h create mode 100755 iup/include/iupluacontrols.h create mode 100755 iup/include/iupluagl.h create mode 100755 iup/include/iupluaim.h create mode 100755 iup/include/iupluaole.h create mode 100755 iup/include/iupmask.h create mode 100755 iup/include/iupmatrix.h create mode 100755 iup/include/iupole.h create mode 100755 iup/include/iupsbox.h create mode 100755 iup/include/iupspin.h create mode 100755 iup/include/iuptabs.h create mode 100755 iup/include/iuptree.h create mode 100755 iup/include/iupval.h create mode 100755 iup/mak.vc8/iup.sln create mode 100755 iup/mak.vc8/iup_pplot.vcproj create mode 100755 iup/mak.vc8/iupcd.vcproj create mode 100755 iup/mak.vc8/iupcontrols.vcproj create mode 100755 iup/mak.vc8/iupcore.vcproj create mode 100755 iup/mak.vc8/iupgl.vcproj create mode 100755 iup/mak.vc8/iupgtk.vcproj create mode 100755 iup/mak.vc8/iupim.vcproj create mode 100755 iup/mak.vc8/iupimglib.vcproj create mode 100755 iup/mak.vc8/iuplua3.vcproj create mode 100755 iup/mak.vc8/iuplua5.vcproj create mode 100755 iup/mak.vc8/iuplua_pplot3.vcproj create mode 100755 iup/mak.vc8/iuplua_pplot5.vcproj create mode 100755 iup/mak.vc8/iupluacd3.vcproj create mode 100755 iup/mak.vc8/iupluacd5.vcproj create mode 100755 iup/mak.vc8/iupluacontrols3.vcproj create mode 100755 iup/mak.vc8/iupluacontrols5.vcproj create mode 100755 iup/mak.vc8/iupluaexe3.vcproj create mode 100755 iup/mak.vc8/iupluaexe5.vcproj create mode 100755 iup/mak.vc8/iupluaexe5gtk.vcproj create mode 100755 iup/mak.vc8/iupluagl3.vcproj create mode 100755 iup/mak.vc8/iupluagl5.vcproj create mode 100755 iup/mak.vc8/iupluaim3.vcproj create mode 100755 iup/mak.vc8/iupluaim5.vcproj create mode 100755 iup/mak.vc8/iupluaimglib5.vcproj create mode 100755 iup/mak.vc8/iupluaole3.vcproj create mode 100755 iup/mak.vc8/iupluaole5.vcproj create mode 100755 iup/mak.vc8/iupmot.vcproj create mode 100755 iup/mak.vc8/iupole.vcproj create mode 100755 iup/mak.vc8/iupsample.vcproj create mode 100755 iup/mak.vc8/iupsamplegtk.vcproj create mode 100755 iup/mak.vc8/iuptest.vcproj create mode 100755 iup/mak.vc8/iuptestgtk.vcproj create mode 100755 iup/mak.vc8/iupview.vcproj create mode 100755 iup/mak.vc8/iupviewgtk.vcproj create mode 100755 iup/mak.vc8/iupwin.vcproj create mode 100755 iup/mak.vc8/ledc.vcproj create mode 100755 iup/mak.vc9/iup.sln create mode 100755 iup/mak.vc9/iup_pplot.vcproj create mode 100755 iup/mak.vc9/iupcd.vcproj create mode 100755 iup/mak.vc9/iupcontrols.vcproj create mode 100755 iup/mak.vc9/iupcore.vcproj create mode 100755 iup/mak.vc9/iupgl.vcproj create mode 100755 iup/mak.vc9/iupgtk.vcproj create mode 100755 iup/mak.vc9/iupim.vcproj create mode 100755 iup/mak.vc9/iupimglib.vcproj create mode 100755 iup/mak.vc9/iuplua3.vcproj create mode 100755 iup/mak.vc9/iuplua5.vcproj create mode 100755 iup/mak.vc9/iuplua_pplot3.vcproj create mode 100755 iup/mak.vc9/iuplua_pplot5.vcproj create mode 100755 iup/mak.vc9/iupluacd3.vcproj create mode 100755 iup/mak.vc9/iupluacd5.vcproj create mode 100755 iup/mak.vc9/iupluacontrols3.vcproj create mode 100755 iup/mak.vc9/iupluacontrols5.vcproj create mode 100755 iup/mak.vc9/iupluaexe3.vcproj create mode 100755 iup/mak.vc9/iupluaexe5.vcproj create mode 100755 iup/mak.vc9/iupluaexe5gtk.vcproj create mode 100755 iup/mak.vc9/iupluagl3.vcproj create mode 100755 iup/mak.vc9/iupluagl5.vcproj create mode 100755 iup/mak.vc9/iupluaim3.vcproj create mode 100755 iup/mak.vc9/iupluaim5.vcproj create mode 100755 iup/mak.vc9/iupluaimglib5.vcproj create mode 100755 iup/mak.vc9/iupluaole3.vcproj create mode 100755 iup/mak.vc9/iupluaole5.vcproj create mode 100755 iup/mak.vc9/iupmot.vcproj create mode 100755 iup/mak.vc9/iupole.vcproj create mode 100755 iup/mak.vc9/iupsample.vcproj create mode 100755 iup/mak.vc9/iupsamplegtk.vcproj create mode 100755 iup/mak.vc9/iuptest.vcproj create mode 100755 iup/mak.vc9/iuptestgtk.vcproj create mode 100755 iup/mak.vc9/iupview.vcproj create mode 100755 iup/mak.vc9/iupviewgtk.vcproj create mode 100755 iup/mak.vc9/iupwin.vcproj create mode 100755 iup/mak.vc9/ledc.vcproj create mode 100755 iup/make_uname create mode 100755 iup/make_uname.bat create mode 100755 iup/make_uname_lib.bat create mode 100755 iup/src/Makefile create mode 100755 iup/src/config.mak create mode 100755 iup/src/gtk/iupgtk_button.c create mode 100755 iup/src/gtk/iupgtk_canvas.c create mode 100755 iup/src/gtk/iupgtk_clipboard.c create mode 100755 iup/src/gtk/iupgtk_colordlg.c create mode 100755 iup/src/gtk/iupgtk_common.c create mode 100755 iup/src/gtk/iupgtk_dialog.c create mode 100755 iup/src/gtk/iupgtk_drv.h create mode 100755 iup/src/gtk/iupgtk_filedlg.c create mode 100755 iup/src/gtk/iupgtk_focus.c create mode 100755 iup/src/gtk/iupgtk_font.c create mode 100755 iup/src/gtk/iupgtk_fontdlg.c create mode 100755 iup/src/gtk/iupgtk_frame.c create mode 100755 iup/src/gtk/iupgtk_globalattrib.c create mode 100755 iup/src/gtk/iupgtk_help.c create mode 100755 iup/src/gtk/iupgtk_image.c create mode 100755 iup/src/gtk/iupgtk_key.c create mode 100755 iup/src/gtk/iupgtk_label.c create mode 100755 iup/src/gtk/iupgtk_list.c create mode 100755 iup/src/gtk/iupgtk_loop.c create mode 100755 iup/src/gtk/iupgtk_menu.c create mode 100755 iup/src/gtk/iupgtk_messagedlg.c create mode 100755 iup/src/gtk/iupgtk_open.c create mode 100755 iup/src/gtk/iupgtk_progressbar.c create mode 100755 iup/src/gtk/iupgtk_tabs.c create mode 100755 iup/src/gtk/iupgtk_text.c create mode 100755 iup/src/gtk/iupgtk_timer.c create mode 100755 iup/src/gtk/iupgtk_tips.c create mode 100755 iup/src/gtk/iupgtk_toggle.c create mode 100755 iup/src/gtk/iupgtk_tree.c create mode 100755 iup/src/gtk/iupgtk_val.c create mode 100755 iup/src/iup.c create mode 100755 iup/src/iup.def create mode 100644 iup/src/iup.dep create mode 100755 iup/src/iup_array.c create mode 100755 iup/src/iup_array.h create mode 100755 iup/src/iup_assert.c create mode 100755 iup/src/iup_assert.h create mode 100755 iup/src/iup_attrib.c create mode 100755 iup/src/iup_attrib.h create mode 100755 iup/src/iup_box.c create mode 100755 iup/src/iup_box.h create mode 100755 iup/src/iup_button.c create mode 100755 iup/src/iup_button.h create mode 100755 iup/src/iup_callback.c create mode 100755 iup/src/iup_canvas.c create mode 100755 iup/src/iup_canvas.h create mode 100755 iup/src/iup_cbox.c create mode 100755 iup/src/iup_childtree.c create mode 100755 iup/src/iup_childtree.h create mode 100755 iup/src/iup_class.c create mode 100755 iup/src/iup_class.h create mode 100755 iup/src/iup_classattrib.c create mode 100755 iup/src/iup_classbase.c create mode 100755 iup/src/iup_classbase.h create mode 100755 iup/src/iup_colordlg.c create mode 100755 iup/src/iup_dialog.c create mode 100755 iup/src/iup_dialog.h create mode 100755 iup/src/iup_dlglist.c create mode 100755 iup/src/iup_dlglist.h create mode 100755 iup/src/iup_dll.rc create mode 100755 iup/src/iup_drv.h create mode 100755 iup/src/iup_drvfont.h create mode 100755 iup/src/iup_drvinfo.h create mode 100755 iup/src/iup_filedlg.c create mode 100755 iup/src/iup_fill.c create mode 100755 iup/src/iup_focus.c create mode 100755 iup/src/iup_focus.h create mode 100755 iup/src/iup_font.c create mode 100755 iup/src/iup_fontdlg.c create mode 100755 iup/src/iup_frame.c create mode 100755 iup/src/iup_frame.h create mode 100755 iup/src/iup_func.c create mode 100755 iup/src/iup_func.h create mode 100755 iup/src/iup_getparam.c create mode 100755 iup/src/iup_globalattrib.c create mode 100755 iup/src/iup_globalattrib.h create mode 100755 iup/src/iup_hbox.c create mode 100755 iup/src/iup_image.c create mode 100755 iup/src/iup_image.h create mode 100755 iup/src/iup_key.c create mode 100755 iup/src/iup_key.h create mode 100755 iup/src/iup_label.c create mode 100755 iup/src/iup_label.h create mode 100755 iup/src/iup_layout.c create mode 100755 iup/src/iup_layout.h create mode 100755 iup/src/iup_ledlex.c create mode 100755 iup/src/iup_ledlex.h create mode 100755 iup/src/iup_ledparse.c create mode 100755 iup/src/iup_list.c create mode 100755 iup/src/iup_list.h create mode 100755 iup/src/iup_mask.c create mode 100755 iup/src/iup_mask.h create mode 100755 iup/src/iup_maskmatch.c create mode 100755 iup/src/iup_maskmatch.h create mode 100755 iup/src/iup_maskparse.c create mode 100755 iup/src/iup_maskparse.h create mode 100755 iup/src/iup_menu.c create mode 100755 iup/src/iup_menu.h create mode 100755 iup/src/iup_messagedlg.c create mode 100755 iup/src/iup_names.c create mode 100755 iup/src/iup_names.h create mode 100755 iup/src/iup_normalizer.c create mode 100755 iup/src/iup_object.c create mode 100755 iup/src/iup_object.h create mode 100755 iup/src/iup_open.c create mode 100755 iup/src/iup_predial.c create mode 100755 iup/src/iup_predial.h create mode 100755 iup/src/iup_progressbar.c create mode 100755 iup/src/iup_progressbar.h create mode 100755 iup/src/iup_radio.c create mode 100755 iup/src/iup_register.c create mode 100755 iup/src/iup_register.h create mode 100755 iup/src/iup_sbox.c create mode 100755 iup/src/iup_scanf.c create mode 100755 iup/src/iup_show.c create mode 100755 iup/src/iup_spin.c create mode 100755 iup/src/iup_stdcontrols.h create mode 100755 iup/src/iup_str.c create mode 100755 iup/src/iup_str.h create mode 100755 iup/src/iup_strmessage.c create mode 100755 iup/src/iup_strmessage.h create mode 100755 iup/src/iup_table.c create mode 100755 iup/src/iup_table.h create mode 100755 iup/src/iup_tabs.c create mode 100755 iup/src/iup_tabs.h create mode 100755 iup/src/iup_text.c create mode 100755 iup/src/iup_text.h create mode 100755 iup/src/iup_timer.c create mode 100755 iup/src/iup_timer.h create mode 100755 iup/src/iup_toggle.c create mode 100755 iup/src/iup_toggle.h create mode 100755 iup/src/iup_tree.c create mode 100755 iup/src/iup_tree.h create mode 100755 iup/src/iup_user.c create mode 100755 iup/src/iup_val.c create mode 100755 iup/src/iup_val.h create mode 100755 iup/src/iup_vbox.c create mode 100755 iup/src/iup_zbox.c create mode 100644 iup/src/iupgtk.dep create mode 100755 iup/src/iupstub.mak create mode 100755 iup/src/make_uname create mode 100755 iup/src/make_uname.bat create mode 100755 iup/src/mot/iupmot_button.c create mode 100755 iup/src/mot/iupmot_canvas.c create mode 100755 iup/src/mot/iupmot_clipboard.c create mode 100755 iup/src/mot/iupmot_color.c create mode 100755 iup/src/mot/iupmot_color.h create mode 100755 iup/src/mot/iupmot_colordlg.c create mode 100755 iup/src/mot/iupmot_common.c create mode 100755 iup/src/mot/iupmot_dialog.c create mode 100755 iup/src/mot/iupmot_drv.h create mode 100755 iup/src/mot/iupmot_filedlg.c create mode 100755 iup/src/mot/iupmot_focus.c create mode 100755 iup/src/mot/iupmot_font.c create mode 100755 iup/src/mot/iupmot_fontdlg.c create mode 100755 iup/src/mot/iupmot_frame.c create mode 100755 iup/src/mot/iupmot_globalattrib.c create mode 100755 iup/src/mot/iupmot_image.c create mode 100755 iup/src/mot/iupmot_key.c create mode 100755 iup/src/mot/iupmot_label.c create mode 100755 iup/src/mot/iupmot_list.c create mode 100755 iup/src/mot/iupmot_loop.c create mode 100755 iup/src/mot/iupmot_menu.c create mode 100755 iup/src/mot/iupmot_messagedlg.c create mode 100755 iup/src/mot/iupmot_open.c create mode 100755 iup/src/mot/iupmot_progressbar.c create mode 100755 iup/src/mot/iupmot_tabs.c create mode 100755 iup/src/mot/iupmot_text.c create mode 100755 iup/src/mot/iupmot_timer.c create mode 100755 iup/src/mot/iupmot_tips.c create mode 100755 iup/src/mot/iupmot_toggle.c create mode 100755 iup/src/mot/iupmot_tree.c create mode 100755 iup/src/mot/iupmot_val.c create mode 100755 iup/src/mot/iupunix_help.c create mode 100755 iup/src/mot/iupunix_info.c create mode 100755 iup/src/win/iupwin_brush.c create mode 100755 iup/src/win/iupwin_brush.h create mode 100755 iup/src/win/iupwin_button.c create mode 100755 iup/src/win/iupwin_canvas.c create mode 100755 iup/src/win/iupwin_clipboard.c create mode 100755 iup/src/win/iupwin_colordlg.c create mode 100755 iup/src/win/iupwin_common.c create mode 100755 iup/src/win/iupwin_dialog.c create mode 100755 iup/src/win/iupwin_draw.c create mode 100755 iup/src/win/iupwin_draw.h create mode 100755 iup/src/win/iupwin_drv.h create mode 100755 iup/src/win/iupwin_filedlg.c create mode 100755 iup/src/win/iupwin_focus.c create mode 100755 iup/src/win/iupwin_font.c create mode 100755 iup/src/win/iupwin_fontdlg.c create mode 100755 iup/src/win/iupwin_frame.c create mode 100755 iup/src/win/iupwin_globalattrib.c create mode 100755 iup/src/win/iupwin_handle.c create mode 100755 iup/src/win/iupwin_handle.h create mode 100755 iup/src/win/iupwin_image.c create mode 100755 iup/src/win/iupwin_info.c create mode 100755 iup/src/win/iupwin_info.h create mode 100755 iup/src/win/iupwin_key.c create mode 100755 iup/src/win/iupwin_label.c create mode 100755 iup/src/win/iupwin_list.c create mode 100755 iup/src/win/iupwin_loop.c create mode 100755 iup/src/win/iupwin_menu.c create mode 100755 iup/src/win/iupwin_messagedlg.c create mode 100755 iup/src/win/iupwin_open.c create mode 100755 iup/src/win/iupwin_progressbar.c create mode 100755 iup/src/win/iupwin_tabs.c create mode 100755 iup/src/win/iupwin_text.c create mode 100755 iup/src/win/iupwin_timer.c create mode 100755 iup/src/win/iupwin_tips.c create mode 100755 iup/src/win/iupwin_toggle.c create mode 100755 iup/src/win/iupwin_tree.c create mode 100755 iup/src/win/iupwin_val.c create mode 100755 iup/src/win/iupwindows_help.c create mode 100755 iup/src/win/iupwindows_info.c create mode 100755 iup/src/win/iupwindows_main.c create mode 100755 iup/srccd/Makefile create mode 100755 iup/srccd/config.mak create mode 100755 iup/srccd/iup_cd.c create mode 100755 iup/srccd/iupcd.def create mode 100644 iup/srccd/iupcd.dep create mode 100755 iup/srccd/make_uname create mode 100755 iup/srccd/make_uname.bat create mode 100755 iup/srcconsole/Makefile create mode 100755 iup/srcconsole/config.mak create mode 100755 iup/srcconsole/console3.lua create mode 100755 iup/srcconsole/console5.lua create mode 100755 iup/srcconsole/copy_all_so create mode 100755 iup/srcconsole/copy_dll.bat create mode 100755 iup/srcconsole/copy_dll_64.bat create mode 100755 iup/srcconsole/copy_so create mode 100755 iup/srcconsole/iup_lua3.c create mode 100755 iup/srcconsole/iup_lua51.c create mode 100644 iup/srcconsole/iuplua3.bat create mode 100755 iup/srcconsole/iuplua3.mak create mode 100755 iup/srcconsole/iuplua3.rc create mode 100755 iup/srcconsole/iuplua5.rc create mode 100755 iup/srcconsole/iuplua51 create mode 100644 iup/srcconsole/iuplua51.bat create mode 100644 iup/srcconsole/iuplua51.dep create mode 100755 iup/srcconsole/iuplua51mot create mode 100644 iup/srcconsole/iuplua51mot.dep create mode 100755 iup/srcconsole/loh/console3.loh create mode 100755 iup/srcconsole/loh/console3_be32.loh create mode 100755 iup/srcconsole/loh/console3_be64.loh create mode 100755 iup/srcconsole/loh/console3_le64.loh create mode 100755 iup/srcconsole/loh/console3_le64w.loh create mode 100755 iup/srcconsole/loh/console5.loh create mode 100755 iup/srcconsole/loh/console5_be32.loh create mode 100755 iup/srcconsole/loh/console5_be64.loh create mode 100755 iup/srcconsole/loh/console5_le64.loh create mode 100755 iup/srcconsole/loh/console5_le64w.loh create mode 100755 iup/srcconsole/lua.ico create mode 100755 iup/srcconsole/make_uname create mode 100755 iup/srcconsole/make_uname.bat create mode 100755 iup/srcconsole/wlua_dll8_x64.manifest create mode 100755 iup/srcconsole/wlua_dll8_x86.manifest create mode 100755 iup/srcconsole/wlua_dll9_x64.manifest create mode 100755 iup/srcconsole/wlua_dll9_x86.manifest create mode 100755 iup/srccontrols/Makefile create mode 100755 iup/srccontrols/color/iup_colorbrowser.c create mode 100755 iup/srccontrols/color/iup_colorbrowserdlg.c create mode 100755 iup/srccontrols/color/iup_colorhsi.c create mode 100755 iup/srccontrols/color/iup_colorhsi.h create mode 100755 iup/srccontrols/config.mak create mode 100755 iup/srccontrols/iup_cdutil.c create mode 100755 iup/srccontrols/iup_cdutil.h create mode 100755 iup/srccontrols/iup_cells.c create mode 100755 iup/srccontrols/iup_colorbar.c create mode 100755 iup/srccontrols/iup_controls.c create mode 100755 iup/srccontrols/iup_controls.h create mode 100755 iup/srccontrols/iup_dial.c create mode 100755 iup/srccontrols/iup_gauge.c create mode 100755 iup/srccontrols/iup_oldmask.c create mode 100755 iup/srccontrols/iup_oldtabs.c create mode 100755 iup/srccontrols/iup_oldval.c create mode 100755 iup/srccontrols/iupcontrols.def create mode 100644 iup/srccontrols/iupcontrols.dep create mode 100755 iup/srccontrols/make_uname create mode 100755 iup/srccontrols/make_uname.bat create mode 100755 iup/srccontrols/matrix/iupmat_aux.c create mode 100755 iup/srccontrols/matrix/iupmat_aux.h create mode 100755 iup/srccontrols/matrix/iupmat_cd.h create mode 100755 iup/srccontrols/matrix/iupmat_colres.c create mode 100755 iup/srccontrols/matrix/iupmat_colres.h create mode 100755 iup/srccontrols/matrix/iupmat_def.h create mode 100755 iup/srccontrols/matrix/iupmat_draw.c create mode 100755 iup/srccontrols/matrix/iupmat_draw.h create mode 100755 iup/srccontrols/matrix/iupmat_edit.c create mode 100755 iup/srccontrols/matrix/iupmat_edit.h create mode 100755 iup/srccontrols/matrix/iupmat_focus.c create mode 100755 iup/srccontrols/matrix/iupmat_focus.h create mode 100755 iup/srccontrols/matrix/iupmat_getset.c create mode 100755 iup/srccontrols/matrix/iupmat_getset.h create mode 100755 iup/srccontrols/matrix/iupmat_key.c create mode 100755 iup/srccontrols/matrix/iupmat_key.h create mode 100755 iup/srccontrols/matrix/iupmat_mark.c create mode 100755 iup/srccontrols/matrix/iupmat_mark.h create mode 100755 iup/srccontrols/matrix/iupmat_mem.c create mode 100755 iup/srccontrols/matrix/iupmat_mem.h create mode 100755 iup/srccontrols/matrix/iupmat_mouse.c create mode 100755 iup/srccontrols/matrix/iupmat_mouse.h create mode 100755 iup/srccontrols/matrix/iupmat_numlc.c create mode 100755 iup/srccontrols/matrix/iupmat_numlc.h create mode 100755 iup/srccontrols/matrix/iupmat_scroll.c create mode 100755 iup/srccontrols/matrix/iupmat_scroll.h create mode 100755 iup/srccontrols/matrix/iupmatrix.c create mode 100755 iup/srcgl/Makefile create mode 100755 iup/srcgl/config.mak create mode 100755 iup/srcgl/iup_glcanvas_win.c create mode 100755 iup/srcgl/iup_glcanvas_x.c create mode 100755 iup/srcgl/iupgl.def create mode 100644 iup/srcgl/iupgl.dep create mode 100755 iup/srcgl/make_uname create mode 100755 iup/srcgl/make_uname.bat create mode 100755 iup/srcim/Makefile create mode 100755 iup/srcim/config.mak create mode 100755 iup/srcim/iup_im.c create mode 100755 iup/srcim/iupim.def create mode 100644 iup/srcim/iupim.dep create mode 100755 iup/srcim/make_uname create mode 100755 iup/srcim/make_uname.bat create mode 100755 iup/srcimglib/Makefile create mode 100755 iup/srcimglib/config.mak create mode 100755 iup/srcimglib/iup_image_library.c create mode 100755 iup/srcimglib/iup_imglib_bitmaps.h create mode 100755 iup/srcimglib/iup_imglib_bitmaps8.h create mode 100755 iup/srcimglib/iup_imglib_bitmapsgtk.h create mode 100755 iup/srcimglib/iup_imglib_icons.h create mode 100755 iup/srcimglib/iup_imglib_icons8.h create mode 100755 iup/srcimglib/iup_imglib_logos.h create mode 100755 iup/srcimglib/iup_imglib_logos8.h create mode 100755 iup/srcimglib/iupimglib.def create mode 100644 iup/srcimglib/iupimglib.dep create mode 100755 iup/srcimglib/make_uname create mode 100755 iup/srcimglib/make_uname.bat create mode 100755 iup/srcledc/Makefile create mode 100755 iup/srcledc/config.mak create mode 100755 iup/srcledc/ledc create mode 100644 iup/srcledc/ledc.bat create mode 100755 iup/srcledc/ledc.c create mode 100644 iup/srcledc/ledc.dep create mode 100755 iup/srcledc/ledc.h create mode 100755 iup/srcledc/ledc.l create mode 100755 iup/srcledc/ledc.y create mode 100755 iup/srcledc/lex.yy.c create mode 100755 iup/srcledc/make_uname create mode 100755 iup/srcledc/make_uname.bat create mode 100755 iup/srcledc/y.tab.c create mode 100755 iup/srcledc/y.tab.h create mode 100755 iup/srclua3/Makefile create mode 100755 iup/srclua3/cells.lua create mode 100755 iup/srclua3/colorbar.lua create mode 100755 iup/srclua3/colorbrowser.lua create mode 100755 iup/srclua3/config.mak create mode 100755 iup/srclua3/constants.lua create mode 100755 iup/srclua3/dial.lua create mode 100755 iup/srclua3/gauge.lua create mode 100755 iup/srclua3/il.h create mode 100755 iup/srclua3/il_cbox.c create mode 100755 iup/srclua3/il_cells.c create mode 100755 iup/srclua3/il_colorbar.c create mode 100755 iup/srclua3/il_colorbrowser.c create mode 100755 iup/srclua3/il_controls.h create mode 100755 iup/srclua3/il_dial.c create mode 100755 iup/srclua3/il_gauge.c create mode 100755 iup/srclua3/il_getcolor.c create mode 100755 iup/srclua3/il_getparam.c create mode 100755 iup/srclua3/il_mask.c create mode 100755 iup/srclua3/il_matrix.c create mode 100755 iup/srclua3/il_sbox.c create mode 100755 iup/srclua3/il_scanf.c create mode 100755 iup/srclua3/il_spin.c create mode 100755 iup/srclua3/il_tabs.c create mode 100755 iup/srclua3/il_tree.c create mode 100755 iup/srclua3/il_val.c create mode 100755 iup/srclua3/iup_pplot.mak create mode 100755 iup/srclua3/iupcd.mak create mode 100755 iup/srclua3/iupcontrols.mak create mode 100755 iup/srclua3/iupgl.mak create mode 100755 iup/srclua3/iupim.mak create mode 100755 iup/srclua3/iuplua.c create mode 100755 iup/srclua3/iuplua.lua create mode 100755 iup/srclua3/iuplua3.def create mode 100755 iup/srclua3/iuplua_api.c create mode 100755 iup/srclua3/iuplua_cd.c create mode 100755 iup/srclua3/iuplua_controls.c create mode 100755 iup/srclua3/iuplua_glcanvas.c create mode 100755 iup/srclua3/iuplua_im.c create mode 100755 iup/srclua3/iuplua_olecontrol.c create mode 100755 iup/srclua3/iuplua_pplot.c create mode 100755 iup/srclua3/iuplua_pplot3.def create mode 100755 iup/srclua3/iuplua_widgets.c create mode 100755 iup/srclua3/iuplua_widgets.lua create mode 100755 iup/srclua3/iupluacd3.def create mode 100755 iup/srclua3/iupluacontrols3.def create mode 100755 iup/srclua3/iupluagl3.def create mode 100755 iup/srclua3/iupluaim3.def create mode 100755 iup/srclua3/iupluaole3.def create mode 100755 iup/srclua3/iupole.mak create mode 100755 iup/srclua3/loh/cells.loh create mode 100755 iup/srclua3/loh/cells_be32.loh create mode 100755 iup/srclua3/loh/cells_be64.loh create mode 100755 iup/srclua3/loh/cells_le64.loh create mode 100755 iup/srclua3/loh/cells_le64w.loh create mode 100755 iup/srclua3/loh/colorbar.loh create mode 100755 iup/srclua3/loh/colorbar_be32.loh create mode 100755 iup/srclua3/loh/colorbar_be64.loh create mode 100755 iup/srclua3/loh/colorbar_le64.loh create mode 100755 iup/srclua3/loh/colorbar_le64w.loh create mode 100755 iup/srclua3/loh/colorbrowser.loh create mode 100755 iup/srclua3/loh/colorbrowser_be32.loh create mode 100755 iup/srclua3/loh/colorbrowser_be64.loh create mode 100755 iup/srclua3/loh/colorbrowser_le64.loh create mode 100755 iup/srclua3/loh/colorbrowser_le64w.loh create mode 100755 iup/srclua3/loh/constants.loh create mode 100755 iup/srclua3/loh/constants_be32.loh create mode 100755 iup/srclua3/loh/constants_be64.loh create mode 100755 iup/srclua3/loh/constants_le64.loh create mode 100755 iup/srclua3/loh/constants_le64w.loh create mode 100755 iup/srclua3/loh/dial.loh create mode 100755 iup/srclua3/loh/dial_be32.loh create mode 100755 iup/srclua3/loh/dial_be64.loh create mode 100755 iup/srclua3/loh/dial_le64.loh create mode 100755 iup/srclua3/loh/dial_le64w.loh create mode 100755 iup/srclua3/loh/gauge.loh create mode 100755 iup/srclua3/loh/gauge_be32.loh create mode 100755 iup/srclua3/loh/gauge_be64.loh create mode 100755 iup/srclua3/loh/gauge_le64.loh create mode 100755 iup/srclua3/loh/gauge_le64w.loh create mode 100755 iup/srclua3/loh/iuplua.loh create mode 100755 iup/srclua3/loh/iuplua_be32.loh create mode 100755 iup/srclua3/loh/iuplua_be64.loh create mode 100755 iup/srclua3/loh/iuplua_le64.loh create mode 100755 iup/srclua3/loh/iuplua_le64w.loh create mode 100755 iup/srclua3/loh/iuplua_widgets.loh create mode 100755 iup/srclua3/loh/iuplua_widgets_be32.loh create mode 100755 iup/srclua3/loh/iuplua_widgets_be64.loh create mode 100755 iup/srclua3/loh/iuplua_widgets_le64.loh create mode 100755 iup/srclua3/loh/iuplua_widgets_le64w.loh create mode 100755 iup/srclua3/loh/matrix.loh create mode 100755 iup/srclua3/loh/matrix_be32.loh create mode 100755 iup/srclua3/loh/matrix_be64.loh create mode 100755 iup/srclua3/loh/matrix_le64.loh create mode 100755 iup/srclua3/loh/matrix_le64w.loh create mode 100755 iup/srclua3/loh/pplot.loh create mode 100755 iup/srclua3/loh/pplot_be32.loh create mode 100755 iup/srclua3/loh/pplot_be64.loh create mode 100755 iup/srclua3/loh/pplot_le64.loh create mode 100755 iup/srclua3/loh/pplot_le64w.loh create mode 100755 iup/srclua3/loh/sbox.loh create mode 100755 iup/srclua3/loh/sbox_be32.loh create mode 100755 iup/srclua3/loh/sbox_be64.loh create mode 100755 iup/srclua3/loh/sbox_le64.loh create mode 100755 iup/srclua3/loh/sbox_le64w.loh create mode 100755 iup/srclua3/loh/spin.loh create mode 100755 iup/srclua3/loh/spin_be32.loh create mode 100755 iup/srclua3/loh/spin_be64.loh create mode 100755 iup/srclua3/loh/spin_le64.loh create mode 100755 iup/srclua3/loh/spin_le64w.loh create mode 100755 iup/srclua3/loh/tabs.loh create mode 100755 iup/srclua3/loh/tabs_be32.loh create mode 100755 iup/srclua3/loh/tabs_be64.loh create mode 100755 iup/srclua3/loh/tabs_le64.loh create mode 100755 iup/srclua3/loh/tabs_le64w.loh create mode 100755 iup/srclua3/loh/tree.loh create mode 100755 iup/srclua3/loh/tree_be32.loh create mode 100755 iup/srclua3/loh/tree_be64.loh create mode 100755 iup/srclua3/loh/tree_le64.loh create mode 100755 iup/srclua3/loh/tree_le64w.loh create mode 100755 iup/srclua3/loh/val.loh create mode 100755 iup/srclua3/loh/val_be32.loh create mode 100755 iup/srclua3/loh/val_be64.loh create mode 100755 iup/srclua3/loh/val_le64.loh create mode 100755 iup/srclua3/loh/val_le64w.loh create mode 100755 iup/srclua3/make_uname create mode 100755 iup/srclua3/make_uname.bat create mode 100755 iup/srclua3/matrix.lua create mode 100755 iup/srclua3/pplot.lua create mode 100755 iup/srclua3/sbox.lua create mode 100755 iup/srclua3/spin.lua create mode 100755 iup/srclua3/tabs.lua create mode 100755 iup/srclua3/tree.lua create mode 100755 iup/srclua3/val.lua create mode 100755 iup/srclua5/Makefile create mode 100755 iup/srclua5/button.lua create mode 100755 iup/srclua5/canvas.lua create mode 100755 iup/srclua5/cbox.lua create mode 100755 iup/srclua5/cells.lua create mode 100755 iup/srclua5/clipboard.lua create mode 100755 iup/srclua5/colorbar.lua create mode 100755 iup/srclua5/colorbrowser.lua create mode 100755 iup/srclua5/colordlg.lua create mode 100755 iup/srclua5/config.mak create mode 100755 iup/srclua5/constants.lua create mode 100755 iup/srclua5/ctrl_template.lua create mode 100755 iup/srclua5/dial.lua create mode 100755 iup/srclua5/dialog.lua create mode 100755 iup/srclua5/filedlg.lua create mode 100755 iup/srclua5/fill.lua create mode 100755 iup/srclua5/fontdlg.lua create mode 100755 iup/srclua5/frame.lua create mode 100755 iup/srclua5/gauge.lua create mode 100755 iup/srclua5/generator.lua create mode 100755 iup/srclua5/glcanvas.lua create mode 100755 iup/srclua5/hbox.lua create mode 100755 iup/srclua5/il.h create mode 100755 iup/srclua5/il_button.c create mode 100755 iup/srclua5/il_canvas.c create mode 100755 iup/srclua5/il_cbox.c create mode 100755 iup/srclua5/il_cells.c create mode 100644 iup/srclua5/il_clipboard.c create mode 100755 iup/srclua5/il_colorbar.c create mode 100755 iup/srclua5/il_colorbrowser.c create mode 100755 iup/srclua5/il_colordlg.c create mode 100755 iup/srclua5/il_controls.h create mode 100755 iup/srclua5/il_dial.c create mode 100755 iup/srclua5/il_dialog.c create mode 100755 iup/srclua5/il_filedlg.c create mode 100755 iup/srclua5/il_fill.c create mode 100755 iup/srclua5/il_fontdlg.c create mode 100755 iup/srclua5/il_frame.c create mode 100755 iup/srclua5/il_gauge.c create mode 100755 iup/srclua5/il_getcolor.c create mode 100755 iup/srclua5/il_getparam.c create mode 100755 iup/srclua5/il_glcanvas.c create mode 100755 iup/srclua5/il_hbox.c create mode 100755 iup/srclua5/il_image.c create mode 100755 iup/srclua5/il_imagergb.c create mode 100755 iup/srclua5/il_imagergba.c create mode 100755 iup/srclua5/il_item.c create mode 100755 iup/srclua5/il_label.c create mode 100755 iup/srclua5/il_list.c create mode 100755 iup/srclua5/il_mask.c create mode 100755 iup/srclua5/il_matrix.c create mode 100755 iup/srclua5/il_matrix_aux.c create mode 100755 iup/srclua5/il_menu.c create mode 100755 iup/srclua5/il_messagedlg.c create mode 100755 iup/srclua5/il_multiline.c create mode 100755 iup/srclua5/il_normalizer.c create mode 100755 iup/srclua5/il_olecontrol.c create mode 100755 iup/srclua5/il_pplot.c create mode 100755 iup/srclua5/il_progressbar.c create mode 100755 iup/srclua5/il_radio.c create mode 100755 iup/srclua5/il_sbox.c create mode 100755 iup/srclua5/il_scanf.c create mode 100755 iup/srclua5/il_separator.c create mode 100755 iup/srclua5/il_spin.c create mode 100755 iup/srclua5/il_spinbox.c create mode 100755 iup/srclua5/il_submenu.c create mode 100755 iup/srclua5/il_tabs.c create mode 100755 iup/srclua5/il_text.c create mode 100755 iup/srclua5/il_timer.c create mode 100755 iup/srclua5/il_toggle.c create mode 100755 iup/srclua5/il_tree.c create mode 100755 iup/srclua5/il_tree_aux.c create mode 100755 iup/srclua5/il_user.c create mode 100755 iup/srclua5/il_val.c create mode 100755 iup/srclua5/il_vbox.c create mode 100755 iup/srclua5/il_zbox.c create mode 100755 iup/srclua5/image.lua create mode 100755 iup/srclua5/imagergb.lua create mode 100755 iup/srclua5/imagergba.lua create mode 100755 iup/srclua5/item.lua create mode 100755 iup/srclua5/iup_pplot.mak create mode 100755 iup/srclua5/iupcd.mak create mode 100755 iup/srclua5/iupcontrols.mak create mode 100755 iup/srclua5/iupgl.mak create mode 100755 iup/srclua5/iupim.mak create mode 100755 iup/srclua5/iupimglib.mak create mode 100755 iup/srclua5/iuplua.c create mode 100755 iup/srclua5/iuplua.lua create mode 100755 iup/srclua5/iuplua5.def create mode 100644 iup/srclua5/iuplua51.dep create mode 100755 iup/srclua5/iuplua_api.c create mode 100755 iup/srclua5/iuplua_cd.c create mode 100755 iup/srclua5/iuplua_controls.c create mode 100755 iup/srclua5/iuplua_glcanvas.c create mode 100755 iup/srclua5/iuplua_im.c create mode 100755 iup/srclua5/iuplua_imglib.c create mode 100755 iup/srclua5/iuplua_pplot.c create mode 100755 iup/srclua5/iuplua_pplot5.def create mode 100644 iup/srclua5/iuplua_pplot51.dep create mode 100755 iup/srclua5/iupluacd5.def create mode 100644 iup/srclua5/iupluacd51.dep create mode 100755 iup/srclua5/iupluacontrols5.def create mode 100644 iup/srclua5/iupluacontrols51.dep create mode 100755 iup/srclua5/iupluagl5.def create mode 100644 iup/srclua5/iupluagl51.dep create mode 100755 iup/srclua5/iupluaim5.def create mode 100644 iup/srclua5/iupluaim51.dep create mode 100755 iup/srclua5/iupluaimglib5.def create mode 100644 iup/srclua5/iupluaimglib51.dep create mode 100755 iup/srclua5/iupluaole5.def create mode 100755 iup/srclua5/iupole.mak create mode 100755 iup/srclua5/label.lua create mode 100755 iup/srclua5/list.lua create mode 100755 iup/srclua5/loh/button.loh create mode 100755 iup/srclua5/loh/button_be32.loh create mode 100755 iup/srclua5/loh/button_be64.loh create mode 100755 iup/srclua5/loh/button_le64.loh create mode 100755 iup/srclua5/loh/button_le64w.loh create mode 100755 iup/srclua5/loh/canvas.loh create mode 100755 iup/srclua5/loh/canvas_be32.loh create mode 100755 iup/srclua5/loh/canvas_be64.loh create mode 100755 iup/srclua5/loh/canvas_le64.loh create mode 100755 iup/srclua5/loh/canvas_le64w.loh create mode 100755 iup/srclua5/loh/cbox.loh create mode 100755 iup/srclua5/loh/cbox_be32.loh create mode 100755 iup/srclua5/loh/cbox_be64.loh create mode 100755 iup/srclua5/loh/cbox_le64.loh create mode 100755 iup/srclua5/loh/cbox_le64w.loh create mode 100755 iup/srclua5/loh/cells.loh create mode 100755 iup/srclua5/loh/cells_be32.loh create mode 100755 iup/srclua5/loh/cells_be64.loh create mode 100755 iup/srclua5/loh/cells_le64.loh create mode 100755 iup/srclua5/loh/cells_le64w.loh create mode 100644 iup/srclua5/loh/clipboard.loh create mode 100755 iup/srclua5/loh/clipboard_be32.loh create mode 100644 iup/srclua5/loh/clipboard_be64.loh create mode 100755 iup/srclua5/loh/clipboard_le64.loh create mode 100755 iup/srclua5/loh/colorbar.loh create mode 100755 iup/srclua5/loh/colorbar_be32.loh create mode 100755 iup/srclua5/loh/colorbar_be64.loh create mode 100755 iup/srclua5/loh/colorbar_le64.loh create mode 100755 iup/srclua5/loh/colorbar_le64w.loh create mode 100755 iup/srclua5/loh/colorbrowser.loh create mode 100755 iup/srclua5/loh/colorbrowser_be32.loh create mode 100755 iup/srclua5/loh/colorbrowser_be64.loh create mode 100755 iup/srclua5/loh/colorbrowser_le64.loh create mode 100755 iup/srclua5/loh/colorbrowser_le64w.loh create mode 100755 iup/srclua5/loh/colordlg.loh create mode 100755 iup/srclua5/loh/colordlg_be32.loh create mode 100755 iup/srclua5/loh/colordlg_be64.loh create mode 100755 iup/srclua5/loh/colordlg_le64.loh create mode 100755 iup/srclua5/loh/colordlg_le64w.loh create mode 100755 iup/srclua5/loh/constants.loh create mode 100755 iup/srclua5/loh/constants_be32.loh create mode 100755 iup/srclua5/loh/constants_be64.loh create mode 100755 iup/srclua5/loh/constants_le64.loh create mode 100755 iup/srclua5/loh/constants_le64w.loh create mode 100755 iup/srclua5/loh/dial.loh create mode 100755 iup/srclua5/loh/dial_be32.loh create mode 100755 iup/srclua5/loh/dial_be64.loh create mode 100755 iup/srclua5/loh/dial_le64.loh create mode 100755 iup/srclua5/loh/dial_le64w.loh create mode 100755 iup/srclua5/loh/dialog.loh create mode 100755 iup/srclua5/loh/dialog_be32.loh create mode 100755 iup/srclua5/loh/dialog_be64.loh create mode 100755 iup/srclua5/loh/dialog_le64.loh create mode 100755 iup/srclua5/loh/dialog_le64w.loh create mode 100755 iup/srclua5/loh/filedlg.loh create mode 100755 iup/srclua5/loh/filedlg_be32.loh create mode 100755 iup/srclua5/loh/filedlg_be64.loh create mode 100755 iup/srclua5/loh/filedlg_le64.loh create mode 100755 iup/srclua5/loh/filedlg_le64w.loh create mode 100755 iup/srclua5/loh/fill.loh create mode 100755 iup/srclua5/loh/fill_be32.loh create mode 100755 iup/srclua5/loh/fill_be64.loh create mode 100755 iup/srclua5/loh/fill_le64.loh create mode 100755 iup/srclua5/loh/fill_le64w.loh create mode 100755 iup/srclua5/loh/fontdlg.loh create mode 100755 iup/srclua5/loh/fontdlg_be32.loh create mode 100755 iup/srclua5/loh/fontdlg_be64.loh create mode 100755 iup/srclua5/loh/fontdlg_le64.loh create mode 100755 iup/srclua5/loh/fontdlg_le64w.loh create mode 100755 iup/srclua5/loh/frame.loh create mode 100755 iup/srclua5/loh/frame_be32.loh create mode 100755 iup/srclua5/loh/frame_be64.loh create mode 100755 iup/srclua5/loh/frame_le64.loh create mode 100755 iup/srclua5/loh/frame_le64w.loh create mode 100755 iup/srclua5/loh/gauge.loh create mode 100755 iup/srclua5/loh/gauge_be32.loh create mode 100755 iup/srclua5/loh/gauge_be64.loh create mode 100755 iup/srclua5/loh/gauge_le64.loh create mode 100755 iup/srclua5/loh/gauge_le64w.loh create mode 100755 iup/srclua5/loh/glcanvas.loh create mode 100755 iup/srclua5/loh/glcanvas_be32.loh create mode 100755 iup/srclua5/loh/glcanvas_be64.loh create mode 100755 iup/srclua5/loh/glcanvas_le64.loh create mode 100755 iup/srclua5/loh/glcanvas_le64w.loh create mode 100755 iup/srclua5/loh/hbox.loh create mode 100755 iup/srclua5/loh/hbox_be32.loh create mode 100755 iup/srclua5/loh/hbox_be64.loh create mode 100755 iup/srclua5/loh/hbox_le64.loh create mode 100755 iup/srclua5/loh/hbox_le64w.loh create mode 100755 iup/srclua5/loh/image.loh create mode 100755 iup/srclua5/loh/image_be32.loh create mode 100755 iup/srclua5/loh/image_be64.loh create mode 100755 iup/srclua5/loh/image_le64.loh create mode 100755 iup/srclua5/loh/image_le64w.loh create mode 100755 iup/srclua5/loh/imagergb.loh create mode 100755 iup/srclua5/loh/imagergb_be32.loh create mode 100755 iup/srclua5/loh/imagergb_be64.loh create mode 100755 iup/srclua5/loh/imagergb_le64.loh create mode 100755 iup/srclua5/loh/imagergb_le64w.loh create mode 100755 iup/srclua5/loh/imagergba.loh create mode 100755 iup/srclua5/loh/imagergba_be32.loh create mode 100755 iup/srclua5/loh/imagergba_be64.loh create mode 100755 iup/srclua5/loh/imagergba_le64.loh create mode 100755 iup/srclua5/loh/imagergba_le64w.loh create mode 100755 iup/srclua5/loh/item.loh create mode 100755 iup/srclua5/loh/item_be32.loh create mode 100755 iup/srclua5/loh/item_be64.loh create mode 100755 iup/srclua5/loh/item_le64.loh create mode 100755 iup/srclua5/loh/item_le64w.loh create mode 100755 iup/srclua5/loh/iuplua.loh create mode 100755 iup/srclua5/loh/iuplua_be32.loh create mode 100755 iup/srclua5/loh/iuplua_be64.loh create mode 100755 iup/srclua5/loh/iuplua_le64.loh create mode 100755 iup/srclua5/loh/iuplua_le64w.loh create mode 100755 iup/srclua5/loh/label.loh create mode 100755 iup/srclua5/loh/label_be32.loh create mode 100755 iup/srclua5/loh/label_be64.loh create mode 100755 iup/srclua5/loh/label_le64.loh create mode 100755 iup/srclua5/loh/label_le64w.loh create mode 100755 iup/srclua5/loh/list.loh create mode 100755 iup/srclua5/loh/list_be32.loh create mode 100755 iup/srclua5/loh/list_be64.loh create mode 100755 iup/srclua5/loh/list_le64.loh create mode 100755 iup/srclua5/loh/list_le64w.loh create mode 100755 iup/srclua5/loh/matrix.loh create mode 100755 iup/srclua5/loh/matrix_be32.loh create mode 100755 iup/srclua5/loh/matrix_be64.loh create mode 100755 iup/srclua5/loh/matrix_le64.loh create mode 100755 iup/srclua5/loh/matrix_le64w.loh create mode 100755 iup/srclua5/loh/menu.loh create mode 100755 iup/srclua5/loh/menu_be32.loh create mode 100755 iup/srclua5/loh/menu_be64.loh create mode 100755 iup/srclua5/loh/menu_le64.loh create mode 100755 iup/srclua5/loh/menu_le64w.loh create mode 100755 iup/srclua5/loh/messagedlg.loh create mode 100755 iup/srclua5/loh/messagedlg_be32.loh create mode 100755 iup/srclua5/loh/messagedlg_be64.loh create mode 100755 iup/srclua5/loh/messagedlg_le64.loh create mode 100755 iup/srclua5/loh/messagedlg_le64w.loh create mode 100755 iup/srclua5/loh/multiline.loh create mode 100755 iup/srclua5/loh/multiline_be32.loh create mode 100755 iup/srclua5/loh/multiline_be64.loh create mode 100755 iup/srclua5/loh/multiline_le64.loh create mode 100755 iup/srclua5/loh/multiline_le64w.loh create mode 100755 iup/srclua5/loh/normalizer.loh create mode 100755 iup/srclua5/loh/normalizer_be32.loh create mode 100755 iup/srclua5/loh/normalizer_be64.loh create mode 100755 iup/srclua5/loh/normalizer_le64.loh create mode 100755 iup/srclua5/loh/normalizer_le64w.loh create mode 100755 iup/srclua5/loh/olecontrol.loh create mode 100755 iup/srclua5/loh/olecontrol_be64.loh create mode 100755 iup/srclua5/loh/olecontrol_le64w.loh create mode 100755 iup/srclua5/loh/pplot.loh create mode 100755 iup/srclua5/loh/pplot_be32.loh create mode 100755 iup/srclua5/loh/pplot_be64.loh create mode 100755 iup/srclua5/loh/pplot_le64.loh create mode 100755 iup/srclua5/loh/pplot_le64w.loh create mode 100755 iup/srclua5/loh/progressbar.loh create mode 100755 iup/srclua5/loh/progressbar_be32.loh create mode 100755 iup/srclua5/loh/progressbar_be64.loh create mode 100755 iup/srclua5/loh/progressbar_le64.loh create mode 100755 iup/srclua5/loh/progressbar_le64w.loh create mode 100755 iup/srclua5/loh/radio.loh create mode 100755 iup/srclua5/loh/radio_be32.loh create mode 100755 iup/srclua5/loh/radio_be64.loh create mode 100755 iup/srclua5/loh/radio_le64.loh create mode 100755 iup/srclua5/loh/radio_le64w.loh create mode 100755 iup/srclua5/loh/sbox.loh create mode 100755 iup/srclua5/loh/sbox_be32.loh create mode 100755 iup/srclua5/loh/sbox_be64.loh create mode 100755 iup/srclua5/loh/sbox_le64.loh create mode 100755 iup/srclua5/loh/sbox_le64w.loh create mode 100755 iup/srclua5/loh/separator.loh create mode 100755 iup/srclua5/loh/separator_be32.loh create mode 100755 iup/srclua5/loh/separator_be64.loh create mode 100755 iup/srclua5/loh/separator_le64.loh create mode 100755 iup/srclua5/loh/separator_le64w.loh create mode 100755 iup/srclua5/loh/spin.loh create mode 100755 iup/srclua5/loh/spin_be32.loh create mode 100755 iup/srclua5/loh/spin_be64.loh create mode 100755 iup/srclua5/loh/spin_le64.loh create mode 100755 iup/srclua5/loh/spin_le64w.loh create mode 100755 iup/srclua5/loh/spinbox.loh create mode 100755 iup/srclua5/loh/spinbox_be32.loh create mode 100755 iup/srclua5/loh/spinbox_be64.loh create mode 100755 iup/srclua5/loh/spinbox_le64.loh create mode 100755 iup/srclua5/loh/spinbox_le64w.loh create mode 100755 iup/srclua5/loh/submenu.loh create mode 100755 iup/srclua5/loh/submenu_be32.loh create mode 100755 iup/srclua5/loh/submenu_be64.loh create mode 100755 iup/srclua5/loh/submenu_le64.loh create mode 100755 iup/srclua5/loh/submenu_le64w.loh create mode 100755 iup/srclua5/loh/tabs.loh create mode 100755 iup/srclua5/loh/tabs_be32.loh create mode 100755 iup/srclua5/loh/tabs_be64.loh create mode 100755 iup/srclua5/loh/tabs_le64.loh create mode 100755 iup/srclua5/loh/tabs_le64w.loh create mode 100755 iup/srclua5/loh/text.loh create mode 100755 iup/srclua5/loh/text_be32.loh create mode 100755 iup/srclua5/loh/text_be64.loh create mode 100755 iup/srclua5/loh/text_le64.loh create mode 100755 iup/srclua5/loh/text_le64w.loh create mode 100755 iup/srclua5/loh/timer.loh create mode 100755 iup/srclua5/loh/timer_be32.loh create mode 100755 iup/srclua5/loh/timer_be64.loh create mode 100755 iup/srclua5/loh/timer_le64.loh create mode 100755 iup/srclua5/loh/timer_le64w.loh create mode 100755 iup/srclua5/loh/toggle.loh create mode 100755 iup/srclua5/loh/toggle_be32.loh create mode 100755 iup/srclua5/loh/toggle_be64.loh create mode 100755 iup/srclua5/loh/toggle_le64.loh create mode 100755 iup/srclua5/loh/toggle_le64w.loh create mode 100755 iup/srclua5/loh/tree.loh create mode 100755 iup/srclua5/loh/tree_be32.loh create mode 100755 iup/srclua5/loh/tree_be64.loh create mode 100755 iup/srclua5/loh/tree_le64.loh create mode 100755 iup/srclua5/loh/tree_le64w.loh create mode 100755 iup/srclua5/loh/user.loh create mode 100755 iup/srclua5/loh/user_be32.loh create mode 100755 iup/srclua5/loh/user_be64.loh create mode 100755 iup/srclua5/loh/user_le64.loh create mode 100755 iup/srclua5/loh/user_le64w.loh create mode 100755 iup/srclua5/loh/val.loh create mode 100755 iup/srclua5/loh/val_be32.loh create mode 100755 iup/srclua5/loh/val_be64.loh create mode 100755 iup/srclua5/loh/val_le64.loh create mode 100755 iup/srclua5/loh/val_le64w.loh create mode 100755 iup/srclua5/loh/vbox.loh create mode 100755 iup/srclua5/loh/vbox_be32.loh create mode 100755 iup/srclua5/loh/vbox_be64.loh create mode 100755 iup/srclua5/loh/vbox_le64.loh create mode 100755 iup/srclua5/loh/vbox_le64w.loh create mode 100755 iup/srclua5/loh/zbox.loh create mode 100755 iup/srclua5/loh/zbox_be32.loh create mode 100755 iup/srclua5/loh/zbox_be64.loh create mode 100755 iup/srclua5/loh/zbox_le64.loh create mode 100755 iup/srclua5/loh/zbox_le64w.loh create mode 100755 iup/srclua5/make_uname create mode 100755 iup/srclua5/make_uname.bat create mode 100755 iup/srclua5/matrix.lua create mode 100755 iup/srclua5/menu.lua create mode 100755 iup/srclua5/messagedlg.lua create mode 100755 iup/srclua5/multiline.lua create mode 100755 iup/srclua5/normalizer.lua create mode 100755 iup/srclua5/olecontrol.lua create mode 100755 iup/srclua5/pplot.lua create mode 100755 iup/srclua5/progressbar.lua create mode 100755 iup/srclua5/radio.lua create mode 100755 iup/srclua5/sbox.lua create mode 100755 iup/srclua5/separator.lua create mode 100755 iup/srclua5/spin.lua create mode 100755 iup/srclua5/spinbox.lua create mode 100755 iup/srclua5/submenu.lua create mode 100755 iup/srclua5/tabs.lua create mode 100755 iup/srclua5/text.lua create mode 100755 iup/srclua5/timer.lua create mode 100755 iup/srclua5/toggle.lua create mode 100755 iup/srclua5/tree.lua create mode 100755 iup/srclua5/user.lua create mode 100755 iup/srclua5/val.lua create mode 100755 iup/srclua5/vbox.lua create mode 100755 iup/srclua5/zbox.lua create mode 100755 iup/srcole/config.mak create mode 100755 iup/srcole/iup_olecontrol.cpp create mode 100755 iup/srcole/iupole.def create mode 100755 iup/srcole/make_uname.bat create mode 100755 iup/srcole/tAmbientProperties.cpp create mode 100755 iup/srcole/tAmbientProperties.h create mode 100755 iup/srcole/tDispatch.cpp create mode 100755 iup/srcole/tDispatch.h create mode 100755 iup/srcole/tLegacy.cpp create mode 100755 iup/srcole/tLegacy.h create mode 100755 iup/srcole/tOleClientSite.cpp create mode 100755 iup/srcole/tOleClientSite.h create mode 100755 iup/srcole/tOleControlSite.cpp create mode 100755 iup/srcole/tOleControlSite.h create mode 100755 iup/srcole/tOleHandler.cpp create mode 100755 iup/srcole/tOleHandler.h create mode 100755 iup/srcole/tOleInPlaceFrame.cpp create mode 100755 iup/srcole/tOleInPlaceFrame.h create mode 100755 iup/srcole/tOleInPlaceSite.cpp create mode 100755 iup/srcole/tOleInPlaceSite.h create mode 100755 iup/srcpplot/Makefile create mode 100755 iup/srcpplot/config.mak create mode 100755 iup/srcpplot/iupPPlot.cpp create mode 100755 iup/srcpplot/iupPPlot.h create mode 100755 iup/srcpplot/iupPPlotInteraction.cpp create mode 100755 iup/srcpplot/iupPPlotInteraction.h create mode 100755 iup/srcpplot/iup_pplot.cpp create mode 100755 iup/srcpplot/iup_pplot.def create mode 100644 iup/srcpplot/iup_pplot.dep create mode 100755 iup/srcpplot/iuppplot.hpp create mode 100755 iup/srcpplot/make_uname create mode 100755 iup/srcpplot/make_uname.bat create mode 100755 iup/srcview/Makefile create mode 100755 iup/srcview/config.mak create mode 100755 iup/srcview/iup_view.c create mode 100755 iup/srcview/iupview create mode 100644 iup/srcview/iupview.bat create mode 100644 iup/srcview/iupview.dep create mode 100755 iup/srcview/make_uname create mode 100755 iup/srcview/make_uname.bat create mode 100755 iup/tecmake_compact.mak create mode 100755 iup/test/bigtest.c create mode 100755 iup/test/button.c create mode 100755 iup/test/canvas.c create mode 100755 iup/test/canvas_cddbuffer.c create mode 100755 iup/test/canvas_cdsimple.c create mode 100755 iup/test/canvas_scrollbar.c create mode 100755 iup/test/cells_checkboard.c create mode 100755 iup/test/cells_degrade.c create mode 100755 iup/test/cells_numbering.c create mode 100755 iup/test/class_conf.c create mode 100755 iup/test/clipboard.c create mode 100755 iup/test/colorbar.c create mode 100755 iup/test/colorbrowser.c create mode 100755 iup/test/config.mak create mode 100755 iup/test/dial.c create mode 100755 iup/test/dial.led create mode 100755 iup/test/dialog.c create mode 100755 iup/test/file_large.xbm create mode 100755 iup/test/frame.c create mode 100755 iup/test/gauge.c create mode 100755 iup/test/getcolor.c create mode 100755 iup/test/getparam.c create mode 100755 iup/test/glcanvas.c create mode 100755 iup/test/glcanvas_cube.c create mode 100755 iup/test/hbox.c create mode 100755 iup/test/idle.c create mode 100755 iup/test/iuptest.rc create mode 100755 iup/test/label.c create mode 100755 iup/test/list.c create mode 100755 iup/test/make_uname create mode 100755 iup/test/matrix.c create mode 100755 iup/test/matrix_cbmode.c create mode 100755 iup/test/matrix_cbs.c create mode 100755 iup/test/mdi.c create mode 100755 iup/test/menu.c create mode 100755 iup/test/ole.cpp create mode 100755 iup/test/pplot.c create mode 100755 iup/test/predialogs.c create mode 100755 iup/test/progressbar.c create mode 100755 iup/test/sample.c create mode 100755 iup/test/sbox.c create mode 100755 iup/test/scanf.c create mode 100755 iup/test/spin.c create mode 100755 iup/test/sysinfo.c create mode 100755 iup/test/tabs.c create mode 100755 iup/test/tecgraf.bmp create mode 100755 iup/test/text.c create mode 100755 iup/test/text_spin.c create mode 100755 iup/test/timer.c create mode 100755 iup/test/toggle.c create mode 100755 iup/test/tray.c create mode 100755 iup/test/tree.c create mode 100755 iup/test/val.c create mode 100755 iup/test/vbox.c create mode 100755 iup/test/zbox.c diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..82653da --- /dev/null +++ b/Makefile @@ -0,0 +1,496 @@ +SYSTEM=$(shell uname) +ifeq ($(SYSTEM),Darwin) +ARCH_FLAGS=-arch i386 -arch x86_64 +SHARED_FLAGS=-dynamiclib +SHARED_EXT=dylib +CPPFLAGS = -dynamic +LD = g++ +else +ARCH_FLAGS=-march=i686 -m32 +SHARED_FLAGS=-shared +SHARED_EXT=so +LD = g++ -m32 +endif +CC = gcc +CXX = g++ +STRIP = strip + +INCLUDES = \ +-I../Baltisot/include \ +-I../Baltisot/lib/zlib/include \ +-I../Baltisot/lib/lua/include -I../Baltisot/lib/lua/includes \ +-I /usr/include/freetype2 \ +-I /sw/include \ +-I /usr/X11/include/freetype2 -I /usr/X11/include \ +-I /usr/include/gtk-2.0 -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -I /usr/include/cairo -I /usr/include/pango-1.0 -I /usr/lib/gtk-2.0/include -I /usr/include/atk-1.0 \ +-I im/include -I cd/include -I cd/src/sim -I cd/src/x11 -I iup/include -I iup/src -I iup/srccontrols \ + +HAVES = -DHAVE_VSSCANF -DHAVE_LIBJPEG -DHAVE_FCNTL -DHAVE_UNISTD_H -DHAVE_FORK -DHAVE_PIPE -DHAVE_FSYNC -DHAVE_MALLOC_H -DHAVE_ASPRINTF -DHAVE_BYTESWAP_H -DCD_NO_OLD_INTERFACE -DGTK_DISABLE_DEPRECATED -D_IUP_PPLOT_ -DIUPLUA_USELOH -DUSE_STATIC -DIUPLUA_IMGLIB + +CPPFLAGS_NO_ARCH += $(INCLUDES) -O4 -fexceptions -DSTDC_HEADERS -DREADLINE_STATIC -DHOOK_STDS -DWORDS_LITTLEENDIAN $(HAVES) -DTEC_LITTLEENDIAN +CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) + +LDFLAGS += $(ARCH_FLAGS) $(SHARED_FLAGS) -L/usr/X11/lib -L/sw/lib ./lua-interface.$(SHARED_EXT) + +vpath %.c ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/x11:cd/src/xrender:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcgl:iup/srcpplot:iup/srcim:iup/srcimglib:iup/srcledc:iup/srclua5 +vpath %.cc ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/x11:cd/src/xrender:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcgl:iup/srcpplot:iup/srcim:iup/srcimglib:iup/srcledc:iup/srclua5 +vpath %.cpp ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/x11:cd/src/xrender:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcgl:iup/srcpplot:iup/srcim:iup/srcimglib:iup/srcledc:iup/srclua5 +vpath %.lua ../Baltisot/lib:../Baltisot/src + +IM_SOURCES = \ +old_imcolor.c \ +old_imresize.c \ +im_converttype.cpp \ +im_attrib.cpp \ +im_format.cpp \ +im_format_tga.cpp \ +im_filebuffer.cpp \ +im_bin.cpp \ +im_format_all.cpp \ +im_format_raw.cpp \ +im_binfile.cpp \ +im_format_sgi.cpp \ +im_datatype.cpp \ +im_format_pcx.cpp \ +im_colorhsi.cpp \ +im_format_bmp.cpp \ +im_image.cpp \ +im_rgb2map.cpp \ +im_colormode.cpp \ +im_format_gif.cpp \ +im_lib.cpp \ +im_format_pnm.cpp \ +im_colorutil.cpp \ +im_format_ico.cpp \ +im_palette.cpp \ +im_convertbitmap.cpp \ +im_format_led.cpp \ +im_counter.cpp \ +im_str.cpp \ +im_convertcolor.cpp \ +im_fileraw.cpp \ +im_format_krn.cpp \ +im_file.cpp \ +im_format_ras.cpp \ +old_im.cpp \ +im_sysfile_unix.cpp \ +im_arithmetic_bin.cpp \ +im_morphology_gray.cpp \ +im_quantize.cpp \ +im_arithmetic_un.cpp \ +im_geometric.cpp \ +im_render.cpp \ +im_color.cpp \ +im_histogram.cpp \ +im_resize.cpp \ +im_convolve.cpp \ +im_houghline.cpp \ +im_statistics.cpp \ +im_convolve_rank.cpp \ +im_logic.cpp \ +im_threshold.cpp \ +im_effects.cpp \ +im_morphology_bin.cpp \ +im_tonegamut.cpp \ +im_canny.cpp \ +im_distance.cpp \ +im_analyze.cpp \ +im_kernel.cpp \ +imlua.c \ +imlua_aux.c \ +imlua_convert.c \ +imlua_file.c \ +imlua_image.c \ +imlua_palette.c \ +imlua_util.c \ +imlua_process.c \ +imlua_kernel.c \ + +IM_LIBS = + +CD_SOURCES = \ +cd.c \ +wd.c \ +wdhdcpy.c \ +rgb2map.c \ +cd_vectortext.c \ +cd_active.c \ +cd_attributes.c \ +cd_bitmap.c \ +cd_image.c \ +cd_primitives.c \ +cd_text.c \ +cd_util.c \ +circle.c \ +ellipse.c \ +intcgm1.c \ +intcgm2.c \ +intcgm4.c \ +intcgm6.c \ +list.c \ +sism.c \ +tparse.c \ +bparse.c \ +cddgn.c \ +cdcgm.c \ +cgm.c \ +cddxf.c \ +cdirgb.c \ +cdmf.c \ +cdps.c \ +cdpicture.c \ +cddebug.c \ +cdfontex.c \ +sim.c \ +cd_truetype.c \ +sim_other.c \ +sim_primitives.c \ +sim_linepolyfill.c \ +cd0prn.c \ +cd0emf.c \ +cd0wmf.c \ +cdx11.c \ +cdxclp.c \ +cdximg.c \ +cdxnative.c \ +cdxdbuf.c \ +xvertex.c \ +cdxrender.c \ +cdxrplus.c \ +cdlua5.c \ +cdvoid5.c \ +cdlua5ctx.c \ +cdlua5_active.c \ +cdlua5_canvas.c \ +cdluacontextplus5.c \ +cdluaim5.c \ + +CD_LIBS = + +IUP_SOURCES = \ +iup_array.c \ +iup_callback.c \ +iup_dlglist.c \ +iup_attrib.c \ +iup_focus.c \ +iup_font.c \ +iup_globalattrib.c \ +iup_object.c \ +iup_key.c \ +iup_layout.c \ +iup_ledlex.c \ +iup_names.c \ +iup_open.c \ +iup_ledparse.c \ +iup_predial.c \ +iup_register.c \ +iup_scanf.c \ +iup_show.c \ +iup_str.c \ +iup_table.c \ +iup_func.c \ +iup_childtree.c \ +iup.c \ +iup_classattrib.c \ +iup_dialog.c \ +iup_assert.c \ +iup_canvas.c \ +iup_messagedlg.c \ +iup_timer.c \ +iup_image.c \ +iup_label.c \ +iup_fill.c \ +iup_zbox.c \ +iup_colordlg.c \ +iup_fontdlg.c \ +iup_filedlg.c \ +iup_strmessage.c \ +iup_menu.c \ +iup_frame.c \ +iup_user.c \ +iup_button.c \ +iup_radio.c \ +iup_toggle.c \ +iup_progressbar.c \ +iup_text.c \ +iup_val.c \ +iup_box.c \ +iup_hbox.c \ +iup_vbox.c \ +iup_cbox.c \ +iup_class.c \ +iup_classbase.c \ +iup_maskmatch.c \ +iup_mask.c \ +iup_maskparse.c \ +iup_tabs.c \ +iup_spin.c \ +iup_list.c \ +iup_getparam.c \ +iup_sbox.c \ +iup_normalizer.c \ +iup_tree.c \ +iupmot_common.c \ +iupmot_color.c \ +iupmot_focus.c \ +iupmot_font.c \ +iupmot_key.c \ +iupmot_loop.c \ +iupmot_open.c \ +iupmot_tips.c \ +iupmot_globalattrib.c \ +iupmot_dialog.c \ +iupmot_messagedlg.c \ +iupmot_timer.c \ +iupmot_image.c \ +iupmot_label.c \ +iupmot_canvas.c \ +iupmot_colordlg.c \ +iupmot_fontdlg.c \ +iupmot_filedlg.c \ +iupmot_frame.c \ +iupmot_button.c \ +iupmot_toggle.c \ +iupmot_progressbar.c \ +iupmot_clipboard.c \ +iupmot_text.c \ +iupmot_val.c \ +iupmot_tabs.c \ +iupmot_menu.c \ +iupmot_list.c \ +iupmot_tree.c \ +iupunix_help.c \ +iupunix_info.c \ +iup_array.c \ +iup_callback.c \ +iup_dlglist.c \ +iup_attrib.c \ +iup_focus.c \ +iup_font.c \ +iup_globalattrib.c \ +iup_object.c \ +iup_key.c \ +iup_layout.c \ +iup_ledlex.c \ +iup_names.c \ +iup_open.c \ +iup_ledparse.c \ +iup_predial.c \ +iup_register.c \ +iup_scanf.c \ +iup_show.c \ +iup_str.c \ +iup_table.c \ +iup_func.c \ +iup_childtree.c \ +iup.c \ +iup_classattrib.c \ +iup_dialog.c \ +iup_assert.c \ +iup_canvas.c \ +iup_messagedlg.c \ +iup_timer.c \ +iup_image.c \ +iup_label.c \ +iup_fill.c \ +iup_zbox.c \ +iup_colordlg.c \ +iup_fontdlg.c \ +iup_filedlg.c \ +iup_strmessage.c \ +iup_menu.c \ +iup_frame.c \ +iup_user.c \ +iup_button.c \ +iup_radio.c \ +iup_toggle.c \ +iup_progressbar.c \ +iup_text.c \ +iup_val.c \ +iup_box.c \ +iup_hbox.c \ +iup_vbox.c \ +iup_cbox.c \ +iup_class.c \ +iup_classbase.c \ +iup_maskmatch.c \ +iup_mask.c \ +iup_maskparse.c \ +iup_tabs.c \ +iup_spin.c \ +iup_list.c \ +iup_getparam.c \ +iup_sbox.c \ +iup_normalizer.c \ +iup_tree.c \ +iupgtk_common.c \ +iupgtk_focus.c \ +iupgtk_font.c \ +iupgtk_clipboard.c \ +iupgtk_globalattrib.c \ +iupgtk_key.c \ +iupgtk_tips.c \ +iupgtk_loop.c \ +iupgtk_open.c \ +iupgtk_messagedlg.c \ +iupgtk_dialog.c \ +iupgtk_timer.c \ +iupgtk_image.c \ +iupgtk_label.c \ +iupgtk_colordlg.c \ +iupgtk_fontdlg.c \ +iupgtk_filedlg.c \ +iupgtk_button.c \ +iupgtk_toggle.c \ +iupgtk_progressbar.c \ +iupgtk_text.c \ +iupgtk_val.c \ +iupgtk_frame.c \ +iupgtk_canvas.c \ +iupgtk_tabs.c \ +iupgtk_menu.c \ +iupgtk_list.c \ +iupgtk_tree.c \ +iupgtk_help.c \ +iupunix_info.c \ +iup_cd.c \ +iup_cdutil.c \ +iup_gauge.c \ +iup_cells.c \ +iup_colorbar.c \ +iup_controls.c \ +iup_dial.c \ +iup_oldtabs.c \ +iup_oldval.c \ +iup_oldmask.c \ +iup_colorbrowser.c \ +iup_colorhsi.c \ +iup_colorbrowserdlg.c \ +iupmat_key.c \ +iupmat_mark.c \ +iupmat_aux.c \ +iupmat_mem.c \ +iupmat_mouse.c \ +iupmat_numlc.c \ +iupmat_colres.c \ +iupmat_draw.c \ +iupmat_focus.c \ +iupmat_getset.c \ +iupmatrix.c \ +iupmat_scroll.c \ +iupmat_edit.c \ +iup_glcanvas_x.c \ +iupPPlot.cpp \ +iupPPlotInteraction.cpp \ +iup_pplot.cpp \ +iup_im.c \ +iup_image_library.c \ +ledc.c \ +iuplua.c \ +iuplua_api.c \ +il_tree_aux.c \ +il_scanf.c \ +il_getparam.c \ +il_getcolor.c \ +il_button.c \ +il_canvas.c \ +il_dialog.c \ +il_colordlg.c \ +il_clipboard.c \ +il_filedlg.c \ +il_fill.c \ +il_frame.c \ +il_hbox.c \ +il_normalizer.c \ +il_item.c \ +il_image.c \ +il_imagergb.c \ +il_imagergba.c \ +il_label.c \ +il_menu.c \ +il_multiline.c \ +il_list.c \ +il_separator.c \ +il_user.c \ +il_submenu.c \ +il_text.c \ +il_toggle.c \ +il_vbox.c \ +il_zbox.c \ +il_timer.c \ +il_sbox.c \ +il_spin.c \ +il_spinbox.c \ +il_cbox.c \ +il_messagedlg.c \ +il_radio.c \ +il_val.c \ +il_tabs.c \ +il_fontdlg.c \ +il_tree.c \ +il_progressbar.c \ +iuplua_cd.c \ +iuplua_controls.c \ +il_mask.c \ +il_matrix_aux.c \ +il_dial.c \ +il_gauge.c \ +il_colorbrowser.c \ +il_colorbar.c \ +il_matrix.c \ +il_cells.c \ +iuplua_pplot.c \ +il_pplot.c \ +iuplua_glcanvas.c \ +il_glcanvas.c \ +iuplua_im.c \ +iuplua_imglib.c \ + +IUP_LIBS = + + +WHOLE_SOURCES = \ +$(IM_SOURCES) \ +$(CD_SOURCES) \ +$(IUP_SOURCES) \ + +MODULES_LIST = \ +luaiup.$(SHARED_EXT) \ + +ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES)))) +ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(WHOLE_SOURCES)))) + +all: dep modules + +dist: modules + mkdir -p ../lua-interface-dist + cp $(MODULES_LIST) ../lua-interface-dist + +modules: $(MODULES_LIST) + +dep: $(ALL_DEPS) + +luaiup.$(SHARED_EXT): $(addsuffix .o, $(notdir $(basename $(IM_SOURCES) $(CD_SOURCES) $(IUP_SOURCES)))) + $(LD) $(LDFLAGS) -o $@ $+ $(IM_LIBS) $(CD_LIBS) $(IUP_LIBS) + +clean: + rm -f *.o *.dep *.so *.dylib + +%.dep : %.c + $(CC) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< + +%.dep : %.cpp + $(CXX) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< + +%.dep : %.cc + $(CXX) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< + +%.c : %.clua + bin2c $< $@ $(basename $@) + +%.clua : %.lua + ./luac -o $@ $< + +-include $(ALL_DEPS) + +.PHONY: dist clean diff --git a/Makefile.mingw32 b/Makefile.mingw32 new file mode 100644 index 0000000..f46191a --- /dev/null +++ b/Makefile.mingw32 @@ -0,0 +1,464 @@ +SYSTEM=$(shell uname) +ifeq ($(SYSTEM),Darwin) +CC = i386-mingw32-gcc +CXX = i386-mingw32-g++ +LD = i386-mingw32-g++ +STRIP = i386-mingw32-strip +else +ifeq ($(SYSTEM),MINGW32_NT-5.1) +CC = gcc +CXX = g++ +LD = g++ +strip = strip +else +CC = i586-mingw32msvc-gcc +CXX = i586-mingw32msvc-g++ +LD = i586-mingw32msvc-g++ +STRIP = i586-mingw32msvc-strip +endif +endif + +INCLUDES = \ +-I../Baltisot/include \ +-I../Baltisot/lib/lua/include -I../Baltisot/lib/lua/includes \ +-I ../freetype-win32/include/freetype2 \ +-I ../gnuwin32/include \ +-I ../pthreads-w32-2-8-0-release/ \ + +HAVES = -DHAVE_VSSCANF -DHAVE_LIBJPEG -DHAVE_MALLOC_H -DHAVE_BYTESWAP_H -DCD_NO_OLD_INTERFACE -DGTK_DISABLE_DEPRECATED -D_IUP_PPLOT_ -DIUPLUA_USELOH -DUSE_STATIC -DIUPLUA_IMGLIB + +CPPFLAGS += $(INCLUDES) -g -DSTDC_HEADERS -DREADLINE_STATIC -DHOOK_STDS -DWORDS_LITTLEENDIAN -fexceptions -march=i686 $(HAVES) + +LDFLAGS += -g -fexceptions -shared ../lua-interface/lua-interface.a -Wl,--export-dynamic -Wl,--enable-auto-image-base --export-all-symbols -Wl,--enable-auto-import \ + -L ../freetype-win32/lib -L ../gnuwin32/lib + +vpath %.c ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/win32:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcgl:iup/srcpplot:iup/srcim:iup/srcimglib:iup/srcledc:iup/srclua5 +vpath %.cc ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/win32:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcgl:iup/srcpplot:iup/srcim:iup/srcimglib:iup/srcledc:iup/srclua5 +vpath %.cpp ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:im/src:im/src/process:im/src/lua5:cd/src:cd/src/intcgm:cd/src/drv:cd/src/sim:cd/src/win32:cd/src/lua5:iup/src:iup/src/mot:iup/src/gtk:iup/srccd:iup/srccontrols:iup/srccontrols/color:iup/srccontrols/matrix:iup/srcgl:iup/srcpplot:iup/srcim:iup/srcimglib:iup/srcledc:iup/srclua5 +vpath %.lua ../Baltisot/lib:../Baltisot/src + +IM_SOURCES = \ +old_imcolor.c \ +old_imresize.c \ +im_converttype.cpp \ +im_attrib.cpp \ +im_format.cpp \ +im_format_tga.cpp \ +im_filebuffer.cpp \ +im_bin.cpp \ +im_format_all.cpp \ +im_format_raw.cpp \ +im_binfile.cpp \ +im_format_sgi.cpp \ +im_datatype.cpp \ +im_format_pcx.cpp \ +im_colorhsi.cpp \ +im_format_bmp.cpp \ +im_image.cpp \ +im_rgb2map.cpp \ +im_colormode.cpp \ +im_format_gif.cpp \ +im_lib.cpp \ +im_format_pnm.cpp \ +im_colorutil.cpp \ +im_format_ico.cpp \ +im_palette.cpp \ +im_convertbitmap.cpp \ +im_format_led.cpp \ +im_counter.cpp \ +im_str.cpp \ +im_convertcolor.cpp \ +im_fileraw.cpp \ +im_format_krn.cpp \ +im_file.cpp \ +im_format_ras.cpp \ +old_im.cpp \ +im_sysfile_unix.cpp \ +im_arithmetic_bin.cpp \ +im_morphology_gray.cpp \ +im_quantize.cpp \ +im_arithmetic_un.cpp \ +im_geometric.cpp \ +im_render.cpp \ +im_color.cpp \ +im_histogram.cpp \ +im_resize.cpp \ +im_convolve.cpp \ +im_houghline.cpp \ +im_statistics.cpp \ +im_convolve_rank.cpp \ +im_logic.cpp \ +im_threshold.cpp \ +im_effects.cpp \ +im_morphology_bin.cpp \ +im_tonegamut.cpp \ +im_canny.cpp \ +im_distance.cpp \ +im_analyze.cpp \ +im_kernel.cpp \ +imlua.c \ +imlua_aux.c \ +imlua_convert.c \ +imlua_file.c \ +imlua_image.c \ +imlua_palette.c \ +imlua_util.c \ +imlua_process.c \ +imlua_kernel.c \ + +IM_LIBS = + +CD_SOURCES = \ +cd.c \ +wd.c \ +wdhdcpy.c \ +rgb2map.c \ +cd_vectortext.c \ +cd_active.c \ +cd_attributes.c \ +cd_bitmap.c \ +cd_image.c \ +cd_primitives.c \ +cd_text.c \ +cd_util.c \ +circle.c \ +ellipse.c \ +intcgm1.c \ +intcgm2.c \ +intcgm4.c \ +intcgm6.c \ +list.c \ +sism.c \ +tparse.c \ +bparse.c \ +cddgn.c \ +cdcgm.c \ +cgm.c \ +cddxf.c \ +cdirgb.c \ +cdmf.c \ +cdps.c \ +cdpicture.c \ +cddebug.c \ +cdfontex.c \ +sim.c \ +cd_truetype.c \ +sim_other.c \ +sim_primitives.c \ +sim_linepolyfill.c \ +cd0prn.c \ +cd0emf.c \ +cd0wmf.c \ +cdlua5.c \ +cdvoid5.c \ +cdlua5ctx.c \ +cdlua5_active.c \ +cdlua5_canvas.c \ +cdluacontextplus5.c \ +cdluaim5.c \ +cdwclp.c \ +cdwdbuf.c \ +cdwdib.c \ +cdwemf.c \ +cdwimg.c \ +cdwin.c \ +cdwin.h \ +cdwnative.c \ +cdwprn.c \ +cdwwmf.c \ +wmf_emf.c \ + +CD_LIBS = + +IUP_SOURCES = \ +iup_array.c \ +iup_callback.c \ +iup_dlglist.c \ +iup_attrib.c \ +iup_focus.c \ +iup_font.c \ +iup_globalattrib.c \ +iup_object.c \ +iup_key.c \ +iup_layout.c \ +iup_ledlex.c \ +iup_names.c \ +iup_open.c \ +iup_ledparse.c \ +iup_predial.c \ +iup_register.c \ +iup_scanf.c \ +iup_show.c \ +iup_str.c \ +iup_table.c \ +iup_func.c \ +iup_childtree.c \ +iup.c \ +iup_classattrib.c \ +iup_dialog.c \ +iup_assert.c \ +iup_canvas.c \ +iup_messagedlg.c \ +iup_timer.c \ +iup_image.c \ +iup_label.c \ +iup_fill.c \ +iup_zbox.c \ +iup_colordlg.c \ +iup_fontdlg.c \ +iup_filedlg.c \ +iup_strmessage.c \ +iup_menu.c \ +iup_frame.c \ +iup_user.c \ +iup_button.c \ +iup_radio.c \ +iup_toggle.c \ +iup_progressbar.c \ +iup_text.c \ +iup_val.c \ +iup_box.c \ +iup_hbox.c \ +iup_vbox.c \ +iup_cbox.c \ +iup_class.c \ +iup_classbase.c \ +iup_maskmatch.c \ +iup_mask.c \ +iup_maskparse.c \ +iup_tabs.c \ +iup_spin.c \ +iup_list.c \ +iup_getparam.c \ +iup_sbox.c \ +iup_normalizer.c \ +iup_tree.c \ +iupmot_common.c \ +iupmot_color.c \ +iupmot_focus.c \ +iupmot_font.c \ +iupmot_key.c \ +iupmot_loop.c \ +iupmot_open.c \ +iupmot_tips.c \ +iupmot_globalattrib.c \ +iupmot_dialog.c \ +iupmot_messagedlg.c \ +iupmot_timer.c \ +iupmot_image.c \ +iupmot_label.c \ +iupmot_canvas.c \ +iupmot_colordlg.c \ +iupmot_fontdlg.c \ +iupmot_filedlg.c \ +iupmot_frame.c \ +iupmot_button.c \ +iupmot_toggle.c \ +iupmot_progressbar.c \ +iupmot_clipboard.c \ +iupmot_text.c \ +iupmot_val.c \ +iupmot_tabs.c \ +iupmot_menu.c \ +iupmot_list.c \ +iupmot_tree.c \ +iupunix_help.c \ +iupunix_info.c \ +iup_array.c \ +iup_callback.c \ +iup_dlglist.c \ +iup_attrib.c \ +iup_focus.c \ +iup_font.c \ +iup_globalattrib.c \ +iup_object.c \ +iup_key.c \ +iup_layout.c \ +iup_ledlex.c \ +iup_names.c \ +iup_open.c \ +iup_ledparse.c \ +iup_predial.c \ +iup_register.c \ +iup_scanf.c \ +iup_show.c \ +iup_str.c \ +iup_table.c \ +iup_func.c \ +iup_childtree.c \ +iup.c \ +iup_classattrib.c \ +iup_dialog.c \ +iup_assert.c \ +iup_canvas.c \ +iup_messagedlg.c \ +iup_timer.c \ +iup_image.c \ +iup_label.c \ +iup_fill.c \ +iup_zbox.c \ +iup_colordlg.c \ +iup_fontdlg.c \ +iup_filedlg.c \ +iup_strmessage.c \ +iup_menu.c \ +iup_frame.c \ +iup_user.c \ +iup_button.c \ +iup_radio.c \ +iup_toggle.c \ +iup_progressbar.c \ +iup_text.c \ +iup_val.c \ +iup_box.c \ +iup_hbox.c \ +iup_vbox.c \ +iup_cbox.c \ +iup_class.c \ +iup_classbase.c \ +iup_maskmatch.c \ +iup_mask.c \ +iup_maskparse.c \ +iup_tabs.c \ +iup_spin.c \ +iup_list.c \ +iup_getparam.c \ +iup_sbox.c \ +iup_normalizer.c \ +iup_tree.c \ +iupunix_info.c \ +iup_cd.c \ +iup_cdutil.c \ +iup_gauge.c \ +iup_cells.c \ +iup_colorbar.c \ +iup_controls.c \ +iup_dial.c \ +iup_oldtabs.c \ +iup_oldval.c \ +iup_oldmask.c \ +iup_colorbrowser.c \ +iup_colorhsi.c \ +iup_colorbrowserdlg.c \ +iupmat_key.c \ +iupmat_mark.c \ +iupmat_aux.c \ +iupmat_mem.c \ +iupmat_mouse.c \ +iupmat_numlc.c \ +iupmat_colres.c \ +iupmat_draw.c \ +iupmat_focus.c \ +iupmat_getset.c \ +iupmatrix.c \ +iupmat_scroll.c \ +iupmat_edit.c \ +iup_glcanvas_x.c \ +iupPPlot.cpp \ +iupPPlotInteraction.cpp \ +iup_pplot.cpp \ +iup_im.c \ +iup_image_library.c \ +ledc.c \ +iuplua.c \ +iuplua_api.c \ +il_tree_aux.c \ +il_scanf.c \ +il_getparam.c \ +il_getcolor.c \ +il_button.c \ +il_canvas.c \ +il_dialog.c \ +il_colordlg.c \ +il_clipboard.c \ +il_filedlg.c \ +il_fill.c \ +il_frame.c \ +il_hbox.c \ +il_normalizer.c \ +il_item.c \ +il_image.c \ +il_imagergb.c \ +il_imagergba.c \ +il_label.c \ +il_menu.c \ +il_multiline.c \ +il_list.c \ +il_separator.c \ +il_user.c \ +il_submenu.c \ +il_text.c \ +il_toggle.c \ +il_vbox.c \ +il_zbox.c \ +il_timer.c \ +il_sbox.c \ +il_spin.c \ +il_spinbox.c \ +il_cbox.c \ +il_messagedlg.c \ +il_radio.c \ +il_val.c \ +il_tabs.c \ +il_fontdlg.c \ +il_tree.c \ +il_progressbar.c \ +iuplua_cd.c \ +iuplua_controls.c \ +il_mask.c \ +il_matrix_aux.c \ +il_dial.c \ +il_gauge.c \ +il_colorbrowser.c \ +il_colorbar.c \ +il_matrix.c \ +il_cells.c \ +iuplua_pplot.c \ +il_pplot.c \ +iuplua_glcanvas.c \ +il_glcanvas.c \ +iuplua_im.c \ +iuplua_imglib.c \ + +IUP_LIBS = + + +WHOLE_SOURCES = \ +$(IM_SOURCES) \ +$(CD_SOURCES) \ +$(IUP_SOURCES) \ + +MODULES_LIST = \ +luaiup.dll \ + +ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES)))) +ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(WHOLE_SOURCES)))) + +all: dep modules + +modules: $(MODULES_LIST) + +dep: $(ALL_DEPS) + +luaiup.dll: $(addsuffix .o, $(notdir $(basename $(IM_SOURCES) $(CD_SOURCES) $(IUP_SOURCES)))) + $(LD) -o $@ $+ $(IM_LIBS) $(CD_LIBS) $(IUP_LIBS) $(LDFLAGS) + +clean: + rm -f *.o *.dep *.dll + +%.dep : %.c + $(CC) $(CPPFLAGS) -M -MF $@ $< + +%.dep : %.cpp + $(CXX) $(CPPFLAGS) -M -MF $@ $< + +%.dep : %.cc + $(CXX) $(CPPFLAGS) -M -MF $@ $< + +%.c : %.clua + bin2c $< $@ $(basename $@) + +%.clua : %.lua + ./luac -o $@ $< + +-include $(ALL_DEPS) diff --git a/cd/etc/arial.ttf b/cd/etc/arial.ttf new file mode 100755 index 0000000..28208d2 Binary files /dev/null and b/cd/etc/arial.ttf differ diff --git a/cd/etc/arialbd.ttf b/cd/etc/arialbd.ttf new file mode 100755 index 0000000..8df1f8b Binary files /dev/null and b/cd/etc/arialbd.ttf differ diff --git a/cd/etc/arialbi.ttf b/cd/etc/arialbi.ttf new file mode 100755 index 0000000..3392a59 Binary files /dev/null and b/cd/etc/arialbi.ttf differ diff --git a/cd/etc/ariali.ttf b/cd/etc/ariali.ttf new file mode 100755 index 0000000..e8f8d1c Binary files /dev/null and b/cd/etc/ariali.ttf differ diff --git a/cd/etc/cour.ttf b/cd/etc/cour.ttf new file mode 100755 index 0000000..90c562e Binary files /dev/null and b/cd/etc/cour.ttf differ diff --git a/cd/etc/courbd.ttf b/cd/etc/courbd.ttf new file mode 100755 index 0000000..5d85ada Binary files /dev/null and b/cd/etc/courbd.ttf differ diff --git a/cd/etc/courbi.ttf b/cd/etc/courbi.ttf new file mode 100755 index 0000000..a835451 Binary files /dev/null and b/cd/etc/courbi.ttf differ diff --git a/cd/etc/couri.ttf b/cd/etc/couri.ttf new file mode 100755 index 0000000..ca32ee2 Binary files /dev/null and b/cd/etc/couri.ttf differ diff --git a/cd/etc/seed2d.dgn b/cd/etc/seed2d.dgn new file mode 100755 index 0000000..087f75b Binary files /dev/null and b/cd/etc/seed2d.dgn differ diff --git a/cd/etc/times.ttf b/cd/etc/times.ttf new file mode 100755 index 0000000..4c86f19 Binary files /dev/null and b/cd/etc/times.ttf differ diff --git a/cd/etc/timesbd.ttf b/cd/etc/timesbd.ttf new file mode 100755 index 0000000..4cd03df Binary files /dev/null and b/cd/etc/timesbd.ttf differ diff --git a/cd/etc/timesbi.ttf b/cd/etc/timesbi.ttf new file mode 100755 index 0000000..3eb363f Binary files /dev/null and b/cd/etc/timesbi.ttf differ diff --git a/cd/etc/timesi.ttf b/cd/etc/timesi.ttf new file mode 100755 index 0000000..4c192fe Binary files /dev/null and b/cd/etc/timesi.ttf differ diff --git a/cd/etc/vectorfont00.txt b/cd/etc/vectorfont00.txt new file mode 100755 index 0000000..471c2a2 --- /dev/null +++ b/cd/etc/vectorfont00.txt @@ -0,0 +1,3802 @@ +Simplex II +28 28 14 -7 + + +32 12 6 0 + +33 6 3 7 +m 1 21 +l 1 7 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +34 14 7 16 +m 1 21 +l 0 20 +l 0 14 +m 1 20 +l 0 14 +m 1 21 +l 2 20 +l 0 14 +m 10 21 +l 9 20 +l 9 14 +m 10 20 +l 9 14 +m 10 21 +l 11 20 +l 9 14 + +35 18 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 17 8 38 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 13 18 +l 12 17 +l 13 16 +l 14 17 +l 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 14 7 +m 0 16 +l 2 14 +l 4 13 +l 10 11 +l 12 10 +l 13 9 +l 14 7 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 +l 0 4 +l 1 5 +l 2 4 +l 1 3 + +37 21 10 29 +m 18 21 +l 0 0 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 22 11 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 6 3 7 +m 1 19 +l 0 20 +l 1 21 +l 2 20 +l 2 18 +l 1 16 +l 0 15 + +40 10 5 18 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 +m 5 23 +l 3 19 +l 2 16 +l 1 11 +l 1 7 +l 2 2 +l 3 -1 +l 5 -5 + +41 11 5 18 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 +m 2 23 +l 4 19 +l 5 16 +l 6 11 +l 6 7 +l 5 2 +l 4 -1 +l 2 -5 + +42 13 6 6 +m 5 21 +l 5 9 +m 0 18 +l 10 12 +m 10 18 +l 0 12 + +43 22 11 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 6 3 8 +m 2 1 +l 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +45 22 11 2 +m 0 9 +l 18 9 + +46 6 3 5 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +47 14 7 2 +m 0 -3 +l 14 21 + +48 17 8 17 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 + +49 14 7 4 +m 0 17 +l 2 18 +l 5 21 +l 5 0 + +50 17 8 14 +m 1 16 +l 1 17 +l 2 19 +l 3 20 +l 5 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 10 10 +l 0 0 +l 14 0 + +51 17 8 15 +m 2 21 +l 13 21 +l 7 13 +l 10 13 +l 12 12 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +52 17 8 5 +m 10 21 +l 0 7 +l 15 7 +m 10 21 +l 10 0 + +53 17 8 17 +m 12 21 +l 2 21 +l 1 12 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +54 16 8 23 +m 12 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 7 +l 1 3 +l 3 1 +l 6 0 +l 7 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 7 13 +l 6 13 +l 3 12 +l 1 10 +l 0 7 + +55 17 8 4 +m 14 21 +l 4 0 +m 0 21 +l 14 21 + +56 17 8 29 +m 5 21 +l 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 8 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 7 +l 1 9 +l 3 11 +l 6 12 +l 10 13 +l 12 14 +l 13 16 +l 13 18 +l 12 20 +l 9 21 +l 5 21 + +57 17 8 23 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 7 21 +l 10 20 +l 12 18 +l 13 14 +l 13 9 +l 12 4 +l 10 1 +l 7 0 +l 5 0 +l 2 1 +l 1 3 + +58 6 3 10 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 6 3 13 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 2 1 +l 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 22 11 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 15 7 19 +m 0 16 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 8 21 +l 10 20 +l 11 19 +l 12 17 +l 12 15 +l 11 13 +l 10 12 +l 6 10 +l 6 7 +m 6 2 +l 5 1 +l 6 0 +l 7 1 +l 6 2 + +64 24 12 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 19 9 5 +m 16 0 +l 8 21 +l 0 0 +m 3 7 +l 13 7 + +66 17 8 21 +m 0 21 +l 0 0 +m 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +m 0 11 +l 9 11 +l 12 10 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 0 0 + +67 19 9 18 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 + +68 17 8 14 +m 0 21 +l 0 0 +m 0 21 +l 7 21 +l 10 20 +l 12 18 +l 13 16 +l 14 13 +l 14 8 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 0 0 + +69 15 7 6 +m 13 21 +l 0 21 +l 0 0 +l 13 0 +m 0 11 +l 8 11 + +70 14 7 6 +m 0 21 +l 0 0 +m 0 21 +l 13 21 +m 0 11 +l 8 11 + +71 18 9 21 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 15 8 +m 10 8 +l 15 8 + +72 18 9 6 +m 0 21 +l 0 0 +m 14 21 +l 14 0 +m 0 11 +l 14 11 + +73 4 2 2 +m 0 21 +l 0 0 + +74 14 7 10 +m 10 21 +l 10 5 +l 9 2 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 2 +l 0 5 +l 0 7 + +75 17 8 6 +m 0 21 +l 0 0 +m 14 21 +l 0 7 +m 5 12 +l 14 0 + +76 13 6 4 +m 0 21 +l 0 0 +m 0 0 +l 12 0 + +77 20 10 8 +m 0 21 +l 0 0 +m 0 21 +l 8 0 +m 16 21 +l 8 0 +m 16 21 +l 16 0 + +78 18 9 6 +m 0 21 +l 0 0 +m 0 21 +l 14 0 +m 14 21 +l 14 0 + +79 19 9 21 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +80 17 8 11 +m 0 10 +l 9 10 +l 12 11 +l 13 12 +l 14 14 +l 14 17 +l 13 19 +l 12 20 +l 9 21 +l 0 21 +l 0 0 + +81 19 9 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 9 4 +l 15 -2 + +82 17 8 14 +m 0 21 +l 0 0 +m 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +l 0 11 +m 7 11 +l 14 0 + +83 17 8 20 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +84 15 7 4 +m 7 21 +l 7 0 +m 0 21 +l 14 21 + +85 18 9 10 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 + +86 17 8 4 +m 0 21 +l 8 0 +m 16 21 +l 8 0 + +87 22 11 8 +m 0 21 +l 5 0 +m 10 21 +l 5 0 +m 10 21 +l 15 0 +m 20 21 +l 15 0 + +88 17 8 4 +m 0 21 +l 14 0 +m 14 21 +l 0 0 + +89 17 8 5 +m 0 21 +l 8 11 +l 8 0 +m 16 21 +l 8 11 + +90 17 8 6 +m 14 21 +l 0 0 +m 0 21 +l 14 21 +m 0 0 +l 14 0 + +91 7 3 8 +m 0 19 +l 0 -1 +m 1 19 +l 1 -1 +m 0 19 +l 5 19 +m 0 -1 +l 5 -1 + +92 14 7 2 +m 0 21 +l 14 -3 + +93 8 4 8 +m 4 19 +l 4 -1 +m 5 19 +l 5 -1 +m 0 19 +l 5 19 +m 0 -1 +l 5 -1 + +94 19 9 6 +m 8 18 +l 3 14 +l 8 19 +l 13 14 +l 8 18 +l 8 18 + +95 17 8 2 +m 0 -7 +l 16 -7 + +96 6 3 7 +m 2 21 +l 1 20 +l 0 18 +l 0 16 +l 1 15 +l 2 16 +l 1 17 + +97 16 8 16 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +98 15 7 16 +m 0 21 +l 0 0 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +99 15 7 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +100 16 8 16 +m 12 21 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +101 15 7 17 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +102 10 5 7 +m 8 21 +l 6 21 +l 4 20 +l 3 17 +l 3 0 +m 0 14 +l 7 14 + +103 16 8 21 +m 12 14 +l 12 -2 +l 11 -5 +l 10 -6 +l 8 -7 +l 5 -7 +l 3 -6 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +104 15 7 9 +m 0 21 +l 0 0 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +105 7 3 7 +m 2 21 +l 3 20 +l 4 21 +l 3 22 +l 2 21 +m 3 14 +l 3 0 + +106 9 4 10 +m 4 21 +l 5 20 +l 6 21 +l 5 22 +l 4 21 +m 5 14 +l 5 -3 +l 4 -6 +l 2 -7 +l 0 -7 + +107 13 6 6 +m 0 21 +l 0 0 +m 10 14 +l 0 4 +m 4 8 +l 11 0 + +108 4 2 2 +m 0 21 +l 0 0 + +109 26 13 16 +m 0 14 +l 0 0 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 +m 11 10 +l 14 13 +l 16 14 +l 19 14 +l 21 13 +l 22 10 +l 22 0 + +110 15 7 9 +m 0 14 +l 0 0 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +111 16 8 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +112 15 7 16 +m 0 14 +l 0 -7 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +113 16 8 16 +m 12 14 +l 12 -7 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +114 9 4 7 +m 0 14 +l 0 0 +m 0 8 +l 1 11 +l 3 13 +l 5 14 +l 8 14 + +115 14 7 17 +m 11 11 +l 10 13 +l 7 14 +l 4 14 +l 1 13 +l 0 11 +l 1 9 +l 3 8 +l 8 7 +l 10 6 +l 11 4 +l 11 3 +l 10 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 + +116 10 5 7 +m 3 21 +l 3 4 +l 4 1 +l 6 0 +l 8 0 +m 0 14 +l 7 14 + +117 15 7 9 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +118 14 7 4 +m 0 14 +l 6 0 +m 12 14 +l 6 0 + +119 19 9 8 +m 0 14 +l 4 0 +m 8 14 +l 4 0 +m 8 14 +l 12 0 +m 16 14 +l 12 0 + +120 14 7 4 +m 0 14 +l 11 0 +m 11 14 +l 0 0 + +121 15 7 8 +m 1 14 +l 7 0 +m 13 14 +l 7 0 +l 5 -4 +l 3 -6 +l 1 -7 +l 0 -7 + +122 14 7 6 +m 11 14 +l 0 0 +m 0 14 +l 11 14 +m 0 0 +l 11 0 + +123 10 5 37 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +m 3 24 +l 2 22 +l 2 20 +l 3 18 +l 4 17 +l 5 15 +l 5 13 +l 4 11 +l 0 9 +l 4 7 +l 5 5 +l 5 3 +l 4 1 +l 3 0 +l 2 -2 +l 2 -4 +l 3 -6 +m 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 4 2 2 +m 0 21 +l 0 0 + +125 9 4 37 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +m 2 24 +l 3 22 +l 3 20 +l 2 18 +l 1 17 +l 0 15 +l 0 13 +l 1 11 +l 5 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 2 0 +l 3 -2 +l 3 -4 +l 2 -6 +m 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 14 7 4 +m 0 16 +l 5 19 +l 9 16 +l 13 18 + +127 16 8 8 +m 0 7 +l 0 0 +l 12 0 +l 12 7 +l 6 16 +l 0 7 +m 6 6 +l 6 6 + +128 18 9 30 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +m 8 0 +l 8 -1 +l 7 -1 +l 7 0 +m 3 -4 +l 3 -6 +l 4 -7 +l 10 -7 +l 12 -5 +l 12 -4 +l 10 -2 +l 8 -1 + +129 15 7 19 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 +m 2 19 +l 1 18 +l 2 17 +l 3 18 +l 2 19 +m 10 19 +l 9 18 +l 10 17 +l 11 18 +l 10 19 + +130 15 7 24 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 22 +l 9 21 +l 8 22 +l 9 23 +l 10 22 +l 10 20 +l 5 17 + +131 18 9 21 +m 13 14 +l 13 0 +m 13 11 +l 11 13 +l 9 14 +l 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +l 9 0 +l 11 1 +l 13 3 +m 3 16 +l 8 21 +l 13 16 +l 8 20 +l 3 16 + +132 16 8 26 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 2 19 +l 1 18 +l 2 17 +l 3 18 +l 2 19 +m 10 19 +l 9 18 +l 10 17 +l 11 18 +l 10 19 + +133 16 8 23 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 22 +l 4 21 +l 5 22 +l 4 23 +l 3 22 +l 3 20 +l 8 17 + +134 16 8 23 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 5 19 +l 4 18 +l 5 17 +l 7 17 +l 8 18 +l 7 19 +l 5 19 + +135 15 7 21 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 6 0 +l 6 -1 +l 9 -2 +l 10 -5 +l 8 -7 +l 4 -7 +l 3 -5 + +136 18 9 22 +m 2 8 +l 14 8 +l 14 10 +l 13 12 +l 12 13 +l 10 14 +l 7 14 +l 5 13 +l 3 11 +l 2 8 +l 2 6 +l 3 3 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 14 3 +m 4 16 +l 9 21 +l 14 16 +l 9 20 +l 4 16 + +137 15 7 27 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 19 +l 2 18 +l 3 17 +l 4 18 +l 3 19 +m 11 19 +l 10 18 +l 11 17 +l 12 18 +l 11 19 + +138 15 7 24 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 2 22 +l 3 21 +l 4 22 +l 3 23 +l 2 22 +l 2 20 +l 7 17 + +139 12 6 12 +m 5 14 +l 5 0 +m 1 19 +l 0 18 +l 1 17 +l 2 18 +l 1 19 +m 9 19 +l 8 18 +l 9 17 +l 10 18 +l 9 19 + +140 16 8 7 +m 8 14 +l 8 0 +m 3 16 +l 8 21 +l 13 16 +l 8 20 +l 3 16 + +141 7 3 9 +m 5 14 +l 5 0 +m 0 22 +l 1 21 +l 2 22 +l 1 23 +l 0 22 +l 0 20 +l 5 17 + +142 17 8 15 +m 16 0 +l 8 21 +l 0 0 +m 3 7 +l 13 7 +m 4 25 +l 3 24 +l 4 23 +l 5 24 +l 4 25 +m 12 25 +l 11 24 +l 12 23 +l 13 24 +l 12 25 + +143 17 8 12 +m 16 0 +l 8 21 +l 0 0 +m 3 7 +l 13 7 +m 7 26 +l 6 25 +l 7 24 +l 9 24 +l 10 25 +l 9 26 +l 7 26 + +144 15 7 13 +m 13 21 +l 0 21 +l 0 0 +l 13 0 +m 0 11 +l 8 11 +m 10 27 +l 9 26 +l 8 27 +l 9 28 +l 10 27 +l 10 25 +l 5 22 + +145 28 14 33 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 17 14 +l 20 14 +l 22 13 +l 23 12 +l 24 10 +l 24 8 +l 12 8 +l 13 11 +l 15 13 +l 17 14 +m 12 6 +l 13 3 +l 15 1 +l 17 0 +l 20 0 +l 22 1 +l 24 3 + +146 26 13 10 +m 23 21 +l 8 21 +l 0 0 +m 10 21 +l 10 0 +l 23 0 +m 10 11 +l 18 11 +m 3 7 +l 10 7 + +147 16 8 22 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +l 9 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 9 14 +l 6 14 +m 3 16 +l 8 21 +l 13 16 +l 8 20 +l 3 16 + +148 16 8 27 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 3 19 +l 2 18 +l 3 17 +l 4 18 +l 3 19 +m 11 19 +l 10 18 +l 11 17 +l 12 18 +l 11 19 + +149 16 8 24 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 2 22 +l 3 21 +l 4 22 +l 3 23 +l 2 22 +l 2 20 +l 7 17 + +150 17 8 14 +m 2 14 +l 2 4 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 13 4 +m 13 14 +l 13 0 +m 3 16 +l 8 21 +l 13 16 +l 8 20 +l 3 16 + +151 15 7 16 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 +m 1 22 +l 2 21 +l 3 22 +l 2 23 +l 1 22 +l 1 20 +l 6 17 + +152 15 7 18 +m 1 14 +l 7 0 +l 5 -4 +l 3 -6 +l 1 -7 +l 0 -7 +m 13 14 +l 7 0 +m 3 19 +l 2 18 +l 3 17 +l 4 18 +l 3 19 +m 11 19 +l 10 18 +l 11 17 +l 12 18 +l 11 19 + +153 19 9 31 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 4 26 +l 3 25 +l 4 24 +l 5 25 +l 4 26 +m 12 26 +l 11 25 +l 12 24 +l 13 25 +l 12 26 + +154 18 9 20 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 3 26 +l 2 25 +l 3 24 +l 4 25 +l 3 26 +m 11 26 +l 10 25 +l 11 24 +l 12 25 +l 11 26 + +155 15 7 16 +m 12 15 +l 10 17 +l 8 18 +l 5 18 +l 3 17 +l 1 15 +l 0 12 +l 0 10 +l 1 7 +l 3 5 +l 5 4 +l 8 4 +l 10 5 +l 12 7 +m 6 0 +l 6 22 + +156 21 10 12 +m 13 20 +l 10 21 +l 8 21 +l 5 20 +l 4 19 +l 3 16 +l 3 0 +l 12 0 +l 15 1 +l 15 2 +m 0 12 +l 7 12 + +157 17 8 9 +m 0 21 +l 8 11 +l 8 0 +m 16 21 +l 8 11 +m 4 11 +l 13 11 +m 4 8 +l 13 8 + +158 21 10 18 +m 0 10 +l 9 10 +l 12 11 +l 13 12 +l 14 14 +l 14 17 +l 13 19 +l 12 20 +l 9 21 +l 0 21 +l 0 0 +m 12 8 +l 18 8 +m 15 12 +l 15 2 +l 16 0 +l 18 0 +l 19 1 + +159 22 11 14 +m 1 -4 +l 3 -5 +l 6 -5 +l 8 -4 +l 10 -1 +l 10 15 +m 6 8 +l 14 8 +m 10 1 +l 10 17 +l 12 20 +l 14 21 +l 17 21 +l 19 20 + +160 16 8 23 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 22 +l 9 21 +l 8 22 +l 9 23 +l 10 22 +l 10 20 +l 5 17 + +161 7 3 9 +m 3 14 +l 3 0 +m 7 22 +l 6 21 +l 5 22 +l 6 23 +l 7 22 +l 7 20 +l 2 17 + +162 16 8 24 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 11 22 +l 10 21 +l 9 22 +l 10 23 +l 11 22 +l 11 20 +l 6 17 + +163 15 7 16 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 +m 9 22 +l 8 21 +l 7 22 +l 8 23 +l 9 22 +l 9 20 +l 4 17 + +164 17 8 13 +m 0 14 +l 0 0 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 +m 0 17 +l 5 20 +l 9 17 +l 13 19 + +165 18 9 8 +m 14 21 +l 14 0 +l 0 21 +l 0 0 +m 0 24 +l 5 27 +l 9 24 +l 13 26 + +166 16 8 18 +m 12 21 +l 12 7 +m 12 18 +l 10 20 +l 8 21 +l 5 21 +l 3 20 +l 1 18 +l 0 15 +l 0 13 +l 1 10 +l 3 8 +l 5 7 +l 8 7 +l 10 8 +l 12 10 +m 0 0 +l 12 0 + +167 16 8 17 +m 0 15 +l 1 12 +l 3 10 +l 5 9 +l 8 9 +l 10 10 +l 12 12 +l 13 15 +l 12 18 +l 10 20 +l 8 21 +l 5 21 +l 3 20 +l 1 18 +l 0 15 +m 0 0 +l 13 0 + +168 15 7 19 +m 12 5 +l 12 4 +l 11 2 +l 10 1 +l 8 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 1 8 +l 2 9 +l 6 11 +l 6 14 +m 6 19 +l 7 20 +l 6 21 +l 5 20 +l 6 19 + +169 16 8 7 +m 0 0 +l 0 8 +l 12 8 +l 12 5 +l 3 5 +l 3 0 +l 0 0 + +170 16 8 7 +m 12 0 +l 12 8 +l 0 8 +l 0 5 +l 9 5 +l 9 0 +l 12 0 + +171 19 9 15 +m 0 18 +l 3 21 +l 4 21 +l 4 12 +m 9 6 +l 9 7 +l 11 9 +l 15 9 +l 16 7 +l 16 5 +l 15 4 +l 9 0 +l 16 0 +m 15 21 +l 1 0 + +172 19 9 10 +m 0 18 +l 3 21 +l 4 21 +l 4 12 +m 15 21 +l 1 0 +m 15 3 +l 7 3 +l 13 9 +l 13 0 + +173 6 3 7 +m 1 0 +l 1 14 +m 1 19 +l 0 20 +l 1 21 +l 2 20 +l 1 19 + +174 19 9 6 +m 7 17 +l 0 11 +l 7 5 +m 15 17 +l 8 11 +l 15 5 + +175 19 9 6 +m 8 17 +l 15 11 +l 8 5 +m 0 17 +l 7 11 +l 0 5 + +176 14 7 126 +m 4 21 +l 6 21 +l 6 19 +l 4 19 +l 4 21 +m 5 21 +l 5 19 +m 4 15 +l 6 15 +l 6 13 +l 4 13 +l 4 15 +m 5 15 +l 5 13 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 4 3 +l 6 3 +l 6 1 +l 4 1 +l 4 3 +m 5 3 +l 5 1 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 12 15 +l 14 15 +l 14 13 +l 12 13 +l 12 15 +m 13 15 +l 13 13 +m 12 9 +l 14 9 +l 14 7 +l 12 7 +l 12 9 +m 13 9 +l 13 7 +m 12 3 +l 14 3 +l 14 1 +l 12 1 +l 12 3 +m 13 3 +l 13 1 +m 3 -3 +l 3 -5 +l 5 -5 +l 5 -3 +l 3 -3 +m 4 -3 +l 4 -5 +m 12 -3 +l 12 -5 +l 14 -5 +l 14 -3 +l 12 -3 +m 13 -3 +l 13 -5 + +177 16 8 252 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 2 15 +l 4 15 +l 4 13 +l 2 13 +l 2 15 +m 3 15 +l 3 13 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 2 3 +l 4 3 +l 4 1 +l 2 1 +l 2 3 +m 3 3 +l 3 1 +m 4 18 +l 6 18 +l 6 16 +l 4 16 +l 4 18 +m 5 18 +l 5 16 +m 4 12 +l 6 12 +l 6 10 +l 4 10 +l 4 12 +m 5 12 +l 5 10 +m 4 6 +l 6 6 +l 6 4 +l 4 4 +l 4 6 +m 5 6 +l 5 4 +m 4 0 +l 6 0 +l 6 -2 +l 4 -2 +l 4 0 +m 5 0 +l 5 -2 +m 6 21 +l 8 21 +l 8 19 +l 6 19 +l 6 21 +m 7 21 +l 7 19 +m 6 15 +l 8 15 +l 8 13 +l 6 13 +l 6 15 +m 7 15 +l 7 13 +m 6 9 +l 8 9 +l 8 7 +l 6 7 +l 6 9 +m 7 9 +l 7 7 +m 6 3 +l 8 3 +l 8 1 +l 6 1 +l 6 3 +m 7 3 +l 7 1 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 10 15 +l 12 15 +l 12 13 +l 10 13 +l 10 15 +m 11 15 +l 11 13 +m 10 9 +l 12 9 +l 12 7 +l 10 7 +l 10 9 +m 11 9 +l 11 7 +m 10 3 +l 12 3 +l 12 1 +l 10 1 +l 10 3 +m 11 3 +l 11 1 +m 12 18 +l 14 18 +l 14 16 +l 12 16 +l 12 18 +m 13 18 +l 13 16 +m 12 12 +l 14 12 +l 14 10 +l 12 10 +l 12 12 +m 13 12 +l 13 10 +m 12 6 +l 14 6 +l 14 4 +l 12 4 +l 12 6 +m 13 6 +l 13 4 +m 12 0 +l 14 0 +l 14 -2 +l 12 -2 +l 12 0 +m 13 0 +l 13 -2 +m 14 21 +l 16 21 +l 16 19 +l 14 19 +l 14 21 +m 15 21 +l 15 19 +m 14 15 +l 16 15 +l 16 13 +l 14 13 +l 14 15 +m 15 15 +l 15 13 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 14 3 +l 16 3 +l 16 1 +l 14 1 +l 14 3 +m 15 3 +l 15 1 +m 2 -3 +l 2 -5 +l 4 -5 +l 4 -3 +l 2 -3 +m 3 -3 +l 3 -5 +m 6 -3 +l 6 -5 +l 8 -5 +l 8 -3 +l 6 -3 +m 7 -3 +l 7 -5 +m 10 -3 +l 10 -5 +l 12 -5 +l 12 -3 +l 10 -3 +m 11 -3 +l 11 -5 +m 14 -3 +l 14 -5 +l 16 -5 +l 16 -3 +l 14 -3 +m 15 -3 +l 15 -5 + +178 24 12 276 +m 0 21 +l 2 21 +l 2 19 +l 0 19 +l 0 21 +m 1 21 +l 1 19 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 20 21 +l 22 21 +l 22 19 +l 20 19 +l 20 21 +m 21 21 +l 21 19 +m 22 21 +l 24 21 +l 24 19 +l 22 19 +l 22 21 +m 23 21 +l 23 19 +m 4 17 +l 6 17 +l 6 15 +l 4 15 +l 4 17 +m 5 17 +l 5 15 +m 6 17 +l 8 17 +l 8 15 +l 6 15 +l 6 17 +m 7 17 +l 7 15 +m 8 17 +l 10 17 +l 10 15 +l 8 15 +l 8 17 +m 9 17 +l 9 15 +m 0 13 +l 2 13 +l 2 11 +l 0 11 +l 0 13 +m 1 13 +l 1 11 +m 2 13 +l 4 13 +l 4 11 +l 2 11 +l 2 13 +m 3 13 +l 3 11 +m 10 13 +l 12 13 +l 12 11 +l 10 11 +l 10 13 +m 11 13 +l 11 11 +m 12 13 +l 14 13 +l 14 11 +l 12 11 +l 12 13 +m 13 13 +l 13 11 +m 20 13 +l 22 13 +l 22 11 +l 20 11 +l 20 13 +m 21 13 +l 21 11 +m 22 13 +l 24 13 +l 24 11 +l 22 11 +l 22 13 +m 23 13 +l 23 11 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 16 9 +l 18 9 +l 18 7 +l 16 7 +l 16 9 +m 17 9 +l 17 7 +m 18 9 +l 20 9 +l 20 7 +l 18 7 +l 18 9 +m 19 9 +l 19 7 +m 0 5 +l 2 5 +l 2 3 +l 0 3 +l 0 5 +m 1 5 +l 1 3 +m 2 5 +l 4 5 +l 4 3 +l 2 3 +l 2 5 +m 3 5 +l 3 3 +m 10 5 +l 12 5 +l 12 3 +l 10 3 +l 10 5 +m 11 5 +l 11 3 +m 12 5 +l 14 5 +l 14 3 +l 12 3 +l 12 5 +m 13 5 +l 13 3 +m 20 5 +l 22 5 +l 22 3 +l 20 3 +l 20 5 +m 21 5 +l 21 3 +m 22 5 +l 24 5 +l 24 3 +l 22 3 +l 22 5 +m 23 5 +l 23 3 +m 4 1 +l 10 1 +l 10 -1 +l 4 -1 +l 4 1 +m 5 1 +l 5 -1 +m 7 1 +l 7 -1 +m 9 1 +l 9 -1 +m 0 -3 +l 2 -3 +l 2 -5 +l 0 -5 +l 0 -3 +m 1 -3 +l 1 -5 +m 2 -3 +l 4 -3 +l 4 -5 +l 2 -5 +l 2 -3 +m 3 -3 +l 3 -5 +m 10 -3 +l 14 -3 +l 14 -5 +l 10 -5 +l 10 -3 +m 11 -3 +l 11 -5 +m 13 -3 +l 13 -5 +m 20 -3 +l 24 -3 +l 24 -5 +l 20 -5 +l 20 -3 +m 21 -3 +l 21 -5 +m 23 -3 +l 23 -5 +m 8 1 +l 8 -1 +m 6 1 +l 6 -1 +m 12 -3 +l 12 -5 +m 22 -3 +l 22 -5 +m 18 17 +l 20 17 +l 20 15 +l 18 15 +l 18 17 +m 19 17 +l 19 15 +m 20 17 +l 22 17 +l 22 15 +l 20 15 +l 20 17 +m 21 17 +l 21 15 +m 22 17 +l 24 17 +l 24 15 +l 22 15 +l 22 17 +m 23 17 +l 23 15 +m 0 9 +l 2 9 +l 2 7 +l 0 7 +l 0 9 +m 1 9 +l 1 7 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 18 1 +l 24 1 +l 24 -1 +l 18 -1 +l 18 1 +m 19 1 +l 19 -1 +m 21 1 +l 21 -1 +m 23 1 +l 23 -1 +m 20 1 +l 20 -1 +m 22 1 +l 22 -1 + +179 5 2 2 +m 0 21 +l 0 -7 + +180 13 6 4 +m 8 21 +l 8 -7 +m 0 5 +l 8 5 + +181 13 6 6 +m 8 -7 +l 8 21 +m 0 9 +l 8 9 +m 0 5 +l 8 5 + +182 21 10 6 +m 8 21 +l 8 -7 +m 0 5 +l 8 5 +m 16 21 +l 16 -7 + +183 21 10 5 +m 0 5 +l 16 5 +l 16 -7 +m 8 5 +l 8 -7 + +184 13 6 5 +m 0 9 +l 8 9 +l 8 -7 +m 0 5 +l 8 5 + +185 21 10 10 +m 0 5 +l 8 5 +l 8 -7 +m 16 21 +l 16 -7 +m 0 9 +l 8 9 +l 8 21 +m 0 1 +l 0 1 + +186 20 10 4 +m 8 21 +l 8 -7 +m 16 21 +l 16 -7 + +187 21 10 6 +m 0 9 +l 16 9 +l 16 -7 +m 0 5 +l 8 5 +l 8 -7 + +188 21 10 6 +m 0 5 +l 16 5 +l 16 21 +m 0 9 +l 8 9 +l 8 21 + +189 21 10 5 +m 0 9 +l 16 9 +l 16 21 +m 8 9 +l 8 21 + +190 13 6 5 +m 0 5 +l 8 5 +l 8 21 +m 0 9 +l 8 9 + +191 0 0 3 +m 0 5 +l 8 5 +l 8 -7 + +192 8 4 3 +m 8 9 +l 0 9 +l 0 21 + +193 16 8 5 +m 0 9 +l 8 9 +l 8 21 +m 16 9 +l 8 9 + +194 16 8 5 +m 0 5 +l 8 5 +l 8 -7 +m 16 5 +l 8 5 + +195 8 4 4 +m 0 21 +l 0 -7 +m 8 5 +l 0 5 + +196 16 8 2 +m 0 5 +l 16 5 + +197 16 8 4 +m 8 21 +l 8 -7 +m 0 5 +l 16 5 + +198 8 4 6 +m 0 -7 +l 0 21 +m 8 9 +l 0 9 +m 8 5 +l 0 5 + +199 16 8 6 +m 8 21 +l 8 -7 +m 16 5 +l 8 5 +m 0 21 +l 0 -7 + +200 16 8 6 +m 16 5 +l 0 5 +l 0 21 +m 16 9 +l 8 9 +l 8 21 + +201 16 8 6 +m 16 9 +l 0 9 +l 0 -7 +m 16 5 +l 8 5 +l 8 -7 + +202 24 12 8 +m 0 5 +l 24 5 +m 0 9 +l 8 9 +l 8 21 +m 16 21 +l 16 9 +l 24 9 + +203 24 12 8 +m 0 9 +l 24 9 +m 0 5 +l 8 5 +l 8 -7 +m 16 -7 +l 16 5 +l 24 5 + +204 16 8 8 +m 16 5 +l 8 5 +l 8 -7 +m 0 21 +l 0 -7 +m 16 9 +l 8 9 +l 8 21 + +205 16 8 4 +m 0 9 +l 16 9 +m 0 5 +l 16 5 + +206 24 12 12 +m 0 5 +l 8 5 +l 8 -7 +m 0 9 +l 8 9 +l 8 21 +m 16 21 +l 16 9 +l 24 9 +m 16 -7 +l 16 5 +l 24 5 + +207 16 8 7 +m 0 9 +l 8 9 +l 8 21 +m 16 9 +l 8 9 +m 0 5 +l 16 5 + +208 16 8 6 +m 0 9 +l 16 9 +m 6 21 +l 6 9 +m 14 21 +l 14 9 + +209 16 8 7 +m 0 5 +l 8 5 +l 8 -7 +m 16 5 +l 8 5 +m 0 9 +l 16 9 + +210 16 8 6 +m 0 5 +l 16 5 +m 6 -7 +l 6 5 +m 14 -7 +l 14 5 + +211 16 8 5 +m 16 9 +l 0 9 +l 0 21 +m 8 9 +l 8 21 + +212 8 4 5 +m 8 5 +l 0 5 +l 0 21 +m 8 9 +l 0 9 + +213 8 4 5 +m 8 9 +l 0 9 +l 0 -7 +m 8 5 +l 0 5 + +214 16 8 5 +m 16 5 +l 0 5 +l 0 -7 +m 8 5 +l 8 -7 + +215 24 12 6 +m 8 21 +l 8 -7 +m 0 5 +l 24 5 +m 16 21 +l 16 -7 + +216 16 8 6 +m 8 21 +l 8 -7 +m 0 5 +l 16 5 +m 0 9 +l 16 9 + +217 13 6 3 +m 0 9 +l 8 9 +l 8 21 + +218 8 4 3 +m 8 5 +l 0 5 +l 0 -7 + +219 16 8 39 +m 16 0 +l 0 0 +l 0 21 +l 15 21 +l 15 0 +l 16 0 +l 16 21 +l 15 21 +l 15 0 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 21 +l 14 0 +m 0 11 +l 16 11 + +220 16 8 35 +m 16 0 +l 0 0 +l 0 11 +l 16 11 +l 16 0 +l 15 0 +l 15 11 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 11 +l 6 0 +m 7 11 +l 7 0 +m 8 11 +l 8 0 +m 9 11 +l 9 0 +m 10 11 +l 10 0 +m 11 11 +l 11 0 +m 12 11 +l 12 0 +m 13 11 +l 13 0 +m 14 11 +l 14 0 + +221 8 4 19 +m 0 0 +l 0 21 +l 8 21 +l 8 0 +l 0 0 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 7 21 +l 7 0 + +222 17 8 18 +m 9 0 +l 9 21 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 16 21 +l 16 0 +m 17 21 +l 17 0 + +223 16 8 35 +m 16 10 +l 0 10 +l 0 21 +l 16 21 +l 16 10 +l 15 10 +l 15 21 +m 1 21 +l 1 10 +m 2 21 +l 2 10 +m 3 21 +l 3 10 +m 4 21 +l 4 10 +m 5 21 +l 5 10 +m 6 21 +l 6 10 +m 7 21 +l 7 10 +m 8 21 +l 8 10 +m 9 21 +l 9 10 +m 10 21 +l 10 10 +m 11 21 +l 11 10 +m 12 21 +l 12 10 +m 13 21 +l 13 10 +m 14 21 +l 14 10 + +224 22 11 15 +m 18 0 +l 12 9 +l 10 11 +l 8 12 +l 5 12 +l 3 11 +l 1 9 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 18 12 + +225 18 9 13 +m 0 1 +l 10 1 +l 13 3 +l 13 7 +l 9 9 +l 13 11 +l 13 14 +l 10 16 +l 3 16 +l 0 14 +l 0 -3 +m 9 9 +l 0 9 + +226 14 7 4 +m 0 0 +l 0 14 +l 9 14 +l 9 11 + +227 18 9 6 +m 3 13 +l 3 0 +m 11 13 +l 11 0 +m 0 13 +l 13 13 + +228 18 9 7 +m 13 2 +l 13 0 +l 0 0 +l 8 11 +l 0 21 +l 13 21 +l 13 19 + +229 24 12 18 +m 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 12 9 +l 10 11 +l 8 12 +l 5 12 +l 3 11 +l 1 9 +l 0 6 +m 5 12 +l 9 14 +l 20 14 + +230 18 9 12 +m 2 14 +l 2 4 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 13 4 +m 13 14 +l 13 0 +m 3 1 +l 3 -3 +l 0 -6 + +231 18 9 10 +m 0 9 +l 0 11 +l 1 13 +l 3 14 +l 6 14 +l 8 12 +l 8 -2 +m 8 9 +l 11 11 +l 14 14 + +232 18 9 27 +m 0 9 +l 1 6 +l 3 4 +l 5 3 +l 8 3 +l 10 4 +l 12 6 +l 13 9 +l 12 12 +l 10 14 +l 8 15 +l 5 15 +l 3 14 +l 1 12 +l 0 9 +m 6 21 +l 6 15 +m 7 21 +l 7 15 +m 0 21 +l 13 21 +m 6 -3 +l 6 3 +m 7 -3 +l 7 3 +m 0 -3 +l 13 -3 + +233 21 10 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 0 10 +l 16 10 + +234 21 10 20 +m 16 0 +l 11 0 +l 11 6 +l 14 7 +l 16 9 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 9 +l 2 7 +l 5 6 +l 5 0 +l 0 0 + +235 18 9 19 +m 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 12 9 +l 10 11 +l 8 12 +l 5 12 +l 3 11 +l 1 9 +l 0 6 +m 10 11 +l 0 21 +l 13 21 +l 13 18 + +236 29 14 30 +m 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 12 9 +l 10 11 +l 8 12 +l 5 12 +l 3 11 +l 1 9 +l 0 6 +m 12 6 +l 13 3 +l 15 1 +l 17 0 +l 20 0 +l 22 1 +l 24 3 +l 25 6 +l 24 9 +l 22 11 +l 20 12 +l 17 12 +l 15 11 +l 13 9 +l 12 6 + +237 19 9 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 8 -4 +l 8 24 + +238 17 8 9 +m 13 21 +l 3 21 +l 0 19 +l 0 11 +l 8 11 +m 0 11 +l 0 2 +l 3 0 +l 13 0 + +239 19 9 10 +m 0 0 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 8 21 +l 11 20 +l 13 18 +l 14 15 +l 14 0 + +240 23 11 6 +m 0 9 +l 18 9 +m 0 5 +l 18 5 +m 0 13 +l 18 13 + +241 23 11 6 +m 0 0 +l 18 0 +m 9 21 +l 9 3 +m 0 12 +l 18 12 + +242 23 11 5 +m 0 0 +l 18 0 +m 0 21 +l 18 12 +l 0 3 + +243 24 12 5 +m 18 0 +l 0 0 +m 18 21 +l 0 12 +l 18 3 + +244 13 6 7 +m 10 20 +l 7 21 +l 5 21 +l 2 20 +l 1 19 +l 0 16 +l 0 -7 + +245 14 7 7 +m 0 -6 +l 3 -7 +l 5 -7 +l 8 -6 +l 9 -5 +l 10 -2 +l 10 21 + +246 23 11 12 +m 9 20 +l 8 19 +l 9 18 +l 10 19 +l 9 20 +m 9 3 +l 8 2 +l 9 1 +l 10 2 +l 9 3 +m 0 10 +l 18 10 + +247 18 9 8 +m 0 11 +l 5 14 +l 9 11 +l 13 13 +m 0 6 +l 5 9 +l 9 6 +l 13 8 + +248 18 9 17 +m 0 15 +l 1 12 +l 3 10 +l 5 9 +l 8 9 +l 10 10 +l 12 12 +l 13 15 +l 12 18 +l 10 20 +l 8 21 +l 5 21 +l 3 20 +l 1 18 +l 0 15 +m -1 1 +l -1 1 + +249 7 3 9 +m 0 4 +l 3 4 +l 3 0 +l 0 0 +l 0 4 +m 1 4 +l 1 0 +m 2 4 +l 2 0 + +250 7 3 10 +m 0 2 +l 3 2 +l 3 0 +l 0 0 +l 0 2 +l 3 1 +m 1 2 +l 1 0 +m 2 2 +l 2 0 + +251 18 9 5 +m 16 18 +l 16 21 +l 8 21 +l 8 0 +l 0 10 + +252 15 7 9 +m 0 21 +l 0 10 +m 0 17 +l 3 20 +l 5 21 +l 8 21 +l 10 20 +l 11 17 +l 11 10 + +253 11 5 9 +m 1 19 +l 1 20 +l 2 21 +l 6 21 +l 7 20 +l 7 19 +l 6 18 +l 0 15 +l 7 15 + +254 13 6 19 +m 0 0 +l 0 11 +l 8 11 +l 8 0 +l 0 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 11 +l 6 0 +m 7 11 +l 7 0 diff --git a/cd/etc/vectorfont01.txt b/cd/etc/vectorfont01.txt new file mode 100755 index 0000000..3992b0e --- /dev/null +++ b/cd/etc/vectorfont01.txt @@ -0,0 +1,2879 @@ +Complex monoespacado +25 21 9 -7 + + +0 30 14 42 +m 17 18 +l 16 17 +l 17 16 +l 18 17 +l 18 18 +l 17 20 +l 15 21 +l 13 21 +l 11 20 +l 10 18 +l 10 16 +l 11 14 +l 13 12 +l 18 9 +m 11 14 +l 16 11 +l 18 9 +l 19 7 +l 19 5 +l 18 3 +l 16 1 +m 12 13 +l 10 11 +l 9 9 +l 9 7 +l 10 5 +l 12 3 +l 17 0 +m 10 5 +l 15 2 +l 17 0 +l 18 -2 +l 18 -4 +l 17 -6 +l 15 -7 +l 13 -7 +l 11 -6 +l 10 -4 +l 10 -3 +l 11 -2 +l 12 -3 +l 11 -4 + +1 30 14 24 +m 14 21 +l 13 19 +l 14 17 +l 15 19 +l 14 21 +m 14 21 +l 14 -7 +m 14 10 +l 13 7 +l 14 -7 +l 15 7 +l 14 10 +m 8 14 +l 10 13 +l 12 14 +l 10 15 +l 8 14 +m 8 14 +l 20 14 +m 16 14 +l 18 13 +l 20 14 +l 18 15 +l 16 14 + +2 30 14 45 +m 14 21 +l 13 19 +l 14 17 +l 15 19 +l 14 21 +m 14 21 +l 14 7 +m 14 11 +l 13 9 +l 15 5 +l 14 3 +l 13 5 +l 15 9 +l 14 11 +m 14 7 +l 14 -7 +m 14 -3 +l 13 -5 +l 14 -7 +l 15 -5 +l 14 -3 +m 8 14 +l 10 13 +l 12 14 +l 10 15 +l 8 14 +m 8 14 +l 20 14 +m 16 14 +l 18 13 +l 20 14 +l 18 15 +l 16 14 +m 8 0 +l 10 -1 +l 12 0 +l 10 1 +l 8 0 +m 8 0 +l 20 0 +m 16 0 +l 18 -1 +l 20 0 +l 18 1 +l 16 0 + +3 30 14 35 +m 13 21 +l 10 20 +l 7 18 +l 5 15 +l 4 12 +l 4 9 +l 5 6 +l 7 3 +l 10 1 +l 13 0 +l 16 0 +l 19 1 +l 22 3 +l 24 6 +l 25 9 +l 25 12 +l 24 15 +l 22 18 +l 19 20 +l 16 21 +l 13 21 +m 14 12 +l 13 11 +l 13 10 +l 14 9 +l 15 9 +l 16 10 +l 16 11 +l 15 12 +l 14 12 +m 14 11 +l 14 10 +l 15 10 +l 15 11 +l 14 11 + +4 30 14 23 +m 14 21 +l 11 20 +l 9 18 +l 8 15 +l 8 14 +l 9 11 +l 11 9 +l 14 8 +l 15 8 +l 18 9 +l 20 11 +l 21 14 +l 21 15 +l 20 18 +l 18 20 +l 15 21 +l 14 21 +m 14 8 +l 14 0 +m 15 8 +l 15 0 +m 10 4 +l 19 4 + +5 30 14 25 +m 12 21 +l 9 20 +l 6 18 +l 4 15 +l 3 12 +l 3 8 +l 4 5 +l 6 2 +l 9 0 +l 12 -1 +l 16 -1 +l 19 0 +l 22 2 +l 24 5 +l 25 8 +l 25 12 +l 24 15 +l 22 18 +l 19 20 +l 16 21 +l 12 21 +m 14 21 +l 14 -1 +m 3 10 +l 25 10 + +6 30 14 27 +m 12 14 +l 9 13 +l 7 11 +l 6 8 +l 6 7 +l 7 4 +l 9 2 +l 12 1 +l 13 1 +l 16 2 +l 18 4 +l 19 7 +l 19 8 +l 18 11 +l 16 13 +l 13 14 +l 12 14 +m 25 20 +l 19 20 +l 23 19 +l 17 13 +m 25 20 +l 25 14 +l 24 18 +l 18 12 +m 24 19 +l 18 13 + +7 30 14 27 +m 13 13 +l 11 12 +l 10 10 +l 10 8 +l 11 6 +l 13 5 +l 15 5 +l 17 6 +l 18 8 +l 18 10 +l 17 12 +l 15 13 +l 13 13 +m 11 10 +l 11 8 +m 12 11 +l 12 7 +m 13 12 +l 13 6 +m 14 12 +l 14 6 +m 15 12 +l 15 6 +m 16 11 +l 16 7 +m 17 10 +l 17 8 + +8 30 14 19 +m 10 13 +l 10 5 +l 18 5 +l 18 13 +l 10 13 +m 11 12 +l 11 6 +m 12 12 +l 12 6 +m 13 12 +l 13 6 +m 14 12 +l 14 6 +m 15 12 +l 15 6 +m 16 12 +l 16 6 +m 17 12 +l 17 6 + +9 30 14 12 +m 14 15 +l 9 6 +l 19 6 +l 14 15 +m 14 12 +l 11 7 +m 14 12 +l 17 7 +m 14 9 +l 13 7 +m 14 9 +l 15 7 + +10 30 14 12 +m 8 9 +l 17 4 +l 17 14 +l 8 9 +m 11 9 +l 16 6 +m 11 9 +l 16 12 +m 14 9 +l 16 8 +m 14 9 +l 16 10 + +11 30 14 12 +m 14 3 +l 19 12 +l 9 12 +l 14 3 +m 14 6 +l 17 11 +m 14 6 +l 11 11 +m 14 9 +l 15 11 +m 14 9 +l 13 11 + +12 30 14 12 +m 20 9 +l 11 14 +l 11 4 +l 20 9 +m 17 9 +l 12 12 +m 17 9 +l 12 6 +m 14 9 +l 12 10 +m 14 9 +l 12 8 + +13 30 14 16 +m 14 15 +l 10 4 +l 20 11 +l 8 11 +l 18 4 +l 14 15 +m 14 9 +l 14 15 +m 14 9 +l 8 11 +m 14 9 +l 10 4 +m 14 9 +l 18 4 +m 14 9 +l 20 11 + +14 30 14 8 +m 14 16 +l 14 2 +m 14 16 +l 21 13 +l 14 10 +m 15 14 +l 18 13 +l 15 12 + +15 30 14 11 +m 14 18 +l 12 12 +l 6 12 +l 11 8 +l 9 2 +l 14 6 +l 19 2 +l 17 8 +l 22 12 +l 16 12 +l 14 18 + +16 30 14 36 +m 16 15 +l 15 15 +l 15 14 +l 16 14 +l 16 15 +l 15 16 +l 13 16 +l 12 15 +l 12 13 +l 13 11 +l 16 9 +l 17 8 +m 12 13 +l 13 12 +l 16 10 +l 17 8 +l 17 6 +l 15 4 +m 13 11 +l 11 9 +l 11 7 +l 12 5 +l 15 3 +l 16 2 +m 11 7 +l 12 6 +l 15 4 +l 16 2 +l 16 0 +l 15 -1 +l 13 -1 +l 12 0 +l 12 1 +l 13 1 +l 13 0 +l 12 0 + +17 30 14 24 +m 14 16 +l 13 15 +l 14 14 +l 15 15 +l 14 16 +m 14 14 +l 14 10 +m 14 10 +l 13 8 +l 14 5 +l 15 8 +l 14 10 +m 14 5 +l 14 -1 +m 12 12 +l 11 13 +l 10 12 +l 11 11 +l 12 12 +l 16 12 +l 17 13 +l 18 12 +l 17 11 +l 16 12 + +18 30 14 38 +m 14 14 +l 15 15 +l 14 16 +l 13 15 +l 14 14 +l 14 10 +l 13 9 +l 15 6 +l 14 5 +m 14 10 +l 15 9 +l 13 6 +l 14 5 +l 14 1 +l 13 0 +l 14 -1 +l 15 0 +l 14 1 +m 12 12 +l 11 13 +l 10 12 +l 11 11 +l 12 12 +l 16 12 +l 17 13 +l 18 12 +l 17 11 +l 16 12 +m 12 3 +l 11 4 +l 10 3 +l 11 2 +l 12 3 +l 16 3 +l 17 4 +l 18 3 +l 17 2 +l 16 3 + +19 30 14 22 +m 13 16 +l 10 15 +l 8 13 +l 7 10 +l 7 8 +l 8 5 +l 10 3 +l 13 2 +l 15 2 +l 18 3 +l 20 5 +l 21 8 +l 21 10 +l 20 13 +l 18 15 +l 15 16 +l 13 16 +m 14 10 +l 13 9 +l 14 8 +l 15 9 +l 14 10 + +20 30 14 19 +m 14 16 +l 12 15 +l 11 13 +l 11 12 +l 12 10 +l 14 9 +l 15 9 +l 17 10 +l 18 12 +l 18 13 +l 17 15 +l 15 16 +l 14 16 +m 14 9 +l 14 3 +m 15 9 +l 15 3 +m 11 6 +l 18 6 + +21 30 14 21 +m 13 16 +l 10 15 +l 8 13 +l 7 10 +l 7 8 +l 8 5 +l 10 3 +l 13 2 +l 15 2 +l 18 3 +l 20 5 +l 21 8 +l 21 10 +l 20 13 +l 18 15 +l 15 16 +l 13 16 +m 14 16 +l 14 2 +m 7 9 +l 21 9 + +22 30 14 21 +m 14 9 +l 12 10 +l 11 10 +l 9 9 +l 8 7 +l 8 6 +l 9 4 +l 11 3 +l 12 3 +l 14 4 +l 15 6 +l 15 7 +l 14 9 +m 19 14 +l 14 9 +m 14 14 +l 19 14 +l 19 9 +m 14 14 +l 18 13 +l 19 9 + +23 30 14 7 +m 14 19 +l 13 20 +l 14 21 +l 15 20 +l 15 18 +l 14 16 +l 13 15 + +24 30 14 7 +m 15 21 +l 14 20 +l 13 18 +l 13 16 +l 14 15 +l 15 16 +l 14 17 + +25 30 14 7 +m 14 19 +l 15 20 +l 14 21 +l 13 20 +l 13 18 +l 14 16 +l 15 15 + +26 30 14 7 +m 13 21 +l 14 20 +l 15 18 +l 15 16 +l 14 15 +l 13 16 +l 14 17 + +27 30 14 16 +m 10 13 +l 11 10 +l 11 8 +l 10 5 +m 18 13 +l 17 10 +l 17 8 +l 18 5 +m 10 13 +l 13 12 +l 15 12 +l 18 13 +m 10 5 +l 13 6 +l 15 6 +l 18 5 + +28 30 14 16 +m 7 21 +l 7 0 +m 4 21 +l 23 21 +l 13 11 +l 23 1 +m 22 5 +l 23 2 +l 24 0 +m 22 5 +l 22 2 +m 19 2 +l 22 2 +m 19 2 +l 22 1 +l 24 0 + +29 30 14 34 +m 14 16 +l 12 14 +l 11 12 +l 9 6 +l 7 -1 +m 13 15 +l 12 13 +l 10 7 +l 8 -1 +m 14 16 +l 16 16 +l 18 15 +l 18 13 +l 17 11 +l 14 10 +m 16 16 +l 17 15 +l 17 13 +l 16 11 +l 14 10 +m 14 10 +l 16 9 +l 17 7 +l 17 5 +l 16 4 +l 14 3 +l 13 3 +l 11 4 +l 10 7 +m 14 10 +l 15 9 +l 16 7 +l 16 5 +l 14 3 + +30 30 14 5 +m 14 19 +l 8 9 +l 14 -1 +l 20 9 +l 14 19 + +31 30 14 21 +m 12 20 +l 9 19 +l 6 17 +l 4 14 +l 3 11 +l 3 7 +l 4 4 +l 6 1 +l 9 -1 +l 12 -2 +l 16 -2 +l 19 -1 +l 22 1 +l 24 4 +l 25 7 +l 25 11 +l 24 14 +l 22 17 +l 19 19 +l 16 20 +l 12 20 + +32 30 14 0 + +33 30 14 12 +m 14 21 +l 13 19 +l 14 7 +l 15 19 +l 14 21 +m 14 19 +l 14 13 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +34 30 14 8 +m 10 21 +l 9 14 +m 11 21 +l 9 14 +m 18 21 +l 17 14 +m 19 21 +l 17 14 + +35 30 14 8 +m 15 21 +l 8 -7 +m 21 21 +l 14 -7 +m 8 10 +l 22 10 +m 7 4 +l 21 4 + +36 30 14 38 +m 12 25 +l 12 -4 +m 16 25 +l 16 -4 +m 20 18 +l 19 17 +l 20 16 +l 21 17 +l 21 18 +l 19 20 +l 16 21 +l 12 21 +l 9 20 +l 7 18 +l 7 16 +l 8 14 +l 9 13 +l 11 12 +l 17 10 +l 19 9 +l 21 7 +m 7 16 +l 9 14 +l 11 13 +l 17 11 +l 19 10 +l 20 9 +l 21 7 +l 21 3 +l 19 1 +l 16 0 +l 12 0 +l 9 1 +l 7 3 +l 7 4 +l 8 5 +l 9 4 +l 8 3 + +37 30 14 29 +m 23 21 +l 5 0 +m 10 21 +l 12 19 +l 12 17 +l 11 15 +l 9 14 +l 7 14 +l 5 16 +l 5 18 +l 6 20 +l 8 21 +l 10 21 +l 12 20 +l 15 19 +l 18 19 +l 21 20 +l 23 21 +m 19 7 +l 17 6 +l 16 4 +l 16 2 +l 18 0 +l 20 0 +l 22 1 +l 23 3 +l 23 5 +l 21 7 +l 19 7 + +38 30 14 46 +m 23 13 +l 22 12 +l 23 11 +l 24 12 +l 24 13 +l 23 14 +l 22 14 +l 21 13 +l 20 11 +l 18 5 +l 17 3 +l 15 1 +l 13 0 +l 9 0 +l 6 1 +l 5 3 +l 5 6 +l 6 8 +l 12 12 +l 14 14 +l 15 16 +l 15 18 +l 14 20 +l 12 21 +l 10 20 +l 9 18 +l 9 16 +l 10 13 +l 12 10 +l 17 3 +l 19 1 +l 22 0 +l 23 0 +l 24 1 +l 24 2 +m 9 0 +l 7 1 +l 6 3 +l 6 6 +l 7 8 +l 9 10 +m 9 16 +l 10 14 +l 18 3 +l 20 1 +l 22 0 + +39 30 14 4 +m 14 21 +l 13 14 +m 15 21 +l 13 14 + +40 30 14 18 +m 18 25 +l 16 23 +l 14 20 +l 12 16 +l 11 11 +l 11 7 +l 12 2 +l 14 -2 +l 16 -5 +l 18 -7 +m 16 23 +l 14 19 +l 13 16 +l 12 11 +l 12 7 +l 13 2 +l 14 -1 +l 16 -5 + +41 30 14 18 +m 10 25 +l 12 23 +l 14 20 +l 16 16 +l 17 11 +l 17 7 +l 16 2 +l 14 -2 +l 12 -5 +l 10 -7 +m 12 23 +l 14 19 +l 15 16 +l 16 11 +l 16 7 +l 15 2 +l 14 -1 +l 12 -5 + +42 30 14 6 +m 14 21 +l 14 9 +m 9 18 +l 19 12 +m 19 18 +l 9 12 + +43 30 14 4 +m 14 18 +l 14 0 +m 5 9 +l 23 9 + +44 30 14 7 +m 14 0 +l 13 1 +l 14 2 +l 15 1 +l 15 -1 +l 14 -3 +l 13 -4 + +45 30 14 2 +m 5 9 +l 23 9 + +46 30 14 5 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +47 30 14 2 +m 23 25 +l 5 -7 + +48 30 14 37 +m 13 21 +l 10 20 +l 8 17 +l 7 12 +l 7 9 +l 8 4 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 4 +l 21 9 +l 21 12 +l 20 17 +l 18 20 +l 15 21 +l 13 21 +m 13 21 +l 11 20 +l 10 19 +l 9 17 +l 8 12 +l 8 9 +l 9 4 +l 10 2 +l 11 1 +l 13 0 +m 15 0 +l 17 1 +l 18 2 +l 19 4 +l 20 9 +l 20 12 +l 19 17 +l 18 19 +l 17 20 +l 15 21 + +49 30 14 8 +m 10 17 +l 12 18 +l 15 21 +l 15 0 +m 14 20 +l 14 0 +m 10 0 +l 19 0 + +50 30 14 41 +m 8 17 +l 9 16 +l 8 15 +l 7 16 +l 7 17 +l 8 19 +l 9 20 +l 12 21 +l 16 21 +l 19 20 +l 20 19 +l 21 17 +l 21 15 +l 20 13 +l 17 11 +l 12 9 +l 10 8 +l 8 6 +l 7 3 +l 7 0 +m 16 21 +l 18 20 +l 19 19 +l 20 17 +l 20 15 +l 19 13 +l 16 11 +l 12 9 +m 7 2 +l 8 3 +l 10 3 +l 15 1 +l 18 1 +l 20 2 +l 21 3 +m 10 3 +l 15 0 +l 19 0 +l 20 1 +l 21 3 +l 21 5 + +51 30 14 42 +m 8 18 +l 9 17 +l 8 16 +l 7 17 +l 7 18 +l 9 20 +l 12 21 +l 16 21 +l 19 20 +l 20 18 +l 20 15 +l 19 13 +l 16 12 +l 13 12 +m 16 21 +l 18 20 +l 19 18 +l 19 15 +l 18 13 +l 16 12 +m 16 12 +l 18 11 +l 20 9 +l 21 7 +l 21 4 +l 20 2 +l 19 1 +l 16 0 +l 12 0 +l 9 1 +l 8 2 +l 7 4 +l 7 5 +l 8 6 +l 9 5 +l 8 4 +m 19 10 +l 20 7 +l 20 4 +l 19 2 +l 18 1 +l 16 0 + +52 30 14 9 +m 16 19 +l 16 0 +m 17 21 +l 17 0 +m 17 21 +l 6 6 +l 22 6 +m 13 0 +l 20 0 + +53 30 14 34 +m 9 21 +l 7 11 +m 7 11 +l 9 13 +l 12 14 +l 15 14 +l 18 13 +l 20 11 +l 21 8 +l 21 6 +l 20 3 +l 18 1 +l 15 0 +l 12 0 +l 9 1 +l 8 2 +l 7 4 +l 7 5 +l 8 6 +l 9 5 +l 8 4 +m 15 14 +l 17 13 +l 19 11 +l 20 8 +l 20 6 +l 19 3 +l 17 1 +l 15 0 +m 9 21 +l 19 21 +m 9 20 +l 14 20 +l 19 21 + +54 30 14 45 +m 19 18 +l 18 17 +l 19 16 +l 20 17 +l 20 18 +l 19 20 +l 17 21 +l 14 21 +l 11 20 +l 9 18 +l 8 16 +l 7 12 +l 7 6 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +l 21 6 +l 21 7 +l 20 10 +l 18 12 +l 15 13 +l 14 13 +l 11 12 +l 9 10 +l 8 7 +m 14 21 +l 12 20 +l 10 18 +l 9 16 +l 8 12 +l 8 6 +l 9 3 +l 11 1 +l 13 0 +m 15 0 +l 17 1 +l 19 3 +l 20 6 +l 20 7 +l 19 10 +l 17 12 +l 15 13 + +55 30 14 26 +m 7 21 +l 7 15 +m 7 17 +l 8 19 +l 10 21 +l 12 21 +l 17 18 +l 19 18 +l 20 19 +l 21 21 +m 8 19 +l 10 20 +l 12 20 +l 17 18 +m 21 21 +l 21 18 +l 20 15 +l 16 10 +l 15 8 +l 14 5 +l 14 0 +m 20 15 +l 15 10 +l 14 8 +l 13 5 +l 13 0 + +56 30 14 57 +m 12 21 +l 9 20 +l 8 18 +l 8 15 +l 9 13 +l 12 12 +l 16 12 +l 19 13 +l 20 15 +l 20 18 +l 19 20 +l 16 21 +l 12 21 +m 12 21 +l 10 20 +l 9 18 +l 9 15 +l 10 13 +l 12 12 +m 16 12 +l 18 13 +l 19 15 +l 19 18 +l 18 20 +l 16 21 +m 12 12 +l 9 11 +l 8 10 +l 7 8 +l 7 4 +l 8 2 +l 9 1 +l 12 0 +l 16 0 +l 19 1 +l 20 2 +l 21 4 +l 21 8 +l 20 10 +l 19 11 +l 16 12 +m 12 12 +l 10 11 +l 9 10 +l 8 8 +l 8 4 +l 9 2 +l 10 1 +l 12 0 +m 16 0 +l 18 1 +l 19 2 +l 20 4 +l 20 8 +l 19 10 +l 18 11 +l 16 12 + +57 30 14 45 +m 20 14 +l 19 11 +l 17 9 +l 14 8 +l 13 8 +l 10 9 +l 8 11 +l 7 14 +l 7 15 +l 8 18 +l 10 20 +l 13 21 +l 15 21 +l 18 20 +l 20 18 +l 21 15 +l 21 9 +l 20 5 +l 19 3 +l 17 1 +l 14 0 +l 11 0 +l 9 1 +l 8 3 +l 8 4 +l 9 5 +l 10 4 +l 9 3 +m 13 8 +l 11 9 +l 9 11 +l 8 14 +l 8 15 +l 9 18 +l 11 20 +l 13 21 +m 15 21 +l 17 20 +l 19 18 +l 20 15 +l 20 9 +l 19 5 +l 18 3 +l 16 1 +l 14 0 + +58 30 14 10 +m 14 14 +l 13 13 +l 14 12 +l 15 13 +l 14 14 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +59 30 14 12 +m 14 14 +l 13 13 +l 14 12 +l 15 13 +l 14 14 +m 14 0 +l 13 1 +l 14 2 +l 15 1 +l 15 -1 +l 14 -3 +l 13 -4 + +60 30 14 3 +m 22 18 +l 6 9 +l 22 0 + +61 30 14 4 +m 5 12 +l 23 12 +m 5 6 +l 23 6 + +62 30 14 3 +m 6 18 +l 22 9 +l 6 0 + +63 30 14 29 +m 9 17 +l 10 16 +l 9 15 +l 8 16 +l 8 17 +l 9 19 +l 10 20 +l 12 21 +l 15 21 +l 18 20 +l 19 19 +l 20 17 +l 20 15 +l 19 13 +l 18 12 +l 14 10 +l 14 7 +m 15 21 +l 17 20 +l 18 19 +l 19 17 +l 19 15 +l 18 13 +l 16 11 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +64 30 14 52 +m 19 13 +l 18 15 +l 16 16 +l 13 16 +l 11 15 +l 10 14 +l 9 11 +l 9 8 +l 10 6 +l 12 5 +l 15 5 +l 17 6 +l 18 8 +m 13 16 +l 11 14 +l 10 11 +l 10 8 +l 11 6 +l 12 5 +m 19 16 +l 18 8 +l 18 6 +l 20 5 +l 22 5 +l 24 7 +l 25 10 +l 25 12 +l 24 15 +l 23 17 +l 21 19 +l 19 20 +l 16 21 +l 13 21 +l 10 20 +l 8 19 +l 6 17 +l 5 15 +l 4 12 +l 4 9 +l 5 6 +l 6 4 +l 8 2 +l 10 1 +l 13 0 +l 16 0 +l 19 1 +l 21 2 +l 22 3 +m 20 16 +l 19 8 +l 19 6 +l 20 5 + +65 30 14 12 +m 14 21 +l 7 0 +m 14 21 +l 21 0 +m 14 18 +l 20 0 +m 9 6 +l 18 6 +m 5 0 +l 11 0 +m 17 0 +l 23 0 + +66 30 14 39 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 5 21 +l 17 21 +l 20 20 +l 21 19 +l 22 17 +l 22 15 +l 21 13 +l 20 12 +l 17 11 +m 17 21 +l 19 20 +l 20 19 +l 21 17 +l 21 15 +l 20 13 +l 19 12 +l 17 11 +m 9 11 +l 17 11 +l 20 10 +l 21 9 +l 22 7 +l 22 4 +l 21 2 +l 20 1 +l 17 0 +l 5 0 +m 17 11 +l 19 10 +l 20 9 +l 21 7 +l 21 4 +l 20 2 +l 19 1 +l 17 0 + +67 30 14 30 +m 20 18 +l 21 15 +l 21 21 +l 20 18 +l 18 20 +l 15 21 +l 13 21 +l 10 20 +l 8 18 +l 7 16 +l 6 13 +l 6 8 +l 7 5 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +l 21 5 +m 13 21 +l 11 20 +l 9 18 +l 8 16 +l 7 13 +l 7 8 +l 8 5 +l 9 3 +l 11 1 +l 13 0 + +68 30 14 26 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 5 21 +l 15 21 +l 18 20 +l 20 18 +l 21 16 +l 22 13 +l 22 8 +l 21 5 +l 20 3 +l 18 1 +l 15 0 +l 5 0 +m 15 21 +l 17 20 +l 19 18 +l 20 16 +l 21 13 +l 21 8 +l 20 5 +l 19 3 +l 17 1 +l 15 0 + +69 30 14 16 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 15 15 +l 15 7 +m 5 21 +l 21 21 +l 21 15 +l 20 21 +m 9 11 +l 15 11 +m 5 0 +l 21 0 +l 21 6 +l 20 0 + +70 30 14 14 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 15 15 +l 15 7 +m 5 21 +l 21 21 +l 21 15 +l 20 21 +m 9 11 +l 15 11 +m 5 0 +l 12 0 + +71 30 14 35 +m 20 18 +l 21 15 +l 21 21 +l 20 18 +l 18 20 +l 15 21 +l 13 21 +l 10 20 +l 8 18 +l 7 16 +l 6 13 +l 6 8 +l 7 5 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +m 13 21 +l 11 20 +l 9 18 +l 8 16 +l 7 13 +l 7 8 +l 8 5 +l 9 3 +l 11 1 +l 13 0 +m 20 8 +l 20 0 +m 21 8 +l 21 0 +m 17 8 +l 24 8 + +72 30 14 18 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 20 21 +l 20 0 +m 21 21 +l 21 0 +m 4 21 +l 11 21 +m 17 21 +l 24 21 +m 8 11 +l 20 11 +m 4 0 +l 11 0 +m 17 0 +l 24 0 + +73 30 14 8 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 11 21 +l 18 21 +m 11 0 +l 18 0 + +74 30 14 17 +m 17 21 +l 17 4 +l 16 1 +l 14 0 +l 12 0 +l 10 1 +l 9 3 +l 9 5 +l 10 6 +l 11 5 +l 10 4 +m 16 21 +l 16 4 +l 15 1 +l 14 0 +m 13 21 +l 20 21 + +75 30 14 18 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 21 21 +l 8 8 +m 13 12 +l 21 0 +m 12 12 +l 20 0 +m 4 21 +l 11 21 +m 17 21 +l 23 21 +m 4 0 +l 11 0 +m 17 0 +l 23 0 + +76 30 14 10 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 7 21 +l 14 21 +m 7 0 +l 22 0 +l 22 6 +l 21 0 + +77 30 14 20 +m 7 21 +l 7 0 +m 8 21 +l 14 3 +m 7 21 +l 14 0 +m 21 21 +l 14 0 +m 21 21 +l 21 0 +m 22 21 +l 22 0 +m 4 21 +l 8 21 +m 21 21 +l 25 21 +m 4 0 +l 10 0 +m 18 0 +l 25 0 + +78 30 14 14 +m 8 21 +l 8 0 +m 9 21 +l 21 2 +m 9 19 +l 21 0 +m 21 21 +l 21 0 +m 5 21 +l 9 21 +m 18 21 +l 24 21 +m 5 0 +l 11 0 + +79 30 14 41 +m 13 21 +l 10 20 +l 8 18 +l 7 16 +l 6 12 +l 6 9 +l 7 5 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +l 21 5 +l 22 9 +l 22 12 +l 21 16 +l 20 18 +l 18 20 +l 15 21 +l 13 21 +m 13 21 +l 11 20 +l 9 18 +l 8 16 +l 7 12 +l 7 9 +l 8 5 +l 9 3 +l 11 1 +l 13 0 +m 15 0 +l 17 1 +l 19 3 +l 20 5 +l 21 9 +l 21 12 +l 20 16 +l 19 18 +l 17 20 +l 15 21 + +80 30 14 24 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 5 21 +l 17 21 +l 20 20 +l 21 19 +l 22 17 +l 22 14 +l 21 12 +l 20 11 +l 17 10 +l 9 10 +m 17 21 +l 19 20 +l 20 19 +l 21 17 +l 21 14 +l 20 12 +l 19 11 +l 17 10 +m 5 0 +l 12 0 + +81 30 14 59 +m 13 21 +l 10 20 +l 8 18 +l 7 16 +l 6 12 +l 6 9 +l 7 5 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +l 21 5 +l 22 9 +l 22 12 +l 21 16 +l 20 18 +l 18 20 +l 15 21 +l 13 21 +m 13 21 +l 11 20 +l 9 18 +l 8 16 +l 7 12 +l 7 9 +l 8 5 +l 9 3 +l 11 1 +l 13 0 +m 15 0 +l 17 1 +l 19 3 +l 20 5 +l 21 9 +l 21 12 +l 20 16 +l 19 18 +l 17 20 +l 15 21 +m 10 2 +l 10 3 +l 11 5 +l 13 6 +l 14 6 +l 16 5 +l 17 3 +l 18 -4 +l 19 -5 +l 21 -5 +l 22 -3 +l 22 -2 +m 17 3 +l 18 -1 +l 19 -3 +l 20 -4 +l 21 -4 +l 22 -3 + +82 30 14 38 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 5 21 +l 17 21 +l 20 20 +l 21 19 +l 22 17 +l 22 15 +l 21 13 +l 20 12 +l 17 11 +l 9 11 +m 17 21 +l 19 20 +l 20 19 +l 21 17 +l 21 15 +l 20 13 +l 19 12 +l 17 11 +m 5 0 +l 12 0 +m 14 11 +l 16 10 +l 17 9 +l 20 2 +l 21 1 +l 22 1 +l 23 2 +m 16 10 +l 17 8 +l 19 1 +l 20 0 +l 22 0 +l 23 2 +l 23 3 + +83 30 14 32 +m 20 18 +l 21 21 +l 21 15 +l 20 18 +l 18 20 +l 15 21 +l 12 21 +l 9 20 +l 7 18 +l 7 16 +l 8 14 +l 9 13 +l 11 12 +l 17 10 +l 19 9 +l 21 7 +m 7 16 +l 9 14 +l 11 13 +l 17 11 +l 19 10 +l 20 9 +l 21 7 +l 21 3 +l 19 1 +l 16 0 +l 13 0 +l 10 1 +l 8 3 +l 7 6 +l 7 0 +l 8 3 + +84 30 14 12 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 8 21 +l 7 15 +l 7 21 +l 22 21 +l 22 15 +l 21 21 +m 11 0 +l 18 0 + +85 30 14 19 +m 7 21 +l 7 6 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +l 21 6 +l 21 21 +m 8 21 +l 8 6 +l 9 3 +l 11 1 +l 13 0 +m 4 21 +l 11 21 +m 18 21 +l 24 21 + +86 30 14 10 +m 7 21 +l 14 0 +m 8 21 +l 14 3 +m 21 21 +l 14 0 +m 5 21 +l 11 21 +m 17 21 +l 23 21 + +87 30 14 16 +m 6 21 +l 10 0 +m 7 21 +l 10 5 +m 14 21 +l 10 0 +m 14 21 +l 18 0 +m 15 21 +l 18 5 +m 22 21 +l 18 0 +m 3 21 +l 10 21 +m 19 21 +l 25 21 + +88 30 14 14 +m 7 21 +l 20 0 +m 8 21 +l 21 0 +m 21 21 +l 7 0 +m 5 21 +l 11 21 +m 17 21 +l 23 21 +m 5 0 +l 11 0 +m 17 0 +l 23 0 + +89 30 14 14 +m 7 21 +l 14 10 +l 14 0 +m 8 21 +l 15 10 +l 15 0 +m 22 21 +l 15 10 +m 5 21 +l 11 21 +m 18 21 +l 24 21 +m 11 0 +l 18 0 + +90 30 14 12 +m 20 21 +l 7 0 +m 21 21 +l 8 0 +m 8 21 +l 7 15 +l 7 21 +l 21 21 +m 7 0 +l 21 0 +l 21 6 +l 20 0 + +91 30 14 8 +m 11 25 +l 11 -7 +m 12 25 +l 12 -7 +m 11 25 +l 18 25 +m 11 -7 +l 18 -7 + +92 30 14 2 +m 5 25 +l 23 -7 + +93 30 14 8 +m 16 25 +l 16 -7 +m 17 25 +l 17 -7 +m 10 25 +l 17 25 +m 10 -7 +l 17 -7 + +94 30 14 3 +m 3 19 +l 14 25 +l 25 19 + +95 30 14 2 +m 0 -7 +l 28 -7 + +96 30 14 3 +m 13 21 +l 15 14 +l 14 21 + +97 30 14 35 +m 10 12 +l 10 11 +l 9 11 +l 9 12 +l 10 13 +l 12 14 +l 16 14 +l 18 13 +l 19 12 +l 20 10 +l 20 3 +l 21 1 +l 22 0 +m 19 12 +l 19 3 +l 20 1 +l 22 0 +l 23 0 +m 19 10 +l 18 9 +l 12 8 +l 9 7 +l 8 5 +l 8 3 +l 9 1 +l 12 0 +l 15 0 +l 17 1 +l 19 3 +m 12 8 +l 10 7 +l 9 5 +l 9 3 +l 10 1 +l 12 0 + +98 30 14 28 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 9 11 +l 11 13 +l 13 14 +l 15 14 +l 18 13 +l 20 11 +l 21 8 +l 21 6 +l 20 3 +l 18 1 +l 15 0 +l 13 0 +l 11 1 +l 9 3 +m 15 14 +l 17 13 +l 19 11 +l 20 8 +l 20 6 +l 19 3 +l 17 1 +l 15 0 +m 5 21 +l 9 21 + +99 30 14 26 +m 19 11 +l 18 10 +l 19 9 +l 20 10 +l 20 11 +l 18 13 +l 16 14 +l 13 14 +l 10 13 +l 8 11 +l 7 8 +l 7 6 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +m 13 14 +l 11 13 +l 9 11 +l 8 8 +l 8 6 +l 9 3 +l 11 1 +l 13 0 + +100 30 14 30 +m 19 21 +l 19 0 +m 20 21 +l 20 0 +m 19 11 +l 17 13 +l 15 14 +l 13 14 +l 10 13 +l 8 11 +l 7 8 +l 7 6 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 17 1 +l 19 3 +m 13 14 +l 11 13 +l 9 11 +l 8 8 +l 8 6 +l 9 3 +l 11 1 +l 13 0 +m 16 21 +l 20 21 +m 19 0 +l 23 0 + +101 30 14 28 +m 8 8 +l 20 8 +l 20 10 +l 19 12 +l 18 13 +l 16 14 +l 13 14 +l 10 13 +l 8 11 +l 7 8 +l 7 6 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +m 19 8 +l 19 11 +l 18 13 +m 13 14 +l 11 13 +l 9 11 +l 8 8 +l 8 6 +l 9 3 +l 11 1 +l 13 0 + +102 30 14 18 +m 17 20 +l 16 19 +l 17 18 +l 18 19 +l 18 20 +l 17 21 +l 15 21 +l 13 20 +l 12 18 +l 12 0 +m 15 21 +l 14 20 +l 13 18 +l 13 0 +m 9 14 +l 17 14 +m 9 0 +l 16 0 + +103 30 14 54 +m 13 14 +l 11 13 +l 10 12 +l 9 10 +l 9 8 +l 10 6 +l 11 5 +l 13 4 +l 15 4 +l 17 5 +l 18 6 +l 19 8 +l 19 10 +l 18 12 +l 17 13 +l 15 14 +l 13 14 +m 11 13 +l 10 11 +l 10 7 +l 11 5 +m 17 5 +l 18 7 +l 18 11 +l 17 13 +m 18 12 +l 19 13 +l 21 14 +l 21 13 +l 19 13 +m 10 6 +l 9 5 +l 8 3 +l 8 2 +l 9 0 +l 12 -1 +l 17 -1 +l 20 -2 +l 21 -3 +m 8 2 +l 9 1 +l 12 0 +l 17 0 +l 20 -1 +l 21 -3 +l 21 -4 +l 20 -6 +l 17 -7 +l 11 -7 +l 8 -6 +l 7 -4 +l 7 -3 +l 8 -1 +l 11 0 + +104 30 14 21 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 9 11 +l 11 13 +l 14 14 +l 16 14 +l 19 13 +l 20 11 +l 20 0 +m 16 14 +l 18 13 +l 19 11 +l 19 0 +m 5 21 +l 9 21 +m 5 0 +l 12 0 +m 16 0 +l 23 0 + +105 30 14 13 +m 14 21 +l 13 20 +l 14 19 +l 15 20 +l 14 21 +m 14 14 +l 14 0 +m 15 14 +l 15 0 +m 11 14 +l 15 14 +m 11 0 +l 18 0 + +106 30 14 21 +m 15 21 +l 14 20 +l 15 19 +l 16 20 +l 15 21 +m 16 14 +l 16 -4 +l 15 -6 +l 13 -7 +l 11 -7 +l 10 -6 +l 10 -5 +l 11 -4 +l 12 -5 +l 11 -6 +m 15 14 +l 15 -4 +l 14 -6 +l 13 -7 +m 12 14 +l 16 14 + +107 30 14 18 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 19 14 +l 9 4 +m 14 8 +l 20 0 +m 13 8 +l 19 0 +m 5 21 +l 9 21 +m 16 14 +l 22 14 +m 5 0 +l 12 0 +m 16 0 +l 22 0 + +108 30 14 8 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 11 21 +l 15 21 +m 11 0 +l 18 0 + +109 30 14 34 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 15 11 +l 17 13 +l 20 14 +l 22 14 +l 25 13 +l 26 11 +l 26 0 +m 22 14 +l 24 13 +l 25 11 +l 25 0 +m 0 14 +l 4 14 +m 0 0 +l 7 0 +m 11 0 +l 18 0 +m 22 0 +l 29 0 + +110 30 14 21 +m 8 14 +l 8 0 +m 9 14 +l 9 0 +m 9 11 +l 11 13 +l 14 14 +l 16 14 +l 19 13 +l 20 11 +l 20 0 +m 16 14 +l 18 13 +l 19 11 +l 19 0 +m 5 14 +l 9 14 +m 5 0 +l 12 0 +m 16 0 +l 23 0 + +111 30 14 33 +m 13 14 +l 10 13 +l 8 11 +l 7 8 +l 7 6 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +l 21 6 +l 21 8 +l 20 11 +l 18 13 +l 15 14 +l 13 14 +m 13 14 +l 11 13 +l 9 11 +l 8 8 +l 8 6 +l 9 3 +l 11 1 +l 13 0 +m 15 0 +l 17 1 +l 19 3 +l 20 6 +l 20 8 +l 19 11 +l 17 13 +l 15 14 + +112 30 14 30 +m 8 14 +l 8 -7 +m 9 14 +l 9 -7 +m 9 11 +l 11 13 +l 13 14 +l 15 14 +l 18 13 +l 20 11 +l 21 8 +l 21 6 +l 20 3 +l 18 1 +l 15 0 +l 13 0 +l 11 1 +l 9 3 +m 15 14 +l 17 13 +l 19 11 +l 20 8 +l 20 6 +l 19 3 +l 17 1 +l 15 0 +m 5 14 +l 9 14 +m 5 -7 +l 12 -7 + +113 30 14 28 +m 19 14 +l 19 -7 +m 20 14 +l 20 -7 +m 19 11 +l 17 13 +l 15 14 +l 13 14 +l 10 13 +l 8 11 +l 7 8 +l 7 6 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 17 1 +l 19 3 +m 13 14 +l 11 13 +l 9 11 +l 8 8 +l 8 6 +l 9 3 +l 11 1 +l 13 0 +m 16 -7 +l 23 -7 + +114 30 14 18 +m 10 14 +l 10 0 +m 11 14 +l 11 0 +m 11 8 +l 12 11 +l 14 13 +l 16 14 +l 19 14 +l 20 13 +l 20 12 +l 19 11 +l 18 12 +l 19 13 +m 7 14 +l 11 14 +m 7 0 +l 14 0 + +115 30 14 30 +m 19 12 +l 20 14 +l 20 10 +l 19 12 +l 18 13 +l 16 14 +l 12 14 +l 10 13 +l 9 12 +l 9 10 +l 10 9 +l 12 8 +l 17 6 +l 19 5 +l 20 4 +m 9 11 +l 10 10 +l 12 9 +l 17 7 +l 19 6 +l 20 5 +l 20 2 +l 19 1 +l 17 0 +l 13 0 +l 11 1 +l 10 2 +l 9 4 +l 9 0 +l 10 2 + +116 30 14 13 +m 12 21 +l 12 4 +l 13 1 +l 15 0 +l 17 0 +l 19 1 +l 20 3 +m 13 21 +l 13 4 +l 14 1 +l 15 0 +m 9 14 +l 17 14 + +117 30 14 21 +m 8 14 +l 8 3 +l 9 1 +l 12 0 +l 14 0 +l 17 1 +l 19 3 +m 9 14 +l 9 3 +l 10 1 +l 12 0 +m 19 14 +l 19 0 +m 20 14 +l 20 0 +m 5 14 +l 9 14 +m 16 14 +l 20 14 +m 19 0 +l 23 0 + +118 30 14 10 +m 8 14 +l 14 0 +m 9 14 +l 14 2 +m 20 14 +l 14 0 +m 6 14 +l 12 14 +m 16 14 +l 22 14 + +119 30 14 16 +m 6 14 +l 10 0 +m 7 14 +l 10 3 +m 14 14 +l 10 0 +m 14 14 +l 18 0 +m 15 14 +l 18 3 +m 22 14 +l 18 0 +m 3 14 +l 10 14 +m 19 14 +l 25 14 + +120 30 14 14 +m 8 14 +l 19 0 +m 9 14 +l 20 0 +m 20 14 +l 8 0 +m 6 14 +l 12 14 +m 16 14 +l 22 14 +m 6 0 +l 12 0 +m 16 0 +l 22 0 + +121 30 14 17 +m 8 14 +l 14 0 +m 9 14 +l 14 2 +m 20 14 +l 14 0 +l 12 -4 +l 10 -6 +l 8 -7 +l 7 -7 +l 6 -6 +l 7 -5 +l 8 -6 +m 6 14 +l 12 14 +m 16 14 +l 22 14 + +122 30 14 12 +m 19 14 +l 8 0 +m 20 14 +l 9 0 +m 9 14 +l 8 10 +l 8 14 +l 20 14 +m 8 0 +l 20 0 +l 20 4 +l 19 0 + +123 30 14 23 +m 16 25 +l 13 22 +l 12 19 +l 12 17 +l 13 14 +l 16 11 +m 14 23 +l 13 20 +l 13 16 +l 14 13 +m 16 11 +l 13 9 +l 16 7 +m 16 7 +l 13 4 +l 12 1 +l 12 -1 +l 13 -4 +l 16 -7 +m 14 5 +l 13 2 +l 13 -2 +l 14 -5 + +124 30 14 4 +m 14 25 +l 14 12 +m 14 6 +l 14 -7 + +125 30 14 23 +m 12 25 +l 15 22 +l 16 19 +l 16 17 +l 15 14 +l 12 11 +m 14 23 +l 15 20 +l 15 16 +l 14 13 +m 12 11 +l 15 9 +l 12 7 +m 12 7 +l 15 4 +l 16 1 +l 16 -1 +l 15 -4 +l 12 -7 +m 14 5 +l 15 2 +l 15 -2 +l 14 -5 + +126 30 14 22 +m 5 17 +l 5 19 +l 6 22 +l 8 23 +l 10 23 +l 12 22 +l 16 19 +l 18 18 +l 20 18 +l 22 19 +l 23 21 +m 5 19 +l 6 21 +l 8 22 +l 10 22 +l 12 21 +l 16 18 +l 18 17 +l 20 17 +l 22 18 +l 23 21 +l 23 23 + +127 30 14 42 +m 0 21 +l 2 25 +m 4 25 +l 0 17 +m 0 13 +l 6 25 +m 8 25 +l 0 9 +m 0 5 +l 10 25 +m 12 25 +l 0 1 +m 0 -3 +l 14 25 +m 16 25 +l 0 -7 +m 2 -7 +l 18 25 +m 20 25 +l 4 -7 +m 6 -7 +l 22 25 +m 24 25 +l 8 -7 +m 10 -7 +l 26 25 +m 28 25 +l 12 -7 +m 14 -7 +l 28 21 +m 28 17 +l 16 -7 +m 18 -7 +l 28 13 +m 28 9 +l 20 -7 +m 22 -7 +l 28 5 +m 28 1 +l 24 -7 +m 26 -7 +l 28 -3 diff --git a/cd/etc/vectorfont02.txt b/cd/etc/vectorfont02.txt new file mode 100755 index 0000000..1364a7d --- /dev/null +++ b/cd/etc/vectorfont02.txt @@ -0,0 +1,2642 @@ +Grego monoespacado +25 21 9 -7 + + +0 28 14 7 +m 6 12 +l 9 12 +l 15 4 +m 8 12 +l 15 3 +m 24 21 +l 15 3 + +1 28 14 30 +m 23 24 +l 22 23 +l 23 22 +l 24 23 +l 24 24 +l 23 25 +l 21 25 +l 19 24 +l 17 22 +l 16 20 +l 15 17 +l 14 13 +l 12 1 +l 11 -3 +l 10 -5 +m 18 23 +l 17 21 +l 16 17 +l 14 5 +l 13 1 +l 12 -2 +l 11 -4 +l 9 -6 +l 7 -7 +l 5 -7 +l 4 -6 +l 4 -5 +l 5 -4 +l 6 -5 +l 5 -6 + +2 28 14 47 +m 23 24 +l 22 23 +l 23 22 +l 24 23 +l 24 24 +l 23 25 +l 21 25 +l 19 24 +l 17 22 +l 16 20 +l 15 17 +l 14 13 +l 12 1 +l 11 -3 +l 10 -5 +m 18 23 +l 17 21 +l 16 17 +l 14 5 +l 13 1 +l 12 -2 +l 11 -4 +l 9 -6 +l 7 -7 +l 5 -7 +l 4 -6 +l 4 -5 +l 5 -4 +l 6 -5 +l 5 -6 +m 13 16 +l 10 15 +l 8 13 +l 7 10 +l 7 8 +l 8 5 +l 10 3 +l 13 2 +l 15 2 +l 18 3 +l 20 5 +l 21 8 +l 21 10 +l 20 13 +l 18 15 +l 15 16 +l 13 16 + +3 28 14 12 +m 22 17 +l 15 17 +l 11 16 +l 9 15 +l 7 13 +l 6 10 +l 6 8 +l 7 5 +l 9 3 +l 11 2 +l 15 1 +l 22 1 + +4 28 14 12 +m 6 17 +l 13 17 +l 17 16 +l 19 15 +l 21 13 +l 22 10 +l 22 8 +l 21 5 +l 19 3 +l 17 2 +l 13 1 +l 6 1 + +5 28 14 12 +m 6 17 +l 6 10 +l 7 6 +l 8 4 +l 10 2 +l 13 1 +l 15 1 +l 18 2 +l 20 4 +l 21 6 +l 22 10 +l 22 17 + +6 28 14 12 +m 6 1 +l 6 8 +l 7 12 +l 8 14 +l 10 16 +l 13 17 +l 15 17 +l 18 16 +l 20 14 +l 21 12 +l 22 8 +l 22 1 + +7 28 14 14 +m 22 17 +l 15 17 +l 11 16 +l 9 15 +l 7 13 +l 6 10 +l 6 8 +l 7 5 +l 9 3 +l 11 2 +l 15 1 +l 22 1 +m 6 9 +l 18 9 + +8 28 14 8 +m 20 21 +l 20 0 +m 7 21 +l 20 21 +m 12 11 +l 20 11 +m 7 0 +l 20 0 + +9 28 14 7 +m 22 21 +l 6 14 +l 22 7 +m 6 5 +l 22 5 +m 6 0 +l 22 0 + +10 28 14 7 +m 6 21 +l 22 14 +l 6 7 +m 6 5 +l 22 5 +m 6 0 +l 22 0 + +11 28 14 6 +m 21 18 +l 7 0 +m 5 12 +l 23 12 +m 5 6 +l 23 6 + +12 28 14 4 +m 7 16 +l 21 2 +m 21 16 +l 7 2 + +13 28 14 12 +m 14 18 +l 13 17 +l 14 16 +l 15 17 +l 14 18 +m 5 9 +l 23 9 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +14 28 14 6 +m 5 14 +l 23 14 +m 5 9 +l 23 9 +m 5 4 +l 23 4 + +15 28 14 4 +m 11 25 +l 11 0 +m 17 25 +l 17 0 + +16 28 14 4 +m 14 25 +l 14 0 +m 5 0 +l 23 0 + +17 28 14 3 +m 23 25 +l 5 0 +l 23 0 + +18 28 14 20 +m 5 4 +l 4 5 +l 3 7 +l 3 10 +l 4 12 +l 5 13 +l 7 14 +l 9 14 +l 11 13 +l 12 12 +l 16 6 +l 17 5 +l 19 4 +l 21 4 +l 23 5 +l 24 6 +l 25 8 +l 25 11 +l 24 13 +l 23 14 + +19 28 14 15 +m 14 18 +l 13 17 +l 14 16 +l 15 17 +l 14 18 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 +m 23 2 +l 22 1 +l 23 0 +l 24 1 +l 23 2 + +20 28 14 25 +m 24 8 +l 23 6 +l 21 5 +l 19 5 +l 17 6 +l 16 7 +l 13 11 +l 12 12 +l 10 13 +l 8 13 +l 6 12 +l 5 10 +l 5 8 +l 6 6 +l 8 5 +l 10 5 +l 12 6 +l 13 7 +l 16 11 +l 17 12 +l 19 13 +l 21 13 +l 23 12 +l 24 10 +l 24 8 + +21 28 14 20 +m 23 4 +l 21 4 +l 19 5 +l 17 7 +l 14 11 +l 13 12 +l 11 13 +l 9 13 +l 7 12 +l 6 10 +l 6 8 +l 7 6 +l 9 5 +l 11 5 +l 13 6 +l 14 7 +l 17 11 +l 19 13 +l 21 14 +l 23 14 + +22 28 14 6 +m 14 17 +l 14 0 +m 6 9 +l 22 9 +m 6 0 +l 22 0 + +23 28 14 6 +m 14 17 +l 14 0 +m 6 17 +l 22 17 +m 6 9 +l 22 9 + +24 28 14 6 +m 0 9 +l 28 9 +m 6 2 +l 22 2 +m 12 -5 +l 16 -5 + +25 28 14 8 +m 20 11 +l 23 9 +l 20 7 +m 17 14 +l 22 9 +l 17 4 +m 5 9 +l 22 9 + +26 28 14 8 +m 12 15 +l 14 18 +l 16 15 +m 9 12 +l 14 17 +l 19 12 +m 14 17 +l 14 0 + +27 28 14 8 +m 8 11 +l 5 9 +l 8 7 +m 11 14 +l 6 9 +l 11 4 +m 6 9 +l 23 9 + +28 28 14 8 +m 12 3 +l 14 0 +l 16 3 +m 9 6 +l 14 1 +l 19 6 +m 14 18 +l 14 1 + +29 28 14 4 +m 14 23 +l 6 9 +m 14 23 +l 22 9 + +30 28 14 3 +m 17 25 +l 10 9 +l 17 -7 + +31 28 14 3 +m 11 25 +l 18 9 +l 11 -7 + +32 28 14 0 + +33 28 14 12 +m 14 21 +l 13 19 +l 14 7 +l 15 19 +l 14 21 +m 14 19 +l 14 13 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +34 28 14 8 +m 10 21 +l 9 14 +m 11 21 +l 9 14 +m 18 21 +l 17 14 +m 19 21 +l 17 14 + +35 28 14 8 +m 15 21 +l 8 -7 +m 21 21 +l 14 -7 +m 8 10 +l 22 10 +m 7 4 +l 21 4 + +36 28 14 38 +m 12 25 +l 12 -4 +m 16 25 +l 16 -4 +m 20 18 +l 19 17 +l 20 16 +l 21 17 +l 21 18 +l 19 20 +l 16 21 +l 12 21 +l 9 20 +l 7 18 +l 7 16 +l 8 14 +l 9 13 +l 11 12 +l 17 10 +l 19 9 +l 21 7 +m 7 16 +l 9 14 +l 11 13 +l 17 11 +l 19 10 +l 20 9 +l 21 7 +l 21 3 +l 19 1 +l 16 0 +l 12 0 +l 9 1 +l 7 3 +l 7 4 +l 8 5 +l 9 4 +l 8 3 + +37 28 14 29 +m 23 21 +l 5 0 +m 10 21 +l 12 19 +l 12 17 +l 11 15 +l 9 14 +l 7 14 +l 5 16 +l 5 18 +l 6 20 +l 8 21 +l 10 21 +l 12 20 +l 15 19 +l 18 19 +l 21 20 +l 23 21 +m 19 7 +l 17 6 +l 16 4 +l 16 2 +l 18 0 +l 20 0 +l 22 1 +l 23 3 +l 23 5 +l 21 7 +l 19 7 + +38 28 14 46 +m 23 13 +l 22 12 +l 23 11 +l 24 12 +l 24 13 +l 23 14 +l 22 14 +l 21 13 +l 20 11 +l 18 5 +l 17 3 +l 15 1 +l 13 0 +l 9 0 +l 6 1 +l 5 3 +l 5 6 +l 6 8 +l 12 12 +l 14 14 +l 15 16 +l 15 18 +l 14 20 +l 12 21 +l 10 20 +l 9 18 +l 9 16 +l 10 13 +l 12 10 +l 17 3 +l 19 1 +l 22 0 +l 23 0 +l 24 1 +l 24 2 +m 9 0 +l 7 1 +l 6 3 +l 6 6 +l 7 8 +l 9 10 +m 9 16 +l 10 14 +l 18 3 +l 20 1 +l 22 0 + +39 28 14 4 +m 14 21 +l 13 14 +m 15 21 +l 13 14 + +40 28 14 18 +m 18 25 +l 16 23 +l 14 20 +l 12 16 +l 11 11 +l 11 7 +l 12 2 +l 14 -2 +l 16 -5 +l 18 -7 +m 16 23 +l 14 19 +l 13 16 +l 12 11 +l 12 7 +l 13 2 +l 14 -1 +l 16 -5 + +41 28 14 18 +m 10 25 +l 12 23 +l 14 20 +l 16 16 +l 17 11 +l 17 7 +l 16 2 +l 14 -2 +l 12 -5 +l 10 -7 +m 12 23 +l 14 19 +l 15 16 +l 16 11 +l 16 7 +l 15 2 +l 14 -1 +l 12 -5 + +42 28 14 6 +m 14 21 +l 14 9 +m 9 18 +l 19 12 +m 19 18 +l 9 12 + +43 28 14 4 +m 14 18 +l 14 0 +m 5 9 +l 23 9 + +44 28 14 7 +m 14 0 +l 13 1 +l 14 2 +l 15 1 +l 15 -1 +l 14 -3 +l 13 -4 + +45 28 14 2 +m 5 9 +l 23 9 + +46 28 14 5 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +47 28 14 2 +m 23 25 +l 5 -7 + +48 28 14 37 +m 13 21 +l 10 20 +l 8 17 +l 7 12 +l 7 9 +l 8 4 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 4 +l 21 9 +l 21 12 +l 20 17 +l 18 20 +l 15 21 +l 13 21 +m 13 21 +l 11 20 +l 10 19 +l 9 17 +l 8 12 +l 8 9 +l 9 4 +l 10 2 +l 11 1 +l 13 0 +m 15 0 +l 17 1 +l 18 2 +l 19 4 +l 20 9 +l 20 12 +l 19 17 +l 18 19 +l 17 20 +l 15 21 + +49 28 14 8 +m 10 17 +l 12 18 +l 15 21 +l 15 0 +m 14 20 +l 14 0 +m 10 0 +l 19 0 + +50 28 14 41 +m 8 17 +l 9 16 +l 8 15 +l 7 16 +l 7 17 +l 8 19 +l 9 20 +l 12 21 +l 16 21 +l 19 20 +l 20 19 +l 21 17 +l 21 15 +l 20 13 +l 17 11 +l 12 9 +l 10 8 +l 8 6 +l 7 3 +l 7 0 +m 16 21 +l 18 20 +l 19 19 +l 20 17 +l 20 15 +l 19 13 +l 16 11 +l 12 9 +m 7 2 +l 8 3 +l 10 3 +l 15 1 +l 18 1 +l 20 2 +l 21 3 +m 10 3 +l 15 0 +l 19 0 +l 20 1 +l 21 3 +l 21 5 + +51 28 14 42 +m 8 18 +l 9 17 +l 8 16 +l 7 17 +l 7 18 +l 9 20 +l 12 21 +l 16 21 +l 19 20 +l 20 18 +l 20 15 +l 19 13 +l 16 12 +l 13 12 +m 16 21 +l 18 20 +l 19 18 +l 19 15 +l 18 13 +l 16 12 +m 16 12 +l 18 11 +l 20 9 +l 21 7 +l 21 4 +l 20 2 +l 19 1 +l 16 0 +l 12 0 +l 9 1 +l 8 2 +l 7 4 +l 7 5 +l 8 6 +l 9 5 +l 8 4 +m 19 10 +l 20 7 +l 20 4 +l 19 2 +l 18 1 +l 16 0 + +52 28 14 9 +m 16 19 +l 16 0 +m 17 21 +l 17 0 +m 17 21 +l 6 6 +l 22 6 +m 13 0 +l 20 0 + +53 28 14 34 +m 9 21 +l 7 11 +m 7 11 +l 9 13 +l 12 14 +l 15 14 +l 18 13 +l 20 11 +l 21 8 +l 21 6 +l 20 3 +l 18 1 +l 15 0 +l 12 0 +l 9 1 +l 8 2 +l 7 4 +l 7 5 +l 8 6 +l 9 5 +l 8 4 +m 15 14 +l 17 13 +l 19 11 +l 20 8 +l 20 6 +l 19 3 +l 17 1 +l 15 0 +m 9 21 +l 19 21 +m 9 20 +l 14 20 +l 19 21 + +54 28 14 45 +m 19 18 +l 18 17 +l 19 16 +l 20 17 +l 20 18 +l 19 20 +l 17 21 +l 14 21 +l 11 20 +l 9 18 +l 8 16 +l 7 12 +l 7 6 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +l 21 6 +l 21 7 +l 20 10 +l 18 12 +l 15 13 +l 14 13 +l 11 12 +l 9 10 +l 8 7 +m 14 21 +l 12 20 +l 10 18 +l 9 16 +l 8 12 +l 8 6 +l 9 3 +l 11 1 +l 13 0 +m 15 0 +l 17 1 +l 19 3 +l 20 6 +l 20 7 +l 19 10 +l 17 12 +l 15 13 + +55 28 14 26 +m 7 21 +l 7 15 +m 7 17 +l 8 19 +l 10 21 +l 12 21 +l 17 18 +l 19 18 +l 20 19 +l 21 21 +m 8 19 +l 10 20 +l 12 20 +l 17 18 +m 21 21 +l 21 18 +l 20 15 +l 16 10 +l 15 8 +l 14 5 +l 14 0 +m 20 15 +l 15 10 +l 14 8 +l 13 5 +l 13 0 + +56 28 14 57 +m 12 21 +l 9 20 +l 8 18 +l 8 15 +l 9 13 +l 12 12 +l 16 12 +l 19 13 +l 20 15 +l 20 18 +l 19 20 +l 16 21 +l 12 21 +m 12 21 +l 10 20 +l 9 18 +l 9 15 +l 10 13 +l 12 12 +m 16 12 +l 18 13 +l 19 15 +l 19 18 +l 18 20 +l 16 21 +m 12 12 +l 9 11 +l 8 10 +l 7 8 +l 7 4 +l 8 2 +l 9 1 +l 12 0 +l 16 0 +l 19 1 +l 20 2 +l 21 4 +l 21 8 +l 20 10 +l 19 11 +l 16 12 +m 12 12 +l 10 11 +l 9 10 +l 8 8 +l 8 4 +l 9 2 +l 10 1 +l 12 0 +m 16 0 +l 18 1 +l 19 2 +l 20 4 +l 20 8 +l 19 10 +l 18 11 +l 16 12 + +57 28 14 45 +m 20 14 +l 19 11 +l 17 9 +l 14 8 +l 13 8 +l 10 9 +l 8 11 +l 7 14 +l 7 15 +l 8 18 +l 10 20 +l 13 21 +l 15 21 +l 18 20 +l 20 18 +l 21 15 +l 21 9 +l 20 5 +l 19 3 +l 17 1 +l 14 0 +l 11 0 +l 9 1 +l 8 3 +l 8 4 +l 9 5 +l 10 4 +l 9 3 +m 13 8 +l 11 9 +l 9 11 +l 8 14 +l 8 15 +l 9 18 +l 11 20 +l 13 21 +m 15 21 +l 17 20 +l 19 18 +l 20 15 +l 20 9 +l 19 5 +l 18 3 +l 16 1 +l 14 0 + +58 28 14 10 +m 14 14 +l 13 13 +l 14 12 +l 15 13 +l 14 14 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +59 28 14 12 +m 14 14 +l 13 13 +l 14 12 +l 15 13 +l 14 14 +m 14 0 +l 13 1 +l 14 2 +l 15 1 +l 15 -1 +l 14 -3 +l 13 -4 + +60 28 14 3 +m 22 18 +l 6 9 +l 22 0 + +61 28 14 4 +m 5 12 +l 23 12 +m 5 6 +l 23 6 + +62 28 14 3 +m 6 18 +l 22 9 +l 6 0 + +63 28 14 29 +m 9 17 +l 10 16 +l 9 15 +l 8 16 +l 8 17 +l 9 19 +l 10 20 +l 12 21 +l 15 21 +l 18 20 +l 19 19 +l 20 17 +l 20 15 +l 19 13 +l 18 12 +l 14 10 +l 14 7 +m 15 21 +l 17 20 +l 18 19 +l 19 17 +l 19 15 +l 18 13 +l 16 11 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +64 28 14 52 +m 19 13 +l 18 15 +l 16 16 +l 13 16 +l 11 15 +l 10 14 +l 9 11 +l 9 8 +l 10 6 +l 12 5 +l 15 5 +l 17 6 +l 18 8 +m 13 16 +l 11 14 +l 10 11 +l 10 8 +l 11 6 +l 12 5 +m 19 16 +l 18 8 +l 18 6 +l 20 5 +l 22 5 +l 24 7 +l 25 10 +l 25 12 +l 24 15 +l 23 17 +l 21 19 +l 19 20 +l 16 21 +l 13 21 +l 10 20 +l 8 19 +l 6 17 +l 5 15 +l 4 12 +l 4 9 +l 5 6 +l 6 4 +l 8 2 +l 10 1 +l 13 0 +l 16 0 +l 19 1 +l 21 2 +l 22 3 +m 20 16 +l 19 8 +l 19 6 +l 20 5 + +65 28 14 12 +m 14 21 +l 7 0 +m 14 21 +l 21 0 +m 14 18 +l 20 0 +m 9 6 +l 18 6 +m 5 0 +l 11 0 +m 17 0 +l 23 0 + +66 28 14 39 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 5 21 +l 17 21 +l 20 20 +l 21 19 +l 22 17 +l 22 15 +l 21 13 +l 20 12 +l 17 11 +m 17 21 +l 19 20 +l 20 19 +l 21 17 +l 21 15 +l 20 13 +l 19 12 +l 17 11 +m 9 11 +l 17 11 +l 20 10 +l 21 9 +l 22 7 +l 22 4 +l 21 2 +l 20 1 +l 17 0 +l 5 0 +m 17 11 +l 19 10 +l 20 9 +l 21 7 +l 21 4 +l 20 2 +l 19 1 +l 17 0 + +67 28 14 5 +m 8 15 +l 8 3 +l 20 3 +l 20 15 +l 8 15 + +68 28 14 10 +m 14 21 +l 6 0 +m 14 21 +l 22 0 +m 14 18 +l 21 0 +m 7 1 +l 21 1 +m 6 0 +l 22 0 + +69 28 14 16 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 15 15 +l 15 7 +m 5 21 +l 21 21 +l 21 15 +l 20 21 +m 9 11 +l 15 11 +m 5 0 +l 21 0 +l 21 6 +l 20 0 + +70 28 14 41 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 12 16 +l 9 15 +l 8 14 +l 7 12 +l 7 9 +l 8 7 +l 9 6 +l 12 5 +l 17 5 +l 20 6 +l 21 7 +l 22 9 +l 22 12 +l 21 14 +l 20 15 +l 17 16 +l 12 16 +m 12 16 +l 10 15 +l 9 14 +l 8 12 +l 8 9 +l 9 7 +l 10 6 +l 12 5 +m 17 5 +l 19 6 +l 20 7 +l 21 9 +l 21 12 +l 20 14 +l 19 15 +l 17 16 +m 11 21 +l 18 21 +m 11 0 +l 18 0 + +71 28 14 10 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 7 21 +l 22 21 +l 22 15 +l 21 21 +m 7 0 +l 14 0 + +72 28 14 18 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 20 21 +l 20 0 +m 21 21 +l 21 0 +m 4 21 +l 11 21 +m 17 21 +l 24 21 +m 8 11 +l 20 11 +m 4 0 +l 11 0 +m 17 0 +l 24 0 + +73 28 14 8 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 11 21 +l 18 21 +m 11 0 +l 18 0 + +74 28 14 10 +m 6 21 +l 14 0 +m 7 21 +l 14 2 +m 22 21 +l 14 0 +m 6 21 +l 22 21 +m 7 20 +l 21 20 + +75 28 14 18 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 21 21 +l 8 8 +m 13 12 +l 21 0 +m 12 12 +l 20 0 +m 4 21 +l 11 21 +m 17 21 +l 23 21 +m 4 0 +l 11 0 +m 17 0 +l 23 0 + +76 28 14 10 +m 14 21 +l 7 0 +m 14 21 +l 21 0 +m 14 18 +l 20 0 +m 5 0 +l 11 0 +m 17 0 +l 23 0 + +77 28 14 20 +m 7 21 +l 7 0 +m 8 21 +l 14 3 +m 7 21 +l 14 0 +m 21 21 +l 14 0 +m 21 21 +l 21 0 +m 22 21 +l 22 0 +m 4 21 +l 8 21 +m 21 21 +l 25 21 +m 4 0 +l 10 0 +m 18 0 +l 25 0 + +78 28 14 14 +m 8 21 +l 8 0 +m 9 21 +l 21 2 +m 9 19 +l 21 0 +m 21 21 +l 21 0 +m 5 21 +l 9 21 +m 18 21 +l 24 21 +m 5 0 +l 11 0 + +79 28 14 41 +m 13 21 +l 10 20 +l 8 18 +l 7 16 +l 6 12 +l 6 9 +l 7 5 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +l 21 5 +l 22 9 +l 22 12 +l 21 16 +l 20 18 +l 18 20 +l 15 21 +l 13 21 +m 13 21 +l 11 20 +l 9 18 +l 8 16 +l 7 12 +l 7 9 +l 8 5 +l 9 3 +l 11 1 +l 13 0 +m 15 0 +l 17 1 +l 19 3 +l 20 5 +l 21 9 +l 21 12 +l 20 16 +l 19 18 +l 17 20 +l 15 21 + +80 28 14 14 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 20 21 +l 20 0 +m 21 21 +l 21 0 +m 4 21 +l 24 21 +m 4 0 +l 11 0 +m 17 0 +l 24 0 + +81 28 14 24 +m 7 22 +l 6 17 +m 22 22 +l 21 17 +m 11 13 +l 10 8 +m 18 13 +l 17 8 +m 7 4 +l 6 -1 +m 22 4 +l 21 -1 +m 7 20 +l 21 20 +m 7 19 +l 21 19 +m 11 11 +l 17 11 +m 11 10 +l 17 10 +m 7 2 +l 21 2 +m 7 1 +l 21 1 + +82 28 14 24 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 5 21 +l 17 21 +l 20 20 +l 21 19 +l 22 17 +l 22 14 +l 21 12 +l 20 11 +l 17 10 +l 9 10 +m 17 21 +l 19 20 +l 20 19 +l 21 17 +l 21 14 +l 20 12 +l 19 11 +l 17 10 +m 5 0 +l 12 0 + +83 28 14 15 +m 7 21 +l 14 11 +l 6 0 +m 6 21 +l 13 11 +m 6 21 +l 21 21 +l 22 15 +l 20 21 +m 7 1 +l 20 1 +m 6 0 +l 21 0 +l 22 6 +l 20 0 + +84 28 14 12 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 8 21 +l 7 15 +l 7 21 +l 22 21 +l 22 15 +l 21 21 +m 11 0 +l 18 0 + +85 28 14 28 +m 7 16 +l 7 18 +l 8 20 +l 9 21 +l 11 21 +l 12 20 +l 13 18 +l 14 14 +l 14 0 +m 7 18 +l 9 20 +l 11 20 +l 13 18 +m 22 16 +l 22 18 +l 21 20 +l 20 21 +l 18 21 +l 17 20 +l 16 18 +l 15 14 +l 15 0 +m 22 18 +l 20 20 +l 18 20 +l 16 18 +m 11 0 +l 18 0 + +86 28 14 49 +m 13 21 +l 10 20 +l 8 18 +l 7 16 +l 6 12 +l 6 9 +l 7 5 +l 8 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 20 3 +l 21 5 +l 22 9 +l 22 12 +l 21 16 +l 20 18 +l 18 20 +l 15 21 +l 13 21 +m 13 21 +l 11 20 +l 9 18 +l 8 16 +l 7 12 +l 7 9 +l 8 5 +l 9 3 +l 11 1 +l 13 0 +m 15 0 +l 17 1 +l 19 3 +l 20 5 +l 21 9 +l 21 12 +l 20 16 +l 19 18 +l 17 20 +l 15 21 +m 11 14 +l 11 7 +m 17 14 +l 17 7 +m 11 11 +l 17 11 +m 11 10 +l 17 10 + +87 28 14 38 +m 6 3 +l 7 0 +l 11 0 +l 9 4 +l 7 8 +l 6 11 +l 6 15 +l 7 18 +l 9 20 +l 12 21 +l 16 21 +l 19 20 +l 21 18 +l 22 15 +l 22 11 +l 21 8 +l 19 4 +l 17 0 +l 21 0 +l 22 3 +m 9 4 +l 8 7 +l 7 11 +l 7 15 +l 8 18 +l 10 20 +l 12 21 +m 16 21 +l 18 20 +l 20 18 +l 21 15 +l 21 11 +l 20 7 +l 19 4 +m 7 1 +l 10 1 +m 18 1 +l 21 1 + +88 28 14 14 +m 7 21 +l 20 0 +m 8 21 +l 21 0 +m 21 21 +l 7 0 +m 5 21 +l 11 21 +m 17 21 +l 23 21 +m 5 0 +l 11 0 +m 17 0 +l 23 0 + +89 28 14 34 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 5 14 +l 6 15 +l 8 14 +l 9 10 +l 10 8 +l 11 7 +l 13 6 +m 6 15 +l 7 14 +l 8 10 +l 9 8 +l 10 7 +l 13 6 +l 16 6 +l 19 7 +l 20 8 +l 21 10 +l 22 14 +l 23 15 +m 16 6 +l 18 7 +l 19 8 +l 20 10 +l 21 14 +l 23 15 +l 24 14 +m 11 21 +l 18 21 +m 11 0 +l 18 0 + +90 28 14 12 +m 20 21 +l 7 0 +m 21 21 +l 8 0 +m 8 21 +l 7 15 +l 7 21 +l 21 21 +m 7 0 +l 21 0 +l 21 6 +l 20 0 + +91 28 14 8 +m 11 25 +l 11 -7 +m 12 25 +l 12 -7 +m 11 25 +l 18 25 +m 11 -7 +l 18 -7 + +92 28 14 2 +m 5 25 +l 21 -7 + +93 28 14 8 +m 16 25 +l 16 -7 +m 17 25 +l 17 -7 +m 10 25 +l 17 25 +m 10 -7 +l 17 -7 + +94 28 14 3 +m 3 19 +l 14 25 +l 27 19 + +95 28 14 2 +m 0 -7 +l 27 -7 + +96 28 14 3 +m 13 21 +l 15 14 +l 14 21 + +97 28 14 36 +m 13 14 +l 10 13 +l 8 11 +l 7 9 +l 6 6 +l 6 3 +l 7 1 +l 10 0 +l 12 0 +l 14 1 +l 17 4 +l 19 7 +l 21 11 +l 22 14 +m 13 14 +l 11 13 +l 9 11 +l 8 9 +l 7 6 +l 7 3 +l 8 1 +l 10 0 +m 13 14 +l 15 14 +l 17 13 +l 18 11 +l 20 3 +l 21 1 +l 22 0 +m 15 14 +l 16 13 +l 17 11 +l 19 3 +l 20 1 +l 22 0 +l 23 0 + +98 28 14 51 +m 16 21 +l 13 20 +l 11 18 +l 9 14 +l 8 11 +l 7 7 +l 6 1 +l 5 -7 +m 16 21 +l 14 20 +l 12 18 +l 10 14 +l 9 11 +l 8 7 +l 7 1 +l 6 -7 +m 16 21 +l 18 21 +l 20 20 +l 21 19 +l 21 16 +l 20 14 +l 19 13 +l 16 12 +l 12 12 +m 18 21 +l 20 19 +l 20 16 +l 19 14 +l 18 13 +l 16 12 +m 12 12 +l 16 11 +l 18 9 +l 19 7 +l 19 4 +l 18 2 +l 17 1 +l 14 0 +l 12 0 +l 10 1 +l 9 2 +l 8 5 +m 12 12 +l 15 11 +l 17 9 +l 18 7 +l 18 4 +l 17 2 +l 16 1 +l 14 0 + +99 28 14 17 +m 13 16 +l 10 15 +l 8 13 +l 7 10 +l 7 8 +l 8 5 +l 10 3 +l 13 2 +l 15 2 +l 18 3 +l 20 5 +l 21 8 +l 21 10 +l 20 13 +l 18 15 +l 15 16 +l 13 16 + +100 28 14 41 +m 18 13 +l 16 14 +l 14 14 +l 11 13 +l 9 10 +l 8 7 +l 8 4 +l 9 2 +l 10 1 +l 12 0 +l 14 0 +l 17 1 +l 19 4 +l 20 7 +l 20 10 +l 19 12 +l 15 17 +l 14 19 +l 14 21 +l 15 22 +l 17 22 +l 19 21 +l 21 19 +m 14 14 +l 12 13 +l 10 10 +l 9 7 +l 9 3 +l 10 1 +m 14 0 +l 16 1 +l 18 4 +l 19 7 +l 19 11 +l 18 13 +l 16 16 +l 15 18 +l 15 20 +l 16 21 +l 18 21 +l 21 19 + +101 28 14 28 +m 20 11 +l 18 13 +l 16 14 +l 12 14 +l 10 13 +l 10 11 +l 12 9 +l 15 8 +m 12 14 +l 11 13 +l 11 11 +l 13 9 +l 15 8 +m 15 8 +l 10 7 +l 8 5 +l 8 3 +l 9 1 +l 12 0 +l 15 0 +l 17 1 +l 19 3 +m 15 8 +l 11 7 +l 9 5 +l 9 3 +l 10 1 +l 12 0 + +102 28 14 34 +m 11 13 +l 9 12 +l 7 10 +l 6 7 +l 6 4 +l 7 2 +l 8 1 +l 10 0 +l 13 0 +l 16 1 +l 19 3 +l 21 6 +l 22 9 +l 22 12 +l 20 14 +l 18 14 +l 16 12 +l 14 8 +l 12 3 +l 9 -7 +m 6 4 +l 8 2 +l 10 1 +l 13 1 +l 16 2 +l 19 4 +l 21 6 +m 22 12 +l 20 13 +l 18 13 +l 16 11 +l 14 8 +l 12 2 +l 10 -7 + +103 28 14 24 +m 5 11 +l 7 13 +l 9 14 +l 11 14 +l 13 13 +l 14 12 +l 15 9 +l 15 5 +l 14 1 +l 11 -7 +m 6 12 +l 8 13 +l 12 13 +l 14 12 +m 22 14 +l 21 11 +l 20 9 +l 15 2 +l 12 -3 +l 10 -7 +m 21 14 +l 20 11 +l 19 9 +l 15 2 + +104 28 14 28 +m 4 10 +l 5 12 +l 7 14 +l 10 14 +l 11 13 +l 11 11 +l 10 7 +l 8 0 +m 9 14 +l 10 13 +l 10 11 +l 9 7 +l 7 0 +m 10 7 +l 12 11 +l 14 13 +l 16 14 +l 18 14 +l 20 13 +l 21 12 +l 21 9 +l 20 4 +l 17 -7 +m 18 14 +l 20 12 +l 20 9 +l 19 4 +l 16 -7 + +105 28 14 13 +m 14 14 +l 12 7 +l 11 3 +l 11 1 +l 12 0 +l 15 0 +l 17 2 +l 18 4 +m 15 14 +l 13 7 +l 12 3 +l 12 1 +l 13 0 + +106 28 14 41 +m 20 9 +l 19 12 +l 18 13 +l 16 14 +l 14 14 +l 11 13 +l 9 10 +l 8 7 +l 8 4 +l 9 2 +l 10 1 +l 12 0 +l 14 0 +l 17 1 +l 19 3 +l 20 6 +l 21 11 +l 21 16 +l 20 19 +l 19 20 +l 17 21 +l 14 21 +l 12 20 +l 11 19 +l 11 18 +l 12 18 +l 12 19 +m 14 14 +l 12 13 +l 10 10 +l 9 7 +l 9 3 +l 10 1 +m 14 0 +l 16 1 +l 18 3 +l 19 6 +l 20 11 +l 20 16 +l 19 19 +l 17 21 + +107 28 14 24 +m 10 14 +l 6 0 +m 11 14 +l 7 0 +m 20 14 +l 21 13 +l 22 13 +l 21 14 +l 19 14 +l 17 13 +l 13 9 +l 11 8 +l 9 8 +m 11 8 +l 13 7 +l 15 1 +l 16 0 +m 11 8 +l 12 7 +l 14 1 +l 15 0 +l 17 0 +l 19 1 +l 21 4 + +108 28 14 19 +m 7 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 19 3 +l 20 1 +l 21 0 +m 9 21 +l 11 19 +l 12 17 +l 18 3 +l 19 1 +l 21 0 +l 22 0 +m 14 14 +l 6 0 +m 14 14 +l 7 0 + +109 28 14 23 +m 9 14 +l 3 -7 +m 10 14 +l 4 -7 +m 9 11 +l 8 5 +l 8 2 +l 10 0 +l 12 0 +l 14 1 +l 16 3 +l 18 6 +m 20 14 +l 17 3 +l 17 1 +l 18 0 +l 21 0 +l 23 2 +l 24 4 +m 21 14 +l 18 3 +l 18 1 +l 19 0 + +110 28 14 19 +m 10 14 +l 8 0 +m 11 14 +l 10 8 +l 9 3 +l 8 0 +m 21 14 +l 20 10 +l 18 6 +m 22 14 +l 21 11 +l 20 9 +l 18 6 +l 16 4 +l 13 2 +l 11 1 +l 8 0 +m 7 14 +l 11 14 + +111 28 14 29 +m 14 14 +l 11 13 +l 9 10 +l 8 7 +l 8 4 +l 9 2 +l 10 1 +l 12 0 +l 14 0 +l 17 1 +l 19 4 +l 20 7 +l 20 10 +l 19 12 +l 18 13 +l 16 14 +l 14 14 +m 14 14 +l 12 13 +l 10 10 +l 9 7 +l 9 3 +l 10 1 +m 14 0 +l 16 1 +l 18 4 +l 19 7 +l 19 11 +l 18 13 + +112 28 14 16 +m 12 13 +l 8 0 +m 12 13 +l 9 0 +m 18 13 +l 18 0 +m 18 13 +l 19 0 +m 5 11 +l 7 13 +l 10 14 +l 23 14 +m 5 11 +l 7 12 +l 10 13 +l 23 13 + +113 28 14 40 +m 16 21 +l 14 20 +l 13 19 +l 13 18 +l 14 17 +l 17 16 +l 20 16 +m 17 16 +l 13 15 +l 11 14 +l 10 12 +l 10 10 +l 12 8 +l 15 7 +l 18 7 +m 17 16 +l 14 15 +l 12 14 +l 11 12 +l 11 10 +l 13 8 +l 15 7 +m 15 7 +l 11 6 +l 9 5 +l 8 3 +l 8 1 +l 10 -1 +l 15 -3 +l 16 -4 +l 16 -6 +l 14 -7 +l 12 -7 +m 15 7 +l 12 6 +l 10 5 +l 9 3 +l 9 1 +l 11 -1 +l 15 -3 + +114 28 14 28 +m 8 5 +l 9 2 +l 10 1 +l 12 0 +l 14 0 +l 17 1 +l 19 4 +l 20 7 +l 20 10 +l 19 12 +l 18 13 +l 16 14 +l 14 14 +l 11 13 +l 9 10 +l 8 7 +l 4 -7 +m 14 0 +l 16 1 +l 18 4 +l 19 7 +l 19 11 +l 18 13 +m 14 14 +l 12 13 +l 10 10 +l 9 7 +l 5 -7 + +115 28 14 31 +m 23 14 +l 13 14 +l 10 13 +l 8 10 +l 7 7 +l 7 4 +l 8 2 +l 9 1 +l 11 0 +l 13 0 +l 16 1 +l 18 4 +l 19 7 +l 19 10 +l 18 12 +l 17 13 +l 15 14 +m 13 14 +l 11 13 +l 9 10 +l 8 7 +l 8 3 +l 9 1 +m 13 0 +l 15 1 +l 17 4 +l 18 7 +l 18 11 +l 17 13 +m 17 13 +l 23 13 + +116 28 14 12 +m 15 13 +l 12 0 +m 15 13 +l 13 0 +m 6 11 +l 8 13 +l 11 14 +l 22 14 +m 6 11 +l 8 12 +l 11 13 +l 22 13 + +117 28 14 24 +m 5 10 +l 6 12 +l 8 14 +l 11 14 +l 12 13 +l 12 11 +l 10 5 +l 10 2 +l 12 0 +m 10 14 +l 11 13 +l 11 11 +l 9 5 +l 9 2 +l 10 1 +l 12 0 +l 13 0 +l 16 1 +l 18 3 +l 20 6 +l 21 10 +l 21 14 +l 20 14 +l 21 12 + +118 28 14 41 +m 3 10 +l 4 12 +l 6 14 +l 9 14 +l 10 13 +l 10 11 +l 9 6 +l 9 3 +l 10 1 +l 11 0 +m 8 14 +l 9 13 +l 9 11 +l 8 6 +l 8 3 +l 9 1 +l 11 0 +l 13 0 +l 15 1 +l 17 3 +l 19 6 +l 20 9 +l 21 14 +l 21 18 +l 20 20 +l 18 21 +l 16 21 +l 14 19 +l 14 17 +l 15 14 +l 17 11 +l 19 9 +l 22 7 +m 15 1 +l 17 4 +l 18 6 +l 19 9 +l 20 14 +l 20 18 +l 19 20 +l 18 21 + +119 28 14 38 +m 8 13 +l 10 13 +l 10 14 +l 8 13 +l 6 10 +l 5 7 +l 5 4 +l 6 1 +l 7 0 +l 9 0 +l 11 1 +l 13 4 +l 14 7 +m 5 4 +l 6 2 +l 7 1 +l 9 1 +l 11 2 +l 13 4 +m 13 7 +l 13 4 +l 14 1 +l 15 0 +l 17 0 +l 19 1 +l 21 4 +l 22 7 +l 22 10 +l 21 13 +l 20 14 +l 20 13 +l 21 13 +m 13 4 +l 14 2 +l 15 1 +l 17 1 +l 19 2 +l 21 4 + +120 28 14 20 +m 7 14 +l 9 14 +l 11 13 +l 12 11 +l 17 -4 +l 18 -6 +l 19 -7 +m 9 14 +l 10 13 +l 11 11 +l 16 -4 +l 17 -6 +l 19 -7 +l 21 -7 +m 22 14 +l 21 12 +l 19 9 +l 9 -2 +l 7 -5 +l 6 -7 + +121 28 14 30 +m 17 21 +l 11 -7 +m 18 21 +l 10 -7 +m 3 10 +l 4 12 +l 6 14 +l 9 14 +l 10 13 +l 10 11 +l 9 6 +l 9 3 +l 11 1 +l 14 1 +l 16 2 +l 19 5 +l 21 8 +m 8 14 +l 9 13 +l 9 11 +l 8 6 +l 8 3 +l 9 1 +l 11 0 +l 14 0 +l 16 1 +l 18 3 +l 20 6 +l 21 8 +l 23 14 + +122 28 14 29 +m 16 21 +l 14 20 +l 13 19 +l 13 18 +l 14 17 +l 17 16 +l 22 16 +l 22 17 +l 19 16 +l 15 14 +l 12 12 +l 9 9 +l 8 6 +l 8 4 +l 9 2 +l 12 0 +l 15 -2 +l 16 -4 +l 16 -6 +l 15 -7 +l 13 -7 +l 12 -6 +m 17 15 +l 13 12 +l 10 9 +l 9 6 +l 9 4 +l 10 2 +l 12 0 + +123 28 14 23 +m 16 25 +l 13 22 +l 12 19 +l 12 17 +l 13 14 +l 16 11 +m 14 23 +l 13 20 +l 13 16 +l 14 13 +m 16 11 +l 13 9 +l 16 7 +m 16 7 +l 13 4 +l 12 1 +l 12 -1 +l 13 -4 +l 16 -7 +m 14 5 +l 13 2 +l 13 -2 +l 14 -5 + +124 28 14 2 +m 14 25 +l 14 -7 + +125 28 14 23 +m 12 25 +l 15 22 +l 16 19 +l 16 17 +l 15 14 +l 12 11 +m 14 23 +l 15 20 +l 15 16 +l 14 13 +m 12 11 +l 15 9 +l 12 7 +m 12 7 +l 15 4 +l 16 1 +l 16 -1 +l 15 -4 +l 12 -7 +m 14 5 +l 15 2 +l 15 -2 +l 14 -5 + +126 28 14 22 +m 5 17 +l 5 19 +l 6 22 +l 8 23 +l 10 23 +l 12 22 +l 16 19 +l 18 18 +l 20 18 +l 22 19 +l 23 21 +m 5 19 +l 6 21 +l 8 22 +l 10 22 +l 12 21 +l 16 18 +l 18 17 +l 20 17 +l 22 18 +l 23 21 +l 23 23 + +127 28 14 4 +m 14 17 +l 7 5 +l 21 5 +l 14 17 diff --git a/cd/etc/vectorfont03.txt b/cd/etc/vectorfont03.txt new file mode 100755 index 0000000..f94d8a0 --- /dev/null +++ b/cd/etc/vectorfont03.txt @@ -0,0 +1,2879 @@ +Complex +25 21 9 -7 + + +0 18 5 42 +m 8 18 +l 7 17 +l 8 16 +l 9 17 +l 9 18 +l 8 20 +l 6 21 +l 4 21 +l 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 12 +l 9 9 +m 2 14 +l 7 11 +l 9 9 +l 10 7 +l 10 5 +l 9 3 +l 7 1 +m 3 13 +l 1 11 +l 0 9 +l 0 7 +l 1 5 +l 3 3 +l 8 0 +m 1 5 +l 6 2 +l 8 0 +l 9 -2 +l 9 -4 +l 8 -6 +l 6 -7 +l 4 -7 +l 2 -6 +l 1 -4 +l 1 -3 +l 2 -2 +l 3 -3 +l 2 -4 + +1 20 6 24 +m 6 21 +l 5 19 +l 6 17 +l 7 19 +l 6 21 +m 6 21 +l 6 -7 +m 6 10 +l 5 7 +l 6 -7 +l 7 7 +l 6 10 +m 0 14 +l 2 13 +l 4 14 +l 2 15 +l 0 14 +m 0 14 +l 12 14 +m 8 14 +l 10 13 +l 12 14 +l 10 15 +l 8 14 + +2 20 6 45 +m 6 21 +l 5 19 +l 6 17 +l 7 19 +l 6 21 +m 6 21 +l 6 7 +m 6 11 +l 5 9 +l 7 5 +l 6 3 +l 5 5 +l 7 9 +l 6 11 +m 6 7 +l 6 -7 +m 6 -3 +l 5 -5 +l 6 -7 +l 7 -5 +l 6 -3 +m 0 14 +l 2 13 +l 4 14 +l 2 15 +l 0 14 +m 0 14 +l 12 14 +m 8 14 +l 10 13 +l 12 14 +l 10 15 +l 8 14 +m 0 0 +l 2 -1 +l 4 0 +l 2 1 +l 0 0 +m 0 0 +l 12 0 +m 8 0 +l 10 -1 +l 12 0 +l 10 1 +l 8 0 + +3 29 10 35 +m 9 21 +l 6 20 +l 3 18 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 3 3 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 18 3 +l 20 6 +l 21 9 +l 21 12 +l 20 15 +l 18 18 +l 15 20 +l 12 21 +l 9 21 +m 10 12 +l 9 11 +l 9 10 +l 10 9 +l 11 9 +l 12 10 +l 12 11 +l 11 12 +l 10 12 +m 10 11 +l 10 10 +l 11 10 +l 11 11 +l 10 11 + +4 21 6 23 +m 6 21 +l 3 20 +l 1 18 +l 0 15 +l 0 14 +l 1 11 +l 3 9 +l 6 8 +l 7 8 +l 10 9 +l 12 11 +l 13 14 +l 13 15 +l 12 18 +l 10 20 +l 7 21 +l 6 21 +m 6 8 +l 6 0 +m 7 8 +l 7 0 +m 2 4 +l 11 4 + +5 30 11 25 +m 9 21 +l 6 20 +l 3 18 +l 1 15 +l 0 12 +l 0 8 +l 1 5 +l 3 2 +l 6 0 +l 9 -1 +l 13 -1 +l 16 0 +l 19 2 +l 21 5 +l 22 8 +l 22 12 +l 21 15 +l 19 18 +l 16 20 +l 13 21 +l 9 21 +m 11 21 +l 11 -1 +m 0 10 +l 22 10 + +6 27 9 27 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 7 +l 1 4 +l 3 2 +l 6 1 +l 7 1 +l 10 2 +l 12 4 +l 13 7 +l 13 8 +l 12 11 +l 10 13 +l 7 14 +l 6 14 +m 19 20 +l 13 20 +l 17 19 +l 11 13 +m 19 20 +l 19 14 +l 18 18 +l 12 12 +m 18 19 +l 12 13 + +7 16 4 27 +m 3 13 +l 1 12 +l 0 10 +l 0 8 +l 1 6 +l 3 5 +l 5 5 +l 7 6 +l 8 8 +l 8 10 +l 7 12 +l 5 13 +l 3 13 +m 1 10 +l 1 8 +m 2 11 +l 2 7 +m 3 12 +l 3 6 +m 4 12 +l 4 6 +m 5 12 +l 5 6 +m 6 11 +l 6 7 +m 7 10 +l 7 8 + +8 16 4 19 +m 0 13 +l 0 5 +l 8 5 +l 8 13 +l 0 13 +m 1 12 +l 1 6 +m 2 12 +l 2 6 +m 3 12 +l 3 6 +m 4 12 +l 4 6 +m 5 12 +l 5 6 +m 6 12 +l 6 6 +m 7 12 +l 7 6 + +9 18 5 12 +m 5 15 +l 0 6 +l 10 6 +l 5 15 +m 5 12 +l 2 7 +m 5 12 +l 8 7 +m 5 9 +l 4 7 +m 5 9 +l 6 7 + +10 17 4 12 +m 0 9 +l 9 4 +l 9 14 +l 0 9 +m 3 9 +l 8 6 +m 3 9 +l 8 12 +m 6 9 +l 8 8 +m 6 9 +l 8 10 + +11 18 5 12 +m 5 3 +l 10 12 +l 0 12 +l 5 3 +m 5 6 +l 8 11 +m 5 6 +l 2 11 +m 5 9 +l 6 11 +m 5 9 +l 4 11 + +12 17 4 12 +m 9 9 +l 0 14 +l 0 4 +l 9 9 +m 6 9 +l 1 12 +m 6 9 +l 1 6 +m 3 9 +l 1 10 +m 3 9 +l 1 8 + +13 20 6 16 +m 6 15 +l 2 4 +l 12 11 +l 0 11 +l 10 4 +l 6 15 +m 6 9 +l 6 15 +m 6 9 +l 0 11 +m 6 9 +l 2 4 +m 6 9 +l 10 4 +m 6 9 +l 12 11 + +14 15 3 8 +m 0 16 +l 0 2 +m 0 16 +l 7 13 +l 0 10 +m 1 14 +l 4 13 +l 1 12 + +15 24 8 11 +m 8 18 +l 6 12 +l 0 12 +l 5 8 +l 3 2 +l 8 6 +l 13 2 +l 11 8 +l 16 12 +l 10 12 +l 8 18 + +16 14 3 36 +m 5 15 +l 4 15 +l 4 14 +l 5 14 +l 5 15 +l 4 16 +l 2 16 +l 1 15 +l 1 13 +l 2 11 +l 5 9 +l 6 8 +m 1 13 +l 2 12 +l 5 10 +l 6 8 +l 6 6 +l 4 4 +m 2 11 +l 0 9 +l 0 7 +l 1 5 +l 4 3 +l 5 2 +m 0 7 +l 1 6 +l 4 4 +l 5 2 +l 5 0 +l 4 -1 +l 2 -1 +l 1 0 +l 1 1 +l 2 1 +l 2 0 +l 1 0 + +17 16 4 24 +m 4 16 +l 3 15 +l 4 14 +l 5 15 +l 4 16 +m 4 14 +l 4 10 +m 4 10 +l 3 8 +l 4 5 +l 5 8 +l 4 10 +m 4 5 +l 4 -1 +m 2 12 +l 1 13 +l 0 12 +l 1 11 +l 2 12 +l 6 12 +l 7 13 +l 8 12 +l 7 11 +l 6 12 + +18 16 4 38 +m 4 14 +l 5 15 +l 4 16 +l 3 15 +l 4 14 +l 4 10 +l 3 9 +l 5 6 +l 4 5 +m 4 10 +l 5 9 +l 3 6 +l 4 5 +l 4 1 +l 3 0 +l 4 -1 +l 5 0 +l 4 1 +m 2 12 +l 1 13 +l 0 12 +l 1 11 +l 2 12 +l 6 12 +l 7 13 +l 8 12 +l 7 11 +l 6 12 +m 2 3 +l 1 4 +l 0 3 +l 1 2 +l 2 3 +l 6 3 +l 7 4 +l 8 3 +l 7 2 +l 6 3 + +19 22 7 22 +m 6 16 +l 3 15 +l 1 13 +l 0 10 +l 0 8 +l 1 5 +l 3 3 +l 6 2 +l 8 2 +l 11 3 +l 13 5 +l 14 8 +l 14 10 +l 13 13 +l 11 15 +l 8 16 +l 6 16 +m 7 10 +l 6 9 +l 7 8 +l 8 9 +l 7 10 + +20 15 3 19 +m 3 16 +l 1 15 +l 0 13 +l 0 12 +l 1 10 +l 3 9 +l 4 9 +l 6 10 +l 7 12 +l 7 13 +l 6 15 +l 4 16 +l 3 16 +m 3 9 +l 3 3 +m 4 9 +l 4 3 +m 0 6 +l 7 6 + +21 22 7 21 +m 6 16 +l 3 15 +l 1 13 +l 0 10 +l 0 8 +l 1 5 +l 3 3 +l 6 2 +l 8 2 +l 11 3 +l 13 5 +l 14 8 +l 14 10 +l 13 13 +l 11 15 +l 8 16 +l 6 16 +m 7 16 +l 7 2 +m 0 9 +l 14 9 + +22 19 5 21 +m 6 9 +l 4 10 +l 3 10 +l 1 9 +l 0 7 +l 0 6 +l 1 4 +l 3 3 +l 4 3 +l 6 4 +l 7 6 +l 7 7 +l 6 9 +m 11 14 +l 6 9 +m 6 14 +l 11 14 +l 11 9 +m 6 14 +l 10 13 +l 11 9 + +23 10 1 7 +m 1 19 +l 0 20 +l 1 21 +l 2 20 +l 2 18 +l 1 16 +l 0 15 + +24 10 1 7 +m 2 21 +l 1 20 +l 0 18 +l 0 16 +l 1 15 +l 2 16 +l 1 17 + +25 10 1 7 +m 1 19 +l 2 20 +l 1 21 +l 0 20 +l 0 18 +l 1 16 +l 2 15 + +26 10 1 7 +m 0 21 +l 1 20 +l 2 18 +l 2 16 +l 1 15 +l 0 16 +l 1 17 + +27 16 4 16 +m 0 13 +l 1 10 +l 1 8 +l 0 5 +m 8 13 +l 7 10 +l 7 8 +l 8 5 +m 0 13 +l 3 12 +l 5 12 +l 8 13 +m 0 5 +l 3 6 +l 5 6 +l 8 5 + +28 28 10 16 +m 3 21 +l 3 0 +m 0 21 +l 19 21 +l 9 11 +l 19 1 +m 18 5 +l 19 2 +l 20 0 +m 18 5 +l 18 2 +m 15 2 +l 18 2 +m 15 2 +l 18 1 +l 20 0 + +29 19 5 34 +m 7 16 +l 5 14 +l 4 12 +l 2 6 +l 0 -1 +m 6 15 +l 5 13 +l 3 7 +l 1 -1 +m 7 16 +l 9 16 +l 11 15 +l 11 13 +l 10 11 +l 7 10 +m 9 16 +l 10 15 +l 10 13 +l 9 11 +l 7 10 +m 7 10 +l 9 9 +l 10 7 +l 10 5 +l 9 4 +l 7 3 +l 6 3 +l 4 4 +l 3 7 +m 7 10 +l 8 9 +l 9 7 +l 9 5 +l 7 3 + +30 20 6 5 +m 6 19 +l 0 9 +l 6 -1 +l 12 9 +l 6 19 + +31 30 11 21 +m 9 20 +l 6 19 +l 3 17 +l 1 14 +l 0 11 +l 0 7 +l 1 4 +l 3 1 +l 6 -1 +l 9 -2 +l 13 -2 +l 16 -1 +l 19 1 +l 21 4 +l 22 7 +l 22 11 +l 21 14 +l 19 17 +l 16 19 +l 13 20 +l 9 20 + +32 29 10 0 + +33 23 7 12 +m 14 21 +l 13 19 +l 14 7 +l 15 19 +l 14 21 +m 14 19 +l 14 13 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +34 18 5 8 +m 1 21 +l 0 14 +m 2 21 +l 0 14 +m 9 21 +l 8 14 +m 10 21 +l 8 14 + +35 23 7 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 22 7 38 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 13 18 +l 12 17 +l 13 16 +l 14 17 +l 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 14 7 +m 0 16 +l 2 14 +l 4 13 +l 10 11 +l 12 10 +l 13 9 +l 14 7 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 +l 0 4 +l 1 5 +l 2 4 +l 1 3 + +37 26 9 29 +m 18 21 +l 0 0 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 27 9 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 5 +l 12 3 +l 10 1 +l 8 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 10 1 4 +m 1 21 +l 0 14 +m 2 21 +l 0 14 + +40 15 3 18 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 +m 5 23 +l 3 19 +l 2 16 +l 1 11 +l 1 7 +l 2 2 +l 3 -1 +l 5 -5 + +41 15 3 18 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 +m 2 23 +l 4 19 +l 5 16 +l 6 11 +l 6 7 +l 5 2 +l 4 -1 +l 2 -5 + +42 18 5 6 +m 5 21 +l 5 9 +m 0 18 +l 10 12 +m 10 18 +l 0 12 + +43 26 9 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 10 1 7 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +45 26 9 2 +m 0 9 +l 18 9 + +46 10 1 5 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +47 26 9 2 +m 18 25 +l 0 -7 + +48 22 7 37 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 +m 6 21 +l 4 20 +l 3 19 +l 2 17 +l 1 12 +l 1 9 +l 2 4 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 4 +l 13 9 +l 13 12 +l 12 17 +l 11 19 +l 10 20 +l 8 21 + +49 17 4 8 +m 0 17 +l 2 18 +l 5 21 +l 5 0 +m 4 20 +l 4 0 +m 0 0 +l 9 0 + +50 22 7 41 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 10 11 +l 5 9 +l 3 8 +l 1 6 +l 0 3 +l 0 0 +m 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 9 11 +l 5 9 +m 0 2 +l 1 3 +l 3 3 +l 8 1 +l 11 1 +l 13 2 +l 14 3 +m 3 3 +l 8 0 +l 12 0 +l 13 1 +l 14 3 +l 14 5 + +51 22 7 42 +m 1 18 +l 2 17 +l 1 16 +l 0 17 +l 0 18 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 18 +l 13 15 +l 12 13 +l 9 12 +l 6 12 +m 9 21 +l 11 20 +l 12 18 +l 12 15 +l 11 13 +l 9 12 +m 9 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 12 10 +l 13 7 +l 13 4 +l 12 2 +l 11 1 +l 9 0 + +52 24 8 9 +m 10 19 +l 10 0 +m 11 21 +l 11 0 +m 11 21 +l 0 6 +l 16 6 +m 7 0 +l 14 0 + +53 22 7 34 +m 2 21 +l 0 11 +m 0 11 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 8 14 +l 10 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 10 1 +l 8 0 +m 2 21 +l 12 21 +m 2 20 +l 7 20 +l 12 21 + +54 22 7 45 +m 12 18 +l 11 17 +l 12 16 +l 13 17 +l 13 18 +l 12 20 +l 10 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 7 +l 13 10 +l 11 12 +l 8 13 +l 7 13 +l 4 12 +l 2 10 +l 1 7 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 8 13 + +55 22 7 26 +m 0 21 +l 0 15 +m 0 17 +l 1 19 +l 3 21 +l 5 21 +l 10 18 +l 12 18 +l 13 19 +l 14 21 +m 1 19 +l 3 20 +l 5 20 +l 10 18 +m 14 21 +l 14 18 +l 13 15 +l 9 10 +l 8 8 +l 7 5 +l 7 0 +m 13 15 +l 8 10 +l 7 8 +l 6 5 +l 6 0 + +56 22 7 57 +m 5 21 +l 2 20 +l 1 18 +l 1 15 +l 2 13 +l 5 12 +l 9 12 +l 12 13 +l 13 15 +l 13 18 +l 12 20 +l 9 21 +l 5 21 +m 5 21 +l 3 20 +l 2 18 +l 2 15 +l 3 13 +l 5 12 +m 9 12 +l 11 13 +l 12 15 +l 12 18 +l 11 20 +l 9 21 +m 5 12 +l 2 11 +l 1 10 +l 0 8 +l 0 4 +l 1 2 +l 2 1 +l 5 0 +l 9 0 +l 12 1 +l 13 2 +l 14 4 +l 14 8 +l 13 10 +l 12 11 +l 9 12 +m 5 12 +l 3 11 +l 2 10 +l 1 8 +l 1 4 +l 2 2 +l 3 1 +l 5 0 +m 9 0 +l 11 1 +l 12 2 +l 13 4 +l 13 8 +l 12 10 +l 11 11 +l 9 12 + +57 22 7 45 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 8 21 +l 11 20 +l 13 18 +l 14 15 +l 14 9 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 4 0 +l 2 1 +l 1 3 +l 1 4 +l 2 5 +l 3 4 +l 2 3 +m 6 8 +l 4 9 +l 2 11 +l 1 14 +l 1 15 +l 2 18 +l 4 20 +l 6 21 +m 8 21 +l 10 20 +l 12 18 +l 13 15 +l 13 9 +l 12 5 +l 11 3 +l 9 1 +l 7 0 + +58 10 1 10 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 10 1 12 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +60 24 8 3 +m 16 18 +l 0 9 +l 16 0 + +61 26 9 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 24 8 3 +m 0 18 +l 16 9 +l 0 0 + +63 20 6 29 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 10 20 +l 11 19 +l 12 17 +l 12 15 +l 11 13 +l 10 12 +l 6 10 +l 6 7 +m 7 21 +l 9 20 +l 10 19 +l 11 17 +l 11 15 +l 10 13 +l 8 11 +m 6 2 +l 5 1 +l 6 0 +l 7 1 +l 6 2 + +64 29 10 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 26 9 12 +m 9 21 +l 2 0 +m 9 21 +l 16 0 +m 9 18 +l 15 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +66 25 8 39 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 14 12 +l 12 11 +m 4 11 +l 12 11 +l 15 10 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 0 0 +m 12 11 +l 14 10 +l 15 9 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 12 0 + +67 23 7 30 +m 14 18 +l 15 15 +l 15 21 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +l 5 1 +l 7 0 + +68 25 8 26 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 10 21 +l 13 20 +l 15 18 +l 16 16 +l 17 13 +l 17 8 +l 16 5 +l 15 3 +l 13 1 +l 10 0 +l 0 0 +m 10 21 +l 12 20 +l 14 18 +l 15 16 +l 16 13 +l 16 8 +l 15 5 +l 14 3 +l 12 1 +l 10 0 + +69 24 8 16 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 10 15 +l 10 7 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 4 11 +l 10 11 +m 0 0 +l 16 0 +l 16 6 +l 15 0 + +70 24 8 14 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 10 15 +l 10 7 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 4 11 +l 10 11 +m 0 0 +l 7 0 + +71 26 9 35 +m 14 18 +l 15 15 +l 15 21 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 14 8 +l 14 0 +m 15 8 +l 15 0 +m 11 8 +l 18 8 + +72 28 10 18 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 16 21 +l 16 0 +m 17 21 +l 17 0 +m 0 21 +l 7 21 +m 13 21 +l 20 21 +m 4 11 +l 16 11 +m 0 0 +l 7 0 +m 13 0 +l 20 0 + +73 15 3 8 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 7 21 +m 0 0 +l 7 0 + +74 19 5 17 +m 8 21 +l 8 4 +l 7 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 7 21 +l 7 4 +l 6 1 +l 5 0 +m 4 21 +l 11 21 + +75 27 9 18 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 17 21 +l 4 8 +m 9 12 +l 17 0 +m 8 12 +l 16 0 +m 0 21 +l 7 21 +m 13 21 +l 19 21 +m 0 0 +l 7 0 +m 13 0 +l 19 0 + +76 23 7 10 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 7 21 +m 0 0 +l 15 0 +l 15 6 +l 14 0 + +77 29 10 20 +m 3 21 +l 3 0 +m 4 21 +l 10 3 +m 3 21 +l 10 0 +m 17 21 +l 10 0 +m 17 21 +l 17 0 +m 18 21 +l 18 0 +m 0 21 +l 4 21 +m 17 21 +l 21 21 +m 0 0 +l 6 0 +m 14 0 +l 21 0 + +78 27 9 14 +m 3 21 +l 3 0 +m 4 21 +l 16 2 +m 4 19 +l 16 0 +m 16 21 +l 16 0 +m 0 21 +l 4 21 +m 13 21 +l 19 21 +m 0 0 +l 6 0 + +79 24 8 41 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 9 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 5 +l 15 9 +l 15 12 +l 14 16 +l 13 18 +l 11 20 +l 9 21 + +80 25 8 24 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 14 +l 16 12 +l 15 11 +l 12 10 +l 4 10 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 14 +l 15 12 +l 14 11 +l 12 10 +m 0 0 +l 7 0 + +81 24 8 59 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 9 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 5 +l 15 9 +l 15 12 +l 14 16 +l 13 18 +l 11 20 +l 9 21 +m 4 2 +l 4 3 +l 5 5 +l 7 6 +l 8 6 +l 10 5 +l 11 3 +l 12 -4 +l 13 -5 +l 15 -5 +l 16 -3 +l 16 -2 +m 11 3 +l 12 -1 +l 13 -3 +l 14 -4 +l 15 -4 +l 16 -3 + +82 26 9 38 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +l 4 11 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 14 12 +l 12 11 +m 0 0 +l 7 0 +m 9 11 +l 11 10 +l 12 9 +l 15 2 +l 16 1 +l 17 1 +l 18 2 +m 11 10 +l 12 8 +l 14 1 +l 15 0 +l 17 0 +l 18 2 +l 18 3 + +83 22 7 32 +m 13 18 +l 14 21 +l 14 15 +l 13 18 +l 11 20 +l 8 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 14 7 +m 0 16 +l 2 14 +l 4 13 +l 10 11 +l 12 10 +l 13 9 +l 14 7 +l 14 3 +l 12 1 +l 9 0 +l 6 0 +l 3 1 +l 1 3 +l 0 6 +l 0 0 +l 1 3 + +84 23 7 12 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 1 21 +l 0 15 +l 0 21 +l 15 21 +l 15 15 +l 14 21 +m 4 0 +l 11 0 + +85 28 10 19 +m 3 21 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 21 +m 4 21 +l 4 6 +l 5 3 +l 7 1 +l 9 0 +m 0 21 +l 7 21 +m 14 21 +l 20 21 + +86 26 9 10 +m 2 21 +l 9 0 +m 3 21 +l 9 3 +m 16 21 +l 9 0 +m 0 21 +l 6 21 +m 12 21 +l 18 21 + +87 30 11 16 +m 3 21 +l 7 0 +m 4 21 +l 7 5 +m 11 21 +l 7 0 +m 11 21 +l 15 0 +m 12 21 +l 15 5 +m 19 21 +l 15 0 +m 0 21 +l 7 21 +m 16 21 +l 22 21 + +88 26 9 14 +m 2 21 +l 15 0 +m 3 21 +l 16 0 +m 16 21 +l 2 0 +m 0 21 +l 6 21 +m 12 21 +l 18 21 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +89 27 9 14 +m 2 21 +l 9 10 +l 9 0 +m 3 21 +l 10 10 +l 10 0 +m 17 21 +l 10 10 +m 0 21 +l 6 21 +m 13 21 +l 19 21 +m 6 0 +l 13 0 + +90 22 7 12 +m 13 21 +l 0 0 +m 14 21 +l 1 0 +m 1 21 +l 0 15 +l 0 21 +l 14 21 +m 0 0 +l 14 0 +l 14 6 +l 13 0 + +91 15 3 8 +m 0 25 +l 0 -7 +m 1 25 +l 1 -7 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +92 26 9 2 +m 0 25 +l 18 -7 + +93 15 3 8 +m 6 25 +l 6 -7 +m 7 25 +l 7 -7 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +94 30 11 3 +m 0 19 +l 11 25 +l 22 19 + +95 36 14 2 +m 0 -7 +l 28 -7 + +96 10 1 3 +m 0 21 +l 2 14 +l 1 21 + +97 23 7 35 +m 2 12 +l 2 11 +l 1 11 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +m 11 12 +l 11 3 +l 12 1 +l 14 0 +l 15 0 +m 11 10 +l 10 9 +l 4 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 11 3 +m 4 8 +l 2 7 +l 1 5 +l 1 3 +l 2 1 +l 4 0 + +98 24 8 28 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 4 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 8 0 +l 6 1 +l 4 3 +m 10 14 +l 12 13 +l 14 11 +l 15 8 +l 15 6 +l 14 3 +l 12 1 +l 10 0 +m 0 21 +l 4 21 + +99 21 6 26 +m 12 11 +l 11 10 +l 12 9 +l 13 10 +l 13 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 + +100 24 8 30 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 12 11 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 10 1 +l 12 3 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 9 21 +l 13 21 +m 12 0 +l 16 0 + +101 21 6 28 +m 1 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 8 +l 12 11 +l 11 13 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 + +102 17 4 18 +m 8 20 +l 7 19 +l 8 18 +l 9 19 +l 9 20 +l 8 21 +l 6 21 +l 4 20 +l 3 18 +l 3 0 +m 6 21 +l 5 20 +l 4 18 +l 4 0 +m 0 14 +l 8 14 +m 0 0 +l 7 0 + +103 22 7 54 +m 6 14 +l 4 13 +l 3 12 +l 2 10 +l 2 8 +l 3 6 +l 4 5 +l 6 4 +l 8 4 +l 10 5 +l 11 6 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 6 14 +m 4 13 +l 3 11 +l 3 7 +l 4 5 +m 10 5 +l 11 7 +l 11 11 +l 10 13 +m 11 12 +l 12 13 +l 14 14 +l 14 13 +l 12 13 +m 3 6 +l 2 5 +l 1 3 +l 1 2 +l 2 0 +l 5 -1 +l 10 -1 +l 13 -2 +l 14 -3 +m 1 2 +l 2 1 +l 5 0 +l 10 0 +l 13 -1 +l 14 -3 +l 14 -4 +l 13 -6 +l 10 -7 +l 4 -7 +l 1 -6 +l 0 -4 +l 0 -3 +l 1 -1 +l 4 0 + +104 26 9 21 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 0 21 +l 4 21 +m 0 0 +l 7 0 +m 11 0 +l 18 0 + +105 15 3 13 +m 3 21 +l 2 20 +l 3 19 +l 4 20 +l 3 21 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 0 14 +l 4 14 +m 0 0 +l 7 0 + +106 14 3 21 +m 5 21 +l 4 20 +l 5 19 +l 6 20 +l 5 21 +m 6 14 +l 6 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -5 +l 1 -4 +l 2 -5 +l 1 -6 +m 5 14 +l 5 -4 +l 4 -6 +l 3 -7 +m 2 14 +l 6 14 + +107 25 8 18 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 14 14 +l 4 4 +m 9 8 +l 15 0 +m 8 8 +l 14 0 +m 0 21 +l 4 21 +m 11 14 +l 17 14 +m 0 0 +l 7 0 +m 11 0 +l 17 0 + +108 15 3 8 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 4 21 +m 0 0 +l 7 0 + +109 37 14 34 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 15 11 +l 17 13 +l 20 14 +l 22 14 +l 25 13 +l 26 11 +l 26 0 +m 22 14 +l 24 13 +l 25 11 +l 25 0 +m 0 14 +l 4 14 +m 0 0 +l 7 0 +m 11 0 +l 18 0 +m 22 0 +l 29 0 + +110 26 9 21 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 0 14 +l 4 14 +m 0 0 +l 7 0 +m 11 0 +l 18 0 + +111 22 7 33 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 + +112 24 8 30 +m 3 14 +l 3 -7 +m 4 14 +l 4 -7 +m 4 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 8 0 +l 6 1 +l 4 3 +m 10 14 +l 12 13 +l 14 11 +l 15 8 +l 15 6 +l 14 3 +l 12 1 +l 10 0 +m 0 14 +l 4 14 +m 0 -7 +l 7 -7 + +113 24 8 28 +m 12 14 +l 12 -7 +m 13 14 +l 13 -7 +m 12 11 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 10 1 +l 12 3 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 9 -7 +l 16 -7 + +114 21 6 18 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 4 8 +l 5 11 +l 7 13 +l 9 14 +l 12 14 +l 13 13 +l 13 12 +l 12 11 +l 11 12 +l 12 13 +m 0 14 +l 4 14 +m 0 0 +l 7 0 + +115 19 5 30 +m 10 12 +l 11 14 +l 11 10 +l 10 12 +l 9 13 +l 7 14 +l 3 14 +l 1 13 +l 0 12 +l 0 10 +l 1 9 +l 3 8 +l 8 6 +l 10 5 +l 11 4 +m 0 11 +l 1 10 +l 3 9 +l 8 7 +l 10 6 +l 11 5 +l 11 2 +l 10 1 +l 8 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 +l 0 0 +l 1 2 + +116 19 5 13 +m 3 21 +l 3 4 +l 4 1 +l 6 0 +l 8 0 +l 10 1 +l 11 3 +m 4 21 +l 4 4 +l 5 1 +l 6 0 +m 0 14 +l 8 14 + +117 26 9 21 +m 3 14 +l 3 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 4 14 +l 4 3 +l 5 1 +l 7 0 +m 14 14 +l 14 0 +m 15 14 +l 15 0 +m 0 14 +l 4 14 +m 11 14 +l 15 14 +m 14 0 +l 18 0 + +118 24 8 10 +m 2 14 +l 8 0 +m 3 14 +l 8 2 +m 14 14 +l 8 0 +m 0 14 +l 6 14 +m 10 14 +l 16 14 + +119 30 11 16 +m 3 14 +l 7 0 +m 4 14 +l 7 3 +m 11 14 +l 7 0 +m 11 14 +l 15 0 +m 12 14 +l 15 3 +m 19 14 +l 15 0 +m 0 14 +l 7 14 +m 16 14 +l 22 14 + +120 24 8 14 +m 2 14 +l 13 0 +m 3 14 +l 14 0 +m 14 14 +l 2 0 +m 0 14 +l 6 14 +m 10 14 +l 16 14 +m 0 0 +l 6 0 +m 10 0 +l 16 0 + +121 24 8 17 +m 2 14 +l 8 0 +m 3 14 +l 8 2 +m 14 14 +l 8 0 +l 6 -4 +l 4 -6 +l 2 -7 +l 1 -7 +l 0 -6 +l 1 -5 +l 2 -6 +m 0 14 +l 6 14 +m 10 14 +l 16 14 + +122 20 6 12 +m 11 14 +l 0 0 +m 12 14 +l 1 0 +m 1 14 +l 0 10 +l 0 14 +l 12 14 +m 0 0 +l 12 0 +l 12 4 +l 11 0 + +123 12 2 23 +m 4 25 +l 1 22 +l 0 19 +l 0 17 +l 1 14 +l 4 11 +m 2 23 +l 1 20 +l 1 16 +l 2 13 +m 4 11 +l 1 9 +l 4 7 +m 4 7 +l 1 4 +l 0 1 +l 0 -1 +l 1 -4 +l 4 -7 +m 2 5 +l 1 2 +l 1 -2 +l 2 -5 + +124 29 10 4 +m 0 25 +l 0 12 +m 0 6 +l 0 -7 + +125 12 2 23 +m 0 25 +l 3 22 +l 4 19 +l 4 17 +l 3 14 +l 0 11 +m 2 23 +l 3 20 +l 3 16 +l 2 13 +m 0 11 +l 3 9 +l 0 7 +m 0 7 +l 3 4 +l 4 1 +l 4 -1 +l 3 -4 +l 0 -7 +m 2 5 +l 3 2 +l 3 -2 +l 2 -5 + +126 26 9 22 +m 0 17 +l 0 19 +l 1 22 +l 3 23 +l 5 23 +l 7 22 +l 11 19 +l 13 18 +l 15 18 +l 17 19 +l 18 21 +m 0 19 +l 1 21 +l 3 22 +l 5 22 +l 7 21 +l 11 18 +l 13 17 +l 15 17 +l 17 18 +l 18 21 +l 18 23 + +127 36 14 42 +m 0 21 +l 2 25 +m 4 25 +l 0 17 +m 0 13 +l 6 25 +m 8 25 +l 0 9 +m 0 5 +l 10 25 +m 12 25 +l 0 1 +m 0 -3 +l 14 25 +m 16 25 +l 0 -7 +m 2 -7 +l 18 25 +m 20 25 +l 4 -7 +m 6 -7 +l 22 25 +m 24 25 +l 8 -7 +m 10 -7 +l 26 25 +m 28 25 +l 12 -7 +m 14 -7 +l 28 21 +m 28 17 +l 16 -7 +m 18 -7 +l 28 13 +m 28 9 +l 20 -7 +m 22 -7 +l 28 5 +m 28 1 +l 24 -7 +m 26 -7 +l 28 -3 diff --git a/cd/etc/vectorfont04.txt b/cd/etc/vectorfont04.txt new file mode 100755 index 0000000..c1f0d85 --- /dev/null +++ b/cd/etc/vectorfont04.txt @@ -0,0 +1,2642 @@ +Grego +25 21 9 -7 + + +0 26 9 7 +m 0 12 +l 3 12 +l 9 4 +m 2 12 +l 9 3 +m 18 21 +l 9 3 + +1 28 10 30 +m 19 24 +l 18 23 +l 19 22 +l 20 23 +l 20 24 +l 19 25 +l 17 25 +l 15 24 +l 13 22 +l 12 20 +l 11 17 +l 10 13 +l 8 1 +l 7 -3 +l 6 -5 +m 14 23 +l 13 21 +l 12 17 +l 10 5 +l 9 1 +l 8 -2 +l 7 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -5 +l 1 -4 +l 2 -5 +l 1 -6 + +2 28 10 47 +m 19 24 +l 18 23 +l 19 22 +l 20 23 +l 20 24 +l 19 25 +l 17 25 +l 15 24 +l 13 22 +l 12 20 +l 11 17 +l 10 13 +l 8 1 +l 7 -3 +l 6 -5 +m 14 23 +l 13 21 +l 12 17 +l 10 5 +l 9 1 +l 8 -2 +l 7 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -5 +l 1 -4 +l 2 -5 +l 1 -6 +m 9 16 +l 6 15 +l 4 13 +l 3 10 +l 3 8 +l 4 5 +l 6 3 +l 9 2 +l 11 2 +l 14 3 +l 16 5 +l 17 8 +l 17 10 +l 16 13 +l 14 15 +l 11 16 +l 9 16 + +3 24 8 12 +m 16 17 +l 9 17 +l 5 16 +l 3 15 +l 1 13 +l 0 10 +l 0 8 +l 1 5 +l 3 3 +l 5 2 +l 9 1 +l 16 1 + +4 24 8 12 +m 0 17 +l 7 17 +l 11 16 +l 13 15 +l 15 13 +l 16 10 +l 16 8 +l 15 5 +l 13 3 +l 11 2 +l 7 1 +l 0 1 + +5 24 8 12 +m 0 17 +l 0 10 +l 1 6 +l 2 4 +l 4 2 +l 7 1 +l 9 1 +l 12 2 +l 14 4 +l 15 6 +l 16 10 +l 16 17 + +6 24 8 12 +m 0 1 +l 0 8 +l 1 12 +l 2 14 +l 4 16 +l 7 17 +l 9 17 +l 12 16 +l 14 14 +l 15 12 +l 16 8 +l 16 1 + +7 24 8 14 +m 16 17 +l 9 17 +l 5 16 +l 3 15 +l 1 13 +l 0 10 +l 0 8 +l 1 5 +l 3 3 +l 5 2 +l 9 1 +l 16 1 +m 0 9 +l 12 9 + +8 21 6 8 +m 13 21 +l 13 0 +m 0 21 +l 13 21 +m 5 11 +l 13 11 +m 0 0 +l 13 0 + +9 24 8 7 +m 16 21 +l 0 14 +l 16 7 +m 0 5 +l 16 5 +m 0 0 +l 16 0 + +10 24 8 7 +m 0 21 +l 16 14 +l 0 7 +m 0 5 +l 16 5 +m 0 0 +l 16 0 + +11 26 9 6 +m 16 18 +l 2 0 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +12 22 7 4 +m 0 16 +l 14 2 +m 14 16 +l 0 2 + +13 26 9 12 +m 9 18 +l 8 17 +l 9 16 +l 10 17 +l 9 18 +m 0 9 +l 18 9 +m 9 2 +l 8 1 +l 9 0 +l 10 1 +l 9 2 + +14 26 9 6 +m 0 14 +l 18 14 +m 0 9 +l 18 9 +m 0 4 +l 18 4 + +15 14 3 4 +m 0 25 +l 0 0 +m 6 25 +l 6 0 + +16 26 9 4 +m 9 25 +l 9 0 +m 0 0 +l 18 0 + +17 26 9 3 +m 18 25 +l 0 0 +l 18 0 + +18 30 11 20 +m 2 4 +l 1 5 +l 0 7 +l 0 10 +l 1 12 +l 2 13 +l 4 14 +l 6 14 +l 8 13 +l 9 12 +l 13 6 +l 14 5 +l 16 4 +l 18 4 +l 20 5 +l 21 6 +l 22 8 +l 22 11 +l 21 13 +l 20 14 + +19 28 10 15 +m 10 18 +l 9 17 +l 10 16 +l 11 17 +l 10 18 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 +m 19 2 +l 18 1 +l 19 0 +l 20 1 +l 19 2 + +20 27 9 25 +m 19 8 +l 18 6 +l 16 5 +l 14 5 +l 12 6 +l 11 7 +l 8 11 +l 7 12 +l 5 13 +l 3 13 +l 1 12 +l 0 10 +l 0 8 +l 1 6 +l 3 5 +l 5 5 +l 7 6 +l 8 7 +l 11 11 +l 12 12 +l 14 13 +l 16 13 +l 18 12 +l 19 10 +l 19 8 + +21 25 8 20 +m 17 4 +l 15 4 +l 13 5 +l 11 7 +l 8 11 +l 7 12 +l 5 13 +l 3 13 +l 1 12 +l 0 10 +l 0 8 +l 1 6 +l 3 5 +l 5 5 +l 7 6 +l 8 7 +l 11 11 +l 13 13 +l 15 14 +l 17 14 + +22 24 8 6 +m 8 17 +l 8 0 +m 0 9 +l 16 9 +m 0 0 +l 16 0 + +23 24 8 6 +m 8 17 +l 8 0 +m 0 17 +l 16 17 +m 0 9 +l 16 9 + +24 36 14 6 +m 0 9 +l 28 9 +m 6 2 +l 22 2 +m 12 -5 +l 16 -5 + +25 26 9 8 +m 15 11 +l 18 9 +l 15 7 +m 12 14 +l 17 9 +l 12 4 +m 0 9 +l 17 9 + +26 18 5 8 +m 3 15 +l 5 18 +l 7 15 +m 0 12 +l 5 17 +l 10 12 +m 5 17 +l 5 0 + +27 26 9 8 +m 3 11 +l 0 9 +l 3 7 +m 6 14 +l 1 9 +l 6 4 +m 1 9 +l 18 9 + +28 18 5 8 +m 3 3 +l 5 0 +l 7 3 +m 0 6 +l 5 1 +l 10 6 +m 5 18 +l 5 1 + +29 24 8 4 +m 8 23 +l 0 9 +m 8 23 +l 16 9 + +30 15 3 3 +m 7 25 +l 0 9 +l 7 -7 + +31 15 3 3 +m 0 25 +l 7 9 +l 0 -7 + +32 29 10 0 + +33 23 7 12 +m 14 21 +l 13 19 +l 14 7 +l 15 19 +l 14 21 +m 14 19 +l 14 13 +m 14 2 +l 13 1 +l 14 0 +l 15 1 +l 14 2 + +34 18 5 8 +m 1 21 +l 0 14 +m 2 21 +l 0 14 +m 9 21 +l 8 14 +m 10 21 +l 8 14 + +35 23 7 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 22 7 38 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 13 18 +l 12 17 +l 13 16 +l 14 17 +l 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 14 7 +m 0 16 +l 2 14 +l 4 13 +l 10 11 +l 12 10 +l 13 9 +l 14 7 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 +l 0 4 +l 1 5 +l 2 4 +l 1 3 + +37 26 9 29 +m 18 21 +l 0 0 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 27 9 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 5 +l 12 3 +l 10 1 +l 8 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 10 1 4 +m 1 21 +l 0 14 +m 2 21 +l 0 14 + +40 15 3 18 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 +m 5 23 +l 3 19 +l 2 16 +l 1 11 +l 1 7 +l 2 2 +l 3 -1 +l 5 -5 + +41 15 3 18 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 +m 2 23 +l 4 19 +l 5 16 +l 6 11 +l 6 7 +l 5 2 +l 4 -1 +l 2 -5 + +42 18 5 6 +m 5 21 +l 5 9 +m 0 18 +l 10 12 +m 10 18 +l 0 12 + +43 26 9 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 10 1 7 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +45 26 9 2 +m 0 9 +l 18 9 + +46 10 1 5 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +47 26 9 2 +m 18 25 +l 0 -7 + +48 22 7 37 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 +m 6 21 +l 4 20 +l 3 19 +l 2 17 +l 1 12 +l 1 9 +l 2 4 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 4 +l 13 9 +l 13 12 +l 12 17 +l 11 19 +l 10 20 +l 8 21 + +49 17 4 8 +m 0 17 +l 2 18 +l 5 21 +l 5 0 +m 4 20 +l 4 0 +m 0 0 +l 9 0 + +50 22 7 41 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 10 11 +l 5 9 +l 3 8 +l 1 6 +l 0 3 +l 0 0 +m 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 9 11 +l 5 9 +m 0 2 +l 1 3 +l 3 3 +l 8 1 +l 11 1 +l 13 2 +l 14 3 +m 3 3 +l 8 0 +l 12 0 +l 13 1 +l 14 3 +l 14 5 + +51 22 7 42 +m 1 18 +l 2 17 +l 1 16 +l 0 17 +l 0 18 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 18 +l 13 15 +l 12 13 +l 9 12 +l 6 12 +m 9 21 +l 11 20 +l 12 18 +l 12 15 +l 11 13 +l 9 12 +m 9 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 12 10 +l 13 7 +l 13 4 +l 12 2 +l 11 1 +l 9 0 + +52 24 8 9 +m 10 19 +l 10 0 +m 11 21 +l 11 0 +m 11 21 +l 0 6 +l 16 6 +m 7 0 +l 14 0 + +53 22 7 34 +m 2 21 +l 0 11 +m 0 11 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 8 14 +l 10 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 10 1 +l 8 0 +m 2 21 +l 12 21 +m 2 20 +l 7 20 +l 12 21 + +54 22 7 45 +m 12 18 +l 11 17 +l 12 16 +l 13 17 +l 13 18 +l 12 20 +l 10 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 7 +l 13 10 +l 11 12 +l 8 13 +l 7 13 +l 4 12 +l 2 10 +l 1 7 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 8 13 + +55 22 7 26 +m 0 21 +l 0 15 +m 0 17 +l 1 19 +l 3 21 +l 5 21 +l 10 18 +l 12 18 +l 13 19 +l 14 21 +m 1 19 +l 3 20 +l 5 20 +l 10 18 +m 14 21 +l 14 18 +l 13 15 +l 9 10 +l 8 8 +l 7 5 +l 7 0 +m 13 15 +l 8 10 +l 7 8 +l 6 5 +l 6 0 + +56 22 7 57 +m 5 21 +l 2 20 +l 1 18 +l 1 15 +l 2 13 +l 5 12 +l 9 12 +l 12 13 +l 13 15 +l 13 18 +l 12 20 +l 9 21 +l 5 21 +m 5 21 +l 3 20 +l 2 18 +l 2 15 +l 3 13 +l 5 12 +m 9 12 +l 11 13 +l 12 15 +l 12 18 +l 11 20 +l 9 21 +m 5 12 +l 2 11 +l 1 10 +l 0 8 +l 0 4 +l 1 2 +l 2 1 +l 5 0 +l 9 0 +l 12 1 +l 13 2 +l 14 4 +l 14 8 +l 13 10 +l 12 11 +l 9 12 +m 5 12 +l 3 11 +l 2 10 +l 1 8 +l 1 4 +l 2 2 +l 3 1 +l 5 0 +m 9 0 +l 11 1 +l 12 2 +l 13 4 +l 13 8 +l 12 10 +l 11 11 +l 9 12 + +57 22 7 45 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 8 21 +l 11 20 +l 13 18 +l 14 15 +l 14 9 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 4 0 +l 2 1 +l 1 3 +l 1 4 +l 2 5 +l 3 4 +l 2 3 +m 6 8 +l 4 9 +l 2 11 +l 1 14 +l 1 15 +l 2 18 +l 4 20 +l 6 21 +m 8 21 +l 10 20 +l 12 18 +l 13 15 +l 13 9 +l 12 5 +l 11 3 +l 9 1 +l 7 0 + +58 10 1 10 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 10 1 12 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +60 24 8 3 +m 16 18 +l 0 9 +l 16 0 + +61 26 9 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 24 8 3 +m 0 18 +l 16 9 +l 0 0 + +63 20 6 29 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 10 20 +l 11 19 +l 12 17 +l 12 15 +l 11 13 +l 10 12 +l 6 10 +l 6 7 +m 7 21 +l 9 20 +l 10 19 +l 11 17 +l 11 15 +l 10 13 +l 8 11 +m 6 2 +l 5 1 +l 6 0 +l 7 1 +l 6 2 + +64 29 10 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 26 9 12 +m 9 21 +l 2 0 +m 9 21 +l 16 0 +m 9 18 +l 15 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +66 25 8 39 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 14 12 +l 12 11 +m 4 11 +l 12 11 +l 15 10 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 0 0 +m 12 11 +l 14 10 +l 15 9 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 12 0 + +67 20 6 5 +m 0 15 +l 0 3 +l 12 3 +l 12 15 +l 0 15 + +68 24 8 10 +m 8 21 +l 0 0 +m 8 21 +l 16 0 +m 8 18 +l 15 0 +m 1 1 +l 15 1 +m 0 0 +l 16 0 + +69 24 8 16 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 10 15 +l 10 7 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 4 11 +l 10 11 +m 0 0 +l 16 0 +l 16 6 +l 15 0 + +70 23 7 41 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 5 16 +l 2 15 +l 1 14 +l 0 12 +l 0 9 +l 1 7 +l 2 6 +l 5 5 +l 10 5 +l 13 6 +l 14 7 +l 15 9 +l 15 12 +l 14 14 +l 13 15 +l 10 16 +l 5 16 +m 5 16 +l 3 15 +l 2 14 +l 1 12 +l 1 9 +l 2 7 +l 3 6 +l 5 5 +m 10 5 +l 12 6 +l 13 7 +l 14 9 +l 14 12 +l 13 14 +l 12 15 +l 10 16 +m 4 21 +l 11 21 +m 4 0 +l 11 0 + +71 23 7 10 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 15 21 +l 15 15 +l 14 21 +m 0 0 +l 7 0 + +72 28 10 18 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 16 21 +l 16 0 +m 17 21 +l 17 0 +m 0 21 +l 7 21 +m 13 21 +l 20 21 +m 4 11 +l 16 11 +m 0 0 +l 7 0 +m 13 0 +l 20 0 + +73 15 3 8 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 7 21 +m 0 0 +l 7 0 + +74 24 8 10 +m 0 21 +l 8 0 +m 1 21 +l 8 2 +m 16 21 +l 8 0 +m 0 21 +l 16 21 +m 1 20 +l 15 20 + +75 27 9 18 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 17 21 +l 4 8 +m 9 12 +l 17 0 +m 8 12 +l 16 0 +m 0 21 +l 7 21 +m 13 21 +l 19 21 +m 0 0 +l 7 0 +m 13 0 +l 19 0 + +76 26 9 10 +m 9 21 +l 2 0 +m 9 21 +l 16 0 +m 9 18 +l 15 0 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +77 29 10 20 +m 3 21 +l 3 0 +m 4 21 +l 10 3 +m 3 21 +l 10 0 +m 17 21 +l 10 0 +m 17 21 +l 17 0 +m 18 21 +l 18 0 +m 0 21 +l 4 21 +m 17 21 +l 21 21 +m 0 0 +l 6 0 +m 14 0 +l 21 0 + +78 27 9 14 +m 3 21 +l 3 0 +m 4 21 +l 16 2 +m 4 19 +l 16 0 +m 16 21 +l 16 0 +m 0 21 +l 4 21 +m 13 21 +l 19 21 +m 0 0 +l 6 0 + +79 24 8 41 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 9 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 5 +l 15 9 +l 15 12 +l 14 16 +l 13 18 +l 11 20 +l 9 21 + +80 28 10 14 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 16 21 +l 16 0 +m 17 21 +l 17 0 +m 0 21 +l 20 21 +m 0 0 +l 7 0 +m 13 0 +l 20 0 + +81 24 8 24 +m 1 22 +l 0 17 +m 16 22 +l 15 17 +m 5 13 +l 4 8 +m 12 13 +l 11 8 +m 1 4 +l 0 -1 +m 16 4 +l 15 -1 +m 1 20 +l 15 20 +m 1 19 +l 15 19 +m 5 11 +l 11 11 +m 5 10 +l 11 10 +m 1 2 +l 15 2 +m 1 1 +l 15 1 + +82 25 8 24 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 14 +l 16 12 +l 15 11 +l 12 10 +l 4 10 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 14 +l 15 12 +l 14 11 +l 12 10 +m 0 0 +l 7 0 + +83 24 8 15 +m 1 21 +l 8 11 +l 0 0 +m 0 21 +l 7 11 +m 0 21 +l 15 21 +l 16 15 +l 14 21 +m 1 1 +l 14 1 +m 0 0 +l 15 0 +l 16 6 +l 14 0 + +84 23 7 12 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 1 21 +l 0 15 +l 0 21 +l 15 21 +l 15 15 +l 14 21 +m 4 0 +l 11 0 + +85 23 7 28 +m 0 16 +l 0 18 +l 1 20 +l 2 21 +l 4 21 +l 5 20 +l 6 18 +l 7 14 +l 7 0 +m 0 18 +l 2 20 +l 4 20 +l 6 18 +m 15 16 +l 15 18 +l 14 20 +l 13 21 +l 11 21 +l 10 20 +l 9 18 +l 8 14 +l 8 0 +m 15 18 +l 13 20 +l 11 20 +l 9 18 +m 4 0 +l 11 0 + +86 24 8 49 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 9 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 5 +l 15 9 +l 15 12 +l 14 16 +l 13 18 +l 11 20 +l 9 21 +m 5 14 +l 5 7 +m 11 14 +l 11 7 +m 5 11 +l 11 11 +m 5 10 +l 11 10 + +87 24 8 38 +m 0 3 +l 1 0 +l 5 0 +l 3 4 +l 1 8 +l 0 11 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 10 21 +l 13 20 +l 15 18 +l 16 15 +l 16 11 +l 15 8 +l 13 4 +l 11 0 +l 15 0 +l 16 3 +m 3 4 +l 2 7 +l 1 11 +l 1 15 +l 2 18 +l 4 20 +l 6 21 +m 10 21 +l 12 20 +l 14 18 +l 15 15 +l 15 11 +l 14 7 +l 13 4 +m 1 1 +l 4 1 +m 12 1 +l 15 1 + +88 26 9 14 +m 2 21 +l 15 0 +m 3 21 +l 16 0 +m 16 21 +l 2 0 +m 0 21 +l 6 21 +m 12 21 +l 18 21 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +89 27 9 34 +m 9 21 +l 9 0 +m 10 21 +l 10 0 +m 0 14 +l 1 15 +l 3 14 +l 4 10 +l 5 8 +l 6 7 +l 8 6 +m 1 15 +l 2 14 +l 3 10 +l 4 8 +l 5 7 +l 8 6 +l 11 6 +l 14 7 +l 15 8 +l 16 10 +l 17 14 +l 18 15 +m 11 6 +l 13 7 +l 14 8 +l 15 10 +l 16 14 +l 18 15 +l 19 14 +m 6 21 +l 13 21 +m 6 0 +l 13 0 + +90 22 7 12 +m 13 21 +l 0 0 +m 14 21 +l 1 0 +m 1 21 +l 0 15 +l 0 21 +l 14 21 +m 0 0 +l 14 0 +l 14 6 +l 13 0 + +91 15 3 8 +m 0 25 +l 0 -7 +m 1 25 +l 1 -7 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +92 24 8 2 +m 0 25 +l 16 -7 + +93 15 3 8 +m 6 25 +l 6 -7 +m 7 25 +l 7 -7 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +94 32 12 3 +m 0 19 +l 11 25 +l 24 19 + +95 35 13 2 +m 0 -7 +l 27 -7 + +96 10 1 3 +m 0 21 +l 2 14 +l 1 21 + +97 25 8 36 +m 7 14 +l 4 13 +l 2 11 +l 1 9 +l 0 6 +l 0 3 +l 1 1 +l 4 0 +l 6 0 +l 8 1 +l 11 4 +l 13 7 +l 15 11 +l 16 14 +m 7 14 +l 5 13 +l 3 11 +l 2 9 +l 1 6 +l 1 3 +l 2 1 +l 4 0 +m 7 14 +l 9 14 +l 11 13 +l 12 11 +l 14 3 +l 15 1 +l 16 0 +m 9 14 +l 10 13 +l 11 11 +l 13 3 +l 14 1 +l 16 0 +l 17 0 + +98 24 8 51 +m 11 21 +l 8 20 +l 6 18 +l 4 14 +l 3 11 +l 2 7 +l 1 1 +l 0 -7 +m 11 21 +l 9 20 +l 7 18 +l 5 14 +l 4 11 +l 3 7 +l 2 1 +l 1 -7 +m 11 21 +l 13 21 +l 15 20 +l 16 19 +l 16 16 +l 15 14 +l 14 13 +l 11 12 +l 7 12 +m 13 21 +l 15 19 +l 15 16 +l 14 14 +l 13 13 +l 11 12 +m 7 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 7 0 +l 5 1 +l 4 2 +l 3 5 +m 7 12 +l 10 11 +l 12 9 +l 13 7 +l 13 4 +l 12 2 +l 11 1 +l 9 0 + +99 22 7 17 +m 6 16 +l 3 15 +l 1 13 +l 0 10 +l 0 8 +l 1 5 +l 3 3 +l 6 2 +l 8 2 +l 11 3 +l 13 5 +l 14 8 +l 14 10 +l 13 13 +l 11 15 +l 8 16 +l 6 16 + +100 21 6 41 +m 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 4 +l 12 7 +l 12 10 +l 11 12 +l 7 17 +l 6 19 +l 6 21 +l 7 22 +l 9 22 +l 11 21 +l 13 19 +m 6 14 +l 4 13 +l 2 10 +l 1 7 +l 1 3 +l 2 1 +m 6 0 +l 8 1 +l 10 4 +l 11 7 +l 11 11 +l 10 13 +l 8 16 +l 7 18 +l 7 20 +l 8 21 +l 10 21 +l 13 19 + +101 20 6 28 +m 12 11 +l 10 13 +l 8 14 +l 4 14 +l 2 13 +l 2 11 +l 4 9 +l 7 8 +m 4 14 +l 3 13 +l 3 11 +l 5 9 +l 7 8 +m 7 8 +l 2 7 +l 0 5 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 11 3 +m 7 8 +l 3 7 +l 1 5 +l 1 3 +l 2 1 +l 4 0 + +102 24 8 34 +m 5 13 +l 3 12 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 7 0 +l 10 1 +l 13 3 +l 15 6 +l 16 9 +l 16 12 +l 14 14 +l 12 14 +l 10 12 +l 8 8 +l 6 3 +l 3 -7 +m 0 4 +l 2 2 +l 4 1 +l 7 1 +l 10 2 +l 13 4 +l 15 6 +m 16 12 +l 14 13 +l 12 13 +l 10 11 +l 8 8 +l 6 2 +l 4 -7 + +103 25 8 24 +m 0 11 +l 2 13 +l 4 14 +l 6 14 +l 8 13 +l 9 12 +l 10 9 +l 10 5 +l 9 1 +l 6 -7 +m 1 12 +l 3 13 +l 7 13 +l 9 12 +m 17 14 +l 16 11 +l 15 9 +l 10 2 +l 7 -3 +l 5 -7 +m 16 14 +l 15 11 +l 14 9 +l 10 2 + +104 25 8 28 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 11 +l 6 7 +l 4 0 +m 5 14 +l 6 13 +l 6 11 +l 5 7 +l 3 0 +m 6 7 +l 8 11 +l 10 13 +l 12 14 +l 14 14 +l 16 13 +l 17 12 +l 17 9 +l 16 4 +l 13 -7 +m 14 14 +l 16 12 +l 16 9 +l 15 4 +l 12 -7 + +105 15 3 13 +m 3 14 +l 1 7 +l 0 3 +l 0 1 +l 1 0 +l 4 0 +l 6 2 +l 7 4 +m 4 14 +l 2 7 +l 1 3 +l 1 1 +l 2 0 + +106 21 6 41 +m 12 9 +l 11 12 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +l 12 6 +l 13 11 +l 13 16 +l 12 19 +l 11 20 +l 9 21 +l 6 21 +l 4 20 +l 3 19 +l 3 18 +l 4 18 +l 4 19 +m 6 14 +l 4 13 +l 2 10 +l 1 7 +l 1 3 +l 2 1 +m 6 0 +l 8 1 +l 10 3 +l 11 6 +l 12 11 +l 12 16 +l 11 19 +l 9 21 + +107 24 8 24 +m 4 14 +l 0 0 +m 5 14 +l 1 0 +m 14 14 +l 15 13 +l 16 13 +l 15 14 +l 13 14 +l 11 13 +l 7 9 +l 5 8 +l 3 8 +m 5 8 +l 7 7 +l 9 1 +l 10 0 +m 5 8 +l 6 7 +l 8 1 +l 9 0 +l 11 0 +l 13 1 +l 15 4 + +108 24 8 19 +m 1 21 +l 3 21 +l 5 20 +l 6 19 +l 7 17 +l 13 3 +l 14 1 +l 15 0 +m 3 21 +l 5 19 +l 6 17 +l 12 3 +l 13 1 +l 15 0 +l 16 0 +m 8 14 +l 0 0 +m 8 14 +l 1 0 + +109 29 10 23 +m 6 14 +l 0 -7 +m 7 14 +l 1 -7 +m 6 11 +l 5 5 +l 5 2 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 6 +m 17 14 +l 14 3 +l 14 1 +l 15 0 +l 18 0 +l 20 2 +l 21 4 +m 18 14 +l 15 3 +l 15 1 +l 16 0 + +110 23 7 19 +m 3 14 +l 1 0 +m 4 14 +l 3 8 +l 2 3 +l 1 0 +m 14 14 +l 13 10 +l 11 6 +m 15 14 +l 14 11 +l 13 9 +l 11 6 +l 9 4 +l 6 2 +l 4 1 +l 1 0 +m 0 14 +l 4 14 + +111 20 6 29 +m 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 4 +l 12 7 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 6 14 +m 6 14 +l 4 13 +l 2 10 +l 1 7 +l 1 3 +l 2 1 +m 6 0 +l 8 1 +l 10 4 +l 11 7 +l 11 11 +l 10 13 + +112 26 9 16 +m 7 13 +l 3 0 +m 7 13 +l 4 0 +m 13 13 +l 13 0 +m 13 13 +l 14 0 +m 0 11 +l 2 13 +l 5 14 +l 18 14 +m 0 11 +l 2 12 +l 5 13 +l 18 13 + +113 20 6 40 +m 8 21 +l 6 20 +l 5 19 +l 5 18 +l 6 17 +l 9 16 +l 12 16 +m 9 16 +l 5 15 +l 3 14 +l 2 12 +l 2 10 +l 4 8 +l 7 7 +l 10 7 +m 9 16 +l 6 15 +l 4 14 +l 3 12 +l 3 10 +l 5 8 +l 7 7 +m 7 7 +l 3 6 +l 1 5 +l 0 3 +l 0 1 +l 2 -1 +l 7 -3 +l 8 -4 +l 8 -6 +l 6 -7 +l 4 -7 +m 7 7 +l 4 6 +l 2 5 +l 1 3 +l 1 1 +l 3 -1 +l 7 -3 + +114 24 8 28 +m 4 5 +l 5 2 +l 6 1 +l 8 0 +l 10 0 +l 13 1 +l 15 4 +l 16 7 +l 16 10 +l 15 12 +l 14 13 +l 12 14 +l 10 14 +l 7 13 +l 5 10 +l 4 7 +l 0 -7 +m 10 0 +l 12 1 +l 14 4 +l 15 7 +l 15 11 +l 14 13 +m 10 14 +l 8 13 +l 6 10 +l 5 7 +l 1 -7 + +115 24 8 31 +m 16 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 4 +l 12 7 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +m 6 14 +l 4 13 +l 2 10 +l 1 7 +l 1 3 +l 2 1 +m 6 0 +l 8 1 +l 10 4 +l 11 7 +l 11 11 +l 10 13 +m 10 13 +l 16 13 + +116 24 8 12 +m 9 13 +l 6 0 +m 9 13 +l 7 0 +m 0 11 +l 2 13 +l 5 14 +l 16 14 +m 0 11 +l 2 12 +l 5 13 +l 16 13 + +117 24 8 24 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 11 +l 5 5 +l 5 2 +l 7 0 +m 5 14 +l 6 13 +l 6 11 +l 4 5 +l 4 2 +l 5 1 +l 7 0 +l 8 0 +l 11 1 +l 13 3 +l 15 6 +l 16 10 +l 16 14 +l 15 14 +l 16 12 + +118 27 9 41 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 11 +l 6 6 +l 6 3 +l 7 1 +l 8 0 +m 5 14 +l 6 13 +l 6 11 +l 5 6 +l 5 3 +l 6 1 +l 8 0 +l 10 0 +l 12 1 +l 14 3 +l 16 6 +l 17 9 +l 18 14 +l 18 18 +l 17 20 +l 15 21 +l 13 21 +l 11 19 +l 11 17 +l 12 14 +l 14 11 +l 16 9 +l 19 7 +m 12 1 +l 14 4 +l 15 6 +l 16 9 +l 17 14 +l 17 18 +l 16 20 +l 15 21 + +119 25 8 38 +m 3 13 +l 5 13 +l 5 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 1 +l 2 0 +l 4 0 +l 6 1 +l 8 4 +l 9 7 +m 0 4 +l 1 2 +l 2 1 +l 4 1 +l 6 2 +l 8 4 +m 8 7 +l 8 4 +l 9 1 +l 10 0 +l 12 0 +l 14 1 +l 16 4 +l 17 7 +l 17 10 +l 16 13 +l 15 14 +l 15 13 +l 16 13 +m 8 4 +l 9 2 +l 10 1 +l 12 1 +l 14 2 +l 16 4 + +120 24 8 20 +m 1 14 +l 3 14 +l 5 13 +l 6 11 +l 11 -4 +l 12 -6 +l 13 -7 +m 3 14 +l 4 13 +l 5 11 +l 10 -4 +l 11 -6 +l 13 -7 +l 15 -7 +m 16 14 +l 15 12 +l 13 9 +l 3 -2 +l 1 -5 +l 0 -7 + +121 28 10 30 +m 14 21 +l 8 -7 +m 15 21 +l 7 -7 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 11 +l 6 6 +l 6 3 +l 8 1 +l 11 1 +l 13 2 +l 16 5 +l 18 8 +m 5 14 +l 6 13 +l 6 11 +l 5 6 +l 5 3 +l 6 1 +l 8 0 +l 11 0 +l 13 1 +l 15 3 +l 17 6 +l 18 8 +l 20 14 + +122 22 7 29 +m 8 21 +l 6 20 +l 5 19 +l 5 18 +l 6 17 +l 9 16 +l 14 16 +l 14 17 +l 11 16 +l 7 14 +l 4 12 +l 1 9 +l 0 6 +l 0 4 +l 1 2 +l 4 0 +l 7 -2 +l 8 -4 +l 8 -6 +l 7 -7 +l 5 -7 +l 4 -6 +m 9 15 +l 5 12 +l 2 9 +l 1 6 +l 1 4 +l 2 2 +l 4 0 + +123 12 2 23 +m 4 25 +l 1 22 +l 0 19 +l 0 17 +l 1 14 +l 4 11 +m 2 23 +l 1 20 +l 1 16 +l 2 13 +m 4 11 +l 1 9 +l 4 7 +m 4 7 +l 1 4 +l 0 1 +l 0 -1 +l 1 -4 +l 4 -7 +m 2 5 +l 1 2 +l 1 -2 +l 2 -5 + +124 29 10 2 +m 0 25 +l 0 -7 + +125 12 2 23 +m 0 25 +l 3 22 +l 4 19 +l 4 17 +l 3 14 +l 0 11 +m 2 23 +l 3 20 +l 3 16 +l 2 13 +m 0 11 +l 3 9 +l 0 7 +m 0 7 +l 3 4 +l 4 1 +l 4 -1 +l 3 -4 +l 0 -7 +m 2 5 +l 3 2 +l 3 -2 +l 2 -5 + +126 26 9 22 +m 0 17 +l 0 19 +l 1 22 +l 3 23 +l 5 23 +l 7 22 +l 11 19 +l 13 18 +l 15 18 +l 17 19 +l 18 21 +m 0 19 +l 1 21 +l 3 22 +l 5 22 +l 7 21 +l 11 18 +l 13 17 +l 15 17 +l 17 18 +l 18 21 +l 18 23 + +127 22 7 4 +m 7 17 +l 0 5 +l 14 5 +l 7 17 diff --git a/cd/etc/vectorfont05.txt b/cd/etc/vectorfont05.txt new file mode 100755 index 0000000..18c9385 --- /dev/null +++ b/cd/etc/vectorfont05.txt @@ -0,0 +1,2776 @@ +Simplex script I +25 21 10 -12 + + +32 21 10 0 + +33 11 5 7 +m 5 21 +l 5 7 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +34 17 8 4 +m 4 21 +l 4 14 +m 12 21 +l 12 14 + +35 22 11 8 +m 11 25 +l 4 -7 +m 17 25 +l 10 -7 +m 4 12 +l 18 12 +m 3 6 +l 17 6 + +36 21 10 24 +m 8 25 +l 8 -4 +m 12 25 +l 12 -4 +m 17 18 +l 15 20 +l 12 21 +l 8 21 +l 5 20 +l 3 18 +l 3 16 +l 4 14 +l 5 13 +l 7 12 +l 13 10 +l 15 9 +l 16 8 +l 17 6 +l 17 3 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 3 3 + +37 25 12 29 +m 21 21 +l 3 0 +m 8 21 +l 10 19 +l 10 17 +l 9 15 +l 7 14 +l 5 14 +l 3 16 +l 3 18 +l 4 20 +l 6 21 +l 8 21 +l 10 20 +l 13 19 +l 16 19 +l 19 20 +l 21 21 +m 17 7 +l 15 6 +l 14 4 +l 14 2 +l 16 0 +l 18 0 +l 20 1 +l 21 3 +l 21 5 +l 19 7 +l 17 7 + +38 27 13 34 +m 23 12 +l 23 13 +l 22 14 +l 21 14 +l 20 13 +l 19 11 +l 17 6 +l 15 3 +l 13 1 +l 11 0 +l 7 0 +l 5 1 +l 4 2 +l 3 4 +l 3 6 +l 4 8 +l 5 9 +l 12 13 +l 13 14 +l 14 16 +l 14 18 +l 13 20 +l 11 21 +l 9 20 +l 8 18 +l 8 16 +l 9 13 +l 11 10 +l 16 3 +l 18 1 +l 20 0 +l 22 0 +l 23 1 +l 23 2 + +39 9 4 2 +m 4 21 +l 4 14 + +40 15 7 10 +m 11 25 +l 9 23 +l 7 20 +l 5 16 +l 4 11 +l 4 7 +l 5 2 +l 7 -2 +l 9 -5 +l 11 -7 + +41 15 7 10 +m 3 25 +l 5 23 +l 7 20 +l 9 16 +l 10 11 +l 10 7 +l 9 2 +l 7 -2 +l 5 -5 +l 3 -7 + +42 17 8 6 +m 8 15 +l 8 3 +m 3 12 +l 13 6 +m 13 12 +l 3 6 + +43 27 13 4 +m 13 18 +l 13 0 +m 4 9 +l 22 9 + +44 11 5 8 +m 6 1 +l 5 0 +l 4 1 +l 5 2 +l 6 1 +l 6 -1 +l 5 -3 +l 4 -4 + +45 27 13 2 +m 4 9 +l 22 9 + +46 11 5 5 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +47 23 11 2 +m 20 25 +l 2 -7 + +48 21 10 17 +m 9 21 +l 6 20 +l 4 17 +l 3 12 +l 3 9 +l 4 4 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 4 +l 17 9 +l 17 12 +l 16 17 +l 14 20 +l 11 21 +l 9 21 + +49 21 10 4 +m 6 17 +l 8 18 +l 11 21 +l 11 0 + +50 21 10 14 +m 4 16 +l 4 17 +l 5 19 +l 6 20 +l 8 21 +l 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 13 10 +l 3 0 +l 17 0 + +51 21 10 15 +m 5 21 +l 16 21 +l 10 13 +l 13 13 +l 15 12 +l 16 11 +l 17 8 +l 17 6 +l 16 3 +l 14 1 +l 11 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 + +52 21 10 5 +m 13 21 +l 3 7 +l 18 7 +m 13 21 +l 13 0 + +53 21 10 17 +m 15 21 +l 5 21 +l 4 12 +l 5 13 +l 8 14 +l 11 14 +l 14 13 +l 16 11 +l 17 8 +l 17 6 +l 16 3 +l 14 1 +l 11 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 + +54 21 10 23 +m 16 18 +l 15 20 +l 12 21 +l 10 21 +l 7 20 +l 5 17 +l 4 12 +l 4 7 +l 5 3 +l 7 1 +l 10 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 7 +l 16 10 +l 14 12 +l 11 13 +l 10 13 +l 7 12 +l 5 10 +l 4 7 + +55 21 10 4 +m 17 21 +l 7 0 +m 3 21 +l 17 21 + +56 21 10 29 +m 8 21 +l 5 20 +l 4 18 +l 4 16 +l 5 14 +l 7 13 +l 11 12 +l 14 11 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 +l 3 7 +l 4 9 +l 6 11 +l 9 12 +l 13 13 +l 15 14 +l 16 16 +l 16 18 +l 15 20 +l 12 21 +l 8 21 + +57 21 10 23 +m 16 14 +l 15 11 +l 13 9 +l 10 8 +l 9 8 +l 6 9 +l 4 11 +l 3 14 +l 3 15 +l 4 18 +l 6 20 +l 9 21 +l 10 21 +l 13 20 +l 15 18 +l 16 14 +l 16 9 +l 15 4 +l 13 1 +l 10 0 +l 8 0 +l 5 1 +l 4 3 + +58 11 5 10 +m 5 14 +l 4 13 +l 5 12 +l 6 13 +l 5 14 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +59 11 5 13 +m 5 14 +l 4 13 +l 5 12 +l 6 13 +l 5 14 +m 6 1 +l 5 0 +l 4 1 +l 5 2 +l 6 1 +l 6 -1 +l 5 -3 +l 4 -4 + +60 25 12 3 +m 20 18 +l 4 9 +l 20 0 + +61 27 13 4 +m 4 12 +l 22 12 +m 4 6 +l 22 6 + +62 25 12 3 +m 4 18 +l 20 9 +l 4 0 + +63 19 9 19 +m 3 16 +l 3 17 +l 4 19 +l 5 20 +l 7 21 +l 11 21 +l 13 20 +l 14 19 +l 15 17 +l 15 15 +l 14 13 +l 13 12 +l 9 10 +l 9 7 +m 9 2 +l 8 1 +l 9 0 +l 10 1 +l 9 2 + +64 28 14 52 +m 18 13 +l 17 15 +l 15 16 +l 12 16 +l 10 15 +l 9 14 +l 8 11 +l 8 8 +l 9 6 +l 11 5 +l 14 5 +l 16 6 +l 17 8 +m 12 16 +l 10 14 +l 9 11 +l 9 8 +l 10 6 +l 11 5 +m 18 16 +l 17 8 +l 17 6 +l 19 5 +l 21 5 +l 23 7 +l 24 10 +l 24 12 +l 23 15 +l 22 17 +l 20 19 +l 18 20 +l 15 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 15 0 +l 18 1 +l 20 2 +l 21 3 +m 19 16 +l 18 8 +l 18 6 +l 19 5 + +65 21 10 19 +m 0 0 +l 2 1 +l 5 4 +l 8 8 +l 12 15 +l 15 21 +l 15 0 +l 14 3 +l 12 6 +l 10 8 +l 7 10 +l 5 10 +l 4 9 +l 4 7 +l 5 5 +l 7 3 +l 10 1 +l 13 0 +l 18 0 + +66 24 12 39 +m 13 19 +l 14 18 +l 14 15 +l 13 11 +l 12 8 +l 11 6 +l 9 3 +l 7 1 +l 5 0 +l 4 0 +l 3 1 +l 3 4 +l 4 9 +l 5 12 +l 6 14 +l 8 17 +l 10 19 +l 12 20 +l 15 21 +l 18 21 +l 20 20 +l 21 18 +l 21 16 +l 20 14 +l 19 13 +l 17 12 +l 14 11 +m 13 11 +l 14 11 +l 17 10 +l 18 9 +l 19 7 +l 19 4 +l 18 2 +l 17 1 +l 15 0 +l 12 0 +l 10 1 +l 9 3 + +67 21 10 23 +m 12 15 +l 12 14 +l 13 13 +l 15 13 +l 17 14 +l 18 16 +l 18 18 +l 17 20 +l 15 21 +l 12 21 +l 9 20 +l 7 18 +l 5 15 +l 4 13 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 + +68 25 12 34 +m 14 21 +l 12 20 +l 11 18 +l 10 14 +l 9 8 +l 8 5 +l 7 3 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 5 3 +l 7 1 +l 10 0 +l 13 0 +l 16 1 +l 18 3 +l 20 7 +l 21 12 +l 21 16 +l 20 19 +l 19 20 +l 17 21 +l 14 21 +l 12 19 +l 12 17 +l 13 14 +l 15 11 +l 17 9 +l 20 7 +l 22 6 + +69 21 10 27 +m 14 17 +l 14 16 +l 15 15 +l 17 15 +l 18 16 +l 18 18 +l 17 20 +l 14 21 +l 10 21 +l 7 20 +l 6 18 +l 6 15 +l 7 13 +l 8 12 +l 11 11 +l 8 11 +l 5 10 +l 4 9 +l 3 7 +l 3 4 +l 4 2 +l 5 1 +l 8 0 +l 11 0 +l 14 1 +l 16 3 +l 17 5 + +70 21 10 25 +m 10 15 +l 8 15 +l 6 16 +l 5 18 +l 6 20 +l 9 21 +l 12 21 +l 16 20 +l 19 20 +l 21 21 +m 16 20 +l 14 13 +l 12 7 +l 10 3 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 3 +l 1 5 +l 2 6 +l 4 6 +l 6 5 +m 9 11 +l 18 11 + +71 24 12 28 +m 0 0 +l 2 1 +l 6 5 +l 9 10 +l 10 13 +l 11 17 +l 11 20 +l 10 21 +l 9 21 +l 8 20 +l 7 18 +l 7 15 +l 8 13 +l 10 12 +l 14 12 +l 17 13 +l 18 14 +l 19 16 +l 19 10 +l 18 5 +l 17 3 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 3 3 +l 2 5 +l 2 7 + +72 25 12 36 +m 7 14 +l 5 15 +l 4 17 +l 4 18 +l 5 20 +l 7 21 +l 8 21 +l 10 20 +l 11 18 +l 11 16 +l 10 12 +l 8 6 +l 6 2 +l 4 0 +l 2 0 +l 1 1 +l 1 3 +m 7 9 +l 16 12 +l 18 13 +l 21 15 +l 23 17 +l 24 19 +l 24 20 +l 23 21 +l 22 21 +l 20 19 +l 18 15 +l 16 9 +l 15 4 +l 15 1 +l 16 0 +l 17 0 +l 19 1 +l 20 2 +l 22 5 + +73 18 9 24 +m 14 5 +l 12 7 +l 10 10 +l 9 12 +l 8 15 +l 8 18 +l 9 20 +l 10 21 +l 12 21 +l 13 20 +l 14 18 +l 14 15 +l 13 10 +l 11 5 +l 10 3 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 3 +l 1 5 +l 2 6 +l 4 6 +l 6 5 + +74 16 8 24 +m 10 -3 +l 8 0 +l 6 5 +l 5 11 +l 5 17 +l 6 20 +l 8 21 +l 10 21 +l 11 20 +l 12 17 +l 12 14 +l 11 9 +l 8 0 +l 6 -6 +l 5 -9 +l 4 -11 +l 2 -12 +l 1 -11 +l 1 -9 +l 2 -6 +l 4 -3 +l 6 -1 +l 9 1 +l 13 3 + +75 25 12 36 +m 7 14 +l 5 15 +l 4 17 +l 4 18 +l 5 20 +l 7 21 +l 8 21 +l 10 20 +l 11 18 +l 11 16 +l 10 12 +l 8 6 +l 6 2 +l 4 0 +l 2 0 +l 1 1 +l 1 3 +m 24 18 +l 24 20 +l 23 21 +l 22 21 +l 20 20 +l 18 18 +l 16 15 +l 14 13 +l 12 12 +l 10 12 +m 12 12 +l 13 10 +l 13 3 +l 14 1 +l 15 0 +l 16 0 +l 18 1 +l 19 2 +l 21 5 + +76 20 10 28 +m 4 9 +l 6 9 +l 10 10 +l 13 12 +l 15 14 +l 16 16 +l 16 19 +l 15 21 +l 13 21 +l 12 20 +l 11 18 +l 10 13 +l 9 8 +l 8 5 +l 7 3 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 5 3 +l 8 1 +l 11 0 +l 13 0 +l 16 1 +l 18 3 + +77 34 17 42 +m 5 14 +l 3 15 +l 2 17 +l 2 18 +l 3 20 +l 5 21 +l 6 21 +l 8 20 +l 9 18 +l 9 16 +l 8 11 +l 7 7 +l 5 0 +m 7 7 +l 10 15 +l 12 19 +l 13 20 +l 15 21 +l 16 21 +l 18 20 +l 19 18 +l 19 16 +l 18 11 +l 17 7 +l 15 0 +m 17 7 +l 20 15 +l 22 19 +l 23 20 +l 25 21 +l 26 21 +l 28 20 +l 29 18 +l 29 16 +l 28 11 +l 26 4 +l 26 1 +l 27 0 +l 28 0 +l 30 1 +l 31 2 +l 33 5 + +78 25 12 30 +m 5 14 +l 3 15 +l 2 17 +l 2 18 +l 3 20 +l 5 21 +l 6 21 +l 8 20 +l 9 18 +l 9 16 +l 8 11 +l 7 7 +l 5 0 +m 7 7 +l 10 15 +l 12 19 +l 13 20 +l 15 21 +l 17 21 +l 19 20 +l 20 18 +l 20 16 +l 19 11 +l 17 4 +l 17 1 +l 18 0 +l 19 0 +l 21 1 +l 22 2 +l 24 5 + +79 22 11 28 +m 12 21 +l 9 20 +l 7 18 +l 5 15 +l 4 13 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 16 6 +l 17 8 +l 18 12 +l 18 16 +l 17 19 +l 16 20 +l 14 21 +l 12 21 +l 10 19 +l 10 16 +l 11 13 +l 13 10 +l 15 8 +l 18 6 +l 20 5 + +80 26 13 30 +m 13 19 +l 14 18 +l 14 15 +l 13 11 +l 12 8 +l 11 6 +l 9 3 +l 7 1 +l 5 0 +l 4 0 +l 3 1 +l 3 4 +l 4 9 +l 5 12 +l 6 14 +l 8 17 +l 10 19 +l 12 20 +l 15 21 +l 20 21 +l 22 20 +l 23 19 +l 24 17 +l 24 14 +l 23 12 +l 22 11 +l 20 10 +l 17 10 +l 15 11 +l 14 12 + +81 23 11 31 +m 13 15 +l 12 13 +l 11 12 +l 9 11 +l 7 11 +l 6 13 +l 6 15 +l 7 18 +l 9 20 +l 12 21 +l 15 21 +l 17 20 +l 18 18 +l 18 14 +l 17 11 +l 15 8 +l 11 4 +l 8 2 +l 6 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 5 3 +l 8 1 +l 11 0 +l 14 0 +l 17 1 +l 19 3 + +82 26 13 37 +m 13 19 +l 14 18 +l 14 15 +l 13 11 +l 12 8 +l 11 6 +l 9 3 +l 7 1 +l 5 0 +l 4 0 +l 3 1 +l 3 4 +l 4 9 +l 5 12 +l 6 14 +l 8 17 +l 10 19 +l 12 20 +l 15 21 +l 19 21 +l 21 20 +l 22 19 +l 23 17 +l 23 14 +l 22 12 +l 21 11 +l 19 10 +l 16 10 +l 13 11 +l 14 10 +l 15 8 +l 15 3 +l 16 1 +l 18 0 +l 20 1 +l 21 2 +l 23 5 + +83 21 10 27 +m 0 0 +l 2 1 +l 4 3 +l 7 7 +l 9 10 +l 11 14 +l 12 17 +l 12 20 +l 11 21 +l 10 21 +l 9 20 +l 8 18 +l 8 16 +l 9 14 +l 11 12 +l 14 10 +l 16 8 +l 17 6 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 3 3 +l 2 5 +l 2 7 + +84 20 10 23 +m 10 15 +l 8 15 +l 6 16 +l 5 18 +l 6 20 +l 9 21 +l 12 21 +l 16 20 +l 19 20 +l 21 21 +m 16 20 +l 14 13 +l 12 7 +l 10 3 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 3 +l 1 5 +l 2 6 +l 4 6 +l 6 5 + +85 25 12 31 +m 5 14 +l 3 15 +l 2 17 +l 2 18 +l 3 20 +l 5 21 +l 6 21 +l 8 20 +l 9 18 +l 9 16 +l 8 12 +l 7 9 +l 6 5 +l 6 3 +l 7 1 +l 9 0 +l 11 0 +l 13 1 +l 14 2 +l 16 6 +l 19 14 +l 21 21 +m 19 14 +l 18 10 +l 17 4 +l 17 1 +l 18 0 +l 19 0 +l 21 1 +l 22 2 +l 24 5 + +86 24 12 31 +m 5 14 +l 3 15 +l 2 17 +l 2 18 +l 3 20 +l 5 21 +l 6 21 +l 8 20 +l 9 18 +l 9 16 +l 8 12 +l 7 9 +l 6 5 +l 6 2 +l 7 0 +l 9 0 +l 11 1 +l 14 4 +l 16 7 +l 18 11 +l 19 14 +l 20 18 +l 20 20 +l 19 21 +l 18 21 +l 17 20 +l 16 18 +l 16 16 +l 17 13 +l 19 11 +l 21 10 + +87 29 14 21 +m 5 14 +l 3 15 +l 2 17 +l 2 18 +l 3 20 +l 5 21 +l 6 21 +l 8 20 +l 9 18 +l 9 15 +l 8 0 +m 18 21 +l 8 0 +m 18 21 +l 16 0 +m 30 21 +l 28 20 +l 25 17 +l 22 13 +l 19 7 +l 16 0 + +88 25 12 34 +m 8 15 +l 6 15 +l 5 16 +l 5 18 +l 6 20 +l 8 21 +l 10 21 +l 12 20 +l 13 18 +l 13 15 +l 11 6 +l 11 3 +l 12 1 +l 14 0 +l 16 0 +l 18 1 +l 19 3 +l 19 5 +l 18 6 +l 16 6 +m 23 18 +l 23 20 +l 22 21 +l 20 21 +l 18 20 +l 16 18 +l 14 15 +l 10 6 +l 8 3 +l 6 1 +l 4 0 +l 2 0 +l 1 1 +l 1 3 + +89 24 12 36 +m 5 14 +l 3 15 +l 2 17 +l 2 18 +l 3 20 +l 5 21 +l 6 21 +l 8 20 +l 9 18 +l 9 16 +l 8 12 +l 7 9 +l 6 5 +l 6 3 +l 7 1 +l 8 0 +l 10 0 +l 12 1 +l 14 3 +l 16 6 +l 17 8 +l 19 14 +m 21 21 +l 19 14 +l 16 4 +l 14 -2 +l 12 -7 +l 10 -11 +l 8 -12 +l 7 -11 +l 7 -9 +l 8 -6 +l 10 -3 +l 13 0 +l 16 2 +l 21 5 + +90 22 11 39 +m 13 15 +l 12 13 +l 11 12 +l 9 11 +l 7 11 +l 6 13 +l 6 15 +l 7 18 +l 9 20 +l 12 21 +l 15 21 +l 17 20 +l 18 18 +l 18 14 +l 17 11 +l 15 7 +l 12 4 +l 8 1 +l 6 0 +l 3 0 +l 2 1 +l 2 3 +l 3 4 +l 6 4 +l 8 3 +l 9 2 +l 10 0 +l 10 -3 +l 9 -6 +l 8 -8 +l 6 -11 +l 4 -12 +l 3 -11 +l 3 -9 +l 4 -6 +l 6 -3 +l 9 0 +l 12 2 +l 18 5 + +91 15 7 6 +m 4 25 +l 4 -7 +m 4 25 +l 11 25 +m 4 -7 +l 11 -7 + +92 23 11 2 +m 2 23 +l 20 3 + +93 15 7 6 +m 10 25 +l 10 -7 +m 3 25 +l 10 25 +m 3 -7 +l 10 -7 + +94 23 11 6 +m 3 7 +l 11 12 +l 19 7 +m 3 7 +l 11 11 +l 19 7 + +95 21 10 2 +m 0 -2 +l 21 -2 + +96 25 12 22 +m 3 6 +l 3 8 +l 4 11 +l 6 12 +l 8 12 +l 10 11 +l 14 8 +l 16 7 +l 18 7 +l 20 8 +l 21 10 +m 3 8 +l 4 10 +l 6 11 +l 8 11 +l 10 10 +l 14 7 +l 16 6 +l 18 6 +l 20 7 +l 21 10 +l 21 12 + +97 16 8 21 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 + +98 14 7 22 +m 0 5 +l 2 8 +l 5 13 +l 6 15 +l 7 18 +l 7 20 +l 6 21 +l 4 20 +l 3 18 +l 2 14 +l 1 7 +l 1 1 +l 2 0 +l 3 0 +l 5 1 +l 7 3 +l 8 6 +l 8 9 +l 9 5 +l 10 4 +l 12 4 +l 14 5 + +99 11 5 13 +m 7 7 +l 7 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 + +100 16 7 22 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 14 21 +m 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 + +101 10 5 16 +m 1 2 +l 3 3 +l 4 4 +l 5 6 +l 5 8 +l 4 9 +l 3 9 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 10 5 + +102 8 4 22 +m 0 5 +l 4 10 +l 6 13 +l 7 15 +l 8 18 +l 8 20 +l 7 21 +l 5 20 +l 4 18 +l 2 10 +l -1 1 +l -5 -9 +l -5 -11 +l -4 -12 +l -2 -11 +l -1 -8 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 6 2 +l 8 5 + +103 15 7 26 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +m 10 9 +l 8 2 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 4 -3 +l 7 -1 +l 9 0 +l 12 2 +l 15 5 + +104 15 8 27 +m 0 5 +l 2 8 +l 5 13 +l 6 15 +l 7 18 +l 7 20 +l 6 21 +l 4 20 +l 3 18 +l 2 14 +l 1 8 +l 0 0 +m 0 0 +l 1 3 +l 2 5 +l 4 8 +l 6 9 +l 8 9 +l 9 8 +l 9 6 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 + +105 7 3 14 +m 3 14 +l 3 13 +l 4 13 +l 4 14 +l 3 14 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 2 0 +l 4 1 +l 5 2 +l 7 5 + +106 8 4 18 +m 4 14 +l 4 13 +l 5 13 +l 5 14 +l 4 14 +m 0 5 +l 3 10 +l -3 -8 +l -4 -10 +l -6 -11 +l -7 -10 +l -7 -8 +l -6 -5 +l -3 -2 +l 0 0 +l 2 1 +l 5 3 +l 8 5 + +107 14 6 30 +m 0 5 +l 2 8 +l 5 13 +l 6 15 +l 7 18 +l 7 20 +l 6 21 +l 4 20 +l 3 18 +l 2 14 +l 1 8 +l 0 0 +m 0 0 +l 1 3 +l 2 5 +l 4 8 +l 6 9 +l 8 9 +l 9 8 +l 9 6 +l 7 5 +l 4 5 +m 4 5 +l 6 4 +l 7 1 +l 8 0 +l 9 0 +l 11 1 +l 12 2 +l 14 5 + +108 8 4 17 +m 0 5 +l 2 8 +l 5 13 +l 6 15 +l 7 18 +l 7 20 +l 6 21 +l 4 20 +l 3 18 +l 2 14 +l 1 7 +l 1 1 +l 2 0 +l 3 0 +l 5 1 +l 6 2 +l 8 5 + +109 25 12 30 +m 0 5 +l 2 8 +l 4 9 +l 5 8 +l 5 7 +l 4 3 +l 3 0 +m 4 3 +l 5 5 +l 7 8 +l 9 9 +l 11 9 +l 12 8 +l 12 7 +l 11 3 +l 10 0 +m 11 3 +l 12 5 +l 14 8 +l 16 9 +l 18 9 +l 19 8 +l 19 6 +l 18 3 +l 18 1 +l 19 0 +l 20 0 +l 22 1 +l 23 2 +l 25 5 + +110 18 8 21 +m 0 5 +l 2 8 +l 4 9 +l 5 8 +l 5 7 +l 4 3 +l 3 0 +m 4 3 +l 5 5 +l 7 8 +l 9 9 +l 11 9 +l 12 8 +l 12 6 +l 11 3 +l 11 1 +l 12 0 +l 13 0 +l 15 1 +l 16 2 +l 18 5 + +111 14 6 22 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 + +112 15 7 21 +m 0 5 +l 2 8 +l 3 10 +l 2 6 +l -4 -12 +m 2 6 +l 3 8 +l 5 9 +l 7 9 +l 9 8 +l 10 6 +l 10 4 +l 9 2 +l 8 1 +l 6 0 +m 2 1 +l 4 0 +l 7 0 +l 10 1 +l 12 2 +l 15 5 + +113 15 7 25 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +m 10 9 +l 9 6 +l 7 1 +l 4 -6 +l 3 -9 +l 3 -11 +l 4 -12 +l 6 -11 +l 7 -8 +l 7 -1 +l 9 0 +l 12 2 +l 15 5 + +114 13 6 14 +m 0 5 +l 2 8 +l 3 10 +l 3 8 +l 6 8 +l 7 7 +l 7 5 +l 6 2 +l 6 1 +l 7 0 +l 8 0 +l 10 1 +l 11 2 +l 13 5 + +115 11 5 14 +m 0 5 +l 2 8 +l 3 10 +l 3 8 +l 5 5 +l 6 3 +l 6 1 +l 4 0 +m 0 1 +l 2 0 +l 6 0 +l 8 1 +l 9 2 +l 11 5 + +116 9 4 13 +m 0 5 +l 2 8 +l 4 12 +m 7 21 +l 1 3 +l 1 1 +l 2 0 +l 4 0 +l 6 1 +l 7 2 +l 9 5 +m 1 13 +l 8 13 + +117 15 7 17 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 + +118 15 7 15 +m 0 5 +l 2 9 +l 1 4 +l 1 1 +l 2 0 +l 3 0 +l 6 1 +l 8 3 +l 9 6 +l 9 9 +m 9 9 +l 10 5 +l 11 4 +l 13 4 +l 15 5 + +119 21 9 22 +m 3 9 +l 1 7 +l 0 4 +l 0 2 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +m 9 9 +l 7 3 +l 7 1 +l 8 0 +l 10 0 +l 12 1 +l 14 3 +l 15 6 +l 15 9 +m 15 9 +l 16 5 +l 17 4 +l 19 4 +l 21 5 + +120 16 8 18 +m 0 5 +l 2 8 +l 4 9 +l 6 9 +l 7 8 +l 7 1 +l 8 0 +l 11 0 +l 14 2 +l 16 5 +m 13 8 +l 12 9 +l 10 9 +l 9 8 +l 5 1 +l 4 0 +l 2 0 +l 1 1 + +121 15 7 21 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 4 -3 +l 7 -1 +l 9 0 +l 12 2 +l 15 5 + +122 14 7 22 +m 0 5 +l 2 8 +l 4 9 +l 6 9 +l 8 7 +l 8 5 +l 7 3 +l 5 1 +l 2 0 +l 4 -1 +l 5 -3 +l 5 -6 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 4 -3 +l 7 -1 +l 11 2 +l 14 5 + +123 15 7 37 +m 9 25 +l 7 24 +l 6 23 +l 5 21 +l 5 19 +l 6 17 +l 7 16 +l 8 14 +l 8 12 +l 6 10 +m 7 24 +l 6 22 +l 6 20 +l 7 18 +l 8 17 +l 9 15 +l 9 13 +l 8 11 +l 4 9 +l 8 7 +l 9 5 +l 9 3 +l 8 1 +l 7 0 +l 6 -2 +l 6 -4 +l 7 -6 +m 6 8 +l 8 6 +l 8 4 +l 7 2 +l 6 1 +l 5 -1 +l 5 -3 +l 6 -5 +l 7 -6 +l 9 -7 + +124 9 4 2 +m 4 25 +l 4 -7 + +125 15 7 37 +m 5 25 +l 7 24 +l 8 23 +l 9 21 +l 9 19 +l 8 17 +l 7 16 +l 6 14 +l 6 12 +l 8 10 +m 7 24 +l 8 22 +l 8 20 +l 7 18 +l 6 17 +l 5 15 +l 5 13 +l 6 11 +l 10 9 +l 6 7 +l 5 5 +l 5 3 +l 6 1 +l 7 0 +l 8 -2 +l 8 -4 +l 7 -6 +m 8 8 +l 6 6 +l 6 4 +l 7 2 +l 8 1 +l 9 -1 +l 9 -3 +l 8 -5 +l 7 -6 +l 5 -7 + +128 21 10 27 +m 12 15 +l 12 14 +l 13 13 +l 15 13 +l 17 14 +l 18 16 +l 18 18 +l 17 20 +l 15 21 +l 12 21 +l 9 20 +l 7 18 +l 5 15 +l 4 13 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +m 13 0 +l 16 -3 +l 11 -5 +l 4 -7 + +129 15 7 21 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +s 4 17 +l 5 17 +s 12 17 +l 13 17 + +130 10 5 18 +m 1 2 +l 3 3 +l 4 4 +l 5 6 +l 5 8 +l 4 9 +l 3 9 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 10 5 +m 0 16 +l 6 19 + +131 16 7 24 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 +m 2 17 +l 7 21 +l 12 17 + +132 16 8 25 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 +s 3 17 +l 4 17 +s 11 17 +l 12 17 + +133 16 8 23 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 +m 3 21 +l 7 17 + +134 16 7 23 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 +s 8 18 +l 10 18 + +135 11 5 17 +m 7 7 +l 7 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 +m 6 0 +l 8 -2 +l 5 -3 +l 1 -4 + +136 10 5 19 +m 1 2 +l 3 3 +l 4 4 +l 5 6 +l 5 8 +l 4 9 +l 3 9 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 10 5 +m 0 17 +l 5 21 +l 10 17 + +137 10 5 20 +m 1 2 +l 3 3 +l 4 4 +l 5 6 +l 5 8 +l 4 9 +l 3 9 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 10 5 +s 0 17 +l 1 17 +s 9 17 +l 10 17 + +138 10 5 18 +m 1 2 +l 3 3 +l 4 4 +l 5 6 +l 5 8 +l 4 9 +l 3 9 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 10 5 +m 0 21 +l 4 17 + +139 7 3 13 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +s 0 17 +l 1 17 +s 5 17 +l 6 17 + +140 7 3 12 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +m -1 15 +l 3 19 +l 7 15 + +141 7 3 11 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +m 1 18 +l 5 15 + +142 21 10 23 +m 0 0 +l 2 1 +l 5 4 +l 8 8 +l 12 15 +l 15 21 +l 15 0 +l 14 3 +l 12 6 +l 10 8 +l 7 10 +l 5 10 +l 4 9 +l 4 7 +l 5 5 +l 7 3 +l 10 1 +l 13 0 +l 18 0 +s 11 21 +l 12 21 +s 19 21 +l 20 21 + +143 21 10 21 +m 0 0 +l 2 1 +l 5 4 +l 8 8 +l 12 15 +l 15 21 +l 15 0 +l 14 3 +l 12 6 +l 10 8 +l 7 10 +l 5 10 +l 4 9 +l 4 7 +l 5 5 +l 7 3 +l 10 1 +l 13 0 +l 18 0 +s 15 23 +l 17 23 + +144 21 10 29 +m 14 17 +l 14 16 +l 15 15 +l 17 15 +l 18 16 +l 18 18 +l 17 20 +l 14 21 +l 10 21 +l 7 20 +l 6 18 +l 6 15 +l 7 13 +l 8 12 +l 11 11 +l 8 11 +l 5 10 +l 4 9 +l 3 7 +l 3 4 +l 4 2 +l 5 1 +l 8 0 +l 11 0 +l 14 1 +l 16 3 +l 17 5 +m 12 22 +l 18 25 + +145 27 13 22 +m -4 -4 +l 3 13 +l 5 14 +l 11 14 +l 13 11 +m 13 11 +l 13 3 +s 13 9 +l 9 9 +l 4 6 +l 2 3 +l 5 0 +l 10 1 +l 13 3 +m 13 6 +l 25 6 +s 19 6 +l 25 6 +l 19 0 +s 19 9 +l 19 0 +l 24 2 + +146 28 14 10 +m 0 0 +l 12 22 +m 5 9 +l 12 9 +m 27 22 +l 12 22 +l 12 0 +l 27 0 +m 12 11 +l 23 11 + +147 14 6 25 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 +m 0 17 +l 5 21 +l 10 17 + +148 14 7 26 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 +s 3 17 +l 4 17 +s 12 17 +l 13 17 + +149 14 7 24 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 +m 5 21 +l 10 17 + +150 15 7 20 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 2 17 +l 7 21 +l 12 17 + +151 15 7 19 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 5 21 +l 10 17 + +152 15 8 25 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 4 -3 +l 7 -1 +l 9 0 +l 12 2 +l 15 5 +s 2 17 +l 3 17 +s 11 17 +l 12 17 + +153 20 11 32 +m 12 21 +l 9 20 +l 7 18 +l 5 15 +l 4 13 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 16 6 +l 17 8 +l 18 12 +l 18 16 +l 17 19 +l 16 20 +l 14 21 +l 12 21 +l 10 19 +l 10 16 +l 11 13 +l 13 10 +l 15 8 +l 18 6 +l 20 5 +s 6 21 +l 7 21 +s 19 21 +l 20 21 + +154 25 12 35 +m 5 14 +l 3 15 +l 2 17 +l 2 18 +l 3 20 +l 5 21 +l 6 21 +l 8 20 +l 9 18 +l 9 16 +l 8 12 +l 7 9 +l 6 5 +l 6 3 +l 7 1 +l 9 0 +l 11 0 +l 13 1 +l 14 2 +l 16 6 +l 19 14 +l 21 21 +m 19 14 +l 18 10 +l 17 4 +l 17 1 +l 18 0 +l 19 0 +l 21 1 +l 22 2 +l 24 5 +s 12 21 +l 13 21 +s 18 21 +l 19 21 + +155 14 6 24 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 +m 0 0 +l 9 9 + +157 22 11 30 +m 12 21 +l 9 20 +l 7 18 +l 5 15 +l 4 13 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 16 6 +l 17 8 +l 18 12 +l 18 16 +l 17 19 +l 16 20 +l 14 21 +l 12 21 +l 10 19 +l 10 16 +l 11 13 +l 13 10 +l 15 8 +l 18 6 +l 20 5 +m 3 0 +l 18 21 + +160 16 8 23 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 +m 8 16 +l 14 19 + +225 20 10 28 +m 12 21 +l 10 20 +l 8 18 +l 6 14 +l 5 11 +l 4 7 +l 3 1 +l 2 -7 +m 12 21 +l 14 21 +l 16 19 +l 16 16 +l 15 14 +l 14 13 +l 12 12 +l 9 12 +m 9 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 10 0 +l 8 0 +l 6 1 +l 5 2 +l 4 5 diff --git a/cd/etc/vectorfont06.txt b/cd/etc/vectorfont06.txt new file mode 100755 index 0000000..3d3a248 --- /dev/null +++ b/cd/etc/vectorfont06.txt @@ -0,0 +1,3799 @@ +Complex script I +25 21 10 -12 + + +32 21 10 0 + +33 12 6 13 +m 8 21 +l 7 20 +l 5 8 +m 8 20 +l 5 8 +m 8 21 +l 9 20 +l 5 8 +m 3 2 +l 2 1 +l 3 0 +l 4 1 +l 3 2 + +34 19 9 8 +m 7 21 +l 5 14 +m 8 21 +l 5 14 +m 16 21 +l 14 14 +m 17 21 +l 14 14 + +35 22 11 8 +m 11 21 +l 4 -7 +m 17 21 +l 10 -7 +m 4 10 +l 18 10 +m 3 4 +l 17 4 + +36 22 11 37 +m 12 25 +l 4 -4 +m 17 25 +l 9 -4 +m 18 17 +l 17 16 +l 18 15 +l 19 16 +l 19 17 +l 18 19 +l 17 20 +l 14 21 +l 10 21 +l 7 20 +l 5 18 +l 5 16 +l 6 14 +l 7 13 +l 14 9 +l 16 7 +m 5 16 +l 7 14 +l 14 10 +l 15 9 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 11 0 +l 7 0 +l 4 1 +l 3 2 +l 2 4 +l 2 5 +l 3 6 +l 4 5 +l 3 4 + +37 25 12 29 +m 21 21 +l 3 0 +m 8 21 +l 10 19 +l 10 17 +l 9 15 +l 7 14 +l 5 14 +l 3 16 +l 3 18 +l 4 20 +l 6 21 +l 8 21 +l 10 20 +l 13 19 +l 16 19 +l 19 20 +l 21 21 +m 17 7 +l 15 6 +l 14 4 +l 14 2 +l 16 0 +l 18 0 +l 20 1 +l 21 3 +l 21 5 +l 19 7 +l 17 7 + +38 27 13 52 +m 23 13 +l 22 12 +l 23 11 +l 24 12 +l 24 13 +l 23 14 +l 22 14 +l 20 13 +l 18 11 +l 13 3 +l 11 1 +l 9 0 +l 6 0 +l 3 1 +l 2 3 +l 2 5 +l 3 7 +l 4 8 +l 6 9 +l 11 11 +l 13 12 +l 15 14 +l 16 16 +l 16 18 +l 15 20 +l 13 21 +l 11 20 +l 10 18 +l 10 15 +l 11 9 +l 12 6 +l 14 3 +l 16 1 +l 18 0 +l 20 0 +l 21 2 +l 21 3 +m 6 0 +l 4 1 +l 3 3 +l 3 5 +l 4 7 +l 5 8 +l 11 11 +m 10 15 +l 11 10 +l 12 7 +l 14 4 +l 16 2 +l 18 1 +l 20 1 +l 21 2 + +39 10 5 4 +m 7 21 +l 5 14 +m 8 21 +l 5 14 + +40 16 8 18 +m 15 25 +l 11 22 +l 8 19 +l 6 16 +l 4 12 +l 3 7 +l 3 3 +l 4 -2 +l 5 -5 +l 6 -7 +m 11 22 +l 8 18 +l 6 14 +l 5 11 +l 4 6 +l 4 1 +l 5 -4 +l 6 -7 + +41 16 8 18 +m 9 25 +l 10 23 +l 11 20 +l 12 15 +l 12 11 +l 11 6 +l 9 2 +l 7 -1 +l 4 -4 +l 0 -7 +m 9 25 +l 10 22 +l 11 17 +l 11 12 +l 10 7 +l 9 4 +l 7 0 +l 4 -4 + +42 18 9 6 +m 10 21 +l 10 9 +m 5 18 +l 15 12 +m 15 18 +l 5 12 + +43 27 13 4 +m 13 18 +l 13 0 +m 4 9 +l 22 9 + +44 12 6 7 +m 3 0 +l 2 1 +l 3 2 +l 4 1 +l 4 0 +l 3 -2 +l 1 -4 + +45 27 13 2 +m 4 9 +l 22 9 + +46 12 6 5 +m 3 2 +l 2 1 +l 3 0 +l 4 1 +l 3 2 + +47 23 11 2 +m 24 25 +l 0 -7 + +48 22 11 39 +m 12 21 +l 9 20 +l 7 18 +l 5 15 +l 4 12 +l 3 8 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 16 6 +l 17 9 +l 18 13 +l 18 16 +l 17 19 +l 16 20 +l 14 21 +l 12 21 +m 12 21 +l 10 20 +l 8 18 +l 6 15 +l 5 12 +l 4 8 +l 4 5 +l 5 2 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 15 6 +l 16 9 +l 17 13 +l 17 16 +l 16 19 +l 14 21 + +49 22 11 11 +m 12 17 +l 7 0 +m 14 21 +l 8 0 +m 14 21 +l 11 18 +l 8 16 +l 6 15 +m 13 18 +l 9 16 +l 6 15 + +50 22 11 38 +m 7 17 +l 8 16 +l 7 15 +l 6 16 +l 6 17 +l 7 19 +l 8 20 +l 11 21 +l 14 21 +l 17 20 +l 18 18 +l 18 16 +l 17 14 +l 15 12 +l 12 10 +l 8 8 +l 5 6 +l 3 4 +l 1 0 +m 14 21 +l 16 20 +l 17 18 +l 17 16 +l 16 14 +l 14 12 +l 8 8 +m 2 2 +l 3 3 +l 5 3 +l 10 1 +l 13 1 +l 15 2 +l 16 4 +m 5 3 +l 10 0 +l 13 0 +l 15 1 +l 16 4 + +51 22 11 46 +m 7 17 +l 8 16 +l 7 15 +l 6 16 +l 6 17 +l 7 19 +l 8 20 +l 11 21 +l 14 21 +l 17 20 +l 18 18 +l 18 16 +l 17 14 +l 14 12 +l 11 11 +m 14 21 +l 16 20 +l 17 18 +l 17 16 +l 16 14 +l 14 12 +m 9 11 +l 11 11 +l 14 10 +l 15 9 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 11 0 +l 7 0 +l 4 1 +l 3 2 +l 2 4 +l 2 5 +l 3 6 +l 4 5 +l 3 4 +m 11 11 +l 13 10 +l 14 9 +l 15 7 +l 15 4 +l 14 2 +l 13 1 +l 11 0 + +52 22 11 7 +m 16 20 +l 10 0 +m 17 21 +l 11 0 +m 17 21 +l 2 6 +l 18 6 + +53 22 11 34 +m 9 21 +l 4 11 +m 9 21 +l 19 21 +m 9 20 +l 14 20 +l 19 21 +m 4 11 +l 5 12 +l 8 13 +l 11 13 +l 14 12 +l 15 11 +l 16 9 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 7 0 +l 4 1 +l 3 2 +l 2 4 +l 2 5 +l 3 6 +l 4 5 +l 3 4 +m 11 13 +l 13 12 +l 14 11 +l 15 9 +l 15 6 +l 14 3 +l 12 1 +l 10 0 + +54 22 11 43 +m 17 18 +l 16 17 +l 17 16 +l 18 17 +l 18 18 +l 17 20 +l 15 21 +l 12 21 +l 9 20 +l 7 18 +l 5 15 +l 4 12 +l 3 8 +l 3 4 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 13 1 +l 15 3 +l 16 5 +l 16 8 +l 15 10 +l 14 11 +l 12 12 +l 9 12 +l 7 11 +l 5 9 +l 4 7 +m 12 21 +l 10 20 +l 8 18 +l 6 15 +l 5 12 +l 4 8 +l 4 3 +l 5 1 +m 10 0 +l 12 1 +l 14 3 +l 15 5 +l 15 9 +l 14 11 + +55 22 11 25 +m 6 21 +l 4 15 +m 19 21 +l 18 18 +l 16 15 +l 11 9 +l 9 6 +l 8 4 +l 7 0 +m 16 15 +l 10 9 +l 8 6 +l 7 4 +l 6 0 +m 5 18 +l 8 21 +l 10 21 +l 15 18 +m 6 19 +l 8 20 +l 10 20 +l 15 18 +l 17 18 +l 18 19 +l 19 21 + +56 22 11 57 +m 11 21 +l 8 20 +l 7 19 +l 6 17 +l 6 14 +l 7 12 +l 9 11 +l 12 11 +l 16 12 +l 17 13 +l 18 15 +l 18 18 +l 17 20 +l 14 21 +l 11 21 +m 11 21 +l 9 20 +l 8 19 +l 7 17 +l 7 14 +l 8 12 +l 9 11 +m 12 11 +l 15 12 +l 16 13 +l 17 15 +l 17 18 +l 16 20 +l 14 21 +m 9 11 +l 5 10 +l 3 8 +l 2 6 +l 2 3 +l 3 1 +l 6 0 +l 10 0 +l 14 1 +l 15 2 +l 16 4 +l 16 7 +l 15 9 +l 14 10 +l 12 11 +m 9 11 +l 6 10 +l 4 8 +l 3 6 +l 3 3 +l 4 1 +l 6 0 +m 10 0 +l 13 1 +l 14 2 +l 15 4 +l 15 8 +l 14 10 + +57 22 11 43 +m 17 14 +l 16 12 +l 14 10 +l 12 9 +l 9 9 +l 7 10 +l 6 11 +l 5 13 +l 5 16 +l 6 18 +l 8 20 +l 11 21 +l 14 21 +l 16 20 +l 17 19 +l 18 17 +l 18 13 +l 17 9 +l 16 6 +l 14 3 +l 12 1 +l 9 0 +l 6 0 +l 4 1 +l 3 3 +l 3 4 +l 4 5 +l 5 4 +l 4 3 +m 7 10 +l 6 12 +l 6 16 +l 7 18 +l 9 20 +l 11 21 +m 16 20 +l 17 18 +l 17 13 +l 16 9 +l 15 6 +l 13 3 +l 11 1 +l 9 0 + +58 12 6 9 +m 6 14 +l 5 13 +l 6 12 +l 7 13 +l 6 14 +m 3 2 +l 2 1 +l 3 0 +l 4 1 + +59 12 6 12 +m 6 14 +l 5 13 +l 6 12 +l 7 13 +l 6 14 +m 3 0 +l 2 1 +l 3 2 +l 4 1 +l 4 0 +l 3 -2 +l 1 -4 + +60 25 12 3 +m 20 18 +l 4 9 +l 20 0 + +61 27 13 4 +m 4 12 +l 22 12 +m 4 6 +l 22 6 + +62 25 12 3 +m 4 18 +l 20 9 +l 4 0 + +63 22 11 31 +m 7 17 +l 8 16 +l 7 15 +l 6 16 +l 6 17 +l 7 19 +l 8 20 +l 11 21 +l 15 21 +l 18 20 +l 19 18 +l 19 16 +l 18 14 +l 17 13 +l 11 11 +l 9 10 +l 9 8 +l 10 7 +l 12 7 +m 15 21 +l 17 20 +l 18 18 +l 18 16 +l 17 14 +l 16 13 +l 14 12 +m 8 2 +l 7 1 +l 8 0 +l 9 1 +l 8 2 + +64 28 14 52 +m 18 13 +l 17 15 +l 15 16 +l 12 16 +l 10 15 +l 9 14 +l 8 11 +l 8 8 +l 9 6 +l 11 5 +l 14 5 +l 16 6 +l 17 8 +m 12 16 +l 10 14 +l 9 11 +l 9 8 +l 10 6 +l 11 5 +m 18 16 +l 17 8 +l 17 6 +l 19 5 +l 21 5 +l 23 7 +l 24 10 +l 24 12 +l 23 15 +l 22 17 +l 20 19 +l 18 20 +l 15 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 15 0 +l 18 1 +l 20 2 +l 21 3 +m 19 16 +l 18 8 +l 18 6 +l 19 5 + +65 25 12 34 +m 20 21 +l 18 19 +l 16 16 +l 13 11 +l 11 8 +l 8 4 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 3 +l 1 2 +m 20 21 +l 19 17 +l 17 7 +l 16 0 +m 20 21 +l 17 0 +m 16 0 +l 16 2 +l 15 5 +l 14 7 +l 12 9 +l 10 10 +l 8 10 +l 7 9 +l 7 7 +l 8 4 +l 11 1 +l 14 0 +l 18 0 +l 20 1 + +66 25 12 64 +m 15 20 +l 14 19 +l 13 17 +l 11 12 +l 9 6 +l 8 4 +l 6 1 +l 4 0 +m 14 19 +l 13 16 +l 11 8 +l 10 5 +l 9 3 +l 7 1 +l 4 0 +l 2 0 +l 1 1 +l 1 3 +l 2 4 +l 3 3 +l 2 2 +m 9 15 +l 8 13 +l 7 12 +l 5 12 +l 4 13 +l 4 15 +l 5 17 +l 7 19 +l 9 20 +l 12 21 +l 18 21 +l 20 20 +l 21 18 +l 21 16 +l 20 14 +l 18 13 +l 14 12 +l 12 12 +m 18 21 +l 19 20 +l 20 18 +l 20 16 +l 19 14 +l 18 13 +m 14 12 +l 17 11 +l 18 10 +l 19 8 +l 19 5 +l 18 2 +l 17 1 +l 15 0 +l 13 0 +l 12 1 +l 12 3 +l 13 6 +m 14 12 +l 16 11 +l 17 10 +l 18 8 +l 18 5 +l 17 2 +l 15 0 + +67 22 11 39 +m 3 19 +l 2 17 +l 2 15 +l 3 13 +l 6 12 +l 9 12 +l 13 13 +l 15 14 +l 17 16 +l 18 18 +l 18 20 +l 17 21 +l 15 21 +l 12 20 +l 9 17 +l 7 14 +l 5 10 +l 4 6 +l 4 3 +l 5 1 +l 8 0 +l 10 0 +l 13 1 +l 15 3 +l 16 5 +l 16 7 +l 15 9 +l 13 9 +l 11 8 +l 10 6 +m 15 21 +l 13 20 +l 10 17 +l 8 14 +l 6 10 +l 5 6 +l 5 3 +l 6 1 +l 8 0 + +68 24 12 41 +m 15 20 +l 14 19 +l 13 17 +l 11 12 +l 9 6 +l 8 4 +l 6 1 +l 4 0 +m 14 19 +l 13 16 +l 11 8 +l 10 5 +l 9 3 +l 7 1 +l 4 0 +l 2 0 +l 1 1 +l 1 3 +l 2 4 +l 4 4 +l 6 3 +l 8 1 +l 10 0 +l 13 0 +l 15 1 +l 17 3 +l 19 7 +l 20 12 +l 20 15 +l 19 18 +l 17 20 +l 15 21 +l 10 21 +l 7 20 +l 5 18 +l 4 16 +l 4 14 +l 5 13 +l 7 13 +l 8 14 +l 9 16 + +69 20 10 45 +m 14 18 +l 13 17 +l 13 15 +l 14 14 +l 16 14 +l 17 16 +l 17 18 +l 16 20 +l 14 21 +l 11 21 +l 9 20 +l 8 19 +l 7 17 +l 7 15 +l 8 13 +l 10 12 +m 11 21 +l 9 19 +l 8 17 +l 8 14 +l 10 12 +m 10 12 +l 8 12 +l 5 11 +l 3 9 +l 2 7 +l 2 4 +l 3 2 +l 4 1 +l 6 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 15 7 +l 14 9 +l 12 9 +l 10 8 +l 9 6 +m 8 12 +l 6 11 +l 4 9 +l 3 7 +l 3 3 +l 4 1 + +70 22 11 42 +m 16 19 +l 15 17 +l 13 12 +l 11 6 +l 10 4 +l 8 1 +l 6 0 +m 10 15 +l 9 13 +l 7 12 +l 5 12 +l 4 14 +l 4 16 +l 5 18 +l 7 20 +l 10 21 +l 20 21 +l 17 20 +l 16 19 +l 15 16 +l 13 8 +l 12 5 +l 11 3 +l 9 1 +l 6 0 +l 4 0 +l 2 1 +l 1 2 +l 1 3 +l 2 4 +l 3 3 +l 2 2 +m 12 21 +l 16 20 +l 17 20 +m 8 8 +l 9 9 +l 11 10 +l 15 10 +l 17 11 +l 19 14 +l 17 7 + +71 23 11 49 +m 3 18 +l 2 16 +l 2 14 +l 3 12 +l 5 11 +l 8 11 +l 11 12 +l 13 13 +l 16 16 +l 17 19 +l 17 20 +l 16 21 +l 15 21 +l 13 20 +l 11 18 +l 10 16 +l 9 13 +l 9 10 +l 10 8 +l 12 7 +l 14 7 +l 16 8 +l 18 10 +l 19 12 +m 16 21 +l 14 20 +l 12 18 +l 11 16 +l 10 13 +l 10 9 +l 12 7 +m 19 12 +l 18 8 +l 16 4 +l 14 2 +l 12 1 +l 8 0 +l 5 0 +l 3 1 +l 2 3 +l 2 4 +l 3 5 +l 4 4 +l 3 3 +m 18 8 +l 16 5 +l 14 3 +l 11 1 +l 8 0 + +72 25 12 51 +m 6 15 +l 5 16 +l 5 18 +l 6 20 +l 9 21 +l 12 21 +l 9 10 +l 7 4 +l 6 2 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 3 +l 1 2 +m 12 21 +l 9 12 +l 8 9 +l 6 4 +l 5 2 +l 3 0 +m 4 7 +l 5 8 +l 7 9 +l 16 12 +l 18 13 +l 21 15 +l 23 17 +l 24 19 +l 24 20 +l 23 21 +l 22 21 +l 20 20 +l 18 17 +l 17 15 +l 15 9 +l 14 5 +l 14 2 +l 16 0 +l 17 0 +l 19 1 +l 21 3 +m 22 21 +l 20 19 +l 18 15 +l 16 9 +l 15 5 +l 15 2 +l 16 0 + +73 17 8 31 +m 14 19 +l 12 16 +l 10 11 +l 8 6 +l 7 4 +l 5 1 +l 3 0 +m 16 15 +l 14 13 +l 11 12 +l 8 12 +l 6 13 +l 5 15 +l 5 17 +l 6 19 +l 8 20 +l 12 21 +l 16 21 +l 14 19 +l 13 17 +l 11 11 +l 9 5 +l 8 3 +l 6 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 3 +l 1 2 + +74 18 9 32 +m 16 21 +l 14 19 +l 12 16 +l 10 11 +l 7 2 +l 5 -2 +m 16 14 +l 14 12 +l 11 11 +l 8 11 +l 6 12 +l 5 14 +l 5 16 +l 6 18 +l 8 20 +l 12 21 +l 16 21 +l 14 18 +l 13 16 +l 10 7 +l 8 3 +l 7 1 +l 5 -2 +l 4 -3 +l 2 -4 +l 1 -3 +l 1 -1 +l 2 1 +l 4 3 +l 6 4 +l 9 5 +l 13 6 + +75 25 12 53 +m 6 15 +l 5 16 +l 5 18 +l 7 20 +l 10 21 +l 12 21 +l 9 10 +l 7 4 +l 6 2 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 3 +l 1 2 +m 12 21 +l 9 12 +l 8 9 +l 6 4 +l 5 2 +l 3 0 +m 20 20 +l 17 16 +l 15 14 +l 13 13 +l 10 12 +m 23 20 +l 22 19 +l 23 18 +l 24 19 +l 24 20 +l 23 21 +l 22 21 +l 20 20 +l 17 15 +l 16 14 +l 14 13 +l 10 12 +m 10 12 +l 13 11 +l 14 9 +l 15 2 +l 16 0 +m 10 12 +l 12 11 +l 13 9 +l 14 2 +l 16 0 +l 17 0 +l 19 1 +l 21 3 + +76 20 10 38 +m 5 18 +l 4 16 +l 4 14 +l 5 12 +l 7 11 +l 10 11 +l 13 12 +l 15 13 +l 18 16 +l 19 19 +l 19 20 +l 18 21 +l 17 21 +l 15 20 +l 14 19 +l 12 16 +l 8 6 +l 7 4 +l 5 1 +l 3 0 +m 14 19 +l 12 15 +l 10 8 +l 9 5 +l 8 3 +l 6 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 5 3 +l 8 1 +l 10 0 +l 13 0 +l 15 1 +l 17 3 + +77 31 15 43 +m 16 21 +l 12 12 +l 9 6 +l 7 3 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 3 +l 1 2 +m 16 21 +l 14 14 +l 13 10 +l 12 5 +l 12 1 +l 14 0 +m 16 21 +l 15 17 +l 14 12 +l 13 5 +l 13 1 +l 14 0 +m 25 21 +l 21 12 +l 16 3 +l 14 0 +m 25 21 +l 23 14 +l 22 10 +l 21 5 +l 21 1 +l 23 0 +l 24 0 +l 26 1 +l 28 3 +m 25 21 +l 24 17 +l 23 12 +l 22 5 +l 22 1 +l 23 0 + +78 26 13 34 +m 13 21 +l 12 17 +l 10 11 +l 8 6 +l 7 4 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 3 +l 1 2 +m 13 21 +l 13 16 +l 14 5 +l 15 0 +m 13 21 +l 14 16 +l 15 5 +l 15 0 +m 27 20 +l 26 19 +l 27 18 +l 28 19 +l 28 20 +l 27 21 +l 25 21 +l 23 20 +l 21 17 +l 20 15 +l 18 10 +l 16 4 +l 15 0 + +79 22 11 32 +m 11 21 +l 9 20 +l 7 18 +l 5 15 +l 4 13 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 16 6 +l 17 8 +l 18 12 +l 18 16 +l 17 19 +l 16 20 +l 15 20 +l 13 19 +l 11 17 +l 9 13 +l 8 8 +l 8 5 +m 9 20 +l 7 17 +l 5 13 +l 4 9 +l 4 5 +l 5 2 +l 7 0 + +80 24 12 49 +m 15 20 +l 14 19 +l 13 17 +l 11 12 +l 9 6 +l 8 4 +l 6 1 +l 4 0 +m 14 19 +l 13 16 +l 11 8 +l 10 5 +l 9 3 +l 7 1 +l 4 0 +l 2 0 +l 1 1 +l 1 3 +l 2 4 +l 3 3 +l 2 2 +m 9 15 +l 8 13 +l 7 12 +l 5 12 +l 4 13 +l 4 15 +l 5 17 +l 7 19 +l 9 20 +l 12 21 +l 16 21 +l 19 20 +l 20 19 +l 21 17 +l 21 14 +l 20 12 +l 19 11 +l 16 10 +l 14 10 +l 12 11 +m 16 21 +l 18 20 +l 19 19 +l 20 17 +l 20 14 +l 19 12 +l 18 11 +l 16 10 + +81 22 11 41 +m 13 17 +l 13 15 +l 12 13 +l 11 12 +l 9 11 +l 7 11 +l 6 13 +l 6 15 +l 7 18 +l 9 20 +l 12 21 +l 15 21 +l 17 20 +l 18 18 +l 18 14 +l 17 11 +l 15 8 +l 11 4 +l 8 2 +l 6 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 5 3 +l 8 1 +l 11 0 +l 14 0 +l 16 1 +l 18 3 +m 15 21 +l 16 20 +l 17 18 +l 17 14 +l 16 11 +l 14 8 +l 11 5 +l 7 2 +l 3 0 + +82 25 12 59 +m 15 20 +l 14 19 +l 13 17 +l 11 12 +l 9 6 +l 8 4 +l 6 1 +l 4 0 +m 14 19 +l 13 16 +l 11 8 +l 10 5 +l 9 3 +l 7 1 +l 4 0 +l 2 0 +l 1 1 +l 1 3 +l 2 4 +l 3 3 +l 2 2 +m 9 15 +l 8 13 +l 7 12 +l 5 12 +l 4 13 +l 4 15 +l 5 17 +l 7 19 +l 9 20 +l 12 21 +l 17 21 +l 20 20 +l 21 18 +l 21 16 +l 20 14 +l 19 13 +l 16 12 +l 12 12 +m 17 21 +l 19 20 +l 20 18 +l 20 16 +l 19 14 +l 18 13 +l 16 12 +m 12 12 +l 15 11 +l 16 9 +l 17 2 +l 18 0 +m 12 12 +l 14 11 +l 15 9 +l 16 2 +l 18 0 +l 19 0 +l 21 1 +l 23 3 + +83 21 10 34 +m 6 18 +l 5 16 +l 5 14 +l 6 12 +l 8 11 +l 11 11 +l 14 12 +l 16 13 +l 19 16 +l 20 19 +l 20 20 +l 19 21 +l 18 21 +l 16 20 +l 15 19 +l 14 17 +l 13 14 +l 11 7 +l 10 4 +l 8 1 +l 6 0 +m 14 17 +l 13 13 +l 12 6 +l 11 3 +l 9 1 +l 6 0 +l 3 0 +l 1 1 +l 0 3 +l 0 4 +l 1 5 +l 2 4 +l 1 3 + +84 19 9 35 +m 16 19 +l 15 17 +l 13 12 +l 11 6 +l 10 4 +l 8 1 +l 6 0 +m 10 15 +l 9 13 +l 7 12 +l 5 12 +l 4 14 +l 4 16 +l 5 18 +l 7 20 +l 10 21 +l 19 21 +l 17 20 +l 16 19 +l 15 16 +l 13 8 +l 12 5 +l 11 3 +l 9 1 +l 6 0 +l 4 0 +l 2 1 +l 1 2 +l 1 3 +l 2 4 +l 3 3 +l 2 2 +m 12 21 +l 16 20 +l 17 20 + +85 23 11 35 +m 1 17 +l 3 20 +l 5 21 +l 6 21 +l 8 19 +l 8 16 +l 7 13 +l 4 5 +l 4 2 +l 5 0 +m 6 21 +l 7 19 +l 7 16 +l 4 8 +l 3 5 +l 3 2 +l 5 0 +l 7 0 +l 9 1 +l 12 4 +l 14 7 +l 15 9 +m 19 21 +l 15 9 +l 14 5 +l 14 2 +l 16 0 +l 17 0 +l 19 1 +l 21 3 +m 20 21 +l 16 9 +l 15 5 +l 15 2 +l 16 0 + +86 22 11 34 +m 1 17 +l 3 20 +l 5 21 +l 6 21 +l 8 19 +l 8 16 +l 7 12 +l 5 5 +l 5 2 +l 6 0 +m 6 21 +l 7 19 +l 7 16 +l 5 9 +l 4 5 +l 4 2 +l 6 0 +l 7 0 +l 10 1 +l 13 4 +l 15 7 +l 17 11 +l 18 14 +l 19 18 +l 19 20 +l 18 21 +l 17 21 +l 16 20 +l 15 18 +l 15 15 +l 16 13 +l 18 11 +l 20 10 +l 22 10 + +87 24 12 35 +m 3 15 +l 2 15 +l 1 16 +l 1 18 +l 2 20 +l 4 21 +l 8 21 +l 7 19 +l 6 15 +l 5 6 +l 4 0 +m 6 15 +l 6 6 +l 5 0 +m 16 21 +l 14 19 +l 12 15 +l 9 6 +l 7 2 +l 5 0 +m 16 21 +l 15 19 +l 14 15 +l 13 6 +l 12 0 +m 14 15 +l 14 6 +l 13 0 +m 26 21 +l 24 20 +l 22 18 +l 20 15 +l 17 6 +l 15 2 +l 13 0 + +88 21 10 49 +m 9 16 +l 8 15 +l 6 15 +l 5 16 +l 5 18 +l 6 20 +l 8 21 +l 10 21 +l 12 20 +l 13 18 +l 13 15 +l 12 11 +l 10 6 +l 8 3 +l 6 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 3 +l 1 2 +m 10 21 +l 11 20 +l 12 18 +l 12 15 +l 11 11 +l 9 6 +l 7 3 +l 5 1 +l 3 0 +m 22 20 +l 21 19 +l 22 18 +l 23 19 +l 23 20 +l 22 21 +l 20 21 +l 18 20 +l 16 18 +l 14 15 +l 12 11 +l 11 6 +l 11 3 +l 12 1 +l 13 0 +l 14 0 +l 16 1 +l 18 3 + +89 23 11 38 +m 3 17 +l 5 20 +l 7 21 +l 8 21 +l 10 20 +l 10 18 +l 8 12 +l 8 9 +l 9 7 +m 8 21 +l 9 20 +l 9 18 +l 7 12 +l 7 9 +l 9 7 +l 11 7 +l 14 8 +l 16 10 +l 18 13 +l 19 15 +m 21 21 +l 19 15 +l 16 7 +l 14 3 +m 22 21 +l 20 15 +l 18 10 +l 16 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 3 1 +l 2 3 +l 2 4 +l 3 5 +l 4 4 +l 3 3 + +90 22 11 41 +m 19 19 +l 18 17 +l 16 12 +l 15 9 +l 14 7 +l 12 4 +l 10 2 +l 8 1 +l 5 0 +m 12 15 +l 11 13 +l 9 12 +l 7 12 +l 6 14 +l 6 16 +l 7 18 +l 9 20 +l 12 21 +l 22 21 +l 20 20 +l 19 19 +l 18 16 +l 17 12 +l 15 6 +l 13 3 +l 10 1 +l 5 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 5 3 +l 8 1 +l 10 0 +l 13 0 +l 16 1 +l 18 3 +m 15 21 +l 19 20 +l 20 20 + +91 15 7 8 +m 4 25 +l 4 -7 +m 5 25 +l 5 -7 +m 4 25 +l 11 25 +m 4 -7 +l 11 -7 + +92 23 11 2 +m 2 23 +l 20 3 + +93 15 7 8 +m 9 25 +l 9 -7 +m 10 25 +l 10 -7 +m 3 25 +l 10 25 +m 3 -7 +l 10 -7 + +94 23 11 6 +m 3 7 +l 11 12 +l 19 7 +m 3 7 +l 11 11 +l 19 7 + +95 21 10 2 +m 0 -2 +l 21 -2 + +97 15 7 29 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 10 9 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 11 9 +l 9 3 +l 9 1 +l 10 0 + +98 14 7 20 +m 0 5 +l 2 8 +l 4 12 +m 7 21 +l 1 3 +l 1 1 +l 3 0 +l 4 0 +l 6 1 +l 8 3 +l 9 6 +l 9 9 +l 10 5 +l 11 4 +l 12 4 +l 14 5 +m 8 21 +l 2 3 +l 2 1 +l 3 0 + +99 11 5 20 +m 7 8 +l 6 7 +l 7 7 +l 7 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 + +100 15 7 29 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 14 21 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 15 21 +l 9 3 +l 9 1 +l 10 0 + +101 11 5 21 +m 2 2 +l 4 3 +l 5 4 +l 6 6 +l 6 8 +l 5 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 + +102 9 4 25 +m 3 9 +l 6 12 +l 8 15 +l 9 18 +l 9 20 +l 8 21 +l 6 20 +l 5 18 +l -4 -9 +l -4 -11 +l -3 -12 +l -1 -11 +l 0 -8 +l 1 1 +l 2 0 +l 4 0 +l 6 1 +l 7 2 +l 9 5 +m 5 18 +l 4 13 +l 3 9 +l 0 0 +l -2 -5 +l -4 -9 + +103 15 7 34 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 10 9 +l 4 -9 +m 11 9 +l 8 0 +l 6 -5 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 3 -4 +l 6 -2 +l 10 0 +l 13 2 +l 15 5 + +104 15 7 25 +m 0 5 +l 2 8 +l 4 12 +m 7 21 +l 0 0 +m 8 21 +l 1 0 +m 3 6 +l 5 8 +l 7 9 +l 8 9 +l 10 8 +l 10 6 +l 9 3 +l 9 1 +l 10 0 +m 8 9 +l 9 8 +l 9 6 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 + +105 7 3 16 +m 4 15 +l 3 14 +l 4 13 +l 5 14 +l 4 15 +m 2 9 +l 0 3 +l 0 1 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +m 3 9 +l 1 3 +l 1 1 +l 2 0 + +106 6 3 21 +m 3 15 +l 2 14 +l 3 13 +l 4 14 +l 3 15 +m 1 9 +l -5 -9 +m 2 9 +l -1 0 +l -3 -5 +l -5 -9 +l -6 -11 +l -8 -12 +l -9 -11 +l -9 -9 +l -8 -6 +l -6 -4 +l -3 -2 +l 1 0 +l 4 2 +l 6 5 + +107 14 7 25 +m 0 5 +l 2 8 +l 4 12 +m 7 21 +l 0 0 +m 8 21 +l 1 0 +m 9 9 +l 9 8 +l 10 8 +l 9 9 +l 8 9 +l 6 7 +l 3 6 +m 3 6 +l 6 5 +l 7 1 +l 8 0 +m 3 6 +l 5 5 +l 6 1 +l 8 0 +l 9 0 +l 12 2 +l 14 5 + +108 8 4 14 +m 0 5 +l 2 8 +l 4 12 +m 7 21 +l 1 3 +l 1 1 +l 3 0 +l 5 1 +l 6 2 +l 8 5 +m 8 21 +l 2 3 +l 2 1 +l 3 0 + +109 25 12 39 +m 0 5 +l 2 8 +l 4 9 +l 6 8 +l 6 6 +l 4 0 +m 4 9 +l 5 8 +l 5 6 +l 3 0 +m 6 6 +l 8 8 +l 10 9 +l 11 9 +l 13 8 +l 13 6 +l 11 0 +m 11 9 +l 12 8 +l 12 6 +l 10 0 +m 13 6 +l 15 8 +l 17 9 +l 18 9 +l 20 8 +l 20 6 +l 19 3 +l 19 1 +l 20 0 +m 18 9 +l 19 8 +l 19 6 +l 18 3 +l 18 1 +l 20 0 +l 22 1 +l 23 2 +l 25 5 + +110 18 9 28 +m 0 5 +l 2 8 +l 4 9 +l 6 8 +l 6 6 +l 4 0 +m 4 9 +l 5 8 +l 5 6 +l 3 0 +m 6 6 +l 8 8 +l 10 9 +l 11 9 +l 13 8 +l 13 6 +l 12 3 +l 12 1 +l 13 0 +m 11 9 +l 12 8 +l 12 6 +l 11 3 +l 11 1 +l 13 0 +l 15 1 +l 16 2 +l 18 5 + +111 13 6 27 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 10 3 +l 12 4 +l 13 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 + +112 15 7 25 +m 0 5 +l 2 8 +l 4 12 +m 5 15 +l -4 -12 +m 6 15 +l -3 -12 +m 3 6 +l 5 8 +l 7 9 +l 8 9 +l 10 8 +l 10 6 +l 9 3 +l 9 1 +l 10 0 +m 8 9 +l 9 8 +l 9 6 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 + +113 15 7 31 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 10 9 +l 4 -9 +l 4 -11 +l 5 -12 +l 7 -11 +l 8 -8 +l 8 0 +l 10 0 +l 13 2 +l 15 5 +m 11 9 +l 8 0 +l 6 -5 +l 4 -9 + +114 14 7 20 +m 0 5 +l 2 8 +l 4 9 +l 6 8 +l 6 6 +l 4 0 +m 4 9 +l 5 8 +l 5 6 +l 3 0 +m 6 6 +l 8 8 +l 10 9 +l 11 9 +l 10 6 +m 10 9 +l 10 6 +l 11 4 +l 12 4 +l 14 5 + +115 12 6 19 +m 0 5 +l 2 8 +l 3 10 +l 3 8 +l 6 6 +l 7 4 +l 7 2 +l 6 1 +l 4 0 +m 3 8 +l 5 6 +l 6 4 +l 6 2 +l 4 0 +m 0 1 +l 2 0 +l 7 0 +l 10 2 +l 12 5 + +116 8 4 16 +m 0 5 +l 2 8 +l 4 12 +m 7 21 +l 1 3 +l 1 1 +l 3 0 +l 5 1 +l 6 2 +l 8 5 +m 8 21 +l 2 3 +l 2 1 +l 3 0 +m 2 13 +l 8 13 + +117 15 7 23 +m 2 9 +l 0 3 +l 0 1 +l 2 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 3 9 +l 1 3 +l 1 1 +l 2 0 +m 10 9 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 11 9 +l 9 3 +l 9 1 +l 10 0 + +118 14 6 20 +m 2 9 +l 1 7 +l 0 4 +l 0 1 +l 2 0 +l 3 0 +l 6 1 +l 8 3 +l 9 6 +l 9 9 +m 3 9 +l 2 7 +l 1 4 +l 1 1 +l 2 0 +m 9 9 +l 10 5 +l 11 4 +l 12 4 +l 14 5 + +119 20 9 31 +m 3 9 +l 1 7 +l 0 4 +l 0 1 +l 2 0 +l 3 0 +l 5 1 +l 7 3 +m 4 9 +l 2 7 +l 1 4 +l 1 1 +l 2 0 +m 9 9 +l 7 3 +l 7 1 +l 9 0 +l 10 0 +l 12 1 +l 14 3 +l 15 6 +l 15 9 +m 10 9 +l 8 3 +l 8 1 +l 9 0 +m 15 9 +l 16 5 +l 17 4 +l 18 4 +l 20 5 + +120 16 8 36 +m 0 5 +l 2 8 +l 4 9 +l 6 9 +l 7 8 +l 7 6 +l 6 3 +l 5 1 +l 3 0 +l 2 0 +l 1 1 +l 1 2 +l 2 2 +l 1 1 +m 13 8 +l 12 7 +l 13 7 +l 13 8 +l 12 9 +l 11 9 +l 9 8 +l 8 6 +l 7 3 +l 7 1 +l 8 0 +l 11 0 +l 14 2 +l 16 5 +m 7 8 +l 8 6 +m 9 8 +l 7 6 +m 6 3 +l 7 1 +m 7 3 +l 5 1 + +121 17 8 28 +m 3 9 +l 1 3 +l 1 1 +l 3 0 +l 4 0 +l 6 1 +l 8 3 +l 10 6 +m 4 9 +l 2 3 +l 2 1 +l 3 0 +m 11 9 +l 5 -9 +m 12 9 +l 9 0 +l 7 -5 +l 5 -9 +l 4 -11 +l 2 -12 +l 1 -11 +l 1 -9 +l 2 -6 +l 4 -4 +l 7 -2 +l 11 0 +l 14 2 +l 16 5 + +122 13 6 34 +m 0 5 +l 2 8 +l 4 9 +l 6 9 +l 8 8 +l 8 5 +l 7 3 +l 4 1 +l 2 0 +m 6 9 +l 7 8 +l 7 5 +l 6 3 +l 4 1 +m 2 0 +l 4 -1 +l 5 -3 +l 5 -6 +l 4 -9 +l 2 -11 +l 0 -12 +l -1 -11 +l -1 -9 +l 0 -6 +l 3 -3 +l 6 -1 +l 10 2 +l 13 5 +m 2 0 +l 3 -1 +l 4 -3 +l 4 -6 +l 3 -9 +l 2 -11 + +123 15 7 37 +m 9 25 +l 7 24 +l 6 23 +l 5 21 +l 5 19 +l 6 17 +l 7 16 +l 8 14 +l 8 12 +l 6 10 +m 7 24 +l 6 22 +l 6 20 +l 7 18 +l 8 17 +l 9 15 +l 9 13 +l 8 11 +l 4 9 +l 8 7 +l 9 5 +l 9 3 +l 8 1 +l 7 0 +l 6 -2 +l 6 -4 +l 7 -6 +m 6 8 +l 8 6 +l 8 4 +l 7 2 +l 6 1 +l 5 -1 +l 5 -3 +l 6 -5 +l 7 -6 +l 9 -7 + +124 9 4 2 +m 4 25 +l 4 -7 + +125 15 7 37 +m 5 25 +l 7 24 +l 8 23 +l 9 21 +l 9 19 +l 8 17 +l 7 16 +l 6 14 +l 6 12 +l 8 10 +m 7 24 +l 8 22 +l 8 20 +l 7 18 +l 6 17 +l 5 15 +l 5 13 +l 6 11 +l 10 9 +l 6 7 +l 5 5 +l 5 3 +l 6 1 +l 7 0 +l 8 -2 +l 8 -4 +l 7 -6 +m 8 8 +l 6 6 +l 6 4 +l 7 2 +l 8 1 +l 9 -1 +l 9 -3 +l 8 -5 +l 7 -6 +l 5 -7 + +126 25 12 22 +m 3 6 +l 3 8 +l 4 11 +l 6 12 +l 8 12 +l 10 11 +l 14 8 +l 16 7 +l 18 7 +l 20 8 +l 21 10 +m 3 8 +l 4 10 +l 6 11 +l 8 11 +l 10 10 +l 14 7 +l 16 6 +l 18 6 +l 20 7 +l 21 10 +l 21 12 + +128 22 11 43 +m 3 19 +l 2 17 +l 2 15 +l 3 13 +l 6 12 +l 9 12 +l 13 13 +l 15 14 +l 17 16 +l 18 18 +l 18 20 +l 17 21 +l 15 21 +l 12 20 +l 9 17 +l 7 14 +l 5 10 +l 4 6 +l 4 3 +l 5 1 +l 8 0 +l 10 0 +l 13 1 +l 15 3 +l 16 5 +l 16 7 +l 15 9 +l 13 9 +l 11 8 +l 10 6 +m 15 21 +l 13 20 +l 10 17 +l 8 14 +l 6 10 +l 5 6 +l 5 3 +l 6 1 +l 8 0 +m 13 0 +l 16 -3 +l 11 -5 +l 4 -7 + +129 15 7 27 +m 2 9 +l 0 3 +l 0 1 +l 2 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 3 9 +l 1 3 +l 1 1 +l 2 0 +m 10 9 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 11 9 +l 9 3 +l 9 1 +l 10 0 +s 3 15 +l 4 15 +s 11 15 +l 12 15 + +130 11 5 23 +m 2 2 +l 4 3 +l 5 4 +l 6 6 +l 6 8 +l 5 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 1 14 +l 7 17 + +131 15 7 32 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 10 9 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 11 9 +l 9 3 +l 9 1 +l 10 0 +m 1 15 +l 6 19 +l 11 15 + +132 15 7 33 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 10 9 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 11 9 +l 9 3 +l 9 1 +l 10 0 +s 3 15 +l 4 15 +s 11 15 +l 12 15 + +133 15 7 31 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 10 9 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 11 9 +l 9 3 +l 9 1 +l 10 0 +m 3 19 +l 7 15 + +134 15 7 31 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 10 9 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 11 9 +l 9 3 +l 9 1 +l 10 0 +s 7 16 +l 9 16 + +135 11 5 24 +m 7 8 +l 6 7 +l 7 7 +l 7 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 5 0 +l 7 -2 +l 4 -3 +l 0 -4 + +136 11 5 24 +m 2 2 +l 4 3 +l 5 4 +l 6 6 +l 6 8 +l 5 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 0 15 +l 4 19 +l 8 15 + +137 11 5 25 +m 2 2 +l 4 3 +l 5 4 +l 6 6 +l 6 8 +l 5 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +s 1 15 +l 2 15 +s 8 15 +l 9 15 + +138 11 5 23 +m 2 2 +l 4 3 +l 5 4 +l 6 6 +l 6 8 +l 5 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 1 19 +l 5 15 + +139 7 3 15 +m 2 9 +l 0 3 +l 0 1 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +m 3 9 +l 1 3 +l 1 1 +l 2 0 +s 1 15 +l 2 15 +s 6 15 +l 7 15 + +140 7 4 14 +m 2 9 +l 0 3 +l 0 1 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +m 3 9 +l 1 3 +l 1 1 +l 2 0 +m 0 15 +l 4 19 +l 8 15 + +141 8 4 13 +m 2 9 +l 0 3 +l 0 1 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +m 3 9 +l 1 3 +l 1 1 +l 2 0 +m 0 18 +l 4 15 + +142 24 12 38 +m 20 21 +l 18 19 +l 16 16 +l 13 11 +l 11 8 +l 8 4 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 3 +l 1 2 +m 20 21 +l 19 17 +l 17 7 +l 16 0 +m 20 21 +l 17 0 +m 16 0 +l 16 2 +l 15 5 +l 14 7 +l 12 9 +l 10 10 +l 8 10 +l 7 9 +l 7 7 +l 8 4 +l 11 1 +l 14 0 +l 18 0 +l 20 1 +s 15 21 +l 16 21 +s 22 21 +l 23 21 + +143 25 12 36 +m 20 21 +l 18 19 +l 16 16 +l 13 11 +l 11 8 +l 8 4 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 3 +l 1 2 +m 20 21 +l 19 17 +l 17 7 +l 16 0 +m 20 21 +l 17 0 +m 16 0 +l 16 2 +l 15 5 +l 14 7 +l 12 9 +l 10 10 +l 8 10 +l 7 9 +l 7 7 +l 8 4 +l 11 1 +l 14 0 +l 18 0 +l 20 1 +s 20 23 +l 22 23 + +144 20 10 47 +m 14 18 +l 13 17 +l 13 15 +l 14 14 +l 16 14 +l 17 16 +l 17 18 +l 16 20 +l 14 21 +l 11 21 +l 9 20 +l 8 19 +l 7 17 +l 7 15 +l 8 13 +l 10 12 +m 11 21 +l 9 19 +l 8 17 +l 8 14 +l 10 12 +m 10 12 +l 8 12 +l 5 11 +l 3 9 +l 2 7 +l 2 4 +l 3 2 +l 4 1 +l 6 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 15 7 +l 14 9 +l 12 9 +l 10 8 +l 9 6 +m 8 12 +l 6 11 +l 4 9 +l 3 7 +l 3 3 +l 4 1 +m 12 22 +l 18 25 + +145 23 11 79 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 16 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 12 8 +l 23 8 +l 23 10 +l 22 12 +l 21 13 +l 18 14 +l 16 14 +l 13 13 +l 11 11 +l 10 8 +l 10 6 +l 11 3 +l 13 1 +l 16 0 +l 18 0 +l 21 1 +l 23 3 +m 22 9 +l 22 10 +l 21 12 +m 12 11 +l 11 9 +l 11 5 +l 12 3 +m 21 8 +l 21 11 +l 20 13 +l 18 14 +m 16 14 +l 14 13 +l 13 12 +l 12 9 +l 12 5 + +146 38 19 67 +m 19 21 +l 7 1 +m 10 6 +l 20 6 +m 4 0 +l 10 0 +m 7 1 +l 5 0 +m 7 1 +l 9 0 +m 20 21 +l 20 0 +m 21 20 +l 21 1 +m 22 21 +l 22 0 +m 17 21 +l 33 21 +l 33 15 +m 22 11 +l 28 11 +m 28 15 +l 28 7 +m 17 0 +l 33 0 +l 33 6 +m 18 21 +l 20 20 +m 19 21 +l 20 19 +m 23 21 +l 22 19 +m 24 21 +l 22 20 +m 28 21 +l 33 20 +m 30 21 +l 33 19 +m 31 21 +l 33 18 +m 32 21 +l 33 15 +m 28 15 +l 27 11 +l 28 7 +m 28 13 +l 26 11 +l 28 9 +m 28 12 +l 24 11 +l 28 10 +m 20 1 +l 18 0 +m 20 2 +l 19 0 +m 22 2 +l 23 0 +m 22 1 +l 24 0 +m 28 0 +l 33 1 +m 30 0 +l 33 2 +m 31 0 +l 33 3 +m 32 0 +l 33 6 + +147 13 6 30 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 10 3 +l 12 4 +l 13 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 1 15 +l 6 19 +l 11 15 + +148 13 6 31 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 10 3 +l 12 4 +l 13 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +s 2 15 +l 3 15 +s 11 15 +l 12 15 + +149 13 6 29 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 10 3 +l 12 4 +l 13 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 4 19 +l 9 15 + +150 15 7 26 +m 2 9 +l 0 3 +l 0 1 +l 2 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 3 9 +l 1 3 +l 1 1 +l 2 0 +m 10 9 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 11 9 +l 9 3 +l 9 1 +l 10 0 +m 1 15 +l 6 19 +l 11 15 + +151 15 7 25 +m 2 9 +l 0 3 +l 0 1 +l 2 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 3 9 +l 1 3 +l 1 1 +l 2 0 +m 10 9 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 11 9 +l 9 3 +l 9 1 +l 10 0 +m 4 19 +l 9 15 + +152 15 7 32 +m 2 9 +l 0 3 +l 0 1 +l 2 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 3 9 +l 1 3 +l 1 1 +l 2 0 +m 10 9 +l 4 -9 +m 11 9 +l 8 0 +l 6 -5 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 3 -4 +l 6 -2 +l 10 0 +l 13 2 +l 15 5 +s 3 15 +l 4 15 +s 12 15 +l 13 15 + +153 22 11 36 +m 11 21 +l 9 20 +l 7 18 +l 5 15 +l 4 13 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 16 6 +l 17 8 +l 18 12 +l 18 16 +l 17 19 +l 16 20 +l 15 20 +l 13 19 +l 11 17 +l 9 13 +l 8 8 +l 8 5 +m 9 20 +l 7 17 +l 5 13 +l 4 9 +l 4 5 +l 5 2 +l 7 0 +s 6 21 +l 7 21 +s 20 21 +l 21 21 + +154 23 11 39 +m 1 17 +l 3 20 +l 5 21 +l 6 21 +l 8 19 +l 8 16 +l 7 13 +l 4 5 +l 4 2 +l 5 0 +m 6 21 +l 7 19 +l 7 16 +l 4 8 +l 3 5 +l 3 2 +l 5 0 +l 7 0 +l 9 1 +l 12 4 +l 14 7 +l 15 9 +m 19 21 +l 15 9 +l 14 5 +l 14 2 +l 16 0 +l 17 0 +l 19 1 +l 21 3 +m 20 21 +l 16 9 +l 15 5 +l 15 2 +l 16 0 +s 9 21 +l 10 21 +s 17 21 +l 18 21 + +155 13 6 29 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 10 3 +l 12 4 +l 13 5 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m -1 0 +l 9 9 + +157 22 11 34 +m 11 21 +l 9 20 +l 7 18 +l 5 15 +l 4 13 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 16 6 +l 17 8 +l 18 12 +l 18 16 +l 17 19 +l 16 20 +l 15 20 +l 13 19 +l 11 17 +l 9 13 +l 8 8 +l 8 5 +m 9 20 +l 7 17 +l 5 13 +l 4 9 +l 4 5 +l 5 2 +l 7 0 +m 3 0 +l 18 21 + +160 15 7 31 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +m 4 9 +l 2 7 +l 1 5 +l 1 2 +l 3 0 +m 10 9 +l 8 3 +l 8 1 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 11 9 +l 9 3 +l 9 1 +l 10 0 +m 7 14 +l 13 17 + +225 22 11 51 +m 13 21 +l 10 20 +l 8 18 +l 6 14 +l 5 11 +l 4 7 +l 3 1 +l 2 -7 +m 13 21 +l 11 20 +l 9 18 +l 7 14 +l 6 11 +l 5 7 +l 4 1 +l 3 -7 +m 13 21 +l 15 21 +l 17 20 +l 18 19 +l 18 16 +l 17 14 +l 16 13 +l 13 12 +l 9 12 +m 15 21 +l 17 19 +l 17 16 +l 16 14 +l 15 13 +l 13 12 +m 9 12 +l 13 11 +l 15 9 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 11 0 +l 9 0 +l 7 1 +l 6 2 +l 5 5 +m 9 12 +l 12 11 +l 14 9 +l 15 7 +l 15 4 +l 14 2 +l 13 1 +l 11 0 diff --git a/cd/etc/vectorfont07.txt b/cd/etc/vectorfont07.txt new file mode 100755 index 0000000..08339d0 --- /dev/null +++ b/cd/etc/vectorfont07.txt @@ -0,0 +1,1357 @@ +Simplex greek I +25 21 10 -7 + + +32 21 10 0 + +33 11 5 7 +m 5 21 +l 5 7 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +34 17 8 4 +m 4 21 +l 4 14 +m 12 21 +l 12 14 + +35 22 11 8 +m 11 25 +l 4 -7 +m 17 25 +l 10 -7 +m 4 12 +l 18 12 +m 3 6 +l 17 6 + +36 21 10 24 +m 8 25 +l 8 -4 +m 12 25 +l 12 -4 +m 17 18 +l 15 20 +l 12 21 +l 8 21 +l 5 20 +l 3 18 +l 3 16 +l 4 14 +l 5 13 +l 7 12 +l 13 10 +l 15 9 +l 16 8 +l 17 6 +l 17 3 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 3 3 + +37 25 12 29 +m 21 21 +l 3 0 +m 8 21 +l 10 19 +l 10 17 +l 9 15 +l 7 14 +l 5 14 +l 3 16 +l 3 18 +l 4 20 +l 6 21 +l 8 21 +l 10 20 +l 13 19 +l 16 19 +l 19 20 +l 21 21 +m 17 7 +l 15 6 +l 14 4 +l 14 2 +l 16 0 +l 18 0 +l 20 1 +l 21 3 +l 21 5 +l 19 7 +l 17 7 + +38 27 13 34 +m 23 12 +l 23 13 +l 22 14 +l 21 14 +l 20 13 +l 19 11 +l 17 6 +l 15 3 +l 13 1 +l 11 0 +l 7 0 +l 5 1 +l 4 2 +l 3 4 +l 3 6 +l 4 8 +l 5 9 +l 12 13 +l 13 14 +l 14 16 +l 14 18 +l 13 20 +l 11 21 +l 9 20 +l 8 18 +l 8 16 +l 9 13 +l 11 10 +l 16 3 +l 18 1 +l 20 0 +l 22 0 +l 23 1 +l 23 2 + +39 9 4 2 +m 4 21 +l 4 14 + +40 15 7 10 +m 11 25 +l 9 23 +l 7 20 +l 5 16 +l 4 11 +l 4 7 +l 5 2 +l 7 -2 +l 9 -5 +l 11 -7 + +41 15 7 10 +m 3 25 +l 5 23 +l 7 20 +l 9 16 +l 10 11 +l 10 7 +l 9 2 +l 7 -2 +l 5 -5 +l 3 -7 + +42 17 8 6 +m 8 15 +l 8 3 +m 3 12 +l 13 6 +m 13 12 +l 3 6 + +43 27 13 4 +m 13 18 +l 13 0 +m 4 9 +l 22 9 + +44 11 5 8 +m 6 1 +l 5 0 +l 4 1 +l 5 2 +l 6 1 +l 6 -1 +l 5 -3 +l 4 -4 + +45 27 13 2 +m 4 9 +l 22 9 + +46 11 5 5 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +47 23 11 2 +m 20 25 +l 2 -7 + +48 21 10 17 +m 9 21 +l 6 20 +l 4 17 +l 3 12 +l 3 9 +l 4 4 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 4 +l 17 9 +l 17 12 +l 16 17 +l 14 20 +l 11 21 +l 9 21 + +49 21 10 4 +m 6 17 +l 8 18 +l 11 21 +l 11 0 + +50 21 10 14 +m 4 16 +l 4 17 +l 5 19 +l 6 20 +l 8 21 +l 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 13 10 +l 3 0 +l 17 0 + +51 21 10 15 +m 5 21 +l 16 21 +l 10 13 +l 13 13 +l 15 12 +l 16 11 +l 17 8 +l 17 6 +l 16 3 +l 14 1 +l 11 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 + +52 21 10 5 +m 13 21 +l 3 7 +l 18 7 +m 13 21 +l 13 0 + +53 21 10 17 +m 15 21 +l 5 21 +l 4 12 +l 5 13 +l 8 14 +l 11 14 +l 14 13 +l 16 11 +l 17 8 +l 17 6 +l 16 3 +l 14 1 +l 11 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 + +54 21 10 23 +m 16 18 +l 15 20 +l 12 21 +l 10 21 +l 7 20 +l 5 17 +l 4 12 +l 4 7 +l 5 3 +l 7 1 +l 10 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 7 +l 16 10 +l 14 12 +l 11 13 +l 10 13 +l 7 12 +l 5 10 +l 4 7 + +55 21 10 4 +m 17 21 +l 7 0 +m 3 21 +l 17 21 + +56 21 10 29 +m 8 21 +l 5 20 +l 4 18 +l 4 16 +l 5 14 +l 7 13 +l 11 12 +l 14 11 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 +l 3 7 +l 4 9 +l 6 11 +l 9 12 +l 13 13 +l 15 14 +l 16 16 +l 16 18 +l 15 20 +l 12 21 +l 8 21 + +57 21 10 23 +m 16 14 +l 15 11 +l 13 9 +l 10 8 +l 9 8 +l 6 9 +l 4 11 +l 3 14 +l 3 15 +l 4 18 +l 6 20 +l 9 21 +l 10 21 +l 13 20 +l 15 18 +l 16 14 +l 16 9 +l 15 4 +l 13 1 +l 10 0 +l 8 0 +l 5 1 +l 4 3 + +58 11 5 10 +m 5 14 +l 4 13 +l 5 12 +l 6 13 +l 5 14 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +59 11 5 13 +m 5 14 +l 4 13 +l 5 12 +l 6 13 +l 5 14 +m 6 1 +l 5 0 +l 4 1 +l 5 2 +l 6 1 +l 6 -1 +l 5 -3 +l 4 -4 + +60 25 12 3 +m 20 18 +l 4 9 +l 20 0 + +61 27 13 4 +m 4 12 +l 22 12 +m 4 6 +l 22 6 + +62 25 12 3 +m 4 18 +l 20 9 +l 4 0 + +63 19 9 19 +m 3 16 +l 3 17 +l 4 19 +l 5 20 +l 7 21 +l 11 21 +l 13 20 +l 14 19 +l 15 17 +l 15 15 +l 14 13 +l 13 12 +l 9 10 +l 9 7 +m 9 2 +l 8 1 +l 9 0 +l 10 1 +l 9 2 + +64 28 14 52 +m 18 13 +l 17 15 +l 15 16 +l 12 16 +l 10 15 +l 9 14 +l 8 11 +l 8 8 +l 9 6 +l 11 5 +l 14 5 +l 16 6 +l 17 8 +m 12 16 +l 10 14 +l 9 11 +l 9 8 +l 10 6 +l 11 5 +m 18 16 +l 17 8 +l 17 6 +l 19 5 +l 21 5 +l 23 7 +l 24 10 +l 24 12 +l 23 15 +l 22 17 +l 20 19 +l 18 20 +l 15 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 15 0 +l 18 1 +l 20 2 +l 21 3 +m 19 16 +l 18 8 +l 18 6 +l 19 5 + +65 19 9 6 +m 9 21 +l 1 0 +m 9 21 +l 17 0 +m 4 7 +l 14 7 + +66 22 11 21 +m 4 21 +l 4 0 +m 4 21 +l 13 21 +l 16 20 +l 17 19 +l 18 17 +l 18 15 +l 17 13 +l 16 12 +l 13 11 +m 4 11 +l 13 11 +l 16 10 +l 17 9 +l 18 7 +l 18 4 +l 17 2 +l 16 1 +l 13 0 +l 4 0 + +67 18 9 4 +m 4 21 +l 4 0 +m 4 21 +l 16 21 + +68 19 9 6 +m 9 21 +l 1 0 +m 9 21 +l 17 0 +m 1 0 +l 17 0 + +69 20 10 8 +m 4 21 +l 4 0 +m 4 21 +l 17 21 +m 4 11 +l 12 11 +m 4 0 +l 17 0 + +70 21 10 6 +m 17 21 +l 3 0 +m 3 21 +l 17 21 +m 3 0 +l 17 0 + +71 23 11 6 +m 4 21 +l 4 0 +m 18 21 +l 18 0 +m 4 11 +l 18 11 + +72 23 11 23 +m 9 21 +l 7 20 +l 5 18 +l 4 16 +l 3 13 +l 3 8 +l 4 5 +l 5 3 +l 7 1 +l 9 0 +l 13 0 +l 15 1 +l 17 3 +l 18 5 +l 19 8 +l 19 13 +l 18 16 +l 17 18 +l 15 20 +l 13 21 +l 9 21 +m 8 11 +l 14 11 + +73 9 4 2 +m 4 21 +l 4 0 + +75 22 11 6 +m 4 21 +l 4 0 +m 18 21 +l 4 7 +m 9 12 +l 18 0 + +76 19 9 4 +m 9 21 +l 1 0 +m 9 21 +l 17 0 + +77 25 12 8 +m 4 21 +l 4 0 +m 4 21 +l 12 0 +m 20 21 +l 12 0 +m 20 21 +l 20 0 + +78 23 11 6 +m 4 21 +l 4 0 +m 4 21 +l 18 0 +m 18 21 +l 18 0 + +79 19 9 6 +m 2 21 +l 16 21 +m 6 11 +l 12 11 +m 2 0 +l 16 0 + +80 23 11 21 +m 9 21 +l 7 20 +l 5 18 +l 4 16 +l 3 13 +l 3 8 +l 4 5 +l 5 3 +l 7 1 +l 9 0 +l 13 0 +l 15 1 +l 17 3 +l 18 5 +l 19 8 +l 19 13 +l 18 16 +l 17 18 +l 15 20 +l 13 21 +l 9 21 + +81 23 11 6 +m 4 21 +l 4 0 +m 18 21 +l 18 0 +m 4 21 +l 18 21 + +82 22 11 12 +m 4 21 +l 4 0 +m 4 21 +l 13 21 +l 16 20 +l 17 19 +l 18 17 +l 18 14 +l 17 12 +l 16 11 +l 13 10 +l 4 10 + +83 19 9 7 +m 2 21 +l 9 11 +l 2 0 +m 2 21 +l 16 21 +m 2 0 +l 16 0 + +84 17 8 4 +m 8 21 +l 8 0 +m 1 21 +l 15 21 + +85 19 9 17 +m 2 16 +l 2 18 +l 3 20 +l 4 21 +l 6 21 +l 7 20 +l 8 18 +l 9 14 +l 9 0 +m 16 16 +l 16 18 +l 15 20 +l 14 21 +l 12 21 +l 11 20 +l 10 18 +l 9 14 + +87 21 10 19 +m 10 21 +l 10 0 +m 8 16 +l 5 15 +l 4 14 +l 3 12 +l 3 9 +l 4 7 +l 5 6 +l 8 5 +l 12 5 +l 15 6 +l 16 7 +l 17 9 +l 17 12 +l 16 14 +l 15 15 +l 12 16 +l 8 16 + +88 21 10 4 +m 3 21 +l 17 0 +m 3 0 +l 17 21 + +89 23 11 16 +m 11 21 +l 11 0 +m 2 15 +l 3 15 +l 4 14 +l 5 10 +l 6 8 +l 7 7 +l 10 6 +l 12 6 +l 15 7 +l 16 8 +l 17 10 +l 18 14 +l 19 15 +l 20 15 + +90 21 10 16 +m 3 0 +l 7 0 +l 4 7 +l 3 11 +l 3 15 +l 4 18 +l 6 20 +l 9 21 +l 11 21 +l 14 20 +l 16 18 +l 17 15 +l 17 11 +l 16 7 +l 13 0 +l 17 0 + +91 15 7 6 +m 4 25 +l 4 -7 +m 4 25 +l 11 25 +m 4 -7 +l 11 -7 + +92 23 11 2 +m 2 23 +l 20 3 + +93 15 7 6 +m 10 25 +l 10 -7 +m 3 25 +l 10 25 +m 3 -7 +l 10 -7 + +94 23 11 6 +m 3 7 +l 11 12 +l 19 7 +m 3 7 +l 11 11 +l 19 7 + +95 21 10 2 +m 0 -2 +l 21 -2 + +96 25 12 22 +m 3 6 +l 3 8 +l 4 11 +l 6 12 +l 8 12 +l 10 11 +l 14 8 +l 16 7 +l 18 7 +l 20 8 +l 21 10 +m 3 8 +l 4 10 +l 6 11 +l 8 11 +l 10 10 +l 14 7 +l 16 6 +l 18 6 +l 20 7 +l 21 10 +l 21 12 + +97 22 11 22 +m 9 14 +l 7 13 +l 5 11 +l 4 9 +l 3 6 +l 3 3 +l 4 1 +l 6 0 +l 8 0 +l 10 1 +l 13 4 +l 15 7 +l 17 11 +l 18 14 +m 9 14 +l 11 14 +l 12 13 +l 13 11 +l 15 3 +l 16 1 +l 17 0 +l 18 0 + +98 20 10 28 +m 12 21 +l 10 20 +l 8 18 +l 6 14 +l 5 11 +l 4 7 +l 3 1 +l 2 -7 +m 12 21 +l 14 21 +l 16 19 +l 16 16 +l 15 14 +l 14 13 +l 12 12 +l 9 12 +m 9 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 10 0 +l 8 0 +l 6 1 +l 5 2 +l 4 5 + +99 20 10 15 +m 1 11 +l 3 13 +l 5 14 +l 6 14 +l 8 13 +l 9 12 +l 10 9 +l 10 5 +l 9 0 +m 17 14 +l 16 11 +l 15 9 +l 9 0 +l 7 -4 +l 6 -7 + +100 19 9 23 +m 11 14 +l 8 14 +l 6 13 +l 4 11 +l 3 8 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 14 6 +l 14 9 +l 13 12 +l 11 14 +l 9 16 +l 8 18 +l 8 20 +l 9 21 +l 11 21 +l 13 20 +l 15 18 + +101 17 8 17 +m 13 12 +l 12 13 +l 10 14 +l 7 14 +l 5 13 +l 5 11 +l 6 9 +l 9 8 +m 9 8 +l 5 7 +l 3 5 +l 3 3 +l 4 1 +l 6 0 +l 9 0 +l 11 1 +l 13 3 + +102 16 8 21 +m 10 21 +l 8 20 +l 7 19 +l 7 18 +l 8 17 +l 11 16 +l 14 16 +m 14 16 +l 10 14 +l 7 12 +l 4 9 +l 3 6 +l 3 4 +l 4 2 +l 6 0 +l 9 -2 +l 10 -4 +l 10 -6 +l 9 -7 +l 7 -7 +l 6 -5 + +103 21 10 17 +m 1 10 +l 2 12 +l 4 14 +l 6 14 +l 7 13 +l 7 11 +l 6 7 +l 4 0 +m 6 7 +l 8 11 +l 10 13 +l 12 14 +l 14 14 +l 16 12 +l 16 9 +l 15 4 +l 12 -7 + +104 22 11 26 +m 1 10 +l 2 12 +l 4 14 +l 6 14 +l 7 13 +l 7 11 +l 6 6 +l 6 3 +l 7 1 +l 8 0 +l 10 0 +l 12 1 +l 14 4 +l 15 6 +l 16 9 +l 17 14 +l 17 17 +l 16 20 +l 14 21 +l 12 21 +l 11 19 +l 11 17 +l 12 14 +l 14 11 +l 16 9 +l 19 7 + +105 12 6 8 +m 6 14 +l 4 7 +l 3 3 +l 3 1 +l 4 0 +l 6 0 +l 8 2 +l 9 4 + +107 19 9 16 +m 6 14 +l 2 0 +m 16 13 +l 15 14 +l 14 14 +l 12 13 +l 8 9 +l 6 8 +l 5 8 +m 5 8 +l 7 7 +l 8 6 +l 10 1 +l 11 0 +l 12 0 +l 13 1 + +108 17 8 7 +m 1 21 +l 3 21 +l 5 20 +l 6 19 +l 14 0 +m 8 14 +l 2 0 + +109 22 11 18 +m 7 14 +l 1 -7 +m 6 10 +l 5 5 +l 5 2 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 7 +m 17 14 +l 15 7 +l 14 3 +l 14 1 +l 15 0 +l 17 0 +l 19 2 +l 20 4 + +110 19 9 12 +m 3 14 +l 6 14 +l 5 8 +l 4 3 +l 3 0 +m 16 14 +l 15 11 +l 14 9 +l 12 6 +l 9 3 +l 6 1 +l 3 0 + +111 17 8 26 +m 10 21 +l 8 20 +l 7 19 +l 7 18 +l 8 17 +l 11 16 +l 14 16 +m 11 16 +l 8 15 +l 6 14 +l 5 12 +l 5 10 +l 7 8 +l 10 7 +l 12 7 +m 10 7 +l 6 6 +l 4 5 +l 3 3 +l 3 1 +l 5 -1 +l 9 -3 +l 10 -4 +l 10 -6 +l 8 -7 +l 6 -7 + +112 18 9 17 +m 8 14 +l 6 13 +l 4 11 +l 3 8 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 14 6 +l 14 9 +l 13 12 +l 12 13 +l 10 14 +l 8 14 + +113 23 11 10 +m 9 14 +l 5 0 +m 14 14 +l 15 8 +l 16 3 +l 17 0 +m 2 11 +l 4 13 +l 7 14 +l 20 14 + +114 19 9 18 +m 4 8 +l 4 5 +l 5 2 +l 6 1 +l 8 0 +l 10 0 +l 12 1 +l 14 3 +l 15 6 +l 15 9 +l 14 12 +l 13 13 +l 11 14 +l 9 14 +l 7 13 +l 5 11 +l 4 8 +l 0 -7 + +115 21 10 17 +m 18 14 +l 8 14 +l 6 13 +l 4 11 +l 3 8 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 14 6 +l 14 9 +l 13 12 +l 12 13 +l 10 14 + +116 21 10 6 +m 11 14 +l 8 0 +m 2 11 +l 4 13 +l 7 14 +l 18 14 + +117 21 10 15 +m 1 10 +l 2 12 +l 4 14 +l 6 14 +l 7 13 +l 7 11 +l 5 5 +l 5 2 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 16 7 +l 17 11 +l 17 14 + +119 23 11 20 +m 8 13 +l 6 12 +l 4 10 +l 3 7 +l 3 4 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 13 1 +l 16 3 +l 18 6 +l 19 9 +l 19 12 +l 17 14 +l 15 14 +l 13 12 +l 11 8 +l 9 3 +l 6 -7 + +120 19 9 12 +m 2 14 +l 4 14 +l 6 12 +l 12 -5 +l 14 -7 +l 16 -7 +m 17 14 +l 16 12 +l 14 9 +l 4 -2 +l 2 -5 +l 1 -7 + +121 24 12 18 +m 16 21 +l 8 -7 +m 1 10 +l 2 12 +l 4 14 +l 6 14 +l 7 13 +l 7 11 +l 6 6 +l 6 3 +l 7 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 18 6 +l 20 11 +l 21 14 + +122 24 12 21 +m 8 14 +l 6 13 +l 4 10 +l 3 7 +l 3 4 +l 4 1 +l 5 0 +l 7 0 +l 9 1 +l 11 4 +m 12 8 +l 11 4 +l 12 1 +l 13 0 +l 15 0 +l 17 1 +l 19 4 +l 20 7 +l 20 10 +l 19 13 +l 18 14 + +123 15 7 37 +m 9 25 +l 7 24 +l 6 23 +l 5 21 +l 5 19 +l 6 17 +l 7 16 +l 8 14 +l 8 12 +l 6 10 +m 7 24 +l 6 22 +l 6 20 +l 7 18 +l 8 17 +l 9 15 +l 9 13 +l 8 11 +l 4 9 +l 8 7 +l 9 5 +l 9 3 +l 8 1 +l 7 0 +l 6 -2 +l 6 -4 +l 7 -6 +m 6 8 +l 8 6 +l 8 4 +l 7 2 +l 6 1 +l 5 -1 +l 5 -3 +l 6 -5 +l 7 -6 +l 9 -7 + +124 9 4 2 +m 4 25 +l 4 -7 + +125 15 7 37 +m 5 25 +l 7 24 +l 8 23 +l 9 21 +l 9 19 +l 8 17 +l 7 16 +l 6 14 +l 6 12 +l 8 10 +m 7 24 +l 8 22 +l 8 20 +l 7 18 +l 6 17 +l 5 15 +l 5 13 +l 6 11 +l 10 9 +l 6 7 +l 5 5 +l 5 3 +l 6 1 +l 7 0 +l 8 -2 +l 8 -4 +l 7 -6 +m 8 8 +l 6 6 +l 6 4 +l 7 2 +l 8 1 +l 9 -1 +l 9 -3 +l 8 -5 +l 7 -6 +l 5 -7 diff --git a/cd/etc/vectorfont08.txt b/cd/etc/vectorfont08.txt new file mode 100755 index 0000000..49ea0d6 --- /dev/null +++ b/cd/etc/vectorfont08.txt @@ -0,0 +1,2177 @@ +Complex greek I +25 21 10 -7 + + +32 21 10 0 + +33 11 5 12 +m 5 21 +l 4 19 +l 5 7 +l 6 19 +l 5 21 +m 5 19 +l 5 13 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +34 17 8 8 +m 4 21 +l 3 14 +m 5 21 +l 3 14 +m 12 21 +l 11 14 +m 13 21 +l 11 14 + +35 22 11 8 +m 11 21 +l 4 -7 +m 17 21 +l 10 -7 +m 4 10 +l 18 10 +m 3 4 +l 17 4 + +36 21 10 38 +m 8 25 +l 8 -4 +m 12 25 +l 12 -4 +m 16 18 +l 15 17 +l 16 16 +l 17 17 +l 17 18 +l 15 20 +l 12 21 +l 8 21 +l 5 20 +l 3 18 +l 3 16 +l 4 14 +l 5 13 +l 7 12 +l 13 10 +l 15 9 +l 17 7 +m 3 16 +l 5 14 +l 7 13 +l 13 11 +l 15 10 +l 16 9 +l 17 7 +l 17 3 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 3 3 +l 3 4 +l 4 5 +l 5 4 +l 4 3 + +37 25 12 29 +m 21 21 +l 3 0 +m 8 21 +l 10 19 +l 10 17 +l 9 15 +l 7 14 +l 5 14 +l 3 16 +l 3 18 +l 4 20 +l 6 21 +l 8 21 +l 10 20 +l 13 19 +l 16 19 +l 19 20 +l 21 21 +m 17 7 +l 15 6 +l 14 4 +l 14 2 +l 16 0 +l 18 0 +l 20 1 +l 21 3 +l 21 5 +l 19 7 +l 17 7 + +38 26 13 46 +m 21 13 +l 20 12 +l 21 11 +l 22 12 +l 22 13 +l 21 14 +l 20 14 +l 19 13 +l 18 11 +l 16 6 +l 14 3 +l 12 1 +l 10 0 +l 7 0 +l 4 1 +l 3 3 +l 3 6 +l 4 8 +l 10 12 +l 12 14 +l 13 16 +l 13 18 +l 12 20 +l 10 21 +l 8 20 +l 7 18 +l 7 16 +l 8 13 +l 10 10 +l 15 3 +l 17 1 +l 20 0 +l 21 0 +l 22 1 +l 22 2 +m 7 0 +l 5 1 +l 4 3 +l 4 6 +l 5 8 +l 7 10 +m 7 16 +l 8 14 +l 16 3 +l 18 1 +l 20 0 + +39 9 4 4 +m 4 21 +l 3 14 +m 5 21 +l 3 14 + +40 15 7 18 +m 11 25 +l 9 23 +l 7 20 +l 5 16 +l 4 11 +l 4 7 +l 5 2 +l 7 -2 +l 9 -5 +l 11 -7 +m 9 23 +l 7 19 +l 6 16 +l 5 11 +l 5 7 +l 6 2 +l 7 -1 +l 9 -5 + +41 15 7 18 +m 3 25 +l 5 23 +l 7 20 +l 9 16 +l 10 11 +l 10 7 +l 9 2 +l 7 -2 +l 5 -5 +l 3 -7 +m 5 23 +l 7 19 +l 8 16 +l 9 11 +l 9 7 +l 8 2 +l 7 -1 +l 5 -5 + +42 17 8 6 +m 8 21 +l 8 9 +m 3 18 +l 13 12 +m 13 18 +l 3 12 + +43 27 13 4 +m 13 18 +l 13 0 +m 4 9 +l 22 9 + +44 11 5 7 +m 5 0 +l 4 1 +l 5 2 +l 6 1 +l 6 -1 +l 5 -3 +l 4 -4 + +45 27 13 2 +m 4 9 +l 22 9 + +46 11 5 5 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +47 23 11 2 +m 20 25 +l 2 -7 + +48 21 10 37 +m 9 21 +l 6 20 +l 4 17 +l 3 12 +l 3 9 +l 4 4 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 4 +l 17 9 +l 17 12 +l 16 17 +l 14 20 +l 11 21 +l 9 21 +m 9 21 +l 7 20 +l 6 19 +l 5 17 +l 4 12 +l 4 9 +l 5 4 +l 6 2 +l 7 1 +l 9 0 +m 11 0 +l 13 1 +l 14 2 +l 15 4 +l 16 9 +l 16 12 +l 15 17 +l 14 19 +l 13 20 +l 11 21 + +49 21 10 8 +m 6 17 +l 8 18 +l 11 21 +l 11 0 +m 10 20 +l 10 0 +m 6 0 +l 15 0 + +50 21 10 41 +m 4 17 +l 5 16 +l 4 15 +l 3 16 +l 3 17 +l 4 19 +l 5 20 +l 8 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 13 11 +l 8 9 +l 6 8 +l 4 6 +l 3 3 +l 3 0 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 12 11 +l 8 9 +m 3 2 +l 4 3 +l 6 3 +l 11 1 +l 14 1 +l 16 2 +l 17 3 +m 6 3 +l 11 0 +l 15 0 +l 16 1 +l 17 3 +l 17 5 + +51 21 10 43 +m 4 17 +l 5 16 +l 4 15 +l 3 16 +l 3 17 +l 4 19 +l 5 20 +l 8 21 +l 12 21 +l 15 20 +l 16 18 +l 16 15 +l 15 13 +l 12 12 +l 9 12 +m 12 21 +l 14 20 +l 15 18 +l 15 15 +l 14 13 +l 12 12 +m 12 12 +l 14 11 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 +l 3 5 +l 4 6 +l 5 5 +l 4 4 +m 15 10 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 12 0 + +52 21 10 9 +m 12 19 +l 12 0 +m 13 21 +l 13 0 +m 13 21 +l 2 6 +l 18 6 +m 9 0 +l 16 0 + +53 21 10 34 +m 5 21 +l 3 11 +m 3 11 +l 5 13 +l 8 14 +l 11 14 +l 14 13 +l 16 11 +l 17 8 +l 17 6 +l 16 3 +l 14 1 +l 11 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 +l 3 5 +l 4 6 +l 5 5 +l 4 4 +m 11 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 11 0 +m 5 21 +l 15 21 +m 5 20 +l 10 20 +l 15 21 + +54 21 10 45 +m 15 18 +l 14 17 +l 15 16 +l 16 17 +l 16 18 +l 15 20 +l 13 21 +l 10 21 +l 7 20 +l 5 18 +l 4 16 +l 3 12 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 7 +l 16 10 +l 14 12 +l 11 13 +l 10 13 +l 7 12 +l 5 10 +l 4 7 +m 10 21 +l 8 20 +l 6 18 +l 5 16 +l 4 12 +l 4 6 +l 5 3 +l 7 1 +l 9 0 +m 11 0 +l 13 1 +l 15 3 +l 16 6 +l 16 7 +l 15 10 +l 13 12 +l 11 13 + +55 21 10 26 +m 3 21 +l 3 15 +m 3 17 +l 4 19 +l 6 21 +l 8 21 +l 13 18 +l 15 18 +l 16 19 +l 17 21 +m 4 19 +l 6 20 +l 8 20 +l 13 18 +m 17 21 +l 17 18 +l 16 15 +l 12 10 +l 11 8 +l 10 5 +l 10 0 +m 16 15 +l 11 10 +l 10 8 +l 9 5 +l 9 0 + +56 21 10 57 +m 8 21 +l 5 20 +l 4 18 +l 4 15 +l 5 13 +l 8 12 +l 12 12 +l 15 13 +l 16 15 +l 16 18 +l 15 20 +l 12 21 +l 8 21 +m 8 21 +l 6 20 +l 5 18 +l 5 15 +l 6 13 +l 8 12 +m 12 12 +l 14 13 +l 15 15 +l 15 18 +l 14 20 +l 12 21 +m 8 12 +l 5 11 +l 4 10 +l 3 8 +l 3 4 +l 4 2 +l 5 1 +l 8 0 +l 12 0 +l 15 1 +l 16 2 +l 17 4 +l 17 8 +l 16 10 +l 15 11 +l 12 12 +m 8 12 +l 6 11 +l 5 10 +l 4 8 +l 4 4 +l 5 2 +l 6 1 +l 8 0 +m 12 0 +l 14 1 +l 15 2 +l 16 4 +l 16 8 +l 15 10 +l 14 11 +l 12 12 + +57 21 10 45 +m 16 14 +l 15 11 +l 13 9 +l 10 8 +l 9 8 +l 6 9 +l 4 11 +l 3 14 +l 3 15 +l 4 18 +l 6 20 +l 9 21 +l 11 21 +l 14 20 +l 16 18 +l 17 15 +l 17 9 +l 16 5 +l 15 3 +l 13 1 +l 10 0 +l 7 0 +l 5 1 +l 4 3 +l 4 4 +l 5 5 +l 6 4 +l 5 3 +m 9 8 +l 7 9 +l 5 11 +l 4 14 +l 4 15 +l 5 18 +l 7 20 +l 9 21 +m 11 21 +l 13 20 +l 15 18 +l 16 15 +l 16 9 +l 15 5 +l 14 3 +l 12 1 +l 10 0 + +58 11 5 10 +m 5 14 +l 4 13 +l 5 12 +l 6 13 +l 5 14 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +59 11 5 12 +m 5 14 +l 4 13 +l 5 12 +l 6 13 +l 5 14 +m 5 0 +l 4 1 +l 5 2 +l 6 1 +l 6 -1 +l 5 -3 +l 4 -4 + +60 25 12 3 +m 20 18 +l 4 9 +l 20 0 + +61 27 13 4 +m 4 12 +l 22 12 +m 4 6 +l 22 6 + +62 25 12 3 +m 4 18 +l 20 9 +l 4 0 + +63 19 9 29 +m 4 17 +l 5 16 +l 4 15 +l 3 16 +l 3 17 +l 4 19 +l 5 20 +l 7 21 +l 10 21 +l 13 20 +l 14 19 +l 15 17 +l 15 15 +l 14 13 +l 13 12 +l 9 10 +l 9 7 +m 10 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 11 11 +m 9 2 +l 8 1 +l 9 0 +l 10 1 +l 9 2 + +64 28 14 52 +m 18 13 +l 17 15 +l 15 16 +l 12 16 +l 10 15 +l 9 14 +l 8 11 +l 8 8 +l 9 6 +l 11 5 +l 14 5 +l 16 6 +l 17 8 +m 12 16 +l 10 14 +l 9 11 +l 9 8 +l 10 6 +l 11 5 +m 18 16 +l 17 8 +l 17 6 +l 19 5 +l 21 5 +l 23 7 +l 24 10 +l 24 12 +l 23 15 +l 22 17 +l 20 19 +l 18 20 +l 15 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 15 0 +l 18 1 +l 20 2 +l 21 3 +m 19 16 +l 18 8 +l 18 6 +l 19 5 + +65 21 10 12 +m 10 21 +l 3 0 +m 10 21 +l 17 0 +m 10 18 +l 16 0 +m 5 6 +l 14 6 +m 1 0 +l 7 0 +m 13 0 +l 19 0 + +66 23 11 39 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 14 21 +l 17 20 +l 18 19 +l 19 17 +l 19 15 +l 18 13 +l 17 12 +l 14 11 +m 14 21 +l 16 20 +l 17 19 +l 18 17 +l 18 15 +l 17 13 +l 16 12 +l 14 11 +m 6 11 +l 14 11 +l 17 10 +l 18 9 +l 19 7 +l 19 4 +l 18 2 +l 17 1 +l 14 0 +l 2 0 +m 14 11 +l 16 10 +l 17 9 +l 18 7 +l 18 4 +l 17 2 +l 16 1 +l 14 0 + +67 19 9 10 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 17 21 +l 17 15 +l 16 21 +m 2 0 +l 9 0 + +68 21 10 10 +m 10 21 +l 2 0 +m 10 21 +l 18 0 +m 10 18 +l 17 0 +m 3 1 +l 17 1 +m 2 0 +l 18 0 + +69 22 11 16 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 12 15 +l 12 7 +m 2 21 +l 18 21 +l 18 15 +l 17 21 +m 6 11 +l 12 11 +m 2 0 +l 18 0 +l 18 6 +l 17 0 + +70 21 10 12 +m 16 21 +l 3 0 +m 17 21 +l 4 0 +m 4 21 +l 3 15 +l 3 21 +l 17 21 +m 3 0 +l 17 0 +l 17 6 +l 16 0 + +71 25 12 18 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 18 21 +l 18 0 +m 19 21 +l 19 0 +m 2 21 +l 9 21 +m 15 21 +l 22 21 +m 6 11 +l 18 11 +m 2 0 +l 9 0 +m 15 0 +l 22 0 + +72 23 11 49 +m 10 21 +l 7 20 +l 5 18 +l 4 16 +l 3 12 +l 3 9 +l 4 5 +l 5 3 +l 7 1 +l 10 0 +l 12 0 +l 15 1 +l 17 3 +l 18 5 +l 19 9 +l 19 12 +l 18 16 +l 17 18 +l 15 20 +l 12 21 +l 10 21 +m 10 21 +l 8 20 +l 6 18 +l 5 16 +l 4 12 +l 4 9 +l 5 5 +l 6 3 +l 8 1 +l 10 0 +m 12 0 +l 14 1 +l 16 3 +l 17 5 +l 18 9 +l 18 12 +l 17 16 +l 16 18 +l 14 20 +l 12 21 +m 8 14 +l 8 7 +m 14 14 +l 14 7 +m 8 11 +l 14 11 +m 8 10 +l 14 10 + +73 12 6 8 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 9 21 +m 2 0 +l 9 0 + +75 23 11 18 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 19 21 +l 6 8 +m 11 12 +l 19 0 +m 10 12 +l 18 0 +m 2 21 +l 9 21 +m 15 21 +l 21 21 +m 2 0 +l 9 0 +m 15 0 +l 21 0 + +76 21 10 10 +m 10 21 +l 3 0 +m 10 21 +l 17 0 +m 10 18 +l 16 0 +m 1 0 +l 7 0 +m 13 0 +l 19 0 + +77 26 13 20 +m 5 21 +l 5 0 +m 6 21 +l 12 3 +m 5 21 +l 12 0 +m 19 21 +l 12 0 +m 19 21 +l 19 0 +m 20 21 +l 20 0 +m 2 21 +l 6 21 +m 19 21 +l 23 21 +m 2 0 +l 8 0 +m 16 0 +l 23 0 + +78 24 12 14 +m 5 21 +l 5 0 +m 6 21 +l 18 2 +m 6 19 +l 18 0 +m 18 21 +l 18 0 +m 2 21 +l 6 21 +m 15 21 +l 21 21 +m 2 0 +l 8 0 + +79 23 11 24 +m 4 22 +l 3 17 +m 19 22 +l 18 17 +m 8 13 +l 7 8 +m 15 13 +l 14 8 +m 4 4 +l 3 -1 +m 19 4 +l 18 -1 +m 4 20 +l 18 20 +m 4 19 +l 18 19 +m 8 11 +l 14 11 +m 8 10 +l 14 10 +m 4 2 +l 18 2 +m 4 1 +l 18 1 + +80 23 11 41 +m 10 21 +l 7 20 +l 5 18 +l 4 16 +l 3 12 +l 3 9 +l 4 5 +l 5 3 +l 7 1 +l 10 0 +l 12 0 +l 15 1 +l 17 3 +l 18 5 +l 19 9 +l 19 12 +l 18 16 +l 17 18 +l 15 20 +l 12 21 +l 10 21 +m 10 21 +l 8 20 +l 6 18 +l 5 16 +l 4 12 +l 4 9 +l 5 5 +l 6 3 +l 8 1 +l 10 0 +m 12 0 +l 14 1 +l 16 3 +l 17 5 +l 18 9 +l 18 12 +l 17 16 +l 16 18 +l 14 20 +l 12 21 + +81 25 12 14 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 18 21 +l 18 0 +m 19 21 +l 19 0 +m 2 21 +l 22 21 +m 2 0 +l 9 0 +m 15 0 +l 22 0 + +82 23 11 24 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 14 21 +l 17 20 +l 18 19 +l 19 17 +l 19 14 +l 18 12 +l 17 11 +l 14 10 +l 6 10 +m 14 21 +l 16 20 +l 17 19 +l 18 17 +l 18 14 +l 17 12 +l 16 11 +l 14 10 +m 2 0 +l 9 0 + +83 22 11 15 +m 3 21 +l 10 11 +l 2 0 +m 2 21 +l 9 11 +m 2 21 +l 17 21 +l 18 15 +l 16 21 +m 3 1 +l 16 1 +m 2 0 +l 17 0 +l 18 6 +l 16 0 + +84 20 10 12 +m 9 21 +l 9 0 +m 10 21 +l 10 0 +m 3 21 +l 2 15 +l 2 21 +l 17 21 +l 17 15 +l 16 21 +m 6 0 +l 13 0 + +85 20 10 28 +m 2 16 +l 2 18 +l 3 20 +l 4 21 +l 6 21 +l 7 20 +l 8 18 +l 9 14 +l 9 0 +m 2 18 +l 4 20 +l 6 20 +l 8 18 +m 17 16 +l 17 18 +l 16 20 +l 15 21 +l 13 21 +l 12 20 +l 11 18 +l 10 14 +l 10 0 +m 17 18 +l 15 20 +l 13 20 +l 11 18 +m 6 0 +l 13 0 + +87 22 11 41 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 8 16 +l 5 15 +l 4 14 +l 3 12 +l 3 9 +l 4 7 +l 5 6 +l 8 5 +l 13 5 +l 16 6 +l 17 7 +l 18 9 +l 18 12 +l 17 14 +l 16 15 +l 13 16 +l 8 16 +m 8 16 +l 6 15 +l 5 14 +l 4 12 +l 4 9 +l 5 7 +l 6 6 +l 8 5 +m 13 5 +l 15 6 +l 16 7 +l 17 9 +l 17 12 +l 16 14 +l 15 15 +l 13 16 +m 7 21 +l 14 21 +m 7 0 +l 14 0 + +88 21 10 14 +m 3 21 +l 16 0 +m 4 21 +l 17 0 +m 17 21 +l 3 0 +m 1 21 +l 7 21 +m 13 21 +l 19 21 +m 1 0 +l 7 0 +m 13 0 +l 19 0 + +89 24 12 34 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 2 14 +l 3 15 +l 5 14 +l 6 10 +l 7 8 +l 8 7 +l 10 6 +m 3 15 +l 4 14 +l 5 10 +l 6 8 +l 7 7 +l 10 6 +l 13 6 +l 16 7 +l 17 8 +l 18 10 +l 19 14 +l 20 15 +m 13 6 +l 15 7 +l 16 8 +l 17 10 +l 18 14 +l 20 15 +l 21 14 +m 8 21 +l 15 21 +m 8 0 +l 15 0 + +90 23 11 38 +m 3 3 +l 4 0 +l 8 0 +l 6 4 +l 4 8 +l 3 11 +l 3 15 +l 4 18 +l 6 20 +l 9 21 +l 13 21 +l 16 20 +l 18 18 +l 19 15 +l 19 11 +l 18 8 +l 16 4 +l 14 0 +l 18 0 +l 19 3 +m 6 4 +l 5 7 +l 4 11 +l 4 15 +l 5 18 +l 7 20 +l 9 21 +m 13 21 +l 15 20 +l 17 18 +l 18 15 +l 18 11 +l 17 7 +l 16 4 +m 4 1 +l 7 1 +m 15 1 +l 18 1 + +91 15 7 8 +m 4 25 +l 4 -7 +m 5 25 +l 5 -7 +m 4 25 +l 11 25 +m 4 -7 +l 11 -7 + +92 23 11 2 +m 2 23 +l 20 3 + +93 15 7 8 +m 9 25 +l 9 -7 +m 10 25 +l 10 -7 +m 3 25 +l 10 25 +m 3 -7 +l 10 -7 + +94 23 11 6 +m 3 7 +l 11 12 +l 19 7 +m 3 7 +l 11 11 +l 19 7 + +95 21 10 2 +m 0 -2 +l 21 -2 + +96 25 12 22 +m 3 6 +l 3 8 +l 4 11 +l 6 12 +l 8 12 +l 10 11 +l 14 8 +l 16 7 +l 18 7 +l 20 8 +l 21 10 +m 3 8 +l 4 10 +l 6 11 +l 8 11 +l 10 10 +l 14 7 +l 16 6 +l 18 6 +l 20 7 +l 21 10 +l 21 12 + +97 24 12 36 +m 10 14 +l 7 13 +l 5 11 +l 4 9 +l 3 6 +l 3 3 +l 4 1 +l 7 0 +l 9 0 +l 11 1 +l 14 4 +l 16 7 +l 18 11 +l 19 14 +m 10 14 +l 8 13 +l 6 11 +l 5 9 +l 4 6 +l 4 3 +l 5 1 +l 7 0 +m 10 14 +l 12 14 +l 14 13 +l 15 11 +l 17 3 +l 18 1 +l 19 0 +m 12 14 +l 13 13 +l 14 11 +l 16 3 +l 17 1 +l 19 0 +l 20 0 + +98 22 11 51 +m 13 21 +l 10 20 +l 8 18 +l 6 14 +l 5 11 +l 4 7 +l 3 1 +l 2 -7 +m 13 21 +l 11 20 +l 9 18 +l 7 14 +l 6 11 +l 5 7 +l 4 1 +l 3 -7 +m 13 21 +l 15 21 +l 17 20 +l 18 19 +l 18 16 +l 17 14 +l 16 13 +l 13 12 +l 9 12 +m 15 21 +l 17 19 +l 17 16 +l 16 14 +l 15 13 +l 13 12 +m 9 12 +l 13 11 +l 15 9 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 11 0 +l 9 0 +l 7 1 +l 6 2 +l 5 5 +m 9 12 +l 12 11 +l 14 9 +l 15 7 +l 15 4 +l 14 2 +l 13 1 +l 11 0 + +99 21 10 24 +m 1 11 +l 3 13 +l 5 14 +l 7 14 +l 9 13 +l 10 12 +l 11 9 +l 11 5 +l 10 1 +l 7 -7 +m 2 12 +l 4 13 +l 8 13 +l 10 12 +m 18 14 +l 17 11 +l 16 9 +l 11 2 +l 8 -3 +l 6 -7 +m 17 14 +l 16 11 +l 15 9 +l 11 2 + +100 20 10 41 +m 13 13 +l 11 14 +l 9 14 +l 6 13 +l 4 10 +l 3 7 +l 3 4 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 4 +l 15 7 +l 15 10 +l 14 12 +l 10 17 +l 9 19 +l 9 21 +l 10 22 +l 12 22 +l 14 21 +l 16 19 +m 9 14 +l 7 13 +l 5 10 +l 4 7 +l 4 3 +l 5 1 +m 9 0 +l 11 1 +l 13 4 +l 14 7 +l 14 11 +l 13 13 +l 11 16 +l 10 18 +l 10 20 +l 11 21 +l 13 21 +l 16 19 + +101 19 9 28 +m 15 11 +l 13 13 +l 11 14 +l 7 14 +l 5 13 +l 5 11 +l 7 9 +l 10 8 +m 7 14 +l 6 13 +l 6 11 +l 8 9 +l 10 8 +m 10 8 +l 5 7 +l 3 5 +l 3 3 +l 4 1 +l 7 0 +l 10 0 +l 12 1 +l 14 3 +m 10 8 +l 6 7 +l 4 5 +l 4 3 +l 5 1 +l 7 0 + +102 19 9 29 +m 11 21 +l 9 20 +l 8 19 +l 8 18 +l 9 17 +l 12 16 +l 17 16 +l 17 17 +l 14 16 +l 10 14 +l 7 12 +l 4 9 +l 3 6 +l 3 4 +l 4 2 +l 7 0 +l 10 -2 +l 11 -4 +l 11 -6 +l 10 -7 +l 8 -7 +l 7 -6 +m 12 15 +l 8 12 +l 5 9 +l 4 6 +l 4 4 +l 5 2 +l 7 0 + +103 23 11 28 +m 1 10 +l 2 12 +l 4 14 +l 7 14 +l 8 13 +l 8 11 +l 7 7 +l 5 0 +m 6 14 +l 7 13 +l 7 11 +l 6 7 +l 4 0 +m 7 7 +l 9 11 +l 11 13 +l 13 14 +l 15 14 +l 17 13 +l 18 12 +l 18 9 +l 17 4 +l 14 -7 +m 15 14 +l 17 12 +l 17 9 +l 16 4 +l 13 -7 + +104 24 12 41 +m 1 10 +l 2 12 +l 4 14 +l 7 14 +l 8 13 +l 8 11 +l 7 6 +l 7 3 +l 8 1 +l 9 0 +m 6 14 +l 7 13 +l 7 11 +l 6 6 +l 6 3 +l 7 1 +l 9 0 +l 11 0 +l 13 1 +l 15 3 +l 17 6 +l 18 9 +l 19 14 +l 19 18 +l 18 20 +l 16 21 +l 14 21 +l 12 19 +l 12 17 +l 13 14 +l 15 11 +l 17 9 +l 20 7 +m 13 1 +l 15 4 +l 16 6 +l 17 9 +l 18 14 +l 18 18 +l 17 20 +l 16 21 + +105 13 6 13 +m 6 14 +l 4 7 +l 3 3 +l 3 1 +l 4 0 +l 7 0 +l 9 2 +l 10 4 +m 7 14 +l 5 7 +l 4 3 +l 4 1 +l 5 0 + +107 21 10 24 +m 6 14 +l 2 0 +m 7 14 +l 3 0 +m 16 14 +l 17 13 +l 18 13 +l 17 14 +l 15 14 +l 13 13 +l 9 9 +l 7 8 +l 5 8 +m 7 8 +l 9 7 +l 11 1 +l 12 0 +m 7 8 +l 8 7 +l 10 1 +l 11 0 +l 13 0 +l 15 1 +l 17 4 + +108 21 10 19 +m 3 21 +l 5 21 +l 7 20 +l 8 19 +l 9 17 +l 15 3 +l 16 1 +l 17 0 +m 5 21 +l 7 19 +l 8 17 +l 14 3 +l 15 1 +l 17 0 +l 18 0 +m 10 14 +l 2 0 +m 10 14 +l 3 0 + +109 24 12 23 +m 7 14 +l 1 -7 +m 8 14 +l 2 -7 +m 7 11 +l 6 5 +l 6 2 +l 8 0 +l 10 0 +l 12 1 +l 14 3 +l 16 6 +m 18 14 +l 15 3 +l 15 1 +l 16 0 +l 19 0 +l 21 2 +l 22 4 +m 19 14 +l 16 3 +l 16 1 +l 17 0 + +110 21 10 19 +m 6 14 +l 4 0 +m 7 14 +l 6 8 +l 5 3 +l 4 0 +m 17 14 +l 16 10 +l 14 6 +m 18 14 +l 17 11 +l 16 9 +l 14 6 +l 12 4 +l 9 2 +l 7 1 +l 4 0 +m 3 14 +l 7 14 + +111 18 9 40 +m 11 21 +l 9 20 +l 8 19 +l 8 18 +l 9 17 +l 12 16 +l 15 16 +m 12 16 +l 8 15 +l 6 14 +l 5 12 +l 5 10 +l 7 8 +l 10 7 +l 13 7 +m 12 16 +l 9 15 +l 7 14 +l 6 12 +l 6 10 +l 8 8 +l 10 7 +m 10 7 +l 6 6 +l 4 5 +l 3 3 +l 3 1 +l 5 -1 +l 10 -3 +l 11 -4 +l 11 -6 +l 9 -7 +l 7 -7 +m 10 7 +l 7 6 +l 5 5 +l 4 3 +l 4 1 +l 6 -1 +l 10 -3 + +112 19 9 29 +m 9 14 +l 6 13 +l 4 10 +l 3 7 +l 3 4 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 4 +l 15 7 +l 15 10 +l 14 12 +l 13 13 +l 11 14 +l 9 14 +m 9 14 +l 7 13 +l 5 10 +l 4 7 +l 4 3 +l 5 1 +m 9 0 +l 11 1 +l 13 4 +l 14 7 +l 14 11 +l 13 13 + +113 23 11 16 +m 9 13 +l 5 0 +m 9 13 +l 6 0 +m 15 13 +l 15 0 +m 15 13 +l 16 0 +m 2 11 +l 4 13 +l 7 14 +l 20 14 +m 2 11 +l 4 12 +l 7 13 +l 20 13 + +114 20 10 28 +m 4 5 +l 5 2 +l 6 1 +l 8 0 +l 10 0 +l 13 1 +l 15 4 +l 16 7 +l 16 10 +l 15 12 +l 14 13 +l 12 14 +l 10 14 +l 7 13 +l 5 10 +l 4 7 +l 0 -7 +m 10 0 +l 12 1 +l 14 4 +l 15 7 +l 15 11 +l 14 13 +m 10 14 +l 8 13 +l 6 10 +l 5 7 +l 1 -7 + +115 22 11 31 +m 19 14 +l 9 14 +l 6 13 +l 4 10 +l 3 7 +l 3 4 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 12 1 +l 14 4 +l 15 7 +l 15 10 +l 14 12 +l 13 13 +l 11 14 +m 9 14 +l 7 13 +l 5 10 +l 4 7 +l 4 3 +l 5 1 +m 9 0 +l 11 1 +l 13 4 +l 14 7 +l 14 11 +l 13 13 +m 13 13 +l 19 13 + +116 21 10 12 +m 11 13 +l 8 0 +m 11 13 +l 9 0 +m 2 11 +l 4 13 +l 7 14 +l 18 14 +m 2 11 +l 4 12 +l 7 13 +l 18 13 + +117 21 10 28 +m 1 10 +l 2 12 +l 4 14 +l 7 14 +l 8 13 +l 8 11 +l 6 5 +l 6 2 +l 8 0 +m 6 14 +l 7 13 +l 7 11 +l 5 5 +l 5 2 +l 6 1 +l 8 0 +l 9 0 +l 12 1 +l 14 3 +l 16 6 +l 17 9 +l 17 12 +l 16 14 +l 15 13 +l 16 12 +l 17 9 +m 16 6 +l 17 12 + +119 23 11 34 +m 8 13 +l 6 12 +l 4 10 +l 3 7 +l 3 4 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 13 1 +l 16 3 +l 18 6 +l 19 9 +l 19 12 +l 17 14 +l 15 14 +l 13 12 +l 11 8 +l 9 3 +l 6 -7 +m 3 4 +l 5 2 +l 7 1 +l 10 1 +l 13 2 +l 16 4 +l 18 6 +m 19 12 +l 17 13 +l 15 13 +l 13 11 +l 11 8 +l 9 2 +l 7 -7 + +120 19 9 20 +m 2 14 +l 4 14 +l 6 13 +l 7 11 +l 12 -4 +l 13 -6 +l 14 -7 +m 4 14 +l 5 13 +l 6 11 +l 11 -4 +l 12 -6 +l 14 -7 +l 16 -7 +m 17 14 +l 16 12 +l 14 9 +l 4 -2 +l 2 -5 +l 1 -7 + +121 24 12 30 +m 15 21 +l 9 -7 +m 16 21 +l 8 -7 +m 1 10 +l 2 12 +l 4 14 +l 7 14 +l 8 13 +l 8 11 +l 7 6 +l 7 3 +l 9 1 +l 12 1 +l 14 2 +l 17 5 +l 19 8 +m 6 14 +l 7 13 +l 7 11 +l 6 6 +l 6 3 +l 7 1 +l 9 0 +l 12 0 +l 14 1 +l 16 3 +l 18 6 +l 19 8 +l 21 14 + +122 24 12 40 +m 4 10 +l 6 12 +l 9 13 +l 8 14 +l 6 13 +l 4 10 +l 3 7 +l 3 4 +l 4 1 +l 5 0 +l 7 0 +l 9 1 +l 11 4 +l 12 7 +m 3 4 +l 4 2 +l 5 1 +l 7 1 +l 9 2 +l 11 4 +m 11 7 +l 11 4 +l 12 1 +l 13 0 +l 15 0 +l 17 1 +l 19 4 +l 20 7 +l 20 10 +l 19 13 +l 18 14 +l 17 13 +l 19 12 +l 20 10 +m 11 4 +l 12 2 +l 13 1 +l 15 1 +l 17 2 +l 19 4 + +123 15 7 37 +m 9 25 +l 7 24 +l 6 23 +l 5 21 +l 5 19 +l 6 17 +l 7 16 +l 8 14 +l 8 12 +l 6 10 +m 7 24 +l 6 22 +l 6 20 +l 7 18 +l 8 17 +l 9 15 +l 9 13 +l 8 11 +l 4 9 +l 8 7 +l 9 5 +l 9 3 +l 8 1 +l 7 0 +l 6 -2 +l 6 -4 +l 7 -6 +m 6 8 +l 8 6 +l 8 4 +l 7 2 +l 6 1 +l 5 -1 +l 5 -3 +l 6 -5 +l 7 -6 +l 9 -7 + +124 9 4 2 +m 4 25 +l 4 -7 + +125 15 7 37 +m 5 25 +l 7 24 +l 8 23 +l 9 21 +l 9 19 +l 8 17 +l 7 16 +l 6 14 +l 6 12 +l 8 10 +m 7 24 +l 8 22 +l 8 20 +l 7 18 +l 6 17 +l 5 15 +l 5 13 +l 6 11 +l 10 9 +l 6 7 +l 5 5 +l 5 3 +l 6 1 +l 7 0 +l 8 -2 +l 8 -4 +l 7 -6 +m 8 8 +l 6 6 +l 6 4 +l 7 2 +l 8 1 +l 9 -1 +l 9 -3 +l 8 -5 +l 7 -6 +l 5 -7 diff --git a/cd/etc/vectorfont09.txt b/cd/etc/vectorfont09.txt new file mode 100755 index 0000000..ddd7dcd --- /dev/null +++ b/cd/etc/vectorfont09.txt @@ -0,0 +1,2686 @@ +Complex cyrillic I +25 21 10 -7 + + +32 21 10 0 + +33 11 5 12 +m 5 21 +l 4 19 +l 5 7 +l 6 19 +l 5 21 +m 5 19 +l 5 13 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +34 17 8 8 +m 4 21 +l 3 14 +m 5 21 +l 3 14 +m 12 21 +l 11 14 +m 13 21 +l 11 14 + +35 22 11 8 +m 11 21 +l 4 -7 +m 17 21 +l 10 -7 +m 4 10 +l 18 10 +m 3 4 +l 17 4 + +36 21 10 38 +m 8 25 +l 8 -4 +m 12 25 +l 12 -4 +m 16 18 +l 15 17 +l 16 16 +l 17 17 +l 17 18 +l 15 20 +l 12 21 +l 8 21 +l 5 20 +l 3 18 +l 3 16 +l 4 14 +l 5 13 +l 7 12 +l 13 10 +l 15 9 +l 17 7 +m 3 16 +l 5 14 +l 7 13 +l 13 11 +l 15 10 +l 16 9 +l 17 7 +l 17 3 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 3 3 +l 3 4 +l 4 5 +l 5 4 +l 4 3 + +37 25 12 29 +m 21 21 +l 3 0 +m 8 21 +l 10 19 +l 10 17 +l 9 15 +l 7 14 +l 5 14 +l 3 16 +l 3 18 +l 4 20 +l 6 21 +l 8 21 +l 10 20 +l 13 19 +l 16 19 +l 19 20 +l 21 21 +m 17 7 +l 15 6 +l 14 4 +l 14 2 +l 16 0 +l 18 0 +l 20 1 +l 21 3 +l 21 5 +l 19 7 +l 17 7 + +38 26 13 46 +m 21 13 +l 20 12 +l 21 11 +l 22 12 +l 22 13 +l 21 14 +l 20 14 +l 19 13 +l 18 11 +l 16 6 +l 14 3 +l 12 1 +l 10 0 +l 7 0 +l 4 1 +l 3 3 +l 3 6 +l 4 8 +l 10 12 +l 12 14 +l 13 16 +l 13 18 +l 12 20 +l 10 21 +l 8 20 +l 7 18 +l 7 16 +l 8 13 +l 10 10 +l 15 3 +l 17 1 +l 20 0 +l 21 0 +l 22 1 +l 22 2 +m 7 0 +l 5 1 +l 4 3 +l 4 6 +l 5 8 +l 7 10 +m 7 16 +l 8 14 +l 16 3 +l 18 1 +l 20 0 + +39 9 4 4 +m 4 21 +l 3 14 +m 5 21 +l 3 14 + +40 15 7 18 +m 11 25 +l 9 23 +l 7 20 +l 5 16 +l 4 11 +l 4 7 +l 5 2 +l 7 -2 +l 9 -5 +l 11 -7 +m 9 23 +l 7 19 +l 6 16 +l 5 11 +l 5 7 +l 6 2 +l 7 -1 +l 9 -5 + +41 15 7 18 +m 3 25 +l 5 23 +l 7 20 +l 9 16 +l 10 11 +l 10 7 +l 9 2 +l 7 -2 +l 5 -5 +l 3 -7 +m 5 23 +l 7 19 +l 8 16 +l 9 11 +l 9 7 +l 8 2 +l 7 -1 +l 5 -5 + +42 17 8 6 +m 8 21 +l 8 9 +m 3 18 +l 13 12 +m 13 18 +l 3 12 + +43 27 13 4 +m 13 18 +l 13 0 +m 4 9 +l 22 9 + +44 11 5 7 +m 5 0 +l 4 1 +l 5 2 +l 6 1 +l 6 -1 +l 5 -3 +l 4 -4 + +45 27 13 2 +m 4 9 +l 22 9 + +46 11 5 5 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +47 23 11 2 +m 20 25 +l 2 -7 + +48 21 10 37 +m 9 21 +l 6 20 +l 4 17 +l 3 12 +l 3 9 +l 4 4 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 4 +l 17 9 +l 17 12 +l 16 17 +l 14 20 +l 11 21 +l 9 21 +m 9 21 +l 7 20 +l 6 19 +l 5 17 +l 4 12 +l 4 9 +l 5 4 +l 6 2 +l 7 1 +l 9 0 +m 11 0 +l 13 1 +l 14 2 +l 15 4 +l 16 9 +l 16 12 +l 15 17 +l 14 19 +l 13 20 +l 11 21 + +49 21 10 8 +m 6 17 +l 8 18 +l 11 21 +l 11 0 +m 10 20 +l 10 0 +m 6 0 +l 15 0 + +50 21 10 41 +m 4 17 +l 5 16 +l 4 15 +l 3 16 +l 3 17 +l 4 19 +l 5 20 +l 8 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 13 11 +l 8 9 +l 6 8 +l 4 6 +l 3 3 +l 3 0 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 12 11 +l 8 9 +m 3 2 +l 4 3 +l 6 3 +l 11 1 +l 14 1 +l 16 2 +l 17 3 +m 6 3 +l 11 0 +l 15 0 +l 16 1 +l 17 3 +l 17 5 + +51 21 10 43 +m 4 17 +l 5 16 +l 4 15 +l 3 16 +l 3 17 +l 4 19 +l 5 20 +l 8 21 +l 12 21 +l 15 20 +l 16 18 +l 16 15 +l 15 13 +l 12 12 +l 9 12 +m 12 21 +l 14 20 +l 15 18 +l 15 15 +l 14 13 +l 12 12 +m 12 12 +l 14 11 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 +l 3 5 +l 4 6 +l 5 5 +l 4 4 +m 15 10 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 12 0 + +52 21 10 9 +m 12 19 +l 12 0 +m 13 21 +l 13 0 +m 13 21 +l 2 6 +l 18 6 +m 9 0 +l 16 0 + +53 21 10 34 +m 5 21 +l 3 11 +m 3 11 +l 5 13 +l 8 14 +l 11 14 +l 14 13 +l 16 11 +l 17 8 +l 17 6 +l 16 3 +l 14 1 +l 11 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 +l 3 5 +l 4 6 +l 5 5 +l 4 4 +m 11 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 11 0 +m 5 21 +l 15 21 +m 5 20 +l 10 20 +l 15 21 + +54 21 10 45 +m 15 18 +l 14 17 +l 15 16 +l 16 17 +l 16 18 +l 15 20 +l 13 21 +l 10 21 +l 7 20 +l 5 18 +l 4 16 +l 3 12 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 7 +l 16 10 +l 14 12 +l 11 13 +l 10 13 +l 7 12 +l 5 10 +l 4 7 +m 10 21 +l 8 20 +l 6 18 +l 5 16 +l 4 12 +l 4 6 +l 5 3 +l 7 1 +l 9 0 +m 11 0 +l 13 1 +l 15 3 +l 16 6 +l 16 7 +l 15 10 +l 13 12 +l 11 13 + +55 21 10 26 +m 3 21 +l 3 15 +m 3 17 +l 4 19 +l 6 21 +l 8 21 +l 13 18 +l 15 18 +l 16 19 +l 17 21 +m 4 19 +l 6 20 +l 8 20 +l 13 18 +m 17 21 +l 17 18 +l 16 15 +l 12 10 +l 11 8 +l 10 5 +l 10 0 +m 16 15 +l 11 10 +l 10 8 +l 9 5 +l 9 0 + +56 21 10 57 +m 8 21 +l 5 20 +l 4 18 +l 4 15 +l 5 13 +l 8 12 +l 12 12 +l 15 13 +l 16 15 +l 16 18 +l 15 20 +l 12 21 +l 8 21 +m 8 21 +l 6 20 +l 5 18 +l 5 15 +l 6 13 +l 8 12 +m 12 12 +l 14 13 +l 15 15 +l 15 18 +l 14 20 +l 12 21 +m 8 12 +l 5 11 +l 4 10 +l 3 8 +l 3 4 +l 4 2 +l 5 1 +l 8 0 +l 12 0 +l 15 1 +l 16 2 +l 17 4 +l 17 8 +l 16 10 +l 15 11 +l 12 12 +m 8 12 +l 6 11 +l 5 10 +l 4 8 +l 4 4 +l 5 2 +l 6 1 +l 8 0 +m 12 0 +l 14 1 +l 15 2 +l 16 4 +l 16 8 +l 15 10 +l 14 11 +l 12 12 + +57 21 10 45 +m 16 14 +l 15 11 +l 13 9 +l 10 8 +l 9 8 +l 6 9 +l 4 11 +l 3 14 +l 3 15 +l 4 18 +l 6 20 +l 9 21 +l 11 21 +l 14 20 +l 16 18 +l 17 15 +l 17 9 +l 16 5 +l 15 3 +l 13 1 +l 10 0 +l 7 0 +l 5 1 +l 4 3 +l 4 4 +l 5 5 +l 6 4 +l 5 3 +m 9 8 +l 7 9 +l 5 11 +l 4 14 +l 4 15 +l 5 18 +l 7 20 +l 9 21 +m 11 21 +l 13 20 +l 15 18 +l 16 15 +l 16 9 +l 15 5 +l 14 3 +l 12 1 +l 10 0 + +58 11 5 10 +m 5 14 +l 4 13 +l 5 12 +l 6 13 +l 5 14 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +59 11 5 12 +m 5 14 +l 4 13 +l 5 12 +l 6 13 +l 5 14 +m 5 0 +l 4 1 +l 5 2 +l 6 1 +l 6 -1 +l 5 -3 +l 4 -4 + +60 25 12 3 +m 20 18 +l 4 9 +l 20 0 + +61 27 13 4 +m 4 12 +l 22 12 +m 4 6 +l 22 6 + +62 25 12 3 +m 4 18 +l 20 9 +l 4 0 + +63 19 9 29 +m 4 17 +l 5 16 +l 4 15 +l 3 16 +l 3 17 +l 4 19 +l 5 20 +l 7 21 +l 10 21 +l 13 20 +l 14 19 +l 15 17 +l 15 15 +l 14 13 +l 13 12 +l 9 10 +l 9 7 +m 10 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 11 11 +m 9 2 +l 8 1 +l 9 0 +l 10 1 +l 9 2 + +64 28 14 52 +m 18 13 +l 17 15 +l 15 16 +l 12 16 +l 10 15 +l 9 14 +l 8 11 +l 8 8 +l 9 6 +l 11 5 +l 14 5 +l 16 6 +l 17 8 +m 12 16 +l 10 14 +l 9 11 +l 9 8 +l 10 6 +l 11 5 +m 18 16 +l 17 8 +l 17 6 +l 19 5 +l 21 5 +l 23 7 +l 24 10 +l 24 12 +l 23 15 +l 22 17 +l 20 19 +l 18 20 +l 15 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 15 0 +l 18 1 +l 20 2 +l 21 3 +m 19 16 +l 18 8 +l 18 6 +l 19 5 + +65 21 10 12 +m 10 21 +l 3 0 +m 10 21 +l 17 0 +m 10 18 +l 16 0 +m 5 6 +l 14 6 +m 1 0 +l 7 0 +m 13 0 +l 19 0 + +66 23 11 26 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 18 21 +l 18 15 +l 17 21 +m 6 11 +l 14 11 +l 17 10 +l 18 9 +l 19 7 +l 19 4 +l 18 2 +l 17 1 +l 14 0 +l 2 0 +m 14 11 +l 16 10 +l 17 9 +l 18 7 +l 18 4 +l 17 2 +l 16 1 +l 14 0 + +67 23 11 39 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 14 21 +l 17 20 +l 18 19 +l 19 17 +l 19 15 +l 18 13 +l 17 12 +l 14 11 +m 14 21 +l 16 20 +l 17 19 +l 18 17 +l 18 15 +l 17 13 +l 16 12 +l 14 11 +m 6 11 +l 14 11 +l 17 10 +l 18 9 +l 19 7 +l 19 4 +l 18 2 +l 17 1 +l 14 0 +l 2 0 +m 14 11 +l 16 10 +l 17 9 +l 18 7 +l 18 4 +l 17 2 +l 16 1 +l 14 0 + +68 19 9 10 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 17 21 +l 17 15 +l 16 21 +m 2 0 +l 9 0 + +69 25 12 22 +m 8 21 +l 8 15 +l 7 7 +l 6 3 +l 5 1 +l 4 0 +m 18 21 +l 18 0 +m 19 21 +l 19 0 +m 5 21 +l 22 21 +m 1 0 +l 22 0 +m 1 0 +l 1 -7 +m 2 0 +l 1 -7 +m 21 0 +l 22 -7 +m 22 0 +l 22 -7 + +70 22 11 16 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 12 15 +l 12 7 +m 2 21 +l 18 21 +l 18 15 +l 17 21 +m 6 11 +l 12 11 +m 2 0 +l 18 0 +l 18 6 +l 17 0 + +71 32 16 62 +m 15 21 +l 15 0 +m 16 21 +l 16 0 +m 12 21 +l 19 21 +m 4 20 +l 5 19 +l 4 18 +l 3 19 +l 3 20 +l 4 21 +l 5 21 +l 6 20 +l 7 18 +l 8 14 +l 9 12 +l 11 11 +l 20 11 +l 22 12 +l 23 14 +l 24 18 +l 25 20 +l 26 21 +l 27 21 +l 28 20 +l 28 19 +l 27 18 +l 26 19 +l 27 20 +m 11 11 +l 9 10 +l 8 8 +l 7 3 +l 6 1 +l 5 0 +m 11 11 +l 10 10 +l 9 8 +l 8 3 +l 7 1 +l 6 0 +l 4 0 +l 3 1 +l 2 3 +m 20 11 +l 22 10 +l 23 8 +l 24 3 +l 25 1 +l 26 0 +m 20 11 +l 21 10 +l 22 8 +l 23 3 +l 24 1 +l 25 0 +l 27 0 +l 28 1 +l 29 3 +m 12 0 +l 19 0 + +72 21 10 41 +m 4 18 +l 3 21 +l 3 15 +l 4 18 +l 6 20 +l 8 21 +l 12 21 +l 15 20 +l 16 18 +l 16 15 +l 15 13 +l 12 12 +l 9 12 +m 12 21 +l 14 20 +l 15 18 +l 15 15 +l 14 13 +l 12 12 +m 12 12 +l 14 11 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 7 0 +l 5 1 +l 4 2 +l 3 4 +l 3 5 +l 4 6 +l 5 5 +l 4 4 +m 15 10 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 12 0 + +73 25 12 18 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 18 21 +l 18 0 +m 19 21 +l 19 0 +m 2 21 +l 9 21 +m 15 21 +l 22 21 +m 18 19 +l 6 2 +m 2 0 +l 9 0 +m 15 0 +l 22 0 + +74 25 12 27 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 18 21 +l 18 0 +m 19 21 +l 19 0 +m 2 21 +l 9 21 +m 15 21 +l 22 21 +m 18 19 +l 6 2 +m 2 0 +l 9 0 +m 15 0 +l 22 0 +m 8 27 +l 8 28 +l 7 28 +l 7 27 +l 8 25 +l 10 24 +l 14 24 +l 16 25 +l 17 27 + +75 25 12 36 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 9 21 +m 6 11 +l 13 11 +l 15 12 +l 16 14 +l 17 18 +l 18 20 +l 19 21 +l 20 21 +l 21 20 +l 21 19 +l 20 18 +l 19 19 +l 20 20 +m 13 11 +l 15 10 +l 16 8 +l 17 3 +l 18 1 +l 19 0 +m 13 11 +l 14 10 +l 15 8 +l 16 3 +l 17 1 +l 18 0 +l 20 0 +l 21 1 +l 22 3 +m 2 0 +l 9 0 + +76 26 13 20 +m 8 21 +l 8 15 +l 7 7 +l 6 3 +l 5 1 +l 4 0 +l 3 0 +l 2 1 +l 2 2 +l 3 3 +l 4 2 +l 3 1 +m 19 21 +l 19 0 +m 20 21 +l 20 0 +m 5 21 +l 23 21 +m 16 0 +l 23 0 + +77 26 13 20 +m 5 21 +l 5 0 +m 6 21 +l 12 3 +m 5 21 +l 12 0 +m 19 21 +l 12 0 +m 19 21 +l 19 0 +m 20 21 +l 20 0 +m 2 21 +l 6 21 +m 19 21 +l 23 21 +m 2 0 +l 8 0 +m 16 0 +l 23 0 + +78 25 12 18 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 18 21 +l 18 0 +m 19 21 +l 19 0 +m 2 21 +l 9 21 +m 15 21 +l 22 21 +m 6 11 +l 18 11 +m 2 0 +l 9 0 +m 15 0 +l 22 0 + +79 23 11 41 +m 10 21 +l 7 20 +l 5 18 +l 4 16 +l 3 12 +l 3 9 +l 4 5 +l 5 3 +l 7 1 +l 10 0 +l 12 0 +l 15 1 +l 17 3 +l 18 5 +l 19 9 +l 19 12 +l 18 16 +l 17 18 +l 15 20 +l 12 21 +l 10 21 +m 10 21 +l 8 20 +l 6 18 +l 5 16 +l 4 12 +l 4 9 +l 5 5 +l 6 3 +l 8 1 +l 10 0 +m 12 0 +l 14 1 +l 16 3 +l 17 5 +l 18 9 +l 18 12 +l 17 16 +l 16 18 +l 14 20 +l 12 21 + +80 25 12 14 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 18 21 +l 18 0 +m 19 21 +l 19 0 +m 2 21 +l 22 21 +m 2 0 +l 9 0 +m 15 0 +l 22 0 + +81 23 11 24 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 14 21 +l 17 20 +l 18 19 +l 19 17 +l 19 14 +l 18 12 +l 17 11 +l 14 10 +l 6 10 +m 14 21 +l 16 20 +l 17 19 +l 18 17 +l 18 14 +l 17 12 +l 16 11 +l 14 10 +m 2 0 +l 9 0 + +82 22 11 30 +m 17 18 +l 18 15 +l 18 21 +l 17 18 +l 15 20 +l 12 21 +l 10 21 +l 7 20 +l 5 18 +l 4 16 +l 3 13 +l 3 8 +l 4 5 +l 5 3 +l 7 1 +l 10 0 +l 12 0 +l 15 1 +l 17 3 +l 18 5 +m 10 21 +l 8 20 +l 6 18 +l 5 16 +l 4 13 +l 4 8 +l 5 5 +l 6 3 +l 8 1 +l 10 0 + +83 20 10 12 +m 9 21 +l 9 0 +m 10 21 +l 10 0 +m 3 21 +l 2 15 +l 2 21 +l 17 21 +l 17 15 +l 16 21 +m 6 0 +l 13 0 + +84 22 11 19 +m 3 21 +l 10 5 +m 4 21 +l 11 5 +m 18 21 +l 11 5 +l 9 2 +l 8 1 +l 6 0 +l 5 0 +l 4 1 +l 4 2 +l 5 3 +l 6 2 +l 5 1 +m 1 21 +l 7 21 +m 14 21 +l 20 21 + +85 26 13 41 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 9 21 +l 16 21 +m 10 18 +l 6 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 6 4 +l 10 3 +l 15 3 +l 19 4 +l 21 6 +l 22 9 +l 22 12 +l 21 15 +l 19 17 +l 15 18 +l 10 18 +m 10 18 +l 7 17 +l 5 15 +l 4 12 +l 4 9 +l 5 6 +l 7 4 +l 10 3 +m 15 3 +l 18 4 +l 20 6 +l 21 9 +l 21 12 +l 20 15 +l 18 17 +l 15 18 +m 9 0 +l 16 0 + +86 21 10 14 +m 3 21 +l 16 0 +m 4 21 +l 17 0 +m 17 21 +l 3 0 +m 1 21 +l 7 21 +m 13 21 +l 19 21 +m 1 0 +l 7 0 +m 13 0 +l 19 0 + +87 25 12 18 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 18 21 +l 18 0 +m 19 21 +l 19 0 +m 2 21 +l 9 21 +m 15 21 +l 22 21 +m 2 0 +l 22 0 +m 21 0 +l 22 -7 +m 22 0 +l 22 -7 + +88 24 12 21 +m 5 21 +l 5 10 +l 6 8 +l 9 7 +l 12 7 +l 15 8 +l 17 10 +m 6 21 +l 6 10 +l 7 8 +l 9 7 +m 17 21 +l 17 0 +m 18 21 +l 18 0 +m 2 21 +l 9 21 +m 14 21 +l 21 21 +m 14 0 +l 21 0 + +89 34 17 20 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 16 21 +l 16 0 +m 17 21 +l 17 0 +m 27 21 +l 27 0 +m 28 21 +l 28 0 +m 2 21 +l 9 21 +m 13 21 +l 20 21 +m 24 21 +l 31 21 +m 2 0 +l 31 0 + +90 34 17 24 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 16 21 +l 16 0 +m 17 21 +l 17 0 +m 27 21 +l 27 0 +m 28 21 +l 28 0 +m 2 21 +l 9 21 +m 13 21 +l 20 21 +m 24 21 +l 31 21 +m 2 0 +l 31 0 +m 30 0 +l 31 -7 +m 31 0 +l 31 -7 + +91 15 7 8 +m 4 25 +l 4 -7 +m 5 25 +l 5 -7 +m 4 25 +l 11 25 +m 4 -7 +l 11 -7 + +92 23 11 2 +m 2 23 +l 20 3 + +93 15 7 8 +m 9 25 +l 9 -7 +m 10 25 +l 10 -7 +m 3 25 +l 10 25 +m 3 -7 +l 10 -7 + +94 23 11 6 +m 3 7 +l 11 12 +l 19 7 +m 3 7 +l 11 11 +l 19 7 + +95 21 10 2 +m 0 -2 +l 21 -2 + +96 25 12 22 +m 3 6 +l 3 8 +l 4 11 +l 6 12 +l 8 12 +l 10 11 +l 14 8 +l 16 7 +l 18 7 +l 20 8 +l 21 10 +m 3 8 +l 4 10 +l 6 11 +l 8 11 +l 10 10 +l 14 7 +l 16 6 +l 18 6 +l 20 7 +l 21 10 +l 21 12 + +97 21 10 35 +m 5 12 +l 5 11 +l 4 11 +l 4 12 +l 5 13 +l 7 14 +l 11 14 +l 13 13 +l 14 12 +l 15 10 +l 15 3 +l 16 1 +l 17 0 +m 14 12 +l 14 3 +l 15 1 +l 17 0 +l 18 0 +m 14 10 +l 13 9 +l 7 8 +l 4 7 +l 3 5 +l 3 3 +l 4 1 +l 7 0 +l 10 0 +l 12 1 +l 14 3 +m 7 8 +l 5 7 +l 4 5 +l 4 3 +l 5 1 +l 7 0 + +98 21 10 44 +m 16 21 +l 15 20 +l 9 18 +l 6 16 +l 4 13 +l 3 10 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 8 +l 16 11 +l 14 13 +l 11 14 +l 9 14 +l 6 13 +l 4 11 +l 3 8 +m 16 21 +l 15 19 +l 13 18 +l 9 17 +l 6 15 +l 4 13 +m 9 14 +l 7 13 +l 5 11 +l 4 8 +l 4 6 +l 5 3 +l 7 1 +l 9 0 +m 11 0 +l 13 1 +l 15 3 +l 16 6 +l 16 8 +l 15 11 +l 13 13 +l 11 14 + +99 21 10 31 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 2 14 +l 13 14 +l 16 13 +l 17 11 +l 17 10 +l 16 8 +l 13 7 +m 13 14 +l 15 13 +l 16 11 +l 16 10 +l 15 8 +l 13 7 +m 6 7 +l 13 7 +l 16 6 +l 17 4 +l 17 3 +l 16 1 +l 13 0 +l 2 0 +m 13 7 +l 15 6 +l 16 4 +l 16 3 +l 15 1 +l 13 0 + +100 19 9 10 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 2 14 +l 16 14 +l 16 9 +l 15 14 +m 2 0 +l 9 0 + +101 24 12 17 +m 8 14 +l 8 10 +l 7 4 +l 6 1 +l 5 0 +m 17 14 +l 17 0 +m 18 14 +l 18 0 +m 5 14 +l 21 14 +m 3 0 +l 2 -5 +l 2 0 +l 21 0 +l 21 -5 +l 20 0 + +102 20 10 28 +m 4 8 +l 16 8 +l 16 10 +l 15 12 +l 14 13 +l 12 14 +l 9 14 +l 6 13 +l 4 11 +l 3 8 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +m 15 8 +l 15 11 +l 14 13 +m 9 14 +l 7 13 +l 5 11 +l 4 8 +l 4 6 +l 5 3 +l 7 1 +l 9 0 + +103 28 14 50 +m 13 14 +l 13 0 +m 14 14 +l 14 0 +m 10 14 +l 17 14 +m 5 13 +l 4 12 +l 3 13 +l 4 14 +l 5 14 +l 6 13 +l 8 9 +l 9 8 +l 11 7 +l 16 7 +l 18 8 +l 19 9 +l 21 13 +l 22 14 +l 23 14 +l 24 13 +l 23 12 +l 22 13 +m 11 7 +l 9 6 +l 8 5 +l 6 1 +l 5 0 +m 11 7 +l 9 5 +l 7 1 +l 6 0 +l 4 0 +l 3 1 +l 2 3 +m 16 7 +l 18 6 +l 19 5 +l 21 1 +l 22 0 +m 16 7 +l 18 5 +l 20 1 +l 21 0 +l 23 0 +l 24 1 +l 25 3 +m 10 0 +l 17 0 + +104 19 9 38 +m 4 12 +l 3 14 +l 3 10 +l 4 12 +l 5 13 +l 7 14 +l 11 14 +l 14 13 +l 15 11 +l 15 10 +l 14 8 +l 11 7 +m 11 14 +l 13 13 +l 14 11 +l 14 10 +l 13 8 +l 11 7 +m 8 7 +l 11 7 +l 14 6 +l 15 4 +l 15 3 +l 14 1 +l 11 0 +l 7 0 +l 4 1 +l 3 3 +l 3 4 +l 4 5 +l 5 4 +l 4 3 +m 11 7 +l 13 6 +l 14 4 +l 14 3 +l 13 1 +l 11 0 + +105 23 11 18 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 16 14 +l 16 0 +m 17 14 +l 17 0 +m 2 14 +l 9 14 +m 13 14 +l 20 14 +m 2 0 +l 9 0 +m 13 0 +l 20 0 +m 16 13 +l 6 1 + +106 23 11 27 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 16 14 +l 16 0 +m 17 14 +l 17 0 +m 2 14 +l 9 14 +m 13 14 +l 20 14 +m 2 0 +l 9 0 +m 13 0 +l 20 0 +m 16 13 +l 6 1 +m 8 20 +l 8 21 +l 7 21 +l 7 20 +l 8 18 +l 10 17 +l 12 17 +l 14 18 +l 15 20 + +107 21 10 31 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 2 14 +l 9 14 +m 6 7 +l 8 7 +l 11 8 +l 12 9 +l 14 13 +l 15 14 +l 16 14 +l 17 13 +l 16 12 +l 15 13 +m 8 7 +l 11 6 +l 12 5 +l 14 1 +l 15 0 +m 8 7 +l 10 6 +l 11 5 +l 13 1 +l 14 0 +l 16 0 +l 17 1 +l 18 3 +m 2 0 +l 9 0 + +108 23 11 17 +m 7 14 +l 7 10 +l 6 4 +l 5 1 +l 4 0 +l 3 0 +l 2 1 +l 3 2 +l 4 1 +m 16 14 +l 16 0 +m 17 14 +l 17 0 +m 4 14 +l 20 14 +m 13 0 +l 20 0 + +109 24 12 20 +m 5 14 +l 5 0 +m 5 14 +l 11 0 +m 6 14 +l 11 2 +m 17 14 +l 11 0 +m 17 14 +l 17 0 +m 18 14 +l 18 0 +m 2 14 +l 6 14 +m 17 14 +l 21 14 +m 2 0 +l 8 0 +m 14 0 +l 21 0 + +110 23 11 18 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 16 14 +l 16 0 +m 17 14 +l 17 0 +m 2 14 +l 9 14 +m 13 14 +l 20 14 +m 6 7 +l 16 7 +m 2 0 +l 9 0 +m 13 0 +l 20 0 + +111 21 10 33 +m 9 14 +l 6 13 +l 4 11 +l 3 8 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 8 +l 16 11 +l 14 13 +l 11 14 +l 9 14 +m 9 14 +l 7 13 +l 5 11 +l 4 8 +l 4 6 +l 5 3 +l 7 1 +l 9 0 +m 11 0 +l 13 1 +l 15 3 +l 16 6 +l 16 8 +l 15 11 +l 13 13 +l 11 14 + +112 23 11 14 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 16 14 +l 16 0 +m 17 14 +l 17 0 +m 2 14 +l 20 14 +m 2 0 +l 9 0 +m 13 0 +l 20 0 + +113 22 11 30 +m 5 14 +l 5 -7 +m 6 14 +l 6 -7 +m 6 11 +l 8 13 +l 10 14 +l 12 14 +l 15 13 +l 17 11 +l 18 8 +l 18 6 +l 17 3 +l 15 1 +l 12 0 +l 10 0 +l 8 1 +l 6 3 +m 12 14 +l 14 13 +l 16 11 +l 17 8 +l 17 6 +l 16 3 +l 14 1 +l 12 0 +m 2 14 +l 6 14 +m 2 -7 +l 9 -7 + +114 20 10 26 +m 15 11 +l 14 10 +l 15 9 +l 16 10 +l 16 11 +l 14 13 +l 12 14 +l 9 14 +l 6 13 +l 4 11 +l 3 8 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +m 9 14 +l 7 13 +l 5 11 +l 4 8 +l 4 6 +l 5 3 +l 7 1 +l 9 0 + +115 20 10 12 +m 9 14 +l 9 0 +m 10 14 +l 10 0 +m 4 14 +l 3 9 +l 3 14 +l 16 14 +l 16 9 +l 15 14 +m 6 0 +l 13 0 + +116 19 9 17 +m 3 14 +l 9 0 +m 4 14 +l 9 2 +m 15 14 +l 9 0 +l 7 -4 +l 5 -6 +l 3 -7 +l 2 -7 +l 1 -6 +l 2 -5 +l 3 -6 +m 1 14 +l 7 14 +m 11 14 +l 17 14 + +117 22 11 44 +m 10 21 +l 10 -7 +m 11 21 +l 11 -7 +m 7 21 +l 11 21 +m 10 11 +l 9 13 +l 8 14 +l 6 14 +l 4 13 +l 3 10 +l 3 4 +l 4 1 +l 6 0 +l 8 0 +l 9 1 +l 10 3 +m 6 14 +l 5 13 +l 4 10 +l 4 4 +l 5 1 +l 6 0 +m 15 14 +l 16 13 +l 17 10 +l 17 4 +l 16 1 +l 15 0 +m 11 11 +l 12 13 +l 13 14 +l 15 14 +l 17 13 +l 18 10 +l 18 4 +l 17 1 +l 15 0 +l 13 0 +l 12 1 +l 11 3 +m 7 -7 +l 14 -7 + +118 21 10 14 +m 4 14 +l 15 0 +m 5 14 +l 16 0 +m 16 14 +l 4 0 +m 2 14 +l 8 14 +m 12 14 +l 18 14 +m 2 0 +l 8 0 +m 12 0 +l 18 0 + +119 23 11 16 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 16 14 +l 16 0 +m 17 14 +l 17 0 +m 2 14 +l 9 14 +m 13 14 +l 20 14 +m 2 0 +l 20 0 +l 20 -5 +l 19 0 + +120 23 11 21 +m 5 14 +l 5 7 +l 6 5 +l 9 4 +l 11 4 +l 14 5 +l 16 7 +m 6 14 +l 6 7 +l 7 5 +l 9 4 +m 16 14 +l 16 0 +m 17 14 +l 17 0 +m 2 14 +l 9 14 +m 13 14 +l 20 14 +m 13 0 +l 20 0 + +121 32 16 20 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 15 14 +l 15 0 +m 16 14 +l 16 0 +m 25 14 +l 25 0 +m 26 14 +l 26 0 +m 2 14 +l 9 14 +m 12 14 +l 19 14 +m 22 14 +l 29 14 +m 2 0 +l 29 0 + +122 32 16 22 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 15 14 +l 15 0 +m 16 14 +l 16 0 +m 25 14 +l 25 0 +m 26 14 +l 26 0 +m 2 14 +l 9 14 +m 12 14 +l 19 14 +m 22 14 +l 29 14 +m 2 0 +l 29 0 +l 29 -5 +l 28 0 + +123 15 7 37 +m 9 25 +l 7 24 +l 6 23 +l 5 21 +l 5 19 +l 6 17 +l 7 16 +l 8 14 +l 8 12 +l 6 10 +m 7 24 +l 6 22 +l 6 20 +l 7 18 +l 8 17 +l 9 15 +l 9 13 +l 8 11 +l 4 9 +l 8 7 +l 9 5 +l 9 3 +l 8 1 +l 7 0 +l 6 -2 +l 6 -4 +l 7 -6 +m 6 8 +l 8 6 +l 8 4 +l 7 2 +l 6 1 +l 5 -1 +l 5 -3 +l 6 -5 +l 7 -6 +l 9 -7 + +124 9 4 2 +m 4 25 +l 4 -7 + +125 15 7 37 +m 5 25 +l 7 24 +l 8 23 +l 9 21 +l 9 19 +l 8 17 +l 7 16 +l 6 14 +l 6 12 +l 8 10 +m 7 24 +l 8 22 +l 8 20 +l 7 18 +l 6 17 +l 5 15 +l 5 13 +l 6 11 +l 10 9 +l 6 7 +l 5 5 +l 5 3 +l 6 1 +l 7 0 +l 8 -2 +l 8 -4 +l 7 -6 +m 8 8 +l 6 6 +l 6 4 +l 7 2 +l 8 1 +l 9 -1 +l 9 -3 +l 8 -5 +l 7 -6 +l 5 -7 + +129 27 13 26 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 3 21 +l 2 15 +l 2 21 +l 14 21 +m 11 11 +l 18 11 +l 21 10 +l 22 9 +l 23 7 +l 23 4 +l 22 2 +l 21 1 +l 18 0 +l 7 0 +m 18 11 +l 20 10 +l 21 9 +l 22 7 +l 22 4 +l 21 2 +l 20 1 +l 18 0 + +130 31 15 32 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 9 21 +m 6 11 +l 13 11 +l 16 10 +l 17 9 +l 18 7 +l 18 4 +l 17 2 +l 16 1 +l 13 0 +l 2 0 +m 13 11 +l 15 10 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 13 0 +m 24 21 +l 24 0 +m 25 21 +l 25 0 +m 21 21 +l 28 21 +m 21 0 +l 28 0 + +131 22 11 24 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 9 21 +m 6 11 +l 13 11 +l 16 10 +l 17 9 +l 18 7 +l 18 4 +l 17 2 +l 16 1 +l 13 0 +l 2 0 +m 13 11 +l 15 10 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 13 0 + +132 22 11 36 +m 4 18 +l 3 21 +l 3 15 +l 4 18 +l 6 20 +l 9 21 +l 11 21 +l 14 20 +l 16 18 +l 17 16 +l 18 13 +l 18 8 +l 17 5 +l 16 3 +l 14 1 +l 11 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 +l 3 5 +l 4 6 +l 5 5 +l 4 4 +m 11 21 +l 13 20 +l 15 18 +l 16 16 +l 17 13 +l 17 8 +l 16 5 +l 15 3 +l 13 1 +l 11 0 +m 8 11 +l 17 11 + +133 32 16 51 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 2 21 +l 9 21 +m 2 0 +l 9 0 +m 19 21 +l 16 20 +l 14 18 +l 13 16 +l 12 12 +l 12 9 +l 13 5 +l 14 3 +l 16 1 +l 19 0 +l 21 0 +l 24 1 +l 26 3 +l 27 5 +l 28 9 +l 28 12 +l 27 16 +l 26 18 +l 24 20 +l 21 21 +l 19 21 +m 19 21 +l 17 20 +l 15 18 +l 14 16 +l 13 12 +l 13 9 +l 14 5 +l 15 3 +l 17 1 +l 19 0 +m 21 0 +l 23 1 +l 25 3 +l 26 5 +l 27 9 +l 27 12 +l 26 16 +l 25 18 +l 23 20 +l 21 21 +m 6 11 +l 12 11 + +134 23 11 38 +m 16 21 +l 16 0 +m 17 21 +l 17 0 +m 20 21 +l 8 21 +l 5 20 +l 4 19 +l 3 17 +l 3 15 +l 4 13 +l 5 12 +l 8 11 +l 16 11 +m 8 21 +l 6 20 +l 5 19 +l 4 17 +l 4 15 +l 5 13 +l 6 12 +l 8 11 +m 11 11 +l 9 10 +l 8 9 +l 5 2 +l 4 1 +l 3 1 +l 2 2 +m 9 10 +l 8 8 +l 6 1 +l 5 0 +l 3 0 +l 2 2 +l 2 3 +m 13 0 +l 20 0 + +135 22 11 22 +m 9 14 +l 9 0 +m 10 14 +l 10 0 +m 4 14 +l 3 9 +l 3 14 +l 13 14 +m 10 7 +l 14 7 +l 17 6 +l 18 4 +l 18 3 +l 17 1 +l 14 0 +l 6 0 +m 14 7 +l 16 6 +l 17 4 +l 17 3 +l 16 1 +l 14 0 + +136 27 13 28 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 2 14 +l 9 14 +m 6 7 +l 10 7 +l 13 6 +l 14 4 +l 14 3 +l 13 1 +l 10 0 +l 2 0 +m 10 7 +l 12 6 +l 13 4 +l 13 3 +l 12 1 +l 10 0 +m 20 14 +l 20 0 +m 21 14 +l 21 0 +m 17 14 +l 24 14 +m 17 0 +l 24 0 + +137 18 9 20 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 2 14 +l 9 14 +m 6 7 +l 10 7 +l 13 6 +l 14 4 +l 14 3 +l 13 1 +l 10 0 +l 2 0 +m 10 7 +l 12 6 +l 13 4 +l 13 3 +l 12 1 +l 10 0 + +138 20 10 31 +m 4 12 +l 3 14 +l 3 10 +l 4 12 +l 5 13 +l 7 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 7 0 +l 5 1 +l 3 3 +l 3 4 +l 4 5 +l 5 4 +l 4 3 +m 10 14 +l 12 13 +l 14 11 +l 15 8 +l 15 6 +l 14 3 +l 12 1 +l 10 0 +m 9 7 +l 15 7 + +139 30 15 43 +m 5 14 +l 5 0 +m 6 14 +l 6 0 +m 2 14 +l 9 14 +m 2 0 +l 9 0 +m 18 14 +l 15 13 +l 13 11 +l 12 8 +l 12 6 +l 13 3 +l 15 1 +l 18 0 +l 20 0 +l 23 1 +l 25 3 +l 26 6 +l 26 8 +l 25 11 +l 23 13 +l 20 14 +l 18 14 +m 18 14 +l 16 13 +l 14 11 +l 13 8 +l 13 6 +l 14 3 +l 16 1 +l 18 0 +m 20 0 +l 22 1 +l 24 3 +l 25 6 +l 25 8 +l 24 11 +l 22 13 +l 20 14 +m 6 7 +l 12 7 + +140 22 11 33 +m 15 14 +l 15 0 +m 16 14 +l 16 0 +m 19 14 +l 8 14 +l 5 13 +l 4 11 +l 4 10 +l 5 8 +l 8 7 +l 15 7 +m 8 14 +l 6 13 +l 5 11 +l 5 10 +l 6 8 +l 8 7 +m 13 7 +l 10 6 +l 9 5 +l 7 1 +l 6 0 +m 13 7 +l 11 6 +l 10 5 +l 8 1 +l 7 0 +l 5 0 +l 4 1 +l 3 3 +m 12 0 +l 19 0 diff --git a/cd/etc/vectorfont10.txt b/cd/etc/vectorfont10.txt new file mode 100755 index 0000000..b07db0e --- /dev/null +++ b/cd/etc/vectorfont10.txt @@ -0,0 +1,3973 @@ +Gothic english I +25 21 10 -7 + + +32 21 10 0 + +33 13 6 25 +m 6 21 +l 5 20 +l 3 19 +l 5 18 +l 6 7 +m 6 18 +l 7 19 +l 6 20 +l 5 19 +l 6 18 +l 6 7 +m 6 21 +l 7 20 +l 9 19 +l 7 18 +l 6 7 +m 6 3 +l 4 1 +l 6 0 +l 8 1 +l 6 3 +m 6 2 +l 5 1 +l 7 1 +l 6 2 + +34 19 9 16 +m 5 21 +l 4 20 +l 4 14 +m 5 20 +l 4 14 +m 5 21 +l 6 20 +l 4 14 +m 14 21 +l 13 20 +l 13 14 +m 14 20 +l 13 14 +m 14 21 +l 15 20 +l 13 14 + +35 22 11 8 +m 11 21 +l 4 -7 +m 17 21 +l 10 -7 +m 4 10 +l 18 10 +m 3 4 +l 17 4 + +36 21 10 53 +m 8 25 +l 8 -4 +m 12 25 +l 12 -4 +m 12 21 +l 14 20 +l 15 18 +l 15 16 +l 17 17 +l 16 19 +l 15 20 +l 12 21 +l 8 21 +l 5 20 +l 3 18 +l 3 15 +l 4 13 +l 7 11 +l 13 9 +l 15 8 +l 16 6 +l 16 3 +l 15 1 +m 16 17 +l 15 19 +m 4 15 +l 5 13 +l 7 12 +l 13 10 +l 15 9 +l 16 7 +m 5 2 +l 4 4 +m 5 20 +l 4 18 +l 4 16 +l 5 14 +l 7 13 +l 13 11 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 +l 5 5 +l 5 3 +l 6 1 +l 8 0 + +37 25 12 29 +m 21 21 +l 3 0 +m 8 21 +l 10 19 +l 10 17 +l 9 15 +l 7 14 +l 5 14 +l 3 16 +l 3 18 +l 4 20 +l 6 21 +l 8 21 +l 10 20 +l 13 19 +l 16 19 +l 19 20 +l 21 21 +m 17 7 +l 15 6 +l 14 4 +l 14 2 +l 16 0 +l 18 0 +l 20 1 +l 21 3 +l 21 5 +l 19 7 +l 17 7 + +38 27 13 50 +m 20 13 +l 21 12 +l 22 12 +l 23 13 +m 19 12 +l 20 11 +l 22 11 +m 19 11 +l 20 10 +l 21 10 +l 22 11 +l 23 13 +m 20 13 +l 14 7 +m 13 6 +l 7 0 +l 3 5 +l 9 11 +m 10 12 +l 14 16 +l 10 21 +l 5 15 +l 11 9 +l 15 3 +l 17 1 +l 19 0 +l 21 0 +l 22 1 +l 23 3 +m 7 1 +l 4 5 +m 13 16 +l 10 20 +m 6 15 +l 11 10 +l 15 4 +l 17 2 +l 19 1 +l 22 1 +m 8 1 +l 4 6 +m 13 15 +l 9 20 +m 6 16 +l 12 10 +l 16 4 +l 17 3 +l 19 2 +l 22 2 +l 23 3 + +39 10 5 8 +m 5 21 +l 4 20 +l 4 14 +m 5 20 +l 4 14 +m 5 21 +l 6 20 +l 4 14 + +40 15 7 24 +m 10 25 +l 8 23 +l 6 20 +l 4 16 +l 3 11 +l 3 7 +l 4 2 +l 6 -2 +l 8 -5 +l 10 -7 +m 6 19 +l 5 16 +l 4 12 +l 4 6 +l 5 2 +l 6 -1 +m 8 23 +l 7 21 +l 6 18 +l 5 12 +l 5 6 +l 6 0 +l 7 -3 +l 8 -5 + +41 15 7 24 +m 4 25 +l 6 23 +l 8 20 +l 10 16 +l 11 11 +l 11 7 +l 10 2 +l 8 -2 +l 6 -5 +l 4 -7 +m 8 19 +l 9 16 +l 10 12 +l 10 6 +l 9 2 +l 8 -1 +m 6 23 +l 7 21 +l 8 18 +l 9 12 +l 9 6 +l 8 0 +l 7 -3 +l 6 -5 + +42 17 8 30 +m 8 21 +l 7 20 +l 9 10 +l 8 9 +m 8 21 +l 8 9 +m 8 21 +l 9 20 +l 7 10 +l 8 9 +m 3 18 +l 4 18 +l 12 12 +l 13 12 +m 3 18 +l 13 12 +m 3 18 +l 3 17 +l 13 13 +l 13 12 +m 13 18 +l 12 18 +l 4 12 +l 3 12 +m 13 18 +l 3 12 +m 13 18 +l 13 17 +l 3 13 +l 3 12 + +43 26 13 12 +m 12 18 +l 12 1 +l 13 1 +m 12 18 +l 13 18 +l 13 1 +m 4 10 +l 21 10 +l 21 9 +m 4 10 +l 4 9 +l 21 9 + +44 13 6 12 +m 6 -3 +l 6 -1 +l 4 1 +l 6 3 +l 7 1 +l 7 -1 +l 6 -3 +l 4 -4 +m 6 2 +l 5 1 +l 6 0 +l 6 2 + +45 26 13 6 +m 4 10 +l 21 10 +l 21 9 +m 4 10 +l 4 9 +l 21 9 + +46 13 6 9 +m 6 3 +l 4 1 +l 6 0 +l 8 1 +l 6 3 +m 6 2 +l 5 1 +l 7 1 +l 6 2 + +47 24 12 6 +m 20 25 +l 2 -7 +l 3 -7 +m 20 25 +l 21 25 +l 3 -7 + +48 21 10 34 +m 4 19 +l 4 3 +l 2 2 +m 5 18 +l 5 3 +l 8 1 +m 6 19 +l 6 3 +l 8 2 +l 9 1 +m 4 19 +l 6 19 +l 11 20 +l 13 21 +m 11 20 +l 12 19 +l 14 18 +l 14 2 +m 12 20 +l 15 18 +l 15 3 +m 13 21 +l 14 20 +l 16 19 +l 18 19 +l 16 18 +l 16 2 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 14 2 +l 16 2 + +49 21 10 23 +m 7 19 +l 8 18 +l 9 16 +l 9 3 +l 7 2 +m 9 18 +l 8 19 +l 9 20 +l 10 18 +l 10 2 +l 12 1 +m 7 19 +l 10 21 +l 11 19 +l 11 3 +l 13 2 +l 14 2 +m 7 2 +l 8 2 +l 10 1 +l 11 0 +l 12 1 +l 14 2 + +50 21 10 39 +m 4 19 +l 6 19 +l 8 20 +l 9 21 +l 11 20 +l 14 19 +l 16 19 +m 8 19 +l 10 20 +m 4 19 +l 6 18 +l 8 18 +l 10 19 +l 11 20 +m 14 19 +l 14 11 +m 15 18 +l 15 12 +m 16 19 +l 16 11 +l 9 11 +l 6 10 +l 4 8 +l 3 5 +l 3 0 +m 3 0 +l 7 2 +l 11 3 +l 14 3 +l 18 2 +m 6 1 +l 9 2 +l 14 2 +l 17 1 +m 3 0 +l 8 1 +l 13 1 +l 16 0 +l 18 2 + +51 21 10 45 +m 4 19 +l 5 19 +l 7 20 +l 8 21 +l 10 20 +l 14 19 +l 16 19 +m 7 19 +l 9 20 +m 4 19 +l 6 18 +l 8 18 +l 10 20 +m 14 19 +l 14 12 +m 15 18 +l 15 13 +m 16 19 +l 16 12 +l 14 12 +l 11 11 +l 9 10 +m 9 11 +l 11 10 +l 14 9 +l 16 9 +l 16 2 +m 15 8 +l 15 3 +m 14 9 +l 14 2 +m 3 2 +l 5 3 +l 7 3 +l 9 2 +l 10 1 +m 7 2 +l 9 1 +m 3 2 +l 5 2 +l 7 1 +l 8 0 +l 10 1 +l 14 2 +l 16 2 + +52 21 10 33 +m 13 21 +l 3 11 +l 3 6 +l 12 6 +m 14 6 +l 18 6 +l 19 5 +l 19 7 +l 18 6 +m 4 11 +l 4 7 +m 5 13 +l 5 6 +m 12 20 +l 12 3 +l 10 2 +m 13 17 +l 14 19 +l 13 20 +l 13 2 +l 15 1 +m 13 21 +l 15 19 +l 14 17 +l 14 3 +l 16 2 +l 17 2 +m 10 2 +l 11 2 +l 13 1 +l 14 0 +l 15 1 +l 17 2 + +53 21 10 42 +m 4 21 +l 4 12 +m 4 21 +l 16 21 +m 5 20 +l 14 20 +m 4 19 +l 13 19 +l 15 20 +l 16 21 +m 14 15 +l 13 14 +l 11 13 +l 7 12 +l 4 12 +m 11 13 +l 12 13 +l 14 12 +l 14 2 +m 13 14 +l 15 13 +l 15 3 +m 14 15 +l 15 14 +l 17 13 +l 18 13 +l 16 12 +l 16 2 +m 3 2 +l 5 3 +l 7 3 +l 9 2 +l 10 1 +m 7 2 +l 9 1 +m 3 2 +l 5 2 +l 7 1 +l 8 0 +l 10 1 +l 14 2 +l 16 2 + +54 21 10 48 +m 4 19 +l 4 3 +l 2 2 +m 5 18 +l 5 3 +l 8 1 +m 6 19 +l 6 3 +l 8 2 +l 9 1 +m 4 19 +l 6 19 +l 10 20 +l 12 21 +l 13 20 +l 15 19 +l 16 19 +m 11 20 +l 13 19 +m 10 20 +l 12 18 +l 14 18 +l 16 19 +m 6 11 +l 7 11 +l 11 12 +l 13 13 +l 14 14 +m 11 12 +l 12 12 +l 14 11 +l 14 2 +m 13 13 +l 15 11 +l 15 3 +m 14 14 +l 15 13 +l 17 12 +l 18 12 +l 16 11 +l 16 2 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 14 2 +l 16 2 + +55 21 10 32 +m 3 19 +l 5 21 +l 8 20 +l 13 20 +l 18 21 +m 4 20 +l 7 19 +l 12 19 +l 15 20 +m 3 19 +l 7 18 +l 10 18 +l 14 19 +l 18 21 +m 18 21 +l 17 19 +l 15 16 +l 11 12 +l 9 9 +l 8 6 +l 8 3 +l 9 0 +m 10 10 +l 9 7 +l 9 4 +l 10 1 +m 13 14 +l 11 11 +l 10 8 +l 10 5 +l 11 2 +l 9 0 + +56 21 10 55 +m 4 18 +l 4 12 +m 5 17 +l 5 13 +m 6 18 +l 6 12 +m 4 18 +l 6 18 +l 11 19 +l 13 20 +l 14 21 +m 11 19 +l 12 19 +l 14 18 +l 14 12 +m 13 20 +l 15 19 +l 15 13 +m 14 21 +l 15 20 +l 17 19 +l 18 19 +l 16 18 +l 16 12 +m 4 12 +l 6 12 +l 14 9 +l 16 9 +m 16 12 +l 14 12 +l 6 9 +l 4 9 +m 4 9 +l 4 3 +l 2 2 +m 5 8 +l 5 3 +l 8 1 +m 6 9 +l 6 3 +l 8 2 +l 9 1 +m 14 9 +l 14 2 +m 15 8 +l 15 3 +m 16 9 +l 16 2 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 14 2 +l 16 2 + +57 21 10 49 +m 4 19 +l 4 10 +l 2 9 +m 5 18 +l 5 9 +l 7 8 +m 6 19 +l 6 10 +l 8 9 +l 9 9 +m 4 19 +l 6 19 +l 11 20 +l 13 21 +m 11 20 +l 12 19 +l 14 18 +l 14 2 +m 12 20 +l 15 18 +l 15 3 +m 13 21 +l 14 20 +l 16 19 +l 18 19 +l 16 18 +l 16 2 +m 2 9 +l 3 9 +l 5 8 +l 6 7 +l 7 8 +l 9 9 +l 13 10 +l 14 10 +m 3 2 +l 5 3 +l 7 3 +l 9 2 +l 10 1 +m 7 2 +l 9 1 +m 3 2 +l 5 2 +l 7 1 +l 8 0 +l 10 1 +l 14 2 +l 16 2 + +58 13 6 18 +m 6 14 +l 4 12 +l 6 11 +l 8 12 +l 6 14 +m 6 13 +l 5 12 +l 7 12 +l 6 13 +m 6 3 +l 4 1 +l 6 0 +l 8 1 +l 6 3 +m 6 2 +l 5 1 +l 7 1 +l 6 2 + +59 13 6 21 +m 6 14 +l 4 12 +l 6 11 +l 8 12 +l 6 14 +m 6 13 +l 5 12 +l 7 12 +l 6 13 +m 6 -3 +l 6 -1 +l 4 1 +l 6 3 +l 7 1 +l 7 -1 +l 6 -3 +l 4 -4 +m 6 2 +l 5 1 +l 6 0 +l 6 2 + +60 25 12 3 +m 20 18 +l 4 9 +l 20 0 + +61 26 13 12 +m 4 14 +l 21 14 +l 21 13 +m 4 14 +l 4 13 +l 21 13 +m 4 6 +l 21 6 +l 21 5 +m 4 6 +l 4 5 +l 21 5 + +62 25 12 3 +m 4 18 +l 20 9 +l 4 0 + +63 19 9 43 +m 3 17 +l 4 19 +l 5 20 +l 8 21 +l 10 21 +l 13 20 +l 14 19 +l 15 17 +l 15 15 +l 14 13 +l 12 11 +l 10 10 +m 4 17 +l 5 19 +m 13 19 +l 14 18 +l 14 14 +l 13 13 +m 3 17 +l 5 16 +l 5 18 +l 6 20 +l 8 21 +m 10 21 +l 12 20 +l 13 18 +l 13 14 +l 12 12 +l 10 10 +m 9 10 +l 9 7 +l 10 10 +l 8 10 +l 9 7 +m 9 3 +l 7 1 +l 9 0 +l 11 1 +l 9 3 +m 9 2 +l 8 1 +l 10 1 +l 9 2 + +64 28 14 52 +m 18 13 +l 17 15 +l 15 16 +l 12 16 +l 10 15 +l 9 14 +l 8 11 +l 8 8 +l 9 6 +l 11 5 +l 14 5 +l 16 6 +l 17 8 +m 12 16 +l 10 14 +l 9 11 +l 9 8 +l 10 6 +l 11 5 +m 18 16 +l 17 8 +l 17 6 +l 19 5 +l 21 5 +l 23 7 +l 24 10 +l 24 12 +l 23 15 +l 22 17 +l 20 19 +l 18 20 +l 15 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 15 0 +l 18 1 +l 20 2 +l 21 3 +m 19 16 +l 18 8 +l 18 6 +l 19 5 + +65 23 11 49 +m 5 18 +l 7 20 +l 9 21 +l 11 21 +l 12 20 +l 19 4 +l 20 3 +l 22 3 +m 10 20 +l 11 19 +l 18 3 +l 19 1 +l 20 2 +l 18 3 +m 7 20 +l 9 20 +l 10 19 +l 17 3 +l 18 1 +l 19 0 +l 20 0 +l 22 3 +m 5 14 +l 6 15 +l 8 16 +l 9 16 +l 10 15 +m 9 15 +l 9 14 +m 6 15 +l 8 15 +l 9 13 +m 0 0 +l 2 2 +l 4 3 +l 7 3 +l 9 2 +m 3 2 +l 7 2 +l 8 1 +m 0 0 +l 3 1 +l 6 1 +l 7 0 +l 9 2 +m 11 17 +l 5 3 +m 7 8 +l 15 8 + +66 25 12 88 +m 2 19 +l 4 21 +l 7 21 +l 9 20 +l 11 21 +m 5 20 +l 8 20 +m 2 19 +l 4 20 +l 6 19 +l 9 19 +l 11 21 +m 7 16 +l 6 15 +l 5 13 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 4 +m 6 14 +l 6 6 +m 3 11 +l 6 11 +m 7 16 +l 7 7 +l 6 5 +l 5 4 +m 12 18 +l 11 17 +l 10 15 +l 10 6 +m 11 16 +l 11 8 +m 12 18 +l 12 9 +l 11 7 +l 10 6 +m 12 18 +l 18 21 +l 20 20 +l 21 18 +l 21 16 +l 19 14 +l 15 12 +m 18 20 +l 20 18 +l 20 16 +m 16 20 +l 18 19 +l 19 18 +l 19 15 +l 17 13 +m 17 13 +l 20 11 +l 21 9 +l 21 3 +m 19 11 +l 20 9 +l 20 4 +m 17 13 +l 18 12 +l 19 10 +l 19 3 +m 4 0 +l 7 2 +l 10 3 +l 14 3 +l 17 2 +m 6 1 +l 9 2 +l 14 2 +l 16 1 +m 4 0 +l 8 1 +l 13 1 +l 15 0 +l 17 2 +l 19 3 +l 21 3 +m 15 12 +l 15 3 +m 15 9 +l 19 9 +m 15 6 +l 19 6 + +67 25 12 59 +m 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 8 +l 4 5 +l 5 3 +l 8 1 +l 11 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +l 22 6 +m 5 16 +l 4 13 +l 4 8 +l 6 4 +l 9 2 +l 12 1 +l 15 1 +l 18 2 +m 9 20 +l 7 18 +l 6 16 +l 5 13 +l 5 9 +l 6 6 +l 9 3 +l 12 2 +l 15 2 +l 18 3 +l 20 4 +l 22 6 +m 11 17 +l 11 5 +m 12 17 +l 12 7 +m 13 18 +l 13 8 +l 12 6 +l 11 5 +m 11 17 +l 13 18 +l 16 21 +l 18 20 +l 20 20 +l 21 21 +m 15 20 +l 17 19 +l 19 19 +m 14 19 +l 16 18 +l 18 18 +l 20 19 +l 21 21 +m 18 18 +l 18 3 + +68 24 12 59 +m 2 21 +l 16 21 +l 18 20 +l 19 18 +l 19 3 +m 4 20 +l 16 20 +l 18 18 +l 18 4 +m 2 21 +l 3 20 +l 5 19 +l 16 19 +l 17 18 +l 17 3 +m 8 16 +l 7 15 +l 6 13 +l 6 12 +l 4 12 +l 3 11 +l 3 9 +l 4 10 +l 6 10 +l 6 5 +m 7 14 +l 7 7 +m 4 11 +l 7 11 +m 8 16 +l 8 8 +l 7 6 +l 6 5 +m 2 0 +l 5 2 +l 8 3 +l 12 3 +l 15 2 +m 4 1 +l 7 2 +l 12 2 +l 14 1 +m 2 0 +l 6 1 +l 11 1 +l 13 0 +l 15 2 +l 17 3 +l 19 3 +m 11 19 +l 11 3 +m 11 14 +l 13 13 +l 15 13 +l 17 14 +m 11 8 +l 13 9 +l 15 9 +l 17 8 + +69 23 11 77 +m 2 19 +l 4 21 +l 6 21 +l 8 20 +l 10 21 +m 5 20 +l 7 20 +m 2 19 +l 4 20 +l 6 19 +l 8 19 +l 10 21 +m 7 16 +l 6 15 +l 5 13 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 4 +m 6 14 +l 6 6 +m 3 11 +l 6 11 +m 7 16 +l 7 7 +l 6 5 +l 5 4 +m 10 14 +l 11 17 +l 12 19 +l 13 20 +l 15 21 +l 17 21 +l 20 20 +m 13 19 +l 15 20 +l 17 20 +l 19 19 +m 11 17 +l 12 18 +l 14 19 +l 16 19 +l 18 18 +l 20 20 +m 10 6 +l 11 9 +l 12 11 +l 13 12 +l 15 12 +l 17 11 +m 13 11 +l 15 11 +l 16 10 +m 11 9 +l 12 10 +l 14 10 +l 15 9 +l 17 11 +m 4 0 +l 7 2 +l 11 3 +l 16 3 +l 20 2 +m 6 1 +l 9 2 +l 16 2 +l 19 1 +m 4 0 +l 8 1 +l 15 1 +l 18 0 +l 20 2 +m 10 14 +l 10 3 + +70 24 12 74 +m 4 19 +l 6 21 +l 9 21 +l 11 20 +l 13 21 +m 7 20 +l 10 20 +m 4 19 +l 6 20 +l 8 19 +l 11 19 +l 13 21 +m 10 16 +l 9 15 +l 8 13 +l 8 12 +l 6 12 +l 5 11 +l 5 9 +l 6 10 +l 8 10 +l 8 5 +m 9 14 +l 9 7 +m 6 11 +l 9 11 +m 10 16 +l 10 8 +l 9 6 +l 8 5 +m 13 17 +l 13 2 +l 12 1 +l 11 1 +l 7 3 +l 5 3 +l 3 2 +l 1 0 +m 14 17 +l 14 3 +m 14 11 +l 18 11 +m 10 1 +l 9 1 +l 7 2 +l 4 2 +m 15 18 +l 15 12 +l 18 12 +m 18 10 +l 15 10 +l 15 4 +l 14 2 +l 10 0 +l 8 0 +l 6 1 +l 4 1 +l 1 0 +m 13 17 +l 15 18 +l 18 21 +l 20 20 +l 22 20 +l 23 21 +m 17 20 +l 19 19 +l 21 19 +m 16 19 +l 18 18 +l 20 18 +l 22 19 +l 23 21 +m 18 18 +l 18 4 + +71 26 13 73 +m 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 16 0 +l 19 1 +l 21 3 +l 22 5 +l 22 8 +l 21 10 +l 20 11 +l 18 12 +l 16 12 +m 5 16 +l 4 13 +l 4 8 +l 5 5 +m 9 20 +l 7 18 +l 6 16 +l 5 13 +l 5 8 +l 6 5 +l 7 3 +l 9 1 +m 20 3 +l 21 4 +l 21 8 +l 20 10 +m 16 0 +l 18 1 +l 19 2 +l 20 4 +l 20 8 +l 19 10 +l 18 11 +l 16 12 +m 11 17 +l 11 4 +m 12 17 +l 12 6 +m 13 18 +l 13 7 +l 12 5 +l 11 4 +m 11 17 +l 13 18 +l 16 21 +l 18 20 +l 20 20 +l 21 21 +m 15 20 +l 17 19 +l 19 19 +m 14 19 +l 16 18 +l 18 18 +l 20 19 +l 21 21 +m 20 19 +l 16 12 +l 16 0 +m 16 8 +l 20 8 +m 16 5 +l 20 5 + +72 25 12 90 +m 2 19 +l 4 21 +l 7 21 +l 9 20 +l 11 21 +m 5 20 +l 8 20 +m 2 19 +l 4 20 +l 6 19 +l 9 19 +l 11 21 +m 7 16 +l 6 15 +l 5 13 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 4 +m 6 14 +l 6 6 +m 3 11 +l 6 11 +m 7 16 +l 7 7 +l 6 5 +l 5 4 +m 4 0 +l 7 2 +l 10 3 +l 13 3 +l 15 2 +m 6 1 +l 9 2 +l 12 2 +l 14 1 +m 4 0 +l 8 1 +l 11 1 +l 13 0 +l 15 2 +m 12 18 +l 11 17 +l 10 15 +l 10 6 +m 11 16 +l 11 8 +m 12 18 +l 12 9 +l 11 7 +l 10 6 +m 12 18 +l 14 20 +l 16 21 +l 18 21 +l 20 20 +m 17 20 +l 18 20 +l 19 19 +m 14 20 +l 16 20 +l 18 18 +l 20 20 +m 15 12 +l 17 13 +l 19 15 +l 20 14 +l 21 11 +l 21 7 +l 20 3 +l 18 0 +m 18 14 +l 19 13 +l 20 11 +l 20 6 +l 19 3 +m 17 13 +l 18 13 +l 19 11 +l 19 6 +l 18 0 +m 15 12 +l 15 2 +m 15 9 +l 19 9 +m 15 6 +l 19 6 + +73 20 10 56 +m 3 19 +l 5 21 +l 8 21 +l 11 20 +l 13 21 +m 6 20 +l 10 20 +m 3 19 +l 5 20 +l 8 19 +l 11 19 +l 13 21 +m 10 16 +l 9 15 +l 8 13 +l 8 12 +l 6 12 +l 5 11 +l 5 9 +l 6 10 +l 8 10 +l 8 5 +m 9 14 +l 9 7 +m 6 11 +l 9 11 +m 10 16 +l 10 8 +l 9 6 +l 8 5 +m 16 19 +l 14 17 +l 13 14 +l 13 3 +l 12 1 +l 10 1 +l 6 3 +l 4 3 +l 2 2 +l 0 0 +m 14 16 +l 14 4 +m 9 1 +l 8 1 +l 6 2 +l 3 2 +m 16 19 +l 15 17 +l 15 5 +l 14 3 +l 12 1 +l 10 0 +l 7 0 +l 5 1 +l 2 1 +l 0 0 + +74 21 10 54 +m 4 19 +l 6 21 +l 9 21 +l 12 20 +l 14 21 +m 7 20 +l 11 20 +m 4 19 +l 6 20 +l 9 19 +l 12 19 +l 14 21 +m 11 16 +l 10 15 +l 9 13 +l 9 12 +l 7 12 +l 6 11 +l 6 9 +l 7 10 +l 9 10 +l 9 5 +m 10 14 +l 10 7 +m 7 11 +l 10 11 +m 11 16 +l 11 8 +l 10 6 +l 9 5 +m 17 19 +l 15 17 +l 14 14 +l 14 3 +l 13 1 +m 15 16 +l 15 4 +m 17 19 +l 16 17 +l 16 5 +l 15 3 +l 13 1 +l 10 0 +l 7 0 +l 4 1 +l 2 3 +l 2 5 +l 3 6 +l 4 6 +l 5 5 +l 4 4 +l 3 4 +m 2 5 +l 5 5 + +75 25 12 92 +m 2 19 +l 4 21 +l 7 21 +l 9 20 +l 11 21 +m 5 20 +l 8 20 +m 2 19 +l 4 20 +l 6 19 +l 9 19 +l 11 21 +m 7 16 +l 6 15 +l 5 13 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 4 +m 6 14 +l 6 6 +m 3 11 +l 6 11 +m 7 16 +l 7 7 +l 6 5 +l 5 4 +m 4 0 +l 7 2 +l 10 3 +l 13 3 +l 15 2 +m 6 1 +l 8 2 +l 12 2 +l 14 1 +m 4 0 +l 8 1 +l 11 1 +l 13 0 +l 15 2 +m 12 18 +l 11 17 +l 10 15 +l 10 6 +m 11 16 +l 11 8 +m 12 18 +l 12 9 +l 11 7 +l 10 6 +m 12 18 +l 14 20 +l 16 21 +l 18 21 +l 20 20 +m 17 20 +l 18 20 +l 19 19 +m 14 20 +l 16 20 +l 18 18 +l 20 20 +m 15 12 +l 18 15 +l 19 14 +l 21 13 +m 17 14 +l 19 13 +l 21 13 +m 21 13 +l 19 10 +l 17 8 +l 15 6 +m 17 8 +l 19 7 +l 20 3 +l 21 1 +l 22 1 +m 19 5 +l 20 1 +m 17 8 +l 18 7 +l 19 1 +l 20 0 +l 21 0 +l 22 1 +m 15 12 +l 15 2 + +76 23 11 68 +m 2 19 +l 4 21 +l 7 21 +l 9 20 +l 11 21 +m 5 20 +l 8 20 +m 2 19 +l 4 20 +l 6 19 +l 9 19 +l 11 21 +m 7 16 +l 6 15 +l 5 13 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 4 +m 6 14 +l 6 6 +m 3 11 +l 6 11 +m 7 16 +l 7 7 +l 6 5 +l 5 4 +m 4 0 +l 7 2 +l 11 3 +l 16 3 +l 20 2 +m 6 1 +l 9 2 +l 16 2 +l 19 1 +m 4 0 +l 8 1 +l 15 1 +l 18 0 +l 20 2 +m 12 18 +l 11 17 +l 10 15 +l 10 6 +m 11 16 +l 11 8 +m 12 18 +l 12 9 +l 11 7 +l 10 6 +m 12 18 +l 14 20 +l 16 21 +l 18 21 +l 20 20 +m 17 20 +l 18 20 +l 19 19 +m 14 20 +l 16 20 +l 18 18 +l 20 20 +m 16 20 +l 16 3 + +77 29 14 88 +m 8 17 +l 7 16 +l 6 14 +l 6 12 +l 4 12 +l 3 11 +l 3 9 +l 4 10 +l 6 10 +l 6 6 +m 7 15 +l 7 8 +m 4 11 +l 7 11 +m 8 17 +l 8 9 +l 7 7 +l 6 6 +m 1 0 +l 3 2 +l 5 3 +l 7 3 +l 9 2 +l 10 2 +l 11 3 +m 4 2 +l 7 2 +l 9 1 +m 1 0 +l 3 1 +l 6 1 +l 8 0 +l 9 0 +l 10 1 +l 11 3 +m 8 17 +l 12 21 +l 16 17 +l 16 4 +l 17 2 +l 18 2 +m 12 20 +l 15 17 +l 15 3 +l 14 2 +l 15 1 +l 16 2 +l 15 3 +m 12 11 +l 15 11 +m 10 19 +l 11 19 +l 14 16 +l 14 12 +l 11 12 +m 11 10 +l 14 10 +l 14 3 +l 13 2 +l 15 0 +l 18 2 +l 19 3 +m 16 17 +l 20 21 +l 24 17 +l 24 4 +l 25 2 +l 26 2 +m 20 20 +l 23 17 +l 23 3 +l 25 1 +m 20 11 +l 23 11 +m 18 19 +l 19 19 +l 22 16 +l 22 12 +l 19 12 +m 19 10 +l 22 10 +l 22 2 +l 24 0 +l 26 2 +m 11 19 +l 11 3 +m 19 19 +l 19 3 + +78 26 13 69 +m 2 18 +l 4 20 +l 6 21 +l 8 21 +l 10 20 +l 12 17 +l 17 6 +l 19 3 +l 20 2 +m 8 20 +l 10 18 +l 11 16 +l 17 4 +l 20 1 +m 4 20 +l 6 20 +l 8 19 +l 10 16 +l 15 5 +l 17 2 +l 18 1 +l 20 0 +m 17 19 +l 19 18 +l 21 18 +l 23 19 +l 24 21 +m 18 20 +l 20 19 +l 22 19 +m 17 19 +l 19 21 +l 21 20 +l 23 20 +l 24 21 +m 6 12 +l 4 12 +l 3 11 +l 3 9 +l 4 10 +l 6 10 +m 4 11 +l 6 11 +m 2 0 +l 4 2 +l 6 3 +l 9 3 +l 11 2 +m 5 2 +l 8 2 +l 10 1 +m 2 0 +l 5 1 +l 8 1 +l 9 0 +l 11 2 +m 6 20 +l 6 3 +m 20 18 +l 20 0 +m 13 15 +l 14 14 +l 16 13 +l 18 13 +l 20 14 +m 6 7 +l 8 8 +l 12 8 +l 14 7 + +79 27 13 68 +m 9 21 +l 7 20 +l 5 18 +l 4 16 +l 3 13 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +l 22 6 +l 23 9 +l 23 13 +l 22 16 +l 21 18 +l 19 20 +l 17 21 +l 16 20 +l 13 18 +l 10 17 +m 5 17 +l 4 14 +l 4 8 +l 5 5 +m 9 21 +l 7 19 +l 6 17 +l 5 14 +l 5 8 +l 6 5 +l 7 3 +l 9 1 +m 21 5 +l 22 8 +l 22 14 +l 20 18 +l 19 19 +m 17 1 +l 19 3 +l 20 5 +l 21 8 +l 21 14 +l 20 16 +l 18 19 +l 16 20 +m 10 17 +l 10 4 +m 11 17 +l 11 6 +m 12 17 +l 12 7 +l 11 5 +l 10 4 +m 16 20 +l 16 1 +m 16 14 +l 18 13 +l 19 13 +l 21 14 +m 16 8 +l 18 9 +l 19 9 +l 21 8 + +80 23 11 57 +m 3 21 +l 4 20 +l 5 18 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 2 +l 2 0 +l 5 1 +l 5 -7 +l 7 -5 +m 5 19 +l 6 17 +l 6 -5 +m 3 11 +l 6 11 +m 3 21 +l 5 20 +l 6 19 +l 7 17 +l 7 -5 +m 7 16 +l 10 18 +l 14 21 +l 18 17 +l 18 3 +m 14 20 +l 17 17 +l 17 3 +m 12 19 +l 13 19 +l 16 16 +l 16 2 +m 10 3 +l 13 3 +l 16 2 +m 11 2 +l 13 2 +l 15 1 +m 10 1 +l 12 1 +l 14 0 +l 16 2 +l 18 3 +m 10 18 +l 10 -4 +m 10 14 +l 12 13 +l 14 13 +l 16 14 +m 10 8 +l 12 9 +l 14 9 +l 16 8 + +81 27 13 85 +m 9 21 +l 7 20 +l 5 18 +l 4 16 +l 3 13 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 11 0 +l 15 0 +l 17 1 +l 19 2 +l 21 4 +l 22 6 +l 23 9 +l 23 13 +l 22 16 +l 21 18 +l 19 20 +l 17 21 +l 16 20 +l 13 18 +l 10 17 +m 5 17 +l 4 14 +l 4 8 +l 5 5 +m 9 21 +l 7 19 +l 6 17 +l 5 14 +l 5 8 +l 6 5 +l 7 3 +l 9 1 +m 21 5 +l 22 8 +l 22 14 +l 20 18 +l 19 19 +m 17 1 +l 19 3 +l 20 5 +l 21 8 +l 21 14 +l 20 16 +l 18 19 +l 16 20 +m 10 17 +l 10 4 +m 11 17 +l 11 6 +m 12 17 +l 12 7 +l 11 5 +l 10 4 +m 16 20 +l 16 1 +m 16 14 +l 18 13 +l 19 13 +l 21 14 +m 16 8 +l 18 9 +l 19 9 +l 21 8 +m 11 0 +l 12 1 +l 13 1 +l 15 0 +l 19 -5 +l 21 -6 +l 22 -6 +m 15 -1 +l 17 -4 +l 19 -6 +l 20 -6 +m 13 1 +l 14 0 +l 17 -6 +l 19 -7 +l 21 -7 +l 22 -6 + +82 25 12 89 +m 2 19 +l 4 21 +l 7 21 +l 9 20 +l 11 21 +m 5 20 +l 8 20 +m 2 19 +l 4 20 +l 6 19 +l 9 19 +l 11 21 +m 7 16 +l 6 15 +l 5 13 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 4 +m 6 14 +l 6 6 +m 3 11 +l 6 11 +m 7 16 +l 7 7 +l 6 5 +l 5 4 +m 4 0 +l 7 2 +l 10 3 +l 12 3 +l 15 2 +m 6 1 +l 8 2 +l 12 2 +l 14 1 +m 4 0 +l 8 1 +l 11 1 +l 13 0 +l 15 2 +m 12 18 +l 11 17 +l 10 15 +l 10 6 +m 11 16 +l 11 8 +m 12 18 +l 12 9 +l 11 7 +l 10 6 +m 12 18 +l 15 20 +l 17 21 +l 19 20 +l 20 18 +l 20 15 +l 19 13 +l 18 12 +l 14 10 +l 12 9 +m 17 20 +l 18 20 +l 19 18 +l 19 14 +l 18 13 +m 15 20 +l 17 19 +l 18 17 +l 18 14 +l 17 12 +l 14 10 +m 14 10 +l 16 9 +l 17 8 +l 20 3 +l 21 2 +l 22 2 +m 17 7 +l 19 3 +l 21 1 +m 14 10 +l 16 8 +l 18 2 +l 20 0 +l 22 2 + +83 24 12 80 +m 14 18 +l 13 19 +l 11 20 +l 8 21 +m 15 19 +l 13 20 +m 16 20 +l 12 21 +l 8 21 +l 5 20 +l 4 19 +l 3 17 +l 4 15 +l 5 14 +l 8 13 +l 16 13 +l 18 12 +l 19 11 +l 19 9 +l 18 6 +m 4 16 +l 5 15 +l 8 14 +l 17 14 +l 19 13 +l 20 12 +l 20 10 +l 19 8 +m 4 19 +l 4 17 +l 5 16 +l 8 15 +l 18 15 +l 20 14 +l 21 12 +l 21 10 +l 18 6 +l 14 0 +m 2 12 +l 3 11 +l 5 10 +l 14 10 +l 15 9 +l 15 8 +l 14 6 +m 3 10 +l 5 9 +l 13 9 +l 14 8 +m 2 12 +l 2 11 +l 3 9 +l 5 8 +l 12 8 +l 14 7 +l 14 6 +m 2 0 +l 5 2 +l 9 3 +l 12 3 +l 15 2 +m 4 1 +l 7 2 +l 11 2 +l 14 1 +m 2 0 +l 6 1 +l 11 1 +l 14 0 +m 16 20 +l 14 18 +l 12 15 +m 11 13 +l 9 10 +m 8 8 +l 6 6 +l 4 5 +l 3 5 +l 3 6 +l 4 5 + +84 25 12 61 +m 5 17 +l 4 15 +l 3 12 +l 3 8 +l 4 5 +l 6 2 +l 8 1 +l 11 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +l 22 6 +m 4 8 +l 5 5 +l 7 3 +l 9 2 +l 12 1 +l 15 1 +l 18 2 +m 5 17 +l 4 14 +l 4 10 +l 5 7 +l 7 4 +l 9 3 +l 12 2 +l 15 2 +l 18 3 +l 20 4 +l 22 6 +m 3 18 +l 4 20 +l 6 21 +l 10 21 +l 16 20 +l 20 20 +l 22 21 +m 11 20 +l 15 19 +l 19 19 +m 3 18 +l 4 19 +l 6 20 +l 9 20 +l 15 18 +l 18 18 +l 20 19 +l 22 21 +m 14 18 +l 13 17 +l 11 16 +l 11 5 +m 12 16 +l 12 7 +m 13 17 +l 13 8 +l 12 6 +l 11 5 +m 18 18 +l 18 3 + +85 25 12 74 +m 2 19 +l 4 21 +l 6 21 +l 9 20 +l 11 21 +m 5 20 +l 8 20 +m 2 19 +l 4 20 +l 7 19 +l 9 19 +l 11 21 +m 5 17 +l 4 15 +l 3 12 +l 3 8 +l 4 5 +l 5 3 +l 7 1 +l 10 0 +l 13 0 +l 16 1 +l 18 2 +l 20 0 +l 22 2 +m 4 8 +l 5 5 +l 8 2 +l 11 1 +l 14 1 +m 5 17 +l 4 13 +l 4 10 +l 5 7 +l 6 5 +l 8 3 +l 11 2 +l 15 2 +l 18 3 +m 15 18 +l 11 17 +l 10 15 +l 10 5 +m 11 16 +l 11 7 +m 12 17 +l 12 8 +l 11 6 +l 10 5 +m 15 18 +l 17 19 +l 19 21 +l 20 20 +l 22 19 +l 20 18 +l 20 4 +l 21 2 +l 22 2 +m 19 18 +l 20 19 +l 19 20 +l 18 19 +l 19 18 +l 19 3 +l 21 1 +m 17 19 +l 18 18 +l 18 3 +m 15 18 +l 15 2 +m 15 13 +l 18 13 +m 15 9 +l 18 9 + +86 24 12 60 +m 3 21 +l 4 20 +l 5 18 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 3 +l 3 2 +m 5 19 +l 6 17 +l 6 3 +m 3 11 +l 6 11 +m 7 2 +l 10 2 +l 12 1 +m 3 21 +l 5 20 +l 6 19 +l 7 17 +l 7 3 +l 11 3 +l 14 2 +m 3 2 +l 6 2 +l 9 1 +l 11 0 +l 14 2 +l 17 3 +l 19 3 +m 11 17 +l 14 18 +l 16 19 +l 18 21 +l 19 20 +l 21 19 +l 19 18 +l 19 3 +m 18 18 +l 19 19 +l 18 20 +l 17 19 +l 18 18 +l 18 4 +m 16 19 +l 17 18 +l 17 3 +m 11 17 +l 11 3 +m 11 14 +l 13 13 +l 15 13 +l 17 14 +m 11 8 +l 13 9 +l 15 9 +l 17 8 + +87 28 14 76 +m 3 21 +l 4 20 +l 5 18 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 3 +l 3 2 +m 5 19 +l 6 17 +l 6 3 +m 3 11 +l 6 11 +m 7 2 +l 9 2 +l 11 1 +m 3 21 +l 5 20 +l 6 19 +l 7 17 +l 7 3 +l 10 3 +l 12 2 +m 3 2 +l 6 2 +l 9 1 +l 10 0 +l 12 2 +l 15 3 +l 17 2 +l 18 0 +l 20 2 +l 23 3 +m 10 19 +l 13 21 +l 15 19 +l 15 3 +l 18 3 +l 20 2 +m 13 20 +l 14 19 +l 14 3 +m 10 19 +l 12 19 +l 13 18 +l 13 3 +l 12 2 +m 18 2 +l 19 1 +m 18 19 +l 21 21 +l 23 19 +l 23 3 +m 21 20 +l 22 19 +l 22 3 +m 18 19 +l 20 19 +l 21 18 +l 21 3 +l 20 2 +m 10 19 +l 10 3 +m 18 19 +l 18 3 +m 10 13 +l 13 13 +m 10 9 +l 13 9 +m 18 13 +l 21 13 +m 18 9 +l 21 9 + +88 23 11 52 +m 1 18 +l 3 20 +l 5 21 +l 7 21 +l 8 20 +l 16 2 +l 17 1 +l 19 1 +m 6 20 +l 7 19 +l 15 2 +l 16 1 +m 3 20 +l 5 20 +l 6 19 +l 14 1 +l 15 0 +l 17 0 +l 19 1 +l 21 3 +m 16 21 +l 18 20 +l 20 20 +l 21 21 +m 16 20 +l 17 19 +l 19 19 +m 15 19 +l 16 18 +l 18 18 +l 20 19 +l 21 21 +m 1 0 +l 2 2 +l 4 3 +l 6 3 +l 7 2 +m 3 2 +l 5 2 +l 6 1 +m 1 0 +l 2 1 +l 4 1 +l 6 0 +m 16 21 +l 12 12 +m 10 9 +l 6 0 +m 5 11 +l 9 11 +m 12 11 +l 17 11 + +89 24 12 72 +m 3 21 +l 4 20 +l 5 18 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 3 +l 3 2 +m 5 19 +l 6 17 +l 6 3 +m 3 11 +l 6 11 +m 7 2 +l 10 2 +l 12 1 +m 3 21 +l 5 20 +l 6 19 +l 7 17 +l 7 3 +l 11 3 +l 14 2 +m 3 2 +l 6 2 +l 9 1 +l 11 0 +l 14 2 +l 17 3 +m 11 17 +l 14 18 +l 16 19 +l 18 21 +l 19 20 +l 21 19 +l 19 18 +l 19 -3 +l 18 -5 +l 16 -7 +l 14 -6 +l 10 -5 +l 5 -5 +m 18 18 +l 19 19 +l 18 20 +l 17 19 +l 18 18 +l 18 2 +m 16 19 +l 17 18 +l 17 3 +l 19 0 +m 17 -6 +l 15 -5 +l 12 -5 +m 18 -5 +l 15 -4 +l 9 -4 +l 5 -5 +m 11 17 +l 11 3 +m 11 14 +l 13 13 +l 15 13 +l 17 14 +m 11 8 +l 13 9 +l 15 9 +l 17 8 + +90 21 10 46 +m 16 20 +l 15 18 +l 10 12 +l 7 8 +l 5 4 +l 2 0 +m 14 16 +l 6 5 +m 18 21 +l 15 17 +l 13 13 +l 10 9 +l 5 3 +l 4 1 +m 2 19 +l 4 21 +l 7 20 +l 13 20 +l 18 21 +m 3 20 +l 7 19 +l 11 19 +l 15 20 +m 2 19 +l 6 18 +l 10 18 +l 14 19 +l 16 20 +m 4 1 +l 6 2 +l 10 3 +l 14 3 +l 18 2 +m 5 1 +l 9 2 +l 13 2 +l 17 1 +m 2 0 +l 7 1 +l 13 1 +l 16 0 +l 18 2 +m 5 11 +l 9 11 +m 12 11 +l 16 11 + +91 15 7 8 +m 4 25 +l 4 -7 +m 5 25 +l 5 -7 +m 4 25 +l 11 25 +m 4 -7 +l 11 -7 + +92 23 11 2 +m 2 23 +l 20 3 + +93 15 7 8 +m 9 25 +l 9 -7 +m 10 25 +l 10 -7 +m 3 25 +l 10 25 +m 3 -7 +l 10 -7 + +94 23 11 6 +m 3 7 +l 11 12 +l 19 7 +m 3 7 +l 11 11 +l 19 7 + +95 21 10 2 +m 0 -2 +l 21 -2 + +96 25 12 22 +m 3 6 +l 3 8 +l 4 11 +l 6 12 +l 8 12 +l 10 11 +l 14 8 +l 16 7 +l 18 7 +l 20 8 +l 21 10 +m 3 8 +l 4 10 +l 6 11 +l 8 11 +l 10 10 +l 14 7 +l 16 6 +l 18 6 +l 20 7 +l 21 10 +l 21 12 + +97 18 9 45 +m 6 9 +l 4 7 +l 3 5 +l 3 3 +l 4 1 +l 6 0 +l 8 2 +l 11 3 +m 3 5 +l 4 3 +l 5 2 +l 7 1 +m 4 7 +l 4 5 +l 5 3 +l 7 2 +l 8 2 +m 4 11 +l 6 11 +l 9 12 +l 11 13 +l 12 14 +l 14 12 +l 13 11 +l 13 3 +l 14 2 +l 15 2 +m 5 13 +l 4 12 +l 7 12 +m 10 12 +l 13 12 +l 12 13 +l 12 2 +l 13 1 +m 3 12 +l 5 14 +l 6 13 +l 8 12 +l 11 11 +l 11 2 +l 13 0 +l 15 2 +m 3 12 +l 8 7 + +98 19 9 37 +m 3 19 +l 4 17 +l 4 3 +l 2 2 +m 5 17 +l 4 19 +l 5 20 +l 5 3 +l 8 1 +m 3 19 +l 6 21 +l 6 3 +l 8 2 +l 9 1 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 12 2 +l 14 2 +m 6 11 +l 9 12 +l 11 13 +l 12 14 +l 13 13 +l 15 12 +l 16 12 +l 14 11 +l 14 2 +m 11 13 +l 13 12 +l 13 3 +m 9 12 +l 10 12 +l 12 11 +l 12 2 + +99 15 7 29 +m 4 12 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +m 5 12 +l 5 2 +l 7 1 +m 6 12 +l 6 3 +l 8 2 +l 9 2 +l 7 1 +l 6 0 +m 4 12 +l 8 13 +l 10 14 +l 11 13 +l 13 12 +l 14 12 +m 9 13 +l 10 12 +l 12 12 +m 6 12 +l 8 13 +l 10 11 +l 12 11 +l 14 12 + +100 18 9 34 +m 9 14 +l 7 13 +l 4 12 +l 4 3 +l 2 2 +m 5 12 +l 5 3 +l 8 1 +m 9 14 +l 6 12 +l 6 3 +l 8 2 +l 9 1 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 12 2 +l 14 2 +m 4 19 +l 7 21 +l 8 18 +l 14 12 +l 14 2 +m 7 18 +l 5 19 +l 6 20 +l 7 18 +l 13 12 +l 13 3 +m 4 19 +l 12 11 +l 12 2 + +101 15 7 26 +m 4 12 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +m 5 12 +l 5 2 +l 7 1 +m 6 12 +l 6 3 +l 8 2 +l 9 2 +l 7 1 +l 6 0 +m 4 12 +l 8 13 +l 10 14 +l 13 10 +l 11 9 +l 6 6 +m 9 13 +l 12 10 +m 6 12 +l 8 13 +l 11 9 + +102 14 7 33 +m 4 19 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +m 5 19 +l 5 2 +l 7 1 +m 6 19 +l 6 3 +l 8 2 +l 9 2 +l 7 1 +l 6 0 +m 4 19 +l 7 20 +l 9 21 +l 10 20 +l 12 19 +l 13 19 +m 8 20 +l 9 19 +l 11 19 +m 6 19 +l 7 20 +l 9 18 +l 11 18 +l 13 19 +m 1 14 +l 4 14 +m 6 14 +l 10 14 + +103 19 9 48 +m 4 12 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +l 7 1 +l 9 2 +l 12 3 +m 5 11 +l 5 2 +l 7 1 +m 6 12 +l 6 3 +l 8 2 +l 9 2 +m 4 12 +l 6 12 +l 9 13 +l 11 14 +l 12 13 +l 14 12 +l 16 12 +l 14 11 +l 14 -1 +l 13 -4 +l 11 -6 +l 9 -7 +l 8 -6 +l 6 -5 +l 4 -5 +m 10 13 +l 13 11 +l 13 -1 +m 10 -6 +l 8 -5 +l 7 -5 +m 9 13 +l 10 12 +l 12 11 +l 12 1 +l 13 -2 +l 13 -4 +m 11 -6 +l 10 -5 +l 8 -4 +l 6 -4 +l 4 -5 + +104 19 9 41 +m 3 19 +l 4 17 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +m 5 17 +l 4 19 +l 5 20 +l 5 2 +l 7 1 +m 3 19 +l 6 21 +l 6 3 +l 8 2 +l 6 0 +m 6 11 +l 9 12 +l 11 13 +l 12 14 +l 13 13 +l 15 12 +l 16 12 +l 14 11 +l 14 2 +l 12 0 +l 11 -2 +m 11 13 +l 13 12 +l 13 2 +l 12 0 +m 9 12 +l 10 12 +l 12 11 +l 12 2 +l 11 -2 +l 11 -5 +l 12 -7 +l 13 -7 +l 11 -5 + +105 11 5 30 +m 5 21 +l 3 19 +l 5 18 +l 7 19 +l 5 21 +m 5 20 +l 4 19 +l 6 19 +l 5 20 +m 5 14 +l 4 13 +l 2 12 +l 4 11 +l 4 2 +l 6 0 +l 8 2 +m 5 11 +l 6 12 +l 5 13 +l 4 12 +l 5 11 +l 5 2 +l 6 1 +m 5 14 +l 6 13 +l 8 12 +l 6 11 +l 6 3 +l 7 2 +l 8 2 + +106 11 5 34 +m 5 21 +l 3 19 +l 5 18 +l 7 19 +l 5 21 +m 5 20 +l 4 19 +l 6 19 +l 5 20 +m 5 14 +l 4 13 +l 2 12 +l 4 11 +l 4 2 +l 6 0 +l 7 -2 +m 5 11 +l 6 12 +l 5 13 +l 4 12 +l 5 11 +l 5 2 +l 6 0 +m 5 14 +l 6 13 +l 8 12 +l 6 11 +l 6 2 +l 7 -2 +l 7 -5 +l 5 -7 +l 3 -7 +l 3 -6 +l 5 -7 + +107 18 9 41 +m 3 19 +l 4 17 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +m 5 17 +l 4 19 +l 5 20 +l 5 2 +l 7 1 +m 3 19 +l 6 21 +l 6 3 +l 8 2 +l 6 0 +m 6 11 +l 9 13 +l 11 14 +l 13 11 +l 10 9 +l 6 6 +m 10 13 +l 12 11 +m 9 13 +l 11 10 +m 10 9 +l 11 8 +l 13 3 +l 14 2 +l 15 2 +m 10 8 +l 11 7 +l 12 2 +l 13 1 +m 9 8 +l 10 7 +l 11 2 +l 13 0 +l 15 2 + +108 11 5 19 +m 3 19 +l 4 17 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +m 5 17 +l 4 19 +l 5 20 +l 5 2 +l 7 1 +m 3 19 +l 6 21 +l 6 3 +l 8 2 +l 9 2 +l 7 1 +l 6 0 + +109 27 13 58 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +m 4 13 +l 5 12 +l 5 2 +l 7 1 +m 2 12 +l 4 14 +l 6 12 +l 6 3 +l 8 2 +l 6 0 +m 6 11 +l 9 12 +l 11 13 +l 12 14 +l 14 12 +l 14 3 +l 16 2 +l 14 0 +m 11 13 +l 13 12 +l 13 2 +l 15 1 +m 9 12 +l 10 12 +l 12 11 +l 12 3 +l 11 2 +l 13 1 +l 14 0 +m 14 11 +l 17 12 +l 19 13 +l 20 14 +l 21 13 +l 23 12 +l 24 12 +l 22 11 +l 22 3 +l 23 2 +l 24 2 +m 19 13 +l 21 12 +l 21 2 +l 22 1 +m 17 12 +l 18 12 +l 20 11 +l 20 2 +l 22 0 +l 24 2 + +110 19 9 39 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +m 4 13 +l 5 12 +l 5 2 +l 7 1 +m 2 12 +l 4 14 +l 6 12 +l 6 3 +l 8 2 +l 6 0 +m 6 11 +l 9 12 +l 11 13 +l 12 14 +l 13 13 +l 15 12 +l 16 12 +l 14 11 +l 14 3 +l 15 2 +l 16 2 +m 11 13 +l 13 12 +l 13 2 +l 14 1 +m 9 12 +l 10 12 +l 12 11 +l 12 2 +l 14 0 +l 16 2 + +111 19 9 33 +m 4 12 +l 4 3 +l 2 2 +m 5 11 +l 5 3 +l 8 1 +m 6 12 +l 6 3 +l 8 2 +l 9 1 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 12 2 +l 14 2 +m 4 12 +l 6 12 +l 9 13 +l 11 14 +l 12 13 +l 14 12 +l 16 12 +l 14 11 +l 14 2 +m 10 13 +l 13 11 +l 13 3 +m 9 13 +l 10 12 +l 12 11 +l 12 2 + +112 19 9 45 +m 3 14 +l 4 12 +l 4 3 +l 2 2 +l 4 2 +l 4 -7 +m 4 13 +l 5 12 +l 5 -6 +l 6 -5 +l 5 -3 +m 5 2 +l 6 2 +l 8 1 +m 3 14 +l 5 13 +l 6 12 +l 6 3 +l 8 2 +l 9 1 +m 6 1 +l 7 0 +l 9 1 +l 12 2 +l 14 2 +m 6 1 +l 6 -3 +l 7 -5 +l 4 -7 +m 6 11 +l 9 12 +l 11 13 +l 12 14 +l 13 13 +l 15 12 +l 16 12 +l 14 11 +l 14 2 +m 11 13 +l 13 12 +l 13 3 +m 9 12 +l 10 12 +l 12 11 +l 12 2 + +113 19 9 37 +m 4 12 +l 4 3 +l 2 2 +m 5 11 +l 5 2 +l 7 1 +m 6 12 +l 6 3 +l 8 2 +l 9 2 +m 2 2 +l 3 2 +l 5 1 +l 6 0 +l 7 1 +l 9 2 +l 12 3 +m 4 12 +l 6 12 +l 9 13 +l 11 14 +l 12 13 +l 14 12 +l 16 12 +l 14 11 +l 14 -7 +m 10 13 +l 13 11 +l 13 -6 +l 12 -5 +l 13 -3 +m 9 13 +l 10 12 +l 12 11 +l 12 -3 +l 11 -5 +l 14 -7 + +114 15 7 32 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +m 3 13 +l 5 12 +l 5 2 +l 7 1 +m 2 12 +l 4 14 +l 6 12 +l 6 3 +l 8 2 +l 9 2 +l 7 1 +l 6 0 +m 6 12 +l 10 14 +l 11 13 +l 13 12 +l 14 12 +m 9 13 +l 10 12 +l 12 12 +m 8 13 +l 10 11 +l 12 11 +l 14 12 + +115 17 8 47 +m 3 12 +l 3 8 +l 5 7 +l 11 7 +l 13 6 +l 13 2 +m 4 12 +l 4 8 +m 12 6 +l 12 2 +m 6 13 +l 5 12 +l 5 8 +l 7 7 +m 9 7 +l 11 6 +l 11 2 +l 10 1 +m 3 12 +l 6 13 +l 8 14 +l 10 13 +l 12 13 +l 13 14 +m 7 13 +l 9 13 +m 6 13 +l 8 12 +l 10 12 +l 12 13 +m 13 2 +l 10 1 +l 8 0 +l 6 1 +l 4 1 +l 2 0 +m 9 1 +l 7 1 +m 10 1 +l 8 2 +l 5 2 +l 2 0 +m 13 14 +l 12 12 +l 10 9 +l 5 4 +l 2 0 + +116 11 5 23 +m 3 19 +l 4 17 +l 4 3 +l 2 2 +l 3 2 +l 5 1 +l 6 0 +m 5 17 +l 4 19 +l 5 20 +l 5 2 +l 7 1 +m 3 19 +l 6 21 +l 6 3 +l 8 2 +l 9 2 +l 7 1 +l 6 0 +m 1 14 +l 4 14 +m 6 14 +l 9 14 + +117 19 9 40 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 2 2 +m 3 13 +l 5 12 +l 5 2 +l 7 1 +m 2 12 +l 4 14 +l 6 12 +l 6 3 +l 8 2 +l 9 2 +m 2 2 +l 3 2 +l 5 1 +l 6 0 +l 7 1 +l 9 2 +l 12 3 +m 12 14 +l 13 13 +l 15 12 +l 16 12 +l 14 11 +l 14 3 +l 15 2 +l 16 2 +m 11 13 +l 13 12 +l 13 2 +l 14 1 +m 12 14 +l 10 12 +l 12 11 +l 12 2 +l 14 0 +l 16 2 + +118 19 9 30 +m 3 14 +l 4 12 +l 4 3 +l 7 0 +l 9 2 +l 12 3 +l 14 3 +m 4 13 +l 5 12 +l 5 3 +l 8 1 +m 3 14 +l 5 13 +l 6 12 +l 6 4 +l 7 3 +l 9 2 +m 12 14 +l 13 13 +l 15 12 +l 16 12 +l 14 11 +l 14 3 +m 11 13 +l 13 12 +l 13 4 +m 12 14 +l 10 12 +l 12 11 +l 12 3 + +119 27 13 48 +m 3 14 +l 4 12 +l 4 3 +l 7 0 +l 9 2 +l 12 3 +m 4 13 +l 5 12 +l 5 3 +l 8 1 +m 3 14 +l 5 13 +l 6 12 +l 6 4 +l 7 3 +l 9 2 +m 12 14 +l 10 12 +l 12 11 +l 12 3 +l 15 0 +l 17 2 +l 20 3 +l 22 3 +m 11 13 +l 13 12 +l 13 3 +l 16 1 +m 12 14 +l 13 13 +l 15 12 +l 14 11 +l 14 4 +l 15 3 +l 17 2 +m 20 14 +l 21 13 +l 23 12 +l 24 12 +l 22 11 +l 22 3 +m 19 13 +l 21 12 +l 21 4 +m 20 14 +l 18 12 +l 20 11 +l 20 3 + +120 20 10 48 +m 3 12 +l 4 12 +l 6 11 +l 7 10 +l 11 2 +l 12 1 +l 14 0 +l 16 2 +m 5 13 +l 7 12 +l 12 2 +l 14 1 +m 3 12 +l 5 14 +l 7 13 +l 8 12 +l 12 4 +l 13 3 +l 15 2 +l 16 2 +m 10 8 +l 13 14 +l 14 13 +l 16 13 +l 17 14 +m 13 13 +l 14 12 +l 15 12 +m 12 12 +l 14 11 +l 16 12 +l 17 14 +m 9 6 +l 6 0 +l 5 1 +l 3 1 +l 2 0 +m 6 1 +l 5 2 +l 4 2 +m 7 2 +l 5 3 +l 3 2 +l 2 0 +m 5 7 +l 8 7 +m 11 7 +l 14 7 + +121 19 9 51 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 2 2 +m 3 13 +l 5 12 +l 5 2 +l 7 1 +m 2 12 +l 4 14 +l 6 12 +l 6 3 +l 8 2 +l 9 2 +m 2 2 +l 3 2 +l 5 1 +l 6 0 +l 7 1 +l 9 2 +l 12 3 +m 12 14 +l 13 13 +l 15 12 +l 16 12 +l 14 11 +l 14 -1 +l 13 -4 +l 11 -6 +l 9 -7 +l 8 -6 +l 6 -5 +l 4 -5 +m 11 13 +l 13 12 +l 13 -1 +m 10 -6 +l 8 -5 +l 7 -5 +m 12 14 +l 10 12 +l 12 11 +l 12 1 +l 13 -2 +l 13 -4 +m 11 -6 +l 10 -5 +l 8 -4 +l 6 -4 +l 4 -5 + +122 19 9 30 +m 15 14 +l 3 0 +m 3 12 +l 5 11 +l 8 11 +l 11 12 +l 15 14 +m 4 13 +l 6 12 +l 10 12 +m 3 12 +l 5 14 +l 7 13 +l 11 13 +l 15 14 +m 3 0 +l 7 2 +l 10 3 +l 13 3 +l 15 2 +m 8 2 +l 12 2 +l 14 1 +m 3 0 +l 7 1 +l 11 1 +l 13 0 +l 15 2 +m 5 7 +l 13 7 + +123 15 7 37 +m 9 25 +l 7 24 +l 6 23 +l 5 21 +l 5 19 +l 6 17 +l 7 16 +l 8 14 +l 8 12 +l 6 10 +m 7 24 +l 6 22 +l 6 20 +l 7 18 +l 8 17 +l 9 15 +l 9 13 +l 8 11 +l 4 9 +l 8 7 +l 9 5 +l 9 3 +l 8 1 +l 7 0 +l 6 -2 +l 6 -4 +l 7 -6 +m 6 8 +l 8 6 +l 8 4 +l 7 2 +l 6 1 +l 5 -1 +l 5 -3 +l 6 -5 +l 7 -6 +l 9 -7 + +124 9 4 2 +m 4 25 +l 4 -7 + +125 15 7 37 +m 5 25 +l 7 24 +l 8 23 +l 9 21 +l 9 19 +l 8 17 +l 7 16 +l 6 14 +l 6 12 +l 8 10 +m 7 24 +l 8 22 +l 8 20 +l 7 18 +l 6 17 +l 5 15 +l 5 13 +l 6 11 +l 10 9 +l 6 7 +l 5 5 +l 5 3 +l 6 1 +l 7 0 +l 8 -2 +l 8 -4 +l 7 -6 +m 8 8 +l 6 6 +l 6 4 +l 7 2 +l 8 1 +l 9 -1 +l 9 -3 +l 8 -5 +l 7 -6 +l 5 -7 diff --git a/cd/etc/vectorfont11.txt b/cd/etc/vectorfont11.txt new file mode 100755 index 0000000..14e0f1e --- /dev/null +++ b/cd/etc/vectorfont11.txt @@ -0,0 +1,4170 @@ +Gothic german I +25 21 10 -7 + + +32 21 10 0 + +33 13 6 25 +m 6 21 +l 5 20 +l 3 19 +l 5 18 +l 6 7 +m 6 18 +l 7 19 +l 6 20 +l 5 19 +l 6 18 +l 6 7 +m 6 21 +l 7 20 +l 9 19 +l 7 18 +l 6 7 +m 6 3 +l 4 1 +l 6 0 +l 8 1 +l 6 3 +m 6 2 +l 5 1 +l 7 1 +l 6 2 + +34 19 9 16 +m 5 21 +l 4 20 +l 4 14 +m 5 20 +l 4 14 +m 5 21 +l 6 20 +l 4 14 +m 14 21 +l 13 20 +l 13 14 +m 14 20 +l 13 14 +m 14 21 +l 15 20 +l 13 14 + +35 22 11 8 +m 11 21 +l 4 -7 +m 17 21 +l 10 -7 +m 4 10 +l 18 10 +m 3 4 +l 17 4 + +36 21 10 53 +m 8 25 +l 8 -4 +m 12 25 +l 12 -4 +m 12 21 +l 14 20 +l 15 18 +l 15 16 +l 17 17 +l 16 19 +l 15 20 +l 12 21 +l 8 21 +l 5 20 +l 3 18 +l 3 15 +l 4 13 +l 7 11 +l 13 9 +l 15 8 +l 16 6 +l 16 3 +l 15 1 +m 16 17 +l 15 19 +m 4 15 +l 5 13 +l 7 12 +l 13 10 +l 15 9 +l 16 7 +m 5 2 +l 4 4 +m 5 20 +l 4 18 +l 4 16 +l 5 14 +l 7 13 +l 13 11 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 +l 5 5 +l 5 3 +l 6 1 +l 8 0 + +37 25 12 29 +m 21 21 +l 3 0 +m 8 21 +l 10 19 +l 10 17 +l 9 15 +l 7 14 +l 5 14 +l 3 16 +l 3 18 +l 4 20 +l 6 21 +l 8 21 +l 10 20 +l 13 19 +l 16 19 +l 19 20 +l 21 21 +m 17 7 +l 15 6 +l 14 4 +l 14 2 +l 16 0 +l 18 0 +l 20 1 +l 21 3 +l 21 5 +l 19 7 +l 17 7 + +38 27 13 50 +m 20 13 +l 21 12 +l 22 12 +l 23 13 +m 19 12 +l 20 11 +l 22 11 +m 19 11 +l 20 10 +l 21 10 +l 22 11 +l 23 13 +m 20 13 +l 14 7 +m 13 6 +l 7 0 +l 3 5 +l 9 11 +m 10 12 +l 14 16 +l 10 21 +l 5 15 +l 11 9 +l 15 3 +l 17 1 +l 19 0 +l 21 0 +l 22 1 +l 23 3 +m 7 1 +l 4 5 +m 13 16 +l 10 20 +m 6 15 +l 11 10 +l 15 4 +l 17 2 +l 19 1 +l 22 1 +m 8 1 +l 4 6 +m 13 15 +l 9 20 +m 6 16 +l 12 10 +l 16 4 +l 17 3 +l 19 2 +l 22 2 +l 23 3 + +39 10 5 8 +m 5 21 +l 4 20 +l 4 14 +m 5 20 +l 4 14 +m 5 21 +l 6 20 +l 4 14 + +40 15 7 24 +m 10 25 +l 8 23 +l 6 20 +l 4 16 +l 3 11 +l 3 7 +l 4 2 +l 6 -2 +l 8 -5 +l 10 -7 +m 6 19 +l 5 16 +l 4 12 +l 4 6 +l 5 2 +l 6 -1 +m 8 23 +l 7 21 +l 6 18 +l 5 12 +l 5 6 +l 6 0 +l 7 -3 +l 8 -5 + +41 15 7 24 +m 4 25 +l 6 23 +l 8 20 +l 10 16 +l 11 11 +l 11 7 +l 10 2 +l 8 -2 +l 6 -5 +l 4 -7 +m 8 19 +l 9 16 +l 10 12 +l 10 6 +l 9 2 +l 8 -1 +m 6 23 +l 7 21 +l 8 18 +l 9 12 +l 9 6 +l 8 0 +l 7 -3 +l 6 -5 + +42 17 8 30 +m 8 21 +l 7 20 +l 9 10 +l 8 9 +m 8 21 +l 8 9 +m 8 21 +l 9 20 +l 7 10 +l 8 9 +m 3 18 +l 4 18 +l 12 12 +l 13 12 +m 3 18 +l 13 12 +m 3 18 +l 3 17 +l 13 13 +l 13 12 +m 13 18 +l 12 18 +l 4 12 +l 3 12 +m 13 18 +l 3 12 +m 13 18 +l 13 17 +l 3 13 +l 3 12 + +43 26 13 12 +m 12 18 +l 12 1 +l 13 1 +m 12 18 +l 13 18 +l 13 1 +m 4 10 +l 21 10 +l 21 9 +m 4 10 +l 4 9 +l 21 9 + +44 13 6 12 +m 6 -3 +l 6 -1 +l 4 1 +l 6 3 +l 7 1 +l 7 -1 +l 6 -3 +l 4 -4 +m 6 2 +l 5 1 +l 6 0 +l 6 2 + +45 26 13 6 +m 4 10 +l 21 10 +l 21 9 +m 4 10 +l 4 9 +l 21 9 + +46 13 6 9 +m 6 3 +l 4 1 +l 6 0 +l 8 1 +l 6 3 +m 6 2 +l 5 1 +l 7 1 +l 6 2 + +47 24 12 6 +m 20 25 +l 2 -7 +l 3 -7 +m 20 25 +l 21 25 +l 3 -7 + +48 21 10 34 +m 4 19 +l 4 3 +l 2 2 +m 5 18 +l 5 3 +l 8 1 +m 6 19 +l 6 3 +l 8 2 +l 9 1 +m 4 19 +l 6 19 +l 11 20 +l 13 21 +m 11 20 +l 12 19 +l 14 18 +l 14 2 +m 12 20 +l 15 18 +l 15 3 +m 13 21 +l 14 20 +l 16 19 +l 18 19 +l 16 18 +l 16 2 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 14 2 +l 16 2 + +49 21 10 23 +m 7 19 +l 8 18 +l 9 16 +l 9 3 +l 7 2 +m 9 18 +l 8 19 +l 9 20 +l 10 18 +l 10 2 +l 12 1 +m 7 19 +l 10 21 +l 11 19 +l 11 3 +l 13 2 +l 14 2 +m 7 2 +l 8 2 +l 10 1 +l 11 0 +l 12 1 +l 14 2 + +50 21 10 39 +m 4 19 +l 6 19 +l 8 20 +l 9 21 +l 11 20 +l 14 19 +l 16 19 +m 8 19 +l 10 20 +m 4 19 +l 6 18 +l 8 18 +l 10 19 +l 11 20 +m 14 19 +l 14 11 +m 15 18 +l 15 12 +m 16 19 +l 16 11 +l 9 11 +l 6 10 +l 4 8 +l 3 5 +l 3 0 +m 3 0 +l 7 2 +l 11 3 +l 14 3 +l 18 2 +m 6 1 +l 9 2 +l 14 2 +l 17 1 +m 3 0 +l 8 1 +l 13 1 +l 16 0 +l 18 2 + +51 21 10 45 +m 4 19 +l 5 19 +l 7 20 +l 8 21 +l 10 20 +l 14 19 +l 16 19 +m 7 19 +l 9 20 +m 4 19 +l 6 18 +l 8 18 +l 10 20 +m 14 19 +l 14 12 +m 15 18 +l 15 13 +m 16 19 +l 16 12 +l 14 12 +l 11 11 +l 9 10 +m 9 11 +l 11 10 +l 14 9 +l 16 9 +l 16 2 +m 15 8 +l 15 3 +m 14 9 +l 14 2 +m 3 2 +l 5 3 +l 7 3 +l 9 2 +l 10 1 +m 7 2 +l 9 1 +m 3 2 +l 5 2 +l 7 1 +l 8 0 +l 10 1 +l 14 2 +l 16 2 + +52 21 10 33 +m 13 21 +l 3 11 +l 3 6 +l 12 6 +m 14 6 +l 18 6 +l 19 5 +l 19 7 +l 18 6 +m 4 11 +l 4 7 +m 5 13 +l 5 6 +m 12 20 +l 12 3 +l 10 2 +m 13 17 +l 14 19 +l 13 20 +l 13 2 +l 15 1 +m 13 21 +l 15 19 +l 14 17 +l 14 3 +l 16 2 +l 17 2 +m 10 2 +l 11 2 +l 13 1 +l 14 0 +l 15 1 +l 17 2 + +53 21 10 42 +m 4 21 +l 4 12 +m 4 21 +l 16 21 +m 5 20 +l 14 20 +m 4 19 +l 13 19 +l 15 20 +l 16 21 +m 14 15 +l 13 14 +l 11 13 +l 7 12 +l 4 12 +m 11 13 +l 12 13 +l 14 12 +l 14 2 +m 13 14 +l 15 13 +l 15 3 +m 14 15 +l 15 14 +l 17 13 +l 18 13 +l 16 12 +l 16 2 +m 3 2 +l 5 3 +l 7 3 +l 9 2 +l 10 1 +m 7 2 +l 9 1 +m 3 2 +l 5 2 +l 7 1 +l 8 0 +l 10 1 +l 14 2 +l 16 2 + +54 21 10 48 +m 4 19 +l 4 3 +l 2 2 +m 5 18 +l 5 3 +l 8 1 +m 6 19 +l 6 3 +l 8 2 +l 9 1 +m 4 19 +l 6 19 +l 10 20 +l 12 21 +l 13 20 +l 15 19 +l 16 19 +m 11 20 +l 13 19 +m 10 20 +l 12 18 +l 14 18 +l 16 19 +m 6 11 +l 7 11 +l 11 12 +l 13 13 +l 14 14 +m 11 12 +l 12 12 +l 14 11 +l 14 2 +m 13 13 +l 15 11 +l 15 3 +m 14 14 +l 15 13 +l 17 12 +l 18 12 +l 16 11 +l 16 2 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 14 2 +l 16 2 + +55 21 10 32 +m 3 19 +l 5 21 +l 8 20 +l 13 20 +l 18 21 +m 4 20 +l 7 19 +l 12 19 +l 15 20 +m 3 19 +l 7 18 +l 10 18 +l 14 19 +l 18 21 +m 18 21 +l 17 19 +l 15 16 +l 11 12 +l 9 9 +l 8 6 +l 8 3 +l 9 0 +m 10 10 +l 9 7 +l 9 4 +l 10 1 +m 13 14 +l 11 11 +l 10 8 +l 10 5 +l 11 2 +l 9 0 + +56 21 10 55 +m 4 18 +l 4 12 +m 5 17 +l 5 13 +m 6 18 +l 6 12 +m 4 18 +l 6 18 +l 11 19 +l 13 20 +l 14 21 +m 11 19 +l 12 19 +l 14 18 +l 14 12 +m 13 20 +l 15 19 +l 15 13 +m 14 21 +l 15 20 +l 17 19 +l 18 19 +l 16 18 +l 16 12 +m 4 12 +l 6 12 +l 14 9 +l 16 9 +m 16 12 +l 14 12 +l 6 9 +l 4 9 +m 4 9 +l 4 3 +l 2 2 +m 5 8 +l 5 3 +l 8 1 +m 6 9 +l 6 3 +l 8 2 +l 9 1 +m 14 9 +l 14 2 +m 15 8 +l 15 3 +m 16 9 +l 16 2 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 14 2 +l 16 2 + +57 21 10 49 +m 4 19 +l 4 10 +l 2 9 +m 5 18 +l 5 9 +l 7 8 +m 6 19 +l 6 10 +l 8 9 +l 9 9 +m 4 19 +l 6 19 +l 11 20 +l 13 21 +m 11 20 +l 12 19 +l 14 18 +l 14 2 +m 12 20 +l 15 18 +l 15 3 +m 13 21 +l 14 20 +l 16 19 +l 18 19 +l 16 18 +l 16 2 +m 2 9 +l 3 9 +l 5 8 +l 6 7 +l 7 8 +l 9 9 +l 13 10 +l 14 10 +m 3 2 +l 5 3 +l 7 3 +l 9 2 +l 10 1 +m 7 2 +l 9 1 +m 3 2 +l 5 2 +l 7 1 +l 8 0 +l 10 1 +l 14 2 +l 16 2 + +58 13 6 18 +m 6 14 +l 4 12 +l 6 11 +l 8 12 +l 6 14 +m 6 13 +l 5 12 +l 7 12 +l 6 13 +m 6 3 +l 4 1 +l 6 0 +l 8 1 +l 6 3 +m 6 2 +l 5 1 +l 7 1 +l 6 2 + +59 13 6 21 +m 6 14 +l 4 12 +l 6 11 +l 8 12 +l 6 14 +m 6 13 +l 5 12 +l 7 12 +l 6 13 +m 6 -3 +l 6 -1 +l 4 1 +l 6 3 +l 7 1 +l 7 -1 +l 6 -3 +l 4 -4 +m 6 2 +l 5 1 +l 6 0 +l 6 2 + +60 25 12 3 +m 20 18 +l 4 9 +l 20 0 + +61 26 13 12 +m 4 14 +l 21 14 +l 21 13 +m 4 14 +l 4 13 +l 21 13 +m 4 6 +l 21 6 +l 21 5 +m 4 6 +l 4 5 +l 21 5 + +62 25 12 3 +m 4 18 +l 20 9 +l 4 0 + +63 19 9 43 +m 3 17 +l 4 19 +l 5 20 +l 8 21 +l 10 21 +l 13 20 +l 14 19 +l 15 17 +l 15 15 +l 14 13 +l 12 11 +l 10 10 +m 4 17 +l 5 19 +m 13 19 +l 14 18 +l 14 14 +l 13 13 +m 3 17 +l 5 16 +l 5 18 +l 6 20 +l 8 21 +m 10 21 +l 12 20 +l 13 18 +l 13 14 +l 12 12 +l 10 10 +m 9 10 +l 9 7 +l 10 10 +l 8 10 +l 9 7 +m 9 3 +l 7 1 +l 9 0 +l 11 1 +l 9 3 +m 9 2 +l 8 1 +l 10 1 +l 9 2 + +64 28 14 52 +m 18 13 +l 17 15 +l 15 16 +l 12 16 +l 10 15 +l 9 14 +l 8 11 +l 8 8 +l 9 6 +l 11 5 +l 14 5 +l 16 6 +l 17 8 +m 12 16 +l 10 14 +l 9 11 +l 9 8 +l 10 6 +l 11 5 +m 18 16 +l 17 8 +l 17 6 +l 19 5 +l 21 5 +l 23 7 +l 24 10 +l 24 12 +l 23 15 +l 22 17 +l 20 19 +l 18 20 +l 15 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 15 0 +l 18 1 +l 20 2 +l 21 3 +m 19 16 +l 18 8 +l 18 6 +l 19 5 + +65 25 12 53 +m 3 19 +l 4 18 +l 3 17 +l 2 18 +l 3 20 +l 5 21 +l 7 21 +l 9 20 +l 10 19 +l 11 16 +l 11 12 +l 10 9 +l 8 7 +l 6 6 +l 3 5 +m 9 19 +l 10 16 +l 10 11 +l 9 9 +m 7 21 +l 8 20 +l 9 17 +l 9 11 +l 8 8 +l 6 6 +m 6 5 +l 9 2 +m 5 5 +l 9 1 +m 3 5 +l 8 0 +l 15 5 +m 22 20 +l 21 19 +l 22 19 +l 22 20 +l 21 21 +l 19 21 +l 17 20 +l 16 19 +l 15 17 +l 15 2 +l 17 0 +l 21 4 +m 17 19 +l 16 17 +l 16 3 +l 18 1 +m 19 21 +l 18 20 +l 17 17 +l 17 4 +l 19 2 + +66 27 13 87 +m 2 10 +l 2 9 +l 3 8 +l 5 8 +l 7 9 +l 7 12 +l 6 14 +l 4 17 +l 4 19 +l 6 21 +m 6 12 +l 4 16 +m 5 8 +l 6 9 +l 6 11 +l 4 14 +l 3 16 +l 3 18 +l 4 20 +l 6 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 9 +l 12 6 +l 10 4 +m 11 19 +l 12 17 +l 12 7 +m 9 21 +l 10 20 +l 11 17 +l 11 6 +l 10 4 +m 13 18 +l 14 20 +l 16 21 +l 18 21 +l 20 20 +l 21 19 +l 22 17 +l 23 16 +m 20 19 +l 21 17 +m 18 21 +l 19 20 +l 20 17 +l 21 16 +l 23 16 +m 23 16 +l 13 11 +m 20 14 +l 22 12 +l 23 9 +l 23 6 +l 22 3 +l 20 1 +l 17 0 +l 14 0 +l 11 1 +l 5 4 +l 4 4 +l 3 3 +m 19 13 +l 20 13 +l 22 11 +m 17 13 +l 20 12 +l 22 10 +l 23 8 +m 15 1 +l 13 1 +l 7 4 +l 6 4 +m 21 2 +l 19 1 +l 16 1 +l 13 2 +l 9 4 +l 6 5 +l 4 5 +l 3 3 +l 3 1 +l 4 0 +l 5 1 +l 4 2 + +67 25 12 70 +m 12 19 +l 10 21 +l 8 21 +l 6 20 +l 4 17 +l 3 13 +l 3 9 +l 4 5 +l 6 2 +l 8 1 +l 11 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +m 6 19 +l 5 17 +l 4 14 +l 4 9 +l 5 5 +l 7 2 +l 10 1 +m 8 21 +l 7 20 +l 6 18 +l 5 14 +l 5 10 +l 6 6 +l 7 4 +l 9 2 +l 12 1 +l 15 1 +l 18 2 +l 21 4 +m 15 21 +l 12 19 +l 11 18 +l 10 16 +l 10 15 +l 11 13 +l 14 11 +l 15 9 +l 15 7 +m 11 16 +l 11 15 +l 15 11 +l 15 10 +m 11 18 +l 11 17 +l 12 15 +l 15 13 +l 16 11 +l 16 9 +l 15 7 +l 13 6 +l 12 6 +l 10 7 +l 9 9 +m 15 21 +l 16 20 +l 18 19 +l 20 19 +m 15 20 +l 16 19 +l 17 19 +m 14 20 +l 16 18 +l 18 18 +l 20 19 +l 21 20 + +68 27 13 71 +m 3 15 +l 3 16 +l 4 18 +l 6 20 +l 9 21 +l 13 21 +l 16 20 +l 18 19 +l 20 17 +l 22 14 +l 23 10 +l 23 6 +l 22 3 +l 20 1 +l 17 0 +l 14 0 +l 11 1 +l 5 4 +l 4 4 +l 3 3 +m 6 19 +l 8 20 +l 13 20 +l 16 19 +l 18 18 +l 20 16 +l 22 13 +m 15 1 +l 13 1 +l 7 4 +l 6 4 +m 3 16 +l 5 18 +l 8 19 +l 13 19 +l 16 18 +l 18 17 +l 20 15 +l 22 12 +l 23 9 +m 21 2 +l 19 1 +l 16 1 +l 13 2 +l 9 4 +l 6 5 +l 4 5 +l 3 3 +l 3 1 +l 4 0 +l 5 1 +l 4 2 +m 11 19 +l 8 16 +l 7 14 +l 7 12 +l 9 8 +l 9 6 +m 8 13 +l 8 12 +l 9 10 +l 9 9 +m 8 16 +l 8 14 +l 10 10 +l 10 8 +l 9 6 +l 8 5 +l 6 5 +l 5 6 +l 5 7 + +69 25 12 82 +m 12 19 +l 10 21 +l 8 21 +l 6 20 +l 4 17 +l 3 13 +l 3 9 +l 4 5 +l 6 2 +l 8 1 +l 11 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +m 6 19 +l 5 17 +l 4 14 +l 4 9 +l 5 5 +l 7 2 +l 10 1 +m 8 21 +l 7 20 +l 6 18 +l 5 14 +l 5 10 +l 6 6 +l 7 4 +l 9 2 +l 12 1 +l 15 1 +l 18 2 +l 21 4 +m 15 21 +l 12 19 +l 11 18 +l 10 16 +l 10 15 +l 11 13 +l 14 11 +l 15 9 +l 15 7 +m 11 16 +l 11 15 +l 15 11 +l 15 10 +m 11 18 +l 11 17 +l 12 15 +l 15 13 +l 16 11 +l 16 9 +l 15 7 +l 13 6 +l 12 6 +l 10 7 +l 9 9 +m 15 21 +l 16 20 +l 18 19 +l 20 19 +m 15 20 +l 16 19 +l 17 19 +m 14 20 +l 16 18 +l 18 18 +l 20 19 +l 21 20 +m 15 13 +l 19 16 +m 19 16 +l 20 15 +l 22 15 +m 18 15 +l 19 14 +l 20 14 +m 17 14 +l 18 13 +l 20 13 +l 22 15 + +70 25 12 82 +m 7 13 +l 5 14 +l 4 16 +l 4 18 +l 5 20 +l 8 21 +l 11 21 +l 14 20 +l 18 18 +m 5 19 +l 7 20 +l 12 20 +l 15 19 +m 4 16 +l 5 18 +l 7 19 +l 12 19 +l 18 18 +l 20 18 +l 21 19 +l 21 20 +l 20 21 +l 19 21 +m 13 19 +l 12 18 +l 11 16 +l 11 14 +l 12 12 +l 16 8 +l 17 5 +l 17 2 +l 16 -1 +l 15 -2 +l 13 -3 +m 14 11 +l 17 8 +l 18 5 +l 18 2 +l 17 0 +m 11 14 +l 13 12 +l 16 10 +l 18 8 +l 19 5 +l 19 2 +l 18 0 +l 16 -2 +l 13 -3 +l 9 -3 +l 6 -2 +l 5 -1 +l 4 1 +l 4 4 +l 6 7 +l 6 9 +l 5 10 +m 6 -1 +l 5 0 +l 5 4 +l 6 6 +m 9 -3 +l 7 -2 +l 6 0 +l 6 4 +l 7 7 +l 7 9 +l 6 10 +l 4 10 +l 3 9 +l 3 8 +m 15 11 +l 19 15 +m 19 15 +l 20 14 +l 22 14 +m 18 14 +l 19 13 +l 20 13 +m 17 13 +l 18 12 +l 20 12 +l 22 14 + +71 27 13 87 +m 16 17 +l 15 19 +l 14 20 +l 12 21 +l 9 21 +l 6 20 +l 4 17 +l 3 13 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 15 0 +l 18 1 +l 20 2 +l 22 4 +l 23 7 +l 23 10 +l 22 13 +l 20 15 +m 6 19 +l 5 17 +l 4 14 +l 4 9 +l 5 6 +l 6 4 +m 21 4 +l 22 6 +l 22 10 +l 21 13 +l 20 14 +m 9 21 +l 7 20 +l 6 18 +l 5 14 +l 5 9 +l 6 5 +l 7 3 +l 9 1 +m 18 1 +l 20 3 +l 21 6 +l 21 10 +l 20 12 +l 18 14 +m 16 21 +l 13 19 +l 11 17 +l 10 15 +l 10 14 +l 11 12 +l 14 10 +l 15 8 +l 15 6 +m 11 15 +l 11 14 +l 15 10 +l 15 9 +m 11 17 +l 11 16 +l 12 14 +l 15 12 +l 16 10 +l 16 8 +l 15 6 +l 13 5 +l 12 5 +l 10 6 +l 9 8 +m 15 12 +l 20 15 +l 21 17 +m 23 21 +l 21 17 +m 20 20 +l 24 18 +m 23 21 +l 22 20 +l 20 20 +l 21 19 +l 21 17 +l 22 18 +l 24 18 +l 23 19 +l 23 21 + +72 26 13 79 +m 12 21 +l 10 20 +l 8 18 +l 7 16 +l 7 14 +l 8 12 +l 10 10 +l 11 8 +l 11 6 +m 8 15 +l 8 14 +l 11 10 +l 11 9 +m 8 18 +l 8 16 +l 9 14 +l 11 12 +l 12 10 +l 12 8 +l 11 6 +l 10 5 +l 8 4 +l 6 4 +l 4 5 +l 3 6 +l 2 8 +l 2 10 +l 3 11 +l 4 10 +l 3 9 +m 12 21 +l 14 19 +l 16 19 +l 18 20 +m 11 20 +l 13 19 +m 10 20 +l 11 19 +l 13 18 +l 15 18 +l 18 20 +m 12 11 +l 19 16 +m 19 16 +l 21 13 +l 22 10 +l 22 7 +l 21 4 +l 19 2 +l 16 1 +l 12 0 +m 18 15 +l 20 13 +l 21 10 +l 21 6 +l 20 4 +m 16 14 +l 17 14 +l 19 12 +l 20 9 +l 20 5 +l 19 3 +l 18 2 +l 16 1 +m 16 1 +l 14 1 +l 12 2 +l 10 2 +l 8 1 +l 7 -1 +l 8 -3 +l 10 -4 +l 12 -4 +l 14 -3 +m 13 1 +l 11 1 +m 12 0 +l 10 1 +l 8 1 + +73 26 13 75 +m 10 11 +l 8 11 +l 6 12 +l 5 13 +l 4 15 +l 4 17 +l 5 19 +l 6 20 +l 9 21 +l 11 21 +l 14 20 +l 17 17 +l 19 16 +m 6 19 +l 8 20 +l 12 20 +l 14 19 +l 15 18 +m 4 17 +l 5 18 +l 7 19 +l 11 19 +l 14 18 +l 16 17 +l 19 16 +l 21 16 +l 22 17 +l 22 19 +l 21 20 +l 19 20 +m 4 3 +l 5 2 +l 4 1 +l 3 2 +l 3 4 +l 4 5 +l 6 5 +l 8 4 +l 10 2 +l 12 -1 +l 14 -3 +m 8 3 +l 9 2 +l 11 -1 +l 12 -2 +m 6 5 +l 7 4 +l 8 2 +l 10 -1 +l 11 -2 +l 13 -3 +l 16 -3 +l 18 -2 +l 19 -1 +l 20 1 +l 20 4 +l 19 6 +l 17 9 +l 16 11 +l 16 12 +m 19 3 +l 19 4 +l 16 9 +l 16 10 +m 18 -2 +l 19 0 +l 19 2 +l 18 4 +l 16 7 +l 15 9 +l 15 11 +l 17 13 +l 19 13 +l 20 12 +l 20 11 + +74 26 13 75 +m 10 11 +l 8 11 +l 6 12 +l 5 13 +l 4 15 +l 4 17 +l 5 19 +l 6 20 +l 9 21 +l 11 21 +l 14 20 +l 17 17 +l 19 16 +m 6 19 +l 8 20 +l 12 20 +l 14 19 +l 15 18 +m 4 17 +l 5 18 +l 7 19 +l 11 19 +l 14 18 +l 16 17 +l 19 16 +l 21 16 +l 22 17 +l 22 19 +l 21 20 +l 19 20 +m 4 3 +l 5 2 +l 4 1 +l 3 2 +l 3 4 +l 4 5 +l 6 5 +l 8 4 +l 10 2 +l 12 -1 +l 14 -3 +m 8 3 +l 9 2 +l 11 -1 +l 12 -2 +m 6 5 +l 7 4 +l 8 2 +l 10 -1 +l 11 -2 +l 13 -3 +l 16 -3 +l 18 -2 +l 19 -1 +l 20 1 +l 20 4 +l 19 6 +l 17 9 +l 16 11 +l 16 12 +m 19 3 +l 19 4 +l 16 9 +l 16 10 +m 18 -2 +l 19 0 +l 19 2 +l 18 4 +l 16 7 +l 15 9 +l 15 11 +l 17 13 +l 19 13 +l 20 12 +l 20 11 + +75 27 13 68 +m 22 16 +l 21 18 +l 19 20 +l 16 21 +l 13 21 +l 10 20 +l 8 18 +l 7 16 +l 7 13 +l 8 10 +l 11 4 +l 11 2 +l 9 0 +m 8 13 +l 8 12 +l 11 6 +l 11 5 +m 9 19 +l 8 17 +l 8 14 +l 9 12 +l 11 8 +l 12 5 +l 12 3 +l 11 1 +l 9 0 +l 7 0 +l 5 1 +m 3 5 +l 5 1 +m 2 2 +l 6 4 +m 3 5 +l 3 3 +l 2 2 +l 4 2 +l 5 1 +l 5 3 +l 6 4 +l 4 4 +l 3 5 +m 9 12 +l 9 14 +l 10 16 +l 12 17 +l 15 17 +l 17 16 +l 19 14 +l 20 14 +m 16 16 +l 18 14 +m 13 17 +l 15 16 +l 16 15 +l 17 13 +m 20 14 +l 11 10 +m 16 12 +l 20 3 +l 21 2 +l 22 2 +m 15 11 +l 19 3 +l 21 1 +m 14 11 +l 18 2 +l 20 0 +l 23 3 + +76 24 12 65 +m 19 8 +l 18 7 +l 15 7 +l 14 8 +l 14 10 +l 15 12 +l 17 15 +l 18 17 +l 18 19 +m 15 10 +l 15 11 +l 18 15 +l 18 16 +m 16 7 +l 15 8 +l 15 9 +l 16 11 +l 18 13 +l 19 15 +l 19 17 +l 18 19 +l 17 20 +l 14 21 +l 9 21 +l 6 20 +l 5 19 +l 4 17 +l 4 15 +l 5 13 +l 7 10 +l 8 8 +l 8 7 +l 7 5 +m 5 16 +l 5 15 +l 8 10 +l 8 9 +m 5 19 +l 5 17 +l 6 15 +l 8 12 +l 9 10 +l 9 8 +l 8 6 +l 6 4 +l 3 2 +m 6 4 +l 8 4 +l 11 2 +l 14 1 +l 17 1 +l 19 2 +m 7 3 +l 8 3 +l 12 1 +l 13 1 +m 3 2 +l 5 3 +l 6 3 +l 10 1 +l 13 0 +l 15 0 +l 18 1 +l 19 2 +l 20 4 + +77 33 16 112 +m 3 10 +l 3 9 +l 4 8 +l 6 8 +l 8 9 +l 8 12 +l 7 14 +l 5 17 +l 5 19 +l 7 21 +m 7 12 +l 5 16 +m 6 8 +l 7 9 +l 7 11 +l 5 14 +l 4 16 +l 4 18 +l 5 20 +l 7 21 +l 9 21 +l 11 20 +l 13 18 +l 14 15 +l 14 9 +l 13 6 +l 12 4 +l 10 2 +l 7 0 +l 6 1 +l 5 1 +m 12 18 +l 13 15 +l 13 9 +l 12 6 +l 11 4 +m 8 1 +l 7 2 +l 6 2 +m 9 21 +l 11 19 +l 12 16 +l 12 9 +l 11 5 +l 10 3 +l 9 2 +l 8 3 +l 7 3 +l 4 0 +m 12 20 +l 14 21 +l 16 21 +l 18 20 +l 20 18 +l 21 15 +l 21 9 +l 20 6 +l 19 4 +l 17 2 +l 15 0 +l 14 1 +l 13 1 +m 19 18 +l 20 15 +l 20 9 +l 19 5 +m 16 1 +l 15 2 +l 14 2 +m 16 21 +l 18 19 +l 19 16 +l 19 8 +l 18 4 +l 17 2 +l 16 3 +l 15 3 +l 12 0 +m 19 19 +l 20 20 +l 22 21 +l 24 21 +l 26 20 +l 27 19 +l 28 17 +l 29 16 +m 26 19 +l 27 17 +m 24 21 +l 25 20 +l 26 17 +l 27 16 +l 29 16 +m 29 16 +l 26 14 +l 25 13 +l 24 10 +l 24 7 +l 25 3 +l 27 0 +l 30 3 +m 26 13 +l 25 11 +l 25 7 +l 26 4 +l 28 1 +m 29 16 +l 27 14 +l 26 12 +l 26 8 +l 27 4 +l 29 2 + +78 29 14 84 +m 3 10 +l 3 9 +l 4 8 +l 6 8 +l 8 9 +l 8 12 +l 7 14 +l 5 17 +l 5 19 +l 7 21 +m 7 12 +l 5 16 +m 6 8 +l 7 9 +l 7 11 +l 5 14 +l 4 16 +l 4 18 +l 5 20 +l 7 21 +l 10 21 +l 12 20 +l 14 18 +l 15 15 +l 15 9 +l 14 6 +l 13 4 +l 11 2 +l 8 0 +l 7 1 +l 5 1 +l 3 0 +m 13 18 +l 14 16 +l 14 9 +l 13 6 +l 12 4 +l 11 3 +m 9 1 +l 7 2 +l 5 2 +m 10 21 +l 12 19 +l 13 16 +l 13 9 +l 12 5 +l 10 2 +l 8 3 +l 6 3 +l 3 0 +m 14 19 +l 15 20 +l 17 21 +l 19 21 +l 21 20 +l 22 19 +l 23 17 +l 24 16 +m 21 19 +l 22 17 +m 19 21 +l 20 20 +l 21 17 +l 22 16 +l 24 16 +m 24 16 +l 21 14 +l 20 13 +l 19 10 +l 19 7 +l 20 3 +l 22 0 +l 25 3 +m 21 13 +l 20 11 +l 20 7 +l 21 4 +l 23 1 +m 24 16 +l 22 14 +l 21 12 +l 21 8 +l 22 4 +l 24 2 + +79 29 14 64 +m 12 21 +l 10 20 +l 8 18 +l 7 16 +l 7 14 +l 9 10 +l 9 8 +m 8 15 +l 8 14 +l 9 12 +l 9 11 +m 8 18 +l 8 16 +l 10 12 +l 10 10 +l 9 8 +l 8 7 +l 6 7 +l 5 8 +l 5 9 +m 12 21 +l 13 20 +l 19 18 +l 22 16 +l 23 14 +l 24 11 +l 24 8 +l 23 5 +l 22 3 +l 20 1 +l 17 0 +l 14 0 +l 11 1 +l 5 4 +l 4 4 +l 3 3 +m 12 20 +l 13 19 +l 19 17 +l 21 16 +l 22 15 +m 12 21 +l 12 19 +l 13 18 +l 19 16 +l 21 15 +l 23 13 +l 24 11 +m 15 1 +l 13 1 +l 7 4 +l 6 4 +m 21 2 +l 19 1 +l 16 1 +l 13 2 +l 9 4 +l 6 5 +l 4 5 +l 3 3 +l 3 1 +l 4 0 +l 5 1 +l 4 2 + +80 28 14 84 +m 3 10 +l 3 9 +l 4 8 +l 6 8 +l 8 9 +l 8 12 +l 7 14 +l 5 17 +l 5 19 +l 7 21 +m 7 12 +l 5 16 +m 6 8 +l 7 9 +l 7 11 +l 5 14 +l 4 16 +l 4 18 +l 5 20 +l 7 21 +l 10 21 +l 12 20 +l 13 19 +l 14 17 +l 14 6 +m 14 4 +l 14 -1 +l 13 -3 +l 11 -4 +l 8 -4 +l 7 -3 +l 7 -1 +l 8 0 +l 9 -1 +l 8 -2 +m 12 19 +l 13 17 +l 13 -1 +l 12 -3 +m 10 21 +l 11 20 +l 12 17 +l 12 6 +m 12 4 +l 12 -1 +l 11 -3 +l 10 -4 +m 14 17 +l 19 21 +m 19 21 +l 21 18 +l 22 16 +l 23 12 +l 23 9 +l 22 6 +l 20 3 +l 17 0 +m 18 20 +l 21 16 +l 22 13 +l 22 12 +m 17 19 +l 19 17 +l 21 14 +l 22 11 +l 22 8 +l 21 5 +l 20 3 +m 18 2 +l 16 5 +l 14 6 +m 12 6 +l 10 5 +l 8 3 +m 18 1 +l 16 4 +l 14 5 +l 11 5 +m 17 0 +l 15 3 +l 14 4 +m 12 4 +l 10 4 +l 8 3 + +81 29 14 76 +m 12 21 +l 10 20 +l 8 18 +l 7 16 +l 7 14 +l 9 10 +l 9 8 +m 8 15 +l 8 14 +l 9 12 +l 9 11 +m 8 18 +l 8 16 +l 10 12 +l 10 10 +l 9 8 +l 8 7 +l 6 7 +l 5 8 +l 5 9 +m 12 21 +l 13 20 +l 19 18 +l 22 16 +l 23 14 +l 24 11 +l 24 8 +l 23 5 +l 22 3 +m 20 1 +l 17 0 +l 14 0 +l 11 1 +l 5 4 +l 4 4 +l 3 3 +m 12 20 +l 13 19 +l 19 17 +l 21 16 +l 22 15 +m 12 21 +l 12 19 +l 13 18 +l 19 16 +l 21 15 +l 23 13 +l 24 11 +m 15 1 +l 13 1 +l 7 4 +l 6 4 +m 20 1 +l 16 1 +l 13 2 +l 9 4 +l 6 5 +l 4 5 +l 3 3 +l 3 1 +l 4 0 +l 5 1 +l 4 2 +m 16 3 +l 18 5 +l 20 5 +l 24 1 +l 25 1 +m 19 4 +l 20 4 +l 23 1 +m 17 4 +l 18 4 +l 22 0 +l 24 0 +l 26 2 + +82 29 14 81 +m 3 10 +l 3 9 +l 4 8 +l 6 8 +l 8 9 +l 8 12 +l 7 14 +l 5 17 +l 5 19 +l 7 21 +m 7 12 +l 5 16 +m 6 8 +l 7 9 +l 7 11 +l 5 14 +l 4 16 +l 4 18 +l 5 20 +l 7 21 +l 10 21 +l 12 20 +l 13 19 +l 14 17 +l 14 5 +l 13 3 +l 11 1 +l 9 0 +l 7 0 +l 5 1 +m 12 19 +l 13 17 +l 13 5 +l 12 3 +m 10 21 +l 11 20 +l 12 17 +l 12 5 +l 11 2 +l 9 0 +m 3 5 +l 5 1 +m 2 2 +l 6 4 +m 3 5 +l 3 3 +l 2 2 +l 4 2 +l 5 1 +l 5 3 +l 6 4 +l 4 4 +l 3 5 +m 14 18 +l 15 20 +l 17 21 +l 19 21 +l 21 20 +l 22 19 +l 23 17 +l 24 16 +m 21 19 +l 22 17 +m 19 21 +l 20 20 +l 21 17 +l 22 16 +l 24 16 +m 24 16 +l 14 11 +m 16 12 +l 20 2 +l 22 0 +l 25 3 +m 17 12 +l 21 3 +l 23 1 +m 18 13 +l 22 3 +l 23 2 +l 24 2 + +83 28 14 76 +m 23 19 +l 22 20 +l 23 21 +l 24 20 +l 24 18 +l 23 16 +l 21 16 +l 17 18 +l 14 19 +l 10 19 +l 6 18 +l 4 16 +m 20 17 +l 17 19 +l 14 20 +l 10 20 +l 7 19 +m 24 18 +l 23 17 +l 21 17 +l 17 20 +l 14 21 +l 10 21 +l 7 20 +l 5 18 +l 4 16 +l 3 13 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 16 0 +l 19 1 +l 21 2 +l 23 4 +l 24 7 +l 24 10 +l 23 12 +l 21 13 +l 18 13 +l 16 12 +l 14 9 +l 12 8 +l 10 8 +m 7 3 +l 9 2 +l 12 1 +l 16 1 +l 20 2 +m 4 6 +l 6 4 +l 8 3 +l 11 2 +l 16 2 +l 20 3 +l 22 4 +l 23 5 +l 24 7 +m 19 12 +l 18 12 +l 14 8 +l 13 8 +m 24 10 +l 22 12 +l 20 12 +l 18 11 +l 16 8 +l 14 7 +l 12 7 +l 10 8 +l 9 10 +l 9 12 +l 10 14 +l 12 15 + +84 26 13 72 +m 6 13 +l 4 14 +l 3 16 +l 3 18 +l 4 20 +l 7 21 +l 12 21 +l 15 20 +l 19 17 +l 21 17 +l 22 18 +m 4 19 +l 6 20 +l 12 20 +l 15 19 +l 18 17 +m 3 16 +l 4 18 +l 6 19 +l 12 19 +l 15 18 +l 19 16 +l 21 16 +l 22 18 +l 22 20 +l 21 21 +l 20 20 +l 21 19 +m 15 18 +l 12 15 +l 11 13 +l 11 11 +l 13 7 +l 13 5 +m 12 12 +l 12 11 +l 13 9 +l 13 8 +m 12 15 +l 12 13 +l 14 9 +l 14 7 +l 13 5 +l 12 4 +l 10 4 +l 9 5 +l 9 7 +m 4 2 +l 5 1 +l 4 0 +l 3 1 +l 3 3 +l 4 5 +l 6 5 +l 9 4 +l 13 2 +l 16 1 +l 19 1 +l 21 2 +m 6 4 +l 7 4 +l 13 1 +l 15 1 +m 3 3 +l 4 4 +l 5 4 +l 7 3 +l 11 1 +l 14 0 +l 17 0 +l 20 1 +l 22 3 + +85 23 11 38 +m 3 19 +l 4 19 +l 5 18 +l 5 4 +l 3 3 +m 4 20 +l 6 19 +l 6 3 +l 9 1 +m 2 18 +l 5 21 +l 7 19 +l 7 4 +l 9 2 +l 11 2 +m 3 3 +l 4 3 +l 6 2 +l 8 0 +l 11 2 +l 15 5 +m 13 19 +l 14 19 +l 15 18 +l 15 2 +l 17 0 +l 20 3 +m 14 20 +l 16 19 +l 16 2 +l 18 1 +m 12 18 +l 15 21 +l 18 19 +l 17 18 +l 17 3 +l 18 2 +l 19 2 + +86 29 14 87 +m 3 10 +l 3 9 +l 4 8 +l 6 8 +l 8 9 +l 8 12 +l 7 14 +l 5 17 +l 5 19 +l 7 21 +m 7 12 +l 5 16 +m 6 8 +l 7 9 +l 7 11 +l 5 14 +l 4 16 +l 4 18 +l 5 20 +l 7 21 +l 10 21 +l 12 20 +l 13 19 +l 14 17 +l 14 9 +l 13 6 +l 11 4 +m 12 19 +l 13 17 +l 13 7 +m 10 21 +l 11 20 +l 12 17 +l 12 6 +l 11 4 +m 14 18 +l 15 20 +l 17 21 +l 19 21 +l 21 20 +l 23 17 +l 24 16 +m 21 19 +l 22 17 +m 19 21 +l 20 20 +l 21 17 +l 22 16 +l 24 16 +m 22 16 +l 20 16 +l 19 15 +l 19 13 +l 20 11 +l 23 9 +l 24 7 +m 20 12 +l 23 10 +m 19 14 +l 20 13 +l 23 11 +l 24 9 +l 24 5 +l 23 3 +l 21 1 +l 19 0 +l 15 0 +l 12 1 +l 6 4 +l 5 4 +l 4 3 +m 16 1 +l 14 1 +l 8 4 +l 7 4 +m 22 2 +l 20 1 +l 17 1 +l 14 2 +l 10 4 +l 7 5 +l 5 5 +l 4 3 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +87 34 17 124 +m 3 10 +l 3 9 +l 4 8 +l 6 8 +l 8 9 +l 8 12 +l 7 14 +l 5 17 +l 5 19 +l 7 21 +m 7 12 +l 5 16 +m 6 8 +l 7 9 +l 7 11 +l 5 14 +l 4 16 +l 4 18 +l 5 20 +l 7 21 +l 10 21 +l 12 20 +l 13 19 +l 14 17 +l 14 13 +l 13 10 +l 11 7 +l 9 5 +m 12 19 +l 13 17 +l 13 12 +l 12 9 +m 10 21 +l 11 20 +l 12 17 +l 12 12 +l 11 8 +l 9 5 +m 12 20 +l 14 21 +l 17 21 +l 19 20 +m 21 21 +l 18 20 +l 17 18 +l 17 14 +l 18 11 +l 20 8 +l 21 6 +l 21 4 +l 20 2 +m 18 14 +l 18 13 +l 21 8 +l 21 7 +m 21 21 +l 19 20 +l 18 18 +l 18 15 +l 19 13 +l 21 10 +l 22 7 +l 22 5 +l 21 3 +l 19 1 +l 17 0 +l 13 0 +l 11 1 +l 9 3 +l 7 4 +l 5 4 +l 4 3 +m 12 1 +l 9 4 +l 8 4 +m 15 0 +l 13 1 +l 10 4 +l 8 5 +l 5 5 +l 4 3 +l 4 1 +l 5 0 +l 6 1 +l 5 2 +m 21 21 +l 24 21 +l 26 20 +l 28 17 +l 29 16 +m 26 19 +l 27 17 +m 24 21 +l 25 20 +l 26 17 +l 27 16 +l 29 16 +m 27 16 +l 25 16 +l 24 15 +l 24 13 +l 25 11 +l 28 9 +l 29 7 +m 25 12 +l 28 10 +m 24 14 +l 25 13 +l 28 11 +l 29 9 +l 29 4 +l 28 2 +l 27 1 +l 25 0 +l 22 0 +l 19 1 +m 23 1 +l 22 1 +l 20 2 +m 28 2 +l 26 1 +l 24 1 +l 22 2 +l 21 3 + +88 25 12 70 +m 5 19 +l 7 19 +l 9 18 +l 10 17 +l 11 14 +l 11 12 +m 11 10 +l 11 6 +l 10 3 +l 7 0 +l 5 1 +l 3 0 +m 8 1 +l 6 2 +l 5 2 +m 9 2 +l 8 2 +l 6 3 +l 3 0 +m 7 20 +l 10 19 +l 11 18 +l 12 15 +l 12 6 +l 13 4 +l 15 2 +l 17 1 +m 3 18 +l 8 21 +l 10 20 +l 12 18 +l 13 15 +l 13 12 +m 13 10 +l 13 7 +l 14 4 +l 15 3 +l 17 2 +l 19 2 +m 11 6 +l 12 3 +l 14 1 +l 16 0 +l 21 3 +m 13 15 +l 14 18 +l 17 21 +l 19 20 +l 21 21 +m 16 20 +l 18 19 +l 19 19 +m 15 19 +l 16 19 +l 18 18 +l 21 21 +m 5 8 +l 7 12 +l 11 12 +m 13 12 +l 17 12 +l 19 14 +m 7 11 +l 17 11 +m 5 8 +l 7 10 +l 11 10 +m 13 10 +l 17 10 +l 19 14 + +89 27 13 65 +m 3 10 +l 3 9 +l 4 8 +l 6 8 +l 8 9 +l 8 12 +l 7 14 +l 5 17 +l 5 19 +l 7 21 +m 7 12 +l 5 16 +m 6 8 +l 7 9 +l 7 11 +l 5 14 +l 4 16 +l 4 18 +l 5 20 +l 7 21 +l 10 21 +l 12 20 +l 13 19 +l 14 17 +l 14 12 +l 13 9 +l 12 7 +l 12 6 +l 14 4 +l 15 4 +m 12 19 +l 13 17 +l 13 11 +l 12 8 +l 11 6 +l 14 3 +m 10 21 +l 11 20 +l 12 17 +l 12 11 +l 11 7 +l 10 5 +l 13 2 +l 16 5 +m 14 17 +l 22 21 +m 20 20 +l 20 1 +l 19 -2 +m 21 20 +l 21 3 +l 20 0 +m 22 21 +l 22 5 +l 21 1 +l 20 -1 +l 18 -3 +l 15 -4 +l 11 -4 +l 8 -3 +l 6 -1 +l 5 1 +l 6 2 +l 7 1 +l 6 0 + +90 25 12 65 +m 8 18 +l 9 20 +l 11 21 +l 14 21 +l 16 20 +l 17 19 +l 18 17 +l 18 14 +l 17 12 +l 16 11 +l 14 10 +m 11 10 +l 9 11 +l 8 13 +m 16 19 +l 17 18 +l 17 13 +l 16 12 +m 14 21 +l 15 20 +l 16 18 +l 16 13 +l 15 11 +l 14 10 +m 7 6 +l 8 8 +l 9 9 +l 11 10 +l 14 10 +l 17 9 +l 19 7 +l 20 5 +l 20 1 +l 19 -1 +l 17 -3 +l 14 -4 +l 10 -4 +l 8 -3 +l 5 1 +l 4 2 +m 18 7 +l 19 5 +l 19 1 +l 18 -1 +m 14 10 +l 17 8 +l 18 6 +l 18 0 +l 17 -2 +l 16 -3 +l 14 -4 +m 9 -3 +l 8 -2 +l 6 1 +l 5 2 +m 12 -4 +l 10 -3 +l 9 -2 +l 7 1 +l 6 2 +l 3 2 +l 2 1 +l 2 -1 +l 3 -2 +l 4 -2 + +91 15 7 8 +m 4 25 +l 4 -7 +m 5 25 +l 5 -7 +m 4 25 +l 11 25 +m 4 -7 +l 11 -7 + +92 23 11 2 +m 2 23 +l 20 3 + +93 15 7 8 +m 9 25 +l 9 -7 +m 10 25 +l 10 -7 +m 3 25 +l 10 25 +m 3 -7 +l 10 -7 + +94 23 11 6 +m 3 7 +l 11 12 +l 19 7 +m 3 7 +l 11 11 +l 19 7 + +95 21 10 2 +m 0 -2 +l 21 -2 + +96 25 12 22 +m 3 6 +l 3 8 +l 4 11 +l 6 12 +l 8 12 +l 10 11 +l 14 8 +l 16 7 +l 18 7 +l 20 8 +l 21 10 +m 3 8 +l 4 10 +l 6 11 +l 8 11 +l 10 10 +l 14 7 +l 16 6 +l 18 6 +l 20 7 +l 21 10 +l 21 12 + +97 18 9 38 +m 10 14 +l 7 13 +l 5 12 +l 4 11 +l 3 8 +l 3 5 +l 4 2 +l 5 0 +l 11 3 +m 4 5 +l 5 2 +l 6 1 +m 7 13 +l 5 11 +l 4 8 +l 4 6 +l 5 3 +l 7 1 +m 8 13 +l 9 12 +l 11 11 +l 11 2 +l 13 0 +l 16 3 +m 9 13 +l 12 11 +l 12 3 +l 14 1 +m 10 14 +l 11 13 +l 13 12 +l 14 12 +m 13 11 +l 14 12 +m 13 11 +l 13 3 +l 14 2 +l 15 2 + +98 18 9 42 +m 2 19 +l 3 18 +l 4 16 +m 10 21 +l 7 20 +l 5 18 +l 4 16 +l 4 3 +l 3 2 +m 6 18 +l 5 16 +l 5 3 +l 8 1 +m 10 21 +l 8 20 +l 7 19 +l 6 16 +l 6 3 +l 8 2 +l 9 1 +m 3 2 +l 4 2 +l 6 1 +l 7 0 +l 10 1 +m 6 11 +l 12 14 +l 13 12 +l 14 9 +l 14 6 +l 13 3 +l 12 2 +l 10 1 +m 11 13 +l 12 12 +l 13 10 +m 10 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 10 1 + +99 14 7 23 +m 7 13 +l 9 11 +l 11 12 +l 9 14 +l 7 13 +l 4 11 +l 3 9 +l 3 4 +l 4 2 +l 6 0 +l 10 2 +m 8 13 +l 10 12 +m 5 11 +l 4 9 +l 4 4 +l 5 2 +l 6 1 +m 6 12 +l 5 10 +l 5 5 +l 6 3 +l 8 1 + +100 18 9 40 +m 7 21 +l 4 18 +l 4 16 +l 5 15 +l 9 13 +l 12 11 +l 13 9 +l 13 6 +l 12 3 +l 10 1 +m 5 17 +l 5 16 +l 9 14 +l 12 12 +l 13 11 +m 5 19 +l 5 18 +l 6 17 +l 11 14 +l 13 12 +l 14 9 +l 14 6 +l 13 3 +l 10 1 +l 7 0 +m 8 13 +l 4 11 +l 4 3 +l 3 2 +m 5 11 +l 5 3 +l 8 1 +m 6 12 +l 6 3 +l 8 2 +l 9 1 +m 3 2 +l 4 2 +l 6 1 +l 7 0 + +101 14 7 23 +m 5 6 +l 11 10 +l 8 14 +l 4 11 +l 3 9 +l 3 4 +l 4 2 +l 6 0 +l 10 2 +m 10 10 +l 7 13 +m 5 11 +l 4 9 +l 4 4 +l 5 2 +l 6 1 +m 9 9 +l 7 12 +l 6 12 +l 5 10 +l 5 5 +l 6 3 +l 8 1 + +102 14 7 40 +m 12 21 +l 11 20 +l 9 20 +l 7 21 +l 5 21 +l 4 19 +l 4 14 +l 3 12 +l 2 11 +m 10 19 +l 8 19 +l 6 20 +l 5 20 +m 12 21 +l 11 19 +l 10 18 +l 8 18 +l 6 19 +l 5 19 +l 4 18 +m 4 16 +l 5 14 +l 6 13 +l 8 12 +l 10 12 +l 10 11 +m 2 11 +l 4 11 +m 6 11 +l 10 11 +m 4 11 +l 4 7 +l 5 -5 +m 7 12 +l 4 12 +l 5 13 +l 5 0 +m 6 11 +l 6 7 +l 5 -5 + +103 18 9 45 +m 10 14 +l 7 13 +l 5 12 +l 4 11 +l 3 8 +l 3 5 +l 4 2 +l 5 0 +l 11 3 +m 4 4 +l 5 2 +l 6 1 +m 7 13 +l 5 11 +l 4 8 +l 4 6 +l 5 3 +l 7 1 +m 8 13 +l 9 12 +l 11 11 +l 11 3 +l 12 0 +l 12 -2 +l 11 -4 +m 9 13 +l 12 11 +l 12 1 +m 10 14 +l 11 13 +l 13 12 +l 14 12 +m 13 11 +l 14 12 +m 13 11 +l 13 -1 +l 12 -3 +l 11 -4 +l 9 -5 +l 6 -5 +l 4 -4 +l 3 -3 +l 3 -2 +l 4 -2 +l 4 -3 + +104 18 9 42 +m 2 19 +l 3 18 +l 4 16 +m 10 21 +l 7 20 +l 5 18 +l 4 16 +l 4 3 +l 3 2 +m 6 18 +l 5 16 +l 5 2 +l 6 1 +m 10 21 +l 8 20 +l 7 19 +l 6 16 +l 6 3 +l 7 2 +l 8 2 +m 3 2 +l 5 1 +l 6 0 +l 9 3 +m 6 11 +l 12 14 +l 13 12 +l 14 8 +l 14 4 +l 13 1 +l 12 -1 +l 10 -3 +l 7 -5 +m 11 13 +l 12 12 +l 13 9 +m 10 13 +l 12 10 +l 13 7 +l 13 4 +l 12 0 +l 10 -3 + +105 11 5 31 +m 5 21 +l 4 20 +l 4 19 +l 5 18 +l 6 19 +l 6 20 +l 5 21 +m 4 20 +l 6 19 +m 4 19 +l 6 20 +m 2 12 +l 3 12 +l 4 11 +l 4 2 +l 6 0 +l 9 3 +m 3 13 +l 5 12 +l 5 3 +l 7 1 +m 1 11 +l 4 14 +l 5 13 +l 7 12 +m 6 11 +l 7 12 +m 6 11 +l 6 3 +l 7 2 +l 8 2 + +106 11 5 36 +m 5 21 +l 4 20 +l 4 19 +l 5 18 +l 6 19 +l 6 20 +l 5 21 +m 4 20 +l 6 19 +m 4 19 +l 6 20 +m 2 12 +l 3 12 +l 4 11 +l 4 0 +l 3 -3 +l 2 -4 +l 0 -5 +m 3 13 +l 5 12 +l 5 0 +l 4 -2 +m 1 11 +l 4 14 +l 5 13 +l 7 12 +m 6 11 +l 7 12 +m 6 11 +l 6 0 +l 5 -2 +l 3 -4 +l 0 -5 +m 6 0 +l 7 -2 +l 8 -3 + +107 15 7 50 +m 3 19 +l 4 18 +l 5 16 +m 10 21 +l 8 20 +l 6 18 +l 5 16 +l 5 14 +l 4 12 +l 3 11 +m 5 11 +l 5 3 +l 4 2 +m 7 18 +l 6 16 +l 6 14 +m 6 12 +l 5 12 +l 6 14 +l 6 3 +l 8 1 +m 10 21 +l 8 19 +l 7 16 +l 7 12 +m 7 11 +l 7 3 +l 8 2 +l 9 2 +m 4 2 +l 6 1 +l 7 0 +l 10 3 +m 7 15 +l 11 18 +l 12 17 +l 12 15 +l 10 13 +l 8 12 +m 10 17 +l 11 16 +l 11 15 +l 10 13 +m 7 12 +l 12 12 +l 12 11 +m 3 11 +l 5 11 +m 7 11 +l 12 11 + +108 11 5 24 +m 2 19 +l 3 18 +l 4 16 +m 10 21 +l 7 20 +l 5 18 +l 4 16 +l 4 3 +l 3 2 +m 6 18 +l 5 16 +l 5 2 +l 7 1 +m 10 21 +l 8 20 +l 7 19 +l 6 16 +l 6 3 +l 7 2 +l 8 2 +m 3 2 +l 5 1 +l 6 0 +l 9 3 + +109 27 13 63 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 3 2 +l 5 0 +m 3 13 +l 5 11 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 1 11 +l 4 14 +l 6 12 +l 6 3 +l 7 2 +l 5 0 +m 9 13 +l 11 12 +l 12 10 +l 12 3 +l 11 2 +l 13 0 +m 11 13 +l 12 12 +l 13 10 +l 13 3 +l 12 2 +l 13 1 +l 14 2 +l 13 3 +m 6 11 +l 9 13 +l 11 14 +l 13 13 +l 14 11 +l 14 3 +l 15 2 +l 13 0 +m 17 13 +l 18 12 +l 20 11 +l 20 2 +l 22 0 +l 25 3 +m 18 13 +l 21 11 +l 21 3 +l 23 1 +m 14 11 +l 17 13 +l 19 14 +l 20 13 +l 22 12 +l 23 12 +m 22 11 +l 23 12 +m 22 11 +l 22 3 +l 23 2 +l 24 2 + +110 19 9 41 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 3 2 +l 5 0 +m 3 13 +l 5 11 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 1 11 +l 4 14 +l 6 12 +l 6 3 +l 7 2 +l 5 0 +m 9 13 +l 10 12 +l 12 11 +l 12 2 +l 14 0 +l 17 3 +m 10 13 +l 13 11 +l 13 3 +l 15 1 +m 6 11 +l 9 13 +l 11 14 +l 12 13 +l 14 12 +l 15 12 +m 14 11 +l 15 12 +m 14 11 +l 14 3 +l 15 2 +l 16 2 + +111 18 9 34 +m 4 11 +l 4 3 +l 3 2 +m 5 11 +l 5 3 +l 8 1 +m 7 12 +l 6 11 +l 6 3 +l 8 2 +l 9 1 +m 3 2 +l 4 2 +l 6 1 +l 7 0 +l 10 1 +m 4 11 +l 7 12 +l 12 14 +l 13 12 +l 14 9 +l 14 6 +l 13 3 +l 12 2 +l 10 1 +m 11 13 +l 12 12 +l 13 10 +m 10 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 10 1 + +112 18 9 46 +m 5 17 +l 3 15 +l 3 13 +l 4 10 +l 4 3 +l 2 1 +m 4 2 +l 5 -5 +m 4 14 +l 4 13 +l 5 10 +l 5 0 +m 4 16 +l 4 15 +l 5 13 +l 6 10 +l 6 3 +l 7 3 +l 9 2 +l 10 1 +m 6 2 +l 5 -5 +m 9 1 +l 7 2 +m 10 1 +l 8 0 +l 6 2 +m 4 2 +l 2 1 +m 6 11 +l 12 14 +l 13 12 +l 14 9 +l 14 6 +l 13 3 +l 12 2 +l 10 1 +m 11 13 +l 12 12 +l 13 10 +m 10 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 10 1 + +113 18 9 35 +m 10 14 +l 7 13 +l 5 12 +l 4 11 +l 3 8 +l 3 5 +l 4 2 +l 5 0 +l 11 3 +m 4 4 +l 5 2 +l 6 1 +m 7 13 +l 5 11 +l 4 8 +l 4 6 +l 5 3 +l 7 1 +m 8 13 +l 9 12 +l 11 11 +l 11 3 +l 12 -5 +m 9 13 +l 12 11 +l 12 0 +m 10 14 +l 11 13 +l 13 12 +l 14 12 +m 13 11 +l 14 12 +m 13 11 +l 13 3 +l 12 -5 + +114 15 7 26 +m 3 12 +l 4 12 +l 5 11 +l 5 3 +l 4 2 +m 4 13 +l 6 11 +l 6 2 +l 8 1 +m 2 11 +l 5 14 +l 7 12 +l 7 3 +l 8 2 +l 9 2 +m 4 2 +l 6 1 +l 7 0 +l 10 3 +m 9 13 +l 10 11 +l 12 12 +l 11 14 +l 7 12 +m 10 13 +l 11 12 + +115 12 6 34 +m 12 21 +l 11 20 +l 9 20 +l 7 21 +l 5 21 +l 4 19 +l 4 14 +l 3 12 +l 2 11 +m 10 19 +l 8 19 +l 6 20 +l 5 20 +m 12 21 +l 11 19 +l 10 18 +l 8 18 +l 6 19 +l 5 19 +l 4 18 +m 4 16 +l 6 11 +m 4 11 +l 4 7 +l 5 -5 +m 5 12 +l 4 12 +l 5 13 +l 5 0 +m 6 11 +l 6 7 +l 5 -5 +m 2 11 +l 4 11 + +116 13 6 29 +m 7 18 +l 6 15 +l 5 13 +l 4 12 +l 2 11 +m 7 18 +l 7 12 +l 10 12 +l 10 11 +m 2 11 +l 5 11 +m 7 11 +l 10 11 +m 5 11 +l 5 3 +l 4 2 +m 6 12 +l 5 12 +l 6 14 +l 6 3 +l 8 1 +m 7 11 +l 7 3 +l 8 2 +l 9 2 +m 4 2 +l 6 1 +l 7 0 +l 10 3 + +117 19 9 40 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 3 2 +m 3 13 +l 5 11 +l 5 3 +l 7 1 +m 1 11 +l 4 14 +l 6 12 +l 6 3 +l 8 2 +l 9 1 +m 3 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 12 3 +m 13 14 +l 11 12 +l 12 11 +l 12 2 +l 14 0 +l 17 3 +m 13 11 +l 14 12 +l 13 13 +l 12 12 +l 13 11 +l 13 3 +l 15 1 +m 13 14 +l 15 12 +l 14 11 +l 14 3 +l 15 2 +l 16 2 + +118 18 9 40 +m 5 16 +l 3 14 +l 3 12 +l 4 9 +l 4 3 +l 3 2 +m 4 13 +l 4 12 +l 5 9 +l 5 3 +l 8 1 +m 4 15 +l 4 14 +l 5 12 +l 6 9 +l 6 3 +l 8 2 +l 9 1 +m 3 2 +l 4 2 +l 6 1 +l 7 0 +l 10 1 +m 6 11 +l 12 14 +l 13 12 +l 14 9 +l 14 6 +l 13 3 +l 12 2 +l 10 1 +m 11 13 +l 12 12 +l 13 10 +m 10 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 10 1 + +119 26 13 62 +m 5 16 +l 3 14 +l 3 12 +l 4 9 +l 4 3 +l 3 2 +l 5 0 +m 4 13 +l 4 12 +l 5 9 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 4 15 +l 4 14 +l 5 12 +l 6 9 +l 6 3 +l 7 2 +l 5 0 +m 9 13 +l 11 12 +l 12 10 +l 12 3 +l 11 2 +m 11 13 +l 12 12 +l 13 10 +l 13 3 +l 16 1 +m 6 11 +l 9 13 +l 11 14 +l 13 13 +l 14 11 +l 14 3 +l 16 2 +l 17 1 +m 11 2 +l 12 2 +l 14 1 +l 15 0 +l 18 1 +m 14 11 +l 20 14 +l 21 12 +l 22 9 +l 22 7 +l 21 3 +l 20 2 +l 18 1 +m 19 13 +l 20 12 +l 21 10 +m 18 13 +l 20 11 +l 21 8 +l 21 6 +l 20 3 +l 18 1 + +120 16 8 38 +m 4 12 +l 5 12 +l 6 11 +l 6 3 +l 5 3 +l 3 2 +l 2 0 +l 2 -2 +l 3 -4 +l 5 -5 +l 8 -5 +l 11 -4 +l 11 -3 +l 10 -3 +l 10 -4 +m 5 13 +l 7 11 +l 7 3 +l 10 1 +m 3 11 +l 6 14 +l 8 12 +l 8 3 +l 10 2 +l 11 1 +m 13 2 +l 9 0 +l 8 1 +l 6 2 +l 4 2 +l 2 0 +m 10 13 +l 11 11 +l 13 12 +l 12 14 +l 8 12 +m 11 13 +l 12 12 + +121 18 9 40 +m 5 16 +l 3 14 +l 3 12 +l 4 9 +l 4 3 +l 3 2 +m 4 13 +l 4 12 +l 5 9 +l 5 2 +l 7 1 +m 4 15 +l 4 14 +l 5 12 +l 6 9 +l 6 3 +l 7 2 +l 8 2 +m 3 2 +l 5 1 +l 6 0 +l 9 3 +m 6 11 +l 12 14 +l 13 12 +l 14 8 +l 14 4 +l 13 1 +l 12 -1 +l 10 -3 +l 7 -5 +m 11 13 +l 12 12 +l 13 9 +m 10 13 +l 12 10 +l 13 7 +l 13 4 +l 12 0 +l 10 -3 + +122 15 7 37 +m 3 11 +l 8 14 +l 10 13 +l 11 11 +l 11 9 +l 10 7 +l 6 5 +m 8 13 +l 10 12 +m 7 13 +l 9 12 +l 10 10 +l 10 9 +l 9 7 +l 8 6 +m 8 6 +l 10 4 +l 11 2 +l 11 -2 +l 10 -4 +l 8 -5 +l 6 -5 +l 4 -4 +l 3 -2 +l 3 0 +l 4 2 +l 6 3 +l 12 5 +m 7 5 +l 9 4 +l 10 2 +m 6 5 +l 9 3 +l 10 1 +l 10 -2 +l 9 -4 +l 8 -5 + +123 15 7 37 +m 9 25 +l 7 24 +l 6 23 +l 5 21 +l 5 19 +l 6 17 +l 7 16 +l 8 14 +l 8 12 +l 6 10 +m 7 24 +l 6 22 +l 6 20 +l 7 18 +l 8 17 +l 9 15 +l 9 13 +l 8 11 +l 4 9 +l 8 7 +l 9 5 +l 9 3 +l 8 1 +l 7 0 +l 6 -2 +l 6 -4 +l 7 -6 +m 6 8 +l 8 6 +l 8 4 +l 7 2 +l 6 1 +l 5 -1 +l 5 -3 +l 6 -5 +l 7 -6 +l 9 -7 + +124 9 4 2 +m 4 25 +l 4 -7 + +125 15 7 37 +m 5 25 +l 7 24 +l 8 23 +l 9 21 +l 9 19 +l 8 17 +l 7 16 +l 6 14 +l 6 12 +l 8 10 +m 7 24 +l 8 22 +l 8 20 +l 7 18 +l 6 17 +l 5 15 +l 5 13 +l 6 11 +l 10 9 +l 6 7 +l 5 5 +l 5 3 +l 6 1 +l 7 0 +l 8 -2 +l 8 -4 +l 7 -6 +m 8 8 +l 6 6 +l 6 4 +l 7 2 +l 8 1 +l 9 -1 +l 9 -3 +l 8 -5 +l 7 -6 +l 5 -7 diff --git a/cd/etc/vectorfont12.txt b/cd/etc/vectorfont12.txt new file mode 100755 index 0000000..cea80e3 --- /dev/null +++ b/cd/etc/vectorfont12.txt @@ -0,0 +1,3321 @@ +Gothic italian I +25 21 10 -7 + + +32 21 10 0 + +33 13 6 25 +m 6 21 +l 5 20 +l 3 19 +l 5 18 +l 6 7 +m 6 18 +l 7 19 +l 6 20 +l 5 19 +l 6 18 +l 6 7 +m 6 21 +l 7 20 +l 9 19 +l 7 18 +l 6 7 +m 6 3 +l 4 1 +l 6 0 +l 8 1 +l 6 3 +m 6 2 +l 5 1 +l 7 1 +l 6 2 + +34 19 9 16 +m 5 21 +l 4 20 +l 4 14 +m 5 20 +l 4 14 +m 5 21 +l 6 20 +l 4 14 +m 14 21 +l 13 20 +l 13 14 +m 14 20 +l 13 14 +m 14 21 +l 15 20 +l 13 14 + +35 22 11 8 +m 11 21 +l 4 -7 +m 17 21 +l 10 -7 +m 4 10 +l 18 10 +m 3 4 +l 17 4 + +36 21 10 53 +m 8 25 +l 8 -4 +m 12 25 +l 12 -4 +m 12 21 +l 14 20 +l 15 18 +l 15 16 +l 17 17 +l 16 19 +l 15 20 +l 12 21 +l 8 21 +l 5 20 +l 3 18 +l 3 15 +l 4 13 +l 7 11 +l 13 9 +l 15 8 +l 16 6 +l 16 3 +l 15 1 +m 16 17 +l 15 19 +m 4 15 +l 5 13 +l 7 12 +l 13 10 +l 15 9 +l 16 7 +m 5 2 +l 4 4 +m 5 20 +l 4 18 +l 4 16 +l 5 14 +l 7 13 +l 13 11 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 4 2 +l 3 4 +l 5 5 +l 5 3 +l 6 1 +l 8 0 + +37 25 12 29 +m 21 21 +l 3 0 +m 8 21 +l 10 19 +l 10 17 +l 9 15 +l 7 14 +l 5 14 +l 3 16 +l 3 18 +l 4 20 +l 6 21 +l 8 21 +l 10 20 +l 13 19 +l 16 19 +l 19 20 +l 21 21 +m 17 7 +l 15 6 +l 14 4 +l 14 2 +l 16 0 +l 18 0 +l 20 1 +l 21 3 +l 21 5 +l 19 7 +l 17 7 + +38 27 13 50 +m 20 13 +l 21 12 +l 22 12 +l 23 13 +m 19 12 +l 20 11 +l 22 11 +m 19 11 +l 20 10 +l 21 10 +l 22 11 +l 23 13 +m 20 13 +l 14 7 +m 13 6 +l 7 0 +l 3 5 +l 9 11 +m 10 12 +l 14 16 +l 10 21 +l 5 15 +l 11 9 +l 15 3 +l 17 1 +l 19 0 +l 21 0 +l 22 1 +l 23 3 +m 7 1 +l 4 5 +m 13 16 +l 10 20 +m 6 15 +l 11 10 +l 15 4 +l 17 2 +l 19 1 +l 22 1 +m 8 1 +l 4 6 +m 13 15 +l 9 20 +m 6 16 +l 12 10 +l 16 4 +l 17 3 +l 19 2 +l 22 2 +l 23 3 + +39 10 5 8 +m 5 21 +l 4 20 +l 4 14 +m 5 20 +l 4 14 +m 5 21 +l 6 20 +l 4 14 + +40 15 7 24 +m 10 25 +l 8 23 +l 6 20 +l 4 16 +l 3 11 +l 3 7 +l 4 2 +l 6 -2 +l 8 -5 +l 10 -7 +m 6 19 +l 5 16 +l 4 12 +l 4 6 +l 5 2 +l 6 -1 +m 8 23 +l 7 21 +l 6 18 +l 5 12 +l 5 6 +l 6 0 +l 7 -3 +l 8 -5 + +41 15 7 24 +m 4 25 +l 6 23 +l 8 20 +l 10 16 +l 11 11 +l 11 7 +l 10 2 +l 8 -2 +l 6 -5 +l 4 -7 +m 8 19 +l 9 16 +l 10 12 +l 10 6 +l 9 2 +l 8 -1 +m 6 23 +l 7 21 +l 8 18 +l 9 12 +l 9 6 +l 8 0 +l 7 -3 +l 6 -5 + +42 17 8 30 +m 8 21 +l 7 20 +l 9 10 +l 8 9 +m 8 21 +l 8 9 +m 8 21 +l 9 20 +l 7 10 +l 8 9 +m 3 18 +l 4 18 +l 12 12 +l 13 12 +m 3 18 +l 13 12 +m 3 18 +l 3 17 +l 13 13 +l 13 12 +m 13 18 +l 12 18 +l 4 12 +l 3 12 +m 13 18 +l 3 12 +m 13 18 +l 13 17 +l 3 13 +l 3 12 + +43 26 13 12 +m 12 18 +l 12 1 +l 13 1 +m 12 18 +l 13 18 +l 13 1 +m 4 10 +l 21 10 +l 21 9 +m 4 10 +l 4 9 +l 21 9 + +44 13 6 12 +m 6 -3 +l 6 -1 +l 4 1 +l 6 3 +l 7 1 +l 7 -1 +l 6 -3 +l 4 -4 +m 6 2 +l 5 1 +l 6 0 +l 6 2 + +45 26 13 6 +m 4 10 +l 21 10 +l 21 9 +m 4 10 +l 4 9 +l 21 9 + +46 13 6 9 +m 6 3 +l 4 1 +l 6 0 +l 8 1 +l 6 3 +m 6 2 +l 5 1 +l 7 1 +l 6 2 + +47 24 12 6 +m 20 25 +l 2 -7 +l 3 -7 +m 20 25 +l 21 25 +l 3 -7 + +48 21 10 34 +m 4 19 +l 4 3 +l 2 2 +m 5 18 +l 5 3 +l 8 1 +m 6 19 +l 6 3 +l 8 2 +l 9 1 +m 4 19 +l 6 19 +l 11 20 +l 13 21 +m 11 20 +l 12 19 +l 14 18 +l 14 2 +m 12 20 +l 15 18 +l 15 3 +m 13 21 +l 14 20 +l 16 19 +l 18 19 +l 16 18 +l 16 2 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 14 2 +l 16 2 + +49 21 10 23 +m 7 19 +l 8 18 +l 9 16 +l 9 3 +l 7 2 +m 9 18 +l 8 19 +l 9 20 +l 10 18 +l 10 2 +l 12 1 +m 7 19 +l 10 21 +l 11 19 +l 11 3 +l 13 2 +l 14 2 +m 7 2 +l 8 2 +l 10 1 +l 11 0 +l 12 1 +l 14 2 + +50 21 10 39 +m 4 19 +l 6 19 +l 8 20 +l 9 21 +l 11 20 +l 14 19 +l 16 19 +m 8 19 +l 10 20 +m 4 19 +l 6 18 +l 8 18 +l 10 19 +l 11 20 +m 14 19 +l 14 11 +m 15 18 +l 15 12 +m 16 19 +l 16 11 +l 9 11 +l 6 10 +l 4 8 +l 3 5 +l 3 0 +m 3 0 +l 7 2 +l 11 3 +l 14 3 +l 18 2 +m 6 1 +l 9 2 +l 14 2 +l 17 1 +m 3 0 +l 8 1 +l 13 1 +l 16 0 +l 18 2 + +51 21 10 45 +m 4 19 +l 5 19 +l 7 20 +l 8 21 +l 10 20 +l 14 19 +l 16 19 +m 7 19 +l 9 20 +m 4 19 +l 6 18 +l 8 18 +l 10 20 +m 14 19 +l 14 12 +m 15 18 +l 15 13 +m 16 19 +l 16 12 +l 14 12 +l 11 11 +l 9 10 +m 9 11 +l 11 10 +l 14 9 +l 16 9 +l 16 2 +m 15 8 +l 15 3 +m 14 9 +l 14 2 +m 3 2 +l 5 3 +l 7 3 +l 9 2 +l 10 1 +m 7 2 +l 9 1 +m 3 2 +l 5 2 +l 7 1 +l 8 0 +l 10 1 +l 14 2 +l 16 2 + +52 21 10 33 +m 13 21 +l 3 11 +l 3 6 +l 12 6 +m 14 6 +l 18 6 +l 19 5 +l 19 7 +l 18 6 +m 4 11 +l 4 7 +m 5 13 +l 5 6 +m 12 20 +l 12 3 +l 10 2 +m 13 17 +l 14 19 +l 13 20 +l 13 2 +l 15 1 +m 13 21 +l 15 19 +l 14 17 +l 14 3 +l 16 2 +l 17 2 +m 10 2 +l 11 2 +l 13 1 +l 14 0 +l 15 1 +l 17 2 + +53 21 10 42 +m 4 21 +l 4 12 +m 4 21 +l 16 21 +m 5 20 +l 14 20 +m 4 19 +l 13 19 +l 15 20 +l 16 21 +m 14 15 +l 13 14 +l 11 13 +l 7 12 +l 4 12 +m 11 13 +l 12 13 +l 14 12 +l 14 2 +m 13 14 +l 15 13 +l 15 3 +m 14 15 +l 15 14 +l 17 13 +l 18 13 +l 16 12 +l 16 2 +m 3 2 +l 5 3 +l 7 3 +l 9 2 +l 10 1 +m 7 2 +l 9 1 +m 3 2 +l 5 2 +l 7 1 +l 8 0 +l 10 1 +l 14 2 +l 16 2 + +54 21 10 48 +m 4 19 +l 4 3 +l 2 2 +m 5 18 +l 5 3 +l 8 1 +m 6 19 +l 6 3 +l 8 2 +l 9 1 +m 4 19 +l 6 19 +l 10 20 +l 12 21 +l 13 20 +l 15 19 +l 16 19 +m 11 20 +l 13 19 +m 10 20 +l 12 18 +l 14 18 +l 16 19 +m 6 11 +l 7 11 +l 11 12 +l 13 13 +l 14 14 +m 11 12 +l 12 12 +l 14 11 +l 14 2 +m 13 13 +l 15 11 +l 15 3 +m 14 14 +l 15 13 +l 17 12 +l 18 12 +l 16 11 +l 16 2 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 14 2 +l 16 2 + +55 21 10 32 +m 3 19 +l 5 21 +l 8 20 +l 13 20 +l 18 21 +m 4 20 +l 7 19 +l 12 19 +l 15 20 +m 3 19 +l 7 18 +l 10 18 +l 14 19 +l 18 21 +m 18 21 +l 17 19 +l 15 16 +l 11 12 +l 9 9 +l 8 6 +l 8 3 +l 9 0 +m 10 10 +l 9 7 +l 9 4 +l 10 1 +m 13 14 +l 11 11 +l 10 8 +l 10 5 +l 11 2 +l 9 0 + +56 21 10 55 +m 4 18 +l 4 12 +m 5 17 +l 5 13 +m 6 18 +l 6 12 +m 4 18 +l 6 18 +l 11 19 +l 13 20 +l 14 21 +m 11 19 +l 12 19 +l 14 18 +l 14 12 +m 13 20 +l 15 19 +l 15 13 +m 14 21 +l 15 20 +l 17 19 +l 18 19 +l 16 18 +l 16 12 +m 4 12 +l 6 12 +l 14 9 +l 16 9 +m 16 12 +l 14 12 +l 6 9 +l 4 9 +m 4 9 +l 4 3 +l 2 2 +m 5 8 +l 5 3 +l 8 1 +m 6 9 +l 6 3 +l 8 2 +l 9 1 +m 14 9 +l 14 2 +m 15 8 +l 15 3 +m 16 9 +l 16 2 +m 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 14 2 +l 16 2 + +57 21 10 49 +m 4 19 +l 4 10 +l 2 9 +m 5 18 +l 5 9 +l 7 8 +m 6 19 +l 6 10 +l 8 9 +l 9 9 +m 4 19 +l 6 19 +l 11 20 +l 13 21 +m 11 20 +l 12 19 +l 14 18 +l 14 2 +m 12 20 +l 15 18 +l 15 3 +m 13 21 +l 14 20 +l 16 19 +l 18 19 +l 16 18 +l 16 2 +m 2 9 +l 3 9 +l 5 8 +l 6 7 +l 7 8 +l 9 9 +l 13 10 +l 14 10 +m 3 2 +l 5 3 +l 7 3 +l 9 2 +l 10 1 +m 7 2 +l 9 1 +m 3 2 +l 5 2 +l 7 1 +l 8 0 +l 10 1 +l 14 2 +l 16 2 + +58 13 6 18 +m 6 14 +l 4 12 +l 6 11 +l 8 12 +l 6 14 +m 6 13 +l 5 12 +l 7 12 +l 6 13 +m 6 3 +l 4 1 +l 6 0 +l 8 1 +l 6 3 +m 6 2 +l 5 1 +l 7 1 +l 6 2 + +59 13 6 21 +m 6 14 +l 4 12 +l 6 11 +l 8 12 +l 6 14 +m 6 13 +l 5 12 +l 7 12 +l 6 13 +m 6 -3 +l 6 -1 +l 4 1 +l 6 3 +l 7 1 +l 7 -1 +l 6 -3 +l 4 -4 +m 6 2 +l 5 1 +l 6 0 +l 6 2 + +60 25 12 3 +m 20 18 +l 4 9 +l 20 0 + +61 26 13 12 +m 4 14 +l 21 14 +l 21 13 +m 4 14 +l 4 13 +l 21 13 +m 4 6 +l 21 6 +l 21 5 +m 4 6 +l 4 5 +l 21 5 + +62 25 12 3 +m 4 18 +l 20 9 +l 4 0 + +63 19 9 43 +m 3 17 +l 4 19 +l 5 20 +l 8 21 +l 10 21 +l 13 20 +l 14 19 +l 15 17 +l 15 15 +l 14 13 +l 12 11 +l 10 10 +m 4 17 +l 5 19 +m 13 19 +l 14 18 +l 14 14 +l 13 13 +m 3 17 +l 5 16 +l 5 18 +l 6 20 +l 8 21 +m 10 21 +l 12 20 +l 13 18 +l 13 14 +l 12 12 +l 10 10 +m 9 10 +l 9 7 +l 10 10 +l 8 10 +l 9 7 +m 9 3 +l 7 1 +l 9 0 +l 11 1 +l 9 3 +m 9 2 +l 8 1 +l 10 1 +l 9 2 + +64 28 14 52 +m 18 13 +l 17 15 +l 15 16 +l 12 16 +l 10 15 +l 9 14 +l 8 11 +l 8 8 +l 9 6 +l 11 5 +l 14 5 +l 16 6 +l 17 8 +m 12 16 +l 10 14 +l 9 11 +l 9 8 +l 10 6 +l 11 5 +m 18 16 +l 17 8 +l 17 6 +l 19 5 +l 21 5 +l 23 7 +l 24 10 +l 24 12 +l 23 15 +l 22 17 +l 20 19 +l 18 20 +l 15 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 15 0 +l 18 1 +l 20 2 +l 21 3 +m 19 16 +l 18 8 +l 18 6 +l 19 5 + +65 27 13 43 +m 9 19 +l 7 18 +l 5 16 +l 4 14 +l 3 11 +l 3 8 +l 4 6 +l 6 5 +m 5 15 +l 4 12 +l 4 8 +l 5 6 +m 9 19 +l 7 17 +l 6 15 +l 5 12 +l 5 9 +l 6 5 +l 6 3 +l 5 1 +l 3 0 +m 17 19 +l 19 19 +l 19 2 +l 17 2 +m 20 19 +l 20 2 +m 21 20 +l 21 1 +m 3 21 +l 6 20 +l 12 19 +l 17 19 +l 21 20 +l 23 21 +m 5 11 +l 19 11 +m 3 0 +l 6 1 +l 12 2 +l 17 2 +l 21 1 +l 23 0 + +66 27 13 56 +m 7 20 +l 7 1 +m 8 20 +l 8 1 +m 11 21 +l 9 20 +l 9 1 +l 11 0 +m 3 17 +l 5 19 +l 7 20 +l 11 21 +l 16 21 +l 19 20 +l 21 18 +l 21 16 +l 20 14 +m 19 19 +l 20 18 +l 20 16 +l 19 14 +m 16 21 +l 18 20 +l 19 18 +l 19 16 +l 18 15 +m 12 6 +l 10 7 +l 9 9 +l 9 11 +l 10 13 +l 11 14 +l 14 15 +l 17 15 +l 20 14 +l 22 12 +l 23 10 +l 23 7 +l 22 4 +l 20 2 +l 18 1 +l 15 0 +l 11 0 +l 7 1 +l 5 2 +l 3 4 +m 21 12 +l 22 10 +l 22 6 +l 21 4 +m 17 15 +l 20 13 +l 21 10 +l 21 6 +l 20 3 +l 18 1 + +67 27 13 52 +m 23 21 +l 22 19 +l 21 17 +l 19 19 +l 17 20 +l 14 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +l 22 2 +l 23 0 +m 22 19 +l 21 14 +l 21 7 +l 22 2 +m 21 16 +l 20 17 +m 21 13 +l 20 16 +l 19 18 +l 17 20 +m 5 16 +l 4 13 +l 4 8 +l 5 5 +m 9 20 +l 7 18 +l 6 16 +l 5 13 +l 5 8 +l 6 5 +l 7 3 +l 9 1 +m 20 4 +l 21 5 +m 17 1 +l 19 3 +l 20 5 +l 21 8 + +68 27 13 40 +m 6 20 +l 6 1 +m 7 20 +l 7 1 +m 9 21 +l 8 20 +l 8 1 +l 9 0 +m 3 16 +l 4 18 +l 6 20 +l 9 21 +l 14 21 +l 17 20 +l 19 19 +l 21 17 +l 22 15 +l 23 12 +l 23 9 +l 22 6 +l 21 4 +l 19 2 +l 17 1 +l 14 0 +l 9 0 +l 6 1 +l 4 3 +l 3 5 +m 21 16 +l 22 13 +l 22 8 +l 21 5 +m 17 20 +l 19 18 +l 20 16 +l 21 13 +l 21 8 +l 20 5 +l 19 3 +l 17 1 + +69 27 13 74 +m 23 21 +l 22 19 +l 21 17 +l 19 19 +l 17 20 +l 14 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +l 22 2 +l 23 0 +m 22 19 +l 21 14 +l 21 7 +l 22 2 +m 21 16 +l 20 17 +m 21 14 +l 19 18 +l 17 20 +m 5 16 +l 4 13 +l 4 8 +l 5 5 +m 9 20 +l 7 18 +l 6 16 +l 5 13 +l 5 8 +l 6 5 +l 7 3 +l 9 1 +m 20 4 +l 21 5 +m 17 1 +l 19 3 +l 20 5 +l 21 8 +m 5 11 +l 6 12 +l 9 12 +l 16 10 +l 19 10 +l 21 11 +m 11 11 +l 13 10 +l 16 9 +l 18 9 +l 20 10 +m 8 12 +l 13 9 +l 16 8 +l 18 8 +l 20 9 +l 21 11 +m 21 14 +l 20 15 +l 19 15 +l 18 14 +l 19 13 +l 20 14 + +70 27 13 58 +m 5 19 +l 5 1 +m 8 20 +l 6 19 +l 6 2 +m 10 21 +l 8 20 +l 7 18 +l 7 2 +l 9 2 +m 3 17 +l 5 19 +l 7 20 +l 10 21 +l 14 21 +l 17 20 +l 19 19 +l 20 18 +l 23 21 +m 23 21 +l 22 19 +l 21 15 +l 21 12 +l 22 8 +l 23 6 +m 21 18 +l 20 16 +m 17 20 +l 19 18 +l 20 15 +l 21 12 +m 7 11 +l 8 12 +l 10 12 +l 15 11 +l 18 11 +l 20 12 +m 12 11 +l 15 10 +l 17 10 +l 19 11 +m 9 12 +l 15 9 +l 17 9 +l 19 10 +l 20 12 +l 20 15 +l 19 16 +l 18 16 +l 17 15 +l 18 14 +l 19 15 +m 3 0 +l 5 1 +l 9 2 +l 14 2 +l 20 1 +l 23 0 + +71 27 13 78 +m 23 21 +l 22 19 +l 21 17 +l 19 19 +l 17 20 +l 14 21 +l 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 15 0 +l 17 1 +l 19 2 +l 20 3 +l 21 5 +l 22 2 +l 23 0 +m 22 19 +l 21 14 +l 21 7 +l 22 2 +m 21 16 +l 20 17 +m 21 13 +l 20 16 +l 19 18 +l 17 20 +m 5 16 +l 4 13 +l 4 8 +l 5 5 +m 9 20 +l 7 18 +l 6 16 +l 5 13 +l 5 8 +l 6 5 +l 7 3 +l 9 1 +m 19 3 +l 20 5 +l 20 9 +m 17 1 +l 18 2 +l 19 5 +l 19 10 +m 6 8 +l 7 9 +l 8 8 +l 7 7 +l 6 7 +l 5 8 +m 5 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 16 11 +l 18 10 +m 6 12 +l 8 13 +l 10 13 +l 13 12 +l 15 11 +m 5 11 +l 7 12 +l 10 12 +l 16 10 +l 20 10 +l 21 11 + +72 27 13 42 +m 5 20 +l 5 1 +l 3 0 +m 6 19 +l 6 1 +m 9 19 +l 7 19 +l 7 1 +m 3 21 +l 5 20 +l 9 19 +l 14 19 +l 20 20 +l 23 21 +m 7 11 +l 8 13 +l 10 15 +l 13 16 +l 17 16 +l 20 15 +l 22 13 +l 23 10 +l 23 7 +l 22 6 +l 20 5 +m 21 13 +l 22 11 +l 22 8 +l 21 6 +m 17 16 +l 19 15 +l 20 14 +l 21 12 +l 21 8 +l 20 5 +l 20 3 +l 21 1 +l 23 0 +m 3 0 +l 7 1 +l 11 1 +l 16 0 + +73 27 13 18 +m 12 18 +l 12 2 +m 13 17 +l 13 3 +m 14 18 +l 14 2 +m 3 21 +l 7 19 +l 11 18 +l 15 18 +l 19 19 +l 23 21 +m 3 0 +l 6 1 +l 10 2 +l 16 2 +l 20 1 +l 23 0 + +74 27 13 35 +m 15 18 +l 17 18 +l 17 3 +l 16 1 +l 14 0 +m 18 18 +l 18 3 +l 17 2 +m 19 19 +l 19 2 +m 3 21 +l 7 19 +l 11 18 +l 15 18 +l 19 19 +l 23 21 +m 4 12 +l 3 10 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +l 23 7 +m 4 6 +l 5 3 +l 6 2 +m 3 8 +l 5 6 +l 6 3 +l 7 1 +l 9 0 + +75 27 13 59 +m 5 20 +l 5 1 +l 3 0 +m 6 19 +l 6 1 +m 9 19 +l 7 19 +l 7 1 +m 3 21 +l 5 20 +l 9 19 +l 14 19 +l 20 20 +l 23 21 +m 7 11 +l 8 13 +l 10 15 +l 13 16 +l 16 16 +l 19 15 +l 20 14 +l 20 12 +l 19 11 +l 14 9 +l 12 8 +l 11 7 +l 11 6 +l 12 5 +l 13 6 +l 12 7 +m 18 15 +l 19 14 +l 19 12 +l 18 11 +m 16 16 +l 18 14 +l 18 12 +l 17 11 +l 14 9 +m 14 9 +l 17 9 +l 20 8 +l 21 6 +l 21 4 +l 20 3 +m 18 8 +l 20 6 +l 20 4 +m 14 9 +l 17 8 +l 19 6 +l 20 3 +l 21 1 +l 22 0 +l 23 0 +m 3 0 +l 7 1 +l 11 1 +l 16 0 + +76 27 13 37 +m 5 20 +l 5 1 +m 6 19 +l 6 2 +m 9 19 +l 7 19 +l 7 2 +l 9 2 +m 23 16 +l 21 13 +l 20 11 +l 19 8 +l 19 6 +l 20 4 +l 22 3 +m 21 12 +l 20 9 +l 20 6 +l 21 4 +m 23 16 +l 22 14 +l 21 10 +l 21 7 +l 22 3 +l 23 0 +m 3 21 +l 5 20 +l 9 19 +l 14 19 +l 20 20 +l 23 21 +m 3 0 +l 5 1 +l 9 2 +l 14 2 +l 20 1 +l 23 0 + +77 27 13 58 +m 12 18 +l 12 2 +m 13 17 +l 13 3 +m 14 18 +l 14 2 +m 9 2 +l 7 4 +l 5 5 +l 4 6 +l 3 9 +l 3 14 +l 4 17 +l 6 19 +l 8 20 +l 11 21 +l 15 21 +l 18 20 +l 20 19 +l 22 17 +l 23 14 +l 23 9 +l 22 6 +l 21 5 +l 19 4 +l 17 2 +m 5 6 +l 4 9 +l 4 14 +l 5 17 +m 7 4 +l 6 6 +l 5 9 +l 5 15 +l 6 18 +l 8 20 +m 21 17 +l 22 14 +l 22 9 +l 21 6 +m 18 20 +l 20 18 +l 21 15 +l 21 9 +l 20 6 +l 19 4 +m 3 21 +l 7 19 +l 11 18 +l 15 18 +l 19 19 +l 23 21 +m 3 0 +l 6 1 +l 10 2 +l 16 2 +l 20 1 +l 23 0 + +78 27 13 41 +m 5 19 +l 5 1 +l 3 0 +m 7 19 +l 6 18 +l 6 1 +m 10 21 +l 8 20 +l 7 18 +l 7 1 +m 3 17 +l 5 19 +l 7 20 +l 10 21 +l 14 21 +l 17 20 +l 19 19 +l 21 17 +l 22 15 +l 23 12 +l 23 8 +l 22 6 +l 20 5 +m 21 16 +l 22 13 +l 22 9 +l 21 6 +m 17 20 +l 19 18 +l 20 16 +l 21 13 +l 21 9 +l 20 5 +l 20 3 +l 21 1 +l 22 0 +l 23 0 +m 3 0 +l 7 1 +l 11 1 +l 16 0 + +79 27 13 49 +m 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +l 22 6 +l 23 9 +l 23 12 +l 22 15 +l 21 17 +l 19 19 +l 17 20 +l 14 21 +l 12 21 +m 5 16 +l 4 13 +l 4 8 +l 5 5 +m 9 20 +l 7 18 +l 6 16 +l 5 13 +l 5 8 +l 6 5 +l 7 3 +l 9 1 +m 21 5 +l 22 8 +l 22 13 +l 21 16 +m 17 1 +l 19 3 +l 20 5 +l 21 8 +l 21 13 +l 20 16 +l 19 18 +l 17 20 + +80 27 13 44 +m 5 18 +l 5 1 +m 8 19 +l 6 17 +l 6 2 +m 12 21 +l 10 20 +l 8 18 +l 7 16 +l 7 2 +l 9 2 +m 3 16 +l 5 18 +l 9 20 +l 12 21 +l 15 21 +l 18 20 +l 20 19 +l 22 17 +l 23 14 +l 23 12 +l 22 9 +l 20 7 +l 17 6 +l 13 6 +l 10 7 +l 8 9 +l 7 12 +m 21 17 +l 22 15 +l 22 11 +l 21 9 +m 18 20 +l 20 18 +l 21 15 +l 21 11 +l 20 8 +l 17 6 +m 3 0 +l 5 1 +l 9 2 +l 14 2 +l 20 1 +l 23 0 + +81 27 13 66 +m 12 21 +l 9 20 +l 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +l 22 6 +l 23 9 +l 23 12 +l 22 15 +l 21 17 +l 19 19 +l 17 20 +l 14 21 +l 12 21 +m 5 16 +l 4 13 +l 4 8 +l 5 5 +m 9 20 +l 7 18 +l 6 16 +l 5 13 +l 5 8 +l 6 5 +l 7 3 +l 9 1 +m 21 5 +l 22 8 +l 22 13 +l 21 16 +m 17 1 +l 19 3 +l 20 5 +l 21 8 +l 21 13 +l 20 16 +l 19 18 +l 17 20 +m 5 8 +l 6 6 +l 9 5 +l 15 4 +l 22 4 +l 23 3 +l 23 1 +l 22 0 +l 22 1 +l 23 2 +m 11 4 +l 13 4 +m 6 6 +l 9 4 +l 12 3 +l 14 3 +l 15 4 + +82 27 13 59 +m 5 18 +l 5 1 +l 3 0 +m 6 18 +l 6 1 +m 7 19 +l 7 1 +m 3 16 +l 5 18 +l 7 19 +l 9 20 +l 12 21 +l 16 21 +l 20 20 +l 22 18 +l 23 16 +l 23 13 +l 22 11 +l 21 10 +m 20 19 +l 21 18 +l 22 16 +l 22 13 +l 21 11 +m 16 21 +l 18 20 +l 20 18 +l 21 16 +l 21 12 +l 20 10 +m 19 9 +l 16 8 +l 13 8 +l 11 9 +l 11 11 +l 13 12 +l 16 12 +l 19 11 +l 21 9 +l 23 6 +l 23 4 +l 22 3 +l 21 3 +m 19 10 +l 20 9 +l 22 5 +l 22 4 +l 21 7 +m 15 12 +l 17 11 +l 19 9 +l 20 7 +l 21 3 +l 22 1 +l 23 0 +m 3 0 +l 7 1 +l 11 1 +l 16 0 + +83 27 13 86 +m 15 21 +l 21 20 +l 23 21 +l 22 19 +l 22 17 +l 20 19 +l 18 20 +l 15 21 +l 11 21 +l 8 20 +l 5 17 +l 4 14 +l 4 12 +l 5 9 +l 7 7 +l 10 6 +l 13 6 +l 15 7 +l 16 8 +l 17 10 +l 17 11 +m 22 20 +l 21 19 +l 22 17 +m 5 11 +l 6 9 +l 7 8 +l 10 7 +l 13 7 +l 15 8 +m 6 18 +l 5 16 +l 5 13 +l 6 11 +l 8 9 +l 11 8 +l 13 8 +l 15 9 +l 17 11 +l 18 12 +l 19 12 +m 7 10 +l 8 10 +l 9 11 +l 11 13 +l 13 14 +l 16 14 +l 18 13 +l 20 11 +l 21 9 +l 21 6 +l 20 3 +l 18 1 +m 11 14 +l 13 15 +l 16 15 +l 19 14 +l 21 12 +l 22 9 +l 22 6 +l 21 4 +m 4 4 +l 5 2 +l 4 1 +m 9 11 +l 9 12 +l 10 14 +l 11 15 +l 13 16 +l 16 16 +l 19 15 +l 22 12 +l 23 9 +l 23 7 +l 22 4 +l 20 2 +l 18 1 +l 15 0 +l 11 0 +l 8 1 +l 6 2 +l 4 4 +l 4 2 +l 3 0 +l 5 1 +l 11 0 + +84 27 13 59 +m 12 19 +l 8 19 +l 6 18 +l 5 17 +l 4 15 +l 3 12 +l 3 8 +l 4 5 +l 5 3 +l 6 2 +l 8 1 +l 11 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +l 22 6 +l 23 9 +l 23 13 +l 22 16 +l 20 18 +l 18 19 +m 16 19 +l 15 18 +l 15 16 +l 16 15 +l 17 16 +l 16 17 +m 4 8 +l 5 5 +l 7 3 +l 9 2 +l 12 1 +l 15 1 +l 18 2 +m 5 17 +l 4 13 +l 4 10 +l 5 7 +l 7 4 +l 9 3 +l 12 2 +l 15 2 +l 18 3 +l 20 4 +l 22 7 +l 23 9 +m 3 21 +l 6 18 +m 6 19 +l 7 20 +m 4 20 +l 5 20 +l 6 21 +l 8 20 +l 12 19 +l 18 19 +l 21 20 +l 23 21 + +85 27 13 44 +m 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 16 0 +l 19 1 +l 21 2 +m 6 17 +l 5 15 +l 4 12 +l 4 8 +l 5 5 +m 6 18 +l 7 17 +l 7 16 +l 6 14 +l 5 11 +l 5 8 +l 6 5 +l 7 3 +l 9 1 +m 17 19 +l 19 19 +l 19 3 +l 18 1 +l 16 0 +m 20 19 +l 20 3 +l 19 2 +m 21 20 +l 21 2 +l 23 0 +m 3 21 +l 6 20 +l 12 19 +l 17 19 +l 21 20 +l 23 21 + +86 27 13 24 +m 3 21 +l 13 0 +m 4 20 +l 5 19 +l 12 4 +l 13 2 +m 5 20 +l 6 19 +l 13 4 +l 14 3 +m 23 21 +l 13 0 +m 18 13 +l 16 8 +m 20 15 +l 16 10 +l 15 7 +l 15 5 +m 3 21 +l 5 20 +l 10 19 +l 16 19 +l 21 20 +l 23 21 + +87 27 13 58 +m 7 19 +l 5 17 +l 4 15 +l 3 12 +l 3 9 +l 4 6 +l 5 4 +l 7 2 +l 9 1 +l 12 0 +l 14 0 +l 17 1 +l 19 2 +l 21 4 +l 22 6 +l 23 9 +l 23 12 +l 22 15 +l 21 17 +l 19 19 +m 5 15 +l 4 12 +l 4 9 +l 5 6 +l 6 4 +m 5 17 +l 6 16 +l 6 15 +l 5 12 +l 5 9 +l 6 5 +l 7 3 +l 9 1 +m 20 4 +l 21 6 +l 22 9 +l 22 12 +l 21 15 +m 17 1 +l 19 3 +l 20 5 +l 21 9 +l 21 12 +l 20 15 +l 20 16 +l 21 17 +m 12 18 +l 12 0 +m 13 17 +l 13 1 +m 14 18 +l 14 0 +m 3 21 +l 7 19 +l 11 18 +l 15 18 +l 19 19 +l 23 21 + +88 27 13 32 +m 3 21 +l 19 2 +l 20 1 +m 4 20 +l 6 19 +l 21 1 +m 7 19 +l 23 0 +m 23 21 +l 14 11 +m 12 9 +l 5 1 +m 11 8 +l 8 6 +l 7 4 +m 12 9 +l 8 7 +l 7 6 +l 6 4 +l 6 2 +m 3 21 +l 7 19 +l 11 18 +l 15 18 +l 19 19 +l 23 21 +m 3 0 +l 5 1 +l 9 2 +l 14 2 +l 20 1 +l 23 0 + +89 27 13 39 +m 19 19 +l 19 1 +m 20 19 +l 20 2 +m 21 20 +l 21 2 +m 6 19 +l 4 17 +l 3 14 +l 3 11 +l 4 8 +l 6 6 +l 8 5 +l 11 4 +l 14 4 +l 17 5 +l 19 6 +m 7 6 +l 10 5 +l 16 5 +m 3 11 +l 4 9 +l 6 7 +l 9 6 +l 15 6 +l 17 5 +m 3 21 +l 7 19 +l 11 18 +l 15 18 +l 19 19 +l 23 21 +m 3 4 +l 5 2 +l 7 1 +l 11 0 +l 15 0 +l 19 1 +l 23 3 + +90 27 13 65 +m 3 21 +l 4 20 +l 6 19 +l 9 19 +l 14 21 +l 17 21 +l 20 20 +l 21 18 +l 21 16 +l 20 14 +m 19 20 +l 20 18 +l 20 16 +l 19 14 +m 17 21 +l 18 20 +l 19 18 +l 19 15 +m 19 13 +l 15 12 +l 13 12 +l 11 13 +l 11 15 +l 13 16 +l 15 16 +l 19 15 +m 15 16 +l 17 15 +l 18 14 +l 17 13 +l 15 12 +m 20 14 +l 22 12 +l 23 9 +l 23 7 +l 22 4 +l 20 2 +l 18 1 +l 15 0 +l 11 0 +l 8 1 +l 6 2 +l 4 4 +l 3 7 +l 3 9 +l 4 12 +l 5 13 +l 7 14 +l 9 14 +l 11 13 +l 11 11 +l 10 10 +l 9 11 +l 10 12 +m 19 14 +l 21 12 +l 22 10 +l 22 6 +l 21 4 +m 19 13 +l 20 12 +l 21 10 +l 21 6 +l 20 3 +l 18 1 + +91 15 7 8 +m 4 25 +l 4 -7 +m 5 25 +l 5 -7 +m 4 25 +l 11 25 +m 4 -7 +l 11 -7 + +92 23 11 2 +m 2 23 +l 20 3 + +93 15 7 8 +m 9 25 +l 9 -7 +m 10 25 +l 10 -7 +m 3 25 +l 10 25 +m 3 -7 +l 10 -7 + +94 23 11 6 +m 3 7 +l 11 12 +l 19 7 +m 3 7 +l 11 11 +l 19 7 + +95 21 10 2 +m 0 -2 +l 21 -2 + +96 25 12 22 +m 3 6 +l 3 8 +l 4 11 +l 6 12 +l 8 12 +l 10 11 +l 14 8 +l 16 7 +l 18 7 +l 20 8 +l 21 10 +m 3 8 +l 4 10 +l 6 11 +l 8 11 +l 10 10 +l 14 7 +l 16 6 +l 18 6 +l 20 7 +l 21 10 +l 21 12 + +97 18 9 35 +m 6 10 +l 3 7 +l 3 3 +l 6 0 +l 10 2 +m 4 7 +l 4 3 +l 6 1 +m 5 9 +l 5 4 +l 8 1 +m 8 8 +l 3 13 +l 4 14 +l 5 13 +l 4 12 +m 5 13 +l 9 13 +l 11 14 +l 13 12 +l 13 3 +l 14 2 +m 11 13 +l 12 12 +l 12 3 +l 11 2 +l 12 1 +l 13 2 +l 12 3 +m 9 13 +l 11 11 +l 11 3 +l 10 2 +l 12 0 +l 14 2 + +98 18 9 25 +m 5 19 +l 3 21 +l 4 17 +l 4 3 +l 7 0 +l 12 2 +l 14 3 +m 5 19 +l 5 3 +l 7 1 +m 5 19 +l 7 21 +l 6 17 +l 6 4 +l 9 1 +m 6 12 +l 11 14 +l 14 11 +l 14 3 +m 11 13 +l 13 11 +l 13 3 +m 9 13 +l 12 10 +l 12 2 + +99 13 6 18 +m 3 11 +l 3 2 +l 5 0 +l 7 2 +m 4 11 +l 4 2 +l 5 1 +m 5 12 +l 5 3 +l 6 2 +l 7 2 +m 3 11 +l 9 14 +l 11 12 +l 9 11 +l 7 13 +m 8 13 +l 10 12 + +100 17 8 26 +m 8 14 +l 3 11 +l 3 3 +l 6 0 +l 8 1 +l 11 2 +l 13 2 +m 4 11 +l 4 3 +l 6 1 +m 5 12 +l 5 4 +l 8 1 +m 6 18 +l 6 21 +l 7 18 +l 13 11 +l 13 2 +m 6 18 +l 12 11 +l 12 3 +m 6 18 +l 3 18 +l 6 17 +l 11 11 +l 11 2 + +101 14 7 19 +m 3 11 +l 3 2 +l 5 0 +l 7 2 +m 4 11 +l 4 2 +l 5 1 +m 5 12 +l 5 3 +l 6 2 +l 7 2 +m 3 11 +l 9 14 +l 12 10 +l 5 6 +m 8 13 +l 11 10 +m 7 13 +l 10 9 + +102 13 6 25 +m 4 18 +l 4 3 +l 3 2 +l 5 0 +m 5 18 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 6 19 +l 6 3 +l 7 2 +l 5 0 +m 4 18 +l 10 21 +l 12 19 +l 10 18 +l 8 20 +m 9 20 +l 11 19 +m 1 14 +l 4 14 +m 6 14 +l 10 14 + +103 18 9 34 +m 3 11 +l 3 3 +l 6 0 +l 11 2 +m 4 11 +l 4 3 +l 6 1 +m 5 12 +l 5 4 +l 8 1 +m 3 11 +l 5 12 +l 10 14 +l 13 11 +l 13 -2 +l 12 -4 +l 11 -5 +l 9 -6 +l 7 -6 +l 5 -5 +l 3 -6 +l 5 -7 +l 7 -6 +m 10 13 +l 12 11 +l 12 -2 +l 11 -4 +m 6 -6 +l 4 -6 +m 8 13 +l 11 10 +l 11 -3 +l 10 -5 +l 9 -6 + +104 19 9 36 +m 5 19 +l 3 21 +l 4 17 +l 4 3 +l 3 2 +l 5 0 +m 5 19 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 5 19 +l 7 21 +l 6 17 +l 6 3 +l 7 2 +l 5 0 +m 6 12 +l 9 13 +l 11 14 +l 14 11 +l 14 2 +l 11 -2 +l 11 -5 +l 12 -7 +l 13 -7 +l 11 -5 +m 11 13 +l 13 11 +l 13 2 +l 12 0 +m 9 13 +l 12 10 +l 12 1 +l 11 -2 + +105 11 5 32 +m 5 21 +l 3 19 +l 5 17 +l 7 19 +l 5 21 +m 5 20 +l 4 19 +l 5 18 +l 6 19 +l 5 20 +m 5 14 +l 3 12 +l 4 11 +l 4 3 +l 3 2 +l 5 0 +m 5 11 +l 6 12 +l 5 13 +l 4 12 +l 5 11 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 5 14 +l 7 12 +l 6 11 +l 6 3 +l 7 2 +l 5 0 + +106 11 5 32 +m 5 21 +l 3 19 +l 5 17 +l 7 19 +l 5 21 +m 5 20 +l 4 19 +l 5 18 +l 6 19 +l 5 20 +m 5 14 +l 3 12 +l 4 11 +l 4 2 +l 7 -2 +m 5 11 +l 6 12 +l 5 13 +l 4 12 +l 5 11 +l 5 2 +l 6 0 +m 5 14 +l 7 12 +l 6 11 +l 6 1 +l 7 -2 +l 7 -5 +l 5 -7 +l 3 -6 +l 3 -7 +l 5 -7 + +107 18 9 42 +m 5 19 +l 3 21 +l 4 17 +l 4 3 +l 3 2 +l 5 0 +m 5 19 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 5 19 +l 7 21 +l 6 17 +l 6 3 +l 7 2 +l 5 0 +m 6 11 +l 9 13 +l 11 14 +l 13 11 +l 10 9 +l 6 6 +m 10 13 +l 12 11 +m 9 13 +l 11 10 +m 9 8 +l 10 7 +l 11 2 +l 13 0 +l 15 2 +m 10 8 +l 11 6 +l 12 2 +l 13 1 +m 10 9 +l 11 8 +l 13 3 +l 14 2 +l 15 2 + +108 11 5 18 +m 5 19 +l 3 21 +l 4 17 +l 4 3 +l 3 2 +l 5 0 +m 5 19 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 5 19 +l 7 21 +l 6 17 +l 6 3 +l 7 2 +l 5 0 + +109 27 13 57 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 3 2 +l 5 0 +m 4 13 +l 5 12 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 2 12 +l 4 14 +l 6 12 +l 6 3 +l 7 2 +l 5 0 +m 6 12 +l 9 13 +l 11 14 +l 14 12 +l 14 3 +l 15 2 +l 13 0 +m 11 13 +l 13 12 +l 13 3 +l 12 2 +l 13 1 +l 14 2 +l 13 3 +m 9 13 +l 12 11 +l 12 3 +l 11 2 +l 13 0 +m 14 12 +l 17 13 +l 19 14 +l 22 12 +l 22 3 +l 23 2 +l 21 0 +m 19 13 +l 21 12 +l 21 3 +l 20 2 +l 21 1 +l 22 2 +l 21 3 +m 17 13 +l 20 11 +l 20 3 +l 19 2 +l 21 0 + +110 19 9 38 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 3 2 +l 5 0 +m 4 13 +l 5 12 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 2 12 +l 4 14 +l 6 12 +l 6 3 +l 7 2 +l 5 0 +m 6 12 +l 9 13 +l 11 14 +l 14 12 +l 14 3 +l 15 2 +l 13 0 +m 11 13 +l 13 12 +l 13 3 +l 12 2 +l 13 1 +l 14 2 +l 13 3 +m 9 13 +l 12 11 +l 12 3 +l 11 2 +l 13 0 + +111 17 8 22 +m 3 11 +l 3 3 +l 6 0 +l 11 2 +l 13 3 +m 4 11 +l 4 3 +l 6 1 +m 5 12 +l 5 4 +l 8 1 +m 3 11 +l 5 12 +l 10 14 +l 13 11 +l 13 3 +m 10 13 +l 12 11 +l 12 3 +m 8 13 +l 11 10 +l 11 2 + +112 18 9 38 +m 3 14 +l 4 12 +l 4 3 +l 2 2 +l 4 2 +l 4 -4 +l 3 -7 +l 5 -5 +m 5 12 +l 5 -5 +m 3 14 +l 5 13 +l 6 12 +l 6 3 +l 8 2 +l 9 1 +m 5 2 +l 6 2 +l 8 1 +m 6 1 +l 7 0 +l 12 2 +l 14 3 +m 6 1 +l 6 -4 +l 7 -7 +l 5 -5 +m 6 12 +l 9 13 +l 11 14 +l 14 11 +l 14 3 +m 11 13 +l 13 11 +l 13 3 +m 9 13 +l 12 10 +l 12 2 + +113 18 9 25 +m 3 11 +l 3 3 +l 6 0 +l 11 2 +m 4 11 +l 4 3 +l 6 1 +m 5 12 +l 5 4 +l 8 1 +m 3 11 +l 5 12 +l 10 14 +l 13 11 +l 13 -4 +l 14 -7 +l 12 -5 +m 10 13 +l 12 11 +l 12 -5 +m 8 13 +l 11 10 +l 11 -4 +l 10 -7 +l 12 -5 + +114 14 7 26 +m 2 12 +l 3 12 +l 4 11 +l 4 3 +l 3 2 +l 5 0 +m 4 13 +l 5 12 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 2 12 +l 4 14 +l 6 12 +l 6 3 +l 7 2 +l 5 0 +m 6 12 +l 10 14 +l 12 12 +l 10 11 +l 8 13 +m 9 13 +l 11 12 + +115 17 8 32 +m 3 11 +l 3 8 +l 5 6 +l 11 9 +l 13 7 +l 13 3 +m 4 11 +l 4 8 +l 5 7 +m 5 12 +l 5 8 +l 6 7 +m 11 8 +l 12 7 +l 12 3 +m 10 8 +l 11 7 +l 11 2 +m 3 11 +l 9 14 +l 12 13 +l 10 12 +l 7 13 +m 8 13 +l 11 13 +m 13 3 +l 7 0 +l 3 2 +l 5 3 +l 9 1 +m 5 2 +l 7 1 + +116 11 5 22 +m 5 19 +l 3 21 +l 4 17 +l 4 3 +l 3 2 +l 5 0 +m 5 19 +l 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 +m 5 19 +l 7 21 +l 6 17 +l 6 3 +l 7 2 +l 5 0 +m 1 14 +l 4 14 +m 6 14 +l 9 14 + +117 19 9 34 +m 2 12 +l 3 12 +l 4 11 +l 4 2 +l 7 0 +l 12 2 +m 4 13 +l 5 12 +l 5 2 +l 7 1 +m 2 12 +l 4 14 +l 6 12 +l 6 3 +l 9 1 +m 13 14 +l 15 12 +l 14 11 +l 14 3 +l 15 2 +l 16 2 +m 13 11 +l 14 12 +l 13 13 +l 12 12 +l 13 11 +l 13 2 +l 14 1 +m 13 14 +l 11 12 +l 12 11 +l 12 2 +l 14 0 +l 16 2 + +118 19 9 30 +m 3 14 +l 4 12 +l 4 3 +l 8 0 +l 10 2 +l 14 4 +m 4 13 +l 5 12 +l 5 3 +l 8 1 +m 3 14 +l 5 13 +l 6 12 +l 6 4 +l 9 2 +l 10 2 +m 13 14 +l 15 12 +l 14 11 +l 14 4 +m 13 11 +l 14 12 +l 13 13 +l 12 12 +l 13 11 +l 13 4 +m 13 14 +l 11 12 +l 12 11 +l 12 3 + +119 27 13 50 +m 3 14 +l 4 12 +l 4 3 +l 8 0 +l 10 2 +l 12 3 +m 4 13 +l 5 12 +l 5 3 +l 8 1 +m 3 14 +l 5 13 +l 6 12 +l 6 4 +l 9 2 +l 10 2 +m 13 14 +l 11 12 +l 12 11 +l 12 3 +l 16 0 +l 18 2 +l 22 4 +m 13 11 +l 14 12 +l 13 13 +l 12 12 +l 13 11 +l 13 3 +l 16 1 +m 13 14 +l 15 12 +l 14 11 +l 14 4 +l 17 2 +l 18 2 +m 21 14 +l 23 12 +l 22 11 +l 22 4 +m 21 11 +l 22 12 +l 21 13 +l 20 12 +l 21 11 +l 21 4 +m 21 14 +l 19 12 +l 20 11 +l 20 3 + +120 19 9 32 +m 3 12 +l 5 11 +l 12 1 +l 13 0 +l 15 2 +m 4 13 +l 6 12 +l 12 2 +l 14 1 +m 3 12 +l 5 14 +l 6 13 +l 13 3 +l 15 2 +m 15 14 +l 13 14 +l 13 12 +l 15 12 +l 15 14 +l 13 12 +l 10 8 +m 8 6 +l 5 2 +l 3 0 +l 5 0 +l 5 2 +l 3 2 +l 3 0 +m 5 7 +l 8 7 +m 10 7 +l 13 7 + +121 19 9 42 +m 2 12 +l 3 12 +l 4 11 +l 4 2 +l 7 0 +l 12 2 +m 4 13 +l 5 12 +l 5 2 +l 7 1 +m 2 12 +l 4 14 +l 6 12 +l 6 3 +l 9 1 +m 13 14 +l 15 12 +l 14 11 +l 14 -2 +l 13 -4 +l 12 -5 +l 10 -6 +l 8 -6 +l 6 -5 +l 4 -6 +l 6 -7 +l 8 -6 +m 13 11 +l 14 12 +l 13 13 +l 12 12 +l 13 11 +l 13 -3 +l 12 -4 +m 7 -6 +l 5 -6 +m 13 14 +l 11 12 +l 12 11 +l 12 -3 +l 11 -5 +l 10 -6 + +122 16 8 36 +m 6 13 +l 3 11 +l 3 12 +l 6 13 +l 8 14 +l 11 12 +l 11 8 +l 6 6 +m 8 13 +l 10 12 +l 10 8 +m 6 13 +l 9 11 +l 9 8 +l 8 7 +m 6 6 +l 11 4 +l 11 -2 +l 10 -4 +l 9 -5 +l 7 -6 +l 5 -6 +l 3 -5 +l 1 -6 +l 3 -7 +l 5 -6 +m 10 4 +l 10 -3 +l 9 -4 +m 4 -6 +l 2 -6 +m 8 5 +l 9 4 +l 9 -3 +l 8 -5 +l 7 -6 + +123 15 7 37 +m 9 25 +l 7 24 +l 6 23 +l 5 21 +l 5 19 +l 6 17 +l 7 16 +l 8 14 +l 8 12 +l 6 10 +m 7 24 +l 6 22 +l 6 20 +l 7 18 +l 8 17 +l 9 15 +l 9 13 +l 8 11 +l 4 9 +l 8 7 +l 9 5 +l 9 3 +l 8 1 +l 7 0 +l 6 -2 +l 6 -4 +l 7 -6 +m 6 8 +l 8 6 +l 8 4 +l 7 2 +l 6 1 +l 5 -1 +l 5 -3 +l 6 -5 +l 7 -6 +l 9 -7 + +124 9 4 2 +m 4 25 +l 4 -7 + +125 15 7 37 +m 5 25 +l 7 24 +l 8 23 +l 9 21 +l 9 19 +l 8 17 +l 7 16 +l 6 14 +l 6 12 +l 8 10 +m 7 24 +l 8 22 +l 8 20 +l 7 18 +l 6 17 +l 5 15 +l 5 13 +l 6 11 +l 10 9 +l 6 7 +l 5 5 +l 5 3 +l 6 1 +l 7 0 +l 8 -2 +l 8 -4 +l 7 -6 +m 8 8 +l 6 6 +l 6 4 +l 7 2 +l 8 1 +l 9 -1 +l 9 -3 +l 8 -5 +l 7 -6 +l 5 -7 diff --git a/cd/etc/vectorfont13.txt b/cd/etc/vectorfont13.txt new file mode 100755 index 0000000..343c895 --- /dev/null +++ b/cd/etc/vectorfont13.txt @@ -0,0 +1,2112 @@ +Simplex II ISO8859 +27 21 12 -7 + + +32 8 4 0 + +33 13 6 12 +m 1 21 +l 0 19 +l 1 7 +l 2 19 +l 1 21 +m 1 19 +l 1 13 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +34 15 7 16 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 +m 8 24 +l 7 23 +l 6 24 +l 7 25 +l 8 24 +l 8 22 +l 7 20 +l 6 19 + +35 19 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 20 10 24 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +37 22 11 29 +m 0 0 +l 18 21 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 23 11 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 9 4 8 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 + +40 14 7 10 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 + +41 14 7 10 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 + +42 16 8 6 +m 5 15 +l 5 3 +m 0 12 +l 10 6 +m 10 12 +l 0 6 + +43 26 13 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 10 5 8 +m 2 1 +l 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +45 26 13 2 +m 0 9 +l 18 9 + +46 10 5 4 +m 1 2 +l 0 1 +l 1 0 +l 2 1 + +47 22 11 2 +m 18 25 +l 0 -7 + +48 20 10 17 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 + +49 16 8 4 +m 0 17 +l 2 18 +l 5 21 +l 5 0 + +50 20 10 14 +m 1 16 +l 1 17 +l 2 19 +l 3 20 +l 5 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 10 10 +l 0 0 +l 14 0 + +51 20 10 15 +m 2 21 +l 13 21 +l 7 13 +l 10 13 +l 12 12 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +52 20 10 5 +m 10 21 +l 0 7 +l 15 7 +m 10 21 +l 10 0 + +53 20 10 17 +m 12 21 +l 2 21 +l 1 12 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +54 20 10 23 +m 12 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 7 +l 1 3 +l 3 1 +l 6 0 +l 7 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 7 13 +l 6 13 +l 3 12 +l 1 10 +l 0 7 + +55 20 10 3 +m 0 21 +l 14 21 +l 4 0 + +56 20 10 29 +m 5 21 +l 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 8 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 7 +l 1 9 +l 3 11 +l 6 12 +l 10 13 +l 12 14 +l 13 16 +l 13 18 +l 12 20 +l 9 21 +l 5 21 + +57 20 10 23 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 7 21 +l 10 20 +l 12 18 +l 13 14 +l 13 9 +l 12 4 +l 10 1 +l 7 0 +l 5 0 +l 2 1 +l 1 3 + +58 15 7 10 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 14 7 12 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 26 13 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 18 9 21 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 10 20 +l 11 18 +l 11 16 +l 10 14 +l 9 13 +l 5 11 +l 5 8 +m 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 + +64 31 14 50 +m 17 13 +l 16 15 +l 14 16 +l 11 16 +l 9 15 +l 8 14 +l 7 11 +l 7 8 +l 8 6 +l 10 5 +l 13 5 +l 15 6 +l 16 8 +m 11 16 +l 9 14 +l 8 11 +l 8 8 +l 9 6 +l 10 5 +m 17 16 +l 16 8 +l 16 6 +l 19 5 +m 18 16 +l 17 8 +l 17 6 +l 19 5 +l 24 5 +l 26 7 +l 27 10 +l 27 13 +l 25 18 +l 21 22 +l 19 23 +l 15 24 +l 12 24 +l 7 23 +l 4 21 +l 1 17 +l 0 14 +l 0 7 +l 2 3 +l 5 0 +l 8 -2 +l 10 -3 +l 14 -4 +l 18 -4 +l 22 -2 +l 24 0 +l 26 3 + +65 22 11 5 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 + +66 21 10 20 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +m 0 11 +l 9 11 +l 12 10 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 0 0 + +67 21 10 18 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 + +68 21 10 13 +m 0 0 +l 0 21 +l 7 21 +l 10 20 +l 12 18 +l 13 16 +l 14 13 +l 14 8 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 0 0 + +69 19 9 7 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 + +70 18 9 5 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 + +71 21 10 20 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 15 8 +l 10 8 + +72 22 11 6 +m 0 0 +l 0 21 +m 14 21 +l 14 0 +m 0 11 +l 14 11 + +73 8 4 2 +m 0 0 +l 0 21 + +74 16 8 10 +m 10 21 +l 10 5 +l 9 2 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 2 +l 0 5 +l 0 7 + +75 21 10 6 +m 0 0 +l 0 21 +m 14 21 +l 0 7 +m 5 12 +l 14 0 + +76 17 8 3 +m 0 21 +l 0 0 +l 12 0 + +77 24 12 5 +m 0 0 +l 0 21 +l 8 0 +l 16 21 +l 16 0 + +78 22 11 4 +m 0 0 +l 0 21 +l 14 0 +l 14 21 + +79 22 11 21 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +80 21 10 11 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 14 +l 13 12 +l 12 11 +l 9 10 +l 0 10 + +81 22 11 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 9 4 +l 15 -2 + +82 21 10 13 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +l 0 11 +m 7 11 +l 14 0 + +83 20 10 20 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +84 18 9 4 +m 7 21 +l 7 0 +m 0 21 +l 14 21 + +85 22 11 10 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 + +86 20 10 3 +m 0 21 +l 8 0 +l 16 21 + +87 24 12 5 +m 0 21 +l 5 0 +l 10 21 +l 15 0 +l 20 21 + +88 20 10 4 +m 0 0 +l 14 21 +m 0 21 +l 14 0 + +89 20 10 5 +m 0 21 +l 8 11 +l 16 21 +m 8 11 +l 8 0 + +90 20 10 4 +m 0 21 +l 14 21 +l 0 0 +l 14 0 + +91 15 7 4 +m 7 25 +l 0 25 +l 0 -7 +l 7 -7 + +92 22 11 2 +m 0 25 +l 18 -7 + +93 12 6 4 +m 0 25 +l 7 25 +l 7 -7 +l 0 -7 + +94 20 10 3 +m 0 18 +l 7 25 +l 14 18 + +95 24 12 2 +m 0 -2 +l 20 -2 + +96 9 4 8 +m 0 24 +l 1 23 +l 2 24 +l 1 25 +l 0 24 +l 0 22 +l 1 20 +l 2 19 + +97 19 9 16 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +98 19 9 16 +m 0 0 +l 0 21 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +99 18 9 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +100 19 9 16 +m 12 21 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +101 18 9 17 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +102 12 6 7 +m 8 21 +l 6 21 +l 4 20 +l 3 17 +l 3 0 +m 0 14 +l 7 14 + +103 19 9 21 +m 12 14 +l 12 -2 +l 11 -5 +l 10 -6 +l 8 -7 +l 5 -7 +l 3 -6 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +104 19 9 9 +m 0 0 +l 0 21 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +105 8 4 7 +m 0 20 +l 1 19 +l 2 20 +l 1 21 +l 0 20 +m 1 14 +l 1 0 + +106 10 5 10 +m 4 20 +l 5 19 +l 6 20 +l 5 21 +l 4 20 +m 5 14 +l 5 -3 +l 4 -6 +l 2 -7 +l 0 -7 + +107 17 8 6 +m 0 0 +l 0 21 +m 10 14 +l 0 4 +m 4 8 +l 11 0 + +108 8 4 2 +m 0 0 +l 0 21 + +109 30 15 16 +m 0 0 +l 0 14 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 +m 11 10 +l 14 13 +l 16 14 +l 19 14 +l 21 13 +l 22 10 +l 22 0 + +110 19 9 9 +m 0 0 +l 0 14 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +111 19 9 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +112 19 9 16 +m 0 14 +l 0 -7 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +113 19 9 16 +m 12 14 +l 12 -7 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +114 13 6 7 +m 0 0 +l 0 14 +m 0 8 +l 1 11 +l 3 13 +l 5 14 +l 8 14 + +115 17 8 17 +m 11 11 +l 10 13 +l 7 14 +l 4 14 +l 1 13 +l 0 11 +l 1 9 +l 3 8 +l 8 7 +l 10 6 +l 11 4 +l 11 3 +l 10 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 + +116 14 7 7 +m 3 21 +l 3 4 +l 4 1 +l 6 0 +l 8 0 +m 0 14 +l 7 14 + +117 19 9 9 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +118 16 8 3 +m 0 14 +l 6 0 +l 12 14 + +119 22 11 5 +m 0 14 +l 4 0 +l 8 14 +l 12 0 +l 16 14 + +120 17 8 4 +m 0 0 +l 11 14 +m 11 0 +l 0 14 + +121 16 8 8 +m 1 14 +l 7 0 +m 13 14 +l 7 0 +l 5 -4 +l 3 -6 +l 1 -7 +l 0 -7 + +122 17 8 4 +m 0 14 +l 11 14 +l 0 0 +l 11 0 + +123 12 6 21 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +l 0 9 +l 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 7 3 2 +m 0 25 +l 0 -7 + +125 11 5 21 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +l 5 9 +l 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 26 13 22 +m 0 6 +l 0 8 +l 1 11 +l 3 12 +l 5 12 +l 7 11 +l 11 8 +l 13 7 +l 15 7 +l 17 8 +l 18 10 +m 0 8 +l 1 10 +l 3 11 +l 5 11 +l 7 10 +l 11 7 +l 13 6 +l 15 6 +l 17 7 +l 18 10 +l 18 12 + +128 21 10 22 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +m 8 0 +l 6 -3 +l 9 -3 +l 7 -6 + +129 19 9 13 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 +m 8 15 +l 8 16 +m 3 15 +l 3 16 + +130 18 9 21 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +131 19 9 19 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +133 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 0 22 +l 1 22 +l 3 17 + +135 18 9 18 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 6 0 +l 5 -2 +l 7 -2 +l 6 -4 + +136 18 9 20 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +144 19 9 11 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +147 19 9 20 +m 10 17 +l 6 20 +l 2 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +154 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 4 22 +l 4 24 +m 10 22 +l 10 24 + +160 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +161 8 4 6 +m 1 14 +l 1 0 +m 1 18 +l 3 21 +l 4 21 +l 1 18 + +162 19 9 21 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +163 19 9 13 +m 8 17 +l 10 22 +l 11 22 +l 8 17 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +181 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +182 22 11 8 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 3 23 +l 8 27 +l 13 23 + +183 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 6 27 +l 5 27 +l 8 23 + +192 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 6 27 +l 5 27 +l 8 23 + +193 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +194 22 11 8 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 3 23 +l 8 27 +l 13 23 + +195 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +198 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 5 19 +l 9 17 +l 11 19 + +199 21 10 22 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +m 8 0 +l 7 -2 +l 9 -2 +l 8 -4 + + +201 19 9 11 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +202 19 9 10 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 1 23 +l 6 27 +l 11 23 + +205 8 4 6 +m 0 0 +l 0 21 +m 0 23 +l 2 27 +l 3 27 +l 0 23 + +210 19 9 10 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 1 23 +l 6 27 +l 11 23 + +211 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +212 22 11 24 +m 3 23 +l 8 27 +l 13 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +213 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +214 8 4 6 +m 0 0 +l 0 21 +m 0 23 +l 2 27 +l 3 27 +l 0 23 + +218 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +220 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 4 22 +l 4 24 +m 10 22 +l 10 24 + +224 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 6 22 +l 5 22 +l 8 17 + +225 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +226 19 9 19 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +227 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 5 19 +l 9 17 +l 11 19 + +228 19 9 21 +m 3 17 +l 5 19 +l 9 17 +l 11 19 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +229 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +231 18 9 18 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 6 0 +l 5 -2 +l 7 -2 +l 6 -4 + +233 18 9 21 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + + +234 18 9 20 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +237 8 4 6 +m 1 14 +l 1 0 +m 1 18 +l 3 21 +l 4 21 +l 1 18 + +243 19 9 21 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +244 19 9 20 +m 10 17 +l 6 20 +l 2 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +245 19 9 21 +m 3 17 +l 5 19 +l 9 17 +l 11 19 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +250 19 9 13 +m 8 17 +l 10 22 +l 11 22 +l 8 17 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +252 19 9 13 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 +m 8 15 +l 8 16 +m 3 15 +l 3 16 diff --git a/cd/etc/vectorfont14.txt b/cd/etc/vectorfont14.txt new file mode 100755 index 0000000..70fbccf --- /dev/null +++ b/cd/etc/vectorfont14.txt @@ -0,0 +1,1102 @@ +CALGKS 2nd set +15 15 7 -7 + + +0 15 7 0 + +1 15 7 0 + +2 15 7 0 + +3 15 7 0 + +4 15 7 0 + +5 15 7 0 + +6 15 7 0 + +7 15 7 0 + +8 15 7 0 + +9 15 7 0 + +10 15 7 0 + +11 15 7 0 + +12 15 7 0 + +13 15 7 0 + +14 15 7 0 + +15 15 7 0 + +16 15 7 0 + +17 15 7 0 + +18 15 7 0 + +19 15 7 0 + +20 15 7 0 + +21 15 7 0 + +22 15 7 0 + +23 15 7 0 + +24 15 7 0 + +25 15 7 0 + +26 15 7 0 + +27 15 7 0 + +28 15 7 0 + +29 15 7 0 + +30 15 7 0 + +31 15 7 0 + +32 15 7 10 +m 2 -4 +l 2 8 +m 2 6 +l 4 8 +l 6 8 +l 8 6 +l 8 2 +l 6 0 +l 4 0 +l 2 2 + +33 15 7 11 +m 9 -2 +l 8 -4 +l 8 8 +m 8 6 +l 6 8 +l 4 8 +l 2 6 +l 2 2 +l 4 0 +l 6 0 +l 8 2 + +34 15 7 6 +m 8 6 +l 6 8 +l 4 8 +l 2 6 +m 2 8 +l 2 0 + +35 15 7 12 +m 2 2 +l 4 0 +l 6 0 +l 8 2 +l 8 4 +l 6 5 +l 3 5 +l 2 6 +l 2 7 +l 4 8 +l 6 8 +l 8 7 + +36 15 7 6 +m 5 14 +l 5 1 +l 6 0 +l 8 0 +m 3 9 +l 7 9 + +37 15 7 8 +m 2 8 +l 2 2 +l 4 0 +l 6 0 +l 8 2 +l 8 8 +m 8 0 +l 8 2 + +38 15 7 3 +m 2 8 +l 5 0 +l 8 8 + +39 15 7 5 +m 1 8 +l 3 0 +l 5 8 +l 7 0 +l 9 8 + +40 15 7 4 +m 2 8 +l 8 0 +m 8 8 +l 2 0 + +41 15 7 5 +m 2 8 +l 5 1 +l 8 8 +m 2 -4 +l 5 1 + +42 15 7 4 +m 2 8 +l 8 8 +l 2 0 +l 8 0 + +43 15 7 9 +m 7 14 +l 6 14 +l 5 13 +l 5 8 +l 4 7 +l 5 6 +l 5 1 +l 6 0 +l 7 0 + +44 15 7 4 +m 5 14 +l 5 8 +m 5 6 +l 5 0 + +45 15 7 9 +m 4 0 +l 5 0 +l 6 1 +l 6 6 +l 7 7 +l 6 8 +l 6 13 +l 5 14 +l 4 14 + +46 15 7 6 +m 2 6 +l 4 8 +l 6 8 +l 8 6 +l 10 6 +l 12 8 + +47 15 7 4 +m 5 9 +l 4 12 +l 3 11 +l 5 9 + +48 15 7 0 + +49 15 7 10 +m 8 2 +l 6 0 +l 4 0 +l 2 2 +l 2 5 +l 4 7 +l 6 7 +l 8 5 +m 5 0 +l 5 8 + +50 15 7 21 +m 6 1 +l 4 1 +l 2 2 +l 1 4 +l 1 6 +l 2 8 +l 4 9 +l 6 9 +l 8 8 +l 9 6 +l 9 4 +l 8 2 +l 6 1 +m 8 2 +l 10 0 +m 8 8 +l 10 10 +m 2 8 +l 0 10 +m 2 2 +l 0 0 + +51 15 7 21 +m 0 3 +l 0 5 +l 1 7 +l 3 8 +l 5 8 +l 7 7 +l 8 5 +l 8 3 +l 7 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +m 2 2 +l 2 6 +l 5 6 +l 6 5 +l 5 4 +l 2 4 +m 4 4 +l 6 2 + +52 15 7 41 +m 0 0 +l 14 0 +l 0 1 +l 14 1 +l 0 2 +l 14 2 +l 0 3 +l 14 3 +l 0 5 +l 14 5 +l 0 7 +l 14 7 +l 0 9 +l 14 9 +l 0 11 +l 14 11 +l 0 13 +l 14 13 +l 0 14 +l 14 14 +l 0 15 +l 14 15 +l 14 0 +l 13 15 +l 13 0 +l 12 15 +l 12 0 +l 10 15 +l 10 0 +l 8 15 +l 8 0 +l 6 15 +l 6 0 +l 4 15 +l 4 0 +l 2 15 +l 2 0 +l 1 15 +l 1 0 +l 0 15 +l 0 0 + +53 15 7 16 +m 10 12 +l 7 15 +l 3 15 +l 0 12 +l 2 10 +l 8 9 +l 10 7 +l 8 5 +l 2 6 +l 0 8 +l 2 10 +m 8 5 +l 10 3 +l 8 0 +l 3 0 +l 0 3 + +54 15 7 28 +m 7 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 +l 0 7 +l 1 9 +l 2 10 +l 4 11 +l 7 11 +l 9 10 +l 10 9 +l 11 7 +l 11 4 +l 10 2 +l 9 1 +l 7 0 +m 8 3 +l 6 2 +l 5 2 +l 3 3 +l 2 5 +l 2 6 +l 3 8 +l 5 9 +l 6 9 +l 8 8 +l 8 7 + +55 15 7 14 +m 15 0 +l 14 2 +l 12 4 +l 8 5 +l 1 5 +l 2 4 +l 3 2 +l 3 -2 +l 2 -4 +l 1 -5 +l 8 -5 +l 12 -4 +l 14 -2 +l 15 0 + +56 15 7 20 +m 15 0 +l 14 2 +l 12 4 +l 8 5 +l 1 5 +l 2 4 +l 3 2 +l 3 -2 +l 2 -4 +l 1 -5 +l 8 -5 +l 12 -4 +l 14 -2 +l 15 0 +m 0 5 +l 1 4 +l 2 2 +l 2 -2 +l 1 -4 +l 0 -5 + +57 15 7 3 +m 4 7 +l 5 8 +l 5 0 + +58 15 7 8 +m 8 0 +l 2 0 +l 2 1 +l 8 5 +l 8 6 +l 6 8 +l 4 8 +l 2 6 + +59 15 7 8 +m 2 8 +l 8 8 +l 5 5 +l 8 3 +l 8 2 +l 6 0 +l 4 0 +l 2 2 + +60 15 7 4 +m 8 2 +l 2 2 +l 7 8 +l 7 0 + +61 15 7 10 +m 8 8 +l 3 8 +l 3 5 +l 5 6 +l 6 6 +l 8 4 +l 8 2 +l 6 0 +l 4 0 +l 2 2 + +62 15 7 12 +m 8 7 +l 6 8 +l 4 8 +l 2 6 +l 2 2 +l 4 0 +l 6 0 +l 8 2 +l 8 4 +l 6 5 +l 4 5 +l 2 4 + +63 15 7 3 +m 2 8 +l 8 8 +l 2 0 + +64 15 7 13 +m 2 1 +l 4 0 +l 6 0 +l 8 1 +l 8 3 +l 2 5 +l 2 7 +l 4 8 +l 6 8 +l 8 7 +l 8 5 +l 2 3 +l 2 1 + +65 15 7 12 +m 2 1 +l 4 0 +l 6 0 +l 8 2 +l 8 6 +l 6 8 +l 4 8 +l 2 6 +l 2 4 +l 4 3 +l 6 3 +l 8 4 + +66 15 7 9 +m 4 0 +l 6 0 +l 8 2 +l 8 6 +l 6 8 +l 4 8 +l 2 6 +l 2 2 +l 4 0 + +67 15 7 4 +m 5 0 +l 5 6 +m 8 3 +l 2 3 + +68 15 7 2 +m 8 3 +l 2 3 + +69 15 7 3 +m 4 14 +l 5 15 +l 5 8 + +70 15 7 8 +m 2 13 +l 4 15 +l 6 15 +l 8 13 +l 8 12 +l 2 8 +l 2 7 +l 8 7 + +71 15 7 8 +m 2 15 +l 8 15 +l 5 12 +l 8 10 +l 8 9 +l 6 7 +l 4 7 +l 2 9 + +72 15 7 4 +m 7 7 +l 7 15 +l 2 9 +l 8 9 + +73 15 7 10 +m 8 15 +l 3 15 +l 3 12 +l 5 13 +l 6 13 +l 8 11 +l 8 9 +l 6 7 +l 4 7 +l 2 9 + +74 15 7 12 +m 9 14 +l 7 15 +l 5 15 +l 3 13 +l 3 9 +l 5 7 +l 7 7 +l 9 9 +l 9 11 +l 7 12 +l 5 12 +l 3 11 + +75 15 7 3 +m 2 15 +l 8 15 +l 2 7 + +76 15 7 13 +m 4 15 +l 6 15 +l 8 14 +l 8 12 +l 2 10 +l 2 8 +l 4 7 +l 6 7 +l 8 8 +l 8 10 +l 2 12 +l 2 14 +l 4 15 + +77 15 7 12 +m 2 8 +l 4 7 +l 6 7 +l 8 9 +l 8 13 +l 6 15 +l 4 15 +l 2 13 +l 2 11 +l 4 10 +l 6 10 +l 8 11 + +78 15 7 9 +m 4 7 +l 6 7 +l 8 9 +l 8 13 +l 6 15 +l 4 15 +l 2 13 +l 2 9 +l 4 7 + +79 15 7 4 +m 5 15 +l 5 9 +m 8 12 +l 2 12 + +80 15 7 2 +m 8 12 +l 2 12 + +81 15 7 14 +m 9 0 +l 8 0 +l 7 1 +l 7 6 +l 5 8 +l 3 8 +l 1 6 +l 0 2 +l 2 0 +l 4 0 +l 6 1 +l 7 4 +l 8 7 +l 9 8 + +82 15 7 17 +m 1 2 +l 3 0 +l 6 0 +l 8 2 +l 8 4 +l 7 6 +l 6 7 +l 3 7 +m 6 7 +l 8 8 +l 9 10 +l 9 11 +l 7 13 +l 5 13 +l 3 12 +l 2 10 +l 0 -2 + +83 15 7 7 +m 0 6 +l 1 8 +l 3 8 +l 5 2 +l 9 8 +m 5 2 +l 2 -4 + +84 15 7 11 +m 8 12 +l 4 13 +l 3 12 +l 8 7 +l 7 2 +l 5 0 +l 3 0 +l 1 2 +l 2 7 +l 4 9 +l 6 9 + +85 15 7 16 +m 8 12 +l 5 11 +l 4 10 +l 3 8 +l 2 5 +l 2 3 +l 3 2 +l 5 1 +l 6 0 +l 6 -1 +l 5 -2 +l 3 -2 +l 2 -1 +m 4 13 +l 4 12 +l 5 11 + +86 15 7 9 +m 1 8 +l 2 9 +l 3 8 +l 5 9 +l 7 9 +l 8 7 +l 6 -1 +m 3 8 +l 1 1 + +87 15 7 11 +m 7 8 +l 5 8 +l 3 7 +l 2 6 +l 1 4 +l 1 3 +l 2 1 +l 4 0 +l 5 0 +m 1 4 +l 6 4 + +88 15 7 11 +m 0 2 +l 2 0 +l 4 0 +l 6 2 +l 8 13 +l 6 15 +l 4 15 +l 2 13 +l 0 2 +m 1 8 +l 7 8 + +89 15 7 4 +m 7 1 +l 5 0 +l 4 1 +l 5 8 + +90 15 7 6 +m 2 0 +l 4 8 +m 3 4 +l 8 0 +m 3 4 +l 8 8 + +91 15 7 8 +m 8 0 +l 7 0 +l 6 1 +l 4 8 +l 2 13 +l 1 14 +m 4 8 +l 1 0 + +92 15 7 11 +m 2 8 +l 1 2 +l 3 0 +l 5 0 +l 7 2 +l 8 8 +m 7 2 +l 8 0 +l 9 1 +m 1 2 +l 0 -2 + +93 15 7 6 +m 0 9 +l 2 9 +l 1 0 +l 4 2 +l 7 6 +l 8 9 + +94 15 7 19 +m 4 14 +l 4 13 +l 5 12 +l 8 13 +m 5 12 +l 4 11 +l 3 9 +l 3 8 +l 4 7 +l 7 8 +m 4 7 +l 3 6 +l 2 3 +l 2 2 +l 3 1 +l 6 0 +l 6 -1 +l 5 -2 +l 3 -2 + +95 15 7 9 +m 1 2 +l 3 0 +l 5 0 +l 7 2 +l 8 6 +l 6 8 +l 4 8 +l 2 6 +l 1 2 + +96 15 7 7 +m 0 8 +l 1 9 +l 10 9 +m 3 9 +l 1 0 +m 6 9 +l 5 0 + +97 15 7 9 +m 1 2 +l 3 0 +l 5 0 +l 7 2 +l 8 6 +l 6 8 +l 4 8 +l 2 6 +l 0 -2 + +98 15 7 9 +m 10 8 +l 4 8 +l 2 6 +l 1 2 +l 3 0 +l 5 0 +l 7 2 +l 8 6 +l 6 8 + +99 15 7 5 +m 0 7 +l 1 8 +l 8 8 +m 4 8 +l 3 0 + +100 15 7 7 +m 0 8 +l 1 8 +l 2 7 +l 1 2 +l 3 0 +l 6 1 +l 8 8 + +101 15 7 11 +m 10 8 +l 8 10 +l 5 10 +l 3 8 +l 2 6 +l 4 4 +l 7 4 +l 9 6 +l 10 8 +m 5 0 +l 7 15 + +102 15 7 6 +m 0 11 +l 2 11 +l 6 0 +l 8 0 +m 0 0 +l 8 11 + +103 15 7 7 +m 3 9 +l 3 3 +l 5 2 +l 8 3 +l 9 10 +m 5 0 +l 6 12 + +104 15 7 11 +m 3 8 +l 1 6 +l 0 2 +l 2 0 +l 4 2 +l 6 0 +l 8 2 +l 9 6 +l 8 8 +m 4 2 +l 5 5 + +105 15 7 3 +m 0 10 +l 4 4 +l 8 10 + +106 15 7 3 +m 0 4 +l 4 10 +l 8 4 + +107 15 7 6 +m 0 7 +l 8 7 +m 0 10 +l 8 10 +m 0 4 +l 8 4 + +108 15 7 5 +m 0 7 +l 8 7 +l 5 8 +l 5 6 +l 8 7 + +109 15 7 12 +m 0 8 +l 2 10 +l 4 10 +l 7 7 +l 9 7 +l 11 9 +m 0 5 +l 2 7 +l 4 7 +l 7 4 +l 9 4 +l 11 6 + +110 15 7 4 +m 0 11 +l 8 3 +m 0 3 +l 8 11 + +111 15 7 12 +m 0 7 +l 8 7 +m 3 9 +l 5 9 +l 5 11 +l 3 11 +l 3 9 +m 3 5 +l 3 3 +l 5 3 +l 5 5 +l 3 5 + +112 15 7 6 +m 0 9 +l 8 9 +m 8 5 +l 0 5 +m 1 1 +l 7 13 + +113 15 7 6 +m 0 7 +l 8 7 +m 4 11 +l 4 3 +m 0 2 +l 8 2 + +114 15 7 8 +m 0 2 +l 1 0 +l 2 0 +l 3 1 +l 7 14 +l 8 15 +l 9 15 +l 10 13 + +115 15 7 6 +m 0 4 +l 6 4 +l 8 6 +l 8 8 +l 6 10 +l 0 10 + +116 15 7 4 +m 0 4 +l 8 4 +l 4 10 +l 0 4 + +117 15 7 2 +m 0 7 +l 10 7 + +118 15 7 6 +m 8 10 +l 2 10 +l 0 8 +l 0 6 +l 2 4 +l 8 4 + +119 15 7 4 +m 3 2 +l 4 0 +l 4 14 +l 8 14 + +120 15 7 9 +m 0 5 +l 0 3 +l 2 2 +l 11 6 +l 13 5 +l 13 3 +l 11 2 +l 2 6 +l 0 5 + +121 15 7 3 +m 0 15 +l 11 15 +l 11 0 + +122 15 7 16 +m 8 9 +l 7 10 +l 6 10 +l 5 9 +l 4 5 +l 3 4 +l 1 4 +l 0 5 +l 0 9 +l 1 10 +l 3 10 +l 4 9 +l 5 5 +l 6 4 +l 7 4 +l 8 5 + +123 15 7 15 +m 0 3 +l 2 3 +l 2 5 +l 0 5 +l 0 3 +m 6 3 +l 8 3 +l 8 5 +l 6 5 +l 6 3 +m 3 9 +l 5 9 +l 5 11 +l 3 11 +l 3 9 + +124 15 7 5 +m 8 11 +l 0 7 +l 8 3 +m 8 2 +l 0 2 + +125 15 7 5 +m 0 11 +l 8 7 +l 0 3 +m 0 2 +l 8 2 + +126 15 7 10 +m 1 14 +l 1 15 +l 0 15 +l 0 14 +l 1 14 +m 7 14 +l 8 14 +l 8 15 +l 7 15 +l 7 14 + +127 15 7 9 +m 2 8 +l 2 6 +l 3 5 +l 5 5 +l 6 6 +l 6 8 +l 5 9 +l 3 9 +l 2 8 diff --git a/cd/etc/vectorfont15.txt b/cd/etc/vectorfont15.txt new file mode 100755 index 0000000..76a91df --- /dev/null +++ b/cd/etc/vectorfont15.txt @@ -0,0 +1,1722 @@ +Iso_Lat_1 +27 21 12 -7 + + +32 19 9 0 + +33 13 6 12 +m 1 21 +l 0 19 +l 1 7 +l 2 19 +l 1 21 +m 1 19 +l 1 13 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +34 15 7 16 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 +m 8 24 +l 7 23 +l 6 24 +l 7 25 +l 8 24 +l 8 22 +l 7 20 +l 6 19 + +35 19 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 20 10 24 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +37 22 11 29 +m 0 0 +l 18 21 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 23 11 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 9 4 8 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 + +40 14 7 10 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 + +41 14 7 10 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 + +42 16 8 6 +m 5 15 +l 5 3 +m 0 12 +l 10 6 +m 10 12 +l 0 6 + +43 26 13 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 10 5 8 +m 2 1 +l 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +45 26 13 2 +m 0 9 +l 18 9 + +46 10 5 4 +m 1 2 +l 0 1 +l 1 0 +l 2 1 + +47 22 11 2 +m 18 25 +l 0 -7 + +48 20 10 17 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 + +49 16 8 4 +m 0 17 +l 2 18 +l 5 21 +l 5 0 + +50 20 10 14 +m 1 16 +l 1 17 +l 2 19 +l 3 20 +l 5 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 10 10 +l 0 0 +l 14 0 + +51 20 10 15 +m 2 21 +l 13 21 +l 7 13 +l 10 13 +l 12 12 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +52 20 10 5 +m 10 21 +l 0 7 +l 15 7 +m 10 21 +l 10 0 + +53 20 10 17 +m 12 21 +l 2 21 +l 1 12 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +54 20 10 23 +m 12 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 7 +l 1 3 +l 3 1 +l 6 0 +l 7 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 7 13 +l 6 13 +l 3 12 +l 1 10 +l 0 7 + +55 20 10 3 +m 0 21 +l 14 21 +l 4 0 + +56 20 10 29 +m 5 21 +l 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 8 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 7 +l 1 9 +l 3 11 +l 6 12 +l 10 13 +l 12 14 +l 13 16 +l 13 18 +l 12 20 +l 9 21 +l 5 21 + +57 20 10 23 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 7 21 +l 10 20 +l 12 18 +l 13 14 +l 13 9 +l 12 4 +l 10 1 +l 7 0 +l 5 0 +l 2 1 +l 1 3 + +58 15 7 10 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 14 7 12 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 26 13 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 18 9 21 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 10 20 +l 11 18 +l 11 16 +l 10 14 +l 9 13 +l 5 11 +l 5 8 +m 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 + +64 24 12 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 22 11 5 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 + +66 21 10 20 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +m 0 11 +l 9 11 +l 12 10 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 0 0 + +67 21 10 18 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 + +68 21 10 13 +m 0 0 +l 0 21 +l 7 21 +l 10 20 +l 12 18 +l 13 16 +l 14 13 +l 14 8 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 0 0 + +69 19 9 7 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 + +70 18 9 5 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 + +71 21 10 20 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 15 8 +l 10 8 + +72 22 11 6 +m 0 0 +l 0 21 +m 14 21 +l 14 0 +m 0 11 +l 14 11 + +73 8 4 2 +m 0 0 +l 0 21 + +74 16 8 10 +m 10 21 +l 10 5 +l 9 2 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 2 +l 0 5 +l 0 7 + +75 21 10 6 +m 0 0 +l 0 21 +m 14 21 +l 0 7 +m 5 12 +l 14 0 + +76 17 8 3 +m 0 21 +l 0 0 +l 12 0 + +77 24 12 5 +m 0 0 +l 0 21 +l 8 0 +l 16 21 +l 16 0 + +78 22 11 4 +m 0 0 +l 0 21 +l 14 0 +l 14 21 + +79 22 11 21 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +80 21 10 11 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 14 +l 13 12 +l 12 11 +l 9 10 +l 0 10 + +81 22 11 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 9 4 +l 15 -2 + +82 21 10 13 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +l 0 11 +m 7 11 +l 14 0 + +83 20 10 20 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +84 18 9 4 +m 7 21 +l 7 0 +m 0 21 +l 14 21 + +85 22 11 10 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 + +86 20 10 3 +m 0 21 +l 8 0 +l 16 21 + +87 24 12 5 +m 0 21 +l 5 0 +l 10 21 +l 15 0 +l 20 21 + +88 20 10 4 +m 0 0 +l 14 21 +m 0 21 +l 14 0 + +89 20 10 5 +m 0 21 +l 8 11 +l 16 21 +m 8 11 +l 8 0 + +90 20 10 4 +m 0 21 +l 14 21 +l 0 0 +l 14 0 + +91 15 7 4 +m 7 25 +l 0 25 +l 0 -7 +l 7 -7 + +92 22 11 2 +m 0 25 +l 18 -7 + +93 12 6 4 +m 0 25 +l 7 25 +l 7 -7 +l 0 -7 + +94 20 10 3 +m 0 18 +l 7 25 +l 14 18 + +95 24 12 2 +m 0 -2 +l 20 -2 + +96 9 4 8 +m 0 24 +l 1 23 +l 2 24 +l 1 25 +l 0 24 +l 0 22 +l 1 20 +l 2 19 + +97 19 9 16 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +98 19 9 16 +m 0 0 +l 0 21 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +99 18 9 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +100 19 9 16 +m 12 21 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +101 18 9 17 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +102 12 6 7 +m 8 21 +l 6 21 +l 4 20 +l 3 17 +l 3 0 +m 0 14 +l 7 14 + +103 19 9 21 +m 12 14 +l 12 -2 +l 11 -5 +l 10 -6 +l 8 -7 +l 5 -7 +l 3 -6 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +104 19 9 9 +m 0 0 +l 0 21 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +105 8 4 7 +m 0 20 +l 1 19 +l 2 20 +l 1 21 +l 0 20 +m 1 14 +l 1 0 + +106 10 5 10 +m 4 20 +l 5 19 +l 6 20 +l 5 21 +l 4 20 +m 5 14 +l 5 -3 +l 4 -6 +l 2 -7 +l 0 -7 + +107 17 8 6 +m 0 0 +l 0 21 +m 10 14 +l 0 4 +m 4 8 +l 11 0 + +108 8 4 2 +m 0 0 +l 0 21 + +109 30 15 16 +m 0 0 +l 0 14 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 +m 11 10 +l 14 13 +l 16 14 +l 19 14 +l 21 13 +l 22 10 +l 22 0 + +110 19 9 9 +m 0 0 +l 0 14 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +111 19 9 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +112 19 9 16 +m 0 14 +l 0 -7 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +113 19 9 16 +m 12 14 +l 12 -7 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +114 13 6 7 +m 0 0 +l 0 14 +m 0 8 +l 1 11 +l 3 13 +l 5 14 +l 8 14 + +115 17 8 17 +m 11 11 +l 10 13 +l 7 14 +l 4 14 +l 1 13 +l 0 11 +l 1 9 +l 3 8 +l 8 7 +l 10 6 +l 11 4 +l 11 3 +l 10 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 + +116 14 7 7 +m 3 21 +l 3 4 +l 4 1 +l 6 0 +l 8 0 +m 0 14 +l 7 14 + +117 19 9 9 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +118 16 8 3 +m 0 14 +l 6 0 +l 12 14 + +119 22 11 5 +m 0 14 +l 4 0 +l 8 14 +l 12 0 +l 16 14 + +120 17 8 4 +m 0 0 +l 11 14 +m 11 0 +l 0 14 + +121 16 8 8 +m 1 14 +l 7 0 +m 13 14 +l 7 0 +l 5 -4 +l 3 -6 +l 1 -7 +l 0 -7 + +122 17 8 4 +m 0 14 +l 11 14 +l 0 0 +l 11 0 + +123 12 6 21 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +l 0 9 +l 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 7 3 2 +m 0 25 +l 0 -7 + +125 11 5 21 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +l 5 9 +l 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 26 13 22 +m 0 6 +l 0 8 +l 1 11 +l 3 12 +l 5 12 +l 7 11 +l 11 8 +l 13 7 +l 15 7 +l 17 8 +l 18 10 +m 0 8 +l 1 10 +l 3 11 +l 5 11 +l 7 10 +l 11 7 +l 13 6 +l 15 6 +l 17 7 +l 18 10 +l 18 12 + +192 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 6 27 +l 5 27 +l 8 23 + +193 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +194 22 11 8 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 3 23 +l 8 27 +l 13 23 + +195 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +199 21 10 22 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +m 8 0 +l 6 -3 +l 9 -3 +l 7 -6 + +201 19 9 11 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +202 19 9 10 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 1 23 +l 6 27 +l 11 23 + +205 8 4 6 +m 0 0 +l 0 21 +m 0 23 +l 2 27 +l 3 27 +l 0 23 + +211 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +212 22 11 24 +m 3 23 +l 8 27 +l 13 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +213 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +218 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +220 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 4 22 +l 4 24 +m 10 22 +l 10 24 + +224 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 0 22 +l 1 22 +l 3 17 + +225 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +226 19 9 19 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +227 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 5 19 +l 9 17 +l 11 19 + +231 18 9 18 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 6 0 +l 5 -2 +l 7 -2 +l 6 -4 + +233 18 9 21 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +234 18 9 20 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +237 8 4 6 +m 1 14 +l 1 0 +m 1 18 +l 3 21 +l 4 21 +l 1 18 + +243 19 9 21 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +244 19 9 20 +m 10 17 +l 6 20 +l 2 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +245 19 9 21 +m 3 17 +l 5 19 +l 9 17 +l 11 19 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +250 19 9 13 +m 8 17 +l 10 22 +l 11 22 +l 8 17 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +252 19 9 13 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 +m 8 15 +l 8 16 +m 3 15 +l 3 16 diff --git a/cd/etc/vectorfont16.txt b/cd/etc/vectorfont16.txt new file mode 100755 index 0000000..0724e03 --- /dev/null +++ b/cd/etc/vectorfont16.txt @@ -0,0 +1,1988 @@ +PC_Lat_1 +27 21 12 -7 + + +32 19 9 0 + +33 13 6 12 +m 1 21 +l 0 19 +l 1 7 +l 2 19 +l 1 21 +m 1 19 +l 1 13 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +34 15 7 16 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 +m 8 24 +l 7 23 +l 6 24 +l 7 25 +l 8 24 +l 8 22 +l 7 20 +l 6 19 + +35 19 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 20 10 24 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +37 22 11 29 +m 0 0 +l 18 21 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 23 11 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 9 4 8 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 + +40 14 7 10 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 + +41 14 7 10 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 + +42 16 8 6 +m 5 15 +l 5 3 +m 0 12 +l 10 6 +m 10 12 +l 0 6 + +43 26 13 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 10 5 8 +m 2 1 +l 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +45 26 13 2 +m 0 9 +l 18 9 + +46 10 5 4 +m 1 2 +l 0 1 +l 1 0 +l 2 1 + +47 22 11 2 +m 18 25 +l 0 -7 + +48 20 10 17 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 + +49 16 8 4 +m 0 17 +l 2 18 +l 5 21 +l 5 0 + +50 20 10 14 +m 1 16 +l 1 17 +l 2 19 +l 3 20 +l 5 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 10 10 +l 0 0 +l 14 0 + +51 20 10 15 +m 2 21 +l 13 21 +l 7 13 +l 10 13 +l 12 12 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +52 20 10 5 +m 10 21 +l 0 7 +l 15 7 +m 10 21 +l 10 0 + +53 20 10 17 +m 12 21 +l 2 21 +l 1 12 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +54 20 10 23 +m 12 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 7 +l 1 3 +l 3 1 +l 6 0 +l 7 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 7 13 +l 6 13 +l 3 12 +l 1 10 +l 0 7 + +55 20 10 3 +m 0 21 +l 14 21 +l 4 0 + +56 20 10 29 +m 5 21 +l 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 8 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 7 +l 1 9 +l 3 11 +l 6 12 +l 10 13 +l 12 14 +l 13 16 +l 13 18 +l 12 20 +l 9 21 +l 5 21 + +57 20 10 23 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 7 21 +l 10 20 +l 12 18 +l 13 14 +l 13 9 +l 12 4 +l 10 1 +l 7 0 +l 5 0 +l 2 1 +l 1 3 + +58 15 7 10 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 14 7 12 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 26 13 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 18 9 21 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 10 20 +l 11 18 +l 11 16 +l 10 14 +l 9 13 +l 5 11 +l 5 8 +m 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 + +64 24 12 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 22 11 5 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 + +66 21 10 20 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +m 0 11 +l 9 11 +l 12 10 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 0 0 + +67 21 10 18 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 + +68 21 10 13 +m 0 0 +l 0 21 +l 7 21 +l 10 20 +l 12 18 +l 13 16 +l 14 13 +l 14 8 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 0 0 + +69 19 9 7 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 + +70 18 9 5 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 + +71 21 10 20 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 15 8 +l 10 8 + +72 22 11 6 +m 0 0 +l 0 21 +m 14 21 +l 14 0 +m 0 11 +l 14 11 + +73 8 4 2 +m 0 0 +l 0 21 + +74 16 8 10 +m 10 21 +l 10 5 +l 9 2 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 2 +l 0 5 +l 0 7 + +75 21 10 6 +m 0 0 +l 0 21 +m 14 21 +l 0 7 +m 5 12 +l 14 0 + +76 17 8 3 +m 0 21 +l 0 0 +l 12 0 + +77 24 12 5 +m 0 0 +l 0 21 +l 8 0 +l 16 21 +l 16 0 + +78 22 11 4 +m 0 0 +l 0 21 +l 14 0 +l 14 21 + +79 22 11 21 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +80 21 10 11 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 14 +l 13 12 +l 12 11 +l 9 10 +l 0 10 + +81 22 11 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 9 4 +l 15 -2 + +82 21 10 13 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +l 0 11 +m 7 11 +l 14 0 + +83 20 10 20 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +84 18 9 4 +m 7 21 +l 7 0 +m 0 21 +l 14 21 + +85 22 11 10 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 + +86 20 10 3 +m 0 21 +l 8 0 +l 16 21 + +87 24 12 5 +m 0 21 +l 5 0 +l 10 21 +l 15 0 +l 20 21 + +88 20 10 4 +m 0 0 +l 14 21 +m 0 21 +l 14 0 + +89 20 10 5 +m 0 21 +l 8 11 +l 16 21 +m 8 11 +l 8 0 + +90 20 10 4 +m 0 21 +l 14 21 +l 0 0 +l 14 0 + +91 15 7 4 +m 7 25 +l 0 25 +l 0 -7 +l 7 -7 + +92 22 11 2 +m 0 25 +l 18 -7 + +93 12 6 4 +m 0 25 +l 7 25 +l 7 -7 +l 0 -7 + +94 20 10 3 +m 0 18 +l 7 25 +l 14 18 + +95 24 12 2 +m 0 -2 +l 20 -2 + +96 9 4 8 +m 0 24 +l 1 23 +l 2 24 +l 1 25 +l 0 24 +l 0 22 +l 1 20 +l 2 19 + +97 19 9 16 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +98 19 9 16 +m 0 0 +l 0 21 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +99 18 9 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +100 19 9 16 +m 12 21 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +101 18 9 17 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +102 12 6 7 +m 8 21 +l 6 21 +l 4 20 +l 3 17 +l 3 0 +m 0 14 +l 7 14 + +103 19 9 21 +m 12 14 +l 12 -2 +l 11 -5 +l 10 -6 +l 8 -7 +l 5 -7 +l 3 -6 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +104 19 9 9 +m 0 0 +l 0 21 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +105 8 4 7 +m 0 20 +l 1 19 +l 2 20 +l 1 21 +l 0 20 +m 1 14 +l 1 0 + +106 10 5 10 +m 4 20 +l 5 19 +l 6 20 +l 5 21 +l 4 20 +m 5 14 +l 5 -3 +l 4 -6 +l 2 -7 +l 0 -7 + +107 17 8 6 +m 0 0 +l 0 21 +m 10 14 +l 0 4 +m 4 8 +l 11 0 + +108 8 4 2 +m 0 0 +l 0 21 + +109 30 15 16 +m 0 0 +l 0 14 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 +m 11 10 +l 14 13 +l 16 14 +l 19 14 +l 21 13 +l 22 10 +l 22 0 + +110 19 9 9 +m 0 0 +l 0 14 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +111 19 9 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +112 19 9 16 +m 0 14 +l 0 -7 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +113 19 9 16 +m 12 14 +l 12 -7 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +114 13 6 7 +m 0 0 +l 0 14 +m 0 8 +l 1 11 +l 3 13 +l 5 14 +l 8 14 + +115 17 8 17 +m 11 11 +l 10 13 +l 7 14 +l 4 14 +l 1 13 +l 0 11 +l 1 9 +l 3 8 +l 8 7 +l 10 6 +l 11 4 +l 11 3 +l 10 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 + +116 14 7 7 +m 3 21 +l 3 4 +l 4 1 +l 6 0 +l 8 0 +m 0 14 +l 7 14 + +117 19 9 9 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +118 16 8 3 +m 0 14 +l 6 0 +l 12 14 + +119 22 11 5 +m 0 14 +l 4 0 +l 8 14 +l 12 0 +l 16 14 + +120 17 8 4 +m 0 0 +l 11 14 +m 11 0 +l 0 14 + +121 16 8 8 +m 1 14 +l 7 0 +m 13 14 +l 7 0 +l 5 -4 +l 3 -6 +l 1 -7 +l 0 -7 + +122 17 8 4 +m 0 14 +l 11 14 +l 0 0 +l 11 0 + +123 12 6 21 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +l 0 9 +l 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 7 3 2 +m 0 25 +l 0 -7 + +125 11 5 21 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +l 5 9 +l 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 26 13 22 +m 0 6 +l 0 8 +l 1 11 +l 3 12 +l 5 12 +l 7 11 +l 11 8 +l 13 7 +l 15 7 +l 17 8 +l 18 10 +m 0 8 +l 1 10 +l 3 11 +l 5 11 +l 7 10 +l 11 7 +l 13 6 +l 15 6 +l 17 7 +l 18 10 +l 18 12 + +128 21 10 22 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +m 8 0 +l 6 -3 +l 9 -3 +l 7 -6 + +129 19 9 13 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 +m 8 15 +l 8 16 +m 3 15 +l 3 16 + +130 18 9 21 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +131 19 9 19 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +133 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 0 22 +l 1 22 +l 3 17 + +135 18 9 18 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 6 0 +l 5 -2 +l 7 -2 +l 6 -4 + +136 18 9 20 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +144 19 9 11 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +147 19 9 20 +m 10 17 +l 6 20 +l 2 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +154 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 4 22 +l 4 24 +m 10 22 +l 10 24 + +160 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +161 8 4 6 +m 1 14 +l 1 0 +m 1 18 +l 3 21 +l 4 21 +l 1 18 + +162 19 9 21 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +163 19 9 13 +m 8 17 +l 10 22 +l 11 22 +l 8 17 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +192 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 6 27 +l 5 27 +l 8 23 + +193 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +194 22 11 8 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 3 23 +l 8 27 +l 13 23 + +195 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +199 21 10 22 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +m 8 0 +l 6 -3 +l 9 -3 +l 7 -6 + +201 19 9 11 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +202 19 9 10 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 1 23 +l 6 27 +l 11 23 + +205 8 4 6 +m 0 0 +l 0 21 +m 0 23 +l 2 27 +l 3 27 +l 0 23 + +211 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +212 22 11 24 +m 3 23 +l 8 27 +l 13 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +213 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +218 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +220 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 4 22 +l 4 24 +m 10 22 +l 10 24 + +224 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 0 22 +l 1 22 +l 3 17 + +225 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +226 19 9 19 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +227 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 5 19 +l 9 17 +l 11 19 + +231 18 9 18 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 6 0 +l 5 -2 +l 7 -2 +l 6 -4 + +233 18 9 21 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +234 18 9 20 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +237 8 4 6 +m 1 14 +l 1 0 +m 1 18 +l 3 21 +l 4 21 +l 1 18 + +243 19 9 21 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +244 19 9 20 +m 10 17 +l 6 20 +l 2 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +245 19 9 21 +m 3 17 +l 5 19 +l 9 17 +l 11 19 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +250 19 9 13 +m 8 17 +l 10 22 +l 11 22 +l 8 17 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +252 19 9 13 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 +m 8 15 +l 8 16 +m 3 15 +l 3 16 diff --git a/cd/etc/vectorfont17.txt b/cd/etc/vectorfont17.txt new file mode 100755 index 0000000..76775d8 --- /dev/null +++ b/cd/etc/vectorfont17.txt @@ -0,0 +1,2100 @@ +Lat_850 +27 21 12 -7 + + +32 8 4 0 + +33 13 6 12 +m 1 21 +l 0 19 +l 1 7 +l 2 19 +l 1 21 +m 1 19 +l 1 13 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +34 15 7 16 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 +m 8 24 +l 7 23 +l 6 24 +l 7 25 +l 8 24 +l 8 22 +l 7 20 +l 6 19 + +35 19 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 20 10 24 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +37 22 11 29 +m 0 0 +l 18 21 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 23 11 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 9 4 8 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 + +40 14 7 10 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 + +41 14 7 10 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 + +42 16 8 6 +m 5 15 +l 5 3 +m 0 12 +l 10 6 +m 10 12 +l 0 6 + +43 26 13 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 10 5 8 +m 2 1 +l 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +45 26 13 2 +m 0 9 +l 18 9 + +46 10 5 4 +m 1 2 +l 0 1 +l 1 0 +l 2 1 + +47 22 11 2 +m 18 25 +l 0 -7 + +48 20 10 17 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 + +49 16 8 4 +m 0 17 +l 2 18 +l 5 21 +l 5 0 + +50 20 10 14 +m 1 16 +l 1 17 +l 2 19 +l 3 20 +l 5 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 10 10 +l 0 0 +l 14 0 + +51 20 10 15 +m 2 21 +l 13 21 +l 7 13 +l 10 13 +l 12 12 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +52 20 10 5 +m 10 21 +l 0 7 +l 15 7 +m 10 21 +l 10 0 + +53 20 10 17 +m 12 21 +l 2 21 +l 1 12 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +54 20 10 23 +m 12 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 7 +l 1 3 +l 3 1 +l 6 0 +l 7 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 7 13 +l 6 13 +l 3 12 +l 1 10 +l 0 7 + +55 20 10 3 +m 0 21 +l 14 21 +l 4 0 + +56 20 10 29 +m 5 21 +l 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 8 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 7 +l 1 9 +l 3 11 +l 6 12 +l 10 13 +l 12 14 +l 13 16 +l 13 18 +l 12 20 +l 9 21 +l 5 21 + +57 20 10 23 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 7 21 +l 10 20 +l 12 18 +l 13 14 +l 13 9 +l 12 4 +l 10 1 +l 7 0 +l 5 0 +l 2 1 +l 1 3 + +58 15 7 10 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 14 7 12 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 26 13 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 18 9 21 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 10 20 +l 11 18 +l 11 16 +l 10 14 +l 9 13 +l 5 11 +l 5 8 +m 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 + +64 31 14 50 +m 17 13 +l 16 15 +l 14 16 +l 11 16 +l 9 15 +l 8 14 +l 7 11 +l 7 8 +l 8 6 +l 10 5 +l 13 5 +l 15 6 +l 16 8 +m 11 16 +l 9 14 +l 8 11 +l 8 8 +l 9 6 +l 10 5 +m 17 16 +l 16 8 +l 16 6 +l 19 5 +m 18 16 +l 17 8 +l 17 6 +l 19 5 +l 24 5 +l 26 7 +l 27 10 +l 27 13 +l 25 18 +l 21 22 +l 19 23 +l 15 24 +l 12 24 +l 7 23 +l 4 21 +l 1 17 +l 0 14 +l 0 7 +l 2 3 +l 5 0 +l 8 -2 +l 10 -3 +l 14 -4 +l 18 -4 +l 22 -2 +l 24 0 +l 26 3 + +65 22 11 5 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 + +66 21 10 20 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +m 0 11 +l 9 11 +l 12 10 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 0 0 + +67 21 10 18 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 + +68 21 10 13 +m 0 0 +l 0 21 +l 7 21 +l 10 20 +l 12 18 +l 13 16 +l 14 13 +l 14 8 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 0 0 + +69 19 9 7 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 + +70 18 9 5 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 + +71 21 10 20 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 15 8 +l 10 8 + +72 22 11 6 +m 0 0 +l 0 21 +m 14 21 +l 14 0 +m 0 11 +l 14 11 + +73 8 4 2 +m 0 0 +l 0 21 + +74 16 8 10 +m 10 21 +l 10 5 +l 9 2 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 2 +l 0 5 +l 0 7 + +75 21 10 6 +m 0 0 +l 0 21 +m 14 21 +l 0 7 +m 5 12 +l 14 0 + +76 17 8 3 +m 0 21 +l 0 0 +l 12 0 + +77 24 12 5 +m 0 0 +l 0 21 +l 8 0 +l 16 21 +l 16 0 + +78 22 11 4 +m 0 0 +l 0 21 +l 14 0 +l 14 21 + +79 22 11 21 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +80 21 10 11 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 14 +l 13 12 +l 12 11 +l 9 10 +l 0 10 + +81 22 11 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 9 4 +l 15 -2 + +82 21 10 13 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +l 0 11 +m 7 11 +l 14 0 + +83 20 10 20 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +84 18 9 4 +m 7 21 +l 7 0 +m 0 21 +l 14 21 + +85 22 11 10 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 + +86 20 10 3 +m 0 21 +l 8 0 +l 16 21 + +87 24 12 5 +m 0 21 +l 5 0 +l 10 21 +l 15 0 +l 20 21 + +88 20 10 4 +m 0 0 +l 14 21 +m 0 21 +l 14 0 + +89 20 10 5 +m 0 21 +l 8 11 +l 16 21 +m 8 11 +l 8 0 + +90 20 10 4 +m 0 21 +l 14 21 +l 0 0 +l 14 0 + +91 15 7 4 +m 7 25 +l 0 25 +l 0 -7 +l 7 -7 + +92 22 11 2 +m 0 25 +l 18 -7 + +93 12 6 4 +m 0 25 +l 7 25 +l 7 -7 +l 0 -7 + +94 20 10 3 +m 0 18 +l 7 25 +l 14 18 + +95 24 12 2 +m 0 -2 +l 20 -2 + +96 9 4 8 +m 0 24 +l 1 23 +l 2 24 +l 1 25 +l 0 24 +l 0 22 +l 1 20 +l 2 19 + +97 19 9 16 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +98 19 9 16 +m 0 0 +l 0 21 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +99 18 9 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +100 19 9 16 +m 12 21 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +101 18 9 17 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +102 12 6 7 +m 8 21 +l 6 21 +l 4 20 +l 3 17 +l 3 0 +m 0 14 +l 7 14 + +103 19 9 21 +m 12 14 +l 12 -2 +l 11 -5 +l 10 -6 +l 8 -7 +l 5 -7 +l 3 -6 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +104 19 9 9 +m 0 0 +l 0 21 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +105 8 4 7 +m 0 20 +l 1 19 +l 2 20 +l 1 21 +l 0 20 +m 1 14 +l 1 0 + +106 10 5 10 +m 4 20 +l 5 19 +l 6 20 +l 5 21 +l 4 20 +m 5 14 +l 5 -3 +l 4 -6 +l 2 -7 +l 0 -7 + +107 17 8 6 +m 0 0 +l 0 21 +m 10 14 +l 0 4 +m 4 8 +l 11 0 + +108 8 4 2 +m 0 0 +l 0 21 + +109 30 15 16 +m 0 0 +l 0 14 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 +m 11 10 +l 14 13 +l 16 14 +l 19 14 +l 21 13 +l 22 10 +l 22 0 + +110 19 9 9 +m 0 0 +l 0 14 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +111 19 9 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +112 19 9 16 +m 0 14 +l 0 -7 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +113 19 9 16 +m 12 14 +l 12 -7 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +114 13 6 7 +m 0 0 +l 0 14 +m 0 8 +l 1 11 +l 3 13 +l 5 14 +l 8 14 + +115 17 8 17 +m 11 11 +l 10 13 +l 7 14 +l 4 14 +l 1 13 +l 0 11 +l 1 9 +l 3 8 +l 8 7 +l 10 6 +l 11 4 +l 11 3 +l 10 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 + +116 14 7 7 +m 3 21 +l 3 4 +l 4 1 +l 6 0 +l 8 0 +m 0 14 +l 7 14 + +117 19 9 9 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +118 16 8 3 +m 0 14 +l 6 0 +l 12 14 + +119 22 11 5 +m 0 14 +l 4 0 +l 8 14 +l 12 0 +l 16 14 + +120 17 8 4 +m 0 0 +l 11 14 +m 11 0 +l 0 14 + +121 16 8 8 +m 1 14 +l 7 0 +m 13 14 +l 7 0 +l 5 -4 +l 3 -6 +l 1 -7 +l 0 -7 + +122 17 8 4 +m 0 14 +l 11 14 +l 0 0 +l 11 0 + +123 12 6 21 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +l 0 9 +l 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 7 3 2 +m 0 25 +l 0 -7 + +125 11 5 21 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +l 5 9 +l 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 26 13 22 +m 0 6 +l 0 8 +l 1 11 +l 3 12 +l 5 12 +l 7 11 +l 11 8 +l 13 7 +l 15 7 +l 17 8 +l 18 10 +m 0 8 +l 1 10 +l 3 11 +l 5 11 +l 7 10 +l 11 7 +l 13 6 +l 15 6 +l 17 7 +l 18 10 +l 18 12 + +128 21 10 22 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +m 8 0 +l 6 -3 +l 9 -3 +l 7 -6 + +129 19 9 13 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 +m 8 15 +l 8 16 +m 3 15 +l 3 16 + +130 18 9 21 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +131 19 9 19 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +133 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 0 22 +l 1 22 +l 3 17 + +135 18 9 18 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 6 0 +l 5 -2 +l 7 -2 +l 6 -4 + +136 18 9 20 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +144 19 9 11 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +147 19 9 20 +m 10 17 +l 6 20 +l 2 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +154 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 4 22 +l 4 24 +m 10 22 +l 10 24 + +160 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +161 8 4 6 +m 1 14 +l 1 0 +m 1 18 +l 3 21 +l 4 21 +l 1 18 + +162 19 9 21 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +163 19 9 13 +m 8 17 +l 10 22 +l 11 22 +l 8 17 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +181 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +182 22 11 8 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 3 23 +l 8 27 +l 13 23 + +183 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 6 27 +l 5 27 +l 8 23 + +192 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 6 27 +l 5 27 +l 8 23 + +193 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +194 22 11 8 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 3 23 +l 8 27 +l 13 23 + +195 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +198 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 5 19 +l 9 17 +l 11 19 + +199 22 11 9 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +201 19 9 11 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +202 19 9 10 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 1 23 +l 6 27 +l 11 23 + +205 8 4 6 +m 0 0 +l 0 21 +m 0 23 +l 2 27 +l 3 27 +l 0 23 + +210 19 9 10 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 +m 1 23 +l 6 27 +l 11 23 + +211 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +212 22 11 24 +m 3 23 +l 8 27 +l 13 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +213 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +214 8 4 6 +m 0 0 +l 0 21 +m 0 23 +l 2 27 +l 3 27 +l 0 23 + +218 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +220 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 4 22 +l 4 24 +m 10 22 +l 10 24 + +224 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 8 23 +l 10 27 +l 11 27 +l 8 23 + +225 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +226 22 11 24 +m 3 23 +l 8 27 +l 13 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +227 19 9 20 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 3 17 +l 5 19 +l 9 17 +l 11 19 + +228 19 9 21 +m 3 17 +l 5 19 +l 9 17 +l 11 19 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +229 22 11 25 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 4 23 +l 6 25 +l 10 23 +l 12 25 + +231 18 9 18 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 6 0 +l 5 -2 +l 7 -2 +l 6 -4 + +233 22 11 14 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 7 23 +l 9 27 +l 10 27 +l 7 23 + +234 18 9 20 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 10 17 +l 6 20 +l 2 17 + +237 8 4 6 +m 1 14 +l 1 0 +m 1 18 +l 3 21 +l 4 21 +l 1 18 + +243 19 9 21 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 8 17 +l 10 22 +l 11 22 +l 8 17 + +244 19 9 20 +m 10 17 +l 6 20 +l 2 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +245 19 9 21 +m 3 17 +l 5 19 +l 9 17 +l 11 19 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +250 19 9 13 +m 8 17 +l 10 22 +l 11 22 +l 8 17 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +252 19 9 13 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 +m 8 15 +l 8 16 +m 3 15 +l 3 16 diff --git a/cd/etc/vectorfont18.txt b/cd/etc/vectorfont18.txt new file mode 100755 index 0000000..ee3118e --- /dev/null +++ b/cd/etc/vectorfont18.txt @@ -0,0 +1,8163 @@ +LATII-850 +24 24 12 -7 + + +32 16 8 0 + +33 7 3 26 +m 2 10 +l 3 18 +l 3 20 +l 2 21 +l 2 7 +l 1 7 +l 1 21 +l 0 20 +l 0 18 +l 1 10 +m 1 21 +l 2 21 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +34 14 7 16 +m 1 21 +l 0 20 +l 0 14 +m 1 20 +l 0 14 +m 1 21 +l 2 20 +l 0 14 +m 10 21 +l 9 20 +l 9 14 +m 10 20 +l 9 14 +m 10 21 +l 11 20 +l 9 14 + +35 18 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 17 8 51 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 13 16 +l 13 17 +l 12 17 +l 12 15 +l 14 15 +l 14 17 +l 13 19 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 15 +l 1 13 +l 4 11 +l 10 9 +l 12 8 +l 13 6 +l 13 3 +l 12 1 +m 1 15 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 7 +m 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 10 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 2 6 +l 2 4 +l 1 4 +l 1 5 + +37 21 10 29 +m 18 21 +l 0 0 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 22 11 66 +m 18 12 +l 18 13 +l 17 13 +l 17 11 +l 19 11 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 3 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 15 +l 5 12 +l 7 9 +l 11 4 +l 14 1 +l 16 0 +l 18 0 +l 19 2 +l 19 3 +m 2 1 +l 1 3 +l 1 6 +l 2 8 +l 3 9 +m 9 14 +l 10 18 +m 10 16 +l 9 20 +m 5 20 +l 4 16 +m 5 13 +l 7 10 +l 11 5 +l 14 2 +l 16 1 +m 5 0 +l 3 1 +l 2 3 +l 2 6 +l 3 8 +l 7 12 +m 4 18 +l 5 14 +l 8 10 +l 12 5 +l 15 2 +l 17 1 +l 18 1 +l 19 2 + +39 7 3 20 +m 3 19 +l 2 18 +l 1 18 +l 0 19 +l 0 20 +l 1 21 +l 2 21 +l 3 20 +l 3 17 +l 2 15 +l 0 14 +m 1 20 +l 1 19 +l 2 19 +l 2 20 +l 1 20 +m 2 18 +l 3 17 +m 3 19 +l 2 15 + +40 11 5 24 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 +m 3 19 +l 2 16 +l 1 12 +l 1 6 +l 2 2 +l 3 -1 +m 5 23 +l 4 21 +l 3 18 +l 2 12 +l 2 6 +l 3 0 +l 4 -3 +l 5 -5 + +41 10 5 24 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 +m 4 19 +l 5 16 +l 6 12 +l 6 6 +l 5 2 +l 4 -1 +m 2 23 +l 3 21 +l 4 18 +l 5 12 +l 5 6 +l 4 0 +l 3 -3 +l 2 -5 + +42 13 6 30 +m 5 21 +l 4 20 +l 6 10 +l 5 9 +m 5 21 +l 5 9 +m 5 21 +l 6 20 +l 4 10 +l 5 9 +m 0 18 +l 1 18 +l 9 12 +l 10 12 +m 0 18 +l 10 12 +m 0 18 +l 0 17 +l 10 13 +l 10 12 +m 10 18 +l 9 18 +l 1 12 +l 0 12 +m 10 18 +l 0 12 +m 10 18 +l 10 17 +l 0 13 +l 0 12 + +43 21 10 12 +m 8 18 +l 8 1 +l 9 1 +m 8 18 +l 9 18 +l 9 1 +m 0 10 +l 17 10 +l 17 9 +m 0 10 +l 0 9 +l 17 9 + +44 7 3 20 +m 3 1 +l 2 0 +l 1 0 +l 0 1 +l 0 2 +l 1 3 +l 2 3 +l 3 2 +l 3 -1 +l 2 -3 +l 0 -4 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 +m 2 0 +l 3 -1 +m 3 1 +l 2 -3 + +45 21 10 6 +m 0 10 +l 17 10 +l 17 9 +m 0 10 +l 0 9 +l 17 9 + +46 7 3 14 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +47 21 10 6 +m 18 25 +l 0 -7 +l 1 -7 +m 18 25 +l 19 25 +l 1 -7 + +48 17 8 45 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 +m 3 19 +l 2 17 +l 1 13 +l 1 8 +l 2 4 +l 3 2 +m 11 2 +l 12 4 +l 13 8 +l 13 13 +l 12 17 +l 11 19 +m 6 21 +l 4 20 +l 3 18 +l 2 13 +l 2 8 +l 3 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 3 +l 12 8 +l 12 13 +l 11 18 +l 10 20 +l 8 21 + +49 15 7 19 +m 4 19 +l 4 0 +m 5 19 +l 5 1 +m 6 21 +l 6 0 +m 6 21 +l 3 18 +l 1 17 +m 0 0 +l 10 0 +m 4 1 +l 2 0 +m 4 2 +l 3 0 +m 6 2 +l 7 0 +m 6 1 +l 8 0 + +50 17 8 54 +m 1 17 +l 1 16 +l 2 16 +l 2 17 +l 1 17 +m 1 18 +l 2 18 +l 3 17 +l 3 16 +l 2 15 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 10 11 +l 5 9 +l 3 8 +l 1 6 +l 0 3 +l 0 0 +m 12 19 +l 13 17 +l 13 15 +l 12 13 +m 9 21 +l 11 20 +l 12 17 +l 12 15 +l 11 13 +l 9 11 +l 5 9 +m 0 2 +l 1 3 +l 3 3 +l 8 2 +l 12 2 +l 14 3 +l 14 5 +m 14 3 +l 13 1 +l 12 0 +l 8 0 +l 3 3 +l 8 1 +l 12 1 +l 13 2 + +51 17 8 68 +m 1 17 +l 1 16 +l 2 16 +l 2 17 +l 1 17 +m 1 18 +l 2 18 +l 3 17 +l 3 16 +l 2 15 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 18 +l 13 15 +l 12 13 +l 9 12 +m 11 20 +l 12 18 +l 12 15 +l 11 13 +m 8 21 +l 10 20 +l 11 18 +l 11 15 +l 10 13 +l 8 12 +m 6 12 +l 9 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 6 +l 3 5 +l 3 4 +l 2 3 +l 1 3 +m 12 9 +l 13 7 +l 13 4 +l 12 2 +m 8 12 +l 10 11 +l 11 10 +l 12 7 +l 12 4 +l 11 1 +l 9 0 +m 1 5 +l 1 4 +l 2 4 +l 2 5 +l 1 5 + +52 18 9 18 +m 9 18 +l 9 0 +m 10 19 +l 10 1 +m 16 6 +l 0 6 +l 11 21 +l 11 0 +m 6 0 +l 14 0 +m 9 1 +l 7 0 +m 9 2 +l 8 0 +m 11 2 +l 12 0 +m 11 1 +l 13 0 + +53 17 8 48 +m 2 21 +l 0 11 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 6 +l 3 5 +l 3 4 +l 2 3 +l 1 3 +m 12 11 +l 13 9 +l 13 5 +l 12 3 +m 8 14 +l 10 13 +l 11 12 +l 12 9 +l 12 5 +l 11 2 +l 10 1 +l 8 0 +m 1 5 +l 1 4 +l 2 4 +l 2 5 +l 1 5 +m 2 21 +l 12 21 +m 2 20 +l 10 20 +m 2 19 +l 6 19 +l 10 20 +l 12 21 + +54 17 8 63 +m 11 18 +l 11 17 +l 12 17 +l 12 18 +l 11 18 +m 12 19 +l 11 19 +l 10 18 +l 10 17 +l 11 16 +l 12 16 +l 13 17 +l 13 18 +l 12 20 +l 10 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 7 +l 13 10 +l 11 12 +l 8 13 +l 6 13 +l 4 12 +l 3 11 +l 2 9 +m 3 18 +l 2 16 +l 1 12 +l 1 6 +l 2 3 +l 3 2 +m 12 3 +l 13 5 +l 13 8 +l 12 10 +m 7 21 +l 5 20 +l 4 19 +l 3 17 +l 2 13 +l 2 6 +l 3 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 8 +l 11 11 +l 10 12 +l 8 13 + +55 17 8 36 +m 0 21 +l 0 15 +m 14 21 +l 14 18 +l 13 15 +l 9 10 +l 8 8 +l 7 4 +l 7 0 +m 8 9 +l 7 7 +l 6 4 +l 6 0 +m 13 15 +l 8 10 +l 6 7 +l 5 4 +l 5 0 +l 7 0 +m 0 17 +l 1 19 +l 3 21 +l 5 21 +l 10 18 +l 12 18 +l 13 19 +l 14 21 +m 2 19 +l 3 20 +l 5 20 +l 7 19 +m 0 17 +l 1 18 +l 3 19 +l 5 19 +l 10 18 + +56 17 8 69 +m 5 21 +l 2 20 +l 1 18 +l 1 15 +l 2 13 +l 5 12 +l 9 12 +l 12 13 +l 13 15 +l 13 18 +l 12 20 +l 9 21 +l 5 21 +m 3 20 +l 2 18 +l 2 15 +l 3 13 +m 11 13 +l 12 15 +l 12 18 +l 11 20 +m 5 21 +l 4 20 +l 3 18 +l 3 15 +l 4 13 +l 5 12 +m 9 12 +l 10 13 +l 11 15 +l 11 18 +l 10 20 +l 9 21 +m 5 12 +l 2 11 +l 1 10 +l 0 8 +l 0 4 +l 1 2 +l 2 1 +l 5 0 +l 9 0 +l 12 1 +l 13 2 +l 14 4 +l 14 8 +l 13 10 +l 12 11 +l 9 12 +m 2 10 +l 1 8 +l 1 4 +l 2 2 +m 12 2 +l 13 4 +l 13 8 +l 12 10 +m 5 12 +l 3 11 +l 2 8 +l 2 4 +l 3 1 +l 5 0 +m 9 0 +l 11 1 +l 12 4 +l 12 8 +l 11 11 +l 9 12 + +57 17 8 63 +m 2 4 +l 2 3 +l 3 3 +l 3 4 +l 2 4 +m 12 12 +l 11 10 +l 10 9 +l 8 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 8 21 +l 11 20 +l 13 18 +l 14 15 +l 14 9 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 4 0 +l 2 1 +l 1 3 +l 1 4 +l 2 5 +l 3 5 +l 4 4 +l 4 3 +l 3 2 +l 2 2 +m 2 11 +l 1 13 +l 1 16 +l 2 18 +m 11 19 +l 12 18 +l 13 15 +l 13 9 +l 12 5 +l 11 3 +m 6 8 +l 4 9 +l 3 10 +l 2 13 +l 2 16 +l 3 19 +l 4 20 +l 6 21 +m 8 21 +l 10 20 +l 11 18 +l 12 15 +l 12 8 +l 11 4 +l 10 2 +l 9 1 +l 7 0 + +58 7 3 28 +m 1 14 +l 0 13 +l 0 12 +l 1 11 +l 2 11 +l 3 12 +l 3 13 +l 2 14 +l 1 14 +m 1 13 +l 1 12 +l 2 12 +l 2 13 +l 1 13 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +59 7 3 34 +m 1 14 +l 0 13 +l 0 12 +l 1 11 +l 2 11 +l 3 12 +l 3 13 +l 2 14 +l 1 14 +m 1 13 +l 1 12 +l 2 12 +l 2 13 +l 1 13 +m 3 1 +l 2 0 +l 1 0 +l 0 1 +l 0 2 +l 1 3 +l 2 3 +l 3 2 +l 3 -1 +l 2 -3 +l 0 -4 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 +m 2 0 +l 3 -1 +m 3 1 +l 2 -3 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 21 10 12 +m 0 14 +l 17 14 +l 17 13 +m 0 14 +l 0 13 +l 17 13 +m 0 6 +l 17 6 +l 17 5 +m 0 6 +l 0 5 +l 17 5 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 16 8 45 +m 1 16 +l 1 17 +l 2 17 +l 2 15 +l 0 15 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 8 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 11 12 +l 7 10 +l 6 10 +l 6 7 +l 7 7 +l 7 10 +m 11 19 +l 12 18 +l 12 14 +l 11 13 +m 8 21 +l 10 20 +l 11 18 +l 11 14 +l 10 12 +l 9 11 +m 6 3 +l 5 2 +l 5 1 +l 6 0 +l 7 0 +l 8 1 +l 8 2 +l 7 3 +l 6 3 +m 6 2 +l 6 1 +l 7 1 +l 7 2 +l 6 2 + +64 24 12 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 16 5 +l 15 6 +l 15 8 +l 16 16 +l 15 16 +l 14 8 + +65 19 9 24 +m 9 21 +l 2 1 +m 8 18 +l 14 0 +m 9 18 +l 15 0 +m 9 21 +l 16 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 2 1 +l 1 0 +m 2 1 +l 4 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 + +66 20 10 61 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +m 15 19 +l 16 17 +l 16 15 +l 15 13 +m 12 21 +l 14 20 +l 15 18 +l 15 14 +l 14 12 +l 12 11 +m 5 11 +l 12 11 +l 15 10 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 0 0 +m 15 9 +l 16 7 +l 16 4 +l 15 2 +m 12 11 +l 14 10 +l 15 8 +l 15 3 +l 14 1 +l 12 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +67 18 9 34 +m 14 18 +l 15 21 +l 15 15 +l 14 18 +l 12 20 +l 10 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 + +68 20 10 48 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 10 21 +l 13 20 +l 15 18 +l 16 16 +l 17 13 +l 17 8 +l 16 5 +l 15 3 +l 13 1 +l 10 0 +l 0 0 +m 14 18 +l 15 16 +l 16 13 +l 16 8 +l 15 5 +l 14 3 +m 10 21 +l 12 20 +l 14 17 +l 15 13 +l 15 8 +l 14 4 +l 12 1 +l 10 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +69 19 9 54 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 5 11 +l 11 11 +m 11 15 +l 11 7 +l 10 11 +l 11 15 +m 0 0 +l 16 0 +l 16 6 +l 15 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 11 21 +l 16 20 +m 13 21 +l 16 19 +m 14 21 +l 16 18 +m 11 13 +l 9 11 +l 11 9 +m 11 12 +l 7 11 +l 11 10 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 11 0 +l 16 1 +m 13 0 +l 16 2 +m 14 0 +l 16 3 + +70 18 9 48 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 16 21 +l 16 15 +m 5 11 +l 11 11 +m 11 15 +l 11 7 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 11 21 +l 16 20 +m 13 21 +l 16 19 +m 14 21 +l 16 18 +m 15 21 +l 16 15 +m 11 15 +l 10 11 +l 11 7 +m 11 13 +l 9 11 +l 11 9 +m 11 12 +l 7 11 +l 11 10 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +71 20 10 50 +m 14 18 +l 15 21 +l 15 15 +l 14 18 +l 12 20 +l 10 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 10 0 +l 12 1 +l 14 1 +l 15 0 +l 15 8 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 14 7 +l 14 2 +m 13 8 +l 13 2 +l 12 1 +m 10 8 +l 18 8 +m 11 8 +l 13 7 +m 12 8 +l 13 6 +m 16 8 +l 15 6 +m 17 8 +l 15 7 + +72 22 11 54 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 15 21 +l 15 0 +m 16 20 +l 16 1 +m 17 21 +l 17 0 +m 0 21 +l 8 21 +m 12 21 +l 20 21 +m 5 11 +l 15 11 +m 0 0 +l 8 0 +m 12 0 +l 20 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 13 21 +l 15 20 +m 14 21 +l 15 19 +m 18 21 +l 17 19 +m 19 21 +l 17 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 15 1 +l 13 0 +m 15 2 +l 14 0 +m 17 2 +l 18 0 +m 17 1 +l 19 0 + +73 10 5 26 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 8 21 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +74 14 7 36 +m 7 21 +l 7 4 +l 6 1 +l 5 0 +m 8 20 +l 8 4 +l 7 1 +m 9 21 +l 9 4 +l 8 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 1 6 +l 2 6 +l 3 5 +l 3 4 +l 2 3 +l 1 3 +m 1 5 +l 1 4 +l 2 4 +l 2 5 +l 1 5 +m 4 21 +l 12 21 +m 5 21 +l 7 20 +m 6 21 +l 7 19 +m 10 21 +l 9 19 +m 11 21 +l 9 20 + +75 20 10 46 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 16 20 +l 5 9 +m 8 11 +l 15 0 +m 9 11 +l 16 0 +m 9 13 +l 17 0 +m 0 21 +l 8 21 +m 13 21 +l 19 21 +m 0 0 +l 8 0 +m 12 0 +l 19 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 15 21 +l 16 20 +m 18 21 +l 16 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 15 2 +l 13 0 +m 15 2 +l 18 0 + +76 16 8 35 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 8 21 +m 0 0 +l 15 0 +l 15 6 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 10 0 +l 15 1 +m 12 0 +l 15 2 +m 13 0 +l 15 3 +m 14 0 +l 15 6 + +77 24 12 42 +m 3 21 +l 3 1 +m 3 21 +l 10 0 +m 4 21 +l 10 3 +m 5 21 +l 11 3 +m 17 21 +l 10 0 +m 17 21 +l 17 0 +m 18 20 +l 18 1 +m 19 21 +l 19 0 +m 0 21 +l 5 21 +m 17 21 +l 22 21 +m 0 0 +l 6 0 +m 14 0 +l 22 0 +m 1 21 +l 3 20 +m 20 21 +l 19 19 +m 21 21 +l 19 20 +m 3 1 +l 1 0 +m 3 1 +l 5 0 +m 17 1 +l 15 0 +m 17 2 +l 16 0 +m 19 2 +l 20 0 +m 19 1 +l 21 0 + +78 22 11 26 +m 3 21 +l 3 1 +m 3 21 +l 17 0 +m 4 21 +l 16 3 +m 5 21 +l 17 3 +m 17 20 +l 17 0 +m 0 21 +l 5 21 +m 14 21 +l 20 21 +m 0 0 +l 6 0 +m 1 21 +l 3 20 +m 15 21 +l 17 20 +m 19 21 +l 17 20 +m 3 1 +l 1 0 +m 3 1 +l 5 0 + +79 19 9 49 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 + +80 20 10 44 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 14 +l 16 12 +l 15 11 +l 12 10 +l 5 10 +m 15 19 +l 16 17 +l 16 14 +l 15 12 +m 12 21 +l 14 20 +l 15 18 +l 15 13 +l 14 11 +l 12 10 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +81 19 9 69 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 4 3 +l 5 5 +l 7 6 +l 8 6 +l 10 5 +l 11 3 +l 12 -3 +l 13 -5 +l 15 -5 +l 16 -3 +l 16 -1 +m 12 -1 +l 13 -3 +l 14 -4 +l 15 -4 +m 11 3 +l 13 -2 +l 14 -3 +l 15 -3 +l 16 -2 + +82 20 10 62 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +l 5 11 +m 15 19 +l 16 17 +l 16 15 +l 15 13 +m 12 21 +l 14 20 +l 15 18 +l 15 14 +l 14 12 +l 12 11 +m 9 11 +l 11 10 +l 12 8 +l 14 2 +l 15 0 +l 17 0 +l 18 2 +l 18 4 +m 14 4 +l 15 2 +l 16 1 +l 17 1 +m 11 10 +l 12 9 +l 15 3 +l 16 2 +l 17 2 +l 18 3 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +83 17 8 41 +m 13 18 +l 14 21 +l 14 15 +l 13 18 +l 11 20 +l 8 21 +l 5 21 +l 2 20 +l 0 18 +l 0 15 +l 1 13 +l 4 11 +l 10 9 +l 12 8 +l 13 6 +l 13 3 +l 12 1 +m 1 15 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 7 +m 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 10 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 6 0 +l 3 1 +l 1 3 +l 0 6 +l 0 0 +l 1 3 + +84 18 9 38 +m 0 21 +l 0 15 +m 7 21 +l 7 0 +m 8 20 +l 8 1 +m 9 21 +l 9 0 +m 16 21 +l 16 15 +m 0 21 +l 16 21 +m 4 0 +l 12 0 +m 1 21 +l 0 15 +m 2 21 +l 0 18 +m 3 21 +l 0 19 +m 5 21 +l 0 20 +m 11 21 +l 16 20 +m 13 21 +l 16 19 +m 14 21 +l 16 18 +m 15 21 +l 16 15 +m 7 1 +l 5 0 +m 7 2 +l 6 0 +m 9 2 +l 10 0 +m 9 1 +l 11 0 + +85 22 11 34 +m 3 21 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 20 +m 4 20 +l 4 5 +l 5 3 +m 5 21 +l 5 5 +l 6 2 +l 7 1 +l 9 0 +m 0 21 +l 8 21 +m 14 21 +l 20 21 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 15 21 +l 17 20 +m 19 21 +l 17 20 + +86 19 9 23 +m 2 21 +l 9 0 +m 3 21 +l 9 3 +l 9 0 +m 4 21 +l 10 3 +m 16 20 +l 9 0 +m 0 21 +l 7 21 +m 12 21 +l 18 21 +m 1 21 +l 3 19 +m 5 21 +l 4 19 +m 6 21 +l 4 20 +m 14 21 +l 16 20 +m 17 21 +l 16 20 + +87 23 11 38 +m 3 21 +l 7 0 +m 4 21 +l 7 5 +l 7 0 +m 5 21 +l 8 5 +m 11 21 +l 8 5 +l 7 0 +m 11 21 +l 15 0 +m 12 21 +l 15 5 +l 15 0 +m 13 21 +l 16 5 +m 19 20 +l 16 5 +l 15 0 +m 0 21 +l 8 21 +m 11 21 +l 13 21 +m 16 21 +l 22 21 +m 1 21 +l 4 20 +m 2 21 +l 4 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 17 21 +l 19 20 +m 21 21 +l 19 20 + +88 19 9 36 +m 2 21 +l 14 0 +m 3 21 +l 15 0 +m 4 21 +l 16 0 +m 15 20 +l 3 1 +m 0 21 +l 7 21 +m 12 21 +l 18 21 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 1 21 +l 4 19 +m 5 21 +l 4 19 +m 6 21 +l 4 20 +m 13 21 +l 15 20 +m 17 21 +l 15 20 +m 3 1 +l 1 0 +m 3 1 +l 5 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 14 2 +l 17 0 + +89 21 10 33 +m 2 21 +l 9 10 +l 9 0 +m 3 21 +l 10 10 +l 10 1 +m 4 21 +l 11 10 +l 11 0 +m 17 20 +l 11 10 +m 0 21 +l 7 21 +m 14 21 +l 20 21 +m 6 0 +l 14 0 +m 1 21 +l 3 20 +m 6 21 +l 4 20 +m 15 21 +l 17 20 +m 19 21 +l 17 20 +m 9 1 +l 7 0 +m 9 2 +l 8 0 +m 11 2 +l 12 0 +m 11 1 +l 13 0 + +90 17 8 28 +m 14 21 +l 0 21 +l 0 15 +m 12 21 +l 0 0 +m 13 21 +l 1 0 +m 14 21 +l 2 0 +m 0 0 +l 14 0 +l 14 6 +m 1 21 +l 0 15 +m 2 21 +l 0 18 +m 3 21 +l 0 19 +m 5 21 +l 0 20 +m 9 0 +l 14 1 +m 11 0 +l 14 2 +m 12 0 +l 14 3 +m 13 0 +l 14 6 + +91 7 3 8 +m 0 19 +l 0 -1 +m 1 19 +l 1 -1 +m 0 19 +l 5 19 +m 0 -1 +l 5 -1 + +92 14 7 2 +m 0 21 +l 14 -3 + +93 8 4 8 +m 4 19 +l 4 -1 +m 5 19 +l 5 -1 +m 0 19 +l 5 19 +m 0 -1 +l 5 -1 + +94 19 9 5 +m 0 14 +l 8 19 +l 16 14 +l 8 18 +l 0 14 + +95 17 8 2 +m 0 -7 +l 16 -7 + +96 6 3 7 +m 2 21 +l 1 20 +l 0 18 +l 0 16 +l 1 15 +l 2 16 +l 1 17 + +97 17 8 48 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +l 15 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 + +98 19 9 39 +m 3 21 +l 3 0 +l 4 1 +l 6 1 +m 4 20 +l 4 2 +m 0 21 +l 5 21 +l 5 1 +m 5 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 8 0 +l 6 1 +l 5 3 +m 14 11 +l 15 9 +l 15 5 +l 14 3 +m 10 14 +l 12 13 +l 13 12 +l 14 9 +l 14 5 +l 13 2 +l 12 1 +l 10 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 + +99 16 8 31 +m 12 10 +l 12 11 +l 11 11 +l 11 9 +l 13 9 +l 13 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 + +100 18 9 42 +m 11 21 +l 11 0 +l 16 0 +m 12 20 +l 12 1 +m 8 21 +l 13 21 +l 13 0 +m 11 11 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 10 1 +l 11 3 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 9 21 +l 11 20 +m 10 21 +l 11 19 +m 13 2 +l 14 0 +m 13 1 +l 15 0 + +101 16 8 36 +m 2 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 9 +l 12 10 +l 11 12 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 11 8 +l 11 11 +l 10 13 +l 8 14 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 + +102 12 6 31 +m 10 19 +l 10 20 +l 9 20 +l 9 18 +l 11 18 +l 11 20 +l 10 21 +l 7 21 +l 5 20 +l 4 19 +l 3 16 +l 3 0 +m 5 19 +l 4 16 +l 4 1 +m 7 21 +l 6 20 +l 5 18 +l 5 0 +m 0 14 +l 9 14 +m 0 0 +l 8 0 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +103 17 8 79 +m 13 13 +l 14 12 +l 15 13 +l 14 14 +l 13 14 +l 11 13 +l 10 12 +m 6 14 +l 4 13 +l 3 12 +l 2 10 +l 2 8 +l 3 6 +l 4 5 +l 6 4 +l 8 4 +l 10 5 +l 11 6 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 6 14 +m 4 12 +l 3 10 +l 3 8 +l 4 6 +m 10 6 +l 11 8 +l 11 10 +l 10 12 +m 6 14 +l 5 13 +l 4 11 +l 4 7 +l 5 5 +l 6 4 +m 8 4 +l 9 5 +l 10 7 +l 10 11 +l 9 13 +l 8 14 +m 3 6 +l 2 5 +l 1 3 +l 1 2 +l 2 0 +l 3 -1 +l 6 -2 +l 10 -2 +l 13 -3 +l 14 -4 +m 3 0 +l 6 -1 +l 10 -1 +l 13 -2 +m 1 2 +l 2 1 +l 5 0 +l 10 0 +l 13 -1 +l 14 -3 +l 14 -4 +l 13 -6 +l 10 -7 +l 4 -7 +l 1 -6 +l 0 -4 +l 0 -3 +l 1 -1 +l 4 0 +m 4 -7 +l 2 -6 +l 1 -4 +l 1 -3 +l 2 -1 +l 4 0 + +104 21 10 47 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 0 21 +l 5 21 +l 5 0 +m 5 10 +l 6 12 +l 7 13 +l 9 14 +l 12 14 +l 14 13 +l 15 12 +l 16 9 +l 16 0 +m 14 12 +l 15 9 +l 15 1 +m 12 14 +l 13 13 +l 14 10 +l 14 0 +m 0 0 +l 8 0 +m 11 0 +l 19 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 +m 16 1 +l 18 0 + +105 10 5 30 +m 3 21 +l 3 19 +l 5 19 +l 5 21 +l 3 21 +m 4 21 +l 4 19 +m 3 20 +l 5 20 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 0 0 +l 8 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +106 12 6 33 +m 6 21 +l 6 19 +l 8 19 +l 8 21 +l 6 21 +m 7 21 +l 7 19 +m 6 20 +l 8 20 +m 6 14 +l 6 -3 +l 5 -6 +l 4 -7 +m 7 13 +l 7 -2 +l 6 -5 +m 3 14 +l 8 14 +l 8 -2 +l 7 -5 +l 6 -6 +l 4 -7 +l 1 -7 +l 0 -6 +l 0 -4 +l 2 -4 +l 2 -6 +l 1 -6 +l 1 -5 +m 4 14 +l 6 13 +m 5 14 +l 6 12 + +107 20 10 41 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 0 21 +l 5 21 +l 5 0 +m 14 13 +l 5 4 +m 9 8 +l 16 0 +m 9 7 +l 15 0 +m 8 7 +l 14 0 +m 11 14 +l 18 14 +m 0 0 +l 8 0 +m 11 0 +l 18 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 12 14 +l 14 13 +m 17 14 +l 14 13 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 14 2 +l 12 0 +m 13 2 +l 17 0 + +108 10 5 21 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 0 21 +l 5 21 +l 5 0 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +109 32 16 73 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 5 10 +l 6 12 +l 7 13 +l 9 14 +l 12 14 +l 14 13 +l 15 12 +l 16 9 +l 16 0 +m 14 12 +l 15 9 +l 15 1 +m 12 14 +l 13 13 +l 14 10 +l 14 0 +m 16 10 +l 17 12 +l 18 13 +l 20 14 +l 23 14 +l 25 13 +l 26 12 +l 27 9 +l 27 0 +m 25 12 +l 26 9 +l 26 1 +m 23 14 +l 24 13 +l 25 10 +l 25 0 +m 0 0 +l 8 0 +m 11 0 +l 19 0 +m 22 0 +l 30 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 25 1 +l 23 0 +m 25 2 +l 24 0 +m 27 2 +l 28 0 +m 27 1 +l 29 0 + +110 21 10 47 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 5 10 +l 6 12 +l 7 13 +l 9 14 +l 12 14 +l 14 13 +l 15 12 +l 16 9 +l 16 0 +m 14 12 +l 15 9 +l 15 1 +m 12 14 +l 13 13 +l 14 10 +l 14 0 +m 0 0 +l 8 0 +m 11 0 +l 19 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 +m 16 1 +l 18 0 + +111 17 8 41 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 + +112 19 9 47 +m 3 14 +l 3 -7 +m 4 13 +l 4 -6 +m 0 14 +l 5 14 +l 5 -7 +m 5 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 8 0 +l 6 1 +l 5 3 +m 14 11 +l 15 9 +l 15 5 +l 14 3 +m 10 14 +l 12 13 +l 13 12 +l 14 9 +l 14 5 +l 13 2 +l 12 1 +l 10 0 +m 0 -7 +l 8 -7 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 -6 +l 1 -7 +m 3 -5 +l 2 -7 +m 5 -5 +l 6 -7 +m 5 -6 +l 7 -7 + +113 17 8 44 +m 11 13 +l 11 -7 +m 12 12 +l 12 -6 +m 10 13 +l 12 13 +l 13 14 +l 13 -7 +m 11 11 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 10 1 +l 11 3 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 8 -7 +l 16 -7 +m 11 -6 +l 9 -7 +m 11 -5 +l 10 -7 +m 13 -5 +l 14 -7 +m 13 -6 +l 15 -7 + +114 15 7 32 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 12 12 +l 12 13 +l 11 13 +l 11 11 +l 13 11 +l 13 13 +l 12 14 +l 10 14 +l 8 13 +l 6 11 +l 5 8 +m 0 0 +l 8 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +115 14 7 38 +m 10 12 +l 11 14 +l 11 10 +l 10 12 +l 9 13 +l 7 14 +l 3 14 +l 1 13 +l 0 12 +l 0 10 +l 1 8 +l 3 7 +l 8 6 +l 10 5 +l 11 2 +m 1 13 +l 0 10 +m 1 9 +l 3 8 +l 8 7 +l 10 6 +m 11 5 +l 10 1 +m 0 12 +l 1 10 +l 3 9 +l 8 8 +l 10 7 +l 11 5 +l 11 2 +l 10 1 +l 8 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 +l 0 0 +l 1 2 + +116 15 7 17 +m 7 0 +l 6 1 +l 5 4 +l 5 21 +l 3 19 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 12 3 +m 4 19 +l 4 4 +l 5 2 +m 0 14 +l 9 14 + +117 21 10 33 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 + +118 17 8 21 +m 2 14 +l 8 0 +m 3 14 +l 8 2 +m 4 14 +l 9 2 +m 14 13 +l 9 2 +l 8 0 +m 0 14 +l 7 14 +m 10 14 +l 16 14 +m 1 14 +l 4 12 +m 6 14 +l 4 13 +m 12 14 +l 14 13 +m 15 14 +l 14 13 + +119 23 11 31 +m 3 14 +l 7 0 +m 4 14 +l 7 3 +m 5 14 +l 8 3 +m 11 14 +l 8 3 +l 7 0 +m 11 14 +l 15 0 +m 12 14 +l 15 3 +m 11 14 +l 13 14 +l 16 3 +m 19 13 +l 16 3 +l 15 0 +m 0 14 +l 8 14 +m 16 14 +l 22 14 +m 1 14 +l 4 13 +m 7 14 +l 5 13 +m 17 14 +l 19 13 +m 21 14 +l 19 13 + +120 18 9 32 +m 2 14 +l 12 0 +m 3 14 +l 13 0 +m 4 14 +l 14 0 +m 13 13 +l 3 1 +m 0 14 +l 7 14 +m 10 14 +l 16 14 +m 0 0 +l 6 0 +m 9 0 +l 16 0 +m 1 14 +l 3 13 +m 6 14 +l 4 13 +m 11 14 +l 13 13 +m 15 14 +l 13 13 +m 3 1 +l 1 0 +m 3 1 +l 5 0 +m 12 1 +l 10 0 +m 13 1 +l 15 0 + +121 18 9 30 +m 3 14 +l 9 0 +m 4 14 +l 9 2 +m 5 14 +l 10 2 +m 15 13 +l 10 2 +l 7 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -4 +l 2 -4 +l 2 -6 +l 1 -6 +l 1 -5 +m 1 14 +l 8 14 +m 11 14 +l 17 14 +m 2 14 +l 5 12 +m 7 14 +l 5 13 +m 13 14 +l 15 13 +m 16 14 +l 15 13 + +122 15 7 28 +m 10 14 +l 0 0 +m 11 14 +l 1 0 +m 12 14 +l 2 0 +m 12 14 +l 0 14 +l 0 10 +m 0 0 +l 12 0 +l 12 4 +m 1 14 +l 0 10 +m 2 14 +l 0 11 +m 3 14 +l 0 12 +m 5 14 +l 0 13 +m 7 0 +l 12 1 +m 9 0 +l 12 2 +m 10 0 +l 12 3 +m 11 0 +l 12 4 + +123 10 5 37 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +m 3 24 +l 2 22 +l 2 20 +l 3 18 +l 4 17 +l 5 15 +l 5 13 +l 4 11 +l 0 9 +l 4 7 +l 5 5 +l 5 3 +l 4 1 +l 3 0 +l 2 -2 +l 2 -4 +l 3 -6 +m 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 4 2 2 +m 0 21 +l 0 0 + +125 9 4 37 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +m 2 24 +l 3 22 +l 3 20 +l 2 18 +l 1 17 +l 0 15 +l 0 13 +l 1 11 +l 5 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 2 0 +l 3 -2 +l 3 -4 +l 2 -6 +m 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 14 7 10 +m 15 21 +l 10 15 +l 5 18 +l 0 17 +l 5 21 +l 10 17 +l 15 21 +l 10 16 +l 5 19 +l 0 17 + +127 17 8 7 +m 0 6 +l 0 0 +l 12 0 +l 12 8 +l 6 17 +l 0 8 +l 0 6 + +128 18 9 38 +m 14 19 +l 15 22 +l 15 16 +l 14 19 +l 12 21 +l 10 22 +l 7 22 +l 4 21 +l 2 19 +l 1 17 +l 0 14 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 7 1 +l 10 1 +l 12 2 +l 14 4 +l 15 6 +m 3 19 +l 2 17 +l 1 14 +l 1 9 +l 2 6 +l 3 4 +m 7 22 +l 4 18 +l 3 14 +l 3 9 +l 4 5 +l 8 1 +m 9 2 +l 13 -4 +l 13 -1 +l 9 2 +m 10 1 +l 12 -1 + +129 21 10 61 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 5 20 +l 4 19 +l 4 18 +l 5 17 +l 6 17 +l 7 18 +l 7 19 +l 6 20 +l 5 20 +m 5 19 +l 5 18 +l 6 18 +l 6 19 +l 5 19 +m 12 20 +l 11 19 +l 11 18 +l 12 17 +l 13 17 +l 14 18 +l 14 19 +l 13 20 +l 12 20 +m 12 19 +l 12 18 +l 13 18 +l 13 19 +l 12 19 + +130 16 8 41 +m 2 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 9 +l 12 10 +l 11 12 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 11 8 +l 11 11 +l 10 13 +l 8 14 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 16 +l 9 21 +l 12 19 +l 2 16 +l 10 20 + +131 19 10 53 +m 4 11 +l 4 12 +l 5 12 +l 5 10 +l 3 10 +l 3 12 +l 4 13 +l 6 14 +l 10 14 +l 12 13 +l 13 12 +l 14 10 +l 14 3 +l 15 1 +l 16 0 +l 17 0 +m 12 12 +l 13 10 +l 13 3 +l 14 1 +m 10 14 +l 11 13 +l 12 11 +l 12 3 +l 13 1 +l 16 0 +m 12 9 +l 11 8 +l 6 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 6 0 +l 9 0 +l 11 1 +l 12 3 +m 4 6 +l 3 4 +l 3 3 +l 4 1 +m 11 8 +l 7 7 +l 5 6 +l 4 4 +l 4 3 +l 5 1 +l 6 0 +m 0 17 +l 8 22 +l 16 17 +l 8 21 +l 0 17 + +132 17 8 76 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 2 20 +l 1 19 +l 1 18 +l 2 17 +l 3 17 +l 4 18 +l 4 19 +l 3 20 +l 2 20 +m 2 19 +l 2 18 +l 3 18 +l 3 19 +l 2 19 +m 9 20 +l 8 19 +l 8 18 +l 9 17 +l 10 17 +l 11 18 +l 11 19 +l 10 20 +l 9 20 +m 9 19 +l 9 18 +l 10 18 +l 10 19 +l 9 19 + +133 17 8 53 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 10 16 +l 3 21 +l 0 19 +l 10 16 +l 2 20 + +134 17 8 62 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 6 20 +l 5 19 +l 5 18 +l 6 17 +l 7 17 +l 8 18 +l 8 19 +l 7 20 +l 6 20 +m 6 19 +l 6 18 +l 7 18 +l 7 19 +l 6 19 + +135 16 8 36 +m 6 2 +l 4 3 +l 3 4 +l 2 7 +l 2 9 +l 3 12 +l 4 13 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 1 5 +l 3 3 +l 6 2 +l 8 2 +l 11 3 +l 13 5 +m 2 11 +l 1 9 +l 1 7 +l 2 5 +m 12 10 +l 12 11 +l 11 11 +l 11 9 +l 13 9 +l 13 11 +l 11 13 +l 9 14 +l 6 14 +m 7 3 +l 10 -3 +l 11 0 +l 7 3 +m 10 -1 +l 8 2 + +136 17 9 41 +m 3 8 +l 14 8 +l 14 10 +l 13 12 +l 12 13 +l 9 14 +l 7 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 13 9 +l 13 10 +l 12 12 +m 3 11 +l 2 9 +l 2 5 +l 3 3 +m 12 8 +l 12 11 +l 11 13 +l 9 14 +m 7 14 +l 5 13 +l 4 12 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +m 0 17 +l 8 22 +l 16 17 +l 8 21 +l 0 17 + +137 16 8 64 +m 2 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 9 +l 12 10 +l 11 12 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 11 8 +l 11 11 +l 10 13 +l 8 14 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 3 21 +l 2 20 +l 2 19 +l 3 18 +l 4 18 +l 5 19 +l 5 20 +l 4 21 +l 3 21 +m 3 20 +l 3 19 +l 4 19 +l 4 20 +l 3 20 +m 10 21 +l 9 20 +l 9 19 +l 10 18 +l 11 18 +l 12 19 +l 12 20 +l 11 21 +l 10 21 +m 10 20 +l 10 19 +l 11 19 +l 11 20 +l 10 20 + +138 16 8 53 +m 2 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 9 +l 12 10 +l 11 12 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 11 8 +l 11 11 +l 10 13 +l 8 14 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 4 22 +l 5 21 +l 6 21 +l 7 22 +l 7 23 +l 6 24 +l 5 24 +l 4 23 +l 4 20 +l 8 17 +m 6 23 +l 6 22 +l 5 22 +l 5 23 +l 6 23 +m 5 21 +l 4 20 + +139 13 6 49 +m 4 14 +l 4 0 +m 5 13 +l 5 1 +m 1 14 +l 6 14 +l 6 0 +m 1 0 +l 9 0 +m 2 14 +l 4 13 +m 3 14 +l 4 12 +m 4 1 +l 2 0 +m 4 2 +l 3 0 +m 6 2 +l 7 0 +m 6 1 +l 8 0 +m 1 20 +l 0 19 +l 0 18 +l 1 17 +l 2 17 +l 3 18 +l 3 19 +l 2 20 +l 1 20 +m 1 19 +l 1 18 +l 2 18 +l 2 19 +l 1 19 +m 8 20 +l 7 19 +l 7 18 +l 8 17 +l 9 17 +l 10 18 +l 10 19 +l 9 20 +l 8 20 +m 8 19 +l 8 18 +l 9 18 +l 9 19 +l 8 19 + +140 18 9 26 +m 7 14 +l 7 0 +m 8 13 +l 8 1 +m 4 14 +l 9 14 +l 9 0 +m 4 0 +l 12 0 +m 5 14 +l 7 13 +m 6 14 +l 7 12 +m 7 1 +l 5 0 +m 7 2 +l 6 0 +m 9 2 +l 10 0 +m 9 1 +l 11 0 +m 0 17 +l 8 22 +l 16 17 +l 8 21 +l 0 17 + +141 10 5 38 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 0 0 +l 8 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 0 22 +l 1 21 +l 2 21 +l 3 22 +l 3 23 +l 2 24 +l 1 24 +l 0 23 +l 0 20 +l 4 17 +m 2 23 +l 2 22 +l 1 22 +l 1 23 +l 2 23 +m 1 21 +l 0 20 + +142 21 10 50 +m 16 0 +l 9 21 +l 2 1 +l 1 0 +m 8 18 +l 14 0 +m 9 18 +l 15 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 2 1 +l 4 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 +m 5 27 +l 4 26 +l 4 25 +l 5 24 +l 6 24 +l 7 25 +l 7 26 +l 6 27 +l 5 27 +m 5 26 +l 5 25 +l 6 25 +l 6 26 +l 5 26 +m 12 27 +l 11 26 +l 11 25 +l 12 24 +l 13 24 +l 14 25 +l 14 26 +l 13 27 +l 12 27 +m 12 26 +l 12 25 +l 13 25 +l 13 26 +l 12 26 + +143 19 9 36 +m 16 0 +l 9 21 +l 2 1 +l 1 0 +m 8 18 +l 14 0 +m 9 18 +l 15 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 2 1 +l 4 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 +m 8 27 +l 7 26 +l 7 25 +l 8 24 +l 9 24 +l 10 25 +l 10 26 +l 9 27 +l 8 27 +m 8 26 +l 8 25 +l 9 25 +l 9 26 +l 8 26 + +144 19 9 59 +m 4 23 +l 11 28 +l 14 26 +l 4 23 +l 12 27 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 5 11 +l 11 11 +m 11 15 +l 11 7 +l 10 11 +l 11 15 +m 0 0 +l 16 0 +l 16 6 +l 15 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 11 21 +l 16 20 +m 13 21 +l 16 19 +m 14 21 +l 16 18 +m 11 13 +l 9 11 +l 11 9 +m 11 12 +l 7 11 +l 11 10 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 11 0 +l 16 1 +m 13 0 +l 16 2 +m 14 0 +l 16 3 + +145 29 14 86 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 20 0 +l 23 1 +l 25 3 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 18 14 +l 20 14 +l 23 13 +l 24 12 +l 25 10 +l 25 8 +l 14 8 +l 14 9 +l 15 12 +l 16 13 +l 18 14 +l 15 13 +l 13 11 +l 12 8 +m 20 14 +l 22 13 +l 23 11 +l 23 8 +m 22 13 +l 23 12 +l 24 10 +l 24 8 +m 12 6 +l 13 3 +l 15 1 +l 18 0 +m 14 11 +l 13 9 +l 13 5 +l 14 3 +m 14 8 +l 14 5 +l 15 2 +l 16 1 +m 14 1 +l 16 0 + +146 28 14 66 +m 24 21 +l 25 15 +l 25 21 +l 9 21 +l 2 1 +l 1 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 2 1 +l 4 0 +m 12 0 +l 12 21 +m 10 21 +l 12 20 +m 11 21 +l 12 19 +m 13 20 +l 13 1 +m 14 21 +l 14 0 +m 15 21 +l 14 19 +m 14 11 +l 20 11 +m 20 15 +l 20 7 +l 19 11 +l 20 15 +m 20 10 +l 16 11 +l 20 12 +m 19 12 +l 18 11 +l 19 10 +m 16 21 +l 14 20 +m 20 21 +l 25 20 +m 9 0 +l 25 0 +l 25 4 +m 14 2 +l 15 0 +m 14 1 +l 16 0 +m 12 2 +l 11 0 +m 10 0 +l 12 1 +m 24 0 +l 25 5 +l 25 6 +l 24 0 +l 25 5 +m 20 0 +l 25 1 +m 23 0 +l 25 3 +m 22 0 +l 25 2 +m 23 21 +l 25 18 +m 22 21 +l 25 19 + +147 18 9 45 +m 7 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 6 +l 15 8 +l 14 11 +l 12 13 +l 9 14 +l 7 14 +l 5 13 +l 4 12 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +m 3 11 +l 2 9 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 14 9 +l 13 11 +m 9 0 +l 11 1 +l 12 2 +l 13 5 +l 13 9 +l 12 12 +l 11 13 +l 9 14 +m 0 17 +l 8 22 +l 16 17 +l 8 21 +l 0 17 + +148 17 8 68 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 3 20 +l 2 19 +l 2 18 +l 3 17 +l 4 17 +l 5 18 +l 5 19 +l 4 20 +l 3 20 +m 3 19 +l 3 18 +l 4 18 +l 4 19 +l 3 19 +m 10 20 +l 9 19 +l 9 18 +l 10 17 +l 11 17 +l 12 18 +l 12 19 +l 11 20 +l 10 20 +m 10 19 +l 10 18 +l 11 18 +l 11 19 +l 10 19 + +149 17 8 57 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 4 22 +l 5 21 +l 6 21 +l 7 22 +l 7 23 +l 6 24 +l 5 24 +l 4 23 +l 4 20 +l 8 17 +m 6 23 +l 6 22 +l 5 22 +l 5 23 +l 6 23 +m 5 21 +l 4 20 + +150 21 10 38 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 0 17 +l 8 22 +l 16 17 +l 8 21 +l 0 17 + +151 21 10 50 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 5 22 +l 6 21 +l 7 21 +l 8 22 +l 8 23 +l 7 24 +l 6 24 +l 5 23 +l 5 20 +l 9 17 +m 7 23 +l 7 22 +l 6 22 +l 6 23 +l 7 23 +m 6 21 +l 5 20 + +152 18 9 57 +m 3 14 +l 9 0 +m 4 14 +l 9 2 +m 5 14 +l 10 2 +l 7 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -4 +l 2 -4 +l 2 -6 +l 1 -6 +l 1 -5 +m 13 14 +l 15 13 +l 10 2 +m 1 14 +l 8 14 +m 11 14 +l 17 14 +m 2 14 +l 5 12 +m 7 14 +l 5 13 +m 16 14 +l 15 13 +m 5 20 +l 4 19 +l 4 18 +l 5 17 +l 6 17 +l 7 18 +l 7 19 +l 6 20 +l 5 20 +m 5 19 +l 5 18 +l 6 18 +l 6 19 +l 5 19 +m 12 20 +l 11 19 +l 11 18 +l 12 17 +l 13 17 +l 14 18 +l 14 19 +l 13 20 +l 12 20 +m 12 19 +l 12 18 +l 13 18 +l 13 19 +l 12 19 + +153 19 9 76 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 4 27 +l 3 26 +l 3 25 +l 4 24 +l 5 24 +l 6 25 +l 6 26 +l 5 27 +l 4 27 +m 4 26 +l 4 25 +l 5 25 +l 5 26 +l 4 26 +m 11 27 +l 10 26 +l 10 25 +l 11 24 +l 12 24 +l 13 25 +l 13 26 +l 12 27 +l 11 27 +m 11 26 +l 11 25 +l 12 25 +l 12 26 +l 11 26 + +154 22 11 61 +m 3 21 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 20 +l 15 21 +m 4 20 +l 4 5 +l 5 3 +m 5 21 +l 5 5 +l 6 2 +l 7 1 +l 9 0 +m 0 21 +l 8 21 +m 14 21 +l 20 21 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 19 21 +l 17 20 +m 6 27 +l 5 26 +l 5 25 +l 6 24 +l 7 24 +l 8 25 +l 8 26 +l 7 27 +l 6 27 +m 6 26 +l 6 25 +l 7 25 +l 7 26 +l 6 26 +m 13 27 +l 12 26 +l 12 25 +l 13 24 +l 14 24 +l 15 25 +l 15 26 +l 14 27 +l 13 27 +m 13 26 +l 13 25 +l 14 25 +l 14 26 +l 13 26 + +155 17 8 47 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 12 17 +l 14 17 +l 3 -3 +l 1 -3 +l 12 17 +m 13 17 +l 2 -3 + +156 20 10 58 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 3 2 +l 2 2 +l 2 3 +l 0 3 +l 0 2 +l 1 1 +l 3 0 +l 3 16 +l 4 18 +l 6 20 +l 11 20 +l 13 18 +l 13 17 +l 11 17 +l 11 18 +l 9 19 +m 5 0 +l 5 16 +l 6 18 +l 7 19 +m 4 1 +l 4 16 +l 5 18 +l 6 19 +l 11 19 +l 12 18 +l 12 17 +m 2 2 +l 1 3 +l 1 2 +l 3 0 +l 13 0 +l 14 1 +l 14 3 +l 11 0 +m 10 0 +l 12 2 +l 12 3 +l 14 3 +l 13 1 +m 0 12 +l 0 10 +l 1 11 +l 7 11 +l 8 10 +l 9 10 +l 9 11 +l 8 12 +l 0 12 +m 1 2 +l 2 1 +l 3 1 +m 8 11 +l 9 10 + +157 19 9 53 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 15 24 +l 16 24 +l 1 -3 +l 0 -3 +l 15 24 + +158 29 14 62 +m 0 24 +l 12 24 +l 15 23 +l 16 22 +l 17 20 +l 17 17 +l 16 15 +l 15 14 +l 12 13 +l 5 13 +m 15 22 +l 16 20 +l 16 17 +l 15 15 +m 12 24 +l 14 23 +l 15 21 +l 15 16 +l 14 14 +l 12 13 +m 1 24 +l 3 23 +m 2 24 +l 3 22 +m 6 24 +l 5 22 +m 7 24 +l 5 23 +m 3 24 +l 3 0 +l 5 0 +l 5 24 +m 4 23 +l 4 1 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 0 0 +l 8 0 +m 3 1 +l 1 0 +m 5 1 +l 7 0 +m 17 16 +l 17 5 +l 18 2 +l 19 1 +l 21 0 +l 20 1 +l 19 4 +l 19 18 +l 17 16 +m 26 3 +l 25 1 +l 23 0 +l 21 0 +m 18 16 +l 18 4 +l 19 2 +m 14 11 +l 23 11 + +159 21 10 57 +m 6 -6 +l 7 -5 +l 8 -3 +l 8 13 +m 10 13 +l 10 -3 +l 9 -5 +l 7 -7 +l 2 -7 +l 0 -5 +l 0 -4 +l 2 -4 +l 2 -5 +l 4 -6 +m 9 13 +l 9 -3 +l 8 -5 +l 7 -6 +l 2 -6 +l 1 -5 +l 1 -4 +m 8 1 +l 8 17 +l 9 19 +l 11 21 +l 16 21 +l 18 19 +l 18 18 +l 16 18 +l 16 19 +l 14 20 +m 10 1 +l 10 17 +l 11 19 +l 12 20 +m 9 2 +l 9 17 +l 10 19 +l 11 20 +l 16 20 +l 17 19 +l 17 18 +m 13 7 +l 13 9 +l 12 8 +l 6 8 +l 5 9 +l 4 9 +l 4 8 +l 5 7 +l 13 7 +m 9 8 +l 9 7 +m 8 7 +l 10 7 +m 5 8 +l 4 9 + +160 17 8 53 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 2 16 +l 9 21 +l 12 19 +l 2 16 +l 10 20 + +161 10 5 26 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 0 0 +l 8 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 2 16 +l 9 21 +l 12 19 +l 2 16 +l 10 20 + +162 17 8 45 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 3 16 +l 10 21 +l 13 19 +l 3 16 +l 11 20 + +163 21 10 38 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 5 16 +l 12 21 +l 15 19 +l 5 16 +l 13 20 + +164 21 10 57 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 5 10 +l 6 12 +l 7 13 +l 9 14 +l 12 14 +l 14 13 +l 15 12 +l 16 9 +l 16 0 +m 14 12 +l 15 9 +l 15 1 +m 12 14 +l 13 13 +l 14 10 +l 14 0 +m 0 0 +l 8 0 +m 11 0 +l 19 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 15 23 +l 10 17 +l 5 20 +l 0 19 +l 5 23 +l 10 19 +l 15 23 +l 10 18 +l 5 21 +l 0 19 + +165 22 11 31 +m 15 21 +l 17 20 +l 17 0 +l 3 21 +l 3 1 +l 1 0 +m 4 21 +l 16 3 +m 0 21 +l 5 21 +l 17 3 +m 14 21 +l 20 21 +m 0 0 +l 6 0 +m 1 21 +l 3 20 +m 19 21 +l 17 20 +m 3 1 +l 5 0 +m 18 30 +l 13 24 +l 8 27 +l 3 26 +l 8 30 +l 13 26 +l 18 30 +l 13 25 +l 8 28 +l 3 26 + +166 17 8 55 +m 2 18 +l 2 19 +l 3 19 +l 3 17 +l 1 17 +l 1 19 +l 2 20 +l 4 21 +l 8 21 +l 10 20 +l 11 19 +l 12 17 +l 12 10 +l 13 8 +l 14 7 +l 15 7 +m 10 19 +l 11 17 +l 11 10 +l 12 8 +m 8 21 +l 9 20 +l 10 18 +l 10 10 +l 11 8 +l 14 7 +m 10 16 +l 9 15 +l 4 14 +l 1 13 +l 0 11 +l 0 10 +l 1 8 +l 4 7 +l 7 7 +l 9 8 +l 10 10 +m 2 13 +l 1 11 +l 1 10 +l 2 8 +m 9 15 +l 5 14 +l 3 13 +l 2 11 +l 2 10 +l 3 8 +l 4 7 +m 0 3 +l 0 5 +l 15 5 +l 15 3 +l 0 3 +m 1 4 +l 14 4 + +167 17 8 46 +m 0 15 +l 1 12 +l 3 10 +l 6 9 +l 8 9 +l 11 10 +l 13 12 +l 14 15 +l 13 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 18 +l 0 15 +m 2 18 +l 1 16 +l 1 14 +l 2 12 +m 12 12 +l 13 14 +l 13 16 +l 12 18 +m 6 21 +l 4 20 +l 3 19 +l 2 16 +l 2 14 +l 3 11 +l 4 10 +l 6 9 +m 8 9 +l 10 10 +l 11 11 +l 12 14 +l 12 16 +l 11 19 +l 10 20 +l 8 21 +m 0 6 +l 0 4 +l 14 4 +l 14 6 +l 0 6 +m 1 5 +l 13 5 + +168 16 8 45 +m 12 5 +l 12 4 +l 11 4 +l 11 6 +l 13 6 +l 13 4 +l 12 2 +l 11 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 1 8 +l 2 9 +l 6 11 +l 7 11 +l 7 14 +l 6 14 +l 6 11 +m 2 2 +l 1 3 +l 1 7 +l 2 8 +m 5 0 +l 3 1 +l 2 3 +l 2 7 +l 3 9 +l 4 10 +m 7 18 +l 8 19 +l 8 20 +l 7 21 +l 6 21 +l 5 20 +l 5 19 +l 6 18 +l 7 18 +m 7 19 +l 7 20 +l 6 20 +l 6 19 +l 7 19 + +169 17 8 7 +m 0 0 +l 0 7 +l 12 7 +l 12 4 +l 3 4 +l 3 0 +l 0 0 + +170 17 8 7 +m 12 0 +l 12 7 +l 0 7 +l 0 4 +l 9 4 +l 9 0 +l 12 0 + +171 23 11 54 +m 3 19 +l 3 10 +m 0 17 +l 2 18 +l 5 21 +l 5 10 +m 3 11 +l 1 10 +l 7 10 +l 5 11 +m 3 12 +l 2 10 +m 5 12 +l 6 10 +m 4 19 +l 4 10 +m 17 21 +l 1 0 +m 9 0 +l 9 3 +l 10 5 +l 12 6 +l 17 7 +l 18 8 +l 18 10 +l 17 11 +l 13 11 +l 11 10 +l 11 9 +m 13 11 +l 11 10 +m 9 2 +l 10 3 +l 11 3 +l 13 0 +l 16 0 +l 17 1 +l 18 3 +l 18 5 +m 18 3 +l 16 2 +l 14 2 +l 11 3 +l 14 1 +l 16 1 +l 17 2 +m 18 9 +l 17 8 +l 12 6 +l 15 6 +l 18 7 +l 18 8 +m 13 6 +l 14 6 + +172 23 11 37 +m 3 19 +l 3 10 +m 0 17 +l 2 18 +l 5 21 +l 5 10 +m 3 11 +l 1 10 +l 7 10 +l 5 11 +m 3 12 +l 2 10 +m 5 12 +l 6 10 +m 4 19 +l 4 10 +m 13 10 +l 13 0 +m 9 0 +l 17 0 +m 12 1 +l 10 0 +m 12 2 +l 11 0 +m 14 2 +l 15 0 +m 14 1 +l 16 0 +m 17 4 +l 7 4 +l 14 11 +l 14 0 +m 12 9 +l 12 0 +m 18 21 +l 18 21 +l 0 0 + +173 7 3 26 +m 2 11 +l 3 3 +l 3 1 +l 2 0 +l 2 14 +l 1 14 +l 1 0 +l 0 1 +l 0 3 +l 1 11 +m 1 0 +l 2 0 +m 1 18 +l 0 19 +l 0 20 +l 1 21 +l 2 21 +l 3 20 +l 3 19 +l 2 18 +l 1 18 +m 1 19 +l 1 20 +l 2 20 +l 2 19 +l 1 19 + +174 22 11 6 +m 9 17 +l 0 10 +l 9 4 +m 18 17 +l 9 10 +l 18 4 + +175 22 11 6 +m 9 17 +l 18 10 +l 9 4 +m 0 17 +l 9 10 +l 0 4 + +176 14 7 126 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 4 21 +l 6 21 +l 6 19 +l 4 19 +l 4 21 +m 5 21 +l 5 19 +m 4 15 +l 6 15 +l 6 13 +l 4 13 +l 4 15 +m 5 15 +l 5 13 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 4 3 +l 6 3 +l 6 1 +l 4 1 +l 4 3 +m 5 3 +l 5 1 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 12 15 +l 14 15 +l 14 13 +l 12 13 +l 12 15 +m 13 15 +l 13 13 +m 12 9 +l 14 9 +l 14 7 +l 12 7 +l 12 9 +m 13 9 +l 13 7 +m 12 3 +l 14 3 +l 14 1 +l 12 1 +l 12 3 +m 13 3 +l 13 1 +m 4 -3 +l 6 -3 +l 6 -5 +l 4 -5 +l 4 -3 +m 5 -3 +l 5 -5 +m 12 -3 +l 14 -3 +l 14 -5 +l 12 -5 +l 12 -3 +m 13 -3 +l 13 -5 + +177 16 8 252 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 2 15 +l 4 15 +l 4 13 +l 2 13 +l 2 15 +m 3 15 +l 3 13 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 2 3 +l 4 3 +l 4 1 +l 2 1 +l 2 3 +m 3 3 +l 3 1 +m 4 18 +l 6 18 +l 6 16 +l 4 16 +l 4 18 +m 5 18 +l 5 16 +m 4 12 +l 6 12 +l 6 10 +l 4 10 +l 4 12 +m 5 12 +l 5 10 +m 4 6 +l 6 6 +l 6 4 +l 4 4 +l 4 6 +m 5 6 +l 5 4 +m 4 0 +l 6 0 +l 6 -2 +l 4 -2 +l 4 0 +m 5 0 +l 5 -2 +m 6 21 +l 8 21 +l 8 19 +l 6 19 +l 6 21 +m 7 21 +l 7 19 +m 6 15 +l 8 15 +l 8 13 +l 6 13 +l 6 15 +m 7 15 +l 7 13 +m 6 9 +l 8 9 +l 8 7 +l 6 7 +l 6 9 +m 7 9 +l 7 7 +m 6 3 +l 8 3 +l 8 1 +l 6 1 +l 6 3 +m 7 3 +l 7 1 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 10 15 +l 12 15 +l 12 13 +l 10 13 +l 10 15 +m 11 15 +l 11 13 +m 10 9 +l 12 9 +l 12 7 +l 10 7 +l 10 9 +m 11 9 +l 11 7 +m 10 3 +l 12 3 +l 12 1 +l 10 1 +l 10 3 +m 11 3 +l 11 1 +m 12 18 +l 14 18 +l 14 16 +l 12 16 +l 12 18 +m 13 18 +l 13 16 +m 12 12 +l 14 12 +l 14 10 +l 12 10 +l 12 12 +m 13 12 +l 13 10 +m 12 6 +l 14 6 +l 14 4 +l 12 4 +l 12 6 +m 13 6 +l 13 4 +m 12 0 +l 14 0 +l 14 -2 +l 12 -2 +l 12 0 +m 13 0 +l 13 -2 +m 14 21 +l 16 21 +l 16 19 +l 14 19 +l 14 21 +m 15 21 +l 15 19 +m 14 15 +l 16 15 +l 16 13 +l 14 13 +l 14 15 +m 15 15 +l 15 13 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 14 3 +l 16 3 +l 16 1 +l 14 1 +l 14 3 +m 15 3 +l 15 1 +m 2 -3 +l 4 -3 +l 4 -5 +l 2 -5 +l 2 -3 +m 3 -3 +l 3 -5 +m 6 -3 +l 8 -3 +l 8 -5 +l 6 -5 +l 6 -3 +m 7 -3 +l 7 -5 +m 10 -3 +l 12 -3 +l 12 -5 +l 10 -5 +l 10 -3 +m 11 -3 +l 11 -5 +m 14 -3 +l 16 -3 +l 16 -5 +l 14 -5 +l 14 -3 +m 15 -3 +l 15 -5 + +178 24 12 276 +m 0 21 +l 2 21 +l 2 19 +l 0 19 +l 0 21 +m 1 21 +l 1 19 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 20 21 +l 22 21 +l 22 19 +l 20 19 +l 20 21 +m 21 21 +l 21 19 +m 22 21 +l 24 21 +l 24 19 +l 22 19 +l 22 21 +m 23 21 +l 23 19 +m 4 17 +l 6 17 +l 6 15 +l 4 15 +l 4 17 +m 5 17 +l 5 15 +m 6 17 +l 8 17 +l 8 15 +l 6 15 +l 6 17 +m 7 17 +l 7 15 +m 8 17 +l 10 17 +l 10 15 +l 8 15 +l 8 17 +m 9 17 +l 9 15 +m 0 13 +l 2 13 +l 2 11 +l 0 11 +l 0 13 +m 1 13 +l 1 11 +m 2 13 +l 4 13 +l 4 11 +l 2 11 +l 2 13 +m 3 13 +l 3 11 +m 10 13 +l 12 13 +l 12 11 +l 10 11 +l 10 13 +m 11 13 +l 11 11 +m 12 13 +l 14 13 +l 14 11 +l 12 11 +l 12 13 +m 13 13 +l 13 11 +m 20 13 +l 22 13 +l 22 11 +l 20 11 +l 20 13 +m 21 13 +l 21 11 +m 22 13 +l 24 13 +l 24 11 +l 22 11 +l 22 13 +m 23 13 +l 23 11 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 16 9 +l 18 9 +l 18 7 +l 16 7 +l 16 9 +m 17 9 +l 17 7 +m 18 9 +l 20 9 +l 20 7 +l 18 7 +l 18 9 +m 19 9 +l 19 7 +m 0 5 +l 2 5 +l 2 3 +l 0 3 +l 0 5 +m 1 5 +l 1 3 +m 2 5 +l 4 5 +l 4 3 +l 2 3 +l 2 5 +m 3 5 +l 3 3 +m 10 5 +l 12 5 +l 12 3 +l 10 3 +l 10 5 +m 11 5 +l 11 3 +m 12 5 +l 14 5 +l 14 3 +l 12 3 +l 12 5 +m 13 5 +l 13 3 +m 20 5 +l 22 5 +l 22 3 +l 20 3 +l 20 5 +m 21 5 +l 21 3 +m 22 5 +l 24 5 +l 24 3 +l 22 3 +l 22 5 +m 23 5 +l 23 3 +m 4 1 +l 10 1 +l 10 -1 +l 4 -1 +l 4 1 +m 5 1 +l 5 -1 +m 7 1 +l 7 -1 +m 9 1 +l 9 -1 +m 0 -3 +l 2 -3 +l 2 -5 +l 0 -5 +l 0 -3 +m 1 -3 +l 1 -5 +m 2 -3 +l 4 -3 +l 4 -5 +l 2 -5 +l 2 -3 +m 3 -3 +l 3 -5 +m 10 -3 +l 14 -3 +l 14 -5 +l 10 -5 +l 10 -3 +m 11 -3 +l 11 -5 +m 13 -3 +l 13 -5 +m 20 -3 +l 24 -3 +l 24 -5 +l 20 -5 +l 20 -3 +m 21 -3 +l 21 -5 +m 23 -3 +l 23 -5 +m 18 17 +l 20 17 +l 20 15 +l 18 15 +l 18 17 +m 19 17 +l 19 15 +m 20 17 +l 22 17 +l 22 15 +l 20 15 +l 20 17 +m 21 17 +l 21 15 +m 22 17 +l 24 17 +l 24 15 +l 22 15 +l 22 17 +m 23 17 +l 23 15 +m 0 9 +l 2 9 +l 2 7 +l 0 7 +l 0 9 +m 1 9 +l 1 7 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 18 1 +l 24 1 +l 24 -1 +l 18 -1 +l 18 1 +m 19 1 +l 19 -1 +m 21 1 +l 21 -1 +m 23 1 +l 23 -1 +m 8 1 +l 8 -1 +m 6 1 +l 6 -1 +m 20 1 +l 20 -1 +m 22 1 +l 22 -1 +m 22 -3 +l 22 -5 +m 12 -3 +l 12 -5 + +179 4 2 2 +m 0 21 +l 0 -7 + +180 12 6 4 +m 8 -7 +l 8 21 +m 0 4 +l 8 4 + +181 19 9 29 +m 9 21 +l 2 1 +m 8 18 +l 14 0 +m 9 18 +l 15 0 +m 9 21 +l 16 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 2 1 +l 1 0 +m 2 1 +l 4 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 +m 9 23 +l 16 28 +l 19 26 +l 9 23 +l 17 27 + +182 19 9 29 +m 9 21 +l 2 1 +m 8 18 +l 14 0 +m 9 18 +l 15 0 +m 9 21 +l 16 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 2 1 +l 1 0 +m 2 1 +l 4 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 +m 1 21 +l 9 26 +l 17 21 +l 9 25 +l 1 21 + +183 19 9 29 +m 9 21 +l 2 1 +m 8 18 +l 14 0 +m 9 18 +l 15 0 +m 9 21 +l 16 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 2 1 +l 1 0 +m 2 1 +l 4 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 +m 9 23 +l 2 28 +l -1 26 +l 9 23 +l 1 27 + +184 13 6 5 +m 0 10 +l 8 10 +l 8 -7 +m 0 4 +l 8 4 + +185 21 10 8 +m 0 4 +l 8 4 +l 8 -7 +m 16 -7 +l 16 21 +m 0 10 +l 8 10 +l 8 21 + +186 20 10 4 +m 8 -7 +l 8 21 +m 16 -7 +l 16 21 + +187 20 10 6 +m 0 10 +l 16 10 +l 16 -7 +m 0 4 +l 8 4 +l 8 -7 + +188 20 10 6 +m 0 4 +l 16 4 +l 16 21 +m 0 10 +l 8 10 +l 8 21 + +189 20 10 5 +m 0 10 +l 16 10 +l 16 21 +m 8 10 +l 8 21 + +190 12 6 5 +m 0 4 +l 8 4 +l 8 21 +m 0 10 +l 8 10 + +191 12 6 3 +m 0 4 +l 8 4 +l 8 -7 + +193 16 8 5 +m 0 10 +l 8 10 +l 8 21 +m 16 10 +l 8 10 + +194 16 8 5 +m 0 4 +l 8 4 +l 8 -7 +m 16 4 +l 8 4 + +195 8 4 4 +m 0 -7 +l 0 21 +m 8 4 +l 0 4 + +196 16 8 2 +m 0 4 +l 16 4 + +197 16 8 4 +m 8 -7 +l 8 21 +m 0 4 +l 16 4 + +198 17 8 58 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +l 15 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 15 21 +l 10 15 +l 5 18 +l 0 17 +l 5 21 +l 10 17 +l 15 21 +l 10 16 +l 5 19 +l 0 17 + +199 19 9 37 +m 9 21 +l 2 1 +m 8 18 +l 14 0 +m 9 18 +l 15 0 +m 9 21 +l 16 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 2 1 +l 1 0 +m 2 1 +l 4 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 +m 11 23 +l 6 26 +l 6 26 +l 1 25 +l 6 29 +l 11 25 +l 16 29 +l 11 23 +l 6 26 +l 1 25 +l 6 27 +l 11 24 +l 16 29 + +200 16 8 6 +m 16 4 +l 0 4 +l 0 21 +m 16 10 +l 8 10 +l 8 21 + +201 16 8 6 +m 16 10 +l 0 10 +l 0 -7 +m 16 4 +l 8 4 +l 8 -7 + +202 24 12 8 +m 0 4 +l 24 4 +m 0 10 +l 8 10 +l 8 21 +m 16 21 +l 16 10 +l 24 10 + +203 24 12 8 +m 0 10 +l 24 10 +m 0 4 +l 8 4 +l 8 -7 +m 16 -7 +l 16 4 +l 24 4 + +204 16 8 8 +m 16 4 +l 8 4 +l 8 -7 +m 0 -7 +l 0 21 +m 16 10 +l 8 10 +l 8 21 + +205 16 8 4 +m 0 4 +l 16 4 +m 0 10 +l 16 10 + +206 24 12 12 +m 0 4 +l 8 4 +l 8 -7 +m 0 10 +l 8 10 +l 8 21 +m 16 21 +l 16 10 +l 24 10 +m 16 -7 +l 16 4 +l 24 4 + +207 16 8 7 +m 0 10 +l 8 10 +l 8 21 +m 16 10 +l 8 10 +m 0 4 +l 16 4 + +208 16 8 6 +m 0 10 +l 16 10 +m 6 21 +l 6 10 +m 14 21 +l 14 10 + +209 16 8 7 +m 0 4 +l 8 4 +l 8 -7 +m 16 4 +l 8 4 +m 0 10 +l 16 10 + +210 19 9 59 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 5 11 +l 11 11 +m 11 15 +l 11 7 +l 10 11 +l 11 15 +m 0 0 +l 16 0 +l 16 6 +l 15 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 11 21 +l 16 20 +m 13 21 +l 16 19 +m 14 21 +l 16 18 +m 11 13 +l 9 11 +l 11 9 +m 11 12 +l 7 11 +l 11 10 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 11 0 +l 16 1 +m 13 0 +l 16 2 +m 14 0 +l 16 3 +m 0 23 +l 8 28 +l 16 23 +l 8 27 +l 0 23 + +211 16 8 5 +m 16 10 +l 0 10 +l 0 21 +m 8 10 +l 8 21 + +212 8 4 5 +m 8 4 +l 0 4 +l 0 21 +m 8 10 +l 0 10 + +213 8 4 5 +m 8 10 +l 0 10 +l 0 -7 +m 8 4 +l 0 4 + +214 10 5 31 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 8 21 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 4 23 +l 11 28 +l 14 26 +l 4 23 +l 12 27 + +215 24 12 6 +m 8 -7 +l 8 21 +m 0 4 +l 24 4 +m 16 -7 +l 16 21 + +216 16 8 6 +m 8 21 +l 8 -7 +m 0 10 +l 16 10 +m 0 4 +l 16 4 + +217 12 6 3 +m 0 10 +l 8 10 +l 8 21 + +218 8 4 3 +m 8 4 +l 0 4 +l 0 -7 + +219 16 8 37 +m 0 21 +l 16 21 +l 16 0 +l 0 0 +l 0 21 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 0 +l 5 21 +m 6 21 +l 6 0 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 10 0 +l 10 21 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 0 11 +l 16 11 + +220 16 8 35 +m 16 0 +l 0 0 +l 0 11 +l 16 11 +l 16 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 11 +l 6 0 +m 7 11 +l 7 0 +m 8 11 +l 8 0 +m 9 11 +l 9 0 +m 10 11 +l 10 0 +m 11 11 +l 11 0 +m 12 11 +l 12 0 +m 13 11 +l 13 0 +m 14 11 +l 14 0 +m 15 11 +l 15 0 + +221 8 4 19 +m 0 0 +l 0 21 +l 8 21 +l 8 0 +l 0 0 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 0 +l 5 21 +m 6 21 +l 6 0 +m 7 21 +l 7 0 + +223 16 8 35 +m 16 10 +l 0 10 +l 0 21 +l 16 21 +l 16 10 +m 1 21 +l 1 10 +m 2 21 +l 2 10 +m 3 21 +l 3 10 +m 4 21 +l 4 10 +m 5 21 +l 5 10 +m 6 21 +l 6 10 +m 7 21 +l 7 10 +m 8 21 +l 8 10 +m 9 21 +l 9 10 +m 10 21 +l 10 10 +m 11 21 +l 11 10 +m 12 21 +l 12 10 +m 13 21 +l 13 10 +m 14 21 +l 14 10 +m 15 21 +l 15 10 + +224 19 9 54 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 6 23 +l 13 28 +l 16 26 +l 6 23 +l 14 27 + +225 17 8 38 +m 2 1 +l 11 1 +l 13 3 +l 13 6 +l 11 8 +l 13 10 +l 13 14 +l 11 16 +l 2 16 +l 0 14 +l 0 -1 +l 2 -1 +l 2 13 +l 4 15 +l 10 15 +l 12 13 +l 12 11 +l 10 9 +l 2 9 +m 0 0 +l 0 -2 +l 2 -2 +l 2 -1 +m 2 8 +l 10 8 +l 12 6 +l 12 3 +l 11 2 +l 2 2 +m 3 16 +l 1 14 +l 1 -2 +m 2 14 +l 4 16 +m 11 15 +l 12 14 +m 12 10 +l 11 9 + +226 19 9 54 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 0 22 +l 8 27 +l 16 22 +l 8 26 +l 0 22 + +227 18 9 21 +m 3 14 +l 3 0 +l 5 0 +l 5 14 +l 10 14 +l 10 0 +l 12 0 +l 12 14 +l 14 14 +l 14 16 +l 0 16 +l 0 14 +l 3 14 +m 0 15 +l 14 15 +m 11 15 +l 11 0 +m 4 15 +l 4 0 +m 3 0 +l 5 0 + +228 17 8 51 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 15 21 +l 10 15 +l 5 18 +l 0 17 +l 5 21 +l 10 17 +l 15 21 +l 10 16 +l 5 19 +l 0 17 + +229 19 9 62 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 10 23 +l 5 26 +l 5 26 +l 0 25 +l 5 29 +l 10 25 +l 15 29 +l 10 23 +l 5 26 +l 0 25 +l 5 27 +l 10 24 +l 15 29 + +230 22 11 44 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 4 2 +l 4 -4 +l 0 -8 +l 3 -8 +l 6 -5 +l 6 1 +m 5 1 +l 5 -5 +l 2 -8 +m 4 -5 +l 2 -7 + +231 21 10 31 +m 8 -4 +l 8 10 +l 6 12 +l 3 12 +l 2 11 +l 2 8 +l 0 8 +l 0 12 +l 2 14 +l 5 14 +l 9 12 +l 10 10 +l 10 -4 +l 8 -4 +m 1 9 +l 1 12 +l 2 13 +l 5 13 +l 7 12 +l 9 10 +l 9 -4 +m 2 12 +l 2 11 +m 10 8 +l 16 14 +l 18 14 +l 10 7 +l 10 8 +l 17 14 +m 10 6 +l 18 14 + +232 18 9 48 +m 6 14 +l 3 13 +l 1 11 +l 0 9 +l 0 8 +l 3 5 +l 6 4 +l 8 4 +l 11 5 +l 14 8 +l 14 9 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 3 6 +l 4 5 +l 6 4 +m 8 4 +l 10 5 +l 11 6 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 2 11 +l 1 9 +l 2 7 +m 12 7 +l 13 9 +l 12 11 +m 0 21 +l 0 20 +l 14 20 +l 14 21 +l 0 21 +m 7 20 +l 7 14 +m 7 4 +l 7 -2 +m 0 -2 +l 14 -2 +l 14 -3 +l 0 -3 +l 0 -2 + +233 22 11 39 +m 3 21 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 20 +m 4 20 +l 4 5 +l 5 3 +m 5 21 +l 5 5 +l 6 2 +l 7 1 +l 9 0 +m 0 21 +l 8 21 +m 14 21 +l 20 21 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 15 21 +l 17 20 +m 19 21 +l 17 20 +m 8 23 +l 15 28 +l 18 26 +l 8 23 +l 16 27 + +234 20 10 60 +m 2 8 +l 2 13 +l 3 17 +l 5 20 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 8 +l 1 13 +l 2 16 +l 3 18 +m 13 18 +l 14 16 +l 15 13 +l 15 9 +l 13 8 +l 10 5 +l 10 1 +m 11 0 +l 11 5 +l 13 7 +l 15 8 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 11 1 +l 16 1 +l 16 0 +l 9 0 +l 9 5 +l 12 8 +l 14 9 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 15 10 +l 15 9 +m 1 9 +l 3 8 +l 6 5 +l 6 1 +m 5 0 +l 5 5 +l 3 7 +l 1 8 +m 5 1 +l 0 1 +l 0 0 +l 7 0 +l 7 5 +l 4 8 +l 2 9 + +235 18 9 43 +m 6 10 +l 3 9 +l 1 7 +l 0 5 +l 0 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 14 4 +l 14 5 +l 13 7 +l 11 9 +l 8 10 +l 6 10 +l 4 9 +l 3 8 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 11 8 +l 10 9 +l 8 10 +l 0 21 +l 14 20 +l 14 21 +l 0 21 +m 2 7 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 12 7 +m 9 10 +l 2 20 +l 13 20 +m 11 9 +l 1 21 + +236 30 15 68 +m 6 10 +l 3 9 +l 1 7 +l 0 5 +l 0 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 14 4 +l 14 5 +l 13 7 +l 11 9 +l 8 10 +l 6 10 +l 4 9 +l 3 8 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 11 8 +l 10 9 +l 8 10 +m 2 7 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 12 7 +m 18 10 +l 15 9 +l 13 7 +l 12 5 +l 12 4 +l 15 1 +l 18 0 +l 20 0 +l 23 1 +l 26 4 +l 26 5 +l 25 7 +l 23 9 +l 20 10 +l 18 10 +l 16 9 +l 15 8 +l 14 5 +l 15 2 +l 16 1 +l 18 0 +m 20 0 +l 22 1 +l 23 2 +l 24 5 +l 23 8 +l 22 9 +l 20 10 +m 14 7 +l 13 5 +l 14 3 +m 24 3 +l 25 5 +l 24 7 + +237 17 8 47 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 12 17 +l 14 17 +l 3 -3 +l 1 -3 +l 12 17 +m 13 17 +l 2 -3 + +238 20 10 9 +m 16 21 +l 3 21 +l 0 19 +l 0 11 +l 7 11 +m 16 0 +l 3 0 +l 0 2 +l 0 11 + +239 23 11 33 +m 3 0 +l 3 15 +l 4 18 +l 6 20 +l 9 21 +l 11 21 +l 14 20 +l 16 18 +l 17 15 +l 17 1 +l 15 0 +m 4 1 +l 4 16 +l 5 18 +m 5 0 +l 5 16 +l 6 19 +l 7 20 +l 9 21 +m 0 0 +l 8 0 +m 14 0 +l 20 0 +m 1 0 +l 3 1 +m 2 0 +l 3 2 +m 6 0 +l 5 2 +m 7 0 +l 5 1 +m 19 0 +l 17 1 + +240 21 10 15 +m 0 9 +l 17 9 +l 17 8 +l 0 8 +l 0 9 +m 0 14 +l 17 14 +l 17 13 +l 0 13 +l 0 14 +m 0 4 +l 17 4 +l 17 3 +l 0 3 +l 0 4 + +241 22 11 15 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 +m 8 21 +l 8 4 +l 9 4 +l 9 21 +l 8 21 +m 0 13 +l 17 13 +l 17 12 +l 0 12 +l 0 13 + +242 22 11 14 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 +m 1 21 +l 17 13 +l 17 12 +l 1 4 +l 0 4 +l 16 12 +l 16 13 +l 0 21 +l 1 21 + +243 22 11 14 +m 17 1 +l 0 1 +l 0 0 +l 17 0 +l 17 1 +m 16 21 +l 0 13 +l 0 12 +l 16 4 +l 17 4 +l 1 12 +l 1 13 +l 17 21 +l 16 21 + +244 14 7 21 +m 4 20 +l 3 19 +l 2 17 +l 2 -7 +l 0 -7 +l 0 17 +l 1 19 +l 3 21 +l 8 21 +l 10 19 +l 10 18 +l 8 18 +l 8 19 +l 6 20 +m 1 -7 +l 1 17 +l 2 19 +l 3 20 +l 8 20 +l 9 19 +l 9 18 + +245 14 7 21 +m 6 -6 +l 7 -5 +l 8 -3 +l 8 21 +l 10 21 +l 10 -3 +l 9 -5 +l 7 -7 +l 2 -7 +l 0 -5 +l 0 -4 +l 2 -4 +l 2 -5 +l 4 -6 +m 9 21 +l 9 -3 +l 8 -5 +l 7 -6 +l 2 -6 +l 1 -5 +l 1 -4 + +246 21 10 33 +m 0 11 +l 17 11 +l 17 10 +l 0 10 +l 0 11 +m 8 21 +l 7 20 +l 7 19 +l 8 18 +l 9 18 +l 10 19 +l 10 20 +l 9 21 +l 8 21 +m 8 20 +l 8 19 +l 9 19 +l 9 20 +l 8 20 +m 8 3 +l 7 2 +l 7 1 +l 8 0 +l 9 0 +l 10 1 +l 10 2 +l 9 3 +l 8 3 +m 8 2 +l 8 1 +l 9 1 +l 9 2 +l 8 2 + +247 19 9 20 +m 15 16 +l 10 10 +l 5 13 +l 0 12 +l 5 16 +l 10 12 +l 15 16 +l 10 11 +l 5 14 +l 0 12 +m 15 9 +l 10 3 +l 5 6 +l 0 5 +l 5 9 +l 10 5 +l 15 9 +l 10 4 +l 5 7 +l 0 5 + +248 17 8 34 +m 6 21 +l 3 20 +l 1 18 +l 0 16 +l 0 15 +l 3 12 +l 6 11 +l 8 11 +l 11 12 +l 14 15 +l 14 16 +l 13 18 +l 11 20 +l 8 21 +l 6 21 +l 4 20 +l 3 19 +l 2 16 +l 3 13 +l 4 12 +l 6 11 +m 8 11 +l 10 12 +l 11 13 +l 12 16 +l 11 19 +l 10 20 +l 8 21 +m 2 18 +l 1 16 +l 2 14 +m 12 14 +l 13 16 +l 12 18 + +249 6 3 11 +m 0 4 +l 3 4 +l 3 0 +l 0 0 +l 0 4 +m 1 4 +l 1 0 +m 2 4 +l 2 0 +m 0 2 +l 3 2 + +250 6 3 9 +m 3 0 +l 0 0 +l 0 2 +l 3 2 +l 3 0 +m 2 2 +l 2 0 +m 1 2 +l 1 0 + +251 21 10 25 +m 0 11 +l 0 9 +l 8 0 +l 8 21 +l 18 21 +l 18 18 +l 16 18 +l 16 19 +l 10 19 +l 10 0 +l 8 0 +l 8 4 +l 0 11 +l 0 8 +m 8 3 +l 0 10 +l 8 2 +m 9 21 +l 9 0 +m 9 20 +l 18 20 +m 17 20 +l 17 18 +m 0 10 +l 8 1 + +252 22 11 44 +m 0 21 +l 5 21 +l 5 11 +l 6 9 +m 5 17 +l 6 19 +l 7 20 +l 9 21 +l 12 21 +l 14 20 +l 15 19 +l 16 16 +l 16 11 +l 17 9 +m 14 19 +l 15 16 +l 15 9 +m 12 21 +l 13 20 +l 14 17 +l 14 11 +l 13 9 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 3 21 +l 3 11 +l 2 9 +m 4 20 +l 4 9 +m 0 9 +l 8 9 +m 11 9 +l 19 9 +m 3 10 +l 1 9 +m 5 10 +l 7 9 +m 14 10 +l 12 9 +m 16 9 +l 16 10 +l 18 9 + +253 11 5 25 +m 0 19 +l 1 20 +l 2 20 +l 3 19 +l 2 18 +l 1 18 +l 0 19 +l 0 20 +l 1 21 +l 7 21 +l 8 20 +l 8 19 +l 7 18 +l 1 16 +l 0 14 +l 0 12 +l 1 13 +l 2 13 +l 4 12 +l 6 12 +l 8 14 +l 6 13 +l 2 13 +m 1 19 +l 2 19 + +254 12 6 19 +m 0 0 +l 0 11 +l 8 11 +l 8 0 +l 0 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 11 +l 6 0 +m 7 11 +l 7 0 + +255 0 0 5 +m 10 16 +l 3 21 +l 0 19 +l 10 16 +l 2 20 diff --git a/cd/etc/vectorfont19.txt b/cd/etc/vectorfont19.txt new file mode 100755 index 0000000..558d8ac --- /dev/null +++ b/cd/etc/vectorfont19.txt @@ -0,0 +1,1032 @@ +CALGKS 3rd set +17 15 7 -7 + + +0 15 7 0 + +1 15 7 0 + +2 15 7 0 + +3 15 7 0 + +4 15 7 0 + +5 15 7 0 + +6 15 7 0 + +7 15 7 0 + +8 15 7 0 + +9 15 7 0 + +10 15 7 0 + +11 15 7 0 + +12 15 7 0 + +13 15 7 0 + +14 15 7 0 + +15 15 7 0 + +16 15 7 0 + +17 15 7 0 + +18 15 7 0 + +19 15 7 0 + +20 15 7 0 + +21 15 7 0 + +22 15 7 0 + +23 15 7 0 + +24 15 7 0 + +25 15 7 0 + +26 15 7 0 + +27 15 7 0 + +28 15 7 0 + +29 15 7 0 + +30 15 7 0 + +31 15 7 0 + +32 15 7 4 +m 0 13 +l 8 13 +m 4 4 +l 4 13 + +33 15 7 4 +m 0 7 +l 2 9 +l 6 7 +l 8 9 + +34 15 7 4 +m 5 0 +l 3 3 +l 5 9 +l 3 12 + +35 15 7 5 +m 5 0 +l 5 2 +l 3 2 +l 3 0 +l 5 0 + +36 15 7 4 +m 0 3 +l 8 3 +l 4 11 +l 0 3 + +37 15 7 4 +m 4 3 +l 8 11 +l 0 11 +l 4 3 + +38 15 7 5 +m 0 0 +l 8 0 +l 8 15 +l 0 15 +l 0 0 + +39 15 7 4 +m 0 2 +l 8 2 +m 4 2 +l 4 12 + +40 15 7 3 +m 10 0 +l 0 0 +l 0 15 + +41 15 7 3 +m 10 15 +l 0 15 +l 0 0 + +42 15 7 13 +m 0 8 +l 0 6 +l 1 4 +l 3 3 +l 5 3 +l 7 4 +l 8 6 +l 8 8 +l 7 10 +l 5 11 +l 3 11 +l 1 10 +l 0 8 + +43 15 7 2 +m 4 15 +l 4 0 + +44 15 7 9 +m 4 11 +l 4 7 +l 1 3 +m 4 7 +l 7 3 +m 4 7 +l 0 8 +m 8 8 +l 4 7 + +45 15 7 4 +m 3 14 +l 4 4 +l 5 14 +l 3 14 + +46 15 7 6 +m 1 10 +l 1 4 +l 3 2 +l 5 2 +l 7 4 +l 7 10 + +47 15 7 6 +m 1 2 +l 1 8 +l 3 10 +l 5 10 +l 7 8 +l 7 2 + +48 15 7 0 + +49 15 7 6 +m 5 0 +l 5 15 +m 0 4 +l 10 4 +m 0 10 +l 10 10 + +50 15 7 2 +m 3 8 +l 5 8 + +51 15 7 11 +m 0 13 +l 1 14 +l 3 15 +l 5 15 +l 7 14 +l 8 13 +l 8 10 +l 7 8 +l 5 7 +l 4 6 +l 4 3 + +52 15 7 5 +m 3 13 +l 5 13 +l 5 15 +l 3 15 +l 3 13 + +53 15 7 4 +m 0 0 +l 10 0 +m 10 -3 +l 0 -3 + +54 15 7 5 +m 3 15 +l 4 15 +l 5 14 +l 5 12 +l 3 10 + +55 15 7 5 +m 3 0 +l 4 0 +l 6 2 +l 6 3 +l 5 4 + +56 15 7 6 +m 0 15 +l 3 12 +l 9 12 +l 12 15 +m 6 14 +l 6 15 + +57 15 7 2 +m 0 0 +l 10 0 + +58 15 7 2 +m 0 -3 +l 10 -3 + +59 15 7 2 +m 10 15 +l 0 15 + +60 15 7 6 +m 4 15 +l 4 0 +l 3 3 +l 5 3 +l 4 0 +l 4 0 + +61 15 7 4 +m 0 15 +l 3 12 +l 7 12 +l 10 15 + +62 15 7 7 +m 4 14 +l 4 0 +l 7 2 +l 8 5 +l 7 6 +l 5 6 +l 4 5 + +63 15 7 2 +m 3 0 +l 5 0 + +64 15 7 4 +m 1 15 +l 2 15 +m 6 15 +l 7 15 + +65 15 7 6 +m 1 15 +l 1 7 +l 7 7 +l 7 15 +m 4 7 +l 4 1 + +66 15 7 3 +m 2 5 +l 0 2 +l 9 2 + +67 15 7 4 +m 10 15 +l 2 14 +l 0 12 +l 0 11 + +68 15 7 4 +m 0 15 +l 8 14 +l 10 12 +l 10 11 + +69 15 7 9 +m 0 1 +l 1 0 +l 9 0 +l 10 1 +l 10 3 +l 9 4 +l 1 4 +l 0 3 +l 0 1 + +70 15 7 9 +m 1 15 +l 0 14 +l 0 12 +l 1 11 +l 9 11 +l 10 12 +l 10 14 +l 9 15 +l 1 15 + +71 15 7 6 +m 4 14 +l 4 0 +m 3 12 +l 5 12 +m 5 2 +l 3 2 + +72 15 7 8 +m 4 14 +l 4 0 +m 3 12 +l 5 12 +m 5 2 +l 3 2 +m 3 7 +l 5 7 + +73 15 7 2 +m 0 2 +l 0 5 + +74 15 7 13 +m 3 3 +l 11 3 +l 11 11 +l 3 11 +l 3 3 +m 0 0 +l 3 3 +m 11 3 +l 14 0 +m 11 11 +l 14 14 +m 3 11 +l 0 14 + +75 15 7 11 +m 0 -5 +l 10 -5 +l 12 -4 +l 13 -3 +l 14 -1 +l 14 1 +l 13 3 +l 12 4 +l 10 5 +l 0 5 +l 0 -5 + +76 15 7 4 +m 0 5 +l 10 0 +l 0 -5 +l 0 5 + +77 15 7 15 +m 0 0 +l 5 15 +l 10 0 +m 2 6 +l 8 6 +m 3 16 +l 3 17 +l 2 17 +l 2 16 +l 3 16 +m 7 16 +l 8 16 +l 8 17 +l 7 17 +l 7 16 + +78 15 7 14 +m 0 0 +l 4 12 +l 6 12 +l 10 0 +m 2 6 +l 8 6 +m 4 12 +l 3 13 +l 3 14 +l 4 15 +l 6 15 +l 7 14 +l 7 13 +l 6 12 + +79 15 7 10 +m 0 0 +l 5 15 +l 5 0 +l 10 0 +m 5 8 +l 9 8 +m 5 15 +l 10 15 +m 2 6 +l 5 6 + +80 15 7 27 +m 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 5 +l 10 10 +l 9 13 +l 8 14 +l 6 15 +l 4 15 +l 2 14 +l 1 13 +l 0 10 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +m 3 16 +l 2 16 +l 2 17 +l 3 17 +l 3 16 +m 7 16 +l 7 17 +l 8 17 +l 8 16 +l 7 16 + +81 15 7 15 +m 3 0 +l 7 0 +l 9 1 +l 10 3 +l 10 12 +l 9 14 +l 7 15 +l 3 15 +l 1 14 +l 0 12 +l 0 3 +l 1 1 +l 3 0 +m 0 0 +l 10 15 + +82 15 7 20 +m 0 15 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 10 15 +m 3 16 +l 2 16 +l 2 17 +l 3 17 +l 3 16 +m 7 16 +l 8 16 +l 8 17 +l 7 17 +l 7 16 + +83 15 7 7 +m 0 0 +l 0 15 +m 10 15 +l 10 3 +l 9 1 +l 7 0 +l 4 1 + +84 15 7 8 +m 0 0 +l 0 15 +l 8 0 +l 8 15 +m 7 17 +l 6 16 +l 2 17 +l 1 16 + +85 15 7 12 +m 10 0 +l 3 0 +l 1 1 +l 0 3 +l 0 12 +l 1 14 +l 3 15 +l 10 15 +m 5 15 +l 5 0 +m 5 7 +l 9 7 + +86 15 7 5 +m 10 0 +l 4 0 +l 4 15 +m 1 3 +l 9 11 + +87 15 7 15 +m 0 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 10 11 +l 9 13 +l 8 14 +l 6 15 +l 0 15 +l 0 0 +m 2 0 +l 2 15 +m 0 8 +l 6 8 + +88 15 7 17 +m 1 0 +l 3 0 +m 2 0 +l 2 12 +l 3 14 +l 4 15 +l 6 15 +l 7 14 +l 7 12 +l 5 9 +l 6 8 +l 7 6 +l 8 3 +l 8 1 +l 7 0 +l 5 0 +l 3 1 + +89 15 7 20 +m 7 0 +l 7 7 +l 6 8 +l 2 8 +l 1 7 +m 7 1 +l 6 0 +l 3 0 +l 1 1 +l 1 4 +l 3 5 +l 7 5 +m 3 8 +l 2 9 +l 2 10 +l 3 11 +l 5 11 +l 6 10 +l 6 9 +l 5 8 + +90 15 7 19 +m 10 1 +l 9 0 +l 7 0 +l 6 1 +l 6 7 +l 5 8 +l 3 8 +l 2 7 +m 6 1 +l 5 0 +l 3 0 +l 2 1 +l 2 4 +l 3 5 +l 10 5 +l 10 7 +l 9 8 +l 7 8 +l 6 7 + +91 15 7 11 +m 2 2 +l 4 0 +l 6 0 +l 8 2 +l 8 6 +l 6 8 +l 4 8 +l 2 6 +l 2 2 +m 2 0 +l 8 8 + +92 15 7 10 +m 2 0 +l 2 8 +m 2 10 +l 2 11 +m 6 12 +l 6 10 +m 6 8 +l 6 0 +l 5 -2 +l 4 -2 + +93 15 7 12 +m 8 2 +l 6 0 +l 4 0 +l 2 2 +l 2 6 +l 4 8 +l 6 8 +l 8 6 +m 5 0 +l 6 -2 +l 4 -4 +l 2 -4 + +94 15 7 18 +m 10 1 +l 9 0 +l 7 0 +l 6 1 +l 6 7 +l 5 8 +l 3 8 +l 2 7 +l 2 1 +l 3 0 +l 5 0 +l 6 1 +m 6 7 +l 7 8 +l 9 8 +l 10 7 +l 10 5 +l 6 5 + +95 15 7 6 +m 5 14 +l 5 1 +l 6 0 +l 7 0 +m 2 4 +l 8 10 + +96 15 7 22 +m 8 0 +l 8 7 +l 7 8 +l 3 8 +l 2 7 +m 8 1 +l 7 0 +l 4 0 +l 2 1 +l 2 4 +l 4 5 +l 8 5 +m 3 10 +l 4 10 +l 4 9 +l 3 9 +l 3 10 +m 7 10 +l 7 9 +l 6 9 +l 6 10 +l 7 10 + +97 15 7 19 +m 4 0 +l 6 0 +l 8 2 +l 8 6 +l 6 8 +l 4 8 +l 2 6 +l 2 2 +l 4 0 +m 3 10 +l 3 9 +l 4 9 +l 4 10 +l 3 10 +m 7 10 +l 7 9 +l 6 9 +l 6 10 +l 7 10 + +98 15 7 17 +m 8 0 +l 8 8 +m 8 2 +l 6 0 +l 4 0 +l 2 2 +l 2 8 +m 3 10 +l 4 10 +l 4 9 +l 3 9 +l 3 10 +m 7 10 +l 7 9 +l 6 9 +l 6 10 +l 7 10 + +99 15 7 12 +m 8 0 +l 8 14 +m 8 2 +l 6 0 +l 4 0 +l 2 2 +l 2 6 +l 4 8 +l 6 8 +l 8 6 +m 5 11 +l 11 11 + +100 15 7 12 +m 1 0 +l 3 0 +m 2 0 +l 2 15 +m 1 15 +l 3 15 +m 2 4 +l 4 4 +l 6 6 +l 6 8 +l 4 10 +l 2 10 + +101 15 7 5 +m 2 0 +l 4 0 +m 3 0 +l 3 8 +l 2 8 + +102 15 7 12 +m 2 0 +l 7 0 +m 2 15 +l 7 15 +m 4 0 +l 4 15 +m 4 6 +l 7 6 +l 9 8 +l 9 10 +l 7 12 +l 4 12 + +103 15 7 11 +m 8 0 +l 8 6 +l 6 8 +l 4 8 +l 2 6 +m 2 8 +l 2 1 +m 2 9 +l 4 10 +l 6 9 +l 8 10 + +104 15 7 10 +m 10 13 +l 9 15 +l 7 15 +l 6 14 +l 1 0 +l 0 1 +l 9 0 +l 10 1 +m 2 7 +l 8 7 + +105 15 7 7 +m 0 15 +l 5 9 +l 10 15 +m 5 9 +l 5 0 +m 1 4 +l 9 4 + +106 15 7 16 +m 5 15 +l 5 13 +l 7 13 +l 7 15 +l 5 15 +m 6 11 +l 6 8 +l 5 7 +l 3 6 +l 2 5 +l 2 2 +l 3 1 +l 5 0 +l 7 0 +l 9 1 +l 10 2 + +107 15 7 3 +m 4 13 +l 6 15 +l 10 11 + +108 15 7 4 +m 1 14 +l 2 15 +l 6 14 +l 7 15 + +109 15 7 4 +m 2 0 +l 3 4 +l 5 4 +l 2 0 + +110 15 7 10 +m 1 16 +l 2 16 +l 2 17 +l 1 17 +l 1 16 +m 6 16 +l 6 17 +l 7 17 +l 7 16 +l 6 16 + +111 15 7 2 +m 5 15 +l 5 0 + +112 15 7 8 +m 0 12 +l 1 15 +l 3 15 +l 0 12 +m 5 15 +l 4 12 +l 7 15 +l 5 15 + +113 15 7 4 +m 10 15 +l 8 15 +l 7 12 +l 10 15 + +114 15 7 4 +m 0 15 +l 3 12 +l 2 15 +l 0 15 + +115 15 7 3 +m 0 15 +l 3 12 +l 6 15 + +116 15 7 5 +m 0 2 +l 2 0 +l 4 0 +l 6 2 +l 6 6 + +117 15 7 4 +m 0 0 +l 0 15 +l 10 15 +l 10 12 + +118 15 7 4 +m 0 0 +l 10 0 +l 5 12 +l 0 0 + +119 15 7 15 +m 0 3 +l 1 1 +l 3 0 +l 7 0 +l 9 1 +l 10 3 +l 10 12 +l 9 14 +l 7 15 +l 3 15 +l 1 14 +l 0 12 +l 0 3 +m 0 8 +l 10 8 + +120 15 7 5 +m 2 0 +l 1 0 +l 5 15 +l 9 0 +l 8 0 + +121 15 7 6 +m 0 15 +l 10 15 +m 10 0 +l 0 0 +m 4 8 +l 6 8 + +122 15 7 6 +m 0 15 +l 10 15 +m 2 0 +l 2 15 +m 8 15 +l 8 0 + +123 15 7 5 +m 10 15 +l 0 15 +l 5 8 +l 0 0 +l 10 0 + +124 15 7 9 +m 10 11 +l 8 15 +l 7 15 +l 5 11 +l 3 15 +l 2 15 +l 0 11 +m 5 11 +l 5 0 + +125 15 7 12 +m 5 0 +l 5 15 +m 3 4 +l 3 4 +l 1 6 +l 1 8 +l 3 10 +l 7 10 +l 9 8 +l 9 6 +l 7 4 +l 3 4 + +126 15 7 10 +m 5 0 +l 5 15 +m 1 11 +l 2 10 +l 3 5 +l 4 4 +l 6 4 +l 7 5 +l 8 10 +l 9 11 + +127 15 7 14 +m 0 0 +l 3 0 +l 0 8 +l 0 11 +l 1 13 +l 2 14 +l 4 15 +l 6 15 +l 8 14 +l 9 13 +l 10 11 +l 10 8 +l 7 0 +l 10 0 diff --git a/cd/etc/vectorfont20.txt b/cd/etc/vectorfont20.txt new file mode 100755 index 0000000..852b0ca --- /dev/null +++ b/cd/etc/vectorfont20.txt @@ -0,0 +1,1375 @@ +Standard ASCII +14 12 6 -4 + + +0 14 6 9 +m 0 6 +l 0 12 +l 6 6 +m 6 12 +l 6 2 +l 8 0 +l 10 0 +l 12 2 +l 12 6 + +1 14 6 18 +m 6 11 +l 4 12 +l 2 12 +l 0 11 +l 0 10 +l 2 9 +l 4 9 +l 6 8 +l 6 7 +l 4 6 +l 2 6 +l 0 7 +m 6 6 +l 6 0 +m 6 3 +l 11 3 +m 11 6 +l 11 0 + +2 14 6 16 +m 6 11 +l 4 12 +l 2 12 +l 0 11 +l 0 10 +l 2 9 +l 4 9 +l 6 8 +l 6 7 +l 4 6 +l 2 6 +l 0 7 +m 12 6 +l 6 0 +m 6 6 +l 12 0 + +3 14 6 9 +m 0 9 +l 3 9 +m 6 0 +l 12 6 +m 6 12 +l 0 12 +l 0 6 +l 6 6 +l 12 0 + +4 14 6 8 +m 6 12 +l 0 12 +l 0 6 +l 12 6 +m 0 9 +l 3 9 +m 9 6 +l 9 0 + +5 14 6 17 +m 0 9 +l 3 9 +m 6 12 +l 0 12 +l 0 6 +l 6 6 +m 8 6 +l 10 6 +l 12 4 +l 12 2 +l 10 0 +l 8 0 +l 6 2 +l 6 4 +l 8 6 +m 10 2 +l 12 0 + +6 14 6 11 +m 0 6 +l 0 9 +l 3 12 +l 6 9 +l 6 0 +m 0 8 +l 6 8 +m 12 6 +l 6 3 +m 8 4 +l 12 0 + +7 14 6 14 +m 1 9 +l 4 9 +l 6 10 +l 6 11 +l 4 12 +l 0 12 +l 0 6 +l 4 6 +l 6 7 +l 6 8 +l 4 9 +m 6 6 +l 6 0 +l 12 0 + +8 14 6 23 +m 1 9 +l 4 9 +l 6 10 +l 6 11 +l 4 12 +l 0 12 +l 0 6 +l 4 6 +l 6 7 +l 6 8 +l 4 9 +m 12 5 +l 10 6 +l 8 6 +l 6 5 +l 6 4 +l 8 3 +l 10 3 +l 12 2 +l 12 1 +l 10 0 +l 8 0 +l 6 1 + +9 14 6 9 +m 0 6 +l 0 12 +m 0 9 +l 6 9 +m 6 12 +l 6 6 +l 12 6 +m 9 6 +l 9 0 + +10 14 6 7 +m 0 12 +l 0 6 +l 12 6 +m 6 6 +l 6 0 +m 6 3 +l 9 3 + +11 14 6 7 +m 0 12 +l 3 6 +l 6 12 +m 6 6 +l 12 6 +m 9 6 +l 9 0 + +12 14 6 10 +m 6 12 +l 0 12 +l 0 6 +m 0 9 +l 3 9 +m 12 6 +l 6 6 +l 6 0 +m 6 3 +l 9 3 + +13 14 6 17 +m 6 11 +l 4 12 +l 2 12 +l 0 11 +l 0 7 +l 2 6 +l 4 6 +l 6 7 +m 6 0 +l 6 6 +l 10 6 +l 12 5 +l 12 4 +l 10 3 +l 6 3 +m 9 3 +l 12 0 + +14 14 6 21 +m 6 11 +l 4 12 +l 2 12 +l 0 11 +l 0 10 +l 2 9 +l 4 9 +l 6 8 +l 6 7 +l 4 6 +l 2 6 +l 0 7 +m 10 0 +l 8 0 +l 6 2 +l 6 4 +l 8 6 +l 10 6 +l 12 4 +l 12 2 +l 10 0 + +15 14 6 18 +m 6 11 +l 4 12 +l 2 12 +l 0 11 +l 0 10 +l 2 9 +l 4 9 +l 6 8 +l 6 7 +l 4 6 +l 2 6 +l 0 7 +m 8 6 +l 10 6 +m 9 6 +l 9 0 +m 8 0 +l 10 0 + +16 14 6 10 +m 0 6 +l 0 12 +l 4 12 +l 6 10 +l 6 8 +l 4 6 +l 0 6 +m 6 6 +l 6 0 +l 12 0 + +17 14 6 10 +m 0 6 +l 0 12 +l 4 12 +l 6 10 +l 6 8 +l 4 6 +l 0 6 +m 8 4 +l 10 6 +l 10 0 + +18 14 6 15 +m 0 6 +l 0 12 +l 4 12 +l 6 10 +l 6 8 +l 4 6 +l 0 6 +m 6 5 +l 8 6 +l 10 6 +l 12 5 +l 12 4 +l 6 1 +l 6 0 +l 12 0 + +19 14 6 20 +m 0 6 +l 0 12 +l 4 12 +l 6 10 +l 6 8 +l 4 6 +l 0 6 +m 6 5 +l 8 6 +l 10 6 +l 12 5 +l 12 4 +l 10 3 +m 9 3 +l 10 3 +l 12 2 +l 12 1 +l 10 0 +l 8 0 +l 6 1 + +20 14 6 11 +m 0 6 +l 0 12 +l 4 12 +l 6 10 +l 6 8 +l 4 6 +l 0 6 +m 12 2 +l 6 2 +l 10 6 +l 10 0 + +21 14 6 9 +m 0 6 +l 0 12 +l 6 6 +m 6 12 +l 6 0 +m 12 6 +l 6 3 +m 8 4 +l 12 0 + +22 14 6 17 +m 6 11 +l 4 12 +l 2 12 +l 0 11 +l 0 10 +l 2 9 +l 4 9 +l 6 8 +l 6 7 +l 4 6 +l 2 6 +l 0 7 +m 6 6 +l 9 3 +m 12 6 +l 9 3 +l 9 0 + +23 14 6 16 +m 6 12 +l 0 12 +l 0 6 +l 10 6 +l 12 5 +l 12 4 +l 10 3 +l 7 3 +m 0 9 +l 3 9 +m 6 6 +l 6 0 +l 10 0 +l 12 1 +l 12 2 +l 10 3 + +24 14 6 12 +m 6 11 +l 4 12 +l 2 12 +l 0 11 +l 0 7 +l 2 6 +l 4 6 +l 6 7 +m 6 0 +l 6 6 +l 12 0 +l 12 6 + +25 14 6 11 +m 0 9 +l 3 9 +m 6 12 +l 0 12 +l 0 6 +l 6 6 +l 6 0 +m 6 6 +l 9 3 +l 12 6 +l 12 0 + +26 14 6 23 +m 6 11 +l 4 12 +l 2 12 +l 0 11 +l 0 10 +l 2 9 +l 4 9 +l 6 8 +l 6 7 +l 4 6 +l 2 6 +l 0 7 +m 7 3 +l 10 3 +l 12 4 +l 12 5 +l 10 6 +l 6 6 +l 6 0 +l 10 0 +l 12 1 +l 12 2 +l 10 3 + +27 14 6 14 +m 0 9 +l 3 9 +m 6 12 +l 0 12 +l 0 6 +l 6 6 +m 12 5 +l 10 6 +l 8 6 +l 6 5 +l 6 1 +l 8 0 +l 10 0 +l 12 1 + +28 14 6 17 +m 0 9 +l 3 9 +m 6 12 +l 0 12 +l 0 6 +m 6 1 +l 8 0 +l 10 0 +l 12 1 +l 12 2 +l 10 3 +l 8 3 +l 6 4 +l 6 5 +l 8 6 +l 10 6 +l 12 5 + +29 14 6 22 +m 3 9 +l 6 9 +l 6 7 +l 4 6 +l 2 6 +l 0 7 +l 0 11 +l 2 12 +l 4 12 +l 6 11 +m 6 1 +l 8 0 +l 10 0 +l 12 1 +l 12 2 +l 10 3 +l 8 3 +l 6 4 +l 6 5 +l 8 6 +l 10 6 +l 12 5 + +30 14 6 21 +m 0 6 +l 0 12 +l 4 12 +l 6 11 +l 6 10 +l 4 9 +l 0 9 +m 3 9 +l 6 6 +m 6 1 +l 8 0 +l 10 0 +l 12 1 +l 12 2 +l 10 3 +l 8 3 +l 6 4 +l 6 5 +l 8 6 +l 10 6 +l 12 5 + +31 14 6 18 +m 0 12 +l 0 7 +l 2 6 +l 4 6 +l 6 7 +l 6 12 +m 12 5 +l 10 6 +l 8 6 +l 6 5 +l 6 4 +l 8 3 +l 10 3 +l 12 2 +l 12 1 +l 10 0 +l 8 0 +l 6 1 + +32 14 6 0 + +33 14 6 4 +m 6 12 +l 6 4 +m 6 2 +l 6 0 + +34 14 6 4 +m 3 12 +l 3 8 +m 9 12 +l 9 8 + +35 14 6 8 +m 0 4 +l 12 4 +m 12 8 +l 0 8 +m 3 0 +l 3 12 +m 9 12 +l 9 0 + +36 14 6 10 +m 0 2 +l 9 2 +l 12 4 +l 9 6 +l 3 6 +l 0 8 +l 3 10 +l 12 10 +m 6 12 +l 6 0 + +37 14 6 12 +m 0 0 +l 12 12 +m 6 10 +l 3 12 +l 0 10 +l 3 8 +l 6 10 +m 12 2 +l 9 4 +l 6 2 +l 9 0 +l 12 2 + +38 14 6 9 +m 12 4 +l 6 0 +l 3 0 +l 0 2 +l 0 4 +l 6 10 +l 3 12 +l 0 10 +l 12 0 + +39 14 6 2 +m 6 8 +l 9 12 + +40 14 6 4 +m 6 12 +l 3 8 +l 3 4 +l 6 0 + +41 14 6 4 +m 6 12 +l 9 8 +l 9 4 +l 6 0 + +42 14 6 8 +m 0 2 +l 12 8 +m 6 10 +l 6 6 +m 6 4 +l 6 0 +m 0 8 +l 12 2 + +43 14 6 4 +m 6 2 +l 6 10 +m 0 6 +l 12 6 + +44 14 6 2 +m 3 -2 +l 6 2 + +45 14 6 2 +m 0 6 +l 12 6 + +46 14 6 4 +m 3 0 +l 6 2 +m 3 2 +l 6 0 + +47 14 6 2 +m 0 0 +l 12 12 + +48 14 6 10 +m 0 2 +l 0 10 +l 3 12 +l 9 12 +l 12 10 +l 12 2 +l 9 0 +l 3 0 +l 0 2 +l 12 10 + +49 14 6 3 +m 3 10 +l 6 12 +l 6 0 + +50 14 6 8 +m 0 10 +l 3 12 +l 9 12 +l 12 10 +l 12 8 +l 0 2 +l 0 0 +l 12 0 + +51 14 6 13 +m 0 2 +l 3 0 +l 9 0 +l 12 2 +l 12 4 +l 9 6 +l 3 6 +m 0 10 +l 3 12 +l 9 12 +l 12 10 +l 12 8 +l 9 6 + +52 14 6 4 +m 9 0 +l 9 12 +l 0 4 +l 12 4 + +53 14 6 9 +m 0 2 +l 3 0 +l 9 0 +l 12 2 +l 12 4 +l 9 6 +l 0 6 +l 0 12 +l 12 12 + +54 14 6 12 +m 0 4 +l 3 6 +l 9 6 +l 12 4 +l 12 2 +l 9 0 +l 3 0 +l 0 2 +l 0 10 +l 3 12 +l 9 12 +l 12 10 + +55 14 6 3 +m 0 12 +l 12 12 +l 3 0 + +56 14 6 16 +m 3 6 +l 0 8 +l 0 10 +l 3 12 +l 9 12 +l 12 10 +l 12 8 +l 9 6 +l 3 6 +l 0 4 +l 0 2 +l 3 0 +l 9 0 +l 12 2 +l 12 4 +l 9 6 + +57 14 6 12 +m 0 2 +l 3 0 +l 9 0 +l 12 2 +l 12 10 +l 9 12 +l 3 12 +l 0 10 +l 0 6 +l 3 4 +l 9 4 +l 12 6 + +58 14 6 8 +m 3 6 +l 6 8 +m 3 8 +l 6 6 +m 3 0 +l 6 2 +m 3 2 +l 6 0 + +59 14 6 6 +m 3 6 +l 6 8 +m 3 8 +l 6 6 +m 6 2 +l 3 -2 + +60 14 6 5 +m 12 12 +l 9 12 +l 0 6 +l 9 0 +l 12 0 + +61 14 6 4 +m 12 8 +l 0 8 +m 0 4 +l 12 4 + +62 14 6 5 +m 0 0 +l 3 0 +l 12 6 +l 3 12 +l 0 12 + +63 14 6 9 +m 0 10 +l 3 12 +l 9 12 +l 12 10 +l 12 8 +l 6 6 +l 6 4 +m 6 2 +l 6 0 + +64 14 6 13 +m 9 4 +l 9 8 +l 6 8 +l 3 6 +l 3 4 +l 12 4 +l 12 10 +l 9 12 +l 3 12 +l 0 10 +l 0 2 +l 3 0 +l 12 0 + +65 14 6 7 +m 0 0 +l 0 6 +l 6 12 +l 12 6 +l 12 0 +m 0 4 +l 12 4 + +66 14 6 12 +m 0 0 +l 0 12 +l 9 12 +l 12 10 +l 12 8 +l 9 6 +m 0 6 +l 9 6 +l 12 4 +l 12 2 +l 9 0 +l 0 0 + +67 14 6 8 +m 12 10 +l 9 12 +l 3 12 +l 0 10 +l 0 2 +l 3 0 +l 9 0 +l 12 2 + +68 14 6 7 +m 0 0 +l 0 12 +l 6 12 +l 12 8 +l 12 4 +l 6 0 +l 0 0 + +69 14 6 6 +m 0 6 +l 9 6 +m 12 12 +l 0 12 +l 0 0 +l 12 0 + +70 14 6 5 +m 0 0 +l 0 12 +l 12 12 +m 0 6 +l 9 6 + +71 14 6 10 +m 6 6 +l 12 6 +l 12 2 +l 9 0 +l 3 0 +l 0 2 +l 0 10 +l 3 12 +l 9 12 +l 12 10 + +72 14 6 6 +m 0 0 +l 0 12 +m 0 6 +l 12 6 +m 12 12 +l 12 0 + +73 14 6 6 +m 3 12 +l 9 12 +m 6 12 +l 6 0 +m 3 0 +l 9 0 + +74 14 6 5 +m 0 2 +l 3 0 +l 9 0 +l 12 2 +l 12 12 + +75 14 6 6 +m 0 0 +l 0 12 +m 12 12 +l 0 4 +m 3 6 +l 12 0 + +76 14 6 3 +m 0 12 +l 0 0 +l 12 0 + +77 14 6 5 +m 0 0 +l 0 12 +l 6 6 +l 12 12 +l 12 0 + +78 14 6 4 +m 0 0 +l 0 12 +l 12 0 +l 12 12 + +79 14 6 9 +m 12 2 +l 9 0 +l 3 0 +l 0 2 +l 0 10 +l 3 12 +l 9 12 +l 12 10 +l 12 2 + +80 14 6 7 +m 0 0 +l 0 12 +l 9 12 +l 12 10 +l 12 8 +l 9 6 +l 0 6 + +81 14 6 11 +m 0 2 +l 0 10 +l 3 12 +l 9 12 +l 12 10 +l 12 2 +l 9 0 +l 3 0 +l 0 2 +m 6 4 +l 12 0 + +82 14 6 9 +m 0 0 +l 0 12 +l 9 12 +l 12 10 +l 12 8 +l 9 6 +l 0 6 +m 6 6 +l 12 0 + +83 14 6 12 +m 0 2 +l 3 0 +l 9 0 +l 12 2 +l 12 4 +l 9 6 +l 3 6 +l 0 8 +l 0 10 +l 3 12 +l 9 12 +l 12 10 + +84 14 6 4 +m 0 12 +l 12 12 +m 6 12 +l 6 0 + +85 14 6 6 +m 0 12 +l 0 2 +l 3 0 +l 9 0 +l 12 2 +l 12 12 + +86 14 6 3 +m 0 12 +l 6 0 +l 12 12 + +87 14 6 7 +m 0 12 +l 0 8 +l 3 0 +l 6 8 +l 9 0 +l 12 8 +l 12 12 + +88 14 6 4 +m 0 0 +l 12 12 +m 0 12 +l 12 0 + +89 14 6 5 +m 0 12 +l 6 6 +l 12 12 +m 6 6 +l 6 0 + +90 14 6 4 +m 0 12 +l 12 12 +l 0 0 +l 12 0 + +91 14 6 4 +m 9 12 +l 3 12 +l 3 0 +l 9 0 + +92 14 6 2 +m 0 12 +l 12 0 + +93 14 6 4 +m 3 12 +l 9 12 +l 9 0 +l 3 0 + +94 14 6 3 +m 0 8 +l 6 12 +l 12 8 + +95 14 6 2 +m 0 -4 +l 14 -4 + +96 14 6 2 +m 6 12 +l 9 8 + +97 14 6 11 +m 9 2 +l 6 0 +l 3 0 +l 0 2 +l 0 6 +l 3 8 +l 6 8 +l 9 6 +m 9 8 +l 9 0 +l 12 0 + +98 14 6 11 +m 0 12 +l 3 12 +l 3 0 +m 3 6 +l 6 8 +l 9 8 +l 12 6 +l 12 2 +l 9 0 +l 6 0 +l 3 2 + +99 14 6 7 +m 9 8 +l 3 8 +l 0 6 +l 0 2 +l 3 0 +l 9 0 +l 12 2 + +100 14 6 12 +m 9 6 +l 6 8 +l 3 8 +l 0 6 +l 0 2 +l 3 0 +l 6 0 +l 9 2 +m 6 12 +l 9 12 +l 9 0 +l 12 0 + +101 14 6 10 +m 0 4 +l 9 4 +l 12 6 +l 9 8 +l 3 8 +l 0 6 +l 0 2 +l 3 0 +l 9 0 +l 12 2 + +102 14 6 6 +m 0 6 +l 6 6 +m 9 10 +l 6 12 +l 3 10 +l 3 0 + +103 14 6 14 +m 0 -2 +l 3 -4 +l 6 -4 +l 9 -2 +l 9 8 +l 12 8 +m 9 6 +l 6 8 +l 3 8 +l 0 6 +l 0 2 +l 3 0 +l 6 0 +l 9 2 + +104 14 6 8 +m 0 12 +l 3 12 +l 3 0 +m 3 6 +l 6 8 +l 9 8 +l 12 6 +l 12 0 + +105 14 6 7 +m 6 12 +l 6 10 +m 3 8 +l 6 8 +l 6 0 +m 3 0 +l 9 0 + +106 14 6 8 +m 0 -2 +l 3 -4 +l 6 -4 +l 9 -2 +l 9 8 +l 6 8 +m 9 10 +l 9 12 + +107 14 6 6 +m 0 12 +l 3 12 +l 3 0 +m 12 8 +l 3 4 +l 12 0 + +108 14 6 5 +m 3 12 +l 6 12 +l 6 0 +m 3 0 +l 9 0 + +109 14 6 10 +m 0 0 +l 0 8 +m 0 6 +l 3 8 +l 6 6 +l 6 0 +m 6 6 +l 9 8 +l 12 6 +l 12 0 + +110 14 6 8 +m 0 8 +l 3 8 +l 3 0 +m 3 6 +l 6 8 +l 9 8 +l 12 6 +l 12 0 + +111 14 6 9 +m 9 0 +l 12 2 +l 12 6 +l 9 8 +l 3 8 +l 0 6 +l 0 2 +l 3 0 +l 9 0 + +112 14 6 12 +m 0 8 +l 3 8 +l 3 -4 +l 0 -4 +m 3 6 +l 6 8 +l 9 8 +l 12 6 +l 12 2 +l 9 0 +l 6 0 +l 3 2 + +113 14 6 12 +m 9 6 +l 6 8 +l 3 8 +l 0 6 +l 0 2 +l 3 0 +l 6 0 +l 9 2 +m 12 8 +l 9 8 +l 9 -4 +l 12 -4 + +114 14 6 7 +m 0 8 +l 3 8 +l 3 0 +m 3 6 +l 6 8 +l 9 8 +l 12 6 + +115 14 6 10 +m 0 2 +l 3 0 +l 9 0 +l 12 2 +l 9 4 +l 3 4 +l 0 6 +l 3 8 +l 9 8 +l 12 6 + +116 14 6 7 +m 9 8 +l 0 8 +m 3 12 +l 3 2 +l 6 0 +l 9 0 +l 12 2 + +117 14 6 8 +m 0 8 +l 0 2 +l 3 0 +l 6 0 +l 9 2 +m 9 8 +l 9 0 +l 12 0 + +118 14 6 3 +m 0 8 +l 6 0 +l 12 8 + +119 14 6 5 +m 0 8 +l 3 0 +l 6 4 +l 9 0 +l 12 8 + +120 14 6 4 +m 0 0 +l 12 8 +m 0 8 +l 12 0 + +121 14 6 11 +m 0 8 +l 0 2 +l 3 0 +l 6 0 +l 9 2 +m 0 -2 +l 3 -4 +l 6 -4 +l 9 -2 +l 9 8 +l 12 8 + +122 14 6 4 +m 0 8 +l 12 8 +l 0 0 +l 12 0 + +123 14 6 7 +m 9 12 +l 6 10 +l 6 8 +l 3 6 +l 6 4 +l 6 2 +l 9 0 + +124 14 6 4 +m 6 14 +l 6 8 +m 6 6 +l 6 0 + +125 14 6 7 +m 3 0 +l 6 2 +l 6 4 +l 9 6 +l 6 8 +l 6 10 +l 3 12 + +126 14 6 4 +m 0 10 +l 3 12 +l 9 10 +l 12 12 + +127 14 6 12 +m 0 0 +l 9 12 +m 6 12 +l 0 4 +m 0 8 +l 3 12 +m 12 12 +l 3 0 +m 6 0 +l 12 8 +m 12 4 +l 9 0 diff --git a/cd/etc/vectorfont21.txt b/cd/etc/vectorfont21.txt new file mode 100755 index 0000000..6187b9a --- /dev/null +++ b/cd/etc/vectorfont21.txt @@ -0,0 +1,8699 @@ +Gothic II +25 25 12 -7 + + +21 14 7 24 +m 6 21 +l 5 19 +l 6 17 +l 7 19 +l 6 21 +m 6 21 +l 6 -7 +m 6 10 +l 5 7 +l 6 -7 +l 7 7 +l 6 10 +m 0 14 +l 2 13 +l 4 14 +l 2 15 +l 0 14 +m 0 14 +l 12 14 +m 8 14 +l 10 13 +l 12 14 +l 10 15 +l 8 14 + +32 16 8 0 + +33 9 4 25 +m 3 21 +l 2 20 +l 0 19 +l 2 18 +l 3 7 +m 3 18 +l 4 19 +l 3 20 +l 2 19 +l 3 18 +l 3 7 +m 3 21 +l 4 20 +l 6 19 +l 4 18 +l 3 7 +m 3 3 +l 1 1 +l 3 0 +l 5 1 +l 3 3 +m 3 2 +l 2 1 +l 4 1 +l 3 2 + +34 14 7 16 +m 1 21 +l 0 20 +l 0 14 +m 1 20 +l 0 14 +m 1 21 +l 2 20 +l 0 14 +m 10 21 +l 9 20 +l 9 14 +m 10 20 +l 9 14 +m 10 21 +l 11 20 +l 9 14 + +35 18 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 17 8 53 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 9 21 +l 11 20 +l 12 18 +l 12 16 +l 14 17 +l 13 19 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 15 +l 1 13 +l 4 11 +l 10 9 +l 12 8 +l 13 6 +l 13 3 +l 12 1 +m 13 17 +l 12 19 +m 1 15 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 7 +m 2 2 +l 1 4 +m 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 10 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 2 5 +l 2 3 +l 3 1 +l 5 0 + +37 21 10 29 +m 18 21 +l 0 0 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 23 11 50 +m 17 13 +l 18 12 +l 19 12 +l 20 13 +m 16 12 +l 17 11 +l 19 11 +m 16 11 +l 17 10 +l 18 10 +l 19 11 +l 20 13 +m 17 13 +l 11 7 +m 10 6 +l 4 0 +l 0 5 +l 6 11 +m 7 12 +l 11 16 +l 7 21 +l 2 15 +l 8 9 +l 12 3 +l 14 1 +l 16 0 +l 18 0 +l 19 1 +l 20 3 +m 4 1 +l 1 5 +m 10 16 +l 7 20 +m 3 15 +l 8 10 +l 12 4 +l 14 2 +l 16 1 +l 19 1 +m 5 1 +l 1 6 +m 10 15 +l 6 20 +m 3 16 +l 9 10 +l 13 4 +l 14 3 +l 16 2 +l 19 2 +l 20 3 + +39 8 4 12 +m 2 15 +l 2 17 +l 0 19 +l 2 21 +l 3 19 +l 3 17 +l 2 15 +l 0 14 +m 2 20 +l 1 19 +l 2 18 +l 2 20 + +40 11 5 24 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 +m 3 19 +l 2 16 +l 1 12 +l 1 6 +l 2 2 +l 3 -1 +m 5 23 +l 4 21 +l 3 18 +l 2 12 +l 2 6 +l 3 0 +l 4 -3 +l 5 -5 + +41 10 5 24 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 +m 4 19 +l 5 16 +l 6 12 +l 6 6 +l 5 2 +l 4 -1 +m 2 23 +l 3 21 +l 4 18 +l 5 12 +l 5 6 +l 4 0 +l 3 -3 +l 2 -5 + +42 13 6 24 +m 6 12 +l 5 11 +l 7 1 +l 6 0 +l 6 12 +l 7 11 +l 5 1 +l 6 0 +m 1 9 +l 2 9 +l 10 3 +l 11 3 +l 1 9 +l 1 8 +l 11 4 +l 11 3 +m 11 9 +l 10 9 +l 2 3 +l 1 3 +l 11 9 +l 11 8 +l 1 4 +l 1 3 + +43 21 10 12 +m 8 18 +l 8 1 +l 9 1 +m 8 18 +l 9 18 +l 9 1 +m 0 10 +l 17 10 +l 17 9 +m 0 10 +l 0 9 +l 17 9 + +44 8 4 12 +m 2 -3 +l 2 -1 +l 0 1 +l 2 3 +l 3 1 +l 3 -1 +l 2 -3 +l 0 -4 +m 2 2 +l 1 1 +l 2 0 +l 2 2 + +45 21 10 6 +m 0 10 +l 17 10 +l 17 9 +m 0 10 +l 0 9 +l 17 9 + +46 8 4 9 +m 2 3 +l 0 1 +l 2 0 +l 4 1 +l 2 3 +m 2 2 +l 1 1 +l 3 1 +l 2 2 + +47 21 10 6 +m 18 25 +l 0 -7 +l 1 -7 +m 18 25 +l 19 25 +l 1 -7 + +48 18 9 34 +m 2 19 +l 2 3 +l 0 2 +m 3 18 +l 3 3 +l 6 1 +m 4 19 +l 4 3 +l 6 2 +l 7 1 +m 2 19 +l 4 19 +l 9 20 +l 11 21 +m 9 20 +l 10 19 +l 12 18 +l 12 2 +m 10 20 +l 13 18 +l 13 3 +m 11 21 +l 12 20 +l 14 19 +l 16 19 +l 14 18 +l 14 2 +m 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 12 2 +l 14 2 + +49 13 6 23 +m 0 19 +l 1 18 +l 2 16 +l 2 3 +l 0 2 +m 2 18 +l 1 19 +l 2 20 +l 3 18 +l 3 2 +l 5 1 +m 0 19 +l 3 21 +l 4 19 +l 4 3 +l 6 2 +l 7 2 +m 0 2 +l 1 2 +l 3 1 +l 4 0 +l 5 1 +l 7 2 + +50 17 8 39 +m 1 19 +l 3 19 +l 5 20 +l 6 21 +l 8 20 +l 11 19 +l 13 19 +m 5 19 +l 7 20 +m 1 19 +l 3 18 +l 5 18 +l 7 19 +l 8 20 +m 11 19 +l 11 11 +m 12 18 +l 12 12 +m 13 19 +l 13 11 +l 6 11 +l 3 10 +l 1 8 +l 0 5 +l 0 0 +m 0 0 +l 4 2 +l 8 3 +l 11 3 +l 15 2 +m 3 1 +l 6 2 +l 11 2 +l 14 1 +m 0 0 +l 5 1 +l 10 1 +l 13 0 +l 15 2 + +51 17 8 45 +m 1 19 +l 2 19 +l 4 20 +l 5 21 +l 7 20 +l 11 19 +l 13 19 +m 4 19 +l 6 20 +m 1 19 +l 3 18 +l 5 18 +l 7 20 +m 11 19 +l 11 12 +m 12 18 +l 12 13 +m 13 19 +l 13 12 +l 11 12 +l 8 11 +l 6 10 +m 6 11 +l 8 10 +l 11 9 +l 13 9 +l 13 2 +m 12 8 +l 12 3 +m 11 9 +l 11 2 +m 0 2 +l 2 3 +l 4 3 +l 6 2 +l 7 1 +m 4 2 +l 6 1 +m 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 11 2 +l 13 2 + +52 17 8 33 +m 10 21 +l 0 11 +l 0 6 +l 9 6 +m 11 6 +l 15 6 +l 16 5 +l 16 7 +l 15 6 +m 1 11 +l 1 7 +m 2 13 +l 2 6 +m 9 20 +l 9 3 +l 7 2 +m 10 17 +l 11 19 +l 10 20 +l 10 2 +l 12 1 +m 10 21 +l 12 19 +l 11 17 +l 11 3 +l 13 2 +l 14 2 +m 7 2 +l 8 2 +l 10 1 +l 11 0 +l 12 1 +l 14 2 + +53 17 8 42 +m 1 21 +l 1 12 +m 1 21 +l 13 21 +m 2 20 +l 11 20 +m 1 19 +l 10 19 +l 12 20 +l 13 21 +m 11 15 +l 10 14 +l 8 13 +l 4 12 +l 1 12 +m 8 13 +l 9 13 +l 11 12 +l 11 2 +m 10 14 +l 12 13 +l 12 3 +m 11 15 +l 12 14 +l 14 13 +l 15 13 +l 13 12 +l 13 2 +m 0 2 +l 2 3 +l 4 3 +l 6 2 +l 7 1 +m 4 2 +l 6 1 +m 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 11 2 +l 13 2 + +54 18 9 48 +m 2 19 +l 2 3 +l 0 2 +m 3 18 +l 3 3 +l 6 1 +m 4 19 +l 4 3 +l 6 2 +l 7 1 +m 2 19 +l 4 19 +l 8 20 +l 10 21 +l 11 20 +l 13 19 +l 14 19 +m 9 20 +l 11 19 +m 8 20 +l 10 18 +l 12 18 +l 14 19 +m 4 11 +l 5 11 +l 9 12 +l 11 13 +l 12 14 +m 9 12 +l 10 12 +l 12 11 +l 12 2 +m 11 13 +l 13 11 +l 13 3 +m 12 14 +l 13 13 +l 15 12 +l 16 12 +l 14 11 +l 14 2 +m 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 12 2 +l 14 2 + +55 17 8 32 +m 0 19 +l 2 21 +l 5 20 +l 10 20 +l 15 21 +m 1 20 +l 4 19 +l 9 19 +l 12 20 +m 0 19 +l 4 18 +l 7 18 +l 11 19 +l 15 21 +m 15 21 +l 14 19 +l 12 16 +l 8 12 +l 6 9 +l 5 6 +l 5 3 +l 6 0 +m 7 10 +l 6 7 +l 6 4 +l 7 1 +m 10 14 +l 8 11 +l 7 8 +l 7 5 +l 8 2 +l 6 0 + +56 18 9 55 +m 2 18 +l 2 12 +m 3 17 +l 3 13 +m 4 18 +l 4 12 +m 2 18 +l 4 18 +l 9 19 +l 11 20 +l 12 21 +m 9 19 +l 10 19 +l 12 18 +l 12 12 +m 11 20 +l 13 19 +l 13 13 +m 12 21 +l 13 20 +l 15 19 +l 16 19 +l 14 18 +l 14 12 +m 2 12 +l 4 12 +l 12 9 +l 14 9 +m 14 12 +l 12 12 +l 4 9 +l 2 9 +m 2 9 +l 2 3 +l 0 2 +m 3 8 +l 3 3 +l 6 1 +m 4 9 +l 4 3 +l 6 2 +l 7 1 +m 12 9 +l 12 2 +m 13 8 +l 13 3 +m 14 9 +l 14 2 +m 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 12 2 +l 14 2 + +57 18 9 49 +m 2 19 +l 2 10 +l 0 9 +m 3 18 +l 3 9 +l 5 8 +m 4 19 +l 4 10 +l 6 9 +l 7 9 +m 2 19 +l 4 19 +l 9 20 +l 11 21 +m 9 20 +l 10 19 +l 12 18 +l 12 2 +m 10 20 +l 13 18 +l 13 3 +m 11 21 +l 12 20 +l 14 19 +l 16 19 +l 14 18 +l 14 2 +m 0 9 +l 1 9 +l 3 8 +l 4 7 +l 5 8 +l 7 9 +l 11 10 +l 12 10 +m 1 2 +l 3 3 +l 5 3 +l 7 2 +l 8 1 +m 5 2 +l 7 1 +m 1 2 +l 3 2 +l 5 1 +l 6 0 +l 8 1 +l 12 2 +l 14 2 + +58 8 4 18 +m 2 14 +l 0 12 +l 2 11 +l 4 12 +l 2 14 +m 2 13 +l 1 12 +l 3 12 +l 2 13 +m 2 3 +l 0 1 +l 2 0 +l 4 1 +l 2 3 +m 2 2 +l 1 1 +l 3 1 +l 2 2 + +59 8 4 21 +m 2 14 +l 0 12 +l 2 11 +l 4 12 +l 2 14 +m 2 13 +l 1 12 +l 3 12 +l 2 13 +m 2 -3 +l 2 -1 +l 0 1 +l 2 3 +l 3 1 +l 3 -1 +l 2 -3 +l 0 -4 +m 2 2 +l 1 1 +l 2 0 +l 2 2 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 21 10 12 +m 0 14 +l 17 14 +l 17 13 +m 0 14 +l 0 13 +l 17 13 +m 0 6 +l 17 6 +l 17 5 +m 0 6 +l 0 5 +l 17 5 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 15 7 43 +m 0 17 +l 1 19 +l 2 20 +l 5 21 +l 7 21 +l 10 20 +l 11 19 +l 12 17 +l 12 15 +l 11 13 +l 9 11 +l 7 10 +m 1 17 +l 2 19 +m 10 19 +l 11 18 +l 11 14 +l 10 13 +m 0 17 +l 2 16 +l 2 18 +l 3 20 +l 5 21 +m 7 21 +l 9 20 +l 10 18 +l 10 14 +l 9 12 +l 7 10 +m 6 10 +l 6 7 +l 7 10 +l 5 10 +l 6 7 +m 6 3 +l 4 1 +l 6 0 +l 8 1 +l 6 3 +m 6 2 +l 5 1 +l 7 1 +l 6 2 + +64 24 12 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 26 13 47 +m 5 18 +l 7 20 +l 9 21 +l 11 21 +l 12 20 +l 19 4 +l 20 3 +l 22 3 +l 20 0 +l 19 0 +l 18 1 +l 17 3 +l 10 19 +l 9 20 +l 7 20 +m 10 20 +l 11 19 +l 18 3 +l 19 1 +l 20 2 +l 18 3 +m 5 14 +l 6 15 +l 8 16 +l 9 16 +l 10 15 +m 9 15 +l 9 14 +m 6 15 +l 8 15 +l 9 13 +m 0 0 +l 2 2 +l 4 3 +l 7 3 +l 9 2 +l 7 0 +l 6 1 +l 3 1 +l 0 0 +m 3 2 +l 7 2 +l 8 1 +m 11 17 +l 5 3 +m 7 8 +l 15 8 + +66 22 11 88 +m 0 19 +l 2 21 +l 5 21 +l 7 20 +l 9 21 +m 3 20 +l 6 20 +m 0 19 +l 2 20 +l 4 19 +l 7 19 +l 9 21 +m 5 16 +l 4 15 +l 3 13 +l 3 12 +l 1 12 +l 0 11 +l 0 9 +l 1 10 +l 3 10 +l 3 4 +m 4 14 +l 4 6 +m 1 11 +l 4 11 +m 5 16 +l 5 7 +l 4 5 +l 3 4 +m 10 18 +l 9 17 +l 8 15 +l 8 6 +m 9 16 +l 9 8 +m 10 18 +l 10 9 +l 9 7 +l 8 6 +m 10 18 +l 16 21 +l 18 20 +l 19 18 +l 19 16 +l 17 14 +l 13 12 +m 16 20 +l 18 18 +l 18 16 +m 14 20 +l 16 19 +l 17 18 +l 17 15 +l 15 13 +m 15 13 +l 18 11 +l 19 9 +l 19 3 +m 17 11 +l 18 9 +l 18 4 +m 15 13 +l 16 12 +l 17 10 +l 17 3 +m 2 0 +l 5 2 +l 8 3 +l 12 3 +l 15 2 +m 4 1 +l 7 2 +l 12 2 +l 14 1 +m 2 0 +l 6 1 +l 11 1 +l 13 0 +l 15 2 +l 17 3 +l 19 3 +m 13 12 +l 13 3 +m 13 9 +l 17 9 +m 13 6 +l 17 6 + +67 21 10 59 +m 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 8 +l 1 5 +l 2 3 +l 5 1 +l 8 0 +l 11 0 +l 14 1 +l 16 2 +l 18 4 +l 19 6 +m 2 16 +l 1 13 +l 1 8 +l 3 4 +l 6 2 +l 9 1 +l 12 1 +l 15 2 +m 6 20 +l 4 18 +l 3 16 +l 2 13 +l 2 9 +l 3 6 +l 6 3 +l 9 2 +l 12 2 +l 15 3 +l 17 4 +l 19 6 +m 8 17 +l 8 5 +m 9 17 +l 9 7 +m 10 18 +l 10 8 +l 9 6 +l 8 5 +m 8 17 +l 10 18 +l 13 21 +l 15 20 +l 17 20 +l 18 21 +m 12 20 +l 14 19 +l 16 19 +m 11 19 +l 13 18 +l 15 18 +l 17 19 +l 18 21 +m 15 18 +l 15 3 + +68 21 10 59 +m 0 21 +l 14 21 +l 16 20 +l 17 18 +l 17 3 +m 2 20 +l 14 20 +l 16 18 +l 16 4 +m 0 21 +l 1 20 +l 3 19 +l 14 19 +l 15 18 +l 15 3 +m 6 16 +l 5 15 +l 4 13 +l 4 12 +l 2 12 +l 1 11 +l 1 9 +l 2 10 +l 4 10 +l 4 5 +m 5 14 +l 5 7 +m 2 11 +l 5 11 +m 6 16 +l 6 8 +l 5 6 +l 4 5 +m 0 0 +l 3 2 +l 6 3 +l 10 3 +l 13 2 +m 2 1 +l 5 2 +l 10 2 +l 12 1 +m 0 0 +l 4 1 +l 9 1 +l 11 0 +l 13 2 +l 15 3 +l 17 3 +m 9 19 +l 9 3 +m 9 14 +l 11 13 +l 13 13 +l 15 14 +m 9 8 +l 11 9 +l 13 9 +l 15 8 + +69 20 10 71 +m 0 19 +l 2 21 +l 4 21 +l 6 20 +l 8 21 +l 6 19 +l 4 19 +l 2 20 +l 0 19 +m 3 20 +l 5 20 +m 5 16 +l 4 15 +l 3 13 +l 3 12 +l 1 12 +l 0 11 +l 0 9 +l 1 10 +l 3 10 +l 3 4 +l 4 5 +l 5 7 +l 5 16 +m 4 14 +l 4 6 +m 1 11 +l 4 11 +m 8 3 +l 8 14 +l 9 17 +l 10 19 +l 11 20 +l 13 21 +l 15 21 +l 18 20 +l 16 18 +l 14 19 +l 12 19 +l 10 18 +l 9 17 +m 11 19 +l 13 20 +l 15 20 +l 17 19 +m 8 6 +l 9 9 +l 10 11 +l 11 12 +l 13 12 +l 15 11 +l 13 9 +l 12 10 +l 10 10 +l 9 9 +m 11 11 +l 13 11 +l 14 10 +m 2 0 +l 5 2 +l 9 3 +l 14 3 +l 18 2 +l 16 0 +l 13 1 +l 6 1 +l 2 0 +m 4 1 +l 7 2 +l 14 2 +l 17 1 + +70 22 11 74 +m 3 19 +l 5 21 +l 8 21 +l 10 20 +l 12 21 +m 6 20 +l 9 20 +m 3 19 +l 5 20 +l 7 19 +l 10 19 +l 12 21 +m 9 16 +l 8 15 +l 7 13 +l 7 12 +l 5 12 +l 4 11 +l 4 9 +l 5 10 +l 7 10 +l 7 5 +m 8 14 +l 8 7 +m 5 11 +l 8 11 +m 9 16 +l 9 8 +l 8 6 +l 7 5 +m 12 17 +l 12 2 +l 11 1 +l 10 1 +l 6 3 +l 4 3 +l 2 2 +l 0 0 +m 13 17 +l 13 3 +m 13 11 +l 17 11 +m 9 1 +l 8 1 +l 6 2 +l 3 2 +m 14 18 +l 14 12 +l 17 12 +m 17 10 +l 14 10 +l 14 4 +l 13 2 +l 9 0 +l 7 0 +l 5 1 +l 3 1 +l 0 0 +m 12 17 +l 14 18 +l 17 21 +l 19 20 +l 21 20 +l 22 21 +m 16 20 +l 18 19 +l 20 19 +m 15 19 +l 17 18 +l 19 18 +l 21 19 +l 22 21 +m 17 18 +l 17 4 + +71 22 11 73 +m 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 13 0 +l 16 1 +l 18 3 +l 19 5 +l 19 8 +l 18 10 +l 17 11 +l 15 12 +l 13 12 +m 2 16 +l 1 13 +l 1 8 +l 2 5 +m 6 20 +l 4 18 +l 3 16 +l 2 13 +l 2 8 +l 3 5 +l 4 3 +l 6 1 +m 17 3 +l 18 4 +l 18 8 +l 17 10 +m 13 0 +l 15 1 +l 16 2 +l 17 4 +l 17 8 +l 16 10 +l 15 11 +l 13 12 +m 8 17 +l 8 4 +m 9 17 +l 9 6 +m 10 18 +l 10 7 +l 9 5 +l 8 4 +m 8 17 +l 10 18 +l 13 21 +l 15 20 +l 17 20 +l 18 21 +m 12 20 +l 14 19 +l 16 19 +m 11 19 +l 13 18 +l 15 18 +l 17 19 +l 18 21 +m 17 19 +l 13 12 +l 13 0 +m 13 8 +l 17 8 +m 13 5 +l 17 5 + +72 22 11 90 +m 0 19 +l 2 21 +l 5 21 +l 7 20 +l 9 21 +m 3 20 +l 6 20 +m 0 19 +l 2 20 +l 4 19 +l 7 19 +l 9 21 +m 5 16 +l 4 15 +l 3 13 +l 3 12 +l 1 12 +l 0 11 +l 0 9 +l 1 10 +l 3 10 +l 3 4 +m 4 14 +l 4 6 +m 1 11 +l 4 11 +m 5 16 +l 5 7 +l 4 5 +l 3 4 +m 2 0 +l 5 2 +l 8 3 +l 11 3 +l 13 2 +m 4 1 +l 7 2 +l 10 2 +l 12 1 +m 2 0 +l 6 1 +l 9 1 +l 11 0 +l 13 2 +m 10 18 +l 9 17 +l 8 15 +l 8 6 +m 9 16 +l 9 8 +m 10 18 +l 10 9 +l 9 7 +l 8 6 +m 10 18 +l 12 20 +l 14 21 +l 16 21 +l 18 20 +m 15 20 +l 16 20 +l 17 19 +m 12 20 +l 14 20 +l 16 18 +l 18 20 +m 13 12 +l 15 13 +l 17 15 +l 18 14 +l 19 11 +l 19 7 +l 18 3 +l 16 0 +m 16 14 +l 17 13 +l 18 11 +l 18 6 +l 17 3 +m 15 13 +l 16 13 +l 17 11 +l 17 6 +l 16 0 +m 13 12 +l 13 2 +m 13 9 +l 17 9 +m 13 6 +l 17 6 + +73 19 9 56 +m 3 19 +l 5 21 +l 8 21 +l 11 20 +l 13 21 +m 6 20 +l 10 20 +m 3 19 +l 5 20 +l 8 19 +l 11 19 +l 13 21 +m 10 16 +l 9 15 +l 8 13 +l 8 12 +l 6 12 +l 5 11 +l 5 9 +l 6 10 +l 8 10 +l 8 5 +m 9 14 +l 9 7 +m 6 11 +l 9 11 +m 10 16 +l 10 8 +l 9 6 +l 8 5 +m 16 19 +l 14 17 +l 13 14 +l 13 3 +l 12 1 +l 10 1 +l 6 3 +l 4 3 +l 2 2 +l 0 0 +m 14 16 +l 14 4 +m 9 1 +l 8 1 +l 6 2 +l 3 2 +m 16 19 +l 15 17 +l 15 5 +l 14 3 +l 12 1 +l 10 0 +l 7 0 +l 5 1 +l 2 1 +l 0 0 + +74 18 9 54 +m 2 19 +l 4 21 +l 7 21 +l 10 20 +l 12 21 +m 5 20 +l 9 20 +m 2 19 +l 4 20 +l 7 19 +l 10 19 +l 12 21 +m 9 16 +l 8 15 +l 7 13 +l 7 12 +l 5 12 +l 4 11 +l 4 9 +l 5 10 +l 7 10 +l 7 5 +m 8 14 +l 8 7 +m 5 11 +l 8 11 +m 9 16 +l 9 8 +l 8 6 +l 7 5 +m 15 19 +l 13 17 +l 12 14 +l 12 3 +l 11 1 +m 13 16 +l 13 4 +m 15 19 +l 14 17 +l 14 5 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 0 3 +l 0 5 +l 1 6 +l 2 6 +l 3 5 +l 2 4 +l 1 4 +m 0 5 +l 3 5 + +75 22 11 92 +m 0 19 +l 2 21 +l 5 21 +l 7 20 +l 9 21 +m 3 20 +l 6 20 +m 0 19 +l 2 20 +l 4 19 +l 7 19 +l 9 21 +m 5 16 +l 4 15 +l 3 13 +l 3 12 +l 1 12 +l 0 11 +l 0 9 +l 1 10 +l 3 10 +l 3 4 +m 4 14 +l 4 6 +m 1 11 +l 4 11 +m 5 16 +l 5 7 +l 4 5 +l 3 4 +m 2 0 +l 5 2 +l 8 3 +l 11 3 +l 13 2 +m 4 1 +l 6 2 +l 10 2 +l 12 1 +m 2 0 +l 6 1 +l 9 1 +l 11 0 +l 13 2 +m 10 18 +l 9 17 +l 8 15 +l 8 6 +m 9 16 +l 9 8 +m 10 18 +l 10 9 +l 9 7 +l 8 6 +m 10 18 +l 12 20 +l 14 21 +l 16 21 +l 18 20 +m 15 20 +l 16 20 +l 17 19 +m 12 20 +l 14 20 +l 16 18 +l 18 20 +m 13 12 +l 16 15 +l 17 14 +l 19 13 +m 15 14 +l 17 13 +l 19 13 +m 19 13 +l 17 10 +l 15 8 +l 13 6 +m 15 8 +l 17 7 +l 18 3 +l 19 1 +l 20 1 +m 17 5 +l 18 1 +m 15 8 +l 16 7 +l 17 1 +l 18 0 +l 19 0 +l 20 1 +m 13 12 +l 13 2 + +76 20 10 68 +m 0 19 +l 2 21 +l 5 21 +l 7 20 +l 9 21 +m 3 20 +l 6 20 +m 0 19 +l 2 20 +l 4 19 +l 7 19 +l 9 21 +m 5 16 +l 4 15 +l 3 13 +l 3 12 +l 1 12 +l 0 11 +l 0 9 +l 1 10 +l 3 10 +l 3 4 +m 4 14 +l 4 6 +m 1 11 +l 4 11 +m 5 16 +l 5 7 +l 4 5 +l 3 4 +m 2 0 +l 5 2 +l 9 3 +l 14 3 +l 18 2 +m 4 1 +l 7 2 +l 14 2 +l 17 1 +m 2 0 +l 6 1 +l 13 1 +l 16 0 +l 18 2 +m 10 18 +l 9 17 +l 8 15 +l 8 6 +m 9 16 +l 9 8 +m 10 18 +l 10 9 +l 9 7 +l 8 6 +m 10 18 +l 12 20 +l 14 21 +l 16 21 +l 18 20 +m 15 20 +l 16 20 +l 17 19 +m 12 20 +l 14 20 +l 16 18 +l 18 20 +m 14 20 +l 14 3 + +77 27 13 88 +m 7 17 +l 6 16 +l 5 14 +l 5 12 +l 3 12 +l 2 11 +l 2 9 +l 3 10 +l 5 10 +l 5 6 +m 6 15 +l 6 8 +m 3 11 +l 6 11 +m 7 17 +l 7 9 +l 6 7 +l 5 6 +m 0 0 +l 2 2 +l 4 3 +l 6 3 +l 8 2 +l 9 2 +l 10 3 +m 3 2 +l 6 2 +l 8 1 +m 0 0 +l 2 1 +l 5 1 +l 7 0 +l 8 0 +l 9 1 +l 10 3 +m 7 17 +l 11 21 +l 15 17 +l 15 4 +l 16 2 +l 17 2 +m 11 20 +l 14 17 +l 14 3 +l 13 2 +l 14 1 +l 15 2 +l 14 3 +m 11 11 +l 14 11 +m 9 19 +l 10 19 +l 13 16 +l 13 12 +l 10 12 +m 10 10 +l 13 10 +l 13 3 +l 12 2 +l 14 0 +l 17 2 +l 18 3 +m 15 17 +l 19 21 +l 23 17 +l 23 4 +l 24 2 +l 25 2 +m 19 20 +l 22 17 +l 22 3 +l 24 1 +m 19 11 +l 22 11 +m 17 19 +l 18 19 +l 21 16 +l 21 12 +l 18 12 +m 18 10 +l 21 10 +l 21 2 +l 23 0 +l 25 2 +m 10 19 +l 10 3 +m 18 19 +l 18 3 + +78 23 11 69 +m 0 18 +l 2 20 +l 4 21 +l 6 21 +l 8 20 +l 10 17 +l 15 6 +l 17 3 +l 18 2 +m 6 20 +l 8 18 +l 9 16 +l 15 4 +l 18 1 +m 2 20 +l 4 20 +l 6 19 +l 8 16 +l 13 5 +l 15 2 +l 16 1 +l 18 0 +m 15 19 +l 17 18 +l 19 18 +l 21 19 +l 22 21 +m 16 20 +l 18 19 +l 20 19 +m 15 19 +l 17 21 +l 19 20 +l 21 20 +l 22 21 +m 4 12 +l 2 12 +l 1 11 +l 1 9 +l 2 10 +l 4 10 +m 2 11 +l 4 11 +m 0 0 +l 2 2 +l 4 3 +l 7 3 +l 9 2 +m 3 2 +l 6 2 +l 8 1 +m 0 0 +l 3 1 +l 6 1 +l 7 0 +l 9 2 +m 4 20 +l 4 3 +m 18 18 +l 18 0 +m 11 15 +l 12 14 +l 14 13 +l 16 13 +l 18 14 +m 4 7 +l 6 8 +l 10 8 +l 12 7 + +79 23 11 68 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 2 +l 18 4 +l 19 6 +l 20 9 +l 20 13 +l 19 16 +l 18 18 +l 16 20 +l 14 21 +l 13 20 +l 10 18 +l 7 17 +m 2 17 +l 1 14 +l 1 8 +l 2 5 +m 6 21 +l 4 19 +l 3 17 +l 2 14 +l 2 8 +l 3 5 +l 4 3 +l 6 1 +m 18 5 +l 19 8 +l 19 14 +l 17 18 +l 16 19 +m 14 1 +l 16 3 +l 17 5 +l 18 8 +l 18 14 +l 17 16 +l 15 19 +l 13 20 +m 7 17 +l 7 4 +m 8 17 +l 8 6 +m 9 17 +l 9 7 +l 8 5 +l 7 4 +m 13 20 +l 13 1 +m 13 14 +l 15 13 +l 16 13 +l 18 14 +m 13 8 +l 15 9 +l 16 9 +l 18 8 + +80 20 10 57 +m 1 21 +l 2 20 +l 3 18 +l 3 12 +l 1 12 +l 0 11 +l 0 9 +l 1 10 +l 3 10 +l 3 2 +l 0 0 +l 3 1 +l 3 -7 +l 5 -5 +m 3 19 +l 4 17 +l 4 -5 +m 1 11 +l 4 11 +m 1 21 +l 3 20 +l 4 19 +l 5 17 +l 5 -5 +m 5 16 +l 8 18 +l 12 21 +l 16 17 +l 16 3 +m 12 20 +l 15 17 +l 15 3 +m 10 19 +l 11 19 +l 14 16 +l 14 2 +m 8 3 +l 11 3 +l 14 2 +m 9 2 +l 11 2 +l 13 1 +m 8 1 +l 10 1 +l 12 0 +l 14 2 +l 16 3 +m 8 18 +l 8 -4 +m 8 14 +l 10 13 +l 12 13 +l 14 14 +m 8 8 +l 10 9 +l 12 9 +l 14 8 + +81 23 11 85 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 8 0 +l 12 0 +l 14 1 +l 16 2 +l 18 4 +l 19 6 +l 20 9 +l 20 13 +l 19 16 +l 18 18 +l 16 20 +l 14 21 +l 13 20 +l 10 18 +l 7 17 +m 2 17 +l 1 14 +l 1 8 +l 2 5 +m 6 21 +l 4 19 +l 3 17 +l 2 14 +l 2 8 +l 3 5 +l 4 3 +l 6 1 +m 18 5 +l 19 8 +l 19 14 +l 17 18 +l 16 19 +m 14 1 +l 16 3 +l 17 5 +l 18 8 +l 18 14 +l 17 16 +l 15 19 +l 13 20 +m 7 17 +l 7 4 +m 8 17 +l 8 6 +m 9 17 +l 9 7 +l 8 5 +l 7 4 +m 13 20 +l 13 1 +m 13 14 +l 15 13 +l 16 13 +l 18 14 +m 13 8 +l 15 9 +l 16 9 +l 18 8 +m 8 0 +l 9 1 +l 10 1 +l 12 0 +l 16 -5 +l 18 -6 +l 19 -6 +m 12 -1 +l 14 -4 +l 16 -6 +l 17 -6 +m 10 1 +l 11 0 +l 14 -6 +l 16 -7 +l 18 -7 +l 19 -6 + +82 22 11 89 +m 0 19 +l 2 21 +l 5 21 +l 7 20 +l 9 21 +m 3 20 +l 6 20 +m 0 19 +l 2 20 +l 4 19 +l 7 19 +l 9 21 +m 5 16 +l 4 15 +l 3 13 +l 3 12 +l 1 12 +l 0 11 +l 0 9 +l 1 10 +l 3 10 +l 3 4 +m 4 14 +l 4 6 +m 1 11 +l 4 11 +m 5 16 +l 5 7 +l 4 5 +l 3 4 +m 2 0 +l 5 2 +l 8 3 +l 10 3 +l 13 2 +m 4 1 +l 6 2 +l 10 2 +l 12 1 +m 2 0 +l 6 1 +l 9 1 +l 11 0 +l 13 2 +m 10 18 +l 9 17 +l 8 15 +l 8 6 +m 9 16 +l 9 8 +m 10 18 +l 10 9 +l 9 7 +l 8 6 +m 10 18 +l 13 20 +l 15 21 +l 17 20 +l 18 18 +l 18 15 +l 17 13 +l 16 12 +l 12 10 +l 10 9 +m 15 20 +l 16 20 +l 17 18 +l 17 14 +l 16 13 +m 13 20 +l 15 19 +l 16 17 +l 16 14 +l 15 12 +l 12 10 +m 12 10 +l 14 9 +l 15 8 +l 18 3 +l 19 2 +l 20 2 +m 15 7 +l 17 3 +l 19 1 +m 12 10 +l 14 8 +l 16 2 +l 18 0 +l 20 2 + +83 21 10 80 +m 12 18 +l 11 19 +l 9 20 +l 6 21 +m 13 19 +l 11 20 +m 14 20 +l 10 21 +l 6 21 +l 3 20 +l 2 19 +l 1 17 +l 2 15 +l 3 14 +l 6 13 +l 14 13 +l 16 12 +l 17 11 +l 17 9 +l 16 6 +m 2 16 +l 3 15 +l 6 14 +l 15 14 +l 17 13 +l 18 12 +l 18 10 +l 17 8 +m 2 19 +l 2 17 +l 3 16 +l 6 15 +l 16 15 +l 18 14 +l 19 12 +l 19 10 +l 16 6 +l 12 0 +m 0 12 +l 1 11 +l 3 10 +l 12 10 +l 13 9 +l 13 8 +l 12 6 +m 1 10 +l 3 9 +l 11 9 +l 12 8 +m 0 12 +l 0 11 +l 1 9 +l 3 8 +l 10 8 +l 12 7 +l 12 6 +m 0 0 +l 3 2 +l 7 3 +l 10 3 +l 13 2 +m 2 1 +l 5 2 +l 9 2 +l 12 1 +m 0 0 +l 4 1 +l 9 1 +l 12 0 +m 14 20 +l 12 18 +l 10 15 +m 9 13 +l 7 10 +m 6 8 +l 4 6 +l 2 5 +l 1 5 +l 1 6 +l 2 5 + +84 21 10 61 +m 2 17 +l 1 15 +l 0 12 +l 0 8 +l 1 5 +l 3 2 +l 5 1 +l 8 0 +l 11 0 +l 14 1 +l 16 2 +l 18 4 +l 19 6 +m 1 8 +l 2 5 +l 4 3 +l 6 2 +l 9 1 +l 12 1 +l 15 2 +m 2 17 +l 1 14 +l 1 10 +l 2 7 +l 4 4 +l 6 3 +l 9 2 +l 12 2 +l 15 3 +l 17 4 +l 19 6 +m 0 18 +l 1 20 +l 3 21 +l 7 21 +l 13 20 +l 17 20 +l 19 21 +m 8 20 +l 12 19 +l 16 19 +m 0 18 +l 1 19 +l 3 20 +l 6 20 +l 12 18 +l 15 18 +l 17 19 +l 19 21 +m 11 18 +l 10 17 +l 8 16 +l 8 5 +m 9 16 +l 9 7 +m 10 17 +l 10 8 +l 9 6 +l 8 5 +m 15 18 +l 15 3 + +85 22 11 74 +m 0 19 +l 2 21 +l 4 21 +l 7 20 +l 9 21 +m 3 20 +l 6 20 +m 0 19 +l 2 20 +l 5 19 +l 7 19 +l 9 21 +m 3 17 +l 2 15 +l 1 12 +l 1 8 +l 2 5 +l 3 3 +l 5 1 +l 8 0 +l 11 0 +l 14 1 +l 16 2 +l 18 0 +l 20 2 +m 2 8 +l 3 5 +l 6 2 +l 9 1 +l 12 1 +m 3 17 +l 2 13 +l 2 10 +l 3 7 +l 4 5 +l 6 3 +l 9 2 +l 13 2 +l 16 3 +m 13 18 +l 9 17 +l 8 15 +l 8 5 +m 9 16 +l 9 7 +m 10 17 +l 10 8 +l 9 6 +l 8 5 +m 13 18 +l 15 19 +l 17 21 +l 18 20 +l 20 19 +l 18 18 +l 18 4 +l 19 2 +l 20 2 +m 17 18 +l 18 19 +l 17 20 +l 16 19 +l 17 18 +l 17 3 +l 19 1 +m 15 19 +l 16 18 +l 16 3 +m 13 18 +l 13 2 +m 13 13 +l 16 13 +m 13 9 +l 16 9 + +86 21 10 60 +m 1 21 +l 2 20 +l 3 18 +l 3 12 +l 1 12 +l 0 11 +l 0 9 +l 1 10 +l 3 10 +l 3 3 +l 1 2 +m 3 19 +l 4 17 +l 4 3 +m 1 11 +l 4 11 +m 5 2 +l 8 2 +l 10 1 +m 1 21 +l 3 20 +l 4 19 +l 5 17 +l 5 3 +l 9 3 +l 12 2 +m 1 2 +l 4 2 +l 7 1 +l 9 0 +l 12 2 +l 15 3 +l 17 3 +m 9 17 +l 12 18 +l 14 19 +l 16 21 +l 17 20 +l 19 19 +l 17 18 +l 17 3 +m 16 18 +l 17 19 +l 16 20 +l 15 19 +l 16 18 +l 16 4 +m 14 19 +l 15 18 +l 15 3 +m 9 17 +l 9 3 +m 9 14 +l 11 13 +l 13 13 +l 15 14 +m 9 8 +l 11 9 +l 13 9 +l 15 8 + +87 25 12 76 +m 1 21 +l 2 20 +l 3 18 +l 3 12 +l 1 12 +l 0 11 +l 0 9 +l 1 10 +l 3 10 +l 3 3 +l 1 2 +m 3 19 +l 4 17 +l 4 3 +m 1 11 +l 4 11 +m 5 2 +l 7 2 +l 9 1 +m 1 21 +l 3 20 +l 4 19 +l 5 17 +l 5 3 +l 8 3 +l 10 2 +m 1 2 +l 4 2 +l 7 1 +l 8 0 +l 10 2 +l 13 3 +l 15 2 +l 16 0 +l 18 2 +l 21 3 +m 8 19 +l 11 21 +l 13 19 +l 13 3 +l 16 3 +l 18 2 +m 11 20 +l 12 19 +l 12 3 +m 8 19 +l 10 19 +l 11 18 +l 11 3 +l 10 2 +m 16 2 +l 17 1 +m 16 19 +l 19 21 +l 21 19 +l 21 3 +m 19 20 +l 20 19 +l 20 3 +m 16 19 +l 18 19 +l 19 18 +l 19 3 +l 18 2 +m 8 19 +l 8 3 +m 16 19 +l 16 3 +m 8 13 +l 11 13 +m 8 9 +l 11 9 +m 16 13 +l 19 13 +m 16 9 +l 19 9 + +88 21 10 52 +m 0 18 +l 2 20 +l 4 21 +l 6 21 +l 7 20 +l 15 2 +l 16 1 +l 18 1 +m 5 20 +l 6 19 +l 14 2 +l 15 1 +m 2 20 +l 4 20 +l 5 19 +l 13 1 +l 14 0 +l 16 0 +l 18 1 +l 20 3 +m 15 21 +l 17 20 +l 19 20 +l 20 21 +m 15 20 +l 16 19 +l 18 19 +m 14 19 +l 15 18 +l 17 18 +l 19 19 +l 20 21 +m 0 0 +l 1 2 +l 3 3 +l 5 3 +l 6 2 +m 2 2 +l 4 2 +l 5 1 +m 0 0 +l 1 1 +l 3 1 +l 5 0 +m 15 21 +l 11 12 +m 9 9 +l 5 0 +m 4 11 +l 8 11 +m 11 11 +l 16 11 + +89 21 10 72 +m 1 21 +l 2 20 +l 3 18 +l 3 12 +l 1 12 +l 0 11 +l 0 9 +l 1 10 +l 3 10 +l 3 3 +l 1 2 +m 3 19 +l 4 17 +l 4 3 +m 1 11 +l 4 11 +m 5 2 +l 8 2 +l 10 1 +m 1 21 +l 3 20 +l 4 19 +l 5 17 +l 5 3 +l 9 3 +l 12 2 +m 1 2 +l 4 2 +l 7 1 +l 9 0 +l 12 2 +l 15 3 +m 9 17 +l 12 18 +l 14 19 +l 16 21 +l 17 20 +l 19 19 +l 17 18 +l 17 -3 +l 16 -5 +l 14 -7 +l 12 -6 +l 8 -5 +l 3 -5 +m 16 18 +l 17 19 +l 16 20 +l 15 19 +l 16 18 +l 16 2 +m 14 19 +l 15 18 +l 15 3 +l 17 0 +m 15 -6 +l 13 -5 +l 10 -5 +m 16 -5 +l 13 -4 +l 7 -4 +l 3 -5 +m 9 17 +l 9 3 +m 9 14 +l 11 13 +l 13 13 +l 15 14 +m 9 8 +l 11 9 +l 13 9 +l 15 8 + +90 18 9 46 +m 14 20 +l 13 18 +l 8 12 +l 5 8 +l 3 4 +l 0 0 +m 12 16 +l 4 5 +m 16 21 +l 13 17 +l 11 13 +l 8 9 +l 3 3 +l 2 1 +m 0 19 +l 2 21 +l 5 20 +l 11 20 +l 16 21 +m 1 20 +l 5 19 +l 9 19 +l 13 20 +m 0 19 +l 4 18 +l 8 18 +l 12 19 +l 14 20 +m 2 1 +l 4 2 +l 8 3 +l 12 3 +l 16 2 +m 3 1 +l 7 2 +l 11 2 +l 15 1 +m 0 0 +l 5 1 +l 11 1 +l 14 0 +l 16 2 +m 3 11 +l 7 11 +m 10 11 +l 14 11 + +91 7 3 8 +m 0 19 +l 0 -1 +m 1 19 +l 1 -1 +m 0 19 +l 5 19 +m 0 -1 +l 5 -1 + +92 17 8 2 +m 0 21 +l 14 -3 + +93 8 4 8 +m 4 19 +l 4 -1 +m 5 19 +l 5 -1 +m 0 19 +l 5 19 +m 0 -1 +l 5 -1 + +94 19 9 5 +m 8 21 +l 2 16 +l 8 20 +l 14 16 +l 8 21 + +95 20 10 5 +m 0 -6 +l 17 -6 +l 17 -7 +l 0 -7 +l 0 -6 + +96 7 3 12 +m 3 21 +l 1 20 +l 0 18 +l 0 16 +l 1 14 +l 3 16 +l 1 18 +l 1 20 +m 1 17 +l 1 15 +l 2 16 +l 1 17 + +97 14 7 45 +m 3 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 2 +l 8 3 +m 0 5 +l 1 3 +l 2 2 +l 4 1 +m 1 7 +l 1 5 +l 2 3 +l 4 2 +l 5 2 +m 1 11 +l 3 11 +l 6 12 +l 8 13 +l 9 14 +l 11 12 +l 10 11 +l 10 3 +l 11 2 +l 12 2 +m 2 13 +l 1 12 +l 4 12 +m 7 12 +l 10 12 +l 9 13 +l 9 2 +l 10 1 +m 0 12 +l 2 14 +l 3 13 +l 5 12 +l 8 11 +l 8 2 +l 10 0 +l 12 2 +m 0 12 +l 5 7 + +98 16 8 37 +m 1 19 +l 2 17 +l 2 3 +l 0 2 +m 3 17 +l 2 19 +l 3 20 +l 3 3 +l 6 1 +m 1 19 +l 4 21 +l 4 3 +l 6 2 +l 7 1 +m 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 10 2 +l 12 2 +m 4 11 +l 7 12 +l 9 13 +l 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 2 +m 9 13 +l 11 12 +l 11 3 +m 7 12 +l 8 12 +l 10 11 +l 10 2 + +99 12 6 29 +m 2 12 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +m 3 12 +l 3 2 +l 5 1 +m 4 12 +l 4 3 +l 6 2 +l 7 2 +l 5 1 +l 4 0 +m 2 12 +l 6 13 +l 8 14 +l 9 13 +l 11 12 +l 12 12 +m 7 13 +l 8 12 +l 10 12 +m 4 12 +l 6 13 +l 8 11 +l 10 11 +l 12 12 + +100 15 7 34 +m 7 14 +l 5 13 +l 2 12 +l 2 3 +l 0 2 +m 3 12 +l 3 3 +l 6 1 +m 7 14 +l 4 12 +l 4 3 +l 6 2 +l 7 1 +m 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 10 2 +l 12 2 +m 2 19 +l 5 21 +l 6 18 +l 12 12 +l 12 2 +m 5 18 +l 3 19 +l 4 20 +l 5 18 +l 11 12 +l 11 3 +m 2 19 +l 10 11 +l 10 2 + +101 12 6 26 +m 2 12 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +m 3 12 +l 3 2 +l 5 1 +m 4 12 +l 4 3 +l 6 2 +l 7 2 +l 5 1 +l 4 0 +m 2 12 +l 6 13 +l 8 14 +l 11 10 +l 9 9 +l 4 6 +m 7 13 +l 10 10 +m 4 12 +l 6 13 +l 9 9 + +102 12 6 33 +m 3 19 +l 3 3 +l 1 2 +l 2 2 +l 4 1 +l 5 0 +m 4 19 +l 4 2 +l 6 1 +m 5 19 +l 5 3 +l 7 2 +l 8 2 +l 6 1 +l 5 0 +m 3 19 +l 6 20 +l 8 21 +l 9 20 +l 11 19 +l 12 19 +m 7 20 +l 8 19 +l 10 19 +m 5 19 +l 6 20 +l 8 18 +l 10 18 +l 12 19 +m 0 14 +l 3 14 +m 5 14 +l 9 14 + +103 16 8 48 +m 2 12 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +l 5 1 +l 7 2 +l 10 3 +m 3 11 +l 3 2 +l 5 1 +m 4 12 +l 4 3 +l 6 2 +l 7 2 +m 2 12 +l 4 12 +l 7 13 +l 9 14 +l 10 13 +l 12 12 +l 14 12 +l 12 11 +l 12 -1 +l 11 -4 +l 9 -6 +l 7 -7 +l 6 -6 +l 4 -5 +l 2 -5 +m 8 13 +l 11 11 +l 11 -1 +m 8 -6 +l 6 -5 +l 5 -5 +m 7 13 +l 8 12 +l 10 11 +l 10 1 +l 11 -2 +l 11 -4 +m 9 -6 +l 8 -5 +l 6 -4 +l 4 -4 +l 2 -5 + +104 16 8 41 +m 1 19 +l 2 17 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +m 3 17 +l 2 19 +l 3 20 +l 3 2 +l 5 1 +m 1 19 +l 4 21 +l 4 3 +l 6 2 +l 4 0 +m 4 11 +l 7 12 +l 9 13 +l 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 2 +l 10 0 +l 9 -2 +m 9 13 +l 11 12 +l 11 2 +l 10 0 +m 7 12 +l 8 12 +l 10 11 +l 10 2 +l 9 -2 +l 9 -5 +l 10 -7 +l 11 -7 +l 9 -5 + +105 8 4 30 +m 3 21 +l 1 19 +l 3 18 +l 5 19 +l 3 21 +m 3 20 +l 2 19 +l 4 19 +l 3 20 +m 3 14 +l 2 13 +l 0 12 +l 2 11 +l 2 2 +l 4 0 +l 6 2 +m 3 11 +l 4 12 +l 3 13 +l 2 12 +l 3 11 +l 3 2 +l 4 1 +m 3 14 +l 4 13 +l 6 12 +l 4 11 +l 4 3 +l 5 2 +l 6 2 + +106 8 4 34 +m 3 21 +l 1 19 +l 3 18 +l 5 19 +l 3 21 +m 3 20 +l 2 19 +l 4 19 +l 3 20 +m 3 14 +l 2 13 +l 0 12 +l 2 11 +l 2 2 +l 4 0 +l 5 -2 +m 3 11 +l 4 12 +l 3 13 +l 2 12 +l 3 11 +l 3 2 +l 4 0 +m 3 14 +l 4 13 +l 6 12 +l 4 11 +l 4 2 +l 5 -2 +l 5 -5 +l 3 -7 +l 1 -7 +l 1 -6 +l 3 -7 + +107 15 7 41 +m 1 19 +l 2 17 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +m 3 17 +l 2 19 +l 3 20 +l 3 2 +l 5 1 +m 1 19 +l 4 21 +l 4 3 +l 6 2 +l 4 0 +m 4 11 +l 7 13 +l 9 14 +l 11 11 +l 8 9 +l 4 6 +m 8 13 +l 10 11 +m 7 13 +l 9 10 +m 8 9 +l 9 8 +l 11 3 +l 12 2 +l 13 2 +m 8 8 +l 9 7 +l 10 2 +l 11 1 +m 7 8 +l 8 7 +l 9 2 +l 11 0 +l 13 2 + +108 8 4 19 +m 1 19 +l 2 17 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +m 3 17 +l 2 19 +l 3 20 +l 3 2 +l 5 1 +m 1 19 +l 4 21 +l 4 3 +l 6 2 +l 7 2 +l 5 1 +l 4 0 + +109 24 12 58 +m 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +m 2 13 +l 3 12 +l 3 2 +l 5 1 +m 0 12 +l 2 14 +l 4 12 +l 4 3 +l 6 2 +l 4 0 +m 4 11 +l 7 12 +l 9 13 +l 10 14 +l 12 12 +l 12 3 +l 14 2 +l 12 0 +m 9 13 +l 11 12 +l 11 2 +l 13 1 +m 7 12 +l 8 12 +l 10 11 +l 10 3 +l 9 2 +l 11 1 +l 12 0 +m 12 11 +l 15 12 +l 17 13 +l 18 14 +l 19 13 +l 21 12 +l 22 12 +l 20 11 +l 20 3 +l 21 2 +l 22 2 +m 17 13 +l 19 12 +l 19 2 +l 20 1 +m 15 12 +l 16 12 +l 18 11 +l 18 2 +l 20 0 +l 22 2 + +110 16 8 39 +m 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +m 2 13 +l 3 12 +l 3 2 +l 5 1 +m 0 12 +l 2 14 +l 4 12 +l 4 3 +l 6 2 +l 4 0 +m 4 11 +l 7 12 +l 9 13 +l 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 3 +l 13 2 +l 14 2 +m 9 13 +l 11 12 +l 11 2 +l 12 1 +m 7 12 +l 8 12 +l 10 11 +l 10 2 +l 12 0 +l 14 2 + +111 16 8 33 +m 2 12 +l 2 3 +l 0 2 +m 3 11 +l 3 3 +l 6 1 +m 4 12 +l 4 3 +l 6 2 +l 7 1 +m 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 10 2 +l 12 2 +m 2 12 +l 4 12 +l 7 13 +l 9 14 +l 10 13 +l 12 12 +l 14 12 +l 12 11 +l 12 2 +m 8 13 +l 11 11 +l 11 3 +m 7 13 +l 8 12 +l 10 11 +l 10 2 + +112 16 8 45 +m 1 14 +l 2 12 +l 2 3 +l 0 2 +l 2 2 +l 2 -7 +m 2 13 +l 3 12 +l 3 -6 +l 4 -5 +l 3 -3 +m 3 2 +l 4 2 +l 6 1 +m 1 14 +l 3 13 +l 4 12 +l 4 3 +l 6 2 +l 7 1 +m 4 1 +l 5 0 +l 7 1 +l 10 2 +l 12 2 +m 4 1 +l 4 -3 +l 5 -5 +l 2 -7 +m 4 11 +l 7 12 +l 9 13 +l 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 2 +m 9 13 +l 11 12 +l 11 3 +m 7 12 +l 8 12 +l 10 11 +l 10 2 + +113 16 8 37 +m 2 12 +l 2 3 +l 0 2 +m 3 11 +l 3 2 +l 5 1 +m 4 12 +l 4 3 +l 6 2 +l 7 2 +m 0 2 +l 1 2 +l 3 1 +l 4 0 +l 5 1 +l 7 2 +l 10 3 +m 2 12 +l 4 12 +l 7 13 +l 9 14 +l 10 13 +l 12 12 +l 14 12 +l 12 11 +l 12 -7 +m 8 13 +l 11 11 +l 11 -6 +l 10 -5 +l 11 -3 +m 7 13 +l 8 12 +l 10 11 +l 10 -3 +l 9 -5 +l 12 -7 + +114 12 6 32 +m 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +m 1 13 +l 3 12 +l 3 2 +l 5 1 +m 0 12 +l 2 14 +l 4 12 +l 4 3 +l 6 2 +l 7 2 +l 5 1 +l 4 0 +m 4 12 +l 8 14 +l 9 13 +l 11 12 +l 12 12 +m 7 13 +l 8 12 +l 10 12 +m 6 13 +l 8 11 +l 10 11 +l 12 12 + +115 14 7 47 +m 1 12 +l 1 8 +l 3 7 +l 9 7 +l 11 6 +l 11 2 +m 2 12 +l 2 8 +m 10 6 +l 10 2 +m 4 13 +l 3 12 +l 3 8 +l 5 7 +m 7 7 +l 9 6 +l 9 2 +l 8 1 +m 1 12 +l 4 13 +l 6 14 +l 8 13 +l 10 13 +l 11 14 +m 5 13 +l 7 13 +m 4 13 +l 6 12 +l 8 12 +l 10 13 +m 11 2 +l 8 1 +l 6 0 +l 4 1 +l 2 1 +l 0 0 +m 7 1 +l 5 1 +m 8 1 +l 6 2 +l 3 2 +l 0 0 +m 11 14 +l 10 12 +l 8 9 +l 3 4 +l 0 0 + +116 9 4 23 +m 2 19 +l 3 17 +l 3 3 +l 1 2 +l 2 2 +l 4 1 +l 5 0 +m 4 17 +l 3 19 +l 4 20 +l 4 2 +l 6 1 +m 2 19 +l 5 21 +l 5 3 +l 7 2 +l 8 2 +l 6 1 +l 5 0 +m 0 14 +l 3 14 +m 5 14 +l 8 14 + +117 16 8 40 +m 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +m 1 13 +l 3 12 +l 3 2 +l 5 1 +m 0 12 +l 2 14 +l 4 12 +l 4 3 +l 6 2 +l 7 2 +m 0 2 +l 1 2 +l 3 1 +l 4 0 +l 5 1 +l 7 2 +l 10 3 +m 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 3 +l 13 2 +l 14 2 +m 9 13 +l 11 12 +l 11 2 +l 12 1 +m 10 14 +l 8 12 +l 10 11 +l 10 2 +l 12 0 +l 14 2 + +118 15 7 30 +m 0 14 +l 1 12 +l 1 3 +l 4 0 +l 6 2 +l 9 3 +l 11 3 +m 1 13 +l 2 12 +l 2 3 +l 5 1 +m 0 14 +l 2 13 +l 3 12 +l 3 4 +l 4 3 +l 6 2 +m 9 14 +l 10 13 +l 12 12 +l 13 12 +l 11 11 +l 11 3 +m 8 13 +l 10 12 +l 10 4 +m 9 14 +l 7 12 +l 9 11 +l 9 3 + +119 23 11 48 +m 0 14 +l 1 12 +l 1 3 +l 4 0 +l 6 2 +l 9 3 +m 1 13 +l 2 12 +l 2 3 +l 5 1 +m 0 14 +l 2 13 +l 3 12 +l 3 4 +l 4 3 +l 6 2 +m 9 14 +l 7 12 +l 9 11 +l 9 3 +l 12 0 +l 14 2 +l 17 3 +l 19 3 +m 8 13 +l 10 12 +l 10 3 +l 13 1 +m 9 14 +l 10 13 +l 12 12 +l 11 11 +l 11 4 +l 12 3 +l 14 2 +m 17 14 +l 18 13 +l 20 12 +l 21 12 +l 19 11 +l 19 3 +m 16 13 +l 18 12 +l 18 4 +m 17 14 +l 15 12 +l 17 11 +l 17 3 + +120 17 8 48 +m 1 12 +l 2 12 +l 4 11 +l 5 10 +l 9 2 +l 10 1 +l 12 0 +l 14 2 +m 3 13 +l 5 12 +l 10 2 +l 12 1 +m 1 12 +l 3 14 +l 5 13 +l 6 12 +l 10 4 +l 11 3 +l 13 2 +l 14 2 +m 8 8 +l 11 14 +l 12 13 +l 14 13 +l 15 14 +m 11 13 +l 12 12 +l 13 12 +m 10 12 +l 12 11 +l 14 12 +l 15 14 +m 7 6 +l 4 0 +l 3 1 +l 1 1 +l 0 0 +m 4 1 +l 3 2 +l 2 2 +m 5 2 +l 3 3 +l 1 2 +l 0 0 +m 3 7 +l 6 7 +m 9 7 +l 12 7 + +121 16 8 51 +m 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +m 1 13 +l 3 12 +l 3 2 +l 5 1 +m 0 12 +l 2 14 +l 4 12 +l 4 3 +l 6 2 +l 7 2 +m 0 2 +l 1 2 +l 3 1 +l 4 0 +l 5 1 +l 7 2 +l 10 3 +m 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 -1 +l 11 -4 +l 9 -6 +l 7 -7 +l 6 -6 +l 4 -5 +l 2 -5 +m 9 13 +l 11 12 +l 11 -1 +m 8 -6 +l 6 -5 +l 5 -5 +m 10 14 +l 8 12 +l 10 11 +l 10 1 +l 11 -2 +l 11 -4 +m 9 -6 +l 8 -5 +l 6 -4 +l 4 -4 +l 2 -5 + +122 15 7 30 +m 12 14 +l 0 0 +m 0 12 +l 2 11 +l 5 11 +l 8 12 +l 12 14 +m 1 13 +l 3 12 +l 7 12 +m 0 12 +l 2 14 +l 4 13 +l 8 13 +l 12 14 +m 0 0 +l 4 2 +l 7 3 +l 10 3 +l 12 2 +m 5 2 +l 9 2 +l 11 1 +m 0 0 +l 4 1 +l 8 1 +l 10 0 +l 12 2 +m 2 7 +l 10 7 + +123 11 5 37 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +m 3 24 +l 2 22 +l 2 20 +l 3 18 +l 4 17 +l 5 15 +l 5 13 +l 4 11 +l 0 9 +l 4 7 +l 5 5 +l 5 3 +l 4 1 +l 3 0 +l 2 -2 +l 2 -4 +l 3 -6 +l 5 -7 +m 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 + +124 6 3 2 +m 0 23 +l 0 -3 + +125 9 4 37 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +m 2 24 +l 3 22 +l 3 20 +l 2 18 +l 1 17 +l 0 15 +l 0 13 +l 1 11 +l 5 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 2 0 +l 3 -2 +l 3 -4 +l 2 -6 +m 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 20 10 8 +m 10 15 +l 7 17 +l 0 16 +l 7 19 +l 12 15 +l 17 18 +l 12 14 +l 7 17 + +127 14 7 7 +m 0 5 +l 0 0 +l 12 0 +l 12 6 +l 6 14 +l 0 6 +l 0 5 + +128 25 12 84 +m 6 22 +l 4 21 +l 2 19 +l 1 17 +l 0 14 +l 0 10 +l 1 7 +l 2 5 +l 5 3 +l 8 2 +l 11 2 +l 14 3 +l 16 4 +l 18 6 +l 19 8 +l 17 6 +l 15 5 +l 12 4 +l 9 4 +l 6 5 +l 3 8 +l 2 11 +l 2 15 +l 3 18 +l 4 20 +l 6 22 +m 2 18 +l 1 15 +l 1 10 +l 3 6 +l 6 4 +l 9 3 +l 12 3 +l 15 4 +m 10 20 +l 8 19 +l 8 7 +l 9 8 +l 10 10 +l 10 20 +l 13 23 +l 15 22 +l 17 22 +l 18 23 +l 17 21 +l 15 20 +l 15 5 +m 9 19 +l 9 9 +m 12 22 +l 14 21 +l 16 21 +m 11 21 +l 13 20 +l 15 20 +m 7 -7 +l 5 -6 +l 4 -4 +l 4 -2 +l 2 -3 +l 3 -5 +l 4 -6 +l 7 -7 +l 9 -7 +l 11 -6 +l 12 -4 +l 12 -2 +l 11 0 +l 7 1 +l 7 2 +m 8 2 +l 8 1 +l 11 1 +l 13 -1 +l 14 -3 +l 13 -5 +l 12 -6 +l 9 -7 +m 3 -3 +l 4 -5 +m 12 -1 +l 13 -2 +l 13 -4 +l 12 -5 + +129 16 8 55 +m 7 2 +l 6 2 +l 4 3 +l 4 12 +l 2 14 +l 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +l 5 1 +l 7 2 +l 10 3 +m 1 13 +l 3 12 +l 3 2 +l 5 1 +m 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 3 +l 13 2 +l 14 2 +l 12 0 +l 10 2 +l 10 11 +l 8 12 +l 10 14 +m 9 13 +l 11 12 +l 11 2 +l 12 1 +m 4 19 +l 2 17 +l 4 16 +l 6 17 +l 4 19 +m 4 18 +l 3 17 +l 5 17 +l 4 18 +m 10 19 +l 8 17 +l 10 16 +l 12 17 +l 10 19 +m 10 18 +l 9 17 +l 11 17 +l 10 18 + +130 12 6 34 +m 3 6 +l 8 9 +l 10 10 +l 7 14 +l 3 12 +l 3 3 +l 5 2 +l 6 2 +l 4 1 +l 2 2 +l 2 12 +l 0 14 +l 0 2 +l 2 1 +l 3 0 +l 4 1 +m 8 9 +l 5 13 +m 6 13 +l 9 10 +m 2 12 +l 3 12 +m 7 18 +l 7 20 +l 5 22 +l 7 24 +l 8 22 +l 8 20 +l 7 18 +l 3 16 +m 7 23 +l 6 22 +l 7 21 +l 7 23 + +131 18 9 48 +m 5 9 +l 3 7 +l 2 5 +l 2 3 +l 3 1 +l 5 0 +l 7 2 +l 10 3 +m 2 5 +l 3 3 +l 4 2 +l 6 1 +m 3 7 +l 3 5 +l 4 3 +l 6 2 +l 7 2 +m 3 11 +l 5 11 +l 8 12 +l 10 13 +l 11 14 +l 13 12 +l 12 11 +l 12 3 +l 13 2 +l 14 2 +l 12 0 +l 10 2 +l 10 11 +l 7 12 +l 5 13 +l 4 14 +l 2 12 +l 7 7 +m 4 13 +l 3 12 +l 6 12 +m 9 12 +l 12 12 +l 11 13 +l 11 2 +l 12 1 +m 7 21 +l 1 16 +l 7 20 +l 13 16 +l 7 21 + +132 14 7 61 +m 3 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 2 +l 8 3 +m 0 5 +l 1 3 +l 2 2 +l 4 1 +m 1 7 +l 1 5 +l 2 3 +l 4 2 +l 5 2 +m 1 11 +l 3 11 +l 6 12 +l 8 13 +l 9 14 +l 11 12 +l 10 11 +l 10 3 +l 11 2 +l 12 2 +l 10 0 +l 8 2 +l 8 11 +l 5 12 +l 3 13 +l 2 14 +l 0 12 +l 5 7 +m 2 13 +l 1 12 +l 4 12 +m 7 12 +l 10 12 +l 9 13 +l 9 2 +l 10 1 +m 3 19 +l 1 17 +l 3 16 +l 5 17 +l 3 19 +m 3 18 +l 2 17 +l 4 17 +l 3 18 +m 9 19 +l 7 17 +l 9 16 +l 11 17 +l 9 19 +m 9 18 +l 8 17 +l 10 17 +l 9 18 + +133 14 7 55 +m 3 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 2 +l 8 3 +m 0 5 +l 1 3 +l 2 2 +l 4 1 +m 1 7 +l 1 5 +l 2 3 +l 4 2 +l 5 2 +m 1 11 +l 3 11 +l 6 12 +l 8 13 +l 9 14 +l 11 12 +l 10 11 +l 10 3 +l 11 2 +l 12 2 +l 10 0 +l 8 2 +l 8 11 +l 5 12 +l 3 13 +l 2 14 +l 0 12 +l 5 7 +m 2 13 +l 1 12 +l 4 12 +m 7 12 +l 10 12 +l 9 13 +l 9 2 +l 10 1 +m 3 18 +l 3 20 +l 5 22 +l 3 24 +l 2 22 +l 2 20 +l 3 18 +l 7 16 +m 3 23 +l 4 22 +l 3 21 +l 3 23 + +134 14 7 52 +m 3 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 2 +l 8 3 +m 0 5 +l 1 3 +l 2 2 +l 4 1 +m 1 7 +l 1 5 +l 2 3 +l 4 2 +l 5 2 +m 1 11 +l 3 11 +l 6 12 +l 8 13 +l 9 14 +l 11 12 +l 10 11 +l 10 3 +l 11 2 +l 12 2 +l 10 0 +l 8 2 +l 8 11 +l 5 12 +l 3 13 +l 2 14 +l 0 12 +l 5 7 +m 2 13 +l 1 12 +l 4 12 +m 7 12 +l 10 12 +l 9 13 +l 9 2 +l 10 1 +m 6 19 +l 4 17 +l 6 16 +l 8 17 +l 6 19 +m 6 18 +l 5 17 +l 7 17 +l 6 18 + +135 19 9 57 +m 8 6 +l 8 14 +l 10 15 +l 12 13 +l 14 13 +l 16 14 +l 15 14 +l 13 15 +l 12 16 +l 10 15 +l 6 14 +l 6 6 +l 7 5 +l 9 4 +l 11 5 +l 10 5 +l 8 6 +m 7 14 +l 7 6 +m 11 15 +l 12 14 +l 14 14 +m 5 5 +l 7 4 +l 8 3 +l 9 4 +m 6 4 +l 7 2 +l 9 0 +l 10 -2 +l 10 -4 +l 9 -6 +l 7 -7 +l 10 -6 +l 11 -5 +l 12 -3 +l 11 -1 +l 9 1 +l 7 2 +l 5 2 +l 6 4 +l 6 2 +m 10 -5 +l 11 -4 +l 11 -2 +l 10 -1 +m 5 -7 +l 3 -6 +l 2 -4 +l 2 -2 +l 0 -3 +l 1 -5 +l 2 -6 +l 5 -7 +l 7 -7 +m 1 -3 +l 2 -5 + +136 18 9 27 +m 7 6 +l 12 9 +l 14 10 +l 11 14 +l 7 12 +l 7 3 +l 9 2 +l 10 2 +l 8 1 +l 6 2 +l 6 12 +l 4 14 +l 4 2 +l 6 1 +l 7 0 +l 8 1 +m 12 9 +l 9 13 +m 10 13 +l 13 10 +m 6 12 +l 7 12 +m 8 21 +l 2 16 +l 8 20 +l 14 16 +l 8 21 + +137 12 6 40 +m 3 6 +l 8 9 +l 10 10 +l 7 14 +l 3 12 +l 3 3 +l 5 2 +l 6 2 +l 4 1 +l 2 2 +l 2 12 +l 0 14 +l 0 2 +l 2 1 +l 3 0 +l 4 1 +m 8 9 +l 5 13 +m 6 13 +l 9 10 +m 2 12 +l 3 12 +m 2 19 +l 0 17 +l 2 16 +l 4 17 +l 2 19 +m 2 18 +l 1 17 +l 3 17 +l 2 18 +m 8 19 +l 6 17 +l 8 16 +l 10 17 +l 8 19 +m 8 18 +l 7 17 +l 9 17 +l 8 18 + +138 12 6 34 +m 3 6 +l 8 9 +l 10 10 +l 7 14 +l 3 12 +l 3 3 +l 5 2 +l 6 2 +l 4 1 +l 2 2 +l 2 12 +l 0 14 +l 0 2 +l 2 1 +l 3 0 +l 4 1 +m 8 9 +l 5 13 +m 6 13 +l 9 10 +m 2 12 +l 3 12 +m 1 18 +l 1 20 +l 3 22 +l 1 24 +l 0 22 +l 0 20 +l 1 18 +l 5 16 +m 1 23 +l 2 22 +l 1 21 +l 1 23 + +139 12 6 38 +m 5 14 +l 4 13 +l 2 12 +l 4 11 +l 4 2 +l 6 0 +l 8 2 +l 7 2 +l 6 3 +l 6 11 +l 8 12 +l 6 13 +l 5 14 +m 5 11 +l 6 12 +l 5 13 +l 4 12 +l 5 11 +l 5 2 +l 6 1 +m 2 19 +l 0 17 +l 2 16 +l 4 17 +l 2 19 +m 2 18 +l 1 17 +l 3 17 +l 2 18 +m 8 19 +l 6 17 +l 8 16 +l 10 17 +l 8 19 +m 8 18 +l 7 17 +l 9 17 +l 8 18 + +140 18 9 25 +m 8 14 +l 7 13 +l 5 12 +l 7 11 +l 7 2 +l 9 0 +l 11 2 +l 10 2 +l 9 3 +l 9 11 +l 11 12 +l 9 13 +l 8 14 +m 8 11 +l 9 12 +l 8 13 +l 7 12 +l 8 11 +l 8 2 +l 9 1 +m 8 21 +l 2 16 +l 8 20 +l 14 16 +l 8 21 + +141 11 5 32 +m 5 14 +l 4 13 +l 2 12 +l 4 11 +l 4 2 +l 6 0 +l 8 2 +l 7 2 +l 6 3 +l 6 11 +l 8 12 +l 6 13 +l 5 14 +m 5 11 +l 6 12 +l 5 13 +l 4 12 +l 5 11 +l 5 2 +l 6 1 +m 1 18 +l 1 20 +l 3 22 +l 1 24 +l 0 22 +l 0 20 +l 1 18 +l 5 16 +m 1 23 +l 2 22 +l 1 21 +l 1 23 + +142 25 12 65 +m 5 18 +l 7 20 +l 9 21 +l 11 21 +l 12 20 +l 19 4 +l 20 3 +l 22 3 +l 20 0 +l 19 0 +l 18 1 +l 17 3 +l 10 19 +l 9 20 +l 7 20 +m 10 20 +l 11 19 +l 18 3 +l 19 1 +l 20 2 +l 18 3 +m 5 14 +l 6 15 +l 8 16 +l 9 16 +l 10 15 +m 9 15 +l 9 14 +m 6 15 +l 8 15 +l 9 13 +m 0 0 +l 2 2 +l 4 3 +l 7 3 +l 9 2 +l 7 0 +l 6 1 +l 3 1 +l 0 0 +m 3 2 +l 7 2 +l 8 1 +m 11 17 +l 5 3 +m 7 8 +l 15 8 +m 8 27 +l 6 25 +l 8 24 +l 10 25 +l 8 27 +m 8 26 +l 7 25 +l 9 25 +l 8 26 +m 14 27 +l 12 25 +l 14 24 +l 16 25 +l 14 27 +m 14 26 +l 13 25 +l 15 25 +l 14 26 + +143 26 13 58 +m 5 18 +l 7 20 +l 9 21 +l 11 21 +l 12 20 +l 19 4 +l 20 3 +l 22 3 +l 20 0 +l 19 0 +l 18 1 +l 17 3 +l 10 19 +l 9 20 +l 7 20 +m 10 20 +l 11 19 +l 18 3 +l 19 1 +l 20 2 +l 18 3 +m 5 14 +l 6 15 +l 8 16 +l 9 16 +l 10 15 +m 9 15 +l 9 14 +m 6 15 +l 8 15 +l 9 13 +m 0 0 +l 2 2 +l 4 3 +l 7 3 +l 9 2 +l 7 0 +l 6 1 +l 3 1 +l 0 0 +m 3 2 +l 7 2 +l 8 1 +m 11 17 +l 5 3 +m 7 8 +l 15 8 +m 14 25 +l 14 25 +m 11 27 +l 9 25 +l 11 24 +l 13 25 +l 11 27 +m 11 26 +l 10 25 +l 12 25 +l 11 26 + +144 20 10 77 +m 2 0 +l 5 2 +l 9 3 +l 14 3 +l 18 2 +l 16 0 +l 13 1 +l 6 1 +l 2 0 +m 4 1 +l 7 2 +l 14 2 +l 17 1 +m 9 6 +l 10 7 +l 12 7 +l 13 6 +l 15 8 +l 13 9 +l 11 9 +l 10 8 +l 9 6 +l 8 3 +l 8 8 +l 9 11 +l 10 13 +l 11 14 +l 13 15 +l 15 15 +l 18 14 +l 16 12 +l 14 13 +l 12 13 +l 10 12 +l 9 11 +m 0 13 +l 2 15 +l 4 15 +l 6 14 +l 8 15 +l 6 13 +l 4 13 +l 2 14 +l 0 13 +m 3 14 +l 5 14 +m 11 13 +l 13 14 +l 15 14 +l 17 13 +m 11 8 +l 13 8 +l 14 7 +m 4 8 +l 0 8 +l 0 6 +l 1 7 +l 3 7 +l 3 3 +l 5 6 +l 5 11 +l 3 9 +l 3 8 +m 4 5 +l 4 10 +m 10 19 +l 10 21 +l 8 23 +l 10 25 +l 11 23 +l 11 21 +l 10 19 +l 6 17 +m 10 24 +l 9 23 +l 10 22 +l 10 24 + +145 22 11 61 +m 3 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 2 +l 8 3 +m 0 5 +l 1 3 +l 2 2 +l 4 1 +m 1 7 +l 1 5 +l 2 3 +l 4 2 +l 5 2 +m 1 11 +l 3 11 +l 6 12 +l 8 13 +l 9 14 +l 11 12 +l 10 11 +l 10 3 +l 11 2 +l 11 12 +l 14 13 +l 16 14 +l 19 10 +l 12 6 +m 2 13 +l 1 12 +l 4 12 +m 7 12 +l 10 12 +l 9 13 +l 9 2 +l 11 1 +l 12 0 +l 13 1 +l 15 2 +l 14 2 +l 12 3 +l 12 12 +l 14 13 +l 17 9 +m 5 7 +l 0 12 +l 2 14 +l 3 13 +l 5 12 +l 8 11 +l 8 1 +l 9 1 +l 10 0 +l 9 1 +l 9 1 +m 18 10 +l 15 13 +l 14 13 + +146 35 17 114 +m 5 18 +l 7 20 +l 9 21 +l 11 21 +l 12 20 +l 12 19 +l 14 21 +l 16 21 +l 18 20 +l 20 21 +l 18 19 +l 16 19 +l 14 20 +l 12 19 +m 10 20 +l 11 19 +l 14 12 +l 15 12 +l 15 13 +l 16 15 +l 17 16 +l 17 7 +l 15 4 +l 15 10 +l 13 10 +l 12 9 +l 12 11 +l 13 12 +l 10 19 +l 9 20 +l 7 20 +m 14 10 +l 15 8 +l 7 8 +m 18 1 +l 14 0 +l 17 2 +l 21 3 +l 26 3 +l 30 2 +l 28 0 +l 25 1 +l 18 1 +m 11 17 +l 5 3 +m 5 14 +l 6 15 +l 8 16 +l 9 16 +l 10 15 +m 9 15 +l 9 14 +m 6 15 +l 8 15 +l 9 13 +m 0 0 +l 2 2 +l 4 3 +l 7 3 +l 9 2 +l 7 0 +l 6 1 +l 3 1 +l 0 0 +m 3 2 +l 7 2 +l 8 1 +m 15 20 +l 17 20 +m 29 1 +l 26 2 +l 19 2 +l 16 8 +l 16 6 +l 18 2 +m 13 11 +l 16 11 +m 25 21 +l 27 21 +l 30 20 +l 28 18 +l 26 19 +l 24 19 +l 22 18 +l 21 17 +l 22 19 +l 23 20 +l 25 21 +m 23 19 +l 25 20 +l 27 20 +l 29 19 +m 21 17 +l 20 14 +l 20 3 +m 20 6 +l 21 9 +l 22 11 +l 23 12 +l 25 12 +l 27 11 +l 25 9 +l 24 10 +l 22 10 +l 21 9 +m 23 11 +l 25 11 +l 26 10 +m 16 1 +l 19 2 +m 16 14 +l 16 8 +l 17 6 +l 17 7 + +147 16 8 35 +m 8 1 +l 7 2 +l 5 3 +l 5 12 +l 3 12 +l 3 3 +l 1 2 +l 3 2 +l 5 1 +l 6 0 +l 8 1 +l 11 2 +l 13 2 +l 13 11 +l 15 12 +l 13 12 +l 11 13 +l 10 14 +l 8 13 +l 9 12 +l 11 11 +l 11 2 +m 4 11 +l 4 3 +l 7 1 +m 5 12 +l 8 13 +m 9 13 +l 12 11 +l 12 3 +m 8 21 +l 2 16 +l 8 20 +l 14 16 +l 8 21 + +148 16 8 48 +m 7 1 +l 6 2 +l 4 3 +l 4 12 +l 2 12 +l 2 3 +l 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 10 2 +l 12 2 +l 12 11 +l 14 12 +l 12 12 +l 10 13 +l 9 14 +l 7 13 +l 8 12 +l 10 11 +l 10 2 +m 3 11 +l 3 3 +l 6 1 +m 4 12 +l 7 13 +m 8 13 +l 11 11 +l 11 3 +m 5 20 +l 3 18 +l 5 17 +l 7 18 +l 5 20 +m 5 19 +l 4 18 +l 6 18 +l 5 19 +m 11 20 +l 9 18 +l 11 17 +l 13 18 +l 11 20 +m 11 19 +l 10 18 +l 12 18 +l 11 19 + +149 16 8 42 +m 7 1 +l 6 2 +l 4 3 +l 4 12 +l 2 12 +l 2 3 +l 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 10 2 +l 12 2 +l 12 11 +l 14 12 +l 12 12 +l 10 13 +l 9 14 +l 7 13 +l 8 12 +l 10 11 +l 10 2 +m 3 11 +l 3 3 +l 6 1 +m 4 12 +l 7 13 +m 8 13 +l 11 11 +l 11 3 +m 4 18 +l 4 20 +l 6 22 +l 4 24 +l 3 22 +l 3 20 +l 4 18 +l 8 16 +m 4 23 +l 5 22 +l 4 21 +l 4 23 + +150 18 9 42 +m 8 2 +l 7 2 +l 5 3 +l 5 12 +l 3 14 +l 1 12 +l 2 12 +l 3 11 +l 3 3 +l 1 2 +l 2 2 +l 4 1 +l 5 0 +l 6 1 +l 8 2 +l 11 3 +m 2 13 +l 4 12 +l 4 2 +l 6 1 +m 11 14 +l 12 13 +l 14 12 +l 15 12 +l 13 11 +l 13 3 +l 14 2 +l 15 2 +l 13 0 +l 11 2 +l 11 11 +l 9 12 +l 11 14 +m 10 13 +l 12 12 +l 12 2 +l 13 1 +m 8 21 +l 2 16 +l 8 20 +l 14 16 +l 8 21 + +151 16 8 49 +m 7 2 +l 6 2 +l 4 3 +l 4 12 +l 2 14 +l 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +l 5 1 +l 7 2 +l 10 3 +m 1 13 +l 3 12 +l 3 2 +l 5 1 +m 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 3 +l 13 2 +l 14 2 +l 12 0 +l 10 2 +l 10 11 +l 8 12 +l 10 14 +m 9 13 +l 11 12 +l 11 2 +l 12 1 +m 3 18 +l 3 20 +l 5 22 +l 3 24 +l 2 22 +l 2 20 +l 3 18 +l 7 16 +m 3 23 +l 4 22 +l 3 21 +l 3 23 + +152 16 8 65 +m 7 2 +l 6 2 +l 4 3 +l 4 12 +l 2 14 +l 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +l 5 1 +l 7 2 +l 10 3 +m 1 13 +l 3 12 +l 3 2 +l 5 1 +m 11 -4 +l 11 -2 +l 10 1 +l 10 11 +l 8 12 +l 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 -1 +l 11 -4 +l 9 -6 +l 7 -7 +l 6 -6 +l 4 -5 +l 2 -5 +l 4 -4 +l 6 -4 +l 8 -5 +l 9 -6 +m 9 13 +l 11 12 +l 11 -1 +m 8 -6 +l 6 -5 +l 5 -5 +m 4 19 +l 2 17 +l 4 16 +l 6 17 +l 4 19 +m 4 18 +l 3 17 +l 5 17 +l 4 18 +m 10 19 +l 8 17 +l 10 16 +l 12 17 +l 10 19 +m 10 18 +l 9 17 +l 11 17 +l 10 18 + +153 23 11 82 +m 6 1 +l 4 3 +l 3 5 +l 2 8 +l 2 14 +l 3 17 +l 4 19 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 2 +l 18 4 +l 19 6 +l 20 9 +l 20 13 +l 19 16 +l 18 18 +l 16 20 +l 14 21 +l 13 20 +l 10 18 +l 7 17 +l 7 4 +l 8 5 +l 9 7 +l 9 17 +m 2 17 +l 1 14 +l 1 8 +l 2 5 +m 18 5 +l 19 8 +l 19 14 +l 17 18 +l 16 19 +m 14 1 +l 16 3 +l 17 5 +l 18 8 +l 18 14 +l 17 16 +l 15 19 +l 13 20 +l 13 1 +m 8 17 +l 8 6 +m 13 14 +l 15 13 +l 16 13 +l 18 14 +m 13 8 +l 15 9 +l 16 9 +l 18 8 +m 7 27 +l 5 25 +l 7 24 +l 9 25 +l 7 27 +m 7 26 +l 6 25 +l 8 25 +l 7 26 +m 13 27 +l 11 25 +l 13 24 +l 15 25 +l 13 27 +m 13 26 +l 12 25 +l 14 25 +l 13 26 + +154 22 11 87 +m 0 19 +l 2 21 +l 4 21 +l 7 20 +l 9 21 +l 7 19 +l 5 19 +l 2 20 +l 0 19 +m 3 20 +l 6 20 +m 3 17 +l 2 15 +l 1 12 +l 1 8 +l 2 5 +l 3 3 +l 5 1 +l 8 0 +l 11 0 +l 14 1 +l 16 2 +l 18 0 +l 20 2 +l 19 2 +l 18 4 +l 18 18 +l 20 19 +l 18 20 +l 17 21 +l 15 19 +l 16 18 +l 16 3 +l 13 2 +l 9 2 +l 6 3 +l 4 5 +l 3 7 +l 2 10 +l 2 13 +l 3 17 +m 2 8 +l 3 5 +l 6 2 +l 9 1 +l 12 1 +m 15 19 +l 13 18 +l 9 17 +l 8 15 +l 8 5 +l 9 6 +l 10 8 +l 10 17 +m 9 16 +l 9 7 +m 17 18 +l 18 19 +l 17 20 +l 16 19 +l 17 18 +l 17 3 +l 19 1 +m 13 18 +l 13 2 +m 13 13 +l 16 13 +m 13 9 +l 16 9 +m 7 27 +l 5 25 +l 7 24 +l 9 25 +l 7 27 +m 7 26 +l 6 25 +l 8 25 +l 7 26 +m 13 27 +l 11 25 +l 13 24 +l 15 25 +l 13 27 +m 13 26 +l 12 25 +l 14 25 +l 13 26 + +155 18 9 35 +m 7 1 +l 6 2 +l 4 3 +l 4 12 +l 2 12 +l 2 3 +l 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 10 2 +l 12 2 +l 12 11 +l 14 12 +l 12 12 +l 10 13 +l 9 14 +l 7 13 +l 8 12 +l 10 11 +l 10 2 +m 3 11 +l 3 3 +l 6 1 +m 4 12 +l 7 13 +m 8 13 +l 11 11 +l 11 3 +m 3 -2 +l 13 16 +l 14 16 +l 4 -2 +l 3 -2 + +156 23 11 43 +m 15 0 +l 17 2 +l 17 3 +l 15 4 +l 17 4 +l 18 3 +l 18 2 +l 17 1 +l 15 0 +l 2 0 +l 0 2 +l 0 3 +l 1 3 +l 2 0 +m 3 0 +l 3 17 +l 4 19 +l 5 20 +l 7 21 +l 10 21 +l 12 20 +l 13 18 +l 13 17 +l 12 17 +l 12 18 +l 11 20 +l 9 21 +m 8 21 +l 6 20 +l 5 19 +l 4 16 +l 4 0 +m 5 13 +l 2 12 +l 0 11 +l 0 12 +l 2 13 +l 8 13 +l 10 12 +l 10 11 +l 9 11 +l 7 12 +l 4 13 + +157 25 12 69 +m 6 1 +l 4 3 +l 3 5 +l 2 8 +l 2 14 +l 3 17 +l 4 19 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 2 +l 18 4 +l 19 6 +l 20 9 +l 20 13 +l 19 16 +l 18 18 +l 16 20 +l 14 21 +l 13 20 +l 10 18 +l 7 17 +l 7 4 +l 8 5 +l 9 7 +l 9 17 +m 2 17 +l 1 14 +l 1 8 +l 2 5 +m 18 5 +l 19 8 +l 19 14 +l 17 18 +l 16 19 +m 14 1 +l 16 3 +l 17 5 +l 18 8 +l 18 14 +l 17 16 +l 15 19 +l 13 20 +l 13 1 +m 8 17 +l 8 6 +m 13 14 +l 15 13 +l 16 13 +l 18 14 +m 13 8 +l 15 9 +l 16 9 +l 18 8 +m 3 -2 +l 17 23 +l 18 23 +l 4 -2 +l 3 -2 + +158 28 14 76 +m 1 25 +l 2 24 +l 3 22 +l 3 16 +l 1 16 +l 0 15 +l 0 13 +l 1 14 +l 3 14 +l 3 6 +l 0 4 +l 3 5 +l 3 -3 +l 5 -1 +l 5 21 +l 4 23 +l 3 24 +l 1 25 +m 3 23 +l 4 21 +l 4 -1 +m 1 15 +l 4 15 +m 5 20 +l 8 22 +l 12 25 +l 16 21 +l 16 7 +l 14 6 +l 14 20 +l 11 23 +l 10 23 +m 12 24 +l 15 21 +l 15 7 +m 8 7 +l 11 7 +l 14 6 +l 12 4 +l 10 5 +l 8 5 +m 9 6 +l 11 6 +l 13 5 +m 8 22 +l 8 0 +m 8 18 +l 10 17 +l 12 17 +l 14 18 +m 8 12 +l 10 13 +l 12 13 +l 14 12 +m 22 3 +l 22 17 +l 19 15 +l 20 13 +l 20 3 +l 18 2 +l 19 2 +l 21 1 +l 22 0 +l 23 1 +l 25 2 +l 24 2 +l 22 3 +m 21 13 +l 20 15 +l 21 16 +l 21 2 +l 23 1 +m 17 10 +l 20 10 +m 22 10 +l 25 10 + +159 23 11 45 +m 9 2 +l 9 19 +l 10 21 +l 11 22 +l 13 23 +l 16 23 +l 18 22 +l 19 20 +l 19 19 +l 18 19 +l 18 20 +l 17 22 +l 15 23 +m 14 23 +l 12 22 +l 11 21 +l 10 18 +l 10 -1 +l 9 -3 +l 8 -4 +l 6 -5 +l 3 -5 +l 1 -4 +l 0 -2 +l 0 -1 +l 1 -1 +l 1 -2 +l 2 -4 +l 4 -5 +m 5 -5 +l 7 -4 +l 8 -3 +l 9 0 +l 9 16 +m 10 10 +l 7 9 +l 5 8 +l 5 9 +l 7 10 +l 13 10 +l 15 9 +l 15 8 +l 14 8 +l 12 9 +l 9 10 + +160 14 7 55 +m 3 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 2 +l 8 3 +m 0 5 +l 1 3 +l 2 2 +l 4 1 +m 1 7 +l 1 5 +l 2 3 +l 4 2 +l 5 2 +m 1 11 +l 3 11 +l 6 12 +l 8 13 +l 9 14 +l 11 12 +l 10 11 +l 10 3 +l 11 2 +l 12 2 +l 10 0 +l 8 2 +l 8 11 +l 5 12 +l 3 13 +l 2 14 +l 0 12 +l 5 7 +m 2 13 +l 1 12 +l 4 12 +m 7 12 +l 10 12 +l 9 13 +l 9 2 +l 10 1 +m 8 18 +l 8 20 +l 6 22 +l 8 24 +l 9 22 +l 9 20 +l 8 18 +l 4 16 +m 8 23 +l 7 22 +l 8 21 +l 8 23 + +161 10 5 32 +m 3 14 +l 2 13 +l 0 12 +l 2 11 +l 2 2 +l 4 0 +l 6 2 +l 5 2 +l 4 3 +l 4 11 +l 6 12 +l 4 13 +l 3 14 +m 3 11 +l 4 12 +l 3 13 +l 2 12 +l 3 11 +l 3 2 +l 4 1 +m 6 18 +l 6 20 +l 4 22 +l 6 24 +l 7 22 +l 7 20 +l 6 18 +l 2 16 +m 6 23 +l 5 22 +l 6 21 +l 6 23 + +162 16 8 42 +m 7 1 +l 6 2 +l 4 3 +l 4 12 +l 2 12 +l 2 3 +l 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 10 2 +l 12 2 +l 12 11 +l 14 12 +l 12 12 +l 10 13 +l 9 14 +l 7 13 +l 8 12 +l 10 11 +l 10 2 +m 3 11 +l 3 3 +l 6 1 +m 4 12 +l 7 13 +m 8 13 +l 11 11 +l 11 3 +m 10 18 +l 10 20 +l 8 22 +l 10 24 +l 11 22 +l 11 20 +l 10 18 +l 6 16 +m 10 23 +l 9 22 +l 10 21 +l 10 23 + +163 16 8 49 +m 7 2 +l 6 2 +l 4 3 +l 4 12 +l 2 14 +l 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +l 5 1 +l 7 2 +l 10 3 +m 1 13 +l 3 12 +l 3 2 +l 5 1 +m 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 3 +l 13 2 +l 14 2 +l 12 0 +l 10 2 +l 10 11 +l 8 12 +l 10 14 +m 9 13 +l 11 12 +l 11 2 +l 12 1 +m 10 18 +l 10 20 +l 8 22 +l 10 24 +l 11 22 +l 11 20 +l 10 18 +l 6 16 +m 10 23 +l 9 22 +l 10 21 +l 10 23 + +164 19 9 44 +m 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +l 6 2 +l 4 3 +l 4 12 +l 2 14 +l 0 12 +m 2 13 +l 3 12 +l 3 2 +l 5 1 +m 4 11 +l 7 12 +l 9 13 +l 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 3 +l 13 2 +l 14 2 +l 12 0 +l 10 2 +l 10 11 +l 8 12 +l 7 12 +m 9 13 +l 11 12 +l 11 2 +l 12 1 +m 7 18 +l 2 17 +l 7 19 +l 10 18 +l 14 20 +l 10 17 +l 7 18 + +165 23 11 72 +m 0 18 +l 2 20 +l 4 21 +l 6 21 +l 8 20 +l 10 17 +l 15 6 +l 17 3 +l 18 2 +m 6 20 +l 8 18 +l 15 4 +l 18 1 +m 2 20 +l 4 20 +l 6 19 +l 8 16 +l 13 5 +l 15 2 +l 16 1 +l 18 0 +l 18 18 +m 15 19 +l 17 18 +l 19 18 +l 21 19 +l 22 21 +l 21 20 +l 19 20 +l 17 21 +l 15 19 +m 16 20 +l 18 19 +l 20 19 +m 4 12 +l 2 12 +l 1 11 +l 1 9 +l 2 10 +l 4 10 +m 2 11 +l 4 11 +m 0 0 +l 2 2 +l 4 3 +l 7 3 +l 9 2 +l 7 0 +l 6 1 +l 3 1 +l 0 0 +m 3 2 +l 6 2 +l 8 1 +m 4 20 +l 4 3 +m 11 15 +l 12 14 +l 14 13 +l 16 13 +l 18 14 +m 4 7 +l 6 8 +l 10 8 +l 12 7 +m 10 27 +l 3 25 +l 10 28 +l 15 24 +l 20 27 +l 15 23 +l 10 27 + +166 21 10 48 +m 5 16 +l 3 14 +l 2 12 +l 2 10 +l 3 8 +l 5 7 +l 7 9 +l 10 10 +m 2 12 +l 3 10 +l 4 9 +l 6 8 +m 3 14 +l 3 12 +l 4 10 +l 6 9 +l 7 9 +m 3 18 +l 5 18 +l 8 19 +l 10 20 +l 11 21 +l 13 19 +l 12 18 +l 12 10 +l 13 9 +l 14 9 +l 12 7 +l 10 9 +l 10 18 +l 7 19 +l 5 20 +l 4 21 +l 2 19 +l 7 14 +m 4 20 +l 3 19 +l 6 19 +m 9 19 +l 12 19 +l 11 20 +l 11 9 +l 12 8 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 + +167 20 10 36 +m 8 10 +l 7 11 +l 5 12 +l 5 19 +l 3 19 +l 3 12 +l 1 11 +l 3 11 +l 5 10 +l 6 9 +l 8 10 +l 11 11 +l 13 11 +m 5 19 +l 8 20 +l 10 21 +l 11 20 +l 13 19 +l 15 19 +l 13 18 +l 13 12 +m 9 20 +l 12 18 +l 12 12 +m 8 20 +l 9 19 +l 11 18 +l 11 12 +m 4 18 +l 4 12 +l 7 10 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 + +168 15 7 41 +m 7 0 +l 9 1 +l 10 3 +l 10 5 +l 12 4 +l 11 2 +l 10 1 +l 7 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 1 8 +l 3 10 +l 5 11 +l 7 11 +l 6 14 +l 5 11 +l 3 9 +l 2 7 +l 2 3 +l 3 1 +l 5 0 +m 11 4 +l 10 2 +m 2 2 +l 1 3 +l 1 7 +l 2 8 +m 6 11 +l 6 14 +m 6 18 +l 8 20 +l 6 21 +l 4 20 +l 6 18 +m 6 19 +l 7 20 +l 5 20 +l 6 19 + +169 14 7 8 +m 10 5 +l 10 3 +l 3 3 +l 3 0 +l 0 0 +l 0 6 +l 10 6 +l 10 5 + +170 14 7 8 +m 0 5 +l 0 3 +l 7 3 +l 7 0 +l 10 0 +l 10 6 +l 0 6 +l 0 5 + +171 26 13 61 +m 21 21 +l 19 21 +l 0 0 +l 2 0 +l 21 21 +m 5 12 +l 5 19 +l 4 21 +l 1 19 +l 2 18 +l 3 16 +l 3 12 +l 1 11 +l 2 11 +l 4 10 +l 5 9 +l 6 10 +l 8 11 +l 7 11 +l 5 12 +m 3 18 +l 2 19 +l 3 20 +l 4 18 +l 4 11 +l 6 10 +m 14 1 +l 17 1 +l 19 0 +l 21 2 +l 18 3 +l 16 3 +l 13 2 +l 11 0 +l 14 1 +m 13 1 +l 15 2 +l 18 2 +l 20 1 +m 11 0 +l 11 3 +l 12 5 +l 16 7 +l 20 7 +l 20 11 +l 18 11 +l 18 7 +m 19 10 +l 19 8 +m 18 11 +l 16 12 +l 14 11 +l 13 10 +l 12 10 +l 14 9 +l 15 9 +l 17 11 +m 16 11 +l 14 10 +m 20 21 +l 1 0 + +172 26 13 54 +m 21 21 +l 19 21 +l 0 0 +l 2 0 +l 21 21 +m 5 12 +l 5 19 +l 4 21 +l 1 19 +l 2 18 +l 3 16 +l 3 12 +l 1 11 +l 2 11 +l 4 10 +l 5 9 +l 6 10 +l 8 11 +l 7 11 +l 5 12 +m 3 18 +l 2 19 +l 3 20 +l 4 18 +l 4 11 +l 6 10 +m 20 21 +l 1 0 +m 16 11 +l 16 2 +l 14 1 +l 16 1 +l 18 0 +l 19 0 +l 17 1 +l 17 11 +l 18 10 +l 17 8 +m 18 0 +l 20 1 +l 18 2 +l 18 8 +l 19 10 +l 17 12 +l 10 5 +l 10 4 +l 20 4 +l 21 5 +l 21 3 +l 20 4 +m 12 7 +l 12 4 +m 11 6 +l 11 4 + +173 9 4 23 +m 3 14 +l 4 3 +l 6 2 +l 4 1 +l 3 0 +l 2 1 +l 0 2 +l 2 3 +l 3 14 +l 3 3 +l 4 2 +l 3 1 +l 2 2 +l 3 3 +m 3 18 +l 1 20 +l 3 21 +l 5 20 +l 3 18 +m 3 19 +l 2 20 +l 4 20 +l 3 19 + +174 18 9 6 +m 7 4 +l 0 10 +l 7 17 +m 13 17 +l 6 10 +l 13 4 + +175 18 9 6 +m 6 4 +l 13 10 +l 6 17 +m 0 17 +l 7 10 +l 0 4 + +176 17 8 126 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 5 21 +l 7 21 +l 7 19 +l 5 19 +l 5 21 +m 6 21 +l 6 19 +m 5 15 +l 7 15 +l 7 13 +l 5 13 +l 5 15 +m 6 15 +l 6 13 +m 5 9 +l 7 9 +l 7 7 +l 5 7 +l 5 9 +m 6 9 +l 6 7 +m 5 3 +l 7 3 +l 7 1 +l 5 1 +l 5 3 +m 6 3 +l 6 1 +m 10 18 +l 12 18 +l 12 16 +l 10 16 +l 10 18 +m 11 18 +l 11 16 +m 10 12 +l 12 12 +l 12 10 +l 10 10 +l 10 12 +m 11 12 +l 11 10 +m 10 6 +l 12 6 +l 12 4 +l 10 4 +l 10 6 +m 11 6 +l 11 4 +m 10 0 +l 12 0 +l 12 -2 +l 10 -2 +l 10 0 +m 11 0 +l 11 -2 +m 15 21 +l 17 21 +l 17 19 +l 15 19 +l 15 21 +m 16 21 +l 16 19 +m 15 15 +l 17 15 +l 17 13 +l 15 13 +l 15 15 +m 16 15 +l 16 13 +m 15 9 +l 17 9 +l 17 7 +l 15 7 +l 15 9 +m 16 9 +l 16 7 +m 15 3 +l 17 3 +l 17 1 +l 15 1 +l 15 3 +m 16 3 +l 16 1 +m 5 -2 +l 5 -4 +l 7 -4 +l 7 -2 +l 5 -2 +m 6 -2 +l 6 -4 +m 15 -2 +l 15 -4 +l 17 -4 +l 17 -2 +l 15 -2 +m 16 -2 +l 16 -4 + +177 16 8 252 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 2 15 +l 4 15 +l 4 13 +l 2 13 +l 2 15 +m 3 15 +l 3 13 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 2 3 +l 4 3 +l 4 1 +l 2 1 +l 2 3 +m 3 3 +l 3 1 +m 4 18 +l 6 18 +l 6 16 +l 4 16 +l 4 18 +m 5 18 +l 5 16 +m 4 12 +l 6 12 +l 6 10 +l 4 10 +l 4 12 +m 5 12 +l 5 10 +m 4 6 +l 6 6 +l 6 4 +l 4 4 +l 4 6 +m 5 6 +l 5 4 +m 4 0 +l 6 0 +l 6 -2 +l 4 -2 +l 4 0 +m 5 0 +l 5 -2 +m 6 21 +l 8 21 +l 8 19 +l 6 19 +l 6 21 +m 7 21 +l 7 19 +m 6 15 +l 8 15 +l 8 13 +l 6 13 +l 6 15 +m 7 15 +l 7 13 +m 6 9 +l 8 9 +l 8 7 +l 6 7 +l 6 9 +m 7 9 +l 7 7 +m 6 3 +l 8 3 +l 8 1 +l 6 1 +l 6 3 +m 7 3 +l 7 1 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 10 15 +l 12 15 +l 12 13 +l 10 13 +l 10 15 +m 11 15 +l 11 13 +m 10 9 +l 12 9 +l 12 7 +l 10 7 +l 10 9 +m 11 9 +l 11 7 +m 10 3 +l 12 3 +l 12 1 +l 10 1 +l 10 3 +m 11 3 +l 11 1 +m 12 18 +l 14 18 +l 14 16 +l 12 16 +l 12 18 +m 13 18 +l 13 16 +m 12 12 +l 14 12 +l 14 10 +l 12 10 +l 12 12 +m 13 12 +l 13 10 +m 12 6 +l 14 6 +l 14 4 +l 12 4 +l 12 6 +m 13 6 +l 13 4 +m 12 0 +l 14 0 +l 14 -2 +l 12 -2 +l 12 0 +m 13 0 +l 13 -2 +m 14 21 +l 16 21 +l 16 19 +l 14 19 +l 14 21 +m 15 21 +l 15 19 +m 14 15 +l 16 15 +l 16 13 +l 14 13 +l 14 15 +m 15 15 +l 15 13 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 14 3 +l 16 3 +l 16 1 +l 14 1 +l 14 3 +m 15 3 +l 15 1 +m 2 -3 +l 2 -5 +l 4 -5 +l 4 -3 +l 2 -3 +m 3 -3 +l 3 -5 +m 6 -3 +l 6 -5 +l 8 -5 +l 8 -3 +l 6 -3 +m 7 -3 +l 7 -5 +m 10 -3 +l 10 -5 +l 12 -5 +l 12 -3 +l 10 -3 +m 11 -3 +l 11 -5 +m 14 -3 +l 14 -5 +l 16 -5 +l 16 -3 +l 14 -3 +m 15 -3 +l 15 -5 + +178 24 12 280 +m 0 21 +l 2 21 +l 2 19 +l 0 19 +l 0 21 +m 1 21 +l 1 19 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 12 19 +l 12 21 +l 14 21 +l 14 19 +l 12 19 +m 13 21 +l 13 19 +m 20 21 +l 22 21 +l 22 19 +l 20 19 +l 20 21 +m 21 21 +l 21 19 +m 22 21 +l 24 21 +l 24 19 +l 22 19 +l 22 21 +m 23 21 +l 23 19 +m 24 19 +l 24 21 +m 4 17 +l 6 17 +l 6 15 +l 4 15 +l 4 17 +m 5 17 +l 5 15 +m 6 17 +l 8 17 +l 8 15 +l 6 15 +l 6 17 +m 7 17 +l 7 15 +m 8 17 +l 10 17 +l 10 15 +l 8 15 +l 8 17 +m 9 17 +l 9 15 +m 18 17 +l 20 17 +l 20 15 +l 18 15 +l 18 17 +m 19 17 +l 19 15 +m 20 17 +l 22 17 +l 22 15 +l 20 15 +l 20 17 +m 21 17 +l 21 15 +m 22 17 +l 24 17 +l 24 15 +l 22 15 +l 22 17 +m 23 17 +l 23 15 +m 2 13 +l 4 13 +l 4 11 +l 0 11 +l 0 13 +l 2 13 +l 2 11 +m 1 13 +l 1 11 +m 3 13 +l 3 11 +m 10 13 +l 12 13 +l 12 11 +l 10 11 +l 10 13 +m 11 13 +l 11 11 +m 14 13 +l 14 11 +l 12 11 +l 12 13 +l 14 13 +m 13 13 +l 13 11 +m 20 13 +l 22 13 +l 22 11 +l 20 11 +l 20 13 +m 21 13 +l 21 11 +m 22 13 +l 24 13 +l 24 11 +l 22 11 +l 22 13 +m 23 13 +l 23 11 +m 24 11 +l 24 13 +m 2 9 +l 2 7 +l 0 7 +l 0 9 +l 4 9 +l 4 7 +l 2 7 +m 3 9 +l 3 7 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 16 9 +l 18 9 +l 18 7 +l 16 7 +l 16 9 +m 17 9 +l 17 7 +m 18 9 +l 20 9 +l 20 7 +l 18 7 +l 18 9 +m 19 9 +l 19 7 +m 1 9 +l 1 7 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 2 5 +l 4 5 +l 4 3 +l 2 3 +l 2 5 +l 0 5 +l 0 3 +l 2 3 +m 1 5 +l 1 3 +m 3 5 +l 3 3 +m 10 5 +l 12 5 +l 12 3 +l 10 3 +l 10 5 +m 11 5 +l 11 3 +m 12 5 +l 14 5 +l 14 3 +l 12 3 +l 12 5 +m 13 5 +l 13 3 +m 20 5 +l 22 5 +l 22 3 +l 20 3 +l 20 5 +m 21 5 +l 21 3 +m 22 5 +l 24 5 +l 24 3 +l 22 3 +l 22 5 +m 23 5 +l 23 3 +m 24 3 +l 24 5 +m 4 1 +l 10 1 +l 10 -1 +l 4 -1 +l 4 1 +m 5 1 +l 5 -1 +m 7 1 +l 7 -1 +m 9 1 +l 9 -1 +m 18 1 +l 24 1 +l 24 -1 +l 18 -1 +l 18 1 +m 19 1 +l 19 -1 +m 21 1 +l 21 -1 +m 23 1 +l 23 -1 +m 6 1 +l 6 -1 +m 8 1 +l 8 -1 +m 20 1 +l 20 -1 +m 22 1 +l 22 -1 +m 0 -3 +l 2 -3 +l 2 -5 +l 0 -5 +l 0 -3 +m 1 -3 +l 1 -5 +m 2 -3 +l 4 -3 +l 4 -5 +l 2 -5 +l 2 -3 +m 3 -3 +l 3 -5 +m 10 -3 +l 12 -3 +l 12 -5 +l 10 -5 +l 10 -3 +m 11 -3 +l 11 -5 +m 12 -3 +l 14 -3 +l 14 -5 +l 12 -5 +l 12 -3 +m 13 -3 +l 13 -5 +m 20 -3 +l 22 -3 +l 22 -5 +l 20 -5 +l 20 -3 +m 21 -3 +l 21 -5 +m 22 -3 +l 24 -3 +l 24 -5 +l 22 -5 +l 22 -3 +m 23 -3 +l 23 -5 + +179 4 2 2 +m 0 21 +l 0 -7 + +180 12 6 4 +m 8 21 +l 8 -7 +m 0 4 +l 8 4 + +181 12 6 6 +m 8 -7 +l 8 21 +m 0 10 +l 8 10 +m 0 4 +l 8 4 + +182 21 10 6 +m 8 21 +l 8 -7 +m 0 4 +l 8 4 +m 18 21 +l 18 -7 + +183 21 10 5 +m 0 4 +l 18 4 +l 18 -7 +m 8 4 +l 8 -7 + +184 11 5 5 +m 0 10 +l 8 10 +l 8 -7 +m 0 4 +l 8 4 + +185 21 10 8 +m 0 4 +l 8 4 +l 8 -7 +m 18 21 +l 18 -7 +m 8 21 +l 8 10 +l 0 10 + +186 21 10 4 +m 8 21 +l 8 -7 +m 18 21 +l 18 -7 + +187 21 10 6 +m 0 10 +l 18 10 +l 18 -7 +m 0 4 +l 8 4 +l 8 -7 + +188 21 10 6 +m 0 4 +l 18 4 +l 18 21 +m 0 10 +l 8 10 +l 8 21 + +189 21 10 5 +m 0 10 +l 18 10 +l 18 21 +m 8 10 +l 8 21 + +190 11 5 5 +m 0 4 +l 8 4 +l 8 21 +m 0 10 +l 8 10 + +191 11 5 3 +m 0 4 +l 8 4 +l 8 -7 + +192 8 4 3 +m 8 10 +l 0 10 +l 0 21 + +193 16 8 5 +m 8 21 +l 8 10 +l 0 10 +m 16 10 +l 8 10 + +194 16 8 5 +m 8 -7 +l 8 4 +l 0 4 +m 16 4 +l 8 4 + +195 8 4 4 +m 0 21 +l 0 -7 +m 8 4 +l 0 4 + +196 16 8 2 +m 0 4 +l 16 4 + +197 16 8 4 +m 8 21 +l 8 -7 +m 0 4 +l 16 4 + +198 8 4 6 +m 0 -7 +l 0 21 +m 8 10 +l 0 10 +m 8 4 +l 0 4 + +199 18 9 6 +m 10 21 +l 10 -7 +m 18 4 +l 10 4 +m 0 21 +l 0 -7 + +200 18 9 6 +m 18 4 +l 0 4 +l 0 21 +m 18 10 +l 10 10 +l 10 21 + +201 18 9 6 +m 18 10 +l 0 10 +l 0 -7 +m 18 4 +l 10 4 +l 10 -7 + +202 26 13 8 +m 8 21 +l 8 10 +l 0 10 +m 18 21 +l 18 10 +l 26 10 +m 0 4 +l 26 4 + +203 26 13 8 +m 8 -7 +l 8 4 +l 0 4 +m 18 -7 +l 18 4 +l 26 4 +m 0 10 +l 26 10 + +204 18 9 8 +m 18 4 +l 10 4 +l 10 -7 +m 0 21 +l 0 -7 +m 10 21 +l 10 10 +l 18 10 + +205 26 13 4 +m 0 10 +l 26 10 +m 0 4 +l 26 4 + +206 26 13 12 +m 0 4 +l 8 4 +l 8 -7 +m 8 21 +l 8 10 +l 0 10 +m 18 21 +l 18 10 +l 26 10 +m 18 -7 +l 18 4 +l 26 4 + +207 16 8 7 +m 8 21 +l 8 10 +l 0 10 +m 16 10 +l 8 10 +m 0 4 +l 16 4 + +208 18 9 6 +m 0 10 +l 18 10 +m 6 10 +l 6 21 +m 16 21 +l 16 10 + +209 16 8 7 +m 8 -7 +l 8 4 +l 0 4 +m 16 4 +l 8 4 +m 0 10 +l 16 10 + +210 18 9 6 +m 0 4 +l 18 4 +m 6 4 +l 6 -7 +m 16 -7 +l 16 4 + +211 18 9 5 +m 18 10 +l 0 10 +l 0 21 +m 10 10 +l 10 21 + +212 8 4 5 +m 8 4 +l 0 4 +l 0 21 +m 8 10 +l 0 10 + +213 8 4 5 +m 8 10 +l 0 10 +l 0 -7 +m 8 4 +l 0 4 + +214 18 9 5 +m 18 4 +l 0 4 +l 0 -7 +m 10 4 +l 10 -7 + +215 26 13 6 +m 8 21 +l 8 -7 +m 0 4 +l 26 4 +m 18 21 +l 18 -7 + +216 16 8 6 +m 8 -7 +l 8 21 +m 0 10 +l 16 10 +m 0 4 +l 16 4 + +217 11 5 3 +m 8 21 +l 8 4 +l 0 4 + +218 8 4 3 +m 0 -7 +l 0 10 +l 8 10 + +219 22 11 49 +m 0 21 +l 22 21 +l 22 0 +l 0 0 +l 0 21 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 4 21 +l 4 0 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 7 0 +l 7 21 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 0 +l 14 21 +m 15 21 +l 15 0 +m 16 21 +l 16 0 +m 18 21 +l 18 0 +m 19 21 +l 19 0 +m 20 21 +l 20 0 +m 21 21 +l 21 0 +m 3 21 +l 3 0 +m 10 21 +l 10 0 +m 17 21 +l 17 0 +m 0 11 +l 22 11 + +220 22 11 47 +m 22 0 +l 0 0 +l 0 11 +l 22 11 +l 22 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 11 +l 6 0 +m 7 11 +l 7 0 +m 8 0 +l 8 11 +m 9 11 +l 9 0 +m 10 11 +l 10 0 +m 11 11 +l 11 0 +m 12 11 +l 12 0 +m 13 11 +l 13 0 +m 14 11 +l 14 0 +m 15 11 +l 15 0 +m 16 0 +l 16 11 +m 17 11 +l 17 0 +m 18 11 +l 18 0 +m 19 11 +l 19 0 +m 20 11 +l 20 0 +m 21 11 +l 21 0 + +221 11 5 25 +m 0 0 +l 0 21 +l 11 21 +l 11 0 +l 0 0 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 4 21 +l 4 0 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 7 0 +l 7 21 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 3 21 +l 3 0 +m 10 21 +l 10 0 + +222 22 11 25 +m 11 0 +l 11 21 +l 22 21 +l 22 0 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 15 21 +l 15 0 +m 16 21 +l 16 0 +m 17 21 +l 17 0 +m 18 0 +l 18 21 +m 19 21 +l 19 0 +m 20 21 +l 20 0 +m 14 21 +l 14 0 +m 21 21 +l 21 0 + +223 22 11 47 +m 22 10 +l 0 10 +l 0 21 +l 22 21 +l 22 10 +m 1 21 +l 1 10 +m 2 21 +l 2 10 +m 3 21 +l 3 10 +m 4 21 +l 4 10 +m 5 21 +l 5 10 +m 6 21 +l 6 10 +m 7 21 +l 7 10 +m 8 10 +l 8 21 +m 9 21 +l 9 10 +m 10 21 +l 10 10 +m 11 21 +l 11 10 +m 12 21 +l 12 10 +m 13 21 +l 13 10 +m 14 21 +l 14 10 +m 15 21 +l 15 10 +m 16 10 +l 16 21 +m 17 21 +l 17 10 +m 18 21 +l 18 10 +m 19 21 +l 19 10 +m 20 21 +l 20 10 +m 21 21 +l 21 10 + +224 26 13 47 +m 6 12 +l 7 13 +l 5 14 +l 4 13 +l 2 12 +l 0 12 +l 2 11 +l 2 3 +l 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 6 2 +l 4 3 +l 4 11 +l 6 12 +l 9 13 +l 12 12 +l 17 2 +l 19 3 +l 21 2 +l 22 0 +l 21 1 +l 19 1 +l 18 0 +l 17 2 +m 6 13 +l 3 11 +l 3 3 +l 6 1 +m 6 2 +l 9 1 +l 12 2 +l 18 14 +l 19 13 +l 21 13 +l 22 14 +l 21 12 +l 19 11 +l 17 12 +m 20 2 +l 19 2 +l 18 1 +m 20 12 +l 19 12 +l 18 13 + +225 17 8 55 +m 3 0 +l 3 14 +l 0 12 +l 1 10 +l 1 -4 +l 3 -5 +l 4 -6 +l 6 -5 +l 5 -4 +l 3 -3 +l 3 0 +m 2 10 +l 2 13 +l 1 12 +l 2 10 +l 2 -3 +l 5 -5 +m 3 12 +l 6 14 +l 8 15 +l 10 14 +l 10 9 +m 10 2 +l 8 1 +l 6 2 +l 7 2 +l 9 3 +l 9 7 +l 6 8 +l 5 8 +m 6 14 +l 7 14 +l 9 13 +l 9 9 +l 11 9 +l 11 13 +l 13 14 +l 12 14 +l 10 15 +l 9 16 +l 8 15 +m 9 7 +l 11 7 +l 11 3 +l 13 2 +l 12 2 +l 10 1 +l 9 0 +l 8 1 +m 10 7 +l 10 3 +m 6 2 +l 3 2 +m 6 8 +l 9 9 + +226 22 11 41 +m 5 13 +l 4 15 +l 3 16 +l 1 17 +l 2 16 +l 3 14 +l 3 6 +l 0 4 +l 3 5 +l 3 0 +l 5 2 +l 5 13 +m 3 15 +l 4 13 +l 4 1 +m 3 11 +l 1 11 +l 0 10 +l 0 8 +l 1 9 +l 3 9 +l 3 11 +m 3 10 +l 1 10 +m 13 19 +l 7 17 +l 6 17 +l 4 18 +l 3 19 +l 4 17 +l 6 16 +l 8 16 +l 14 17 +l 17 17 +l 19 16 +l 17 18 +l 15 19 +l 13 19 +m 9 17 +l 13 18 +l 16 18 + +227 24 12 49 +m 9 14 +l 7 13 +l 4 12 +l 4 3 +l 2 2 +l 4 2 +l 6 1 +l 7 0 +l 9 1 +l 8 2 +l 6 3 +l 6 12 +l 9 14 +m 5 12 +l 5 3 +l 8 1 +m 20 14 +l 18 13 +l 15 12 +l 15 3 +l 13 2 +l 15 2 +l 17 1 +l 18 0 +l 20 1 +l 19 2 +l 17 3 +l 17 12 +l 20 14 +m 8 13 +l 12 12 +l 16 12 +l 16 3 +l 19 1 +m 15 11 +l 12 11 +l 6 13 +l 3 13 +l 1 12 +l 0 11 +l 1 13 +l 3 14 +l 7 14 +l 13 13 +l 17 13 +l 19 14 +l 17 12 +l 15 11 +l 14 11 + +228 20 10 45 +m 0 3 +l 3 1 +l 7 0 +l 12 0 +l 16 1 +l 14 3 +l 11 2 +l 4 2 +l 0 3 +l 2 7 +l 4 9 +l 6 10 +l 7 10 +l 4 12 +l 3 14 +l 2 17 +m 7 10 +l 4 8 +l 3 6 +l 2 3 +m 2 2 +l 5 1 +l 12 1 +l 15 2 +m 0 18 +l 3 20 +l 7 21 +l 12 21 +l 16 20 +l 14 18 +l 11 19 +l 4 19 +l 0 18 +l 1 15 +l 2 13 +l 4 11 +l 6 10 +m 2 19 +l 5 20 +l 12 20 +l 15 19 +m 1 17 +l 2 14 +m 1 3 +l 2 6 + +229 27 13 43 +m 4 8 +l 7 9 +l 9 10 +l 10 9 +l 12 8 +l 14 8 +l 12 7 +l 12 2 +l 10 2 +l 7 1 +l 6 2 +l 4 3 +l 4 8 +l 2 8 +l 2 3 +l 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +m 3 7 +l 3 3 +l 6 1 +m 10 2 +l 10 7 +l 8 8 +l 7 9 +m 11 3 +l 11 7 +l 8 9 +m 7 11 +l 11 12 +l 20 12 +l 22 11 +l 24 13 +l 22 14 +l 14 14 +l 11 13 +l 7 11 +l 2 8 +m 12 13 +l 21 13 +l 23 12 + +230 18 9 52 +m 7 2 +l 6 2 +l 4 3 +l 4 12 +l 2 14 +l 0 12 +l 1 12 +l 2 11 +l 2 3 +l 0 2 +l 1 2 +l 3 1 +l 4 0 +l 5 1 +l 7 2 +l 10 3 +m 1 13 +l 3 12 +l 3 2 +l 5 1 +m 10 14 +l 11 13 +l 13 12 +l 14 12 +l 12 11 +l 12 3 +l 13 2 +l 14 2 +l 12 0 +l 10 2 +l 10 11 +l 8 12 +l 10 14 +m 9 13 +l 11 12 +l 11 2 +l 12 1 +m 5 -8 +l 5 -9 +l 4 -9 +l 5 -8 +l 5 -7 +l 3 -3 +l 3 1 +m 2 1 +l 2 -3 +l 4 -5 +m 4 0 +l 4 -3 +l 5 -7 +m 3 3 +l 3 2 + +231 28 14 51 +m 17 7 +l 20 13 +l 22 14 +l 24 14 +l 25 13 +l 24 13 +l 22 12 +l 18 7 +l 14 7 +l 14 -1 +l 15 -2 +l 16 -2 +l 14 -4 +l 12 -2 +l 12 7 +l 10 8 +l 9 8 +l 11 9 +l 12 10 +l 13 9 +l 15 8 +l 16 8 +l 14 7 +m 2 7 +l 1 9 +l 1 11 +l 2 12 +l 4 13 +l 9 13 +l 10 12 +l 11 10 +l 12 10 +m 4 13 +l 1 12 +l 0 11 +l 0 9 +l 3 5 +l 2 8 +l 2 10 +l 3 11 +l 5 12 +l 9 12 +l 10 10 +l 11 9 +l 13 8 +l 13 -2 +l 14 -3 +m 18 8 +l 20 11 +l 22 13 +l 23 13 + +232 19 9 42 +m 5 10 +l 8 11 +l 10 12 +l 11 11 +l 13 10 +l 15 10 +l 13 9 +l 13 4 +l 11 4 +l 8 3 +l 7 4 +l 5 5 +l 5 10 +l 3 10 +l 3 5 +l 1 4 +l 3 4 +l 5 3 +l 6 2 +l 8 3 +l 8 -4 +m 4 9 +l 4 5 +l 7 3 +m 11 4 +l 11 9 +l 9 10 +l 8 11 +l 8 19 +m 12 5 +l 12 9 +l 9 11 +m 16 20 +l 16 19 +l 0 19 +l 0 20 +l 16 20 +m 16 -4 +l 16 -5 +l 0 -5 +l 0 -4 +l 16 -4 + +233 24 12 58 +m 6 1 +l 4 3 +l 3 5 +l 2 8 +l 2 14 +l 3 17 +l 4 19 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 8 0 +l 12 0 +l 16 2 +l 18 4 +l 19 6 +l 20 9 +l 20 13 +l 19 16 +l 18 18 +l 16 20 +l 14 21 +l 10 21 +l 10 20 +l 13 20 +l 15 19 +l 17 16 +l 18 14 +l 18 8 +l 17 5 +l 16 3 +l 14 1 +m 2 17 +l 1 14 +l 1 8 +l 2 5 +m 18 5 +l 19 8 +l 19 14 +l 17 18 +l 16 19 +m 5 12 +l 2 12 +l 4 11 +l 8 10 +l 12 10 +l 16 11 +l 20 13 +l 15 12 +l 5 12 +l 9 11 +l 13 11 +l 17 12 + +234 24 12 70 +m 6 20 +l 4 18 +l 3 16 +l 2 13 +l 2 12 +l 3 9 +l 4 7 +l 6 5 +l 4 6 +l 2 8 +l 0 12 +l 1 15 +l 2 17 +l 4 19 +l 8 21 +l 12 21 +l 16 19 +l 18 17 +l 19 15 +l 20 12 +l 18 8 +l 16 6 +l 14 5 +l 13 6 +l 15 7 +l 17 10 +l 18 12 +l 18 13 +l 17 16 +l 16 18 +l 14 20 +l 12 21 +m 2 9 +l 1 12 +l 1 13 +l 2 16 +m 18 16 +l 19 13 +l 19 12 +l 17 8 +l 16 7 +m 12 2 +l 15 2 +l 17 1 +l 19 2 +l 17 0 +l 14 0 +l 12 1 +l 12 2 +m 13 1 +l 16 1 +m 13 6 +l 13 2 +m 14 5 +l 14 2 +m 7 2 +l 4 2 +l 2 1 +l 0 2 +l 2 0 +l 5 0 +l 7 1 +l 7 2 +m 6 1 +l 3 1 +m 4 7 +l 6 6 +l 6 2 +m 5 6 +l 5 2 + +235 21 10 47 +m 4 8 +l 7 9 +l 9 10 +l 10 9 +l 12 8 +l 14 8 +l 12 7 +l 12 2 +l 10 2 +l 7 1 +l 6 2 +l 4 3 +l 4 8 +l 2 8 +l 2 3 +l 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +m 3 7 +l 3 3 +l 6 1 +m 10 2 +l 10 7 +l 8 8 +l 7 9 +l 0 18 +l 4 19 +l 13 19 +l 15 18 +l 17 20 +l 15 21 +l 7 21 +l 4 20 +l 0 18 +l 9 10 +m 11 3 +l 11 7 +l 8 9 +l 1 17 +m 5 20 +l 14 20 +l 16 19 +m 12 7 +l 9 9 +l 0 18 + +236 27 13 58 +m 4 8 +l 7 9 +l 10 9 +l 12 8 +l 14 8 +l 12 7 +l 12 2 +l 10 2 +l 7 1 +l 6 2 +l 4 3 +l 4 8 +l 2 8 +l 2 3 +l 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +m 3 7 +l 3 3 +l 6 1 +m 10 2 +l 10 7 +l 8 8 +l 7 9 +m 16 1 +l 19 2 +l 21 2 +l 21 7 +l 23 8 +l 21 8 +l 19 9 +l 16 9 +l 13 8 +l 13 3 +l 15 2 +l 16 1 +l 14 0 +l 13 1 +l 11 2 +l 9 2 +l 11 3 +l 11 7 +l 8 9 +m 13 8 +l 11 8 +l 11 3 +m 12 7 +l 12 3 +l 15 1 +m 19 2 +l 19 7 +l 17 8 +l 16 9 +m 20 3 +l 20 7 +l 17 9 + +237 18 9 35 +m 7 1 +l 6 2 +l 4 3 +l 4 12 +l 2 12 +l 2 3 +l 0 2 +l 2 2 +l 4 1 +l 5 0 +l 7 1 +l 10 2 +l 12 2 +l 12 11 +l 14 12 +l 12 12 +l 10 13 +l 9 14 +l 7 13 +l 8 12 +l 10 11 +l 10 2 +m 3 11 +l 3 3 +l 6 1 +m 4 12 +l 7 13 +m 8 13 +l 11 11 +l 11 3 +m 3 -2 +l 13 16 +l 14 16 +l 4 -2 +l 3 -2 + +238 14 7 45 +m 1 17 +l 2 18 +l 4 19 +l 6 19 +l 8 18 +l 10 20 +l 7 21 +l 5 21 +l 3 20 +l 2 19 +l 1 17 +l 0 14 +l 0 7 +l 1 4 +l 2 2 +l 3 1 +l 5 0 +l 7 0 +l 10 1 +l 8 3 +l 6 2 +l 4 2 +l 2 3 +l 1 4 +m 3 2 +l 5 1 +l 7 1 +l 9 2 +m 3 19 +l 5 20 +l 7 20 +l 9 19 +m 1 11 +l 2 10 +l 4 10 +l 5 11 +l 7 9 +l 5 8 +l 3 8 +l 2 9 +l 1 11 +l 0 14 +m 3 9 +l 5 9 +l 6 10 + +239 24 12 54 +m 20 2 +l 18 0 +l 16 0 +l 13 1 +l 11 0 +l 13 2 +l 15 2 +l 18 1 +l 20 2 +m 17 1 +l 14 1 +m 17 4 +l 18 6 +l 19 9 +l 19 13 +l 18 16 +l 17 18 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 21 +l 0 19 +l 1 19 +l 2 17 +l 2 3 +l 0 2 +l 2 1 +l 3 0 +l 5 2 +l 4 3 +l 4 18 +l 7 19 +l 11 19 +l 14 18 +l 16 16 +l 17 14 +l 18 11 +l 18 8 +l 16 2 +l 17 4 +m 18 13 +l 17 16 +l 14 19 +l 11 20 +l 8 20 +m 3 3 +l 2 2 +l 3 1 +l 4 2 +l 3 3 +l 3 18 +l 1 20 + +240 21 10 15 +m 0 8 +l 17 8 +l 17 7 +l 0 7 +l 0 8 +m 0 4 +l 17 4 +l 17 3 +l 0 3 +l 0 4 +m 0 12 +l 17 12 +l 17 11 +l 0 11 +l 0 12 + +241 21 10 15 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 +m 8 21 +l 8 4 +l 9 4 +l 9 21 +l 8 21 +m 0 13 +l 17 13 +l 17 12 +l 0 12 +l 0 13 + +242 21 10 8 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 +m 0 21 +l 16 12 +l 0 3 + +243 21 10 8 +m 17 1 +l 0 1 +l 0 0 +l 17 0 +l 17 1 +m 17 21 +l 1 12 +l 17 3 + +244 14 7 18 +m 5 21 +l 3 20 +l 2 19 +l 1 16 +l 1 -7 +l 0 -7 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 9 20 +l 10 18 +l 10 17 +l 9 17 +l 9 18 +l 8 20 +l 6 21 + +245 14 7 18 +m 5 -7 +l 7 -6 +l 8 -5 +l 9 -2 +l 9 21 +l 10 21 +l 10 -3 +l 9 -5 +l 8 -6 +l 6 -7 +l 3 -7 +l 1 -6 +l 0 -4 +l 0 -3 +l 1 -3 +l 1 -4 +l 2 -6 +l 4 -7 + +246 21 10 23 +m 0 10 +l 17 10 +l 17 9 +l 0 9 +l 0 10 +m 8 21 +l 6 19 +l 8 18 +l 10 19 +l 8 21 +m 8 20 +l 7 19 +l 9 19 +l 8 20 +m 8 3 +l 6 1 +l 8 0 +l 10 1 +l 8 3 +m 8 2 +l 7 1 +l 9 1 +l 8 2 + +247 21 10 16 +m 10 12 +l 7 14 +l 0 13 +l 7 16 +l 12 12 +l 17 15 +l 12 11 +l 7 14 +m 10 7 +l 7 9 +l 0 8 +l 7 11 +l 12 7 +l 17 10 +l 12 6 +l 7 9 + +248 17 8 30 +m 4 19 +l 7 20 +l 9 21 +l 10 20 +l 12 19 +l 14 19 +l 12 18 +l 12 13 +l 10 13 +l 7 12 +l 6 13 +l 4 14 +l 4 19 +l 2 19 +l 2 14 +l 0 13 +l 2 13 +l 4 12 +l 5 11 +l 7 12 +m 3 18 +l 3 14 +l 6 12 +m 10 13 +l 10 18 +l 8 19 +l 7 20 +m 11 14 +l 11 18 +l 8 20 + +249 6 3 11 +m 0 0 +l 3 0 +l 3 4 +l 0 4 +l 0 0 +m 1 4 +l 1 0 +m 2 4 +l 2 0 +m 0 2 +l 3 2 + +250 6 3 9 +m 0 0 +l 3 0 +l 3 2 +l 0 2 +l 0 0 +m 2 2 +l 2 0 +m 1 2 +l 1 0 + +251 26 13 4 +m 0 11 +l 11 0 +l 11 21 +l 23 21 + +252 18 9 29 +m 4 11 +l 4 19 +l 2 21 +l 0 19 +l 1 19 +l 2 18 +l 2 11 +l 4 11 +m 2 20 +l 3 19 +l 3 11 +m 4 18 +l 7 19 +l 9 20 +l 10 21 +l 11 20 +l 13 19 +l 14 19 +l 12 18 +l 12 11 +l 10 11 +l 10 18 +l 8 19 +l 7 19 +m 9 20 +l 11 19 +l 11 11 +m 2 12 +l 3 12 + +253 18 9 37 +m 6 9 +l 8 10 +l 11 10 +l 15 9 +l 13 7 +l 10 8 +l 7 8 +l 3 7 +l 6 9 +l 11 9 +l 14 8 +m 3 7 +l 3 10 +l 4 12 +l 8 14 +l 15 14 +l 15 18 +l 13 18 +l 13 14 +m 14 18 +l 14 14 +m 13 18 +l 10 20 +l 9 19 +l 7 18 +l 6 18 +l 5 19 +l 4 21 +l 6 20 +l 7 20 +l 8 21 +l 10 20 +m 4 21 +l 6 19 +l 7 19 +l 9 20 +l 8 20 + +254 14 7 25 +m 0 0 +l 0 11 +l 11 11 +l 11 0 +l 0 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 11 +l 6 0 +m 7 11 +l 7 0 +m 8 0 +l 8 11 +m 9 11 +l 9 0 +m 10 11 +l 10 0 diff --git a/cd/etc/vectorfont22.txt b/cd/etc/vectorfont22.txt new file mode 100755 index 0000000..924c283 --- /dev/null +++ b/cd/etc/vectorfont22.txt @@ -0,0 +1,5646 @@ +Little complex II +28 28 14 -7 + + +32 18 9 0 + +33 7 3 12 +m 1 21 +l 0 19 +l 1 7 +l 2 19 +l 1 21 +m 1 19 +l 1 13 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +34 15 7 8 +m 1 21 +l 0 14 +m 2 21 +l 0 14 +m 9 21 +l 8 14 +m 10 21 +l 8 14 + +35 20 10 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 19 9 38 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 13 18 +l 12 17 +l 13 16 +l 14 17 +l 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 14 7 +m 0 16 +l 2 14 +l 4 13 +l 10 11 +l 12 10 +l 13 9 +l 14 7 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 +l 0 4 +l 1 5 +l 2 4 +l 1 3 + +37 23 11 29 +m 18 21 +l 0 0 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 24 12 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 7 3 4 +m 1 21 +l 0 14 +m 2 21 +l 0 14 + +40 12 6 18 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 +m 5 23 +l 3 19 +l 2 16 +l 1 11 +l 1 7 +l 2 2 +l 3 -1 +l 5 -5 + +41 12 6 18 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 +m 2 23 +l 4 19 +l 5 16 +l 6 11 +l 6 7 +l 5 2 +l 4 -1 +l 2 -5 + +42 15 7 6 +m 5 12 +l 5 0 +m 0 9 +l 10 3 +m 10 9 +l 0 3 + +43 23 11 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 7 3 7 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +45 23 11 2 +m 0 9 +l 18 9 + +46 7 3 5 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +47 25 12 6 +m 19 17 +l 2 0 +l 0 0 +l 21 21 +l 23 21 +l 19 17 + +48 19 9 37 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 +m 6 21 +l 4 20 +l 3 19 +l 2 17 +l 1 12 +l 1 9 +l 2 4 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 4 +l 13 9 +l 13 12 +l 12 17 +l 11 19 +l 10 20 +l 8 21 + +49 14 7 8 +m 0 17 +l 2 18 +l 5 21 +l 5 0 +m 4 20 +l 4 0 +m 0 0 +l 9 0 + +50 19 9 41 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 10 11 +l 5 9 +l 3 8 +l 1 6 +l 0 3 +l 0 0 +m 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 9 11 +l 5 9 +m 0 2 +l 1 3 +l 3 3 +l 8 1 +l 11 1 +l 13 2 +l 14 3 +l 14 5 +m 3 3 +l 8 0 +l 12 0 +l 13 1 +l 14 3 + +51 19 9 43 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 18 +l 13 15 +l 12 13 +l 9 12 +l 6 12 +m 9 21 +l 11 20 +l 12 18 +l 12 15 +l 11 13 +l 9 12 +m 9 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 12 10 +l 13 7 +l 13 4 +l 12 2 +l 11 1 +l 9 0 + +52 21 10 8 +m 10 19 +l 10 0 +m 16 6 +l 0 6 +l 11 21 +l 11 0 +m 7 0 +l 14 0 + +53 19 9 34 +m 2 21 +l 0 11 +m 0 11 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 8 14 +l 10 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 10 1 +l 8 0 +m 2 21 +l 12 21 +m 2 20 +l 7 20 +l 12 21 + +54 19 9 45 +m 12 18 +l 11 17 +l 12 16 +l 13 17 +l 13 18 +l 12 20 +l 10 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 7 +l 13 10 +l 11 12 +l 8 13 +l 7 13 +l 4 12 +l 2 10 +l 1 7 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 8 13 + +55 19 9 26 +m 0 21 +l 0 15 +m 0 17 +l 1 19 +l 3 21 +l 5 21 +l 10 18 +l 12 18 +l 13 19 +l 14 21 +m 1 19 +l 3 20 +l 5 20 +l 10 18 +m 14 21 +l 14 18 +l 13 15 +l 9 10 +l 8 8 +l 7 5 +l 7 0 +m 13 15 +l 8 10 +l 7 8 +l 6 5 +l 6 0 + +56 19 9 57 +m 5 21 +l 2 20 +l 1 18 +l 1 15 +l 2 13 +l 5 12 +l 9 12 +l 12 13 +l 13 15 +l 13 18 +l 12 20 +l 9 21 +l 5 21 +m 5 21 +l 3 20 +l 2 18 +l 2 15 +l 3 13 +l 5 12 +m 9 12 +l 11 13 +l 12 15 +l 12 18 +l 11 20 +l 9 21 +m 5 12 +l 2 11 +l 1 10 +l 0 8 +l 0 4 +l 1 2 +l 2 1 +l 5 0 +l 9 0 +l 12 1 +l 13 2 +l 14 4 +l 14 8 +l 13 10 +l 12 11 +l 9 12 +m 5 12 +l 3 11 +l 2 10 +l 1 8 +l 1 4 +l 2 2 +l 3 1 +l 5 0 +m 9 0 +l 11 1 +l 12 2 +l 13 4 +l 13 8 +l 12 10 +l 11 11 +l 9 12 + +57 19 9 45 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 8 21 +l 11 20 +l 13 18 +l 14 15 +l 14 9 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 4 0 +l 2 1 +l 1 3 +l 1 4 +l 2 5 +l 3 4 +l 2 3 +m 6 8 +l 4 9 +l 2 11 +l 1 14 +l 1 15 +l 2 18 +l 4 20 +l 6 21 +m 8 21 +l 10 20 +l 12 18 +l 13 15 +l 13 9 +l 12 5 +l 11 3 +l 9 1 +l 7 0 + +58 7 3 10 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 7 3 12 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +60 21 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 23 11 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 21 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 17 8 29 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 10 20 +l 11 19 +l 12 17 +l 12 15 +l 11 13 +l 10 12 +l 6 10 +l 6 7 +m 7 21 +l 9 20 +l 10 19 +l 11 17 +l 11 15 +l 10 13 +l 8 11 +m 6 2 +l 5 1 +l 6 0 +l 7 1 +l 6 2 + +64 26 13 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 23 11 12 +m 9 21 +l 2 0 +m 9 21 +l 16 0 +m 9 18 +l 15 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +66 22 11 39 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 14 12 +l 12 11 +m 4 11 +l 12 11 +l 15 10 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 0 0 +m 12 11 +l 14 10 +l 15 9 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 12 0 + +67 20 10 30 +m 14 18 +l 15 15 +l 15 21 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +l 5 1 +l 7 0 + +68 22 11 26 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 10 21 +l 13 20 +l 15 18 +l 16 16 +l 17 13 +l 17 8 +l 16 5 +l 15 3 +l 13 1 +l 10 0 +l 0 0 +m 10 21 +l 12 20 +l 14 18 +l 15 16 +l 16 13 +l 16 8 +l 15 5 +l 14 3 +l 12 1 +l 10 0 + +69 21 10 16 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 10 15 +l 10 7 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 4 11 +l 10 11 +m 0 0 +l 16 0 +l 16 6 +l 15 0 + +70 21 10 14 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 10 15 +l 10 7 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 4 11 +l 10 11 +m 0 0 +l 7 0 + +71 23 11 35 +m 14 18 +l 15 15 +l 15 21 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 14 8 +l 14 0 +m 15 8 +l 15 0 +m 11 8 +l 18 8 + +72 25 12 18 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 16 21 +l 16 0 +m 17 21 +l 17 0 +m 0 21 +l 7 21 +m 13 21 +l 20 21 +m 4 11 +l 16 11 +m 0 0 +l 7 0 +m 13 0 +l 20 0 + +73 12 6 8 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 7 21 +m 0 0 +l 7 0 + +74 16 8 17 +m 8 21 +l 8 4 +l 7 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 7 21 +l 7 4 +l 6 1 +l 5 0 +m 4 21 +l 11 21 + +75 24 12 18 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 17 21 +l 4 8 +m 9 12 +l 17 0 +m 8 12 +l 16 0 +m 0 21 +l 7 21 +m 13 21 +l 19 21 +m 0 0 +l 7 0 +m 13 0 +l 19 0 + +76 20 10 10 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 7 21 +m 0 0 +l 15 0 +l 15 6 +l 14 0 + +77 26 13 20 +m 3 21 +l 3 0 +m 4 21 +l 10 3 +m 3 21 +l 10 0 +m 17 21 +l 10 0 +m 17 21 +l 17 0 +m 18 21 +l 18 0 +m 0 21 +l 4 21 +m 17 21 +l 21 21 +m 0 0 +l 6 0 +m 14 0 +l 21 0 + +78 24 12 14 +m 3 21 +l 3 0 +m 4 21 +l 16 2 +m 4 19 +l 16 0 +m 16 21 +l 16 0 +m 0 21 +l 4 21 +m 13 21 +l 19 21 +m 0 0 +l 6 0 + +79 21 10 41 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 9 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 5 +l 15 9 +l 15 12 +l 14 16 +l 13 18 +l 11 20 +l 9 21 + +80 22 11 24 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 14 +l 16 12 +l 15 11 +l 12 10 +l 4 10 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 14 +l 15 12 +l 14 11 +l 12 10 +m 0 0 +l 7 0 + +81 21 10 59 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 9 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 5 +l 15 9 +l 15 12 +l 14 16 +l 13 18 +l 11 20 +l 9 21 +m 4 2 +l 4 3 +l 5 5 +l 7 6 +l 8 6 +l 10 5 +l 11 3 +l 12 -4 +l 13 -5 +l 15 -5 +l 16 -3 +l 16 -2 +m 11 3 +l 12 -1 +l 13 -3 +l 14 -4 +l 15 -4 +l 16 -3 + +82 23 11 38 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +l 4 11 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 14 12 +l 12 11 +m 0 0 +l 7 0 +m 9 11 +l 11 10 +l 12 9 +l 15 2 +l 16 1 +l 17 1 +l 18 2 +m 11 10 +l 12 8 +l 14 1 +l 15 0 +l 17 0 +l 18 2 +l 18 3 + +83 19 9 32 +m 13 18 +l 14 21 +l 14 15 +l 13 18 +l 11 20 +l 8 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 14 7 +m 0 16 +l 2 14 +l 4 13 +l 10 11 +l 12 10 +l 13 9 +l 14 7 +l 14 3 +l 12 1 +l 9 0 +l 6 0 +l 3 1 +l 1 3 +l 0 6 +l 0 0 +l 1 3 + +84 20 10 12 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 1 21 +l 0 15 +l 0 21 +l 15 21 +l 15 15 +l 14 21 +m 4 0 +l 11 0 + +85 25 12 19 +m 3 21 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 21 +m 4 21 +l 4 6 +l 5 3 +l 7 1 +l 9 0 +m 0 21 +l 7 21 +m 14 21 +l 20 21 + +86 23 11 10 +m 2 21 +l 9 0 +m 3 21 +l 9 3 +m 16 21 +l 9 0 +m 0 21 +l 6 21 +m 12 21 +l 18 21 + +87 27 13 16 +m 3 21 +l 7 0 +m 4 21 +l 7 5 +m 11 21 +l 7 0 +m 11 21 +l 15 0 +m 12 21 +l 15 5 +m 19 21 +l 15 0 +m 0 21 +l 7 21 +m 16 21 +l 22 21 + +88 23 11 14 +m 2 21 +l 15 0 +m 3 21 +l 16 0 +m 16 21 +l 2 0 +m 0 21 +l 6 21 +m 12 21 +l 18 21 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +89 24 12 14 +m 2 21 +l 9 10 +l 9 0 +m 3 21 +l 10 10 +l 10 0 +m 17 21 +l 10 10 +m 0 21 +l 6 21 +m 13 21 +l 19 21 +m 6 0 +l 13 0 + +90 19 9 12 +m 13 21 +l 0 0 +m 14 21 +l 1 0 +m 1 21 +l 0 15 +l 0 21 +l 14 21 +m 0 0 +l 14 0 +l 14 6 +l 13 0 + +91 12 6 8 +m 0 25 +l 0 -7 +m 1 25 +l 1 -7 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +92 27 13 6 +m 4 17 +l 21 0 +l 23 0 +l 2 21 +l 0 21 +l 4 17 + +93 12 6 8 +m 6 25 +l 6 -7 +m 7 25 +l 7 -7 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +94 21 10 5 +m 0 16 +l 8 21 +l 16 16 +l 8 20 +l 0 16 + +95 23 11 2 +m 1 -7 +l 18 -7 + +96 7 3 7 +m 0 21 +l 1 20 +l 2 18 +l 2 16 +l 1 15 +l 0 16 +l 1 17 + +97 20 10 35 +m 2 12 +l 2 11 +l 1 11 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +m 11 12 +l 11 3 +l 12 1 +l 14 0 +l 15 0 +m 11 10 +l 10 9 +l 4 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 11 3 +m 4 8 +l 2 7 +l 1 5 +l 1 3 +l 2 1 +l 4 0 + +98 21 10 28 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 4 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 8 0 +l 6 1 +l 4 3 +m 10 14 +l 12 13 +l 14 11 +l 15 8 +l 15 6 +l 14 3 +l 12 1 +l 10 0 +m 0 21 +l 4 21 + +99 18 9 26 +m 12 11 +l 11 10 +l 12 9 +l 13 10 +l 13 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 + +100 21 10 30 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 12 11 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 10 1 +l 12 3 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 9 21 +l 13 21 +m 12 0 +l 16 0 + +101 18 9 28 +m 1 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 8 +l 12 11 +l 11 13 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 + +102 14 7 18 +m 8 20 +l 7 19 +l 8 18 +l 9 19 +l 9 20 +l 8 21 +l 6 21 +l 4 20 +l 3 18 +l 3 0 +m 6 21 +l 5 20 +l 4 18 +l 4 0 +m 0 14 +l 8 14 +m 0 0 +l 7 0 + +103 19 9 54 +m 6 14 +l 4 13 +l 3 12 +l 2 10 +l 2 8 +l 3 6 +l 4 5 +l 6 4 +l 8 4 +l 10 5 +l 11 6 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 6 14 +m 4 13 +l 3 11 +l 3 7 +l 4 5 +m 10 5 +l 11 7 +l 11 11 +l 10 13 +m 11 12 +l 12 13 +l 14 14 +l 14 13 +l 12 13 +m 3 6 +l 2 5 +l 1 3 +l 1 2 +l 2 0 +l 5 -1 +l 10 -1 +l 13 -2 +l 14 -3 +m 1 2 +l 2 1 +l 5 0 +l 10 0 +l 13 -1 +l 14 -3 +l 14 -4 +l 13 -6 +l 10 -7 +l 4 -7 +l 1 -6 +l 0 -4 +l 0 -3 +l 1 -1 +l 4 0 + +104 23 11 21 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 0 21 +l 4 21 +m 0 0 +l 7 0 +m 11 0 +l 18 0 + +105 12 6 13 +m 3 21 +l 2 20 +l 3 19 +l 4 20 +l 3 21 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 0 14 +l 4 14 +m 0 0 +l 7 0 + +106 11 5 21 +m 5 21 +l 4 20 +l 5 19 +l 6 20 +l 5 21 +m 6 14 +l 6 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -5 +l 1 -4 +l 2 -5 +l 1 -6 +m 5 14 +l 5 -4 +l 4 -6 +l 3 -7 +m 2 14 +l 6 14 + +107 22 11 18 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 14 14 +l 4 4 +m 9 8 +l 15 0 +m 8 8 +l 14 0 +m 0 21 +l 4 21 +m 11 14 +l 17 14 +m 0 0 +l 7 0 +m 11 0 +l 17 0 + +108 12 6 8 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 21 +l 4 21 +m 0 0 +l 7 0 + +109 34 17 34 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 15 11 +l 17 13 +l 20 14 +l 22 14 +l 25 13 +l 26 11 +l 26 0 +m 22 14 +l 24 13 +l 25 11 +l 25 0 +m 0 14 +l 4 14 +m 0 0 +l 7 0 +m 11 0 +l 18 0 +m 22 0 +l 29 0 + +110 23 11 21 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 0 14 +l 4 14 +m 0 0 +l 7 0 +m 11 0 +l 18 0 + +111 19 9 33 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 + +112 21 10 30 +m 3 14 +l 3 -7 +m 4 14 +l 4 -7 +m 4 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 8 0 +l 6 1 +l 4 3 +m 10 14 +l 12 13 +l 14 11 +l 15 8 +l 15 6 +l 14 3 +l 12 1 +l 10 0 +m 0 14 +l 4 14 +m 0 -7 +l 7 -7 + +113 21 10 28 +m 12 14 +l 12 -7 +m 13 14 +l 13 -7 +m 12 11 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 10 1 +l 12 3 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 9 -7 +l 16 -7 + +114 18 9 18 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 4 8 +l 5 11 +l 7 13 +l 9 14 +l 12 14 +l 13 13 +l 13 12 +l 12 11 +l 11 12 +l 12 13 +m 0 14 +l 4 14 +m 0 0 +l 7 0 + +115 16 8 30 +m 10 12 +l 11 14 +l 11 10 +l 10 12 +l 9 13 +l 7 14 +l 3 14 +l 1 13 +l 0 12 +l 0 10 +l 1 9 +l 3 8 +l 8 6 +l 10 5 +l 11 4 +m 0 11 +l 1 10 +l 3 9 +l 8 7 +l 10 6 +l 11 5 +l 11 2 +l 10 1 +l 8 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 +l 0 0 +l 1 2 + +116 16 8 13 +m 6 0 +l 5 1 +l 4 4 +l 4 21 +l 3 21 +l 3 4 +l 4 1 +l 6 0 +l 8 0 +l 10 1 +l 11 3 +m 0 14 +l 8 14 + +117 23 11 21 +m 3 14 +l 3 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 4 14 +l 4 3 +l 5 1 +l 7 0 +m 14 14 +l 14 0 +m 15 14 +l 15 0 +m 0 14 +l 4 14 +m 11 14 +l 15 14 +m 14 0 +l 18 0 + +118 21 10 10 +m 2 14 +l 8 0 +m 3 14 +l 8 2 +m 14 14 +l 8 0 +m 0 14 +l 6 14 +m 10 14 +l 16 14 + +119 27 13 16 +m 3 14 +l 7 0 +m 4 14 +l 7 3 +m 11 14 +l 7 0 +m 11 14 +l 15 0 +m 12 14 +l 15 3 +m 19 14 +l 15 0 +m 0 14 +l 7 14 +m 16 14 +l 22 14 + +120 21 10 14 +m 2 14 +l 13 0 +m 3 14 +l 14 0 +m 14 14 +l 2 0 +m 0 14 +l 6 14 +m 10 14 +l 16 14 +m 0 0 +l 6 0 +m 10 0 +l 16 0 + +121 21 10 17 +m 2 14 +l 8 0 +m 3 14 +l 8 2 +m 14 14 +l 8 0 +l 6 -4 +l 4 -6 +l 2 -7 +l 1 -7 +l 0 -6 +l 1 -5 +l 2 -6 +m 0 14 +l 6 14 +m 10 14 +l 16 14 + +122 17 8 12 +m 11 14 +l 0 0 +m 12 14 +l 1 0 +m 1 14 +l 0 10 +l 0 14 +l 12 14 +m 0 0 +l 12 0 +l 12 4 +l 11 0 + +123 10 5 37 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +m 3 24 +l 2 22 +l 2 20 +l 3 18 +l 4 17 +l 5 15 +l 5 13 +l 4 11 +l 0 9 +l 4 7 +l 5 5 +l 5 3 +l 4 1 +l 3 0 +l 2 -2 +l 2 -4 +l 3 -6 +m 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 5 2 2 +m 0 25 +l 0 -6 + +125 10 5 37 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +m 2 24 +l 3 22 +l 3 20 +l 2 18 +l 1 17 +l 0 15 +l 0 13 +l 1 11 +l 5 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 2 0 +l 3 -2 +l 3 -4 +l 2 -6 +m 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 23 11 22 +m 0 13 +l 0 15 +l 1 18 +l 3 19 +l 5 19 +l 7 18 +l 11 15 +l 13 14 +l 15 14 +l 17 15 +l 18 17 +m 0 15 +l 1 17 +l 3 18 +l 5 18 +l 7 17 +l 11 14 +l 13 13 +l 15 13 +l 17 14 +l 18 17 +l 18 19 + +127 16 8 6 +m 12 0 +l 12 8 +l 6 17 +l 0 8 +l 0 0 +l 12 0 + +128 20 10 52 +m 14 19 +l 15 16 +l 15 22 +l 14 19 +l 12 21 +l 9 22 +l 7 22 +l 4 21 +l 2 19 +l 1 17 +l 0 14 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 7 1 +l 9 1 +l 12 2 +l 14 4 +l 15 6 +m 7 22 +l 5 21 +l 3 19 +l 2 17 +l 1 14 +l 1 9 +l 2 6 +l 3 4 +l 5 2 +l 7 1 +m 8 1 +l 8 0 +l 11 -1 +l 12 -2 +l 13 -4 +l 12 -6 +l 11 -7 +l 8 -8 +l 5 -8 +l 3 -7 +l 2 -6 +l 1 -4 +l 1 -3 +l 2 -2 +l 3 -3 +l 2 -4 +m 9 0 +l 11 -2 +l 12 -4 +l 11 -6 +l 10 -7 +l 8 -8 + +129 23 11 28 +m 3 14 +l 3 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 0 14 +l 4 14 +l 4 3 +l 5 1 +l 7 0 +m 14 14 +l 14 0 +l 18 0 +m 11 14 +l 15 14 +l 15 0 +m 4 18 +l 3 17 +l 4 16 +l 5 17 +l 4 18 +m 13 18 +l 12 17 +l 13 16 +l 14 17 +l 13 18 + +130 18 9 35 +m 6 0 +l 4 1 +l 2 3 +l 1 6 +l 1 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 8 +l 12 11 +l 11 13 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +m 9 20 +l 8 21 +l 9 22 +l 10 21 +l 10 19 +l 7 17 +l 5 16 + +131 20 10 40 +m 4 12 +l 4 11 +l 3 11 +l 3 12 +l 4 13 +l 6 14 +l 10 14 +l 12 13 +l 13 12 +l 14 10 +l 14 3 +l 15 1 +l 16 0 +l 17 0 +m 13 12 +l 13 3 +l 14 1 +l 16 0 +m 13 10 +l 12 9 +l 6 8 +l 3 7 +l 2 5 +l 2 3 +l 3 1 +l 6 0 +l 9 0 +l 11 1 +l 13 3 +m 6 8 +l 4 7 +l 3 5 +l 3 3 +l 4 1 +l 6 0 +m 0 16 +l 8 21 +l 16 16 +l 8 20 +l 0 16 + +132 20 10 45 +m 2 12 +l 2 11 +l 1 11 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 11 12 +l 11 3 +l 12 1 +l 14 0 +m 11 10 +l 10 9 +l 4 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 11 3 +m 4 8 +l 2 7 +l 1 5 +l 1 3 +l 2 1 +l 4 0 +m 3 18 +l 2 17 +l 3 16 +l 4 17 +l 3 18 +m 10 18 +l 9 17 +l 10 16 +l 11 17 +l 10 18 + +133 20 10 42 +m 2 12 +l 2 11 +l 1 11 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 11 12 +l 11 3 +l 12 1 +l 14 0 +m 11 10 +l 10 9 +l 4 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 11 3 +m 4 8 +l 2 7 +l 1 5 +l 1 3 +l 2 1 +l 4 0 +m 4 20 +l 5 21 +l 4 22 +l 3 21 +l 3 19 +l 6 17 +l 8 16 + +134 20 10 44 +m 2 12 +l 2 11 +l 1 11 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 11 12 +l 11 3 +l 12 1 +l 14 0 +m 11 10 +l 10 9 +l 4 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 11 3 +m 4 8 +l 2 7 +l 1 5 +l 1 3 +l 2 1 +l 4 0 +m 9 19 +l 9 19 +m 6 18 +l 5 17 +l 6 16 +l 7 16 +l 8 17 +l 7 18 +l 6 18 + +135 18 9 48 +m 8 0 +l 10 -1 +l 11 -2 +l 12 -4 +l 11 -6 +l 10 -7 +l 7 -8 +l 9 -7 +l 10 -6 +l 11 -4 +l 10 -2 +l 8 0 +l 6 0 +l 6 1 +l 4 2 +l 2 4 +l 1 7 +l 1 9 +l 2 12 +l 4 14 +l 6 15 +l 3 14 +l 1 12 +l 0 9 +l 0 7 +l 1 4 +l 3 2 +l 6 1 +l 8 1 +l 11 2 +l 13 4 +m 1 -4 +l 2 -3 +l 1 -2 +l 0 -3 +l 0 -4 +l 1 -6 +l 2 -7 +l 4 -8 +l 7 -8 +m 12 12 +l 11 11 +l 12 10 +l 13 11 +l 13 12 +l 11 14 +l 9 15 +l 6 15 + +136 18 9 33 +m 7 0 +l 5 1 +l 3 3 +l 2 6 +l 2 8 +l 14 8 +l 14 10 +l 13 12 +l 12 13 +l 10 14 +l 7 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 13 8 +l 13 11 +l 12 13 +m 7 14 +l 5 13 +l 3 11 +l 2 8 +m 0 16 +l 8 21 +l 16 16 +l 8 20 +l 0 16 + +137 18 9 38 +m 6 0 +l 4 1 +l 2 3 +l 1 6 +l 1 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 8 +l 12 11 +l 11 13 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +m 4 18 +l 3 17 +l 4 16 +l 5 17 +l 4 18 +m 11 18 +l 10 17 +l 11 16 +l 12 17 +l 11 18 + +138 18 9 35 +m 6 0 +l 4 1 +l 2 3 +l 1 6 +l 1 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 8 +l 12 11 +l 11 13 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +m 5 20 +l 6 21 +l 5 22 +l 4 21 +l 4 19 +l 7 17 +l 9 16 + +139 12 6 17 +m 5 14 +l 5 0 +m 2 14 +l 6 14 +l 6 0 +m 2 0 +l 9 0 +m 1 18 +l 0 17 +l 1 16 +l 2 17 +l 1 18 +m 8 18 +l 7 17 +l 8 16 +l 9 17 +l 8 18 + +140 18 9 12 +m 8 14 +l 8 0 +m 5 14 +l 9 14 +l 9 0 +m 5 0 +l 12 0 +m 0 16 +l 8 21 +l 16 16 +l 8 20 +l 0 16 + +141 12 6 14 +m 4 14 +l 4 0 +m 1 14 +l 5 14 +l 5 0 +m 1 0 +l 8 0 +m 1 20 +l 2 21 +l 1 22 +l 0 21 +l 0 19 +l 3 17 +l 5 16 + +142 23 11 21 +m 16 0 +l 9 21 +l 2 0 +m 9 18 +l 15 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 12 0 +l 18 0 +m 5 25 +l 4 24 +l 5 23 +l 6 24 +l 5 25 +m 12 25 +l 11 24 +l 12 23 +l 13 24 +l 12 25 + +143 23 11 18 +m 16 0 +l 9 21 +l 2 0 +m 9 18 +l 15 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 12 0 +l 18 0 +m 9 25 +l 8 25 +l 7 24 +l 8 23 +l 9 23 +l 10 24 +l 9 25 + +144 21 10 23 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 10 15 +l 10 7 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 4 11 +l 10 11 +m 0 0 +l 16 0 +l 16 6 +l 15 0 +m 11 26 +l 10 27 +l 11 28 +l 12 27 +l 12 25 +l 9 23 +l 7 22 + +145 30 15 66 +m 2 12 +l 2 11 +l 1 11 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 6 +l 13 3 +l 15 1 +l 18 0 +l 20 0 +l 23 1 +l 25 3 +m 12 6 +l 12 3 +l 13 1 +l 14 0 +l 18 0 +l 16 1 +l 14 3 +l 13 6 +l 13 8 +l 25 8 +l 25 10 +l 24 12 +l 23 13 +l 21 14 +l 18 14 +l 15 13 +l 13 11 +l 12 8 +m 11 12 +l 11 3 +l 12 1 +l 14 0 +m 11 10 +l 10 9 +l 4 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 11 3 +m 4 8 +l 2 7 +l 1 5 +l 1 3 +l 2 1 +l 4 0 +m 13 8 +l 14 11 +l 16 13 +l 18 14 +m 23 13 +l 24 11 +l 24 8 +m 13 2 +l 14 1 +l 16 0 + +146 27 13 23 +m 21 0 +l 22 6 +l 22 0 +l 9 0 +l 9 21 +l 6 21 +m 0 0 +l 6 0 +m 10 0 +l 10 21 +l 22 21 +l 22 15 +l 21 21 +m 10 11 +l 16 11 +m 16 15 +l 16 7 +m 4 6 +l 9 6 +m 7 21 +l 2 0 +m 10 21 +l 9 21 + +147 19 9 37 +m 7 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 6 +l 15 8 +l 14 11 +l 12 13 +l 9 14 +l 7 14 +l 5 13 +l 3 11 +l 2 8 +l 2 6 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 9 14 +m 0 16 +l 8 21 +l 16 16 +l 8 20 +l 0 16 + +148 19 9 42 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +m 4 18 +l 3 17 +l 4 16 +l 5 17 +l 4 18 +m 11 18 +l 10 17 +l 11 16 +l 12 17 +l 11 18 + +149 19 9 39 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +m 5 20 +l 6 21 +l 5 22 +l 4 21 +l 4 19 +l 7 17 +l 9 16 + +150 20 10 23 +m 3 14 +l 3 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 0 14 +l 4 14 +l 4 3 +l 5 1 +l 7 0 +m 14 14 +l 14 0 +l 18 0 +m 11 14 +l 15 14 +l 15 0 +m 0 16 +l 8 21 +l 16 16 +l 8 20 +l 0 16 + +151 20 10 25 +m 3 14 +l 3 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 0 14 +l 4 14 +l 4 3 +l 5 1 +l 7 0 +m 14 14 +l 14 0 +l 18 0 +m 11 14 +l 15 14 +l 15 0 +m 6 20 +l 7 21 +l 6 22 +l 5 21 +l 5 19 +l 8 17 +l 10 16 + +152 21 10 27 +m 2 14 +l 8 0 +l 6 -4 +l 4 -6 +l 2 -7 +l 1 -7 +l 0 -6 +l 1 -5 +l 2 -6 +m 3 14 +l 8 2 +m 14 14 +l 8 0 +m 0 14 +l 6 14 +m 10 14 +l 16 14 +m 4 19 +l 3 18 +l 4 17 +l 5 18 +l 4 19 +m 11 19 +l 10 18 +l 11 17 +l 12 18 +l 11 19 + +153 21 10 47 +m 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 15 13 +l 14 15 +l 12 17 +l 9 18 +l 7 18 +l 4 17 +l 2 15 +l 1 13 +l 0 9 +m 7 18 +l 5 17 +l 3 15 +l 2 13 +l 1 9 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 5 +l 15 9 +l 14 13 +l 13 15 +l 11 17 +l 9 18 +m 5 22 +l 4 21 +l 5 20 +l 6 21 +l 5 22 +m 12 22 +l 11 21 +l 12 20 +l 13 21 +l 12 22 + +154 25 12 29 +m 3 18 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 18 +m 4 18 +l 4 6 +l 5 3 +l 7 1 +l 9 0 +m 14 18 +l 20 18 +m 0 18 +l 7 18 +m 6 23 +l 5 22 +l 6 21 +l 7 22 +l 6 23 +m 13 23 +l 12 22 +l 13 21 +l 14 22 +l 13 23 + +155 20 10 37 +m 7 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 6 +l 15 8 +l 14 11 +l 12 13 +l 9 14 +l 7 14 +l 5 13 +l 3 11 +l 2 8 +l 2 6 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 9 14 +m 16 14 +l 2 0 +l 0 0 +l 14 14 +l 16 14 + +156 24 12 43 +m 15 0 +l 17 2 +l 17 3 +l 15 4 +l 17 4 +l 18 3 +l 18 2 +l 17 1 +l 15 0 +l 2 0 +l 0 2 +l 0 3 +l 1 3 +l 2 0 +m 3 0 +l 3 17 +l 4 19 +l 5 20 +l 7 21 +l 10 21 +l 12 20 +l 13 18 +l 13 17 +l 12 17 +l 12 18 +l 11 20 +l 9 21 +m 8 21 +l 6 20 +l 5 19 +l 4 16 +l 4 0 +m 5 13 +l 2 12 +l 0 11 +l 0 12 +l 2 13 +l 8 13 +l 10 12 +l 10 11 +l 9 11 +l 7 12 +l 4 13 + +157 26 13 46 +m 10 21 +l 7 20 +l 5 18 +l 4 16 +l 3 12 +l 3 9 +l 4 5 +l 5 3 +l 7 1 +l 10 0 +l 12 0 +l 15 1 +l 17 3 +l 18 5 +l 19 9 +l 19 12 +l 18 16 +l 17 18 +l 15 20 +l 12 21 +l 10 21 +l 8 20 +l 6 18 +l 5 16 +l 4 12 +l 4 9 +l 5 5 +l 6 3 +l 8 1 +l 10 0 +m 12 0 +l 14 1 +l 16 3 +l 17 5 +l 18 9 +l 18 12 +l 17 16 +l 16 18 +l 14 20 +l 12 21 +m 0 0 +l 2 0 +l 23 21 +l 21 21 +l 0 0 +l 0 0 + +158 27 13 40 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 14 +l 16 12 +l 15 11 +l 12 10 +l 4 10 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 14 +l 15 12 +l 14 11 +l 12 10 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 0 0 +l 7 0 +m 19 15 +l 18 15 +l 18 4 +l 19 1 +l 21 0 +l 20 1 +l 19 4 +l 19 15 +m 21 0 +l 23 0 +l 25 1 +l 26 3 +m 18 14 +l 18 15 +m 16 9 +l 25 9 + +159 21 10 47 +m 10 14 +l 10 -3 +l 9 -5 +l 8 -6 +l 6 -7 +l 3 -7 +l 1 -6 +l 0 -4 +l 0 -3 +l 1 -3 +l 1 -4 +l 2 -6 +l 4 -7 +m 5 -7 +l 7 -6 +l 8 -5 +l 9 -2 +l 9 14 +m 9 0 +l 9 17 +l 10 19 +l 11 20 +l 13 21 +l 16 21 +l 18 20 +l 19 18 +l 19 17 +l 18 17 +l 18 18 +l 17 20 +l 15 21 +m 14 21 +l 12 20 +l 11 19 +l 10 16 +l 10 0 +m 10 9 +l 7 8 +l 5 7 +l 5 8 +l 7 9 +l 13 9 +l 15 8 +l 15 7 +l 14 7 +l 12 8 +l 9 9 + +160 20 10 42 +m 2 12 +l 2 11 +l 1 11 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 11 12 +l 11 3 +l 12 1 +l 14 0 +m 11 10 +l 10 9 +l 4 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 11 3 +m 4 8 +l 2 7 +l 1 5 +l 1 3 +l 2 1 +l 4 0 +m 8 20 +l 7 21 +l 8 22 +l 9 21 +l 9 19 +l 6 17 +l 4 16 + +161 12 6 14 +m 3 14 +l 3 0 +m 0 14 +l 4 14 +l 4 0 +m 0 0 +l 7 0 +m 7 20 +l 6 21 +l 7 22 +l 8 21 +l 8 19 +l 5 17 +l 3 16 + +162 19 9 39 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +m 10 20 +l 9 21 +l 10 22 +l 11 21 +l 11 19 +l 8 17 +l 6 16 + +163 20 10 25 +m 3 14 +l 3 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 0 14 +l 4 14 +l 4 3 +l 5 1 +l 7 0 +m 14 14 +l 14 0 +l 18 0 +m 11 14 +l 15 14 +l 15 0 +m 10 20 +l 9 21 +l 10 22 +l 11 21 +l 11 19 +l 8 17 +l 6 16 + +164 23 11 35 +m 3 14 +l 3 0 +m 0 14 +l 4 14 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 0 0 +l 7 0 +m 11 0 +l 18 0 +m 3 16 +l 4 19 +l 6 20 +l 8 20 +l 10 19 +l 12 19 +l 14 20 +l 15 22 +l 14 19 +l 12 18 +l 10 18 +l 8 19 +l 6 19 +l 4 18 +l 3 16 + +165 24 12 27 +m 3 21 +l 3 0 +m 0 21 +l 4 21 +l 16 2 +m 4 19 +l 16 0 +l 16 21 +m 13 21 +l 19 21 +m 0 0 +l 6 0 +m 6 28 +l 4 27 +l 3 24 +l 4 26 +l 6 27 +l 8 27 +l 12 25 +l 14 25 +l 16 26 +l 17 29 +l 16 27 +l 14 26 +l 12 26 +l 8 28 +l 6 28 + +166 20 10 35 +m 2 12 +l 2 11 +l 1 11 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +m 11 12 +l 11 3 +l 12 1 +l 14 0 +l 15 0 +m 11 10 +l 10 9 +l 4 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 11 3 +m 4 8 +l 2 7 +l 1 5 +l 1 3 +l 2 1 +l 4 0 + +167 19 9 33 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 + +168 17 8 29 +m 11 4 +l 10 5 +l 11 6 +l 12 5 +l 12 4 +l 11 2 +l 10 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 1 8 +l 2 9 +l 6 11 +l 6 14 +m 5 0 +l 3 1 +l 2 2 +l 1 4 +l 1 6 +l 2 8 +l 4 10 +m 6 19 +l 7 20 +l 6 21 +l 5 20 +l 6 19 + +169 14 7 8 +m 0 5 +l 0 0 +l 3 0 +l 3 4 +l 12 4 +l 12 7 +l 0 7 +l 0 5 + +170 14 7 8 +m 12 5 +l 12 0 +l 9 0 +l 9 4 +l 0 4 +l 0 7 +l 12 7 +l 12 5 + +171 23 11 45 +m 18 21 +l 2 0 +l 0 0 +l 16 21 +l 18 21 +m 16 21 +l 17 21 +m 0 17 +l 2 18 +l 5 21 +l 5 10 +m 4 20 +l 4 10 +m 2 10 +l 7 10 +m 10 0 +l 10 2 +l 11 3 +l 12 3 +l 14 0 +l 17 0 +l 18 2 +l 18 3 +m 12 3 +l 14 1 +l 16 1 +l 18 2 +m 10 2 +l 10 3 +l 11 5 +l 12 6 +l 16 7 +l 17 8 +l 17 10 +l 15 11 +l 12 11 +l 11 10 +l 11 9 +l 12 8 +l 13 9 +l 12 10 +m 12 6 +l 16 8 +l 16 10 +l 15 11 + +172 23 11 23 +m 18 21 +l 2 0 +l 0 0 +l 16 21 +l 18 21 +m 16 21 +l 17 21 +m 0 17 +l 2 18 +l 5 21 +l 5 10 +m 4 20 +l 4 10 +m 2 10 +l 7 10 +m 13 0 +l 18 0 +m 16 0 +l 16 11 +l 10 4 +l 18 4 +m 15 9 +l 15 0 + +173 7 3 12 +m 1 0 +l 0 2 +l 1 14 +l 2 2 +l 1 0 +m 1 2 +l 1 8 +m 1 19 +l 0 20 +l 1 21 +l 2 20 +l 1 19 + +174 21 10 6 +m 8 17 +l 0 10 +l 8 4 +m 17 17 +l 9 10 +l 17 4 + +175 21 10 6 +m 9 17 +l 17 10 +l 9 4 +m 0 17 +l 8 10 +l 0 4 + +176 14 7 126 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 4 21 +l 6 21 +l 6 19 +l 4 19 +l 4 21 +m 5 21 +l 5 19 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 4 15 +l 6 15 +l 6 13 +l 4 13 +l 4 15 +m 5 15 +l 5 13 +m 4 3 +l 6 3 +l 6 1 +l 4 1 +l 4 3 +m 5 3 +l 5 1 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 12 9 +l 14 9 +l 14 7 +l 12 7 +l 12 9 +m 13 9 +l 13 7 +m 12 15 +l 14 15 +l 14 13 +l 12 13 +l 12 15 +m 13 15 +l 13 13 +m 12 3 +l 14 3 +l 14 1 +l 12 1 +l 12 3 +m 13 3 +l 13 1 +m 4 -3 +l 6 -3 +l 6 -5 +l 4 -5 +l 4 -3 +m 5 -3 +l 5 -5 +m 12 -3 +l 12 -5 +l 14 -5 +l 14 -3 +l 12 -3 +m 13 -3 +l 13 -5 + +177 16 8 245 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 2 15 +l 4 15 +l 4 13 +l 2 13 +l 2 15 +m 3 15 +l 3 13 +m 2 3 +l 4 3 +l 4 1 +l 2 1 +l 2 3 +m 3 3 +l 3 1 +m 4 18 +l 6 18 +l 6 16 +l 4 16 +l 4 18 +m 5 18 +l 5 16 +m 4 6 +l 6 6 +l 6 4 +l 4 4 +l 4 6 +m 5 6 +l 5 4 +m 4 12 +l 6 12 +l 6 10 +l 4 10 +l 4 12 +m 5 12 +l 5 10 +m 4 0 +l 6 0 +l 6 -2 +l 4 -2 +l 4 0 +m 5 0 +l 5 -2 +m 6 21 +l 8 21 +l 8 19 +l 6 19 +l 6 21 +m 7 21 +l 7 19 +m 6 9 +l 8 9 +l 8 7 +l 6 7 +l 6 9 +m 7 9 +l 7 7 +m 6 15 +l 8 15 +l 8 13 +l 6 13 +l 6 15 +m 7 15 +l 7 13 +m 6 3 +l 8 3 +l 8 1 +l 6 1 +l 6 3 +m 7 3 +l 7 1 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 10 9 +l 12 9 +l 12 7 +l 10 7 +l 10 9 +m 11 9 +l 11 7 +m 10 15 +l 12 15 +l 12 13 +l 10 13 +l 10 15 +m 11 15 +l 11 13 +m 10 3 +l 12 3 +l 12 1 +l 10 1 +l 10 3 +m 11 3 +l 11 1 +m 12 18 +l 14 18 +l 14 16 +l 12 16 +l 12 18 +m 13 18 +l 13 16 +m 12 6 +l 14 6 +l 14 4 +l 12 4 +l 12 6 +m 13 6 +l 13 4 +m 12 12 +l 14 12 +l 14 10 +l 12 10 +l 12 12 +m 13 12 +l 13 10 +m 12 0 +l 14 0 +l 14 -2 +l 12 -2 +l 12 0 +m 13 0 +l 13 -2 +m 14 21 +l 16 21 +l 16 19 +l 14 19 +l 14 21 +m 15 21 +l 15 19 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 14 15 +l 16 15 +l 16 13 +l 14 13 +l 14 15 +m 15 15 +l 15 13 +m 14 3 +l 16 3 +l 16 1 +l 14 1 +l 14 3 +m 15 3 +l 15 1 +m 2 -5 +l 4 -5 +l 4 -3 +l 2 -3 +l 2 -5 +m 3 -3 +l 3 -5 +m 6 -3 +l 8 -3 +l 8 -5 +l 6 -5 +l 6 -3 +m 7 -3 +l 7 -5 +m 10 -3 +l 10 -5 +l 12 -5 +l 12 -3 +l 10 -3 +m 11 -3 +l 11 -5 + +178 24 12 276 +m 0 21 +l 2 21 +l 2 19 +l 0 19 +l 0 21 +m 1 21 +l 1 19 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 20 21 +l 22 21 +l 22 19 +l 20 19 +l 20 21 +m 21 21 +l 21 19 +m 22 21 +l 24 21 +l 24 19 +l 22 19 +l 22 21 +m 23 21 +l 23 19 +m 4 17 +l 6 17 +l 6 15 +l 4 15 +l 4 17 +m 5 17 +l 5 15 +m 6 17 +l 8 17 +l 8 15 +l 6 15 +l 6 17 +m 7 17 +l 7 15 +m 8 17 +l 10 17 +l 10 15 +l 8 15 +l 8 17 +m 9 17 +l 9 15 +m 0 13 +l 2 13 +l 2 11 +l 0 11 +l 0 13 +m 1 13 +l 1 11 +m 2 13 +l 4 13 +l 4 11 +l 2 11 +l 2 13 +m 3 13 +l 3 11 +m 10 13 +l 12 13 +l 12 11 +l 10 11 +l 10 13 +m 11 13 +l 11 11 +m 12 13 +l 14 13 +l 14 11 +l 12 11 +l 12 13 +m 13 13 +l 13 11 +m 20 13 +l 22 13 +l 22 11 +l 20 11 +l 20 13 +m 21 13 +l 21 11 +m 22 13 +l 24 13 +l 24 11 +l 22 11 +l 22 13 +m 23 13 +l 23 11 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 16 9 +l 18 9 +l 18 7 +l 16 7 +l 16 9 +m 17 9 +l 17 7 +m 18 9 +l 20 9 +l 20 7 +l 18 7 +l 18 9 +m 19 9 +l 19 7 +m 0 5 +l 2 5 +l 2 3 +l 0 3 +l 0 5 +m 1 5 +l 1 3 +m 2 5 +l 4 5 +l 4 3 +l 2 3 +l 2 5 +m 3 5 +l 3 3 +m 10 5 +l 12 5 +l 12 3 +l 10 3 +l 10 5 +m 11 5 +l 11 3 +m 12 5 +l 14 5 +l 14 3 +l 12 3 +l 12 5 +m 13 5 +l 13 3 +m 20 5 +l 22 5 +l 22 3 +l 20 3 +l 20 5 +m 21 5 +l 21 3 +m 22 5 +l 24 5 +l 24 3 +l 22 3 +l 22 5 +m 23 5 +l 23 3 +m 4 1 +l 10 1 +l 10 -1 +l 4 -1 +l 4 1 +m 5 1 +l 5 -1 +m 7 1 +l 7 -1 +m 9 1 +l 9 -1 +m 0 -3 +l 4 -3 +l 4 -5 +l 0 -5 +l 0 -3 +m 1 -3 +l 1 -5 +m 3 -3 +l 3 -5 +m 10 -3 +l 14 -3 +l 14 -5 +l 10 -5 +l 10 -3 +m 11 -3 +l 11 -5 +m 13 -3 +l 13 -5 +m 20 -3 +l 22 -3 +l 22 -5 +l 20 -5 +l 20 -3 +m 21 -3 +l 21 -5 +m 22 -3 +l 24 -3 +l 24 -5 +l 22 -5 +l 22 -3 +m 23 -3 +l 23 -5 +m 12 -3 +l 12 -5 +m 2 -3 +l 2 -5 +m 6 1 +l 6 -1 +m 8 1 +l 8 -1 +m 18 17 +l 20 17 +l 20 15 +l 18 15 +l 18 17 +m 19 17 +l 19 15 +m 20 17 +l 22 17 +l 22 15 +l 20 15 +l 20 17 +m 21 17 +l 21 15 +m 22 17 +l 24 17 +l 24 15 +l 22 15 +l 22 17 +m 23 17 +l 23 15 +m 0 9 +l 2 9 +l 2 7 +l 0 7 +l 0 9 +m 1 9 +l 1 7 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 18 1 +l 24 1 +l 24 -1 +l 18 -1 +l 18 1 +m 19 1 +l 19 -1 +m 21 1 +l 21 -1 +m 23 1 +l 23 -1 +m 20 1 +l 20 -1 +m 22 1 +l 22 -1 + +179 4 2 2 +m 0 21 +l 0 -7 + +180 13 6 5 +m 0 5 +l 9 5 +l 9 21 +m 9 5 +l 9 -7 + +181 13 6 7 +m 0 9 +l 9 9 +l 9 -7 +m 9 9 +l 9 21 +m 0 5 +l 9 5 + +182 22 11 7 +m 0 5 +l 9 5 +l 9 21 +m 9 5 +l 9 -7 +m 18 -7 +l 18 21 + +183 22 11 5 +m 0 5 +l 18 5 +l 18 -7 +m 9 5 +l 9 -7 + +184 13 6 5 +m 0 9 +l 9 9 +l 9 -7 +m 0 5 +l 9 5 + +185 22 11 8 +m 0 5 +l 9 5 +l 9 -7 +m 18 -7 +l 18 21 +m 0 9 +l 9 9 +l 9 21 + +186 22 11 4 +m 9 -7 +l 9 21 +m 18 -7 +l 18 21 + +187 22 11 6 +m 0 9 +l 18 9 +l 18 -7 +m 0 5 +l 9 5 +l 9 -7 + +188 22 11 6 +m 0 5 +l 18 5 +l 18 21 +m 0 9 +l 9 9 +l 9 21 + +189 22 11 5 +m 0 9 +l 18 9 +l 18 21 +m 9 9 +l 9 21 + +190 13 6 5 +m 0 5 +l 9 5 +l 9 21 +m 0 9 +l 9 9 + +191 0 0 3 +m 0 9 +l 9 9 +l 9 -7 + +192 9 4 3 +m 9 5 +l 0 5 +l 0 21 + +193 18 9 5 +m 0 5 +l 9 5 +l 9 21 +m 18 5 +l 9 5 + +194 18 9 5 +m 0 9 +l 9 9 +l 9 -7 +m 18 9 +l 9 9 + +195 9 4 5 +m 9 5 +l 0 5 +l 0 21 +m 0 5 +l 0 -7 + +196 18 9 2 +m 0 5 +l 18 5 + +197 19 9 6 +m 0 5 +l 9 5 +l 9 21 +m 18 5 +l 9 5 +l 9 -7 + +198 9 4 7 +m 9 9 +l 0 9 +l 0 -7 +m 0 9 +l 0 21 +m 9 5 +l 0 5 + +199 18 9 7 +m 18 5 +l 9 5 +l 9 21 +m 9 5 +l 9 -7 +m 0 -7 +l 0 21 + +200 18 9 6 +m 18 5 +l 0 5 +l 0 21 +m 18 9 +l 9 9 +l 9 21 + +201 18 9 6 +m 18 9 +l 0 9 +l 0 -7 +m 18 5 +l 9 5 +l 9 -7 + +202 27 13 8 +m 0 5 +l 27 5 +m 0 9 +l 9 9 +l 9 21 +m 27 9 +l 18 9 +l 18 21 + +203 27 13 8 +m 0 9 +l 27 9 +m 0 5 +l 9 5 +l 9 -7 +m 27 5 +l 18 5 +l 18 -7 + +204 18 9 8 +m 18 5 +l 9 5 +l 9 -7 +m 0 -7 +l 0 21 +m 18 9 +l 9 9 +l 9 21 + +205 18 9 4 +m 0 5 +l 18 5 +m 0 9 +l 18 9 + +206 27 13 12 +m 0 5 +l 9 5 +l 9 -7 +m 0 9 +l 9 9 +l 9 21 +m 18 21 +l 18 9 +l 27 9 +m 18 -7 +l 18 5 +l 27 5 + +207 18 9 8 +m 0 5 +l 18 5 +m 0 9 +l 18 9 +m 9 21 +l 9 9 +m -1 0 +l 0 0 + +208 18 9 6 +m 0 9 +l 18 9 +m 7 9 +l 7 21 +m 16 9 +l 16 21 + +209 18 9 6 +m 0 9 +l 18 9 +m 0 5 +l 18 5 +m 9 -7 +l 9 5 + +210 18 9 6 +m 0 5 +l 18 5 +m 7 5 +l 7 -7 +m 16 5 +l 16 -7 + +211 18 9 5 +m 18 9 +l 0 9 +l 0 21 +m 9 9 +l 9 21 + +212 9 4 5 +m 9 5 +l 0 5 +l 0 21 +m 9 9 +l 0 9 + +213 10 5 5 +m 9 9 +l 0 9 +l 0 -7 +m 9 5 +l 0 5 + +214 18 9 5 +m 18 5 +l 0 5 +l 0 -7 +m 9 5 +l 9 -7 + +215 28 14 8 +m 0 5 +l 9 5 +l 9 21 +m 27 5 +l 9 5 +l 9 -7 +m 18 -7 +l 18 21 + +216 18 9 8 +m 0 5 +l 9 5 +l 9 21 +m 18 5 +l 9 5 +l 9 -7 +m 0 9 +l 18 9 + +217 13 6 3 +m 0 5 +l 9 5 +l 9 21 + +218 9 4 3 +m 9 9 +l 0 9 +l 0 -7 + +219 17 8 41 +m 0 21 +l 17 21 +l 17 0 +l 0 0 +l 0 21 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 21 +l 5 0 +m 6 0 +l 6 21 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 12 0 +l 12 21 +m 13 21 +l 13 0 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 16 21 +l 16 0 +m 17 21 +l 17 0 +m 0 10 +l 17 10 + +220 17 8 37 +m 17 0 +l 0 0 +l 0 10 +l 17 10 +l 17 0 +m 1 10 +l 1 0 +m 2 10 +l 2 0 +m 3 10 +l 3 0 +m 4 10 +l 4 0 +m 5 10 +l 5 0 +m 6 10 +l 6 0 +m 7 10 +l 7 0 +m 8 10 +l 8 0 +m 9 10 +l 9 0 +m 10 10 +l 10 0 +m 11 10 +l 11 0 +m 12 10 +l 12 0 +m 13 10 +l 13 0 +m 14 10 +l 14 0 +m 15 10 +l 15 0 +m 16 10 +l 16 0 + +221 8 4 19 +m 0 0 +l 0 21 +l 8 21 +l 8 0 +l 0 0 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 21 +l 5 0 +m 6 0 +l 6 21 +m 7 21 +l 7 0 + +222 16 8 19 +m 8 0 +l 8 21 +l 16 21 +l 16 0 +l 8 0 +m 9 21 +l 9 0 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 0 +l 14 21 +m 15 21 +l 15 0 + +223 17 8 37 +m 17 11 +l 0 11 +l 0 21 +l 17 21 +l 17 11 +m 1 21 +l 1 11 +m 2 21 +l 2 11 +m 3 21 +l 3 11 +m 4 21 +l 4 11 +m 5 21 +l 5 11 +m 6 21 +l 6 11 +m 7 21 +l 7 11 +m 8 21 +l 8 11 +m 9 21 +l 9 11 +m 10 21 +l 10 11 +m 11 21 +l 11 11 +m 12 21 +l 12 11 +m 13 21 +l 13 11 +m 14 21 +l 14 11 +m 15 21 +l 15 11 +m 16 21 +l 16 11 + +224 23 11 30 +m 6 0 +l 4 1 +l 2 3 +l 1 6 +l 2 9 +l 4 11 +l 6 12 +l 3 11 +l 1 9 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 20 14 +l 19 14 +l 12 3 +l 10 1 +l 8 0 +m 8 12 +l 10 11 +l 12 9 +l 19 0 +l 20 0 +l 13 9 +l 11 11 +l 8 12 +l 6 12 + +225 14 7 27 +m 0 -1 +l 0 -5 +l 1 -5 +l 1 7 +l 8 7 +l 10 5 +l 10 2 +l 1 2 +l 1 1 +l 10 1 +l 11 2 +l 11 5 +l 9 7 +l 11 9 +l 11 12 +l 10 13 +l 1 13 +l 0 12 +l 0 -4 +m 1 11 +l 2 12 +l 9 12 +l 10 11 +l 10 9 +l 8 8 +l 1 8 +l 1 11 + +226 13 6 9 +m 0 0 +l 0 15 +l 9 15 +l 9 13 +l 8 13 +l 8 14 +l 1 14 +l 1 0 +l -1 0 + +227 21 10 12 +m 4 0 +l 4 15 +l 0 15 +l 0 16 +l 17 16 +l 17 15 +l 14 15 +l 14 0 +m 13 0 +l 13 15 +l 5 15 +l 5 0 + +228 20 10 16 +m 15 0 +l 16 6 +l 16 0 +l 3 0 +l 9 11 +l 3 21 +l 16 21 +l 16 15 +l 15 21 +m 4 21 +l 10 11 +l 4 0 +m 3 21 +l 0 21 +m 0 0 +l 3 0 + +229 24 12 36 +m 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 13 9 +l 11 11 +l 8 12 +l 6 12 +l 3 11 +l 1 9 +l 0 6 +m 6 12 +l 4 11 +l 2 9 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 12 9 +l 10 11 +l 8 12 +m 3 11 +l 5 13 +l 7 14 +l 20 14 +l 20 13 +l 7 13 +l 4 11 + +230 19 9 23 +m 3 14 +l 3 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 14 14 +l 14 0 +l 15 0 +l 15 14 +l 11 14 +m 0 14 +l 4 14 +l 4 3 +l 5 1 +l 7 0 +m 4 1 +l 4 -4 +l 2 -7 +l 3 -7 +l 5 -4 +l 5 1 + +231 15 7 15 +m 6 12 +l 6 -2 +l 7 -2 +l 7 8 +l 12 12 +l 11 12 +l 7 9 +l 7 12 +l 5 14 +l 3 14 +l 0 11 +l 1 11 +l 3 13 +l 5 13 +l 6 12 + +232 18 9 37 +m 0 8 +l 1 5 +l 3 3 +l 6 2 +l 8 2 +l 11 3 +l 13 5 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 2 5 +l 4 3 +l 6 2 +m 8 2 +l 10 3 +l 12 5 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +m 0 21 +l 14 21 +m 7 21 +l 7 14 +m 7 2 +l 7 -5 +m 0 -5 +l 14 -5 + +233 20 10 44 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 11 +l 15 11 +l 15 12 +l 14 16 +l 13 18 +l 11 20 +l 9 21 +m 9 0 +l 11 1 +l 13 3 +l 14 5 +l 15 9 +l 15 10 +l 1 10 +l 1 9 +l 2 5 +l 3 3 +l 5 1 +l 7 0 + +234 20 10 39 +m 1 9 +l 1 12 +l 2 16 +l 3 18 +l 5 20 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 8 +l 5 5 +l 5 1 +l 0 1 +l 0 0 +l 6 0 +l 6 5 +l 1 9 +m 7 21 +l 9 21 +l 11 20 +l 13 18 +l 14 16 +l 15 12 +l 15 9 +l 10 5 +l 10 0 +l 16 0 +l 16 1 +l 11 1 +l 11 5 +l 15 8 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 + +235 19 9 39 +m 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 13 9 +l 11 11 +l 8 12 +l 6 12 +l 3 11 +l 1 9 +l 0 6 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 12 9 +l 10 11 +l 8 12 +l 0 21 +l 14 21 +l 15 20 +l 14 19 +l 13 20 +l 4 20 +l 3 19 +l 11 11 +m 6 12 +l 4 11 +l 2 9 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 27 0 +l 27 0 + +236 31 15 58 +m 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 13 9 +l 11 11 +l 8 12 +l 6 12 +l 3 11 +l 1 9 +l 0 6 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 12 9 +l 10 11 +l 8 12 +m 6 12 +l 4 11 +l 2 9 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 13 6 +l 14 3 +l 16 1 +l 19 0 +l 21 0 +l 24 1 +l 26 3 +l 27 6 +l 26 9 +l 24 11 +l 21 12 +l 19 12 +l 16 11 +l 14 9 +l 13 6 +m 21 0 +l 23 1 +l 25 3 +l 26 6 +l 25 9 +l 23 11 +l 21 12 +m 19 12 +l 17 11 +l 15 9 +l 14 6 +l 15 3 +l 17 1 +l 19 0 + +237 20 10 37 +m 7 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 6 +l 15 8 +l 14 11 +l 12 13 +l 9 14 +l 7 14 +l 5 13 +l 3 11 +l 2 8 +l 2 6 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 9 14 +m 16 14 +l 2 0 +l 0 0 +l 14 14 +l 16 14 + +238 16 8 15 +m 13 20 +l 4 20 +l 2 19 +l 1 18 +l 0 16 +l 0 10 +l 7 10 +m 13 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 +l 0 14 +m 0 6 +l 0 10 + +239 23 11 19 +m 3 0 +l 3 15 +l 4 18 +l 6 20 +l 9 21 +l 11 21 +l 14 20 +l 16 18 +l 17 15 +l 17 0 +m 4 0 +l 4 15 +l 5 18 +l 7 20 +l 9 21 +m 0 0 +l 7 0 +m 14 0 +l 20 0 + +240 23 11 8 +m 0 9 +l 18 9 +m 0 12 +l 18 12 +m 0 6 +l 18 6 +m 27 -1 +l 27 -1 + +241 22 11 6 +m 0 0 +l 18 0 +m 9 21 +l 9 3 +m 0 12 +l 18 12 + +242 21 10 5 +m 0 0 +l 18 0 +m 0 21 +l 16 12 +l 0 3 + +243 23 11 5 +m 18 0 +l 0 0 +m 18 21 +l 2 12 +l 18 3 + +244 14 7 18 +m 5 21 +l 3 20 +l 2 19 +l 1 16 +l 1 -7 +l 0 -7 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 9 20 +l 10 18 +l 10 17 +l 9 17 +l 9 18 +l 8 20 +l 6 21 + +245 14 7 18 +m 5 -7 +l 7 -6 +l 8 -5 +l 9 -2 +l 9 21 +l 10 21 +l 10 -3 +l 9 -5 +l 8 -6 +l 6 -7 +l 3 -7 +l 1 -6 +l 0 -4 +l 0 -3 +l 1 -3 +l 1 -4 +l 2 -6 +l 4 -7 + +246 22 11 12 +m 9 21 +l 8 20 +l 9 19 +l 10 20 +l 9 21 +m 9 2 +l 8 1 +l 9 0 +l 10 1 +l 9 2 +m 0 10 +l 18 10 + +247 22 11 44 +m 0 2 +l 0 4 +l 1 7 +l 3 8 +l 5 8 +l 7 7 +l 11 4 +l 13 3 +l 15 3 +l 17 4 +l 18 6 +l 18 8 +m 0 4 +l 1 6 +l 3 7 +l 5 7 +l 7 6 +l 11 3 +l 13 2 +l 15 2 +l 17 3 +l 18 6 +m 0 10 +l 0 12 +l 1 15 +l 3 16 +l 5 16 +l 7 15 +l 11 12 +l 13 11 +l 15 11 +l 17 12 +l 18 14 +l 18 16 +m 0 12 +l 1 14 +l 3 15 +l 5 15 +l 7 14 +l 11 11 +l 13 10 +l 15 10 +l 17 11 +l 18 14 + +248 18 9 31 +m 0 15 +l 1 12 +l 3 10 +l 6 9 +l 8 9 +l 11 10 +l 13 12 +l 14 15 +l 13 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 18 +l 0 15 +m 6 21 +l 4 20 +l 2 18 +l 1 15 +l 2 12 +l 4 10 +l 6 9 +m 8 9 +l 10 10 +l 12 12 +l 13 15 +l 12 18 +l 10 20 +l 8 21 +m 0 6 +l 0 6 + +249 7 3 11 +m 0 2 +l 3 2 +l 3 0 +l 0 0 +l 0 4 +l 3 4 +l 3 2 +m 2 4 +l 2 0 +m 1 4 +l 1 0 + +250 6 3 9 +m 0 2 +l 3 2 +l 3 0 +l 0 0 +l 0 2 +m 1 2 +l 1 0 +m 2 2 +l 2 0 + +251 20 10 5 +m 0 11 +l 9 0 +l 9 21 +l 19 21 +l 19 18 + +252 18 9 16 +m 4 18 +l 6 20 +l 9 21 +l 11 21 +l 14 20 +l 15 18 +l 15 11 +l 14 11 +l 14 18 +l 13 20 +l 11 21 +m 0 21 +l 4 21 +l 4 11 +l 3 11 +l 3 21 + +253 12 6 28 +m 2 19 +l 3 19 +l 2 18 +l 1 19 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 7 18 +l 5 16 +l 2 15 +l 0 13 +l 0 12 +l 1 13 +l 2 13 +l 4 11 +l 6 11 +l 7 13 +l 8 14 +m 2 13 +l 4 12 +l 5 12 +l 7 13 +m 5 16 +l 7 17 +l 8 18 +l 8 20 +l 5 21 + +254 13 6 21 +m 0 0 +l 0 10 +l 9 10 +l 9 0 +l 0 0 +m 1 10 +l 1 0 +m 2 10 +l 2 0 +m 3 10 +l 3 0 +m 4 10 +l 4 0 +m 5 10 +l 5 0 +m 6 10 +l 6 0 +m 7 10 +l 7 0 +m 8 10 +l 8 0 diff --git a/cd/etc/vectorfont23.txt b/cd/etc/vectorfont23.txt new file mode 100755 index 0000000..3cefb4a --- /dev/null +++ b/cd/etc/vectorfont23.txt @@ -0,0 +1,2161 @@ +Little II +7 7 3 -2 + + +32 6 3 0 + +33 2 1 4 +m 0 2 +l 0 7 +m 0 1 +l 0 0 + +34 5 2 0 + +35 6 3 9 +m 1 0 +l 1 6 +m 3 6 +l 3 0 +m 0 4 +l 3 4 +l 4 4 +m 0 2 +l 4 2 + +36 6 3 14 +m 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 2 +l 3 3 +l 1 3 +l 0 4 +l 0 5 +l 1 6 +l 3 6 +l 4 5 +m 2 6 +l 2 0 + +37 7 3 12 +m 0 1 +l 5 6 +m 0 6 +l 0 7 +l 1 7 +l 1 6 +l 0 6 +m 4 0 +l 4 1 +l 5 1 +l 5 0 +l 4 0 + +38 6 3 21 +m 4 0 +l 3 1 +l 2 0 +l 1 0 +l 0 1 +l 0 2 +l 1 3 +l 0 4 +l 0 5 +l 1 6 +l 2 6 +l 3 5 +l 3 4 +l 3 4 +l 2 3 +l 3 2 +l 3 1 +m 4 3 +l 3 2 +m 1 3 +l 2 3 + +39 4 2 3 +m 1 7 +l 1 5 +l 0 4 + +40 5 2 4 +m 2 0 +l 0 2 +l 0 4 +l 2 6 + +41 5 2 4 +m 0 0 +l 2 2 +l 2 4 +l 0 6 + +42 6 3 8 +m 0 5 +l 4 1 +m 0 1 +l 4 5 +m 0 3 +l 4 3 +m 2 1 +l 2 5 + +43 6 3 4 +m 0 3 +l 4 3 +m 2 5 +l 2 1 + +44 6 3 9 +m 1 -1 +l 2 0 +l 2 1 +l 1 1 +l 1 0 +l 2 0 +l 1 -1 +m 1 -1 +l 0 -2 + +45 6 3 2 +m 0 3 +l 4 3 + +46 5 2 5 +m 0 0 +l 0 1 +l 1 1 +l 1 0 +l 0 0 + +47 6 3 2 +m 0 0 +l 4 4 + +48 6 3 9 +m 0 5 +l 1 6 +l 3 6 +l 4 5 +l 4 1 +l 3 0 +l 1 0 +l 0 1 +l 0 5 + +49 5 2 6 +m 0 0 +l 2 0 +l 1 0 +l 1 6 +l 1 6 +l 0 5 + +50 6 3 7 +m 4 0 +l 0 0 +l 4 4 +l 4 5 +l 3 6 +l 1 6 +l 0 5 + +51 6 3 16 +m 0 5 +l 1 6 +l 3 6 +l 4 5 +l 4 4 +l 4 4 +l 4 4 +l 4 4 +l 3 3 +l 2 3 +l 3 3 +l 4 2 +l 4 1 +l 3 0 +l 1 0 +l 0 1 + +52 6 3 4 +m 3 0 +l 3 6 +l 0 3 +l 4 3 + +53 6 3 10 +m 4 6 +l 0 6 +l 0 3 +l 2 4 +l 3 4 +l 4 3 +l 4 1 +l 3 0 +l 1 0 +l 0 1 + +54 6 3 10 +m 4 6 +l 2 5 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 2 +l 3 3 +l 0 3 + +55 6 3 5 +m 0 6 +l 4 6 +l 4 5 +l 0 1 +l 0 0 + +56 6 3 17 +m 0 5 +l 1 6 +l 3 6 +l 4 5 +l 4 4 +l 3 3 +l 4 2 +l 4 1 +l 3 0 +l 1 0 +l 0 1 +l 0 2 +l 1 3 +l 0 4 +l 0 5 +m 1 3 +l 3 3 + +57 6 3 11 +m 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 5 +l 3 6 +l 1 6 +l 0 5 +l 0 4 +l 1 3 +l 4 3 + +58 5 2 10 +m 0 4 +l 1 4 +l 1 3 +l 0 3 +l 0 4 +m 0 1 +l 1 1 +l 1 0 +l 0 0 +l 0 1 + +59 5 2 12 +m 0 3 +l 0 4 +l 1 4 +l 1 3 +l 0 3 +m 0 1 +l 1 1 +l 1 0 +l 0 -1 +m 1 0 +l 0 0 +l 0 1 + +60 6 3 3 +m 3 0 +l 0 3 +l 3 6 + +61 6 3 4 +m 0 2 +l 4 2 +m 0 4 +l 4 4 + +62 5 2 3 +m 0 0 +l 3 3 +l 0 6 + +63 6 3 8 +m 0 5 +l 1 6 +l 3 6 +l 4 5 +l 4 4 +l 2 2 +m 2 1 +l 2 0 + +64 6 3 13 +m 3 2 +l 3 3 +l 2 3 +l 2 2 +l 3 2 +l 4 3 +l 4 5 +l 3 6 +l 1 6 +l 0 5 +l 0 1 +l 1 0 +l 4 0 + +65 6 3 7 +m 0 0 +l 0 4 +l 2 6 +l 4 4 +l 4 0 +l 4 3 +l 0 3 + +66 6 3 15 +m 0 6 +l 0 0 +l 3 0 +l 4 1 +l 4 2 +l 3 3 +l 0 3 +l 0 3 +l 0 3 +l 0 3 +l 3 3 +l 4 4 +l 4 5 +l 3 6 +l 0 6 + +67 6 3 8 +m 4 5 +l 3 6 +l 1 6 +l 0 5 +l 0 1 +l 1 0 +l 3 0 +l 4 1 + +68 6 3 7 +m 0 6 +l 0 0 +l 3 0 +l 4 1 +l 4 5 +l 3 6 +l 0 6 + +69 6 3 6 +m 4 6 +l 0 6 +l 0 0 +l 4 0 +m 0 3 +l 2 3 + +70 6 3 6 +m 4 6 +l 0 6 +l 0 3 +l 2 3 +l 0 3 +l 0 0 + +71 6 3 10 +m 4 5 +l 3 6 +l 1 6 +l 0 5 +l 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 3 +l 2 3 + +72 6 3 6 +m 0 6 +l 0 0 +l 0 3 +l 4 3 +l 4 6 +l 4 0 + +73 5 2 6 +m 0 6 +l 2 6 +l 1 6 +l 1 0 +l 0 0 +l 2 0 + +74 6 3 7 +m 4 6 +l 2 6 +l 3 6 +l 3 1 +l 2 0 +l 1 0 +l 0 1 + +75 6 3 6 +m 0 6 +l 0 0 +l 0 2 +l 4 6 +l 1 3 +l 4 0 + +76 6 3 3 +m 0 6 +l 0 0 +l 4 0 + +77 6 3 5 +m 0 0 +l 0 6 +l 2 4 +l 4 6 +l 4 0 + +78 6 3 4 +m 0 0 +l 0 6 +l 4 0 +l 4 6 + +79 6 3 9 +m 3 6 +l 1 6 +l 0 5 +l 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 5 +l 3 6 + +80 6 3 7 +m 0 0 +l 0 6 +l 3 6 +l 4 5 +l 4 3 +l 3 2 +l 0 2 + +81 6 3 12 +m 4 1 +l 4 5 +l 3 6 +l 1 6 +l 0 5 +l 0 1 +l 1 0 +l 3 0 +m 2 2 +l 4 0 +m 3 0 +l 4 1 + +82 6 3 9 +m 0 0 +l 0 6 +l 3 6 +l 4 5 +l 4 3 +l 3 2 +l 0 2 +m 2 2 +l 4 0 + +83 6 3 12 +m 4 5 +l 3 6 +l 1 6 +l 0 5 +l 0 4 +l 1 3 +l 3 3 +l 4 2 +l 4 1 +l 3 0 +l 1 0 +l 0 1 + +84 6 3 4 +m 0 6 +l 4 6 +l 2 6 +l 2 0 + +85 6 3 6 +m 0 6 +l 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 6 + +86 6 3 5 +m 0 6 +l 0 2 +l 2 0 +l 4 2 +l 4 6 + +87 6 3 5 +m 0 6 +l 0 0 +l 2 2 +l 4 0 +l 4 6 + +88 6 3 4 +m 0 6 +l 4 0 +m 4 6 +l 0 0 + +89 6 3 7 +m 0 6 +l 0 5 +l 2 3 +l 4 5 +l 4 6 +m 2 3 +l 2 0 + +90 6 3 6 +m 0 6 +l 4 6 +l 4 5 +l 0 1 +l 0 0 +l 4 0 + +91 5 2 4 +m 2 0 +l 0 0 +l 0 6 +l 2 6 + +92 6 3 2 +m 4 0 +l 0 4 + +93 5 2 4 +m 0 0 +l 2 0 +l 2 6 +l 0 6 + +94 6 3 3 +m 0 3 +l 2 5 +l 4 3 + +95 6 3 2 +m 0 -1 +l 4 -1 + +96 6 3 2 +m 0 5 +l 2 3 + +97 6 3 8 +m 1 4 +l 3 4 +l 4 3 +l 4 0 +l 1 0 +l 0 1 +l 1 2 +l 4 2 + +98 6 3 8 +m 0 6 +l 0 0 +l 3 0 +l 4 1 +l 4 2 +l 4 3 +l 3 4 +l 0 4 + +99 6 3 6 +m 4 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +l 4 0 + +100 6 3 7 +m 4 6 +l 4 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 4 4 + +101 6 3 9 +m 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 4 3 +l 4 2 +l 0 2 + +102 5 2 8 +m 1 0 +l 1 5 +l 1 3 +l 0 3 +l 2 3 +l 1 3 +l 1 5 +l 2 6 + +103 6 3 9 +m 2 -2 +l 3 -2 +l 4 -1 +l 4 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +l 4 0 + +104 6 3 7 +m 0 6 +l 0 0 +l 0 3 +l 1 4 +l 3 4 +l 4 3 +l 4 0 + +105 5 2 7 +m 0 0 +l 2 0 +l 1 0 +l 1 4 +l 0 4 +m 1 6 +l 1 6 + +106 6 3 6 +m 0 -2 +l 1 -2 +l 2 -1 +l 2 4 +m 2 6 +l 2 6 + +107 6 3 6 +m 0 0 +l 0 6 +m 0 2 +l 3 4 +m 0 2 +l 3 0 + +108 5 2 5 +m 0 0 +l 2 0 +l 1 0 +l 1 6 +l 0 6 + +109 6 3 9 +m 0 0 +l 0 4 +l 1 4 +l 2 3 +l 2 0 +l 2 3 +l 3 4 +l 4 3 +l 4 0 + +110 6 3 5 +m 0 0 +l 0 4 +l 3 4 +l 4 3 +l 4 0 + +111 6 3 9 +m 1 0 +l 3 0 +l 4 1 +l 4 3 +l 3 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 + +112 6 3 7 +m 0 -2 +l 0 4 +l 3 4 +l 4 3 +l 4 1 +l 3 0 +l 0 0 + +113 6 3 7 +m 4 -2 +l 4 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +l 4 0 + +114 6 3 6 +m 0 4 +l 0 0 +l 0 2 +l 1 3 +l 2 4 +l 3 4 + +115 6 3 8 +m 0 0 +l 3 0 +l 4 1 +l 3 2 +l 1 2 +l 0 3 +l 1 4 +l 4 4 + +116 5 2 7 +m 1 5 +l 1 4 +l 0 4 +l 2 4 +l 1 4 +l 1 1 +l 2 0 + +117 6 3 5 +m 0 4 +l 0 1 +l 1 0 +l 4 0 +l 4 4 + +118 6 3 3 +m 0 4 +l 2 0 +l 4 4 + +119 6 3 7 +m 0 4 +l 0 1 +l 1 0 +l 2 1 +l 3 0 +l 4 1 +l 4 4 + +120 6 3 5 +m 0 4 +l 4 0 +l 2 2 +l 4 4 +l 0 0 + +121 6 3 9 +m 0 4 +l 0 1 +l 1 0 +l 4 0 +l 4 -1 +l 3 -2 +l 2 -2 +m 4 0 +l 4 4 + +122 6 3 4 +m 0 4 +l 4 4 +l 0 0 +l 4 0 + +123 6 3 9 +m 3 6 +l 2 6 +l 1 5 +l 1 4 +l 0 3 +l 1 2 +l 1 1 +l 2 0 +l 3 0 + +124 3 1 2 +m 0 6 +l 0 0 + +125 6 3 9 +m 0 6 +l 1 6 +l 2 5 +l 2 4 +l 3 3 +l 2 2 +l 2 1 +l 1 0 +l 0 0 + +126 6 3 4 +m 0 5 +l 1 6 +l 3 6 +l 4 7 + +127 6 3 6 +m 0 2 +l 0 0 +l 4 0 +l 4 2 +l 2 5 +l 0 2 + +128 6 3 15 +m 4 6 +l 3 7 +l 1 7 +l 0 6 +l 0 2 +l 1 1 +l 3 1 +l 4 2 +m 2 1 +l 2 0 +l 3 -1 +l 2 -2 +l 1 -2 +l 0 -1 +l 0 0 + +129 6 3 9 +m 0 4 +l 0 1 +l 1 0 +l 4 0 +l 4 4 +m 1 6 +l 1 7 +m 3 6 +l 3 7 + +130 6 3 11 +m 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 4 3 +l 4 2 +l 0 2 +m 1 6 +l 3 7 + +131 6 3 11 +m 1 4 +l 3 4 +l 4 3 +l 4 0 +l 1 0 +l 0 1 +l 1 2 +l 4 2 +m 0 6 +l 2 8 +l 4 6 + +132 6 3 12 +m 1 4 +l 3 4 +l 4 3 +l 4 0 +l 1 0 +l 0 1 +l 1 2 +l 4 2 +m 1 7 +l 1 6 +m 4 6 +l 4 7 + +133 6 3 10 +m 1 4 +l 3 4 +l 4 3 +l 4 0 +l 1 0 +l 0 1 +l 1 2 +l 4 2 +m 1 7 +l 3 6 + +134 6 3 13 +m 1 4 +l 3 4 +l 4 3 +l 4 0 +l 1 0 +l 0 1 +l 1 2 +l 4 2 +m 2 7 +l 1 6 +l 2 5 +l 3 6 +l 2 7 + +135 6 3 13 +m 3 4 +l 1 4 +l 0 3 +l 0 2 +l 1 1 +l 3 1 +m 2 1 +l 2 0 +l 3 -1 +l 2 -2 +l 1 -2 +l 0 -1 +l 0 0 + +136 6 3 12 +m 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 4 3 +l 4 2 +l 0 2 +m 0 6 +l 2 8 +l 4 6 + +137 6 3 13 +m 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 4 3 +l 4 2 +l 0 2 +m 3 6 +l 3 7 +m 1 6 +l 1 7 + +138 6 3 11 +m 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 4 3 +l 4 2 +l 0 2 +m 1 7 +l 3 6 + +139 5 2 8 +m 0 0 +l 1 0 +l 1 4 +l 0 4 +m 0 7 +l 0 6 +m 2 7 +l 2 6 + +140 5 2 7 +m 1 0 +l 2 0 +l 2 4 +l 1 4 +m 0 6 +l 2 8 +l 4 6 + +141 5 2 6 +m 1 0 +l 2 0 +l 2 4 +l 1 4 +m 0 7 +l 2 6 + +142 6 3 12 +m 0 0 +l 0 4 +l 2 6 +l 4 4 +l 4 3 +l 0 3 +m 4 3 +l 4 0 +m 1 8 +l 1 9 +m 3 8 +l 3 9 + +143 6 3 13 +m 0 0 +l 0 4 +l 2 6 +l 4 4 +l 4 3 +l 0 3 +m 4 3 +l 4 0 +m 2 9 +l 1 8 +l 2 7 +l 3 8 +l 2 9 + +144 6 3 8 +m 4 4 +l 0 4 +l 0 0 +l 4 0 +m 0 2 +l 2 2 +m 1 6 +l 3 7 + +145 9 4 17 +m 1 4 +l 3 4 +l 4 3 +l 4 2 +l 1 2 +l 0 1 +l 1 0 +l 4 0 +l 4 2 +l 8 2 +l 8 3 +l 7 4 +l 5 4 +l 4 3 +m 4 1 +l 5 0 +l 7 0 + +146 10 5 11 +m 0 0 +l 0 4 +l 2 6 +l 4 4 +l 4 6 +l 8 6 +m 0 3 +l 6 3 +m 8 0 +l 4 0 +l 4 4 + +147 6 3 12 +m 1 0 +l 3 0 +l 4 1 +l 4 3 +l 3 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +m 0 6 +l 2 8 +l 4 6 + +148 6 3 13 +m 1 0 +l 3 0 +l 4 1 +l 4 3 +l 3 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +m 1 7 +l 1 6 +m 3 7 +l 3 6 + +149 6 3 11 +m 1 0 +l 3 0 +l 4 1 +l 4 3 +l 3 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +m 1 7 +l 3 6 + +150 6 3 8 +m 0 4 +l 0 1 +l 1 0 +l 4 0 +l 4 4 +m 0 6 +l 2 8 +l 4 6 + +151 6 3 7 +m 0 4 +l 0 1 +l 1 0 +l 4 0 +l 4 4 +m 1 7 +l 3 6 + +152 6 3 13 +m 0 4 +l 0 1 +l 1 0 +l 4 0 +l 4 -1 +l 3 -2 +l 2 -2 +m 4 0 +l 4 4 +m 1 7 +l 1 6 +m 3 7 +l 3 6 + +153 6 3 13 +m 3 6 +l 1 6 +l 0 5 +l 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 5 +l 3 6 +m 1 9 +l 1 8 +m 3 9 +l 3 8 + +154 6 3 10 +m 0 6 +l 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 6 +m 1 9 +l 1 8 +m 3 9 +l 3 8 + +155 6 3 11 +m 1 0 +l 3 0 +l 4 1 +l 4 3 +l 3 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +m 0 0 +l 4 4 + +156 8 4 8 +m 3 5 +l 2 5 +l 1 4 +l 1 0 +l 4 0 +l 5 1 +m 0 3 +l 2 3 + +157 7 3 11 +m 4 6 +l 2 6 +l 1 5 +l 1 1 +l 2 0 +l 4 0 +l 5 1 +l 5 5 +l 4 6 +m 0 0 +l 6 6 + +158 8 4 12 +m 0 0 +l 0 7 +l 3 7 +l 4 6 +l 4 4 +l 3 3 +l 0 3 +m 5 4 +l 5 1 +l 6 0 +m 4 3 +l 6 3 + +159 7 3 12 +m 0 -1 +l 1 -2 +l 2 -2 +l 3 -1 +l 3 3 +m 6 5 +l 5 6 +l 4 6 +l 3 5 +l 3 1 +m 2 2 +l 4 2 + +160 6 3 10 +m 1 4 +l 3 4 +l 4 3 +l 4 0 +l 1 0 +l 0 1 +l 1 2 +l 4 2 +m 1 6 +l 3 7 + +161 4 2 6 +m 0 0 +l 1 0 +l 1 4 +l 0 4 +m 0 6 +l 2 7 + +162 6 3 11 +m 1 0 +l 3 0 +l 4 1 +l 4 3 +l 3 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +m 1 6 +l 3 7 + +163 6 3 7 +m 0 4 +l 0 1 +l 1 0 +l 4 0 +l 4 4 +m 1 6 +l 3 7 + +164 6 3 9 +m 0 0 +l 0 4 +l 3 4 +l 4 3 +l 4 0 +m 0 6 +l 1 7 +l 3 7 +l 4 8 + +165 6 3 8 +m 0 0 +l 0 6 +l 4 0 +l 4 6 +m 0 7 +l 1 8 +l 3 8 +l 4 9 + +166 6 3 10 +m 1 6 +l 3 6 +l 4 5 +l 4 2 +l 1 2 +l 0 3 +l 1 4 +l 4 4 +m 0 0 +l 4 0 + +167 6 3 11 +m 1 3 +l 3 3 +l 4 4 +l 4 5 +l 3 6 +l 1 6 +l 0 5 +l 0 4 +l 1 3 +m 0 0 +l 4 0 + +168 6 3 8 +m 4 1 +l 3 0 +l 1 0 +l 0 1 +l 0 2 +l 2 4 +m 2 5 +l 2 6 + +169 6 3 3 +m 0 0 +l 0 2 +l 4 2 + +170 6 3 3 +m 4 0 +l 4 2 +l 0 2 + +171 7 3 14 +m 0 5 +l 1 6 +l 1 3 +m 0 3 +l 2 3 +m 3 2 +l 3 3 +l 4 3 +l 5 3 +l 5 2 +l 3 0 +l 5 0 +m 5 6 +l 0 0 + +172 7 3 11 +m 0 5 +l 1 6 +l 1 3 +m 0 3 +l 2 3 +m 5 6 +l 0 0 +m 5 1 +l 2 1 +l 4 3 +l 4 0 + +173 2 1 4 +m 0 5 +l 0 0 +m 0 6 +l 0 7 + +174 6 3 6 +m 2 5 +l 0 3 +l 2 1 +m 4 5 +l 2 3 +l 4 1 + +175 6 3 6 +m 2 5 +l 4 3 +l 2 1 +m 0 5 +l 2 3 +l 0 1 + +176 9 4 16 +m 0 6 +l 0 -2 +l 6 -2 +l 6 7 +l 0 7 +l 0 6 +m 3 7 +l 3 -2 +m 0 4 +l 9 4 +m 0 1 +l 9 1 +m 6 7 +l 9 7 +l 9 -2 +l 6 -2 + +177 8 4 21 +m 0 7 +l 8 7 +l 8 -1 +l 0 -1 +l 0 7 +m 0 5 +l 8 5 +m 0 3 +l 8 3 +m 0 1 +l 8 1 +m 2 7 +l 2 -2 +m 4 7 +l 4 -2 +m 6 7 +l 6 -2 +m 0 -1 +l 0 -2 +l 8 -2 +l 8 -1 + +178 9 4 21 +m 0 7 +l 9 7 +l 9 -2 +l 0 -2 +l 0 7 +m 0 4 +l 3 7 +l 9 1 +l 6 -2 +l 0 4 +m 0 2 +l 5 7 +m 0 0 +l 7 7 +l 9 5 +l 2 -2 +l 0 0 +m 0 -2 +l 9 7 +m 4 -2 +l 9 3 + +179 1 0 2 +m 0 6 +l 0 -1 + +180 4 2 4 +m 0 2 +l 2 2 +m 2 6 +l 2 -1 + +181 4 2 6 +m 0 3 +l 2 3 +m 0 2 +l 2 2 +m 2 6 +l 2 -1 + +182 6 3 6 +m 0 2 +l 2 2 +m 2 6 +l 2 -1 +m 4 6 +l 4 -1 + +183 6 3 5 +m 0 2 +l 4 2 +l 4 -1 +m 2 2 +l 2 -1 + +184 4 2 5 +m 0 3 +l 2 3 +l 2 -1 +m 0 2 +l 2 2 + +185 6 3 8 +m 0 2 +l 2 2 +l 2 -1 +m 4 6 +l 4 -1 +m 0 3 +l 2 3 +l 2 6 + +186 6 3 4 +m 2 6 +l 2 -1 +m 4 6 +l 4 -1 + +187 6 3 6 +m 0 3 +l 4 3 +l 4 -1 +m 0 2 +l 2 2 +l 2 -1 + +188 6 3 6 +m 0 2 +l 4 2 +l 4 6 +m 0 3 +l 2 3 +l 2 6 + +189 6 3 5 +m 0 3 +l 4 3 +l 4 6 +m 2 3 +l 2 6 + +190 4 2 5 +m 0 2 +l 2 2 +l 2 6 +m 0 3 +l 2 3 + +191 0 0 3 +m 0 3 +l 2 3 +l 2 -1 + +192 2 1 3 +m 2 2 +l 0 2 +l 0 6 + +193 4 2 5 +m 0 2 +l 2 2 +l 2 6 +m 4 2 +l 2 2 + +194 4 2 5 +m 0 3 +l 2 3 +l 2 -1 +m 4 3 +l 2 3 + +195 2 1 4 +m 2 2 +l 0 2 +m 0 6 +l 0 -1 + +196 6 3 2 +m 0 2 +l 6 2 + +197 4 2 4 +m 0 2 +l 4 2 +m 2 6 +l 2 -1 + +198 2 1 6 +m 2 3 +l 0 3 +m 2 2 +l 0 2 +m 0 6 +l 0 -1 + +199 4 2 6 +m 4 2 +l 2 2 +m 2 6 +l 2 -1 +m 0 6 +l 0 -1 + +200 4 2 6 +m 4 2 +l 0 2 +l 0 6 +m 4 3 +l 2 3 +l 2 6 + +201 4 2 6 +m 4 3 +l 0 3 +l 0 -1 +m 4 2 +l 2 2 +l 2 -1 + +202 6 3 8 +m 0 2 +l 6 2 +m 2 6 +l 2 3 +l 0 3 +m 4 6 +l 4 3 +l 6 3 + +203 6 3 8 +m 0 3 +l 6 3 +m 2 -1 +l 2 2 +l 0 2 +m 6 2 +l 4 2 +l 4 -1 + +204 4 2 8 +m 4 2 +l 2 2 +l 2 -1 +m 0 6 +l 0 -1 +m 4 3 +l 2 3 +l 2 6 + +205 6 3 4 +m 0 2 +l 6 2 +m 0 3 +l 6 3 + +206 6 3 12 +m 0 2 +l 2 2 +l 2 -1 +m 0 3 +l 2 3 +l 2 6 +m 4 6 +l 4 3 +l 6 3 +m 4 -1 +l 4 2 +l 6 2 + +207 4 2 6 +m 0 2 +l 4 2 +m 0 3 +l 4 3 +m 2 6 +l 2 3 + +208 4 2 6 +m 0 3 +l 4 3 +m 1 6 +l 1 3 +m 3 6 +l 3 3 + +209 4 2 6 +m 0 3 +l 4 3 +m 0 2 +l 4 2 +m 2 -1 +l 2 2 + +210 4 2 6 +m 0 2 +l 4 2 +m 1 -1 +l 1 2 +m 3 -1 +l 3 2 + +211 4 2 5 +m 4 3 +l 0 3 +l 0 6 +m 2 3 +l 2 6 + +212 2 1 5 +m 2 2 +l 0 2 +l 0 6 +m 2 3 +l 0 3 + +213 2 1 5 +m 2 3 +l 0 3 +l 0 -1 +m 2 2 +l 0 2 + +214 4 2 5 +m 4 2 +l 0 2 +l 0 -1 +m 2 2 +l 2 -1 + +215 6 3 6 +m 0 2 +l 6 2 +m 2 6 +l 2 -1 +m 4 6 +l 4 -1 + +216 4 2 6 +m 0 2 +l 4 2 +m 2 6 +l 2 -1 +m 0 3 +l 4 3 + +217 4 2 3 +m 0 2 +l 2 2 +l 2 6 + +218 2 1 3 +m 2 3 +l 0 3 +l 0 -1 + +219 4 2 13 +m 0 6 +l 4 6 +l 4 0 +l 0 0 +l 0 6 +m 1 6 +l 1 0 +m 2 6 +l 2 0 +m 3 6 +l 3 0 +m 0 3 +l 4 3 + +220 4 2 11 +m 4 0 +l 0 0 +l 0 3 +l 4 3 +l 4 0 +m 3 3 +l 3 0 +m 2 3 +l 2 0 +m 1 3 +l 1 0 + +221 2 1 7 +m 0 0 +l 0 6 +l 2 6 +l 2 0 +l 0 0 +m 1 6 +l 1 0 + +222 4 2 7 +m 2 0 +l 2 6 +l 4 6 +l 4 0 +l 2 0 +m 3 6 +l 3 0 + +223 4 2 11 +m 4 3 +l 0 3 +l 0 6 +l 4 6 +l 4 3 +m 3 6 +l 3 3 +m 2 6 +l 2 3 +m 1 6 +l 1 3 + +224 7 3 10 +m 5 4 +l 4 2 +l 2 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +l 2 0 +l 4 2 +l 5 0 + +225 5 2 10 +m 2 3 +l 3 3 +l 4 4 +l 3 5 +l 0 5 +l 0 -1 +m 3 3 +l 4 2 +l 3 1 +l 0 1 + +226 5 2 4 +m 0 0 +l 0 4 +l 3 4 +l 3 3 + +227 7 3 6 +m 1 4 +l 1 0 +m 4 4 +l 4 0 +m 0 4 +l 5 4 + +228 6 3 7 +m 4 1 +l 4 0 +l 0 0 +l 2 3 +l 0 6 +l 4 6 +l 4 5 + +229 7 3 11 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +l 2 4 +l 5 4 + +230 6 3 9 +m 1 3 +l 1 1 +l 2 0 +l 3 0 +l 4 1 +l 4 3 +m 1 1 +l 1 -1 +l 0 -2 + +231 7 3 8 +m 0 2 +l 0 3 +l 1 4 +l 2 4 +l 3 3 +l 3 -1 +m 3 2 +l 5 4 + +232 6 3 17 +m 0 6 +l 4 6 +m 1 4 +l 3 4 +l 4 3 +l 4 2 +l 3 1 +l 1 1 +l 0 2 +l 0 3 +l 1 4 +m 2 4 +l 2 6 +m 2 1 +l 2 -1 +m 0 -1 +l 4 -1 + +233 6 3 13 +m 1 6 +l 0 5 +l 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 5 +l 3 6 +l 1 6 +m 0 4 +l 1 3 +l 3 3 +l 4 4 + +234 6 3 12 +m 0 0 +l 1 0 +l 1 2 +l 0 3 +l 0 5 +l 1 6 +l 3 6 +l 4 5 +l 4 3 +l 3 2 +l 3 0 +l 4 0 + +235 5 2 13 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 2 3 +l 0 6 +l 3 6 +l 3 5 + +236 8 4 17 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 3 1 +l 4 0 +l 5 0 +l 6 1 +l 6 2 +l 5 3 +l 4 3 +l 3 2 + +237 6 3 11 +m 1 0 +l 3 0 +l 4 1 +l 4 3 +l 3 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +m 0 0 +l 4 4 + +238 5 2 8 +m 3 6 +l 1 6 +l 0 5 +l 0 1 +l 1 0 +l 3 0 +m 0 3 +l 2 3 + +239 6 3 6 +m 0 0 +l 0 5 +l 1 6 +l 3 6 +l 4 5 +l 4 0 + +240 6 3 6 +m 0 3 +l 4 3 +m 0 1 +l 4 1 +m 4 5 +l 0 5 + +241 6 3 6 +m 0 0 +l 4 0 +m 0 4 +l 4 4 +m 2 6 +l 2 2 + +242 6 3 5 +m 0 0 +l 4 0 +m 0 6 +l 4 4 +l 0 2 + +243 6 3 5 +m 4 0 +l 0 0 +m 4 6 +l 0 4 +l 4 2 + +244 5 2 5 +m 3 5 +l 2 6 +l 1 6 +l 0 5 +l 0 -2 + +245 5 2 5 +m 0 -1 +l 1 -2 +l 2 -2 +l 3 -1 +l 3 6 + +246 5 2 12 +m 1 6 +l 1 5 +l 2 5 +l 2 6 +l 1 6 +m 1 1 +l 2 1 +l 2 0 +l 1 0 +l 1 1 +m 0 3 +l 3 3 + +247 5 2 8 +m 0 3 +l 1 4 +l 2 3 +l 3 4 +m 0 1 +l 1 2 +l 2 1 +l 3 2 + +248 5 2 9 +m 1 6 +l 2 6 +l 3 5 +l 3 4 +l 2 3 +l 1 3 +l 0 4 +l 0 5 +l 1 6 + +249 3 1 5 +m 0 2 +l 1 2 +l 1 0 +l 0 0 +l 0 2 + +250 3 1 5 +m 0 1 +l 1 1 +l 1 0 +l 0 0 +l 0 1 + +251 6 3 5 +m 5 5 +l 5 6 +l 2 6 +l 2 0 +l 0 2 + +252 6 3 5 +m 0 3 +l 0 6 +l 3 6 +l 4 5 +l 4 3 + +253 4 2 6 +m 0 5 +l 0 6 +l 2 6 +l 2 5 +l 0 3 +l 2 3 + +254 4 2 7 +m 0 0 +l 0 3 +l 2 3 +l 2 0 +l 0 0 +m 1 3 +l 1 0 diff --git a/cd/etc/vectorfont24.txt b/cd/etc/vectorfont24.txt new file mode 100755 index 0000000..1bf8399 --- /dev/null +++ b/cd/etc/vectorfont24.txt @@ -0,0 +1,6167 @@ +Sanserif I +25 25 12 -7 + + +32 16 8 0 + +33 8 4 20 +m 1 21 +l 1 7 +l 2 7 +m 1 21 +l 2 21 +l 2 7 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +34 16 8 13 +m 0 14 +l 2 20 +l 1 21 +l 0 20 +l 0 14 +l 1 20 +m 10 21 +l 9 20 +l 9 14 +l 11 20 +l 10 21 +m 10 20 +l 9 14 + +35 20 10 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 18 9 46 +m 6 25 +l 6 -4 +l 7 -4 +m 6 25 +l 7 25 +l 7 -4 +m 11 18 +l 13 18 +l 11 20 +l 8 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 10 9 +l 11 8 +l 12 6 +l 12 4 +l 11 2 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +m 11 18 +l 10 19 +l 8 20 +l 5 20 +l 2 19 +l 1 18 +l 1 16 +l 2 14 +l 10 10 +l 12 8 +l 13 6 +l 13 4 +l 12 2 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 0 3 +l 2 3 +m 12 3 +l 9 1 + +37 23 11 29 +m 18 21 +l 0 0 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 24 12 66 +m 19 14 +l 17 14 +l 15 13 +l 14 11 +l 12 5 +l 11 3 +l 10 2 +l 8 1 +l 4 1 +l 2 2 +l 1 4 +l 1 6 +l 2 8 +l 3 9 +l 8 12 +l 10 14 +l 11 16 +l 11 18 +l 10 20 +l 8 21 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 4 +l 15 1 +l 17 0 +l 19 0 +m 19 14 +l 19 13 +l 17 13 +l 15 12 +m 16 13 +l 15 11 +l 13 5 +l 12 3 +l 10 1 +l 8 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 1 8 +l 3 10 +l 8 13 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +m 10 19 +l 8 20 +l 7 20 +l 5 19 +m 6 20 +l 5 18 +l 5 16 +l 6 13 +l 8 10 +l 13 4 +l 15 2 +l 17 1 +l 19 1 +l 19 0 + +39 7 3 8 +m 1 21 +l 0 20 +l 0 14 +m 1 20 +l 0 14 +m 1 21 +l 2 20 +l 0 14 + +40 13 6 22 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 +l 8 -7 +m 7 25 +l 8 25 +l 6 23 +l 4 20 +l 2 16 +l 1 11 +l 1 7 +l 2 2 +l 4 -2 +l 6 -5 +l 8 -7 + +41 13 6 22 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 +l 1 -7 +m 0 25 +l 1 25 +l 3 23 +l 5 20 +l 7 16 +l 8 11 +l 8 7 +l 7 2 +l 5 -2 +l 3 -5 +l 1 -7 + +42 15 7 30 +m 5 21 +l 4 20 +l 6 10 +l 5 9 +m 5 21 +l 5 9 +m 5 21 +l 6 20 +l 4 10 +l 5 9 +m 0 18 +l 1 18 +l 9 12 +l 10 12 +m 0 18 +l 10 12 +m 0 18 +l 0 17 +l 10 13 +l 10 12 +m 10 18 +l 9 18 +l 1 12 +l 0 12 +m 10 18 +l 0 12 +m 10 18 +l 10 17 +l 0 13 +l 0 12 + +43 22 11 12 +m 8 18 +l 8 1 +l 9 1 +m 8 18 +l 9 18 +l 9 1 +m 0 10 +l 17 10 +l 17 9 +m 0 10 +l 0 9 +l 17 9 + +44 8 4 20 +m 3 1 +l 2 0 +l 1 0 +l 0 1 +l 0 2 +l 1 3 +l 2 3 +l 3 2 +l 3 -1 +l 2 -3 +l 0 -4 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 +m 2 0 +l 3 -1 +m 3 1 +l 2 -3 + +45 22 11 6 +m 0 10 +l 17 10 +l 17 9 +m 0 10 +l 0 9 +l 17 9 + +46 8 4 14 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +47 24 12 6 +m 18 25 +l 0 -7 +l 1 -7 +m 18 25 +l 19 25 +l 1 -7 + +48 19 9 37 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 +m 4 20 +l 2 17 +l 1 12 +l 1 9 +l 2 4 +l 4 1 +m 3 2 +l 6 1 +l 8 1 +l 11 2 +m 10 1 +l 12 4 +l 13 9 +l 13 12 +l 12 17 +l 10 20 +m 11 19 +l 8 20 +l 6 20 +l 3 19 + +49 10 5 10 +m 0 17 +l 2 18 +l 5 21 +l 5 0 +m 0 17 +l 0 16 +l 2 17 +l 4 19 +l 4 0 +l 5 0 + +50 19 9 30 +m 1 16 +l 1 17 +l 2 19 +l 3 20 +l 5 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 10 10 +l 1 0 +m 1 16 +l 2 16 +l 2 17 +l 3 19 +l 5 20 +l 9 20 +l 11 19 +l 12 17 +l 12 15 +l 11 13 +l 9 10 +l 0 0 +m 1 1 +l 14 1 +l 14 0 +m 0 0 +l 14 0 + +51 19 9 40 +m 2 21 +l 13 21 +l 6 12 +m 2 21 +l 2 20 +l 12 20 +m 12 21 +l 5 12 +m 6 13 +l 8 13 +l 11 12 +l 13 10 +l 14 7 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 1 4 +m 5 12 +l 8 12 +l 11 11 +l 13 8 +m 9 12 +l 12 10 +l 13 7 +l 13 6 +l 12 3 +l 9 1 +m 13 5 +l 11 2 +l 8 1 +l 5 1 +l 2 2 +l 1 4 +m 4 1 +l 1 3 + +52 20 10 13 +m 10 18 +l 10 0 +l 11 0 +m 11 21 +l 11 0 +m 11 21 +l 0 5 +l 15 5 +m 10 18 +l 1 5 +m 1 6 +l 15 6 +l 15 5 + +53 19 9 44 +m 2 21 +l 1 12 +m 3 20 +l 2 13 +m 2 21 +l 12 21 +l 12 20 +m 3 20 +l 12 20 +m 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 1 4 +m 1 12 +l 2 12 +l 4 13 +l 8 13 +l 11 12 +l 13 9 +m 9 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 9 1 +m 13 5 +l 11 2 +l 8 1 +l 5 1 +l 2 2 +l 1 4 +m 4 1 +l 1 3 + +54 18 9 55 +m 10 20 +l 11 18 +l 12 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 7 +l 1 3 +l 3 1 +l 6 0 +l 7 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 7 13 +l 6 13 +l 3 12 +l 1 10 +m 11 19 +l 8 20 +l 6 20 +l 3 19 +m 4 20 +l 2 17 +l 1 12 +l 1 7 +l 2 3 +l 5 1 +m 1 5 +l 3 2 +l 6 1 +l 7 1 +l 10 2 +l 12 5 +m 8 1 +l 11 3 +l 12 6 +l 12 7 +l 11 10 +l 8 12 +m 12 8 +l 10 11 +l 7 12 +l 6 12 +l 3 11 +l 1 8 +m 5 12 +l 2 10 +l 1 7 + +55 19 9 9 +m 0 21 +l 14 21 +l 4 0 +m 0 21 +l 0 20 +l 13 20 +m 13 21 +l 3 0 +l 4 0 + +56 19 9 63 +m 5 21 +l 2 20 +l 1 18 +l 1 16 +l 2 14 +l 3 13 +l 5 12 +l 9 11 +l 11 10 +l 12 9 +l 13 7 +l 13 4 +l 12 2 +l 9 1 +l 5 1 +l 2 2 +l 1 4 +l 1 7 +l 2 9 +l 3 10 +l 5 11 +l 9 12 +l 11 13 +l 12 14 +l 13 16 +l 13 18 +l 12 20 +l 9 21 +l 5 21 +m 3 20 +l 2 18 +l 2 16 +l 3 14 +l 5 13 +l 9 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 7 +l 1 9 +l 3 11 +l 5 12 +l 9 13 +l 11 14 +l 12 16 +l 12 18 +l 11 20 +m 12 19 +l 9 20 +l 5 20 +l 2 19 +m 1 3 +l 4 1 +m 10 1 +l 13 3 + +57 18 9 55 +m 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 7 21 +l 10 20 +l 12 18 +l 13 14 +l 13 9 +l 12 4 +l 10 1 +l 7 0 +l 5 0 +l 2 1 +l 1 3 +l 2 3 +l 3 1 +m 12 14 +l 11 11 +l 8 9 +m 12 13 +l 10 10 +l 7 9 +l 6 9 +l 3 10 +l 1 13 +m 5 9 +l 2 11 +l 1 14 +l 1 15 +l 2 18 +l 5 20 +m 1 16 +l 3 19 +l 6 20 +l 7 20 +l 10 19 +l 12 16 +m 8 20 +l 11 18 +l 12 14 +l 12 9 +l 11 4 +l 9 1 +m 10 2 +l 7 1 +l 5 1 +l 2 2 + +58 8 4 28 +m 1 14 +l 0 13 +l 0 12 +l 1 11 +l 2 11 +l 3 12 +l 3 13 +l 2 14 +l 1 14 +m 1 13 +l 1 12 +l 2 12 +l 2 13 +l 1 13 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +59 8 4 34 +m 1 14 +l 0 13 +l 0 12 +l 1 11 +l 2 11 +l 3 12 +l 3 13 +l 2 14 +l 1 14 +m 1 13 +l 1 12 +l 2 12 +l 2 13 +l 1 13 +m 3 1 +l 2 0 +l 1 0 +l 0 1 +l 0 2 +l 1 3 +l 2 3 +l 3 2 +l 3 -1 +l 2 -3 +l 0 -4 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 +m 2 0 +l 3 -1 +m 3 1 +l 2 -3 + +60 21 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 22 11 12 +m 0 14 +l 17 14 +l 17 13 +m 0 14 +l 0 13 +l 17 13 +m 0 6 +l 17 6 +l 17 5 +m 0 6 +l 0 5 +l 17 5 + +62 21 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 18 9 50 +m 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 8 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 11 12 +l 9 11 +l 6 10 +m 0 16 +l 1 16 +l 1 17 +l 2 19 +l 5 20 +l 8 20 +l 11 19 +l 12 17 +l 12 15 +l 11 13 +l 9 12 +l 6 11 +m 1 18 +l 4 20 +m 9 20 +l 12 18 +m 12 14 +l 8 11 +m 6 11 +l 6 7 +l 7 7 +l 7 11 +m 6 3 +l 5 2 +l 5 1 +l 6 0 +l 7 0 +l 8 1 +l 8 2 +l 7 3 +l 6 3 +m 6 2 +l 6 1 +l 7 1 +l 7 2 +l 6 2 + +64 26 13 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 21 10 11 +m 8 21 +l 0 0 +l 1 0 +l 8 18 +l 15 0 +l 16 0 +l 8 21 +m 3 6 +l 13 6 +m 2 5 +l 14 5 + +66 18 9 38 +m 0 21 +l 0 0 +m 1 20 +l 1 1 +m 0 21 +l 8 21 +l 11 20 +l 12 19 +l 13 17 +l 13 14 +l 12 12 +l 11 11 +l 8 10 +m 1 20 +l 8 20 +l 11 19 +l 12 17 +l 12 14 +l 11 12 +l 8 11 +m 1 11 +l 8 11 +l 11 10 +l 12 9 +l 13 7 +l 13 4 +l 12 2 +l 11 1 +l 8 0 +l 0 0 +m 1 10 +l 8 10 +l 11 9 +l 12 7 +l 12 4 +l 11 2 +l 8 1 +l 1 1 + +67 20 10 36 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +m 15 16 +l 14 16 +l 13 18 +l 12 19 +l 10 20 +l 6 20 +l 4 19 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 4 2 +l 6 1 +l 10 1 +l 12 2 +l 13 3 +l 14 5 +l 15 5 + +68 19 9 28 +m 0 21 +l 0 0 +m 1 20 +l 1 1 +m 0 21 +l 7 21 +l 10 20 +l 12 18 +l 13 16 +l 14 13 +l 14 8 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 0 0 +m 1 20 +l 7 20 +l 10 19 +l 11 18 +l 12 16 +l 13 13 +l 13 8 +l 12 5 +l 11 3 +l 10 2 +l 7 1 +l 1 1 + +69 17 8 19 +m 0 21 +l 0 0 +m 1 20 +l 1 1 +m 0 21 +l 12 21 +m 1 20 +l 12 20 +l 12 21 +m 1 11 +l 7 11 +l 7 10 +m 1 10 +l 7 10 +m 1 1 +l 12 1 +l 12 0 +m 0 0 +l 12 0 + +70 17 8 15 +m 0 21 +l 0 0 +m 1 20 +l 1 0 +l 0 0 +m 0 21 +l 12 21 +m 1 20 +l 12 20 +l 12 21 +m 1 11 +l 7 11 +l 7 10 +m 1 10 +l 7 10 + +71 20 10 42 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 15 9 +l 10 9 +m 15 16 +l 14 16 +l 13 18 +l 12 19 +l 10 20 +l 6 20 +l 4 19 +l 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +l 4 2 +l 6 1 +l 10 1 +l 12 2 +l 13 3 +l 14 5 +l 14 8 +l 10 8 +l 10 9 + +72 19 9 16 +m 0 21 +l 0 0 +m 0 21 +l 1 21 +l 1 0 +l 0 0 +m 14 21 +l 13 21 +l 13 0 +l 14 0 +m 14 21 +l 14 0 +m 1 11 +l 13 11 +m 1 10 +l 13 10 + +73 6 3 6 +m 0 21 +l 0 0 +l 1 0 +m 0 21 +l 1 21 +l 1 0 + +74 15 7 18 +m 9 21 +l 9 5 +l 8 2 +l 6 1 +l 4 1 +l 2 2 +l 1 5 +l 0 5 +m 9 21 +l 10 21 +l 10 5 +l 9 2 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 2 +l 0 5 + +75 19 9 16 +m 0 21 +l 0 0 +l 1 0 +m 0 21 +l 1 21 +l 1 0 +m 14 21 +l 13 21 +l 1 9 +m 14 21 +l 1 8 +m 4 12 +l 13 0 +l 14 0 +m 5 12 +l 14 0 + +76 17 8 10 +m 0 21 +l 0 0 +m 0 21 +l 1 21 +l 1 1 +m 1 1 +l 12 1 +l 12 0 +m 0 0 +l 12 0 + +77 21 10 18 +m 0 21 +l 0 0 +m 1 16 +l 1 0 +l 0 0 +m 1 16 +l 8 0 +m 0 21 +l 8 3 +m 16 21 +l 8 3 +m 15 16 +l 8 0 +m 15 16 +l 15 0 +l 16 0 +m 16 21 +l 16 0 + +78 19 9 14 +m 0 21 +l 0 0 +m 1 18 +l 1 0 +l 0 0 +m 1 18 +l 14 0 +m 0 21 +l 13 3 +m 13 21 +l 13 3 +m 13 21 +l 14 21 +l 14 0 + +79 21 10 38 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 7 20 +l 4 19 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 4 2 +l 7 1 +l 9 1 +l 12 2 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 12 19 +l 9 20 +l 7 20 + +80 18 9 23 +m 0 21 +l 0 0 +m 1 20 +l 1 0 +l 0 0 +m 0 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 14 +l 12 12 +l 11 11 +l 9 10 +l 1 10 +m 1 20 +l 9 20 +l 11 19 +l 12 17 +l 12 14 +l 11 12 +l 9 11 +l 1 11 + +81 21 10 44 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 7 20 +l 4 19 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 4 2 +l 7 1 +l 9 1 +l 12 2 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 12 19 +l 9 20 +l 7 20 +m 9 3 +l 14 -2 +l 15 -2 +m 9 3 +l 10 3 +l 15 -2 + +82 18 9 28 +m 0 21 +l 0 0 +m 1 20 +l 1 0 +l 0 0 +m 0 21 +l 8 21 +l 11 20 +l 12 19 +l 13 17 +l 13 14 +l 12 12 +l 11 11 +l 8 10 +l 1 10 +m 1 20 +l 8 20 +l 11 19 +l 12 17 +l 12 14 +l 11 12 +l 8 11 +l 1 11 +m 6 10 +l 12 0 +l 13 0 +m 7 10 +l 13 0 + +83 19 9 41 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 9 10 +l 11 9 +l 12 8 +l 13 6 +l 13 3 +l 12 2 +l 9 1 +l 5 1 +l 3 2 +l 2 3 +l 0 3 +m 14 18 +l 12 18 +l 11 19 +l 9 20 +l 5 20 +l 2 19 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 9 11 +l 11 10 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +84 18 9 11 +m 6 20 +l 6 0 +m 7 20 +l 7 0 +l 6 0 +m 0 21 +l 13 21 +l 13 20 +m 0 21 +l 0 20 +l 13 20 + +85 19 9 22 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +m 0 21 +l 1 21 +l 1 6 +l 2 3 +l 3 2 +l 6 1 +l 8 1 +l 11 2 +l 12 3 +l 13 6 +l 13 21 +l 14 21 + +86 21 10 10 +m 0 21 +l 8 0 +m 0 21 +l 1 21 +l 8 3 +m 16 21 +l 15 21 +l 8 3 +m 16 21 +l 8 0 + +87 27 13 18 +m 0 21 +l 6 0 +m 0 21 +l 1 21 +l 6 3 +m 11 21 +l 6 3 +m 11 18 +l 6 0 +m 11 18 +l 16 0 +m 11 21 +l 16 3 +m 22 21 +l 21 21 +l 16 3 +m 22 21 +l 16 0 + +88 19 9 12 +m 0 21 +l 13 0 +l 14 0 +m 0 21 +l 1 21 +l 14 0 +m 14 21 +l 13 21 +l 0 0 +m 14 21 +l 1 0 +l 0 0 + +89 20 10 13 +m 0 21 +l 7 11 +l 7 0 +l 8 0 +m 0 21 +l 1 21 +l 8 11 +m 15 21 +l 14 21 +l 7 11 +m 15 21 +l 8 11 +l 8 0 + +90 19 9 14 +m 13 21 +l 0 0 +m 14 21 +l 1 0 +m 0 21 +l 14 21 +m 0 21 +l 0 20 +l 13 20 +m 1 1 +l 14 1 +l 14 0 +m 0 0 +l 14 0 + +91 12 6 8 +m 0 25 +l 0 -7 +m 1 25 +l 1 -7 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +92 24 12 5 +m 19 -7 +l 1 25 +l 0 25 +l 18 -7 +l 19 -7 + +93 12 6 8 +m 6 25 +l 6 -7 +m 7 25 +l 7 -7 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +94 18 9 7 +m 0 17 +l 1 17 +l 6 21 +l 12 17 +l 13 17 +l 6 22 +l 0 17 + +95 22 11 5 +m 17 0 +l 17 1 +l 0 1 +l 0 0 +l 17 0 + +96 7 3 7 +m 1 21 +l 0 20 +l 0 14 +l 2 20 +l 1 21 +m 1 20 +l 0 14 + +97 18 9 32 +m 12 14 +l 12 0 +l 13 0 +m 12 14 +l 13 14 +l 13 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 12 11 +l 8 13 +l 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 12 3 + +98 18 9 32 +m 0 21 +l 0 0 +l 1 0 +m 0 21 +l 1 21 +l 1 0 +m 1 11 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 10 1 +l 8 0 +l 5 0 +l 3 1 +l 1 3 +m 1 11 +l 5 13 +l 8 13 +l 10 12 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 10 2 +l 8 1 +l 5 1 +l 1 3 + +99 17 8 30 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 12 11 +l 11 10 +l 10 12 +l 8 13 +l 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 4 +l 12 3 + +100 18 9 32 +m 12 21 +l 12 0 +l 13 0 +m 12 21 +l 13 21 +l 13 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 12 11 +l 8 13 +l 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 12 3 + +101 17 8 34 +m 1 7 +l 12 7 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 1 8 +l 11 8 +l 11 10 +l 10 12 +l 8 13 +l 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 4 +l 12 3 + +102 13 6 19 +m 8 21 +l 6 21 +l 4 20 +l 3 17 +l 3 0 +l 4 0 +m 8 21 +l 8 20 +l 6 20 +l 4 19 +m 5 20 +l 4 17 +l 4 0 +m 0 14 +l 7 14 +l 7 13 +m 0 14 +l 0 13 +l 7 13 + +103 18 9 44 +m 13 14 +l 12 14 +l 12 -1 +l 11 -4 +l 10 -5 +l 8 -6 +l 6 -6 +l 4 -5 +l 3 -4 +l 1 -4 +m 13 14 +l 13 -1 +l 12 -4 +l 10 -6 +l 8 -7 +l 5 -7 +l 3 -6 +l 1 -4 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 12 11 +l 8 13 +l 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 12 3 + +104 17 8 21 +m 0 21 +l 0 0 +l 1 0 +m 0 21 +l 1 21 +l 1 0 +m 1 10 +l 4 13 +l 6 14 +l 9 14 +l 11 13 +l 12 10 +l 12 0 +m 1 10 +l 4 12 +l 6 13 +l 8 13 +l 10 12 +l 11 10 +l 11 0 +l 12 0 + +105 8 4 20 +m 1 21 +l 0 20 +l 0 19 +l 1 18 +l 2 18 +l 3 19 +l 3 20 +l 2 21 +l 1 21 +m 1 20 +l 1 19 +l 2 19 +l 2 20 +l 1 20 +m 1 14 +l 1 0 +l 2 0 +m 1 14 +l 2 14 +l 2 0 + +106 8 4 20 +m 1 21 +l 0 20 +l 0 19 +l 1 18 +l 2 18 +l 3 19 +l 3 20 +l 2 21 +l 1 21 +m 1 20 +l 1 19 +l 2 19 +l 2 20 +l 1 20 +m 1 14 +l 1 -7 +l 2 -7 +m 1 14 +l 2 14 +l 2 -7 + +107 17 8 16 +m 0 21 +l 0 0 +l 1 0 +m 0 21 +l 1 21 +l 1 0 +m 12 14 +l 11 14 +l 1 4 +m 12 14 +l 1 3 +m 4 7 +l 10 0 +l 12 0 +m 5 8 +l 12 0 + +108 6 3 6 +m 0 21 +l 0 0 +l 1 0 +m 0 21 +l 1 21 +l 1 0 + +109 28 14 36 +m 0 14 +l 0 0 +l 1 0 +m 0 14 +l 1 14 +l 1 0 +m 1 10 +l 4 13 +l 6 14 +l 9 14 +l 11 13 +l 12 10 +l 12 0 +m 1 10 +l 4 12 +l 6 13 +l 8 13 +l 10 12 +l 11 10 +l 11 0 +l 12 0 +m 12 10 +l 15 13 +l 17 14 +l 20 14 +l 22 13 +l 23 10 +l 23 0 +m 12 10 +l 15 12 +l 17 13 +l 19 13 +l 21 12 +l 22 10 +l 22 0 +l 23 0 + +110 17 8 21 +m 0 14 +l 0 0 +l 1 0 +m 0 14 +l 1 14 +l 1 0 +m 1 10 +l 4 13 +l 6 14 +l 9 14 +l 11 13 +l 12 10 +l 12 0 +m 1 10 +l 4 12 +l 6 13 +l 8 13 +l 10 12 +l 11 10 +l 11 0 +l 12 0 + +111 18 9 34 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 3 +l 12 6 +l 12 8 +l 11 11 +l 10 12 +l 8 13 +l 5 13 + +112 18 9 32 +m 0 14 +l 0 -7 +l 1 -7 +m 0 14 +l 1 14 +l 1 -7 +m 1 11 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 10 1 +l 8 0 +l 5 0 +l 3 1 +l 1 3 +m 1 11 +l 5 13 +l 8 13 +l 10 12 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 10 2 +l 8 1 +l 5 1 +l 1 3 + +113 18 9 32 +m 12 14 +l 12 -7 +l 13 -7 +m 12 14 +l 13 14 +l 13 -7 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +m 12 11 +l 8 13 +l 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 12 3 + +114 15 7 15 +m 0 14 +l 0 0 +l 1 0 +l 1 14 +l 0 14 +m 1 8 +l 2 11 +l 4 13 +l 6 14 +l 9 14 +l 9 13 +l 6 13 +l 4 12 +l 2 10 +l 1 8 + +115 16 8 42 +m 11 11 +l 10 13 +l 7 14 +l 4 14 +l 1 13 +l 0 11 +l 1 9 +l 3 8 +l 8 6 +l 10 5 +m 9 6 +l 10 4 +l 10 3 +l 9 1 +m 10 2 +l 7 1 +l 4 1 +l 1 2 +m 2 1 +l 1 3 +l 0 3 +m 11 11 +l 10 11 +l 9 13 +m 10 12 +l 7 13 +l 4 13 +l 1 12 +m 2 13 +l 1 11 +l 2 9 +m 1 10 +l 3 9 +l 8 7 +l 10 6 +l 11 4 +l 11 3 +l 10 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 + +116 12 6 12 +m 3 21 +l 3 0 +l 4 0 +m 3 21 +l 4 21 +l 4 0 +m 0 14 +l 7 14 +l 7 13 +m 0 14 +l 0 13 +l 7 13 + +117 17 8 21 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 0 14 +l 1 14 +l 1 4 +l 2 2 +l 4 1 +l 6 1 +l 8 2 +l 11 4 +m 11 14 +l 11 0 +l 12 0 +m 11 14 +l 12 14 +l 12 0 + +118 17 8 10 +m 0 14 +l 6 0 +m 0 14 +l 1 14 +l 6 2 +m 12 14 +l 11 14 +l 6 2 +m 12 14 +l 6 0 + +119 23 11 18 +m 0 14 +l 5 0 +m 0 14 +l 1 14 +l 5 3 +m 9 14 +l 5 3 +m 9 11 +l 5 0 +m 9 11 +l 13 0 +m 9 14 +l 13 3 +m 18 14 +l 17 14 +l 13 3 +m 18 14 +l 13 0 + +120 17 8 12 +m 0 14 +l 11 0 +l 12 0 +m 0 14 +l 1 14 +l 12 0 +m 12 14 +l 11 14 +l 0 0 +m 12 14 +l 1 0 +l 0 0 + +121 17 8 13 +m 0 14 +l 6 0 +m 0 14 +l 1 14 +l 6 2 +m 12 14 +l 11 14 +l 6 2 +l 2 -7 +m 12 14 +l 6 0 +l 3 -7 +l 2 -7 + +122 17 8 14 +m 10 13 +l 0 0 +m 12 14 +l 2 1 +m 0 14 +l 12 14 +m 0 14 +l 0 13 +l 10 13 +m 2 1 +l 12 1 +l 12 0 +m 0 0 +l 12 0 + +123 10 5 37 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +m 3 24 +l 2 22 +l 2 20 +l 3 18 +l 4 17 +l 5 15 +l 5 13 +l 4 11 +l 0 9 +l 4 7 +l 5 5 +l 5 3 +l 4 1 +l 3 0 +l 2 -2 +l 2 -4 +l 3 -6 +m 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 5 2 2 +m 0 25 +l 0 -7 + +125 10 5 37 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +m 2 24 +l 3 22 +l 3 20 +l 2 18 +l 1 17 +l 0 15 +l 0 13 +l 1 11 +l 5 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 2 0 +l 3 -2 +l 3 -4 +l 2 -6 +m 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 23 11 22 +m 0 6 +l 0 8 +l 1 11 +l 3 12 +l 5 12 +l 7 11 +l 11 8 +l 13 7 +l 15 7 +l 17 8 +l 18 10 +m 0 8 +l 1 10 +l 3 11 +l 5 11 +l 7 10 +l 11 7 +l 13 6 +l 15 6 +l 17 7 +l 18 10 +l 18 12 + +127 17 8 8 +m 0 7 +l 0 0 +l 12 0 +l 12 7 +l 6 16 +l 0 7 +m 6 7 +l 6 7 + +128 20 10 58 +m 15 17 +l 14 19 +l 12 21 +l 10 22 +l 6 22 +l 4 21 +l 2 19 +l 1 17 +l 0 14 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 10 1 +l 12 2 +l 14 4 +l 15 6 +l 14 6 +l 13 4 +l 12 3 +l 10 2 +l 6 2 +l 4 3 +l 2 6 +l 1 9 +l 1 14 +l 2 17 +l 4 20 +l 6 21 +l 10 21 +l 12 20 +l 13 19 +l 14 17 +l 15 17 +m 7 1 +l 7 -1 +l 9 -1 +l 11 -2 +l 12 -4 +l 12 -5 +l 9 -7 +m 11 -6 +l 8 -7 +l 5 -7 +l 4 -5 +l 3 -5 +l 4 -7 +l 5 -8 +l 8 -8 +l 11 -7 +l 13 -5 +l 13 -4 +l 12 -2 +l 11 -1 +l 9 0 +l 8 0 +l 8 1 + +129 17 8 47 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +l 8 2 +l 6 1 +l 4 1 +l 2 2 +l 1 4 +l 1 14 +l 0 14 +m 11 14 +l 11 0 +l 12 0 +l 12 14 +l 11 14 +m 1 20 +l 0 19 +l 0 18 +l 1 17 +l 2 17 +l 3 18 +l 3 19 +l 2 20 +l 1 20 +m 1 19 +l 1 18 +l 2 18 +l 2 19 +l 1 19 +m 9 20 +l 8 19 +l 8 18 +l 9 17 +l 10 17 +l 11 18 +l 11 19 +l 10 20 +l 9 20 +m 9 19 +l 9 18 +l 10 18 +l 10 19 +l 9 19 + +130 17 8 49 +m 1 7 +l 12 7 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 11 4 +l 10 2 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 1 8 +l 11 8 +l 11 10 +l 10 12 +l 8 13 +l 5 13 +l 3 12 +l 2 11 +l 1 8 +m 11 22 +l 10 21 +l 9 21 +l 8 22 +l 8 23 +l 9 24 +l 10 24 +l 11 23 +l 11 20 +l 9 18 +l 6 17 +m 9 23 +l 9 22 +l 10 22 +l 10 23 +l 9 23 + +131 18 9 36 +m 12 14 +l 12 0 +l 13 0 +l 13 14 +l 12 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 1 8 +l 2 11 +l 3 12 +l 5 13 +l 8 13 +l 12 11 +m 4 20 +l 6 23 +l 8 20 +m 1 17 +l 6 22 +l 11 17 + +132 18 9 58 +m 12 14 +l 12 0 +l 13 0 +l 13 14 +l 12 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 1 8 +l 2 11 +l 3 12 +l 5 13 +l 8 13 +l 12 11 +m 2 20 +l 1 19 +l 1 18 +l 2 17 +l 3 17 +l 4 18 +l 4 19 +l 3 20 +l 2 20 +m 2 19 +l 2 18 +l 3 18 +l 3 19 +l 2 19 +m 10 20 +l 9 19 +l 9 18 +l 10 17 +l 11 17 +l 12 18 +l 12 19 +l 11 20 +l 10 20 +m 10 19 +l 10 18 +l 11 18 +l 11 19 +l 10 19 + +133 18 9 46 +m 12 14 +l 12 0 +l 13 0 +l 13 14 +l 12 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 1 8 +l 2 11 +l 3 12 +l 5 13 +l 8 13 +l 12 11 +m 3 22 +l 4 21 +l 5 21 +l 6 22 +l 6 23 +l 5 24 +l 4 24 +l 3 23 +l 3 20 +l 5 18 +l 8 17 +m 5 23 +l 5 22 +l 4 22 +l 4 23 +l 5 23 + +134 18 9 44 +m 12 14 +l 12 0 +l 13 0 +l 13 14 +l 12 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 1 8 +l 2 11 +l 3 12 +l 5 13 +l 8 13 +l 12 11 +m 7 20 +l 6 19 +l 6 18 +l 7 17 +l 8 17 +l 9 18 +l 9 19 +l 8 20 +l 7 20 +m 7 19 +l 7 18 +l 8 18 +l 8 19 +l 7 19 + +135 17 8 50 +m 0 8 +l 1 5 +l 3 3 +l 5 2 +l 8 2 +l 10 3 +l 12 5 +l 11 6 +l 10 4 +l 8 3 +l 5 3 +l 3 4 +l 2 5 +l 1 8 +l 2 11 +l 3 12 +l 5 13 +l 8 13 +l 10 12 +l 11 10 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +m 8 -5 +l 5 -6 +l 2 -6 +l 1 -4 +l 0 -4 +l 1 -6 +l 2 -7 +l 5 -7 +l 8 -6 +l 10 -4 +l 10 -3 +l 9 -1 +l 8 0 +l 6 1 +l 5 1 +l 5 2 +m 6 -6 +l 9 -4 +l 9 -3 +l 8 -1 +l 6 0 +l 4 0 +l 4 3 + +136 17 8 39 +m 1 7 +l 12 7 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 11 4 +l 10 2 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 1 8 +l 11 8 +l 11 10 +l 10 12 +l 8 13 +l 5 13 +l 3 12 +l 2 11 +l 1 8 +m 4 20 +l 6 23 +l 8 20 +m 1 17 +l 6 22 +l 11 17 + +137 17 8 61 +m 1 7 +l 12 7 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 11 4 +l 10 2 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 1 8 +l 11 8 +l 11 10 +l 10 12 +l 8 13 +l 5 13 +l 3 12 +l 2 11 +l 1 8 +m 2 20 +l 1 19 +l 1 18 +l 2 17 +l 3 17 +l 4 18 +l 4 19 +l 3 20 +l 2 20 +m 2 19 +l 2 18 +l 3 18 +l 3 19 +l 2 19 +m 10 20 +l 9 19 +l 9 18 +l 10 17 +l 11 17 +l 12 18 +l 12 19 +l 11 20 +l 10 20 +m 10 19 +l 10 18 +l 11 18 +l 11 19 +l 10 19 + +138 17 8 49 +m 1 7 +l 12 7 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 11 4 +l 10 2 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 1 8 +l 11 8 +l 11 10 +l 10 12 +l 8 13 +l 5 13 +l 3 12 +l 2 11 +l 1 8 +m 2 22 +l 3 21 +l 4 21 +l 5 22 +l 5 23 +l 4 24 +l 3 24 +l 2 23 +l 2 20 +l 4 18 +l 7 17 +m 4 23 +l 4 22 +l 3 22 +l 3 23 +l 4 23 + +139 16 8 33 +m 5 14 +l 5 0 +l 6 0 +l 6 14 +l 5 14 +m 1 20 +l 0 19 +l 0 18 +l 1 17 +l 2 17 +l 3 18 +l 3 19 +l 2 20 +l 1 20 +m 1 19 +l 1 18 +l 2 18 +l 2 19 +l 1 19 +m 9 20 +l 8 19 +l 8 18 +l 9 17 +l 10 17 +l 11 18 +l 11 19 +l 10 20 +l 9 20 +m 9 19 +l 9 18 +l 10 18 +l 10 19 +l 9 19 + +140 15 7 11 +m 5 14 +l 5 0 +l 6 0 +l 6 14 +l 5 14 +m 3 20 +l 5 23 +l 7 20 +m 0 17 +l 5 22 +l 10 17 + +141 10 5 21 +m 4 14 +l 4 0 +l 5 0 +l 5 14 +l 4 14 +m 0 22 +l 1 21 +l 2 21 +l 3 22 +l 3 23 +l 2 24 +l 1 24 +l 0 23 +l 0 20 +l 2 18 +l 5 17 +m 2 23 +l 2 22 +l 1 22 +l 1 23 +l 2 23 + +142 21 10 39 +m 8 21 +l 0 0 +l 1 0 +l 8 18 +l 15 0 +l 16 0 +l 8 21 +m 3 6 +l 13 6 +m 2 5 +l 14 5 +m 4 26 +l 3 25 +l 3 24 +l 4 23 +l 5 23 +l 6 24 +l 6 25 +l 5 26 +l 4 26 +m 4 25 +l 4 24 +l 5 24 +l 5 25 +l 4 25 +m 11 26 +l 10 25 +l 10 24 +l 11 23 +l 12 23 +l 13 24 +l 13 25 +l 12 26 +l 11 26 +m 11 25 +l 11 24 +l 12 24 +l 12 25 +l 11 25 + +143 21 10 25 +m 8 21 +l 0 0 +l 1 0 +l 8 18 +l 15 0 +l 16 0 +l 8 21 +m 3 6 +l 13 6 +m 2 5 +l 14 5 +m 7 27 +l 6 26 +l 6 25 +l 7 24 +l 8 24 +l 9 25 +l 9 26 +l 8 27 +l 7 27 +m 7 26 +l 7 25 +l 8 25 +l 8 26 +l 7 26 + +144 17 8 29 +m 0 0 +l 12 0 +l 12 1 +l 1 1 +l 1 7 +l 7 7 +l 7 8 +l 1 8 +l 1 14 +l 12 14 +l 12 15 +l 0 15 +l 0 0 +m 9 23 +l 8 22 +l 7 22 +l 6 23 +l 6 24 +l 7 25 +l 8 25 +l 9 24 +l 9 21 +l 7 19 +l 4 18 +m 7 24 +l 7 23 +l 8 23 +l 8 24 +l 7 24 + +145 30 15 65 +m 12 14 +l 12 0 +l 13 0 +l 13 14 +l 12 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 1 8 +l 2 11 +l 3 12 +l 5 13 +l 8 13 +l 12 11 +m 13 8 +l 14 11 +l 16 13 +l 18 14 +l 21 14 +l 23 13 +l 25 10 +l 25 7 +l 14 7 +m 18 13 +l 21 13 +l 23 12 +l 24 10 +l 24 8 +l 14 8 +l 15 11 +l 16 12 +l 18 13 +m 20 13 +l 20 13 +m 14 8 +l 14 6 +l 15 3 +l 16 2 +l 18 1 +l 21 1 +l 23 2 +l 24 4 +l 25 3 +l 23 1 +l 21 0 +l 18 0 +l 16 1 +l 14 3 +l 13 6 + +146 27 13 21 +m 10 21 +l 10 0 +l 22 0 +l 22 1 +l 11 1 +l 11 10 +l 17 10 +l 17 11 +l 11 11 +l 11 20 +l 22 20 +l 22 21 +l 8 21 +l 0 0 +l 1 0 +l 8 18 +l 10 18 +m 10 6 +l 4 6 +m 10 5 +l 3 5 + +147 18 9 40 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 3 +l 12 6 +l 12 8 +l 11 11 +l 10 12 +l 8 13 +l 5 13 +m 4 20 +l 6 23 +l 8 20 +m 1 17 +l 6 22 +l 11 17 + +148 18 9 62 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 3 +l 12 6 +l 12 8 +l 11 11 +l 10 12 +l 8 13 +l 5 13 +m 2 19 +l 1 18 +l 1 17 +l 2 16 +l 3 16 +l 4 17 +l 4 18 +l 3 19 +l 2 19 +m 2 18 +l 2 17 +l 3 17 +l 3 18 +l 2 18 +m 10 19 +l 9 18 +l 9 17 +l 10 16 +l 11 16 +l 12 17 +l 12 18 +l 11 19 +l 10 19 +m 10 18 +l 10 17 +l 11 17 +l 11 18 +l 10 18 + +149 18 9 50 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 3 +l 12 6 +l 12 8 +l 11 11 +l 10 12 +l 8 13 +l 5 13 +m 3 22 +l 4 21 +l 5 21 +l 6 22 +l 6 23 +l 5 24 +l 4 24 +l 3 23 +l 3 20 +l 5 18 +l 8 17 +m 5 23 +l 5 22 +l 4 22 +l 4 23 +l 5 23 + +150 17 8 25 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +l 8 2 +l 6 1 +l 4 1 +l 2 2 +l 1 4 +l 1 14 +l 0 14 +m 11 14 +l 11 0 +l 12 0 +l 12 14 +l 11 14 +m 4 20 +l 6 23 +l 8 20 +m 1 17 +l 6 22 +l 11 17 + +151 17 8 35 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +l 8 2 +l 6 1 +l 4 1 +l 2 2 +l 1 4 +l 1 14 +l 0 14 +m 11 14 +l 11 0 +l 12 0 +l 12 14 +l 11 14 +m 3 22 +l 4 21 +l 5 21 +l 6 22 +l 6 23 +l 5 24 +l 4 24 +l 3 23 +l 3 20 +l 5 18 +l 8 17 +m 5 23 +l 5 22 +l 4 22 +l 4 23 +l 5 23 + +152 17 8 39 +m 0 14 +l 6 0 +l 3 -7 +l 2 -7 +l 6 2 +l 1 14 +l 0 14 +m 6 0 +l 12 14 +l 11 14 +l 6 2 +m 1 20 +l 0 19 +l 0 18 +l 1 17 +l 2 17 +l 3 18 +l 3 19 +l 2 20 +l 1 20 +m 1 19 +l 1 18 +l 2 18 +l 2 19 +l 1 19 +m 9 20 +l 8 19 +l 8 18 +l 9 17 +l 10 17 +l 11 18 +l 11 19 +l 10 20 +l 9 20 +m 9 19 +l 9 18 +l 10 18 +l 10 19 +l 9 19 + +153 21 10 66 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 7 20 +l 4 19 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 4 2 +l 7 1 +l 9 1 +l 12 2 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 12 19 +l 9 20 +l 7 20 +m 13 27 +l 12 26 +l 12 25 +l 13 24 +l 14 24 +l 15 25 +l 15 26 +l 14 27 +l 13 27 +m 13 26 +l 13 25 +l 14 25 +l 14 26 +l 13 26 +m 2 27 +l 1 26 +l 1 25 +l 2 24 +l 3 24 +l 4 25 +l 4 26 +l 3 27 +l 2 27 +m 2 26 +l 2 25 +l 3 25 +l 3 26 +l 2 26 + +154 19 9 49 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 +l 13 21 +l 13 6 +l 12 3 +l 11 2 +l 8 1 +l 6 1 +l 3 2 +l 2 3 +l 1 6 +l 1 21 +l 0 21 +m 2 27 +l 1 26 +l 1 25 +l 2 24 +l 3 24 +l 4 25 +l 4 26 +l 3 27 +l 2 27 +m 2 26 +l 2 25 +l 3 25 +l 3 26 +l 2 26 +m 10 27 +l 9 26 +l 9 25 +l 10 24 +l 11 24 +l 12 25 +l 12 26 +l 11 27 +l 10 27 +m 10 26 +l 10 25 +l 11 25 +l 11 26 +l 10 26 + +155 19 9 41 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 3 +l 12 6 +l 12 8 +l 11 11 +l 10 12 +l 8 13 +l 5 13 +m 0 -4 +l 2 -4 +l 14 17 +l 12 17 +l 0 -4 +m 13 17 +l 1 -4 + +156 20 10 29 +m 3 0 +l 13 0 +l 15 1 +l 15 4 +l 14 5 +l 12 5 +l 12 4 +l 13 4 +l 14 3 +l 14 2 +l 12 1 +l 4 1 +l 4 16 +l 5 18 +l 6 19 +l 8 19 +l 9 18 +l 10 18 +l 10 19 +l 9 20 +l 6 20 +l 4 19 +l 3 16 +l 3 0 +m 0 11 +l 10 11 +l 9 12 +l 0 12 +l 0 11 + +157 24 12 43 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +l 11 0 +l 13 1 +l 15 3 +l 16 5 +l 17 8 +l 17 13 +l 16 16 +l 15 18 +l 13 20 +l 11 21 +l 7 21 +m 8 20 +l 5 19 +l 3 16 +l 2 13 +l 2 8 +l 3 5 +l 5 2 +l 8 1 +l 10 1 +l 13 2 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 13 19 +l 10 20 +l 8 20 +m 18 27 +l 0 -5 +l 1 -5 +l 19 27 +l 18 27 + +158 23 11 30 +m 1 14 +l 9 14 +l 11 15 +l 12 16 +l 13 18 +l 13 21 +l 12 23 +l 11 24 +l 9 25 +l 0 25 +l 0 0 +l 1 0 +l 1 24 +l 9 24 +l 11 23 +l 12 21 +l 12 18 +l 11 16 +l 9 15 +l 1 15 +m 10 12 +l 17 12 +l 17 11 +l 10 11 +l 10 12 +m 13 0 +l 13 16 +l 14 16 +l 14 0 +l 13 0 + +159 18 9 33 +m 6 13 +l 6 -2 +l 5 -4 +l 4 -5 +l 2 -5 +l 1 -4 +l 0 -4 +l 0 -5 +l 1 -6 +l 4 -6 +l 6 -5 +l 7 -2 +l 7 14 +m 7 13 +l 7 2 +m 7 3 +l 7 18 +l 8 20 +l 9 21 +l 11 21 +l 12 20 +l 13 20 +l 13 21 +l 12 22 +l 9 22 +l 7 21 +l 6 18 +l 6 2 +m 2 8 +l 12 8 +l 11 9 +l 2 9 +l 2 8 + +160 18 9 46 +m 12 14 +l 12 0 +l 13 0 +l 13 14 +l 12 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 1 8 +l 2 11 +l 3 12 +l 5 13 +l 8 13 +l 12 11 +m 11 22 +l 10 21 +l 9 21 +l 8 22 +l 8 23 +l 9 24 +l 10 24 +l 11 23 +l 11 20 +l 9 18 +l 6 17 +m 9 23 +l 9 22 +l 10 22 +l 10 23 +l 9 23 + +161 11 5 21 +m 1 14 +l 1 0 +l 2 0 +l 2 14 +l 1 14 +m 6 22 +l 5 21 +l 4 21 +l 3 22 +l 3 23 +l 4 24 +l 5 24 +l 6 23 +l 6 20 +l 4 18 +l 1 17 +m 4 23 +l 4 22 +l 5 22 +l 5 23 +l 4 23 + +162 18 9 50 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 3 +l 12 6 +l 12 8 +l 11 11 +l 10 12 +l 8 13 +l 5 13 +m 10 22 +l 9 21 +l 8 21 +l 7 22 +l 7 23 +l 8 24 +l 9 24 +l 10 23 +l 10 20 +l 8 18 +l 5 17 +m 8 23 +l 8 22 +l 9 22 +l 9 23 +l 8 23 + +163 17 8 35 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +l 8 2 +l 6 1 +l 4 1 +l 2 2 +l 1 4 +l 1 14 +l 0 14 +m 11 14 +l 11 0 +l 12 0 +l 12 14 +l 11 14 +m 9 22 +l 8 21 +l 7 21 +l 6 22 +l 6 23 +l 7 24 +l 8 24 +l 9 23 +l 9 20 +l 7 18 +l 4 17 +m 7 23 +l 7 22 +l 8 22 +l 8 23 +l 7 23 + +164 23 11 41 +m 3 14 +l 3 0 +l 4 0 +l 4 14 +l 3 14 +m 4 10 +l 7 13 +l 9 14 +l 12 14 +l 14 13 +l 15 10 +l 15 0 +l 14 0 +l 14 10 +l 13 12 +l 11 13 +l 9 13 +l 7 12 +l 4 10 +m 0 17 +l 0 19 +l 1 22 +l 3 23 +l 5 23 +l 7 22 +l 11 19 +l 13 18 +l 15 18 +l 17 19 +l 18 21 +l 18 23 +m 0 19 +l 1 21 +l 3 22 +l 5 22 +l 7 21 +l 11 18 +l 13 17 +l 15 17 +l 17 18 +l 18 21 + +165 23 11 31 +m 3 21 +l 3 0 +l 4 0 +l 4 18 +l 17 0 +l 17 21 +l 16 21 +l 16 3 +l 3 21 +m 1 24 +l 1 26 +l 2 29 +l 4 30 +l 6 30 +l 8 29 +l 12 26 +l 14 25 +l 16 25 +l 18 26 +l 19 28 +l 19 30 +m 1 26 +l 2 28 +l 4 29 +l 6 29 +l 8 28 +l 12 25 +l 14 24 +l 16 24 +l 18 25 +l 19 28 + +166 19 9 35 +m 12 21 +l 12 7 +l 13 7 +l 13 21 +l 12 21 +m 12 18 +l 10 20 +l 8 21 +l 5 21 +l 3 20 +l 1 18 +l 0 15 +l 0 13 +l 1 10 +l 3 8 +l 5 7 +l 8 7 +l 10 8 +l 12 10 +l 8 8 +l 5 8 +l 3 9 +l 2 10 +l 1 13 +l 1 15 +l 2 18 +l 3 19 +l 5 20 +l 8 20 +l 12 18 +m 14 0 +l 14 1 +l 0 1 +l 0 0 +l 14 0 + +167 18 9 35 +m 0 15 +l 1 12 +l 3 10 +l 5 9 +l 8 9 +l 10 10 +l 12 12 +l 13 15 +l 12 18 +l 10 20 +l 8 21 +l 5 21 +l 3 20 +l 1 18 +l 0 15 +m 1 15 +l 2 12 +l 3 11 +l 5 10 +l 8 10 +l 10 11 +l 11 12 +l 12 15 +l 11 18 +l 10 19 +l 8 20 +l 5 20 +l 3 19 +l 2 18 +l 1 15 +m 13 1 +l 13 0 +l 0 0 +l 0 1 +l 13 1 + +168 18 9 48 +m 6 10 +l 6 14 +l 7 14 +l 7 10 +l 4 9 +l 2 8 +l 1 6 +l 1 4 +l 2 2 +l 5 1 +l 8 1 +l 11 2 +l 12 4 +l 12 5 +l 13 5 +l 13 4 +l 12 2 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 1 8 +l 2 9 +l 4 10 +l 7 11 +m 12 3 +l 9 1 +m 4 1 +l 1 3 +m 1 7 +l 5 10 +m 7 18 +l 8 19 +l 8 20 +l 7 21 +l 6 21 +l 5 20 +l 5 19 +l 6 18 +l 7 18 +m 7 19 +l 7 20 +l 6 20 +l 6 19 +l 7 19 + +169 18 9 7 +m 0 8 +l 0 0 +l 2 0 +l 2 6 +l 13 6 +l 13 8 +l 0 8 + +170 18 9 7 +m 13 8 +l 13 0 +l 11 0 +l 11 6 +l 0 6 +l 0 8 +l 13 8 + +171 21 10 32 +m 16 21 +l 14 21 +l 0 0 +l 2 0 +l 16 21 +m 5 21 +l 5 11 +l 3 11 +l 3 18 +l 1 17 +l 0 18 +l 4 21 +l 5 21 +m 8 0 +l 16 0 +l 16 1 +l 9 1 +l 15 5 +l 16 6 +l 16 9 +l 14 10 +l 10 10 +l 9 9 +l 9 7 +l 10 7 +l 10 8 +l 11 9 +l 14 9 +l 15 8 +l 15 6 +l 8 1 +l 8 0 + +172 21 10 22 +m 16 21 +l 14 21 +l 0 0 +l 2 0 +l 16 21 +m 5 21 +l 5 11 +l 3 11 +l 3 18 +l 1 17 +l 0 18 +l 4 21 +l 5 21 +m 14 0 +l 14 10 +l 7 2 +l 16 2 +l 16 3 +l 9 3 +l 13 7 +l 13 0 +l 14 0 + +173 8 4 19 +m 1 0 +l 1 14 +l 2 14 +l 2 0 +l 1 0 +m 1 18 +l 0 19 +l 0 20 +l 1 21 +l 2 21 +l 3 20 +l 3 19 +l 2 18 +l 1 18 +m 1 19 +l 1 20 +l 2 20 +l 2 19 +l 1 19 + +174 17 8 6 +m 6 5 +l 0 11 +l 6 17 +m 12 5 +l 6 11 +l 12 17 + +175 17 8 6 +m 6 5 +l 12 11 +l 6 17 +m 0 5 +l 6 11 +l 0 17 + +176 17 8 126 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 5 15 +l 7 15 +l 7 13 +l 5 13 +l 5 15 +m 6 15 +l 6 13 +m 5 9 +l 7 9 +l 7 7 +l 5 7 +l 5 9 +m 6 9 +l 6 7 +m 5 3 +l 7 3 +l 7 1 +l 5 1 +l 5 3 +m 6 3 +l 6 1 +m 5 21 +l 7 21 +l 7 19 +l 5 19 +l 5 21 +m 6 21 +l 6 19 +m 10 12 +l 12 12 +l 12 10 +l 10 10 +l 10 12 +m 11 12 +l 11 10 +m 10 6 +l 12 6 +l 12 4 +l 10 4 +l 10 6 +m 11 6 +l 11 4 +m 10 0 +l 12 0 +l 12 -2 +l 10 -2 +l 10 0 +m 11 0 +l 11 -2 +m 10 18 +l 12 18 +l 12 16 +l 10 16 +l 10 18 +m 11 18 +l 11 16 +m 15 15 +l 17 15 +l 17 13 +l 15 13 +l 15 15 +m 16 15 +l 16 13 +m 15 9 +l 17 9 +l 17 7 +l 15 7 +l 15 9 +m 16 9 +l 16 7 +m 15 3 +l 17 3 +l 17 1 +l 15 1 +l 15 3 +m 16 3 +l 16 1 +m 15 21 +l 17 21 +l 17 19 +l 15 19 +l 15 21 +m 16 21 +l 16 19 +m 4 -3 +l 4 -5 +l 6 -5 +l 6 -3 +l 4 -3 +m 5 -3 +l 5 -5 +m 15 -3 +l 17 -3 +l 17 -5 +l 15 -5 +l 15 -3 +m 16 -3 +l 16 -5 + +177 16 8 245 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 2 15 +l 4 15 +l 4 13 +l 2 13 +l 2 15 +m 3 15 +l 3 13 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 2 3 +l 4 3 +l 4 1 +l 2 1 +l 2 3 +m 3 3 +l 3 1 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 4 12 +l 6 12 +l 6 10 +l 4 10 +l 4 12 +m 5 12 +l 5 10 +m 4 6 +l 6 6 +l 6 4 +l 4 4 +l 4 6 +m 5 6 +l 5 4 +m 4 0 +l 6 0 +l 6 -2 +l 4 -2 +l 4 0 +m 5 0 +l 5 -2 +m 4 18 +l 6 18 +l 6 16 +l 4 16 +l 4 18 +m 5 18 +l 5 16 +m 6 15 +l 8 15 +l 8 13 +l 6 13 +l 6 15 +m 7 15 +l 7 13 +m 6 9 +l 8 9 +l 8 7 +l 6 7 +l 6 9 +m 7 9 +l 7 7 +m 6 3 +l 8 3 +l 8 1 +l 6 1 +l 6 3 +m 7 3 +l 7 1 +m 6 21 +l 8 21 +l 8 19 +l 6 19 +l 6 21 +m 7 21 +l 7 19 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 10 15 +l 12 15 +l 12 13 +l 10 13 +l 10 15 +m 11 15 +l 11 13 +m 10 9 +l 12 9 +l 12 7 +l 10 7 +l 10 9 +m 11 9 +l 11 7 +m 10 3 +l 12 3 +l 12 1 +l 10 1 +l 10 3 +m 11 3 +l 11 1 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 12 12 +l 14 12 +l 14 10 +l 12 10 +l 12 12 +m 13 12 +l 13 10 +m 12 6 +l 14 6 +l 14 4 +l 12 4 +l 12 6 +m 13 6 +l 13 4 +m 12 0 +l 14 0 +l 14 -2 +l 12 -2 +l 12 0 +m 13 0 +l 13 -2 +m 12 18 +l 14 18 +l 14 16 +l 12 16 +l 12 18 +m 13 18 +l 13 16 +m 14 15 +l 16 15 +l 16 13 +l 14 13 +l 14 15 +m 15 15 +l 15 13 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 14 3 +l 16 3 +l 16 1 +l 14 1 +l 14 3 +m 15 3 +l 15 1 +m 14 21 +l 16 21 +l 16 19 +l 14 19 +l 14 21 +m 15 21 +l 15 19 +m 2 -3 +l 2 -5 +l 4 -5 +l 4 -3 +l 2 -3 +m 3 -3 +l 3 -5 +m 6 -3 +l 6 -5 +l 8 -5 +l 8 -3 +l 6 -3 +m 7 -3 +l 7 -5 +m 10 -3 +l 10 -5 +l 12 -5 +l 12 -3 +l 10 -3 +m 11 -3 +l 11 -5 + +178 24 12 282 +m 0 21 +l 2 21 +l 2 19 +l 0 19 +l 0 21 +m 1 21 +l 1 19 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 20 21 +l 22 21 +l 22 19 +l 20 19 +l 20 21 +m 21 21 +l 21 19 +m 22 21 +l 24 21 +l 24 19 +l 22 19 +l 22 21 +m 23 21 +l 23 19 +m 4 17 +l 6 17 +l 6 15 +l 4 15 +l 4 17 +m 5 17 +l 5 15 +m 6 17 +l 8 17 +l 8 15 +l 6 15 +l 6 17 +m 7 17 +l 7 15 +m 8 17 +l 10 17 +l 10 15 +l 8 15 +l 8 17 +m 9 17 +l 9 15 +m 0 13 +l 2 13 +l 2 11 +l 0 11 +l 0 13 +m 1 13 +l 1 11 +m 2 13 +l 4 13 +l 4 11 +l 2 11 +l 2 13 +m 3 13 +l 3 11 +m 10 13 +l 12 13 +l 12 11 +l 10 11 +l 10 13 +m 11 13 +l 11 11 +m 12 13 +l 14 13 +l 14 11 +l 12 11 +l 12 13 +m 13 13 +l 13 11 +m 20 13 +l 22 13 +l 22 11 +l 20 11 +l 20 13 +m 21 13 +l 21 11 +m 22 13 +l 24 13 +l 24 11 +l 22 11 +l 22 13 +m 23 13 +l 23 11 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 16 9 +l 18 9 +l 18 7 +l 16 7 +l 16 9 +m 17 9 +l 17 7 +m 18 9 +l 20 9 +l 20 7 +l 18 7 +l 18 9 +m 19 9 +l 19 7 +m 0 5 +l 2 5 +l 2 3 +l 0 3 +l 0 5 +m 1 5 +l 1 3 +m 2 5 +l 4 5 +l 4 3 +l 2 3 +l 2 5 +m 3 5 +l 3 3 +m 10 5 +l 12 5 +l 12 3 +l 10 3 +l 10 5 +m 11 5 +l 11 3 +m 12 5 +l 14 5 +l 14 3 +l 12 3 +l 12 5 +m 13 5 +l 13 3 +m 20 5 +l 22 5 +l 22 3 +l 20 3 +l 20 5 +m 21 5 +l 21 3 +m 22 5 +l 24 5 +l 24 3 +l 22 3 +l 22 5 +m 23 5 +l 23 3 +m 4 1 +l 10 1 +l 10 -1 +l 4 -1 +l 4 1 +m 5 1 +l 5 -1 +m 7 1 +l 7 -1 +m 9 1 +l 9 -1 +m 0 -3 +l 2 -3 +l 2 -5 +l 0 -5 +l 0 -3 +m 1 -3 +l 1 -5 +m 2 -3 +l 4 -3 +l 4 -5 +l 2 -5 +l 2 -3 +m 3 -3 +l 3 -5 +m 10 -3 +l 12 -3 +l 12 -5 +l 10 -5 +l 10 -3 +m 11 -3 +l 11 -5 +m 12 -3 +l 14 -3 +l 14 -5 +l 12 -5 +l 12 -3 +m 13 -3 +l 13 -5 +m 20 -3 +l 22 -3 +l 22 -5 +l 20 -5 +l 20 -3 +m 21 -3 +l 21 -5 +m 22 -3 +l 24 -3 +l 24 -5 +l 22 -5 +l 22 -3 +m 23 -3 +l 23 -5 +m 6 1 +l 6 -1 +m 8 1 +l 8 -1 +m 18 17 +l 20 17 +l 20 15 +l 18 15 +l 18 17 +m 19 17 +l 19 15 +m 20 17 +l 22 17 +l 22 15 +l 20 15 +l 20 17 +m 21 17 +l 21 15 +m 22 17 +l 24 17 +l 24 15 +l 22 15 +l 22 17 +m 23 17 +l 23 15 +m 0 9 +l 2 9 +l 2 7 +l 0 7 +l 0 9 +m 1 9 +l 1 7 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 18 1 +l 24 1 +l 24 -1 +l 18 -1 +l 18 1 +m 19 1 +l 19 -1 +m 21 1 +l 21 -1 +m 23 1 +l 23 -1 +m 20 1 +l 20 -1 +m 22 1 +l 22 -1 + +179 5 2 2 +m 0 21 +l 0 -7 + +180 13 6 4 +m 8 21 +l 8 -7 +m 8 5 +l 0 5 + +181 13 6 6 +m 8 21 +l 8 -7 +m 8 5 +l 0 5 +m 0 9 +l 8 9 + +182 21 10 6 +m 8 21 +l 8 -7 +m 16 21 +l 16 -7 +m 0 5 +l 8 5 + +183 21 10 5 +m 0 5 +l 16 5 +l 16 -7 +m 8 5 +l 8 -7 + +184 13 6 5 +m 0 6 +l 8 6 +l 8 -7 +m 0 4 +l 8 4 + +185 21 10 8 +m 16 21 +l 16 -7 +m 0 5 +l 8 5 +l 8 -7 +m 0 9 +l 8 9 +l 8 21 + +186 21 10 4 +m 8 21 +l 8 -7 +m 16 21 +l 16 -7 + +187 21 10 6 +m 0 9 +l 16 9 +l 16 -7 +m 0 5 +l 8 5 +l 8 -7 + +188 21 10 6 +m 0 5 +l 16 5 +l 16 21 +m 0 9 +l 8 9 +l 8 21 + +189 21 10 5 +m 0 9 +l 16 9 +l 16 21 +m 8 9 +l 8 21 + +190 13 6 5 +m 0 8 +l 8 8 +l 8 21 +m 0 10 +l 8 10 + +191 13 6 3 +m 0 4 +l 8 4 +l 8 -7 + +192 8 4 3 +m 8 10 +l 0 10 +l 0 21 + +193 16 8 5 +m 0 10 +l 8 10 +l 8 21 +m 16 10 +l 8 10 + +194 16 8 5 +m 0 4 +l 8 4 +l 8 -7 +m 16 4 +l 8 4 + +195 8 4 4 +m 0 21 +l 0 -7 +m 0 5 +l 8 5 + +196 16 8 2 +m 0 5 +l 16 5 + +197 16 8 4 +m 8 21 +l 8 -7 +m 16 5 +l 0 5 + +198 8 4 6 +m 0 -7 +l 0 21 +m 0 9 +l 8 9 +m 8 5 +l 0 5 + +199 16 8 6 +m 8 21 +l 8 -7 +m 0 21 +l 0 -7 +m 16 5 +l 8 5 + +200 16 8 6 +m 16 5 +l 0 5 +l 0 21 +m 16 9 +l 8 9 +l 8 21 + +201 16 8 6 +m 16 9 +l 0 9 +l 0 -7 +m 16 5 +l 8 5 +l 8 -7 + +202 24 12 8 +m 0 5 +l 24 5 +m 0 9 +l 8 9 +l 8 21 +m 24 9 +l 16 9 +l 16 21 + +203 24 12 8 +m 0 9 +l 24 9 +m 0 5 +l 8 5 +l 8 -7 +m 24 5 +l 16 5 +l 16 -7 + +204 16 8 8 +m 0 21 +l 0 -7 +m 16 5 +l 8 5 +l 8 -7 +m 16 9 +l 8 9 +l 8 21 + +205 16 8 4 +m 0 5 +l 16 5 +m 0 9 +l 16 9 + +206 24 12 12 +m 0 5 +l 8 5 +l 8 -7 +m 0 9 +l 8 9 +l 8 21 +m 16 21 +l 16 9 +l 24 9 +m 16 -7 +l 16 5 +l 24 5 + +207 16 8 6 +m 0 5 +l 16 5 +m 0 10 +l 16 10 +m 8 21 +l 8 10 + +208 16 8 6 +m 0 9 +l 16 9 +m 6 21 +l 6 9 +m 14 21 +l 14 9 + +209 16 8 6 +m 0 9 +l 16 9 +m 0 4 +l 16 4 +m 8 -7 +l 8 4 + +210 16 8 6 +m 0 5 +l 16 5 +m 6 -7 +l 6 5 +m 14 -7 +l 14 5 + +211 16 8 5 +m 16 9 +l 0 9 +l 0 21 +m 8 9 +l 8 21 + +212 8 4 5 +m 8 8 +l 0 8 +l 0 21 +m 8 10 +l 0 10 + +213 8 4 5 +m 8 6 +l 0 6 +l 0 -7 +m 8 4 +l 0 4 + +214 16 8 5 +m 16 5 +l 0 5 +l 0 -7 +m 8 5 +l 8 -7 + +215 16 8 4 +m 8 21 +l 8 -7 +m 16 5 +l 0 5 + +216 16 8 6 +m 8 21 +l 8 -7 +m 16 5 +l 0 5 +m 0 9 +l 16 9 + +217 13 6 3 +m 0 10 +l 8 10 +l 8 21 + +218 8 4 3 +m 8 4 +l 0 4 +l 0 -7 + +219 16 8 37 +m 0 21 +l 16 21 +l 16 0 +l 0 0 +l 0 21 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 7 0 +l 7 21 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 0 11 +l 16 11 + +220 16 8 35 +m 16 0 +l 0 0 +l 0 11 +l 16 11 +l 16 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 11 +l 6 0 +m 7 11 +l 7 0 +m 8 11 +l 8 0 +m 9 11 +l 9 0 +m 10 11 +l 10 0 +m 11 11 +l 11 0 +m 12 11 +l 12 0 +m 13 11 +l 13 0 +m 14 11 +l 14 0 +m 15 11 +l 15 0 + +221 8 4 19 +m 0 0 +l 0 21 +l 8 21 +l 8 0 +l 0 0 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 7 0 +l 7 21 + +222 17 8 19 +m 9 0 +l 9 21 +l 17 21 +l 17 0 +l 9 0 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 16 0 +l 16 21 + +223 16 8 35 +m 16 10 +l 0 10 +l 0 21 +l 16 21 +l 16 10 +m 1 21 +l 1 10 +m 2 21 +l 2 10 +m 3 21 +l 3 10 +m 4 21 +l 4 10 +m 5 21 +l 5 10 +m 6 21 +l 6 10 +m 7 21 +l 7 10 +m 8 21 +l 8 10 +m 9 21 +l 9 10 +m 10 21 +l 10 10 +m 11 21 +l 11 10 +m 12 21 +l 12 10 +m 13 21 +l 13 10 +m 14 21 +l 14 10 +m 15 21 +l 15 10 + +224 24 12 31 +m 12 9 +l 10 11 +l 8 12 +l 5 12 +l 3 11 +l 1 9 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 19 14 +l 18 14 +l 11 3 +l 10 2 +l 8 1 +l 5 1 +l 3 2 +l 2 3 +l 1 6 +l 2 9 +l 3 10 +l 5 11 +l 8 11 +l 10 10 +l 11 9 +l 18 0 +l 19 0 +l 12 9 + +225 16 8 26 +m 1 1 +l 9 1 +l 11 2 +l 11 6 +l 8 7 +l 11 8 +l 11 11 +l 9 13 +l 1 13 +l 0 12 +l 0 -5 +l 1 -5 +l 1 7 +l 7 7 +l 10 5 +l 10 3 +l 9 2 +l 1 2 +m 1 11 +l 2 12 +l 9 12 +l 10 11 +l 10 9 +l 8 8 +l 1 8 +l 1 11 + +226 16 8 8 +m 1 0 +l 1 15 +l 10 15 +l 10 13 +l 11 13 +l 11 16 +l 0 16 +l 0 0 + +227 19 9 13 +m 3 15 +l 3 0 +l 4 0 +l 4 15 +l 11 15 +l 11 0 +l 12 0 +l 12 15 +l 14 15 +l 14 16 +l 0 16 +l 0 15 +l 3 15 + +228 17 8 11 +m 0 21 +l 12 21 +l 12 20 +l 2 20 +l 8 11 +l 2 1 +l 12 1 +l 12 0 +l 0 0 +l 7 11 +l 0 21 + +229 24 12 35 +m 5 12 +l 3 11 +l 1 9 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 12 9 +l 10 11 +l 8 12 +l 5 12 +l 7 13 +l 19 13 +l 19 14 +l 6 14 +l 3 11 +m 5 11 +l 3 10 +l 2 9 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 3 +l 12 6 +l 11 9 +l 10 10 +l 8 11 +l 5 11 + +230 20 10 25 +m 3 14 +l 3 4 +l 4 1 +l 6 0 +l 9 0 +l 11 1 +l 14 4 +l 11 2 +l 9 1 +l 7 1 +l 5 2 +l 4 4 +l 4 14 +l 3 14 +m 14 14 +l 14 0 +l 15 0 +l 15 14 +l 14 14 +m 4 1 +l 4 -3 +l 1 -6 +l 2 -6 +l 5 -3 +l 5 1 + +231 20 10 18 +m 8 11 +l 8 -2 +l 9 -2 +l 9 8 +l 15 13 +l 14 13 +l 9 9 +l 9 12 +l 8 13 +l 6 14 +l 3 14 +l 1 12 +l 1 10 +l 2 10 +l 2 12 +l 3 13 +l 6 13 +l 8 11 + +232 18 9 48 +m 5 15 +l 3 14 +l 1 12 +l 0 9 +l 1 6 +l 3 4 +l 5 3 +l 8 3 +l 10 4 +l 12 6 +l 13 9 +l 12 12 +l 10 14 +l 8 15 +l 5 15 +m 5 14 +l 3 13 +l 2 12 +l 1 9 +l 2 6 +l 3 5 +l 5 4 +l 8 4 +l 10 5 +l 11 6 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +m 7 15 +l 7 20 +l 13 20 +l 13 21 +l 0 21 +l 0 20 +l 6 20 +l 6 15 +m 8 3 +l 8 3 +m 7 3 +l 7 -2 +l 13 -2 +l 13 -3 +l 0 -3 +l 0 -2 +l 6 -2 +l 6 3 + +233 21 10 43 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 7 20 +l 4 19 +l 2 16 +l 1 13 +l 1 11 +l 15 11 +l 15 13 +l 14 16 +l 12 19 +l 9 20 +l 7 20 +m 1 8 +l 2 5 +l 4 2 +l 7 1 +l 9 1 +l 12 2 +l 14 5 +l 15 8 +l 15 10 +l 1 10 +l 1 8 + +234 21 10 41 +m 1 13 +l 2 16 +l 4 19 +l 7 20 +l 9 20 +l 12 19 +l 14 16 +l 15 13 +l 15 9 +l 14 7 +l 11 5 +l 11 0 +l 16 0 +l 16 1 +l 12 1 +l 12 5 +l 15 7 +l 16 9 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 9 +l 1 7 +l 4 5 +l 4 1 +l 0 1 +l 0 0 +l 5 0 +l 5 5 +l 2 7 +l 1 9 +l 1 13 +m 0 8 +l 0 8 + +235 18 9 37 +m 5 12 +l 3 11 +l 1 9 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 12 9 +l 10 11 +l 8 12 +l 5 12 +m 5 11 +l 3 10 +l 2 9 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 3 +l 12 6 +l 11 9 +l 10 10 +l 8 11 +l 5 11 +m 10 11 +l 1 20 +l 13 20 +l 13 21 +l 0 21 +l 0 20 +l 8 12 + +236 30 15 60 +m 5 12 +l 3 11 +l 1 9 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 12 9 +l 10 11 +l 8 12 +l 5 12 +m 5 11 +l 3 10 +l 2 9 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 3 +l 12 6 +l 11 9 +l 10 10 +l 8 11 +l 5 11 +m 17 12 +l 15 11 +l 13 9 +l 12 6 +l 13 3 +l 15 1 +l 17 0 +l 20 0 +l 22 1 +l 24 3 +l 25 6 +l 24 9 +l 22 11 +l 20 12 +l 17 12 +m 17 11 +l 15 10 +l 14 9 +l 13 6 +l 14 3 +l 15 2 +l 17 1 +l 20 1 +l 22 2 +l 23 3 +l 24 6 +l 23 9 +l 22 10 +l 20 11 +l 17 11 + +237 19 9 41 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 +m 5 13 +l 3 12 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 3 2 +l 5 1 +l 8 1 +l 10 2 +l 11 3 +l 12 6 +l 12 8 +l 11 11 +l 10 12 +l 8 13 +l 5 13 +m 0 -4 +l 2 -4 +l 14 17 +l 12 17 +l 0 -4 +m 13 17 +l 1 -4 + +238 17 8 18 +m 1 5 +l 1 10 +l 7 10 +l 7 11 +l 1 11 +l 1 19 +l 3 20 +l 12 20 +l 12 21 +l 3 21 +l 0 19 +l 0 2 +l 3 0 +l 12 0 +l 12 1 +l 3 1 +l 1 2 +l 1 5 + +239 19 9 21 +m 0 0 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 8 21 +l 11 20 +l 13 18 +l 14 15 +l 14 0 +l 13 0 +l 13 15 +l 12 18 +l 11 19 +l 8 20 +l 6 20 +l 3 19 +l 2 18 +l 1 15 +l 1 0 +l 0 0 + +240 22 11 15 +m 0 9 +l 17 9 +l 17 8 +l 0 8 +l 0 9 +m 0 5 +l 17 5 +l 17 4 +l 0 4 +l 0 5 +m 0 13 +l 17 13 +l 17 12 +l 0 12 +l 0 13 + +241 22 11 15 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 +m 8 21 +l 8 4 +l 9 4 +l 9 21 +l 8 21 +m 0 13 +l 17 13 +l 17 12 +l 0 12 +l 0 13 + +242 22 11 14 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 +m 0 21 +l 17 13 +l 1 4 +l 0 4 +l 15 13 +l 0 21 +l 17 13 +l 1 21 +l 0 21 + +243 22 11 14 +m 17 1 +l 0 1 +l 0 0 +l 17 0 +l 17 1 +m 17 21 +l 0 13 +l 16 4 +l 17 4 +l 2 13 +l 17 21 +l 0 13 +l 16 21 +l 17 21 + +244 12 6 15 +m 1 2 +l 1 17 +l 2 19 +l 3 20 +l 5 20 +l 6 19 +l 7 19 +l 7 20 +l 6 21 +l 3 21 +l 1 20 +l 0 17 +l 0 -7 +l 1 -7 +l 1 2 + +245 12 6 15 +m 6 12 +l 6 -3 +l 5 -5 +l 4 -6 +l 2 -6 +l 1 -5 +l 0 -5 +l 0 -6 +l 1 -7 +l 4 -7 +l 6 -6 +l 7 -3 +l 7 21 +l 6 21 +l 6 12 + +246 22 11 33 +m 8 21 +l 7 20 +l 7 19 +l 8 18 +l 9 18 +l 10 19 +l 10 20 +l 9 21 +l 8 21 +m 8 20 +l 8 19 +l 9 19 +l 9 20 +l 8 20 +m 8 3 +l 7 2 +l 7 1 +l 8 0 +l 9 0 +l 10 1 +l 10 2 +l 9 3 +l 8 3 +m 8 2 +l 8 1 +l 9 1 +l 9 2 +l 8 2 +m 0 11 +l 17 11 +l 17 10 +l 0 10 +l 0 11 + +247 23 11 44 +m 0 10 +l 0 12 +l 1 15 +l 3 16 +l 5 16 +l 7 15 +l 11 12 +l 13 11 +l 15 11 +l 17 12 +l 18 14 +l 18 16 +m 0 12 +l 1 14 +l 3 15 +l 5 15 +l 7 14 +l 11 11 +l 13 10 +l 15 10 +l 17 11 +l 18 14 +m 0 3 +l 0 5 +l 1 8 +l 3 9 +l 5 9 +l 7 8 +l 11 5 +l 13 4 +l 15 4 +l 17 5 +l 18 7 +l 18 9 +m 0 5 +l 1 7 +l 3 8 +l 5 8 +l 7 7 +l 11 4 +l 13 3 +l 15 3 +l 17 4 +l 18 7 + +248 18 9 30 +m 5 21 +l 3 20 +l 1 18 +l 0 15 +l 1 12 +l 3 10 +l 5 9 +l 8 9 +l 10 10 +l 12 12 +l 13 15 +l 12 18 +l 10 20 +l 8 21 +l 5 21 +m 5 20 +l 3 19 +l 2 18 +l 1 15 +l 2 12 +l 3 11 +l 5 10 +l 8 10 +l 10 11 +l 11 12 +l 12 15 +l 11 18 +l 10 19 +l 8 20 +l 5 20 + +249 9 4 13 +m 4 0 +l 0 0 +l 0 4 +l 4 4 +l 4 0 +m 1 4 +l 1 0 +m 2 4 +l 2 0 +m 3 4 +l 3 0 +m 0 2 +l 4 2 + +250 9 4 11 +m 4 0 +l 0 0 +l 0 2 +l 4 2 +l 4 0 +m 1 2 +l 1 0 +m 2 2 +l 2 0 +m 3 2 +l 3 0 + +251 23 11 10 +m 8 20 +l 8 0 +l 7 0 +l 0 10 +l 0 11 +l 7 2 +l 7 21 +l 18 21 +l 18 20 +l 8 20 + +252 17 8 19 +m 1 21 +l 0 21 +l 0 10 +l 1 10 +l 1 21 +m 1 17 +l 4 20 +l 6 21 +l 9 21 +l 11 20 +l 12 17 +l 12 10 +l 11 10 +l 11 17 +l 10 19 +l 8 20 +l 6 20 +l 4 19 +l 1 17 + +253 12 6 16 +m 6 18 +l 0 13 +l 7 13 +l 7 14 +l 1 14 +l 1 13 +l 7 18 +l 7 20 +l 6 21 +l 2 21 +l 1 20 +l 1 19 +l 2 19 +l 3 20 +l 6 20 +l 6 18 + +254 13 6 19 +m 0 0 +l 0 11 +l 8 11 +l 8 0 +l 0 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 11 +l 6 0 +m 7 11 +l 7 0 diff --git a/cd/etc/vectorfont25.txt b/cd/etc/vectorfont25.txt new file mode 100755 index 0000000..87c9668 --- /dev/null +++ b/cd/etc/vectorfont25.txt @@ -0,0 +1,5091 @@ +Script II +25 25 12 -12 + + +32 21 10 0 + +33 9 4 11 +m 3 8 +l 7 20 +l 6 21 +l 5 20 +l 3 8 +l 6 20 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +34 13 6 8 +m 2 21 +l 0 14 +m 3 21 +l 0 14 +m 11 21 +l 9 14 +m 12 21 +l 9 14 + +35 18 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 19 9 37 +m 10 25 +l 2 -4 +m 15 25 +l 7 -4 +m 16 17 +l 15 16 +l 16 15 +l 17 16 +l 17 17 +l 16 19 +l 15 20 +l 12 21 +l 8 21 +l 5 20 +l 3 18 +l 3 16 +l 4 14 +l 5 13 +l 12 9 +l 14 7 +m 3 16 +l 5 14 +l 12 10 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 + +37 21 10 29 +m 18 21 +l 0 0 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 24 12 52 +m 21 13 +l 20 12 +l 21 11 +l 22 12 +l 22 13 +l 21 14 +l 20 14 +l 18 13 +l 16 11 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 5 +l 1 7 +l 2 8 +l 4 9 +l 9 11 +l 11 12 +l 13 14 +l 14 16 +l 14 18 +l 13 20 +l 11 21 +l 9 20 +l 8 18 +l 8 15 +l 9 9 +l 10 6 +l 12 3 +l 14 1 +l 16 0 +l 18 0 +l 19 2 +l 19 3 +m 4 0 +l 2 1 +l 1 3 +l 1 5 +l 2 7 +l 3 8 +l 9 11 +m 8 15 +l 9 10 +l 10 7 +l 12 4 +l 14 2 +l 16 1 +l 18 1 +l 19 2 + +39 5 2 7 +m 2 19 +l 1 20 +l 2 21 +l 3 20 +l 3 19 +l 2 17 +l 0 15 + +40 12 6 18 +m 12 25 +l 8 22 +l 5 19 +l 3 16 +l 1 12 +l 0 7 +l 0 3 +l 1 -2 +l 2 -5 +l 3 -7 +m 8 22 +l 5 18 +l 3 14 +l 2 11 +l 1 6 +l 1 1 +l 2 -4 +l 3 -7 + +41 15 7 18 +m 9 25 +l 10 23 +l 11 20 +l 12 15 +l 12 11 +l 11 6 +l 9 2 +l 7 -1 +l 4 -4 +l 0 -7 +m 9 25 +l 10 22 +l 11 17 +l 11 12 +l 10 7 +l 9 4 +l 7 0 +l 4 -4 + +42 12 6 6 +m 5 21 +l 5 9 +m 0 18 +l 10 12 +m 10 18 +l 0 12 + +43 22 11 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 10 5 7 +m 2 0 +l 1 1 +l 2 2 +l 3 1 +l 3 0 +l 2 -2 +l 0 -4 + +45 22 11 2 +m 0 9 +l 18 9 + +46 9 4 5 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +47 24 12 2 +m 26 25 +l 0 -7 + +48 17 8 17 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 + +49 14 7 4 +m 0 17 +l 2 18 +l 5 21 +l 5 0 + +50 17 8 14 +m 1 16 +l 1 17 +l 2 19 +l 3 20 +l 5 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 10 10 +l 0 0 +l 14 0 + +51 17 8 15 +m 2 21 +l 13 21 +l 7 13 +l 10 13 +l 12 12 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +52 17 8 5 +m 10 21 +l 0 7 +l 15 7 +m 10 21 +l 10 0 + +53 17 8 17 +m 12 21 +l 2 21 +l 1 12 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +54 16 8 23 +m 12 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 7 +l 1 3 +l 3 1 +l 6 0 +l 7 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 7 13 +l 6 13 +l 3 12 +l 1 10 +l 0 7 + +55 17 8 4 +m 14 21 +l 4 0 +m 0 21 +l 14 21 + +56 17 8 29 +m 5 21 +l 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 8 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 7 +l 1 9 +l 3 11 +l 6 12 +l 10 13 +l 12 14 +l 13 16 +l 13 18 +l 12 20 +l 9 21 +l 5 21 + +57 17 8 23 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 7 21 +l 10 20 +l 12 18 +l 13 14 +l 13 9 +l 12 4 +l 10 1 +l 7 0 +l 5 0 +l 2 1 +l 1 3 + +58 9 4 10 +m 4 14 +l 3 13 +l 4 12 +l 5 13 +l 4 14 +m 4 3 +l 3 2 +l 4 1 +l 5 2 +l 4 3 + +59 10 5 12 +m 5 14 +l 4 13 +l 5 12 +l 6 13 +l 5 14 +m 5 0 +l 4 1 +l 5 2 +l 6 1 +l 6 0 +l 5 -2 +l 3 -4 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 22 11 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 15 7 31 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 18 +l 13 16 +l 12 14 +l 11 13 +l 5 11 +l 3 10 +l 3 8 +l 4 7 +l 6 7 +m 9 21 +l 11 20 +l 12 18 +l 12 16 +l 11 14 +l 10 13 +l 8 12 +m 5 2 +l 4 1 +l 5 0 +l 6 1 +l 5 2 + +64 24 12 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 20 10 19 +m 0 0 +l 2 1 +l 5 4 +l 8 8 +l 12 15 +l 15 21 +l 15 0 +l 14 3 +l 12 6 +l 10 8 +l 7 10 +l 5 10 +l 4 9 +l 4 7 +l 5 5 +l 7 3 +l 10 1 +l 13 0 +l 18 0 + +66 20 10 39 +m 10 19 +l 11 18 +l 11 15 +l 10 11 +l 9 8 +l 8 6 +l 6 3 +l 4 1 +l 2 0 +l 1 0 +l 0 1 +l 0 4 +l 1 9 +l 2 12 +l 3 14 +l 5 17 +l 7 19 +l 9 20 +l 12 21 +l 15 21 +l 17 20 +l 18 18 +l 18 16 +l 17 14 +l 16 13 +l 14 12 +l 11 11 +m 10 11 +l 11 11 +l 14 10 +l 15 9 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 12 0 +l 9 0 +l 7 1 +l 6 3 + +67 17 8 23 +m 9 15 +l 9 14 +l 10 13 +l 12 13 +l 14 14 +l 15 16 +l 15 18 +l 14 20 +l 12 21 +l 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 13 +l 0 9 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +l 12 5 + +68 24 12 34 +m 14 21 +l 12 20 +l 11 18 +l 10 14 +l 9 8 +l 8 5 +l 7 3 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 5 3 +l 7 1 +l 10 0 +l 13 0 +l 16 1 +l 18 3 +l 20 7 +l 21 12 +l 21 16 +l 20 19 +l 19 20 +l 17 21 +l 14 21 +l 12 19 +l 12 17 +l 13 14 +l 15 11 +l 17 9 +l 20 7 +l 22 6 + +69 17 8 27 +m 11 17 +l 11 16 +l 12 15 +l 14 15 +l 15 16 +l 15 18 +l 14 20 +l 11 21 +l 7 21 +l 4 20 +l 3 18 +l 3 15 +l 4 13 +l 5 12 +l 8 11 +l 5 11 +l 2 10 +l 1 9 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 3 +l 14 5 + +70 19 9 25 +m 9 15 +l 7 15 +l 5 16 +l 4 18 +l 5 20 +l 8 21 +l 11 21 +l 15 20 +l 18 20 +l 20 21 +m 15 20 +l 13 13 +l 11 7 +l 9 3 +l 7 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 1 6 +l 3 6 +l 5 5 +m 8 11 +l 17 11 + +71 23 11 28 +m 0 0 +l 2 1 +l 6 5 +l 9 10 +l 10 13 +l 11 17 +l 11 20 +l 10 21 +l 9 21 +l 8 20 +l 7 18 +l 7 15 +l 8 13 +l 10 12 +l 14 12 +l 17 13 +l 18 14 +l 19 16 +l 19 10 +l 18 5 +l 17 3 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 3 3 +l 2 5 +l 2 7 + +72 23 11 36 +m 6 14 +l 4 15 +l 3 17 +l 3 18 +l 4 20 +l 6 21 +l 7 21 +l 9 20 +l 10 18 +l 10 16 +l 9 12 +l 7 6 +l 5 2 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +m 6 9 +l 15 12 +l 17 13 +l 20 15 +l 22 17 +l 23 19 +l 23 20 +l 22 21 +l 21 21 +l 19 19 +l 17 15 +l 15 9 +l 14 4 +l 14 1 +l 15 0 +l 16 0 +l 18 1 +l 19 2 +l 21 5 + +73 16 8 24 +m 13 5 +l 11 7 +l 9 10 +l 8 12 +l 7 15 +l 7 18 +l 8 20 +l 9 21 +l 11 21 +l 12 20 +l 13 18 +l 13 15 +l 12 10 +l 10 5 +l 9 3 +l 7 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 1 6 +l 3 6 +l 5 5 + +74 14 7 24 +m 9 -3 +l 7 0 +l 5 5 +l 4 11 +l 4 17 +l 5 20 +l 7 21 +l 9 21 +l 10 20 +l 11 17 +l 11 14 +l 10 9 +l 7 0 +l 5 -6 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 3 -3 +l 5 -1 +l 8 1 +l 12 3 + +75 23 11 36 +m 6 14 +l 4 15 +l 3 17 +l 3 18 +l 4 20 +l 6 21 +l 7 21 +l 9 20 +l 10 18 +l 10 16 +l 9 12 +l 7 6 +l 5 2 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +m 23 18 +l 23 20 +l 22 21 +l 21 21 +l 19 20 +l 17 18 +l 15 15 +l 13 13 +l 11 12 +l 9 12 +m 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +l 17 1 +l 18 2 +l 20 5 + +76 19 9 28 +m 4 9 +l 6 9 +l 10 10 +l 13 12 +l 15 14 +l 16 16 +l 16 19 +l 15 21 +l 13 21 +l 12 20 +l 11 18 +l 10 13 +l 9 8 +l 8 5 +l 7 3 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 5 3 +l 8 1 +l 11 0 +l 13 0 +l 16 1 +l 18 3 + +77 31 15 42 +m 3 14 +l 1 15 +l 0 17 +l 0 18 +l 1 20 +l 3 21 +l 4 21 +l 6 20 +l 7 18 +l 7 16 +l 6 11 +l 5 7 +l 3 0 +m 5 7 +l 8 15 +l 10 19 +l 11 20 +l 13 21 +l 14 21 +l 16 20 +l 17 18 +l 17 16 +l 16 11 +l 15 7 +l 13 0 +m 15 7 +l 18 15 +l 20 19 +l 21 20 +l 23 21 +l 24 21 +l 26 20 +l 27 18 +l 27 16 +l 26 11 +l 24 4 +l 24 1 +l 25 0 +l 26 0 +l 28 1 +l 29 2 +l 31 5 + +78 22 11 30 +m 3 14 +l 1 15 +l 0 17 +l 0 18 +l 1 20 +l 3 21 +l 4 21 +l 6 20 +l 7 18 +l 7 16 +l 6 11 +l 5 7 +l 3 0 +m 5 7 +l 8 15 +l 10 19 +l 11 20 +l 13 21 +l 15 21 +l 17 20 +l 18 18 +l 18 16 +l 17 11 +l 15 4 +l 15 1 +l 16 0 +l 17 0 +l 19 1 +l 20 2 +l 22 5 + +79 18 9 28 +m 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 13 +l 0 9 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +l 13 6 +l 14 8 +l 15 12 +l 15 16 +l 14 19 +l 13 20 +l 11 21 +l 9 21 +l 7 19 +l 7 16 +l 8 13 +l 10 10 +l 12 8 +l 15 6 +l 17 5 + +80 22 11 30 +m 10 19 +l 11 18 +l 11 15 +l 10 11 +l 9 8 +l 8 6 +l 6 3 +l 4 1 +l 2 0 +l 1 0 +l 0 1 +l 0 4 +l 1 9 +l 2 12 +l 3 14 +l 5 17 +l 7 19 +l 9 20 +l 12 21 +l 17 21 +l 19 20 +l 20 19 +l 21 17 +l 21 14 +l 20 12 +l 19 11 +l 17 10 +l 14 10 +l 12 11 +l 11 12 + +81 22 11 31 +m 13 15 +l 12 13 +l 11 12 +l 9 11 +l 7 11 +l 6 13 +l 6 15 +l 7 18 +l 9 20 +l 12 21 +l 15 21 +l 17 20 +l 18 18 +l 18 14 +l 17 11 +l 15 8 +l 11 4 +l 8 2 +l 6 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 5 3 +l 8 1 +l 11 0 +l 14 0 +l 17 1 +l 19 3 + +82 22 11 37 +m 10 19 +l 11 18 +l 11 15 +l 10 11 +l 9 8 +l 8 6 +l 6 3 +l 4 1 +l 2 0 +l 1 0 +l 0 1 +l 0 4 +l 1 9 +l 2 12 +l 3 14 +l 5 17 +l 7 19 +l 9 20 +l 12 21 +l 16 21 +l 18 20 +l 19 19 +l 20 17 +l 20 14 +l 19 12 +l 18 11 +l 16 10 +l 13 10 +l 10 11 +l 11 10 +l 12 8 +l 12 3 +l 13 1 +l 15 0 +l 17 1 +l 18 2 +l 20 5 + +83 20 10 27 +m 0 0 +l 2 1 +l 4 3 +l 7 7 +l 9 10 +l 11 14 +l 12 17 +l 12 20 +l 11 21 +l 10 21 +l 9 20 +l 8 18 +l 8 16 +l 9 14 +l 11 12 +l 14 10 +l 16 8 +l 17 6 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 8 0 +l 5 1 +l 3 3 +l 2 5 +l 2 7 + +84 25 12 23 +m 9 15 +l 7 15 +l 5 16 +l 4 18 +l 5 20 +l 8 21 +l 11 21 +l 15 20 +l 18 20 +l 20 21 +m 15 20 +l 13 13 +l 11 7 +l 9 3 +l 7 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 1 6 +l 3 6 +l 5 5 + +85 22 11 31 +m 3 14 +l 1 15 +l 0 17 +l 0 18 +l 1 20 +l 3 21 +l 4 21 +l 6 20 +l 7 18 +l 7 16 +l 6 12 +l 5 9 +l 4 5 +l 4 3 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 12 2 +l 14 6 +l 17 14 +l 19 21 +m 17 14 +l 16 10 +l 15 4 +l 15 1 +l 16 0 +l 17 0 +l 19 1 +l 20 2 +l 22 5 + +86 21 10 31 +m 3 14 +l 1 15 +l 0 17 +l 0 18 +l 1 20 +l 3 21 +l 4 21 +l 6 20 +l 7 18 +l 7 16 +l 6 12 +l 5 9 +l 4 5 +l 4 2 +l 5 0 +l 7 0 +l 9 1 +l 12 4 +l 14 7 +l 16 11 +l 17 14 +l 18 18 +l 18 20 +l 17 21 +l 16 21 +l 15 20 +l 14 18 +l 14 16 +l 15 13 +l 17 11 +l 19 10 + +87 26 13 21 +m 3 14 +l 1 15 +l 0 17 +l 0 18 +l 1 20 +l 3 21 +l 4 21 +l 6 20 +l 7 18 +l 7 15 +l 6 0 +m 16 21 +l 6 0 +m 16 21 +l 14 0 +m 28 21 +l 26 20 +l 23 17 +l 20 13 +l 17 7 +l 14 0 + +88 26 13 34 +m 7 15 +l 5 15 +l 4 16 +l 4 18 +l 5 20 +l 7 21 +l 9 21 +l 11 20 +l 12 18 +l 12 15 +l 10 6 +l 10 3 +l 11 1 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 17 6 +l 15 6 +m 22 18 +l 22 20 +l 21 21 +l 19 21 +l 17 20 +l 15 18 +l 13 15 +l 9 6 +l 7 3 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 + +89 21 10 36 +m 3 14 +l 1 15 +l 0 17 +l 0 18 +l 1 20 +l 3 21 +l 4 21 +l 6 20 +l 7 18 +l 7 16 +l 6 12 +l 5 9 +l 4 5 +l 4 3 +l 5 1 +l 6 0 +l 8 0 +l 10 1 +l 12 3 +l 14 6 +l 15 8 +l 17 14 +m 19 21 +l 17 14 +l 14 4 +l 12 -2 +l 10 -7 +l 8 -11 +l 6 -12 +l 5 -11 +l 5 -9 +l 6 -6 +l 8 -3 +l 11 0 +l 14 2 +l 19 5 + +90 19 9 39 +m 11 15 +l 10 13 +l 9 12 +l 7 11 +l 5 11 +l 4 13 +l 4 15 +l 5 18 +l 7 20 +l 10 21 +l 13 21 +l 15 20 +l 16 18 +l 16 14 +l 15 11 +l 13 7 +l 10 4 +l 6 1 +l 4 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 4 4 +l 6 3 +l 7 2 +l 8 0 +l 8 -3 +l 7 -6 +l 6 -8 +l 4 -11 +l 2 -12 +l 1 -11 +l 1 -9 +l 2 -6 +l 4 -3 +l 7 0 +l 10 2 +l 16 5 + +91 7 3 8 +m 0 19 +l 0 -1 +m 1 19 +l 1 -1 +m 0 19 +l 5 19 +m 0 -1 +l 5 -1 + +92 19 9 2 +m 0 21 +l 14 -3 + +93 8 4 8 +m 4 19 +l 4 -1 +m 5 19 +l 5 -1 +m 0 19 +l 5 19 +m 0 -1 +l 5 -1 + +94 19 9 5 +m 13 12 +l 8 16 +l 3 12 +l 8 17 +l 13 12 + +95 17 8 2 +m 0 -7 +l 16 -7 + +96 5 2 7 +m 3 21 +l 1 19 +l 0 17 +l 0 16 +l 1 15 +l 2 16 +l 1 17 + +97 16 8 21 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 + +98 14 7 22 +m 0 5 +l 2 8 +l 5 13 +l 6 15 +l 7 18 +l 7 20 +l 6 21 +l 4 20 +l 3 18 +l 2 14 +l 1 7 +l 1 1 +l 2 0 +l 3 0 +l 5 1 +l 7 3 +l 8 6 +l 8 9 +l 9 5 +l 10 4 +l 12 4 +l 14 5 + +99 11 5 13 +m 7 7 +l 7 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 + +100 16 8 22 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 14 21 +m 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 + +101 10 5 16 +m 1 2 +l 3 3 +l 4 4 +l 5 6 +l 5 8 +l 4 9 +l 3 9 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 10 5 + +102 8 4 23 +m 0 5 +l 4 10 +l 6 13 +l 7 15 +l 8 18 +l 8 20 +l 7 21 +l 5 20 +l 4 18 +l 2 10 +l -1 1 +l -4 -6 +l -5 -9 +l -5 -11 +l -4 -12 +l -2 -11 +l -1 -8 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 6 2 +l 8 5 + +103 15 7 26 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +m 10 9 +l 8 2 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 4 -3 +l 7 -1 +l 9 0 +l 12 2 +l 15 5 + +104 15 7 27 +m 0 5 +l 2 8 +l 5 13 +l 6 15 +l 7 18 +l 7 20 +l 6 21 +l 4 20 +l 3 18 +l 2 14 +l 1 8 +l 0 0 +m 0 0 +l 1 3 +l 2 5 +l 4 8 +l 6 9 +l 8 9 +l 9 8 +l 9 6 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 + +105 7 3 14 +m 3 14 +l 3 13 +l 4 13 +l 4 14 +l 3 14 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 2 0 +l 4 1 +l 5 2 +l 7 5 + +106 7 3 18 +m 3 14 +l 3 13 +l 4 13 +l 4 14 +l 3 14 +m 0 5 +l 2 9 +l -4 -9 +l -5 -11 +l -7 -12 +l -8 -11 +l -8 -9 +l -7 -6 +l -4 -3 +l -1 -1 +l 1 0 +l 5 2 +l 7 5 + +107 14 7 30 +m 0 5 +l 2 8 +l 5 13 +l 6 15 +l 7 18 +l 7 20 +l 6 21 +l 4 20 +l 3 18 +l 2 14 +l 1 8 +l 0 0 +m 0 0 +l 1 3 +l 2 5 +l 4 8 +l 6 9 +l 8 9 +l 9 8 +l 9 6 +l 7 5 +l 4 5 +m 4 5 +l 6 4 +l 7 1 +l 8 0 +l 9 0 +l 11 1 +l 12 2 +l 14 5 + +108 8 4 17 +m 0 5 +l 2 8 +l 5 13 +l 6 15 +l 7 18 +l 7 20 +l 6 21 +l 4 20 +l 3 18 +l 2 14 +l 1 7 +l 1 1 +l 2 0 +l 3 0 +l 5 1 +l 6 2 +l 8 5 + +109 25 12 30 +m 0 5 +l 2 8 +l 4 9 +l 5 8 +l 5 7 +l 4 3 +l 3 0 +m 4 3 +l 5 5 +l 7 8 +l 9 9 +l 11 9 +l 12 8 +l 12 7 +l 11 3 +l 10 0 +m 11 3 +l 12 5 +l 14 8 +l 16 9 +l 18 9 +l 19 8 +l 19 6 +l 18 3 +l 18 1 +l 19 0 +l 20 0 +l 22 1 +l 23 2 +l 25 5 + +110 18 9 21 +m 0 5 +l 2 8 +l 4 9 +l 5 8 +l 5 7 +l 4 3 +l 3 0 +m 4 3 +l 5 5 +l 7 8 +l 9 9 +l 11 9 +l 12 8 +l 12 6 +l 11 3 +l 11 1 +l 12 0 +l 13 0 +l 15 1 +l 16 2 +l 18 5 + +111 14 7 22 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 + +112 15 7 21 +m 0 5 +l 2 8 +l 3 10 +l 2 6 +l -4 -12 +m 2 6 +l 3 8 +l 5 9 +l 7 9 +l 9 8 +l 10 6 +l 10 4 +l 9 2 +l 8 1 +l 6 0 +m 2 1 +l 4 0 +l 7 0 +l 10 1 +l 12 2 +l 15 5 + +113 15 7 25 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +m 10 9 +l 9 6 +l 7 1 +l 4 -6 +l 3 -9 +l 3 -11 +l 4 -12 +l 6 -11 +l 7 -8 +l 7 -1 +l 9 0 +l 12 2 +l 15 5 + +114 13 6 14 +m 0 5 +l 2 8 +l 3 10 +l 3 8 +l 6 8 +l 7 7 +l 7 5 +l 6 2 +l 6 1 +l 7 0 +l 8 0 +l 10 1 +l 11 2 +l 13 5 + +115 11 5 14 +m 0 5 +l 2 8 +l 3 10 +l 3 8 +l 5 5 +l 6 3 +l 6 1 +l 4 0 +m 0 1 +l 2 0 +l 6 0 +l 8 1 +l 9 2 +l 11 5 + +116 9 4 13 +m 0 5 +l 2 8 +l 4 12 +m 7 21 +l 1 3 +l 1 1 +l 2 0 +l 4 0 +l 6 1 +l 7 2 +l 9 5 +m 1 13 +l 8 13 + +117 15 7 17 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 + +118 15 7 15 +m 0 5 +l 2 9 +l 1 4 +l 1 1 +l 2 0 +l 3 0 +l 6 1 +l 8 3 +l 9 6 +l 9 9 +m 9 9 +l 10 5 +l 11 4 +l 13 4 +l 15 5 + +119 21 10 22 +m 3 9 +l 1 7 +l 0 4 +l 0 2 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +m 9 9 +l 7 3 +l 7 1 +l 8 0 +l 10 0 +l 12 1 +l 14 3 +l 15 6 +l 15 9 +m 15 9 +l 16 5 +l 17 4 +l 19 4 +l 21 5 + +120 16 8 18 +m 0 5 +l 2 8 +l 4 9 +l 6 9 +l 7 8 +l 7 1 +l 8 0 +l 11 0 +l 14 2 +l 16 5 +m 13 8 +l 12 9 +l 10 9 +l 9 8 +l 5 1 +l 4 0 +l 2 0 +l 1 1 + +121 15 7 21 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 4 -3 +l 7 -1 +l 9 0 +l 12 2 +l 15 5 + +122 14 7 22 +m 0 5 +l 2 8 +l 4 9 +l 6 9 +l 8 7 +l 8 5 +l 7 3 +l 5 1 +l 2 0 +l 4 -1 +l 5 -3 +l 5 -6 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 4 -3 +l 7 -1 +l 11 2 +l 14 5 + +123 10 5 37 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +m 3 24 +l 2 22 +l 2 20 +l 3 18 +l 4 17 +l 5 15 +l 5 13 +l 4 11 +l 0 9 +l 4 7 +l 5 5 +l 5 3 +l 4 1 +l 3 0 +l 2 -2 +l 2 -4 +l 3 -6 +m 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 4 2 2 +m 0 22 +l 0 -6 + +125 9 4 37 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +m 2 24 +l 3 22 +l 3 20 +l 2 18 +l 1 17 +l 0 15 +l 0 13 +l 1 11 +l 5 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 2 0 +l 3 -2 +l 3 -4 +l 2 -6 +m 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 17 8 19 +m 0 13 +l 2 15 +l 4 16 +l 6 16 +l 7 15 +l 8 13 +l 9 12 +l 11 11 +l 12 11 +l 13 12 +l 14 14 +l 14 11 +l 12 10 +l 11 10 +l 9 11 +l 7 13 +l 5 14 +l 3 14 +l 0 13 + +127 16 8 6 +m 0 5 +l 0 0 +l 10 0 +l 10 5 +l 5 13 +l 0 5 + +128 17 8 45 +m 9 13 +l 9 12 +l 10 11 +l 12 11 +l 14 12 +l 15 14 +l 15 16 +l 14 18 +l 12 19 +l 9 19 +l 6 18 +l 4 16 +l 2 13 +l 1 11 +l 0 7 +l 1 4 +l 2 3 +l 4 2 +l 6 2 +l 9 3 +l 11 5 +l 12 7 +m 1 -5 +l 2 -4 +l 1 -3 +l 0 -4 +l 0 -5 +l 1 -7 +l 2 -8 +l 5 -9 +l 9 -9 +l 12 -8 +l 13 -6 +l 13 -4 +l 12 -2 +l 11 -1 +l 9 0 +l 11 -2 +l 12 -4 +l 12 -6 +l 11 -8 +l 9 -9 +m 4 2 +l 4 0 +l 9 0 + +129 15 7 31 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 3 13 +l 2 12 +l 2 11 +l 4 11 +l 5 12 +l 4 13 +l 3 13 +m 9 13 +l 8 12 +l 8 11 +l 10 11 +l 11 12 +l 10 13 +l 9 13 + +130 10 5 23 +m 1 2 +l 3 3 +l 4 4 +l 5 6 +l 5 8 +l 4 9 +l 3 9 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 10 5 +m 7 15 +l 6 16 +l 7 17 +l 8 16 +l 8 15 +l 7 13 +l 3 11 + +131 16 7 26 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 +m 6 17 +l 11 12 +l 6 16 +l 1 12 +l 6 17 + +132 16 8 35 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 +m 3 13 +l 2 12 +l 2 11 +l 4 11 +l 5 12 +l 4 13 +l 3 13 +m 9 13 +l 8 12 +l 8 11 +l 10 11 +l 11 12 +l 10 13 +l 9 13 + +133 16 8 28 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 +m 3 15 +l 4 16 +l 3 17 +l 2 16 +l 2 15 +l 3 13 +l 7 11 + +134 16 8 31 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 +m 7 14 +l 6 14 +l 4 13 +l 4 12 +l 5 11 +l 7 11 +l 9 12 +l 9 13 +l 8 14 +l 7 14 + +135 11 5 29 +m 7 7 +l 7 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 6 0 +l 9 2 +l 11 5 +m 3 0 +l 3 -2 +l 6 -2 +l 8 -3 +l 8 -6 +l 6 -7 +l 3 -7 +l 2 -6 +l 2 -5 +l 3 -4 +l 4 -5 +l 3 -5 +m 6 -2 +l 7 -4 +l 7 -6 +l 6 -7 + +136 10 5 21 +m 1 2 +l 3 3 +l 4 4 +l 5 6 +l 5 8 +l 4 9 +l 3 9 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 10 5 +m -1 12 +l 4 16 +l 9 12 +l 4 17 +l -1 12 + +137 10 5 30 +m 1 2 +l 3 3 +l 4 4 +l 5 6 +l 5 8 +l 4 9 +l 3 9 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 10 5 +m 1 13 +l 0 12 +l 0 11 +l 2 11 +l 3 12 +l 2 13 +l 1 13 +m 7 13 +l 6 12 +l 6 11 +l 8 11 +l 9 12 +l 8 13 +l 7 13 + +138 10 5 23 +m 1 2 +l 3 3 +l 4 4 +l 5 6 +l 5 8 +l 4 9 +l 3 9 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 10 5 +m 1 15 +l 2 16 +l 1 17 +l 0 16 +l 0 15 +l 1 13 +l 5 11 + +139 7 3 23 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +m 1 13 +l 0 12 +l 0 11 +l 2 11 +l 3 12 +l 2 13 +l 1 13 +m 7 13 +l 6 12 +l 6 11 +l 8 11 +l 9 12 +l 8 13 +l 7 13 + +140 7 3 14 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +m -2 12 +l 3 16 +l 8 12 +l 3 17 +l -2 12 + +141 7 3 16 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +m -1 15 +l 0 16 +l -1 17 +l -2 16 +l -2 15 +l -1 13 +l 3 11 + +142 20 10 33 +m 0 0 +l 2 1 +l 5 4 +l 8 8 +l 12 15 +l 15 21 +l 15 0 +l 14 3 +l 12 6 +l 10 8 +l 7 10 +l 5 10 +l 4 9 +l 4 7 +l 5 5 +l 7 3 +l 10 1 +l 13 0 +l 18 0 +m 9 25 +l 8 24 +l 8 23 +l 10 23 +l 11 24 +l 10 25 +l 9 25 +m 15 25 +l 14 24 +l 14 23 +l 16 23 +l 17 24 +l 16 25 +l 15 25 + +143 20 10 29 +m 0 0 +l 2 1 +l 5 4 +l 8 8 +l 12 15 +l 15 21 +l 15 0 +l 14 3 +l 12 6 +l 10 8 +l 7 10 +l 5 10 +l 4 9 +l 4 7 +l 5 5 +l 7 3 +l 10 1 +l 13 0 +l 18 0 +m 14 26 +l 13 26 +l 11 25 +l 11 24 +l 12 23 +l 14 23 +l 16 24 +l 16 25 +l 15 26 +l 14 26 + +144 17 8 31 +m 8 13 +l 8 12 +l 9 11 +l 11 11 +l 12 12 +l 12 14 +l 11 16 +l 8 17 +l 4 17 +l 1 16 +l 0 14 +l 0 11 +l 1 9 +l 4 8 +l 2 8 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 3 +l 14 5 +m 8 23 +l 7 24 +l 8 25 +l 9 24 +l 9 23 +l 8 21 +l 4 19 + +145 20 10 33 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 2 +l 10 1 +l 11 2 +l 13 3 +l 14 4 +l 15 6 +l 15 8 +l 14 9 +l 13 9 +l 11 8 +l 10 6 +l 10 3 +l 11 1 +l 13 0 +l 15 0 +l 17 1 +l 18 2 +l 20 5 + +146 30 15 46 +m 0 0 +l 2 1 +l 5 4 +l 8 8 +l 12 15 +l 15 21 +l 15 0 +l 14 3 +l 12 6 +l 10 8 +l 7 10 +l 5 10 +l 4 9 +l 4 7 +l 5 5 +l 7 3 +l 10 1 +l 13 0 +l 19 0 +m 27 17 +l 27 16 +l 28 15 +l 30 15 +l 31 16 +l 31 18 +l 30 20 +l 27 21 +l 23 21 +l 20 20 +l 19 18 +l 19 15 +l 20 13 +l 21 12 +l 24 11 +l 21 11 +l 18 10 +l 17 9 +l 16 7 +l 16 4 +l 17 2 +l 18 1 +l 21 0 +l 24 0 +l 27 1 +l 29 3 +l 30 5 + +147 14 7 27 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 +m 0 12 +l 5 16 +l 10 12 +l 5 17 +l 0 12 + +148 14 7 36 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 +m 2 13 +l 1 12 +l 1 11 +l 3 11 +l 4 12 +l 3 13 +l 2 13 +m 8 13 +l 7 12 +l 7 11 +l 9 11 +l 10 12 +l 9 13 +l 8 13 + +149 14 7 29 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 +m 3 15 +l 4 16 +l 3 17 +l 2 16 +l 2 15 +l 3 13 +l 7 11 + +150 15 7 22 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 1 12 +l 6 17 +l 11 12 +l 6 16 +l 1 12 + +151 15 7 24 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 3 15 +l 4 16 +l 3 17 +l 2 16 +l 2 15 +l 3 13 +l 7 11 + +152 15 7 35 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 4 -9 +l 3 -11 +l 1 -12 +l 0 -11 +l 0 -9 +l 1 -6 +l 4 -3 +l 7 -1 +l 9 0 +l 12 2 +l 15 5 +m 3 13 +l 2 12 +l 2 11 +l 4 11 +l 5 12 +l 4 13 +l 3 13 +m 9 13 +l 8 12 +l 8 11 +l 10 11 +l 11 12 +l 10 13 +l 9 13 + +153 18 9 42 +m 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 13 +l 0 9 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +l 13 6 +l 14 8 +l 15 12 +l 15 16 +l 14 19 +l 13 20 +l 11 21 +l 9 21 +l 7 19 +l 7 16 +l 8 13 +l 10 10 +l 12 8 +l 15 6 +l 17 5 +m 6 26 +l 5 25 +l 5 24 +l 7 24 +l 8 25 +l 7 26 +l 6 26 +m 12 26 +l 11 25 +l 11 24 +l 13 24 +l 14 25 +l 13 26 +l 12 26 + +154 22 11 45 +m 3 14 +l 1 15 +l 0 17 +l 0 18 +l 1 20 +l 3 21 +l 4 21 +l 6 20 +l 7 18 +l 7 16 +l 6 12 +l 5 9 +l 4 5 +l 4 3 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 12 2 +l 14 6 +l 17 14 +l 19 21 +m 17 14 +l 16 10 +l 15 4 +l 15 1 +l 16 0 +l 17 0 +l 19 1 +l 20 2 +l 22 5 +m 10 25 +l 9 24 +l 9 23 +l 11 23 +l 12 24 +l 11 25 +l 10 25 +m 16 25 +l 15 24 +l 15 23 +l 17 23 +l 18 24 +l 17 25 +l 16 25 + +155 14 7 24 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 +m 10 9 +l 0 -1 + +156 23 11 38 +m 15 18 +l 17 17 +l 18 17 +l 19 18 +l 19 19 +l 18 20 +l 16 21 +l 13 21 +l 12 20 +l 11 18 +l 9 8 +l 8 5 +l 7 3 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 5 3 +l 8 1 +l 11 0 +l 13 0 +l 16 1 +l 17 2 +l 17 3 +l 16 4 +l 15 4 +l 14 3 +m 4 10 +l 6 12 +l 8 13 +l 14 13 +l 16 12 +l 16 11 +l 15 10 +l 13 10 + +157 18 9 30 +m 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 13 +l 0 9 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +l 13 6 +l 14 8 +l 15 12 +l 15 16 +l 14 19 +l 13 20 +l 11 21 +l 9 21 +l 7 19 +l 7 16 +l 8 13 +l 10 10 +l 12 8 +l 15 6 +l 17 5 +m 17 21 +l 0 -1 + +158 26 13 41 +m 10 23 +l 11 22 +l 11 19 +l 10 15 +l 9 12 +l 6 4 +l 3 0 +l 2 0 +l 0 2 +l 0 8 +l 1 13 +l 2 16 +l 3 18 +l 5 21 +l 7 23 +l 9 24 +l 12 25 +l 17 25 +l 19 24 +l 20 23 +l 21 21 +l 21 18 +l 20 16 +l 19 15 +l 17 14 +l 14 14 +l 12 15 +l 11 16 +m 20 14 +l 16 3 +l 16 1 +l 17 0 +l 19 0 +l 21 1 +l 22 2 +l 24 5 +m 15 11 +l 23 11 +m 14 2 +l 16 5 +l 18 9 + +159 23 11 24 +m 4 -4 +l 2 -3 +l 1 -3 +l 0 -4 +l 0 -5 +l 1 -6 +l 3 -7 +l 6 -7 +l 7 -6 +l 8 -4 +l 10 6 +l 11 8 +l 13 18 +l 14 20 +l 15 21 +l 18 21 +l 20 20 +l 21 19 +l 21 18 +l 20 17 +l 19 17 +l 17 18 +m 18 8 +l 4 8 + +160 16 8 28 +m 9 6 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 3 +l 10 9 +l 9 4 +l 9 1 +l 10 0 +l 11 0 +l 13 1 +l 14 2 +l 16 5 +m 8 16 +l 7 17 +l 8 18 +l 9 17 +l 9 16 +l 8 14 +l 4 12 + +161 7 3 16 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 2 0 +l 4 1 +l 5 2 +l 7 5 +m 6 15 +l 5 16 +l 6 17 +l 7 16 +l 7 15 +l 6 13 +l 2 11 + +162 14 7 29 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 +m 8 15 +l 7 16 +l 8 17 +l 9 16 +l 9 15 +l 8 13 +l 4 11 + +163 15 7 24 +m 0 5 +l 2 9 +l 0 3 +l 0 1 +l 1 0 +l 3 0 +l 5 1 +l 7 3 +l 9 6 +m 10 9 +l 8 3 +l 8 1 +l 9 0 +l 10 0 +l 12 1 +l 13 2 +l 15 5 +m 8 15 +l 7 16 +l 8 17 +l 9 16 +l 9 15 +l 8 13 +l 4 11 + +164 18 9 37 +m 0 5 +l 2 8 +l 4 9 +l 5 8 +l 5 7 +l 4 3 +l 3 0 +m 4 3 +l 5 5 +l 7 8 +l 9 9 +l 11 9 +l 12 8 +l 12 6 +l 11 3 +l 11 1 +l 12 0 +l 13 0 +l 15 1 +l 16 2 +l 18 5 +m 4 13 +l 8 15 +l 10 15 +l 13 12 +l 15 11 +l 16 11 +l 17 12 +l 18 14 +l 18 11 +l 16 10 +l 15 10 +l 13 11 +l 11 13 +l 9 14 +l 7 14 +l 4 13 + +165 22 11 49 +m 3 14 +l 1 15 +l 0 17 +l 0 18 +l 1 20 +l 3 21 +l 4 21 +l 6 20 +l 7 18 +l 7 16 +l 6 11 +l 5 7 +l 3 0 +m 5 7 +l 8 15 +l 10 19 +l 11 20 +l 13 21 +l 15 21 +l 17 20 +l 18 18 +l 18 16 +l 17 11 +l 15 4 +l 15 1 +l 16 0 +l 17 0 +l 19 1 +l 20 2 +l 22 5 +m 8 27 +l 10 29 +l 12 30 +l 14 30 +l 15 29 +l 16 27 +l 17 26 +l 19 25 +l 20 25 +l 21 26 +l 22 28 +l 22 25 +l 20 24 +l 19 24 +l 17 25 +l 15 27 +l 13 28 +l 11 28 +l 8 27 + +166 21 10 23 +m 9 18 +l 8 20 +l 6 21 +l 4 21 +l 2 20 +l 1 19 +l 0 17 +l 0 15 +l 1 13 +l 3 12 +l 5 12 +l 7 13 +l 8 15 +l 10 21 +l 9 16 +l 9 13 +l 10 12 +l 11 12 +l 13 13 +l 14 14 +l 16 17 +m 0 0 +l 15 0 + +167 11 5 15 +m 0 17 +l 1 15 +l 3 14 +l 5 14 +l 7 15 +l 8 16 +l 9 18 +l 8 20 +l 6 21 +l 4 21 +l 2 20 +l 1 19 +l 0 17 +m 0 0 +l 9 0 + +168 15 7 31 +m 12 4 +l 11 5 +l 12 6 +l 13 5 +l 13 4 +l 12 2 +l 11 1 +l 8 0 +l 4 0 +l 1 1 +l 0 3 +l 0 5 +l 1 7 +l 2 8 +l 8 10 +l 10 11 +l 10 13 +l 9 14 +l 7 14 +m 4 0 +l 2 1 +l 1 3 +l 1 5 +l 2 7 +l 3 8 +l 5 9 +m 11 19 +l 12 20 +l 11 21 +l 10 20 +l 11 19 + +169 12 6 7 +m 0 0 +l 0 5 +l 9 5 +l 9 3 +l 2 3 +l 2 0 +l 0 0 + +170 12 6 7 +m 9 0 +l 9 5 +l 0 5 +l 0 3 +l 7 3 +l 7 0 +l 9 0 + +171 23 11 18 +m 18 21 +l 16 21 +l 0 0 +l 2 0 +l 18 21 +m 0 18 +l 1 18 +l 4 21 +l 4 12 +m 11 6 +l 11 7 +l 12 8 +l 14 9 +l 16 9 +l 18 7 +l 18 4 +l 11 0 +l 18 0 + +172 23 11 13 +m 18 21 +l 16 21 +l 0 0 +l 2 0 +l 18 21 +m 0 18 +l 1 18 +l 4 21 +l 4 12 +m 18 3 +l 10 3 +l 16 9 +l 16 0 + +173 9 4 11 +m 3 13 +l 7 1 +l 6 0 +l 5 1 +l 3 13 +l 6 1 +m 1 19 +l 0 20 +l 1 21 +l 2 20 +l 1 19 + +174 19 9 6 +m 7 14 +l 0 9 +l 7 4 +m 14 14 +l 7 9 +l 14 4 + +175 19 9 6 +m 7 14 +l 14 9 +l 7 4 +m 0 14 +l 7 9 +l 0 4 + +176 14 7 126 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 18 +l 1 16 +m 1 12 +l 1 10 +m 1 6 +l 1 4 +m 1 0 +l 1 -2 +m 4 21 +l 6 21 +l 6 19 +l 4 19 +l 4 21 +m 4 15 +l 6 15 +l 6 13 +l 4 13 +l 4 15 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 4 3 +l 6 3 +l 6 1 +l 4 1 +l 4 3 +m 5 21 +l 5 19 +m 5 15 +l 5 13 +m 5 9 +l 5 7 +m 5 3 +l 5 1 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 18 +l 9 16 +m 9 12 +l 9 10 +m 9 6 +l 9 4 +m 9 0 +l 9 -2 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 12 15 +l 14 15 +l 14 13 +l 12 13 +l 12 15 +m 12 9 +l 14 9 +l 14 7 +l 12 7 +l 12 9 +m 12 3 +l 14 3 +l 14 1 +l 12 1 +l 12 3 +m 13 21 +l 13 19 +m 13 15 +l 13 13 +m 13 9 +l 13 7 +m 13 3 +l 13 1 +m 4 -3 +l 4 -5 +l 6 -5 +l 6 -3 +l 4 -3 +m 5 -3 +l 5 -5 +m 12 -3 +l 12 -5 +l 14 -5 +l 14 -3 +l 12 -3 +m 13 -3 +l 13 -5 + +177 16 8 252 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 18 +l 1 16 +m 1 12 +l 1 10 +m 1 6 +l 1 4 +m 1 0 +l 1 -2 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 2 15 +l 4 15 +l 4 13 +l 2 13 +l 2 15 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 2 3 +l 4 3 +l 4 1 +l 2 1 +l 2 3 +m 3 21 +l 3 19 +m 3 15 +l 3 13 +m 3 9 +l 3 7 +m 3 3 +l 3 1 +m 4 18 +l 6 18 +l 6 16 +l 4 16 +l 4 18 +m 4 12 +l 6 12 +l 6 10 +l 4 10 +l 4 12 +m 4 6 +l 6 6 +l 6 4 +l 4 4 +l 4 6 +m 4 0 +l 6 0 +l 6 -2 +l 4 -2 +l 4 0 +m 5 18 +l 5 16 +m 5 12 +l 5 10 +m 5 6 +l 5 4 +m 5 0 +l 5 -2 +m 6 21 +l 8 21 +l 8 19 +l 6 19 +l 6 21 +m 6 15 +l 8 15 +l 8 13 +l 6 13 +l 6 15 +m 6 9 +l 8 9 +l 8 7 +l 6 7 +l 6 9 +m 6 3 +l 8 3 +l 8 1 +l 6 1 +l 6 3 +m 7 21 +l 7 19 +m 7 15 +l 7 13 +m 7 9 +l 7 7 +m 7 3 +l 7 1 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 18 +l 9 16 +m 9 12 +l 9 10 +m 9 6 +l 9 4 +m 9 0 +l 9 -2 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 10 15 +l 12 15 +l 12 13 +l 10 13 +l 10 15 +m 10 9 +l 12 9 +l 12 7 +l 10 7 +l 10 9 +m 10 3 +l 12 3 +l 12 1 +l 10 1 +l 10 3 +m 11 21 +l 11 19 +m 11 15 +l 11 13 +m 11 9 +l 11 7 +m 11 3 +l 11 1 +m 12 18 +l 14 18 +l 14 16 +l 12 16 +l 12 18 +m 12 12 +l 14 12 +l 14 10 +l 12 10 +l 12 12 +m 12 6 +l 14 6 +l 14 4 +l 12 4 +l 12 6 +m 12 0 +l 14 0 +l 14 -2 +l 12 -2 +l 12 0 +m 13 18 +l 13 16 +m 13 12 +l 13 10 +m 13 6 +l 13 4 +m 13 0 +l 13 -2 +m 14 21 +l 16 21 +l 16 19 +l 14 19 +l 14 21 +m 14 15 +l 16 15 +l 16 13 +l 14 13 +l 14 15 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 14 3 +l 16 3 +l 16 1 +l 14 1 +l 14 3 +m 15 21 +l 15 19 +m 15 15 +l 15 13 +m 15 9 +l 15 7 +m 15 3 +l 15 1 +m 2 -3 +l 2 -5 +l 4 -5 +l 4 -3 +l 2 -3 +m 3 -3 +l 3 -5 +m 6 -3 +l 8 -3 +l 8 -5 +l 6 -5 +l 6 -3 +m 7 -3 +l 7 -5 +m 10 -3 +l 10 -5 +l 12 -5 +l 12 -3 +l 10 -3 +m 11 -3 +l 11 -5 +m 14 -3 +l 14 -5 +l 16 -5 +l 16 -3 +l 14 -3 +m 15 -3 +l 15 -5 + +178 24 12 271 +m 0 21 +l 2 21 +l 2 19 +l 0 19 +l 0 21 +m 1 21 +l 1 19 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 20 21 +l 22 21 +l 22 19 +l 20 19 +l 20 21 +m 21 21 +l 21 19 +m 22 21 +l 24 21 +l 24 19 +l 22 19 +l 22 21 +m 23 21 +l 23 19 +m 4 17 +l 6 17 +l 6 15 +l 4 15 +l 4 17 +m 5 17 +l 5 15 +m 6 17 +l 10 17 +l 10 15 +l 6 15 +l 6 17 +m 7 17 +l 7 15 +m 9 17 +l 9 15 +m 18 17 +l 24 17 +l 24 15 +l 18 15 +l 18 17 +m 19 17 +l 19 15 +m 21 17 +l 21 15 +m 23 17 +l 23 15 +m 0 13 +l 2 13 +l 2 11 +l 0 11 +l 0 13 +m 1 13 +l 1 11 +m 2 13 +l 4 13 +l 4 11 +l 2 11 +l 2 13 +m 3 13 +l 3 11 +m 0 5 +l 2 5 +l 2 3 +l 0 3 +l 0 5 +m 1 5 +l 1 3 +m 2 5 +l 4 5 +l 4 3 +l 2 3 +l 2 5 +m 3 5 +l 3 3 +m 6 1 +l 10 1 +l 10 -1 +l 4 -1 +l 4 1 +l 6 1 +l 6 -1 +m 5 1 +l 5 -1 +m 7 1 +l 7 -1 +m 9 1 +l 9 -1 +m 10 13 +l 12 13 +l 12 11 +l 10 11 +l 10 13 +m 11 13 +l 11 11 +m 14 13 +l 14 11 +l 12 11 +l 12 13 +l 14 13 +m 13 13 +l 13 11 +m 22 13 +l 22 11 +l 20 11 +l 20 13 +l 24 13 +l 24 11 +l 22 11 +l 22 13 +m 21 13 +l 21 11 +l 23 11 +l 23 13 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 16 9 +l 18 9 +l 18 7 +l 16 7 +l 16 9 +m 17 9 +l 17 7 +m 18 9 +l 20 9 +l 20 7 +l 18 7 +l 18 9 +m 19 9 +l 19 7 +m 10 5 +l 12 5 +l 12 3 +l 10 3 +l 10 5 +m 11 5 +l 11 3 +m 12 5 +l 14 5 +l 14 3 +l 12 3 +l 12 5 +m 13 5 +l 13 3 +m 20 5 +l 22 5 +l 22 3 +l 20 3 +l 20 5 +m 21 5 +l 21 3 +m 22 5 +l 24 5 +l 24 3 +l 22 3 +l 22 5 +m 23 5 +l 23 3 +m 0 -3 +l 2 -3 +l 2 -5 +l 0 -5 +l 0 -3 +m 1 -3 +l 1 -5 +m 2 -3 +l 4 -3 +l 4 -5 +l 2 -5 +l 2 -3 +m 3 -3 +l 3 -5 +m 10 -3 +l 12 -3 +l 12 -5 +l 10 -5 +l 10 -3 +m 11 -3 +l 11 -5 +m 12 -3 +l 14 -3 +l 14 -5 +l 12 -5 +l 12 -3 +m 13 -3 +l 13 -5 +m 20 -3 +l 22 -3 +l 22 -5 +l 20 -5 +l 20 -3 +m 21 -3 +l 21 -5 +m 22 -3 +l 24 -3 +l 24 -5 +l 22 -5 +l 22 -3 +m 23 -3 +l 23 -5 +m 8 1 +l 8 -1 +m 8 17 +l 8 15 +m 20 17 +l 20 15 +m 22 17 +l 22 15 +m 0 9 +l 2 9 +l 2 7 +l 0 7 +l 0 9 +m 1 9 +l 1 7 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 20 1 +l 24 1 +l 24 -1 +l 18 -1 +l 18 1 +l 20 1 +l 20 -1 +m 19 1 +l 19 -1 +m 21 1 +l 21 -1 +m 23 1 +l 23 -1 +m 22 1 +l 22 -1 + +179 3 1 2 +m 0 21 +l 0 -7 + +180 10 5 4 +m 7 21 +l 7 -7 +m 0 5 +l 7 5 + +181 10 5 6 +m 7 -7 +l 7 21 +m 0 9 +l 7 9 +m 0 5 +l 7 5 + +182 18 9 6 +m 7 21 +l 7 -7 +m 0 5 +l 7 5 +m 15 21 +l 15 -7 + +183 18 9 5 +m 0 5 +l 15 5 +l 15 -7 +m 7 5 +l 7 -7 + +184 10 5 5 +m 0 9 +l 7 9 +l 7 -7 +m 0 5 +l 7 5 + +185 18 9 8 +m 0 5 +l 7 5 +l 7 -7 +m 15 21 +l 15 -7 +m 0 9 +l 7 9 +l 7 21 + +186 18 9 4 +m 7 21 +l 7 -7 +m 15 21 +l 15 -7 + +187 18 9 6 +m 0 5 +l 7 5 +l 7 -7 +m 0 9 +l 15 9 +l 15 -7 + +188 18 9 6 +m 0 9 +l 7 9 +l 7 21 +m 0 5 +l 15 5 +l 15 21 + +189 18 9 5 +m 0 9 +l 15 9 +l 15 21 +m 7 9 +l 7 21 + +190 10 5 5 +m 0 5 +l 7 5 +l 7 21 +m 0 9 +l 7 9 + +191 0 0 3 +m 0 5 +l 7 5 +l 7 -7 + +192 7 3 3 +m 7 9 +l 0 9 +l 0 21 + +193 14 7 5 +m 0 9 +l 7 9 +l 7 21 +m 14 9 +l 7 9 + +194 14 7 5 +m 0 5 +l 7 5 +l 7 -7 +m 14 5 +l 7 5 + +195 7 3 4 +m 0 21 +l 0 -7 +m 7 5 +l 0 5 + +196 15 7 2 +m 0 5 +l 15 5 + +197 14 7 4 +m 7 21 +l 7 -7 +m 0 5 +l 14 5 + +198 7 3 6 +m 0 -7 +l 0 21 +m 7 9 +l 0 9 +m 7 5 +l 0 5 + +199 15 7 6 +m 8 21 +l 8 -7 +m 15 5 +l 8 5 +m 0 21 +l 0 -7 + +200 15 7 6 +m 15 9 +l 8 9 +l 8 21 +m 15 5 +l 0 5 +l 0 21 + +201 15 7 6 +m 15 5 +l 8 5 +l 8 -7 +m 15 9 +l 0 9 +l 0 -7 + +202 22 11 8 +m 0 9 +l 7 9 +l 7 21 +m 0 5 +l 22 5 +m 15 21 +l 15 9 +l 22 9 + +203 22 11 8 +m 0 5 +l 7 5 +l 7 -7 +m 0 9 +l 22 9 +m 15 -7 +l 15 5 +l 22 5 + +204 15 7 8 +m 15 5 +l 8 5 +l 8 -7 +m 0 21 +l 0 -7 +m 15 9 +l 8 9 +l 8 21 + +205 22 11 4 +m 0 9 +l 22 9 +m 0 5 +l 22 5 + +206 22 11 12 +m 0 5 +l 7 5 +l 7 -7 +m 0 9 +l 7 9 +l 7 21 +m 15 21 +l 15 9 +l 22 9 +m 15 -7 +l 15 5 +l 22 5 + +207 14 7 7 +m 0 9 +l 7 9 +l 7 21 +m 14 9 +l 7 9 +m 0 5 +l 14 5 + +208 15 7 6 +m 0 9 +l 15 9 +m 13 21 +l 13 9 +m 5 21 +l 5 9 + +209 14 7 7 +m 0 5 +l 7 5 +l 7 -7 +m 14 5 +l 7 5 +m 0 9 +l 14 9 + +210 15 7 6 +m 0 5 +l 15 5 +m 13 -7 +l 13 5 +m 5 -7 +l 5 5 + +211 15 7 5 +m 15 9 +l 0 9 +l 0 21 +m 8 9 +l 8 21 + +212 7 3 5 +m 7 5 +l 0 5 +l 0 21 +m 7 9 +l 0 9 + +213 7 3 5 +m 7 9 +l 0 9 +l 0 -7 +m 7 5 +l 0 5 + +214 15 7 7 +m 15 5 +l 0 5 +l 0 -7 +m 8 5 +l 8 -7 +m -1 0 +l -1 0 + +215 23 11 6 +m 7 21 +l 7 -7 +m 0 5 +l 22 5 +m 15 21 +l 15 -7 + +216 14 7 6 +m 7 -7 +l 7 21 +m 0 9 +l 14 9 +m 0 5 +l 14 5 + +217 10 5 3 +m 0 9 +l 7 9 +l 7 21 + +218 7 3 3 +m 7 5 +l 0 5 +l 0 -7 + +219 15 7 39 +m 0 21 +l 15 21 +l 15 0 +l 0 0 +l 0 21 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 10 12 +l 8 12 +m 0 11 +l 15 11 + +220 15 7 33 +m 15 0 +l 0 0 +l 0 11 +l 15 11 +l 15 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 0 +l 6 11 +m 7 11 +l 7 0 +m 8 11 +l 8 0 +m 9 11 +l 9 0 +m 10 11 +l 10 0 +m 11 11 +l 11 0 +m 12 0 +l 12 11 +m 13 11 +l 13 0 +m 14 11 +l 14 0 + +221 8 4 19 +m 0 0 +l 0 21 +l 8 21 +l 8 0 +l 0 0 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 21 +l 5 0 +m 6 21 +l 6 0 +m 7 21 +l 7 0 + +222 17 8 19 +m 9 0 +l 9 21 +l 17 21 +l 17 0 +l 9 0 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 16 21 +l 16 0 + +223 15 7 33 +m 15 10 +l 0 10 +l 0 21 +l 15 21 +l 15 10 +m 1 21 +l 1 10 +m 2 21 +l 2 10 +m 3 21 +l 3 10 +m 4 21 +l 4 10 +m 5 21 +l 5 10 +m 6 10 +l 6 21 +m 7 21 +l 7 10 +m 8 21 +l 8 10 +m 9 21 +l 9 10 +m 10 21 +l 10 10 +m 11 21 +l 11 10 +m 12 10 +l 12 21 +m 13 21 +l 13 10 +m 14 21 +l 14 10 + +224 15 7 15 +m 12 0 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 12 9 + +225 11 5 12 +m 0 -3 +l 0 10 +l 7 10 +l 8 9 +l 8 7 +l 6 6 +l 0 6 +m 6 6 +l 8 5 +l 8 2 +l 7 1 +l 0 1 + +226 9 4 4 +m 0 0 +l 0 10 +l 7 10 +l 7 8 + +227 12 6 6 +m 3 10 +l 3 0 +m 8 10 +l 8 0 +m 0 10 +l 10 10 + +228 15 7 7 +m 12 2 +l 12 0 +l 0 0 +l 8 11 +l 0 21 +l 12 21 +l 12 19 + +229 19 9 18 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +m 4 9 +l 7 11 +l 17 11 + +230 25 12 20 +m 7 5 +l 9 9 +l 7 3 +l 7 1 +l 8 0 +l 10 0 +l 12 1 +l 14 3 +l 16 6 +m 17 9 +l 15 3 +l 15 1 +l 16 0 +l 17 0 +l 19 1 +l 20 2 +l 22 5 +m 7 2 +l 5 -4 +l 2 -8 + +231 16 8 8 +m 9 -3 +l 9 6 +l 7 9 +l 4 9 +l 1 8 +l 0 5 +m 9 4 +l 14 9 + +232 12 6 23 +m 5 14 +l 5 21 +m 0 21 +l 10 21 +m 6 14 +l 4 14 +l 2 13 +l 1 12 +l 0 10 +l 0 8 +l 1 6 +l 3 5 +l 5 5 +l 7 6 +l 8 7 +l 9 9 +l 9 11 +l 8 13 +l 6 14 +m 4 5 +l 4 -2 +m 0 -2 +l 9 -2 + +233 18 9 23 +m 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 13 +l 0 9 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +l 13 6 +l 14 8 +l 15 12 +l 15 16 +l 14 19 +l 13 20 +l 11 21 +l 9 21 +m 1 11 +l 14 11 + +234 17 8 22 +m 14 0 +l 9 0 +l 9 4 +l 10 6 +l 11 7 +l 13 8 +l 14 10 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 10 +l 1 8 +l 3 7 +l 4 6 +l 5 4 +l 5 0 +l 0 0 + +235 12 6 19 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +m 8 8 +l 0 21 +l 9 21 +l 9 19 + +236 21 10 30 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +m 15 9 +l 13 9 +l 11 8 +l 10 7 +l 9 5 +l 9 3 +l 10 1 +l 12 0 +l 14 0 +l 16 1 +l 17 2 +l 18 4 +l 18 6 +l 17 8 +l 15 9 + +237 14 7 24 +m 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 7 1 +l 8 2 +l 9 4 +l 9 6 +l 8 8 +l 6 9 +l 5 8 +l 5 6 +l 6 4 +l 8 3 +l 11 3 +l 13 4 +l 14 5 +m 10 9 +l 0 -1 + +238 15 7 9 +m 12 21 +l 3 21 +l 0 19 +l 0 11 +l 8 11 +m 12 0 +l 3 0 +l 0 2 +l 0 11 + +239 17 8 12 +m 14 0 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 0 +m 41 -2 +l 41 -2 + +240 21 10 6 +m 0 9 +l 18 9 +m 0 13 +l 18 13 +m 0 5 +l 18 5 + +241 21 10 6 +m 0 0 +l 18 0 +m 9 21 +l 9 3 +m 0 12 +l 18 12 + +242 21 10 5 +m 0 0 +l 18 0 +m 0 21 +l 18 12 +l 0 3 + +243 22 11 5 +m 18 0 +l 0 0 +m 18 21 +l 0 12 +l 18 3 + +244 15 7 7 +m 0 -6 +l 0 18 +l 2 20 +l 4 21 +l 9 21 +l 11 20 +l 12 19 + +245 15 7 7 +m 12 21 +l 12 -3 +l 10 -5 +l 8 -6 +l 3 -6 +l 1 -5 +l 0 -4 + +246 21 10 12 +m 9 21 +l 8 20 +l 9 19 +l 10 20 +l 9 21 +m 9 2 +l 8 1 +l 9 0 +l 10 1 +l 9 2 +m 0 11 +l 18 11 + +247 17 8 40 +m 0 13 +l 2 15 +l 4 16 +l 6 16 +l 7 15 +l 8 13 +l 9 12 +l 11 11 +l 12 11 +l 13 12 +l 14 14 +l 14 11 +l 12 10 +l 11 10 +l 9 11 +l 7 13 +l 5 14 +l 3 14 +l 0 13 +m 0 5 +l 2 7 +l 4 8 +l 6 8 +l 7 7 +l 8 5 +l 9 4 +l 11 3 +l 12 3 +l 13 4 +l 14 6 +l 14 3 +l 12 2 +l 11 2 +l 9 3 +l 7 5 +l 5 6 +l 3 6 +l 0 5 +m 5 2 +l 5 2 + +248 11 5 15 +m 6 21 +l 4 21 +l 2 20 +l 1 19 +l 0 17 +l 0 15 +l 1 13 +l 3 12 +l 5 12 +l 7 13 +l 8 14 +l 9 16 +l 9 18 +l 8 20 +l 6 21 + +249 6 3 11 +m 3 0 +l 3 4 +l 0 4 +l 0 0 +l 3 0 +m 2 4 +l 2 0 +m 1 4 +l 1 0 +m 0 2 +l 3 2 + +250 6 3 9 +m 0 0 +l 3 0 +l 3 2 +l 0 2 +l 0 0 +m 2 2 +l 2 0 +m 1 2 +l 1 0 + +251 22 11 5 +m 0 9 +l 9 0 +l 9 21 +l 19 21 +l 19 19 + +252 21 10 21 +m 0 17 +l 2 20 +l 4 21 +l 5 20 +l 5 19 +l 4 15 +l 3 12 +m 4 15 +l 5 17 +l 7 20 +l 9 21 +l 11 21 +l 12 20 +l 12 18 +l 11 15 +l 11 13 +l 12 12 +l 13 12 +l 15 13 +l 16 14 +l 18 17 + +253 11 5 10 +m 8 11 +l 0 11 +l 6 15 +l 8 17 +l 8 19 +l 6 21 +l 3 21 +l 1 20 +l 0 19 +l 0 18 + +254 10 5 17 +m 0 0 +l 0 11 +l 7 11 +l 7 0 +l 0 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 0 +l 6 11 diff --git a/cd/etc/vectorfont26.txt b/cd/etc/vectorfont26.txt new file mode 100755 index 0000000..095908b --- /dev/null +++ b/cd/etc/vectorfont26.txt @@ -0,0 +1,1036 @@ +CALGKS 1st set +15 15 7 -7 + + +0 15 7 0 + +1 15 7 0 + +2 15 7 0 + +3 15 7 0 + +4 15 7 0 + +5 15 7 0 + +6 15 7 0 + +7 15 7 0 + +8 15 7 0 + +9 15 7 0 + +10 15 7 0 + +11 15 7 0 + +12 15 7 0 + +13 15 7 0 + +14 15 7 0 + +15 15 7 0 + +16 15 7 0 + +17 15 7 0 + +18 15 7 0 + +19 15 7 0 + +20 15 7 0 + +21 15 7 0 + +22 15 7 0 + +23 15 7 0 + +24 15 7 0 + +25 15 7 0 + +26 15 7 0 + +27 15 7 0 + +28 15 7 0 + +29 15 7 0 + +30 15 7 0 + +31 15 7 0 + +32 15 7 7 +m 7 7 +l 7 14 +l 14 14 +l 14 0 +l 0 0 +l 0 14 +l 7 14 + +33 15 7 11 +m 7 7 +l 7 14 +l 11 14 +l 14 11 +l 14 3 +l 11 0 +l 3 0 +l 0 3 +l 0 11 +l 3 14 +l 7 14 + +34 15 7 6 +m 7 7 +l 7 14 +l 14 4 +m 14 4 +l 0 4 +l 7 14 + +35 15 7 4 +m 0 7 +l 14 7 +m 7 14 +l 7 0 + +36 15 7 4 +m 0 14 +l 14 0 +m 0 0 +l 14 14 + +37 15 7 6 +m 7 7 +l 7 14 +l 14 7 +l 7 0 +l 0 7 +l 7 14 + +38 15 7 5 +m 7 0 +l 7 14 +l 14 7 +l 0 7 +l 7 14 + +39 15 7 4 +m 0 0 +l 14 14 +l 0 14 +l 14 0 + +40 15 7 6 +m 14 0 +l 0 0 +l 14 14 +l 0 14 +m 5 7 +l 9 7 + +41 15 7 5 +m 0 14 +l 7 7 +l 14 14 +m 7 7 +l 7 0 + +42 15 7 12 +m 0 0 +l 4 4 +l 10 4 +l 10 10 +l 4 10 +l 4 4 +m 7 7 +l 14 14 +m 4 10 +l 0 14 +m 10 4 +l 14 0 + +43 15 7 8 +m 0 0 +l 14 14 +m 14 0 +l 0 14 +m 7 14 +l 7 0 +m 14 7 +l 0 7 + +44 15 7 5 +m 0 0 +l 14 14 +l 0 14 +l 14 0 +l 0 0 + +45 15 7 2 +m 7 0 +l 7 14 + +46 15 7 9 +m 7 7 +l 7 14 +l 14 3 +l 0 3 +l 7 14 +m 7 0 +l 0 11 +l 14 11 +l 7 0 + +47 15 7 2 +m 7 7 +l 15 7 + +48 15 7 0 + +49 15 7 9 +m 7 3 +l 6 15 +l 8 15 +l 7 3 +m 6 2 +l 8 2 +l 8 0 +l 6 0 +l 6 2 + +50 15 7 8 +m 8 15 +l 6 15 +l 8 11 +l 8 15 +m 4 15 +l 4 11 +l 2 15 +l 4 15 + +51 15 7 8 +m 0 4 +l 9 4 +m 10 10 +l 1 10 +m 2 1 +l 4 13 +m 8 13 +l 6 1 + +52 15 7 14 +m 5 15 +l 5 0 +m 9 12 +l 8 13 +l 2 13 +l 0 11 +l 0 10 +l 2 8 +l 7 8 +l 9 6 +l 9 4 +l 7 2 +l 1 2 +l 0 3 + +53 15 7 12 +m 0 0 +l 10 15 +m 10 0 +l 8 0 +l 8 2 +l 10 2 +l 10 0 +m 2 13 +l 0 13 +l 0 15 +l 2 15 +l 2 13 + +54 15 7 14 +m 10 0 +l 2 11 +l 2 13 +l 3 15 +l 5 15 +l 6 13 +l 6 11 +l 1 6 +l 0 3 +l 1 1 +l 3 0 +l 5 0 +l 8 1 +l 10 3 + +55 15 7 4 +m 4 15 +l 2 15 +l 4 11 +l 4 15 + +56 15 7 6 +m 10 15 +l 8 13 +l 7 11 +l 7 4 +l 8 2 +l 10 0 + +57 15 7 6 +m 0 0 +l 2 2 +l 3 4 +l 3 11 +l 2 13 +l 0 15 + +58 15 7 8 +m 5 11 +l 5 3 +m 1 7 +l 9 7 +m 2 10 +l 8 4 +m 8 10 +l 2 4 + +59 15 7 4 +m 5 11 +l 5 3 +m 1 7 +l 9 7 + +60 15 7 4 +m 7 2 +l 7 0 +l 8 2 +l 7 2 + +61 15 7 2 +m 5 7 +l 9 7 + +62 15 7 5 +m 4 0 +l 5 0 +l 5 1 +l 4 1 +l 4 0 + +63 15 7 2 +m 4 0 +l 6 15 + +64 15 7 12 +m 5 15 +l 2 14 +l 1 13 +l 0 12 +l 0 3 +l 2 1 +l 5 0 +l 8 1 +l 10 3 +l 10 12 +l 8 14 +l 5 15 + +65 15 7 3 +m 4 14 +l 5 15 +l 5 0 + +66 15 7 15 +m 0 13 +l 1 14 +l 4 15 +l 6 15 +l 8 14 +l 9 13 +l 10 11 +l 9 9 +l 8 8 +l 5 7 +l 3 6 +l 1 4 +l 0 2 +l 0 0 +l 10 0 + +67 15 7 14 +m 0 15 +l 10 15 +l 9 13 +l 7 11 +l 5 10 +l 8 9 +l 10 7 +l 10 5 +l 9 2 +l 8 1 +l 5 0 +l 2 1 +l 1 2 +l 0 5 + +68 15 7 4 +m 10 4 +l 0 4 +l 8 15 +l 8 0 + +69 15 7 15 +m 10 15 +l 0 15 +l 0 9 +l 3 10 +l 5 10 +l 8 9 +l 9 8 +l 10 6 +l 10 4 +l 9 2 +l 8 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 + +70 15 7 23 +m 9 13 +l 8 14 +l 6 15 +l 4 15 +l 2 14 +l 1 13 +l 0 11 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 10 5 +l 9 7 +l 8 8 +l 6 9 +l 4 9 +l 2 8 +l 1 7 +l 0 5 + +71 15 7 7 +m 0 0 +l 0 1 +l 1 4 +l 3 8 +l 6 12 +l 10 15 +l 0 15 + +72 15 7 25 +m 4 15 +l 6 15 +l 9 14 +l 10 12 +l 10 11 +l 9 9 +l 6 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 6 0 +l 9 1 +l 10 3 +l 10 4 +l 9 6 +l 6 7 +l 4 8 +l 1 9 +l 0 11 +l 0 12 +l 1 14 +l 4 15 + +73 15 7 18 +m 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 10 3 +l 10 11 +l 9 13 +l 6 15 +l 4 15 +l 1 13 +l 0 11 +l 0 9 +l 1 7 +l 4 5 +l 6 5 +l 9 7 +l 10 9 + +74 15 7 10 +m 4 10 +l 4 9 +l 5 9 +l 5 10 +l 4 10 +m 4 5 +l 4 6 +l 5 6 +l 5 5 +l 4 5 + +75 15 7 9 +m 5 2 +l 6 4 +l 5 4 +l 5 2 +m 5 5 +l 6 5 +l 6 6 +l 5 6 +l 5 5 + +76 15 7 3 +m 9 12 +l 0 8 +l 9 4 + +77 15 7 4 +m 0 9 +l 10 9 +m 0 5 +l 10 5 + +78 15 7 3 +m 0 11 +l 10 7 +l 0 3 + +79 15 7 16 +m 4 2 +l 4 0 +l 6 0 +l 6 2 +l 4 2 +m 5 3 +l 5 5 +l 6 6 +l 8 7 +l 10 9 +l 10 12 +l 9 14 +l 6 15 +l 4 15 +l 1 14 +l 0 13 + +80 15 7 21 +m 9 4 +l 7 3 +l 5 3 +l 3 4 +l 2 8 +l 3 12 +l 5 13 +l 7 13 +l 9 12 +l 10 10 +l 10 7 +l 9 6 +l 8 7 +l 8 10 +l 7 11 +l 6 11 +l 5 10 +l 4 8 +l 5 6 +l 7 6 +l 8 7 + +81 15 7 5 +m 0 0 +l 5 15 +l 10 0 +m 8 6 +l 2 6 + +82 15 7 16 +m 0 0 +l 0 15 +l 8 15 +l 9 14 +l 10 12 +l 10 11 +l 9 9 +l 8 8 +l 0 8 +m 8 8 +l 9 7 +l 10 5 +l 10 3 +l 9 1 +l 8 0 +l 0 0 + +83 15 7 16 +m 10 11 +l 9 13 +l 8 14 +l 6 15 +l 4 15 +l 2 14 +l 1 13 +l 0 11 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 + +84 15 7 11 +m 0 0 +l 0 15 +l 6 15 +l 8 14 +l 9 13 +l 10 11 +l 10 4 +l 9 2 +l 8 1 +l 6 0 +l 0 0 + +85 15 7 6 +m 10 0 +l 0 0 +l 0 15 +l 10 15 +m 0 8 +l 9 8 + +86 15 7 5 +m 0 0 +l 0 15 +l 10 15 +m 0 8 +l 9 8 + +87 15 7 18 +m 10 11 +l 9 13 +l 8 14 +l 6 15 +l 4 15 +l 2 14 +l 1 13 +l 0 11 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 10 6 +l 7 6 + +88 15 7 6 +m 0 0 +l 0 15 +m 10 0 +l 10 15 +m 10 8 +l 0 8 + +89 15 7 6 +m 4 15 +l 6 15 +m 6 0 +l 4 0 +m 5 0 +l 5 15 + +90 15 7 9 +m 10 15 +l 10 4 +l 9 2 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 + +91 15 7 6 +m 0 0 +l 0 15 +m 0 5 +l 10 15 +m 3 8 +l 10 0 + +92 15 7 3 +m 0 15 +l 0 0 +l 10 0 + +93 15 7 5 +m 0 0 +l 0 15 +l 5 8 +l 10 15 +l 10 0 + +94 15 7 4 +m 0 0 +l 0 15 +l 10 0 +l 10 15 + +95 15 7 13 +m 3 15 +l 7 15 +l 9 14 +l 10 13 +l 10 2 +l 9 1 +l 7 0 +l 3 0 +l 1 1 +l 0 2 +l 0 13 +l 1 14 +l 3 15 + +96 15 7 9 +m 0 0 +l 0 15 +l 7 15 +l 9 14 +l 10 12 +l 10 11 +l 9 9 +l 7 8 +l 0 8 + +97 15 7 15 +m 0 12 +l 1 14 +l 3 15 +l 7 15 +l 9 14 +l 10 12 +l 10 3 +l 9 1 +l 7 0 +l 3 0 +l 1 1 +l 0 3 +l 0 12 +m 8 2 +l 10 0 + +98 15 7 11 +m 0 0 +l 0 15 +l 7 15 +l 9 14 +l 10 12 +l 10 11 +l 9 9 +l 7 8 +l 0 8 +m 6 8 +l 10 0 + +99 15 7 18 +m 10 12 +l 9 14 +l 7 15 +l 3 15 +l 1 14 +l 0 12 +l 0 11 +l 1 9 +l 3 8 +l 7 7 +l 9 6 +l 10 4 +l 10 3 +l 9 1 +l 7 0 +l 3 0 +l 1 1 +l 0 3 + +100 15 7 4 +m 0 15 +l 10 15 +m 5 15 +l 5 0 + +101 15 7 10 +m 0 15 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 10 15 + +102 15 7 3 +m 0 15 +l 5 0 +l 10 15 + +103 15 7 5 +m 0 15 +l 3 0 +l 5 7 +l 7 0 +l 10 15 + +104 15 7 4 +m 0 15 +l 10 0 +m 10 15 +l 0 0 + +105 15 7 5 +m 0 15 +l 5 8 +l 5 0 +m 5 8 +l 10 15 + +106 15 7 4 +m 0 15 +l 10 15 +l 0 0 +l 10 0 + +107 15 7 4 +m 5 15 +l 0 15 +l 0 0 +l 5 0 + +108 15 7 2 +m 0 15 +l 10 0 + +109 15 7 4 +m 5 15 +l 10 15 +l 10 0 +l 5 0 + +110 15 7 5 +m 5 0 +l 5 15 +l 6 13 +l 4 13 +l 5 15 + +111 15 7 5 +m 10 8 +l 0 8 +l 2 9 +l 2 7 +l 0 8 + +112 15 7 9 +m 6 15 +l 5 15 +l 4 14 +l 4 13 +l 5 12 +l 6 12 +l 7 13 +l 7 14 +l 6 15 + +113 15 7 13 +m 8 0 +l 8 7 +l 7 8 +l 3 8 +l 2 7 +m 8 4 +l 7 5 +l 4 5 +l 2 4 +l 2 1 +l 4 0 +l 7 0 +l 8 1 + +114 15 7 10 +m 2 0 +l 2 14 +m 2 2 +l 4 0 +l 6 0 +l 8 2 +l 8 6 +l 6 8 +l 4 8 +l 2 6 + +115 15 7 8 +m 8 2 +l 6 0 +l 4 0 +l 2 2 +l 2 6 +l 4 8 +l 6 8 +l 8 6 + +116 15 7 10 +m 9 0 +l 9 14 +m 9 2 +l 7 0 +l 4 0 +l 2 2 +l 2 6 +l 4 8 +l 7 8 +l 9 6 + +117 15 7 11 +m 8 2 +l 6 0 +l 4 0 +l 2 2 +l 2 5 +l 3 7 +l 4 8 +l 6 8 +l 7 7 +l 8 5 +l 2 5 + +118 15 7 7 +m 4 0 +l 4 12 +l 6 14 +l 7 14 +l 9 12 +m 2 8 +l 6 8 + +119 15 7 14 +m 2 2 +l 2 6 +l 4 8 +l 6 8 +l 8 6 +l 8 2 +l 6 0 +l 4 0 +l 2 2 +m 8 2 +l 8 -2 +l 6 -4 +l 4 -4 +l 2 -2 + +120 15 7 7 +m 2 0 +l 2 14 +m 2 6 +l 4 8 +l 6 8 +l 8 6 +l 8 0 + +121 15 7 4 +m 5 0 +l 5 8 +m 5 9 +l 5 10 + +122 15 7 7 +m 5 8 +l 5 0 +l 3 -2 +l 2 -2 +l 1 -1 +m 5 9 +l 5 10 + +123 15 7 6 +m 2 0 +l 2 14 +m 2 2 +l 8 8 +m 4 4 +l 8 0 + +124 15 7 2 +m 5 0 +l 5 14 + +125 15 7 12 +m 1 0 +l 1 8 +m 1 7 +l 2 8 +l 4 8 +l 5 7 +l 5 0 +m 5 7 +l 6 8 +l 8 8 +l 9 7 +l 9 0 + +126 15 7 7 +m 2 0 +l 2 8 +m 2 6 +l 4 8 +l 6 8 +l 8 6 +l 8 0 + +127 15 7 9 +m 2 2 +l 2 6 +l 4 8 +l 6 8 +l 8 6 +l 8 2 +l 6 0 +l 4 0 +l 2 2 diff --git a/cd/etc/vectorfont27.txt b/cd/etc/vectorfont27.txt new file mode 100755 index 0000000..01fbca9 --- /dev/null +++ b/cd/etc/vectorfont27.txt @@ -0,0 +1,7946 @@ +Triplex II +24 24 12 -7 + + +32 16 8 0 + +33 7 3 26 +m 2 10 +l 3 18 +l 3 20 +l 2 21 +l 2 7 +l 1 7 +l 1 21 +l 0 20 +l 0 18 +l 1 10 +m 1 21 +l 2 21 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +34 14 7 16 +m 1 21 +l 0 20 +l 0 14 +m 1 20 +l 0 14 +m 1 21 +l 2 20 +l 0 14 +m 10 21 +l 9 20 +l 9 14 +m 10 20 +l 9 14 +m 10 21 +l 11 20 +l 9 14 + +35 18 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 17 8 51 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 13 16 +l 13 17 +l 12 17 +l 12 15 +l 14 15 +l 14 17 +l 13 19 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 15 +l 1 13 +l 4 11 +l 10 9 +l 12 8 +l 13 6 +l 13 3 +l 12 1 +m 1 15 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 7 +m 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 10 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 2 6 +l 2 4 +l 1 4 +l 1 5 + +37 21 10 29 +m 18 21 +l 0 0 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 22 11 66 +m 18 12 +l 18 13 +l 17 13 +l 17 11 +l 19 11 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 3 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 15 +l 5 12 +l 7 9 +l 11 4 +l 14 1 +l 16 0 +l 18 0 +l 19 2 +l 19 3 +m 2 1 +l 1 3 +l 1 6 +l 2 8 +l 3 9 +m 9 14 +l 10 18 +m 10 16 +l 9 20 +m 5 20 +l 4 16 +m 5 13 +l 7 10 +l 11 5 +l 14 2 +l 16 1 +m 5 0 +l 3 1 +l 2 3 +l 2 6 +l 3 8 +l 7 12 +m 4 18 +l 5 14 +l 8 10 +l 12 5 +l 15 2 +l 17 1 +l 18 1 +l 19 2 + +39 7 3 20 +m 3 19 +l 2 18 +l 1 18 +l 0 19 +l 0 20 +l 1 21 +l 2 21 +l 3 20 +l 3 17 +l 2 15 +l 0 14 +m 1 20 +l 1 19 +l 2 19 +l 2 20 +l 1 20 +m 2 18 +l 3 17 +m 3 19 +l 2 15 + +40 11 5 24 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 +m 3 19 +l 2 16 +l 1 12 +l 1 6 +l 2 2 +l 3 -1 +m 5 23 +l 4 21 +l 3 18 +l 2 12 +l 2 6 +l 3 0 +l 4 -3 +l 5 -5 + +41 10 5 24 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 +m 4 19 +l 5 16 +l 6 12 +l 6 6 +l 5 2 +l 4 -1 +m 2 23 +l 3 21 +l 4 18 +l 5 12 +l 5 6 +l 4 0 +l 3 -3 +l 2 -5 + +42 13 6 30 +m 5 21 +l 4 20 +l 6 10 +l 5 9 +m 5 21 +l 5 9 +m 5 21 +l 6 20 +l 4 10 +l 5 9 +m 0 18 +l 1 18 +l 9 12 +l 10 12 +m 0 18 +l 10 12 +m 0 18 +l 0 17 +l 10 13 +l 10 12 +m 10 18 +l 9 18 +l 1 12 +l 0 12 +m 10 18 +l 0 12 +m 10 18 +l 10 17 +l 0 13 +l 0 12 + +43 21 10 12 +m 8 18 +l 8 1 +l 9 1 +m 8 18 +l 9 18 +l 9 1 +m 0 10 +l 17 10 +l 17 9 +m 0 10 +l 0 9 +l 17 9 + +44 7 3 20 +m 3 1 +l 2 0 +l 1 0 +l 0 1 +l 0 2 +l 1 3 +l 2 3 +l 3 2 +l 3 -1 +l 2 -3 +l 0 -4 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 +m 2 0 +l 3 -1 +m 3 1 +l 2 -3 + +45 21 10 6 +m 0 10 +l 17 10 +l 17 9 +m 0 10 +l 0 9 +l 17 9 + +46 7 3 14 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +47 21 10 6 +m 18 25 +l 0 -7 +l 1 -7 +m 18 25 +l 19 25 +l 1 -7 + +48 17 8 45 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 +m 3 19 +l 2 17 +l 1 13 +l 1 8 +l 2 4 +l 3 2 +m 11 2 +l 12 4 +l 13 8 +l 13 13 +l 12 17 +l 11 19 +m 6 21 +l 4 20 +l 3 18 +l 2 13 +l 2 8 +l 3 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 3 +l 12 8 +l 12 13 +l 11 18 +l 10 20 +l 8 21 + +49 15 7 19 +m 4 19 +l 4 0 +m 5 19 +l 5 1 +m 6 21 +l 6 0 +m 6 21 +l 3 18 +l 1 17 +m 0 0 +l 10 0 +m 4 1 +l 2 0 +m 4 2 +l 3 0 +m 6 2 +l 7 0 +m 6 1 +l 8 0 + +50 17 8 54 +m 1 17 +l 1 16 +l 2 16 +l 2 17 +l 1 17 +m 1 18 +l 2 18 +l 3 17 +l 3 16 +l 2 15 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 10 11 +l 5 9 +l 3 8 +l 1 6 +l 0 3 +l 0 0 +m 12 19 +l 13 17 +l 13 15 +l 12 13 +m 9 21 +l 11 20 +l 12 17 +l 12 15 +l 11 13 +l 9 11 +l 5 9 +m 0 2 +l 1 3 +l 3 3 +l 8 2 +l 12 2 +l 14 3 +l 14 5 +m 14 3 +l 13 1 +l 12 0 +l 8 0 +l 3 3 +l 8 1 +l 12 1 +l 13 2 + +51 17 8 68 +m 1 17 +l 1 16 +l 2 16 +l 2 17 +l 1 17 +m 1 18 +l 2 18 +l 3 17 +l 3 16 +l 2 15 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 18 +l 13 15 +l 12 13 +l 9 12 +m 11 20 +l 12 18 +l 12 15 +l 11 13 +m 8 21 +l 10 20 +l 11 18 +l 11 15 +l 10 13 +l 8 12 +m 6 12 +l 9 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 6 +l 3 5 +l 3 4 +l 2 3 +l 1 3 +m 12 9 +l 13 7 +l 13 4 +l 12 2 +m 8 12 +l 10 11 +l 11 10 +l 12 7 +l 12 4 +l 11 1 +l 9 0 +m 1 5 +l 1 4 +l 2 4 +l 2 5 +l 1 5 + +52 18 9 18 +m 9 18 +l 9 0 +m 10 19 +l 10 1 +m 16 6 +l 0 6 +l 11 21 +l 11 0 +m 6 0 +l 14 0 +m 9 1 +l 7 0 +m 9 2 +l 8 0 +m 11 2 +l 12 0 +m 11 1 +l 13 0 + +53 17 8 48 +m 2 21 +l 0 11 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 6 +l 3 5 +l 3 4 +l 2 3 +l 1 3 +m 12 11 +l 13 9 +l 13 5 +l 12 3 +m 8 14 +l 10 13 +l 11 12 +l 12 9 +l 12 5 +l 11 2 +l 10 1 +l 8 0 +m 1 5 +l 1 4 +l 2 4 +l 2 5 +l 1 5 +m 2 21 +l 12 21 +m 2 20 +l 10 20 +m 2 19 +l 6 19 +l 10 20 +l 12 21 + +54 17 8 63 +m 11 18 +l 11 17 +l 12 17 +l 12 18 +l 11 18 +m 12 19 +l 11 19 +l 10 18 +l 10 17 +l 11 16 +l 12 16 +l 13 17 +l 13 18 +l 12 20 +l 10 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 7 +l 13 10 +l 11 12 +l 8 13 +l 6 13 +l 4 12 +l 3 11 +l 2 9 +m 3 18 +l 2 16 +l 1 12 +l 1 6 +l 2 3 +l 3 2 +m 12 3 +l 13 5 +l 13 8 +l 12 10 +m 7 21 +l 5 20 +l 4 19 +l 3 17 +l 2 13 +l 2 6 +l 3 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 8 +l 11 11 +l 10 12 +l 8 13 + +55 17 8 36 +m 0 21 +l 0 15 +m 14 21 +l 14 18 +l 13 15 +l 9 10 +l 8 8 +l 7 4 +l 7 0 +m 8 9 +l 7 7 +l 6 4 +l 6 0 +m 13 15 +l 8 10 +l 6 7 +l 5 4 +l 5 0 +l 7 0 +m 0 17 +l 1 19 +l 3 21 +l 5 21 +l 10 18 +l 12 18 +l 13 19 +l 14 21 +m 2 19 +l 3 20 +l 5 20 +l 7 19 +m 0 17 +l 1 18 +l 3 19 +l 5 19 +l 10 18 + +56 17 8 69 +m 5 21 +l 2 20 +l 1 18 +l 1 15 +l 2 13 +l 5 12 +l 9 12 +l 12 13 +l 13 15 +l 13 18 +l 12 20 +l 9 21 +l 5 21 +m 3 20 +l 2 18 +l 2 15 +l 3 13 +m 11 13 +l 12 15 +l 12 18 +l 11 20 +m 5 21 +l 4 20 +l 3 18 +l 3 15 +l 4 13 +l 5 12 +m 9 12 +l 10 13 +l 11 15 +l 11 18 +l 10 20 +l 9 21 +m 5 12 +l 2 11 +l 1 10 +l 0 8 +l 0 4 +l 1 2 +l 2 1 +l 5 0 +l 9 0 +l 12 1 +l 13 2 +l 14 4 +l 14 8 +l 13 10 +l 12 11 +l 9 12 +m 2 10 +l 1 8 +l 1 4 +l 2 2 +m 12 2 +l 13 4 +l 13 8 +l 12 10 +m 5 12 +l 3 11 +l 2 8 +l 2 4 +l 3 1 +l 5 0 +m 9 0 +l 11 1 +l 12 4 +l 12 8 +l 11 11 +l 9 12 + +57 17 8 63 +m 2 4 +l 2 3 +l 3 3 +l 3 4 +l 2 4 +m 12 12 +l 11 10 +l 10 9 +l 8 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 8 21 +l 11 20 +l 13 18 +l 14 15 +l 14 9 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 4 0 +l 2 1 +l 1 3 +l 1 4 +l 2 5 +l 3 5 +l 4 4 +l 4 3 +l 3 2 +l 2 2 +m 2 11 +l 1 13 +l 1 16 +l 2 18 +m 11 19 +l 12 18 +l 13 15 +l 13 9 +l 12 5 +l 11 3 +m 6 8 +l 4 9 +l 3 10 +l 2 13 +l 2 16 +l 3 19 +l 4 20 +l 6 21 +m 8 21 +l 10 20 +l 11 18 +l 12 15 +l 12 8 +l 11 4 +l 10 2 +l 9 1 +l 7 0 + +58 7 3 28 +m 1 14 +l 0 13 +l 0 12 +l 1 11 +l 2 11 +l 3 12 +l 3 13 +l 2 14 +l 1 14 +m 1 13 +l 1 12 +l 2 12 +l 2 13 +l 1 13 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +59 7 3 34 +m 1 14 +l 0 13 +l 0 12 +l 1 11 +l 2 11 +l 3 12 +l 3 13 +l 2 14 +l 1 14 +m 1 13 +l 1 12 +l 2 12 +l 2 13 +l 1 13 +m 3 1 +l 2 0 +l 1 0 +l 0 1 +l 0 2 +l 1 3 +l 2 3 +l 3 2 +l 3 -1 +l 2 -3 +l 0 -4 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 +m 2 0 +l 3 -1 +m 3 1 +l 2 -3 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 21 10 12 +m 0 14 +l 17 14 +l 17 13 +m 0 14 +l 0 13 +l 17 13 +m 0 6 +l 17 6 +l 17 5 +m 0 6 +l 0 5 +l 17 5 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 16 8 45 +m 1 16 +l 1 17 +l 2 17 +l 2 15 +l 0 15 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 8 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 11 12 +l 7 10 +l 6 10 +l 6 7 +l 7 7 +l 7 10 +m 11 19 +l 12 18 +l 12 14 +l 11 13 +m 8 21 +l 10 20 +l 11 18 +l 11 14 +l 10 12 +l 9 11 +m 6 3 +l 5 2 +l 5 1 +l 6 0 +l 7 0 +l 8 1 +l 8 2 +l 7 3 +l 6 3 +m 6 2 +l 6 1 +l 7 1 +l 7 2 +l 6 2 + +64 24 12 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 16 5 +l 15 6 +l 15 8 +l 16 16 +l 15 16 +l 14 8 + +65 19 9 24 +m 9 21 +l 2 1 +m 8 18 +l 14 0 +m 9 18 +l 15 0 +m 9 21 +l 16 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 2 1 +l 1 0 +m 2 1 +l 4 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 + +66 20 10 61 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +m 15 19 +l 16 17 +l 16 15 +l 15 13 +m 12 21 +l 14 20 +l 15 18 +l 15 14 +l 14 12 +l 12 11 +m 5 11 +l 12 11 +l 15 10 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 0 0 +m 15 9 +l 16 7 +l 16 4 +l 15 2 +m 12 11 +l 14 10 +l 15 8 +l 15 3 +l 14 1 +l 12 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +67 18 9 34 +m 14 18 +l 15 21 +l 15 15 +l 14 18 +l 12 20 +l 10 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 + +68 20 10 48 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 10 21 +l 13 20 +l 15 18 +l 16 16 +l 17 13 +l 17 8 +l 16 5 +l 15 3 +l 13 1 +l 10 0 +l 0 0 +m 14 18 +l 15 16 +l 16 13 +l 16 8 +l 15 5 +l 14 3 +m 10 21 +l 12 20 +l 14 17 +l 15 13 +l 15 8 +l 14 4 +l 12 1 +l 10 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +69 19 9 54 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 5 11 +l 11 11 +m 11 15 +l 11 7 +l 10 11 +l 11 15 +m 0 0 +l 16 0 +l 16 6 +l 15 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 11 21 +l 16 20 +m 13 21 +l 16 19 +m 14 21 +l 16 18 +m 11 13 +l 9 11 +l 11 9 +m 11 12 +l 7 11 +l 11 10 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 11 0 +l 16 1 +m 13 0 +l 16 2 +m 14 0 +l 16 3 + +70 18 9 48 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 16 21 +l 16 15 +m 5 11 +l 11 11 +m 11 15 +l 11 7 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 11 21 +l 16 20 +m 13 21 +l 16 19 +m 14 21 +l 16 18 +m 15 21 +l 16 15 +m 11 15 +l 10 11 +l 11 7 +m 11 13 +l 9 11 +l 11 9 +m 11 12 +l 7 11 +l 11 10 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +71 20 10 50 +m 14 18 +l 15 21 +l 15 15 +l 14 18 +l 12 20 +l 10 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 10 0 +l 12 1 +l 14 1 +l 15 0 +l 15 8 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 14 7 +l 14 2 +m 13 8 +l 13 2 +l 12 1 +m 10 8 +l 18 8 +m 11 8 +l 13 7 +m 12 8 +l 13 6 +m 16 8 +l 15 6 +m 17 8 +l 15 7 + +72 22 11 54 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 15 21 +l 15 0 +m 16 20 +l 16 1 +m 17 21 +l 17 0 +m 0 21 +l 8 21 +m 12 21 +l 20 21 +m 5 11 +l 15 11 +m 0 0 +l 8 0 +m 12 0 +l 20 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 13 21 +l 15 20 +m 14 21 +l 15 19 +m 18 21 +l 17 19 +m 19 21 +l 17 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 15 1 +l 13 0 +m 15 2 +l 14 0 +m 17 2 +l 18 0 +m 17 1 +l 19 0 + +73 10 5 26 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 8 21 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +74 14 7 36 +m 7 21 +l 7 4 +l 6 1 +l 5 0 +m 8 20 +l 8 4 +l 7 1 +m 9 21 +l 9 4 +l 8 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 1 6 +l 2 6 +l 3 5 +l 3 4 +l 2 3 +l 1 3 +m 1 5 +l 1 4 +l 2 4 +l 2 5 +l 1 5 +m 4 21 +l 12 21 +m 5 21 +l 7 20 +m 6 21 +l 7 19 +m 10 21 +l 9 19 +m 11 21 +l 9 20 + +75 20 10 46 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 16 20 +l 5 9 +m 8 11 +l 15 0 +m 9 11 +l 16 0 +m 9 13 +l 17 0 +m 0 21 +l 8 21 +m 13 21 +l 19 21 +m 0 0 +l 8 0 +m 12 0 +l 19 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 15 21 +l 16 20 +m 18 21 +l 16 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 15 2 +l 13 0 +m 15 2 +l 18 0 + +76 16 8 35 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 8 21 +m 0 0 +l 15 0 +l 15 6 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 10 0 +l 15 1 +m 12 0 +l 15 2 +m 13 0 +l 15 3 +m 14 0 +l 15 6 + +77 24 12 42 +m 3 21 +l 3 1 +m 3 21 +l 10 0 +m 4 21 +l 10 3 +m 5 21 +l 11 3 +m 17 21 +l 10 0 +m 17 21 +l 17 0 +m 18 20 +l 18 1 +m 19 21 +l 19 0 +m 0 21 +l 5 21 +m 17 21 +l 22 21 +m 0 0 +l 6 0 +m 14 0 +l 22 0 +m 1 21 +l 3 20 +m 20 21 +l 19 19 +m 21 21 +l 19 20 +m 3 1 +l 1 0 +m 3 1 +l 5 0 +m 17 1 +l 15 0 +m 17 2 +l 16 0 +m 19 2 +l 20 0 +m 19 1 +l 21 0 + +78 22 11 26 +m 3 21 +l 3 1 +m 3 21 +l 17 0 +m 4 21 +l 16 3 +m 5 21 +l 17 3 +m 17 20 +l 17 0 +m 0 21 +l 5 21 +m 14 21 +l 20 21 +m 0 0 +l 6 0 +m 1 21 +l 3 20 +m 15 21 +l 17 20 +m 19 21 +l 17 20 +m 3 1 +l 1 0 +m 3 1 +l 5 0 + +79 19 9 49 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 + +80 20 10 44 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 14 +l 16 12 +l 15 11 +l 12 10 +l 5 10 +m 15 19 +l 16 17 +l 16 14 +l 15 12 +m 12 21 +l 14 20 +l 15 18 +l 15 13 +l 14 11 +l 12 10 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +81 19 9 69 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 4 3 +l 5 5 +l 7 6 +l 8 6 +l 10 5 +l 11 3 +l 12 -3 +l 13 -5 +l 15 -5 +l 16 -3 +l 16 -1 +m 12 -1 +l 13 -3 +l 14 -4 +l 15 -4 +m 11 3 +l 13 -2 +l 14 -3 +l 15 -3 +l 16 -2 + +82 20 10 62 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 5 21 +l 5 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +l 5 11 +m 15 19 +l 16 17 +l 16 15 +l 15 13 +m 12 21 +l 14 20 +l 15 18 +l 15 14 +l 14 12 +l 12 11 +m 9 11 +l 11 10 +l 12 8 +l 14 2 +l 15 0 +l 17 0 +l 18 2 +l 18 4 +m 14 4 +l 15 2 +l 16 1 +l 17 1 +m 11 10 +l 12 9 +l 15 3 +l 16 2 +l 17 2 +l 18 3 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +83 17 8 41 +m 13 18 +l 14 21 +l 14 15 +l 13 18 +l 11 20 +l 8 21 +l 5 21 +l 2 20 +l 0 18 +l 0 15 +l 1 13 +l 4 11 +l 10 9 +l 12 8 +l 13 6 +l 13 3 +l 12 1 +m 1 15 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 7 +m 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 10 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 6 0 +l 3 1 +l 1 3 +l 0 6 +l 0 0 +l 1 3 + +84 18 9 38 +m 0 21 +l 0 15 +m 7 21 +l 7 0 +m 8 20 +l 8 1 +m 9 21 +l 9 0 +m 16 21 +l 16 15 +m 0 21 +l 16 21 +m 4 0 +l 12 0 +m 1 21 +l 0 15 +m 2 21 +l 0 18 +m 3 21 +l 0 19 +m 5 21 +l 0 20 +m 11 21 +l 16 20 +m 13 21 +l 16 19 +m 14 21 +l 16 18 +m 15 21 +l 16 15 +m 7 1 +l 5 0 +m 7 2 +l 6 0 +m 9 2 +l 10 0 +m 9 1 +l 11 0 + +85 22 11 34 +m 3 21 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 20 +m 4 20 +l 4 5 +l 5 3 +m 5 21 +l 5 5 +l 6 2 +l 7 1 +l 9 0 +m 0 21 +l 8 21 +m 14 21 +l 20 21 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 15 21 +l 17 20 +m 19 21 +l 17 20 + +86 19 9 23 +m 2 21 +l 9 0 +m 3 21 +l 9 3 +l 9 0 +m 4 21 +l 10 3 +m 16 20 +l 9 0 +m 0 21 +l 7 21 +m 12 21 +l 18 21 +m 1 21 +l 3 19 +m 5 21 +l 4 19 +m 6 21 +l 4 20 +m 14 21 +l 16 20 +m 17 21 +l 16 20 + +87 23 11 38 +m 3 21 +l 7 0 +m 4 21 +l 7 5 +l 7 0 +m 5 21 +l 8 5 +m 11 21 +l 8 5 +l 7 0 +m 11 21 +l 15 0 +m 12 21 +l 15 5 +l 15 0 +m 13 21 +l 16 5 +m 19 20 +l 16 5 +l 15 0 +m 0 21 +l 8 21 +m 11 21 +l 13 21 +m 16 21 +l 22 21 +m 1 21 +l 4 20 +m 2 21 +l 4 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 17 21 +l 19 20 +m 21 21 +l 19 20 + +88 19 9 36 +m 2 21 +l 14 0 +m 3 21 +l 15 0 +m 4 21 +l 16 0 +m 15 20 +l 3 1 +m 0 21 +l 7 21 +m 12 21 +l 18 21 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 1 21 +l 4 19 +m 5 21 +l 4 19 +m 6 21 +l 4 20 +m 13 21 +l 15 20 +m 17 21 +l 15 20 +m 3 1 +l 1 0 +m 3 1 +l 5 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 14 2 +l 17 0 + +89 21 10 33 +m 2 21 +l 9 10 +l 9 0 +m 3 21 +l 10 10 +l 10 1 +m 4 21 +l 11 10 +l 11 0 +m 17 20 +l 11 10 +m 0 21 +l 7 21 +m 14 21 +l 20 21 +m 6 0 +l 14 0 +m 1 21 +l 3 20 +m 6 21 +l 4 20 +m 15 21 +l 17 20 +m 19 21 +l 17 20 +m 9 1 +l 7 0 +m 9 2 +l 8 0 +m 11 2 +l 12 0 +m 11 1 +l 13 0 + +90 17 8 28 +m 14 21 +l 0 21 +l 0 15 +m 12 21 +l 0 0 +m 13 21 +l 1 0 +m 14 21 +l 2 0 +m 0 0 +l 14 0 +l 14 6 +m 1 21 +l 0 15 +m 2 21 +l 0 18 +m 3 21 +l 0 19 +m 5 21 +l 0 20 +m 9 0 +l 14 1 +m 11 0 +l 14 2 +m 12 0 +l 14 3 +m 13 0 +l 14 6 + +91 7 3 8 +m 0 19 +l 0 -1 +m 1 19 +l 1 -1 +m 0 19 +l 5 19 +m 0 -1 +l 5 -1 + +92 14 7 2 +m 0 21 +l 14 -3 + +93 8 4 8 +m 4 19 +l 4 -1 +m 5 19 +l 5 -1 +m 0 19 +l 5 19 +m 0 -1 +l 5 -1 + +94 19 9 5 +m 0 14 +l 8 19 +l 16 14 +l 8 18 +l 0 14 + +95 17 8 2 +m 0 -7 +l 16 -7 + +96 6 3 7 +m 2 21 +l 1 20 +l 0 18 +l 0 16 +l 1 15 +l 2 16 +l 1 17 + +97 17 8 48 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +l 15 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 + +98 19 9 39 +m 3 21 +l 3 0 +l 4 1 +l 6 1 +m 4 20 +l 4 2 +m 0 21 +l 5 21 +l 5 1 +m 5 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 8 0 +l 6 1 +l 5 3 +m 14 11 +l 15 9 +l 15 5 +l 14 3 +m 10 14 +l 12 13 +l 13 12 +l 14 9 +l 14 5 +l 13 2 +l 12 1 +l 10 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 + +99 16 8 31 +m 12 10 +l 12 11 +l 11 11 +l 11 9 +l 13 9 +l 13 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 + +100 18 9 42 +m 11 21 +l 11 0 +l 16 0 +m 12 20 +l 12 1 +m 8 21 +l 13 21 +l 13 0 +m 11 11 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 10 1 +l 11 3 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 9 21 +l 11 20 +m 10 21 +l 11 19 +m 13 2 +l 14 0 +m 13 1 +l 15 0 + +101 16 8 36 +m 2 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 9 +l 12 10 +l 11 12 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 11 8 +l 11 11 +l 10 13 +l 8 14 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 + +102 12 6 31 +m 10 19 +l 10 20 +l 9 20 +l 9 18 +l 11 18 +l 11 20 +l 10 21 +l 7 21 +l 5 20 +l 4 19 +l 3 16 +l 3 0 +m 5 19 +l 4 16 +l 4 1 +m 7 21 +l 6 20 +l 5 18 +l 5 0 +m 0 14 +l 9 14 +m 0 0 +l 8 0 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +103 17 8 79 +m 13 13 +l 14 12 +l 15 13 +l 14 14 +l 13 14 +l 11 13 +l 10 12 +m 6 14 +l 4 13 +l 3 12 +l 2 10 +l 2 8 +l 3 6 +l 4 5 +l 6 4 +l 8 4 +l 10 5 +l 11 6 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 6 14 +m 4 12 +l 3 10 +l 3 8 +l 4 6 +m 10 6 +l 11 8 +l 11 10 +l 10 12 +m 6 14 +l 5 13 +l 4 11 +l 4 7 +l 5 5 +l 6 4 +m 8 4 +l 9 5 +l 10 7 +l 10 11 +l 9 13 +l 8 14 +m 3 6 +l 2 5 +l 1 3 +l 1 2 +l 2 0 +l 3 -1 +l 6 -2 +l 10 -2 +l 13 -3 +l 14 -4 +m 3 0 +l 6 -1 +l 10 -1 +l 13 -2 +m 1 2 +l 2 1 +l 5 0 +l 10 0 +l 13 -1 +l 14 -3 +l 14 -4 +l 13 -6 +l 10 -7 +l 4 -7 +l 1 -6 +l 0 -4 +l 0 -3 +l 1 -1 +l 4 0 +m 4 -7 +l 2 -6 +l 1 -4 +l 1 -3 +l 2 -1 +l 4 0 + +104 21 10 47 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 0 21 +l 5 21 +l 5 0 +m 5 10 +l 6 12 +l 7 13 +l 9 14 +l 12 14 +l 14 13 +l 15 12 +l 16 9 +l 16 0 +m 14 12 +l 15 9 +l 15 1 +m 12 14 +l 13 13 +l 14 10 +l 14 0 +m 0 0 +l 8 0 +m 11 0 +l 19 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 +m 16 1 +l 18 0 + +105 10 5 30 +m 3 21 +l 3 19 +l 5 19 +l 5 21 +l 3 21 +m 4 21 +l 4 19 +m 3 20 +l 5 20 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 0 0 +l 8 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +106 12 6 33 +m 6 21 +l 6 19 +l 8 19 +l 8 21 +l 6 21 +m 7 21 +l 7 19 +m 6 20 +l 8 20 +m 6 14 +l 6 -3 +l 5 -6 +l 4 -7 +m 7 13 +l 7 -2 +l 6 -5 +m 3 14 +l 8 14 +l 8 -2 +l 7 -5 +l 6 -6 +l 4 -7 +l 1 -7 +l 0 -6 +l 0 -4 +l 2 -4 +l 2 -6 +l 1 -6 +l 1 -5 +m 4 14 +l 6 13 +m 5 14 +l 6 12 + +107 20 10 41 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 0 21 +l 5 21 +l 5 0 +m 14 13 +l 5 4 +m 9 8 +l 16 0 +m 9 7 +l 15 0 +m 8 7 +l 14 0 +m 11 14 +l 18 14 +m 0 0 +l 8 0 +m 11 0 +l 18 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 12 14 +l 14 13 +m 17 14 +l 14 13 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 14 2 +l 12 0 +m 13 2 +l 17 0 + +108 10 5 21 +m 3 21 +l 3 0 +m 4 20 +l 4 1 +m 0 21 +l 5 21 +l 5 0 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +109 32 16 73 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 5 10 +l 6 12 +l 7 13 +l 9 14 +l 12 14 +l 14 13 +l 15 12 +l 16 9 +l 16 0 +m 14 12 +l 15 9 +l 15 1 +m 12 14 +l 13 13 +l 14 10 +l 14 0 +m 16 10 +l 17 12 +l 18 13 +l 20 14 +l 23 14 +l 25 13 +l 26 12 +l 27 9 +l 27 0 +m 25 12 +l 26 9 +l 26 1 +m 23 14 +l 24 13 +l 25 10 +l 25 0 +m 0 0 +l 8 0 +m 11 0 +l 19 0 +m 22 0 +l 30 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 25 1 +l 23 0 +m 25 2 +l 24 0 +m 27 2 +l 28 0 +m 27 1 +l 29 0 + +110 21 10 47 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 5 10 +l 6 12 +l 7 13 +l 9 14 +l 12 14 +l 14 13 +l 15 12 +l 16 9 +l 16 0 +m 14 12 +l 15 9 +l 15 1 +m 12 14 +l 13 13 +l 14 10 +l 14 0 +m 0 0 +l 8 0 +m 11 0 +l 19 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 +m 16 1 +l 18 0 + +111 17 8 41 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 + +112 19 9 47 +m 3 14 +l 3 -7 +m 4 13 +l 4 -6 +m 0 14 +l 5 14 +l 5 -7 +m 5 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 8 0 +l 6 1 +l 5 3 +m 14 11 +l 15 9 +l 15 5 +l 14 3 +m 10 14 +l 12 13 +l 13 12 +l 14 9 +l 14 5 +l 13 2 +l 12 1 +l 10 0 +m 0 -7 +l 8 -7 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 -6 +l 1 -7 +m 3 -5 +l 2 -7 +m 5 -5 +l 6 -7 +m 5 -6 +l 7 -7 + +113 17 8 44 +m 11 13 +l 11 -7 +m 12 12 +l 12 -6 +m 10 13 +l 12 13 +l 13 14 +l 13 -7 +m 11 11 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 10 1 +l 11 3 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 8 -7 +l 16 -7 +m 11 -6 +l 9 -7 +m 11 -5 +l 10 -7 +m 13 -5 +l 14 -7 +m 13 -6 +l 15 -7 + +114 15 7 32 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 12 12 +l 12 13 +l 11 13 +l 11 11 +l 13 11 +l 13 13 +l 12 14 +l 10 14 +l 8 13 +l 6 11 +l 5 8 +m 0 0 +l 8 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 + +115 14 7 38 +m 10 12 +l 11 14 +l 11 10 +l 10 12 +l 9 13 +l 7 14 +l 3 14 +l 1 13 +l 0 12 +l 0 10 +l 1 8 +l 3 7 +l 8 6 +l 10 5 +l 11 2 +m 1 13 +l 0 10 +m 1 9 +l 3 8 +l 8 7 +l 10 6 +m 11 5 +l 10 1 +m 0 12 +l 1 10 +l 3 9 +l 8 8 +l 10 7 +l 11 5 +l 11 2 +l 10 1 +l 8 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 +l 0 0 +l 1 2 + +116 15 7 17 +m 7 0 +l 6 1 +l 5 4 +l 5 21 +l 3 19 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 12 3 +m 4 19 +l 4 4 +l 5 2 +m 0 14 +l 9 14 + +117 21 10 33 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 + +118 17 8 21 +m 2 14 +l 8 0 +m 3 14 +l 8 2 +m 4 14 +l 9 2 +m 14 13 +l 9 2 +l 8 0 +m 0 14 +l 7 14 +m 10 14 +l 16 14 +m 1 14 +l 4 12 +m 6 14 +l 4 13 +m 12 14 +l 14 13 +m 15 14 +l 14 13 + +119 23 11 31 +m 3 14 +l 7 0 +m 4 14 +l 7 3 +m 5 14 +l 8 3 +m 11 14 +l 8 3 +l 7 0 +m 11 14 +l 15 0 +m 12 14 +l 15 3 +m 11 14 +l 13 14 +l 16 3 +m 19 13 +l 16 3 +l 15 0 +m 0 14 +l 8 14 +m 16 14 +l 22 14 +m 1 14 +l 4 13 +m 7 14 +l 5 13 +m 17 14 +l 19 13 +m 21 14 +l 19 13 + +120 18 9 32 +m 2 14 +l 12 0 +m 3 14 +l 13 0 +m 4 14 +l 14 0 +m 13 13 +l 3 1 +m 0 14 +l 7 14 +m 10 14 +l 16 14 +m 0 0 +l 6 0 +m 9 0 +l 16 0 +m 1 14 +l 3 13 +m 6 14 +l 4 13 +m 11 14 +l 13 13 +m 15 14 +l 13 13 +m 3 1 +l 1 0 +m 3 1 +l 5 0 +m 12 1 +l 10 0 +m 13 1 +l 15 0 + +121 18 9 30 +m 3 14 +l 9 0 +m 4 14 +l 9 2 +m 5 14 +l 10 2 +m 15 13 +l 10 2 +l 7 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -4 +l 2 -4 +l 2 -6 +l 1 -6 +l 1 -5 +m 1 14 +l 8 14 +m 11 14 +l 17 14 +m 2 14 +l 5 12 +m 7 14 +l 5 13 +m 13 14 +l 15 13 +m 16 14 +l 15 13 + +122 15 7 28 +m 10 14 +l 0 0 +m 11 14 +l 1 0 +m 12 14 +l 2 0 +m 12 14 +l 0 14 +l 0 10 +m 0 0 +l 12 0 +l 12 4 +m 1 14 +l 0 10 +m 2 14 +l 0 11 +m 3 14 +l 0 12 +m 5 14 +l 0 13 +m 7 0 +l 12 1 +m 9 0 +l 12 2 +m 10 0 +l 12 3 +m 11 0 +l 12 4 + +123 10 5 37 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +m 3 24 +l 2 22 +l 2 20 +l 3 18 +l 4 17 +l 5 15 +l 5 13 +l 4 11 +l 0 9 +l 4 7 +l 5 5 +l 5 3 +l 4 1 +l 3 0 +l 2 -2 +l 2 -4 +l 3 -6 +m 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 4 2 2 +m 0 21 +l 0 0 + +125 9 4 37 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +m 2 24 +l 3 22 +l 3 20 +l 2 18 +l 1 17 +l 0 15 +l 0 13 +l 1 11 +l 5 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 2 0 +l 3 -2 +l 3 -4 +l 2 -6 +m 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 14 7 10 +m 15 21 +l 10 15 +l 5 18 +l 0 17 +l 5 21 +l 10 17 +l 15 21 +l 10 16 +l 5 19 +l 0 17 + +127 17 8 7 +m 0 6 +l 0 0 +l 12 0 +l 12 8 +l 6 17 +l 0 8 +l 0 6 + +128 18 9 53 +m 14 19 +l 15 22 +l 15 16 +l 14 19 +l 12 21 +l 10 22 +l 7 22 +l 4 21 +l 2 19 +l 1 17 +l 0 14 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 7 1 +l 10 1 +l 12 2 +l 14 4 +l 15 6 +m 3 19 +l 2 17 +l 1 14 +l 1 9 +l 2 6 +l 3 4 +m 7 22 +l 5 21 +l 3 18 +l 2 14 +l 2 9 +l 3 5 +l 5 2 +l 7 1 +l 7 -1 +l 8 -1 +l 12 -3 +l 12 -5 +l 11 -6 +l 9 -7 +l 11 -5 +l 11 -3 +l 10 -2 +m 8 1 +l 8 -1 +m 9 -7 +l 4 -7 +l 2 -5 +l 2 -3 +l 4 -3 +l 4 -5 +l 3 -5 +l 3 -4 + +129 21 10 61 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 5 20 +l 4 19 +l 4 18 +l 5 17 +l 6 17 +l 7 18 +l 7 19 +l 6 20 +l 5 20 +m 5 19 +l 5 18 +l 6 18 +l 6 19 +l 5 19 +m 12 20 +l 11 19 +l 11 18 +l 12 17 +l 13 17 +l 14 18 +l 14 19 +l 13 20 +l 12 20 +m 12 19 +l 12 18 +l 13 18 +l 13 19 +l 12 19 + +130 16 8 53 +m 2 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 9 +l 12 10 +l 11 12 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 11 8 +l 11 11 +l 10 13 +l 8 14 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 10 22 +l 9 21 +l 8 21 +l 7 22 +l 7 23 +l 8 24 +l 9 24 +l 10 23 +l 10 20 +l 6 17 +m 8 23 +l 8 22 +l 9 22 +l 9 23 +l 8 23 +m 9 21 +l 10 20 + +131 19 9 53 +m 4 11 +l 4 12 +l 5 12 +l 5 10 +l 3 10 +l 3 12 +l 4 13 +l 6 14 +l 10 14 +l 12 13 +l 13 12 +l 14 10 +l 14 3 +l 15 1 +l 16 0 +l 17 0 +m 12 12 +l 13 10 +l 13 3 +l 14 1 +m 10 14 +l 11 13 +l 12 11 +l 12 3 +l 13 1 +l 16 0 +m 12 9 +l 11 8 +l 6 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 6 0 +l 9 0 +l 11 1 +l 12 3 +m 4 6 +l 3 4 +l 3 3 +l 4 1 +m 11 8 +l 7 7 +l 5 6 +l 4 4 +l 4 3 +l 5 1 +l 6 0 +m 0 17 +l 8 22 +l 16 17 +l 8 21 +l 0 17 + +132 17 8 76 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 2 20 +l 1 19 +l 1 18 +l 2 17 +l 3 17 +l 4 18 +l 4 19 +l 3 20 +l 2 20 +m 2 19 +l 2 18 +l 3 18 +l 3 19 +l 2 19 +m 9 20 +l 8 19 +l 8 18 +l 9 17 +l 10 17 +l 11 18 +l 11 19 +l 10 20 +l 9 20 +m 9 19 +l 9 18 +l 10 18 +l 10 19 +l 9 19 + +133 17 8 65 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 3 22 +l 4 21 +l 5 21 +l 6 22 +l 6 23 +l 5 24 +l 4 24 +l 3 23 +l 3 20 +l 7 17 +m 5 23 +l 5 22 +l 4 22 +l 4 23 +l 5 23 +m 4 21 +l 3 20 + +134 17 8 62 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 6 20 +l 5 19 +l 5 18 +l 6 17 +l 7 17 +l 8 18 +l 8 19 +l 7 20 +l 6 20 +m 6 19 +l 6 18 +l 7 18 +l 7 19 +l 6 19 + +135 16 8 48 +m 3 -3 +l 3 -4 +l 4 -4 +l 4 -2 +l 2 -2 +l 2 -4 +l 4 -6 +l 9 -6 +l 11 -4 +l 11 -2 +l 10 -1 +l 8 0 +l 6 0 +l 6 2 +l 4 3 +l 3 4 +l 2 7 +l 2 9 +l 3 12 +l 4 13 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 1 5 +l 3 3 +l 6 2 +l 8 2 +l 11 3 +l 13 5 +m 2 11 +l 1 9 +l 1 7 +l 2 5 +m 12 10 +l 12 11 +l 11 11 +l 11 9 +l 13 9 +l 13 11 +l 11 13 +l 9 14 +l 6 14 +m 10 -1 +l 12 -2 +l 12 -4 +l 11 -5 +l 9 -6 + +136 18 9 41 +m 3 8 +l 14 8 +l 14 10 +l 13 12 +l 12 13 +l 9 14 +l 7 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 13 9 +l 13 10 +l 12 12 +m 3 11 +l 2 9 +l 2 5 +l 3 3 +m 12 8 +l 12 11 +l 11 13 +l 9 14 +m 7 14 +l 5 13 +l 4 12 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +m 0 17 +l 8 22 +l 16 17 +l 8 21 +l 0 17 + +137 16 8 64 +m 2 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 9 +l 12 10 +l 11 12 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 11 8 +l 11 11 +l 10 13 +l 8 14 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 3 21 +l 2 20 +l 2 19 +l 3 18 +l 4 18 +l 5 19 +l 5 20 +l 4 21 +l 3 21 +m 3 20 +l 3 19 +l 4 19 +l 4 20 +l 3 20 +m 10 21 +l 9 20 +l 9 19 +l 10 18 +l 11 18 +l 12 19 +l 12 20 +l 11 21 +l 10 21 +m 10 20 +l 10 19 +l 11 19 +l 11 20 +l 10 20 + +138 16 8 53 +m 2 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 9 +l 12 10 +l 11 12 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 11 8 +l 11 11 +l 10 13 +l 8 14 +m 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 4 22 +l 5 21 +l 6 21 +l 7 22 +l 7 23 +l 6 24 +l 5 24 +l 4 23 +l 4 20 +l 8 17 +m 6 23 +l 6 22 +l 5 22 +l 5 23 +l 6 23 +m 5 21 +l 4 20 + +139 13 6 49 +m 4 14 +l 4 0 +m 5 13 +l 5 1 +m 1 14 +l 6 14 +l 6 0 +m 1 0 +l 9 0 +m 2 14 +l 4 13 +m 3 14 +l 4 12 +m 4 1 +l 2 0 +m 4 2 +l 3 0 +m 6 2 +l 7 0 +m 6 1 +l 8 0 +m 1 20 +l 0 19 +l 0 18 +l 1 17 +l 2 17 +l 3 18 +l 3 19 +l 2 20 +l 1 20 +m 1 19 +l 1 18 +l 2 18 +l 2 19 +l 1 19 +m 8 20 +l 7 19 +l 7 18 +l 8 17 +l 9 17 +l 10 18 +l 10 19 +l 9 20 +l 8 20 +m 8 19 +l 8 18 +l 9 18 +l 9 19 +l 8 19 + +140 18 9 26 +m 7 14 +l 7 0 +m 8 13 +l 8 1 +m 4 14 +l 9 14 +l 9 0 +m 4 0 +l 12 0 +m 5 14 +l 7 13 +m 6 14 +l 7 12 +m 7 1 +l 5 0 +m 7 2 +l 6 0 +m 9 2 +l 10 0 +m 9 1 +l 11 0 +m 0 17 +l 8 22 +l 16 17 +l 8 21 +l 0 17 + +141 10 5 38 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 0 0 +l 8 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 0 22 +l 1 21 +l 2 21 +l 3 22 +l 3 23 +l 2 24 +l 1 24 +l 0 23 +l 0 20 +l 4 17 +m 2 23 +l 2 22 +l 1 22 +l 1 23 +l 2 23 +m 1 21 +l 0 20 + +142 21 10 50 +m 16 0 +l 9 21 +l 2 1 +l 1 0 +m 8 18 +l 14 0 +m 9 18 +l 15 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 2 1 +l 4 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 +m 5 27 +l 4 26 +l 4 25 +l 5 24 +l 6 24 +l 7 25 +l 7 26 +l 6 27 +l 5 27 +m 5 26 +l 5 25 +l 6 25 +l 6 26 +l 5 26 +m 12 27 +l 11 26 +l 11 25 +l 12 24 +l 13 24 +l 14 25 +l 14 26 +l 13 27 +l 12 27 +m 12 26 +l 12 25 +l 13 25 +l 13 26 +l 12 26 + +143 19 9 36 +m 16 0 +l 9 21 +l 2 1 +l 1 0 +m 8 18 +l 14 0 +m 9 18 +l 15 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 2 1 +l 4 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 +m 8 27 +l 7 26 +l 7 25 +l 8 24 +l 9 24 +l 10 25 +l 10 26 +l 9 27 +l 8 27 +m 8 26 +l 8 25 +l 9 25 +l 9 26 +l 8 26 + +144 19 9 73 +m 0 0 +l 16 0 +l 16 3 +l 14 0 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 11 0 +l 16 1 +m 13 0 +l 16 2 +m 0 14 +l 16 14 +l 16 10 +l 15 14 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 6 14 +l 5 12 +m 7 14 +l 5 13 +m 11 14 +l 16 13 +m 13 14 +l 16 12 +m 14 14 +l 16 11 +m 3 0 +l 3 14 +m 4 1 +l 4 14 +m 5 0 +l 5 14 +m 16 4 +l 16 3 +l 15 0 +l 16 4 +m 5 7 +l 11 7 +m 11 11 +l 11 3 +l 10 7 +l 11 11 +m 11 9 +l 9 7 +l 11 5 +m 11 8 +l 7 7 +l 11 6 +m 11 22 +l 10 21 +l 9 21 +l 8 22 +l 8 23 +l 9 24 +l 10 24 +l 11 23 +l 11 20 +l 7 17 +m 9 23 +l 9 22 +l 10 22 +l 10 23 +l 9 23 +m 10 21 +l 11 20 + +145 29 14 86 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 20 0 +l 23 1 +l 25 3 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 18 14 +l 20 14 +l 23 13 +l 24 12 +l 25 10 +l 25 8 +l 14 8 +l 14 9 +l 15 12 +l 16 13 +l 18 14 +l 15 13 +l 13 11 +l 12 8 +m 20 14 +l 22 13 +l 23 11 +l 23 8 +m 22 13 +l 23 12 +l 24 10 +l 24 8 +m 12 6 +l 13 3 +l 15 1 +l 18 0 +m 14 11 +l 13 9 +l 13 5 +l 14 3 +m 14 8 +l 14 5 +l 15 2 +l 16 1 +m 14 1 +l 16 0 + +146 28 14 66 +m 24 21 +l 25 15 +l 25 21 +l 9 21 +l 2 1 +l 1 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 2 1 +l 4 0 +m 12 0 +l 12 21 +m 10 21 +l 12 20 +m 11 21 +l 12 19 +m 13 20 +l 13 1 +m 14 21 +l 14 0 +m 15 21 +l 14 19 +m 14 11 +l 20 11 +m 20 15 +l 20 7 +l 19 11 +l 20 15 +m 20 10 +l 16 11 +l 20 12 +m 19 12 +l 18 11 +l 19 10 +m 16 21 +l 14 20 +m 20 21 +l 25 20 +m 9 0 +l 25 0 +l 25 4 +m 14 2 +l 15 0 +m 14 1 +l 16 0 +m 12 2 +l 11 0 +m 10 0 +l 12 1 +m 24 0 +l 25 5 +l 25 6 +l 24 0 +l 25 5 +m 20 0 +l 25 1 +m 23 0 +l 25 3 +m 22 0 +l 25 2 +m 23 21 +l 25 18 +m 22 21 +l 25 19 + +147 19 9 45 +m 7 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 6 +l 15 8 +l 14 11 +l 12 13 +l 9 14 +l 7 14 +l 5 13 +l 4 12 +l 3 9 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +m 3 11 +l 2 9 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 14 9 +l 13 11 +m 9 0 +l 11 1 +l 12 2 +l 13 5 +l 13 9 +l 12 12 +l 11 13 +l 9 14 +m 0 17 +l 8 22 +l 16 17 +l 8 21 +l 0 17 + +148 17 8 68 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 3 20 +l 2 19 +l 2 18 +l 3 17 +l 4 17 +l 5 18 +l 5 19 +l 4 20 +l 3 20 +m 3 19 +l 3 18 +l 4 18 +l 4 19 +l 3 19 +m 10 20 +l 9 19 +l 9 18 +l 10 17 +l 11 17 +l 12 18 +l 12 19 +l 11 20 +l 10 20 +m 10 19 +l 10 18 +l 11 18 +l 11 19 +l 10 19 + +149 17 8 57 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 4 22 +l 5 21 +l 6 21 +l 7 22 +l 7 23 +l 6 24 +l 5 24 +l 4 23 +l 4 20 +l 8 17 +m 6 23 +l 6 22 +l 5 22 +l 5 23 +l 6 23 +m 5 21 +l 4 20 + +150 21 10 38 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 0 17 +l 8 22 +l 16 17 +l 8 21 +l 0 17 + +151 21 10 50 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 5 22 +l 6 21 +l 7 21 +l 8 22 +l 8 23 +l 7 24 +l 6 24 +l 5 23 +l 5 20 +l 9 17 +m 7 23 +l 7 22 +l 6 22 +l 6 23 +l 7 23 +m 6 21 +l 5 20 + +152 18 9 57 +m 3 14 +l 9 0 +m 4 14 +l 9 2 +m 5 14 +l 10 2 +l 7 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -4 +l 2 -4 +l 2 -6 +l 1 -6 +l 1 -5 +m 13 14 +l 15 13 +l 10 2 +m 1 14 +l 8 14 +m 11 14 +l 17 14 +m 2 14 +l 5 12 +m 7 14 +l 5 13 +m 16 14 +l 15 13 +m 5 20 +l 4 19 +l 4 18 +l 5 17 +l 6 17 +l 7 18 +l 7 19 +l 6 20 +l 5 20 +m 5 19 +l 5 18 +l 6 18 +l 6 19 +l 5 19 +m 12 20 +l 11 19 +l 11 18 +l 12 17 +l 13 17 +l 14 18 +l 14 19 +l 13 20 +l 12 20 +m 12 19 +l 12 18 +l 13 18 +l 13 19 +l 12 19 + +153 19 9 76 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 4 27 +l 3 26 +l 3 25 +l 4 24 +l 5 24 +l 6 25 +l 6 26 +l 5 27 +l 4 27 +m 4 26 +l 4 25 +l 5 25 +l 5 26 +l 4 26 +m 11 27 +l 10 26 +l 10 25 +l 11 24 +l 12 24 +l 13 25 +l 13 26 +l 12 27 +l 11 27 +m 11 26 +l 11 25 +l 12 25 +l 12 26 +l 11 26 + +154 22 11 61 +m 3 21 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 20 +l 15 21 +m 4 20 +l 4 5 +l 5 3 +m 5 21 +l 5 5 +l 6 2 +l 7 1 +l 9 0 +m 0 21 +l 8 21 +m 14 21 +l 20 21 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 6 21 +l 5 19 +m 7 21 +l 5 20 +m 19 21 +l 17 20 +m 6 27 +l 5 26 +l 5 25 +l 6 24 +l 7 24 +l 8 25 +l 8 26 +l 7 27 +l 6 27 +m 6 26 +l 6 25 +l 7 25 +l 7 26 +l 6 26 +m 13 27 +l 12 26 +l 12 25 +l 13 24 +l 14 24 +l 15 25 +l 15 26 +l 14 27 +l 13 27 +m 13 26 +l 13 25 +l 14 25 +l 14 26 +l 13 26 + +155 17 8 47 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 12 17 +l 14 17 +l 3 -3 +l 1 -3 +l 12 17 +m 13 17 +l 2 -3 + +156 20 10 58 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 3 2 +l 2 2 +l 2 3 +l 0 3 +l 0 2 +l 1 1 +l 3 0 +l 3 16 +l 4 18 +l 6 20 +l 11 20 +l 13 18 +l 13 17 +l 11 17 +l 11 18 +l 9 19 +m 5 0 +l 5 16 +l 6 18 +l 7 19 +m 4 1 +l 4 16 +l 5 18 +l 6 19 +l 11 19 +l 12 18 +l 12 17 +m 2 2 +l 1 3 +l 1 2 +l 3 0 +l 13 0 +l 14 1 +l 14 3 +l 11 0 +m 10 0 +l 12 2 +l 12 3 +l 14 3 +l 13 1 +m 0 12 +l 0 10 +l 1 11 +l 7 11 +l 8 10 +l 9 10 +l 9 11 +l 8 12 +l 0 12 +m 1 2 +l 2 1 +l 3 1 +m 8 11 +l 9 10 + +157 19 9 53 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 15 24 +l 16 24 +l 1 -3 +l 0 -3 +l 15 24 + +158 29 14 62 +m 0 24 +l 12 24 +l 15 23 +l 16 22 +l 17 20 +l 17 17 +l 16 15 +l 15 14 +l 12 13 +l 5 13 +m 15 22 +l 16 20 +l 16 17 +l 15 15 +m 12 24 +l 14 23 +l 15 21 +l 15 16 +l 14 14 +l 12 13 +m 1 24 +l 3 23 +m 2 24 +l 3 22 +m 6 24 +l 5 22 +m 7 24 +l 5 23 +m 3 24 +l 3 0 +l 5 0 +l 5 24 +m 4 23 +l 4 1 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 0 0 +l 8 0 +m 3 1 +l 1 0 +m 5 1 +l 7 0 +m 17 16 +l 17 5 +l 18 2 +l 19 1 +l 21 0 +l 20 1 +l 19 4 +l 19 18 +l 17 16 +m 26 3 +l 25 1 +l 23 0 +l 21 0 +m 18 16 +l 18 4 +l 19 2 +m 14 11 +l 23 11 + +159 21 10 57 +m 6 -6 +l 7 -5 +l 8 -3 +l 8 13 +m 10 13 +l 10 -3 +l 9 -5 +l 7 -7 +l 2 -7 +l 0 -5 +l 0 -4 +l 2 -4 +l 2 -5 +l 4 -6 +m 9 13 +l 9 -3 +l 8 -5 +l 7 -6 +l 2 -6 +l 1 -5 +l 1 -4 +m 8 1 +l 8 17 +l 9 19 +l 11 21 +l 16 21 +l 18 19 +l 18 18 +l 16 18 +l 16 19 +l 14 20 +m 10 1 +l 10 17 +l 11 19 +l 12 20 +m 9 2 +l 9 17 +l 10 19 +l 11 20 +l 16 20 +l 17 19 +l 17 18 +m 13 7 +l 13 9 +l 12 8 +l 6 8 +l 5 9 +l 4 9 +l 4 8 +l 5 7 +l 13 7 +m 9 8 +l 9 7 +m 8 7 +l 10 7 +m 5 8 +l 4 9 + +160 17 8 65 +m 2 11 +l 2 12 +l 3 12 +l 3 10 +l 1 10 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +l 15 0 +m 10 12 +l 11 10 +l 11 3 +l 12 1 +m 8 14 +l 9 13 +l 10 11 +l 10 3 +l 11 1 +l 14 0 +m 10 9 +l 9 8 +l 4 7 +l 1 6 +l 0 4 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 10 3 +m 2 6 +l 1 4 +l 1 3 +l 2 1 +m 9 8 +l 5 7 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 4 0 +m 9 22 +l 8 21 +l 7 21 +l 6 22 +l 6 23 +l 7 24 +l 8 24 +l 9 23 +l 9 20 +l 5 17 +m 7 23 +l 7 22 +l 8 22 +l 8 23 +l 7 23 +m 8 21 +l 9 20 + +161 10 5 38 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 0 0 +l 8 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 6 22 +l 5 21 +l 4 21 +l 3 22 +l 3 23 +l 4 24 +l 5 24 +l 6 23 +l 6 20 +l 2 17 +m 4 23 +l 4 22 +l 5 22 +l 5 23 +l 4 23 +m 5 21 +l 6 20 + +162 17 8 57 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 10 22 +l 9 21 +l 8 21 +l 7 22 +l 7 23 +l 8 24 +l 9 24 +l 10 23 +l 10 20 +l 6 17 +m 8 23 +l 8 22 +l 9 22 +l 9 23 +l 8 23 +m 9 21 +l 10 20 + +163 21 10 50 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 12 22 +l 11 21 +l 10 21 +l 9 22 +l 9 23 +l 10 24 +l 11 24 +l 12 23 +l 12 20 +l 8 17 +m 10 23 +l 10 22 +l 11 22 +l 11 23 +l 10 23 +m 11 21 +l 12 20 + +164 21 10 57 +m 3 14 +l 3 0 +m 4 13 +l 4 1 +m 0 14 +l 5 14 +l 5 0 +m 5 10 +l 6 12 +l 7 13 +l 9 14 +l 12 14 +l 14 13 +l 15 12 +l 16 9 +l 16 0 +m 14 12 +l 15 9 +l 15 1 +m 12 14 +l 13 13 +l 14 10 +l 14 0 +m 0 0 +l 8 0 +m 11 0 +l 19 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 3 1 +l 1 0 +m 3 2 +l 2 0 +m 5 2 +l 6 0 +m 5 1 +l 7 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 15 23 +l 10 17 +l 5 20 +l 0 19 +l 5 23 +l 10 19 +l 15 23 +l 10 18 +l 5 21 +l 0 19 + +165 22 11 31 +m 15 21 +l 17 20 +l 17 0 +l 3 21 +l 3 1 +l 1 0 +m 4 21 +l 16 3 +m 0 21 +l 5 21 +l 17 3 +m 14 21 +l 20 21 +m 0 0 +l 6 0 +m 1 21 +l 3 20 +m 19 21 +l 17 20 +m 3 1 +l 5 0 +m 18 30 +l 13 24 +l 8 27 +l 3 26 +l 8 30 +l 13 26 +l 18 30 +l 13 25 +l 8 28 +l 3 26 + +166 17 8 50 +m 2 18 +l 2 19 +l 3 19 +l 3 17 +l 1 17 +l 1 19 +l 2 20 +l 4 21 +l 8 21 +l 10 20 +l 11 19 +l 12 17 +l 12 10 +l 13 8 +l 14 7 +l 15 7 +m 10 19 +l 11 17 +l 11 10 +l 12 8 +m 8 21 +l 9 20 +l 10 18 +l 10 10 +l 11 8 +l 14 7 +m 10 16 +l 9 15 +l 4 14 +l 1 13 +l 0 11 +l 0 10 +l 1 8 +l 4 7 +l 7 7 +l 9 8 +l 10 10 +m 2 13 +l 1 11 +l 1 10 +l 2 8 +m 9 15 +l 5 14 +l 3 13 +l 2 11 +l 2 10 +l 3 8 +l 4 7 +m 0 0 +l 15 0 + +167 17 8 41 +m 0 15 +l 1 12 +l 3 10 +l 6 9 +l 8 9 +l 11 10 +l 13 12 +l 14 15 +l 13 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 18 +l 0 15 +m 2 18 +l 1 16 +l 1 14 +l 2 12 +m 12 12 +l 13 14 +l 13 16 +l 12 18 +m 6 21 +l 4 20 +l 3 19 +l 2 16 +l 2 14 +l 3 11 +l 4 10 +l 6 9 +m 8 9 +l 10 10 +l 11 11 +l 12 14 +l 12 16 +l 11 19 +l 10 20 +l 8 21 +m 0 0 +l 14 0 + +168 16 8 45 +m 12 5 +l 12 4 +l 11 4 +l 11 6 +l 13 6 +l 13 4 +l 12 2 +l 11 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 1 8 +l 2 9 +l 6 11 +l 7 11 +l 7 14 +l 6 14 +l 6 11 +m 2 2 +l 1 3 +l 1 7 +l 2 8 +m 5 0 +l 3 1 +l 2 3 +l 2 7 +l 3 9 +l 4 10 +m 7 18 +l 8 19 +l 8 20 +l 7 21 +l 6 21 +l 5 20 +l 5 19 +l 6 18 +l 7 18 +m 7 19 +l 7 20 +l 6 20 +l 6 19 +l 7 19 + +169 17 8 7 +m 0 0 +l 0 7 +l 12 7 +l 12 4 +l 3 4 +l 3 0 +l 0 0 + +170 17 8 7 +m 12 0 +l 12 7 +l 0 7 +l 0 4 +l 9 4 +l 9 0 +l 12 0 + +171 23 11 54 +m 3 19 +l 3 10 +m 0 17 +l 2 18 +l 5 21 +l 5 10 +m 3 11 +l 1 10 +l 7 10 +l 5 11 +m 3 12 +l 2 10 +m 5 12 +l 6 10 +m 4 19 +l 4 10 +m 17 21 +l 1 0 +m 9 0 +l 9 3 +l 10 5 +l 12 6 +l 17 7 +l 18 8 +l 18 10 +l 17 11 +l 13 11 +l 11 10 +l 11 9 +m 13 11 +l 11 10 +m 9 2 +l 10 3 +l 11 3 +l 13 0 +l 16 0 +l 17 1 +l 18 3 +l 18 5 +m 18 3 +l 16 2 +l 14 2 +l 11 3 +l 14 1 +l 16 1 +l 17 2 +m 18 9 +l 17 8 +l 12 6 +l 15 6 +l 18 7 +l 18 8 +m 13 6 +l 14 6 + +172 23 11 37 +m 3 19 +l 3 10 +m 0 17 +l 2 18 +l 5 21 +l 5 10 +m 3 11 +l 1 10 +l 7 10 +l 5 11 +m 3 12 +l 2 10 +m 5 12 +l 6 10 +m 4 19 +l 4 10 +m 13 10 +l 13 0 +m 9 0 +l 17 0 +m 12 1 +l 10 0 +m 12 2 +l 11 0 +m 14 2 +l 15 0 +m 14 1 +l 16 0 +m 17 4 +l 7 4 +l 14 11 +l 14 0 +m 12 9 +l 12 0 +m 18 21 +l 18 21 +l 0 0 + +173 7 3 26 +m 2 11 +l 3 3 +l 3 1 +l 2 0 +l 2 14 +l 1 14 +l 1 0 +l 0 1 +l 0 3 +l 1 11 +m 1 0 +l 2 0 +m 1 18 +l 0 19 +l 0 20 +l 1 21 +l 2 21 +l 3 20 +l 3 19 +l 2 18 +l 1 18 +m 1 19 +l 1 20 +l 2 20 +l 2 19 +l 1 19 + +174 22 11 6 +m 9 17 +l 0 10 +l 9 4 +m 18 17 +l 9 10 +l 18 4 + +175 22 11 6 +m 9 17 +l 18 10 +l 9 4 +m 0 17 +l 9 10 +l 0 4 + +176 14 7 126 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 4 21 +l 6 21 +l 6 19 +l 4 19 +l 4 21 +m 5 21 +l 5 19 +m 4 15 +l 6 15 +l 6 13 +l 4 13 +l 4 15 +m 5 15 +l 5 13 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 4 3 +l 6 3 +l 6 1 +l 4 1 +l 4 3 +m 5 3 +l 5 1 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 12 15 +l 14 15 +l 14 13 +l 12 13 +l 12 15 +m 13 15 +l 13 13 +m 12 9 +l 14 9 +l 14 7 +l 12 7 +l 12 9 +m 13 9 +l 13 7 +m 12 3 +l 14 3 +l 14 1 +l 12 1 +l 12 3 +m 13 3 +l 13 1 +m 4 -3 +l 6 -3 +l 6 -5 +l 4 -5 +l 4 -3 +m 5 -3 +l 5 -5 +m 12 -3 +l 14 -3 +l 14 -5 +l 12 -5 +l 12 -3 +m 13 -3 +l 13 -5 + +177 16 8 252 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 2 15 +l 4 15 +l 4 13 +l 2 13 +l 2 15 +m 3 15 +l 3 13 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 2 3 +l 4 3 +l 4 1 +l 2 1 +l 2 3 +m 3 3 +l 3 1 +m 4 18 +l 6 18 +l 6 16 +l 4 16 +l 4 18 +m 5 18 +l 5 16 +m 4 12 +l 6 12 +l 6 10 +l 4 10 +l 4 12 +m 5 12 +l 5 10 +m 4 6 +l 6 6 +l 6 4 +l 4 4 +l 4 6 +m 5 6 +l 5 4 +m 4 0 +l 6 0 +l 6 -2 +l 4 -2 +l 4 0 +m 5 0 +l 5 -2 +m 6 21 +l 8 21 +l 8 19 +l 6 19 +l 6 21 +m 7 21 +l 7 19 +m 6 15 +l 8 15 +l 8 13 +l 6 13 +l 6 15 +m 7 15 +l 7 13 +m 6 9 +l 8 9 +l 8 7 +l 6 7 +l 6 9 +m 7 9 +l 7 7 +m 6 3 +l 8 3 +l 8 1 +l 6 1 +l 6 3 +m 7 3 +l 7 1 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 10 15 +l 12 15 +l 12 13 +l 10 13 +l 10 15 +m 11 15 +l 11 13 +m 10 9 +l 12 9 +l 12 7 +l 10 7 +l 10 9 +m 11 9 +l 11 7 +m 10 3 +l 12 3 +l 12 1 +l 10 1 +l 10 3 +m 11 3 +l 11 1 +m 12 18 +l 14 18 +l 14 16 +l 12 16 +l 12 18 +m 13 18 +l 13 16 +m 12 12 +l 14 12 +l 14 10 +l 12 10 +l 12 12 +m 13 12 +l 13 10 +m 12 6 +l 14 6 +l 14 4 +l 12 4 +l 12 6 +m 13 6 +l 13 4 +m 12 0 +l 14 0 +l 14 -2 +l 12 -2 +l 12 0 +m 13 0 +l 13 -2 +m 14 21 +l 16 21 +l 16 19 +l 14 19 +l 14 21 +m 15 21 +l 15 19 +m 14 15 +l 16 15 +l 16 13 +l 14 13 +l 14 15 +m 15 15 +l 15 13 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 14 3 +l 16 3 +l 16 1 +l 14 1 +l 14 3 +m 15 3 +l 15 1 +m 2 -3 +l 4 -3 +l 4 -5 +l 2 -5 +l 2 -3 +m 3 -3 +l 3 -5 +m 6 -3 +l 8 -3 +l 8 -5 +l 6 -5 +l 6 -3 +m 7 -3 +l 7 -5 +m 10 -3 +l 12 -3 +l 12 -5 +l 10 -5 +l 10 -3 +m 11 -3 +l 11 -5 +m 14 -3 +l 16 -3 +l 16 -5 +l 14 -5 +l 14 -3 +m 15 -3 +l 15 -5 + +178 24 12 276 +m 0 21 +l 2 21 +l 2 19 +l 0 19 +l 0 21 +m 1 21 +l 1 19 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 20 21 +l 22 21 +l 22 19 +l 20 19 +l 20 21 +m 21 21 +l 21 19 +m 22 21 +l 24 21 +l 24 19 +l 22 19 +l 22 21 +m 23 21 +l 23 19 +m 4 17 +l 6 17 +l 6 15 +l 4 15 +l 4 17 +m 5 17 +l 5 15 +m 6 17 +l 8 17 +l 8 15 +l 6 15 +l 6 17 +m 7 17 +l 7 15 +m 8 17 +l 10 17 +l 10 15 +l 8 15 +l 8 17 +m 9 17 +l 9 15 +m 0 13 +l 2 13 +l 2 11 +l 0 11 +l 0 13 +m 1 13 +l 1 11 +m 2 13 +l 4 13 +l 4 11 +l 2 11 +l 2 13 +m 3 13 +l 3 11 +m 10 13 +l 12 13 +l 12 11 +l 10 11 +l 10 13 +m 11 13 +l 11 11 +m 12 13 +l 14 13 +l 14 11 +l 12 11 +l 12 13 +m 13 13 +l 13 11 +m 20 13 +l 22 13 +l 22 11 +l 20 11 +l 20 13 +m 21 13 +l 21 11 +m 22 13 +l 24 13 +l 24 11 +l 22 11 +l 22 13 +m 23 13 +l 23 11 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 16 9 +l 18 9 +l 18 7 +l 16 7 +l 16 9 +m 17 9 +l 17 7 +m 18 9 +l 20 9 +l 20 7 +l 18 7 +l 18 9 +m 19 9 +l 19 7 +m 0 5 +l 2 5 +l 2 3 +l 0 3 +l 0 5 +m 1 5 +l 1 3 +m 2 5 +l 4 5 +l 4 3 +l 2 3 +l 2 5 +m 3 5 +l 3 3 +m 10 5 +l 12 5 +l 12 3 +l 10 3 +l 10 5 +m 11 5 +l 11 3 +m 12 5 +l 14 5 +l 14 3 +l 12 3 +l 12 5 +m 13 5 +l 13 3 +m 20 5 +l 22 5 +l 22 3 +l 20 3 +l 20 5 +m 21 5 +l 21 3 +m 22 5 +l 24 5 +l 24 3 +l 22 3 +l 22 5 +m 23 5 +l 23 3 +m 4 1 +l 10 1 +l 10 -1 +l 4 -1 +l 4 1 +m 5 1 +l 5 -1 +m 7 1 +l 7 -1 +m 9 1 +l 9 -1 +m 0 -3 +l 2 -3 +l 2 -5 +l 0 -5 +l 0 -3 +m 1 -3 +l 1 -5 +m 2 -3 +l 4 -3 +l 4 -5 +l 2 -5 +l 2 -3 +m 3 -3 +l 3 -5 +m 10 -3 +l 14 -3 +l 14 -5 +l 10 -5 +l 10 -3 +m 11 -3 +l 11 -5 +m 13 -3 +l 13 -5 +m 20 -3 +l 24 -3 +l 24 -5 +l 20 -5 +l 20 -3 +m 21 -3 +l 21 -5 +m 23 -3 +l 23 -5 +m 18 17 +l 20 17 +l 20 15 +l 18 15 +l 18 17 +m 19 17 +l 19 15 +m 20 17 +l 22 17 +l 22 15 +l 20 15 +l 20 17 +m 21 17 +l 21 15 +m 22 17 +l 24 17 +l 24 15 +l 22 15 +l 22 17 +m 23 17 +l 23 15 +m 0 9 +l 2 9 +l 2 7 +l 0 7 +l 0 9 +m 1 9 +l 1 7 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 18 1 +l 24 1 +l 24 -1 +l 18 -1 +l 18 1 +m 19 1 +l 19 -1 +m 21 1 +l 21 -1 +m 23 1 +l 23 -1 +m 8 1 +l 8 -1 +m 6 1 +l 6 -1 +m 20 1 +l 20 -1 +m 22 1 +l 22 -1 +m 22 -3 +l 22 -5 +m 12 -3 +l 12 -5 + +179 4 2 2 +m 0 21 +l 0 -7 + +180 12 6 4 +m 8 -7 +l 8 21 +m 0 4 +l 8 4 + +181 12 6 6 +m 8 21 +l 8 -7 +m 0 10 +l 8 10 +m 0 4 +l 8 4 + +182 20 10 6 +m 8 -7 +l 8 21 +m 0 4 +l 8 4 +m 16 -7 +l 16 21 + +183 20 10 5 +m 0 4 +l 16 4 +l 16 -7 +m 8 4 +l 8 -7 + +184 13 6 5 +m 0 10 +l 8 10 +l 8 -7 +m 0 4 +l 8 4 + +185 21 10 8 +m 0 4 +l 8 4 +l 8 -7 +m 16 -7 +l 16 21 +m 0 10 +l 8 10 +l 8 21 + +186 20 10 4 +m 8 -7 +l 8 21 +m 16 -7 +l 16 21 + +187 20 10 6 +m 0 10 +l 16 10 +l 16 -7 +m 0 4 +l 8 4 +l 8 -7 + +188 20 10 6 +m 0 4 +l 16 4 +l 16 21 +m 0 10 +l 8 10 +l 8 21 + +189 20 10 5 +m 0 10 +l 16 10 +l 16 21 +m 8 10 +l 8 21 + +190 12 6 5 +m 0 4 +l 8 4 +l 8 21 +m 0 10 +l 8 10 + +191 12 6 3 +m 0 4 +l 8 4 +l 8 -7 + +192 8 4 3 +m 8 10 +l 0 10 +l 0 21 + +193 16 8 5 +m 0 10 +l 8 10 +l 8 21 +m 16 10 +l 8 10 + +194 16 8 5 +m 0 4 +l 8 4 +l 8 -7 +m 16 4 +l 8 4 + +195 8 4 4 +m 0 -7 +l 0 21 +m 8 4 +l 0 4 + +196 16 8 2 +m 0 4 +l 16 4 + +197 16 8 4 +m 8 -7 +l 8 21 +m 0 4 +l 16 4 + +198 8 4 6 +m 0 21 +l 0 -7 +m 8 10 +l 0 10 +m 8 4 +l 0 4 + +199 16 8 6 +m 8 -7 +l 8 21 +m 16 4 +l 8 4 +m 0 -7 +l 0 21 + +200 16 8 6 +m 16 4 +l 0 4 +l 0 21 +m 16 10 +l 8 10 +l 8 21 + +201 16 8 6 +m 16 10 +l 0 10 +l 0 -7 +m 16 4 +l 8 4 +l 8 -7 + +202 24 12 8 +m 0 4 +l 24 4 +m 0 10 +l 8 10 +l 8 21 +m 16 21 +l 16 10 +l 24 10 + +203 24 12 8 +m 0 10 +l 24 10 +m 0 4 +l 8 4 +l 8 -7 +m 16 -7 +l 16 4 +l 24 4 + +204 16 8 8 +m 16 4 +l 8 4 +l 8 -7 +m 0 -7 +l 0 21 +m 16 10 +l 8 10 +l 8 21 + +205 16 8 4 +m 0 4 +l 16 4 +m 0 10 +l 16 10 + +206 24 12 12 +m 0 4 +l 8 4 +l 8 -7 +m 0 10 +l 8 10 +l 8 21 +m 16 21 +l 16 10 +l 24 10 +m 16 -7 +l 16 4 +l 24 4 + +207 16 8 7 +m 0 10 +l 8 10 +l 8 21 +m 16 10 +l 8 10 +m 0 4 +l 16 4 + +208 16 8 6 +m 0 10 +l 16 10 +m 6 21 +l 6 10 +m 14 21 +l 14 10 + +209 16 8 7 +m 0 4 +l 8 4 +l 8 -7 +m 16 4 +l 8 4 +m 0 10 +l 16 10 + +210 16 8 6 +m 0 4 +l 16 4 +m 6 -7 +l 6 4 +m 14 -7 +l 14 4 + +211 16 8 5 +m 16 10 +l 0 10 +l 0 21 +m 8 10 +l 8 21 + +212 8 4 5 +m 8 4 +l 0 4 +l 0 21 +m 8 10 +l 0 10 + +213 8 4 5 +m 8 10 +l 0 10 +l 0 -7 +m 8 4 +l 0 4 + +214 16 8 5 +m 16 4 +l 0 4 +l 0 -7 +m 8 4 +l 8 -7 + +215 24 12 6 +m 8 -7 +l 8 21 +m 0 4 +l 24 4 +m 16 -7 +l 16 21 + +216 16 8 6 +m 8 21 +l 8 -7 +m 0 10 +l 16 10 +m 0 4 +l 16 4 + +217 12 6 3 +m 0 10 +l 8 10 +l 8 21 + +218 8 4 3 +m 8 4 +l 0 4 +l 0 -7 + +219 16 8 37 +m 0 21 +l 16 21 +l 16 0 +l 0 0 +l 0 21 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 0 +l 5 21 +m 6 21 +l 6 0 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 10 0 +l 10 21 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 0 11 +l 16 11 + +220 16 8 35 +m 16 0 +l 0 0 +l 0 11 +l 16 11 +l 16 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 11 +l 6 0 +m 7 11 +l 7 0 +m 8 11 +l 8 0 +m 9 11 +l 9 0 +m 10 11 +l 10 0 +m 11 11 +l 11 0 +m 12 11 +l 12 0 +m 13 11 +l 13 0 +m 14 11 +l 14 0 +m 15 11 +l 15 0 + +221 8 4 19 +m 0 0 +l 0 21 +l 8 21 +l 8 0 +l 0 0 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 0 +l 5 21 +m 6 21 +l 6 0 +m 7 21 +l 7 0 + +222 17 8 19 +m 9 0 +l 9 21 +l 17 21 +l 17 0 +l 9 0 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 0 +l 14 21 +m 15 21 +l 15 0 +m 16 21 +l 16 0 + +223 16 8 35 +m 16 10 +l 0 10 +l 0 21 +l 16 21 +l 16 10 +m 1 21 +l 1 10 +m 2 21 +l 2 10 +m 3 21 +l 3 10 +m 4 21 +l 4 10 +m 5 21 +l 5 10 +m 6 21 +l 6 10 +m 7 21 +l 7 10 +m 8 21 +l 8 10 +m 9 21 +l 9 10 +m 10 21 +l 10 10 +m 11 21 +l 11 10 +m 12 21 +l 12 10 +m 13 21 +l 13 10 +m 14 21 +l 14 10 +m 15 21 +l 15 10 + +224 24 12 40 +m 6 0 +l 4 1 +l 3 2 +l 2 5 +l 2 9 +l 3 12 +l 4 13 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 21 14 +l 19 14 +l 11 2 +l 10 1 +l 8 0 +m 8 14 +l 10 13 +l 11 12 +l 19 0 +l 21 0 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 20 0 +l 12 11 +m 20 14 +l 11 1 + +225 17 8 38 +m 2 1 +l 11 1 +l 13 3 +l 13 6 +l 11 8 +l 13 10 +l 13 14 +l 11 16 +l 2 16 +l 0 14 +l 0 -1 +l 2 -1 +l 2 13 +l 4 15 +l 10 15 +l 12 13 +l 12 11 +l 10 9 +l 2 9 +m 0 0 +l 0 -2 +l 2 -2 +l 2 -1 +m 2 8 +l 10 8 +l 12 6 +l 12 3 +l 11 2 +l 2 2 +m 3 16 +l 1 14 +l 1 -2 +m 2 14 +l 4 16 +m 11 15 +l 12 14 +m 12 10 +l 11 9 + +226 16 8 13 +m 0 0 +l 0 15 +l 12 15 +l 12 12 +l 10 12 +l 10 13 +l 2 13 +l 2 0 +l 0 0 +m 11 13 +l 11 14 +l 1 14 +l 1 0 + +227 18 9 21 +m 3 14 +l 3 0 +l 5 0 +l 5 14 +l 10 14 +l 10 0 +l 12 0 +l 12 14 +l 14 14 +l 14 16 +l 0 16 +l 0 14 +l 3 14 +m 0 15 +l 14 15 +m 11 15 +l 11 0 +m 4 15 +l 4 0 +m 3 0 +l 5 0 + +228 20 10 7 +m 16 3 +l 16 0 +l 0 0 +l 7 11 +l 0 21 +l 16 21 +l 16 18 + +229 25 12 41 +m 6 0 +l 4 1 +l 3 2 +l 2 5 +l 3 8 +l 4 9 +l 6 10 +l 11 13 +l 23 13 +l 24 14 +l 12 14 +l 3 9 +l 1 7 +l 0 5 +l 0 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 14 4 +l 14 5 +l 13 7 +l 11 9 +l 8 10 +l 6 10 +l 3 9 +l 11 14 +l 12 14 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 11 8 +l 10 9 +l 8 10 +m 2 7 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 12 7 + +230 22 11 44 +m 3 14 +l 3 5 +l 4 2 +l 5 1 +l 7 0 +l 10 0 +l 12 1 +l 13 2 +l 14 4 +m 4 13 +l 4 4 +l 5 2 +m 0 14 +l 5 14 +l 5 4 +l 6 1 +l 7 0 +m 14 14 +l 14 0 +l 19 0 +m 15 13 +l 15 1 +m 11 14 +l 16 14 +l 16 0 +m 1 14 +l 3 13 +m 2 14 +l 3 12 +m 16 2 +l 17 0 +m 16 1 +l 18 0 +m 4 2 +l 4 -4 +l 0 -8 +l 3 -8 +l 6 -5 +l 6 1 +m 5 1 +l 5 -5 +l 2 -8 +m 4 -5 +l 2 -7 + +231 21 10 31 +m 8 -4 +l 8 10 +l 6 12 +l 3 12 +l 2 11 +l 2 8 +l 0 8 +l 0 12 +l 2 14 +l 5 14 +l 9 12 +l 10 10 +l 10 -4 +l 8 -4 +m 1 9 +l 1 12 +l 2 13 +l 5 13 +l 7 12 +l 9 10 +l 9 -4 +m 2 12 +l 2 11 +m 10 8 +l 16 14 +l 18 14 +l 10 7 +l 10 8 +l 17 14 +m 10 6 +l 18 14 + +232 18 9 48 +m 6 14 +l 3 13 +l 1 11 +l 0 9 +l 0 8 +l 3 5 +l 6 4 +l 8 4 +l 11 5 +l 14 8 +l 14 9 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 3 6 +l 4 5 +l 6 4 +m 8 4 +l 10 5 +l 11 6 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 2 11 +l 1 9 +l 2 7 +m 12 7 +l 13 9 +l 12 11 +m 0 21 +l 0 20 +l 14 20 +l 14 21 +l 0 21 +m 7 20 +l 7 14 +m 7 4 +l 7 -2 +m 0 -2 +l 14 -2 +l 14 -3 +l 0 -3 +l 0 -2 + +233 20 10 52 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 5 20 +l 3 17 +l 2 13 +l 2 8 +l 3 4 +l 5 1 +l 7 0 +m 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +m 13 3 +l 14 5 +l 15 8 +l 15 13 +l 14 16 +l 13 18 +m 9 0 +l 11 1 +l 13 4 +l 14 8 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 2 12 +l 14 12 +m 2 11 +l 14 11 + +234 20 10 60 +m 2 8 +l 2 13 +l 3 17 +l 5 20 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 8 +l 1 13 +l 2 16 +l 3 18 +m 13 18 +l 14 16 +l 15 13 +l 15 9 +l 13 8 +l 10 5 +l 10 1 +m 11 0 +l 11 5 +l 13 7 +l 15 8 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +m 11 1 +l 16 1 +l 16 0 +l 9 0 +l 9 5 +l 12 8 +l 14 9 +l 14 13 +l 13 17 +l 11 20 +l 9 21 +m 15 10 +l 15 9 +m 1 9 +l 3 8 +l 6 5 +l 6 1 +m 5 0 +l 5 5 +l 3 7 +l 1 8 +m 5 1 +l 0 1 +l 0 0 +l 7 0 +l 7 5 +l 4 8 +l 2 9 + +235 18 9 43 +m 6 10 +l 3 9 +l 1 7 +l 0 5 +l 0 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 14 4 +l 14 5 +l 13 7 +l 11 9 +l 8 10 +l 6 10 +l 4 9 +l 3 8 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 11 8 +l 10 9 +l 8 10 +l 0 21 +l 14 20 +l 14 21 +l 0 21 +m 2 7 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 12 7 +m 9 10 +l 2 20 +l 13 20 +m 11 9 +l 1 21 + +236 30 15 68 +m 6 10 +l 3 9 +l 1 7 +l 0 5 +l 0 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 14 4 +l 14 5 +l 13 7 +l 11 9 +l 8 10 +l 6 10 +l 4 9 +l 3 8 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 11 8 +l 10 9 +l 8 10 +m 2 7 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 12 7 +m 18 10 +l 15 9 +l 13 7 +l 12 5 +l 12 4 +l 15 1 +l 18 0 +l 20 0 +l 23 1 +l 26 4 +l 26 5 +l 25 7 +l 23 9 +l 20 10 +l 18 10 +l 16 9 +l 15 8 +l 14 5 +l 15 2 +l 16 1 +l 18 0 +m 20 0 +l 22 1 +l 23 2 +l 24 5 +l 23 8 +l 22 9 +l 20 10 +m 14 7 +l 13 5 +l 14 3 +m 24 3 +l 25 5 +l 24 7 + +237 17 8 47 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 9 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +m 2 11 +l 1 9 +l 1 5 +l 2 3 +m 12 3 +l 13 5 +l 13 9 +l 12 11 +m 8 0 +l 10 1 +l 11 2 +l 12 5 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +m 12 17 +l 14 17 +l 3 -3 +l 1 -3 +l 12 17 +m 13 17 +l 2 -3 + +238 20 10 9 +m 16 21 +l 3 21 +l 0 19 +l 0 11 +l 7 11 +m 16 0 +l 3 0 +l 0 2 +l 0 11 + +239 23 11 33 +m 3 0 +l 3 15 +l 4 18 +l 6 20 +l 9 21 +l 11 21 +l 14 20 +l 16 18 +l 17 15 +l 17 1 +l 15 0 +m 4 1 +l 4 16 +l 5 18 +m 5 0 +l 5 16 +l 6 19 +l 7 20 +l 9 21 +m 0 0 +l 8 0 +m 14 0 +l 20 0 +m 1 0 +l 3 1 +m 2 0 +l 3 2 +m 6 0 +l 5 2 +m 7 0 +l 5 1 +m 19 0 +l 17 1 + +240 21 10 15 +m 0 9 +l 17 9 +l 17 8 +l 0 8 +l 0 9 +m 0 14 +l 17 14 +l 17 13 +l 0 13 +l 0 14 +m 0 4 +l 17 4 +l 17 3 +l 0 3 +l 0 4 + +241 22 11 15 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 +m 8 21 +l 8 4 +l 9 4 +l 9 21 +l 8 21 +m 0 13 +l 17 13 +l 17 12 +l 0 12 +l 0 13 + +242 22 11 14 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 +m 1 21 +l 17 13 +l 17 12 +l 1 4 +l 0 4 +l 16 12 +l 16 13 +l 0 21 +l 1 21 + +243 22 11 14 +m 17 1 +l 0 1 +l 0 0 +l 17 0 +l 17 1 +m 16 21 +l 0 13 +l 0 12 +l 16 4 +l 17 4 +l 1 12 +l 1 13 +l 17 21 +l 16 21 + +244 14 7 21 +m 4 20 +l 3 19 +l 2 17 +l 2 -7 +l 0 -7 +l 0 17 +l 1 19 +l 3 21 +l 8 21 +l 10 19 +l 10 18 +l 8 18 +l 8 19 +l 6 20 +m 1 -7 +l 1 17 +l 2 19 +l 3 20 +l 8 20 +l 9 19 +l 9 18 + +245 14 7 21 +m 6 -6 +l 7 -5 +l 8 -3 +l 8 21 +l 10 21 +l 10 -3 +l 9 -5 +l 7 -7 +l 2 -7 +l 0 -5 +l 0 -4 +l 2 -4 +l 2 -5 +l 4 -6 +m 9 21 +l 9 -3 +l 8 -5 +l 7 -6 +l 2 -6 +l 1 -5 +l 1 -4 + +246 21 10 33 +m 0 11 +l 17 11 +l 17 10 +l 0 10 +l 0 11 +m 8 21 +l 7 20 +l 7 19 +l 8 18 +l 9 18 +l 10 19 +l 10 20 +l 9 21 +l 8 21 +m 8 20 +l 8 19 +l 9 19 +l 9 20 +l 8 20 +m 8 3 +l 7 2 +l 7 1 +l 8 0 +l 9 0 +l 10 1 +l 10 2 +l 9 3 +l 8 3 +m 8 2 +l 8 1 +l 9 1 +l 9 2 +l 8 2 + +247 19 9 20 +m 15 16 +l 10 10 +l 5 13 +l 0 12 +l 5 16 +l 10 12 +l 15 16 +l 10 11 +l 5 14 +l 0 12 +m 15 9 +l 10 3 +l 5 6 +l 0 5 +l 5 9 +l 10 5 +l 15 9 +l 10 4 +l 5 7 +l 0 5 + +248 17 8 34 +m 6 21 +l 3 20 +l 1 18 +l 0 16 +l 0 15 +l 3 12 +l 6 11 +l 8 11 +l 11 12 +l 14 15 +l 14 16 +l 13 18 +l 11 20 +l 8 21 +l 6 21 +l 4 20 +l 3 19 +l 2 16 +l 3 13 +l 4 12 +l 6 11 +m 8 11 +l 10 12 +l 11 13 +l 12 16 +l 11 19 +l 10 20 +l 8 21 +m 2 18 +l 1 16 +l 2 14 +m 12 14 +l 13 16 +l 12 18 + +249 6 3 11 +m 0 4 +l 3 4 +l 3 0 +l 0 0 +l 0 4 +m 1 4 +l 1 0 +m 2 4 +l 2 0 +m 0 2 +l 3 2 + +250 6 3 9 +m 3 0 +l 0 0 +l 0 2 +l 3 2 +l 3 0 +m 2 2 +l 2 0 +m 1 2 +l 1 0 + +251 21 10 25 +m 0 11 +l 0 9 +l 8 0 +l 8 21 +l 18 21 +l 18 18 +l 16 18 +l 16 19 +l 10 19 +l 10 0 +l 8 0 +l 8 4 +l 0 11 +l 0 8 +m 8 3 +l 0 10 +l 8 2 +m 9 21 +l 9 0 +m 9 20 +l 18 20 +m 17 20 +l 17 18 +m 0 10 +l 8 1 + +252 22 11 44 +m 0 21 +l 5 21 +l 5 11 +l 6 9 +m 5 17 +l 6 19 +l 7 20 +l 9 21 +l 12 21 +l 14 20 +l 15 19 +l 16 16 +l 16 11 +l 17 9 +m 14 19 +l 15 16 +l 15 9 +m 12 21 +l 13 20 +l 14 17 +l 14 11 +l 13 9 +m 1 21 +l 3 20 +m 2 21 +l 3 19 +m 3 21 +l 3 11 +l 2 9 +m 4 20 +l 4 9 +m 0 9 +l 8 9 +m 11 9 +l 19 9 +m 3 10 +l 1 9 +m 5 10 +l 7 9 +m 14 10 +l 12 9 +m 16 9 +l 16 10 +l 18 9 + +253 11 5 25 +m 0 19 +l 1 20 +l 2 20 +l 3 19 +l 2 18 +l 1 18 +l 0 19 +l 0 20 +l 1 21 +l 7 21 +l 8 20 +l 8 19 +l 7 18 +l 1 16 +l 0 14 +l 0 12 +l 1 13 +l 2 13 +l 4 12 +l 6 12 +l 8 14 +l 6 13 +l 2 13 +m 1 19 +l 2 19 + +254 12 6 19 +m 0 0 +l 0 11 +l 8 11 +l 8 0 +l 0 0 +m 1 11 +l 1 0 +m 2 11 +l 2 0 +m 3 11 +l 3 0 +m 4 11 +l 4 0 +m 5 11 +l 5 0 +m 6 11 +l 6 0 +m 7 11 +l 7 0 diff --git a/cd/etc/vectorfont28.txt b/cd/etc/vectorfont28.txt new file mode 100755 index 0000000..3a614a9 --- /dev/null +++ b/cd/etc/vectorfont28.txt @@ -0,0 +1,8062 @@ +Triplex script II +24 24 12 -7 + + +32 16 8 0 + +33 13 6 28 +m 7 21 +l 6 21 +l 5 20 +l 3 7 +m 7 20 +l 6 20 +l 3 7 +m 7 20 +l 7 19 +l 3 7 +m 7 21 +l 8 20 +l 8 19 +l 3 7 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +34 19 9 16 +m 3 21 +l 2 20 +l 0 14 +m 3 20 +l 0 14 +m 3 21 +l 4 20 +l 0 14 +m 13 21 +l 12 20 +l 10 14 +m 13 20 +l 10 14 +m 13 21 +l 14 20 +l 10 14 + +35 20 10 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 22 11 47 +m 10 25 +l 2 -4 +m 15 25 +l 7 -4 +m 16 16 +l 16 17 +l 15 17 +l 15 15 +l 17 15 +l 17 17 +l 16 19 +l 15 20 +l 12 21 +l 8 21 +l 5 20 +l 3 18 +l 3 15 +l 4 13 +l 6 11 +l 12 8 +l 13 6 +l 13 3 +l 12 1 +m 4 15 +l 5 13 +l 12 9 +l 13 7 +m 5 20 +l 4 18 +l 4 16 +l 5 14 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 2 6 +l 2 4 +l 1 4 +l 1 5 + +37 23 11 29 +m 18 21 +l 0 0 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 27 13 66 +m 21 12 +l 21 13 +l 20 13 +l 20 11 +l 22 11 +l 22 13 +l 21 14 +l 20 14 +l 18 13 +l 16 11 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 5 +l 1 7 +l 2 8 +l 4 9 +l 9 11 +l 11 12 +l 13 14 +l 14 16 +l 14 18 +l 13 20 +l 11 21 +l 9 20 +l 8 18 +l 8 15 +l 9 9 +l 10 6 +l 11 4 +l 13 1 +l 15 0 +l 17 0 +l 18 2 +l 18 3 +m 5 0 +l 1 1 +m 2 1 +l 1 3 +l 1 5 +l 2 7 +l 3 8 +l 5 9 +m 9 11 +l 10 8 +l 13 2 +l 15 1 +m 4 0 +l 3 1 +l 2 3 +l 2 5 +l 3 7 +l 4 8 +l 6 9 +l 11 12 +m 8 15 +l 9 12 +l 10 9 +l 12 5 +l 14 2 +l 16 1 +l 17 1 +l 18 2 + +39 9 4 8 +m 3 21 +l 2 20 +l 0 14 +m 3 20 +l 0 14 +m 3 21 +l 4 20 +l 0 14 + +40 18 9 28 +m 13 25 +l 11 24 +l 8 22 +l 5 19 +l 3 16 +l 1 12 +l 0 8 +l 0 3 +l 1 -1 +l 2 -4 +l 4 -7 +m 6 19 +l 4 16 +l 2 12 +l 1 7 +l 1 -1 +m 13 25 +l 10 23 +l 7 20 +l 5 17 +l 4 15 +l 3 12 +l 2 8 +l 1 -1 +m 1 7 +l 2 -2 +l 3 -5 +l 4 -7 + +41 18 9 28 +m 9 25 +l 11 22 +l 12 19 +l 13 15 +l 13 10 +l 12 6 +l 10 2 +l 8 -1 +l 5 -4 +l 2 -6 +l 0 -7 +m 12 19 +l 12 11 +l 11 6 +l 9 2 +l 7 -1 +m 9 25 +l 10 23 +l 11 20 +l 12 11 +m 12 19 +l 11 10 +l 10 6 +l 9 3 +l 8 1 +l 6 -2 +l 3 -5 +l 0 -7 + +42 15 7 30 +m 5 21 +l 4 20 +l 6 10 +l 5 9 +m 5 21 +l 5 9 +m 5 21 +l 6 20 +l 4 10 +l 5 9 +m 0 18 +l 1 18 +l 9 12 +l 10 12 +m 0 18 +l 10 12 +m 0 18 +l 0 17 +l 10 13 +l 10 12 +m 10 18 +l 9 18 +l 1 12 +l 0 12 +m 10 18 +l 0 12 +m 10 18 +l 10 17 +l 0 13 +l 0 12 + +43 22 11 12 +m 8 18 +l 8 1 +l 9 1 +m 8 18 +l 9 18 +l 9 1 +m 0 10 +l 17 10 +l 17 9 +m 0 10 +l 0 9 +l 17 9 + +44 9 4 19 +m 3 0 +l 2 0 +l 1 1 +l 1 2 +l 2 3 +l 3 3 +l 4 2 +l 4 0 +l 3 -2 +l 2 -3 +l 0 -4 +m 2 2 +l 2 1 +l 3 1 +l 3 2 +l 2 2 +m 3 0 +l 3 -1 +l 2 -3 + +45 22 11 6 +m 0 10 +l 17 10 +l 17 9 +m 0 10 +l 0 9 +l 17 9 + +46 8 4 14 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +47 32 16 6 +m 26 25 +l 0 -7 +l 1 -7 +m 26 25 +l 27 25 +l 1 -7 + +48 20 10 53 +m 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +l 13 6 +l 14 9 +l 15 13 +l 15 16 +l 14 19 +l 13 20 +l 11 21 +l 9 21 +m 6 19 +l 4 17 +l 3 15 +l 2 12 +l 1 8 +l 1 4 +l 2 2 +m 9 2 +l 11 4 +l 12 6 +l 13 9 +l 14 13 +l 14 17 +l 13 19 +m 9 21 +l 7 20 +l 5 17 +l 4 15 +l 3 12 +l 2 8 +l 2 3 +l 3 1 +l 4 0 +m 6 0 +l 8 1 +l 10 4 +l 11 6 +l 12 9 +l 13 13 +l 13 18 +l 12 20 +l 11 21 + +49 13 6 15 +m 5 17 +l 0 0 +l 2 0 +m 8 21 +l 6 17 +l 1 0 +m 8 21 +l 2 0 +m 8 21 +l 5 18 +l 2 16 +l 0 15 +m 5 17 +l 3 16 +l 0 15 + +50 22 11 45 +m 6 16 +l 6 17 +l 7 17 +l 7 15 +l 5 15 +l 5 17 +l 6 19 +l 7 20 +l 10 21 +l 13 21 +l 16 20 +l 17 18 +l 17 16 +l 16 14 +l 14 12 +l 4 6 +l 2 4 +l 0 0 +m 15 20 +l 16 18 +l 16 16 +l 15 14 +l 13 12 +l 10 10 +m 13 21 +l 14 20 +l 15 18 +l 15 16 +l 14 14 +l 12 12 +l 4 6 +m 1 2 +l 2 3 +l 4 3 +l 9 2 +l 14 2 +l 15 3 +l 15 4 +m 14 1 +l 12 0 +l 9 0 +l 4 3 +l 9 1 +l 14 1 +l 15 3 + +51 21 10 58 +m 5 16 +l 5 17 +l 6 17 +l 6 15 +l 4 15 +l 4 17 +l 5 19 +l 6 20 +l 9 21 +l 12 21 +l 15 20 +l 16 18 +l 16 16 +l 15 14 +l 14 13 +l 12 12 +l 9 11 +m 14 20 +l 15 18 +l 15 16 +l 14 14 +l 13 13 +m 12 21 +l 13 20 +l 14 18 +l 14 16 +l 13 14 +l 11 12 +l 9 11 +m 7 11 +l 9 11 +l 12 10 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 2 6 +l 2 4 +l 1 4 +l 1 5 +m 12 9 +l 13 7 +l 13 4 +l 12 2 +m 9 11 +l 11 10 +l 12 8 +l 12 4 +l 11 2 +l 10 1 +l 8 0 + +52 21 10 9 +m 13 17 +l 8 0 +l 10 0 +l 16 21 +l 14 17 +l 9 0 +m 16 21 +l 0 6 +l 16 6 + +53 22 11 42 +m 7 21 +l 2 11 +m 7 21 +l 17 21 +m 7 20 +l 15 20 +m 6 19 +l 11 19 +l 15 20 +l 17 21 +m 2 11 +l 3 12 +l 6 13 +l 9 13 +l 12 12 +l 13 11 +l 14 9 +l 14 6 +l 13 3 +l 11 1 +l 7 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 +l 0 6 +l 2 6 +l 2 4 +l 1 4 +l 1 5 +m 12 11 +l 13 9 +l 13 6 +l 12 3 +l 10 1 +m 9 13 +l 11 12 +l 12 10 +l 12 6 +l 11 3 +l 9 1 +l 7 0 + +54 20 10 56 +m 14 17 +l 14 18 +l 13 18 +l 13 16 +l 15 16 +l 15 18 +l 14 20 +l 12 21 +l 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 7 0 +l 10 1 +l 12 3 +l 13 5 +l 13 8 +l 12 10 +l 11 11 +l 9 12 +l 6 12 +l 4 11 +l 3 10 +l 2 8 +m 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 4 +l 2 2 +m 11 3 +l 12 5 +l 12 8 +l 11 10 +m 9 21 +l 7 20 +l 5 17 +l 4 15 +l 3 12 +l 2 8 +l 2 3 +l 3 1 +l 4 0 +m 7 0 +l 9 1 +l 10 2 +l 11 5 +l 11 9 +l 10 11 +l 9 12 + +55 20 10 32 +m 2 21 +l 0 15 +m 15 21 +l 14 18 +l 12 15 +l 8 10 +l 6 7 +l 5 4 +l 4 0 +m 6 8 +l 4 4 +l 3 0 +m 12 15 +l 6 9 +l 4 6 +l 3 4 +l 2 0 +l 4 0 +m 1 18 +l 4 21 +l 6 21 +l 11 18 +m 3 20 +l 6 20 +l 11 18 +m 1 18 +l 3 19 +l 6 19 +l 11 18 +l 13 18 +l 14 19 +l 15 21 + +56 21 10 87 +m 9 21 +l 6 20 +l 5 19 +l 4 17 +l 4 14 +l 5 12 +l 7 11 +l 10 11 +l 13 12 +l 15 13 +l 16 15 +l 16 18 +l 15 20 +l 13 21 +l 9 21 +m 11 21 +l 6 20 +m 6 19 +l 5 17 +l 5 13 +l 6 12 +m 5 12 +l 8 11 +m 9 11 +l 13 12 +m 14 13 +l 15 15 +l 15 18 +l 14 20 +m 15 20 +l 11 21 +m 9 21 +l 7 19 +l 6 17 +l 6 13 +l 7 11 +m 10 11 +l 12 12 +l 13 13 +l 14 15 +l 14 19 +l 13 21 +m 7 11 +l 3 10 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 4 0 +l 8 0 +l 12 1 +l 13 2 +l 14 4 +l 14 7 +l 13 9 +l 12 10 +l 10 11 +m 8 11 +l 3 10 +m 4 10 +l 2 8 +l 1 6 +l 1 3 +l 2 1 +m 1 1 +l 6 0 +l 12 1 +m 12 2 +l 13 4 +l 13 7 +l 12 9 +m 12 10 +l 9 11 +m 7 11 +l 5 10 +l 3 8 +l 2 6 +l 2 3 +l 3 1 +l 4 0 +m 8 0 +l 10 1 +l 11 2 +l 12 4 +l 12 8 +l 11 10 +l 10 11 + +57 20 10 56 +m 13 13 +l 12 11 +l 11 10 +l 9 9 +l 6 9 +l 4 10 +l 3 11 +l 2 13 +l 2 16 +l 3 18 +l 5 20 +l 8 21 +l 11 21 +l 13 20 +l 14 19 +l 15 16 +l 15 13 +l 14 9 +l 13 6 +l 11 3 +l 9 1 +l 6 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 2 5 +l 2 3 +l 1 3 +l 1 4 +m 4 11 +l 3 13 +l 3 16 +l 4 18 +m 13 19 +l 14 17 +l 14 13 +l 13 9 +l 12 6 +l 10 3 +m 6 9 +l 5 10 +l 4 12 +l 4 16 +l 5 19 +l 6 20 +l 8 21 +m 11 21 +l 12 20 +l 13 18 +l 13 13 +l 12 9 +l 11 6 +l 10 4 +l 8 1 +l 6 0 + +58 11 5 28 +m 4 14 +l 3 13 +l 3 12 +l 4 11 +l 5 11 +l 6 12 +l 6 13 +l 5 14 +l 4 14 +m 4 13 +l 4 12 +l 5 12 +l 5 13 +l 4 13 +m 1 3 +l 0 2 +l 0 1 +l 1 0 +l 2 0 +l 3 1 +l 3 2 +l 2 3 +l 1 3 +m 1 2 +l 1 1 +l 2 1 +l 2 2 +l 1 2 + +59 12 6 33 +m 5 14 +l 4 13 +l 4 12 +l 5 11 +l 6 11 +l 7 12 +l 7 13 +l 6 14 +l 5 14 +m 5 13 +l 5 12 +l 6 12 +l 6 13 +l 5 13 +m 3 0 +l 2 0 +l 1 1 +l 1 2 +l 2 3 +l 3 3 +l 4 2 +l 4 0 +l 3 -2 +l 2 -3 +l 0 -4 +m 2 2 +l 2 1 +l 3 1 +l 3 2 +l 2 2 +m 3 0 +l 3 -1 +l 2 -3 + +60 21 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 22 11 12 +m 0 14 +l 17 14 +l 17 13 +m 0 14 +l 0 13 +l 17 13 +m 0 6 +l 17 6 +l 17 5 +m 0 6 +l 0 5 +l 17 5 + +62 21 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 18 9 53 +m 1 16 +l 1 17 +l 2 17 +l 2 15 +l 0 15 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 18 +l 13 16 +l 12 14 +l 11 13 +l 9 12 +l 5 11 +l 3 10 +l 3 8 +l 5 7 +l 6 7 +m 7 21 +l 12 20 +m 11 20 +l 12 18 +l 12 16 +l 11 14 +l 10 13 +l 8 12 +m 9 21 +l 10 20 +l 11 18 +l 11 16 +l 10 14 +l 9 13 +l 5 11 +l 4 10 +l 4 8 +l 5 7 +m 4 3 +l 3 2 +l 3 1 +l 4 0 +l 5 0 +l 6 1 +l 6 2 +l 5 3 +l 4 3 +m 4 2 +l 4 1 +l 5 1 +l 5 2 +l 4 2 + +64 26 13 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 23 11 26 +m 15 21 +l 3 1 +m 13 17 +l 14 0 +m 14 19 +l 15 1 +m 15 21 +l 15 19 +l 16 2 +l 16 0 +m 6 6 +l 14 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 3 1 +l 1 0 +m 3 1 +l 5 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 + +66 26 13 61 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 6 21 +l 17 21 +l 20 20 +l 21 18 +l 21 16 +l 20 13 +l 19 12 +l 16 11 +m 19 20 +l 20 18 +l 20 16 +l 19 13 +l 18 12 +m 17 21 +l 18 20 +l 19 18 +l 19 16 +l 18 13 +l 16 11 +m 8 11 +l 16 11 +l 18 10 +l 19 8 +l 19 6 +l 18 3 +l 16 1 +l 12 0 +l 0 0 +m 17 10 +l 18 8 +l 18 6 +l 17 3 +l 15 1 +m 16 11 +l 17 9 +l 17 6 +l 16 3 +l 14 1 +l 12 0 +m 7 21 +l 10 20 +m 8 21 +l 9 19 +m 12 21 +l 10 19 +m 13 21 +l 10 20 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 + +67 22 11 38 +m 15 19 +l 16 19 +l 17 21 +l 16 15 +l 16 17 +l 15 19 +l 14 20 +l 12 21 +l 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 5 +m 6 19 +l 4 17 +l 3 15 +l 2 12 +l 1 8 +l 1 4 +l 2 2 +m 9 21 +l 7 20 +l 5 17 +l 4 15 +l 3 12 +l 2 8 +l 2 3 +l 3 1 +l 5 0 + +68 25 12 49 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 6 21 +l 15 21 +l 18 20 +l 19 19 +l 20 16 +l 20 12 +l 19 8 +l 17 4 +l 15 2 +l 13 1 +l 9 0 +l 0 0 +m 17 20 +l 18 19 +l 19 16 +l 19 12 +l 18 8 +l 16 4 +l 14 2 +m 15 21 +l 17 19 +l 18 16 +l 18 12 +l 17 8 +l 15 4 +l 12 1 +l 9 0 +m 7 21 +l 10 20 +m 8 21 +l 9 19 +m 12 21 +l 10 19 +m 13 21 +l 10 20 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 + +69 26 13 49 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 15 15 +l 13 7 +l 13 11 +l 15 15 +m 6 21 +l 21 21 +l 20 15 +l 20 21 +m 8 11 +l 14 11 +m 0 0 +l 15 0 +l 17 5 +l 15 2 +l 12 0 +m 7 21 +l 10 20 +l 13 21 +m 8 21 +l 9 19 +m 12 21 +l 10 19 +m 17 21 +l 20 20 +m 18 21 +l 20 19 +m 19 21 +l 20 18 +m 14 13 +l 12 11 +l 13 9 +m 14 12 +l 11 11 +l 13 10 +m 7 0 +l 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 10 0 +l 15 1 + +70 26 13 48 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 15 15 +l 13 7 +m 6 21 +l 21 21 +l 20 15 +m 8 11 +l 14 11 +m 0 0 +l 8 0 +m 7 21 +l 10 20 +m 8 21 +l 9 19 +m 12 21 +l 10 19 +m 13 21 +l 10 20 +m 17 21 +l 20 20 +m 18 21 +l 20 19 +m 19 21 +l 20 18 +m 20 21 +l 20 15 +m 15 15 +l 13 11 +l 13 7 +m 14 13 +l 12 11 +l 13 9 +m 14 12 +l 11 11 +l 13 10 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 + +71 22 11 55 +m 15 19 +l 16 19 +l 17 21 +l 16 15 +l 16 17 +l 15 19 +l 14 20 +l 12 21 +l 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 7 0 +l 10 1 +l 12 3 +l 14 7 +m 6 19 +l 4 17 +l 3 15 +l 2 12 +l 1 8 +l 1 4 +l 2 2 +m 11 3 +l 12 4 +l 13 7 +m 9 21 +l 7 20 +l 5 17 +l 4 15 +l 3 12 +l 2 8 +l 2 3 +l 3 1 +l 5 0 +m 7 0 +l 9 1 +l 11 4 +l 12 7 +m 9 7 +l 17 7 +m 10 7 +l 12 6 +m 11 7 +l 12 4 +m 15 7 +l 13 5 +m 16 7 +l 13 6 + +72 31 15 54 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 21 21 +l 15 0 +m 22 21 +l 16 0 +m 23 21 +l 17 0 +m 6 21 +l 14 21 +m 18 21 +l 26 21 +m 7 11 +l 19 11 +m 0 0 +l 8 0 +m 12 0 +l 20 0 +m 7 21 +l 10 20 +m 8 21 +l 9 19 +m 12 21 +l 10 19 +m 13 21 +l 10 20 +m 19 21 +l 22 20 +m 20 21 +l 21 19 +m 24 21 +l 22 19 +m 25 21 +l 22 20 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 +m 16 1 +l 13 0 +m 16 2 +l 14 0 +m 17 2 +l 18 0 +m 16 1 +l 19 0 + +73 19 9 26 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 6 21 +l 14 21 +m 0 0 +l 8 0 +m 7 21 +l 10 20 +m 8 21 +l 9 19 +m 12 21 +l 10 19 +m 13 21 +l 10 20 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 + +74 23 11 38 +m 13 21 +l 8 4 +l 7 2 +l 5 0 +m 14 21 +l 10 8 +l 9 5 +l 8 3 +m 15 21 +l 11 8 +l 9 3 +l 7 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 1 6 +l 2 6 +l 3 5 +l 3 4 +l 2 3 +l 1 3 +m 1 5 +l 1 4 +l 2 4 +l 2 5 +l 1 5 +m 10 21 +l 18 21 +m 11 21 +l 14 20 +m 12 21 +l 13 19 +m 16 21 +l 14 19 +m 17 21 +l 14 20 + +75 30 15 48 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 22 20 +l 7 9 +m 11 12 +l 15 0 +m 12 12 +l 16 0 +m 13 13 +l 17 1 +m 6 21 +l 14 21 +m 19 21 +l 25 21 +m 0 0 +l 8 0 +m 12 0 +l 19 0 +m 7 21 +l 10 20 +m 8 21 +l 9 19 +m 12 21 +l 10 19 +m 13 21 +l 10 20 +m 20 21 +l 22 20 +m 24 21 +l 22 20 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 +m 15 1 +l 13 0 +m 15 2 +l 14 0 +m 16 2 +l 18 0 + +76 22 11 33 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 6 21 +l 14 21 +m 0 0 +l 15 0 +l 17 6 +m 7 21 +l 10 20 +m 8 21 +l 9 19 +m 12 21 +l 10 19 +m 13 21 +l 10 20 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 +m 10 0 +l 15 1 +m 12 0 +l 16 3 +m 14 0 +l 17 6 + +77 33 16 46 +m 9 21 +l 3 1 +m 9 20 +l 10 2 +l 10 0 +m 10 21 +l 11 2 +m 11 21 +l 12 3 +m 23 21 +l 12 3 +l 10 0 +m 23 21 +l 17 0 +m 24 21 +l 18 0 +m 25 21 +l 19 0 +m 6 21 +l 11 21 +m 23 21 +l 28 21 +m 0 0 +l 6 0 +m 14 0 +l 22 0 +m 7 21 +l 9 20 +m 8 21 +l 9 19 +m 26 21 +l 24 19 +m 27 21 +l 24 20 +m 3 1 +l 1 0 +m 3 1 +l 5 0 +m 18 1 +l 15 0 +m 18 2 +l 16 0 +m 19 2 +l 20 0 +m 18 1 +l 21 0 + +78 30 15 29 +m 9 21 +l 3 1 +m 9 21 +l 16 0 +m 10 21 +l 16 3 +m 11 21 +l 17 3 +m 22 20 +l 17 3 +l 16 0 +m 6 21 +l 11 21 +m 19 21 +l 25 21 +m 0 0 +l 6 0 +m 7 21 +l 10 20 +m 8 21 +l 10 19 +m 20 21 +l 22 20 +m 24 21 +l 22 20 +m 3 1 +l 1 0 +m 3 1 +l 5 0 + +79 21 10 51 +m 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 7 0 +l 10 1 +l 12 3 +l 14 6 +l 15 9 +l 16 13 +l 16 16 +l 15 19 +l 14 20 +l 12 21 +l 9 21 +m 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 4 +l 2 2 +m 11 3 +l 13 6 +l 14 9 +l 15 13 +l 15 17 +l 14 19 +m 9 21 +l 7 20 +l 5 17 +l 4 15 +l 3 12 +l 2 8 +l 2 3 +l 3 1 +l 4 0 +m 7 0 +l 9 1 +l 11 4 +l 12 6 +l 13 9 +l 14 13 +l 14 18 +l 13 20 +l 12 21 + +80 27 13 45 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 6 21 +l 18 21 +l 21 20 +l 22 18 +l 22 16 +l 21 13 +l 19 11 +l 15 10 +l 7 10 +m 20 20 +l 21 18 +l 21 16 +l 20 13 +l 18 11 +m 18 21 +l 19 20 +l 20 18 +l 20 16 +l 19 13 +l 17 11 +l 15 10 +m 0 0 +l 8 0 +m 7 21 +l 10 20 +m 8 21 +l 9 19 +m 12 21 +l 10 19 +m 13 21 +l 10 20 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 + +81 21 10 70 +m 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 7 0 +l 10 1 +l 12 3 +l 14 6 +l 15 9 +l 16 13 +l 16 16 +l 15 19 +l 14 20 +l 12 21 +l 9 21 +m 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 4 +l 2 2 +m 11 3 +l 13 6 +l 14 9 +l 15 13 +l 15 17 +l 14 19 +m 9 21 +l 7 20 +l 5 17 +l 4 15 +l 3 12 +l 2 8 +l 2 3 +l 3 1 +l 4 0 +m 7 0 +l 9 1 +l 11 4 +l 12 6 +l 13 9 +l 14 13 +l 14 18 +l 13 20 +l 12 21 +m 2 3 +l 3 5 +l 5 6 +l 6 6 +l 8 5 +l 9 3 +l 10 -2 +l 11 -3 +l 12 -3 +l 13 -2 +m 10 -3 +l 11 -4 +l 12 -4 +m 9 3 +l 9 -4 +l 10 -5 +l 12 -5 +l 13 -2 +l 13 -1 + +82 26 13 60 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 6 21 +l 17 21 +l 20 20 +l 21 18 +l 21 16 +l 20 13 +l 19 12 +l 16 11 +l 8 11 +m 19 20 +l 20 18 +l 20 16 +l 19 13 +l 18 12 +m 17 21 +l 18 20 +l 19 18 +l 19 16 +l 18 13 +l 16 11 +m 12 11 +l 14 10 +l 15 9 +l 17 3 +l 18 2 +l 19 2 +l 20 3 +m 17 2 +l 18 1 +l 19 1 +m 15 9 +l 16 1 +l 17 0 +l 19 0 +l 20 3 +l 20 4 +m 0 0 +l 8 0 +m 7 21 +l 10 20 +m 8 21 +l 9 19 +m 12 21 +l 10 19 +m 13 21 +l 10 20 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 + +83 24 12 41 +m 17 19 +l 18 19 +l 19 21 +l 18 15 +l 18 17 +l 17 19 +l 16 20 +l 13 21 +l 9 21 +l 6 20 +l 4 18 +l 4 15 +l 5 13 +l 7 11 +l 13 8 +l 14 6 +l 14 3 +l 13 1 +m 5 15 +l 6 13 +l 13 9 +l 14 7 +m 6 20 +l 5 18 +l 5 16 +l 6 14 +l 12 11 +l 14 9 +l 15 7 +l 15 4 +l 14 2 +l 13 1 +l 10 0 +l 6 0 +l 3 1 +l 2 2 +l 1 4 +l 1 6 +l 0 0 +l 1 2 +l 2 2 + +84 23 11 36 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 11 21 +l 5 0 +m 2 21 +l 0 15 +m 18 21 +l 17 15 +m 2 21 +l 18 21 +m 0 0 +l 8 0 +m 3 21 +l 0 15 +m 5 21 +l 1 18 +m 7 21 +l 2 20 +m 14 21 +l 17 20 +m 15 21 +l 17 19 +m 16 21 +l 17 18 +m 17 21 +l 17 15 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 + +85 26 13 37 +m 4 21 +l 1 10 +l 0 6 +l 0 3 +l 1 1 +l 4 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 18 20 +m 5 21 +l 2 10 +l 1 6 +l 1 2 +l 2 1 +m 6 21 +l 3 10 +l 2 6 +l 2 2 +l 4 0 +m 1 21 +l 9 21 +m 15 21 +l 21 21 +m 2 21 +l 5 20 +m 3 21 +l 4 19 +m 7 21 +l 5 19 +m 8 21 +l 5 20 +m 16 21 +l 18 20 +m 20 21 +l 18 20 + +86 23 11 24 +m 2 21 +l 2 19 +l 3 2 +l 3 0 +m 3 20 +l 4 3 +m 4 21 +l 5 4 +m 15 20 +l 3 0 +m 0 21 +l 7 21 +m 12 21 +l 18 21 +m 1 21 +l 2 19 +m 5 21 +l 4 19 +m 6 21 +l 3 20 +m 13 21 +l 15 20 +m 17 21 +l 15 20 + +87 27 13 40 +m 3 21 +l 3 19 +l 1 2 +l 1 0 +m 4 20 +l 2 3 +m 5 21 +l 3 4 +m 11 21 +l 3 4 +l 1 0 +m 11 21 +l 11 19 +l 9 2 +l 9 0 +m 12 20 +l 10 3 +m 13 21 +l 11 4 +m 19 20 +l 11 4 +l 9 0 +m 0 21 +l 8 21 +m 11 21 +l 13 21 +m 16 21 +l 22 21 +m 1 21 +l 4 20 +m 2 21 +l 3 19 +m 6 21 +l 4 18 +m 7 21 +l 4 20 +m 17 21 +l 19 20 +m 21 21 +l 19 20 + +88 29 14 36 +m 8 21 +l 14 0 +m 9 21 +l 15 0 +m 10 21 +l 16 0 +m 21 20 +l 3 1 +m 6 21 +l 13 21 +m 18 21 +l 24 21 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 7 21 +l 9 19 +m 11 21 +l 10 19 +m 12 21 +l 10 20 +m 19 21 +l 21 20 +m 23 21 +l 21 20 +m 3 1 +l 1 0 +m 3 1 +l 5 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 15 2 +l 17 0 + +89 25 12 35 +m 2 21 +l 6 11 +l 3 0 +m 3 21 +l 7 11 +l 4 0 +m 4 21 +l 8 11 +l 5 0 +m 17 20 +l 8 11 +m 0 21 +l 7 21 +m 14 21 +l 20 21 +m 0 0 +l 8 0 +m 1 21 +l 3 20 +m 5 21 +l 4 19 +m 6 21 +l 3 20 +m 15 21 +l 17 20 +m 19 21 +l 17 20 +m 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 4 1 +l 7 0 + +90 25 12 24 +m 18 21 +l 0 0 +m 19 21 +l 1 0 +m 20 21 +l 2 0 +m 20 21 +l 6 21 +l 4 15 +m 0 0 +l 14 0 +l 16 6 +m 7 21 +l 4 15 +m 8 21 +l 5 18 +m 10 21 +l 6 20 +m 10 0 +l 14 1 +m 12 0 +l 15 3 +m 13 0 +l 16 6 + +91 12 6 8 +m 0 25 +l 0 -7 +m 1 25 +l 1 -7 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +92 32 16 5 +m 1 25 +l 27 -7 +l 26 -7 +l 0 25 +l 1 25 + +93 12 6 8 +m 6 25 +l 6 -7 +m 7 25 +l 7 -7 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +94 15 7 6 +m 6 18 +l 8 21 +l 10 18 +m 3 15 +l 8 20 +l 13 15 + +95 23 11 5 +m 0 -6 +l 18 -6 +l 18 -7 +l 0 -7 +l 0 -6 + +96 9 4 19 +m 3 18 +l 2 18 +l 1 19 +l 1 20 +l 2 21 +l 3 21 +l 4 20 +l 4 18 +l 3 16 +l 2 15 +l 0 14 +m 2 20 +l 2 19 +l 3 19 +l 3 20 +l 2 20 +m 3 18 +l 3 17 +l 2 15 + +97 23 11 44 +m 13 14 +l 11 7 +l 11 3 +l 12 1 +l 13 0 +l 15 0 +l 17 2 +l 18 4 +m 14 14 +l 12 7 +l 12 1 +m 13 14 +l 15 14 +l 13 7 +l 12 3 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 11 7 +m 4 13 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 + +98 17 8 45 +m 3 21 +l 1 14 +l 0 8 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 4 +l 12 7 +l 12 9 +l 11 12 +l 10 13 +l 8 14 +l 6 14 +l 4 13 +l 3 12 +l 2 10 +l 1 7 +m 4 21 +l 2 14 +l 1 10 +l 1 4 +l 2 1 +m 9 2 +l 10 4 +l 11 7 +l 11 10 +l 10 12 +m 0 21 +l 5 21 +l 3 14 +l 1 7 +m 6 0 +l 8 2 +l 9 4 +l 10 7 +l 10 10 +l 9 13 +l 8 14 +m 1 21 +l 4 20 +m 2 21 +l 3 19 + +99 17 8 31 +m 11 10 +l 11 11 +l 10 11 +l 10 9 +l 12 9 +l 12 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 4 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 + +100 23 11 50 +m 15 21 +l 12 10 +l 11 6 +l 11 3 +l 12 1 +l 13 0 +l 15 0 +l 17 2 +l 18 4 +m 16 21 +l 13 10 +l 12 6 +l 12 1 +m 12 21 +l 17 21 +l 13 7 +l 12 3 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 11 7 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 13 21 +l 16 20 +m 14 21 +l 15 19 + +101 16 8 30 +m 1 5 +l 5 6 +l 8 7 +l 11 9 +l 12 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 + +102 24 12 41 +m 18 19 +l 18 20 +l 17 20 +l 17 18 +l 19 18 +l 19 20 +l 18 21 +l 16 21 +l 14 20 +l 12 18 +l 11 16 +l 10 13 +l 9 9 +l 7 0 +l 6 -3 +l 5 -5 +l 3 -7 +m 12 17 +l 11 14 +l 10 9 +l 8 0 +l 7 -3 +m 16 21 +l 14 19 +l 13 17 +l 12 14 +l 11 9 +l 9 1 +l 8 -2 +l 7 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -4 +l 2 -4 +l 2 -6 +l 1 -6 +l 1 -5 +m 6 14 +l 17 14 + +103 22 11 51 +m 15 14 +l 11 0 +l 10 -3 +l 8 -6 +l 6 -7 +m 16 14 +l 12 0 +l 10 -4 +m 15 14 +l 17 14 +l 13 0 +l 11 -4 +l 9 -6 +l 6 -7 +l 3 -7 +l 1 -6 +l 0 -5 +l 0 -3 +l 2 -3 +l 2 -5 +l 1 -5 +l 1 -4 +m 13 7 +l 13 10 +l 12 13 +l 10 14 +l 8 14 +l 5 13 +l 3 10 +l 2 7 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +l 8 0 +l 10 1 +l 11 2 +l 12 4 +l 13 7 +m 5 12 +l 4 10 +l 3 7 +l 3 4 +l 4 2 +m 8 14 +l 6 12 +l 5 10 +l 4 7 +l 4 4 +l 5 1 +l 6 0 + +104 24 12 33 +m 6 21 +l 0 0 +l 2 0 +m 7 21 +l 1 0 +m 3 21 +l 8 21 +l 2 0 +m 4 7 +l 6 11 +l 8 13 +l 10 14 +l 12 14 +l 14 13 +l 15 11 +l 15 8 +l 13 3 +m 14 13 +l 14 9 +l 13 5 +l 13 1 +m 14 11 +l 12 6 +l 12 3 +l 13 1 +l 14 0 +l 16 0 +l 18 2 +l 19 4 +m 4 21 +l 7 20 +m 5 21 +l 6 19 + +105 16 8 29 +m 7 21 +l 7 19 +l 9 19 +l 9 21 +l 7 21 +m 8 21 +l 8 19 +m 7 20 +l 9 20 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +l 6 0 +l 8 0 +l 10 2 +l 11 4 + +106 19 9 39 +m 12 21 +l 12 19 +l 14 19 +l 14 21 +l 12 21 +m 13 21 +l 13 19 +m 12 20 +l 14 20 +m 4 10 +l 5 12 +l 7 14 +l 9 14 +l 10 13 +l 11 11 +l 11 8 +l 9 1 +l 8 -2 +l 7 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -4 +l 2 -4 +l 2 -6 +l 1 -6 +l 1 -5 +m 10 13 +l 10 8 +l 8 1 +l 7 -2 +l 6 -4 +m 10 11 +l 9 7 +l 7 0 +l 6 -3 +l 5 -5 +l 3 -7 + +107 22 11 40 +m 6 21 +l 0 0 +l 2 0 +m 7 21 +l 1 0 +m 3 21 +l 8 21 +l 2 0 +m 16 12 +l 16 13 +l 15 13 +l 15 11 +l 17 11 +l 17 13 +l 16 14 +l 14 14 +l 12 13 +l 8 9 +l 6 8 +m 4 8 +l 6 8 +l 8 7 +l 9 6 +l 11 2 +l 12 1 +l 14 1 +m 8 6 +l 10 2 +l 11 1 +m 6 8 +l 7 7 +l 9 1 +l 10 0 +l 12 0 +l 14 1 +l 16 4 +m 4 21 +l 7 20 +m 5 21 +l 6 19 + +108 12 6 21 +m 4 21 +l 1 10 +l 0 6 +l 0 3 +l 1 1 +l 2 0 +l 4 0 +l 6 2 +l 7 4 +m 5 21 +l 2 10 +l 1 6 +l 1 1 +m 1 21 +l 6 21 +l 2 7 +l 1 3 +m 2 21 +l 5 20 +m 3 21 +l 4 19 + +109 38 19 52 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 0 +m 6 13 +l 6 8 +l 4 0 +m 6 11 +l 5 7 +l 3 0 +l 5 0 +m 7 8 +l 9 11 +l 11 13 +l 13 14 +l 15 14 +l 17 13 +l 18 11 +l 18 8 +l 16 0 +m 17 13 +l 17 8 +l 15 0 +m 17 11 +l 16 7 +l 14 0 +l 16 0 +m 18 8 +l 20 11 +l 22 13 +l 24 14 +l 26 14 +l 28 13 +l 29 11 +l 29 8 +l 27 3 +m 28 13 +l 28 9 +l 27 5 +l 27 1 +m 28 11 +l 26 6 +l 26 3 +l 27 1 +l 28 0 +l 30 0 +l 32 2 +l 33 4 + +110 27 13 36 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 0 +m 6 13 +l 6 8 +l 4 0 +m 6 11 +l 5 7 +l 3 0 +l 5 0 +m 7 8 +l 9 11 +l 11 13 +l 13 14 +l 15 14 +l 17 13 +l 18 11 +l 18 8 +l 16 3 +m 17 13 +l 17 9 +l 16 5 +l 16 1 +m 17 11 +l 15 6 +l 15 3 +l 16 1 +l 17 0 +l 19 0 +l 21 2 +l 22 4 + +111 19 9 41 +m 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 4 +l 14 7 +l 14 9 +l 13 12 +l 12 13 +l 9 14 +l 6 14 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 11 2 +l 12 4 +l 13 7 +l 13 10 +l 12 12 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 5 0 +m 8 0 +l 10 2 +l 11 4 +l 12 7 +l 12 10 +l 11 13 +l 9 14 + +112 25 12 55 +m 2 10 +l 3 12 +l 5 14 +l 7 14 +l 8 13 +l 9 11 +l 9 8 +l 8 4 +l 5 -7 +m 8 13 +l 8 8 +l 7 4 +l 4 -7 +m 8 11 +l 7 7 +l 3 -7 +m 9 7 +l 10 10 +l 11 12 +l 12 13 +l 14 14 +l 16 14 +l 18 13 +l 19 12 +l 20 9 +l 20 7 +l 19 4 +l 17 1 +l 14 0 +l 12 0 +l 10 1 +l 9 4 +l 9 7 +m 18 12 +l 19 10 +l 19 7 +l 18 4 +l 17 2 +m 16 14 +l 17 13 +l 18 10 +l 18 7 +l 17 4 +l 16 2 +l 14 0 +m 0 -7 +l 8 -7 +m 4 -6 +l 1 -7 +m 4 -5 +l 2 -7 +m 5 -5 +l 6 -7 +m 4 -6 +l 7 -7 + +113 20 10 46 +m 13 14 +l 7 -7 +m 14 14 +l 8 -7 +m 13 14 +l 15 14 +l 9 -7 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 11 7 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 4 -7 +l 12 -7 +m 8 -6 +l 5 -7 +m 8 -5 +l 6 -7 +m 9 -5 +l 10 -7 +m 8 -6 +l 11 -7 + +114 21 10 26 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 7 +l 5 0 +m 6 13 +l 6 7 +l 4 0 +m 6 11 +l 5 7 +l 3 0 +l 5 0 +m 15 12 +l 15 13 +l 14 13 +l 14 11 +l 16 11 +l 16 13 +l 15 14 +l 13 14 +l 11 13 +l 9 11 +l 7 7 + +115 18 9 42 +m 12 11 +l 12 12 +l 11 12 +l 11 10 +l 13 10 +l 13 12 +l 12 13 +l 9 14 +l 6 14 +l 3 13 +l 2 12 +l 2 10 +l 3 8 +l 5 7 +l 8 6 +l 10 5 +l 11 3 +m 3 13 +l 2 10 +m 3 9 +l 5 8 +l 8 7 +l 10 6 +m 11 5 +l 10 1 +m 2 12 +l 3 10 +l 5 9 +l 8 8 +l 10 7 +l 11 5 +l 11 3 +l 10 1 +l 7 0 +l 4 0 +l 1 1 +l 0 2 +l 0 4 +l 2 4 +l 2 2 +l 1 2 +l 1 3 + +116 15 7 19 +m 6 21 +l 3 10 +l 2 6 +l 2 3 +l 3 1 +l 4 0 +l 6 0 +l 8 2 +l 9 4 +m 7 21 +l 4 10 +l 3 6 +l 3 1 +m 6 21 +l 8 21 +l 4 7 +l 3 3 +m 0 14 +l 10 14 + +117 27 13 36 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 6 +m 17 14 +l 15 6 +l 15 3 +l 16 1 +l 17 0 +l 19 0 +l 21 2 +l 22 4 +m 18 14 +l 16 6 +l 16 1 +m 17 14 +l 19 14 +l 17 7 +l 16 3 + +118 21 10 26 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 6 +l 16 10 +l 16 14 +l 15 14 +l 15 13 +l 16 11 + +119 31 15 42 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 14 6 +m 16 14 +l 14 6 +l 14 3 +l 15 1 +l 17 0 +l 19 0 +l 21 1 +l 23 3 +l 25 6 +l 26 10 +l 26 14 +l 25 14 +l 25 13 +l 26 11 +m 17 14 +l 15 6 +l 15 1 +m 16 14 +l 18 14 +l 16 7 +l 15 3 + +120 24 12 46 +m 2 10 +l 4 13 +l 6 14 +l 8 14 +l 10 13 +l 11 11 +l 11 9 +m 8 14 +l 9 13 +l 9 9 +l 8 5 +l 7 3 +l 5 1 +l 3 0 +l 1 0 +l 0 1 +l 0 3 +l 2 3 +l 2 1 +l 1 1 +l 1 2 +m 10 12 +l 10 9 +l 9 5 +l 9 2 +m 18 12 +l 18 13 +l 17 13 +l 17 11 +l 19 11 +l 19 13 +l 18 14 +l 16 14 +l 14 13 +l 12 11 +l 11 9 +l 10 5 +l 10 1 +l 11 0 +m 8 5 +l 8 3 +l 9 1 +l 11 0 +l 13 0 +l 15 1 +l 17 4 + +121 24 12 43 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 7 +m 17 14 +l 13 0 +l 12 -3 +l 10 -6 +l 8 -7 +m 18 14 +l 14 0 +l 12 -4 +m 17 14 +l 19 14 +l 15 0 +l 13 -4 +l 11 -6 +l 8 -7 +l 5 -7 +l 3 -6 +l 2 -5 +l 2 -3 +l 4 -3 +l 4 -5 +l 3 -5 +l 3 -4 + +122 19 9 32 +m 14 14 +l 13 12 +l 11 10 +l 3 4 +l 1 2 +l 0 0 +m 13 12 +l 4 12 +l 2 11 +l 1 9 +m 11 12 +l 7 13 +l 4 13 +l 3 12 +m 11 12 +l 7 14 +l 4 14 +l 2 12 +l 1 9 +m 1 2 +l 10 2 +l 12 3 +l 13 5 +m 3 2 +l 7 1 +l 10 1 +l 11 2 +m 3 2 +l 7 0 +l 10 0 +l 12 2 +l 13 5 + +123 10 5 37 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +m 3 24 +l 2 22 +l 2 20 +l 3 18 +l 4 17 +l 5 15 +l 5 13 +l 4 11 +l 0 9 +l 4 7 +l 5 5 +l 5 3 +l 4 1 +l 3 0 +l 2 -2 +l 2 -4 +l 3 -6 +m 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 5 2 2 +m 0 -7 +l 0 25 + +125 10 5 37 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +m 2 24 +l 3 22 +l 3 20 +l 2 18 +l 1 17 +l 0 15 +l 0 13 +l 1 11 +l 5 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 2 0 +l 3 -2 +l 3 -4 +l 2 -6 +m 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 23 11 22 +m 0 15 +l 0 17 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 11 17 +l 13 16 +l 15 16 +l 17 17 +l 18 19 +l 18 21 +m 0 17 +l 1 19 +l 3 20 +l 5 20 +l 7 19 +l 11 16 +l 13 15 +l 15 15 +l 17 16 +l 18 19 + +127 18 9 9 +m 0 7 +l 0 0 +l 14 0 +l 14 8 +l 7 17 +l 0 8 +l 0 7 +m 7 7 +l 7 7 + +128 22 11 65 +m 15 20 +l 16 20 +l 17 22 +l 16 16 +l 16 18 +l 15 20 +l 14 21 +l 12 22 +l 9 22 +l 6 21 +l 4 19 +l 2 16 +l 1 13 +l 0 9 +l 0 6 +l 1 3 +l 2 2 +l 5 1 +l 8 1 +l 10 2 +l 12 4 +l 13 6 +m 6 20 +l 4 18 +l 3 16 +l 2 13 +l 1 9 +l 1 5 +l 2 3 +m 9 22 +l 7 21 +l 5 18 +l 4 16 +l 3 13 +l 2 9 +l 2 4 +l 3 2 +l 5 1 +m 12 -7 +l 13 -6 +l 13 -5 +l 11 -3 +l 8 -2 +l 6 -1 +l 6 0 +l 7 1 +l 7 -1 +l 10 -1 +l 12 -2 +l 15 -5 +l 15 -6 +l 14 -7 +l 10 -8 +l 14 -6 +l 14 -5 +l 12 -3 +l 9 -2 +m 10 -8 +l 6 -8 +l 4 -6 +l 4 -4 +l 6 -4 +l 6 -6 +l 5 -6 +l 5 -5 + +129 27 13 63 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 6 +l 15 3 +l 16 1 +l 17 0 +l 19 0 +l 21 2 +l 22 4 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +m 16 3 +l 17 7 +l 19 14 +l 17 14 +l 15 6 +m 18 14 +l 16 6 +l 16 1 +m 6 20 +l 5 19 +l 5 18 +l 6 17 +l 7 17 +l 8 18 +l 8 19 +l 7 20 +l 6 20 +m 6 19 +l 6 18 +l 7 18 +l 7 19 +l 6 19 +m 15 20 +l 14 19 +l 14 18 +l 15 17 +l 16 17 +l 17 18 +l 17 19 +l 16 20 +l 15 20 +m 15 19 +l 15 18 +l 16 18 +l 16 19 +l 15 19 + +130 16 8 48 +m 1 5 +l 5 6 +l 8 7 +l 11 9 +l 12 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 10 18 +l 11 20 +l 11 21 +l 10 21 +l 9 22 +l 9 23 +l 10 24 +l 11 24 +l 12 23 +l 12 21 +l 11 19 +l 10 18 +l 6 17 +m 10 23 +l 10 22 +l 11 22 +l 11 23 +l 10 23 + +131 23 11 49 +m 12 3 +l 13 7 +l 15 14 +l 13 14 +l 11 7 +l 11 3 +l 12 1 +l 13 0 +l 15 0 +l 17 2 +l 18 4 +m 14 14 +l 12 7 +l 12 1 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 11 7 +m 4 13 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 5 20 +l 7 23 +l 9 20 +m 2 17 +l 7 22 +l 12 17 + +132 23 11 71 +m 12 3 +l 13 7 +l 15 14 +l 13 14 +l 11 7 +l 11 3 +l 12 1 +l 13 0 +l 15 0 +l 17 2 +l 18 4 +m 14 14 +l 12 7 +l 12 1 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 11 7 +m 4 13 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 2 20 +l 1 19 +l 1 18 +l 2 17 +l 3 17 +l 4 18 +l 4 19 +l 3 20 +l 2 20 +m 2 19 +l 2 18 +l 3 18 +l 3 19 +l 2 19 +m 11 20 +l 10 19 +l 10 18 +l 11 17 +l 12 17 +l 13 18 +l 13 19 +l 12 20 +l 11 20 +m 11 19 +l 11 18 +l 12 18 +l 12 19 +l 11 19 + +133 23 11 61 +m 12 3 +l 13 7 +l 15 14 +l 13 14 +l 11 7 +l 11 3 +l 12 1 +l 13 0 +l 15 0 +l 17 2 +l 18 4 +m 14 14 +l 12 7 +l 12 1 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 11 7 +m 4 13 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 5 18 +l 4 20 +l 4 21 +l 5 21 +l 6 22 +l 6 23 +l 5 24 +l 4 24 +l 3 23 +l 3 21 +l 4 19 +l 5 18 +l 9 17 +m 5 23 +l 5 22 +l 4 22 +l 4 23 +l 5 23 + +134 23 11 57 +m 12 3 +l 13 7 +l 15 14 +l 13 14 +l 11 7 +l 11 3 +l 12 1 +l 13 0 +l 15 0 +l 17 2 +l 18 4 +m 14 14 +l 12 7 +l 12 1 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 11 7 +m 4 13 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 7 20 +l 6 19 +l 6 18 +l 7 17 +l 8 17 +l 9 18 +l 9 19 +l 8 20 +l 7 20 +m 7 19 +l 7 18 +l 8 18 +l 8 19 +l 7 19 + +135 17 8 58 +m 2 -4 +l 2 -5 +l 3 -5 +l 3 -3 +l 1 -3 +l 1 -5 +l 3 -7 +l 7 -7 +l 11 -6 +l 12 -5 +l 12 -4 +l 9 -1 +l 7 0 +l 4 0 +l 4 2 +l 3 3 +l 2 6 +l 2 7 +l 3 10 +l 4 12 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 1 4 +l 2 3 +l 4 2 +l 6 2 +l 9 3 +l 10 4 +m 6 -1 +l 9 -2 +l 11 -4 +l 11 -5 +l 9 -6 +l 10 -5 +l 10 -4 +l 8 -2 +l 5 -1 +l 3 0 +l 3 1 +l 4 2 +m 3 12 +l 2 10 +l 1 7 +l 1 6 +l 2 4 +m 11 10 +l 11 11 +l 10 11 +l 10 9 +l 12 9 +l 12 11 +l 11 13 +l 9 14 +l 6 14 +m 9 -6 +l 7 -7 + +136 16 8 36 +m 1 5 +l 5 6 +l 8 7 +l 11 9 +l 12 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 5 20 +l 7 23 +l 9 20 +m 2 17 +l 7 22 +l 12 17 + +137 16 8 58 +m 1 5 +l 5 6 +l 8 7 +l 11 9 +l 12 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 2 20 +l 1 19 +l 1 18 +l 2 17 +l 3 17 +l 4 18 +l 4 19 +l 3 20 +l 2 20 +m 2 19 +l 2 18 +l 3 18 +l 3 19 +l 2 19 +m 11 20 +l 10 19 +l 10 18 +l 11 17 +l 12 17 +l 13 18 +l 13 19 +l 12 20 +l 11 20 +m 11 19 +l 11 18 +l 12 18 +l 12 19 +l 11 19 + +138 16 8 48 +m 1 5 +l 5 6 +l 8 7 +l 11 9 +l 12 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 4 18 +l 3 20 +l 3 21 +l 4 21 +l 5 22 +l 5 23 +l 4 24 +l 3 24 +l 2 23 +l 2 21 +l 3 19 +l 4 18 +l 8 17 +m 4 23 +l 4 22 +l 3 22 +l 3 23 +l 4 23 + +139 16 8 48 +m 1 10 +l 2 12 +l 4 14 +l 6 14 +l 7 13 +l 8 11 +l 8 8 +l 6 3 +m 7 13 +l 7 9 +l 6 5 +l 6 1 +l 7 0 +l 9 0 +l 11 2 +l 12 4 +m 7 11 +l 5 6 +l 5 3 +l 6 1 +m 1 20 +l 0 19 +l 0 18 +l 1 17 +l 2 17 +l 3 18 +l 3 19 +l 2 20 +l 1 20 +m 1 19 +l 1 18 +l 2 18 +l 2 19 +l 1 19 +m 10 20 +l 9 19 +l 9 18 +l 10 17 +l 11 17 +l 12 18 +l 12 19 +l 11 20 +l 10 20 +m 10 19 +l 10 18 +l 11 18 +l 11 19 +l 10 19 + +140 16 8 26 +m 1 10 +l 2 12 +l 4 14 +l 6 14 +l 7 13 +l 8 11 +l 8 8 +l 6 3 +m 7 13 +l 7 9 +l 6 5 +l 6 1 +l 7 0 +l 9 0 +l 11 2 +l 12 4 +m 7 11 +l 5 6 +l 5 3 +l 6 1 +m 3 20 +l 5 23 +l 7 20 +m 0 17 +l 5 22 +l 10 17 + +141 16 8 38 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +l 6 0 +l 8 0 +l 10 2 +l 11 4 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +m 2 18 +l 1 20 +l 1 21 +l 2 21 +l 3 22 +l 3 23 +l 2 24 +l 1 24 +l 0 23 +l 0 21 +l 1 19 +l 2 18 +l 6 17 +m 2 23 +l 2 22 +l 1 22 +l 1 23 +l 2 23 + +142 23 11 52 +m 16 0 +l 16 2 +l 15 19 +l 15 21 +l 3 1 +l 1 0 +m 13 17 +l 14 0 +m 14 19 +l 15 1 +m 6 6 +l 14 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 3 1 +l 5 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 +m 10 26 +l 9 25 +l 9 24 +l 10 23 +l 11 23 +l 12 24 +l 12 25 +l 11 26 +l 10 26 +m 10 25 +l 10 24 +l 11 24 +l 11 25 +l 10 25 +m 19 26 +l 18 25 +l 18 24 +l 19 23 +l 20 23 +l 21 24 +l 21 25 +l 20 26 +l 19 26 +m 19 25 +l 19 24 +l 20 24 +l 20 25 +l 19 25 + +143 23 11 38 +m 16 0 +l 16 2 +l 15 19 +l 15 21 +l 3 1 +l 1 0 +m 13 17 +l 14 0 +m 14 19 +l 15 1 +m 6 6 +l 14 6 +m 0 0 +l 6 0 +m 11 0 +l 18 0 +m 3 1 +l 5 0 +m 14 1 +l 12 0 +m 14 2 +l 13 0 +m 16 2 +l 17 0 +m 14 27 +l 13 26 +l 13 25 +l 14 24 +l 15 24 +l 16 25 +l 16 26 +l 15 27 +l 14 27 +m 14 26 +l 14 25 +l 15 25 +l 15 26 +l 14 26 + +144 26 13 72 +m 0 0 +l 15 0 +l 16 3 +l 15 2 +l 12 0 +m 7 0 +l 4 1 +l 1 0 +m 4 2 +l 2 0 +m 5 2 +l 6 0 +m 10 0 +l 15 1 +m 4 14 +l 19 14 +l 18 10 +l 18 14 +m 5 14 +l 8 13 +l 11 14 +m 6 14 +l 7 12 +m 10 14 +l 8 12 +m 15 14 +l 18 13 +m 16 14 +l 18 12 +m 17 14 +l 18 11 +m 3 0 +l 7 14 +m 4 0 +l 8 14 +m 5 0 +l 9 14 +m 13 0 +l 16 3 +l 14 0 +m 14 11 +l 12 3 +l 12 7 +l 14 11 +m 7 7 +l 13 7 +m 13 9 +l 11 7 +l 12 5 +m 13 8 +l 10 7 +l 12 6 +m 12 3 +l 12 4 +m 14 18 +l 15 20 +l 15 21 +l 14 21 +l 13 22 +l 13 23 +l 14 24 +l 15 24 +l 16 23 +l 16 21 +l 15 19 +l 14 18 +l 10 17 +m 14 23 +l 14 22 +l 15 22 +l 15 23 +l 14 23 + +145 28 14 63 +m 11 0 +l 12 3 +l 13 7 +l 15 14 +l 13 14 +l 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 11 7 +l 9 0 +l 11 0 +m 14 14 +l 10 0 +m 4 13 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 14 5 +l 18 6 +l 21 7 +l 24 9 +l 25 11 +l 24 13 +l 22 14 +l 19 14 +l 16 13 +l 14 10 +m 19 14 +l 17 12 +l 16 10 +l 15 7 +l 15 4 +l 16 1 +l 17 0 +l 19 0 +l 22 1 +l 24 3 +m 13 7 +l 13 5 +l 14 2 +l 15 1 +l 17 0 + +146 32 16 57 +m 17 21 +l 11 0 +m 18 21 +l 12 0 +m 19 21 +l 13 0 +m 23 15 +l 21 7 +l 21 11 +l 23 15 +m 14 21 +l 29 21 +l 28 15 +l 28 21 +m 16 11 +l 22 11 +m 8 0 +l 23 0 +l 25 5 +l 23 2 +l 20 0 +m 1 0 +l 3 1 +l 15 21 +l 18 20 +l 21 21 +m 16 21 +l 17 19 +m 20 21 +l 18 19 +m 25 21 +l 28 20 +m 26 21 +l 28 19 +m 27 21 +l 28 18 +m 22 13 +l 20 11 +l 21 9 +m 22 12 +l 19 11 +l 21 10 +m 15 0 +l 12 1 +l 9 0 +m 12 2 +l 10 0 +m 13 2 +l 14 0 +m 18 0 +l 23 1 +m 3 1 +l 5 0 +m 0 0 +l 6 0 +m 6 6 +l 13 6 + +147 19 9 46 +m 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 4 +l 14 7 +l 14 9 +l 13 12 +l 12 13 +l 9 14 +l 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 5 0 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 11 2 +l 12 4 +l 13 7 +l 13 10 +l 12 12 +m 8 0 +l 10 2 +l 11 4 +l 12 7 +l 12 10 +l 11 13 +l 9 14 +m 6 20 +l 8 23 +l 10 20 +m 3 17 +l 8 22 +l 13 17 + +148 19 9 68 +m 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 4 +l 14 7 +l 14 9 +l 13 12 +l 12 13 +l 9 14 +l 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 5 0 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 11 2 +l 12 4 +l 13 7 +l 13 10 +l 12 12 +m 8 0 +l 10 2 +l 11 4 +l 12 7 +l 12 10 +l 11 13 +l 9 14 +m 2 20 +l 1 19 +l 1 18 +l 2 17 +l 3 17 +l 4 18 +l 4 19 +l 3 20 +l 2 20 +m 2 19 +l 2 18 +l 3 18 +l 3 19 +l 2 19 +m 11 20 +l 10 19 +l 10 18 +l 11 17 +l 12 17 +l 13 18 +l 13 19 +l 12 20 +l 11 20 +m 11 19 +l 11 18 +l 12 18 +l 12 19 +l 11 19 + +149 19 9 58 +m 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 4 +l 14 7 +l 14 9 +l 13 12 +l 12 13 +l 9 14 +l 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 5 0 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 11 2 +l 12 4 +l 13 7 +l 13 10 +l 12 12 +m 8 0 +l 10 2 +l 11 4 +l 12 7 +l 12 10 +l 11 13 +l 9 14 +m 4 18 +l 3 20 +l 3 21 +l 4 21 +l 5 22 +l 5 23 +l 4 24 +l 3 24 +l 2 23 +l 2 21 +l 3 19 +l 4 18 +l 8 17 +m 4 23 +l 4 22 +l 3 22 +l 3 23 +l 4 23 + +150 27 13 41 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 6 +l 15 3 +l 16 1 +l 17 0 +l 19 0 +l 21 2 +l 22 4 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +m 16 3 +l 17 7 +l 19 14 +l 17 14 +l 15 6 +m 18 14 +l 16 6 +l 16 1 +m 9 20 +l 11 23 +l 13 20 +m 6 17 +l 11 22 +l 16 17 + +151 27 13 53 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 6 +l 15 3 +l 16 1 +l 17 0 +l 19 0 +l 21 2 +l 22 4 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +m 16 3 +l 17 7 +l 19 14 +l 17 14 +l 15 6 +m 18 14 +l 16 6 +l 16 1 +m 9 18 +l 8 20 +l 8 21 +l 9 21 +l 10 22 +l 10 23 +l 9 24 +l 8 24 +l 7 23 +l 7 21 +l 8 19 +l 9 18 +l 13 17 +m 9 23 +l 9 22 +l 8 22 +l 8 23 +l 9 23 + +152 24 12 70 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 7 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +m 8 -7 +l 11 -6 +l 13 -4 +l 15 0 +l 19 14 +l 17 14 +l 13 0 +l 12 -3 +l 10 -6 +l 8 -7 +l 5 -7 +l 3 -6 +l 2 -5 +l 2 -3 +l 4 -3 +l 4 -5 +l 3 -5 +l 3 -4 +m 18 14 +l 14 0 +l 12 -4 +m 7 20 +l 6 19 +l 6 18 +l 7 17 +l 8 17 +l 9 18 +l 9 19 +l 8 20 +l 7 20 +m 7 19 +l 7 18 +l 8 18 +l 8 19 +l 7 19 +m 16 20 +l 15 19 +l 15 18 +l 16 17 +l 17 17 +l 18 18 +l 18 19 +l 17 20 +l 16 20 +m 16 19 +l 16 18 +l 17 18 +l 17 19 +l 16 19 + +153 21 10 78 +m 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 7 0 +l 10 1 +l 12 3 +l 14 6 +l 15 9 +l 16 13 +l 16 16 +l 15 19 +l 14 20 +l 12 21 +l 9 21 +l 7 20 +l 5 17 +l 4 15 +l 3 12 +l 2 8 +l 2 3 +l 3 1 +l 4 0 +m 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 4 +l 2 2 +m 11 3 +l 13 6 +l 14 9 +l 15 13 +l 15 17 +l 14 19 +m 7 0 +l 9 1 +l 11 4 +l 12 6 +l 13 9 +l 14 13 +l 14 18 +l 13 20 +l 12 21 +m 13 27 +l 12 26 +l 12 25 +l 13 24 +l 14 24 +l 15 25 +l 15 26 +l 14 27 +l 13 27 +m 13 26 +l 13 25 +l 14 25 +l 14 26 +l 13 26 +m 5 27 +l 4 26 +l 4 25 +l 5 24 +l 6 24 +l 7 25 +l 7 26 +l 6 27 +l 5 27 +m 5 26 +l 5 25 +l 6 25 +l 6 26 +l 5 26 + +154 26 13 63 +m 4 21 +l 1 10 +l 0 6 +l 0 3 +l 1 1 +l 4 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 18 20 +l 16 21 +m 5 21 +l 2 10 +l 1 6 +l 1 2 +l 2 1 +m 6 21 +l 3 10 +l 2 6 +l 2 2 +l 4 0 +m 1 21 +l 9 21 +m 15 21 +l 21 21 +m 2 21 +l 5 20 +l 8 21 +m 3 21 +l 4 19 +m 7 21 +l 5 19 +m 20 21 +l 18 20 +m 7 27 +l 6 26 +l 6 25 +l 7 24 +l 8 24 +l 9 25 +l 9 26 +l 8 27 +l 7 27 +m 7 26 +l 7 25 +l 8 25 +l 8 26 +l 7 26 +m 16 27 +l 15 26 +l 15 25 +l 16 24 +l 17 24 +l 18 25 +l 18 26 +l 17 27 +l 16 27 +m 16 26 +l 16 25 +l 17 25 +l 17 26 +l 16 26 + +155 19 9 45 +m 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 4 +l 14 7 +l 14 9 +l 13 12 +l 12 13 +l 9 14 +l 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 5 0 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 11 2 +l 12 4 +l 13 7 +l 13 10 +l 12 12 +m 8 0 +l 10 2 +l 11 4 +l 12 7 +l 12 10 +l 11 13 +l 9 14 +m 13 15 +l 14 15 +l 1 -1 +l 0 -1 +l 13 15 + +156 26 13 57 +m 13 20 +l 11 19 +l 10 18 +l 8 14 +l 6 7 +l 5 2 +l 8 0 +m 10 0 +l 15 1 +l 16 2 +l 16 3 +l 13 3 +l 13 2 +l 12 1 +l 9 0 +m 5 0 +l 9 14 +l 11 18 +l 12 19 +l 14 20 +l 16 20 +l 17 19 +l 17 18 +l 19 19 +l 18 20 +l 16 21 +l 14 21 +l 10 19 +l 9 18 +l 7 14 +l 5 7 +l 4 3 +l 3 4 +l 2 4 +l 1 3 +l 1 2 +l 3 0 +l 11 0 +m 13 1 +l 14 2 +l 15 2 +m 4 10 +l 5 11 +l 13 11 +l 11 10 +l 6 10 +l 5 9 +l 4 9 +l 4 10 +m 17 20 +l 18 19 +m 2 2 +l 3 1 +m 3 3 +l 4 2 +m 2 3 +l 4 1 + +157 23 11 55 +m 11 21 +l 8 20 +l 6 18 +l 4 15 +l 3 12 +l 2 8 +l 2 5 +l 3 2 +l 4 1 +l 6 0 +l 9 0 +l 12 1 +l 14 3 +l 16 6 +l 17 9 +l 18 13 +l 18 16 +l 17 19 +l 16 20 +l 14 21 +l 11 21 +l 9 20 +l 7 17 +l 6 15 +l 5 12 +l 4 8 +l 4 3 +l 5 1 +l 6 0 +m 7 18 +l 5 15 +l 4 12 +l 3 8 +l 3 4 +l 4 2 +m 13 3 +l 15 6 +l 16 9 +l 17 13 +l 17 17 +l 16 19 +m 9 0 +l 11 1 +l 13 4 +l 14 6 +l 15 9 +l 16 13 +l 16 18 +l 15 20 +l 14 21 +m 19 22 +l 20 22 +l 1 -1 +l 0 -1 +l 19 22 + +158 32 16 61 +m 8 24 +l 20 24 +l 23 23 +l 24 21 +l 24 19 +l 23 16 +l 21 14 +l 17 13 +l 9 13 +m 22 23 +l 23 21 +l 23 19 +l 22 16 +l 20 14 +m 20 24 +l 21 23 +l 22 21 +l 22 19 +l 21 16 +l 19 14 +l 17 13 +m 9 24 +l 12 23 +l 15 24 +m 10 24 +l 11 22 +m 14 24 +l 12 22 +m 13 24 +l 6 0 +m 12 24 +l 5 0 +m 11 24 +l 4 0 +m 1 0 +l 9 0 +m 8 0 +l 5 1 +l 2 0 +m 5 2 +l 3 0 +m 6 2 +l 7 0 +m 23 3 +l 24 7 +l 27 17 +l 25 17 +l 23 10 +l 22 6 +l 22 3 +l 23 1 +l 24 0 +l 26 0 +l 28 2 +l 29 4 +m 26 17 +l 24 10 +l 23 6 +l 23 1 +m 19 10 +l 29 10 + +159 27 13 52 +m 6 -4 +l 8 -3 +l 9 -2 +l 11 2 +l 15 16 +l 17 20 +l 18 21 +l 20 22 +m 14 16 +l 10 2 +l 8 -2 +l 7 -3 +l 5 -4 +l 3 -4 +l 2 -3 +l 2 -2 +l 0 -3 +l 1 -4 +l 3 -5 +l 5 -5 +l 9 -3 +l 10 -2 +l 12 2 +l 16 16 +l 18 20 +l 19 21 +l 21 22 +l 23 22 +l 24 21 +l 24 20 +l 26 21 +l 25 22 +l 23 23 +l 21 23 +l 17 21 +l 16 20 +l 14 16 +l 10 2 +m 2 -4 +l 1 -3 +m 12 2 +l 16 16 +m 24 22 +l 25 21 +m 17 9 +l 16 8 +l 8 8 +l 10 9 +l 15 9 +l 16 10 +l 17 10 +l 17 9 + +160 23 11 61 +m 12 3 +l 13 7 +l 15 14 +l 13 14 +l 11 7 +l 11 3 +l 12 1 +l 13 0 +l 15 0 +l 17 2 +l 18 4 +m 14 14 +l 12 7 +l 12 1 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 9 2 +l 10 4 +l 11 7 +m 4 13 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 4 0 +m 10 18 +l 11 20 +l 11 21 +l 10 21 +l 9 22 +l 9 23 +l 10 24 +l 11 24 +l 12 23 +l 12 21 +l 11 19 +l 10 18 +l 6 17 +m 10 23 +l 10 22 +l 11 22 +l 11 23 +l 10 23 + +161 16 8 38 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +l 6 0 +l 8 0 +l 10 2 +l 11 4 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +m 8 18 +l 9 20 +l 9 21 +l 8 21 +l 7 22 +l 7 23 +l 8 24 +l 9 24 +l 10 23 +l 10 21 +l 9 19 +l 8 18 +l 4 17 +m 8 23 +l 8 22 +l 9 22 +l 9 23 +l 8 23 + +162 19 9 58 +m 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 4 +l 14 7 +l 14 9 +l 13 12 +l 12 13 +l 9 14 +l 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 5 0 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 11 2 +l 12 4 +l 13 7 +l 13 10 +l 12 12 +m 8 0 +l 10 2 +l 11 4 +l 12 7 +l 12 10 +l 11 13 +l 9 14 +m 9 18 +l 10 20 +l 10 21 +l 9 21 +l 8 22 +l 8 23 +l 9 24 +l 10 24 +l 11 23 +l 11 21 +l 10 19 +l 9 18 +l 5 17 +m 9 23 +l 9 22 +l 10 22 +l 10 23 +l 9 23 + +163 27 13 53 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 6 +l 15 3 +l 16 1 +l 17 0 +l 19 0 +l 21 2 +l 22 4 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +m 16 3 +l 17 7 +l 19 14 +l 17 14 +l 15 6 +m 18 14 +l 16 6 +l 16 1 +m 13 18 +l 14 20 +l 14 21 +l 13 21 +l 12 22 +l 12 23 +l 13 24 +l 14 24 +l 15 23 +l 15 21 +l 14 19 +l 13 18 +l 9 17 +m 13 23 +l 13 22 +l 14 22 +l 14 23 +l 13 23 + +164 27 13 50 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 0 +l 3 0 +l 5 7 +l 6 11 +m 6 13 +l 6 8 +l 4 0 +m 7 8 +l 9 11 +l 11 13 +l 13 14 +l 15 14 +l 17 13 +l 18 11 +l 18 8 +l 16 3 +m 17 13 +l 17 9 +l 16 5 +l 16 1 +l 17 0 +l 19 0 +l 21 2 +l 22 4 +m 17 11 +l 15 6 +l 15 3 +l 16 1 +m 5 17 +l 6 20 +l 8 21 +l 10 21 +l 14 19 +l 16 19 +l 18 20 +l 19 22 +l 18 19 +l 16 18 +l 14 18 +l 10 20 +l 8 20 +l 6 19 +l 5 17 + +165 30 15 46 +m 6 21 +l 11 21 +l 17 3 +l 16 0 +l 9 21 +l 3 1 +l 1 0 +m 10 21 +l 16 3 +m 20 21 +l 22 20 +l 17 3 +m 19 21 +l 25 21 +m 0 0 +l 6 0 +m 7 21 +l 10 20 +m 8 21 +l 10 19 +m 24 21 +l 22 20 +m 3 1 +l 5 0 +m 6 24 +l 6 26 +l 7 29 +l 9 30 +l 11 30 +l 13 29 +l 17 26 +l 19 25 +l 21 25 +l 23 26 +l 24 28 +l 24 30 +m 6 26 +l 7 28 +l 9 29 +l 11 29 +l 13 28 +l 17 25 +l 19 24 +l 21 24 +l 23 25 +l 24 28 + +166 23 11 48 +m 12 10 +l 13 14 +l 15 21 +l 13 21 +l 11 14 +l 11 10 +l 12 8 +l 13 7 +l 15 7 +l 17 9 +l 18 11 +m 14 21 +l 12 14 +l 12 8 +m 11 14 +l 11 17 +l 10 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 14 +l 0 12 +l 1 9 +l 2 8 +l 4 7 +l 6 7 +l 8 8 +l 9 9 +l 10 11 +l 11 14 +m 4 20 +l 2 17 +l 1 14 +l 1 11 +l 2 9 +m 6 21 +l 4 19 +l 3 17 +l 2 14 +l 2 11 +l 3 8 +l 4 7 +m 0 0 +l 19 0 +l 19 1 +l 0 1 +l 0 0 + +167 19 9 45 +m 0 14 +l 1 11 +l 2 10 +l 5 9 +l 8 9 +l 11 10 +l 13 13 +l 14 14 +l 14 16 +l 13 19 +l 12 20 +l 9 21 +l 6 21 +l 3 20 +l 1 17 +l 0 14 +m 3 19 +l 2 17 +l 1 14 +l 1 13 +l 2 11 +m 11 11 +l 12 13 +l 13 14 +l 13 17 +l 12 19 +m 6 21 +l 4 19 +l 3 17 +l 2 14 +l 2 13 +l 3 10 +l 5 9 +m 8 9 +l 10 11 +l 11 13 +l 12 14 +l 12 17 +l 11 20 +l 9 21 +m 0 0 +l 14 0 +l 14 1 +l 0 1 +l 0 0 + +168 18 9 53 +m 12 5 +l 12 4 +l 11 4 +l 11 6 +l 13 6 +l 13 4 +l 12 2 +l 11 1 +l 8 0 +l 4 0 +l 1 1 +l 0 3 +l 0 5 +l 1 7 +l 2 8 +l 4 9 +l 8 10 +l 10 11 +l 10 13 +l 8 14 +l 7 14 +m 6 0 +l 1 1 +m 2 1 +l 1 3 +l 1 5 +l 2 7 +l 3 8 +l 5 9 +m 4 0 +l 3 1 +l 2 3 +l 2 5 +l 3 7 +l 4 8 +l 8 10 +l 9 11 +l 9 13 +l 8 14 +m 11 18 +l 12 19 +l 12 20 +l 11 21 +l 10 21 +l 9 20 +l 9 19 +l 10 18 +l 11 18 +m 11 19 +l 11 20 +l 10 20 +l 10 19 +l 11 19 + +169 23 11 7 +m 0 0 +l 0 7 +l 13 7 +l 13 4 +l 3 4 +l 3 0 +l 0 0 + +170 23 11 7 +m 13 0 +l 13 7 +l 0 7 +l 0 4 +l 10 4 +l 10 0 +l 13 0 + +171 32 16 63 +m 12 21 +l 9 10 +l 7 10 +l 9 17 +l 7 16 +l 4 15 +l 6 16 +l 9 18 +l 12 21 +l 10 17 +l 8 10 +l 7 7 +m 4 0 +l 24 21 +l 25 21 +l 5 0 +l 4 0 +l 0 -4 +l 1 -4 +l 5 0 +m 18 0 +l 20 4 +l 25 6 +l 28 8 +l 29 10 +l 29 11 +l 27 13 +l 25 14 +l 22 14 +l 20 13 +l 19 12 +l 19 10 +l 22 10 +l 22 12 +l 20 12 +l 20 11 +m 19 2 +l 20 3 +l 21 3 +l 24 0 +l 26 0 +l 28 1 +l 29 2 +l 29 4 +m 29 2 +l 27 1 +l 24 1 +l 21 3 +l 24 2 +l 28 2 +l 29 3 +m 25 14 +l 28 11 +l 28 9 +l 25 6 +m 7 10 +l 6 7 +l 8 7 +l 9 10 +m 24 21 +l 28 25 +l 29 25 +l 25 21 + +172 32 16 32 +m 12 21 +l 9 10 +l 8 7 +l 6 7 +l 7 10 +l 9 17 +l 7 16 +l 4 15 +l 6 16 +l 9 18 +l 12 21 +l 10 17 +l 8 10 +l 7 7 +m 4 0 +l 24 21 +l 28 25 +l 29 25 +l 25 21 +l 5 0 +l 4 0 +l 0 -4 +l 1 -4 +l 5 0 +m 27 12 +l 23 0 +l 25 0 +l 29 14 +l 18 4 +l 29 4 +m 28 13 +l 24 0 + +173 13 6 25 +m 7 0 +l 6 0 +l 5 1 +l 3 14 +l 6 1 +l 7 1 +l 7 2 +l 3 14 +l 8 2 +l 8 1 +l 7 0 +m 1 18 +l 0 19 +l 0 20 +l 1 21 +l 2 21 +l 3 20 +l 3 19 +l 2 18 +l 1 18 +m 1 19 +l 1 20 +l 2 20 +l 2 19 +l 1 19 + +174 23 11 6 +m 9 6 +l 0 12 +l 9 18 +m 19 6 +l 10 12 +l 19 18 + +175 23 11 6 +m 10 6 +l 19 12 +l 10 18 +m 0 6 +l 9 12 +l 0 18 + +176 14 7 128 +m 4 21 +l 6 21 +l 6 19 +l 4 19 +l 4 21 +m 5 21 +l 5 19 +m 4 15 +l 6 15 +l 6 13 +l 4 13 +l 4 15 +m 5 15 +l 5 13 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 4 3 +l 6 3 +l 6 1 +l 4 1 +l 4 3 +m 5 3 +l 5 1 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 8 18 +l 10 18 +l 10 16 +l 8 16 +l 8 18 +m 9 18 +l 9 16 +m 8 12 +l 10 12 +l 10 10 +l 8 10 +l 8 12 +m 9 12 +l 9 10 +m 8 6 +l 10 6 +l 10 4 +l 8 4 +l 8 6 +m 9 6 +l 9 4 +m 8 0 +l 10 0 +l 10 -2 +l 8 -2 +l 8 0 +m 9 0 +l 9 -2 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 12 15 +l 14 15 +l 14 13 +l 12 13 +l 12 15 +m 13 15 +l 13 13 +m 12 9 +l 14 9 +l 14 7 +l 12 7 +l 12 9 +m 13 9 +l 13 7 +m 12 3 +l 14 3 +l 14 1 +l 12 1 +l 12 3 +m 13 3 +l 13 1 +m 3 -3 +l 3 -5 +l 5 -5 +l 5 -3 +l 3 -3 +m 4 -3 +l 4 -5 +m 12 -3 +l 12 -5 +l 14 -5 +l 14 -3 +l 12 -3 +m 14 -3 +l 14 -3 +m 13 -3 +l 13 -5 + +177 16 8 254 +m 0 18 +l 2 18 +l 2 16 +l 0 16 +l 0 18 +m 1 18 +l 1 16 +m 0 12 +l 2 12 +l 2 10 +l 0 10 +l 0 12 +m 1 12 +l 1 10 +m 0 6 +l 2 6 +l 2 4 +l 0 4 +l 0 6 +m 1 6 +l 1 4 +m 0 0 +l 2 0 +l 2 -2 +l 0 -2 +l 0 0 +m 1 0 +l 1 -2 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 2 15 +l 4 15 +l 4 13 +l 2 13 +l 2 15 +m 3 15 +l 3 13 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 2 3 +l 4 3 +l 4 1 +l 2 1 +l 2 3 +m 3 3 +l 3 1 +m 4 18 +l 6 18 +l 6 16 +l 4 16 +l 4 18 +m 5 18 +l 5 16 +m 4 12 +l 6 12 +l 6 10 +l 4 10 +l 4 12 +m 5 12 +l 5 10 +m 4 6 +l 6 6 +l 6 4 +l 4 4 +l 4 6 +m 5 6 +l 5 4 +m 4 0 +l 6 0 +l 6 -2 +l 4 -2 +l 4 0 +m 5 0 +l 5 -2 +m 6 21 +l 8 21 +l 8 19 +l 6 19 +l 6 21 +m 7 21 +l 7 19 +m 6 15 +l 8 15 +l 8 13 +l 6 13 +l 6 15 +m 7 15 +l 7 13 +m 8 7 +l 6 7 +l 6 9 +l 8 9 +l 8 7 +m 7 9 +l 7 7 +m 8 1 +l 6 1 +l 6 3 +l 8 3 +l 8 1 +m 7 3 +l 7 1 +m 10 18 +l 10 16 +l 8 16 +l 8 18 +l 10 18 +m 9 18 +l 9 16 +m 10 12 +l 10 10 +l 8 10 +l 8 12 +l 10 12 +m 9 12 +l 9 10 +m 10 6 +l 10 4 +l 8 4 +l 8 6 +l 10 6 +m 9 6 +l 9 4 +m 10 0 +l 10 -2 +l 8 -2 +l 8 0 +l 10 0 +m 9 0 +l 9 -2 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 10 15 +l 12 15 +l 12 13 +l 10 13 +l 10 15 +m 11 15 +l 11 13 +m 10 9 +l 12 9 +l 12 7 +l 10 7 +l 10 9 +m 11 9 +l 11 7 +m 10 3 +l 12 3 +l 12 1 +l 10 1 +l 10 3 +m 11 3 +l 11 1 +m 12 18 +l 14 18 +l 14 16 +l 12 16 +l 12 18 +m 13 18 +l 13 16 +m 12 12 +l 14 12 +l 14 10 +l 12 10 +l 12 12 +m 13 12 +l 13 10 +m 12 6 +l 14 6 +l 14 4 +l 12 4 +l 12 6 +m 13 6 +l 13 4 +m 12 0 +l 14 0 +l 14 -2 +l 12 -2 +l 12 0 +m 13 0 +l 13 -2 +m 14 21 +l 16 21 +l 16 19 +l 14 19 +l 14 21 +m 15 21 +l 15 19 +m 14 15 +l 16 15 +l 16 13 +l 14 13 +l 14 15 +m 15 15 +l 15 13 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 14 3 +l 16 3 +l 16 1 +l 14 1 +l 14 3 +m 15 3 +l 15 1 +m 2 -3 +l 2 -5 +l 4 -5 +l 4 -3 +l 2 -3 +m 3 -3 +l 3 -5 +m 7 -3 +l 6 -3 +l 6 -5 +l 8 -5 +l 8 -3 +l 7 -3 +l 7 -5 +m 11 -3 +l 10 -3 +l 10 -5 +l 12 -5 +l 12 -3 +l 11 -3 +l 11 -5 +m 15 -3 +l 14 -3 +l 14 -5 +l 16 -5 +l 16 -3 +l 15 -3 +l 15 -5 +m 13 -3 +l 13 -3 + +178 24 12 276 +m 0 21 +l 2 21 +l 2 19 +l 0 19 +l 0 21 +m 1 21 +l 1 19 +m 2 21 +l 4 21 +l 4 19 +l 2 19 +l 2 21 +m 3 21 +l 3 19 +m 10 21 +l 12 21 +l 12 19 +l 10 19 +l 10 21 +m 11 21 +l 11 19 +m 12 21 +l 14 21 +l 14 19 +l 12 19 +l 12 21 +m 13 21 +l 13 19 +m 20 21 +l 22 21 +l 22 19 +l 20 19 +l 20 21 +m 21 21 +l 21 19 +m 22 21 +l 24 21 +l 24 19 +l 22 19 +l 22 21 +m 23 21 +l 23 19 +m 4 17 +l 6 17 +l 6 15 +l 4 15 +l 4 17 +m 5 17 +l 5 15 +m 6 17 +l 8 17 +l 8 15 +l 6 15 +l 6 17 +m 7 17 +l 7 15 +m 8 17 +l 10 17 +l 10 15 +l 8 15 +l 8 17 +m 9 17 +l 9 15 +m 0 13 +l 2 13 +l 2 11 +l 0 11 +l 0 13 +m 1 13 +l 1 11 +m 2 13 +l 4 13 +l 4 11 +l 2 11 +l 2 13 +m 3 13 +l 3 11 +m 10 13 +l 12 13 +l 12 11 +l 10 11 +l 10 13 +m 11 13 +l 11 11 +m 12 13 +l 14 13 +l 14 11 +l 12 11 +l 12 13 +m 13 13 +l 13 11 +m 20 13 +l 22 13 +l 22 11 +l 20 11 +l 20 13 +m 21 13 +l 21 11 +m 22 13 +l 24 13 +l 24 11 +l 22 11 +l 22 13 +m 23 13 +l 23 11 +m 14 9 +l 16 9 +l 16 7 +l 14 7 +l 14 9 +m 15 9 +l 15 7 +m 16 9 +l 18 9 +l 18 7 +l 16 7 +l 16 9 +m 17 9 +l 17 7 +m 18 9 +l 20 9 +l 20 7 +l 18 7 +l 18 9 +m 19 9 +l 19 7 +m 0 5 +l 2 5 +l 2 3 +l 0 3 +l 0 5 +m 1 5 +l 1 3 +m 2 5 +l 4 5 +l 4 3 +l 2 3 +l 2 5 +m 3 5 +l 3 3 +m 10 5 +l 12 5 +l 12 3 +l 10 3 +l 10 5 +m 11 5 +l 11 3 +m 12 5 +l 14 5 +l 14 3 +l 12 3 +l 12 5 +m 13 5 +l 13 3 +m 20 5 +l 22 5 +l 22 3 +l 20 3 +l 20 5 +m 21 5 +l 21 3 +m 22 5 +l 24 5 +l 24 3 +l 22 3 +l 22 5 +m 23 5 +l 23 3 +m 4 1 +l 10 1 +l 10 -1 +l 4 -1 +l 4 1 +m 5 1 +l 5 -1 +m 7 1 +l 7 -1 +m 9 1 +l 9 -1 +m 0 -3 +l 2 -3 +l 2 -5 +l 0 -5 +l 0 -3 +m 1 -3 +l 1 -5 +m 2 -3 +l 4 -3 +l 4 -5 +l 2 -5 +l 2 -3 +m 3 -3 +l 3 -5 +m 10 -3 +l 14 -3 +l 14 -5 +l 10 -5 +l 10 -3 +m 11 -3 +l 11 -5 +m 13 -3 +l 13 -5 +m 20 -3 +l 24 -3 +l 24 -5 +l 20 -5 +l 20 -3 +m 21 -3 +l 21 -5 +m 23 -3 +l 23 -5 +m 12 -3 +l 12 -5 +m 22 -3 +l 22 -5 +m 8 1 +l 8 -1 +m 6 1 +l 6 -1 +m 18 17 +l 20 17 +l 20 15 +l 18 15 +l 18 17 +m 19 17 +l 19 15 +m 20 17 +l 22 17 +l 22 15 +l 20 15 +l 20 17 +m 21 17 +l 21 15 +m 22 17 +l 24 17 +l 24 15 +l 22 15 +l 22 17 +m 23 17 +l 23 15 +m 0 9 +l 2 9 +l 2 7 +l 0 7 +l 0 9 +m 1 9 +l 1 7 +m 2 9 +l 4 9 +l 4 7 +l 2 7 +l 2 9 +m 3 9 +l 3 7 +m 4 9 +l 6 9 +l 6 7 +l 4 7 +l 4 9 +m 5 9 +l 5 7 +m 18 1 +l 24 1 +l 24 -1 +l 18 -1 +l 18 1 +m 19 1 +l 19 -1 +m 21 1 +l 21 -1 +m 23 1 +l 23 -1 +m 22 1 +l 22 -1 +m 20 1 +l 20 -1 + +179 4 2 4 +m 0 21 +l 0 -7 +m 4 1 +l 4 1 + +180 13 6 4 +m 9 -7 +l 9 21 +m 0 5 +l 9 5 + +181 13 6 6 +m 9 21 +l 9 -7 +m 0 9 +l 9 9 +m 0 5 +l 9 5 + +182 21 10 6 +m 9 -7 +l 9 21 +m 0 5 +l 9 5 +m 17 -7 +l 17 21 + +183 21 10 5 +m 0 5 +l 17 5 +l 17 -7 +m 9 5 +l 9 -7 + +184 13 6 5 +m 0 9 +l 9 9 +l 9 -7 +m 0 5 +l 9 5 + +185 21 10 8 +m 0 5 +l 9 5 +l 9 -7 +m 17 -7 +l 17 21 +m 0 9 +l 9 9 +l 9 21 + +186 21 10 4 +m 9 -7 +l 9 21 +m 17 -7 +l 17 21 + +187 21 10 6 +m 0 9 +l 17 9 +l 17 -7 +m 0 5 +l 9 5 +l 9 -7 + +188 21 10 6 +m 0 5 +l 17 5 +l 17 21 +m 0 9 +l 9 9 +l 9 21 + +189 21 10 5 +m 0 9 +l 17 9 +l 17 21 +m 9 9 +l 9 21 + +190 13 6 5 +m 0 5 +l 9 5 +l 9 21 +m 0 9 +l 9 9 + +191 0 0 3 +m 0 5 +l 9 5 +l 9 -7 + +192 9 4 3 +m 9 9 +l 0 9 +l 0 21 + +193 18 9 5 +m 0 9 +l 9 9 +l 9 21 +m 18 9 +l 9 9 + +194 18 9 5 +m 0 5 +l 9 5 +l 9 -7 +m 18 5 +l 9 5 + +195 9 4 4 +m 0 -7 +l 0 21 +m 9 5 +l 0 5 + +196 18 9 2 +m 0 5 +l 18 5 + +197 18 9 4 +m 9 -7 +l 9 21 +m 0 5 +l 18 5 + +198 9 4 6 +m 0 21 +l 0 -7 +m 9 9 +l 0 9 +m 9 5 +l 0 5 + +199 17 8 6 +m 8 -7 +l 8 21 +m 17 5 +l 8 5 +m 0 -7 +l 0 21 + +200 17 8 6 +m 17 5 +l 0 5 +l 0 21 +m 17 9 +l 8 9 +l 8 21 + +201 17 8 6 +m 17 9 +l 0 9 +l 0 -7 +m 17 5 +l 8 5 +l 8 -7 + +202 26 13 8 +m 0 5 +l 26 5 +m 0 9 +l 9 9 +l 9 21 +m 17 21 +l 17 9 +l 26 9 + +203 26 13 8 +m 0 9 +l 26 9 +m 0 5 +l 9 5 +l 9 -7 +m 17 -7 +l 17 5 +l 26 5 + +204 17 8 8 +m 17 5 +l 8 5 +l 8 -7 +m 0 -7 +l 0 21 +m 17 9 +l 8 9 +l 8 21 + +205 18 9 4 +m 0 5 +l 18 5 +m 0 9 +l 18 9 + +206 26 13 12 +m 0 5 +l 9 5 +l 9 -7 +m 0 9 +l 9 9 +l 9 21 +m 17 21 +l 17 9 +l 26 9 +m 17 -7 +l 17 5 +l 26 5 + +207 18 9 7 +m 0 9 +l 9 9 +l 9 21 +m 18 9 +l 9 9 +m 0 5 +l 18 5 + +208 17 8 6 +m 0 9 +l 17 9 +m 7 21 +l 7 9 +m 15 21 +l 15 9 + +209 18 9 7 +m 0 5 +l 9 5 +l 9 -7 +m 18 5 +l 9 5 +m 0 9 +l 18 9 + +210 17 8 6 +m 0 5 +l 17 5 +m 7 -7 +l 7 5 +m 15 -7 +l 15 5 + +211 17 8 5 +m 17 9 +l 0 9 +l 0 21 +m 8 9 +l 8 21 + +212 9 4 5 +m 9 5 +l 0 5 +l 0 21 +m 9 9 +l 0 9 + +213 9 4 5 +m 9 9 +l 0 9 +l 0 -7 +m 9 5 +l 0 5 + +214 17 8 5 +m 17 5 +l 0 5 +l 0 -7 +m 8 5 +l 8 -7 + +215 26 13 6 +m 9 -7 +l 9 21 +m 0 5 +l 26 5 +m 17 -7 +l 17 21 + +216 18 9 6 +m 9 -7 +l 9 21 +m 0 5 +l 18 5 +m 0 9 +l 18 9 + +217 13 6 3 +m 0 9 +l 9 9 +l 9 21 + +218 9 4 3 +m 9 5 +l 0 5 +l 0 -7 + +219 16 8 37 +m 0 21 +l 16 21 +l 16 0 +l 0 0 +l 0 21 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 0 +l 5 21 +m 6 21 +l 6 0 +m 7 21 +l 7 0 +m 8 21 +l 8 0 +m 9 21 +l 9 0 +m 10 0 +l 10 21 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 14 21 +l 14 0 +m 15 21 +l 15 0 +m 0 10 +l 16 10 + +220 16 8 35 +m 16 0 +l 0 0 +l 0 10 +l 16 10 +l 16 0 +m 1 10 +l 1 0 +m 2 10 +l 2 0 +m 3 10 +l 3 0 +m 4 10 +l 4 0 +m 5 10 +l 5 0 +m 6 0 +l 6 10 +m 7 10 +l 7 0 +m 8 10 +l 8 0 +m 9 10 +l 9 0 +m 10 10 +l 10 0 +m 11 10 +l 11 0 +m 12 0 +l 12 10 +m 13 10 +l 13 0 +m 14 10 +l 14 0 +m 15 10 +l 15 0 + +221 7 3 17 +m 0 0 +l 0 21 +l 7 21 +l 7 0 +l 0 0 +m 1 21 +l 1 0 +m 2 21 +l 2 0 +m 3 21 +l 3 0 +m 4 21 +l 4 0 +m 5 0 +l 5 21 +m 6 21 +l 6 0 + +222 15 7 17 +m 8 0 +l 8 21 +l 15 21 +l 15 0 +l 8 0 +m 9 21 +l 9 0 +m 10 21 +l 10 0 +m 11 21 +l 11 0 +m 12 21 +l 12 0 +m 13 0 +l 13 21 +m 14 21 +l 14 0 + +223 16 8 35 +m 16 11 +l 0 11 +l 0 21 +l 16 21 +l 16 11 +m 1 21 +l 1 11 +m 2 21 +l 2 11 +m 3 21 +l 3 11 +m 4 21 +l 4 11 +m 5 21 +l 5 11 +m 6 11 +l 6 21 +m 7 21 +l 7 11 +m 8 21 +l 8 11 +m 9 21 +l 9 11 +m 10 21 +l 10 11 +m 11 21 +l 11 11 +m 12 11 +l 12 21 +m 13 21 +l 13 11 +m 14 21 +l 14 11 +m 15 21 +l 15 11 + +224 23 11 40 +m 5 0 +l 3 1 +l 2 4 +l 2 6 +l 3 9 +l 4 11 +l 6 13 +l 3 12 +l 1 9 +l 0 6 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 9 0 +l 11 1 +l 12 4 +l 17 13 +l 19 13 +l 13 2 +l 12 1 +l 9 0 +m 9 13 +l 11 12 +l 12 9 +l 17 0 +l 19 0 +l 13 11 +l 12 12 +l 9 13 +l 6 13 +m 3 11 +l 2 9 +l 1 6 +l 1 4 +l 2 2 +m 12 11 +l 18 0 +m 12 2 +l 18 13 + +225 24 12 48 +m 12 -3 +l 0 -3 +m 7 -3 +l 4 -2 +l 1 -3 +m 8 15 +l 4 -1 +l 2 -3 +m 10 15 +l 5 -1 +l 6 -3 +m 9 15 +l 4 -3 +m 5 15 +l 16 15 +l 17 14 +l 20 13 +l 21 11 +l 20 10 +l 17 9 +l 19 11 +l 18 13 +l 17 14 +m 6 15 +l 9 14 +l 12 15 +m 7 15 +l 8 13 +m 11 15 +l 9 13 +m 19 13 +l 20 11 +l 17 9 +l 19 8 +l 20 6 +l 19 3 +l 17 1 +l 6 1 +m 15 1 +l 17 3 +l 18 6 +l 18 7 +l 17 9 +l 8 9 +m 18 8 +l 19 6 +l 18 3 +l 16 1 + +226 25 12 28 +m 1 0 +l 9 0 +m 8 0 +l 5 1 +l 2 0 +m 5 2 +l 3 0 +l 7 14 +l 7 15 +l 22 15 +l 21 12 +l 19 12 +l 19 13 +l 7 13 +m 6 2 +l 7 0 +m 8 14 +l 4 0 +m 9 14 +l 5 0 +m 7 14 +l 20 14 +l 20 13 +l 21 12 +m 21 15 +l 21 13 +m 20 13 +l 19 12 + +227 32 16 36 +m 1 0 +l 9 0 +m 8 0 +l 5 1 +l 2 0 +m 5 2 +l 3 0 +l 7 14 +m 6 2 +l 7 0 +m 14 0 +l 22 0 +m 21 0 +l 18 1 +l 15 0 +m 18 2 +l 16 0 +m 21 14 +l 17 0 +l 19 2 +l 20 0 +m 8 14 +l 4 0 +m 9 14 +l 5 0 +m 22 14 +l 18 0 +m 23 14 +l 19 0 +m 0 15 +l 28 15 +l 27 13 +l 0 13 +l 0 15 +m 0 14 +l 27 14 + +228 15 7 7 +m 11 2 +l 11 0 +l 0 0 +l 8 11 +l 0 21 +l 11 21 +l 11 19 + +229 25 12 43 +m 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 4 +l 14 7 +l 14 8 +l 13 11 +l 12 12 +l 9 13 +l 6 13 +l 3 12 +l 1 9 +l 0 6 +l 0 5 +m 3 11 +l 2 9 +l 1 6 +l 1 4 +l 2 2 +m 11 2 +l 12 4 +l 13 7 +l 13 9 +l 12 11 +m 22 14 +l 9 14 +l 6 13 +l 4 11 +l 3 9 +l 2 6 +l 2 4 +l 3 1 +l 5 0 +m 8 0 +l 10 2 +l 11 4 +l 12 7 +l 12 9 +l 11 12 +l 9 13 + +230 26 13 47 +m 0 10 +l 1 12 +l 3 14 +l 5 14 +l 6 13 +l 7 11 +l 7 8 +l 5 3 +m 6 13 +l 6 9 +l 5 5 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 6 +l 15 3 +l 16 1 +l 17 0 +l 19 0 +l 21 2 +l 22 4 +m 6 11 +l 4 6 +l 4 3 +l 5 1 +l 5 -3 +l 3 -7 +l 5 -7 +l 7 -3 +l 7 0 +m 16 3 +l 17 7 +l 19 14 +l 17 14 +l 15 6 +m 18 14 +l 16 6 +l 16 1 +m 7 -4 +l 7 -4 +m 6 -4 +l 6 -4 +m 6 0 +l 6 -3 +l 4 -7 + +231 22 11 33 +m 10 11 +l 10 -3 +l 12 -3 +l 12 11 +l 11 13 +l 9 14 +l 4 14 +l 2 13 +l 0 11 +l 0 9 +l 2 9 +l 2 11 +l 4 12 +l 9 12 +l 10 11 +m 1 10 +l 1 11 +l 3 13 +l 9 13 +l 11 11 +l 11 -3 +m 3 12 +l 3 13 +m 10 13 +l 11 12 +m 12 9 +l 16 14 +l 18 14 +l 12 6 +m 17 14 +l 12 8 +m 17 13 +l 12 7 + +232 18 9 55 +m 0 7 +l 1 4 +l 2 3 +l 5 2 +l 8 2 +l 11 3 +l 13 6 +l 14 9 +l 14 10 +l 13 13 +l 12 14 +l 9 15 +l 6 15 +l 3 14 +l 1 11 +l 0 8 +l 0 7 +m 3 13 +l 2 11 +l 1 8 +l 1 6 +l 2 4 +m 11 4 +l 12 6 +l 13 9 +l 13 11 +l 12 13 +m 6 15 +l 4 13 +l 3 11 +l 2 8 +l 2 6 +l 3 3 +l 5 2 +m 8 2 +l 10 4 +l 11 6 +l 12 9 +l 12 11 +l 11 14 +l 9 15 +m 0 21 +l 0 20 +l 14 20 +l 14 21 +l 0 21 +m 7 15 +l 7 20 +m 7 2 +l 7 -3 +m 0 -3 +l 14 -3 +l 14 -4 +l 0 -4 +l 0 -3 + +233 20 10 54 +m 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 7 0 +l 10 1 +l 12 3 +l 14 6 +l 15 9 +l 16 13 +l 16 16 +l 15 19 +l 14 20 +l 12 21 +l 9 21 +l 7 20 +l 5 17 +l 4 15 +l 3 12 +l 2 8 +l 2 3 +l 3 1 +l 4 0 +m 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 4 +l 2 2 +m 11 3 +l 13 6 +l 14 9 +l 15 13 +l 15 17 +l 14 19 +m 7 0 +l 9 1 +l 11 4 +l 12 6 +l 13 9 +l 14 13 +l 14 18 +l 13 20 +l 12 21 +m 3 11 +l 14 11 +m 3 10 +l 13 10 + +234 19 9 51 +m 3 12 +l 4 15 +l 5 17 +l 7 20 +l 9 21 +l 6 20 +l 4 18 +l 2 15 +l 0 9 +l 3 7 +l 4 6 +l 4 1 +l 0 1 +l 0 0 +l 6 0 +l 6 6 +l 3 8 +l 2 9 +l 3 12 +m 11 21 +l 12 20 +l 13 18 +l 13 13 +l 12 9 +l 11 8 +l 8 6 +l 8 0 +l 14 0 +l 14 1 +l 10 1 +l 10 6 +l 11 7 +l 14 9 +l 15 13 +l 15 16 +l 14 19 +l 13 20 +l 11 21 +l 9 21 +m 6 19 +l 4 17 +l 3 15 +l 1 9 +l 5 6 +l 5 0 +m 9 0 +l 9 6 +l 13 9 +l 14 13 +l 14 17 +l 13 19 + +235 18 9 50 +m 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 4 +l 14 7 +l 14 8 +l 13 11 +l 12 12 +l 9 13 +l 6 13 +l 3 12 +l 1 9 +l 0 6 +l 0 5 +m 3 11 +l 2 9 +l 1 6 +l 1 4 +l 2 2 +m 11 2 +l 12 4 +l 13 7 +l 13 9 +l 12 11 +m 6 13 +l 4 11 +l 3 9 +l 2 6 +l 2 4 +l 3 1 +l 5 0 +m 8 0 +l 10 2 +l 11 4 +l 12 7 +l 12 9 +l 11 12 +l 9 13 +l 0 21 +l 14 21 +l 14 19 +l 13 19 +l 13 20 +l 3 20 +l 12 12 +m 11 12 +l 1 21 + +236 30 15 82 +m 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 4 +l 14 7 +l 14 8 +l 13 11 +l 12 12 +l 9 13 +l 6 13 +l 3 12 +l 1 9 +l 0 6 +l 0 5 +m 3 11 +l 2 9 +l 1 6 +l 1 4 +l 2 2 +m 11 2 +l 12 4 +l 13 7 +l 13 9 +l 12 11 +m 6 13 +l 4 11 +l 3 9 +l 2 6 +l 2 4 +l 3 1 +l 5 0 +m 8 0 +l 10 2 +l 11 4 +l 12 7 +l 12 9 +l 11 12 +l 9 13 +m 12 5 +l 13 2 +l 14 1 +l 17 0 +l 20 0 +l 23 1 +l 25 4 +l 26 7 +l 26 8 +l 25 11 +l 24 12 +l 21 13 +l 18 13 +l 15 12 +l 13 9 +l 12 6 +l 12 5 +m 15 11 +l 14 9 +l 13 6 +l 13 4 +l 14 2 +m 23 2 +l 24 4 +l 25 7 +l 25 9 +l 24 11 +m 18 13 +l 16 11 +l 15 9 +l 14 6 +l 14 4 +l 15 1 +l 17 0 +m 20 0 +l 22 2 +l 23 4 +l 24 7 +l 24 9 +l 23 12 +l 21 13 + +237 19 9 45 +m 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 11 1 +l 13 4 +l 14 7 +l 14 9 +l 13 12 +l 12 13 +l 9 14 +l 6 14 +l 4 12 +l 3 10 +l 2 7 +l 2 4 +l 3 1 +l 5 0 +m 3 12 +l 2 10 +l 1 7 +l 1 4 +l 2 2 +m 11 2 +l 12 4 +l 13 7 +l 13 10 +l 12 12 +m 8 0 +l 10 2 +l 11 4 +l 12 7 +l 12 10 +l 11 13 +l 9 14 +m 13 15 +l 14 15 +l 1 -1 +l 0 -1 +l 13 15 + +238 15 7 9 +m 8 11 +l 0 11 +l 0 19 +l 2 21 +l 11 21 +m 0 11 +l 0 2 +l 2 0 +l 11 0 + +239 24 12 35 +m 4 0 +l 1 11 +l 0 15 +l 0 18 +l 1 20 +l 4 21 +l 8 21 +l 11 20 +l 13 18 +l 14 15 +l 18 1 +l 16 0 +m 5 0 +l 2 11 +l 1 15 +l 1 19 +l 2 20 +m 6 0 +l 3 11 +l 2 15 +l 2 19 +l 4 21 +m 1 0 +l 9 0 +m 15 0 +l 21 0 +m 2 0 +l 5 1 +l 8 0 +m 3 0 +l 4 2 +m 7 0 +l 5 2 +m 20 0 +l 18 1 + +240 21 10 15 +m 0 10 +l 17 10 +l 17 9 +l 0 9 +l 0 10 +m 0 6 +l 17 6 +l 17 5 +l 0 5 +l 0 6 +m 0 14 +l 17 14 +l 17 13 +l 0 13 +l 0 14 + +241 21 10 15 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 +m 8 21 +l 8 4 +l 9 4 +l 9 21 +l 8 21 +m 0 13 +l 17 13 +l 17 12 +l 0 12 +l 0 13 + +242 21 10 14 +m 0 1 +l 17 1 +l 17 0 +l 0 0 +l 0 1 +m 1 21 +l 17 13 +l 17 12 +l 1 4 +l 0 4 +l 15 12 +l 15 13 +l 0 21 +l 1 21 + +243 21 10 14 +m 17 1 +l 0 1 +l 0 0 +l 17 0 +l 17 1 +m 16 21 +l 0 13 +l 0 12 +l 16 4 +l 17 4 +l 2 12 +l 2 13 +l 17 21 +l 16 21 + +244 21 10 29 +m 11 20 +l 9 19 +l 8 18 +l 6 14 +l 4 7 +l 3 2 +l 1 -7 +m 3 0 +l 7 14 +l 9 18 +l 10 19 +l 12 20 +l 14 20 +l 15 19 +l 15 18 +l 17 19 +l 16 20 +l 14 21 +l 12 21 +l 8 19 +l 7 18 +l 5 14 +l 3 7 +l 2 3 +l 0 -7 +l 2 -7 +l 3 0 +m 15 20 +l 16 19 + +245 21 10 29 +m 6 -6 +l 8 -5 +l 9 -4 +l 11 0 +l 13 7 +l 14 12 +l 16 21 +m 14 14 +l 10 0 +l 8 -4 +l 7 -5 +l 5 -6 +l 3 -6 +l 2 -5 +l 2 -4 +l 0 -5 +l 1 -6 +l 3 -7 +l 5 -7 +l 9 -5 +l 10 -4 +l 12 0 +l 14 7 +l 15 11 +l 17 21 +l 15 21 +l 14 14 +m 2 -6 +l 1 -5 + +246 21 10 33 +m 0 11 +l 17 11 +l 17 10 +l 0 10 +l 0 11 +m 7 21 +l 6 20 +l 6 19 +l 7 18 +l 8 18 +l 9 19 +l 9 20 +l 8 21 +l 7 21 +m 7 20 +l 7 19 +l 8 19 +l 8 20 +l 7 20 +m 7 3 +l 6 2 +l 6 1 +l 7 0 +l 8 0 +l 9 1 +l 9 2 +l 8 3 +l 7 3 +m 7 2 +l 7 1 +l 8 1 +l 8 2 +l 7 2 + +247 23 11 44 +m 1 11 +l 1 13 +l 2 16 +l 4 17 +l 6 17 +l 8 16 +l 12 13 +l 14 12 +l 16 12 +l 18 13 +l 19 15 +l 19 17 +m 1 13 +l 2 15 +l 4 16 +l 6 16 +l 8 15 +l 12 12 +l 14 11 +l 16 11 +l 18 12 +l 19 15 +m 1 3 +l 1 5 +l 2 8 +l 4 9 +l 6 9 +l 8 8 +l 12 5 +l 14 4 +l 16 4 +l 18 5 +l 19 7 +l 19 9 +m 1 5 +l 2 7 +l 4 8 +l 6 8 +l 8 7 +l 12 4 +l 14 3 +l 16 3 +l 18 4 +l 19 7 + +248 18 9 41 +m 0 13 +l 1 10 +l 2 9 +l 5 8 +l 8 8 +l 11 9 +l 13 12 +l 14 15 +l 14 16 +l 13 19 +l 12 20 +l 9 21 +l 6 21 +l 3 20 +l 1 17 +l 0 14 +l 0 13 +m 3 19 +l 2 17 +l 1 14 +l 1 12 +l 2 10 +m 11 10 +l 12 12 +l 13 15 +l 13 17 +l 12 19 +m 6 21 +l 4 19 +l 3 17 +l 2 14 +l 2 12 +l 3 9 +l 5 8 +m 8 8 +l 10 10 +l 11 12 +l 12 15 +l 12 17 +l 11 20 +l 9 21 + +249 6 3 11 +m 0 4 +l 3 4 +l 3 0 +l 0 0 +l 0 4 +m 1 4 +l 1 0 +m 2 4 +l 2 0 +m 0 2 +l 3 2 + +250 6 3 9 +m 3 0 +l 0 0 +l 0 2 +l 3 2 +l 3 0 +m 1 2 +l 1 0 +m 2 2 +l 2 0 + +251 22 11 21 +m 7 20 +l 7 4 +l 0 10 +l 0 7 +l 7 0 +l 10 0 +l 10 19 +l 19 19 +l 19 21 +l 7 21 +l 7 20 +m 0 8 +l 8 0 +l 8 20 +l 18 20 +m 9 19 +l 9 0 +m 0 9 +l 8 1 +m 1 9 +l 8 2 + +252 22 11 30 +m 0 17 +l 1 19 +l 3 21 +l 5 21 +l 6 20 +l 7 18 +l 7 15 +l 9 18 +l 11 20 +l 13 21 +l 15 21 +l 17 20 +l 18 18 +l 18 15 +l 16 10 +m 7 15 +l 5 9 +l 3 9 +l 5 14 +l 6 18 +m 6 20 +l 6 15 +l 4 9 +m 17 20 +l 17 16 +l 16 12 +l 16 9 +l 15 10 +l 15 13 +l 17 18 + +253 11 5 21 +m 2 19 +l 3 19 +l 3 18 +l 1 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 7 18 +l 5 17 +l 2 15 +l 1 14 +l 2 14 +l 4 13 +l 6 13 +l 7 14 +l 7 15 +m 7 14 +l 2 14 +m 1 14 +l 0 13 + +254 12 6 19 +m 0 0 +l 0 10 +l 8 10 +l 8 0 +l 0 0 +m 1 10 +l 1 0 +m 2 10 +l 2 0 +m 3 10 +l 3 0 +m 4 10 +l 4 0 +m 5 10 +l 5 0 +m 6 0 +l 6 10 +m 7 10 +l 7 0 diff --git a/cd/etc/vectorfont29.txt b/cd/etc/vectorfont29.txt new file mode 100755 index 0000000..ec20648 --- /dev/null +++ b/cd/etc/vectorfont29.txt @@ -0,0 +1,3828 @@ +European II +45 45 22 -10 + + +32 29 14 0 + +33 8 4 7 +m 1 42 +l 1 14 +m 2 0 +l 2 4 +l 0 4 +l 0 0 +l 2 0 + +34 15 7 14 +m 2 42 +l 0 42 +l 0 38 +l 2 38 +l 2 42 +m 1 38 +l 1 30 +m 8 38 +l 9 38 +l 9 42 +l 7 42 +l 7 38 +l 8 38 +l 8 30 + +35 27 13 8 +m 10 42 +l 3 0 +m 11 0 +l 19 42 +m 20 28 +l 0 28 +m 1 16 +l 21 16 + +36 35 17 20 +m 28 35 +l 27 40 +l 24 42 +l 4 42 +l 1 40 +l 0 35 +l 0 30 +l 1 25 +l 3 23 +l 25 21 +l 28 18 +l 29 14 +l 29 7 +l 28 3 +l 25 0 +l 4 0 +l 1 3 +l 0 7 +m 14 48 +l 14 -3 + +37 54 27 21 +m 17 38 +l 14 42 +l 2 42 +l 0 38 +l 0 20 +l 2 16 +l 14 16 +l 17 20 +l 17 38 +m 27 42 +l 21 0 +m 46 0 +l 48 4 +l 48 23 +l 46 27 +l 34 27 +l 31 23 +l 31 4 +l 31 4 +l 34 0 +l 46 0 + +38 40 20 22 +m 29 18 +l 29 9 +l 27 3 +l 24 0 +l 6 0 +l 3 3 +l 0 9 +l 0 18 +l 3 24 +l 6 25 +m 26 31 +l 26 37 +l 25 40 +l 24 41 +l 21 42 +l 8 42 +l 5 41 +l 3 40 +l 3 37 +l 3 30 +l 6 25 +l 34 0 + +39 10 5 7 +m 2 42 +l 0 42 +l 0 38 +l 2 38 +m 2 42 +l 2 32 +l 0 30 + +40 15 7 8 +m 9 42 +l 3 41 +l 1 37 +l 0 28 +l 0 14 +l 1 6 +l 3 1 +l 9 0 + +41 15 7 8 +m 0 42 +l 6 41 +l 8 37 +l 9 28 +l 9 14 +l 8 6 +l 6 1 +l 0 0 + +42 25 12 12 +m 0 31 +l 7 31 +m 12 31 +l 19 31 +m 6 42 +l 8 34 +m 10 28 +l 13 20 +m 13 42 +l 10 34 +m 8 28 +l 6 20 + +43 28 14 4 +m 0 18 +l 20 18 +m 10 34 +l 10 3 + +44 8 4 6 +m 2 0 +l 0 0 +l 0 4 +l 2 4 +l 2 -5 +l 0 -8 + +45 29 14 2 +m 0 18 +l 21 18 + +46 8 4 5 +m 2 0 +l 0 0 +l 0 4 +l 2 4 +l 2 0 + +47 19 9 2 +m 13 42 +l 0 -3 + +48 32 16 17 +m 9 0 +l 3 1 +l 1 6 +l 0 14 +l 0 28 +l 1 37 +l 3 41 +l 9 42 +l 18 42 +l 23 41 +l 25 37 +l 26 28 +l 26 14 +l 25 6 +l 23 1 +l 18 0 +l 8 0 + +49 18 9 3 +m 0 27 +l 12 42 +l 12 0 + +50 31 15 14 +m 1 34 +l 2 39 +l 5 42 +l 20 42 +l 24 39 +l 25 34 +l 25 28 +l 24 23 +l 20 20 +l 5 17 +l 2 14 +l 1 9 +l 0 0 +l 25 0 + +51 31 15 19 +m 0 35 +l 1 39 +l 4 42 +l 21 42 +l 25 39 +l 25 35 +l 25 30 +l 25 25 +l 21 23 +l 9 23 +m 21 23 +l 25 20 +l 25 14 +l 25 8 +l 25 3 +l 21 0 +l 4 0 +l 1 3 +l 0 8 + +52 32 16 4 +m 26 11 +l 0 11 +l 23 42 +l 23 0 + +53 31 15 14 +m 0 7 +l 1 3 +l 4 0 +l 21 0 +l 25 3 +l 25 9 +l 25 20 +l 25 25 +l 21 28 +l 5 28 +l 2 25 +l 0 21 +l 0 42 +l 25 42 + +54 31 15 18 +m 25 34 +l 25 39 +l 21 42 +l 4 42 +l 1 39 +l 0 34 +l 0 8 +l 1 3 +l 4 0 +l 21 0 +l 25 3 +l 25 8 +l 25 16 +l 25 21 +l 21 24 +l 5 24 +l 2 21 +l 0 15 + +55 32 16 3 +m 0 42 +l 26 42 +l 7 0 + +56 31 15 25 +m 21 0 +l 4 0 +l 1 3 +l 0 7 +l 0 16 +l 1 20 +l 5 23 +l 20 23 +l 24 25 +l 25 30 +l 25 35 +l 24 39 +l 20 42 +l 5 42 +l 2 39 +l 1 35 +l 1 30 +l 2 26 +l 5 23 +m 20 23 +l 25 20 +l 25 16 +l 25 7 +l 25 3 +l 21 0 + +57 31 15 18 +m 0 8 +l 1 3 +l 4 0 +l 21 0 +l 25 3 +l 25 8 +l 25 34 +l 25 39 +l 21 42 +l 4 42 +l 1 39 +l 0 34 +l 0 27 +l 1 21 +l 4 18 +l 20 18 +l 24 21 +l 25 27 + +58 8 4 10 +m 0 24 +l 0 28 +l 2 28 +l 2 24 +l 0 24 +m 0 4 +l 2 4 +l 2 0 +l 0 0 +l 0 4 + +59 12 6 12 +m 0 24 +l 0 28 +l 2 28 +l 2 24 +l 0 24 +m 2 4 +l 0 4 +l 0 0 +l 2 0 +m 2 4 +l 2 -5 +l 0 -8 + +60 28 14 3 +m 22 34 +l 0 18 +l 22 3 + +61 28 14 4 +m 0 24 +l 21 24 +m 0 13 +l 21 13 + +62 28 14 3 +m 0 34 +l 22 18 +l 0 3 + +63 30 15 18 +m 0 28 +l 0 35 +l 1 39 +l 5 42 +l 20 42 +l 23 39 +l 24 35 +l 24 28 +l 23 24 +l 20 21 +l 13 20 +l 11 17 +l 11 14 +m 12 0 +l 12 4 +l 11 4 +l 11 0 +l 12 0 + +64 31 15 26 +m 15 28 +l 12 30 +l 8 27 +l 7 19 +l 8 13 +l 11 11 +l 14 14 +m 15 30 +l 14 14 +l 15 11 +l 18 11 +l 20 13 +l 23 21 +l 23 31 +l 19 38 +l 15 42 +l 13 42 +l 7 38 +l 2 30 +l 0 21 +l 0 14 +l 2 7 +l 7 0 +l 11 0 +l 17 0 +l 25 4 + +65 37 18 5 +m 0 0 +l 15 42 +l 31 0 +m 26 11 +l 4 11 + +66 32 16 16 +m 0 0 +l 0 42 +l 21 42 +l 25 39 +l 25 35 +l 25 29 +l 25 25 +l 21 22 +l 0 22 +m 21 22 +l 25 19 +l 26 14 +l 26 8 +l 25 3 +l 21 0 +l 0 0 + +67 34 17 16 +m 28 31 +l 27 37 +l 25 41 +l 20 42 +l 8 42 +l 3 41 +l 1 36 +l 0 28 +l 0 14 +l 1 5 +l 3 1 +l 8 0 +l 20 0 +l 25 1 +l 27 6 +l 28 11 + +68 35 17 11 +m 0 0 +l 0 42 +l 20 42 +l 25 41 +l 28 37 +l 29 28 +l 29 14 +l 28 6 +l 26 1 +l 20 0 +l 0 0 + +69 30 15 6 +m 24 0 +l 0 0 +l 0 42 +l 24 42 +m 23 22 +l 0 22 + +70 29 14 5 +m 0 0 +l 0 42 +l 23 42 +m 22 22 +l 0 22 + +71 35 17 17 +m 28 36 +l 26 41 +l 20 42 +l 8 42 +l 3 41 +l 1 37 +l 0 28 +l 0 14 +l 1 6 +l 3 1 +l 8 0 +l 20 0 +l 26 1 +l 28 6 +l 29 14 +l 29 20 +l 14 20 + +72 33 16 6 +m 0 0 +l 0 42 +m 0 22 +l 27 22 +m 27 42 +l 27 0 + +73 6 3 2 +m 0 0 +l 0 42 + +74 27 13 9 +m 0 13 +l 1 6 +l 3 1 +l 8 0 +l 14 0 +l 18 1 +l 20 6 +l 21 13 +l 21 42 + +75 32 16 7 +m 0 0 +l 0 42 +m 25 42 +l 7 23 +l 0 23 +m 7 23 +l 26 0 + +76 27 13 3 +m 0 42 +l 0 0 +l 21 0 + +77 42 21 5 +m 0 0 +l 0 42 +l 18 0 +l 36 43 +l 36 0 + +78 34 17 4 +m 0 0 +l 0 42 +l 28 0 +l 28 42 + +79 36 18 17 +m 9 0 +l 3 1 +l 1 6 +l 0 14 +l 0 28 +l 1 37 +l 3 41 +l 9 42 +l 20 42 +l 26 41 +l 29 36 +l 30 28 +l 30 14 +l 29 6 +l 26 1 +l 20 0 +l 9 0 + +80 32 16 9 +m 0 0 +l 0 42 +l 21 42 +l 25 40 +l 26 35 +l 26 25 +l 25 21 +l 21 18 +l 0 18 + +81 39 19 19 +m 9 0 +l 3 1 +l 1 6 +l 0 14 +l 0 28 +l 1 37 +l 3 41 +l 9 42 +l 20 42 +l 26 41 +l 29 37 +l 30 28 +l 30 14 +l 29 6 +l 26 1 +l 20 0 +l 9 0 +m 18 17 +l 33 1 + +82 31 15 13 +m 0 0 +l 0 42 +l 21 42 +l 25 39 +l 25 35 +l 25 25 +l 25 21 +l 21 18 +l 0 18 +m 21 18 +l 25 16 +l 25 11 +l 25 0 + +83 32 16 18 +m 0 7 +l 1 3 +l 4 0 +l 21 0 +l 25 3 +l 25 7 +l 25 14 +l 25 18 +l 21 21 +l 3 23 +l 1 26 +l 0 30 +l 0 35 +l 1 39 +l 4 42 +l 20 42 +l 24 39 +l 25 35 + +84 31 15 4 +m 0 42 +l 25 42 +m 13 42 +l 13 0 + +85 33 16 10 +m 0 42 +l 0 13 +l 1 6 +l 3 1 +l 8 0 +l 19 0 +l 24 1 +l 26 6 +l 27 13 +l 27 42 + +86 35 17 3 +m 0 42 +l 14 0 +l 29 42 + +87 53 26 5 +m 0 42 +l 12 0 +l 24 42 +l 36 0 +l 48 42 + +88 35 17 4 +m 0 0 +l 28 42 +m 1 42 +l 29 0 + +89 35 17 5 +m 0 42 +l 14 18 +l 29 42 +m 14 18 +l 14 0 + +90 33 16 4 +m 1 42 +l 26 42 +l 0 0 +l 27 0 + +91 14 7 4 +m 8 47 +l 0 47 +l 0 -3 +l 8 -3 + +92 19 9 2 +m 0 42 +l 13 -3 + +93 14 7 4 +m 0 47 +l 8 47 +l 8 -3 +l 0 -3 + +94 24 12 3 +m 4 31 +l 11 39 +l 18 31 + +95 32 16 2 +m 0 -2 +l 26 -2 + +96 22 11 2 +m 0 47 +l 12 38 + +97 26 13 19 +m 0 24 +l 2 28 +l 5 30 +l 14 30 +l 18 28 +l 20 24 +l 20 0 +m 20 13 +l 18 15 +l 15 17 +l 4 17 +l 2 15 +l 0 13 +l 0 4 +l 2 1 +l 4 0 +l 15 0 +l 18 1 +l 20 4 + +98 27 13 14 +m 0 0 +l 0 42 +m 0 21 +l 2 27 +l 5 30 +l 16 30 +l 20 27 +l 21 20 +l 21 10 +l 20 3 +l 16 0 +l 5 0 +l 2 3 +l 0 8 + +99 26 13 12 +m 20 21 +l 19 27 +l 15 30 +l 5 30 +l 2 27 +l 0 20 +l 0 10 +l 2 3 +l 5 0 +l 15 0 +l 19 3 +l 20 8 + +100 27 13 14 +m 21 21 +l 20 27 +l 16 30 +l 5 30 +l 2 27 +l 0 20 +l 0 10 +l 2 3 +l 5 0 +l 16 0 +l 20 3 +l 21 8 +m 21 42 +l 21 0 + +101 27 13 13 +m 0 16 +l 21 16 +l 21 20 +l 20 27 +l 16 30 +l 5 30 +l 2 27 +l 0 20 +l 0 10 +l 2 3 +l 5 0 +l 17 0 +l 20 4 + +102 21 10 7 +m 5 0 +l 5 37 +l 7 41 +l 11 42 +l 14 42 +m 0 27 +l 15 27 + +103 27 13 18 +m 1 -7 +l 5 -10 +l 16 -10 +l 19 -7 +l 21 -2 +l 21 30 +m 21 21 +l 19 27 +l 16 30 +l 5 30 +l 2 27 +l 0 20 +l 0 11 +l 2 4 +l 5 1 +l 16 1 +l 20 4 +l 21 10 + +104 26 13 9 +m 0 0 +l 0 42 +m 0 21 +l 2 27 +l 5 30 +l 14 30 +l 18 27 +l 20 21 +l 20 0 + +105 6 3 4 +m 0 0 +l 0 30 +m 0 38 +l 0 42 + +106 11 5 6 +m 0 -10 +l 3 -9 +l 5 -5 +l 5 30 +m 5 38 +l 5 42 + +107 24 12 7 +m 0 0 +l 0 42 +m 0 16 +l 4 16 +l 17 30 +m 4 16 +l 18 0 + +108 6 3 2 +m 0 0 +l 0 42 + +109 40 20 16 +m 0 0 +l 0 30 +m 0 21 +l 2 27 +l 5 30 +l 12 30 +l 15 27 +l 17 21 +l 17 0 +m 17 21 +l 19 27 +l 22 30 +l 29 30 +l 32 27 +l 34 21 +l 34 0 + +110 26 13 9 +m 0 0 +l 0 30 +m 0 21 +l 2 27 +l 5 30 +l 15 30 +l 19 27 +l 20 21 +l 20 0 + +111 27 13 13 +m 5 0 +l 2 3 +l 0 10 +l 0 21 +l 2 27 +l 5 30 +l 16 30 +l 20 27 +l 21 20 +l 21 10 +l 20 3 +l 16 0 +l 5 0 + +112 27 13 14 +m 0 -10 +l 0 30 +m 0 21 +l 2 27 +l 5 30 +l 16 30 +l 19 27 +l 21 20 +l 21 10 +l 20 3 +l 16 0 +l 5 0 +l 2 3 +l 0 9 + +113 27 13 14 +m 21 21 +l 20 27 +l 16 30 +l 5 30 +l 2 27 +l 0 20 +l 0 10 +l 2 3 +l 5 0 +l 16 0 +l 20 3 +l 21 8 +m 21 30 +l 21 -10 + +114 23 11 8 +m 0 0 +l 0 30 +m 0 21 +l 3 27 +l 6 30 +l 12 30 +l 15 27 +l 17 20 + +115 26 13 18 +m 0 6 +l 2 1 +l 5 0 +l 15 0 +l 19 1 +l 20 4 +l 20 11 +l 19 14 +l 15 16 +l 5 16 +l 2 17 +l 0 20 +l 0 25 +l 2 28 +l 5 30 +l 15 30 +l 19 28 +l 20 24 + +116 26 13 10 +m 0 30 +l 19 30 +m 5 38 +l 5 6 +l 7 1 +l 11 0 +l 14 0 +l 18 1 +l 20 6 +l 20 11 + +117 26 13 9 +m 0 30 +l 0 9 +l 2 3 +l 5 0 +l 14 0 +l 18 3 +l 20 8 +m 20 30 +l 20 0 + +118 28 14 3 +m 0 30 +l 11 0 +l 22 30 + +119 37 18 5 +m 0 30 +l 8 0 +l 15 30 +l 23 0 +l 31 30 + +120 27 13 4 +m 0 0 +l 20 30 +m 1 30 +l 21 0 + +121 26 13 7 +m 0 30 +l 10 0 +l 20 30 +m 10 0 +l 8 -6 +l 5 -10 +l 3 -10 + +122 25 12 4 +m 1 30 +l 19 30 +l 0 0 +l 19 0 + +123 14 7 7 +m 8 39 +l 3 37 +l 3 21 +l 0 18 +l 2 15 +l 2 0 +l 8 -2 + +124 7 3 2 +m 0 -2 +l 0 40 + +125 14 7 7 +m 0 40 +l 5 37 +l 5 21 +l 8 18 +l 5 16 +l 5 0 +l 0 -2 + +126 31 15 4 +m 1 34 +l 7 37 +l 16 33 +l 24 37 + +127 26 13 6 +m 21 0 +l 21 17 +l 10 35 +l 0 17 +l 0 0 +l 21 0 + +128 34 17 26 +m 28 33 +l 27 39 +l 25 43 +l 20 44 +l 8 44 +l 3 43 +l 1 38 +l 0 30 +l 0 16 +l 1 7 +l 3 3 +l 8 2 +l 20 2 +l 25 3 +l 27 8 +l 28 13 +m 10 2 +l 10 1 +l 12 0 +l 16 -1 +l 18 -3 +l 18 -8 +l 16 -10 +l 3 -10 +l 1 -8 +l 1 -4 + +129 26 13 19 +m 0 30 +l 0 9 +l 2 3 +l 5 0 +l 14 0 +l 18 3 +l 20 8 +m 20 30 +l 20 0 +m 6 38 +l 8 38 +l 8 34 +l 6 34 +l 6 38 +m 14 38 +l 16 38 +l 16 34 +l 14 34 +l 14 38 + +130 27 13 20 +m 0 16 +l 21 16 +l 21 20 +l 20 27 +l 16 30 +l 5 30 +l 2 27 +l 0 20 +l 0 10 +l 2 3 +l 5 0 +l 17 0 +l 20 4 +m 15 41 +l 13 41 +l 13 45 +l 15 45 +l 15 41 +l 12 36 +l 7 34 + +131 26 13 21 +m 0 24 +l 2 28 +l 5 30 +l 14 30 +l 18 28 +l 20 24 +l 20 0 +m 20 13 +l 18 15 +l 15 17 +l 4 17 +l 0 13 +l 0 4 +l 2 1 +l 4 0 +l 15 0 +l 18 1 +l 20 4 +m 3 34 +l 10 42 +l 17 34 + +132 26 13 28 +m 0 24 +l 2 28 +l 5 30 +l 14 30 +l 18 28 +l 20 24 +l 20 0 +m 20 13 +l 18 15 +l 15 17 +l 4 17 +l 0 13 +l 0 4 +l 2 1 +l 4 0 +l 15 0 +l 18 1 +l 20 4 +m 7 34 +l 5 34 +l 5 38 +l 7 38 +l 7 34 +m 15 34 +l 13 34 +l 13 38 +l 15 38 +l 15 34 + +133 26 13 25 +m 0 24 +l 2 28 +l 5 30 +l 14 30 +l 18 28 +l 20 24 +l 20 0 +m 20 13 +l 18 15 +l 15 17 +l 4 17 +l 0 13 +l 0 4 +l 2 1 +l 4 0 +l 15 0 +l 18 1 +l 20 4 +m 3 41 +l 5 41 +l 5 45 +l 3 45 +l 3 41 +l 6 36 +l 11 34 + +134 26 13 30 +m 0 24 +l 2 28 +l 5 30 +l 14 30 +l 18 28 +l 20 24 +l 20 0 +m 20 13 +l 18 15 +l 15 17 +l 4 17 +l 0 13 +l 0 4 +l 2 1 +l 4 0 +l 15 0 +l 18 1 +l 20 4 +m 7 40 +l 12 40 +l 15 37 +l 12 34 +l 7 34 +l 4 37 +l 7 40 +m 9 38 +l 8 37 +l 9 36 +l 10 37 +l 9 38 + +135 26 13 19 +m 20 14 +l 16 11 +l 5 11 +l 2 14 +l 0 21 +l 2 27 +l 5 30 +l 16 30 +l 20 27 +m 10 11 +l 10 9 +l 12 8 +l 16 7 +l 18 5 +l 18 0 +l 16 -2 +l 3 -2 +l 1 0 +l 1 4 + +136 27 13 16 +m 0 16 +l 21 16 +l 21 20 +l 20 27 +l 16 30 +l 5 30 +l 2 27 +l 0 20 +l 0 10 +l 2 3 +l 5 0 +l 17 0 +l 20 4 +m 4 34 +l 11 42 +l 18 34 + +137 27 13 23 +m 0 16 +l 21 16 +l 21 20 +l 20 27 +l 16 30 +l 5 30 +l 2 27 +l 0 20 +l 0 10 +l 2 3 +l 5 0 +l 17 0 +l 20 4 +m 8 34 +l 6 34 +l 6 38 +l 8 38 +l 8 34 +m 16 34 +l 14 34 +l 14 38 +l 16 38 +l 16 34 + +138 27 13 20 +m 0 16 +l 21 16 +l 21 20 +l 20 27 +l 16 30 +l 5 30 +l 2 27 +l 0 20 +l 0 10 +l 2 3 +l 5 0 +l 17 0 +l 20 4 +m 3 41 +l 5 41 +l 5 45 +l 3 45 +l 3 41 +l 6 36 +l 11 34 + +139 12 6 12 +m 5 0 +l 5 30 +m 2 34 +l 0 34 +l 0 38 +l 2 38 +l 2 34 +m 10 34 +l 8 34 +l 8 38 +l 10 38 +l 10 34 + +140 19 9 5 +m 8 0 +l 8 30 +m 1 34 +l 8 42 +l 15 34 + +141 16 8 9 +m 8 0 +l 8 30 +m 0 41 +l 2 41 +l 2 45 +l 0 45 +l 0 41 +l 3 36 +l 8 34 + +142 37 18 15 +m 0 0 +l 15 42 +l 31 0 +m 26 11 +l 4 11 +m 12 46 +l 10 46 +l 10 50 +l 12 50 +l 12 46 +m 20 46 +l 18 46 +l 18 50 +l 20 50 +l 20 46 + +143 37 18 17 +m 0 0 +l 15 42 +l 31 0 +m 26 11 +l 4 11 +m 16 49 +l 15 50 +l 14 49 +l 15 48 +l 16 49 +m 14 47 +l 12 49 +l 14 51 +l 16 51 +l 18 49 +l 16 47 +l 14 47 + +144 30 15 13 +m 24 0 +l 0 0 +l 0 30 +l 24 30 +m 0 15 +l 24 15 +m 16 41 +l 14 41 +l 14 45 +l 16 45 +l 16 41 +l 13 36 +l 8 34 + +145 48 24 31 +m 0 24 +l 2 28 +l 5 30 +l 14 30 +l 18 28 +l 20 24 +l 20 0 +m 20 13 +l 18 15 +l 15 17 +l 4 17 +l 0 13 +l 0 4 +l 2 1 +l 4 0 +l 15 0 +l 18 1 +l 20 4 +m 20 20 +l 22 27 +l 25 30 +l 36 30 +l 40 27 +l 41 20 +l 41 16 +l 20 16 +m 20 10 +l 22 3 +l 25 0 +l 37 0 +l 40 4 + +146 49 24 12 +m 0 0 +l 15 42 +l 27 42 +m 26 42 +l 42 42 +m 18 41 +l 18 0 +l 42 0 +m 18 22 +l 41 22 +m 4 11 +l 18 11 + +147 27 13 16 +m 5 0 +l 2 3 +l 0 10 +l 0 21 +l 2 27 +l 5 30 +l 16 30 +l 20 27 +l 21 20 +l 21 10 +l 20 3 +l 16 0 +l 5 0 +m 4 34 +l 11 42 +l 18 34 + +148 27 13 23 +m 5 0 +l 2 3 +l 0 10 +l 0 21 +l 2 27 +l 5 30 +l 16 30 +l 20 27 +l 21 20 +l 21 10 +l 20 3 +l 16 0 +l 5 0 +m 8 35 +l 6 35 +l 6 39 +l 8 39 +l 8 35 +m 16 35 +l 14 35 +l 14 39 +l 16 39 +l 16 35 + +149 27 13 20 +m 5 0 +l 2 3 +l 0 10 +l 0 21 +l 2 27 +l 5 30 +l 16 30 +l 20 27 +l 21 20 +l 21 10 +l 20 3 +l 16 0 +l 5 0 +m 5 41 +l 7 41 +l 7 45 +l 5 45 +l 5 41 +l 8 36 +l 13 34 + +150 26 13 12 +m 0 30 +l 0 9 +l 2 3 +l 5 0 +l 14 0 +l 18 3 +l 20 8 +m 20 30 +l 20 0 +m 3 34 +l 10 42 +l 17 34 + +151 26 13 18 +m 0 30 +l 0 9 +l 2 3 +l 5 0 +l 14 0 +l 18 3 +l 20 8 +m 20 30 +l 20 0 +m 2 41 +l 4 41 +l 4 45 +l 2 45 +l 2 41 +l 5 36 +l 10 34 +m 27 -3 +l 27 -3 + +152 26 13 17 +m 0 30 +l 10 0 +l 20 30 +m 10 0 +l 8 -6 +l 5 -10 +l 3 -10 +m 7 34 +l 5 34 +l 5 38 +l 7 38 +l 7 34 +m 15 34 +l 13 34 +l 13 38 +l 15 38 +l 15 34 + +153 36 18 27 +m 9 0 +l 3 1 +l 1 6 +l 0 14 +l 0 28 +l 1 37 +l 3 41 +l 9 42 +l 20 42 +l 26 41 +l 29 36 +l 30 28 +l 30 14 +l 29 6 +l 26 1 +l 20 0 +l 9 0 +m 12 47 +l 10 47 +l 10 51 +l 12 51 +l 12 47 +m 20 47 +l 18 47 +l 18 51 +l 20 51 +l 20 47 + +154 33 16 20 +m 0 42 +l 0 13 +l 1 6 +l 3 1 +l 8 0 +l 19 0 +l 24 1 +l 26 6 +l 27 13 +l 27 42 +m 10 50 +l 12 50 +l 12 46 +l 10 46 +l 10 50 +m 18 50 +l 20 50 +l 20 46 +l 18 46 +l 18 50 + +155 27 13 15 +m 5 0 +l 2 3 +l 0 10 +l 0 21 +l 2 27 +l 5 30 +l 16 30 +l 20 27 +l 21 20 +l 21 10 +l 20 3 +l 16 0 +l 5 0 +m 17 38 +l 4 -7 + +156 37 18 14 +m 24 41 +l 22 42 +l 18 43 +l 15 43 +l 11 42 +l 8 41 +l 6 39 +l 4 33 +l 4 0 +l 21 0 +l 25 1 +l 26 4 +m 0 23 +l 12 23 + +157 36 18 21 +m 9 0 +l 3 1 +l 1 6 +l 0 14 +l 0 28 +l 1 37 +l 3 41 +l 9 42 +l 20 42 +l 26 41 +l 29 36 +l 30 28 +l 30 14 +l 29 6 +l 26 1 +l 20 0 +l 9 0 +l 7 -6 +m 23 48 +l 22 44 +l 9 -1 + +158 37 18 19 +m 0 20 +l 21 20 +l 25 23 +l 26 27 +l 26 37 +l 25 42 +l 21 44 +l 0 44 +l 0 0 +m 25 21 +l 25 4 +l 26 1 +l 27 0 +l 31 0 +l 32 1 +l 33 4 +l 33 6 +m 21 16 +l 33 16 + +159 43 21 16 +m 41 38 +l 39 39 +l 35 40 +l 32 40 +l 25 38 +l 23 36 +l 21 30 +l 21 5 +l 19 -1 +l 17 -3 +l 10 -5 +l 7 -5 +l 3 -4 +l 1 -3 +m 17 19 +l 29 19 + +160 26 13 25 +m 0 24 +l 2 28 +l 5 30 +l 14 30 +l 18 28 +l 20 24 +l 20 0 +m 20 13 +l 18 15 +l 15 17 +l 4 17 +l 0 13 +l 0 4 +l 2 1 +l 4 0 +l 15 0 +l 18 1 +l 20 4 +m 14 41 +l 12 41 +l 12 45 +l 14 45 +l 14 41 +l 11 36 +l 6 34 + +161 12 6 9 +m 0 0 +l 0 30 +m 8 41 +l 6 41 +l 6 45 +l 8 45 +l 8 41 +l 5 36 +l 0 34 + +162 27 13 20 +m 5 0 +l 2 3 +l 0 10 +l 0 21 +l 2 27 +l 5 30 +l 16 30 +l 20 27 +l 21 20 +l 21 10 +l 20 3 +l 16 0 +l 5 0 +m 17 41 +l 15 41 +l 15 45 +l 17 45 +l 17 41 +l 14 36 +l 9 34 + +163 26 13 16 +m 0 30 +l 0 9 +l 2 3 +l 5 0 +l 14 0 +l 18 3 +l 20 8 +m 20 30 +l 20 0 +m 15 41 +l 13 41 +l 13 45 +l 15 45 +l 15 41 +l 12 36 +l 7 34 + +164 31 15 13 +m 0 0 +l 0 30 +m 0 21 +l 2 27 +l 5 30 +l 15 30 +l 19 27 +l 20 21 +l 20 0 +m 0 35 +l 6 38 +l 15 34 +l 23 38 + +165 34 17 8 +m 0 0 +l 0 42 +l 28 0 +l 28 42 +m 2 44 +l 8 47 +l 17 43 +l 25 47 + +166 26 13 20 +m 0 37 +l 2 41 +l 5 43 +l 14 43 +l 18 41 +l 20 37 +l 20 13 +m 20 26 +l 18 28 +l 15 30 +l 4 30 +l 0 26 +l 0 17 +l 2 14 +l 4 13 +l 15 13 +l 18 14 +l 20 17 +m 0 0 +l 21 0 + +167 27 13 14 +m 5 23 +l 2 26 +l 0 33 +l 0 34 +l 2 40 +l 5 43 +l 16 43 +l 20 40 +l 21 33 +l 20 26 +l 16 23 +l 5 23 +m 0 0 +l 21 0 + +168 30 15 18 +m 24 14 +l 24 7 +l 23 3 +l 19 0 +l 4 0 +l 1 3 +l 0 7 +l 0 14 +l 1 18 +l 4 21 +l 11 22 +l 13 25 +l 13 28 +m 12 42 +l 12 38 +l 13 38 +l 13 42 +l 12 42 + +169 26 13 3 +m 0 0 +l 0 21 +l 20 21 + +170 26 13 3 +m 20 0 +l 20 21 +l 0 21 + +171 37 18 17 +m 20 17 +l 20 19 +l 22 22 +l 28 22 +l 31 19 +l 31 12 +l 29 11 +l 24 10 +l 22 9 +l 20 7 +l 18 0 +l 31 0 +m 31 43 +l 0 0 +m 1 34 +l 7 43 +l 7 21 + +172 37 18 11 +m 31 43 +l 31 43 +l 0 0 +m 1 34 +l 7 43 +l 7 21 +m 31 6 +l 14 6 +l 16 8 +l 28 22 +l 28 0 + +173 8 4 7 +m 1 0 +l 1 28 +m 2 42 +l 2 38 +l 0 38 +l 0 42 +l 2 42 + +174 29 14 8 +m 12 35 +l 0 22 +l 12 8 +m 25 35 +l 13 22 +l 25 8 +m 32 35 +l 32 35 + +175 29 14 6 +m 13 35 +l 25 22 +l 13 8 +m 0 35 +l 12 22 +l 0 8 + +176 25 12 144 +m 0 34 +l 0 37 +l 3 37 +l 3 34 +l 0 34 +m 2 37 +l 2 34 +m 1 37 +l 1 34 +m 0 24 +l 0 21 +l 3 21 +l 3 24 +l 0 24 +m 1 24 +l 1 21 +m 2 24 +l 2 21 +m 0 11 +l 3 11 +l 3 8 +l 0 8 +l 0 11 +m 2 11 +l 2 8 +m 1 11 +l 1 8 +m 0 -2 +l 3 -2 +l 3 -5 +l 0 -5 +l 0 -2 +m 1 -2 +l 1 -5 +m 2 -2 +l 2 -5 +m 7 40 +l 7 43 +l 10 43 +l 10 40 +l 7 40 +m 9 43 +l 9 40 +m 8 43 +l 8 40 +m 7 30 +l 7 27 +l 10 27 +l 10 30 +l 7 30 +m 8 30 +l 8 27 +m 9 30 +l 9 27 +m 7 17 +l 10 17 +l 10 14 +l 7 14 +l 7 17 +m 9 17 +l 9 14 +m 8 17 +l 8 14 +m 7 4 +l 10 4 +l 10 1 +l 7 1 +l 7 4 +m 8 4 +l 8 1 +m 9 4 +l 9 1 +m 15 34 +l 15 37 +l 18 37 +l 18 34 +l 15 34 +m 17 37 +l 17 34 +m 16 37 +l 16 34 +m 15 24 +l 15 21 +l 18 21 +l 18 24 +l 15 24 +m 16 24 +l 16 21 +m 17 24 +l 17 21 +m 15 11 +l 18 11 +l 18 8 +l 15 8 +l 15 11 +m 17 11 +l 17 8 +m 16 11 +l 16 8 +m 15 -2 +l 18 -2 +l 18 -5 +l 15 -5 +l 15 -2 +m 16 -2 +l 16 -5 +m 17 -2 +l 17 -5 +m 22 40 +l 22 43 +l 25 43 +l 25 40 +l 22 40 +m 24 43 +l 24 40 +m 23 43 +l 23 40 +m 22 30 +l 22 27 +l 25 27 +l 25 30 +l 22 30 +m 23 30 +l 23 27 +m 24 30 +l 24 27 +m 22 17 +l 25 17 +l 25 14 +l 22 14 +l 22 17 +m 24 17 +l 24 14 +m 23 17 +l 23 14 +m 22 4 +l 25 4 +l 25 1 +l 22 1 +l 22 4 +m 23 4 +l 23 1 +m 24 4 +l 24 1 + +177 24 12 288 +m 0 34 +l 0 37 +l 3 37 +l 3 34 +l 0 34 +m 2 37 +l 2 34 +m 1 37 +l 1 34 +m 0 24 +l 0 21 +l 3 21 +l 3 24 +l 0 24 +m 1 24 +l 1 21 +m 2 24 +l 2 21 +m 0 11 +l 3 11 +l 3 8 +l 0 8 +l 0 11 +m 2 11 +l 2 8 +m 1 11 +l 1 8 +m 0 -2 +l 3 -2 +l 3 -5 +l 0 -5 +l 0 -2 +m 1 -2 +l 1 -5 +m 2 -2 +l 2 -5 +m 3 40 +l 3 43 +l 6 43 +l 6 40 +l 3 40 +m 5 43 +l 5 40 +m 4 43 +l 4 40 +m 3 30 +l 3 27 +l 6 27 +l 6 30 +l 3 30 +m 4 30 +l 4 27 +m 5 30 +l 5 27 +m 3 17 +l 6 17 +l 6 14 +l 3 14 +l 3 17 +m 5 17 +l 5 14 +m 4 17 +l 4 14 +m 3 4 +l 6 4 +l 6 1 +l 3 1 +l 3 4 +m 4 4 +l 4 1 +m 5 4 +l 5 1 +m 6 34 +l 6 37 +l 9 37 +l 9 34 +l 6 34 +m 8 37 +l 8 34 +m 7 37 +l 7 34 +m 6 24 +l 6 21 +l 9 21 +l 9 24 +l 6 24 +m 7 24 +l 7 21 +m 8 24 +l 8 21 +m 6 11 +l 9 11 +l 9 8 +l 6 8 +l 6 11 +m 8 11 +l 8 8 +m 7 11 +l 7 8 +m 6 -2 +l 9 -2 +l 9 -5 +l 6 -5 +l 6 -2 +m 7 -2 +l 7 -5 +m 8 -2 +l 8 -5 +m 9 40 +l 9 43 +l 12 43 +l 12 40 +l 9 40 +m 11 43 +l 11 40 +m 10 43 +l 10 40 +m 9 30 +l 9 27 +l 12 27 +l 12 30 +l 9 30 +m 10 30 +l 10 27 +m 11 30 +l 11 27 +m 9 17 +l 12 17 +l 12 14 +l 9 14 +l 9 17 +m 11 17 +l 11 14 +m 10 17 +l 10 14 +m 9 4 +l 12 4 +l 12 1 +l 9 1 +l 9 4 +m 10 4 +l 10 1 +m 11 4 +l 11 1 +m 12 34 +l 12 37 +l 15 37 +l 15 34 +l 12 34 +m 14 37 +l 14 34 +m 13 37 +l 13 34 +m 12 24 +l 12 21 +l 15 21 +l 15 24 +l 12 24 +m 13 24 +l 13 21 +m 14 24 +l 14 21 +m 12 11 +l 15 11 +l 15 8 +l 12 8 +l 12 11 +m 14 11 +l 14 8 +m 13 11 +l 13 8 +m 12 -2 +l 15 -2 +l 15 -5 +l 12 -5 +l 12 -2 +m 13 -2 +l 13 -5 +m 14 -2 +l 14 -5 +m 15 40 +l 15 43 +l 18 43 +l 18 40 +l 15 40 +m 17 43 +l 17 40 +m 16 43 +l 16 40 +m 15 30 +l 15 27 +l 18 27 +l 18 30 +l 15 30 +m 16 30 +l 16 27 +m 17 30 +l 17 27 +m 15 17 +l 18 17 +l 18 14 +l 15 14 +l 15 17 +m 17 17 +l 17 14 +m 16 17 +l 16 14 +m 15 4 +l 18 4 +l 18 1 +l 15 1 +l 15 4 +m 16 4 +l 16 1 +m 17 4 +l 17 1 +m 18 34 +l 18 37 +l 21 37 +l 21 34 +l 18 34 +m 20 37 +l 20 34 +m 19 37 +l 19 34 +m 18 24 +l 18 21 +l 21 21 +l 21 24 +l 18 24 +m 19 24 +l 19 21 +m 20 24 +l 20 21 +m 18 11 +l 21 11 +l 21 8 +l 18 8 +l 18 11 +m 20 11 +l 20 8 +m 19 11 +l 19 8 +m 18 -2 +l 21 -2 +l 21 -5 +l 18 -5 +l 18 -2 +m 19 -2 +l 19 -5 +m 20 -2 +l 20 -5 +m 21 40 +l 21 43 +l 24 43 +l 24 40 +l 21 40 +m 23 43 +l 23 40 +m 22 43 +l 22 40 +m 21 30 +l 21 27 +l 24 27 +l 24 30 +l 21 30 +m 22 30 +l 22 27 +m 23 30 +l 23 27 +m 21 17 +l 24 17 +l 24 14 +l 21 14 +l 21 17 +m 23 17 +l 23 14 +m 22 17 +l 22 14 +m 21 4 +l 24 4 +l 24 1 +l 21 1 +l 21 4 +m 22 4 +l 22 1 +m 23 4 +l 23 1 + +178 36 18 410 +m 0 39 +l 0 42 +l 3 42 +l 3 39 +l 0 39 +m 2 42 +l 2 39 +m 1 42 +l 1 39 +m 3 39 +l 3 42 +l 6 42 +l 6 39 +l 3 39 +m 5 42 +l 5 39 +m 4 42 +l 4 39 +m 6 36 +l 9 36 +l 9 33 +l 6 33 +l 6 36 +m 8 36 +l 8 33 +m 7 36 +l 7 33 +m 6 30 +l 6 27 +l 0 27 +l 0 30 +l 6 30 +m 2 30 +l 2 27 +m 1 30 +l 1 27 +m 5 30 +l 5 27 +m 4 30 +l 4 27 +m 3 30 +l 3 27 +m 0 3 +l 0 6 +l 3 6 +l 3 3 +l 0 3 +m 2 6 +l 2 3 +m 1 6 +l 1 3 +m 9 33 +l 9 36 +l 12 36 +l 12 33 +l 9 33 +m 11 36 +l 11 33 +m 10 36 +l 10 33 +m 15 39 +l 15 42 +l 18 42 +l 18 39 +l 15 39 +m 17 42 +l 17 39 +m 16 42 +l 16 39 +m 18 39 +l 18 42 +l 21 42 +l 21 39 +l 18 39 +m 20 42 +l 20 39 +m 19 42 +l 19 39 +m 12 33 +l 12 36 +l 15 36 +l 15 33 +l 12 33 +m 14 36 +l 14 33 +m 13 36 +l 13 33 +m 0 24 +l 3 24 +l 3 21 +l 0 21 +l 0 24 +m 2 24 +l 2 21 +m 1 24 +l 1 21 +m 3 21 +l 3 24 +l 6 24 +l 6 21 +l 3 21 +m 5 24 +l 5 21 +m 4 24 +l 4 21 +m 6 21 +l 6 24 +l 9 24 +l 9 21 +l 6 21 +m 8 24 +l 8 21 +m 7 24 +l 7 21 +m 0 15 +l 0 18 +l 3 18 +l 3 15 +l 0 15 +m 2 18 +l 2 15 +m 1 18 +l 1 15 +m 6 12 +l 9 12 +l 9 9 +l 6 9 +l 6 12 +m 8 12 +l 8 9 +m 7 12 +l 7 9 +m 9 9 +l 9 12 +l 12 12 +l 12 9 +l 9 9 +m 11 12 +l 11 9 +m 10 12 +l 10 9 +m 12 9 +l 12 12 +l 15 12 +l 15 9 +l 12 9 +m 14 12 +l 14 9 +m 13 12 +l 13 9 +m 0 0 +l 3 0 +l 3 -3 +l 0 -3 +l 0 0 +m 2 0 +l 2 -3 +m 1 0 +l 1 -3 +m 3 -3 +l 3 0 +l 6 0 +l 6 -3 +l 3 -3 +m 5 0 +l 5 -3 +m 4 0 +l 4 -3 +m 6 -3 +l 6 0 +l 9 0 +l 9 -3 +l 6 -3 +m 8 0 +l 8 -3 +m 7 0 +l 7 -3 +m 3 15 +l 3 18 +l 6 18 +l 6 15 +l 3 15 +m 5 18 +l 5 15 +m 4 18 +l 4 15 +m 3 3 +l 3 6 +l 6 6 +l 6 3 +l 3 3 +m 5 6 +l 5 3 +m 4 6 +l 4 3 +m 21 30 +l 21 27 +l 15 27 +l 15 30 +l 21 30 +m 17 30 +l 17 27 +m 16 30 +l 16 27 +m 20 30 +l 20 27 +m 19 30 +l 19 27 +m 18 30 +l 18 27 +m 21 18 +l 21 15 +l 15 15 +l 15 18 +l 21 18 +m 17 18 +l 17 15 +m 16 18 +l 16 15 +m 20 18 +l 20 15 +m 19 18 +l 19 15 +m 18 18 +l 18 15 +m 21 6 +l 21 3 +l 15 3 +l 15 6 +l 21 6 +m 17 6 +l 17 3 +m 16 6 +l 16 3 +m 20 6 +l 20 3 +m 19 6 +l 19 3 +m 18 6 +l 18 3 +m 30 41 +l 30 40 +m 36 42 +l 36 39 +l 30 39 +l 30 42 +l 36 42 +m 32 42 +l 32 39 +m 31 42 +l 31 39 +m 35 42 +l 35 39 +m 34 42 +l 34 39 +m 33 42 +l 33 39 +m 27 36 +l 30 36 +l 30 33 +l 27 33 +l 27 36 +m 29 36 +l 29 33 +m 28 36 +l 28 33 +m 30 33 +l 30 36 +l 33 36 +l 33 33 +l 30 33 +m 32 36 +l 32 33 +m 31 36 +l 31 33 +m 33 33 +l 33 36 +l 36 36 +l 36 33 +l 33 33 +m 35 36 +l 35 33 +m 34 36 +l 34 33 +m 36 30 +l 36 27 +l 30 27 +l 30 30 +l 36 30 +m 32 30 +l 32 27 +m 31 30 +l 31 27 +m 35 30 +l 35 27 +m 34 30 +l 34 27 +m 33 30 +l 33 27 +m 36 18 +l 36 15 +l 30 15 +l 30 18 +l 36 18 +m 32 18 +l 32 15 +m 31 18 +l 31 15 +m 35 18 +l 35 15 +m 34 18 +l 34 15 +m 33 18 +l 33 15 +m 27 12 +l 30 12 +l 30 9 +l 27 9 +l 27 12 +m 29 12 +l 29 9 +m 28 12 +l 28 9 +m 30 9 +l 30 12 +l 33 12 +l 33 9 +l 30 9 +m 32 12 +l 32 9 +m 31 12 +l 31 9 +m 33 9 +l 33 12 +l 36 12 +l 36 9 +l 33 9 +m 35 12 +l 35 9 +m 34 12 +l 34 9 +m 36 6 +l 36 3 +l 30 3 +l 30 6 +l 36 6 +m 32 6 +l 32 3 +m 31 6 +l 31 3 +m 35 6 +l 35 3 +m 34 6 +l 34 3 +m 33 6 +l 33 3 +m 21 24 +l 24 24 +l 24 21 +l 21 21 +l 21 24 +m 23 24 +l 23 21 +m 22 24 +l 22 21 +m 24 21 +l 24 24 +l 27 24 +l 27 21 +l 24 21 +m 26 24 +l 26 21 +m 25 24 +l 25 21 +m 27 21 +l 27 24 +l 30 24 +l 30 21 +l 27 21 +m 29 24 +l 29 21 +m 28 24 +l 28 21 +m 21 0 +l 24 0 +l 24 -3 +l 21 -3 +l 21 0 +m 23 0 +l 23 -3 +m 22 0 +l 22 -3 +m 24 -3 +l 24 0 +l 27 0 +l 27 -3 +l 24 -3 +m 26 0 +l 26 -3 +m 25 0 +l 25 -3 +m 27 -3 +l 27 0 +l 30 0 +l 30 -3 +l 27 -3 +m 29 0 +l 29 -3 +m 28 0 +l 28 -3 + +179 21 10 2 +m 15 43 +l 15 -2 + +180 21 10 4 +m 0 17 +l 15 17 +m 15 43 +l 15 -2 + +181 20 10 6 +m 0 24 +l 15 24 +m 15 -2 +l 15 43 +m 0 17 +l 15 17 + +182 36 18 6 +m 0 17 +l 15 17 +m 15 43 +l 15 -2 +m 31 43 +l 31 -2 + +183 36 18 7 +m 0 17 +l 31 17 +l 31 -2 +m 15 17 +l 15 -2 +m 0 -1 +l -1 -1 + +184 20 10 8 +m 0 17 +l 15 17 +l 15 -2 +m 0 24 +l 15 24 +l 15 17 +m 0 -1 +l 0 -1 + +185 36 18 8 +m 15 43 +l 15 24 +l 0 24 +m 0 17 +l 15 17 +l 15 -2 +m 31 43 +l 31 -2 + +186 36 18 4 +m 15 43 +l 15 -2 +m 31 43 +l 31 -2 + +187 36 18 6 +m 0 17 +l 15 17 +l 15 -2 +m 0 24 +l 31 24 +l 31 -2 + +188 36 18 6 +m 15 43 +l 15 24 +l 0 24 +m 31 43 +l 31 17 +l 0 17 + +189 36 18 5 +m 0 24 +l 31 24 +l 31 43 +m 15 24 +l 15 43 + +190 20 10 8 +m 0 24 +l 15 24 +l 15 43 +m 0 17 +l 15 17 +l 15 24 +m -1 -1 +l -1 -1 + +191 21 10 3 +m 0 17 +l 15 17 +l 15 -2 + +192 15 7 3 +m 15 24 +l 0 24 +l 0 43 + +193 30 15 4 +m 0 24 +l 30 24 +m 15 24 +l 15 43 + +194 30 15 4 +m 0 17 +l 30 17 +m 15 17 +l 15 -2 + +195 15 7 6 +m 15 17 +l 0 17 +m 0 43 +l 0 -2 +m 0 -1 +l -1 -1 + +196 31 15 2 +m 0 17 +l 31 17 + +197 30 15 4 +m 0 17 +l 30 17 +m 15 43 +l 15 -2 + +198 15 7 6 +m 15 24 +l 0 24 +m 0 -2 +l 0 43 +m 15 17 +l 0 17 + +199 31 15 6 +m 31 17 +l 16 17 +m 16 43 +l 16 -2 +m 0 43 +l 0 -2 + +200 31 15 6 +m 31 24 +l 16 24 +l 16 43 +m 31 17 +l 0 17 +l 0 43 + +201 31 15 6 +m 31 17 +l 16 17 +l 16 -2 +m 31 24 +l 0 24 +l 0 -2 + +202 46 23 8 +m 0 24 +l 15 24 +l 15 43 +m 0 17 +l 46 17 +m 46 24 +l 31 24 +l 31 43 + +203 46 23 8 +m 0 17 +l 15 17 +l 15 -2 +m 0 24 +l 46 24 +m 46 17 +l 31 17 +l 31 -2 + +204 31 15 10 +m 16 43 +l 16 24 +l 31 24 +m 31 17 +l 16 17 +l 16 -2 +m 0 43 +l 0 -2 +m 0 -1 +l 1 -1 + +205 31 15 4 +m 0 17 +l 31 17 +m 0 24 +l 31 24 + +206 46 23 12 +m 15 43 +l 15 24 +l 0 24 +m 0 17 +l 15 17 +l 15 -2 +m 31 43 +l 31 24 +l 46 24 +m 46 17 +l 31 17 +l 31 -2 + +207 31 15 6 +m 0 24 +l 30 24 +m 15 24 +l 15 43 +m 0 17 +l 31 17 + +208 31 15 7 +m 31 24 +l 25 24 +l 25 43 +m 9 24 +l 9 43 +m 25 24 +l 0 24 + +209 30 15 6 +m 0 17 +l 30 17 +m 15 17 +l 15 -2 +m 0 24 +l 31 24 + +210 31 15 7 +m 31 17 +l 25 17 +l 25 -2 +m 9 17 +l 9 -2 +m 25 17 +l 0 17 + +211 31 15 5 +m 31 24 +l 0 24 +l 0 43 +m 16 24 +l 16 43 + +212 15 7 6 +m 15 24 +l 0 24 +l 0 43 +m 15 17 +l 0 17 +l 0 24 + +213 15 7 6 +m 15 17 +l 0 17 +l 0 -2 +m 15 24 +l 0 24 +l 0 17 + +214 31 15 5 +m 31 17 +l 0 17 +l 0 -2 +m 16 17 +l 16 -2 + +215 46 23 6 +m 0 17 +l 46 17 +m 15 43 +l 15 -2 +m 31 43 +l 31 -2 + +216 31 15 6 +m 15 43 +l 15 -2 +m 0 17 +l 31 17 +m 0 24 +l 31 24 + +217 20 10 3 +m 15 43 +l 15 24 +l 0 24 + +218 15 7 3 +m 0 -2 +l 0 17 +l 15 17 + +219 31 15 67 +m 0 43 +l 31 43 +l 31 0 +l 0 0 +l 0 43 +m 2 43 +l 2 0 +m 4 43 +l 4 0 +m 6 43 +l 6 0 +m 8 43 +l 8 0 +m 10 43 +l 10 0 +m 12 43 +l 12 0 +m 1 43 +l 1 0 +m 3 43 +l 3 0 +m 5 43 +l 5 0 +m 7 43 +l 7 0 +m 9 43 +l 9 0 +m 11 43 +l 11 0 +m 13 43 +l 13 0 +m 18 43 +l 18 0 +m 20 43 +l 20 0 +m 22 43 +l 22 0 +m 24 43 +l 24 0 +m 26 43 +l 26 0 +m 28 43 +l 28 0 +m 30 43 +l 30 0 +m 17 43 +l 17 0 +m 19 43 +l 19 0 +m 21 43 +l 21 0 +m 23 43 +l 23 0 +m 25 43 +l 25 0 +m 27 43 +l 27 0 +m 29 43 +l 29 0 +m 14 43 +l 14 0 +m 15 43 +l 15 0 +m 16 43 +l 16 0 +m 31 19 +l 0 19 + +220 31 15 65 +m 31 0 +l 0 0 +l 0 19 +l 31 19 +l 31 0 +m 1 19 +l 1 0 +m 2 19 +l 2 0 +m 3 19 +l 3 0 +m 4 19 +l 4 0 +m 5 19 +l 5 0 +m 6 0 +l 6 19 +m 7 19 +l 7 0 +m 8 19 +l 8 0 +m 9 19 +l 9 0 +m 10 19 +l 10 0 +m 11 19 +l 11 0 +m 12 0 +l 12 19 +m 13 19 +l 13 0 +m 14 19 +l 14 0 +m 15 19 +l 15 0 +m 16 19 +l 16 0 +m 17 19 +l 17 0 +m 18 0 +l 18 19 +m 19 19 +l 19 0 +m 20 19 +l 20 0 +m 21 19 +l 21 0 +m 22 19 +l 22 0 +m 23 19 +l 23 0 +m 24 0 +l 24 19 +m 25 19 +l 25 0 +m 26 19 +l 26 0 +m 27 19 +l 27 0 +m 28 19 +l 28 0 +m 29 19 +l 29 0 +m 30 19 +l 30 0 + +221 15 7 33 +m 0 0 +l 0 43 +l 15 43 +l 15 0 +l 0 0 +m 2 43 +l 2 0 +m 4 43 +l 4 0 +m 6 43 +l 6 0 +m 8 43 +l 8 0 +m 10 43 +l 10 0 +m 12 43 +l 12 0 +m 1 43 +l 1 0 +m 3 43 +l 3 0 +m 5 43 +l 5 0 +m 7 43 +l 7 0 +m 9 43 +l 9 0 +m 11 43 +l 11 0 +m 13 43 +l 13 0 +m 14 43 +l 14 0 + +222 30 15 33 +m 15 0 +l 15 43 +l 30 43 +l 30 0 +l 15 0 +m 17 43 +l 17 0 +m 19 43 +l 19 0 +m 21 43 +l 21 0 +m 23 43 +l 23 0 +m 25 43 +l 25 0 +m 27 43 +l 27 0 +m 16 43 +l 16 0 +m 18 43 +l 18 0 +m 20 43 +l 20 0 +m 22 43 +l 22 0 +m 24 43 +l 24 0 +m 26 43 +l 26 0 +m 28 43 +l 28 0 +m 29 43 +l 29 0 + +223 31 15 65 +m 31 24 +l 0 24 +l 0 43 +l 31 43 +l 31 24 +m 1 43 +l 1 24 +m 2 43 +l 2 24 +m 3 43 +l 3 24 +m 4 43 +l 4 24 +m 5 43 +l 5 24 +m 6 24 +l 6 43 +m 7 43 +l 7 24 +m 8 43 +l 8 24 +m 9 43 +l 9 24 +m 10 43 +l 10 24 +m 11 43 +l 11 24 +m 12 24 +l 12 43 +m 13 43 +l 13 24 +m 14 43 +l 14 24 +m 15 43 +l 15 24 +m 16 43 +l 16 24 +m 17 43 +l 17 24 +m 18 24 +l 18 43 +m 19 43 +l 19 24 +m 20 43 +l 20 24 +m 21 43 +l 21 24 +m 22 43 +l 22 24 +m 23 43 +l 23 24 +m 24 24 +l 24 43 +m 25 43 +l 25 24 +m 26 43 +l 26 24 +m 27 43 +l 27 24 +m 28 43 +l 28 24 +m 29 43 +l 29 24 +m 30 43 +l 30 24 + +224 33 16 12 +m 28 0 +l 19 27 +l 15 30 +l 5 30 +l 2 27 +l 0 20 +l 0 10 +l 2 3 +l 5 0 +l 15 0 +l 19 3 +l 28 30 + +225 28 14 12 +m 0 18 +l 20 18 +l 23 21 +l 23 26 +l 20 28 +l 0 28 +l 0 -9 +m 20 18 +l 23 15 +l 23 6 +l 20 4 +l 0 4 + +226 25 12 4 +m 0 0 +l 0 34 +l 20 34 +l 20 28 + +227 30 15 6 +m 20 0 +l 20 32 +m 5 32 +l 5 0 +m 0 32 +l 25 32 + +228 29 14 7 +m 24 3 +l 24 0 +l 0 0 +l 17 22 +l 0 42 +l 24 42 +l 24 39 + +229 36 18 14 +m 5 24 +l 16 24 +l 19 22 +l 21 20 +l 21 4 +l 19 2 +l 16 0 +l 5 0 +l 2 2 +l 0 4 +l 0 20 +l 2 22 +l 14 30 +l 31 30 + +230 28 14 14 +m 3 27 +l 3 11 +l 5 5 +l 8 2 +l 17 2 +l 21 5 +l 23 10 +m 23 27 +l 23 9 +m 8 2 +l 8 -4 +l 4 -10 +m 7 -4 +l 7 -4 + +231 36 18 9 +m 0 27 +l 3 30 +l 12 30 +l 14 27 +l 14 -3 +m 14 21 +l 23 30 +l 29 30 +l 31 29 + +232 26 13 20 +m 0 43 +l 21 43 +m 11 43 +l 11 29 +m 21 20 +l 20 13 +l 16 10 +l 5 10 +l 2 13 +l 0 20 +l 2 26 +l 5 29 +l 16 29 +l 20 26 +l 21 19 +l 21 20 +m 0 -4 +l 21 -4 +m 11 -4 +l 11 10 + +233 35 17 15 +m 10 42 +l 21 42 +l 30 35 +l 31 28 +l 31 14 +l 30 7 +l 21 0 +l 10 0 +l 1 7 +l 0 14 +l 0 28 +l 1 35 +l 10 42 +m 0 21 +l 31 21 + +234 36 18 20 +m 0 0 +l 10 0 +l 10 11 +l 8 12 +l 3 15 +l 0 19 +l 0 28 +l 1 37 +l 3 41 +l 9 42 +l 20 42 +l 26 41 +l 29 36 +l 30 28 +l 30 19 +l 27 15 +l 22 12 +l 20 11 +l 20 0 +l 30 0 + +235 26 13 16 +m 5 24 +l 16 24 +l 19 22 +l 21 20 +l 21 4 +l 19 2 +l 16 0 +l 5 0 +l 2 2 +l 0 4 +l 0 20 +l 2 22 +l 5 24 +m 16 24 +l 0 43 +l 21 43 + +236 47 23 23 +m 21 10 +l 20 3 +l 16 0 +l 5 0 +l 2 3 +l 0 10 +l 2 16 +l 5 19 +l 16 19 +l 20 16 +l 21 9 +l 21 10 +l 23 16 +l 26 19 +l 37 19 +l 41 16 +l 42 9 +l 42 10 +l 41 3 +l 37 0 +l 26 0 +l 23 3 +l 21 10 + +237 25 12 15 +m 5 0 +l 2 3 +l 0 10 +l 0 21 +l 2 27 +l 5 30 +l 16 30 +l 20 27 +l 21 20 +l 21 10 +l 20 3 +l 16 0 +l 5 0 +m 17 38 +l 4 -7 + +238 30 15 14 +m 24 42 +l 15 41 +l 8 39 +l 2 34 +l 0 30 +l 0 14 +m 24 0 +l 15 1 +l 8 3 +l 2 8 +l 0 12 +l 0 28 +m 0 22 +l 23 22 + +239 33 16 10 +m 0 0 +l 0 29 +l 1 36 +l 3 41 +l 8 42 +l 19 42 +l 24 41 +l 26 36 +l 27 29 +l 27 0 + +240 26 13 6 +m 0 17 +l 20 17 +m 0 5 +l 21 5 +m 0 28 +l 21 28 + +241 26 13 6 +m 0 0 +l 21 0 +m 0 27 +l 20 27 +m 10 43 +l 10 12 + +242 26 13 5 +m 21 0 +l 0 0 +m 0 43 +l 20 27 +l 0 12 + +243 26 13 5 +m 0 0 +l 21 0 +m 21 43 +l 1 27 +l 21 12 + +244 25 12 9 +m 20 41 +l 18 42 +l 14 43 +l 11 43 +l 7 42 +l 4 41 +l 2 39 +l 0 33 +l 0 -3 + +245 25 12 9 +m 0 -1 +l 2 -2 +l 6 -3 +l 9 -3 +l 13 -2 +l 16 -1 +l 18 1 +l 20 7 +l 20 43 + +246 29 14 12 +m 11 39 +l 9 39 +l 9 43 +l 11 43 +l 11 39 +m 11 0 +l 9 0 +l 9 4 +l 11 4 +l 11 0 +m 0 22 +l 21 22 + +247 31 15 8 +m 1 26 +l 7 29 +l 16 25 +l 24 29 +m 0 17 +l 6 20 +l 15 16 +l 23 20 + +248 27 13 12 +m 21 34 +l 20 27 +l 16 24 +l 5 24 +l 2 27 +l 0 34 +l 2 40 +l 5 43 +l 16 43 +l 20 40 +l 21 33 +l 21 34 + +249 9 4 13 +m 2 0 +l 4 0 +l 4 8 +l 2 8 +l 2 0 +l 0 0 +l 0 8 +l 2 8 +l 2 4 +m 3 8 +l 3 0 +m 1 8 +l 1 0 + +250 9 4 13 +m 2 0 +l 0 0 +l 0 4 +l 4 4 +l 4 0 +l 2 0 +l 2 4 +m 1 4 +l 1 0 +m 3 4 +l 3 0 +m 0 -1 +l 0 -1 + +251 35 17 5 +m 30 38 +l 30 43 +l 15 43 +l 15 0 +l 0 27 + +252 25 12 9 +m 0 24 +l 0 43 +m 0 34 +l 2 40 +l 5 43 +l 15 43 +l 19 40 +l 20 34 +l 20 24 + +253 21 10 11 +m 1 39 +l 4 42 +l 6 43 +l 13 43 +l 16 41 +l 16 37 +l 15 35 +l 10 34 +l 7 33 +l 0 25 +l 15 25 + +254 15 7 33 +m 0 0 +l 0 19 +l 15 19 +l 15 0 +l 0 0 +m 1 19 +l 1 0 +m 2 19 +l 2 0 +m 3 19 +l 3 0 +m 4 19 +l 4 0 +m 5 19 +l 5 0 +m 6 0 +l 6 19 +m 7 19 +l 7 0 +m 8 19 +l 8 0 +m 9 19 +l 9 0 +m 10 19 +l 10 0 +m 11 19 +l 11 0 +m 12 0 +l 12 19 +m 13 19 +l 13 0 +m 14 19 +l 14 0 diff --git a/cd/etc/vectorfont30.txt b/cd/etc/vectorfont30.txt new file mode 100755 index 0000000..ae35221 --- /dev/null +++ b/cd/etc/vectorfont30.txt @@ -0,0 +1,2145 @@ +Complex III +25 25 12 -7 + + +32 21 10 0 + +33 11 5 12 +m 1 21 +l 0 19 +l 1 7 +l 2 19 +l 1 21 +m 1 19 +l 1 13 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +34 15 7 16 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 +m 8 24 +l 7 23 +l 6 24 +l 7 25 +l 8 24 +l 8 22 +l 7 20 +l 6 19 + +35 19 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 20 10 38 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 13 18 +l 12 17 +l 13 16 +l 14 17 +l 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 14 7 +m 0 16 +l 2 14 +l 4 13 +l 10 11 +l 12 10 +l 13 9 +l 14 7 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 +l 0 4 +l 1 5 +l 2 4 +l 1 3 + +37 22 11 29 +m 0 0 +l 18 21 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 23 11 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 9 4 8 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 + +40 14 7 18 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 +m 5 23 +l 3 19 +l 2 16 +l 1 11 +l 1 7 +l 2 2 +l 3 -1 +l 5 -5 + +41 14 7 18 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 +m 2 23 +l 4 19 +l 5 16 +l 6 11 +l 6 7 +l 5 2 +l 4 -1 +l 2 -5 + +42 16 8 6 +m 5 21 +l 5 9 +m 0 18 +l 10 12 +m 10 18 +l 0 12 + +43 26 13 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 9 4 8 +m 2 1 +l 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +45 26 13 2 +m 0 9 +l 18 9 + +46 11 5 4 +m 1 0 +l 0 1 +l 1 2 +l 2 1 + +47 22 11 2 +m 18 25 +l 0 -7 + +48 20 10 35 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 +l 4 20 +l 3 19 +l 2 17 +l 1 12 +l 1 9 +l 2 4 +l 3 2 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 11 2 +l 12 4 +l 13 9 +l 13 12 +l 12 17 +l 11 19 +l 10 20 + +49 15 7 8 +m 0 17 +l 2 18 +l 5 21 +l 5 0 +m 4 20 +l 4 0 +m 0 0 +l 9 0 + +50 20 10 40 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 10 11 +l 5 9 +l 3 8 +l 1 6 +l 0 3 +l 0 0 +m 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 9 11 +l 5 9 +m 0 2 +l 1 3 +l 3 3 +l 8 1 +l 11 1 +l 13 2 +l 14 3 +m 3 3 +l 8 0 +l 12 0 +l 13 1 +l 14 3 + +51 19 9 41 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 18 +l 13 15 +l 12 13 +l 9 12 +l 6 12 +m 9 21 +l 11 20 +l 12 18 +l 12 15 +l 11 13 +l 9 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 12 10 +l 13 7 +l 13 4 +l 12 2 +l 11 1 + +52 21 10 6 +m 10 19 +l 10 0 +m 11 0 +l 11 21 +l 0 6 +l 16 6 + +53 20 10 33 +m 2 21 +l 0 11 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 8 14 +l 10 13 +l 12 11 +l 13 8 +l 13 6 +l 12 3 +l 10 1 +l 8 0 +m 2 21 +l 12 21 +m 2 20 +l 7 20 +l 12 21 + +54 20 10 44 +m 12 18 +l 11 17 +l 12 16 +l 13 17 +l 13 18 +l 12 20 +l 10 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 7 +l 13 10 +l 11 12 +l 8 13 +l 7 13 +l 4 12 +l 2 10 +l 1 7 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 + +55 20 10 26 +m 0 21 +l 0 15 +m 0 17 +l 1 19 +l 3 21 +l 5 21 +l 10 18 +l 12 18 +l 13 19 +l 14 21 +m 1 19 +l 3 20 +l 5 20 +l 10 18 +m 14 21 +l 14 18 +l 13 15 +l 9 10 +l 8 8 +l 7 5 +l 7 0 +m 13 15 +l 8 10 +l 7 8 +l 6 5 +l 6 0 + +56 20 10 55 +m 5 21 +l 2 20 +l 1 18 +l 1 15 +l 2 13 +l 5 12 +l 9 12 +l 12 13 +l 13 15 +l 13 18 +l 12 20 +l 9 21 +l 5 21 +l 3 20 +l 2 18 +l 2 15 +l 3 13 +l 5 12 +m 9 12 +l 11 13 +l 12 15 +l 12 18 +l 11 20 +l 9 21 +m 5 12 +l 2 11 +l 1 10 +l 0 8 +l 0 4 +l 1 2 +l 2 1 +l 5 0 +l 9 0 +l 12 1 +l 13 2 +l 14 4 +l 14 8 +l 13 10 +l 12 11 +l 9 12 +m 5 12 +l 3 11 +l 2 10 +l 1 8 +l 1 4 +l 2 2 +l 3 1 +l 5 0 +m 9 0 +l 11 1 +l 12 2 +l 13 4 +l 13 8 +l 12 10 +l 11 11 + +57 20 10 44 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 8 21 +l 11 20 +l 13 18 +l 14 15 +l 14 9 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 4 0 +l 2 1 +l 1 3 +l 1 4 +l 2 5 +l 3 4 +l 2 3 +m 6 8 +l 4 9 +l 2 11 +l 1 14 +l 1 15 +l 2 18 +l 4 20 +l 6 21 +m 8 21 +l 10 20 +l 12 18 +l 13 15 +l 13 9 +l 12 5 +l 11 3 +l 9 1 + +58 15 7 10 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 14 7 12 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 26 13 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 19 9 29 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 10 20 +l 11 19 +l 12 17 +l 12 15 +l 11 13 +l 10 12 +l 6 10 +l 6 7 +m 7 21 +l 9 20 +l 10 19 +l 11 17 +l 11 15 +l 10 13 +l 8 11 +m 6 2 +l 5 1 +l 6 0 +l 7 1 +l 6 2 + +64 24 12 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 21 10 12 +m 9 21 +l 2 0 +m 9 21 +l 16 0 +m 9 18 +l 15 0 +m 4 6 +l 13 6 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +66 22 11 39 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 14 12 +l 12 11 +m 4 11 +l 12 11 +l 15 10 +l 16 9 +l 17 7 +l 17 4 +l 16 2 +l 15 1 +l 12 0 +l 0 0 +m 12 11 +l 14 10 +l 15 9 +l 16 7 +l 16 4 +l 15 2 +l 14 1 +l 12 0 + +67 21 10 30 +m 14 18 +l 15 15 +l 15 21 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +l 5 1 +l 7 0 + +68 22 11 26 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 0 21 +l 10 21 +l 13 20 +l 15 18 +l 16 16 +l 17 13 +l 17 8 +l 16 5 +l 15 3 +l 13 1 +l 10 0 +l 0 0 +m 10 21 +l 12 20 +l 14 18 +l 15 16 +l 16 13 +l 16 8 +l 15 5 +l 14 3 +l 12 1 +l 10 0 + +69 21 10 16 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 10 15 +l 10 7 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 4 11 +l 10 11 +m 0 0 +l 16 0 +l 16 6 +l 15 0 + +70 20 10 14 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 10 15 +l 10 7 +m 0 21 +l 16 21 +l 16 15 +l 15 21 +m 4 11 +l 10 11 +m 0 0 +l 7 0 + +71 23 11 35 +m 14 18 +l 15 15 +l 15 21 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 13 +l 1 8 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 14 8 +l 14 0 +m 15 8 +l 15 0 +m 11 8 +l 18 8 + +72 24 12 18 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 16 0 +l 16 21 +m 17 21 +l 17 0 +m 0 21 +l 7 21 +m 13 21 +l 20 21 +m 4 11 +l 16 11 +m 0 0 +l 7 0 +m 13 0 +l 20 0 + +73 11 5 8 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 0 21 +l 7 21 +m 0 0 +l 7 0 + +74 15 7 17 +m 8 21 +l 8 4 +l 7 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 7 21 +l 7 4 +l 6 1 +l 5 0 +m 4 21 +l 11 21 + +75 22 11 18 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 17 21 +l 4 8 +m 9 12 +l 17 0 +m 8 12 +l 16 0 +m 0 21 +l 7 21 +m 13 21 +l 19 21 +m 0 0 +l 7 0 +m 13 0 +l 19 0 + +76 18 9 10 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 0 21 +l 7 21 +m 0 0 +l 15 0 +l 15 6 +l 14 0 + +77 25 12 18 +m 3 0 +l 3 21 +m 4 21 +l 10 3 +m 3 21 +l 10 0 +l 17 21 +l 17 0 +m 18 0 +l 18 21 +m 0 21 +l 4 21 +m 17 21 +l 21 21 +m 0 0 +l 6 0 +m 14 0 +l 21 0 + +78 23 11 13 +m 3 0 +l 3 21 +m 4 21 +l 16 2 +m 4 19 +l 16 0 +l 16 21 +m 0 21 +l 4 21 +m 13 21 +l 19 21 +m 0 0 +l 6 0 + +79 22 11 40 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 9 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 5 +l 15 9 +l 15 12 +l 14 16 +l 13 18 +l 11 20 +l 9 21 + +80 22 11 24 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 14 +l 16 12 +l 15 11 +l 12 10 +l 4 10 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 14 +l 15 12 +l 14 11 +l 12 10 +m 0 0 +l 7 0 + +81 22 11 58 +m 7 21 +l 4 20 +l 2 18 +l 1 16 +l 0 12 +l 0 9 +l 1 5 +l 2 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +l 15 5 +l 16 9 +l 16 12 +l 15 16 +l 14 18 +l 12 20 +l 9 21 +l 7 21 +l 5 20 +l 3 18 +l 2 16 +l 1 12 +l 1 9 +l 2 5 +l 3 3 +l 5 1 +l 7 0 +m 9 0 +l 11 1 +l 13 3 +l 14 5 +l 15 9 +l 15 12 +l 14 16 +l 13 18 +l 11 20 +l 9 21 +m 4 2 +l 4 3 +l 5 5 +l 7 6 +l 8 6 +l 10 5 +l 11 3 +l 12 -4 +l 13 -5 +l 15 -5 +l 16 -3 +l 16 -2 +m 11 3 +l 12 -1 +l 13 -3 +l 14 -4 +l 15 -4 +l 16 -3 + +82 22 11 38 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 0 21 +l 12 21 +l 15 20 +l 16 19 +l 17 17 +l 17 15 +l 16 13 +l 15 12 +l 12 11 +l 4 11 +m 12 21 +l 14 20 +l 15 19 +l 16 17 +l 16 15 +l 15 13 +l 14 12 +l 12 11 +m 0 0 +l 7 0 +m 9 11 +l 11 10 +l 12 9 +l 15 2 +l 16 1 +l 17 1 +l 18 2 +m 11 10 +l 12 8 +l 14 1 +l 15 0 +l 17 0 +l 18 2 +l 18 3 + +83 20 10 32 +m 13 18 +l 14 21 +l 14 15 +l 13 18 +l 11 20 +l 8 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 14 7 +m 0 16 +l 2 14 +l 4 13 +l 10 11 +l 12 10 +l 13 9 +l 14 7 +l 14 3 +l 12 1 +l 9 0 +l 6 0 +l 3 1 +l 1 3 +l 0 6 +l 0 0 +l 1 3 + +84 19 9 12 +m 7 0 +l 7 21 +m 8 21 +l 8 0 +m 1 21 +l 0 15 +l 0 21 +l 15 21 +l 15 15 +l 14 21 +m 4 0 +l 11 0 + +85 24 12 19 +m 3 21 +l 3 6 +l 4 3 +l 6 1 +l 9 0 +l 11 0 +l 14 1 +l 16 3 +l 17 6 +l 17 21 +m 4 21 +l 4 6 +l 5 3 +l 7 1 +l 9 0 +m 0 21 +l 7 21 +m 14 21 +l 20 21 + +86 20 10 10 +m 2 21 +l 9 0 +m 3 21 +l 9 3 +m 16 21 +l 9 0 +m 0 21 +l 6 21 +m 12 21 +l 18 21 + +87 24 12 16 +m 3 21 +l 7 0 +m 4 21 +l 7 5 +m 11 21 +l 7 0 +m 11 21 +l 15 0 +m 12 21 +l 15 5 +m 19 21 +l 15 0 +m 0 21 +l 7 21 +m 16 21 +l 22 21 + +88 20 10 14 +m 2 21 +l 15 0 +m 3 21 +l 16 0 +m 16 21 +l 2 0 +m 0 21 +l 6 21 +m 12 21 +l 18 21 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +89 21 10 14 +m 2 21 +l 9 10 +l 9 0 +m 3 21 +l 10 10 +l 10 0 +m 17 21 +l 10 10 +m 0 21 +l 6 21 +m 13 21 +l 19 21 +m 6 0 +l 13 0 + +90 20 10 12 +m 0 0 +l 13 21 +m 14 21 +l 1 0 +m 1 21 +l 0 15 +l 0 21 +l 14 21 +m 0 0 +l 14 0 +l 14 6 +l 13 0 + +91 15 7 8 +m 0 25 +l 0 -7 +m 1 -7 +l 1 25 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +92 22 11 2 +m 0 25 +l 18 -7 + +93 16 8 8 +m 6 25 +l 6 -7 +m 7 -7 +l 7 25 +m 0 25 +l 7 25 +m 0 -7 +l 7 -7 + +94 20 10 3 +m 0 18 +l 7 25 +l 14 18 + +95 24 12 2 +m 0 -2 +l 20 -2 + +96 9 4 8 +m 0 24 +l 1 23 +l 2 24 +l 1 25 +l 0 24 +l 0 22 +l 1 20 +l 2 19 + +97 20 10 35 +m 2 12 +l 2 11 +l 1 11 +l 1 12 +l 2 13 +l 4 14 +l 8 14 +l 10 13 +l 11 12 +l 12 10 +l 12 3 +l 13 1 +l 14 0 +m 11 12 +l 11 3 +l 12 1 +l 14 0 +l 15 0 +m 11 10 +l 10 9 +l 4 8 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 4 0 +l 7 0 +l 9 1 +l 11 3 +m 4 8 +l 2 7 +l 1 5 +l 1 3 +l 2 1 +l 4 0 + +98 21 10 28 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 4 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 8 0 +l 6 1 +l 4 3 +m 10 14 +l 12 13 +l 14 11 +l 15 8 +l 15 6 +l 14 3 +l 12 1 +l 10 0 +m 0 21 +l 4 21 + +99 19 9 26 +m 12 11 +l 11 10 +l 12 9 +l 13 10 +l 13 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 + +100 21 10 30 +m 12 21 +l 12 0 +m 13 21 +l 13 0 +m 12 11 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 10 1 +l 12 3 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 9 21 +l 13 21 +m 12 0 +l 16 0 + +101 19 9 28 +m 1 8 +l 13 8 +l 13 10 +l 12 12 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +m 12 8 +l 12 11 +l 11 13 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 + +102 13 6 18 +m 8 20 +l 7 19 +l 8 18 +l 9 19 +l 9 20 +l 8 21 +l 6 21 +l 4 20 +l 3 18 +l 3 0 +m 6 21 +l 5 20 +l 4 18 +l 4 0 +m 0 14 +l 8 14 +m 0 0 +l 7 0 + +103 19 9 54 +m 6 14 +l 4 13 +l 3 12 +l 2 10 +l 2 8 +l 3 6 +l 4 5 +l 6 4 +l 8 4 +l 10 5 +l 11 6 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 6 14 +m 4 13 +l 3 11 +l 3 7 +l 4 5 +m 10 5 +l 11 7 +l 11 11 +l 10 13 +m 11 12 +l 12 13 +l 14 14 +l 14 13 +l 12 13 +m 3 6 +l 2 5 +l 1 3 +l 1 2 +l 2 0 +l 5 -1 +l 10 -1 +l 13 -2 +l 14 -3 +m 1 2 +l 2 1 +l 5 0 +l 10 0 +l 13 -1 +l 14 -3 +l 14 -4 +l 13 -6 +l 10 -7 +l 4 -7 +l 1 -6 +l 0 -4 +l 0 -3 +l 1 -1 +l 4 0 + +104 22 11 21 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 0 21 +l 4 21 +m 0 0 +l 7 0 +m 11 0 +l 18 0 + +105 11 5 13 +m 3 21 +l 2 20 +l 3 19 +l 4 20 +l 3 21 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 0 14 +l 4 14 +m 0 0 +l 7 0 + +106 11 5 21 +m 5 21 +l 4 20 +l 5 19 +l 6 20 +l 5 21 +m 6 14 +l 6 -4 +l 5 -6 +l 3 -7 +l 1 -7 +l 0 -6 +l 0 -5 +l 1 -4 +l 2 -5 +l 1 -6 +m 5 14 +l 5 -4 +l 4 -6 +l 3 -7 +m 2 14 +l 6 14 + +107 21 10 18 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 14 14 +l 4 4 +m 9 8 +l 15 0 +m 8 8 +l 14 0 +m 0 21 +l 4 21 +m 11 14 +l 17 14 +m 0 0 +l 7 0 +m 11 0 +l 17 0 + +108 11 5 8 +m 3 0 +l 3 21 +m 4 21 +l 4 0 +m 0 21 +l 4 21 +m 0 0 +l 7 0 + +109 33 16 34 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 15 11 +l 17 13 +l 20 14 +l 22 14 +l 25 13 +l 26 11 +l 26 0 +m 22 14 +l 24 13 +l 25 11 +l 25 0 +m 0 14 +l 4 14 +m 0 0 +l 7 0 +m 11 0 +l 18 0 +m 22 0 +l 29 0 + +110 22 11 21 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 4 11 +l 6 13 +l 9 14 +l 11 14 +l 14 13 +l 15 11 +l 15 0 +m 11 14 +l 13 13 +l 14 11 +l 14 0 +m 0 14 +l 4 14 +m 0 0 +l 7 0 +m 11 0 +l 18 0 + +111 19 9 32 +m 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 8 +l 13 11 +l 11 13 +l 8 14 +l 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 + +112 21 10 30 +m 3 -7 +l 3 14 +m 4 14 +l 4 -7 +m 4 11 +l 6 13 +l 8 14 +l 10 14 +l 13 13 +l 15 11 +l 16 8 +l 16 6 +l 15 3 +l 13 1 +l 10 0 +l 8 0 +l 6 1 +l 4 3 +m 10 14 +l 12 13 +l 14 11 +l 15 8 +l 15 6 +l 14 3 +l 12 1 +l 10 0 +m 0 14 +l 4 14 +m 0 -7 +l 7 -7 + +113 20 10 28 +m 12 -7 +l 12 14 +m 13 14 +l 13 -7 +m 12 11 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 10 1 +l 12 3 +m 6 14 +l 4 13 +l 2 11 +l 1 8 +l 1 6 +l 2 3 +l 4 1 +l 6 0 +m 9 -7 +l 16 -7 + +114 17 8 18 +m 3 14 +l 3 0 +m 4 14 +l 4 0 +m 4 8 +l 5 11 +l 7 13 +l 9 14 +l 12 14 +l 13 13 +l 13 12 +l 12 11 +l 11 12 +l 12 13 +m 0 14 +l 4 14 +m 0 0 +l 7 0 + +115 17 8 30 +m 10 12 +l 11 14 +l 11 10 +l 10 12 +l 9 13 +l 7 14 +l 3 14 +l 1 13 +l 0 12 +l 0 10 +l 1 9 +l 3 8 +l 8 6 +l 10 5 +l 11 4 +m 0 11 +l 1 10 +l 3 9 +l 8 7 +l 10 6 +l 11 5 +l 11 2 +l 10 1 +l 8 0 +l 4 0 +l 2 1 +l 1 2 +l 0 4 +l 0 0 +l 1 2 + +116 15 7 13 +m 3 21 +l 3 4 +l 4 1 +l 6 0 +l 8 0 +l 10 1 +l 11 3 +m 4 21 +l 4 4 +l 5 1 +l 6 0 +m 0 14 +l 8 14 + +117 22 11 21 +m 3 14 +l 3 3 +l 4 1 +l 7 0 +l 9 0 +l 12 1 +l 14 3 +m 4 14 +l 4 3 +l 5 1 +l 7 0 +m 14 14 +l 14 0 +m 15 14 +l 15 0 +m 0 14 +l 4 14 +m 11 14 +l 15 14 +m 14 0 +l 18 0 + +118 18 9 10 +m 2 14 +l 8 0 +m 3 14 +l 8 2 +m 14 14 +l 8 0 +m 0 14 +l 6 14 +m 10 14 +l 16 14 + +119 24 12 16 +m 3 14 +l 7 0 +m 4 14 +l 7 3 +m 11 14 +l 7 0 +m 11 14 +l 15 0 +m 12 14 +l 15 3 +m 19 14 +l 15 0 +m 0 14 +l 7 14 +m 16 14 +l 22 14 + +120 20 10 14 +m 2 14 +l 13 0 +m 3 14 +l 14 0 +m 14 14 +l 2 0 +m 0 14 +l 6 14 +m 10 14 +l 16 14 +m 0 0 +l 6 0 +m 10 0 +l 16 0 + +121 19 9 17 +m 2 14 +l 8 0 +m 3 14 +l 8 2 +m 14 14 +l 8 0 +l 6 -4 +l 4 -6 +l 2 -7 +l 1 -7 +l 0 -6 +l 1 -5 +l 2 -6 +m 0 14 +l 6 14 +m 10 14 +l 16 14 + +122 18 9 12 +m 11 14 +l 0 0 +m 12 14 +l 1 0 +m 1 14 +l 0 10 +l 0 14 +l 12 14 +m 0 0 +l 12 0 +l 12 4 +l 11 0 + +123 12 6 37 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +m 3 24 +l 2 22 +l 2 20 +l 3 18 +l 4 17 +l 5 15 +l 5 13 +l 4 11 +l 0 9 +l 4 7 +l 5 5 +l 5 3 +l 4 1 +l 3 0 +l 2 -2 +l 2 -4 +l 3 -6 +m 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 7 3 2 +m 0 25 +l 0 -7 + +125 11 5 37 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +m 2 24 +l 3 22 +l 3 20 +l 2 18 +l 1 17 +l 0 15 +l 0 13 +l 1 11 +l 5 9 +l 1 7 +l 0 5 +l 0 3 +l 1 1 +l 2 0 +l 3 -2 +l 3 -4 +l 2 -6 +m 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 26 13 22 +m 0 6 +l 0 8 +l 1 11 +l 3 12 +l 5 12 +l 7 11 +l 11 8 +l 13 7 +l 15 7 +l 17 8 +l 18 10 +m 0 8 +l 1 10 +l 3 11 +l 5 11 +l 7 10 +l 11 7 +l 13 6 +l 15 6 +l 17 7 +l 18 10 +l 18 12 diff --git a/cd/etc/vectorfont31.txt b/cd/etc/vectorfont31.txt new file mode 100755 index 0000000..0848ef3 --- /dev/null +++ b/cd/etc/vectorfont31.txt @@ -0,0 +1,2302 @@ +Italic III +25 25 12 -7 + + +32 21 10 0 + +33 15 7 13 +m 6 21 +l 5 20 +l 3 8 +m 6 20 +l 3 8 +m 6 21 +l 7 20 +l 3 8 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +34 23 11 12 +m 8 23 +l 5 23 +l 7 25 +l 8 23 +l 7 21 +l 5 19 +m 16 23 +l 13 23 +l 15 25 +l 16 23 +l 15 21 +l 13 19 + +35 19 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 21 10 34 +m 10 25 +l 2 -4 +m 15 25 +l 7 -4 +m 16 17 +l 15 16 +l 16 15 +l 17 16 +l 17 17 +l 16 19 +l 15 20 +l 12 21 +l 8 21 +l 5 20 +l 3 18 +l 3 16 +l 4 14 +l 5 13 +l 12 9 +l 14 7 +m 3 16 +l 5 14 +l 12 10 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 + +37 22 11 29 +m 0 0 +l 18 21 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 23 11 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 15 7 6 +m 8 23 +l 5 23 +l 7 25 +l 8 23 +l 7 21 +l 5 19 + +40 15 7 16 +m 12 25 +l 8 22 +l 5 19 +l 3 16 +l 1 12 +l 0 7 +l 0 3 +l 1 -2 +l 2 -5 +l 3 -7 +m 8 22 +l 5 18 +l 3 14 +l 2 11 +l 1 6 +l 1 1 + +41 16 8 16 +m 9 25 +l 10 23 +l 11 20 +l 12 15 +l 12 11 +l 11 6 +l 9 2 +l 7 -1 +l 4 -4 +l 0 -7 +m 9 25 +l 10 22 +l 11 17 +l 11 12 +l 10 7 +l 9 4 + +42 17 8 6 +m 6 21 +l 6 9 +m 1 18 +l 11 12 +m 1 12 +l 11 18 + +43 26 13 4 +m 13 18 +l 8 0 +m 2 9 +l 20 9 + +44 12 6 6 +m 3 0 +l 0 0 +l 2 2 +l 3 0 +l 2 -2 +l 0 -4 + +45 26 13 2 +m 0 9 +l 18 9 + +46 11 5 4 +m 1 0 +l 0 1 +l 1 2 +l 2 1 + +47 26 13 2 +m 26 25 +l 0 -7 + +48 21 10 37 +m 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +l 13 6 +l 14 9 +l 15 13 +l 15 16 +l 14 19 +l 13 20 +l 11 21 +l 9 21 +l 7 20 +l 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 5 +l 2 2 +l 4 0 +m 6 0 +l 8 1 +l 10 3 +l 12 6 +l 13 9 +l 14 13 +l 14 16 +l 13 19 + +49 14 7 11 +m 1 0 +l 9 21 +m 7 17 +l 2 0 +m 3 0 +l 9 21 +l 6 18 +l 3 16 +l 1 15 +m 8 18 +l 4 16 + +50 21 10 38 +m 6 17 +l 7 16 +l 6 15 +l 5 16 +l 5 17 +l 6 19 +l 7 20 +l 10 21 +l 13 21 +l 16 20 +l 17 18 +l 17 16 +l 16 14 +l 14 12 +l 11 10 +l 7 8 +l 4 6 +l 2 4 +l 0 0 +m 13 21 +l 15 20 +l 16 18 +l 16 16 +l 15 14 +l 13 12 +l 7 8 +m 1 2 +l 2 3 +l 4 3 +l 9 1 +l 12 1 +l 14 2 +l 15 4 +m 4 3 +l 9 0 +l 12 0 +l 14 1 +l 15 4 + +51 21 10 46 +m 5 17 +l 6 16 +l 5 15 +l 4 16 +l 4 17 +l 5 19 +l 6 20 +l 9 21 +l 12 21 +l 15 20 +l 16 18 +l 16 16 +l 15 14 +l 12 12 +l 9 11 +m 12 21 +l 14 20 +l 15 18 +l 15 16 +l 14 14 +l 12 12 +m 7 11 +l 9 11 +l 12 10 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 9 11 +l 11 10 +l 12 9 +l 13 7 +l 13 4 +l 12 2 +l 11 1 +l 9 0 + +52 21 10 7 +m 14 20 +l 8 0 +m 15 21 +l 9 0 +m 15 21 +l 0 6 +l 12 6 + +53 21 10 34 +m 7 21 +l 2 11 +m 7 21 +l 17 21 +m 7 20 +l 12 20 +l 17 21 +m 2 11 +l 3 12 +l 6 13 +l 9 13 +l 12 12 +l 13 11 +l 14 9 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 9 13 +l 11 12 +l 12 11 +l 13 9 +l 13 6 +l 12 3 +l 10 1 +l 8 0 + +54 21 10 42 +m 14 18 +l 13 17 +l 14 16 +l 15 17 +l 15 18 +l 14 20 +l 12 21 +l 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 7 0 +l 10 1 +l 12 3 +l 13 5 +l 13 8 +l 12 10 +l 11 11 +l 9 12 +l 6 12 +l 4 11 +l 2 9 +l 1 7 +m 9 21 +l 7 20 +l 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 3 +l 2 1 +m 7 0 +l 9 1 +l 11 3 +l 12 5 +l 12 9 + +55 20 10 24 +m 3 21 +l 1 15 +m 16 21 +l 15 18 +l 13 15 +l 8 9 +l 6 6 +l 5 4 +l 4 0 +m 13 15 +l 7 9 +l 5 6 +l 4 4 +l 3 0 +m 2 18 +l 5 21 +l 7 21 +l 12 18 +m 3 19 +l 5 20 +l 7 20 +l 12 18 +l 14 18 +l 15 19 + +56 21 10 55 +m 9 21 +l 6 20 +l 5 19 +l 4 17 +l 4 14 +l 5 12 +l 7 11 +l 10 11 +l 14 12 +l 15 13 +l 16 15 +l 16 18 +l 15 20 +l 12 21 +l 9 21 +l 7 20 +l 6 19 +l 5 17 +l 5 14 +l 6 12 +l 7 11 +m 10 11 +l 13 12 +l 14 13 +l 15 15 +l 15 18 +l 14 20 +l 12 21 +m 7 11 +l 3 10 +l 1 8 +l 0 6 +l 0 3 +l 1 1 +l 4 0 +l 8 0 +l 12 1 +l 13 2 +l 14 4 +l 14 7 +l 13 9 +l 12 10 +l 10 11 +m 7 11 +l 4 10 +l 2 8 +l 1 6 +l 1 3 +l 2 1 +l 4 0 +m 8 0 +l 11 1 +l 12 2 +l 13 4 +l 13 8 + +57 21 10 42 +m 14 14 +l 13 12 +l 11 10 +l 9 9 +l 6 9 +l 4 10 +l 3 11 +l 2 13 +l 2 16 +l 3 18 +l 5 20 +l 8 21 +l 11 21 +l 13 20 +l 14 19 +l 15 17 +l 15 13 +l 14 9 +l 13 6 +l 11 3 +l 9 1 +l 6 0 +l 3 0 +l 1 1 +l 0 3 +l 0 4 +l 1 5 +l 2 4 +l 1 3 +m 4 10 +l 3 12 +l 3 16 +l 4 18 +l 6 20 +l 8 21 +m 13 20 +l 14 18 +l 14 13 +l 13 9 +l 12 6 +l 10 3 +l 8 1 + +58 14 7 10 +m 4 14 +l 3 13 +l 4 12 +l 5 13 +l 4 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 13 6 12 +m 5 14 +l 4 13 +l 5 12 +l 6 13 +l 5 14 +m 2 0 +l 1 1 +l 2 2 +l 3 1 +l 3 0 +l 2 -2 +l 0 -4 + +60 22 11 3 +m 19 18 +l 0 9 +l 16 0 + +61 26 13 4 +m 3 12 +l 21 12 +m 0 6 +l 18 6 + +62 19 9 3 +m 2 18 +l 16 9 +l -2 0 + +63 23 11 31 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 5 21 +l 9 21 +l 12 20 +l 13 18 +l 13 16 +l 12 14 +l 11 13 +l 5 11 +l 3 10 +l 3 8 +l 4 7 +l 6 7 +m 9 21 +l 11 20 +l 12 18 +l 12 16 +l 11 14 +l 10 13 +l 8 12 +m 2 2 +l 1 1 +l 2 0 +l 3 1 +l 2 2 + +64 24 12 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 23 11 12 +m 15 21 +l 2 0 +m 15 21 +l 16 0 +m 14 19 +l 15 0 +m 6 6 +l 15 6 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +66 24 12 35 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 6 21 +l 17 21 +l 20 20 +l 21 18 +l 21 16 +l 20 13 +l 19 12 +l 16 11 +m 17 21 +l 19 20 +l 20 18 +l 20 16 +l 19 13 +l 18 12 +l 16 11 +m 7 11 +l 16 11 +l 18 10 +l 19 8 +l 19 6 +l 18 3 +l 16 1 +l 12 0 +l 0 0 +m 16 11 +l 17 10 +l 18 8 +l 18 6 +l 17 3 +l 15 1 +l 12 0 + +67 19 9 32 +m 15 19 +l 16 19 +l 17 21 +l 16 15 +l 16 17 +l 15 19 +l 14 20 +l 12 21 +l 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 5 +m 9 21 +l 7 20 +l 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 5 +l 2 2 +l 3 1 +l 5 0 + +68 23 11 26 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 6 21 +l 15 21 +l 18 20 +l 19 19 +l 20 16 +l 20 12 +l 19 8 +l 17 4 +l 15 2 +l 13 1 +l 9 0 +l 0 0 +m 15 21 +l 17 20 +l 18 19 +l 19 16 +l 19 12 +l 18 8 +l 16 4 +l 14 2 +l 12 1 +l 9 0 + +69 23 11 16 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 14 15 +l 12 7 +m 6 21 +l 21 21 +l 20 15 +l 20 21 +m 7 11 +l 13 11 +m 0 0 +l 15 0 +l 17 5 +l 14 0 + +70 23 11 14 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 14 15 +l 12 7 +m 6 21 +l 21 21 +l 20 15 +l 20 21 +m 7 11 +l 13 11 +m 0 0 +l 7 0 + +71 21 10 38 +m 15 19 +l 16 19 +l 17 21 +l 16 15 +l 16 17 +l 15 19 +l 14 20 +l 12 21 +l 9 21 +l 6 20 +l 4 18 +l 2 15 +l 1 12 +l 0 8 +l 0 5 +l 1 2 +l 2 1 +l 5 0 +l 7 0 +l 10 1 +l 12 3 +l 14 7 +m 9 21 +l 7 20 +l 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 5 +l 2 2 +l 3 1 +l 5 0 +m 7 0 +l 9 1 +l 11 3 +l 13 7 +m 10 7 +l 17 7 + +72 26 13 18 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 22 21 +l 16 0 +m 23 21 +l 17 0 +m 6 21 +l 13 21 +m 19 21 +l 26 21 +m 7 11 +l 19 11 +m 0 0 +l 7 0 +m 13 0 +l 20 0 + +73 15 7 8 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 6 21 +l 13 21 +m 0 0 +l 7 0 + +74 18 9 18 +m 14 21 +l 9 4 +l 8 2 +l 7 1 +l 5 0 +l 3 0 +l 1 1 +l 0 3 +l 0 5 +l 1 6 +l 2 5 +l 1 4 +m 13 21 +l 8 4 +l 7 2 +l 5 0 +m 10 21 +l 17 21 + +75 25 12 18 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 23 21 +l 6 8 +m 13 12 +l 17 0 +m 12 12 +l 16 0 +m 6 21 +l 13 21 +m 19 21 +l 25 21 +m 0 0 +l 7 0 +m 13 0 +l 19 0 + +76 20 10 10 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 6 21 +l 13 21 +m 0 0 +l 15 0 +l 17 6 +l 14 0 + +77 27 13 20 +m 9 21 +l 3 0 +m 9 21 +l 10 0 +m 10 21 +l 11 2 +m 23 21 +l 10 0 +m 23 21 +l 17 0 +m 24 21 +l 18 0 +m 6 21 +l 10 21 +m 23 21 +l 27 21 +m 0 0 +l 6 0 +m 14 0 +l 21 0 + +78 25 12 14 +m 9 21 +l 3 0 +m 9 21 +l 16 3 +m 9 18 +l 16 0 +m 22 21 +l 16 0 +m 6 21 +l 9 21 +m 19 21 +l 25 21 +m 0 0 +l 6 0 + +79 21 10 38 +m 10 21 +l 7 20 +l 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 5 +l 2 2 +l 3 1 +l 5 0 +l 8 0 +l 11 1 +l 13 3 +l 15 6 +l 16 9 +l 17 13 +l 17 16 +l 16 19 +l 15 20 +l 13 21 +l 10 21 +l 8 20 +l 6 18 +l 4 15 +l 3 12 +l 2 8 +l 2 5 +l 3 2 +l 5 0 +m 8 0 +l 10 1 +l 12 3 +l 14 6 +l 15 9 +l 16 13 +l 16 16 +l 15 19 +l 13 21 + +80 23 11 22 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 6 21 +l 18 21 +l 21 20 +l 22 18 +l 22 16 +l 21 13 +l 19 11 +l 15 10 +l 7 10 +m 18 21 +l 20 20 +l 21 18 +l 21 16 +l 20 13 +l 18 11 +l 15 10 +m 0 0 +l 7 0 + +81 21 10 55 +m 10 21 +l 7 20 +l 5 18 +l 3 15 +l 2 12 +l 1 8 +l 1 5 +l 2 2 +l 3 1 +l 5 0 +l 8 0 +l 11 1 +l 13 3 +l 15 6 +l 16 9 +l 17 13 +l 17 16 +l 16 19 +l 15 20 +l 13 21 +l 10 21 +l 8 20 +l 6 18 +l 4 15 +l 3 12 +l 2 8 +l 2 5 +l 3 2 +l 5 0 +m 8 0 +l 10 1 +l 12 3 +l 14 6 +l 15 9 +l 16 13 +l 16 16 +l 15 19 +l 13 21 +m 3 2 +l 3 3 +l 4 5 +l 6 6 +l 7 6 +l 9 5 +l 10 3 +l 10 -4 +l 11 -5 +l 13 -5 +l 14 -3 +l 14 -2 +m 10 3 +l 11 -3 +l 12 -4 +l 13 -4 +l 14 -3 + +82 24 12 35 +m 9 21 +l 3 0 +m 10 21 +l 4 0 +m 6 21 +l 17 21 +l 20 20 +l 21 18 +l 21 16 +l 20 13 +l 19 12 +l 16 11 +l 7 11 +m 17 21 +l 19 20 +l 20 18 +l 20 16 +l 19 13 +l 18 12 +l 16 11 +m 12 11 +l 14 10 +l 15 9 +l 16 1 +l 17 0 +l 19 0 +l 20 2 +l 20 3 +m 15 9 +l 17 2 +l 18 1 +l 19 1 +l 20 2 +m 0 0 +l 7 0 + +83 23 11 33 +m 17 19 +l 18 19 +l 19 21 +l 18 15 +l 18 17 +l 17 19 +l 16 20 +l 13 21 +l 9 21 +l 6 20 +l 4 18 +l 4 16 +l 5 14 +l 6 13 +l 13 9 +l 15 7 +m 4 16 +l 6 14 +l 13 10 +l 14 9 +l 15 7 +l 15 4 +l 14 2 +l 13 1 +l 10 0 +l 6 0 +l 3 1 +l 2 2 +l 1 4 +l 1 6 +l 0 0 +l 1 2 +l 2 2 + +84 21 10 12 +m 11 21 +l 5 0 +m 12 21 +l 6 0 +m 5 21 +l 2 15 +l 4 21 +l 19 21 +l 18 15 +l 18 21 +m 2 0 +l 9 0 + +85 23 11 21 +m 5 21 +l 2 10 +l 1 6 +l 1 3 +l 2 1 +l 5 0 +l 9 0 +l 12 1 +l 14 3 +l 15 6 +l 19 21 +m 6 21 +l 3 10 +l 2 6 +l 2 3 +l 3 1 +l 5 0 +m 2 21 +l 9 21 +m 16 21 +l 22 21 + +86 24 12 10 +m 5 21 +l 6 0 +m 6 21 +l 7 2 +m 19 21 +l 6 0 +m 3 21 +l 9 21 +m 15 21 +l 21 21 + +87 26 13 16 +m 5 21 +l 3 0 +m 6 21 +l 4 2 +m 13 21 +l 3 0 +m 13 21 +l 11 0 +m 14 21 +l 12 2 +m 21 21 +l 11 0 +m 2 21 +l 9 21 +m 18 21 +l 24 21 + +88 25 12 14 +m 8 21 +l 15 0 +m 9 21 +l 16 0 +m 22 21 +l 2 0 +m 6 21 +l 12 21 +m 18 21 +l 24 21 +m 0 0 +l 6 0 +m 12 0 +l 18 0 + +89 22 11 14 +m 5 21 +l 9 11 +l 6 0 +m 6 21 +l 10 11 +l 7 0 +m 20 21 +l 10 11 +m 3 21 +l 9 21 +m 16 21 +l 22 21 +m 3 0 +l 10 0 + +90 22 11 12 +m 19 21 +l 0 0 +m 20 21 +l 1 0 +m 7 21 +l 4 15 +l 6 21 +l 20 21 +m 0 0 +l 14 0 +l 16 6 +l 13 0 + +91 19 9 8 +m 8 25 +l 0 -7 +m 9 25 +l 1 -7 +m 8 25 +l 15 25 +m 0 -7 +l 7 -7 + +92 25 12 2 +m 9 25 +l 21 -7 + +93 19 9 8 +m 14 25 +l 6 -7 +m 15 25 +l 7 -7 +m 8 25 +l 15 25 +m 0 -7 +l 7 -7 + +94 24 12 3 +m 5 18 +l 12 25 +l 19 18 + +95 24 12 2 +m 0 -2 +l 20 -2 + +96 9 4 8 +m 0 24 +l 1 23 +l 2 24 +l 1 25 +l 0 24 +l 0 22 +l 1 20 +l 2 19 + +97 21 10 35 +m 13 14 +l 11 7 +l 10 3 +l 10 1 +l 11 0 +l 14 0 +l 16 2 +l 17 4 +m 14 14 +l 12 7 +l 11 3 +l 11 1 +l 12 0 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 10 4 +l 11 7 +m 6 14 +l 4 13 +l 2 10 +l 1 7 +l 1 3 +l 2 1 + +98 20 10 30 +m 5 21 +l 1 8 +l 1 5 +l 2 2 +l 3 1 +m 6 21 +l 2 8 +l 3 11 +l 5 13 +l 7 14 +l 9 14 +l 11 13 +l 12 12 +l 13 10 +l 13 7 +l 12 4 +l 10 1 +l 7 0 +l 5 0 +l 3 1 +l 2 4 +l 2 8 +m 11 13 +l 12 11 +l 12 7 +l 11 4 +l 9 1 +l 7 0 +m 2 21 +l 6 21 + +99 17 8 23 +m 11 11 +l 11 10 +l 12 10 +l 12 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 4 +m 6 14 +l 4 13 +l 2 10 +l 1 7 +l 1 3 +l 2 1 + +100 21 10 37 +m 15 21 +l 11 7 +l 10 3 +l 10 1 +l 11 0 +l 14 0 +l 16 2 +l 17 4 +m 16 21 +l 12 7 +l 11 3 +l 11 1 +l 12 0 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 10 4 +l 11 7 +m 6 14 +l 4 13 +l 2 10 +l 1 7 +l 1 3 +l 2 1 +m 12 21 +l 16 21 + +101 17 8 24 +m 1 5 +l 5 6 +l 8 7 +l 11 9 +l 12 11 +l 11 13 +l 9 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 3 +m 6 14 +l 4 13 +l 2 10 +l 1 7 +l 1 3 +l 2 1 + +102 17 8 32 +m 16 20 +l 15 19 +l 16 18 +l 17 19 +l 17 20 +l 16 21 +l 14 21 +l 12 20 +l 11 19 +l 10 17 +l 9 14 +l 6 0 +l 5 -4 +l 4 -6 +m 14 21 +l 12 19 +l 11 17 +l 10 13 +l 8 4 +l 7 0 +l 6 -3 +l 5 -5 +l 4 -6 +l 2 -7 +l 0 -7 +l -1 -6 +l -1 -5 +l 0 -4 +l 1 -5 +l 0 -6 +m 5 14 +l 15 14 + +103 20 10 39 +m 16 14 +l 12 0 +l 11 -3 +l 9 -6 +l 6 -7 +l 3 -7 +l 1 -6 +l 0 -5 +l 0 -4 +l 1 -3 +l 2 -4 +l 1 -5 +m 15 14 +l 11 0 +l 10 -3 +l 8 -6 +l 6 -7 +m 13 7 +l 13 10 +l 12 13 +l 10 14 +l 8 14 +l 5 13 +l 3 10 +l 2 7 +l 2 4 +l 3 2 +l 4 1 +l 6 0 +l 8 0 +l 10 1 +l 12 4 +l 13 7 +m 8 14 +l 6 13 +l 4 10 +l 3 7 +l 3 3 +l 4 1 + +104 21 10 26 +m 6 21 +l 0 0 +m 7 21 +l 1 0 +m 3 7 +l 5 11 +l 7 13 +l 9 14 +l 11 14 +l 13 13 +l 14 12 +l 14 10 +l 12 4 +l 12 1 +l 13 0 +m 11 14 +l 13 12 +l 13 10 +l 11 4 +l 11 1 +l 12 0 +l 15 0 +l 17 2 +l 18 4 +m 3 21 +l 7 21 + +105 16 8 23 +m 9 21 +l 8 20 +l 9 19 +l 10 20 +l 9 21 +m 1 10 +l 2 12 +l 4 14 +l 7 14 +l 8 13 +l 8 10 +l 6 4 +l 6 1 +l 7 0 +m 6 14 +l 7 13 +l 7 10 +l 5 4 +l 5 1 +l 6 0 +l 9 0 +l 11 2 +l 12 4 + +106 13 6 29 +m 11 21 +l 10 20 +l 11 19 +l 12 20 +l 11 21 +m 3 10 +l 4 12 +l 6 14 +l 9 14 +l 10 13 +l 10 10 +l 7 0 +l 6 -3 +l 5 -5 +l 4 -6 +l 2 -7 +l 0 -7 +l -1 -6 +l -1 -5 +l 0 -4 +l 1 -5 +l 0 -6 +m 8 14 +l 9 13 +l 9 10 +l 6 0 +l 5 -3 +l 4 -5 +l 2 -7 + +107 21 10 28 +m 7 21 +l 1 0 +m 8 21 +l 2 0 +m 15 13 +l 14 12 +l 15 11 +l 16 12 +l 16 13 +l 15 14 +l 14 14 +l 12 13 +l 8 9 +l 6 8 +l 4 8 +m 6 8 +l 8 7 +l 10 1 +l 11 0 +m 6 8 +l 7 7 +l 9 1 +l 10 0 +l 12 0 +l 14 1 +l 16 4 +m 4 21 +l 8 21 + +108 12 6 15 +m 5 21 +l 1 7 +l 0 3 +l 0 1 +l 1 0 +l 4 0 +l 6 2 +l 7 4 +m 6 21 +l 2 7 +l 1 3 +l 1 1 +l 2 0 +m 2 21 +l 6 21 + +109 34 17 46 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 11 +l 6 7 +l 4 0 +m 5 14 +l 6 13 +l 6 11 +l 5 7 +l 3 0 +m 6 7 +l 8 11 +l 10 13 +l 12 14 +l 14 14 +l 16 13 +l 17 12 +l 17 10 +l 14 0 +m 14 14 +l 16 12 +l 16 10 +l 13 0 +m 16 7 +l 18 11 +l 20 13 +l 22 14 +l 24 14 +l 26 13 +l 27 12 +l 27 10 +l 25 4 +l 25 1 +l 26 0 +m 24 14 +l 26 12 +l 26 10 +l 24 4 +l 24 1 +l 25 0 +l 28 0 +l 30 2 +l 31 4 + +110 24 12 33 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 11 +l 6 7 +l 4 0 +m 5 14 +l 6 13 +l 6 11 +l 5 7 +l 3 0 +m 6 7 +l 8 11 +l 10 13 +l 12 14 +l 14 14 +l 16 13 +l 17 12 +l 17 10 +l 15 4 +l 15 1 +l 16 0 +m 14 14 +l 16 12 +l 16 10 +l 14 4 +l 14 1 +l 15 0 +l 18 0 +l 20 2 +l 21 4 + +111 17 8 28 +m 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 9 1 +l 11 4 +l 12 7 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 6 14 +l 4 13 +l 2 10 +l 1 7 +l 1 3 +l 2 1 +m 6 0 +l 8 1 +l 10 4 +l 11 7 +l 11 11 +l 10 13 + +112 22 11 37 +m 2 10 +l 3 12 +l 5 14 +l 8 14 +l 9 13 +l 9 11 +l 8 7 +l 4 -7 +m 7 14 +l 8 13 +l 8 11 +l 7 7 +l 3 -7 +m 8 7 +l 9 10 +l 11 13 +l 13 14 +l 15 14 +l 17 13 +l 18 12 +l 19 10 +l 19 7 +l 18 4 +l 16 1 +l 13 0 +l 11 0 +l 9 1 +l 8 4 +l 8 7 +m 17 13 +l 18 11 +l 18 7 +l 17 4 +l 15 1 +l 13 0 +m 0 -7 +l 7 -7 + +113 19 9 28 +m 13 14 +l 7 -7 +m 14 14 +l 8 -7 +m 11 7 +l 11 10 +l 10 13 +l 8 14 +l 6 14 +l 3 13 +l 1 10 +l 0 7 +l 0 4 +l 1 2 +l 2 1 +l 4 0 +l 6 0 +l 8 1 +l 10 4 +l 11 7 +m 6 14 +l 4 13 +l 2 10 +l 1 7 +l 1 3 +l 2 1 +m 4 -7 +l 11 -7 + +114 17 8 23 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 11 +l 6 7 +l 4 0 +m 5 14 +l 6 13 +l 6 11 +l 5 7 +l 3 0 +m 6 7 +l 8 11 +l 10 13 +l 12 14 +l 14 14 +l 15 13 +l 15 12 +l 14 11 +l 13 12 +l 14 13 + +115 17 8 26 +m 12 12 +l 12 11 +l 13 11 +l 13 12 +l 12 13 +l 9 14 +l 6 14 +l 3 13 +l 2 12 +l 2 10 +l 3 9 +l 10 5 +l 11 4 +m 2 11 +l 3 10 +l 10 6 +l 11 5 +l 11 2 +l 10 1 +l 7 0 +l 4 0 +l 1 1 +l 0 2 +l 0 3 +l 1 3 +l 1 2 + +116 14 7 15 +m 6 21 +l 2 7 +l 1 3 +l 1 1 +l 2 0 +l 5 0 +l 7 2 +l 8 4 +m 7 21 +l 3 7 +l 2 3 +l 2 1 +l 3 0 +m 0 14 +l 9 14 + +117 23 11 33 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 10 +l 5 4 +l 5 2 +l 7 0 +m 5 14 +l 6 13 +l 6 10 +l 4 4 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 7 +m 17 14 +l 15 7 +l 14 3 +l 14 1 +l 15 0 +l 18 0 +l 20 2 +l 21 4 +m 18 14 +l 16 7 +l 15 3 +l 15 1 +l 16 0 + +118 20 10 24 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 10 +l 5 4 +l 5 2 +l 7 0 +m 5 14 +l 6 13 +l 6 10 +l 4 4 +l 4 2 +l 5 1 +l 7 0 +l 8 0 +l 11 1 +l 13 3 +l 15 6 +l 16 10 +l 16 14 +l 15 14 +l 16 12 + +119 29 14 37 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 10 +l 5 4 +l 5 2 +l 7 0 +m 5 14 +l 6 13 +l 6 10 +l 4 4 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 14 5 +m 16 14 +l 14 5 +l 14 2 +l 15 1 +l 17 0 +l 19 0 +l 21 1 +l 23 3 +l 24 5 +l 25 9 +l 25 14 +l 24 14 +l 25 12 +m 17 14 +l 15 5 +l 15 2 +l 17 0 + +120 20 10 38 +m 1 10 +l 3 13 +l 5 14 +l 8 14 +l 9 12 +l 9 9 +m 7 14 +l 8 12 +l 8 9 +l 7 5 +l 6 3 +l 4 1 +l 2 0 +l 1 0 +l 0 1 +l 0 2 +l 1 3 +l 2 2 +l 1 1 +m 7 5 +l 7 2 +l 8 0 +l 11 0 +l 13 1 +l 15 4 +m 15 13 +l 14 12 +l 15 11 +l 16 12 +l 16 13 +l 15 14 +l 14 14 +l 12 13 +l 10 11 +l 9 9 +l 8 5 +l 8 2 +l 9 0 + +121 21 10 37 +m 0 10 +l 1 12 +l 3 14 +l 6 14 +l 7 13 +l 7 10 +l 5 4 +l 5 2 +l 7 0 +m 5 14 +l 6 13 +l 6 10 +l 4 4 +l 4 2 +l 5 1 +l 7 0 +l 9 0 +l 11 1 +l 13 3 +l 15 7 +m 18 14 +l 14 0 +l 13 -3 +l 11 -6 +l 8 -7 +l 5 -7 +l 3 -6 +l 2 -5 +l 2 -4 +l 3 -3 +l 4 -4 +l 3 -5 +m 17 14 +l 13 0 +l 12 -3 +l 10 -6 +l 8 -7 + +122 20 10 26 +m 14 14 +l 13 12 +l 11 10 +l 3 4 +l 1 2 +l 0 0 +m 1 10 +l 2 12 +l 4 14 +l 7 14 +l 11 12 +m 2 12 +l 4 13 +l 7 13 +l 11 12 +l 13 12 +m 1 2 +l 3 2 +l 7 1 +l 10 1 +l 12 2 +m 3 2 +l 7 0 +l 10 0 +l 12 2 +l 13 4 + +123 12 6 36 +m 12 25 +l 9 24 +l 8 23 +l 7 21 +l 7 18 +l 8 15 +l 8 14 +l 7 12 +l 5 10 +m 9 24 +l 8 21 +l 8 19 +l 9 16 +l 9 14 +l 8 12 +l 7 11 +l 2 9 +l 6 7 +l 7 6 +l 7 4 +l 6 1 +l 3 -1 +l 2 -2 +l 1 -4 +l 1 -6 +m 4 8 +l 5 7 +l 6 5 +l 6 4 +l 5 2 +l 3 1 +l 2 0 +l 0 -3 +l 0 -4 +l 1 -6 +l 3 -7 + +124 12 6 2 +m 8 25 +l 0 -7 + +125 11 5 30 +m 6 25 +l 8 24 +l 9 23 +l 9 21 +l 8 18 +l 5 15 +l 4 13 +l 4 12 +l 6 10 +m 7 24 +l 8 22 +l 7 19 +l 4 16 +l 3 14 +l 3 12 +l 4 11 +l 8 9 +l 3 7 +l 1 4 +l 1 2 +l 2 -1 +l 2 -4 +m 6 8 +l 3 6 +l 2 4 +l 2 3 +l 3 1 +l 3 -2 +l 2 -4 +l 0 -6 + +126 26 13 22 +m 0 6 +l 0 8 +l 1 11 +l 3 12 +l 5 12 +l 7 11 +l 11 8 +l 13 7 +l 15 7 +l 17 8 +l 18 10 +m 0 8 +l 1 10 +l 3 11 +l 5 11 +l 7 10 +l 11 7 +l 13 6 +l 15 6 +l 17 7 +l 18 10 +l 18 12 diff --git a/cd/etc/vectorfont32.txt b/cd/etc/vectorfont32.txt new file mode 100755 index 0000000..0a5791a --- /dev/null +++ b/cd/etc/vectorfont32.txt @@ -0,0 +1,1252 @@ +Simplex III +25 25 12 -7 + + +32 19 9 0 + +33 13 6 12 +m 1 21 +l 0 19 +l 1 7 +l 2 19 +l 1 21 +m 1 19 +l 1 13 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +34 15 7 16 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 +m 8 24 +l 7 23 +l 6 24 +l 7 25 +l 8 24 +l 8 22 +l 7 20 +l 6 19 + +35 19 9 8 +m 8 21 +l 1 -7 +m 14 21 +l 7 -7 +m 1 10 +l 15 10 +m 0 4 +l 14 4 + +36 20 10 24 +m 5 25 +l 5 -4 +m 9 25 +l 9 -4 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +37 22 11 29 +m 0 0 +l 18 21 +m 5 21 +l 7 19 +l 7 17 +l 6 15 +l 4 14 +l 2 14 +l 0 16 +l 0 18 +l 1 20 +l 3 21 +l 5 21 +l 7 20 +l 10 19 +l 13 19 +l 16 20 +l 18 21 +m 14 7 +l 12 6 +l 11 4 +l 11 2 +l 13 0 +l 15 0 +l 17 1 +l 18 3 +l 18 5 +l 16 7 +l 14 7 + +38 23 11 46 +m 18 13 +l 17 12 +l 18 11 +l 19 12 +l 19 13 +l 18 14 +l 17 14 +l 16 13 +l 15 11 +l 13 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 +l 0 6 +l 1 8 +l 7 12 +l 9 14 +l 10 16 +l 10 18 +l 9 20 +l 7 21 +l 5 20 +l 4 18 +l 4 16 +l 5 13 +l 7 10 +l 12 3 +l 14 1 +l 17 0 +l 18 0 +l 19 1 +l 19 2 +m 4 0 +l 2 1 +l 1 3 +l 1 6 +l 2 8 +l 4 10 +m 4 16 +l 5 14 +l 13 3 +l 15 1 +l 17 0 + +39 9 4 8 +m 2 24 +l 1 23 +l 0 24 +l 1 25 +l 2 24 +l 2 22 +l 1 20 +l 0 19 + +40 14 7 10 +m 7 25 +l 5 23 +l 3 20 +l 1 16 +l 0 11 +l 0 7 +l 1 2 +l 3 -2 +l 5 -5 +l 7 -7 + +41 14 7 10 +m 0 25 +l 2 23 +l 4 20 +l 6 16 +l 7 11 +l 7 7 +l 6 2 +l 4 -2 +l 2 -5 +l 0 -7 + +42 16 8 6 +m 5 15 +l 5 3 +m 0 12 +l 10 6 +m 10 12 +l 0 6 + +43 26 13 4 +m 9 18 +l 9 0 +m 0 9 +l 18 9 + +44 10 5 8 +m 2 1 +l 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +45 26 13 2 +m 0 9 +l 18 9 + +46 10 5 4 +m 1 2 +l 0 1 +l 1 0 +l 2 1 + +47 22 11 2 +m 18 25 +l 0 -7 + +48 20 10 17 +m 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 9 +l 1 4 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 4 +l 14 9 +l 14 12 +l 13 17 +l 11 20 +l 8 21 +l 6 21 + +49 16 8 4 +m 0 17 +l 2 18 +l 5 21 +l 5 0 + +50 20 10 14 +m 1 16 +l 1 17 +l 2 19 +l 3 20 +l 5 21 +l 9 21 +l 11 20 +l 12 19 +l 13 17 +l 13 15 +l 12 13 +l 10 10 +l 0 0 +l 14 0 + +51 20 10 15 +m 2 21 +l 13 21 +l 7 13 +l 10 13 +l 12 12 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +52 20 10 5 +m 10 21 +l 0 7 +l 15 7 +m 10 21 +l 10 0 + +53 20 10 17 +m 12 21 +l 2 21 +l 1 12 +l 2 13 +l 5 14 +l 8 14 +l 11 13 +l 13 11 +l 14 8 +l 14 6 +l 13 3 +l 11 1 +l 8 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 + +54 20 10 23 +m 12 18 +l 11 20 +l 8 21 +l 6 21 +l 3 20 +l 1 17 +l 0 12 +l 0 7 +l 1 3 +l 3 1 +l 6 0 +l 7 0 +l 10 1 +l 12 3 +l 13 6 +l 13 7 +l 12 10 +l 10 12 +l 7 13 +l 6 13 +l 3 12 +l 1 10 +l 0 7 + +55 20 10 3 +m 0 21 +l 14 21 +l 4 0 + +56 20 10 29 +m 5 21 +l 2 20 +l 1 18 +l 1 16 +l 2 14 +l 4 13 +l 8 12 +l 11 11 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 1 2 +l 0 4 +l 0 7 +l 1 9 +l 3 11 +l 6 12 +l 10 13 +l 12 14 +l 13 16 +l 13 18 +l 12 20 +l 9 21 +l 5 21 + +57 20 10 23 +m 13 14 +l 12 11 +l 10 9 +l 7 8 +l 6 8 +l 3 9 +l 1 11 +l 0 14 +l 0 15 +l 1 18 +l 3 20 +l 6 21 +l 7 21 +l 10 20 +l 12 18 +l 13 14 +l 13 9 +l 12 4 +l 10 1 +l 7 0 +l 5 0 +l 2 1 +l 1 3 + +58 15 7 10 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 2 +l 0 1 +l 1 0 +l 2 1 +l 1 2 + +59 14 7 12 +m 1 14 +l 0 13 +l 1 12 +l 2 13 +l 1 14 +m 1 0 +l 0 1 +l 1 2 +l 2 1 +l 2 -1 +l 1 -3 +l 0 -4 + +60 20 10 3 +m 16 18 +l 0 9 +l 16 0 + +61 26 13 4 +m 0 12 +l 18 12 +m 0 6 +l 18 6 + +62 20 10 3 +m 0 18 +l 16 9 +l 0 0 + +63 18 9 21 +m 1 17 +l 2 16 +l 1 15 +l 0 16 +l 0 17 +l 1 19 +l 2 20 +l 4 21 +l 7 21 +l 10 20 +l 11 18 +l 11 16 +l 10 14 +l 9 13 +l 5 11 +l 5 8 +m 5 3 +l 4 2 +l 5 1 +l 6 2 +l 5 3 + +64 24 12 52 +m 15 13 +l 14 15 +l 12 16 +l 9 16 +l 7 15 +l 6 14 +l 5 11 +l 5 8 +l 6 6 +l 8 5 +l 11 5 +l 13 6 +l 14 8 +m 9 16 +l 7 14 +l 6 11 +l 6 8 +l 7 6 +l 8 5 +m 15 16 +l 14 8 +l 14 6 +l 16 5 +l 18 5 +l 20 7 +l 21 10 +l 21 12 +l 20 15 +l 19 17 +l 17 19 +l 15 20 +l 12 21 +l 9 21 +l 6 20 +l 4 19 +l 2 17 +l 1 15 +l 0 12 +l 0 9 +l 1 6 +l 2 4 +l 4 2 +l 6 1 +l 9 0 +l 12 0 +l 15 1 +l 17 2 +l 18 3 +m 16 16 +l 15 8 +l 15 6 +l 16 5 + +65 22 11 5 +m 0 0 +l 8 21 +l 16 0 +m 3 7 +l 13 7 + +66 21 10 20 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +m 0 11 +l 9 11 +l 12 10 +l 13 9 +l 14 7 +l 14 4 +l 13 2 +l 12 1 +l 9 0 +l 0 0 + +67 21 10 18 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 + +68 21 10 13 +m 0 0 +l 0 21 +l 7 21 +l 10 20 +l 12 18 +l 13 16 +l 14 13 +l 14 8 +l 13 5 +l 12 3 +l 10 1 +l 7 0 +l 0 0 + +69 19 9 7 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 +m 0 0 +l 13 0 + +70 18 9 5 +m 0 0 +l 0 21 +l 13 21 +m 0 11 +l 8 11 + +71 21 10 20 +m 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 15 8 +l 10 8 + +72 22 11 6 +m 0 0 +l 0 21 +m 14 21 +l 14 0 +m 0 11 +l 14 11 + +73 8 4 2 +m 0 0 +l 0 21 + +74 16 8 10 +m 10 21 +l 10 5 +l 9 2 +l 8 1 +l 6 0 +l 4 0 +l 2 1 +l 1 2 +l 0 5 +l 0 7 + +75 21 10 6 +m 0 0 +l 0 21 +m 14 21 +l 0 7 +m 5 12 +l 14 0 + +76 17 8 3 +m 0 21 +l 0 0 +l 12 0 + +77 24 12 5 +m 0 0 +l 0 21 +l 8 0 +l 16 21 +l 16 0 + +78 22 11 4 +m 0 0 +l 0 21 +l 14 0 +l 14 21 + +79 22 11 21 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 + +80 21 10 11 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 14 +l 13 12 +l 12 11 +l 9 10 +l 0 10 + +81 22 11 23 +m 6 21 +l 4 20 +l 2 18 +l 1 16 +l 0 13 +l 0 8 +l 1 5 +l 2 3 +l 4 1 +l 6 0 +l 10 0 +l 12 1 +l 14 3 +l 15 5 +l 16 8 +l 16 13 +l 15 16 +l 14 18 +l 12 20 +l 10 21 +l 6 21 +m 9 4 +l 15 -2 + +82 21 10 13 +m 0 0 +l 0 21 +l 9 21 +l 12 20 +l 13 19 +l 14 17 +l 14 15 +l 13 13 +l 12 12 +l 9 11 +l 0 11 +m 7 11 +l 14 0 + +83 20 10 20 +m 14 18 +l 12 20 +l 9 21 +l 5 21 +l 2 20 +l 0 18 +l 0 16 +l 1 14 +l 2 13 +l 4 12 +l 10 10 +l 12 9 +l 13 8 +l 14 6 +l 14 3 +l 12 1 +l 9 0 +l 5 0 +l 2 1 +l 0 3 + +84 18 9 4 +m 7 21 +l 7 0 +m 0 21 +l 14 21 + +85 22 11 10 +m 0 21 +l 0 6 +l 1 3 +l 3 1 +l 6 0 +l 8 0 +l 11 1 +l 13 3 +l 14 6 +l 14 21 + +86 20 10 3 +m 0 21 +l 8 0 +l 16 21 + +87 24 12 5 +m 0 21 +l 5 0 +l 10 21 +l 15 0 +l 20 21 + +88 20 10 4 +m 0 0 +l 14 21 +m 0 21 +l 14 0 + +89 20 10 5 +m 0 21 +l 8 11 +l 16 21 +m 8 11 +l 8 0 + +90 20 10 4 +m 0 21 +l 14 21 +l 0 0 +l 14 0 + +91 15 7 4 +m 7 25 +l 0 25 +l 0 -7 +l 7 -7 + +92 22 11 2 +m 0 25 +l 18 -7 + +93 12 6 4 +m 0 25 +l 7 25 +l 7 -7 +l 0 -7 + +94 20 10 3 +m 0 18 +l 7 25 +l 14 18 + +95 24 12 2 +m 0 -2 +l 20 -2 + +96 9 4 8 +m 0 24 +l 1 23 +l 2 24 +l 1 25 +l 0 24 +l 0 22 +l 1 20 +l 2 19 + +97 19 9 16 +m 12 14 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +98 19 9 16 +m 0 0 +l 0 21 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +99 18 9 14 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +100 19 9 16 +m 12 21 +l 12 0 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +101 18 9 17 +m 0 8 +l 12 8 +l 12 10 +l 11 12 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +102 12 6 7 +m 8 21 +l 6 21 +l 4 20 +l 3 17 +l 3 0 +m 0 14 +l 7 14 + +103 19 9 21 +m 12 14 +l 12 -2 +l 11 -5 +l 10 -6 +l 8 -7 +l 5 -7 +l 3 -6 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +104 19 9 9 +m 0 0 +l 0 21 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +105 8 4 7 +m 0 20 +l 1 19 +l 2 20 +l 1 21 +l 0 20 +m 1 14 +l 1 0 + +106 10 5 10 +m 4 20 +l 5 19 +l 6 20 +l 5 21 +l 4 20 +m 5 14 +l 5 -3 +l 4 -6 +l 2 -7 +l 0 -7 + +107 17 8 6 +m 0 0 +l 0 21 +m 10 14 +l 0 4 +m 4 8 +l 11 0 + +108 8 4 2 +m 0 0 +l 0 21 + +109 30 15 16 +m 0 0 +l 0 14 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 +m 11 10 +l 14 13 +l 16 14 +l 19 14 +l 21 13 +l 22 10 +l 22 0 + +110 19 9 9 +m 0 0 +l 0 14 +m 0 10 +l 3 13 +l 5 14 +l 8 14 +l 10 13 +l 11 10 +l 11 0 + +111 19 9 17 +m 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 +l 13 6 +l 13 8 +l 12 11 +l 10 13 +l 8 14 +l 5 14 + +112 19 9 16 +m 0 14 +l 0 -7 +m 0 11 +l 2 13 +l 4 14 +l 7 14 +l 9 13 +l 11 11 +l 12 8 +l 12 6 +l 11 3 +l 9 1 +l 7 0 +l 4 0 +l 2 1 +l 0 3 + +113 19 9 16 +m 12 14 +l 12 -7 +m 12 11 +l 10 13 +l 8 14 +l 5 14 +l 3 13 +l 1 11 +l 0 8 +l 0 6 +l 1 3 +l 3 1 +l 5 0 +l 8 0 +l 10 1 +l 12 3 + +114 13 6 7 +m 0 0 +l 0 14 +m 0 8 +l 1 11 +l 3 13 +l 5 14 +l 8 14 + +115 17 8 17 +m 11 11 +l 10 13 +l 7 14 +l 4 14 +l 1 13 +l 0 11 +l 1 9 +l 3 8 +l 8 7 +l 10 6 +l 11 4 +l 11 3 +l 10 1 +l 7 0 +l 4 0 +l 1 1 +l 0 3 + +116 14 7 7 +m 3 21 +l 3 4 +l 4 1 +l 6 0 +l 8 0 +m 0 14 +l 7 14 + +117 19 9 9 +m 0 14 +l 0 4 +l 1 1 +l 3 0 +l 6 0 +l 8 1 +l 11 4 +m 11 14 +l 11 0 + +118 16 8 3 +m 0 14 +l 6 0 +l 12 14 + +119 22 11 5 +m 0 14 +l 4 0 +l 8 14 +l 12 0 +l 16 14 + +120 17 8 4 +m 0 0 +l 11 14 +m 11 0 +l 0 14 + +121 16 8 8 +m 1 14 +l 7 0 +m 13 14 +l 7 0 +l 5 -4 +l 3 -6 +l 1 -7 +l 0 -7 + +122 17 8 4 +m 0 14 +l 11 14 +l 0 0 +l 11 0 + +123 12 6 21 +m 5 25 +l 3 24 +l 2 23 +l 1 21 +l 1 19 +l 2 17 +l 3 16 +l 4 14 +l 4 12 +l 2 10 +l 0 9 +l 2 8 +l 4 6 +l 4 4 +l 3 2 +l 2 1 +l 1 -1 +l 1 -3 +l 2 -5 +l 3 -6 +l 5 -7 + +124 7 3 2 +m 0 25 +l 0 -7 + +125 11 5 21 +m 0 25 +l 2 24 +l 3 23 +l 4 21 +l 4 19 +l 3 17 +l 2 16 +l 1 14 +l 1 12 +l 3 10 +l 5 9 +l 3 8 +l 1 6 +l 1 4 +l 2 2 +l 3 1 +l 4 -1 +l 4 -3 +l 3 -5 +l 2 -6 +l 0 -7 + +126 26 13 22 +m 0 6 +l 0 8 +l 1 11 +l 3 12 +l 5 12 +l 7 11 +l 11 8 +l 13 7 +l 15 7 +l 17 8 +l 18 10 +m 0 8 +l 1 10 +l 3 11 +l 5 11 +l 7 10 +l 11 7 +l 13 6 +l 15 6 +l 17 7 +l 18 10 +l 18 12 diff --git a/cd/etc/vectorfont33.txt b/cd/etc/vectorfont33.txt new file mode 100755 index 0000000..1c29705 --- /dev/null +++ b/cd/etc/vectorfont33.txt @@ -0,0 +1,799 @@ +TXT III +6 6 3 -2 + + +32 6 3 0 + +33 2 1 4 +m 0 0 +l 0 1 +m 0 2 +l 0 6 + +34 4 2 4 +m 0 4 +l 1 6 +m 2 6 +l 1 4 + +35 6 3 8 +m 0 2 +l 4 2 +m 4 4 +l 0 4 +m 1 6 +l 1 0 +m 3 0 +l 3 6 + +36 6 3 10 +m 0 1 +l 3 1 +l 4 2 +l 3 3 +l 1 3 +l 0 4 +l 1 5 +l 4 5 +m 2 6 +l 2 0 + +37 6 3 12 +m 0 6 +l 0 5 +l 1 5 +l 1 6 +l 0 6 +m 4 6 +l 0 0 +m 4 0 +l 3 0 +l 3 1 +l 4 1 +l 4 0 + +38 6 3 11 +m 4 2 +l 2 0 +l 1 0 +l 0 1 +l 0 2 +l 2 4 +l 2 5 +l 1 6 +l 0 5 +l 0 4 +l 4 0 + +39 3 1 2 +m 0 4 +l 1 6 + +40 4 2 4 +m 2 6 +l 0 4 +l 0 2 +l 2 0 + +41 4 2 4 +m 0 6 +l 2 4 +l 2 2 +l 0 0 + +42 6 3 8 +m 2 1 +l 2 5 +m 4 3 +l 0 3 +m 4 5 +l 0 1 +m 0 5 +l 4 1 + +43 6 3 4 +m 2 1 +l 2 5 +m 4 3 +l 0 3 + +44 2 1 3 +m 0 1 +l 0 0 +l -1 -1 + +45 6 3 2 +m 0 3 +l 4 3 + +46 2 1 2 +m 0 0 +l 0 1 + +47 6 3 2 +m 0 0 +l 4 6 + +48 5 2 9 +m 1 0 +l 0 1 +l 0 5 +l 1 6 +l 2 6 +l 3 5 +l 3 1 +l 2 0 +l 1 0 + +49 4 2 5 +m 0 5 +l 1 6 +l 1 0 +m 0 0 +l 2 0 + +50 6 3 10 +m 0 5 +l 1 6 +l 3 6 +l 4 5 +l 4 4 +l 3 3 +l 1 3 +l 0 2 +l 0 0 +l 4 0 + +51 6 3 13 +m 0 5 +l 1 6 +l 3 6 +l 4 5 +l 4 4 +l 3 3 +l 2 3 +m 3 3 +l 4 2 +l 4 1 +l 3 0 +l 1 0 +l 0 1 + +52 6 3 4 +m 4 2 +l 0 2 +l 3 6 +l 3 0 + +53 6 3 9 +m 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 3 +l 3 4 +l 0 4 +l 0 6 +l 4 6 + +54 6 3 10 +m 0 3 +l 3 3 +l 4 2 +l 4 1 +l 3 0 +l 1 0 +l 0 1 +l 0 4 +l 2 6 +l 3 6 + +55 6 3 3 +m 0 6 +l 4 6 +l 1 0 + +56 6 3 17 +m 1 0 +l 0 1 +l 0 2 +l 1 3 +l 3 3 +l 4 4 +l 4 5 +l 3 6 +l 1 6 +l 0 5 +l 0 4 +l 1 3 +m 3 3 +l 4 2 +l 4 1 +l 3 0 +l 1 0 + +57 6 3 10 +m 1 0 +l 2 0 +l 4 2 +l 4 5 +l 3 6 +l 1 6 +l 0 5 +l 0 4 +l 1 3 +l 4 3 + +58 2 1 4 +m 0 4 +l 0 3 +m 0 2 +l 0 1 + +59 2 1 5 +m 0 4 +l 0 3 +m 0 2 +l 0 0 +l -1 -1 + +60 4 2 3 +m 2 6 +l -1 3 +l 2 0 + +61 6 3 4 +m 0 4 +l 4 4 +m 4 2 +l 0 2 + +62 5 2 3 +m 0 6 +l 3 3 +l 0 0 + +63 5 2 9 +m 0 5 +l 1 6 +l 2 6 +l 3 5 +l 3 4 +l 2 3 +l 2 2 +m 2 1 +l 2 0 + +64 6 3 15 +m 3 3 +l 2 2 +l 1 2 +l 1 3 +l 2 4 +l 3 4 +l 3 2 +l 4 3 +l 4 5 +l 3 6 +l 1 6 +l 0 5 +l 0 1 +l 1 0 +l 4 0 + +65 6 3 7 +m 0 0 +l 0 2 +l 2 6 +l 4 2 +l 4 0 +m 0 2 +l 4 2 + +66 6 3 13 +m 0 0 +l 3 0 +l 4 1 +l 4 2 +l 3 3 +l 1 3 +m 3 3 +l 4 4 +l 4 5 +l 3 6 +l 0 6 +m 1 6 +l 1 0 + +67 6 3 8 +m 4 1 +l 3 0 +l 1 0 +l 0 1 +l 0 5 +l 1 6 +l 3 6 +l 4 5 + +68 6 3 8 +m 0 0 +l 3 0 +l 4 1 +l 4 5 +l 3 6 +l 0 6 +m 1 6 +l 1 0 + +69 6 3 7 +m 0 0 +l 0 6 +l 4 6 +m 0 3 +l 2 3 +m 0 0 +l 4 0 + +70 6 3 5 +m 0 0 +l 0 6 +l 4 6 +m 0 3 +l 2 3 + +71 6 3 8 +m 3 3 +l 4 3 +l 4 0 +l 1 0 +l 0 1 +l 0 5 +l 1 6 +l 4 6 + +72 6 3 6 +m 0 0 +l 0 6 +m 0 3 +l 4 3 +m 4 6 +l 4 0 + +73 4 2 6 +m 0 6 +l 2 6 +m 1 6 +l 1 0 +m 0 0 +l 2 0 + +74 6 3 5 +m 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 6 + +75 6 3 7 +m 0 0 +l 0 6 +m 4 6 +l 1 3 +l 0 3 +m 1 3 +l 4 0 + +76 6 3 3 +m 0 6 +l 0 0 +l 4 0 + +77 6 3 5 +m 0 0 +l 0 6 +l 2 2 +l 4 6 +l 4 0 + +78 6 3 4 +m 0 0 +l 0 6 +l 4 0 +l 4 6 + +79 6 3 5 +m 0 0 +l 0 6 +l 4 6 +l 4 0 +l 0 0 + +80 6 3 7 +m 0 0 +l 0 6 +l 3 6 +l 4 5 +l 4 4 +l 3 3 +l 0 3 + +81 6 3 12 +m 2 2 +l 3 1 +l 2 0 +l 1 0 +l 0 1 +l 0 5 +l 1 6 +l 3 6 +l 4 5 +l 4 2 +l 3 1 +l 4 0 + +82 6 3 9 +m 0 0 +l 0 6 +l 3 6 +l 4 5 +l 4 4 +l 3 3 +l 0 3 +m 1 3 +l 4 0 + +83 6 3 8 +m 0 1 +l 1 0 +l 3 0 +l 4 1 +l 0 5 +l 1 6 +l 3 6 +l 4 5 + +84 6 3 4 +m 0 6 +l 4 6 +m 2 6 +l 2 0 + +85 6 3 6 +m 0 6 +l 0 1 +l 1 0 +l 3 0 +l 4 1 +l 4 6 + +86 8 4 3 +m 0 6 +l 3 0 +l 6 6 + +87 8 4 5 +m 0 6 +l 2 0 +l 3 3 +l 4 0 +l 6 6 + +88 6 3 4 +m 0 0 +l 4 6 +m 0 6 +l 4 0 + +89 6 3 5 +m 0 6 +l 2 3 +l 2 0 +m 2 3 +l 4 6 + +90 6 3 4 +m 0 6 +l 4 6 +l 0 0 +l 4 0 + +91 4 2 5 +m 0 0 +l 0 6 +l 2 6 +m 2 0 +l 0 0 + +92 6 3 2 +m 0 6 +l 4 0 + +93 4 2 4 +m 0 6 +l 2 6 +l 2 0 +l 0 0 + +94 6 3 3 +m 0 4 +l 2 6 +l 4 4 + +95 6 3 2 +m 0 -1 +l 4 -1 + +96 3 1 2 +m 0 6 +l 1 4 + +97 6 3 11 +m 2 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 4 +l 3 3 +l 3 1 +l 2 0 +m 3 1 +l 4 0 + +98 6 3 10 +m 0 0 +l 0 6 +m 0 2 +l 2 4 +l 3 4 +l 4 3 +l 4 1 +l 3 0 +l 2 0 +l 0 2 + +99 6 3 6 +m 4 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +l 4 0 + +100 6 3 10 +m 4 2 +l 2 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 2 4 +l 4 2 +m 4 6 +l 4 0 + +101 6 3 9 +m 0 2 +l 3 2 +l 4 3 +l 3 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +l 3 0 + +102 6 3 7 +m 0 3 +l 3 3 +m 4 5 +l 3 6 +l 2 6 +l 1 5 +l 1 0 + +103 6 3 11 +m 0 -1 +l 1 -2 +l 3 -2 +l 4 -1 +l 4 3 +l 3 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +l 4 0 + +104 6 3 7 +m 0 0 +l 0 6 +m 0 2 +l 2 4 +l 3 4 +l 4 3 +l 4 0 + +105 2 1 4 +m 0 0 +l 0 3 +m 0 4 +l 0 5 + +106 5 2 7 +m 0 -1 +l 1 -2 +l 2 -2 +l 3 -1 +l 3 3 +m 3 4 +l 3 5 + +107 6 3 7 +m 0 0 +l 0 6 +m 0 2 +l 2 2 +l 4 4 +m 2 2 +l 4 0 + +108 3 1 3 +m 0 6 +l 0 1 +l 1 0 + +109 6 3 10 +m 0 0 +l 0 4 +m 0 3 +l 1 4 +l 2 3 +l 2 2 +m 2 3 +l 3 4 +l 4 3 +l 4 0 + +110 5 2 7 +m 0 0 +l 0 4 +m 0 3 +l 1 4 +l 2 4 +l 3 3 +l 3 0 + +111 6 3 9 +m 3 0 +l 1 0 +l 0 1 +l 0 3 +l 1 4 +l 3 4 +l 4 3 +l 4 1 +l 3 0 + +112 6 3 9 +m 0 -2 +l 0 4 +m 0 3 +l 1 4 +l 3 4 +l 4 3 +l 4 1 +l 3 0 +l 0 0 + +113 6 3 9 +m 4 -2 +l 4 4 +m 4 3 +l 3 4 +l 1 4 +l 0 3 +l 0 1 +l 1 0 +l 4 0 + +114 6 3 6 +m 0 0 +l 0 4 +m 0 2 +l 2 4 +l 3 4 +l 4 3 + +115 6 3 8 +m 0 0 +l 3 0 +l 4 1 +l 3 2 +l 1 2 +l 0 3 +l 1 4 +l 4 4 + +116 6 3 6 +m 0 4 +l 4 4 +m 2 6 +l 2 1 +l 3 0 +l 4 1 + +117 6 3 7 +m 0 4 +l 0 1 +l 1 0 +l 2 0 +l 4 2 +m 4 4 +l 4 0 + +118 6 3 3 +m 0 4 +l 2 0 +l 4 4 + +119 6 3 5 +m 0 4 +l 1 0 +l 2 4 +l 3 0 +l 4 4 + +120 6 3 4 +m 0 0 +l 4 4 +m 0 4 +l 4 0 + +121 6 3 5 +m 0 4 +l 2 0 +m 4 4 +l 1 -2 +l 0 -2 + +122 6 3 4 +m 0 4 +l 4 4 +l 0 0 +l 4 0 + +123 4 2 7 +m 2 6 +l 1 5 +l 1 4 +l 0 3 +l 1 2 +l 1 1 +l 2 0 + +124 2 1 2 +m 0 0 +l 0 6 + +125 4 2 7 +m 0 0 +l 1 1 +l 1 2 +l 2 3 +l 1 4 +l 1 5 +l 0 6 + +126 6 3 4 +m 0 1 +l 1 2 +l 3 2 +l 4 3 + +127 4 2 5 +m 0 5 +l 1 6 +l 2 5 +l 1 4 +l 0 5 diff --git a/cd/etc/vectorfont34.txt b/cd/etc/vectorfont34.txt new file mode 100755 index 0000000..c7146ef --- /dev/null +++ b/cd/etc/vectorfont34.txt @@ -0,0 +1,359 @@ +Hebrew I +60 60 30 -20 + + +65 62 31 5 +m 44 0 +l 0 0 +m 40 36 +l 10 36 +l 10 0 + +66 62 31 6 +m 40 0 +l 30 20 +l 10 20 +l 0 0 +l 20 40 +l 30 40 + +67 62 31 4 +m 44 40 +l 0 40 +m 8 40 +l 8 0 + +68 62 31 5 +m 40 36 +l 0 36 +l 0 0 +m 40 0 +l 40 15 + +69 62 31 3 +m 20 0 +l 20 40 +l 28 35 + +70 62 31 4 +m 20 0 +l 20 40 +m 28 45 +l 12 35 + +71 62 31 6 +m 40 40 +l 2 40 +l 0 38 +l 0 0 +m 33 0 +l 33 40 + +72 62 31 5 +m 30 60 +l 30 0 +l 0 0 +l 0 30 +l 15 30 + +73 62 31 3 +m 40 40 +l 30 40 +l 30 30 + +74 62 31 4 +m 40 40 +l 0 40 +m 8 40 +l 8 -10 + +75 62 31 4 +m 40 0 +l 0 0 +l 0 40 +l 40 40 + +76 62 31 5 +m 40 60 +l 40 40 +l 0 40 +l 0 20 +l 30 0 + +77 62 31 5 +m 40 36 +l 0 36 +l 0 0 +l 32 0 +l 32 36 + +78 62 31 6 +m 40 21 +l 0 40 +l 0 0 +l 30 0 +m 35 40 +l 25 28 + +79 62 31 3 +m 10 40 +l 0 40 +l 0 -20 + +80 62 31 4 +m 40 0 +l 10 0 +l 10 40 +l 20 40 + +81 62 31 6 +m 40 40 +l 0 40 +l 0 10 +l 10 0 +l 33 0 +l 33 40 + +82 62 31 5 +m 30 0 +l 0 0 +l 0 40 +m 30 40 +l 5 0 + +83 62 31 5 +m 20 15 +l 30 15 +l 30 40 +l 0 40 +l 0 -20 + +84 62 31 6 +m 20 25 +l 35 25 +l 35 40 +l 0 40 +l 0 0 +l 35 0 + +85 62 31 6 +m 40 40 +l 36 40 +l 0 -20 +m 4 40 +l 0 40 +l 18 10 + +86 62 31 5 +m 40 0 +l 0 0 +l 40 40 +m 15 15 +l 0 40 + +87 62 31 5 +m 25 15 +l 25 -20 +m 35 40 +l 0 40 +l 0 5 + +88 62 31 3 +m 40 20 +l 0 20 +l 0 -6 + +89 62 31 7 +m 40 20 +l 30 -10 +l 5 -10 +l 0 20 +m 20 20 +l 20 8 +l 33 -1 + +90 62 31 6 +m 40 -10 +l 25 -10 +l 25 20 +m 30 20 +l 0 20 +l 0 -10 + +97 62 31 5 +m 44 0 +l 0 0 +m 40 36 +l 10 36 +l 10 0 + +98 62 31 6 +m 40 0 +l 30 20 +l 10 20 +l 0 0 +l 20 40 +l 30 40 + +99 62 31 4 +m 44 40 +l 0 40 +m 8 40 +l 8 0 + +100 62 31 5 +m 40 36 +l 0 36 +l 0 0 +m 40 0 +l 40 15 + +101 62 31 3 +m 20 0 +l 20 40 +l 28 35 + +102 62 31 4 +m 20 0 +l 20 40 +m 28 45 +l 12 35 + +103 62 31 6 +m 40 40 +l 2 40 +l 0 38 +l 0 0 +m 33 0 +l 33 40 + +104 62 31 5 +m 30 60 +l 30 0 +l 0 0 +l 0 30 +l 15 30 + +105 62 31 3 +m 40 40 +l 30 40 +l 30 30 + +106 62 31 4 +m 40 40 +l 0 40 +m 8 40 +l 8 -10 + +107 62 31 4 +m 40 0 +l 0 0 +l 0 40 +l 40 40 + +108 62 31 5 +m 40 60 +l 40 40 +l 0 40 +l 0 20 +l 30 0 + +109 62 31 5 +m 40 36 +l 0 36 +l 0 0 +l 32 0 +l 32 36 + +110 62 31 6 +m 40 21 +l 0 40 +l 0 0 +l 30 0 +m 35 40 +l 25 28 + +111 62 31 3 +m 10 40 +l 0 40 +l 0 -20 + +112 62 31 4 +m 40 0 +l 10 0 +l 10 40 +l 20 40 + +113 62 31 6 +m 40 40 +l 0 40 +l 0 10 +l 10 0 +l 33 0 +l 33 40 + +114 62 31 5 +m 30 0 +l 0 0 +l 0 40 +m 30 40 +l 5 0 + +115 62 31 5 +m 20 15 +l 30 15 +l 30 40 +l 0 40 +l 0 -20 + +116 62 31 6 +m 20 25 +l 35 25 +l 35 40 +l 0 40 +l 0 0 +l 35 0 + +117 62 31 6 +m 40 40 +l 36 40 +l 0 -20 +m 4 40 +l 0 40 +l 18 10 + +118 62 31 5 +m 40 0 +l 0 0 +l 40 40 +m 15 15 +l 0 40 + +119 62 31 5 +m 25 15 +l 25 -20 +m 35 40 +l 0 40 +l 0 5 + +120 62 31 3 +m 40 20 +l 0 20 +l 0 -6 + +121 62 31 7 +m 40 20 +l 30 -10 +l 5 -10 +l 0 20 +m 20 20 +l 20 8 +l 33 -1 + +122 62 31 6 +m 40 -10 +l 25 -10 +l 25 20 +m 30 20 +l 0 20 +l 0 -10 diff --git a/cd/include/cd.h b/cd/include/cd.h new file mode 100755 index 0000000..25859ae --- /dev/null +++ b/cd/include/cd.h @@ -0,0 +1,496 @@ +/** \file + * \brief User API + * CD - Canvas Draw + * Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil + * http://www.tecgraf.puc-rio.br/cd + * mailto:cd@tecgraf.puc-rio.br + * + * See Copyright Notice at the end of this file + */ + +#ifndef __CD_H +#define __CD_H + +#ifdef __cplusplus +extern "C" { +#endif + + +#define CD_NAME "CD - Canvas Draw" +#define CD_DESCRIPTION "A 2D Graphics Library" +#define CD_COPYRIGHT "Copyright (C) 1994-2009 Tecgraf, PUC-Rio." +#define CD_VERSION "5.2" +#define CD_VERSION_DATE "2009/06/26" +#define CD_VERSION_NUMBER 502000 + +typedef struct _cdContext cdContext; +typedef struct _cdCanvas cdCanvas; +typedef struct _cdCanvas cdState; +typedef struct _cdImage cdImage; + +/* client images using bitmap structure */ +typedef struct _cdBitmap { + int w; + int h; + int type; + void *data; +} cdBitmap; + + +/* library */ +char* cdVersion(void); +char* cdVersionDate(void); +int cdVersionNumber(void); + +/* canvas init */ +cdCanvas* cdCreateCanvas(cdContext *context, void *data); +cdCanvas* cdCreateCanvasf(cdContext *context, const char* format, ...); +void cdKillCanvas(cdCanvas* canvas); + +cdContext* cdCanvasGetContext(cdCanvas* canvas); +int cdCanvasActivate(cdCanvas* canvas); +void cdCanvasDeactivate(cdCanvas* canvas); +int cdUseContextPlus(int use); +void cdInitContextPlus(void); /* need an external library */ + +/* context */ +typedef int (*cdCallback)(cdCanvas* canvas, ...); +int cdContextRegisterCallback(cdContext *context, int cb, cdCallback func); +unsigned long cdContextCaps(cdContext *context); + +/* control */ +int cdCanvasSimulate(cdCanvas* canvas, int mode); +void cdCanvasFlush(cdCanvas* canvas); +void cdCanvasClear(cdCanvas* canvas); +cdState* cdCanvasSaveState(cdCanvas* canvas); +void cdCanvasRestoreState(cdCanvas* canvas, cdState* state); +void cdReleaseState(cdState* state); +void cdCanvasSetAttribute(cdCanvas* canvas, const char* name, char* data); +void cdCanvasSetfAttribute(cdCanvas* canvas, const char* name, const char* format, ...); +char* cdCanvasGetAttribute(cdCanvas* canvas, const char* name); + +/* interpretation */ +int cdCanvasPlay(cdCanvas* canvas, cdContext *context, int xmin, int xmax, int ymin, int ymax, void *data); + +/* coordinate transformation */ +void cdCanvasGetSize(cdCanvas* canvas, int *width, int *height, double *width_mm, double *height_mm); +int cdCanvasUpdateYAxis(cdCanvas* canvas, int* y); +double cdfCanvasUpdateYAxis(cdCanvas* canvas, double* y); +int cdCanvasInvertYAxis(cdCanvas* canvas, int y); +double cdfCanvasInvertYAxis(cdCanvas* canvas, double y); +void cdCanvasMM2Pixel(cdCanvas* canvas, double mm_dx, double mm_dy, int *dx, int *dy); +void cdCanvasPixel2MM(cdCanvas* canvas, int dx, int dy, double *mm_dx, double *mm_dy); +void cdfCanvasMM2Pixel(cdCanvas* canvas, double mm_dx, double mm_dy, double *dx, double *dy); +void cdfCanvasPixel2MM(cdCanvas* canvas, double dx, double dy, double *mm_dx, double *mm_dy); +void cdCanvasOrigin(cdCanvas* canvas, int x, int y); +void cdfCanvasOrigin(cdCanvas* canvas, double x, double y); +void cdCanvasGetOrigin(cdCanvas* canvas, int *x, int *y); +void cdfCanvasGetOrigin(cdCanvas* canvas, double *x, double *y); +void cdCanvasTransform(cdCanvas* canvas, const double* matrix); +double* cdCanvasGetTransform(cdCanvas* canvas); +void cdCanvasTransformMultiply(cdCanvas* canvas, const double* matrix); +void cdCanvasTransformRotate(cdCanvas* canvas, double angle); +void cdCanvasTransformScale(cdCanvas* canvas, double sx, double sy); +void cdCanvasTransformTranslate(cdCanvas* canvas, double dx, double dy); +void cdCanvasTransformPoint(cdCanvas* canvas, int x, int y, int *tx, int *ty); +void cdfCanvasTransformPoint(cdCanvas* canvas, double x, double y, double *tx, double *ty); + +/* clipping */ +int cdCanvasClip(cdCanvas* canvas, int mode); +void cdCanvasClipArea(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax); +int cdCanvasGetClipArea(cdCanvas* canvas, int *xmin, int *xmax, int *ymin, int *ymax); +void cdfCanvasClipArea(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax); +int cdfCanvasGetClipArea(cdCanvas* canvas, double *xmin, double *xmax, double *ymin, double *ymax); + +/* clipping region */ +int cdCanvasIsPointInRegion(cdCanvas* canvas, int x, int y); +void cdCanvasOffsetRegion(cdCanvas* canvas, int x, int y); +void cdCanvasGetRegionBox(cdCanvas* canvas, int *xmin, int *xmax, int *ymin, int *ymax); +int cdCanvasRegionCombineMode(cdCanvas* canvas, int mode); + +/* primitives */ +void cdCanvasPixel(cdCanvas* canvas, int x, int y, long color); +void cdCanvasMark(cdCanvas* canvas, int x, int y); + +void cdCanvasLine(cdCanvas* canvas, int x1, int y1, int x2, int y2); +void cdCanvasBegin(cdCanvas* canvas, int mode); +void cdCanvasVertex(cdCanvas* canvas, int x, int y); +void cdCanvasEnd(cdCanvas* canvas); +void cdCanvasRect(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax); +void cdCanvasBox(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax); +void cdCanvasArc(cdCanvas* canvas, int xc, int yc, int w, int h, double angle1, double angle2); +void cdCanvasSector(cdCanvas* canvas, int xc, int yc, int w, int h, double angle1, double angle2); +void cdCanvasChord(cdCanvas* canvas, int xc, int yc, int w, int h, double angle1, double angle2); +void cdCanvasText(cdCanvas* canvas, int x, int y, const char* s); + +void cdfCanvasLine(cdCanvas* canvas, double x1, double y1, double x2, double y2); +void cdfCanvasVertex(cdCanvas* canvas, double x, double y); +void cdfCanvasRect(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax); +void cdfCanvasBox(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax); +void cdfCanvasArc(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2); +void cdfCanvasSector(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2); +void cdfCanvasChord(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2); +void cdfCanvasText(cdCanvas* canvas, double x, double y, const char* s); + +/* attributes */ +void cdCanvasSetBackground(cdCanvas* canvas, long color); +void cdCanvasSetForeground(cdCanvas* canvas, long color); +long cdCanvasBackground(cdCanvas* canvas, long color); +long cdCanvasForeground(cdCanvas* canvas, long color); +int cdCanvasBackOpacity(cdCanvas* canvas, int opacity); +int cdCanvasWriteMode(cdCanvas* canvas, int mode); +int cdCanvasLineStyle(cdCanvas* canvas, int style); +void cdCanvasLineStyleDashes(cdCanvas* canvas, const int* dashes, int count); +int cdCanvasLineWidth(cdCanvas* canvas, int width); +int cdCanvasLineJoin(cdCanvas* canvas, int join); +int cdCanvasLineCap(cdCanvas* canvas, int cap); +int cdCanvasInteriorStyle(cdCanvas* canvas, int style); +int cdCanvasHatch(cdCanvas* canvas, int style); +void cdCanvasStipple(cdCanvas* canvas, int w, int h, const unsigned char* stipple); +unsigned char* cdCanvasGetStipple(cdCanvas* canvas, int *n, int *m); +void cdCanvasPattern(cdCanvas* canvas, int w, int h, long const int *pattern); +long* cdCanvasGetPattern(cdCanvas* canvas, int* n, int* m); +int cdCanvasFillMode(cdCanvas* canvas, int mode); +int cdCanvasFont(cdCanvas* canvas, const char* type_face, int style, int size); +void cdCanvasGetFont(cdCanvas* canvas, char *type_face, int *style, int *size); +char* cdCanvasNativeFont(cdCanvas* canvas, const char* font); +int cdCanvasTextAlignment(cdCanvas* canvas, int alignment); +double cdCanvasTextOrientation(cdCanvas* canvas, double angle); +int cdCanvasMarkType(cdCanvas* canvas, int type); +int cdCanvasMarkSize(cdCanvas* canvas, int size); + +/* vector text */ +void cdCanvasVectorText(cdCanvas* canvas, int x, int y, const char* s); +void cdCanvasMultiLineVectorText(cdCanvas* canvas, int x, int y, const char* s); + +/* vector text attributes */ +char *cdCanvasVectorFont(cdCanvas* canvas, const char *filename); +void cdCanvasVectorTextDirection(cdCanvas* canvas, int x1, int y1, int x2, int y2); +double* cdCanvasVectorTextTransform(cdCanvas* canvas, const double* matrix); +void cdCanvasVectorTextSize(cdCanvas* canvas, int size_x, int size_y, const char* s); +int cdCanvasVectorCharSize(cdCanvas* canvas, int size); +void cdCanvasVectorFontSize(cdCanvas* canvas, double size_x, double size_y); +void cdCanvasGetVectorFontSize(cdCanvas* canvas, double *size_x, double *size_y); + +/* vector text properties */ +void cdCanvasGetVectorTextSize(cdCanvas* canvas, const char* s, int *x, int *y); +void cdCanvasGetVectorTextBounds(cdCanvas* canvas, const char* s, int x, int y, int *rect); +void cdCanvasGetVectorTextBox(cdCanvas* canvas, int x, int y, const char *s, int *xmin, int *xmax, int *ymin, int *ymax); + +/* properties */ +void cdCanvasGetFontDim(cdCanvas* canvas, int *max_width, int *height, int *ascent, int *descent); +void cdCanvasGetTextSize(cdCanvas* canvas, const char* s, int *width, int *height); +void cdCanvasGetTextBox(cdCanvas* canvas, int x, int y, const char* s, int *xmin, int *xmax, int *ymin, int *ymax); +void cdCanvasGetTextBounds(cdCanvas* canvas, int x, int y, const char* s, int *rect); +int cdCanvasGetColorPlanes(cdCanvas* canvas); + +/* color */ +void cdCanvasPalette(cdCanvas* canvas, int n, const long *palette, int mode); + +/* client images */ +void cdCanvasGetImageRGB(cdCanvas* canvas, unsigned char* r, unsigned char* g, unsigned char* b, int x, int y, int w, int h); +void cdCanvasPutImageRectRGB(cdCanvas* canvas, int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); +void cdCanvasPutImageRectRGBA(cdCanvas* canvas, int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, const unsigned char* a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); +void cdCanvasPutImageRectMap(cdCanvas* canvas, int iw, int ih, const unsigned char* index, const long* colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); + +/* server images */ +cdImage* cdCanvasCreateImage(cdCanvas* canvas, int w, int h); +void cdKillImage(cdImage* image); +void cdCanvasGetImage(cdCanvas* canvas, cdImage* image, int x, int y); +void cdCanvasPutImageRect(cdCanvas* canvas, cdImage* image, int x, int y, int xmin, int xmax, int ymin, int ymax); +void cdCanvasScrollArea(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, int dx, int dy); + +/* bitmap */ +cdBitmap* cdCreateBitmap(int w, int h, int type); +cdBitmap* cdInitBitmap(int w, int h, int type, ...); +void cdKillBitmap(cdBitmap* bitmap); +unsigned char* cdBitmapGetData(cdBitmap* bitmap, int dataptr); +void cdBitmapSetRect(cdBitmap* bitmap, int xmin, int xmax, int ymin, int ymax); +void cdCanvasPutBitmap(cdCanvas* canvas, cdBitmap* bitmap, int x, int y, int w, int h); +void cdCanvasGetBitmap(cdCanvas* canvas, cdBitmap* bitmap, int x, int y); +void cdBitmapRGB2Map(cdBitmap* bitmap_rgb, cdBitmap* bitmap_map); + +/* color */ +long cdEncodeColor(unsigned char red, unsigned char green, unsigned char blue); +void cdDecodeColor(long color, unsigned char* red, unsigned char* green, unsigned char* blue); +unsigned char cdDecodeAlpha(long color); +long cdEncodeAlpha(long color, unsigned char alpha); + +#define cdAlpha(_) (unsigned char)(~(((_) >> 24) & 0xFF)) +#define cdReserved(_) (unsigned char)(((_) >> 24) & 0xFF) +#define cdRed(_) (unsigned char)(((_) >> 16) & 0xFF) +#define cdGreen(_) (unsigned char)(((_) >> 8) & 0xFF) +#define cdBlue(_) (unsigned char)(((_) >> 0) & 0xFF) + +/* client image color convertion */ +void cdRGB2Map(int width, int height, const unsigned char* red, const unsigned char* green, const unsigned char* blue, unsigned char* index, int pal_size, long *color); + + +/* CD Values */ + +#define CD_QUERY -1 /* query value */ + +enum { /* bitmap type */ + CD_RGB, /* these definitions are compatible with the IM library */ + CD_MAP, + CD_RGBA = 0x100 +}; + +enum { /* bitmap data */ + CD_IRED, + CD_IGREEN, + CD_IBLUE, + CD_IALPHA, + CD_INDEX, + CD_COLORS +}; + +enum { /* status report */ + CD_ERROR = -1, + CD_OK = 0 +}; + +enum { /* clip mode */ + CD_CLIPOFF, + CD_CLIPAREA, + CD_CLIPPOLYGON, + CD_CLIPREGION +}; + +enum { /* region combine mode */ + CD_UNION, + CD_INTERSECT, + CD_DIFFERENCE, + CD_NOTINTERSECT +}; + +enum { /* polygon mode (begin...end) */ + CD_FILL, + CD_OPEN_LINES, + CD_CLOSED_LINES, + CD_CLIP, + CD_BEZIER, + CD_REGION +}; + +#define CD_POLYCUSTOM 10 + +enum { /* fill mode */ + CD_EVENODD, + CD_WINDING +}; + +enum { /* line join */ + CD_MITER, + CD_BEVEL, + CD_ROUND +}; + +enum { /* line cap */ + CD_CAPFLAT, + CD_CAPSQUARE, + CD_CAPROUND +}; + +enum { /* background opacity mode */ + CD_OPAQUE, + CD_TRANSPARENT +}; + +enum { /* write mode */ + CD_REPLACE, + CD_XOR, + CD_NOT_XOR +}; + +enum { /* color allocation mode (palette) */ + CD_POLITE, + CD_FORCE +}; + +enum { /* line style */ + CD_CONTINUOUS, + CD_DASHED, + CD_DOTTED, + CD_DASH_DOT, + CD_DASH_DOT_DOT, + CD_CUSTOM +}; + +enum { /* marker type */ + CD_PLUS, + CD_STAR, + CD_CIRCLE, + CD_X, + CD_BOX, + CD_DIAMOND, + CD_HOLLOW_CIRCLE, + CD_HOLLOW_BOX, + CD_HOLLOW_DIAMOND +}; + +enum { /* hatch type */ + CD_HORIZONTAL, + CD_VERTICAL, + CD_FDIAGONAL, + CD_BDIAGONAL, + CD_CROSS, + CD_DIAGCROSS +}; + +enum { /* interior style */ + CD_SOLID, + CD_HATCH, + CD_STIPPLE, + CD_PATTERN, + CD_HOLLOW +}; + +enum { /* text alignment */ + CD_NORTH, + CD_SOUTH, + CD_EAST, + CD_WEST, + CD_NORTH_EAST, + CD_NORTH_WEST, + CD_SOUTH_EAST, + CD_SOUTH_WEST, + CD_CENTER, + CD_BASE_LEFT, + CD_BASE_CENTER, + CD_BASE_RIGHT +}; + +enum { /* style */ + CD_PLAIN = 0, + CD_BOLD = 1, + CD_ITALIC = 2, + CD_UNDERLINE = 4, + CD_STRIKEOUT = 8 +}; + +#define CD_BOLD_ITALIC (CD_BOLD|CD_ITALIC) /* compatibility name */ + +enum { /* some font sizes */ + CD_SMALL = 8, + CD_STANDARD = 12, + CD_LARGE = 18 +}; + +/* Canvas Capabilities */ +#define CD_CAP_NONE 0x00000000 +#define CD_CAP_FLUSH 0x00000001 +#define CD_CAP_CLEAR 0x00000002 +#define CD_CAP_PLAY 0x00000004 +#define CD_CAP_YAXIS 0x00000008 +#define CD_CAP_CLIPAREA 0x00000010 +#define CD_CAP_CLIPPOLY 0x00000020 +#define CD_CAP_REGION 0x00000040 +#define CD_CAP_RECT 0x00000080 +#define CD_CAP_CHORD 0x00000100 +#define CD_CAP_IMAGERGB 0x00000200 +#define CD_CAP_IMAGERGBA 0x00000400 +#define CD_CAP_IMAGEMAP 0x00000800 +#define CD_CAP_GETIMAGERGB 0x00001000 +#define CD_CAP_IMAGESRV 0x00002000 +#define CD_CAP_BACKGROUND 0x00004000 +#define CD_CAP_BACKOPACITY 0x00008000 +#define CD_CAP_WRITEMODE 0x00010000 +#define CD_CAP_LINESTYLE 0x00020000 +#define CD_CAP_LINEWITH 0x00040000 +#define CD_CAP_FPRIMTIVES 0x00080000 +#define CD_CAP_HATCH 0x00100000 +#define CD_CAP_STIPPLE 0x00200000 +#define CD_CAP_PATTERN 0x00400000 +#define CD_CAP_FONT 0x00800000 +#define CD_CAP_FONTDIM 0x01000000 +#define CD_CAP_TEXTSIZE 0x02000000 +#define CD_CAP_TEXTORIENTATION 0x04000000 +#define CD_CAP_PALETTE 0x08000000 +#define CD_CAP_LINECAP 0x10000000 +#define CD_CAP_LINEJOIN 0x20000000 +#define CD_CAP_ALL 0xFFFFFFFF + +/* cdPlay definitions */ +#define CD_SIZECB 0 /* size callback */ +typedef int(*cdSizeCB)(cdCanvas *canvas, int w, int h, double w_mm, double h_mm); +#define CD_ABORT 1 +#define CD_CONTINUE 0 + +/* simulation flags */ +#define CD_SIM_NONE 0x0000 +#define CD_SIM_LINE 0x0001 +#define CD_SIM_RECT 0x0002 +#define CD_SIM_BOX 0x0004 +#define CD_SIM_ARC 0x0008 +#define CD_SIM_SECTOR 0x0010 +#define CD_SIM_CHORD 0x0020 +#define CD_SIM_POLYLINE 0x0040 +#define CD_SIM_POLYGON 0x0080 +#define CD_SIM_ALL 0xFFFF + +#define CD_SIM_LINES (CD_SIM_LINE | CD_SIM_RECT | CD_SIM_ARC | CD_SIM_POLYLINE) +#define CD_SIM_FILLS (CD_SIM_BOX | CD_SIM_SECTOR | CD_SIM_CHORD | CD_SIM_POLYGON) + +/* some predefined colors for convenience */ +#define CD_RED 0xFF0000L /* 255, 0, 0 */ +#define CD_DARK_RED 0x800000L /* 128, 0, 0 */ +#define CD_GREEN 0x00FF00L /* 0,255, 0 */ +#define CD_DARK_GREEN 0x008000L /* 0,128, 0 */ +#define CD_BLUE 0x0000FFL /* 0, 0,255 */ +#define CD_DARK_BLUE 0x000080L /* 0, 0,128 */ + +#define CD_YELLOW 0xFFFF00L /* 255,255, 0 */ +#define CD_DARK_YELLOW 0x808000L /* 128,128, 0 */ +#define CD_MAGENTA 0xFF00FFL /* 255, 0,255 */ +#define CD_DARK_MAGENTA 0x800080L /* 128, 0,128 */ +#define CD_CYAN 0x00FFFFL /* 0,255,255 */ +#define CD_DARK_CYAN 0x008080L /* 0,128,128 */ + +#define CD_WHITE 0xFFFFFFL /* 255,255,255 */ +#define CD_BLACK 0x000000L /* 0, 0, 0 */ + +#define CD_DARK_GRAY 0x808080L /* 128,128,128 */ +#define CD_GRAY 0xC0C0C0L /* 192,192,192 */ + +/* some usefull conversion factors */ +#define CD_MM2PT 2.834645669 /* milimeters to points (pt = CD_MM2PT * mm) */ +#define CD_RAD2DEG 57.295779513 /* radians to degrees (deg = CD_RAD2DEG * rad) */ +#define CD_DEG2RAD 0.01745329252 /* degrees to radians (rad = CD_DEG2RAD * deg) */ + + +#ifdef __cplusplus +} +#endif + + +#ifndef CD_NO_OLD_INTERFACE +#include "cd_old.h" +#endif + + +/****************************************************************************** +Copyright (C) 1994-2009 Tecgraf, PUC-Rio. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#endif /* ifndef CD_H */ + diff --git a/cd/include/cd_canvas.hpp b/cd/include/cd_canvas.hpp new file mode 100755 index 0000000..b31a683 --- /dev/null +++ b/cd/include/cd_canvas.hpp @@ -0,0 +1,358 @@ +/** \file + * \brief Canvas Class + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_CANVAS_HPP +#define __CD_CANVAS_HPP + +#include "cd.h" +#include "wd.h" + +class cdCanvasC +{ + cdCanvas* canvas; + + cdCanvasC() {}; + +public: + +/* canvas init */ + cdCanvasC(cdCanvas* _canvas) + { this->canvas = _canvas; } + + ~cdCanvasC() + { cdKillCanvas(this->canvas); } + +cdContext* GetContext() + { return cdCanvasGetContext(canvas); } +int Activate() + { return cdCanvasActivate(canvas); } +void Deactivate() + { cdCanvasDeactivate(canvas); } + +/* control */ +int Simulate(int mode) + { return cdCanvasSimulate(canvas, mode); } +void Flush() + { cdCanvasFlush(canvas); } +void Clear() + { cdCanvasClear(canvas); } +cdState* SaveState() + { return cdCanvasSaveState(canvas); } +void RestoreState(cdState* state) + { cdCanvasRestoreState(canvas, state); } +void SetAttribute(const char* name, char* data) + { cdCanvasSetAttribute(canvas, name, data); } +char* GetAttribute(const char* name) + { return cdCanvasGetAttribute(canvas, name); } + +/* interpretation */ +int Play(cdContext *context, int xmin, int xmax, int ymin, int ymax, void *data) + { return cdCanvasPlay(canvas, context, xmin, xmax, ymin, ymax, data); } + +/* coordinate transformation */ +void GetSize(int *width, int *height, double *width_mm, double *height_mm) + { cdCanvasGetSize(canvas, width, height, width_mm, height_mm); } +int UpdateYAxis(int* y) + { return cdCanvasUpdateYAxis(canvas, y); } +void MM2Pixel(double mm_dx, double mm_dy, int *dx, int *dy) + { cdCanvasMM2Pixel(canvas, mm_dx, mm_dy, dx, dy); } +void Pixel2MM(int dx, int dy, double *mm_dx, double *mm_dy) + { cdCanvasPixel2MM(canvas, dx, dy, mm_dx, mm_dy); } +void MM2Pixel(double mm_dx, double mm_dy, double *dx, double *dy) + { cdfCanvasMM2Pixel(canvas, mm_dx, mm_dy, dx, dy); } +void Pixel2MM(double dx, double dy, double *mm_dx, double *mm_dy) + { cdfCanvasPixel2MM(canvas, dx, dy, mm_dx, mm_dy); } +void Origin(int x, int y) + { cdCanvasOrigin(canvas, x, y); } +void Origin(double x, double y) + { cdfCanvasOrigin(canvas, x, y); } +void GetOrigin(int *x, int *y) + { cdCanvasGetOrigin(canvas, x, y); } +void GetOrigin(double *x, double *y) + { cdfCanvasGetOrigin(canvas, x, y); } + +/* clipping */ +int Clip(int mode) + { return cdCanvasClip(canvas, mode); } +void ClipArea(int xmin, int xmax, int ymin, int ymax) + { cdCanvasClipArea(canvas, xmin, xmax, ymin, ymax); } +int GetClipArea(int *xmin, int *xmax, int *ymin, int *ymax) + { return cdCanvasGetClipArea(canvas, xmin, xmax, ymin, ymax); } +void ClipArea(double xmin, double xmax, double ymin, double ymax) + { cdfCanvasClipArea(canvas, xmin, xmax, ymin, ymax); } +int GetClipArea(double *xmin, double *xmax, double *ymin, double *ymax) + { return cdfCanvasGetClipArea(canvas, xmin, xmax, ymin, ymax); } + +/* clipping region */ +int IsPointInRegion(int x, int y) + { return cdCanvasIsPointInRegion(canvas, x, y); } +void OffsetRegion(int x, int y) + { cdCanvasOffsetRegion(canvas, x, y); } +void GetRegionBox(int *xmin, int *xmax, int *ymin, int *ymax) + { cdCanvasGetRegionBox(canvas, xmin, xmax, ymin, ymax); } +int RegionCombineMode(int mode) + { return cdCanvasRegionCombineMode(canvas, mode); } + +/* primitives */ +void Pixel(int x, int y, long color) + { cdCanvasPixel(canvas, x, y, color); } +void Mark(int x, int y) + { cdCanvasMark(canvas, x, y); } + +void Line(int x1, int y1, int x2, int y2) + { cdCanvasLine(canvas, x1, y1, x2, y2); } +void Begin(int mode) + { cdCanvasBegin(canvas, mode); } +void Vertex(int x, int y) + { cdCanvasVertex(canvas, x, y); } +void End() + { cdCanvasEnd(canvas); } +void Rect(int xmin, int xmax, int ymin, int ymax) + { cdCanvasRect(canvas, xmin, xmax, ymin, ymax); } +void Box(int xmin, int xmax, int ymin, int ymax) + { cdCanvasBox(canvas, xmin, xmax, ymin, ymax); } +void Arc(int xc, int yc, int w, int h, double angle1, double angle2) + { cdCanvasArc(canvas, xc, yc, w, h, angle1, angle2); } +void Sector(int xc, int yc, int w, int h, double angle1, double angle2) + { cdCanvasSector(canvas, xc, yc, w, h, angle1, angle2); } +void Chord(int xc, int yc, int w, int h, double angle1, double angle2) + { cdCanvasChord(canvas, xc, yc, w, h, angle1, angle2); } +void Text(int x, int y, const char* s) + { cdCanvasText(canvas, x, y, s); } + +void Line(double x1, double y1, double x2, double y2) + { cdfCanvasLine(canvas, x1, y1, x2, y2); } +void Vertex(double x, double y) + { cdfCanvasVertex(canvas, x, y); } +void Rect(double xmin, double xmax, double ymin, double ymax) + { cdfCanvasRect(canvas, xmin, xmax, ymin, ymax); } +void Box(double xmin, double xmax, double ymin, double ymax) + { cdfCanvasBox(canvas, xmin, xmax, ymin, ymax); } +void Arc(double xc, double yc, double w, double h, double angle1, double angle2) + { cdfCanvasArc(canvas, xc, yc, w, h, angle1, angle2); } +void Sector(double xc, double yc, double w, double h, double angle1, double angle2) + { cdfCanvasSector(canvas, xc, yc, w, h, angle1, angle2); } +void Chord(double xc, double yc, double w, double h, double angle1, double angle2) + { cdfCanvasChord(canvas, xc, yc, w, h, angle1, angle2); } +void Text(double x, double y, const char* s) + { cdfCanvasText(canvas, x, y, s); } + +/* attributes */ +long Background(long color) + { return cdCanvasBackground(canvas, color); } +long Foreground(long color) + { return cdCanvasForeground(canvas, color); } +int BackOpacity(int opacity) + { return cdCanvasBackOpacity(canvas, opacity); } +int WriteMode(int mode) + { return cdCanvasWriteMode(canvas, mode); } +int LineStyle(int style) + { return cdCanvasLineStyle(canvas, style); } +void LineStyleDashes(const int* dashes, int count) + { cdCanvasLineStyleDashes(canvas, dashes, count); } +int LineWidth(int width) + { return cdCanvasLineWidth(canvas, width); } +int LineJoin(int join) + { return cdCanvasLineJoin(canvas, join); } +int LineCap(int cap) + { return cdCanvasLineCap(canvas, cap); } +int InteriorStyle(int style) + { return cdCanvasInteriorStyle(canvas, style); } +int Hatch(int style) + { return cdCanvasHatch(canvas, style); } +void Stipple(int w, int h, const unsigned char* stipple) + { cdCanvasStipple(canvas, w, h, stipple); } +unsigned char* GetStipple(int *n, int *m) + { return cdCanvasGetStipple(canvas, n, m); } +void Pattern(int w, int h, long const int *pattern) + { cdCanvasPattern(canvas, w, h, pattern); } +long* GetPattern(int* n, int* m) + { return cdCanvasGetPattern(canvas, n, m); } +int FillMode(int mode) + { return cdCanvasFillMode(canvas, mode); } +int Font(const char* type_face, int style, int size) + { return cdCanvasFont(canvas, type_face, style, size); } +void GetFont(char *type_face, int *style, int *size) + { cdCanvasGetFont(canvas, type_face, style, size); } +char* NativeFont(const char* font) + { return cdCanvasNativeFont(canvas, font); } +int TextAlignment(int alignment) + { return cdCanvasTextAlignment(canvas, alignment); } +double TextOrientation(double angle) + { return cdCanvasTextOrientation(canvas, angle); } +int MarkType(int type) + { return cdCanvasMarkType(canvas, type); } +int MarkSize(int size) + { return cdCanvasMarkSize(canvas, size); } + +/* vector text */ +void VectorText(int x, int y, const char* s) + { cdCanvasVectorText(canvas, x, y, s); } +void MultiLineVectorText(int x, int y, const char* s) + { cdCanvasMultiLineVectorText(canvas, x, y, s); } + +/* vector text attributes */ +char *VectorFont(const char *filename) + { return cdCanvasVectorFont(canvas, filename); } +void VectorTextDirection(int x1, int y1, int x2, int y2) + { cdCanvasVectorTextDirection(canvas, x1, y1, x2, y2); } +double* VectorTextTransform(const double* matrix) + { return cdCanvasVectorTextTransform(canvas, matrix); } +void VectorTextSize(int size_x, int size_y, const char* s) + { cdCanvasVectorTextSize(canvas, size_x, size_y, s); } +int VectorCharSize(int size) + { return cdCanvasVectorCharSize(canvas, size); } + + +/* vector text properties */ +void GetVectorTextSize(const char* s, int *x, int *y) + { cdCanvasGetVectorTextSize(canvas, s, x, y); } +void GetVectorTextBounds(const char* s, int x, int y, int *rect) + { cdCanvasGetVectorTextBounds(canvas, s, x, y, rect); } + +/* properties */ +void GetFontDim(int *max_width, int *height, int *ascent, int *descent) + { cdCanvasGetFontDim(canvas, max_width, height, ascent, descent); } +void GetTextSize(const char* s, int *width, int *height) + { cdCanvasGetTextSize(canvas, s, width, height); } +void GetTextBox(int x, int y, const char* s, int *xmin, int *xmax, int *ymin, int *ymax) + { cdCanvasGetTextBox(canvas, x, y, s, xmin, xmax, ymin, ymax); } +void GetTextBounds(int x, int y, const char* s, int *rect) + { cdCanvasGetTextBounds(canvas, x, y, s, rect); } +int GetColorPlanes() + { return cdCanvasGetColorPlanes(canvas); } + +/* color */ +void Palette(int n, const long *palette, int mode) + { cdCanvasPalette(canvas, n, palette, mode); } + +/* client images */ +void GetImageRGB(unsigned char* r, unsigned char* g, unsigned char* b, int x, int y, int w, int h) + { cdCanvasGetImageRGB(canvas, r, g, b, x, y, w, h); } +void PutImageRectRGB(int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) + { cdCanvasPutImageRectRGB(canvas, iw, ih, r, g, b, x, y, w, h, xmin, xmax, ymin, ymax); } +void PutImageRectRGBA(int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, const unsigned char* a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) + { cdCanvasPutImageRectRGBA(canvas, iw, ih, r, g, b, a, x, y, w, h, xmin, xmax, ymin, ymax); } +void PutImageRectMap(int iw, int ih, const unsigned char* index, const long* colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) + { cdCanvasPutImageRectMap(canvas, iw, ih, index, colors, x, y, w, h, xmin, xmax, ymin, ymax); } + +/* server images */ +cdImage* CreateImage(int w, int h) + { return cdCanvasCreateImage(canvas, w, h); } +void GetImage(cdImage* image, int x, int y) + { cdCanvasGetImage(canvas, image, x, y); } +void PutImageRect(cdImage* image, int x, int y, int xmin, int xmax, int ymin, int ymax) + { cdCanvasPutImageRect(canvas, image, x, y, xmin, xmax, ymin, ymax); } +void ScrollArea(int xmin, int xmax, int ymin, int ymax, int dx, int dy) + { cdCanvasScrollArea(canvas, xmin, xmax, ymin, ymax, dx, dy); } + +void PutBitmap(cdBitmap* bitmap, int x, int y, int w, int h) + { cdCanvasPutBitmap(canvas, bitmap, x, y, w, h); } +void GetBitmap(cdBitmap* bitmap, int x, int y) + { cdCanvasGetBitmap(canvas, bitmap, x, y); } + +/* coordinate transformation */ +void wWindow(double xmin, double xmax, double ymin, double ymax) + { wdCanvasWindow(canvas, xmin, xmax, ymin, ymax); } +void wGetWindow(double *xmin, double *xmax, double *ymin, double *ymax) + { wdCanvasGetWindow(canvas, xmin, xmax, ymin, ymax); } +void wViewport(int xmin, int xmax, int ymin, int ymax) + { wdCanvasViewport(canvas, xmin, xmax, ymin, ymax); } +void wGetViewport(int *xmin, int *xmax, int *ymin, int *ymax) + { wdCanvasGetViewport(canvas, xmin, xmax, ymin, ymax); } +void wWorld2Canvas(double xw, double yw, int *xv, int *yv) + { wdCanvasWorld2Canvas(canvas, xw, yw, xv, yv); } +void wWorld2CanvasSize(double hw, double vw, int *hv, int *vv) + { wdCanvasWorld2CanvasSize(canvas, hw, vw, hv, vv); } +void wCanvas2World(int xv, int yv, double *xw, double *yw) + { wdCanvasCanvas2World(canvas, xv, yv, xw, yw); } + +void wClipArea(double xmin, double xmax, double ymin, double ymax) + { wdCanvasClipArea(canvas, xmin, xmax, ymin, ymax); } +int wGetClipArea(double *xmin, double *xmax, double *ymin, double *ymax) + { return wdCanvasGetClipArea(canvas, xmin, xmax, ymin, ymax); } +int wIsPointInRegion(double x, double y) + { return wdCanvasIsPointInRegion(canvas, x, y); } +void wOffsetRegion(double x, double y) + { wdCanvasOffsetRegion(canvas, x, y); } +void wGetRegionBox(double *xmin, double *xmax, double *ymin, double *ymax) + { wdCanvasGetRegionBox(canvas, xmin, xmax, ymin, ymax); } + +/* primitives */ +void wPixel(double x, double y, long color) + { wdCanvasPixel(canvas, x, y, color); } +void wMark(double x, double y) + { wdCanvasMark(canvas, x, y); } +void wLine(double x1, double y1, double x2, double y2) + { wdCanvasLine(canvas, x1, y1, x2, y2); } +void wVertex(double x, double y) + { wdCanvasVertex(canvas, x, y); } +void wRect(double xmin, double xmax, double ymin, double ymax) + { wdCanvasRect(canvas, xmin, xmax, ymin, ymax); } +void wBox(double xmin, double xmax, double ymin, double ymax) + { wdCanvasBox(canvas, xmin, xmax, ymin, ymax); } +void wArc(double xc, double yc, double w, double h, double angle1, double angle2) + { wdCanvasArc(canvas, xc, yc, w, h, angle1, angle2); } +void wSector(double xc, double yc, double w, double h, double angle1, double angle2) + { wdCanvasSector(canvas, xc, yc, w, h, angle1, angle2); } +void wChord(double xc, double yc, double w, double h, double angle1, double angle2) + { wdCanvasChord(canvas, xc, yc, w, h, angle1, angle2); } +void wText(double x, double y, const char* s) + { wdCanvasText(canvas, x, y, s); } + +void wPutImageRect(cdImage* image, double x, double y, int xmin, int xmax, int ymin, int ymax) + { wdCanvasPutImageRect(canvas, image, x, y, xmin, xmax, ymin, ymax); } +void wPutImageRectRGB(int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) + { wdCanvasPutImageRectRGB(canvas, iw, ih, r, g, b, x, y, w, h, xmin, xmax, ymin, ymax); } +void wPutImageRectRGBA(int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, const unsigned char* a, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) + { wdCanvasPutImageRectRGBA(canvas, iw, ih, r, g, b, a, x, y, w, h, xmin, xmax, ymin, ymax); } +void wPutImageRectMap(int iw, int ih, const unsigned char* index, const long* colors, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) + { wdCanvasPutImageRectMap(canvas, iw, ih, index, colors, x, y, w, h, xmin, xmax, ymin, ymax); } +void wPutBitmap(cdBitmap* bitmap, double x, double y, double w, double h) + { wdCanvasPutBitmap(canvas, bitmap, x, y, w, h); } + +/* attributes */ +double wLineWidth(double width) + { return wdCanvasLineWidth(canvas, width); } +int wFont(const char* type_face, int style, double size) + { return wdCanvasFont(canvas, type_face, style, size); } +void wGetFont(char *type_face, int *style, double *size) + { wdCanvasGetFont(canvas, type_face, style, size); } +double wMarkSize(double size) + { return wdCanvasMarkSize(canvas, size); } +void wGetFontDim(double *max_width, double *height, double *ascent, double *descent) + { wdCanvasGetFontDim(canvas, max_width, height, ascent, descent); } +void wGetTextSize(const char* s, double *width, double *height) + { wdCanvasGetTextSize(canvas, s, width, height); } +void wGetTextBox(double x, double y, const char* s, double *xmin, double *xmax, double *ymin, double *ymax) + { wdCanvasGetTextBox(canvas, x, y, s, xmin, xmax, ymin, ymax); } +void wGetTextBounds(double x, double y, const char* s, double *rect) + { wdCanvasGetTextBounds(canvas, x, y, s, rect); } +void wStipple(int w, int h, const unsigned char*fgbg, double w_mm, double h_mm) + { wdCanvasStipple(canvas, w, h, fgbg, w_mm, h_mm); } +void wPattern(int w, int h, const long *color, double w_mm, double h_mm) + { wdCanvasPattern(canvas, w, h, color, w_mm, h_mm); } + +/* vector text */ +void wVectorTextDirection(double x1, double y1, double x2, double y2) + { wdCanvasVectorTextDirection(canvas, x1, y1, x2, y2); } +void wVectorTextSize(double size_x, double size_y, const char* s) + { wdCanvasVectorTextSize(canvas, size_x, size_y, s); } +void wGetVectorTextSize(const char* s, double *x, double *y) + { wdCanvasGetVectorTextSize(canvas, s, x, y); } +double wVectorCharSize(double size) + { return wdCanvasVectorCharSize(canvas, size); } +void wVectorText(double x, double y, const char* s) + { wdCanvasVectorText(canvas, x, y, s); } +void wMultiLineVectorText(double x, double y, const char* s) + { wdCanvasMultiLineVectorText(canvas, x, y, s); } +void wGetVectorTextBounds(const char* s, double x, double y, double *rect) + { wdCanvasGetVectorTextBounds(canvas, s, x, y, rect); } + +}; + +#endif + diff --git a/cd/include/cd_old.h b/cd/include/cd_old.h new file mode 100755 index 0000000..47d805c --- /dev/null +++ b/cd/include/cd_old.h @@ -0,0 +1,158 @@ +/** \file + * \brief Old User API + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_OLD_H +#define __CD_OLD_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* canvas control */ +int cdActivate(cdCanvas* canvas); +cdCanvas* cdActiveCanvas(void); +int cdSimulate(int mode); +void cdFlush(void); +void cdClear(void); +cdState* cdSaveState(void); +void cdRestoreState(cdState* state); +void cdSetAttribute(const char* name, char* data); +void cdSetfAttribute(const char* name, const char* format, ...); +char* cdGetAttribute(const char* name); +cdContext* cdGetContext(cdCanvas* canvas); + +/* interpretation */ +int cdRegisterCallback(cdContext *context, int cb, cdCallback func); +int cdPlay(cdContext *context, int xmin, int xmax, int ymin, int ymax, void *data); + +/* coordinate transformation */ +void cdGetCanvasSize(int *width, int *height, double *width_mm, double *height_mm); +int cdUpdateYAxis(int *y); +void cdMM2Pixel(double mm_dx, double mm_dy, int *dx, int *dy); +void cdPixel2MM(int dx, int dy, double *mm_dx, double *mm_dy); +void cdOrigin(int x, int y); + +/* clipping */ +int cdClip(int mode); +int * cdGetClipPoly(int *n); +void cdClipArea(int xmin, int xmax, int ymin, int ymax); +int cdGetClipArea(int *xmin, int *xmax, int *ymin, int *ymax); + +/* clipping region */ +int cdPointInRegion(int x, int y); +void cdOffsetRegion(int x, int y); +void cdRegionBox(int *xmin, int *xmax, int *ymin, int *ymax); +int cdRegionCombineMode(int mode); + +/* primitives */ +void cdPixel(int x, int y, long color); +void cdMark(int x, int y); +void cdLine(int x1, int y1, int x2, int y2); +void cdBegin(int mode); +void cdVertex(int x, int y); +void cdEnd(void); +void cdRect(int xmin, int xmax, int ymin, int ymax); +void cdBox(int xmin, int xmax, int ymin, int ymax); +void cdArc(int xc, int yc, int w, int h, double angle1, double angle2); +void cdSector(int xc, int yc, int w, int h, double angle1, double angle2); +void cdChord(int xc, int yc, int w, int h, double angle1, double angle2); +void cdText(int x, int y, const char* s); + +/* attributes */ +long cdBackground(long color); +long cdForeground(long color); +int cdBackOpacity(int opacity); +int cdWriteMode(int mode); +int cdLineStyle(int style); +void cdLineStyleDashes(const int* dashes, int count); +int cdLineWidth(int width); +int cdLineJoin(int join); +int cdLineCap(int cap); +int cdInteriorStyle(int style); +int cdHatch(int style); +void cdStipple(int w, int h, const unsigned char* stipple); +unsigned char* cdGetStipple(int *n, int *m); +void cdPattern(int w, int h, const long *pattern); +long* cdGetPattern(int* n, int* m); +int cdFillMode(int mode); +void cdFont(int type_face, int style, int size); +void cdGetFont(int *type_face, int *style, int *size); +char* cdNativeFont(const char* font); +int cdTextAlignment(int alignment); +double cdTextOrientation(double angle); +int cdMarkType(int type); +int cdMarkSize(int size); + +/* vector text */ +void cdVectorText(int x, int y, const char* s); +void cdMultiLineVectorText(int x, int y, const char* s); + +/* vector text attributes */ +char *cdVectorFont(const char *filename); +void cdVectorTextDirection(int x1, int y1, int x2, int y2); +double* cdVectorTextTransform(const double* matrix); +void cdVectorTextSize(int size_x, int size_y, const char* s); +int cdVectorCharSize(int size); + +/* vector text properties */ +void cdGetVectorTextSize(const char* s, int *x, int *y); +void cdGetVectorTextBounds(const char* s, int x, int y, int *rect); + +/* properties */ +void cdFontDim(int *max_width, int *height, int *ascent, int *descent); +void cdTextSize(const char* s, int *width, int *height); +void cdTextBox(int x, int y, const char* s, int *xmin, int *xmax, int *ymin, int *ymax); +void cdTextBounds(int x, int y, const char* s, int *rect); +int cdGetColorPlanes(void); + +/* color */ +void cdPalette(int n, const long* palette, int mode); + +/* client images */ +void cdGetImageRGB(unsigned char* r, unsigned char* g, unsigned char* b, int x, int y, int w, int h); +void cdPutImageRectRGB(int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); +void cdPutImageRectRGBA(int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, const unsigned char* a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); +void cdPutImageRectMap(int iw, int ih, const unsigned char* index, const long* colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); + +/* defined for backward compatibility */ +#define cdPutImageRGB(iw, ih, r, g, b, x, y, w, h) cdPutImageRectRGB((iw), (ih), (r), (g), (b), (x), (y), (w), (h), 0, 0, 0, 0) +#define cdPutImageRGBA(iw, ih, r, g, b, a, x, y, w, h) cdPutImageRectRGBA((iw), (ih), (r), (g), (b), (a), (x), (y), (w), (h), 0, 0, 0, 0) +#define cdPutImageMap(iw, ih, index, colors, x, y, w, h) cdPutImageRectMap((iw), (ih), (index), (colors), (x), (y), (w), (h), 0, 0, 0, 0) +#define cdPutImage(image, x, y) cdPutImageRect((image), (x), (y), 0, 0, 0, 0) + +/* server images */ +cdImage* cdCreateImage(int w, int h); +void cdGetImage(cdImage* image, int x, int y); +void cdPutImageRect(cdImage* image, int x, int y, int xmin, int xmax, int ymin, int ymax); +void cdScrollArea(int xmin, int xmax, int ymin, int ymax, int dx, int dy); + +/* bitmap */ +void cdPutBitmap(cdBitmap* bitmap, int x, int y, int w, int h); +void cdGetBitmap(cdBitmap* bitmap, int x, int y); + +enum { /* OLD type face -> new names */ + CD_SYSTEM, /* "System" */ + CD_COURIER, /* "Courier" */ + CD_TIMES_ROMAN, /* "Times" */ + CD_HELVETICA, /* "Helvetica" */ + CD_NATIVE +}; + +/* OLD definitions, defined for backward compatibility */ +#define CD_CLIPON CD_CLIPAREA +#define CD_CENTER_BASE CD_BASE_CENTER +#define CD_LEFT_BASE CD_BASE_LEFT +#define CD_RIGHT_BASE CD_BASE_RIGHT +#define CD_ITALIC_BOLD CD_BOLD_ITALIC +#define cdScrollImage cdScrollArea +#define cdCanvas2Raster(x, y) {(void)x; cdUpdateYAxis(y);} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cd/include/cd_private.h b/cd/include/cd_private.h new file mode 100755 index 0000000..b8cec85 --- /dev/null +++ b/cd/include/cd_private.h @@ -0,0 +1,360 @@ +/** \file + * \brief Private CD declarations + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_PRIVATE_H +#define __CD_PRIVATE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* All context canvas must have at least the base canvas pointer. */ +typedef struct _cdCtxCanvasBase +{ + cdCanvas* canvas; +} cdCtxCanvasBase; + +typedef struct _cdCtxCanvas cdCtxCanvas; +typedef struct _cdCtxImage cdCtxImage; + +typedef struct _cdVectorFont cdVectorFont; +typedef struct _cdSimulation cdSimulation; + +typedef struct _cdPoint +{ + int x, y; +} cdPoint; + +typedef struct _cdfPoint +{ + double x, y; +} cdfPoint; + +typedef struct _cdRect +{ + int xmin, xmax, ymin, ymax; +} cdRect; + +typedef struct _cdfRect +{ + double xmin, xmax, ymin, ymax; +} cdfRect; + +typedef struct _cdAttribute +{ + const char *name; + + /* can be NULL one of them */ + void (*set)(cdCtxCanvas* ctxcanvas, char* data); + char* (*get)(cdCtxCanvas* ctxcanvas); +} cdAttribute; + +struct _cdImage +{ + int w, h; + cdCtxImage* ctximage; + + /* can NOT be NULL */ + void (*cxGetImage)(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y); + void (*cxPutImageRect)(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y, int xmin, int xmax, int ymin, int ymax); + void (*cxKillImage)(cdCtxImage* ctximage); +}; + +struct _cdContext +{ + unsigned long caps; /* canvas capabilities, combination of CD_CAP_* */ + int plus; /* indicates if the canvas is context plus */ + + /* can NOT be NULL */ + void (*cxCreateCanvas)(cdCanvas* canvas, void *data); + void (*cxInitTable)(cdCanvas* canvas); + + /* can be NULL */ + int (*cxPlay)(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data); + int (*cxRegisterCallback)(int cb, cdCallback func); +}; + +struct _cdCanvas +{ + char signature[2]; /* must be "CD" */ + + /* can NOT be NULL */ + void (*cxPixel)(cdCtxCanvas* ctxcanvas, int x, int y, long color); + void (*cxLine)(cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2); + void (*cxPoly)(cdCtxCanvas* ctxcanvas, int mode, cdPoint* points, int n); + void (*cxRect)(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); + void (*cxBox)(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); + void (*cxArc)(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2); + void (*cxSector)(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2); + void (*cxChord)(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2); + void (*cxText)(cdCtxCanvas* ctxcanvas, int x, int y, const char *s, int len); + void (*cxKillCanvas)(cdCtxCanvas* ctxcanvas); + int (*cxFont)(cdCtxCanvas* ctxcanvas, const char *type_face, int style, int size); + void (*cxPutImageRectMap)(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *index, const long *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); + void (*cxPutImageRectRGB)(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); + + /* default implementation uses the simulation driver */ + void (*cxGetFontDim)(cdCtxCanvas* ctxcanvas, int *max_width, int *height, int *ascent, int *descent); + void (*cxGetTextSize)(cdCtxCanvas* ctxcanvas, const char *s, int len, int *width, int *height); + + /* all the following function pointers can be NULL */ + + void (*cxFlush)(cdCtxCanvas* ctxcanvas); + void (*cxClear)(cdCtxCanvas* ctxcanvas); + + void (*cxFLine)(cdCtxCanvas* ctxcanvas, double x1, double y1, double x2, double y2); + void (*cxFPoly)(cdCtxCanvas* ctxcanvas, int mode, cdfPoint* points, int n); + void (*cxFRect)(cdCtxCanvas* ctxcanvas, double xmin, double xmax, double ymin, double ymax); + void (*cxFBox)(cdCtxCanvas* ctxcanvas, double xmin, double xmax, double ymin, double ymax); + void (*cxFArc)(cdCtxCanvas* ctxcanvas, double xc, double yc, double w, double h, double angle1, double angle2); + void (*cxFSector)(cdCtxCanvas* ctxcanvas, double xc, double yc, double w, double h, double angle1, double angle2); + void (*cxFChord)(cdCtxCanvas* ctxcanvas, double xc, double yc, double w, double h, double angle1, double angle2); + void (*cxFText)(cdCtxCanvas* ctxcanvas, double x, double y, const char *s, int len); + + int (*cxClip)(cdCtxCanvas* ctxcanvas, int mode); + void (*cxClipArea)(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); + void (*cxFClipArea)(cdCtxCanvas* ctxcanvas, double xmin, double xmax, double ymin, double ymax); + int (*cxBackOpacity)(cdCtxCanvas* ctxcanvas, int opacity); + int (*cxWriteMode)(cdCtxCanvas* ctxcanvas, int mode); + int (*cxLineStyle)(cdCtxCanvas* ctxcanvas, int style); + int (*cxLineWidth)(cdCtxCanvas* ctxcanvas, int width); + int (*cxLineJoin)(cdCtxCanvas* ctxcanvas, int join); + int (*cxLineCap)(cdCtxCanvas* ctxcanvas, int cap); + int (*cxInteriorStyle)(cdCtxCanvas* ctxcanvas, int style); + int (*cxHatch)(cdCtxCanvas* ctxcanvas, int style); + void (*cxStipple)(cdCtxCanvas* ctxcanvas, int w, int h, const unsigned char *stipple); + void (*cxPattern)(cdCtxCanvas* ctxcanvas, int w, int h, const long *pattern); + int (*cxNativeFont)(cdCtxCanvas* ctxcanvas, const char* font); + int (*cxTextAlignment)(cdCtxCanvas* ctxcanvas, int alignment); + double (*cxTextOrientation)(cdCtxCanvas* ctxcanvas, double angle); + void (*cxPalette)(cdCtxCanvas* ctxcanvas, int n, const long *palette, int mode); + long (*cxBackground)(cdCtxCanvas* ctxcanvas, long color); + long (*cxForeground)(cdCtxCanvas* ctxcanvas, long color); + void (*cxTransform)(cdCtxCanvas* ctxcanvas, const double* matrix); + + void (*cxPutImageRectRGBA)(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); + void (*cxGetImageRGB)(cdCtxCanvas* ctxcanvas, unsigned char *r, unsigned char *g, unsigned char *b, int x, int y, int w, int h); + void (*cxScrollArea)(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax, int dx, int dy); + + cdCtxImage* (*cxCreateImage)(cdCtxCanvas* ctxcanvas, int w, int h); + void (*cxKillImage)(cdCtxImage* ctximage); + void (*cxGetImage)(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y); + void (*cxPutImageRect)(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y, int xmin, int xmax, int ymin, int ymax); + + void (*cxNewRegion)(cdCtxCanvas* ctxcanvas); + int (*cxIsPointInRegion)(cdCtxCanvas* ctxcanvas, int x, int y); + void (*cxOffsetRegion)(cdCtxCanvas* ctxcanvas, int x, int y); + void (*cxGetRegionBox)(cdCtxCanvas* ctxcanvas, int *xmin, int *xmax, int *ymin, int *ymax); + + int (*cxActivate)(cdCtxCanvas* ctxcanvas); + void (*cxDeactivate)(cdCtxCanvas* ctxcanvas); + + /* the driver must update these, when the canvas is created and + whenever the canvas change its size or bpp. */ + int w,h; /* size in pixels */ /**** pixel = mm * res ****/ + double w_mm, h_mm; /* size in mm */ /**** mm = pixel / res ****/ + double xres, yres; /* resolution in pixels/mm */ /**** res = pixel / mm ****/ + int bpp; /* number of bits per pixel */ + int invert_yaxis; /* the driver has the y axis from top to bottom */ + double matrix[6]; + int use_matrix; + + /* clipping attributes */ + int clip_mode; + cdRect clip_rect; + cdfRect clip_frect; + int clip_poly_n; + cdPoint* clip_poly; /* only defined if integer poligon created, if exist clip_fpoly is NULL, and ->Poly exists */ + cdfPoint* clip_fpoly; /* only defined if real poligon created, if exist clip_poly is NULL, and ->fPoly exists */ + + /* clipping region attributes */ + int new_region; + int combine_mode; + + /* color attributes */ + long foreground, background; + int back_opacity, write_mode; + + /* primitive attributes */ + int mark_type, mark_size; + + int line_style, line_width; + int line_cap, line_join; + int* line_dashes; + int line_dashes_count; + + int interior_style, hatch_style; + int fill_mode; + + char font_type_face[1024]; + int font_style, font_size; + int text_alignment; + double text_orientation; + char native_font[1024]; + + int pattern_w, pattern_h, pattern_size; + long* pattern; + int stipple_w, stipple_h, stipple_size; + unsigned char* stipple; + + /* origin */ + int use_origin; + cdPoint origin; /* both points contains the same coordinate always */ + cdfPoint forigin; + + /* last polygon */ + int poly_mode, + poly_n, /* current number of vertices */ + poly_size, fpoly_size; /* allocated number of vertices, only increases */ + cdPoint* poly; /* used during an integer poligon creation, only if ->Poly exists */ + cdfPoint* fpoly; /* used during an real poligon creation, only if ->fPoly exists */ + int use_fpoly; + + /* simulation flags */ + int sim_mode; + int sim_poly; + + /* WC */ + double s, sx, tx, sy, ty; /* Transformacao Window -> Viewport (scale+translation)*/ + cdfRect window; /* Window in WC */ + cdRect viewport; /* Viewport in pixels */ + + cdAttribute* attrib_list[50]; + int attrib_n; + + cdVectorFont* vector_font; + cdSimulation* simulation; + cdCtxCanvas* ctxcanvas; + cdContext* context; +}; + + +/***************/ +/* attributes */ +/***************/ +void cdRegisterAttribute(cdCanvas* canvas, cdAttribute* attrib); + +/***************/ +/* vector font */ +/***************/ +cdVectorFont* cdCreateVectorFont(cdCanvas* canvas); +void cdKillVectorFont(cdVectorFont* vector_font_data); + +/**********/ +/* WC */ +/**********/ +void wdSetDefaults(cdCanvas* canvas); + +/********************/ +/* Context Plus */ +/********************/ +void cdInitContextPlusList(cdContext* ctx_list[]); +cdContext* cdGetContextPlus(int ctx); +enum{CD_CTX_NATIVEWINDOW, CD_CTX_IMAGE, CD_CTX_DBUFFER, CD_CTX_PRINTER, CD_CTX_EMF, CD_CTX_CLIPBOARD}; +#define NUM_CONTEXTPLUS 6 + +/*************/ +/* utilities */ +/*************/ +int cdRound(double x); +void cdCanvasGetEllipseBox(int xc, int yc, int w, int h, double a1, double a2, int *xmin, int *xmax, int *ymin, int *ymax); +int cdCheckBoxSize(int *xmin, int *xmax, int *ymin, int *ymax); +int cdfCheckBoxSize(double *xmin, double *xmax, double *ymin, double *ymax); +void cdNormalizeLimits(int w, int h, int *xmin, int *xmax, int *ymin, int *ymax); +int cdGetFileName(const char* strdata, char* filename); +int cdStrEqualNoCase(const char* str1, const char* str2); +int cdStrLineCount(const char* str); +char* cdStrDup(const char* str); +char* cdStrDupN(const char* str, int len); + +#define _cdCheckCanvas(_canvas) (_canvas!=NULL && ((unsigned char*)_canvas)[0] == 'C' && ((unsigned char*)_canvas)[1] == 'D') +#define _cdInvertYAxis(_canvas, _y) (_canvas->h - (_y) - 1) +#define _cdSwapInt(_a,_b) {int _c=_a;_a=_b;_b=_c;} +#define _cdSwapDouble(_a,_b) {double _c=_a;_a=_b;_b=_c;} +#define _cdRound(_x) ((int)(_x < 0? (_x-0.5): (_x+0.5))) +#define _cdRotateHatch(_x) ((_x) = ((_x)<< 1) | ((_x)>>7)) + +/******************/ +/* Transformation */ +/******************/ +void cdMatrixTransformPoint(double* matrix, int x, int y, int *rx, int *ry); +void cdfMatrixTransformPoint(double* matrix, double x, double y, double *rx, double *ry); +void cdMatrixMultiply(const double* matrix, double* mul_matrix); +void cdMatrixInverse(const double* matrix, double* inv_matrix); +void cdRotatePoint(cdCanvas* canvas, int x, int y, int cx, int cy, int *rx, int *ry, double sin_teta, double cos_teta); +void cdRotatePointY(cdCanvas* canvas, int x, int y, int cx, int cy, int *ry, double sin_theta, double cos_theta); +void cdTextTranslatePoint(cdCanvas* canvas, int x, int y, int w, int h, int baseline, int *rx, int *ry); +void cdMovePoint(int *x, int *y, double dx, double dy, double sin_theta, double cos_theta); +void cdfMovePoint(double *x, double *y, double dx, double dy, double sin_theta, double cos_theta); + +/*************/ +/* Fonts */ +/*************/ +int cdParsePangoFont(const char *nativefont, char *type_face, int *style, int *size); +int cdParseIupWinFont(const char *nativefont, char *type_face, int *style, int *size); +int cdParseXWinFont(const char *nativefont, char *type_face, int *style, int *size); +int cdGetFontSizePixels(cdCanvas* canvas, int size); +int cdGetFontSizePoints(cdCanvas* canvas, int size); + +/****************/ +/* For Images */ +/****************/ +unsigned char cdZeroOrderInterpolation(int width, int height, const unsigned char *map, float xl, float yl); +unsigned char cdBilinearInterpolation(int width, int height, const unsigned char *map, float xl, float yl); +void cdImageRGBInitInverseTransform(int w, int h, int xmin, int xmax, int ymin, int ymax, float *xfactor, float *yfactor, const double* matrix, double* inv_matrix); +void cdImageRGBInverseTransform(int t_x, int t_y, float *i_x, float *i_y, float xfactor, float yfactor, int xmin, int ymin, int x, int y, double *inv_matrix); +void cdImageRGBCalcDstLimits(cdCanvas* canvas, int x, int y, int w, int h, int *xmin, int *xmax, int *ymin, int *ymax, int* rect); +void cdRGB2Gray(int width, int height, const unsigned char* red, const unsigned char* green, const unsigned char* blue, unsigned char* index, long *color); + +#define CD_ALPHA_BLEND(_src,_dst,_alpha) (unsigned char)(((_src) * (_alpha) + (_dst) * (255 - (_alpha))) / 255) + +int* cdGetZoomTable(int w, int rw, int xmin); +int cdCalcZoom(int canvas_size, int cnv_rect_pos, int cnv_rect_size, + int *new_cnv_rect_pos, int *new_cnv_rect_size, + int img_rect_pos, int img_rect_size, + int *new_img_rect_pos, int *new_img_rect_size, int is_horizontal); + +/**************/ +/* simulation */ +/**************/ +cdSimulation* cdCreateSimulation(cdCanvas* canvas); +void cdKillSimulation(cdSimulation* simulation); + +/* Replacements for cdCanvas function pointers */ +void cdrectSIM(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); +void cdboxSIM(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); +void cdlineSIM(cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2); +void cdarcSIM(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); +void cdsectorSIM(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); +void cdchordSIM(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); +void cdpolySIM(cdCtxCanvas* ctxcanvas, int mode, cdPoint* points, int n); + +/* Simulation functions that are independent of the simulation base driver */ +void cdSimMark(cdCanvas* canvas, int x, int y); +void cdSimPolyBezier(cdCanvas* canvas, const cdPoint* points, int n); +void cdSimPutImageRectRGBA(cdCanvas* canvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); + +/* Simulation functions that are independent of the simulation base driver, + and does not checks for axis and matrix. + All use the polygon method ->cxFPoly only. */ +void cdfSimPolyBezier(cdCanvas* canvas, const cdfPoint* points, int n); +void cdfSimRect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax); +void cdfSimBox(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax); +void cdfSimElipse(cdCtxCanvas* ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2, int sector); +void cdfSimArc(cdCtxCanvas *ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2); + +/* Replacements for Font using estimation */ +void cdgetfontdimEX(cdCtxCanvas* ctxcanvas, int *max_width, int *height, int *ascent, int *descent); +void cdgettextsizeEX(cdCtxCanvas* ctxcanvas, const char *s, int len, int *width, int *height); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cd/include/cdcgm.h b/cd/include/cdcgm.h new file mode 100755 index 0000000..2e686a7 --- /dev/null +++ b/cd/include/cdcgm.h @@ -0,0 +1,34 @@ +/** \file + * \brief CGM driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_CGM_H +#define __CD_CGM_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextCGM(void); +#define CD_CGM cdContextCGM() + +#define CD_CGMCOUNTERCB 1 +#define CD_CGMSCLMDECB 2 +#define CD_CGMVDCEXTCB 3 +#define CD_CGMBEGPICTCB 4 +#define CD_CGMBEGPICTBCB 5 +#define CD_CGMBEGMTFCB 6 + +/* OLD definitions, defined for backward compatibility */ +#define CDPLAY_ABORT CD_ABORT +#define CDPLAY_GO CD_CONTINUE + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_CGM_ */ + + diff --git a/cd/include/cdclipbd.h b/cd/include/cdclipbd.h new file mode 100755 index 0000000..b1594bc --- /dev/null +++ b/cd/include/cdclipbd.h @@ -0,0 +1,22 @@ +/** \file + * \brief Clipboard driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_CLIPBOARD_H +#define __CD_CLIPBOARD_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextClipboard(void); + +#define CD_CLIPBOARD cdContextClipboard() + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cd/include/cddbuf.h b/cd/include/cddbuf.h new file mode 100755 index 0000000..4eae9a9 --- /dev/null +++ b/cd/include/cddbuf.h @@ -0,0 +1,23 @@ +/** \file + * \brief Double Buffer driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_DBUF_H +#define __CD_DBUF_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextDBuffer(void); + +#define CD_DBUFFER cdContextDBuffer() + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_DBUF_ */ + diff --git a/cd/include/cddebug.h b/cd/include/cddebug.h new file mode 100755 index 0000000..0d3c5c6 --- /dev/null +++ b/cd/include/cddebug.h @@ -0,0 +1,24 @@ +/** \file + * \brief CD Debug driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_DEBUG_H +#define __CD_DEBUG_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextDebug(void); + +#define CD_DEBUG cdContextDebug() + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_DEBUG_H */ + + diff --git a/cd/include/cddgn.h b/cd/include/cddgn.h new file mode 100755 index 0000000..ed90f40 --- /dev/null +++ b/cd/include/cddgn.h @@ -0,0 +1,23 @@ +/** \file + * \brief DGN driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_DGN_H +#define __CD_DGN_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextDGN(void); + +#define CD_DGN cdContextDGN() + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_DGN_ */ + diff --git a/cd/include/cddxf.h b/cd/include/cddxf.h new file mode 100755 index 0000000..402504e --- /dev/null +++ b/cd/include/cddxf.h @@ -0,0 +1,22 @@ +/** \file + * \brief DXF driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_DXF_H +#define __CD_DXF_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextDXF(void); + +#define CD_DXF cdContextDXF() + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_DXF_ */ diff --git a/cd/include/cdemf.h b/cd/include/cdemf.h new file mode 100755 index 0000000..20e15fe --- /dev/null +++ b/cd/include/cdemf.h @@ -0,0 +1,22 @@ +/** \file + * \brief EMF driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_EMF_H +#define __CD_EMF_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextEMF(void); + +#define CD_EMF cdContextEMF() + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cd/include/cdgdiplus.h b/cd/include/cdgdiplus.h new file mode 100755 index 0000000..75e24f3 --- /dev/null +++ b/cd/include/cdgdiplus.h @@ -0,0 +1,29 @@ +/** \file + * \brief GDI+ Control + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_GDIPLUS_H +#define __CD_GDIPLUS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef WIN32 +void cdInitGdiPlus(void); /* old function, replaced by cdInitContextPlus */ +#else +#define cdInitGdiPlus() (0) +#endif + +/* Windows GDI+ Adicional Polygons */ +#define CD_SPLINE (CD_POLYCUSTOM+0) +#define CD_FILLSPLINE (CD_POLYCUSTOM+1) +#define CD_FILLGRADIENT (CD_POLYCUSTOM+2) + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef _CD_GDIPLUS_ */ diff --git a/cd/include/cdimage.h b/cd/include/cdimage.h new file mode 100755 index 0000000..3573ef2 --- /dev/null +++ b/cd/include/cdimage.h @@ -0,0 +1,23 @@ +/** \file + * \brief Server Image driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_IMAGE_H +#define __CD_IMAGE_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextImage(void); + +#define CD_IMAGE cdContextImage() + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_IMAGE_ */ + diff --git a/cd/include/cdirgb.h b/cd/include/cdirgb.h new file mode 100755 index 0000000..2e12997 --- /dev/null +++ b/cd/include/cdirgb.h @@ -0,0 +1,30 @@ +/** \file + * \brief IMAGERGB driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_IRGB_H +#define __CD_IRGB_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextImageRGB(void); +cdContext* cdContextDBufferRGB(void); + +#define CD_IMAGERGB cdContextImageRGB() +#define CD_DBUFFERRGB cdContextDBufferRGB() + +unsigned char* cdRedImage(cdCanvas* cnv); +unsigned char* cdGreenImage(cdCanvas* cnv); +unsigned char* cdBlueImage(cdCanvas* cnv); +unsigned char* cdAlphaImage(cdCanvas* cnv); + + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_IRGB_ */ diff --git a/cd/include/cdiup.h b/cd/include/cdiup.h new file mode 100755 index 0000000..f6f7eb1 --- /dev/null +++ b/cd/include/cdiup.h @@ -0,0 +1,22 @@ +/** \file + * \brief IUP driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_IUP_H +#define __CD_IUP_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextIup(void); + +#define CD_IUP cdContextIup() + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cd/include/cdlua.h b/cd/include/cdlua.h new file mode 100755 index 0000000..30d8174 --- /dev/null +++ b/cd/include/cdlua.h @@ -0,0 +1,39 @@ +/** \file + * \brief Lua Binding Control + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_LUA_H +#define __CD_LUA_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LUA_NOOBJECT /* Lua 3 */ +void cdlua_open(void); +void cdlua_close(void); + +/* utilities */ +cdCanvas* cdlua_getcanvas(void); /* pos=1, deprecated use cdlua_checkcanvas */ +cdCanvas* cdlua_checkcanvas(int pos); +void cdlua_pushcanvas(cdCanvas* canvas); +#endif + +#ifdef LUA_TNONE /* Lua 5 */ +int cdlua_open(lua_State *L); +int cdlua_close(lua_State *L); + +/* utilities */ +cdCanvas* cdlua_getcanvas(lua_State * L); /* pos=1, deprecated use cdlua_checkcanvas */ +cdCanvas* cdlua_checkcanvas(lua_State * L, int pos); +void cdlua_pushcanvas(lua_State * L, cdCanvas* canvas); +#endif + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/cd/include/cdlua3_private.h b/cd/include/cdlua3_private.h new file mode 100755 index 0000000..3c84c72 --- /dev/null +++ b/cd/include/cdlua3_private.h @@ -0,0 +1,120 @@ +/** \file + * \brief Private Lua 3 Binding Functions + * + * See Copyright Notice in cd.h + */ + +#ifndef __CDLUA3_PRIVATE_H +#define __CDLUA3_PRIVATE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define COLOR_TAG "CDLUA_COLOR_TAG" +#define CANVAS_TAG "CDLUA_CANVAS_TAG" +#define STATE_TAG "CDLUA_STATE_TAG" +#define BITMAP_TAG "CDLUA_BITMAP_TAG" +#define IMAGE_TAG "CDLUA_IMAGE_TAG" +#define IMAGERGB_TAG "CDLUA_IMAGERGB_TAG" +#define IMAGERGBA_TAG "CDLUA_IMAGERGBA_TAG" +#define STIPPLE_TAG "CDLUA_STIPPLE_TAG" +#define PATTERN_TAG "CDLUA_PATTERN_TAG" +#define PALETTE_TAG "CDLUA_PALETTE_TAG" +#define IMAGEMAP_TAG "CDLUA_IMAGEMAP_TAG" +#define CHANNEL_TAG "CDLUA_CHANNEL_TAG" + +/* context management */ + +typedef struct _cdCallbackLUA { + int lock; + char *name; + cdCallback func; +} cdCallbackLUA; + +typedef struct _cdContextLUA { + int id; + char *name; + cdContext* (*ctx)(void); + void* (*checkdata)(int param); + cdCallbackLUA* cb_list; + int cb_n; +} cdContextLUA; + +void cdlua_addcontext(cdContextLUA* luactx); +void cdlua_register(char* name, lua_CFunction func); +void cdlua_pushnumber(double num, char* name); + +/* tag management */ + +typedef struct _canvas_t { + cdCanvas *cd_canvas; +} canvas_t; + +typedef struct _state_t { + cdState *state; +} state_t; + +typedef struct _stipple_t { + unsigned char *value; + int width; + int height; + long int size; +} stipple_t; + +typedef struct _pattern_t { + long int *color; + int width; + int height; + long int size; +} pattern_t; + +typedef struct _palette_t { + long int *color; + long int size; +} palette_t; + +typedef struct _image_t { + void *cd_image; +} image_t; + +typedef struct _imagergb_t { + unsigned char *red; + unsigned char *green; + unsigned char *blue; + int width; + int height; + long int size; +} imagergb_t; + +typedef struct _imagergba_t { + unsigned char *red; + unsigned char *green; + unsigned char *blue; + unsigned char *alpha; + int width; + int height; + long int size; +} imagergba_t; + +typedef struct _imagemap_t { + unsigned char *index; + int width; + int height; + long int size; +} imagemap_t; + +typedef struct _channel_t { + unsigned char *value; + long int size; +} channel_t; + +typedef struct _bitmap_t { + cdBitmap *image; +} bitmap_t; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cd/include/cdlua5_private.h b/cd/include/cdlua5_private.h new file mode 100755 index 0000000..974fb4e --- /dev/null +++ b/cd/include/cdlua5_private.h @@ -0,0 +1,141 @@ +/** \file +* \brief Private Lua 5 Binding Functions +* +* See Copyright Notice in cd.h +*/ + +#ifndef __CDLUA5_PRIVATE_H +#define __CDLUA5_PRIVATE_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* context management */ + +typedef struct _cdluaCallback { + int lock; + const char* name; + cdCallback func; +} cdluaCallback; + +typedef struct _cdluaContext { + int id; + const char* name; + cdContext* (*ctx)(void); + void* (*checkdata)(lua_State* L,int param); + cdluaCallback* cb_list; + int cb_n; +} cdluaContext; + +typedef struct _cdluaLuaState { + cdCanvas* void_canvas; /* the VOID canvas to avoid a NULL active canvas */ + cdluaContext* drivers[50]; /* store the registered drivers, map integer values to cdContext */ + int numdrivers; +} cdluaLuaState; + +/* metatables */ + +typedef struct _cdluaStipple { + unsigned char* stipple; + int width; + int height; + long int size; +} cdluaStipple; + +typedef struct _cdluaPattern { + long* pattern; + int width; + int height; + long int size; +} cdluaPattern; + +/* this is the same declaration used in the IM toolkit for imPalette in Lua */ +typedef struct _cdluaPalette { + long* color; + int count; +} cdluaPalette; + +typedef struct _cdluaImageRGB { + unsigned char* red; + unsigned char* green; + unsigned char* blue; + int width; + int height; + long int size; + int free; +} cdluaImageRGB; + +typedef struct _cdluaImageRGBA { + unsigned char* red; + unsigned char* green; + unsigned char* blue; + unsigned char* alpha; + int width; + int height; + long int size; + int free; +} cdluaImageRGBA; + +typedef struct _cdluaImageMap { + unsigned char* index; + int width; + int height; + long int size; +} cdluaImageMap; + +typedef struct _cdluaImageChannel { + unsigned char* channel; + long int size; +} cdluaImageChannel; + + +cdluaLuaState* cdlua_getstate(lua_State* L); +cdluaContext* cdlua_getcontext(lua_State* L, int param); + +lua_State* cdlua_getplaystate(void); +void cdlua_setplaystate(lua_State* L); + +void cdlua_kill_active(lua_State* L, cdCanvas* canvas); +void cdlua_open_active(lua_State* L, cdluaLuaState* cdL); + +void cdlua_open_canvas(lua_State* L); + +void cdlua_addcontext(lua_State* L, cdluaLuaState* cdL, cdluaContext* luactx); +void cdlua_initdrivers(lua_State* L, cdluaLuaState* cdL); + +cdluaPalette* cdlua_checkpalette(lua_State* L, int param); +cdluaStipple* cdlua_checkstipple(lua_State* L, int param); +cdluaPattern* cdlua_checkpattern(lua_State* L, int param); +cdluaImageRGB* cdlua_checkimagergb(lua_State* L, int param); +cdluaImageRGBA* cdlua_checkimagergba(lua_State* L, int param); +cdluaImageMap* cdlua_checkimagemap(lua_State* L, int param); +cdluaImageChannel* cdlua_checkchannel(lua_State* L, int param); + +long cdlua_checkcolor(lua_State* L, int param); +cdImage* cdlua_checkimage(lua_State* L, int param); +cdState* cdlua_checkstate(lua_State* L, int param); +cdBitmap* cdlua_checkbitmap(lua_State* L, int param); + +void cdlua_pushpalette(lua_State* L, long* palette, int size); +void cdlua_pushstipple(lua_State* L, unsigned char* stipple, int width, int height); +void cdlua_pushpattern(lua_State* L, long int* pattern, int width, int height); +void cdlua_pushimagergb(lua_State* L, unsigned char* red, unsigned char* green, unsigned char* blue, int width, int height); +void cdlua_pushimagergba(lua_State* L, unsigned char* red, unsigned char* green, unsigned char* blue, unsigned char* alpha, int width, int height); +void cdlua_pushimagemap(lua_State* L, unsigned char* index, int width, int height); +void cdlua_pushchannel(lua_State* L, unsigned char* channel, int size); + +void cdlua_pushimage(lua_State* L, cdImage* image); +void cdlua_pushstate(lua_State* L, cdState* state); +void cdlua_pushbitmap(lua_State* L, cdBitmap* bitmap); + +void cdlua_pushimagergb_ex(lua_State* L, unsigned char* red, unsigned char* green, unsigned char* blue, int width, int height); +void cdlua_pushimagergba_ex(lua_State* L, unsigned char* red, unsigned char* green, unsigned char* blue, unsigned char* alpha, int width, int height); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cd/include/cdluaim.h b/cd/include/cdluaim.h new file mode 100755 index 0000000..3cd765c --- /dev/null +++ b/cd/include/cdluaim.h @@ -0,0 +1,24 @@ +/** \file + * \brief CD+IM Lua Binding + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_LUAIM_H +#define __CD_LUAIM_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LUA_TNONE /* Lua 5 */ +int cdluaim_open(lua_State *L); +int luaopen_cdluaim(lua_State *L); +#endif + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/cd/include/cdluaiup.h b/cd/include/cdluaiup.h new file mode 100755 index 0000000..570d7f1 --- /dev/null +++ b/cd/include/cdluaiup.h @@ -0,0 +1,27 @@ +/** \file + * \brief IUP Canvas Lua Binding + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_LUAIUP_H +#define __CD_LUAIUP_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LUA_NOOBJECT /* Lua 3 */ +void cdluaiup_open(void); +#endif + +#ifdef LUA_TNONE /* Lua 5 */ +int cdluaiup_open(lua_State *L); +#endif + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/cd/include/cdluapdf.h b/cd/include/cdluapdf.h new file mode 100755 index 0000000..45b4d98 --- /dev/null +++ b/cd/include/cdluapdf.h @@ -0,0 +1,27 @@ +/** \file + * \brief PDF Canvas Lua Binding + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_LUAPDF_H +#define __CD_LUAPDF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LUA_NOOBJECT /* Lua 3 */ +void cdluapdf_open(void); +#endif + +#ifdef LUA_TNONE /* Lua 5 */ +int cdluapdf_open(lua_State *L); +#endif + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/cd/include/cdmf.h b/cd/include/cdmf.h new file mode 100755 index 0000000..7cc2a93 --- /dev/null +++ b/cd/include/cdmf.h @@ -0,0 +1,24 @@ +/** \file + * \brief CD Metafile driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_MF_H +#define __CD_MF_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextMetafile(void); + +#define CD_METAFILE cdContextMetafile() + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_MF_ */ + + diff --git a/cd/include/cdmf_private.h b/cd/include/cdmf_private.h new file mode 100755 index 0000000..7da5b90 --- /dev/null +++ b/cd/include/cdmf_private.h @@ -0,0 +1,32 @@ +/** \file + * \brief CD Metafile driver private declarations + * + * See Copyright Notice in cd.h + */ + +#ifndef __CDMF_PRIVATE_H +#define __CDMF_PRIVATE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* public part of the internal cdCtxCanvas */ +typedef struct cdCanvasMF +{ + cdCanvas* canvas; + char* filename; + void* data; +} cdCanvasMF; + +void cdcreatecanvasMF(cdCanvas *canvas, void *data); +void cdinittableMF(cdCanvas* canvas); +void cdkillcanvasMF(cdCanvasMF *mfcanvas); + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/cd/include/cdnative.h b/cd/include/cdnative.h new file mode 100755 index 0000000..66c9c75 --- /dev/null +++ b/cd/include/cdnative.h @@ -0,0 +1,26 @@ +/** \file + * \brief NativeWindow driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_NATIVE_H +#define __CD_NATIVE_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextNativeWindow(void); + +#define CD_NATIVEWINDOW cdContextNativeWindow() + +void cdGetScreenSize(int *width, int *height, double *width_mm, double *height_mm); +int cdGetScreenColorPlanes(void); + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_NATIVE_ */ + diff --git a/cd/include/cdpdf.h b/cd/include/cdpdf.h new file mode 100755 index 0000000..70d6df5 --- /dev/null +++ b/cd/include/cdpdf.h @@ -0,0 +1,38 @@ +/** \file + * \brief PDF driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_PDF_H +#define __CD_PDF_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextPDF(void); + +#define CD_PDF cdContextPDF() + +#ifndef CD_PAPERSIZE +#define CD_PAPERSIZE +enum { /* paper sizes */ + CD_A0, + CD_A1, + CD_A2, + CD_A3, + CD_A4, + CD_A5, + CD_LETTER, + CD_LEGAL +}; +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef _CD_PDF_ */ + diff --git a/cd/include/cdpicture.h b/cd/include/cdpicture.h new file mode 100755 index 0000000..860ff97 --- /dev/null +++ b/cd/include/cdpicture.h @@ -0,0 +1,22 @@ +/** \file + * \brief CD Picture driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_PICTURE_H +#define __CD_PICTURE_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextPicture(void); + +#define CD_PICTURE cdContextPicture() + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cd/include/cdprint.h b/cd/include/cdprint.h new file mode 100755 index 0000000..fff824b --- /dev/null +++ b/cd/include/cdprint.h @@ -0,0 +1,23 @@ +/** \file + * \brief Printer driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_PRINTER_H +#define __CD_PRINTER_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextPrinter(void); + +#define CD_PRINTER cdContextPrinter() + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_PRINTER_ */ + diff --git a/cd/include/cdps.h b/cd/include/cdps.h new file mode 100755 index 0000000..180ebad --- /dev/null +++ b/cd/include/cdps.h @@ -0,0 +1,37 @@ +/** \file + * \brief PS driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_PS_H +#define __CD_PS_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextPS(void); + +#define CD_PS cdContextPS() + +#ifndef CD_PAPERSIZE +#define CD_PAPERSIZE +enum { /* paper sizes */ + CD_A0, + CD_A1, + CD_A2, + CD_A3, + CD_A4, + CD_A5, + CD_LETTER, + CD_LEGAL +}; +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef __CD_PS_ */ + diff --git a/cd/include/cdwmf.h b/cd/include/cdwmf.h new file mode 100755 index 0000000..607af6c --- /dev/null +++ b/cd/include/cdwmf.h @@ -0,0 +1,22 @@ +/** \file + * \brief WMF driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CD_WMF_H +#define __CD_WMF_H + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextWMF(void); + +#define CD_WMF cdContextWMF() + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cd/include/wd.h b/cd/include/wd.h new file mode 100755 index 0000000..80ee7b0 --- /dev/null +++ b/cd/include/wd.h @@ -0,0 +1,79 @@ +/** \file + * \brief World Coordinate Functions + * + * See Copyright Notice in cd.h + */ + +#ifndef __WD_H +#define __WD_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* coordinate transformation */ +void wdCanvasWindow(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax); +void wdCanvasGetWindow(cdCanvas* canvas, double *xmin, double *xmax, double *ymin, double *ymax); +void wdCanvasViewport(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax); +void wdCanvasGetViewport(cdCanvas* canvas, int *xmin, int *xmax, int *ymin, int *ymax); +void wdCanvasWorld2Canvas(cdCanvas* canvas, double xw, double yw, int *xv, int *yv); +void wdCanvasWorld2CanvasSize(cdCanvas* canvas, double hw, double vw, int *hv, int *vv); +void wdCanvasCanvas2World(cdCanvas* canvas, int xv, int yv, double *xw, double *yw); + +void wdCanvasClipArea(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax); +int wdCanvasGetClipArea(cdCanvas* canvas, double *xmin, double *xmax, double *ymin, double *ymax); +int wdCanvasIsPointInRegion(cdCanvas* canvas, double x, double y); +void wdCanvasOffsetRegion(cdCanvas* canvas, double x, double y); +void wdCanvasGetRegionBox(cdCanvas* canvas, double *xmin, double *xmax, double *ymin, double *ymax); + +void wdCanvasHardcopy(cdCanvas* canvas, cdContext* ctx, void *data, void(*draw_func)(cdCanvas *canvas_copy)); + +/* primitives */ +void wdCanvasPixel(cdCanvas* canvas, double x, double y, long color); +void wdCanvasMark(cdCanvas* canvas, double x, double y); +void wdCanvasLine(cdCanvas* canvas, double x1, double y1, double x2, double y2); +void wdCanvasVertex(cdCanvas* canvas, double x, double y); +void wdCanvasRect(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax); +void wdCanvasBox(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax); +void wdCanvasArc(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2); +void wdCanvasSector(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2); +void wdCanvasChord(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2); +void wdCanvasText(cdCanvas* canvas, double x, double y, const char* s); + +void wdCanvasPutImageRect(cdCanvas* canvas, cdImage* image, double x, double y, int xmin, int xmax, int ymin, int ymax); +void wdCanvasPutImageRectRGB(cdCanvas* canvas, int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax); +void wdCanvasPutImageRectRGBA(cdCanvas* canvas, int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, const unsigned char* a, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax); +void wdCanvasPutImageRectMap(cdCanvas* canvas, int iw, int ih, const unsigned char* index, const long* colors, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax); +void wdCanvasPutBitmap(cdCanvas* canvas, cdBitmap* bitmap, double x, double y, double w, double h); + +/* attributes */ +double wdCanvasLineWidth(cdCanvas* canvas, double width); +int wdCanvasFont(cdCanvas* canvas, const char* type_face, int style, double size); +void wdCanvasGetFont(cdCanvas* canvas, char *type_face, int *style, double *size); +double wdCanvasMarkSize(cdCanvas* canvas, double size); +void wdCanvasGetFontDim(cdCanvas* canvas, double *max_width, double *height, double *ascent, double *descent); +void wdCanvasGetTextSize(cdCanvas* canvas, const char* s, double *width, double *height); +void wdCanvasGetTextBox(cdCanvas* canvas, double x, double y, const char* s, double *xmin, double *xmax, double *ymin, double *ymax); +void wdCanvasGetTextBounds(cdCanvas* canvas, double x, double y, const char* s, double *rect); +void wdCanvasStipple(cdCanvas* canvas, int w, int h, const unsigned char*fgbg, double w_mm, double h_mm); +void wdCanvasPattern(cdCanvas* canvas, int w, int h, const long *color, double w_mm, double h_mm); + +/* vector text */ +void wdCanvasVectorTextDirection(cdCanvas* canvas, double x1, double y1, double x2, double y2); +void wdCanvasVectorTextSize(cdCanvas* canvas, double size_x, double size_y, const char* s); +void wdCanvasGetVectorTextSize(cdCanvas* canvas, const char* s, double *x, double *y); +double wdCanvasVectorCharSize(cdCanvas* canvas, double size); +void wdCanvasVectorText(cdCanvas* canvas, double x, double y, const char* s); +void wdCanvasMultiLineVectorText(cdCanvas* canvas, double x, double y, const char* s); +void wdCanvasGetVectorTextBounds(cdCanvas* canvas, const char* s, double x, double y, double *rect); +void wdCanvasGetVectorTextBox(cdCanvas* canvas, double x, double y, const char *s, double *xmin, double *xmax, double *ymin, double *ymax); + +#ifdef __cplusplus +} +#endif + +#ifndef CD_NO_OLD_INTERFACE +#include "wd_old.h" +#endif + +#endif diff --git a/cd/include/wd_old.h b/cd/include/wd_old.h new file mode 100755 index 0000000..683c589 --- /dev/null +++ b/cd/include/wd_old.h @@ -0,0 +1,85 @@ +/** \file + * \brief Old WC API + * + * See Copyright Notice in cd.h + */ + +#ifndef WD_OLD_H +#define WD_OLD_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* coordinate transformation */ +void wdWindow(double xmin, double xmax, double ymin, double ymax); +void wdGetWindow(double *xmin, double *xmax, double *ymin, double *ymax); +void wdViewport(int xmin, int xmax, int ymin, int ymax); +void wdGetViewport(int *xmin, int *xmax, int *ymin, int *ymax); +void wdWorld2Canvas(double xw, double yw, int *xv, int *yv); +void wdWorld2CanvasSize(double hw, double vw, int *hv, int *vv); +void wdCanvas2World(int xv, int yv, double *xw, double *yw); + +void wdClipArea(double xmin, double xmax, double ymin, double ymax); +int wdGetClipArea(double *xmin, double *xmax, double *ymin, double *ymax); +double* wdGetClipPoly(int *n); +int wdPointInRegion(double x, double y); +void wdOffsetRegion(double x, double y); +void wdRegionBox(double *xmin, double *xmax, double *ymin, double *ymax); + +void wdHardcopy(cdContext* ctx, void *data, cdCanvas *cnv, void(*draw_func)(void)); + +/* primitives */ +void wdPixel(double x, double y, long color); +void wdMark(double x, double y); +void wdLine(double x1, double y1, double x2, double y2); +void wdVertex(double x, double y); +void wdRect(double xmin, double xmax, double ymin, double ymax); +void wdBox(double xmin, double xmax, double ymin, double ymax); +void wdArc(double xc, double yc, double w, double h, double angle1, double angle2); +void wdSector(double xc, double yc, double w, double h, double angle1, double angle2); +void wdChord(double xc, double yc, double w, double h, double angle1, double angle2); +void wdText(double x, double y, const char* s); + +void wdPutImageRect(cdImage* image, double x, double y, int xmin, int xmax, int ymin, int ymax); +void wdPutImageRectRGB(int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax); +void wdPutImageRectRGBA(int iw, int ih, const unsigned char* r, const unsigned char* g, const unsigned char* b, const unsigned char* a, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax); +void wdPutImageRectMap(int iw, int ih, const unsigned char* index, const long* colors, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax); +void wdPutBitmap(cdBitmap* bitmap, double x, double y, double w, double h); + +/* attributes */ +double wdLineWidth(double width); +void wdFont(int type_face, int style, double size); +void wdGetFont(int *type_face, int *style, double *size); +double wdMarkSize(double size); +void wdFontDim(double *max_width, double *height, double *ascent, double *descent); +void wdTextSize(const char* s, double *width, double *height); +void wdTextBox(double x, double y, const char* s, double *xmin, double *xmax, double *ymin, double *ymax); +void wdTextBounds(double x, double y, const char* s, double *rect); +void wdStipple(int w, int h, const unsigned char* stipple, double w_mm, double h_mm); +void wdPattern(int w, int h, const long* pattern, double w_mm, double h_mm); + +/* vector text */ +void wdVectorTextDirection(double x1, double y1, double x2, double y2); +void wdVectorTextSize(double size_x, double size_y, const char* s); +void wdGetVectorTextSize(const char* s, double *x, double *y); +double wdVectorCharSize(double size); +void wdVectorText(double x, double y, const char* s); +void wdMultiLineVectorText(double x, double y, const char* s); +void wdGetVectorTextBounds(const char* s, double x, double y, double *rect); + +/* OLD definitions, defined for backward compatibility */ +#define wdVectorFont cdVectorFont +#define wdVectorTextTransform cdVectorTextTransform +#define wdActivate cdActivate +#define wdClip(mode) cdClip(mode) +#define wdBegin(mode) cdBegin(mode) +#define wdEnd() cdEnd(); +#define wdMM2Pixel(mm_dx, mm_dy, dx, dy) cdMM2Pixel(mm_dx, mm_dy, dx, dy) +#define wdPixel2MM(dx, dy, mm_dx, mm_dy) cdPixel2MM(dx, dy, mm_dx, mm_dy) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cd/mak.vc6/cd.dsp b/cd/mak.vc6/cd.dsp new file mode 100755 index 0000000..6cccf23 --- /dev/null +++ b/cd/mak.vc6/cd.dsp @@ -0,0 +1,549 @@ +# Microsoft Developer Studio Project File - Name="cd" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cd - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cd.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cd.mak" CFG="cd - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cd - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cd - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\include" /I "..\src" /I "..\src\drv" /I "..\src\freetype2" /I "..\src\intcgm" /I "..\src\iup" /I "..\src\sim" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "FT2_BUILD_LIBRARY" /D "_CRT_SECURE_NO_DEPRECATE" /Fp".\..\obj/cd.pch" /Fo"$(IntDir)/" /Fd"..\obj\" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\include" /I "..\src" /I "..\src\drv" /I "..\src\freetype2" /I "..\src\intcgm" /I "..\src\iup" /I "..\src\sim" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "FT2_BUILD_LIBRARY" /D "_CRT_SECURE_NO_DEPRECATE" /Fp".\..\obj/cd.pch" /Fo"$(IntDir)/" /Fd"..\obj\" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1046 +# ADD RSC /l 1046 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cd.lib" +# ADD LIB32 /nologo /out:"..\lib\cd.lib" + +!ENDIF + +# Begin Target + +# Name "cd - Win32 Debug" +# Begin Group "INTCGM" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\intcgm\bparse.c +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\circle.c +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\ellipse.c +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\intcgm1.c +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\intcgm2.c +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\intcgm4.c +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\intcgm6.c +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\list.c +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\sism.c +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\tparse.c +# End Source File +# Begin Group "INC" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\intcgm\bparse.h +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\circle.h +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\ellipse.h +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\intcgm.h +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\intcgm2.h +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\intcgm4.h +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\intcgm6.h +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\list.h +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\sism.h +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\tparse.h +# End Source File +# Begin Source File + +SOURCE=..\src\intcgm\types.h +# End Source File +# End Group +# End Group +# Begin Group "WIN32" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\win32\cdwclp.c +# End Source File +# Begin Source File + +SOURCE=..\src\win32\cdwdbuf.c +# End Source File +# Begin Source File + +SOURCE=..\src\win32\cdwdib.c +# End Source File +# Begin Source File + +SOURCE=..\src\win32\cdwemf.c +# End Source File +# Begin Source File + +SOURCE=..\src\win32\cdwimg.c +# End Source File +# Begin Source File + +SOURCE=..\src\win32\cdwin.c +# End Source File +# Begin Source File + +SOURCE=..\src\win32\cdwin.h +# End Source File +# Begin Source File + +SOURCE=..\src\win32\cdwnative.c +# End Source File +# Begin Source File + +SOURCE=..\src\win32\cdwprn.c +# End Source File +# Begin Source File + +SOURCE=..\src\win32\cdwwmf.c +# End Source File +# Begin Source File + +SOURCE=..\src\win32\wmf_emf.c +# End Source File +# End Group +# Begin Group "SIM" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\sim\cd_truetype.c +# End Source File +# Begin Source File + +SOURCE=..\src\sim\cdfontex.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\sim\sim.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\sim\sim.h +# End Source File +# Begin Source File + +SOURCE=..\src\sim\sim_linepolyfill.c +# End Source File +# Begin Source File + +SOURCE=..\src\sim\sim_other.c +# End Source File +# Begin Source File + +SOURCE=..\src\sim\sim_primitives.c +# End Source File +# Begin Source File + +SOURCE=..\src\sim\sim_text.c +# End Source File +# Begin Source File + +SOURCE=..\src\sim\truetype.h +# End Source File +# End Group +# Begin Group "DRV" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\drv\cdcgm.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\drv\cddebug.c +# End Source File +# Begin Source File + +SOURCE=..\src\drv\cddgn.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\drv\cddxf.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\drv\cdirgb.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\drv\cdmf.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\drv\cdpicture.c +# End Source File +# Begin Source File + +SOURCE=..\src\drv\cdps.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\drv\cgm.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\drv\cgm.h +# End Source File +# End Group +# Begin Group "include" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\cd.h +# End Source File +# Begin Source File + +SOURCE=..\include\cd_old.h +# End Source File +# Begin Source File + +SOURCE=..\include\cd_private.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdcgm.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdclipbd.h +# End Source File +# Begin Source File + +SOURCE=..\include\cddbuf.h +# End Source File +# Begin Source File + +SOURCE=..\include\cddebug.h +# End Source File +# Begin Source File + +SOURCE=..\include\cddgn.h +# End Source File +# Begin Source File + +SOURCE=..\include\cddxf.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdemf.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdimage.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdirgb.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdmf.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdmf_private.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdnative.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdprint.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdps.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdwmf.h +# End Source File +# Begin Source File + +SOURCE=..\include\wd.h +# End Source File +# Begin Source File + +SOURCE=..\include\wd_old.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\src\cd.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\cd.def +# End Source File +# Begin Source File + +SOURCE=..\src\cd_active.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\cd_attributes.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\cd_bitmap.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\cd_image.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\cd_primitives.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\cd_text.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\cd_util.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\cd_vectortext.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\rgb2map.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\wd.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\wdhdcpy.c + +!IF "$(CFG)" == "cd - Win32 Debug" + +# ADD CPP /nologo /W4 /GZ /GX +!ENDIF + +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cd.dsw b/cd/mak.vc6/cd.dsw new file mode 100755 index 0000000..b490d11 --- /dev/null +++ b/cd/mak.vc6/cd.dsw @@ -0,0 +1,173 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "cd"=cd.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cdlua3"=cdlua3.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cdcontextplus"=cdgdiplus.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cdlua5"=cdlua5.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cdpdf"=cdpdf.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cdx11"=cdx11.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cdluapdf3"=cdluapdf3.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cdluapdf5"=cdluapdf5.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cdxrender"=cdxrender.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cdluaim5"=cdluaim5.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "pdflib"=cd_pdflib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "freetype6"=cd_freetype.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cdluacontextplus5"=cdluacontextplus5.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/cd/mak.vc6/cd_freetype.dsp b/cd/mak.vc6/cd_freetype.dsp new file mode 100755 index 0000000..7f1c021 --- /dev/null +++ b/cd/mak.vc6/cd_freetype.dsp @@ -0,0 +1,243 @@ +# Microsoft Developer Studio Project File - Name="freetype6" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=freetype6 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "freetype6.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "freetype6.mak" CFG="freetype6 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "freetype6 - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "freetype6 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\src\freetype2" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "FT2_BUILD_LIBRARY" /D "_CRT_SECURE_NO_DEPRECATE" /Fp".\..\obj/freetype.pch" /Fo"$(IntDir)/" /Fd"..\obj\" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\src\freetype2" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "FT2_BUILD_LIBRARY" /D "_CRT_SECURE_NO_DEPRECATE" /Fp".\..\obj/freetype.pch" /Fo"$(IntDir)/" /Fd"..\obj\" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1046 +# ADD RSC /l 1046 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\freetype6.lib" +# ADD LIB32 /nologo /out:"..\lib\freetype6.lib" + +!ENDIF + +# Begin Target + +# Name "freetype6 - Win32 Debug" +# Begin Group "FreeType2" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\freetype2\autofit\autofit.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\bdf\bdf.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\cff\cff.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftbase.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\cache\ftcache.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\gzip\ftgzip.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\lzw\ftlzw.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\gxvalid\gxvalid.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\otvalid\otvalid.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\pcf\pcf.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\pfr\pfr.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\psaux\psaux.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\pshinter\pshinter.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\psnames\psnames.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\raster\raster.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\sfnt\sfnt.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\smooth\smooth.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\truetype\truetype.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\type1\type1.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\cid\type1cid.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\type42\type42.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\winfonts\winfnt.c +# End Source File +# Begin Group "base" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\freetype2\base\ftapi.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftbbox.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftbdf.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftbitmap.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftdebug.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftgasp.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftglyph.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftgxval.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftinit.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftlcdfil.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftmm.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftotval.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftpatent.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftpfr.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftstroke.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftsynth.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftsystem.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\fttype1.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftwinfnt.c +# End Source File +# Begin Source File + +SOURCE=..\src\freetype2\base\ftxf86.c +# End Source File +# End Group +# End Group +# Begin Source File + +SOURCE=..\src\cd_freetype.def +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cd_pdflib.dsp b/cd/mak.vc6/cd_pdflib.dsp new file mode 100755 index 0000000..1e21f6f --- /dev/null +++ b/cd/mak.vc6/cd_pdflib.dsp @@ -0,0 +1,697 @@ +# Microsoft Developer Studio Project File - Name="pdflib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=pdflib - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "pdflib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "pdflib.mak" CFG="pdflib - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "pdflib - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "pdflib - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj\pdflib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj\pdflib" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\src\pdflib\font" /I "..\src\pdflib\flate" /I "..\src\pdflib\pdcore" /I "..\src\pdflib\pdflib" /Z7 /W3 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "NO_vsnprintf" /Fp"..\obj\pdflib/pdflib.pch" /Fo"$(IntDir)/" /Fd"..\obj\pdflib/" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\src\pdflib\font" /I "..\src\pdflib\flate" /I "..\src\pdflib\pdcore" /I "..\src\pdflib\pdflib" /Z7 /W3 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "NO_vsnprintf" /Fp"..\obj\pdflib/pdflib.pch" /Fo"$(IntDir)/" /Fd"..\obj\pdflib/" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1046 +# ADD RSC /l 1046 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\pdflib.lib" +# ADD LIB32 /nologo /out:"..\lib\pdflib.lib" + +!ENDIF + +# Begin Target + +# Name "pdflib - Win32 Debug" +# Begin Group "pdflib" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\pdflib.c +# End Source File +# Begin Group "flate" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\pdflib\flate\adler32.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\compress.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\crc32.c + +!IF "$(CFG)" == "pdflib - Win32 Debug" + +# ADD CPP /nologo /Z7 /GZ /GX +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\deflate.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\inffast.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\inflate.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\inftrees.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\trees.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\uncompr.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\zutil.c +# End Source File +# Begin Group "inc" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\pdflib\flate\crc32.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\deflate.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\inffast.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\inffixed.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\inflate.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\inftrees.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\trees.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\zlib.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\zprefix.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\flate\zutil.h +# End Source File +# End Group +# End Group +# Begin Group "font" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_cid.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_corefont.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_font.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_hostfont.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_pdffont.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_truetype.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_type1.c +# End Source File +# Begin Group "inc" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_cid.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_corefont.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_font.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_generr.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_pdffont.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\font\ft_truetype.h +# End Source File +# End Group +# End Group +# Begin Group "pdcore" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_aes.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_aescbc.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_arc4.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_chartabs.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_contain.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_core.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_crypt.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_ctype.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_digsig.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_ebcdic.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_encoding.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_file.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_geom.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_md5.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_optparse.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_output.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_resource.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_scan.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_scope.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_string.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_unicode.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_util.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_xmp.c +# End Source File +# Begin Group "inc" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_aes.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_aeslocal.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_arc4.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_chartabs.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_classic.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_config.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_contain.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_core.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_crypt.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_ctype.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_digsig.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_ebcdic.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_encoding.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_exports.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_file.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_generr.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_geom.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_md5.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_optparse.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_output.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_prefix.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_pstok.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_resource.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_scan.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_scantok.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_scope.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_strconst.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_string.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_unicode.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_util.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdcore\pc_xmp.h +# End Source File +# End Group +# End Group +# Begin Group "pdflib" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_actions.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_afm.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_annots.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_bmp.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_ccitt.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_cid.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_color.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_document.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_draw.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_encoding.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_filter.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_font.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_gif.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_gstate.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_hyper.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_icclib.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_image.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_jpeg.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_jpx.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_kerning.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_mbox.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_object.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_opi.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_page.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_params.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_pattern.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_pfm.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_photoshp.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_png.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_shading.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_subsett.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_tagged.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_template.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_text.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_tiff.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_truetype.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_type1.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_type3.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_util.c +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_xgstate.c +# End Source File +# Begin Group "inc" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_color.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_defopt.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_font.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_generr.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_hkscmyk.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_hkslab.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_icc.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_icc9809.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_icclib.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_image.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_intern.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_keyconn.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_layer.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_page.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_pantlab.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_params.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\p_tagged.h +# End Source File +# Begin Source File + +SOURCE=..\src\pdflib\pdflib\pdflib.h +# End Source File +# End Group +# End Group +# End Group +# Begin Source File + +SOURCE=..\src\cd_pdflib.def +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cdgdiplus.dsp b/cd/mak.vc6/cdgdiplus.dsp new file mode 100755 index 0000000..c4b2e56 --- /dev/null +++ b/cd/mak.vc6/cdgdiplus.dsp @@ -0,0 +1,103 @@ +# Microsoft Developer Studio Project File - Name="cdgdiplus" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cdgdiplus - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cdgdiplus.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cdgdiplus.mak" CFG="cdgdiplus - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cdgdiplus - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cdgdiplus - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj\cdgdiplus" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj\cdgdiplus" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\include" /I "..\src" /I "..\src\gdiplus" /I "..\src\drv" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fp"..\obj\gdiplus/cdgdiplus.pch" /Fo"$(IntDir)/" /Fd"..\obj\cdgdiplus/" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\include" /I "..\src" /I "..\src\gdiplus" /I "..\src\drv" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fp"..\obj\gdiplus/cdgdiplus.pch" /Fo"$(IntDir)/" /Fd"..\obj\cdgdiplus/" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1046 +# ADD RSC /l 1046 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cdgdiplus.lib" +# ADD LIB32 /nologo /out:"..\lib\cdgdiplus.lib" + +!ENDIF + +# Begin Target + +# Name "cdgdiplus - Win32 Debug" +# Begin Source File + +SOURCE=..\include\cdgdiplus.h +# End Source File +# Begin Source File + +SOURCE=..\src\gdiplus\cdwclpp.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\gdiplus\cdwdbufp.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\gdiplus\cdwemfp.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\gdiplus\cdwgdiplus.c +# End Source File +# Begin Source File + +SOURCE=..\src\gdiplus\cdwimgp.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\gdiplus\cdwinp.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\gdiplus\cdwinp.h +# End Source File +# Begin Source File + +SOURCE=..\src\gdiplus\cdwnativep.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\gdiplus\cdwprnp.cpp +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cdlua3.dsp b/cd/mak.vc6/cdlua3.dsp new file mode 100755 index 0000000..3824cd5 --- /dev/null +++ b/cd/mak.vc6/cdlua3.dsp @@ -0,0 +1,99 @@ +# Microsoft Developer Studio Project File - Name="cdlua3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cdlua3 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cdlua3.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cdlua3.mak" CFG="cdlua3 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cdlua3 - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cdlua3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj\cdlua3" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj\cdlua3" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\include" /I "..\..\lua\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /Fo"..\obj\cdlua3/" /Fd"..\obj\cdlua3/" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\include" /I "..\..\lua\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /Fo"..\obj\cdlua3/" /Fd"..\obj\cdlua3/" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1046 +# ADD RSC /l 1046 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cdlua3.lib" +# ADD LIB32 /nologo /out:"..\lib\cdlua3.lib" + +!ENDIF + +# Begin Target + +# Name "cdlua3 - Win32 Debug" +# Begin Source File + +SOURCE=..\src\lua3\cdlua.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua3\cdlua.def +# End Source File +# Begin Source File + +SOURCE=..\include\cdlua.h +# End Source File +# Begin Source File + +SOURCE=..\include\cdlua3_private.h +# End Source File +# Begin Source File + +SOURCE=..\src\lua3\cdluactx.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua3\cdvoid.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua3\cdvoid.h +# End Source File +# Begin Source File + +SOURCE=..\src\lua3\toluacd.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua3\toluawd.c +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cdlua5.dsp b/cd/mak.vc6/cdlua5.dsp new file mode 100755 index 0000000..62d31eb --- /dev/null +++ b/cd/mak.vc6/cdlua5.dsp @@ -0,0 +1,99 @@ +# Microsoft Developer Studio Project File - Name="cdlua5" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cdlua5 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cdlua5.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cdlua5.mak" CFG="cdlua5 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cdlua5 - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cdlua5 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj\cdlua5" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj\cdlua5" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\include" /I "..\..\lua5.1\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fo"..\obj\cdlua5/" /Fd"..\obj\cdlua5/" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\include" /I "..\..\lua5.1\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fo"..\obj\cdlua5/" /Fd"..\obj\cdlua5/" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1046 +# ADD RSC /l 1046 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cdlua51.lib" +# ADD LIB32 /nologo /out:"..\lib\cdlua51.lib" + +!ENDIF + +# Begin Target + +# Name "cdlua5 - Win32 Debug" +# Begin Source File + +SOURCE=..\include\cdlua.h +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdlua5.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdlua5.def +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdlua5_active.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdlua5_canvas.c +# End Source File +# Begin Source File + +SOURCE=..\include\cdlua5_private.h +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdlua5ctx.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdvoid5.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdvoid5.h +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cdluacontextplus5.dsp b/cd/mak.vc6/cdluacontextplus5.dsp new file mode 100755 index 0000000..4f7efe9 --- /dev/null +++ b/cd/mak.vc6/cdluacontextplus5.dsp @@ -0,0 +1,75 @@ +# Microsoft Developer Studio Project File - Name="cdluacontextplus5" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cdluacontextplus5 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cdluacontextplus5.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cdluacontextplus5.mak" CFG="cdluacontextplus5 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cdluacontextplus5 - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cdluacontextplus5 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj\cdluacontextplus5" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj\cdluacontextplus5" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\include" /I "..\..\lua5.1\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fo"..\obj\cdluacontextplus5/" /Fd"..\obj\cdluacontextplus5/" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\include" /I "..\..\lua5.1\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fo"..\obj\cdluacontextplus5/" /Fd"..\obj\cdluacontextplus5/" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1033 +# ADD RSC /l 1033 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cdluacontextplus51.lib" +# ADD LIB32 /nologo /out:"..\lib\cdluacontextplus51.lib" + +!ENDIF + +# Begin Target + +# Name "cdluacontextplus5 - Win32 Debug" +# Begin Source File + +SOURCE=..\include\cdluacontextplus.h +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdluacontextplus5.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdluacontextplus5.def +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cdluaim5.dsp b/cd/mak.vc6/cdluaim5.dsp new file mode 100755 index 0000000..21dafd0 --- /dev/null +++ b/cd/mak.vc6/cdluaim5.dsp @@ -0,0 +1,75 @@ +# Microsoft Developer Studio Project File - Name="cdluaim5" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cdluaim5 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cdluaim5.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cdluaim5.mak" CFG="cdluaim5 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cdluaim5 - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cdluaim5 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj\cdluaim5" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj\cdluaim5" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "../include" /I "../../lua5.1/include" /I "../../im/include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /Fp"..\lib/cdluaim5.pch" /Fo"..\obj\cdluaim5/" /Fd"..\lib/" /GZ /c /GX +# ADD CPP /nologo /MT /I "../include" /I "../../lua5.1/include" /I "../../im/include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /Fp"..\lib/cdluaim5.pch" /Fo"..\obj\cdluaim5/" /Fd"..\lib/" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1046 /d "_DEBUG" +# ADD RSC /l 1046 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cdluaim51.lib" +# ADD LIB32 /nologo /out:"..\lib\cdluaim51.lib" + +!ENDIF + +# Begin Target + +# Name "cdluaim5 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\src\lua5\cdluaim5.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdluaim5.def +# End Source File +# End Group +# End Target +# End Project + diff --git a/cd/mak.vc6/cdluapdf3.dsp b/cd/mak.vc6/cdluapdf3.dsp new file mode 100755 index 0000000..73916e4 --- /dev/null +++ b/cd/mak.vc6/cdluapdf3.dsp @@ -0,0 +1,75 @@ +# Microsoft Developer Studio Project File - Name="cdluapdf3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cdluapdf3 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cdluapdf3.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cdluapdf3.mak" CFG="cdluapdf3 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cdluapdf3 - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cdluapdf3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj\cdluapdf3" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj\cdluapdf3" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\include" /I "..\..\lua\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fo"..\obj\cdluapdf3/" /Fd"..\obj\cdluapdf3/" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\include" /I "..\..\lua\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fo"..\obj\cdluapdf3/" /Fd"..\obj\cdluapdf3/" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1033 +# ADD RSC /l 1033 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cdluapdf3.lib" +# ADD LIB32 /nologo /out:"..\lib\cdluapdf3.lib" + +!ENDIF + +# Begin Target + +# Name "cdluapdf3 - Win32 Debug" +# Begin Source File + +SOURCE=..\src\lua3\cdluapdf.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua3\cdluapdf.def +# End Source File +# Begin Source File + +SOURCE=..\include\cdluapdf.h +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cdluapdf5.dsp b/cd/mak.vc6/cdluapdf5.dsp new file mode 100755 index 0000000..4b47e13 --- /dev/null +++ b/cd/mak.vc6/cdluapdf5.dsp @@ -0,0 +1,75 @@ +# Microsoft Developer Studio Project File - Name="cdluapdf5" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cdluapdf5 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cdluapdf5.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cdluapdf5.mak" CFG="cdluapdf5 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cdluapdf5 - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cdluapdf5 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj\cdluapdf5" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj\cdluapdf5" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\include" /I "..\..\lua5.1\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fo"..\obj\cdluapdf5/" /Fd"..\obj\cdluapdf5/" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\include" /I "..\..\lua5.1\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fo"..\obj\cdluapdf5/" /Fd"..\obj\cdluapdf5/" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1033 +# ADD RSC /l 1033 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cdluapdf51.lib" +# ADD LIB32 /nologo /out:"..\lib\cdluapdf51.lib" + +!ENDIF + +# Begin Target + +# Name "cdluapdf5 - Win32 Debug" +# Begin Source File + +SOURCE=..\include\cdluapdf.h +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdluapdf5.c +# End Source File +# Begin Source File + +SOURCE=..\src\lua5\cdluapdf5.def +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cdpdf.dsp b/cd/mak.vc6/cdpdf.dsp new file mode 100755 index 0000000..987c191 --- /dev/null +++ b/cd/mak.vc6/cdpdf.dsp @@ -0,0 +1,75 @@ +# Microsoft Developer Studio Project File - Name="cdpdf" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cdpdf - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cdpdf.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cdpdf.mak" CFG="cdpdf - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cdpdf - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cdpdf - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj\cdpdf" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj\cdpdf" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\include" /I "..\src" /I "..\src\sim" /I "..\src\pdflib\pdflib" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fp"..\obj\cdpdf/cdpdf.pch" /Fo"$(IntDir)/" /Fd"..\obj\cdpdf/" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\include" /I "..\src" /I "..\src\sim" /I "..\src\pdflib\pdflib" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fp"..\obj\cdpdf/cdpdf.pch" /Fo"$(IntDir)/" /Fd"..\obj\cdpdf/" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1046 +# ADD RSC /l 1046 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cdpdflib.lib" +# ADD LIB32 /nologo /out:"..\lib\cdpdflib.lib" + +!ENDIF + +# Begin Target + +# Name "cdpdf - Win32 Debug" +# Begin Source File + +SOURCE=..\src\drv\cdpdf.c +# End Source File +# Begin Source File + +SOURCE=..\src\cdpdf.def +# End Source File +# Begin Source File + +SOURCE=..\include\cdpdf.h +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cdx11.dsp b/cd/mak.vc6/cdx11.dsp new file mode 100755 index 0000000..0d44f47 --- /dev/null +++ b/cd/mak.vc6/cdx11.dsp @@ -0,0 +1,107 @@ +# Microsoft Developer Studio Project File - Name="cdx11" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cdx11 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cdx11.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cdx11.mak" CFG="cdx11 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cdx11 - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cdx11 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\include" /I "..\src" /I "..\src\drv" /I "..\src\iup" /I "..\src\x11" /I "..\src\sim" /I "C:\LNG\x11inc" /I "..\..\iup\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fp".\..\obj/cdx11.pch" /Fo"$(IntDir)/" /Fd"..\obj\" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\include" /I "..\src" /I "..\src\drv" /I "..\src\iup" /I "..\src\x11" /I "..\src\sim" /I "C:\LNG\x11inc" /I "..\..\iup\include" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fp".\..\obj/cdx11.pch" /Fo"$(IntDir)/" /Fd"..\obj\" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1046 +# ADD RSC /l 1046 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cdx11.lib" +# ADD LIB32 /nologo /out:"..\lib\cdx11.lib" + +!ENDIF + +# Begin Target + +# Name "cdx11 - Win32 Debug" +# Begin Source File + +SOURCE=..\src\x11\cdx11.c +# End Source File +# Begin Source File + +SOURCE=..\src\x11\cdx11.h + +!IF "$(CFG)" == "cdx11 - Win32 Debug" + +# PROP Ignore_Default_Tool 1 +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\x11\cdxclp.c +# End Source File +# Begin Source File + +SOURCE=..\src\x11\cdxdbuf.c +# End Source File +# Begin Source File + +SOURCE=..\src\x11\cdximg.c +# End Source File +# Begin Source File + +SOURCE=..\src\x11\cdxnative.c +# End Source File +# Begin Source File + +SOURCE=..\src\x11\xvertex.c +# End Source File +# Begin Source File + +SOURCE=..\src\x11\xvertex.h + +!IF "$(CFG)" == "cdx11 - Win32 Debug" + +# PROP Ignore_Default_Tool 1 +!ENDIF + +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc6/cdxrender.dsp b/cd/mak.vc6/cdxrender.dsp new file mode 100755 index 0000000..26c4b4f --- /dev/null +++ b/cd/mak.vc6/cdxrender.dsp @@ -0,0 +1,71 @@ +# Microsoft Developer Studio Project File - Name="cdxrender" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=cdxrender - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cdxrender.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cdxrender.mak" CFG="cdxrender - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cdxrender - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cdxrender - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\lib" +# PROP BASE Intermediate_Dir "..\obj" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\lib" +# PROP Intermediate_Dir "..\obj" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /I "..\include" /I "..\src" /I "..\src\drv" /I "..\src\iup" /I "..\src\x11" /I "..\src\xrender" /I "..\src\sim" /I "C:\cygwin\usr\X11R6\include\" /I "C:\LNG\x11inc" /I "..\..\iup\include" /I "..\src\freetype2" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fp".\..\obj/cdxrender.pch" /Fo"$(IntDir)/" /Fd"..\obj\" /GZ /c /GX +# ADD CPP /nologo /MT /I "..\include" /I "..\src" /I "..\src\drv" /I "..\src\iup" /I "..\src\x11" /I "..\src\xrender" /I "..\src\sim" /I "C:\cygwin\usr\X11R6\include\" /I "C:\LNG\x11inc" /I "..\..\iup\include" /I "..\src\freetype2" /Z7 /W4 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CD_NO_OLD_INTERFACE" /D "_CRT_SECURE_NO_DEPRECATE" /Fp".\..\obj/cdxrender.pch" /Fo"$(IntDir)/" /Fd"..\obj\" /GZ /c /GX +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE RSC /l 1046 +# ADD RSC /l 1046 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\cdxrender.lib" +# ADD LIB32 /nologo /out:"..\lib\cdxrender.lib" + +!ENDIF + +# Begin Target + +# Name "cdxrender - Win32 Debug" +# Begin Source File + +SOURCE=..\src\xrender\cdxrender.c +# End Source File +# Begin Source File + +SOURCE=..\src\xrender\cdxrplus.c +# End Source File +# End Target +# End Project + diff --git a/cd/mak.vc7/cd.sln b/cd/mak.vc7/cd.sln new file mode 100755 index 0000000..66967d9 --- /dev/null +++ b/cd/mak.vc7/cd.sln @@ -0,0 +1,121 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cd", "cd.vcproj", "{01818D2C-65AF-4D5C-9452-4DFF401C6461}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-AFDC-4356-1234401C6461} = {01818D2C-65AF-AFDC-4356-1234401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdlua3", "cdlua3.vcproj", "{53FC9752-81C1-4AA6-B366-AF6D0A2B81F6}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdcontextplus", "cdgdiplus.vcproj", "{51A96255-7EAB-4F36-A6E5-1BAF6245FA18}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdlua5", "cdlua5.vcproj", "{53FC9752-81C1-4AA6-B366-A7890A2B81F6}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdpdf", "cdpdf.vcproj", "{8441F69D-7135-43B2-974F-45C6123C8467}" + ProjectSection(ProjectDependencies) = postProject + {8441F69D-7135-ABCD-1234-45C6123C8467} = {8441F69D-7135-ABCD-1234-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdx11", "cdx11.vcproj", "{01818D2C-7689-4D5C-1234-4DFF401C6461}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluapdf3", "cdluapdf3.vcproj", "{B4823266-DF8C-AAAA-9999-C7E78C234EAC}" + ProjectSection(ProjectDependencies) = postProject + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6} = {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6} + {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluapdf5", "cdluapdf5.vcproj", "{B4823266-DF8C-1224-EE00-C7688C234EAC}" + ProjectSection(ProjectDependencies) = postProject + {53FC9752-81C1-4AA6-B366-A7890A2B81F6} = {53FC9752-81C1-4AA6-B366-A7890A2B81F6} + {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdxrender", "cdxrender.vcproj", "{160DEDA5-C1AA-48C7-8B07-490C6A8DE2EE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluaim5", "cdluaim5.vcproj", "{CB863607-6B6C-0000-0000-123400001234}" + ProjectSection(ProjectDependencies) = postProject + {53FC9752-81C1-4AA6-B366-A7890A2B81F6} = {53FC9752-81C1-4AA6-B366-A7890A2B81F6} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pdflib", "cd_pdflib.vcproj", "{8441F69D-7135-ABCD-1234-45C6123C8467}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype6", "cd_freetype.vcproj", "{01818D2C-65AF-AFDC-4356-1234401C6461}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluacontextplus5", "cdluacontextplus5.vcproj", "{B4823266-DF8C-ABCD-1234-C7688C234EAC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CDLua5", "CDLua5", "{EFB1BE3C-2981-456B-8E32-928CBDFF7822}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CDLua3", "CDLua3", "{E92DB6FF-5501-4FC0-81D2-00DB8EFA2434}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {01818D2C-65AF-4D5C-9452-4DFF401C6461}.Debug|Win32.ActiveCfg = Debug|Win32 + {01818D2C-65AF-4D5C-9452-4DFF401C6461}.Debug|Win32.Build.0 = Debug|Win32 + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6}.Debug|Win32.ActiveCfg = Debug|Win32 + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6}.Debug|Win32.Build.0 = Debug|Win32 + {51A96255-7EAB-4F36-A6E5-1BAF6245FA18}.Debug|Win32.ActiveCfg = Debug|Win32 + {51A96255-7EAB-4F36-A6E5-1BAF6245FA18}.Debug|Win32.Build.0 = Debug|Win32 + {53FC9752-81C1-4AA6-B366-A7890A2B81F6}.Debug|Win32.ActiveCfg = Debug|Win32 + {53FC9752-81C1-4AA6-B366-A7890A2B81F6}.Debug|Win32.Build.0 = Debug|Win32 + {8441F69D-7135-43B2-974F-45C6123C8467}.Debug|Win32.ActiveCfg = Debug|Win32 + {8441F69D-7135-43B2-974F-45C6123C8467}.Debug|Win32.Build.0 = Debug|Win32 + {01818D2C-7689-4D5C-1234-4DFF401C6461}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-AAAA-9999-C7E78C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-AAAA-9999-C7E78C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {B4823266-DF8C-1224-EE00-C7688C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-1224-EE00-C7688C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {160DEDA5-C1AA-48C7-8B07-490C6A8DE2EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-123400001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-123400001234}.Debug|Win32.Build.0 = Debug|Win32 + {8441F69D-7135-ABCD-1234-45C6123C8467}.Debug|Win32.ActiveCfg = Debug|Win32 + {8441F69D-7135-ABCD-1234-45C6123C8467}.Debug|Win32.Build.0 = Debug|Win32 + {01818D2C-65AF-AFDC-4356-1234401C6461}.Debug|Win32.ActiveCfg = Debug|Win32 + {01818D2C-65AF-AFDC-4356-1234401C6461}.Debug|Win32.Build.0 = Debug|Win32 + {82BC36B1-9F7A-41D4-A24F-DBE012378CE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {82BC36B1-9F7A-41D4-A24F-DBE012378CE6}.Debug|Win32.Build.0 = Debug|Win32 + {B4823266-DF8C-ABCD-1234-C7688C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-ABCD-1234-C7688C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {53FC9752-81C1-4AA6-B366-A7890A2B81F6} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {B4823266-DF8C-ABCD-1234-C7688C234EAC} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {CB863607-6B6C-0000-0000-123400001234} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {B4823266-DF8C-1224-EE00-C7688C234EAC} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6} = {E92DB6FF-5501-4FC0-81D2-00DB8EFA2434} + {B4823266-DF8C-AAAA-9999-C7E78C234EAC} = {E92DB6FF-5501-4FC0-81D2-00DB8EFA2434} + EndGlobalSection + GlobalSection(DevPartner Solution Properties) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection +EndGlobal diff --git a/cd/mak.vc7/cd.vcproj b/cd/mak.vc7/cd.vcproj new file mode 100755 index 0000000..0e263a2 --- /dev/null +++ b/cd/mak.vc7/cd.vcproj @@ -0,0 +1,621 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cd_freetype.vcproj b/cd/mak.vc7/cd_freetype.vcproj new file mode 100755 index 0000000..9cdb5e1 --- /dev/null +++ b/cd/mak.vc7/cd_freetype.vcproj @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cd_pdflib.vcproj b/cd/mak.vc7/cd_pdflib.vcproj new file mode 100755 index 0000000..237ddf4 --- /dev/null +++ b/cd/mak.vc7/cd_pdflib.vcproj @@ -0,0 +1,732 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cdgdiplus.vcproj b/cd/mak.vc7/cdgdiplus.vcproj new file mode 100755 index 0000000..3ce9fe6 --- /dev/null +++ b/cd/mak.vc7/cdgdiplus.vcproj @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cdlua3.vcproj b/cd/mak.vc7/cdlua3.vcproj new file mode 100755 index 0000000..7f06c2b --- /dev/null +++ b/cd/mak.vc7/cdlua3.vcproj @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cdlua5.vcproj b/cd/mak.vc7/cdlua5.vcproj new file mode 100755 index 0000000..1cafdd0 --- /dev/null +++ b/cd/mak.vc7/cdlua5.vcproj @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cdluacontextplus5.vcproj b/cd/mak.vc7/cdluacontextplus5.vcproj new file mode 100755 index 0000000..44bb9a9 --- /dev/null +++ b/cd/mak.vc7/cdluacontextplus5.vcproj @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cdluaim5.vcproj b/cd/mak.vc7/cdluaim5.vcproj new file mode 100755 index 0000000..025cae8 --- /dev/null +++ b/cd/mak.vc7/cdluaim5.vcproj @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cdluapdf3.vcproj b/cd/mak.vc7/cdluapdf3.vcproj new file mode 100755 index 0000000..829e922 --- /dev/null +++ b/cd/mak.vc7/cdluapdf3.vcproj @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cdluapdf5.vcproj b/cd/mak.vc7/cdluapdf5.vcproj new file mode 100755 index 0000000..7344888 --- /dev/null +++ b/cd/mak.vc7/cdluapdf5.vcproj @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cdpdf.vcproj b/cd/mak.vc7/cdpdf.vcproj new file mode 100755 index 0000000..47974ea --- /dev/null +++ b/cd/mak.vc7/cdpdf.vcproj @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cdx11.vcproj b/cd/mak.vc7/cdx11.vcproj new file mode 100755 index 0000000..f2e7131 --- /dev/null +++ b/cd/mak.vc7/cdx11.vcproj @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc7/cdxrender.vcproj b/cd/mak.vc7/cdxrender.vcproj new file mode 100755 index 0000000..5d33a02 --- /dev/null +++ b/cd/mak.vc7/cdxrender.vcproj @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cd.sln b/cd/mak.vc8/cd.sln new file mode 100755 index 0000000..65b5117 --- /dev/null +++ b/cd/mak.vc8/cd.sln @@ -0,0 +1,122 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cd", "cd.vcproj", "{01818D2C-65AF-4D5C-9452-4DFF401C6461}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-AFDC-4356-1234401C6461} = {01818D2C-65AF-AFDC-4356-1234401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdlua3", "cdlua3.vcproj", "{53FC9752-81C1-4AA6-B366-AF6D0A2B81F6}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdcontextplus", "cdgdiplus.vcproj", "{51A96255-7EAB-4F36-A6E5-1BAF6245FA18}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdlua5", "cdlua5.vcproj", "{53FC9752-81C1-4AA6-B366-A7890A2B81F6}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdpdf", "cdpdf.vcproj", "{8441F69D-7135-43B2-974F-45C6123C8467}" + ProjectSection(ProjectDependencies) = postProject + {8441F69D-7135-ABCD-1234-45C6123C8467} = {8441F69D-7135-ABCD-1234-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdx11", "cdx11.vcproj", "{01818D2C-7689-4D5C-1234-4DFF401C6461}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluapdf3", "cdluapdf3.vcproj", "{B4823266-DF8C-AAAA-9999-C7E78C234EAC}" + ProjectSection(ProjectDependencies) = postProject + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6} = {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6} + {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluapdf5", "cdluapdf5.vcproj", "{B4823266-DF8C-1224-EE00-C7688C234EAC}" + ProjectSection(ProjectDependencies) = postProject + {53FC9752-81C1-4AA6-B366-A7890A2B81F6} = {53FC9752-81C1-4AA6-B366-A7890A2B81F6} + {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdxrender", "cdxrender.vcproj", "{160DEDA5-C1AA-48C7-8B07-490C6A8DE2EE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluaim5", "cdluaim5.vcproj", "{CB863607-6B6C-0000-0000-123400001234}" + ProjectSection(ProjectDependencies) = postProject + {53FC9752-81C1-4AA6-B366-A7890A2B81F6} = {53FC9752-81C1-4AA6-B366-A7890A2B81F6} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pdflib", "cd_pdflib.vcproj", "{8441F69D-7135-ABCD-1234-45C6123C8467}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype6", "cd_freetype.vcproj", "{01818D2C-65AF-AFDC-4356-1234401C6461}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluacontextplus5", "cdluacontextplus5.vcproj", "{B4823266-DF8C-ABCD-1234-C7688C234EAC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CDLua5", "CDLua5", "{EFB1BE3C-2981-456B-8E32-928CBDFF7822}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CDLua3", "CDLua3", "{E92DB6FF-5501-4FC0-81D2-00DB8EFA2434}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {01818D2C-65AF-4D5C-9452-4DFF401C6461}.Debug|Win32.ActiveCfg = Debug|Win32 + {01818D2C-65AF-4D5C-9452-4DFF401C6461}.Debug|Win32.Build.0 = Debug|Win32 + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6}.Debug|Win32.ActiveCfg = Debug|Win32 + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6}.Debug|Win32.Build.0 = Debug|Win32 + {51A96255-7EAB-4F36-A6E5-1BAF6245FA18}.Debug|Win32.ActiveCfg = Debug|Win32 + {51A96255-7EAB-4F36-A6E5-1BAF6245FA18}.Debug|Win32.Build.0 = Debug|Win32 + {53FC9752-81C1-4AA6-B366-A7890A2B81F6}.Debug|Win32.ActiveCfg = Debug|Win32 + {53FC9752-81C1-4AA6-B366-A7890A2B81F6}.Debug|Win32.Build.0 = Debug|Win32 + {8441F69D-7135-43B2-974F-45C6123C8467}.Debug|Win32.ActiveCfg = Debug|Win32 + {8441F69D-7135-43B2-974F-45C6123C8467}.Debug|Win32.Build.0 = Debug|Win32 + {01818D2C-7689-4D5C-1234-4DFF401C6461}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-AAAA-9999-C7E78C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-AAAA-9999-C7E78C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {B4823266-DF8C-1224-EE00-C7688C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-1224-EE00-C7688C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {160DEDA5-C1AA-48C7-8B07-490C6A8DE2EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-123400001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-123400001234}.Debug|Win32.Build.0 = Debug|Win32 + {8441F69D-7135-ABCD-1234-45C6123C8467}.Debug|Win32.ActiveCfg = Debug|Win32 + {8441F69D-7135-ABCD-1234-45C6123C8467}.Debug|Win32.Build.0 = Debug|Win32 + {01818D2C-65AF-AFDC-4356-1234401C6461}.Debug|Win32.ActiveCfg = Debug|Win32 + {01818D2C-65AF-AFDC-4356-1234401C6461}.Debug|Win32.Build.0 = Debug|Win32 + {82BC36B1-9F7A-41D4-A24F-DBE012378CE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {82BC36B1-9F7A-41D4-A24F-DBE012378CE6}.Debug|Win32.Build.0 = Debug|Win32 + {B4823266-DF8C-ABCD-1234-C7688C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-ABCD-1234-C7688C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {53FC9752-81C1-4AA6-B366-A7890A2B81F6} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {B4823266-DF8C-ABCD-1234-C7688C234EAC} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {CB863607-6B6C-0000-0000-123400001234} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {B4823266-DF8C-1224-EE00-C7688C234EAC} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6} = {E92DB6FF-5501-4FC0-81D2-00DB8EFA2434} + {B4823266-DF8C-AAAA-9999-C7E78C234EAC} = {E92DB6FF-5501-4FC0-81D2-00DB8EFA2434} + EndGlobalSection + GlobalSection(DevPartner Solution Properties) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection +EndGlobal diff --git a/cd/mak.vc8/cd.vcproj b/cd/mak.vc8/cd.vcproj new file mode 100755 index 0000000..fb95279 --- /dev/null +++ b/cd/mak.vc8/cd.vcproj @@ -0,0 +1,621 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cd_freetype.vcproj b/cd/mak.vc8/cd_freetype.vcproj new file mode 100755 index 0000000..920f09d --- /dev/null +++ b/cd/mak.vc8/cd_freetype.vcproj @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cd_pdflib.vcproj b/cd/mak.vc8/cd_pdflib.vcproj new file mode 100755 index 0000000..dbec53b --- /dev/null +++ b/cd/mak.vc8/cd_pdflib.vcproj @@ -0,0 +1,732 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cdgdiplus.vcproj b/cd/mak.vc8/cdgdiplus.vcproj new file mode 100755 index 0000000..57afbfc --- /dev/null +++ b/cd/mak.vc8/cdgdiplus.vcproj @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cdlua3.vcproj b/cd/mak.vc8/cdlua3.vcproj new file mode 100755 index 0000000..524b054 --- /dev/null +++ b/cd/mak.vc8/cdlua3.vcproj @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cdlua5.vcproj b/cd/mak.vc8/cdlua5.vcproj new file mode 100755 index 0000000..f92d515 --- /dev/null +++ b/cd/mak.vc8/cdlua5.vcproj @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cdluacontextplus5.vcproj b/cd/mak.vc8/cdluacontextplus5.vcproj new file mode 100755 index 0000000..581aa83 --- /dev/null +++ b/cd/mak.vc8/cdluacontextplus5.vcproj @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cdluaim5.vcproj b/cd/mak.vc8/cdluaim5.vcproj new file mode 100755 index 0000000..dd219f5 --- /dev/null +++ b/cd/mak.vc8/cdluaim5.vcproj @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cdluapdf3.vcproj b/cd/mak.vc8/cdluapdf3.vcproj new file mode 100755 index 0000000..554e3cd --- /dev/null +++ b/cd/mak.vc8/cdluapdf3.vcproj @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cdluapdf5.vcproj b/cd/mak.vc8/cdluapdf5.vcproj new file mode 100755 index 0000000..4625170 --- /dev/null +++ b/cd/mak.vc8/cdluapdf5.vcproj @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cdpdf.vcproj b/cd/mak.vc8/cdpdf.vcproj new file mode 100755 index 0000000..d4cc7a7 --- /dev/null +++ b/cd/mak.vc8/cdpdf.vcproj @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cdx11.vcproj b/cd/mak.vc8/cdx11.vcproj new file mode 100755 index 0000000..5fec9f3 --- /dev/null +++ b/cd/mak.vc8/cdx11.vcproj @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc8/cdxrender.vcproj b/cd/mak.vc8/cdxrender.vcproj new file mode 100755 index 0000000..e6084d1 --- /dev/null +++ b/cd/mak.vc8/cdxrender.vcproj @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cd.sln b/cd/mak.vc9/cd.sln new file mode 100755 index 0000000..aabc2ca --- /dev/null +++ b/cd/mak.vc9/cd.sln @@ -0,0 +1,142 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cd", "cd.vcproj", "{01818D2C-65AF-4D5C-9452-4DFF401C6461}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-AFDC-4356-1234401C6461} = {01818D2C-65AF-AFDC-4356-1234401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdlua3", "cdlua3.vcproj", "{53FC9752-81C1-4AA6-B366-AF6D0A2B81F6}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdgdiplus", "cdgdiplus.vcproj", "{51A96255-7EAB-4F36-A6E5-1BAF6245FA18}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdlua5", "cdlua5.vcproj", "{53FC9752-81C1-4AA6-B366-A7890A2B81F6}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdpdf", "cdpdf.vcproj", "{8441F69D-7135-43B2-974F-45C6123C8467}" + ProjectSection(ProjectDependencies) = postProject + {8441F69D-7135-ABCD-1234-45C6123C8467} = {8441F69D-7135-ABCD-1234-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdx11", "cdx11.vcproj", "{01818D2C-7689-4D5C-1234-4DFF401C6461}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluapdf3", "cdluapdf3.vcproj", "{B4823266-DF8C-AAAA-9999-C7E78C234EAC}" + ProjectSection(ProjectDependencies) = postProject + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6} = {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6} + {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluapdf5", "cdluapdf5.vcproj", "{B4823266-DF8C-1224-EE00-C7688C234EAC}" + ProjectSection(ProjectDependencies) = postProject + {53FC9752-81C1-4AA6-B366-A7890A2B81F6} = {53FC9752-81C1-4AA6-B366-A7890A2B81F6} + {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdxrender", "cdxrender.vcproj", "{160DEDA5-C1AA-48C7-8B07-490C6A8DE2EE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluaim5", "cdluaim5.vcproj", "{CB863607-6B6C-0000-0000-123400001234}" + ProjectSection(ProjectDependencies) = postProject + {53FC9752-81C1-4AA6-B366-A7890A2B81F6} = {53FC9752-81C1-4AA6-B366-A7890A2B81F6} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pdflib", "cd_pdflib.vcproj", "{8441F69D-7135-ABCD-1234-45C6123C8467}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype6", "cd_freetype.vcproj", "{01818D2C-65AF-AFDC-4356-1234401C6461}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdluacontextplus5", "cdluacontextplus5.vcproj", "{B4823266-DF8C-ABCD-1234-C7688C234EAC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua5", "Lua5", "{EFB1BE3C-2981-456B-8E32-928CBDFF7822}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua3", "Lua3", "{E92DB6FF-5501-4FC0-81D2-00DB8EFA2434}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{162715BD-4DB3-4007-8B50-725C0BD11878}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdtest", "cdtest.vcproj", "{A7E49FB8-700A-45EC-9174-FB1C2C7E83C9}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + {51A96255-7EAB-4F36-A6E5-1BAF6245FA18} = {51A96255-7EAB-4F36-A6E5-1BAF6245FA18} + {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdtestsimple", "cdtestsimple.vcproj", "{82BC36B1-9F7A-41D4-A24F-DBE012378CE6}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} + {51A96255-7EAB-4F36-A6E5-1BAF6245FA18} = {51A96255-7EAB-4F36-A6E5-1BAF6245FA18} + {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {01818D2C-65AF-4D5C-9452-4DFF401C6461}.Debug|Win32.ActiveCfg = Debug|Win32 + {01818D2C-65AF-4D5C-9452-4DFF401C6461}.Debug|Win32.Build.0 = Debug|Win32 + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6}.Debug|Win32.ActiveCfg = Debug|Win32 + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6}.Debug|Win32.Build.0 = Debug|Win32 + {51A96255-7EAB-4F36-A6E5-1BAF6245FA18}.Debug|Win32.ActiveCfg = Debug|Win32 + {51A96255-7EAB-4F36-A6E5-1BAF6245FA18}.Debug|Win32.Build.0 = Debug|Win32 + {53FC9752-81C1-4AA6-B366-A7890A2B81F6}.Debug|Win32.ActiveCfg = Debug|Win32 + {53FC9752-81C1-4AA6-B366-A7890A2B81F6}.Debug|Win32.Build.0 = Debug|Win32 + {8441F69D-7135-43B2-974F-45C6123C8467}.Debug|Win32.ActiveCfg = Debug|Win32 + {8441F69D-7135-43B2-974F-45C6123C8467}.Debug|Win32.Build.0 = Debug|Win32 + {01818D2C-7689-4D5C-1234-4DFF401C6461}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-AAAA-9999-C7E78C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-AAAA-9999-C7E78C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {B4823266-DF8C-1224-EE00-C7688C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-1224-EE00-C7688C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {160DEDA5-C1AA-48C7-8B07-490C6A8DE2EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-123400001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-123400001234}.Debug|Win32.Build.0 = Debug|Win32 + {8441F69D-7135-ABCD-1234-45C6123C8467}.Debug|Win32.ActiveCfg = Debug|Win32 + {8441F69D-7135-ABCD-1234-45C6123C8467}.Debug|Win32.Build.0 = Debug|Win32 + {01818D2C-65AF-AFDC-4356-1234401C6461}.Debug|Win32.ActiveCfg = Debug|Win32 + {01818D2C-65AF-AFDC-4356-1234401C6461}.Debug|Win32.Build.0 = Debug|Win32 + {B4823266-DF8C-ABCD-1234-C7688C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-ABCD-1234-C7688C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {A7E49FB8-700A-45EC-9174-FB1C2C7E83C9}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7E49FB8-700A-45EC-9174-FB1C2C7E83C9}.Debug|Win32.Build.0 = Debug|Win32 + {82BC36B1-9F7A-41D4-A24F-DBE012378CE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {82BC36B1-9F7A-41D4-A24F-DBE012378CE6}.Debug|Win32.Build.0 = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {B4823266-DF8C-AAAA-9999-C7E78C234EAC} = {E92DB6FF-5501-4FC0-81D2-00DB8EFA2434} + {53FC9752-81C1-4AA6-B366-AF6D0A2B81F6} = {E92DB6FF-5501-4FC0-81D2-00DB8EFA2434} + {B4823266-DF8C-1224-EE00-C7688C234EAC} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {CB863607-6B6C-0000-0000-123400001234} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {B4823266-DF8C-ABCD-1234-C7688C234EAC} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {53FC9752-81C1-4AA6-B366-A7890A2B81F6} = {EFB1BE3C-2981-456B-8E32-928CBDFF7822} + {A7E49FB8-700A-45EC-9174-FB1C2C7E83C9} = {162715BD-4DB3-4007-8B50-725C0BD11878} + {82BC36B1-9F7A-41D4-A24F-DBE012378CE6} = {162715BD-4DB3-4007-8B50-725C0BD11878} + EndGlobalSection + GlobalSection(DevPartner Solution Properties) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection +EndGlobal diff --git a/cd/mak.vc9/cd.vcproj b/cd/mak.vc9/cd.vcproj new file mode 100755 index 0000000..42d4c00 --- /dev/null +++ b/cd/mak.vc9/cd.vcproj @@ -0,0 +1,621 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cd_freetype.vcproj b/cd/mak.vc9/cd_freetype.vcproj new file mode 100755 index 0000000..2f58074 --- /dev/null +++ b/cd/mak.vc9/cd_freetype.vcproj @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cd_pdflib.vcproj b/cd/mak.vc9/cd_pdflib.vcproj new file mode 100755 index 0000000..45da4dc --- /dev/null +++ b/cd/mak.vc9/cd_pdflib.vcproj @@ -0,0 +1,732 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdgdiplus.vcproj b/cd/mak.vc9/cdgdiplus.vcproj new file mode 100755 index 0000000..99b7fd3 --- /dev/null +++ b/cd/mak.vc9/cdgdiplus.vcproj @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdlua3.vcproj b/cd/mak.vc9/cdlua3.vcproj new file mode 100755 index 0000000..5c8a477 --- /dev/null +++ b/cd/mak.vc9/cdlua3.vcproj @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdlua5.vcproj b/cd/mak.vc9/cdlua5.vcproj new file mode 100755 index 0000000..27a908e --- /dev/null +++ b/cd/mak.vc9/cdlua5.vcproj @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdluacontextplus5.vcproj b/cd/mak.vc9/cdluacontextplus5.vcproj new file mode 100755 index 0000000..9467365 --- /dev/null +++ b/cd/mak.vc9/cdluacontextplus5.vcproj @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdluaim5.vcproj b/cd/mak.vc9/cdluaim5.vcproj new file mode 100755 index 0000000..8682730 --- /dev/null +++ b/cd/mak.vc9/cdluaim5.vcproj @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdluapdf3.vcproj b/cd/mak.vc9/cdluapdf3.vcproj new file mode 100755 index 0000000..8fdadcf --- /dev/null +++ b/cd/mak.vc9/cdluapdf3.vcproj @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdluapdf5.vcproj b/cd/mak.vc9/cdluapdf5.vcproj new file mode 100755 index 0000000..a0ae2d2 --- /dev/null +++ b/cd/mak.vc9/cdluapdf5.vcproj @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdpdf.vcproj b/cd/mak.vc9/cdpdf.vcproj new file mode 100755 index 0000000..a106b1a --- /dev/null +++ b/cd/mak.vc9/cdpdf.vcproj @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdtest.vcproj b/cd/mak.vc9/cdtest.vcproj new file mode 100755 index 0000000..09989f0 --- /dev/null +++ b/cd/mak.vc9/cdtest.vcproj @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdtestsimple.vcproj b/cd/mak.vc9/cdtestsimple.vcproj new file mode 100755 index 0000000..0131f0f --- /dev/null +++ b/cd/mak.vc9/cdtestsimple.vcproj @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdx11.vcproj b/cd/mak.vc9/cdx11.vcproj new file mode 100755 index 0000000..1518a76 --- /dev/null +++ b/cd/mak.vc9/cdx11.vcproj @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/mak.vc9/cdxrender.vcproj b/cd/mak.vc9/cdxrender.vcproj new file mode 100755 index 0000000..6c67dd1 --- /dev/null +++ b/cd/mak.vc9/cdxrender.vcproj @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cd/src/COPYRIGHT b/cd/src/COPYRIGHT new file mode 100755 index 0000000..97eebba --- /dev/null +++ b/cd/src/COPYRIGHT @@ -0,0 +1,32 @@ +CD License +----------- + +CD is licensed under the terms of the MIT license reproduced below. +This means that CD is free software and can be used for both academic +and commercial purposes at absolutely no cost. + +=============================================================================== + +Copyright (C) 1994-2009 Tecgraf, PUC-Rio. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +=============================================================================== + +(end of COPYRIGHT) diff --git a/cd/src/Makefile b/cd/src/Makefile new file mode 100755 index 0000000..d12a1be --- /dev/null +++ b/cd/src/Makefile @@ -0,0 +1,19 @@ + +.PHONY: do_all cdcontextplus cdlua3 cdlua5 cdluacontextplus5 cdluaim5 +#do_all: cd_freetype cd cd_pdflib cdpdf cdcontextplus cdlua3 cdluapdf3 cdlua5 cdluapdf5 cdluacontextplus5 cdluaim5 +do_all: cd cdcontextplus cdlua5 cdluacontextplus5 cdluaim5 + +cd: + @$(MAKE) --no-print-directory -f tecmake_compact.mak +cdcontextplus: + @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=cdcontextplus +cdlua3: + @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=cdlua3 +cdlua5: + @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=cdlua5 +cdluapdf5: + @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=cdluapdf5 +cdluacontextplus5: + @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=cdluacontextplus5 +cdluaim5: + @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=cdluaim5 diff --git a/cd/src/README b/cd/src/README new file mode 100755 index 0000000..1eae080 --- /dev/null +++ b/cd/src/README @@ -0,0 +1,11 @@ +README for CD + + CD (Canvas Draw) is a platform-independent graphics library. It is implemented in several platforms using native graphics libraries: Microsoft Windows (GDI) and X-Windows (XLIB). + The library contains functions to support both vector and image applications, and the visualization surface can be either a window or a more abstract surface, such as Image, Clipboard, Metafile, PS, and so on. + + Build instructions and usage are available in the CD documentation. + + For complete information, visit CD's web site at http://www.tecgraf.puc-rio.br/cd + or access its documentation in the HTML folder. + +(end of README) diff --git a/cd/src/cd.c b/cd/src/cd.c new file mode 100755 index 0000000..c2045a8 --- /dev/null +++ b/cd/src/cd.c @@ -0,0 +1,739 @@ +/** \file + * \brief External API + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include +#include + + +#include "cd.h" +#include "wd.h" +#include "cd_private.h" +#include "cdirgb.h" + +/* This appears only here to avoid changing the cd.h header fo bug fixes */ +#define CD_VERSION_FIX ".1" +#define CD_VERSION_FIX_NUMBER 1 + +const char cd_ident[] = + "$CD: " CD_VERSION CD_VERSION_FIX " " CD_COPYRIGHT " $\n" + "$URL: www.tecgraf.puc-rio.br/cd $\n"; + +static char *tecver = "TECVERID.str:CD:LIB:" CD_VERSION CD_VERSION_FIX; + +char* cdVersion(void) +{ + (void)cd_ident; + (void)tecver; + return CD_VERSION CD_VERSION_FIX; +} + +char* cdVersionDate(void) +{ + return CD_VERSION_DATE; +} + +int cdVersionNumber(void) +{ + return CD_VERSION_NUMBER+CD_VERSION_FIX_NUMBER; +} + +static void cd_setdefaultfunc(cdCanvas* canvas) +{ + canvas->cxGetTextSize = cdgettextsizeEX; + canvas->cxGetFontDim = cdgetfontdimEX; + canvas->cxRect = cdrectSIM; +} + +static void cd_setdefaultattrib(cdCanvas* canvas) +{ + /* clipping attributes */ + canvas->clip_mode = CD_CLIPOFF; + + /* color attributes */ + canvas->foreground = CD_BLACK; + canvas->background = CD_WHITE; + + canvas->back_opacity = CD_TRANSPARENT; + canvas->write_mode = CD_REPLACE; + + /* primitive attributes */ + canvas->mark_type = CD_STAR; + canvas->mark_size = 10; + + canvas->line_width = 1; + canvas->line_style = CD_CONTINUOUS; + canvas->line_cap = CD_CAPFLAT; + canvas->line_join = CD_MITER; + + canvas->hatch_style = CD_HORIZONTAL; + canvas->interior_style = CD_SOLID; + canvas->fill_mode = CD_EVENODD; + + strcpy(canvas->font_type_face, "System"); + canvas->font_style = CD_PLAIN; + canvas->font_size = CD_STANDARD; + + canvas->text_alignment = CD_BASE_LEFT; + + canvas->matrix[0] = 1; /* identity */ + canvas->matrix[3] = 1; + + /* o resto recebeu zero no memset */ +} + +static void cd_updatedefaultattrib(cdCanvas* canvas) +{ + cdCanvasActivate(canvas); + + if (canvas->cxBackground) canvas->cxBackground(canvas->ctxcanvas, canvas->background); + if (canvas->cxForeground) canvas->cxForeground(canvas->ctxcanvas, canvas->foreground); + if (canvas->cxBackOpacity) canvas->cxBackOpacity(canvas->ctxcanvas, canvas->back_opacity); + if (canvas->cxWriteMode) canvas->cxWriteMode(canvas->ctxcanvas, canvas->write_mode); + if (canvas->cxLineStyle) canvas->cxLineStyle(canvas->ctxcanvas, canvas->line_style); + if (canvas->cxLineWidth) canvas->cxLineWidth(canvas->ctxcanvas, canvas->line_width); + if (canvas->cxLineCap) canvas->cxLineCap(canvas->ctxcanvas, canvas->line_cap); + if (canvas->cxLineJoin) canvas->cxLineJoin(canvas->ctxcanvas, canvas->line_join); + if (canvas->cxHatch) canvas->cxHatch(canvas->ctxcanvas, canvas->hatch_style); + if (canvas->cxInteriorStyle) canvas->cxInteriorStyle(canvas->ctxcanvas, canvas->interior_style); + if (canvas->cxFont) canvas->cxFont(canvas->ctxcanvas, canvas->font_type_face, canvas->font_style, canvas->font_size); + if (canvas->cxTextAlignment) canvas->cxTextAlignment(canvas->ctxcanvas, canvas->text_alignment); + if (canvas->cxTextOrientation) canvas->cxTextOrientation(canvas->ctxcanvas, canvas->text_orientation); +} + +cdCanvas* cdCreateCanvasf(cdContext *context, const char* format, ...) +{ + char data[1024]; + va_list arglist; + va_start(arglist, format); + vsprintf(data, format, arglist); + + return cdCreateCanvas(context, data); +} + +cdCanvas *cdCreateCanvas(cdContext* context, void *data_str) +{ + cdCanvas *canvas; + + /* usefull for NULL drivers, that do nothing and exist only for portability */ + if (!context) + return NULL; + + { + static int first = 1; + char* env = getenv("CD_QUIET"); + if (first && env && strcmp(env, "NO")==0) + { + printf("CD " CD_VERSION CD_VERSION_FIX " " CD_COPYRIGHT "\n"); + first = 0; + } + } + + /* alocates and initialize everything with 0s */ + canvas = (cdCanvas*)malloc(sizeof(cdCanvas)); + memset(canvas, 0, sizeof(cdCanvas)); + + canvas->signature[0] = 'C'; + canvas->signature[1] = 'D'; + + canvas->vector_font = cdCreateVectorFont(canvas); + canvas->simulation = cdCreateSimulation(canvas); + + canvas->context = context; + + /* initialize default attributes, must be before creating the canvas */ + cd_setdefaultattrib(canvas); + + context->cxCreateCanvas(canvas, data_str); + if (!canvas->ctxcanvas) + { + cdKillVectorFont(canvas->vector_font); + cdKillSimulation(canvas->simulation); + memset(canvas, 0, sizeof(cdCanvas)); + free(canvas); + return NULL; + } + + /* default simulation functions */ + cd_setdefaultfunc(canvas); + + /* initialize canvas table */ + context->cxInitTable(canvas); + + /* update the default atributes, must be after InitTable */ + cd_updatedefaultattrib(canvas); + + /* must be after creating the canvas, so that we know canvas width and height */ + canvas->clip_rect.xmax = canvas->w-1; + canvas->clip_rect.ymax = canvas->h-1; + + wdSetDefaults(canvas); + + return canvas; +} + +/* re-declared here to ignore CD_NO_OLD_INTERFACE definition */ +int cdActivate(cdCanvas* canvas); +cdCanvas* cdActiveCanvas(void); + +void cdKillCanvas(cdCanvas *canvas) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (canvas == cdActiveCanvas()) + cdActivate(NULL); + else + cdCanvasDeactivate(canvas); + + canvas->cxKillCanvas(canvas->ctxcanvas); + + if (canvas->pattern) free(canvas->pattern); + if (canvas->stipple) free(canvas->stipple); + if (canvas->poly) free(canvas->poly); + if (canvas->clip_poly) free(canvas->clip_poly); + if (canvas->fpoly) free(canvas->fpoly); + if (canvas->clip_fpoly) free(canvas->clip_fpoly); + if (canvas->line_dashes) free(canvas->line_dashes); + + cdKillVectorFont(canvas->vector_font); + cdKillSimulation(canvas->simulation); + + memset(canvas, 0, sizeof(cdCanvas)); + free(canvas); +} + +cdContext* cdCanvasGetContext(cdCanvas *canvas) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return NULL; + return canvas->context; +} + +int cdCanvasActivate(cdCanvas *canvas) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (!canvas->cxActivate) return CD_OK; + + if (canvas->cxActivate(canvas->ctxcanvas) == CD_ERROR) + return CD_ERROR; + + return CD_OK; +} + +void cdCanvasDeactivate(cdCanvas *canvas) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas) || !canvas->cxDeactivate) return; + canvas->cxDeactivate(canvas->ctxcanvas); +} + +unsigned long cdContextCaps(cdContext *context) +{ + if (!context) + return (unsigned long)CD_ERROR; + return context->caps; +} + +int cdCanvasSimulate(cdCanvas* canvas, int mode) +{ + int sim_mode; + cdContext* context; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + context = canvas->context; + + sim_mode = canvas->sim_mode; + if (mode == CD_QUERY || cdCanvasGetContext(canvas) == CD_IMAGERGB) + return sim_mode; + + /* default simulation functions */ + cd_setdefaultfunc(canvas); + + /* initialize canvas table */ + context->cxInitTable(canvas); + + canvas->sim_mode = mode; + if (mode == CD_SIM_NONE) + return sim_mode; + + /* when simulation is active must not set driver transform */ + canvas->cxTransform = NULL; + + if (mode & CD_SIM_LINE) + { + canvas->cxLine = cdlineSIM; + canvas->cxFLine = NULL; + } + + if (mode & CD_SIM_RECT) + { + canvas->cxRect = cdrectSIM; + canvas->cxFRect = NULL; + } + + if (mode & CD_SIM_BOX) + { + canvas->cxBox = cdboxSIM; + canvas->cxFBox = NULL; + } + + if (mode & CD_SIM_ARC) + { + canvas->cxArc = cdarcSIM; + canvas->cxFArc = NULL; + } + + if (mode & CD_SIM_SECTOR) + { + canvas->cxSector = cdsectorSIM; + canvas->cxFSector = NULL; + } + + if (mode & CD_SIM_CHORD) + { + canvas->cxChord = cdchordSIM; + canvas->cxFChord = NULL; + } + + canvas->cxFont(canvas->ctxcanvas, canvas->font_type_face, canvas->font_style, canvas->font_size); + + if (mode & CD_SIM_POLYLINE || mode & CD_SIM_POLYGON) + canvas->cxFPoly = NULL; + + return sim_mode; +} + +cdState* cdCanvasSaveState(cdCanvas* canvas) +{ + cdState* state; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return NULL; + + state = (cdState*)malloc(sizeof(cdState)); + memcpy(state, canvas, sizeof(cdCanvas)); + + if (state->pattern) + { + int size = state->pattern_w*state->pattern_h*sizeof(long); + state->pattern = (long*)malloc(size); + memcpy(state->pattern, canvas->pattern, size); + } + + if (state->stipple) + { + int size = state->stipple_w*state->stipple_h; + state->stipple = (unsigned char*)malloc(size); + memcpy(state->stipple, canvas->stipple, size); + } + + if (state->clip_poly) + { + int size = state->clip_poly_n*sizeof(cdPoint); + state->clip_poly = (cdPoint*)malloc(size); + memcpy(state->clip_poly, canvas->clip_poly, size); + } + + if (state->clip_fpoly) + { + int size = state->clip_poly_n*sizeof(cdfPoint); + state->clip_fpoly = (cdfPoint*)malloc(size); + memcpy(state->clip_fpoly, canvas->clip_fpoly, size); + } + + if (state->line_dashes) + { + int size = state->line_dashes_count*sizeof(int); + state->line_dashes = (int*)malloc(size); + memcpy(state->line_dashes, canvas->line_dashes, size); + } + + return state; +} + +void cdReleaseState(cdState* state) +{ + assert(state); + if (!state) return; + + if (state->stipple) + free(state->stipple); + + if (state->pattern) + free(state->pattern); + + if (state->clip_poly) + free(state->clip_poly); + + if (state->clip_fpoly) + free(state->clip_fpoly); + + if (state->line_dashes) + free(state->line_dashes); + + free(state); + free(state); +} + +void cdCanvasRestoreState(cdCanvas* canvas, cdState* state) +{ + assert(canvas); + assert(state); + if (!state || !_cdCheckCanvas(canvas)) return; + + /* clippling must be done in low level because origin and invert y axis */ + canvas->clip_poly_n = state->clip_poly_n; + + if (canvas->clip_poly) + { + free(canvas->clip_poly); + canvas->clip_poly = NULL; + } + + if (canvas->clip_fpoly) + { + free(canvas->clip_fpoly); + canvas->clip_fpoly = NULL; + } + + if (state->clip_poly) + { + int size = state->clip_poly_n*sizeof(cdPoint); + canvas->clip_poly = (cdPoint*)malloc(size); + memcpy(canvas->clip_poly, state->clip_poly, size); + } + + if (state->clip_fpoly) + { + int size = state->clip_poly_n*sizeof(cdfPoint); + canvas->clip_fpoly = (cdfPoint*)malloc(size); + memcpy(canvas->clip_fpoly, state->clip_fpoly, size); + } + + cdCanvasClip(canvas, CD_CLIPOFF); + if (canvas->clip_fpoly) + canvas->cxFPoly(canvas->ctxcanvas, CD_CLIP, state->clip_fpoly, state->clip_poly_n); + else if (canvas->clip_poly) + canvas->cxPoly(canvas->ctxcanvas, CD_CLIP, state->clip_poly, state->clip_poly_n); + cdCanvasClipArea(canvas, state->clip_rect.xmin, state->clip_rect.xmax, state->clip_rect.ymin, state->clip_rect.ymax); + if (canvas->cxFClipArea) + canvas->cxFClipArea(canvas->ctxcanvas, state->clip_frect.xmin, state->clip_frect.xmax, state->clip_frect.ymin, state->clip_frect.ymax); + else if (canvas->cxClipArea) + canvas->cxClipArea(canvas->ctxcanvas, state->clip_rect.xmin, state->clip_rect.xmax, state->clip_rect.ymin, state->clip_rect.ymax); + cdCanvasClip(canvas, state->clip_mode); + + /* regular attributes */ + cdCanvasSetBackground(canvas, state->background); + cdCanvasSetForeground(canvas, state->foreground); + cdCanvasBackOpacity(canvas, state->back_opacity); + cdCanvasWriteMode(canvas, state->write_mode); + cdCanvasLineStyle(canvas, state->line_style); + cdCanvasLineWidth(canvas, state->line_width); + cdCanvasLineCap(canvas, state->line_cap); + cdCanvasLineJoin(canvas, state->line_join); + cdCanvasFillMode(canvas, state->fill_mode); + cdCanvasLineStyleDashes(canvas, state->line_dashes, state->line_dashes_count); + cdCanvasHatch(canvas, state->hatch_style); + if (state->stipple) cdCanvasStipple(canvas, state->stipple_w, state->stipple_h, state->stipple); + if (state->pattern) cdCanvasPattern(canvas, state->pattern_w, state->pattern_h, state->pattern); + cdCanvasInteriorStyle(canvas, state->interior_style); + if (state->native_font[0]) + cdCanvasNativeFont(canvas, state->native_font); + else + cdCanvasFont(canvas, state->font_type_face, state->font_style, state->font_size); + cdCanvasTextAlignment(canvas, state->text_alignment); + cdCanvasTextOrientation(canvas, state->text_orientation); + cdCanvasMarkType(canvas, state->mark_type); + cdCanvasMarkSize(canvas, state->mark_size); + cdCanvasOrigin(canvas, state->origin.x, state->origin.y); + if (state->use_matrix) + cdCanvasTransform(canvas, state->matrix); + wdCanvasWindow(canvas, state->window.xmin, state->window.xmax, state->window.ymin, state->window.ymax); + wdCanvasViewport(canvas, state->viewport.xmin, state->viewport.xmax, state->viewport.ymin, state->viewport.ymax); + cdCanvasSimulate(canvas, state->sim_mode); + + /* complex clipping regions are not saved */ + /* driver internal attributes are not saved */ +} + +static cdAttribute* cd_findattrib(cdCanvas *canvas, const char* name, int *a) +{ + int i; + + for (i=0; i < canvas->attrib_n; i++) + { + if (strcmp(name, canvas->attrib_list[i]->name) == 0) + { + if (a) *a = i; + return canvas->attrib_list[i]; + } + } + + return NULL; +} + +void cdRegisterAttribute(cdCanvas *canvas, cdAttribute* attrib) +{ + cdAttribute* old_attrib; + int a; + + assert(canvas); + assert(attrib); + if (!attrib || !_cdCheckCanvas(canvas)) return; + + old_attrib = cd_findattrib(canvas, attrib->name, &a); + + if (old_attrib) + canvas->attrib_list[a] = attrib; + else + { + canvas->attrib_list[canvas->attrib_n] = attrib; + canvas->attrib_n++; + } +} + +void cdCanvasSetAttribute(cdCanvas* canvas, const char* name, char *data) +{ + cdAttribute* attrib; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + attrib = cd_findattrib(canvas, name, NULL); + if (attrib && attrib->set) + attrib->set(canvas->ctxcanvas, data); +} + +void cdCanvasSetfAttribute(cdCanvas* canvas, const char* name, const char* format, ...) +{ + char data[1024]; + va_list arglist; + va_start(arglist, format); + vsprintf(data, format, arglist); + + cdCanvasSetAttribute(canvas, name, data); +} + +char* cdCanvasGetAttribute(cdCanvas* canvas, const char* name) +{ + cdAttribute* attrib; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return NULL; + + attrib = cd_findattrib(canvas, name, NULL); + if (attrib && attrib->get) + return attrib->get(canvas->ctxcanvas); + + return NULL; +} + +int cdCanvasPlay(cdCanvas* canvas, cdContext* context, int xmin, int xmax, int ymin, int ymax, void *data) +{ + assert(context); + assert(canvas); + if (!_cdCheckCanvas(canvas) || !context || !context->cxPlay) return CD_ERROR; + + /* the all can be 0 here, do not use cdCheckBoxSize */ + if (xmin > xmax) _cdSwapInt(xmin, xmax); + if (ymin > ymax) _cdSwapInt(ymin, ymax); + + return context->cxPlay(canvas, xmin, xmax, ymin, ymax, data); +} + +int cdContextRegisterCallback(cdContext *context, int cb, cdCallback func) +{ + assert(context); + if (!context || !context->cxRegisterCallback) return CD_ERROR; + return context->cxRegisterCallback(cb, func); +} + +void cdCanvasFlush(cdCanvas* canvas) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas) || !canvas->cxFlush) return; + canvas->cxFlush(canvas->ctxcanvas); +} + +void cdCanvasClear(cdCanvas* canvas) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas) || !canvas->cxClear) return; + canvas->cxClear(canvas->ctxcanvas); +} + +int cdCanvasUpdateYAxis(cdCanvas* canvas, int* y) +{ + assert(canvas); + assert(y); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + if(canvas->invert_yaxis) + { + *y = _cdInvertYAxis(canvas, *y); + + if (canvas->use_origin) + *y -= 2*canvas->origin.y; + } + + return *y; +} + +double cdfCanvasUpdateYAxis(cdCanvas* canvas, double* y) +{ + assert(canvas); + assert(y); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + if(canvas->invert_yaxis) + { + *y = _cdInvertYAxis(canvas, *y); + + if (canvas->use_origin) + *y -= 2*canvas->origin.y; + } + + return *y; +} + +int cdCanvasInvertYAxis(cdCanvas* canvas, int y) +{ + int yi; + assert(canvas); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + yi = _cdInvertYAxis(canvas, y); + + if (canvas->use_origin) + yi -= 2*canvas->origin.y; + + return yi; +} + +double cdfCanvasInvertYAxis(cdCanvas* canvas, double y) +{ + double yi; + assert(canvas); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + yi = _cdInvertYAxis(canvas, y); + + if (canvas->use_origin) + yi -= 2*canvas->origin.y; + + return yi; +} + +void cdCanvasGetSize(cdCanvas* canvas, int *width, int *height, double *width_mm, double *height_mm) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (width) *width = canvas->w; + if (height) *height = canvas->h; + if (width_mm) *width_mm = canvas->w_mm; + if (height_mm) *height_mm = canvas->h_mm; +} + +void cdCanvasMM2Pixel(cdCanvas* canvas, double mm_dx, double mm_dy, int *dx, int *dy) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (dx) *dx = cdRound(mm_dx*canvas->xres); + if (dy) *dy = cdRound(mm_dy*canvas->yres); +} + +void cdCanvasPixel2MM(cdCanvas* canvas, int dx, int dy, double *mm_dx, double *mm_dy) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (mm_dx) *mm_dx = ((double)dx)/canvas->xres; + if (mm_dy) *mm_dy = ((double)dy)/canvas->yres; +} + +void cdfCanvasMM2Pixel(cdCanvas* canvas, double mm_dx, double mm_dy, double *dx, double *dy) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (dx) *dx = mm_dx*canvas->xres; + if (dy) *dy = mm_dy*canvas->yres; +} + +void cdfCanvasPixel2MM(cdCanvas* canvas, double dx, double dy, double *mm_dx, double *mm_dy) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (mm_dx) *mm_dx = dx/canvas->xres; + if (mm_dy) *mm_dy = dy/canvas->yres; +} + +/***** Context Plus Functions ********/ + +static int use_context_plus = 0; +static cdContext* context_plus[NUM_CONTEXTPLUS] = {NULL, NULL, NULL, NULL, NULL, NULL}; + +int cdUseContextPlus(int use) +{ + if (use == CD_QUERY) + return use_context_plus; + + { + int old_use_context_plus = use_context_plus; + use_context_plus = use; + return old_use_context_plus; + } +} + +void cdInitContextPlusList(cdContext* ctx_list[]) +{ + int ctx; + for (ctx = 0; ctx < NUM_CONTEXTPLUS; ctx++) + if (ctx_list[ctx] != NULL) + context_plus[ctx] = ctx_list[ctx]; +} + +cdContext* cdGetContextPlus(int ctx) +{ + if (ctx < 0 || ctx >= NUM_CONTEXTPLUS) + return NULL; + + return context_plus[ctx]; +} + +/***** OLD Compatibility Functions ********/ + +int cdRegisterCallback(cdContext *context, int cb, cdCallback func) +{ + return cdContextRegisterCallback(context, cb, func); +} + +cdContext* cdGetContext(cdCanvas* canvas) +{ + return cdCanvasGetContext(canvas); +} + +int * cdGetClipPoly(int *n) +{ + if (n) *n = 0; + return NULL; +} + +double* wdGetClipPoly(int *n) +{ + if (n) *n = 0; + return NULL; +} diff --git a/cd/src/cd.def b/cd/src/cd.def new file mode 100755 index 0000000..dd2f7ed --- /dev/null +++ b/cd/src/cd.def @@ -0,0 +1,384 @@ +EXPORTS + cdContextWMF + cdContextCGM + cdContextClipboard + cdContextDGN + cdContextDXF + cdContextEMF + cdContextImage + cdContextImageRGB + cdContextPS + cdContextPrinter + cdContextNativeWindow + cdContextMetafile + cdContextDBuffer + cdContextDBufferRGB + cdContextPicture + cdContextDebug + + cdRedImage + cdGreenImage + cdBlueImage + cdAlphaImage + cdGetScreenColorPlanes + cdGetScreenSize + cdUseContextPlus + + cdinittableMF + cdkillcanvasMF + cdcreatecanvasMF + + cdVersion + cdVersionDate + cdVersionNumber + cdCreateCanvas + cdCreateCanvasf + cdKillCanvas + cdGetContext + cdContextCaps + cdActivate + cdActiveCanvas + cdSimulate + cdFlush + cdClear + cdSaveState + cdRestoreState + cdSetAttribute + cdSetfAttribute + cdGetAttribute + cdRegisterAttribute + cdReleaseState + + cdRegisterCallback + cdPlay + + cdGetCanvasSize + cdMM2Pixel + cdPixel2MM + cdOrigin + cdUpdateYAxis + cdCanvasTransform + + cdClip + cdClipArea + cdGetClipPoly + cdGetClipArea + + cdPixel + cdMark + cdLine + cdBegin + cdVertex + cdEnd + cdRect + cdBox + cdArc + cdSector + cdText + + cdBackground + cdForeground + cdBackOpacity + cdWriteMode + cdLineStyle + cdLineWidth + cdInteriorStyle + cdHatch + cdStipple + cdGetStipple + cdPattern + cdGetPattern + cdFont + cdGetFont + cdNativeFont + cdTextAlignment + cdTextOrientation + cdMarkType + cdMarkSize + + cdVectorFont + cdVectorTextDirection + cdVectorTextTransform + cdVectorTextSize + cdGetVectorTextSize + cdVectorCharSize + cdVectorText + cdMultiLineVectorText + cdGetVectorTextBounds + + cdFontDim + cdTextSize + cdTextBox + cdTextBounds + + cdGetColorPlanes + cdEncodeColor + cdDecodeColor + cdEncodeAlpha + cdDecodeAlpha + cdPalette + + cdGetImageRGB + cdPutImageRectRGB + cdPutImageRectRGBA + cdPutImageRectMap + cdRGB2Map + + cdCreateImage + cdGetImage + cdPutImageRect + cdKillImage + cdScrollArea + + cdCreateBitmap + cdInitBitmap + cdKillBitmap + cdBitmapGetData + cdBitmapSetRect + cdPutBitmap + cdGetBitmap + cdBitmapRGB2Map + + wdWindow + wdGetWindow + wdViewport + wdGetViewport + wdWorld2Canvas + wdCanvas2World + + wdClipArea + wdGetClipArea + wdGetClipPoly + + wdHardcopy + + wdPixel + wdMark + wdLine + wdVertex + wdRect + wdBox + wdArc + wdSector + wdText + + wdPutImageRect + wdPutImageRectRGB + wdPutImageRectRGBA + wdPutImageRectMap + wdPutBitmap + + wdLineWidth + wdFont + wdMarkSize + wdFontDim + wdTextSize + wdTextBox + wdTextBounds + wdStipple + wdPattern + wdGetFont + + wdVectorTextDirection + wdVectorTextSize + wdGetVectorTextSize + wdVectorCharSize + wdVectorText + wdMultiLineVectorText + wdGetVectorTextBounds + + cdwCreateCanvas + cdwInitTable + cdwKillCanvas + cdwRestoreDC + + cdLineStyleDashes + cdRegionBox + wdRegionBox + cdChord + cdOffsetRegion + cdPointInRegion + cdRegionCombineMode + cdLineJoin + cdLineCap + cdFillMode + wdChord + wdOffsetRegion + wdPointInRegion + cdGetFileName + wdWorld2CanvasSize + cdParsePangoFont + cdParseIupWinFont + cdParseXWinFont + cdGetFontSizePixels + cdGetFontSizePoints + cdStrEqualNoCase + + wdCanvasLineWidth + wdCanvasMarkSize + wdCanvasVectorCharSize + wdCanvasGetClipArea + wdCanvasIsPointInRegion + wdCanvasFont + wdCanvasArc + wdCanvasBox + wdCanvasCanvas2World + wdCanvasChord + wdCanvasClipArea + wdCanvasGetFont + wdCanvasGetFontDim + wdCanvasGetRegionBox + wdCanvasGetTextBounds + wdCanvasGetTextBox + wdCanvasGetTextSize + wdCanvasGetVectorTextBounds + wdCanvasGetVectorTextBox + wdCanvasGetVectorTextSize + wdCanvasGetViewport + wdCanvasGetWindow + wdCanvasHardcopy + wdCanvasLine + wdCanvasMark + wdCanvasMultiLineVectorText + wdCanvasOffsetRegion + wdCanvasPattern + wdCanvasPixel + wdCanvasPutBitmap + wdCanvasPutImageRect + wdCanvasPutImageRectMap + wdCanvasPutImageRectRGB + wdCanvasPutImageRectRGBA + wdCanvasRect + wdCanvasSector + wdCanvasStipple + wdCanvasText + wdCanvasVectorText + wdCanvasVectorTextDirection + wdCanvasVectorTextSize + wdCanvasVertex + wdCanvasViewport + wdCanvasWindow + wdCanvasWorld2Canvas + wdCanvasWorld2CanvasSize + + cdCanvasGetContext + cdCanvasCreateImage + cdCanvasSaveState + cdCanvasVectorFont + cdCanvasGetAttribute + cdCanvasNativeFont + cdCanvasTextOrientation + cdCanvasVectorTextTransform + cdCanvasActivate + cdCanvasSimulate + cdCanvasFillMode + cdCanvasMarkSize + cdCanvasMarkType + cdCanvasTextAlignment + cdCanvasFont + cdCanvasBackOpacity + cdCanvasClip + cdCanvasGetClipArea + cdCanvasGetColorPlanes + cdCanvasHatch + cdCanvasInteriorStyle + cdCanvasIsPointInRegion + cdCanvasLineCap + cdCanvasLineJoin + cdCanvasLineStyle + cdCanvasLineWidth + cdCanvasPlay + cdCanvasRegionCombineMode + cdCanvasVectorCharSize + cdCanvasVectorFontSize + cdCanvasGetVectorFontSize + cdCanvasWriteMode + cdCanvasUpdateYAxis + cdCanvasInvertYAxis + cdfCanvasUpdateYAxis + cdfCanvasInvertYAxis + cdContextRegisterCallback + cdCanvasBackground + cdCanvasForeground + cdCanvasGetPattern + cdCanvasGetStipple + cdCanvasDeactivate + cdCanvasClear + cdCanvasFlush + cdCanvasRestoreState + cdCanvasSetAttribute + cdCanvasSetfAttribute + cdCanvasGetFont + cdCanvasPattern + cdCanvasArc + cdCanvasBegin + cdCanvasBox + cdCanvasChord + cdCanvasClipArea + cdCanvasEnd + cdCanvasGetBitmap + cdCanvasGetFontDim + cdCanvasGetImage + cdCanvasGetImageRGB + cdCanvasGetOrigin + cdCanvasGetRegionBox + cdCanvasGetSize + cdCanvasGetTextBounds + cdCanvasGetTextBox + cdCanvasGetTextSize + cdCanvasGetVectorTextBounds + cdCanvasGetVectorTextBox + cdCanvasGetVectorTextSize + cdCanvasLine + cdCanvasLineStyleDashes + cdCanvasMark + cdCanvasMM2Pixel + cdCanvasMultiLineVectorText + cdCanvasOffsetRegion + cdCanvasOrigin + cdCanvasPalette + cdCanvasPixel + cdCanvasPixel2MM + cdCanvasPutBitmap + cdCanvasPutImageRect + cdCanvasPutImageRectMap + cdCanvasPutImageRectRGB + cdCanvasPutImageRectRGBA + cdCanvasRect + cdCanvasScrollArea + cdCanvasSector + cdCanvasStipple + cdCanvasText + cdCanvasVectorText + cdCanvasVectorTextDirection + cdCanvasVectorTextSize + cdCanvasVertex + + cdfCanvasGetClipArea + cdfCanvasArc + cdfCanvasBox + cdfCanvasChord + cdfCanvasClipArea + cdfCanvasGetOrigin + cdfCanvasLine + cdfCanvasMM2Pixel + cdfCanvasOrigin + cdfCanvasPixel2MM + cdfCanvasRect + cdfCanvasSector + cdfCanvasText + cdfCanvasVertex + cdCanvasGetTransform + cdCanvasTransformMultiply + cdCanvasTransformRotate + cdCanvasTransformScale + cdCanvasTransformTranslate + cdTextTranslatePoint + cdRotatePointY + cdCanvasSetForeground + cdCanvasSetBackground + cdCanvasTransformPoint + cdfCanvasTransformPoint + + cdInitContextPlusList + cdGetContextPlus diff --git a/cd/src/cd.dep b/cd/src/cd.dep new file mode 100644 index 0000000..e6c50ee --- /dev/null +++ b/cd/src/cd.dep @@ -0,0 +1,120 @@ +$(OBJDIR)/cd.o: cd.c ../include/cd.h ../include/wd.h ../include/cd_private.h \ + ../include/cdirgb.h +$(OBJDIR)/wd.o: wd.c ../include/cd.h ../include/wd.h ../include/cd_private.h +$(OBJDIR)/wdhdcpy.o: wdhdcpy.c ../include/cd.h ../include/wd.h +$(OBJDIR)/rgb2map.o: rgb2map.c ../include/cd.h +$(OBJDIR)/cd_vectortext.o: cd_vectortext.c ../include/cd.h ../include/wd.h \ + ../include/cd_private.h +$(OBJDIR)/cd_active.o: cd_active.c ../include/cd.h ../include/cd_old.h \ + ../include/wd.h ../include/wd_old.h +$(OBJDIR)/cd_attributes.o: cd_attributes.c ../include/cd.h ../include/cd_private.h +$(OBJDIR)/cd_bitmap.o: cd_bitmap.c ../include/cd.h ../include/cdirgb.h \ + ../include/cd_private.h +$(OBJDIR)/cd_image.o: cd_image.c ../include/cd.h ../include/cd_private.h +$(OBJDIR)/cd_primitives.o: cd_primitives.c ../include/cd.h ../include/cd_private.h +$(OBJDIR)/cd_text.o: cd_text.c ../include/cd.h ../include/cd_private.h +$(OBJDIR)/cd_util.o: cd_util.c ../include/cd.h ../include/cd_private.h +$(OBJDIR)/circle.o: intcgm/circle.c ../include/cd.h intcgm/list.h intcgm/types.h \ + intcgm/intcgm.h intcgm/intcgm6.h intcgm/circle.h +$(OBJDIR)/ellipse.o: intcgm/ellipse.c ../include/cd.h intcgm/list.h intcgm/types.h \ + intcgm/intcgm.h intcgm/intcgm6.h intcgm/ellipse.h +$(OBJDIR)/intcgm1.o: intcgm/intcgm1.c ../include/cd.h ../include/cdcgm.h \ + intcgm/list.h intcgm/types.h intcgm/intcgm2.h intcgm/intcgm.h \ + intcgm/bparse.h +$(OBJDIR)/intcgm2.o: intcgm/intcgm2.c ../include/cd.h ../include/cdcgm.h \ + intcgm/list.h intcgm/types.h intcgm/bparse.h intcgm/tparse.h \ + intcgm/intcgm.h intcgm/intcgm6.h +$(OBJDIR)/intcgm4.o: intcgm/intcgm4.c ../include/cd.h ../include/cdcgm.h \ + intcgm/list.h intcgm/types.h intcgm/intcgm.h intcgm/intcgm2.h \ + intcgm/intcgm4.h intcgm/intcgm6.h intcgm/ellipse.h intcgm/circle.h \ + intcgm/sism.h +$(OBJDIR)/intcgm6.o: intcgm/intcgm6.c ../include/cd.h intcgm/list.h intcgm/types.h \ + intcgm/intcgm.h intcgm/intcgm2.h intcgm/intcgm6.h +$(OBJDIR)/list.o: intcgm/list.c intcgm/list.h +$(OBJDIR)/sism.o: intcgm/sism.c ../include/cd.h intcgm/list.h intcgm/types.h \ + intcgm/intcgm.h intcgm/intcgm2.h intcgm/intcgm6.h +$(OBJDIR)/tparse.o: intcgm/tparse.c ../include/cd.h ../include/cdcgm.h \ + intcgm/list.h intcgm/types.h intcgm/bparse.h intcgm/intcgm.h \ + intcgm/intcgm2.h intcgm/intcgm4.h intcgm/intcgm6.h +$(OBJDIR)/bparse.o: intcgm/bparse.c ../include/cd.h ../include/cdcgm.h \ + intcgm/list.h intcgm/types.h intcgm/bparse.h intcgm/intcgm.h \ + intcgm/intcgm2.h intcgm/intcgm4.h intcgm/intcgm6.h +$(OBJDIR)/cddgn.o: drv/cddgn.c ../include/cd.h ../include/cd_private.h \ + ../include/cddgn.h +$(OBJDIR)/cdcgm.o: drv/cdcgm.c ../include/cd.h ../include/cd_private.h \ + ../include/cdcgm.h drv/cgm.h +$(OBJDIR)/cgm.o: drv/cgm.c drv/cgm.h +$(OBJDIR)/cddxf.o: drv/cddxf.c ../include/cd.h ../include/cd_private.h \ + ../include/cddxf.h +$(OBJDIR)/cdirgb.o: drv/cdirgb.c ../include/cd.h ../include/cd_private.h sim/sim.h \ + ../include/cdirgb.h +$(OBJDIR)/cdmf.o: drv/cdmf.c ../include/cd.h ../include/wd.h \ + ../include/cd_private.h ../include/cdmf.h ../include/cdmf_private.h +$(OBJDIR)/cdps.o: drv/cdps.c ../include/cd.h ../include/cd_private.h \ + ../include/cdps.h +$(OBJDIR)/cdpicture.o: drv/cdpicture.c ../include/cd.h ../include/cd_private.h \ + ../include/cdpicture.h +$(OBJDIR)/cddebug.o: drv/cddebug.c ../include/cd.h ../include/wd.h \ + ../include/cd_private.h ../include/cddebug.h +$(OBJDIR)/cdfontex.o: sim/cdfontex.c ../include/cd.h ../include/cd_private.h +$(OBJDIR)/sim.o: sim/sim.c ../include/cd.h ../include/cd_private.h \ + sim/cd_truetype.h /usr/include/freetype2/freetype/freetype.h \ + /usr/include/freetype2/freetype/config/ftconfig.h \ + /usr/include/freetype2/freetype/config/ftoption.h \ + /usr/include/freetype2/freetype/config/ftstdlib.h \ + /usr/include/freetype2/freetype/fterrors.h \ + /usr/include/freetype2/freetype/ftmoderr.h \ + /usr/include/freetype2/freetype/fterrdef.h \ + /usr/include/freetype2/freetype/fttypes.h \ + /usr/include/freetype2/freetype/ftsystem.h \ + /usr/include/freetype2/freetype/ftimage.h sim/sim.h +$(OBJDIR)/cd_truetype.o: sim/cd_truetype.c sim/cd_truetype.h \ + /usr/include/freetype2/freetype/freetype.h \ + /usr/include/freetype2/freetype/config/ftconfig.h \ + /usr/include/freetype2/freetype/config/ftoption.h \ + /usr/include/freetype2/freetype/config/ftstdlib.h \ + /usr/include/freetype2/freetype/fterrors.h \ + /usr/include/freetype2/freetype/ftmoderr.h \ + /usr/include/freetype2/freetype/fterrdef.h \ + /usr/include/freetype2/freetype/fttypes.h \ + /usr/include/freetype2/freetype/ftsystem.h \ + /usr/include/freetype2/freetype/ftimage.h +$(OBJDIR)/sim_other.o: sim/sim_other.c ../include/cd.h ../include/cd_private.h +$(OBJDIR)/sim_primitives.o: sim/sim_primitives.c ../include/cd.h \ + ../include/cd_private.h sim/cd_truetype.h \ + /usr/include/freetype2/freetype/freetype.h \ + /usr/include/freetype2/freetype/config/ftconfig.h \ + /usr/include/freetype2/freetype/config/ftoption.h \ + /usr/include/freetype2/freetype/config/ftstdlib.h \ + /usr/include/freetype2/freetype/fterrors.h \ + /usr/include/freetype2/freetype/ftmoderr.h \ + /usr/include/freetype2/freetype/fterrdef.h \ + /usr/include/freetype2/freetype/fttypes.h \ + /usr/include/freetype2/freetype/ftsystem.h \ + /usr/include/freetype2/freetype/ftimage.h sim/sim.h +$(OBJDIR)/sim_linepolyfill.o: sim/sim_linepolyfill.c ../include/cd.h \ + ../include/cd_private.h sim/cd_truetype.h \ + /usr/include/freetype2/freetype/freetype.h \ + /usr/include/freetype2/freetype/config/ftconfig.h \ + /usr/include/freetype2/freetype/config/ftoption.h \ + /usr/include/freetype2/freetype/config/ftstdlib.h \ + /usr/include/freetype2/freetype/fterrors.h \ + /usr/include/freetype2/freetype/ftmoderr.h \ + /usr/include/freetype2/freetype/fterrdef.h \ + /usr/include/freetype2/freetype/fttypes.h \ + /usr/include/freetype2/freetype/ftsystem.h \ + /usr/include/freetype2/freetype/ftimage.h sim/sim.h +$(OBJDIR)/cd0prn.o: drv/cd0prn.c ../include/cd.h ../include/cdprint.h +$(OBJDIR)/cd0emf.o: drv/cd0emf.c ../include/cd.h ../include/cdemf.h +$(OBJDIR)/cd0wmf.o: drv/cd0wmf.c ../include/cd.h ../include/cdwmf.h +$(OBJDIR)/cdx11.o: x11/cdx11.c x11/cdx11.h ../include/cd.h ../include/cd_private.h \ + x11/xvertex.h +$(OBJDIR)/cdxclp.o: x11/cdxclp.c ../include/cd.h ../include/cd_private.h \ + ../include/cdclipbd.h ../include/cdmf.h ../include/cdmf_private.h +$(OBJDIR)/cdximg.o: x11/cdximg.c x11/cdx11.h ../include/cd.h \ + ../include/cd_private.h ../include/cdimage.h +$(OBJDIR)/cdxnative.o: x11/cdxnative.c x11/cdx11.h ../include/cd.h \ + ../include/cd_private.h ../include/cdnative.h +$(OBJDIR)/cdxdbuf.o: x11/cdxdbuf.c x11/cdx11.h ../include/cd.h \ + ../include/cd_private.h ../include/cddbuf.h +$(OBJDIR)/xvertex.o: x11/xvertex.c x11/xvertex.h diff --git a/cd/src/cd.rc b/cd/src/cd.rc new file mode 100755 index 0000000..42c3f8c --- /dev/null +++ b/cd/src/cd.rc @@ -0,0 +1,19 @@ +1 VERSIONINFO + FILEVERSION 5,0,1,0 + PRODUCTVERSION 5,0,1,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "www.tecgraf.puc-rio.br/cd\0" + VALUE "CompanyName", "Tecgraf/PUC-Rio\0" + VALUE "FileDescription", "CD - Canvas Draw, A 2D Graphics Library\0" + VALUE "FileVersion", "5.0.1\0" + VALUE "LegalCopyright", "Copyright © 1994-2008 Tecgraf, PUC-Rio.\0" + VALUE "OriginalFilename", "cd.dll\0" + VALUE "ProductName", "CD for Windows\0" + VALUE "ProductVersion", "5.0.1\0" + END + END +END diff --git a/cd/src/cd_active.c b/cd/src/cd_active.c new file mode 100755 index 0000000..f8229bd --- /dev/null +++ b/cd/src/cd_active.c @@ -0,0 +1,1006 @@ +/** \file + * \brief OLD API that needs the cdActivate call + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#ifdef CD_NO_OLD_INTERFACE +#undef CD_NO_OLD_INTERFACE +#endif + +#include "cd.h" +#include "wd.h" + +static cdCanvas *active_canvas = NULL; + +int cdActivate(cdCanvas *canvas) +{ + /* if is the active canvas, just update canvas state */ + if (active_canvas && canvas == active_canvas) + { + if (cdCanvasActivate(canvas) == CD_ERROR) + { + active_canvas = NULL; + return CD_ERROR; + } + + return CD_OK; + } + + /* if exists an active canvas, deactivate it */ + if (active_canvas) + cdCanvasDeactivate(active_canvas); + + /* allow to active a NULL canvas, the user may restore a previous canvas that was NULL */ + if (canvas == NULL) + { + active_canvas = NULL; + return CD_ERROR; + } + + /* do the activation */ + active_canvas = canvas; + + if (cdCanvasActivate(canvas) == CD_ERROR) + { + active_canvas = NULL; + return CD_ERROR; + } + + return CD_OK; +} + +cdCanvas* cdActiveCanvas(void) +{ + return active_canvas; +} + +int cdSimulate(int mode) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasSimulate(active_canvas, mode); +} + +cdState* cdSaveState(void) +{ + assert(active_canvas); + if (!active_canvas) return NULL; + return cdCanvasSaveState(active_canvas); +} + +void cdRestoreState(cdState* state) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasRestoreState(active_canvas, state); +} + +void cdFlush(void) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasFlush(active_canvas); +} + +void cdClear(void) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasClear(active_canvas); +} + +void cdSetAttribute(const char* name, char *data) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasSetAttribute(active_canvas, name, data); +} + +void cdSetfAttribute(const char* name, const char* format, ...) +{ + char data[1024]; + va_list arglist; + + assert(active_canvas); + if (!active_canvas) return; + + va_start(arglist, format); + vsprintf(data, format, arglist); + + cdCanvasSetAttribute(active_canvas, name, data); +} + +char* cdGetAttribute(const char* name) +{ + assert(active_canvas); + if (!active_canvas) return NULL; + return cdCanvasGetAttribute(active_canvas, name); +} + +int cdPlay(cdContext* context, int xmin, int xmax, int ymin, int ymax, void *data) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasPlay(active_canvas, context, xmin, xmax, ymin, ymax, data); +} + +int cdClip(int mode) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasClip(active_canvas, mode); +} + +void cdClipArea(int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasClipArea(active_canvas, xmin, xmax, ymin, ymax); +} + +int cdGetClipArea(int *xmin, int *xmax, int *ymin, int *ymax) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasGetClipArea(active_canvas, xmin, xmax, ymin, ymax); +} + +int cdPointInRegion(int x, int y) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasIsPointInRegion(active_canvas, x, y); +} + +void cdOffsetRegion(int x, int y) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasOffsetRegion(active_canvas, x, y); +} + +void cdRegionBox(int *xmin, int *xmax, int *ymin, int *ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetRegionBox(active_canvas, xmin, xmax, ymin, ymax); +} + +void cdGetCanvasSize(int *width, int *height, double *width_mm, double *height_mm) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetSize(active_canvas, width, height, width_mm, height_mm); +} + +void cdMM2Pixel(double mm_dx, double mm_dy, int *dx, int *dy) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasMM2Pixel(active_canvas, mm_dx, mm_dy, dx, dy); +} + +void cdPixel2MM(int dx, int dy, double *mm_dx, double *mm_dy) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasPixel2MM(active_canvas, dx, dy, mm_dx, mm_dy); +} + +void cdOrigin(int x, int y) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasOrigin(active_canvas, x, y); +} + +int cdUpdateYAxis(int *y) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasUpdateYAxis(active_canvas, y); +} + +void cdPixel(int x, int y, long color) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasPixel(active_canvas, x, y, color); +} + +void cdMark(int x, int y) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasMark(active_canvas, x, y); +} + +void cdLine(int x1, int y1, int x2, int y2) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasLine(active_canvas, x1, y1, x2, y2); +} + +void cdBegin(int mode) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasBegin(active_canvas, mode); +} + +void cdVertex(int x, int y) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasVertex(active_canvas, x, y); +} + +void cdEnd(void) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasEnd(active_canvas); +} + +void cdRect(int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasRect(active_canvas, xmin, xmax, ymin, ymax); +} + +void cdBox(int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasBox(active_canvas, xmin, xmax, ymin, ymax); +} + +void cdArc(int xc, int yc, int w, int h, double angle1, double angle2) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasArc(active_canvas, xc, yc, w, h, angle1, angle2); +} + +void cdSector(int xc, int yc, int w, int h, double angle1, double angle2) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasSector(active_canvas, xc, yc, w, h, angle1, angle2); +} + +void cdChord(int xc, int yc, int w, int h, double angle1, double angle2) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasChord(active_canvas, xc, yc, w, h, angle1, angle2); +} + +void cdText(int x, int y, const char *s) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasText(active_canvas, x, y, s); +} + +int cdBackOpacity(int opacity) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasBackOpacity(active_canvas, opacity); +} + +int cdWriteMode(int mode) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasWriteMode(active_canvas, mode); +} + +int cdLineStyle(int style) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasLineStyle(active_canvas, style); +} + +int cdLineJoin(int join) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasLineJoin(active_canvas, join); +} + +int cdLineCap(int cap) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasLineCap(active_canvas, cap); +} + +int cdRegionCombineMode(int mode) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasRegionCombineMode(active_canvas, mode); +} + +void cdLineStyleDashes(const int* dashes, int count) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasLineStyleDashes(active_canvas, dashes, count); +} + +int cdLineWidth(int width) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasLineWidth(active_canvas, width); +} + +int cdFillMode(int mode) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasFillMode(active_canvas, mode); +} + +int cdInteriorStyle (int style) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasInteriorStyle(active_canvas, style); +} + +int cdHatch(int style) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasHatch(active_canvas, style); +} + +void cdStipple(int w, int h, const unsigned char *stipple) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasStipple(active_canvas, w, h, stipple); +} + +unsigned char* cdGetStipple(int *w, int *h) +{ + assert(active_canvas); + if (!active_canvas) return NULL; + return cdCanvasGetStipple(active_canvas, w, h); +} + +void cdPattern(int w, int h, const long *pattern) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasPattern(active_canvas, w, h, pattern); +} + +long* cdGetPattern(int* w, int* h) +{ + assert(active_canvas); + if (!active_canvas) return NULL; + return cdCanvasGetPattern(active_canvas, w, h); +} + +void cdFont(int type_face, int style, int size) +{ + static const char * family[] = + { + "System", /* CD_SYSTEM */ + "Courier", /* CD_COURIER */ + "Times", /* CD_TIMES_ROMAN */ + "Helvetica" /* CD_HELVETICA */ + }; + + assert(active_canvas); + assert(type_face>=CD_SYSTEM && type_face<=CD_NATIVE); + if (!active_canvas) return; + if (type_faceCD_NATIVE) return; + + if (type_face == CD_NATIVE) + { + char* native_font = cdCanvasNativeFont(active_canvas, NULL); + cdCanvasNativeFont(active_canvas, native_font); + } + else + cdCanvasFont(active_canvas, family[type_face], style, size); +} + +void cdGetFont(int *type_face, int *style, int *size) +{ + char family[1024]; + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetFont(active_canvas, family, style, size); + + if (type_face) + { + if (strcmp(family, "System")==0) + *type_face = CD_SYSTEM; + else if (strcmp(family, "Courier")==0) + *type_face = CD_COURIER; + else if (strcmp(family, "Times")==0) + *type_face = CD_TIMES_ROMAN; + else if (strcmp(family, "Helvetica")==0) + *type_face = CD_HELVETICA; + else + *type_face = CD_NATIVE; + } +} + +char* cdNativeFont(const char* font) +{ + assert(active_canvas); + if (!active_canvas) return NULL; + return cdCanvasNativeFont(active_canvas, font); +} + +int cdTextAlignment(int alignment) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasTextAlignment(active_canvas, alignment); +} + +double cdTextOrientation(double angle) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasTextOrientation(active_canvas, angle); +} + +int cdMarkType(int type) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasMarkType(active_canvas, type); +} + +int cdMarkSize(int size) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasMarkSize(active_canvas, size); +} + +long cdBackground(long color) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasBackground(active_canvas, color); +} + +long cdForeground(long color) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasForeground(active_canvas, color); +} + +void cdFontDim(int *max_width, int *height, int *ascent, int *descent) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetFontDim(active_canvas, max_width, height, ascent, descent); +} + +void cdTextSize(const char *s, int *width, int *height) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetTextSize(active_canvas, s, width, height); +} + +void cdTextBounds(int x, int y, const char *s, int *rect) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetTextBounds(active_canvas, x, y, s, rect); +} + +void cdTextBox(int x, int y, const char *s, int *xmin, int *xmax, int *ymin, int *ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetTextBox(active_canvas, x, y, s, xmin, xmax, ymin, ymax); +} + +int cdGetColorPlanes(void) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasGetColorPlanes(active_canvas); +} + +void cdPalette(int n, const long *palette, int mode) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasPalette(active_canvas, n, palette, mode); +} + +void cdGetImageRGB(unsigned char *r, unsigned char *g, unsigned char *b, int x, int y, int w, int h) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetImageRGB(active_canvas, r, g, b, x, y, w, h); +} + +void cdPutImageRectRGB(int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasPutImageRectRGB(active_canvas, iw, ih, r, g, b, x, y, w, h, xmin, xmax, ymin, ymax); +} + +void cdPutImageRectRGBA(int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasPutImageRectRGBA(active_canvas, iw, ih, r, g, b, a, x, y, w, h, xmin, xmax, ymin, ymax); +} + +void cdPutImageRectMap(int iw, int ih, const unsigned char *index, const long *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasPutImageRectMap(active_canvas, iw, ih, index, colors, x, y, w, h, xmin, xmax, ymin, ymax); +} + +cdImage* cdCreateImage(int w, int h) +{ + assert(active_canvas); + if (!active_canvas) return NULL; + return cdCanvasCreateImage(active_canvas, w, h); +} + +void cdGetImage(cdImage* image, int x, int y) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetImage(active_canvas, image, x, y); +} + +void cdPutImageRect(cdImage* image, int x, int y, int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasPutImageRect(active_canvas, image, x, y, xmin, xmax, ymin, ymax); +} + +void cdScrollArea(int xmin, int xmax, int ymin, int ymax, int dx, int dy) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasScrollArea(active_canvas, xmin, xmax, ymin, ymax, dx, dy); +} + +void cdPutBitmap(cdBitmap* bitmap, int x, int y, int w, int h) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasPutBitmap(active_canvas, bitmap, x, y, w, h); +} + +void cdGetBitmap(cdBitmap* bitmap, int x, int y) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetBitmap(active_canvas, bitmap, x, y); +} + +void wdWindow(double xmin, double xmax, double ymin, double ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasWindow(active_canvas, xmin, xmax, ymin, ymax); +} + +void wdGetWindow (double *xmin, double *xmax, double *ymin, double *ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasGetWindow(active_canvas, xmin, xmax, ymin, ymax); +} + +void wdViewport(int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasViewport(active_canvas, xmin, xmax, ymin, ymax); +} + +void wdGetViewport (int *xmin, int *xmax, int *ymin, int *ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasGetViewport(active_canvas, xmin, xmax, ymin, ymax); +} + +void wdWorld2Canvas(double xw, double yw, int *xv, int *yv) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasWorld2Canvas(active_canvas, xw, yw, xv, yv); +} + +void wdWorld2CanvasSize(double hw, double vw, int *hv, int *vv) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasWorld2CanvasSize(active_canvas, hw, vw, hv, vv); +} + +void wdCanvas2World(int xv, int yv, double *xw, double *yw) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasCanvas2World(active_canvas, xv, yv, xw, yw); +} + +void wdClipArea(double xmin, double xmax, double ymin, double ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasClipArea(active_canvas, xmin, xmax, ymin, ymax); +} + +int wdPointInRegion(double x, double y) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return wdCanvasIsPointInRegion(active_canvas, x, y); +} + +void wdOffsetRegion(double x, double y) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasOffsetRegion(active_canvas, x, y); +} + +void wdRegionBox(double *xmin, double *xmax, double *ymin, double *ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasGetRegionBox(active_canvas, xmin, xmax, ymin, ymax); +} + +int wdGetClipArea(double *xmin, double *xmax, double *ymin, double *ymax) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return wdCanvasGetClipArea(active_canvas, xmin, xmax, ymin, ymax); +} + +void wdLine (double x1, double y1, double x2, double y2) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasLine(active_canvas, x1, y1, x2, y2); +} + +void wdBox (double xmin, double xmax, double ymin, double ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasBox(active_canvas, xmin, xmax, ymin, ymax); +} + +void wdRect(double xmin, double xmax, double ymin, double ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasRect(active_canvas, xmin, xmax, ymin, ymax); +} + +void wdArc(double xc, double yc, double w, double h, double angle1, double angle2) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasArc(active_canvas, xc, yc, w, h, angle1, angle2); +} + +void wdSector(double xc, double yc, double w, double h, double angle1, double angle2) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasSector(active_canvas, xc, yc, w, h, angle1, angle2); +} + +void wdChord(double xc, double yc, double w, double h, double angle1, double angle2) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasChord(active_canvas, xc, yc, w, h, angle1, angle2); +} + +void wdText(double x, double y, const char *s) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasText(active_canvas, x, y, s); +} + +void wdVertex(double x, double y) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasVertex(active_canvas, x, y); +} + +void wdMark(double x, double y) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasMark(active_canvas, x, y); +} + +void wdPixel(double x, double y, long color) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasPixel(active_canvas, x, y, color); +} + +void wdPutImageRect(cdImage* image, double x, double y, int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasPutImageRect(active_canvas, image, x, y, xmin, xmax, ymin, ymax); +} + +void wdPutImageRectRGB(int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasPutImageRectRGB(active_canvas, iw, ih, r, g, b, x, y, w, h, xmin, xmax, ymin, ymax); +} + +void wdPutImageRectRGBA(int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasPutImageRectRGBA(active_canvas, iw, ih, r, g, b, a, x, y, w, h, xmin, xmax, ymin, ymax); +} + +void wdPutImageRectMap(int iw, int ih, const unsigned char *index, const long *colors, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasPutImageRectMap(active_canvas, iw, ih, index, colors, x, y, w, h, xmin, xmax, ymin, ymax); +} + +void wdPutBitmap(cdBitmap* bitmap, double x, double y, double w, double h) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasPutBitmap(active_canvas, bitmap, x, y, w, h); +} + +double wdLineWidth(double width_mm) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return wdCanvasLineWidth(active_canvas, width_mm); +} + +void wdFont(int type_face, int style, double size_mm) +{ + static const char * family[] = + { + "System", /* CD_SYSTEM */ + "Courier", /* CD_COURIER */ + "Times Roman", /* CD_TIMES_ROMAN */ + "Helvetica" /* CD_HELVETICA */ + }; + + assert(active_canvas); + if (!active_canvas) return; + if (type_faceCD_HELVETICA) return; + + wdCanvasFont(active_canvas, family[type_face], style, (int)(size_mm*CD_MM2PT + 0.5)); +} + +void wdGetFont(int *type_face, int *style, double *size) +{ + char family[1024]; + assert(active_canvas); + if (!active_canvas) return; + wdCanvasGetFont(active_canvas, family, style, size); + + if (type_face) + { + if (strcmp(family, "System")==0) + *type_face = CD_SYSTEM; + else if (strcmp(family, "Courier")==0) + *type_face = CD_COURIER; + else if (strcmp(family, "Times Roman")==0) + *type_face = CD_TIMES_ROMAN; + else if (strcmp(family, "Helvetica")==0) + *type_face = CD_HELVETICA; + else + *type_face = CD_NATIVE; + } +} + +double wdMarkSize(double size_mm) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return wdCanvasMarkSize(active_canvas, size_mm); +} + +void wdFontDim(double *max_width, double *height, double *ascent, double *descent) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasGetFontDim(active_canvas, max_width, height, ascent, descent); +} + +void wdTextSize(const char *s, double *width, double *height) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasGetTextSize(active_canvas, s, width, height); +} + +void wdTextBox(double x, double y, const char *s, double *xmin, double *xmax, double *ymin, double *ymax) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasGetTextBox(active_canvas, x, y, s, xmin, xmax, ymin, ymax); +} + +void wdTextBounds(double x, double y, const char *s, double *rect) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasGetTextBounds(active_canvas, x, y, s, rect); +} + +void wdPattern(int w, int h, const long *color, double w_mm, double h_mm) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasPattern(active_canvas, w, h, color, w_mm, h_mm); +} + +void wdStipple(int w, int h, const unsigned char *fgbg, double w_mm, double h_mm) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasStipple(active_canvas, w, h, fgbg, w_mm, h_mm); +} + +void wdHardcopy(cdContext* ctx, void *data, cdCanvas *canvas, void(*draw_func)(void)) +{ + wdCanvasHardcopy(canvas, ctx, data, (void(*)(cdCanvas*))draw_func); +} + +void cdVectorText(int x, int y, const char* s) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasVectorText(active_canvas, x, y, s); +} + +void cdMultiLineVectorText(int x, int y, const char* s) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasMultiLineVectorText(active_canvas, x, y, s); +} + +char *cdVectorFont(const char *filename) +{ + assert(active_canvas); + if (!active_canvas) return NULL; + return cdCanvasVectorFont(active_canvas, filename); +} + +void cdVectorTextDirection(int x1, int y1, int x2, int y2) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasVectorTextDirection(active_canvas, x1, y1, x2, y2); +} + +double* cdVectorTextTransform(const double* matrix) +{ + assert(active_canvas); + if (!active_canvas) return NULL; + return cdCanvasVectorTextTransform(active_canvas, matrix); +} + +void cdVectorTextSize(int size_x, int size_y, const char* s) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasVectorTextSize(active_canvas, size_x, size_y, s); +} + +int cdVectorCharSize(int size) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return cdCanvasVectorCharSize(active_canvas, size); +} + +void cdGetVectorTextSize(const char* s, int *x, int *y) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetVectorTextSize(active_canvas, s, x, y); +} + +void cdGetVectorTextBounds(const char* s, int x, int y, int *rect) +{ + assert(active_canvas); + if (!active_canvas) return; + cdCanvasGetVectorTextBounds(active_canvas, s, x, y, rect); +} + +void wdVectorTextDirection(double x1, double y1, double x2, double y2) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasVectorTextDirection(active_canvas, x1, y1, x2, y2); +} + +void wdVectorTextSize(double size_x, double size_y, const char* s) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasVectorTextSize(active_canvas, size_x, size_y, s); +} + +void wdGetVectorTextSize(const char* s, double *x, double *y) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasGetVectorTextSize(active_canvas, s, x, y); +} + +double wdVectorCharSize(double size) +{ + assert(active_canvas); + if (!active_canvas) return CD_ERROR; + return wdCanvasVectorCharSize(active_canvas, size); +} + +void wdVectorText(double x, double y, const char* s) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasVectorText(active_canvas, x, y, s); +} + +void wdMultiLineVectorText(double x, double y, const char* s) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasMultiLineVectorText(active_canvas, x, y, s); +} + +void wdGetVectorTextBounds(const char* s, double x, double y, double *rect) +{ + assert(active_canvas); + if (!active_canvas) return; + wdCanvasGetVectorTextBounds(active_canvas, s, x, y, rect); +} diff --git a/cd/src/cd_attributes.c b/cd/src/cd_attributes.c new file mode 100755 index 0000000..7b825e4 --- /dev/null +++ b/cd/src/cd_attributes.c @@ -0,0 +1,1017 @@ +/** \file + * \brief External API + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include +#include +#include + + +#include "cd.h" +#include "cd_private.h" + + +int cdCanvasClip(cdCanvas* canvas, int mode) +{ + int clip_mode; + + assert(canvas); + assert(mode==CD_QUERY || (mode>=CD_CLIPOFF && mode<=CD_CLIPREGION)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (modeCD_CLIPREGION) return CD_ERROR; + + clip_mode = canvas->clip_mode; + + if (mode == CD_QUERY || + mode == clip_mode || + (mode == CD_CLIPPOLYGON && !canvas->clip_poly && !canvas->clip_fpoly)) + return clip_mode; + + if (canvas->cxClip) + canvas->clip_mode = canvas->cxClip(canvas->ctxcanvas, mode); + else + canvas->clip_mode = mode; + + return clip_mode; +} + +void cdCanvasClipArea(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (!cdCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + if (canvas->use_origin) + { + xmin += canvas->origin.x; + xmax += canvas->origin.x; + ymin += canvas->origin.y; + ymax += canvas->origin.y; + } + + if (canvas->invert_yaxis) + { + ymin = _cdInvertYAxis(canvas, ymin); + ymax = _cdInvertYAxis(canvas, ymax); + _cdSwapInt(ymin, ymax); + } + + if (xmin == canvas->clip_rect.xmin && + xmax == canvas->clip_rect.xmax && + ymin == canvas->clip_rect.ymin && + ymax == canvas->clip_rect.ymax) + return; + + if (canvas->cxClipArea) + canvas->cxClipArea(canvas->ctxcanvas, xmin, xmax, ymin, ymax); + else if (canvas->cxFClipArea) + canvas->cxFClipArea(canvas->ctxcanvas, (double)xmin, (double)xmax, (double)ymin, (double)ymax); + + canvas->clip_rect.xmin = xmin; + canvas->clip_rect.xmax = xmax; + canvas->clip_rect.ymin = ymin; + canvas->clip_rect.ymax = ymax; + canvas->clip_frect.xmin = (double)xmin; + canvas->clip_frect.xmax = (double)xmax; + canvas->clip_frect.ymin = (double)ymin; + canvas->clip_frect.ymax = (double)ymax; +} + +int cdCanvasGetClipArea(cdCanvas* canvas, int *xmin, int *xmax, int *ymin, int *ymax) +{ + int _xmin, _xmax, _ymin, _ymax; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + _xmin = canvas->clip_rect.xmin; + _xmax = canvas->clip_rect.xmax; + _ymin = canvas->clip_rect.ymin; + _ymax = canvas->clip_rect.ymax; + + if (canvas->invert_yaxis) + { + _ymin = _cdInvertYAxis(canvas, _ymin); + _ymax = _cdInvertYAxis(canvas, _ymax); + _cdSwapInt(_ymin, _ymax); + } + + if (canvas->use_origin) + { + _xmin -= canvas->origin.x; + _xmax -= canvas->origin.x; + _ymin -= canvas->origin.y; + _ymax -= canvas->origin.y; + } + + if (xmin) *xmin = _xmin; + if (xmax) *xmax = _xmax; + if (ymin) *ymin = _ymin; + if (ymax) *ymax = _ymax; + + return canvas->clip_mode; +} + +void cdfCanvasClipArea(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (!cdfCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + if (canvas->use_origin) + { + xmin += canvas->forigin.x; + xmax += canvas->forigin.x; + ymin += canvas->forigin.y; + ymax += canvas->forigin.y; + } + + if (canvas->invert_yaxis) + { + ymin = _cdInvertYAxis(canvas, ymin); + ymax = _cdInvertYAxis(canvas, ymax); + _cdSwapDouble(ymin, ymax); + } + + if (xmin == canvas->clip_frect.xmin && + xmax == canvas->clip_frect.xmax && + ymin == canvas->clip_frect.ymin && + ymax == canvas->clip_frect.ymax) + return; + + if (canvas->cxFClipArea) + canvas->cxFClipArea(canvas->ctxcanvas, xmin, xmax, ymin, ymax); + else if (canvas->cxClipArea) + canvas->cxClipArea(canvas->ctxcanvas, _cdRound(xmin), _cdRound(xmax), _cdRound(ymin), _cdRound(ymax)); + + canvas->clip_frect.xmin = xmin; + canvas->clip_frect.xmax = xmax; + canvas->clip_frect.ymin = ymin; + canvas->clip_frect.ymax = ymax; + canvas->clip_rect.xmin = _cdRound(xmin); + canvas->clip_rect.xmax = _cdRound(xmax); + canvas->clip_rect.ymin = _cdRound(ymin); + canvas->clip_rect.ymax = _cdRound(ymax); +} + +int cdfCanvasGetClipArea(cdCanvas* canvas, double *xmin, double *xmax, double *ymin, double *ymax) +{ + double _xmin, _xmax, _ymin, _ymax; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + _xmin = canvas->clip_frect.xmin; + _xmax = canvas->clip_frect.xmax; + _ymin = canvas->clip_frect.ymin; + _ymax = canvas->clip_frect.ymax; + + if (canvas->invert_yaxis) + { + _ymin = _cdInvertYAxis(canvas, _ymin); + _ymax = _cdInvertYAxis(canvas, _ymax); + _cdSwapDouble(_ymin, _ymax); + } + + if (canvas->use_origin) + { + _xmin -= canvas->forigin.x; + _xmax -= canvas->forigin.x; + _ymin -= canvas->forigin.y; + _ymax -= canvas->forigin.y; + } + + if (xmin) *xmin = _xmin; + if (xmax) *xmax = _xmax; + if (ymin) *ymin = _ymin; + if (ymax) *ymax = _ymax; + + return canvas->clip_mode; +} + +int cdCanvasIsPointInRegion(cdCanvas* canvas, int x, int y) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas) || !canvas->cxIsPointInRegion) return CD_ERROR; + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + return canvas->cxIsPointInRegion(canvas->ctxcanvas, x, y); +} + +void cdCanvasOffsetRegion(cdCanvas* canvas, int x, int y) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas) || !canvas->cxOffsetRegion) return; + + if (canvas->invert_yaxis) + y = -y; + + canvas->cxOffsetRegion(canvas->ctxcanvas, x, y); +} + +void cdCanvasGetRegionBox(cdCanvas* canvas, int *xmin, int *xmax, int *ymin, int *ymax) +{ + int _xmin, _xmax, _ymin, _ymax; + assert(canvas); + if (!_cdCheckCanvas(canvas) || !canvas->cxGetRegionBox) return; + + canvas->cxGetRegionBox(canvas->ctxcanvas, &_xmin, &_xmax, &_ymin, &_ymax); + + if (canvas->invert_yaxis) + { + _ymin = _cdInvertYAxis(canvas, _ymin); + _ymax = _cdInvertYAxis(canvas, _ymax); + _cdSwapInt(_ymin, _ymax); + } + + if (canvas->use_origin) + { + _xmin -= canvas->origin.x; + _xmax -= canvas->origin.x; + _ymin -= canvas->origin.y; + _ymax -= canvas->origin.y; + } + + if (xmin) *xmin = _xmin; + if (xmax) *xmax = _xmax; + if (ymin) *ymin = _ymin; + if (ymax) *ymax = _ymax; +} + +void cdCanvasOrigin(cdCanvas* canvas, int x, int y) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + canvas->origin.x = x; + canvas->origin.y = y; + + if (canvas->origin.x == 0 && canvas->origin.y == 0) + canvas->use_origin = 0; + else + canvas->use_origin = 1; + + canvas->forigin.x = (double)canvas->origin.x; + canvas->forigin.y = (double)canvas->origin.y; +} + + +void cdfCanvasOrigin(cdCanvas* canvas, double x, double y) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + canvas->forigin.x = x; + canvas->forigin.y = y; + + if (canvas->forigin.x == 0 && canvas->forigin.y == 0) + canvas->use_origin = 0; + else + canvas->use_origin = 1; + + canvas->origin.x = _cdRound(canvas->forigin.x); + canvas->origin.y = _cdRound(canvas->forigin.y); +} + +void cdCanvasGetOrigin(cdCanvas* canvas, int *x, int *y) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (x) *x = canvas->origin.x; + if (y) *y = canvas->origin.y; +} + +void cdfCanvasGetOrigin(cdCanvas* canvas, double *x, double *y) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (x) *x = canvas->forigin.x; + if (y) *y = canvas->forigin.y; +} + +#define CD_TRANSFORM_X(_x, _y, _matrix) (_x*_matrix[0] + _y*_matrix[2] + _matrix[4]) +#define CD_TRANSFORM_Y(_x, _y, _matrix) (_x*_matrix[1] + _y*_matrix[3] + _matrix[5]) + +void cdfMatrixTransformPoint(double* matrix, double x, double y, double *rx, double *ry) +{ + *rx = CD_TRANSFORM_X(x, y, matrix); + *ry = CD_TRANSFORM_Y(x, y, matrix); +} + +void cdMatrixTransformPoint(double* matrix, int x, int y, int *rx, int *ry) +{ + double t; + t = CD_TRANSFORM_X(x, y, matrix); *rx = _cdRound(t); + t = CD_TRANSFORM_Y(x, y, matrix); *ry = _cdRound(t); +} + +void cdCanvasTransformPoint(cdCanvas* canvas, int x, int y, int *tx, int *ty) +{ + double *matrix; + double t; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + matrix = canvas->matrix; + t = CD_TRANSFORM_X(x, y, matrix); *tx = _cdRound(t); + t = CD_TRANSFORM_Y(x, y, matrix); *ty = _cdRound(t); +} + +void cdfCanvasTransformPoint(cdCanvas* canvas, double x, double y, double *tx, double *ty) +{ + double *matrix; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + matrix = canvas->matrix; + *tx = CD_TRANSFORM_X(x, y, matrix); + *ty = CD_TRANSFORM_Y(x, y, matrix); +} + +void cdMatrixInverse(const double* matrix, double* inv_matrix) +{ + double det = matrix[0] * matrix[3] - matrix[1] * matrix[2]; + + if (fabs(det) < 0.00001) + { + inv_matrix[0] = 1; + inv_matrix[1] = 0; + inv_matrix[2] = 0; + inv_matrix[3] = 1; + inv_matrix[4] = 0; + inv_matrix[5] = 0; + return; + } + + inv_matrix[0] = matrix[3]/det; + inv_matrix[1] = -matrix[1]/det; + inv_matrix[2] = -matrix[2]/det; + inv_matrix[3] = matrix[0]/det; + inv_matrix[4] = -(matrix[4] * inv_matrix[0] + matrix[5] * inv_matrix[2]); + inv_matrix[5] = -(matrix[4] * inv_matrix[1] + matrix[5] * inv_matrix[3]); +} + +#define _cdIsIndentity(_matrix) (_matrix[0] == 1 && _matrix[1] == 0 && \ + _matrix[2] == 0 && _matrix[3] == 1 && \ + _matrix[4] == 0 && _matrix[5] == 0) + +double* cdCanvasGetTransform(cdCanvas* canvas) +{ + static double matrix[6]; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return NULL; + + memcpy(matrix, canvas->matrix, sizeof(double)*6); + return matrix; +} + +void cdCanvasTransform(cdCanvas* canvas, const double* matrix) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (!matrix || _cdIsIndentity(matrix)) + { + canvas->use_matrix = 0; + memset(canvas->matrix, 0, sizeof(double)*6); + canvas->matrix[0] = 1; /* reset to identity */ + canvas->matrix[3] = 1; + + if (canvas->cxTransform) + canvas->cxTransform(canvas->ctxcanvas, NULL); + + return; + } + + if (canvas->cxTransform) + canvas->cxTransform(canvas->ctxcanvas, matrix); + + memcpy(canvas->matrix, matrix, sizeof(double)*6); + canvas->use_matrix = 1; +} + +/* mul_matrix = matrix * mul_matrix (left multiply) */ +void cdMatrixMultiply(const double* matrix, double* mul_matrix) +{ + double tmp_matrix[6]; + tmp_matrix[0] = matrix[0] * mul_matrix[0] + matrix[1] * mul_matrix[2]; + tmp_matrix[1] = matrix[0] * mul_matrix[1] + matrix[1] * mul_matrix[3]; + tmp_matrix[2] = matrix[2] * mul_matrix[0] + matrix[3] * mul_matrix[2]; + tmp_matrix[3] = matrix[2] * mul_matrix[1] + matrix[3] * mul_matrix[3]; + tmp_matrix[4] = matrix[4] * mul_matrix[0] + matrix[5] * mul_matrix[2] + mul_matrix[4]; + tmp_matrix[5] = matrix[4] * mul_matrix[1] + matrix[5] * mul_matrix[3] + mul_matrix[5]; + + memcpy(mul_matrix, tmp_matrix, sizeof(double)*6); +} + +void cdCanvasTransformMultiply(cdCanvas* canvas, const double* matrix) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + cdMatrixMultiply(matrix, canvas->matrix); + + if (_cdIsIndentity(canvas->matrix)) + canvas->use_matrix = 0; + else + canvas->use_matrix = 1; + + if (canvas->cxTransform) + canvas->cxTransform(canvas->ctxcanvas, canvas->use_matrix? canvas->matrix: NULL); +} + +void cdCanvasTransformRotate(cdCanvas* canvas, double angle) +{ + double tmp_matrix[4]; + double* matrix, cos_ang, sin_ang; + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + matrix = canvas->matrix; + + cos_ang = cos(angle * CD_DEG2RAD); + sin_ang = sin(angle * CD_DEG2RAD); + + tmp_matrix[0] = cos_ang * matrix[0] + sin_ang * matrix[2]; + tmp_matrix[1] = cos_ang * matrix[1] + sin_ang * matrix[3]; + tmp_matrix[2] = -sin_ang * matrix[0] + cos_ang * matrix[2]; + tmp_matrix[3] = -sin_ang * matrix[1] + cos_ang * matrix[3]; + + matrix[0] = tmp_matrix[0]; + matrix[1] = tmp_matrix[1]; + matrix[2] = tmp_matrix[2]; + matrix[3] = tmp_matrix[3]; + + if (_cdIsIndentity(matrix)) + canvas->use_matrix = 0; + else + canvas->use_matrix = 1; + + if (canvas->cxTransform) + canvas->cxTransform(canvas->ctxcanvas, canvas->use_matrix? matrix: NULL); +} + +void cdCanvasTransformScale(cdCanvas* canvas, double sx, double sy) +{ + double* matrix; + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + matrix = canvas->matrix; + + matrix[0] = sx * matrix[0]; + matrix[1] = sx * matrix[1]; + matrix[2] = sy * matrix[2]; + matrix[3] = sy * matrix[3]; + + if (_cdIsIndentity(matrix)) + canvas->use_matrix = 0; + else + canvas->use_matrix = 1; + + if (canvas->cxTransform) + canvas->cxTransform(canvas->ctxcanvas, canvas->use_matrix? matrix: NULL); +} + +void cdCanvasTransformTranslate(cdCanvas* canvas, double dx, double dy) +{ + double* matrix; + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + matrix = canvas->matrix; + + matrix[4] = dx * matrix[0] + dy * matrix[2] + matrix[4]; + matrix[5] = dx * matrix[1] + dy * matrix[3] + matrix[5]; + + if (_cdIsIndentity(matrix)) + canvas->use_matrix = 0; + else + canvas->use_matrix = 1; + + if (canvas->cxTransform) + canvas->cxTransform(canvas->ctxcanvas, canvas->use_matrix? matrix: NULL); +} + +int cdCanvasBackOpacity(cdCanvas* canvas, int opacity) +{ + int back_opacity; + + assert(canvas); + assert(opacity==CD_QUERY || (opacity>=CD_OPAQUE && opacity<=CD_TRANSPARENT)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (opacityCD_TRANSPARENT) return CD_ERROR; + + back_opacity = canvas->back_opacity; + + if (opacity == CD_QUERY || opacity == back_opacity) + return back_opacity; + + if (canvas->cxBackOpacity) + canvas->back_opacity = canvas->cxBackOpacity(canvas->ctxcanvas, opacity); + else + canvas->back_opacity = opacity; + + return back_opacity; +} + +int cdCanvasWriteMode(cdCanvas* canvas, int mode) +{ + int write_mode; + + assert(canvas); + assert(mode==CD_QUERY || (mode>=CD_REPLACE && mode<=CD_NOT_XOR)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (modeCD_NOT_XOR) return CD_ERROR; + + write_mode = canvas->write_mode; + + if (mode == CD_QUERY || mode == write_mode) + return write_mode; + + if (canvas->cxWriteMode) + canvas->write_mode = canvas->cxWriteMode(canvas->ctxcanvas, mode); + else + canvas->write_mode = mode; + + return write_mode; +} + +int cdCanvasLineStyle(cdCanvas* canvas, int style) +{ + int line_style; + + assert(canvas); + assert(style==CD_QUERY || (style>=CD_CONTINUOUS && style<=CD_CUSTOM)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (styleCD_CUSTOM) return CD_ERROR; + + line_style = canvas->line_style; + + if (style == CD_QUERY || style == line_style) + return line_style; + + if (style == CD_CUSTOM && !canvas->line_dashes_count) + return line_style; + + if (canvas->cxLineStyle) + canvas->line_style = canvas->cxLineStyle(canvas->ctxcanvas, style); + else + canvas->line_style = style; + + return line_style; +} + +int cdCanvasLineJoin(cdCanvas* canvas, int join) +{ + int line_join; + + assert(canvas); + assert(join==CD_QUERY || (join>=CD_MITER && join<=CD_ROUND)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (joinCD_ROUND) return CD_ERROR; + + line_join = canvas->line_join; + + if (join == CD_QUERY || join == line_join) + return line_join; + + if (canvas->cxLineJoin) + canvas->line_join = canvas->cxLineJoin(canvas->ctxcanvas, join); + else + canvas->line_join = join; + + return line_join; +} + +int cdCanvasLineCap(cdCanvas* canvas, int cap) +{ + int line_cap; + + assert(canvas); + assert(cap==CD_QUERY || (cap>=CD_CAPFLAT && cap<=CD_CAPROUND)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (capCD_CAPROUND) return CD_ERROR; + + line_cap = canvas->line_cap; + + if (cap == CD_QUERY || cap == line_cap) + return line_cap; + + if (canvas->cxLineCap) + canvas->line_cap = canvas->cxLineCap(canvas->ctxcanvas, cap); + else + canvas->line_cap = cap; + + return line_cap; +} + +int cdCanvasRegionCombineMode(cdCanvas* canvas, int mode) +{ + int combine_mode; + + assert(canvas); + assert(mode==CD_QUERY || (mode>=CD_UNION && mode<=CD_NOTINTERSECT)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (modeCD_NOTINTERSECT) return CD_ERROR; + + combine_mode = canvas->combine_mode; + + if (mode == CD_QUERY || mode == combine_mode) + return combine_mode; + + canvas->combine_mode = mode; + + return combine_mode; +} + +void cdCanvasLineStyleDashes(cdCanvas* canvas, const int* dashes, int count) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (canvas->line_dashes) + { + free(canvas->line_dashes); + canvas->line_dashes = NULL; + } + + if (dashes) + { + canvas->line_dashes = malloc(count*sizeof(int)); + canvas->line_dashes_count = count; + memcpy(canvas->line_dashes, dashes, count*sizeof(int)); + } +} + +int cdCanvasLineWidth(cdCanvas* canvas, int width) +{ + int line_width; + + assert(canvas); + assert(width==CD_QUERY || width>0); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (width!=CD_QUERY && width<=0) return CD_ERROR; + + line_width = canvas->line_width; + + if (width == CD_QUERY || width == line_width) + return line_width; + + if (canvas->cxLineWidth) + canvas->line_width = canvas->cxLineWidth(canvas->ctxcanvas, width); + else + canvas->line_width = width; + + return line_width; +} + +int cdCanvasFillMode(cdCanvas* canvas, int mode) +{ + int fill_mode; + + assert(canvas); + assert(mode==CD_QUERY || (mode>=CD_EVENODD && mode<=CD_WINDING)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (modeCD_WINDING) return CD_ERROR; + + fill_mode = canvas->fill_mode; + + if (mode == CD_QUERY || mode == fill_mode) + return fill_mode; + + canvas->fill_mode = mode; + + return fill_mode; +} + +int cdCanvasInteriorStyle (cdCanvas* canvas, int style) +{ + int interior_style; + + assert(canvas); + assert(style==CD_QUERY || (style>=CD_SOLID && style<=CD_HOLLOW)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (styleCD_HOLLOW) return CD_ERROR; + + interior_style = canvas->interior_style; + + if ( style == CD_QUERY || style == interior_style) + return interior_style; + + if ((style == CD_PATTERN && !canvas->pattern_size) || + (style == CD_STIPPLE && !canvas->stipple_size)) + return interior_style; + + if (style == CD_HOLLOW) + { + canvas->interior_style = CD_HOLLOW; + return interior_style; + } + + if (canvas->cxInteriorStyle) + canvas->interior_style = canvas->cxInteriorStyle(canvas->ctxcanvas, style); + else + canvas->interior_style = style; + + return interior_style; +} + +int cdCanvasHatch(cdCanvas* canvas, int style) +{ + int hatch_style; + + assert(canvas); + assert(style==CD_QUERY || (style>=CD_HORIZONTAL && style<=CD_DIAGCROSS)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (styleCD_DIAGCROSS) return CD_ERROR; + + hatch_style = canvas->hatch_style; + + if (style == CD_QUERY) + return hatch_style; + + if (canvas->cxHatch) + canvas->hatch_style = canvas->cxHatch(canvas->ctxcanvas, style); + else + canvas->hatch_style = style; + + canvas->interior_style = CD_HATCH; + + return hatch_style; +} + +void cdCanvasStipple(cdCanvas* canvas, int w, int h, const unsigned char *stipple) +{ + assert(canvas); + assert(stipple); + assert(w>0); + assert(h>0); + if (!_cdCheckCanvas(canvas)) return; + if (w <= 0 || h <= 0 || !stipple) + return; + + if (canvas->cxStipple) + canvas->cxStipple(canvas->ctxcanvas, w, h, stipple); + + if (w*h > canvas->stipple_size) /* realoca array dos pontos */ + { + int newsize = w*h; + canvas->stipple = (unsigned char*)realloc(canvas->stipple, newsize); + canvas->stipple_size = newsize; + + if (!canvas->stipple) + { + canvas->stipple_size = 0; + return; + } + } + + memcpy(canvas->stipple, stipple, w*h); + + canvas->interior_style = CD_STIPPLE; + canvas->stipple_w = w; + canvas->stipple_h = h; +} + +unsigned char* cdCanvasGetStipple(cdCanvas* canvas, int* w, int* h) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return NULL; + + if (!canvas->stipple_size) + return NULL; + + if (w) *w = canvas->stipple_w; + if (h) *h = canvas->stipple_h; + + return canvas->stipple; +} + +void cdCanvasPattern(cdCanvas* canvas, int w, int h, const long *pattern) +{ + assert(canvas); + assert(pattern); + assert(w>0); + assert(h>0); + if (!_cdCheckCanvas(canvas)) return; + if (w <= 0 || h <= 0 || !pattern) + return; + + if (canvas->cxPattern) + canvas->cxPattern(canvas->ctxcanvas, w, h, pattern); + + if (w*h > canvas->pattern_size) /* realoca array dos pontos */ + { + int newsize = w*h; + + if (canvas->pattern) free(canvas->pattern); + canvas->pattern = (long*)malloc(newsize*sizeof(long)); + canvas->pattern_size = newsize; + + if (!canvas->pattern) + { + canvas->pattern_size = 0; + return; + } + } + + memcpy(canvas->pattern, pattern, w*h*sizeof(long)); + + canvas->interior_style = CD_PATTERN; + canvas->pattern_w = w; + canvas->pattern_h = h; +} + +long * cdCanvasGetPattern(cdCanvas* canvas, int* w, int* h) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return NULL; + + if (!canvas->pattern_size) + return NULL; + + if (w) *w = canvas->pattern_w; + if (h) *h = canvas->pattern_h; + + return canvas->pattern; +} + +int cdCanvasMarkType(cdCanvas* canvas, int type) +{ + int mark_type; + + assert(canvas); + assert(type==CD_QUERY || (type>=CD_PLUS && type<=CD_HOLLOW_DIAMOND)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (typeCD_HOLLOW_DIAMOND) return CD_ERROR; + + mark_type = canvas->mark_type; + + if (type == CD_QUERY || type == mark_type) + return mark_type; + + canvas->mark_type = type; + + return mark_type; +} + +int cdCanvasMarkSize(cdCanvas* canvas, int size) +{ + int mark_size; + + assert(canvas); + assert(size == CD_QUERY || size>0); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (size != CD_QUERY && size<=0) return CD_ERROR; + + mark_size = canvas->mark_size; + + if (size == CD_QUERY || size == mark_size) + return mark_size; + + canvas->mark_size = size; + + return mark_size; +} + +long cdCanvasBackground(cdCanvas* canvas, long color) +{ + long background; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + background = canvas->background; + + if (color == CD_QUERY || color == background) + return background; + + if (canvas->cxBackground) + canvas->background = canvas->cxBackground(canvas->ctxcanvas, color); + else + canvas->background = color; + + return background; +} + +long cdCanvasForeground(cdCanvas* canvas, long color) +{ + long foreground; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + foreground = canvas->foreground; + + if (color == CD_QUERY || color == foreground) + return foreground; + + if (canvas->cxForeground) + canvas->foreground = canvas->cxForeground(canvas->ctxcanvas, color); + else + canvas->foreground = color; + + return foreground; +} + +void cdCanvasSetBackground(cdCanvas* canvas, long color) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (color == canvas->background) + return; + + if (canvas->cxBackground) + canvas->background = canvas->cxBackground(canvas->ctxcanvas, color); + else + canvas->background = color; +} + +void cdCanvasSetForeground(cdCanvas* canvas, long color) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (color == canvas->foreground) + return; + + if (canvas->cxForeground) + canvas->foreground = canvas->cxForeground(canvas->ctxcanvas, color); + else + canvas->foreground = color; +} + +/****************/ +/* color coding */ +/****************/ + +long cdEncodeColor(unsigned char r, unsigned char g, unsigned char b) +{ + return (((unsigned long)r) << 16) | + (((unsigned long)g) << 8) | + (((unsigned long)b) << 0); +} + +void cdDecodeColor(long color, unsigned char *r, unsigned char *g, unsigned char *b) +{ + *r = cdRed(color); + *g = cdGreen(color); + *b = cdBlue(color); +} + +unsigned char cdDecodeAlpha(long color) +{ + unsigned char alpha = cdReserved(color); + return ~alpha; +} + +long cdEncodeAlpha(long color, unsigned char alpha) +{ + alpha = ~alpha; + return (((unsigned long)alpha) << 24) | (color & 0xFFFFFF); +} + +int cdCanvasGetColorPlanes(cdCanvas* canvas) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + return canvas->bpp; +} + +void cdCanvasPalette(cdCanvas* canvas, int n, const long *palette, int mode) +{ + assert(canvas); + assert(n>0); + assert(palette); + assert(mode>=CD_POLITE && mode<=CD_FORCE); + if (!_cdCheckCanvas(canvas)) return; + if (!palette) return; + if (n <= 0 || canvas->bpp > 8) + return; + + if (canvas->cxPalette) + canvas->cxPalette(canvas->ctxcanvas, n, palette, mode); +} + diff --git a/cd/src/cd_bitmap.c b/cd/src/cd_bitmap.c new file mode 100755 index 0000000..234668c --- /dev/null +++ b/cd/src/cd_bitmap.c @@ -0,0 +1,293 @@ +/** \file + * \brief cdBitmap implementation + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include +#include +#include + + +#include "cd.h" +#include "cdirgb.h" + +#include "cd_private.h" + + +typedef struct _cdBitmapData +{ + void *buffer; + + unsigned char *index; /* pointers into buffer */ + unsigned char *r; + unsigned char *g; + unsigned char *b; + unsigned char *a; + + long* colors; + + int xmin, xmax, ymin, ymax; +} cdBitmapData; + + +cdBitmap* cdCreateBitmap(int w, int h, int type) +{ + int num_channel; + int size = w * h; + cdBitmap* bitmap; + cdBitmapData* data; + + assert(w>0); + assert(h>0); + if (w <= 0) return NULL; + if (h <= 0) return NULL; + + switch (type) + { + case CD_RGB: + num_channel = 3; + break; + case CD_RGBA: + num_channel = 4; + break; + case CD_MAP: + num_channel = 1; + break; + default: + return NULL; + } + + bitmap = (cdBitmap*)malloc(sizeof(cdBitmap)); + data = (cdBitmapData*)malloc(sizeof(cdBitmapData)); + memset(data, 0, sizeof(cdBitmapData)); + + bitmap->w = w; + bitmap->h = h; + bitmap->type = type; + bitmap->data = data; + + data->buffer = malloc(size*num_channel); + if (!data->buffer) + { + free(data); + free(bitmap); + return NULL; + } + + if (type == CD_RGB) + { + data->r = data->buffer; + data->g = data->r + size; + data->b = data->g + size; + memset(data->r, 255, 3*size); /* white */ + } + + if (type == CD_RGBA) + { + data->a = data->b + size; + memset(data->a, 0, size); /* transparent */ + } + + if (type == CD_MAP) + { + data->index = data->buffer; + data->colors = (long*)calloc(256, sizeof(long)); + memset(data->index, 0, size); /* index=0 */ + } + + data->xmin = 0; + data->ymin = 0; + data->xmax = bitmap->w-1; + data->ymax = bitmap->h-1; + + return bitmap; +} + +cdBitmap* cdInitBitmap(int w, int h, int type, ...) +{ + va_list arglist; + cdBitmap* bitmap; + cdBitmapData* data; + + assert(w>0); + assert(h>0); + if (w <= 0) return NULL; + if (h <= 0) return NULL; + + if (type != CD_RGB && + type != CD_RGBA && + type != CD_MAP) + return NULL; + + bitmap = (cdBitmap*)malloc(sizeof(cdBitmap)); + data = (cdBitmapData*)malloc(sizeof(cdBitmapData)); + memset(data, 0, sizeof(cdBitmapData)); + + bitmap->w = w; + bitmap->h = h; + bitmap->type = type; + bitmap->data = data; + + va_start(arglist, type); + + if (type == CD_RGB) + { + data->r = va_arg(arglist, unsigned char*); + data->g = va_arg(arglist, unsigned char*); + data->b = va_arg(arglist, unsigned char*); + } + + if (type == CD_RGBA) + data->a = va_arg(arglist, unsigned char*); + + if (type == CD_MAP) + { + data->index = va_arg(arglist, unsigned char*); + data->colors = va_arg(arglist, long*); + } + + data->xmin = 0; + data->ymin = 0; + data->xmax = bitmap->w-1; + data->ymax = bitmap->h-1; + + return bitmap; +} + +void cdKillBitmap(cdBitmap* bitmap) +{ + cdBitmapData* data; + + assert(bitmap); + assert(bitmap->data); + if (!bitmap) return; + if (!bitmap->data) return; + + data = (cdBitmapData*)bitmap->data; + + if (data->buffer) + { + free(data->buffer); + + if (bitmap->type == CD_MAP) + free(data->colors); + } + + free(data); + free(bitmap); +} + +void cdCanvasGetBitmap(cdCanvas* canvas, cdBitmap* bitmap, int x, int y) +{ + cdBitmapData* data; + + assert(bitmap); + assert(bitmap->data); + if (!bitmap) return; + if (!bitmap->data) return; + + data = (cdBitmapData*)bitmap->data; + + if (bitmap->type == CD_RGB || bitmap->type == CD_RGBA) + cdCanvasGetImageRGB(canvas, data->r, data->g, data->b, x, y, bitmap->w, bitmap->h); +} + +void cdBitmapRGB2Map(cdBitmap* bitmap_rgb, cdBitmap* bitmap_map) +{ + cdBitmapData* data_rgb; + cdBitmapData* data_map; + + assert(bitmap_rgb); + assert(bitmap_rgb->data); + assert(bitmap_map); + assert(bitmap_map->data); + if (!bitmap_rgb) return; + if (!bitmap_rgb->data) return; + if (!bitmap_map) return; + if (!bitmap_map->data) return; + + data_rgb = (cdBitmapData*)bitmap_rgb->data; + data_map = (cdBitmapData*)bitmap_map->data; + + if ((bitmap_rgb->type != CD_RGB && bitmap_rgb->type != CD_RGBA) || (bitmap_map->type != CD_MAP)) + return; + + cdRGB2Map(bitmap_rgb->w, bitmap_rgb->h, data_rgb->r, data_rgb->g, data_rgb->b, data_map->index, bitmap_map->type, data_map->colors); +} + +unsigned char* cdBitmapGetData(cdBitmap* bitmap, int dataptr) +{ + cdBitmapData* data; + + assert(bitmap); + assert(bitmap->data); + if (!bitmap) return NULL; + if (!bitmap->data) return NULL; + + data = (cdBitmapData*)bitmap->data; + + switch(dataptr) + { + case CD_IRED: + return data->r; + case CD_IGREEN: + return data->g; + case CD_IBLUE: + return data->b; + case CD_IALPHA: + return data->a; + case CD_INDEX: + return data->index; + case CD_COLORS: + return (unsigned char*)data->colors; + } + + return NULL; +} + +void cdBitmapSetRect(cdBitmap* bitmap, int xmin, int xmax, int ymin, int ymax) +{ + cdBitmapData* data; + + assert(bitmap); + assert(bitmap->data); + if (!bitmap) return; + if (!bitmap->data) return; + + data = (cdBitmapData*)bitmap->data; + + data->xmin = xmin; + data->xmax = xmax; + data->ymin = ymin; + data->ymax = ymax; +} + +void cdCanvasPutBitmap(cdCanvas* canvas, cdBitmap* bitmap, int x, int y, int w, int h) +{ + cdBitmapData* data; + + assert(bitmap); + assert(bitmap->data); + if (!bitmap) return; + if (!bitmap->data) return; + + data = (cdBitmapData*)bitmap->data; + + switch(bitmap->type) + { + case CD_RGB: + cdCanvasPutImageRectRGB(canvas, bitmap->w, bitmap->h, data->r, data->g, data->b, x, y, w, h, data->xmin, data->xmax, data->ymin, data->ymax); + break; + case CD_RGBA: + cdCanvasPutImageRectRGBA(canvas, bitmap->w, bitmap->h, data->r, data->g, data->b, data->a, x, y, w, h, data->xmin, data->xmax, data->ymin, data->ymax); + break; + case CD_MAP: + cdCanvasPutImageRectMap(canvas, bitmap->w, bitmap->h, data->index, data->colors, x, y, w, h, data->xmin, data->xmax, data->ymin, data->ymax); + break; + } +} diff --git a/cd/src/cd_image.c b/cd/src/cd_image.c new file mode 100755 index 0000000..002d288 --- /dev/null +++ b/cd/src/cd_image.c @@ -0,0 +1,441 @@ +/** \file + * \brief External API - Images + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include +#include + + +#include "cd.h" +#include "cd_private.h" + + +void cdCanvasGetImageRGB(cdCanvas* canvas, unsigned char *r, unsigned char *g, unsigned char *b, int x, int y, int w, int h) +{ + assert(canvas); + assert(r); + assert(g); + assert(b); + assert(w>0); + assert(h>0); + if (!_cdCheckCanvas(canvas)) return; + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + if (canvas->cxGetImageRGB) + canvas->cxGetImageRGB(canvas->ctxcanvas, r, g, b, x, y, w, h); +} + +void cdRGB2Gray(int width, int height, const unsigned char* red, const unsigned char* green, const unsigned char* blue, unsigned char* index, long *color) +{ + int c, i, count; + for (c = 0; c < 256; c++) + color[c] = cdEncodeColor((unsigned char)c, (unsigned char)c, (unsigned char)c); + + count = width*height; + for (i=0; i0); + assert(ih>0); + assert(r); + assert(g); + assert(b); + if (!_cdCheckCanvas(canvas)) return; + + if (w == 0) w = iw; + if (h == 0) h = ih; + if (xmax == 0) xmax = iw - 1; + if (ymax == 0) ymax = ih - 1; + + if (!cdCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + cdNormalizeLimits(iw, ih, &xmin, &xmax, &ymin, &ymax); + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + if (canvas->bpp <= 8) + { + int height = ymax-ymin+1; + unsigned char* map = (unsigned char*)malloc(iw * height); + int pal_size = 1L << canvas->bpp; + long colors[256]; + + if (!map) + return; + + if (pal_size == 2) /* probably a laser printer, use a gray image for better results */ + cdRGB2Gray(iw, height, r+ymin*iw, g+ymin*iw, b+ymin*iw, map, colors); + else + cdRGB2Map(iw, height, r+ymin*iw, g+ymin*iw, b+ymin*iw, map, pal_size, colors); + + canvas->cxPutImageRectMap(canvas->ctxcanvas, iw, height, map, colors, x, y, w, h, xmin, xmax, 0, height-1); + + free(map); + } + else + canvas->cxPutImageRectRGB(canvas->ctxcanvas, iw, ih, r, g, b, x, y, w, h, xmin, xmax, ymin, ymax); +} + +void cdCanvasPutImageRectRGBA(cdCanvas* canvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + assert(canvas); + assert(iw>0); + assert(ih>0); + assert(r); + assert(g); + assert(b); + if (!_cdCheckCanvas(canvas)) return; + + if (w == 0) w = iw; + if (h == 0) h = ih; + if (xmax == 0) xmax = iw - 1; + if (ymax == 0) ymax = ih - 1; + + if (!cdCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + cdNormalizeLimits(iw, ih, &xmin, &xmax, &ymin, &ymax); + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + if (!canvas->cxPutImageRectRGBA) + { + if (canvas->cxGetImageRGB) + cdSimPutImageRectRGBA(canvas, iw, ih, r, g, b, a, x, y, w, h, xmin, xmax, ymin, ymax); + else + canvas->cxPutImageRectRGB(canvas->ctxcanvas, iw, ih, r, g, b, x, y, w, h, xmin, xmax, ymin, ymax); + } + else + canvas->cxPutImageRectRGBA(canvas->ctxcanvas, iw, ih, r, g, b, a, x, y, w, h, xmin, xmax, ymin, ymax); +} + +static long* cd_getgraycolormap(void) +{ + static long color_map[256] = {1}; + + if (color_map[0]) + { + int c; + for (c = 0; c < 256; c++) + color_map[c] = cdEncodeColor((unsigned char)c, (unsigned char)c, (unsigned char)c); + } + + return color_map; +} + +void cdCanvasPutImageRectMap(cdCanvas* canvas, int iw, int ih, const unsigned char *index, const long *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + assert(canvas); + assert(index); + assert(iw>0); + assert(ih>0); + if (!_cdCheckCanvas(canvas)) return; + + if (w == 0) w = iw; + if (h == 0) h = ih; + if (xmax == 0) xmax = iw - 1; + if (ymax == 0) ymax = ih - 1; + + if (!cdCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + cdNormalizeLimits(iw, ih, &xmin, &xmax, &ymin, &ymax); + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + if (colors == NULL) + colors = cd_getgraycolormap(); + + canvas->cxPutImageRectMap(canvas->ctxcanvas, iw, ih, index, colors, x, y, w, h, xmin, xmax, ymin, ymax); +} + +cdImage* cdCanvasCreateImage(cdCanvas* canvas, int w, int h) +{ + cdImage *image; + cdCtxImage *ctximage; + + assert(canvas); + assert(w>0); + assert(h>0); + if (!_cdCheckCanvas(canvas)) return NULL; + if (w <= 0) return NULL; + if (h <= 0) return NULL; + if (!canvas->cxCreateImage) return NULL; + + ctximage = canvas->cxCreateImage(canvas->ctxcanvas, w, h); + if (!ctximage) + return NULL; + + image = (cdImage*)malloc(sizeof(cdImage)); + + image->cxGetImage = canvas->cxGetImage; + image->cxPutImageRect = canvas->cxPutImageRect; + image->cxKillImage = canvas->cxKillImage; + image->w = w; + image->h = h; + image->ctximage = ctximage; + + return image; +} + +void cdCanvasGetImage(cdCanvas* canvas, cdImage* image, int x, int y) +{ + assert(canvas); + assert(image); + if (!_cdCheckCanvas(canvas)) return; + if (!image) return; + if (image->cxGetImage != canvas->cxGetImage) return; + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + canvas->cxGetImage(canvas->ctxcanvas, image->ctximage, x, y); +} + +void cdCanvasPutImageRect(cdCanvas* canvas, cdImage* image, int x, int y, int xmin, int xmax, int ymin, int ymax) +{ + assert(canvas); + assert(image); + if (!_cdCheckCanvas(canvas)) return; + if (!image) return; + if (image->cxPutImageRect != canvas->cxPutImageRect) return; + + if (xmax == 0) xmax = image->w - 1; + if (ymax == 0) ymax = image->h - 1; + + if (!cdCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + cdNormalizeLimits(image->w, image->h, &xmin, &xmax, &ymin, &ymax); + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + canvas->cxPutImageRect(canvas->ctxcanvas, image->ctximage, x, y, xmin, xmax, ymin, ymax); +} + +void cdKillImage(cdImage* image) +{ + assert(image); + if (!image) return; + + image->cxKillImage(image->ctximage); + memset(image, 0, sizeof(cdImage)); + free(image); +} + +void cdCanvasScrollArea(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, int dx, int dy) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + if (!canvas->cxScrollArea) return; + + if (!cdCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + if (dx == 0 && dy == 0) + return; + + if (canvas->use_origin) + { + xmin += canvas->origin.x; + xmax += canvas->origin.x; + ymin += canvas->origin.y; + ymax += canvas->origin.y; + } + + if (canvas->invert_yaxis) + { + dy = -dy; + ymin = _cdInvertYAxis(canvas, ymin); + ymax = _cdInvertYAxis(canvas, ymax); + _cdSwapInt(ymin, ymax); + } + + canvas->cxScrollArea(canvas->ctxcanvas, xmin, xmax, ymin, ymax, dx, dy); +} + +unsigned char cdZeroOrderInterpolation(int width, int height, const unsigned char *map, float xl, float yl) +{ + int x0 = (int)(xl-0.5f); + int y0 = (int)(yl-0.5f); + x0 = x0<0? 0: x0>width-1? width-1: x0; + y0 = y0<0? 0: y0>height-1? height-1: y0; + return map[y0*width + x0]; +} + +unsigned char cdBilinearInterpolation(int width, int height, const unsigned char *map, float xl, float yl) +{ + unsigned char fll, fhl, flh, fhh; + int x0, y0, x1, y1; + float t, u; + + if (xl < 0.5) + { + x1 = x0 = 0; + t = 0; + } + else if (xl > width-0.5) + { + x1 = x0 = width-1; + t = 0; + } + else + { + x0 = (int)(xl-0.5f); + x1 = x0+1; + t = xl - (x0+0.5f); + } + + if (yl < 0.5) + { + y1 = y0 = 0; + u = 0; + } + else if (yl > height-0.5) + { + y1 = y0 = height-1; + u = 0; + } + else + { + y0 = (int)(yl-0.5f); + y1 = y0+1; + u = yl - (y0+0.5f); + } + + fll = map[y0*width + x0]; + fhl = map[y0*width + x1]; + flh = map[y1*width + x0]; + fhh = map[y1*width + x1]; + + return (unsigned char)((fhh - flh - fhl + fll) * u * t + + (fhl - fll) * t + + (flh - fll) * u + + fll); +} + +void cdImageRGBInitInverseTransform(int w, int h, int xmin, int xmax, int ymin, int ymax, float *xfactor, float *yfactor, const double* matrix, double* inv_matrix) +{ + *xfactor = (float)(xmax-xmin)/(float)(w-1); + *yfactor = (float)(ymax-ymin)/(float)(h-1); + cdMatrixInverse(matrix, inv_matrix); +} + +void cdImageRGBInverseTransform(int t_x, int t_y, float *i_x, float *i_y, float xfactor, float yfactor, int xmin, int ymin, int x, int y, double *inv_matrix) +{ + double rx, ry; + cdfMatrixTransformPoint(inv_matrix, t_x, t_y, &rx, &ry); + *i_x = xfactor*((float)rx - x) + xmin; + *i_y = yfactor*((float)ry - y) + ymin; +} + +void cdImageRGBCalcDstLimits(cdCanvas* canvas, int x, int y, int w, int h, int *xmin, int *xmax, int *ymin, int *ymax, int* rect) +{ + int t_xmin, t_xmax, t_ymin, t_ymax, + t_x, t_y, t_w, t_h; + + /* calculate the bounding box of the transformed rectangle */ + cdMatrixTransformPoint(canvas->matrix, x, y, &t_x, &t_y); + if (rect) { rect[0] = t_x; rect[1] = t_y; } + t_xmax = t_xmin = t_x; t_ymax = t_ymin = t_y; + cdMatrixTransformPoint(canvas->matrix, x+w-1, y, &t_x, &t_y); + if (rect) { rect[2] = t_x; rect[3] = t_y; } + if (t_x > t_xmax) t_xmax = t_x; + if (t_x < t_xmin) t_xmin = t_x; + if (t_y > t_ymax) t_ymax = t_y; + if (t_y < t_ymin) t_ymin = t_y; + cdMatrixTransformPoint(canvas->matrix, x+w-1, y+h-1, &t_x, &t_y); + if (rect) { rect[4] = t_x; rect[5] = t_y; } + if (t_x > t_xmax) t_xmax = t_x; + if (t_x < t_xmin) t_xmin = t_x; + if (t_y > t_ymax) t_ymax = t_y; + if (t_y < t_ymin) t_ymin = t_y; + cdMatrixTransformPoint(canvas->matrix, x, y+h-1, &t_x, &t_y); + if (rect) { rect[6] = t_x; rect[7] = t_y; } + if (t_x > t_xmax) t_xmax = t_x; + if (t_x < t_xmin) t_xmin = t_x; + if (t_y > t_ymax) t_ymax = t_y; + if (t_y < t_ymin) t_ymin = t_y; + + t_x = t_xmin; + t_y = t_ymin; + t_w = t_xmax-t_xmin+1; + t_h = t_ymax-t_ymin+1; + + /* check if inside the canvas */ + if (t_x > (canvas->w-1) || t_y > (canvas->h-1) || + (t_x+t_w) < 0 || (t_y+t_h) < 0) + return; + + /* fit to canvas area */ + if (t_x < 0) t_x = 0; + if (t_y < 0) t_y = 0; + if ((t_x+t_w) > (canvas->w-1)) t_w = (canvas->w-1)-t_x; + if ((t_y+t_h) > (canvas->h-1)) t_h = (canvas->h-1)-t_y; + + /* define the destiny limits */ + *xmin = t_x; + *ymin = t_y; + *xmax = t_x+t_w-1; + *ymax = t_y+t_h-1; +} diff --git a/cd/src/cd_primitives.c b/cd/src/cd_primitives.c new file mode 100755 index 0000000..b1a19ba --- /dev/null +++ b/cd/src/cd_primitives.c @@ -0,0 +1,702 @@ +/** \file + * \brief External API - Primitives + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include +#include +#include + + +#include "cd.h" +#include "cd_private.h" + +#define _CD_POLY_BLOCK 100 + +void cdCanvasPixel(cdCanvas* canvas, int x, int y, long color) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + canvas->cxPixel(canvas->ctxcanvas, x, y, color); +} + +void cdCanvasMark(cdCanvas* canvas, int x, int y) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (canvas->mark_size == 1) + { + cdCanvasPixel(canvas, x, y, canvas->foreground); + return; + } + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + cdSimMark(canvas, x, y); +} + +void cdCanvasLine(cdCanvas* canvas, int x1, int y1, int x2, int y2) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (x1 == x2 && y1 == y2) + { + cdCanvasPixel(canvas, x1, y1, canvas->foreground); + return; + } + + if (canvas->use_origin) + { + x1 += canvas->origin.x; + y1 += canvas->origin.y; + x2 += canvas->origin.x; + y2 += canvas->origin.y; + } + + if (canvas->invert_yaxis) + { + y1 = _cdInvertYAxis(canvas, y1); + y2 = _cdInvertYAxis(canvas, y2); + } + + canvas->cxLine(canvas->ctxcanvas, x1, y1, x2, y2); +} + +void cdfCanvasLine(cdCanvas* canvas, double x1, double y1, double x2, double y2) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (x1 == x2 && y1 == y2) + { + cdCanvasPixel(canvas, _cdRound(x1), _cdRound(y1), canvas->foreground); + return; + } + + if (canvas->use_origin) + { + x1 += canvas->forigin.x; + y1 += canvas->forigin.y; + x2 += canvas->forigin.x; + y2 += canvas->forigin.y; + } + + if (canvas->invert_yaxis) + { + y1 = _cdInvertYAxis(canvas, y1); + y2 = _cdInvertYAxis(canvas, y2); + } + + if (canvas->cxFLine) + canvas->cxFLine(canvas->ctxcanvas, x1, y1, x2, y2); + else + canvas->cxLine(canvas->ctxcanvas, _cdRound(x1), _cdRound(y1), _cdRound(x2), _cdRound(y2)); +} + +void cdCanvasBegin(cdCanvas* canvas, int mode) +{ + assert(canvas); + assert(mode>=CD_FILL); + if (!_cdCheckCanvas(canvas)) return; + + if (mode == CD_REGION) + { + if (!canvas->cxNewRegion) return; + + canvas->new_region = 1; + canvas->poly_n = 0; + canvas->cxNewRegion(canvas->ctxcanvas); + return; + } + + canvas->sim_poly = 0; + + if (canvas->interior_style == CD_HOLLOW && mode == CD_FILL) + mode = CD_CLOSED_LINES; + + /* simulacao de linhas */ + if ((mode == CD_CLOSED_LINES || mode == CD_OPEN_LINES || mode == CD_BEZIER) && + canvas->sim_mode & CD_SIM_POLYLINE) + canvas->sim_poly = 1; + + /* simulacao de poligonos preenchidos */ + if (mode == CD_FILL && canvas->sim_mode & CD_SIM_POLYGON) + canvas->sim_poly = 1; + + canvas->use_fpoly = -1; + canvas->poly_n = 0; + canvas->poly_mode = mode; +} + +void cdCanvasVertex(cdCanvas* canvas, int x, int y) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + if (canvas->use_fpoly == 1) return; /* integer vertex inside a real poligon */ + + if (!canvas->poly) + { + canvas->poly = (cdPoint*)malloc(sizeof(cdPoint)*(_CD_POLY_BLOCK+1)); /* always add 1 so we add another point at the end if necessary */ + canvas->poly_size = _CD_POLY_BLOCK; + } + + canvas->use_fpoly = 0; + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + if (canvas->poly_n == canvas->poly_size) + { + canvas->poly_size += _CD_POLY_BLOCK; + canvas->poly = (cdPoint*)realloc(canvas->poly, sizeof(cdPoint) * (canvas->poly_size+1)); + } + + if (canvas->poly_mode != CD_BEZIER && + canvas->poly_n > 0 && + canvas->poly[canvas->poly_n-1].x == x && + canvas->poly[canvas->poly_n-1].y == y) + return; /* avoid duplicate points, if not a bezier */ + + canvas->poly[canvas->poly_n].x = x; + canvas->poly[canvas->poly_n].y = y; + canvas->poly_n++; +} + +void cdfCanvasVertex(cdCanvas* canvas, double x, double y) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (!canvas->cxFPoly) + { + cdCanvasVertex(canvas, _cdRound(x), _cdRound(y)); + return; + } + + if (canvas->use_fpoly == 0) return; /* real vertex inside a integer poligon */ + + if (!canvas->fpoly) + { + canvas->fpoly = (cdfPoint*)malloc(sizeof(cdfPoint)*(_CD_POLY_BLOCK+1)); + canvas->fpoly_size = _CD_POLY_BLOCK; + } + + canvas->use_fpoly = 1; + + if (canvas->use_origin) + { + x += canvas->forigin.x; + y += canvas->forigin.y; + } + + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + if (canvas->poly_n == canvas->fpoly_size) + { + canvas->fpoly_size += _CD_POLY_BLOCK; + canvas->fpoly = (cdfPoint*)realloc(canvas->fpoly, sizeof(cdfPoint) * (canvas->fpoly_size+1)); + } + + canvas->fpoly[canvas->poly_n].x = x; + canvas->fpoly[canvas->poly_n].y = y; + canvas->poly_n++; +} + +void cdCanvasEnd(cdCanvas* canvas) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (canvas->new_region && canvas->poly_n == 0) + { + canvas->new_region = 0; + if (canvas->clip_mode == CD_CLIPREGION) cdCanvasClip(canvas, CD_CLIPREGION); + return; + } + + if (canvas->poly_mode==CD_OPEN_LINES && canvas->poly_n < 2) + { + canvas->poly_n = 0; + return; + } + + if (canvas->poly_mode==CD_BEZIER && (canvas->poly_n < 4 || ((canvas->poly_n-4)%3 != 0))) + { + canvas->poly_n = 0; + return; + } + + if ((canvas->poly_mode == CD_CLOSED_LINES || + canvas->poly_mode == CD_FILL || + canvas->poly_mode == CD_CLIP) && canvas->poly_n < 3) + { + canvas->poly_n = 0; + return; + } + + if (canvas->sim_poly) + cdpolySIM(canvas->ctxcanvas, canvas->poly_mode, canvas->poly, canvas->poly_n); + else + { + if (canvas->use_fpoly) + canvas->cxFPoly(canvas->ctxcanvas, canvas->poly_mode, canvas->fpoly, canvas->poly_n); + else + canvas->cxPoly(canvas->ctxcanvas, canvas->poly_mode, canvas->poly, canvas->poly_n); + } + + if (canvas->poly_mode == CD_CLIP) + { + canvas->clip_poly_n = canvas->poly_n; + + if (canvas->clip_fpoly) + { + free(canvas->clip_fpoly); + canvas->clip_fpoly = NULL; + } + + if (canvas->clip_poly) + { + free(canvas->clip_poly); + canvas->clip_poly = NULL; + } + + if (canvas->use_fpoly) + { + canvas->clip_fpoly = (cdfPoint*)malloc((canvas->poly_n+1) * sizeof(cdfPoint)); + memcpy(canvas->clip_fpoly, canvas->fpoly, canvas->poly_n * sizeof(cdfPoint)); + } + else + { + canvas->clip_poly = (cdPoint*)malloc((canvas->poly_n+1) * sizeof(cdPoint)); + memcpy(canvas->clip_poly, canvas->poly, canvas->poly_n * sizeof(cdPoint)); + } + } + + canvas->poly_n = 0; + canvas->use_fpoly = -1; +} + +void cdCanvasRect(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (!cdCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + if (canvas->use_origin) + { + xmin += canvas->origin.x; + xmax += canvas->origin.x; + ymin += canvas->origin.y; + ymax += canvas->origin.y; + } + + if (canvas->invert_yaxis) + { + ymin = _cdInvertYAxis(canvas, ymin); + ymax = _cdInvertYAxis(canvas, ymax); + _cdSwapInt(ymin, ymax); + } + + canvas->cxRect(canvas->ctxcanvas, xmin, xmax, ymin, ymax); +} + +void cdfCanvasRect(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (!cdfCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + if (canvas->use_origin) + { + xmin += canvas->origin.x; + xmax += canvas->origin.x; + ymin += canvas->origin.y; + ymax += canvas->origin.y; + } + + if (canvas->invert_yaxis) + { + ymin = _cdInvertYAxis(canvas, ymin); + ymax = _cdInvertYAxis(canvas, ymax); + _cdSwapDouble(ymin, ymax); + } + + if (canvas->cxFRect) + canvas->cxFRect(canvas->ctxcanvas, xmin, xmax, ymin, ymax); + else + canvas->cxRect(canvas->ctxcanvas, _cdRound(xmin), _cdRound(xmax), _cdRound(ymin), _cdRound(ymax)); +} + +void cdCanvasBox(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (canvas->interior_style == CD_HOLLOW) + { + cdCanvasRect(canvas, xmin, xmax, ymin, ymax); + return; + } + + if (!cdCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + if (canvas->use_origin) + { + xmin += canvas->origin.x; + xmax += canvas->origin.x; + ymin += canvas->origin.y; + ymax += canvas->origin.y; + } + + if (canvas->invert_yaxis) + { + ymin = _cdInvertYAxis(canvas, ymin); + ymax = _cdInvertYAxis(canvas, ymax); + _cdSwapInt(ymin, ymax); + } + + canvas->cxBox(canvas->ctxcanvas, xmin, xmax, ymin, ymax); +} + +void cdfCanvasBox(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (canvas->interior_style == CD_HOLLOW) + { + cdfCanvasRect(canvas, xmin, xmax, ymin, ymax); + return; + } + + if (!cdfCheckBoxSize(&xmin, &xmax, &ymin, &ymax)) + return; + + if (canvas->use_origin) + { + xmin += canvas->forigin.x; + xmax += canvas->forigin.x; + ymin += canvas->forigin.y; + ymax += canvas->forigin.y; + } + + if (canvas->invert_yaxis) + { + ymin = _cdInvertYAxis(canvas, ymin); + ymax = _cdInvertYAxis(canvas, ymax); + _cdSwapDouble(ymin, ymax); + } + + if (canvas->cxFBox) + canvas->cxFBox(canvas->ctxcanvas, xmin, xmax, ymin, ymax); + else + canvas->cxBox(canvas->ctxcanvas, _cdRound(xmin), _cdRound(xmax), _cdRound(ymin), _cdRound(ymax)); +} + +static void normAngles(double *angle1, double *angle2) +{ + *angle1 = fmod(*angle1,360); + *angle2 = fmod(*angle2,360); + if (*angle2 <= *angle1) *angle2 += 360; +} + +void cdCanvasArc(cdCanvas* canvas, int xc, int yc, int w, int h, double angle1, double angle2) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (angle1 == angle2 || w == 0 || h == 0) + return; + + normAngles(&angle1, &angle2); + + if (canvas->use_origin) + { + xc += canvas->origin.x; + yc += canvas->origin.y; + } + + if (canvas->invert_yaxis) + yc = _cdInvertYAxis(canvas, yc); + + canvas->cxArc(canvas->ctxcanvas, xc, yc, w, h, angle1, angle2); +} + +void cdfCanvasArc(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (angle1 == angle2 || w == 0 || h == 0) + return; + + normAngles(&angle1, &angle2); + + if (canvas->use_origin) + { + xc += canvas->forigin.x; + yc += canvas->forigin.y; + } + + if (canvas->invert_yaxis) + yc = _cdInvertYAxis(canvas, yc); + + + if (canvas->cxFArc) + canvas->cxFArc(canvas->ctxcanvas, xc, yc, w, h, angle1, angle2); + else + canvas->cxArc(canvas->ctxcanvas, _cdRound(xc), _cdRound(yc), _cdRound(w), _cdRound(h), angle1, angle2); +} + +void cdCanvasSector(cdCanvas* canvas, int xc, int yc, int w, int h, double angle1, double angle2) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (angle1 == angle2 || w == 0 || h == 0) + return; + + normAngles(&angle1, &angle2); + + if (canvas->interior_style == CD_HOLLOW) + { + cdCanvasArc(canvas, xc, yc, w, h, angle1, angle2); + + if (fabs(angle2-angle1) < 360) + { + int xi,yi,xf,yf; + + xi = xc + cdRound(w*cos(CD_DEG2RAD*angle1)/2.0); + yi = yc + cdRound(h*sin(CD_DEG2RAD*angle1)/2.0); + + xf = xc + cdRound(w*cos(CD_DEG2RAD*angle2)/2.0); + yf = yc + cdRound(h*sin(CD_DEG2RAD*angle2)/2.0); + + cdCanvasLine(canvas, xi, yi, xc, yc); + cdCanvasLine(canvas, xc, yc, xf, yf); + } + + return; + } + + if (canvas->use_origin) + { + xc += canvas->origin.x; + yc += canvas->origin.y; + } + + if (canvas->invert_yaxis) + yc = _cdInvertYAxis(canvas, yc); + + canvas->cxSector(canvas->ctxcanvas, xc, yc, w, h, angle1, angle2); +} + +void cdfCanvasSector(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (angle1 == angle2 || w == 0 || h == 0) + return; + + normAngles(&angle1, &angle2); + + if (canvas->interior_style == CD_HOLLOW) + { + cdfCanvasArc(canvas, xc, yc, w, h, angle1, angle2); + + if (fabs(angle2-angle1) < 360) + { + double xi,yi,xf,yf; + + xi = xc + w*cos(CD_DEG2RAD*angle1)/2.0; + yi = yc + h*sin(CD_DEG2RAD*angle1)/2.0; + + xf = xc + w*cos(CD_DEG2RAD*angle2)/2.0; + yf = yc + h*sin(CD_DEG2RAD*angle2)/2.0; + + cdfCanvasLine(canvas, xi, yi, xc, yc); + cdfCanvasLine(canvas, xc, yc, xf, yf); + } + + return; + } + + if (canvas->use_origin) + { + xc += canvas->forigin.x; + yc += canvas->forigin.y; + } + + if (canvas->invert_yaxis) + yc = _cdInvertYAxis(canvas, yc); + + if (canvas->cxFSector) + canvas->cxFSector(canvas->ctxcanvas, xc, yc, w, h, angle1, angle2); + else + canvas->cxSector(canvas->ctxcanvas, _cdRound(xc), _cdRound(yc), _cdRound(w), _cdRound(h), angle1, angle2); +} + +void cdCanvasChord(cdCanvas* canvas, int xc, int yc, int w, int h, double angle1, double angle2) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (angle1 == angle2 || w == 0 || h == 0) + return; + + normAngles(&angle1, &angle2); + + if (canvas->interior_style == CD_HOLLOW) + { + int xi,yi,xf,yf; + + xi = xc + cdRound(w*cos(CD_DEG2RAD*angle1)/2.0); + yi = yc + cdRound(h*sin(CD_DEG2RAD*angle1)/2.0); + + xf = xc + cdRound(w*cos(CD_DEG2RAD*angle2)/2.0); + yf = yc + cdRound(h*sin(CD_DEG2RAD*angle2)/2.0); + + cdCanvasArc(canvas, xc, yc, w, h, angle1, angle2); + + if (fabs(angle2-angle1) < 360) + cdCanvasLine(canvas, xi, yi, xf, yf); + + return; + } + + if (canvas->use_origin) + { + xc += canvas->origin.x; + yc += canvas->origin.y; + } + + if (canvas->invert_yaxis) + yc = _cdInvertYAxis(canvas, yc); + + canvas->cxChord(canvas->ctxcanvas, xc, yc, w, h, angle1, angle2); +} + +void cdfCanvasChord(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (angle1 == angle2 || w == 0 || h == 0) + return; + + normAngles(&angle1, &angle2); + + if (canvas->interior_style == CD_HOLLOW) + { + double xi,yi,xf,yf; + + xi = xc + w*cos(CD_DEG2RAD*angle1)/2.0; + yi = yc + h*sin(CD_DEG2RAD*angle1)/2.0; + + xf = xc + w*cos(CD_DEG2RAD*angle2)/2.0; + yf = yc + h*sin(CD_DEG2RAD*angle2)/2.0; + + cdfCanvasArc(canvas, xc, yc, w, h, angle1, angle2); + + if (fabs(angle2-angle1) < 360) + cdfCanvasLine(canvas, xi, yi, xf, yf); + + return; + } + + if (canvas->use_origin) + { + xc += canvas->forigin.x; + yc += canvas->forigin.y; + } + + if (canvas->invert_yaxis) + yc = _cdInvertYAxis(canvas, yc); + + if (canvas->cxFChord) + canvas->cxFChord(canvas->ctxcanvas, xc, yc, w, h, angle1, angle2); + else + canvas->cxChord(canvas->ctxcanvas, _cdRound(xc), _cdRound(yc), _cdRound(w), _cdRound(h), angle1, angle2); +} + +void cdCanvasGetEllipseBox(int xc, int yc, int w, int h, double a1, double a2, int *xmin, int *xmax, int *ymin, int *ymax) +{ +#define _BBOX() \ + if (x > *xmax) *xmax = x; \ + if (y > *ymax) *ymax = y; \ + if (x < *xmin) *xmin = x; \ + if (y < *ymin) *ymin = y; + + int x, y; + + *xmin = (int)(xc+w/2*cos(a1*CD_DEG2RAD)); + *ymin = (int)(yc+h/2*sin(a1*CD_DEG2RAD)); + *xmax = *xmin; + *ymax = *ymin; + + x = (int)(xc+w/2*cos(a2*CD_DEG2RAD)); + y = (int)(yc+h/2*sin(a2*CD_DEG2RAD)); + _BBOX() + + if (a1 > a2) + { + x = xc+w/2; + y = yc; + _BBOX() + } + if ((a1<90 && 90a2 && a2>90) || (a2a2 && a2>180) || (a2a2 && a2>270) || (a2 +#include +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" + + +void cdCanvasText(cdCanvas* canvas, int x, int y, const char *s) +{ + int num_line; + + assert(canvas); + assert(s); + if (!_cdCheckCanvas(canvas)) return; + + if (s[0] == 0) + return; + + if (canvas->use_origin) + { + x += canvas->origin.x; + y += canvas->origin.y; + } + + num_line = cdStrLineCount(s); + if (num_line == 1) + { + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + canvas->cxText(canvas->ctxcanvas, x, y, s, strlen(s)); + } + else + { + int yr, i, line_height, len; + const char *p, *q; + double cos_theta = 0, sin_theta = 0; + + canvas->cxGetFontDim(canvas->ctxcanvas, NULL, &line_height, NULL, NULL); + + if (canvas->text_orientation) + { + int align = canvas->text_alignment; + cos_theta = cos(canvas->text_orientation*CD_DEG2RAD); + sin_theta = sin(canvas->text_orientation*CD_DEG2RAD); + + /* position vertically at the first line */ + if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST || /* it is relative to the full text */ + align == CD_BASE_LEFT || align == CD_BASE_CENTER || align == CD_BASE_RIGHT) /* it is relative to the first line already */ + { + /* Already at position */ + } + else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST) /* it is relative to the full text */ + { + cdMovePoint(&x, &y, 0, (num_line-1)*line_height, sin_theta, cos_theta); + } + else /* CD_CENTER || CD_EAST || CD_WEST */ /* it is relative to the full text */ + cdMovePoint(&x, &y, 0, (num_line-1)*line_height/2.0, sin_theta, cos_theta); + } + else + { + int align = canvas->text_alignment; + + /* position vertically at the first line */ + if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST || /* it is relative to the full text */ + align == CD_BASE_LEFT || align == CD_BASE_CENTER || align == CD_BASE_RIGHT) /* it is relative to the first line already */ + { + /* Already at position */ + } + else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST) /* it is relative to the full text */ + { + y += (num_line-1)*line_height; + } + else /* CD_CENTER || CD_EAST || CD_WEST */ /* it is relative to the full text */ + y += ((num_line-1)*line_height)/2; + } + + p = s; + for(i = 0; i < num_line; i++) + { + q = strchr(p, '\n'); + if (q) len = (int)(q-p); /* Cut the string to contain only one line */ + else len = strlen(p); + + /* Draw the line */ + if (canvas->invert_yaxis) + yr = _cdInvertYAxis(canvas, y); + else + yr = y; + canvas->cxText(canvas->ctxcanvas, x, yr, p, len); + + /* Advance the string */ + if (q) p = q + 1; + + /* Advance a line */ + if (canvas->text_orientation) + cdMovePoint(&x, &y, 0, -line_height, sin_theta, cos_theta); + else + y -= line_height; + } + } +} + +void cdfCanvasText(cdCanvas* canvas, double x, double y, const char *s) +{ + int num_line; + + assert(canvas); + assert(s); + if (!_cdCheckCanvas(canvas)) return; + + if (s[0] == 0) + return; + + if (canvas->use_origin) + { + x += canvas->forigin.x; + y += canvas->forigin.y; + } + + num_line = cdStrLineCount(s); + if (num_line == 1) + { + if (canvas->invert_yaxis) + y = _cdInvertYAxis(canvas, y); + + if (canvas->cxFText) + canvas->cxFText(canvas->ctxcanvas, x, y, s, strlen(s)); + else + canvas->cxText(canvas->ctxcanvas, _cdRound(x), _cdRound(y), s, strlen(s)); + } + else + { + int i, line_height, len; + const char *p, *q; + double yr, cos_theta = 0, sin_theta = 0; + + canvas->cxGetFontDim(canvas->ctxcanvas, NULL, &line_height, NULL, NULL); + + if (canvas->text_orientation) + { + int align = canvas->text_alignment; + cos_theta = cos(canvas->text_orientation*CD_DEG2RAD); + sin_theta = sin(canvas->text_orientation*CD_DEG2RAD); + + /* position vertically at the first line */ + if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST || /* it is relative to the full text */ + align == CD_BASE_LEFT || align == CD_BASE_CENTER || align == CD_BASE_RIGHT) /* it is relative to the first line already */ + { + /* Already at position */ + } + else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST) /* it is relative to the full text */ + { + cdfMovePoint(&x, &y, 0, (num_line-1)*line_height, sin_theta, cos_theta); + } + else /* CD_CENTER || CD_EAST || CD_WEST */ /* it is relative to the full text */ + cdfMovePoint(&x, &y, 0, (num_line-1)*line_height/2.0, sin_theta, cos_theta); + } + + p = s; + for(i = 0; i < num_line; i++) + { + q = strchr(p, '\n'); + if (q) len = (int)(q-p); /* Cut the string to contain only one line */ + else len = strlen(p); + + /* Draw the line */ + if (canvas->invert_yaxis) + yr = _cdInvertYAxis(canvas, y); + else + yr = y; + if (canvas->cxFText) + canvas->cxFText(canvas->ctxcanvas, x, yr, p, len); + else + canvas->cxText(canvas->ctxcanvas, _cdRound(x), _cdRound(yr), p, len); + + /* Advance the string */ + if (q) p = q + 1; + + /* Advance a line */ + if (canvas->text_orientation) + cdfMovePoint(&x, &y, 0, -line_height, sin_theta, cos_theta); + else + y -= line_height; + } + } +} + +int cdGetFontSizePixels(cdCanvas* canvas, int size) +{ + if (size < 0) + size = -size; + else + { + double size_mm = (double)size/CD_MM2PT; + size = cdRound(size_mm*canvas->xres); + } + + if (size == 0) + size = 1; + + return size; +} + +int cdGetFontSizePoints(cdCanvas* canvas, int size) +{ + if (size < 0) + { + double size_mm = ((double)-size)/canvas->xres; + size = cdRound(size_mm * CD_MM2PT); + } + + if (size == 0) + size = 1; + + return size; +} + +int cdCanvasFont(cdCanvas* canvas, const char* type_face, int style, int size) +{ + assert(canvas); + assert(style>=-1 && style<=CD_STRIKEOUT); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + if (!type_face || type_face[0]==0) + type_face = canvas->font_type_face; + if (style==-1) + style = canvas->font_style; + if (size==0) + size = canvas->font_size; + + if (strcmp(type_face, canvas->font_type_face)==0 && + style == canvas->font_style && + size == canvas->font_size) + return 1; + + if (canvas->cxFont(canvas->ctxcanvas, type_face, style, size)) + { + strcpy(canvas->font_type_face, type_face); + canvas->font_style = style; + canvas->font_size = size; + canvas->native_font[0] = 0; + return 1; + } + + return 0; +} + +void cdCanvasGetFont(cdCanvas* canvas, char *type_face, int *style, int *size) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + if (type_face) strcpy(type_face, canvas->font_type_face); + if (style) *style = canvas->font_style; + if (size) *size = canvas->font_size; +} + +char* cdCanvasNativeFont(cdCanvas* canvas, const char* font) +{ + static char native_font[1024] = ""; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return NULL; + + strcpy(native_font, canvas->native_font); + + if (!font || font[0] == 0) + return native_font; + + if (font == (char*)CD_QUERY) + { + char style[200] = " "; + if (canvas->font_style&CD_BOLD) + strcat(style, "Bold "); + if (canvas->font_style&CD_ITALIC) + strcat(style, "Italic "); + if (canvas->font_style&CD_UNDERLINE) + strcat(style, "Underline "); + if (canvas->font_style&CD_STRIKEOUT) + strcat(style, "Strikeout "); + + sprintf(native_font, "%s,%s %d", canvas->font_type_face, style, canvas->font_size); + return native_font; + } + + if (canvas->cxNativeFont) + { + if (canvas->cxNativeFont(canvas->ctxcanvas, font)) + strcpy(canvas->native_font, font); + } + else + { + char type_face[1024]; + int size, style = CD_PLAIN; + + if (!cdParseIupWinFont(font, type_face, &style, &size)) + { + if (!cdParseXWinFont(font, type_face, &style, &size)) + { + if (!cdParsePangoFont(font, type_face, &style, &size)) + return native_font; + } + } + + if (cdCanvasFont(canvas, type_face, style, size)) + strcpy(canvas->native_font, font); + } + + return native_font; +} + +int cdCanvasTextAlignment(cdCanvas* canvas, int alignment) +{ + int text_alignment; + + assert(canvas); + assert(alignment==CD_QUERY || (alignment>=CD_NORTH && alignment<=CD_BASE_RIGHT)); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + if (alignmentCD_BASE_RIGHT); + + text_alignment = canvas->text_alignment; + + if (alignment == CD_QUERY || alignment == text_alignment) + return text_alignment; + + if (canvas->cxTextAlignment) + canvas->text_alignment = canvas->cxTextAlignment(canvas->ctxcanvas, alignment); + else + canvas->text_alignment = alignment; + + return text_alignment; +} + +double cdCanvasTextOrientation(cdCanvas* canvas, double angle) +{ + double text_orientation; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return CD_ERROR; + + text_orientation = canvas->text_orientation; + + if (angle == CD_QUERY || angle == text_orientation) + return text_orientation; + + if (canvas->cxTextOrientation) + canvas->text_orientation = canvas->cxTextOrientation(canvas->ctxcanvas, angle); + else + canvas->text_orientation = angle; + + return text_orientation; +} + +void cdCanvasGetFontDim(cdCanvas* canvas, int *max_width, int *height, int *ascent, int *descent) +{ + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + canvas->cxGetFontDim(canvas->ctxcanvas, max_width, height, ascent, descent); +} + +void cdCanvasGetTextSize(cdCanvas* canvas, const char *s, int *width, int *height) +{ + int num_line; + + assert(canvas); + assert(s); + if (!_cdCheckCanvas(canvas)) return; + + num_line = cdStrLineCount(s); + if (num_line == 1) + canvas->cxGetTextSize(canvas->ctxcanvas, s, strlen(s), width, height); + else + { + int i, line_height, max_w = 0, w, len; + const char *p, *q; + + p = s; + + canvas->cxGetFontDim(canvas->ctxcanvas, NULL, &line_height, NULL, NULL); + + for(i = 0; i < num_line; i++) + { + q = strchr(p, '\n'); + if (q) len = (int)(q-p); /* Cut the string to contain only one line */ + else len = strlen(p); + + /* Calculate line width */ + canvas->cxGetTextSize(canvas->ctxcanvas, p, len, &w, NULL); + if (w > max_w) max_w = w; + + /* Advance the string */ + if (q) p = q + 1; /* skip line break */ + } + + if (width) *width = max_w; + if (height) *height = num_line*line_height; + } +} + +void cdTextTranslatePoint(cdCanvas* canvas, int x, int y, int w, int h, int baseline, int *rx, int *ry) +{ + /* move to left */ + switch (canvas->text_alignment) + { + case CD_BASE_RIGHT: + case CD_NORTH_EAST: + case CD_EAST: + case CD_SOUTH_EAST: + *rx = x - w; + break; + case CD_BASE_CENTER: + case CD_CENTER: + case CD_NORTH: + case CD_SOUTH: + *rx = x - w/2; + break; + case CD_BASE_LEFT: + case CD_NORTH_WEST: + case CD_WEST: + case CD_SOUTH_WEST: + *rx = x; + break; + } + + /* move to bottom */ + switch (canvas->text_alignment) + { + case CD_BASE_LEFT: + case CD_BASE_CENTER: + case CD_BASE_RIGHT: + if (canvas->invert_yaxis) + *ry = y + baseline; + else + *ry = y - baseline; + break; + case CD_SOUTH_EAST: + case CD_SOUTH_WEST: + case CD_SOUTH: + *ry = y; + break; + case CD_NORTH_EAST: + case CD_NORTH: + case CD_NORTH_WEST: + if (canvas->invert_yaxis) + *ry = y + h; + else + *ry = y - h; + break; + case CD_CENTER: + case CD_EAST: + case CD_WEST: + if (canvas->invert_yaxis) + *ry = y + h/2; + else + *ry = y - h/2; + break; + } +} + +void cdCanvasGetTextBounds(cdCanvas* canvas, int x, int y, const char *s, int *rect) +{ + int w, h, ascent, line_height, baseline; + int xmin, xmax, ymin, ymax; + int old_invert_yaxis, num_lin; + + assert(canvas); + assert(s); + if (!_cdCheckCanvas(canvas)) return; + + if (s[0] == 0) + return; + + cdCanvasGetTextSize(canvas, s, &w, &h); + cdCanvasGetFontDim(canvas, NULL, &line_height, &ascent, NULL); + baseline = line_height - ascent; + num_lin = h/line_height; + if (num_lin > 1) + baseline += (num_lin-1)*line_height; + + /* from here we are always upwards */ + old_invert_yaxis = canvas->invert_yaxis; + canvas->invert_yaxis = 0; + + /* move to bottom-left */ + cdTextTranslatePoint(canvas, x, y, w, h, baseline, &xmin, &ymin); + + xmax = xmin + w-1; + ymax = ymin + h-1; + + if (canvas->text_orientation) + { + double cos_theta = cos(canvas->text_orientation*CD_DEG2RAD); + double sin_theta = sin(canvas->text_orientation*CD_DEG2RAD); + + cdRotatePoint(canvas, xmin, ymin, x, y, &rect[0], &rect[1], sin_theta, cos_theta); + cdRotatePoint(canvas, xmax, ymin, x, y, &rect[2], &rect[3], sin_theta, cos_theta); + cdRotatePoint(canvas, xmax, ymax, x, y, &rect[4], &rect[5], sin_theta, cos_theta); + cdRotatePoint(canvas, xmin, ymax, x, y, &rect[6], &rect[7], sin_theta, cos_theta); + } + else + { + rect[0] = xmin; rect[1] = ymin; + rect[2] = xmax; rect[3] = ymin; + rect[4] = xmax; rect[5] = ymax; + rect[6] = xmin; rect[7] = ymax; + } + + canvas->invert_yaxis = old_invert_yaxis; +} + +void cdCanvasGetTextBox(cdCanvas* canvas, int x, int y, const char *s, int *xmin, int *xmax, int *ymin, int *ymax) +{ + int rect[8]; + int _xmin, _xmax, _ymin, _ymax; + + cdCanvasGetTextBounds(canvas, x, y, s, rect); + + _xmin = rect[0]; + _ymin = rect[1]; + _xmax = rect[0]; + _ymax = rect[1]; + + if(rect[2] < _xmin) _xmin = rect[2]; + if(rect[4] < _xmin) _xmin = rect[4]; + if(rect[6] < _xmin) _xmin = rect[6]; + + if(rect[3] < _ymin) _ymin = rect[3]; + if(rect[5] < _ymin) _ymin = rect[5]; + if(rect[7] < _ymin) _ymin = rect[7]; + + if(rect[2] > _xmax) _xmax = rect[2]; + if(rect[4] > _xmax) _xmax = rect[4]; + if(rect[6] > _xmax) _xmax = rect[6]; + + if(rect[3] > _ymax) _ymax = rect[3]; + if(rect[5] > _ymax) _ymax = rect[5]; + if(rect[7] > _ymax) _ymax = rect[7]; + + if (xmin) *xmin = _xmin; + if (xmax) *xmax = _xmax; + if (ymin) *ymin = _ymin; + if (ymax) *ymax = _ymax; +} + +/**************************************************************/ +/* Native Font Format, compatible with Pango Font Description */ +/**************************************************************/ + +/* +The string contains the font name, the style and the size. +Style can be a free combination of some names separated by spaces. +Font name can be a list of font family names separated by comma. +*/ + +#define isspace(_x) (_x == ' ') + +static int cd_find_style_name(const char *name, int len, int *style) +{ +#define CD_STYLE_NUM_NAMES 21 + static struct { const char* name; int style; } cd_style_names[CD_STYLE_NUM_NAMES] = { + {"Normal", 0}, + {"Oblique", CD_ITALIC}, + {"Italic", CD_ITALIC}, + {"Small-Caps", 0}, + {"Ultra-Light", 0}, + {"Light", 0}, + {"Medium", 0}, + {"Semi-Bold", CD_BOLD}, + {"Bold", CD_BOLD}, + {"Ultra-Bold", CD_BOLD}, + {"Heavy", 0}, + {"Ultra-Condensed",0}, + {"Extra-Condensed",0}, + {"Condensed", 0}, + {"Semi-Condensed", 0}, + {"Semi-Expanded", 0}, + {"Expanded", 0}, + {"Extra-Expanded", 0}, + {"Ultra-Expanded", 0}, + {"Underline", CD_UNDERLINE}, + {"Strikeout", CD_STRIKEOUT} + }; + + int i; + for (i = 0; i < CD_STYLE_NUM_NAMES; i++) + { + if (strncmp(cd_style_names[i].name, name, len)==0) + { + *style = cd_style_names[i].style; + return 1; + } + } + + return 0; +} + +static const char * cd_getword(const char *str, const char *last, int *wordlen) +{ + const char *result; + + while (last > str && isspace(*(last - 1))) + last--; + + result = last; + while (result > str && !isspace (*(result - 1))) + result--; + + *wordlen = last - result; + + return result; +} + +int cdParsePangoFont(const char *nativefont, char *type_face, int *style, int *size) +{ + const char *p, *last; + int len, wordlen; + + len = (int)strlen(nativefont); + last = nativefont + len; + p = cd_getword(nativefont, last, &wordlen); + + /* Look for a size at the end of the string */ + if (wordlen != 0) + { + int new_size = atoi(p); + if (new_size != 0) + { + *size = new_size; + last = p; + } + } + + /* Now parse style words */ + p = cd_getword(nativefont, last, &wordlen); + while (wordlen != 0) + { + int new_style = 0; + + if (!cd_find_style_name(p, wordlen, &new_style)) + break; + else + { + *style |= new_style; + + last = p; + p = cd_getword(nativefont, last, &wordlen); + } + } + + /* Remainder is font family list. */ + + /* Trim off trailing white space */ + while (last > nativefont && isspace(*(last - 1))) + last--; + + /* Trim off trailing commas */ + if (last > nativefont && *(last - 1) == ',') + last--; + + /* Again, trim off trailing white space */ + while (last > nativefont && isspace(*(last - 1))) + last--; + + /* Trim off leading white space */ + while (last > nativefont && isspace(*nativefont)) + nativefont++; + + if (nativefont != last) + { + len = (last - nativefont); + strncpy(type_face, nativefont, len); + type_face[len] = 0; + return 1; + } + else + return 0; +} + +int cdParseIupWinFont(const char *nativefont, char *type_face, int *style, int *size) +{ + int c; + + if (strstr(nativefont, ":") == NULL) + return 0; + + c = strcspn(nativefont, ":"); /* extract type_face */ + if (c == 0) return 0; + strncpy(type_face, nativefont, c); + type_face[c]='\0'; + nativefont += c+1; + + if(nativefont[0] == ':') /* check for attributes */ + nativefont++; + else + { + *style = 0; + while(strlen(nativefont)) /* extract style (bold/italic etc) */ + { + char style_str[20]; + + c = strcspn(nativefont, ":,"); + if (c == 0) + break; + + strncpy(style_str, nativefont, c); + style_str[c] = '\0'; + + if(!strcmp(style_str, "BOLD")) + *style |= CD_BOLD; + else if(!strcmp(style_str,"ITALIC")) + *style |= CD_ITALIC; + else if(!strcmp(style_str,"UNDERLINE")) + *style |= CD_UNDERLINE; + else if(!strcmp(style_str,"STRIKEOUT")) + *style |= CD_STRIKEOUT; + + nativefont += c; + + if(nativefont[0] == ':') /* end attribute list */ + { + nativefont++; + break; + } + + nativefont++; /* skip separator */ + } + } + + /* extract size in points */ + if (sscanf(nativefont, "%d", size) != 1) + return 0; + + if (*size == 0) + return 0; + + return 1; +} + +int cdParseXWinFont(const char *nativefont, char *type_face, int *style, int *size) +{ + char style1[10], style2[10]; + char* token; + char font[1024]; + + if (nativefont[0] != '-') + return 0; + + strcpy(font, nativefont+1); /* skip first '-' */ + + *style = 0; + + /* fndry */ + token = strtok(font, "-"); + if (!token) return 0; + + /* fmly */ + token = strtok(NULL, "-"); + if (!token) return 0; + strcpy(type_face, token); + + /* wght */ + token = strtok(NULL, "-"); + if (!token) return 0; + strcpy(style1, token); + if (strstr("bold", style1)) + *style |= CD_BOLD; + + /* slant */ + token = strtok(NULL, "-"); + if (!token) return 0; + strcpy(style2, token); + if (*style2 == 'i' || *style2 == 'o') + *style |= CD_ITALIC; + + /* sWdth */ + token = strtok(NULL, "-"); + if (!token) return 0; + /* adstyl */ + token = strtok(NULL, "-"); + if (!token) return 0; + + /* pxlsz */ + token = strtok(NULL, "-"); + if (!token) return 0; + *size = -atoi(token); /* size in pixels */ + + if (*size < 0) + return 1; + + /* ptSz */ + token = strtok(NULL, "-"); + if (!token) return 0; + *size = atoi(token)/10; /* size in deci-points */ + + if (*size > 0) + return 1; + + return 0; +} diff --git a/cd/src/cd_util.c b/cd/src/cd_util.c new file mode 100755 index 0000000..1767ac4 --- /dev/null +++ b/cd/src/cd_util.c @@ -0,0 +1,351 @@ +/** \file + * \brief Utilities + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include +#include + + +#include "cd.h" + +#include "cd_private.h" + + +int cdRound(double x) +{ + return _cdRound(x); +} + +/* Returns a table to speed up zoom in discrete zoom rotines. + Adds the min parameter and allocates the table using malloc. + The table should be used when mapping from destiny coordinates to + source coordinates (src_pos = tab[dst_pos]). + dst_len is the full destiny size range. + src_len is only the zoomed region size, usually max-min+1. +*/ +int* cdGetZoomTable(int dst_len, int src_len, int src_min) +{ + int dst_i, src_i; + double factor; + int* tab = (int*)malloc(dst_len*sizeof(int)); + + factor = (double)(src_len) / (double)(dst_len); + + for(dst_i = 0; dst_i < dst_len; dst_i++) + { + src_i = cdRound((factor*(dst_i + 0.5)) - 0.5); + tab[dst_i] = src_i + src_min; + } + + return tab; +} + +/* funcao usada para calcular os retangulos efetivos de zoom + de imagens clientes. Pode ser usada para os eixos X e Y. + + canvas_size - tamanho do canvas (canvas->w, canvas->h) + cnv_rect_pos - posicao no canvas onde a regiao sera´ desenhada (x, y) + cnv_rect_size - tamanho da regiao no canvas com zoom (w, h) + img_rect_pos - posicao na imagem da regiao a ser desenhada (min) + img_rect_size - tamanho da regiao na imagem (max-min+1) + + calcula o melhor tamanho a ser usado + retorna 0 se o retangulo resultante e´ nulo +*/ +int cdCalcZoom(int canvas_size, + int cnv_rect_pos, int cnv_rect_size, + int *new_cnv_rect_pos, int *new_cnv_rect_size, + int img_rect_pos, int img_rect_size, + int *new_img_rect_pos, int *new_img_rect_size, + int is_horizontal) +{ + int offset; + float zoom_factor = (float)img_rect_size / (float)cnv_rect_size; + + /* valores default sem otimizacao */ + *new_cnv_rect_size = cnv_rect_size, *new_cnv_rect_pos = cnv_rect_pos; + *new_img_rect_size = img_rect_size, *new_img_rect_pos = img_rect_pos; + + if (cnv_rect_size > 0) + { + /* se posicao no canvas > tamanho do canvas, fora da janela, nao desenha nada */ + if (cnv_rect_pos >= canvas_size) + return 0; + + /* se posicao no canvas + tamanho da regiao no canvas < 0, fora da janela, nao desenha nada */ + if (cnv_rect_pos+cnv_rect_size < 0) + return 0; + + /* se posicao no canvas < 0, entao comeca fora do canvas melhor posicao no canvas e' 0 + E o tamanho e' reduzido do valor negativo */ + if (cnv_rect_pos < 0) + { + /* valores ajustados para cair numa vizinhanca de um pixel da imagem */ + offset = (int)ceil(cnv_rect_pos*zoom_factor); /* offset is <0 */ + offset = (int)ceil(offset/zoom_factor); + *new_cnv_rect_pos -= offset; + *new_cnv_rect_size += offset; + } + + /* se posicao no canvas + tamanho da regiao no canvas > tamanho do canvas, + termina fora do canvas entao + o tamanho da regiao no canvas e' o tamanho do canvas reduzido da posicao */ + if (*new_cnv_rect_pos+*new_cnv_rect_size > canvas_size) + { + offset = (int)((*new_cnv_rect_pos+*new_cnv_rect_size - canvas_size)*zoom_factor); + *new_cnv_rect_size -= (int)(offset/zoom_factor); /* offset is >0 */ + } + } + else + { + /* cnv_rect_size tamanho negativo, significa imagem top down */ + /* calculos adicionados pela Paula */ + + /* se posicao no canvas + tamanho no canvas (xmin+1) >= tamanho do canvas, fora da janela, nao desenha nada */ + if (cnv_rect_pos+cnv_rect_size >= canvas_size) + return 0; + + /* se posicao da imagem com zoom (xmax) < 0, fora da janela, nao desenha nada */ + if (cnv_rect_pos < 0) + return 0; + + /* se posicao com zoom (xmax) >= tamanho do canvas, posicao da imagem com zoom e' o tamanho do canvas menos um + tambem o tamanho e' reduzido do valor negativo */ + if (cnv_rect_pos >= canvas_size) + { + *new_cnv_rect_pos = canvas_size-1; + *new_cnv_rect_size = cnv_rect_size + (cnv_rect_pos - *new_cnv_rect_pos); + } + + /* se posicao + tamanho com zoom (xmin+1) < 0, + entao o tamanho com zoom e' a posição + 1 */ + if (cnv_rect_pos+cnv_rect_size < 0) + *new_cnv_rect_size = -(*new_cnv_rect_pos + 1); + } + + /* agora ja' tenho tamanho e posicao da regiao no canvas, + tenho que obter tamanho e posicao dentro da imagem original, + baseado nos novos valores */ + + /* tamanho da regiao na imagem e' a conversao de zoom para real do tamanho no canvas */ + *new_img_rect_size = (int)(*new_cnv_rect_size * zoom_factor + 0.5); + + if (is_horizontal) + { + /* em X, o offset dentro da imagem so' existe se houver diferenca entre a posicao inicial da + imagem e a posicao otimizada (ambas da imagem com zoom) */ + if (*new_cnv_rect_pos != cnv_rect_pos) + { + offset = *new_cnv_rect_pos - cnv_rect_pos; /* offset is >0 */ + *new_img_rect_pos += (int)(offset*zoom_factor); + } + } + else + { + /* em Y, o offset dentro da imagem so' existe se houver diferenca entre a posicao + final (posição inicial + tamanho) da imagem e a posicao otimizada (ambas da + imagem com zoom) */ + if ((cnv_rect_pos + cnv_rect_size) != (*new_cnv_rect_pos + *new_cnv_rect_size)) + { + /* offset is >0, because Y axis is from top to bottom */ + offset = (cnv_rect_pos + cnv_rect_size) - (*new_cnv_rect_pos + *new_cnv_rect_size); + *new_img_rect_pos += (int)(offset*zoom_factor); + } + } + + return 1; +} + +int cdGetFileName(const char* strdata, char* filename) +{ + const char* start = strdata; + if (!strdata || strdata[0] == 0) return 0; + + if (strdata[0] == '\"') + { + strdata++; /* the first " */ + while(*strdata && *strdata != '\"') + *filename++ = *strdata++; + strdata++; /* the last " */ + } + else + { + while(*strdata && *strdata != ' ') + *filename++ = *strdata++; + } + + if (*strdata == ' ') + strdata++; + + *filename = 0; + return (int)(strdata - start); +} + +void cdNormalizeLimits(int w, int h, int *xmin, int *xmax, int *ymin, int *ymax) +{ + *xmin = *xmin < 0? 0: *xmin < w? *xmin: (w - 1); + *ymin = *ymin < 0? 0: *ymin < h? *ymin: (h - 1); + *xmax = *xmax < 0? 0: *xmax < w? *xmax: (w - 1); + *ymax = *ymax < 0? 0: *ymax < h? *ymax: (h - 1); +} + +int cdCheckBoxSize(int *xmin, int *xmax, int *ymin, int *ymax) +{ + if (*xmin > *xmax) _cdSwapInt(*xmin, *xmax); + if (*ymin > *ymax) _cdSwapInt(*ymin, *ymax); + + if ((*xmax-*xmin+1) <= 0) + return 0; + + if ((*ymax-*ymin+1) <= 0) + return 0; + + return 1; +} + +int cdfCheckBoxSize(double *xmin, double *xmax, double *ymin, double *ymax) +{ + if (*xmin > *xmax) _cdSwapDouble(*xmin, *xmax); + if (*ymin > *ymax) _cdSwapDouble(*ymin, *ymax); + + if ((*xmax-*xmin+1) <= 0) + return 0; + + if ((*ymax-*ymin+1) <= 0) + return 0; + + return 1; +} + +void cdMovePoint(int *x, int *y, double dx, double dy, double sin_theta, double cos_theta) +{ + double t; + t = cos_theta*dx - sin_theta*dy; + *x += _cdRound(t); + t = sin_theta*dx + cos_theta*dy; + *y += _cdRound(t); +} + +void cdfMovePoint(double *x, double *y, double dx, double dy, double sin_theta, double cos_theta) +{ + *x += cos_theta*dx - sin_theta*dy; + *y += sin_theta*dx + cos_theta*dy; +} + +void cdRotatePoint(cdCanvas* canvas, int x, int y, int cx, int cy, int *rx, int *ry, double sin_theta, double cos_theta) +{ + double t; + + /* translate to (cx,cy) */ + x = x - cx; + y = y - cy; + + /* rotate */ + if (canvas->invert_yaxis) + { + t = (x * cos_theta) + (y * sin_theta); *rx = _cdRound(t); + t = -(x * sin_theta) + (y * cos_theta); *ry = _cdRound(t); + } + else + { + t = (x * cos_theta) - (y * sin_theta); *rx = _cdRound(t); + t = (x * sin_theta) + (y * cos_theta); *ry = _cdRound(t); + } + + /* translate back */ + *rx = *rx + cx; + *ry = *ry + cy; +} + +void cdRotatePointY(cdCanvas* canvas, int x, int y, int cx, int cy, int *ry, double sin_theta, double cos_theta) +{ + double t; + + /* translate to (cx,cy) */ + x = x - cx; + y = y - cy; + + /* rotate */ + if (canvas->invert_yaxis) + { + t = -(x * sin_theta) + (y * cos_theta); *ry = _cdRound(t); + } + else + { + t = (x * sin_theta) + (y * cos_theta); *ry = _cdRound(t); + } + + /* translate back */ + *ry = *ry + cy; +} + +int cdStrEqualNoCase(const char* str1, const char* str2) +{ + int i = 0; + if (str1 == str2) return 1; + if (!str1 || !str2 || tolower(*str1) != tolower(*str2)) return 0; + + while (str1[i] && str2[i] && tolower(str1[i])==tolower(str2[i])) + i++; + if (str1[i] == str2[i]) return 1; + + return 0; +} + +/* Copied from IUP3, simply ignore line breaks other than '\n' for CD */ + +int cdStrLineCount(const char* str) +{ + int num_lin = 1; + + if (!str) + return num_lin; + + while(*str != 0) + { + while(*str!=0 && *str!='\n') + str++; + + if (*str=='\n') /* UNIX line end */ + { + num_lin++; + str++; + } + } + + return num_lin; +} + +char* cdStrDup(const char *str) +{ + if (str) + { + int size = strlen(str)+1; + char *newstr = malloc(size); + if (newstr) memcpy(newstr, str, size); + return newstr; + } + return NULL; +} + +char* cdStrDupN(const char *str, int len) +{ + if (str) + { + int size = len+1; + char *newstr = malloc(size); + if (newstr) + { + memcpy(newstr, str, len); + newstr[len]=0; + } + return newstr; + } + return NULL; +} diff --git a/cd/src/cd_vectortext.c b/cd/src/cd_vectortext.c new file mode 100755 index 0000000..4e196b6 --- /dev/null +++ b/cd/src/cd_vectortext.c @@ -0,0 +1,5189 @@ +/** \file + * \brief Vector Text + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#include "cd.h" +#include "wd.h" +#include "cd_private.h" + + +#define MULTILINE_MAXLEN 10240 + +typedef struct cdOperation +{ + char operation; + signed char x, y; +} cdOperation; + +typedef struct cdCaracter +{ + int right, center, operations; + cdOperation *op; +} cdCaracter; + +struct _cdVectorFont +{ + /* font data */ + char name[256]; /* font name */ + char file_name[10240]; /* font file name */ + cdCaracter *chars; /* array of characters */ + int top, /* from baseline to top */ + cap, /* from baseline to cap (UNUSED) */ + half, /* half between top and bottom (UNUSED) */ + bottom; /* from baseline to bottom (negative) */ + + /* attributes (independ from font) */ + double size_x, size_y; /* internal font size */ + double current_cos, current_sin; /* text direction */ + + /* general transformation matrix */ + int text_transf; + double text_matrix[6]; + + cdCanvas* canvas; +}; + +static unsigned char vf_ansi2ascii[256] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +/* 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, */ + 199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197, 201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 155, 156, 157, 158, 159, +/* 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, */ + 225, 237, 243, 250, 241, 209, 170, 176, 191, 169, 166, 189, 188, 173, 174, 175, 167, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 172, 171, 190, 168, +/* 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, */ + 192, 193, 194, 195, 142, 143, 146, 128, 200, 144, 202, 203, 204, 205, 206, 207, 208, 165, 210, 211, 212, 213, 153, 215, 216, 217, 218, 219, 154, 221, 222, 223, +/* 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, */ + 133, 160, 131, 227, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139, 240, 164, 149, 162, 147, 245, 148, 247, 248, 151, 163, 150, 129, 253, 254, 152 +}; + +/******************************************************/ +/* descricao do fonte default */ +/******************************************************/ + +static int vf_default_top = 28; +static int vf_default_cap = 28; +static int vf_default_half = 14; +static int vf_default_bottom = -7; + +static cdOperation vf_default_char_33[] = { +{'m', 1, 21}, +{'l', 1, 7}, +{'m', 1, 2}, +{'l', 0, 1}, +{'l', 1, 0}, +{'l', 2, 1}, +{'l', 1, 2}, +}; +static cdOperation vf_default_char_34[] = { +{'m', 1, 21}, +{'l', 0, 20}, +{'l', 0, 14}, +{'m', 1, 20}, +{'l', 0, 14}, +{'m', 1, 21}, +{'l', 2, 20}, +{'l', 0, 14}, +{'m', 10, 21}, +{'l', 9, 20}, +{'l', 9, 14}, +{'m', 10, 20}, +{'l', 9, 14}, +{'m', 10, 21}, +{'l', 11, 20}, +{'l', 9, 14}, +}; +static cdOperation vf_default_char_35[] = { +{'m', 8, 21}, +{'l', 1, -7}, +{'m', 14, 21}, +{'l', 7, -7}, +{'m', 1, 10}, +{'l', 15, 10}, +{'m', 0, 4}, +{'l', 14, 4}, +}; +static cdOperation vf_default_char_36[] = { +{'m', 5, 25}, +{'l', 5, -4}, +{'m', 9, 25}, +{'l', 9, -4}, +{'m', 13, 18}, +{'l', 12, 17}, +{'l', 13, 16}, +{'l', 14, 17}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 9, 21}, +{'l', 5, 21}, +{'l', 2, 20}, +{'l', 0, 18}, +{'l', 0, 16}, +{'l', 1, 14}, +{'l', 2, 13}, +{'l', 4, 12}, +{'l', 10, 10}, +{'l', 12, 9}, +{'l', 14, 7}, +{'m', 0, 16}, +{'l', 2, 14}, +{'l', 4, 13}, +{'l', 10, 11}, +{'l', 12, 10}, +{'l', 13, 9}, +{'l', 14, 7}, +{'l', 14, 3}, +{'l', 12, 1}, +{'l', 9, 0}, +{'l', 5, 0}, +{'l', 2, 1}, +{'l', 0, 3}, +{'l', 0, 4}, +{'l', 1, 5}, +{'l', 2, 4}, +{'l', 1, 3}, +}; +static cdOperation vf_default_char_37[] = { +{'m', 18, 21}, +{'l', 0, 0}, +{'m', 5, 21}, +{'l', 7, 19}, +{'l', 7, 17}, +{'l', 6, 15}, +{'l', 4, 14}, +{'l', 2, 14}, +{'l', 0, 16}, +{'l', 0, 18}, +{'l', 1, 20}, +{'l', 3, 21}, +{'l', 5, 21}, +{'l', 7, 20}, +{'l', 10, 19}, +{'l', 13, 19}, +{'l', 16, 20}, +{'l', 18, 21}, +{'m', 14, 7}, +{'l', 12, 6}, +{'l', 11, 4}, +{'l', 11, 2}, +{'l', 13, 0}, +{'l', 15, 0}, +{'l', 17, 1}, +{'l', 18, 3}, +{'l', 18, 5}, +{'l', 16, 7}, +{'l', 14, 7}, +}; +static cdOperation vf_default_char_38[] = { +{'m', 18, 13}, +{'l', 17, 12}, +{'l', 18, 11}, +{'l', 19, 12}, +{'l', 19, 13}, +{'l', 18, 14}, +{'l', 17, 14}, +{'l', 16, 13}, +{'l', 15, 11}, +{'l', 13, 6}, +{'l', 11, 3}, +{'l', 9, 1}, +{'l', 7, 0}, +{'l', 4, 0}, +{'l', 1, 1}, +{'l', 0, 3}, +{'l', 0, 6}, +{'l', 1, 8}, +{'l', 7, 12}, +{'l', 9, 14}, +{'l', 10, 16}, +{'l', 10, 18}, +{'l', 9, 20}, +{'l', 7, 21}, +{'l', 5, 20}, +{'l', 4, 18}, +{'l', 4, 16}, +{'l', 5, 13}, +{'l', 7, 10}, +{'l', 12, 3}, +{'l', 14, 1}, +{'l', 17, 0}, +{'l', 18, 0}, +{'l', 19, 1}, +{'l', 19, 2}, +{'m', 4, 0}, +{'l', 2, 1}, +{'l', 1, 3}, +{'l', 1, 6}, +{'l', 2, 8}, +{'l', 4, 10}, +{'m', 4, 16}, +{'l', 5, 14}, +{'l', 13, 3}, +{'l', 15, 1}, +{'l', 17, 0}, +}; +static cdOperation vf_default_char_39[] = { +{'m', 1, 19}, +{'l', 0, 20}, +{'l', 1, 21}, +{'l', 2, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 15}, +}; +static cdOperation vf_default_char_40[] = { +{'m', 7, 25}, +{'l', 5, 23}, +{'l', 3, 20}, +{'l', 1, 16}, +{'l', 0, 11}, +{'l', 0, 7}, +{'l', 1, 2}, +{'l', 3, -2}, +{'l', 5, -5}, +{'l', 7, -7}, +{'m', 5, 23}, +{'l', 3, 19}, +{'l', 2, 16}, +{'l', 1, 11}, +{'l', 1, 7}, +{'l', 2, 2}, +{'l', 3, -1}, +{'l', 5, -5}, +}; +static cdOperation vf_default_char_41[] = { +{'m', 0, 25}, +{'l', 2, 23}, +{'l', 4, 20}, +{'l', 6, 16}, +{'l', 7, 11}, +{'l', 7, 7}, +{'l', 6, 2}, +{'l', 4, -2}, +{'l', 2, -5}, +{'l', 0, -7}, +{'m', 2, 23}, +{'l', 4, 19}, +{'l', 5, 16}, +{'l', 6, 11}, +{'l', 6, 7}, +{'l', 5, 2}, +{'l', 4, -1}, +{'l', 2, -5}, +}; +static cdOperation vf_default_char_42[] = { +{'m', 5, 21}, +{'l', 5, 9}, +{'m', 0, 18}, +{'l', 10, 12}, +{'m', 10, 18}, +{'l', 0, 12}, +}; +static cdOperation vf_default_char_43[] = { +{'m', 9, 18}, +{'l', 9, 0}, +{'m', 0, 9}, +{'l', 18, 9}, +}; +static cdOperation vf_default_char_44[] = { +{'m', 2, 1}, +{'l', 1, 0}, +{'l', 0, 1}, +{'l', 1, 2}, +{'l', 2, 1}, +{'l', 2, -1}, +{'l', 1, -3}, +{'l', 0, -4}, +}; +static cdOperation vf_default_char_45[] = { +{'m', 0, 9}, +{'l', 18, 9}, +}; +static cdOperation vf_default_char_46[] = { +{'m', 1, 2}, +{'l', 0, 1}, +{'l', 1, 0}, +{'l', 2, 1}, +{'l', 1, 2}, +}; +static cdOperation vf_default_char_47[] = { +{'m', 0, -3}, +{'l', 14, 21}, +}; +static cdOperation vf_default_char_48[] = { +{'m', 6, 21}, +{'l', 3, 20}, +{'l', 1, 17}, +{'l', 0, 12}, +{'l', 0, 9}, +{'l', 1, 4}, +{'l', 3, 1}, +{'l', 6, 0}, +{'l', 8, 0}, +{'l', 11, 1}, +{'l', 13, 4}, +{'l', 14, 9}, +{'l', 14, 12}, +{'l', 13, 17}, +{'l', 11, 20}, +{'l', 8, 21}, +{'l', 6, 21}, +}; +static cdOperation vf_default_char_49[] = { +{'m', 0, 17}, +{'l', 2, 18}, +{'l', 5, 21}, +{'l', 5, 0}, +}; +static cdOperation vf_default_char_50[] = { +{'m', 1, 16}, +{'l', 1, 17}, +{'l', 2, 19}, +{'l', 3, 20}, +{'l', 5, 21}, +{'l', 9, 21}, +{'l', 11, 20}, +{'l', 12, 19}, +{'l', 13, 17}, +{'l', 13, 15}, +{'l', 12, 13}, +{'l', 10, 10}, +{'l', 0, 0}, +{'l', 14, 0}, +}; +static cdOperation vf_default_char_51[] = { +{'m', 2, 21}, +{'l', 13, 21}, +{'l', 7, 13}, +{'l', 10, 13}, +{'l', 12, 12}, +{'l', 13, 11}, +{'l', 14, 8}, +{'l', 14, 6}, +{'l', 13, 3}, +{'l', 11, 1}, +{'l', 8, 0}, +{'l', 5, 0}, +{'l', 2, 1}, +{'l', 1, 2}, +{'l', 0, 4}, +}; +static cdOperation vf_default_char_52[] = { +{'m', 10, 21}, +{'l', 0, 7}, +{'l', 15, 7}, +{'m', 10, 21}, +{'l', 10, 0}, +}; +static cdOperation vf_default_char_53[] = { +{'m', 12, 21}, +{'l', 2, 21}, +{'l', 1, 12}, +{'l', 2, 13}, +{'l', 5, 14}, +{'l', 8, 14}, +{'l', 11, 13}, +{'l', 13, 11}, +{'l', 14, 8}, +{'l', 14, 6}, +{'l', 13, 3}, +{'l', 11, 1}, +{'l', 8, 0}, +{'l', 5, 0}, +{'l', 2, 1}, +{'l', 1, 2}, +{'l', 0, 4}, +}; +static cdOperation vf_default_char_54[] = { +{'m', 12, 18}, +{'l', 11, 20}, +{'l', 8, 21}, +{'l', 6, 21}, +{'l', 3, 20}, +{'l', 1, 17}, +{'l', 0, 12}, +{'l', 0, 7}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 6, 0}, +{'l', 7, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 13, 7}, +{'l', 12, 10}, +{'l', 10, 12}, +{'l', 7, 13}, +{'l', 6, 13}, +{'l', 3, 12}, +{'l', 1, 10}, +{'l', 0, 7}, +}; +static cdOperation vf_default_char_55[] = { +{'m', 14, 21}, +{'l', 4, 0}, +{'m', 0, 21}, +{'l', 14, 21}, +}; +static cdOperation vf_default_char_56[] = { +{'m', 5, 21}, +{'l', 2, 20}, +{'l', 1, 18}, +{'l', 1, 16}, +{'l', 2, 14}, +{'l', 4, 13}, +{'l', 8, 12}, +{'l', 11, 11}, +{'l', 13, 9}, +{'l', 14, 7}, +{'l', 14, 4}, +{'l', 13, 2}, +{'l', 12, 1}, +{'l', 9, 0}, +{'l', 5, 0}, +{'l', 2, 1}, +{'l', 1, 2}, +{'l', 0, 4}, +{'l', 0, 7}, +{'l', 1, 9}, +{'l', 3, 11}, +{'l', 6, 12}, +{'l', 10, 13}, +{'l', 12, 14}, +{'l', 13, 16}, +{'l', 13, 18}, +{'l', 12, 20}, +{'l', 9, 21}, +{'l', 5, 21}, +}; +static cdOperation vf_default_char_57[] = { +{'m', 13, 14}, +{'l', 12, 11}, +{'l', 10, 9}, +{'l', 7, 8}, +{'l', 6, 8}, +{'l', 3, 9}, +{'l', 1, 11}, +{'l', 0, 14}, +{'l', 0, 15}, +{'l', 1, 18}, +{'l', 3, 20}, +{'l', 6, 21}, +{'l', 7, 21}, +{'l', 10, 20}, +{'l', 12, 18}, +{'l', 13, 14}, +{'l', 13, 9}, +{'l', 12, 4}, +{'l', 10, 1}, +{'l', 7, 0}, +{'l', 5, 0}, +{'l', 2, 1}, +{'l', 1, 3}, +}; +static cdOperation vf_default_char_58[] = { +{'m', 1, 14}, +{'l', 0, 13}, +{'l', 1, 12}, +{'l', 2, 13}, +{'l', 1, 14}, +{'m', 1, 2}, +{'l', 0, 1}, +{'l', 1, 0}, +{'l', 2, 1}, +{'l', 1, 2}, +}; +static cdOperation vf_default_char_59[] = { +{'m', 1, 14}, +{'l', 0, 13}, +{'l', 1, 12}, +{'l', 2, 13}, +{'l', 1, 14}, +{'m', 2, 1}, +{'l', 1, 0}, +{'l', 0, 1}, +{'l', 1, 2}, +{'l', 2, 1}, +{'l', 2, -1}, +{'l', 1, -3}, +{'l', 0, -4}, +}; +static cdOperation vf_default_char_60[] = { +{'m', 16, 18}, +{'l', 0, 9}, +{'l', 16, 0}, +}; +static cdOperation vf_default_char_61[] = { +{'m', 0, 12}, +{'l', 18, 12}, +{'m', 0, 6}, +{'l', 18, 6}, +}; +static cdOperation vf_default_char_62[] = { +{'m', 0, 18}, +{'l', 16, 9}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_63[] = { +{'m', 0, 16}, +{'l', 0, 17}, +{'l', 1, 19}, +{'l', 2, 20}, +{'l', 4, 21}, +{'l', 8, 21}, +{'l', 10, 20}, +{'l', 11, 19}, +{'l', 12, 17}, +{'l', 12, 15}, +{'l', 11, 13}, +{'l', 10, 12}, +{'l', 6, 10}, +{'l', 6, 7}, +{'m', 6, 2}, +{'l', 5, 1}, +{'l', 6, 0}, +{'l', 7, 1}, +{'l', 6, 2}, +}; +static cdOperation vf_default_char_64[] = { +{'m', 15, 13}, +{'l', 14, 15}, +{'l', 12, 16}, +{'l', 9, 16}, +{'l', 7, 15}, +{'l', 6, 14}, +{'l', 5, 11}, +{'l', 5, 8}, +{'l', 6, 6}, +{'l', 8, 5}, +{'l', 11, 5}, +{'l', 13, 6}, +{'l', 14, 8}, +{'m', 9, 16}, +{'l', 7, 14}, +{'l', 6, 11}, +{'l', 6, 8}, +{'l', 7, 6}, +{'l', 8, 5}, +{'m', 15, 16}, +{'l', 14, 8}, +{'l', 14, 6}, +{'l', 16, 5}, +{'l', 18, 5}, +{'l', 20, 7}, +{'l', 21, 10}, +{'l', 21, 12}, +{'l', 20, 15}, +{'l', 19, 17}, +{'l', 17, 19}, +{'l', 15, 20}, +{'l', 12, 21}, +{'l', 9, 21}, +{'l', 6, 20}, +{'l', 4, 19}, +{'l', 2, 17}, +{'l', 1, 15}, +{'l', 0, 12}, +{'l', 0, 9}, +{'l', 1, 6}, +{'l', 2, 4}, +{'l', 4, 2}, +{'l', 6, 1}, +{'l', 9, 0}, +{'l', 12, 0}, +{'l', 15, 1}, +{'l', 17, 2}, +{'l', 18, 3}, +{'m', 16, 16}, +{'l', 15, 8}, +{'l', 15, 6}, +{'l', 16, 5}, +}; +static cdOperation vf_default_char_65[] = { +{'m', 16, 0}, +{'l', 8, 21}, +{'l', 0, 0}, +{'m', 3, 7}, +{'l', 13, 7}, +}; +static cdOperation vf_default_char_66[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 0, 21}, +{'l', 9, 21}, +{'l', 12, 20}, +{'l', 13, 19}, +{'l', 14, 17}, +{'l', 14, 15}, +{'l', 13, 13}, +{'l', 12, 12}, +{'l', 9, 11}, +{'m', 0, 11}, +{'l', 9, 11}, +{'l', 12, 10}, +{'l', 13, 9}, +{'l', 14, 7}, +{'l', 14, 4}, +{'l', 13, 2}, +{'l', 12, 1}, +{'l', 9, 0}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_67[] = { +{'m', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +}; +static cdOperation vf_default_char_68[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 0, 21}, +{'l', 7, 21}, +{'l', 10, 20}, +{'l', 12, 18}, +{'l', 13, 16}, +{'l', 14, 13}, +{'l', 14, 8}, +{'l', 13, 5}, +{'l', 12, 3}, +{'l', 10, 1}, +{'l', 7, 0}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_69[] = { +{'m', 13, 21}, +{'l', 0, 21}, +{'l', 0, 0}, +{'l', 13, 0}, +{'m', 0, 11}, +{'l', 8, 11}, +}; +static cdOperation vf_default_char_70[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 0, 21}, +{'l', 13, 21}, +{'m', 0, 11}, +{'l', 8, 11}, +}; +static cdOperation vf_default_char_71[] = { +{'m', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'l', 15, 8}, +{'m', 10, 8}, +{'l', 15, 8}, +}; +static cdOperation vf_default_char_72[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 14, 21}, +{'l', 14, 0}, +{'m', 0, 11}, +{'l', 14, 11}, +}; +static cdOperation vf_default_char_73[] = { +{'m', 0, 21}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_74[] = { +{'m', 10, 21}, +{'l', 10, 5}, +{'l', 9, 2}, +{'l', 8, 1}, +{'l', 6, 0}, +{'l', 4, 0}, +{'l', 2, 1}, +{'l', 1, 2}, +{'l', 0, 5}, +{'l', 0, 7}, +}; +static cdOperation vf_default_char_75[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 14, 21}, +{'l', 0, 7}, +{'m', 5, 12}, +{'l', 14, 0}, +}; +static cdOperation vf_default_char_76[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 0, 0}, +{'l', 12, 0}, +}; +static cdOperation vf_default_char_77[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 0, 21}, +{'l', 8, 0}, +{'m', 16, 21}, +{'l', 8, 0}, +{'m', 16, 21}, +{'l', 16, 0}, +}; +static cdOperation vf_default_char_78[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 0, 21}, +{'l', 14, 0}, +{'m', 14, 21}, +{'l', 14, 0}, +}; +static cdOperation vf_default_char_79[] = { +{'m', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'l', 16, 8}, +{'l', 16, 13}, +{'l', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +}; +static cdOperation vf_default_char_80[] = { +{'m', 0, 10}, +{'l', 9, 10}, +{'l', 12, 11}, +{'l', 13, 12}, +{'l', 14, 14}, +{'l', 14, 17}, +{'l', 13, 19}, +{'l', 12, 20}, +{'l', 9, 21}, +{'l', 0, 21}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_81[] = { +{'m', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'l', 16, 8}, +{'l', 16, 13}, +{'l', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'m', 9, 4}, +{'l', 15, -2}, +}; +static cdOperation vf_default_char_82[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 0, 21}, +{'l', 9, 21}, +{'l', 12, 20}, +{'l', 13, 19}, +{'l', 14, 17}, +{'l', 14, 15}, +{'l', 13, 13}, +{'l', 12, 12}, +{'l', 9, 11}, +{'l', 0, 11}, +{'m', 7, 11}, +{'l', 14, 0}, +}; +static cdOperation vf_default_char_83[] = { +{'m', 14, 18}, +{'l', 12, 20}, +{'l', 9, 21}, +{'l', 5, 21}, +{'l', 2, 20}, +{'l', 0, 18}, +{'l', 0, 16}, +{'l', 1, 14}, +{'l', 2, 13}, +{'l', 4, 12}, +{'l', 10, 10}, +{'l', 12, 9}, +{'l', 13, 8}, +{'l', 14, 6}, +{'l', 14, 3}, +{'l', 12, 1}, +{'l', 9, 0}, +{'l', 5, 0}, +{'l', 2, 1}, +{'l', 0, 3}, +}; +static cdOperation vf_default_char_84[] = { +{'m', 7, 21}, +{'l', 7, 0}, +{'m', 0, 21}, +{'l', 14, 21}, +}; +static cdOperation vf_default_char_85[] = { +{'m', 0, 21}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 6, 0}, +{'l', 8, 0}, +{'l', 11, 1}, +{'l', 13, 3}, +{'l', 14, 6}, +{'l', 14, 21}, +}; +static cdOperation vf_default_char_86[] = { +{'m', 0, 21}, +{'l', 8, 0}, +{'m', 16, 21}, +{'l', 8, 0}, +}; +static cdOperation vf_default_char_87[] = { +{'m', 0, 21}, +{'l', 5, 0}, +{'m', 10, 21}, +{'l', 5, 0}, +{'m', 10, 21}, +{'l', 15, 0}, +{'m', 20, 21}, +{'l', 15, 0}, +}; +static cdOperation vf_default_char_88[] = { +{'m', 0, 21}, +{'l', 14, 0}, +{'m', 14, 21}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_89[] = { +{'m', 0, 21}, +{'l', 8, 11}, +{'l', 8, 0}, +{'m', 16, 21}, +{'l', 8, 11}, +}; +static cdOperation vf_default_char_90[] = { +{'m', 14, 21}, +{'l', 0, 0}, +{'m', 0, 21}, +{'l', 14, 21}, +{'m', 0, 0}, +{'l', 14, 0}, +}; +static cdOperation vf_default_char_91[] = { +{'m', 0, 19}, +{'l', 0, -1}, +{'m', 1, 19}, +{'l', 1, -1}, +{'m', 0, 19}, +{'l', 5, 19}, +{'m', 0, -1}, +{'l', 5, -1}, +}; +static cdOperation vf_default_char_92[] = { +{'m', 0, 21}, +{'l', 14, -3}, +}; +static cdOperation vf_default_char_93[] = { +{'m', 4, 19}, +{'l', 4, -1}, +{'m', 5, 19}, +{'l', 5, -1}, +{'m', 0, 19}, +{'l', 5, 19}, +{'m', 0, -1}, +{'l', 5, -1}, +}; +static cdOperation vf_default_char_94[] = { +{'m', 8, 18}, +{'l', 3, 14}, +{'l', 8, 19}, +{'l', 13, 14}, +{'l', 8, 18}, +{'l', 8, 18}, +}; +static cdOperation vf_default_char_95[] = { +{'m', 0, -7}, +{'l', 16, -7}, +}; +static cdOperation vf_default_char_96[] = { +{'m', 2, 21}, +{'l', 1, 20}, +{'l', 0, 18}, +{'l', 0, 16}, +{'l', 1, 15}, +{'l', 2, 16}, +{'l', 1, 17}, +}; +static cdOperation vf_default_char_97[] = { +{'m', 12, 14}, +{'l', 12, 0}, +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +}; +static cdOperation vf_default_char_98[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 0, 11}, +{'l', 2, 13}, +{'l', 4, 14}, +{'l', 7, 14}, +{'l', 9, 13}, +{'l', 11, 11}, +{'l', 12, 8}, +{'l', 12, 6}, +{'l', 11, 3}, +{'l', 9, 1}, +{'l', 7, 0}, +{'l', 4, 0}, +{'l', 2, 1}, +{'l', 0, 3}, +}; +static cdOperation vf_default_char_99[] = { +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +}; +static cdOperation vf_default_char_100[] = { +{'m', 12, 21}, +{'l', 12, 0}, +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +}; +static cdOperation vf_default_char_101[] = { +{'m', 0, 8}, +{'l', 12, 8}, +{'l', 12, 10}, +{'l', 11, 12}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +}; +static cdOperation vf_default_char_102[] = { +{'m', 8, 21}, +{'l', 6, 21}, +{'l', 4, 20}, +{'l', 3, 17}, +{'l', 3, 0}, +{'m', 0, 14}, +{'l', 7, 14}, +}; +static cdOperation vf_default_char_103[] = { +{'m', 12, 14}, +{'l', 12, -2}, +{'l', 11, -5}, +{'l', 10, -6}, +{'l', 8, -7}, +{'l', 5, -7}, +{'l', 3, -6}, +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +}; +static cdOperation vf_default_char_104[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 0, 10}, +{'l', 3, 13}, +{'l', 5, 14}, +{'l', 8, 14}, +{'l', 10, 13}, +{'l', 11, 10}, +{'l', 11, 0}, +}; +static cdOperation vf_default_char_105[] = { +{'m', 2, 21}, +{'l', 3, 20}, +{'l', 4, 21}, +{'l', 3, 22}, +{'l', 2, 21}, +{'m', 3, 14}, +{'l', 3, 0}, +}; +static cdOperation vf_default_char_106[] = { +{'m', 4, 21}, +{'l', 5, 20}, +{'l', 6, 21}, +{'l', 5, 22}, +{'l', 4, 21}, +{'m', 5, 14}, +{'l', 5, -3}, +{'l', 4, -6}, +{'l', 2, -7}, +{'l', 0, -7}, +}; +static cdOperation vf_default_char_107[] = { +{'m', 0, 21}, +{'l', 0, 0}, +{'m', 10, 14}, +{'l', 0, 4}, +{'m', 4, 8}, +{'l', 11, 0}, +}; +static cdOperation vf_default_char_108[] = { +{'m', 0, 21}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_109[] = { +{'m', 0, 14}, +{'l', 0, 0}, +{'m', 0, 10}, +{'l', 3, 13}, +{'l', 5, 14}, +{'l', 8, 14}, +{'l', 10, 13}, +{'l', 11, 10}, +{'l', 11, 0}, +{'m', 11, 10}, +{'l', 14, 13}, +{'l', 16, 14}, +{'l', 19, 14}, +{'l', 21, 13}, +{'l', 22, 10}, +{'l', 22, 0}, +}; +static cdOperation vf_default_char_110[] = { +{'m', 0, 14}, +{'l', 0, 0}, +{'m', 0, 10}, +{'l', 3, 13}, +{'l', 5, 14}, +{'l', 8, 14}, +{'l', 10, 13}, +{'l', 11, 10}, +{'l', 11, 0}, +}; +static cdOperation vf_default_char_111[] = { +{'m', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 13, 8}, +{'l', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +}; +static cdOperation vf_default_char_112[] = { +{'m', 0, 14}, +{'l', 0, -7}, +{'m', 0, 11}, +{'l', 2, 13}, +{'l', 4, 14}, +{'l', 7, 14}, +{'l', 9, 13}, +{'l', 11, 11}, +{'l', 12, 8}, +{'l', 12, 6}, +{'l', 11, 3}, +{'l', 9, 1}, +{'l', 7, 0}, +{'l', 4, 0}, +{'l', 2, 1}, +{'l', 0, 3}, +}; +static cdOperation vf_default_char_113[] = { +{'m', 12, 14}, +{'l', 12, -7}, +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +}; +static cdOperation vf_default_char_114[] = { +{'m', 0, 14}, +{'l', 0, 0}, +{'m', 0, 8}, +{'l', 1, 11}, +{'l', 3, 13}, +{'l', 5, 14}, +{'l', 8, 14}, +}; +static cdOperation vf_default_char_115[] = { +{'m', 11, 11}, +{'l', 10, 13}, +{'l', 7, 14}, +{'l', 4, 14}, +{'l', 1, 13}, +{'l', 0, 11}, +{'l', 1, 9}, +{'l', 3, 8}, +{'l', 8, 7}, +{'l', 10, 6}, +{'l', 11, 4}, +{'l', 11, 3}, +{'l', 10, 1}, +{'l', 7, 0}, +{'l', 4, 0}, +{'l', 1, 1}, +{'l', 0, 3}, +}; +static cdOperation vf_default_char_116[] = { +{'m', 3, 21}, +{'l', 3, 4}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 8, 0}, +{'m', 0, 14}, +{'l', 7, 14}, +}; +static cdOperation vf_default_char_117[] = { +{'m', 0, 14}, +{'l', 0, 4}, +{'l', 1, 1}, +{'l', 3, 0}, +{'l', 6, 0}, +{'l', 8, 1}, +{'l', 11, 4}, +{'m', 11, 14}, +{'l', 11, 0}, +}; +static cdOperation vf_default_char_118[] = { +{'m', 0, 14}, +{'l', 6, 0}, +{'m', 12, 14}, +{'l', 6, 0}, +}; +static cdOperation vf_default_char_119[] = { +{'m', 0, 14}, +{'l', 4, 0}, +{'m', 8, 14}, +{'l', 4, 0}, +{'m', 8, 14}, +{'l', 12, 0}, +{'m', 16, 14}, +{'l', 12, 0}, +}; +static cdOperation vf_default_char_120[] = { +{'m', 0, 14}, +{'l', 11, 0}, +{'m', 11, 14}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_121[] = { +{'m', 1, 14}, +{'l', 7, 0}, +{'m', 13, 14}, +{'l', 7, 0}, +{'l', 5, -4}, +{'l', 3, -6}, +{'l', 1, -7}, +{'l', 0, -7}, +}; +static cdOperation vf_default_char_122[] = { +{'m', 11, 14}, +{'l', 0, 0}, +{'m', 0, 14}, +{'l', 11, 14}, +{'m', 0, 0}, +{'l', 11, 0}, +}; +static cdOperation vf_default_char_123[] = { +{'m', 5, 25}, +{'l', 3, 24}, +{'l', 2, 23}, +{'l', 1, 21}, +{'l', 1, 19}, +{'l', 2, 17}, +{'l', 3, 16}, +{'l', 4, 14}, +{'l', 4, 12}, +{'l', 2, 10}, +{'m', 3, 24}, +{'l', 2, 22}, +{'l', 2, 20}, +{'l', 3, 18}, +{'l', 4, 17}, +{'l', 5, 15}, +{'l', 5, 13}, +{'l', 4, 11}, +{'l', 0, 9}, +{'l', 4, 7}, +{'l', 5, 5}, +{'l', 5, 3}, +{'l', 4, 1}, +{'l', 3, 0}, +{'l', 2, -2}, +{'l', 2, -4}, +{'l', 3, -6}, +{'m', 2, 8}, +{'l', 4, 6}, +{'l', 4, 4}, +{'l', 3, 2}, +{'l', 2, 1}, +{'l', 1, -1}, +{'l', 1, -3}, +{'l', 2, -5}, +{'l', 3, -6}, +{'l', 5, -7}, +}; +static cdOperation vf_default_char_124[] = { +{'m', 0, 21}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_125[] = { +{'m', 0, 25}, +{'l', 2, 24}, +{'l', 3, 23}, +{'l', 4, 21}, +{'l', 4, 19}, +{'l', 3, 17}, +{'l', 2, 16}, +{'l', 1, 14}, +{'l', 1, 12}, +{'l', 3, 10}, +{'m', 2, 24}, +{'l', 3, 22}, +{'l', 3, 20}, +{'l', 2, 18}, +{'l', 1, 17}, +{'l', 0, 15}, +{'l', 0, 13}, +{'l', 1, 11}, +{'l', 5, 9}, +{'l', 1, 7}, +{'l', 0, 5}, +{'l', 0, 3}, +{'l', 1, 1}, +{'l', 2, 0}, +{'l', 3, -2}, +{'l', 3, -4}, +{'l', 2, -6}, +{'m', 3, 8}, +{'l', 1, 6}, +{'l', 1, 4}, +{'l', 2, 2}, +{'l', 3, 1}, +{'l', 4, -1}, +{'l', 4, -3}, +{'l', 3, -5}, +{'l', 2, -6}, +{'l', 0, -7}, +}; +static cdOperation vf_default_char_126[] = { +{'m', 0, 16}, +{'l', 5, 19}, +{'l', 9, 16}, +{'l', 13, 18}, +}; +static cdOperation vf_default_char_127[] = { +{'m', 0, 7}, +{'l', 0, 0}, +{'l', 12, 0}, +{'l', 12, 7}, +{'l', 6, 16}, +{'l', 0, 7}, +{'m', 6, 6}, +{'l', 6, 6}, +}; +static cdOperation vf_default_char_128[] = { +{'m', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'m', 8, 0}, +{'l', 8, -1}, +{'l', 7, -1}, +{'l', 7, 0}, +{'m', 3, -4}, +{'l', 3, -6}, +{'l', 4, -7}, +{'l', 10, -7}, +{'l', 12, -5}, +{'l', 12, -4}, +{'l', 10, -2}, +{'l', 8, -1}, +}; +static cdOperation vf_default_char_129[] = { +{'m', 0, 14}, +{'l', 0, 4}, +{'l', 1, 1}, +{'l', 3, 0}, +{'l', 6, 0}, +{'l', 8, 1}, +{'l', 11, 4}, +{'m', 11, 14}, +{'l', 11, 0}, +{'m', 2, 19}, +{'l', 1, 18}, +{'l', 2, 17}, +{'l', 3, 18}, +{'l', 2, 19}, +{'m', 10, 19}, +{'l', 9, 18}, +{'l', 10, 17}, +{'l', 11, 18}, +{'l', 10, 19}, +}; +static cdOperation vf_default_char_130[] = { +{'m', 0, 8}, +{'l', 12, 8}, +{'l', 12, 10}, +{'l', 11, 12}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'m', 10, 22}, +{'l', 5, 17}, +}; +static cdOperation vf_default_char_131[] = { +{'m', 13, 14}, +{'l', 13, 0}, +{'m', 13, 11}, +{'l', 11, 13}, +{'l', 9, 14}, +{'l', 6, 14}, +{'l', 4, 13}, +{'l', 2, 11}, +{'l', 1, 8}, +{'l', 1, 6}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 9, 0}, +{'l', 11, 1}, +{'l', 13, 3}, +{'m', 3, 16}, +{'l', 8, 21}, +{'l', 13, 16}, +}; +static cdOperation vf_default_char_132[] = { +{'m', 12, 14}, +{'l', 12, 0}, +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'m', 2, 19}, +{'l', 1, 18}, +{'l', 2, 17}, +{'l', 3, 18}, +{'l', 2, 19}, +{'m', 10, 19}, +{'l', 9, 18}, +{'l', 10, 17}, +{'l', 11, 18}, +{'l', 10, 19}, +}; +static cdOperation vf_default_char_133[] = { +{'m', 12, 14}, +{'l', 12, 0}, +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'m', 3, 22}, +{'l', 8, 17}, +}; +static cdOperation vf_default_char_134[] = { +{'m', 12, 14}, +{'l', 12, 0}, +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'m', 5, 19}, +{'l', 4, 18}, +{'l', 5, 17}, +{'l', 7, 17}, +{'l', 8, 18}, +{'l', 7, 19}, +{'l', 5, 19}, +}; +static cdOperation vf_default_char_135[] = { +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'m', 6, 0}, +{'l', 6, -1}, +{'l', 9, -2}, +{'l', 10, -5}, +{'l', 8, -7}, +{'l', 4, -7}, +{'l', 3, -5}, +}; +static cdOperation vf_default_char_136[] = { +{'m', 2, 8}, +{'l', 14, 8}, +{'l', 14, 10}, +{'l', 13, 12}, +{'l', 12, 13}, +{'l', 10, 14}, +{'l', 7, 14}, +{'l', 5, 13}, +{'l', 3, 11}, +{'l', 2, 8}, +{'l', 2, 6}, +{'l', 3, 3}, +{'l', 5, 1}, +{'l', 7, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'m', 4, 16}, +{'l', 9, 21}, +{'l', 14, 16}, +}; +static cdOperation vf_default_char_137[] = { +{'m', 0, 8}, +{'l', 12, 8}, +{'l', 12, 10}, +{'l', 11, 12}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'m', 3, 19}, +{'l', 2, 18}, +{'l', 3, 17}, +{'l', 4, 18}, +{'l', 3, 19}, +{'m', 11, 19}, +{'l', 10, 18}, +{'l', 11, 17}, +{'l', 12, 18}, +{'l', 11, 19}, +}; +static cdOperation vf_default_char_138[] = { +{'m', 0, 8}, +{'l', 12, 8}, +{'l', 12, 10}, +{'l', 11, 12}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'m', 2, 22}, +{'l', 7, 17}, +}; +static cdOperation vf_default_char_139[] = { +{'m', 5, 14}, +{'l', 5, 0}, +{'m', 1, 19}, +{'l', 0, 18}, +{'l', 1, 17}, +{'l', 2, 18}, +{'l', 1, 19}, +{'m', 9, 19}, +{'l', 8, 18}, +{'l', 9, 17}, +{'l', 10, 18}, +{'l', 9, 19}, +}; +static cdOperation vf_default_char_140[] = { +{'m', 8, 14}, +{'l', 8, 0}, +{'m', 3, 16}, +{'l', 8, 21}, +{'l', 13, 16}, +}; +static cdOperation vf_default_char_141[] = { +{'m', 5, 14}, +{'l', 5, 0}, +{'m', 0, 22}, +{'l', 5, 17}, +}; +static cdOperation vf_default_char_142[] = { +{'m', 16, 0}, +{'l', 8, 21}, +{'l', 0, 0}, +{'m', 3, 7}, +{'l', 13, 7}, +{'m', 4, 26}, +{'l', 3, 25}, +{'l', 4, 24}, +{'l', 5, 25}, +{'l', 4, 26}, +{'m', 12, 26}, +{'l', 11, 25}, +{'l', 12, 24}, +{'l', 13, 25}, +{'l', 12, 26}, +}; +static cdOperation vf_default_char_143[] = { +{'m', 16, 0}, +{'l', 8, 21}, +{'l', 0, 0}, +{'m', 3, 7}, +{'l', 13, 7}, +{'m', 7, 26}, +{'l', 6, 25}, +{'l', 7, 24}, +{'l', 9, 24}, +{'l', 10, 25}, +{'l', 9, 26}, +{'l', 7, 26}, +}; +static cdOperation vf_default_char_144[] = { +{'m', 13, 21}, +{'l', 0, 21}, +{'l', 0, 0}, +{'l', 13, 0}, +{'m', 0, 11}, +{'l', 8, 11}, +{'m', 10, 28}, +{'l', 5, 23}, +}; +static cdOperation vf_default_char_145[] = { +{'m', 12, 14}, +{'l', 12, 0}, +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'m', 17, 14}, +{'l', 20, 14}, +{'l', 22, 13}, +{'l', 23, 12}, +{'l', 24, 10}, +{'l', 24, 8}, +{'l', 12, 8}, +{'l', 13, 11}, +{'l', 15, 13}, +{'l', 17, 14}, +{'m', 12, 6}, +{'l', 13, 3}, +{'l', 15, 1}, +{'l', 17, 0}, +{'l', 20, 0}, +{'l', 22, 1}, +{'l', 24, 3}, +}; +static cdOperation vf_default_char_146[] = { +{'m', 23, 21}, +{'l', 8, 21}, +{'l', 0, 0}, +{'m', 10, 21}, +{'l', 10, 0}, +{'l', 23, 0}, +{'m', 10, 11}, +{'l', 18, 11}, +{'m', 3, 7}, +{'l', 10, 7}, +}; +static cdOperation vf_default_char_147[] = { +{'m', 6, 14}, +{'l', 4, 13}, +{'l', 2, 11}, +{'l', 1, 8}, +{'l', 1, 6}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 9, 0}, +{'l', 11, 1}, +{'l', 13, 3}, +{'l', 14, 6}, +{'l', 14, 8}, +{'l', 13, 11}, +{'l', 11, 13}, +{'l', 9, 14}, +{'l', 6, 14}, +{'m', 3, 16}, +{'l', 8, 21}, +{'l', 13, 16}, +}; +static cdOperation vf_default_char_148[] = { +{'m', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 13, 8}, +{'l', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'m', 3, 19}, +{'l', 2, 18}, +{'l', 3, 17}, +{'l', 4, 18}, +{'l', 3, 19}, +{'m', 11, 19}, +{'l', 10, 18}, +{'l', 11, 17}, +{'l', 12, 18}, +{'l', 11, 19}, +}; +static cdOperation vf_default_char_149[] = { +{'m', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 13, 8}, +{'l', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'m', 2, 22}, +{'l', 7, 17}, +}; +static cdOperation vf_default_char_150[] = { +{'m', 2, 14}, +{'l', 2, 4}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 13, 4}, +{'m', 13, 14}, +{'l', 13, 0}, +{'m', 3, 17}, +{'l', 8, 22}, +{'l', 13, 17}, +}; +static cdOperation vf_default_char_151[] = { +{'m', 0, 14}, +{'l', 0, 4}, +{'l', 1, 1}, +{'l', 3, 0}, +{'l', 6, 0}, +{'l', 8, 1}, +{'l', 11, 4}, +{'m', 11, 14}, +{'l', 11, 0}, +{'m', 1, 22}, +{'l', 6, 17}, +}; +static cdOperation vf_default_char_152[] = { +{'m', 1, 14}, +{'l', 7, 0}, +{'l', 5, -4}, +{'l', 3, -6}, +{'l', 1, -7}, +{'l', 0, -7}, +{'m', 13, 14}, +{'l', 7, 0}, +{'m', 3, 19}, +{'l', 2, 18}, +{'l', 3, 17}, +{'l', 4, 18}, +{'l', 3, 19}, +{'m', 11, 19}, +{'l', 10, 18}, +{'l', 11, 17}, +{'l', 12, 18}, +{'l', 11, 19}, +}; +static cdOperation vf_default_char_153[] = { +{'m', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'l', 16, 8}, +{'l', 16, 13}, +{'l', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'m', 4, 26}, +{'l', 3, 25}, +{'l', 4, 24}, +{'l', 5, 25}, +{'l', 4, 26}, +{'m', 12, 26}, +{'l', 11, 25}, +{'l', 12, 24}, +{'l', 13, 25}, +{'l', 12, 26}, +}; +static cdOperation vf_default_char_154[] = { +{'m', 0, 21}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 6, 0}, +{'l', 8, 0}, +{'l', 11, 1}, +{'l', 13, 3}, +{'l', 14, 6}, +{'l', 14, 21}, +{'m', 3, 26}, +{'l', 2, 25}, +{'l', 3, 24}, +{'l', 4, 25}, +{'l', 3, 26}, +{'m', 11, 26}, +{'l', 10, 25}, +{'l', 11, 24}, +{'l', 12, 25}, +{'l', 11, 26}, +}; +static cdOperation vf_default_char_155[] = { +{'m', 12, 15}, +{'l', 10, 17}, +{'l', 8, 18}, +{'l', 5, 18}, +{'l', 3, 17}, +{'l', 1, 15}, +{'l', 0, 12}, +{'l', 0, 10}, +{'l', 1, 7}, +{'l', 3, 5}, +{'l', 5, 4}, +{'l', 8, 4}, +{'l', 10, 5}, +{'l', 12, 7}, +{'m', 6, 0}, +{'l', 6, 22}, +}; +static cdOperation vf_default_char_156[] = { +{'m', 13, 20}, +{'l', 10, 21}, +{'l', 8, 21}, +{'l', 5, 20}, +{'l', 4, 19}, +{'l', 3, 16}, +{'l', 3, 0}, +{'l', 12, 0}, +{'l', 15, 1}, +{'l', 15, 2}, +{'m', 0, 12}, +{'l', 7, 12}, +}; +static cdOperation vf_default_char_157[] = { +{'m', 0, 21}, +{'l', 8, 11}, +{'l', 8, 0}, +{'m', 16, 21}, +{'l', 8, 11}, +{'m', 4, 11}, +{'l', 13, 11}, +{'m', 4, 8}, +{'l', 13, 8}, +}; +static cdOperation vf_default_char_158[] = { +{'m', 0, 10}, +{'l', 9, 10}, +{'l', 12, 11}, +{'l', 13, 12}, +{'l', 14, 14}, +{'l', 14, 17}, +{'l', 13, 19}, +{'l', 12, 20}, +{'l', 9, 21}, +{'l', 0, 21}, +{'l', 0, 0}, +{'m', 12, 8}, +{'l', 18, 8}, +{'m', 15, 12}, +{'l', 15, 2}, +{'l', 16, 0}, +{'l', 18, 0}, +{'l', 19, 1}, +}; +static cdOperation vf_default_char_159[] = { +{'m', 0, 21}, +{'l', 8, 11}, +{'l', 8, 0}, +{'m', 16, 21}, +{'l', 8, 11}, +{'m', 4, 25}, +{'l', 3, 24}, +{'l', 4, 23}, +{'l', 5, 24}, +{'l', 4, 25}, +{'m', 12, 25}, +{'l', 11, 24}, +{'l', 12, 23}, +{'l', 13, 24}, +{'l', 12, 25}, +}; +static cdOperation vf_default_char_160[] = { +{'m', 12, 14}, +{'l', 12, 0}, +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'m', 10, 22}, +{'l', 5, 17}, +}; +static cdOperation vf_default_char_161[] = { +{'m', 3, 14}, +{'l', 3, 0}, +{'m', 7, 22}, +{'l', 2, 17}, +}; +static cdOperation vf_default_char_162[] = { +{'m', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 13, 8}, +{'l', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'m', 11, 22}, +{'l', 6, 17}, +}; +static cdOperation vf_default_char_163[] = { +{'m', 0, 14}, +{'l', 0, 4}, +{'l', 1, 1}, +{'l', 3, 0}, +{'l', 6, 0}, +{'l', 8, 1}, +{'l', 11, 4}, +{'m', 11, 14}, +{'l', 11, 0}, +{'m', 9, 22}, +{'l', 4, 17}, +}; +static cdOperation vf_default_char_164[] = { +{'m', 0, 14}, +{'l', 0, 0}, +{'m', 0, 10}, +{'l', 3, 13}, +{'l', 5, 14}, +{'l', 8, 14}, +{'l', 10, 13}, +{'l', 11, 10}, +{'l', 11, 0}, +{'m', 0, 17}, +{'l', 5, 20}, +{'l', 9, 17}, +{'l', 13, 19}, +}; +static cdOperation vf_default_char_165[] = { +{'m', 14, 21}, +{'l', 14, 0}, +{'l', 0, 21}, +{'l', 0, 0}, +{'m', 0, 24}, +{'l', 5, 27}, +{'l', 9, 24}, +{'l', 13, 26}, +}; +static cdOperation vf_default_char_166[] = { +{'m', 12, 21}, +{'l', 12, 7}, +{'m', 12, 18}, +{'l', 10, 20}, +{'l', 8, 21}, +{'l', 5, 21}, +{'l', 3, 20}, +{'l', 1, 18}, +{'l', 0, 15}, +{'l', 0, 13}, +{'l', 1, 10}, +{'l', 3, 8}, +{'l', 5, 7}, +{'l', 8, 7}, +{'l', 10, 8}, +{'l', 12, 10}, +{'m', 0, 0}, +{'l', 12, 0}, +}; +static cdOperation vf_default_char_167[] = { +{'m', 0, 15}, +{'l', 1, 12}, +{'l', 3, 10}, +{'l', 5, 9}, +{'l', 8, 9}, +{'l', 10, 10}, +{'l', 12, 12}, +{'l', 13, 15}, +{'l', 12, 18}, +{'l', 10, 20}, +{'l', 8, 21}, +{'l', 5, 21}, +{'l', 3, 20}, +{'l', 1, 18}, +{'l', 0, 15}, +{'m', 0, 0}, +{'l', 13, 0}, +}; +static cdOperation vf_default_char_168[] = { +{'m', 12, 5}, +{'l', 12, 4}, +{'l', 11, 2}, +{'l', 10, 1}, +{'l', 8, 0}, +{'l', 4, 0}, +{'l', 2, 1}, +{'l', 1, 2}, +{'l', 0, 4}, +{'l', 0, 6}, +{'l', 1, 8}, +{'l', 2, 9}, +{'l', 6, 11}, +{'l', 6, 14}, +{'m', 6, 19}, +{'l', 7, 20}, +{'l', 6, 21}, +{'l', 5, 20}, +{'l', 6, 19}, +}; +static cdOperation vf_default_char_169[] = { +{'m', 0, 0}, +{'l', 0, 8}, +{'l', 12, 8}, +{'l', 12, 5}, +{'l', 3, 5}, +{'l', 3, 0}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_170[] = { +{'m', 12, 0}, +{'l', 12, 8}, +{'l', 0, 8}, +{'l', 0, 5}, +{'l', 9, 5}, +{'l', 9, 0}, +{'l', 12, 0}, +}; +static cdOperation vf_default_char_171[] = { +{'m', 0, 18}, +{'l', 3, 21}, +{'l', 4, 21}, +{'l', 4, 12}, +{'m', 9, 6}, +{'l', 9, 7}, +{'l', 11, 9}, +{'l', 15, 9}, +{'l', 16, 7}, +{'l', 16, 5}, +{'l', 15, 4}, +{'l', 9, 0}, +{'l', 16, 0}, +{'m', 15, 21}, +{'l', 1, 0}, +}; +static cdOperation vf_default_char_172[] = { +{'m', 0, 18}, +{'l', 3, 21}, +{'l', 4, 21}, +{'l', 4, 12}, +{'m', 15, 21}, +{'l', 1, 0}, +{'m', 15, 3}, +{'l', 7, 3}, +{'l', 13, 9}, +{'l', 13, 0}, +}; +static cdOperation vf_default_char_173[] = { +{'m', 1, 0}, +{'l', 1, 14}, +{'m', 1, 19}, +{'l', 0, 20}, +{'l', 1, 21}, +{'l', 2, 20}, +{'l', 1, 19}, +}; +static cdOperation vf_default_char_174[] = { +{'m', 7, 17}, +{'l', 0, 11}, +{'l', 7, 5}, +{'m', 15, 17}, +{'l', 8, 11}, +{'l', 15, 5}, +}; +static cdOperation vf_default_char_175[] = { +{'m', 8, 17}, +{'l', 15, 11}, +{'l', 8, 5}, +{'m', 0, 17}, +{'l', 7, 11}, +{'l', 0, 5}, +}; +static cdOperation vf_default_char_176[] = { +{'m', 4, 21}, +{'l', 6, 21}, +{'l', 6, 19}, +{'l', 4, 19}, +{'l', 4, 21}, +{'m', 5, 21}, +{'l', 5, 19}, +{'m', 4, 15}, +{'l', 6, 15}, +{'l', 6, 13}, +{'l', 4, 13}, +{'l', 4, 15}, +{'m', 5, 15}, +{'l', 5, 13}, +{'m', 4, 9}, +{'l', 6, 9}, +{'l', 6, 7}, +{'l', 4, 7}, +{'l', 4, 9}, +{'m', 5, 9}, +{'l', 5, 7}, +{'m', 4, 3}, +{'l', 6, 3}, +{'l', 6, 1}, +{'l', 4, 1}, +{'l', 4, 3}, +{'m', 5, 3}, +{'l', 5, 1}, +{'m', 0, 18}, +{'l', 2, 18}, +{'l', 2, 16}, +{'l', 0, 16}, +{'l', 0, 18}, +{'m', 1, 18}, +{'l', 1, 16}, +{'m', 0, 12}, +{'l', 2, 12}, +{'l', 2, 10}, +{'l', 0, 10}, +{'l', 0, 12}, +{'m', 1, 12}, +{'l', 1, 10}, +{'m', 0, 6}, +{'l', 2, 6}, +{'l', 2, 4}, +{'l', 0, 4}, +{'l', 0, 6}, +{'m', 1, 6}, +{'l', 1, 4}, +{'m', 0, 0}, +{'l', 2, 0}, +{'l', 2, -2}, +{'l', 0, -2}, +{'l', 0, 0}, +{'m', 1, 0}, +{'l', 1, -2}, +{'m', 8, 18}, +{'l', 10, 18}, +{'l', 10, 16}, +{'l', 8, 16}, +{'l', 8, 18}, +{'m', 9, 18}, +{'l', 9, 16}, +{'m', 8, 12}, +{'l', 10, 12}, +{'l', 10, 10}, +{'l', 8, 10}, +{'l', 8, 12}, +{'m', 9, 12}, +{'l', 9, 10}, +{'m', 8, 6}, +{'l', 10, 6}, +{'l', 10, 4}, +{'l', 8, 4}, +{'l', 8, 6}, +{'m', 9, 6}, +{'l', 9, 4}, +{'m', 8, 0}, +{'l', 10, 0}, +{'l', 10, -2}, +{'l', 8, -2}, +{'l', 8, 0}, +{'m', 9, 0}, +{'l', 9, -2}, +{'m', 12, 21}, +{'l', 14, 21}, +{'l', 14, 19}, +{'l', 12, 19}, +{'l', 12, 21}, +{'m', 13, 21}, +{'l', 13, 19}, +{'m', 12, 15}, +{'l', 14, 15}, +{'l', 14, 13}, +{'l', 12, 13}, +{'l', 12, 15}, +{'m', 13, 15}, +{'l', 13, 13}, +{'m', 12, 9}, +{'l', 14, 9}, +{'l', 14, 7}, +{'l', 12, 7}, +{'l', 12, 9}, +{'m', 13, 9}, +{'l', 13, 7}, +{'m', 12, 3}, +{'l', 14, 3}, +{'l', 14, 1}, +{'l', 12, 1}, +{'l', 12, 3}, +{'m', 13, 3}, +{'l', 13, 1}, +{'m', 3, -3}, +{'l', 3, -5}, +{'l', 5, -5}, +{'l', 5, -3}, +{'l', 3, -3}, +{'m', 4, -3}, +{'l', 4, -5}, +{'m', 12, -3}, +{'l', 12, -5}, +{'l', 14, -5}, +{'l', 14, -3}, +{'l', 12, -3}, +{'m', 13, -3}, +{'l', 13, -5}, +}; +static cdOperation vf_default_char_177[] = { +{'m', 0, 18}, +{'l', 2, 18}, +{'l', 2, 16}, +{'l', 0, 16}, +{'l', 0, 18}, +{'m', 1, 18}, +{'l', 1, 16}, +{'m', 0, 12}, +{'l', 2, 12}, +{'l', 2, 10}, +{'l', 0, 10}, +{'l', 0, 12}, +{'m', 1, 12}, +{'l', 1, 10}, +{'m', 0, 6}, +{'l', 2, 6}, +{'l', 2, 4}, +{'l', 0, 4}, +{'l', 0, 6}, +{'m', 1, 6}, +{'l', 1, 4}, +{'m', 0, 0}, +{'l', 2, 0}, +{'l', 2, -2}, +{'l', 0, -2}, +{'l', 0, 0}, +{'m', 1, 0}, +{'l', 1, -2}, +{'m', 2, 21}, +{'l', 4, 21}, +{'l', 4, 19}, +{'l', 2, 19}, +{'l', 2, 21}, +{'m', 3, 21}, +{'l', 3, 19}, +{'m', 2, 15}, +{'l', 4, 15}, +{'l', 4, 13}, +{'l', 2, 13}, +{'l', 2, 15}, +{'m', 3, 15}, +{'l', 3, 13}, +{'m', 2, 9}, +{'l', 4, 9}, +{'l', 4, 7}, +{'l', 2, 7}, +{'l', 2, 9}, +{'m', 3, 9}, +{'l', 3, 7}, +{'m', 2, 3}, +{'l', 4, 3}, +{'l', 4, 1}, +{'l', 2, 1}, +{'l', 2, 3}, +{'m', 3, 3}, +{'l', 3, 1}, +{'m', 4, 18}, +{'l', 6, 18}, +{'l', 6, 16}, +{'l', 4, 16}, +{'l', 4, 18}, +{'m', 5, 18}, +{'l', 5, 16}, +{'m', 4, 12}, +{'l', 6, 12}, +{'l', 6, 10}, +{'l', 4, 10}, +{'l', 4, 12}, +{'m', 5, 12}, +{'l', 5, 10}, +{'m', 4, 6}, +{'l', 6, 6}, +{'l', 6, 4}, +{'l', 4, 4}, +{'l', 4, 6}, +{'m', 5, 6}, +{'l', 5, 4}, +{'m', 4, 0}, +{'l', 6, 0}, +{'l', 6, -2}, +{'l', 4, -2}, +{'l', 4, 0}, +{'m', 5, 0}, +{'l', 5, -2}, +{'m', 6, 21}, +{'l', 8, 21}, +{'l', 8, 19}, +{'l', 6, 19}, +{'l', 6, 21}, +{'m', 7, 21}, +{'l', 7, 19}, +{'m', 6, 15}, +{'l', 8, 15}, +{'l', 8, 13}, +{'l', 6, 13}, +{'l', 6, 15}, +{'m', 7, 15}, +{'l', 7, 13}, +{'m', 6, 9}, +{'l', 8, 9}, +{'l', 8, 7}, +{'l', 6, 7}, +{'l', 6, 9}, +{'m', 7, 9}, +{'l', 7, 7}, +{'m', 6, 3}, +{'l', 8, 3}, +{'l', 8, 1}, +{'l', 6, 1}, +{'l', 6, 3}, +{'m', 7, 3}, +{'l', 7, 1}, +{'m', 8, 18}, +{'l', 10, 18}, +{'l', 10, 16}, +{'l', 8, 16}, +{'l', 8, 18}, +{'m', 9, 18}, +{'l', 9, 16}, +{'m', 8, 12}, +{'l', 10, 12}, +{'l', 10, 10}, +{'l', 8, 10}, +{'l', 8, 12}, +{'m', 9, 12}, +{'l', 9, 10}, +{'m', 8, 6}, +{'l', 10, 6}, +{'l', 10, 4}, +{'l', 8, 4}, +{'l', 8, 6}, +{'m', 9, 6}, +{'l', 9, 4}, +{'m', 8, 0}, +{'l', 10, 0}, +{'l', 10, -2}, +{'l', 8, -2}, +{'l', 8, 0}, +{'m', 9, 0}, +{'l', 9, -2}, +{'m', 10, 21}, +{'l', 12, 21}, +{'l', 12, 19}, +{'l', 10, 19}, +{'l', 10, 21}, +{'m', 11, 21}, +{'l', 11, 19}, +{'m', 10, 15}, +{'l', 12, 15}, +{'l', 12, 13}, +{'l', 10, 13}, +{'l', 10, 15}, +{'m', 11, 15}, +{'l', 11, 13}, +{'m', 10, 9}, +{'l', 12, 9}, +{'l', 12, 7}, +{'l', 10, 7}, +{'l', 10, 9}, +{'m', 11, 9}, +{'l', 11, 7}, +{'m', 10, 3}, +{'l', 12, 3}, +{'l', 12, 1}, +{'l', 10, 1}, +{'l', 10, 3}, +{'m', 11, 3}, +{'l', 11, 1}, +{'m', 12, 18}, +{'l', 14, 18}, +{'l', 14, 16}, +{'l', 12, 16}, +{'l', 12, 18}, +{'m', 13, 18}, +{'l', 13, 16}, +{'m', 12, 12}, +{'l', 14, 12}, +{'l', 14, 10}, +{'l', 12, 10}, +{'l', 12, 12}, +{'m', 13, 12}, +{'l', 13, 10}, +{'m', 12, 6}, +{'l', 14, 6}, +{'l', 14, 4}, +{'l', 12, 4}, +{'l', 12, 6}, +{'m', 13, 6}, +{'l', 13, 4}, +{'m', 12, 0}, +{'l', 14, 0}, +{'l', 14, -2}, +{'l', 12, -2}, +{'l', 12, 0}, +{'m', 13, 0}, +{'l', 13, -2}, +{'m', 14, 21}, +{'l', 16, 21}, +{'l', 16, 19}, +{'l', 14, 19}, +{'l', 14, 21}, +{'m', 15, 21}, +{'l', 15, 19}, +{'m', 14, 15}, +{'l', 16, 15}, +{'l', 16, 13}, +{'l', 14, 13}, +{'l', 14, 15}, +{'m', 15, 15}, +{'l', 15, 13}, +{'m', 14, 9}, +{'l', 16, 9}, +{'l', 16, 7}, +{'l', 14, 7}, +{'l', 14, 9}, +{'m', 15, 9}, +{'l', 15, 7}, +{'m', 14, 3}, +{'l', 16, 3}, +{'l', 16, 1}, +{'l', 14, 1}, +{'l', 14, 3}, +{'m', 15, 3}, +{'l', 15, 1}, +{'m', 2, -3}, +{'l', 2, -5}, +{'l', 4, -5}, +{'l', 4, -3}, +{'l', 2, -3}, +{'m', 3, -3}, +{'l', 3, -5}, +{'m', 6, -3}, +{'l', 6, -5}, +{'l', 8, -5}, +{'l', 8, -3}, +{'l', 6, -3}, +{'m', 7, -3}, +{'l', 7, -5}, +{'m', 10, -3}, +{'l', 10, -5}, +{'l', 12, -5}, +{'l', 12, -3}, +{'l', 10, -3}, +{'m', 11, -3}, +{'l', 11, -5}, +{'m', 14, -3}, +{'l', 14, -5}, +{'l', 16, -5}, +{'l', 16, -3}, +{'l', 14, -3}, +{'m', 15, -3}, +{'l', 15, -5}, +}; +static cdOperation vf_default_char_178[] = { +{'m', 0, 21}, +{'l', 2, 21}, +{'l', 2, 19}, +{'l', 0, 19}, +{'l', 0, 21}, +{'m', 1, 21}, +{'l', 1, 19}, +{'m', 2, 21}, +{'l', 4, 21}, +{'l', 4, 19}, +{'l', 2, 19}, +{'l', 2, 21}, +{'m', 3, 21}, +{'l', 3, 19}, +{'m', 10, 21}, +{'l', 12, 21}, +{'l', 12, 19}, +{'l', 10, 19}, +{'l', 10, 21}, +{'m', 11, 21}, +{'l', 11, 19}, +{'m', 12, 21}, +{'l', 14, 21}, +{'l', 14, 19}, +{'l', 12, 19}, +{'l', 12, 21}, +{'m', 13, 21}, +{'l', 13, 19}, +{'m', 20, 21}, +{'l', 22, 21}, +{'l', 22, 19}, +{'l', 20, 19}, +{'l', 20, 21}, +{'m', 21, 21}, +{'l', 21, 19}, +{'m', 22, 21}, +{'l', 24, 21}, +{'l', 24, 19}, +{'l', 22, 19}, +{'l', 22, 21}, +{'m', 23, 21}, +{'l', 23, 19}, +{'m', 4, 17}, +{'l', 6, 17}, +{'l', 6, 15}, +{'l', 4, 15}, +{'l', 4, 17}, +{'m', 5, 17}, +{'l', 5, 15}, +{'m', 6, 17}, +{'l', 8, 17}, +{'l', 8, 15}, +{'l', 6, 15}, +{'l', 6, 17}, +{'m', 7, 17}, +{'l', 7, 15}, +{'m', 8, 17}, +{'l', 10, 17}, +{'l', 10, 15}, +{'l', 8, 15}, +{'l', 8, 17}, +{'m', 9, 17}, +{'l', 9, 15}, +{'m', 0, 13}, +{'l', 2, 13}, +{'l', 2, 11}, +{'l', 0, 11}, +{'l', 0, 13}, +{'m', 1, 13}, +{'l', 1, 11}, +{'m', 2, 13}, +{'l', 4, 13}, +{'l', 4, 11}, +{'l', 2, 11}, +{'l', 2, 13}, +{'m', 3, 13}, +{'l', 3, 11}, +{'m', 10, 13}, +{'l', 12, 13}, +{'l', 12, 11}, +{'l', 10, 11}, +{'l', 10, 13}, +{'m', 11, 13}, +{'l', 11, 11}, +{'m', 12, 13}, +{'l', 14, 13}, +{'l', 14, 11}, +{'l', 12, 11}, +{'l', 12, 13}, +{'m', 13, 13}, +{'l', 13, 11}, +{'m', 20, 13}, +{'l', 22, 13}, +{'l', 22, 11}, +{'l', 20, 11}, +{'l', 20, 13}, +{'m', 21, 13}, +{'l', 21, 11}, +{'m', 22, 13}, +{'l', 24, 13}, +{'l', 24, 11}, +{'l', 22, 11}, +{'l', 22, 13}, +{'m', 23, 13}, +{'l', 23, 11}, +{'m', 14, 9}, +{'l', 16, 9}, +{'l', 16, 7}, +{'l', 14, 7}, +{'l', 14, 9}, +{'m', 15, 9}, +{'l', 15, 7}, +{'m', 16, 9}, +{'l', 18, 9}, +{'l', 18, 7}, +{'l', 16, 7}, +{'l', 16, 9}, +{'m', 17, 9}, +{'l', 17, 7}, +{'m', 18, 9}, +{'l', 20, 9}, +{'l', 20, 7}, +{'l', 18, 7}, +{'l', 18, 9}, +{'m', 19, 9}, +{'l', 19, 7}, +{'m', 0, 5}, +{'l', 2, 5}, +{'l', 2, 3}, +{'l', 0, 3}, +{'l', 0, 5}, +{'m', 1, 5}, +{'l', 1, 3}, +{'m', 2, 5}, +{'l', 4, 5}, +{'l', 4, 3}, +{'l', 2, 3}, +{'l', 2, 5}, +{'m', 3, 5}, +{'l', 3, 3}, +{'m', 10, 5}, +{'l', 12, 5}, +{'l', 12, 3}, +{'l', 10, 3}, +{'l', 10, 5}, +{'m', 11, 5}, +{'l', 11, 3}, +{'m', 12, 5}, +{'l', 14, 5}, +{'l', 14, 3}, +{'l', 12, 3}, +{'l', 12, 5}, +{'m', 13, 5}, +{'l', 13, 3}, +{'m', 20, 5}, +{'l', 22, 5}, +{'l', 22, 3}, +{'l', 20, 3}, +{'l', 20, 5}, +{'m', 21, 5}, +{'l', 21, 3}, +{'m', 22, 5}, +{'l', 24, 5}, +{'l', 24, 3}, +{'l', 22, 3}, +{'l', 22, 5}, +{'m', 23, 5}, +{'l', 23, 3}, +{'m', 4, 1}, +{'l', 10, 1}, +{'l', 10, -1}, +{'l', 4, -1}, +{'l', 4, 1}, +{'m', 5, 1}, +{'l', 5, -1}, +{'m', 7, 1}, +{'l', 7, -1}, +{'m', 9, 1}, +{'l', 9, -1}, +{'m', 0, -3}, +{'l', 2, -3}, +{'l', 2, -5}, +{'l', 0, -5}, +{'l', 0, -3}, +{'m', 1, -3}, +{'l', 1, -5}, +{'m', 2, -3}, +{'l', 4, -3}, +{'l', 4, -5}, +{'l', 2, -5}, +{'l', 2, -3}, +{'m', 3, -3}, +{'l', 3, -5}, +{'m', 10, -3}, +{'l', 14, -3}, +{'l', 14, -5}, +{'l', 10, -5}, +{'l', 10, -3}, +{'m', 11, -3}, +{'l', 11, -5}, +{'m', 13, -3}, +{'l', 13, -5}, +{'m', 20, -3}, +{'l', 24, -3}, +{'l', 24, -5}, +{'l', 20, -5}, +{'l', 20, -3}, +{'m', 21, -3}, +{'l', 21, -5}, +{'m', 23, -3}, +{'l', 23, -5}, +{'m', 8, 1}, +{'l', 8, -1}, +{'m', 6, 1}, +{'l', 6, -1}, +{'m', 12, -3}, +{'l', 12, -5}, +{'m', 22, -3}, +{'l', 22, -5}, +{'m', 18, 17}, +{'l', 20, 17}, +{'l', 20, 15}, +{'l', 18, 15}, +{'l', 18, 17}, +{'m', 19, 17}, +{'l', 19, 15}, +{'m', 20, 17}, +{'l', 22, 17}, +{'l', 22, 15}, +{'l', 20, 15}, +{'l', 20, 17}, +{'m', 21, 17}, +{'l', 21, 15}, +{'m', 22, 17}, +{'l', 24, 17}, +{'l', 24, 15}, +{'l', 22, 15}, +{'l', 22, 17}, +{'m', 23, 17}, +{'l', 23, 15}, +{'m', 0, 9}, +{'l', 2, 9}, +{'l', 2, 7}, +{'l', 0, 7}, +{'l', 0, 9}, +{'m', 1, 9}, +{'l', 1, 7}, +{'m', 2, 9}, +{'l', 4, 9}, +{'l', 4, 7}, +{'l', 2, 7}, +{'l', 2, 9}, +{'m', 3, 9}, +{'l', 3, 7}, +{'m', 4, 9}, +{'l', 6, 9}, +{'l', 6, 7}, +{'l', 4, 7}, +{'l', 4, 9}, +{'m', 5, 9}, +{'l', 5, 7}, +{'m', 18, 1}, +{'l', 24, 1}, +{'l', 24, -1}, +{'l', 18, -1}, +{'l', 18, 1}, +{'m', 19, 1}, +{'l', 19, -1}, +{'m', 21, 1}, +{'l', 21, -1}, +{'m', 23, 1}, +{'l', 23, -1}, +{'m', 20, 1}, +{'l', 20, -1}, +{'m', 22, 1}, +{'l', 22, -1}, +}; +static cdOperation vf_default_char_179[] = { +{'m', 0, 21}, +{'l', 0, -7}, +}; +static cdOperation vf_default_char_180[] = { +{'m', 8, 21}, +{'l', 8, -7}, +{'m', 0, 5}, +{'l', 8, 5}, +}; +static cdOperation vf_default_char_181[] = { +{'m', 8, -7}, +{'l', 8, 21}, +{'m', 0, 9}, +{'l', 8, 9}, +{'m', 0, 5}, +{'l', 8, 5}, +}; +static cdOperation vf_default_char_182[] = { +{'m', 8, 21}, +{'l', 8, -7}, +{'m', 0, 5}, +{'l', 8, 5}, +{'m', 16, 21}, +{'l', 16, -7}, +}; +static cdOperation vf_default_char_183[] = { +{'m', 0, 5}, +{'l', 16, 5}, +{'l', 16, -7}, +{'m', 8, 5}, +{'l', 8, -7}, +}; +static cdOperation vf_default_char_184[] = { +{'m', 0, 9}, +{'l', 8, 9}, +{'l', 8, -7}, +{'m', 0, 5}, +{'l', 8, 5}, +}; +static cdOperation vf_default_char_185[] = { +{'m', 0, 5}, +{'l', 8, 5}, +{'l', 8, -7}, +{'m', 16, 21}, +{'l', 16, -7}, +{'m', 0, 9}, +{'l', 8, 9}, +{'l', 8, 21}, +{'m', 0, 1}, +{'l', 0, 1}, +}; +static cdOperation vf_default_char_186[] = { +{'m', 8, 21}, +{'l', 8, -7}, +{'m', 16, 21}, +{'l', 16, -7}, +}; +static cdOperation vf_default_char_187[] = { +{'m', 0, 9}, +{'l', 16, 9}, +{'l', 16, -7}, +{'m', 0, 5}, +{'l', 8, 5}, +{'l', 8, -7}, +}; +static cdOperation vf_default_char_188[] = { +{'m', 0, 5}, +{'l', 16, 5}, +{'l', 16, 21}, +{'m', 0, 9}, +{'l', 8, 9}, +{'l', 8, 21}, +}; +static cdOperation vf_default_char_189[] = { +{'m', 0, 9}, +{'l', 16, 9}, +{'l', 16, 21}, +{'m', 8, 9}, +{'l', 8, 21}, +}; +static cdOperation vf_default_char_190[] = { +{'m', 0, 5}, +{'l', 8, 5}, +{'l', 8, 21}, +{'m', 0, 9}, +{'l', 8, 9}, +}; +static cdOperation vf_default_char_191[] = { +{'m', 0, 5}, +{'l', 8, 5}, +{'l', 8, -7}, +}; +static cdOperation vf_default_char_192[] = { +{'m', 16, 0}, +{'l', 8, 21}, +{'l', 0, 0}, +{'m', 3, 7}, +{'l', 13, 7}, +{'m', 4, 28}, +{'l', 9, 23}, +}; +static cdOperation vf_default_char_193[] = { +{'m', 16, 0}, +{'l', 8, 21}, +{'l', 0, 0}, +{'m', 3, 7}, +{'l', 13, 7}, +{'m', 10, 28}, +{'l', 5, 23}, +}; +static cdOperation vf_default_char_194[] = { +{'m', 16, 0}, +{'l', 8, 21}, +{'l', 0, 0}, +{'m', 3, 7}, +{'l', 13, 7}, +{'m', 3, 23}, +{'l', 8, 28}, +{'l', 13, 23}, +}; +static cdOperation vf_default_char_195[] = { +{'m', 16, 0}, +{'l', 8, 21}, +{'l', 0, 0}, +{'m', 3, 7}, +{'l', 13, 7}, +{'m', 2, 24}, +{'l', 7, 27}, +{'l', 11, 24}, +{'l', 15, 26}, +}; +static cdOperation vf_default_char_196[] = { +{'m', 0, 5}, +{'l', 16, 5}, +}; +static cdOperation vf_default_char_197[] = { +{'m', 8, 21}, +{'l', 8, -7}, +{'m', 0, 5}, +{'l', 16, 5}, +}; +static cdOperation vf_default_char_198[] = { +{'m', 0, -7}, +{'l', 0, 21}, +{'m', 8, 9}, +{'l', 0, 9}, +{'m', 8, 5}, +{'l', 0, 5}, +}; +static cdOperation vf_default_char_199[] = { +{'m', 8, 21}, +{'l', 8, -7}, +{'m', 16, 5}, +{'l', 8, 5}, +{'m', 0, 21}, +{'l', 0, -7}, +}; +static cdOperation vf_default_char_200[] = { +{'m', 13, 21}, +{'l', 0, 21}, +{'l', 0, 0}, +{'l', 13, 0}, +{'m', 0, 11}, +{'l', 8, 11}, +{'m', 4, 28}, +{'l', 9, 23}, +}; +static cdOperation vf_default_char_201[] = { +{'m', 16, 9}, +{'l', 0, 9}, +{'l', 0, -7}, +{'m', 16, 5}, +{'l', 8, 5}, +{'l', 8, -7}, +}; +static cdOperation vf_default_char_202[] = { +{'m', 13, 21}, +{'l', 0, 21}, +{'l', 0, 0}, +{'l', 13, 0}, +{'m', 0, 11}, +{'l', 8, 11}, +{'m', 2, 24}, +{'l', 7, 29}, +{'l', 12, 24}, +{'l', 7, 29}, +{'l', 2, 24}, +}; +static cdOperation vf_default_char_203[] = { +{'m', 13, 21}, +{'l', 0, 21}, +{'l', 0, 0}, +{'l', 13, 0}, +{'m', 0, 11}, +{'l', 8, 11}, +{'m', 4, 26}, +{'l', 3, 25}, +{'l', 4, 24}, +{'l', 5, 25}, +{'l', 4, 26}, +{'m', 12, 26}, +{'l', 11, 25}, +{'l', 12, 24}, +{'l', 13, 25}, +{'l', 12, 26}, +}; +static cdOperation vf_default_char_204[] = { +{'m', 5, 21}, +{'l', 5, 0}, +{'m', 0, 28}, +{'l', 5, 23}, +}; +static cdOperation vf_default_char_205[] = { +{'m', 5, 21}, +{'l', 5, 0}, +{'m', 10, 28}, +{'l', 5, 23}, +}; +static cdOperation vf_default_char_206[] = { +{'m', 6, 21}, +{'l', 6, 0}, +{'m', 2, 26}, +{'l', 7, 31}, +{'l', 12, 26}, +}; +static cdOperation vf_default_char_207[] = { +{'m', 8, 21}, +{'l', 8, 0}, +{'m', 4, 26}, +{'l', 3, 25}, +{'l', 4, 24}, +{'l', 5, 25}, +{'l', 4, 26}, +{'m', 12, 26}, +{'l', 11, 25}, +{'l', 12, 24}, +{'l', 13, 25}, +{'l', 12, 26}, +}; +static cdOperation vf_default_char_208[] = { +{'m', 6, 21}, +{'l', 6, 0}, +{'m', 6, 21}, +{'l', 13, 21}, +{'l', 16, 20}, +{'l', 18, 18}, +{'l', 19, 16}, +{'l', 20, 13}, +{'l', 20, 8}, +{'l', 19, 5}, +{'l', 18, 3}, +{'l', 16, 1}, +{'l', 13, 0}, +{'l', 6, 0}, +{'m', 0, 10}, +{'l', 12, 10}, +}; +static cdOperation vf_default_char_209[] = { +{'m', 0, 5}, +{'l', 8, 5}, +{'l', 8, -7}, +{'m', 16, 5}, +{'l', 8, 5}, +{'m', 0, 9}, +{'l', 16, 9}, +}; +static cdOperation vf_default_char_210[] = { +{'m', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'l', 16, 8}, +{'l', 16, 13}, +{'l', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'m', 4, 28}, +{'l', 9, 23}, +}; +static cdOperation vf_default_char_211[] = { +{'m', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'l', 16, 8}, +{'l', 16, 13}, +{'l', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'m', 10, 28}, +{'l', 5, 23}, +}; +static cdOperation vf_default_char_212[] = { +{'m', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'l', 16, 8}, +{'l', 16, 13}, +{'l', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'m', 3, 23}, +{'l', 8, 28}, +{'l', 13, 23}, +}; +static cdOperation vf_default_char_213[] = { +{'m', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'l', 16, 8}, +{'l', 16, 13}, +{'l', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'m', 2, 24}, +{'l', 7, 27}, +{'l', 11, 24}, +{'l', 15, 26}, +}; +static cdOperation vf_default_char_214[] = { +{'m', 16, 5}, +{'l', 0, 5}, +{'l', 0, -7}, +{'m', 8, 5}, +{'l', 8, -7}, +}; +static cdOperation vf_default_char_215[] = { +{'m', 0, 0}, +{'l', 14, 14}, +{'m', 0, 13}, +{'l', 14, -1}, +}; +static cdOperation vf_default_char_216[] = { +{'m', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'l', 16, 8}, +{'l', 16, 13}, +{'l', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'m', 1, -3}, +{'l', 2, -1}, +{'l', 16, 23}, +}; +static cdOperation vf_default_char_217[] = { +{'m', 0, 21}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 6, 0}, +{'l', 8, 0}, +{'l', 11, 1}, +{'l', 13, 3}, +{'l', 14, 6}, +{'l', 14, 21}, +{'m', 4, 28}, +{'l', 9, 23}, +}; +static cdOperation vf_default_char_218[] = { +{'m', 0, 21}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 6, 0}, +{'l', 8, 0}, +{'l', 11, 1}, +{'l', 13, 3}, +{'l', 14, 6}, +{'l', 14, 21}, +{'m', 10, 28}, +{'l', 5, 23}, +}; +static cdOperation vf_default_char_219[] = { +{'m', 0, 21}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 6, 0}, +{'l', 8, 0}, +{'l', 11, 1}, +{'l', 13, 3}, +{'l', 14, 6}, +{'l', 14, 21}, +{'m', 2, 24}, +{'l', 7, 29}, +{'l', 12, 24}, +{'l', 7, 29}, +{'l', 2, 24}, +}; +static cdOperation vf_default_char_220[] = { +{'m', 16, 0}, +{'l', 0, 0}, +{'l', 0, 11}, +{'l', 16, 11}, +{'l', 16, 0}, +{'l', 15, 0}, +{'l', 15, 11}, +{'m', 1, 11}, +{'l', 1, 0}, +{'m', 2, 11}, +{'l', 2, 0}, +{'m', 3, 11}, +{'l', 3, 0}, +{'m', 4, 11}, +{'l', 4, 0}, +{'m', 5, 11}, +{'l', 5, 0}, +{'m', 6, 11}, +{'l', 6, 0}, +{'m', 7, 11}, +{'l', 7, 0}, +{'m', 8, 11}, +{'l', 8, 0}, +{'m', 9, 11}, +{'l', 9, 0}, +{'m', 10, 11}, +{'l', 10, 0}, +{'m', 11, 11}, +{'l', 11, 0}, +{'m', 12, 11}, +{'l', 12, 0}, +{'m', 13, 11}, +{'l', 13, 0}, +{'m', 14, 11}, +{'l', 14, 0}, +}; +static cdOperation vf_default_char_221[] = { +{'m', 0, 21}, +{'l', 8, 11}, +{'l', 8, 0}, +{'m', 16, 21}, +{'l', 8, 11}, +{'m', 10, 28}, +{'l', 5, 23}, +}; +static cdOperation vf_default_char_222[] = { +{'m', 9, 0}, +{'l', 9, 21}, +{'m', 10, 21}, +{'l', 10, 0}, +{'m', 11, 21}, +{'l', 11, 0}, +{'m', 12, 21}, +{'l', 12, 0}, +{'m', 13, 21}, +{'l', 13, 0}, +{'m', 14, 21}, +{'l', 14, 0}, +{'m', 15, 21}, +{'l', 15, 0}, +{'m', 16, 21}, +{'l', 16, 0}, +{'m', 17, 21}, +{'l', 17, 0}, +}; +static cdOperation vf_default_char_223[] = { +{'m', 0, 1}, +{'l', 10, 1}, +{'l', 13, 3}, +{'l', 13, 7}, +{'l', 9, 9}, +{'l', 13, 11}, +{'l', 13, 14}, +{'l', 10, 16}, +{'l', 3, 16}, +{'l', 0, 14}, +{'l', 0, -3}, +{'m', 9, 9}, +{'l', 0, 9}, +}; +static cdOperation vf_default_char_224[] = { +{'m', 18, 0}, +{'l', 12, 9}, +{'l', 10, 11}, +{'l', 8, 12}, +{'l', 5, 12}, +{'l', 3, 11}, +{'l', 1, 9}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 18, 12}, +}; +static cdOperation vf_default_char_225[] = { +{'m', 0, 1}, +{'l', 10, 1}, +{'l', 13, 3}, +{'l', 13, 7}, +{'l', 9, 9}, +{'l', 13, 11}, +{'l', 13, 14}, +{'l', 10, 16}, +{'l', 3, 16}, +{'l', 0, 14}, +{'l', 0, -3}, +{'m', 9, 9}, +{'l', 0, 9}, +}; +static cdOperation vf_default_char_226[] = { +{'m', 0, 0}, +{'l', 0, 14}, +{'l', 9, 14}, +{'l', 9, 11}, +}; +static cdOperation vf_default_char_227[] = { +{'m', 12, 14}, +{'l', 12, 0}, +{'m', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'m', 0, 17}, +{'l', 5, 20}, +{'l', 9, 17}, +{'l', 13, 19}, +}; +static cdOperation vf_default_char_228[] = { +{'m', 13, 2}, +{'l', 13, 0}, +{'l', 0, 0}, +{'l', 8, 11}, +{'l', 0, 21}, +{'l', 13, 21}, +{'l', 13, 19}, +}; +static cdOperation vf_default_char_229[] = { +{'m', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 12, 9}, +{'l', 10, 11}, +{'l', 8, 12}, +{'l', 5, 12}, +{'l', 3, 11}, +{'l', 1, 9}, +{'l', 0, 6}, +{'m', 5, 12}, +{'l', 9, 14}, +{'l', 20, 14}, +}; +static cdOperation vf_default_char_230[] = { +{'m', 2, 14}, +{'l', 2, 4}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 13, 4}, +{'m', 13, 14}, +{'l', 13, 0}, +{'m', 3, 1}, +{'l', 3, -3}, +{'l', 0, -6}, +}; +static cdOperation vf_default_char_231[] = { +{'m', 0, 9}, +{'l', 0, 11}, +{'l', 1, 13}, +{'l', 3, 14}, +{'l', 6, 14}, +{'l', 8, 12}, +{'l', 8, -2}, +{'m', 8, 9}, +{'l', 11, 11}, +{'l', 14, 14}, +}; +static cdOperation vf_default_char_232[] = { +{'m', 0, 9}, +{'l', 1, 6}, +{'l', 3, 4}, +{'l', 5, 3}, +{'l', 8, 3}, +{'l', 10, 4}, +{'l', 12, 6}, +{'l', 13, 9}, +{'l', 12, 12}, +{'l', 10, 14}, +{'l', 8, 15}, +{'l', 5, 15}, +{'l', 3, 14}, +{'l', 1, 12}, +{'l', 0, 9}, +{'m', 6, 21}, +{'l', 6, 15}, +{'m', 7, 21}, +{'l', 7, 15}, +{'m', 0, 21}, +{'l', 13, 21}, +{'m', 6, -3}, +{'l', 6, 3}, +{'m', 7, -3}, +{'l', 7, 3}, +{'m', 0, -3}, +{'l', 13, -3}, +}; +static cdOperation vf_default_char_233[] = { +{'m', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 8}, +{'l', 1, 5}, +{'l', 2, 3}, +{'l', 4, 1}, +{'l', 6, 0}, +{'l', 10, 0}, +{'l', 12, 1}, +{'l', 14, 3}, +{'l', 15, 5}, +{'l', 16, 8}, +{'l', 16, 13}, +{'l', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'m', 0, 10}, +{'l', 16, 10}, +}; +static cdOperation vf_default_char_234[] = { +{'m', 16, 0}, +{'l', 11, 0}, +{'l', 11, 6}, +{'l', 14, 7}, +{'l', 16, 9}, +{'l', 16, 13}, +{'l', 15, 16}, +{'l', 14, 18}, +{'l', 12, 20}, +{'l', 10, 21}, +{'l', 6, 21}, +{'l', 4, 20}, +{'l', 2, 18}, +{'l', 1, 16}, +{'l', 0, 13}, +{'l', 0, 9}, +{'l', 2, 7}, +{'l', 5, 6}, +{'l', 5, 0}, +{'l', 0, 0}, +}; +static cdOperation vf_default_char_235[] = { +{'m', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 12, 9}, +{'l', 10, 11}, +{'l', 8, 12}, +{'l', 5, 12}, +{'l', 3, 11}, +{'l', 1, 9}, +{'l', 0, 6}, +{'m', 10, 11}, +{'l', 0, 21}, +{'l', 13, 21}, +{'l', 13, 18}, +}; +static cdOperation vf_default_char_236[] = { +{'m', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 12, 9}, +{'l', 10, 11}, +{'l', 8, 12}, +{'l', 5, 12}, +{'l', 3, 11}, +{'l', 1, 9}, +{'l', 0, 6}, +{'m', 12, 6}, +{'l', 13, 3}, +{'l', 15, 1}, +{'l', 17, 0}, +{'l', 20, 0}, +{'l', 22, 1}, +{'l', 24, 3}, +{'l', 25, 6}, +{'l', 24, 9}, +{'l', 22, 11}, +{'l', 20, 12}, +{'l', 17, 12}, +{'l', 15, 11}, +{'l', 13, 9}, +{'l', 12, 6}, +}; +static cdOperation vf_default_char_237[] = { +{'m', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 13, 8}, +{'l', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'m', 0, -3}, +{'l', 13, 17}, +}; +static cdOperation vf_default_char_238[] = { +{'m', 13, 21}, +{'l', 3, 21}, +{'l', 0, 19}, +{'l', 0, 11}, +{'l', 8, 11}, +{'m', 0, 11}, +{'l', 0, 2}, +{'l', 3, 0}, +{'l', 13, 0}, +}; +static cdOperation vf_default_char_239[] = { +{'m', 0, 0}, +{'l', 0, 15}, +{'l', 1, 18}, +{'l', 3, 20}, +{'l', 6, 21}, +{'l', 8, 21}, +{'l', 11, 20}, +{'l', 13, 18}, +{'l', 14, 15}, +{'l', 14, 0}, +}; +static cdOperation vf_default_char_240[] = { +{'m', 0, 9}, +{'l', 18, 9}, +{'m', 0, 5}, +{'l', 18, 5}, +{'m', 0, 13}, +{'l', 18, 13}, +}; +static cdOperation vf_default_char_241[] = { +{'m', 0, 0}, +{'l', 18, 0}, +{'m', 9, 21}, +{'l', 9, 3}, +{'m', 0, 12}, +{'l', 18, 12}, +}; +static cdOperation vf_default_char_242[] = { +{'m', 0, 0}, +{'l', 18, 0}, +{'m', 0, 21}, +{'l', 18, 12}, +{'l', 0, 3}, +}; +static cdOperation vf_default_char_243[] = { +{'m', 18, 0}, +{'l', 0, 0}, +{'m', 18, 21}, +{'l', 0, 12}, +{'l', 18, 3}, +}; +static cdOperation vf_default_char_244[] = { +{'m', 10, 20}, +{'l', 7, 21}, +{'l', 5, 21}, +{'l', 2, 20}, +{'l', 1, 19}, +{'l', 0, 16}, +{'l', 0, -7}, +}; +static cdOperation vf_default_char_245[] = { +{'m', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 13, 8}, +{'l', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'m', 0, 17}, +{'l', 5, 20}, +{'l', 9, 17}, +{'l', 13, 19}, +}; +static cdOperation vf_default_char_246[] = { +{'m', 9, 20}, +{'l', 8, 19}, +{'l', 9, 18}, +{'l', 10, 19}, +{'l', 9, 20}, +{'m', 9, 3}, +{'l', 8, 2}, +{'l', 9, 1}, +{'l', 10, 2}, +{'l', 9, 3}, +{'m', 0, 10}, +{'l', 18, 10}, +}; +static cdOperation vf_default_char_247[] = { +{'m', 9, 20}, +{'l', 8, 19}, +{'l', 9, 18}, +{'l', 10, 19}, +{'l', 9, 20}, +{'m', 9, 3}, +{'l', 8, 2}, +{'l', 9, 1}, +{'l', 10, 2}, +{'l', 9, 3}, +{'m', 0, 10}, +{'l', 18, 10}, +}; +static cdOperation vf_default_char_248[] = { +{'m', 5, 14}, +{'l', 3, 13}, +{'l', 1, 11}, +{'l', 0, 8}, +{'l', 0, 6}, +{'l', 1, 3}, +{'l', 3, 1}, +{'l', 5, 0}, +{'l', 8, 0}, +{'l', 10, 1}, +{'l', 12, 3}, +{'l', 13, 6}, +{'l', 13, 8}, +{'l', 12, 11}, +{'l', 10, 13}, +{'l', 8, 14}, +{'l', 5, 14}, +{'m', 0, -3}, +{'l', 13, 17}, +}; +static cdOperation vf_default_char_249[] = { +{'m', 0, 4}, +{'l', 3, 4}, +{'l', 3, 0}, +{'l', 0, 0}, +{'l', 0, 4}, +{'m', 1, 4}, +{'l', 1, 0}, +{'m', 2, 4}, +{'l', 2, 0}, +}; +static cdOperation vf_default_char_250[] = { +{'m', 0, 2}, +{'l', 3, 2}, +{'l', 3, 0}, +{'l', 0, 0}, +{'l', 0, 2}, +{'l', 3, 1}, +{'m', 1, 2}, +{'l', 1, 0}, +{'m', 2, 2}, +{'l', 2, 0}, +}; +static cdOperation vf_default_char_251[] = { +{'m', 16, 18}, +{'l', 16, 21}, +{'l', 8, 21}, +{'l', 8, 0}, +{'l', 0, 10}, +}; +static cdOperation vf_default_char_252[] = { +{'m', 0, 21}, +{'l', 0, 10}, +{'m', 0, 17}, +{'l', 3, 20}, +{'l', 5, 21}, +{'l', 8, 21}, +{'l', 10, 20}, +{'l', 11, 17}, +{'l', 11, 10}, +}; +static cdOperation vf_default_char_253[] = { +{'m', 1, 14}, +{'l', 7, 0}, +{'m', 13, 14}, +{'l', 7, 0}, +{'l', 5, -4}, +{'l', 3, -6}, +{'l', 1, -7}, +{'l', 0, -7}, +{'m', 10, 22}, +{'l', 5, 17}, +}; +static cdOperation vf_default_char_254[] = { +{'m', 0, 0}, +{'l', 0, 11}, +{'l', 8, 11}, +{'l', 8, 0}, +{'l', 0, 0}, +{'m', 1, 11}, +{'l', 1, 0}, +{'m', 2, 11}, +{'l', 2, 0}, +{'m', 3, 11}, +{'l', 3, 0}, +{'m', 4, 11}, +{'l', 4, 0}, +{'m', 5, 11}, +{'l', 5, 0}, +{'m', 6, 11}, +{'l', 6, 0}, +{'m', 7, 11}, +{'l', 7, 0}, +}; +static cdCaracter vf_default_chars[256] = { +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{ 0, 0, 0, 0}, +{12, 6, 0, 0}, +{6, 3, 7, vf_default_char_33}, +{14, 7, 16, vf_default_char_34}, +{18, 9, 8, vf_default_char_35}, +{17, 8, 38, vf_default_char_36}, +{21, 10, 29, vf_default_char_37}, +{22, 11, 46, vf_default_char_38}, +{6, 3, 7, vf_default_char_39}, +{10, 5, 18, vf_default_char_40}, +{11, 5, 18, vf_default_char_41}, +{13, 6, 6, vf_default_char_42}, +{22, 11, 4, vf_default_char_43}, +{6, 3, 8, vf_default_char_44}, +{22, 11, 2, vf_default_char_45}, +{6, 3, 5, vf_default_char_46}, +{14, 7, 2, vf_default_char_47}, +{17, 8, 17, vf_default_char_48}, +{14, 7, 4, vf_default_char_49}, +{17, 8, 14, vf_default_char_50}, +{17, 8, 15, vf_default_char_51}, +{17, 8, 5, vf_default_char_52}, +{17, 8, 17, vf_default_char_53}, +{16, 8, 23, vf_default_char_54}, +{17, 8, 4, vf_default_char_55}, +{17, 8, 29, vf_default_char_56}, +{17, 8, 23, vf_default_char_57}, +{6, 3, 10, vf_default_char_58}, +{6, 3, 13, vf_default_char_59}, +{20, 10, 3, vf_default_char_60}, +{22, 11, 4, vf_default_char_61}, +{20, 10, 3, vf_default_char_62}, +{15, 7, 19, vf_default_char_63}, +{24, 12, 52, vf_default_char_64}, +{19, 9, 5, vf_default_char_65}, +{17, 8, 21, vf_default_char_66}, +{19, 9, 18, vf_default_char_67}, +{17, 8, 14, vf_default_char_68}, +{15, 7, 6, vf_default_char_69}, +{14, 7, 6, vf_default_char_70}, +{18, 9, 21, vf_default_char_71}, +{18, 9, 6, vf_default_char_72}, +{4, 2, 2, vf_default_char_73}, +{14, 7, 10, vf_default_char_74}, +{17, 8, 6, vf_default_char_75}, +{13, 6, 4, vf_default_char_76}, +{20, 10, 8, vf_default_char_77}, +{18, 9, 6, vf_default_char_78}, +{19, 9, 21, vf_default_char_79}, +{17, 8, 11, vf_default_char_80}, +{19, 9, 23, vf_default_char_81}, +{17, 8, 14, vf_default_char_82}, +{17, 8, 20, vf_default_char_83}, +{15, 7, 4, vf_default_char_84}, +{18, 9, 10, vf_default_char_85}, +{17, 8, 4, vf_default_char_86}, +{22, 11, 8, vf_default_char_87}, +{17, 8, 4, vf_default_char_88}, +{17, 8, 5, vf_default_char_89}, +{17, 8, 6, vf_default_char_90}, +{7, 3, 8, vf_default_char_91}, +{14, 7, 2, vf_default_char_92}, +{8, 4, 8, vf_default_char_93}, +{19, 9, 6, vf_default_char_94}, +{17, 8, 2, vf_default_char_95}, +{6, 3, 7, vf_default_char_96}, +{16, 8, 16, vf_default_char_97}, +{15, 7, 16, vf_default_char_98}, +{15, 7, 14, vf_default_char_99}, +{16, 8, 16, vf_default_char_100}, +{15, 7, 17, vf_default_char_101}, +{10, 5, 7, vf_default_char_102}, +{16, 8, 21, vf_default_char_103}, +{15, 7, 9, vf_default_char_104}, +{7, 3, 7, vf_default_char_105}, +{9, 4, 10, vf_default_char_106}, +{13, 6, 6, vf_default_char_107}, +{4, 2, 2, vf_default_char_108}, +{26, 13, 16, vf_default_char_109}, +{15, 7, 9, vf_default_char_110}, +{16, 8, 17, vf_default_char_111}, +{15, 7, 16, vf_default_char_112}, +{16, 8, 16, vf_default_char_113}, +{9, 4, 7, vf_default_char_114}, +{14, 7, 17, vf_default_char_115}, +{10, 5, 7, vf_default_char_116}, +{15, 7, 9, vf_default_char_117}, +{14, 7, 4, vf_default_char_118}, +{19, 9, 8, vf_default_char_119}, +{14, 7, 4, vf_default_char_120}, +{15, 7, 8, vf_default_char_121}, +{14, 7, 6, vf_default_char_122}, +{10, 5, 37, vf_default_char_123}, +{4, 2, 2, vf_default_char_124}, +{9, 4, 37, vf_default_char_125}, +{14, 7, 4, vf_default_char_126}, +{16, 8, 8, vf_default_char_127}, +{18, 9, 30, vf_default_char_128}, +{15, 7, 19, vf_default_char_129}, +{15, 7, 19, vf_default_char_130}, +{18, 9, 19, vf_default_char_131}, +{16, 8, 26, vf_default_char_132}, +{16, 8, 18, vf_default_char_133}, +{16, 8, 23, vf_default_char_134}, +{15, 7, 21, vf_default_char_135}, +{18, 9, 20, vf_default_char_136}, +{15, 7, 27, vf_default_char_137}, +{15, 7, 19, vf_default_char_138}, +{12, 6, 12, vf_default_char_139}, +{16, 8, 5, vf_default_char_140}, +{7, 3, 4, vf_default_char_141}, +{17, 8, 15, vf_default_char_142}, +{17, 8, 12, vf_default_char_143}, +{15, 7, 8, vf_default_char_144}, +{28, 14, 33, vf_default_char_145}, +{26, 13, 10, vf_default_char_146}, +{16, 8, 20, vf_default_char_147}, +{16, 8, 27, vf_default_char_148}, +{16, 8, 19, vf_default_char_149}, +{17, 8, 12, vf_default_char_150}, +{15, 7, 11, vf_default_char_151}, +{15, 7, 18, vf_default_char_152}, +{19, 9, 31, vf_default_char_153}, +{18, 9, 20, vf_default_char_154}, +{15, 7, 16, vf_default_char_155}, +{21, 10, 12, vf_default_char_156}, +{17, 8, 9, vf_default_char_157}, +{21, 10, 18, vf_default_char_158}, +{17, 8, 15, vf_default_char_159}, +{16, 8, 18, vf_default_char_160}, +{7, 3, 4, vf_default_char_161}, +{16, 8, 19, vf_default_char_162}, +{15, 7, 11, vf_default_char_163}, +{17, 8, 13, vf_default_char_164}, +{18, 9, 8, vf_default_char_165}, +{16, 8, 18, vf_default_char_166}, +{16, 8, 17, vf_default_char_167}, +{15, 7, 19, vf_default_char_168}, +{16, 8, 7, vf_default_char_169}, +{16, 8, 7, vf_default_char_170}, +{19, 9, 15, vf_default_char_171}, +{19, 9, 10, vf_default_char_172}, +{6, 3, 7, vf_default_char_173}, +{19, 9, 6, vf_default_char_174}, +{19, 9, 6, vf_default_char_175}, +{14, 7, 126, vf_default_char_176}, +{16, 8, 252, vf_default_char_177}, +{24, 12, 276, vf_default_char_178}, +{5, 2, 2, vf_default_char_179}, +{13, 6, 4, vf_default_char_180}, +{13, 6, 6, vf_default_char_181}, +{21, 10, 6, vf_default_char_182}, +{21, 10, 5, vf_default_char_183}, +{13, 6, 5, vf_default_char_184}, +{21, 10, 10, vf_default_char_185}, +{20, 10, 4, vf_default_char_186}, +{21, 10, 6, vf_default_char_187}, +{21, 10, 6, vf_default_char_188}, +{21, 10, 5, vf_default_char_189}, +{13, 6, 5, vf_default_char_190}, +{0, 0, 3, vf_default_char_191}, +{19, 9, 7, vf_default_char_192}, +{19, 9, 7, vf_default_char_193}, +{19, 9, 8, vf_default_char_194}, +{19, 9, 9, vf_default_char_195}, +{16, 8, 2, vf_default_char_196}, +{16, 8, 4, vf_default_char_197}, +{8, 4, 6, vf_default_char_198}, +{16, 8, 6, vf_default_char_199}, +{15, 7, 8, vf_default_char_200}, +{16, 8, 6, vf_default_char_201}, +{15, 7, 11, vf_default_char_202}, +{15, 7, 16, vf_default_char_203}, +{9, 2, 4, vf_default_char_204}, +{9, 2, 4, vf_default_char_205}, +{12, 2, 5, vf_default_char_206}, +{12, 2, 12, vf_default_char_207}, +{23, 8, 16, vf_default_char_208}, +{16, 8, 7, vf_default_char_209}, +{19, 9, 23, vf_default_char_210}, +{19, 9, 23, vf_default_char_211}, +{19, 9, 24, vf_default_char_212}, +{19, 9, 25, vf_default_char_213}, +{16, 8, 5, vf_default_char_214}, +{18, 11, 4, vf_default_char_215}, +{19, 9, 24, vf_default_char_216}, +{18, 9, 12, vf_default_char_217}, +{18, 9, 12, vf_default_char_218}, +{18, 9, 15, vf_default_char_219}, +{16, 8, 35, vf_default_char_220}, +{17, 8, 7, vf_default_char_221}, +{17, 8, 18, vf_default_char_222}, +{18, 9, 13, vf_default_char_223}, +{22, 11, 15, vf_default_char_224}, +{18, 9, 13, vf_default_char_225}, +{14, 7, 4, vf_default_char_226}, +{16, 8, 20, vf_default_char_227}, +{18, 9, 7, vf_default_char_228}, +{24, 12, 18, vf_default_char_229}, +{18, 9, 12, vf_default_char_230}, +{18, 9, 10, vf_default_char_231}, +{18, 9, 27, vf_default_char_232}, +{21, 10, 23, vf_default_char_233}, +{21, 10, 20, vf_default_char_234}, +{18, 9, 19, vf_default_char_235}, +{29, 14, 30, vf_default_char_236}, +{16, 8, 19, vf_default_char_237}, +{17, 8, 9, vf_default_char_238}, +{19, 9, 10, vf_default_char_239}, +{23, 11, 6, vf_default_char_240}, +{23, 11, 6, vf_default_char_241}, +{23, 11, 5, vf_default_char_242}, +{24, 12, 5, vf_default_char_243}, +{13, 6, 7, vf_default_char_244}, +{16, 8, 21, vf_default_char_245}, +{23, 11, 12, vf_default_char_246}, +{23, 11, 12, vf_default_char_247}, +{16, 8, 19, vf_default_char_248}, +{7, 3, 9, vf_default_char_249}, +{7, 3, 10, vf_default_char_250}, +{18, 9, 5, vf_default_char_251}, +{15, 7, 9, vf_default_char_252}, +{15, 7, 10, vf_default_char_253}, +{13, 6, 19, vf_default_char_254}, +{ 0, 0, 0, 0} +}; + +/******************************************************/ +/* inicializacao & controle */ +/******************************************************/ + +static void vf_releasefontchars(cdVectorFont *vector_font) +{ + int c; + + for (c=0; c<256; c++) + { + if (vector_font->chars[c].op) + free(vector_font->chars[c].op); + } + + free(vector_font->chars); +} + +static void vf_setdefaultfont(cdVectorFont *vector_font) +{ + if (vector_font->chars && vector_font->chars != vf_default_chars) + vf_releasefontchars(vector_font); + + strcpy(vector_font->name, "Simplex II"); + vector_font->file_name[0] = 0; + vector_font->chars = vf_default_chars; + vector_font->top = vf_default_top; + vector_font->cap = vf_default_cap; + vector_font->half = vf_default_half; + vector_font->bottom = vf_default_bottom; +} + +static int vf_readfontfile(FILE *file, cdVectorFont *vector_font) +{ + int c, right, center, operations; + + if (vector_font->chars && vector_font->chars != vf_default_chars) + vf_releasefontchars(vector_font); + + vector_font->chars = (cdCaracter *)calloc(256, sizeof(cdCaracter)); + if (!vector_font->chars) + return 0; + + if (fscanf(file,"%d%d%d%d",&vector_font->top,&vector_font->cap,&vector_font->half,&vector_font->bottom) != 4) + { + if (fscanf(file, "%[^\n]", vector_font->name) != 1) + return 0; + if (fscanf(file,"%d%d%d%d",&vector_font->top,&vector_font->cap,&vector_font->half,&vector_font->bottom)!=4) + return 0; + } + else + sprintf(vector_font->name, "Unknown"); + + while (fscanf(file, "%d%d%d%d", &c, &right, ¢er, &operations) == 4) + { + vector_font->chars[c].right = right; + vector_font->chars[c].center = center; + vector_font->chars[c].operations = operations; + if (operations) + { + int i; + vector_font->chars[c].op = (cdOperation *)calloc(operations, sizeof(cdOperation)); + if (!vector_font->chars[c].op) return 0; + for (i=0; ichars[c].op[i].operation = operation; + vector_font->chars[c].op[i].x = (signed char)x; + vector_font->chars[c].op[i].y = (signed char)y; + } + } + } + + return 1; +} + +static int vf_readfontstring(const char* strdata, cdVectorFont *vector_font) +{ + int c, right, center, operations; + + if (vector_font->chars && vector_font->chars != vf_default_chars) + vf_releasefontchars(vector_font); + + vector_font->chars = (cdCaracter *)calloc(256, sizeof(cdCaracter)); + if (!vector_font->chars) + return 0; + + /* try to read without a name */ + if (sscanf(strdata,"%d%d%d%d",&vector_font->top,&vector_font->cap,&vector_font->half,&vector_font->bottom) != 4) + { + if (sscanf(strdata, "%[^\n]", vector_font->name) != 1) + return 0; + strdata = strstr(strdata, "\n")+1; /* goto next line */ + if (strdata == (void*)1) return 0; + + if (sscanf(strdata,"%d%d%d%d",&vector_font->top,&vector_font->cap,&vector_font->half,&vector_font->bottom)!=4) + return 0; + strdata = strstr(strdata, "\n"); /* goto next line */ + if (strdata == (void*)1) return 0; + } + else + { + strdata = strstr(strdata, "\n")+1; /* goto next line */ + sprintf(vector_font->name, "Unknown"); + } + + /* skip 2 blank lines */ + strdata = strstr(strdata, "\n")+1; /* goto next line */ + strdata = strstr(strdata, "\n")+1; /* goto next line */ + + /* for each font character */ + while (sscanf(strdata, "%d%d%d%d", &c, &right, ¢er, &operations) == 4) + { + strdata = strstr(strdata, "\n")+1; /* goto next line */ + if (strdata == (void*)1) return 0; + + vector_font->chars[c].right = right; + vector_font->chars[c].center = center; + vector_font->chars[c].operations = operations; + if (operations) + { + int i; + vector_font->chars[c].op = (cdOperation *)calloc(operations, sizeof(cdOperation)); + if (!vector_font->chars[c].op) return 0; + for (i=0; ichars[c].op[i].operation = operation; + vector_font->chars[c].op[i].x = (signed char)x; + vector_font->chars[c].op[i].y = (signed char)y; + } + } + + /* skip 1 blank line */ + strdata = strstr(strdata, "\n")+1; /* goto next line */ + if (strdata == (void*)1) return 1; + } + + return 1; +} + +static int vf_textwidth(cdVectorFont *vector_font, const char* str) +{ + int width = 0; + while (*str && *str!='\n') + width += vector_font->chars[(unsigned char)(*(str++))].right; + if (width==0) width = 1; + return width; +} + +static void vf_move_dir(cdVectorFont *vector_font, int *x, int *y, double dx, double dy) +{ + *x += cdRound(vector_font->current_cos*dx - vector_font->current_sin*dy); + *y += cdRound(vector_font->current_sin*dx + vector_font->current_cos*dy); +} + +static void vf_wmove_dir(cdVectorFont *vector_font, double *x, double *y, double dx, double dy) +{ + *x += vector_font->current_cos*dx - vector_font->current_sin*dy; + *y += vector_font->current_sin*dx + vector_font->current_cos*dy; +} + +static void vf_draw_char(cdVectorFont *vector_font, char c, int *x, int *y) +{ + unsigned char ac = vf_ansi2ascii[(unsigned char)c]; + cdOperation *current = vector_font->chars[ac].op; + int m, op = vector_font->chars[ac].operations; + + for(m = 0; m < op; m++) + { + int px = *x; + int py = *y; + + if (current->operation == 'm') + { + if (m) cdCanvasEnd(vector_font->canvas); + cdCanvasBegin(vector_font->canvas, CD_OPEN_LINES); + } + + vf_move_dir(vector_font, &px, &py, current->x*vector_font->size_x, current->y*vector_font->size_y); + + if (vector_font->text_transf) + { + double aux = px*vector_font->text_matrix[3] + py*vector_font->text_matrix[4] + vector_font->text_matrix[5]; + py = cdRound(px*vector_font->text_matrix[0] + py*vector_font->text_matrix[1] + vector_font->text_matrix[2]); + px = _cdRound(aux); + } + + cdCanvasVertex(vector_font->canvas, px, py); + current++; + } + + if (m) cdCanvasEnd(vector_font->canvas); +} + +static void vf_wdraw_char(cdVectorFont *vector_font, char c, double *x, double *y) +{ + unsigned char ac = vf_ansi2ascii[(unsigned char)c]; + cdOperation *current = vector_font->chars[ac].op; + int m, op = vector_font->chars[ac].operations; + + for(m = 0; m < op; m++) + { + double px = *x; + double py = *y; + + if (current->operation == 'm') + { + if (m) cdCanvasEnd(vector_font->canvas); + cdCanvasBegin(vector_font->canvas, CD_OPEN_LINES); + } + + vf_wmove_dir(vector_font, &px, &py, current->x*vector_font->size_x, current->y*vector_font->size_y); + + if (vector_font->text_transf) + { + double aux = px*vector_font->text_matrix[3] + py*vector_font->text_matrix[4] + vector_font->text_matrix[5]; + py = px*vector_font->text_matrix[0] + py*vector_font->text_matrix[1] + vector_font->text_matrix[2]; + px = aux; + } + + wdCanvasVertex(vector_font->canvas, px, py); + current++; + } + + if (m) cdCanvasEnd(vector_font->canvas); +} + +static void vf_move_to_base(cdVectorFont *vector_font, int *x, int *y, const char* str, int width) +{ + /* move point to baseline/left according to alignment */ + int align = vector_font->canvas->text_alignment; + + if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST) + { + vf_move_dir(vector_font, x, y, 0, -vector_font->top*vector_font->size_y); + } + else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST) + { + vf_move_dir(vector_font, x, y, 0, -vector_font->bottom*vector_font->size_y); /* bottom is < 0 */ + } + else if (align == CD_BASE_CENTER || align == CD_BASE_LEFT || align == CD_BASE_RIGHT) + { + /* y = y; */ + } + else /* CD_CENTER || CD_EAST || CD_WEST */ + vf_move_dir(vector_font, x, y, 0, -((double)(vector_font->top+vector_font->bottom)/2.0)*vector_font->size_y); + + if (align == CD_EAST || align == CD_NORTH_EAST || align == CD_SOUTH_EAST || align == CD_BASE_RIGHT) + { + if (str) width = vf_textwidth(vector_font, str); + vf_move_dir(vector_font, x, y, -width*vector_font->size_x, 0); + } + else if (align == CD_WEST || align == CD_NORTH_WEST || align == CD_SOUTH_WEST || align == CD_BASE_LEFT) + { + /* x = x; */ + } + else /* CD_CENTER || CD_NORTH || CD_SOUTH */ + { + if (str) width = vf_textwidth(vector_font, str); + vf_move_dir(vector_font, x, y, -(width*vector_font->size_x)/2.0, 0); + } +} + +static void vf_wmove_to_base(cdVectorFont *vector_font, double *x, double *y, const char* str, int width) +{ + /* move point to baseline/left according to alignment */ + int align = vector_font->canvas->text_alignment; + + if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST) + { + vf_wmove_dir(vector_font, x, y, 0, -vector_font->top*vector_font->size_y); + } + else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST) + { + vf_wmove_dir(vector_font, x, y, 0, -vector_font->bottom*vector_font->size_y); /* bottom is < 0 */ + } + else if (align == CD_BASE_CENTER || align == CD_BASE_LEFT || align == CD_BASE_RIGHT) + { + /* y = y; */ + } + else /* CD_CENTER || CD_EAST || CD_WEST */ + vf_wmove_dir(vector_font, x, y, 0, -((double)(vector_font->top+vector_font->bottom)/2.0)*vector_font->size_y); + + if (align == CD_EAST || align == CD_NORTH_EAST || align == CD_SOUTH_EAST || align == CD_BASE_RIGHT) + { + if (str) width = vf_textwidth(vector_font, str); + vf_wmove_dir(vector_font, x, y, -width*vector_font->size_x, 0); + } + else if (align == CD_WEST || align == CD_NORTH_WEST || align == CD_SOUTH_WEST || align == CD_BASE_LEFT) + { + /* x = x; */ + } + else /* CD_CENTER || CD_NORTH || CD_SOUTH */ + { + if (str) width = vf_textwidth(vector_font, str); + vf_wmove_dir(vector_font, x, y, -(width*vector_font->size_x)/2.0, 0); + } +} + +static void vf_draw_text(cdVectorFont* vector_font, int x, int y, const char* str) +{ + vf_move_to_base(vector_font, &x, &y, str, 0); + + while (*str && *str!='\n') + { + vf_draw_char(vector_font, *str, &x, &y); + vf_move_dir(vector_font, &x, &y, (vector_font->chars[(unsigned char)*str].right)*vector_font->size_x, 0); + str++; + } +} + +static void vf_wdraw_text(cdVectorFont* vector_font, double x, double y, const char* str) +{ + vf_wmove_to_base(vector_font, &x, &y, str, 0); + + while (*str && *str!='\n') + { + vf_wdraw_char(vector_font, *str, &x, &y); + vf_wmove_dir(vector_font, &x, &y, (vector_font->chars[(unsigned char)*str].right)*vector_font->size_x, 0); + str++; + } +} + +static void vf_calc_point(cdVectorFont *vector_font, int start_x, int start_y, int *x, int *y, int dx, int dy) +{ + *x = start_x; + *y = start_y; + + vf_move_dir(vector_font, x, y, dx, dy); + + if (vector_font->text_transf) + { + double aux = *x * vector_font->text_matrix[3] + *y * vector_font->text_matrix[4] + vector_font->text_matrix[5]; + *y = cdRound(*x * vector_font->text_matrix[0] + *y * vector_font->text_matrix[1] + vector_font->text_matrix[2]); + *x = _cdRound(aux); + } +} + +static void vf_wcalc_point(cdVectorFont *vector_font, double start_x, double start_y, double *x, double *y, double dx, double dy) +{ + *x = start_x; + *y = start_y; + + vf_wmove_dir(vector_font, x, y, dx, dy); + + if (vector_font->text_transf) + { + double aux = *x * vector_font->text_matrix[3] + *y * vector_font->text_matrix[4] + vector_font->text_matrix[5]; + *y = *x * vector_font->text_matrix[0] + *y * vector_font->text_matrix[1] + vector_font->text_matrix[2]; + *x = aux; + } +} + +static int vf_gettextmaxwidth(cdVectorFont* vector_font, const char* str, int num_lin) +{ + int i, max_w = 0, w; + const char *p_str, *q; + + p_str = str; + + for(i = 0; i < num_lin; i++) + { + /* Calculate line width */ + w = vf_textwidth(vector_font, p_str); + if (w > max_w) max_w = w; + + /* Advance the string */ + q = strchr(p_str, '\n'); + if (q) p_str = q + 1; /* skip line break */ + } + + return max_w; +} + +static void vf_gettextsize(cdVectorFont* vector_font, const char* str, int *width, int *height) +{ + int num_lin = cdStrLineCount(str); + if (num_lin == 1) + { + *width = vf_textwidth(vector_font, str); + *height = vector_font->top - vector_font->bottom; + } + else + { + *width = vf_gettextmaxwidth(vector_font, str, num_lin); + *height = num_lin*(vector_font->top - vector_font->bottom); + } +} + +static void vf_move_to_first(cdVectorFont* vector_font, int align, int *x, int *y, int num_lin, double line_height) +{ + /* position vertically at the first line */ + if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST || /* it is relative to the full text */ + align == CD_BASE_LEFT || align == CD_BASE_CENTER || align == CD_BASE_RIGHT) /* it is relative to the first line already */ + { + /* Already at position */ + } + else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST) /* it is relative to the full text */ + { + vf_move_dir(vector_font, x, y, 0, (num_lin-1)*line_height); + } + else /* CD_CENTER || CD_EAST || CD_WEST */ /* it is relative to the full text */ + vf_move_dir(vector_font, x, y, 0, (num_lin-1)*line_height/2.0); +} + +static void vf_wmove_to_first(cdVectorFont* vector_font, int align, double *x, double *y, int num_lin, double line_height) +{ + /* position vertically at the first line */ + if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST || /* it is relative to the full text */ + align == CD_BASE_LEFT || align == CD_BASE_CENTER || align == CD_BASE_RIGHT) /* it is relative to the first line already */ + { + /* Already at position */ + } + else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST) /* it is relative to the full text */ + { + vf_wmove_dir(vector_font, x, y, 0, (num_lin-1)*line_height); + } + else /* CD_CENTER || CD_EAST || CD_WEST */ /* it is relative to the full text */ + vf_wmove_dir(vector_font, x, y, 0, (num_lin-1)*line_height/2.0); +} + +/******************************************************/ +/* vector text */ +/******************************************************/ + +cdVectorFont* cdCreateVectorFont(cdCanvas* canvas) +{ + cdVectorFont* vector_font; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return NULL; + + vector_font = calloc(1, sizeof(cdVectorFont)); + + vector_font->canvas = canvas; + + vf_setdefaultfont(vector_font); + + vector_font->size_x = 1.0; + vector_font->size_y = 1.0; + + vector_font->current_cos = 1.0; + vector_font->current_sin = 0.0; + + vector_font->text_transf = 0; + + return vector_font; +} + +void cdKillVectorFont(cdVectorFont* vector_font) +{ + assert(vector_font); + if (!vector_font) return; + + if (vector_font->chars && vector_font->chars != vf_default_chars) + vf_releasefontchars(vector_font); /* not the default font */ + + free(vector_font); +} + +char *cdCanvasVectorFont(cdCanvas* canvas, const char *file) +{ + cdVectorFont* vector_font; + + assert(canvas); + assert(file); + if (!_cdCheckCanvas(canvas)) return NULL; + + if (file[0] == 0) + return NULL; + + vector_font = canvas->vector_font; + if (!file) + { + vf_setdefaultfont(vector_font); + vector_font->file_name[0] = 0; + } + else + { + FILE *font = NULL; + int read_ok; + char *env; + + /* se arquivo foi o mesmo que o arq. corrente, entao retorna */ + if (strcmp (file, vector_font->file_name) == 0) + return vector_font->name; + + /* abre arq. no dir. corrente */ + font = fopen(file, "r"); + + /* se nao conseguiu, abre arq. no dir. do cd, */ + env = getenv("CDDIR"); + if (!font && env && strlen(file)<10240) + { + char filename[10240]; + sprintf(filename, "%str/%str", env, file); + font = fopen(filename, "r"); + } + + if (font) + read_ok = vf_readfontfile(font, vector_font); + else + read_ok = vf_readfontstring(file, vector_font); + + if (!read_ok) + { + if (font) fclose(font); + vf_setdefaultfont(vector_font); + vector_font->file_name[0] = 0; + return NULL; + } + + /* guarda nome do arquivo que esta' carregado */ + if (font) + { + strcpy(vector_font->file_name, file); + fclose(font); + } + else + strcpy(vector_font->file_name, vector_font->name); + } + + return vector_font->name; +} + +double* cdCanvasVectorTextTransform(cdCanvas* canvas, const double* matrix) +{ + cdVectorFont* vector_font; + int i; + static double old_matrix[6]; + + assert(canvas); + assert(matrix); + if (!_cdCheckCanvas(canvas)) return NULL; + + vector_font = canvas->vector_font; + if (vector_font->text_transf) + { + for (i=0; i<6; i++) + old_matrix[i] = vector_font->text_matrix[i]; + } + else + { + old_matrix[0] = 1; old_matrix[1] = 0; old_matrix[2] = 0; + old_matrix[3] = 0; old_matrix[4] = 1; old_matrix[5] = 0; + } + + if (matrix) + { + for (i=0; i<6; i++) + vector_font->text_matrix[i] = matrix[i]; + + vector_font->text_transf = 1; + } + else + vector_font->text_transf = 0; + + return old_matrix; +} + +/******************************************************/ +/* vector text em Raster */ +/******************************************************/ + +void cdCanvasVectorTextDirection(cdCanvas* canvas, int x1, int y1, int x2, int y2) +{ + cdVectorFont* vector_font; + int dx, dy; + double len; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + vector_font = canvas->vector_font; + + dx=x2-x1; + dy=y2-y1; + len = sqrt(dx*dx +dy*dy); + if (len == 0) len = 1; + vector_font->current_sin = dy/len; + vector_font->current_cos = dx/len; +} + +void cdCanvasVectorFontSize(cdCanvas* canvas, double size_x, double size_y) +{ + cdVectorFont* vector_font; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + vector_font = canvas->vector_font; + + vector_font->size_x = size_x; + vector_font->size_y = size_y; +} + +void cdCanvasGetVectorFontSize(cdCanvas* canvas, double *size_x, double *size_y) +{ + cdVectorFont* vector_font; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + vector_font = canvas->vector_font; + + if (size_x) *size_x = vector_font->size_x; + if (size_y) *size_y = vector_font->size_y; +} + +int cdCanvasVectorCharSize(cdCanvas* canvas, int size) +{ + cdVectorFont* vector_font; + int old_size; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return 0; + + vector_font = canvas->vector_font; + old_size = cdRound(vector_font->size_y*vector_font->top); + if (size == CD_QUERY) + return old_size; + + vector_font->size_y = size/(double)vector_font->top; + vector_font->size_x = vector_font->size_y; + + return old_size; +} + +void cdCanvasVectorTextSize(cdCanvas* canvas, int s_width, int s_height, const char* str) +{ + int width, height; + cdVectorFont* vector_font; + + assert(canvas); + assert(str); + if (!_cdCheckCanvas(canvas)) return; + + if (str[0] == 0) + return; + + vector_font = canvas->vector_font; + vf_gettextsize(vector_font, str, &width, &height); + + vector_font->size_x = (double)s_width/(double)width; + vector_font->size_y = (double)s_height/(double)height; +} + +void cdCanvasGetVectorTextSize(cdCanvas* canvas, const char *str, int *x, int *y) +{ + int width, height; + cdVectorFont* vector_font; + + assert(canvas); + assert(str); + if (!_cdCheckCanvas(canvas)) return; + + if (str[0] == 0) + return; + + vector_font = canvas->vector_font; + + vf_gettextsize(vector_font, str, &width, &height); + + if (x) *x = cdRound(width*vector_font->size_x); + if (y) *y = cdRound(height*vector_font->size_y); +} + +void cdCanvasGetVectorTextBounds(cdCanvas* canvas, const char *str, int x, int y, int *rect) +{ + cdVectorFont* vector_font; + int sx, sy; + int width, height, num_lin; + double line_height; + + assert(canvas); + assert(str); + if (!_cdCheckCanvas(canvas)) return; + + if (str[0] == 0) + return; + + vector_font = canvas->vector_font; + + vf_gettextsize(vector_font, str, &width, &height); + num_lin = height/(vector_font->top - vector_font->bottom); + + sx = cdRound(width*vector_font->size_x); + sy = cdRound(height*vector_font->size_y); + + line_height = (vector_font->top - vector_font->bottom) * vector_font->size_y; + + if (num_lin > 1) + { + /* position vertically at the first line */ + int align = canvas->text_alignment; + vf_move_to_first(vector_font, align, &x, &y, num_lin, line_height); + } + + /* move to bottom/left corner */ + vf_move_to_base(vector_font, &x, &y, NULL, width); + vf_move_dir(vector_font, &x, &y, 0, vector_font->bottom*vector_font->size_y); /* from base/left to bottom/left of the first line */ + if (num_lin > 1) + vf_move_dir(vector_font, &x, &y, 0, -(height*vector_font->size_y - line_height)); /* from bottom/left to the bottom of the last line */ + + vf_calc_point(vector_font, x, y, &rect[0], &rect[1], 0, 0); + vf_calc_point(vector_font, x, y, &rect[2], &rect[3], sx, 0); + vf_calc_point(vector_font, x, y, &rect[4], &rect[5], sx, sy); + vf_calc_point(vector_font, x, y, &rect[6], &rect[7], 0, sy); +} + +void cdCanvasGetVectorTextBox(cdCanvas* canvas, int x, int y, const char *str, int *xmin, int *xmax, int *ymin, int *ymax) +{ + int rect[8]; + int _xmin, _xmax, _ymin, _ymax; + + cdCanvasGetVectorTextBounds(canvas, str, x, y, rect); + + _xmin = rect[0]; + _ymin = rect[1]; + _xmax = rect[0]; + _ymax = rect[1]; + + if(rect[2] < _xmin) _xmin = rect[2]; + if(rect[4] < _xmin) _xmin = rect[4]; + if(rect[6] < _xmin) _xmin = rect[6]; + + if(rect[3] < _ymin) _ymin = rect[3]; + if(rect[5] < _ymin) _ymin = rect[5]; + if(rect[7] < _ymin) _ymin = rect[7]; + + if(rect[2] > _xmax) _xmax = rect[2]; + if(rect[4] > _xmax) _xmax = rect[4]; + if(rect[6] > _xmax) _xmax = rect[6]; + + if(rect[3] > _ymax) _ymax = rect[3]; + if(rect[5] > _ymax) _ymax = rect[5]; + if(rect[7] > _ymax) _ymax = rect[7]; + + if (xmin) *xmin = _xmin; + if (xmax) *xmax = _xmax; + if (ymin) *ymin = _ymin; + if (ymax) *ymax = _ymax; +} + +void cdCanvasVectorText(cdCanvas* canvas, int x, int y, const char* str) +{ + cdVectorFont* vector_font; + int num_lin; + + assert(canvas); + assert(str); + if (!_cdCheckCanvas(canvas)) return; + + if (str[0] == 0) + return; + + vector_font = canvas->vector_font; + + num_lin = cdStrLineCount(str); + if (num_lin == 1) + vf_draw_text(vector_font, x, y, str); + else + { + const char *p_str, *q; + double line_height = (vector_font->top - vector_font->bottom) * vector_font->size_y; + int i; + + /* position vertically at the first line */ + vf_move_to_first(vector_font, canvas->text_alignment, &x, &y, num_lin, line_height); + + p_str = str; + + for(i = 0; i < num_lin; i++) + { + /* Draw the line */ + vf_draw_text(vector_font, x, y, p_str); + + /* Advance the string */ + q = strchr(p_str, '\n'); + if (q) p_str = q + 1; /* skip line break */ + + /* Advance a line */ + vf_move_dir(vector_font, &x, &y, 0, -line_height); + } + } +} + +void cdCanvasMultiLineVectorText(cdCanvas* canvas, int x, int y, const char* str) +{ + cdCanvasVectorText(canvas, x, y, str); +} + +/******************************************************/ +/* vector text em WC */ +/******************************************************/ + +void wdCanvasVectorTextDirection(cdCanvas* canvas, double x1, double y1, double x2, double y2) +{ + cdVectorFont* vector_font; + double dx, dy, len; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return; + + vector_font = canvas->vector_font; + + dx=x2-x1; + dy=y2-y1; + len = sqrt(dx*dx +dy*dy); + if (len == 0) len = 1; + vector_font->current_sin = dy/len; + vector_font->current_cos = dx/len; +} + +double wdCanvasVectorCharSize(cdCanvas* canvas, double size) +{ + cdVectorFont* vector_font; + double old_size; + + assert(canvas); + if (!_cdCheckCanvas(canvas)) return 0; + + vector_font = canvas->vector_font; + old_size = vector_font->size_y*vector_font->top; + if (size == CD_QUERY) + return old_size; + + vector_font->size_y = size/(double)vector_font->top; + vector_font->size_x = vector_font->size_y; + + return old_size; +} + +void wdCanvasVectorTextSize(cdCanvas* canvas, double s_width, double s_height, const char* str) +{ + int width, height; + cdVectorFont* vector_font; + + assert(canvas); + assert(str); + if (!_cdCheckCanvas(canvas)) return; + + if (str[0] == 0) + return; + + vector_font = canvas->vector_font; + vf_gettextsize(vector_font, str, &width, &height); + + vector_font->size_x = s_width/(double)width; + vector_font->size_y = s_height/(double)height; +} + +void wdCanvasGetVectorTextSize(cdCanvas* canvas, const char *str, double *x, double *y) +{ + int width, height; + cdVectorFont* vector_font; + + assert(canvas); + assert(str); + if (!_cdCheckCanvas(canvas)) return; + + if (str[0] == 0) + return; + + vector_font = canvas->vector_font; + + vf_gettextsize(vector_font, str, &width, &height); + + if (x) *x = width*vector_font->size_x; + if (y) *y = height*vector_font->size_y; +} + +void wdCanvasGetVectorTextBounds(cdCanvas* canvas, const char *str, double x, double y, double *rect) +{ + cdVectorFont* vector_font; + double sx, sy, line_height; + int width, height, num_lin; + + assert(canvas); + assert(str); + if (!_cdCheckCanvas(canvas)) return; + + if (str[0] == 0) + return; + + vector_font = canvas->vector_font; + + vf_gettextsize(vector_font, str, &width, &height); + num_lin = height/(vector_font->top - vector_font->bottom); + + sx = width*vector_font->size_x; + sy = height*vector_font->size_y; + + line_height = (vector_font->top - vector_font->bottom) * vector_font->size_y; + + if (num_lin > 1) + { + /* position vertically at the first line */ + int align = canvas->text_alignment; + vf_wmove_to_first(vector_font, align, &x, &y, num_lin, line_height); + } + + /* move to bottom/left corner */ + vf_wmove_to_base(vector_font, &x, &y, NULL, width); + vf_wmove_dir(vector_font, &x, &y, 0, vector_font->bottom*vector_font->size_y); /* from base/left to bottom/left of the first line */ + if (num_lin > 1) + vf_wmove_dir(vector_font, &x, &y, 0, -(height*vector_font->size_y - line_height)); /* from bottom/left to the bottom of the last line */ + + vf_wcalc_point(vector_font, x, y, &rect[0], &rect[1], 0, 0); + vf_wcalc_point(vector_font, x, y, &rect[2], &rect[3], sx, 0); + vf_wcalc_point(vector_font, x, y, &rect[4], &rect[5], sx, sy); + vf_wcalc_point(vector_font, x, y, &rect[6], &rect[7], 0, sy); +} + +void wdCanvasGetVectorTextBox(cdCanvas* canvas, double x, double y, const char *str, double *xmin, double *xmax, double *ymin, double *ymax) +{ + double rect[8]; + double _xmin, _xmax, _ymin, _ymax; + + wdCanvasGetVectorTextBounds(canvas, str, x, y, rect); + + _xmin = rect[0]; + _ymin = rect[1]; + _xmax = rect[0]; + _ymax = rect[1]; + + if(rect[2] < _xmin) _xmin = rect[2]; + if(rect[4] < _xmin) _xmin = rect[4]; + if(rect[6] < _xmin) _xmin = rect[6]; + + if(rect[3] < _ymin) _ymin = rect[3]; + if(rect[5] < _ymin) _ymin = rect[5]; + if(rect[7] < _ymin) _ymin = rect[7]; + + if(rect[2] > _xmax) _xmax = rect[2]; + if(rect[4] > _xmax) _xmax = rect[4]; + if(rect[6] > _xmax) _xmax = rect[6]; + + if(rect[3] > _ymax) _ymax = rect[3]; + if(rect[5] > _ymax) _ymax = rect[5]; + if(rect[7] > _ymax) _ymax = rect[7]; + + if (xmin) *xmin = _xmin; + if (xmax) *xmax = _xmax; + if (ymin) *ymin = _ymin; + if (ymax) *ymax = _ymax; +} + +void wdCanvasVectorText(cdCanvas* canvas, double x, double y, const char* str) +{ + cdVectorFont* vector_font; + int num_lin; + + assert(canvas); + assert(str); + if (!_cdCheckCanvas(canvas)) return; + + if (str[0] == 0) + return; + + vector_font = canvas->vector_font; + + num_lin = cdStrLineCount(str); + if (num_lin == 1) + vf_wdraw_text(vector_font, x, y, str); + else + { + const char *p_str, *q; + double line_height = (vector_font->top - vector_font->bottom) * vector_font->size_y; + int i; + + /* position vertically at the first line */ + vf_wmove_to_first(vector_font, canvas->text_alignment, &x, &y, num_lin, line_height); + + p_str = str; + + for(i = 0; i < num_lin; i++) + { + /* Draw the line */ + vf_wdraw_text(vector_font, x, y, p_str); + + /* Advance the string */ + q = strchr(p_str, '\n'); + if (q) p_str = q + 1; /* skip line break */ + + /* Advance a line */ + vf_wmove_dir(vector_font, &x, &y, 0, -line_height); + } + } +} + +void wdCanvasMultiLineVectorText(cdCanvas* canvas, double x, double y, const char* str) +{ + wdCanvasVectorText(canvas, x, y, str); +} + diff --git a/cd/src/cdcontextplus.dep b/cd/src/cdcontextplus.dep new file mode 100644 index 0000000..2cdfc5f --- /dev/null +++ b/cd/src/cdcontextplus.dep @@ -0,0 +1,4 @@ +$(OBJDIR)/cdxrender.o: xrender/cdxrender.c x11/cdx11.h ../include/cd.h \ + ../include/cd_private.h ../include/cddbuf.h ../include/cdimage.h \ + ../include/cdnative.h sim/truetype.h sim/sim.h +$(OBJDIR)/cdxrplus.o: xrender/cdxrplus.c ../include/cd.h ../include/cd_private.h diff --git a/cd/src/cdcontextplus.mak b/cd/src/cdcontextplus.mak new file mode 100755 index 0000000..f8314cc --- /dev/null +++ b/cd/src/cdcontextplus.mak @@ -0,0 +1,25 @@ +PROJNAME = cd +LIBNAME = cdcontextplus +OPT = YES + +DEFINES = CD_NO_OLD_INTERFACE + + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + SRCDIR = gdiplus + SRC = cdwemfp.cpp cdwimgp.cpp cdwinp.cpp cdwnativep.cpp cdwprnp.cpp cdwdbufp.cpp cdwclpp.cpp cdwgdiplus.c + + INCLUDES = . gdiplus drv + LIBS = gdiplus +else + SRC = xrender/cdxrender.c xrender/cdxrplus.c + + LIBS = Xrender Xft + USE_X11 = Yes + + INCLUDES = . sim drv /usr/include/freetype2 x11 +endif + + +USE_CD = YES +CD = .. diff --git a/cd/src/cdlua3.mak b/cd/src/cdlua3.mak new file mode 100755 index 0000000..cb809de --- /dev/null +++ b/cd/src/cdlua3.mak @@ -0,0 +1,12 @@ +PROJNAME = cd +LIBNAME = cdlua3 + +OPT = YES + +DEF_FILE = cdlua.def +SRCDIR = lua3 +SRC = cdlua.c toluacd.c toluawd.c cdvoid.c cdluactx.c + +USE_LUA = YES +USE_CD = YES +CD = .. diff --git a/cd/src/cdlua5.mak b/cd/src/cdlua5.mak new file mode 100755 index 0000000..9f862f8 --- /dev/null +++ b/cd/src/cdlua5.mak @@ -0,0 +1,14 @@ +PROJNAME = cd +LIBNAME = cdlua51 + +OPT = YES + +DEFINES = CD_NO_OLD_INTERFACE +SRCDIR = lua5 +SRC = cdlua5.c cdvoid5.c cdlua5ctx.c cdlua5_active.c cdlua5_canvas.c +DEF_FILE = cdlua5.def + +USE_LUA51 = Yes +NO_LUALINK = Yes +USE_CD = YES +CD = .. diff --git a/cd/src/cdlua51.dep b/cd/src/cdlua51.dep new file mode 100644 index 0000000..40c4e86 --- /dev/null +++ b/cd/src/cdlua51.dep @@ -0,0 +1,28 @@ +$(OBJDIR)/cdlua5.o: lua5/cdlua5.c ../include/cd.h ../include/cdgdiplus.h \ + ../include/cdnative.h ../include/cdps.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/cdlua.h \ + ../include/cdlua5_private.h +$(OBJDIR)/cdvoid5.o: lua5/cdvoid5.c ../include/cd.h ../include/cd_private.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/luaconf.h \ + ../../lua5.1/include/lauxlib.h ../../lua5.1/include/lua.h \ + ../include/cdlua5_private.h +$(OBJDIR)/cdlua5ctx.o: lua5/cdlua5ctx.c ../include/cd.h ../include/wd.h \ + ../include/cdimage.h ../include/cdirgb.h ../include/cddxf.h \ + ../include/cddgn.h ../include/cdcgm.h ../include/cdwmf.h \ + ../include/cdemf.h ../include/cdnative.h ../include/cdprint.h \ + ../include/cdclipbd.h ../include/cdmf.h ../include/cdps.h \ + ../include/cddbuf.h ../include/cdgdiplus.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/cdlua.h \ + ../include/cdlua5_private.h +$(OBJDIR)/cdlua5_active.o: lua5/cdlua5_active.c ../include/cd.h ../include/cd_old.h \ + ../include/wd.h ../include/wd_old.h ../include/cdirgb.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/luaconf.h \ + ../../lua5.1/include/lauxlib.h ../../lua5.1/include/lua.h \ + ../include/cdlua.h ../include/cdlua5_private.h lua5/cdvoid5.h +$(OBJDIR)/cdlua5_canvas.o: lua5/cdlua5_canvas.c ../include/cd.h ../include/wd.h \ + ../include/cdirgb.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/cdlua.h \ + ../include/cdlua5_private.h diff --git a/cd/src/cdluacontextplus5.mak b/cd/src/cdluacontextplus5.mak new file mode 100755 index 0000000..c00fe0d --- /dev/null +++ b/cd/src/cdluacontextplus5.mak @@ -0,0 +1,17 @@ +PROJNAME = cd +LIBNAME = cdluacontextplus51 + +OPT = YES + +DEFINES = CD_NO_OLD_INTERFACE +SRCDIR = lua5 +SRC = cdluacontextplus5.c +DEF_FILE = cdluacontextplus5.def + +LIBS = cdcontextplus + +USE_LUA51 = Yes +NO_LUALINK = Yes +USE_CD = YES +USE_CDLUA = YES +CD = .. diff --git a/cd/src/cdluacontextplus51.dep b/cd/src/cdluacontextplus51.dep new file mode 100644 index 0000000..e9ed75f --- /dev/null +++ b/cd/src/cdluacontextplus51.dep @@ -0,0 +1,3 @@ +$(OBJDIR)/cdluacontextplus5.o: lua5/cdluacontextplus5.c ../include/cd.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/luaconf.h \ + ../../lua5.1/include/lauxlib.h ../../lua5.1/include/lua.h diff --git a/cd/src/cdluaim5.mak b/cd/src/cdluaim5.mak new file mode 100755 index 0000000..a9f50e0 --- /dev/null +++ b/cd/src/cdluaim5.mak @@ -0,0 +1,16 @@ +PROJNAME = cd +LIBNAME = cdluaim51 + +OPT = YES + +DEF_FILE = cdluaim5.def +SRCDIR = lua5 +SRC = cdluaim5.c + +USE_CD = YES +USE_CDLUA = YES +USE_IM = YES +USE_IMLUA = YES +USE_LUA51 = YES +NO_LUALINK = Yes +CD = .. diff --git a/cd/src/cdluaim51.dep b/cd/src/cdluaim51.dep new file mode 100644 index 0000000..881afa3 --- /dev/null +++ b/cd/src/cdluaim51.dep @@ -0,0 +1,6 @@ +$(OBJDIR)/cdluaim5.o: lua5/cdluaim5.c ../../im/include/im.h \ + ../../im/include/old_im.h ../../im/include/im_image.h ../include/cd.h \ + ../include/cdirgb.h ../include/wd.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../../im/include/imlua.h ../include/cdlua.h \ + ../include/cdlua5_private.h diff --git a/cd/src/config.mak b/cd/src/config.mak new file mode 100755 index 0000000..93c45de --- /dev/null +++ b/cd/src/config.mak @@ -0,0 +1,47 @@ +PROJNAME = cd +LIBNAME = cd +OPT = YES + +DEFINES = CD_NO_OLD_INTERFACE + +SRCINTCGM = circle.c ellipse.c intcgm1.c \ + intcgm2.c intcgm4.c intcgm6.c list.c \ + sism.c tparse.c bparse.c +SRCINTCGM := $(addprefix intcgm/, $(SRCINTCGM)) + +SRCWIN32 = cdwclp.c cdwemf.c cdwimg.c cdwin.c cdwnative.c cdwprn.c cdwwmf.c wmf_emf.c cdwdbuf.c cdwdib.c +SRCWIN32 := $(addprefix win32/, $(SRCWIN32)) + +SRCSIM := cdfontex.c sim.c cd_truetype.c sim_other.c sim_primitives.c sim_linepolyfill.c +SRCSIM := $(addprefix sim/, $(SRCSIM)) + +SRCX11 = cdx11.c cdxclp.c cdximg.c cdxnative.c cdxdbuf.c xvertex.c +SRCX11 := $(addprefix x11/, $(SRCX11)) + +SRCDRV = cddgn.c cdcgm.c cgm.c cddxf.c cdirgb.c cdmf.c cdps.c cdpicture.c cddebug.c +SRCDRV := $(addprefix drv/, $(SRCDRV)) + +SRCNULL = cd0prn.c cd0emf.c cd0wmf.c +SRCNULL := $(addprefix drv/, $(SRCNULL)) + +SRCCOMM = cd.c wd.c wdhdcpy.c rgb2map.c cd_vectortext.c cd_active.c \ + cd_attributes.c cd_bitmap.c cd_image.c cd_primitives.c cd_text.c cd_util.c + +SRC = $(SRCCOMM) $(SRCINTCGM) $(SRCDRV) $(SRCSIM) + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + SRC += $(SRCWIN32) + LIBS = freetype6 +else + SRC += $(SRCNULL) $(SRCX11) + USE_X11 = Yes + LIBS = freetype +endif + +ifneq ($(findstring dll, $(TEC_UNAME)), ) + SRC += cd.rc +endif + +LDIR = ../lib/$(TEC_UNAME) + +INCLUDES = . drv x11 win32 intcgm /usr/include/freetype2 sim ../include diff --git a/cd/src/drv/cd0emf.c b/cd/src/drv/cd0emf.c new file mode 100755 index 0000000..13beb4c --- /dev/null +++ b/cd/src/drv/cd0emf.c @@ -0,0 +1,17 @@ +/** \file + * \brief Dummy EMF + * + * See Copyright Notice in cd.h + */ + +#include +#include "cd.h" +#include "cdemf.h" + + +cdContext* cdContextEMF(void) +{ + return NULL; +} + + diff --git a/cd/src/drv/cd0prn.c b/cd/src/drv/cd0prn.c new file mode 100755 index 0000000..429a392 --- /dev/null +++ b/cd/src/drv/cd0prn.c @@ -0,0 +1,17 @@ +/** \file + * \brief Dummy Printer + * + * See Copyright Notice in cd.h + */ + +#include +#include "cd.h" +#include "cdprint.h" + + + +cdContext* cdContextPrinter(void) +{ + return NULL; +} + diff --git a/cd/src/drv/cd0wmf.c b/cd/src/drv/cd0wmf.c new file mode 100755 index 0000000..a96761a --- /dev/null +++ b/cd/src/drv/cd0wmf.c @@ -0,0 +1,16 @@ +/** \file + * \brief Dummy WMF + * + * See Copyright Notice in cd.h + */ + +#include +#include "cd.h" +#include "cdwmf.h" + + +cdContext* cdContextWMF(void) +{ + return NULL; +} + diff --git a/cd/src/drv/cdcgm.c b/cd/src/drv/cdcgm.c new file mode 100755 index 0000000..3049818 --- /dev/null +++ b/cd/src/drv/cdcgm.c @@ -0,0 +1,1135 @@ +/** \file + * \brief CGM driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" +#include "cdcgm.h" +#include "cgm.h" + +#define get_red(_) (((double)cdRed(_))/255.) +#define get_green(_) (((double)cdGreen(_))/255.) +#define get_blue(_) (((double)cdBlue(_))/255.) + + +struct _cdCtxCanvas +{ + cdCanvas* canvas; + CGM *cgm; + + char filename[256]; /* Arquivo CGM */ + + int codificacao; /* Codificacao */ + int vdc_int_prec; + int first; /* Primeira primitiva a ser desenhada */ + long point; + int hassize; + int patindex; + + struct + { + cdfRect bbox; + int first; + } clip; + + cdfRect b_box; +}; + +static double cve_black[] = { 0.0, 0.0, 0.0 }; +static double cve_white[] = { 1.0, 1.0, 1.0 }; + +/* From INTCGM */ +int cdplayCGM(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data); +int cdRegisterCallbackCGM(int cb, cdCallback func); + + +/* +%F Atualiza os valores do bounding box +*/ +static void setbbox (cdCtxCanvas *ctxcanvas, double x, double y ) +{ + if ( ctxcanvas->first ) + { + ctxcanvas->b_box.xmin = x; + ctxcanvas->b_box.xmax = x; + ctxcanvas->b_box.ymin = y; + ctxcanvas->b_box.ymax = y; + ctxcanvas->first = 0; + } + + if ( xb_box.xmin ) ctxcanvas->b_box.xmin = x; + if ( x>ctxcanvas->b_box.xmax ) ctxcanvas->b_box.xmax = x; + if ( yb_box.ymin ) ctxcanvas->b_box.ymin = y; + if ( y>ctxcanvas->b_box.ymax ) ctxcanvas->b_box.ymax = y; +} + + +/* +%F metafile descriptor elements +*/ +static void metafile_descriptor (cdCtxCanvas *ctxcanvas) +{ + const char *font_list[] = { "SYSTEM", "COURIER", "TIMES_ROMAN", "HELVETICA", + "SYSTEM_BOLD", "COURIER_BOLD", "TIMES_ROMAN_BOLD", "HELVETICA_BOLD", + "SYSTEM_ITALIC", "COURIER_ITALIC", "TIMES_ROMAN_ITALIC", + "HELVETICA_ITALIC", "SYSTEM_BOLDITALIC", "COURIER_BOLDITALIC", + "TIMES_ROMAN_BOLDITALIC", "HELVETICA_BOLDITALIC", NULL }; + + cgm_metafile_version ( ctxcanvas->cgm, 1); + cgm_metafile_description ( ctxcanvas->cgm, "CD generated" ); + cgm_vdc_type ( ctxcanvas->cgm, 0 /* integer */ ); + cgm_integer_precision ( ctxcanvas->cgm, 16 ); + cgm_real_precision ( ctxcanvas->cgm, 3 /* fixed 32 */ ); + cgm_index_precision ( ctxcanvas->cgm, 16 ); + cgm_colour_precision ( ctxcanvas->cgm, 8 ); + cgm_colour_index_precision ( ctxcanvas->cgm, 8 ); + cgm_maximum_colour_index ( ctxcanvas->cgm, 255ul ); + cgm_colour_value_extent ( ctxcanvas->cgm, cve_black, cve_white ); + + { + static int classes[] = { -1 /* drawing set */ }; + static int ids [] = { 1 /* plus control set */ }; + cgm_metafile_element_list ( ctxcanvas->cgm, 1, classes, ids ); + } + + cgm_begin_metafile_defaults ( ctxcanvas->cgm ); + + cgm_vdc_integer_precision ( ctxcanvas->cgm, ctxcanvas->vdc_int_prec ); + cgm_interior_style ( ctxcanvas->cgm, 1 ); /* SOLID */ + cgm_edge_visibility ( ctxcanvas->cgm, 0 ); /* OFF */ + + cgm_end_metafile_defaults ( ctxcanvas->cgm ); + + cgm_font_list ( ctxcanvas->cgm, font_list ); +} + +/* +%F Pictire descriptor elements +*/ +static void picture_descriptor (cdCtxCanvas *ctxcanvas) +{ + cgm_scaling_mode ( ctxcanvas->cgm, 1 /* metric */, 1.0f ); + cgm_colour_selection_mode ( ctxcanvas->cgm, 1 /* direct */ ); + cgm_line_width_specify_mode ( ctxcanvas->cgm, 0 /* absolute=0, scaled=1 */ ); + cgm_marker_size_specify_mode ( ctxcanvas->cgm, 0 /* absolute=0, scaled=1 */ ); + + ctxcanvas->point = ftell ( ctxcanvas->cgm->file ); + if ( ctxcanvas->codificacao == CD_CLEAR_TEXT ) + { + fprintf ( ctxcanvas->cgm->file, "%80s\n", "" ); + fprintf ( ctxcanvas->cgm->file, "%80s\n", "" ); + } + else + { + cgm_vdc_extent( ctxcanvas->cgm, 0, 0, (double)ctxcanvas->canvas->w, (double)ctxcanvas->canvas->h); + } +} + +/* +%F Control descriptor elements +*/ +static void control_elements (cdCtxCanvas *ctxcanvas) +{ + double c[3] = {1.0,1.0,1.0}; + + cgm_vdc_integer_precision ( ctxcanvas->cgm, ctxcanvas->vdc_int_prec ); + cgm_vdc_real_precision ( ctxcanvas->cgm, 2 /* fixed 32 */ ); + cgm_auxiliary_colour ( ctxcanvas->cgm, c ); +} + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + long pt; + + pt = ftell ( ctxcanvas->cgm->file ); + fseek ( ctxcanvas->cgm->file, ctxcanvas->point, SEEK_SET ); + + if (ctxcanvas->hassize) + cgm_vdc_extent ( ctxcanvas->cgm, 0, 0, (double)ctxcanvas->canvas->w, (double)ctxcanvas->canvas->h); + else + { + if ( ctxcanvas->clip.first ) + cgm_vdc_extent ( ctxcanvas->cgm, ctxcanvas->b_box.xmin, ctxcanvas->b_box.ymin, ctxcanvas->b_box.xmax, ctxcanvas->b_box.ymax ); + else + cgm_vdc_extent ( ctxcanvas->cgm, ctxcanvas->clip.bbox.xmin, ctxcanvas->clip.bbox.ymin, ctxcanvas->clip.bbox.xmax, ctxcanvas->clip.bbox.ymax ); + } + + fseek ( ctxcanvas->cgm->file, pt, SEEK_SET ); + + cgm_end_picture ( ctxcanvas->cgm ); + cgm_end_metafile ( ctxcanvas->cgm ); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +static void cddeactivate(cdCtxCanvas *ctxcanvas) +{ + fflush(ctxcanvas->cgm->file); +} + +/* +%F Comeca uma nova pagina. +*/ +static void cdflush(cdCtxCanvas *ctxcanvas) +{ + long pt; + + pt = ftell ( ctxcanvas->cgm->file ); + fseek ( ctxcanvas->cgm->file, ctxcanvas->point, SEEK_SET ); + + if (ctxcanvas->hassize) + cgm_vdc_extent ( ctxcanvas->cgm, 0, 0, (double)ctxcanvas->canvas->w, (double)ctxcanvas->canvas->h); + else + { + if ( ctxcanvas->clip.first ) + cgm_vdc_extent ( ctxcanvas->cgm, ctxcanvas->b_box.xmin, ctxcanvas->b_box.ymin, + ctxcanvas->b_box.xmax, ctxcanvas->b_box.ymax ); + else + cgm_vdc_extent ( ctxcanvas->cgm, ctxcanvas->clip.bbox.xmin, ctxcanvas->clip.bbox.ymin, + ctxcanvas->clip.bbox.xmax, ctxcanvas->clip.bbox.ymax ); + } + + fseek ( ctxcanvas->cgm->file, pt, SEEK_SET ); + + cgm_end_picture ( ctxcanvas->cgm ); + + cgm_begin_picture ( ctxcanvas->cgm, "Picture x" ); + picture_descriptor ( ctxcanvas); + cgm_begin_picture_body ( ctxcanvas->cgm ); +} + + +/******************************************************/ +/* coordinate transformation */ +/******************************************************/ + +static int cdclip(cdCtxCanvas *ctxcanvas, int mode) +{ + if (mode == CD_CLIPPOLYGON) + return ctxcanvas->canvas->clip_mode; + + cgm_clip_indicator ( ctxcanvas->cgm, mode ); + + if (mode == CD_CLIPAREA) + cgm_clip_rectangle ( ctxcanvas->cgm, (double) ctxcanvas->canvas->clip_rect.xmin, (double) ctxcanvas->canvas->clip_rect.ymin, + (double) ctxcanvas->canvas->clip_rect.xmax, (double) ctxcanvas->canvas->clip_rect.ymax ); + + return mode; +} + +static void clip_bbox (cdCtxCanvas *ctxcanvas, double xmin, double ymin, double xmax, double ymax) +{ + if ( ctxcanvas->clip.first ) + { + ctxcanvas->clip.bbox.xmin = xmin; + ctxcanvas->clip.bbox.xmax = xmax; + ctxcanvas->clip.bbox.ymin = ymin; + ctxcanvas->clip.bbox.ymax = ymax; + ctxcanvas->clip.first = 0; + } + + if ( xmin < ctxcanvas->clip.bbox.xmin ) ctxcanvas->clip.bbox.xmin = xmin; + if ( ymin < ctxcanvas->clip.bbox.ymin ) ctxcanvas->clip.bbox.ymin = ymin; + if ( xmax > ctxcanvas->clip.bbox.xmax ) ctxcanvas->clip.bbox.xmax = xmax; + if ( ymax > ctxcanvas->clip.bbox.ymax ) ctxcanvas->clip.bbox.ymax = ymax; +} + +static void cdcliparea(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if (ctxcanvas->canvas->clip_mode == CD_CLIPAREA) + cgm_clip_rectangle ( ctxcanvas->cgm, (double) xmin, (double) ymin, + (double) xmax, (double) ymax ); + + clip_bbox (ctxcanvas, (double)xmin, (double)ymin, (double)xmax, (double)ymax ); +} + +static void cdfcliparea(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + if (ctxcanvas->canvas->clip_mode == CD_CLIPAREA) + cgm_clip_rectangle ( ctxcanvas->cgm, xmin, ymin, xmax, ymax ); + + clip_bbox (ctxcanvas, xmin, ymin, xmax, ymax ); +} + +/******************************************************/ +/* primitives */ +/******************************************************/ + +static int cdinteriorstyle (cdCtxCanvas *ctxcanvas, int style); + +static void cdline(cdCtxCanvas *ctxcanvas, int px1, int py1, int px2, int py2) +{ + double points[4]; + + points[0] = (double)px1; + points[1] = (double)py1; + points[2] = (double)px2; + points[3] = (double)py2; + + cgm_polyline( ctxcanvas->cgm, 2, points); + + setbbox (ctxcanvas, points[0], points[1] ); + setbbox (ctxcanvas, points[2], points[3] ); +} + +static void cdfline(cdCtxCanvas *ctxcanvas, double px1, double py1, double px2, double py2) +{ + double points[4]; + + points[0] = px1; + points[1] = py1; + points[2] = px2; + points[3] = py2; + + cgm_polyline( ctxcanvas->cgm, 2, points); + + setbbox (ctxcanvas, points[0], points[1] ); + setbbox (ctxcanvas, points[2], points[3] ); +} + +static void cdrect(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + double points[4]; + + points[0] = (double)xmin; + points[1] = (double)ymin; + points[2] = (double)xmax; + points[3] = (double)ymax; + + cgm_interior_style ( ctxcanvas->cgm, HOLLOW); + cgm_rectangle( ctxcanvas->cgm, points); + cdinteriorstyle(ctxcanvas, ctxcanvas->canvas->interior_style); + + setbbox (ctxcanvas, points[0], points[1] ); + setbbox (ctxcanvas, points[2], points[1] ); + setbbox (ctxcanvas, points[2], points[3] ); + setbbox (ctxcanvas, points[0], points[3] ); +} + +static void cdfrect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + double points[4]; + + points[0] = xmin; + points[1] = ymin; + points[2] = xmax; + points[3] = ymax; + + cgm_interior_style ( ctxcanvas->cgm, HOLLOW); + cgm_rectangle( ctxcanvas->cgm, points); + cdinteriorstyle(ctxcanvas, ctxcanvas->canvas->interior_style); + + setbbox (ctxcanvas, points[0], points[1] ); + setbbox (ctxcanvas, points[2], points[1] ); + setbbox (ctxcanvas, points[2], points[3] ); + setbbox (ctxcanvas, points[0], points[3] ); +} + +static void cdbox(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + double points[4]; + + points[0] = (double)xmin; + points[1] = (double)ymin; + points[2] = (double)xmax; + points[3] = (double)ymax; + + cgm_rectangle( ctxcanvas->cgm, points); + + setbbox (ctxcanvas, points[0], points[1] ); + setbbox (ctxcanvas, points[2], points[1] ); + setbbox (ctxcanvas, points[2], points[3] ); + setbbox (ctxcanvas, points[0], points[3] ); +} + +static void cdfbox(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + double points[4]; + + points[0] = xmin; + points[1] = ymin; + points[2] = xmax; + points[3] = ymax; + + cgm_rectangle( ctxcanvas->cgm, points); + + setbbox (ctxcanvas, points[0], points[1] ); + setbbox (ctxcanvas, points[2], points[1] ); + setbbox (ctxcanvas, points[2], points[3] ); + setbbox (ctxcanvas, points[0], points[3] ); +} + +static void arc (cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2, + double *center, double *first_end_point, + double *second_end_point, double *dx_start, double *dy_start, + double *dx_end, double *dy_end ) +{ + double width, height; + + center[0] = xc; + center[1] = yc; + + width = w/2; + height = h/2; + + first_end_point[0] = center[0] + width; + first_end_point[1] = center[1]; + + second_end_point[0] = center[0]; + second_end_point[1] = center[1] + height; + + *dx_start = width*cos(a1*CD_DEG2RAD); + *dy_start = height*sin(a1*CD_DEG2RAD); + + *dx_end = width*cos(a2*CD_DEG2RAD); + *dy_end = height*sin(a2*CD_DEG2RAD); + + setbbox (ctxcanvas, center[0]-width, center[1]-height ); + setbbox (ctxcanvas, center[0]+width, center[1]-height ); + setbbox (ctxcanvas, center[0]+width, center[1]+height ); + setbbox (ctxcanvas, center[0]-width, center[1]+height ); +} + +static void cdarc(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + double center[2], first_end_point[2], second_end_point[2]; + double dx_start, dy_start, dx_end, dy_end; + + arc (ctxcanvas, (double)xc, (double)yc, (double)w, (double)h, a1, a2, center, first_end_point, second_end_point, + &dx_start, &dy_start, &dx_end, &dy_end ); + + cgm_elliptical_arc ( ctxcanvas->cgm, center, first_end_point, second_end_point, dx_start, dy_start, dx_end, dy_end ); +} + +static void cdfarc(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + double center[2], first_end_point[2], second_end_point[2]; + double dx_start, dy_start, dx_end, dy_end; + + arc (ctxcanvas, xc, yc, w, h, a1, a2, center, first_end_point, second_end_point, + &dx_start, &dy_start, &dx_end, &dy_end ); + + cgm_elliptical_arc ( ctxcanvas->cgm, center, first_end_point, second_end_point, dx_start, dy_start, dx_end, dy_end ); +} + +static void cdsector(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + double center[2], first_end_point[2], second_end_point[2]; + double dx_start, dy_start, dx_end, dy_end; + + arc (ctxcanvas, (double)xc, (double)yc, (double)w, (double)h, a1, a2, center, first_end_point, second_end_point, + &dx_start, &dy_start, &dx_end, &dy_end ); + + + cgm_elliptical_arc_close ( ctxcanvas->cgm, center, first_end_point, second_end_point, + dx_start, dy_start, dx_end, dy_end, 0 ); + + setbbox (ctxcanvas, (double)xc-w/2., (double)yc-h/2. ); + setbbox (ctxcanvas, (double)xc+w/2., (double)yc-h/2. ); + setbbox (ctxcanvas, (double)xc+w/2., (double)yc+h/2. ); + setbbox (ctxcanvas, (double)xc-w/2., (double)yc+h/2. ); +} + +static void cdfsector(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + double center[2], first_end_point[2], second_end_point[2]; + double dx_start, dy_start, dx_end, dy_end; + + arc (ctxcanvas, xc, yc, w, h, a1, a2, center, first_end_point, second_end_point, + &dx_start, &dy_start, &dx_end, &dy_end ); + + + cgm_elliptical_arc_close ( ctxcanvas->cgm, center, first_end_point, second_end_point, + dx_start, dy_start, dx_end, dy_end, 0 ); + + setbbox (ctxcanvas, xc-w/2., yc-h/2. ); + setbbox (ctxcanvas, xc+w/2., yc-h/2. ); + setbbox (ctxcanvas, xc+w/2., yc+h/2. ); + setbbox (ctxcanvas, xc-w/2., yc+h/2. ); +} + +static void settextbbox (cdCtxCanvas *ctxcanvas, double x, double y, int width, int height ) +{ + switch ( ctxcanvas->canvas->text_alignment ) + { + case CD_NORTH: + setbbox (ctxcanvas, x-(width/2.), y-height ); + setbbox (ctxcanvas, x+(width/2.), y ); + break; + case CD_SOUTH: + setbbox (ctxcanvas, x-(width/2.), y+height ); + setbbox (ctxcanvas, x+(width/2.), y ); + break; + case CD_EAST: + setbbox (ctxcanvas, x-width, y-(height/2.) ); + setbbox (ctxcanvas, x, y+(height/2.) ); + break; + case CD_WEST: + setbbox (ctxcanvas, x, y-(height/2.) ); + setbbox (ctxcanvas, x+width, y+(height/2.) ); + break; + case CD_NORTH_EAST: + setbbox (ctxcanvas, x-width, y-height ); + setbbox (ctxcanvas, x, y ); + break; + case CD_NORTH_WEST: + setbbox (ctxcanvas, x, y-height ); + setbbox (ctxcanvas, x+width, y ); + break; + case CD_SOUTH_EAST: + setbbox (ctxcanvas, x-width, y ); + setbbox (ctxcanvas, x, y+height ); + break; + case CD_SOUTH_WEST: + setbbox (ctxcanvas, x, y ); + setbbox (ctxcanvas, x+width, y+height ); + break; + case CD_CENTER: + setbbox (ctxcanvas, x-(width/2.), y-(height/2.) ); + setbbox (ctxcanvas, x+(width/2.), y+(height/2.) ); + break; + case CD_BASE_LEFT: + setbbox (ctxcanvas, x, y ); + setbbox (ctxcanvas, x+width, y+height ); + break; + case CD_BASE_CENTER: + setbbox (ctxcanvas, x-(width/2.), y ); + setbbox (ctxcanvas, x+(width/2.), y+height ); + break; + case CD_BASE_RIGHT: + setbbox (ctxcanvas, x-width, y ); + setbbox (ctxcanvas, x, y+height ); + break; + } +} + +static void cdtext(cdCtxCanvas *ctxcanvas, int x, int y, const char *s, int len) +{ + int width, height; + + cgm_text( ctxcanvas->cgm, 1 /* final */ , (double)x, (double)y, s, len ); + + cdgettextsizeEX(ctxcanvas, s, len, &width, &height); + + settextbbox (ctxcanvas, (double) x, (double) y, width, height ); +} + +static void cdftext(cdCtxCanvas *ctxcanvas, double x, double y, const char *s, int len) +{ + int width, height; + + cgm_text( ctxcanvas->cgm, 1 /* final */ , x, y, s, len); + + cdgettextsizeEX(ctxcanvas, s, len, &width, &height); + + settextbbox (ctxcanvas, x, y, width, height ); +} + +static void cdpoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n) +{ + int i; + double *fpoly; + + fpoly = (double *)malloc(2 * (n+1) * sizeof(double)); + + for (i = 0; i < n; i++) + { + fpoly[2*i] = (double) poly[i].x; + fpoly[2*i+1] = (double) poly[i].y; + + setbbox (ctxcanvas, fpoly[2*i] , fpoly[2*i+1] ); + } + + switch ( mode ) + { + case CD_OPEN_LINES: + cgm_polyline( ctxcanvas->cgm, n, fpoly ); + break; + case CD_CLOSED_LINES: + fpoly[2*n] = fpoly[0]; + fpoly[2*n+1] = fpoly[1]; + n++; + cgm_polyline( ctxcanvas->cgm, n, fpoly ); + break; + case CD_FILL: + cgm_polygon( ctxcanvas->cgm, n, fpoly); + break; + } + + free(fpoly); +} + +static void cdfpoly(cdCtxCanvas *ctxcanvas, int mode, cdfPoint* poly, int n) +{ + int i; + double *fpoly = (double*)poly; + + for (i = 0; i < n; i++) + { + setbbox (ctxcanvas, fpoly[2*i] , fpoly[2*i+1] ); + } + + switch ( mode ) + { + case CD_OPEN_LINES: + cgm_polyline( ctxcanvas->cgm, n, fpoly ); + break; + case CD_CLOSED_LINES: + fpoly[2*n] = fpoly[0]; + fpoly[2*n+1] = fpoly[1]; + n++; + cgm_polyline( ctxcanvas->cgm, n, fpoly ); + break; + case CD_FILL: + cgm_polygon( ctxcanvas->cgm, n, fpoly); + break; + } +} + + +/******************************************************/ +/* attributes */ +/******************************************************/ + +static int cdlinestyle(cdCtxCanvas *ctxcanvas, int style) +{ + cgm_line_type( ctxcanvas->cgm, (long)(style + 1)); + return style; +} + +static int cdlinewidth(cdCtxCanvas *ctxcanvas, int width) +{ + cgm_line_width( ctxcanvas->cgm, (double)width ); + return width; +} + +static int cdinteriorstyle (cdCtxCanvas *ctxcanvas, int style ) +{ + switch ( style ) + { + case CD_SOLID: + style = 1; + break; + case CD_STIPPLE: + case CD_PATTERN: + style = 2; + break; + case CD_HATCH: + style = 3; + break; + } + + cgm_interior_style ( ctxcanvas->cgm, style ); + + return style; +} + +static int cdhatch(cdCtxCanvas *ctxcanvas, int style) +{ + int cgm_style = style; + + if ( cgm_style==2 ) + cgm_style = 3; + else if ( cgm_style==3 ) + cgm_style = 2; + + cgm_hatch_index ( ctxcanvas->cgm, (long)cgm_style+1 ); + + cgm_interior_style ( ctxcanvas->cgm, 3 ); + + return style; +} + +static void cdstipple(cdCtxCanvas *ctxcanvas, int n, int m, const unsigned char *stipple) +{ + double *pattab; + int i, j=0; + + pattab = (double *) malloc ( n*m*3*sizeof(double)); + + for ( i=0; icanvas->foreground) : get_red(ctxcanvas->canvas->background); + pattab[j+1] = ( stipple[i] ) ? get_green(ctxcanvas->canvas->foreground) : get_green(ctxcanvas->canvas->background); + pattab[j+2] = ( stipple[i] ) ? get_blue(ctxcanvas->canvas->foreground) : get_blue(ctxcanvas->canvas->background); + j+=3; + } + + cgm_pattern_table ( ctxcanvas->cgm, (long) ctxcanvas->patindex, (long) n, (long) m, (int) 8, pattab ); + cgm_pattern_index ( ctxcanvas->cgm, (long) ctxcanvas->patindex++ ); + free(pattab); + + cgm_interior_style ( ctxcanvas->cgm, 2 ); /* PATTERN */ +} + +static void cdpattern(cdCtxCanvas *ctxcanvas, int n, int m, const long int *pattern) +{ + double *pattab; + int i, j=0; + + pattab = (double *) malloc ( n*m*3*sizeof(double) ); + + for ( i=0; icgm, (long) ctxcanvas->patindex, (long) n, (long) m, (int) 8, pattab ); + cgm_pattern_index ( ctxcanvas->cgm, (long) ctxcanvas->patindex++ ); + free(pattab); + + cgm_interior_style ( ctxcanvas->cgm, 2 ); /* PATTERN */ +} + +static int cdfont(cdCtxCanvas *ctxcanvas, const char *type_face, int style, int size) +{ + long index = 0; + + if (cdStrEqualNoCase(type_face, "System")) + switch (style&3) + { + case CD_PLAIN: + index = 1; + break; + case CD_BOLD: + index = 5; + break; + case CD_ITALIC: + index = 9; + break; + case CD_BOLD_ITALIC: + index = 13; + break; + } + else if (cdStrEqualNoCase(type_face, "Courier")) + switch (style&3) + { + case CD_PLAIN: + index = 2; + break; + case CD_BOLD: + index = 6; + break; + case CD_ITALIC: + index = 10; + break; + case CD_BOLD_ITALIC: + index = 14; + break; + } + else if (cdStrEqualNoCase(type_face, "Times")) + switch (style&3) + { + case CD_PLAIN: + index = 3; + break; + case CD_BOLD: + index = 7; + break; + case CD_ITALIC: + index = 11; + break; + case CD_BOLD_ITALIC: + index = 15; + break; + } + else if (cdStrEqualNoCase(type_face, "Helvetica")) + switch (style&3) + { + case CD_PLAIN: + index = 4; + break; + case CD_BOLD: + index = 8; + break; + case CD_ITALIC: + index = 12; + break; + case CD_BOLD_ITALIC: + index = 16; + break; + } + + if (index == 0) return 0; + + cgm_char_height ( ctxcanvas->cgm, cdGetFontSizePixels(ctxcanvas->canvas, size)); + cgm_text_font_index( ctxcanvas->cgm, index ); + + return 1; +} + +static int cdtextalignment(cdCtxCanvas *ctxcanvas, int alignment) +{ + int hor = 0, ver = 0; + enum { NORMHORIZ, LEFT, CTR, RIGHT }; + enum { NORMVERT, TOP, CAP, HALF, BASE, BOTTOM }; + + switch ( alignment ) + { + case CD_NORTH: + hor = CTR; + ver = TOP; + break; + case CD_SOUTH: + hor = CTR; + ver = BOTTOM; + break; + case CD_EAST: + hor = RIGHT; + ver = HALF; + break; + case CD_WEST: + hor = LEFT; + ver = HALF; + break; + case CD_NORTH_EAST: + hor = RIGHT; + ver = TOP; + break; + case CD_NORTH_WEST: + hor = LEFT; + ver = TOP; + break; + case CD_SOUTH_EAST: + hor = RIGHT; + ver = BOTTOM; + break; + case CD_SOUTH_WEST: + hor = LEFT; + ver = BOTTOM; + break; + case CD_CENTER: + hor = CTR; + ver = HALF; + break; + case CD_BASE_LEFT: + hor = LEFT; + ver = BASE; + break; + case CD_BASE_CENTER: + hor = CTR; + ver = BASE; + break; + case CD_BASE_RIGHT: + hor = RIGHT; + ver = BASE; + break; + } + + cgm_text_alignment ( ctxcanvas->cgm, hor, ver , (double)0.0, (double)0.0 ); + + return alignment; +} + +/******************************************************/ +/* color */ +/******************************************************/ + +static long int cdforeground(cdCtxCanvas *ctxcanvas, long int color) +{ + double cor[3]; + + cor[0] = get_red(color); + cor[1] = get_green(color); + cor[2] = get_blue(color); + + cgm_text_colour( ctxcanvas->cgm, cor ); + cgm_fill_colour( ctxcanvas->cgm, cor ); + cgm_line_colour( ctxcanvas->cgm, cor ); + + return color; +} + +static long int cdbackground(cdCtxCanvas *ctxcanvas, long int color) +{ + double bc[3]; + + bc[0] = get_red(color); + bc[1] = get_green(color); + bc[2] = get_blue(color); + + ctxcanvas->canvas->background = color; + cgm_backgound_colour ( ctxcanvas->cgm, bc ); + + return color; +} + +static int cdbackopacity(cdCtxCanvas *ctxcanvas, int opaque) +{ + if (opaque == CD_TRANSPARENT) + cgm_transparency(ctxcanvas->cgm, 1); + else + cgm_transparency(ctxcanvas->cgm, 0); + return opaque; +} + +/******************************************************/ +/* client images */ +/******************************************************/ + +static void cdputimagerectrgb(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + double p[6]; + double *color_array; + int i,j,index,c; + int rw, rh; + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + color_array = (double *) malloc ( rw*rh*3*sizeof(double) ); + if (!color_array) + return; + + p[0] = (double) x; p[1] = (double) (y+h); + p[2] = (double) (x+w); p[3] = (double) y; + p[4] = (double) (x+w); p[5] = (double) (y+h); + + for ( i=0; icgm, p, (long)rw, (long)rh, 8, color_array ); + + free(color_array); + + setbbox (ctxcanvas, p[0], p[1] ); + setbbox (ctxcanvas, p[2], p[3] ); +} + +static void cdputimagerectmap(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + double p[6]; + double *color_array; + int i,j,c; + unsigned char r, g, b; + int rw, rh; + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + color_array = (double *) malloc ( rw*rh*3*sizeof(double) ); + if (!color_array) + return; + + p[0] = (double) x; p[1] = (double) y; + p[2] = (double) (x+w); p[3] = (double) (y+h); + p[4] = (double) (x+w); p[5] = (double) y; + + for ( i=0; icgm, p, (long)rw, (long)rh, 8, color_array ); + + free(color_array); + + setbbox (ctxcanvas, p[0], p[1] ); + setbbox (ctxcanvas, p[2], p[3] ); +} + +/******************************************************/ +/* server images */ +/******************************************************/ + +static void cdpixel(cdCtxCanvas *ctxcanvas, int x, int y, long int color) +{ + double cor[3]; + double pts[2]; + + pts[0] = (double) x; + pts[1] = (double) y; + + cor[0] = get_red(color); + cor[1] = get_green(color); + cor[2] = get_blue(color); + + cgm_marker_colour( ctxcanvas->cgm, cor); + cgm_polymarker ( ctxcanvas->cgm, 1, pts ); +} + +/* +%F Cria um canvas CGM. +Parametros passados em data: +[nome] nome do arquivo de saida <= 255 caracteres +[size] tamanho do papel +-t codificacao clear text se nao binaria +*/ +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + cdCtxCanvas *ctxcanvas; + char *line = (char *)data; + char c; + char words[4][256]; + char filename[10240] = ""; + double w=0, h=0, r=0; + int p=0; + int i, n; + + line += cdGetFileName(line, filename); + if (filename[0] == 0) + return; + + n = sscanf(line, "%s %s %s %s", words[0], words[1], words[2], words[3]); + + ctxcanvas = (cdCtxCanvas *)malloc(sizeof(cdCtxCanvas)); + + canvas->ctxcanvas = ctxcanvas; + ctxcanvas->canvas = canvas; + + strcpy(ctxcanvas->filename, filename); + + canvas->w_mm = (double)INT_MAX*3.78; + canvas->h_mm = (double)INT_MAX*3.78; + canvas->xres = 3.78; + canvas->yres = 3.78; + canvas->bpp = 24; + + ctxcanvas->vdc_int_prec = 16; + ctxcanvas->codificacao = CD_BIN; + ctxcanvas->first = 1; + ctxcanvas->clip.first = 1; + ctxcanvas->patindex = 1; + + ctxcanvas->hassize = 0; /* Indica se foi passado um tamanho para o canvas */ + + for (i = 0; i < n; i++) + { + if (sscanf ( words[i], "%lgx%lg", &w, &h )== 2) + { + canvas->w_mm = w; + canvas->h_mm = h; + ctxcanvas->hassize = 1; + } + else if (sscanf ( words[i], "%lg", &r ) == 1) + canvas->yres = canvas->xres = r; + else if (sscanf ( words[i], "-%c%d", &c, &p )>0) + { + if ( c=='t' ) + ctxcanvas->codificacao = CD_CLEAR_TEXT; + else if ( c=='p' ) + ctxcanvas->vdc_int_prec = p; + } + } + + if ( ctxcanvas->vdc_int_prec != 16 && w == 0.0 && h == 0.0 ) + { + canvas->w_mm = (double) (pow(2,p)/2)-1; + canvas->h_mm = (double) (pow(2,p)/2)-1; + } + + /* update canvas context */ + canvas->w = (int)(canvas->w_mm * canvas->xres); + canvas->h = (int)(canvas->h_mm * canvas->yres); + + ctxcanvas->cgm = cgm_begin_metafile ( ctxcanvas->filename, ctxcanvas->codificacao, "CD - CanvasDraw, Tecgraf/PUC-RIO" ); + + metafile_descriptor(ctxcanvas); + + cgm_begin_picture ( ctxcanvas->cgm, "Picture x" ); + + picture_descriptor (ctxcanvas); + + cgm_clip_rectangle ( ctxcanvas->cgm, 0, 0, (double)canvas->w, (double)canvas->h); + cgm_clip_indicator (ctxcanvas->cgm, 0); + + cgm_begin_picture_body ( ctxcanvas->cgm ); + + control_elements (ctxcanvas); + + cgm_marker_type( ctxcanvas->cgm, MARKER_DOT); + cgm_marker_size( ctxcanvas->cgm, 1.0); +} + +static void cdinittable(cdCanvas* canvas) +{ + /* initialize function table*/ + canvas->cxFlush = cdflush; + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxPoly = cdpoly; + canvas->cxRect = cdrect; + canvas->cxBox = cdbox; + canvas->cxArc = cdarc; + canvas->cxSector = cdsector; + canvas->cxText = cdtext; + canvas->cxFLine = cdfline; + canvas->cxFPoly = cdfpoly; + canvas->cxFRect = cdfrect; + canvas->cxFBox = cdfbox; + canvas->cxFArc = cdfarc; + canvas->cxFSector = cdfsector; + canvas->cxFText = cdftext; + canvas->cxPutImageRectRGB = cdputimagerectrgb; + canvas->cxPutImageRectMap = cdputimagerectmap; + + canvas->cxClip = cdclip; + canvas->cxClipArea = cdcliparea; + canvas->cxFClipArea = cdfcliparea; + canvas->cxLineStyle = cdlinestyle; + canvas->cxLineWidth = cdlinewidth; + canvas->cxInteriorStyle = cdinteriorstyle; + canvas->cxHatch = cdhatch; + canvas->cxStipple = cdstipple; + canvas->cxPattern = cdpattern; + canvas->cxFont = cdfont; + canvas->cxTextAlignment = cdtextalignment; + canvas->cxBackground = cdbackground; + canvas->cxForeground = cdforeground; + canvas->cxBackOpacity = cdbackopacity; + + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxDeactivate = cddeactivate; +} + +/******************************************************/ + +static cdContext cdCGMContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_PALETTE | + CD_CAP_CLIPPOLY | CD_CAP_WRITEMODE | CD_CAP_IMAGESRV | + CD_CAP_LINECAP | CD_CAP_LINEJOIN | CD_CAP_REGION | CD_CAP_CHORD | + CD_CAP_FONTDIM | CD_CAP_TEXTSIZE | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB | + CD_CAP_TEXTORIENTATION), + 0, + cdcreatecanvas, + cdinittable, + cdplayCGM, + cdRegisterCallbackCGM, +}; + +cdContext* cdContextCGM(void) +{ + return &cdCGMContext; +} + diff --git a/cd/src/drv/cddebug.c b/cd/src/drv/cddebug.c new file mode 100755 index 0000000..23d8446 --- /dev/null +++ b/cd/src/drv/cddebug.c @@ -0,0 +1,733 @@ +/** \file + * \brief CD DEBUG driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include + +#include "cd.h" +#include "wd.h" +#include "cd_private.h" +#include "cddebug.h" + + +#define CDDBG_FLUSH "Flush" +#define CDDBG_CLEAR "Clear" +#define CDDBG_CLIP "Clip" +#define CDDBG_CLIPAREA "Cliparea" +#define CDDBG_LINE "Line" +#define CDDBG_BOX "Box" +#define CDDBG_ARC "Arc" +#define CDDBG_SECTOR "Sector" +#define CDDBG_TEXT "Text" +#define CDDBG_BEGIN "Begin" +#define CDDBG_VERTEX "Vertex" +#define CDDBG_END "End" +#define CDDBG_MARK "Mark" +#define CDDBG_BACKOPACITY "BackOpacity" +#define CDDBG_WRITEMODE "WriteMode" +#define CDDBG_LINESTYLE "LineStyle" +#define CDDBG_LINEWIDTH "LineWidth" +#define CDDBG_INTERIORSTYLE "InteriorStyle" +#define CDDBG_HATCH "Hatch" +#define CDDBG_STIPPLE "Stipple" +#define CDDBG_PATTERN "Pattern" +#define CDDBG_NATIVEFONT "NativeFont" +#define CDDBG_TEXTALIGNMENT "TextAlignment" +#define CDDBG_PALETTE "Palette" +#define CDDBG_BACKGROUND "Background" +#define CDDBG_FOREGROUND "Foreground" +#define CDDBG_PIXEL "Pixel" +#define CDDBG_SCROLLAREA "ScrollArea" +#define CDDBG_TEXTORIENTATION "TextOrientation" +#define CDDBG_RECT "Rect" +#define CDDBG_FILLMODE "FillMode" +#define CDDBG_LINESTYLEDASHES "LineStyleDashes" +#define CDDBG_LINECAP "LineCap" +#define CDDBG_LINEJOIN "LineJoin" +#define CDDBG_CHORD "Chord" +#define CDDBG_FLINE "fLine" +#define CDDBG_FRECT "fRect" +#define CDDBG_FBOX "fBox" +#define CDDBG_FARC "fArc" +#define CDDBG_FSECTOR "fSector" +#define CDDBG_FTEXT "fText" +#define CDDBG_FVERTEX "fVertex" +#define CDDBG_MATRIX "Matrix" +#define CDDBG_FCHORD "fChord" +#define CDDBG_FCLIPAREA "fClipArea" +#define CDDBG_FONT "Font" +#define CDDBG_PUTIMAGERGB "PutImageRGB" +#define CDDBG_PUTIMAGERGBA "PutImageRGBA" +#define CDDBG_PUTIMAGEMAP "PutImageMap" + +struct _cdCtxCanvas +{ + cdCanvas* canvas; + char* filename; + FILE* file; + int last_line_style; + int last_fill_mode; +}; + +struct _cdCtxImage { + cdCtxCanvas *ctxcanvas; +}; + +static void cdflush(cdCtxCanvas *ctxcanvas) +{ + fflush(ctxcanvas->file); + fprintf(ctxcanvas->file, "%s()\n", CDDBG_FLUSH); +} + +static void cdclear(cdCtxCanvas *ctxcanvas) +{ + fprintf(ctxcanvas->file, "%s()\n", CDDBG_CLEAR); +} + +static int cdclip(cdCtxCanvas *ctxcanvas, int mode) +{ + const char* enum2str[] = { + "CD_CLIPOFF", + "CD_CLIPAREA", + "CD_CLIPPOLYGON", + "CD_CLIPREGION" + }; + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_CLIP, enum2str[mode]); + return mode; +} + +static void cdcliparea(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + fprintf(ctxcanvas->file, "%s(%d, %d, %d, %d)\n", CDDBG_CLIPAREA, xmin, xmax, ymin, ymax); +} + +static void cdfcliparea(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + fprintf(ctxcanvas->file, "%s(%g, %g, %g, %g)\n", CDDBG_FCLIPAREA, xmin, xmax, ymin, ymax); +} + +static void cdtransform(cdCtxCanvas *ctxcanvas, const double* matrix) +{ + if (matrix) + fprintf(ctxcanvas->file, "%s(%g, %g, %g, %g, %g, %g)\n", CDDBG_MATRIX, matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + else + fprintf(ctxcanvas->file, "%s(NULL)\n", CDDBG_MATRIX); +} + +static void cdline(cdCtxCanvas *ctxcanvas, int x1, int y1, int x2, int y2) +{ + fprintf(ctxcanvas->file, "%s(%d, %d, %d, %d)\n", CDDBG_LINE, x1, y1, x2, y2); +} + +static void cdfline(cdCtxCanvas *ctxcanvas, double x1, double y1, double x2, double y2) +{ + fprintf(ctxcanvas->file, "%s(%g, %g, %g, %g)\n", CDDBG_FLINE, x1, y1, x2, y2); +} + +static void cdrect(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + fprintf(ctxcanvas->file, "%s(%d, %d, %d, %d)\n", CDDBG_RECT, xmin, xmax, ymin, ymax); +} + +static void cdfrect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + fprintf(ctxcanvas->file, "%s(%g, %g, %g, %g)\n", CDDBG_FRECT, xmin, xmax, ymin, ymax); +} + +static const char* get_region_mode(int combine_mode) +{ + const char* enum2str[] = { + "CD_UNION", + "CD_INTERSECT", + "CD_DIFFERENCE", + "CD_NOTINTERSECT" + }; + return enum2str[combine_mode]; +} + +static void cdbox(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if (ctxcanvas->canvas->new_region) + fprintf(ctxcanvas->file, "%sRegion(%d, %d, %d, %d, %s)\n", CDDBG_BOX, xmin, xmax, ymin, ymax, get_region_mode(ctxcanvas->canvas->combine_mode)); + else + fprintf(ctxcanvas->file, "%s(%d, %d, %d, %d)\n", CDDBG_BOX, xmin, xmax, ymin, ymax); +} + +static void cdfbox(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + if (ctxcanvas->canvas->new_region) + fprintf(ctxcanvas->file, "%sRegion(%g, %g, %g, %g, %s)\n", CDDBG_FBOX, xmin, xmax, ymin, ymax, get_region_mode(ctxcanvas->canvas->combine_mode)); + else + fprintf(ctxcanvas->file, "%s(%g, %g, %g, %g)\n", CDDBG_FBOX, xmin, xmax, ymin, ymax); +} + +static void cdarc(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + fprintf(ctxcanvas->file, "%s(%d, %d, %d, %d, %g, %g)\n", CDDBG_ARC, xc, yc, w, h, a1, a2); +} + +static void cdfarc(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + fprintf(ctxcanvas->file, "%s(%g, %g, %g, %g, %g, %g)\n", CDDBG_FARC, xc, yc, w, h, a1, a2); +} + +static void cdsector(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + if (ctxcanvas->canvas->new_region) + fprintf(ctxcanvas->file, "%sRegion(%d, %d, %d, %d, %g, %g, %s)\n", CDDBG_SECTOR, xc, yc, w, h, a1, a2, get_region_mode(ctxcanvas->canvas->combine_mode)); + else + fprintf(ctxcanvas->file, "%s(%d, %d, %d, %d, %g, %g)\n", CDDBG_SECTOR, xc, yc, w, h, a1, a2); +} + +static void cdfsector(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + if (ctxcanvas->canvas->new_region) + fprintf(ctxcanvas->file, "%sRegion(%g, %g, %g, %g, %g, %g, %s)\n", CDDBG_FSECTOR, xc, yc, w, h, a1, a2, get_region_mode(ctxcanvas->canvas->combine_mode)); + else + fprintf(ctxcanvas->file, "%s(%g, %g, %g, %g, %g, %g)\n", CDDBG_FSECTOR, xc, yc, w, h, a1, a2); +} + +static void cdchord(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + if (ctxcanvas->canvas->new_region) + fprintf(ctxcanvas->file, "%sRegion(%d, %d, %d, %d, %g, %g, %s)\n", CDDBG_CHORD, xc, yc, w, h, a1, a2, get_region_mode(ctxcanvas->canvas->combine_mode)); + else + fprintf(ctxcanvas->file, "%s(%d, %d, %d, %d, %g, %g)\n", CDDBG_CHORD, xc, yc, w, h, a1, a2); +} + +static void cdfchord(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + if (ctxcanvas->canvas->new_region) + fprintf(ctxcanvas->file, "%sRegion(%g, %g, %g, %g, %g, %g, %s)\n", CDDBG_FCHORD, xc, yc, w, h, a1, a2, get_region_mode(ctxcanvas->canvas->combine_mode)); + else + fprintf(ctxcanvas->file, "%s(%g, %g, %g, %g, %g, %g)\n", CDDBG_FCHORD, xc, yc, w, h, a1, a2); +} + +static void cdtext(cdCtxCanvas *ctxcanvas, int x, int y, const char *text, int len) +{ + text = cdStrDupN(text, len); + if (ctxcanvas->canvas->new_region) + fprintf(ctxcanvas->file, "%sRegion(%d, %d, \"%s\", %s)\n", CDDBG_TEXT, x, y, text, get_region_mode(ctxcanvas->canvas->combine_mode)); + else + fprintf(ctxcanvas->file, "%s(%d, %d, \"%s\")\n", CDDBG_TEXT, x, y, text); + free((char*)text); +} + +static void cdftext(cdCtxCanvas *ctxcanvas, double x, double y, const char *text, int len) +{ + text = cdStrDupN(text, len); + if (ctxcanvas->canvas->new_region) + fprintf(ctxcanvas->file, "%sRegion(%g, %g, \"%s\", %s)\n", CDDBG_FTEXT, x, y, text, get_region_mode(ctxcanvas->canvas->combine_mode)); + else + fprintf(ctxcanvas->file, "%s(%g, %g, \"%s\")\n", CDDBG_FTEXT, x, y, text); + free((char*)text); +} + +static void cdpoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n) +{ + int i; + const char* enum2str[] = { + "CD_FILL", + "CD_OPEN_LINES", + "CD_CLOSED_LINES", + "CD_CLIP", + "CD_BEZIER", + "CD_REGION" + }; + + if (mode == CD_FILL && ctxcanvas->canvas->fill_mode != ctxcanvas->last_fill_mode) + { + const char* enum2str[] = { + "CD_EVENODD", + "CD_WINDING" + }; + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_FILLMODE, enum2str[ctxcanvas->canvas->fill_mode]); + ctxcanvas->last_fill_mode = ctxcanvas->canvas->fill_mode; + } + + if (ctxcanvas->canvas->new_region) + fprintf(ctxcanvas->file, "%sRegion(%s, %s)\n", CDDBG_BEGIN, enum2str[mode], get_region_mode(ctxcanvas->canvas->combine_mode)); + else + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_BEGIN, enum2str[mode]); + + for(i = 0; ifile, "%s(%d, %d)\n", CDDBG_VERTEX, poly[i].x, poly[i].y); + + fprintf(ctxcanvas->file, "%s()\n", CDDBG_END); +} + +static void cdfpoly(cdCtxCanvas *ctxcanvas, int mode, cdfPoint* poly, int n) +{ + int i; + const char* enum2str[] = { + "CD_FILL", + "CD_OPEN_LINES", + "CD_CLOSED_LINES", + "CD_CLIP", + "CD_BEZIER", + "CD_REGION" + }; + + if (mode == CD_FILL && ctxcanvas->canvas->fill_mode != ctxcanvas->last_fill_mode) + { + const char* enum2str[] = { + "CD_EVENODD", + "CD_WINDING" + }; + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_FILLMODE, enum2str[ctxcanvas->canvas->fill_mode]); + ctxcanvas->last_fill_mode = ctxcanvas->canvas->fill_mode; + } + + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_BEGIN, enum2str[mode]); + + for(i = 0; ifile, "%s(%g, %g)\n", CDDBG_FVERTEX, poly[i].x, poly[i].y); + + fprintf(ctxcanvas->file, "%s()\n", CDDBG_END); +} + +static int cdbackopacity(cdCtxCanvas *ctxcanvas, int opacity) +{ + const char* enum2str[] = { + "CD_OPAQUE", + "CD_TRANSPARENT" + }; + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_BACKOPACITY, enum2str[opacity]); + return opacity; +} + +static int cdwritemode(cdCtxCanvas *ctxcanvas, int mode) +{ + const char* enum2str[] = { + "CD_REPLACE", + "CD_XOR", + "CD_NOT_XOR" + }; + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_WRITEMODE, enum2str[mode]); + return mode; +} + +static int cdlinestyle(cdCtxCanvas *ctxcanvas, int style) +{ + const char* enum2str[] = { + "CD_CONTINUOUS", + "CD_DASHED", + "CD_DOTTED", + "CD_DASH_DOT", + "CD_DASH_DOT_DOT", + "CD_CUSTOM" + }; + + if (style == CD_CUSTOM && ctxcanvas->canvas->line_style != ctxcanvas->last_line_style) + { + int i; + + fprintf(ctxcanvas->file, "%s(%d", CDDBG_LINESTYLEDASHES, ctxcanvas->canvas->line_dashes_count); + for (i = 0; i < ctxcanvas->canvas->line_dashes_count; i++) + fprintf(ctxcanvas->file, ", %d", ctxcanvas->canvas->line_dashes[i]); + fprintf(ctxcanvas->file, ")\n"); + + ctxcanvas->last_line_style = ctxcanvas->canvas->line_style; + } + + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_LINESTYLE, enum2str[style]); + return style; +} + +static int cdlinewidth(cdCtxCanvas *ctxcanvas, int width) +{ + fprintf(ctxcanvas->file, "%s(%d)\n", CDDBG_LINEWIDTH, width); + return width; +} + +static int cdlinecap(cdCtxCanvas *ctxcanvas, int cap) +{ + const char* enum2str[] = { + "CD_CAPFLAT", + "CD_CAPSQUARE", + "CD_CAPROUND" + }; + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_LINECAP, enum2str[cap]); + return cap; +} + +static int cdlinejoin(cdCtxCanvas *ctxcanvas, int join) +{ + const char* enum2str[] = { + "CD_MITER", + "CD_BEVEL", + "CD_ROUND" + }; + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_LINEJOIN, enum2str[join]); + return join; +} + +static int cdinteriorstyle(cdCtxCanvas *ctxcanvas, int style) +{ + const char* enum2str[] = { + "CD_SOLID", + "CD_HATCH", + "CD_STIPPLE", + "CD_PATTERN", + "CD_HOLLOW" + }; + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_INTERIORSTYLE, enum2str[style]); + return style; +} + +static int cdhatch(cdCtxCanvas *ctxcanvas, int style) +{ + const char* enum2str[] = { + "CD_HORIZONTAL", + "CD_VERTICAL", + "CD_FDIAGONAL", + "CD_BDIAGONAL", + "CD_CROSS", + "CD_DIAGCROSS" + }; + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_HATCH, enum2str[style]); + return style; +} + +static void cdstipple(cdCtxCanvas *ctxcanvas, int w, int h, const unsigned char *stipple) +{ + fprintf(ctxcanvas->file, "%s(%d, %d, %p)\n", CDDBG_STIPPLE, w, h, stipple); +} + +static void cdpattern(cdCtxCanvas *ctxcanvas, int w, int h, const long int *pattern) +{ + fprintf(ctxcanvas->file, "%s(%d, %d, %p)\n", CDDBG_PATTERN, w, h, pattern); +} + +static int cdfont(cdCtxCanvas *ctxcanvas, const char* type_face, int style, int size) +{ + char style_str[50] = ""; + if (style & CD_BOLD) + strcat(style_str, "CD_BOLD"); + if (style & CD_ITALIC) + { + if (style_str[0]!=0) strcat(style_str, "|"); + strcat(style_str, "CD_ITALIC"); + } + if (style & CD_UNDERLINE) + { + if (style_str[0]!=0) strcat(style_str, "|"); + strcat(style_str, "CD_UNDERLINE"); + } + if (style & CD_STRIKEOUT) + { + if (style_str[0]!=0) strcat(style_str, "|"); + strcat(style_str, "CD_STRIKEOUT"); + } + if (style_str[0]==0) strcat(style_str, "CD_PLAIN"); + fprintf(ctxcanvas->file, "%s(\"%s\", %s, %d)\n", CDDBG_FONT, type_face, style_str, size); + return 1; +} + +static int cdnativefont(cdCtxCanvas *ctxcanvas, const char* font) +{ + fprintf(ctxcanvas->file, "%s(\"%s\")\n", CDDBG_NATIVEFONT, font); + return 1; +} + +static int cdtextalignment(cdCtxCanvas *ctxcanvas, int alignment) +{ + const char* enum2str[] = { + "CD_NORTH", + "CD_SOUTH", + "CD_EAST", + "CD_WEST", + "CD_NORTH_EAST", + "CD_NORTH_WEST", + "CD_SOUTH_EAST", + "CD_SOUTH_WEST", + "CD_CENTER", + "CD_BASE_LEFT", + "CD_BASE_CENTER", + "CD_BASE_RIGHT" + }; + fprintf(ctxcanvas->file, "%s(%s)\n", CDDBG_TEXTALIGNMENT, enum2str[alignment]); + return alignment; +} + +static double cdtextorientation(cdCtxCanvas *ctxcanvas, double angle) +{ + fprintf(ctxcanvas->file, "%s(%g)\n", CDDBG_TEXTORIENTATION, angle); + return angle; +} + +static void cdpalette(cdCtxCanvas *ctxcanvas, int n, const long int *palette, int mode) +{ + const char* enum2str[] = { + "CD_POLITE", + "CD_FORCE" + }; + fprintf(ctxcanvas->file, "%s(%d, %p, %s)\n", CDDBG_PALETTE, n, palette, enum2str[mode]); +} + +static long cdbackground(cdCtxCanvas *ctxcanvas, long int color) +{ + unsigned char r, g, b; + cdDecodeColor(color, &r, &g, &b); + fprintf(ctxcanvas->file, "%s(%d, %d, %d)\n", CDDBG_BACKGROUND, (int)r, (int)g, (int)b); + return color; +} + +static long cdforeground(cdCtxCanvas *ctxcanvas, long int color) +{ + unsigned char r, g, b; + cdDecodeColor(color, &r, &g, &b); + fprintf(ctxcanvas->file, "%s(%d, %d, %d)\n", CDDBG_FOREGROUND, (int)r, (int)g, (int)b); + return color; +} + +static void cdputimagerectrgb(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + fprintf(ctxcanvas->file, "%s(%d, %d, %p, %p, %p, %d, %d, %d, %d, %d, %d, %d, %d)\n", CDDBG_PUTIMAGERGB, iw, ih, r, g, b, x, y, w, h, xmin, xmax, ymin, ymax); +} + +static void cdputimagerectrgba(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + fprintf(ctxcanvas->file, "%s(%d, %d, %p, %p, %p, %p, %d, %d, %d, %d, %d, %d, %d, %d)\n", CDDBG_PUTIMAGERGBA, iw, ih, r, g, b, a, x, y, w, h, xmin, xmax, ymin, ymax); +} + +static void cdputimagerectmap(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + fprintf(ctxcanvas->file, "%s(%d, %d, %p, %p, %d, %d, %d, %d, %d, %d, %d, %d)\n", CDDBG_PUTIMAGEMAP, iw, ih, index, colors, x, y, w, h, xmin, xmax, ymin, ymax); +} + +static void cdpixel(cdCtxCanvas *ctxcanvas, int x, int y, long int color) +{ + unsigned char r, g, b; + cdDecodeColor(color, &r, &g, &b); + fprintf(ctxcanvas->file, "%s(%d, %d, %d, %d, %d)\n", CDDBG_PIXEL, x, y, (int)r, (int)g, (int)b); +} + +static void cdscrollarea(cdCtxCanvas *ctxcanvas, int xmin,int xmax, int ymin,int ymax, int dx,int dy) +{ + fprintf(ctxcanvas->file, "%s(%d, %d, %d, %d, %d, %d)\n", CDDBG_SCROLLAREA, xmin, xmax, ymin, ymax, dx, dy); +} + +static void cdgetimagergb(cdCtxCanvas* ctxcanvas, unsigned char *r, unsigned char *g, unsigned char *b, int x, int y, int w, int h) +{ + fprintf(ctxcanvas->file, "%p, %p, %p = GetImageRGB(%d, %d, %d, %d)\n", r, g, b, x, y, w, h); +} + +static cdCtxImage* cdcreateimage(cdCtxCanvas* ctxcanvas, int w, int h) +{ + cdCtxImage* ctximage = malloc(sizeof(cdCtxImage)); + ctximage->ctxcanvas = ctxcanvas; + fprintf(ctxcanvas->file, "%p = GetImage(%d, %d)\n", ctximage, w, h); + return ctximage; +} + +static void cdkillimage(cdCtxImage* ctximage) +{ + fprintf(ctximage->ctxcanvas->file, "KillImage(%p)\n", ctximage); + free(ctximage); +} + +static void cdgetimage(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y) +{ + fprintf(ctxcanvas->file, "GetImage(%p, %d, %d)\n", ctximage, x, y); +} + +static void cdputimagerect(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y, int xmin, int xmax, int ymin, int ymax) +{ + fprintf(ctxcanvas->file, "PutImage(%p, %d, %d, %d, %d, %d, %d)\n", ctximage, x, y, xmin, xmax, ymin, ymax); +} + +static void cdnewregion(cdCtxCanvas* ctxcanvas) +{ + fprintf(ctxcanvas->file, "NewRegion()\n"); +} + +static int cdispointinregion(cdCtxCanvas* ctxcanvas, int x, int y) +{ + fprintf(ctxcanvas->file, "IsPointInRegion(%d, %d)\n", x, y); + return 0; +} + +static void cdoffsetregion(cdCtxCanvas* ctxcanvas, int x, int y) +{ + fprintf(ctxcanvas->file, "OffsetRegion(%d, %d)\n", x, y); +} + +static void cdgetregionbox(cdCtxCanvas* ctxcanvas, int *xmin, int *xmax, int *ymin, int *ymax) +{ + (void)xmin; + (void)ymin; + (void)xmax; + (void)ymax; + fprintf(ctxcanvas->file, "GetRegionBox()\n"); +} + +static int cdactivate(cdCtxCanvas* ctxcanvas) +{ + fprintf(ctxcanvas->file, "Activate()\n"); + return CD_OK; +} + +static void cddeactivate(cdCtxCanvas* ctxcanvas) +{ + fprintf(ctxcanvas->file, "Deactivate()\n"); +} + +static void cdgetfontdim(cdCtxCanvas* ctxcanvas, int *max_width, int *height, int *ascent, int *descent) +{ + int tmp_max_width, tmp_height, tmp_ascent, tmp_descent; + if (!max_width) max_width = &tmp_max_width; + if (!height) height = &tmp_height; + if (!ascent) ascent = &tmp_ascent; + if (!descent) descent = &tmp_descent; + cdgetfontdimEX(ctxcanvas, max_width, height, ascent, descent); + fprintf(ctxcanvas->file, "%d, %d, %d, %d = GetFontDim()\n", *max_width, *height, *ascent, *descent); +} + +static void cdgettextsize(cdCtxCanvas* ctxcanvas, const char *s, int len, int *width, int *height) +{ + int tmp_width, tmp_height; + if (!width) width = &tmp_width; + if (!height) height = &tmp_height; + cdgettextsizeEX(ctxcanvas, s, len, width, height); + fprintf(ctxcanvas->file, "%d, %d = GetTextSize(\"%s\")\n", *width, *height, s); +} + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + fprintf(ctxcanvas->file, "KillCanvas()\n"); + free(ctxcanvas->filename); + fclose(ctxcanvas->file); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +static void cdcreatecanvas(cdCanvas *canvas, void *data) +{ + char filename[10240] = ""; + char* strdata = (char*)data; + double w_mm = INT_MAX*3.78, h_mm = INT_MAX*3.78, res = 3.78; + cdCtxCanvas* ctxcanvas; + int size; + + strdata += cdGetFileName(strdata, filename); + if (filename[0] == 0) + return; + + sscanf(strdata, "%lgx%lg %lg", &w_mm, &h_mm, &res); + + ctxcanvas = (cdCtxCanvas *)malloc(sizeof(cdCtxCanvas)); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + + ctxcanvas->file = fopen(filename, "w"); + if (!ctxcanvas->file) + { + free(ctxcanvas); + return; + } + + size = strlen(filename); + ctxcanvas->filename = malloc(size+1); + memcpy(ctxcanvas->filename, filename, size+1); + + ctxcanvas->canvas = canvas; + + /* update canvas context */ + canvas->w = (int)(w_mm * res); + canvas->h = (int)(h_mm * res); + canvas->w_mm = w_mm; + canvas->h_mm = h_mm; + canvas->bpp = 24; + canvas->xres = res; + canvas->yres = res; + canvas->ctxcanvas = ctxcanvas; + + ctxcanvas->last_line_style = -1; + ctxcanvas->last_fill_mode = -1; + + fprintf(ctxcanvas->file, "CreateCanvas(CD_DEBUG, \"%s\")\n", (char*)data); +} + +static void cdinittable(cdCanvas* canvas) +{ + canvas->cxFlush = cdflush; + canvas->cxClear = cdclear; + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxPoly = cdpoly; + canvas->cxRect = cdrect; + canvas->cxBox = cdbox; + canvas->cxArc = cdarc; + canvas->cxSector = cdsector; + canvas->cxChord = cdchord; + canvas->cxText = cdtext; + canvas->cxPutImageRectRGB = cdputimagerectrgb; + canvas->cxPutImageRectRGBA = cdputimagerectrgba; + canvas->cxPutImageRectMap = cdputimagerectmap; + canvas->cxScrollArea = cdscrollarea; + canvas->cxFLine = cdfline; + canvas->cxFPoly = cdfpoly; + canvas->cxFRect = cdfrect; + canvas->cxFBox = cdfbox; + canvas->cxFArc = cdfarc; + canvas->cxFSector = cdfsector; + canvas->cxFChord = cdfchord; + canvas->cxFText = cdftext; + canvas->cxClip = cdclip; + canvas->cxClipArea = cdcliparea; + canvas->cxBackOpacity = cdbackopacity; + canvas->cxWriteMode = cdwritemode; + canvas->cxLineStyle = cdlinestyle; + canvas->cxLineWidth = cdlinewidth; + canvas->cxLineCap = cdlinecap; + canvas->cxLineJoin = cdlinejoin; + canvas->cxInteriorStyle = cdinteriorstyle; + canvas->cxHatch = cdhatch; + canvas->cxStipple = cdstipple; + canvas->cxPattern = cdpattern; + canvas->cxFont = cdfont; + canvas->cxNativeFont = cdnativefont; + canvas->cxTextAlignment = cdtextalignment; + canvas->cxTextOrientation = cdtextorientation; + canvas->cxPalette = cdpalette; + canvas->cxBackground = cdbackground; + canvas->cxForeground = cdforeground; + canvas->cxFClipArea = cdfcliparea; + canvas->cxTransform = cdtransform; + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxGetImageRGB = cdgetimagergb; + canvas->cxScrollArea = cdscrollarea; + canvas->cxCreateImage = cdcreateimage; + canvas->cxKillImage = cdkillimage; + canvas->cxGetImage = cdgetimage; + canvas->cxPutImageRect = cdputimagerect; + canvas->cxNewRegion = cdnewregion; + canvas->cxIsPointInRegion = cdispointinregion; + canvas->cxOffsetRegion = cdoffsetregion; + canvas->cxGetRegionBox = cdgetregionbox; + canvas->cxActivate = cdactivate; + canvas->cxDeactivate = cddeactivate; + canvas->cxGetFontDim = cdgetfontdim; + canvas->cxGetTextSize = cdgettextsize; +} + +static cdContext cdDebugContext = +{ + CD_CAP_ALL, + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +cdContext* cdContextDebug(void) +{ + return &cdDebugContext; +} + diff --git a/cd/src/drv/cddgn.c b/cd/src/drv/cddgn.c new file mode 100755 index 0000000..d7dd5f9 --- /dev/null +++ b/cd/src/drv/cddgn.c @@ -0,0 +1,1691 @@ +/** \file + * \brief DGN driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" +#include "cddgn.h" + +/* defines */ + +#define MAX_NUM_VERTEX 101 +#define MAX_NUM_VERTEX_PER_POLYLINE 15000 + +#ifndef PI +#define PI 3.14159265358979323846 +#endif + +#define END_OF_DGN_FILE 0xffff +#define DGN_FILE_BLOCK 512 + +#define NOFILL 0 /* tipos de fill que o driver faz */ +#define CONVEX 1 +#define NORMAL 2 + +/* macros */ + +#define SIZE_LINE_STRING(x) (19+4*(x)) +#define SIZE_FILLED_SHAPE(x) (27+4*(x)) +#define SIZE_ARC 40 +#define SIZE_LINE 26 + +#define IGNORE(x) ((void) x) + + +/* estruturas similares as que o MicroStation usa */ + +typedef struct +{ + union + { + struct + { + unsigned level:6; + unsigned :1; + unsigned complex:1; + unsigned type:7; + unsigned :1; + } flags; + short type_as_word; + } type; + + unsigned short words; + unsigned long xmin; + unsigned long ymin; + unsigned long xmax; + unsigned long ymax; +} Elm_hdr; + +typedef struct +{ + short attindx; + union + { + short s; + struct + { + unsigned /*class*/ :4; + unsigned /*res*/ :4; + unsigned /*l*/ :1; + unsigned /*n*/ :1; + unsigned /*m*/ :1; + unsigned attributes:1; + unsigned /*r*/ :1; + unsigned /*p*/ :1; + unsigned /*s*/ :1; + unsigned /*hole*/ :1; + } flags; + } props; + + union + { + short s; + struct + { + unsigned style:3; + unsigned weight:5; + unsigned color:8; + } b; + } symb; + +} Disp_hdr; + +/* tipo de poligono/setor */ +enum +{ + FILLED, + OPEN +}; + +/* grupos de tamanhos de caracter + (usado por gettextwidth e cdgetfontdim) */ + +static long fontsizes[4][8]= +{ + {1,2,4,5,6,7,0}, + {5,3,2,1,0}, + {8,6,4,3,2,1,0}, + {5,3,2,1,0} +}; + + +/********************** + * contexto do driver * + **********************/ + +struct _cdCtxCanvas +{ + cdCanvas* canvas; + + FILE *file; /* arquivo dgn */ + long int bytes; /* tamanho do arquivo */ + char level; + + short color, style; + + short alignment; + short typeface_index; + short symbology; + long tl; + short is_base; /* setado se texto e' do tipo CD_BASE_... */ + + short fill_type; /* como o driver faz fill: + NOFILL -> nao faz fill + CONVEX -> so faz fill de poligonos convexos + NORMAL -> faz fill normalmente */ + + long colortable[256]; /* palette */ + short num_colors; + + short is_complex; +}; + +/* prototipos de funcao */ +static void startComplexShape(cdCtxCanvas*, unsigned short,short,unsigned short, + unsigned long,unsigned long, + unsigned long,unsigned long); +static void endComplexElement(cdCtxCanvas*); + +/****************************** + * * + * funcoes internas do driver * + * * + ******************************/ + +/********************************************************* + * Obtem o descent do texto (para letras como q,p,g etc) * + *********************************************************/ + +static long get_descent(const char *text, int len, int size_pixel) +{ + char *descent="jgyqp"; + long a=0; + + while(a < len) + { + if(strchr(descent, text[a])) + return size_pixel/2; + + a++; + } + return 0; +} + +/*********************************************** + * Calcula a largura da string no MicroStation * + ***********************************************/ + +static long gettextwidth(cdCtxCanvas* ctxcanvas, const char *s, int len, int size_pixel) +{ + long a=0, + width=0; + + short default_size=0; + + static char *fontchars[4][8] = + { + { /* CD_SYSTEM */ + "Ww", + "jshyut#*-=<>", + "iIl[]", + ";:.,'|!()`{}", + "","","","" + }, + + { /* CD_COURIER */ + "Iflrit!();.'", + "1|[]\"/`", + "BCDEKPRSUVXYbdgkpq&-_", + "w#%", + "Wm^+=<>~", + "@","","" + }, + + { /* CD_TIMES_ROMAN */ + "m", + "HMUWw", + "CSTZLbhknpuvxy23567890e", + "fstz1#$-=<>", + "Iijl*[]", + ";:.,'|!()`{}", + "","" + }, + + { /* CD_HELVETICA */ + "Ww", + "jshyut#*-=<>", + "iIl[]", + ";:.,'|!()`{}", + "","","","" + } + }; + + if (ctxcanvas->typeface_index == 1) + default_size=2; + else if (ctxcanvas->typeface_index == 2) + default_size=5; + else if (ctxcanvas->typeface_index == 3) + default_size=4; + else + default_size=4; + + for(a=0,width=0;a < len; a++) + { + static short size_number; + static char letter; + + if(s[a] == ' ') + letter = s[a-1]; + else + letter = s[a]; + + for(size_number=0;size_number < 8;size_number++) + { + if(strchr(fontchars[ctxcanvas->typeface_index][size_number], letter)) + { + width+=(ctxcanvas->tl*fontsizes[ctxcanvas->typeface_index][size_number])/6; + break; + } + } + + if(size_number == 8) + width+=(ctxcanvas->tl*default_size)/6; + + width+=ctxcanvas->tl/3; + } + + width-=ctxcanvas->tl/3; + + if (ctxcanvas->canvas->font_style & CD_ITALIC) + width+= (long) ((double)size_pixel*tan(4*atan(1)/8)); /* angulo de 15 graus */ + + return width; +} + +/**************************** + * Salva um byte no arquivo * + ****************************/ + +static void put_byte(cdCtxCanvas* ctxcanvas, unsigned char byte) +{ + fputc(byte, ctxcanvas->file); +} + +/************************************ + * Salva um sequencia de caracteres * + ************************************/ + +static void writec (cdCtxCanvas* ctxcanvas, const char *t, short tam ) +{ + short i; + + ctxcanvas->bytes += tam; + for ( i = 0; i < tam; i++ ) + fputc ( t[i], ctxcanvas->file ); +} + +/****************** + * Salva uma word * + ******************/ + +static void put_word(cdCtxCanvas* ctxcanvas, unsigned short w) +{ + char c; + + c = (char) (w & 0xff); + fputc (c, ctxcanvas->file); + c = (char) ((w >> 8) & 0xff); + fputc (c, ctxcanvas->file); + ctxcanvas->bytes += 2; +} + +/**************************** + * Salva um long no arquivo * + ****************************/ + +static void put_long (cdCtxCanvas* ctxcanvas, unsigned long i) +{ + put_word(ctxcanvas, (short) (i >> 16)); + put_word(ctxcanvas, (short) i); +} + +/******************* + * Salva um double * + *******************/ + +static void put_as_double(cdCtxCanvas* ctxcanvas, long i) +{ + float dfloat=(float) 4*i; + + put_long(ctxcanvas, *((long *) &dfloat)); + put_long(ctxcanvas, 0); + + ctxcanvas->bytes+=sizeof(float); +} + +/**************************** + * Salva uma UOR no arquivo * + ****************************/ + +static void put_uor(cdCtxCanvas* ctxcanvas, long i) +{ + put_word(ctxcanvas, (unsigned short)((i >> 16) ^ (1 << 15))); /* troca o bit 31 + para transformar em uor */ + put_word(ctxcanvas, (unsigned short)i); +} + +/*************************************** + * Salva a bounding box de um elemento * + ***************************************/ + +static void put_bound(cdCtxCanvas* ctxcanvas, long xmin, long xmax, long ymin, long ymax) +{ + put_uor(ctxcanvas, xmin); + put_uor(ctxcanvas, ymin); + put_uor(ctxcanvas, 0L); + put_uor(ctxcanvas, xmax); + put_uor(ctxcanvas, ymax); + put_uor(ctxcanvas, 0L); +} + +/****************************************** + * Calcula a bounding box de uma polyline * + ******************************************/ + +static void line_string_bound(cdPoint *buffer, short num_vertex, + unsigned long *xmin, unsigned long *ymin, + unsigned long *xmax, unsigned long *ymax) +{ + short i; + unsigned long v; + + *xmin = *xmax = buffer[0].x; + *ymin = *ymax = buffer[0].y; + + for (i = 1; i < num_vertex; i++) + { + v = buffer[i].x; + if (v < *xmin) + *xmin = v; + else if (v > *xmax) + *xmax = v; + + v = (long) buffer[i].y; + if (v < *ymin) + *ymin = v; + else if (v > *ymax) + *ymax = v; + } +} + +/************************************ + * Retorna symbology de um elemento * + ************************************/ + +static short symbology(cdCtxCanvas* ctxcanvas) +{ + return (short)((ctxcanvas->color << 8) | (ctxcanvas->canvas->line_width << 3) | ctxcanvas->style); +} + +/***************************************** + * Salva um Element Header no arquivo * + *****************************************/ + +static void putElementHeader(cdCtxCanvas* ctxcanvas, Elm_hdr *ehdr) +{ + ehdr->type.flags.complex = ctxcanvas->is_complex; + + put_word(ctxcanvas, (short)(ehdr->type.flags.type << 8 | + ehdr->type.flags.complex << 7 | ehdr->type.flags.level)); + + + put_word(ctxcanvas, ehdr->words); + put_bound(ctxcanvas, ehdr->xmin, ehdr->xmax, ehdr->ymin, ehdr->ymax); +} + +/************************************** + * Salva um display header no arquivo * + **************************************/ + +static void putDisplayHeader(cdCtxCanvas* ctxcanvas, Disp_hdr *dhdr) +{ + put_word(ctxcanvas, 0); /* graphics group */ + put_word(ctxcanvas, dhdr->attindx); /* index to attributes */ + put_word(ctxcanvas, dhdr->props.flags.attributes << 11); /* properties */ + put_word(ctxcanvas, dhdr->symb.s); /* display symbology */ +} + + +/*************************************** + * completa o arquivo com zeros para * + * que o numero de bytes seja multiplo * + * de 512 * + ***************************************/ + +static void complete_file(cdCtxCanvas* ctxcanvas) +{ + long resto, i; + + put_word(ctxcanvas, END_OF_DGN_FILE); + + resto = DGN_FILE_BLOCK - ctxcanvas->bytes % DGN_FILE_BLOCK; + + /* checa validade do tamanho do arquivo */ + if (resto%2 != 0) return; + + for (i = 0; i < resto; i+=2) + put_word(ctxcanvas, 0); +} + +/************************************* + * Salva um elemento arco no arquivo * + *************************************/ + +static void arc (cdCtxCanvas* ctxcanvas, long xc, long yc, long w, long h, double a1, double a2) +{ + Elm_hdr ehdr; + Disp_hdr dhdr; + + /* raster header element */ + ehdr.type.flags.level=ctxcanvas->level; + ehdr.type.flags.type=16; + ehdr.words=SIZE_ARC-2; + ehdr.xmin=xc - w/2; + ehdr.xmax=xc + w/2; + ehdr.ymin=yc - h/2; + ehdr.ymax=yc + h/2; + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx = ehdr.words - 14; + dhdr.props.flags.attributes = 0; + dhdr.symb.s = symbology(ctxcanvas); + putDisplayHeader(ctxcanvas, &dhdr); + + put_long(ctxcanvas, (long) a1*360000); /* start angle */ + put_long(ctxcanvas, (long) (a2-a1)*360000); /* sweep angle */ + put_as_double(ctxcanvas, w/2); /* primary axis */ + put_as_double(ctxcanvas, h/2); /* secondary axis */ + put_long(ctxcanvas, 0); /* rotation angle (sempre 0) */ + put_as_double(ctxcanvas, xc); /* x origin */ + put_as_double(ctxcanvas, yc); /* y origin */ +} + +/*************************************** + * Salva um elemento elipse no arquivo * + ***************************************/ + +static void ellipse(cdCtxCanvas* ctxcanvas, long xc, long yc, long w, long h, short type) +{ + Elm_hdr ehdr; + Disp_hdr dhdr; + + /* raster header element */ + ehdr.type.flags.level=ctxcanvas->level; + ehdr.type.flags.type=15; + ehdr.words=34+((type==FILLED) ? 8 : 0); + ehdr.xmin=xc - w/2; + ehdr.xmax=xc + w/2; + ehdr.ymin=yc - h/2; + ehdr.ymax=yc + h/2; + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx=20; + dhdr.props.flags.attributes=(type == FILLED) ? 1 : 0; + dhdr.symb.s=symbology(ctxcanvas); + putDisplayHeader(ctxcanvas, &dhdr); + + put_as_double(ctxcanvas, w/2); /* primary axis */ + put_as_double(ctxcanvas, h/2); /* secondary axis */ + put_long(ctxcanvas, 50); /* rotation angle (sempre 0) */ + put_as_double(ctxcanvas, xc); /* x origin */ + put_as_double(ctxcanvas, yc); /* y origin */ + + /* salva atributo de fill */ + if(type == FILLED) + { + put_word(ctxcanvas, 0x1007); + put_word(ctxcanvas, 65); + put_word(ctxcanvas, 0x802); + put_word(ctxcanvas, 0x0001); + put_word(ctxcanvas, ctxcanvas->color); + put_word(ctxcanvas, 0); + put_word(ctxcanvas, 0); + put_word(ctxcanvas, 0); + } +} + +static short getclosestColor(cdCtxCanvas* ctxcanvas, long color) +{ + short count=0, closest=0; + long diff=0; + unsigned char r = cdRed(color), + g = cdGreen(color), + b = cdBlue(color); + short rd, gd, bd; + long newdiff; + + /* procura a cor mais proxima */ + + diff = 3*65536; /* inicializa com maior diferenca possivel */ + + for(count=0; count < ctxcanvas->num_colors; count++) + { + rd = r - cdRed(ctxcanvas->colortable[count]); + gd = g - cdGreen(ctxcanvas->colortable[count]); + bd = b - cdBlue(ctxcanvas->colortable[count]); + + newdiff = rd*rd + gd*gd + bd*bd; + + if(newdiff <= diff) + { + /* verifica se encontrou a cor */ + if(newdiff == 0) + return count-1; + + diff = newdiff; + closest=count-1; + } + } + + /* nao encontrou a cor, tenta adicionar na palette, ou retorna a mais proxima */ + if(ctxcanvas->num_colors < 254) + { + ctxcanvas->colortable[ctxcanvas->num_colors+1] = color; + return ctxcanvas->num_colors++; + } + else + return closest; +} + +static void saveColorTable(cdCtxCanvas* ctxcanvas) +{ + unsigned char r,g,b; + short i; + + put_word(ctxcanvas, (0x05 << 8) | 1); /* colortable */ + put_word(ctxcanvas, 434); + + put_long(ctxcanvas, 0); + put_long(ctxcanvas, 0); + put_long(ctxcanvas, 0); + put_long(ctxcanvas, 0xffffffff); + put_long(ctxcanvas, 0xffffffff); + put_long(ctxcanvas, 0xffffffff); + + put_word(ctxcanvas, 0); + put_word(ctxcanvas, 420); + put_word(ctxcanvas, 0x0400); + put_word(ctxcanvas, 0x100); + put_word(ctxcanvas, 0); + + for(i=0;i<256;i++) + { + cdDecodeColor(ctxcanvas->colortable[i], &r, &g, &b); + put_byte(ctxcanvas, r); + put_byte(ctxcanvas, g); + put_byte(ctxcanvas, b); + } + + put_word(ctxcanvas, 25); + for(i=0;i<32;i++) + put_word(ctxcanvas, 0x2020); +} + + +/***************************** + * Le uma word de um arquivo * + *****************************/ + +static short file_get_word(FILE *fp) +{ + short word=0; + + word = (short)fgetc(fp); + word |= ((short)fgetc(fp) << 8) & 0xff00; + + return word; +} + +/******************************** + * Salva uma word em um arquivo * + ********************************/ + +static void file_put_word (short word, FILE *fp) +{ + fputc ((char) (word & 0xff), fp); + fputc ((char) ((word >> 8) & 0xff), fp); +} + +/******************************************* + * Le elementos de um arquivo DGN e os * + * coloca no inicio do arquivo aberto pelo * + * driver * + *******************************************/ + +static void dgn_copy (FILE *file, cdCtxCanvas *ctxcanvas) +{ + short word=0; + + while ((word = file_get_word(file)) != END_OF_DGN_FILE) + { + file_put_word(word, ctxcanvas->file); /* type e level do elemento */ + ctxcanvas->bytes+=2; + + word = file_get_word(file); /* words to follow */ + file_put_word(word, ctxcanvas->file); + ctxcanvas->bytes+=2; + + while (word) /* copia resto do elemento */ + { + file_put_word(file_get_word(file), ctxcanvas->file); + word--; + ctxcanvas->bytes+=2; + } + } +} + + +/* + * Funcoes do driver + */ + +static void cdkillcanvas(cdCtxCanvas* ctxcanvas) +{ + saveColorTable(ctxcanvas); + complete_file(ctxcanvas); + fclose (ctxcanvas->file); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +static void cddeactivate (cdCtxCanvas* ctxcanvas) +{ + fflush(ctxcanvas->file); +} + +static void cdflush (cdCtxCanvas* ctxcanvas) +{ + fflush(ctxcanvas->file); +} + + +/******************************************************/ +/* primitives */ +/******************************************************/ + +static void cdline (cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2) +{ + Elm_hdr ehdr; + Disp_hdr dhdr; + cdPoint buffer[2]; + + buffer[0].x=x1; + buffer[0].y=y1; + buffer[1].x=x2; + buffer[1].y=y2; + + ehdr.type.flags.level=ctxcanvas->level; + ehdr.type.flags.type=3; + + ehdr.words=SIZE_LINE-2; + + line_string_bound(buffer, 2, &ehdr.xmin, + &ehdr.ymin,&ehdr.xmax,&ehdr.ymax); + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx = ehdr.words - 14; + dhdr.props.flags.attributes = 0; + dhdr.symb.s=symbology(ctxcanvas); + + putDisplayHeader(ctxcanvas, &dhdr); + + /* pontos inicial e final da linha */ + + put_long(ctxcanvas, (long) x1); + put_long(ctxcanvas, (long) y1); + put_long(ctxcanvas, (long) x2); + put_long(ctxcanvas, (long) y2); +} + +static void cdbox (cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + Elm_hdr ehdr; + Disp_hdr dhdr; + + /* raster header element */ + ehdr.type.flags.level=ctxcanvas->level; + ehdr.type.flags.type=6; + ehdr.words=17+4*5+8; + ehdr.xmin=xmin; + ehdr.xmax=xmax; + ehdr.ymin=ymin; + ehdr.ymax=ymax; + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx=3+4*5; + dhdr.props.flags.attributes=1; + dhdr.symb.s=symbology(ctxcanvas); + putDisplayHeader(ctxcanvas, &dhdr); + + put_word(ctxcanvas, 5); /* numero de vertices */ + + /* vertices */ + put_long(ctxcanvas, (long) xmin); + put_long(ctxcanvas, (long) ymin); + + put_long(ctxcanvas, (long) xmax); + put_long(ctxcanvas, (long) ymin); + + put_long(ctxcanvas, (long) xmax); + put_long(ctxcanvas, (long) ymax); + + put_long(ctxcanvas, (long) xmin); + put_long(ctxcanvas, (long) ymax); + + put_long(ctxcanvas, (long) xmin); + put_long(ctxcanvas, (long) ymin); + + /* atributos de fill */ + + put_word(ctxcanvas, 0x1007); + put_word(ctxcanvas, 65); + put_word(ctxcanvas, 0x802); + put_word(ctxcanvas, 0x0001); + put_word(ctxcanvas, ctxcanvas->color); + put_word(ctxcanvas, 0); + put_word(ctxcanvas, 0); + put_word(ctxcanvas, 0); +} + +static void cdarc (cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + if (a2 == a1 + 360) + ellipse(ctxcanvas, xc,yc,w,h,OPEN); + else + arc(ctxcanvas, xc, yc, w, h, a1, a2); +} + +static void cdsector (cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + if (a2 == a1 + 360) + { + ellipse(ctxcanvas, xc,yc,w,h,FILLED); + return; + } + + startComplexShape(ctxcanvas, 3, 1, SIZE_ARC+SIZE_LINE*2, + (unsigned long) xc-w/2, (unsigned long) yc-h/2, + (unsigned long) xc+h/2, (unsigned long) yc+h/2); + + arc(ctxcanvas, xc, yc, w, h, a1, a2); + + cdline(ctxcanvas, xc, yc, (int) + (((double)w*cos(a1*CD_DEG2RAD)/2.+.5)), (int) (((double)h*sin(a1*CD_DEG2RAD))/2.+.5)); + cdline(ctxcanvas, xc, yc, (int) + (((double)w*cos(a2*CD_DEG2RAD)/2.+.5)), (int) (((double)h*sin(a2*CD_DEG2RAD))/2.+.5)); + + endComplexElement(ctxcanvas); +} + +static void cdtext (cdCtxCanvas* ctxcanvas, int x, int y, const char *s, int len) +{ + long descent=0; + short w=0; + long hc=0,wc=0; + int size_pixel; + short italic = (ctxcanvas->canvas->font_style&CD_ITALIC); + + Elm_hdr ehdr; + Disp_hdr dhdr; + + if(len > 255) + len=255; + + w = (short)((len/2)+(len%2)); + size_pixel = cdGetFontSizePixels(ctxcanvas->canvas, ctxcanvas->canvas->font_size); + descent=get_descent(s, len, size_pixel); + hc = size_pixel+descent; + wc = gettextwidth(ctxcanvas, s, len, size_pixel); + + y+=descent; + + switch (ctxcanvas->alignment) + { + case 12: x = x; y = y; break; + case 13: x = x; y = y - (int) (hc/2.0); break; + case 14: x = x; y = y - (int) hc; break; + case 6: x = x - (int) (wc/2.0); y = y; break; + case 7: x = x - (int) (wc/2.0); y = y - (int) (hc/2.0); break; + case 8: x = x - (int) (wc/2.0); y = y - (int) hc; break; + case 0: x = x - (int) wc; y = y; break; + case 1: x = x - (int) wc; y = y - (int) (hc/2.0); break; + case 2: x = x - (int) wc; y = y - (int) hc; break; + } + + if(ctxcanvas->is_base) + y -= (int) (hc/4.0); + + /* raster header element */ + ehdr.type.flags.level=ctxcanvas->level; + ehdr.type.flags.type=17; + ehdr.words=28+w+((italic) ? 8 : 0); + ehdr.xmin=x; + ehdr.xmax=x+wc; + ehdr.ymin=y-descent; + ehdr.ymax=y+hc; + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx=14+w; + dhdr.props.flags.attributes=(italic) ? 1 : 0; + + if (ctxcanvas->canvas->font_style&CD_BOLD) + dhdr.symb.s=ctxcanvas->color << 8 | (3 << 3); + else + dhdr.symb.s=ctxcanvas->color << 8; + + putDisplayHeader(ctxcanvas, &dhdr); + + put_word(ctxcanvas, (ctxcanvas->alignment << 8) | ctxcanvas->typeface_index); + + put_long(ctxcanvas, (long)((1000 * ctxcanvas->tl) / 6) | (1 << 7)); + put_long(ctxcanvas, (long)((1000 * size_pixel) / 6) | (1 << 7)); + + put_long(ctxcanvas, 0); + put_long(ctxcanvas, x); + put_long(ctxcanvas, y); + put_word(ctxcanvas, (unsigned short)len); + writec(ctxcanvas, s, (short)(len+(len%2))); /* deve escrever sempre um numero par de caracteres */ + + if(italic) + { + put_word(ctxcanvas, 0x1007); /* atributos e words to follow */ + put_word(ctxcanvas, 0x80d4); /* tipo de atributo */ + put_long(ctxcanvas, 0x000865c0); + put_long(ctxcanvas, 0x00520000); + put_long(ctxcanvas, 0x00000000); + } +} + +static void startComplexShape(cdCtxCanvas* ctxcanvas, + unsigned short num_elements, + short is_fill, + unsigned short size, + unsigned long xmin, + unsigned long ymin, + unsigned long xmax, + unsigned long ymax) +{ + Elm_hdr ehdr; + Disp_hdr dhdr; + + ehdr.type.flags.level=ctxcanvas->level; + ehdr.type.flags.type=14; + ehdr.words=22 + ((is_fill) ? 8 : 0); + ehdr.xmax = xmax; + ehdr.xmin = xmin; + ehdr.ymax = ymax; + ehdr.ymin = ymin; + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx=4; + dhdr.props.flags.attributes = (is_fill) ? 1 : 0; + dhdr.symb.s=symbology(ctxcanvas); + + putDisplayHeader(ctxcanvas, &dhdr); + + put_word(ctxcanvas, size + 5 + ((is_fill) ? 8 : 0)); + put_word(ctxcanvas, num_elements); + + put_long(ctxcanvas, 0); /* atributo nulo */ + put_long(ctxcanvas, 0); + + /* salva atributo de fill */ + if(is_fill) + { + put_word(ctxcanvas, 0x1007); + put_word(ctxcanvas, 65); + put_word(ctxcanvas, 0x802); + put_word(ctxcanvas, 0x0001); + put_word(ctxcanvas, ctxcanvas->color); + put_word(ctxcanvas, 0); + put_word(ctxcanvas, 0); + put_word(ctxcanvas, 0); + } + + /* marca inicio de elemento complexo */ + + ctxcanvas->is_complex = 1; +} + + +static void startComplexChain(cdCtxCanvas* ctxcanvas, + unsigned short num_elements, + unsigned short size, + unsigned long xmin, + unsigned long ymin, + unsigned long xmax, + unsigned long ymax) + +{ + Elm_hdr ehdr; + Disp_hdr dhdr; + + ehdr.type.flags.level=ctxcanvas->level; + ehdr.type.flags.type=12; + + ehdr.words=22; + ehdr.xmax = xmax; + ehdr.xmin = xmin; + ehdr.ymax = ymax; + ehdr.ymin = ymin; + + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx=4; + dhdr.props.flags.attributes = 1; + dhdr.symb.s=symbology(ctxcanvas); + + putDisplayHeader(ctxcanvas, &dhdr); + + put_word(ctxcanvas, size+5); + put_word(ctxcanvas, num_elements); + + put_long(ctxcanvas, 0); /* atributo nulo */ + put_long(ctxcanvas, 0); + + + /* marca inicio de elemento complexo */ + + ctxcanvas->is_complex = 1; +} + +static void endComplexElement(cdCtxCanvas* ctxcanvas) +{ + ctxcanvas->is_complex = 0; +} + +static void putLineString(cdCtxCanvas* ctxcanvas, cdPoint *buffer, short num_vertex) +{ + Elm_hdr ehdr; + Disp_hdr dhdr; + short i=0; + + ehdr.type.flags.level=ctxcanvas->level; + + ehdr.type.flags.type=4; + + ehdr.words=SIZE_LINE_STRING(num_vertex)-2; + + line_string_bound(buffer, num_vertex, &ehdr.xmin, + &ehdr.ymin,&ehdr.xmax,&ehdr.ymax); + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx=ehdr.words-14; + dhdr.props.flags.attributes = 0; + dhdr.symb.s=symbology(ctxcanvas); + + putDisplayHeader(ctxcanvas, &dhdr); + + put_word(ctxcanvas, num_vertex); + + for (i = 0; i < num_vertex; i++) + { + put_long(ctxcanvas, (long) buffer[i].x); + put_long(ctxcanvas, (long) buffer[i].y); + } +} + +static void putShape(cdCtxCanvas* ctxcanvas, cdPoint *buffer, short num_vertex) +{ + Elm_hdr ehdr; + Disp_hdr dhdr; + short i=0; + + ehdr.type.flags.level=ctxcanvas->level; + ehdr.type.flags.type=6; + + ehdr.words=SIZE_FILLED_SHAPE(num_vertex)-2; + + line_string_bound(buffer, num_vertex, &ehdr.xmin, + &ehdr.ymin,&ehdr.xmax,&ehdr.ymax); + + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx=ehdr.words - 14 - 8; /* 8 -> size of attributes */ + dhdr.props.flags.attributes = 1; + dhdr.symb.s=symbology(ctxcanvas); + + putDisplayHeader(ctxcanvas, &dhdr); + + put_word(ctxcanvas, num_vertex); + + for (i = 0; i < num_vertex; i++) + { + put_long(ctxcanvas, (long) buffer[i].x); + put_long(ctxcanvas, (long) buffer[i].y); + } + + put_word(ctxcanvas, 0x1007); + put_word(ctxcanvas, 65); + put_word(ctxcanvas, 0x802); + put_word(ctxcanvas, 0x0001); + put_word(ctxcanvas, ctxcanvas->color); + put_word(ctxcanvas, 0); + put_word(ctxcanvas, 0); + put_word(ctxcanvas, 0); +} + +static void cdpoly(cdCtxCanvas* ctxcanvas, int mode, cdPoint* poly, int n) +{ + short is_fill=0; + + if(mode == CD_FILL && ctxcanvas->fill_type == NOFILL) + mode = CD_CLOSED_LINES; + + if(n > MAX_NUM_VERTEX_PER_POLYLINE) + n = MAX_NUM_VERTEX_PER_POLYLINE; + + /* acerta buffer de pontos */ + if(mode == CD_FILL || mode == CD_CLOSED_LINES) + { + poly[n].x = poly[0].x; + poly[n].y = poly[0].y; + n++; + } + + /* se fill_type for CONVEX, testa se poligono e' convexo ou concavo */ + if((ctxcanvas->fill_type == CONVEX) && (n > 3) && (mode == CD_FILL)) + { + short signal=0; + short count=0; + long vect=0; + + /* calcula sinal do vetorial entre o primeiro lado e o segundo */ + vect = (poly[1].x - poly[0].x) * + (poly[2].y - poly[1].y) - + (poly[1].y - poly[0].y) * + (poly[2].x - poly[1].x); + + if(vect == 0) + mode = CD_CLOSED_LINES; /* ver se precisa mudar */ + else + { + signal = (short)(vect/abs(vect)); + + for(count=1 ; count< (n-2); count++) + { + vect = (poly[count+1].x - poly[count].x) * + (poly[count+2].y - poly[count+1].y) - + (poly[count+1].y - poly[count].y) * + (poly[count+2].x - poly[count+1].x); + + if(vect == 0) + { + mode=CD_CLOSED_LINES; + break; + } + + if((vect/abs(vect)) != signal) + { + mode=CD_CLOSED_LINES; + break; + } + } + } + } + + /* se tiver fill */ + + if(mode == CD_FILL) + is_fill=1; + + if(n > MAX_NUM_VERTEX) /* tem que usar complex shape ou chain */ + { + short count=0; + short num_whole_elements = n / MAX_NUM_VERTEX; + short num_whole_vertex = num_whole_elements * MAX_NUM_VERTEX; + short rest = n % MAX_NUM_VERTEX; + short is_there_rest = (rest > 0) ? 1 : 0; + unsigned long xmax, xmin, ymax, ymin; + unsigned short size = + SIZE_LINE_STRING(MAX_NUM_VERTEX)*num_whole_elements+ + SIZE_LINE_STRING(rest)*is_there_rest; + + line_string_bound(poly, n, &xmin, &ymin, &xmax, &ymax); + + if(mode == CD_OPEN_LINES) + startComplexChain(ctxcanvas, (unsigned short) (num_whole_elements+((rest > 0) ? 1 : 0)), + size, xmin, ymin, xmax, ymax); + else + startComplexShape(ctxcanvas, (unsigned short) (num_whole_elements+((rest > 0) ? 1 : 0)), + is_fill, size, xmin, ymin, xmax, ymax); + + for(count=0;count < num_whole_vertex; count+=MAX_NUM_VERTEX, n-=MAX_NUM_VERTEX) + putLineString(ctxcanvas, &poly[count], MAX_NUM_VERTEX); + + if(rest) + putLineString(ctxcanvas, &poly[num_whole_vertex],n); + + endComplexElement(ctxcanvas); + } + else + { + if(is_fill) + putShape(ctxcanvas, poly, n); + else + putLineString(ctxcanvas, poly, n); + } +} + +/************** + * attributes * + **************/ + +static int cdlinestyle (cdCtxCanvas* ctxcanvas, int style) +{ + switch(style) + { + case CD_CONTINUOUS: + ctxcanvas->style = 0; + break; + + case CD_DASHED: + ctxcanvas->style = 3; + break; + + case CD_DOTTED: + ctxcanvas->style = 1; + break; + + case CD_DASH_DOT: + ctxcanvas->style = 4; + break; + + case CD_DASH_DOT_DOT: + ctxcanvas->style = 6; + break; + } + + return style; +} + +static int cdlinewidth (cdCtxCanvas* ctxcanvas, int width) +{ + (void)ctxcanvas; + width = width & 31; + return width; +} + +static int cdfont(cdCtxCanvas* ctxcanvas, const char *type_face, int style, int size) +{ + (void)style; + ctxcanvas->tl = (long)(cdGetFontSizePoints(ctxcanvas->canvas, size)/4)*3; + + if (cdStrEqualNoCase(type_face, "Courier")) + ctxcanvas->typeface_index=1; + else if (cdStrEqualNoCase(type_face, "Times")) + ctxcanvas->typeface_index=2; + else if (cdStrEqualNoCase(type_face, "Helvetica")) + ctxcanvas->typeface_index=3; + else if (cdStrEqualNoCase(type_face, "System")) + ctxcanvas->typeface_index=0; + else + return 0; + + return 1; +} + +static void cdgetfontdim (cdCtxCanvas* ctxcanvas, int *max_width, int *height, int *ascent, int *descent) +{ + int size_pixel; + + if(max_width) + { + int a=0; + *max_width=0; + + while(fontsizes[ctxcanvas->typeface_index][a]) + { + if(fontsizes[ctxcanvas->typeface_index][a] > *max_width) + *max_width = fontsizes[ctxcanvas->typeface_index][a]; + a++; + } + } + + size_pixel = cdGetFontSizePixels(ctxcanvas->canvas, ctxcanvas->canvas->font_size); + + if(height) *height = (size_pixel*3)/2; + if(ascent) *ascent = size_pixel; + if(descent) *descent = size_pixel/2; +} + +static void cdgettextsize (cdCtxCanvas* ctxcanvas, const char *s, int len, int *width, int *height) +{ + int size_pixel = cdGetFontSizePixels(ctxcanvas->canvas, ctxcanvas->canvas->font_size); + if(height) *height = size_pixel + get_descent(s, len, size_pixel); + if(width) *width = gettextwidth(ctxcanvas, s, len, size_pixel); +} + +static int cdtextalignment (cdCtxCanvas* ctxcanvas, int alignment) +{ + ctxcanvas->is_base = 0; + + /* DGN guarda posicao do texto em relacao ao ponto */ + + switch(alignment) + { + case CD_NORTH: + ctxcanvas->alignment = 8; /* center-bottom */ + break; + + case CD_SOUTH: + ctxcanvas->alignment = 6; /* center-top */ + break; + + case CD_EAST: + ctxcanvas->alignment = 1; /* left-center */ + break; + + case CD_WEST: + ctxcanvas->alignment = 13; /* right-center */ + break; + + case CD_NORTH_EAST: + ctxcanvas->alignment = 2; /* left-bottom */ + break; + + case CD_NORTH_WEST: + ctxcanvas->alignment = 14; /* right-bottom */ + break; + + case CD_SOUTH_EAST: + ctxcanvas->alignment = 0; /* left-top */ + break; + + case CD_SOUTH_WEST: + ctxcanvas->alignment = 12; /* right-top */ + break; + + case CD_CENTER: + ctxcanvas->alignment = 7; /* center-center */ + break; + + case CD_BASE_LEFT: + ctxcanvas->alignment = 13; /* right-center */ + ctxcanvas->is_base=1; + break; + + case CD_BASE_CENTER: + ctxcanvas->alignment = 7; /* center-center */ + ctxcanvas->is_base=1; + break; + + case CD_BASE_RIGHT: + ctxcanvas->alignment = 1; /* left-center */ + ctxcanvas->is_base=1; + break; + } + + return alignment; +} + +/******************************************************/ +/* color */ +/******************************************************/ + +static void cdpalette (cdCtxCanvas* ctxcanvas, int n, const long int *palette, int mode) +{ + int c=0; + + IGNORE(mode); + + for(c=0; c < n; c++) + ctxcanvas->colortable[c] = *palette++; + + ctxcanvas->num_colors = n; +} + +static long int cdforeground (cdCtxCanvas* ctxcanvas, long int color) +{ + ctxcanvas->color = getclosestColor(ctxcanvas, color); + return color; +} + +/******************************************************/ +/* client images */ +/******************************************************/ + +static void cdputimagerectmap(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *index, + const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int i=0,j=0, remainder=iw%2, total_colors; + int *ix=NULL,*iy=NULL; + Elm_hdr ehdr; + Disp_hdr dhdr; + unsigned char map_colors[256]; + + + /* raster header element */ + ehdr.type.flags.level=ctxcanvas->level; + ehdr.type.flags.type=87; + ehdr.words=39; + ehdr.xmin=x; + ehdr.xmax=x+w; + ehdr.ymin=y; + ehdr.ymax=y+h; + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx=25; + dhdr.symb.s=0; + + putDisplayHeader(ctxcanvas, &dhdr); + + /* description of the element */ + put_long(ctxcanvas, 21+(23+w/2+w%2)*h); /* total length of cell */ + put_word(ctxcanvas, 0x0714); /* raster flags */ + put_word(ctxcanvas, 0x0100); /* background e foreground colors + (nao usados) */ + put_word(ctxcanvas, w); /* largura da imagem em pixels */ + put_word(ctxcanvas, h); /* altura da imagem em pixel */ + put_long(ctxcanvas, 0); /* resevado */ + put_as_double(ctxcanvas, 0); /* resolution (nao usado) */ + + put_word(ctxcanvas, 0x4080); /* scale */ + put_long(ctxcanvas, 0); + put_word(ctxcanvas, 0); + + put_long(ctxcanvas, x); /* origem */ + put_long(ctxcanvas, y+h); + put_long(ctxcanvas, 0); + + put_word(ctxcanvas, 0); /* no de vertices */ + + ctxcanvas->is_complex = 1; /* elemento complexo */ + + /* obtem o maior indice usado na imagem */ + + total_colors = 0; + for (i = 0; i < iw*ih; i++) + { + if (index[i] > total_colors) + total_colors = index[i]; + } + total_colors++; + + /* cria tabela para acelerar match de cor na palette */ + + for (i = 0; i < total_colors; i++) + { + map_colors[i] = (unsigned char)getclosestColor(ctxcanvas, colors[i]); + } + + /** salva dados da imagem **/ + + /* calcula stretch */ + + ix = cdGetZoomTable(w, xmax-xmin+1, xmin); + iy = cdGetZoomTable(h, ymax-ymin+1, ymin); + + for(i=h-1; i >= 0; i--) + { + /* raster header element */ + ehdr.type.flags.level=ctxcanvas->level; + ehdr.type.flags.type=88; + ehdr.words=21+w/2+remainder; + + putElementHeader(ctxcanvas, &ehdr); + + /* Display Header */ + dhdr.attindx=7+w/2+remainder; + dhdr.symb.s=0; + putDisplayHeader(ctxcanvas, &dhdr); + + put_word(ctxcanvas, 0x0714); /* raster flags */ + put_word(ctxcanvas, 0x0100); /* background e foreground + colors (nao usados) */ + + put_word(ctxcanvas, 0); /* x offset da origem */ + put_word(ctxcanvas, i); /* y offset */ + put_word(ctxcanvas, w); /* numero de pixels neste elemento */ + + for(j=0; j < w; j++) + put_byte(ctxcanvas, map_colors[index[(iy[i])*iw + ix[j]]]); + + if(remainder) put_byte(ctxcanvas, 0); + } + + ctxcanvas->is_complex = 0; + + free(ix); /* libera memoria alocada */ + free(iy); +} + +/******************************************************/ +/* server images */ +/******************************************************/ + +static void cdpixel (cdCtxCanvas* ctxcanvas, int x, int y, long int color) +{ + long old_color = cdforeground(ctxcanvas, color); + int old_linestyle = cdlinestyle(ctxcanvas, CD_CONTINUOUS); + int old_linewidth = cdlinewidth(ctxcanvas, 1); + + cdline(ctxcanvas, x,y,x,y); + + cdforeground(ctxcanvas, old_color); + cdlinestyle(ctxcanvas, old_linestyle); + cdlinewidth(ctxcanvas, old_linewidth); +} + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + cdCtxCanvas *ctxcanvas; + char* strdata = (char*)data; + char words[4][256]; + char filename[10240] = ""; + char seedfile[10240] = ""; + int count = 0; + double res = 0; + + if (!data) return; + + /* separa palavras da expressao, que e' na forma + "filename [mm_wxmm_h] [res] [-f] [-sseedfile]" */ + + strdata += cdGetFileName(strdata, filename); + if (filename[0] == 0) + return; + + sscanf(strdata, "%s %s %s %s", words[0], words[1], words[2], words[3]); + + if(!strlen(filename)) /* se nao pegou filename */ + return; + + ctxcanvas = (cdCtxCanvas *) malloc(sizeof(cdCtxCanvas)); + + /* tenta criar arquivo DGN */ + + if((ctxcanvas->file = fopen (filename, "wb"))==NULL) + { + free(ctxcanvas); + return; + } + + /* verifica se foi passado tamanho do canvas em mm. Se foi, + extrai-o da string */ + + if(sscanf(words[0], "%lgx%lg", + &canvas->w_mm, &canvas->h_mm) == 2) + { + count++; /* incrementa contador de palavras */ + + if(canvas->w_mm == 0 || canvas->h_mm == 0) + { + fclose(ctxcanvas->file); + free(ctxcanvas); + return; + } + } + else + canvas->w_mm = canvas->h_mm = 0; + + /* Verifica se foi passada resolucao */ + + if(sscanf(words[count], "%lg", &res) == 1) + { + count++; /* incrementa contador de palavras */ + + if(res <= 0) /* verifica validade da resolucao */ + { + fclose(ctxcanvas->file); + free(ctxcanvas); + return; + } + } + else + res = 3.78; + + /* se tamanho em milimetros nao tiver sido inicializado, + usa como default o tamanho maximo em pixels para fazer as + contas + */ + + if (canvas->w_mm == 0 || canvas->h_mm == 0) + { + canvas->w = INT_MAX; + canvas->h = INT_MAX; + + canvas->w_mm = canvas->w / res; + canvas->h_mm = canvas->h / res; + } + else + { + canvas->w = (long) (canvas->w_mm * res); + canvas->h = (long) (canvas->h_mm * res); + } + + canvas->xres = res; + canvas->yres = res; + canvas->bpp = 8; + + /* verifica se usuario que alterar metodo de fill */ + + if (strcmp(words[count], "-f")==0) + { + ctxcanvas->fill_type = CONVEX; + count++; + } + else + ctxcanvas->fill_type = NORMAL; + + /* se tiver passado seedfile como argumento */ + if(sscanf(words[count], "-s%s", seedfile) == 1) + { + FILE *seed=NULL; + char *cd_dir = getenv("CDDIR"); + static char newfilename[512]; + + if(cd_dir == NULL) + cd_dir = "."; + + sprintf(newfilename, "%s/%s", cd_dir, seedfile); + + count++; + + /* testa concatenando com variavel de ambiente */ + + if((seed = fopen (newfilename, "rb"))==NULL) + { + /* tenta abrir usando string passada pelo usuario + diretamente */ + + if((seed = fopen (seedfile, "rb"))==NULL) + { + fclose(ctxcanvas->file); + free(ctxcanvas); + return; + } + } + + /* concatena seed */ + + fseek(seed, 0, SEEK_SET); + fseek(ctxcanvas->file, 0, SEEK_SET); + + ctxcanvas->bytes=0; + dgn_copy(seed, ctxcanvas); + fclose(seed); + } + + ctxcanvas->canvas = canvas; + canvas->ctxcanvas = ctxcanvas; + + /* config */ + + ctxcanvas->level = 1; + + /** valores default do contexto sao setados **/ + + /* texto */ + + ctxcanvas->alignment = 12; + ctxcanvas->is_base = 1; + ctxcanvas->typeface_index = 0; + ctxcanvas->tl=12; + + /* cores */ + + memset(ctxcanvas->colortable, 0, 1024); + ctxcanvas->colortable[0] = CD_BLACK; + ctxcanvas->num_colors = 1; + + /* atributos */ + + ctxcanvas->color = 1; + ctxcanvas->style = 0; + + /* DGN */ + + ctxcanvas->is_complex=0; +} + +static void cdinittable(cdCanvas* canvas) +{ + canvas->cxFlush = cdflush; + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxPoly = cdpoly; + canvas->cxBox = cdbox; + canvas->cxArc = cdarc; + canvas->cxSector = cdsector; + canvas->cxText = cdtext; + canvas->cxGetFontDim = cdgetfontdim; + canvas->cxGetTextSize = cdgettextsize; + canvas->cxPutImageRectMap = cdputimagerectmap; + + canvas->cxLineStyle = cdlinestyle; + canvas->cxLineWidth = cdlinewidth; + canvas->cxFont = cdfont; + canvas->cxTextAlignment = cdtextalignment; + canvas->cxPalette = cdpalette; + canvas->cxForeground = cdforeground; + + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxDeactivate = cddeactivate; +} + +/******************************************************/ + +static cdContext cdDGNContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_PLAY | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB | + CD_CAP_CLIPAREA | CD_CAP_CLIPPOLY | CD_CAP_RECT | + CD_CAP_LINECAP | CD_CAP_LINEJOIN | CD_CAP_REGION | CD_CAP_CHORD | + CD_CAP_IMAGERGB | CD_CAP_IMAGESRV | + CD_CAP_BACKGROUND | CD_CAP_BACKOPACITY | CD_CAP_WRITEMODE | + CD_CAP_HATCH | CD_CAP_STIPPLE | CD_CAP_PATTERN | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB | + CD_CAP_FPRIMTIVES | CD_CAP_TEXTORIENTATION), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +cdContext* cdContextDGN(void) +{ + return &cdDGNContext; +} + + diff --git a/cd/src/drv/cddxf.c b/cd/src/drv/cddxf.c new file mode 100755 index 0000000..b4dc875 --- /dev/null +++ b/cd/src/drv/cddxf.c @@ -0,0 +1,1188 @@ +/** \file + * \brief DXF driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include +#include "cd.h" +#include "cd_private.h" +#include "cddxf.h" + + +#ifndef ignore +#define ignore(x) (void)x +#endif + +#ifndef max +#define max(x, y) ((x > y)? x : y) +#endif + +#ifndef min +#define min(x, y) ((x < y)? x : y) +#endif + +struct _cdCtxCanvas +{ + cdCanvas* canvas; + + FILE *file; /* pointer to file */ + int layer; /* layer */ + + int tf; /* text font */ + double th; /* text height (in points) */ + int toa; /* text oblique angle (for italics) */ + int tha, tva; /* text horizontal and vertical alignment */ + + int fgcolor; /* foreground AutoCAD palette color */ + + int lt; /* line type */ + double lw; /* line width (in milimeters) */ +}; + + +static void wnamline (cdCtxCanvas* ctxcanvas, int t) /* write name of a line */ +{ + + static char *line[] = + {"CONTINUOUS", + "DASHED", + "HIDDEN", + "CENTER", + "PHANTOM", + "DOT", + "DASHDOT", + "BORDER", + "DIVIDE"}; + +/* + AutoCAD line styles ( see acad.lin ): + + 0 CONTINUOUS ____________________________________________ + 1 DASHED __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ + 2 HIDDEN _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + 3 CENTER ____ _ ____ _ ____ _ ____ _ ____ _ ____ _ __ + 4 PHANTOM _____ _ _ _____ _ _ _____ _ _ _____ _ _ ____ + 5 DOT ............................................ + 6 DASHDOT __ . __ . __ . __ . __ . __ . __ . __ . __ . + 7 BORDER __ __ . __ __ . __ __ . __ __ . __ __ . __ _ + 8 DIVIDE __ . . __ . . __ . . __ . . __ . . __ . . __ + +*/ + + fprintf (ctxcanvas->file, "%s\n", line[t]); +} + + +static void wnamfont (cdCtxCanvas *ctxcanvas, int t) /* write name of a font */ +{ + static char *font[] = + { + "STANDARD", + "ROMAN", + "ROMAN_BOLD", + "ROMANTIC", + "ROMANTIC_BOLD", + "SANSSERIF", + "SANSSERIF_BOLD", + }; +/* + CD Fonts / Style AutoCAD Fonts + ------------------------------------------------------------------- + CD_SYSTEM 0 STANDARD + CD_COURIER / CD_PLAIN 1 ROMAN + CD_COURIER / CD_BOLD 2 ROMAN_BOLD + CD_COURIER / CD_ITALIC 1 ROMAN (ctxcanvas->toa = 15) + CD_COURIER / CD_BOLD_ITALIC 2 ROMAN_BOLD (ctxcanvas->toa = 15) + CD_TIMES_ROMAN / CD_PLAIN 3 ROMANTIC + CD_TIMES_ROMAN / CD_BOLD 4 ROMANTIC_BOLD + CD_TIMES_ROMAN / CD_ITALIC 3 ROMANTIC (ctxcanvas->toa = 15) + CD_TIMES_ROMAN / CD_BOLD_ITALIC 4 ROMANTIC_BOLD (ctxcanvas->toa = 15) + CD_HELVETICA / CD_PLAIN 5 SANSSERIF + CD_HELVETICA / CD_BOLD 6 SANSSERIF_BOLD + CD_HELVETICA / CD_ITALIC 5 SANSSERIF (ctxcanvas->toa = 15) + CD_HELVETICA / CD_BOLD_ITALIC 6 SANSSERIF_BOLD(ctxcanvas->toa = 15) +*/ + + fprintf (ctxcanvas->file, "%s\n", font[t]); +} + + +static void writepoly (cdCtxCanvas *ctxcanvas, cdPoint *poly, int nv) /* write polygon */ +{ + int i; + + fprintf ( ctxcanvas->file, "0\n" ); + fprintf ( ctxcanvas->file, "POLYLINE\n" ); + fprintf ( ctxcanvas->file, "8\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->layer); /* current layer */ + + fprintf ( ctxcanvas->file, "6\n" ); + wnamline( ctxcanvas, ctxcanvas->lt ); /* line type */ + + fprintf ( ctxcanvas->file, "62\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->fgcolor ); + fprintf ( ctxcanvas->file, "66\n" ); + fprintf ( ctxcanvas->file, "1\n" ); + fprintf ( ctxcanvas->file, "40\n" ); + fprintf ( ctxcanvas->file, "%f\n", ctxcanvas->lw/ctxcanvas->canvas->xres ); + fprintf ( ctxcanvas->file, "41\n" ); /* entire polygon line width */ + fprintf ( ctxcanvas->file, "%f\n", ctxcanvas->lw/ctxcanvas->canvas->xres ); + for ( i=0; ifile, "0\n" ); + fprintf ( ctxcanvas->file, "VERTEX\n" ); + fprintf ( ctxcanvas->file, "8\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->layer); /* current layer */ + fprintf ( ctxcanvas->file, "10\n" ); + fprintf ( ctxcanvas->file, "%f\n", poly[i].x/ctxcanvas->canvas->xres ); + fprintf ( ctxcanvas->file, "20\n" ); + fprintf ( ctxcanvas->file, "%f\n", poly[i].y/ctxcanvas->canvas->xres ); + } + fprintf ( ctxcanvas->file, "0\n" ); + fprintf ( ctxcanvas->file, "SEQEND\n" ); +} + +static void writepolyf (cdCtxCanvas *ctxcanvas, cdfPoint *poly, int nv) /* write polygon */ +{ + int i; + + fprintf ( ctxcanvas->file, "0\n" ); + fprintf ( ctxcanvas->file, "POLYLINE\n" ); + fprintf ( ctxcanvas->file, "8\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->layer); /* current layer */ + + fprintf ( ctxcanvas->file, "6\n" ); + wnamline( ctxcanvas, ctxcanvas->lt ); /* line type */ + + fprintf ( ctxcanvas->file, "62\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->fgcolor ); + fprintf ( ctxcanvas->file, "66\n" ); + fprintf ( ctxcanvas->file, "1\n" ); + fprintf ( ctxcanvas->file, "40\n" ); + fprintf ( ctxcanvas->file, "%f\n", ctxcanvas->lw/ctxcanvas->canvas->xres ); + fprintf ( ctxcanvas->file, "41\n" ); /* entire polygon line width */ + fprintf ( ctxcanvas->file, "%f\n", ctxcanvas->lw/ctxcanvas->canvas->xres ); + for ( i=0; ifile, "0\n" ); + fprintf ( ctxcanvas->file, "VERTEX\n" ); + fprintf ( ctxcanvas->file, "8\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->layer); /* current layer */ + fprintf ( ctxcanvas->file, "10\n" ); + fprintf ( ctxcanvas->file, "%f\n", poly[i].x/ctxcanvas->canvas->xres ); + fprintf ( ctxcanvas->file, "20\n" ); + fprintf ( ctxcanvas->file, "%f\n", poly[i].y/ctxcanvas->canvas->xres ); + } + fprintf ( ctxcanvas->file, "0\n" ); + fprintf ( ctxcanvas->file, "SEQEND\n" ); +} + +static void deflines (cdCtxCanvas *ctxcanvas) /* define lines */ +{ + int i, j; + static char *line[] = + {"Solid line", + "Dashed line", + "Hidden line", + "Center line", + "Phantom line", + "Dot line", + "Dashdot line", + "Border line", + "Divide Line"}; + +#define TABSIZE (sizeof(tab)/sizeof(tab[0])) + + static int tab[][8] = + { + { 0, 0, 0 , 0, 0, 0, 0, 0 }, + { 2, 15, 10, -5, 0, 0, 0, 0 }, + { 2, 10, 5 , -5, 0, 0, 0, 0 }, + { 4, 35, 20, -5, 5, -5, 0, 0 }, + { 6, 50, 25, -5, 5, -5, 5, -5 }, + { 2, 5, 0 , -5, 0, 0, 0, 0 }, + { 4, 20, 10, -5, 0, -5, 0, 0 }, + { 6, 35, 10, -5, 10, -5, 0, -5 }, + { 6, 25, 10, -5, 0, -5, 0, -5 } + }; + + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "TABLE\n"); + fprintf (ctxcanvas->file, "2\n"); + fprintf (ctxcanvas->file, "LTYPE\n"); + fprintf (ctxcanvas->file, "70\n"); + fprintf (ctxcanvas->file, "5\n"); + for (j = 0; j < TABSIZE; j++) + { + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "LTYPE\n"); + fprintf (ctxcanvas->file, "2\n"); + + wnamline (ctxcanvas, j); /* line style */ + + fprintf (ctxcanvas->file, "70\n"); + fprintf (ctxcanvas->file, "64\n"); + fprintf (ctxcanvas->file, "3\n"); + fprintf (ctxcanvas->file, "%s\n", line[j]); /* line style */ + fprintf (ctxcanvas->file, "72\n"); + fprintf (ctxcanvas->file, "65\n"); + fprintf (ctxcanvas->file, "73\n"); + fprintf (ctxcanvas->file, "%d\n", tab[j][0]); /* number of parameters */ + fprintf (ctxcanvas->file, "40\n"); + fprintf (ctxcanvas->file, "%d\n", tab[j][1]); + for (i = 2; i < 2 + tab[j][0]; i++) + { + fprintf (ctxcanvas->file, "49\n"); + fprintf (ctxcanvas->file, "%d\n", tab[j][i]); /* parameters */ + } + } + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "ENDTAB\n"); +} + + +static void deffonts (cdCtxCanvas *ctxcanvas) /* define fonts */ +{ + int i; + static char *font[] = + { + "romanc.shx" , + "romant.shx" , + "rom_____.pfb", + "romb____.pfb", + "sas_____.pfb", + "sasb____.pfb" + }; + + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "TABLE\n"); + fprintf (ctxcanvas->file, "2\n"); + fprintf (ctxcanvas->file, "STYLE\n"); + fprintf (ctxcanvas->file, "70\n"); + fprintf (ctxcanvas->file, "5\n"); + for (i = 1; i < 7; i++) + { + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "STYLE\n"); + fprintf (ctxcanvas->file, "2\n"); + + wnamfont (ctxcanvas, i); /* font style name */ + + fprintf (ctxcanvas->file, "3\n"); + fprintf (ctxcanvas->file, "%s\n", font[i-1]); /* font style file */ + fprintf (ctxcanvas->file, "70\n"); + fprintf (ctxcanvas->file, "64\n"); + fprintf (ctxcanvas->file, "71\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "40\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "41\n"); + fprintf (ctxcanvas->file, "1\n"); + fprintf (ctxcanvas->file, "42\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "50\n"); + fprintf (ctxcanvas->file, "0\n"); + } + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "ENDTAB\n"); +} + +static void cddeactivate (cdCtxCanvas *ctxcanvas) +{ + fflush (ctxcanvas->file); /* flush file */ +} + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "ENDSEC\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "EOF\n"); /* fputs eof */ + fprintf (ctxcanvas->file, " \n"); + + fflush (ctxcanvas->file); /* flush file */ + fclose (ctxcanvas->file); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free (ctxcanvas); +} + +static void cdflush (cdCtxCanvas *ctxcanvas) +{ + ctxcanvas->layer++; +} + +/*==========================================================================*/ +/* Primitives */ +/*==========================================================================*/ +static void cdpoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n) +{ + if (mode == CD_CLOSED_LINES || mode == CD_FILL) + { + poly[n].x = poly[0].x; + poly[n].y = poly[0].y; + n++; + } + + writepoly (ctxcanvas, poly, n); /* write polygon */ +} + +static void cdline (cdCtxCanvas *ctxcanvas, int x1, int y1, int x2, int y2) +{ + cdPoint line[2]; /* uses new array of points to avoid */ + + line[0].x = x1; /* starting point */ + line[0].y = y1; + line[1].x = x2; /* ending point */ + line[1].y = y2; + writepoly (ctxcanvas, line, 2); /* draw line as a polygon */ +} + +static void cdboxrect(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + cdPoint rect[5]; /* uses new array of points to avoid */ + + rect[0].x = xmin; + rect[0].y = ymin; + rect[1].x = xmin; + rect[1].y = ymax; + rect[2].x = xmax; /* box edges */ + rect[2].y = ymax; + rect[3].x = xmax; + rect[3].y = ymin; + rect[4].x = xmin; + rect[4].y = ymin; + writepoly (ctxcanvas, rect, 5); /* draw box as a polygon */ +} + +static void cdfpoly(cdCtxCanvas *ctxcanvas, int mode, cdfPoint* poly, int n) +{ + if (mode == CD_CLOSED_LINES || mode == CD_FILL) + { + poly[n].x = poly[0].x; + poly[n].y = poly[0].y; + n++; + } + + writepolyf (ctxcanvas, poly, n); /* write polygon */ +} + +static void cdfline (cdCtxCanvas *ctxcanvas, double x1, double y1, double x2, double y2) +{ + cdfPoint line[2]; /* uses new array of points to avoid */ + + line[0].x = x1; /* starting point */ + line[0].y = y1; + line[1].x = x2; /* ending point */ + line[1].y = y2; + writepolyf (ctxcanvas, line, 2); /* draw line as a polygon */ +} + +static void cdfboxrect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + cdfPoint rect[5]; /* uses new array of points to avoid */ + + rect[0].x = xmin; + rect[0].y = ymin; + rect[1].x = xmin; + rect[1].y = ymax; + rect[2].x = xmax; /* box edges */ + rect[2].y = ymax; + rect[3].x = xmax; + rect[3].y = ymin; + rect[4].x = xmin; + rect[4].y = ymin; + writepolyf (ctxcanvas, rect, 5); /* draw box as a polygon */ +} + +/*--------------------------------------------------------------------------*/ +/* gives radius of the circle most resembling elliptic arc at angle t */ +/*--------------------------------------------------------------------------*/ +static double calc_radius (double a, double b, double t) +{ + return (pow ((a*a*sin(t)*sin(t) + b*b*cos(t)*cos(t)), 1.5))/(a*b); +} + +/*--------------------------------------------------------------------------*/ +/* calculates bulge for a given circular arc segment (between points p1 and */ +/* p2, with radius r). Bulge is the tangent of 1/4 the angle theta of the */ +/* arc segment(a bulge of 1 is a semicircle, which has an angle of 180 deg) */ +/*--------------------------------------------------------------------------*/ +static double calc_bulge (double a, double b, double t1, double t2) +{ + cdfPoint p1, p2; /* initial and ending arc points */ + double r; /* radius most resembling arc at angle (t1+t2)/2 */ + double theta; /* angle of circular arc segment */ + double sin_theta; /* sine of theta */ + double dist_x; /* distance between two points along the x axis */ + double dist_y; /* distance between two points along the y axis */ + double halfdist; /* half distance between two points */ + + p1.x = a*cos(t1); + p1.y = b*sin(t1); + p2.x = a*cos(t2); + p2.y = b*sin(t2); + r = calc_radius (a, b, (t1+t2)/2); + + dist_x = p2.x - p1.x; + dist_y = p2.y - p1.y; + halfdist = (sqrt (dist_x*dist_x + dist_y*dist_y))/2; + sin_theta = halfdist/r; + if (sin_theta > 1) sin_theta = 1; + theta = 2*asin(sin_theta); + + return tan(theta/4); +} + +static void writevertex (cdCtxCanvas *ctxcanvas, int xc, int yc, double a, double b, double t, double bulge) +{ + cdfPoint p; + p.x = (xc + a*cos(t))/ctxcanvas->canvas->xres; + p.y = (yc + b*sin(t))/ctxcanvas->canvas->xres; + + fprintf ( ctxcanvas->file, "0\n" ); + fprintf ( ctxcanvas->file, "VERTEX\n" ); + fprintf ( ctxcanvas->file, "8\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->layer); /* current layer */ + fprintf ( ctxcanvas->file, "10\n" ); + fprintf ( ctxcanvas->file, "%f\n", p.x ); + fprintf ( ctxcanvas->file, "20\n" ); /* vertex coordinates */ + fprintf ( ctxcanvas->file, "%f\n", p.y ); + fprintf ( ctxcanvas->file, "42\n" ); /* bulge from this vertex */ + fprintf ( ctxcanvas->file, "%f\n", bulge ); /* to the next one */ +} + +static void cdarc (cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + double bulge; /* bulge is the tangent of 1/4 the angle for a given */ + /* circle arc segment (a bulge of 1 is a semicircle) */ + double t; /* current arc angle being calculated */ + double t1; /* a1 in radians */ + double t2; /* a2 in radians */ + double a; /* half horizontal axis */ + double b; /* half vertical axis */ + double seg_angle; /* angle of every arc segment */ + double diff; /* angle between a1 and a2 */ + int nseg; /* number of arc segments */ + int i; + + a = w/2; + b = h/2; + t1 = a1*CD_DEG2RAD; /* a1 in radians */ + t2 = a2*CD_DEG2RAD; /* a2 in radians */ + diff = fabs(a2 - a1); + nseg = cdRound(diff)/(360/32); /* 32 segments in closed ellipse */ + nseg = max(nseg, 1); + seg_angle = (t2-t1)/nseg; + + fprintf ( ctxcanvas->file, "0\n" ); + fprintf ( ctxcanvas->file, "POLYLINE\n" ); + fprintf ( ctxcanvas->file, "8\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->layer); /* current layer */ + fprintf ( ctxcanvas->file, "6\n" ); + wnamline( ctxcanvas, ctxcanvas->lt ); /* line type */ + fprintf ( ctxcanvas->file, "62\n" ); + fprintf ( ctxcanvas->file, "%3d\n", ctxcanvas->fgcolor ); /* color */ + fprintf ( ctxcanvas->file, "66\n" ); + fprintf ( ctxcanvas->file, "1\n" ); + fprintf ( ctxcanvas->file, "70\n" ); + fprintf ( ctxcanvas->file, "128\n" ); + fprintf ( ctxcanvas->file, "40\n" ); + fprintf ( ctxcanvas->file, "%f\n", ctxcanvas->lw ); + fprintf ( ctxcanvas->file, "41\n" ); /* entire arc line width */ + fprintf ( ctxcanvas->file, "%f\n", ctxcanvas->lw ); + + for (i=0, t=t1; ifile, "0\n" ); + fprintf ( ctxcanvas->file, "SEQEND\n" ); +} + +static void cdsector (cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + double bulge; /* bulge is the tangent of 1/4 the angle for a given */ + /* circle arc segment (a bulge of 1 is a semicircle) */ + double t; /* current arc angle being calculated */ + double t1; /* a1 in radians */ + double t2; /* a2 in radians */ + double a; /* half horizontal axis */ + double b; /* half vertical axis */ + double seg_angle; /* angle of every arc segment */ + double diff; /* angle between a1 and a2 */ + int nseg; /* number of arc segments */ + int i; + + a = w/2; + b = h/2; + t1 = a1*CD_DEG2RAD; /* a1 in radians */ + t2 = a2*CD_DEG2RAD; /* a2 in radians */ + diff = fabs(a2 - a1); + nseg = cdRound(diff)/(360/32); /* 32 segments in closed ellipse */ + nseg = max(nseg, 1); + seg_angle = (t2-t1)/nseg; + + fprintf ( ctxcanvas->file, "0\n" ); + fprintf ( ctxcanvas->file, "POLYLINE\n" ); + fprintf ( ctxcanvas->file, "8\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->layer); /* current layer */ + fprintf ( ctxcanvas->file, "6\n" ); + wnamline( ctxcanvas, ctxcanvas->lt ); /* line type */ + fprintf ( ctxcanvas->file, "62\n" ); + fprintf ( ctxcanvas->file, "%3d\n", ctxcanvas->fgcolor ); /* color */ + fprintf ( ctxcanvas->file, "66\n" ); + fprintf ( ctxcanvas->file, "1\n" ); + fprintf ( ctxcanvas->file, "70\n" ); + fprintf ( ctxcanvas->file, "128\n" ); + fprintf ( ctxcanvas->file, "40\n" ); + fprintf ( ctxcanvas->file, "%f\n", ctxcanvas->lw ); + fprintf ( ctxcanvas->file, "41\n" ); /* entire arc line width */ + fprintf ( ctxcanvas->file, "%f\n", ctxcanvas->lw ); + + if ((a2-a1) != 360) + writevertex (ctxcanvas, xc, yc, 0, 0, 0, 0); /* center */ + for (i=0, t=t1; ifile, " 0\n" ); + fprintf ( ctxcanvas->file, "SEQEND\n" ); +} + +static void cdtext (cdCtxCanvas *ctxcanvas, int x, int y, const char *s, int len) +{ + fprintf ( ctxcanvas->file, "0\n" ); + fprintf ( ctxcanvas->file, "TEXT\n" ); + fprintf ( ctxcanvas->file, "8\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->layer); /* current layer */ + fprintf ( ctxcanvas->file, "7\n" ); + wnamfont( ctxcanvas, ctxcanvas->tf ); /* current font */ + fprintf ( ctxcanvas->file, "62\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->fgcolor ); /* color */ + fprintf ( ctxcanvas->file, "10\n" ); + fprintf ( ctxcanvas->file, "%f\n", x/ctxcanvas->canvas->xres ); /* current position */ + fprintf ( ctxcanvas->file, "20\n" ); + fprintf ( ctxcanvas->file, "%f\n", y/ctxcanvas->canvas->xres ); + fprintf ( ctxcanvas->file, "11\n" ); + fprintf ( ctxcanvas->file, "%f\n", x/ctxcanvas->canvas->xres ); /* alignment point */ + fprintf ( ctxcanvas->file, "21\n" ); + fprintf ( ctxcanvas->file, "%f\n", y/ctxcanvas->canvas->xres ); + fprintf ( ctxcanvas->file, "40\n" ); + fprintf ( ctxcanvas->file, "%f\n", ctxcanvas->th ); /* text height */ + fprintf ( ctxcanvas->file, "50\n" ); + fprintf ( ctxcanvas->file, "%f\n", ctxcanvas->canvas->text_orientation ); /* text orientation angle */ + fprintf ( ctxcanvas->file, "51\n" ); + fprintf ( ctxcanvas->file, "%3d\n", ctxcanvas->toa ); /* text oblique angle */ + fprintf ( ctxcanvas->file, "72\n" ); + fprintf ( ctxcanvas->file, "%3d\n", ctxcanvas->tha ); /* text horizontal alignment */ + fprintf ( ctxcanvas->file, "73\n" ); + fprintf ( ctxcanvas->file, "%3d\n", ctxcanvas->tva ); /* text vertical alignment */ + fprintf ( ctxcanvas->file, "1\n" ); + + s = cdStrDupN(s, len); + fprintf ( ctxcanvas->file, "%s\n", s ); /* text */ + free((char*)s); +} + + +/*==========================================================================*/ +/* Attributes */ +/*==========================================================================*/ + +static int cdlinestyle (cdCtxCanvas *ctxcanvas, int style) +{ + switch (style) + { + case CD_CONTINUOUS: + ctxcanvas->lt = 0; + break; + case CD_DASHED: + ctxcanvas->lt = 1; + break; + case CD_DOTTED: + ctxcanvas->lt = 5; + break; + case CD_DASH_DOT: + ctxcanvas->lt = 6; + break; + case CD_DASH_DOT_DOT: + ctxcanvas->lt = 8; + break; + } + + return style; +} + +static int cdlinewidth (cdCtxCanvas *ctxcanvas, int width) +{ + ctxcanvas->lw = width/ctxcanvas->canvas->xres; + return width; +} + +static int cdfont (cdCtxCanvas *ctxcanvas, const char *type_face, int style, int size) +{ + /* obs: DXF's text height (ctxcanvas->th) corresponds to CD ascent */ + + if (cdStrEqualNoCase(type_face, "System")) + { + ctxcanvas->tf = 0; + ctxcanvas->toa = 0; + ctxcanvas->th = 0.75; + } + else if (cdStrEqualNoCase(type_face, "Courier")) + { + switch (style&3) + { + case CD_PLAIN: + ctxcanvas->tf = 1; + ctxcanvas->toa = 0; + break; + + case CD_BOLD: + ctxcanvas->tf = 2; + ctxcanvas->toa = 0; + break; + + case CD_ITALIC: + ctxcanvas->tf = 1; + ctxcanvas->toa = 15; + break; + + case CD_BOLD_ITALIC: + ctxcanvas->tf = 2; + ctxcanvas->toa = 15; + break; + } + ctxcanvas->th = 0.75; + } + else if (cdStrEqualNoCase(type_face, "Times")) + { + switch (style&3) + { + case CD_PLAIN: + ctxcanvas->tf = 3; + ctxcanvas->toa = 0; + break; + + case CD_BOLD: + ctxcanvas->tf = 4; + ctxcanvas->toa = 0; + break; + + case CD_ITALIC: + ctxcanvas->tf = 3; + ctxcanvas->toa = 15; + break; + + case CD_BOLD_ITALIC: + ctxcanvas->tf = 4; + ctxcanvas->toa = 15; + break; + } + ctxcanvas->th = 1.125; + } + else if (cdStrEqualNoCase(type_face, "Helvetica")) + { + switch (style&3) + { + case CD_PLAIN: + ctxcanvas->tf = 5; + ctxcanvas->toa = 0; + break; + + case CD_BOLD: + ctxcanvas->tf = 6; + ctxcanvas->toa = 0; + break; + + case CD_ITALIC: + ctxcanvas->tf = 5; + ctxcanvas->toa = 15; + break; + + case CD_BOLD_ITALIC: + ctxcanvas->tf = 6; + ctxcanvas->toa = 15; + break; + } + ctxcanvas->th = 1.; + } + else + return 0; + + ctxcanvas->th = ctxcanvas->th * cdGetFontSizePoints(ctxcanvas->canvas, size); + + return 1; +} + +static void cdgetfontdim (cdCtxCanvas *ctxcanvas, int *max_width, int *height, int *ascent, int *descent) +{ + double tangent_ta; + double pixel_th; + + tangent_ta = tan(ctxcanvas->toa*CD_DEG2RAD); + pixel_th = (ctxcanvas->th*ctxcanvas->canvas->xres)/CD_MM2PT; /* points to pixels */ + switch (ctxcanvas->tf) + { + case 0: /* STANDARD font (CD_SYSTEM) */ + if (height) *height = cdRound(pixel_th*4/3); + if (ascent) *ascent = _cdRound(pixel_th); + if (descent) *descent = cdRound(pixel_th/3); + if (max_width) *max_width = _cdRound(pixel_th); + break; + + case 1: /* ROMAN fonts (CD_COURIER) */ + case 2: + if (height) *height = cdRound(pixel_th*4/3); + if (ascent) *ascent = _cdRound(pixel_th); + if (descent) *descent = cdRound(pixel_th/3); + if (max_width) *max_width = cdRound((pixel_th*21/20) + tangent_ta*(*ascent)); + break; + + case 3: /* ROMANTIC fonts (CD_TIMES_ROMAN) */ + if (height) *height = cdRound(pixel_th*8/9); + if (ascent) *ascent = cdRound(pixel_th*2/3); + if (descent) *descent = cdRound(pixel_th*2/9); + if (max_width) *max_width = cdRound((pixel_th*14/15) + tangent_ta*(*ascent)); + break; + + case 4: + if (height) *height = cdRound(pixel_th*8/9); + if (ascent) *ascent = cdRound(pixel_th*2/3); + if (descent) *descent = cdRound(pixel_th*2/9); + if (max_width) *max_width = cdRound((pixel_th*29/30) + tangent_ta*(*ascent)); + break; + + case 5: /* SANSSERIF fonts (CD_HELVETICA) */ + case 6: + if (height) *height = _cdRound(pixel_th); + if (ascent) *ascent = cdRound(pixel_th*3/4); + if (descent) *descent = cdRound(pixel_th/4); + if (max_width) *max_width = cdRound((pixel_th*15/16) + tangent_ta*(*ascent)); + break; + } +} + +static void cdgettextsize (cdCtxCanvas *ctxcanvas, const char *s, int len, int *width, int *height) +{ + int i; + double tangent_ta; + double pixel_th; + (void)s; + + i = len; + tangent_ta = tan(ctxcanvas->toa*CD_DEG2RAD); + pixel_th = (ctxcanvas->th*ctxcanvas->canvas->xres)/CD_MM2PT; /* points to pixels */ + + switch (ctxcanvas->tf) /* width return value based on maximum character width */ + { + case 0: /* STANDARD font (CD_SYSTEM) */ + if (height) *height = cdRound(pixel_th*4/3); + if (width) *width = cdRound(pixel_th*i + (pixel_th/3)*(i-1)); + break; + + case 1: /* ROMAN fonts (CD_COURIER) */ + case 2: + if (height) *height = cdRound(pixel_th*4/3); + if (width) *width = cdRound((pixel_th*21/20)*i + (pixel_th/10)*(i-1) + tangent_ta*pixel_th); + break; + + case 3: /* ROMANTIC fonts (CD_TIMES_ROMAN) */ + if (height) *height = cdRound(pixel_th*2/3 + pixel_th*2/9); + if (width) *width = cdRound((pixel_th*14/15)*i + (pixel_th/45)*(i-1) + tangent_ta*pixel_th*2/3); + break; + + case 4: + if (height) *height = cdRound(pixel_th*2/3 + pixel_th*2/9); + if (width) *width = cdRound((pixel_th*29/30)*i + (pixel_th*2/45)*(i-1) + tangent_ta*pixel_th*2/3); + break; + + case 5: /* SANSSERIF fonts (CD_HELVETICA) */ + case 6: + if (height) *height = _cdRound(pixel_th); + if (width) *width = cdRound((pixel_th*15/16)*i + (pixel_th/45)*(i-1) + tangent_ta*pixel_th*3/4); + break; + } +} + +static int cdtextalignment (cdCtxCanvas *ctxcanvas, int alignment) +{ + switch (alignment) /* convert alignment to DXF format */ + { + case CD_BASE_LEFT: + ctxcanvas->tva = 0; + ctxcanvas->tha = 0; + break; + + case CD_BASE_CENTER: + ctxcanvas->tva = 0; + ctxcanvas->tha = 1; + break; + + case CD_BASE_RIGHT: + ctxcanvas->tva = 0; + ctxcanvas->tha = 2; + break; + + case CD_SOUTH_WEST: + ctxcanvas->tva = 1; + ctxcanvas->tha = 0; + break; + + case CD_SOUTH: + ctxcanvas->tva = 1; + ctxcanvas->tha = 1; + break; + + case CD_SOUTH_EAST: + ctxcanvas->tva = 1; + ctxcanvas->tha = 2; + break; + + case CD_WEST: + ctxcanvas->tva = 2; + ctxcanvas->tha = 0; + break; + + case CD_CENTER: + ctxcanvas->tva = 2; + ctxcanvas->tha = 1; + break; + + case CD_EAST: + ctxcanvas->tva = 2; + ctxcanvas->tha = 2; + break; + + case CD_NORTH_WEST: + ctxcanvas->tva = 3; + ctxcanvas->tha = 0; + break; + + case CD_NORTH: + ctxcanvas->tva = 3; + ctxcanvas->tha = 1; + break; + + case CD_NORTH_EAST: + ctxcanvas->tva = 3; + ctxcanvas->tha = 2; + break; + } + + return alignment; +} + +/*==========================================================================*/ +/* Color */ +/*==========================================================================*/ + +static void RGB_to_HSB (unsigned char r, unsigned char g, unsigned char b, + double *hue, double *sat, double *bright) +{ + double maximum; + double minimum; + double delta; + double red = r/255.; /* red, green and blue range from 0 to 1 */ + double green = g/255.; + double blue = b/255.; + + maximum = max(max(red, green), blue); /* stores higher index */ + minimum = min(min(red, green), blue); /* stores lower index */ + delta = maximum - minimum; + + *bright = maximum*100; + *sat = 0; + + if (maximum != 0) /* sat from 0 to 100 */ + *sat = (delta*100)/maximum; + + if (*sat != 0) /* hue from 0 to 359 */ + { + if (red == maximum) *hue = (green - blue)/delta; + if (green == maximum) *hue = 2 + (blue - red)/delta; + if (blue == maximum) *hue = 4 + (red - green)/delta; + *hue *= 60; + if (*hue < 0) *hue += 360; + } + else + *hue = 0; /* color is greyscale (hue is meaningless) */ +} + +static int HSB_to_AutoCAD_Palette (double hue, double sat, double bright) +{ + int index; + int h, s, b; + + if (bright < 17) /* 5 levels of brightness in AutoCAD palette, 6 with */ + { /* black. If bright < 17, index is black (7). */ + index = 7; /* 17 is 100/6 (rounded up) */ + } + else if (sat < 10) /* low saturation makes color tend to */ + { /* grey/white. 6 levels of grey/white in */ + b = (int)floor(bright/14.3)-1;/* palette WITHOUT black. 14.3 is 100/7 */ + index = 250 + b; /* index is grey to white(255 in palette) */ + } + else + { + h = cdRound(hue/15.) + 1; + if (h > 24) h -= 24; /* 15 is 360/24 */ + h *= 10; /* h ranges from 10 to 240 in palette */ + s = (sat < 55) ? 1 : 0; /* s is 'high'(0) or 'low'(1) in palette */ + b = (int)floor(bright/16.7)-1;/* b is 0, 2, 4, 6 or 8 in palette */ + b = 2*(4 - b); /* (from brightest to dimmest) */ + index = h + s + b; /* index is simple sum of h, s and b */ + } + return index; +} + +static int get_palette_index (long int color) /* gives closest palette */ +{ /* index to RGB color */ + unsigned char red, green, blue; + double hue, sat, bright; + + cdDecodeColor (color, &red, &green, &blue); /* AutoCAD palette is */ + RGB_to_HSB (red, green, blue, &hue, &sat, &bright); /* based on HSB model */ + + return HSB_to_AutoCAD_Palette (hue, sat, bright); +} + +static long int cdforeground (cdCtxCanvas *ctxcanvas, long int color) +{ + ctxcanvas->fgcolor = get_palette_index (color); + return color; +} + + +/*==========================================================================*/ +/* Server Images */ +/*==========================================================================*/ + +static void cdpixel (cdCtxCanvas *ctxcanvas, int x, int y, long int color) +{ + int oldcolor = ctxcanvas->fgcolor; /* put 'color' as current */ + cdforeground (ctxcanvas, color); /* foreground color */ + fprintf ( ctxcanvas->file, "0\n" ); + fprintf ( ctxcanvas->file, "POINT\n" ); + fprintf ( ctxcanvas->file, "8\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->layer); /* current layer */ + fprintf ( ctxcanvas->file, "62\n" ); + fprintf ( ctxcanvas->file, "%d\n", ctxcanvas->fgcolor ); /* color */ + fprintf ( ctxcanvas->file, "10\n" ); + fprintf ( ctxcanvas->file, "%f\n", x/ctxcanvas->canvas->xres ); /* position */ + fprintf ( ctxcanvas->file, " 20\n" ); + fprintf ( ctxcanvas->file, "%f\n", y/ctxcanvas->canvas->xres ); + ctxcanvas->fgcolor = oldcolor; /* retrieve old fgcolor */ +} + +/******************************************************/ + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + char filename[10240] = ""; + char* strdata = (char*)data; + cdCtxCanvas *ctxcanvas; + double param1, param2, param3; + + ctxcanvas = (cdCtxCanvas *) malloc (sizeof (cdCtxCanvas)); + + param1 = 0; + param2 = 0; + param3 = 0; + + strdata += cdGetFileName(strdata, filename); + if (filename[0] == 0) + return; + + sscanf(strdata, "%lfx%lf %lf", ¶m1, ¶m2, ¶m3); + + ctxcanvas->file = fopen (filename, "w"); + if (ctxcanvas->file == NULL) + { + free(ctxcanvas); + return; + } + + if (!param1) + { + canvas->w_mm = INT_MAX*3.78; + canvas->h_mm = INT_MAX*3.78; + canvas->xres = 3.78; + } + else if (!param2) + { + canvas->w_mm = INT_MAX*param1; + canvas->h_mm = INT_MAX*param1; + canvas->xres = param1; + } + else if (!param3) + { + canvas->w_mm = param1; + canvas->h_mm = param2; + canvas->xres = 3.78; + } + else + { + canvas->w_mm = param1; + canvas->h_mm = param2; + canvas->xres = param3; + } + + ctxcanvas->canvas = canvas; + canvas->ctxcanvas = ctxcanvas; + + canvas->bpp = 8; + + canvas->yres = canvas->xres; + + canvas->w = (int)(canvas->w_mm * canvas->xres); + canvas->h = (int)(canvas->h_mm * canvas->yres); + + ctxcanvas->layer = 0; /* reset layer */ + + ctxcanvas->tf = 0; /* text font (0 is STANDARD) */ + ctxcanvas->th = 9; /* text height */ + ctxcanvas->toa = 0; /* text oblique angle */ + ctxcanvas->tva = 0; /* text vertical alignment (0 is baseline) */ + ctxcanvas->tha = 0; /* text horizontal alignment (0 is left) */ + ctxcanvas->fgcolor = 7; /* foreground AutoCAD palette color */ + + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "SECTION\n"); /* header maker */ + fprintf (ctxcanvas->file, "2\n"); + fprintf (ctxcanvas->file, "HEADER\n"); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$LIMCHECK\n"); + fprintf (ctxcanvas->file, "70\n"); + fprintf (ctxcanvas->file, "1\n"); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$LIMMIN\n"); + fprintf (ctxcanvas->file, "10\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "20\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$LIMMAX\n"); + fprintf (ctxcanvas->file, "10\n"); + fprintf (ctxcanvas->file, "%f\n", ctxcanvas->canvas->w_mm); + fprintf (ctxcanvas->file, "20\n"); + fprintf (ctxcanvas->file, "%f\n", ctxcanvas->canvas->h_mm); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$EXTMIN\n"); + fprintf (ctxcanvas->file, "10\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "20\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$EXTMAX\n"); + fprintf (ctxcanvas->file, "10\n"); + fprintf (ctxcanvas->file, "%f\n", ctxcanvas->canvas->w_mm); + fprintf (ctxcanvas->file, "20\n"); + fprintf (ctxcanvas->file, "%f\n", ctxcanvas->canvas->h_mm); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$CLAYER\n"); + fprintf (ctxcanvas->file, "8\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$LUNITS\n"); + fprintf (ctxcanvas->file, "70\n"); + fprintf (ctxcanvas->file, "2\n"); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$LUPREC\n"); + fprintf (ctxcanvas->file, "70\n"); /* precision (resolution dependant) */ + fprintf (ctxcanvas->file, "%d\n", (int)ceil(log10(ctxcanvas->canvas->xres))); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$AUNITS\n"); + fprintf (ctxcanvas->file, "70\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$AUPREC\n"); + fprintf (ctxcanvas->file, "70\n"); + fprintf (ctxcanvas->file, "2\n"); + fprintf (ctxcanvas->file, "9\n"); + fprintf (ctxcanvas->file, "$TEXTSTYLE\n"); + fprintf (ctxcanvas->file, "7\n"); + fprintf (ctxcanvas->file, "STANDARD\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "ENDSEC\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "SECTION\n"); + fprintf (ctxcanvas->file, "2\n"); + fprintf (ctxcanvas->file, "TABLES\n"); + + deflines (ctxcanvas); /* define lines */ + deffonts (ctxcanvas); /* define fonts */ + + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "ENDSEC\n"); + fprintf (ctxcanvas->file, "0\n"); + fprintf (ctxcanvas->file, "SECTION\n"); + fprintf (ctxcanvas->file, "2\n"); + fprintf (ctxcanvas->file, "ENTITIES\n"); +} + +static void cdinittable(cdCanvas* canvas) +{ + canvas->cxFlush = cdflush; + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxPoly = cdpoly; + canvas->cxRect = cdboxrect; + canvas->cxBox = cdboxrect; + canvas->cxFLine = cdfline; + canvas->cxFPoly = cdfpoly; + canvas->cxFRect = cdfboxrect; + canvas->cxFBox = cdfboxrect; + canvas->cxArc = cdarc; + canvas->cxSector = cdsector; + canvas->cxText = cdtext; + canvas->cxGetFontDim = cdgetfontdim; + canvas->cxGetTextSize = cdgettextsize; + + canvas->cxLineStyle = cdlinestyle; + canvas->cxLineWidth = cdlinewidth; + canvas->cxFont = cdfont; + canvas->cxTextAlignment = cdtextalignment; + canvas->cxForeground = cdforeground; + + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxDeactivate = cddeactivate; +} + +/******************************************************/ + +static cdContext cdDXFContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_PLAY | CD_CAP_PALETTE | + CD_CAP_CLIPAREA | CD_CAP_CLIPPOLY | + CD_CAP_LINECAP | CD_CAP_LINEJOIN | CD_CAP_REGION | CD_CAP_CHORD | + CD_CAP_IMAGERGB | CD_CAP_IMAGEMAP | CD_CAP_IMAGESRV | + CD_CAP_BACKGROUND | CD_CAP_BACKOPACITY | CD_CAP_WRITEMODE | + CD_CAP_HATCH | CD_CAP_STIPPLE | CD_CAP_PATTERN | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +cdContext* cdContextDXF(void) +{ + return &cdDXFContext; +} + diff --git a/cd/src/drv/cdirgb.c b/cd/src/drv/cdirgb.c new file mode 100755 index 0000000..7e4720c --- /dev/null +++ b/cd/src/drv/cdirgb.c @@ -0,0 +1,2051 @@ +/** \file + * \brief Image RGB Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" +#include "sim.h" +#include "cdirgb.h" + + +struct _cdCtxImage +{ + int w, h; + unsigned char* red; /* red color buffer */ + unsigned char* green; /* green color buffer */ + unsigned char* blue; /* blue color buffer */ + unsigned char* alpha; /* alpha color buffer */ +}; + + +struct _cdCtxCanvas +{ + cdCanvas* canvas; + + int user_image; /* can not free an user image */ + + unsigned char* red; /* red color buffer */ + unsigned char* green; /* green color buffer */ + unsigned char* blue; /* blue color buffer */ + unsigned char* alpha; /* alpha color buffer */ + unsigned char* clip; /* clipping buffer */ + + unsigned char* clip_region; /* clipping region used during NewRegion */ + + float rotate_angle; + int rotate_center_x, + rotate_center_y; + + cdCanvas* canvas_dbuffer; /* used by the CD_DBUFFERRGB driver */ +}; + +/*******************/ +/* Local functions */ +/*******************/ + +#define _sNormX(_ctxcanvas, _x) (_x < 0? 0: _x < _ctxcanvas->canvas->w? _x: _ctxcanvas->canvas->w-1) +#define _sNormY(_ctxcanvas, _y) (_y < 0? 0: _y < _ctxcanvas->canvas->h? _y: _ctxcanvas->canvas->h-1) + +#define RGB_COMPOSE(_SRC, _SRC_ALPHA, _DST, _TMP_MULTI, _TMP_ALPHA) (unsigned char)(((_SRC_ALPHA)*(_SRC) + (_TMP_MULTI)*(_DST)) / (_TMP_ALPHA)) + +#define RGBA_COLOR_COMBINE(_ctxcanvas, _pdst_red, _pdst_green, _pdst_blue, _pdst_alpha, _src_red, _src_green, _src_blue, _src_alpha) \ +{ \ + unsigned char _tmp_red = 0, _tmp_green = 0, _tmp_blue = 0; \ + \ + if (_pdst_alpha) /* (_pdst_alpha != NULL) */ \ + { \ + if (_src_alpha != 255) /* some transparency */ \ + { \ + if (_src_alpha != 0) /* source not full transparent */ \ + { \ + if (*_pdst_alpha == 0) /* destiny full transparent */ \ + { \ + _tmp_red = _src_red; \ + _tmp_green = _src_green; \ + _tmp_blue = _src_blue; \ + *_pdst_alpha = _src_alpha; \ + } \ + else if (*_pdst_alpha == 255) /* destiny opaque */ \ + { \ + _tmp_red = CD_ALPHA_BLEND(_src_red, *_pdst_red, _src_alpha); \ + _tmp_green = CD_ALPHA_BLEND(_src_green, *_pdst_green, _src_alpha); \ + _tmp_blue = CD_ALPHA_BLEND(_src_blue, *_pdst_blue, _src_alpha); \ + /* *_pdst_alpha is not changed */ \ + } \ + else /* (0<*_pdst_alpha<255 && 0<_src_alpha<255) destiny and source are semi-transparent */ \ + { \ + /* Closed Compositing Formulas for SRC over DST, Colors Not Premultiplied by Alpha: */ \ + int _tmp_multi = *_pdst_alpha * (255 - _src_alpha); \ + int _tmp_alpha = _src_alpha + _tmp_multi; \ + _tmp_red = RGB_COMPOSE(_src_red, _src_alpha, *_pdst_red, _tmp_multi, _tmp_alpha); \ + _tmp_green = RGB_COMPOSE(_src_green, _src_alpha, *_pdst_green, _tmp_multi, _tmp_alpha); \ + _tmp_blue = RGB_COMPOSE(_src_blue, _src_alpha, *_pdst_blue, _tmp_multi, _tmp_alpha); \ + *_pdst_alpha = (unsigned char)(_tmp_alpha / 255); \ + } \ + } \ + else /* (_src_alpha == 0) source full transparent */ \ + { \ + _tmp_red = *_pdst_red; \ + _tmp_green = *_pdst_green; \ + _tmp_blue = *_pdst_blue; \ + /* *_pdst_alpha is not changed */ \ + } \ + } \ + else /* (_src_alpha == 255) source has no alpha = opaque */ \ + { \ + _tmp_red = _src_red; \ + _tmp_green = _src_green; \ + _tmp_blue = _src_blue; \ + *_pdst_alpha = (unsigned char)255; /* set destiny as opaque */ \ + } \ + } \ + else /* (_pdst_alpha == NULL) */ \ + { \ + if (_src_alpha != 255) /* source has some transparency */ \ + { \ + if (_src_alpha != 0) /* source semi-transparent */ \ + { \ + _tmp_red = CD_ALPHA_BLEND(_src_red, *_pdst_red, _src_alpha); \ + _tmp_green = CD_ALPHA_BLEND(_src_green, *_pdst_green, _src_alpha); \ + _tmp_blue = CD_ALPHA_BLEND(_src_blue, *_pdst_blue, _src_alpha); \ + } \ + else /* (_src_alpha == 0) source full transparent */ \ + { \ + _tmp_red = *_pdst_red; \ + _tmp_green = *_pdst_green; \ + _tmp_blue = *_pdst_blue; \ + } \ + } \ + else /* (_src_alpha == 255) source has no alpha = opaque */ \ + { \ + _tmp_red = _src_red; \ + _tmp_green = _src_green; \ + _tmp_blue = _src_blue; \ + } \ + } \ + \ + switch (_ctxcanvas->canvas->write_mode) \ + { \ + case CD_REPLACE: \ + *_pdst_red = _tmp_red; \ + *_pdst_green = _tmp_green; \ + *_pdst_blue = _tmp_blue; \ + break; \ + case CD_XOR: \ + *_pdst_red ^= _tmp_red; \ + *_pdst_green ^= _tmp_green; \ + *_pdst_blue ^= _tmp_blue; \ + break; \ + case CD_NOT_XOR: \ + *_pdst_red = (unsigned char)~(_tmp_red ^ *_pdst_red); \ + *_pdst_green = (unsigned char)~(_tmp_green ^ *_pdst_green); \ + *_pdst_blue = (unsigned char)~(_tmp_blue ^ *_pdst_blue); \ + break; \ + } \ +} + +static void sCombineRGBColor(cdCtxCanvas* ctxcanvas, int offset, long color) +{ + unsigned char *dr = ctxcanvas->red + offset; + unsigned char *dg = ctxcanvas->green + offset; + unsigned char *db = ctxcanvas->blue + offset; + unsigned char *da = ctxcanvas->alpha? ctxcanvas->alpha + offset: NULL; + unsigned char *clip = ctxcanvas->clip + offset; + + unsigned char sr = cdRed(color); + unsigned char sg = cdGreen(color); + unsigned char sb = cdBlue(color); + unsigned char sa = cdAlpha(color); + + if (*clip) + RGBA_COLOR_COMBINE(ctxcanvas, dr, dg, db, da, sr, sg, sb, sa); +} + +static void sCombineRGB(cdCtxCanvas* ctxcanvas, int offset, unsigned char sr, unsigned char sg, unsigned char sb, unsigned char sa) +{ + unsigned char *dr = ctxcanvas->red + offset; + unsigned char *dg = ctxcanvas->green + offset; + unsigned char *db = ctxcanvas->blue + offset; + unsigned char *da = ctxcanvas->alpha? ctxcanvas->alpha + offset: NULL; + unsigned char *clip = ctxcanvas->clip + offset; + + if (*clip) + RGBA_COLOR_COMBINE(ctxcanvas, dr, dg, db, da, sr, sg, sb, sa); +} + +static void sCombineRGBLine(cdCtxCanvas* ctxcanvas, int offset, const unsigned char *sr, const unsigned char *sg, const unsigned char *sb, int size) +{ + int c; + unsigned char *dr = ctxcanvas->red + offset; + unsigned char *dg = ctxcanvas->green + offset; + unsigned char *db = ctxcanvas->blue + offset; + unsigned char *da = ctxcanvas->alpha? ctxcanvas->alpha + offset: NULL; + unsigned char *clip = ctxcanvas->clip + offset; + unsigned char src_a = 255; + + if (size > 0) + { + for (c = 0; c < size; c++) + { + if (*clip) + RGBA_COLOR_COMBINE(ctxcanvas, dr, dg, db, da, *sr, *sg, *sb, src_a); + dr++; dg++; db++; clip++; + sr++; sg++; sb++; + if (da) da++; + } + } + else + { + size *= -1; + for (c = 0; c < size; c++) + { + if (*clip) + RGBA_COLOR_COMBINE(ctxcanvas, dr, dg, db, da, *sr, *sg, *sb, src_a); + dr--; dg--; db--; clip--; + sr--; sg--; sb--; + if (da) da--; + } + } +} + +static void sCombineRGBALine(cdCtxCanvas* ctxcanvas, int offset, const unsigned char *sr, const unsigned char *sg, const unsigned char *sb, const unsigned char *sa, int size) +{ + int c; + unsigned char *dr = ctxcanvas->red + offset; + unsigned char *dg = ctxcanvas->green + offset; + unsigned char *db = ctxcanvas->blue + offset; + unsigned char *da = ctxcanvas->alpha? ctxcanvas->alpha + offset: NULL; + unsigned char *clip = ctxcanvas->clip + offset; + + if (size > 0) + { + for (c = 0; c < size; c++) + { + if (*clip) + RGBA_COLOR_COMBINE(ctxcanvas, dr, dg, db, da, *sr, *sg, *sb, *sa); + dr++; dg++; db++; clip++; + sr++; sg++; sb++; sa++; + if (da) da++; + } + } + else + { + size *= -1; + for (c = 0; c < size; c++) + { + if (*clip) + RGBA_COLOR_COMBINE(ctxcanvas, dr, dg, db, da, *sr, *sg, *sb, *sa); + dr--; dg--; db--; clip--; + sr--; sg--; sb--; sa--; + if (da) da--; + } + } +} + +static void irgbSolidLine(cdCanvas* canvas, int xmin, int y, int xmax) +{ + int x; + unsigned long offset = y * canvas->w; + + if (y < 0) + return; + + if (y > (canvas->h-1)) + return; + + if (xmin < 0) /* Arruma limites de acordo com o retangulo de clip */ + xmin = 0; /* so clipa em x */ + if (xmax > (canvas->w-1)) + xmax = (canvas->w-1); + + for (x = xmin; x <= xmax; x++) + sCombineRGBColor(canvas->ctxcanvas, offset + x, canvas->foreground); +} + +static void irgbPatternLine(cdCanvas* canvas, int xmin, int xmax, int y, int pw, const long *pattern) +{ + int x, i; + unsigned long offset = y * canvas->w; + + if (y < 0 || y > (canvas->h-1)) + return; + + if (xmin < 0) /* Arruma limites de acordo com o retangulo de clip */ + xmin = 0; /* so clipa em x */ + if (xmax > (canvas->w-1)) + xmax = (canvas->w-1); + + i = xmin % pw; + + for (x = xmin; x <= xmax; x++,i++) + { + if (i == pw) + i = 0; + + sCombineRGBColor(canvas->ctxcanvas, offset + x, pattern[i]); + } +} + +static void irgbStippleLine(cdCanvas* canvas, int xmin, int xmax, int y, int pw, const unsigned char *stipple) +{ + int x,i; + unsigned long offset = y * canvas->w; + + if (y < 0 || y > (canvas->h-1)) + return; + + if (xmin < 0) /* Arruma limites de acordo com o retangulo de clip */ + xmin = 0; /* so clipa em x */ + if (xmax > (canvas->w-1)) + xmax = (canvas->w-1); + + i = xmin % pw; + + for (x = xmin; x <= xmax; x++,i++) + { + if (i == pw) + i = 0; + if(stipple[i]) + sCombineRGBColor(canvas->ctxcanvas, offset + x, canvas->foreground); + else if (canvas->back_opacity == CD_OPAQUE) + sCombineRGBColor(canvas->ctxcanvas, offset + x, canvas->background); + } +} + +static void irgbHatchLine(cdCanvas* canvas, int xmin, int xmax, int y, unsigned char hatch) +{ + int x; + unsigned long offset = y * canvas->w; + unsigned char n; + + if (y < 0 || y > (canvas->h-1)) + return; + + if (xmin < 0) /* Arruma limites de acordo com o retangulo de clip */ + xmin = 0; /* so clipa em x */ + if (xmax > (canvas->w-1)) + xmax = (canvas->w-1); + + n = (unsigned char)(xmin&7); + simRotateHatchN(hatch, n); + + for (x = xmin; x <= xmax; x++) + { + if (hatch & 0x80) + sCombineRGBColor(canvas->ctxcanvas, offset + x, canvas->foreground); + else if (canvas->back_opacity == CD_OPAQUE) + sCombineRGBColor(canvas->ctxcanvas, offset + x, canvas->background); + + _cdRotateHatch(hatch); + } +} + +/********************/ +/* driver functions */ +/********************/ + +static void cdkillcanvas(cdCtxCanvas* ctxcanvas) +{ + if (!ctxcanvas->user_image) + free(ctxcanvas->red); + + if (ctxcanvas->clip_region) + free(ctxcanvas->clip_region); + + free(ctxcanvas->clip); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +unsigned char* cdAlphaImage(cdCanvas* canvas) +{ + cdCtxCanvas* ctxcanvas; + assert(canvas); + ctxcanvas = (cdCtxCanvas*)canvas->ctxcanvas; + return ctxcanvas->alpha; +} + +unsigned char* cdRedImage(cdCanvas* canvas) +{ + cdCtxCanvas* ctxcanvas; + assert(canvas); + ctxcanvas = (cdCtxCanvas*)canvas->ctxcanvas; + return ctxcanvas->red; +} + +unsigned char* cdGreenImage(cdCanvas* canvas) +{ + cdCtxCanvas* ctxcanvas; + assert(canvas); + ctxcanvas = (cdCtxCanvas*)canvas->ctxcanvas; + return ctxcanvas->green; +} + +unsigned char* cdBlueImage(cdCanvas* canvas) +{ + cdCtxCanvas* ctxcanvas; + assert(canvas); + ctxcanvas = (cdCtxCanvas*)canvas->ctxcanvas; + return ctxcanvas->blue; +} + +static void cdclear(cdCtxCanvas* ctxcanvas) +{ + int size = ctxcanvas->canvas->w * ctxcanvas->canvas->h; + memset(ctxcanvas->red, cdRed(ctxcanvas->canvas->background), size); + memset(ctxcanvas->green, cdGreen(ctxcanvas->canvas->background), size); + memset(ctxcanvas->blue, cdBlue(ctxcanvas->canvas->background), size); + if (ctxcanvas->alpha) memset(ctxcanvas->alpha, cdAlpha(ctxcanvas->canvas->background), size); +} + +static void irgPostProcessIntersect(unsigned char* clip, int size) +{ + int i; + for(i = 0; i < size; i++) + { + if (*clip == 2) + *clip = 1; + else + *clip = 0; + + clip++; + } +} + +#define _irgSetClipPixel(_clip, _combine_mode) \ +{ \ + switch (_combine_mode) \ + { \ + case CD_INTERSECT: \ + if (_clip) \ + _clip = 2; /* fills the intersection \ + with a value to be post-processed */ \ + break; \ + case CD_DIFFERENCE: \ + if (_clip) \ + _clip = 0; /* clears the intersection */ \ + break; \ + case CD_NOTINTERSECT: /* XOR */ \ + if (_clip) \ + _clip = 0; /* clears the intersection */ \ + else \ + _clip = 1; /* fills the region */ \ + break; \ + default: /* CD_UNION */ \ + _clip = 1; /* fills the region */ \ + break; \ + } \ +} + +static void irgbClipFillLine(unsigned char* clip_line, int combine_mode, int x1, int x2, int width) +{ + int x; + if (x1 < 0) x1 = 0; + if (x2 > width-1) x2 = width-1; + for (x = x1; x <= x2; x++) + { + _irgSetClipPixel(clip_line[x], combine_mode); + } +} + +static int compare_int(const int* xx1, const int* xx2) +{ + return *xx1 - *xx2; +} + +static void irgbClipPoly(cdCtxCanvas* ctxcanvas, unsigned char* clip_region, cdPoint* poly, int n, int combine_mode) +{ + cdCanvas* canvas = ctxcanvas->canvas; + unsigned char* clip_line; + simLineSegment *seg_i; + cdPoint* t_poly = NULL; + int y_max, y_min, i, y, i1, fill_mode, num_lines, + inter_count, width, height; + + int *xx = (int*)malloc((n+1)*sizeof(int)); + simLineSegment *segment = (simLineSegment *)malloc(n*sizeof(simLineSegment)); + + if (canvas->use_matrix) + { + t_poly = malloc(sizeof(cdPoint)*n); + memcpy(t_poly, poly, sizeof(cdPoint)*n); + poly = t_poly; + + for(i = 0; i < n; i++) + cdMatrixTransformPoint(canvas->matrix, poly[i].x, poly[i].y, &poly[i].x, &poly[i].y); + } + + width = canvas->w; + height = canvas->h; + fill_mode = canvas->fill_mode; + + y_max = poly[0].y; + y_min = poly[0].y; + for(i = 0; i < n; i++) + { + i1 = (i+1)%n; /* next point(i+1), next of last(n-1) is first(0) */ + simAddSegment(segment+i, poly[i].x, poly[i].y, poly[i1].x, poly[i1].y, &y_max, &y_min); + } + + if (y_min < 0) + y_min = 0; + + if (y_max > height-1) + num_lines = height-y_min; + else + num_lines = y_max-y_min+1; + + /* for all horizontal lines between y_max and y_min */ + for(y = y_max; y >= y_min; y--) + { + inter_count = 0; + + /* for all segments, calculates the intervals to be filled. */ + for(i = 0; i < n; i++) + { + seg_i = segment + i; + + /* if the minimum Y coordinate of the segment is greater than the current y, then ignore the segment. */ + /* if it is an horizontal line, then ignore the segment. */ + if (seg_i->y1 > y || + seg_i->y1 == seg_i->y2) + continue; + + if (y == seg_i->y1) /* intersection at the start point (x1,y1) */ + { + int i_next = (i==n-1)? 0: i+1; + int i_prev = (i==0)? n-1: i-1; + simLineSegment *seg_i_next = segment + i_next; + simLineSegment *seg_i_prev = segment + i_prev; + + /* always save at least one intersection point for (y1) */ + + xx[inter_count++] = seg_i->x1; /* save the intersection point */ + + /* check for missing bottom-corner points (|_|), must duplicate the intersection */ + if ((seg_i_next->y1 == y && seg_i_next->y2 == seg_i_next->y1) || /* next is an horizontal line */ + (seg_i_prev->y1 == y && seg_i_prev->y2 == seg_i_prev->y1)) /* previous is an horizontal line */ + { + xx[inter_count++] = seg_i->x1; /* save the intersection point */ + } + } + else if ((y > seg_i->y1) && (y < seg_i->y2)) /* intersection inside the segment, do not include y2 */ + { + xx[inter_count++] = simSegmentInc(seg_i, canvas, y); /* save the intersection point */ + } + else if (y == seg_i->y2) /* intersection at the end point (x2,y2) */ + { + int i_next = (i==n-1)? 0: i+1; + int i_prev = (i==0)? n-1: i-1; + simLineSegment *seg_i_next = segment + i_next; + simLineSegment *seg_i_prev = segment + i_prev; + + /* only save the intersection point for (y2) if not handled by (y1) of another segment */ + + /* check for missing top-corner points (^) or (|¯¯|) */ + if ((seg_i_next->y2 == y && seg_i_next->y2 == seg_i_next->y1) || /* next is an horizontal line */ + (seg_i_prev->y2 == y && seg_i_prev->y2 == seg_i_prev->y1) || /* previous is an horizontal line */ + (seg_i_next->y2 == y && seg_i_next->x2 == seg_i->x2 && seg_i_next->x1 != seg_i->x1) || + (seg_i_prev->y2 == y && seg_i_prev->x2 == seg_i->x2 && seg_i_prev->x1 != seg_i->x1)) + { + xx[inter_count++] = seg_i->x2; /* save the intersection point */ + } + } + } + + /* if outside the canvas, ignore the intervals and */ + /* continue since the segments where updated. */ + if (y > height-1 || inter_count == 0) + continue; + + /* sort the intervals */ + qsort(xx, inter_count, sizeof(int), (int (*)(const void*,const void*))compare_int); + + clip_line = clip_region + y*width; + + /* for all intervals, fill the interval */ + for(i = 0; i < inter_count; i += 2) + { + if (fill_mode == CD_EVENODD) + { + /* since it fills only pairs of intervals, */ + /* it is the EVENODD fill rule. */ + irgbClipFillLine(clip_line, combine_mode, xx[i], xx[i+1], width); + } + else + { + irgbClipFillLine(clip_line, combine_mode, xx[i], xx[i+1], width); + if ((i+2 < inter_count) && (xx[i+1] < xx[i+2])) /* avoid point intervals */ + if (simIsPointInPolyWind(poly, n, (xx[i+1]+xx[i+2])/2, y)) /* if the next interval is inside the polygon then fill it */ + irgbClipFillLine(clip_line, combine_mode, xx[i+1], xx[i+2], width); + } + } + } + + if (t_poly) free(t_poly); + free(xx); + free(segment); + + if (combine_mode == CD_INTERSECT) + irgPostProcessIntersect(ctxcanvas->clip_region, ctxcanvas->canvas->w * ctxcanvas->canvas->h); +} + +static void irgbClipElipse(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2, int sector) +{ + float c, s, sx, sy, x, y, prev_x, prev_y; + double da; + int i, p; + cdPoint* poly; + + /* number of segments of equivalent poligonal for a full ellipse */ + int n = simCalcEllipseNumSegments(ctxcanvas->canvas, xc, yc, width, height); + + /* number of segments for the arc */ + n = cdRound((fabs(angle2-angle1)*n)/360); + if (n < 1) n = 1; + + poly = (cdPoint*)malloc(sizeof(cdPoint)*(n+2+1)); /* n+1 points +1 center */ + + /* converts degrees into radians */ + angle1 *= CD_DEG2RAD; + angle2 *= CD_DEG2RAD; + + /* generates arc points at origin with axis x and y */ + + da = (angle2-angle1)/n; + c = (float)cos(da); + s = (float)sin(da); + sx = -(width*s)/height; + sy = (height*s)/width; + + x = xc + (width/2.0f)*(float)cos(angle1); + y = yc + (height/2.0f)*(float)sin(angle1); + poly[0].x = _cdRound(x); + poly[0].y = _cdRound(y); + prev_x = x; + prev_y = y; + p = 1; + + for (i = 1; i < n+1; i++) /* n+1 points */ + { + x = xc + c*(prev_x-xc) + sx*(prev_y-yc); + y = yc + sy*(prev_x-xc) + c*(prev_y-yc); + + poly[p].x = _cdRound(x); + poly[p].y = _cdRound(y); + + if (poly[p-1].x != poly[p].x || poly[p-1].y != poly[p].y) + p++; + + prev_x = x; + prev_y = y; + } + + if (poly[p-1].x != poly[0].x || poly[p-1].y != poly[0].y) + { + if (sector) /* cdSector */ + { + /* add center */ + poly[p].x = xc; + poly[p].y = yc; + } + else /* cdChord */ + { + /* add initial point */ + poly[p].x = poly[0].x; + poly[p].y = poly[0].y; + } + p++; + } + + irgbClipPoly(ctxcanvas, ctxcanvas->clip_region, poly, p, ctxcanvas->canvas->combine_mode); + + free(poly); +} + +static void irgbClipBox(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + int combine_mode = ctxcanvas->canvas->combine_mode; + unsigned char* clip_line; + int x, y, width; + + if (ctxcanvas->canvas->use_matrix) + { + cdPoint poly[4]; + poly[0].x = xmin; poly[0].y = ymin; + poly[1].x = xmin; poly[1].y = ymax; + poly[2].x = xmax; poly[2].y = ymax; + poly[3].x = xmax; poly[3].y = ymin; + irgbClipPoly(ctxcanvas, ctxcanvas->clip_region, poly, 4, ctxcanvas->canvas->combine_mode); + return; + } + + xmin = _sNormX(ctxcanvas, xmin); + ymin = _sNormY(ctxcanvas, ymin); + xmax = _sNormX(ctxcanvas, xmax); + ymax = _sNormY(ctxcanvas, ymax); + width = ctxcanvas->canvas->w; + + for(y = ymin; y <= ymax; y++) + { + clip_line = ctxcanvas->clip_region + y*width; + for(x = xmin; x <= xmax; x++) + { + _irgSetClipPixel(clip_line[x], combine_mode); + } + } + + if (combine_mode == CD_INTERSECT) + irgPostProcessIntersect(ctxcanvas->clip_region, ctxcanvas->canvas->w * ctxcanvas->canvas->h); +} + +static void irgbClipArea(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + unsigned char* clip_line = ctxcanvas->clip; /* set directly to clip */ + int y, xsize, ysize, height, width, xrigth; + + if (ctxcanvas->canvas->use_matrix) + { + cdPoint poly[4]; + poly[0].x = xmin; poly[0].y = ymin; + poly[1].x = xmin; poly[1].y = ymax; + poly[2].x = xmax; poly[2].y = ymax; + poly[3].x = xmax; poly[3].y = ymin; + memset(ctxcanvas->clip, 0, ctxcanvas->canvas->w * ctxcanvas->canvas->h); + irgbClipPoly(ctxcanvas, ctxcanvas->clip, poly, 4, CD_UNION); + return; + } + + xmin = _sNormX(ctxcanvas, xmin); + ymin = _sNormY(ctxcanvas, ymin); + xmax = _sNormX(ctxcanvas, xmax); + ymax = _sNormY(ctxcanvas, ymax); + xsize = xmax-xmin+1; + ysize = ymax-ymin+1; + height = ctxcanvas->canvas->h; + width = ctxcanvas->canvas->w; + xrigth = width-(xmax+1); + + for(y = 0; y < ymin; y++) + { + memset(clip_line, 0, width); + clip_line += width; + } + + for(y = ymin; y <= ymax; y++) + { + if (xmin) + memset(clip_line, 0, xmin); + + memset(clip_line+xmin, 1, xsize); + + if (xrigth) + memset(clip_line+xmax+1, 0, xrigth); + + clip_line += width; + } + + for(y = ymax+1; y < height; y++) + { + memset(clip_line, 0, width); + clip_line += width; + } +} + +static int cdclip(cdCtxCanvas* ctxcanvas, int mode) +{ + switch(mode) + { + case CD_CLIPAREA: + irgbClipArea(ctxcanvas, ctxcanvas->canvas->clip_rect.xmin, + ctxcanvas->canvas->clip_rect.xmax, + ctxcanvas->canvas->clip_rect.ymin, + ctxcanvas->canvas->clip_rect.ymax); + break; + case CD_CLIPPOLYGON: + memset(ctxcanvas->clip, 0, ctxcanvas->canvas->w * ctxcanvas->canvas->h); + irgbClipPoly(ctxcanvas, ctxcanvas->clip, ctxcanvas->canvas->clip_poly, ctxcanvas->canvas->clip_poly_n, CD_UNION); + break; + case CD_CLIPREGION: + if (ctxcanvas->clip_region) + memcpy(ctxcanvas->clip, ctxcanvas->clip_region, ctxcanvas->canvas->w * ctxcanvas->canvas->h); + break; + default: + memset(ctxcanvas->clip, 1, ctxcanvas->canvas->w * ctxcanvas->canvas->h); /* CD_CLIPOFF */ + break; + } + + return mode; +} + +static void cdcliparea(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if (ctxcanvas->canvas->clip_mode == CD_CLIPAREA) + irgbClipArea(ctxcanvas, xmin, xmax, ymin, ymax); +} + +static void cdnewregion(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->clip_region) + free(ctxcanvas->clip_region); + ctxcanvas->clip_region = malloc(ctxcanvas->canvas->w * ctxcanvas->canvas->h); + memset(ctxcanvas->clip_region, 0, ctxcanvas->canvas->w * ctxcanvas->canvas->h); +} + +static int cdispointinregion(cdCtxCanvas* ctxcanvas, int x, int y) +{ + if (!ctxcanvas->clip_region) + return 0; + + if (x >= 0 && y >= 0 && x < ctxcanvas->canvas->w && y < ctxcanvas->canvas->h) + { + if (ctxcanvas->clip_region[y*ctxcanvas->canvas->w + x]) + return 1; + } + + return 0; +} + +static void cdoffsetregion(cdCtxCanvas* ctxcanvas, int dx, int dy) +{ + unsigned char* clip_region = ctxcanvas->clip_region; + int x, y, X, Y, old_X, old_Y, width, height; + + if (!ctxcanvas->clip_region) + return; + + height = ctxcanvas->canvas->h; + width = ctxcanvas->canvas->w; + + for (y = 0; y < height; y++) + { + if (dy > 0) + Y = height-1 - y; + else + Y = y; + old_Y = Y - dy; + for(x = 0; x < width; x++) + { + if (dx > 0) + X = width-1 - x; + else + X = x; + old_X = X - dx; + + if (old_X >= 0 && old_Y >= 0 && old_Y < height && old_X < width) + clip_region[Y*width + X] = clip_region[old_Y*width + old_X]; + else + clip_region[Y*width + X] = 0; + } + } +} + +static void cdgetregionbox(cdCtxCanvas* ctxcanvas, int *xmin, int *xmax, int *ymin, int *ymax) +{ + unsigned char* clip_line = ctxcanvas->clip_region; + int x, y, width, height; + + if (!ctxcanvas->clip_region) + return; + + *xmin = ctxcanvas->canvas->w-1; + *xmax = 0; + *ymin = ctxcanvas->canvas->h-1; + *ymax = 0; + height = ctxcanvas->canvas->h; + width = ctxcanvas->canvas->w; + + for (y = 0; y < height; y++) + { + for(x = 0; x < width; x++) + { + if (*clip_line) + { + if (x < *xmin) + *xmin = x; + if (y < *ymin) + *ymin = y; + if (x > *xmax) + *xmax = x; + if (y > *ymax) + *ymax = y; + } + + clip_line++; + } + } +} + +static void cdbox(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if (ctxcanvas->canvas->new_region) + { + irgbClipBox(ctxcanvas, xmin, xmax, ymin, ymax); + return; + } + + cdboxSIM(ctxcanvas, xmin, xmax, ymin, ymax); +} + +static void cdsector(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + if (ctxcanvas->canvas->new_region) + { + irgbClipElipse(ctxcanvas, xc, yc, w, h, a1, a2, 1); + return; + } + + cdsectorSIM(ctxcanvas, xc, yc, w, h, a1, a2); +} + +static void cdchord(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + if (ctxcanvas->canvas->new_region) + { + irgbClipElipse(ctxcanvas, xc, yc, w, h, a1, a2, 0); + return; + } + + cdchordSIM(ctxcanvas, xc, yc, w, h, a1, a2); +} + +static void cdpoly(cdCtxCanvas* ctxcanvas, int mode, cdPoint* poly, int n) +{ + if (ctxcanvas->canvas->new_region) + { + irgbClipPoly(ctxcanvas, ctxcanvas->clip_region, poly, n, ctxcanvas->canvas->combine_mode); + return; + } + + if (mode == CD_CLIP) + { + /* set directly to clip */ + memset(ctxcanvas->clip, 1, ctxcanvas->canvas->w * ctxcanvas->canvas->h); /* CD_CLIPOFF */ + irgbClipPoly(ctxcanvas, ctxcanvas->clip, poly, n, CD_UNION); + } + else + cdpolySIM(ctxcanvas, mode, poly, n); +} + +static void cdgetimagergb(cdCtxCanvas* ctxcanvas, unsigned char *r, unsigned char *g, unsigned char *b, int x, int y, int w, int h) +{ + int dst_offset, src_offset, l, xsize, ysize, xpos, ypos; + unsigned char *src_red, *src_green, *src_blue; + + if (x >= ctxcanvas->canvas->w || y >= ctxcanvas->canvas->h || + x + w < 0 || y + h < 0) + return; + + /* ajusta parametros de entrada */ + xpos = _sNormX(ctxcanvas, x); + ypos = _sNormY(ctxcanvas, y); + + xsize = w < (ctxcanvas->canvas->w - xpos)? w: ctxcanvas->canvas->w - xpos; + ysize = h < (ctxcanvas->canvas->h - ypos)? h: ctxcanvas->canvas->h - ypos; + + /* ajusta posicao inicial em source */ + src_offset = xpos + ypos * ctxcanvas->canvas->w; + src_red = ctxcanvas->red + src_offset; + src_green = ctxcanvas->green + src_offset; + src_blue = ctxcanvas->blue + src_offset; + + /* offset para source */ + src_offset = ctxcanvas->canvas->w; + + /* ajusta posicao inicial em destine */ + dst_offset = (xpos - x) + (ypos - y) * w; + r += dst_offset; + g += dst_offset; + b += dst_offset; + + for (l = 0; l < ysize; l++) + { + memcpy(r, src_red, xsize); + memcpy(g, src_green, xsize); + memcpy(b, src_blue, xsize); + + src_red += src_offset; + src_green += src_offset; + src_blue += src_offset; + + r += w; + g += w; + b += w; + } +} + +static void cdputimagerectrgba_matrix(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int t_xmin, t_xmax, t_ymin, t_ymax, + t_x, t_y, img_topdown = 0, dst_offset; + float i_x, i_y, xfactor, yfactor; + unsigned char sr, sg, sb, sa = 255; + double inv_matrix[6]; + + if (h < 0) + { + h = -h; + y -= (h - 1); /* y is at top-left, move it to bottom-left */ + img_topdown = 1; /* image pointer will start at top-left */ + } + + /* calculate the destination limits */ + cdImageRGBCalcDstLimits(ctxcanvas->canvas, x, y, w, h, &t_xmin, &t_xmax, &t_ymin, &t_ymax, NULL); + + /* Setup inverse transform */ + cdImageRGBInitInverseTransform(w, h, xmin, xmax, ymin, ymax, &xfactor, &yfactor, ctxcanvas->canvas->matrix, inv_matrix); + + /* for all pixels in the destiny area */ + for(t_y = t_ymin; t_y <= t_ymax; t_y++) + { + dst_offset = t_y * ctxcanvas->canvas->w; + + for(t_x = t_xmin; t_x <= t_xmax; t_x++) + { + cdImageRGBInverseTransform(t_x, t_y, &i_x, &i_y, xfactor, yfactor, xmin, ymin, x, y, inv_matrix); + + if (i_x > xmin && i_y > ymin && i_x < xmax+1 && i_y < ymax+1) + { + if (img_topdown) /* image is top-bottom */ + i_y = ih-1 - i_y; + + if (t_x == 350 && t_y == 383) + t_x = 350; + + sr = cdBilinearInterpolation(iw, ih, r, i_x, i_y); + sg = cdBilinearInterpolation(iw, ih, g, i_x, i_y); + sb = cdBilinearInterpolation(iw, ih, b, i_x, i_y); + if (a) sa = cdBilinearInterpolation(iw, ih, a, i_x, i_y); + + if (sr > 210 && sg > 210 && sb > 210) + sr = sr; + + sCombineRGB(ctxcanvas, t_x + dst_offset, sr, sg, sb, sa); + } + } + } +} + +static void cdputimagerectmap_matrix(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int t_xmin, t_xmax, t_ymin, t_ymax, + t_x, t_y, img_topdown = 0, dst_offset; + float i_x, i_y, xfactor, yfactor; + unsigned char si; + double inv_matrix[6]; + + if (h < 0) + { + h = -h; + y -= (h - 1); /* y is at top-left, move it to bottom-left */ + img_topdown = 1; /* image pointer will start at top-left (undocumented feature) */ + } + + /* calculate the destination limits */ + cdImageRGBCalcDstLimits(ctxcanvas->canvas, x, y, w, h, &t_xmin, &t_xmax, &t_ymin, &t_ymax, NULL); + + /* Setup inverse transform */ + cdImageRGBInitInverseTransform(w, h, xmin, xmax, ymin, ymax, &xfactor, &yfactor, ctxcanvas->canvas->matrix, inv_matrix); + + /* for all pixels in the destiny area */ + for(t_y = t_ymin; t_y <= t_ymax; t_y++) + { + dst_offset = t_y * ctxcanvas->canvas->w; + + for(t_x = t_xmin; t_x <= t_xmax; t_x++) + { + cdImageRGBInverseTransform(t_x, t_y, &i_x, &i_y, xfactor, yfactor, xmin, ymin, x, y, inv_matrix); + + if (i_x > xmin && i_y > ymin && i_x < xmax+1 && i_y < ymax+1) + { + if (img_topdown) /* image is top-bottom */ + i_y = ih-1 - i_y; + + si = cdZeroOrderInterpolation(iw, ih, index, i_x, i_y); + sCombineRGBColor(ctxcanvas, t_x + dst_offset, colors[si]); + } + } + } +} + +static void cdputimagerectrgb(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int l, c, xsize, ysize, xpos, ypos, src_offset, dst_offset, rh, rw, img_topdown = 0; + const unsigned char *src_red, *src_green, *src_blue; + + if (ctxcanvas->canvas->use_matrix) + { + cdputimagerectrgba_matrix(ctxcanvas, iw, ih, r, g, b, NULL, x, y, w, h, xmin, xmax, ymin, ymax); + return; + } + + if (h < 0) + { + h = -h; + y -= (h - 1); /* y is at top-left, move it to bottom-left */ + img_topdown = 1; /* image pointer will start at top-left */ + } + + /* verifica se esta dentro da area de desenho */ + if (x > (ctxcanvas->canvas->w-1) || y > (ctxcanvas->canvas->h-1) || + (x+w) < 0 || (y+h) < 0) + return; + + xpos = x < 0? 0: x; + ypos = y < 0? 0: y; + + xsize = (x+w) < (ctxcanvas->canvas->w-1)+1? (x+w) - xpos: (ctxcanvas->canvas->w-1) - xpos + 1; + ysize = (y+h) < (ctxcanvas->canvas->h-1)+1? (y+h) - ypos: (ctxcanvas->canvas->h-1) - ypos + 1; + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + /* testa se tem que fazer zoom */ + if (rw != w || rh != h) + { + int* XTab = cdGetZoomTable(w, rw, xmin); + int* YTab = cdGetZoomTable(h, rh, ymin); + + /* ajusta posicao inicial em destine */ + dst_offset = xpos + ypos * ctxcanvas->canvas->w; + + for(l = 0; l < ysize; l++) + { + /* ajusta posicao inicial em source */ + if (img_topdown) + src_offset = YTab[(ih - 1) - (l + (ypos - y))] * iw; + else + src_offset = YTab[l + (ypos - y)] * iw; + + src_red = r + src_offset; + src_green = g + src_offset; + src_blue = b + src_offset; + + for(c = 0; c < xsize; c++) + { + src_offset = XTab[c + (xpos - x)]; + sCombineRGB(ctxcanvas, c + dst_offset, src_red[src_offset], src_green[src_offset], src_blue[src_offset], 255); + } + + dst_offset += ctxcanvas->canvas->w; + } + + free(XTab); + free(YTab); + } + else + { + /* ajusta posicao inicial em destine */ + dst_offset = xpos + ypos * ctxcanvas->canvas->w; + + /* ajusta posicao inicial em source */ + if (img_topdown) + src_offset = (xpos - x + xmin) + ((ih - 1) - (ypos - y + ymin)) * iw; + else + src_offset = (xpos - x + xmin) + (ypos - y + ymin) * iw; + + r += src_offset; + g += src_offset; + b += src_offset; + + for (l = 0; l < ysize; l++) + { + sCombineRGBLine(ctxcanvas, dst_offset, r, g, b, xsize); + + dst_offset += ctxcanvas->canvas->w; + + if (img_topdown) + { + r -= iw; + g -= iw; + b -= iw; + } + else + { + r += iw; + g += iw; + b += iw; + } + } + } +} + +static void cdputimagerectrgba(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int l, c, xsize, ysize, xpos, ypos, src_offset, dst_offset, rw, rh, img_topdown = 0; + const unsigned char *src_red, *src_green, *src_blue, *src_alpha; + + if (ctxcanvas->canvas->use_matrix) + { + cdputimagerectrgba_matrix(ctxcanvas, iw, ih, r, g, b, a, x, y, w, h, xmin, xmax, ymin, ymax); + return; + } + + if (h < 0) + { + h = -h; + y -= (h - 1); /* y is at top-left, move it to bottom-left */ + img_topdown = 1; /* image pointer will start at top-left */ + } + + /* verifica se esta dentro da area de desenho */ + if (x > (ctxcanvas->canvas->w-1) || y > (ctxcanvas->canvas->h-1) || + (x+w) < 0 || (y+h) < 0) + return; + + xpos = x < 0? 0: x; + ypos = y < 0? 0: y; + + xsize = (x+w) < (ctxcanvas->canvas->w-1)+1? (x+w) - xpos: (ctxcanvas->canvas->w-1) - xpos + 1; + ysize = (y+h) < (ctxcanvas->canvas->h-1)+1? (y+h) - ypos: (ctxcanvas->canvas->h-1) - ypos + 1; + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + /* testa se tem que fazer zoom */ + if (rw != w || rh != h) + { + int* XTab = cdGetZoomTable(w, rw, xmin); + int* YTab = cdGetZoomTable(h, rh, ymin); + + /* ajusta posicao inicial em destine */ + dst_offset = xpos + ypos * ctxcanvas->canvas->w; + + for(l = 0; l < ysize; l++) + { + /* ajusta posicao inicial em source */ + if (img_topdown) + src_offset = YTab[(ih - 1) - (l + (ypos - y))] * iw; + else + src_offset = YTab[l + (ypos - y)] * iw; + + src_red = r + src_offset; + src_green = g + src_offset; + src_blue = b + src_offset; + src_alpha = a + src_offset; + + for(c = 0; c < xsize; c++) + { + src_offset = XTab[c + (xpos - x)]; + sCombineRGB(ctxcanvas, c + dst_offset, src_red[src_offset], src_green[src_offset], src_blue[src_offset], src_alpha[src_offset]); + } + + dst_offset += ctxcanvas->canvas->w; + } + + free(XTab); + free(YTab); + } + else + { + /* ajusta posicao inicial em destine */ + dst_offset = xpos + ypos * ctxcanvas->canvas->w; + + /* ajusta posicao inicial em source */ + if (img_topdown) + src_offset = (xpos - x + xmin) + ((ih - 1) - (ypos - y + ymin)) * iw; + else + src_offset = (xpos - x + xmin) + (ypos - y + ymin) * iw; + + r += src_offset; + g += src_offset; + b += src_offset; + a += src_offset; + + for (l = 0; l < ysize; l++) + { + sCombineRGBALine(ctxcanvas, dst_offset, r, g, b, a, xsize); + + dst_offset += ctxcanvas->canvas->w; + + if (img_topdown) + { + r -= iw; + g -= iw; + b -= iw; + a -= iw; + } + else + { + r += iw; + g += iw; + b += iw; + a += iw; + } + } + } +} + +static void cdputimagerectmap(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int l, c, xsize, ysize, xpos, ypos, src_offset, dst_offset, rw, rh, pal_size, idx, img_topdown = 0; + const unsigned char *src_index; + + if (ctxcanvas->canvas->use_matrix) + { + cdputimagerectmap_matrix(ctxcanvas, iw, ih, index, colors, x, y, w, h, xmin, xmax, ymin, ymax); + return; + } + + if (h < 0) + { + h = -h; + y -= (h - 1); /* y is at top-left, move it to bottom-left */ + img_topdown = 1; /* image pointer will start at top-left */ + } + + /* verifica se esta dentro da area de desenho */ + if (x > (ctxcanvas->canvas->w-1) || y > (ctxcanvas->canvas->h-1) || + (x+w) < 0 || (y+h) < 0) + return; + + xpos = x < 0? 0: x; + ypos = y < 0? 0: y; + + xsize = (x+w) < (ctxcanvas->canvas->w-1)+1? (x+w) - xpos: (ctxcanvas->canvas->w-1) - xpos + 1; + ysize = (y+h) < (ctxcanvas->canvas->h-1)+1? (y+h) - ypos: (ctxcanvas->canvas->h-1) - ypos + 1; + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + /* Como nao sabemos o tamanho da palette a priori, + teremos que ver qual o maior indice usado na imagem. */ + pal_size = 0; + + for (l=0; l pal_size) + pal_size = idx; + } + } + + pal_size++; + + /* testa se tem que fazer zoom */ + if (rw != w || rh != h) + { + int* XTab = cdGetZoomTable(w, rw, xmin); + int* YTab = cdGetZoomTable(h, rh, ymin); + + /* ajusta posicao inicial em destine */ + dst_offset = xpos + ypos * ctxcanvas->canvas->w; + + for(l = 0; l < ysize; l++) + { + /* ajusta posicao inicial em source */ + if (img_topdown) + src_offset = YTab[(ih - 1) - (l + (ypos - y))] * iw; + else + src_offset = YTab[l + (ypos - y)] * iw; + + src_index = index + src_offset; + + for(c = 0; c < xsize; c++) + { + src_offset = XTab[c + (xpos - x)]; + idx = src_index[src_offset]; + sCombineRGBColor(ctxcanvas, c + dst_offset, colors[idx]); + } + + dst_offset += ctxcanvas->canvas->w; + } + + free(XTab); + free(YTab); + } + else + { + /* ajusta posicao inicial em destine */ + dst_offset = xpos + ypos * ctxcanvas->canvas->w; + + /* ajusta posicao inicial em source */ + if (img_topdown) + src_offset = (xpos - x + xmin) + ((ih - 1) - (ypos - y + ymin)) * iw; + else + src_offset = (xpos - x + xmin) + (ypos - y + ymin) * iw; + + index += src_offset; + + for (l = 0; l < ysize; l++) + { + for(c = 0; c < xsize; c++) + { + idx = index[c]; + sCombineRGBColor(ctxcanvas, c + dst_offset, colors[idx]); + } + + dst_offset += ctxcanvas->canvas->w; + + if (img_topdown) + index -= iw; + else + index += iw; + } + } +} + +static void cdpixel(cdCtxCanvas* ctxcanvas, int x, int y, long int color) +{ + int offset; + + if (ctxcanvas->canvas->use_matrix) + cdMatrixTransformPoint(ctxcanvas->canvas->matrix, x, y, &x, &y); + + offset = ctxcanvas->canvas->w * y + x; + + /* verifica se esta dentro da area de desenho */ + if (x < 0 || + x > (ctxcanvas->canvas->w-1) || + y < 0 || + y > (ctxcanvas->canvas->h-1)) + return; + + sCombineRGBColor(ctxcanvas, offset, color); +} + +static cdCtxImage* cdcreateimage(cdCtxCanvas* ctxcanvas, int w, int h) +{ + cdCtxImage* ctximage; + int size = w * h; + int num_c = ctxcanvas->alpha? 4: 3; + + ctximage = (cdCtxImage*)malloc(sizeof(cdCtxImage)); + memset(ctximage, 0, sizeof(cdCtxImage)); + + ctximage->w = w; + ctximage->h = h; + + ctximage->red = (unsigned char*) malloc(num_c*size); + if (!ctximage->red) + { + free(ctximage); + return NULL; + } + + ctximage->green = ctximage->red + size; + ctximage->blue = ctximage->red + 2*size; + if (ctxcanvas->alpha) + ctximage->alpha = ctximage->red + 3*size; + + memset(ctximage->red, 0xFF, 3*size); + if (ctximage->alpha) memset(ctximage->alpha, 0, size); /* transparent */ + + return ctximage; +} + +static void cdgetimage(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y) +{ + unsigned char *r, *g, *b, *a = NULL; + int w, h, dst_offset, src_offset, l, xsize, ysize, xpos, ypos, do_alpha = 0; + unsigned char *src_red, *src_green, *src_blue, *src_alpha = NULL; + + w = ctximage->w; + h = ctximage->h; + + if (x >= ctxcanvas->canvas->w || y >= ctxcanvas->canvas->h || + x + w < 0 || y + h < 0) + return; + + if (ctximage->alpha && ctxcanvas->alpha) + do_alpha = 1; + + r = ctximage->red; + g = ctximage->green; + b = ctximage->blue; + if (do_alpha) a = ctximage->alpha; + + /* ajusta parametros de entrada */ + xpos = _sNormX(ctxcanvas, x); + ypos = _sNormY(ctxcanvas, y); + + xsize = w < (ctxcanvas->canvas->w - xpos)? w: ctxcanvas->canvas->w - xpos; + ysize = h < (ctxcanvas->canvas->h - ypos)? h: ctxcanvas->canvas->h - ypos; + + /* ajusta posicao inicial em source */ + src_offset = xpos + ypos * ctxcanvas->canvas->w; + src_red = ctxcanvas->red + src_offset; + src_green = ctxcanvas->green + src_offset; + src_blue = ctxcanvas->blue + src_offset; + if (do_alpha) src_alpha = ctxcanvas->alpha + src_offset; + + /* offset para source */ + src_offset = ctxcanvas->canvas->w; + + /* ajusta posicao inicial em destine */ + dst_offset = (xpos - x) + (ypos - y) * w; + r += dst_offset; + g += dst_offset; + b += dst_offset; + if (do_alpha) a += dst_offset; + + for (l = 0; l < ysize; l++) + { + memcpy(r, src_red, xsize); + memcpy(g, src_green, xsize); + memcpy(b, src_blue, xsize); + if (do_alpha) memcpy(a, src_alpha, xsize); + + src_red += src_offset; + src_green += src_offset; + src_blue += src_offset; + if (do_alpha) src_alpha += src_offset; + + r += w; + g += w; + b += w; + if (do_alpha) a += w; + } +} + +static void cdputimagerect(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y, int xmin, int xmax, int ymin, int ymax) +{ + int iw, ih, w, h; + unsigned char *r, *g, *b, *a; + int l, xsize, ysize, xpos, ypos, src_offset, dst_offset; + + iw = ctximage->w; + ih = ctximage->h; + + r = ctximage->red; + g = ctximage->green; + b = ctximage->blue; + a = ctximage->alpha; + + w = xmax-xmin+1; + h = ymax-ymin+1; + + /* verifica se esta dentro da area de desenho */ + if (x > (ctxcanvas->canvas->w-1) || y > (ctxcanvas->canvas->h-1) || + x + w < 0 || y + h < 0) + return; + + xpos = x; + ypos = y; + + if (ypos < 0) ypos = 0; + if (xpos < 0) xpos = 0; + + xsize = w < ((ctxcanvas->canvas->w-1)+1 - xpos)? w: ((ctxcanvas->canvas->w-1)+1 - xpos); + ysize = h < ((ctxcanvas->canvas->h-1)+1 - ypos)? h: ((ctxcanvas->canvas->h-1)+1 - ypos); + + /* ajusta posicao inicial em destine */ + dst_offset = xpos + ypos * ctxcanvas->canvas->w; + + /* ajusta posicao inicial em source */ + src_offset = ((xpos - x) + xmin) + ((ypos - y) + ymin) * iw; + r += src_offset; + g += src_offset; + b += src_offset; + if (a) a += src_offset; + + for (l = 0; l < ysize; l++) + { + if (a) + sCombineRGBALine(ctxcanvas, dst_offset, r, g, b, a, xsize); + else + sCombineRGBLine(ctxcanvas, dst_offset, r, g, b, xsize); + + dst_offset += ctxcanvas->canvas->w; + + r += iw; + g += iw; + b += iw; + if (a) a += iw; + } +} + +static void cdkillimage(cdCtxImage* ctximage) +{ + free(ctximage->red); + memset(ctximage, 0, sizeof(cdCtxImage)); + free(ctximage); +} + +static void cdscrollarea(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax, int dx, int dy) +{ + int l; + long src_offset, dst_offset; + int incx,incy, xsize, ysize; + int dst_xmin, dst_xmax, dst_ymin, dst_ymax; + + /* corrige valores de entrada */ + + xmin = _sNormX(ctxcanvas, xmin); + ymin = _sNormY(ctxcanvas, ymin); + xmax = _sNormX(ctxcanvas, xmax); + ymax = _sNormY(ctxcanvas, ymax); + + dst_xmin = xmin + dx; + dst_ymin = ymin + dy; + dst_xmax = xmax + dx; + dst_ymax = ymax + dy; + + /* verifica se esta dentro da area de desenho */ + if (dst_xmin > (ctxcanvas->canvas->w-1) || dst_ymin > (ctxcanvas->canvas->h-1) || + dst_xmax < 0 || dst_ymax < 0) + return; + + if (dst_ymin < 0) dst_ymin = 0; + if (dst_xmin < 0) dst_xmin = 0; + + if (dst_ymax > (ctxcanvas->canvas->h-1)) dst_ymax = (ctxcanvas->canvas->h-1); + if (dst_xmax > (ctxcanvas->canvas->w-1)) dst_xmax = (ctxcanvas->canvas->w-1); + + if (dst_xmin > dst_xmax || dst_ymin > dst_ymax) + return; + + /* Decide de onde vai comecar a copiar, isto e' necessario pois pode haver + uma intersecao entre a imagem original e a nova imagem, assim devo + garantir que nao estou colocando um ponto, em cima de um ponto ainda nao + lido da imagem antiga. */ + + xsize = dst_xmax - dst_xmin + 1; + ysize = dst_ymax - dst_ymin + 1; + + /* sentido de copia da direita para a esquerda ou ao contrario. */ + if (dx < 0) + { + incx = 1; + dst_offset = dst_xmin; + src_offset = xmin; + } + else + { + incx = -1; + dst_offset = dst_xmax; + src_offset = xmax; + } + + /* sentido de copia de cima para baixo ou ao contrario. */ + if (dy < 0) + { + incy = ctxcanvas->canvas->w; + dst_offset += dst_ymin * ctxcanvas->canvas->w; + src_offset += ymin * ctxcanvas->canvas->w; + } + else + { + incy = -(ctxcanvas->canvas->w); + dst_offset += dst_ymax * ctxcanvas->canvas->w; + src_offset += ymax * ctxcanvas->canvas->w; + } + + xsize *= incx; + + for (l = 0; l < ysize; l++) + { + sCombineRGBLine(ctxcanvas, dst_offset, ctxcanvas->red + src_offset, ctxcanvas->green + src_offset, ctxcanvas->blue + src_offset, xsize); + dst_offset += incy; + src_offset += incy; + } +} + +static char* get_green_attrib(cdCtxCanvas* ctxcanvas) +{ + return (char*)ctxcanvas->green; +} + +static cdAttribute green_attrib = +{ + "GREENIMAGE", + NULL, + get_green_attrib +}; + +static char* get_blue_attrib(cdCtxCanvas* ctxcanvas) +{ + return (char*)ctxcanvas->blue; +} + +static cdAttribute blue_attrib = +{ + "BLUEIMAGE", + NULL, + get_blue_attrib +}; + +static char* get_red_attrib(cdCtxCanvas* ctxcanvas) +{ + return (char*)ctxcanvas->red; +} + +static cdAttribute red_attrib = +{ + "REDIMAGE", + NULL, + get_red_attrib +}; + +static char* get_alpha_attrib(cdCtxCanvas* ctxcanvas) +{ + return (char*)ctxcanvas->alpha; +} + +static cdAttribute alpha_attrib = +{ + "ALPHAIMAGE", + NULL, + get_alpha_attrib +}; + +static void set_aa_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (!data || data[0] == '0') + ctxcanvas->canvas->simulation->antialias = 0; + else + ctxcanvas->canvas->simulation->antialias = 1; +} + +static char* get_aa_attrib(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->canvas->simulation->antialias) + return "0"; + else + return "1"; +} + +static cdAttribute aa_attrib = +{ + "ANTIALIAS", + set_aa_attrib, + get_aa_attrib +}; + +static void set_rotate_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (data) + { + sscanf(data, "%g %d %d", &ctxcanvas->rotate_angle, + &ctxcanvas->rotate_center_x, + &ctxcanvas->rotate_center_y); + + cdCanvasTransformTranslate(ctxcanvas->canvas, ctxcanvas->rotate_center_x, ctxcanvas->rotate_center_y); + cdCanvasTransformRotate(ctxcanvas->canvas, ctxcanvas->rotate_angle); + cdCanvasTransformTranslate(ctxcanvas->canvas, -ctxcanvas->rotate_center_x, -ctxcanvas->rotate_center_y); + } + else + { + ctxcanvas->rotate_angle = 0; + ctxcanvas->rotate_center_x = 0; + ctxcanvas->rotate_center_y = 0; + + cdCanvasTransform(ctxcanvas->canvas, NULL); + } +} + +static char* get_rotate_attrib(cdCtxCanvas* ctxcanvas) +{ + static char data[100]; + + if (!ctxcanvas->rotate_angle) + return NULL; + + sprintf(data, "%g %d %d", (double)ctxcanvas->rotate_angle, + ctxcanvas->rotate_center_x, + ctxcanvas->rotate_center_y); + + return data; +} + +static cdAttribute rotate_attrib = +{ + "ROTATE", + set_rotate_attrib, + get_rotate_attrib +}; + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + cdCtxCanvas* ctxcanvas; + int w = 0, h = 0, use_alpha = 0; + float res = (float)3.78; + unsigned char *r = NULL, *g = NULL, *b = NULL, *a = NULL; + char* str_data = (char*)data; + char* res_ptr = NULL; + + if (strstr(str_data, "-a")) + use_alpha = 1; + + res_ptr = strstr(str_data, "-r"); + if (res_ptr) + sscanf(res_ptr+2, "%g", &res); + + /* size and rgb */ +#ifdef SunOS_OLD + if (use_alpha) + sscanf(str_data, "%dx%d %d %d %d %d", &w, &h, &r, &g, &b, &a); + else + sscanf(str_data, "%dx%d %d %d %d", &w, &h, &r, &g, &b); +#else + if (use_alpha) + sscanf(str_data, "%dx%d %p %p %p %p", &w, &h, &r, &g, &b, &a); + else + sscanf(str_data, "%dx%d %p %p %p", &w, &h, &r, &g, &b); +#endif + + if (w == 0 || h == 0) + return; + + ctxcanvas = (cdCtxCanvas *)malloc(sizeof(cdCtxCanvas)); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + + canvas->w = w; + canvas->h = h; + canvas->yres = res; + canvas->xres = res; + canvas->w_mm = ((double)w) / res; + canvas->h_mm = ((double)h) / res; + if (use_alpha) + canvas->bpp = 32; + else + canvas->bpp = 24; + + if (r && g && b) + { + ctxcanvas->user_image = 1; + + ctxcanvas->red = r; + ctxcanvas->green = g; + ctxcanvas->blue = b; + ctxcanvas->alpha = a; + } + else + { + int size = w * h; + int num_c = use_alpha? 4: 3; + + ctxcanvas->user_image = 0; + + ctxcanvas->red = (unsigned char*)malloc(num_c*size); + if (!ctxcanvas->red) + { + free(ctxcanvas); + return; + } + + ctxcanvas->green = ctxcanvas->red + size; + ctxcanvas->blue = ctxcanvas->red + 2*size; + if (use_alpha) + ctxcanvas->alpha = ctxcanvas->red + 3*size; + + memset(ctxcanvas->red, 0xFF, 3*size); /* white */ + if (ctxcanvas->alpha) memset(ctxcanvas->alpha, 0, size); /* transparent */ + } + + ctxcanvas->clip = (unsigned char*)malloc(w*h); + memset(ctxcanvas->clip, 1, w*h); /* CD_CLIPOFF */ + + canvas->ctxcanvas = ctxcanvas; + ctxcanvas->canvas = canvas; + +// cdSimInitText(canvas->simulation); + /* nao preciso inicializar a fonte, + pois isso sera' feito na inicializacao dos atributos default do driver */ + + canvas->simulation->antialias = 1; + + cdRegisterAttribute(canvas, &red_attrib); + cdRegisterAttribute(canvas, &green_attrib); + cdRegisterAttribute(canvas, &blue_attrib); + cdRegisterAttribute(canvas, &alpha_attrib); + cdRegisterAttribute(canvas, &aa_attrib); + cdRegisterAttribute(canvas, &rotate_attrib); +} + +static void cdinittable(cdCanvas* canvas) +{ + cdSimulation* sim; + + /* initialize function table*/ + canvas->cxClip = cdclip; + canvas->cxClipArea = cdcliparea; + canvas->cxNewRegion = cdnewregion; + canvas->cxIsPointInRegion = cdispointinregion; + canvas->cxOffsetRegion = cdoffsetregion; + canvas->cxGetRegionBox = cdgetregionbox; + + canvas->cxPutImageRectRGB = cdputimagerectrgb; + canvas->cxPutImageRectRGBA = cdputimagerectrgba; + canvas->cxPutImageRectMap = cdputimagerectmap; + canvas->cxGetImageRGB = cdgetimagergb; + + canvas->cxCreateImage = cdcreateimage; + canvas->cxGetImage = cdgetimage; + canvas->cxPutImageRect = cdputimagerect; + canvas->cxKillImage = cdkillimage; + canvas->cxScrollArea = cdscrollarea; + + canvas->cxClear = cdclear; + canvas->cxPixel = cdpixel; + + canvas->cxLine = cdlineSIM; + canvas->cxRect = cdrectSIM; + canvas->cxBox = cdbox; + canvas->cxArc = cdarcSIM; + canvas->cxSector = cdsector; + canvas->cxChord = cdchord; + canvas->cxPoly = cdpoly; + canvas->cxText = NULL; + + canvas->cxKillCanvas = cdkillcanvas; + + /* use simulation */ + canvas->cxFont = NULL; + canvas->cxGetFontDim = NULL; + canvas->cxGetTextSize = NULL; + + sim = canvas->simulation; + + sim->SolidLine = irgbSolidLine; + sim->PatternLine = irgbPatternLine; + sim->StippleLine = irgbStippleLine; + sim->HatchLine = irgbHatchLine; +} + +static cdContext cdImageRGBContext = +{ + CD_CAP_ALL & ~(CD_CAP_FLUSH | CD_CAP_PLAY | CD_CAP_FPRIMTIVES | + CD_CAP_LINECAP | CD_CAP_LINEJOIN | CD_CAP_REGION | + CD_CAP_PALETTE | CD_CAP_TEXTORIENTATION), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +cdContext* cdContextImageRGB(void) +{ + return &cdImageRGBContext; +} + +static void cdflushDB(cdCtxCanvas *ctxcanvas) +{ + int old_writemode; + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + + /* this is done in the canvas_dbuffer context */ + + /* Flush can be affected by Origin and Clipping, but not WriteMode */ + + old_writemode = cdCanvasWriteMode(canvas_dbuffer, CD_REPLACE); + cdCanvasPutImageRectRGB(canvas_dbuffer, ctxcanvas->canvas->w, ctxcanvas->canvas->h, ctxcanvas->red, ctxcanvas->green, ctxcanvas->blue, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h, 0, 0, 0, 0); + cdCanvasWriteMode(canvas_dbuffer, old_writemode); +} + +static void cdcreatecanvasDB(cdCanvas* canvas, cdCanvas* canvas_dbuffer) +{ + char rgbdata[100]; + sprintf(rgbdata, "%dx%d -r%g", canvas_dbuffer->w, canvas_dbuffer->h, canvas_dbuffer->xres); + cdcreatecanvas(canvas, rgbdata); + if (canvas->ctxcanvas) + canvas->ctxcanvas->canvas_dbuffer = canvas_dbuffer; +} + +static int cdactivateDB(cdCtxCanvas *ctxcanvas) +{ + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + + /* this is done in the canvas_dbuffer context */ + /* this will update canvas size */ + cdCanvasActivate(canvas_dbuffer); + + /* check if the size changed */ + if (canvas_dbuffer->w != ctxcanvas->canvas->w || + canvas_dbuffer->h != ctxcanvas->canvas->h) + { + cdCanvas* canvas = ctxcanvas->canvas; + /* save the current, if the rebuild fail */ + cdCtxCanvas* old_ctxcanvas = ctxcanvas; + + /* if the image is rebuild, the canvas that uses the image must be also rebuild */ + + /* rebuild the image and the canvas */ + canvas->ctxcanvas = NULL; + cdcreatecanvasDB(canvas, canvas_dbuffer); + if (!canvas->ctxcanvas) + { + canvas->ctxcanvas = old_ctxcanvas; + return CD_ERROR; + } + + /* remove the old image and canvas */ + cdkillcanvas(old_ctxcanvas); + + ctxcanvas = canvas->ctxcanvas; + + /* update canvas attributes */ + if (canvas->cxBackground) canvas->cxBackground(ctxcanvas, canvas->background); + if (canvas->cxForeground) canvas->cxForeground(ctxcanvas, canvas->foreground); + if (canvas->cxBackOpacity) canvas->cxBackOpacity(ctxcanvas, canvas->back_opacity); + if (canvas->cxWriteMode) canvas->cxWriteMode(ctxcanvas, canvas->write_mode); + if (canvas->cxLineStyle) canvas->cxLineStyle(ctxcanvas, canvas->line_style); + if (canvas->cxLineWidth) canvas->cxLineWidth(ctxcanvas, canvas->line_width); + if (canvas->cxLineCap) canvas->cxLineCap(ctxcanvas, canvas->line_cap); + if (canvas->cxLineJoin) canvas->cxLineJoin(ctxcanvas, canvas->line_join); + if (canvas->cxHatch) canvas->cxHatch(ctxcanvas, canvas->hatch_style); + if (canvas->stipple && canvas->cxStipple) canvas->cxStipple(ctxcanvas, canvas->stipple_w, canvas->stipple_h, canvas->stipple); + if (canvas->pattern && canvas->cxPattern) canvas->cxPattern(ctxcanvas, canvas->pattern_w, canvas->pattern_h, canvas->pattern); + if (canvas->cxInteriorStyle) canvas->cxInteriorStyle(ctxcanvas, canvas->interior_style); + if (canvas->native_font[0] && canvas->cxNativeFont) + canvas->cxNativeFont(ctxcanvas, canvas->native_font); + else if (canvas->cxFont) canvas->cxFont(ctxcanvas, canvas->font_type_face, canvas->font_style, canvas->font_size); + if (canvas->cxTextAlignment) canvas->cxTextAlignment(ctxcanvas, canvas->text_alignment); + if (canvas->cxTextOrientation) canvas->cxTextOrientation(ctxcanvas, canvas->text_orientation); + if (canvas->use_matrix && canvas->cxTransform) canvas->cxTransform(ctxcanvas, canvas->matrix); + if (canvas->clip_mode == CD_CLIPAREA && canvas->cxClipArea) canvas->cxClipArea(ctxcanvas, canvas->clip_rect.xmin, canvas->clip_rect.xmax, canvas->clip_rect.ymin, canvas->clip_rect.ymax); + if (canvas->clip_mode == CD_CLIPAREA && canvas->cxFClipArea) canvas->cxFClipArea(ctxcanvas, canvas->clip_frect.xmin, canvas->clip_frect.xmax, canvas->clip_frect.ymin, canvas->clip_frect.ymax); + if (canvas->clip_mode == CD_CLIPPOLYGON && canvas->clip_poly) canvas->cxPoly(ctxcanvas, CD_CLIP, canvas->clip_poly, canvas->clip_poly_n); + if (canvas->clip_mode == CD_CLIPPOLYGON && canvas->clip_fpoly) canvas->cxFPoly(ctxcanvas, CD_CLIP, canvas->clip_fpoly, canvas->clip_poly_n); + if (canvas->clip_mode != CD_CLIPOFF && canvas->cxClip) canvas->cxClip(ctxcanvas, canvas->clip_mode); + } + + return CD_OK; +} + +static void cddeactivateDB(cdCtxCanvas *ctxcanvas) +{ + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + /* this is done in the canvas_dbuffer context */ + cdCanvasDeactivate(canvas_dbuffer); +} + +static void cdinittableDB(cdCanvas* canvas) +{ + cdinittable(canvas); + + canvas->cxActivate = cdactivateDB; + canvas->cxDeactivate = cddeactivateDB; + + canvas->cxFlush = cdflushDB; +} + +static cdContext cdDBufferRGBContext = +{ + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_FPRIMTIVES | + CD_CAP_LINECAP | CD_CAP_LINEJOIN | CD_CAP_REGION | + CD_CAP_PALETTE | CD_CAP_TEXTORIENTATION), + 0, + cdcreatecanvasDB, + cdinittableDB, + NULL, + NULL, +}; + +cdContext* cdContextDBufferRGB(void) +{ + return &cdDBufferRGBContext; +} diff --git a/cd/src/drv/cdmf.c b/cd/src/drv/cdmf.c new file mode 100755 index 0000000..d44bb5e --- /dev/null +++ b/cd/src/drv/cdmf.c @@ -0,0 +1,1192 @@ +/** \file + * \brief CD Metafile driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include + +#include "cd.h" +#include "wd.h" +#include "cd_private.h" +#include "cdmf.h" +#include "cdmf_private.h" + + +/* codes for the primitives and attributes in the metafile + Can NOT be changed, only added for backward compatibility. +*/ +enum +{ + CDMF_FLUSH, /* 0 */ + CDMF_CLEAR, /* 1 */ + CDMF_CLIP, /* 2 */ + CDMF_CLIPAREA, /* 3 */ + CDMF_LINE, /* 4 */ + CDMF_BOX, /* 5 */ + CDMF_ARC, /* 6 */ + CDMF_SECTOR, /* 7 */ + CDMF_TEXT, /* 8 */ + CDMF_BEGIN, /* 9 */ + CDMF_VERTEX, /* 10 */ + CDMF_END, /* 11 */ + CDMF_MARK, /* 12 */ + CDMF_BACKOPACITY, /* 13 */ + CDMF_WRITEMODE, /* 14 */ + CDMF_LINESTYLE, /* 15 */ + CDMF_LINEWIDTH, /* 16 */ + CDMF_INTERIORSTYLE, /* 17 */ + CDMF_HATCH, /* 18 */ + CDMF_STIPPLE, /* 19 */ + CDMF_PATTERN, /* 20 */ + CDMF_OLDFONT, /* 21 */ + CDMF_NATIVEFONT, /* 22 */ + CDMF_TEXTALIGNMENT, /* 23 */ + CDMF_MARKTYPE, /* 24 */ + CDMF_MARKSIZE, /* 25 */ + CDMF_PALETTE, /* 26 */ + CDMF_BACKGROUND, /* 27 */ + CDMF_FOREGROUND, /* 28 */ + CDMF_PUTIMAGERGB, /* 29 */ + CDMF_PUTIMAGEMAP, /* 30 */ + CDMF_PIXEL, /* 31 */ + CDMF_SCROLLAREA, /* 32 */ + CDMF_TEXTORIENTATION, /* 33 */ + CDMF_RECT, /* 34 */ + CDMF_PUTIMAGERGBA, /* 35 */ + CDMF_WLINE, /* 36 */ + CDMF_WRECT, /* 37 */ + CDMF_WBOX, /* 38 */ + CDMF_WARC, /* 39 */ + CDMF_WSECTOR, /* 40 */ + CDMF_WTEXT, /* 41 */ + CDMF_WVERTEX, /* 42 */ + CDMF_WMARK, /* 43 */ + CDMF_VECTORTEXT, /* 44 */ + CDMF_MULTILINEVECTORTEXT, /* 45 */ + CDMF_WVECTORTEXT, /* 46 */ + CDMF_WMULTILINEVECTORTEXT, /* 47 */ + CDMF_WINDOW, /* 48 */ + CDMF_WCLIPAREA, /* 49 */ + CDMF_VECTORFONT, /* 50 */ + CDMF_VECTORTEXTDIRECTION, /* 51 */ + CDMF_VECTORTEXTTRANSFORM, /* 52 */ + CDMF_VECTORTEXTSIZE, /* 53 */ + CDMF_VECTORCHARSIZE, /* 54 */ + CDMF_WVECTORTEXTDIRECTION, /* 55 */ + CDMF_WVECTORTEXTSIZE, /* 56 */ + CDMF_WVECTORCHARSIZE, /* 57 */ + CDMF_FILLMODE, /* 58 */ + CDMF_LINESTYLEDASHES, /* 59 */ + CDMF_LINECAP, /* 60 */ + CDMF_LINEJOIN, /* 61 */ + CDMF_CHORD, /* 62 */ + CDMF_WCHORD, /* 63 */ + CDMF_FLINE, /* 64 */ + CDMF_FRECT, /* 65 */ + CDMF_FBOX, /* 66 */ + CDMF_FARC, /* 67 */ + CDMF_FSECTOR, /* 68 */ + CDMF_FTEXT, /* 69 */ + CDMF_FVERTEX, /* 70 */ + CDMF_MATRIX, /* 71 */ + CDMF_FCHORD, /* 72 */ + CDMF_FCLIPAREA, /* 73 */ + CDMF_FONT, /* 74 */ + CDMF_RESETMATRIX /* 75 */ +}; + +struct _cdCtxCanvas +{ + /* public */ + cdCanvas* canvas; + char* filename; + void* data; /* used by other drivers */ + + /* private */ + int last_line_style; + int last_fill_mode; + FILE* file; +}; + +void cdkillcanvasMF(cdCanvasMF *mfcanvas) +{ + cdCtxCanvas *ctxcanvas = (cdCtxCanvas*)mfcanvas; + free(ctxcanvas->filename); + fclose(ctxcanvas->file); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +static void cdflush(cdCtxCanvas *ctxcanvas) +{ + fflush(ctxcanvas->file); + fprintf(ctxcanvas->file, "%d\n", CDMF_FLUSH); +} + +static void cdclear(cdCtxCanvas *ctxcanvas) +{ + fprintf(ctxcanvas->file, "%d\n", CDMF_CLEAR); +} + +static int cdclip(cdCtxCanvas *ctxcanvas, int mode) +{ + fprintf(ctxcanvas->file, "%d %d\n", CDMF_CLIP, mode); + return mode; +} + +static void cdcliparea(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + fprintf(ctxcanvas->file, "%d %d %d %d %d\n", CDMF_CLIPAREA, xmin, xmax, ymin, ymax); +} + +static void cdfcliparea(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + fprintf(ctxcanvas->file, "%d %g %g %g %g\n", CDMF_FCLIPAREA, xmin, xmax, ymin, ymax); +} + +static void cdtransform(cdCtxCanvas *ctxcanvas, const double* matrix) +{ + if (matrix) + fprintf(ctxcanvas->file, "%d %g %g %g %g %g %g\n", CDMF_MATRIX, matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + else + fprintf(ctxcanvas->file, "%d\n", CDMF_RESETMATRIX); +} + +static void cdline(cdCtxCanvas *ctxcanvas, int x1, int y1, int x2, int y2) +{ + fprintf(ctxcanvas->file, "%d %d %d %d %d\n", CDMF_LINE, x1, y1, x2, y2); +} + +static void cdfline(cdCtxCanvas *ctxcanvas, double x1, double y1, double x2, double y2) +{ + fprintf(ctxcanvas->file, "%d %g %g %g %g\n", CDMF_FLINE, x1, y1, x2, y2); +} + +static void cdrect(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + fprintf(ctxcanvas->file, "%d %d %d %d %d\n", CDMF_RECT, xmin, xmax, ymin, ymax); +} + +static void cdfrect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + fprintf(ctxcanvas->file, "%d %g %g %g %g\n", CDMF_FRECT, xmin, xmax, ymin, ymax); +} + +static void cdbox(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + fprintf(ctxcanvas->file, "%d %d %d %d %d\n", CDMF_BOX, xmin, xmax, ymin, ymax); +} + +static void cdfbox(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + fprintf(ctxcanvas->file, "%d %g %g %g %g\n", CDMF_FBOX, xmin, xmax, ymin, ymax); +} + +static void cdarc(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + fprintf(ctxcanvas->file, "%d %d %d %d %d %g %g\n", CDMF_ARC, xc, yc, w, h, a1, a2); +} + +static void cdfarc(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + fprintf(ctxcanvas->file, "%d %g %g %g %g %g %g\n", CDMF_FARC, xc, yc, w, h, a1, a2); +} + +static void cdsector(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + fprintf(ctxcanvas->file, "%d %d %d %d %d %g %g\n", CDMF_SECTOR, xc, yc, w, h, a1, a2); +} + +static void cdfsector(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + fprintf(ctxcanvas->file, "%d %g %g %g %g %g %g\n", CDMF_FSECTOR, xc, yc, w, h, a1, a2); +} + +static void cdchord(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + fprintf(ctxcanvas->file, "%d %d %d %d %d %g %g\n", CDMF_CHORD, xc, yc, w, h, a1, a2); +} + +static void cdfchord(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + fprintf(ctxcanvas->file, "%d %g %g %g %g %g %g\n", CDMF_FCHORD, xc, yc, w, h, a1, a2); +} + +static void cdtext(cdCtxCanvas *ctxcanvas, int x, int y, const char *text, int len) +{ + text = cdStrDupN(text, len); + fprintf(ctxcanvas->file, "%d %d %d %s\n", CDMF_TEXT, x, y, text); + free((char*)text); +} + +static void cdftext(cdCtxCanvas *ctxcanvas, double x, double y, const char *text, int len) +{ + text = cdStrDupN(text, len); + fprintf(ctxcanvas->file, "%d %g %g %s\n", CDMF_FTEXT, x, y, text); + free((char*)text); +} + +static void cdpoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n) +{ + int i; + + if (mode == CD_FILL && ctxcanvas->canvas->fill_mode != ctxcanvas->last_fill_mode) + { + fprintf(ctxcanvas->file, "%d %d\n", CDMF_FILLMODE, ctxcanvas->canvas->fill_mode); + ctxcanvas->last_fill_mode = ctxcanvas->canvas->fill_mode; + } + + fprintf(ctxcanvas->file, "%d %d\n", CDMF_BEGIN, mode); + + for(i = 0; ifile, "%d %d %d\n", CDMF_VERTEX, poly[i].x, poly[i].y); + + fprintf(ctxcanvas->file, "%d\n", CDMF_END); +} + +static void cdfpoly(cdCtxCanvas *ctxcanvas, int mode, cdfPoint* poly, int n) +{ + int i; + + if (mode == CD_FILL && ctxcanvas->canvas->fill_mode != ctxcanvas->last_fill_mode) + { + fprintf(ctxcanvas->file, "%d %d\n", CDMF_FILLMODE, ctxcanvas->canvas->fill_mode); + ctxcanvas->last_fill_mode = ctxcanvas->canvas->fill_mode; + } + + fprintf(ctxcanvas->file, "%d %d\n", CDMF_BEGIN, mode); + + for(i = 0; ifile, "%d %g %g\n", CDMF_FVERTEX, poly[i].x, poly[i].y); + + fprintf(ctxcanvas->file, "%d\n", CDMF_END); +} + +static int cdbackopacity(cdCtxCanvas *ctxcanvas, int opacity) +{ + fprintf(ctxcanvas->file, "%d %d\n", CDMF_BACKOPACITY, opacity); + return opacity; +} + +static int cdwritemode(cdCtxCanvas *ctxcanvas, int mode) +{ + fprintf(ctxcanvas->file, "%d %d\n", CDMF_WRITEMODE, mode); + return mode; +} + +static int cdlinestyle(cdCtxCanvas *ctxcanvas, int style) +{ + if (style == CD_CUSTOM && ctxcanvas->canvas->line_style != ctxcanvas->last_line_style) + { + int i; + fprintf(ctxcanvas->file, "%d %d", CDMF_LINESTYLEDASHES, ctxcanvas->canvas->line_dashes_count); + for (i = 0; i < ctxcanvas->canvas->line_dashes_count; i++) + fprintf(ctxcanvas->file, " %d", ctxcanvas->canvas->line_dashes[i]); + fprintf(ctxcanvas->file, "\n"); + ctxcanvas->last_line_style = ctxcanvas->canvas->line_style; + } + + fprintf(ctxcanvas->file, "%d %d\n", CDMF_LINESTYLE, style); + return style; +} + +static int cdlinewidth(cdCtxCanvas *ctxcanvas, int width) +{ + fprintf(ctxcanvas->file, "%d %d\n", CDMF_LINEWIDTH, width); + return width; +} + +static int cdlinecap(cdCtxCanvas *ctxcanvas, int cap) +{ + fprintf(ctxcanvas->file, "%d %d\n", CDMF_LINECAP, cap); + return cap; +} + +static int cdlinejoin(cdCtxCanvas *ctxcanvas, int join) +{ + fprintf(ctxcanvas->file, "%d %d\n", CDMF_LINEJOIN, join); + return join; +} + +static int cdinteriorstyle(cdCtxCanvas *ctxcanvas, int style) +{ + fprintf(ctxcanvas->file, "%d %d\n", CDMF_INTERIORSTYLE, style); + return style; +} + +static int cdhatch(cdCtxCanvas *ctxcanvas, int style) +{ + fprintf(ctxcanvas->file, "%d %d\n", CDMF_HATCH, style); + return style; +} + +static void cdstipple(cdCtxCanvas *ctxcanvas, int w, int h, const unsigned char *stipple) +{ + int c, t; + + fprintf(ctxcanvas->file, "%d %d %d\n", CDMF_STIPPLE, w, h); + + t = w * h; + + for (c = 0; c < t; c++) + { + fprintf(ctxcanvas->file, "%d ", (int)*stipple++); + if ((c + 1) % w == 0) + fprintf(ctxcanvas->file, "\n"); + } +} + +static void cdpattern(cdCtxCanvas *ctxcanvas, int w, int h, const long int *pattern) +{ + int c, t; + unsigned char r, g, b; + + fprintf(ctxcanvas->file, "%d %d %d\n", CDMF_PATTERN, w, h); + + t = w * h; + + /* stores the pattern with separeted RGB values */ + for (c = 0; c < t; c++) + { + cdDecodeColor(*pattern++, &r, &g, &b); + fprintf(ctxcanvas->file, "%d %d %d ", (int)r, (int)g, (int)b); + if (c % w == 0) + fprintf(ctxcanvas->file, "\n"); + } +} + +static int cdfont(cdCtxCanvas *ctxcanvas, const char* type_face, int style, int size) +{ + fprintf(ctxcanvas->file, "%d %d %d %s\n", CDMF_FONT, style, size, type_face); + return 1; +} + +static int cdnativefont(cdCtxCanvas *ctxcanvas, const char* font) +{ + fprintf(ctxcanvas->file, "%d %s\n", CDMF_NATIVEFONT, font); + return 1; +} + +static int cdtextalignment(cdCtxCanvas *ctxcanvas, int alignment) +{ + fprintf(ctxcanvas->file, "%d %d\n", CDMF_TEXTALIGNMENT, alignment); + return alignment; +} + +static double cdtextorientation(cdCtxCanvas *ctxcanvas, double angle) +{ + fprintf(ctxcanvas->file, "%d %g\n", CDMF_TEXTORIENTATION, angle); + return angle; +} + +static void cdpalette(cdCtxCanvas *ctxcanvas, int n, const long int *palette, int mode) +{ + int c; + unsigned char r, g, b; + + fprintf(ctxcanvas->file, "%d %d %d\n", CDMF_PALETTE, n, mode); + + for (c = 0; c < n; c++) + { + cdDecodeColor(*palette++, &r, &g, &b); + fprintf(ctxcanvas->file, "%d %d %d\n", (int)r, (int)g, (int)b); + } +} + +static long cdbackground(cdCtxCanvas *ctxcanvas, long int color) +{ + unsigned char r, g, b; + cdDecodeColor(color, &r, &g, &b); + fprintf(ctxcanvas->file, "%d %d %d %d\n", CDMF_BACKGROUND, (int)r, (int)g, (int)b); + return color; +} + +static long cdforeground(cdCtxCanvas *ctxcanvas, long int color) +{ + unsigned char r, g, b; + cdDecodeColor(color, &r, &g, &b); + fprintf(ctxcanvas->file, "%d %d %d %d\n", CDMF_FOREGROUND, (int)r, (int)g, (int)b); + return color; +} + +static void cdputimagerectrgb(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int c, l, offset; + + fprintf(ctxcanvas->file, "%d %d %d %d %d %d %d\n", CDMF_PUTIMAGERGB, iw, ih, x, y, w, h); + + offset = ymin*iw + xmin; + r += offset; + g += offset; + b += offset; + + offset = iw - (xmax-xmin+1); + + for (l = ymin; l <= ymax; l++) + { + for (c = xmin; c <= xmax; c++) + { + fprintf(ctxcanvas->file, "%d %d %d ", (int)*r++, (int)*g++, (int)*b++); + } + + r += offset; + g += offset; + b += offset; + + fprintf(ctxcanvas->file, "\n"); + } +} + +static void cdputimagerectrgba(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int c, l, offset; + + fprintf(ctxcanvas->file, "%d %d %d %d %d %d %d\n", CDMF_PUTIMAGERGBA, iw, ih, x, y, w, h); + + offset = ymin*iw + xmin; + r += offset; + g += offset; + b += offset; + a += offset; + + offset = iw - (xmax-xmin+1); + + for (l = ymin; l <= ymax; l++) + { + for (c = xmin; c <= xmax; c++) + { + fprintf(ctxcanvas->file, "%d %d %d %d ", (int)*r++, (int)*g++, (int)*b++, (int)*a++); + } + + r += offset; + g += offset; + b += offset; + a += offset; + + fprintf(ctxcanvas->file, "\n"); + } +} + +static void cdputimagerectmap(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int c, l, n = 0, offset; + unsigned char r, g, b; + + fprintf(ctxcanvas->file, "%d %d %d %d %d %d %d\n", CDMF_PUTIMAGEMAP, iw, ih, x, y, w, h); + + index += ymin*iw + xmin; + offset = iw - (xmax-xmin+1); + + for (l = ymin; l <= ymax; l++) + { + for (c = xmin; c <= xmax; c++) + { + if (*index > n) + n = *index; + + fprintf(ctxcanvas->file, "%d ", (int)*index++); + } + + index += offset; + + fprintf(ctxcanvas->file, "\n"); + } + + n++; + + for (c = 0; c < n; c++) + { + cdDecodeColor(*colors++, &r, &g, &b); + fprintf(ctxcanvas->file, "%d %d %d\n", (int)r, (int)g, (int)b); + } +} + +static void cdpixel(cdCtxCanvas *ctxcanvas, int x, int y, long int color) +{ + unsigned char r, g, b; + cdDecodeColor(color, &r, &g, &b); + fprintf(ctxcanvas->file, "%d %d %d %d %d %d\n", CDMF_PIXEL, x, y, (int)r, (int)g, (int)b); +} + +static void cdscrollarea(cdCtxCanvas *ctxcanvas, int xmin,int xmax, int ymin,int ymax, int dx,int dy) +{ + fprintf(ctxcanvas->file, "%d %d %d %d %d %d %d\n", CDMF_SCROLLAREA, xmin, xmax, ymin, ymax, dx, dy); +} + + +/**********/ +/* cdPlay */ +/**********/ + + +static double factorX = 1; +static double factorY = 1; +static int offsetX = 0; +static int offsetY = 0; +static double factorS = 1; + +static int sScaleX(int x) +{ + return cdRound(x * factorX + offsetX); +} + +static int sScaleY(int y) +{ + return cdRound(y * factorY + offsetY); +} + +static double sfScaleX(double x) +{ + return x * factorX + offsetX; +} + +static double sfScaleY(double y) +{ + return y * factorY + offsetY; +} + +static int sScaleW(int w) +{ + w = (int)(w * factorX + 0.5); /* always positive */ + return w == 0? 1: w; +} + +static double sfScaleH(double h) +{ + h = h * factorY; + return h == 0? 1: h; +} + +static double sfScaleW(double w) +{ + w = w * factorX; /* always positive */ + return w == 0? 1: w; +} + +static int sScaleH(int h) +{ + h = (int)(h * factorY + 0.5); + return h == 0? 1: h; +} + +static int sScaleS(int s) +{ + s = (int)(s * factorS + 0.5); + return s == 0? 1: s; +} + +typedef int(*_cdsizecb)(cdCanvas* canvas, int w, int h, double w_mm, double h_mm); +static _cdsizecb cdsizecb = NULL; + +static int cdregistercallback(int cb, cdCallback func) +{ + switch (cb) + { + case CD_SIZECB: + cdsizecb = (_cdsizecb)func; + return CD_OK; + } + + return CD_ERROR; +} + +static int cdplay(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data) +{ + char* filename = (char*)data; + FILE* file; + char TextBuffer[512]; + int iparam1, iparam2, iparam3, iparam4, iparam5, iparam6, iparam7, iparam8, iparam9, iparam10; + int c, t, n, w, h, func; + double dparam1, dparam2, dparam3, dparam4, dparam5, dparam6; + unsigned char* stipple, * _stipple, *red, *green, *blue, *_red, *_green, *_blue, *index, *_index, *_alpha, *alpha; + long int *pattern, *palette, *_pattern, *_palette, *colors, *_colors; + int* dashes; + double matrix[6]; + const char * font_family[] = + { + "System", /* CD_SYSTEM */ + "Courier", /* CD_COURIER */ + "Times", /* CD_TIMES_ROMAN */ + "Helvetica" /* CD_HELVETICA */ + }; + + file = fopen(filename, "r"); + if (!file) + return CD_ERROR; + + func = -1; + w = 0; + h = 0; + + factorX = 1; + factorY = 1; + offsetX = 0; + offsetY = 0; + factorS = 1; + + fscanf(file, "%s %d %d", TextBuffer, &w, &h); + + if (strcmp(TextBuffer, "CDMF") != 0) + { + fclose(file); + return CD_ERROR; + } + + if (w>1 && h>1 && xmax!=0 && ymax!=0) + { + offsetX = xmin; + offsetY = ymin; + factorX = ((double)(xmax-xmin)) / (w-1); + factorY = ((double)(ymax-ymin)) / (h-1); + + if (factorX < factorY) + factorS = factorX; + else + factorS = factorY; + } + + if (cdsizecb) + { + int err; + err = cdsizecb(canvas, w, h, w, h); + if (err) + return CD_ERROR; + } + + while (!feof(file)) + { + fscanf(file, "%d", &func); + if (feof(file)) + break; + + switch (func) + { + case CDMF_FLUSH: + cdCanvasFlush(canvas); + break; + case CDMF_CLEAR: + cdCanvasClear(canvas); + break; + case CDMF_CLIP: + fscanf(file, "%d", &iparam1); + cdCanvasClip(canvas, iparam1); + break; + case CDMF_CLIPAREA: + fscanf(file, "%d %d %d %d", &iparam1, &iparam2, &iparam3, &iparam4); + cdCanvasClipArea(canvas, sScaleX(iparam1), sScaleX(iparam2), sScaleY(iparam3), sScaleY(iparam4)); + break; + case CDMF_FCLIPAREA: + fscanf(file, "%lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4); + cdfCanvasClipArea(canvas, sfScaleX(dparam1), sfScaleX(dparam2), sfScaleY(dparam3), sfScaleY(dparam4)); + break; + case CDMF_MATRIX: + fscanf(file, "%lg %lg %lg %lg %lg %lg", &matrix[0], &matrix[1], &matrix[2], &matrix[3], &matrix[4], &matrix[5]); + cdCanvasTransform(canvas, matrix); + break; + case CDMF_RESETMATRIX: + cdCanvasTransform(canvas, NULL); + break; + case CDMF_WCLIPAREA: + fscanf(file, "%lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4); + wdCanvasClipArea(canvas, dparam1, dparam2, dparam3, dparam4); + break; + case CDMF_LINE: + fscanf(file, "%d %d %d %d", &iparam1, &iparam2, &iparam3, &iparam4); + cdCanvasLine(canvas, sScaleX(iparam1), sScaleY(iparam2), sScaleX(iparam3), sScaleY(iparam4)); + break; + case CDMF_FLINE: + fscanf(file, "%lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4); + cdfCanvasLine(canvas, sfScaleX(dparam1), sfScaleY(dparam2), sfScaleX(dparam3), sfScaleY(dparam4)); + break; + case CDMF_WLINE: + fscanf(file, "%lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4); + wdCanvasLine(canvas, dparam1, dparam2, dparam3, dparam4); + break; + case CDMF_RECT: + fscanf(file, "%d %d %d %d", &iparam1, &iparam2, &iparam3, &iparam4); + cdCanvasRect(canvas, sScaleX(iparam1), sScaleX(iparam2), sScaleY(iparam3), sScaleY(iparam4)); + break; + case CDMF_FRECT: + fscanf(file, "%lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4); + cdfCanvasRect(canvas, sfScaleX(dparam1), sfScaleX(dparam2), sfScaleY(dparam3), sfScaleY(dparam4)); + break; + case CDMF_WRECT: + fscanf(file, "%lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4); + wdCanvasRect(canvas, dparam1, dparam2, dparam3, dparam4); + break; + case CDMF_BOX: + fscanf(file, "%d %d %d %d", &iparam1, &iparam2, &iparam3, &iparam4); + cdCanvasBox(canvas, sScaleX(iparam1), sScaleX(iparam2), sScaleY(iparam3), sScaleY(iparam4)); + break; + case CDMF_WBOX: + fscanf(file, "%lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4); + wdCanvasBox(canvas, dparam1, dparam2, dparam3, dparam4); + break; + case CDMF_FBOX: + fscanf(file, "%lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4); + cdfCanvasBox(canvas, sfScaleX(dparam1), sfScaleX(dparam2), sfScaleY(dparam3), sfScaleY(dparam4)); + break; + case CDMF_ARC: + fscanf(file, "%d %d %d %d %lg %lg", &iparam1, &iparam2, &iparam3, &iparam4, &dparam1, &dparam2); + cdCanvasArc(canvas, sScaleX(iparam1), sScaleY(iparam2), sScaleW(iparam3), sScaleH(iparam4), dparam1, dparam2); + break; + case CDMF_FARC: + fscanf(file, "%lg %lg %lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4, &dparam5, &dparam6); + cdfCanvasArc(canvas, sfScaleX(dparam1), sfScaleY(dparam2), sfScaleW(dparam3), sfScaleH(dparam4), dparam5, dparam6); + break; + case CDMF_WARC: + fscanf(file, "%lg %lg %lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4, &dparam5, &dparam6); + wdCanvasArc(canvas, dparam1, dparam2, dparam3, dparam4, dparam5, dparam6); + break; + case CDMF_SECTOR: + fscanf(file, "%d %d %d %d %lg %lg", &iparam1, &iparam2, &iparam3, &iparam4, &dparam1, &dparam2); + cdCanvasSector(canvas, sScaleX(iparam1), sScaleY(iparam2), sScaleW(iparam3), sScaleH(iparam4), dparam1, dparam2); + break; + case CDMF_FSECTOR: + fscanf(file, "%lg %lg %lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4, &dparam5, &dparam6); + cdfCanvasSector(canvas, sfScaleX(dparam1), sfScaleY(dparam2), sfScaleW(dparam3), sfScaleH(dparam4), dparam5, dparam6); + break; + case CDMF_WSECTOR: + fscanf(file, "%lg %lg %lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4, &dparam5, &dparam6); + wdCanvasSector(canvas, dparam1, dparam2, dparam3, dparam4, dparam5, dparam6); + break; + case CDMF_CHORD: + fscanf(file, "%d %d %d %d %lg %lg", &iparam1, &iparam2, &iparam3, &iparam4, &dparam1, &dparam2); + cdCanvasChord(canvas, sScaleX(iparam1), sScaleY(iparam2), sScaleW(iparam3), sScaleH(iparam4), dparam1, dparam2); + break; + case CDMF_FCHORD: + fscanf(file, "%lg %lg %lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4, &dparam5, &dparam6); + cdfCanvasChord(canvas, sfScaleX(dparam1), sfScaleY(dparam2), sfScaleW(dparam3), sfScaleH(dparam4), dparam5, dparam6); + break; + case CDMF_WCHORD: + fscanf(file, "%lg %lg %lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4, &dparam5, &dparam6); + wdCanvasChord(canvas, dparam1, dparam2, dparam3, dparam4, dparam5, dparam6); + break; + case CDMF_TEXT: + fscanf(file, "%d %d %[^\n]", &iparam1, &iparam2, TextBuffer); + cdCanvasText(canvas, sScaleX(iparam1), sScaleY(iparam2), TextBuffer); + break; + case CDMF_FTEXT: + fscanf(file, "%lg %lg %[^\n]", &dparam1, &dparam2, TextBuffer); + cdfCanvasText(canvas, sfScaleX(dparam1), sfScaleY(dparam2), TextBuffer); + break; + case CDMF_WTEXT: + fscanf(file, "%lg %lg %[^\n]", &dparam1, &dparam2, TextBuffer); + wdCanvasText(canvas, dparam1, dparam2, TextBuffer); + break; + case CDMF_BEGIN: + fscanf(file, "%d", &iparam1); + cdCanvasBegin(canvas, iparam1); + break; + case CDMF_VERTEX: + fscanf(file, "%d %d", &iparam1, &iparam2); + cdCanvasVertex(canvas, sScaleX(iparam1), sScaleY(iparam2)); + break; + case CDMF_FVERTEX: + fscanf(file, "%lg %lg", &dparam1, &dparam2); + cdfCanvasVertex(canvas, sfScaleX(dparam1), sfScaleY(dparam2)); + break; + case CDMF_WVERTEX: + fscanf(file, "%lg %lg", &dparam1, &dparam2); + wdCanvasVertex(canvas, dparam1, dparam2); + break; + case CDMF_END: + cdCanvasEnd(canvas); + break; + case CDMF_MARK: + fscanf(file, "%d %d", &iparam1, &iparam2); + cdCanvasMark(canvas, sScaleX(iparam1), sScaleY(iparam2)); + break; + case CDMF_WMARK: + fscanf(file, "%lg %lg", &dparam1, &dparam2); + wdCanvasMark(canvas, dparam1, dparam2); + break; + case CDMF_BACKOPACITY: + fscanf(file, "%d", &iparam1); + cdCanvasBackOpacity(canvas, iparam1); + break; + case CDMF_WRITEMODE: + fscanf(file, "%d", &iparam1); + cdCanvasWriteMode(canvas, iparam1); + break; + case CDMF_LINESTYLE: + fscanf(file, "%d", &iparam1); + cdCanvasLineStyle(canvas, iparam1); + break; + case CDMF_LINEWIDTH: + fscanf(file, "%d", &iparam1); + cdCanvasLineWidth(canvas, sScaleS(iparam1)); + break; + case CDMF_LINECAP: + fscanf(file, "%d", &iparam1); + cdCanvasLineCap(canvas, iparam1); + break; + case CDMF_LINEJOIN: + fscanf(file, "%d", &iparam1); + cdCanvasLineJoin(canvas, iparam1); + break; + case CDMF_LINESTYLEDASHES: + fscanf(file, "%d", &iparam1); + dashes = (int*)malloc(iparam1*sizeof(int)); + for (c = 0; c < iparam1; c++) + fscanf(file, "%d", &dashes[c]); + cdCanvasLineStyleDashes(canvas, dashes, iparam1); + free(dashes); + break; + case CDMF_FILLMODE: + fscanf(file, "%d", &iparam1); + cdCanvasFillMode(canvas, iparam1); + break; + case CDMF_INTERIORSTYLE: + fscanf(file, "%d", &iparam1); + cdCanvasInteriorStyle(canvas, iparam1); + break; + case CDMF_HATCH: + fscanf(file, "%d", &iparam1); + cdCanvasHatch(canvas, iparam1); + break; + case CDMF_STIPPLE: + fscanf(file, "%d %d", &iparam1, &iparam2); + t = iparam1 * iparam2; + stipple = (unsigned char*)malloc(t); + _stipple = stipple; + for (c = 0; c < t; c++) + { + fscanf(file, "%d", &iparam3); + *_stipple++ = (unsigned char)iparam3; + } + cdCanvasStipple(canvas, iparam1, iparam2, stipple); + free(stipple); + break; + case CDMF_PATTERN: + fscanf(file, "%d %d", &iparam1, &iparam2); + t = iparam1 * iparam2; + pattern = (long int*)malloc(t * sizeof(long)); + _pattern = pattern; + for (c = 0; c < t; c++) + { + fscanf(file, "%d %d %d", &iparam3, &iparam4, &iparam5); + *_pattern++ = cdEncodeColor((unsigned char)iparam3, (unsigned char)iparam4, (unsigned char)iparam5); + } + cdCanvasPattern(canvas, iparam1, iparam2, pattern); + free(pattern); + break; + case CDMF_OLDFONT: + fscanf(file, "%d %d %d", &iparam1, &iparam2, &iparam3); + if (iparam1 < 0 || iparam1 > 3) break; + if (iparam3 < 0) + { + iparam3 = -sScaleH(abs(iparam3)); + if (iparam3 > -5) iparam3 = -5; + } + else + { + iparam3 = sScaleH(abs(iparam3)); + if (iparam3 < 5) iparam3 = 5; + } + cdCanvasFont(canvas, font_family[iparam1], iparam2, iparam3); + break; + case CDMF_FONT: + fscanf(file, "%d %d %[^\n]", &iparam2, &iparam3, TextBuffer); + if (iparam3 < 0) + { + iparam3 = -sScaleH(abs(iparam3)); + if (iparam3 > -5) iparam3 = -5; + } + else + { + iparam3 = sScaleH(abs(iparam3)); + if (iparam3 < 5) iparam3 = 5; + } + cdCanvasFont(canvas, TextBuffer, iparam2, iparam3); + break; + case CDMF_NATIVEFONT: + fscanf(file, "%[^\n]", TextBuffer); + cdCanvasNativeFont(canvas, TextBuffer); + break; + case CDMF_TEXTALIGNMENT: + fscanf(file, "%d", &iparam1); + cdCanvasTextAlignment(canvas, iparam1); + break; + case CDMF_TEXTORIENTATION: + fscanf(file, "%lg", &dparam1); + cdCanvasTextOrientation(canvas, dparam1); + break; + case CDMF_MARKTYPE: + fscanf(file, "%d", &iparam1); + cdCanvasMarkType(canvas, iparam1); + break; + case CDMF_MARKSIZE: + fscanf(file, "%d", &iparam1); + cdCanvasMarkSize(canvas, sScaleS(iparam1)); + break; + case CDMF_PALETTE: + fscanf(file, "%d %d", &iparam1, &iparam2); + _palette = palette = (long int*)malloc(iparam1); + for (c = 0; c < iparam1; c++) + { + fscanf(file, "%d %d %d", &iparam3, &iparam4, &iparam5); + *_palette++ = cdEncodeColor((unsigned char)iparam3, (unsigned char)iparam4, (unsigned char)iparam5); + } + cdCanvasPalette(canvas, iparam1, palette, iparam2); + free(palette); + break; + case CDMF_BACKGROUND: + fscanf(file, "%d %d %d", &iparam1, &iparam2, &iparam3); + cdCanvasSetBackground(canvas, cdEncodeColor((unsigned char)iparam1, (unsigned char)iparam2, (unsigned char)iparam3)); + break; + case CDMF_FOREGROUND: + fscanf(file, "%d %d %d", &iparam1, &iparam2, &iparam3); + cdCanvasSetForeground(canvas, cdEncodeColor((unsigned char)iparam1, (unsigned char)iparam2, (unsigned char)iparam3)); + break; + case CDMF_PUTIMAGERGB: + fscanf(file, "%d %d %d %d %d %d", &iparam1, &iparam2, &iparam3, &iparam4, &iparam5, &iparam6); + t = iparam1 * iparam2; + _red = red = (unsigned char*) malloc(t); + _green = green = (unsigned char*) malloc(t); + _blue = blue = (unsigned char*) malloc(t); + for (c = 0; c < t; c++) + { + fscanf(file, "%d %d %d", &iparam7, &iparam8, &iparam9); + *_red++ = (unsigned char)iparam7; + *_green++ = (unsigned char)iparam8; + *_blue++ = (unsigned char)iparam9; + } + cdCanvasPutImageRectRGB(canvas, iparam1, iparam2, red, green, blue, sScaleX(iparam3), sScaleY(iparam4), sScaleW(iparam5), sScaleH(iparam6), 0, 0, 0, 0); + free(red); + free(green); + free(blue); + break; + case CDMF_PUTIMAGERGBA: + fscanf(file, "%d %d %d %d %d %d", &iparam1, &iparam2, &iparam3, &iparam4, &iparam5, &iparam6); + t = iparam1 * iparam2; + _red = red = (unsigned char*) malloc(t); + _green = green = (unsigned char*) malloc(t); + _blue = blue = (unsigned char*) malloc(t); + _alpha = alpha = (unsigned char*) malloc(t); + for (c = 0; c < t; c++) + { + fscanf(file, "%d %d %d %d", &iparam7, &iparam8, &iparam9, &iparam10); + *_red++ = (unsigned char)iparam7; + *_green++ = (unsigned char)iparam8; + *_blue++ = (unsigned char)iparam9; + *_alpha++ = (unsigned char)iparam10; + } + cdCanvasPutImageRectRGBA(canvas, iparam1, iparam2, red, green, blue, alpha, sScaleX(iparam3), sScaleY(iparam4), sScaleW(iparam5), sScaleH(iparam6), 0, 0, 0, 0); + free(red); + free(green); + free(blue); + free(alpha); + break; + case CDMF_PUTIMAGEMAP: + fscanf(file, "%d %d %d %d %d %d", &iparam1, &iparam2, &iparam3, &iparam4, &iparam5, &iparam6); + t = iparam1 * iparam2; + n = 0; + _index = index = (unsigned char*) malloc(t); + for (c = 0; c < t; c++) + { + fscanf(file, "%d", &iparam7); + *_index++ = (unsigned char)iparam7; + if (iparam7 > n) + n = iparam7; + } + _colors = colors = (long int*)malloc(n); + for (c = 0; c < n; c++) + { + fscanf(file, "%d %d %d", &iparam7, &iparam8, &iparam9); + *_colors++ = cdEncodeColor((unsigned char)iparam7, (unsigned char)iparam8, (unsigned char)iparam9); + } + cdCanvasPutImageRectMap(canvas, iparam1, iparam2, index, colors, sScaleX(iparam3), sScaleY(iparam4), sScaleW(iparam5), sScaleH(iparam6), 0, 0, 0, 0); + free(index); + free(colors); + break; + case CDMF_PIXEL: + fscanf(file, "%d %d %d %d %d", &iparam1, &iparam2, &iparam3, &iparam4, &iparam5); + cdCanvasPixel(canvas, sScaleX(iparam1), sScaleY(iparam2), cdEncodeColor((unsigned char)iparam3, (unsigned char)iparam4, (unsigned char)iparam5)); + break; + case CDMF_SCROLLAREA: + fscanf(file, "%d %d %d %d %d %d", &iparam1, &iparam2, &iparam3, &iparam4, &iparam5, &iparam6); + cdCanvasScrollArea(canvas, sScaleX(iparam1), sScaleX(iparam2), sScaleY(iparam3), sScaleY(iparam4), sScaleX(iparam5), sScaleY(iparam6)); + break; + case CDMF_WVECTORTEXT: + fscanf(file, "%lg %lg %[^\n]", &dparam1, &dparam2, TextBuffer); + wdCanvasVectorText(canvas, dparam1, dparam2, TextBuffer); + break; + case CDMF_WMULTILINEVECTORTEXT: + fscanf(file, "%lg %lg %[^\n]", &dparam1, &dparam2, TextBuffer); + wdCanvasVectorText(canvas, dparam1, dparam2, TextBuffer); + break; + case CDMF_VECTORTEXT: + fscanf(file, "%d %d %[^\n]", &iparam1, &iparam2, TextBuffer); + cdCanvasVectorText(canvas, iparam1, iparam2, TextBuffer); + break; + case CDMF_MULTILINEVECTORTEXT: + fscanf(file, "%d %d %[^\n]", &iparam1, &iparam2, TextBuffer); + cdCanvasVectorText(canvas, iparam1, iparam2, TextBuffer); + break; + case CDMF_WVECTORCHARSIZE: + fscanf(file, "%lg", &dparam1); + wdCanvasVectorCharSize(canvas, dparam1); + break; + case CDMF_WVECTORTEXTSIZE: + fscanf(file, "%lg %lg %[^\n]", &dparam1, &dparam2, TextBuffer); + wdCanvasVectorTextSize(canvas, dparam1, dparam2, TextBuffer); + break; + case CDMF_WVECTORTEXTDIRECTION: + fscanf(file, "%lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4); + wdCanvasVectorTextDirection(canvas, dparam1, dparam2, dparam3, dparam4); + break; + case CDMF_VECTORCHARSIZE: + fscanf(file, "%d", &iparam1); + cdCanvasVectorCharSize(canvas, iparam1); + break; + case CDMF_VECTORTEXTSIZE: + fscanf(file, "%d %d %[^\n]", &iparam1, &iparam2, TextBuffer); + cdCanvasVectorTextSize(canvas, iparam1, iparam2, TextBuffer); + break; + case CDMF_VECTORTEXTDIRECTION: + fscanf(file, "%d %d %d %d", &iparam1, &iparam2, &iparam3, &iparam4); + cdCanvasVectorTextDirection(canvas, iparam1, iparam2, iparam3, iparam4); + break; + case CDMF_VECTORFONT: + fscanf(file, "%[^\n]", TextBuffer); + cdCanvasVectorFont(canvas, TextBuffer); + break; + case CDMF_VECTORTEXTTRANSFORM: + fscanf(file, "%lg %lg %lg %lg %lg %lg", &matrix[0], &matrix[1], &matrix[2], &matrix[3], &matrix[4], &matrix[5]); + cdCanvasVectorTextTransform(canvas, matrix); + break; + case CDMF_WINDOW: + fscanf(file, "%lg %lg %lg %lg", &dparam1, &dparam2, &dparam3, &dparam4); + wdCanvasWindow(canvas, dparam1, dparam2, dparam3, dparam4); + break; + default: + fclose(file); + return CD_ERROR; + } + } + + fclose(file); + + return CD_OK; +} + +/*******************/ +/* Canvas Creation */ +/*******************/ + +void cdcreatecanvasMF(cdCanvas *canvas, void *data) +{ + char filename[10240] = ""; + char* strdata = (char*)data; + double w_mm = INT_MAX*3.78, h_mm = INT_MAX*3.78, res = 3.78; + cdCtxCanvas* ctxcanvas; + int size; + + strdata += cdGetFileName(strdata, filename); + if (filename[0] == 0) + return; + + sscanf(strdata, "%lgx%lg %lg", &w_mm, &h_mm, &res); + + ctxcanvas = (cdCtxCanvas *)malloc(sizeof(cdCtxCanvas)); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + + ctxcanvas->file = fopen(filename, "w"); + if (!ctxcanvas->file) + { + free(ctxcanvas); + return; + } + + size = strlen(filename); + ctxcanvas->filename = malloc(size+1); + memcpy(ctxcanvas->filename, filename, size+1); + + ctxcanvas->canvas = canvas; + + /* update canvas context */ + canvas->w = (int)(w_mm * res); + canvas->h = (int)(h_mm * res); + canvas->w_mm = w_mm; + canvas->h_mm = h_mm; + canvas->bpp = 24; + canvas->xres = res; + canvas->yres = res; + canvas->ctxcanvas = ctxcanvas; + + ctxcanvas->last_line_style = -1; + ctxcanvas->last_fill_mode = -1; + + fprintf(ctxcanvas->file, "CDMF %d %d\n", canvas->w, canvas->h); +} + +void cdinittableMF(cdCanvas* canvas) +{ + canvas->cxFlush = cdflush; + canvas->cxClear = cdclear; + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxPoly = cdpoly; + canvas->cxRect = cdrect; + canvas->cxBox = cdbox; + canvas->cxArc = cdarc; + canvas->cxSector = cdsector; + canvas->cxChord = cdchord; + canvas->cxText = cdtext; + canvas->cxPutImageRectRGB = cdputimagerectrgb; + canvas->cxPutImageRectRGBA = cdputimagerectrgba; + canvas->cxPutImageRectMap = cdputimagerectmap; + canvas->cxScrollArea = cdscrollarea; + canvas->cxFLine = cdfline; + canvas->cxFPoly = cdfpoly; + canvas->cxFRect = cdfrect; + canvas->cxFBox = cdfbox; + canvas->cxFArc = cdfarc; + canvas->cxFSector = cdfsector; + canvas->cxFChord = cdfchord; + canvas->cxFText = cdftext; + canvas->cxClip = cdclip; + canvas->cxClipArea = cdcliparea; + canvas->cxBackOpacity = cdbackopacity; + canvas->cxWriteMode = cdwritemode; + canvas->cxLineStyle = cdlinestyle; + canvas->cxLineWidth = cdlinewidth; + canvas->cxLineCap = cdlinecap; + canvas->cxLineJoin = cdlinejoin; + canvas->cxInteriorStyle = cdinteriorstyle; + canvas->cxHatch = cdhatch; + canvas->cxStipple = cdstipple; + canvas->cxPattern = cdpattern; + canvas->cxFont = cdfont; + canvas->cxNativeFont = cdnativefont; + canvas->cxTextAlignment = cdtextalignment; + canvas->cxTextOrientation = cdtextorientation; + canvas->cxPalette = cdpalette; + canvas->cxBackground = cdbackground; + canvas->cxForeground = cdforeground; + canvas->cxFClipArea = cdfcliparea; + canvas->cxTransform = cdtransform; + + canvas->cxKillCanvas = (void (*)(cdCtxCanvas*))cdkillcanvasMF; +} + +static cdContext cdMetafileContext = +{ + CD_CAP_ALL & ~(CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | + CD_CAP_REGION | CD_CAP_FONTDIM | CD_CAP_TEXTSIZE), + 0, + cdcreatecanvasMF, + cdinittableMF, + cdplay, + cdregistercallback, +}; + +cdContext* cdContextMetafile(void) +{ + return &cdMetafileContext; +} diff --git a/cd/src/drv/cdpdf.c b/cd/src/drv/cdpdf.c new file mode 100755 index 0000000..79ce28f --- /dev/null +++ b/cd/src/drv/cdpdf.c @@ -0,0 +1,1491 @@ +/** \file + * \brief PDF Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" +#include "cdpdf.h" + +#include "pdflib.h" + + +/* +** dada uma cor do CD, obtem uma de suas componentes, na faixa 0-1. +*/ +#define get_red(_) (((double)cdRed(_))/255.) +#define get_green(_) (((double)cdGreen(_))/255.) +#define get_blue(_) (((double)cdBlue(_))/255.) + +struct _cdCtxCanvas +{ + cdCanvas* canvas; + + PDF *pdf; /* Arquivo PDF */ + int res; /* Resolucao - DPI */ + int pages; /* Numero total de paginas */ + double width_pt; /* Largura do papel (points) */ + double height_pt; /* Altura do papel (points) */ + double width_mm; /* Largura do papel (mm) */ + double height_mm; /* Altura do papel (mm) */ + double scale; /* Fator de conversao de coordenadas (pixel2points) */ + int landscape; /* page orientation */ + float rotate_angle; + int rotate_center_x, + rotate_center_y; + + int font; + int underline; + int strikeover; + + int hatchboxsize; + int pattern; + int opacity; + int opacity_states[256]; + + int poly_holes[500]; + int holes; +}; + + +/* +%F Ajusta o tamanho do papel em points. +*/ +static void setpdfpapersize(cdCtxCanvas* ctxcanvas, int size) +{ + static struct + { + int width; + int height; + } paper[] = + { + { 2393, 3391 }, /* A0 */ + { 1689, 2393 }, /* A1 */ + { 1192, 1689 }, /* A2 */ + { 842, 1192 }, /* A3 */ + { 595, 842 }, /* A4 */ + { 420, 595 }, /* A5 */ + { 612, 792 }, /* LETTER */ + { 612, 1008 } /* LEGAL */ + }; + + if (sizeCD_LEGAL) + return; + + ctxcanvas->width_pt = paper[size].width; + ctxcanvas->height_pt = paper[size].height; + ctxcanvas->width_mm = ctxcanvas->width_pt/CD_MM2PT; + ctxcanvas->height_mm = ctxcanvas->height_pt/CD_MM2PT; +} + +/* +%F Registra os valores default para impressao. +*/ +static void setpdfdefaultvalues(cdCtxCanvas* ctxcanvas) +{ + int i; + + /* all the other values are set to 0 */ + setpdfpapersize(ctxcanvas, CD_A4); + ctxcanvas->res = 300; + ctxcanvas->hatchboxsize = 8; + ctxcanvas->opacity = 255; /* full opaque */ + + for (i=0; i<256; i++) + ctxcanvas->opacity_states[i] = -1; +} + +static void update_state(cdCtxCanvas *ctxcanvas) +{ + cdCanvas* canvas = ctxcanvas->canvas; + + if (!canvas->cxFont) /* just check if the first time */ + return; + + /* must set the current transform and line style if different from the default */ + + if (canvas->line_style != CD_CONTINUOUS) + canvas->cxLineStyle(ctxcanvas, canvas->line_style); + if (canvas->line_width != 1) + canvas->cxLineWidth(ctxcanvas, canvas->line_width); + if (canvas->line_cap != CD_CAPFLAT) + canvas->cxLineCap(ctxcanvas, canvas->line_cap); + if (canvas->line_join != CD_MITER) + canvas->cxLineJoin(ctxcanvas, canvas->line_join); + if (canvas->use_matrix) + canvas->cxTransform(ctxcanvas, canvas->matrix); + canvas->cxFont(ctxcanvas, canvas->font_type_face, canvas->font_style, canvas->font_size); +} + +static void begin_page(cdCtxCanvas *ctxcanvas) +{ + PDF_begin_page_ext(ctxcanvas->pdf, ctxcanvas->width_pt, ctxcanvas->height_pt, ""); + + /* default coordinate system is in points, change it to pixels. */ + PDF_scale(ctxcanvas->pdf, ctxcanvas->scale, ctxcanvas->scale); + + PDF_save(ctxcanvas->pdf); /* save the initial configuration, to be used when clipping is reset. */ + + update_state(ctxcanvas); +} + +static void init_pdf(cdCtxCanvas *ctxcanvas) +{ + ctxcanvas->scale = 72.0/ctxcanvas->res; + + /* Converte p/ unidades do usuario */ + ctxcanvas->canvas->w = (int)(ctxcanvas->width_pt/ctxcanvas->scale + 0.5); + ctxcanvas->canvas->h = (int)(ctxcanvas->height_pt/ctxcanvas->scale + 0.5); + + /* Passa o valor em milimetros para o canvas CD */ + ctxcanvas->canvas->w_mm = ctxcanvas->width_mm; + ctxcanvas->canvas->h_mm = ctxcanvas->height_mm; + + ctxcanvas->canvas->bpp = 24; + ctxcanvas->canvas->xres = ctxcanvas->canvas->w / ctxcanvas->canvas->w_mm; + ctxcanvas->canvas->yres = ctxcanvas->canvas->h / ctxcanvas->canvas->h_mm; + + begin_page(ctxcanvas); +} + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + PDF_restore(ctxcanvas->pdf); /* restore to match the save of the initial configuration. */ + PDF_end_page_ext(ctxcanvas->pdf, ""); + PDF_end_document(ctxcanvas->pdf, ""); + PDF_delete(ctxcanvas->pdf); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +static void update_fill(cdCtxCanvas *ctxcanvas, int fill) +{ + if (fill == 0) + { + /* called before a NON filled primitive */ + PDF_setcolor(ctxcanvas->pdf, "stroke", "rgb", get_red(ctxcanvas->canvas->foreground), + get_green(ctxcanvas->canvas->foreground), + get_blue(ctxcanvas->canvas->foreground), 0); + + } + else + { + /* called before a filled primitive */ + if (ctxcanvas->canvas->interior_style == CD_SOLID) + { + PDF_setcolor(ctxcanvas->pdf, "fill", "rgb", get_red(ctxcanvas->canvas->foreground), + get_green(ctxcanvas->canvas->foreground), + get_blue(ctxcanvas->canvas->foreground), 0); + } + else + PDF_setcolor(ctxcanvas->pdf, "fill", "pattern", (float)ctxcanvas->pattern, 0, 0, 0); + } +} + +/* +%F Comeca uma nova pagina. +*/ +static void cdflush(cdCtxCanvas *ctxcanvas) +{ + PDF_restore(ctxcanvas->pdf); /* restore to match the save of the initial configuration */ + + PDF_end_page_ext(ctxcanvas->pdf, ""); + + begin_page(ctxcanvas); +} + + +/******************************************************/ +/* coordinate transformation */ +/******************************************************/ + +static void resetcliprect(cdCtxCanvas* ctxcanvas) +{ + /* clipping is reset, by restoring the initial state */ + /* this will also reset the current transformation and line style */ + PDF_restore(ctxcanvas->pdf); + PDF_save(ctxcanvas->pdf); + + update_state(ctxcanvas); +} + +static void setcliprect(cdCtxCanvas* ctxcanvas, double xmin, double ymin, double xmax, double ymax) +{ + resetcliprect(ctxcanvas); + + PDF_moveto(ctxcanvas->pdf, xmin, ymin); + PDF_lineto(ctxcanvas->pdf, xmax, ymin); + PDF_lineto(ctxcanvas->pdf, xmax, ymax); + PDF_lineto(ctxcanvas->pdf, xmin, ymax); + + PDF_clip(ctxcanvas->pdf); +} + +static void cdfcliparea(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + if (ctxcanvas->canvas->clip_mode != CD_CLIPAREA) + return; + + setcliprect(ctxcanvas, xmin, ymin, xmax, ymax); +} + +static void cdcliparea(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + cdfcliparea(ctxcanvas, (double)xmin, (double)xmax, (double)ymin, (double)ymax); +} + +static int cdclip(cdCtxCanvas *ctxcanvas, int mode) +{ + if (mode == CD_CLIPAREA) + { + ctxcanvas->canvas->clip_mode = CD_CLIPAREA; + + setcliprect(ctxcanvas, (double)ctxcanvas->canvas->clip_rect.xmin, + (double)ctxcanvas->canvas->clip_rect.ymin, + (double)ctxcanvas->canvas->clip_rect.xmax, + (double)ctxcanvas->canvas->clip_rect.ymax); + } + else if (mode == CD_CLIPPOLYGON) + { + int hole_index = 0; + int i; + + resetcliprect(ctxcanvas); + + if (ctxcanvas->canvas->clip_poly) + { + cdPoint *poly = ctxcanvas->canvas->clip_poly; + + PDF_moveto(ctxcanvas->pdf, poly[0].x, poly[0].y); + + for (i=1; icanvas->clip_poly_n; i++) + { + if (ctxcanvas->holes && i == ctxcanvas->poly_holes[hole_index]) + { + PDF_moveto(ctxcanvas->pdf, poly[i].x, poly[i].y); + hole_index++; + } + else + PDF_lineto(ctxcanvas->pdf, poly[i].x, poly[i].y); + } + } + else if (ctxcanvas->canvas->clip_fpoly) + { + cdfPoint *poly = ctxcanvas->canvas->clip_fpoly; + + PDF_moveto(ctxcanvas->pdf, poly[0].x, poly[0].y); + + for (i=1; icanvas->clip_poly_n; i++) + { + if (ctxcanvas->holes && i == ctxcanvas->poly_holes[hole_index]) + { + PDF_moveto(ctxcanvas->pdf, poly[i].x, poly[i].y); + hole_index++; + } + else + PDF_lineto(ctxcanvas->pdf, poly[i].x, poly[i].y); + } + } + + PDF_clip(ctxcanvas->pdf); + } + else if (mode == CD_CLIPOFF) + { + resetcliprect(ctxcanvas); + } + + return mode; +} + +/******************************************************/ +/* primitives */ +/******************************************************/ + +static void cdfline(cdCtxCanvas *ctxcanvas, double x1, double y1, double x2, double y2) +{ + update_fill(ctxcanvas, 0); + + PDF_moveto(ctxcanvas->pdf, x1, y1); + PDF_lineto(ctxcanvas->pdf, x2, y2); + PDF_stroke(ctxcanvas->pdf); +} + +static void cdline(cdCtxCanvas *ctxcanvas, int x1, int y1, int x2, int y2) +{ + cdfline(ctxcanvas, (double)x1, (double)y1, (double)x2, (double)y2); +} + +static void cdfrect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + update_fill(ctxcanvas, 0); + + PDF_rect(ctxcanvas->pdf, xmin, ymin, xmax-xmin, ymax-ymin); + PDF_stroke(ctxcanvas->pdf); +} + +static void cdrect(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + cdfrect(ctxcanvas, (double)xmin, (double)xmax, (double)ymin, (double)ymax); +} + +static void cdfbox(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + update_fill(ctxcanvas, 1); + + PDF_moveto(ctxcanvas->pdf, xmin, ymin); + PDF_lineto(ctxcanvas->pdf, xmax, ymin); + PDF_lineto(ctxcanvas->pdf, xmax, ymax); + PDF_lineto(ctxcanvas->pdf, xmin, ymax); + PDF_fill(ctxcanvas->pdf); +} + +static void cdbox(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + cdfbox(ctxcanvas, (double)xmin, (double)xmax, (double)ymin, (double)ymax); +} + +static void cdfarc(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + update_fill(ctxcanvas, 0); + + if (w==h) + { + PDF_arc(ctxcanvas->pdf, xc, yc, 0.5*w, a1, a2); + PDF_stroke(ctxcanvas->pdf); + } + else /* Elipse: mudar a escala p/ criar a partir do circulo */ + { + PDF_save(ctxcanvas->pdf); /* save to use the local transform */ + + PDF_translate(ctxcanvas->pdf, xc, yc); + PDF_scale(ctxcanvas->pdf, w/h, 1); + PDF_translate(ctxcanvas->pdf, -xc, -yc); + + PDF_arc(ctxcanvas->pdf, xc, yc, 0.5*h, a1, a2); + PDF_stroke(ctxcanvas->pdf); + + PDF_restore(ctxcanvas->pdf); /* restore from local */ + } +} + +static void cdarc(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + cdfarc(ctxcanvas, (double)xc, (double)yc, (double)w, (double)h, a1, a2); +} + +static void cdfsector(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + update_fill(ctxcanvas, 1); + + if (w==h) + { + PDF_moveto(ctxcanvas->pdf, xc, yc); + PDF_arc(ctxcanvas->pdf, xc, yc, 0.5*w, a1, a2); + PDF_fill(ctxcanvas->pdf); + } + else /* Elipse: mudar a escala p/ criar a partir do circulo */ + { + PDF_save(ctxcanvas->pdf); /* save to use the local transform */ + + PDF_translate(ctxcanvas->pdf, xc, yc); + PDF_scale(ctxcanvas->pdf, w/h, 1); + PDF_translate(ctxcanvas->pdf, -xc, -yc); + + PDF_moveto(ctxcanvas->pdf, xc, yc); + PDF_arc(ctxcanvas->pdf, xc, yc, 0.5*h, a1, a2); + + if (ctxcanvas->canvas->interior_style == CD_SOLID || + ctxcanvas->canvas->interior_style == CD_PATTERN) + PDF_fill(ctxcanvas->pdf); + else + { + PDF_lineto(ctxcanvas->pdf, xc, yc); + PDF_stroke(ctxcanvas->pdf); + } + + PDF_restore(ctxcanvas->pdf); /* restore from local */ + } +} + +static void cdsector(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + cdfsector(ctxcanvas, (double)xc, (double)yc, (double)w, (double)h, a1, a2); +} + +static void cdfchord(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + update_fill(ctxcanvas, 1); + + if (w==h) + { + PDF_arc(ctxcanvas->pdf, xc, yc, 0.5*w, a1, a2); + PDF_fill_stroke(ctxcanvas->pdf); + } + else /* Elipse: mudar a escala p/ criar a partir do circulo */ + { + PDF_save(ctxcanvas->pdf); /* save to use the local transform */ + + /* local transform */ + PDF_translate(ctxcanvas->pdf, xc, yc); + PDF_scale(ctxcanvas->pdf, 1, w/h); + + PDF_arc(ctxcanvas->pdf, xc, yc, 0.5*w, a1, a2); + PDF_fill_stroke(ctxcanvas->pdf); + + PDF_restore(ctxcanvas->pdf); /* restore from local */ + } +} + +static void cdchord(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + cdfchord(ctxcanvas, (double)xc, (double)yc, (double)w, (double)h, a1, a2); +} + +static void cdgetfontdim(cdCtxCanvas *ctxcanvas, int *max_width, int *height, int *ascent, int *descent) +{ + double fontsize, a, d, linegap; + + if (ctxcanvas->font<0) + return; + + fontsize = PDF_get_value(ctxcanvas->pdf, "fontsize", 0); + a = PDF_get_value(ctxcanvas->pdf, "ascender", 0); + d = PDF_get_value(ctxcanvas->pdf, "descender", 0); + + /* linegap = PDF_info_font(ctxcanvas->pdf, 1, "linegap", ""); - not supported call */ + linegap = 0.23 * a; /* use default value for linegap */ + a += linegap; + d += linegap; /* since d<0, it is a subtraction */ + + a *= fontsize; + d *= fontsize; + + if (ascent) *ascent = (int)a; + if (descent) *descent = (int)(-d); + if (height) *height = (int)(a - d); + if (max_width) *max_width = (int)(PDF_info_textline(ctxcanvas->pdf, "W", 0, "width", "")/ctxcanvas->scale); +} + +static void cdgettextsize(cdCtxCanvas *ctxcanvas, const char *s, int len, int *width, int *height) +{ + if (ctxcanvas->font<0) + return; + if (height) cdgetfontdim(ctxcanvas, NULL, height, NULL, NULL); + if (width) *width = (int)(PDF_info_textline(ctxcanvas->pdf, s, len, "width", "")/ctxcanvas->scale); +} + +static void cdftext(cdCtxCanvas *ctxcanvas, double x, double y, const char *s, int len) +{ + char temp[200], options[200]; + + PDF_setcolor(ctxcanvas->pdf, "fill", "rgb", get_red(ctxcanvas->canvas->foreground), + get_green(ctxcanvas->canvas->foreground), + get_blue(ctxcanvas->canvas->foreground), 0); + + strcpy(options, ""); + + sprintf(temp, "rotate=%g ", ctxcanvas->canvas->text_orientation); + strcat(options, temp); + + if (ctxcanvas->underline != 0) + strcat(options, "underline=true "); + else + strcat(options, "underline=false "); + + if (ctxcanvas->strikeover != 0) + strcat(options, "strikeout=true "); + else + strcat(options, "strikeout=false "); + + switch (ctxcanvas->canvas->text_alignment) + { + case CD_NORTH: + sprintf(temp, "position={50 100} matchbox { boxheight={ascender descender} }"); + strcat(options, temp); + break; + case CD_NORTH_EAST: + sprintf(temp, "position={100 100} matchbox { boxheight={ascender descender} }"); + strcat(options, temp); + break; + case CD_NORTH_WEST: + sprintf(temp, "position={0 100} matchbox { boxheight={ascender descender} }"); + strcat(options, temp); + break; + case CD_EAST: + sprintf(temp, "position={100 50} matchbox { boxheight={ascender descender} }"); + strcat(options, temp); + break; + case CD_WEST: + sprintf(temp, "position={0 50} matchbox { boxheight={ascender descender} }"); + strcat(options, temp); + break; + case CD_CENTER: + sprintf(temp, "position={50 50} matchbox { boxheight={ascender descender} }"); + strcat(options, temp); + break; + case CD_SOUTH_EAST: + sprintf(temp, "position={100 0} matchbox { boxheight={ascender descender} }"); + strcat(options, temp); + break; + case CD_SOUTH: + sprintf(temp, "position={50 0} matchbox { boxheight={ascender descender} }"); + strcat(options, temp); + break; + case CD_SOUTH_WEST: + sprintf(temp, "position={0 0} matchbox { boxheight={ascender descender} }"); + strcat(options, temp); + break; + case CD_BASE_RIGHT: + sprintf(temp, "position={100 0} matchbox { boxheight={ascender none} }"); + strcat(options, temp); + break; + case CD_BASE_CENTER: + sprintf(temp, "position={50 0} matchbox { boxheight={ascender none} }"); + strcat(options, temp); + break; + case CD_BASE_LEFT: + sprintf(temp, "position={0 0} matchbox { boxheight={ascender none} }"); + strcat(options, temp); + break; + } + + PDF_fit_textline(ctxcanvas->pdf, s, len, x, y, options); +} + +static void cdtext(cdCtxCanvas *ctxcanvas, int x, int y, const char *s, int len) +{ + cdftext(ctxcanvas, (double)x, (double)y, s, len); +} + +static void cdpoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n) +{ + int i; + + if (mode == CD_CLIP) + return; + + if (mode == CD_FILL) + update_fill(ctxcanvas, 1); + else + update_fill(ctxcanvas, 0); + + if (mode==CD_FILL) + { + if (ctxcanvas->holes || ctxcanvas->canvas->fill_mode==CD_EVENODD) + PDF_set_parameter(ctxcanvas->pdf, "fillrule", "evenodd"); + else + PDF_set_parameter(ctxcanvas->pdf, "fillrule", "winding"); + } + + PDF_moveto(ctxcanvas->pdf, poly[0].x, poly[0].y); + + if (mode == CD_BEZIER) + { + for (i=1; ipdf, poly[i].x, poly[i].y, + poly[i+1].x, poly[i+1].y, + poly[i+2].x, poly[i+2].y); + } + else + { + int hole_index = 0; + + for (i=1; iholes && i == ctxcanvas->poly_holes[hole_index]) + { + PDF_moveto(ctxcanvas->pdf, poly[i].x, poly[i].y); + hole_index++; + } + else + PDF_lineto(ctxcanvas->pdf, poly[i].x, poly[i].y); + } + } + + switch (mode) + { + case CD_CLOSED_LINES : + PDF_closepath_stroke(ctxcanvas->pdf); + break; + case CD_OPEN_LINES : + PDF_stroke(ctxcanvas->pdf); + break; + case CD_BEZIER : + PDF_stroke(ctxcanvas->pdf); + break; + case CD_FILL : + PDF_fill(ctxcanvas->pdf); + break; + } +} + +static void cdfpoly(cdCtxCanvas *ctxcanvas, int mode, cdfPoint* poly, int n) +{ + int i; + + if (mode == CD_CLIP) + return; + + if (mode == CD_FILL) + update_fill(ctxcanvas, 1); + else + update_fill(ctxcanvas, 0); + + if (mode==CD_FILL) + { + if (ctxcanvas->holes || ctxcanvas->canvas->fill_mode==CD_EVENODD) + PDF_set_parameter(ctxcanvas->pdf, "fillrule", "evenodd"); + else + PDF_set_parameter(ctxcanvas->pdf, "fillrule", "winding"); + } + + PDF_moveto(ctxcanvas->pdf, poly[0].x, poly[0].y); + + if (mode == CD_BEZIER) + { + for (i=1; ipdf, poly[i].x, poly[i].y, + poly[i+1].x, poly[i+1].y, + poly[i+2].x, poly[i+2].y); + } + else + { + int hole_index = 0; + + for (i=1; iholes && i == ctxcanvas->poly_holes[hole_index]) + { + PDF_moveto(ctxcanvas->pdf, poly[i].x, poly[i].y); + hole_index++; + } + else + PDF_lineto(ctxcanvas->pdf, poly[i].x, poly[i].y); + } + } + + switch (mode) + { + case CD_CLOSED_LINES : + PDF_closepath_stroke(ctxcanvas->pdf); + break; + case CD_OPEN_LINES : + PDF_stroke(ctxcanvas->pdf); + break; + case CD_BEZIER : + PDF_stroke(ctxcanvas->pdf); + break; + case CD_FILL : + PDF_fill(ctxcanvas->pdf); + break; + } +} + +/******************************************************/ +/* attributes */ +/******************************************************/ + +static int cdlinestyle(cdCtxCanvas *ctxcanvas, int style) +{ + double mm = (72.0/25.4) / ctxcanvas->scale; + char options[80]; + + switch (style) + { + case CD_CONTINUOUS : /* empty dash */ + PDF_setdash(ctxcanvas->pdf, 0, 0); + break; + case CD_DASHED : + PDF_setdash(ctxcanvas->pdf, 3*mm, mm); + break; + case CD_DOTTED : + PDF_setdash(ctxcanvas->pdf, mm, mm); + break; + case CD_DASH_DOT : + sprintf(options, "dasharray={%g %g %g %g}", 3*mm, mm, mm, mm); + PDF_setdashpattern(ctxcanvas->pdf, options); + break; + case CD_DASH_DOT_DOT : + sprintf(options, "dasharray={%g %g %g %g %g %g}", 3*mm, mm, mm, mm, mm, mm); + PDF_setdashpattern(ctxcanvas->pdf, options); + break; + case CD_CUSTOM : + { + int i; + + strcpy(options, "dasharray={"); + for (i = 0; i < ctxcanvas->canvas->line_dashes_count; i++) + { + char tmp[80]; + sprintf(tmp, "%g ", ctxcanvas->canvas->line_dashes[i]*mm); + strcat(options, tmp); + } + strcat(options, "}"); + PDF_setdashpattern(ctxcanvas->pdf, options); + } + break; + } + + return style; +} + +static int cdlinewidth(cdCtxCanvas *ctxcanvas, int width) +{ + if (width==0) width = 1; + + PDF_setlinewidth(ctxcanvas->pdf, width); + + return width; +} + +static int cdlinejoin(cdCtxCanvas *ctxcanvas, int join) +{ + int cd2ps_join[] = {0, 2, 1}; + PDF_setlinejoin(ctxcanvas->pdf, cd2ps_join[join]); + return join; +} + +static int cdlinecap(cdCtxCanvas *ctxcanvas, int cap) +{ + int cd2pdf_cap[] = {0, 2, 1}; + PDF_setlinecap(ctxcanvas->pdf, cd2pdf_cap[cap]); + return cap; +} + +static void make_pattern(cdCtxCanvas *ctxcanvas, int n, int m, void* data, int (*data2rgb)(cdCtxCanvas *ctxcanvas, int n, int i, int j, void* data, unsigned char*r, unsigned char*g, unsigned char*b)) +{ + int i, j; + unsigned char r, g, b; + + PDF_suspend_page(ctxcanvas->pdf, ""); + ctxcanvas->pattern = PDF_begin_pattern(ctxcanvas->pdf, n, m, + ((double)n)*ctxcanvas->scale, ((double)m)*ctxcanvas->scale, 1); + + PDF_scale(ctxcanvas->pdf, ctxcanvas->scale, ctxcanvas->scale); + + for (j=0; jpdf, "fill", "rgb", ((double)r)/255, ((double)g)/255, ((double)b)/255, 0); + PDF_rect(ctxcanvas->pdf, i, j, 1, 1); + PDF_fill(ctxcanvas->pdf); + } + } + + PDF_end_pattern(ctxcanvas->pdf); + PDF_resume_page(ctxcanvas->pdf, ""); +} + +static int long2rgb(cdCtxCanvas *ctxcanvas, int n, int i, int j, void* data, unsigned char*r, unsigned char*g, unsigned char*b) +{ + long* long_data = (long*)data; + (void)ctxcanvas; + cdDecodeColor(long_data[j*n+i], r, g, b); + return 1; +} + +static void cdpattern(cdCtxCanvas *ctxcanvas, int n, int m, const long int *pattern) +{ + make_pattern(ctxcanvas, n, m, (void*)pattern, long2rgb); +} + +static int uchar2rgb(cdCtxCanvas *ctxcanvas, int n, int i, int j, void* data, unsigned char*r, unsigned char*g, unsigned char*b) +{ + int ret = 1; + unsigned char* uchar_data = (unsigned char*)data; + if (uchar_data[j*n+i]) + { + cdDecodeColor(ctxcanvas->canvas->foreground, r, g, b); + ret = 1; + } + else + { + cdDecodeColor(ctxcanvas->canvas->background, r, g, b); + if (ctxcanvas->canvas->back_opacity==CD_TRANSPARENT) + ret = -1; + } + + return ret; +} + +static void cdstipple(cdCtxCanvas *ctxcanvas, int n, int m, const unsigned char *stipple) +{ + make_pattern(ctxcanvas, n, m, (void*)stipple, uchar2rgb); +} + +static void make_hatch(cdCtxCanvas *ctxcanvas, int style) +{ + unsigned char r, g, b; + int hsize = ctxcanvas->hatchboxsize - 1; + int hhalf = hsize / 2; + + PDF_suspend_page(ctxcanvas->pdf, ""); + ctxcanvas->pattern = PDF_begin_pattern(ctxcanvas->pdf, hsize + 1, hsize + 1, + ((double)hsize)*ctxcanvas->scale, ((double)hsize)*ctxcanvas->scale, 1); + + PDF_scale(ctxcanvas->pdf, ctxcanvas->scale, ctxcanvas->scale); + + if (ctxcanvas->canvas->back_opacity==CD_OPAQUE) + { + cdDecodeColor(ctxcanvas->canvas->background, &r, &g, &b); + PDF_setcolor(ctxcanvas->pdf, "fill", "rgb", ((double)r)/255, ((double)g)/255, ((double)b)/255, 0); + PDF_rect(ctxcanvas->pdf, 0, 0, hsize, hsize); + PDF_fill(ctxcanvas->pdf); + } + + cdDecodeColor(ctxcanvas->canvas->foreground, &r, &g, &b); + PDF_setcolor(ctxcanvas->pdf, "stroke", "rgb", ((double)r)/255, ((double)g)/255, ((double)b)/255, 0); + + switch(style) + { + case CD_HORIZONTAL: + PDF_moveto(ctxcanvas->pdf, 0, hhalf); + PDF_lineto(ctxcanvas->pdf, hsize, hhalf); + break; + case CD_VERTICAL: + PDF_moveto(ctxcanvas->pdf, hhalf, 0); + PDF_lineto(ctxcanvas->pdf, hhalf, hsize); + break; + case CD_BDIAGONAL: + PDF_moveto(ctxcanvas->pdf, 0, hsize); + PDF_lineto(ctxcanvas->pdf, hsize, 0); + break; + case CD_FDIAGONAL: + PDF_moveto(ctxcanvas->pdf, 0, 0); + PDF_lineto(ctxcanvas->pdf, hsize, hsize); + break; + case CD_CROSS: + PDF_moveto(ctxcanvas->pdf, hsize, 0); + PDF_lineto(ctxcanvas->pdf, hsize, hsize); + PDF_moveto(ctxcanvas->pdf, 0, hhalf); + PDF_lineto(ctxcanvas->pdf, hsize, hhalf); + break; + case CD_DIAGCROSS: + PDF_moveto(ctxcanvas->pdf, 0, 0); + PDF_lineto(ctxcanvas->pdf, hsize, hsize); + PDF_moveto(ctxcanvas->pdf, hsize, 0); + PDF_lineto(ctxcanvas->pdf, 0, hsize); + break; + } + + PDF_stroke(ctxcanvas->pdf); + + PDF_end_pattern(ctxcanvas->pdf); + PDF_resume_page(ctxcanvas->pdf, ""); +} + +static int cdhatch(cdCtxCanvas *ctxcanvas, int style) +{ + make_hatch(ctxcanvas, style); + return style; +} + +static int cdfont(cdCtxCanvas *ctxcanvas, const char *type_face, int style, int size) +{ + int newfont, sizepixel; + char nativefontname[1024]; + const char* options = ""; + + if (cdStrEqualNoCase(type_face, "System")) + type_face = "Courier"; + + strcpy(nativefontname, type_face); + + if (cdStrEqualNoCase(type_face, "Courier") || + cdStrEqualNoCase(type_face, "Helvetica")) + { + if (style&CD_BOLD && style&CD_ITALIC) + strcat(nativefontname, "-BoldOblique"); + else + { + if (style&CD_BOLD) + strcat(nativefontname, "-Bold"); + + if (style&CD_ITALIC) + strcat(nativefontname, "-Oblique"); + } + } + else if (cdStrEqualNoCase(type_face, "Times")) + { + if ((style&3) == CD_PLAIN) + strcat(nativefontname, "-Roman"); + if (style&CD_BOLD && style&CD_ITALIC) + strcat(nativefontname, "-BoldItalic"); + else + { + if (style&CD_BOLD) + strcat(nativefontname, "-Bold"); + + if (style&CD_ITALIC) + strcat(nativefontname, "-Italic"); + } + } + else + { + switch(style&3) + { + case CD_PLAIN: + options = "fontstyle=normal"; + break; + case CD_BOLD: + options = "fontstyle=bold"; + break; + case CD_ITALIC: + options = "fontstyle=italic"; + break; + case CD_BOLD_ITALIC: + options = "fontstyle=bolditalic"; + break; + } + } + + newfont = PDF_load_font(ctxcanvas->pdf, nativefontname, 0, "auto", options); + if (newfont<0) + { + /* must reload the previous one */ + return 0; + } + ctxcanvas->font = newfont; + + sizepixel = cdGetFontSizePixels(ctxcanvas->canvas, size); + PDF_setfont(ctxcanvas->pdf, ctxcanvas->font, sizepixel); + + if (style&CD_UNDERLINE) + ctxcanvas->underline = 1; + else + ctxcanvas->underline = 0; + + if (style&CD_STRIKEOUT) + ctxcanvas->strikeover = 1; + else + ctxcanvas->strikeover = 0; + + return 1; +} + +static void cdtransform(cdCtxCanvas *ctxcanvas, const double* matrix) +{ + PDF_setmatrix(ctxcanvas->pdf, 1, 0, 0, 1, 0, 0); + + /* default coordinate system is in points, change it to pixels. */ + PDF_scale(ctxcanvas->pdf, ctxcanvas->scale, ctxcanvas->scale); + + if (matrix) + { + PDF_concat(ctxcanvas->pdf, matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + } + else if (ctxcanvas->rotate_angle) + { + /* rotation = translate to point + rotation + translate back */ + PDF_translate(ctxcanvas->pdf, ctxcanvas->rotate_center_x, ctxcanvas->rotate_center_y); + PDF_rotate(ctxcanvas->pdf, (double)ctxcanvas->rotate_angle); + PDF_translate(ctxcanvas->pdf, -ctxcanvas->rotate_center_x, -ctxcanvas->rotate_center_y); + } +} + +/******************************************************/ +/* client images */ +/******************************************************/ + +static void cdputimagerectrgb(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int i, j, d, image, rw, rh, rgb_size; + char options[80]; + unsigned char* rgb_data; + + if (xmin<0 || ymin<0 || xmax-xmin+1>iw || ymax-ymin+1>ih) return; + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + rgb_size = 3*rw*rh; + rgb_data = (unsigned char*)malloc(rgb_size); + if (!rgb_data) return; + + d = 0; + for (i=ymax; i>=ymin; i--) + for (j=xmin; j<=xmax; j++) + { + rgb_data[d] = r[i*iw+j]; d++; + rgb_data[d] = g[i*iw+j]; d++; + rgb_data[d] = b[i*iw+j]; d++; + } + + PDF_create_pvf(ctxcanvas->pdf, "cd_raw_rgb", 0, rgb_data, rgb_size, ""); + + sprintf(options, "width=%d height=%d components=3 bpc=8", rw, rh); + image = PDF_load_image(ctxcanvas->pdf, "raw", "cd_raw_rgb", 0, options); + + sprintf(options, "boxsize={%d %d} fitmethod=meet", w, h); + PDF_fit_image(ctxcanvas->pdf, image, x, y, options); + + PDF_delete_pvf(ctxcanvas->pdf, "cd_raw_rgb", 0); + free(rgb_data); +} + +static void cdputimagerectrgba(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int i, j, d, image, image_mask, rw, rh, alpha_size, rgb_size; + char options[80]; + unsigned char *rgb_data, *alpha_data; + + if (xmin<0 || ymin<0 || xmax-xmin+1>iw || ymax-ymin+1>ih) return; + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + rgb_size = 3*rw*rh; + rgb_data = (unsigned char*)malloc(rgb_size); + if (!rgb_data) return; + + d = 0; + for (i=ymax; i>=ymin; i--) + for (j=xmin; j<=xmax; j++) + { + rgb_data[d] = r[i*iw+j]; d++; + rgb_data[d] = g[i*iw+j]; d++; + rgb_data[d] = b[i*iw+j]; d++; + } + + alpha_size = rw*rh; + alpha_data = (unsigned char*)malloc(alpha_size); + if (!alpha_data) return; + + d = 0; + for (i=ymax; i>=ymin; i--) + for (j=xmin; j<=xmax; j++) + { + alpha_data[d] = a[i*iw+j]; d++; + } + + PDF_create_pvf(ctxcanvas->pdf, "cd_raw_rgb", 0, rgb_data, rgb_size, ""); + PDF_create_pvf(ctxcanvas->pdf, "cd_raw_alpha", 0, alpha_data, alpha_size, ""); + + sprintf(options, "width=%d height=%d components=1 bpc=8 imagewarning=true", rw, rh); + image_mask = PDF_load_image(ctxcanvas->pdf, "raw", "cd_raw_alpha", 0, options); + + sprintf(options, "width=%d height=%d components=3 bpc=8 masked=%d", rw, rh, image_mask); + image = PDF_load_image(ctxcanvas->pdf, "raw", "cd_raw_rgb", 0, options); + + sprintf(options, "boxsize={%d %d} fitmethod=meet", w, h); + PDF_fit_image(ctxcanvas->pdf, image, x, y, options); + + PDF_delete_pvf(ctxcanvas->pdf, "cd_raw_alpha", 0); + free(alpha_data); + PDF_delete_pvf(ctxcanvas->pdf, "cd_raw_rgb", 0); + free(rgb_data); +} + +static void cdputimagerectmap(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int i, j, d, rw, rh, image, rgb_size; + char options[80]; + unsigned char* rgb_data; + + if (xmin<0 || ymin<0 || xmax-xmin+1>iw || ymax-ymin+1>ih) return; + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + rgb_size = 3*rw*rh; + rgb_data = (unsigned char*)malloc(rgb_size); + if (!rgb_data) return; + + d = 0; + for (i=ymax; i>=ymin; i--) + for (j=xmin; j<=xmax; j++) + { + unsigned char r, g, b; + cdDecodeColor(colors[index[i*iw+j]], &r, &g, &b); + rgb_data[d] = r; d++; + rgb_data[d] = g; d++; + rgb_data[d] = b; d++; + } + + PDF_create_pvf(ctxcanvas->pdf, "cd_raw_rgb", 0, rgb_data, rgb_size, ""); + + sprintf(options, "width=%d height=%d components=3 bpc=8", rw, rh); + image = PDF_load_image(ctxcanvas->pdf, "raw", "cd_raw_rgb", 0, options); + + sprintf(options, "boxsize={%d %d} fitmethod=meet", w, h); + PDF_fit_image(ctxcanvas->pdf, image, x, y, options); + + PDF_delete_pvf(ctxcanvas->pdf, "cd_raw_rgb", 0); + free(rgb_data); +} + +/******************************************************/ +/* server images */ +/******************************************************/ + +static void cdpixel(cdCtxCanvas *ctxcanvas, int x, int y, long int color) +{ + PDF_setcolor(ctxcanvas->pdf, "fill", "rgb", get_red(color), get_green(color), get_blue(color), 0); + + PDF_moveto(ctxcanvas->pdf, x, y); + PDF_circle(ctxcanvas->pdf, x, y, .5); + + PDF_fill(ctxcanvas->pdf); +} + +/******************************************************/ +/* custom attributes */ +/******************************************************/ + +static void set_poly_attrib(cdCtxCanvas *ctxcanvas, char* data) +{ + int hole; + + if (data == NULL) + { + ctxcanvas->holes = 0; + return; + } + + sscanf(data, "%d", &hole); + ctxcanvas->poly_holes[ctxcanvas->holes] = hole; + ctxcanvas->holes++; +} + +static char* get_poly_attrib(cdCtxCanvas *ctxcanvas) +{ + static char holes[10]; + sprintf(holes, "%d", ctxcanvas->holes); + return holes; +} + +static cdAttribute poly_attrib = +{ + "POLYHOLE", + set_poly_attrib, + get_poly_attrib +}; + +static void set_hatchboxsize_attrib(cdCtxCanvas *ctxcanvas, char* data) +{ + int hatchboxsize; + + if (data == NULL) + { + ctxcanvas->hatchboxsize = 8; + return; + } + + sscanf(data, "%d", &hatchboxsize); + ctxcanvas->hatchboxsize = hatchboxsize; +} + +static char* get_hatchboxsize_attrib(cdCtxCanvas *ctxcanvas) +{ + static char size[10]; + sprintf(size, "%d", ctxcanvas->hatchboxsize); + return size; +} + +static cdAttribute hatchboxsize_attrib = +{ + "HATCHBOXSIZE", + set_hatchboxsize_attrib, + get_hatchboxsize_attrib +}; + +static void set_rotate_attrib(cdCtxCanvas *ctxcanvas, char* data) +{ + /* ignore ROTATE if transform is set */ + if (ctxcanvas->canvas->use_matrix) + return; + + if (data) + { + sscanf(data, "%g %d %d", &ctxcanvas->rotate_angle, + &ctxcanvas->rotate_center_x, + &ctxcanvas->rotate_center_y); + } + else + { + ctxcanvas->rotate_angle = 0; + ctxcanvas->rotate_center_x = 0; + ctxcanvas->rotate_center_y = 0; + } + + PDF_setmatrix(ctxcanvas->pdf, 1, 0, 0, 1, 0, 0); + + if (ctxcanvas->rotate_angle) + { + /* rotation = translate to point + rotation + translate back */ + PDF_translate(ctxcanvas->pdf, ctxcanvas->rotate_center_x, ctxcanvas->rotate_center_y); + PDF_rotate(ctxcanvas->pdf, (double)ctxcanvas->rotate_angle); + PDF_translate(ctxcanvas->pdf, -ctxcanvas->rotate_center_x, -ctxcanvas->rotate_center_y); + } +} + +static char* get_rotate_attrib(cdCtxCanvas *ctxcanvas) +{ + static char data[100]; + + if (!ctxcanvas->rotate_angle) + return NULL; + + sprintf(data, "%g %d %d", (double)ctxcanvas->rotate_angle, + ctxcanvas->rotate_center_x, + ctxcanvas->rotate_center_y); + + return data; +} + +static cdAttribute rotate_attrib = +{ + "ROTATE", + set_rotate_attrib, + get_rotate_attrib +}; + +static void set_pattern_attrib(cdCtxCanvas *ctxcanvas, char* data) +{ + if (data) + { + int n, m; + sscanf(data, "%dx%d", &n, &m); + + PDF_suspend_page(ctxcanvas->pdf, ""); + ctxcanvas->pattern = PDF_begin_pattern(ctxcanvas->pdf, n, m, + ((double)n)*ctxcanvas->scale, ((double)m)*ctxcanvas->scale, 1); + PDF_scale(ctxcanvas->pdf, ctxcanvas->scale, ctxcanvas->scale); + } + else + { + PDF_end_pattern(ctxcanvas->pdf); + PDF_resume_page(ctxcanvas->pdf, ""); + ctxcanvas->canvas->interior_style = CD_PATTERN; + } +} + +static cdAttribute pattern_attrib = +{ + "PATTERN", + set_pattern_attrib, + NULL +}; + +static void set_opacity_attrib(cdCtxCanvas *ctxcanvas, char* data) +{ + int state; + + if (data) + { + sscanf(data, "%d", &ctxcanvas->opacity); + if (ctxcanvas->opacity < 0) ctxcanvas->opacity = 0; + if (ctxcanvas->opacity > 255) ctxcanvas->opacity = 255; + } + else + ctxcanvas->opacity = 255; + + /* reuse the extended graphics state if the opacity is the same */ + if (ctxcanvas->opacity_states[ctxcanvas->opacity] == -1) + { + char options[50]; + sprintf(options, "opacityfill=%g opacitystroke=%g", ctxcanvas->opacity/255.0, ctxcanvas->opacity/255.0); + state = PDF_create_gstate(ctxcanvas->pdf, options); + ctxcanvas->opacity_states[ctxcanvas->opacity] = state; + } + else + state = ctxcanvas->opacity_states[ctxcanvas->opacity]; + + PDF_set_gstate(ctxcanvas->pdf, state); +} + +static char* get_opacity_attrib(cdCtxCanvas *ctxcanvas) +{ + static char data[50]; + sprintf(data, "%d", ctxcanvas->opacity); + return data; +} + +static cdAttribute opacity_attrib = +{ + "OPACITY", + set_opacity_attrib, + get_opacity_attrib +}; + +static char* get_pdf_attrib(cdCtxCanvas *ctxcanvas) +{ + return (char*)ctxcanvas->pdf; +} + +static cdAttribute pdf_attrib = +{ + "PDF", + NULL, + get_pdf_attrib +}; + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + char *line = (char *)data; + cdCtxCanvas *ctxcanvas; + char filename[10240] = ""; + + ctxcanvas = (cdCtxCanvas *)malloc(sizeof(cdCtxCanvas)); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + + line += cdGetFileName(line, filename); + if (filename[0] == 0) + return; + + ctxcanvas->pdf = PDF_new(); + if (!ctxcanvas->pdf) + { + free(ctxcanvas); + return; + } + + if (PDF_begin_document(ctxcanvas->pdf, filename, 0, "") == -1) + { + PDF_delete(ctxcanvas->pdf); + free(ctxcanvas); + return; + } + + PDF_set_parameter(ctxcanvas->pdf, "fontwarning", "false"); + PDF_set_parameter(ctxcanvas->pdf, "errorpolicy", "return"); + + cdRegisterAttribute(canvas, &poly_attrib); + cdRegisterAttribute(canvas, &hatchboxsize_attrib); + cdRegisterAttribute(canvas, &rotate_attrib); + cdRegisterAttribute(canvas, &opacity_attrib); + cdRegisterAttribute(canvas, &pattern_attrib); + cdRegisterAttribute(canvas, &pdf_attrib); + + setpdfdefaultvalues(ctxcanvas); + + while (*line != '\0') + { + while (*line != '\0' && *line != '-') + line++; + + if (*line != '\0') + { + float num; + line++; + switch (*line++) + { + case 'p': + { + int paper; + sscanf(line, "%d", &paper); + setpdfpapersize(ctxcanvas, paper); + break; + } + case 'w': + sscanf(line, "%g", &num); + ctxcanvas->width_mm = num; + ctxcanvas->width_pt = CD_MM2PT*ctxcanvas->width_mm; + break; + case 'h': + sscanf(line, "%g", &num); + ctxcanvas->height_mm = num; + ctxcanvas->height_pt = CD_MM2PT*ctxcanvas->height_mm; + break; + case 's': + sscanf(line, "%d", &(ctxcanvas->res)); + break; + case 'o': + ctxcanvas->landscape = 1; + break; + } + } + + while (*line != '\0' && *line != ' ') + line++; + } + + /* store the base canvas */ + ctxcanvas->canvas = canvas; + + /* update canvas context */ + canvas->ctxcanvas = ctxcanvas; + + if (ctxcanvas->landscape == 1) + { + _cdSwapDouble(ctxcanvas->width_pt, ctxcanvas->height_pt); + _cdSwapDouble(ctxcanvas->width_mm, ctxcanvas->height_mm); + } + + init_pdf(ctxcanvas); +} + +static void cdinittable(cdCanvas* canvas) +{ + canvas->cxFlush = cdflush; + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxPoly = cdpoly; + canvas->cxRect = cdrect; + canvas->cxBox = cdbox; + canvas->cxArc = cdarc; + canvas->cxSector = cdsector; + canvas->cxChord = cdchord; + canvas->cxText = cdtext; + canvas->cxFLine = cdfline; + canvas->cxFPoly = cdfpoly; + canvas->cxFRect = cdfrect; + canvas->cxFBox = cdfbox; + canvas->cxFArc = cdfarc; + canvas->cxFSector = cdfsector; + canvas->cxFChord = cdfchord; + canvas->cxFText = cdftext; + canvas->cxGetFontDim = cdgetfontdim; + canvas->cxGetTextSize = cdgettextsize; + canvas->cxPutImageRectRGB = cdputimagerectrgb; + canvas->cxPutImageRectMap = cdputimagerectmap; + canvas->cxPutImageRectRGBA = cdputimagerectrgba; + + canvas->cxClip = cdclip; + canvas->cxClipArea = cdcliparea; + canvas->cxFClipArea = cdfcliparea; + canvas->cxLineStyle = cdlinestyle; + canvas->cxLineWidth = cdlinewidth; + canvas->cxLineCap = cdlinecap; + canvas->cxLineJoin = cdlinejoin; + canvas->cxPattern = cdpattern; + canvas->cxStipple = cdstipple; + canvas->cxHatch = cdhatch; + canvas->cxFont = cdfont; + canvas->cxTransform = cdtransform; + + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdPDFContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_PLAY | CD_CAP_PALETTE | + CD_CAP_REGION | CD_CAP_IMAGESRV | CD_CAP_TEXTSIZE | + CD_CAP_BACKGROUND | CD_CAP_BACKOPACITY | CD_CAP_WRITEMODE | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +cdContext* cdContextPDF(void) +{ + return &cdPDFContext; +} + +/* +p.set_info("Creator", "PDFlib Cookbook") +*/ diff --git a/cd/src/drv/cdpicture.c b/cd/src/drv/cdpicture.c new file mode 100755 index 0000000..ff4f532 --- /dev/null +++ b/cd/src/drv/cdpicture.c @@ -0,0 +1,1133 @@ +/** \file + * \brief CD Picture driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" +#include "cdpicture.h" + + +/* codes for the primitives. +*/ +typedef enum _tPrim +{ + CDPIC_LINE, + CDPIC_RECT, + CDPIC_BOX, + CDPIC_ARC, + CDPIC_SECTOR, + CDPIC_CHORD, + CDPIC_TEXT, + CDPIC_POLY, + CDPIC_FLINE, + CDPIC_FRECT, + CDPIC_FBOX, + CDPIC_FARC, + CDPIC_FSECTOR, + CDPIC_FCHORD, + CDPIC_FTEXT, + CDPIC_FPOLY, + CDPIC_PIXEL, + CDPIC_IMAGEMAP, + CDPIC_IMAGERGB, + CDPIC_IMAGERGBA, +} tPrim; + +typedef struct _tFillAttrib +{ + long foreground, background; + int back_opacity; + int interior_style, hatch_style; + int fill_mode; + int pattern_w, pattern_h; + long* pattern; + int stipple_w, stipple_h; + unsigned char* stipple; +} tFillAttrib; + +typedef struct _tLineAttrib +{ + long foreground, background; + int back_opacity; + int line_style, line_width; + int line_cap, line_join; + int* line_dashes; + int line_dashes_count; +} tLineAttrib; + +typedef struct _tTextAttrib +{ + long foreground; + char* font_type_face; + int font_style, font_size; + int text_alignment; + double text_orientation; + char* native_font; +} tTextAttrib; + +typedef struct _tLBR +{ + int x1, y1, x2, y2; +} tLBR; /* Line or Box or Rect */ + +typedef struct _tfLBR +{ + double x1, y1, x2, y2; +} tfLBR; /* Line or Box or Rect */ + +typedef struct _tASC +{ + int xc, yc, w, h; + double angle1, angle2; +} tASC; /* Arc or Sector or Chord */ + +typedef struct _tfASC +{ + double xc, yc, w, h; + double angle1, angle2; +} tfASC; /* Arc or Sector or Chord */ + +typedef struct _tPoly +{ + int mode; + int n; + cdPoint* points; +} tPoly; /* Begin, Vertex and End */ + +typedef struct _tfPoly +{ + int mode; + int n; + cdfPoint* points; +} tfPoly; /* Begin, Vertex and End */ + +typedef struct _tText +{ + int x, y; + char *s; +} tText; /* Text */ + +typedef struct _tfText +{ + double x, y; + char *s; +} tfText; /* Text */ + +typedef struct _tPixel +{ + int x, y; + long color; +} tPixel; /* Pixel */ + +typedef struct _tImageMap +{ + int iw, ih; + unsigned char *index; + long int *colors; + int x, y, w, h; +} tImageMap; + +typedef struct _tImageRGBA +{ + int iw, ih; + unsigned char *r; + unsigned char *g; + unsigned char *b; + unsigned char *a; + int x, y, w, h; +} tImageRGBA; + +typedef struct _tPrimNode +{ + tPrim type; + void* param_buffer; /* dinamically allocated memory for the parameter */ + union { + tLBR lineboxrect; + tfLBR lineboxrectf; + tASC arcsectorchord; + tfASC arcsectorchordf; + tPoly poly; + tfPoly polyf; + tText text; + tfText textf; + tPixel pixel; + tImageMap imagemap; + tImageRGBA imagergba; + } param; + void* attrib_buffer; /* dinamically allocated memory for the attributes */ + union { + tLineAttrib line; + tFillAttrib fill; + tTextAttrib text; + } attrib; + struct _tPrimNode *next; +} tPrimNode; + +struct _cdCtxCanvas +{ + cdCanvas* canvas; + + /* primitives list */ + tPrimNode *prim_first, + *prim_last; + int prim_n; + + /* bounding box */ + int xmin, xmax, + ymin, ymax; +}; + +static void picUpdateSize(cdCtxCanvas *ctxcanvas) +{ + ctxcanvas->canvas->w = ctxcanvas->xmax-ctxcanvas->xmin+1; + ctxcanvas->canvas->h = ctxcanvas->ymax-ctxcanvas->ymin+1; + ctxcanvas->canvas->w_mm = ((double)ctxcanvas->canvas->w) / ctxcanvas->canvas->xres; + ctxcanvas->canvas->h_mm = ((double)ctxcanvas->canvas->h) / ctxcanvas->canvas->yres; +} + +static void picUpdateBBox(cdCtxCanvas *ctxcanvas, int x, int y, int ew) +{ + if (x+ew > ctxcanvas->xmax) + ctxcanvas->xmax = x+ew; + if (y+ew > ctxcanvas->ymax) + ctxcanvas->ymax = y+ew; + if (x-ew < ctxcanvas->xmin) + ctxcanvas->xmin = x-ew; + if (y-ew < ctxcanvas->ymin) + ctxcanvas->ymin = y-ew; + + picUpdateSize(ctxcanvas); +} + +static void picUpdateBBoxF(cdCtxCanvas *ctxcanvas, double x, double y, int ew) +{ + if ((int)ceil(x+ew) > ctxcanvas->xmax) + ctxcanvas->xmax = (int)ceil(x+ew); + if ((int)ceil(y+ew) > ctxcanvas->ymax) + ctxcanvas->ymax = (int)ceil(y+ew); + if ((int)floor(x-ew) < ctxcanvas->xmin) + ctxcanvas->xmin = (int)floor(x-ew); + if ((int)floor(y-ew) < ctxcanvas->ymin) + ctxcanvas->ymin = (int)floor(y-ew); + + picUpdateSize(ctxcanvas); +} + +static void picAddPrim(cdCtxCanvas *ctxcanvas, tPrimNode *prim) +{ + if (ctxcanvas->prim_n == 0) + ctxcanvas->prim_first = prim; + else + ctxcanvas->prim_last->next = prim; + + ctxcanvas->prim_last = prim; + ctxcanvas->prim_n++; +} + +static tPrimNode* primCreate(tPrim type) +{ + tPrimNode *prim = malloc(sizeof(tPrimNode)); + memset(prim, 0, sizeof(tPrimNode)); + prim->type = type; + return prim; +} + +static void primDestroy(tPrimNode *prim) +{ + if (prim->param_buffer) + free(prim->param_buffer); + if (prim->attrib_buffer) + free(prim->attrib_buffer); + free(prim); +} + +static void primAddAttrib_Line(tPrimNode *prim, cdCanvas *canvas) +{ + prim->attrib.line.foreground = canvas->foreground; + prim->attrib.line.background = canvas->background; + prim->attrib.line.back_opacity = canvas->back_opacity; + prim->attrib.line.line_style = canvas->line_style; + prim->attrib.line.line_width = canvas->line_width; + prim->attrib.line.line_cap = canvas->line_cap; + prim->attrib.line.line_join = canvas->line_join; + + if (canvas->line_style==CD_CUSTOM && canvas->line_dashes) + { + prim->attrib.line.line_dashes_count = canvas->line_dashes_count; + prim->attrib_buffer = malloc(canvas->line_dashes_count*sizeof(int)); + prim->attrib.line.line_dashes = prim->attrib_buffer; + memcpy(prim->attrib.line.line_dashes, canvas->line_dashes, canvas->line_dashes_count*sizeof(int)); + } +} + +static void primAddAttrib_Fill(tPrimNode *prim, cdCanvas *canvas) +{ + prim->attrib.fill.foreground = canvas->foreground; + prim->attrib.fill.background = canvas->background; + prim->attrib.fill.back_opacity = canvas->back_opacity; + prim->attrib.fill.interior_style = canvas->interior_style; + prim->attrib.fill.hatch_style = canvas->hatch_style; + prim->attrib.fill.fill_mode = canvas->fill_mode; + prim->attrib.fill.pattern_w = canvas->pattern_w; + prim->attrib.fill.pattern_h = canvas->pattern_h; + prim->attrib.fill.stipple_w = canvas->stipple_w; + prim->attrib.fill.stipple_h = canvas->stipple_h; + + if (canvas->interior_style==CD_PATTERN && canvas->pattern) + { + prim->attrib_buffer = malloc(canvas->pattern_size*sizeof(long)); + prim->attrib.fill.pattern = prim->attrib_buffer; + memcpy(prim->attrib.fill.pattern, canvas->pattern, canvas->pattern_size*sizeof(long)); + } + + if (canvas->interior_style==CD_STIPPLE && canvas->stipple) + { + prim->attrib_buffer = malloc(canvas->stipple_size*sizeof(long)); + prim->attrib.fill.stipple = prim->attrib_buffer; + memcpy(prim->attrib.fill.stipple, canvas->stipple, canvas->stipple_size*sizeof(long)); + } +} + +static void primAddAttrib_Text(tPrimNode *prim, cdCanvas *canvas) +{ + prim->attrib.text.foreground = canvas->foreground; + + prim->attrib.text.font_style = canvas->font_style; + prim->attrib.text.font_size = canvas->font_size; + prim->attrib.text.text_alignment = canvas->text_alignment; + prim->attrib.text.text_orientation = canvas->text_orientation; + + if (canvas->native_font[0]) + { + prim->attrib_buffer = cdStrDup(canvas->native_font); + prim->attrib.text.native_font = prim->attrib_buffer; + } + else + { + prim->attrib_buffer = cdStrDup(canvas->font_type_face); + prim->attrib.text.font_type_face = prim->attrib_buffer; + } +} + +static void primUpdateAttrib_Line(tPrimNode *prim, cdCanvas *canvas) +{ + cdCanvasSetBackground(canvas, prim->attrib.line.background); + cdCanvasSetForeground(canvas, prim->attrib.line.foreground); + cdCanvasBackOpacity(canvas, prim->attrib.line.back_opacity); + cdCanvasLineStyle(canvas, prim->attrib.line.line_style); + cdCanvasLineWidth(canvas, prim->attrib.line.line_width); + cdCanvasLineCap(canvas, prim->attrib.line.line_cap); + cdCanvasLineJoin(canvas, prim->attrib.line.line_join); + + if (prim->attrib.line.line_style==CD_CUSTOM && prim->attrib.line.line_dashes) + cdCanvasLineStyleDashes(canvas, prim->attrib.line.line_dashes, prim->attrib.line.line_dashes_count); +} + +void primUpdateAttrib_Fill(tPrimNode *prim, cdCanvas *canvas) +{ + cdCanvasSetBackground(canvas, prim->attrib.fill.background); + cdCanvasSetForeground(canvas, prim->attrib.fill.foreground); + cdCanvasBackOpacity(canvas, prim->attrib.fill.back_opacity); + cdCanvasFillMode(canvas, prim->attrib.fill.fill_mode); + + if (prim->attrib.fill.interior_style==CD_HATCH) + cdCanvasHatch(canvas, prim->attrib.fill.hatch_style); + else if (prim->attrib.fill.interior_style==CD_PATTERN && prim->attrib.fill.pattern) + cdCanvasPattern(canvas, prim->attrib.fill.pattern_w, prim->attrib.fill.pattern_h, prim->attrib.fill.pattern); + else if (prim->attrib.fill.interior_style==CD_STIPPLE && prim->attrib.fill.stipple) + cdCanvasStipple(canvas, prim->attrib.fill.stipple_w, prim->attrib.fill.stipple_h, prim->attrib.fill.stipple); + + cdCanvasInteriorStyle(canvas, prim->attrib.fill.interior_style); +} + +void primUpdateAttrib_Text(tPrimNode *prim, cdCanvas *canvas) +{ + cdCanvasSetForeground(canvas, prim->attrib.text.foreground); + cdCanvasTextAlignment(canvas, prim->attrib.text.text_alignment); + cdCanvasTextOrientation(canvas, prim->attrib.text.text_orientation); + + if (canvas->native_font[0]) + cdCanvasNativeFont(canvas, prim->attrib.text.native_font); + else + cdCanvasFont(canvas, prim->attrib.text.font_type_face, prim->attrib.text.font_style, prim->attrib.text.font_size); +} + +static void cdclear(cdCtxCanvas *ctxcanvas) +{ + tPrimNode *prim; + int i; + for (i = 0; i < ctxcanvas->prim_n; i++) + { + prim = ctxcanvas->prim_first; + ctxcanvas->prim_first = prim->next; + + primDestroy(prim); + } + + ctxcanvas->prim_n = 0; + ctxcanvas->prim_first = NULL; + ctxcanvas->prim_last = NULL; +} + +static void cdpixel(cdCtxCanvas *ctxcanvas, int x, int y, long int color) +{ + tPrimNode *prim = primCreate(CDPIC_PIXEL); + prim->param.pixel.x = x; + prim->param.pixel.y = y; + prim->param.pixel.color = color; + picAddPrim(ctxcanvas, prim); + picUpdateBBox(ctxcanvas, x, y, 0); +} + +static void cdline(cdCtxCanvas *ctxcanvas, int x1, int y1, int x2, int y2) +{ + tPrimNode *prim = primCreate(CDPIC_LINE); + primAddAttrib_Line(prim, ctxcanvas->canvas); + prim->param.lineboxrect.x1 = x1; + prim->param.lineboxrect.y1 = y1; + prim->param.lineboxrect.x2 = x2; + prim->param.lineboxrect.y2 = y2; + picAddPrim(ctxcanvas, prim); + picUpdateBBox(ctxcanvas, x1, y1, ctxcanvas->canvas->line_width); + picUpdateBBox(ctxcanvas, x2, y2, ctxcanvas->canvas->line_width); +} + +static void cdfline(cdCtxCanvas *ctxcanvas, double x1, double y1, double x2, double y2) +{ + tPrimNode *prim = primCreate(CDPIC_FLINE); + primAddAttrib_Line(prim, ctxcanvas->canvas); + prim->param.lineboxrectf.x1 = x1; + prim->param.lineboxrectf.y1 = y1; + prim->param.lineboxrectf.x2 = x2; + prim->param.lineboxrectf.y2 = y2; + picAddPrim(ctxcanvas, prim); + picUpdateBBoxF(ctxcanvas, x1, y1, ctxcanvas->canvas->line_width); + picUpdateBBoxF(ctxcanvas, x2, y2, ctxcanvas->canvas->line_width); +} + +static void cdrect(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + tPrimNode *prim = primCreate(CDPIC_RECT); + primAddAttrib_Line(prim, ctxcanvas->canvas); + prim->param.lineboxrect.x1 = xmin; + prim->param.lineboxrect.y1 = ymin; + prim->param.lineboxrect.x2 = xmax; + prim->param.lineboxrect.y2 = ymax; + picAddPrim(ctxcanvas, prim); + picUpdateBBox(ctxcanvas, xmin, ymin, ctxcanvas->canvas->line_width); + picUpdateBBox(ctxcanvas, xmax, ymax, ctxcanvas->canvas->line_width); +} + +static void cdfrect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + tPrimNode *prim = primCreate(CDPIC_FRECT); + primAddAttrib_Line(prim, ctxcanvas->canvas); + prim->param.lineboxrectf.x1 = xmin; + prim->param.lineboxrectf.y1 = ymin; + prim->param.lineboxrectf.x2 = xmax; + prim->param.lineboxrectf.y2 = ymax; + picAddPrim(ctxcanvas, prim); + picUpdateBBoxF(ctxcanvas, xmin, ymin, ctxcanvas->canvas->line_width); + picUpdateBBoxF(ctxcanvas, xmax, ymax, ctxcanvas->canvas->line_width); +} + +static void cdbox(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + tPrimNode *prim = primCreate(CDPIC_BOX); + primAddAttrib_Fill(prim, ctxcanvas->canvas); + prim->param.lineboxrect.x1 = xmin; + prim->param.lineboxrect.y1 = ymin; + prim->param.lineboxrect.x2 = xmax; + prim->param.lineboxrect.y2 = ymax; + picAddPrim(ctxcanvas, prim); + picUpdateBBox(ctxcanvas, xmin, ymin, 0); + picUpdateBBox(ctxcanvas, xmax, ymax, 0); +} + +static void cdfbox(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + tPrimNode *prim = primCreate(CDPIC_FBOX); + primAddAttrib_Fill(prim, ctxcanvas->canvas); + prim->param.lineboxrectf.x1 = xmin; + prim->param.lineboxrectf.y1 = ymin; + prim->param.lineboxrectf.x2 = xmax; + prim->param.lineboxrectf.y2 = ymax; + picAddPrim(ctxcanvas, prim); + picUpdateBBoxF(ctxcanvas, xmin, ymin, 0); + picUpdateBBoxF(ctxcanvas, xmax, ymax, 0); +} + +static void cdarc(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + int xmin, xmax, ymin, ymax; + tPrimNode *prim = primCreate(CDPIC_ARC); + primAddAttrib_Line(prim, ctxcanvas->canvas); + prim->param.arcsectorchord.xc = xc; + prim->param.arcsectorchord.yc = yc; + prim->param.arcsectorchord.w = w; + prim->param.arcsectorchord.h = h; + prim->param.arcsectorchord.angle1 = a1; + prim->param.arcsectorchord.angle2 = a2; + picAddPrim(ctxcanvas, prim); + cdCanvasGetEllipseBox(xc, yc, w, h, a1, a2, &xmin, &xmax, &ymin, &ymax); + picUpdateBBox(ctxcanvas, xmin, ymin, ctxcanvas->canvas->line_width); + picUpdateBBox(ctxcanvas, xmax, ymax, ctxcanvas->canvas->line_width); +} + +static void cdfarc(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + int xmin, xmax, ymin, ymax; + tPrimNode *prim = primCreate(CDPIC_FARC); + primAddAttrib_Line(prim, ctxcanvas->canvas); + prim->param.arcsectorchordf.xc = xc; + prim->param.arcsectorchordf.yc = yc; + prim->param.arcsectorchordf.w = w; + prim->param.arcsectorchordf.h = h; + prim->param.arcsectorchordf.angle1 = a1; + prim->param.arcsectorchordf.angle2 = a2; + picAddPrim(ctxcanvas, prim); + cdCanvasGetEllipseBox(_cdRound(xc), _cdRound(yc), _cdRound(w), _cdRound(h), a1, a2, &xmin, &xmax, &ymin, &ymax); + picUpdateBBox(ctxcanvas, xmin, ymin, ctxcanvas->canvas->line_width); + picUpdateBBox(ctxcanvas, xmax, ymax, ctxcanvas->canvas->line_width); +} + +static void cdsector(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + int xmin, xmax, ymin, ymax; + tPrimNode *prim = primCreate(CDPIC_SECTOR); + primAddAttrib_Fill(prim, ctxcanvas->canvas); + prim->param.arcsectorchord.xc = xc; + prim->param.arcsectorchord.yc = yc; + prim->param.arcsectorchord.w = w; + prim->param.arcsectorchord.h = h; + prim->param.arcsectorchord.angle1 = a1; + prim->param.arcsectorchord.angle2 = a2; + picAddPrim(ctxcanvas, prim); + cdCanvasGetEllipseBox(xc, yc, w, h, a1, a2, &xmin, &xmax, &ymin, &ymax); + picUpdateBBox(ctxcanvas, xmin, ymin, 0); + picUpdateBBox(ctxcanvas, xmax, ymax, 0); + picUpdateBBox(ctxcanvas, xc, yc, 0); +} + +static void cdfsector(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + int xmin, xmax, ymin, ymax; + tPrimNode *prim = primCreate(CDPIC_FSECTOR); + primAddAttrib_Fill(prim, ctxcanvas->canvas); + prim->param.arcsectorchordf.xc = xc; + prim->param.arcsectorchordf.yc = yc; + prim->param.arcsectorchordf.w = w; + prim->param.arcsectorchordf.h = h; + prim->param.arcsectorchordf.angle1 = a1; + prim->param.arcsectorchordf.angle2 = a2; + picAddPrim(ctxcanvas, prim); + cdCanvasGetEllipseBox(_cdRound(xc), _cdRound(yc), _cdRound(w), _cdRound(h), a1, a2, &xmin, &xmax, &ymin, &ymax); + picUpdateBBox(ctxcanvas, xmin, ymin, 0); + picUpdateBBox(ctxcanvas, xmax, ymax, 0); + picUpdateBBox(ctxcanvas, _cdRound(xc), _cdRound(yc), 0); +} + +static void cdchord(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + int xmin, xmax, ymin, ymax; + tPrimNode *prim = primCreate(CDPIC_CHORD); + primAddAttrib_Fill(prim, ctxcanvas->canvas); + prim->param.arcsectorchord.xc = xc; + prim->param.arcsectorchord.yc = yc; + prim->param.arcsectorchord.w = w; + prim->param.arcsectorchord.h = h; + prim->param.arcsectorchord.angle1 = a1; + prim->param.arcsectorchord.angle2 = a2; + picAddPrim(ctxcanvas, prim); + cdCanvasGetEllipseBox(xc, yc, w, h, a1, a2, &xmin, &xmax, &ymin, &ymax); + picUpdateBBox(ctxcanvas, xmin, ymin, 0); + picUpdateBBox(ctxcanvas, xmax, ymax, 0); +} + +static void cdfchord(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + int xmin, xmax, ymin, ymax; + tPrimNode *prim = primCreate(CDPIC_FCHORD); + primAddAttrib_Fill(prim, ctxcanvas->canvas); + prim->param.arcsectorchordf.xc = xc; + prim->param.arcsectorchordf.yc = yc; + prim->param.arcsectorchordf.w = w; + prim->param.arcsectorchordf.h = h; + prim->param.arcsectorchordf.angle1 = a1; + prim->param.arcsectorchordf.angle2 = a2; + picAddPrim(ctxcanvas, prim); + cdCanvasGetEllipseBox(_cdRound(xc), _cdRound(yc), _cdRound(w), _cdRound(h), a1, a2, &xmin, &xmax, &ymin, &ymax); + picUpdateBBox(ctxcanvas, xmin, ymin, 0); + picUpdateBBox(ctxcanvas, xmax, ymax, 0); +} + +static void cdtext(cdCtxCanvas *ctxcanvas, int x, int y, const char *text, int len) +{ + int xmin, xmax, ymin, ymax; + tPrimNode *prim = primCreate(CDPIC_TEXT); + primAddAttrib_Text(prim, ctxcanvas->canvas); + prim->param.text.x = x; + prim->param.text.y = y; + prim->param.text.s = cdStrDupN(text, len); + prim->param_buffer = prim->param.text.s; + picAddPrim(ctxcanvas, prim); + cdCanvasGetTextBox(ctxcanvas->canvas, x, y, prim->param.text.s, &xmin, &xmax, &ymin, &ymax); + picUpdateBBox(ctxcanvas, xmin, ymin, 0); + picUpdateBBox(ctxcanvas, xmax, ymax, 0); +} + +static void cdftext(cdCtxCanvas *ctxcanvas, double x, double y, const char *text, int len) +{ + int xmin, xmax, ymin, ymax; + tPrimNode *prim = primCreate(CDPIC_FTEXT); + primAddAttrib_Text(prim, ctxcanvas->canvas); + prim->param.textf.x = x; + prim->param.textf.y = y; + prim->param.textf.s = cdStrDupN(text, len); + prim->param_buffer = prim->param.textf.s; + picAddPrim(ctxcanvas, prim); + cdCanvasGetTextBox(ctxcanvas->canvas, _cdRound(x), _cdRound(y), prim->param.text.s, &xmin, &xmax, &ymin, &ymax); + picUpdateBBox(ctxcanvas, xmin, ymin, 0); + picUpdateBBox(ctxcanvas, xmax, ymax, 0); +} + +static void cdpoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n) +{ + int i; + tPrimNode *prim; + if (mode == CD_CLIP || mode == CD_REGION) return; + prim = primCreate(CDPIC_POLY); + if (mode == CD_FILL) + primAddAttrib_Fill(prim, ctxcanvas->canvas); + else + primAddAttrib_Line(prim, ctxcanvas->canvas); + prim->param.poly.n = n; + prim->param.poly.points = malloc(n * sizeof(cdPoint)); + memcpy(prim->param.poly.points, poly, n * sizeof(cdPoint)); + prim->param_buffer = prim->param.poly.points; + picAddPrim(ctxcanvas, prim); + + for (i = 0; i < n; i++) + { + if (mode == CD_FILL) + picUpdateBBox(ctxcanvas, poly[i].x, poly[i].y, 0); + else + picUpdateBBox(ctxcanvas, poly[i].x, poly[i].y, ctxcanvas->canvas->line_width); + } +} + +static void cdfpoly(cdCtxCanvas *ctxcanvas, int mode, cdfPoint* poly, int n) +{ + int i; + tPrimNode *prim; + if (mode == CD_CLIP || mode == CD_REGION) return; + prim = primCreate(CDPIC_FPOLY); + if (mode == CD_FILL) + primAddAttrib_Fill(prim, ctxcanvas->canvas); + else + primAddAttrib_Line(prim, ctxcanvas->canvas); + prim->param.polyf.n = n; + prim->param.polyf.points = malloc(n * sizeof(cdPoint)); + memcpy(prim->param.polyf.points, poly, n * sizeof(cdPoint)); + prim->param_buffer = prim->param.polyf.points; + picAddPrim(ctxcanvas, prim); + + for (i = 0; i < n; i++) + { + if (mode == CD_FILL) + picUpdateBBox(ctxcanvas, _cdRound(poly[i].x), _cdRound(poly[i].y), 0); + else + picUpdateBBox(ctxcanvas, _cdRound(poly[i].x), _cdRound(poly[i].y), ctxcanvas->canvas->line_width); + } +} + +static void cdputimagerectrgb(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int l, offset, size; + unsigned char *dr, *dg, *db; + + tPrimNode *prim = primCreate(CDPIC_IMAGERGB); + prim->param.imagergba.iw = xmax-xmin+1; + prim->param.imagergba.ih = ymax-ymin+1; + prim->param.imagergba.x = x; + prim->param.imagergba.y = y; + prim->param.imagergba.w = w; + prim->param.imagergba.h = h; + + size = prim->param.imagergba.iw*prim->param.imagergba.ih; + prim->param_buffer = malloc(3*size); + prim->param.imagergba.r = prim->param_buffer; + prim->param.imagergba.g = prim->param.imagergba.r + size; + prim->param.imagergba.b = prim->param.imagergba.g + size; + + offset = ymin*iw + xmin; + r += offset; + g += offset; + b += offset; + + dr = prim->param.imagergba.r; + dg = prim->param.imagergba.g; + db = prim->param.imagergba.b; + offset = prim->param.imagergba.iw; + + for (l = ymin; l <= ymax; l++) + { + memcpy(dr, r, offset); + memcpy(dg, g, offset); + memcpy(db, b, offset); + + r += iw; + g += iw; + b += iw; + dr += offset; + dg += offset; + db += offset; + } + + picUpdateBBox(ctxcanvas, x, y, 0); + picUpdateBBox(ctxcanvas, x+prim->param.imagergba.iw-1, y+prim->param.imagergba.ih-1, 0); +} + +static void cdputimagerectrgba(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int l, offset, size; + unsigned char *dr, *dg, *db, *da; + + tPrimNode *prim = primCreate(CDPIC_IMAGERGBA); + prim->param.imagergba.iw = xmax-xmin+1; + prim->param.imagergba.ih = ymax-ymin+1; + prim->param.imagergba.x = x; + prim->param.imagergba.y = y; + prim->param.imagergba.w = w; + prim->param.imagergba.h = h; + + size = prim->param.imagergba.iw*prim->param.imagergba.ih; + prim->param_buffer = malloc(4*size); + prim->param.imagergba.r = prim->param_buffer; + prim->param.imagergba.g = prim->param.imagergba.r + size; + prim->param.imagergba.b = prim->param.imagergba.g + size; + prim->param.imagergba.a = prim->param.imagergba.b + size; + + offset = ymin*iw + xmin; + r += offset; + g += offset; + b += offset; + a += offset; + + dr = prim->param.imagergba.r; + dg = prim->param.imagergba.g; + db = prim->param.imagergba.b; + da = prim->param.imagergba.a; + offset = prim->param.imagergba.iw; + + for (l = ymin; l <= ymax; l++) + { + memcpy(dr, r, offset); + memcpy(dg, g, offset); + memcpy(db, b, offset); + memcpy(da, a, offset); + + r += iw; + g += iw; + b += iw; + a += iw; + dr += offset; + dg += offset; + db += offset; + da += offset; + } + + picUpdateBBox(ctxcanvas, x, y, 0); + picUpdateBBox(ctxcanvas, x+prim->param.imagergba.iw-1, y+prim->param.imagergba.ih-1, 0); +} + +static void cdputimagerectmap(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int c, l, n = 0, offset, size; + unsigned char *dindex; + long *dcolors; + + tPrimNode *prim = primCreate(CDPIC_IMAGEMAP); + prim->param.imagemap.iw = xmax-xmin+1; + prim->param.imagemap.ih = ymax-ymin+1; + prim->param.imagemap.x = x; + prim->param.imagemap.y = y; + prim->param.imagemap.w = w; + prim->param.imagemap.h = h; + + size = prim->param.imagemap.iw*prim->param.imagemap.ih; + prim->param_buffer = malloc(size + 256); + prim->param.imagemap.index = prim->param_buffer; + prim->param.imagemap.colors = (long*)(prim->param.imagemap.index + size); + + offset = ymin*iw + xmin; + index += offset; + + dindex = prim->param.imagemap.index; + dcolors = prim->param.imagemap.colors; + offset = iw - prim->param.imagemap.iw; + + for (l = ymin; l <= ymax; l++) + { + for (c = xmin; c <= xmax; c++) + { + if (*index > n) + n = *index; + + *dindex++ = *index++; + } + + index += offset; + } + + n++; + + for (c = 0; c < n; c++) + dcolors[c] = colors[c]; + + picUpdateBBox(ctxcanvas, x, y, 0); + picUpdateBBox(ctxcanvas, x+prim->param.imagemap.iw-1, y+prim->param.imagemap.ih-1, 0); +} + + +/**********/ +/* cdPlay */ +/**********/ + +typedef int(*_cdsizecb)(cdCanvas* canvas, int w, int h, double w_mm, double h_mm); +static _cdsizecb cdsizecb = NULL; + +static int cdregistercallback(int cb, cdCallback func) +{ + switch (cb) + { + case CD_SIZECB: + cdsizecb = (_cdsizecb)func; + return CD_OK; + } + + return CD_ERROR; +} + +#define sMin1(_v) (_v == 0? 1: _v) + +#define sScaleX(_x) cdRound((_x - pic_xmin) * factorX + xmin) +#define sScaleY(_y) cdRound((_y - pic_ymin) * factorY + ymin) +#define sScaleW(_w) sMin1(cdRound(_w * factorX)) +#define sScaleH(_h) sMin1(cdRound(_h * factorY)) + +#define sfScaleX(_x) ((_x - pic_xmin) * factorX + xmin) +#define sfScaleY(_y) ((_y - pic_ymin) * factorY + ymin) +#define sfScaleW(_w) (_w * factorX) +#define sfScaleH(_h) (_h * factorY) + +static int cdplay(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data) +{ + tPrimNode *prim; + cdCanvas* pic_canvas = (cdCanvas*)data; + cdCtxCanvas* ctxcanvas = pic_canvas->ctxcanvas; + int p, i, scale = 0, + pic_xmin = ctxcanvas->xmin, + pic_ymin = ctxcanvas->ymin; + double factorX = 1, factorY = 1; + + if ((ctxcanvas->xmax-ctxcanvas->xmin)!=0 && + (ctxcanvas->ymax-ctxcanvas->ymin)!=0 && + (xmax-xmin)!=0 && + (ymax-ymin)!=0) + { + scale = 1; + factorX = ((double)(xmax-xmin)) / (ctxcanvas->xmax-ctxcanvas->xmin); + factorY = ((double)(ymax-ymin)) / (ctxcanvas->ymax-ctxcanvas->ymin); + } + + if (cdsizecb) + { + int err; + err = cdsizecb(canvas, pic_canvas->w, pic_canvas->h, pic_canvas->w_mm, pic_canvas->h_mm); + if (err) + return CD_ERROR; + } + + prim = ctxcanvas->prim_first; + for (i = 0; i < ctxcanvas->prim_n; i++) + { + if (scale) + { + switch (prim->type) + { + case CDPIC_LINE: + primUpdateAttrib_Line(prim, canvas); + cdCanvasLine(canvas, sScaleX(prim->param.lineboxrect.x1), sScaleY(prim->param.lineboxrect.y1), sScaleX(prim->param.lineboxrect.x2), sScaleY(prim->param.lineboxrect.y2)); + break; + case CDPIC_FLINE: + primUpdateAttrib_Line(prim, canvas); + cdfCanvasLine(canvas, sfScaleX(prim->param.lineboxrectf.x1), sfScaleY(prim->param.lineboxrectf.y1), sfScaleX(prim->param.lineboxrectf.x2), sfScaleY(prim->param.lineboxrectf.y2)); + break; + case CDPIC_RECT: + primUpdateAttrib_Line(prim, canvas); + cdCanvasRect(canvas, sScaleX(prim->param.lineboxrect.x1), sScaleX(prim->param.lineboxrect.x2), sScaleY(prim->param.lineboxrect.y1), sScaleY(prim->param.lineboxrect.y2)); + break; + case CDPIC_FRECT: + primUpdateAttrib_Line(prim, canvas); + cdfCanvasRect(canvas, sfScaleX(prim->param.lineboxrectf.x1), sfScaleX(prim->param.lineboxrectf.x2), sfScaleY(prim->param.lineboxrectf.y1), sfScaleY(prim->param.lineboxrectf.y2)); + break; + case CDPIC_BOX: + primUpdateAttrib_Fill(prim, canvas); + cdCanvasBox(canvas, sScaleX(prim->param.lineboxrect.x1), sScaleX(prim->param.lineboxrect.x2), sScaleY(prim->param.lineboxrect.y1), sScaleY(prim->param.lineboxrect.y2)); + break; + case CDPIC_FBOX: + primUpdateAttrib_Fill(prim, canvas); + cdfCanvasBox(canvas, sfScaleX(prim->param.lineboxrectf.x1), sfScaleX(prim->param.lineboxrectf.x2), sfScaleY(prim->param.lineboxrectf.y1), sfScaleY(prim->param.lineboxrectf.y2)); + break; + case CDPIC_ARC: + primUpdateAttrib_Line(prim, canvas); + cdCanvasArc(canvas, sScaleX(prim->param.arcsectorchord.xc), sScaleY(prim->param.arcsectorchord.yc), sScaleW(prim->param.arcsectorchord.w), sScaleH(prim->param.arcsectorchord.h), prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_FARC: + primUpdateAttrib_Line(prim, canvas); + cdfCanvasArc(canvas, sfScaleX(prim->param.arcsectorchordf.xc), sfScaleY(prim->param.arcsectorchordf.yc), sfScaleW(prim->param.arcsectorchordf.w), sfScaleH(prim->param.arcsectorchordf.h), prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_SECTOR: + primUpdateAttrib_Fill(prim, canvas); + cdCanvasSector(canvas, sScaleX(prim->param.arcsectorchord.xc), sScaleY(prim->param.arcsectorchord.yc), sScaleW(prim->param.arcsectorchord.w), sScaleH(prim->param.arcsectorchord.h), prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_FSECTOR: + primUpdateAttrib_Fill(prim, canvas); + cdfCanvasSector(canvas, sfScaleX(prim->param.arcsectorchordf.xc), sfScaleY(prim->param.arcsectorchordf.yc), sfScaleW(prim->param.arcsectorchordf.w), sfScaleH(prim->param.arcsectorchordf.h), prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_CHORD: + primUpdateAttrib_Fill(prim, canvas); + cdCanvasChord(canvas, sScaleX(prim->param.arcsectorchord.xc), sScaleY(prim->param.arcsectorchord.yc), sScaleW(prim->param.arcsectorchord.w), sScaleH(prim->param.arcsectorchord.h), prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_FCHORD: + primUpdateAttrib_Fill(prim, canvas); + cdfCanvasChord(canvas, sfScaleX(prim->param.arcsectorchordf.xc), sfScaleY(prim->param.arcsectorchordf.yc), sfScaleW(prim->param.arcsectorchordf.w), sfScaleH(prim->param.arcsectorchordf.h), prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_TEXT: + primUpdateAttrib_Text(prim, canvas); + cdCanvasText(canvas, sScaleX(prim->param.text.x), sScaleY(prim->param.text.y), prim->param.text.s); + break; + case CDPIC_FTEXT: + primUpdateAttrib_Text(prim, canvas); + cdfCanvasText(canvas, sfScaleX(prim->param.textf.x), sfScaleY(prim->param.textf.y), prim->param.text.s); + break; + case CDPIC_POLY: + if (prim->param.poly.mode == CD_FILL) + primUpdateAttrib_Fill(prim, canvas); + else + primUpdateAttrib_Line(prim, canvas); + cdCanvasBegin(canvas, prim->param.poly.mode); + for (p = 0; p < prim->param.poly.n; p++) + cdCanvasVertex(canvas, sScaleX(prim->param.poly.points[p].x), sScaleY(prim->param.poly.points[p].y)); + cdCanvasEnd(canvas); + break; + case CDPIC_FPOLY: + if (prim->param.poly.mode == CD_FILL) + primUpdateAttrib_Fill(prim, canvas); + else + primUpdateAttrib_Line(prim, canvas); + cdCanvasBegin(canvas, prim->param.polyf.mode); + for (p = 0; p < prim->param.polyf.n; p++) + cdfCanvasVertex(canvas, sfScaleX(prim->param.polyf.points[p].x), sfScaleY(prim->param.polyf.points[p].y)); + cdCanvasEnd(canvas); + break; + case CDPIC_IMAGERGB: + cdCanvasPutImageRectRGB(canvas, prim->param.imagergba.iw, prim->param.imagergba.ih, prim->param.imagergba.r, prim->param.imagergba.g, prim->param.imagergba.b, sScaleX(prim->param.imagergba.x), sScaleY(prim->param.imagergba.y), sScaleW(prim->param.imagergba.w), sScaleH(prim->param.imagergba.h), 0, 0, 0, 0); + break; + case CDPIC_IMAGERGBA: + cdCanvasPutImageRectRGBA(canvas, prim->param.imagergba.iw, prim->param.imagergba.ih, prim->param.imagergba.r, prim->param.imagergba.g, prim->param.imagergba.b, prim->param.imagergba.a, sScaleX(prim->param.imagergba.x), sScaleY(prim->param.imagergba.y), sScaleW(prim->param.imagergba.w), sScaleH(prim->param.imagergba.h), 0, 0, 0, 0); + break; + case CDPIC_IMAGEMAP: + cdCanvasPutImageRectMap(canvas, prim->param.imagemap.iw, prim->param.imagemap.ih, prim->param.imagemap.index, prim->param.imagemap.colors, sScaleX(prim->param.imagemap.x), sScaleY(prim->param.imagemap.y), sScaleW(prim->param.imagemap.w), sScaleH(prim->param.imagemap.h), 0, 0, 0, 0); + break; + case CDPIC_PIXEL: + cdCanvasPixel(canvas, sScaleX(prim->param.pixel.x), sScaleY(prim->param.pixel.y), prim->param.pixel.color); + break; + } + } + else + { + switch (prim->type) + { + case CDPIC_LINE: + primUpdateAttrib_Line(prim, canvas); + cdCanvasLine(canvas, prim->param.lineboxrect.x1, prim->param.lineboxrect.y1, prim->param.lineboxrect.x2, prim->param.lineboxrect.y2); + break; + case CDPIC_FLINE: + primUpdateAttrib_Line(prim, canvas); + cdfCanvasLine(canvas, prim->param.lineboxrectf.x1, prim->param.lineboxrectf.y1, prim->param.lineboxrectf.x2, prim->param.lineboxrectf.y2); + break; + case CDPIC_RECT: + primUpdateAttrib_Line(prim, canvas); + cdCanvasRect(canvas, prim->param.lineboxrect.x1, prim->param.lineboxrect.x2, prim->param.lineboxrect.y1, prim->param.lineboxrect.y2); + break; + case CDPIC_FRECT: + primUpdateAttrib_Line(prim, canvas); + cdfCanvasRect(canvas, prim->param.lineboxrectf.x1, prim->param.lineboxrectf.x2, prim->param.lineboxrectf.y1, prim->param.lineboxrectf.y2); + break; + case CDPIC_BOX: + primUpdateAttrib_Fill(prim, canvas); + cdCanvasBox(canvas, prim->param.lineboxrect.x1, prim->param.lineboxrect.x2, prim->param.lineboxrect.y1, prim->param.lineboxrect.y2); + break; + case CDPIC_FBOX: + primUpdateAttrib_Fill(prim, canvas); + cdfCanvasBox(canvas, prim->param.lineboxrectf.x1, prim->param.lineboxrectf.x2, prim->param.lineboxrectf.y1, prim->param.lineboxrectf.y2); + break; + case CDPIC_ARC: + primUpdateAttrib_Line(prim, canvas); + cdCanvasArc(canvas, prim->param.arcsectorchord.xc, prim->param.arcsectorchord.yc, prim->param.arcsectorchord.w, prim->param.arcsectorchord.h, prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_FARC: + primUpdateAttrib_Line(prim, canvas); + cdfCanvasArc(canvas, prim->param.arcsectorchordf.xc, prim->param.arcsectorchordf.yc, prim->param.arcsectorchordf.w, prim->param.arcsectorchordf.h, prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_SECTOR: + primUpdateAttrib_Fill(prim, canvas); + cdCanvasSector(canvas, prim->param.arcsectorchord.xc, prim->param.arcsectorchord.yc, prim->param.arcsectorchord.w, prim->param.arcsectorchord.h, prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_FSECTOR: + primUpdateAttrib_Fill(prim, canvas); + cdfCanvasSector(canvas, prim->param.arcsectorchordf.xc, prim->param.arcsectorchordf.yc, prim->param.arcsectorchordf.w, prim->param.arcsectorchordf.h, prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_CHORD: + primUpdateAttrib_Fill(prim, canvas); + cdCanvasChord(canvas, prim->param.arcsectorchord.xc, prim->param.arcsectorchord.yc, prim->param.arcsectorchord.w, prim->param.arcsectorchord.h, prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_FCHORD: + primUpdateAttrib_Fill(prim, canvas); + cdfCanvasChord(canvas, prim->param.arcsectorchordf.xc, prim->param.arcsectorchordf.yc, prim->param.arcsectorchordf.w, prim->param.arcsectorchordf.h, prim->param.arcsectorchord.angle1, prim->param.arcsectorchord.angle2); + break; + case CDPIC_TEXT: + primUpdateAttrib_Text(prim, canvas); + cdCanvasText(canvas, prim->param.text.x, prim->param.text.y, prim->param.text.s); + break; + case CDPIC_FTEXT: + primUpdateAttrib_Text(prim, canvas); + cdfCanvasText(canvas, prim->param.textf.x, prim->param.textf.y, prim->param.text.s); + break; + case CDPIC_POLY: + if (prim->param.poly.mode == CD_FILL) + primUpdateAttrib_Fill(prim, canvas); + else + primUpdateAttrib_Line(prim, canvas); + cdCanvasBegin(canvas, prim->param.poly.mode); + for (p = 0; p < prim->param.poly.n; p++) + cdCanvasVertex(canvas, prim->param.poly.points[p].x, prim->param.poly.points[p].y); + cdCanvasEnd(canvas); + break; + case CDPIC_FPOLY: + if (prim->param.poly.mode == CD_FILL) + primUpdateAttrib_Fill(prim, canvas); + else + primUpdateAttrib_Line(prim, canvas); + cdCanvasBegin(canvas, prim->param.polyf.mode); + for (p = 0; p < prim->param.polyf.n; p++) + cdfCanvasVertex(canvas, prim->param.polyf.points[p].x, prim->param.polyf.points[p].y); + cdCanvasEnd(canvas); + break; + case CDPIC_IMAGERGB: + cdCanvasPutImageRectRGB(canvas, prim->param.imagergba.iw, prim->param.imagergba.ih, prim->param.imagergba.r, prim->param.imagergba.g, prim->param.imagergba.b, prim->param.imagergba.x, prim->param.imagergba.y, prim->param.imagergba.w, prim->param.imagergba.h, 0, 0, 0, 0); + break; + case CDPIC_IMAGERGBA: + cdCanvasPutImageRectRGBA(canvas, prim->param.imagergba.iw, prim->param.imagergba.ih, prim->param.imagergba.r, prim->param.imagergba.g, prim->param.imagergba.b, prim->param.imagergba.a, prim->param.imagergba.x, prim->param.imagergba.y, prim->param.imagergba.w, prim->param.imagergba.h, 0, 0, 0, 0); + break; + case CDPIC_IMAGEMAP: + cdCanvasPutImageRectMap(canvas, prim->param.imagemap.iw, prim->param.imagemap.ih, prim->param.imagemap.index, prim->param.imagemap.colors, prim->param.imagemap.x, prim->param.imagemap.y, prim->param.imagemap.w, prim->param.imagemap.h, 0, 0, 0, 0); + break; + case CDPIC_PIXEL: + cdCanvasPixel(canvas, prim->param.pixel.x, prim->param.pixel.y, prim->param.pixel.color); + break; + } + } + + prim = prim->next; + } + + return CD_OK; +} + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + cdclear(ctxcanvas); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +/*******************/ +/* Canvas Creation */ +/*******************/ + +static void cdcreatecanvas(cdCanvas *canvas, void *data) +{ + char* strdata = (char*)data; + double res = 3.78; + cdCtxCanvas* ctxcanvas; + + sscanf(strdata, "%lg", &res); + + ctxcanvas = (cdCtxCanvas *)malloc(sizeof(cdCtxCanvas)); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + + ctxcanvas->canvas = canvas; + canvas->ctxcanvas = ctxcanvas; + + /* update canvas context */ + canvas->w = 0; + canvas->h = 0; + canvas->w_mm = 0; + canvas->h_mm = 0; + canvas->bpp = 24; + canvas->xres = res; + canvas->yres = res; +} + +static void cdinittable(cdCanvas* canvas) +{ + canvas->cxClear = cdclear; + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxFLine = cdfline; + canvas->cxRect = cdrect; + canvas->cxFRect = cdfrect; + canvas->cxBox = cdbox; + canvas->cxFBox = cdfbox; + canvas->cxArc = cdarc; + canvas->cxFArc = cdfarc; + canvas->cxSector = cdsector; + canvas->cxFSector = cdfsector; + canvas->cxChord = cdchord; + canvas->cxFChord = cdfchord; + canvas->cxText = cdtext; + canvas->cxFText = cdftext; + canvas->cxPoly = cdpoly; + canvas->cxFPoly = cdfpoly; + canvas->cxPutImageRectRGB = cdputimagerectrgb; + canvas->cxPutImageRectRGBA = cdputimagerectrgba; + canvas->cxPutImageRectMap = cdputimagerectmap; + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdPictureContext = +{ + CD_CAP_ALL & ~(CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | + CD_CAP_REGION | CD_CAP_FONTDIM | CD_CAP_TEXTSIZE), + 0, + cdcreatecanvas, + cdinittable, + cdplay, + cdregistercallback, +}; + +cdContext* cdContextPicture(void) +{ + return &cdPictureContext; +} diff --git a/cd/src/drv/cdps.c b/cd/src/drv/cdps.c new file mode 100755 index 0000000..d5d62fe --- /dev/null +++ b/cd/src/drv/cdps.c @@ -0,0 +1,1838 @@ +/** \file + * \brief PS driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" +#include "cdps.h" + + +#define mm2pt(x) (CD_MM2PT*(x)) + +#ifndef min +#define min(a, b) ((a)<(b)?(a):(b)) +#endif +#ifndef max +#define max(a, b) ((a)>(b)?(a):(b)) +#endif + +/* +** dada uma cor do CD, obtem uma de suas componentes, na faixa 0-1. +*/ +#define get_red(_) (((double)cdRed(_))/255.) +#define get_green(_) (((double)cdGreen(_))/255.) +#define get_blue(_) (((double)cdBlue(_))/255.) + +/* ATENTION: currentmatrix/setmatrix + Remeber that there is a tranformation set just after file open, to define margins and pixel scale. + So use transformations carefully. +*/ + +static unsigned char HatchBits[6][8] = { /* [style][y] (8x8) */ + {0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00}, /* CD_HORIZONTAL */ + {0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, /* CD_VERTICAL */ + {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}, /* CD_BDIAGONAL */ + {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01}, /* CD_FDIAGONAL */ + {0x10, 0x10, 0x10, 0xFF, 0x10, 0x10, 0x10, 0x10}, /* CD_CROSS */ + {0x81, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x81}};/* CD_DIAGCROSS */ + + +struct _cdCtxCanvas +{ + cdCanvas* canvas; + + FILE *file; /* Arquivo PS */ + int res; /* Resolucao */ + int pages; /* Numero total de paginas */ + double width; /* Largura do papel (points) */ + double height; /* Altura do papel (points) */ + double xmin, ymin; /* Definem as margens esquerda e inferior (points) */ + double xmax, ymax; /* Definem as margens direita e superior (points) */ + double bbxmin, bbymin; /* Definem a bounding box */ + double bbxmax, bbymax; /* Definem a bounding box */ + double bbmargin; /* Define a margem para a bounding box */ + double scale; /* Fator de conversao de coordenadas (pixel2points) */ + int eps; /* Postscrip encapsulado? */ + int level1; /* if true generates level 1 only function calls */ + int landscape; /* page orientation */ + int debug; /* print debug strings in the file */ + float rotate_angle; + int rotate_center_x, + rotate_center_y; + + char *nativefontname[100]; /* Registra as fontes usadas */ + int num_native_font; + + int poly_holes[500]; + int holes; + +}; + + +/* +%F Ajusta o tamanho do papel em points. +*/ +static void setpspapersize(cdCtxCanvas *ctxcanvas, int size) +{ + static struct + { + int width; + int height; + } paper[] = + { + { 2393, 3391 }, /* A0 */ + { 1689, 2393 }, /* A1 */ + { 1192, 1689 }, /* A2 */ + { 842, 1192 }, /* A3 */ + { 595, 842 }, /* A4 */ + { 420, 595 }, /* A5 */ + { 612, 792 }, /* LETTER */ + { 612, 1008 } /* LEGAL */ + }; + + if (sizeCD_LEGAL) + return; + + ctxcanvas->width = (double)paper[size].width; + ctxcanvas->height = (double)paper[size].height; +} + +/* +%F Registra os valores default para impressao. +*/ +static void setpsdefaultvalues(cdCtxCanvas *ctxcanvas) +{ + /* all the other values are set to 0 */ + setpspapersize(ctxcanvas, CD_A4); + ctxcanvas->xmin = 25.4; /* ainda em mm, sera' convertido para points na init_ps */ + ctxcanvas->xmax = 25.4; + ctxcanvas->ymin = 25.4; + ctxcanvas->ymax = 25.4; + ctxcanvas->res = 300; +} + +/* +%F Insere o ponto (x, y) na BoundingBox corrente. +Nao leva em consideracao a espessura das linhas. +*/ +static void insertpoint(cdCtxCanvas *ctxcanvas, int x, int y) +{ + double xmin = x*ctxcanvas->scale + ctxcanvas->xmin - ctxcanvas->bbmargin; + double ymin = y*ctxcanvas->scale + ctxcanvas->ymin - ctxcanvas->bbmargin; + + double xmax = x*ctxcanvas->scale + ctxcanvas->xmin + ctxcanvas->bbmargin; + double ymax = y*ctxcanvas->scale + ctxcanvas->ymin + ctxcanvas->bbmargin; + + if (!ctxcanvas->bbxmin && !ctxcanvas->bbxmax && !ctxcanvas->bbymin && !ctxcanvas->bbymax) + { + ctxcanvas->bbxmin = xmin; + ctxcanvas->bbymin = ymin; + + ctxcanvas->bbxmax = xmax; + ctxcanvas->bbymax = ymax; + } + else + { + if (ctxcanvas->canvas->clip_mode == CD_CLIPAREA) + { + ctxcanvas->bbxmin = max(ctxcanvas->canvas->clip_rect.xmin*ctxcanvas->scale + ctxcanvas->xmin, min(ctxcanvas->bbxmin, xmin)); + ctxcanvas->bbymin = max(ctxcanvas->canvas->clip_rect.ymin*ctxcanvas->scale + ctxcanvas->ymin, min(ctxcanvas->bbymin, ymin)); + + ctxcanvas->bbxmax = min(ctxcanvas->canvas->clip_rect.xmax*ctxcanvas->scale + ctxcanvas->xmax, max(ctxcanvas->bbxmax, xmax)); + ctxcanvas->bbymax = min(ctxcanvas->canvas->clip_rect.ymax*ctxcanvas->scale + ctxcanvas->ymax, max(ctxcanvas->bbymax, ymax)); + } + else + { + ctxcanvas->bbxmin = max(ctxcanvas->xmin, min(ctxcanvas->bbxmin, xmin)); + ctxcanvas->bbymin = max(ctxcanvas->ymin, min(ctxcanvas->bbymin, ymin)); + + ctxcanvas->bbxmax = min(ctxcanvas->xmax, max(ctxcanvas->bbxmax, xmax)); + ctxcanvas->bbymax = min(ctxcanvas->ymax, max(ctxcanvas->bbymax, ymax)); + } + } +} + +/* +%F Ajusta a BoundingBox para conter o ponto (x,y). +Leva em consideracao a espessura das linhas. +*/ +static void bbox(cdCtxCanvas *ctxcanvas, int x, int y) +{ + if (ctxcanvas->canvas->line_width > 1) + { + insertpoint(ctxcanvas, x-ctxcanvas->canvas->line_width, y-ctxcanvas->canvas->line_width); + insertpoint(ctxcanvas, x+ctxcanvas->canvas->line_width, y+ctxcanvas->canvas->line_width); + } + else + insertpoint(ctxcanvas, x, y); +} + +static void fbbox(cdCtxCanvas *ctxcanvas, double x, double y) +{ + if (ctxcanvas->canvas->line_width > 1) + { + insertpoint(ctxcanvas, (int)(x-ctxcanvas->canvas->line_width), (int)(y-ctxcanvas->canvas->line_width)); + insertpoint(ctxcanvas, (int)(x+ctxcanvas->canvas->line_width), (int)(y+ctxcanvas->canvas->line_width)); + } + else + insertpoint(ctxcanvas, (int)x, (int)y); +} + +static char new_codes[] = {"\ +/newcodes % foreign character encodings\n\ +[\n\ +160/space 161/exclamdown 162/cent 163/sterling 164/currency\n\ +165/yen 166/brokenbar 167/section 168/dieresis 169/copyright\n\ +170/ordfeminine 171/guillemotleft 172/logicalnot 173/hyphen 174/registered\n\ +175/macron 176/degree 177/plusminus 178/twosuperior 179/threesuperior\n\ +180/acute 181/mu 182/paragraph 183/periodcentered 184/cedilla\n\ +185/onesuperior 186/ordmasculine 187/guillemotright 188/onequarter\n\ +189/onehalf 190/threequarters 191/questiondown 192/Agrave 193/Aacute\n\ +194/Acircumflex 195/Atilde 196/Adieresis 197/Aring 198/AE 199/Ccedilla\n\ +200/Egrave 201/Eacute 202/Ecircumflex 203/Edieresis 204/Igrave 205/Iacute\n\ +206/Icircumflex 207/Idieresis 208/Eth 209/Ntilde 210/Ograve 211/Oacute\n\ +212/Ocircumflex 213/Otilde 214/Odieresis 215/multiply 216/Oslash\n\ +217/Ugrave 218/Uacute 219/Ucircumflex 220/Udieresis 221/Yacute 222/Thorn\n\ +223/germandbls 224/agrave 225/aacute 226/acircumflex 227/atilde\n\ +228/adieresis 229/aring 230/ae 231/ccedilla 232/egrave 233/eacute\n\ +234/ecircumflex 235/edieresis 236/igrave 237/iacute 238/icircumflex\n\ +239/idieresis 240/eth 241/ntilde 242/ograve 243/oacute 244/ocircumflex\n\ +245/otilde 246/odieresis 247/divide 248/oslash 249/ugrave 250/uacute\n\ +251/ucircumflex 252/udieresis 253/yacute 254/thorn 255/ydieresis\n\ +] def\n\ +"}; + +static char change_font[] = {"\ +% change fonts using ISO Latin1 characters\n\ +/ChgFnt % size psname natname => font\n\ +{\n\ + dup FontDirectory exch known % is re-encoded name known?\n\ + { exch pop } % yes, get rid of long name\n\ + { dup 3 1 roll ReEncode } ifelse % no, re-encode it\n\ + findfont exch scalefont setfont\n\ +} def\n\ +"}; + +static char re_encode[] = {"\ +/ReEncode %\n\ +{\n\ + 12 dict begin\n\ + /newname exch def\n\ + /basename exch def\n\ + /basedict basename findfont def\n\ + /newfont basedict maxlength dict def\n\ + basedict\n\ + { exch dup /FID ne\n\ + { dup /Encoding eq\n\ + { exch dup length array copy newfont 3 1 roll put }\n\ + { exch newfont 3 1 roll put } ifelse\n\ + }\n\ + { pop pop } ifelse\n\ + } forall\n\ + newfont /FontName newname put\n\ + newcodes aload pop newcodes length 2 idiv\n\ + { newfont /Encoding get 3 1 roll put } repeat\n\ + newname newfont definefont pop\n\ + end\n\ +} def\n\ +"}; + +static void setcliprect(cdCtxCanvas* ctxcanvas, double xmin, double ymin, double xmax, double ymax) +{ + if (ctxcanvas->eps) /* initclip not allowed in EPS */ + return; + + fprintf(ctxcanvas->file, "initclip\n"); + + /* cliping geral para a margem */ + if (ctxcanvas->level1) + { + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%g %g M\n", xmin, ymin); + fprintf(ctxcanvas->file, "%g %g L\n", xmin, ymax); + fprintf(ctxcanvas->file, "%g %g L\n", xmax, ymax); + fprintf(ctxcanvas->file, "%g %g L\n", xmax, ymin); + fprintf(ctxcanvas->file, "C\n"); + fprintf(ctxcanvas->file, "clip\n"); + fprintf(ctxcanvas->file, "N\n"); + } + else + fprintf(ctxcanvas->file, "%g %g %g %g rectclip\n", xmin, ymin, xmax-xmin, ymax-ymin); +} + +static void set_default_matrix(cdCtxCanvas *ctxcanvas) +{ + if (ctxcanvas->eps) + fprintf(ctxcanvas->file, "oldmatrix setmatrix\n"); /* reset to current */ + else + { + fprintf(ctxcanvas->file, "[0 0 0 0 0 0] defaultmatrix\n"); /* reset to default */ + fprintf(ctxcanvas->file, "setmatrix\n"); + } + + /* margin and scale */ + fprintf(ctxcanvas->file, "%g %g translate\n", ctxcanvas->xmin, ctxcanvas->ymin); + fprintf(ctxcanvas->file, "%g %g scale\n", ctxcanvas->scale, ctxcanvas->scale); +} + +/* +%F Inicializa o arquivo PS. +*/ +static void init_ps(cdCtxCanvas *ctxcanvas) +{ + double w, h; + + time_t now = time(NULL); + + ctxcanvas->scale = 72.0/ctxcanvas->res; + ctxcanvas->xmin = mm2pt(ctxcanvas->xmin); + ctxcanvas->xmax = ctxcanvas->width - mm2pt(ctxcanvas->xmax); + ctxcanvas->ymin = mm2pt(ctxcanvas->ymin); + ctxcanvas->ymax = ctxcanvas->height - mm2pt(ctxcanvas->ymax); + ctxcanvas->bbmargin = mm2pt(ctxcanvas->bbmargin); + + fprintf(ctxcanvas->file, "%%!PS-Adobe-3.0 %s\n", ctxcanvas->eps ? "EPSF-3.0":""); + fprintf(ctxcanvas->file, "%%%%Title: CanvasDraw\n"); + fprintf(ctxcanvas->file, "%%%%Creator: CanvasDraw\n"); + fprintf(ctxcanvas->file, "%%%%CreationDate: %s", asctime(localtime(&now))); + fprintf(ctxcanvas->file, "%%%%DocumentFonts: (atend)\n"); /* attend means at the end of the file, */ + fprintf(ctxcanvas->file, "%%%%Pages: (atend)\n"); /* see killcanvas */ + fprintf(ctxcanvas->file, "%%%%PageOrder: Ascend\n"); + fprintf(ctxcanvas->file, "%%%%LanguageLevel: %d\n", ctxcanvas->level1 ? 1: 2); + fprintf(ctxcanvas->file, "%%%%Orientation: %s\n", ctxcanvas->landscape ? "Landscape": "Portrait"); + + if (ctxcanvas->eps) + { + fprintf(ctxcanvas->file, "%%%%BoundingBox: (atend)\n"); + ctxcanvas->bbxmin = ctxcanvas->bbxmax = ctxcanvas->bbymin = ctxcanvas->bbymax = 0; + /* BoundingBox==Empty */ + } + + fprintf(ctxcanvas->file, "%%%%EndComments\n"); + fprintf(ctxcanvas->file, "%%%%BeginProlog\n"); + + fprintf(ctxcanvas->file, "/N {newpath} bind def\n"); + fprintf(ctxcanvas->file, "/C {closepath} bind def\n"); + fprintf(ctxcanvas->file, "/M {moveto} bind def\n"); + fprintf(ctxcanvas->file, "/L {lineto} bind def\n"); + fprintf(ctxcanvas->file, "/B {curveto} bind def\n"); + fprintf(ctxcanvas->file, "/S {stroke} bind def\n"); + fprintf(ctxcanvas->file, "/LL {moveto lineto stroke} bind def\n"); + + if (!ctxcanvas->level1) + { + fprintf(ctxcanvas->file, "/RF {rectfill} bind def\n"); + fprintf(ctxcanvas->file, "/RS {rectstroke} bind def\n"); + } + + fprintf(ctxcanvas->file, "%%%%EndProlog\n"); + fprintf(ctxcanvas->file, "%%%%BeginSetup\n"); + + if (!ctxcanvas->eps && !ctxcanvas->level1) + { + fprintf(ctxcanvas->file, "%%%%IncludeFeature: *Resolution %d\n", ctxcanvas->res); + fprintf(ctxcanvas->file, "%%%%BeginFeature: *PageSize\n"); + fprintf(ctxcanvas->file, "<< /PageSize [%g %g] >> setpagedevice\n", ctxcanvas->width, ctxcanvas->height); /* setpagedevice not allowed in EPS */ + fprintf(ctxcanvas->file, "%%%%EndFeature\n"); + } + + fprintf(ctxcanvas->file, "%%%%EndSetup\n"); + + fputs(new_codes, ctxcanvas->file); + fputs(change_font, ctxcanvas->file); + fputs(re_encode, ctxcanvas->file); + + w = ctxcanvas->xmax - ctxcanvas->xmin; + h = ctxcanvas->ymax - ctxcanvas->ymin; + + ctxcanvas->canvas->w = (int)(w/ctxcanvas->scale + 0.5); /* Converte p/ unidades do usuario */ + ctxcanvas->canvas->h = (int)(h/ctxcanvas->scale + 0.5); /* Converte p/ unidades do usuario */ + ctxcanvas->canvas->w_mm = w/CD_MM2PT; /* Converte p/ milimetros */ + ctxcanvas->canvas->h_mm = h/CD_MM2PT; /* Converte p/ milimetros */ + ctxcanvas->canvas->bpp = 24; + ctxcanvas->canvas->xres = ctxcanvas->canvas->w / ctxcanvas->canvas->w_mm; + ctxcanvas->canvas->yres = ctxcanvas->canvas->h / ctxcanvas->canvas->h_mm; + + fprintf(ctxcanvas->file, "%%%%Page: 1 1\n"); + ctxcanvas->pages = 1; + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdCreateCanvas: Margin Begin\n"); + + if (ctxcanvas->eps) + fprintf(ctxcanvas->file, "/oldmatrix [0 0 0 0 0 0] currentmatrix def\n"); /* save current matrix */ + + set_default_matrix(ctxcanvas); + + /* cliping geral para a margem */ + setcliprect(ctxcanvas, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdCreateCanvas: MarginEnd\n"); +} + + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + int i; + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdKillCanvas\n"); + + fprintf(ctxcanvas->file, "showpage\n"); + fprintf(ctxcanvas->file, "%%%%Trailer\n"); + fprintf(ctxcanvas->file, "%%%%Pages: %d 1\n", ctxcanvas->pages); + + if (ctxcanvas->eps) + { + int xmin = (int)ctxcanvas->bbxmin; + int xmax = (int)ctxcanvas->bbxmax; + int ymin = (int)ctxcanvas->bbymin; + int ymax = (int)ctxcanvas->bbymax; + if (xmax < ctxcanvas->bbxmax) xmax++; + if (ymax < ctxcanvas->bbymax) ymax++; + fprintf(ctxcanvas->file,"%%%%BoundingBox: %5d %5d %5d %5d\n",xmin,ymin,xmax,ymax); + } + + fprintf(ctxcanvas->file, "%%%%DocumentFonts:"); + + for (i = 0; i < ctxcanvas->num_native_font; i++) + { + fprintf(ctxcanvas->file, " %s", ctxcanvas->nativefontname[i]); + free(ctxcanvas->nativefontname[i]); + } + + putc('\n', ctxcanvas->file); + fprintf(ctxcanvas->file,"%%%%EOF"); + + fclose(ctxcanvas->file); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +static void cddeactivate(cdCtxCanvas *ctxcanvas) +{ + fflush(ctxcanvas->file); +} + +static int cdhatch(cdCtxCanvas *ctxcanvas, int style); +static void cdstipple(cdCtxCanvas *ctxcanvas, int n, int m, const unsigned char *stipple); +static void cdpattern(cdCtxCanvas *ctxcanvas, int n, int m, const long int *pattern); + +static void update_fill(cdCtxCanvas *ctxcanvas, int fill) +{ + if (fill == 0) + { + /* called before a NON filled primitive */ + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdPsUpdateFill %d Begin\n", fill); + + fprintf(ctxcanvas->file, "%g %g %g setrgbcolor\n", get_red(ctxcanvas->canvas->foreground), + get_green(ctxcanvas->canvas->foreground), + get_blue(ctxcanvas->canvas->foreground)); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdPsUpdateFill %dEnd\n", fill); + } + else + { + /* called before a filled primitive */ + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdPsUpdateFill %d Begin\n", fill); + + if (ctxcanvas->canvas->interior_style == CD_SOLID) + { + fprintf(ctxcanvas->file, "%g %g %g setrgbcolor\n", get_red(ctxcanvas->canvas->foreground), + get_green(ctxcanvas->canvas->foreground), + get_blue(ctxcanvas->canvas->foreground)); + } + else if (!ctxcanvas->level1) + { + fprintf(ctxcanvas->file, "cd_pattern\n"); + fprintf(ctxcanvas->file, "setpattern\n"); + } + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdPsUpdateFill %dEnd\n", fill); + } +} + +/* +%F Comeca uma nova pagina. +*/ +static void cdflush(cdCtxCanvas *ctxcanvas) +{ + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdFlush Begin\n"); + + if (!ctxcanvas->eps) + { + fprintf(ctxcanvas->file, "gsave\n"); + + fprintf(ctxcanvas->file, "showpage\n"); + ctxcanvas->pages++; + fprintf(ctxcanvas->file, "%%%%Page: %d %d\n", ctxcanvas->pages, ctxcanvas->pages); + + fprintf(ctxcanvas->file, "grestore\n"); + } + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdFlushEnd\n"); +} + + +/******************************************************/ +/* coordinate transformation */ +/******************************************************/ + +static void cdfcliparea(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + if (ctxcanvas->canvas->clip_mode != CD_CLIPAREA) + return; + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdfClipArea Begin\n"); + + setcliprect(ctxcanvas, xmin, ymin, xmax, ymax); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdfClipAreaEnd\n"); +} + +static int cdclip(cdCtxCanvas *ctxcanvas, int mode) +{ + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdClip %d Begin\n", mode); + + if (mode == CD_CLIPAREA) + { + ctxcanvas->canvas->clip_mode = CD_CLIPAREA; + + setcliprect(ctxcanvas, (double)ctxcanvas->canvas->clip_rect.xmin, + (double)ctxcanvas->canvas->clip_rect.ymin, + (double)ctxcanvas->canvas->clip_rect.xmax, + (double)ctxcanvas->canvas->clip_rect.ymax); + } + else if (mode == CD_CLIPPOLYGON) + { + fprintf(ctxcanvas->file, "clip_polygon\n"); + } + else + { + /* margin clipping only */ + setcliprect(ctxcanvas, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); + } + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdClip %dEnd\n", mode); + + return mode; +} + +/******************************************************/ +/* primitives */ +/******************************************************/ + +static void cdline(cdCtxCanvas *ctxcanvas, int x1, int y1, int x2, int y2) +{ + update_fill(ctxcanvas, 0); + + fprintf(ctxcanvas->file, "N %d %d %d %d LL\n", x1, y1, x2, y2); + + if (ctxcanvas->eps) + { + bbox(ctxcanvas, x1, y1); + bbox(ctxcanvas, x2, y2); + } +} + +static void cdfline(cdCtxCanvas *ctxcanvas, double x1, double y1, double x2, double y2) +{ + update_fill(ctxcanvas, 0); + + fprintf(ctxcanvas->file, "N %g %g %g %g LL\n", x1, y1, x2, y2); + + if (ctxcanvas->eps) + { + fbbox(ctxcanvas, x1, y1); + fbbox(ctxcanvas, x2, y2); + } +} + +static void cdrect(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + update_fill(ctxcanvas, 0); + + if (ctxcanvas->level1) + { + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%d %d M\n", xmin, ymin); + fprintf(ctxcanvas->file, "%d %d L\n", xmin, ymax); + fprintf(ctxcanvas->file, "%d %d L\n", xmax, ymax); + fprintf(ctxcanvas->file, "%d %d L\n", xmax, ymin); + fprintf(ctxcanvas->file, "C S\n"); + } + else + fprintf(ctxcanvas->file, "%d %d %d %d RS\n", xmin, ymin, xmax - xmin, ymax - ymin); + + if (ctxcanvas->eps) + { + bbox(ctxcanvas, xmin, ymin); + bbox(ctxcanvas, xmax, ymax); + } +} + +static void cdfrect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + update_fill(ctxcanvas, 0); + + if (ctxcanvas->level1) + { + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%g %g M\n", xmin, ymin); + fprintf(ctxcanvas->file, "%g %g L\n", xmin, ymax); + fprintf(ctxcanvas->file, "%g %g L\n", xmax, ymax); + fprintf(ctxcanvas->file, "%g %g L\n", xmax, ymin); + fprintf(ctxcanvas->file, "C S\n"); + } + else + fprintf(ctxcanvas->file, "%g %g %g %g RS\n", xmin, ymin, xmax - xmin, ymax - ymin); + + if (ctxcanvas->eps) + { + fbbox(ctxcanvas, xmin, ymin); + fbbox(ctxcanvas, xmax, ymax); + } +} + +static void cdbox(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + update_fill(ctxcanvas, 1); + + if (ctxcanvas->level1) + { + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%d %d M\n", xmin, ymin); + fprintf(ctxcanvas->file, "%d %d L\n", xmin, ymax); + fprintf(ctxcanvas->file, "%d %d L\n", xmax, ymax); + fprintf(ctxcanvas->file, "%d %d L\n", xmax, ymin); + fprintf(ctxcanvas->file, "C fill\n"); + } + else + fprintf(ctxcanvas->file, "%d %d %d %d RF\n", xmin, ymin, xmax - xmin, ymax - ymin); + + if (ctxcanvas->eps) + { + bbox(ctxcanvas, xmin, ymin); + bbox(ctxcanvas, xmax, ymax); + } +} + +static void cdfbox(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + update_fill(ctxcanvas, 1); + + if (ctxcanvas->level1) + { + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%g %g M\n", xmin, ymin); + fprintf(ctxcanvas->file, "%g %g L\n", xmin, ymax); + fprintf(ctxcanvas->file, "%g %g L\n", xmax, ymax); + fprintf(ctxcanvas->file, "%g %g L\n", xmax, ymin); + fprintf(ctxcanvas->file, "C fill\n"); + } + else + fprintf(ctxcanvas->file, "%g %g %g %g RF\n", xmin, ymin, xmax - xmin, ymax - ymin); + + if (ctxcanvas->eps) + { + fbbox(ctxcanvas, xmin, ymin); + fbbox(ctxcanvas, xmax, ymax); + } +} + +static void cdarc(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + update_fill(ctxcanvas, 0); + + if (w==h) /* Circulo: PS implementa direto */ + { + fprintf(ctxcanvas->file, "N %d %d %g %g %g arc S\n", xc, yc, 0.5*w, a1, a2); + } + else /* Elipse: mudar a escala p/ criar a partir do circulo */ + { + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdArc Ellipse Begin\n"); + + fprintf(ctxcanvas->file, "[0 0 0 0 0 0] currentmatrix\n"); /* fill new matrix from CTM */ + fprintf(ctxcanvas->file, "%d %d translate\n", xc, yc); + fprintf(ctxcanvas->file, "1 %g scale\n", ((double)h)/w); + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "0 0 %g %g %g arc\n", 0.5*w, a1, a2); + fprintf(ctxcanvas->file, "S\n"); + fprintf(ctxcanvas->file, "setmatrix\n"); /* back to CTM */ + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdArc EllipseEnd\n"); + } + + if (ctxcanvas->eps) + { + int xmin, xmax, ymin, ymax; + cdCanvasGetEllipseBox(xc, yc, w, h, a1, a2, &xmin, &xmax, &ymin, &ymax); + bbox(ctxcanvas, xmin, ymin); + bbox(ctxcanvas, xmax, ymax); + } +} + +static void cdfarc(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + update_fill(ctxcanvas, 0); + + if (w==h) /* Circulo: PS implementa direto */ + { + fprintf(ctxcanvas->file, "N %g %g %g %g %g arc S\n", xc, yc, 0.5*w, a1, a2); + } + else /* Elipse: mudar a escala p/ criar a partir do circulo */ + { + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdfArc Ellipse Begin\n"); + + fprintf(ctxcanvas->file, "[0 0 0 0 0 0] currentmatrix\n"); + fprintf(ctxcanvas->file, "%g %g translate\n", xc, yc); + fprintf(ctxcanvas->file, "1 %g scale\n", h/w); + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "0 0 %g %g %g arc\n", 0.5*w, a1, a2); + fprintf(ctxcanvas->file, "S\n"); + fprintf(ctxcanvas->file, "setmatrix\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdfArc EllipseEnd\n"); + } + + if (ctxcanvas->eps) + { + int xmin, xmax, ymin, ymax; + cdCanvasGetEllipseBox(_cdRound(xc), _cdRound(yc), _cdRound(w), _cdRound(h), a1, a2, &xmin, &xmax, &ymin, &ymax); + bbox(ctxcanvas, xmin, ymin); + bbox(ctxcanvas, xmax, ymax); + } +} + +static void cdsector(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + update_fill(ctxcanvas, 1); + + if (w==h) /* Circulo: PS implementa direto */ + { + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdSector Circle Begin\n"); + + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%d %d M\n", xc, yc); + fprintf(ctxcanvas->file, "%d %d %g %g %g arc\n", xc, yc, 0.5*w, a1, a2); + fprintf(ctxcanvas->file, "C fill\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdSector CircleEnd\n"); + } + else /* Elipse: mudar a escala p/ criar a partir do circulo */ + { + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdSector Ellipse Begin\n"); + + fprintf(ctxcanvas->file, "[0 0 0 0 0 0] currentmatrix\n"); + fprintf(ctxcanvas->file, "%d %d translate\n", xc, yc); + fprintf(ctxcanvas->file, "1 %g scale\n", ((double)h)/w); + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "0 0 M\n"); + fprintf(ctxcanvas->file, "0 0 %g %g %g arc\n", 0.5*w, a1, a2); + fprintf(ctxcanvas->file, "C fill\n"); + fprintf(ctxcanvas->file, "setmatrix\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdSector EllipseEnd\n"); + } + + if (ctxcanvas->eps) + { + int xmin, xmax, ymin, ymax; + cdCanvasGetEllipseBox(xc, yc, w, h, a1, a2, &xmin, &xmax, &ymin, &ymax); + bbox(ctxcanvas, xmin, ymin); + bbox(ctxcanvas, xmax, ymax); + bbox(ctxcanvas, xc, yc); + } +} + +static void cdfsector(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + update_fill(ctxcanvas, 1); + + if (w==h) /* Circulo: PS implementa direto */ + { + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdfSector Circle Begin\n"); + + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%g %g M\n", xc, yc); + fprintf(ctxcanvas->file, "%g %g %g %g %g arc\n", xc, yc, 0.5*w, a1, a2); + fprintf(ctxcanvas->file, "C fill\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdfSector CircleEnd\n"); + } + else /* Elipse: mudar a escala p/ criar a partir do circulo */ + { + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdfSector Ellipse Begin\n"); + + fprintf(ctxcanvas->file, "[0 0 0 0 0 0] currentmatrix\n"); + fprintf(ctxcanvas->file, "%g %g translate\n", xc, yc); + fprintf(ctxcanvas->file, "1 %g scale\n", h/w); + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "0 0 M\n"); + fprintf(ctxcanvas->file, "0 0 %g %g %g arc\n", 0.5*w, a1, a2); + fprintf(ctxcanvas->file, "C fill\n"); + fprintf(ctxcanvas->file, "setmatrix\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdfSector EllipseEnd\n"); + } + + if (ctxcanvas->eps) + { + int xmin, xmax, ymin, ymax; + cdCanvasGetEllipseBox(_cdRound(xc), _cdRound(yc), _cdRound(w), _cdRound(h), a1, a2, &xmin, &xmax, &ymin, &ymax); + bbox(ctxcanvas, xmin, ymin); + bbox(ctxcanvas, xmax, ymax); + fbbox(ctxcanvas, xc, yc); + } +} + +static void cdchord(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + update_fill(ctxcanvas, 1); + + if (w==h) /* Circulo: PS implementa direto */ + { + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdChord Circle Begin\n"); + + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%d %d %g %g %g arc\n", xc, yc, 0.5*w, a1, a2); + fprintf(ctxcanvas->file, "C fill\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdChord CircleEnd\n"); + } + else /* Elipse: mudar a escala p/ criar a partir do circulo */ + { + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdChord Ellipse Begin\n"); + + fprintf(ctxcanvas->file, "[0 0 0 0 0 0] currentmatrix\n"); + fprintf(ctxcanvas->file, "%d %d translate\n", xc, yc); + fprintf(ctxcanvas->file, "1 %g scale\n", ((double)h)/w); + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "0 0 %g %g %g arc\n", 0.5*w, a1, a2); + fprintf(ctxcanvas->file, "C fill\n"); + fprintf(ctxcanvas->file, "setmatrix\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdChord EllipseEnd\n"); + } + + if (ctxcanvas->eps) + { + int xmin, xmax, ymin, ymax; + cdCanvasGetEllipseBox(xc, yc, w, h, a1, a2, &xmin, &xmax, &ymin, &ymax); + bbox(ctxcanvas, xmin, ymin); + bbox(ctxcanvas, xmax, ymax); + } +} + +static void cdfchord(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + update_fill(ctxcanvas, 1); + + if (w==h) /* Circulo: PS implementa direto */ + { + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdfChord Circle Begin\n"); + + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%g %g %g %g %g arc\n", xc, yc, 0.5*w, a1, a2); + fprintf(ctxcanvas->file, "C fill\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdfChord CircleEnd\n"); + } + else /* Elipse: mudar a escala p/ criar a partir do circulo */ + { + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdfChord Ellipse Begin\n"); + + fprintf(ctxcanvas->file, "[0 0 0 0 0 0] currentmatrix\n"); + fprintf(ctxcanvas->file, "%g %g translate\n", xc, yc); + fprintf(ctxcanvas->file, "1 %g scale\n", h/w); + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "0 0 %g %g %g arc\n", 0.5*w, a1, a2); + fprintf(ctxcanvas->file, "C fill\n"); + fprintf(ctxcanvas->file, "setmatrix\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdfChord EllipseEnd\n"); + } + + if (ctxcanvas->eps) + { + int xmin, xmax, ymin, ymax; + cdCanvasGetEllipseBox(_cdRound(xc), _cdRound(yc), _cdRound(w), _cdRound(h), a1, a2, &xmin, &xmax, &ymin, &ymax); + bbox(ctxcanvas, xmin, ymin); + bbox(ctxcanvas, xmax, ymax); + } +} + +static void cdtransform(cdCtxCanvas *ctxcanvas, const double* matrix); + +static void cdtext(cdCtxCanvas *ctxcanvas, int x, int y, const char *s, int len) +{ + int i; + int ascent, height, baseline; + + update_fill(ctxcanvas, 0); + + cdCanvasGetFontDim(ctxcanvas->canvas, NULL, &height, &ascent, NULL); + baseline = height - ascent; + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdText Begin\n"); + + if (ctxcanvas->canvas->use_matrix || ctxcanvas->rotate_angle) + set_default_matrix(ctxcanvas); + + fprintf(ctxcanvas->file, "N 0 0 M\n"); + putc('(', ctxcanvas->file); + + for (i=0; ifile); + putc(s[i], ctxcanvas->file); + } + + fprintf(ctxcanvas->file, ")\n"); + fprintf(ctxcanvas->file, "dup true charpath\n"); + fprintf(ctxcanvas->file, "flattenpath\n"); + fprintf(ctxcanvas->file, "pathbbox\n"); /* bbox na pilha: llx lly urx ury */ + fprintf(ctxcanvas->file, "exch\n"); /* troca o topo: llx lly ury urx */ + fprintf(ctxcanvas->file, "4 1 roll\n"); /* roda: urx llx lly ury */ + fprintf(ctxcanvas->file, "exch\n"); /* troca o topo: urx llx ury lly */ + fprintf(ctxcanvas->file, "sub\n"); /* subtrai: urx llx h */ + fprintf(ctxcanvas->file, "3 1 roll\n"); /* roda: h urx llx */ + fprintf(ctxcanvas->file, "sub\n"); /* subtrai: h w */ + fprintf(ctxcanvas->file, "0 0\n"); /* empilha: h w 0 0 */ + fprintf(ctxcanvas->file, "4 -1 roll\n"); /* roda: w 0 0 h */ + + if (ctxcanvas->canvas->use_matrix || ctxcanvas->rotate_angle) + cdtransform(ctxcanvas, ctxcanvas->canvas->use_matrix? ctxcanvas->canvas->matrix: NULL); + + fprintf(ctxcanvas->file, "gsave\n"); /* save to use local transform */ + fprintf(ctxcanvas->file, "%d %d translate\n", x, y); + + if (ctxcanvas->canvas->text_orientation != 0) + fprintf(ctxcanvas->file, "%g rotate\n", ctxcanvas->canvas->text_orientation); + + switch (ctxcanvas->canvas->text_alignment) /* Operacao em Y. topo da pilha: w x y h */ + { + case CD_NORTH: + case CD_NORTH_EAST: + case CD_NORTH_WEST: + fprintf(ctxcanvas->file, "%d sub sub\n", baseline); /* empilha, subtrai, subtrai: w x y-(h-baseline) */ + break; + case CD_EAST: + case CD_WEST: + case CD_CENTER: + fprintf(ctxcanvas->file, "2 div %d sub sub\n", baseline); /* empilha, divide, empilha, subtrai, subtrai: w x y-(h/2-baseline) */ + break; + case CD_SOUTH_EAST: + case CD_SOUTH: + case CD_SOUTH_WEST: + fprintf(ctxcanvas->file, "pop %d add\n", baseline); /* desempilha, empilha, adiciona: w x y+baseline */ + break; + case CD_BASE_RIGHT: + case CD_BASE_CENTER: + case CD_BASE_LEFT: + fprintf(ctxcanvas->file, "pop\n"); /* desempilha h: w x y */ + break; + } + + fprintf(ctxcanvas->file, "3 1 roll\n"); /* roda: y' w x */ + fprintf(ctxcanvas->file, "exch\n"); /* inverte: y' x w */ + + switch (ctxcanvas->canvas->text_alignment) /* Operacao em X, topo da pilha: x w */ + { + case CD_NORTH: + case CD_SOUTH: + case CD_CENTER: + case CD_BASE_CENTER: + fprintf(ctxcanvas->file, "2 div sub\n"); /* empilha, divide, subtrai: y' x-w/2 */ + break; + case CD_NORTH_EAST: + case CD_EAST: + case CD_SOUTH_EAST: + case CD_BASE_RIGHT: + fprintf(ctxcanvas->file, "sub\n"); /* subtrai: y' x-w */ + break; + case CD_SOUTH_WEST: + case CD_WEST: + case CD_NORTH_WEST: + case CD_BASE_LEFT: + fprintf(ctxcanvas->file, "pop\n"); /* desempilha: y' x */ + break; + } + + fprintf(ctxcanvas->file, "exch\n"); /* inverte: x' y' */ + fprintf(ctxcanvas->file, "M\n"); /* moveto */ + + fprintf(ctxcanvas->file, "show\n"); + + if (ctxcanvas->eps) + { + int xmin, xmax, ymin, ymax; + s = cdStrDupN(s, len); + cdCanvasGetTextBox(ctxcanvas->canvas, x, y, s, &xmin, &xmax, &ymin, &ymax); + free((char*)s); + bbox(ctxcanvas, xmin, ymin); + bbox(ctxcanvas, xmax, ymax); + } + + fprintf(ctxcanvas->file, "grestore\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdTextEnd\n"); +} + +static void cdpoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n) +{ + int i; + + if (mode == CD_CLIP) + { + if (ctxcanvas->eps) /* initclip not allowed in EPS */ + return; + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdPoly %d Begin\n", mode); + + fprintf(ctxcanvas->file, "/clip_polygon {\n"); + fprintf(ctxcanvas->file, "initclip\n"); + } + else + { + if (mode == CD_FILL) + update_fill(ctxcanvas, 1); + else + update_fill(ctxcanvas, 0); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdPoly %d Begin\n", mode); + } + + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%d %d M\n", poly[0].x, poly[0].y); + + if (ctxcanvas->eps) + bbox(ctxcanvas, poly[0].x, poly[0].y); + + if (mode == CD_BEZIER) + { + for (i=1; ifile, "%d %d %d %d %d %d B\n", poly[i].x, poly[i].y, + poly[i+1].x, poly[i+1].y, + poly[i+2].x, poly[i+2].y); + + if (ctxcanvas->eps) + { + bbox(ctxcanvas, poly[i].x, poly[i].y); + bbox(ctxcanvas, poly[i+2].x, poly[i+2].y); + bbox(ctxcanvas, poly[i+3].x, poly[i+3].y); + } + } + } + else + { + int hole_index = 0; + + for (i=1; iholes && i == ctxcanvas->poly_holes[hole_index]) + { + fprintf(ctxcanvas->file, "%d %d M\n", poly[i].x, poly[i].y); + hole_index++; + } + else + fprintf(ctxcanvas->file, "%d %d L\n", poly[i].x, poly[i].y); + + if (ctxcanvas->eps) + bbox(ctxcanvas, poly[i].x, poly[i].y); + } + } + + switch (mode) + { + case CD_CLOSED_LINES : + fprintf(ctxcanvas->file, "C S\n"); + break; + case CD_OPEN_LINES : + fprintf(ctxcanvas->file, "S\n"); + break; + case CD_BEZIER : + fprintf(ctxcanvas->file, "S\n"); + break; + case CD_FILL : + if (ctxcanvas->holes || ctxcanvas->canvas->fill_mode==CD_EVENODD) + fprintf(ctxcanvas->file, "eofill\n"); + else + fprintf(ctxcanvas->file, "fill\n"); + break; + case CD_CLIP : + if (ctxcanvas->canvas->fill_mode==CD_EVENODD) + fprintf(ctxcanvas->file, "C eoclip\n"); + else + fprintf(ctxcanvas->file, "C clip\n"); + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "} bind def\n"); + if (ctxcanvas->canvas->clip_mode == CD_CLIPPOLYGON) + fprintf(ctxcanvas->file, "clip_polygon\n"); + break; + } + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdPoly %dEnd\n", mode); +} + +static void cdfpoly(cdCtxCanvas *ctxcanvas, int mode, cdfPoint* poly, int n) +{ + int i, hole_index = 0; + + if (mode == CD_CLIP) + { + if (ctxcanvas->eps) /* initclip not allowed in EPS */ + return; + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdfPoly %d Begin\n", mode); + + fprintf(ctxcanvas->file, "/clip_polygon {\n"); + fprintf(ctxcanvas->file, "initclip\n"); + } + else + { + if (mode == CD_FILL) + update_fill(ctxcanvas, 1); + else + update_fill(ctxcanvas, 0); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdfPoly %d Begin\n", mode); + } + + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%g %g M\n", poly[0].x, poly[0].y); + + if (ctxcanvas->eps) + fbbox(ctxcanvas, poly[0].x, poly[0].y); + + for (i=1; iholes && i == ctxcanvas->poly_holes[hole_index]) + { + fprintf(ctxcanvas->file, "%g %g M\n", poly[i].x, poly[i].y); + hole_index++; + } + else + fprintf(ctxcanvas->file, "%g %g L\n", poly[i].x, poly[i].y); + + if (ctxcanvas->eps) + fbbox(ctxcanvas, poly[i].x, poly[i].y); + } + + switch (mode) + { + case CD_CLOSED_LINES : + fprintf(ctxcanvas->file, "C S\n"); + break; + case CD_OPEN_LINES : + fprintf(ctxcanvas->file, "S\n"); + break; + case CD_FILL : + if (ctxcanvas->holes || ctxcanvas->canvas->fill_mode==CD_EVENODD) + fprintf(ctxcanvas->file, "eofill\n"); + else + fprintf(ctxcanvas->file, "fill\n"); + break; + case CD_CLIP : + if (ctxcanvas->canvas->fill_mode==CD_EVENODD) + fprintf(ctxcanvas->file, "C eoclip\n"); + else + fprintf(ctxcanvas->file, "C clip\n"); + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "} bind def\n"); + if (ctxcanvas->canvas->clip_mode == CD_CLIPPOLYGON) + fprintf(ctxcanvas->file, "clip_polygon\n"); + break; + } + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdfPoly %dEnd\n", mode); +} + + +/******************************************************/ +/* attributes */ +/******************************************************/ + +static int cdlinestyle(cdCtxCanvas *ctxcanvas, int style) +{ + double mm = (72.0/25.4) / ctxcanvas->scale; + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdLineStyle %d Begin\n", style); + + fprintf(ctxcanvas->file, "["); + + switch (style) + { + case CD_CONTINUOUS : /* empty dash */ + fprintf(ctxcanvas->file, " "); + break; + case CD_DASHED : + fprintf(ctxcanvas->file, "%g %g", 3*mm, mm); + break; + case CD_DOTTED : + fprintf(ctxcanvas->file, "%g %g", mm, mm); + break; + case CD_DASH_DOT : + fprintf(ctxcanvas->file, "%g %g %g %g", 3*mm, mm, mm, mm); + break; + case CD_DASH_DOT_DOT : + fprintf(ctxcanvas->file, "%g %g %g %g %g %g", 3*mm, mm, mm, mm, mm, mm); + break; + case CD_CUSTOM : + { + int i; + for (i = 0; i < ctxcanvas->canvas->line_dashes_count; i++) + fprintf(ctxcanvas->file, "%g ", ctxcanvas->canvas->line_dashes[i]*mm); + } + break; + } + + fprintf(ctxcanvas->file, "] 0 setdash\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdLineStyle %dEnd\n", style); + + return style; +} + +static int cdlinewidth(cdCtxCanvas *ctxcanvas, int width) +{ + fprintf(ctxcanvas->file, "%d setlinewidth\n", width); + return width; +} + +static int cdlinejoin(cdCtxCanvas *ctxcanvas, int join) +{ + int cd2ps_join[] = {0, 2, 1}; + fprintf(ctxcanvas->file, "%d setlinejoin\n", cd2ps_join[join]); + return join; +} + +static int cdlinecap(cdCtxCanvas *ctxcanvas, int cap) +{ + int cd2ps_cap[] = {0, 2, 1}; + fprintf(ctxcanvas->file, "%d setlinecap\n", cd2ps_cap[cap]); + return cap; +} + +static void make_pattern(cdCtxCanvas *ctxcanvas, int n, int m, void* data, void (*data2rgb)(cdCtxCanvas *ctxcanvas, int n, int i, int j, void* data, unsigned char*r, unsigned char*g, unsigned char*b)) +{ + int i, j; + unsigned char r, g, b; + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "\n%%cdPsMakePattern Begin\n"); + + fprintf(ctxcanvas->file, "/cd_pattern\n"); + fprintf(ctxcanvas->file, "currentfile %d string readhexstring\n", n*m*3); + + for (j=0; jfile, "%02x%02x%02x", (int)r, (int)g, (int)b); + } + + fprintf(ctxcanvas->file, "\n"); + } + + fprintf(ctxcanvas->file, "pop\n"); + fprintf(ctxcanvas->file, "/Pat exch def\n"); + fprintf(ctxcanvas->file, "<<\n"); + fprintf(ctxcanvas->file, " /PatternType 1\n"); + fprintf(ctxcanvas->file, " /PaintType 1\n"); + fprintf(ctxcanvas->file, " /TilingType 1\n"); + fprintf(ctxcanvas->file, " /BBox [0 0 %d %d]\n", n, m); + fprintf(ctxcanvas->file, " /XStep %d /YStep %d\n", n, m); + fprintf(ctxcanvas->file, " /PaintProc {\n"); + fprintf(ctxcanvas->file, " pop\n"); + fprintf(ctxcanvas->file, " %d %d 8\n", n, m); + fprintf(ctxcanvas->file, " matrix\n"); + fprintf(ctxcanvas->file, " Pat\n"); + fprintf(ctxcanvas->file, " false 3\n"); + fprintf(ctxcanvas->file, " colorimage\n"); + fprintf(ctxcanvas->file, " }\n"); + fprintf(ctxcanvas->file, ">>\n"); + fprintf(ctxcanvas->file, "matrix\n"); + fprintf(ctxcanvas->file, "makepattern\n"); + fprintf(ctxcanvas->file, "def\n"); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdPsMakePatternEnd\n"); +} + +static void long2rgb(cdCtxCanvas *ctxcanvas, int n, int i, int j, void* data, unsigned char*r, unsigned char*g, unsigned char*b) +{ + long* long_data = (long*)data; + (void)ctxcanvas; + cdDecodeColor(long_data[j*n+i], r, g, b); +} + +static void cdpattern(cdCtxCanvas *ctxcanvas, int n, int m, const long int *pattern) +{ + if (ctxcanvas->level1) + return; + + make_pattern(ctxcanvas, n, m, (void*)pattern, long2rgb); +} + +static void uchar2rgb(cdCtxCanvas *ctxcanvas, int n, int i, int j, void* data, unsigned char*r, unsigned char*g, unsigned char*b) +{ + unsigned char* uchar_data = (unsigned char*)data; + if (uchar_data[j*n+i]) + cdDecodeColor(ctxcanvas->canvas->foreground, r, g, b); + else + cdDecodeColor(ctxcanvas->canvas->background, r, g, b); +} + +static void cdstipple(cdCtxCanvas *ctxcanvas, int n, int m, const unsigned char *stipple) +{ + if (ctxcanvas->level1) + return; + + make_pattern(ctxcanvas, n, m, (void*)stipple, uchar2rgb); +} + +static void ucharh2rgb(cdCtxCanvas *ctxcanvas, int n, int i, int j, void* data, unsigned char*r, unsigned char*g, unsigned char*b) +{ + unsigned char* uchar_data = (unsigned char*)data; + static unsigned char hatch; + (void)n; + if (i == 0) hatch = uchar_data[j]; + if (hatch & 0x80) + cdDecodeColor(ctxcanvas->canvas->foreground, r, g, b); + else + cdDecodeColor(ctxcanvas->canvas->background, r, g, b); + _cdRotateHatch(hatch); +} + +static int cdhatch(cdCtxCanvas *ctxcanvas, int style) +{ + if (ctxcanvas->level1) + return ctxcanvas->canvas->hatch_style; + + make_pattern(ctxcanvas, 8, 8, (void*)HatchBits[style], ucharh2rgb); + + return style; +} + +static void add_font_name(cdCtxCanvas *ctxcanvas, char *nativefontname) +{ + int size, i; + for (i = 0; i < ctxcanvas->num_native_font; i++) + { + if (cdStrEqualNoCase(ctxcanvas->nativefontname[i], nativefontname)) + return; + } + + size = strlen(nativefontname)+1; + ctxcanvas->nativefontname[ctxcanvas->num_native_font] = (char*)malloc(size); + memcpy(ctxcanvas->nativefontname[ctxcanvas->num_native_font], nativefontname, size); + ctxcanvas->num_native_font++; +} + +static char *findfont(const char* type_face, int style) +{ + static char font[1024]; + + static char *type[] = + { + "", /* CD_PLAIN */ + "-Bold", /* CD_BOLD */ + "-Oblique", /* CD_ITALIC */ + "-BoldOblique", /* CD_BOLD_ITALIC */ + + "-Roman", /* Plain p/ Times */ + "-Bold", /* Bold p/ Times */ + "-Italic", /* Italic p/ Times */ + "-BoldItalic" /* BoldItalic p/ Times */ + }; + + if (cdStrEqualNoCase(type_face, "System")) + type_face = "Courier"; + + if (cdStrEqualNoCase(type_face, "Times")) + style += 4; + + sprintf(font, "%s%s", type_face, type[style]); + + return font; +} + +static int cdfont(cdCtxCanvas *ctxcanvas, const char *type_face, int style, int size) +{ + char *nativefontname = findfont(type_face, style&3); /* no underline or strikeout support */ + int size_pixel = cdGetFontSizePixels(ctxcanvas->canvas, size); + fprintf(ctxcanvas->file, "%d /%s /%s-Latin1 ChgFnt\n", size_pixel, nativefontname, nativefontname); + add_font_name(ctxcanvas, nativefontname); + return 1; +} + +static void cdtransform(cdCtxCanvas *ctxcanvas, const double* matrix) +{ + set_default_matrix(ctxcanvas); + + if (matrix) + { + fprintf(ctxcanvas->file, "[%g %g %g %g %g %g] concat\n", matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + } + else + { + if (ctxcanvas->rotate_angle) + { + /* rotation = translate to point + rotation + translate back */ + fprintf(ctxcanvas->file, "%d %d translate\n", ctxcanvas->rotate_center_x, ctxcanvas->rotate_center_y); + fprintf(ctxcanvas->file, "%g rotate\n", (double)ctxcanvas->rotate_angle); + fprintf(ctxcanvas->file, "%d %d translate\n", -ctxcanvas->rotate_center_x, -ctxcanvas->rotate_center_y); + } + } +} + +/******************************************************/ +/* client images */ +/******************************************************/ + +static void cdputimagerectrgb(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int i, j, rw, rh; + rw = xmax-xmin+1; + rh = ymax-ymin+1; + (void)ih; + + if (ctxcanvas->level1) + return; + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdPutImageRectRGB Start\n"); + + fprintf(ctxcanvas->file, "[0 0 0 0 0 0] currentmatrix\n"); + fprintf(ctxcanvas->file, "%d %d translate\n", x, y); + fprintf(ctxcanvas->file, "%d %d scale\n", w, h); + + fprintf(ctxcanvas->file, "%d %d 8\n", rw, rh); + fprintf(ctxcanvas->file, "[%d 0 0 %d 0 0]\n", rw, rh); + fprintf(ctxcanvas->file, "{currentfile %d string readhexstring pop}\n", rw); + fprintf(ctxcanvas->file, "false 3\n"); + fprintf(ctxcanvas->file, "colorimage\n"); + + for (j=ymin; j<=ymax; j++) + { + for (i=xmin; i<=xmax; i++) + { + int pos = j*iw+i; + fprintf(ctxcanvas->file, "%02x%02x%02x", (int)r[pos], (int)g[pos], (int)b[pos]); + } + + fprintf(ctxcanvas->file, "\n"); + } + + fprintf(ctxcanvas->file, "setmatrix\n"); + + if (ctxcanvas->eps) + { + bbox(ctxcanvas, x, y); + bbox(ctxcanvas, x+rw-1, y+rh-1); + } + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdPutImageRectRGBEnd\n"); +} + +static int isgray(int size, const unsigned char *index, const long int *colors) +{ + int i, pal_size = 0; + unsigned char r, g, b; + + for (i = 0; i < size; i++) + { + if (index[i] > pal_size) + pal_size = index[i]; + } + + pal_size++; + + for (i = 0; i < pal_size; i++) + { + cdDecodeColor(colors[i], &r, &g, &b); + + if (i != r || r != g || g != b) + return 0; + } + + return 1; +} + +static void cdputimagerectmap(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int i, j, rw, rh, is_gray; + rw = xmax-xmin+1; + rh = ymax-ymin+1; + (void)ih; + + is_gray = isgray(iw*ih, index, colors); + + if (!is_gray && ctxcanvas->level1) + return; + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdPutImageRectMap Start\n"); + + fprintf(ctxcanvas->file, "[0 0 0 0 0 0] currentmatrix\n"); + fprintf(ctxcanvas->file, "%d %d translate\n", x, y); + fprintf(ctxcanvas->file, "%d %d scale\n", w, h); + + fprintf(ctxcanvas->file, "%d %d 8\n", rw, rh); + fprintf(ctxcanvas->file, "[%d 0 0 %d 0 0]\n", rw, rh); + fprintf(ctxcanvas->file, "{currentfile %d string readhexstring pop}\n", rw); + + if (is_gray) + { + fprintf(ctxcanvas->file, "image\n"); + + for (j=ymin; j<=ymax; j++) + { + for (i=xmin; i<=xmax; i++) + { + int pos = j*iw+i; + fprintf(ctxcanvas->file, "%02x", (int)index[pos]); + } + + fprintf(ctxcanvas->file, "\n"); + } + } + else + { + fprintf(ctxcanvas->file, "false 3\n"); + fprintf(ctxcanvas->file, "colorimage\n"); + + for (j=ymin; j<=ymax; j++) + { + for (i=xmin; i<=xmax; i++) + { + int pos = j*iw+i; + unsigned char r, g, b; + cdDecodeColor(colors[index[pos]], &r, &g, &b); + fprintf(ctxcanvas->file, "%02x%02x%02x", (int)r, (int)g, (int)b); + } + + fprintf(ctxcanvas->file, "\n"); + } + } + + fprintf(ctxcanvas->file, "setmatrix\n"); + + if (ctxcanvas->eps) + { + bbox(ctxcanvas, x, y); + bbox(ctxcanvas, x+rw-1, y+rh-1); + } + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdPutImageRectMapEnd\n"); +} + +/******************************************************/ +/* server images */ +/******************************************************/ + +static void cdpixel(cdCtxCanvas *ctxcanvas, int x, int y, long int color) +{ + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdPixel Start\n"); + + fprintf(ctxcanvas->file, "%g %g %g setrgbcolor\n", + get_red(color), get_green(color), get_blue(color)); + + if (ctxcanvas->level1) + { + fprintf(ctxcanvas->file, "N\n"); + fprintf(ctxcanvas->file, "%d %d 1 0 360 arc\n", x, y); + fprintf(ctxcanvas->file, "C fill\n"); + } + else + fprintf(ctxcanvas->file, "%d %d 1 1 RF\n", x, y); + + if (ctxcanvas->eps) + bbox(ctxcanvas, x, y); + + if (ctxcanvas->debug) fprintf(ctxcanvas->file, "%%cdPixelEnd\n"); +} + +/******************************************************/ +/* custom attributes */ +/******************************************************/ + +static void set_rotate_attrib(cdCtxCanvas *ctxcanvas, char* data) +{ + /* ignore ROTATE if transform is set */ + if (ctxcanvas->canvas->use_matrix) + return; + + if (data) + { + sscanf(data, "%g %d %d", &ctxcanvas->rotate_angle, + &ctxcanvas->rotate_center_x, + &ctxcanvas->rotate_center_y); + } + else + { + ctxcanvas->rotate_angle = 0; + ctxcanvas->rotate_center_x = 0; + ctxcanvas->rotate_center_y = 0; + } + + set_default_matrix(ctxcanvas); + + if (ctxcanvas->rotate_angle) + { + /* rotation = translate to point + rotation + translate back */ + fprintf(ctxcanvas->file, "%d %d translate\n", ctxcanvas->rotate_center_x, ctxcanvas->rotate_center_y); + fprintf(ctxcanvas->file, "%g rotate\n", (double)ctxcanvas->rotate_angle); + fprintf(ctxcanvas->file, "%d %d translate\n", -ctxcanvas->rotate_center_x, -ctxcanvas->rotate_center_y); + } +} + +static char* get_rotate_attrib(cdCtxCanvas *ctxcanvas) +{ + static char data[100]; + + if (!ctxcanvas->rotate_angle) + return NULL; + + sprintf(data, "%g %d %d", (double)ctxcanvas->rotate_angle, + ctxcanvas->rotate_center_x, + ctxcanvas->rotate_center_y); + + return data; +} + +static cdAttribute rotate_attrib = +{ + "ROTATE", + set_rotate_attrib, + get_rotate_attrib +}; + +static void set_cmd_attrib(cdCtxCanvas *ctxcanvas, char* data) +{ + fprintf(ctxcanvas->file, data); +} + +static cdAttribute cmd_attrib = +{ + "CMD", + set_cmd_attrib, + NULL +}; + +static void set_poly_attrib(cdCtxCanvas *ctxcanvas, char* data) +{ + int hole; + + if (data == NULL) + { + ctxcanvas->holes = 0; + return; + } + + sscanf(data, "%d", &hole); + ctxcanvas->poly_holes[ctxcanvas->holes] = hole; + ctxcanvas->holes++; +} + +static char* get_poly_attrib(cdCtxCanvas *ctxcanvas) +{ + static char holes[10]; + sprintf(holes, "%d", ctxcanvas->holes); + return holes; +} + +static cdAttribute poly_attrib = +{ + "POLYHOLE", + set_poly_attrib, + get_poly_attrib +}; + +/* +%F Cria um novo canvas PS +Parametros passados em data: +nome nome do arquivo de saida <= 255 caracteres +-p[num] tamanho do papel (A0-5, LETTER, LEGAL) +-w[num] largura do papel em milimetros +-h[num] altura do papel em milimetros +-l[num] margem esquerda em milimetros +-r[num] margem direita em milimetros +-b[num] margem inferior em milimetros +-t[num] margem superior em milimetros +-s[num] resolucao em dpi +-e encapsulated postscript +-1 level 1 operators only +-d[num] margem da bbox em milimetros para eps +*/ +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + char *line = (char *)data; + cdCtxCanvas *ctxcanvas; + char filename[10240] = ""; + + ctxcanvas = (cdCtxCanvas *)malloc(sizeof(cdCtxCanvas)); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + + line += cdGetFileName(line, filename); + if (filename[0] == 0) + return; + + if ((ctxcanvas->file = fopen(filename, "w")) == NULL) + { + free(ctxcanvas); + return; + } + + ctxcanvas->holes = 0; + cdRegisterAttribute(canvas, &poly_attrib); + cdRegisterAttribute(canvas, &cmd_attrib); + cdRegisterAttribute(canvas, &rotate_attrib); + + setpsdefaultvalues(ctxcanvas); + + while (*line != '\0') + { + while (*line != '\0' && *line != '-') + line++; + + if (*line != '\0') + { + float num; + line++; + switch (*line++) + { + case 'p': + { + int paper; + sscanf(line, "%d", &paper); + setpspapersize(ctxcanvas, paper); + break; + } + case 'w': + sscanf(line, "%g", &num); + ctxcanvas->width = mm2pt(num); + break; + case 'h': + sscanf(line, "%g", &num); + ctxcanvas->height = mm2pt(num); + break; + case 'l': + sscanf(line, "%g", &num); + ctxcanvas->xmin = num; + break; + case 'r': + sscanf(line, "%g", &num); + ctxcanvas->xmax = num; /* right margin, must be converted to xmax */ + break; + case 'b': + sscanf(line, "%g", &num); + ctxcanvas->ymin = num; + break; + case 't': + sscanf(line, "%g", &num); + ctxcanvas->ymax = num; /* top margin, must be converted to ymax */ + break; + case 's': + sscanf(line, "%d", &(ctxcanvas->res)); + break; + case 'e': + ctxcanvas->eps = 1; + break; + case 'o': + ctxcanvas->landscape = 1; + break; + case '1': + ctxcanvas->level1 = 1; + break; + case 'g': + ctxcanvas->debug = 1; + break; + case 'd': + sscanf(line, "%g", &num); + ctxcanvas->bbmargin = num; + break; + } + } + + while (*line != '\0' && *line != ' ') + line++; + } + + /* store the base canvas */ + ctxcanvas->canvas = canvas; + + /* update canvas context */ + canvas->ctxcanvas = ctxcanvas; + + if (ctxcanvas->landscape == 1) + { + _cdSwapDouble(ctxcanvas->width, ctxcanvas->height); + _cdSwapDouble(ctxcanvas->xmin, ctxcanvas->ymin); + _cdSwapDouble(ctxcanvas->xmax, ctxcanvas->ymax); + } + + init_ps(ctxcanvas); +} + +static void cdinittable(cdCanvas* canvas) +{ + canvas->cxFlush = cdflush; + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxPoly = cdpoly; + canvas->cxRect = cdrect; + canvas->cxBox = cdbox; + canvas->cxArc = cdarc; + canvas->cxSector = cdsector; + canvas->cxChord = cdchord; + canvas->cxText = cdtext; + canvas->cxPutImageRectRGB = cdputimagerectrgb; + canvas->cxPutImageRectMap = cdputimagerectmap; + canvas->cxFLine = cdfline; + canvas->cxFPoly = cdfpoly; + canvas->cxFRect = cdfrect; + canvas->cxFBox = cdfbox; + canvas->cxFArc = cdfarc; + canvas->cxFSector = cdfsector; + canvas->cxFChord = cdfchord; + canvas->cxClip = cdclip; + canvas->cxFClipArea = cdfcliparea; + canvas->cxLineStyle = cdlinestyle; + canvas->cxLineWidth = cdlinewidth; + canvas->cxLineCap = cdlinecap; + canvas->cxLineJoin = cdlinejoin; + canvas->cxPattern = cdpattern; + canvas->cxStipple = cdstipple; + canvas->cxHatch = cdhatch; + canvas->cxFont = cdfont; + canvas->cxTransform = cdtransform; + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxDeactivate = cddeactivate; +} + +static cdContext cdPSContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_PLAY | CD_CAP_PALETTE | + CD_CAP_REGION | CD_CAP_IMAGESRV | + CD_CAP_BACKGROUND | CD_CAP_BACKOPACITY | CD_CAP_WRITEMODE | + CD_CAP_FONTDIM | CD_CAP_TEXTSIZE | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +cdContext* cdContextPS(void) +{ + return &cdPSContext; +} diff --git a/cd/src/drv/cgm.c b/cd/src/drv/cgm.c new file mode 100755 index 0000000..e86baaf --- /dev/null +++ b/cd/src/drv/cgm.c @@ -0,0 +1,2280 @@ +/** \file + * \brief CGM library + * Extracted from GKS/PUC + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include + +#include +#include + +#include "cgm.h" + + +struct _cgmFunc +{ + /* write command header */ + void (*wch)( CGM *, int, int, int ); + + /* put colour index at colour index precision */ + void (*ci)( CGM *, unsigned long ); + + /* put color direct at colour direct precision */ + void (*cd)( CGM *, double ); + + /* put color direct at colour direct precision */ + void (*rgb)( CGM *, double, double, double ); + + /* put index at index precision */ + void (*ix)( CGM *, long ); + + /* put enum ( int*2 ) */ + void (*e)( CGM *, int, const char *l[] ); + + /* put int ( integer precision ) */ + void (*i)( CGM *, long ); + + /* put unsigned int ( integer precision ) */ + void (*u)( CGM *, unsigned long ); + + /* put real ( real precision ) */ + void (*r)( CGM *, double ); + + /* put string */ + void (*s)( CGM *, const char *, int ); + + /* put VDC at VDC mode and precision */ + void (*vdc)( CGM *, double ); + + /* put point at VDC mode and precision */ + void (*p)( CGM *, double, double ); + + /* put colour at colour mode and precision */ + void (*co)( CGM *, const void * ); + + /* put separator */ + void (*sep)( CGM *, const char * ); + + /* get column position */ + int (*get_col)( CGM * ); + + /* align at column number */ + void (*align)( CGM *, int ); + + /* nova linha */ + void (*nl)( CGM * ); + + /* terminate element */ + int (*term)( CGM * ); +}; + +typedef struct _cgmCommand +{ + const char *ct; + const char *c; +} cgmCommand; + +/************************************************ +* * +* Dados para nao-binario * +* * +************************************************/ + +/* delimiter elements */ + +static const cgmCommand _cgmX_NULL = { "" , "" }; +static const cgmCommand _cgmX_BEGMF = { "BEGMF" , "\x30\x20" }; +static const cgmCommand _cgmX_ENDMF = { "ENDMF" , "\x30\x21" }; +static const cgmCommand _cgmX_BEG_PIC = { "BEG_PIC" , "\x30\x22" }; +static const cgmCommand _cgmX_BEG_PIC_BODY = { "BEG_PIC_BODY" , "\x30\x23" }; +static const cgmCommand _cgmX_END_PIC = { "END_PIC" , "\x30\x24" }; + +/* metafile descriptor elements */ + +static const cgmCommand _cgmX_MF_VERSION = { "MF_VERSION" , "\x31\x20" }; +static const cgmCommand _cgmX_MF_DESC = { "MF_DESC" , "\x31\x21" }; +static const cgmCommand _cgmX_VDC_TYPE = { "VDC_TYPE" , "\x31\x22" }; +static const cgmCommand _cgmX_INTEGER_PREC = { "INTEGER_PREC" , "\x31\x23" }; +static const cgmCommand _cgmX_REAL_PREC = { "REAL_PREC" , "\x31\x24" }; +static const cgmCommand _cgmX_INDEX_PREC = { "INDEX_PREC" , "\x31\x25" }; +static const cgmCommand _cgmX_COLR_PREC = { "COLR_PREC" , "\x31\x26" }; +static const cgmCommand _cgmX_COLR_INDEX_PREC = { "COLR_INDEX_PREC" , "\x31\x27" }; +static const cgmCommand _cgmX_MAX_COLR_INDEX = { "MAX_COLR_INDEX" , "\x31\x28" }; +static const cgmCommand _cgmX_COLR_VALUE_EXT = { "COLR_VALUE_EXT" , "\x31\x29" }; +static const cgmCommand _cgmX_MF_ELEM_LIST = { "MF_ELEM_LIST" , "\x31\x2a" }; +static const cgmCommand _cgmX_BEG_MF_DEFAULTS = { "BEG_MF_DEFAULTS" , "\x31\x2b" }; +static const cgmCommand _cgmX_END_MF_DEFAULTS = { "END_MF_DEFAULTS" , "\x31\x2c" }; +static const cgmCommand _cgmX_FONT_LIST = { "FONT_LIST" , "\x31\x2d" }; +static const cgmCommand _cgmX_CHAR_SET_LIST = { "CHAR_SET_LIST" , "\x31\x2e" }; +static const cgmCommand _cgmX_CHAR_CODING = { "CHAR_CODING" , "\x31\x2f" }; + +/* picture descriptor elements */ + +static const cgmCommand _cgmX_SCALE_MODE = { "SCALE_MODE" , "\x30\x20" }; +static const cgmCommand _cgmX_COLR_MODE = { "COLR_MODE" , "\x30\x21" }; +static const cgmCommand _cgmX_LINE_WIDTH_MODE = { "LINE_WIDTH_MODE" , "\x30\x22" }; +static const cgmCommand _cgmX_MARKER_SIZE_MODE = { "MARKER_SIZE_MODE" , "\x30\x23" }; +static const cgmCommand _cgmX_EDGE_WIDTH_MODE = { "EDGE_WIDTH_MODE" , "\x30\x24" }; +static const cgmCommand _cgmX_VDC_EXTENT = { "VDC_EXT" , "\x30\x25" }; +static const cgmCommand _cgmX_BACK_COLR = { "BACK_COLR" , "\x30\x26" }; + +/* control elements */ + +static const cgmCommand _cgmX_VDC_INTEGER_PREC = { "VDC_INTEGER_PREC" , "\x30\x20" }; +static const cgmCommand _cgmX_VDC_REAL_PREC = { "VDC_REAL_PREC" , "\x30\x21" }; +static const cgmCommand _cgmX_AUX_COLR = { "AUX_COLR" , "\x30\x22" }; +static const cgmCommand _cgmX_TRANSPARENCY = { "TRANSPARENCY" , "\x30\x23" }; +static const cgmCommand _cgmX_CLIP_RECT = { "CLIP_RECT" , "\x30\x24" }; +static const cgmCommand _cgmX_CLIP = { "CLIP" , "\x30\x25" }; + +/* primitive elements */ + +static const cgmCommand _cgmX_LINE = { "LINE" , "\x20" }; +static const cgmCommand _cgmX_DISJT_LINE = { "DISJT_LINE" , "\x21" }; +static const cgmCommand _cgmX_MARKER = { "MARKER" , "\x22" }; +static const cgmCommand _cgmX_TEXT = { "TEXT" , "\x23" }; +static const cgmCommand _cgmX_RESTR_TEXT = { "RESTR_TEXT" , "\x24" }; +static const cgmCommand _cgmX_APND_TEXT = { "APND_TEXT" , "\x25" }; +static const cgmCommand _cgmX_POLYGON = { "POLYGON" , "\x26" }; +static const cgmCommand _cgmX_POLYGON_SET = { "POLYGON_SET" , "\x27" }; +static const cgmCommand _cgmX_CELL_ARRAY = { "CELL_ARRAY" , "\x28" }; +static const cgmCommand _cgmX_GDP = { "GDP" , "\x29" }; +static const cgmCommand _cgmX_RECT = { "RECT" , "\x2a" }; +static const cgmCommand _cgmX_CIRCLE = { "CIRCLE" , "\x34\x20" }; +static const cgmCommand _cgmX_ARC_3_PT = { "ARC_3_PT" , "\x34\x21" }; +static const cgmCommand _cgmX_ARC_3_PT_CLOSE = { "ARC_3_PT_CLOSE" , "\x34\x22" }; +static const cgmCommand _cgmX_ARC_CTR = { "ARC_CTR" , "\x34\x23" }; +static const cgmCommand _cgmX_ARC_CTR_CLOSE = { "ARC_CTR_CLOSE" , "\x34\x24" }; +static const cgmCommand _cgmX_ELLIPSE = { "ELLIPSE" , "\x34\x25" }; +static const cgmCommand _cgmX_ELLIP_ARC = { "ELLIP_ARC" , "\x34\x26" }; +static const cgmCommand _cgmX_ELLIP_ARC_CLOSE = { "ELLIP_ARC_CLOSE" , "\x34\x27" }; + +/* attribute elements */ + +static const cgmCommand _cgmX_LINE_INDEX = { "LINE_INDEX" , "\x35\x20" }; +static const cgmCommand _cgmX_LINE_TYPE = { "LINE_TYPE" , "\x35\x21" }; +static const cgmCommand _cgmX_LINE_WIDTH = { "LINE_WIDTH" , "\x35\x22" }; +static const cgmCommand _cgmX_LINE_COLR = { "LINE_COLR" , "\x35\x23" }; +static const cgmCommand _cgmX_MARKER_INDEX = { "MARKER_INDEX" , "\x35\x24" }; +static const cgmCommand _cgmX_MARKER_TYPE = { "MARKER_TYPE" , "\x35\x25" }; +static const cgmCommand _cgmX_MARKER_WIDTH = { "MARKER_SIZE" , "\x35\x26" }; +static const cgmCommand _cgmX_MARKER_COLR = { "MARKER_COLR" , "\x35\x27" }; +static const cgmCommand _cgmX_TEXT_INDEX = { "TEXT_INDEX" , "\x35\x30" }; +static const cgmCommand _cgmX_TEXT_FONT_INDEX = { "TEXT_FONT_INDEX" , "\x35\x31" }; +static const cgmCommand _cgmX_TEXT_PREC = { "TEXT_PREC" , "\x35\x32" }; +static const cgmCommand _cgmX_CHAR_EXPAN = { "CHAR_EXPAN" , "\x35\x33" }; +static const cgmCommand _cgmX_CHAR_SPACE = { "CHAR_SPACE" , "\x35\x34" }; +static const cgmCommand _cgmX_TEXT_COLR = { "TEXT_COLR" , "\x35\x35" }; +static const cgmCommand _cgmX_CHAR_HEIGHT = { "CHAR_HEIGHT" , "\x35\x36" }; +static const cgmCommand _cgmX_CHAR_ORI = { "CHAR_ORI" , "\x35\x37" }; +static const cgmCommand _cgmX_TEXT_PATH = { "TEXT_PATH" , "\x35\x38" }; +static const cgmCommand _cgmX_TEXT_ALIGN = { "TEXT_ALIGN" , "\x35\x39" }; +static const cgmCommand _cgmX_CHAR_SET_INDEX = { "CHAR_SET_INDEX" , "\x35\x3a" }; +static const cgmCommand _cgmX_ALT_CHAR_SET = { "ALT_CHAR_SET_INDEX" , "\x35\x3b" }; +static const cgmCommand _cgmX_FILL_INDEX = { "FILL_INDEX" , "\x36\x20" }; +static const cgmCommand _cgmX_INT_STYLE = { "INT_STYLE" , "\x36\x21" }; +static const cgmCommand _cgmX_FILL_COLR = { "FILL_COLR" , "\x36\x22" }; +static const cgmCommand _cgmX_HATCH_INDEX = { "HATCH_INDEX" , "\x36\x23" }; +static const cgmCommand _cgmX_PAT_INDEX = { "PAT_INDEX" , "\x36\x24" }; +static const cgmCommand _cgmX_EDGE_INDEX = { "EDGE_INDEX" , "\x36\x25" }; +static const cgmCommand _cgmX_EDGE_TYPE = { "EDGE_TYPE" , "\x36\x26" }; +static const cgmCommand _cgmX_EDGE_WIDTH = { "EDGE_WIDTH" , "\x36\x27" }; +static const cgmCommand _cgmX_EDGE_COLR = { "EDGE_COLR" , "\x36\x28" }; +static const cgmCommand _cgmX_EDGE_VIS = { "EDGE_VIS" , "\x36\x29" }; +static const cgmCommand _cgmX_FILL_REF_PT = { "FILL_REF_PT" , "\x36\x2a" }; +static const cgmCommand _cgmX_PAT_TABLE = { "PAT_TABLE" , "\x36\x2b" }; +static const cgmCommand _cgmX_PAT_SIZE = { "PAT_SIZE" , "\x36\x2c" }; +static const cgmCommand _cgmX_COLR_TABLE = { "COLR_TABLE" , "\x36\x30" }; +static const cgmCommand _cgmX_ASF = { "ASF" , "\x36\x31" }; + +/* escape elements */ + +static const cgmCommand _cgmX_ESCAPE = { "ESCAPE" , "\x37\x20" }; +static const cgmCommand _cgmX_DOMAIN_RING = { "DOMAIN_RING" , "\x37\x30" }; + +/* external elements */ + +static const cgmCommand _cgmX_MESSAGE = { "MESSAGE" , "\x37\x21" }; +static const cgmCommand _cgmX_APPL_DATA = { "APPL_DATA" , "\x37\x22" }; + +/* drawing sets */ +static const cgmCommand _cgmX_DRAWING_SET = { "drawing_set" , "\x40" }; +static const cgmCommand _cgmX_DRAWING_PLUS = { "drawing_plus" , "\x41" }; + +static const cgmCommand *_elements_list_sets[] = { + & _cgmX_DRAWING_SET, + & _cgmX_DRAWING_PLUS, + NULL }; + + +static const cgmCommand *delimiter[] = { + & _cgmX_NULL, + & _cgmX_BEGMF, + & _cgmX_ENDMF, + & _cgmX_BEG_PIC, + & _cgmX_BEG_PIC_BODY, + & _cgmX_END_PIC, + NULL }; + +static const cgmCommand *metafile[] = { + & _cgmX_END_MF_DEFAULTS, + & _cgmX_MF_VERSION, + & _cgmX_MF_DESC, + & _cgmX_VDC_TYPE, + & _cgmX_INTEGER_PREC, + & _cgmX_REAL_PREC, + & _cgmX_INDEX_PREC, + & _cgmX_COLR_PREC, + & _cgmX_COLR_INDEX_PREC, + & _cgmX_MAX_COLR_INDEX, + & _cgmX_COLR_VALUE_EXT, + & _cgmX_MF_ELEM_LIST, + & _cgmX_BEG_MF_DEFAULTS, + & _cgmX_FONT_LIST, + & _cgmX_CHAR_SET_LIST, + & _cgmX_CHAR_CODING, + NULL }; + +static const cgmCommand *picture[] = { + & _cgmX_NULL, + & _cgmX_SCALE_MODE, + & _cgmX_COLR_MODE, + & _cgmX_LINE_WIDTH_MODE, + & _cgmX_MARKER_SIZE_MODE, + & _cgmX_EDGE_WIDTH_MODE, + & _cgmX_VDC_EXTENT, + & _cgmX_BACK_COLR, + NULL }; + +static const cgmCommand *control[] = { + & _cgmX_NULL, + & _cgmX_VDC_INTEGER_PREC, + & _cgmX_VDC_REAL_PREC, + & _cgmX_AUX_COLR, + & _cgmX_TRANSPARENCY, + & _cgmX_CLIP_RECT, + & _cgmX_CLIP, + NULL }; + +static const cgmCommand *primitive[] = { + & _cgmX_NULL, + & _cgmX_LINE, + & _cgmX_DISJT_LINE, + & _cgmX_MARKER, + & _cgmX_TEXT, + & _cgmX_RESTR_TEXT, + & _cgmX_APND_TEXT, + & _cgmX_POLYGON, + & _cgmX_POLYGON_SET, + & _cgmX_CELL_ARRAY, + & _cgmX_GDP, + & _cgmX_RECT, + & _cgmX_CIRCLE, + & _cgmX_ARC_3_PT, + & _cgmX_ARC_3_PT_CLOSE, + & _cgmX_ARC_CTR, + & _cgmX_ARC_CTR_CLOSE, + & _cgmX_ELLIPSE, + & _cgmX_ELLIP_ARC, + & _cgmX_ELLIP_ARC_CLOSE, + NULL }; + +static const cgmCommand *attributes[] = { + & _cgmX_NULL, + & _cgmX_LINE_INDEX, + & _cgmX_LINE_TYPE, + & _cgmX_LINE_WIDTH, + & _cgmX_LINE_COLR, + & _cgmX_MARKER_INDEX, + & _cgmX_MARKER_TYPE, + & _cgmX_MARKER_WIDTH, + & _cgmX_MARKER_COLR, + & _cgmX_TEXT_INDEX, + & _cgmX_TEXT_FONT_INDEX, + & _cgmX_TEXT_PREC, + & _cgmX_CHAR_EXPAN, + & _cgmX_CHAR_SPACE, + & _cgmX_TEXT_COLR, + & _cgmX_CHAR_HEIGHT, + & _cgmX_CHAR_ORI, + & _cgmX_TEXT_PATH, + & _cgmX_TEXT_ALIGN, + & _cgmX_CHAR_SET_INDEX, + & _cgmX_ALT_CHAR_SET, + & _cgmX_FILL_INDEX, + & _cgmX_INT_STYLE, + & _cgmX_FILL_COLR, + & _cgmX_HATCH_INDEX, + & _cgmX_PAT_INDEX, + & _cgmX_EDGE_INDEX, + & _cgmX_EDGE_TYPE, + & _cgmX_EDGE_WIDTH, + & _cgmX_EDGE_COLR, + & _cgmX_EDGE_VIS, + & _cgmX_FILL_REF_PT, + & _cgmX_PAT_TABLE, + & _cgmX_PAT_SIZE, + & _cgmX_COLR_TABLE, + & _cgmX_ASF, + NULL }; + +static const cgmCommand *escape[] = { + & _cgmX_NULL, + & _cgmX_ESCAPE, + & _cgmX_DOMAIN_RING, + NULL }; + +static const cgmCommand *external[] = { + & _cgmX_NULL, + & _cgmX_MESSAGE, + & _cgmX_APPL_DATA, + NULL }; + +static const cgmCommand **comandos[] = { + _elements_list_sets, + delimiter, + metafile, + picture, + control, + primitive, + attributes, + escape, + external, + NULL }; + +#define unit (cgm->file) + +/************************************************ +* * +* listas de funcoes necessarias * +* * +************************************************/ + + +static void cgmb_wch ( CGM *, int, int, int ); /* write command header */ +static void cgmb_ci ( CGM *, unsigned long ); /* put colour index at colour index precision */ +static void cgmb_cd ( CGM *, double ); /* put color direct at colour direct precision */ +static void cgmb_rgb ( CGM *, double, double, double ); /* put color direct (rgb) at colour direct precision */ +static void cgmb_ix ( CGM *, long ); /* put index at index precision */ +static void cgmb_e ( CGM *, int, const char *l[] ); /* put enum ( int*2 ) */ +static void cgmb_i ( CGM *, long ); /* put int ( integer precision ) */ +static void cgmb_u ( CGM *, unsigned long ); /* put unsigned int ( integer precision ) */ +static void cgmb_r ( CGM *, double ); /* put real ( real precision ) */ +static void cgmb_s ( CGM *, const char *, int ); /* put string */ +static void cgmb_vdc ( CGM *, double ); /* put VDC at VDC mode and precision */ +static void cgmb_p ( CGM *, double, double ); /* put point at VDC mode and precision */ +static void cgmb_co ( CGM *, const void * ); /* put colour at colour mode and precision */ +static void cgmb_sep ( CGM *, const char * ); /* put separator */ +static int cgmb_get_col ( CGM * ); /* get column position */ +static void cgmb_align ( CGM *, int ); /* align at column number */ +static void cgmb_nl ( CGM * ); /* new line */ +static int cgmb_term ( CGM * ); /* terminate element */ + +static const CGMFUNC cgmf_binary = { + cgmb_wch , + cgmb_ci , + cgmb_cd , + cgmb_rgb , + cgmb_ix , + cgmb_e , + cgmb_i , + cgmb_u , + cgmb_r , + cgmb_s , + cgmb_vdc , + cgmb_p , + cgmb_co , + cgmb_sep , + cgmb_get_col, + cgmb_align , + cgmb_nl , + cgmb_term + }; + +static void cgmt_wch ( CGM *, int, int, int ); /* write command header */ +static void cgmt_ci ( CGM *, unsigned long ); /* put colour index at colour index precision */ +static void cgmt_cd ( CGM *, double ); /* put color direct at colour direct precision */ +static void cgmt_rgb ( CGM *, double, double, double ); /* put color direct (rgb) at colour direct precision */ +static void cgmt_ix ( CGM *, long ); /* put index at index precision */ +static void cgmt_e ( CGM *, int, const char *l[] ); /* put enum ( int*2 ) */ +static void cgmt_i ( CGM *, long ); /* put int ( integer precision ) */ +static void cgmt_u ( CGM *, unsigned long ); /* put unsigned int ( integer precision ) */ +static void cgmt_r ( CGM *, double ); /* put real ( real precision ) */ +static void cgmt_s ( CGM *, const char *, int ); /* put string */ +static void cgmt_vdc ( CGM *, double ); /* put VDC at VDC mode and precision */ +static void cgmt_p ( CGM *, double, double ); /* put point at VDC mode and precision */ +static void cgmt_co ( CGM *, const void * ); /* put colour at colour mode and precision */ +static void cgmt_sep ( CGM *, const char * ); /* put separator */ +static int cgmt_get_col ( CGM * ); /* get column position */ +static void cgmt_align ( CGM *, int ); /* align at column number */ +static void cgmt_nl ( CGM * ); /* new line */ +static int cgmt_term ( CGM * ); /* terminate element */ + +static const CGMFUNC cgmf_clear_text = { + cgmt_wch , + cgmt_ci , + cgmt_cd , + cgmt_rgb , + cgmt_ix , + cgmt_e , + cgmt_i , + cgmt_u , + cgmt_r , + cgmt_s , + cgmt_vdc , + cgmt_p , + cgmt_co , + cgmt_sep , + cgmt_get_col, + cgmt_align , + cgmt_nl , + cgmt_term + }; + +static void cgmc_wch ( CGM *, int, int, int ); /* write command header */ +static void cgmc_ci ( CGM *, unsigned long ); /* put colour index at colour index precision */ +static void cgmc_cd ( CGM *, double ); /* put color direct at colour direct precision */ +static void cgmc_rgb ( CGM *, double, double, double ); /* put color direct (rgb) at colour direct precision */ +static void cgmc_ix ( CGM *, long ); /* put index at index precision */ +static void cgmc_e ( CGM *, int, const char *l[] ); /* put enum ( int*2 ) */ +static void cgmc_i ( CGM *, long ); /* put int ( integer precision ) */ +static void cgmc_u ( CGM *, unsigned long ); /* put unsigned int ( integer precision ) */ +static void cgmc_r ( CGM *, double ); /* put real ( real precision ) */ +static void cgmc_s ( CGM *, const char *, int ); /* put string */ +static void cgmc_vdc ( CGM *, double ); /* put VDC at VDC mode and precision */ +static void cgmc_p ( CGM *, double, double ); /* put point at VDC mode and precision */ +static void cgmc_co ( CGM *, const void * ); /* put colour at colour mode and precision */ +static void cgmc_sep ( CGM *, const char * ); /* put separator */ +static int cgmc_get_col ( CGM * ); /* get column position */ +static void cgmc_align ( CGM *, int ); /* align at column number */ +static void cgmc_nl ( CGM * ); /* new line */ +static int cgmc_term ( CGM * ); /* terminate element */ + +static const CGMFUNC cgmf_character = { + cgmc_wch , + cgmc_ci , + cgmc_cd , + cgmc_rgb , + cgmc_ix , + cgmc_e , + cgmc_i , + cgmc_u , + cgmc_r , + cgmc_s , + cgmc_vdc , + cgmc_p , + cgmc_co , + cgmc_sep , + cgmc_get_col, + cgmc_align , + cgmc_nl , + cgmc_term + }; + +static const CGMFUNC *cgmf[] = { &cgmf_character, &cgmf_binary, &cgmf_clear_text }; + +/************************************************ +* * +* Funcoes para binario * +* * +************************************************/ + +#define cgmb_putw cgmb_putu16 +#define cgmb_putb(a,b) cgmb_putc((a),(int)(b)) + +static void cgmb_putw ( CGM *, unsigned ); + +static void cgmb_putc ( CGM *cgm, int b ) +{ + if ( cgm->op != -1 ) + { + register int i; + for ( i=cgm->op; i>=0; i-- ) + { + if ( cgm->bc[i] == 32766 - 2*i ) + { + long po = ftell(unit); + int op = cgm->op; + + cgm->op = -1; + fseek(unit, cgm->po[i] , SEEK_SET); + cgmb_putw ( cgm, (1 << 15) | (cgm->bc[i]) ); + + cgm->op = i - 1; + fseek(unit, po, SEEK_SET); + cgmb_putw ( cgm, 0 ); + + cgm->op = op; + cgm->bc[i] = 0; + cgm->po[i] = po; + } + cgm->bc[i] ++; + } + } + + fputc ( b, unit ); +} + + +static void cgmb_puti8 ( CGM *cgm, int b ) +{ + cgmb_putb ( cgm, b ); +} + +static void cgmb_puti16 ( CGM *cgm, int b ) +{ + cgmb_putb ( cgm, b >> 8 ); + cgmb_putb ( cgm, b ); +} + +static void cgmb_puti24 ( CGM *cgm, long b ) +{ + cgmb_putb ( cgm, b >> 16 ); + cgmb_putb ( cgm, b >> 8 ); + cgmb_putb ( cgm, b ); +} + +static void cgmb_puti32 ( CGM *cgm, long b ) +{ + cgmb_putb ( cgm, b >> 24 ); + cgmb_putb ( cgm, b >> 16 ); + cgmb_putb ( cgm, b >> 8 ); + cgmb_putb ( cgm, b ); +} + +static void cgmb_putu8 ( CGM *cgm, unsigned int b ) +{ + cgmb_putb ( cgm, b ); +} + +static void cgmb_putu16 ( CGM *cgm, unsigned int b ) +{ + cgmb_putb ( cgm, b >> 8 ); + cgmb_putb ( cgm, b ); +} + +static void cgmb_putu24 ( CGM *cgm, unsigned long b ) +{ + cgmb_putb ( cgm, b >> 16 ); + cgmb_putb ( cgm, b >> 8 ); + cgmb_putb ( cgm, b ); +} + +static void cgmb_putu32 ( CGM *cgm, unsigned long b ) +{ + cgmb_putb ( cgm, b >> 24 ); + cgmb_putb ( cgm, b >> 16 ); + cgmb_putb ( cgm, b >> 8 ); + cgmb_putb ( cgm, b ); +} + +static void cgmb_putfl32 ( CGM *cgm, float b ) +{ + union { + float func; + long l; + } r; + r.func = b; + cgmb_putb ( cgm, r.l >> 24 ); + cgmb_putb ( cgm, r.l >> 16 ); + cgmb_putb ( cgm, r.l >> 8 ); + cgmb_putb ( cgm, r.l ); +} + +static void cgmb_putfl64 ( CGM *cgm, double b ) +{ + union { + double d; + long l[2]; + } r; + r.d = b; + cgmb_putb ( cgm, r.l[1] >> 24 ); + cgmb_putb ( cgm, r.l[1] >> 16 ); + cgmb_putb ( cgm, r.l[1] >> 8 ); + cgmb_putb ( cgm, r.l[1] ); + cgmb_putb ( cgm, r.l[0] >> 24 ); + cgmb_putb ( cgm, r.l[0] >> 16 ); + cgmb_putb ( cgm, r.l[0] >> 8 ); + cgmb_putb ( cgm, r.l[0] ); +} + +static void cgmb_putfx32 ( CGM *cgm, float b ) +{ + int si = ( int ) floor ( b ); + unsigned int ui = ( unsigned int ) ( (b - si) * 65536.0 ); + + cgmb_puti16 ( cgm, si ); + cgmb_puti16 ( cgm, ui ); +} + +static void cgmb_putfx64 ( CGM *cgm, double b ) +{ + long si = ( long ) floor ( b ); + unsigned long ui = ( unsigned long ) ( (b - si) * 65536.0 * 65536.0 ); + + cgmb_puti32 ( cgm, si ); + cgmb_puti32 ( cgm, ui ); +} + +static void cgmb_wch ( CGM* cgm, int c, int id, int len ) +{ + + /* if ( len & 1 ) len ++; */ /* word aligned */ + + if ( len > 30 ) + cgmb_putw ( cgm, (c << 12) | ( id << 5 ) | 31 ); + else + cgmb_putw ( cgm, (c << 12) | ( id << 5 ) | (int)(len) ); + + + cgm->op++; + + if ( len > 30 ) + { + cgm->po[cgm->op] = ftell(unit); + cgmb_putw ( cgm, 0 ); + } + else + cgm->po[cgm->op] = 0L; + + cgm->bc[cgm->op] = 0; + +} + +static void cgmb_ci ( CGM *cgm, unsigned long ci ) +{ + switch ( cgm->cix_prec ) + { + case 0: cgmb_putu8 ( cgm, (unsigned)ci ); break; + case 1: cgmb_putu16 ( cgm, (unsigned)ci ); break; + case 2: cgmb_putu24 ( cgm, ci ); break; + case 3: cgmb_putu32 ( cgm, ci ); break; + } +} + +static void cgmb_cd ( CGM *cgm, double cd ) +{ + unsigned long cv = (unsigned long) (cd * (pow(2.0, (cgm->cd_prec + 1) * 8.0) - 1)); + switch ( cgm->cd_prec ) + { + case 0: cgmb_putu8 ( cgm, (unsigned)cv ); break; + case 1: cgmb_putu16 ( cgm, (unsigned)cv ); break; + case 2: cgmb_putu24 ( cgm, cv ); break; + case 3: cgmb_putu32 ( cgm, cv ); break; + } +} + +static void cgmb_rgb ( CGM *cgm, double r, double g, double b ) +{ + cgmb_cd ( cgm, r ); + cgmb_cd ( cgm, g ); + cgmb_cd ( cgm, b ); +} + +static void cgmb_ix ( CGM *cgm, long ix ) +{ + switch ( cgm->ix_prec ) + { + case 0: cgmb_puti8 ( cgm, (int)ix ); break; + case 1: cgmb_puti16 ( cgm, (int)ix ); break; + case 2: cgmb_puti24 ( cgm, ix ); break; + case 3: cgmb_puti32 ( cgm, ix ); break; + } +} + +static void cgmb_e ( CGM *cgm, int e, const char *el[] ) +{ + cgmb_puti16 ( cgm, e ); +} + +static void cgmb_i ( CGM *cgm, long i ) +{ + switch ( cgm->int_prec ) + { + case 0: cgmb_puti8 ( cgm, (int)i ); break; + case 1: cgmb_puti16 ( cgm, (int)i ); break; + case 2: cgmb_puti24 ( cgm, i ); break; + case 3: cgmb_puti32 ( cgm, i ); break; + } +} + +static void cgmb_u ( CGM *cgm, unsigned long i ) +{ + switch ( cgm->int_prec ) + { + case 0: cgmb_putu8 ( cgm, (unsigned)i ); break; + case 1: cgmb_putu16 ( cgm, (unsigned)i ); break; + case 2: cgmb_putu24 ( cgm, i ); break; + case 3: cgmb_putu32 ( cgm, i ); break; + } +} + +static void cgmb_r ( CGM *cgm, double func ) +{ + switch ( cgm->real_prec ) + { + case 0: cgmb_putfl32 ( cgm, (float )func ); break; + case 1: cgmb_putfl64 ( cgm, (double)func ); break; + case 2: cgmb_putfx32 ( cgm, (float )func ); break; + case 3: cgmb_putfx64 ( cgm, (double)func ); break; + } +} + +static void cgmb_s ( CGM *cgm, const char *s, int len ) +{ + register unsigned i; + unsigned l = len; + int bc = 0; + + if ( l > 254 ) + { + cgmb_putu8(cgm,255); + if ( l > 32763 ) + cgmb_putu16 ( cgm, (1<<16) | 32763 ); + else + cgmb_putu16 ( cgm, l ); + bc = 1; + } + else + cgmb_putu8(cgm,l); + + for ( i=0; i 32764 ) + cgmb_putu16 ( cgm, (1<<16) | 32764 ); + else + cgmb_putu16 ( cgm, l ); + } + cgmb_putc ( cgm, s[i] ); + } +} + +static void cgmb_vdc ( CGM *cgm, double vdc) +{ + if ( cgm->vdc_type == 0 ) + switch ( cgm->vdc_int ) + { + case 0: cgmb_puti8 ( cgm, (int )vdc ); break; + case 1: + /* Evita overflow em ambientes de 32 bits */ + if (vdc < -32768) vdc = -32768; + else if (vdc > 32767) vdc = +32767; + cgmb_puti16 ( cgm, (int) vdc ); + break; + case 2: cgmb_puti24 ( cgm, (long)vdc ); break; + case 3: + /* Evita overflow em ambientes de 32 bits */ + if (vdc < (double)-2147483648.0) vdc = (double)-2147483648.0; + else if (vdc > (double)2147483647.0) vdc = (double)2147483647.0; + cgmb_puti32 ( cgm, (long)vdc ); + break; + + } + else + switch ( cgm->vdc_real ) + { + case 0: cgmb_putfl32 ( cgm, (float )vdc ); break; + case 1: cgmb_putfl64 ( cgm, (double)vdc ); break; + case 2: cgmb_putfx32 ( cgm, (float )vdc ); break; + case 3: cgmb_putfx64 ( cgm, (double)vdc ); break; + } + +} + +static void cgmb_p ( CGM *cgm, double x, double y) +{ + cgmb_vdc ( cgm, x ); + cgmb_vdc ( cgm, y ); +} + +static void cgmb_co ( CGM *cgm, const void * co) +{ + if ( cgm->clrsm == 0 ) /* indexed */ + { + unsigned long ci = *(unsigned long *)co; + cgmb_ci ( cgm, ci ); + } + else + { + double *cb = (double *) co; + cgmb_rgb ( cgm, cb[0], cb[1], cb[2] ); + } +} + +static void cgmb_sep ( CGM *cgm, const char * sep ) +{} + +static int cgmb_get_col ( CGM *cgm ) +{ + return 0; +} + +static void cgmb_align ( CGM *cgm, int n ) +{} + +static void cgmb_nl ( CGM *cgm ) +{} + +static int cgmb_term ( CGM *cgm ) +{ + if ( cgm->op != -1 ) + { + if ( cgm->bc[cgm->op] & 1 ) + { + cgmb_putb( cgm, 0 ); + cgm->bc[cgm->op] --; + } + + if ( cgm->po[cgm->op] != 0L ) + { + long po = ftell(unit); + int op = cgm->op; + + cgm->op = -1; + fseek ( unit, cgm->po[op], SEEK_SET); + cgmb_putw ( cgm, cgm->bc[op] ); + + fseek ( unit, po, SEEK_SET ); + cgm->op = op; + } + cgm->op --; + } + + return 0; +} + +/************************************************ +* * +* Funcoes para clear text * +* * +************************************************/ + +static void cgmt_wch ( CGM* cgm, int c, int id, int len ) +{ + cgm->cl += fprintf ( unit, "%s", comandos[c+1][id]->ct ); +} + +static void cgmt_ci ( CGM *cgm, unsigned long ci ) +{ + cgm->func->u ( cgm, ci ); +} + +static void cgmt_cd ( CGM *cgm, double cd ) +{ + unsigned long cv = (unsigned long) (cd * (pow(2.0, (cgm->cd_prec + 1) * 8.0) - 1)); + + cgm->func->u ( cgm, cv ); +} + +static void cgmt_rgb ( CGM *cgm, double r, double g, double b ) +{ + cgm->func->cd ( cgm, r ); + cgm->func->cd ( cgm, g ); + cgm->func->cd ( cgm, b ); +} + +static void cgmt_ix ( CGM *cgm, long ix ) +{ + cgm->func->i ( cgm, ix ); +} + +static void cgmt_e ( CGM *cgm, int e, const char *el[] ) +{ + cgm->cl += fprintf ( unit, " %s", el[e] ); +} + +static void cgmt_i ( CGM *cgm, long i ) +{ + cgm->cl += fprintf ( unit, " %ld", i ); +} + +static void cgmt_u ( CGM *cgm, unsigned long i ) +{ + cgm->cl += fprintf ( unit, " %lu", i ); +} + +static void cgmt_r ( CGM *cgm, double func ) +{ + cgm->cl += fprintf ( unit, " %g", func ); +} + +static void cgmt_s ( CGM *cgm, const char *s, int len ) +{ + register unsigned i; + fputc ( 34, unit ); + + for ( i=0; icl ++; + } + fputc ( s[i], unit ); + } + + fputc ( 34, unit ); + cgm->cl += len + 2; +} + +static void cgmt_vdc ( CGM *cgm, double vdc) +{ + if ( cgm->vdc_type == 0 ) + { + /* Evita overflow em ambientes de 32 bits */ + if (vdc < (double)-2147483648.0) vdc = (double)-2147483648.0; + else if (vdc > (double)2147483647.0) vdc = (double)2147483647.0; + + cgm->func->i ( cgm, (long) vdc ); + } + else + cgm->func->r ( cgm, vdc ); +} + +static void cgmt_p ( CGM *cgm, double x, double y) +{ + cgm->func->sep ( cgm, "(" ); + cgm->func->vdc ( cgm, x ); + cgm->func->sep ( cgm, "," ); + cgm->func->vdc ( cgm, y ); + cgm->func->sep ( cgm, ")" ); +} + +static void cgmt_co ( CGM *cgm, const void * co) +{ + if ( cgm->clrsm == 0 ) /* indexed */ + { + unsigned long ci = *(unsigned *)co; + cgm->func->ci ( cgm, ci ); + } + else + { + double *cb = (double *) co; + cgm->func->rgb ( cgm, cb[0], cb[1], cb[2] ); + } +} + +static void cgmt_sep ( CGM *cgm, const char * sep ) +{ + cgm->cl += fprintf ( unit, " %s", sep ); +} + +static int cgmt_get_col ( CGM *cgm ) +{ + return cgm->cl; +} + +static void cgmt_align ( CGM *cgm, int n ) +{ + for ( ; cgm->cl < n ; cgm->cl ++ ) + fputc ( ' ', unit ); +} + +static void cgmt_nl ( CGM *cgm ) +{ + fputc ( '\n', unit ); + cgm->cl = 1; +} + +static int cgmt_term ( CGM *cgm ) +{ + fputc ( ';', unit ); + cgm->func->nl(cgm); + return 0; +} + +/************************************************ +* * +* Funcoes para character * +* * +************************************************/ + +static void cgmc_wch ( CGM* cgm, int c, int id, int len ) +{ + cgm->cl += fprintf ( unit, "%s", comandos[c+1][id]->ct ); +} + +static void cgmc_ci ( CGM *cgm, unsigned long ci ) +{ + cgm->func->u ( cgm, ci ); +} + +static void cgmc_cd ( CGM *cgm, double cd ) +{ + cgm->func->r ( cgm, cd ); +} + +static void cgmc_rgb ( CGM *cgm, double r, double g, double b ) +{ + cgm->func->cd ( cgm, r ); + cgm->func->sep ( cgm, "," ); + cgm->func->cd ( cgm, g ); + cgm->func->sep ( cgm, "," ); + cgm->func->cd ( cgm, b ); +} + +static void cgmc_ix ( CGM *cgm, long ix ) +{ + cgm->func->i ( cgm, ix ); +} + +static void cgmc_e ( CGM *cgm, int e, const char *el[] ) +{ + cgm->cl += fprintf ( unit, " %s", el[e] ); +} + +static void cgmc_i ( CGM *cgm, long i ) +{ + cgm->cl += fprintf ( unit, " %ld", i ); +} + +static void cgmc_u ( CGM *cgm, unsigned long i ) +{ + cgm->cl += fprintf ( unit, " %lu", i ); +} + +static void cgmc_r ( CGM *cgm, double func ) +{ + cgm->cl += fprintf ( unit, " %g", func ); +} + +static void cgmc_s ( CGM *cgm, const char *s, int len ) +{ + register unsigned i; + fputc ( 34, unit ); + + for ( i=0; icl ++; + } + fputc ( s[i], unit ); + } + + fputc ( 34, unit ); + cgm->cl += len + 2; +} + +static void cgmc_vdc ( CGM *cgm, double vdc) +{ + if ( cgm->vdc_type == 0 ) + cgm->func->i ( cgm, (long) vdc ); + else + cgm->func->r ( cgm, vdc ); +} + +static void cgmc_p ( CGM *cgm, double x, double y) +{ + cgm->func->sep ( cgm, "(" ); + cgm->func->vdc ( cgm, x ); + cgm->func->sep ( cgm, "," ); + cgm->func->vdc ( cgm, y ); + cgm->func->sep ( cgm, ")" ); +} + +static void cgmc_co ( CGM *cgm, const void * co) +{ + if ( cgm->clrsm == 0 ) /* indexed */ + { + unsigned long ci = *(unsigned long *)co; + cgm->func->ci ( cgm, ci ); + } + else + { + double *cb = (double *) co; + cgm->func->rgb ( cgm, cb[0], cb[1], cb[2] ); + } +} + +static void cgmc_sep ( CGM *cgm, const char * sep ) +{ + cgm->cl += fprintf ( unit, " %s", sep ); +} + +static int cgmc_get_col ( CGM *cgm ) +{ + return cgm->cl; +} + +static void cgmc_align ( CGM *cgm, int n ) +{ + for ( ; cgm->cl < n ; cgm->cl ++ ) + fputc ( ' ', unit ); +} + +static void cgmc_nl ( CGM *cgm ) +{ + fputc ( '\n', unit ); + cgm->cl = 1; +} + +static int cgmc_term ( CGM *cgm ) +{ + fputc ( ';', unit ); + cgm->func->nl(cgm); + return 0; +} + +/************************************************ +* * +* independente de codificacao * +* * +************************************************/ + + +/* Definicoes de precisao */ + +static const long _cgm_int_precs[][2] = { + { -128, 127 }, /* 8 */ + { -32768L, 32767 }, /* 16 */ + { LONG_MIN >> 8, LONG_MAX >> 8 }, /* 24 */ + { LONG_MIN , LONG_MAX } }; /* 32 */ + +static int _cgm_ireal_precs[][4] = { + { 0, 9, 23, 0 }, /* float*32 */ + { 0, 12, 52, 0 }, /* float*64 */ + { 1, 16, 16, 5 }, /* fixed*32 */ + { 1, 32, 32, 9 } }; /* fixed*64 */ + +static double _cgm_rreal_precs[][2] = { + /* float*32 */ { 0, 0 }, /* Em Turbo C, FLT_MAX e DLB_MAX sao */ + /* float*64 */ { 0, 0 }, /* DEFINES para variaveis externas */ + /* fixed*32 */ { - (32769.0 - 1.0 / 65536.0), + 32768.0 - 1.0 / 65536.0 }, + /* fixed*64 */ { (double)(LONG_MIN) - ( 1 - 1 / ( 65536.0 * 65536.0 ) ), + (double)(LONG_MAX) + ( 1 - 1 / ( 65536.0 * 65536.0 ) ) } }; + +/* Enumeraveis genericos */ + +static const char *offon[] = { "OFF", "ON" }; + +/********************* +* Delimiter elements * +*********************/ + +CGM *cgm_begin_metafile ( char *file, int mode, char *header ) +{ + CGM *cgm; + int len; + + if ( (cgm = (CGM *)malloc ( sizeof (CGM) ) ) == NULL ) + return NULL; + +#ifdef __VAXC__ + + if ( mode == 2 ) + cgm->file = fopen ( file , "w" , "rfm=var", "rat=cr" ); + else + cgm->file = fopen ( file , "w+b", "rfm=var", "ctx=stm" ); + +#else + + if ( mode == 2 ) + cgm->file = fopen ( file , "w" ); + else + cgm->file = fopen ( file , "w+b" ); + +#endif + + if ( cgm->file == NULL ) + { + free ( cgm ); + return NULL; + } + + cgm->mode = mode; + cgm->func = cgmf[mode]; + + cgm->vdc_type = 0; + cgm->int_prec = 1; + cgm->real_prec = 2; + cgm->ix_prec = 1; + cgm->cd_prec = 0; + cgm->cix_prec = 0; + cgm->max_cix = 63; + + cgm->clrsm = 0; + cgm->lnwsm = 1; + cgm->mkssm = 1; + cgm->edwsm = 1; + cgm->vdc_int = 1; + cgm->vdc_real = 2; + + cgm->vdc_size = 2; + cgm->int_size = 2; + cgm->real_size = 4; + cgm->ix_size = 3; + cgm->cd_size = 3; + cgm->cix_size = 1; + cgm->clr_size = 1; + cgm->lnw_size = 4; + cgm->mks_size = 4; + cgm->edw_size = 4; + + cgm->cl = 1; + + cgm->op = -1; + + len = strlen(header); + cgm->func->wch ( cgm, 0, 1, len+1 ); + + cgm->func->s ( cgm, header, len ); + + cgm->func->term ( cgm ); + + _cgm_ireal_precs[0][3] = FLT_DIG; + _cgm_ireal_precs[1][3] = DBL_DIG; + + _cgm_rreal_precs[0][0] = - FLT_MAX; + _cgm_rreal_precs[0][1] = FLT_MAX; + _cgm_rreal_precs[1][0] = - DBL_MAX; + _cgm_rreal_precs[1][1] = DBL_MAX; + + return cgm; +} + +int cgm_end_metafile ( CGM *cgm ) +{ + cgm->func->wch ( cgm, 0, 2, 0 ); + cgm->func->term ( cgm ); + + fclose ( cgm->file ); + cgm->file = NULL; + free ( cgm ); + + return 0; +} + +int cgm_begin_picture (CGM *cgm, const char *s ) +{ + int len = strlen(s); + cgm->func->wch ( cgm, 0, 3, len+1 ); + cgm->func->s ( cgm, s, len ); + return cgm->func->term(cgm); +} + +int cgm_begin_picture_body ( CGM *cgm ) +{ + cgm->func->wch ( cgm, 0, 4, 0 ); + return cgm->func->term(cgm); +} + +int cgm_end_picture ( CGM *cgm ) +{ + cgm->func->wch ( cgm, 0, 5, 0 ); + return cgm->func->term(cgm); +} + +/******************************* +* Metafile Descriptor Elements * +*******************************/ + +int cgm_metafile_version ( CGM *cgm, long version ) +{ + cgm->func->wch ( cgm, 1, 1, cgm->int_size ); + + cgm->func->i ( cgm, version ); + + return cgm->func->term(cgm); +} + +int cgm_metafile_description ( CGM *cgm, const char *s ) +{ + int len = strlen(s); + cgm->func->wch ( cgm, 1, 2, 1+len); + cgm->func->s ( cgm, s, len ); + return cgm->func->term(cgm); +} + +int cgm_vdc_type ( CGM *cgm, int mode ) +{ + static const char *vdct[] = { "integer", "real" }; + cgm->func->wch ( cgm, 1, 3, 2 ); + cgm->func->e ( cgm, mode, vdct ); + + cgm->vdc_type = mode; + if ( cgm->vdc_type == 0 ) /* integer */ + cgm->vdc_size = cgm->vdc_int + 1; + else + cgm->vdc_size = ( _cgm_ireal_precs[cgm->vdc_real][1] + + _cgm_ireal_precs[cgm->vdc_real][2]) / 8; + + return cgm->func->term(cgm); +} + +int cgm_integer_precision ( CGM *cgm, int prec ) +{ + cgm->func->wch ( cgm, 1, 4, cgm->int_size ); + + switch ( cgm->mode ) + { + case 0: /* character */ + break; + + case 1: /* binary */ + cgm->func->i ( cgm, (long)(prec) ); + break; + + case 2: /* clear text */ + cgm->func->i ( cgm, _cgm_int_precs[prec/8 - 1][0] ); + cgm->func->sep ( cgm, "," ); + cgm->func->i ( cgm, _cgm_int_precs[prec/8 - 1][1] ); + break; + } + + cgm->int_prec = prec/8-1; + cgm->int_size = prec/8; + + return cgm->func->term(cgm); +} + +int cgm_real_precision ( CGM *cgm, int mode ) +{ + cgm->func->wch ( cgm, 1, 5, 2 + 2*cgm->int_size ); + switch ( cgm->mode ) + { + case 0: /* character */ + break; + + case 1: /* binary */ + cgm->func->e ( cgm, _cgm_ireal_precs[mode][0] , NULL ); + cgm->func->i ( cgm, (long)(_cgm_ireal_precs[mode][1]) ); + cgm->func->i ( cgm, (long)(_cgm_ireal_precs[mode][2]) ); + break; + + case 2: /* clear text */ + cgm->func->r ( cgm, _cgm_rreal_precs[mode][0] ); + cgm->func->sep ( cgm, "," ); + cgm->func->r ( cgm, _cgm_rreal_precs[mode][1] ); + cgm->func->sep ( cgm, "," ); + cgm->func->i ( cgm, (long)(_cgm_ireal_precs[mode][3]) ); + break; + } + + cgm->real_prec = mode; + cgm->real_size = ( _cgm_ireal_precs[mode][1] + _cgm_ireal_precs[mode][2]) / 8; + + /* absolute scaling modes */ + if ( cgm->lnwsm == 1 ) cgm->lnw_size = cgm->real_size; + if ( cgm->mkssm == 1 ) cgm->mks_size = cgm->real_size; + if ( cgm->edwsm == 1 ) cgm->edw_size = cgm->real_size; + + return cgm->func->term(cgm); +} + +int cgm_index_precision ( CGM *cgm, int prec ) +{ + cgm->func->wch ( cgm, 1, 6, cgm->int_size ); + switch ( cgm->mode ) + { + case 0: /* character */ + break; + + case 1: /* binary */ + cgm->func->i ( cgm, (long)(prec) ); + break; + + case 2: /* clear text */ + cgm->func->i ( cgm, _cgm_int_precs[prec/8 - 1][0] ); + cgm->func->sep ( cgm, "," ); + cgm->func->i ( cgm, _cgm_int_precs[prec/8 - 1][1] ); + break; + } + + cgm->ix_prec = prec/8-1; + cgm->ix_size = prec/8; + return cgm->func->term(cgm); +} + +int cgm_colour_precision ( CGM *cgm, int prec ) +{ + cgm->func->wch ( cgm, 1, 7, cgm->int_size ); + switch ( cgm->mode ) + { + case 0: /* character */ + break; + + case 1: /* binary */ + cgm->func->i ( cgm, (long)(prec) ); + break; + + case 2: /* clear text */ + cgm->func->i ( cgm, 1ul+ 2ul * (unsigned long)_cgm_int_precs[prec/8 - 1][1] ); + break; + } + + cgm->cd_prec = prec/8-1; + cgm->cd_size = 3*(prec/8); + + if ( cgm->clrsm == 1 ) /* direct */ + cgm->clr_size = cgm->cd_size; + + return cgm->func->term(cgm); +} + +int cgm_colour_index_precision ( CGM *cgm, int prec ) +{ + cgm->func->wch ( cgm, 1, 8, cgm->int_size ); + + switch ( cgm->mode ) + { + case 0: /* character */ + break; + + case 1: /* binary */ + cgm->func->i ( cgm, (long)(prec) ); + break; + + case 2: /* clear text */ + cgm->func->i ( cgm, 1ul+ 2ul * (unsigned long)_cgm_int_precs[prec/8 - 1][1] ); + break; + } + + cgm->cix_prec = prec/8-1; + cgm->cix_size = prec/8; + + if ( cgm->clrsm == 0 ) /* indexed */ + cgm->clr_size = cgm->cix_size; + + return cgm->func->term(cgm); +} + +int cgm_maximum_colour_index ( CGM *cgm, unsigned long ci ) +{ + cgm->func->wch ( cgm, 1, 9, cgm->cix_size ); + cgm->func->ci ( cgm, ci ); + return cgm->func->term(cgm); +} + +int cgm_colour_value_extent ( CGM *cgm, const double *black, + const double *white) +{ + cgm->func->wch ( cgm, 1, 10, 2 * cgm->cd_size ); + cgm->func->rgb ( cgm, black[0], black[1], black[2] ); + cgm->func->nl ( cgm ); + cgm->func->align ( cgm, 15 ); + cgm->func->rgb ( cgm, white[0], white[1], white[2] ); + return cgm->func->term(cgm); +} + +int cgm_metafile_element_list ( CGM *cgm, int n, const int *group, const int *element ) +{ + register int i; + cgm->func->wch ( cgm, 1, 11, 31 ); + cgm->func->sep ( cgm, "\x22" ); /* aspas */ + if ( cgm->mode == 1 ) cgm->func->i ( cgm, n ); + for ( i=0; imode == 1 ) /* binario */ + { + cgm->func->ix ( cgm, group[i] ); + cgm->func->ix ( cgm, element[i] ); + cgm->func->term( cgm ); + } + else + { + cgm->func->wch ( cgm, group[i], element[i], 0 ); + cgm->func->sep ( cgm, "" ); + } + } + cgm->func->sep ( cgm, "\x22" ); /* aspas */ + return cgm->func->term(cgm); +} + +int cgm_begin_metafile_defaults ( CGM *cgm ) +{ + cgm->func->wch ( cgm, 1, 12, 31 ); + + /* modo binario - deixa aberto */ + if ( cgm->mode == 1 ) /* binario */ + return 0; + + return cgm->func->term(cgm); +} + +int cgm_end_metafile_defaults ( CGM *cgm ) +{ + /* modo binario - ja estava aberto */ + if ( cgm->mode != 1 ) /* binario */ + cgm->func->wch ( cgm, 1, 0, 0 ); + + return cgm->func->term(cgm); +} + +int cgm_font_list ( CGM *cgm, const char *fl[] ) +{ + register int i; + + cgm->func->wch ( cgm, 1, 13, 31 ); + + for ( i=0; fl[i] != NULL; i++ ) + { + cgm->func->nl ( cgm ); + cgm->func->align ( cgm, 10 ); + cgm->func->s ( cgm, fl[i], strlen(fl[i]) ); + } + + return cgm->func->term(cgm); +} + +/****************************** +* Picture Descriptor Elements * +******************************/ + +int cgm_scaling_mode ( CGM *cgm, int mode, float metric ) +{ + static const char *sm[] = { "abstract", "metric" }; + cgm->func->wch ( cgm, 2, 1, 2 + 4 ); + cgm->func->e ( cgm, mode, sm ); + if ( cgm->mode == 1 ) + cgmb_putfl32 ( cgm, metric ); + else + cgm->func->r ( cgm, metric ); + return cgm->func->term(cgm); +} + +int cgm_colour_selection_mode ( CGM *cgm, int mode) +{ + static const char *csm[] = { "indexed", "direct" }; + cgm->func->wch ( cgm, 2, 2, 2 ); + cgm->func->e ( cgm, mode, csm ); + + cgm->clrsm = mode; + if ( mode == 0 ) /* indexed */ + cgm->clr_size = cgm->cix_size; + else + cgm->clr_size = cgm->cd_size; + + return cgm->func->term(cgm); +} + +static int _cgm_width_specify_mode ( CGM *cgm, int t, int mode) +{ + static const char *sm[] = { "abstract", "scaled" }; + cgm->func->wch ( cgm, 2, t, 2 ); + cgm->func->e ( cgm, mode, sm ); + return cgm->func->term(cgm); +} + +int cgm_line_width_specify_mode ( CGM *cgm, int mode) +{ + cgm->lnwsm = mode; + if ( mode == 0 ) + cgm->lnw_size = cgm->vdc_size; + else + cgm->lnw_size = cgm->real_size; + return _cgm_width_specify_mode ( cgm, 3, mode ); +} + +int cgm_marker_size_specify_mode ( CGM *cgm, int mode) +{ + cgm->mkssm = mode; + if ( mode == 0 ) + cgm->mks_size = cgm->vdc_size; + else + cgm->mks_size = cgm->real_size; + return _cgm_width_specify_mode ( cgm, 4, mode ); +} + +int cgm_edge_width_specify_mode ( CGM *cgm, int mode) +{ + cgm->edwsm = mode; + if ( mode == 0 ) + cgm->edw_size = cgm->vdc_size; + else + cgm->edw_size = cgm->real_size; + return _cgm_width_specify_mode ( cgm, 5, mode ); +} + +int cgm_vdc_extent ( CGM *cgm, double xmin, double ymin, + double xmax, double ymax ) +{ + cgm->func->wch ( cgm, 2, 6, 2*2*cgm->vdc_size ); + cgm->func->vdc ( cgm, xmin ); + cgm->func->vdc ( cgm, ymin ); + cgm->func->vdc ( cgm, xmax ); + cgm->func->vdc ( cgm, ymax ); + return cgm->func->term(cgm); +} + +int cgm_backgound_colour ( CGM *cgm, const double *cr ) +{ + cgm->func->wch ( cgm, 2, 7, cgm->cd_size ); + cgm->func->rgb ( cgm , cr[0], cr[1], cr[2] ); + return cgm->func->term(cgm); +} + +/******************* +* Control Elements * +*******************/ + +int cgm_vdc_integer_precision ( CGM *cgm, int prec ) +{ + cgm->func->wch ( cgm, 3, 1, cgm->int_size ); + switch ( cgm->mode ) + { + case 0: /* character */ + break; + + case 1: /* binary */ + cgm->func->i ( cgm, (long)(prec) ); + break; + + case 2: /* clear text */ + cgm->func->i ( cgm, _cgm_int_precs[prec/8 - 1][0] ); + cgm->func->sep ( cgm, "," ); + cgm->func->i ( cgm, _cgm_int_precs[prec/8 - 1][1] ); + break; + } + + if ( cgm->vdc_type == 0 ) + cgm->vdc_size = prec/8; + + cgm->vdc_int = prec/8 - 1; + + if ( cgm->lnwsm == 0 && cgm->vdc_type == 0 ) cgm->lnw_size = cgm->vdc_size; + if ( cgm->mkssm == 0 && cgm->vdc_type == 0 ) cgm->mks_size = cgm->vdc_size; + if ( cgm->edwsm == 0 && cgm->vdc_type == 0 ) cgm->edw_size = cgm->vdc_size; + + return cgm->func->term(cgm); +} + +int cgm_vdc_real_precision ( CGM *cgm, int mode ) +{ + cgm->func->wch ( cgm, 3, 2, 2 + 2*cgm->int_size ); + switch ( cgm->mode ) + { + case 0: /* character */ + break; + + case 1: /* binary */ + cgm->func->e ( cgm, _cgm_ireal_precs[mode][0] , NULL ); + cgm->func->i ( cgm, (long)(_cgm_ireal_precs[mode][1]) ); + cgm->func->i ( cgm, (long)(_cgm_ireal_precs[mode][2]) ); + break; + + case 2: /* clear text */ + cgm->func->r ( cgm, _cgm_rreal_precs[mode][0] ); + cgm->func->sep ( cgm, "," ); + cgm->func->r ( cgm, _cgm_rreal_precs[mode][1] ); + cgm->func->sep ( cgm, "," ); + cgm->func->i ( cgm, (long)(_cgm_ireal_precs[mode][3]) ); + break; + } + + if ( cgm->vdc_type == 1 ) + cgm->vdc_size = ( _cgm_ireal_precs[mode][1] + _cgm_ireal_precs[mode][2]) / 8; + + cgm->vdc_real = mode; + + if ( cgm->lnwsm == 0 && cgm->vdc_type == 1 ) cgm->lnw_size = cgm->vdc_size; + if ( cgm->mkssm == 0 && cgm->vdc_type == 1 ) cgm->mks_size = cgm->vdc_size; + if ( cgm->edwsm == 0 && cgm->vdc_type == 1 ) cgm->edw_size = cgm->vdc_size; + + return cgm->func->term(cgm); +} + +int cgm_auxiliary_colour ( CGM *cgm, const void *c ) +{ + cgm->func->wch ( cgm, 3, 3, cgm->clr_size ); + + cgm->func->co ( cgm, c ) ; + + return cgm->func->term(cgm); +} + +int cgm_transparency ( CGM *cgm, int mode ) +{ + cgm->func->wch ( cgm, 3, 4, 2 ); + + cgm->func->e ( cgm, mode, offon ); + + return cgm->func->term(cgm); +} + +int cgm_clip_rectangle ( CGM *cgm, double xmin, double ymin, + double xmax, double ymax ) +{ + cgm->func->wch ( cgm, 3, 5, 4 * cgm->vdc_size ); + + cgm->func->vdc ( cgm, xmin ); + cgm->func->vdc ( cgm, ymin ); + cgm->func->vdc ( cgm, xmax ); + cgm->func->vdc ( cgm, ymax ); + + return cgm->func->term(cgm); +} + +int cgm_clip_indicator ( CGM *cgm, int mode ) +{ + cgm->func->wch ( cgm, 3, 6, 2 ); + + cgm->func->e ( cgm, mode, offon ); + + return cgm->func->term(cgm); +} + +/******************************* +* Graphical Primitive Elements * +*******************************/ + +static int _cgm_point ( CGM *cgm, double x, double y ) +{ + cgm->func->p ( cgm, x, y ); + return 0; +} + +static int _cgm_point_list ( CGM *cgm, int element, int n, const double *p) +{ + register int i; + cgm->func->wch ( cgm, 4, element, 2*n*cgm->vdc_size ); + + for ( i=0; i < 2*n; i+=2 ) + { + cgm->func->nl ( cgm ); + cgm->func->align ( cgm, 8 ); + _cgm_point ( cgm, p[i], p[i+1] ); + } + return cgm->func->term(cgm); +} + +int cgm_polyline ( CGM *cgm, int n, const double *p ) +{ + return _cgm_point_list ( cgm, 1, n, p ); +} + +int cgm_polymarker ( CGM *cgm, int n, const double *p ) +{ + return _cgm_point_list ( cgm, 3, n, p ); +} + +static int _cgm_text_piece ( CGM *cgm, int t, const char *s, int len) +{ + static const char *tt[] = { "NOT_FINAL", " FINAL" }; + cgm->func->e ( cgm, t, tt ); + cgm->func->s ( cgm, s , len); + return cgm->func->term(cgm); +} + +int cgm_text ( CGM *cgm, int tt, double x, double y, const char *s, int len ) +{ + cgm->func->wch ( cgm, 4, 4, 2 * cgm->vdc_size + len + 3 ); + cgm->func->p ( cgm, x, y ); + cgm->func->nl ( cgm ); + cgm->func->align ( cgm, 10 ); + + if ( cgm->mode == 2 ) /* clear text */ + { + while ( len > 50 ) + { + _cgm_text_piece ( cgm, 0, s, 50); + s += 50; + len -= 50; + + cgm->func->wch ( cgm, 4, 6, 2 * cgm->vdc_size + len + 1 ); + } + } + + return _cgm_text_piece ( cgm, tt, s, len ); +} + +int cgm_polygon ( CGM *cgm, int n, const double *p ) +{ + return _cgm_point_list ( cgm, 7, n, p ); +} + +static int _cgm_cell_rows ( CGM *cgm, long sx, long sy, int prec, const void *c ) +{ + register long i,j, brk; + + cgm->func->nl ( cgm ); + cgm->func->sep ( cgm, "(" ); + + if ( cgm->clrsm ) + brk = 5; + else + brk = 12; + + for ( i=0; i < sy; i++ ) + { + if ( i ) + { + cgm->func->nl ( cgm ); + cgm->func->align ( cgm, 3 ); + } + + for ( j=0; j < sx; j++) + { + if ( j && ( j % brk == 0 ) ) + { + cgm->func->nl ( cgm ); + cgm->func->align ( cgm, 3 ); + } + + cgm->func->co ( cgm, c ); + c = (void*)((char*)c+ (cgm->clrsm ? (3*sizeof(double)) : sizeof(int))); + + if ( ifunc->sep ( cgm, "," ); + } + } + + cgm->func->sep ( cgm, ")" ); + + return 0; +} + +int cgm_cell_array ( CGM *cgm, const double *p, long sx, long sy, int prec, const void *c ) +{ + register int i; + static const char *repmode[] = { "run lenght", "packed" }; + + cgm->func->wch ( cgm, 4, 9, 31 ); + + for ( i=0; i<3*2; i+=2 ) + _cgm_point ( cgm, p[i], p[i+1] ); + + cgm->func->nl (cgm ); + + cgm->func->i ( cgm, sx ); + cgm->func->i ( cgm, sy ); + + if ( prec == 0 ) + cgm->func->i ( cgm, (long)(prec) ); + else + { + switch ( cgm->mode ) + { + case 0: /* character */ + break; + + case 1: /* binary */ + cgm->func->i ( cgm, (long)(prec) ); + break; + + case 2: /* clear text */ + cgm->func->i ( cgm, 2 * ( _cgm_int_precs[prec/8 - 1][1] + 1) ); + break; + } + } + + if ( cgm->mode==1 ) cgm->func->e ( cgm, 1, repmode ); + + _cgm_cell_rows( cgm, sx, sy, prec, c ); + + return cgm->func->term(cgm); +} + +int cgm_rectangle ( CGM *cgm, const double *p ) +{ + return _cgm_point_list ( cgm, 11, 2, p ); +} + +static int _cgm_ellipse_CDP ( CGM *cgm, const double *c, const double *p1, + const double *p2 ) +{ + _cgm_point ( cgm, c[0], c[1] ); + _cgm_point ( cgm, p1[0], p1[1] ); + _cgm_point ( cgm, p2[0], p2[1] ); + + return 0; +} + +static int _cgm_ellipse_vectors ( CGM *cgm, double dxs, double dys, double dxe, + double dye ) +{ + cgm->func->vdc ( cgm, dxs ); + cgm->func->vdc ( cgm, dys ); + cgm->func->vdc ( cgm, dxe ); + cgm->func->vdc ( cgm, dye ); + + return 0; +} + +int cgm_elliptical_arc ( CGM *cgm, const double *c, const double *p1, + const double *p2, double dxs, double dys, double dxe, + double dye ) +{ + cgm->func->wch ( cgm, 4, 18, 10*cgm->vdc_size ); + + _cgm_ellipse_CDP ( cgm, c, p1, p2 ); + + _cgm_ellipse_vectors ( cgm, dxs, dys, dxe, dye ); + + return cgm->func->term(cgm); +} + +int cgm_elliptical_arc_close ( CGM *cgm, const double *c, const double *p1, + const double *p2, double dxs, double dys, + double dxe, double dye, int type ) +{ + static const char *ct[] = { "pie", "chord" }; + + cgm->func->wch ( cgm, 4, 19, 10*cgm->vdc_size + 2 ); + + _cgm_ellipse_CDP ( cgm, c, p1, p2 ); + + _cgm_ellipse_vectors ( cgm, dxs, dys, dxe, dye ); + + cgm->func->e ( cgm, type, ct ); + + return cgm->func->term(cgm); +} + +/********************* +* Attribute Elements * +*********************/ + +int cgm_line_bundle_index( CGM *cgm, long li) +{ + cgm->func->wch ( cgm, 5, 1, cgm->ix_size ); + cgm->func->ix ( cgm, li ); + return cgm->func->term(cgm); +} + +int cgm_line_type( CGM *cgm, long lt) +{ + cgm->func->wch ( cgm, 5, 2, cgm->ix_size ); + cgm->func->ix ( cgm, lt ); + return cgm->func->term(cgm); +} + +int cgm_line_width( CGM *cgm, double lw) +{ + cgm->func->wch ( cgm, 5, 3, cgm->lnw_size ); + + if ( cgm->lnwsm == 0 ) /* absolute */ + cgm->func->vdc ( cgm, lw ); + else + cgm->func->r ( cgm, lw ); + + return cgm->func->term(cgm); +} + +int cgm_line_colour( CGM *cgm, const void *lc) +{ + cgm->func->wch ( cgm, 5, 4, cgm->clr_size ); + cgm->func->co ( cgm, lc ); + return cgm->func->term(cgm); +} + +int cgm_marker_bundle_index( CGM *cgm, long mi) +{ + cgm->func->wch ( cgm, 5, 5, cgm->ix_size ); + cgm->func->ix ( cgm, mi ); + return cgm->func->term(cgm); +} + +int cgm_marker_type( CGM *cgm, long mt) +{ + cgm->func->wch ( cgm, 5, 6, cgm->ix_size ); + cgm->func->ix ( cgm, mt ); + return cgm->func->term(cgm); +} + +int cgm_marker_size( CGM *cgm, double ms) +{ + cgm->func->wch ( cgm, 5, 7, cgm->mks_size ); + + if ( cgm->mkssm == 0 ) /* absolute */ + cgm->func->vdc ( cgm, ms ); + else + cgm->func->r ( cgm, ms ); + + return cgm->func->term(cgm); +} + +int cgm_marker_colour( CGM *cgm, const void *mc) +{ + cgm->func->wch ( cgm, 5, 8, cgm->clr_size ); + cgm->func->co ( cgm, mc ); + return cgm->func->term(cgm); +} + +int cgm_text_bundle_index( CGM *cgm, long ti) +{ + cgm->func->wch ( cgm, 5, 9, cgm->ix_size ); + cgm->func->ix ( cgm, ti ); + return cgm->func->term(cgm); +} + +int cgm_text_font_index( CGM *cgm, long fi) +{ + cgm->func->wch ( cgm, 5, 10, cgm->ix_size ); + cgm->func->ix ( cgm, fi ); + return cgm->func->term(cgm); +} + +int cgm_text_precision( CGM *cgm, int tp) +{ + static const char *txprec[] = { "STRING", "CHAR", "STROKE" }; + cgm->func->wch ( cgm, 5, 11, 2 ); + cgm->func->e ( cgm, tp, txprec ); + return cgm->func->term(cgm); +} + +int cgm_char_expansion_factor ( CGM *cgm, double expan ) +{ + cgm->func->wch ( cgm, 5, 12, cgm->real_size ); + cgm->func->r ( cgm, expan ); + return cgm->func->term(cgm); +} + +int cgm_char_spacing ( CGM *cgm, double spacing ) +{ + cgm->func->wch ( cgm, 5, 13, cgm->real_size ); + cgm->func->r ( cgm, spacing ); + return cgm->func->term(cgm); +} + +int cgm_text_colour( CGM *cgm, const void *tc) +{ + cgm->func->wch ( cgm, 5, 14, cgm->clr_size ); + cgm->func->co ( cgm, tc ); + return cgm->func->term(cgm); +} + +int cgm_char_height ( CGM *cgm, double height ) +{ + cgm->func->wch ( cgm, 5, 15, cgm->vdc_size ); + cgm->func->vdc ( cgm, height ); + return cgm->func->term(cgm); +} + +int cgm_char_orientation ( CGM *cgm, double chupx, double chupy, + double chbsx, double chbsy ) +{ + cgm->func->wch ( cgm, 5, 16, 4*cgm->vdc_size ); + cgm->func->sep ( cgm, "% char up %" ); + cgm->func->vdc ( cgm, chupx ); + cgm->func->sep ( cgm, "," ); + cgm->func->vdc ( cgm, chupy ); + cgm->func->nl ( cgm ); + cgm->func->align ( cgm, 8 ); + cgm->func->sep ( cgm, "% char base %" ); + cgm->func->vdc ( cgm, chbsx ); + cgm->func->sep ( cgm, "," ); + cgm->func->vdc ( cgm, chbsy ); + return cgm->func->term(cgm); +} + +int cgm_text_path ( CGM *cgm, int tp) +{ + static const char *txpath[] = { "RIGHT", "LEFT", "UP", "DOWN" }; + cgm->func->wch ( cgm, 5, 17, 2 ); + cgm->func->e ( cgm, tp, txpath ); + return cgm->func->term(cgm); +} + +int cgm_text_alignment ( CGM *cgm, int hor, int ver , double ch, double cv) +{ + static const char *txhor[] = { "NORMHORIZ", "LEFT", "CTR", "RIGHT", "CONTHORIZ" }; + static const char *txver[] = { "NORMVERT", "TOP", "CAP", "HALF", "BASE", + "BOTTOM", "CONTHORIZ" }; + + cgm->func->wch ( cgm, 5, 18, 2*2 + 2*cgm->real_size ); + cgm->func->e ( cgm, hor, txhor ); + cgm->func->e ( cgm, ver, txver ); + cgm->func->r ( cgm, ch ); + cgm->func->r ( cgm, cv ); + return cgm->func->term(cgm); +} + +int cgm_fill_bundle_index( CGM *cgm, long fi) +{ + cgm->func->wch ( cgm, 5, 21, cgm->ix_size ); + cgm->func->ix ( cgm, fi ); + return cgm->func->term(cgm); +} + +int cgm_interior_style( CGM *cgm, int is) +{ + static const char *style[]= { "HOLLOW", "SOLID", "PAT", "HATCH", "EMPTY" }; + cgm->func->wch ( cgm, 5, 22, 2 ); + cgm->func->e ( cgm, is, style ); + return cgm->func->term(cgm); +} + +int cgm_fill_colour( CGM *cgm, const void *fc) +{ + cgm->func->wch ( cgm, 5, 23, cgm->clr_size ); + cgm->func->co ( cgm, fc ); + return cgm->func->term(cgm); +} + +int cgm_hatch_index( CGM *cgm, long hi) +{ + cgm->func->wch ( cgm, 5, 24, cgm->ix_size ); + cgm->func->ix ( cgm, hi ); + return cgm->func->term(cgm); +} + +int cgm_pattern_index( CGM *cgm, long pi) +{ + cgm->func->wch ( cgm, 5, 25, cgm->ix_size ); + cgm->func->ix ( cgm, pi ); + return cgm->func->term(cgm); +} + +int cgm_edge_width( CGM *cgm, double ew) +{ + cgm->func->wch ( cgm, 5, 28, cgm->edw_size ); + + if ( cgm->lnwsm == 0 ) /* absolute */ + cgm->func->vdc ( cgm, ew ); + else + cgm->func->r ( cgm, ew ); + + return cgm->func->term(cgm); +} + +int cgm_edge_colour( CGM *cgm, const void *ec) +{ + cgm->func->wch ( cgm, 5, 29, cgm->clr_size ); + cgm->func->co ( cgm, ec ); + return cgm->func->term(cgm); +} + +int cgm_edge_visibility ( CGM *cgm, int mode ) +{ + cgm->func->wch ( cgm, 5, 30, 2 ); + cgm->func->e ( cgm, mode, offon ); + return cgm->func->term(cgm); +} + +int cgm_fill_reference_point ( CGM *cgm, double rpx, double rpy ) +{ + cgm->func->wch ( cgm, 5, 31, 2*cgm->vdc_size ); + _cgm_point ( cgm, rpx, rpy ); + return cgm->func->term(cgm); +} + +int cgm_pattern_table ( CGM *cgm, long pi, long sx, long sy, int prec, const void *c) +{ + cgm->func->wch ( cgm, 5, 32, 31 ); + cgm->func->ix ( cgm, pi ); + + cgm->func->i ( cgm, sx ); + cgm->func->i ( cgm, sy ); + + if ( prec == 0 ) + cgm->func->i ( cgm, (long)(prec) ); + else + { + switch ( cgm->mode ) + { + case 0: /* character */ + break; + + case 1: /* binary */ + cgm->func->i ( cgm, (long)(prec) ); + break; + + case 2: /* clear text */ + cgm->func->i ( cgm, 2 * ( _cgm_int_precs[prec/8 - 1][1] + 1) ); + break; + } + } + + _cgm_cell_rows( cgm, sx, sy, prec, c ); + + return cgm->func->term(cgm); +} + +int cgm_pattern_size ( CGM *cgm, double hx, double hy, double wx, double wy ) +{ + cgm->func->wch ( cgm, 5, 33, 4*cgm->vdc_size ); + cgm->func->sep ( cgm, "% height %" ); + cgm->func->vdc ( cgm, hx ); + cgm->func->sep ( cgm, "," ); + cgm->func->vdc ( cgm, hy ); + cgm->func->nl ( cgm ); + cgm->func->align ( cgm, 8 ); + cgm->func->sep ( cgm, "% width %" ); + cgm->func->vdc ( cgm, wx ); + cgm->func->sep ( cgm, "," ); + cgm->func->vdc ( cgm, wy ); + return cgm->func->term(cgm); +} + +int cgm_colour_table ( CGM *cgm, long ci, long n, const double *cb ) +{ + register long i=n; + + if ( n > 31 ) n = 31; + + cgm->func->wch ( cgm, 5, 34, cgm->int_size+n*cgm->cd_size ); + cgm->func->i ( cgm, ci ); + + n = i; + + for ( i=0; ifunc->nl ( cgm ); + cgm->func->align ( cgm, 18 ); + } + cgm->func->rgb ( cgm, cb[(int)i], cb[(int)i+1], cb[(int)i+2] ); + } + + return cgm->func->term(cgm); +} + +static void _cgm_asf_pair ( CGM *cgm, int asft, int asfv ) +{ + static const char *asfvl[] = { "INDIV", "BUNDLED" }; + static const char *asftl[] = { + "LINE_TYPE", "LINE_WIDTH", "LINE_COLR", + "MARKER_TYPE", "MARKER_SIZE", "MARKER_COLR", + "TEXT_FONT_INDEX", "TEXT_PREC", "CHAR_EXP", "CHAR_SPACE", "TEXT_COLR", + "INT_STYLE", "FILL_COLR", "HATCH_INDEX", "PAT_INDEX", + "EDGE_TYPE", "EDGE_WIDTH", "EDGE_COLR", + "ALL", "ALL_LINE", "ALL_MARKER", "ALL_TEXT", "ALL_FILL", "ALL_EDGE" + }; + + cgm->func->nl ( cgm ); + cgm->func->align ( cgm, 4 ); + cgm->func->e ( cgm, asft, asftl ); + cgm->func->e ( cgm, asfv, asfvl ); +} + +int cgm_asfs ( CGM *cgm, int n, const int *asfts, const int* asfvs ) +{ + register int i; + cgm->func->wch ( cgm, 5, 35, 2*n* 2 ); + + for ( i=0; ifunc->term(cgm); +} + +/***************** +* Escape Element * +*****************/ + +/******************** +* External elements * +********************/ + +int cgm_message ( CGM *cgm, int action, const char *s) +{ + static const char *ac[] = { "NOACTION", "ACTION" }; + cgm->func->wch ( cgm, 7, 2, 2 + strlen(s)+1 ); + cgm->func->e ( cgm, action, ac ); + cgm->func->s ( cgm, s, strlen(s) ); + return cgm->func->term(cgm); +} diff --git a/cd/src/drv/cgm.h b/cd/src/drv/cgm.h new file mode 100755 index 0000000..632ebeb --- /dev/null +++ b/cd/src/drv/cgm.h @@ -0,0 +1,156 @@ +/** \file + * \brief CGM library + * Extracted from GKS/PUC + * + * See Copyright Notice in cd.h + */ + +#ifndef __CGM_H +#define __CGM_H + +typedef struct _cgmFunc CGMFUNC; + +typedef struct { + FILE *file; /* file pointer */ + + const CGMFUNC *func; /* functions */ + + int mode; /* character, binary, clear text */ + + int vdc_type, /* integer, real */ + int_prec, /* 8, 16, 24, 32 */ + real_prec, /* float*32, float*64, fixed*32, fixed*64 */ + ix_prec, /* 8, 16, 24, 32 */ + cd_prec, /* 8, 16, 24, 32 */ + cix_prec, /* 8, 16, 24, 32 */ + max_cix; /* maximum colour index */ + + int clrsm, /* indexed, direct */ + lnwsm, /* absolute, scaled */ + mkssm, /* absolute, scaled */ + edwsm; /* absolute, scaled */ + int vdc_int, /* X, 16, 24, 32 */ + vdc_real; /* float*32, float*64, fixed*32, fixed*64 */ + + int vdc_size, /* 2, 3, 4, 8 */ + int_size, /* 1, 2, 3, 4 */ + real_size, /* 4, 8 */ + ix_size, /* 1, 2, 3, 4 */ + cd_size, /* 1, 2, 3, 4 */ + cix_size, /* 1, 2, 3, 4 */ + clr_size, /* 3 * cd_size , cix_size */ + lnw_size, /* 2, 3, 4, 8 */ + mks_size, /* 2, 3, 4, 8 */ + edw_size; /* 2, 3, 4, 8 */ + + int cl; /* coluna para alinhamento */ + + int op; /* commands opened */ + int bc[5]; /* bytes count for command */ + long po[5]; /* position offset do arquivo */ +} CGM; + +CGM *cgm_begin_metafile ( char *, int, char * ); +int cgm_end_metafile ( CGM * ); +int cgm_begin_picture ( CGM *, const char * ); +int cgm_begin_picture_body ( CGM * ); +int cgm_end_picture ( CGM * ); +int cgm_metafile_version ( CGM *, long ); +int cgm_metafile_description ( CGM *, const char * ); +int cgm_vdc_type ( CGM *, int ); +int cgm_integer_precision ( CGM *, int ); +int cgm_real_precision ( CGM *, int ); +int cgm_index_precision ( CGM *, int ); +int cgm_colour_precision ( CGM *, int ); +int cgm_colour_index_precision ( CGM *, int ); +int cgm_maximum_colour_index ( CGM *, unsigned long ); +int cgm_colour_value_extent ( CGM *, const double *, const double * ); +int cgm_metafile_element_list ( CGM *, int, const int *, const int * ); +int cgm_begin_metafile_defaults ( CGM * ); +int cgm_end_metafile_defaults ( CGM * ); +int cgm_font_list ( CGM *, const char *l[] ); +int cgm_scaling_mode ( CGM *, int, float ); +int cgm_colour_selection_mode ( CGM *, int ); +int cgm_line_width_specify_mode ( CGM *, int ); +int cgm_marker_size_specify_mode( CGM *, int ); +int cgm_edge_width_specify_mode ( CGM *, int ); +int cgm_vdc_extent ( CGM *, double, double, double, double ); +int cgm_backgound_colour ( CGM *, const double * ); +int cgm_vdc_integer_precision ( CGM *, int ); +int cgm_vdc_real_precision ( CGM *, int ); +int cgm_auxiliary_colour ( CGM *, const void * ); +int cgm_transparency ( CGM *, int ); +int cgm_clip_rectangle ( CGM *, double, double, double, double ); +int cgm_clip_indicator ( CGM *, int ); +int cgm_polyline ( CGM *, int, const double * ); +int cgm_polymarker ( CGM *, int, const double * ); +int cgm_text ( CGM *, int, double, double, const char *, int); +int cgm_polygon ( CGM *, int, const double * ); +int cgm_cell_array ( CGM *, const double *, long, long, int, const void * ); +int cgm_rectangle ( CGM *, const double * ); +int cgm_elliptical_arc ( CGM *, const double *, const double *, const double *, double, double, double, double ); +int cgm_elliptical_arc_close ( CGM *, const double *, const double *, const double *, double, double, double, double, int ); +int cgm_line_bundle_index ( CGM *, long ); +int cgm_line_type ( CGM *, long ); +int cgm_line_width ( CGM *, double ); +int cgm_line_colour ( CGM *, const void * ); +int cgm_marker_bundle_index ( CGM *, long ); +int cgm_marker_type ( CGM *, long ); +int cgm_marker_size ( CGM *, double ); +int cgm_marker_colour ( CGM *, const void * ); +int cgm_text_bundle_index ( CGM *, long ); +int cgm_text_font_index ( CGM *, long ); +int cgm_text_precision ( CGM *, int ); +int cgm_char_expansion_factor ( CGM *, double ); +int cgm_char_spacing ( CGM *, double ); +int cgm_text_colour ( CGM *, const void * ); +int cgm_char_height ( CGM *, double ); +int cgm_char_orientation ( CGM *, double, double, double, double ); +int cgm_text_path ( CGM *, int ); +int cgm_text_alignment ( CGM *, int, int, double, double ); +int cgm_fill_bundle_index ( CGM *, long ); +int cgm_interior_style ( CGM *, int ); +int cgm_fill_colour ( CGM *, const void * ); +int cgm_hatch_index ( CGM *, long ); +int cgm_pattern_index ( CGM *, long ); +int cgm_edge_width ( CGM *, double ); +int cgm_edge_colour ( CGM *, const void * ); +int cgm_edge_visibility ( CGM *, int ); +int cgm_fill_reference_point ( CGM *, double, double ); +int cgm_pattern_table ( CGM *, long, long, long, int, const void * ); +int cgm_pattern_size ( CGM *, double, double, double, double ); +int cgm_colour_table ( CGM *, long, long, const double * ); +int cgm_asfs ( CGM *, int, const int *, const int * ); +int cgm_message ( CGM *, int, const char * ); + +enum { + LINE_SOLID=1, + LINE_DASH=2, + LINE_DOT=3, + LINE_DASH_DOT=4, + LINE_DASH_DOT_DOT=5 + }; + +enum { + MARKER_DOT=1, + MARKER_PLUS=2, + MARKER_ASTERISK=3, + MARKER_CIRCLE=4, + MARKER_CROSS=5 + }; + +enum { + HOLLOW, + SOLID, + PAT, + HATCH, + EMPTY + }; + +enum { /* encoding */ + CD_CHARACTER, + CD_BIN, + CD_CLEAR_TEXT + }; + +#endif diff --git a/cd/src/gdiplus/cdcontextplus.def b/cd/src/gdiplus/cdcontextplus.def new file mode 100755 index 0000000..92175a6 --- /dev/null +++ b/cd/src/gdiplus/cdcontextplus.def @@ -0,0 +1,9 @@ +EXPORTS + cdInitContextPlus + cdInitGdiPlus + cdwpCreateCanvas + cdwpGdiPlusStartup + cdwpGdiPlusShutdown + cdwpInitTable + cdwpUpdateCanvas + cdwpKillCanvas diff --git a/cd/src/gdiplus/cdwclpp.cpp b/cd/src/gdiplus/cdwclpp.cpp new file mode 100755 index 0000000..719713f --- /dev/null +++ b/cd/src/gdiplus/cdwclpp.cpp @@ -0,0 +1,206 @@ +/** \file + * \brief Windows GDI+ Clipboard Driver + * + * See Copyright Notice in cd.h + */ + +#include "cdwinp.h" +#include "cdclipbd.h" +#include "cdmf.h" +#include "cdemf.h" + +#include +#include +#include + +#include "cdmf_private.h" + + +static void cdkillcanvasCLIPBDMF (cdCtxCanvas* ctxcanvas) +{ + HANDLE Handle, hFile; + char* buffer; + DWORD dwSize, nBytesRead; + char filename[10240]; + cdCanvasMF* mfcanvas = (cdCanvasMF*)ctxcanvas; + + /* guardar antes de remover o canvas */ + strcpy(filename, mfcanvas->filename); + + OpenClipboard(NULL); + EmptyClipboard(); + + cdkillcanvasMF(mfcanvas); /* this will close the file */ + + hFile = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, NULL); + dwSize = GetFileSize (hFile, NULL) ; + + Handle = GlobalAlloc(GMEM_MOVEABLE, dwSize+1); + buffer = (char*)GlobalLock(Handle); + ReadFile(hFile, buffer, dwSize, &nBytesRead, NULL); + buffer[dwSize] = 0; + GlobalUnlock(Handle); + + CloseHandle(hFile); + + SetClipboardData(CF_TEXT, Handle); + + CloseClipboard(); +} + +static void cdkillcanvas (cdCtxCanvas* ctxcanvas) +{ + cdwpKillCanvas(ctxcanvas); + + OpenClipboard(NULL); + EmptyClipboard(); + + if (ctxcanvas->wtype == CDW_EMF) + { + HENHMETAFILE hEmf = ctxcanvas->metafile->GetHENHMETAFILE(); + SetClipboardData(CF_ENHMETAFILE, hEmf); + delete ctxcanvas->metafile; + } + else + { + HBITMAP hBitmap; + ctxcanvas->bitmap->GetHBITMAP(ctxcanvas->bg, &hBitmap); + SetClipboardData(CF_BITMAP, hBitmap); + delete ctxcanvas->bitmap; + } + + CloseClipboard(); + + delete ctxcanvas; +} + +/* +%F cdCreateCanvas para Clipboard +O DC pode ser um WMF ou um BITMAP. +*/ +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + char* strsize = (char*)data; + int w = 0, h = 0, wtype = CDW_EMF; /* default clipboard type */ + double res = 0; /* used only for BMP */ + Metafile* metafile = NULL; + Bitmap* bitmap = NULL; + Graphics* graphics; + + /* Inicializa parametros */ + if (strsize == NULL) + return; + + if (strstr(strsize, "-b") != NULL) + wtype = CDW_BMP; + else if (strstr(strsize, "-m") != NULL) + wtype = -1; /* CD METAFILE */ + + if (wtype != -1) + { + sscanf(strsize,"%dx%d %g",&w, &h, &res); + if (w == 0 || h == 0) + return; + } + + if (wtype == CDW_EMF) + { + HDC ScreenDC = GetDC(NULL); + /* LOGPIXELS can not be used for EMF */ + canvas->xres = (double)GetDeviceCaps(ScreenDC, HORZRES) / (double)GetDeviceCaps(ScreenDC, HORZSIZE); + canvas->yres = (double)GetDeviceCaps(ScreenDC, VERTRES) / (double)GetDeviceCaps(ScreenDC, VERTSIZE); + + Rect frameRect(0, 0, (int)(100 * w / canvas->xres), (int)(100 * h / canvas->yres)); + + metafile = new Metafile(ScreenDC, frameRect, MetafileFrameUnitGdi, EmfTypeEmfPlusDual, NULL); + ReleaseDC(NULL, ScreenDC); + + if (!metafile) + return; + + graphics = new Graphics(metafile); + } + else if (wtype == CDW_BMP) + { + if (!res) + { + HDC ScreenDC = GetDC(NULL); + canvas->xres = (double)GetDeviceCaps(ScreenDC, HORZRES) / (double)GetDeviceCaps(ScreenDC, HORZSIZE); + canvas->yres = (double)GetDeviceCaps(ScreenDC, VERTRES) / (double)GetDeviceCaps(ScreenDC, VERTSIZE); + ReleaseDC(NULL, ScreenDC); + } + else + { + canvas->xres = res; + canvas->yres = res; + } + + bitmap = new Bitmap(w, h, PixelFormat24bppRGB); + if (!bitmap) + return; + + bitmap->SetResolution((REAL)(canvas->xres*25.4), (REAL)(canvas->xres*25.4)); + + graphics = new Graphics(bitmap); + } + + if (wtype == -1) + { + char filename[1024]; + char tmpPath[512]; + char str[1024]; + + GetTempPath(512, tmpPath); + GetTempFileName(tmpPath, "~cd", 0, filename); + + sprintf(str, "%s %s", filename, strsize); + cdcreatecanvasMF(canvas, str); + } + else + { + cdCtxCanvas* ctxcanvas = cdwpCreateCanvas(canvas, graphics, wtype); + + canvas->w = w; + canvas->h = h; + canvas->bpp = 24; + + if (wtype == CDW_BMP) + ctxcanvas->bitmap = bitmap; + else + ctxcanvas->metafile = metafile; + } +} + +static void cdinittable(cdCanvas* canvas) +{ + if (canvas->invert_yaxis == 0) /* a simple way to distinguish MF from WIN */ + { + cdinittableMF(canvas); + canvas->cxKillCanvas = cdkillcanvasCLIPBDMF; + } + else + { + cdwpInitTable(canvas); + canvas->cxKillCanvas = cdkillcanvas; + } +} + +static cdContext cdClipboardContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_FLUSH | CD_CAP_YAXIS | + CD_CAP_PLAY | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | + CD_CAP_FPRIMTIVES ), + 1, + cdcreatecanvas, + cdinittable, + NULL, + NULL +}; + +extern "C" { +cdContext* cdContextClipboardPlus(void) +{ + return &cdClipboardContext; +} +} diff --git a/cd/src/gdiplus/cdwdbufp.cpp b/cd/src/gdiplus/cdwdbufp.cpp new file mode 100755 index 0000000..95cfe2e --- /dev/null +++ b/cd/src/gdiplus/cdwdbufp.cpp @@ -0,0 +1,164 @@ +/** \file + * \brief Windows GDI+ Double Buffer + * + * See Copyright Notice in cd.h + */ + +#include "cdwinp.h" +#include "cddbuf.h" +#include +#include + + +static void cdkillcanvas(cdCtxCanvas* ctxcanvas) +{ + cdwpKillCanvas(ctxcanvas); + + if (ctxcanvas->bitmap_dbuffer) delete ctxcanvas->bitmap_dbuffer; + delete ctxcanvas->bitmap; + + delete ctxcanvas; +} + +static void cddeactivate(cdCtxCanvas* ctxcanvas) +{ + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + /* this is done in the canvas_dbuffer context */ + cdCanvasDeactivate(canvas_dbuffer); +} + +static void cdflush(cdCtxCanvas* ctxcanvas) +{ + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + + if (ctxcanvas->dirty || ctxcanvas->bitmap_dbuffer == NULL) + { + ctxcanvas->dirty = 0; + if (ctxcanvas->bitmap_dbuffer) delete ctxcanvas->bitmap_dbuffer; + ctxcanvas->bitmap_dbuffer = new CachedBitmap(ctxcanvas->bitmap, canvas_dbuffer->ctxcanvas->graphics); + } + + ctxcanvas->graphics->Flush(FlushIntentionSync); + + /* this is done in the canvas_dbuffer context */ + /* Flush can be affected by Origin and Clipping, but not WriteMode */ + canvas_dbuffer->ctxcanvas->graphics->ResetTransform(); + + int x = 0, y = 0; + if (canvas_dbuffer->use_origin) + { + x += canvas_dbuffer->origin.x; + if (canvas_dbuffer->invert_yaxis) + y -= canvas_dbuffer->origin.y; // top down shift + else + y += canvas_dbuffer->origin.y; + } + + int old_writemode = cdCanvasWriteMode(canvas_dbuffer, CD_REPLACE); + canvas_dbuffer->ctxcanvas->graphics->DrawCachedBitmap(ctxcanvas->bitmap_dbuffer, x, y); + canvas_dbuffer->ctxcanvas->graphics->Flush(FlushIntentionSync); + cdCanvasWriteMode(canvas_dbuffer, old_writemode); +} + +static int cdactivate(cdCtxCanvas* ctxcanvas) +{ + int w, h; + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + + /* this is done in the canvas_dbuffer context */ + /* this will update canvas size */ + cdCanvasActivate(canvas_dbuffer); + w = canvas_dbuffer->w; + h = canvas_dbuffer->h; + if (w==0) w=1; + if (h==0) h=1; + + /* check if the size changed */ + if (w != ctxcanvas->canvas->w || + h != ctxcanvas->canvas->h) + { + delete ctxcanvas->graphics; + delete ctxcanvas->bitmap; + if (ctxcanvas->bitmap_dbuffer) delete ctxcanvas->bitmap_dbuffer; + ctxcanvas->bitmap_dbuffer = NULL; + + Bitmap* bitmap = new Bitmap(w, h, PixelFormat24bppRGB); + bitmap->SetResolution((REAL)(canvas_dbuffer->xres*25.4), (REAL)(canvas_dbuffer->yres*25.4)); + + ctxcanvas->bitmap = bitmap; + ctxcanvas->graphics = new Graphics(bitmap); + + ctxcanvas->canvas->w = w; + ctxcanvas->canvas->h = h; + + ctxcanvas->dirty = 1; + + cdwpUpdateCanvas(ctxcanvas); + } + + return CD_OK; +} + +/* +%F cdCreateCanvas para DBuffer. +O DC é um BITMAP em memoria. +*/ +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + int w, h; + cdCanvas* canvas_dbuffer = (cdCanvas*)data; + if (!canvas_dbuffer) + return; + + cdCanvasActivate(canvas_dbuffer); /* Update size */ + w = canvas_dbuffer->w; + h = canvas_dbuffer->h; + if (w==0) w=1; + if (h==0) h=1; + + Bitmap* bitmap = new Bitmap(w, h, PixelFormat24bppRGB); + bitmap->SetResolution((REAL)(canvas_dbuffer->xres*25.4), (REAL)(canvas_dbuffer->yres*25.4)); + + Graphics imggraphics(bitmap); + imggraphics.Clear(Color::White); + + Graphics* graphics = new Graphics(bitmap); + + canvas->w = w; + canvas->h = h; + canvas->bpp = 24; + + /* Initialize base driver */ + cdCtxCanvas* ctxcanvas = cdwpCreateCanvas(canvas, graphics, CDW_BMP); + + ctxcanvas->bitmap = bitmap; + ctxcanvas->canvas_dbuffer = canvas_dbuffer; +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwpInitTable(canvas); + + canvas->cxActivate = cdactivate; + canvas->cxDeactivate = cddeactivate; + canvas->cxFlush = cdflush; + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdDBufferContext = +{ + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | + CD_CAP_FPRIMTIVES), + 1, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +extern "C" { +cdContext* cdContextDBufferPlus(void) +{ + return &cdDBufferContext; +} +} diff --git a/cd/src/gdiplus/cdwemfp.cpp b/cd/src/gdiplus/cdwemfp.cpp new file mode 100755 index 0000000..38b4200 --- /dev/null +++ b/cd/src/gdiplus/cdwemfp.cpp @@ -0,0 +1,105 @@ +/** \file + * \brief Windows GDI+ EMF Driver + * + * See Copyright Notice in cd.h + */ + +#include "cdwinp.h" +#include "cdemf.h" +#include +#include + + + +static void cdkillcanvas (cdCtxCanvas* ctxcanvas) +{ + cdwpKillCanvas(ctxcanvas); + delete ctxcanvas->metafile; + delete ctxcanvas; +} + +/* +%F cdCreateCanvas para EMF. +O DC é um EMF em memoria. +*/ +static void cdcreatecanvas(cdCanvas* canvas, void* data) +{ + char* strdata = (char*)data; + char filename[10240] = ""; + Metafile* metafile; + + /* Inicializa parametros */ + if (strdata == NULL) + return; + + strdata += cdGetFileName(strdata, filename); + if (filename[0] == 0) + return; + + int w = 0, h = 0; + sscanf(strdata,"%dx%d", &w, &h); + if (w == 0 || h == 0) + return; + + { + /* Verifica se o arquivo pode ser aberto para escrita */ + FILE* file = fopen(filename, "wb"); + if (file == NULL) + return; + fclose(file); + } + + { + HDC ScreenDC = GetDC(NULL); + /* LOGPIXELS can not be used for EMF */ + canvas->xres = (double)GetDeviceCaps(ScreenDC, HORZRES) / (double)GetDeviceCaps(ScreenDC, HORZSIZE); + canvas->yres = (double)GetDeviceCaps(ScreenDC, VERTRES) / (double)GetDeviceCaps(ScreenDC, VERTSIZE); + + Rect frameRect(0, 0, (int)(100 * w / canvas->xres), (int)(100 * h / canvas->yres)); + + metafile = new Metafile(cdwpString2Unicode(filename, strlen(filename)), + ScreenDC, frameRect, MetafileFrameUnitGdi, EmfTypeEmfPlusDual, NULL); + + ReleaseDC(NULL, ScreenDC); + } + + canvas->w = w; + canvas->h = h; + canvas->bpp = 24; + + Graphics* graphics = new Graphics(metafile); + + /* Inicializa driver WIN32 */ + cdCtxCanvas* ctxcanvas = cdwpCreateCanvas(canvas, graphics, CDW_EMF); + + /* Inicializacao de variaveis particulares para o EMF */ + ctxcanvas->metafile = metafile; +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwpInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdEMFContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_PLAY | CD_CAP_FLUSH | CD_CAP_YAXIS | + CD_CAP_FPRIMTIVES | + CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV), + 1, + cdcreatecanvas, + cdinittable, + NULL, + NULL +}; + +extern "C" { +cdContext* cdContextEMFPlus(void) +{ + return &cdEMFContext; +} +} + + diff --git a/cd/src/gdiplus/cdwgdiplus.c b/cd/src/gdiplus/cdwgdiplus.c new file mode 100755 index 0000000..a6862bc --- /dev/null +++ b/cd/src/gdiplus/cdwgdiplus.c @@ -0,0 +1,42 @@ +/** \file + * \brief GDI+ Control + * + * See Copyright Notice in cd.h + */ + +#include "cd.h" +#include "cd_private.h" +#include "cdgdiplus.h" +#include +#include + +cdContext* cdContextNativeWindowPlus(void); +cdContext* cdContextImagePlus(void); +cdContext* cdContextDBufferPlus(void); +cdContext* cdContextPrinterPlus(void); +cdContext* cdContextEMFPlus(void); +cdContext* cdContextClipboardPlus(void); +void cdwpGdiPlusStartup(int debug); + +void cdInitGdiPlus(void) +{ + cdInitContextPlus(); +} + +void cdInitContextPlus(void) +{ + cdContext* ctx_list[NUM_CONTEXTPLUS]; + memset(ctx_list, 0, sizeof(ctx_list)); + + ctx_list[CD_CTX_NATIVEWINDOW] = cdContextNativeWindowPlus(); + ctx_list[CD_CTX_IMAGE] = cdContextImagePlus(); + ctx_list[CD_CTX_DBUFFER] = cdContextDBufferPlus(); + ctx_list[CD_CTX_PRINTER] = cdContextPrinterPlus(); + ctx_list[CD_CTX_EMF] = cdContextEMFPlus(); + ctx_list[CD_CTX_CLIPBOARD] = cdContextClipboardPlus(); + + cdInitContextPlusList(ctx_list); + + cdwpGdiPlusStartup(0); +} + diff --git a/cd/src/gdiplus/cdwimgp.cpp b/cd/src/gdiplus/cdwimgp.cpp new file mode 100755 index 0000000..697ff40 --- /dev/null +++ b/cd/src/gdiplus/cdwimgp.cpp @@ -0,0 +1,65 @@ +/** \file + * \brief Windows GDI+ Image Driver + * + * See Copyright Notice in cd.h + */ + +#include "cdwinp.h" +#include "cdimage.h" +#include +#include + + +static void cdkillcanvas (cdCtxCanvas* ctxcanvas) +{ + cdwpKillCanvas(ctxcanvas); + delete ctxcanvas; +} + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + if (data == NULL) + return; + + cdCtxImage* ctximage = ((cdImage*)data)->ctximage; + + /* Inicializa parametros */ + if (ctximage == NULL) + return; + + Graphics* graphics = new Graphics(ctximage->bitmap); + + canvas->w = ctximage->w; + canvas->h = ctximage->h; + canvas->bpp = ctximage->bpp; + + /* Inicializa driver Image */ + cdCtxCanvas* ctxcanvas = cdwpCreateCanvas(canvas, graphics, CDW_BMP); + + ctxcanvas->bitmap = ctximage->bitmap; +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwpInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdImageContext = +{ + CD_CAP_ALL & ~(CD_CAP_FLUSH | CD_CAP_PLAY | CD_CAP_YAXIS | + CD_CAP_FPRIMTIVES ), + 1, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +extern "C" { +cdContext* cdContextImagePlus(void) +{ + return &cdImageContext; +} +} diff --git a/cd/src/gdiplus/cdwinp.cpp b/cd/src/gdiplus/cdwinp.cpp new file mode 100755 index 0000000..1cbed3c --- /dev/null +++ b/cd/src/gdiplus/cdwinp.cpp @@ -0,0 +1,2338 @@ +/** \file + * \brief Windows GDI+ Base Driver + * + * See Copyright Notice in cd.h + */ + +#include "cdwinp.h" +#include "cdgdiplus.h" +#include "wd.h" +#include +#include +#include + +static void cdstipple(cdCtxCanvas* ctxcanvas, int w, int h, const unsigned char *index); + +void cdwpShowStatus(const char* title, Status status) +{ + char* status_str = ""; + switch(status) + { + case Ok: status_str = "Ok"; break; + case GenericError: status_str = "GenericError"; break; + case InvalidParameter: status_str = "InvalidParameter"; break; + case OutOfMemory: status_str = "OutOfMemory"; break; + case ObjectBusy: status_str = "ObjectBusy"; break; + case InsufficientBuffer: status_str = "InsufficientBuffer"; break; + case NotImplemented: status_str = "NotImplemented"; break; + case Win32Error: status_str = "Win32Error"; break; + case WrongState: status_str = "WrongState"; break; + case Aborted: status_str = "Aborted"; break; + case FileNotFound: status_str = "FileNotFound"; break; + case ValueOverflow: status_str = "ValueOverflow"; break; + case AccessDenied: status_str = "AccessDenied"; break; + case UnknownImageFormat: status_str = "UnknownImageFormat"; break; + case FontFamilyNotFound: status_str = "FontFamilyNotFound"; break; + case FontStyleNotFound: status_str = "FontStyleNotFound"; break; + case NotTrueTypeFont: status_str = "NotTrueTypeFont"; break; + case UnsupportedGdiplusVersion: status_str = "UnsupportedGdiplusVersion"; break; + case GdiplusNotInitialized: status_str = "GdiplusNotInitialized"; break; + case PropertyNotFound: status_str = "PropertyNotFound"; break; + case PropertyNotSupported: status_str = "PropertyNotSupported"; break; + } + + if (status != Ok) + MessageBox(NULL, status_str, title, MB_OK); +} + +/* +%F Libera memoria e handles alocados pelo driver Windows. +*/ +void cdwpKillCanvas(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->clip_poly) delete[] ctxcanvas->clip_poly; + if (ctxcanvas->clip_region) delete ctxcanvas->clip_region; + if (ctxcanvas->new_region) delete ctxcanvas->new_region; + if (ctxcanvas->font) delete ctxcanvas->font; + if (ctxcanvas->wdpoly) delete ctxcanvas->wdpoly; + + delete ctxcanvas->fillBrush; + delete ctxcanvas->lineBrush; + delete ctxcanvas->linePen; + + delete ctxcanvas->graphics; + + /* ctxcanvas e´ liberado em cada driver */ +} + +static int cdwpSetTransform(cdCtxCanvas* ctxcanvas, Matrix &transformMatrix, const double* matrix) +{ + if (matrix) + { + // configure a bottom-up coordinate system + Matrix Matrix1((REAL)1, (REAL)0, (REAL)0, (REAL)-1, (REAL)0, (REAL)(ctxcanvas->canvas->h-1)); + transformMatrix.Multiply(&Matrix1); + // add the global transform + Matrix Matrix2((REAL)matrix[0], (REAL)matrix[1], (REAL)matrix[2], (REAL)matrix[3], (REAL)matrix[4], (REAL)matrix[5]); + transformMatrix.Multiply(&Matrix2); + return 1; + } + else if (ctxcanvas->rotate_angle) + { + /* the rotation must be corrected because of the Y axis orientation */ + transformMatrix.Translate((REAL)ctxcanvas->rotate_center_x, (REAL)_cdInvertYAxis(ctxcanvas->canvas, ctxcanvas->rotate_center_y)); + transformMatrix.Rotate((REAL)-ctxcanvas->rotate_angle); + transformMatrix.Translate((REAL)-ctxcanvas->rotate_center_x, (REAL)-_cdInvertYAxis(ctxcanvas->canvas, ctxcanvas->rotate_center_y)); + return 1; + } + + return 0; +} + +static void cdwpUpdateTransform(cdCtxCanvas* ctxcanvas) +{ + Matrix transformMatrix; + ctxcanvas->graphics->ResetTransform(); // reset to the identity. + if (cdwpSetTransform(ctxcanvas, transformMatrix, ctxcanvas->canvas->use_matrix? ctxcanvas->canvas->matrix: NULL)) + ctxcanvas->graphics->SetTransform(&transformMatrix); +} + +/*********************************************************************/ +/* +%S Cor +*/ +/*********************************************************************/ + +static Color sColor2Windows(long int cd_color) +{ + return Color(cdAlpha(cd_color),cdRed(cd_color),cdGreen(cd_color),cdBlue(cd_color)); +} + +static void sUpdateFillBrush(cdCtxCanvas* ctxcanvas) +{ + // must update the fill brush that is dependent from the Foreground and Background Color. + BrushType type = ctxcanvas->fillBrush->GetType(); + switch(type) + { + case BrushTypeSolidColor: + { + SolidBrush* solidbrush = (SolidBrush*)ctxcanvas->fillBrush; + solidbrush->SetColor(ctxcanvas->fg); + break; + } + case BrushTypeHatchFill: + { + HatchBrush* hatchbrush = (HatchBrush*)ctxcanvas->fillBrush; + HatchStyle hatchStyle = hatchbrush->GetHatchStyle(); + delete ctxcanvas->fillBrush; + ctxcanvas->fillBrush = new HatchBrush(hatchStyle, ctxcanvas->fg, ctxcanvas->bg); + break; + } + case BrushTypeLinearGradient: + { + LinearGradientBrush* gradientbrush = (LinearGradientBrush*)ctxcanvas->fillBrush; + gradientbrush->SetLinearColors(ctxcanvas->fg, ctxcanvas->bg); + break; + } + case BrushTypeTextureFill: + { + // only stipple depends on Foreground and Background Color. + if (ctxcanvas->canvas->interior_style == CD_STIPPLE) + { + cdstipple(ctxcanvas, ctxcanvas->canvas->stipple_w, ctxcanvas->canvas->stipple_h, ctxcanvas->canvas->stipple); + } + break; + } + } +} + +static long int cdforeground(cdCtxCanvas* ctxcanvas, long int color) +{ + ctxcanvas->fg = sColor2Windows(color); + ctxcanvas->linePen->SetColor(ctxcanvas->fg); + ctxcanvas->lineBrush->SetColor(ctxcanvas->fg); + + sUpdateFillBrush(ctxcanvas); + + return color; +} + +static Color sSetAlpha(const Color& c, BYTE alpha) +{ + return Color(alpha, c.GetRed(), c.GetGreen(), c.GetBlue()); +} + +static long int cdbackground(cdCtxCanvas* ctxcanvas, long int color) +{ + ctxcanvas->bg = sColor2Windows(color); + + if ((ctxcanvas->canvas->back_opacity == CD_TRANSPARENT) && + (cdAlpha(ctxcanvas->canvas->background) == 255)) + ctxcanvas->bg = sSetAlpha(ctxcanvas->bg, (BYTE)0); + + sUpdateFillBrush(ctxcanvas); + + return color; +} + +static int cdbackopacity(cdCtxCanvas* ctxcanvas, int opacity) +{ + switch (opacity) + { + case CD_TRANSPARENT: + ctxcanvas->bg = sSetAlpha(ctxcanvas->bg, (BYTE)0); + break; + case CD_OPAQUE: + ctxcanvas->bg = sSetAlpha(ctxcanvas->bg, (BYTE)255); + break; + } + + sUpdateFillBrush(ctxcanvas); + + return opacity; +} + +static void cdpalette(cdCtxCanvas* ctxcanvas, int pal_size, const long int *colors, int mode) +{ + (void)mode; + + if (ctxcanvas->wtype == CDW_BMP && + (ctxcanvas->bitmap->GetPixelFormat() == PixelFormat1bppIndexed || + ctxcanvas->bitmap->GetPixelFormat() == PixelFormat4bppIndexed || + ctxcanvas->bitmap->GetPixelFormat() == PixelFormat8bppIndexed)) + { + UINT size = ctxcanvas->bitmap->GetPaletteSize(); + ColorPalette* palette = new ColorPalette [size]; + + palette->Count = pal_size; + palette->Flags = 0; + + for (int c = 0; c < pal_size; c++) + { + palette->Entries[c] = sColor2Windows(colors[c]).GetValue(); + } + + ctxcanvas->bitmap->SetPalette(palette); + delete palette; + } +} + +/*********************************************************************/ +/* +%S Canvas e clipping +*/ +/*********************************************************************/ + +static void sClipRect(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->clip_region) + delete ctxcanvas->clip_region; + + Rect rect(ctxcanvas->canvas->clip_rect.xmin, + ctxcanvas->canvas->clip_rect.ymin, + ctxcanvas->canvas->clip_rect.xmax-ctxcanvas->canvas->clip_rect.xmin+1, + ctxcanvas->canvas->clip_rect.ymax-ctxcanvas->canvas->clip_rect.ymin+1); + + ctxcanvas->clip_region = new Region(rect); + + ctxcanvas->graphics->SetClip(ctxcanvas->clip_region); +} + +static void sClipPoly(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->clip_region) + delete ctxcanvas->clip_region; + + GraphicsPath path; + path.SetFillMode(ctxcanvas->canvas->fill_mode==CD_EVENODD?FillModeAlternate:FillModeWinding); + path.AddPolygon(ctxcanvas->clip_poly, ctxcanvas->clip_poly_n); + ctxcanvas->clip_region = new Region(&path); + + ctxcanvas->graphics->SetClip(ctxcanvas->clip_region); +} + +static int cdclip(cdCtxCanvas* ctxcanvas, int clip_mode) +{ + switch (clip_mode) + { + case CD_CLIPOFF: + ctxcanvas->graphics->ResetClip(); + if (ctxcanvas->clip_region) + delete ctxcanvas->clip_region; + ctxcanvas->clip_region = NULL; + break; + case CD_CLIPAREA: + sClipRect(ctxcanvas); + break; + case CD_CLIPPOLYGON: + sClipPoly(ctxcanvas); + break; + case CD_CLIPREGION: + if (ctxcanvas->clip_region) + delete ctxcanvas->clip_region; + ctxcanvas->clip_region = ctxcanvas->new_region->Clone(); + ctxcanvas->graphics->SetClip(ctxcanvas->clip_region); + break; + } + + return clip_mode; +} + +static void cdcliparea(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if (ctxcanvas->canvas->clip_mode == CD_CLIPAREA) + { + ctxcanvas->canvas->clip_rect.xmin = xmin; + ctxcanvas->canvas->clip_rect.xmax = xmax; + ctxcanvas->canvas->clip_rect.ymin = ymin; + ctxcanvas->canvas->clip_rect.ymax = ymax; + + sClipRect(ctxcanvas); + } +} + +static void cdnewregion(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->new_region) + delete ctxcanvas->new_region; + ctxcanvas->new_region = new Region(); + ctxcanvas->new_region->MakeEmpty(); +} + +static int cdispointinregion(cdCtxCanvas* ctxcanvas, int x, int y) +{ + if (!ctxcanvas->new_region) + return 0; + + if (ctxcanvas->new_region->IsVisible(x, y)) + return 1; + + return 0; +} + +static void cdoffsetregion(cdCtxCanvas* ctxcanvas, int x, int y) +{ + if (!ctxcanvas->new_region) + return; + + ctxcanvas->new_region->Translate(x, y); +} + +static void cdgetregionbox(cdCtxCanvas* ctxcanvas, int *xmin, int *xmax, int *ymin, int *ymax) +{ + Rect rect; + + if (!ctxcanvas->new_region) + return; + + ctxcanvas->new_region->GetBounds(&rect, ctxcanvas->graphics); + + *xmin = rect.X; + *xmax = rect.X+rect.Width-1; + *ymin = rect.Y; + *ymax = rect.Y+rect.Height-1; +} + +static void sCombineRegion(cdCtxCanvas* ctxcanvas, Region& region) +{ + switch(ctxcanvas->canvas->combine_mode) + { + case CD_UNION: + ctxcanvas->new_region->Union(®ion); + break; + case CD_INTERSECT: + ctxcanvas->new_region->Intersect(®ion); + break; + case CD_DIFFERENCE: + ctxcanvas->new_region->Exclude(®ion); + break; + case CD_NOTINTERSECT: + ctxcanvas->new_region->Xor(®ion); + break; + } +} + +/******************************************************************/ +/* +%S Primitivas e seus atributos +*/ +/******************************************************************/ + +static int cdlinestyle(cdCtxCanvas* ctxcanvas, int style) +{ + switch (style) + { + case (CD_CONTINUOUS): + { + ctxcanvas->linePen->SetDashStyle(DashStyleSolid); + break; + } + case CD_DASHED: + { + if (ctxcanvas->canvas->line_width == 1) + { + REAL dashed[2] = {18.0f, 6.0f}; + ctxcanvas->linePen->SetDashPattern(dashed, 2); + } + else + ctxcanvas->linePen->SetDashStyle(DashStyleDash); + break; + } + case CD_DOTTED: + { + if (ctxcanvas->canvas->line_width == 1) + { + REAL dotted[2] = {3.0f, 3.0f}; + ctxcanvas->linePen->SetDashPattern(dotted, 2); + } + else + ctxcanvas->linePen->SetDashStyle(DashStyleDot); + break; + } + case CD_DASH_DOT: + { + if (ctxcanvas->canvas->line_width == 1) + { + REAL dash_dot[6] = {9.0f, 6.0f, 3.0f, 6.0f}; + ctxcanvas->linePen->SetDashPattern(dash_dot, 4); + } + else + ctxcanvas->linePen->SetDashStyle(DashStyleDashDot); + break; + } + case CD_DASH_DOT_DOT: + { + if (ctxcanvas->canvas->line_width == 1) + { + REAL dash_dot_dot[6] = {9.0f, 3.0f, 3.0f, 3.0f, 3.0f, 3.0f}; + ctxcanvas->linePen->SetDashPattern(dash_dot_dot, 6); + } + else + ctxcanvas->linePen->SetDashStyle(DashStyleDashDotDot); + break; + } + case CD_CUSTOM: + { + REAL* dash_style = new REAL [ctxcanvas->canvas->line_dashes_count]; + for (int i = 0; i < ctxcanvas->canvas->line_dashes_count; i++) + dash_style[i] = (REAL)ctxcanvas->canvas->line_dashes[i]/(REAL)ctxcanvas->canvas->line_width; + ctxcanvas->linePen->SetDashPattern(dash_style, ctxcanvas->canvas->line_dashes_count); + delete [] dash_style; + break; + } + } + + return style; +} + +static int cdlinecap(cdCtxCanvas* ctxcanvas, int cap) +{ + LineCap cd2win_lcap[] = {LineCapFlat, LineCapSquare, LineCapRound}; + DashCap cd2win_dcap[] = {DashCapFlat, DashCapFlat, DashCapRound}; + + ctxcanvas->linePen->SetLineCap(cd2win_lcap[cap], cd2win_lcap[cap], cd2win_dcap[cap]); + + return cap; +} + +static int cdlinejoin(cdCtxCanvas* ctxcanvas, int join) +{ + LineJoin cd2win_join[] = {LineJoinMiter, LineJoinBevel, LineJoinRound}; + + ctxcanvas->linePen->SetLineJoin(cd2win_join[join]); + + return join; +} + +static int cdlinewidth(cdCtxCanvas* ctxcanvas, int width) +{ + ctxcanvas->linePen->SetWidth((REAL)width); + cdlinestyle(ctxcanvas, ctxcanvas->canvas->line_style); + return width; +} + +static int cdhatch(cdCtxCanvas* ctxcanvas, int hatch_style) +{ + HatchStyle hatchStyle; + + switch (hatch_style) + { + default: // CD_HORIZONTAL: + hatchStyle = HatchStyleHorizontal; + break; + case CD_VERTICAL: + hatchStyle = HatchStyleVertical; + break; + case CD_FDIAGONAL: + hatchStyle = HatchStyleForwardDiagonal; + break; + case CD_BDIAGONAL: + hatchStyle = HatchStyleBackwardDiagonal; + break; + case CD_CROSS: + hatchStyle = HatchStyleCross; + break; + case CD_DIAGCROSS: + hatchStyle = HatchStyleDiagonalCross; + break; + } + + delete ctxcanvas->fillBrush; + ctxcanvas->fillBrush = new HatchBrush(hatchStyle, ctxcanvas->fg, ctxcanvas->bg); + + return hatch_style; +} + +static void cdstipple(cdCtxCanvas* ctxcanvas, int w, int h, const unsigned char *index) +{ + ULONG* bitmap_data = new ULONG [w*h]; + + for(int j = 0; j < h; j++) + { + int line_offset_index; + int line_offset = j*w; + if (ctxcanvas->canvas->invert_yaxis) + line_offset_index = ((h - 1) - j)*w; // Fix up side down + else + line_offset_index = line_offset; + + for(int i = 0; i < w; i++) + { + if (index[line_offset_index+i] != 0) + bitmap_data[line_offset+i] = ctxcanvas->fg.GetValue(); + else + bitmap_data[line_offset+i] = ctxcanvas->bg.GetValue(); + } + } + + Bitmap StippleImage(w, h, 4*w, PixelFormat32bppARGB, (BYTE*)bitmap_data); + StippleImage.SetResolution(ctxcanvas->graphics->GetDpiX(), ctxcanvas->graphics->GetDpiX()); + + delete ctxcanvas->fillBrush; + ctxcanvas->fillBrush = new TextureBrush(&StippleImage); + + delete bitmap_data; +} + +static void cdpattern(cdCtxCanvas* ctxcanvas, int w, int h, const long int *colors) +{ + int stride = 4*w; + BYTE* bitmap_data = new BYTE [stride*h]; + + for(int j = 0; j < h; j++) + { + int line_offset_colors; + int line_offset = j*stride; + if (ctxcanvas->canvas->invert_yaxis) + line_offset_colors = ((h - 1) - j)*w; // Fix up side down + else + line_offset_colors = j*w; + memcpy(bitmap_data + line_offset, colors + line_offset_colors, stride); + + // Fix alpha values + for(int i = 3; i < stride; i+=4) + bitmap_data[line_offset+i] = ~bitmap_data[line_offset+i]; + } + + Bitmap PatternImage(w, h, stride, PixelFormat32bppARGB, bitmap_data); + PatternImage.SetResolution(ctxcanvas->graphics->GetDpiX(), ctxcanvas->graphics->GetDpiX()); + + delete ctxcanvas->fillBrush; + ctxcanvas->fillBrush = new TextureBrush(&PatternImage); + + delete bitmap_data; +} + +static int cdinteriorstyle(cdCtxCanvas* ctxcanvas, int style) +{ + switch (style) + { + case CD_SOLID: + delete ctxcanvas->fillBrush; + ctxcanvas->fillBrush = new SolidBrush(ctxcanvas->fg); + break; + case CD_HATCH: + cdhatch(ctxcanvas, ctxcanvas->canvas->hatch_style); + break; + case CD_STIPPLE: + cdstipple(ctxcanvas, ctxcanvas->canvas->stipple_w, ctxcanvas->canvas->stipple_h, ctxcanvas->canvas->stipple); + break; + case CD_PATTERN: + cdpattern(ctxcanvas, ctxcanvas->canvas->pattern_w, ctxcanvas->canvas->pattern_h, ctxcanvas->canvas->pattern); + break; + } + + return style; +} + +static void cdline(cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2) +{ + ctxcanvas->graphics->DrawLine(ctxcanvas->linePen, x1, y1, x2, y2); + ctxcanvas->dirty = 1; +} + +static void cdrect(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + Rect rect(xmin, ymin, xmax-xmin, ymax-ymin); // in this case Size = Max - Min + ctxcanvas->graphics->DrawRectangle(ctxcanvas->linePen, rect); + ctxcanvas->dirty = 1; +} + +static void cdbox(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + Rect rect(xmin, ymin, xmax-xmin+1, ymax-ymin+1); + if (ctxcanvas->canvas->new_region) + { + Region region(rect); + sCombineRegion(ctxcanvas, region); + } + else + { + ctxcanvas->graphics->FillRectangle(ctxcanvas->fillBrush, rect); + ctxcanvas->dirty = 1; + } +} + +static void cdwpFixAngles(cdCtxCanvas* ctxcanvas, double *angle1, double *angle2) +{ + if (ctxcanvas->canvas->invert_yaxis) + { + // GDI+ angle are clock-wise by default + *angle1 *= -1; + *angle2 *= -1; + } +} + +static void cdarc(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2) +{ + Rect rect(xc - w/2, yc - h/2, w, h); + if (angle1 == 0 && angle2 == 360) + ctxcanvas->graphics->DrawEllipse(ctxcanvas->linePen, rect); + else + { + cdwpFixAngles(ctxcanvas, &angle1, &angle2); + ctxcanvas->graphics->DrawArc(ctxcanvas->linePen, rect, (REAL)angle1, (REAL)(angle2-angle1)); + } + ctxcanvas->dirty = 1; +} + +static void cdsector(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2) +{ + Rect rect(xc - w/2, yc - h/2, w, h); + if (ctxcanvas->canvas->new_region) + { + GraphicsPath path; + if (angle1==0 && angle2==360) + path.AddEllipse(rect); + else + { + cdwpFixAngles(ctxcanvas, &angle1, &angle2); + path.AddPie(rect, (REAL)angle1, (REAL)(angle2-angle1)); + } + Region region(&path); + sCombineRegion(ctxcanvas, region); + } + else + { + // complete the remaining pixels using an Arc + Pen pen(ctxcanvas->fillBrush); + + if (angle1==0 && angle2==360) + { + ctxcanvas->graphics->FillEllipse(ctxcanvas->fillBrush, rect); + ctxcanvas->graphics->DrawEllipse(&pen, rect); + } + else + { + cdwpFixAngles(ctxcanvas, &angle1, &angle2); + ctxcanvas->graphics->FillPie(ctxcanvas->fillBrush, rect, (REAL)angle1, (REAL)(angle2-angle1)); + ctxcanvas->graphics->DrawArc(&pen, rect, (REAL)angle1, (REAL)(angle2-angle1)); + } + ctxcanvas->dirty = 1; + } +} + +static void cdchord(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2) +{ + Rect rect(xc - w/2, yc - h/2, w, h); + if (ctxcanvas->canvas->new_region) + { + GraphicsPath path; + if (angle1==0 && angle2==360) + path.AddEllipse(rect); + else + { + cdwpFixAngles(ctxcanvas, &angle1, &angle2); + path.AddArc(rect, (REAL)angle1, (REAL)(angle2-angle1)); + path.CloseFigure(); + } + Region region(&path); + sCombineRegion(ctxcanvas, region); + } + else + { + if (angle1==0 && angle2==360) + ctxcanvas->graphics->FillEllipse(ctxcanvas->fillBrush, rect); + else + { + GraphicsPath path; + cdwpFixAngles(ctxcanvas, &angle1, &angle2); + path.AddArc(rect, (REAL)angle1, (REAL)(angle2-angle1)); + ctxcanvas->graphics->FillPath(ctxcanvas->fillBrush, &path); + } + Pen pen(ctxcanvas->fillBrush); // complete the remaining pixels using an Arc + ctxcanvas->graphics->DrawArc(&pen, rect, (REAL)angle1, (REAL)(angle2-angle1)); + ctxcanvas->dirty = 1; + } +} + +static void cdpoly(cdCtxCanvas* ctxcanvas, int mode, cdPoint* poly, int n) +{ + switch( mode ) + { + case CD_BEZIER: + if (n < 4) return; + ctxcanvas->graphics->DrawBeziers(ctxcanvas->linePen, (Point*)poly, n); + break; + case CD_FILLSPLINE: + if (n < 4) return; + if (ctxcanvas->canvas->new_region) + { + GraphicsPath path(ctxcanvas->canvas->fill_mode==CD_EVENODD?FillModeAlternate:FillModeWinding); + path.AddClosedCurve((Point*)poly, n); + Region region(&path); + sCombineRegion(ctxcanvas, region); + } + else + ctxcanvas->graphics->FillClosedCurve(ctxcanvas->fillBrush, (Point*)poly, n); + break; + case CD_SPLINE: + if (n < 4) return; + ctxcanvas->graphics->DrawClosedCurve(ctxcanvas->linePen, (Point*)poly, n); + break; + case CD_CLOSED_LINES: + poly[n].x = poly[0].x; + poly[n].y = poly[0].y; + n++; + /* continue */ + case CD_OPEN_LINES: + ctxcanvas->graphics->DrawLines(ctxcanvas->linePen, (Point*)poly, n); + break; + case CD_FILLGRADIENT: + { + int count = n; + PathGradientBrush* brush = new PathGradientBrush((Point*)poly, n); + brush->SetSurroundColors(ctxcanvas->pathGradient, &count); + brush->SetCenterColor(ctxcanvas->pathGradient[n]); + ctxcanvas->graphics->FillPolygon(brush, (Point*)poly, n, ctxcanvas->canvas->fill_mode==CD_EVENODD?FillModeAlternate:FillModeWinding); + } + break; + case CD_FILL: + poly[n].x = poly[0].x; + poly[n].y = poly[0].y; + n++; + if (ctxcanvas->canvas->new_region) + { + GraphicsPath path(ctxcanvas->canvas->fill_mode==CD_EVENODD?FillModeAlternate:FillModeWinding); + path.AddPolygon((Point*)poly, n); + Region region(&path); + sCombineRegion(ctxcanvas, region); + } + else + ctxcanvas->graphics->FillPolygon(ctxcanvas->fillBrush, (Point*)poly, n, ctxcanvas->canvas->fill_mode==CD_EVENODD?FillModeAlternate:FillModeWinding); + break; + case CD_CLIP: + poly[n].x = poly[0].x; + poly[n].y = poly[0].y; + n++; + + if (ctxcanvas->clip_poly) + delete[] ctxcanvas->clip_poly; + + ctxcanvas->clip_poly = new Point [n]; + + Point* pnt = (Point*)poly; + int t = n; + int nc = 1; + + ctxcanvas->clip_poly[0] = *pnt; + pnt++; + + for (int i = 1; i < t-1; i++, pnt++) + { + if (!((pnt->X == ctxcanvas->clip_poly[nc-1].X && pnt->X == (pnt + 1)->X) || + (pnt->Y == ctxcanvas->clip_poly[nc-1].Y && pnt->Y == (pnt + 1)->Y))) + { + ctxcanvas->clip_poly[nc] = *pnt; + nc++; + } + } + + ctxcanvas->clip_poly_n = nc; + + if (ctxcanvas->canvas->clip_mode == CD_CLIPPOLYGON) + sClipPoly(ctxcanvas); + + break; + } + + ctxcanvas->dirty = 1; +} + +WCHAR* cdwpString2Unicode(const char* s, int len) +{ + static WCHAR wstr[10240] = L""; + if (len >= 10240) len = 10239; + MultiByteToWideChar(CP_ACP, 0, s, -1, wstr, len+1); + return wstr; +} + +static int cdwpCompensateHeight(int height) +{ + return (int)floor(height/10. + 0.5); /* 10% */ +} + +static void cdgettextsize(cdCtxCanvas* ctxcanvas, const char *s, int len, int *width, int *height) +{ + RectF boundingBox; + + ctxcanvas->graphics->MeasureString(cdwpString2Unicode(s, len), len, + ctxcanvas->font, PointF(0,0), + &boundingBox); + if (width) + *width = (int)boundingBox.Width; + + if (height) + *height = (int)boundingBox.Height - cdwpCompensateHeight(ctxcanvas->fontinfo.height); +} + +static void sTextBox(cdCtxCanvas* ctxcanvas, WCHAR *ws, int len, int x, int y, int *w, int *h, int *xmin, int *ymin) +{ + int ydir = 1; + if (ctxcanvas->canvas->invert_yaxis) + ydir = -1; + + RectF boundingBox; + ctxcanvas->graphics->MeasureString(ws, len, + ctxcanvas->font, PointF(0,0), + &boundingBox); + *w = (int)boundingBox.Width; + *h = (int)boundingBox.Height - cdwpCompensateHeight(ctxcanvas->fontinfo.height); + + // distance from bottom to baseline + int baseline = ctxcanvas->fontinfo.height - ctxcanvas->fontinfo.ascent; + + // move to bottom-left + cdTextTranslatePoint(ctxcanvas->canvas, x, y, *w, *h, baseline, xmin, ymin); + + // move to top-left + *ymin += ydir * (*h); +} + +static void cdwpCanvasGetTextHeight(cdCanvas* canvas, int x, int y, int w, int h, int *hbox) +{ + int xmin, xmax, ymin, ymax; + + // distance from bottom to baseline + int baseline = canvas->ctxcanvas->fontinfo.height - canvas->ctxcanvas->fontinfo.ascent; + + /* move to bottom-left */ + cdTextTranslatePoint(canvas, x, y, w, h, baseline, &xmin, &ymin); + + xmax = xmin + w-1; + ymax = ymin + h-1; + + if (canvas->text_orientation) + { + double cos_theta = cos(canvas->text_orientation*CD_DEG2RAD); + double sin_theta = sin(canvas->text_orientation*CD_DEG2RAD); + int rectY[4]; + + cdRotatePointY(canvas, xmin, ymin, x, y, &rectY[0], sin_theta, cos_theta); + cdRotatePointY(canvas, xmax, ymin, x, y, &rectY[1], sin_theta, cos_theta); + cdRotatePointY(canvas, xmax, ymax, x, y, &rectY[2], sin_theta, cos_theta); + cdRotatePointY(canvas, xmin, ymax, x, y, &rectY[3], sin_theta, cos_theta); + + ymin = ymax = rectY[0]; + if (rectY[1] < ymin) ymin = rectY[1]; + if (rectY[2] < ymin) ymin = rectY[2]; + if (rectY[3] < ymin) ymin = rectY[3]; + if (rectY[1] > ymax) ymax = rectY[1]; + if (rectY[2] > ymax) ymax = rectY[2]; + if (rectY[3] > ymax) ymax = rectY[3]; + } + + *hbox = ymax-ymin+1; +} + +static void cdwpTextTransform(cdCtxCanvas* ctxcanvas, int *x, int *y, int w, int h, Matrix &transformMatrix) +{ + int hbox; + double* matrix = ctxcanvas->canvas->matrix; + Matrix m1; + + cdwpCanvasGetTextHeight(ctxcanvas->canvas, *x, *y, w, h, &hbox); + + // configure a bottom-up coordinate system + m1.SetElements((REAL)1, (REAL)0, (REAL)0, (REAL)-1, (REAL)0, (REAL)(ctxcanvas->canvas->h-1)); + transformMatrix.Multiply(&m1); + + // add the global transform + m1.SetElements((REAL)matrix[0], (REAL)matrix[1], (REAL)matrix[2], (REAL)matrix[3], (REAL)matrix[4], (REAL)matrix[5]); + transformMatrix.Multiply(&m1); + + // move to (x,y) and remove a vertical offset since text reference point is top-left + m1.SetElements((REAL)1, (REAL)0, (REAL)0, (REAL)1, (REAL)*x, (REAL)(*y - (hbox-1))); + transformMatrix.Multiply(&m1); + + // invert the text vertical orientation, relative to itself + m1.SetElements((REAL)1, (REAL)0, (REAL)0, (REAL)-1, (REAL)0, (REAL)(hbox-1)); + transformMatrix.Multiply(&m1); + + *x = 0; + *y = 0; +} + +static void cdtext(cdCtxCanvas* ctxcanvas, int x, int y, const char *s, int len) +{ + Matrix transformMatrix; + int use_transform = 0, w, h; + WCHAR* ws = cdwpString2Unicode(s, len); + + if (ctxcanvas->canvas->text_orientation) + { + transformMatrix.Translate((REAL)x, (REAL)y); + transformMatrix.Rotate((REAL)-ctxcanvas->canvas->text_orientation); + transformMatrix.Translate((REAL)-x, (REAL)-y); + use_transform = 1; + } + + // Move (x,y) to top-left + sTextBox(ctxcanvas, ws, len, x, y, &w, &h, &x, &y); + + if (ctxcanvas->canvas->use_matrix) + { + cdwpTextTransform(ctxcanvas, &x, &y, w, h, transformMatrix); + use_transform = 1; + } + else if (cdwpSetTransform(ctxcanvas, transformMatrix, NULL)) + use_transform = 1; + + if (ctxcanvas->canvas->new_region) + { + GraphicsPath path(ctxcanvas->canvas->fill_mode==CD_EVENODD?FillModeAlternate:FillModeWinding); + + if (use_transform) + path.Transform(&transformMatrix); + + FontFamily family; + ctxcanvas->font->GetFamily(&family); + path.AddString(ws, len, &family, ctxcanvas->font->GetStyle(), + ctxcanvas->font->GetSize(), + Point(x, y), NULL); + + Region region(&path); + sCombineRegion(ctxcanvas, region); + return; + } + + if (use_transform) + ctxcanvas->graphics->SetTransform(&transformMatrix); + + ctxcanvas->graphics->DrawString(ws, len, + ctxcanvas->font, PointF((REAL)x, (REAL)y), + ctxcanvas->lineBrush); + + if (use_transform) + cdwpUpdateTransform(ctxcanvas); // reset transform + + ctxcanvas->dirty = 1; +} + +static int sDesign2Pixel(int x, REAL size, int height) +{ + return (int)((x * size) / height); +} + +static int cdfont(cdCtxCanvas* ctxcanvas, const char *type_face, int style, int size) +{ + FontFamily* fontFamily; + + if (cdStrEqualNoCase(type_face, "Courier") || cdStrEqualNoCase(type_face, "Monospace")) + fontFamily = new FontFamily(L"Courier New"); + else if (cdStrEqualNoCase(type_face, "Times") || cdStrEqualNoCase(type_face, "Serif")) + fontFamily = new FontFamily(L"Times New Roman"); + else if (cdStrEqualNoCase(type_face, "Helvetica") || cdStrEqualNoCase(type_face, "Sans")) + fontFamily = new FontFamily(L"Arial"); + else if (cdStrEqualNoCase(type_face, "System")) + fontFamily = FontFamily::GenericSansSerif()->Clone(); + else + fontFamily = new FontFamily(cdwpString2Unicode(type_face, strlen(type_face))); + + REAL emSize = (REAL)(cdGetFontSizePixels(ctxcanvas->canvas, size)); + + INT fontStyle = FontStyleRegular; + if (style&CD_BOLD) fontStyle |= FontStyleBold; + if (style&CD_ITALIC) fontStyle |= FontStyleItalic; + if (style&CD_UNDERLINE) fontStyle |= FontStyleUnderline; + if (style&CD_STRIKEOUT) fontStyle |= FontStyleStrikeout; + + if (ctxcanvas->font) delete ctxcanvas->font; + ctxcanvas->font = new Font(fontFamily, emSize, fontStyle, UnitPixel); + + REAL fontSize = ctxcanvas->font->GetSize(); + int emHeight = fontFamily->GetEmHeight(fontStyle); + ctxcanvas->fontinfo.height = sDesign2Pixel(fontFamily->GetLineSpacing(fontStyle), fontSize, emHeight); + ctxcanvas->fontinfo.ascent = sDesign2Pixel(fontFamily->GetCellAscent(fontStyle), fontSize, emHeight); + ctxcanvas->fontinfo.descent = sDesign2Pixel(fontFamily->GetCellDescent(fontStyle), fontSize, emHeight); + + delete fontFamily; + + return 1; +} + +static int cdnativefont(cdCtxCanvas* ctxcanvas, const char* nativefont) +{ + int size = 12, bold = 0, italic = 0, underline = 0, strikeout = 0, style = CD_PLAIN; + char type_face[1024]; + + if (nativefont[0] == '-' && nativefont[1] == 'd') + { + COLORREF rgbColors; + LOGFONT lf; + ctxcanvas->font->GetLogFontA(ctxcanvas->graphics, &lf); + + CHOOSEFONT cf; + ZeroMemory(&cf, sizeof(CHOOSEFONT)); + + cf.lStructSize = sizeof(CHOOSEFONT); + cf.hwndOwner = GetForegroundWindow(); + cf.lpLogFont = &lf; + cf.Flags = CF_SCREENFONTS | CF_EFFECTS | CF_INITTOLOGFONTSTRUCT; + rgbColors = cf.rgbColors = ctxcanvas->fg.ToCOLORREF(); + + if (!ChooseFont(&cf)) + return 0; + + if (rgbColors != cf.rgbColors) + cdCanvasSetForeground(ctxcanvas->canvas, cdEncodeColor(GetRValue(cf.rgbColors),GetGValue(cf.rgbColors),GetBValue(cf.rgbColors))); + + bold = lf.lfWeight>FW_NORMAL? 1: 0; + italic = lf.lfItalic; + size = lf.lfHeight; + strcpy(type_face, lf.lfFaceName); + underline = lf.lfUnderline; + strikeout = lf.lfStrikeOut; + + if (bold) style |= CD_BOLD; + if (italic) style |= CD_ITALIC; + if (underline) style |= CD_UNDERLINE; + if (strikeout) style |= CD_STRIKEOUT; + } + else + { + if (!cdParseIupWinFont(nativefont, type_face, &style, &size)) + { + if (!cdParsePangoFont(nativefont, type_face, &style, &size)) + return 0; + } + + if (style&CD_BOLD) + bold = 1; + if (style&CD_ITALIC) + italic = 1; + if (style&CD_UNDERLINE) + underline = 1; + if (style&CD_STRIKEOUT) + strikeout = 1; + } + + REAL emSize = (REAL)(cdGetFontSizePixels(ctxcanvas->canvas, size)); + + INT fontStyle = FontStyleRegular; + if (bold) fontStyle |= FontStyleBold; + if (italic) fontStyle |= FontStyleItalic; + if (underline) fontStyle |= FontStyleUnderline; + if (strikeout) fontStyle |= FontStyleStrikeout; + + const char* new_type_face = type_face; + if (strstr(type_face, "Times") != NULL) + new_type_face = "Times"; + + if (strstr(type_face, "Courier") != NULL) + new_type_face = "Courier"; + + if (strstr(type_face, "Arial") != NULL) + new_type_face = "Helvetica"; + + if (strstr(type_face, "Helv") != NULL) + new_type_face = "Helvetica"; + + FontFamily *fontFamily; + if (strstr(type_face, "System") != NULL) + { + new_type_face = "System"; + fontFamily = FontFamily::GenericSansSerif()->Clone(); + } + else + fontFamily = new FontFamily(cdwpString2Unicode(type_face, strlen(type_face))); + + if (!fontFamily->IsAvailable()) + { + delete fontFamily; + return 0; + } + + Font* font = new Font(fontFamily, emSize, fontStyle, UnitPixel); + if (!font->IsAvailable()) + { + delete fontFamily; + delete font; + return 0; + } + + if (ctxcanvas->font) delete ctxcanvas->font; + ctxcanvas->font = font; + + REAL fontSize = ctxcanvas->font->GetSize(); + int emHeight = fontFamily->GetEmHeight(fontStyle); + ctxcanvas->fontinfo.height = sDesign2Pixel(fontFamily->GetLineSpacing(fontStyle), fontSize, emHeight); + ctxcanvas->fontinfo.ascent = sDesign2Pixel(fontFamily->GetCellAscent(fontStyle), fontSize, emHeight); + ctxcanvas->fontinfo.descent = sDesign2Pixel(fontFamily->GetCellDescent(fontStyle), fontSize, emHeight); + + delete fontFamily; + + /* update cdfont parameters */ + ctxcanvas->canvas->font_style = style; + ctxcanvas->canvas->font_size = size; + strcpy(ctxcanvas->canvas->font_type_face, new_type_face); + + return 1; +} + +static void cdgetfontdim(cdCtxCanvas* ctxcanvas, int *max_width, int *line_height, int *ascent, int *descent) +{ + if (max_width) + { + RectF boundingBox; + ctxcanvas->graphics->MeasureString(L"W", 2, + ctxcanvas->font, PointF(0,0), + &boundingBox); + *max_width = (int)(boundingBox.Width/2); + } + + if (line_height) + *line_height = ctxcanvas->fontinfo.height; + + if (ascent) + *ascent = ctxcanvas->fontinfo.ascent; + + if (descent) + *descent = ctxcanvas->fontinfo.descent; +} + +static void cdtransform(cdCtxCanvas *ctxcanvas, const double* matrix) +{ + Matrix transformMatrix; + ctxcanvas->graphics->ResetTransform(); // reset to the identity. + + if (matrix) + ctxcanvas->canvas->invert_yaxis = 0; + else + ctxcanvas->canvas->invert_yaxis = 1; + + if (cdwpSetTransform(ctxcanvas, transformMatrix, matrix)) + ctxcanvas->graphics->SetTransform(&transformMatrix); +} + +static void cdclear(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->canvas->clip_mode != CD_CLIPOFF) + ctxcanvas->graphics->ResetClip(); + + ctxcanvas->graphics->Clear(sSetAlpha(ctxcanvas->bg, (BYTE)255)); + + if (ctxcanvas->canvas->clip_mode != CD_CLIPOFF) + cdclip(ctxcanvas, ctxcanvas->canvas->clip_mode); + + ctxcanvas->dirty = 1; +} + +/******************************************************************/ +/* +%S Funcoes de imagens do cliente +*/ +/******************************************************************/ + +static void sRGB2Bitmap(Bitmap& image, int width, int height, const unsigned char *red, + const unsigned char *green, + const unsigned char *blue, + int xmin, int xmax, int ymin, int ymax, int topdown) +{ + BitmapData bitmapData; + Rect rect(0,0,image.GetWidth(),image.GetHeight()); + image.LockBits(&rect, ImageLockModeWrite, PixelFormat24bppRGB, &bitmapData); + + int line_offset; + for(int j = 0; j < rect.Height; j++) + { + if (topdown) + line_offset = (height - (ymax - j) - 1)*width; + else + line_offset = (ymax - j)*width; + + BYTE* line_data = (BYTE*)bitmapData.Scan0 + j*bitmapData.Stride; + + for(int i = 0; i < rect.Width; i++) + { + int offset = line_offset + i + xmin; + int offset_data = i*3; + line_data[offset_data+0] = blue[offset]; + line_data[offset_data+1] = green[offset]; + line_data[offset_data+2] = red[offset]; + } + } + + image.UnlockBits(&bitmapData); +} + +static void sRGBA2Bitmap(Bitmap& image, int width, int height, const unsigned char *red, + const unsigned char *green, + const unsigned char *blue, + const unsigned char *alpha, + int xmin, int xmax, int ymin, int ymax, int topdown) +{ + BitmapData bitmapData; + Rect rect(0,0,image.GetWidth(),image.GetHeight()); + image.LockBits(&rect, ImageLockModeWrite, PixelFormat32bppARGB, &bitmapData); + + int line_offset; + for(int j = 0; j < rect.Height; j++) + { + if (topdown) + line_offset = (height - (ymax - j) - 1)*width; + else + line_offset = (ymax - j)*width; + + BYTE* line_data = (BYTE*)bitmapData.Scan0 + j*bitmapData.Stride; + + for(int i = 0; i < rect.Width; i++) + { + int offset = line_offset + i + xmin; + int offset_data = i*4; + line_data[offset_data+0] = blue? blue[offset]: 0; + line_data[offset_data+1] = green? green[offset]: 0; + line_data[offset_data+2] = red? red[offset]: 0; + line_data[offset_data+3] = alpha[offset]; + } + } + + image.UnlockBits(&bitmapData); +} + +static void sAlpha2Bitmap(Bitmap& image, int width, int height, const unsigned char *alpha, + int xmin, int xmax, int ymin, int ymax, int topdown) +{ + BitmapData bitmapData; + Rect rect(0,0,image.GetWidth(),image.GetHeight()); + image.LockBits(&rect, ImageLockModeWrite, PixelFormat32bppARGB, &bitmapData); + + int line_offset; + for(int j = 0; j < rect.Height; j++) + { + if (topdown) + line_offset = (height - (ymax - j) - 1)*width; + else + line_offset = (ymax - j)*width; + + BYTE* line_data = (BYTE*)bitmapData.Scan0 + j*bitmapData.Stride; + + for(int i = 0; i < rect.Width; i++) + { + int offset = line_offset + i + xmin; + int offset_data = i*4; + line_data[offset_data+3] = alpha[offset]; + } + } + + image.UnlockBits(&bitmapData); +} + +/* +GDI+ does not natively work with palettized images. + +GDI+ will not try to draw on a palettized image as it would +require color reducing the drawing result. + +GDI+ will work natively with 32bpp image data behind the scenes anyway so +there is no economy in trying to work with 8bpp images. + +Full support for palettized images was on the feature list but it did not +make the cut for version 1 of GDI+. +*/ + +static void sMap2Bitmap(Bitmap& image, int width, int height, const unsigned char *index, + const long int *colors, + int xmin, int xmax, int ymin, int ymax, int topdown) +{ + BitmapData bitmapData; + Rect rect(0,0,image.GetWidth(),image.GetHeight()); + image.LockBits(&rect, ImageLockModeWrite, PixelFormat24bppRGB, &bitmapData); + + int line_offset; + for(int j = 0; j < rect.Height; j++) + { + if (topdown) + line_offset = (height - (ymax - j) - 1)*width; + else + line_offset = (ymax - j)*width; + + BYTE* line_data = (BYTE*)bitmapData.Scan0 + j*bitmapData.Stride; + + for(int i = 0; i < rect.Width; i++) + { + int map_index = index[line_offset + i + xmin]; + long color = colors[map_index]; + + int offset_data = i*3; + line_data[offset_data+0] = cdBlue(color); + line_data[offset_data+1] = cdGreen(color); + line_data[offset_data+2] = cdRed(color); + } + } + + image.UnlockBits(&bitmapData); +} + +static void sBitmap2RGB(Bitmap& image, unsigned char *red, unsigned char *green, unsigned char *blue) +{ + BitmapData bitmapData; + Rect rect(0,0,image.GetWidth(),image.GetHeight()); + image.LockBits(&rect, ImageLockModeRead, PixelFormat24bppRGB, &bitmapData); + + for(int j = 0; j < rect.Height; j++) + { + int line_offset = ((rect.Height-1) - j)*rect.Width; + + BYTE* line_data = (BYTE*)bitmapData.Scan0 + j*bitmapData.Stride; + + for(int i = 0; i < rect.Width; i++) + { + int offset = line_offset + i; + int offset_data = i*3; + blue[offset] = line_data[offset_data+0]; + green[offset] = line_data[offset_data+1]; + red[offset] = line_data[offset_data+2]; + } + } + + image.UnlockBits(&bitmapData); +} + +static void cdgetimagergb(cdCtxCanvas* ctxcanvas, unsigned char *red, unsigned char *green, unsigned char *blue, + int x, int y, int w, int h) +{ + Matrix transformMatrix; + ctxcanvas->graphics->GetTransform(&transformMatrix); + if (!transformMatrix.IsIdentity()) + ctxcanvas->graphics->ResetTransform(); // reset to the identity. + + if (ctxcanvas->canvas->invert_yaxis==0) // if 0, then the transform was reset + y = _cdInvertYAxis(ctxcanvas->canvas, y); + + int yr = y - (h - 1); /* y starts at the bottom of the image */ + Bitmap image(w, h, PixelFormat24bppRGB); + image.SetResolution(ctxcanvas->graphics->GetDpiX(), ctxcanvas->graphics->GetDpiX()); + + Graphics* imggraphics = new Graphics(&image); + + if (ctxcanvas->wtype == CDW_BMP) + { + imggraphics->DrawImage(ctxcanvas->bitmap, + Rect(0, 0, w, h), + x, yr, w, h, UnitPixel, + NULL, NULL, NULL); + } + else + { + HDC hdc = ctxcanvas->graphics->GetHDC(); + HDC img_hdc = imggraphics->GetHDC(); + + BitBlt(img_hdc,0,0,w,h,hdc,x,yr,SRCCOPY); + + imggraphics->ReleaseHDC(img_hdc); + ctxcanvas->graphics->ReleaseHDC(hdc); + } + + delete imggraphics; + + sBitmap2RGB(image, red, green, blue); + + if (!transformMatrix.IsIdentity()) + ctxcanvas->graphics->SetTransform(&transformMatrix); +} + +static void sFixImageY(cdCanvas* canvas, int *topdown, int *y, int *h) +{ + if (canvas->invert_yaxis) + { + if (*h < 0) + *topdown = 1; + else + *topdown = 0; + } + else + { + if (*h < 0) + *topdown = 0; + else + *topdown = 1; + } + + if (*h < 0) + *h = -(*h); // y is at top-left corner (UNDOCUMENTED FEATURE) + + if (!(*topdown)) + *y -= ((*h) - 1); // move Y to top-left corner, since it was at the bottom of the image +} + +static void cdputimagerectmap(cdCtxCanvas* ctxcanvas, int width, int height, const unsigned char *index, + const long int *colors, + int x, int y, int w, int h, + int xmin, int xmax, int ymin, int ymax) +{ + int topdown; + Bitmap image(xmax-xmin+1, ymax-ymin+1, PixelFormat24bppRGB); + image.SetResolution(ctxcanvas->graphics->GetDpiX(), ctxcanvas->graphics->GetDpiX()); + + sFixImageY(ctxcanvas->canvas, &topdown, &y, &h); + sMap2Bitmap(image, width, height, index, colors, xmin, xmax, ymin, ymax, topdown); + + ImageAttributes imageAttributes; + if (ctxcanvas->use_img_transp) + imageAttributes.SetColorKey(ctxcanvas->img_transp[0], ctxcanvas->img_transp[1], ColorAdjustTypeBitmap); + + if(ctxcanvas->use_img_points) + { + Point pts[3]; + pts[0] = ctxcanvas->img_points[0]; + pts[1] = ctxcanvas->img_points[1]; + pts[2] = ctxcanvas->img_points[2]; + if (ctxcanvas->canvas->invert_yaxis) + { + pts[0].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[0].Y); + pts[1].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[1].Y); + pts[2].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[2].Y); + } + ctxcanvas->graphics->DrawImage(&image, pts, 3, + 0, 0, image.GetWidth(), image.GetHeight(), UnitPixel, + &imageAttributes, NULL, NULL); + } + else + { + REAL bw = (REAL)image.GetWidth(); + REAL bh = (REAL)image.GetHeight(); + if (w > bw) bw-=0.5; // Fix the problem of not using PixelOffsetModeHalf + if (h > bh) bh-=0.5; + ctxcanvas->graphics->DrawImage(&image, RectF((REAL)x, (REAL)y, (REAL)w, (REAL)h), + 0, 0, bw, bh, UnitPixel, + &imageAttributes, NULL, NULL); + } + + ctxcanvas->dirty = 1; +} + +static void cdputimagerectrgb(cdCtxCanvas* ctxcanvas, int width, int height, const unsigned char *red, + const unsigned char *green, + const unsigned char *blue, + int x, int y, int w, int h, + int xmin, int xmax, int ymin, int ymax) +{ + int topdown; + Bitmap image(xmax-xmin+1, ymax-ymin+1, PixelFormat24bppRGB); + image.SetResolution(ctxcanvas->graphics->GetDpiX(), ctxcanvas->graphics->GetDpiX()); + + sFixImageY(ctxcanvas->canvas, &topdown, &y, &h); + sRGB2Bitmap(image, width, height, red, green, blue, xmin, xmax, ymin, ymax, topdown); + + ImageAttributes imageAttributes; + if (ctxcanvas->use_img_transp) + imageAttributes.SetColorKey(ctxcanvas->img_transp[0], ctxcanvas->img_transp[1], ColorAdjustTypeBitmap); + + if(ctxcanvas->use_img_points) + { + Point pts[3]; + pts[0] = ctxcanvas->img_points[0]; + pts[1] = ctxcanvas->img_points[1]; + pts[2] = ctxcanvas->img_points[2]; + if (ctxcanvas->canvas->invert_yaxis) + { + pts[0].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[0].Y); + pts[1].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[1].Y); + pts[2].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[2].Y); + } + ctxcanvas->graphics->DrawImage(&image, pts, 3, + 0, 0, image.GetWidth(), image.GetHeight(), UnitPixel, + &imageAttributes, NULL, NULL); + } + else + { + REAL bw = (REAL)image.GetWidth(); + REAL bh = (REAL)image.GetHeight(); + if (w > bw) bw-=0.5; // Fix the problem of not using PixelOffsetModeHalf + if (h > bh) bh-=0.5; + ctxcanvas->graphics->DrawImage(&image, RectF((REAL)x, (REAL)y, (REAL)w, (REAL)h), + 0, 0, bw, bh, UnitPixel, + &imageAttributes, NULL, NULL); + } + + ctxcanvas->dirty = 1; +} + +static void cdputimagerectrgba(cdCtxCanvas* ctxcanvas, int width, int height, const unsigned char *red, + const unsigned char *green, + const unsigned char *blue, + const unsigned char *alpha, + int x, int y, int w, int h, + int xmin, int xmax, int ymin, int ymax) +{ + int topdown; + Bitmap image(xmax-xmin+1, ymax-ymin+1, PixelFormat32bppARGB); + image.SetResolution(ctxcanvas->graphics->GetDpiX(), ctxcanvas->graphics->GetDpiX()); + + sFixImageY(ctxcanvas->canvas, &topdown, &y, &h); + sRGBA2Bitmap(image, width, height, red, green, blue, alpha, xmin, xmax, ymin, ymax, topdown); + + ImageAttributes imageAttributes; + if(ctxcanvas->use_img_points) + { + Point pts[3]; + pts[0] = ctxcanvas->img_points[0]; + pts[1] = ctxcanvas->img_points[1]; + pts[2] = ctxcanvas->img_points[2]; + if (ctxcanvas->canvas->invert_yaxis) + { + pts[0].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[0].Y); + pts[1].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[1].Y); + pts[2].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[2].Y); + } + ctxcanvas->graphics->DrawImage(&image, pts, 3, + 0, 0, image.GetWidth(), image.GetHeight(), UnitPixel, + &imageAttributes, NULL, NULL); + } + else + { + REAL bw = (REAL)image.GetWidth(); + REAL bh = (REAL)image.GetHeight(); + if (w > bw) bw-=0.5; // Fix the problem of not using PixelOffsetModeHalf + if (h > bh) bh-=0.5; + ctxcanvas->graphics->DrawImage(&image, RectF((REAL)x, (REAL)y, (REAL)w, (REAL)h), + 0, 0, bw, bh, UnitPixel, + &imageAttributes, NULL, NULL); + } + + ctxcanvas->dirty = 1; +} + +/********************************************************************/ +/* +%S Funcoes de imagens do servidor +*/ +/********************************************************************/ + +static void cdpixel(cdCtxCanvas* ctxcanvas, int x, int y, long int cd_color) +{ + if (!ctxcanvas->graphics->IsVisible(x, y)) + return; + + if (ctxcanvas->wtype == CDW_BMP) + { + ctxcanvas->bitmap->SetPixel(x, y, sColor2Windows(cd_color)); + } + else + { + if (ctxcanvas->canvas->use_matrix) + { + Point p = Point(x, y); + ctxcanvas->graphics->TransformPoints(CoordinateSpacePage, CoordinateSpaceWorld, &p, 1); + x = p.X; + y = p.Y; + } + HDC hdc = ctxcanvas->graphics->GetHDC(); + SetPixelV(hdc, x, y, sColor2Windows(cd_color).ToCOLORREF()); + ctxcanvas->graphics->ReleaseHDC(hdc); + } + + ctxcanvas->dirty = 1; +} + +static int sFormat2Bpp(PixelFormat pixelFormat) +{ + switch(pixelFormat) + { + case PixelFormat1bppIndexed: + return 1; + case PixelFormat4bppIndexed: + return 4; + case PixelFormat8bppIndexed: + return 8; + case PixelFormat16bppARGB1555: + case PixelFormat16bppGrayScale: + case PixelFormat16bppRGB555: + case PixelFormat16bppRGB565: + return 16; + case PixelFormat24bppRGB: + return 24; + case PixelFormat32bppARGB: + case PixelFormat32bppPARGB: + case PixelFormat32bppRGB: + return 32; + case PixelFormat48bppRGB: + return 48; + case PixelFormat64bppARGB: + case PixelFormat64bppPARGB: + return 64; + } + + return 0; +} + +static cdCtxImage *cdcreateimage(cdCtxCanvas* ctxcanvas, int width, int height) +{ + cdCtxImage *ctximage = new cdCtxImage; + ctximage->alpha = NULL; + + if (ctxcanvas->img_format) + { + ctximage->bitmap = new Bitmap(width, height, ctxcanvas->img_format==24? PixelFormat24bppRGB: PixelFormat32bppARGB); + if (!ctximage->bitmap) + { + delete ctximage; + return NULL; + } + + if (ctxcanvas->img_format==32 && ctxcanvas->img_alpha) + ctximage->alpha = ctxcanvas->img_alpha; + + ctximage->bitmap->SetResolution(ctxcanvas->graphics->GetDpiX(), ctxcanvas->graphics->GetDpiX()); + } + else + { + ctximage->bitmap = new Bitmap(width, height, ctxcanvas->graphics); + if (!ctximage->bitmap) + { + delete ctximage; + return NULL; + } + } + + ctximage->w = width; + ctximage->h = height; + + ctximage->bpp = sFormat2Bpp(ctximage->bitmap->GetPixelFormat()); + ctximage->xres = ctximage->bitmap->GetHorizontalResolution() / 25.4; + ctximage->yres = ctximage->bitmap->GetVerticalResolution() / 25.4; + + ctximage->w_mm = ctximage->w / ctximage->xres; + ctximage->h_mm = ctximage->h / ctximage->yres; + + Graphics imggraphics(ctximage->bitmap); + imggraphics.Clear(Color::White); + + return ctximage; +} + +static void cdgetimage(cdCtxCanvas* ctxcanvas, cdCtxImage *ctximage, int x, int y) +{ + Matrix transformMatrix; + ctxcanvas->graphics->GetTransform(&transformMatrix); + if (!transformMatrix.IsIdentity()) + ctxcanvas->graphics->ResetTransform(); // reset to the identity. + + if (ctxcanvas->canvas->invert_yaxis==0) // if 0, then the transform was reset + y = _cdInvertYAxis(ctxcanvas->canvas, y); + + int yr = y - (ctximage->h - 1); /* y0 starts at the bottom of the image */ + + if (ctxcanvas->wtype == CDW_BMP) + { + Graphics imggraphics(ctximage->bitmap); + + imggraphics.DrawImage(ctxcanvas->bitmap, + Rect(0, 0, ctximage->w,ctximage->h), + x, yr, ctximage->w, ctximage->h, UnitPixel, + NULL, NULL, NULL); + } + else + { + Graphics imggraphics(ctximage->bitmap); + + HDC hdc = ctxcanvas->graphics->GetHDC(); + HDC img_hdc = imggraphics.GetHDC(); + + BitBlt(img_hdc,0,0,ctximage->w,ctximage->h,hdc,x,yr,SRCCOPY); + + imggraphics.ReleaseHDC(img_hdc); + ctxcanvas->graphics->ReleaseHDC(hdc); + } + + if (!transformMatrix.IsIdentity()) + ctxcanvas->graphics->SetTransform(&transformMatrix); +} + +static void cdputimagerect(cdCtxCanvas* ctxcanvas, cdCtxImage *ctximage, int x0, int y0, int xmin, int xmax, int ymin, int ymax) +{ + int yr = y0 - (ymax-ymin+1)+1; /* y0 starts at the bottom of the image */ + + INT srcx = xmin; + INT srcy = (ctximage->h-1)-ymax; + INT srcwidth = xmax-xmin+1; + INT srcheight = ymax-ymin+1; + Rect destRect(x0, yr, srcwidth, srcheight); + + ImageAttributes imageAttributes; + + if (ctxcanvas->use_img_transp) + imageAttributes.SetColorKey(ctxcanvas->img_transp[0], ctxcanvas->img_transp[1], ColorAdjustTypeBitmap); + + if (ctximage->bpp == 32 && ctximage->alpha) + { + sAlpha2Bitmap(*ctximage->bitmap, ctximage->w, ctximage->h, ctximage->alpha, + 0, ctximage->w-1, 0, ctximage->h-1, 0); + } + + if(ctxcanvas->use_img_points) + { + Point pts[3]; + pts[0] = ctxcanvas->img_points[0]; + pts[1] = ctxcanvas->img_points[1]; + pts[2] = ctxcanvas->img_points[2]; + if (ctxcanvas->canvas->invert_yaxis) + { + pts[0].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[0].Y); + pts[1].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[1].Y); + pts[2].Y = _cdInvertYAxis(ctxcanvas->canvas, pts[2].Y); + } + ctxcanvas->graphics->DrawImage(ctximage->bitmap, pts, 3, + srcx, srcy, srcwidth, srcheight, UnitPixel, + &imageAttributes, NULL, NULL); + } + else + { + ctxcanvas->graphics->DrawImage(ctximage->bitmap, destRect, + srcx, srcy, srcwidth, srcheight, UnitPixel, + &imageAttributes, NULL, NULL); + } + + ctxcanvas->dirty = 1; +} + +static void cdkillimage(cdCtxImage *ctximage) +{ + delete ctximage->bitmap; + delete ctximage; +} + +static void cdscrollarea(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax, int dx, int dy) +{ + Matrix transformMatrix; + ctxcanvas->graphics->GetTransform(&transformMatrix); + if (!transformMatrix.IsIdentity()) + ctxcanvas->graphics->ResetTransform(); // reset to the identity. + + if (ctxcanvas->canvas->invert_yaxis==0) // if 0, then the transform was reset + { + dy = -dy; + ymin = _cdInvertYAxis(ctxcanvas->canvas, ymin); + ymax = _cdInvertYAxis(ctxcanvas->canvas, ymax); + _cdSwapInt(ymin, ymax); + } + + if (ctxcanvas->wtype == CDW_BMP) + { + Rect rect(xmin, ymin, xmax-xmin+1, ymax-ymin+1); + + Bitmap* bitmap = ctxcanvas->bitmap->Clone(rect, ctxcanvas->bitmap->GetPixelFormat()); + + rect.Offset(dx, dy); + + ctxcanvas->graphics->DrawImage(bitmap, rect, + 0, 0, rect.Width, rect.Height, UnitPixel, + NULL, NULL, NULL); + delete bitmap; + } + else + { + RECT rect; + rect.left = xmin; + rect.right = xmax+1; + rect.top = ymin; + rect.bottom = ymax+1; + + HDC hdc = ctxcanvas->graphics->GetHDC(); + ScrollDC(hdc, dx, dy, &rect, NULL, NULL, NULL); + ctxcanvas->graphics->ReleaseHDC(hdc); + } + + ctxcanvas->dirty = 1; + + if (!transformMatrix.IsIdentity()) + ctxcanvas->graphics->SetTransform(&transformMatrix); +} + +static void cdflush(cdCtxCanvas* ctxcanvas) +{ + ctxcanvas->graphics->Flush(FlushIntentionSync); +} + +/********************************************************************/ +/* +%S Atributos personalizados +*/ +/********************************************************************/ + +static void set_img_format_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (!data) + ctxcanvas->img_format = 0; + else + { + int bpp = 0; + sscanf(data, "%d", &bpp); + if (bpp == 0) + return; + + if (bpp == 32) + ctxcanvas->img_format = 32; + else + ctxcanvas->img_format = 24; + } +} + +static char* get_img_format_attrib(cdCtxCanvas* ctxcanvas) +{ + if (!ctxcanvas->img_format) + return NULL; + + if (ctxcanvas->img_format == 32) + return "32"; + else + return "24"; +} + +static cdAttribute img_format_attrib = +{ + "IMAGEFORMAT", + set_img_format_attrib, + get_img_format_attrib +}; + +static void set_img_alpha_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (!data) + ctxcanvas->img_alpha = NULL; + else + ctxcanvas->img_alpha = (unsigned char*)data; +} + +static char* get_img_alpha_attrib(cdCtxCanvas* ctxcanvas) +{ + return (char*)ctxcanvas->img_alpha; +} + +static cdAttribute img_alpha_attrib = +{ + "IMAGEALPHA", + set_img_alpha_attrib, + get_img_alpha_attrib +}; + +static void set_img_transp_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (!data) + ctxcanvas->use_img_transp = 0; + else + { + int r1, g1, b1, r2, g2, b2; + ctxcanvas->use_img_transp = 1; + sscanf(data, "%d %d %d %d %d %d", &r1, &g1, &b1, &r2, &g2, &b2); + ctxcanvas->img_transp[0] = Color((BYTE)r1, (BYTE)g1, (BYTE)b1); + ctxcanvas->img_transp[1] = Color((BYTE)r2, (BYTE)g2, (BYTE)b2); + } +} + + +static char* get_img_transp_attrib(cdCtxCanvas* ctxcanvas) +{ + if (!ctxcanvas->use_img_transp) + return NULL; + + int r1 = ctxcanvas->img_transp[0].GetRed(); + int g1 = ctxcanvas->img_transp[0].GetGreen(); + int b1 = ctxcanvas->img_transp[0].GetBlue(); + int r2 = ctxcanvas->img_transp[1].GetRed(); + int g2 = ctxcanvas->img_transp[1].GetGreen(); + int b2 = ctxcanvas->img_transp[1].GetBlue(); + + static char data[50]; + sprintf(data, "%d %d %d %d %d %d", r1, g1, b1, r2, g2, b2); + return data; +} + +static cdAttribute img_transp_attrib = +{ + "IMAGETRANSP", + set_img_transp_attrib, + get_img_transp_attrib +}; + +static void set_gradientcolor_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + // used by CD_FILLGRADIENT + if (data) + { + int r, g, b, cur_vertex; + sscanf(data, "%d %d %d", &r, &g, &b); + + cur_vertex = ctxcanvas->canvas->poly_n; + if (cur_vertex < 500) + ctxcanvas->pathGradient[cur_vertex] = Color((BYTE)r, (BYTE)g, (BYTE)b); + } +} + +static cdAttribute gradientcolor_attrib = +{ + "GRADIENTCOLOR", + set_gradientcolor_attrib, + NULL +}; + +static void set_linegradient_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (data) + { + int x1, y1, x2, y2; + sscanf(data, "%d %d %d %d", &x1, &y1, &x2, &y2); + + Point p1 = Point(x1, y1); + Point p2 = Point(x2, y2); + ctxcanvas->gradient[0] = p1; + ctxcanvas->gradient[1] = p2; + if (ctxcanvas->canvas->invert_yaxis) + { + p1.Y = _cdInvertYAxis(ctxcanvas->canvas, p1.Y); + p2.Y = _cdInvertYAxis(ctxcanvas->canvas, p2.Y); + } + delete ctxcanvas->fillBrush; + ctxcanvas->fillBrush = new LinearGradientBrush(p1, p2, ctxcanvas->fg, ctxcanvas->bg); + } +} + +static char* get_linegradient_attrib(cdCtxCanvas* ctxcanvas) +{ + static char data[100]; + + sprintf(data, "%d %d %d %d", ctxcanvas->gradient[0].X, + ctxcanvas->gradient[0].Y, + ctxcanvas->gradient[1].X, + ctxcanvas->gradient[1].Y); + + return data; +} + +static cdAttribute linegradient_attrib = +{ + "LINEGRADIENT", + set_linegradient_attrib, + get_linegradient_attrib +}; + +static void set_linecap_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (data) + { + LineCap cap = LineCapFlat; + + switch(data[0]) + { + case 'T': + cap = LineCapTriangle; + ctxcanvas->linePen->SetDashCap(DashCapTriangle); + break; + case 'N': + cap = LineCapNoAnchor; + break; + case 'S': + cap = LineCapSquareAnchor; + break; + case 'R': + cap = LineCapRoundAnchor; + break; + case 'D': + cap = LineCapDiamondAnchor; + break; + case 'A': + cap = LineCapArrowAnchor; + break; + default: + return; + } + + ctxcanvas->linePen->SetStartCap(cap); + ctxcanvas->linePen->SetEndCap(cap); + } +} + +static cdAttribute linecap_attrib = +{ + "LINECAP", + set_linecap_attrib, + NULL +}; + +static void set_rotate_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + /* ignore ROTATE if transform is set */ + if (ctxcanvas->canvas->use_matrix) + return; + + if (data) + { + sscanf(data, "%g %d %d", &ctxcanvas->rotate_angle, + &ctxcanvas->rotate_center_x, + &ctxcanvas->rotate_center_y); + } + else + { + ctxcanvas->rotate_angle = 0; + ctxcanvas->rotate_center_x = 0; + ctxcanvas->rotate_center_y = 0; + } + + cdwpUpdateTransform(ctxcanvas); +} + +static char* get_rotate_attrib(cdCtxCanvas* ctxcanvas) +{ + static char data[100]; + + sprintf(data, "%g %d %d", (double)ctxcanvas->rotate_angle, + ctxcanvas->rotate_center_x, + ctxcanvas->rotate_center_y); + + return data; +} + +static cdAttribute rotate_attrib = +{ + "ROTATE", + set_rotate_attrib, + get_rotate_attrib +}; + +static void set_img_points_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + int p[6]; + + if (!data) + { + ctxcanvas->use_img_points = 0; + return; + } + + sscanf(data, "%d %d %d %d %d %d", &p[0], &p[1], &p[2], &p[3], &p[4], &p[5]); + + ctxcanvas->img_points[0] = Point(p[0], p[1]); + ctxcanvas->img_points[1] = Point(p[2], p[3]); + ctxcanvas->img_points[2] = Point(p[4], p[5]); + + ctxcanvas->use_img_points = 1; +} + +static char* get_img_points_attrib(cdCtxCanvas* ctxcanvas) +{ + static char data[100]; + + if (!ctxcanvas->use_img_points) + return NULL; + + sprintf(data, "%d %d %d %d %d %d", ctxcanvas->img_points[0].X, + ctxcanvas->img_points[0].Y, + ctxcanvas->img_points[1].X, + ctxcanvas->img_points[1].Y, + ctxcanvas->img_points[2].X, + ctxcanvas->img_points[2].Y); + + return data; +} + +static cdAttribute img_points_attrib = +{ + "IMAGEPOINTS", + set_img_points_attrib, + get_img_points_attrib +}; + +static BOOL Is_WinXP_or_Later(void) +{ + OSVERSIONINFO osvi; + ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx (&osvi); + + BOOL bIsWindowsXPorLater = + (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) && + ( (osvi.dwMajorVersion > 5) || ( (osvi.dwMajorVersion == 5) && + (osvi.dwMinorVersion >= 1))); + + return bIsWindowsXPorLater; +} + +static void set_aa_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (!data || data[0] == '0') + { + ctxcanvas->graphics->SetInterpolationMode(InterpolationModeNearestNeighbor); + ctxcanvas->graphics->SetSmoothingMode(SmoothingModeNone); + ctxcanvas->graphics->SetTextRenderingHint(TextRenderingHintSingleBitPerPixelGridFit); + ctxcanvas->antialias = 0; + } + else + { + ctxcanvas->graphics->SetInterpolationMode(InterpolationModeBilinear); + ctxcanvas->graphics->SetSmoothingMode(SmoothingModeAntiAlias); + if (Is_WinXP_or_Later()) + ctxcanvas->graphics->SetTextRenderingHint(TextRenderingHintClearTypeGridFit); + else + ctxcanvas->graphics->SetTextRenderingHint(TextRenderingHintAntiAliasGridFit); +/* ctxcanvas->graphics->SetPixelOffsetMode(PixelOffsetModeHalf); + Do NOT set PixelOffsetMode because some graphic objects move their position and size. +*/ + ctxcanvas->antialias = 1; + } +} + +static char* get_aa_attrib(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->antialias) + return "1"; + else + return "0"; +} + +static cdAttribute aa_attrib = +{ + "ANTIALIAS", + set_aa_attrib, + get_aa_attrib +}; + +static void set_window_rgn(cdCtxCanvas* ctxcanvas, char* data) +{ + if (data) + { + HRGN hrgn = ctxcanvas->new_region->GetHRGN(ctxcanvas->graphics); + SetWindowRgn(ctxcanvas->hWnd, hrgn, TRUE); + } + else + SetWindowRgn(ctxcanvas->hWnd, NULL, TRUE); +} + +static cdAttribute window_rgn_attrib = +{ + "WINDOWRGN", + set_window_rgn, + NULL +}; + +static char* get_hdc_attrib(cdCtxCanvas* ctxcanvas) +{ + return (char*)ctxcanvas->hDC; +} + +static cdAttribute hdc_attrib = +{ + "HDC", + NULL, + get_hdc_attrib +}; + +static char* get_gdiplus_attrib(cdCtxCanvas* ctxcanvas) +{ + (void)ctxcanvas; + return "1"; +} + +static cdAttribute gdiplus_attrib = +{ + "GDI+", + NULL, + get_gdiplus_attrib +}; + +void cdwpUpdateCanvas(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->wtype == CDW_EMF && ctxcanvas->metafile) // first update metafile is NULL. + { + MetafileHeader metaHeader; + ctxcanvas->metafile->GetMetafileHeader(&metaHeader); + ctxcanvas->canvas->xres = metaHeader.GetDpiX() / 25.4; + ctxcanvas->canvas->yres = metaHeader.GetDpiY() / 25.4; + } + else + { + ctxcanvas->canvas->xres = ctxcanvas->graphics->GetDpiX() / 25.4; + ctxcanvas->canvas->yres = ctxcanvas->graphics->GetDpiY() / 25.4; + } + + ctxcanvas->canvas->w_mm = ((double)ctxcanvas->canvas->w) / ctxcanvas->canvas->xres; + ctxcanvas->canvas->h_mm = ((double)ctxcanvas->canvas->h) / ctxcanvas->canvas->yres; + + ctxcanvas->graphics->SetPageScale(1); + ctxcanvas->graphics->SetPageUnit(UnitPixel); + ctxcanvas->graphics->SetCompositingMode(CompositingModeSourceOver); + ctxcanvas->graphics->SetCompositingQuality(CompositingQualityDefault); + + if (ctxcanvas->antialias) + set_aa_attrib(ctxcanvas, "1"); + else + set_aa_attrib(ctxcanvas, NULL); + + cdwpUpdateTransform(ctxcanvas); +} + +/* +%F Cria o canvas para o driver Windows. +*/ +cdCtxCanvas *cdwpCreateCanvas(cdCanvas* canvas, Graphics* graphics, int wtype) +{ + cdCtxCanvas* ctxcanvas = new cdCtxCanvas; + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + + /* update canvas context */ + ctxcanvas->canvas = canvas; + canvas->ctxcanvas = ctxcanvas; + + ctxcanvas->wtype = wtype; + ctxcanvas->graphics = graphics; + + ctxcanvas->linePen = new Pen(Color()); + ctxcanvas->lineBrush = new SolidBrush(Color()); + ctxcanvas->fillBrush = new SolidBrush(Color()); + ctxcanvas->font = NULL; // will be created in the update default attrib + + set_aa_attrib(ctxcanvas, "1"); // default is ANTIALIAS=1 + + ctxcanvas->fg = Color(); // black + ctxcanvas->bg = Color(255, 255, 255); // white + + canvas->invert_yaxis = 1; + + ctxcanvas->clip_poly = NULL; + ctxcanvas->clip_poly_n = 0; + ctxcanvas->clip_region = NULL; + ctxcanvas->new_region = NULL; + + cdRegisterAttribute(canvas, &img_points_attrib); + cdRegisterAttribute(canvas, &img_transp_attrib); + cdRegisterAttribute(canvas, &img_format_attrib); + cdRegisterAttribute(canvas, &img_alpha_attrib); + cdRegisterAttribute(canvas, &aa_attrib); + cdRegisterAttribute(canvas, &gradientcolor_attrib); + cdRegisterAttribute(canvas, &linegradient_attrib); + cdRegisterAttribute(canvas, &rotate_attrib); + cdRegisterAttribute(canvas, &linecap_attrib); + cdRegisterAttribute(canvas, &hdc_attrib); + cdRegisterAttribute(canvas, &window_rgn_attrib); + cdRegisterAttribute(canvas, &gdiplus_attrib); + + cdwpUpdateCanvas(ctxcanvas); + + return ctxcanvas; +} + +static ULONG_PTR cd_gdiplusToken = NULL; + +static void __stdcall DebugEvent(DebugEventLevel level, char* msg) +{ + (void)level; + MessageBox(NULL, msg, "GDI+ Debug", 0); +} + +void cdwpGdiPlusStartup(int debug) +{ + if (cd_gdiplusToken == NULL) + { + GdiplusStartupInput input; + if (debug) + input.DebugEventCallback = DebugEvent; + + // Initialize GDI+. + GdiplusStartup(&cd_gdiplusToken, &input, NULL); + } +} + +void cdwpGdiPlusShutdown(void) +{ + if (cd_gdiplusToken) + GdiplusShutdown(cd_gdiplusToken); +} + +void cdwpInitTable(cdCanvas* canvas) +{ + cdCtxCanvas* ctxcanvas = canvas->ctxcanvas; + + canvas->cxFlush = cdflush; + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxPoly = cdpoly; + canvas->cxRect = cdrect; + canvas->cxBox = cdbox; + canvas->cxArc = cdarc; + canvas->cxSector = cdsector; + canvas->cxChord = cdchord; + canvas->cxText = cdtext; + + canvas->cxNewRegion = cdnewregion; + canvas->cxIsPointInRegion = cdispointinregion; + canvas->cxOffsetRegion = cdoffsetregion; + canvas->cxGetRegionBox = cdgetregionbox; + + canvas->cxGetFontDim = cdgetfontdim; + canvas->cxGetTextSize = cdgettextsize; + canvas->cxPutImageRectRGB = cdputimagerectrgb; + canvas->cxPutImageRectMap = cdputimagerectmap; + canvas->cxPutImageRectRGBA = cdputimagerectrgba; + + canvas->cxClip = cdclip; + canvas->cxClipArea = cdcliparea; + canvas->cxBackOpacity = cdbackopacity; + canvas->cxLineStyle = cdlinestyle; + canvas->cxLineWidth = cdlinewidth; + canvas->cxLineCap = cdlinecap; + canvas->cxLineJoin = cdlinejoin; + canvas->cxInteriorStyle = cdinteriorstyle; + canvas->cxHatch = cdhatch; + canvas->cxStipple = cdstipple; + canvas->cxPattern = cdpattern; + canvas->cxFont = cdfont; + canvas->cxNativeFont = cdnativefont; + canvas->cxBackground = cdbackground; + canvas->cxForeground = cdforeground; + canvas->cxPalette = cdpalette; + canvas->cxTransform = cdtransform; + + if (ctxcanvas->wtype == CDW_WIN || ctxcanvas->wtype == CDW_BMP) + { + canvas->cxClear = cdclear; + + canvas->cxGetImageRGB = cdgetimagergb; + + canvas->cxCreateImage = cdcreateimage; + canvas->cxGetImage = cdgetimage; + canvas->cxPutImageRect = cdputimagerect; + canvas->cxKillImage = cdkillimage; + + canvas->cxScrollArea = cdscrollarea; + } +} diff --git a/cd/src/gdiplus/cdwinp.h b/cd/src/gdiplus/cdwinp.h new file mode 100755 index 0000000..0c4ae55 --- /dev/null +++ b/cd/src/gdiplus/cdwinp.h @@ -0,0 +1,112 @@ +/** \file + * \brief Windows GDI+ Base Driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CDWINP_H +#define __CDWINP_H + +#include +#include +using namespace Gdiplus; + +#include "cd.h" +#include "cd_private.h" + + +/* Contexto de cada imagem no servidor */ +struct _cdCtxImage +{ + Bitmap *bitmap; /* bitmap associado */ + int w; /* largura da imagem */ + int h; /* altura da imagem */ + double w_mm, h_mm; /* size in mm */ + double xres, yres; /* resolution in pixels/mm */ + int bpp; + unsigned char* alpha; /* the alpha values must be stored here to be used at putimage */ +}; + +/* Contexto de todos os canvas GDI+ (CanvasContext). */ +struct _cdCtxCanvas +{ + cdCanvas* canvas; + + Graphics *graphics; + + Pen *linePen; + SolidBrush *lineBrush; + Brush *fillBrush; + Color fg, bg; /* foreground, backgound */ + Font *font; + + struct + { + int height; + int ascent; + int descent; + } fontinfo; + + Point *clip_poly; /* coordenadas do pixel no X,Y */ + int clip_poly_n; /* numero de pontos correntes */ + Region *clip_region; + + Region *new_region; + + int max_points; + PointF *wdpoly; // cache buffer for wdpoly + Point *cdpoly; // alias to cache buffer (float=int) + + int antialias; + + Point gradient[2]; + + Color pathGradient[500]; + + int img_format; + unsigned char* img_alpha; + + float rotate_angle; + int rotate_center_x, + rotate_center_y; + + Point img_points[3]; + int use_img_points; + + Color img_transp[2]; + int use_img_transp; + + int wtype; /* Flag indicando qual o tipo de superficie */ + + HWND hWnd; /* CDW_WIN handle */ + HDC hDC; /* GDI Device Context handle */ + int release_dc; + + HANDLE printerHandle; // Used by the printer driver + + Metafile* metafile; /* CDW_EMF handle */ + Bitmap* bitmap; /* CDW_BMP handle */ + + int dirty; // Used by the double buffer driver + CachedBitmap* bitmap_dbuffer; /* not the image_dbuffer, just a cache */ + cdCanvas* canvas_dbuffer; +}; + +enum{CDW_WIN, CDW_BMP, CDW_EMF}; + +cdCtxCanvas *cdwpCreateCanvas(cdCanvas* canvas, Graphics* graphics, int wtype); +void cdwpKillCanvas(cdCtxCanvas* ctxcanvas); + +void cdwpInitTable(cdCanvas* canvas); +void cdwpUpdateCanvas(cdCtxCanvas* canvas); + +WCHAR* cdwpString2Unicode(const char* s, int len); +void cdwpShowStatus(const char* title, Status status); + +extern "C" { +void cdwpGdiPlusStartup(int debug); +void cdwpGdiPlusShutdown(void); +} + +#endif /* ifndef CDWINP_H */ + diff --git a/cd/src/gdiplus/cdwnativep.cpp b/cd/src/gdiplus/cdwnativep.cpp new file mode 100755 index 0000000..fffd044 --- /dev/null +++ b/cd/src/gdiplus/cdwnativep.cpp @@ -0,0 +1,138 @@ +/** \file + * \brief Windows GDI+ Native Window Driver + * + * See Copyright Notice in cd.h + */ + +#include "cdwinp.h" +#include "cdnative.h" +#include +#include + + +static int cdactivate(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->hWnd) + { + RECT rect; + GetClientRect(ctxcanvas->hWnd, &rect); + int w = rect.right - rect.left; + int h = rect.bottom - rect.top; + int bpp = cdGetScreenColorPlanes(); + + if(ctxcanvas->canvas->w != w || + ctxcanvas->canvas->h != h || + ctxcanvas->canvas->bpp != bpp) + { + ctxcanvas->canvas->w = w; + ctxcanvas->canvas->h = h; + ctxcanvas->canvas->bpp = bpp; + + delete ctxcanvas->graphics; + ctxcanvas->graphics = new Graphics(ctxcanvas->hWnd); + + cdwpUpdateCanvas(ctxcanvas); + } + } + + return CD_OK; +} + +static void cdkillcanvas(cdCtxCanvas* ctxcanvas) +{ + cdwpKillCanvas(ctxcanvas); + + if (ctxcanvas->release_dc) + ReleaseDC(ctxcanvas->hWnd, ctxcanvas->hDC); + + delete ctxcanvas; +} + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + HWND hWnd = NULL; + HDC hDC = NULL; + Graphics* graphics; + int release_dc = 0; + + if (!data) + { + hDC = GetDC(NULL); + release_dc = 1; + + canvas->w = GetDeviceCaps(hDC, HORZRES); + canvas->h = GetDeviceCaps(hDC, VERTRES); + + graphics = new Graphics(hDC); + } + else if (IsWindow((HWND)data)) + { + hWnd = (HWND)data; + release_dc = 0; + + RECT rect; + GetClientRect(hWnd, &rect); + canvas->w = rect.right - rect.left; + canvas->h = rect.bottom - rect.top; + + graphics = new Graphics(hWnd); + } + else /* can be a HDC or a string */ + { + DWORD objtype = GetObjectType((HGDIOBJ)data); + if (objtype == OBJ_DC || objtype == OBJ_MEMDC || + objtype == OBJ_ENHMETADC || objtype == OBJ_METADC) + { + hDC = (HDC)data; + canvas->w = GetDeviceCaps(hDC, HORZRES); + canvas->h = GetDeviceCaps(hDC, VERTRES); + } + else + { + hDC = NULL; + canvas->w = 0; + canvas->h = 0; + sscanf((char*)data,"%p %dx%d", &hDC, &canvas->w, &canvas->h); + + if (!hDC || !canvas->w || !canvas->h) + return; + } + + graphics = new Graphics(hDC); + release_dc = 0; + } + + canvas->bpp = cdGetScreenColorPlanes(); + + /* Inicializa driver WIN32 */ + cdCtxCanvas* ctxcanvas = cdwpCreateCanvas(canvas, graphics, CDW_WIN); + ctxcanvas->hWnd = hWnd; + ctxcanvas->hDC = hDC; + ctxcanvas->release_dc = release_dc; +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwpInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxActivate = cdactivate; +} + +static cdContext cdNativeContext = +{ + CD_CAP_ALL & ~(CD_CAP_FLUSH | CD_CAP_PLAY | CD_CAP_YAXIS | + CD_CAP_FPRIMTIVES ), + 1, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +extern "C" { +cdContext* cdContextNativeWindowPlus(void) +{ + return &cdNativeContext; +} +} diff --git a/cd/src/gdiplus/cdwprnp.cpp b/cd/src/gdiplus/cdwprnp.cpp new file mode 100755 index 0000000..3d2b9f7 --- /dev/null +++ b/cd/src/gdiplus/cdwprnp.cpp @@ -0,0 +1,158 @@ +/** \file + * \brief Windows GDI+ Printer Driver + * + * See Copyright Notice in cd.h + */ + +#include "cdwinp.h" +#include "cdprint.h" +#include +#include +#include + +/* +%F cdKillCanvas para Printer. +Termina a pagina e termina o documento, enviando-o para a impressora. +*/ +static void cdkillcanvas (cdCtxCanvas* ctxcanvas) +{ + cdwpKillCanvas(ctxcanvas); + + EndPage(ctxcanvas->hDC); + EndDoc(ctxcanvas->hDC); + + ClosePrinter(ctxcanvas->printerHandle); + DeleteDC(ctxcanvas->hDC); + + delete ctxcanvas; +} + +/* +%F cdFlush para Printer. +Termina uma pagina e inicia outra. +*/ +static void cdflush(cdCtxCanvas* ctxcanvas) +{ + delete ctxcanvas->graphics; + EndPage(ctxcanvas->hDC); + + StartPage(ctxcanvas->hDC); + ctxcanvas->graphics = new Graphics(ctxcanvas->hDC, ctxcanvas->printerHandle); + + cdwpUpdateCanvas(ctxcanvas); +} + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + char *data_str = (char*) data; + char docname[256] = "CD - Canvas Draw Document"; + int dialog = 0; + + /* Inicializa parametros */ + if (data_str == NULL) + return; + + if (data_str[0] != 0) + { + const char *ptr = strstr(data_str, "-d"); + + if (ptr != NULL) + dialog = 1; + + if (data_str[0] != '-') + { + strcpy(docname, data_str); + + if (dialog) + docname[ptr - data_str - 1] = 0; + } + } + + PRINTDLG pd; + ZeroMemory(&pd, sizeof(PRINTDLG)); + pd.lStructSize = sizeof(PRINTDLG); + pd.nCopies = 1; + + if (dialog) + { + pd.Flags = PD_RETURNDC | PD_USEDEVMODECOPIESANDCOLLATE | PD_COLLATE | PD_NOPAGENUMS | PD_NOSELECTION; + pd.hwndOwner = GetForegroundWindow(); + } + else + { + pd.Flags = PD_RETURNDC | PD_RETURNDEFAULT; + } + + if (!PrintDlg(&pd)) + { + if(pd.hDevMode) + GlobalFree(pd.hDevMode); + if(pd.hDevNames) + GlobalFree(pd.hDevNames); + return; + } + + HDC hDC = pd.hDC; + + DEVMODE* devideMode = (DEVMODE*)GlobalLock(pd.hDevMode); + HANDLE printerHandle; + OpenPrinter((char*)devideMode->dmDeviceName, &printerHandle, NULL); + GlobalUnlock(pd.hDevMode); + + { + /* Inicializa documento */ + DOCINFO docInfo; + ZeroMemory(&docInfo, sizeof(docInfo)); + docInfo.cbSize = sizeof(docInfo); + docInfo.lpszDocName = docname; + + StartDoc(hDC, &docInfo); + } + + StartPage(hDC); + + canvas->w = GetDeviceCaps(hDC, HORZRES); + canvas->h = GetDeviceCaps(hDC, VERTRES); + canvas->bpp = GetDeviceCaps(hDC, BITSPIXEL); + + Graphics* graphics = new Graphics(hDC, printerHandle); + + /* Inicializa driver WIN32 */ + cdCtxCanvas* ctxcanvas = cdwpCreateCanvas(canvas, graphics, CDW_EMF); + + ctxcanvas->hDC = hDC; + ctxcanvas->printerHandle = printerHandle; + + if(pd.hDevMode) + GlobalFree(pd.hDevMode); + if(pd.hDevNames) + GlobalFree(pd.hDevNames); +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwpInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxFlush = cdflush; +} + +static cdContext cdPrinterContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_PLAY | CD_CAP_YAXIS | + CD_CAP_FPRIMTIVES | + CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV), + 1, + cdcreatecanvas, + cdinittable, + NULL, + NULL +}; + +extern "C" { +cdContext* cdContextPrinterPlus(void) +{ + return &cdPrinterContext; +} +} + diff --git a/cd/src/intcgm/bparse.c b/cd/src/intcgm/bparse.c new file mode 100755 index 0000000..c0ffada --- /dev/null +++ b/cd/src/intcgm/bparse.c @@ -0,0 +1,1660 @@ +#include /* FILE, ftell, fseek, fputc, fopen, fclose, fputs, fprintf */ +#include /* strlen, strncpy */ +#include /* malloc, free */ +#include "cd.h" +#include "cdcgm.h" +#include "list.h" +#include "types.h" +#include "bparse.h" +#include "intcgm.h" +#include "intcgm2.h" +#include "intcgm4.h" +#include "intcgm6.h" + +/********************* +* Delimiter elements * +*********************/ + +int cgmb_noop ( void ) +{ + return 0; +} + +int cgmb_begmtf ( void ) +{ + char *header = NULL; + + if ( intcgm_cgm.len ) + { + if ( cgmb_s ( &header ) ) return 1; + } + + if (cdcgmbegmtfcb) + { + int err; + err = cdcgmbegmtfcb ( intcgm_canvas, &intcgm_view_xmin, &intcgm_view_ymin, &intcgm_view_xmax, &intcgm_view_ymax ); + if ( err==CD_ABORT ) return -1; + } + + return 0; +} + +int cgmb_endmtf ( void ) +{ + return 0; +} + +int cgmb_begpic ( void ) +{ + char *s = NULL; + + if ( intcgm_cgm.first ) + intcgm_cgm.first = 0; + else + cdCanvasFlush(intcgm_canvas); + + if ( intcgm_color_table==NULL ) + { + if ( intcgm_cgm.max_cix < 1 ) intcgm_cgm.max_cix = 1; + + intcgm_color_table = (trgb *) malloc ( sizeof(trgb)*(intcgm_cgm.max_cix+1) ); + + intcgm_color_table[0].red = 255; + intcgm_color_table[0].green = 255; + intcgm_color_table[0].blue = 255; + intcgm_color_table[1].red = 0; + intcgm_color_table[1].green = 0; + intcgm_color_table[1].blue = 0; + } + + cdCanvasClip(intcgm_canvas, CD_CLIPAREA); + + if ( cgmb_s ( &s ) ) return 1; + + if (cdcgmbegpictcb) + { + int err; + err = cdcgmbegpictcb ( intcgm_canvas, s ); + if ( err==CD_ABORT ) return -1; + } + + return 0; +} + +int cgmb_begpib ( void ) +{ + if (cdcgmbegpictbcb) + { + int err; + err = cdcgmbegpictbcb ( intcgm_canvas, 1., 1., intcgm_scale_factor_x, intcgm_scale_factor_y, + intcgm_scale_factor_mm_x*intcgm_cgm.scaling_mode.scale_factor, + intcgm_scale_factor_mm_y*intcgm_cgm.scaling_mode.scale_factor, + intcgm_cgm.drawing_mode, + intcgm_vdc_ext.xmin, intcgm_vdc_ext.ymin, intcgm_vdc_ext.xmax, intcgm_vdc_ext.ymax ); + + if ( err==CD_ABORT ) return -1; + } + + if (cdcgmsizecb) + { + int err, w, h; + double w_mm=0., h_mm=0.; + + w = intcgm_view_xmax-intcgm_view_xmin+1; + h = intcgm_view_ymax-intcgm_view_ymin+1; + + if ( intcgm_cgm.vdc_type==INTEGER ) + { + w = (int) (intcgm_cgm.vdc_ext.second.x - intcgm_cgm.vdc_ext.first.x); + h = (int) (intcgm_cgm.vdc_ext.second.y - intcgm_cgm.vdc_ext.first.y); + if ( intcgm_cgm.scaling_mode.mode==METRIC ) + { + w_mm = w * intcgm_cgm.scaling_mode.scale_factor; + h_mm = h * intcgm_cgm.scaling_mode.scale_factor; + } + } + else + { + if ( intcgm_cgm.scaling_mode.mode==METRIC ) + { + w_mm = (intcgm_cgm.vdc_ext.second.x - intcgm_cgm.vdc_ext.first.x) * intcgm_cgm.scaling_mode.scale_factor; + h_mm = (intcgm_cgm.vdc_ext.second.y - intcgm_cgm.vdc_ext.first.y) * intcgm_cgm.scaling_mode.scale_factor; + } + } + + err = cdcgmsizecb ( intcgm_canvas, w, h, w_mm, h_mm ); + if ( err==CD_ABORT ) return -1; + } + + return 0; +} + +int cgmb_endpic ( void ) +{ + return 0; +} + +/******************************* +* Metafile Descriptor Elements * +*******************************/ + +int cgmb_mtfver ( void ) +{ + long version; + + if ( cgmb_i ( &version ) ) return 1; + + return 0; +} + +int cgmb_mtfdsc ( void ) +{ + char *s = NULL; + + if ( cgmb_s ( &s ) ) return 1; + + return 0; +} + +int cgmb_vdctyp ( void ) +{ + if ( cgmb_e ( &(intcgm_cgm.vdc_type) ) ) return 1; + + return 0; +} + +int cgmb_intpre ( void ) +{ + long prec; + + if ( cgmb_i ( &prec ) ) return 1; + + if ( prec==8 ) intcgm_cgm.int_prec.b_prec = 0; + else if ( prec==16 ) intcgm_cgm.int_prec.b_prec = 1; + else if ( prec==24 ) intcgm_cgm.int_prec.b_prec = 2; + else if ( prec==32 ) intcgm_cgm.int_prec.b_prec = 3; + + return 0; +} + +int cgmb_realpr ( void ) +{ + short mode = 0, i1; + long i2, i3; + + if ( cgmb_e ( &i1 ) ) return 1; + if ( cgmb_i ( &i2 ) ) return 1; + if ( cgmb_i ( &i3 ) ) return 1; + + if ( i1 == 0 && i2 == 9 && i3 == 23 ) mode = 0; + else if ( i1 == 0 && i2 == 12 && i3 == 52 ) mode = 1; + else if ( i1 == 1 && i2 == 16 && i3 == 16 ) mode = 2; + else if ( i1 == 1 && i2 == 32 && i3 == 32 ) mode = 3; + + intcgm_cgm.real_prec.b_prec = mode; + + return 0; +} + +int cgmb_indpre ( void ) +{ + long prec; + + if ( cgmb_i ( &prec ) ) return 1; + + if ( prec==8 ) intcgm_cgm.ix_prec.b_prec = 0; + else if ( prec==16 ) intcgm_cgm.ix_prec.b_prec = 1; + else if ( prec==24 ) intcgm_cgm.ix_prec.b_prec = 2; + else if ( prec==32 ) intcgm_cgm.ix_prec.b_prec = 3; + + return 0; +} + +int cgmb_colpre ( void ) +{ + long prec; + + if ( cgmb_i ( &prec ) ) return 1; + + if ( prec==8 ) intcgm_cgm.cd_prec = 0; + else if ( prec==16 ) intcgm_cgm.cd_prec = 1; + else if ( prec==24 ) intcgm_cgm.cd_prec = 2; + else if ( prec==32 ) intcgm_cgm.cd_prec = 3; + + return 0; +} + +int cgmb_colipr ( void ) +{ + long prec; + + if ( cgmb_i ( &prec ) ) return 1; + + if ( prec==8 ) intcgm_cgm.cix_prec = 0; + else if ( prec==16 ) intcgm_cgm.cix_prec = 1; + else if ( prec==24 ) intcgm_cgm.cix_prec = 2; + else if ( prec==32 ) intcgm_cgm.cix_prec = 3; + + return 0; +} + +int cgmb_maxcoi ( void ) +{ + if ( cgmb_ci ( (unsigned long *)&(intcgm_cgm.max_cix) ) ) return 1; + + intcgm_color_table = (trgb *) realloc ( intcgm_color_table, sizeof(trgb)*(intcgm_cgm.max_cix+1) ); + + intcgm_color_table[0].red = 255; + intcgm_color_table[0].green = 255; + intcgm_color_table[0].blue = 255; + intcgm_color_table[1].red = 0; + intcgm_color_table[1].green = 0; + intcgm_color_table[1].blue = 0; + + return 0; +} + +int cgmb_covaex ( void ) +{ + if ( cgmb_rgb ( &(intcgm_cgm.color_ext.black.red), &(intcgm_cgm.color_ext.black.green), &(intcgm_cgm.color_ext.black.blue) ) ) return 1; + if ( cgmb_rgb ( &(intcgm_cgm.color_ext.white.red), &(intcgm_cgm.color_ext.white.green), &(intcgm_cgm.color_ext.white.blue) ) ) return 1; + + return 0; +} + +int cgmb_mtfell ( void ) +{ + long group, element; + long n, i; + + if ( cgmb_i ( &n ) ) return 1; + + for ( i=0; i> 5; + + c = ( b & 0xF000 ) >> 12; + + cont = 0; + + if ( len > 30 ) + { + b = ((unsigned char)buff[count] << 8) | (unsigned char)buff[count+1]; + count += 2; + + intcgm_cgm.bl += 2; + + len = b & 0x7FFF; + cont = ( b & 0x8000 ); + } + + intcgm_cgm.len = len; + + if ( intcgm_cgm.len ) + { + if ( intcgm_cgm.len>intcgm_cgm.buff.size ) + intcgm_cgm.buff.dados = (char *) realloc ( (char *)intcgm_cgm.buff.dados, sizeof(char) * intcgm_cgm.len ); + + memcpy ( intcgm_cgm.buff.dados, &buff[count], intcgm_cgm.len ); + count += intcgm_cgm.len; + + intcgm_cgm.bl += intcgm_cgm.len; + + if ( len & 1 ) + { + count++; + intcgm_cgm.bl += 1; + } + + while ( cont ) + { + unsigned short b; + int old_len = intcgm_cgm.len; + + intcgm_cgm.bl += 2; + + b = ((unsigned char)buff[count] << 8) | (unsigned char)buff[count+1]; + count += 2; + + cont = ( b & 0x8000 ); + + len = b & 0x7fff; + + intcgm_cgm.len += len; + + if ( intcgm_cgm.len>intcgm_cgm.buff.size ) + intcgm_cgm.buff.dados = (char *) realloc ( (char *)intcgm_cgm.buff.dados, sizeof(char) * intcgm_cgm.len ); + + memcpy ( &intcgm_cgm.buff.dados[old_len], &buff[count], len ); + count += len; + + if ( len & 1 ) + { + count++; + + intcgm_cgm.bl += 1; + } + } + } + + if ( cgmb_exec_comand ( c, id ) ) return 1; + totbc += count; + /*count=0;*/ + } + + return 0; +} + +int cgmb_fntlst ( void ) +{ + char *fl = NULL; + + if ( intcgm_text_att.font_list==NULL ) intcgm_text_att.font_list = cgm_NewList(); + + while ( intcgm_cgm.bc < intcgm_cgm.len ) + { + if ( cgmb_s ( &fl ) ) return 1; + + cgm_AppendList ( intcgm_text_att.font_list, fl ); + } + + return 0; +} + +int cgmb_chslst ( void ) +{ + short mode; + char *s = NULL; + + while ( intcgm_cgm.bc < intcgm_cgm.len ) + { + if ( cgmb_e ( &mode ) ) return 1; + if ( cgmb_s ( &s ) ) return 1; + } + + return 0; +} + +int cgmb_chcdac ( void ) +{ + short mode; + + if ( cgmb_e ( &mode ) ) return 1; + + return 0; +} + + +/****************************** +* Picture Descriptor Elements * +******************************/ + +int cgmb_sclmde ( void ) +{ + if ( cgmb_e ( &(intcgm_cgm.scaling_mode.mode) ) ) return 1; + if ( intcgm_cgm.real_prec.b_prec==1 ) + { + if ( cgmb_getfl64 ( &(intcgm_cgm.scaling_mode.scale_factor) ) ) return 1; + } + else + { + float f; + if ( cgmb_getfl32 ( (float *) &f ) ) return 1; + if ( f<1e-20 ) f = 1; + intcgm_cgm.scaling_mode.scale_factor = f; + } + + if ( intcgm_cgm.scaling_mode.mode==ABSTRACT ) intcgm_cgm.scaling_mode.scale_factor=1.; + + intcgm_cgm.drawing_mode = ABSTRACT; + + if (cdcgmsclmdecb) + { + int err; + err = cdcgmsclmdecb ( intcgm_canvas, intcgm_cgm.scaling_mode.mode, &intcgm_cgm.drawing_mode, &intcgm_cgm.scaling_mode.scale_factor ); + if ( err==CD_ABORT ) return -1; + } + + if ( intcgm_cgm.drawing_mode==ABSTRACT ) + { + intcgm_clip_xmin = cgm_canvas2vdcx ( intcgm_view_xmin ); + intcgm_clip_xmax = cgm_canvas2vdcx ( intcgm_view_xmax ); + intcgm_clip_ymin = cgm_canvas2vdcy ( intcgm_view_ymin ); + intcgm_clip_ymax = cgm_canvas2vdcy ( intcgm_view_ymax ); + } + else + { + intcgm_clip_xmin = intcgm_vdc_ext.xmin*intcgm_cgm.scaling_mode.scale_factor; + intcgm_clip_xmax = intcgm_vdc_ext.xmax*intcgm_cgm.scaling_mode.scale_factor; + intcgm_clip_ymin = intcgm_vdc_ext.ymin*intcgm_cgm.scaling_mode.scale_factor; + intcgm_clip_ymax = intcgm_vdc_ext.ymax*intcgm_cgm.scaling_mode.scale_factor; + } + + return 0; +} + +int cgmb_clslmd ( void ) +{ + if ( cgmb_e ( &(intcgm_cgm.clrsm) ) ) return 1; + + return 0; +} + +int cgmb_lnwdmd ( void ) +{ + if ( cgmb_e ( &(intcgm_cgm.lnwsm) ) ) return 1; + + return 0; +} + +int cgmb_mkszmd ( void ) +{ + if ( cgmb_e ( &(intcgm_cgm.mkssm) ) ) return 1; + + return 0; +} + +int cgmb_edwdmd ( void ) +{ + if ( cgmb_e ( &(intcgm_cgm.edwsm) ) ) return 1; + + return 0; +} + +int cgmb_vdcext ( void ) +{ + if ( cgmb_p ( &(intcgm_cgm.vdc_ext.first.x), &(intcgm_cgm.vdc_ext.first.y) ) ) return 1; + if ( cgmb_p ( &(intcgm_cgm.vdc_ext.second.x), &(intcgm_cgm.vdc_ext.second.y) ) ) return 1; + + if (cdcgmvdcextcb) + { + int err; + err = cdcgmvdcextcb( intcgm_canvas, intcgm_cgm.vdc_type, &(intcgm_cgm.vdc_ext.first.x), &(intcgm_cgm.vdc_ext.first.y), + &(intcgm_cgm.vdc_ext.second.x), &(intcgm_cgm.vdc_ext.second.y) ); + if (err==CD_ABORT) return -1; + } + + cgm_do_vdcext ( intcgm_cgm.vdc_ext.first, intcgm_cgm.vdc_ext.second ); + + return 0; +} + +int cgmb_bckcol ( void ) +{ + if ( cgmb_rgb ( &(intcgm_cgm.back_color.red), &(intcgm_cgm.back_color.green), &(intcgm_cgm.back_color.blue) ) ) return 1; + + cgm_do_bckcol ( intcgm_cgm.back_color ); + + return 0; +} + +/******************* +* Control Elements * +*******************/ + +int cgmb_vdcipr ( void ) +{ + long prec; + + if ( cgmb_i ( &prec ) ) return 1; + + if ( prec==8 ) intcgm_cgm.vdc_int.b_prec = 0; + else if ( prec==16 ) intcgm_cgm.vdc_int.b_prec = 1; + else if ( prec==24 ) intcgm_cgm.vdc_int.b_prec = 2; + else if ( prec==32 ) intcgm_cgm.vdc_int.b_prec = 3; + + return 0; +} + +int cgmb_vdcrpr ( void ) +{ + short i1; + long mode = 0, i2, i3; + + if ( cgmb_e ( &i1 ) ) return 1; + if ( cgmb_i ( &i2 ) ) return 1; + if ( cgmb_i ( &i3 ) ) return 1 ; + + if ( i1 == 0 && i2 == 9 && i3 == 23 ) mode = 0; + else if ( i1 == 0 && i2 == 12 && i3 == 52 ) mode = 1; + else if ( i1 == 1 && i2 == 16 && i3 == 16 ) mode = 2; + else if ( i1 == 1 && i2 == 32 && i3 == 32 ) mode = 3; + + intcgm_cgm.vdc_real.b_prec = mode; + + return 0; +} + +int cgmb_auxcol ( void ) +{ + if ( cgmb_co ( &(intcgm_cgm.aux_color) ) ) return 1; + + return 0; +} + +int cgmb_transp ( void ) +{ + if ( cgmb_e ( &(intcgm_cgm.transparency) ) ) return 1; + + cgm_do_transp ( intcgm_cgm.transparency ); + + return 0; +} + +int cgmb_clprec ( void ) +{ + if ( cgmb_p ( &(intcgm_cgm.clip_rect.first.x), &(intcgm_cgm.clip_rect.first.y) ) ) return 1; + if ( cgmb_p ( &(intcgm_cgm.clip_rect.second.x), &(intcgm_cgm.clip_rect.second.y) ) ) return 1; + + cgm_do_clprec ( intcgm_cgm.clip_rect.first, intcgm_cgm.clip_rect.second ); + + return 0; +} + +int cgmb_clpind ( void ) +{ + if ( cgmb_e ( &(intcgm_cgm.clip_ind) ) ) return 1; + + cgm_do_clpind ( intcgm_cgm.clip_ind ); + + return 0; +} + +/******************************* +* Graphical Primitive Elements * +*******************************/ + +static tpoint *_intcgm_point_list ( int *np ) +{ + *np=0; + + while ( intcgm_cgm.bc < intcgm_cgm.len ) + { + if ( cgmb_p ( &(intcgm_point_list[*np].x), &(intcgm_point_list[*np].y) ) ) return NULL; + ++(*np); + if ( *np==intcgm_npoints) + { + intcgm_npoints *= 2; + intcgm_point_list = (tpoint *) realloc ( intcgm_point_list, intcgm_npoints*sizeof(tpoint) ); + } + } + + return intcgm_point_list; +} + +int cgmb_polyln ( void ) +{ + tpoint *pts; + int np; + + pts = _intcgm_point_list ( &np ); + if ( pts==NULL ) return 1; + + cgm_do_polyln ( np, pts ); + + return 0; +} + +int cgmb_djtply ( void ) +{ + tpoint *pts; + int np; + + pts = _intcgm_point_list ( &np ); + if ( pts==NULL ) return 1; + + cgm_do_djtply ( np, pts ); + + return 0; +} + +int cgmb_polymk ( void ) +{ + tpoint *pts; + int np; + + pts = _intcgm_point_list ( &np ); + if ( pts==NULL ) return 1; + + cgm_do_polymk ( np, pts ); + + return 0; +} + +int cgmb_text ( void ) +{ + tpoint pos; + char *s = NULL; + short t; + + if ( cgmb_p ( &pos.x, &pos.y ) ) return 1; + if ( cgmb_e ( &t ) ) return 1; + if ( cgmb_s ( &s ) ) return 1; + + cgm_do_text ( NORM_TEXT, s, pos ); + + free ( s ); + + return 0; +} + +int cgmb_rsttxt ( void ) +{ + double height, width; + tpoint pos; + char *s = NULL; + short t; + + if ( cgmb_vdc ( &width ) ) return 1; + if ( cgmb_vdc ( &height ) ) return 1; + if ( cgmb_p ( &pos.x, &pos.y ) ) return 1; + if ( cgmb_e ( &t ) ) return 1; + if ( cgmb_s ( &s ) ) return 1; + + intcgm_text_att.height = height; + + cgm_do_text ( RESTRICTED_TEXT, s, pos ); + + if ( s!= NULL ) free ( s ); + + return 0; +} + +int cgmb_apdtxt ( void ) +{ + char *s = NULL; + short t; + + if ( cgmb_e ( &t ) ) return 1; + if ( cgmb_s ( &s ) ) return 1; + + if ( s==NULL ) free ( s ); + + return 0; +} + +int cgmb_polygn ( void ) +{ + tpoint *pts; + int np; + static int porra=0; + + porra++; + + pts = _intcgm_point_list ( &np ); + if ( pts==NULL ) return 1; + + cgm_do_polygn ( np, pts ); + + return 0; +} + +static int _intcgm_vertex_list ( tpoint **pts, short **flags, int *np ) +{ + int intcgm_block=500; + + *np=0; + *pts = (tpoint *) malloc ( intcgm_block*sizeof(tpoint) ); + *flags = (short *) malloc ( intcgm_block*sizeof(short) ); + + while ( intcgm_cgm.bc < intcgm_cgm.len ) + { + if ( cgmb_p ( &((*pts)[*np].x), &((*pts)[*np].y) ) ) return 1; + if ( cgmb_e ( &((*flags)[*np]) ) ) return 1; + + ++(*np); + if ( *np==intcgm_block) + { + intcgm_block *= 2; + *pts = (tpoint *) realloc ( *pts, intcgm_block*sizeof(tpoint) ); + *flags = (short *) realloc ( *flags, intcgm_block*sizeof(short) ); + } + } + + return 0; +} + +int cgmb_plgset ( void ) +{ + tpoint *pts; + short *flags; + int np; + + if ( _intcgm_vertex_list ( &pts, &flags, &np ) ) return 1; + + cgm_do_plgset( NO, np, pts, flags ); + + free ( pts ); + free ( flags ); + + return 0; +} + +int cgmb_cellar ( void ) +{ + register int i, j, k; + long prec; + long sx, sy; + short mode; + int b; + unsigned char dummy; + tpoint corner1, corner2, corner3; + tcolor *cell; + + if ( cgmb_p ( &(corner1.x), &(corner1.y) ) ) return 1; + if ( cgmb_p ( &(corner2.x), &(corner2.y) ) ) return 1; + if ( cgmb_p ( &(corner3.x), &(corner3.y) ) ) return 1; + + if ( cgmb_i ( &sx ) ) return 1; + if ( cgmb_i ( &sy ) ) return 1; + + if ( cgmb_i ( &prec ) ) return 1; + + if ( cgmb_e ( &mode ) ) return 1; + + cell = (tcolor *) malloc ( sx*sy*sizeof(tcolor) ); + + if ( mode ) + for ( k=0; k *intcgm_block) + { + *intcgm_block *= 2; + *sout = (char *) realloc(*sout,sizeof(char)*(*intcgm_block)); + if ( *sout==NULL ) return 1; + } + + strcat(*sout,sin); + strcat(*sout," "); + + return 0; +} + +int intcgm_generalized_drawing_primitive_4 ( void ) +{ + long j, i; + tpoint pt[4]; + unsigned char c; + double r; + char *s=NULL, tmp[80]; + int intcgm_block = 500, slen = 0; + int id = -4; + + s = (char *) malloc ( intcgm_block*sizeof(char) ); + + strcpy ( s, "" ); + + for ( j=0; j<4; j++ ) + { + if ( cgmb_p ( &(pt[j].x), &(pt[j].y) ) ) return 1; + } + + if ( cgmb_getc(&c) ) return 1; + if ( cgmb_getc(&c) ) return 1; + + for ( j=0; j<6; j++ ) + { + if ( cgmb_r(&r) ) return 1; + sprintf(tmp,"%g",r); + if ( BuildString ( tmp, &s, &slen, &intcgm_block ) ) return 1; + } + + if ( cgmb_i(&i) ) return 1; + sprintf(tmp,"%ld",i); + if ( BuildString ( tmp, &s, &slen, &intcgm_block ) ) return 1; + + if ( cgmb_i(&sample_type) ) return 1; + sprintf(tmp,"%ld",sample_type); + if ( BuildString ( tmp, &s, &slen, &intcgm_block ) ) return 1; + + if ( cgmb_i(&n_samples) ) return 1; + sprintf(tmp,"%ld",n_samples); + if ( BuildString ( tmp, &s, &slen, &intcgm_block ) ) return 1; + + for ( j=0; j<2; j++ ) + { + if ( cgmb_r(&r) ) return 1; + sprintf(tmp,"%g",r); + if ( BuildString ( tmp, &s, &slen, &intcgm_block ) ) return 1; + } + + for ( j=0; j<4; j++ ) + { + if ( cgmb_i(&i) ) return 1; + sprintf(tmp,"%ld",i); + if ( BuildString ( tmp, &s, &slen, &intcgm_block ) ) return 1; + } + + cgm_do_gdp ( id, pt, s ); + + free(s); + + return 0; +} + +typedef int (*_getdata) (void *); + +int intcgm_generalized_drawing_primitive_5 ( void ) +{ + int (*getdata) (void *); + void *data; + char format[10]; + int i; + char *s, tmp[80]; + int intcgm_block = 500, slen = 0; + long id=-5; + + s = (char *) malloc ( sizeof(char)*intcgm_block ); + + strcpy ( s, "" ); + + switch ( sample_type ) + { + case 0: + getdata = (_getdata) cgmb_geti16; + data = (short *) malloc ( sizeof(short) ); + if ( data==NULL ) return 1; + strcpy ( format, "%d\0" ); + break; + case 1: + getdata = (_getdata) cgmb_geti32; + data = (long *) malloc ( sizeof(long) ); + if ( data==NULL ) return 1; + strcpy ( format, "%d\0" ); + break; + case 2: + getdata = (_getdata) cgmb_getfl32; + data = (float *) malloc ( sizeof(float) ); + if ( data==NULL ) return 1; + strcpy ( format, "%g\0" ); + break; + case 3: + getdata = (_getdata) cgmb_geti8; + data = (signed char *) malloc ( sizeof(signed char) ); + if ( data==NULL ) return 1; + strcpy ( format, "%d\0" ); + break; + case 4: + getdata = (_getdata) cgmb_geti16; + data = (short *) malloc ( sizeof(short) ); + if ( data==NULL ) return 1; + strcpy ( format, "%d\0" ); + break; + case 5: + getdata = (_getdata) cgmb_geti8; + data = (signed char *) malloc ( sizeof(signed char) ); + if ( data==NULL ) return 1; + strcpy ( format, "%d\0" ); + break; + } + + for ( i=0; iindex) ) ) return 1; + + if ( cgmb_i ( &(pat->nx) ) ) return 1; + if ( cgmb_i ( &(pat->ny) ) ) return 1; + + if ( cgmb_i ( &(localp) ) ) return 1; + + pat->pattern = (tcolor *) malloc ( pat->nx*pat->ny*sizeof(tcolor) ); + + for ( i=0; i<(pat->nx*pat->ny); i++ ) + { + if ( cgmb_getpixel ( &(pat->pattern[i]), localp ) ) return 1; + } + + cgm_AppendList ( intcgm_fill_att.pat_list, pat ); + + return 0; +} + +int cgmb_patsiz ( void ) +{ + if ( cgmb_vdc ( &(intcgm_fill_att.pat_size.height.x) ) ) return 1; + if ( cgmb_vdc ( &(intcgm_fill_att.pat_size.height.y) ) ) return 1; + if ( cgmb_vdc ( &(intcgm_fill_att.pat_size.width.x) ) ) return 1; + if ( cgmb_vdc ( &(intcgm_fill_att.pat_size.width.y) ) ) return 1; + + return 0; +} + +int cgmb_coltab ( void ) +{ + unsigned long starting_index, i; + int p[] = {8, 16, 24, 32}; + int n = (intcgm_cgm.len-intcgm_cgm.cix_prec)/(3*(p[intcgm_cgm.cd_prec]/8)); + + if ( cgmb_ci ( &(starting_index) ) ) return 1; + + for ( i=starting_index; itype) ) ) return 1; + if ( cgmb_e ( &(pair->value) ) ) return 1; + + cgm_AppendList ( intcgm_asf_list, pair ); + } + + return 0; +} + +/***************** +* Escape Element * +*****************/ + +/******************** +* External elements * +********************/ + +int cgmb_escape ( void ) /* escape */ +{ +#if 1 + + { + int i; + unsigned char c; + for ( i=0; i +#include + +#include + +#include "list.h" +#include "types.h" +#include "intcgm.h" +#include "intcgm6.h" + +#include "circle.h" + +#define DIM 360 + +#ifndef PI +#define PI 3.14159265358979323846 +#endif + +#define PI180 PI/180. +#define TWOPI 2*PI +#define VARCS TWOPI/32. + +int cgm_poly_circle ( double xc, double yc, double radius, double angi, double angf, int fechado ) +{ + double coseno, seno; + double xs, ys; + + coseno = cos (VARCS); + seno = sin (VARCS); + + xs = radius * cos(angi); + ys = radius * sin(angi); + + cdCanvasBegin(intcgm_canvas, cgm_setintstyle(intcgm_fill_att.int_style) ); + + if ( fechado==CLOSED_PIE ) cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(xc), cgm_vdcy2canvas(yc) ); + + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(xc+xs), cgm_vdcy2canvas(yc+ys) ); + + while ( (angi+VARCS) < angf ) + { + double xe = xs; + xs = xs * coseno - ys * seno; + ys = ys * coseno + xe * seno; + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(xc+xs), cgm_vdcy2canvas(yc+ys) ); + angi += VARCS; + } + + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(xc+radius*cos(angf)), cgm_vdcy2canvas(yc+radius*sin(angf)) ); + + cdCanvasEnd(intcgm_canvas); + + return 0; +} + +int cgm_line_circle ( double xc, double yc, double radius, double angi, double angf, int fechado ) +{ + double coseno, seno; + double xant, yant, firstx, firsty; + double xs, ys; + + /* GERA O DESENHO DO CIRCULO/ARCO */ + + coseno = cos (VARCS); + seno = sin (VARCS); + + xs = radius * cos(angi); + ys = radius * sin(angi); + + if ( fechado==CLOSED_PIE ) + cdCanvasLine (intcgm_canvas, cgm_vdcx2canvas(xc), cgm_vdcy2canvas(yc), cgm_vdcx2canvas(xc+xs), cgm_vdcy2canvas(yc+ys) ); + + xant = firstx = xc+xs; + yant = firsty = yc+ys; + + while ( (angi+VARCS) < angf ) + { + double xe = xs; + xs = xs * coseno - ys * seno; + ys = ys * coseno + xe * seno; + cdCanvasLine (intcgm_canvas, cgm_vdcx2canvas(xant), cgm_vdcy2canvas(yant), cgm_vdcx2canvas(xc+xs), cgm_vdcy2canvas(yc+ys) ); + xant = xc+xs; + yant = yc+ys; + angi += VARCS; + } + + cdCanvasLine (intcgm_canvas, cgm_vdcx2canvas(xant), cgm_vdcy2canvas(yant), + cgm_vdcx2canvas(xc+radius*cos(angf)), cgm_vdcy2canvas(yc+radius*sin(angf)) ); + + xant = xc+radius*cos(angf); + yant = yc+radius*sin(angf); + + if ( fechado==CLOSED_PIE ) + cdCanvasLine (intcgm_canvas, cgm_vdcx2canvas(xant), cgm_vdcy2canvas(yant), cgm_vdcx2canvas(xc), cgm_vdcy2canvas(yc) ); + else if ( fechado==CLOSED_CHORD ) + cdCanvasLine (intcgm_canvas, cgm_vdcx2canvas(xant), cgm_vdcy2canvas(yant), cgm_vdcx2canvas(firstx), cgm_vdcy2canvas(firsty) ); + + return 0; +} + diff --git a/cd/src/intcgm/circle.h b/cd/src/intcgm/circle.h new file mode 100755 index 0000000..3209c0f --- /dev/null +++ b/cd/src/intcgm/circle.h @@ -0,0 +1,3 @@ +int cgm_poly_circle ( double xc, double yc, double radius, double angi, double angf, int fechado ); +int cgm_line_circle ( double xc, double yc, double radius, double angi, double angf, int fechado ); + diff --git a/cd/src/intcgm/ellipse.c b/cd/src/intcgm/ellipse.c new file mode 100755 index 0000000..8d6889c --- /dev/null +++ b/cd/src/intcgm/ellipse.c @@ -0,0 +1,143 @@ +#include +#include + +#include + +#include "list.h" +#include "types.h" +#include "intcgm.h" +#include "intcgm6.h" +#include "ellipse.h" + +#ifndef PI +#define PI 3.14159265358979323846 +#endif + +#define ANGMIN 0.00001 + +/* Adjust the circle parametrization for the elipsis parametrization */ +double cgm_AdjArc ( double arc, double w, double h ) +{ + double value; + + if ((fabs(w*sin(arc))<1e-99) && (fabs(h*cos(arc))<1e-99)) + value = 0.0; + else + value = atan2(w*sin(arc), h*cos(arc)); + + if ( arc > PI ) value += 2*PI; + if ( arc < -PI ) value -= 2*PI; + + return value; +} + + +/* Desenha um arco de Elipse */ + +void cgm_ElpArc ( double xc, double yc, double w, double h, double r, double a1, + double a2, int n, int tipo ) + +{ + + /* Onde: + + (xc,yc) Centro + (w,h) Largura e altura (diametro na direcao dos eixos principais) + r Inclinacao dos eixos principais com relacao x e y + a1,a2 Angulos incial e final do arco [-360,+360] + Note-se que o sentido e' dado pela diferenca a2-a1, + ou seja, 30 a 330 e' trigonometrico + 30 a -30 e' horario + n Numero de segmentos da poligonal equivalente + (64 parece ser um bom numero) + tipo 0=aberto 1=fechado(torta) 2=fechado(corda) */ + + double da, c, s, sx, sy, ang, xant, yant; + double px, py, tx, ty, txant, tyant, dx, dy; + int i, inicio; + +/* Reduz de diametro a raio */ + + w = w/2; + h = h/2; + +/* Transforma graus em radianos e ajusta a os angulos da parametrizacao */ + + a1 = cgm_AdjArc(a1,w,h); + + a2 = cgm_AdjArc(a2,w,h); + + if ( a2>a1 ) + ang = a2 - a1; + else + ang = 2*PI - ( a1 - a2 ); + +/* Gera os pontos do arco centrado na origem com os eixos em x e y */ + + da = ang/n; + c = cos(da); + s = sin(da); + sx = -w*s/h; + sy = h*s/w; + + if ( tipo==1 || tipo==2 ) + { + long int cor; + cor = cgm_getcolor ( intcgm_fill_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + cdCanvasBegin(intcgm_canvas, cgm_setintstyle(intcgm_fill_att.int_style) ); + } + else + { + long int cor; + int size = (int)floor(intcgm_line_att.width+.5); + cdCanvasLineStyle (intcgm_canvas, intcgm_line_att.type ); + cdCanvasLineWidth (intcgm_canvas, size>0? size: 1 ); + cor = cgm_getcolor ( intcgm_line_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + } + + dx = (fabs(r)>ANGMIN) ? sin(r) : 0; + dy = (fabs(r)>ANGMIN) ? cos(r) : 1; + + xant = w*cos(a1); + yant = h*sin(a1); + + txant = xc+dy*xant-dx*yant; /* Inclina (se for o caso) e translada */ + tyant = yc+dx*xant+dy*yant; /* Inclina (se for o caso) e translada */ + + if ( tipo==1 ) + { + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(xc), cgm_vdcy2canvas(yc) ); + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(txant), cgm_vdcy2canvas(tyant) ); + inicio = 2; + } + else if ( tipo==2 ) + { + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(txant), cgm_vdcy2canvas(tyant) ); + inicio = 1; + } + + for ( i=inicio; i<=(n+inicio-1); i++ ) + { + px = c*xant+sx*yant; + py = sy*xant+c*yant; + + tx = xc+dy*px-dx*py; /* Inclina (se for o caso) e translada */ + ty = yc+dx*px+dy*py; /* Inclina (se for o caso) e translada */ + + if ( tipo==0 ) + cdCanvasLine (intcgm_canvas, cgm_vdcx2canvas(txant), cgm_vdcy2canvas(tyant), cgm_vdcx2canvas(tx), cgm_vdcy2canvas(ty) ); + else + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(tx), cgm_vdcy2canvas(ty) ); + + xant = px; + yant = py; + txant = tx; + tyant = ty; + } + +/* Desenha */ + + if ( tipo==1 || tipo==2 ) cdCanvasEnd(intcgm_canvas); +} diff --git a/cd/src/intcgm/ellipse.h b/cd/src/intcgm/ellipse.h new file mode 100755 index 0000000..80980ff --- /dev/null +++ b/cd/src/intcgm/ellipse.h @@ -0,0 +1,3 @@ +void cgm_ElpArc ( double, double, double, double, double, double, double, int, int ); +double cgm_AdjArc ( double arc, double w, double h ); + diff --git a/cd/src/intcgm/intcgm.h b/cd/src/intcgm/intcgm.h new file mode 100755 index 0000000..c106ee0 --- /dev/null +++ b/cd/src/intcgm/intcgm.h @@ -0,0 +1,84 @@ +typedef int (*CGM_FUNC) (void); + +#ifdef _INTCGM1_C_ + +t_cgm intcgm_cgm; +cdCanvas* intcgm_canvas = NULL; + +tlimit intcgm_vdc_ext; +double intcgm_scale_factor_x; +double intcgm_scale_factor_y; +double intcgm_scale_factor_mm_x; +double intcgm_scale_factor_mm_y; +double intcgm_scale_factor; +int intcgm_view_xmin, intcgm_view_ymin, intcgm_view_xmax, intcgm_view_ymax; +double intcgm_clip_xmin, intcgm_clip_ymin, intcgm_clip_xmax, intcgm_clip_ymax; + +_line_att intcgm_line_att = { 1, LINE_SOLID, 1., {1} }; + +_marker_att intcgm_marker_att = { 3, MARK_ASTERISK, 1., {1} }; + +_text_att intcgm_text_att = { 1, 1, NULL, 0, CD_PLAIN, 8, STRING, 1., 0., {1}, .1, + {0,1}, {1,0}, PATH_RIGHT, {NORMHORIZ,NORMVERT,0.,0.} }; + +_fill_att intcgm_fill_att = { 1, HOLLOW, {1}, 1, 1, {0,0}, NULL, {{0.,0.},{0.,0.}} }; + +_edge_att intcgm_edge_att = { 1, EDGE_SOLID, 1., {1}, OFF }; + +trgb *intcgm_color_table; +int intcgm_block; + +TList *intcgm_asf_list; + +tpoint *intcgm_point_list; +int intcgm_npoints; + +CGM_FUNC intcgm_funcs[] = { NULL, &cgmb_rch, &cgmt_rch }; + +#else + +extern t_cgm intcgm_cgm; +extern cdCanvas* intcgm_canvas; + +extern tlimit intcgm_vdc_ext; +extern double intcgm_scale_factor_x; +extern double intcgm_scale_factor_y; +extern double intcgm_scale_factor_mm_x; +extern double intcgm_scale_factor_mm_y; +extern double intcgm_scale_factor; +extern int intcgm_view_xmin, intcgm_view_ymin, intcgm_view_xmax, intcgm_view_ymax; +extern double intcgm_clip_xmin, intcgm_clip_ymin, intcgm_clip_xmax, intcgm_clip_ymax; + +extern _line_att intcgm_line_att; + +extern _marker_att intcgm_marker_att; + +extern _text_att intcgm_text_att; + +extern _fill_att intcgm_fill_att; + +extern _edge_att intcgm_edge_att; + +extern trgb *intcgm_color_table; +extern int intcgm_block; + +extern TList *intcgm_asf_list; + +extern tpoint *intcgm_point_list; +extern int intcgm_npoints; + +extern CGM_FUNC *intcgm_funcs; + +#endif + +typedef struct _tasf { + short type; + short value; + } tasf; + +typedef struct _pat_table { + long index; + long nx, ny; + tcolor *pattern; + } pat_table; + diff --git a/cd/src/intcgm/intcgm1.c b/cd/src/intcgm/intcgm1.c new file mode 100755 index 0000000..d4b2399 --- /dev/null +++ b/cd/src/intcgm/intcgm1.c @@ -0,0 +1,291 @@ +#define _INTCGM1_C_ + +#include /* FILE, ftell, fseek, fputc, fopen, fclose, fputs, fprintf */ +#include /* malloc, free */ +#include /* strlen */ +#include /* floor */ + +#ifdef SunOS +#include /* SEEK_SET, SEEK_END */ +#endif + +#include /* FLT_MIN, FLT_MAX */ +#include /* INT_MIN, INT_MAX */ + +#include "cd.h" +#include "cdcgm.h" + +#include "list.h" +#include "types.h" +#include "intcgm2.h" +#include "intcgm.h" +#include "bparse.h" + +static int isitbin ( char *fname ) +{ + unsigned char ch[2]; + int erro, c, id; + unsigned short b; + FILE *f = fopen ( fname, "rb" ); + if (!f) + return 0; + + erro = fread ( ch, 1, 2, f ); + + b = (ch[0] << 8) + ch[1]; + + id = ( b & 0x0FE0 ) >> 5; + + c = ( b & 0xF000 ) >> 12; + + fclose(f); + + if ( c==0 && id==1 ) + return 1; + else + return 0; +} + +static int cgmplay ( char* filename, int xmn, int xmx, int ymn, int ymx ) +{ + intcgm_view_xmin = xmn; + intcgm_view_xmax = xmx; + intcgm_view_ymin = ymn; + intcgm_view_ymax = ymx; + + intcgm_scale_factor_x = 1; + intcgm_scale_factor_y = 1; + intcgm_scale_factor = 1; + + intcgm_block = 500; + intcgm_npoints = 500; + intcgm_cgm.buff.size = 1024; + + intcgm_point_list = (tpoint *) malloc ( sizeof(tpoint)*intcgm_npoints); + intcgm_cgm.buff.dados = (char *) malloc ( sizeof(char) * intcgm_cgm.buff.size ); + + if ( isitbin(filename) ) + { + intcgm_cgm.fp = fopen ( filename, "rb" ); + if (!intcgm_cgm.fp) + { + free(intcgm_point_list); + free(intcgm_cgm.buff.dados); + return CD_ERROR; + } + + fseek ( intcgm_cgm.fp, 0, SEEK_END ); + intcgm_cgm.file_size = ftell ( intcgm_cgm.fp ); + fseek ( intcgm_cgm.fp, 0, SEEK_SET ); + + intcgm_cgm.mode = 1; + intcgm_cgm.cgmf = intcgm_funcs[intcgm_cgm.mode]; + + intcgm_cgm.int_prec.b_prec = 1; + intcgm_cgm.real_prec.b_prec = 2; + intcgm_cgm.ix_prec.b_prec = 1; + intcgm_cgm.cd_prec = 0; + intcgm_cgm.cix_prec = 0; + intcgm_cgm.vdc_int.b_prec = 1; + intcgm_cgm.vdc_real.b_prec = 2; + } + else + { + intcgm_cgm.fp = fopen ( filename, "r" ); + if (!intcgm_cgm.fp) + { + free(intcgm_point_list); + free(intcgm_cgm.buff.dados); + return CD_ERROR; + } + + fseek ( intcgm_cgm.fp, 0, SEEK_END ); + intcgm_cgm.file_size = ftell ( intcgm_cgm.fp ); + fseek ( intcgm_cgm.fp, 0, SEEK_SET ); + + intcgm_cgm.mode = 2; + intcgm_cgm.cgmf = intcgm_funcs[intcgm_cgm.mode]; + + intcgm_cgm.int_prec.t_prec.minint = -32767; + intcgm_cgm.int_prec.t_prec.maxint = 32767; + intcgm_cgm.real_prec.t_prec.minreal = -32767; + intcgm_cgm.real_prec.t_prec.maxreal = 32767; + intcgm_cgm.real_prec.t_prec.digits = 4; + intcgm_cgm.ix_prec.t_prec.minint = 0; + intcgm_cgm.ix_prec.t_prec.maxint = 127; + intcgm_cgm.cd_prec = 127; + intcgm_cgm.vdc_int.t_prec.minint = -32767; + intcgm_cgm.vdc_int.t_prec.maxint = 32767; + intcgm_cgm.vdc_real.t_prec.minreal = 0; + intcgm_cgm.vdc_real.t_prec.maxreal = 1; + intcgm_cgm.vdc_real.t_prec.digits = 4; + } + + intcgm_cgm.first = 1; + intcgm_cgm.len = 0; + intcgm_cgm.vdc_type = INTEGER; + intcgm_cgm.max_cix = 63; + intcgm_cgm.scaling_mode.mode = ABSTRACT; + intcgm_cgm.scaling_mode.scale_factor = 1.; + intcgm_cgm.drawing_mode = ABSTRACT; + intcgm_cgm.clrsm = INDEXED; + intcgm_cgm.lnwsm = SCALED; + intcgm_cgm.mkssm = SCALED; + intcgm_cgm.edwsm = SCALED; + intcgm_cgm.vdc_ext.first.x = 0; + intcgm_cgm.vdc_ext.first.y = 0; + intcgm_cgm.vdc_ext.second.x = 32767; + intcgm_cgm.vdc_ext.second.y = 32767; + intcgm_cgm.back_color.red = 0; + intcgm_cgm.back_color.green = 0; + intcgm_cgm.back_color.blue = 0; + intcgm_cgm.aux_color.rgb.red = 0; + intcgm_cgm.aux_color.rgb.green = 0; + intcgm_cgm.aux_color.rgb.blue = 0; + intcgm_cgm.color_ext.black.red = 0; + intcgm_cgm.color_ext.black.green = 0; + intcgm_cgm.color_ext.black.blue = 0; + intcgm_cgm.color_ext.white.red = 255; + intcgm_cgm.color_ext.white.green = 255; + intcgm_cgm.color_ext.white.blue = 255; + intcgm_cgm.transparency = ON; + intcgm_cgm.clip_rect.first.x = 0; + intcgm_cgm.clip_rect.first.y = 0; + intcgm_cgm.clip_rect.second.x = 32767; + intcgm_cgm.clip_rect.second.y = 32767; + intcgm_cgm.clip_ind = ON; + intcgm_cgm.bc = 0; + intcgm_cgm.bl= 0; + intcgm_cgm.cl = 0; + + intcgm_line_att.index = 1; + intcgm_line_att.type = LINE_SOLID; + intcgm_line_att.width = 1; + intcgm_line_att.color.ind = 1; + + intcgm_marker_att.index = 1; + intcgm_marker_att.type = 1; + intcgm_marker_att.size = 1; + intcgm_marker_att.color.ind = 1; + + intcgm_text_att.index = 1; + intcgm_text_att.font_index = 1; + intcgm_text_att.font_list = NULL; + intcgm_text_att.font = 0; + intcgm_text_att.style = CD_PLAIN; + intcgm_text_att.size = 8; + intcgm_text_att.prec = STRING; + intcgm_text_att.exp_fact = 1; + intcgm_text_att.char_spacing = 0; + intcgm_text_att.color.ind = 1; + intcgm_text_att.height = 1; + intcgm_text_att.char_up.x = 0; + intcgm_text_att.char_up.y = 1; + intcgm_text_att.char_base.x = 1; + intcgm_text_att.char_base.y = 0; + intcgm_text_att.path = PATH_RIGHT; + intcgm_text_att.alignment.hor = NORMHORIZ; + intcgm_text_att.alignment.ver = NORMVERT; + intcgm_text_att.alignment.cont_hor = 0; + intcgm_text_att.alignment.cont_ver = 0; + + intcgm_fill_att.index = 1; + intcgm_fill_att.int_style = HOLLOW; + intcgm_fill_att.color.ind = 1; + intcgm_fill_att.hatch_index = 1; + intcgm_fill_att.pat_index = 1; + intcgm_fill_att.ref_pt.x = 0; + intcgm_fill_att.ref_pt.y = 0; + intcgm_fill_att.pat_list = NULL; + intcgm_fill_att.pat_size.height.x = 0; + intcgm_fill_att.pat_size.height.y = 0; + intcgm_fill_att.pat_size.height.x = 0; + intcgm_fill_att.pat_size.width.y = 0; + + intcgm_edge_att.index = 1; + intcgm_edge_att.type = EDGE_SOLID; + intcgm_edge_att.width = 1; + intcgm_edge_att.color.ind = 1; + intcgm_edge_att.visibility = OFF; + + cdCanvasLineWidth(intcgm_canvas, 1); + + intcgm_color_table = (trgb *) malloc ( sizeof(trgb)*intcgm_cgm.max_cix); + intcgm_color_table[0].red = 255; + intcgm_color_table[0].green = 255; + intcgm_color_table[0].blue = 255; + intcgm_color_table[1].red = 0; + intcgm_color_table[1].green = 0; + intcgm_color_table[1].blue = 0; + + while ( !(*intcgm_cgm.cgmf)() ){}; + + if ( intcgm_point_list!=NULL ) + { + free(intcgm_point_list); + intcgm_point_list = NULL; + } + + if ( intcgm_cgm.buff.dados!=NULL ) + { + free(intcgm_cgm.buff.dados); + intcgm_cgm.buff.dados = NULL; + } + + if ( intcgm_color_table!=NULL ) + { + free(intcgm_color_table); + intcgm_color_table = NULL; + } + + fclose(intcgm_cgm.fp); + + return CD_OK; +} + +_cdcgmsizecb cdcgmsizecb = NULL; +_cdcgmbegmtfcb cdcgmbegmtfcb = NULL; +_cdcgmcountercb cdcgmcountercb = NULL; +_cdcgmsclmdecb cdcgmsclmdecb = NULL; +_cdcgmvdcextcb cdcgmvdcextcb = NULL; +_cdcgmbegpictcb cdcgmbegpictcb = NULL; +_cdcgmbegpictbcb cdcgmbegpictbcb = NULL; + +int cdRegisterCallbackCGM(int cb, cdCallback func) +{ + switch (cb) + { + case CD_SIZECB: + cdcgmsizecb = (_cdcgmsizecb)func; + return CD_OK; + case CD_CGMBEGMTFCB: + cdcgmbegmtfcb = (_cdcgmbegmtfcb)func; + return CD_OK; + case CD_CGMCOUNTERCB: + cdcgmcountercb = (_cdcgmcountercb)func; + return CD_OK; + case CD_CGMSCLMDECB: + cdcgmsclmdecb = (_cdcgmsclmdecb)func; + return CD_OK; + case CD_CGMVDCEXTCB: + cdcgmvdcextcb = (_cdcgmvdcextcb)func; + return CD_OK; + case CD_CGMBEGPICTCB: + cdcgmbegpictcb = (_cdcgmbegpictcb)func; + return CD_OK; + case CD_CGMBEGPICTBCB: + cdcgmbegpictbcb = (_cdcgmbegpictbcb)func; + return CD_OK; + } + + return CD_ERROR; +} + +int cdplayCGM(cdCanvas* _canvas, int xmin, int xmax, int ymin, int ymax, void *data) +{ + int ret; + intcgm_canvas = _canvas; + ret = cgmplay((char*)data, xmin, xmax, ymin, ymax); + _canvas = NULL; + return ret; +} diff --git a/cd/src/intcgm/intcgm2.c b/cd/src/intcgm/intcgm2.c new file mode 100755 index 0000000..b6be7ee --- /dev/null +++ b/cd/src/intcgm/intcgm2.c @@ -0,0 +1,1651 @@ +#include /* FILE, ftell, fseek, fputc, fopen, fclose, fputs, fprintf */ +#include /* strlen */ +#include +#include +#include +#include "cd.h" +#include "cdcgm.h" +#include "list.h" +#include "types.h" +#include "bparse.h" +#include "tparse.h" +#include "intcgm.h" +#include "intcgm6.h" +#include "tparse.h" + +typedef struct { + const char *nome; + int (*func) (void); + } comando; + +/************************************************** +*************************************************** +** ** +** FUNCOES CGM ** +** ** +*************************************************** +**************************************************/ + +/************************************************ +* * +* Dados para nao-binario * +* * +************************************************/ + +/* delimiter elements */ + +comando _cgmt_NULL = { "", NULL }; +comando _cgmt_BEGMF = { "begmf", &cgmt_begmtf }; +comando _cgmt_ENDMF = { "endmf", &cgmt_endmtf }; +comando _cgmt_BEG_PIC = { "begpic", &cgmt_begpic }; +comando _cgmt_BEG_PIC_BODY = { "begpicbody", &cgmt_begpib }; +comando _cgmt_END_PIC = { "endpic", &cgmt_endpic }; + +/* metafile descriptor elements */ + +comando _cgmt_MF_VERSION = { "mfversion", cgmt_mtfver }; +comando _cgmt_MF_DESC = { "mfdesc", cgmt_mtfdsc }; +comando _cgmt_VDC_TYPE = { "vdctype", cgmt_vdctyp }; +comando _cgmt_INTEGER_PREC = { "integerprec", cgmt_intpre }; +comando _cgmt_REAL_PREC = { "realprec", cgmt_realpr }; +comando _cgmt_INDEX_PREC = { "indexprec", cgmt_indpre }; +comando _cgmt_COLR_PREC = { "colrprec", cgmt_colpre }; +comando _cgmt_COLR_INDEX_PREC = { "colrindexprec", cgmt_colipr }; +comando _cgmt_MAX_COLR_INDEX = { "maxcolrindex", cgmt_maxcoi }; +comando _cgmt_COLR_VALUE_EXT = { "colrvalueext", cgmt_covaex }; +comando _cgmt_MF_ELEM_LIST = { "mfelemlist", cgmt_mtfell }; +comando _cgmt_BEG_MF_DEFAULTS = { "begmfdefaults", cgmt_bmtfdf }; +comando _cgmt_END_MF_DEFAULTS = { "endmfdefaults", cgmt_emtfdf }; +comando _cgmt_FONT_LIST = { "fontlist", cgmt_fntlst }; +comando _cgmt_CHAR_SET_LIST = { "charsetlist", cgmt_chslst }; +comando _cgmt_CHAR_CODING = { "charcoding", cgmt_chcdac }; + +/* picture descriptor elements */ + +comando _cgmt_SCALE_MODE = { "scalemode", cgmt_sclmde }; +comando _cgmt_COLR_MODE = { "colrmode", cgmt_clslmd }; +comando _cgmt_LINE_WIDTH_MODE = { "linewidthmode", cgmt_lnwdmd }; +comando _cgmt_MARKER_SIZE_MODE = { "markersizemode", cgmt_mkszmd }; +comando _cgmt_EDGE_WIDTH_MODE = { "edgewidthmode", cgmt_edwdmd }; +comando _cgmt_VDC_EXTENT = { "vdcext", cgmt_vdcext }; +comando _cgmt_BACK_COLR = { "backcolr", cgmt_bckcol }; + +/* control elements */ + +comando _cgmt_VDC_INTEGER_PREC = { "vdcintegerprec", cgmt_vdcipr }; +comando _cgmt_VDC_REAL_PREC = { "vdcrealprec", cgmt_vdcrpr }; +comando _cgmt_AUX_COLR = { "auxcolr", cgmt_auxcol }; +comando _cgmt_TRANSPARENCY = { "transparency", cgmt_transp }; +comando _cgmt_CLIP_RECT = { "cliprect", cgmt_clprec }; +comando _cgmt_CLIP = { "clip", cgmt_clpind }; + +/* primitive elements */ + +comando _cgmt_LINE = { "line", cgmt_polyln }; +comando _cgmt_INCR_LINE = { "incrline", cgmt_incply }; +comando _cgmt_DISJT_LINE = { "disjtline", cgmt_djtply }; +comando _cgmt_INCR_DISJT_LINE = { "incrdisjt_line", cgmt_indjpl }; +comando _cgmt_MARKER = { "marker", cgmt_polymk }; +comando _cgmt_INCR_MARKER = { "incrmarker", cgmt_incplm }; +comando _cgmt_TEXT = { "text", cgmt_text }; +comando _cgmt_RESTR_TEXT = { "restrtext", cgmt_rsttxt }; +comando _cgmt_APND_TEXT = { "apndtext", cgmt_apdtxt }; +comando _cgmt_POLYGON = { "polygon", cgmt_polygn }; +comando _cgmt_INCR_POLYGON = { "incrpolygon", cgmt_incplg }; +comando _cgmt_POLYGON_SET = { "polygonset", cgmt_plgset }; +comando _cgmt_INCR_POLYGON_SET = { "incrpolygonset", cgmt_inpgst }; +comando _cgmt_CELL_ARRAY = { "cellarray", cgmt_cellar }; +comando _cgmt_GDP = { "gdp", cgmt_gdp }; +comando _cgmt_RECT = { "rect", cgmt_rect }; +comando _cgmt_CIRCLE = { "circle", cgmt_circle }; +comando _cgmt_ARC_3_PT = { "arc3pt", cgmt_circ3p }; +comando _cgmt_ARC_3_PT_CLOSE = { "arc3ptclose", cgmt_cir3pc }; +comando _cgmt_ARC_CTR = { "arcctr", cgmt_circnt }; +comando _cgmt_ARC_CTR_CLOSE = { "arcctr_close", cgmt_ccntcl }; +comando _cgmt_ELLIPSE = { "ellipse", cgmt_ellips }; +comando _cgmt_ELLIP_ARC = { "elliparc", cgmt_ellarc }; +comando _cgmt_ELLIP_ARC_CLOSE = { "elliparcclose", cgmt_ellacl }; + +/* attribute elements */ + +comando _cgmt_LINE_INDEX = { "lineindex", cgmt_lnbdin }; +comando _cgmt_LINE_TYPE = { "linetype", cgmt_lntype }; +comando _cgmt_LINE_WIDTH = { "linewidth", cgmt_lnwidt }; +comando _cgmt_LINE_COLR = { "linecolr", cgmt_lncolr }; +comando _cgmt_MARKER_INDEX = { "markerindex", cgmt_mkbdin }; +comando _cgmt_MARKER_TYPE = { "markertype", cgmt_mktype }; +comando _cgmt_MARKER_WIDTH = { "markersize", cgmt_mksize }; +comando _cgmt_MARKER_COLR = { "markercolr", cgmt_mkcolr }; +comando _cgmt_TEXT_INDEX = { "textindex", cgmt_txbdin }; +comando _cgmt_TEXT_FONT_INDEX = { "textfontindex", cgmt_txftin }; +comando _cgmt_TEXT_PREC = { "textprec", cgmt_txtprc }; +comando _cgmt_CHAR_EXPAN = { "charexpan", cgmt_chrexp }; +comando _cgmt_CHAR_SPACE = { "charspace", cgmt_chrspc }; +comando _cgmt_TEXT_COLR = { "textcolr", cgmt_txtclr }; +comando _cgmt_CHAR_HEIGHT = { "charheight", cgmt_chrhgt }; +comando _cgmt_CHAR_ORI = { "charori", cgmt_chrori }; +comando _cgmt_TEXT_PATH = { "textpath", cgmt_txtpat }; +comando _cgmt_TEXT_ALIGN = { "textalign", cgmt_txtali }; +comando _cgmt_CHAR_SET_INDEX = { "charsetindex", cgmt_chseti }; +comando _cgmt_ALT_CHAR_SET = { "altcharsetindex", cgmt_achsti }; +comando _cgmt_FILL_INDEX = { "fillindex", cgmt_fillin }; +comando _cgmt_INT_STYLE = { "intstyle", cgmt_intsty }; +comando _cgmt_FILL_COLR = { "fillcolr", cgmt_fillco }; +comando _cgmt_HATCH_INDEX = { "hatchindex", cgmt_hatind }; +comando _cgmt_PAT_INDEX = { "patindex", cgmt_patind }; +comando _cgmt_EDGE_INDEX = { "edgeindex", cgmt_edgind }; +comando _cgmt_EDGE_TYPE = { "edgetype", cgmt_edgtyp }; +comando _cgmt_EDGE_WIDTH = { "edgewidth", cgmt_edgwid }; +comando _cgmt_EDGE_COLR = { "edgecolr", cgmt_edgcol }; +comando _cgmt_EDGE_VIS = { "edgevis", cgmt_edgvis }; +comando _cgmt_FILL_REF_PT = { "fillrefpt", cgmt_fillrf }; +comando _cgmt_PAT_TABLE = { "pattable", cgmt_pattab }; +comando _cgmt_PAT_SIZE = { "patsize", cgmt_patsiz }; +comando _cgmt_COLR_TABLE = { "colrtable", cgmt_coltab }; +comando _cgmt_ASF = { "asf", cgmt_asf }; + +/* escape elements */ + +comando _cgmt_ESCAPE = { "escape", cgmt_escape }; +comando _cgmt_DOMAIN_RING = { "domainring", NULL }; + +/* external elements */ + +comando _cgmt_MESSAGE = { "message", cgmt_messag }; +comando _cgmt_APPL_DATA = { "appldata", cgmt_appdta }; + +comando *_cgmt_delimiter[] = { + &_cgmt_NULL, + &_cgmt_BEGMF, + &_cgmt_ENDMF, + &_cgmt_BEG_PIC, + &_cgmt_BEG_PIC_BODY, + &_cgmt_END_PIC, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +comando *_cgmt_metafile[] = { + &_cgmt_END_MF_DEFAULTS, + &_cgmt_MF_VERSION, + &_cgmt_MF_DESC, + &_cgmt_VDC_TYPE, + &_cgmt_INTEGER_PREC, + &_cgmt_REAL_PREC, + &_cgmt_INDEX_PREC, + &_cgmt_COLR_PREC, + &_cgmt_COLR_INDEX_PREC, + &_cgmt_MAX_COLR_INDEX, + &_cgmt_COLR_VALUE_EXT, + &_cgmt_MF_ELEM_LIST, + &_cgmt_BEG_MF_DEFAULTS, + &_cgmt_FONT_LIST, + &_cgmt_CHAR_SET_LIST, + &_cgmt_CHAR_CODING, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +comando *_cgmt_picture[] = { + &_cgmt_NULL, + &_cgmt_SCALE_MODE, + &_cgmt_COLR_MODE, + &_cgmt_LINE_WIDTH_MODE, + &_cgmt_MARKER_SIZE_MODE, + &_cgmt_EDGE_WIDTH_MODE, + &_cgmt_VDC_EXTENT, + &_cgmt_BACK_COLR, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL }; + +comando *_cgmt_control[] = { + &_cgmt_NULL, + &_cgmt_VDC_INTEGER_PREC, + &_cgmt_VDC_REAL_PREC, + &_cgmt_AUX_COLR, + &_cgmt_TRANSPARENCY, + &_cgmt_CLIP_RECT, + &_cgmt_CLIP, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL }; + +comando *_cgmt_primitive[] = { + &_cgmt_NULL, + &_cgmt_LINE, + &_cgmt_INCR_LINE, + &_cgmt_DISJT_LINE, + &_cgmt_INCR_DISJT_LINE, + &_cgmt_MARKER, + &_cgmt_INCR_MARKER, + &_cgmt_TEXT, + &_cgmt_RESTR_TEXT, + &_cgmt_APND_TEXT, + &_cgmt_POLYGON, + &_cgmt_INCR_POLYGON, + &_cgmt_POLYGON_SET, + &_cgmt_INCR_POLYGON_SET, + &_cgmt_CELL_ARRAY, + &_cgmt_GDP, + &_cgmt_RECT, + &_cgmt_CIRCLE, + &_cgmt_ARC_3_PT, + &_cgmt_ARC_3_PT_CLOSE, + &_cgmt_ARC_CTR, + &_cgmt_ARC_CTR_CLOSE, + &_cgmt_ELLIPSE, + &_cgmt_ELLIP_ARC, + &_cgmt_ELLIP_ARC_CLOSE, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +comando *_cgmt_attributes[] = { + &_cgmt_NULL, + &_cgmt_LINE_INDEX, + &_cgmt_LINE_TYPE, + &_cgmt_LINE_WIDTH, + &_cgmt_LINE_COLR, + &_cgmt_MARKER_INDEX, + &_cgmt_MARKER_TYPE, + &_cgmt_MARKER_WIDTH, + &_cgmt_MARKER_COLR, + &_cgmt_TEXT_INDEX, + &_cgmt_TEXT_FONT_INDEX, + &_cgmt_TEXT_PREC, + &_cgmt_CHAR_EXPAN, + &_cgmt_CHAR_SPACE, + &_cgmt_TEXT_COLR, + &_cgmt_CHAR_HEIGHT, + &_cgmt_CHAR_ORI, + &_cgmt_TEXT_PATH, + &_cgmt_TEXT_ALIGN, + &_cgmt_CHAR_SET_INDEX, + &_cgmt_ALT_CHAR_SET, + &_cgmt_FILL_INDEX, + &_cgmt_INT_STYLE, + &_cgmt_FILL_COLR, + &_cgmt_HATCH_INDEX, + &_cgmt_PAT_INDEX, + &_cgmt_EDGE_INDEX, + &_cgmt_EDGE_TYPE, + &_cgmt_EDGE_WIDTH, + &_cgmt_EDGE_COLR, + &_cgmt_EDGE_VIS, + &_cgmt_FILL_REF_PT, + &_cgmt_PAT_TABLE, + &_cgmt_PAT_SIZE, + &_cgmt_COLR_TABLE, + &_cgmt_ASF, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL }; + +comando *_cgmt_escape[] = { + &_cgmt_NULL, + &_cgmt_ESCAPE, + &_cgmt_DOMAIN_RING, + NULL}; + +comando *_cgmt_external[] = { + &_cgmt_NULL, + &_cgmt_MESSAGE, + &_cgmt_APPL_DATA, + NULL }; + +comando *_cgmt_segment[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +comando *_cgmt_NULL_NULL[] = { + &_cgmt_NULL, + NULL }; + +comando **_cgmt_comandos[] = { + _cgmt_NULL_NULL, + _cgmt_delimiter, + _cgmt_metafile, + _cgmt_picture, + _cgmt_control, + _cgmt_primitive, + _cgmt_attributes, + _cgmt_escape, + _cgmt_external, + _cgmt_segment, + NULL }; + +/************************************************ +* * +* Dados para binario * +* * +************************************************/ + +/* delimiter elements */ + +CGM_FUNC _cgmb_NULL = NULL; + +CGM_FUNC _cgmb_NOOP = &cgmb_noop; +CGM_FUNC _cgmb_BEGMF = &cgmb_begmtf; +CGM_FUNC _cgmb_ENDMF = &cgmb_endmtf; +CGM_FUNC _cgmb_BEG_PIC = &cgmb_begpic; +CGM_FUNC _cgmb_BEG_PIC_BODY = &cgmb_begpib; +CGM_FUNC _cgmb_END_PIC = &cgmb_endpic; + +/* metafile descriptor elements */ + +CGM_FUNC _cgmb_MF_VERSION = &cgmb_mtfver; +CGM_FUNC _cgmb_MF_DESC = &cgmb_mtfdsc; +CGM_FUNC _cgmb_VDC_TYPE = &cgmb_vdctyp; +CGM_FUNC _cgmb_INTEGER_PREC = &cgmb_intpre; +CGM_FUNC _cgmb_REAL_PREC = &cgmb_realpr; +CGM_FUNC _cgmb_INDEX_PREC = &cgmb_indpre; +CGM_FUNC _cgmb_COLR_PREC = &cgmb_colpre; +CGM_FUNC _cgmb_COLR_INDEX_PREC = &cgmb_colipr; +CGM_FUNC _cgmb_MAX_COLR_INDEX = &cgmb_maxcoi; +CGM_FUNC _cgmb_COLR_VALUE_EXT = &cgmb_covaex; +CGM_FUNC _cgmb_MF_ELEM_LIST = &cgmb_mtfell; +CGM_FUNC _cgmb_MF_DEFAULTS_RPL = &cgmb_bmtfdf; +CGM_FUNC _cgmb_FONT_LIST = &cgmb_fntlst; +CGM_FUNC _cgmb_CHAR_SET_LIST = &cgmb_chslst; +CGM_FUNC _cgmb_CHAR_CODING = &cgmb_chcdac; + +/* picture descriptor elements */ + +CGM_FUNC _cgmb_SCALE_MODE = &cgmb_sclmde; +CGM_FUNC _cgmb_COLR_MODE = &cgmb_clslmd; +CGM_FUNC _cgmb_LINE_WIDTH_MODE = &cgmb_lnwdmd; +CGM_FUNC _cgmb_MARKER_SIZE_MODE = &cgmb_mkszmd; +CGM_FUNC _cgmb_EDGE_WIDTH_MODE = &cgmb_edwdmd; +CGM_FUNC _cgmb_VDC_EXTENT = &cgmb_vdcext; +CGM_FUNC _cgmb_BACK_COLR = &cgmb_bckcol; + +/* control elements */ + +CGM_FUNC _cgmb_VDC_INTEGER_PREC = &cgmb_vdcipr; +CGM_FUNC _cgmb_VDC_REAL_PREC = &cgmb_vdcrpr; +CGM_FUNC _cgmb_AUX_COLR = &cgmb_auxcol; +CGM_FUNC _cgmb_TRANSPARENCY = &cgmb_transp; +CGM_FUNC _cgmb_CLIP_RECT = &cgmb_clprec; +CGM_FUNC _cgmb_CLIP = &cgmb_clpind; + +/* primitive elements */ + +CGM_FUNC _cgmb_LINE = &cgmb_polyln; +CGM_FUNC _cgmb_DISJT_LINE = &cgmb_djtply; +CGM_FUNC _cgmb_MARKER = &cgmb_polymk; +CGM_FUNC _cgmb_TEXT = &cgmb_text; +CGM_FUNC _cgmb_RESTR_TEXT = &cgmb_rsttxt; +CGM_FUNC _cgmb_APND_TEXT = &cgmb_apdtxt; +CGM_FUNC _cgmb_POLYGON = &cgmb_polygn; +CGM_FUNC _cgmb_POLYGON_SET = &cgmb_plgset; +CGM_FUNC _cgmb_CELL_ARRAY = &cgmb_cellar; +CGM_FUNC _cgmb_GDP = &cgmb_gdp; +CGM_FUNC _cgmb_RECT = &cgmb_rect; +CGM_FUNC _cgmb_CIRCLE = &cgmb_circle; +CGM_FUNC _cgmb_ARC_3_PT = &cgmb_circ3p; +CGM_FUNC _cgmb_ARC_3_PT_CLOSE = &cgmb_cir3pc; +CGM_FUNC _cgmb_ARC_CTR = &cgmb_circnt; +CGM_FUNC _cgmb_ARC_CTR_CLOSE = &cgmb_ccntcl; +CGM_FUNC _cgmb_ELLIPSE = &cgmb_ellips; +CGM_FUNC _cgmb_ELLIP_ARC = &cgmb_ellarc; +CGM_FUNC _cgmb_ELLIP_ARC_CLOSE = &cgmb_ellacl; + +/* attribute elements */ + +CGM_FUNC _cgmb_LINE_INDEX = &cgmb_lnbdin; +CGM_FUNC _cgmb_LINE_TYPE = &cgmb_lntype; +CGM_FUNC _cgmb_LINE_WIDTH = &cgmb_lnwidt; +CGM_FUNC _cgmb_LINE_COLR = &cgmb_lncolr; +CGM_FUNC _cgmb_MARKER_INDEX = &cgmb_mkbdin; +CGM_FUNC _cgmb_MARKER_TYPE = &cgmb_mktype; +CGM_FUNC _cgmb_MARKER_WIDTH = &cgmb_mksize; +CGM_FUNC _cgmb_MARKER_COLR = &cgmb_mkcolr; +CGM_FUNC _cgmb_TEXT_INDEX = &cgmb_txbdin; +CGM_FUNC _cgmb_TEXT_FONT_INDEX = &cgmb_txftin; +CGM_FUNC _cgmb_TEXT_PREC = &cgmb_txtprc; +CGM_FUNC _cgmb_CHAR_EXPAN = &cgmb_chrexp; +CGM_FUNC _cgmb_CHAR_SPACE = &cgmb_chrspc; +CGM_FUNC _cgmb_TEXT_COLR = &cgmb_txtclr; +CGM_FUNC _cgmb_CHAR_HEIGHT = &cgmb_chrhgt; +CGM_FUNC _cgmb_CHAR_ORI = &cgmb_chrori; +CGM_FUNC _cgmb_TEXT_PATH = &cgmb_txtpat; +CGM_FUNC _cgmb_TEXT_ALIGN = &cgmb_txtali; +CGM_FUNC _cgmb_CHAR_SET_INDEX = &cgmb_chseti; +CGM_FUNC _cgmb_ALT_CHAR_SET = &cgmb_achsti; +CGM_FUNC _cgmb_FILL_INDEX = &cgmb_fillin; +CGM_FUNC _cgmb_INT_STYLE = &cgmb_intsty; +CGM_FUNC _cgmb_FILL_COLR = &cgmb_fillco; +CGM_FUNC _cgmb_HATCH_INDEX = &cgmb_hatind; +CGM_FUNC _cgmb_PAT_INDEX = &cgmb_patind; +CGM_FUNC _cgmb_EDGE_INDEX = &cgmb_edgind; +CGM_FUNC _cgmb_EDGE_TYPE = &cgmb_edgtyp; +CGM_FUNC _cgmb_EDGE_WIDTH = &cgmb_edgwid; +CGM_FUNC _cgmb_EDGE_COLR = &cgmb_edgcol; +CGM_FUNC _cgmb_EDGE_VIS = &cgmb_edgvis; +CGM_FUNC _cgmb_FILL_REF_PT = &cgmb_fillrf; +CGM_FUNC _cgmb_PAT_TABLE = &cgmb_pattab; +CGM_FUNC _cgmb_PAT_SIZE = &cgmb_patsiz; +CGM_FUNC _cgmb_COLR_TABLE = &cgmb_coltab; +CGM_FUNC _cgmb_ASF = &cgmb_asf; + +/* escape elements */ + +CGM_FUNC _cgmb_ESCAPE = &cgmb_escape; + +/* external elements */ + +CGM_FUNC _cgmb_MESSAGE = &cgmb_messag; +CGM_FUNC _cgmb_APPL_DATA = &cgmb_appdta; + +CGM_FUNC *_cgmb_delimiter[] = { + &_cgmb_NOOP, + &_cgmb_BEGMF, + &_cgmb_ENDMF, + &_cgmb_BEG_PIC, + &_cgmb_BEG_PIC_BODY, + &_cgmb_END_PIC, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +CGM_FUNC *_cgmb_metafile[] = { + &_cgmb_NULL, + &_cgmb_MF_VERSION, + &_cgmb_MF_DESC, + &_cgmb_VDC_TYPE, + &_cgmb_INTEGER_PREC, + &_cgmb_REAL_PREC, + &_cgmb_INDEX_PREC, + &_cgmb_COLR_PREC, + &_cgmb_COLR_INDEX_PREC, + &_cgmb_MAX_COLR_INDEX, + &_cgmb_COLR_VALUE_EXT, + &_cgmb_MF_ELEM_LIST, + &_cgmb_MF_DEFAULTS_RPL, + &_cgmb_FONT_LIST, + &_cgmb_CHAR_SET_LIST, + &_cgmb_CHAR_CODING, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +CGM_FUNC *_cgmb_picture[] = { + &_cgmb_NULL, + &_cgmb_SCALE_MODE, + &_cgmb_COLR_MODE, + &_cgmb_LINE_WIDTH_MODE, + &_cgmb_MARKER_SIZE_MODE, + &_cgmb_EDGE_WIDTH_MODE, + &_cgmb_VDC_EXTENT, + &_cgmb_BACK_COLR, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL }; + +CGM_FUNC *_cgmb_control[] = { + &_cgmb_NULL, + &_cgmb_VDC_INTEGER_PREC, + &_cgmb_VDC_REAL_PREC, + &_cgmb_AUX_COLR, + &_cgmb_TRANSPARENCY, + &_cgmb_CLIP_RECT, + &_cgmb_CLIP, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL }; + +CGM_FUNC *_cgmb_primitive[] = { + &_cgmb_NULL, + &_cgmb_LINE, + &_cgmb_DISJT_LINE, + &_cgmb_MARKER, + &_cgmb_TEXT, + &_cgmb_RESTR_TEXT, + &_cgmb_APND_TEXT, + &_cgmb_POLYGON, + &_cgmb_POLYGON_SET, + &_cgmb_CELL_ARRAY, + &_cgmb_GDP, + &_cgmb_RECT, + &_cgmb_CIRCLE, + &_cgmb_ARC_3_PT, + &_cgmb_ARC_3_PT_CLOSE, + &_cgmb_ARC_CTR, + &_cgmb_ARC_CTR_CLOSE, + &_cgmb_ELLIPSE, + &_cgmb_ELLIP_ARC, + &_cgmb_ELLIP_ARC_CLOSE, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +CGM_FUNC *_cgmb_attributes[] = { + &_cgmb_NULL, + &_cgmb_LINE_INDEX, + &_cgmb_LINE_TYPE, + &_cgmb_LINE_WIDTH, + &_cgmb_LINE_COLR, + &_cgmb_MARKER_INDEX, + &_cgmb_MARKER_TYPE, + &_cgmb_MARKER_WIDTH, + &_cgmb_MARKER_COLR, + &_cgmb_TEXT_INDEX, + &_cgmb_TEXT_FONT_INDEX, + &_cgmb_TEXT_PREC, + &_cgmb_CHAR_EXPAN, + &_cgmb_CHAR_SPACE, + &_cgmb_TEXT_COLR, + &_cgmb_CHAR_HEIGHT, + &_cgmb_CHAR_ORI, + &_cgmb_TEXT_PATH, + &_cgmb_TEXT_ALIGN, + &_cgmb_CHAR_SET_INDEX, + &_cgmb_ALT_CHAR_SET, + &_cgmb_FILL_INDEX, + &_cgmb_INT_STYLE, + &_cgmb_FILL_COLR, + &_cgmb_HATCH_INDEX, + &_cgmb_PAT_INDEX, + &_cgmb_EDGE_INDEX, + &_cgmb_EDGE_TYPE, + &_cgmb_EDGE_WIDTH, + &_cgmb_EDGE_COLR, + &_cgmb_EDGE_VIS, + &_cgmb_FILL_REF_PT, + &_cgmb_PAT_TABLE, + &_cgmb_PAT_SIZE, + &_cgmb_COLR_TABLE, + &_cgmb_ASF, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL }; + +CGM_FUNC *_cgmb_escape[] = { + &_cgmb_NULL, + &_cgmb_ESCAPE, + NULL}; + +CGM_FUNC *_cgmb_external[] = { + &_cgmb_NULL, + &_cgmb_MESSAGE, + &_cgmb_APPL_DATA, + NULL }; + +CGM_FUNC *_cgmb_segment[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +CGM_FUNC **_cgmb_comandos[] = { + _cgmb_delimiter, + _cgmb_metafile, + _cgmb_picture, + _cgmb_control, + _cgmb_primitive, + _cgmb_attributes, + _cgmb_escape, + _cgmb_external, + _cgmb_segment, + NULL }; + +/************************************************ +* * +* Funcoes para binario * +* * +************************************************/ + +int cgm_getfilepos ( void ) +{ + if (cdcgmcountercb) + return cdcgmcountercb ( intcgm_canvas, (ftell ( intcgm_cgm.fp )*100.)/intcgm_cgm.file_size ); + + return 0; +} + +#define cgmb_getw cgmb_getu16 +#define cgmb_getb(b) cgmb_getc((unsigned char *)(b)) + +static void cgmb_donothing ( void ) +{ + intcgm_cgm.bc=intcgm_cgm.len; +} + +int cgmb_exec_comand ( int classe, int id ) +{ + int err; + + if ( _cgmb_comandos[classe][id]==NULL ) + { + cgmb_donothing(); + return 0; + } + + err = (*_cgmb_comandos[classe][id])(); + + if ( err == -1 ) + return 1; + else if ( err ) + { + cgmb_donothing(); + return 0; + } + + return 0; +} + +int cgmb_getbit ( unsigned char *b ) +{ + static unsigned char b1; + + if ( intcgm_cgm.pc==0 || intcgm_cgm.pc==8 ) + { + b1 = intcgm_cgm.buff.dados[intcgm_cgm.bc]; + intcgm_cgm.bc++; + + if ( intcgm_cgm.bc > intcgm_cgm.len ) + { + return 1; + } + + intcgm_cgm.pc=0; + } + + *b = b1; + + switch ( intcgm_cgm.pc ) + { + case 0: + *b = ( *b | 0x0080 ) >> 7; + break; + case 1: + *b = ( *b | 0x0040 ) >> 6; + break; + case 2: + *b = ( *b | 0x0020 ) >> 5; + break; + case 3: + *b = ( *b | 0x0010 ) >> 4; + break; + case 4: + *b = ( *b | 0x0008 ) >> 3; + break; + case 5: + *b = ( *b | 0x0004 ) >> 2; + break; + case 6: + *b = ( *b | 0x0002 ) >> 1; + break; + case 7: + *b = ( *b | 0x0001 ); + break; + } + + intcgm_cgm.pc++; + + return 0; +} + +int cgmb_get2bit ( unsigned char *b ) +{ + static unsigned char b1; + + if ( intcgm_cgm.pc==0 || intcgm_cgm.pc==8 ) + { + b1 = intcgm_cgm.buff.dados[intcgm_cgm.bc]; + intcgm_cgm.bc++; + + if ( intcgm_cgm.bc > intcgm_cgm.len ) return 1; + + intcgm_cgm.pc=0; + } + + *b = b1; + + switch ( intcgm_cgm.pc ) + { + case 0: + *b = ( *b | 0x00C0 ) >> 6; + break; + case 2: + *b = ( *b | 0x0030 ) >> 4; + break; + case 4: + *b = ( *b | 0x000C ) >> 2; + break; + case 6: + *b = ( *b | 0x0003 ); + break; + } + + intcgm_cgm.pc += 2; + + return 0; +} + + +int cgmb_get4bit ( unsigned char *b ) +{ + static unsigned char b1; + + if ( intcgm_cgm.pc==0 || intcgm_cgm.pc==8 ) + { + b1 = intcgm_cgm.buff.dados[intcgm_cgm.bc]; + intcgm_cgm.bc++; + + if ( intcgm_cgm.bc > intcgm_cgm.len ) return 1; + + intcgm_cgm.pc=0; + } + + *b = b1; + + switch ( intcgm_cgm.pc ) + { + case 0: + *b = ( *b | 0x00F0 ) >> 4; + break; + case 4: + *b = ( *b | 0x000F ); + break; + } + + intcgm_cgm.pc += 4; + + return 0; +} + +int cgmb_getw ( unsigned short * ); + +int cgmb_getc ( unsigned char *b ) +{ + *b = intcgm_cgm.buff.dados[intcgm_cgm.bc]; + intcgm_cgm.bc++; + + if ( intcgm_cgm.bc > intcgm_cgm.len ) return 1; + + return 0; +} + +int cgmb_geti8 ( signed char *b ) +{ + unsigned char b1; + + if ( cgmb_getb ( &b1 ) ) return 1; + + *b = (signed char) b1; + + return 0; +} + +int cgmb_geti16 ( short *b ) +{ + unsigned char b1, b2; + + if ( cgmb_getb ( &b1 ) ) return 1; + if ( cgmb_getb ( &b2 ) ) return 1; + + *b = ( b1<<8 ) | b2; + + return 0; +} + +int cgmb_geti24 ( long *b ) +{ + unsigned char b1, b2, b3; + + if ( cgmb_getb ( &b1 ) ) return 1; + if ( cgmb_getb ( &b2 ) ) return 1; + if ( cgmb_getb ( &b3 ) ) return 1; + + *b = ( b1<<16 ) | ( b2<<8 ) | b3; + + return 0; +} + +int cgmb_geti32 ( long *b ) +{ + unsigned char b1, b2, b3, b4; + + if ( cgmb_getb ( &b1 ) ) return 1; + if ( cgmb_getb ( &b2 ) ) return 1; + if ( cgmb_getb ( &b3 ) ) return 1; + if ( cgmb_getb ( &b4 ) ) return 1; + + *b = ( b1<<24 ) | ( b2<<16 ) | ( b3<<8 ) | b4; + + return 0; +} + +int cgmb_getu8 ( unsigned char *b ) +{ + if ( cgmb_getb ( b ) ) return 1; + + return 0; +} + +int cgmb_getu16 ( unsigned short *b ) +{ + unsigned char b1, b2; + + if ( cgmb_getb ( &b1 ) ) return 1; + if ( cgmb_getb ( &b2 ) ) return 1; + + *b = ( b1<<8 ) | b2; + + return 0; +} + +int cgmb_getu24 ( unsigned long *b ) +{ + unsigned char b1, b2, b3; + + if ( cgmb_getb ( &b1 ) ) return 1; + if ( cgmb_getb ( &b2 ) ) return 1; + if ( cgmb_getb ( &b3 ) ) return 1; + + *b = ( b1<<16 ) | ( b2<<8 ) | b3; + + return 0; +} + +int cgmb_getu32 ( unsigned long *b ) +{ + unsigned char b1, b2, b3, b4; + + if ( cgmb_getb ( &b1 ) ) return 1; + if ( cgmb_getb ( &b2 ) ) return 1; + if ( cgmb_getb ( &b3 ) ) return 1; + if ( cgmb_getb ( &b4 ) ) return 1; + + *b = ( b1<<24 ) | ( b2<<16 ) | ( b3<<8 ) | b4; + + return 0; +} + +int cgmb_getfl32 ( float *b ) +{ + unsigned char b1, b2, b3, b4; + union { + float f; + long l; + } r; + + if ( cgmb_getb ( &b1 ) ) return 1; + if ( cgmb_getb ( &b2 ) ) return 1; + if ( cgmb_getb ( &b3 ) ) return 1; + if ( cgmb_getb ( &b4 ) ) return 1; + + r.l = ( b1<<24 ) | ( b2<<16 ) | ( b3<<8 ) | b4; + *b = r.f; + + return 0; +} + +int cgmb_getfl64 ( double *b ) +{ + unsigned char b1, b2, b3, b4, b5, b6, b7, b8; + union { + double d; + long l[2]; + } r; + + if ( cgmb_getb ( &b1 ) ) return 1; + if ( cgmb_getb ( &b2 ) ) return 1; + if ( cgmb_getb ( &b3 ) ) return 1; + if ( cgmb_getb ( &b4 ) ) return 1; + if ( cgmb_getb ( &b5 ) ) return 1; + if ( cgmb_getb ( &b6 ) ) return 1; + if ( cgmb_getb ( &b7 ) ) return 1; + if ( cgmb_getb ( &b8 ) ) return 1; + + r.l[1] = ( b1<<24 ) | ( b2<<16 ) | ( b3<<8 ) | b4; + r.l[0] = ( b5<<24 ) | ( b6<<16 ) | ( b7<<8 ) | b8; + *b = r.d; + + return 0; +} + +int cgmb_getfx32 ( float *b ) +{ + short si; + unsigned short ui; + + if ( cgmb_geti16 ( &si ) ) return 1; + if ( cgmb_getu16 ( &ui ) ) return 1; + + *b = (float) ( si + ( ui / 65536.0 ) ); + + return 0; +} + +int cgmb_getfx64 ( double *b ) +{ + long si, ui; + + if ( cgmb_geti32 ( &si ) ) return 1; + if ( cgmb_geti32 ( &ui ) ) return 1; + + *b = si + ( (unsigned short) ui / ( 65536.0 * 65536.0 ) ); + + return 0; +} + +int cgmb_ter ( void ) +{ + return 0; +} + +int cgmb_rch ( void ) +{ + int c, id, len, cont, i; + unsigned char ch[2], dummy; + unsigned short b; + int erro; + + if ( intcgm_cgm.bc!=intcgm_cgm.len ) + { + return 1; + } + + intcgm_cgm.bc = 0; + + erro = fread ( ch, 1, 2, intcgm_cgm.fp ); + if ( erro<2 ) return 1; + + intcgm_cgm.bl += 2; + + b = (ch[0] << 8) + ch[1]; + + len = b & 0x001F; + + id = ( b & 0x0FE0 ) >> 5; + + c = ( b & 0xF000 ) >> 12; + + cont = 0; + + if ( len > 30 ) + { + erro = fread ( ch, 1, 2, intcgm_cgm.fp ); + if ( erro<2 ) return 1; + + intcgm_cgm.bl += 2; + + b = (ch[0] << 8) + ch[1]; + + len = b & 0x7FFF; + cont = ( b & 0x8000 ); + } + + intcgm_cgm.len = len; + + if ( intcgm_cgm.len ) + { + if ( intcgm_cgm.len>intcgm_cgm.buff.size ) + intcgm_cgm.buff.dados = (char *) realloc ( intcgm_cgm.buff.dados, sizeof(char) * intcgm_cgm.len ); + + erro = fread ( intcgm_cgm.buff.dados, 1, intcgm_cgm.len, intcgm_cgm.fp ); + if ( errointcgm_cgm.buff.size ) + intcgm_cgm.buff.dados = (char *) realloc ( (char *)intcgm_cgm.buff.dados, sizeof(char) * intcgm_cgm.len ); + + erro = fread ( &intcgm_cgm.buff.dados[old_len], 1, len, intcgm_cgm.fp ); + if ( erro 254 ) + { + if ( cgmb_getu16 ( &l1 ) ) return 1; + cont = ( l1 & 0x8000); + l1 &= 0x7fff; + } + else + cont = 0; + + s = (char *)realloc ( (unsigned char *)s, (sizeof ( char ) * l1) + 1 ); + + for ( i=0; inome )==0 ) + { + int r = (*_cgmt_comandos[i][j]->func)(); + cgm_getfilepos (); + return r; + } + } + } + + + return 0; +} + +int cgmt_i ( long *i ) +{ + cgmt_getsep(); + + cgmt_getcom(); + + if ( fscanf( intcgm_cgm.fp, "%ld", i ) ) return 0; + + return 1; +} + +int cgmt_ci ( unsigned long *ci ) +{ + return cgmt_i ( (long*)ci ); +} + +int cgmt_cd ( unsigned long *cd ) +{ + return cgmt_i ( (long *) cd ); +} + +int cgmt_rgb ( unsigned long *r, unsigned long *g, unsigned long *b ) +{ + if ( cgmt_cd ( r ) ) return 1; + + if ( cgmt_cd ( g ) ) return 1; + + if ( cgmt_cd ( b ) ) return 1; + + return 0; +} + +int cgmt_ix ( long *ix ) +{ + return cgmt_i ( (long *) ix ); +} + +int cgmt_e ( short *e, const char **el ) +{ + char chr[256]; + int i; + char *pt; + + cgmt_getsep(); + + cgmt_getcom(); + + fscanf ( intcgm_cgm.fp, "%[^ \r\n\t\v\f,/;%\"\']", chr ); + + strlower(chr); + + pt = strtok(chr,"_$"); + + while ( (pt = strtok ( NULL, "_$" )) ) + strcat ( chr, pt ); + + for ( i=0; el[i]!=NULL; i++ ) + if ( strcmp( chr, el[i] ) == 0 ) + { + *e = i; + return 0; + }; + + return 1; +} + +int cgmt_r ( double *f ) +{ + cgmt_getsep(); + + cgmt_getcom(); + + if ( fscanf( intcgm_cgm.fp, "%lg", f ) ) return 0; + + return 1; +} + +int cgmt_s ( char **str ) +{ + char c, delim; + int intcgm_block = 80; + int i = 0; + + *str = (char *) malloc ( intcgm_block*sizeof(char) ); + + strcpy ( *str, "" ); + + cgmt_getsep(); + + cgmt_getcom(); + + delim = fgetc ( intcgm_cgm.fp ); + + if ( delim != '"' && delim != '\'' ) return 1; + + do + { + if ( (c=fgetc(intcgm_cgm.fp))==delim ) + if ( (c=fgetc(intcgm_cgm.fp))==delim ) + (*str)[i++] = c; + else + { + ungetc(c,intcgm_cgm.fp); + break; + } + else + (*str)[i++] = c; + + if ( (i+1)==intcgm_block ) + { + intcgm_block *= 2; + + *str = (char *) realloc ( *str, intcgm_block*sizeof(char) ); + } + } while ( 1 ); + + (*str)[i] = '\0'; + + /* addcounter();*/ + + return 0; +} + +int cgmt_vdc ( double *vdc ) +{ + long l; + + if ( intcgm_cgm.vdc_type==0 ) + { + if ( cgmt_i ( &l ) ) return 1; + *vdc = (double) l; + return 0; + } + else + return cgmt_r ( vdc ); +} + +int cgmt_p ( double *x, double *y ) +{ + cgmt_getparentheses(); + + if ( cgmt_vdc ( x ) ) return 1; + + if ( cgmt_vdc ( y ) ) return 1; + + cgmt_getparentheses(); + + return 0; +} + +int cgmt_co ( void *co ) +{ + if ( intcgm_cgm.clrsm == 0 ) /* indexed */ + { + unsigned long *ci = (unsigned long*)co; + if ( cgmt_ci ( ci ) ) return 1; + } + else + { + unsigned long *cb = (unsigned long *) co; + if ( cgmt_rgb ( &cb[0], &cb[1], &cb[2] ) ) return 1; + } + + return 0; +} diff --git a/cd/src/intcgm/intcgm2.h b/cd/src/intcgm/intcgm2.h new file mode 100755 index 0000000..d7f5204 --- /dev/null +++ b/cd/src/intcgm/intcgm2.h @@ -0,0 +1,52 @@ + +int cgm_getfilepos ( void ); + +int cgmb_exec_comand ( int, int ); +int cgmb_geti8 ( signed char * ); +int cgmb_geti16 ( short * ); +int cgmb_geti24 ( long * ); +int cgmb_geti32 ( long * ); +int cgmb_getu8 ( unsigned char * ); +int cgmb_getu16 ( unsigned short * ); +int cgmb_getu24 ( unsigned long * ); +int cgmb_getu32 ( unsigned long * ); +int cgmb_getfl32 ( float * ); +int cgmb_getfl64 ( double * ); +int cgmb_getfx32 ( float * ); +int cgmb_getfx64 ( double * ); +int cgmb_ter ( void ); +int cgmb_rch ( void ); +int cgmb_ci ( unsigned long * ); +int cgmb_cd ( unsigned long * ); +int cgmb_rgb ( unsigned long *, unsigned long *, unsigned long * ); +int cgmb_ix ( long * ); +int cgmb_e ( short * ); +int cgmb_i ( long * ); +int cgmb_u ( unsigned long * ); +int cgmb_r ( double * ); +int cgmb_s ( char ** ); +int cgmb_vdc ( double * ); +int cgmb_p ( double *, double * ); +int cgmb_co ( void * ); +int cgmb_getpixel ( void *, int ); +int cgmb_getc ( unsigned char * ); + +char *cgmt_getsep ( void ); +void cgmt_getcom ( void ); +char *cgmt_getparentheses ( void ); +int cgmt_ter ( void ); +int cgmt_rch ( void ); +int cgmt_i ( long * ); +int cgmt_ci ( unsigned long * ); +int cgmt_cd ( unsigned long * ); +int cgmt_rgb ( unsigned long *, unsigned long *, unsigned long * ); +int cgmt_ix ( long * ); +int cgmt_e ( short *, const char ** ); +int cgmt_r ( double * ); +int cgmt_s ( char ** ); +int cgmt_vdc ( double * ); +int cgmt_p ( double *, double * ); +int cgmt_co ( void * ); + + + diff --git a/cd/src/intcgm/intcgm4.c b/cd/src/intcgm/intcgm4.c new file mode 100755 index 0000000..4c8afe0 --- /dev/null +++ b/cd/src/intcgm/intcgm4.c @@ -0,0 +1,1265 @@ +#define _INTCGM4_C_ + +#include +#include +#include + +#include +#include + +#include "list.h" +#include "types.h" +#include "intcgm.h" +#include "intcgm2.h" +#include "intcgm4.h" +#include "intcgm6.h" +#include "ellipse.h" +#include "circle.h" +#include "sism.h" + +#ifndef PI +#define PI 3.1415931 +#endif +#define TWOPI 2*PI + +static double myhypot ( double x, double y ) +{ + return sqrt ( x*x + y*y ); +} + +int cgm_do_vdcext ( tpoint first, tpoint second ) +{ + double width, height; + double tmp; + double razao_vp; + double razao_wn; + int w_pixel, h_pixel; + double w_mm, h_mm; + + if ( first.x > second.x ) + { + tmp = first.x; + first.x = second.x; + second.x = tmp; + } + + if ( first.y > second.y ) + { + tmp = first.y; + first.y = second.y; + second.y = tmp; + } + + width = intcgm_view_xmax-intcgm_view_xmin+1; + height = intcgm_view_ymax-intcgm_view_ymin+1; + + razao_vp = (double) width/ (double) height; + razao_wn = (second.x-first.x) / (second.y-first.y); + + if ( razao_vp > razao_wn ) + { + first.x -= ((second.y-first.y)*razao_vp - (second.x-first.x)) / 2.; + second.x = (second.y-first.y)*razao_vp+first.x; + } + else + { + first.y -= ((second.x-first.x)/razao_vp - (second.y-first.y)) / 2.; + second.y = (second.x-first.x)/razao_vp+first.y; + } + + intcgm_vdc_ext.xmin = first.x; + intcgm_vdc_ext.xmax = second.x; + intcgm_vdc_ext.ymin = first.y; + intcgm_vdc_ext.ymax = second.y; + + intcgm_scale_factor_x = width/(second.x-first.x); + intcgm_scale_factor_y = height/(second.y-first.y); + intcgm_scale_factor = sqrt(width * width + height * height)/sqrt((second.x-first.x)+(second.y-first.y)); + cdCanvasGetSize (intcgm_canvas, &w_pixel, &h_pixel, &w_mm, &h_mm ); + intcgm_scale_factor_mm_x = w_pixel/w_mm; + intcgm_scale_factor_mm_y = h_pixel/h_mm; + + if ( intcgm_cgm.drawing_mode==ABSTRACT ) + { + intcgm_clip_xmin = cgm_canvas2vdcx ( intcgm_view_xmin ); + intcgm_clip_xmax = cgm_canvas2vdcx ( intcgm_view_xmax ); + intcgm_clip_ymin = cgm_canvas2vdcy ( intcgm_view_ymin ); + intcgm_clip_ymax = cgm_canvas2vdcy ( intcgm_view_ymax ); + } + else + { + intcgm_clip_xmin = intcgm_vdc_ext.xmin*intcgm_cgm.scaling_mode.scale_factor; + intcgm_clip_xmax = intcgm_vdc_ext.xmax*intcgm_cgm.scaling_mode.scale_factor; + intcgm_clip_ymin = intcgm_vdc_ext.ymin*intcgm_cgm.scaling_mode.scale_factor; + intcgm_clip_ymax = intcgm_vdc_ext.ymax*intcgm_cgm.scaling_mode.scale_factor; + } + + cdCanvasClipArea (intcgm_canvas, cgm_vdcx2canvas(first.x), cgm_vdcx2canvas(second.x), + cgm_vdcy2canvas(first.y), cgm_vdcy2canvas(second.y) ); + cdCanvasClip(intcgm_canvas, CD_CLIPOFF ); + + return 0; +} + +int cgm_do_bckcol ( trgb rgb ) +{ + long int cor = cdEncodeColor ( (unsigned char) rgb.red, + (unsigned char) rgb.green, + (unsigned char) rgb.blue ); + + cdCanvasSetBackground (intcgm_canvas, cor ); + + return 0; +} + +int cgm_do_transp ( int transparency ) +{ + if ( transparency ) + cdCanvasBackOpacity (intcgm_canvas, CD_TRANSPARENT ); + else + cdCanvasBackOpacity (intcgm_canvas, CD_OPAQUE ); + + return 0; +} + +int cgm_do_clprec ( tpoint first, tpoint second ) +{ + double tmp; + + if ( first.x > second.x ) + { + tmp = first.x; + first.x = second.x; + second.x = tmp; + } + + if ( first.y > second.y ) + { + tmp = first.y; + first.y = second.y; + second.y = tmp; + } + + cdCanvasClipArea (intcgm_canvas, cgm_vdcx2canvas(first.x), cgm_vdcx2canvas(second.x), + cgm_vdcy2canvas(first.y), cgm_vdcy2canvas(second.y) ); + + return 0; +} + +int cgm_do_clpind ( int indicator ) +{ + if ( indicator ) + cdCanvasClip(intcgm_canvas, CD_CLIPAREA ); + else + cdCanvasClip(intcgm_canvas, CD_CLIPOFF ); + + return 0; +} + +int cgm_do_polyln ( int n_points, tpoint *pt ) +{ + int i; + long int cor; + double bb_xmin, bb_ymin, bb_xmax, bb_ymax; + + cgm_getpolybbox ( pt, n_points, &bb_xmin, &bb_ymin, &bb_xmax, &bb_ymax ); + +#if 0 + if ( cgm_vdcx2canvas(bb_xmin) > intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cgm_setlinestyle ( intcgm_line_att.type ); + cgm_setlinewidth ( intcgm_line_att.width ); + cor = cgm_getcolor ( intcgm_line_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cdCanvasBegin(intcgm_canvas, CD_OPEN_LINES ); + + for ( i=0; i intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cgm_setlinestyle ( intcgm_line_att.type ); + cgm_setlinewidth ( intcgm_line_att.width ); + cor = cgm_getcolor ( intcgm_line_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cdCanvasBegin(intcgm_canvas, CD_OPEN_LINES ); + + x = pt[0].x; y = pt[0].y; + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(pt[0].x), cgm_vdcy2canvas(pt[0].y) ); + + for ( i=1; i intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + if ( n_points < 2 ) return 1; + + cgm_setlinestyle ( intcgm_line_att.type ); + cgm_setlinewidth ( intcgm_line_att.width ); + cor = cgm_getcolor ( intcgm_line_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + for ( i=0; i intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + if ( n_points < 2 ) return 1; + + cgm_setlinestyle ( intcgm_line_att.type ); + cgm_setlinewidth ( intcgm_line_att.width ); + cor = cgm_getcolor ( intcgm_line_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + pt[1].x = pt[0].x + pt[1].x; pt[1].y = pt[0].y + pt[1].y; + cdCanvasLine (intcgm_canvas, cgm_vdcx2canvas(pt[0].x), cgm_vdcy2canvas(pt[0].y), + cgm_vdcx2canvas(pt[1].x), cgm_vdcy2canvas(pt[1].y) ); + + for ( i=2; i intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cgm_setmarktype ( intcgm_marker_att.type ); + cgm_setmarksize ( intcgm_marker_att.size ); + cor = cgm_getcolor ( intcgm_marker_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + for ( i=0; i intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cgm_setmarktype ( intcgm_marker_att.type ); + cgm_setmarksize ( intcgm_marker_att.size ); + cor = cgm_getcolor ( intcgm_marker_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cdCanvasMark (intcgm_canvas, cgm_vdcx2canvas(pt[0].x), cgm_vdcy2canvas(pt[0].y) ); + + for ( i=1; i intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cor = cgm_getcolor ( intcgm_fill_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cgm_setlinewidth ( intcgm_line_att.width ); + + if ( intcgm_fill_att.int_style!=HOLLOW && intcgm_fill_att.int_style!=EMPTY ) + { + cdCanvasBegin(intcgm_canvas, cgm_setintstyle ( intcgm_fill_att.int_style ) ); + + for ( i=0; i intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cor = cgm_getcolor ( intcgm_fill_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cdCanvasBegin(intcgm_canvas, cgm_setintstyle ( intcgm_fill_att.int_style ) ); + + p.x = pt[0].x; p.y = pt[0].y; + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(pt[0].x), cgm_vdcy2canvas(pt[0].y) ); + + for ( i=1; i intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + intcgm_edge_att.visibility = OFF; + + cor = cgm_getcolor ( intcgm_fill_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + if ( intcgm_fill_att.int_style!=HOLLOW && intcgm_fill_att.int_style!=EMPTY ) + { + cdCanvasBegin(intcgm_canvas, cgm_setintstyle ( intcgm_fill_att.int_style ) ); + start = 1; + for ( i=0; i corner2.x ) ? corner1.x : corner2.x; + bb_ymin = ( corner1.y < corner2.y ) ? corner1.y : corner2.y; + bb_ymax = ( corner1.y > corner2.y ) ? corner1.y : corner2.y; + +#if 0 + if ( cgm_vdcx2canvas(bb_xmin) > intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + r = (unsigned char *) malloc ( nx*ny*sizeof(unsigned char) ); + g = (unsigned char *) malloc ( nx*ny*sizeof(unsigned char) ); + b = (unsigned char *) malloc ( nx*ny*sizeof(unsigned char) ); + + cx1 = cgm_vdcx2canvas(corner1.x); + cy1 = cgm_vdcy2canvas(corner1.y); + cx2 = cgm_vdcx2canvas(corner2.x); + cy2 = cgm_vdcy2canvas(corner2.y); + cx3 = cgm_vdcx2canvas(corner3.x); + cy3 = cgm_vdcy2canvas(corner3.y); + +#if 1 + if ( cx1cy3 ) + { + for ( i=0; icx3 && cy2==cy3 ) + { + tmp = nx; nx = ny; ny = tmp; + for ( i=0; icy3 && cx2>cx3 && cy2==cy3 ) + { + tmp = nx; nx = ny; ny = tmp; + for ( i=0; icx3 && cy1==cy3 && cx2==cx3 && cy2>cy3 ) + { + for ( i=0; icy3 && cx2cx3 && cy1==cy3 && cx2==cx3 && cy2cx2 ) + { + tmp = cx1; + cx1 = cx2; + cx2 = tmp; + } + + if ( cy1>cy2 ) + { + tmp = cy1; + cy1 = cy2; + cy2 = tmp; + } +#endif + + cdCanvasPutImageRectRGB (intcgm_canvas, nx, ny, r, g, b, cx1, cy1, cx2-cx1+1, cy2-cy1+1,0,0,0,0 ); + + free(r); + free(g); + free(b); + + return 0; +} + +int cgm_do_gdp ( int identifier, tpoint *pt, char *data_rec ) +{ + if ( identifier==-4 ) + cgm_sism4 ( pt, data_rec ); + else if ( identifier==-5 ) + cgm_sism5 ( data_rec ); + + return 0; +} + +int cgm_do_rect ( tpoint point1, tpoint point2 ) +{ + long int cor; + double bb_xmin, bb_ymin, bb_xmax, bb_ymax; + + bb_xmin = ( point1.x < point2.x ) ? point1.x : point2.x; + bb_xmax = ( point1.x > point2.x ) ? point1.x : point2.x; + bb_ymin = ( point1.y < point2.y ) ? point1.y : point2.y; + bb_ymax = ( point1.y > point2.y ) ? point1.y : point2.y; + +#if 0 + if ( cgm_vdcx2canvas(bb_xmin) > intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cor = cgm_getcolor ( intcgm_fill_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cdCanvasBegin(intcgm_canvas, cgm_setintstyle ( intcgm_fill_att.int_style ) ); + + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(point1.x), cgm_vdcy2canvas(point1.y) ); + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(point2.x), cgm_vdcy2canvas(point1.y) ); + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(point2.x), cgm_vdcy2canvas(point2.y) ); + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(point1.x), cgm_vdcy2canvas(point2.y) ); + + cdCanvasEnd (intcgm_canvas); + + return 0; +} + +int cgm_do_circle ( tpoint center, double radius ) +{ + double bb_xmin, bb_ymin, bb_xmax, bb_ymax; + + bb_xmin = center.x - radius; + bb_xmax = center.x + radius; + bb_ymin = center.y - radius; + bb_ymax = center.y + radius; + +#if 0 + if ( cgm_vdcx2canvas(bb_xmin) > intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin|| + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + if ( intcgm_fill_att.int_style!=EMPTY ) + { + long int cor; + + cor = cgm_getcolor ( intcgm_fill_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cgm_setlinestyle ( intcgm_line_att.type ); + cgm_setlinewidth ( intcgm_line_att.width ); + + if ( intcgm_fill_att.int_style!=EMPTY ) + cgm_poly_circle ( center.x, center.y, radius, 0, TWOPI, CLOSED_CHORD ); + else + cgm_line_circle ( center.x, center.y, radius, 0, TWOPI, CLOSED_CHORD ); + } + + if ( intcgm_edge_att.visibility==ON ) + { + long int cor; + + cor = cgm_getcolor ( intcgm_edge_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cgm_setlinestyle ( intcgm_edge_att.type ); + cgm_setlinewidth ( intcgm_edge_att.width ); + + cgm_line_circle ( center.x, center.y, radius, 0., TWOPI, CLOSED_CHORD ); + } + + return 0; +} + +static double angulo ( double cx, double cy, double px, double py ) +{ + double ang; + if ((fabs(py-cy)<1e-9) && (fabs(px-cx)<1e-9)) + ang = 0.0; + else + ang = atan2 ( py - cy , px - cx ); + + if ( ang<0.) ang = TWOPI - fabs(ang); + + return ang; +} + +static void solve2 ( double m[][2], double *b, double *x ) +{ + double det; + + det = m[0][0]*m[1][1] - m[0][1]*m[1][0]; + + if ( det==0.0 ) return; + + x[0] = ( b[0]*m[1][1] - b[1]*m[1][0] ) / det; + x[1] = ( m[0][0]*b[1] - m[0][1]*b[0] ) / det; +} + +static void getcenter ( double xs, double ys, double xi, double yi, double xe, double ye, + double *xc, double *yc ) +{ + double c[2]; + + double x2, y2, x3, y3, m[2][2], b[2]; + + x2 = xi - xs; + y2 = yi - ys; + x3 = xe - xs; + y3 = ye - ys; + + m[0][0] = 2*x2; + m[1][0] = 2*y2; + m[0][1] = 2*x3; + m[1][1] = 2*y3; + b[0] = x2*x2 + y2*y2; + b[1] = x3*x3 + y3*y3; + + solve2 ( m, b, c ); + + *xc = c[0] + xs; + *yc = c[1] + ys; +} + +int cgm_do_circ3p ( tpoint starting, tpoint intermediate, tpoint ending ) +{ + long int cor; + double xc, yc; + double angi, angm, angf; + double radius; + double bb_xmin, bb_ymin, bb_xmax, bb_ymax; + + cor = cgm_getcolor ( intcgm_line_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cgm_setlinestyle ( intcgm_line_att.type ); + cgm_setlinewidth ( intcgm_line_att.width ); + + getcenter ( starting.x, starting.y, intermediate.x, intermediate.y, ending.x, ending.y, &xc, &yc ); + + angi = angulo( xc, yc, starting.x, starting.y ); + angm = angulo( xc, yc, intermediate.x, intermediate.y ); + angf = angulo( xc, yc, ending.x, ending.y ); + + if ( angm intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cgm_line_circle ( xc, yc, radius, angi, angf, OPEN ); + + return 0; +} + +int cgm_do_circ3pc ( tpoint starting, tpoint intermediate, tpoint ending, int close_type ) +{ + long int cor; + double xc, yc; + double angi, angm, angf; + double radius; + double bb_xmin, bb_ymin, bb_xmax, bb_ymax; + + cor = cgm_getcolor ( intcgm_fill_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cgm_setlinestyle ( intcgm_line_att.type ); + cgm_setlinewidth ( intcgm_line_att.width ); + + getcenter ( starting.x, starting.y, intermediate.x, intermediate.y, ending.x, ending.y, &xc, &yc ); + + angi = angulo( xc, yc, starting.x, starting.y ); + angm = angulo( xc, yc, intermediate.x, intermediate.y ); + angf = angulo( xc, yc, ending.x, ending.y ); + + radius = sqrt ( (starting.x-xc)*(starting.x-xc) + (starting.y-yc)*(starting.y-yc) ); + + bb_xmin = xc - radius; + bb_xmax = xc + radius; + bb_ymin = yc - radius; + bb_ymax = yc + radius; + +#if 0 + if ( cgm_vdcx2canvas(bb_xmin) > intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + if ( angm intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cor = cgm_getcolor ( intcgm_fill_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cgm_setlinewidth ( intcgm_line_att.width ); + + angi = angulo( center.x, center.y, start.x, start.y ); + angf = angulo( center.x, center.y, end.x, end.y ); + + if ( angf intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cor = cgm_getcolor ( intcgm_fill_att.color ); + cdCanvasSetForeground (intcgm_canvas, cor ); + + cgm_setlinewidth ( intcgm_line_att.width ); + + angi = angulo( center.x, center.y, start.x, start.y ); + angf = angulo( center.x, center.y, end.x, end.y ); + + if ( angf intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cgm_ElpArc ( center.x, center.y, w*2., h*2., inc, 0-inc, TWOPI-inc, 64, 2 ); + + return 0; +} + +int cgm_do_ellarc ( tpoint center, tpoint first_CDP, tpoint second_CDP, + tpoint start, tpoint end ) +{ + double w = myhypot ( first_CDP.x-center.x, first_CDP.y-center.y ); + double h = myhypot ( second_CDP.x-center.x, second_CDP.y-center.y ); + double inc = atan2 ( first_CDP.y-center.y, first_CDP.x-center.x ); + double a1 = atan2 ( start.y, start.x ); + double a2 = atan2 ( end.y, end.x ); + double bb_xmin, bb_ymin, bb_xmax, bb_ymax; + + bb_xmin = center.x - w; + bb_xmax = center.x + w; + bb_ymin = center.y - h; + bb_ymax = center.y + h; + +#if 0 + if ( cgm_vdcx2canvas(bb_xmin) > intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cgm_ElpArc ( center.x, center.y, w*2., h*2., inc, a1-inc, a2-inc, 64, 0 ); + + return 0; +} + +int cgm_do_ellacl ( tpoint center, tpoint first_CDP, tpoint second_CDP, + tpoint start, tpoint end, int close_type ) +{ + double w = myhypot ( first_CDP.x-center.x, first_CDP.y-center.y ); + double h = myhypot ( second_CDP.x-center.x, second_CDP.y-center.y ); + double inc = atan2 ( first_CDP.y-center.y, first_CDP.x-center.x ); + double a1 = atan2 ( start.y, start.x ); + double a2 = atan2 ( end.y, end.x ); + + double bb_xmin, bb_ymin, bb_xmax, bb_ymax; + + bb_xmin = center.x - w; + bb_xmax = center.x + w; + bb_ymin = center.y - h; + bb_ymax = center.y + h; + +#if 0 + if ( cgm_vdcx2canvas(bb_xmin) > intcgm_view_xmax || cgm_vdcx2canvas(bb_xmax) < intcgm_view_xmin || + cgm_vdcy2canvas(bb_ymin) > intcgm_view_ymax || cgm_vdcy2canvas(bb_ymax) < intcgm_view_ymin ) return 0; +#else + if ( bb_xmin > intcgm_clip_xmax || bb_xmax < intcgm_clip_xmin || + bb_ymin > intcgm_clip_ymax || bb_ymax < intcgm_clip_ymin ) return 0; +#endif + + cgm_ElpArc ( center.x, center.y, w*2., h*2., inc, a1-inc, a2-inc, 64, close_type+1 ); + + return 0; +} + +int cgm_do_text_height ( double height ) +{ + cgm_setfont ( intcgm_text_att.font, intcgm_text_att.style, height ); + + return 0; +} + diff --git a/cd/src/intcgm/intcgm4.h b/cd/src/intcgm/intcgm4.h new file mode 100755 index 0000000..4b12873 --- /dev/null +++ b/cd/src/intcgm/intcgm4.h @@ -0,0 +1,28 @@ +int cgm_do_vdcext ( tpoint, tpoint ); +int cgm_do_bckcol ( trgb ); +int cgm_do_transp ( int ); +int cgm_do_clprec ( tpoint, tpoint ); +int cgm_do_clpind ( int ); +int cgm_do_polyln ( int, tpoint * ); +int cgm_do_incply ( int, tpoint * ); +int cgm_do_djtply ( int, tpoint * ); +int cgm_do_indpl ( int, tpoint * ); +int cgm_do_polymk ( int, tpoint * ); +int cgm_do_incplm ( int, tpoint * ); +int cgm_do_text ( int, char *, tpoint ); +int cgm_do_txtalign ( int hor, int ver ); +int cgm_do_polygn ( int, tpoint * ); +int cgm_do_incplg ( int, tpoint * ); +int cgm_do_plgset( int, int, tpoint *, short * ); +int cgm_do_cellar ( tpoint, tpoint, tpoint, int, int, long, tcolor * ); +int cgm_do_gdp ( int, tpoint *, char * ); +int cgm_do_rect ( tpoint point1, tpoint point2 ); +int cgm_do_circle ( tpoint, double ); +int cgm_do_circ3p ( tpoint, tpoint, tpoint ); +int cgm_do_circ3pc ( tpoint, tpoint, tpoint, int ); +int cgm_do_circcnt ( tpoint, tpoint, tpoint, double ); +int cgm_do_ccntcl ( tpoint, tpoint, tpoint, double, int ); +int cgm_do_ellips ( tpoint, tpoint, tpoint ); +int cgm_do_ellarc ( tpoint, tpoint, tpoint, tpoint, tpoint ); +int cgm_do_ellacl ( tpoint, tpoint, tpoint, tpoint, tpoint, int ); +int cgm_do_text_height ( double ); diff --git a/cd/src/intcgm/intcgm6.c b/cd/src/intcgm/intcgm6.c new file mode 100755 index 0000000..c23afee --- /dev/null +++ b/cd/src/intcgm/intcgm6.c @@ -0,0 +1,253 @@ +#include +#include +#include +#include + +#include + +#include "list.h" +#include "types.h" +#include "intcgm.h" +#include "intcgm2.h" +#include "intcgm6.h" + +void cgm_setlinestyle ( int type ) +{ + switch ( type ) + { + case LINE_SOLID: + cdCanvasLineStyle (intcgm_canvas, CD_CONTINUOUS ); + break; + case LINE_DASH: + cdCanvasLineStyle (intcgm_canvas, CD_DASHED ); + break; + case LINE_DOT: + cdCanvasLineStyle (intcgm_canvas, CD_DOTTED ); + break; + case LINE_DASH_DOT: + cdCanvasLineStyle (intcgm_canvas, CD_DASH_DOT ); + break; + case LINE_DASH_DOT_DOT: + cdCanvasLineStyle (intcgm_canvas, CD_DASH_DOT_DOT ); + break; + } +} + +void cgm_setlinewidth ( double width ) +{ + int w; + if ( intcgm_cgm.lnwsm == ABSOLUTE ) + w = cgm_delta_vdc2canvas(width); + else + w = (int)floor ( width+0.5 ); + + cdCanvasLineWidth (intcgm_canvas, w>0?w:1 ); +} + +void cgm_setmarktype ( int type ) +{ + switch ( type ) + { + case MARK_DOT: + cdCanvasMarkType (intcgm_canvas, CD_STAR ); + break; + case MARK_PLUS: + cdCanvasMarkType (intcgm_canvas, CD_PLUS ); + break; + case MARK_ASTERISK: + cdCanvasMarkType (intcgm_canvas, CD_X ); + break; + case MARK_CIRCLE: + cdCanvasMarkType (intcgm_canvas, CD_CIRCLE ); + break; + case MARK_CROSS: + cdCanvasMarkType (intcgm_canvas, CD_PLUS ); + break; + } +} + +void cgm_setmarksize ( double size ) +{ + if ( intcgm_cgm.lnwsm == ABSOLUTE ) + cdCanvasMarkSize (intcgm_canvas, cgm_delta_vdc2canvas(size) ); + else + cdCanvasMarkSize (intcgm_canvas, (int)floor ( size*0.5 ) ); +} + +long int *cgm_setpattern ( pat_table pat ) +{ + int i; + long int *cor = (long int *) malloc ( pat.nx*pat.ny*sizeof(long int) ); + + for ( i=0; iindex==intcgm_fill_att.pat_index ) break; + } + + p = (long int *) malloc ( pat->nx*pat->ny*sizeof(long int) ); + + for ( i=0; inx*pat->ny; i++ ) + { + if ( intcgm_cgm.clrsm==DIRECT ) + p[i] = cdEncodeColor ((unsigned char)(pat->pattern[i].rgb.red*255./intcgm_cgm.color_ext.white.red), + (unsigned char)(pat->pattern[i].rgb.green*255./intcgm_cgm.color_ext.white.green), + (unsigned char)(pat->pattern[i].rgb.blue*255./intcgm_cgm.color_ext.white.blue) ); + else + p[i] = cdEncodeColor ((unsigned char)(intcgm_color_table[pat->pattern[i].ind].red*255/intcgm_cgm.color_ext.white.red), + (unsigned char)(intcgm_color_table[pat->pattern[i].ind].green*255/intcgm_cgm.color_ext.white.green), + (unsigned char)(intcgm_color_table[pat->pattern[i].ind].blue*255/intcgm_cgm.color_ext.white.blue) ); + } + + cdCanvasPattern(intcgm_canvas, pat->nx, pat->ny, (long *) p ); + + return CD_FILL; + } + else if ( style==HATCH ) + { + cdCanvasHatch (intcgm_canvas, intcgm_fill_att.hatch_index-1 ); + return CD_FILL; + } + else + return CD_CLOSED_LINES; +} + +long int cgm_getcolor ( tcolor cor ) +{ + + if ( intcgm_cgm.clrsm==INDEXED ) + return cdEncodeColor ((unsigned char)(intcgm_color_table[cor.ind].red*255/intcgm_cgm.color_ext.white.red), + (unsigned char)(intcgm_color_table[cor.ind].green*255/intcgm_cgm.color_ext.white.green), + (unsigned char)(intcgm_color_table[cor.ind].blue*255/intcgm_cgm.color_ext.white.blue) ); + else + return cdEncodeColor ((unsigned char)(cor.rgb.red*255/intcgm_cgm.color_ext.white.red), + (unsigned char)(cor.rgb.green*255/intcgm_cgm.color_ext.white.green), + (unsigned char)(cor.rgb.blue*255/intcgm_cgm.color_ext.white.blue) ); +} + +int cgm_vdcx2canvas ( double vdc ) +{ + if ( intcgm_cgm.drawing_mode==ABSTRACT ) + return (int) floor ( intcgm_scale_factor_x*(vdc-intcgm_vdc_ext.xmin)+.5 ) + intcgm_view_xmin; + else + return (int) floor ( intcgm_scale_factor_mm_x*(vdc-intcgm_vdc_ext.xmin)*intcgm_cgm.scaling_mode.scale_factor + + intcgm_vdc_ext.xmin*intcgm_cgm.scaling_mode.scale_factor + .5 ); +} + +int cgm_vdcy2canvas ( double vdc ) +{ + if ( intcgm_cgm.drawing_mode==ABSTRACT ) + return (int) floor ( intcgm_scale_factor_y*(vdc-intcgm_vdc_ext.ymin)+.5 ) + intcgm_view_ymin; + else + return (int) floor ( intcgm_scale_factor_mm_y*(vdc-intcgm_vdc_ext.ymin)*intcgm_cgm.scaling_mode.scale_factor + + intcgm_vdc_ext.ymin*intcgm_cgm.scaling_mode.scale_factor + .5 ); +} + +int cgm_delta_vdc2canvas ( double vdc ) +{ + int delta = (int) cgm_vdcx2canvas(intcgm_vdc_ext.xmin+vdc) - (int) cgm_vdcx2canvas(intcgm_vdc_ext.xmin); + return delta; +} + +double cgm_canvas2vdcx ( int x ) +{ + if ( intcgm_cgm.drawing_mode==ABSTRACT ) + return (double) (x-intcgm_view_xmin)/intcgm_scale_factor_x + intcgm_vdc_ext.xmin; + else + return (double) (x-intcgm_view_xmin)/(intcgm_scale_factor_mm_x*intcgm_cgm.scaling_mode.scale_factor) + intcgm_vdc_ext.xmin; +} + +double cgm_canvas2vdcy ( int y ) +{ + if ( intcgm_cgm.drawing_mode==ABSTRACT ) + return (double) (y-intcgm_view_ymin)/intcgm_scale_factor_y + intcgm_vdc_ext.ymin; + else + return (double) (y-intcgm_view_ymin)/(intcgm_scale_factor_mm_y*intcgm_cgm.scaling_mode.scale_factor) + intcgm_vdc_ext.ymin; +} + +void cgm_getpolybbox ( tpoint *pt, int n_points, double *bb_xmin, double *bb_ymin, + double *bb_xmax, double *bb_ymax ) +{ + int i; + + *bb_xmin = *bb_xmax = pt[0].x; + *bb_ymin = *bb_ymax = pt[0].y; + + for ( i=1; i *bb_xmax ) *bb_xmax = pt[i].x; + if ( pt[i].y < *bb_ymin ) *bb_ymin = pt[i].y; + else if ( pt[i].y > *bb_ymax ) *bb_ymax = pt[i].y; + } +} + +void cgm_getincpolybbox ( tpoint *pt, int n_points, double *bb_xmin, double *bb_ymin, + double *bb_xmax, double *bb_ymax ) +{ + int i; + double px, py; + + px = *bb_xmin = *bb_xmax = pt[0].x; + py = *bb_ymin = *bb_ymax = pt[0].y; + + for ( i=1; i *bb_xmax ) *bb_xmax = px; + if ( py < *bb_ymin ) *bb_ymin = py; + else if ( py > *bb_ymax ) *bb_ymax = py; + } +} + +int cgm_setfont ( int font, int style, double height ) +{ + int size; + int cy; + char* type_face; + + cy = cgm_delta_vdc2canvas ( height ); + size = (int) floor (((cy/intcgm_scale_factor_mm_y)/0.353)+0.5); + switch (font) + { + case 0: + type_face = "System"; + break; + case 1: + type_face = "Courier"; + break; + case 2: + type_face = "Times"; + break; + case 3: + type_face = "Helvetica"; + break; + default: + return 0; + } + + cdCanvasFont(intcgm_canvas, type_face, style, size ); + + return 0; +} diff --git a/cd/src/intcgm/intcgm6.h b/cd/src/intcgm/intcgm6.h new file mode 100755 index 0000000..fde660e --- /dev/null +++ b/cd/src/intcgm/intcgm6.h @@ -0,0 +1,15 @@ +void cgm_setlinestyle ( int ); +void cgm_setlinewidth ( double ); +void cgm_setmarktype ( int ); +void cgm_setmarksize ( double ); +long int cgm_getcolor ( tcolor ); +long int *cgm_setpattern ( pat_table ); +int cgm_setfont ( int, int, double ); +int cgm_setintstyle ( int ); +int cgm_vdcx2canvas ( double ); +int cgm_vdcy2canvas ( double ); +int cgm_delta_vdc2canvas ( double ); +double cgm_canvas2vdcx ( int ); +double cgm_canvas2vdcy ( int ); +void cgm_getpolybbox ( tpoint *, int, double *n, double *, double *, double * ); +void cgm_getincpolybbox ( tpoint *, int, double *, double *, double *, double * ); diff --git a/cd/src/intcgm/list.c b/cd/src/intcgm/list.c new file mode 100755 index 0000000..6fefbbc --- /dev/null +++ b/cd/src/intcgm/list.c @@ -0,0 +1,117 @@ +/* +* list.c +* Generic List Manager +* TeCGraf +* +*/ + +#include +#include +#include "list.h" + +TList *cgm_NewList ( void ) +{ + TList *l = (TList *) malloc ( sizeof (TList) ); + + list_nba(l) = 8; + list_head(l) = (void **)malloc(list_nba(l)*sizeof(void*)); + list_n(l) = 0; + + return l; +} + +TList *cgm_AppendList ( TList *l, void *i ) +{ + if ( l == NULL ) + return NULL; + + if (list_n(l) == list_nba(l)) + { + list_nba(l) += 32; + list_head(l) = (void **)realloc(list_head(l),list_nba(l)*sizeof(void*)); + } + + list_head(l)[list_n(l)]=i; + list_n(l)++; + + return l; +} + +TList *cgm_AddList ( TList *l, int n, void *info ) +{ + int i; + + if ( l == NULL) + return NULL; + + if ( n < 1) + n=1; + + if ( n > list_n(l) ) + return cgm_AppendList( l, info ); + + --n; /* o usuario ve a lista iniciando em 1 e a */ + /* lista e' implementada iniciando em 0 */ + + if (list_n(l) == list_nba(l)) + { + list_nba(l) *= 2; + list_head(l) = (void **)realloc(list_head(l),list_nba(l)*sizeof(void*)); + } + + for (i=list_n(l)-1; i>=n; --i) + list_head(l)[i+1]=list_head(l)[i]; + + list_head(l)[n]=info; + list_n(l)++; + return l; +} + +TList *cgm_DelList ( TList *l, int n ) +{ + int i; + + if ( l == NULL || list_n(l) == 0 || n < 0) + return NULL; + + if ( n < 1) + n=1; + + if ( n > list_n(l)) + n=list_n(l); + + --n; /* o usuario ve a lista iniciando em 1 e a */ + /* lista e' implementada iniciando em 0 */ + list_n(l)--; + + for (i=n; i list_n(l) ? NULL : list_head(l)[n-1]; +} + +int cgm_DelEntry ( TList *l, void *entry ) +{ + int i=1; + + if ( l == NULL || list_n(l) == 0) + return 0; + + for (i=0; i< list_n(l); ++i) + if (list_head(l)[i]==entry) + { + cgm_DelList(l,i+1); /* o usuario ve a lista iniciando em 1 e a */ + /* lista e' implementada iniciando em 0 */ + return i+1; + } + return 0; +} + diff --git a/cd/src/intcgm/list.h b/cd/src/intcgm/list.h new file mode 100755 index 0000000..c661a7c --- /dev/null +++ b/cd/src/intcgm/list.h @@ -0,0 +1,30 @@ + +/* +* list.h +* prototipos das funcoes de manipulacao de lista +* TeCGraf +* 27 Ago 93 +*/ + +#ifndef __LIST_H__ +#define __LIST_H__ + +typedef struct TList_ + { + void **h; /* head */ + int nba; + int n; /* Numero de elementos na lista */ + } TList; + +#define list_head(l) ((l)->h) +#define list_n(l) ((l)->n) +#define list_nba(l) ((l)->nba) + +TList *cgm_NewList ( void ); +TList *cgm_AppendList ( TList *, void * ); +TList *cgm_AddList ( TList *, int, void * ); +TList *cgm_DelList ( TList *, int ); +void *cgm_GetList ( TList *, int ); +int cgm_DelEntry ( TList *, void * ); + +#endif diff --git a/cd/src/intcgm/sism.c b/cd/src/intcgm/sism.c new file mode 100755 index 0000000..9946ac3 --- /dev/null +++ b/cd/src/intcgm/sism.c @@ -0,0 +1,392 @@ +#include +#include +#include +#include +#include +#include + +#include + +#include "list.h" +#include "types.h" +#include "intcgm.h" +#include "intcgm2.h" +#include "intcgm6.h" + +static tpoint trace_start_pos, base_direction, amp_direction, trace_direction; +static double bline_sc_f, amp_sc_f, trc_st_f, VA_bline_offset, pos_clp_lmt, + neg_clp_lmt, pos_bckfil_bnd, neg_bckfil_bnd; +static int trace_dsp_md, samp_type, n_samp, wig_trc_mod, nul_clr_i, n_trace; +static double *sample; +static long *coind; +static int trace=0; + +void cgm_sism4 ( tpoint *pt, char *data_rec ) +{ + sscanf ( data_rec, "%lg %lg %lg %lg %lg %lg %d %d %d %lg %lg %*d %d %d %d", + &bline_sc_f, &_sc_f, &trc_st_f, &VA_bline_offset, &pos_clp_lmt, + &neg_clp_lmt, &trace_dsp_md, &samp_type, &n_samp, &pos_bckfil_bnd, + &neg_bckfil_bnd, &wig_trc_mod, &nul_clr_i, &n_trace ); + + trace_start_pos = pt[0]; + base_direction = pt[1]; + amp_direction = pt[2]; + trace_direction = pt[3]; + trace = 0; +} + +/* adjust the samples to the amplitude direction vector */ +static void dirvet ( double dx ) +{ + int i; + + for ( i=0; imn && samp2mx) + { + x[n] = min + dx; + y[n++] = interpl(i,y1,y2,min); + x[n] = max + dx; + y[n++] = interpl(i,y1,y2,max); + x[n] = max + dx; + y[n++] = y2; + x[n] = min + dx; + y[n++] = y2; + } + + else if ( (samp1>mn && samp1mn && samp2mn && samp1mx ) + { + x[n] = min + dx; + y[n++] = y1; + x[n] = sample[i] + dx; + y[n++] = y1; + x[n] = max + dx; + y[n++] = interpl(i,y1,y2,max); + x[n] = max + dx; + y[n++] = y2; + x[n] = min + dx; + y[n++] = y2; + } + + else if ( samp1>mx && samp2>mx ) + { + x[n] = min + dx; + y[n++] = y1; + x[n] = max + dx; + y[n++] = y1; + x[n] = max + dx; + y[n++] = y2; + x[n] = min + dx; + y[n++] = y2; + } + + else if ( samp1>mx && samp2mn ) + { + x[n] = min + dx; + y[n++] = y1; + x[n] = max + dx; + y[n++] = y1; + x[n] = max + dx; + y[n++] = interpl(i,y1,y2,max); + x[n] = sample[i+1] + dx; + y[n++] = y2; + x[n] = min + dx; + y[n++] = y2; + } + + else if ( samp1>mn && samp10 ) + { + if ( cordep ) + { + cor = cdEncodeColor ( (unsigned char)((intcgm_color_table[coind[i]].red*255)/intcgm_cgm.color_ext.white.red), + (unsigned char)((intcgm_color_table[coind[i]].green*255)/intcgm_cgm.color_ext.white.green), + (unsigned char)((intcgm_color_table[coind[i]].blue*255)/intcgm_cgm.color_ext.white.blue) ); + cdCanvasSetForeground (intcgm_canvas, cor ); + } + + cdCanvasBegin(intcgm_canvas, CD_FILL ); + + for ( j=0; jnegclp && sample[i]negclp && sample[i+1]negclp && sample[i+1]posclp ) + { + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(negclp + dx), cgm_vdcy2canvas(interpl(i,y1,y2,negclp)) ); + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(posclp + dx), cgm_vdcy2canvas(interpl(i,y1,y2,posclp)) ); + } + else if ( sample[i]>negclp && sample[i]posclp ) + { + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(sample[i] + dx), cgm_vdcy2canvas(y1) ); + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(posclp + dx), cgm_vdcy2canvas(interpl(i,y1,y2,posclp)) ); + } + else if ( sample[i]>posclp && sample[i+1]negclp ) + cdCanvasVertex (intcgm_canvas, cgm_vdcx2canvas(posclp + dx), cgm_vdcy2canvas(interpl(i,y1,y2,posclp)) ); + else if ( sample[i]>posclp && sample[i+1]negclp && sample[i] 7 ) + coind = (long *) malloc ( n_samp*sizeof(long) ); + + for ( i=0; i= 64 ) + mode = 64; + else if ( trace_mode >= 32 ) + mode = 32; + else if ( trace_mode >= 16 ) + mode = 16; + else if ( trace_mode >= 8 ) + mode = 8; + else if ( trace_mode >= 4 ) + mode = 4; + else if ( trace_mode >= 2 ) + mode = 2; + else if ( trace_mode == 1 ) + mode = 1; + + switch ( mode ) + { + case 64: + neg_clp = neg_clp_lmt; + pos_clp = ( pos_clp_lmt < 0 ) ? pos_clp_lmt : 0; + vasamp ( mode, pos_clp, neg_clp, 1 ); + trace_mode -= 64; + break; + case 32: + neg_clp = ( neg_clp_lmt > 0 ) ? neg_clp_lmt : 0; + pos_clp = pos_clp_lmt; + vasamp ( mode, pos_clp, neg_clp, 1 ); + trace_mode -= 32; + break; + case 16: + bgclfl( mode ); + trace_mode -= 16; + break; + case 8: + bgclfl( mode ); + trace_mode -= 8; + break; + case 4: + neg_clp = ( neg_clp_lmt > 0 ) ? neg_clp_lmt : 0; + pos_clp = pos_clp_lmt; + vasamp ( mode, pos_clp, neg_clp, 0 ); + trace_mode -= 4; + break; + case 2: + neg_clp = ( neg_clp_lmt > 0 ) ? neg_clp_lmt : 0; + pos_clp = pos_clp_lmt; + vasamp ( mode, pos_clp, neg_clp, 0 ); + trace_mode -= 2; + break; + case 1: + wiggle ( pos_clp_lmt, neg_clp_lmt ); + trace_mode -= 1; + break; + } + } while ( trace_mode != 0 ); + + free(sample); + + if ( trace_dsp_md > 7 ) + free(coind); +} diff --git a/cd/src/intcgm/sism.h b/cd/src/intcgm/sism.h new file mode 100755 index 0000000..f2f08f0 --- /dev/null +++ b/cd/src/intcgm/sism.h @@ -0,0 +1,3 @@ +void cgm_sism4 ( tpoint *, char * ); +void cgm_sism5 ( char * ); + diff --git a/cd/src/intcgm/tparse.c b/cd/src/intcgm/tparse.c new file mode 100755 index 0000000..9bc47b3 --- /dev/null +++ b/cd/src/intcgm/tparse.c @@ -0,0 +1,1370 @@ +#define _INTCGM2_C_ + +#include +#include +#include + +#include +#include + +#include "list.h" +#include "types.h" +#include "bparse.h" +#include "intcgm.h" +#include "intcgm2.h" +#include "intcgm4.h" +#include "intcgm6.h" + +int cgmt_begmtf ( void ) /* begin metafile */ +{ + char *str=NULL; + + if ( cgmt_s ( &str ) ) return 1; + + if (cdcgmbegmtfcb) + { + int err; + err = cdcgmbegmtfcb ( intcgm_canvas, &intcgm_view_xmin, &intcgm_view_ymin, &intcgm_view_xmax, &intcgm_view_ymax ); + if ( err==CD_ABORT ) return -1; + } + + free(str); + + return cgmt_ter(); +} + +int cgmt_endmtf ( void ) /* end metafile */ +{ + cgmt_ter(); + return 1; +} + +int cgmt_begpic ( void ) /* begin picture */ +{ + char *string=NULL; + + if ( intcgm_cgm.first ) + intcgm_cgm.first = 0; + else + cdCanvasFlush(intcgm_canvas); + + cdCanvasClip(intcgm_canvas, CD_CLIPAREA); + + if ( cgmt_s ( &string ) ) return 1; + + if (cdcgmbegpictcb) + { + int err; + err = cdcgmbegpictcb ( intcgm_canvas, string ); + if ( err==CD_ABORT ) return -1; + } + + free(string); + + return cgmt_ter(); +} + +int cgmt_begpib ( void ) /* begin picture body */ +{ + if (cdcgmbegpictbcb) + { + int err; + err = cdcgmbegpictbcb ( intcgm_canvas, 1., 1., intcgm_scale_factor_x, intcgm_scale_factor_y, + intcgm_scale_factor_mm_x*intcgm_cgm.scaling_mode.scale_factor, + intcgm_scale_factor_mm_y*intcgm_cgm.scaling_mode.scale_factor, + intcgm_cgm.drawing_mode, + intcgm_vdc_ext.xmin, intcgm_vdc_ext.ymin, intcgm_vdc_ext.xmax, intcgm_vdc_ext.ymax ); + if ( err==CD_ABORT ) return -1; + } + + + if (cdcgmsizecb) + { + int err, w, h; + double w_mm=0., h_mm=0.; + + w = intcgm_view_xmax-intcgm_view_xmin+1; + h = intcgm_view_ymax-intcgm_view_ymin+1; + + if ( intcgm_cgm.vdc_type==INTEGER ) + { + w = (int) (intcgm_cgm.vdc_ext.second.x - intcgm_cgm.vdc_ext.first.x); + h = (int) (intcgm_cgm.vdc_ext.second.y - intcgm_cgm.vdc_ext.first.y); + if ( intcgm_cgm.scaling_mode.mode==METRIC ) + { + w_mm = w * intcgm_cgm.scaling_mode.scale_factor; + h_mm = h * intcgm_cgm.scaling_mode.scale_factor; + } + } + else + { + if ( intcgm_cgm.scaling_mode.mode==METRIC ) + { + w_mm = (intcgm_cgm.vdc_ext.second.x - intcgm_cgm.vdc_ext.first.x) * intcgm_cgm.scaling_mode.scale_factor; + h_mm = (intcgm_cgm.vdc_ext.second.y - intcgm_cgm.vdc_ext.first.y) * intcgm_cgm.scaling_mode.scale_factor; + } + } + + err = cdcgmsizecb ( intcgm_canvas, w, h, w_mm, h_mm ); + if ( err==CD_ABORT ) return -1; + } + + return cgmt_ter(); +} + +int cgmt_endpic ( void ) /* end picture */ +{ + return cgmt_ter(); +} + +int cgmt_mtfver ( void ) /* metafile version */ +{ + long version; + + if ( cgmt_i ( &version ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_mtfdsc ( void ) /* metafile description */ +{ + char *string=NULL; + + if ( cgmt_s ( &string ) ) return 1; + + free(string); + + return cgmt_ter(); +} + +int cgmt_vdctyp ( void ) /* vdc type */ +{ + const char *options[] = { "integer", "real", NULL }; + + if ( cgmt_e ( &(intcgm_cgm.vdc_type), options ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_intpre ( void ) /* integer precision */ +{ + if ( cgmt_i ( &(intcgm_cgm.int_prec.t_prec.minint) ) ) return 1; + if ( cgmt_i ( &(intcgm_cgm.int_prec.t_prec.maxint) ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_realpr ( void ) /* real precision */ +{ + if ( cgmt_r ( &(intcgm_cgm.real_prec.t_prec.minreal) ) ) return 1; + if ( cgmt_r ( &(intcgm_cgm.real_prec.t_prec.maxreal) ) ) return 1; + if ( cgmt_i ( &(intcgm_cgm.real_prec.t_prec.digits) ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_indpre ( void ) /* index precision */ +{ + if ( cgmt_i ( &(intcgm_cgm.ix_prec.t_prec.minint) ) ) return 1; + if ( cgmt_i ( &(intcgm_cgm.ix_prec.t_prec.maxint) ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_colpre ( void ) /* colour precision */ +{ + if ( cgmt_i ( &(intcgm_cgm.cd_prec) ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_colipr ( void ) /* colour index precision */ +{ + if ( cgmt_i ( &(intcgm_cgm.cix_prec) ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_maxcoi ( void ) /* maximum colour index */ +{ + if ( cgmt_i ( &(intcgm_cgm.max_cix) ) ) return 1; + + intcgm_color_table = (trgb *) realloc ( intcgm_color_table, sizeof(trgb)*(intcgm_cgm.max_cix+1) ); + + intcgm_color_table[0].red = 255; + intcgm_color_table[0].green = 255; + intcgm_color_table[0].blue = 255; + intcgm_color_table[1].red = 0; + intcgm_color_table[1].green = 0; + intcgm_color_table[1].blue = 0; + + return cgmt_ter(); +} + +int cgmt_covaex ( void ) /* colour value extent */ +{ + if ( cgmt_rgb ( &(intcgm_cgm.color_ext.black.red), &(intcgm_cgm.color_ext.black.green), &(intcgm_cgm.color_ext.black.blue) ) ) return 1; + + if ( cgmt_rgb ( &(intcgm_cgm.color_ext.white.red), &(intcgm_cgm.color_ext.white.green), &(intcgm_cgm.color_ext.white.blue) ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_mtfell ( void ) /* metafile element list */ +{ + char *elist=NULL; + + if ( cgmt_s ( &elist ) ) return 1; + + free(elist); + + return cgmt_ter(); +} + +int cgmt_bmtfdf (void ) /* begin metafile defaults */ +{ + return cgmt_ter(); +} + +int cgmt_emtfdf ( void ) /* end metafile defaults */ +{ + return cgmt_ter(); +} + +int cgmt_fntlst ( void ) /* font list */ +{ + char *font=NULL; + + if ( intcgm_text_att.font_list==NULL ) intcgm_text_att.font_list = cgm_NewList(); + + while ( cgmt_ter() ) + { + if ( cgmt_s ( &font ) ) return 1; + cgm_AppendList ( intcgm_text_att.font_list, font ); + } + + return 0; +} + +int cgmt_chslst ( void ) /* character set list */ +{ + const char *options[] = { "std94", "std96", "std94multibyte", "std96multibyte", + "completecode", NULL }; + char *tail; + short code; + + do + { + if ( cgmt_e ( &(code), options ) ) return 1; + + if ( cgmt_s ( &tail ) ) return 1; + + free ( tail ); + + } while ( cgmt_ter() ); + + return 0; +} + +int cgmt_chcdac ( void ) /* character coding announcer */ +{ + const char *options[] = { "basic7bit", "basic8bit", "extd7bit", "extd8bit", NULL }; + short code; + + if ( cgmt_e ( &(code), options ) ) return 1; + + return cgmt_ter (); +} + +int cgmt_sclmde ( void ) /* scaling mode */ +{ + const char *options[] = { "abstract", "metric", NULL }; + + if ( cgmt_e ( &(intcgm_cgm.scaling_mode.mode), options ) ) return 1; + + if ( cgmt_r ( &(intcgm_cgm.scaling_mode.scale_factor) ) ) return 1; + + if ( intcgm_cgm.scaling_mode.mode==ABSTRACT ) intcgm_cgm.scaling_mode.scale_factor=1.; + + intcgm_cgm.drawing_mode = ABSTRACT; + + if (cdcgmsclmdecb) + { + int err; + err = cdcgmsclmdecb ( intcgm_canvas, intcgm_cgm.scaling_mode.mode, &intcgm_cgm.drawing_mode, &intcgm_cgm.scaling_mode.scale_factor ); + if ( err==CD_ABORT ) return -1; + } + + if ( intcgm_cgm.drawing_mode==ABSTRACT ) + { + intcgm_clip_xmin = cgm_canvas2vdcx ( intcgm_view_xmin ); + intcgm_clip_xmax = cgm_canvas2vdcx ( intcgm_view_xmax ); + intcgm_clip_ymin = cgm_canvas2vdcy ( intcgm_view_ymin ); + intcgm_clip_ymax = cgm_canvas2vdcy ( intcgm_view_ymax ); + } + else + { + intcgm_clip_xmin = intcgm_vdc_ext.xmin*intcgm_cgm.scaling_mode.scale_factor; + intcgm_clip_xmax = intcgm_vdc_ext.xmax*intcgm_cgm.scaling_mode.scale_factor; + intcgm_clip_ymin = intcgm_vdc_ext.ymin*intcgm_cgm.scaling_mode.scale_factor; + intcgm_clip_ymax = intcgm_vdc_ext.ymax*intcgm_cgm.scaling_mode.scale_factor; + } + + return cgmt_ter(); +} + +int cgmt_clslmd ( void ) /* colour selection mode */ +{ + const char *options[] = { "indexed", "direct", NULL }; + + if ( cgmt_e ( &(intcgm_cgm.clrsm), options ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_lnwdmd ( void ) /* line width specification mode */ +{ + const char *options[] = { "abstract", "scaled", NULL }; + + if ( cgmt_e ( &(intcgm_cgm.lnwsm), options ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_mkszmd ( void ) /* marker size specification mode */ +{ + const char *options[] = { "abstract", "scaled", NULL }; + + if ( cgmt_e ( &(intcgm_cgm.mkssm), options ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_edwdmd ( void ) /* edge width specification mode */ +{ + const char *options[] = { "abstract", "scaled", NULL }; + + if ( cgmt_e ( &(intcgm_cgm.edwsm), options ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_vdcext ( void ) /* vdc extent */ +{ + if ( cgmt_p ( &(intcgm_cgm.vdc_ext.first.x), &(intcgm_cgm.vdc_ext.first.y) ) ) return 1; + + if ( cgmt_p ( &(intcgm_cgm.vdc_ext.second.x), &(intcgm_cgm.vdc_ext.second.y) ) ) return 1; + + if (cdcgmvdcextcb) + { + int err; + err = cdcgmvdcextcb( intcgm_canvas, intcgm_cgm.vdc_type, &(intcgm_cgm.vdc_ext.first.x), &(intcgm_cgm.vdc_ext.first.y), + &(intcgm_cgm.vdc_ext.second.x), &(intcgm_cgm.vdc_ext.second.y) ); + if (err==CD_ABORT) return -1; + } + + cgm_do_vdcext ( intcgm_cgm.vdc_ext.first, intcgm_cgm.vdc_ext.second ); + + return cgmt_ter(); +} + +int cgmt_bckcol ( void ) /* backgound colour */ +{ + if ( cgmt_rgb ( &(intcgm_cgm.back_color.red), &(intcgm_cgm.back_color.green), &(intcgm_cgm.back_color.blue) ) ) return 1; + + cgm_do_bckcol ( intcgm_cgm.back_color ); + + return cgmt_ter(); +} + +int cgmt_vdcipr ( void ) /* vdc integer precision */ +{ + if ( cgmt_i ( &(intcgm_cgm.vdc_int.t_prec.minint) ) ) return 1; + if ( cgmt_i ( &(intcgm_cgm.vdc_int.t_prec.maxint) ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_vdcrpr ( void ) /* vdc real precision */ +{ + if ( cgmt_r ( &(intcgm_cgm.vdc_real.t_prec.minreal) ) ) return 1; + if ( cgmt_r ( &(intcgm_cgm.vdc_real.t_prec.maxreal) ) ) return 1; + if ( cgmt_i ( &(intcgm_cgm.vdc_real.t_prec.digits) ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_auxcol ( void ) /* auxiliary colour */ +{ + if ( cgmt_co ( &(intcgm_cgm.aux_color) ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_transp ( void ) /* transparency */ +{ + const char *options[] = { "on", "off", NULL }; + + if ( cgmt_e ( &(intcgm_cgm.transparency), options ) ) return 1; + + cgm_do_transp ( intcgm_cgm.transparency ); + + return cgmt_ter(); +} + +int cgmt_clprec ( void ) /* clip rectangle */ +{ + if ( cgmt_p ( &(intcgm_cgm.clip_rect.first.x), &(intcgm_cgm.clip_rect.first.y) ) ) return 1; + + if ( cgmt_p ( &(intcgm_cgm.clip_rect.second.x), &(intcgm_cgm.clip_rect.second.y) ) ) return 1; + + cgm_do_clprec ( intcgm_cgm.clip_rect.first, intcgm_cgm.clip_rect.second ); + + return cgmt_ter(); +} + +int cgmt_clpind ( void ) /* clip indicator */ +{ + const char *options[] = { "on", "off", NULL }; + + if ( cgmt_e ( &(intcgm_cgm.clip_ind), options ) ) return 1; + + cgm_do_clpind ( intcgm_cgm.clip_ind ); + + return cgmt_ter(); +} + +static tpoint *get_points ( int *np ) +{ + *np=0; + + do + { + if ( cgmt_p ( &(intcgm_point_list[*np].x), &(intcgm_point_list[*np].y) ) ) return NULL; + ++(*np); + if ( *np==intcgm_npoints) + { + intcgm_npoints *= 2; + intcgm_point_list = (tpoint *) realloc ( intcgm_point_list, intcgm_npoints*sizeof(tpoint) ); + } + } while ( cgmt_ter() ); + + return intcgm_point_list; +} + +int cgmt_polyln ( void ) /* polyline */ +{ + tpoint *pt; + int np; + + pt = get_points( &np ); + if ( pt == NULL ) return 1; + + cgm_do_polyln ( np, pt ); + + return 0; +} + +int cgmt_incply ( void ) /* incremental polyline */ +{ + tpoint *pt; + int np; + + pt = get_points( &np ); + if ( pt == NULL ) return 1; + + cgm_do_incply ( np, pt ); + + return 0; +} + +int cgmt_djtply ( void ) /* disjoint polyline */ +{ + tpoint *pt; + int np; + + pt = get_points( &np ); + if ( pt == NULL ) return 1; + + cgm_do_djtply ( np, pt ); + + return 0; +} + +int cgmt_indjpl ( void ) /* incremental disjoint polyline */ +{ + tpoint *pt; + int np; + + pt = get_points( &np ); + if ( pt == NULL ) return 1; + + cgm_do_indpl ( np, pt ); + + return 0; +} + +int cgmt_polymk ( void ) /* polymarker */ +{ + tpoint *pt; + int np; + + pt = get_points( &np ); + if ( pt == NULL ) return 1; + + cgm_do_polymk ( np, pt ); + + return 0; +} + +int cgmt_incplm ( void ) /* incremental polymarker */ +{ + tpoint *pt; + int np; + + pt = get_points( &np ); + if ( pt == NULL ) return 1; + + cgm_do_incplm ( np, pt ); + + return 0; +} + +int cgmt_text ( void ) /* text */ +{ + tpoint pos; + const char *options[] = { "final", "notfinal", NULL }; + short flag; + char *string; + + if ( cgmt_p ( &(pos.x), &(pos.y) ) ) return 1; + + if ( cgmt_e ( &flag, options ) ) return 1; + + if ( cgmt_s ( &string ) ) return 1; + + cgm_do_text ( NORM_TEXT, string, pos ); + + free ( string ); + + return cgmt_ter(); +} + +int cgmt_rsttxt ( void ) /* restricted text */ +{ + double width, height; + tpoint pos; + const char *options[] = { "final", "notfinal", NULL }; + short flag; + char *string; + + if ( cgmt_vdc ( &width ) ) return 1; + + if ( cgmt_vdc ( &height ) ) return 1; + + if ( cgmt_p ( &(pos.x), &(pos.y) ) ) return 1; + + if ( cgmt_e ( &flag, options ) ) return 1; + + if ( cgmt_s ( &string ) ) return 1; + + intcgm_text_att.height = height; + + cgm_do_text ( RESTRICTED_TEXT, string, pos ); + + if ( string!= NULL ) free ( string ); + + return cgmt_ter(); +} + +int cgmt_apdtxt ( void ) /* append text */ +{ + const char *options[] = { "final", "notfinal", NULL }; + short flag; + char *string; + + if ( cgmt_e ( &flag, options ) ) return 1; + + if ( cgmt_s ( &string ) ) return 1; + + free ( string ); + + return cgmt_ter(); +} + +int cgmt_polygn ( void ) /* polygon */ +{ + tpoint *pt; + int np; + + pt = get_points( &np ); + if ( pt == NULL ) return 1; + + cgm_do_polygn ( np, pt ); + + return 0; +} + +int cgmt_incplg ( void ) /* incremental polygon */ +{ + tpoint *pt; + int np; + + pt = get_points( &np ); + if ( pt == NULL ) return 1; + + cgm_do_incplg ( np, pt ); + + return 0; +} + +static int get_point_set ( tpoint **pts, short **flags, int *np ) +{ + int intcgm_block=500; + const char *options[] = { "invis", "vis", "closeinvis", "closevis", NULL }; + + *np=0; + *pts = (tpoint *) malloc ( intcgm_block*sizeof(tpoint) ); + *flags = (short *) malloc ( intcgm_block*sizeof(short) ); + + do + { + if ( cgmt_p ( &((*pts)[*np].x), &((*pts)[*np].y) ) ) return 1; + + if ( cgmt_e ( &((*flags)[*np]), options ) ) return 1; + + ++(*np); + if ( *np==intcgm_block) + { + intcgm_block *= 2; + *pts = (tpoint *) realloc ( *pts, intcgm_block*sizeof(tpoint) ); + *flags = (short *) realloc ( *flags, intcgm_block*sizeof(short) ); + } + } while ( cgmt_ter() ); + + return 0; +} + +int cgmt_plgset ( void ) /* polygon set */ +{ + tpoint *pt; + short *flag; + int np; + + if ( get_point_set ( &pt, &flag, &np ) ) return 1; + + cgm_do_plgset( NO, np, pt, flag ); + + free ( pt ); + free ( flag ); + + return 0; +} + +int cgmt_inpgst ( void ) /* incremental polygon set */ +{ + tpoint *pt; + short *flag; + int np; + + if ( get_point_set ( &pt, &flag, &np ) ) return 1; + + cgm_do_plgset( YES, np, pt, flag ); + + free ( pt ); + free ( flag ); + + return 0; +} + +int cgmt_cellar ( void ) /* cell array */ +{ + tpoint corner1; + tpoint corner2; + tpoint corner3; + long nx, ny; + long local_color_prec; + tcolor *cell; + int i,k; + + if ( cgmt_p ( &(corner1.x), &(corner1.y) ) ) return 1; + if ( cgmt_p ( &(corner2.x), &(corner2.y) ) ) return 1; + if ( cgmt_p ( &(corner3.x), &(corner3.y) ) ) return 1; + + if ( cgmt_i ( &nx ) ) return 1; + if ( cgmt_i ( &ny ) ) return 1; + + if ( cgmt_i ( &(local_color_prec) ) ) return 1; + + cell = (tcolor *) malloc ( nx*ny*sizeof(tcolor) ); + + cgmt_getparentheses(); + + for ( k=0; kindex) ) ) return 1; + + if ( cgmt_i ( &(pat->nx) ) ) return 1; + if ( cgmt_i ( &(pat->ny) ) ) return 1; + + if ( cgmt_i ( &(local_color_prec) ) ) return 1; + + pat->pattern = (tcolor *) malloc ( pat->nx*pat->ny*sizeof(tcolor) ); + + cgmt_getparentheses(); + + for ( i=0; i<(pat->nx*pat->ny); i++ ) + if ( cgmt_co ( &(pat->pattern[i]) ) ) return 1; + + cgmt_getparentheses(); + + for ( i=0; (p=(pat_table *)cgm_GetList(intcgm_fill_att.pat_list,i))!=NULL; i++ ) + { + if ( p->index==pat->index ) + { + free(p->pattern); + cgm_DelList(intcgm_fill_att.pat_list,i); + break; + } + } + + cgm_AppendList ( intcgm_fill_att.pat_list, pat ); + + return cgmt_ter(); +} + +int cgmt_patsiz ( void ) /* pattern size */ +{ + if ( cgmt_vdc ( &(intcgm_fill_att.pat_size.height.x) ) ) return 1; + if ( cgmt_vdc ( &(intcgm_fill_att.pat_size.height.y) ) ) return 1; + if ( cgmt_vdc ( &(intcgm_fill_att.pat_size.width.x) ) ) return 1; + if ( cgmt_vdc ( &(intcgm_fill_att.pat_size.width.y) ) ) return 1; + + return cgmt_ter(); +} + +int cgmt_coltab ( void ) /* colour table */ +{ + long starting_index; + + if ( cgmt_i ( &(starting_index) ) ) return 1; + + while ( cgmt_ter() ) + { + if ( cgmt_rgb ( &(intcgm_color_table[starting_index].red), &(intcgm_color_table[starting_index].green), + &(intcgm_color_table[starting_index].blue) ) ) return 1; + starting_index++; + } + + return 0; +} + +int cgmt_asf ( void ) /* asfs */ +{ + const char *asf_value[] = { "bundled", "indiv", NULL }; + const char *asf_type[] = { "linetype" , "linewidth" , "linecolr" , + "markertype" , "markersize", "markercolr", + "textfontindex", "textprec" , "charexp" , + "charspace" , "textcolr" , "intstyle" , + "fillcolr" , "hatchindex", "patindex" , + "edgetype" , "edgewidth" , "edgecolr" , + "all" , "allline" , "allmarker" , + "alltext" , "allfill" , "alledge", NULL }; + tasf *pair; + + if ( intcgm_asf_list==NULL ) intcgm_asf_list = cgm_NewList(); + + while( cgmt_ter() ) + { + pair = (tasf *) malloc ( sizeof (tasf) ); + + if ( cgmt_e ( &(pair->type), asf_type ) ) return 1; + if ( cgmt_e ( &(pair->value), asf_value ) ) return 1; + + cgm_AppendList ( intcgm_asf_list, pair ); + } + + return 0; +} + +int cgmt_escape ( void ) /* escape */ +{ + long identifier; + char *data_rec; + + if ( cgmt_i ( &(identifier) ) ) return 1; + + if ( cgmt_s ( &data_rec ) ) return 1; + + free(data_rec); + + return cgmt_ter(); +} + +int cgmt_messag ( void ) /* message */ +{ + const char *options[] = { "noaction", "action", NULL }; + char *text; + short flag; + + if ( cgmt_e ( &flag, options ) ) return 1; + + if ( cgmt_s ( &text ) ) return 1; + + free(text); + + return cgmt_ter(); +} + +int cgmt_appdta ( void ) /* application data */ +{ + long identifier; + char *data_rec; + + if ( cgmt_i ( &identifier ) ) return 1; + + if ( cgmt_s ( &data_rec ) ) return 1; + + free(data_rec); + + return cgmt_ter(); +} diff --git a/cd/src/intcgm/tparse.h b/cd/src/intcgm/tparse.h new file mode 100755 index 0000000..c1292bc --- /dev/null +++ b/cd/src/intcgm/tparse.h @@ -0,0 +1,101 @@ +#ifndef _TPARSE_H_ +#define _TPARSE_H_ + +int cgmt_begmtf ( void ); +int cgmt_endmtf ( void ); +int cgmt_begpic ( void ); +int cgmt_begpib ( void ); +int cgmt_endpic ( void ); +int cgmt_mtfver ( void ); +int cgmt_mtfdsc ( void ); +int cgmt_vdctyp ( void ); +int cgmt_intpre ( void ); +int cgmt_realpr ( void ); +int cgmt_indpre ( void ); +int cgmt_colpre ( void ); +int cgmt_colipr ( void ); +int cgmt_maxcoi ( void ); +int cgmt_covaex ( void ); +int cgmt_mtfell ( void ); +int cgmt_bmtfdf (void ); +int cgmt_emtfdf ( void ); +int cgmt_fntlst ( void ); +int cgmt_chslst ( void ); +int cgmt_chcdac ( void ); +int cgmt_sclmde ( void ); +int cgmt_clslmd ( void ); +int cgmt_lnwdmd ( void ); +int cgmt_mkszmd ( void ); +int cgmt_edwdmd ( void ); +int cgmt_vdcext ( void ); +int cgmt_bckcol ( void ); +int cgmt_vdcipr ( void ); +int cgmt_vdcrpr ( void ); +int cgmt_auxcol ( void ); +int cgmt_transp ( void ); +int cgmt_clprec ( void ); +int cgmt_clpind ( void ); +int cgmt_polyln ( void ); +int cgmt_incply ( void ); +int cgmt_djtply ( void ); +int cgmt_indjpl ( void ); +int cgmt_polymk ( void ); +int cgmt_incplm ( void ); +int cgmt_text ( void ); +int cgmt_rsttxt ( void ); +int cgmt_apdtxt ( void ); +int cgmt_polygn ( void ); +int cgmt_incplg ( void ); +int cgmt_plgset ( void ); +int cgmt_inpgst ( void ); +int cgmt_cellar ( void ); +int cgmt_gdp ( void ); +int cgmt_rect ( void ); +int cgmt_circle ( void ); +int cgmt_circ3p ( void ); +int cgmt_cir3pc ( void ); +int cgmt_circnt ( void ); +int cgmt_ccntcl ( void ); +int cgmt_ellips ( void ); +int cgmt_ellarc ( void ); +int cgmt_ellacl ( void ); +int cgmt_lnbdin ( void ); +int cgmt_lntype ( void ); +int cgmt_lnwidt ( void ); +int cgmt_lncolr ( void ); +int cgmt_mkbdin ( void ); +int cgmt_mktype ( void ); +int cgmt_mksize ( void ); +int cgmt_mkcolr ( void ); +int cgmt_txbdin ( void ); +int cgmt_txftin ( void ); +int cgmt_txtprc ( void ); +int cgmt_chrexp ( void ); +int cgmt_chrspc ( void ); +int cgmt_txtclr ( void ); +int cgmt_chrhgt ( void ); +int cgmt_chrori ( void ); +int cgmt_txtpat ( void ); +int cgmt_txtali ( void ); +int cgmt_chseti ( void ); +int cgmt_achsti ( void ); +int cgmt_fillin ( void ); +int cgmt_intsty ( void ); +int cgmt_fillco ( void ); +int cgmt_hatind ( void ); +int cgmt_patind ( void ); +int cgmt_edgind ( void ); +int cgmt_edgtyp( void ); +int cgmt_edgwid ( void ); +int cgmt_edgcol ( void ); +int cgmt_edgvis ( void ); +int cgmt_fillrf ( void ); +int cgmt_pattab ( void ); +int cgmt_patsiz ( void ); +int cgmt_coltab ( void ); +int cgmt_asf ( void ); +int cgmt_escape ( void ); +int cgmt_messag ( void ); +int cgmt_appdta ( void ); + +#endif diff --git a/cd/src/intcgm/types.h b/cd/src/intcgm/types.h new file mode 100755 index 0000000..6d6f65c --- /dev/null +++ b/cd/src/intcgm/types.h @@ -0,0 +1,225 @@ +#ifndef _CGM_TYPES_H_ +#define _CGM_TYPES_H_ + +typedef struct { + double xmin; + double xmax; + double ymin; + double ymax; + } tlimit; + +typedef struct { + unsigned long red; + unsigned long green; + unsigned long blue; + } trgb; + +typedef union { + int ind; + trgb rgb; + } tcolor; + +typedef struct { + double x; + double y; + } tpoint; + +typedef struct { + char *dados; + int size; + } tdados; + +typedef struct { + FILE *fp; + + int (*cgmf)(void); + + int file_size; + + int first; + + int mode; /* character, binary, clear text */ + + int len; + + tdados buff; + + short vdc_type; + + union { + long b_prec; /* 8, 16, 24, 32 */ + struct { long minint; long maxint; } t_prec ; + } int_prec; + union { + long b_prec; /* float*32, float*64, fixed*32, fixed*64 */ + struct { double minreal; double maxreal; long digits; } t_prec; + } real_prec; + union { + long b_prec; /* 8, 16, 24, 32 */ + struct { long minint; long maxint; } t_prec; + } ix_prec; + long cd_prec; + long cix_prec; + struct { + trgb black; + trgb white; + } color_ext; + long max_cix; + + struct { + short mode; + double scale_factor; + } scaling_mode; + + short drawing_mode; + + short clrsm; + short lnwsm; + short mkssm; + short edwsm; + + union { + long b_prec; /* 8, 16, 24, 32 */ + struct { long minint; long maxint; } t_prec; + } vdc_int; + union { + long b_prec; /* float*32, float*64, fixed*32, fixed*64 */ + struct { double minreal; double maxreal; long digits; } t_prec; + } vdc_real; + + struct { + tpoint first; + tpoint second; + } vdc_ext; + + trgb back_color; + + tcolor aux_color; + + short transparency; + + struct { + tpoint first; + tpoint second; + } clip_rect; + + short clip_ind; + + int bc; /* byte count */ + int pc; /* pixel count */ + + long bl; /* bytes lidos */ + + int cl; /* coluna para alinhamento */ + + } t_cgm; + +typedef struct { + long index; + long type; + double width; + tcolor color; + } _line_att; + +typedef struct { + long index; + long type; + double size; + tcolor color; + } _marker_att; + +typedef struct { + long index; + long font_index; + TList *font_list; + int font; + int style; + int size; + short prec; + double exp_fact; + double char_spacing; + tcolor color; + double height; + tpoint char_up; + tpoint char_base; + short path; + struct { short hor; + short ver; + double cont_hor; + double cont_ver; + } alignment; + } _text_att; + +typedef struct { + long index; + short int_style; + tcolor color; + long hatch_index; + long pat_index; + tpoint ref_pt; + TList *pat_list; + struct { + tpoint height; + tpoint width; + } pat_size; + } _fill_att; + +typedef struct { + long index; + long type; + double width; + tcolor color; + short visibility; + } _edge_att; + +enum { OFF, ON }; + +enum { YES, NO }; + +enum { INTEGER, REAL }; + +enum { STRING, CHAR, STROKE }; + +enum { ABSOLUTE, SCALED }; + +enum { ABSTRACT, METRIC }; + +enum { INDEXED, DIRECT }; + +enum { MARK_DOT=1, MARK_PLUS=2, MARK_ASTERISK=3, MARK_CIRCLE=4, MARK_CROSS=5 }; + +enum { LINE_SOLID=1, LINE_DASH=2, LINE_DOT=3, LINE_DASH_DOT=4, + LINE_DASH_DOT_DOT=5 }; + +enum { EDGE_SOLID=1, EDGE_DASH=2, EDGE_DOT=3, EDGE_DASH_DOT=4, + EDGE_DASH_DOT_DOT=5 }; + +enum { HOLLOW, SOLID, PATTERN, HATCH, EMPTY }; + +enum { HORIZONTAL=1, VERTICAL=2, POSITIVE_SLOPE=3, NEGATIVE_SLOPE=4, + HV_CROSS=5, SLOPE_CROSS=6 }; + +enum { PATH_RIGHT, PATH_LEFT, PATH_UP, PATH_DOWN }; + +enum { NORMHORIZ, LEFT, CTR, RIGHT, CONTHORIZ }; + +enum { NORMVERT, TOP, CAP, HALF, BASE, BOTTOM, CONTVERT }; + +enum { LINE_TYPE, LINE_WIDTH, LINE_COLOUR, MARKER_TYPE, MARKER_SIZE, + MARKER_COLOUR, TEXT_FONT_INDEX, TEXT_PRECISION, + CHARACTER_EXPANSION_FACTOR, CHARACTER_SPACING, TEXT_COLOUR, + INTERIOR_STYLE, FILL_COLOUR, HATCH_INDEX, PATTERN_INDEX, EDGE_TYPE, + EDGE_WIDTH, EDGE_COLOUR, ALL, ALL_LINE, ALL_MARKER, ALL_TEXT, ALL_FILL, + ALL_EDGE }; + +enum { INDIVIDUAL, BUNDLED }; + +enum { INVISIBLE, VISIBLE, CLOSE_INVISIBLE, CLOSE_VISIBLE }; + +enum { PIE, CHORD }; + +enum { OPEN, CLOSED_PIE, CLOSED_CHORD }; + +enum { NORM_TEXT, RESTRICTED_TEXT }; + +#endif diff --git a/cd/src/lua3/cdlua.c b/cd/src/lua3/cdlua.c new file mode 100755 index 0000000..ea5ac44 --- /dev/null +++ b/cd/src/lua3/cdlua.c @@ -0,0 +1,4366 @@ +/***************************************************************************\ +* CDLUA.C, for LUA 3.1 * +* Diego Fernandes Nehab, Antonio Escano Scuri * +* 01/99 * +* Implements all that TOLUA couldn't handle. * +\***************************************************************************/ + +/***************************************************************************\ +* Included definitions. * +\***************************************************************************/ +#include +#include +#include +#include + +/***************************************************************************\ +* CD Definitions. * +\***************************************************************************/ +#include "cd.h" +#include "wd.h" + +#include "cdirgb.h" /* cdRedImage, cdGreenImage, cdBlueImage */ + +/* error checking when there is no active canvas */ +#include "cdvoid.h" + +/***************************************************************************\ +* LUA Definitions. * +\***************************************************************************/ +#include +#include + +/***************************************************************************\ +* CDLUA Definitions. * +\***************************************************************************/ +#include "cdlua.h" +#include "cdlua3_private.h" + +/***************************************************************************\ +* Globals. * +\***************************************************************************/ +static int color_tag; +static int stipple_tag; +static int pattern_tag; +static int image_tag; +static int bitmap_tag; +static int imagergb_tag; +static int imagergba_tag; +static int palette_tag; +static int imagemap_tag; +static int channel_tag; +static int canvas_tag; +static int state_tag; + +static channel_t channel_info; +static cdCanvas *void_canvas; +static cdContextLUA* cdlua_drivers[50]; +static int cdlua_numdrivers = 0; +static lua_Object cdlua_namespace; + +int luaL_cd_open(void); /* from toluacd.c */ +int luaL_wd_open(void); /* from toluawd.c */ +void cdlua_initdrivers(void); /* to cdluactx.c */ + + +/***************************************************************************\ +* Creation and destruction of types LUA can't handle. * +\***************************************************************************/ + +void cdlua_setnamespace(char* name, char* new_name) +{ + lua_Object obj = lua_getglobal(name); + lua_pushobject(cdlua_namespace); + lua_pushstring(new_name); + lua_pushobject(obj); + lua_settable(); +} + +void cdlua_register(char* name, lua_CFunction func) +{ + lua_register(name, func); + + if (name[0] == 'w') + { + char new_name[100]; + new_name[0] = 'w'; + strcpy(new_name+1, name+2); + cdlua_setnamespace(name, new_name); /* wdXXX */ + } + else + cdlua_setnamespace(name, name+2); /* cdXXX */ +} + +void cdlua_pushnumber(double num, char* name) +{ + lua_pushnumber(num); lua_setglobal(name); + cdlua_setnamespace(name, name+3); /* CD_XXXX */ +} + +static void cdlua_pushcolor(long color, char* name) +{ + lua_pushusertag((void*)color, color_tag); lua_setglobal(name); + cdlua_setnamespace(name, name+3); /* CD_XXXX */ +} + +void cdlua_addcontext(cdContextLUA* luactx) +{ + int i; + luactx->id = cdlua_numdrivers; + cdlua_drivers[cdlua_numdrivers] = luactx; + + cdlua_pushnumber(cdlua_numdrivers, luactx->name); + + /* skip CD_SIZECB, register other callbacks */ + for (i=1; icb_n; i++) + { + cdlua_pushnumber(i, luactx->cb_list[i].name); + } + + cdlua_numdrivers++; +} + +/***************************************************************************\ +* Creates a CD canvas as a canvas_tag usertag lua_Object. * +* If the creation fails, the function returns a nil lua_Object. * +\***************************************************************************/ +static void cdlua_createcanvas(void) +{ + lua_Object driver; + + long int driver_i; + canvas_t *canvas_p; + void *data_p; + + /* if there is not enough memory */ + canvas_p = (canvas_t *) malloc(sizeof(canvas_t)); + if (!canvas_p) { + lua_pushnil(); + return; + } + + /* get driver parameter */ + driver = lua_getparam(1); + if (!lua_isnumber(driver)) + lua_error("cdCreateCanvas: invalid driver parameter!"); + driver_i = (long int) lua_getnumber(driver); + + if (driver_i >= cdlua_numdrivers) + lua_error("cdCreateCanvas: unknown driver!"); + + data_p = cdlua_drivers[driver_i]->checkdata(2); + canvas_p->cd_canvas = cdCreateCanvas(cdlua_drivers[driver_i]->ctx(), data_p); + + /* if creation failed, return nil so that the user can compare */ + /* the result with nil and know that it failed */ + if (!canvas_p->cd_canvas) { + free(canvas_p); + lua_pushnil(); + } + /* else, return a canvas_t structure */ + else + lua_pushusertag((void *) canvas_p, canvas_tag); +} + +static lua_Object wdlua_hardcopy_func_lua = 0; + +static void wdlua_hardcopy_func(void) +{ + lua_callfunction(wdlua_hardcopy_func_lua); +} + +static void wdlua_hardcopy(void) +{ + lua_Object driver; + lua_Object canvas; + + long int driver_i; + canvas_t *canvas_p; + void *data_p; + + /* get driver parameter */ + driver = lua_getparam(1); + if (!lua_isnumber(driver)) + lua_error("wdHardcopy: invalid driver parameter!"); + driver_i = (long int) lua_getnumber(driver); + + canvas = lua_getparam(3); + + if (canvas == LUA_NOOBJECT) + lua_error("wdHardcopy: canvas parameter missing!"); + + /* if the creation failed, canvas can be nil, in which case we */ + /* issue an error */ + if (lua_isnil(canvas)) + lua_error("wdHardcopy: attempt to get a NIL canvas!"); + + if (lua_tag(canvas) != canvas_tag) + lua_error("wdHardcopy: invalid canvas parameter!"); + canvas_p = (canvas_t *) lua_getuserdata(canvas); + if (!canvas_p->cd_canvas) + lua_error("wdHardcopy: attempt to get a killed canvas!"); + + wdlua_hardcopy_func_lua = lua_getparam(4); + + if (!lua_isfunction(wdlua_hardcopy_func_lua)) + lua_error("wdHardcopy: invalid draw function!"); + + if (lua_getparam(5) != LUA_NOOBJECT) + lua_error("wdHardcopy: too many parameters!"); + + if (driver_i >= cdlua_numdrivers) + lua_error("wdHardcopy: unknown driver!"); + + data_p = cdlua_drivers[driver_i]->checkdata(2); + wdHardcopy(cdlua_drivers[driver_i]->ctx(), data_p, canvas_p->cd_canvas, wdlua_hardcopy_func); +} + +static void cdlua_getcontext(void) +{ + lua_Object canvas; + canvas_t *canvas_p; + cdContext* ctx; + int driver_i = -1, i; + + canvas = lua_getparam(1); + + if (canvas == LUA_NOOBJECT) + lua_error("cdGetContext: canvas parameter missing!"); + + /* if the creation failed, canvas can be nil, in which case we */ + /* issue an error */ + if (lua_isnil(canvas)) + lua_error("cdGetContext: attempt to get a NIL canvas!"); + + if (lua_tag(canvas) != canvas_tag) + lua_error("cdGetContext: invalid canvas parameter!"); + canvas_p = (canvas_t *) lua_getuserdata(canvas); + if (!canvas_p->cd_canvas) + lua_error("cdGetContext: attempt to get a killed canvas!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdGetContext: too many parameters!"); + + ctx = cdGetContext(canvas_p->cd_canvas); + + for (i=0; i < cdlua_numdrivers; i++) + { + if (ctx == cdlua_drivers[i]->ctx()) + { + driver_i = i; + break; + } + } + + if (i == cdlua_numdrivers) + lua_error("cdGetContext: unknown driver!"); + + lua_pushnumber(driver_i); +} + +static void cdlua_contextcaps(void) +{ + lua_Object driver; + long int driver_i; + unsigned long caps; + + /* get driver parameter */ + driver = lua_getparam(1); + if (!lua_isnumber(driver)) + lua_error("cdCreateCanvas: invalid driver parameter!"); + driver_i = (long int) lua_getnumber(driver); + + if (driver_i >= cdlua_numdrivers) + lua_error("cdContextCaps: unknown driver!"); + + caps = cdContextCaps(cdlua_drivers[driver_i]->ctx()); + + lua_pushnumber(caps); +} + +/***************************************************************************\ +* Activates a cd canvas. * +\***************************************************************************/ +static void cdlua_activate(void) +{ + lua_Object canvas; + canvas_t *canvas_p; + + canvas = lua_getparam(1); + + if (canvas == LUA_NOOBJECT) + lua_error("cdActivate: canvas parameter missing!"); + + /* if canvas is nil, activate a void canvas */ + if (lua_isnil(canvas)) { + lua_pushnumber(cdActivate(void_canvas)); + return; + } + + if (lua_tag(canvas) != canvas_tag) { + cdActivate(void_canvas); + lua_error("cdActivate: invalid canvas parameter!"); + } + + canvas_p = (canvas_t *) lua_getuserdata(canvas); + if (!canvas_p->cd_canvas) { + cdActivate(void_canvas); + lua_error("cdActivate: attempt to activate a killed canvas!"); + } + + if (lua_getparam(2) != LUA_NOOBJECT) { + cdActivate(void_canvas); + lua_error("cdActivate: too many parameters!"); + } + + lua_pushnumber(cdActivate(canvas_p->cd_canvas)); +} + +/***************************************************************************\ +* Returns the active canvas. * +\***************************************************************************/ +static void cdlua_activecanvas(void) +{ + canvas_t *canvas_p; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("cdActiveCanvas: too many parameters!"); + + canvas_p = (canvas_t *) malloc(sizeof(canvas_t)); + if (!canvas_p) { + lua_pushnil(); + return; + } + + canvas_p->cd_canvas = cdActiveCanvas(); + + /* if the active canvas is NULL, return nil so that the user can compare */ + /* the result with nil */ + if (!canvas_p->cd_canvas) { + free(canvas_p); + lua_pushnil(); + } + else + lua_pushusertag((void *) canvas_p, canvas_tag); +} + +cdCanvas* cdlua_checkcanvas(int pos) +{ + lua_Object canvas; + canvas_t *canvas_p; + + canvas = lua_getparam(pos); + + if (canvas == LUA_NOOBJECT) + lua_error("cdlua_getcanvas: canvas parameter missing!"); + + if (lua_tag(canvas) != canvas_tag) + lua_error("cdlua_getcanvas: invalid canvas parameter!"); + + canvas_p = (canvas_t *) lua_getuserdata(canvas); + if (!canvas_p->cd_canvas) + lua_error("cdlua_getcanvas: attempt to get a killed canvas!"); + + return canvas_p->cd_canvas; +} + +cdCanvas* cdlua_getcanvas(void) +{ + return cdlua_checkcanvas(1); +} + +void cdlua_pushcanvas(cdCanvas* canvas) +{ + canvas_t *canvas_p = (canvas_t *) malloc(sizeof(canvas_t)); + canvas_p->cd_canvas = canvas; + lua_pushusertag((void *)canvas_p, canvas_tag); +} + +static void cdlua_savestate(void) +{ + state_t *state_p; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("cdSaveState: too many parameters!"); + + state_p = (state_t *) malloc(sizeof(state_t)); + if (!state_p) { + lua_pushnil(); + return; + } + + state_p->state = cdSaveState(); + + /* if the active canvas is NULL, return nil so that the user can compare */ + /* the result with nil */ + if (!state_p->state) { + free(state_p); + lua_pushnil(); + } + else + lua_pushusertag((void *) state_p, state_tag); +} + +static void cdlua_restorestate(void) +{ + lua_Object state; + state_t *state_p; + + state = lua_getparam(1); + if (state == LUA_NOOBJECT) + lua_error("cdRestoreState: state parameter missing!"); + if (lua_isnil(state)) + lua_error("cdRestoreState: attempt to restore a NIL state!"); + + if (lua_tag(state) != state_tag) + lua_error("cdRestoreState: invalid canvas parameter!"); + + state_p = (state_t *) lua_getuserdata(state); + if (!state_p->state) + lua_error("cdRestoreState: attempt to restore a killed canvas!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdRestoreState: too many parameters!"); + + cdRestoreState(state_p->state); +} + +static void cdlua_releasestate(void) +{ + lua_Object state; + state_t *state_p; + + state = lua_getparam(1); + if (state == LUA_NOOBJECT) + lua_error("cdReleaseState: state parameter missing!"); + if (lua_isnil(state)) + lua_error("cdReleaseState: attempt to release a NIL state!"); + + if (lua_tag(state) != state_tag) + lua_error("cdReleaseState: invalid canvas parameter!"); + + state_p = (state_t *) lua_getuserdata(state); + if (!state_p->state) + lua_error("cdReleaseState: attempt to release a killed canvas!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdReleaseState: too many parameters!"); + + cdReleaseState(state_p->state); + state_p->state = NULL; +} + +static void cdlua_LineStyleDashes(void) +{ + lua_Object dashes, count, value; + int *dashes_int, dashes_count, i; + + dashes = lua_getparam(1); + if (dashes == LUA_NOOBJECT) + lua_error("cdLineStyleDashes: dashes parameter missing!"); + if (lua_isnil(dashes)) + lua_error("cdLineStyleDashes: dashes parameter is nil!"); + if (!lua_istable(dashes)) + lua_error("cdLineStyleDashes: invalid dashes parameter!"); + + count = lua_getparam(2); + if (count == LUA_NOOBJECT) + lua_error("cdLineStyleDashes: count parameter missing!"); + if (lua_isnil(count)) + lua_error("cdLineStyleDashes: count parameter is nil!"); + if (!lua_isnumber(dashes)) + lua_error("cdLineStyleDashes: invalid count parameter!"); + + dashes_count = (int)lua_getnumber(count); + dashes_int = malloc(dashes_count*sizeof(int)); + + for (i=0; i < dashes_count; i++) + { + lua_pushobject(dashes); + lua_pushnumber(i+1); + value = lua_gettable(); + + if (!lua_isnumber(value)) + lua_error("cdLineStyleDashes: invalid dash!"); + + dashes_int[i] = (int)lua_getnumber(value); + } + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdLineStyleDashes: too many parameters!"); + + cdLineStyleDashes(dashes_int, dashes_count); + free(dashes_int); +} + +/***************************************************************************\ +* Frees a previously alocated canvas. * +\***************************************************************************/ +static void cdlua_killcanvas(void) +{ + lua_Object canvas; + canvas_t *canvas_p; + cdCanvas *current_canvas; + + canvas = lua_getparam(1); + + if (canvas == LUA_NOOBJECT) + lua_error("cdKillCanvas: canvas parameter missing!"); + + /* if the creation failed, canvas can be nil, in which case we */ + /* issue an error */ + if (lua_isnil(canvas)) + lua_error("cdKillCanvas: attempt to kill a NIL canvas!"); + + if (lua_tag(canvas) != canvas_tag) + lua_error("cdKillCanvas: invalid canvas parameter!"); + canvas_p = (canvas_t *) lua_getuserdata(canvas); + if (!canvas_p->cd_canvas) + lua_error("cdKillCanvas: attempt to kill a killed canvas!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdKillCanvas: too many parameters!"); + + /* find out about the currently active canvas */ + current_canvas = cdActiveCanvas(); + + /* this should never happen, unless the user did it on purpouse! */ + if (canvas_p->cd_canvas == void_canvas) + lua_error("cdKillCanvas: trying to kill the void canvas???"); + + /* if the user killed the currently active canvas, activate void canvas */ + if (canvas_p->cd_canvas == current_canvas) { + cdActivate(void_canvas); + } + + cdKillCanvas(canvas_p->cd_canvas); + canvas_p->cd_canvas = NULL; +} + +/***************************************************************************\ +* Creates a color as a color_tag usertag lua_Object. The color value is * +* placed in the (void *) value. Not beautiful, but works best. * +\***************************************************************************/ +static void cdlua_encodecolor(void) +{ + lua_Object red, green, blue; + float red_f, green_f, blue_f; + unsigned char red_i, green_i, blue_i; + long int color_i; + + red = lua_getparam(1); + green = lua_getparam(2); + blue = lua_getparam(3); + if (!(lua_isnumber(red) && lua_isnumber(green) && lua_isnumber(blue))) + lua_error("cdEncodeColor: invalid color component parameter!"); + red_f = (float) lua_getnumber(red); + green_f = (float) lua_getnumber(green); + blue_f = (float) lua_getnumber(blue); + if (red_f < 0 || red_f > 255 || green_f < 0 || + green_f > 255 || blue_f < 0 || blue_f > 255) + lua_error("cdEncodeColor: color components values should be in range [0, 255]!"); + red_i = (unsigned char) (red_f); + green_i = (unsigned char) (green_f); + blue_i = (unsigned char) (blue_f); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdEncodeColor: too many parameters!"); + + color_i = cdEncodeColor(red_i, green_i, blue_i); + lua_pushusertag((void *) color_i, color_tag); +} + +static void cdlua_encodealpha(void) +{ + lua_Object color, alpha; + float alpha_f; + unsigned char alpha_i; + long int color_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("cdEncodeAlpha: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + alpha = lua_getparam(2); + if (!lua_isnumber(alpha)) + lua_error("cdEncodeAlpha: invalid alpha parameter!"); + alpha_f = (float) lua_getnumber(alpha); + if (alpha_f < 0 || alpha_f > 255) + lua_error("cdEncodeAlpha: alpha components values should be in range [0, 255]!"); + alpha_i = (unsigned char) (alpha_f); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdEncodeAlpha: too many parameters!"); + + color_i = cdEncodeAlpha(color_i, alpha_i); + lua_pushusertag((void *) color_i, color_tag); +} + +/***************************************************************************\ +* Decodes a color previously created. * +\***************************************************************************/ +static void cdlua_decodecolor(void) +{ + lua_Object color; + long int color_i; + unsigned char red_i, green_i, blue_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("cdDecodeColor: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdDecodeColor: too many parameters!"); + + cdDecodeColor(color_i, &red_i, &green_i, &blue_i); + lua_pushnumber(red_i); + lua_pushnumber(green_i); + lua_pushnumber(blue_i); +} + +static void cdlua_decodealpha(void) +{ + lua_Object color; + long int color_i; + unsigned char alpha_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("cdDecodeAlpha: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdDecodeAlpha: too many parameters!"); + + alpha_i = cdDecodeAlpha(color_i); + lua_pushnumber(alpha_i); +} + +static void cdlua_alpha(void) +{ + lua_Object color; + long int color_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("cdRed: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdAlpha: too many parameters!"); + + lua_pushnumber(cdAlpha(color_i)); +} + +static void cdlua_red(void) +{ + lua_Object color; + long int color_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("cdRed: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdRed: too many parameters!"); + + lua_pushnumber(cdRed(color_i)); +} + +static void cdlua_blue(void) +{ + lua_Object color; + long int color_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("cdBlue: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdBlue: too many parameters!"); + + lua_pushnumber(cdBlue(color_i)); +} + +static void cdlua_green(void) +{ + lua_Object color; + long int color_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("cdGreen: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdGreen: too many parameters!"); + + lua_pushnumber(cdGreen(color_i)); +} + +static void cdlua_reserved(void) +{ + lua_Object color; + long int color_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("cdReserved: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdReserved: too many parameters!"); + + lua_pushnumber(cdReserved(color_i)); +} + +/***************************************************************************\ +* Creates a stipple as a stipple_tag usertag lua_Object. * +\***************************************************************************/ +static void cdlua_createstipple(void) +{ + lua_Object width, height; + long int width_i, height_i; + stipple_t *stipple_p; + + width = lua_getparam(1); + height = lua_getparam(2); + if (!(lua_isnumber(width) && lua_isnumber(height))) + lua_error("cdCreateStipple: invalid dimension parameters!"); + width_i = (long int) lua_getnumber(width); + height_i = (long int) lua_getnumber(height); + if (width_i < 1 || height_i < 1) + lua_error("cdCreateStipple: stipple dimensions should be positive integers!"); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdCreateStipple: too many parameters!"); + + stipple_p = (stipple_t *) malloc(sizeof(stipple_t)); + if (!stipple_p) { + lua_pushnil(); + return; + } + + stipple_p->size = width_i*height_i; + stipple_p->height = height_i; + stipple_p->width = width_i; + stipple_p->value = (unsigned char *) malloc(stipple_p->size); + if (!stipple_p->value) { + free(stipple_p); + lua_pushnil(); + return; + } + + memset(stipple_p->value, '\0', stipple_p->size); + lua_pushusertag((void *) stipple_p, stipple_tag); +} + +static void cdlua_getstipple(void) +{ + int width, height; + unsigned char * stipple; + stipple_t *stipple_p; + + stipple = cdGetStipple(&width, &height); + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("cdGetStipple: too many parameters!"); + + stipple_p = (stipple_t *) malloc(sizeof(stipple_t)); + if (!stipple_p) { + lua_pushnil(); + return; + } + + stipple_p->size = width*height; + stipple_p->height = height; + stipple_p->width = width; + stipple_p->value = (unsigned char *) malloc(stipple_p->size); + if (!stipple_p->value) { + free(stipple_p); + lua_pushnil(); + return; + } + + memcpy(stipple_p->value, stipple, stipple_p->size); + lua_pushusertag((void *) stipple_p, stipple_tag); +} + +/***************************************************************************\ +* Frees a previously allocated stipple. We don't free stipple_p to prevent * +* a problem if the user called killstipple twice with the same object. The * +* structure will be freed by a userdata "gc" fallback in LUA 3.0. * +\***************************************************************************/ +static void cdlua_killstipple(void) +{ + lua_Object stipple; + stipple_t *stipple_p; + + stipple = lua_getparam(1); + if (stipple == LUA_NOOBJECT) + lua_error("cdKillStipple: stipple parameter missing!"); + if (lua_isnil(stipple)) + lua_error("cdKillStipple: attempt to kill a NIL stipple!"); + if (lua_tag(stipple) != stipple_tag) + lua_error("cdKillStipple: invalid stipple parameter!"); + stipple_p = (stipple_t *) lua_getuserdata(stipple); + if (!stipple_p->value) + lua_error("cdKillStipple: attempt to kill a killed stipple!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdKillStipple: too many parameters!"); + + free(stipple_p->value); + stipple_p->value = NULL; +} + +/***************************************************************************\ +* Creates a pattern as a pattern_tag usertag lua_Object. A pattern can be * +* considered and treated as a color table. * +\***************************************************************************/ +static void cdlua_createpattern(void) +{ + lua_Object width, height; + long int width_i, height_i; + pattern_t *pattern_p; + + width = lua_getparam(1); + height = lua_getparam(2); + if (!(lua_isnumber(width) && lua_isnumber(height))) + lua_error("cdCreatePattern: invalid dimension parameters!"); + width_i = (long int) lua_getnumber(width); + height_i = (long int) lua_getnumber(height); + if (width_i < 1 || height_i < 1) + lua_error("cdCreatePattern: pattern dimensions should be positive integers!"); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdCreatePattern: too many parameters!"); + + pattern_p = (pattern_t *) malloc(sizeof(pattern_t)); + if (!pattern_p) { + lua_pushnil(); + return; + } + + pattern_p->size = width_i*height_i; + pattern_p->width = width_i; + pattern_p->height = height_i; + pattern_p->color = (long int *) malloc(pattern_p->size * sizeof(long int)); + if (!pattern_p->color) { + free(pattern_p); + lua_pushnil(); + return; + } + + memset(pattern_p->color, 255, pattern_p->size * sizeof(long int)); + lua_pushusertag((void *) pattern_p, pattern_tag); +} + +static void cdlua_getpattern(void) +{ + int width, height; + long int * pattern; + pattern_t *pattern_p; + + pattern = cdGetPattern(&width, &height); + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("cdGetPattern: too many parameters!"); + + pattern_p = (pattern_t *) malloc(sizeof(pattern_t)); + if (!pattern_p) { + lua_pushnil(); + return; + } + + pattern_p->size = width*height; + pattern_p->height = height; + pattern_p->width = width; + pattern_p->color = (long int *) malloc(pattern_p->size * sizeof(long int)); + if (!pattern_p->color) { + free(pattern_p); + lua_pushnil(); + return; + } + + memcpy(pattern_p->color, pattern, pattern_p->size * sizeof(long int)); + lua_pushusertag((void *) pattern_p, pattern_tag); +} + +/***************************************************************************\ +* Frees a previously allocated pattern. We don't free pattern_p to prevent * +* a problem if the user called killpattern twice with the same object. The * +* structure will be freed by a userdata "gc" fallback in LUA 3.0. * +\***************************************************************************/ +static void cdlua_killpattern(void) +{ + lua_Object pattern; + pattern_t *pattern_p; + + pattern = lua_getparam(1); + + if (pattern == LUA_NOOBJECT) + lua_error("cdKillPattern: pattern parameter missing!"); + if (lua_isnil(pattern)) + lua_error("cdKillPattern: attempt to kill a NIL pattern!"); + if (lua_tag(pattern) != pattern_tag) + lua_error("cdKillPattern: invalid pattern parameter!"); + pattern_p = (pattern_t *) lua_getuserdata(pattern); + if (!pattern_p->color) + lua_error("cdKillPattern: attempt to kill a killed pattern!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdKillPattern: too many parameters!"); + + free(pattern_p->color); + pattern_p->color = NULL; +} + +/***************************************************************************\ +* Creates a palette as a palette_tag usertag lua_Object. A palette can be * +* considered and treated as a color table. * +\***************************************************************************/ +static void cdlua_createpalette(void) +{ + lua_Object size; + long int size_i; + palette_t *palette_p; + + size = lua_getparam(1); + if (!(lua_isnumber(size))) + lua_error("cdCreatePalette: invalid size parameter!"); + size_i = (long int) lua_getnumber(size); + if (size_i < 1) + lua_error("cdCreatePalette: palette size should be a positive integer!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdCreatePalette: too many parameters!"); + + palette_p = (palette_t *) malloc(sizeof(palette_t)); + if (!palette_p) { + lua_pushnil(); + return; + } + + palette_p->size = size_i; + palette_p->color = (long int *) malloc(palette_p->size * sizeof(long int)); + if (!palette_p->color) { + free(palette_p); + lua_pushnil(); + return; + } + + memset(palette_p->color, 255, palette_p->size * sizeof(long int)); + lua_pushusertag((void *) palette_p, palette_tag); +} + +/***************************************************************************\ +* Frees a previously allocated palette. We don't free palette_p to prevent * +* a problem if the user called killpalette twice with the same object. The * +* structure will be freed by a userdata "gc" fallback in LUA 3.0. * +\***************************************************************************/ +static void cdlua_killpalette(void) +{ + lua_Object palette; + palette_t *palette_p; + + palette = lua_getparam(1); + if (palette == LUA_NOOBJECT) + lua_error("cdKillPalette: palette parameter missing!"); + if (lua_isnil(palette)) + lua_error("cdKillPalette: attempt to kill a NIL palette!"); + if (lua_tag(palette) != palette_tag) + lua_error("cdKillPalette: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p->color) + lua_error("cdKillPalette: attempt to kill a killed palette!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdKillPalette: too many parameters!"); + + free(palette_p->color); + palette_p->color = NULL; +} + +/***************************************************************************\ +* Image Extended Functions. * +\***************************************************************************/ + +static void cdlua_createbitmap(void) +{ + lua_Object width; + lua_Object height; + lua_Object type; + + long int width_i; + long int height_i; + int type_i; + bitmap_t *image_p; + + width = lua_getparam(1); + height = lua_getparam(2); + type = lua_getparam(3); + if (!(lua_isnumber(type) && lua_isnumber(width) && lua_isnumber(height))) + lua_error("cdCreateBitmap: invalid parameters!"); + width_i = (long int) lua_getnumber(width); + height_i = (long int) lua_getnumber(height); + type_i = (long int) lua_getnumber(type); + if (width_i < 1 || height_i < 1) + lua_error("cdCreateBitmap: imagemap dimensions should be positive integers!"); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdCreateBitmap: too many parameters!"); + + image_p = (bitmap_t *) malloc(sizeof(bitmap_t)); + if (!image_p) { + lua_pushnil(); + return; + } + + image_p->image = cdCreateBitmap(width_i, height_i, type_i); + if (!image_p->image) { + free(image_p); + lua_pushnil(); + } + else + lua_pushusertag((void *) image_p, bitmap_tag); +} + +static void cdlua_killbitmap(void) +{ + lua_Object image; + bitmap_t *image_p; + + image = lua_getparam(1); + if (image == LUA_NOOBJECT) + lua_error("cdKillBitmap: image parameter missing!"); + if (lua_isnil(image)) + lua_error("cdKillBitmap: attempt to kill a NIL image!"); + if (lua_tag(image) != bitmap_tag) + lua_error("cdKillBitmap: invalid image parameter!"); + image_p = (bitmap_t *) lua_getuserdata(image); + if (!image_p->image) + lua_error("cdKillBitmap: attempt to kill a killed image"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdKillBitmap: too many parameters!"); + + cdKillBitmap(image_p->image); + image_p->image = NULL; +} + +static void cdlua_getbitmap(void) +{ + lua_Object image; + lua_Object x; + lua_Object y; + + bitmap_t *image_p; + int x_i; + int y_i; + + image = lua_getparam(1); + if (image == LUA_NOOBJECT) + lua_error("cdGetBitmap: image parameter missing!"); + if (lua_isnil(image)) + lua_error("cdGetBitmap: attempt to get NIL image"); + if (lua_tag(image) != bitmap_tag) + lua_error("cdGetBitmap: invalid image parameter!"); + image_p = (bitmap_t *) lua_getuserdata(image); + if (!image_p->image) + lua_error("cdGetBitmap: attempt to get a killed image"); + + x = lua_getparam(2); + y = lua_getparam(3); + if (!(lua_isnumber(x) && lua_isnumber(y))) + lua_error("cdGetBitmap: invalid (x, y) parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdGetBitmap: too many parameters!"); + + cdGetBitmap(image_p->image, x_i, y_i); +} + +static void cdlua_putbitmap(void) +{ + lua_Object image; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + + bitmap_t *image_p; + int x_i; + int y_i; + int w_i; + int h_i; + + image = lua_getparam(1); + if (image == LUA_NOOBJECT) + lua_error("cdPutBitmap: image parameter missing!"); + if (lua_isnil(image)) + lua_error("cdPutBitmap: attempt to put a NIL image!"); + if (lua_tag(image) != bitmap_tag) + lua_error("cdPutBitmap: invalid image parameter!"); + image_p = (bitmap_t *) lua_getuserdata(image); + if (!image_p->image) + lua_error("cdPutBitmap: attempt to put a killed image!"); + + x = lua_getparam(2); + y = lua_getparam(3); + w = lua_getparam(4); + h = lua_getparam(5); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h))) + lua_error("cdPutBitmap: invalid (x, y) parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + w_i = (int) lua_getnumber(w); + h_i = (int) lua_getnumber(h); + if (w_i < 0 || h_i < 0) + lua_error("cdPutBitmap: target region dimensions should be positive integers!"); + + if (lua_getparam(6) != LUA_NOOBJECT) + lua_error("cdPutBitmap: too many parameters!"); + + cdPutBitmap(image_p->image, x_i, y_i, w_i, h_i); +} + +static void wdlua_putbitmap(void) +{ + lua_Object image; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + + bitmap_t *image_p; + double x_i; + double y_i; + double w_i; + double h_i; + + image = lua_getparam(1); + if (image == LUA_NOOBJECT) + lua_error("wdPutBitmap: image parameter missing!"); + if (lua_isnil(image)) + lua_error("wdPutBitmap: attempt to put a NIL image!"); + if (lua_tag(image) != bitmap_tag) + lua_error("wdPutBitmap: invalid image parameter!"); + image_p = (bitmap_t *) lua_getuserdata(image); + if (!image_p->image) + lua_error("wdPutBitmap: attempt to put a killed image!"); + + x = lua_getparam(2); + y = lua_getparam(3); + w = lua_getparam(4); + h = lua_getparam(5); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h))) + lua_error("wdPutBitmap: invalid (x, y) parameter!"); + x_i = (double) lua_getnumber(x); + y_i = (double) lua_getnumber(y); + w_i = (double) lua_getnumber(w); + h_i = (double) lua_getnumber(h); + if (w_i < 0 || h_i < 0) + lua_error("wdPutBitmap: target region dimensions should be positive integers!"); + + if (lua_getparam(6) != LUA_NOOBJECT) + lua_error("wdPutBitmap: too many parameters!"); + + wdPutBitmap(image_p->image, x_i, y_i, w_i, h_i); +} + +static void cdlua_bitmapsetrect(void) +{ + lua_Object image; + lua_Object xmin; + lua_Object xmax; + lua_Object ymin; + lua_Object ymax; + + bitmap_t *image_p; + int xmin_i; + int xmax_i; + int ymin_i; + int ymax_i; + + image = lua_getparam(1); + if (image == LUA_NOOBJECT) + lua_error("cdBitmapSetRect: image parameter missing!"); + if (lua_isnil(image)) + lua_error("cdBitmapSetRect: attempt to get a NIL image!"); + if (lua_tag(image) != bitmap_tag) + lua_error("cdBitmapSetRect: invalid image parameter!"); + image_p = (bitmap_t *) lua_getuserdata(image); + if (!image_p->image) + lua_error("cdBitmapSetRect: attempt to get a killed image!"); + + xmin = lua_getparam(2); + xmax = lua_getparam(3); + ymin = lua_getparam(4); + ymax = lua_getparam(5); + if (!(lua_isnumber(xmin) && lua_isnumber(xmax) && + lua_isnumber(ymin) && lua_isnumber(ymax))) + lua_error("cdBitmapSetRect: invalid parameter!"); + xmin_i = (int) lua_getnumber(xmin); + xmax_i = (int) lua_getnumber(xmax); + ymin_i = (int) lua_getnumber(ymin); + ymax_i = (int) lua_getnumber(ymax); + + if (lua_getparam(6) != LUA_NOOBJECT) + lua_error("cdBitmapSetRect: too many parameters!"); + + cdBitmapSetRect(image_p->image, xmin_i, xmax_i, ymin_i, ymax_i); +} + +static void cdlua_rgb2mapex(void) +{ + lua_Object imagemap; + lua_Object imagergb; + + bitmap_t *imagemap_p; + bitmap_t *imagergb_p; + + imagergb = lua_getparam(1); + if (lua_isnil(imagergb)) + lua_error("cdBitmapRGB2Map: attempt to put a NIL imagergb!"); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("cdBitmapRGB2Map: invalid imagergb parameter!"); + imagergb_p = (bitmap_t *) lua_getuserdata(imagergb); + if (!(imagergb_p->image)) + lua_error("cdBitmapRGB2Map: attempt to put a killed imagergb!"); + + imagemap = lua_getparam(2); + if (lua_isnil(imagemap)) + lua_error("cdBitmapRGB2Map: attempt to put a NIL imagemap!"); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("cdBitmapRGB2Map: imagemap invalid parameter!"); + imagemap_p = (bitmap_t *) lua_getuserdata(imagemap); + if (!imagemap_p->image) + lua_error("cdBitmapRGB2Map: attempt to put a killed imagemap!"); + + if (imagergb_p->image->type != CD_RGB || imagemap_p->image->type <= 0) + lua_error("cdBitmapRGB2Map: invalid image type!"); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdBitmapRGB2Map: too many parameters!"); + + cdBitmapRGB2Map(imagergb_p->image, imagemap_p->image); +} + +/***************************************************************************\ +* Creates a buffer for a RGB image. * +\***************************************************************************/ +static void cdlua_createimagergb(void) +{ + lua_Object width, height; + long int width_i, height_i; + imagergb_t *imagergb_p; + + width = lua_getparam(1); + height = lua_getparam(2); + if (!(lua_isnumber(width) && lua_isnumber(height))) + lua_error("cdCreateImageRGB: invalid imagergb parameter!"); + width_i = (long int) lua_getnumber(width); + height_i = (long int) lua_getnumber(height); + if (width_i < 1 || height_i < 1) + lua_error("cdCreateImageRGB: image dimensions should be positive integers!"); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdCreateImageRGB: too many parameters!"); + + imagergb_p = (imagergb_t *) malloc(sizeof(imagergb_t)); + if (!imagergb_p) { + lua_pushnil(); + return; + } + + imagergb_p->width = width_i; + imagergb_p->height = height_i; + imagergb_p->size = width_i*height_i; + imagergb_p->red = (unsigned char *) malloc(imagergb_p->size); + imagergb_p->green = (unsigned char *) malloc(imagergb_p->size); + imagergb_p->blue = (unsigned char *) malloc(imagergb_p->size); + + if (!(imagergb_p->red && imagergb_p->green && imagergb_p->blue)) { + if (imagergb_p->red) free(imagergb_p->red); + if (imagergb_p->green) free(imagergb_p->green); + if (imagergb_p->blue) free(imagergb_p->blue); + free(imagergb_p); + lua_pushnil(); + return; + } + + memset(imagergb_p->red, 255, imagergb_p->size); + memset(imagergb_p->green, 255, imagergb_p->size); + memset(imagergb_p->blue, 255, imagergb_p->size); + + lua_pushusertag((void *) imagergb_p, imagergb_tag); +} + +static void cdlua_imagergb(void) +{ + lua_Object canvas; + canvas_t *canvas_p; + cdCanvas *current_canvas; + int w, h, type = CD_RGB; + + canvas = lua_getparam(1); + + /* if the creation failed, canvas can be nil, in which case we */ + /* issue an error */ + if (lua_isnil(canvas)) + lua_error("cdImageRGB: attempt to get a NIL canvas!"); + + if (lua_tag(canvas) != canvas_tag) + lua_error("cdImageRGB: invalid canvas parameter!"); + canvas_p = (canvas_t *) lua_getuserdata(canvas); + if (!canvas_p->cd_canvas) + lua_error("cdImageRGB: attempt to get a killed canvas!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdImageRGB: too many parameters!"); + + if (cdAlphaImage(canvas_p->cd_canvas)) + type = CD_RGBA; + + current_canvas = cdActiveCanvas(); + cdActivate(canvas_p->cd_canvas); + cdGetCanvasSize(&w, &h, NULL, NULL); + cdActivate(current_canvas); + + if (type == CD_RGBA) + { + imagergba_t *imagergba_p = (imagergba_t *) malloc(sizeof(imagergba_t)); + if (!imagergba_p) { + lua_pushnil(); + return; + } + + imagergba_p->width = w; + imagergba_p->height = h; + imagergba_p->size = w*h; + imagergba_p->red = cdRedImage(canvas_p->cd_canvas); + imagergba_p->green = cdGreenImage(canvas_p->cd_canvas); + imagergba_p->blue = cdBlueImage(canvas_p->cd_canvas); + imagergba_p->blue = cdAlphaImage(canvas_p->cd_canvas); + + lua_pushusertag((void *) imagergba_p, imagergba_tag); + } + else + { + imagergb_t * imagergb_p = (imagergb_t *) malloc(sizeof(imagergb_t)); + if (!imagergb_p) { + lua_pushnil(); + return; + } + + imagergb_p->width = w; + imagergb_p->height = h; + imagergb_p->size = w*h; + imagergb_p->red = cdRedImage(canvas_p->cd_canvas); + imagergb_p->green = cdGreenImage(canvas_p->cd_canvas); + imagergb_p->blue = cdBlueImage(canvas_p->cd_canvas); + + lua_pushusertag((void *) imagergb_p, imagergb_tag); + } +} + +static void cdlua_imagergbbitmap(void) +{ + lua_Object canvas; + canvas_t *canvas_p; + cdCanvas *current_canvas; + bitmap_t *image_p; + int w, h, type = CD_RGB; + + canvas = lua_getparam(1); + + /* if the creation failed, canvas can be nil, in which case we */ + /* issue an error */ + if (lua_isnil(canvas)) + lua_error("cdImageRGBBitmap: attempt to get a NIL canvas!"); + + if (lua_tag(canvas) != canvas_tag) + lua_error("cdImageRGBBitmap: invalid canvas parameter!"); + canvas_p = (canvas_t *) lua_getuserdata(canvas); + if (!canvas_p->cd_canvas) + lua_error("cdImageRGBBitmap: attempt to get a killed canvas!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdImageRGBBitmap: too many parameters!"); + + if (cdAlphaImage(canvas_p->cd_canvas)) + type = CD_RGBA; + + current_canvas = cdActiveCanvas(); + cdActivate(canvas_p->cd_canvas); + cdGetCanvasSize(&w, &h, NULL, NULL); + cdActivate(current_canvas); + + image_p = (bitmap_t *) malloc(sizeof(bitmap_t)); + if (!image_p) { + lua_pushnil(); + return; + } + + image_p->image = cdInitBitmap(w, h, type, + cdRedImage(canvas_p->cd_canvas), + cdGreenImage(canvas_p->cd_canvas), + cdBlueImage(canvas_p->cd_canvas), + cdAlphaImage(canvas_p->cd_canvas)); + + lua_pushusertag((void *)image_p, bitmap_tag); +} + +/***************************************************************************\ +* Frees a previously allocated imagergb. We don't free imagergb_p to avoid * +* problems if the user called killimagergb twice with the same object. The * +* structure will be freed by a userdata "gc" fallback in LUA 3.0. * +\***************************************************************************/ +static void cdlua_killimagergb(void) +{ + lua_Object imagergb; + imagergb_t *imagergb_p; + + imagergb = lua_getparam(1); + if (lua_isnil(imagergb)) + lua_error("cdKillImageRGB: attempt to kill a NIL imagergb!"); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("cdKillImageRGB: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!(imagergb_p->red && imagergb_p->green && imagergb_p->blue)) + lua_error("cdKillImageRGB: attempt to kill a killed imagergb!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdKillImageRGB: too many parameters!"); + + free(imagergb_p->red); + free(imagergb_p->green); + free(imagergb_p->blue); + imagergb_p->red = NULL; + imagergb_p->green = NULL; + imagergb_p->blue = NULL; +} + +/***************************************************************************\ +* Creates a buffer for a RGBA image. * +\***************************************************************************/ +static void cdlua_createimagergba(void) +{ + lua_Object width, height; + long int width_i, height_i; + imagergba_t *imagergba_p; + + width = lua_getparam(1); + height = lua_getparam(2); + if (!(lua_isnumber(width) && lua_isnumber(height))) + lua_error("cdCreateImageRGBA: invalid imagergba parameter!"); + width_i = (long int) lua_getnumber(width); + height_i = (long int) lua_getnumber(height); + if (width_i < 1 || height_i < 1) + lua_error("cdCreateImageRGBA: image dimensions should be positive integers!"); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdCreateImageRGBA: too many parameters!"); + + imagergba_p = (imagergba_t *) malloc(sizeof(imagergba_t)); + if (!imagergba_p) { + lua_pushnil(); + return; + } + + imagergba_p->width = width_i; + imagergba_p->height = height_i; + imagergba_p->size = width_i*height_i; + imagergba_p->red = (unsigned char *) malloc(imagergba_p->size); + imagergba_p->green = (unsigned char *) malloc(imagergba_p->size); + imagergba_p->blue = (unsigned char *) malloc(imagergba_p->size); + imagergba_p->alpha = (unsigned char *) malloc(imagergba_p->size); + + if (!(imagergba_p->red && imagergba_p->green && imagergba_p->blue && imagergba_p->alpha)) { + if (imagergba_p->red) free(imagergba_p->red); + if (imagergba_p->green) free(imagergba_p->green); + if (imagergba_p->blue) free(imagergba_p->blue); + if (imagergba_p->alpha) free(imagergba_p->alpha); + free(imagergba_p); + lua_pushnil(); + return; + } + + memset(imagergba_p->red, 255, imagergba_p->size); + memset(imagergba_p->green, 255, imagergba_p->size); + memset(imagergba_p->blue, 255, imagergba_p->size); + memset(imagergba_p->alpha, 255, imagergba_p->size); + + lua_pushusertag((void *) imagergba_p, imagergba_tag); +} + +/***************************************************************************\ +* Frees a previously allocated imagergba. Don't free imagergba_p to avoid * +* problems if the user called killimagergba twice with the same object. The * +* structure will be freed by a userdata "gc" fallback in LUA 3.0. * +\***************************************************************************/ +static void cdlua_killimagergba(void) +{ + lua_Object imagergba; + imagergba_t *imagergba_p; + + imagergba = lua_getparam(1); + if (lua_isnil(imagergba)) + lua_error("cdKillImageRGBA: attempt to kill a NIL imagergba!"); + if (lua_tag(imagergba) != imagergba_tag) + lua_error("cdKillImageRGBA: invalid imagergba parameter!"); + imagergba_p = (imagergba_t *) lua_getuserdata(imagergba); + if (!(imagergba_p->red && imagergba_p->green && imagergba_p->blue && imagergba_p->alpha)) + lua_error("cdKillImageRGBA: attempt to kill a killed imagergba!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdKillImageRGBA: too many parameters!"); + + free(imagergba_p->red); + free(imagergba_p->green); + free(imagergba_p->blue); + free(imagergba_p->alpha); + imagergba_p->red = NULL; + imagergba_p->green = NULL; + imagergba_p->blue = NULL; + imagergba_p->alpha = NULL; +} + +/***************************************************************************\ +* Creates a imagemap as a imagemap_tag usertag lua_Object. * +\***************************************************************************/ +static void cdlua_createimagemap(void) +{ + lua_Object width; + lua_Object height; + + long int width_i; + long int height_i; + imagemap_t *imagemap_p; + + width = lua_getparam(1); + height = lua_getparam(2); + if (!(lua_isnumber(width) && lua_isnumber(height))) + lua_error("cdCreateImageMap: invalid imagemap parameter!"); + width_i = (long int) lua_getnumber(width); + height_i = (long int) lua_getnumber(height); + if (width_i < 1 || height_i < 1) + lua_error("cdCreateImageMap: imagemap dimensions should be positive integers!"); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdCreateImageMap: too many parameters!"); + + imagemap_p = (imagemap_t *) malloc(sizeof(imagemap_t)); + if (!imagemap_p) { + lua_pushnil(); + return; + } + + imagemap_p->size = width_i*height_i; + imagemap_p->width = width_i; + imagemap_p->height = height_i; + imagemap_p->index = (unsigned char *) malloc(imagemap_p->size); + if (!imagemap_p->index) { + free(imagemap_p); + lua_pushnil(); + return; + } + + memset(imagemap_p->index, 0, imagemap_p->size); + lua_pushusertag((void *) imagemap_p, imagemap_tag); +} + +/***************************************************************************\ +* Frees a previously allocated imagemap. We don't free imagemap_p to avoid * +* problems if the user called killimagemap twice with the same object. The * +* structure will be freed by a userdata "gc" fallback in LUA 3.0. * +\***************************************************************************/ +static void cdlua_killimagemap(void) +{ + lua_Object imagemap; + imagemap_t *imagemap_p; + + imagemap = lua_getparam(1); + if (lua_isnil(imagemap)) + lua_error("cdKillImageMap: attempt to kill a NIL imagemap!"); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("cdKillImageMap: invalid imagemap parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p->index) + lua_error("cdKillImageMap: attempt to kill a killed imagemap!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdKillImageMap: too many parameters!"); + + free(imagemap_p->index); + imagemap_p->index = NULL; +} + +/***************************************************************************\ +* Creates an image as a image_tag usertag lua_Object. * +\***************************************************************************/ +static void cdlua_createimage(void) +{ + lua_Object width; + lua_Object height; + + long int width_i; + long int height_i; + image_t *image_p; + + width = lua_getparam(1); + height = lua_getparam(2); + if (!(lua_isnumber(width) && lua_isnumber(height))) + lua_error("cdCreateImage: invalid dimension parameters!"); + width_i = (long int) lua_getnumber(width); + height_i = (long int) lua_getnumber(height); + if (width_i < 1 || height_i < 1) + lua_error("cdCreateImage: imagemap dimensions should be positive integers!"); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdCreateImage: too many parameters!"); + + image_p = (image_t *) malloc(sizeof(image_t)); + if (!image_p) { + lua_pushnil(); + return; + } + + image_p->cd_image = cdCreateImage(width_i, height_i); + if (!image_p->cd_image) { + free(image_p); + lua_pushnil(); + } + else + lua_pushusertag((void *) image_p, image_tag); +} + +/***************************************************************************\ +* Frees a previously allocated image. * +\***************************************************************************/ +static void cdlua_killimage(void) +{ + lua_Object image; + image_t *image_p; + + image = lua_getparam(1); + if (lua_isnil(image)) + lua_error("cdKillImage: attempt to kill a NIL image!"); + if (lua_tag(image) != image_tag) + lua_error("cdKillImage: invalid image parameter!"); + image_p = (image_t *) lua_getuserdata(image); + if (!image_p->cd_image) + lua_error("cdKillImage: attempt to kill a killed image"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdKillImage: too many parameters!"); + + cdKillImage(image_p->cd_image); + image_p->cd_image = NULL; +} + +/***************************************************************************\ +* Fallback definitions. * +\***************************************************************************/ +/***************************************************************************\ +* stipple "settable" fallback. * +\***************************************************************************/ +static void stipplesettable_fb(void) +{ + lua_Object stipple, index, value; + + stipple_t *stipple_p; + long int index_i; + unsigned char value_i; + + stipple = lua_getparam(1); + index = lua_getparam(2); + value = lua_getparam(3); + + stipple_p = (stipple_t *) lua_getuserdata(stipple); + if (!stipple_p) { + lua_error("stipple_tag \"settable\": invalid stipple_tag object!"); + } + + if (!lua_isnumber(index)) { + lua_error("stipple_tag \"settable\": index should be a number!"); + } + + if (!lua_isnumber(value)) { + lua_error("stipple_tag \"settable\": value should be a number!"); + } + + value_i = (unsigned char) lua_getnumber(value); + if ((value_i != 0 && value_i != 1)) + lua_error("stipple_tag \"settable\": value should belong to {0, 1}!"); + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= stipple_p->size) + lua_error("stipple_tag \"settable\": index is out of bounds!"); + + stipple_p->value[index_i] = value_i; +} + +/***************************************************************************\ +* imagemap "settable" fallback. * +\***************************************************************************/ +static void imagemapsettable_fb(void) +{ + lua_Object imagemap, index, value; + + imagemap_t *imagemap_p; + long int index_i; + long int value_i; + + imagemap = lua_getparam(1); + index = lua_getparam(2); + value = lua_getparam(3); + + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p) { + lua_error("imagemap_tag \"settable\": invalid imagemap_tag object!"); + } + + if (!lua_isnumber(index)) { + lua_error("imagemap_tag \"settable\": index should be a number!"); + } + + if (!lua_isnumber(value)) { + lua_error("imagemap_tag \"settable\": value should be a number!"); + } + + value_i = (long int) lua_getnumber(value); + if ((value_i < 0 || value_i > 255)) + lua_error("imagemap_tag \"settable\": value should be in range [0, 255]!"); + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= imagemap_p->size) + lua_error("imagemap_tag \"settable\": index is out of bounds!"); + + imagemap_p->index[index_i] = (unsigned char) value_i; +} + +/***************************************************************************\ +* pattern "settable" fallback. * +\***************************************************************************/ +static void patternsettable_fb(void) +{ + lua_Object pattern, index, color; + + pattern_t *pattern_p; + long int index_i; + long int color_i; + + pattern = lua_getparam(1); + index = lua_getparam(2); + color = lua_getparam(3); + + pattern_p = (pattern_t *) lua_getuserdata(pattern); + if (!pattern_p) { + lua_error("pattern_tag \"settable\": invalid pattern_tag object!"); + } + + if (!lua_isnumber(index)) { + lua_error("pattern_tag \"settable\": index should be a number!"); + } + + if (lua_tag(color) != color_tag) + lua_error("pattern_tag \"settable\": value should be of type color_tag!"); + + color_i = (long int) lua_getuserdata(color); + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= pattern_p->size) + lua_error("pattern_tag \"settable\": index is out of bounds!"); + + pattern_p->color[index_i] = color_i; +} + +/***************************************************************************\ +* palette "settable" fallback. * +\***************************************************************************/ +static void palettesettable_fb(void) +{ + lua_Object palette, index, color; + + palette_t *palette_p; + long int index_i; + long int color_i; + + palette = lua_getparam(1); + index = lua_getparam(2); + color = lua_getparam(3); + + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p) { + lua_error("palette_tag \"settable\": invalid palette_tag object!"); + } + + if (!lua_isnumber(index)) { + lua_error("palette_tag \"settable\": index should be a number!"); + } + + if (lua_tag(color) != color_tag) + lua_error("palette_tag \"settable\": value should be of type color_tag!"); + + color_i = (long int) lua_getuserdata(color); + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= palette_p->size) + lua_error("palette_tag \"settable\": index is out of bounds!"); + + palette_p->color[index_i] = color_i; +} + +/***************************************************************************\ +* channel "settable" fallback. This fallback is called when a LUA line like * +* "imagergb.r[y*w + x] = c" is executed. The imagergb "gettable" fallback * +* fills and returns a channel structure with info about the buffer. This * +* structure is consulted and the value is assigned where it should. * +\***************************************************************************/ +static void channelsettable_fb(void) +{ + lua_Object channel, index, value; + + channel_t *channel_p; + long int index_i; + long int value_i; + + channel = lua_getparam(1); + index = lua_getparam(2); + value = lua_getparam(3); + + channel_p = (channel_t *) lua_getuserdata(channel); + if (!channel_p) { + lua_error("channel_tag \"settable\": invalid channel_tag object!"); + } + + if (!lua_isnumber(index)) { + lua_error("channel_tag \"settable\": index should be a number!"); + } + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || (channel_p->size > 0 && index_i >= channel_p->size) || + (channel_p->size == -1 && index_i >= 256)) { + lua_error("channel_tag \"settable\": index is out of bounds!"); + } + + if (channel_p->size > 0) + { + if (!lua_isnumber(value)) { + lua_error("channel_tag \"settable\": value should be a number!"); + } + + value_i = (long int) lua_getnumber(value); + if ((value_i < 0 || value_i > 255)) { + lua_error("channel_tag \"settable\": value should be in range [0, 255]!"); + } + + channel_p->value[index_i] = (unsigned char) value_i; + } + else + { + if (lua_tag(value) != color_tag) + lua_error("channel_tag \"settable\": value should be of type color_tag!"); + + value_i = (long int) lua_getuserdata(value); + + ((long int*)channel_p->value)[index_i] = value_i; + } +} + +/***************************************************************************\ +* stipple "gettable" fallback. * +\***************************************************************************/ +static void stipplegettable_fb(void) +{ + lua_Object stipple, index; + + stipple_t *stipple_p; + long int index_i; + + stipple = lua_getparam(1); + index = lua_getparam(2); + + stipple_p = (stipple_t *) lua_getuserdata(stipple); + if (!stipple_p) + lua_error("stipple_tag \"gettable\": invalid stipple_tag object!"); + + if (!lua_isnumber(index)) { + lua_error("stipple_tag \"gettable\": index should be a number!"); + } + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= stipple_p->size) + lua_error("stipple_tag \"gettable\": index is out of bounds!"); + + lua_pushnumber(stipple_p->value[index_i]); +} + +/***************************************************************************\ +* imagemap "gettable" fallback. * +\***************************************************************************/ +static void imagemapgettable_fb(void) +{ + lua_Object imagemap, index; + + imagemap_t *imagemap_p; + long int index_i; + + imagemap = lua_getparam(1); + index = lua_getparam(2); + + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p) + lua_error("imagemap_tag \"gettable\": invalid imagemap_tag object!"); + + if (!lua_isnumber(index)) { + lua_error("imagemap_tag \"gettable\": index should be a number!"); + } + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= imagemap_p->size) + lua_error("imagemap_tag \"gettable\": index is out of bounds!"); + + lua_pushnumber(imagemap_p->index[index_i]); +} + +/***************************************************************************\ +* pattern "gettable" fallback. * +\***************************************************************************/ +static void patterngettable_fb(void) +{ + lua_Object pattern, index; + + pattern_t *pattern_p; + long int index_i; + + pattern = lua_getparam(1); + index = lua_getparam(2); + + pattern_p = (pattern_t *) lua_getuserdata(pattern); + if (!pattern_p) + lua_error("pattern_tag \"gettable\": invalid pattern_tag object!"); + + if (!lua_isnumber(index)) { + lua_error("pattern_tag \"gettable\": index should be a number!"); + } + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= pattern_p->size) + lua_error("pattern_tag \"gettable\": index is out of bounds!"); + + lua_pushusertag((void *) pattern_p->color[index_i], color_tag); +} + +/***************************************************************************\ +* palette "gettable" fallback. * +\***************************************************************************/ +static void palettegettable_fb(void) +{ + lua_Object palette, index; + + palette_t *palette_p; + long int index_i; + + palette = lua_getparam(1); + index = lua_getparam(2); + + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p) + lua_error("palette_tag \"gettable\": invalid palette_tag object!"); + + if (!lua_isnumber(index)) { + lua_error("palette_tag \"gettable\": index should be a number!"); + } + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= palette_p->size) + lua_error("palette_tag \"gettable\": index is out of bounds!"); + + lua_pushusertag((void *) palette_p->color[index_i], color_tag); +} + +/***************************************************************************\ +* channel "gettable" fallback. This fallback is called when a LUA line like * +* "c = imagergb.r[y*w + x]" is executed. The imagergb "gettable" fallback * +* fills and returns a channel structure with info about the buffer. This * +* structure is consulted and the appropriate value is returned. * +\***************************************************************************/ +static void channelgettable_fb(void) +{ + lua_Object channel, index; + + channel_t *channel_p; + long int index_i; + + channel = lua_getparam(1); + index = lua_getparam(2); + + channel_p = (channel_t *) lua_getuserdata(channel); + if (!channel_p) { + lua_error("channel_tag \"gettable\": invalid channel_tag object!"); + } + + if (!lua_isnumber(index)) { + lua_error("channel_tag \"gettable\": index should be a number!"); + } + + index_i = (long int) lua_getnumber(index); + + if (index_i < 0 || (channel_p->size > 0 && index_i >= channel_p->size) || + (channel_p->size == -1 && index_i >= 256)) { + lua_error("channel_tag \"gettable\": index is out of bounds!"); + } + + if (channel_p->size == -1) + lua_pushusertag((void *) ((long int*)channel_p->value)[index_i], color_tag); + else + lua_pushnumber(channel_p->value[index_i]); +} + +/***************************************************************************\ +* imagergb "gettable" fallback. This fallback is called when a LUA line * +* like "c = imagergb.r[y*w + x]" or "imagergb.r[y*w + x] = c" is executed. * +* The channel_info global is filled and its address is returned with a * +* channel_tag usertag lua_Object. The following "gettable" or "settable" * +* then assigns or returns the appropriate value. * +\***************************************************************************/ +static void imagergbgettable_fb(void) +{ + lua_Object imagergb, index; + + char *index_s; + imagergb_t *imagergb_p; + + imagergb = lua_getparam(1); + index = lua_getparam(2); + + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!imagergb_p) + lua_error("imagergb_tag \"gettable\": invalid imagergb_tag object!"); + + if (!lua_isstring(index)) { + lua_error("imagergb_tag \"gettable\": index should be a channel name!"); + } + index_s = (char *) lua_getstring(index); + + channel_info.size = imagergb_p->size; + + if (*index_s == 'r' || *index_s == 'R') { + channel_info.value = imagergb_p->red; + } + else if (*index_s == 'g' || *index_s == 'G') { + channel_info.value = imagergb_p->green; + } + else if (*index_s == 'b' || *index_s == 'B') { + channel_info.value = imagergb_p->blue; + } + else { + lua_error("imagergb_tag \"gettable\": index is an invalid channel name!"); + } + + lua_pushusertag((void *) &channel_info, channel_tag); +} + +/***************************************************************************\ +* imagergba "gettable" fallback. This fallback is called when a LUA line * +* like "c = imagergba.r[y*w + x]" or "imagergba.r[y*w + x] = c" is executed.* +* The channel_info global is filled and its address is returned with a * +* channel_tag usertag lua_Object. The following "gettable" or "settable" * +* then assigns or returns the appropriate value. * +\***************************************************************************/ +static void imagergbagettable_fb(void) +{ + lua_Object imagergba, index; + + char *index_s; + imagergba_t *imagergba_p; + + imagergba = lua_getparam(1); + index = lua_getparam(2); + + imagergba_p = (imagergba_t *) lua_getuserdata(imagergba); + if (!imagergba_p) + lua_error("imagergba_tag \"gettable\": invalid imagergba_tag object!"); + + if (!lua_isstring(index)) { + lua_error("imagergba_tag \"gettable\": index should be a channel name!"); + } + index_s = (char *) lua_getstring(index); + + channel_info.size = imagergba_p->size; + + if (*index_s == 'r' || *index_s == 'R') { + channel_info.value = imagergba_p->red; + } + else if (*index_s == 'g' || *index_s == 'G') { + channel_info.value = imagergba_p->green; + } + else if (*index_s == 'b' || *index_s == 'B') { + channel_info.value = imagergba_p->blue; + } + else if (*index_s == 'a' || *index_s == 'A') { + channel_info.value = imagergba_p->alpha; + } + else { + lua_error("imagergba_tag \"gettable\": index is an invalid channel name!"); + } + + lua_pushusertag((void *) &channel_info, channel_tag); +} + +/***************************************************************************\ +* bitmap "gettable" fallback. This fallback is called when a LUA line * +* like "c = bitmap.r[y*w + x]" or "bitmap.r[y*w + x] = c" is executed.* +* The channel_info global is filled and its address is returned with a * +* channel_tag usertag lua_Object. The following "gettable" or "settable" * +* then assigns or returns the appropriate value. * +\***************************************************************************/ +static void bitmapgettable_fb(void) +{ + lua_Object image, index; + + char *index_s; + bitmap_t *image_p; + + image = lua_getparam(1); + index = lua_getparam(2); + + image_p = (bitmap_t *) lua_getuserdata(image); + if (!image_p) + lua_error("bitmap_tag \"gettable\": invalid bitmap_tag object!"); + + if (!lua_isstring(index)) { + lua_error("bitmap_tag \"gettable\": index should be a channel name!"); + } + index_s = (char *) lua_getstring(index); + + channel_info.size = image_p->image->w * image_p->image->h; + + if (*index_s == 'r' || *index_s == 'R') { + channel_info.value = cdBitmapGetData(image_p->image, CD_IRED); + } + else if (*index_s == 'g' || *index_s == 'G') { + channel_info.value = cdBitmapGetData(image_p->image, CD_IGREEN); + } + else if (*index_s == 'b' || *index_s == 'B') { + channel_info.value = cdBitmapGetData(image_p->image, CD_IBLUE); + } + else if (*index_s == 'a' || *index_s == 'A') { + channel_info.value = cdBitmapGetData(image_p->image, CD_IALPHA); + } + else if (*index_s == 'i' || *index_s == 'I') { + channel_info.value = cdBitmapGetData(image_p->image, CD_INDEX); + } + else if (*index_s == 'c' || *index_s == 'C') { + channel_info.value = cdBitmapGetData(image_p->image, CD_COLORS); + channel_info.size = -1; + } + else { + lua_error("imagergba_tag \"gettable\": index is an invalid channel name!"); + } + + lua_pushusertag((void *) &channel_info, channel_tag); +} + +static void stategc_fb(void) +{ + lua_Object state; + + state_t *state_p; + + state = lua_getparam(1); + state_p = (state_t *) lua_getuserdata(state); + if (!state_p) + lua_error("state_tag \"gc\": invalid state_tag object!"); + + if (state_p->state) cdReleaseState(state_p->state); + + /* free the state_t structure */ + free(state_p); +} + +/***************************************************************************\ +* stipple "gc" fallback. * +\***************************************************************************/ +static void stipplegc_fb(void) +{ + lua_Object stipple; + + stipple_t *stipple_p; + + stipple = lua_getparam(1); + stipple_p = (stipple_t *) lua_getuserdata(stipple); + if (!stipple_p) + lua_error("stipple_tag \"gc\": invalid stipple_tag object!"); + + /* if the stipple has not been killed, kill it */ + if (stipple_p->value) free(stipple_p->value); + + /* free the stipple_t structure */ + free(stipple_p); +} + +/***************************************************************************\ +* pattern "gc" fallback. * +\***************************************************************************/ +static void patterngc_fb(void) +{ + lua_Object pattern; + + pattern_t *pattern_p; + + pattern = lua_getparam(1); + pattern_p = (pattern_t *) lua_getuserdata(pattern); + if (!pattern_p) + lua_error("pattern_tag \"gc\": invalid pattern_tag object!"); + + /* if the pattern has not been killed, kill it */ + if (pattern_p->color) free(pattern_p->color); + + /* free the pattern_t structure */ + free(pattern_p); +} + +/***************************************************************************\ +* palette "gc" fallback. * +\***************************************************************************/ +static void palettegc_fb(void) +{ + lua_Object palette; + + palette_t *palette_p; + + palette = lua_getparam(1); + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p) + lua_error("palette_tag \"gc\": invalid palette_tag object!"); + + /* if the palette has not been killed, kill it */ + if (palette_p->color) free(palette_p->color); + + /* free the palette_t structure */ + free(palette_p); +} + +/***************************************************************************\ +* imagergb "gc" fallback. * +\***************************************************************************/ +static void imagergbgc_fb(void) +{ + lua_Object imagergb; + + imagergb_t *imagergb_p; + + imagergb = lua_getparam(1); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!imagergb_p) + lua_error("imagergb_tag \"gc\": invalid imagergb_tag object!"); + + /* if the imagergb has not been killed, kill it */ + if (imagergb_p->red) free(imagergb_p->red); + if (imagergb_p->green) free(imagergb_p->green); + if (imagergb_p->blue) free(imagergb_p->blue); + + /* free the imagergb_t structure */ + free(imagergb_p); +} + +/***************************************************************************\ +* imagergba "gc" fallback. * +\***************************************************************************/ +static void imagergbagc_fb(void) +{ + lua_Object imagergba; + + imagergba_t *imagergba_p; + + imagergba = lua_getparam(1); + imagergba_p = (imagergba_t *) lua_getuserdata(imagergba); + if (!imagergba_p) + lua_error("imagergba_tag \"gc\": invalid imagergba_tag object!"); + + /* if the imagergba has not been killed, kill it */ + if (imagergba_p->red) free(imagergba_p->red); + if (imagergba_p->green) free(imagergba_p->green); + if (imagergba_p->blue) free(imagergba_p->blue); + if (imagergba_p->alpha) free(imagergba_p->alpha); + + /* free the imagergba_t structure */ + free(imagergba_p); +} + +/***************************************************************************\ +* imagemap "gc" fallback. * +\***************************************************************************/ +static void imagemapgc_fb(void) +{ + lua_Object imagemap; + + imagemap_t *imagemap_p; + + imagemap = lua_getparam(1); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p) + lua_error("imagemap_tag \"gc\": invalid imagemap_tag object!"); + + /* if the imagemap has not been killed, kill it */ + if (imagemap_p->index) free(imagemap_p->index); + + /* free the imagemap_t structure */ + free(imagemap_p); +} + +/***************************************************************************\ +* bitmap "gc" fallback. * +\***************************************************************************/ +static void bitmapgc_fb(void) +{ + lua_Object bitmap; + + bitmap_t *bitmap_p; + + bitmap = lua_getparam(1); + bitmap_p = (bitmap_t *) lua_getuserdata(bitmap); + if (!bitmap_p) + lua_error("bitmap_tag \"gc\": invalid bitmap_tag object!"); + + /* if the bitmap has not been killed, kill it */ + if (bitmap_p->image) cdKillBitmap(bitmap_p->image); + + /* free the bitmap_t structure */ + free(bitmap_p); +} + +/***************************************************************************\ +* cdPixel. * +\***************************************************************************/ +static void cdlua_pixel (void) +{ + lua_Object x; + lua_Object y; + lua_Object color; + + int x_i; + int y_i; + long int color_i; + + x = lua_getparam(1); + y = lua_getparam(2); + if (!(lua_isnumber(x) && lua_isnumber(y))) + lua_error("cdPixel: pixel coordinates should be integers!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + + color = lua_getparam(3); + if (lua_tag(color) != color_tag) + lua_error("cdPixel: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdPixel: too many parameters!"); + + cdPixel(x_i, y_i, color_i); +} + +static void wdlua_pixel (void) +{ + lua_Object x; + lua_Object y; + lua_Object color; + + double x_i; + double y_i; + long int color_i; + + x = lua_getparam(1); + y = lua_getparam(2); + if (!(lua_isnumber(x) && lua_isnumber(y))) + lua_error("wdPixel: pixel coordinates should be numbers!"); + x_i = (double) lua_getnumber(x); + y_i = (double) lua_getnumber(y); + + color = lua_getparam(3); + if (lua_tag(color) != color_tag) + lua_error("cdPixel: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("wdPixel: too many parameters!"); + + wdPixel(x_i, y_i, color_i); +} + +/***************************************************************************\ +* cdGetCanvasSize. * +\***************************************************************************/ +static void cdlua_getcanvassize(void) +{ + int width; + int height; + double mm_width; + double mm_height; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("cdGetCanvasSize: too many parameters!"); + + cdGetCanvasSize(&width, &height, &mm_width, &mm_height); + lua_pushnumber(width); + lua_pushnumber(height); + lua_pushnumber(mm_width); + lua_pushnumber(mm_height); +} + +/***************************************************************************\ +* Register callback functions. * +\***************************************************************************/ +static void cdlua_registercallback(void) +{ + lua_Object driver, cb, func; + int driver_i, cb_i, func_lock; + cdContextLUA* luactx; + cdCallbackLUA* cdCB; + + driver = lua_getparam(1); + if (!lua_isnumber(driver)) + lua_error("cdRegisterCallback: invalid driver parameter!"); + driver_i = (int) lua_getnumber(driver); + + cb = lua_getparam(2); + if (!lua_isnumber(cb)) + lua_error("cdRegisterCallback: invalid cb parameter!"); + cb_i = (int) lua_getnumber(cb); + + func = lua_getparam(3); + if (lua_isnil(func)) + func_lock = -1; + else if (!lua_isfunction(func)) + { + lua_error("cdRegisterCallback: invalid func parameter!"); + return; + } + else { + lua_pushobject(func); + func_lock = lua_ref(1); + } + + if (driver_i >= cdlua_numdrivers) + lua_error("cdRegisterCallback: invalid driver parameter!"); + + luactx = cdlua_drivers[driver_i]; + + if (cb_i >= luactx->cb_n) + lua_error("cdRegisterCallback: invalid cb parameter!"); + + cdCB = &luactx->cb_list[cb_i]; + + if (cdCB->lock != -1) { + lua_unref(cdCB->lock); + cdCB->lock = func_lock; + if (func_lock == -1) { + cdRegisterCallback(luactx->ctx(), cb_i, NULL); + } + } + else { + if (func_lock != -1) { + cdRegisterCallback(luactx->ctx(), cb_i, (cdCallback)cdCB->func); + cdCB->lock = func_lock; + } + } +} + +/***************************************************************************\ +* cdPlay. * +\***************************************************************************/ +static void cdlua_play(void) +{ + lua_Object driver; + lua_Object xmin; + lua_Object xmax; + lua_Object ymin; + lua_Object ymax; + lua_Object data; + + int driver_i; + int xmin_i; + int xmax_i; + int ymin_i; + int ymax_i; + char *data_s; + + driver = lua_getparam(1); + if (!lua_isnumber(driver)) + lua_error("cdPlay: invalid driver parameter!"); + driver_i = (long int) lua_getnumber(driver); + + xmin = lua_getparam(2); + xmax = lua_getparam(3); + ymin = lua_getparam(4); + ymax = lua_getparam(5); + if (!(lua_isnumber(xmin) && lua_isnumber(xmax) && + lua_isnumber(ymin) && lua_isnumber(ymin))) + lua_error("cdPlay: invalid viewport!"); + xmin_i = (long int) lua_getnumber(xmin); + xmax_i = (long int) lua_getnumber(xmax); + ymin_i = (long int) lua_getnumber(ymin); + ymax_i = (long int) lua_getnumber(ymax); + + data = lua_getparam(6); + if (!lua_isstring(data)) + lua_error("cdPlay: data should be of type string!"); + data_s = lua_getstring(data); + + if (driver_i >= cdlua_numdrivers) + lua_error("cdPlay: unknown driver!"); + + if (lua_getparam(7) != LUA_NOOBJECT) + lua_error("cdPlay: too many parameters!"); + + cdPlay(cdlua_drivers[driver_i]->ctx(), xmin_i, xmax_i, ymin_i, ymax_i, data_s); +} + +/***************************************************************************\ +* cdUpdateYAxis. * +\***************************************************************************/ + +static void cdlua_updateyaxis(void) +{ + lua_Object y; + + int y_i; + + y = lua_getparam(1); + if (!lua_isnumber(y)) + lua_error("cdUpdateYAxis: invalid (y) parameter!"); + y_i = (int) lua_getnumber(y); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdUpdateYAxis: too many parameters!"); + + cdUpdateYAxis(&y_i); + lua_pushnumber(y_i); +} + +/***************************************************************************\ +* cdGetClipArea. * +\***************************************************************************/ +static void cdlua_getcliparea(void) +{ + int xmin; + int xmax; + int ymin; + int ymax; + int status; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("cdGetClipArea: too many parameters!"); + + status = cdGetClipArea(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(xmin); + lua_pushnumber(xmax); + lua_pushnumber(ymin); + lua_pushnumber(ymax); + lua_pushnumber(status); +} + +static void cdlua_RegionBox(void) +{ + int xmin; + int xmax; + int ymin; + int ymax; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("cdRegionBox: too many parameters!"); + + cdRegionBox(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(xmin); + lua_pushnumber(xmax); + lua_pushnumber(ymin); + lua_pushnumber(ymax); +} + +static void cdlua_getclippoly(void) +{ + int n, i; + int *pts; + lua_Object points; + + pts = cdGetClipPoly(&n); + lua_pushnumber(n); + + points = lua_createtable(); + + for (i=0; i < 2*n; i++) + { + lua_pushobject(points); + lua_pushnumber(i+1); + lua_pushnumber(pts[i]); + lua_settable(); + } +} + +static void wdlua_getclippoly(void) +{ + int n, i; + double *pts; + lua_Object points; + + pts = wdGetClipPoly(&n); + lua_pushnumber(n); + + points = lua_createtable(); + + for (i=0; i < 2*n; i++) + { + lua_pushobject(points); + lua_pushnumber(i+1); + lua_pushnumber(pts[i]); + lua_settable(); + } +} + +/***************************************************************************\ +* cdMM2Pixel. * +\***************************************************************************/ +static void cdlua_mm2pixel(void) +{ + lua_Object mm_dx; + lua_Object mm_dy; + + double mm_dx_d; + double mm_dy_d; + int dx; + int dy; + + mm_dx = lua_getparam(1); + mm_dy = lua_getparam(2); + if (!(lua_isnumber(mm_dx) && lua_isnumber(mm_dy))) + lua_error("cdMM2Pixel: invalid (mm_dx, mm_dy) parameter!"); + mm_dx_d = (double) lua_getnumber(mm_dx); + mm_dy_d = (double) lua_getnumber(mm_dy); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdMM2Pixel: too many parameters!"); + + cdMM2Pixel(mm_dx, mm_dy, &dx, &dy); + lua_pushnumber(dx); + lua_pushnumber(dy); +} + +/***************************************************************************\ +* cdPixel2MM. * +\***************************************************************************/ +static void cdlua_pixel2mm(void) +{ + lua_Object dx; + lua_Object dy; + int dx_i; + int dy_i; + + double mm_dx; + double mm_dy; + + dx = lua_getparam(1); + dy = lua_getparam(2); + if (!(lua_isnumber(dx) && lua_isnumber(dy))) + lua_error("cdPixel2MM: invalid (dx, dy) parameter!"); + dx_i = (int) lua_getnumber(dx); + dy_i = (int) lua_getnumber(dy); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdPixel2MM: too many parameters!"); + + cdPixel2MM(dx_i, dy_i, &mm_dx, &mm_dy); + lua_pushnumber(mm_dx); + lua_pushnumber(mm_dy); +} + +/***************************************************************************\ +* cdStipple. * +\***************************************************************************/ +static void cdlua_stipple(void) +{ + lua_Object stipple; + stipple_t *stipple_p; + + stipple = lua_getparam(1); + if (lua_isnil(stipple)) + lua_error("cdStipple: attempt to set a NIL stipple!"); + if (lua_tag(stipple) != stipple_tag) + lua_error("cdStipple: invalid stipple parameter!"); + stipple_p = (stipple_t *) lua_getuserdata(stipple); + if (!stipple_p->value) + lua_error("cdStipple: attempt to set a killed stipple!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdStipple: too many parameters!"); + + cdStipple(stipple_p->width, stipple_p->height, stipple_p->value); +} + +static void wdlua_stipple(void) +{ + lua_Object stipple; + stipple_t *stipple_p; + double w_mm; + double h_mm; + + stipple = lua_getparam(1); + if (lua_isnil(stipple)) + lua_error("wdStipple: attempt to set a NIL stipple!"); + if (lua_tag(stipple) != stipple_tag) + lua_error("wdStipple: invalid stipple parameter!"); + stipple_p = (stipple_t *) lua_getuserdata(stipple); + if (!stipple_p->value) + lua_error("wdStipple: attempt to set a killed stipple!"); + + w_mm = (double)luaL_check_number(2); + h_mm = (double)luaL_check_number(3); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("wdStipple: too many parameters!"); + + wdStipple(stipple_p->width, stipple_p->height, stipple_p->value, w_mm, h_mm); +} + +/***************************************************************************\ +* cdPattern. * +\***************************************************************************/ +static void cdlua_pattern(void) +{ + lua_Object pattern; + pattern_t *pattern_p; + + pattern = lua_getparam(1); + if (lua_isnil(pattern)) + lua_error("cdPattern: attempt to set a NIL pattern!"); + if (lua_tag(pattern) != pattern_tag) + lua_error("cdPattern: invalid pattern parameter!"); + pattern_p = (pattern_t *) lua_getuserdata(pattern); + if (!pattern_p->color) + lua_error("cdPattern: attempt to set a killed pattern!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdPattern: too many parameters!"); + + cdPattern(pattern_p->width, pattern_p->height, pattern_p->color); +} + +static void wdlua_pattern(void) +{ + lua_Object pattern; + pattern_t *pattern_p; + double w_mm; + double h_mm; + + pattern = lua_getparam(1); + if (lua_isnil(pattern)) + lua_error("wdPattern: attempt to set a NIL pattern!"); + if (lua_tag(pattern) != pattern_tag) + lua_error("wdPattern: invalid pattern parameter!"); + pattern_p = (pattern_t *) lua_getuserdata(pattern); + if (!pattern_p->color) + lua_error("wdPattern: attempt to set a killed pattern!"); + + w_mm = (double)luaL_check_number(2); + h_mm = (double)luaL_check_number(3); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("wdPattern: too many parameters!"); + + wdPattern(pattern_p->width, pattern_p->height, pattern_p->color, w_mm, h_mm); +} + +/***************************************************************************\ +* cdFontDim. * +\***************************************************************************/ +static void cdlua_fontdim(void) +{ + int max_width; + int height; + int ascent; + int descent; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("cdFontDim: too many parameters!"); + + cdFontDim(&max_width, &height, &ascent, &descent); + lua_pushnumber(max_width); + lua_pushnumber(height); + lua_pushnumber(ascent); + lua_pushnumber(descent); +} + +/***************************************************************************\ +* cdTextSize. * +\***************************************************************************/ +static void cdlua_textsize(void) +{ + lua_Object text; + char* text_s; + + int width; + int height; + + text = lua_getparam(1); + if (!lua_isstring(text)) + lua_error("cdTextSize: text should be of type string!"); + text_s = (char*) lua_getstring(text); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdTextSize: too many parameters!"); + + cdTextSize(text_s, &width, &height); + lua_pushnumber(width); + lua_pushnumber(height); +} + +static void cdlua_textbox(void) +{ + int xmin; + int xmax; + int ymin; + int ymax; + int x = (int)luaL_check_number(1); + int y = (int)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdTextBox: too many parameters!"); + + cdTextBox(x, y, s, &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(xmin); + lua_pushnumber(xmax); + lua_pushnumber(ymin); + lua_pushnumber(ymax); +} + +static void wdlua_textbox(void) +{ + double xmin; + double xmax; + double ymin; + double ymax; + double x = (double)luaL_check_number(1); + double y = (double)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("wdTextBox: too many parameters!"); + + wdTextBox(x, y, s, &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(xmin); + lua_pushnumber(xmax); + lua_pushnumber(ymin); + lua_pushnumber(ymax); +} + +static void cdlua_textbounds(void) +{ + int rect[8]; + int x = (int)luaL_check_number(1); + int y = (int)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdTextBox: too many parameters!"); + + cdTextBounds(x, y, s, rect); + lua_pushnumber(rect[0]); + lua_pushnumber(rect[1]); + lua_pushnumber(rect[2]); + lua_pushnumber(rect[3]); + lua_pushnumber(rect[4]); + lua_pushnumber(rect[5]); + lua_pushnumber(rect[6]); + lua_pushnumber(rect[7]); +} + +static void wdlua_textbounds(void) +{ + double rect[8]; + double x = (double)luaL_check_number(1); + double y = (double)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("wdTextBox: too many parameters!"); + + wdTextBounds(x, y, s, rect); + lua_pushnumber(rect[0]); + lua_pushnumber(rect[1]); + lua_pushnumber(rect[2]); + lua_pushnumber(rect[3]); + lua_pushnumber(rect[4]); + lua_pushnumber(rect[5]); + lua_pushnumber(rect[6]); + lua_pushnumber(rect[7]); +} + +static void cdlua_getfont(void) +{ + int type_face, style, size; + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdGetFont: too many parameters!"); + + cdGetFont(&type_face, &style, &size); + lua_pushnumber(type_face); + lua_pushnumber(style); + lua_pushnumber(size); +} + +static void wdlua_getfont(void) +{ + int type_face, style; + double size; + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("wdGetFont: too many parameters!"); + + wdGetFont(&type_face, &style, &size); + lua_pushnumber(type_face); + lua_pushnumber(style); + lua_pushnumber(size); +} + +/***************************************************************************\ +* cdPalette. * +\***************************************************************************/ +static void cdlua_palette(void) +{ + lua_Object palette; + lua_Object mode; + palette_t *palette_p; + int mode_i; + + palette = lua_getparam(1); + if (lua_isnil(palette)) + lua_error("cdPalette: attempt to set a NIL palette!"); + if (lua_tag(palette) != palette_tag) + lua_error("cdPalette: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p->color) + lua_error("cdPalette: attempt to set a killed palette!"); + + mode = lua_getparam(2); + if (!lua_isnumber(mode)) + lua_error("cdPalette: invalid mode parameter!"); + mode_i = (int) lua_getnumber(mode); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("cdPalette: too many parameters!"); + + cdPalette(palette_p->size, palette_p->color, mode_i); +} + +/***************************************************************************\ +* cdBackground. * +\***************************************************************************/ +static void cdlua_background(void) +{ + lua_Object color; + long int color_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("cdBackground: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdBackground: too many parameters!"); + + color_i = cdBackground(color_i); + lua_pushusertag((void*) color_i, color_tag); +} + +/***************************************************************************\ +* cdForeground. * +\***************************************************************************/ +static void cdlua_foreground(void) +{ + lua_Object color; + long int color_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("cdForeground: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdForeground: too many parameters!"); + + color_i = cdForeground(color_i); + lua_pushusertag((void*) color_i, color_tag); +} + +/***************************************************************************\ +* cdGetImageRGB. * +\***************************************************************************/ +static void cdlua_getimagergb(void) +{ + lua_Object imagergb; + lua_Object x; + lua_Object y; + + imagergb_t *imagergb_p; + int x_i; + int y_i; + + imagergb = lua_getparam(1); + if (lua_isnil(imagergb)) + lua_error("cdGetImageRGB: attempt to get a NIL imagergb!"); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("cdGetImageRGB: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!(imagergb_p->red && imagergb_p->green && imagergb_p->blue)) + lua_error("cdGetImageRGB: attempt to get a killed imagergb!"); + + x = lua_getparam(2); + y = lua_getparam(3); + if (!(lua_isnumber(x) && lua_isnumber(y))) + lua_error("cdGetImageRGB: invalid (x, y) parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdGetImageRGB: too many parameters!"); + + cdGetImageRGB(imagergb_p->red, imagergb_p->green, imagergb_p->blue, + x_i, y_i, imagergb_p->width, imagergb_p->height); +} +/***************************************************************************\ +* cdPutImageRGB. * +\***************************************************************************/ + +static void cdlua_rgb2map(void) +{ + lua_Object imagemap; + lua_Object palette; + lua_Object imagergb; + + imagemap_t *imagemap_p; + palette_t *palette_p; + imagergb_t *imagergb_p; + + imagergb = lua_getparam(1); + if (lua_isnil(imagergb)) + lua_error("cdRGB2Map: attempt to put a NIL imagergb!"); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("cdRGB2Map: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!(imagergb_p->red && imagergb_p->green && imagergb_p->blue)) + lua_error("cdRGB2Map: attempt to put a killed imagergb!"); + + imagemap = lua_getparam(2); + if (lua_isnil(imagemap)) + lua_error("cdRGB2Map: attempt to put a NIL imagemap!"); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("cdRGB2Map: imagemap invalid parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p->index) + lua_error("cdRGB2Map: attempt to put a killed imagemap!"); + + palette = lua_getparam(3); + if (lua_isnil(palette)) + lua_error("cdRGB2Map: NIL pallete!"); + if (lua_tag(palette) != palette_tag) + lua_error("cdRGB2Map: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p->color) + lua_error("cdRGB2Map: killed pallete!"); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdRGB2Map: too many parameters!"); + + cdRGB2Map(imagergb_p->width, imagergb_p->height, + imagergb_p->red, imagergb_p->green, imagergb_p->blue, + imagemap_p->index, palette_p->size, palette_p->color); +} + +static void cdlua_putimagergb(void) +{ + lua_Object imagergb; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + + imagergb_t *imagergb_p; + int x_i; + int y_i; + int w_i; + int h_i; + + imagergb = lua_getparam(1); + if (lua_isnil(imagergb)) + lua_error("cdPutImageRGB: attempt to put a NIL imagergb!"); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("cdPutImageRGB: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!(imagergb_p->red && imagergb_p->green && imagergb_p->blue)) + lua_error("cdPutImageRGB: attempt to put a killed imagergb!"); + + x = lua_getparam(2); + y = lua_getparam(3); + w = lua_getparam(4); + h = lua_getparam(5); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h))) + lua_error("cdPutImageRGB: invalid parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + w_i = (int) lua_getnumber(w); + h_i = (int) lua_getnumber(h); + if (w_i < 0 || h_i < 0) + lua_error("cdPutImageRGB: target region dimensions should be positive integers!"); + + if (lua_getparam(6) != LUA_NOOBJECT) + lua_error("cdPutImageRGB: too many parameters!"); + + cdPutImageRGB(imagergb_p->width, imagergb_p->height, imagergb_p->red, + imagergb_p->green, imagergb_p->blue, x_i, y_i, w_i, h_i); +} + +static void cdlua_putimagerectrgb(void) +{ + lua_Object imagergb; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + lua_Object xmin; + lua_Object xmax; + lua_Object ymin; + lua_Object ymax; + + imagergb_t *imagergb_p; + int x_i; + int y_i; + int w_i; + int h_i; + int xmin_i; + int xmax_i; + int ymin_i; + int ymax_i; + + imagergb = lua_getparam(1); + if (lua_isnil(imagergb)) + lua_error("cdPutImageRectRGB: attempt to put a NIL imagergb!"); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("cdPutImageRectRGB: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!(imagergb_p->red && imagergb_p->green && imagergb_p->blue)) + lua_error("cdPutImageRectRGB: attempt to put a killed imagergb!"); + + x = lua_getparam(2); + y = lua_getparam(3); + w = lua_getparam(4); + h = lua_getparam(5); + xmin = lua_getparam(6); + xmax = lua_getparam(7); + ymin = lua_getparam(8); + ymax = lua_getparam(9); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h) && + lua_isnumber(xmin) && lua_isnumber(xmax) && lua_isnumber(ymin) && lua_isnumber(ymax))) + lua_error("cdPutImageRectRGB: invalid parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + w_i = (int) lua_getnumber(w); + h_i = (int) lua_getnumber(h); + xmin_i = (int) lua_getnumber(xmin); + xmax_i = (int) lua_getnumber(xmax); + ymin_i = (int) lua_getnumber(ymin); + ymax_i = (int) lua_getnumber(ymax); + if (w_i < 0 || h_i < 0) + lua_error("cdPutImageRectRGB: target region dimensions should be positive integers!"); + + if (lua_getparam(10) != LUA_NOOBJECT) + lua_error("cdPutImageRectRGB: too many parameters!"); + + cdPutImageRectRGB(imagergb_p->width, imagergb_p->height, imagergb_p->red, + imagergb_p->green, imagergb_p->blue, x_i, y_i, w_i, h_i, xmin_i, xmax_i, ymin_i, ymax_i); +} + +static void wdlua_putimagerectrgb(void) +{ + lua_Object imagergb; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + lua_Object xmin; + lua_Object xmax; + lua_Object ymin; + lua_Object ymax; + + imagergb_t *imagergb_p; + double x_i; + double y_i; + double w_i; + double h_i; + int xmin_i; + int xmax_i; + int ymin_i; + int ymax_i; + + imagergb = lua_getparam(1); + if (lua_isnil(imagergb)) + lua_error("wdPutImageRectRGB: attempt to put a NIL imagergb!"); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("wdPutImageRectRGB: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!(imagergb_p->red && imagergb_p->green && imagergb_p->blue)) + lua_error("wdPutImageRectRGB: attempt to put a killed imagergb!"); + + x = lua_getparam(2); + y = lua_getparam(3); + w = lua_getparam(4); + h = lua_getparam(5); + xmin = lua_getparam(6); + xmax = lua_getparam(7); + ymin = lua_getparam(8); + ymax = lua_getparam(9); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h) && + lua_isnumber(xmin) && lua_isnumber(xmax) && lua_isnumber(ymin) && lua_isnumber(ymax))) + lua_error("wdPutImageRectRGB: invalid parameter!"); + x_i = (double) lua_getnumber(x); + y_i = (double) lua_getnumber(y); + w_i = (double) lua_getnumber(w); + h_i = (double) lua_getnumber(h); + xmin_i = (int) lua_getnumber(xmin); + xmax_i = (int) lua_getnumber(xmax); + ymin_i = (int) lua_getnumber(ymin); + ymax_i = (int) lua_getnumber(ymax); + if (w_i < 0 || h_i < 0) + lua_error("wdPutImageRectRGB: target region dimensions should be positive integers!"); + + if (lua_getparam(10) != LUA_NOOBJECT) + lua_error("wdPutImageRectRGB: too many parameters!"); + + wdPutImageRectRGB(imagergb_p->width, imagergb_p->height, imagergb_p->red, + imagergb_p->green, imagergb_p->blue, x_i, y_i, w_i, h_i, xmin_i, xmax_i, ymin_i, ymax_i); +} + +/***************************************************************************\ +* cdPutImageRGBA. * +\***************************************************************************/ +static void cdlua_putimagergba(void) +{ + lua_Object imagergba; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + + imagergba_t *imagergba_p; + int x_i; + int y_i; + int w_i; + int h_i; + + imagergba = lua_getparam(1); + if (lua_isnil(imagergba)) + lua_error("cdPutImageRGBA: attempt to put a NIL imagergba!"); + if (lua_tag(imagergba) != imagergba_tag) + lua_error("cdPutImageRGBA: invalid imagergba parameter!"); + imagergba_p = (imagergba_t *) lua_getuserdata(imagergba); + if (!(imagergba_p->red && imagergba_p->green && imagergba_p->blue && imagergba_p->alpha)) + lua_error("cdPutImageRGBA: attempt to put a killed imagergba!"); + + x = lua_getparam(2); + y = lua_getparam(3); + w = lua_getparam(4); + h = lua_getparam(5); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h))) + lua_error("cdPutImageRGBA: invalid parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + w_i = (int) lua_getnumber(w); + h_i = (int) lua_getnumber(h); + if (w_i < 0 || h_i < 0) + lua_error("cdPutImageRGBA: target region dimensions should be positive integers!"); + + if (lua_getparam(6) != LUA_NOOBJECT) + lua_error("cdPutImageRGBA: too many parameters!"); + + cdPutImageRGBA(imagergba_p->width, imagergba_p->height, imagergba_p->red, + imagergba_p->green, imagergba_p->blue, imagergba_p->alpha, x_i, y_i, w_i, h_i); +} + +static void cdlua_putimagerectrgba(void) +{ + lua_Object imagergba; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + lua_Object xmin; + lua_Object xmax; + lua_Object ymin; + lua_Object ymax; + + imagergba_t *imagergba_p; + int x_i; + int y_i; + int w_i; + int h_i; + int xmin_i; + int xmax_i; + int ymin_i; + int ymax_i; + + imagergba = lua_getparam(1); + if (lua_isnil(imagergba)) + lua_error("cdPutImageRectRGBA: attempt to put a NIL imagergba!"); + if (lua_tag(imagergba) != imagergba_tag) + lua_error("cdPutImageRectRGBA: invalid imagergba parameter!"); + imagergba_p = (imagergba_t *) lua_getuserdata(imagergba); + if (!(imagergba_p->red && imagergba_p->green && imagergba_p->blue && imagergba_p->alpha)) + lua_error("cdPutImageRectRGBA: attempt to put a killed imagergba!"); + + x = lua_getparam(2); + y = lua_getparam(3); + w = lua_getparam(4); + h = lua_getparam(5); + xmin = lua_getparam(6); + xmax = lua_getparam(7); + ymin = lua_getparam(8); + ymax = lua_getparam(9); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h) && + lua_isnumber(xmin) && lua_isnumber(xmax) && lua_isnumber(ymin) && lua_isnumber(ymax))) + lua_error("cdPutImageRectRGBA: invalid parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + w_i = (int) lua_getnumber(w); + h_i = (int) lua_getnumber(h); + xmin_i = (int) lua_getnumber(xmin); + xmax_i = (int) lua_getnumber(xmax); + ymin_i = (int) lua_getnumber(ymin); + ymax_i = (int) lua_getnumber(ymax); + if (w_i < 0 || h_i < 0) + lua_error("cdPutImageRectRGBA: target region dimensions should be positive integers!"); + + if (lua_getparam(10) != LUA_NOOBJECT) + lua_error("cdPutImageRectRGBA: too many parameters!"); + + cdPutImageRectRGBA(imagergba_p->width, imagergba_p->height, imagergba_p->red, + imagergba_p->green, imagergba_p->blue, imagergba_p->alpha, x_i, y_i, w_i, h_i, xmin_i, xmax_i, ymin_i, ymax_i); +} + +static void wdlua_putimagerectrgba(void) +{ + lua_Object imagergba; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + lua_Object xmin; + lua_Object xmax; + lua_Object ymin; + lua_Object ymax; + + imagergba_t *imagergba_p; + double x_i; + double y_i; + double w_i; + double h_i; + int xmin_i; + int xmax_i; + int ymin_i; + int ymax_i; + + imagergba = lua_getparam(1); + if (lua_isnil(imagergba)) + lua_error("wdPutImageRectRGBA: attempt to put a NIL imagergba!"); + if (lua_tag(imagergba) != imagergba_tag) + lua_error("wdPutImageRectRGBA: invalid imagergba parameter!"); + imagergba_p = (imagergba_t *) lua_getuserdata(imagergba); + if (!(imagergba_p->red && imagergba_p->green && imagergba_p->blue && imagergba_p->alpha)) + lua_error("wdPutImageRectRGBA: attempt to put a killed imagergba!"); + + x = lua_getparam(2); + y = lua_getparam(3); + w = lua_getparam(4); + h = lua_getparam(5); + xmin = lua_getparam(6); + xmax = lua_getparam(7); + ymin = lua_getparam(8); + ymax = lua_getparam(9); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h) && + lua_isnumber(xmin) && lua_isnumber(xmax) && lua_isnumber(ymin) && lua_isnumber(ymax))) + lua_error("wdPutImageRectRGBA: invalid parameter!"); + x_i = (double) lua_getnumber(x); + y_i = (double) lua_getnumber(y); + w_i = (double) lua_getnumber(w); + h_i = (double) lua_getnumber(h); + xmin_i = (int) lua_getnumber(xmin); + xmax_i = (int) lua_getnumber(xmax); + ymin_i = (int) lua_getnumber(ymin); + ymax_i = (int) lua_getnumber(ymax); + if (w_i < 0 || h_i < 0) + lua_error("wdPutImageRectRGBA: target region dimensions should be positive integers!"); + + if (lua_getparam(10) != LUA_NOOBJECT) + lua_error("wdPutImageRectRGBA: too many parameters!"); + + wdPutImageRectRGBA(imagergba_p->width, imagergba_p->height, imagergba_p->red, + imagergba_p->green, imagergba_p->blue, imagergba_p->alpha, x_i, y_i, w_i, h_i, xmin_i, xmax_i, ymin_i, ymax_i); +} + +/***************************************************************************\ +* cdPutImageMap. * +\***************************************************************************/ +static void cdlua_putimagemap(void) +{ + lua_Object imagemap; + lua_Object palette; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + + imagemap_t *imagemap_p; + palette_t *palette_p; + int x_i; + int y_i; + int w_i; + int h_i; + + imagemap = lua_getparam(1); + if (lua_isnil(imagemap)) + lua_error("cdPutImageMap: attempt to put a NIL imagemap!"); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("cdPutImageMap: imagemap invalid parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p->index) + lua_error("cdPutImageMap: attempt to put a killed imagemap!"); + + palette = lua_getparam(2); + if (lua_isnil(palette)) + lua_error("cdPutImageMap: NIL pallete!"); + if (lua_tag(palette) != palette_tag) + lua_error("cdPutImageMap: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p->color) + lua_error("cdPutImageMap: killed pallete!"); + + x = lua_getparam(3); + y = lua_getparam(4); + w = lua_getparam(5); + h = lua_getparam(6); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h))) + lua_error("cdPutImageMap: invalid parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + w_i = (int) lua_getnumber(w); + h_i = (int) lua_getnumber(h); + if (w_i < 0 || h_i < 0) + lua_error("cdPutImageMap: target region dimensions should be positive integers!"); + + if (lua_getparam(7) != LUA_NOOBJECT) + lua_error("cdPutImageMap: too many parameters!"); + + cdPutImageMap(imagemap_p->width, imagemap_p->height, imagemap_p->index, + palette_p->color, x_i, y_i, w_i, h_i); +} + +static void cdlua_putimagerectmap(void) +{ + lua_Object imagemap; + lua_Object palette; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + lua_Object xmin; + lua_Object xmax; + lua_Object ymin; + lua_Object ymax; + + imagemap_t *imagemap_p; + palette_t *palette_p; + int x_i; + int y_i; + int w_i; + int h_i; + int xmin_i; + int xmax_i; + int ymin_i; + int ymax_i; + + imagemap = lua_getparam(1); + if (lua_isnil(imagemap)) + lua_error("cdPutImageMap: attempt to put a NIL imagemap!"); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("cdPutImageMap: imagemap invalid parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p->index) + lua_error("cdPutImageMap: attempt to put a killed imagemap!"); + + palette = lua_getparam(2); + if (lua_isnil(palette)) + lua_error("cdPutImageRectMap: NIL pallete!"); + if (lua_tag(palette) != palette_tag) + lua_error("cdPutImageRectMap: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p->color) + lua_error("cdPutImageRectMap: killed pallete!"); + + x = lua_getparam(3); + y = lua_getparam(4); + w = lua_getparam(5); + h = lua_getparam(6); + xmin = lua_getparam(7); + xmax = lua_getparam(8); + ymin = lua_getparam(9); + ymax = lua_getparam(10); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h) && + lua_isnumber(xmin) && lua_isnumber(xmax) && lua_isnumber(ymin) && lua_isnumber(ymax))) + lua_error("cdPutImageRectMap: invalid parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + w_i = (int) lua_getnumber(w); + h_i = (int) lua_getnumber(h); + xmin_i = (int) lua_getnumber(xmin); + xmax_i = (int) lua_getnumber(xmax); + ymin_i = (int) lua_getnumber(ymin); + ymax_i = (int) lua_getnumber(ymax); + if (w_i < 0 || h_i < 0) + lua_error("cdPutImageRectMap: target region dimensions should be positive integers!"); + + if (lua_getparam(11) != LUA_NOOBJECT) + lua_error("cdPutImageRectMap: too many parameters!"); + + cdPutImageRectMap(imagemap_p->width, imagemap_p->height, imagemap_p->index, + palette_p->color, x_i, y_i, w_i, h_i, xmin_i, xmax_i, ymin_i, ymax_i); +} + +static void wdlua_putimagerectmap(void) +{ + lua_Object imagemap; + lua_Object palette; + lua_Object x; + lua_Object y; + lua_Object w; + lua_Object h; + lua_Object xmin; + lua_Object xmax; + lua_Object ymin; + lua_Object ymax; + + imagemap_t *imagemap_p; + palette_t *palette_p; + double x_i; + double y_i; + double w_i; + double h_i; + int xmin_i; + int xmax_i; + int ymin_i; + int ymax_i; + + imagemap = lua_getparam(1); + if (lua_isnil(imagemap)) + lua_error("wdPutImageMap: attempt to put a NIL imagemap!"); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("wdPutImageMap: imagemap invalid parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p->index) + lua_error("wdPutImageMap: attempt to put a killed imagemap!"); + + palette = lua_getparam(2); + if (lua_isnil(palette)) + lua_error("wdPutImageRectMap: NIL pallete!"); + if (lua_tag(palette) != palette_tag) + lua_error("wdPutImageRectMap: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p->color) + lua_error("wdPutImageRectMap: killed pallete!"); + + x = lua_getparam(3); + y = lua_getparam(4); + w = lua_getparam(5); + h = lua_getparam(6); + xmin = lua_getparam(7); + xmax = lua_getparam(8); + ymin = lua_getparam(9); + ymax = lua_getparam(10); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(w) && lua_isnumber(h) && + lua_isnumber(xmin) && lua_isnumber(xmax) && lua_isnumber(ymin) && lua_isnumber(ymax))) + lua_error("wdPutImageRectMap: invalid parameter!"); + x_i = (double) lua_getnumber(x); + y_i = (double) lua_getnumber(y); + w_i = (double) lua_getnumber(w); + h_i = (double) lua_getnumber(h); + xmin_i = (int) lua_getnumber(xmin); + xmax_i = (int) lua_getnumber(xmax); + ymin_i = (int) lua_getnumber(ymin); + ymax_i = (int) lua_getnumber(ymax); + if (w_i < 0 || h_i < 0) + lua_error("wdPutImageRectMap: target region dimensions should be positive integers!"); + + if (lua_getparam(11) != LUA_NOOBJECT) + lua_error("wdPutImageRectMap: too many parameters!"); + + wdPutImageRectMap(imagemap_p->width, imagemap_p->height, imagemap_p->index, + palette_p->color, x_i, y_i, w_i, h_i, xmin_i, xmax_i, ymin_i, ymax_i); +} + +/***************************************************************************\ +* cdGetImage. * +\***************************************************************************/ +static void cdlua_getimage(void) +{ + lua_Object image; + lua_Object x; + lua_Object y; + + image_t *image_p; + int x_i; + int y_i; + + image = lua_getparam(1); + if (lua_isnil(image)) + lua_error("cdGetImage: attempt to get NIL image"); + if (lua_tag(image) != image_tag) + lua_error("cdGetImage: invalid image parameter!"); + image_p = (image_t *) lua_getuserdata(image); + if (!image_p->cd_image) + lua_error("cdGetImage: attempt to get a killed image"); + + x = lua_getparam(2); + y = lua_getparam(3); + if (!(lua_isnumber(x) && lua_isnumber(y))) + lua_error("cdGetImage: invalid (x, y) parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdGetImage: too many parameters!"); + cdGetImage(image_p->cd_image, x_i, y_i); +} + +/***************************************************************************\ +* cdPutImage. * +\***************************************************************************/ +static void cdlua_putimage(void) +{ + lua_Object image; + lua_Object x; + lua_Object y; + + image_t *image_p; + int x_i; + int y_i; + + image = lua_getparam(1); + if (lua_isnil(image)) + lua_error("cdPutImage: attempt to put a NIL image!"); + if (lua_tag(image) != image_tag) + lua_error("cdPutImage: invalid image parameter!"); + image_p = (image_t *) lua_getuserdata(image); + if (!image_p->cd_image) + lua_error("cdPutImage: attempt to put a killed image!"); + + x = lua_getparam(2); + y = lua_getparam(3); + if (!(lua_isnumber(x) && lua_isnumber(y))) + lua_error("cdPutImage: invalid (x, y) parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdPutImage: too many parameters!"); + + cdPutImage(image_p->cd_image, x_i, y_i); +} + +/***************************************************************************\ +* cdPutImageRect. * +\***************************************************************************/ +static void cdlua_putimagerect(void) +{ + lua_Object image; + lua_Object x; + lua_Object y; + lua_Object xmin; + lua_Object xmax; + lua_Object ymin; + lua_Object ymax; + + image_t *image_p; + int x_i; + int y_i; + int xmin_i; + int xmax_i; + int ymin_i; + int ymax_i; + + image = lua_getparam(1); + if (lua_isnil(image)) + lua_error("cdPutImageRect: attempt to put a NIL image!"); + if (lua_tag(image) != image_tag) + lua_error("cdPutImageRect: invalid image parameter!"); + image_p = (image_t *) lua_getuserdata(image); + if (!image_p->cd_image) + lua_error("cdPutImageRect: attempt to put a killed image!"); + + x = lua_getparam(2); + y = lua_getparam(3); + xmin = lua_getparam(4); + xmax = lua_getparam(5); + ymin = lua_getparam(6); + ymax = lua_getparam(7); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(xmin) && lua_isnumber(xmax) && + lua_isnumber(ymin) && lua_isnumber(ymax))) + lua_error("cdPutImageRect: invalid parameter!"); + x_i = (int) lua_getnumber(x); + y_i = (int) lua_getnumber(y); + xmin_i = (int) lua_getnumber(xmin); + xmax_i = (int) lua_getnumber(xmax); + ymin_i = (int) lua_getnumber(ymin); + ymax_i = (int) lua_getnumber(ymax); + + if (lua_getparam(8) != LUA_NOOBJECT) + lua_error("cdPutImageRect: too many parameters!"); + + cdPutImageRect(image_p->cd_image, x_i, y_i, xmin_i, xmax_i, ymin_i, ymax_i); +} + +static void wdlua_putimagerect(void) +{ + lua_Object image; + lua_Object x; + lua_Object y; + lua_Object xmin; + lua_Object xmax; + lua_Object ymin; + lua_Object ymax; + + image_t *image_p; + double x_i; + double y_i; + int xmin_i; + int xmax_i; + int ymin_i; + int ymax_i; + + image = lua_getparam(1); + if (lua_isnil(image)) + lua_error("wdPutImageRect: attempt to put a NIL image!"); + if (lua_tag(image) != image_tag) + lua_error("wdPutImageRect: invalid image parameter!"); + image_p = (image_t *) lua_getuserdata(image); + if (!image_p->cd_image) + lua_error("wdPutImageRect: attempt to put a killed image!"); + + x = lua_getparam(2); + y = lua_getparam(3); + xmin = lua_getparam(4); + xmax = lua_getparam(5); + ymin = lua_getparam(6); + ymax = lua_getparam(7); + if (!(lua_isnumber(x) && lua_isnumber(y) && lua_isnumber(xmin) && lua_isnumber(xmax) && + lua_isnumber(ymin) && lua_isnumber(ymax))) + lua_error("wdPutImageRect: invalid parameter!"); + x_i = (double) lua_getnumber(x); + y_i = (double) lua_getnumber(y); + xmin_i = (int) lua_getnumber(xmin); + xmax_i = (int) lua_getnumber(xmax); + ymin_i = (int) lua_getnumber(ymin); + ymax_i = (int) lua_getnumber(ymax); + + if (lua_getparam(8) != LUA_NOOBJECT) + lua_error("wdPutImageRect: too many parameters!"); + + wdPutImageRect(image_p->cd_image, x_i, y_i, xmin_i, xmax_i, ymin_i, ymax_i); +} + +/***************************************************************************\ +* cdVersion. * +\***************************************************************************/ + +static void cdlua_version(void) +{ + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("cdVersion: too many parameters!"); + + lua_pushstring(cdVersion()); +} + +/***************************************************************************\ +* wdGetViewport. * +\***************************************************************************/ +static void wdlua_getviewport(void) +{ + int xmin; + int xmax; + int ymin; + int ymax; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("wdGetViewport: too many parameters!"); + + wdGetViewport(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(xmin); + lua_pushnumber(xmax); + lua_pushnumber(ymin); + lua_pushnumber(ymax); +} + +/***************************************************************************\ +* wdGetWindow. * +\***************************************************************************/ +static void wdlua_getwindow(void) +{ + double xmin; + double xmax; + double ymin; + double ymax; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("wdGetWindow: too many parameters!"); + + wdGetWindow(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(xmin); + lua_pushnumber(xmax); + lua_pushnumber(ymin); + lua_pushnumber(ymax); +} + +/***************************************************************************\ +* wdGetClipArea. * +\***************************************************************************/ +static void wdlua_getcliparea(void) +{ + double xmin; + double xmax; + double ymin; + double ymax; + int status; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("wdGetClipArea: too many parameters!"); + + status = wdGetClipArea(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(xmin); + lua_pushnumber(xmax); + lua_pushnumber(ymin); + lua_pushnumber(ymax); + lua_pushnumber(status); +} + +static void wdlua_RegionBox(void) +{ + double xmin; + double xmax; + double ymin; + double ymax; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("wdRegionBox: too many parameters!"); + + wdRegionBox(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(xmin); + lua_pushnumber(xmax); + lua_pushnumber(ymin); + lua_pushnumber(ymax); +} + +/***************************************************************************\ +* wdFontDim. * +\***************************************************************************/ +static void wdlua_fontdim(void) +{ + double max_width; + double height; + double ascent; + double descent; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("wdFontDim: too many parameters!"); + + wdFontDim(&max_width, &height, &ascent, &descent); + lua_pushnumber(max_width); + lua_pushnumber(height); + lua_pushnumber(ascent); + lua_pushnumber(descent); +} + +/***************************************************************************\ +* wdTextSize. * +\***************************************************************************/ +static void wdlua_textsize(void) +{ + lua_Object text; + char* text_s; + + double width; + double height; + + text = lua_getparam(1); + if (!lua_isstring(text)) + lua_error("wdTextSize: invalid text parameter!"); + text_s = (char*) lua_getstring(text); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("wdTextSize: too many parameters!"); + + wdTextSize(text_s, &width, &height); + lua_pushnumber(width); + lua_pushnumber(height); +} + +/***************************************************************************\ +* wdGetVectorTextSize. * +\***************************************************************************/ +static void wdlua_getvectortextsize(void) +{ + lua_Object text; + char* text_s; + + double width; + double height; + + text = lua_getparam(1); + if (!lua_isstring(text)) + lua_error("wdGetVectorTextSize: invalid text parameter!"); + text_s = (char*) lua_getstring(text); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("wdGetVectorTextSize: too many parameters!"); + + wdGetVectorTextSize(text_s, &width, &height); + lua_pushnumber(width); + lua_pushnumber(height); +} + +static void cdlua_vectortexttransform(void) +{ + lua_Object old_table, table, value; + double matrix[6], *old_matrix; + int i; + + table = lua_getparam(1); + if (!lua_istable(table)) + lua_error("cdVectorTextTransform: invalid table parameter!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdVectorTextTransform: too many parameters!"); + + for (i=0; i < 6; i++) + { + lua_pushobject(table); + lua_pushnumber(i+1); + value = lua_gettable(); + + if (!lua_isnumber(value)) + lua_error("cdVectorTextTransform: invalid value!"); + + matrix[i] = lua_getnumber(value); + } + + old_matrix = cdVectorTextTransform(matrix); + + old_table = lua_createtable(); + + for (i=0; i < 6; i++) + { + lua_pushobject(old_table); + lua_pushnumber(i+1); + lua_pushnumber(old_matrix[i]); + lua_settable(); + } +} + +static void cdlua_vectortextbounds(void) +{ + char* s = (char*)luaL_check_string(1); + int x = (int)luaL_check_number(2); + int y = (int)luaL_check_number(3); + int rect[8], i; + lua_Object lua_rect; + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("cdGetVectorTextBounds: too many parameters!"); + + cdGetVectorTextBounds(s, x, y, rect); + + lua_rect = lua_createtable(); + + for (i=0; i < 8; i++) + { + lua_pushobject(lua_rect); + lua_pushnumber(i+1); + lua_pushnumber(rect[i]); + lua_settable(); + } +} + +static void wdlua_vectortextbounds(void) +{ + char* s = (char*)luaL_check_string(1); + double x = luaL_check_number(2); + double y = luaL_check_number(3); + double rect[8]; + int i; + lua_Object lua_rect; + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("wdGetVectorTextBounds: too many parameters!"); + + wdGetVectorTextBounds(s, x, y, rect); + + lua_rect = lua_createtable(); + + for (i=0; i < 8; i++) + { + lua_pushobject(lua_rect); + lua_pushnumber(i+1); + lua_pushnumber(rect[i]); + lua_settable(); + } +} + +static void cdlua_getvectortextsize(void) +{ + lua_Object text; + char* text_s; + + int width; + int height; + + text = lua_getparam(1); + if (!lua_isstring(text)) + lua_error("cdGetVectorTextSize: invalid text parameter!"); + text_s = (char*) lua_getstring(text); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("cdGetTextSize: too many parameters!"); + + cdGetVectorTextSize(text_s, &width, &height); + lua_pushnumber(width); + lua_pushnumber(height); +} +/***************************************************************************\ +* wdWorld2Canvas. * +\***************************************************************************/ +static void wdlua_world2canvas(void) +{ + lua_Object xw; + lua_Object yw; + double xw_d; + double yw_d; + + int xv_i; + int yv_i; + + xw = lua_getparam(1); + yw = lua_getparam(2); + if (!(lua_isnumber(xw) && lua_isnumber(yw))) + lua_error("wdWorld2Canvas: invalid (xw, yw) parameter!"); + xw_d = (double) lua_getnumber(xw); + yw_d = (double) lua_getnumber(yw); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("wdWorld2Canvas: too many parameters!"); + + wdWorld2Canvas(xw_d, yw_d, &xv_i, &yv_i); + lua_pushnumber(xv_i); + lua_pushnumber(yv_i); +} + +/***************************************************************************\ +* wdCanvas2World. * +\***************************************************************************/ +static void wdlua_canvas2world(void) +{ + lua_Object xv; + lua_Object yv; + int xv_i; + int yv_i; + + double xw_d; + double yw_d; + + xv = lua_getparam(1); + yv = lua_getparam(2); + if (!(lua_isnumber(xv) && lua_isnumber(yv))) + lua_error("wdCanvas2World: invalid (xc, yc) parameter!"); + xv_i = (int) lua_getnumber(xv); + yv_i = (int) lua_getnumber(yv); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("wdCanvas2World: too many parameters!"); + + wdCanvas2World(xv_i, yv_i, &xw_d, &yw_d); + lua_pushnumber(xw_d); + lua_pushnumber(yw_d); +} + +/***************************************************************************\ +* Initializes CDLua. * +\***************************************************************************/ +static void cdlua_pushstring(char* str, char* name) +{ + lua_pushstring(str); lua_setglobal(name); + cdlua_setnamespace(name, name+2); /* CD_XXXX = _XXXX */ +} + +static void setinfo(void) +{ + cdlua_pushstring(CD_COPYRIGHT, "CD_COPYRIGHT"); + cdlua_pushstring("A 2D Graphics Library", "CD_DESCRIPTION"); + cdlua_pushstring("CD - Canvas Draw", "CD_NAME"); + cdlua_pushstring("CD "CD_VERSION, "CD_VERSION"); +} + +void cdlua_open(void) +{ + char version[50]; + lua_Object imlua_tag; + + cdlua_namespace = lua_createtable(); + lua_pushobject(cdlua_namespace); lua_setglobal ("cd"); + + sprintf(version, "CDLua %s", cdVersion()); + lua_pushstring(version); lua_setglobal ("CDLUA_VERSION"); + setinfo(); + + /* check if IM has been initialized */ + imlua_tag = lua_getglobal("IMLUA_INSTALLED"); + + /* get IM defined tags, let IM handle with the user tag objects */ + if ((imlua_tag != LUA_NOOBJECT) && (!lua_isnil(imlua_tag))) + { + imlua_tag = lua_getglobal("IMLUA_COLOR_TAG"); + color_tag = (int) lua_getnumber(imlua_tag); + imlua_tag = lua_getglobal("IMLUA_IMAGERGB_TAG"); + imagergb_tag = (int) lua_getnumber(imlua_tag); + imlua_tag = lua_getglobal("IMLUA_IMAGERGBA_TAG"); + imagergba_tag = (int) lua_getnumber(imlua_tag); + imlua_tag = lua_getglobal("IMLUA_PALETTE_TAG"); + palette_tag = (int) lua_getnumber(imlua_tag); + imlua_tag = lua_getglobal("IMLUA_IMAGEMAP_TAG"); + imagemap_tag = (int) lua_getnumber(imlua_tag); + imlua_tag = lua_getglobal("IMLUA_CHANNEL_TAG"); + channel_tag = (int) lua_getnumber(imlua_tag); + imlua_tag = lua_getglobal("IMLUA_BITMAP_TAG"); + bitmap_tag = (int) lua_getnumber(imlua_tag); + } + else /* define CD own tags and fallbacks */ + { + /* create user tags */ + color_tag = lua_newtag(); + bitmap_tag = lua_newtag(); + imagergb_tag = lua_newtag(); + imagergba_tag = lua_newtag(); + imagemap_tag = lua_newtag(); + palette_tag = lua_newtag(); + channel_tag = lua_newtag(); + + /* hook "settable" and "gettable" tag methods */ + lua_pushcfunction(palettesettable_fb); lua_settagmethod(palette_tag, "settable"); + lua_pushcfunction(imagemapsettable_fb); lua_settagmethod(imagemap_tag, "settable"); + lua_pushcfunction(channelsettable_fb); lua_settagmethod(channel_tag, "settable"); + + lua_pushcfunction(palettegettable_fb); lua_settagmethod(palette_tag, "gettable"); + lua_pushcfunction(imagemapgettable_fb); lua_settagmethod(imagemap_tag, "gettable"); + lua_pushcfunction(channelgettable_fb); lua_settagmethod(channel_tag, "gettable"); + lua_pushcfunction(imagergbgettable_fb); lua_settagmethod(imagergb_tag, "gettable"); + lua_pushcfunction(imagergbagettable_fb); lua_settagmethod(imagergba_tag, "gettable"); + lua_pushcfunction(bitmapgettable_fb); lua_settagmethod(bitmap_tag, "gettable"); + + lua_pushcfunction(palettegc_fb); lua_settagmethod(palette_tag, "gc"); + lua_pushcfunction(imagemapgc_fb); lua_settagmethod(imagemap_tag, "gc"); + lua_pushcfunction(imagergbgc_fb); lua_settagmethod(imagergb_tag, "gc"); + lua_pushcfunction(imagergbagc_fb); lua_settagmethod(imagergba_tag, "gc"); + lua_pushcfunction(bitmapgc_fb); lua_settagmethod(bitmap_tag, "gc"); + } + + /* these are not handled by IM */ + stipple_tag = lua_newtag(); + pattern_tag = lua_newtag(); + image_tag = lua_newtag(); + canvas_tag = lua_newtag(); + state_tag = lua_newtag(); + + /* hook "settable" and "gettable" tag methods */ + lua_pushcfunction(stipplesettable_fb); lua_settagmethod(stipple_tag, "settable"); + lua_pushcfunction(patternsettable_fb); lua_settagmethod(pattern_tag, "settable"); + lua_pushcfunction(stipplegettable_fb); lua_settagmethod(stipple_tag, "gettable"); + lua_pushcfunction(patterngettable_fb); lua_settagmethod(pattern_tag, "gettable"); + + lua_pushcfunction(stipplegc_fb); lua_settagmethod(stipple_tag, "gc"); + lua_pushcfunction(patterngc_fb); lua_settagmethod(pattern_tag, "gc"); + lua_pushcfunction(stategc_fb); lua_settagmethod(state_tag, "gc"); + + /* register used tags in global context for other libraries use */ + lua_pushnumber(1.0f); lua_setglobal("CDLUA_INSTALLED"); + + lua_pushnumber(color_tag); lua_setglobal(COLOR_TAG); + lua_pushnumber(stipple_tag); lua_setglobal(STIPPLE_TAG); + lua_pushnumber(pattern_tag); lua_setglobal(PATTERN_TAG); + lua_pushnumber(image_tag); lua_setglobal(IMAGE_TAG); + lua_pushnumber(bitmap_tag); lua_setglobal(BITMAP_TAG); + lua_pushnumber(imagergb_tag); lua_setglobal(IMAGERGB_TAG); + lua_pushnumber(imagergba_tag); lua_setglobal(IMAGERGBA_TAG); + lua_pushnumber(imagemap_tag); lua_setglobal(IMAGEMAP_TAG); + lua_pushnumber(palette_tag); lua_setglobal(PALETTE_TAG); + lua_pushnumber(channel_tag); lua_setglobal(CHANNEL_TAG); + lua_pushnumber(canvas_tag); lua_setglobal(CANVAS_TAG); + lua_pushnumber(state_tag); lua_setglobal(STATE_TAG); + + /* registered cd functions */ + cdlua_register("cdSaveState", cdlua_savestate); + cdlua_register("cdRestoreState", cdlua_restorestate); + cdlua_register("cdReleaseState", cdlua_releasestate); + cdlua_register("cdCreateCanvas", cdlua_createcanvas); + cdlua_register("cdContextCaps", cdlua_contextcaps); + cdlua_register("cdGetContext", cdlua_getcontext); + cdlua_register("cdActivate", cdlua_activate); + cdlua_register("cdActiveCanvas", cdlua_activecanvas); + cdlua_register("cdKillCanvas", cdlua_killcanvas); + cdlua_register("cdCreateStipple", cdlua_createstipple); + cdlua_register("cdGetStipple", cdlua_getstipple); + cdlua_register("cdKillStipple", cdlua_killstipple); + cdlua_register("cdCreatePattern", cdlua_createpattern); + cdlua_register("cdGetPattern", cdlua_getpattern); + cdlua_register("cdKillPattern", cdlua_killpattern); + cdlua_register("cdCreatePalette", cdlua_createpalette); + cdlua_register("cdKillPalette", cdlua_killpalette); + cdlua_register("cdCreateImage", cdlua_createimage); + cdlua_register("cdKillImage", cdlua_killimage); + cdlua_register("cdImageRGB", cdlua_imagergb); + cdlua_register("cdImageRGBBitmap", cdlua_imagergbbitmap); + cdlua_register("cdCreateImageRGB", cdlua_createimagergb); + cdlua_register("cdKillImageRGB", cdlua_killimagergb); + cdlua_register("cdCreateImageRGBA", cdlua_createimagergba); + cdlua_register("cdKillImageRGBA", cdlua_killimagergba); + cdlua_register("cdCreateImageMap", cdlua_createimagemap); + cdlua_register("cdKillImageMap", cdlua_killimagemap); + + cdlua_register("cdRegisterCallback", cdlua_registercallback); + cdlua_register("cdEncodeColor", cdlua_encodecolor); + cdlua_register("cdDecodeColor", cdlua_decodecolor); + cdlua_register("cdEncodeAlpha", cdlua_encodealpha); + cdlua_register("cdDecodeAlpha", cdlua_decodealpha); + cdlua_register("cdReserved", cdlua_reserved); + cdlua_register("cdBlue", cdlua_blue); + cdlua_register("cdGreen", cdlua_green); + cdlua_register("cdRed", cdlua_red); + cdlua_register("cdAlpha", cdlua_alpha); + cdlua_register("cdForeground", cdlua_foreground); + cdlua_register("cdBackground", cdlua_background); + cdlua_register("cdUpdateYAxis", cdlua_updateyaxis); + cdlua_register("cdFontDim", cdlua_fontdim); + cdlua_register("cdGetCanvasSize", cdlua_getcanvassize); + cdlua_register("cdGetClipPoly", cdlua_getclippoly); + cdlua_register("cdGetClipArea", cdlua_getcliparea); + cdlua_register("cdRegionBox", cdlua_RegionBox); + cdlua_register("cdGetImage", cdlua_getimage); + cdlua_register("cdGetImageRGB", cdlua_getimagergb); + cdlua_register("cdMM2Pixel", cdlua_mm2pixel); + cdlua_register("cdPalette", cdlua_palette); + cdlua_register("cdPattern", cdlua_pattern); + cdlua_register("cdPixel", cdlua_pixel); + cdlua_register("cdPixel2MM", cdlua_pixel2mm); + cdlua_register("cdPlay", cdlua_play); + cdlua_register("cdPutImage", cdlua_putimage); + cdlua_register("cdRGB2Map", cdlua_rgb2map); + cdlua_register("cdPutImageRGB", cdlua_putimagergb); + cdlua_register("cdPutImageRectRGB", cdlua_putimagerectrgb); + cdlua_register("cdPutImageRGBA", cdlua_putimagergba); + cdlua_register("cdPutImageRectRGBA", cdlua_putimagerectrgba); + cdlua_register("cdPutImageMap", cdlua_putimagemap); + cdlua_register("cdPutImageRectMap", cdlua_putimagerectmap); + cdlua_register("cdPutImageRect", cdlua_putimagerect); + cdlua_register("cdStipple", cdlua_stipple); + cdlua_register("cdTextSize", cdlua_textsize); + cdlua_register("cdTextBox", cdlua_textbox); + cdlua_register("cdTextBounds", cdlua_textbounds); + cdlua_register("cdGetFont", cdlua_getfont); + cdlua_register("cdVersion", cdlua_version); + cdlua_register("cdGetVectorTextSize", cdlua_getvectortextsize); + cdlua_register("cdVectorTextTransform", cdlua_vectortexttransform); + cdlua_register("cdVectorTextBounds", cdlua_vectortextbounds); + cdlua_register("cdCreateBitmap", cdlua_createbitmap); + cdlua_register("cdKillBitmap", cdlua_killbitmap); + cdlua_register("cdBitmapSetRect", cdlua_bitmapsetrect); + cdlua_register("cdPutBitmap", cdlua_putbitmap); + cdlua_register("cdGetBitmap", cdlua_getbitmap); + cdlua_register("cdBitmapRGB2Map", cdlua_rgb2mapex); + cdlua_register("cdLineStyleDashes", cdlua_LineStyleDashes); + + /* registered wd functions */ + cdlua_register("wdHardcopy", wdlua_hardcopy); + cdlua_register("wdPutBitmap", wdlua_putbitmap); + cdlua_register("wdGetWindow", wdlua_getwindow); + cdlua_register("wdGetViewport", wdlua_getviewport); + cdlua_register("wdWorld2Canvas", wdlua_world2canvas); + cdlua_register("wdCanvas2World", wdlua_canvas2world); + cdlua_register("wdGetClipArea", wdlua_getcliparea); + cdlua_register("wdRegionBox", wdlua_RegionBox); + cdlua_register("wdMM2Pixel", cdlua_mm2pixel); + cdlua_register("wdPixel2MM", cdlua_pixel2mm); + cdlua_register("wdFontDim", wdlua_fontdim); + cdlua_register("wdGetFont", wdlua_getfont); + cdlua_register("wdTextSize", wdlua_textsize); + cdlua_register("wdGetVectorTextSize", wdlua_getvectortextsize); + cdlua_register("wdVectorTextBounds", wdlua_vectortextbounds); + cdlua_register("wdPixel", wdlua_pixel); + cdlua_register("wdTextBox", wdlua_textbox); + cdlua_register("wdTextBounds", wdlua_textbounds); + cdlua_register("wdPutImageRectRGB", wdlua_putimagerectrgb); + cdlua_register("wdPutImageRectRGBA", wdlua_putimagerectrgba); + cdlua_register("wdPutImageRectMap", wdlua_putimagerectmap); + cdlua_register("wdPutImageRect", wdlua_putimagerect); + cdlua_register("wdStipple", wdlua_stipple); + cdlua_register("wdPattern", wdlua_pattern); + cdlua_register("wdGetClipPoly", wdlua_getclippoly); + + cdlua_initdrivers(); + + /* color constants */ + cdlua_pushcolor(CD_RED, "CD_RED"); + cdlua_pushcolor(CD_DARK_RED, "CD_DARK_RED"); + cdlua_pushcolor(CD_GREEN, "CD_GREEN"); + cdlua_pushcolor(CD_DARK_GREEN, "CD_DARK_GREEN"); + cdlua_pushcolor(CD_BLUE, "CD_BLUE"); + cdlua_pushcolor(CD_DARK_BLUE, "CD_DARK_BLUE"); + cdlua_pushcolor(CD_YELLOW, "CD_YELLOW"); + cdlua_pushcolor(CD_DARK_YELLOW, "CD_DARK_YELLOW"); + cdlua_pushcolor(CD_MAGENTA, "CD_MAGENTA"); + cdlua_pushcolor(CD_DARK_MAGENTA, "CD_DARK_MAGENTA"); + cdlua_pushcolor(CD_CYAN, "CD_CYAN"); + cdlua_pushcolor(CD_DARK_CYAN, "CD_DARK_CYAN"); + cdlua_pushcolor(CD_WHITE, "CD_WHITE"); + cdlua_pushcolor(CD_BLACK, "CD_BLACK"); + cdlua_pushcolor(CD_DARK_GRAY, "CD_DARK_GRAY"); + cdlua_pushcolor(CD_GRAY, "CD_GRAY"); + + /* cdplay constants */ + cdlua_pushnumber(CD_SIZECB, "CD_SIZECB"); + + /* create void canvas used when there is no active canvas to avoid protection faults */ + void_canvas = cdCreateCanvas(CD_VOID, NULL); + cdActivate(void_canvas); + + /* initialize toLua implementation */ + luaL_cd_open(); + luaL_wd_open(); +} + +void cdlua_close(void) +{ + cdKillCanvas(void_canvas); +} diff --git a/cd/src/lua3/cdlua.def b/cd/src/lua3/cdlua.def new file mode 100755 index 0000000..68b0ee4 --- /dev/null +++ b/cd/src/lua3/cdlua.def @@ -0,0 +1,7 @@ +EXPORTS + cdlua_open + cdlua_close + cdlua_getcanvas + cdlua_addcontext + cdlua_checkcanvas + cdlua_pushcanvas \ No newline at end of file diff --git a/cd/src/lua3/cdluactx.c b/cd/src/lua3/cdluactx.c new file mode 100755 index 0000000..fc09313 --- /dev/null +++ b/cd/src/lua3/cdluactx.c @@ -0,0 +1,950 @@ +/***************************************************************************\ +* CDLUA.C, for LUA 3.1 * +* Diego Fernandes Nehab, Antonio Escano Scuri * +* 01/99 * +\***************************************************************************/ + +#include +#include +#include +#include + +#include "cd.h" +#include "wd.h" + +#include "cdimage.h" +#include "cdirgb.h" +#include "cddxf.h" +#include "cddgn.h" +#include "cdcgm.h" +#include "cdwmf.h" +#include "cdemf.h" +#include "cdnative.h" +#include "cdprint.h" +#include "cdclipbd.h" +#include "cdmf.h" +#include "cdps.h" +#include "cddbuf.h" +#include "cdgdiplus.h" + +#include +#include + +#include "cdlua.h" +#include "cdlua3_private.h" + + +/***************************************************************************\ +* CD_CGM. * +\***************************************************************************/ +static void *cdcgm_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_CGM: data should be of type string!"); + + return lua_getstring(data); +} + +static int cgm_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h); +static int cgm_countercb(cdCanvas *canvas, double percent); +static int cgm_sclmdecb(cdCanvas *canvas, short scl_mde, short *draw_mode_i, double *factor_f); +static int cgm_vdcextcb(cdCanvas *canvas, short type, void *xmn, void *ymn, void *xmx, void *ymx); +static int cgm_begpictcb(cdCanvas *canvas, char *pict); +static int cgm_begpictbcb(cdCanvas *canvas); +static int cgm_begmtfcb(cdCanvas *canvas, int *xmn, int *ymn, int *xmx, int *ymx); + +static cdCallbackLUA cdluacgmcb[7] = { +{ + -1, + "CD_SIZECB", + (cdCallback)cgm_sizecb +}, +{ + -1, + "CD_CGMCOUNTERCB", + (cdCallback)cgm_countercb +}, +{ + -1, + "CD_CGMSCLMDECB", + (cdCallback)cgm_sclmdecb +}, +{ + -1, + "CD_CGMVDCEXTCB", + (cdCallback)cgm_vdcextcb +}, +{ + -1, + "CD_CGMBEGPICTCB", + (cdCallback)cgm_begpictcb +}, +{ + -1, + "CD_CGMBEGPICTBCB", + (cdCallback)cgm_begpictbcb +}, +{ + -1, + "CD_CGMBEGMTFCB", + (cdCallback)cgm_begmtfcb +} +}; + +static cdContextLUA cdluacgmctx = +{ + 0, + "CD_CGM", + cdContextCGM, + cdcgm_checkdata, + cdluacgmcb, + 7 +}; + +/***************************************************************************\ +* CGM CD_COUNTERCB. * +\***************************************************************************/ +static int cgm_countercb(cdCanvas *canvas, double percent) +{ + lua_Object func, result; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluacgmcb[CD_CGMCOUNTERCB].lock); + + cdlua_pushcanvas(canvas); + lua_pushnumber( percent); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_CGMCOUNTERCB: invalid return value!"); + result_i = (int) lua_getnumber(result); + + lua_endblock(); + + return result_i; +} + +/***************************************************************************\ +* CGM CD_BEGPICTCB. * +\***************************************************************************/ +static int cgm_begpictcb(cdCanvas *canvas, char *pict) +{ + lua_Object func, result; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluacgmcb[CD_CGMBEGPICTCB].lock); + + cdlua_pushcanvas(canvas); + lua_pushstring(pict); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_CGMBEGPICTCB: invalid return value!"); + result_i = (int) lua_getnumber(result); + + lua_endblock(); + + return result_i; +} + +static int cgm_begmtfcb(cdCanvas *canvas, int *xmn, int *ymn, int *xmx, int *ymx) +{ + lua_Object func, result, xmn_l, ymn_l, xmx_l, ymx_l; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluacgmcb[CD_CGMBEGMTFCB].lock); + + cdlua_pushcanvas(canvas); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_CGMBEGMTFCB: invalid return value!"); + result_i = (int) lua_getnumber(result); + if (result_i == 1) { + lua_endblock(); + return 1; + } + + xmn_l = lua_getresult(2); + if (!lua_isnumber(xmn_l)) + lua_error("cdPlay: CD_CGMBEGMTFCB: invalid xmn return value!"); + *xmn = (int) lua_getnumber(xmn_l); + + ymn_l = lua_getresult(3); + if (!lua_isnumber(ymn_l)) + lua_error("cdPlay: CD_CGMBEGMTFCB: invalid ymn return value!"); + *ymn = (int) lua_getnumber(ymn_l); + + xmx_l = lua_getresult(4); + if (!lua_isnumber(xmx_l)) + lua_error("cdPlay: CD_CGMBEGMTFCB: invalid xmx return value!"); + *xmx = (int) lua_getnumber(xmx_l); + + ymx_l = lua_getresult(5); + if (!lua_isnumber(ymx_l)) + lua_error("cdPlay: CD_CGMBEGMTFCB: invalid ymx return value!"); + *ymx = (int) lua_getnumber(ymx_l); + + lua_endblock(); + + return result_i; +} + +/***************************************************************************\ +* CGM CD_BEGPICTBCB. * +\***************************************************************************/ +static int cgm_begpictbcb(cdCanvas *canvas) +{ + lua_Object func, result; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluacgmcb[CD_CGMBEGPICTBCB].lock); + + cdlua_pushcanvas(canvas); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_CGMBEGPICTBCB: invalid return value!"); + result_i = (int) lua_getnumber(result); + + lua_endblock(); + + return result_i; +} + +/***************************************************************************\ +* CGM CD_SIZECB. * +\***************************************************************************/ +static int cgm_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) +{ + lua_Object func, result; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluacgmcb[CD_SIZECB].lock); + + cdlua_pushcanvas(canvas); + lua_pushnumber( w); + lua_pushnumber( h); + lua_pushnumber( mm_w); + lua_pushnumber( mm_h); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_SIZECB: invalid return value!"); + result_i = (int) lua_getnumber(result); + + lua_endblock(); + + return result_i; +} + +/***************************************************************************\ +* CGM CD_SCLMDE. * +\***************************************************************************/ +static int cgm_sclmdecb(cdCanvas *canvas, short scl_mde, short *draw_mode_i, double *factor_f) +{ + lua_Object func, result, draw_mode, factor; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluacgmcb[CD_CGMSCLMDECB].lock); + + cdlua_pushcanvas(canvas); + lua_pushnumber( scl_mde); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_CGMSCLMDECB: invalid return value!"); + result_i = (int) lua_getnumber(result); + if (result_i == 1) { + lua_endblock(); + return 1; + } + + draw_mode = lua_getresult(2); + if (!lua_isnumber(draw_mode)) + lua_error("cdPlay: CD_CGMSCLMDECB: invalid draw_mode return value!"); + *draw_mode_i = (short) lua_getnumber(draw_mode); + + factor = lua_getresult(3); + if (!lua_isnumber(factor)) + lua_error("cdPlay: CD_CGMSCLMDECB: invalid factor return value!"); + *factor_f = (double) lua_getnumber(factor); + + lua_endblock(); + + return result_i; +} + +/***************************************************************************\ +* CGM CD_VDCEXTCB. * +\***************************************************************************/ +static int cgm_vdcextcb(cdCanvas *canvas, short type, void *xmn, void *ymn, void *xmx, void *ymx) +{ + lua_Object func, result, xmn_l, ymn_l, xmx_l, ymx_l; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluacgmcb[CD_CGMVDCEXTCB].lock); + + cdlua_pushcanvas(canvas); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_CGMVDCEXTCB: invalid return value!"); + result_i = (int) lua_getnumber(result); + if (result_i == 1) { + lua_endblock(); + return 1; + } + + xmn_l = lua_getresult(2); + if (!lua_isnumber(xmn_l)) + lua_error("cdPlay: CD_CGMVDCEXTCB: invalid xmn return value!"); + if (type == 1) *((float *) xmn) = (float) lua_getnumber(xmn_l); + else *((int *) xmn) = (int) lua_getnumber(xmn_l); + + ymn_l = lua_getresult(3); + if (!lua_isnumber(ymn_l)) + lua_error("cdPlay: CD_CGMVDCEXTCB: invalid ymn return value!"); + if (type == 1) *((float *) ymn) = (float) lua_getnumber(ymn_l); + else *((int *) ymn) = (int) lua_getnumber(ymn_l); + + xmx_l = lua_getresult(4); + if (!lua_isnumber(xmx_l)) + lua_error("cdPlay: CD_CGMVDCEXTCB: invalid xmx return value!"); + if (type == 1) *((float *) xmx) = (float) lua_getnumber(xmx_l); + else *((int *) xmx) = (int) lua_getnumber(xmx_l); + + ymx_l = lua_getresult(5); + if (!lua_isnumber(ymx_l)) + lua_error("cdPlay: CD_CGMVDCEXTCB: invalid ymx return value!"); + if (type == 1) *((float *) ymx) = (float) lua_getnumber(ymx_l); + else *((int *) ymx) = (int) lua_getnumber(ymx_l); + + lua_endblock(); + + return result_i; +} + +/***************************************************************************\ +* CD_DBUFFER. * +\***************************************************************************/ +static void *cddbuf_checkdata(int param) +{ + canvas_t *canvas_p; + lua_Object canvas; + int canvas_tag = (int)lua_getnumber(lua_getglobal(CANVAS_TAG)); + + canvas = lua_getparam(param); + if (lua_isnil(canvas)) + lua_error("cdCreateCanvas CD_DBUFFER: data is a NIL canvas!"); + + if (lua_tag(canvas) != canvas_tag) + lua_error("cdCreateCanvas CD_DBUFFER: data should be of type canvas_tag!"); + + canvas_p = (canvas_t *) lua_getuserdata(canvas); + if (!canvas_p->cd_canvas) + lua_error("cdCreateCanvas CD_DBUFFER: data is a killed canvas!"); + + return canvas_p->cd_canvas; +} + +static cdContextLUA cdluadbufctx = +{ + 0, + "CD_DBUFFER", + cdContextDBuffer, + cddbuf_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_IMAGE. * +\***************************************************************************/ +static void *cdimage_checkdata(int param) +{ + int image_tag; + image_t *image_p; + lua_Object image = lua_getparam(param); + if (lua_isnil(image)) + lua_error("cdCreateCanvas CD_IMAGE: data is a NIL image!"); + + image_tag = (int)lua_getnumber(lua_getglobal(IMAGE_TAG)); + if (lua_tag(image) != image_tag) + lua_error("cdCreateCanvas CD_IMAGE: data should be of type image_tag!"); + + image_p = (image_t *) lua_getuserdata(image); + if (!image_p->cd_image) + lua_error("cdCreateCanvas CD_IMAGE: data is a killed image!"); + + return image_p->cd_image; +} + +static cdContextLUA cdluaimagectx = +{ + 0, + "CD_IMAGE", + cdContextImage, + cdimage_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_IMAGERGB. * +\***************************************************************************/ +static void *cdimagergb_checkdata(int param) +{ + lua_Object imagergb; + static char data_s[50]; + + imagergb = lua_getparam(param); + if (lua_isnil(imagergb)) + lua_error("cdCreateCanvas CD_IMAGERGB: data is a NIL imagergb!"); + + if (lua_isstring(imagergb)) + { + char* str = lua_getstring(imagergb); + strcpy(data_s, str); + } + else + { + lua_Object res; + int bitmap_tag = (int)lua_getnumber(lua_getglobal(BITMAP_TAG)); + + if (lua_tag(imagergb) == bitmap_tag) + { + bitmap_t *imagergb_p; + + imagergb_p = (bitmap_t *) lua_getuserdata(imagergb); + if (!imagergb_p->image) + lua_error("cdCreateCanvas CD_IMAGERGB: data is a killed imagergb!"); + + if (imagergb_p->image->type != CD_RGB && imagergb_p->image->type != CD_RGBA) + lua_error("cdCreateCanvas CD_IMAGERGB: bitmap should be of type rgb or rgba!"); + + res = lua_getparam(param+1); + if (res == LUA_NOOBJECT || lua_isnil(res)) + { + if (imagergb_p->image->type == CD_RGBA) + sprintf(data_s, "%dx%d %p %p %p %p -a", imagergb_p->image->w, imagergb_p->image->h, + cdBitmapGetData(imagergb_p->image, CD_IRED), + cdBitmapGetData(imagergb_p->image, CD_IGREEN), + cdBitmapGetData(imagergb_p->image, CD_IBLUE), + cdBitmapGetData(imagergb_p->image, CD_IALPHA)); + else + sprintf(data_s, "%dx%d %p %p %p", imagergb_p->image->w, imagergb_p->image->h, + cdBitmapGetData(imagergb_p->image, CD_IRED), + cdBitmapGetData(imagergb_p->image, CD_IGREEN), + cdBitmapGetData(imagergb_p->image, CD_IBLUE)); + } + else + { + double res_f = lua_getnumber(res); + if (imagergb_p->image->type == CD_RGBA) + sprintf(data_s, "%dx%d %p %p %p %p -r%g -a", imagergb_p->image->w, imagergb_p->image->h, + cdBitmapGetData(imagergb_p->image, CD_IRED), + cdBitmapGetData(imagergb_p->image, CD_IGREEN), + cdBitmapGetData(imagergb_p->image, CD_IBLUE), + cdBitmapGetData(imagergb_p->image, CD_IALPHA), + res_f); + else + sprintf(data_s, "%dx%d %p %p %p -r%g", imagergb_p->image->w, imagergb_p->image->h, + cdBitmapGetData(imagergb_p->image, CD_IRED), + cdBitmapGetData(imagergb_p->image, CD_IGREEN), + cdBitmapGetData(imagergb_p->image, CD_IBLUE), + res_f); + } + } + else + { + imagergb_t *imagergb_p; + int imagergb_tag = (int)lua_getnumber(lua_getglobal(IMAGERGB_TAG)); + + if (lua_tag(imagergb) != imagergb_tag) + { + imagergba_t *imagergba_p; + int imagergba_tag = (int)lua_getnumber(lua_getglobal(IMAGERGBA_TAG)); + if (lua_tag(imagergb) != imagergba_tag) + lua_error("cdCreateCanvas CD_IMAGERGB: data should be of type imagergb_tag or imagergba_tag!"); + + imagergba_p = (imagergba_t *) lua_getuserdata(imagergb); + if (!(imagergba_p->red && imagergba_p->green && imagergba_p->blue)) + lua_error("cdCreateCanvas CD_IMAGERGB: data is a killed imagergba!"); + + res = lua_getparam(param+1); + if (res == LUA_NOOBJECT || lua_isnil(res)) + { + sprintf(data_s, "%dx%d %p %p %p", imagergba_p->width, imagergba_p->height, + imagergba_p->red, imagergba_p->green, imagergba_p->blue); + } + else + { + double res_f = lua_getnumber(res); + sprintf(data_s, "%dx%d %p %p %p -r%g", imagergba_p->width, imagergba_p->height, + imagergba_p->red, imagergba_p->green, imagergba_p->blue, res_f); + } + + return data_s; + } + + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!(imagergb_p->red && imagergb_p->green && imagergb_p->blue)) + lua_error("cdCreateCanvas CD_IMAGERGB: data is a killed imagergb!"); + + res = lua_getparam(param+1); + if (res == LUA_NOOBJECT || lua_isnil(res)) + { + sprintf(data_s, "%dx%d %p %p %p", imagergb_p->width, imagergb_p->height, + imagergb_p->red, imagergb_p->green, imagergb_p->blue); + } + else + { + double res_f = lua_getnumber(res); + sprintf(data_s, "%dx%d %p %p %p -r%g", imagergb_p->width, imagergb_p->height, + imagergb_p->red, imagergb_p->green, imagergb_p->blue, res_f); + } + } + } + + return data_s; +} + +static cdContextLUA cdluaimagergbctx = +{ + 0, + "CD_IMAGERGB", + cdContextImageRGB, + cdimagergb_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_DXF. * +\***************************************************************************/ +static void *cddxf_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_DXF: data should be of type string!"); + + return lua_getstring(data); +} + +static cdContextLUA cdluadxfctx = +{ + 0, + "CD_DXF", + cdContextDXF, + cddxf_checkdata +}; + +/***************************************************************************\ +* CD_DGN. * +\***************************************************************************/ +static void *cddgn_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_DGN: data should be of type string!"); + + return lua_getstring(data); +} + +static cdContextLUA cdluadgnctx = +{ + 0, + "CD_DGN", + cdContextDGN, + cddgn_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_WMF. * +\***************************************************************************/ +static void *cdwmf_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_WMF: data should be of type string!"); + + return lua_getstring(data); +} + +static int wmf_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h); + +static cdCallbackLUA cdluawmfcb[1] = +{{ + -1, + "CD_SIZECB", + (cdCallback)wmf_sizecb +}}; + +static cdContextLUA cdluawmfctx = +{ + 0, + "CD_WMF", + cdContextWMF, + cdwmf_checkdata, + cdluawmfcb, + 1 +}; + +/***************************************************************************\ +* WMF CD_SIZECB. * +\***************************************************************************/ +static int wmf_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) +{ + lua_Object func, result; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluawmfcb[CD_SIZECB].lock); + + cdlua_pushcanvas(canvas); + lua_pushnumber( w); + lua_pushnumber( h); + lua_pushnumber( mm_w); + lua_pushnumber( mm_h); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_SIZECB: invalid return value!"); + result_i = (int) lua_getnumber(result); + + lua_endblock(); + + return result_i; +} + +/***************************************************************************\ +* CD_EMF. * +\***************************************************************************/ +static void *cdemf_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_EMF: data should be of type string!"); + + return lua_getstring(data); +} + +static int emf_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h); + +static cdCallbackLUA cdluaemfcb[1] = +{{ + -1, + "CD_SIZECB", + (cdCallback)emf_sizecb +}}; + +static cdContextLUA cdluaemfctx = +{ + 0, + "CD_EMF", + cdContextEMF, + cdemf_checkdata, + cdluaemfcb, + 1 +}; + +/***************************************************************************\ +* EMF CD_SIZECB. * +\***************************************************************************/ +static int emf_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) +{ + lua_Object func, result; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluaemfcb[CD_SIZECB].lock); + + cdlua_pushcanvas(canvas); + lua_pushnumber( w); + lua_pushnumber( h); + lua_pushnumber( mm_w); + lua_pushnumber( mm_h); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_SIZECB: invalid return value!"); + result_i = (int) lua_getnumber(result); + + lua_endblock(); + + return result_i; +} + +/***************************************************************************\ +* CD_METAFILE. * +\***************************************************************************/ +static void *cdmetafile_checkdata(int param) +{ + lua_Object data; + + data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_METAFILE: data should be of type string!"); + + return lua_getstring(data); +} + +static int metafile_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h); + +static cdCallbackLUA cdluamfcb[1] = +{{ + -1, + "CD_SIZECB", + (cdCallback)metafile_sizecb +}}; + +static cdContextLUA cdluamfctx = +{ + 0, + "CD_METAFILE", + cdContextMetafile, + cdmetafile_checkdata, + cdluamfcb, + 1 +}; + +/***************************************************************************\ +* METAFILE CD_SIZECB. * +\***************************************************************************/ +static int metafile_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) +{ + lua_Object func, result; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluamfcb[CD_SIZECB].lock); + + cdlua_pushcanvas(canvas); + lua_pushnumber( w); + lua_pushnumber( h); + lua_pushnumber( mm_w); + lua_pushnumber( mm_h); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_SIZECB: invalid return value!"); + result_i = (int) lua_getnumber(result); + + lua_endblock(); + + return result_i; +} + +/***************************************************************************\ +* CD_PS. * +\***************************************************************************/ +static void *cdps_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_PS: data should be of type string!"); + + return lua_getstring(data); +} + +static cdContextLUA cdluapsctx = +{ + 0, + "CD_PS", + cdContextPS, + cdps_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_PRINTER. * +\***************************************************************************/ +static void *cdprinter_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_PRINTER: data should be of type string!"); + + return lua_getstring(data); +} + +static cdContextLUA cdluaprinterctx = +{ + 0, + "CD_PRINTER", + cdContextPrinter, + cdprinter_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_CLIPBOARD. * +\***************************************************************************/ +static void *cdclipboard_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_CLIPBOARD: data should be of type string!"); + + return lua_getstring(data); +} + +static int clipboard_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h); + +static cdCallbackLUA cdluaclipboardcb[1] = +{{ + -1, + "CD_SIZECB", + (cdCallback)clipboard_sizecb +}}; + +static cdContextLUA cdluaclipboardctx = +{ + 0, + "CD_CLIPBOARD", + cdContextClipboard, + cdclipboard_checkdata, + cdluaclipboardcb, + 1 +}; + +/***************************************************************************\ +* CLIPBOARD CD_SIZECB. * +\***************************************************************************/ +static int clipboard_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) +{ + lua_Object func, result; + int result_i; + + lua_beginblock(); + func = lua_getref(cdluaclipboardcb[CD_SIZECB].lock); + + cdlua_pushcanvas(canvas); + lua_pushnumber( w); + lua_pushnumber( h); + lua_pushnumber( mm_w); + lua_pushnumber( mm_h); + lua_callfunction(func); + + result = lua_getresult(1); + if (!lua_isnumber(result)) + lua_error("cdPlay: CD_SIZECB: invalid return value!"); + result_i = (int) lua_getnumber(result); + + lua_endblock(); + + return result_i; +} + +/***************************************************************************\ +* CD_NATIVEWINDOW. * +\***************************************************************************/ +static void *cdnativewindow_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + +#ifdef WIN32 + if (!lua_isuserdata(data)) + lua_error("cdCreateCanvas CD_NATIVEWINDOW: data should be of type userdata!"); + + return lua_getuserdata(data); +#else + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_NATIVEWINDOW: data should be of type string!"); + + return lua_getstring(data); +#endif +} + +static cdContextLUA cdluanativewindowctx = +{ + 0, + "CD_NATIVEWINDOW", + cdContextNativeWindow, + cdnativewindow_checkdata, + NULL, + 0 +}; + +static void cdlua_getscreensize(void) +{ + int width; + int height; + double mm_width; + double mm_height; + + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("cdGetScreenSize: too many parameters!"); + + cdGetScreenSize(&width, &height, &mm_width, &mm_height); + lua_pushnumber( width); + lua_pushnumber( height); + lua_pushnumber( mm_width); + lua_pushnumber( mm_height); +} + +static void cdlua_getscreencolorplanes(void) +{ + int L_result = cdGetScreenColorPlanes(); + lua_pushnumber(L_result); +} + +static void cdlua_usecontextplus(void) +{ + int use = (int)luaL_check_number(1); + int L_result = cdUseContextPlus(use); + lua_pushnumber(L_result); +} + +/*******************************************************************************/ + +void cdlua_initdrivers(void) +{ + cdlua_register("cdGetScreenColorPlanes",cdlua_getscreencolorplanes); + cdlua_register("cdGetScreenSize",cdlua_getscreensize); + + cdlua_register("cdUseContextPlus",cdlua_usecontextplus); + + /* from GDI+ addicional polygon modes */ + cdlua_pushnumber(CD_SPLINE, "CD_SPLINE"); + cdlua_pushnumber(CD_FILLSPLINE, "CD_FILLSPLINE"); + cdlua_pushnumber(CD_FILLGRADIENT, "CD_FILLGRADIENT"); + + cdlua_addcontext(&cdluaimagectx); + cdlua_addcontext(&cdluaimagergbctx); + cdlua_addcontext(&cdluadxfctx); + cdlua_addcontext(&cdluadgnctx); + cdlua_addcontext(&cdluacgmctx); + cdlua_addcontext(&cdluamfctx); + cdlua_addcontext(&cdluapsctx); + cdlua_addcontext(&cdluaclipboardctx); + cdlua_addcontext(&cdluanativewindowctx); + cdlua_addcontext(&cdluaprinterctx); + cdlua_addcontext(&cdluawmfctx); + cdlua_addcontext(&cdluaemfctx); + cdlua_addcontext(&cdluadbufctx); +} + diff --git a/cd/src/lua3/cdluapdf.c b/cd/src/lua3/cdluapdf.c new file mode 100755 index 0000000..1260b91 --- /dev/null +++ b/cd/src/lua3/cdluapdf.c @@ -0,0 +1,43 @@ +/** \file + * \brief PDF Canvas Lua 3 Binding + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "cd.h" +#include "cdpdf.h" + +#include +#include + +#include "cdlua.h" +#include "cdluapdf.h" +#include "cdlua3_private.h" + +static void *cdpdf_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_PDF: data should be of type string!"); + + return lua_getstring(data); +} + +static cdContextLUA cdluapdfctx = +{ + 0, + "CD_PDF", + cdContextPDF, + cdpdf_checkdata, + NULL, + 0 +}; + +void cdluapdf_open(void) +{ + cdlua_addcontext(&cdluapdfctx); +} + diff --git a/cd/src/lua3/cdluapdf.def b/cd/src/lua3/cdluapdf.def new file mode 100755 index 0000000..62a983f --- /dev/null +++ b/cd/src/lua3/cdluapdf.def @@ -0,0 +1,2 @@ +EXPORTS + cdluapdf_open \ No newline at end of file diff --git a/cd/src/lua3/cdvoid.c b/cd/src/lua3/cdvoid.c new file mode 100755 index 0000000..3c78738 --- /dev/null +++ b/cd/src/lua3/cdvoid.c @@ -0,0 +1,126 @@ +/** \file + * \brief CD Void driver for error checking while there is no active canvas + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#ifndef CD_NO_OLD_INTERFACE +#define CD_NO_OLD_INTERFACE +#endif + +#include "cd.h" +#include "cd_private.h" +#include +#include +#include "cdlua3_private.h" + + +struct _cdCtxCanvas +{ + cdCanvas* canvas; +}; + +static void cdcreatecanvas(cdCanvas *canvas, void *data) +{ + cdCtxCanvas *ctxcanvas = (cdCtxCanvas*) malloc(sizeof(cdCtxCanvas)); + ctxcanvas->canvas = canvas; + canvas->ctxcanvas = ctxcanvas; + (void)data; +} + +static void cdkillcanvas(cdCtxCanvas* ctxcanvas) +{ + free(ctxcanvas); +} + +/***************************************************************************\ +* Echos an error if called. * +\***************************************************************************/ +static void cdvoid_error(void) +{ + lua_error("cdlua: there is no active canvas!"); +} + +/***************************************************************************\ +* Dummy. * +\***************************************************************************/ +static int cdvoid_dummy(void) +{ + return CD_OK; +} + +/***************************************************************************\ +* Driver function table. * +\***************************************************************************/ + +void cdinittable(cdCanvas* canvas) +{ + /* attribute functions can not be set, because of default attributes */ + + canvas->cxClip = (int (*)(cdCtxCanvas*, int))cdvoid_error; + canvas->cxClipArea = (void (*)(cdCtxCanvas*, int, int, int, int))cdvoid_error; + canvas->cxNewRegion = (void (*)(cdCtxCanvas*))cdvoid_error; + canvas->cxIsPointInRegion = (int (*)(cdCtxCanvas*, int, int))cdvoid_error; + canvas->cxOffsetRegion = (void (*)(cdCtxCanvas*, int, int))cdvoid_error; + canvas->cxGetRegionBox = (void (*)(cdCtxCanvas*, int *, int *, int *, int *))cdvoid_error; + canvas->cxFlush = (void ( *)(cdCtxCanvas*))cdvoid_error; + canvas->cxClear = (void ( *)(cdCtxCanvas*))cdvoid_error; + canvas->cxPixel = (void ( *)(cdCtxCanvas*, int ,int ,long ))cdvoid_error; + canvas->cxLine = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ))cdvoid_error; + canvas->cxPoly = (void ( *)(cdCtxCanvas*, int ,struct _cdPoint *,int ))cdvoid_error; + canvas->cxRect = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ))cdvoid_error; + canvas->cxBox = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ))cdvoid_error; + canvas->cxArc = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ,double ,double ))cdvoid_error; + canvas->cxSector = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ,double ,double ))cdvoid_error; + canvas->cxChord = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ,double ,double ))cdvoid_error; + canvas->cxText = (void (*)(cdCtxCanvas*, int ,int ,const char *))cdvoid_error; + canvas->cxGetFontDim = (void (*)(cdCtxCanvas*, int *,int *,int *,int *))cdvoid_error; + canvas->cxGetTextSize = (void (*)(cdCtxCanvas*, const char *,int *,int *))cdvoid_error; + canvas->cxPutImageRectRGB = (void (*)(cdCtxCanvas*, int ,int ,const unsigned char *,const unsigned char *,const unsigned char *,int ,int ,int ,int ,int ,int ,int ,int ))cdvoid_error; + canvas->cxPutImageRectRGBA = (void (*)(cdCtxCanvas*, int ,int ,const unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *,int ,int ,int ,int ,int ,int ,int ,int ))cdvoid_error; + canvas->cxPutImageRectMap = (void (*)(cdCtxCanvas*, int ,int ,const unsigned char *,const long *,int ,int ,int ,int ,int ,int ,int ,int ))cdvoid_error; + canvas->cxScrollArea = (void (*)(cdCtxCanvas*, int ,int ,int ,int ,int ,int ))cdvoid_error; + canvas->cxFLine = (void (*)(cdCtxCanvas*, double ,double ,double ,double ))cdvoid_error; + canvas->cxFPoly = (void (*)(cdCtxCanvas*, int , cdfPoint*,int ))cdvoid_error; + canvas->cxFRect = (void (*)(cdCtxCanvas*, double ,double ,double ,double ))cdvoid_error; + canvas->cxFBox = (void (*)(cdCtxCanvas*, double ,double ,double ,double ))cdvoid_error; + canvas->cxFArc = (void (*)(cdCtxCanvas*, double ,double ,double ,double ,double ,double ))cdvoid_error; + canvas->cxFSector = (void (*)(cdCtxCanvas*, double ,double ,double ,double ,double ,double ))cdvoid_error; + canvas->cxFText = (void (*)(cdCtxCanvas*, double ,double ,const char *))cdvoid_error; + canvas->cxStipple = (void (*)(cdCtxCanvas*, int ,int ,const unsigned char *))cdvoid_error; + canvas->cxPattern = (void (*)(cdCtxCanvas*, int ,int , const long *))cdvoid_error; + canvas->cxNativeFont = (int (*)(cdCtxCanvas*, const char*))cdvoid_error; + canvas->cxPalette = (void (*)(cdCtxCanvas*, int ,const long *,int ))cdvoid_error; + canvas->cxGetImageRGB = (void (*)(cdCtxCanvas*, unsigned char *,unsigned char *,unsigned char *,int ,int ,int ,int ))cdvoid_error; + canvas->cxCreateImage = (cdCtxImage* (*)(cdCtxCanvas*, int ,int ))cdvoid_error; + canvas->cxGetImage = (void (*)(cdCtxCanvas*, cdCtxImage*, int ,int ))cdvoid_error; + canvas->cxPutImageRect = (void (*)(cdCtxCanvas*, cdCtxImage*,int ,int ,int ,int ,int ,int ))cdvoid_error; + canvas->cxKillImage = (void (*)(cdCtxImage*))cdvoid_error; + canvas->cxFClipArea = (void (*)(cdCtxCanvas*, double,double,double,double))cdvoid_error; + + /* must not be the error callback */ + canvas->cxActivate = (int (*)(cdCtxCanvas*))cdvoid_dummy; + canvas->cxDeactivate = (void (*)(cdCtxCanvas*))cdvoid_dummy; + canvas->cxFont = (int (*)(cdCtxCanvas*, const char *, int, int))cdvoid_dummy; + + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdVoidContext = +{ + 0, + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL +}; + +cdContext* cdContextVoid(void) +{ + return &cdVoidContext; +} + diff --git a/cd/src/lua3/cdvoid.h b/cd/src/lua3/cdvoid.h new file mode 100755 index 0000000..040f604 --- /dev/null +++ b/cd/src/lua3/cdvoid.h @@ -0,0 +1,17 @@ +#ifndef _CD_VOID_ +#define _CD_VOID_ + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextVoid(void); + +#define CD_VOID cdContextVoid() + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef _CD_VOID_ */ + diff --git a/cd/src/lua3/toluacd.c b/cd/src/lua3/toluacd.c new file mode 100755 index 0000000..5f29875 --- /dev/null +++ b/cd/src/lua3/toluacd.c @@ -0,0 +1,585 @@ +#include +#include +#include + +#include +#include + +#include "cd.h" +#include "cdps.h" + +#include "cdlua.h" +#include "cdlua3_private.h" + + +static void L_cdFlush(void) +{ + cdFlush(); +} + +static void L_cdClear(void) +{ + cdClear(); +} + +static void L_cdSimulate(void) +{ + int mode = (int)luaL_check_number(1); + int L_result = cdSimulate(mode); + lua_pushnumber(L_result); +} + +static void L_cdOrigin(void) +{ + int x = (int)luaL_check_number(1); + int y = (int)luaL_check_number(2); + cdOrigin(x,y); +} + +static void L_cdClip(void) +{ + int mode = (int)luaL_check_number(1); + int L_result = cdClip(mode); + lua_pushnumber(L_result); +} + +static void L_cdClipArea(void) +{ + int xmin = (int)luaL_check_number(1); + int xmax = (int)luaL_check_number(2); + int ymin = (int)luaL_check_number(3); + int ymax = (int)luaL_check_number(4); + cdClipArea(xmin,xmax,ymin,ymax); +} + +static void L_cdLine(void) +{ + int x1 = (int)luaL_check_number(1); + int y1 = (int)luaL_check_number(2); + int x2 = (int)luaL_check_number(3); + int y2 = (int)luaL_check_number(4); + cdLine(x1,y1,x2,y2); +} + +static void L_cdBox(void) +{ + int xmin = (int)luaL_check_number(1); + int xmax = (int)luaL_check_number(2); + int ymin = (int)luaL_check_number(3); + int ymax = (int)luaL_check_number(4); + cdBox(xmin,xmax,ymin,ymax); +} + +static void L_cdRect(void) +{ + int xmin = (int)luaL_check_number(1); + int xmax = (int)luaL_check_number(2); + int ymin = (int)luaL_check_number(3); + int ymax = (int)luaL_check_number(4); + cdRect(xmin,xmax,ymin,ymax); +} + +static void L_cdArc(void) +{ + int xc = (int)luaL_check_number(1); + int yc = (int)luaL_check_number(2); + int w = (int)luaL_check_number(3); + int h = (int)luaL_check_number(4); + double angle1 = (double)luaL_check_number(5); + double angle2 = (double)luaL_check_number(6); + cdArc(xc,yc,w,h,angle1,angle2); +} + +static void L_cdSector(void) +{ + int xc = (int)luaL_check_number(1); + int yc = (int)luaL_check_number(2); + int w = (int)luaL_check_number(3); + int h = (int)luaL_check_number(4); + double angle1 = (double)luaL_check_number(5); + double angle2 = (double)luaL_check_number(6); + cdSector(xc,yc,w,h,angle1,angle2); +} + +static void L_cdChord(void) +{ + int xc = (int)luaL_check_number(1); + int yc = (int)luaL_check_number(2); + int w = (int)luaL_check_number(3); + int h = (int)luaL_check_number(4); + double angle1 = (double)luaL_check_number(5); + double angle2 = (double)luaL_check_number(6); + cdChord(xc,yc,w,h,angle1,angle2); +} + +static void L_cdText(void) +{ + int x = (int)luaL_check_number(1); + int y = (int)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + cdText(x,y,s); +} + +static void L_cdBegin(void) +{ + int mode = (int)luaL_check_number(1); + cdBegin(mode); +} + +static void L_cdVertex(void) +{ + int x = (int)luaL_check_number(1); + int y = (int)luaL_check_number(2); + cdVertex(x,y); +} + +static void L_cdEnd(void) +{ + cdEnd(); +} + +static void L_cdMark(void) +{ + int x = (int)luaL_check_number(1); + int y = (int)luaL_check_number(2); + cdMark(x,y); +} + +static void L_cdOffsetRegion(void) +{ + int x = (int)luaL_check_number(1); + int y = (int)luaL_check_number(2); + cdOffsetRegion(x,y); +} + +static void L_cdPointInRegion(void) +{ + int x = (int)luaL_check_number(1); + int y = (int)luaL_check_number(2); + int L_result = cdPointInRegion(x,y); + lua_pushnumber((int)L_result); +} + +static void L_cdBackOpacity(void) +{ + int opacity = (int)luaL_check_number(1); + int L_result = cdBackOpacity(opacity); + lua_pushnumber(L_result); +} + +static void L_cdWriteMode(void) +{ + int mode = (int)luaL_check_number(1); + int L_result = cdWriteMode(mode); + lua_pushnumber(L_result); +} + +static void L_cdLineStyle(void) +{ + int style = (int)luaL_check_number(1); + int L_result = cdLineStyle(style); + lua_pushnumber(L_result); +} + +static void L_cdLineWidth(void) +{ + int width = (int)luaL_check_number(1); + int L_result = cdLineWidth(width); + lua_pushnumber(L_result); +} + +static void L_cdRegionCombineMode(void) +{ + int v = (int)luaL_check_number(1); + int L_result = cdRegionCombineMode(v); + lua_pushnumber(L_result); +} + +static void L_cdLineJoin(void) +{ + int v = (int)luaL_check_number(1); + int L_result = cdLineJoin(v); + lua_pushnumber(L_result); +} + +static void L_cdLineCap(void) +{ + int v = (int)luaL_check_number(1); + int L_result = cdLineCap(v); + lua_pushnumber(L_result); +} + +static void L_cdFillMode(void) +{ + int v = (int)luaL_check_number(1); + int L_result = cdFillMode(v); + lua_pushnumber(L_result); +} + +static void L_cdInteriorStyle(void) +{ + int style = (int)luaL_check_number(1); + int L_result = cdInteriorStyle(style); + lua_pushnumber(L_result); +} + +static void L_cdHatch(void) +{ + int style = (int)luaL_check_number(1); + int L_result = cdHatch(style); + lua_pushnumber(L_result); +} + +static void L_cdFont(void) +{ + int type_face = (int)luaL_check_number(1); + int style = (int)luaL_check_number(2); + int size = (int)luaL_check_number(3); + cdFont(type_face,style,size); +} + +static void L_cdNativeFont(void) +{ + char* font = (char*)luaL_check_string(1); + lua_pushstring(cdNativeFont(font)); +} + +static int cdlua_isuserdata(char* name) +{ + if (strcmp(name, "HDC")==0) return 1; + if (strcmp(name, "GC")==0) return 1; + return 0; +} + +static void L_cdSetAttribute(void) +{ + char* name = (char*)luaL_check_string(1); + lua_Object p2 = lua_getparam(2); + + if (p2 == LUA_NOOBJECT) + lua_error("cdSetAttribute: value parameter missing!"); + + /* if p2 is nil */ + if (lua_isnil(p2)) + { + cdSetAttribute(name, NULL); + } + else + { + char* data; + if (cdlua_isuserdata(name)) + data = (char*) lua_getuserdata(p2); + else + data = (char*)luaL_check_string(2); + cdSetAttribute(name, data); + } +} + +static void L_cdGetAttribute(void) +{ + char* name = (char*)luaL_check_string(1); + char* data = cdGetAttribute(name); + if (data) + { + if (cdlua_isuserdata(name)) + lua_pushuserdata(data); + else + lua_pushstring(data); + } + else + lua_pushnil(); +} + +static void L_cdTextAlignment(void) +{ + int alignment = (int)luaL_check_number(1); + int L_result = cdTextAlignment(alignment); + lua_pushnumber(L_result); +} + +static void L_cdTextOrientation(void) +{ + double angle = luaL_check_number(1); + double L_result = cdTextOrientation(angle); + lua_pushnumber(L_result); +} + +static void L_cdMarkType(void) +{ + int type = (int)luaL_check_number(1); + int L_result = cdMarkType(type); + lua_pushnumber(L_result); +} + +static void L_cdMarkSize(void) +{ + int size = (int)luaL_check_number(1); + int L_result = cdMarkSize(size); + lua_pushnumber(L_result); +} + +static void L_cdGetColorPlanes(void) +{ + int L_result = cdGetColorPlanes(); + lua_pushnumber(L_result); +} + +static void L_cdScrollArea(void) +{ + int xmin = (int)luaL_check_number(1); + int xmax = (int)luaL_check_number(2); + int ymin = (int)luaL_check_number(3); + int ymax = (int)luaL_check_number(4); + int dx = (int)luaL_check_number(5); + int dy = (int)luaL_check_number(6); + cdScrollArea(xmin,xmax,ymin,ymax,dx,dy); +} + +static void L_cdVectorFont(void) +{ + char* file = (char*)luaL_check_string(1); + char* L_result = cdVectorFont(file); + lua_pushstring(L_result); +} + +static void L_cdVectorTextDirection(void) +{ + int x1 = (int)luaL_check_number(1); + int y1 = (int)luaL_check_number(2); + int x2 = (int)luaL_check_number(3); + int y2 = (int)luaL_check_number(4); + cdVectorTextDirection(x1,y1,x2,y2); +} + +static void L_cdVectorTextSize(void) +{ + int size_x = (int)luaL_check_number(1); + int size_y = (int)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + cdVectorTextSize(size_x,size_y,s); +} + +static void L_cdVectorCharSize(void) +{ + int size = (int)luaL_check_number(1); + int L_result = cdVectorCharSize(size); + lua_pushnumber(L_result); +} + +static void L_cdVectorText(void) +{ + int x = (int)luaL_check_number(1); + int y = (int)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + cdVectorText(x,y,s); +} + +static void L_cdMultiLineVectorText(void) +{ + int x = (int)luaL_check_number(1); + int y = (int)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + cdMultiLineVectorText(x,y,s); +} + + +/* ---------------------------------------- public interface */ +int luaL_cd_open(void) +{ + cdlua_pushnumber(CD_CAP_NONE, "CD_CAP_NONE"); + cdlua_pushnumber(CD_CAP_FLUSH, "CD_CAP_FLUSH"); + cdlua_pushnumber(CD_CAP_CLEAR, "CD_CAP_CLEAR"); + cdlua_pushnumber(CD_CAP_PLAY, "CD_CAP_PLAY"); + cdlua_pushnumber(CD_CAP_YAXIS, "CD_CAP_YAXIS"); + cdlua_pushnumber(CD_CAP_CLIPAREA, "CD_CAP_CLIPAREA"); + cdlua_pushnumber(CD_CAP_CLIPPOLY, "CD_CAP_CLIPPOLY"); + cdlua_pushnumber(CD_CAP_RECT, "CD_CAP_RECT"); + cdlua_pushnumber(CD_CAP_IMAGERGB, "CD_CAP_IMAGERGB"); + cdlua_pushnumber(CD_CAP_IMAGERGBA, "CD_CAP_IMAGERGBA"); + cdlua_pushnumber(CD_CAP_IMAGEMAP, "CD_CAP_IMAGEMAP"); + cdlua_pushnumber(CD_CAP_GETIMAGERGB, "CD_CAP_GETIMAGERGB"); + cdlua_pushnumber(CD_CAP_IMAGESRV, "CD_CAP_IMAGESRV"); + cdlua_pushnumber(CD_CAP_BACKGROUND, "CD_CAP_BACKGROUND"); + cdlua_pushnumber(CD_CAP_BACKOPACITY, "CD_CAP_BACKOPACITY"); + cdlua_pushnumber(CD_CAP_WRITEMODE, "CD_CAP_WRITEMODE"); + cdlua_pushnumber(CD_CAP_LINESTYLE, "CD_CAP_LINESTYLE"); + cdlua_pushnumber(CD_CAP_LINEWITH, "CD_CAP_LINEWITH"); + cdlua_pushnumber(CD_CAP_FPRIMTIVES, "CD_CAP_FPRIMTIVES"); + cdlua_pushnumber(CD_CAP_HATCH, "CD_CAP_HATCH"); + cdlua_pushnumber(CD_CAP_STIPPLE, "CD_CAP_STIPPLE"); + cdlua_pushnumber(CD_CAP_PATTERN, "CD_CAP_PATTERN"); + cdlua_pushnumber(CD_CAP_FONT, "CD_CAP_FONT"); + cdlua_pushnumber(CD_CAP_FONTDIM, "CD_CAP_FONTDIM"); + cdlua_pushnumber(CD_CAP_TEXTSIZE, "CD_CAP_TEXTSIZE"); + cdlua_pushnumber(CD_CAP_TEXTORIENTATION, "CD_CAP_TEXTORIENTATION"); + cdlua_pushnumber(CD_CAP_PALETTE, "CD_CAP_PALETTE"); + cdlua_pushnumber(CD_CAP_ALL, "CD_CAP_ALL"); + cdlua_pushnumber(CD_CAP_LINECAP, "CD_CAP_LINECAP"); + cdlua_pushnumber(CD_CAP_LINEJOIN, "CD_CAP_LINEJOIN"); + cdlua_pushnumber(CD_CAP_REGION, "CD_CAP_REGION"); + cdlua_pushnumber(CD_CAP_CHORD, "CD_CAP_CHORD"); + cdlua_pushnumber(CD_SIM_FILLS, "CD_SIM_FILLS"); + cdlua_pushnumber(CD_SIM_LINES, "CD_SIM_LINES"); + cdlua_pushnumber(CD_SIM_ALL, "CD_SIM_ALL"); + cdlua_pushnumber(CD_SIM_POLYGON, "CD_SIM_POLYGON"); + cdlua_pushnumber(CD_SIM_SECTOR, "CD_SIM_SECTOR"); + cdlua_pushnumber(CD_SIM_POLYLINE, "CD_SIM_POLYLINE"); + cdlua_pushnumber(CD_SIM_BOX, "CD_SIM_BOX"); + cdlua_pushnumber(CD_SIM_ARC, "CD_SIM_ARC"); + cdlua_pushnumber(CD_SIM_RECT, "CD_SIM_RECT"); + cdlua_pushnumber(CD_SIM_LINE, "CD_SIM_LINE"); + cdlua_pushnumber(CD_SIM_NONE, "CD_SIM_NONE"); + cdlua_pushnumber(CD_SIM_CHORD, "CD_SIM_CHORD"); + cdlua_pushnumber(CD_QUERY, "CD_QUERY"); + cdlua_pushnumber(CD_ERROR, "CD_ERROR"); + cdlua_pushnumber(CD_OK, "CD_OK"); + cdlua_pushnumber(CD_CLIPOFF, "CD_CLIPOFF"); + cdlua_pushnumber(CD_CLIPAREA, "CD_CLIPAREA"); + cdlua_pushnumber(CD_CLIPPOLYGON, "CD_CLIPPOLYGON"); + cdlua_pushnumber(CD_CLIPREGION, "CD_CLIPREGION"); + cdlua_pushnumber(CD_FILL, "CD_FILL"); + cdlua_pushnumber(CD_OPEN_LINES, "CD_OPEN_LINES"); + cdlua_pushnumber(CD_CLOSED_LINES, "CD_CLOSED_LINES"); + cdlua_pushnumber(CD_CLIP, "CD_CLIP"); + cdlua_pushnumber(CD_BEZIER, "CD_BEZIER"); + cdlua_pushnumber(CD_OPAQUE, "CD_OPAQUE"); + cdlua_pushnumber(CD_TRANSPARENT, "CD_TRANSPARENT"); + cdlua_pushnumber(CD_REPLACE, "CD_REPLACE"); + cdlua_pushnumber(CD_XOR, "CD_XOR"); + cdlua_pushnumber(CD_NOT_XOR, "CD_NOT_XOR"); + cdlua_pushnumber(CD_POLITE, "CD_POLITE"); + cdlua_pushnumber(CD_FORCE, "CD_FORCE"); + cdlua_pushnumber(CD_CONTINUOUS, "CD_CONTINUOUS"); + cdlua_pushnumber(CD_DASHED, "CD_DASHED"); + cdlua_pushnumber(CD_DOTTED, "CD_DOTTED"); + cdlua_pushnumber(CD_DASH_DOT, "CD_DASH_DOT"); + cdlua_pushnumber(CD_DASH_DOT_DOT, "CD_DASH_DOT_DOT"); + cdlua_pushnumber(CD_PLUS, "CD_PLUS"); + cdlua_pushnumber(CD_STAR, "CD_STAR"); + cdlua_pushnumber(CD_CIRCLE, "CD_CIRCLE"); + cdlua_pushnumber(CD_X, "CD_X"); + cdlua_pushnumber(CD_BOX, "CD_BOX"); + cdlua_pushnumber(CD_DIAMOND, "CD_DIAMOND"); + cdlua_pushnumber(CD_HOLLOW_CIRCLE, "CD_HOLLOW_CIRCLE"); + cdlua_pushnumber(CD_HOLLOW_BOX, "CD_HOLLOW_BOX"); + cdlua_pushnumber(CD_HOLLOW_DIAMOND, "CD_HOLLOW_DIAMOND"); + cdlua_pushnumber(CD_HORIZONTAL, "CD_HORIZONTAL"); + cdlua_pushnumber(CD_VERTICAL, "CD_VERTICAL"); + cdlua_pushnumber(CD_FDIAGONAL, "CD_FDIAGONAL"); + cdlua_pushnumber(CD_BDIAGONAL, "CD_BDIAGONAL"); + cdlua_pushnumber(CD_CROSS, "CD_CROSS"); + cdlua_pushnumber(CD_DIAGCROSS, "CD_DIAGCROSS"); + cdlua_pushnumber(CD_SOLID, "CD_SOLID"); + cdlua_pushnumber(CD_HATCH, "CD_HATCH"); + cdlua_pushnumber(CD_STIPPLE, "CD_STIPPLE"); + cdlua_pushnumber(CD_PATTERN, "CD_PATTERN"); + cdlua_pushnumber(CD_HOLLOW, "CD_HOLLOW"); + cdlua_pushnumber(CD_NORTH, "CD_NORTH"); + cdlua_pushnumber(CD_SOUTH, "CD_SOUTH"); + cdlua_pushnumber(CD_EAST, "CD_EAST"); + cdlua_pushnumber(CD_WEST, "CD_WEST"); + cdlua_pushnumber(CD_NORTH_EAST, "CD_NORTH_EAST"); + cdlua_pushnumber(CD_NORTH_WEST, "CD_NORTH_WEST"); + cdlua_pushnumber(CD_SOUTH_EAST, "CD_SOUTH_EAST"); + cdlua_pushnumber(CD_SOUTH_WEST, "CD_SOUTH_WEST"); + cdlua_pushnumber(CD_CENTER, "CD_CENTER"); + cdlua_pushnumber(CD_BASE_LEFT, "CD_BASE_LEFT"); + cdlua_pushnumber(CD_BASE_CENTER, "CD_BASE_CENTER"); + cdlua_pushnumber(CD_BASE_RIGHT, "CD_BASE_RIGHT"); + cdlua_pushnumber(CD_SYSTEM, "CD_SYSTEM"); + cdlua_pushnumber(CD_COURIER, "CD_COURIER"); + cdlua_pushnumber(CD_TIMES_ROMAN, "CD_TIMES_ROMAN"); + cdlua_pushnumber(CD_HELVETICA, "CD_HELVETICA"); + cdlua_pushnumber(CD_PLAIN, "CD_PLAIN"); + cdlua_pushnumber(CD_BOLD, "CD_BOLD"); + cdlua_pushnumber(CD_ITALIC, "CD_ITALIC"); + cdlua_pushnumber(CD_BOLD_ITALIC, "CD_BOLD_ITALIC"); + cdlua_pushnumber(CD_SMALL, "CD_SMALL"); + cdlua_pushnumber(CD_STANDARD, "CD_STANDARD"); + cdlua_pushnumber(CD_LARGE, "CD_LARGE"); + cdlua_pushnumber(CD_MM2PT, "CD_MM2PT"); + cdlua_pushnumber(CD_RAD2DEG, "CD_RAD2DEG"); + cdlua_pushnumber(CD_DEG2RAD, "CD_DEG2RAD"); + cdlua_pushnumber(CD_RGBA, "CD_RGBA"); + cdlua_pushnumber(CD_RGB, "CD_RGB"); + cdlua_pushnumber(CD_MAP, "CD_MAP"); + cdlua_pushnumber(CD_IRED, "CD_IRED"); + cdlua_pushnumber(CD_IGREEN, "CD_IGREEN"); + cdlua_pushnumber(CD_IBLUE, "CD_IBLUE"); + cdlua_pushnumber(CD_IALPHA, "CD_IALPHA"); + cdlua_pushnumber(CD_INDEX, "CD_INDEX"); + cdlua_pushnumber(CD_COLORS, "CD_COLORS"); + cdlua_pushnumber(CD_MAP, "CD_MAP"); + cdlua_pushnumber(CD_A0, "CD_A0"); + cdlua_pushnumber(CD_A2, "CD_A2"); + cdlua_pushnumber(CD_A3, "CD_A3"); + cdlua_pushnumber(CD_A1, "CD_A1"); + cdlua_pushnumber(CD_A4, "CD_A4"); + cdlua_pushnumber(CD_A5, "CD_A5"); + cdlua_pushnumber(CD_LETTER, "CD_LETTER"); + cdlua_pushnumber(CD_LEGAL, "CD_LEGAL"); + cdlua_pushnumber(CD_UNION, "CD_UNION"); + cdlua_pushnumber(CD_INTERSECT, "CD_INTERSECT"); + cdlua_pushnumber(CD_DIFFERENCE, "CD_DIFFERENCE"); + cdlua_pushnumber(CD_NOTINTERSECT, "CD_NOTINTERSECT"); + cdlua_pushnumber(CD_REGION, "CD_REGION"); + cdlua_pushnumber(CD_EVENODD, "CD_EVENODD"); + cdlua_pushnumber(CD_WINDING, "CD_WINDING"); + cdlua_pushnumber(CD_BEVEL, "CD_BEVEL"); + cdlua_pushnumber(CD_MITER, "CD_MITER"); + cdlua_pushnumber(CD_ROUND, "CD_ROUND"); + cdlua_pushnumber(CD_CAPROUND, "CD_CAPROUND"); + cdlua_pushnumber(CD_CAPSQUARE, "CD_CAPSQUARE"); + cdlua_pushnumber(CD_CAPFLAT, "CD_CAPFLAT"); + cdlua_pushnumber(CD_CUSTOM, "CD_CUSTOM"); + cdlua_pushnumber(CD_ABORT, "CD_ABORT"); + cdlua_pushnumber(CD_CONTINUE, "CD_CONTINUE"); + + cdlua_register("cdFlush",L_cdFlush); + cdlua_register("cdSimulate",L_cdSimulate); + cdlua_register("cdOrigin",L_cdOrigin); + cdlua_register("cdClear",L_cdClear); + cdlua_register("cdClip",L_cdClip); + cdlua_register("cdClipArea",L_cdClipArea); + cdlua_register("cdLine",L_cdLine); + cdlua_register("cdBox",L_cdBox); + cdlua_register("cdRect",L_cdRect); + cdlua_register("cdArc",L_cdArc); + cdlua_register("cdSector",L_cdSector); + cdlua_register("cdChord",L_cdChord); + cdlua_register("cdText",L_cdText); + cdlua_register("cdBegin",L_cdBegin); + cdlua_register("cdVertex",L_cdVertex); + cdlua_register("cdEnd",L_cdEnd); + cdlua_register("cdOffsetRegion",L_cdOffsetRegion); + cdlua_register("cdPointInRegion",L_cdPointInRegion); + cdlua_register("cdMark",L_cdMark); + cdlua_register("cdBackOpacity",L_cdBackOpacity); + cdlua_register("cdWriteMode",L_cdWriteMode); + cdlua_register("cdRegionCombineMode",L_cdRegionCombineMode); + cdlua_register("cdLineJoin",L_cdLineJoin); + cdlua_register("cdLineCap",L_cdLineCap); + cdlua_register("cdFillMode",L_cdFillMode); + cdlua_register("cdLineStyle",L_cdLineStyle); + cdlua_register("cdLineWidth",L_cdLineWidth); + cdlua_register("cdInteriorStyle",L_cdInteriorStyle); + cdlua_register("cdHatch",L_cdHatch); + cdlua_register("cdFont",L_cdFont); + cdlua_register("cdNativeFont",L_cdNativeFont); + cdlua_register("cdTextAlignment",L_cdTextAlignment); + cdlua_register("cdTextOrientation",L_cdTextOrientation); + cdlua_register("cdMarkType",L_cdMarkType); + cdlua_register("cdMarkSize",L_cdMarkSize); + cdlua_register("cdGetColorPlanes",L_cdGetColorPlanes); + cdlua_register("cdScrollArea",L_cdScrollArea); + cdlua_register("cdVectorFont",L_cdVectorFont); + cdlua_register("cdVectorTextDirection",L_cdVectorTextDirection); + cdlua_register("cdVectorTextSize",L_cdVectorTextSize); + cdlua_register("cdVectorCharSize",L_cdVectorCharSize); + cdlua_register("cdVectorText",L_cdVectorText); + cdlua_register("cdMultiLineVectorText",L_cdMultiLineVectorText); + cdlua_register("cdSetAttribute",L_cdSetAttribute); + cdlua_register("cdGetAttribute",L_cdGetAttribute); + return 1; +} + diff --git a/cd/src/lua3/toluawd.c b/cd/src/lua3/toluawd.c new file mode 100755 index 0000000..2549bcc --- /dev/null +++ b/cd/src/lua3/toluawd.c @@ -0,0 +1,228 @@ +#include +#include + +#include +#include + +#include "cd.h" +#include "wd.h" + +#include "cdlua.h" +#include "cdlua3_private.h" + + +static void L_wdWindow(void) +{ + double xmin = (double)luaL_check_number(1); + double xmax = (double)luaL_check_number(2); + double ymin = (double)luaL_check_number(3); + double ymax = (double)luaL_check_number(4); + wdWindow(xmin,xmax,ymin,ymax); +} + +static void L_wdViewport(void) +{ + int xmin = (int)luaL_check_number(1); + int xmax = (int)luaL_check_number(2); + int ymin = (int)luaL_check_number(3); + int ymax = (int)luaL_check_number(4); + wdViewport(xmin,xmax,ymin,ymax); +} + +static void L_wdClipArea(void) +{ + double xmin = (double)luaL_check_number(1); + double xmax = (double)luaL_check_number(2); + double ymin = (double)luaL_check_number(3); + double ymax = (double)luaL_check_number(4); + wdClipArea(xmin,xmax,ymin,ymax); +} + +static void L_wdLine(void) +{ + double x1 = (double)luaL_check_number(1); + double y1 = (double)luaL_check_number(2); + double x2 = (double)luaL_check_number(3); + double y2 = (double)luaL_check_number(4); + wdLine(x1,y1,x2,y2); +} + +static void L_wdBox(void) +{ + double xmin = (double)luaL_check_number(1); + double xmax = (double)luaL_check_number(2); + double ymin = (double)luaL_check_number(3); + double ymax = (double)luaL_check_number(4); + wdBox(xmin,xmax,ymin,ymax); +} + +static void L_wdRect(void) +{ + double xmin = (double)luaL_check_number(1); + double xmax = (double)luaL_check_number(2); + double ymin = (double)luaL_check_number(3); + double ymax = (double)luaL_check_number(4); + wdRect(xmin,xmax,ymin,ymax); +} + +static void L_wdArc(void) +{ + double xc = (double)luaL_check_number(1); + double yc = (double)luaL_check_number(2); + double w = (double)luaL_check_number(3); + double h = (double)luaL_check_number(4); + double angle1 = (double)luaL_check_number(5); + double angle2 = (double)luaL_check_number(6); + wdArc(xc,yc,w,h,angle1,angle2); +} + +static void L_wdSector(void) +{ + double xc = (double)luaL_check_number(1); + double yc = (double)luaL_check_number(2); + double w = (double)luaL_check_number(3); + double h = (double)luaL_check_number(4); + double angle1 = (double)luaL_check_number(5); + double angle2 = (double)luaL_check_number(6); + wdSector(xc,yc,w,h,angle1,angle2); +} + +static void L_wdChord(void) +{ + double xc = (double)luaL_check_number(1); + double yc = (double)luaL_check_number(2); + double w = (double)luaL_check_number(3); + double h = (double)luaL_check_number(4); + double angle1 = (double)luaL_check_number(5); + double angle2 = (double)luaL_check_number(6); + wdChord(xc,yc,w,h,angle1,angle2); +} + +static void L_wdText(void) +{ + double x = (double)luaL_check_number(1); + double y = (double)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + wdText(x,y,s); +} + +static void L_wdVertex(void) +{ + double x = (double)luaL_check_number(1); + double y = (double)luaL_check_number(2); + wdVertex(x,y); +} + +static void L_wdMark(void) +{ + double x = (double)luaL_check_number(1); + double y = (double)luaL_check_number(2); + wdMark(x,y); +} + +static void L_wdOffsetRegion(void) +{ + double x = (double)luaL_check_number(1); + double y = (double)luaL_check_number(2); + wdOffsetRegion(x,y); +} + +static void L_wdPointInRegion(void) +{ + double x = (double)luaL_check_number(1); + double y = (double)luaL_check_number(2); + int L_result = wdPointInRegion(x,y); + lua_pushnumber((double)L_result); +} + +static void L_wdLineWidth(void) +{ + double width = (double)luaL_check_number(1); + double L_result = wdLineWidth(width); + lua_pushnumber(L_result); +} + +static void L_wdFont(void) +{ + int type_face = (int)luaL_check_number(1); + int style = (int)luaL_check_number(2); + double size = (double)luaL_check_number(3); + wdFont(type_face,style,size); +} + +static void L_wdMarkSize(void) +{ + double size = (double)luaL_check_number(1); + double L_result = wdMarkSize(size); + lua_pushnumber(L_result); +} + +static void L_wdVectorTextDirection(void) +{ + double x1 = (double)luaL_check_number(1); + double y1 = (double)luaL_check_number(2); + double x2 = (double)luaL_check_number(3); + double y2 = (double)luaL_check_number(4); + wdVectorTextDirection(x1,y1,x2,y2); +} + +static void L_wdVectorTextSize(void) +{ + double size_x = (double)luaL_check_number(1); + double size_y = (double)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + wdVectorTextSize(size_x,size_y,s); +} + +static void L_wdVectorCharSize(void) +{ + double size = (double)luaL_check_number(1); + double L_result = wdVectorCharSize(size); + lua_pushnumber(L_result); +} + +static void L_wdVectorText(void) +{ + double x = (double)luaL_check_number(1); + double y = (double)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + wdVectorText(x,y,s); +} + +static void L_wdMultiLineVectorText(void) +{ + double x = (double)luaL_check_number(1); + double y = (double)luaL_check_number(2); + char* s = (char*)luaL_check_string(3); + wdMultiLineVectorText(x,y,s); +} + + +/* ---------------------------------------- public interface */ +int luaL_wd_open(void) +{ + cdlua_register("wdWindow",L_wdWindow); + cdlua_register("wdViewport",L_wdViewport); + cdlua_register("wdClipArea",L_wdClipArea); + cdlua_register("wdLine",L_wdLine); + cdlua_register("wdBox",L_wdBox); + cdlua_register("wdRect",L_wdRect); + cdlua_register("wdArc",L_wdArc); + cdlua_register("wdSector",L_wdSector); + cdlua_register("wdChord",L_wdChord); + cdlua_register("wdText",L_wdText); + cdlua_register("wdVertex",L_wdVertex); + cdlua_register("wdMark",L_wdMark); + cdlua_register("wdOffsetRegion",L_wdOffsetRegion); + cdlua_register("wdPointInRegion",L_wdPointInRegion); + cdlua_register("wdLineWidth",L_wdLineWidth); + cdlua_register("wdFont",L_wdFont); + cdlua_register("wdMarkSize",L_wdMarkSize); + cdlua_register("wdVectorTextDirection",L_wdVectorTextDirection); + cdlua_register("wdVectorTextSize",L_wdVectorTextSize); + cdlua_register("wdVectorCharSize",L_wdVectorCharSize); + cdlua_register("wdVectorText",L_wdVectorText); + cdlua_register("wdMultiLineVectorText",L_wdMultiLineVectorText); + return 1; +} + diff --git a/cd/src/lua5/cdlua5.c b/cd/src/lua5/cdlua5.c new file mode 100755 index 0000000..7e60fbe --- /dev/null +++ b/cd/src/lua5/cdlua5.c @@ -0,0 +1,1823 @@ +/** \file + * \brief Lua Binding + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include + +#include "cd.h" +#include "cdgdiplus.h" +#include "cdnative.h" +#include "cdps.h" + +#include +#include + +#include "cdlua.h" +#include "cdlua5_private.h" + + +/***************************************************************************\ +* Initialization * +\***************************************************************************/ + +static const char* cdlua_key = "cdlua5"; + +static void cdlua_SetState(lua_State * L, cdluaLuaState* cdL) +{ + lua_pushlightuserdata(L, (void*)cdlua_key); + lua_pushlightuserdata(L, (void*)cdL); + lua_settable(L, LUA_REGISTRYINDEX); /* registry[address("cdlua5")]=cdL */ + lua_pop(L, 1); +} + +cdluaLuaState* cdlua_getstate(lua_State * L) +{ + cdluaLuaState* cdL; + lua_pushlightuserdata(L, (void*)cdlua_key); + lua_gettable(L, LUA_REGISTRYINDEX); + cdL = (cdluaLuaState*)lua_touserdata(L, -1); + lua_pop(L, 1); + return cdL; +} + +cdluaContext* cdlua_getcontext(lua_State * L, int param) +{ + cdluaLuaState* cdL = cdlua_getstate(L); + + int driver = luaL_checkint(L, param); + if ((driver < 0) || (driver >= cdL->numdrivers)) + luaL_argerror(L, param, "unknown driver"); + + return cdL->drivers[driver]; +} + +static lua_State* cdlua5_play_luaState = NULL; + +lua_State* cdlua_getplaystate(void) +{ + return cdlua5_play_luaState; +} + +void cdlua_setplaystate(lua_State* L) +{ + cdlua5_play_luaState = L; +} + +static cdluaPalette* cdlua_rawcheckpalette(lua_State *L, int param) +{ + void *p = lua_touserdata(L, param); + if (p != NULL) { /* value is a userdata? */ + if (lua_getmetatable(L, param)) { /* does it have a metatable? */ + lua_getfield(L, LUA_REGISTRYINDEX, "cdPalette"); /* get correct metatable */ + if (lua_rawequal(L, -1, -2)) { /* does it have the correct mt? */ + lua_pop(L, 2); /* remove both metatables */ + return (cdluaPalette*)p; + } + lua_pop(L, 1); /* remove previous metatable */ + + /* check also for IM palette */ + lua_getfield(L, LUA_REGISTRYINDEX, "imPalette"); /* get correct metatable */ + if (lua_rawequal(L, -1, -2)) { /* does it have the correct mt? */ + lua_pop(L, 2); /* remove both metatables */ + return (cdluaPalette*)p; + } + } + } + luaL_typerror(L, param, "cdPalette"); /* else error */ + return NULL; /* to avoid warnings */ +} + +cdluaPalette * cdlua_checkpalette(lua_State * L, int param) +{ + cdluaPalette * pal = cdlua_rawcheckpalette(L, param); + if (!pal->color) + luaL_argerror(L, param, "killed cdPalette"); + return pal; +} + +void cdlua_pushpalette(lua_State* L, long* palette, int size) +{ + cdluaPalette* pal = (cdluaPalette*)lua_newuserdata(L, sizeof(cdluaPalette)); + luaL_getmetatable(L, "cdPalette"); + lua_setmetatable(L, -2); + + pal->count = size; + pal->color = palette; +} + +cdState * cdlua_checkstate(lua_State* L, int param) +{ + cdState** state_p = (cdState**)luaL_checkudata(L, param, "cdState"); + if (!(*state_p)) + luaL_argerror(L, param, "released cdState"); + return *state_p; +} + +void cdlua_pushstate(lua_State* L, cdState* state) +{ + cdState** state_p = (cdState**)lua_newuserdata(L, sizeof(cdState*)); + luaL_getmetatable(L, "cdState"); + lua_setmetatable(L, -2); + + *state_p = state; +} + +cdluaPattern* cdlua_checkpattern(lua_State* L, int param) +{ + cdluaPattern* pattern_p = (cdluaPattern*) luaL_checkudata(L, param, "cdPattern"); + if (!pattern_p->pattern) + luaL_argerror(L, param, "killed cdPattern"); + return pattern_p; +} + +void cdlua_pushpattern(lua_State* L, long int* pattern, int width, int height) +{ + cdluaPattern* pattern_p = (cdluaPattern*)lua_newuserdata(L, sizeof(cdluaPattern)); + luaL_getmetatable(L, "cdPattern"); + lua_setmetatable(L, -2); + + pattern_p->pattern = pattern; + pattern_p->width = width; + pattern_p->height = height; + pattern_p->size = width * height; +} + +cdluaStipple* cdlua_checkstipple(lua_State* L, int param) +{ + cdluaStipple* stipple_p = (cdluaStipple*) luaL_checkudata(L, param, "cdStipple"); + if (!stipple_p->stipple) + luaL_argerror(L, param, "killed cdStipple"); + return stipple_p; +} + +void cdlua_pushstipple(lua_State* L, unsigned char* stipple, int width, int height) +{ + cdluaStipple* stipple_p = (cdluaStipple*)lua_newuserdata(L, sizeof(cdluaStipple)); + luaL_getmetatable(L, "cdStipple"); + lua_setmetatable(L, -2); + + stipple_p->stipple = stipple; + stipple_p->width = width; + stipple_p->height = height; + stipple_p->size = width * height; +} + +cdluaImageRGB* cdlua_checkimagergb(lua_State* L, int param) +{ + cdluaImageRGB* imagergb_p = (cdluaImageRGB*) luaL_checkudata(L, param, "cdImageRGB"); + if (!imagergb_p->red) + luaL_argerror(L, param, "killed cdImageRGB"); + return imagergb_p; +} + +void cdlua_pushimagergb(lua_State* L, unsigned char* red, unsigned char* green, unsigned char* blue, int width, int height) +{ + cdluaImageRGB* imagergb_p = (cdluaImageRGB*)lua_newuserdata(L, sizeof(cdluaImageRGB)); + luaL_getmetatable(L, "cdImageRGB"); + lua_setmetatable(L, -2); + + imagergb_p->red = red; + imagergb_p->green = green; + imagergb_p->blue = blue; + imagergb_p->width = width; + imagergb_p->height = height; + imagergb_p->size = width * height; + imagergb_p->free = 1; +} + +void cdlua_pushimagergb_ex(lua_State* L, unsigned char* red, unsigned char* green, unsigned char* blue, int width, int height) +{ + cdluaImageRGB* imagergb_p = (cdluaImageRGB*)lua_newuserdata(L, sizeof(cdluaImageRGB)); + luaL_getmetatable(L, "cdImageRGB"); + lua_setmetatable(L, -2); + + imagergb_p->red = red; + imagergb_p->green = green; + imagergb_p->blue = blue; + imagergb_p->width = width; + imagergb_p->height = height; + imagergb_p->size = width * height; + imagergb_p->free = 0; +} + +cdluaImageRGBA* cdlua_checkimagergba(lua_State* L, int param) +{ + cdluaImageRGBA* imagergba_p = (cdluaImageRGBA*) luaL_checkudata(L, param, "cdImageRGBA"); + if (!imagergba_p->red) + luaL_argerror(L, param, "killed cdImageRGBA"); + return imagergba_p; +} + +void cdlua_pushimagergba(lua_State* L, unsigned char* red, unsigned char* green, unsigned char* blue, unsigned char* alpha, int width, int height) +{ + cdluaImageRGBA* imagergba_p = (cdluaImageRGBA*)lua_newuserdata(L, sizeof(cdluaImageRGBA)); + luaL_getmetatable(L, "cdImageRGBA"); + lua_setmetatable(L, -2); + + imagergba_p->red = red; + imagergba_p->green = green; + imagergba_p->blue = blue; + imagergba_p->alpha = alpha; + imagergba_p->width = width; + imagergba_p->height = height; + imagergba_p->size = width * height; + imagergba_p->free = 1; +} + +void cdlua_pushimagergba_ex(lua_State* L, unsigned char* red, unsigned char* green, unsigned char* blue, unsigned char* alpha, int width, int height) +{ + cdluaImageRGBA* imagergba_p = (cdluaImageRGBA*)lua_newuserdata(L, sizeof(cdluaImageRGBA)); + luaL_getmetatable(L, "cdImageRGBA"); + lua_setmetatable(L, -2); + + imagergba_p->red = red; + imagergba_p->green = green; + imagergba_p->blue = blue; + imagergba_p->alpha = alpha; + imagergba_p->width = width; + imagergba_p->height = height; + imagergba_p->size = width * height; + imagergba_p->free = 0; +} + +cdluaImageMap* cdlua_checkimagemap(lua_State* L, int param) +{ + cdluaImageMap* imagemap_p = (cdluaImageMap*) luaL_checkudata(L, param, "cdImageMap"); + if (!imagemap_p->index) + luaL_argerror(L, param, "killed cdImageMap"); + return imagemap_p; +} + +void cdlua_pushimagemap(lua_State* L, unsigned char* index, int width, int height) +{ + cdluaImageMap* imagemap_p = (cdluaImageMap*)lua_newuserdata(L, sizeof(cdluaImageMap)); + luaL_getmetatable(L, "cdImageMap"); + lua_setmetatable(L, -2); + + imagemap_p->index = index; + imagemap_p->width = width; + imagemap_p->height = height; + imagemap_p->size = width * height; +} + +cdluaImageChannel* cdlua_checkchannel(lua_State* L, int param) +{ + cdluaImageChannel* channel_p = (cdluaImageChannel*) luaL_checkudata(L, param, "cdImageChannel"); + if (!channel_p->channel) + luaL_argerror(L, param, "killed cdImageChannel"); + return channel_p; +} + +void cdlua_pushchannel(lua_State* L, unsigned char* channel, int size) +{ + cdluaImageChannel* channel_p = (cdluaImageChannel*)lua_newuserdata(L, sizeof(cdluaImageChannel)); + luaL_getmetatable(L, "cdImageChannel"); + lua_setmetatable(L, -2); + + channel_p->channel = channel; + channel_p->size = size; +} + +long cdlua_checkcolor(lua_State* L, int param) +{ + if (!lua_islightuserdata(L, param)) + { + if (lua_isnumber(L, param) && (lua_tointeger(L, param) == CD_QUERY)) + return CD_QUERY; + + luaL_argerror(L, param, "invalid color, must be a light user data"); + } + + return (long int)lua_touserdata(L, param); +} + +cdImage* cdlua_checkimage(lua_State* L, int param) +{ + cdImage** image_p = (cdImage**)luaL_checkudata(L, param, "cdImage"); + if (!(*image_p)) + luaL_argerror(L, param, "killed cdImage"); + return *image_p; +} + +void cdlua_pushimage(lua_State* L, cdImage* image) +{ + cdImage** image_p = (cdImage**)lua_newuserdata(L, sizeof(cdImage*)); + luaL_getmetatable(L, "cdImage"); + lua_setmetatable(L, -2); + + *image_p = image; +} + +cdBitmap * cdlua_checkbitmap(lua_State* L, int param) +{ + cdBitmap** bitmap_p = (cdBitmap**)luaL_checkudata(L, param, "cdBitmap"); + if (!(*bitmap_p)) + luaL_argerror(L, param, "killed cdBitmap"); + return *bitmap_p; +} + +void cdlua_pushbitmap(lua_State* L, cdBitmap* bitmap) +{ + cdBitmap** bitmap_p = (cdBitmap**)lua_newuserdata(L, sizeof(cdBitmap*)); + luaL_getmetatable(L, "cdBitmap"); + lua_setmetatable(L, -2); + + *bitmap_p = bitmap; +} + +/***************************************************************************\ +* cd.ContextCaps(ctx: number) -> (caps: number) * +\***************************************************************************/ +static int cdlua5_contextcaps(lua_State * L) +{ + cdluaContext* cdlua_ctx = cdlua_getcontext(L, 1); + lua_pushnumber(L, cdContextCaps(cdlua_ctx->ctx())); + return 1; +} + +static int cdlua5_releasestate(lua_State * L) +{ + cdState* *state_p = (cdState* *) luaL_checkudata(L, 1, "cdState"); + if (*state_p) + { + cdReleaseState(*state_p); + *state_p = NULL; /* mark as released */ + } + + return 0; +} + +static int cdlua5_createstipple(lua_State *L) +{ + int size; + unsigned char* stipple; + + int width = luaL_checkint(L, 1); + int height = luaL_checkint(L, 2); + + if (width < 1 || height < 1) + luaL_argerror(L, 1, "stipple dimensions should be positive integers"); + + size = width * height; + stipple = (unsigned char *) malloc(size); + memset(stipple, '\0', size); + + cdlua_pushstipple(L, stipple, width, height); + + return 1; +} + +static int cdlua5_killstipple(lua_State *L) +{ + cdluaStipple *stipple_p = (cdluaStipple*)luaL_checkudata(L, 1, "cdStipple"); + if (stipple_p->stipple) + { + free(stipple_p->stipple); + stipple_p->stipple = NULL; /* mark as killed */ + } + + return 0; +} + +/***************************************************************************\ +* number = stipple[i] * +\***************************************************************************/ +static int cdlua5_indexstipple(lua_State *L) +{ + cdluaStipple* stipple_p = cdlua_checkstipple(L, 1); + + int index = luaL_checkint(L, 2); + if (index < 0 || index >= stipple_p->size) + luaL_argerror(L, 2, "index is out of bounds"); + + lua_pushnumber(L, stipple_p->stipple[index]); + return 1; +} + +/***************************************************************************\ +* stipple[i] = number . * +\***************************************************************************/ +static int cdlua5_newindexstipple(lua_State *L) +{ + unsigned char value; + + cdluaStipple* stipple_p = cdlua_checkstipple(L, 1); + + int index = luaL_checkint(L, 2); + if (index < 0 || index >= stipple_p->size) + luaL_argerror(L, 2, "index is out of bounds"); + + value = (unsigned char)luaL_checkint(L, 3); + if ((value != 0 && value != 1)) + luaL_argerror(L, 3, "value must be 0 or 1"); + + stipple_p->stipple[index] = value; + return 0; +} + +static int cdlua5_createpattern(lua_State *L) +{ + int size; + long int *pattern; + + int width = luaL_checkint(L, 1); + int height = luaL_checkint(L, 2); + + if (width < 1 || height < 1) + luaL_argerror(L, 1, "pattern dimensions should be positive integers"); + + size = width * height; + pattern = (long int *) malloc(size * sizeof(long int)); + memset(pattern, 255, size * sizeof(long int)); + + cdlua_pushpattern(L, pattern, width, height); + + return 1; +} + +static int cdlua5_killpattern(lua_State *L) +{ + cdluaPattern *pattern_p = (cdluaPattern *) luaL_checkudata(L, 1, "cdPattern"); + if (pattern_p->pattern) + { + free(pattern_p->pattern); + pattern_p->pattern = NULL; /* mark as killed */ + } + + return 0; +} + +/***************************************************************************\ +* color = pattern[i] * +\***************************************************************************/ +static int cdlua5_indexpattern(lua_State *L) +{ + cdluaPattern* pattern_p = cdlua_checkpattern(L, 1); + + int index = luaL_checkint(L, 2); + if (index < 0 || index >= pattern_p->size) + luaL_argerror(L, 2, "index is out of bounds"); + + lua_pushlightuserdata(L, (void *) pattern_p->pattern[index]); + return 1; +} + +/***************************************************************************\ +* pattern[i] = color * +\***************************************************************************/ +static int cdlua5_newindexpattern(lua_State *L) +{ + long int color; + + cdluaPattern* pattern_p = cdlua_checkpattern(L, 1); + + int index = luaL_checkint(L, 2); + if (index < 0 || index >= pattern_p->size) + luaL_argerror(L, 2, "index is out of bounds"); + + color = cdlua_checkcolor(L, 3); + + pattern_p->pattern[index] = color; + return 0; +} + +static int cdlua5_rgb2map(lua_State *L) +{ + cdluaImageRGB* imagergb_p = cdlua_checkimagergb(L, 1); + cdluaImageMap* imagemap_p = cdlua_checkimagemap(L, 2); + cdluaPalette* pal = cdlua_checkpalette(L, 3); + cdRGB2Map(imagergb_p->width, imagergb_p->height, + imagergb_p->red, imagergb_p->green, imagergb_p->blue, + imagemap_p->index, pal->count, pal->color); + return 0; +} + +static int cdlua5_createbitmap(lua_State *L) +{ + cdBitmap *bitmap; + + int width = luaL_checkint(L, 1); + int height = luaL_checkint(L, 2); + int type = luaL_checkint(L, 3); + + if (width < 1 || height < 1) + luaL_argerror(L, 1, "bitmap dimensions should be positive integers"); + + bitmap = cdCreateBitmap(width, height, type); + if (bitmap) + cdlua_pushbitmap(L, bitmap); + else + lua_pushnil(L); + + return 1; +} + +static int cdlua5_killbitmap(lua_State *L) +{ + cdBitmap* *bitmap_p = (cdBitmap* *) luaL_checkudata(L, 1, "cdBitmap"); + if (*bitmap_p) + { + cdKillBitmap(*bitmap_p); + *bitmap_p = NULL; /* mark as killed */ + } + + return 0; +} + +static int cdlua5_bitmapgetdata(lua_State *L) +{ + cdBitmap* bitmap = cdlua_checkbitmap(L, 1); + int dataptr = luaL_checkint(L, 2); + + unsigned char *data = cdBitmapGetData(bitmap, dataptr); + if (data) + cdlua_pushchannel(L, data, bitmap->w * bitmap->h); + else + lua_pushnil(L); + + return 1; +} + +static int cdlua5_bitmapsetrect(lua_State *L) +{ + cdBitmap* bitmap = cdlua_checkbitmap(L, 1); + int xmin = (int) luaL_checkint(L, 2); + int xmax = (int) luaL_checkint(L, 3); + int ymin = (int) luaL_checkint(L, 4); + int ymax = (int) luaL_checkint(L, 5); + + cdBitmapSetRect(bitmap, xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_bitmaprgb2map(lua_State *L) +{ + cdBitmap* bitmaprgb = cdlua_checkbitmap(L, 1); + cdBitmap* bitmapmap = cdlua_checkbitmap(L, 2); + + if (bitmaprgb->type != CD_RGB) + luaL_argerror(L, 1, "invalid bitmap type, must be RGB"); + if (bitmapmap->type != CD_MAP) + luaL_argerror(L, 2, "invalid bitmap type, must be Map"); + + cdBitmapRGB2Map(bitmaprgb, bitmapmap); + return 0; +} + +static int cdlua5_createimagergb(lua_State * L) +{ + unsigned char *red, *green, *blue; + int size; + int width = luaL_checkint(L,1); + int height = luaL_checkint(L,2); + + if (width < 1 || height < 1) + luaL_argerror(L, 1, "image dimensions should be positive integers"); + + size = width*height; + red = (unsigned char*)malloc(3*size); + + if (red) + { + memset(red, 255, 3*size); /* white */ + green = red + size; + blue = red + 2*size; + cdlua_pushimagergb(L, red, green, blue, width, height); + } + else + lua_pushnil(L); + + return 1; +} + +static int cdlua5_killimagergb(lua_State *L) +{ + cdluaImageRGB* imagergb_p = (cdluaImageRGB*)luaL_checkudata(L, 1, "cdImageRGB"); + if (imagergb_p->red && imagergb_p->free) + { + free(imagergb_p->red); + imagergb_p->red = NULL; /* mark as killed */ + imagergb_p->green = NULL; + imagergb_p->blue = NULL; + } + + return 0; +} + +static int cdlua5_createimagergba(lua_State * L) +{ + unsigned char *red, *green, *blue, *alpha; + int size; + int width = luaL_checkint(L,1); + int height = luaL_checkint(L,2); + + if (width < 1 || height < 1) + luaL_argerror(L, 1, "image dimensions should be positive integers"); + + size = width*height; + red = (unsigned char*)malloc(4*size); + + if (red) + { + memset(red, 255, 3*size); /* white */ + green = red + size; + blue = red + 2*size; + alpha = red + 3*size; + memset(alpha, 0, size); /* transparent */ + cdlua_pushimagergba(L, red, green, blue, alpha, width, height); + } + else + lua_pushnil(L); + + return 1; +} + +static int cdlua5_killimagergba(lua_State *L) +{ + cdluaImageRGBA* imagergba_p = (cdluaImageRGBA*)luaL_checkudata(L, 1, "cdImageRGBA"); + if (imagergba_p->red && imagergba_p->free) + { + free(imagergba_p->red); + imagergba_p->red = NULL; /* mark as killed */ + imagergba_p->green = NULL; + imagergba_p->blue = NULL; + imagergba_p->alpha = NULL; + } + + return 0; +} + +static int cdlua5_createimagemap(lua_State *L) +{ + int size; + unsigned char *index; + int width = luaL_checkint(L,1); + int height = luaL_checkint(L,2); + + if (width < 1 || height < 1) + luaL_argerror(L, 1, "imagemap dimensions should be positive integers"); + + size = width * height; + index = (unsigned char *) malloc(size); + + if (index) + { + memset(index, 0, size); + cdlua_pushimagemap(L, index, width, height); + } + else + lua_pushnil(L); + + return 1; +} + +static int cdlua5_killimagemap(lua_State *L) +{ + cdluaImageMap *imagemap_p = (cdluaImageMap *) luaL_checkudata(L, 1, "cdImageMap"); + if (imagemap_p->index) + { + free(imagemap_p->index); + imagemap_p->index = NULL; /* mark as killed */ + } + + return 0; +} + +/***************************************************************************\ +* number = imagemap[i] * +\***************************************************************************/ +static int cdlua5_indeximagemap(lua_State *L) +{ + cdluaImageMap* imagemap_p = cdlua_checkimagemap(L, 1); + + int index = luaL_checkint(L, 2); + if (index < 0 || index >= imagemap_p->size) + luaL_argerror(L, 2, "index is out of bounds"); + + lua_pushnumber(L, imagemap_p->index[index]); + return 1; +} + +/***************************************************************************\ +* imagemap[i] = number * +\***************************************************************************/ +static int cdlua5_newindeximagemap(lua_State *L) +{ + int value; + + cdluaImageMap* imagemap_p = cdlua_checkimagemap(L, 1); + + int index = luaL_checkint(L, 2); + if (index < 0 || index >= imagemap_p->size) + luaL_argerror(L, 2, "index is out of bounds"); + + value = luaL_checkint(L, 3); + if ((value < 0 || value > 255)) + luaL_argerror(L, 3, "value should be in range [0, 255]"); + + imagemap_p->index[index] = (unsigned char) value; + return 0; +} + +/***************************************************************************\ +* channel "gettable" fallback. This fallback is called when a LUA line like * +* "c = imagergb.r[y*w + x]" is executed. The imagergb "gettable" fallback * +* fills and returns a channel structure with info about the buffer. This * +* structure is consulted and the appropriate value is returned. * +\***************************************************************************/ +static int cdlua5_indexchannel(lua_State *L) +{ + cdluaImageChannel* channel_p = cdlua_checkchannel(L, 1); + + int index = luaL_checkint(L, 2); + if (index < 0 || + (channel_p->size > 0 && index >= channel_p->size) || + (channel_p->size == -1 && index >= 256)) { + luaL_argerror(L, 2, "index is out of bounds"); + } + + if (channel_p->size == -1) /* COLORS */ + lua_pushlightuserdata(L, (void *)((long int*)channel_p->channel)[index]); + else + lua_pushnumber(L, channel_p->channel[index]); + + return 1; +} + +/***************************************************************************\ +* channel "settable" fallback. This fallback is called when a LUA line like * +* "imagergb.r[y*w + x] = c" is executed. The imagergb "gettable" fallback * +* fills and returns a channel structure with info about the buffer. This * +* structure is consulted and the value is assigned where it should. * +\***************************************************************************/ +static int cdlua5_newindexchannel(lua_State *L) +{ + int value; + + cdluaImageChannel* channel_p = cdlua_checkchannel(L, 1); + + int index = luaL_checkint(L, 2); + if (index < 0 || + (channel_p->size > 0 && index >= channel_p->size) || + (channel_p->size == -1 && index >= 256)) { + luaL_argerror(L, 2, "index is out of bounds"); + } + + if (channel_p->size > 0) + { + value = luaL_checkint(L, 3); + if ((value < 0 || value > 255)) + luaL_argerror(L, 3, "value should be in range [0, 255]"); + channel_p->channel[index] = (unsigned char) value; + } + else /* COLORS */ + { + value = (long int) cdlua_checkcolor(L, 3); + ((long int*)channel_p->channel)[index] = value; + } + return 0; +} + +/***************************************************************************\ +* imagergb "gettable" fallback. This fallback is called when a LUA line * +* like "c = imagergb.r[y*w + x]" or "imagergb.r[y*w + x] = c" is executed. * +* The following "gettable" or "settable" * +* then assigns or returns the appropriate value. * +\***************************************************************************/ +static int cdlua5_indeximagergb(lua_State *L) +{ + unsigned char* channel = NULL; + cdluaImageRGB* imagergb_p = cdlua_checkimagergb(L, 1); + const char *index_s = luaL_checkstring(L, 2); + + if (*index_s == 'r' || *index_s == 'R') + channel = imagergb_p->red; + else if (*index_s == 'g' || *index_s == 'G') + channel = imagergb_p->green; + else if (*index_s == 'b' || *index_s == 'B') + channel = imagergb_p->blue; + else + luaL_argerror(L, 2, "index is an invalid channel name"); + + cdlua_pushchannel(L, channel, imagergb_p->size); + + return 1; +} + +/***************************************************************************\ +* imagergba "gettable" fallback. This fallback is called when a LUA line * +* like "c = imagergba.r[y*w + x]" or "imagergba.r[y*w + x] = c" is executed.* +* The following "gettable" or "settable" * +* then assigns or returns the appropriate value. * +\***************************************************************************/ +static int cdlua5_indeximagergba(lua_State *L) +{ + unsigned char* channel = NULL; + cdluaImageRGBA* imagergba_p = cdlua_checkimagergba(L, 1); + const char *index_s = luaL_checkstring(L, 2); + + if (*index_s == 'r' || *index_s == 'R') + channel = imagergba_p->red; + else if (*index_s == 'g' || *index_s == 'G') + channel = imagergba_p->green; + else if (*index_s == 'b' || *index_s == 'B') + channel = imagergba_p->blue; + else if (*index_s == 'a' || *index_s == 'A') + channel = imagergba_p->alpha; + else + luaL_argerror(L, 2, "index is an invalid channel name"); + + cdlua_pushchannel(L, channel, imagergba_p->size); + + return 1; +} + +/***************************************************************************\ +* bitmap "gettable" fallback. This fallback is called when a LUA line * +* like "c = bitmap.r[y*w + x]" or "bitmap.r[y*w + x] = c" is executed. * +* The following "gettable" or "settable" * +* then assigns or returns the appropriate value. * +\***************************************************************************/ +static int cdlua5_indexbitmap(lua_State *L) +{ + unsigned char* channel = NULL; + + cdBitmap* bitmap = cdlua_checkbitmap(L, 1); + const char *index_s = luaL_checkstring(L, 2); + + int size = bitmap->w * bitmap->h; + + if (*index_s == 'r' || *index_s == 'R') + channel = cdBitmapGetData(bitmap, CD_IRED); + else if (*index_s == 'g' || *index_s == 'G') + channel = cdBitmapGetData(bitmap, CD_IGREEN); + else if (*index_s == 'b' || *index_s == 'B') + channel = cdBitmapGetData(bitmap, CD_IBLUE); + else if (*index_s == 'a' || *index_s == 'A') + channel = cdBitmapGetData(bitmap, CD_IALPHA); + else if (*index_s == 'i' || *index_s == 'I') + channel = cdBitmapGetData(bitmap, CD_INDEX); + else if (*index_s == 'c' || *index_s == 'C') + { + channel = cdBitmapGetData(bitmap, CD_COLORS); + size = -1; + } + else + luaL_argerror(L, 2, "index is an invalid channel name"); + + cdlua_pushchannel(L, channel, size); + + return 1; +} + +static int cdlua5_killimage(lua_State *L) +{ + cdImage* *image_p = (cdImage* *) luaL_checkudata(L, 1, "cdImage"); + if (*image_p) + { + cdKillImage(*image_p); + *image_p = NULL; /* mark as killed */ + } + return 0; +} + +/***************************************************************************\ +* cd.Version() -> (version: string) * +\***************************************************************************/ +static int cdlua5_version(lua_State *L) +{ + lua_pushstring(L, cdVersion()); + return 1; +} + +/***************************************************************************\ +* Register callback functions. * +* cd.ContextRegisterCallback(ctx, cb: number, func: function) -> (status: number) * +\***************************************************************************/ +static int cdlua5_registercallback(lua_State *L) +{ + int cb_i, func_lock; + cdluaCallback* cdCB; + cdluaContext* cdlua_ctx; + + cdlua_ctx = cdlua_getcontext(L, 1); + + cb_i = luaL_checkint(L, 2); + if (cb_i >= cdlua_ctx->cb_n) + luaL_argerror(L, 2, "invalid callback parameter"); + + if (lua_isnil(L, 3)) + func_lock = -1; + else if (!lua_isfunction(L, 3)) + luaL_argerror(L, 3, "invalid function parameter"); + else + lua_pushvalue(L, 3); + func_lock = lua_ref(L, 1); + + cdCB = &cdlua_ctx->cb_list[cb_i]; + + if (cdCB->lock != -1) + { + lua_unref(L,cdCB->lock); + cdCB->lock = func_lock; + if (func_lock == -1) + { + cdContextRegisterCallback(cdlua_ctx->ctx(), cb_i, NULL); + } + } + else + { + if (func_lock != -1) + { + cdContextRegisterCallback(cdlua_ctx->ctx(), cb_i, (cdCallback)cdCB->func); + cdCB->lock = func_lock; + } + } + return 0; +} + + + +/***************************************************************************\ +* Color Coding * +\***************************************************************************/ + +/***************************************************************************\ +* Creates a color as a light userdata. The color value is * +* placed in the (void *) value. Not beautiful, but works best. * +* cd.EncodeColor(r, g, b: number) -> (old_color: color) * +\***************************************************************************/ +static int cdlua5_encodecolor(lua_State *L) +{ + int red_f, green_f, blue_f; + unsigned char red_i, green_i, blue_i; + long int color; + + red_f = luaL_checkint(L, 1); + green_f = luaL_checkint(L, 2); + blue_f = luaL_checkint(L, 3); + + if (red_f < 0 || red_f > 255) + luaL_argerror(L, 1, "color components values should be in range [0, 255]"); + if (green_f < 0 || green_f > 255) + luaL_argerror(L, 2, "color components values should be in range [0, 255]"); + if (blue_f < 0 || blue_f > 255) + luaL_argerror(L, 3, "color components values should be in range [0, 255]"); + + red_i = (unsigned char) (red_f); + green_i = (unsigned char) (green_f); + blue_i = (unsigned char) (blue_f); + + color = cdEncodeColor(red_i, green_i, blue_i); + lua_pushlightuserdata(L, (void *)color); + + return 1; +} + +/***************************************************************************\ +* Decodes a color previously created. * +* cd.DecodeColor(color: color) -> (r, g, b: number) * +\***************************************************************************/ +static int cdlua5_decodecolor(lua_State *L) +{ + unsigned char red_i, green_i, blue_i; + long int color = cdlua_checkcolor(L, 1); + cdDecodeColor(color, &red_i, &green_i, &blue_i); + lua_pushnumber(L, red_i); + lua_pushnumber(L, green_i); + lua_pushnumber(L, blue_i); + + return 3; +} + +/***************************************************************************\ +* cd.EncodeAlpha(color: color_tag, alpha: number) -> (color: color) * +\***************************************************************************/ +static int cdlua5_encodealpha(lua_State *L) +{ + float alpha_f; + unsigned char alpha_i; + long int color; + + color = cdlua_checkcolor(L, 1); + + if (!lua_isnumber(L, 2)) + luaL_argerror(L, 2, "invalid alpha parameter"); + + alpha_f = (float) lua_tonumber(L, 2); + + if (alpha_f < 0 || alpha_f > 255) + luaL_argerror(L, 2, "alpha components values should be in range [0, 255]"); + + alpha_i = (unsigned char) (alpha_f); + + color = cdEncodeAlpha(color, alpha_i); + lua_pushlightuserdata(L, (void *) color); + return 1; +} + +/***************************************************************************\ +* cd.DecodeAlpha(color: color) -> (a: number) * +\***************************************************************************/ +static int cdlua5_decodealpha(lua_State* L) +{ + long int color = cdlua_checkcolor(L, 1); + unsigned char alpha_i = cdDecodeAlpha(color); + lua_pushnumber(L, alpha_i); + return 1; +} + +/***************************************************************************\ +* cd.Alpha(color: color) -> (r: number) * +\***************************************************************************/ +static int cdlua5_alpha(lua_State* L) +{ + long int color = cdlua_checkcolor(L, 1); + lua_pushnumber(L, cdAlpha(color)); + return 1; +} + +/***************************************************************************\ +* cd.Red(color: color) -> (r: number) * +\***************************************************************************/ +static int cdlua5_red(lua_State* L) +{ + long int color = cdlua_checkcolor(L, 1); + lua_pushnumber(L, cdRed(color)); + return 1; +} + +/***************************************************************************\ +* cd.Blue(color: color) -> (r: number) * +\***************************************************************************/ +static int cdlua5_blue(lua_State *L) +{ + long int color = cdlua_checkcolor(L, 1); + lua_pushnumber(L, cdBlue(color)); + return 1; +} + +/***************************************************************************\ +* cd.Green(color: color) -> (r: number) * +\***************************************************************************/ +static int cdlua5_green(lua_State *L) +{ + long int color = cdlua_checkcolor(L, 1); + lua_pushnumber(L, cdGreen(color)); + return 1; +} + +static int cdlua5_createpalette(lua_State *L) +{ + int size_i; + long int *palette; + + size_i = luaL_checkint(L, 1); + if (size_i < 1) + luaL_argerror(L, 1, "palette size should be a positive integer"); + + palette = (long int *) malloc(256 * sizeof(long int)); + memset(palette, 0, 256 * sizeof(long int)); + + cdlua_pushpalette(L, palette, size_i); + + return 1; +} + +static int cdlua5_killpalette(lua_State *L) +{ + cdluaPalette* pal = (cdluaPalette *)luaL_checkudata(L, 1, "cdPalette"); + if (pal->color) + { + free(pal->color); + pal->color = NULL; /* mark as killed */ + } + + return 0; +} + +/***************************************************************************\ +* color = palette[i] * +\***************************************************************************/ +static int cdlua5_indexpalette(lua_State *L) +{ + cdluaPalette* pal = cdlua_checkpalette(L, 1); + + int index = luaL_checkint(L, 2); + if (index < 0 || index >= pal->count) + luaL_argerror(L, 2, "index is out of bounds"); + + lua_pushlightuserdata(L, (void*) pal->color[index]); + return 1; +} + +/***************************************************************************\ +* palette[i] = color * +\***************************************************************************/ +static int cdlua5_newindexpalette(lua_State *L) +{ + long int color; + cdluaPalette* pal = cdlua_checkpalette(L, 1); + + int index = luaL_checkint(L, 2); + if (index < 0 || index >= pal->count) + luaL_argerror(L, 2, "index is out of bounds"); + + color = cdlua_checkcolor(L, 3); + + pal->color[index] = color; + return 0; +} + +/*****************************************************************************\ + len +\*****************************************************************************/ +static int cdluaPalette_len(lua_State *L) +{ + cdluaPalette *pal = (cdluaPalette*)lua_touserdata(L, 1); + lua_pushinteger(L, pal->count); + return 1; +} + +/*****************************************************************************\ + tostring +\*****************************************************************************/ +static int cdlua5_tostringpalette (lua_State *L) +{ + cdluaPalette *pal = (cdluaPalette*)lua_touserdata(L, 1); + lua_pushfstring(L, "cdPalette(%p)%s", pal, (pal->color)? "": "-killed"); + return 1; +} + +static int cdlua5_tostringimage (lua_State *L) +{ + cdImage* *image_p = (cdImage**)lua_touserdata(L, 1); + lua_pushfstring(L, "cdImage(%p)%s", image_p, (*image_p)? "": "-killed"); + return 1; +} + +static int cdlua5_tostringbitmap (lua_State *L) +{ + cdBitmap* *bitmap_p = (cdBitmap**)lua_touserdata(L, 1); + lua_pushfstring(L, "cdBitmap(%p)%s", bitmap_p, (*bitmap_p)? "": "-killed"); + return 1; +} + +static int cdlua5_tostringchannel (lua_State *L) +{ + cdluaImageChannel *imagechannel_p = (cdluaImageChannel*)lua_touserdata(L, 1); + lua_pushfstring(L, "cdImageChannel(%p)%s", imagechannel_p, (imagechannel_p->channel)? "": "-killed"); + return 1; +} + +static int cdlua5_tostringstate (lua_State *L) +{ + cdState* *state_p = (cdState**)lua_touserdata(L, 1); + lua_pushfstring(L, "cdState(%p)%s", state_p, (*state_p)? "": "-released"); + return 1; +} + +static int cdlua5_tostringpattern (lua_State *L) +{ + cdluaPattern *pattern_p = (cdluaPattern*)lua_touserdata(L, 1); + lua_pushfstring(L, "cdPattern(%p)%s", pattern_p, (pattern_p->pattern)? "": "-killed"); + return 1; +} + +static int cdlua5_tostringstipple (lua_State *L) +{ + cdluaStipple *stipple_p = (cdluaStipple*)lua_touserdata(L, 1); + lua_pushfstring(L, "cdStipple(%p)%s", stipple_p, (stipple_p->stipple)? "": "-killed"); + return 1; +} + +static int cdlua5_tostringimagergba (lua_State *L) +{ + cdluaImageRGBA *imagergba_p = (cdluaImageRGBA*)lua_touserdata(L, 1); + lua_pushfstring(L, "cdImageRGBA(%p)%s", imagergba_p, (imagergba_p->red)? "": "-killed"); + return 1; +} + +static int cdlua5_tostringimagergb (lua_State *L) +{ + cdluaImageRGB *imagergb_p = (cdluaImageRGB*)lua_touserdata(L, 1); + lua_pushfstring(L, "cdImageRGB(%p)%s", imagergb_p, (imagergb_p->red)? "": "-killed"); + return 1; +} + +static int cdlua5_tostringimagemap (lua_State *L) +{ + cdluaImageMap *imagemap_p = (cdluaImageMap*)lua_touserdata(L, 1); + lua_pushfstring(L, "cdImageMap(%p)%s", imagemap_p, (imagemap_p->index)? "": "-killed"); + return 1; +} + +/***************************************************************************\ +* cd.Reserved * +\***************************************************************************/ +static int cdlua5_reserved(lua_State *L) +{ + long int color = cdlua_checkcolor(L, 1); + lua_pushnumber(L, cdReserved(color)); + return 1; +} + +/***************************************************************************\ +* cd.GetScreenColorPlanes * +\***************************************************************************/ +static int cdlua5_getscreencolorplanes(lua_State *L) +{ + lua_pushnumber(L, cdGetScreenColorPlanes()); + return 1; +} + +/***************************************************************************\ +* cd.GetScreenSize * +\***************************************************************************/ +static int cdlua5_getscreensize(lua_State *L) +{ + int width; + int height; + double mm_width; + double mm_height; + cdGetScreenSize(&width, &height, &mm_width, &mm_height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + lua_pushnumber(L, mm_width); + lua_pushnumber(L, mm_height); + return 4; +} + +/***************************************************************************\ +* cd.UseContextPlus * +\***************************************************************************/ +static int cdlua5_usecontextplus(lua_State *L) +{ + lua_pushnumber(L, cdUseContextPlus(luaL_checkint(L, 1))); + return 1; +} + + +/********************************************************************************\ +* CDLua Exported functions * +\********************************************************************************/ +static const struct luaL_reg cdlib[] = { + + /* Initialization */ + {"ContextCaps" , cdlua5_contextcaps}, + + /* Control */ + {"ReleaseState" , cdlua5_releasestate}, + + /* Stipple */ + {"CreateStipple", cdlua5_createstipple}, + {"KillStipple" , cdlua5_killstipple}, + + /* Pattern */ + {"CreatePattern", cdlua5_createpattern}, + {"KillPattern" , cdlua5_killpattern}, + + /* Client Images */ + {"RGB2Map" , cdlua5_rgb2map}, + {"CreateBitmap" , cdlua5_createbitmap}, + {"KillBitmap" , cdlua5_killbitmap}, + {"BitmapGetData" , cdlua5_bitmapgetdata}, + {"BitmapSetRect" , cdlua5_bitmapsetrect}, + {"BitmapRGB2Map" , cdlua5_bitmaprgb2map}, + + {"CreateImageRGB" , cdlua5_createimagergb}, + {"KillImageRGB" , cdlua5_killimagergb}, + {"CreateImageRGBA" , cdlua5_createimagergba}, + {"KillImageRGBA" , cdlua5_killimagergba}, + {"CreateImageMap" , cdlua5_createimagemap}, + {"KillImageMap" , cdlua5_killimagemap}, + + /* Server Images */ + {"KillImage" , cdlua5_killimage}, + + /* Other */ + {"Version" , cdlua5_version}, + {"RegisterCallback" , cdlua5_registercallback}, + {"ContextRegisterCallback" , cdlua5_registercallback}, + + /* Color Coding */ + {"EncodeColor" , cdlua5_encodecolor}, + {"DecodeColor" , cdlua5_decodecolor}, + {"EncodeAlpha" , cdlua5_encodealpha}, + {"DecodeAlpha" , cdlua5_decodealpha}, + {"Alpha" , cdlua5_alpha}, + {"Red" , cdlua5_red}, + {"Blue" , cdlua5_blue}, + {"Green" , cdlua5_green}, + {"Reserved" , cdlua5_reserved}, + + /* Palette */ + {"CreatePalette", cdlua5_createpalette}, + {"KillPalette" , cdlua5_killpalette}, + + /* native window functions */ + {"GetScreenColorPlanes" , cdlua5_getscreencolorplanes}, + {"GetScreenSize" , cdlua5_getscreensize}, + + /* gdi+ functions */ + {"UseContextPlus" , cdlua5_usecontextplus}, + + {NULL, NULL}, +}; + +void cdlua_addcontext(lua_State *L, cdluaLuaState* cdL, cdluaContext *cdlua_ctx) +{ + int i; + cdlua_ctx->id = cdL->numdrivers; + cdL->drivers[cdL->numdrivers] = cdlua_ctx; + + lua_pushstring(L, cdlua_ctx->name); + lua_pushnumber(L, cdL->numdrivers); + lua_settable(L, -3); + + /* skip CD_SIZECB, register other callbacks */ + for (i=1; i < cdlua_ctx->cb_n; i++) + { + lua_pushstring(L, cdlua_ctx->cb_list[i].name); + lua_pushnumber(L, i); + lua_settable(L, -3); + } + + cdL->numdrivers++; +} + + +/********************************************************************************\ +* Exports all CD constants * +\********************************************************************************/ +typedef struct cdlua5_constant { + const char *name; + lua_Number value; +} cdlua5_constant; + +typedef struct cdlua5_color { + const char *name; + long int value; +} cdlua5_color; + +static const struct cdlua5_constant cdlibconstant[] = { + /* query value */ + {"QUERY", CD_QUERY}, + + /* these definitions are compatible with the IM library */ + {"RGB" , CD_RGB}, + {"MAP" , CD_MAP}, + {"RGBA", CD_RGBA}, + + {"IRED" , CD_IRED}, + {"IGREEN", CD_IGREEN}, + {"IBLUE" , CD_IBLUE}, + {"IALPHA", CD_IALPHA}, + {"INDEX" , CD_INDEX}, + {"COLORS", CD_COLORS}, + + /* status report */ + {"ERROR", CD_ERROR}, + {"OK" , CD_OK}, + + /* clip mode */ + {"CLIPOFF" , CD_CLIPOFF}, + {"CLIPAREA" , CD_CLIPAREA}, + {"CLIPPOLYGON", CD_CLIPPOLYGON}, + {"CLIPREGION" , CD_CLIPREGION}, + + /* region combine mode */ + {"UNION" , CD_UNION}, + {"INTERSECT" , CD_INTERSECT}, + {"DIFFERENCE" , CD_DIFFERENCE}, + {"NOTINTERSECT", CD_NOTINTERSECT}, + + /* polygon mode (begin...end) */ + {"FILL" , CD_FILL}, + {"OPEN_LINES" , CD_OPEN_LINES}, + {"CLOSED_LINES", CD_CLOSED_LINES}, + {"CLIP" , CD_CLIP}, + {"BEZIER" , CD_BEZIER}, + {"REGION" , CD_REGION}, + {"POLYCUSTOM" , CD_POLYCUSTOM}, + + /* fill mode */ + {"EVENODD", CD_EVENODD}, + {"WINDING", CD_WINDING}, + + /* line join */ + {"MITER", CD_MITER}, + {"BEVEL", CD_BEVEL}, + {"ROUND", CD_ROUND}, + + /* line cap */ + {"CAPFLAT" , CD_CAPFLAT}, + {"CAPSQUARE", CD_CAPSQUARE}, + {"CAPROUND" , CD_CAPROUND}, + + /* background opacity mode */ + {"OPAQUE" , CD_OPAQUE}, + {"TRANSPARENT", CD_TRANSPARENT}, + + /* write mode */ + {"REPLACE", CD_REPLACE}, + {"XOR" , CD_XOR}, + {"NOT_XOR", CD_NOT_XOR}, + + /* color allocation mode (palette) */ + {"POLITE", CD_POLITE}, + {"FORCE" , CD_FORCE}, + + /* line style */ + {"CONTINUOUS" , CD_CONTINUOUS}, + {"DASHED" , CD_DASHED}, + {"DOTTED" , CD_DOTTED}, + {"DASH_DOT" , CD_DASH_DOT}, + {"DASH_DOT_DOT", CD_DASH_DOT_DOT}, + {"CUSTOM" , CD_CUSTOM}, + + /* marker type */ + {"PLUS" , CD_PLUS}, + {"STAR" , CD_STAR}, + {"CIRCLE" , CD_CIRCLE}, + {"X" , CD_X}, + {"BOX" , CD_BOX}, + {"DIAMOND" , CD_DIAMOND}, + {"HOLLOW_CIRCLE" , CD_HOLLOW_CIRCLE}, + {"HOLLOW_BOX" , CD_HOLLOW_BOX}, + {"HOLLOW_DIAMOND", CD_HOLLOW_DIAMOND}, + + /* hatch type */ + {"HORIZONTAL", CD_HORIZONTAL}, + {"VERTICAL" , CD_VERTICAL}, + {"FDIAGONAL" , CD_FDIAGONAL}, + {"BDIAGONAL" , CD_BDIAGONAL}, + {"CROSS" , CD_CROSS}, + {"DIAGCROSS" , CD_DIAGCROSS}, + + /* interior style */ + {"SOLID" , CD_SOLID}, + {"HATCH" , CD_HATCH}, + {"STIPPLE", CD_STIPPLE}, + {"PATTERN", CD_PATTERN}, + {"HOLLOW" , CD_HOLLOW}, + + /* text alignment */ + {"NORTH" , CD_NORTH}, + {"SOUTH" , CD_SOUTH}, + {"EAST" , CD_EAST}, + {"WEST" , CD_WEST}, + {"NORTH_EAST" , CD_NORTH_EAST}, + {"NORTH_WEST" , CD_NORTH_WEST}, + {"SOUTH_EAST" , CD_SOUTH_EAST}, + {"SOUTH_WEST" , CD_SOUTH_WEST}, + {"CENTER" , CD_CENTER}, + {"BASE_LEFT" , CD_BASE_LEFT}, + {"BASE_CENTER", CD_BASE_CENTER}, + {"BASE_RIGHT" , CD_BASE_RIGHT}, + + /* style */ + {"PLAIN" , CD_PLAIN}, + {"BOLD" , CD_BOLD}, + {"ITALIC" , CD_ITALIC}, + {"BOLD_ITALIC", CD_BOLD_ITALIC}, + {"UNDERLINE" , CD_UNDERLINE}, + {"STRIKEOUT" , CD_STRIKEOUT}, + + /* font size */ + {"SMALL" , CD_SMALL}, + {"STANDARD", CD_STANDARD}, + {"LARGE" , CD_LARGE}, + + /* Canvas Capabilities */ + {"CAP_NONE" , CD_CAP_NONE}, + {"CAP_FLUSH" , CD_CAP_FLUSH}, + {"CAP_CLEAR" , CD_CAP_CLEAR}, + {"CAP_PLAY" , CD_CAP_PLAY}, + {"CAP_YAXIS" , CD_CAP_YAXIS}, + {"CAP_CLIPAREA" , CD_CAP_CLIPAREA}, + {"CAP_CLIPPOLY" , CD_CAP_CLIPPOLY}, + {"CAP_RECT" , CD_CAP_RECT}, + {"CAP_IMAGERGB" , CD_CAP_IMAGERGB}, + {"CAP_IMAGERGBA" , CD_CAP_IMAGERGBA}, + {"CAP_IMAGEMAP" , CD_CAP_IMAGEMAP}, + {"CAP_GETIMAGERGB" , CD_CAP_GETIMAGERGB}, + {"CAP_IMAGESRV" , CD_CAP_IMAGESRV}, + {"CAP_BACKGROUND" , CD_CAP_BACKGROUND}, + {"CAP_BACKOPACITY" , CD_CAP_BACKOPACITY}, + {"CAP_WRITEMODE" , CD_CAP_WRITEMODE}, + {"CAP_LINESTYLE" , CD_CAP_LINESTYLE}, + {"CAP_LINEWITH" , CD_CAP_LINEWITH}, + {"CAP_WD" , CD_CAP_FPRIMTIVES}, + {"CAP_HATCH" , CD_CAP_HATCH}, + {"CAP_STIPPLE" , CD_CAP_STIPPLE}, + {"CAP_PATTERN" , CD_CAP_PATTERN}, + {"CAP_FONT" , CD_CAP_FONT}, + {"CAP_FONTDIM" , CD_CAP_FONTDIM}, + {"CAP_TEXTSIZE" , CD_CAP_TEXTSIZE}, + {"CAP_TEXTORIENTATION", CD_CAP_TEXTORIENTATION}, + {"CAP_PALETTE" , CD_CAP_PALETTE}, + {"CAP_LINECAP" , CD_CAP_LINECAP}, + {"CAP_LINEJOIN" , CD_CAP_LINEJOIN}, + {"CAP_REGION" , CD_CAP_REGION}, + {"CAP_CHORD" , CD_CAP_CHORD}, + {"CAP_ALL" , CD_CAP_ALL}, + + /* cdPlay definitions */ + {"SIZECB", CD_SIZECB}, + {"ABORT", CD_ABORT}, + {"CONTINUE", CD_CONTINUE}, + + /* simulation flags */ + {"SIM_NONE" , CD_SIM_NONE}, + {"SIM_LINE" , CD_SIM_LINE}, + {"SIM_RECT" , CD_SIM_RECT}, + {"SIM_ARC" , CD_SIM_ARC}, + {"SIM_POLYLINE" , CD_SIM_POLYLINE}, + {"SIM_BOX" , CD_SIM_BOX}, + {"SIM_SECTOR" , CD_SIM_SECTOR}, + {"SIM_POLYGON" , CD_SIM_POLYGON}, + {"SIM_CHORD" , CD_SIM_CHORD}, + {"SIM_ALL" , CD_SIM_ALL}, + {"SIM_LINES" , CD_SIM_LINES}, + {"SIM_FILLS" , CD_SIM_FILLS}, + + /* some conversion factors */ + {"MM2PT" , CD_MM2PT}, + {"RAD2DEG", CD_RAD2DEG}, + + /* cdcgm.h (the callback names are registered in cdlua_addcontext) */ + + /* cdgdiplus.h */ + {"SPLINE" , CD_SPLINE}, + {"FILLSPLINE" , CD_FILLSPLINE}, + {"FILLGRADIENT", CD_FILLGRADIENT}, + + /* cdps.h */ + {"A0" , CD_A0}, + {"A1" , CD_A1}, + {"A2" , CD_A2}, + {"A3" , CD_A3}, + {"A4" , CD_A4}, + {"A5" , CD_A5}, + {"LETTER", CD_LETTER}, + {"LEGAL" , CD_LEGAL}, + + {NULL, -1}, +}; + +static void initconst(lua_State *L) +{ + const cdlua5_constant *l = cdlibconstant; + for (; l->name; l++) { + lua_pushstring(L, l->name); + lua_pushnumber(L, l->value); + lua_settable(L, -3); + } +} + +/* some predefined colors for convenience */ +static const struct cdlua5_color cdlibcolor[] = { + {"RED" , CD_RED}, + {"DARK_RED" , CD_DARK_RED}, + {"GREEN" , CD_GREEN}, + {"DARK_GREEN" , CD_DARK_GREEN}, + {"BLUE" , CD_BLUE}, + {"DARK_BLUE" , CD_DARK_BLUE}, + {"YELLOW" , CD_YELLOW}, + {"DARK_YELLOW" , CD_DARK_YELLOW}, + {"MAGENTA" , CD_MAGENTA}, + {"DARK_MAGENTA", CD_DARK_MAGENTA}, + {"CYAN" , CD_CYAN}, + {"DARK_CYAN" , CD_DARK_CYAN}, + {"WHITE" , CD_WHITE}, + {"BLACK" , CD_BLACK}, + {"DARK_GRAY" , CD_DARK_GRAY}, + {"GRAY" , CD_GRAY}, + {NULL, -1}, +}; + +static void initcolor(lua_State *L) +{ + const cdlua5_color *l = cdlibcolor; + for (; l->name; l++) + { + lua_pushstring(L, l->name); + lua_pushlightuserdata(L, (void*) l->value); + lua_settable(L, -3); + } +} + +static void initmetatables(lua_State *L) +{ + /* there is no object orientation for these metatables, + only gc and optionaly array access */ + + luaL_newmetatable(L, "cdState"); /* create new metatable for cdState handles */ + lua_pushliteral (L, "__gc"); + lua_pushcfunction (L, cdlua5_releasestate); /* register the method */ + lua_settable (L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, cdlua5_tostringstate); + lua_settable(L, -3); + lua_pop(L, 1); /* removes the metatable from the top of the stack */ + + luaL_newmetatable(L, "cdImage"); + lua_pushliteral (L, "__gc"); + lua_pushcfunction (L, cdlua5_killimage); + lua_settable (L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, cdlua5_tostringimage); + lua_settable(L, -3); + lua_pop(L, 1); + + luaL_newmetatable(L, "cdBitmap"); + lua_pushliteral (L, "__gc"); + lua_pushcfunction (L, cdlua5_killbitmap); + lua_settable (L, -3); + lua_pushliteral(L, "__index"); + lua_pushcfunction(L, cdlua5_indexbitmap); + lua_settable(L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, cdlua5_tostringbitmap); + lua_settable(L, -3); + lua_pop(L, 1); + + luaL_newmetatable(L, "cdImageRGB"); + lua_pushliteral (L, "__gc"); + lua_pushcfunction (L, cdlua5_killimagergb); + lua_settable (L, -3); + lua_pushliteral(L, "__index"); + lua_pushcfunction(L, cdlua5_indeximagergb); + lua_settable(L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, cdlua5_tostringimagergb); + lua_settable(L, -3); + lua_pop(L, 1); + + luaL_newmetatable(L, "cdImageRGBA"); + lua_pushliteral (L, "__gc"); + lua_pushcfunction (L, cdlua5_killimagergba); + lua_settable (L, -3); + lua_pushliteral(L, "__index"); + lua_pushcfunction(L, cdlua5_indeximagergba); + lua_settable(L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, cdlua5_tostringimagergba); + lua_settable(L, -3); + lua_pop(L, 1); + + luaL_newmetatable(L, "cdImageChannel"); + lua_pushliteral(L, "__index"); + lua_pushcfunction(L, cdlua5_indexchannel); + lua_settable(L, -3); + lua_pushliteral(L, "__newindex"); + lua_pushcfunction(L, cdlua5_newindexchannel); + lua_settable(L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, cdlua5_tostringchannel); + lua_settable(L, -3); + lua_pop(L, 1); + + luaL_newmetatable(L, "cdStipple"); + lua_pushliteral (L, "__gc"); + lua_pushcfunction (L, cdlua5_killstipple); + lua_settable (L, -3); + lua_pushliteral(L, "__index"); + lua_pushcfunction(L, cdlua5_indexstipple); + lua_settable(L, -3); + lua_pushliteral(L, "__newindex"); + lua_pushcfunction(L, cdlua5_newindexstipple); + lua_settable(L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, cdlua5_tostringstipple); + lua_settable(L, -3); + lua_pop(L, 1); + + luaL_newmetatable(L, "cdPattern"); + lua_pushliteral (L, "__gc"); + lua_pushcfunction (L, cdlua5_killpattern); + lua_settable (L, -3); + lua_pushliteral(L, "__index"); + lua_pushcfunction(L, cdlua5_indexpattern); + lua_settable(L, -3); + lua_pushliteral(L, "__newindex"); + lua_pushcfunction(L, cdlua5_newindexpattern); + lua_settable(L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, cdlua5_tostringpattern); + lua_settable(L, -3); + lua_pop(L, 1); + + luaL_newmetatable(L, "cdPalette"); + lua_pushliteral(L, "__gc"); + lua_pushcfunction(L, cdlua5_killpalette); + lua_settable(L, -3); + lua_pushliteral(L, "__index"); + lua_pushcfunction(L, cdlua5_indexpalette); + lua_settable(L, -3); + lua_pushliteral(L, "__newindex"); + lua_pushcfunction(L, cdlua5_newindexpalette); + lua_settable(L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, cdlua5_tostringpalette); + lua_settable(L, -3); + lua_pushliteral(L, "__len"); + lua_pushcfunction(L, cdluaPalette_len); + lua_settable(L, -3); + lua_pop(L, 1); + + luaL_newmetatable(L, "cdImageMap"); + lua_pushliteral(L, "__gc"); + lua_pushcfunction(L, cdlua5_killimagemap); + lua_settable(L, -3); + lua_pushliteral(L, "__index"); + lua_pushcfunction(L, cdlua5_indeximagemap); + lua_settable(L, -3); + lua_pushliteral(L, "__newindex"); + lua_pushcfunction(L, cdlua5_newindeximagemap); + lua_settable(L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, cdlua5_tostringimagemap); + lua_settable(L, -3); + lua_pop(L, 1); +} + +static void setinfo (lua_State *L) +{ + lua_pushliteral (L, "_COPYRIGHT"); + lua_pushliteral (L, CD_COPYRIGHT); + lua_settable (L, -3); + + lua_pushliteral (L, "_DESCRIPTION"); + lua_pushliteral (L, CD_DESCRIPTION); + lua_settable (L, -3); + + lua_pushliteral (L, "_NAME"); + lua_pushliteral (L, CD_NAME); + lua_settable (L, -3); + + lua_pushliteral (L, "_VERSION"); + lua_pushstring (L, cdVersion()); + lua_settable (L, -3); + + lua_pushliteral (L, "_VERSION_DATE"); + lua_pushliteral(L, CD_VERSION_DATE); + lua_settable (L, -3); + + lua_pushliteral (L, "_VERSION_NUMBER"); + lua_pushinteger(L, cdVersionNumber()); + lua_settable (L, -3); +} + + +/********************************************************************************\ +* CDLua OpenLib * +\********************************************************************************/ + + +int cdlua_open (lua_State *L) +{ + cdluaLuaState* cdL = malloc(sizeof(cdluaLuaState)); + memset(cdL, 0, sizeof(cdluaLuaState)); + cdlua_SetState(L, cdL); + + initmetatables(L); + + luaL_register(L, "cd", cdlib); /* leave "cd" table at the top of the stack */ + setinfo(L); + + cdlua_open_active(L, cdL); + cdlua_open_canvas(L); + + cdlua_initdrivers(L, cdL); + initconst(L); + initcolor(L); + + return 1; +} + +int cdlua_close(lua_State *L) +{ + cdluaLuaState* cdL = cdlua_getstate(L); + if (cdL) + { + cdKillCanvas(cdL->void_canvas); + free(cdL); + } + return 0; +} + +int luaopen_cdlua(lua_State* L) +{ + return cdlua_open(L); +} + +int luaopen_cdlua51(lua_State* L) +{ + return cdlua_open(L); +} diff --git a/cd/src/lua5/cdlua5.def b/cd/src/lua5/cdlua5.def new file mode 100755 index 0000000..b4811b2 --- /dev/null +++ b/cd/src/lua5/cdlua5.def @@ -0,0 +1,13 @@ +EXPORTS + cdlua_open + cdlua_close + cdlua_getcanvas + cdlua_addcontext + cdlua_getplaystate + cdlua_getstate + cdlua_checkcanvas + cdlua_pushcanvas + luaopen_cdlua + luaopen_cdlua51 + cdlua_pushbitmap + cdlua_checkbitmap \ No newline at end of file diff --git a/cd/src/lua5/cdlua5_active.c b/cd/src/lua5/cdlua5_active.c new file mode 100755 index 0000000..ad4398e --- /dev/null +++ b/cd/src/lua5/cdlua5_active.c @@ -0,0 +1,2163 @@ +/** \file + * \brief Lua Binding of the OLD API that needs an active canvas + * + * See Copyright Notice in cd.h + */ + + +#include +#include +#include + +#ifdef CD_NO_OLD_INTERFACE +#undef CD_NO_OLD_INTERFACE +#endif + +#include "cd.h" +#include "wd.h" +#include "cdirgb.h" + +#include +#include + +#include "cdlua.h" +#include "cdlua5_private.h" +#include "cdvoid5.h" + + +void cdlua_kill_active(lua_State * L, cdCanvas* canvas) +{ + cdluaLuaState* cdL = cdlua_getstate(L); + cdCanvas* void_canvas = cdL->void_canvas; + + /* find out about the currently active canvas */ + cdCanvas *current_canvas = cdActiveCanvas(); + + /* this should never happen, unless the user did it on purpouse! */ + if (canvas == void_canvas) + luaL_error(L, "trying to kill the void canvas"); + + /* if the user killed the currently active canvas, activate void canvas */ + if (canvas == current_canvas) + cdActivate(void_canvas); +} + +/***************************************************************************\ +* Activates a cd canvas. * +\***************************************************************************/ +static int cdlua5_activate(lua_State * L) +{ + cdCanvas* canvas; + + /* if canvas is nil, activate a void canvas */ + if (lua_isnil(L, 1)) + { + cdluaLuaState* cdL = cdlua_getstate(L); + cdCanvas* void_canvas = cdL->void_canvas; + lua_pushnumber(L, cdActivate(void_canvas)); + return 1; + } + + canvas = cdlua_checkcanvas(L, 1); + lua_pushnumber(L, cdActivate(canvas)); + return 1; +} + +/***************************************************************************\ +* Returns the active canvas. * +\***************************************************************************/ +static int cdlua5_activecanvas(lua_State* L) +{ + cdCanvas* canvas = cdActiveCanvas(); + if (canvas) + cdlua_pushcanvas(L, canvas); + else + lua_pushnil(L); + + return 1; +} + +/***************************************************************************\ +* cd.Simulate(mode: number) -> (old_mode: number) * +\***************************************************************************/ +static int cdlua5_simulate(lua_State *L) +{ + lua_pushnumber(L, cdSimulate(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* Control * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Clear() * +\***************************************************************************/ +static int cdlua5_clear(lua_State *L) +{ + (void)L; + cdClear(); + return 0; +} + +/***************************************************************************\ +* cd.Flush() * +\***************************************************************************/ +static int cdlua5_flush(lua_State *L) +{ + (void)L; + cdFlush(); + return 0; +} + +static int cdlua5_savestate(lua_State *L) +{ + cdState* state = cdSaveState(); + if (state) + cdlua_pushstate(L, state); + else + lua_pushnil(L); + return 1; +} + +static int cdlua5_restorestate(lua_State * L) +{ + cdRestoreState(cdlua_checkstate(L, 1)); + return 0; +} + +/***************************************************************************\ +* cd.SetAttribute(name, data: string) * +\***************************************************************************/ + +static int cdlua_isuserdata(const char* name) +{ + if (strcmp(name, "HDC")==0) return 1; + if (strcmp(name, "GC")==0) return 1; + return 0; +} + +static int cdlua5_setattribute(lua_State *L) +{ + const char* name = luaL_checkstring(L, 1); + + if (lua_isnil(L, 2)) + { + cdSetAttribute(name, NULL); + } + else + { + char* data; + if (cdlua_isuserdata(name)) + data = (char*) lua_touserdata(L, 2); + else + data = (char*) luaL_checkstring(L, 2); + cdSetAttribute(name, data); + } + return 0; +} + + +/***************************************************************************\ +* cd.SetAttribute(name: string) -> (data: string) * +\***************************************************************************/ +static int cdlua5_getattribute(lua_State *L) +{ + char* name = (char *)luaL_checkstring(L, 1); + char* data = cdGetAttribute(name); + if (data) + { + if (cdlua_isuserdata(name)) + lua_pushlightuserdata(L, data); + else + lua_pushstring(L, data); + } + else + lua_pushnil(L); + return 1; +} + + + +/***************************************************************************\ +* Coordinate System * +\***************************************************************************/ + +/***************************************************************************\ +* cd.GetCanvasSize() -> (width, heigth, mm_width, mm_height: number) * +\***************************************************************************/ +static int cdlua5_getcanvassize(lua_State *L) +{ + int width; + int height; + double mm_width; + double mm_height; + + cdGetCanvasSize(&width, &height, &mm_width, &mm_height); + + lua_pushnumber(L, width); + lua_pushnumber(L, height); + lua_pushnumber(L, mm_width); + lua_pushnumber(L, mm_height); + return 4; +} + +/***************************************************************************\ +* cd.UpdateYAxis(yc: number) -> (yr: number) * +\***************************************************************************/ +static int cdlua5_updateyaxis(lua_State *L) +{ + int y = luaL_checkint(L, 1); + cdUpdateYAxis(&y); + lua_pushnumber(L, y); + return 1; +} + +/***************************************************************************\ +* cd.MM2Pixel(mm_dx, mm_dy: number) -> (dx, dy: number) * +\***************************************************************************/ +static int cdlua5_mm2pixel(lua_State *L) +{ + double mm_dx_d, mm_dy_d; + int dx, dy; + + mm_dx_d = luaL_checknumber(L,1); + mm_dy_d = luaL_checknumber(L,2); + + cdMM2Pixel(mm_dx_d, mm_dy_d, &dx, &dy); + lua_pushnumber(L, dx); + lua_pushnumber(L, dy); + return 2; +} + +/***************************************************************************\ +* cd.Pixel2MM(dx, dy: number) -> (mm_dx, mm_dy: number) * +\***************************************************************************/ +static int cdlua5_pixel2mm(lua_State *L) +{ + double mm_dx_d, mm_dy_d; + int dx, dy; + + dx = luaL_checkint(L,1); + dy = luaL_checkint(L,2); + + cdPixel2MM(dx, dy, &mm_dx_d, &mm_dy_d); + lua_pushnumber(L, mm_dx_d); + lua_pushnumber(L, mm_dy_d); + return 2; +} + +/***************************************************************************\ +* cd.Origin(x, y: number) * +\***************************************************************************/ +static int cdlua5_origin(lua_State *L) +{ + cdOrigin(luaL_checkint(L,1), luaL_checkint(L,2)); + return 0; +} + + + +/***************************************************************************\ +* World Coordinates * +\***************************************************************************/ + +/***************************************************************************\ +* wd.Window(xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int wdlua5_window(lua_State *L) +{ + double xmin = luaL_checknumber(L, 1); + double xmax = luaL_checknumber(L, 2); + double ymin = luaL_checknumber(L, 3); + double ymax = luaL_checknumber(L, 4); + wdWindow(xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* wd.GetWindow() -> (xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int wdlua5_getwindow(lua_State *L) +{ + double xmin, xmax, ymin, ymax; + + wdGetWindow(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/***************************************************************************\ +* wd.Viewport(xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int wdlua5_viewport(lua_State *L) +{ + int xmin = luaL_checkint(L, 1); + int xmax = luaL_checkint(L, 2); + int ymin = luaL_checkint(L, 3); + int ymax = luaL_checkint(L, 4); + wdViewport(xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* wd.GetViewport() -> (xmin, xmax, ymin, ymax: number * +\***************************************************************************/ +static int wdlua5_getviewport(lua_State *L) +{ + int xmin, xmax, ymin, ymax; + + wdGetViewport(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/***************************************************************************\ +* wd.World2Canvas(xw, yw: number) -> (xv, yv: number) * +\***************************************************************************/ +static int wdlua5_world2canvas(lua_State *L) +{ + double xw_d, yw_d; + int xv_i, yv_i; + + xw_d = luaL_checknumber(L, 1); + yw_d = luaL_checknumber(L, 2); + + wdWorld2Canvas(xw_d, yw_d, &xv_i, &yv_i); + lua_pushnumber(L, xv_i); + lua_pushnumber(L, yv_i); + return 2; +} + +/***************************************************************************\ +* wd.Canvas2World(xv, yv: number) -> (xw, yw: number) * +\***************************************************************************/ +static int wdlua5_canvas2world(lua_State *L) +{ + int xv_i, yv_i; + double xw_d, yw_d; + + xv_i = luaL_checkint(L, 1); + yv_i = luaL_checkint(L, 2); + + wdCanvas2World(xv_i, yv_i, &xw_d, &yw_d); + lua_pushnumber(L, xw_d); + lua_pushnumber(L, yw_d); + return 2; +} + + + +/***************************************************************************\ +* General Attributes * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Foreground(color) -> color * +\***************************************************************************/ +static int cdlua5_foreground(lua_State *L) +{ + long int color_i = cdlua_checkcolor(L, 1); + color_i = cdForeground(color_i); + lua_pushlightuserdata(L, (void*)color_i); + return 1; +} + +/***************************************************************************\ +* cd.Background(color) -> color * +\***************************************************************************/ +static int cdlua5_background(lua_State *L) +{ + long int color_i = cdlua_checkcolor(L, 1); + color_i = cdBackground(color_i); + lua_pushlightuserdata(L, (void*) color_i); + return 1; +} + +/***************************************************************************\ +* cd.WriteMode(mode: number) -> (old_mode: number) * +\***************************************************************************/ +static int cdlua5_writemode(lua_State *L) +{ + lua_pushnumber(L, cdWriteMode(luaL_checkint(L, 1))); + return 1; +} + + + +/***************************************************************************\ +* Clipping * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Clip(mode: number) -> (old_mode: number) * +\***************************************************************************/ +static int cdlua5_clip(lua_State *L) +{ + lua_pushnumber(L, cdClip(luaL_checkint(L,1))); + return 1; +} + +/***************************************************************************\ +* cd.ClipArea(xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int cdlua5_cliparea(lua_State *L) +{ + int xmin = luaL_checkint(L, 1); + int xmax = luaL_checkint(L, 2); + int ymin = luaL_checkint(L, 3); + int ymax = luaL_checkint(L, 4); + + cdClipArea(xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* cd.wClipArea(xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int wdlua5_cliparea(lua_State *L) +{ + double xmin = luaL_checknumber(L, 1); + double xmax = luaL_checknumber(L, 2); + double ymin = luaL_checknumber(L, 3); + double ymax = luaL_checknumber(L, 4); + + wdClipArea(xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* cd.GetClipArea() -> (xmin, xmax, ymin, ymax, status: number) * +\***************************************************************************/ +static int cdlua5_getcliparea(lua_State *L) +{ + int xmin, xmax, ymin, ymax; + int status; + + status = cdGetClipArea(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + lua_pushnumber(L, status); + return 5; +} + +/***************************************************************************\ +* cd.wGetClipArea() -> (xmin, xmax, ymin, ymax, status: number) * +\***************************************************************************/ +static int wdlua5_getcliparea(lua_State *L) +{ + double xmin, xmax, ymin, ymax; + int status; + + status = wdGetClipArea(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + lua_pushnumber(L, status); + return 5; +} + +/***************************************************************************\ +* cd.GetClipPoly() -> (n: number, points: table) * +\***************************************************************************/ +static int cdlua5_getclippoly(lua_State *L) +{ + int n, i; + int *pts; + + pts = cdGetClipPoly(&n); + if (pts) + { + lua_pushnumber(L, n); + + lua_newtable(L); + for (i=0; i < 2*n; i++) + { + lua_pushnumber(L, i+1); + lua_pushnumber(L, pts[i]); + lua_settable(L, -3); + } + + return 2; + } + else + { + lua_pushnil(L); + return 1; + } +} + +/***************************************************************************\ +* cd.wGetClipPoly() -> (n: number, points: table) * +\***************************************************************************/ +static int wdlua5_getclippoly(lua_State *L) +{ + int n, i; + double *pts; + + pts = wdGetClipPoly(&n); + if (pts) + { + lua_pushnumber(L, n); + + lua_newtable(L); + for (i=0; i < 2*n; i++) + { + lua_pushnumber(L, i+1); + lua_pushnumber(L, pts[i]); + lua_settable(L,-3); + } + + return 2; + } + else + { + lua_pushnil(L); + return 1; + } +} + + +/***************************************************************************\ +* Regions * +\***************************************************************************/ + +/***************************************************************************\ +* cd.RegionCombineMode(mode: number) -> (old_mode: number) * +\***************************************************************************/ +static int cdlua5_regioncombinemode(lua_State *L) +{ + lua_pushnumber(L, cdRegionCombineMode(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.PointInRegion(x, y: number) -> (status: number) * +\***************************************************************************/ +static int cdlua5_pointinregion(lua_State *L) +{ + lua_pushnumber(L, cdPointInRegion(luaL_checkint(L, 1),luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.wPointInRegion(x, y: number) -> (status: number) * +\***************************************************************************/ +static int wdlua5_pointinregion(lua_State *L) +{ + lua_pushnumber(L, wdPointInRegion(luaL_checknumber(L, 1), luaL_checknumber(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.OffsetRegion(dx, dy: number) * +\***************************************************************************/ +static int cdlua5_offsetregion(lua_State *L) +{ + cdOffsetRegion(luaL_checkint(L, 1), luaL_checkint(L, 2)); + return 0; +} + +/***************************************************************************\ +* cd.wOffsetRegion(dx, dy: number) * +\***************************************************************************/ +static int wdlua5_offsetregion(lua_State *L) +{ + wdOffsetRegion(luaL_checknumber(L, 1), luaL_checknumber(L, 2)); + return 0; +} + +/***************************************************************************\ +* cd.RegionBox() -> (xmin, xmax, ymin, ymax, status: number) * +\***************************************************************************/ +static int cdlua5_regionbox(lua_State *L) +{ + int xmin, xmax, ymin, ymax; + + cdRegionBox(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/***************************************************************************\ +* cd.wRegionBox() -> (xmin, xmax, ymin, ymax, status: number) * +\***************************************************************************/ +static int wdlua5_regionbox(lua_State *L) +{ + double xmin, xmax, ymin, ymax; + + wdRegionBox(&xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + + + +/***************************************************************************\ +* Primitives * +\***************************************************************************/ + + + +/***************************************************************************\ +* Marks * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Pixel(x, y: number, color) * +\***************************************************************************/ +static int cdlua5_pixel (lua_State *L) +{ + cdPixel(luaL_checkint(L, 1), luaL_checkint(L, 2), cdlua_checkcolor(L, 3)); + return 0 ; +} + +/***************************************************************************\ +* cd.wPixel(x, y: number, color) * +\***************************************************************************/ +static int wdlua5_pixel (lua_State *L) +{ + wdPixel(luaL_checknumber(L, 1), luaL_checknumber(L, 2), cdlua_checkcolor(L, 3)); + return 0; +} + +/***************************************************************************\ +* cd.Mark(x, y: number) * +\***************************************************************************/ +static int cdlua5_mark(lua_State *L) +{ + cdMark(luaL_checkint(L,1), luaL_checkint(L,2)); + return 0; +} + +/***************************************************************************\ +* cd.wMark(x, y: number) * +\***************************************************************************/ +static int wdlua5_mark(lua_State *L) +{ + wdMark(luaL_checknumber(L, 1), luaL_checknumber(L, 2)); + return 0; +} + +/***************************************************************************\ +* cd.MarkType(type: number) -> (old_type: number) * +\***************************************************************************/ +static int cdlua5_marktype(lua_State *L) +{ + lua_pushnumber(L, cdMarkType(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.MarkSize(size: number) -> (old_size: number) * +\***************************************************************************/ +static int cdlua5_marksize(lua_State *L) +{ + lua_pushnumber(L, cdMarkSize(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.wMarkSize(size: number) -> (old_size: number) * +\***************************************************************************/ +static int wdlua5_marksize(lua_State *L) +{ + lua_pushnumber(L, wdMarkSize(luaL_checknumber(L, 1))); + return 1; +} + + + +/***************************************************************************\ +* Lines * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Line(x1, y1, x2, y2: number) * +\***************************************************************************/ +static int cdlua5_line(lua_State *L) +{ + int x1 = luaL_checkint(L,1); + int y1 = luaL_checkint(L,2); + int x2 = luaL_checkint(L,3); + int y2 = luaL_checkint(L,4); + cdLine(x1, y1, x2, y2); + return 0; +} + +/***************************************************************************\ +* cd.wLine(x1, y1, x2, y2: number) * +\***************************************************************************/ +static int wdlua5_line(lua_State *L) +{ + double x1 = luaL_checknumber(L, 1); + double y1 = luaL_checknumber(L, 2); + double x2 = luaL_checknumber(L, 3); + double y2 = luaL_checknumber(L, 4); + wdLine(x1, y1, x2, y2); + return 0; +} + +/***************************************************************************\ +* cd.Rect(xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int cdlua5_rect(lua_State *L) +{ + int xmin = luaL_checkint(L,1); + int xmax = luaL_checkint(L,2); + int ymin = luaL_checkint(L,3); + int ymax = luaL_checkint(L,4); + cdRect(xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* cd.wRect(xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int wdlua5_rect(lua_State *L) +{ + double xmin = luaL_checknumber(L, 1); + double xmax = luaL_checknumber(L, 2); + double ymin = luaL_checknumber(L, 3); + double ymax = luaL_checknumber(L, 4); + wdRect(xmin,xmax,ymin,ymax); + return 0; +} + +/***************************************************************************\ +* cd.Arc(xc, yc, w, h, angle1, angle2: number) * +\***************************************************************************/ +static int cdlua5_arc(lua_State *L) +{ + int xc = luaL_checkint(L,1); + int yc = luaL_checkint(L,2); + int w = luaL_checkint(L,3); + int h = luaL_checkint(L,4); + double angle1 = luaL_checknumber(L,5); + double angle2 = luaL_checknumber(L,6); + cdArc(xc, yc, w, h, angle1, angle2); + return 0; +} + +/***************************************************************************\ +* cd.wArc(xc, yc, w, h, angle1, angle2: number) * +\***************************************************************************/ +static int wdlua5_arc(lua_State *L) +{ + double xc = luaL_checknumber(L, 1); + double yc = luaL_checknumber(L, 2); + double w = luaL_checknumber(L, 3); + double h = luaL_checknumber(L, 4); + double angle1 = luaL_checknumber(L, 5); + double angle2 = luaL_checknumber(L, 6); + wdArc(xc, yc, w, h, angle1, angle2); + return 0; +} + +/***************************************************************************\ +* cd.LineStyle(style: number) -> (old_style: number) * +\***************************************************************************/ +static int cdlua5_linestyle(lua_State *L) +{ + lua_pushnumber(L, cdLineStyle(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.LineStyleDashes(dashes: table, count: number) * +\***************************************************************************/ +static int cdlua5_linestyledashes(lua_State *L) +{ + int *dashes_int, dashes_count, i; + + if (!lua_istable(L, 1)) + luaL_argerror(L, 1, "invalid dashes, must be a table"); + + dashes_count = luaL_checkint(L, 2); + dashes_int = (int*) malloc(dashes_count * sizeof(int)); + + for (i=0; i < dashes_count; i++) + { + lua_pushnumber(L, i+1); + lua_gettable(L,1); + + dashes_int[i] = luaL_checkint(L,-1); + } + + cdLineStyleDashes(dashes_int, dashes_count); + free(dashes_int); + + return 0; +} + +/***************************************************************************\ +* cd.LineWidth(width: number) -> (old_width: number) * +\***************************************************************************/ +static int cdlua5_linewidth(lua_State *L) +{ + lua_pushnumber(L, cdLineWidth(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.wLineWidth(width: number) -> (old_width: number) * +\***************************************************************************/ +static int wdlua5_linewidth(lua_State *L) +{ + lua_pushnumber(L, wdLineWidth(luaL_checknumber(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.LineJoin(style: number) -> (old_style: number) * +\***************************************************************************/ +static int cdlua5_linejoin(lua_State *L) +{ + lua_pushnumber(L, cdLineJoin(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.LineCap(style: number) -> (old_style: number) * +\***************************************************************************/ +static int cdlua5_linecap(lua_State *L) +{ + lua_pushnumber(L, cdLineCap(luaL_checkint(L, 1))); + return 1; +} + + + +/***************************************************************************\ +* Filled Areas * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Box(xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int cdlua5_box(lua_State *L) +{ + int xmin = luaL_checkint(L, 1); + int xmax = luaL_checkint(L, 2); + int ymin = luaL_checkint(L, 3); + int ymax = luaL_checkint(L, 4); + cdBox(xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* cd.wBox(xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int wdlua5_box(lua_State *L) +{ + double xmin = luaL_checknumber(L, 1); + double xmax = luaL_checknumber(L, 2); + double ymin = luaL_checknumber(L, 3); + double ymax = luaL_checknumber(L, 4); + wdBox(xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* cd.Sector(xc, yc, w, h, angle1, angle2: number) * +\***************************************************************************/ +static int cdlua5_sector(lua_State *L) +{ + int xc = luaL_checkint(L,1); + int yc = luaL_checkint(L,2); + int w = luaL_checkint(L,3); + int h = luaL_checkint(L,4); + double angle1 = luaL_checknumber(L,5); + double angle2 = luaL_checknumber(L,6); + cdSector(xc, yc, w, h, angle1, angle2); + return 0; +} + +/***************************************************************************\ +* cd.wSector(xc, yc, w, h, angle1, angle2: number) * +\***************************************************************************/ +static int wdlua5_sector(lua_State *L) +{ + double xc = luaL_checknumber(L, 1); + double yc = luaL_checknumber(L, 2); + double w = luaL_checknumber(L, 3); + double h = luaL_checknumber(L, 4); + double angle1 = luaL_checknumber(L, 5); + double angle2 = luaL_checknumber(L, 6); + wdSector(xc, yc, w, h, angle1, angle2); + return 0; +} + +/***************************************************************************\ +* cd.Chord(xc, yc, w, h, angle1, angle2: number) * +\***************************************************************************/ +static int cdlua5_chord(lua_State *L) +{ + int xc = luaL_checkint(L,1); + int yc = luaL_checkint(L,2); + int w = luaL_checkint(L,3); + int h = luaL_checkint(L,4); + double angle1 = luaL_checknumber(L,5); + double angle2 = luaL_checknumber(L,6); + cdChord(xc, yc, w, h, angle1, angle2); + return 0; +} + +/***************************************************************************\ +* cd.wChord(xc, yc, w, h, angle1, angle2: number) * +\***************************************************************************/ +static int wdlua5_chord(lua_State *L) +{ + double xc = luaL_checknumber(L, 1); + double yc = luaL_checknumber(L, 2); + double w = luaL_checknumber(L, 3); + double h = luaL_checknumber(L, 4); + double angle1 = luaL_checknumber(L, 5); + double angle2 = luaL_checknumber(L, 6); + wdChord(xc, yc, w, h, angle1, angle2); + return 0; +} + +/***************************************************************************\ +* cd.BackOpacity(opacity: number) -> (old_opacity: number) * +\***************************************************************************/ +static int cdlua5_backopacity(lua_State *L) +{ + lua_pushnumber(L, cdBackOpacity(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.FillMode(mode: number) -> (old_mode: number) * +\***************************************************************************/ +static int cdlua5_fillmode(lua_State *L) +{ + lua_pushnumber(L, cdFillMode(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.InteriorStyle(style: number) -> (old_style: number) * +\***************************************************************************/ +static int cdlua5_interiorstyle(lua_State *L) +{ + lua_pushnumber(L, cdInteriorStyle(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.Hatch(style: number) -> (old_style: number) * +\***************************************************************************/ +static int cdlua5_hatch(lua_State *L) +{ + lua_pushnumber(L, cdHatch(luaL_checkint(L, 1))); + return 1; +} + +static int cdlua5_stipple(lua_State *L) +{ + cdluaStipple *stipple_p = cdlua_checkstipple(L, 1); + cdStipple(stipple_p->width, stipple_p->height, stipple_p->stipple); + return 0 ; +} + +static int wdlua5_stipple(lua_State *L) +{ + cdluaStipple *stipple_p = cdlua_checkstipple(L, 1); + double w_mm = luaL_checknumber(L, 2); + double h_mm = luaL_checknumber(L, 3); + wdStipple(stipple_p->width, stipple_p->height, stipple_p->stipple, w_mm, h_mm); + return 0; +} + +static int cdlua5_getstipple(lua_State *L) +{ + int width, height, size; + unsigned char *stipple, *new_stipple = NULL; + + stipple = cdGetStipple(&width, &height); + + size = width * height; + + if (stipple) + new_stipple = (unsigned char *)malloc(size); + + if (new_stipple) + { + memcpy(new_stipple, stipple, size); + cdlua_pushstipple(L, new_stipple, width, height); + } + else + lua_pushnil(L); + + return 1; +} + +static int cdlua5_pattern(lua_State *L) +{ + cdluaPattern* pattern_p = cdlua_checkpattern(L, 1); + cdPattern(pattern_p->width, pattern_p->height, pattern_p->pattern); + return 0; +} + +static int wdlua5_pattern(lua_State *L) +{ + cdluaPattern* pattern_p = cdlua_checkpattern(L, 1); + double w_mm = luaL_checknumber(L, 2); + double h_mm = luaL_checknumber(L, 3); + wdPattern(pattern_p->width, pattern_p->height, pattern_p->pattern, w_mm, h_mm); + return 0; +} + +static int cdlua5_getpattern(lua_State *L) +{ + int width, height, size; + long int *pattern, *new_pattern = NULL; + + pattern = cdGetPattern(&width, &height); + + size = width * height; + + if (pattern) + new_pattern = (long int *) malloc(size * sizeof(long int)); + + if (new_pattern) + { + memcpy(new_pattern, pattern, size * sizeof(long int)); + cdlua_pushpattern(L, new_pattern, width, height); + } + else + lua_pushnil(L); + + return 1; +} + +/***************************************************************************\ +* Text * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Text(x, y: number, text: string) * +\***************************************************************************/ +static int cdlua5_text(lua_State *L) +{ + const char* s = luaL_checkstring(L, 3); + cdText(luaL_checkint(L, 1), luaL_checkint(L, 2), s); + return 0; +} + +/***************************************************************************\ +* cd.wText(x, y: number, text: string) * +\***************************************************************************/ +static int wdlua5_text(lua_State *L) +{ + const char* s = luaL_checkstring(L, 3); + wdText(luaL_checknumber(L, 1), luaL_checknumber(L, 2), s); + return 0; +} + +/***************************************************************************\ +* cd.Font(typeface, style, size: number) * +\***************************************************************************/ +static int cdlua5_font(lua_State *L) +{ + cdFont(luaL_checkint(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3)); + return 0; +} + +/***************************************************************************\ +* cd.wFont(typeface, style, size: number) * +\***************************************************************************/ +static int wdlua5_font(lua_State *L) +{ + wdFont(luaL_checkint(L, 1), luaL_checkint(L, 2), luaL_checknumber(L, 3)); + return 0; +} + + +/***************************************************************************\ +* cd.GetFont() -> (typeface, style, size: number) * +\***************************************************************************/ +static int cdlua5_getfont(lua_State *L) +{ + int type_face, style, size; + + cdGetFont(&type_face, &style, &size); + lua_pushnumber(L, type_face); + lua_pushnumber(L, style); + lua_pushnumber(L, size); + return 3; +} + +/***************************************************************************\ +* cd.wGetFont() -> (typeface, style, size: number) * +\***************************************************************************/ +static int wdlua5_getfont(lua_State *L) +{ + int type_face, style; + double size; + + wdGetFont(&type_face, &style, &size); + lua_pushnumber(L, type_face); + lua_pushnumber(L, style); + lua_pushnumber(L, size); + return 3; +} + +/***************************************************************************\ +* cd.NativeFont(font: string) * +\***************************************************************************/ +static int cdlua5_nativefont(lua_State *L) +{ + lua_pushstring(L, cdNativeFont(luaL_checkstring(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.TextAlignment(alignment: number) -> (old_alignment: number) * +\***************************************************************************/ +static int cdlua5_textalignment(lua_State *L) +{ + lua_pushnumber(L, cdTextAlignment(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.TextOrientation(angle: number) -> (old_angle: number) * +\***************************************************************************/ +static int cdlua5_textorientation(lua_State *L) +{ + lua_pushnumber(L, cdTextOrientation(luaL_checknumber(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.FontDim() -> (max_width, max_height, ascent, descent: number) * +\***************************************************************************/ +static int cdlua5_fontdim(lua_State *L) +{ + int max_width; + int height; + int ascent; + int descent; + + cdFontDim(&max_width, &height, &ascent, &descent); + lua_pushnumber(L, max_width); + lua_pushnumber(L, height); + lua_pushnumber(L, ascent); + lua_pushnumber(L, descent); + return 4; +} + +/***************************************************************************\ +* cd.wFontDim() -> (max_width, max_height, ascent, descent: number) * +\***************************************************************************/ +static int wdlua5_fontdim(lua_State *L) +{ + double max_width; + double height; + double ascent; + double descent; + + wdFontDim(&max_width, &height, &ascent, &descent); + lua_pushnumber(L, max_width); + lua_pushnumber(L, height); + lua_pushnumber(L, ascent); + lua_pushnumber(L, descent); + return 4; +} + +/***************************************************************************\ +* cd.TextSize(text: string) -> (width, heigth: number) * +\***************************************************************************/ +static int cdlua5_textsize(lua_State *L) +{ + int width; + int height; + + const char* text_s = luaL_checkstring(L, 1); + + cdTextSize(text_s, &width, &height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + return 2; +} + +/***************************************************************************\ +* cd.wTextSize(text: string) -> (width, heigth: number) * +\***************************************************************************/ +static int wdlua5_textsize(lua_State *L) +{ + double width; + double height; + + const char* text_s = luaL_checkstring(L, 1); + + wdTextSize(text_s, &width, &height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + return 2; +} + +/****************************************************************************\ +* cd.TextBox(x, y: number, text: string) -> (xmin, xmax, ymin, ymax: number) * +\****************************************************************************/ +static int cdlua5_textbox(lua_State *L) +{ + int xmin, xmax, ymin, ymax; + int x = luaL_checkint(L, 1); + int y = luaL_checkint(L, 2); + const char* s = luaL_checkstring(L, 3); + + cdTextBox(x, y, s, &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/*****************************************************************************\ +* cd.wTextBox(x, y: number, text: string) -> (xmin, xmax, ymin, ymax: number) * +\*****************************************************************************/ +static int wdlua5_textbox(lua_State *L) +{ + double xmin, xmax, ymin, ymax; + double x = luaL_checknumber(L, 1); + double y = luaL_checknumber(L, 2); + const char* s = luaL_checkstring(L, 3); + + wdTextBox(x, y, s, &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/***************************************************************************************************************\ +* cd.TextBounds(x, y: number, text: string) -> (rect0, rect1, rect2, rect3, rect4, rect5, rect6, rect7: number) * +\***************************************************************************************************************/ +static int cdlua5_textbounds(lua_State *L) +{ + int rect[8]; + int x = luaL_checkint(L, 1); + int y = luaL_checkint(L, 2); + const char* s = luaL_checkstring(L, 3); + + cdTextBounds(x, y, s, rect); + lua_pushnumber(L, rect[0]); + lua_pushnumber(L, rect[1]); + lua_pushnumber(L, rect[2]); + lua_pushnumber(L, rect[3]); + lua_pushnumber(L, rect[4]); + lua_pushnumber(L, rect[5]); + lua_pushnumber(L, rect[6]); + lua_pushnumber(L, rect[7]); + return 4; +} + +/****************************************************************************************************************\ +* cd.wTextBounds(x, y: number, text: string) -> (rect0, rect1, rect2, rect3, rect4, rect5, rect6, rect7: number) * +\****************************************************************************************************************/ +static int wdlua5_textbounds(lua_State *L) +{ + double rect[8]; + double x = luaL_checknumber(L, 1); + double y = luaL_checknumber(L, 2); + const char* s = luaL_checkstring(L, 3); + + wdTextBounds(x, y, s, rect); + lua_pushnumber(L, rect[0]); + lua_pushnumber(L, rect[1]); + lua_pushnumber(L, rect[2]); + lua_pushnumber(L, rect[3]); + lua_pushnumber(L, rect[4]); + lua_pushnumber(L, rect[5]); + lua_pushnumber(L, rect[6]); + lua_pushnumber(L, rect[7]); + return 4; +} + + + +/***************************************************************************\ +* Text * +\***************************************************************************/ + +/***************************************************************************\ +* cd.VectorText(x, y: number, text: string) * +\***************************************************************************/ +static int cdlua5_vectortext(lua_State *L) +{ + const char* s = luaL_checkstring(L,3); + cdVectorText(luaL_checkint(L, 1), luaL_checkint(L, 2), s); + return 0; +} + +/***************************************************************************\ +* cd.wVectorText(x, y: number, text: string) * +\***************************************************************************/ +static int wdlua5_vectortext(lua_State *L) +{ + const char* s = luaL_checkstring(L, 3); + wdVectorText(luaL_checknumber(L, 1), luaL_checknumber(L, 2),s); + return 0; +} + +/***************************************************************************\ +* cd.MultiLineVectorText(x, y: number, text: string) * +\***************************************************************************/ +static int cdlua5_multilinevectortext(lua_State *L) +{ + const char* s = luaL_checkstring(L, 3); + cdMultiLineVectorText(luaL_checkint(L, 1), luaL_checkint(L, 2), s); + return 0; +} + +/***************************************************************************\ +* cd.wMultiLineVectorText(x, y: number, text: string) * +\***************************************************************************/ +static int wdlua5_multilinevectortext(lua_State *L) +{ + const char* s = luaL_checkstring(L, 3); + wdMultiLineVectorText(luaL_checknumber(L, 1), luaL_checknumber(L, 2), s); + return 0; +} + +/***************************************************************************\ +* cd.VectorTextDirection(x1, y1, x2, y2: number) * +\***************************************************************************/ +static int cdlua5_vectortextdirection(lua_State *L) +{ + int x1 = luaL_checkint(L,1); + int y1 = luaL_checkint(L,2); + int x2 = luaL_checkint(L,3); + int y2 = luaL_checkint(L,4); + cdVectorTextDirection(x1, y1, x2, y2); + return 0; +} + +/***************************************************************************\ +* cd.wVectorTextDirection(x1, y1, x2, y2: number) * +\***************************************************************************/ +static int wdlua5_vectortextdirection(lua_State *L) +{ + double x1 = luaL_checknumber(L, 1); + double y1 = luaL_checknumber(L, 2); + double x2 = luaL_checknumber(L, 3); + double y2 = luaL_checknumber(L, 4); + wdVectorTextDirection(x1, y1, x2, y2); + return 0; +} + + +/***************************************************************************\ +* cd.VectorTextTransform(matrix: table) -> (old_matrix: table) * +\***************************************************************************/ +static int cdlua5_vectortexttransform(lua_State *L) +{ + double matrix[6], *old_matrix; + int i; + + if (!lua_istable(L, 1)) + luaL_argerror(L, 1, "invalid matrix, must be a table"); + + for (i=0; i < 6; i++) + { + lua_rawgeti(L, 1, i+1); + + if (!lua_isnumber(L, -1)) + luaL_argerror(L, 1, "invalid matrix value, must be a number"); + + matrix[i] = lua_tonumber(L, -1); + lua_pop(L, 1); + } + + old_matrix = cdVectorTextTransform(matrix); + lua_newtable(L); + for (i=0; i < 6; i++) + { + lua_pushnumber(L, old_matrix[i]); + lua_rawseti(L, 1, i+1); + } + return 1; +} + +/***************************************************************************\ +* cd.VectorTextSize(w, h: number, text: string) * +\***************************************************************************/ +static int cdlua5_vectortextsize(lua_State *L) +{ + const char* s = luaL_checkstring(L, 3); + cdVectorTextSize(luaL_checkint(L,1), luaL_checkint(L,2), s); + return 0; +} + +/***************************************************************************\ +* cd.wVectorTextSize(w, h: number, text: string) * +\***************************************************************************/ +static int wdlua5_vectortextsize(lua_State *L) +{ + const char* s = luaL_checkstring(L, 3); + wdVectorTextSize(luaL_checknumber(L, 1), luaL_checknumber(L, 2), s); + return 0; +} + +/***************************************************************************\ +* cd.VectorTextSize(w, h: number, text: string) * +\***************************************************************************/ +static int cdlua5_vectorcharsize(lua_State *L) +{ + lua_pushnumber(L, cdVectorCharSize(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.wVectorTextSize(w, h: number, text: string) * +\***************************************************************************/ +static int wdlua5_vectorcharsize(lua_State *L) +{ + lua_pushnumber(L, wdVectorCharSize(luaL_checknumber(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.VectorFont(filename: string) -> (font_name: string) * +\***************************************************************************/ +static int cdlua5_vectorfont(lua_State *L) +{ + lua_pushstring(L, cdVectorFont(luaL_checkstring(L, 1))); + return 1; +} + +/***************************************************************************\ +* cd.GetVectorTextSize(text: string) -> (w, h: number) * +\***************************************************************************/ +static int cdlua5_getvectortextsize(lua_State *L) +{ + int width; + int height; + + const char* text_s = luaL_checkstring(L, 1); + + cdGetVectorTextSize(text_s, &width, &height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + return 2; +} + +/***************************************************************************\ +* cd.wGetVectorTextSize(text: string) -> (w, h: number) * +\***************************************************************************/ +static int wdlua5_getvectortextsize(lua_State *L) +{ + double width; + double height; + + const char* text_s = luaL_checkstring(L, 1); + + wdGetVectorTextSize(text_s, &width, &height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + return 2; +} + +/***************************************************************************\ +* cd.GetVectorTextBounds(s: string, px,py: number) -> (rect: table) * +\***************************************************************************/ +static int cdlua5_vectortextbounds(lua_State *L) +{ + const char* s = luaL_checkstring(L, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + int rect[8], i; + + cdGetVectorTextBounds(s, x, y, rect); + lua_newtable(L); + for (i=0; i < 8; i++) + { + lua_pushnumber(L, rect[i]); + lua_rawseti(L, -2, i+1); + } + return 1; +} + +/***************************************************************************\ +* cd.wGetVectorTextBounds(s: string, px,py: number) -> (rect: table) * +\***************************************************************************/ +static int wdlua5_vectortextbounds(lua_State *L) +{ + const char* s = luaL_checkstring(L, 1); + double x = luaL_checknumber(L, 2); + double y = luaL_checknumber(L, 3); + double rect[8]; + int i; + + wdGetVectorTextBounds(s, x, y, rect); + lua_newtable(L); + for (i=0; i < 8; i++) + { + lua_pushnumber(L, rect[i]); + lua_rawseti(L, -2, i+1); + } + return 1; +} + + + +/***************************************************************************\ +* Client Images. * +\***************************************************************************/ + +static int cdlua5_getimagergb(lua_State *L) +{ + cdluaImageRGB* imagergb_p = cdlua_checkimagergb(L, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + + cdGetImageRGB(imagergb_p->red, imagergb_p->green, imagergb_p->blue, + x, y, imagergb_p->width, imagergb_p->height); + return 0; +} + +static int cdlua5_putimagerectrgb(lua_State *L) +{ + cdluaImageRGB* imagergb_p = cdlua_checkimagergb(L, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + int w = luaL_checkint(L, 4); + int h = luaL_checkint(L, 5); + int xmin = luaL_checkint(L, 6); + int xmax = luaL_checkint(L, 7); + int ymin = luaL_checkint(L, 8); + int ymax = luaL_checkint(L, 9); + + if (w < 0 || h < 0) + luaL_argerror(L, 4, "target region dimensions should be positive integers"); + + cdPutImageRectRGB(imagergb_p->width, imagergb_p->height, imagergb_p->red, + imagergb_p->green, imagergb_p->blue, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_putimagerectrgb(lua_State *L) +{ + cdluaImageRGB* imagergb_p = cdlua_checkimagergb(L, 1); + double x = luaL_checknumber(L, 2); + double y = luaL_checknumber(L, 3); + double w = luaL_checknumber(L, 4); + double h = luaL_checknumber(L, 5); + int xmin = luaL_checkint(L, 6); + int xmax = luaL_checkint(L, 7); + int ymin = luaL_checkint(L, 8); + int ymax = luaL_checkint(L, 9); + + if (w < 0 || h < 0) + luaL_argerror(L, 4, "target region dimensions should be positive integers"); + + wdPutImageRectRGB(imagergb_p->width, imagergb_p->height, imagergb_p->red, + imagergb_p->green, imagergb_p->blue, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_putimagerectrgba(lua_State *L) +{ + cdluaImageRGBA* imagergba_p = cdlua_checkimagergba(L, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + int w = luaL_checkint(L, 4); + int h = luaL_checkint(L, 5); + int xmin = luaL_checkint(L, 6); + int xmax = luaL_checkint(L, 7); + int ymin = luaL_checkint(L, 8); + int ymax = luaL_checkint(L, 9); + + if (w < 0 || h < 0) + luaL_argerror(L, 4, "target region dimensions should be positive integers"); + + cdPutImageRectRGBA(imagergba_p->width, imagergba_p->height, imagergba_p->red, + imagergba_p->green, imagergba_p->blue, imagergba_p->alpha, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_putimagerectrgba(lua_State *L) +{ + cdluaImageRGBA* imagergba_p = cdlua_checkimagergba(L, 1); + double x = luaL_checknumber(L, 2); + double y = luaL_checknumber(L, 3); + double w = luaL_checknumber(L, 4); + double h = luaL_checknumber(L, 5); + int xmin = luaL_checkint(L, 6); + int xmax = luaL_checkint(L, 7); + int ymin = luaL_checkint(L, 8); + int ymax = luaL_checkint(L, 9); + + if (w < 0 || h < 0) + luaL_argerror(L, 4, "target region dimensions should be positive integers"); + + wdPutImageRectRGBA(imagergba_p->width, imagergba_p->height, imagergba_p->red, + imagergba_p->green, imagergba_p->blue, imagergba_p->alpha, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_putimagerectmap(lua_State *L) +{ + cdluaImageMap* imagemap_p = cdlua_checkimagemap(L, 1); + cdluaPalette *pal = cdlua_checkpalette(L, 2); + int x = luaL_checkint(L, 3); + int y = luaL_checkint(L, 4); + int w = luaL_checkint(L, 5); + int h = luaL_checkint(L, 6); + int xmin = luaL_checkint(L, 7); + int xmax = luaL_checkint(L, 8); + int ymin = luaL_checkint(L, 9); + int ymax = luaL_checkint(L, 10); + + if (w < 0 || h < 0) + luaL_argerror(L, 5, "target region dimensions should be positive integers"); + + cdPutImageRectMap(imagemap_p->width, imagemap_p->height, imagemap_p->index, + pal->color, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_putimagerectmap(lua_State *L) +{ + cdluaImageMap* imagemap_p = cdlua_checkimagemap(L, 1); + cdluaPalette *pal = cdlua_checkpalette(L, 2); + double x = luaL_checknumber(L, 3); + double y = luaL_checknumber(L, 4); + double w = luaL_checknumber(L, 5); + double h = luaL_checknumber(L, 6); + int xmin = luaL_checkint(L, 7); + int xmax = luaL_checkint(L, 8); + int ymin = luaL_checkint(L, 9); + int ymax = luaL_checkint(L, 10); + + if (w < 0 || h < 0) + luaL_argerror(L, 5, "target region dimensions should be positive integers"); + + wdPutImageRectMap(imagemap_p->width, imagemap_p->height, imagemap_p->index, + pal->color, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_putbitmap(lua_State *L) +{ + cdBitmap *bitmap = cdlua_checkbitmap(L, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + int w = luaL_checkint(L, 4); + int h = luaL_checkint(L, 5); + + if (w < 0 || h < 0) + luaL_argerror(L, 4, "target region dimensions should be positive integers"); + + cdPutBitmap(bitmap, x, y, w, h); + return 0; +} + +static int wdlua5_putbitmap(lua_State *L) +{ + cdBitmap *bitmap = cdlua_checkbitmap(L, 1); + double x = luaL_checknumber(L, 2); + double y = luaL_checknumber(L, 3); + double w = luaL_checknumber(L, 4); + double h = luaL_checknumber(L, 5); + + if (w < 0 || h < 0) + luaL_argerror(L, 4, "target region dimensions should be positive integers"); + + wdPutBitmap(bitmap, x, y, w, h); + return 0; +} + +static int cdlua5_getbitmap(lua_State *L) +{ + cdBitmap *bitmap = cdlua_checkbitmap(L, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + cdGetBitmap(bitmap, x, y); + return 0; +} + +/***************************************************************************\ +* Server Images. * +\***************************************************************************/ + +static int cdlua5_createimage(lua_State *L) +{ + cdImage *image; + int width = luaL_checkint(L, 1); + int height = luaL_checkint(L, 2); + + if (width < 1 || height < 1) + luaL_argerror(L, 1, "image dimensions should be positive integers"); + + image = cdCreateImage(width, height); + if (image) + cdlua_pushimage(L, image); + else + lua_pushnil(L); + + return 1; +} + +static int cdlua5_getimage(lua_State *L) +{ + cdImage* image = cdlua_checkimage(L, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + cdGetImage(image, x, y); + return 0; +} + +static int cdlua5_putimagerect(lua_State *L) +{ + cdImage* image = cdlua_checkimage(L, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + int xmin = luaL_checkint(L, 4); + int xmax = luaL_checkint(L, 5); + int ymin = luaL_checkint(L, 6); + int ymax = luaL_checkint(L, 7); + cdPutImageRect(image, x, y, xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_putimagerect(lua_State *L) +{ + cdImage* image = cdlua_checkimage(L, 1); + double x = luaL_checknumber(L, 2); + double y = luaL_checknumber(L, 3); + int xmin = luaL_checkint(L, 4); + int xmax = luaL_checkint(L, 5); + int ymin = luaL_checkint(L, 6); + int ymax = luaL_checkint(L, 7); + wdPutImageRect(image, x, y, xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* cd.ScrollArea(xmin, xmax, ymin, ymax, dx, dy: number) * +\***************************************************************************/ +static int cdlua5_scrollarea(lua_State *L) +{ + int xmin = luaL_checkint(L, 1); + int xmax = luaL_checkint(L, 2); + int ymin = luaL_checkint(L, 3); + int ymax = luaL_checkint(L, 4); + int dx = luaL_checkint(L, 5); + int dy = luaL_checkint(L, 6); + cdScrollArea(xmin, xmax, ymin, ymax, dx, dy); + return 0; +} + + + +/***************************************************************************\ +* Other * +\***************************************************************************/ + +/********************************************************************************\ +* cd.Play(ctx, xmin, xmax, ymin, ymax: number, data: string) -> (status: number) * +\********************************************************************************/ + +static int cdlua5_play(lua_State *L) +{ + cdluaContext* cdlua_ctx = cdlua_getcontext(L, 1); + int xmin = luaL_checkint(L,2); + int xmax = luaL_checkint(L,3); + int ymin = luaL_checkint(L,4); + int ymax = luaL_checkint(L,5); + const char *data_s = luaL_checkstring(L,6); + + cdlua_setplaystate(L); + cdPlay(cdlua_ctx->ctx(), xmin, xmax, ymin, ymax, (void*)data_s); + cdlua_setplaystate(NULL); + return 0; +} + +/***************************************************************************\ +* cd.GetColorPlanes() -> (bpp: number) * +\***************************************************************************/ +static int cdlua5_getcolorplanes(lua_State *L) +{ + lua_pushnumber(L, cdGetColorPlanes()); + return 1; +} + +static int cdlua5_palette(lua_State *L) +{ + cdluaPalette *pal = cdlua_checkpalette(L, 1); + int mode_i = luaL_checkint(L, 2); + cdPalette(pal->count, pal->color, mode_i); + return 0; +} + +/***************************************************************************\ +* cd.ImageRGB * +\***************************************************************************/ +static int cdlua5_imagergb(lua_State *L) +{ + cdCanvas *current_canvas; + int w, h, type = CD_RGB; + + cdCanvas* canvas = cdlua_checkcanvas(L, 1); + + if (cdCanvasGetContext(canvas) != CD_IMAGERGB) + luaL_argerror(L, 1, "invalid canvas, must be CD_IMAGERGB"); + + if (cdAlphaImage(canvas)) + type = CD_RGBA; + + current_canvas = cdActiveCanvas(); + cdActivate(canvas); + cdGetCanvasSize(&w, &h, NULL, NULL); + cdActivate(current_canvas); + + /* mark the image NOT to be freed */ + if (type == CD_RGBA) + cdlua_pushimagergba_ex(L, cdRedImage(canvas), cdGreenImage(canvas), cdBlueImage(canvas), cdAlphaImage(canvas), w, h); + else + cdlua_pushimagergb_ex(L, cdRedImage(canvas), cdGreenImage(canvas), cdBlueImage(canvas), w, h); + + return 1; +} + +/***************************************************************************\ +* cd.ImageRGBBitmap * +\***************************************************************************/ +static int cdlua5_imagergbbitmap(lua_State *L) +{ + cdCanvas *current_canvas; + int w, h, type = CD_RGB; + + cdCanvas* canvas = cdlua_checkcanvas(L, 1); + + if (cdCanvasGetContext(canvas) != CD_IMAGERGB) + luaL_argerror(L, 1, "invalid canvas, must be CD_IMAGERGB"); + + if (cdAlphaImage(canvas)) + type = CD_RGBA; + + current_canvas = cdActiveCanvas(); + cdActivate(canvas); + cdGetCanvasSize(&w, &h, NULL, NULL); + cdActivate(current_canvas); + + cdlua_pushbitmap(L, cdInitBitmap(w, h, type, + cdRedImage(canvas), + cdGreenImage(canvas), + cdBlueImage(canvas), + cdAlphaImage(canvas))); + + return 1; +} + +/***************************************************************************\ +* Hardcopy * +\***************************************************************************/ +static lua_State* wdlua5_hardcopy_luaState = NULL; + +static void wdlua5_hardcopy_func(void) +{ + lua_State* L = wdlua5_hardcopy_luaState; + lua_pushvalue(L, 4); /* push the function in the stack */ + if(lua_pcall(L, 0, 0, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); +} + +static int wdlua5_hardcopy(lua_State *L) +{ + cdluaContext* cdlua_ctx = cdlua_getcontext(L, 1); + void *data_p = cdlua_ctx->checkdata(L, 2); + cdCanvas* canvas = cdlua_checkcanvas(L, 3); + luaL_argcheck(L, !lua_isfunction(L, 4), 4, "invalid draw function"); + + wdlua5_hardcopy_luaState = L; + wdHardcopy(cdlua_ctx->ctx(), data_p, canvas, wdlua5_hardcopy_func); + + return 0; +} + + +/***************************************************************************\ +* Polygon functions * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Begin(mode: number) * +\***************************************************************************/ +static int cdlua5_begin(lua_State *L) +{ + cdBegin(luaL_checkint(L, 1)); + return 0; +} + +/***************************************************************************\ +* cd.Vertex(x, y: number) * +\***************************************************************************/ +static int cdlua5_vertex(lua_State *L) +{ + cdVertex(luaL_checkint(L, 1), luaL_checkint(L, 2)); + return 0; +} + +/***************************************************************************\ +* cd.wVertex(x, y: number) * +\***************************************************************************/ +static int wdlua5_vertex(lua_State *L) +{ + wdVertex(luaL_checknumber(L, 1), luaL_checknumber(L, 2)); + return 0; +} + +/***************************************************************************\ +* cd.End() * +\***************************************************************************/ +static int cdlua5_end(lua_State *L) +{ + (void)L; + cdEnd(); + return 0; +} + + +/********************************************************************************\ +* CDLua Exported functions * +\********************************************************************************/ +static const struct luaL_reg cdlib_active[] = { + + /* Initialization */ + {"Activate" , cdlua5_activate}, + {"ActiveCanvas" , cdlua5_activecanvas}, + {"Simulate" , cdlua5_simulate}, + + /* Control */ + {"Clear" , cdlua5_clear}, + {"Flush" , cdlua5_flush}, + {"SaveState" , cdlua5_savestate}, + {"RestoreState" , cdlua5_restorestate}, + {"SetAttribute" , cdlua5_setattribute}, + {"GetAttribute" , cdlua5_getattribute}, + + /* Coordinate System */ + {"GetCanvasSize" , cdlua5_getcanvassize}, + {"UpdateYAxis" , cdlua5_updateyaxis}, + {"MM2Pixel" , cdlua5_mm2pixel}, + {"Pixel2MM" , cdlua5_pixel2mm}, + {"Origin" , cdlua5_origin}, + + /* World Coordinates */ + {"wWindow" , wdlua5_window}, + {"wGetWindow" , wdlua5_getwindow}, + {"wViewport" , wdlua5_viewport}, + {"wGetViewport" , wdlua5_getviewport}, + {"wWorld2Canvas" , wdlua5_world2canvas}, + {"wCanvas2World" , wdlua5_canvas2world}, + + {"wHardcopy" , wdlua5_hardcopy}, + + /* General Attributes */ + {"Foreground" , cdlua5_foreground}, + {"Background" , cdlua5_background}, + {"WriteMode" , cdlua5_writemode}, + + /* Clipping */ + {"Clip" , cdlua5_clip}, + {"ClipArea" , cdlua5_cliparea}, + {"wClipArea" , wdlua5_cliparea}, + {"GetClipArea" , cdlua5_getcliparea}, + {"wGetClipArea" , wdlua5_getcliparea}, + {"GetClipPoly" , cdlua5_getclippoly}, + {"wGetClipPoly" , wdlua5_getclippoly}, + + /* Regions */ + {"RegionCombineMode" , cdlua5_regioncombinemode}, + {"PointInRegion" , cdlua5_pointinregion}, + {"wPointInRegion" , wdlua5_pointinregion}, + {"OffsetRegion" , cdlua5_offsetregion}, + {"wOffsetRegion" , wdlua5_offsetregion}, + {"RegionBox" , cdlua5_regionbox}, + {"wRegionBox" , wdlua5_regionbox}, + + /* Marks */ + {"Pixel" , cdlua5_pixel}, + {"wPixel" , wdlua5_pixel}, + {"Mark" , cdlua5_mark}, + {"wMark" , wdlua5_mark}, + {"MarkType" , cdlua5_marktype}, + {"MarkSize" , cdlua5_marksize}, + {"wMarkSize" , wdlua5_marksize}, + + /* Line */ + {"Line" , cdlua5_line}, + {"wLine" , wdlua5_line}, + {"Rect" , cdlua5_rect}, + {"wRect" , wdlua5_rect}, + {"Arc" , cdlua5_arc}, + {"wArc" , wdlua5_arc}, + {"LineStyle" , cdlua5_linestyle}, + {"LineStyleDashes" , cdlua5_linestyledashes}, + {"LineWidth" , cdlua5_linewidth}, + {"wLineWidth" , wdlua5_linewidth}, + {"LineJoin" , cdlua5_linejoin}, + {"LineCap" , cdlua5_linecap}, + + /* Filled Areas */ + {"Box" , cdlua5_box}, + {"wBox" , wdlua5_box}, + {"Sector" , cdlua5_sector}, + {"wSector" , wdlua5_sector}, + {"Chord" , cdlua5_chord}, + {"wChord" , wdlua5_chord}, + {"BackOpacity" , cdlua5_backopacity}, + {"FillMode" , cdlua5_fillmode}, + {"InteriorStyle" , cdlua5_interiorstyle}, + {"Hatch" , cdlua5_hatch}, + + /* Stipple */ + {"Stipple" , cdlua5_stipple}, + {"wStipple" , wdlua5_stipple}, + {"GetStipple" , cdlua5_getstipple}, + + /* Pattern */ + {"Pattern" , cdlua5_pattern}, + {"wPattern" , wdlua5_pattern}, + {"GetPattern" , cdlua5_getpattern}, + + /* Text */ + {"Text" , cdlua5_text}, + {"wText" , wdlua5_text}, + {"Font" , cdlua5_font}, + {"wFont" , wdlua5_font}, + {"GetFont" , cdlua5_getfont}, + {"wGetFont" , wdlua5_getfont}, + {"NativeFont" , cdlua5_nativefont}, + {"TextAlignment" , cdlua5_textalignment}, + {"TextOrientation" , cdlua5_textorientation}, + {"FontDim" , cdlua5_fontdim}, + {"wFontDim" , wdlua5_fontdim}, + {"TextSize" , cdlua5_textsize}, + {"wTextSize" , wdlua5_textsize}, + {"TextBox" , cdlua5_textbox}, + {"wTextBox" , wdlua5_textbox}, + {"TextBounds" , cdlua5_textbounds}, + {"wTextBounds" , wdlua5_textbounds}, + + /* Vector Text */ + {"VectorText" , cdlua5_vectortext}, + {"wVectorText" , wdlua5_vectortext}, + {"MultiLineVectorText" , cdlua5_multilinevectortext}, + {"wMultiLineVectorText" , wdlua5_multilinevectortext}, + {"VectorTextDirection" , cdlua5_vectortextdirection}, + {"wVectorTextDirection" , wdlua5_vectortextdirection}, + {"VectorTextTransform" , cdlua5_vectortexttransform}, + {"VectorTextSize" , cdlua5_vectortextsize}, + {"wVectorTextSize" , wdlua5_vectortextsize}, + {"VectorCharSize" , cdlua5_vectorcharsize}, + {"wVectorCharSize" , wdlua5_vectorcharsize}, + {"VectorFont" , cdlua5_vectorfont}, + {"GetVectorTextSize" , cdlua5_getvectortextsize}, + {"wGetVectorTextSize" , wdlua5_getvectortextsize}, + {"VectorTextBounds" , cdlua5_vectortextbounds}, + {"wVectorTextBounds" , wdlua5_vectortextbounds}, + + /* Client Images */ + {"GetImageRGB" , cdlua5_getimagergb}, + {"PutImageRectRGB" , cdlua5_putimagerectrgb}, + {"wPutImageRectRGB" , wdlua5_putimagerectrgb}, + {"PutImageRectRGBA" , cdlua5_putimagerectrgba}, + {"wPutImageRectRGBA", wdlua5_putimagerectrgba}, + {"PutImageRectMap" , cdlua5_putimagerectmap}, + {"wPutImageRectMap" , wdlua5_putimagerectmap}, + {"GetBitmap" , cdlua5_getbitmap}, + {"PutBitmap" , cdlua5_putbitmap}, + {"wPutBitmap" , wdlua5_putbitmap}, + + {"ImageRGB" , cdlua5_imagergb}, + {"ImageRGBBitmap" , cdlua5_imagergbbitmap}, + + /* Server Images */ + {"CreateImage" , cdlua5_createimage}, + {"GetImage" , cdlua5_getimage}, + {"PutImageRect" , cdlua5_putimagerect}, + {"wPutImageRect" , wdlua5_putimagerect}, + {"ScrollArea" , cdlua5_scrollarea}, + + /* Other */ + {"Play" , cdlua5_play}, + + /* Color Coding */ + {"GetColorPlanes" , cdlua5_getcolorplanes}, + + /* Palette */ + {"Palette" , cdlua5_palette}, + + /* Polygon */ + {"Begin" , cdlua5_begin}, + {"Vertex" , cdlua5_vertex}, + {"wVertex" , wdlua5_vertex}, + {"End" , cdlua5_end}, + + {NULL, NULL}, +}; + +typedef struct cdlua5_constant { + const char *name; + lua_Number value; +} cdlua5_constant; + +/* old backward compatible constants */ +static const struct cdlua5_constant cdlibconstant[] = { + {"SYSTEM", CD_SYSTEM}, + {"COURIER", CD_COURIER}, + {"TIMES_ROMAN", CD_TIMES_ROMAN}, + {"HELVETICA", CD_HELVETICA}, + {"NATIVE", CD_NATIVE}, + {"CLIPON", CD_CLIPON}, + {"CENTER_BASE", CD_CENTER_BASE}, + {"LEFT_BASE", CD_LEFT_BASE}, + {"RIGHT_BASE", CD_RIGHT_BASE}, + {"ITALIC_BOLD", CD_ITALIC_BOLD}, + + {NULL, -1} +}; + +static void initconst(lua_State *L) +{ + const cdlua5_constant *l = cdlibconstant; + for (; l->name; l++) { + lua_pushstring(L, l->name); + lua_pushnumber(L, l->value); + lua_settable(L, -3); + } +} + +void cdlua_open_active (lua_State *L, cdluaLuaState* cdL) +{ + /* "cd" table is at the top of the stack */ + luaL_register(L, NULL, cdlib_active); + initconst(L); + + cdL->void_canvas = cdCreateCanvas(CD_VOID, NULL); + cdlua_setvoidstate(cdL->void_canvas, L); + cdActivate(cdL->void_canvas); +} diff --git a/cd/src/lua5/cdlua5_canvas.c b/cd/src/lua5/cdlua5_canvas.c new file mode 100755 index 0000000..d04f76f --- /dev/null +++ b/cd/src/lua5/cdlua5_canvas.c @@ -0,0 +1,2405 @@ +/** \file + * \brief Lua Binding of the Canvas dependent API + * + * See Copyright Notice in cd.h + */ + + +#include +#include +#include + +#include "cd.h" +#include "wd.h" +#include "cdirgb.h" + +#include +#include + +#include "cdlua.h" +#include "cdlua5_private.h" + +#define _cdCheckCanvas(_canvas) (_canvas!=NULL && ((unsigned char*)_canvas)[0] == 'C' && ((unsigned char*)_canvas)[1] == 'D') + + +void cdlua_pushcanvas(lua_State * L, cdCanvas* canvas) +{ + cdCanvas* *canvas_p = (cdCanvas* *) lua_newuserdata(L, sizeof(cdCanvas*)); + *canvas_p = canvas; + luaL_getmetatable(L, "cdCanvas"); + lua_setmetatable(L, -2); +} + +cdCanvas* cdlua_checkcanvas(lua_State * L, int pos) +{ + cdCanvas* *canvas_p = (cdCanvas**)luaL_checkudata(L, pos, "cdCanvas"); + if (!(*canvas_p)) + luaL_argerror(L, pos, "killed cdCanvas"); + if (!_cdCheckCanvas(*canvas_p)) + luaL_argerror(L, pos, "invalid Lua object, killed cdCanvas in C but not in Lua"); + return *canvas_p; +} + +cdCanvas* cdlua_getcanvas(lua_State * L) +{ + return cdlua_checkcanvas(L, 1); +} + +static int cdlua5_createcanvas(lua_State * L) +{ + cdluaContext* cdlua_ctx = cdlua_getcontext(L, 1); + void *data_p = cdlua_ctx->checkdata(L, 2); + + cdCanvas* canvas = cdCreateCanvas(cdlua_ctx->ctx(), data_p); + + /* if creation failed, return nil so that the user can compare */ + /* the result with nil and know that it failed */ + if (canvas) + cdlua_pushcanvas(L, canvas); + else + lua_pushnil(L); + + return 1; +} + +static int cdlua5_killcanvas(lua_State *L) +{ + cdCanvas* *canvas_p = (cdCanvas**) luaL_checkudata(L, 1, "cdCanvas"); + if (!(*canvas_p)) + luaL_argerror(L, 1, "killed cdCanvas"); + if (!_cdCheckCanvas(*canvas_p)) + luaL_argerror(L, 1, "invalid Lua object, killed cdCanvas in C but not in Lua"); + + cdlua_kill_active(L, *canvas_p); + + cdKillCanvas(*canvas_p); + *canvas_p = NULL; /* mark as killed */ + + return 0; +} + +static int cdluaCanvas_eq (lua_State *L) +{ + cdCanvas* canvas1 = cdlua_checkcanvas(L, 1); + cdCanvas* canvas2 = cdlua_checkcanvas(L, 2); + lua_pushboolean(L, canvas1 == canvas2); + return 1; +} + +static int cdluaCanvas_tostring (lua_State *L) +{ + cdCanvas* *canvas_p = (cdCanvas**) luaL_checkudata(L, 1, "cdCanvas"); + if (!(*canvas_p)) + lua_pushfstring(L, "cdCanvas(%p - NULL)-killed", canvas_p); + else if (!_cdCheckCanvas(*canvas_p)) + lua_pushfstring(L, "cdCanvas(%p - INVALID)-killed in C but not in Lua", canvas_p); + else + lua_pushfstring(L, "cdCanvas(%p - %p)", canvas_p, *canvas_p); + return 1; +} + +static int cdlua5_getcontext(lua_State * L) +{ + cdluaLuaState* cdL; + cdContext* ctx; + int i; + int driver = -1; + cdCanvas* canvas = cdlua_checkcanvas(L, 1); + + ctx = cdCanvasGetContext(canvas); + cdL = cdlua_getstate(L); + + for (i=0; i < cdL->numdrivers; i++) + { + if (ctx == cdL->drivers[i]->ctx()) + { + driver = i; + break; + } + } + + if (i == cdL->numdrivers) + luaL_argerror(L, 1, "unknown driver"); + + lua_pushnumber(L, driver); + return 1; +} + +/***************************************************************************\ +* Activates a cd canvas. * +\***************************************************************************/ +static int cdlua5_activate(lua_State * L) +{ + lua_pushnumber(L, cdCanvasActivate(cdlua_checkcanvas(L, 1))); + return 1; +} + +static int cdlua5_deactivate(lua_State * L) +{ + cdCanvasDeactivate(cdlua_checkcanvas(L, 1)); + return 0; +} + +/***************************************************************************\ +* cd.Simulate(mode: number) -> (old_mode: number) * +\***************************************************************************/ +static int cdlua5_simulate(lua_State *L) +{ + lua_pushnumber(L, cdCanvasSimulate(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* Control * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Clear() * +\***************************************************************************/ +static int cdlua5_clear(lua_State *L) +{ + cdCanvasClear(cdlua_checkcanvas(L, 1)); + return 0; +} + +/***************************************************************************\ +* cd.Flush() * +\***************************************************************************/ +static int cdlua5_flush(lua_State *L) +{ + cdCanvasFlush(cdlua_checkcanvas(L, 1)); + return 0; +} + +static int cdlua5_savestate(lua_State *L) +{ + cdState* state = cdCanvasSaveState(cdlua_checkcanvas(L, 1)); + if (state) + cdlua_pushstate(L, state); + else + lua_pushnil(L); + return 1; +} + +static int cdlua5_restorestate(lua_State * L) +{ + cdCanvasRestoreState(cdlua_checkcanvas(L, 1), cdlua_checkstate(L, 2)); + return 0; +} + +static int cdlua_isuserdata(const char* name) +{ + if (strcmp(name, "HDC")==0) return 1; + if (strcmp(name, "GC")==0) return 1; + return 0; +} + +/***************************************************************************\ +* cd.SetAttribute(name, data: string) * +\***************************************************************************/ +static int cdlua5_setattribute(lua_State *L) +{ + const char* name = luaL_checkstring(L, 2); + + if (lua_isnil(L, 2)) + { + cdCanvasSetAttribute(cdlua_checkcanvas(L, 1), name, NULL); + } + else + { + char* data; + if (cdlua_isuserdata(name)) + data = (char*) lua_touserdata(L, 3); + else + data = (char*) luaL_checkstring(L, 3); + cdCanvasSetAttribute(cdlua_checkcanvas(L, 1), name, data); + } + return 0; +} + + +/***************************************************************************\ +* cd.SetAttribute(name: string) -> (data: string) * +\***************************************************************************/ +static int cdlua5_getattribute(lua_State *L) +{ + const char* name = luaL_checkstring(L, 2); + char* data = cdCanvasGetAttribute(cdlua_checkcanvas(L, 1), name); + if (data) + { + if (cdlua_isuserdata(name)) + lua_pushlightuserdata(L, data); + else + lua_pushstring(L, data); + } + else + lua_pushnil(L); + return 1; +} + + + +/***************************************************************************\ +* Coordinate System * +\***************************************************************************/ + +/***************************************************************************\ +* cd.GetCanvasSize() -> (width, heigth, mm_width, mm_height: number) * +\***************************************************************************/ +static int cdlua5_getcanvassize(lua_State *L) +{ + int width; + int height; + double mm_width; + double mm_height; + + cdCanvasGetSize(cdlua_checkcanvas(L, 1), &width, &height, &mm_width, &mm_height); + + lua_pushnumber(L, width); + lua_pushnumber(L, height); + lua_pushnumber(L, mm_width); + lua_pushnumber(L, mm_height); + return 4; +} + +/***************************************************************************\ +* cd.UpdateYAxis(yc: number) -> (yr: number) * +\***************************************************************************/ +static int cdlua5_updateyaxis(lua_State *L) +{ + double y = luaL_checknumber(L, 2); + cdfCanvasUpdateYAxis(cdlua_checkcanvas(L, 1), &y); + lua_pushnumber(L, y); + return 1; +} + +static int cdlua5_invertyaxis(lua_State *L) +{ + lua_pushnumber(L, cdfCanvasInvertYAxis(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2))); + return 1; +} + +static int cdlua5_mm2pixel(lua_State *L) +{ + double mm_dx, mm_dy; + int dx, dy; + + mm_dx = luaL_checknumber(L,2); + mm_dy = luaL_checknumber(L,3); + + cdCanvasMM2Pixel(cdlua_checkcanvas(L, 1), mm_dx, mm_dy, &dx, &dy); + lua_pushnumber(L, dx); + lua_pushnumber(L, dy); + return 2; +} + +static int cdlua5_pixel2mm(lua_State *L) +{ + double mm_dx_d, mm_dy_d; + int dx, dy; + + dx = luaL_checkint(L,2); + dy = luaL_checkint(L,3); + + cdCanvasPixel2MM(cdlua_checkcanvas(L, 1), dx, dy, &mm_dx_d, &mm_dy_d); + lua_pushnumber(L, mm_dx_d); + lua_pushnumber(L, mm_dy_d); + return 2; +} + +static int cdlua5_fmm2pixel(lua_State *L) +{ + double mm_dx, mm_dy; + double dx, dy; + + mm_dx = luaL_checknumber(L,2); + mm_dy = luaL_checknumber(L,3); + + cdfCanvasMM2Pixel(cdlua_checkcanvas(L, 1), mm_dx, mm_dy, &dx, &dy); + lua_pushnumber(L, dx); + lua_pushnumber(L, dy); + return 2; +} + +static int cdlua5_fpixel2mm(lua_State *L) +{ + double mm_dx_d, mm_dy_d; + double dx, dy; + + dx = luaL_checknumber(L,2); + dy = luaL_checknumber(L,3); + + cdfCanvasPixel2MM(cdlua_checkcanvas(L, 1), dx, dy, &mm_dx_d, &mm_dy_d); + lua_pushnumber(L, mm_dx_d); + lua_pushnumber(L, mm_dy_d); + return 2; +} + +static int cdlua5_origin(lua_State *L) +{ + cdCanvasOrigin(cdlua_checkcanvas(L, 1), luaL_checkint(L,2), luaL_checkint(L,3)); + return 0; +} + +static int cdlua5_getorigin(lua_State *L) +{ + int x, y; + cdCanvasGetOrigin(cdlua_checkcanvas(L, 1), &x, &y); + lua_pushnumber(L, x); + lua_pushnumber(L, y); + return 2; +} + +static int cdlua5_forigin(lua_State *L) +{ + cdfCanvasOrigin(cdlua_checkcanvas(L, 1), luaL_checknumber(L,2), luaL_checknumber(L,3)); + return 0; +} + +static int cdlua5_fgetorigin(lua_State *L) +{ + double x, y; + cdfCanvasGetOrigin(cdlua_checkcanvas(L, 1), &x, &y); + lua_pushnumber(L, x); + lua_pushnumber(L, y); + return 2; +} + +static int cdlua5_transform(lua_State *L) +{ + double matrix[6]; + int i; + + if (!lua_istable(L, 2)) + luaL_argerror(L, 2, "invalid matrix, must be a table"); + + for (i=0; i < 6; i++) + { + lua_rawgeti(L, 2, i+1); + + if (!lua_isnumber(L, -1)) + luaL_argerror(L, 2, "invalid matrix value, must be a number"); + + matrix[i] = lua_tonumber(L, -1); + lua_pop(L, 1); + } + + cdCanvasTransform(cdlua_checkcanvas(L, 1), matrix); + return 0; +} + +static int cdlua5_gettransform(lua_State *L) +{ + int i; + double* matrix = cdCanvasGetTransform(cdlua_checkcanvas(L, 1)); + lua_newtable(L); + for (i=0; i < 6; i++) + { + lua_pushnumber(L, matrix[i]); + lua_rawseti(L, 1, i+1); + } + return 1; +} + +static int cdlua5_transformmultiply(lua_State *L) +{ + double matrix[6]; + int i; + + if (!lua_istable(L, 2)) + luaL_argerror(L, 2, "invalid matrix, must be a table"); + + for (i=0; i < 6; i++) + { + lua_rawgeti(L, 2, i+1); + + if (!lua_isnumber(L, -1)) + luaL_argerror(L, 1, "invalid matrix value, must be a number"); + + matrix[i] = lua_tonumber(L, -1); + lua_pop(L, 1); + } + + cdCanvasTransformMultiply(cdlua_checkcanvas(L, 1), matrix); + return 0; +} + +static int cdlua5_transformrotate(lua_State *L) +{ + cdCanvasTransformRotate(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2)); + return 0; +} + +static int cdlua5_transformscale(lua_State *L) +{ + cdCanvasTransformScale(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3)); + return 0; +} + +static int cdlua5_transformtranslate(lua_State *L) +{ + cdCanvasTransformTranslate(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3)); + return 0; +} + +static int cdlua5_transformpoint(lua_State *L) +{ + int x, y; + cdCanvasTransformPoint(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3), &x, &y); + lua_pushnumber(L, x); + lua_pushnumber(L, y); + return 2; +} + +static int cdlua5_ftransformpoint(lua_State *L) +{ + double x, y; + cdfCanvasTransformPoint(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3), &x, &y); + lua_pushnumber(L, x); + lua_pushnumber(L, y); + return 2; +} + +/***************************************************************************\ +* World Coordinates * +\***************************************************************************/ + +/***************************************************************************\ +* wd.Window(xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int wdlua5_window(lua_State *L) +{ + double xmin = luaL_checknumber(L, 2); + double xmax = luaL_checknumber(L, 3); + double ymin = luaL_checknumber(L, 4); + double ymax = luaL_checknumber(L, 5); + wdCanvasWindow(cdlua_checkcanvas(L, 1), xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* wd.GetWindow() -> (xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int wdlua5_getwindow(lua_State *L) +{ + double xmin, xmax, ymin, ymax; + + wdCanvasGetWindow(cdlua_checkcanvas(L, 1), &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/***************************************************************************\ +* wd.Viewport(xmin, xmax, ymin, ymax: number) * +\***************************************************************************/ +static int wdlua5_viewport(lua_State *L) +{ + int xmin = luaL_checkint(L, 2); + int xmax = luaL_checkint(L, 3); + int ymin = luaL_checkint(L, 4); + int ymax = luaL_checkint(L, 5); + wdCanvasViewport(cdlua_checkcanvas(L, 1), xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* wd.GetViewport() -> (xmin, xmax, ymin, ymax: number * +\***************************************************************************/ +static int wdlua5_getviewport(lua_State *L) +{ + int xmin, xmax, ymin, ymax; + + wdCanvasGetViewport(cdlua_checkcanvas(L, 1), &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/***************************************************************************\ +* wd.World2Canvas(xw, yw: number) -> (xv, yv: number) * +\***************************************************************************/ +static int wdlua5_world2canvas(lua_State *L) +{ + double xw_d, yw_d; + int xv_i, yv_i; + + xw_d = luaL_checknumber(L, 2); + yw_d = luaL_checknumber(L, 3); + + wdCanvasWorld2Canvas(cdlua_checkcanvas(L, 1), xw_d, yw_d, &xv_i, &yv_i); + lua_pushnumber(L, xv_i); + lua_pushnumber(L, yv_i); + return 2; +} + +/***************************************************************************\ +* wd.Canvas2World(xv, yv: number) -> (xw, yw: number) * +\***************************************************************************/ +static int wdlua5_canvas2world(lua_State *L) +{ + int xv_i, yv_i; + double xw_d, yw_d; + + xv_i = luaL_checkint(L, 2); + yv_i = luaL_checkint(L, 3); + + wdCanvasCanvas2World(cdlua_checkcanvas(L, 1), xv_i, yv_i, &xw_d, &yw_d); + lua_pushnumber(L, xw_d); + lua_pushnumber(L, yw_d); + return 2; +} + + + +/***************************************************************************\ +* General Attributes * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Foreground(color) -> color * +\***************************************************************************/ +static int cdlua5_foreground(lua_State *L) +{ + long int color_i = cdlua_checkcolor(L, 2); + color_i = cdCanvasForeground(cdlua_checkcanvas(L, 1), color_i); + lua_pushlightuserdata(L, (void*) color_i); + return 1; +} + +static int cdlua5_setforeground(lua_State *L) +{ + long int color_i = cdlua_checkcolor(L, 2); + cdCanvasSetForeground(cdlua_checkcanvas(L, 1), color_i); + return 0; +} + +/***************************************************************************\ +* cd.Background(color) -> color * +\***************************************************************************/ +static int cdlua5_background(lua_State *L) +{ + long int color_i = cdlua_checkcolor(L, 2); + color_i = cdCanvasBackground(cdlua_checkcanvas(L, 1), color_i); + lua_pushlightuserdata(L, (void*) color_i); + return 1; +} + +static int cdlua5_setbackground(lua_State *L) +{ + long int color_i = cdlua_checkcolor(L, 2); + cdCanvasSetBackground(cdlua_checkcanvas(L, 1), color_i); + return 0; +} +/***************************************************************************\ +* cd.WriteMode(mode: number) -> (old_mode: number) * +\***************************************************************************/ +static int cdlua5_writemode(lua_State *L) +{ + lua_pushnumber(L, cdCanvasWriteMode(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + + + +/***************************************************************************\ +* Clipping * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Clip(mode: number) -> (old_mode: number) * +\***************************************************************************/ +static int cdlua5_clip(lua_State *L) +{ + lua_pushnumber(L, cdCanvasClip(cdlua_checkcanvas(L, 1), luaL_checkint(L,2))); + return 1; +} + +static int cdlua5_cliparea(lua_State *L) +{ + int xmin = luaL_checkint(L, 2); + int xmax = luaL_checkint(L, 3); + int ymin = luaL_checkint(L, 4); + int ymax = luaL_checkint(L, 5); + + cdCanvasClipArea(cdlua_checkcanvas(L, 1), xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_cliparea(lua_State *L) +{ + double xmin = luaL_checknumber(L, 2); + double xmax = luaL_checknumber(L, 3); + double ymin = luaL_checknumber(L, 4); + double ymax = luaL_checknumber(L, 5); + + wdCanvasClipArea(cdlua_checkcanvas(L, 1), xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_fcliparea(lua_State *L) +{ + double xmin = luaL_checknumber(L, 2); + double xmax = luaL_checknumber(L, 3); + double ymin = luaL_checknumber(L, 4); + double ymax = luaL_checknumber(L, 5); + + cdfCanvasClipArea(cdlua_checkcanvas(L, 1), xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_getcliparea(lua_State *L) +{ + int xmin, xmax, ymin, ymax; + int status; + + status = cdCanvasGetClipArea(cdlua_checkcanvas(L, 1), &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + lua_pushnumber(L, status); + return 5; +} + +static int wdlua5_getcliparea(lua_State *L) +{ + double xmin, xmax, ymin, ymax; + int status; + + status = wdCanvasGetClipArea(cdlua_checkcanvas(L, 1), &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + lua_pushnumber(L, status); + return 5; +} + +static int cdlua5_fgetcliparea(lua_State *L) +{ + double xmin, xmax, ymin, ymax; + int status; + + status = cdfCanvasGetClipArea(cdlua_checkcanvas(L, 1), &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + lua_pushnumber(L, status); + return 5; +} + +/***************************************************************************\ +* Regions * +\***************************************************************************/ + +/***************************************************************************\ +* cd.RegionCombineMode(mode: number) -> (old_mode: number) * +\***************************************************************************/ +static int cdlua5_regioncombinemode(lua_State *L) +{ + lua_pushnumber(L, cdCanvasRegionCombineMode(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.PointInRegion(x, y: number) -> (status: number) * +\***************************************************************************/ +static int cdlua5_pointinregion(lua_State *L) +{ + lua_pushnumber(L, cdCanvasIsPointInRegion(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3))); + return 1; +} + +/***************************************************************************\ +* cd.wPointInRegion(x, y: number) -> (status: number) * +\***************************************************************************/ +static int wdlua5_pointinregion(lua_State *L) +{ + lua_pushnumber(L, wdCanvasIsPointInRegion(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3))); + return 1; +} + +/***************************************************************************\ +* cd.OffsetRegion(dx, dy: number) * +\***************************************************************************/ +static int cdlua5_offsetregion(lua_State *L) +{ + cdCanvasOffsetRegion(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3)); + return 0; +} + +/***************************************************************************\ +* cd.wOffsetRegion(dx, dy: number) * +\***************************************************************************/ +static int wdlua5_offsetregion(lua_State *L) +{ + wdCanvasOffsetRegion(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3)); + return 0; +} + +/***************************************************************************\ +* cd.RegionBox() -> (xmin, xmax, ymin, ymax, status: number) * +\***************************************************************************/ +static int cdlua5_regionbox(lua_State *L) +{ + int xmin, xmax, ymin, ymax; + + cdCanvasGetRegionBox(cdlua_checkcanvas(L, 1), &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/***************************************************************************\ +* cd.wRegionBox() -> (xmin, xmax, ymin, ymax, status: number) * +\***************************************************************************/ +static int wdlua5_regionbox(lua_State *L) +{ + double xmin, xmax, ymin, ymax; + + wdCanvasGetRegionBox(cdlua_checkcanvas(L, 1), &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + + +/***************************************************************************\ +* Primitives * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Pixel(x, y: number, color) * +\***************************************************************************/ +static int cdlua5_pixel (lua_State *L) +{ + cdCanvasPixel(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3), cdlua_checkcolor(L, 4)); + return 0 ; +} + +/***************************************************************************\ +* cd.wPixel(x, y: number, color) * +\***************************************************************************/ +static int wdlua5_pixel (lua_State *L) +{ + wdCanvasPixel(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3), cdlua_checkcolor(L, 4)); + return 0; +} + +/***************************************************************************\ +* cd.Mark(x, y: number) * +\***************************************************************************/ +static int cdlua5_mark(lua_State *L) +{ + cdCanvasMark(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3)); + return 0; +} + +/***************************************************************************\ +* cd.wMark(x, y: number) * +\***************************************************************************/ +static int wdlua5_mark(lua_State *L) +{ + wdCanvasMark(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3)); + return 0; +} + +/***************************************************************************\ +* cd.MarkType(type: number) -> (old_type: number) * +\***************************************************************************/ +static int cdlua5_marktype(lua_State *L) +{ + lua_pushnumber(L, cdCanvasMarkType(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.MarkSize(size: number) -> (old_size: number) * +\***************************************************************************/ +static int cdlua5_marksize(lua_State *L) +{ + lua_pushnumber(L, cdCanvasMarkSize(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.wMarkSize(size: number) -> (old_size: number) * +\***************************************************************************/ +static int wdlua5_marksize(lua_State *L) +{ + lua_pushnumber(L, wdCanvasMarkSize(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2))); + return 1; +} + + + +/***************************************************************************\ +* Lines * +\***************************************************************************/ + +static int cdlua5_line(lua_State *L) +{ + int x1 = luaL_checkint(L,2); + int y1 = luaL_checkint(L,3); + int x2 = luaL_checkint(L,4); + int y2 = luaL_checkint(L,5); + cdCanvasLine(cdlua_checkcanvas(L, 1), x1, y1, x2, y2); + return 0; +} + +static int wdlua5_line(lua_State *L) +{ + double x1 = luaL_checknumber(L, 2); + double y1 = luaL_checknumber(L, 3); + double x2 = luaL_checknumber(L, 4); + double y2 = luaL_checknumber(L, 5); + wdCanvasLine(cdlua_checkcanvas(L, 1), x1, y1, x2, y2); + return 0; +} + +static int cdlua5_fline(lua_State *L) +{ + double x1 = luaL_checknumber(L, 2); + double y1 = luaL_checknumber(L, 3); + double x2 = luaL_checknumber(L, 4); + double y2 = luaL_checknumber(L, 5); + cdfCanvasLine(cdlua_checkcanvas(L, 1), x1, y1, x2, y2); + return 0; +} + +static int cdlua5_rect(lua_State *L) +{ + int xmin = luaL_checkint(L,2); + int xmax = luaL_checkint(L,3); + int ymin = luaL_checkint(L,4); + int ymax = luaL_checkint(L,5); + cdCanvasRect(cdlua_checkcanvas(L, 1), xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_rect(lua_State *L) +{ + double xmin = luaL_checknumber(L, 2); + double xmax = luaL_checknumber(L, 3); + double ymin = luaL_checknumber(L, 4); + double ymax = luaL_checknumber(L, 5); + wdCanvasRect(cdlua_checkcanvas(L, 1), xmin,xmax,ymin,ymax); + return 0; +} + +static int cdlua5_frect(lua_State *L) +{ + double xmin = luaL_checknumber(L, 2); + double xmax = luaL_checknumber(L, 3); + double ymin = luaL_checknumber(L, 4); + double ymax = luaL_checknumber(L, 5); + cdfCanvasRect(cdlua_checkcanvas(L, 1), xmin,xmax,ymin,ymax); + return 0; +} + +static int cdlua5_arc(lua_State *L) +{ + int xc = luaL_checkint(L,2); + int yc = luaL_checkint(L,3); + int w = luaL_checkint(L,4); + int h = luaL_checkint(L,5); + double angle1 = luaL_checknumber(L,6); + double angle2 = luaL_checknumber(L,7); + cdCanvasArc(cdlua_checkcanvas(L, 1), xc, yc, w, h, angle1, angle2); + return 0; +} + +static int wdlua5_arc(lua_State *L) +{ + double xc = luaL_checknumber(L, 2); + double yc = luaL_checknumber(L, 3); + double w = luaL_checknumber(L, 4); + double h = luaL_checknumber(L, 5); + double angle1 = luaL_checknumber(L, 6); + double angle2 = luaL_checknumber(L, 7); + wdCanvasArc(cdlua_checkcanvas(L, 1), xc, yc, w, h, angle1, angle2); + return 0; +} + +static int cdlua5_farc(lua_State *L) +{ + double xc = luaL_checknumber(L, 2); + double yc = luaL_checknumber(L, 3); + double w = luaL_checknumber(L, 4); + double h = luaL_checknumber(L, 5); + double angle1 = luaL_checknumber(L, 6); + double angle2 = luaL_checknumber(L, 7); + cdfCanvasArc(cdlua_checkcanvas(L, 1), xc, yc, w, h, angle1, angle2); + return 0; +} + +/***************************************************************************\ +* cd.LineStyle(style: number) -> (old_style: number) * +\***************************************************************************/ +static int cdlua5_linestyle(lua_State *L) +{ + lua_pushnumber(L, cdCanvasLineStyle(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.LineStyleDashes(dashes: table, count: number) * +\***************************************************************************/ +static int cdlua5_linestyledashes(lua_State *L) +{ + int *dashes_int, dashes_count, i; + + if (!lua_istable(L, 2)) + luaL_argerror(L, 2, "invalid dashes, must be a table"); + + dashes_count = luaL_checkint(L, 3); + dashes_int = (int*) malloc(dashes_count * sizeof(int)); + + for (i=0; i < dashes_count; i++) + { + lua_pushnumber(L, i+1); + lua_gettable(L, 2); + + dashes_int[i] = luaL_checkint(L,-1); + } + + cdCanvasLineStyleDashes(cdlua_checkcanvas(L, 1), dashes_int, dashes_count); + free(dashes_int); + + return 0; +} + +/***************************************************************************\ +* cd.LineWidth(width: number) -> (old_width: number) * +\***************************************************************************/ +static int cdlua5_linewidth(lua_State *L) +{ + lua_pushnumber(L, cdCanvasLineWidth(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.wLineWidth(width: number) -> (old_width: number) * +\***************************************************************************/ +static int wdlua5_linewidth(lua_State *L) +{ + lua_pushnumber(L, wdCanvasLineWidth(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.LineJoin(style: number) -> (old_style: number) * +\***************************************************************************/ +static int cdlua5_linejoin(lua_State *L) +{ + lua_pushnumber(L, cdCanvasLineJoin(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.LineCap(style: number) -> (old_style: number) * +\***************************************************************************/ +static int cdlua5_linecap(lua_State *L) +{ + lua_pushnumber(L, cdCanvasLineCap(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + + + +/***************************************************************************\ +* Filled Areas * +\***************************************************************************/ + +static int cdlua5_box(lua_State *L) +{ + int xmin = luaL_checkint(L, 2); + int xmax = luaL_checkint(L, 3); + int ymin = luaL_checkint(L, 4); + int ymax = luaL_checkint(L, 5); + cdCanvasBox(cdlua_checkcanvas(L, 1), xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_box(lua_State *L) +{ + double xmin = luaL_checknumber(L, 2); + double xmax = luaL_checknumber(L, 3); + double ymin = luaL_checknumber(L, 4); + double ymax = luaL_checknumber(L, 5); + wdCanvasBox(cdlua_checkcanvas(L, 1), xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_fbox(lua_State *L) +{ + double xmin = luaL_checknumber(L, 2); + double xmax = luaL_checknumber(L, 3); + double ymin = luaL_checknumber(L, 4); + double ymax = luaL_checknumber(L, 5); + cdfCanvasBox(cdlua_checkcanvas(L, 1), xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_sector(lua_State *L) +{ + int xc = luaL_checkint(L,2); + int yc = luaL_checkint(L,3); + int w = luaL_checkint(L,4); + int h = luaL_checkint(L,5); + double angle1 = luaL_checknumber(L,6); + double angle2 = luaL_checknumber(L,7); + cdCanvasSector(cdlua_checkcanvas(L, 1), xc, yc, w, h, angle1, angle2); + return 0; +} + +static int wdlua5_sector(lua_State *L) +{ + double xc = luaL_checknumber(L, 2); + double yc = luaL_checknumber(L, 3); + double w = luaL_checknumber(L, 4); + double h = luaL_checknumber(L, 5); + double angle1 = luaL_checknumber(L, 6); + double angle2 = luaL_checknumber(L, 7); + wdCanvasSector(cdlua_checkcanvas(L, 1), xc, yc, w, h, angle1, angle2); + return 0; +} + +static int cdlua5_fsector(lua_State *L) +{ + double xc = luaL_checknumber(L, 2); + double yc = luaL_checknumber(L, 3); + double w = luaL_checknumber(L, 4); + double h = luaL_checknumber(L, 5); + double angle1 = luaL_checknumber(L, 6); + double angle2 = luaL_checknumber(L, 7); + cdfCanvasSector(cdlua_checkcanvas(L, 1), xc, yc, w, h, angle1, angle2); + return 0; +} + +static int cdlua5_chord(lua_State *L) +{ + int xc = luaL_checkint(L,2); + int yc = luaL_checkint(L,3); + int w = luaL_checkint(L,4); + int h = luaL_checkint(L,5); + double angle1 = luaL_checknumber(L,6); + double angle2 = luaL_checknumber(L,7); + cdCanvasChord(cdlua_checkcanvas(L, 1), xc, yc, w, h, angle1, angle2); + return 0; +} + +static int wdlua5_chord(lua_State *L) +{ + double xc = luaL_checknumber(L, 2); + double yc = luaL_checknumber(L, 3); + double w = luaL_checknumber(L, 4); + double h = luaL_checknumber(L, 5); + double angle1 = luaL_checknumber(L, 6); + double angle2 = luaL_checknumber(L, 7); + wdCanvasChord(cdlua_checkcanvas(L, 1), xc, yc, w, h, angle1, angle2); + return 0; +} + +static int cdlua5_fchord(lua_State *L) +{ + double xc = luaL_checknumber(L, 2); + double yc = luaL_checknumber(L, 3); + double w = luaL_checknumber(L, 4); + double h = luaL_checknumber(L, 5); + double angle1 = luaL_checknumber(L, 6); + double angle2 = luaL_checknumber(L, 7); + cdfCanvasChord(cdlua_checkcanvas(L, 1), xc, yc, w, h, angle1, angle2); + return 0; +} + +/***************************************************************************\ +* cd.BackOpacity(opacity: number) -> (old_opacity: number) * +\***************************************************************************/ +static int cdlua5_backopacity(lua_State *L) +{ + lua_pushnumber(L, cdCanvasBackOpacity(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.FillMode(mode: number) -> (old_mode: number) * +\***************************************************************************/ +static int cdlua5_fillmode(lua_State *L) +{ + lua_pushnumber(L, cdCanvasFillMode(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.InteriorStyle(style: number) -> (old_style: number) * +\***************************************************************************/ +static int cdlua5_interiorstyle(lua_State *L) +{ + lua_pushnumber(L, cdCanvasInteriorStyle(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.Hatch(style: number) -> (old_style: number) * +\***************************************************************************/ +static int cdlua5_hatch(lua_State *L) +{ + lua_pushnumber(L, cdCanvasHatch(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +static int cdlua5_stipple(lua_State *L) +{ + cdluaStipple *stipple_p = cdlua_checkstipple(L, 2); + cdCanvasStipple(cdlua_checkcanvas(L, 1), stipple_p->width, stipple_p->height, stipple_p->stipple); + return 0 ; +} + +static int wdlua5_stipple(lua_State *L) +{ + cdluaStipple *stipple_p = cdlua_checkstipple(L, 2); + double w_mm = luaL_checknumber(L, 3); + double h_mm = luaL_checknumber(L, 4); + wdCanvasStipple(cdlua_checkcanvas(L, 1), stipple_p->width, stipple_p->height, stipple_p->stipple, w_mm, h_mm); + return 0; +} + +static int cdlua5_getstipple(lua_State *L) +{ + int width, height, size; + unsigned char *stipple, *new_stipple = NULL; + + stipple = cdCanvasGetStipple(cdlua_checkcanvas(L, 1), &width, &height); + + size = width * height; + + if (stipple) + new_stipple = (unsigned char *)malloc(size); + + if (new_stipple) + { + memcpy(new_stipple, stipple, size); + cdlua_pushstipple(L, new_stipple, width, height); + } + else + lua_pushnil(L); + + return 1; +} + +static int cdlua5_pattern(lua_State *L) +{ + cdluaPattern* pattern_p = cdlua_checkpattern(L, 2); + cdCanvasPattern(cdlua_checkcanvas(L, 1), pattern_p->width, pattern_p->height, pattern_p->pattern); + return 0; +} + +static int wdlua5_pattern(lua_State *L) +{ + cdluaPattern* pattern_p = cdlua_checkpattern(L, 2); + double w_mm = luaL_checknumber(L, 3); + double h_mm = luaL_checknumber(L, 4); + wdCanvasPattern(cdlua_checkcanvas(L, 1), pattern_p->width, pattern_p->height, pattern_p->pattern, w_mm, h_mm); + return 0; +} + +static int cdlua5_getpattern(lua_State *L) +{ + int width, height, size; + long int *pattern, *new_pattern = NULL; + + pattern = cdCanvasGetPattern(cdlua_checkcanvas(L, 1), &width, &height); + + size = width * height; + + if (pattern) + new_pattern = (long int *) malloc(size * sizeof(long int)); + + if (new_pattern) + { + memcpy(new_pattern, pattern, size * sizeof(long int)); + cdlua_pushpattern(L, new_pattern, width, height); + } + else + lua_pushnil(L); + + return 1; +} + +/***************************************************************************\ +* Text * +\***************************************************************************/ + +static int cdlua5_text(lua_State *L) +{ + const char* s = luaL_checkstring(L, 4); + cdCanvasText(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3), s); + return 0; +} + +static int wdlua5_text(lua_State *L) +{ + const char* s = luaL_checkstring(L, 4); + wdCanvasText(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3), s); + return 0; +} + +static int cdlua5_ftext(lua_State *L) +{ + const char* s = luaL_checkstring(L, 4); + cdfCanvasText(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3), s); + return 0; +} + +/***************************************************************************\ +* cd.Font(typeface, style, size: number) * +\***************************************************************************/ +static int cdlua5_font(lua_State *L) +{ + lua_pushnumber(L, cdCanvasFont(cdlua_checkcanvas(L, 1), luaL_checkstring(L, 2), luaL_checkint(L, 3), luaL_checkint(L, 4))); + return 1; +} + +/***************************************************************************\ +* cd.wFont(typeface, style, size: number) * +\***************************************************************************/ +static int wdlua5_font(lua_State *L) +{ + lua_pushnumber(L, wdCanvasFont(cdlua_checkcanvas(L, 1), luaL_checkstring(L, 2), luaL_checkint(L, 3), luaL_checknumber(L, 4))); + return 1; +} + + +/***************************************************************************\ +* cd.GetFont() -> (typeface, style, size: number) * +\***************************************************************************/ +static int cdlua5_getfont(lua_State *L) +{ + char type_face[1024]; + int style, size; + + cdCanvasGetFont(cdlua_checkcanvas(L, 1), type_face, &style, &size); + lua_pushstring(L, type_face); + lua_pushnumber(L, style); + lua_pushnumber(L, size); + return 3; +} + +/***************************************************************************\ +* cd.wGetFont() -> (typeface, style, size: number) * +\***************************************************************************/ +static int wdlua5_getfont(lua_State *L) +{ + char type_face[1024]; + int style; + double size; + + wdCanvasGetFont(cdlua_checkcanvas(L, 1), type_face, &style, &size); + lua_pushstring(L, type_face); + lua_pushnumber(L, style); + lua_pushnumber(L, size); + return 3; +} + +/***************************************************************************\ +* cd.NativeFont(font: string) * +\***************************************************************************/ +static int cdlua5_nativefont(lua_State *L) +{ + lua_pushstring(L, cdCanvasNativeFont(cdlua_checkcanvas(L, 1), luaL_checkstring(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.TextAlignment(alignment: number) -> (old_alignment: number) * +\***************************************************************************/ +static int cdlua5_textalignment(lua_State *L) +{ + lua_pushnumber(L, cdCanvasTextAlignment(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.TextOrientation(angle: number) -> (old_angle: number) * +\***************************************************************************/ +static int cdlua5_textorientation(lua_State *L) +{ + lua_pushnumber(L, cdCanvasTextOrientation(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.GetFontDim() -> (max_width, max_height, ascent, descent: number) * +\***************************************************************************/ +static int cdlua5_getfontdim(lua_State *L) +{ + int max_width; + int height; + int ascent; + int descent; + + cdCanvasGetFontDim(cdlua_checkcanvas(L, 1), &max_width, &height, &ascent, &descent); + lua_pushnumber(L, max_width); + lua_pushnumber(L, height); + lua_pushnumber(L, ascent); + lua_pushnumber(L, descent); + return 4; +} + +/***************************************************************************\ +* cd.wGetFontDim() -> (max_width, max_height, ascent, descent: number) * +\***************************************************************************/ +static int wdlua5_getfontdim(lua_State *L) +{ + double max_width; + double height; + double ascent; + double descent; + + wdCanvasGetFontDim(cdlua_checkcanvas(L, 1), &max_width, &height, &ascent, &descent); + lua_pushnumber(L, max_width); + lua_pushnumber(L, height); + lua_pushnumber(L, ascent); + lua_pushnumber(L, descent); + return 4; +} + +/***************************************************************************\ +* cd.GetTextSize(text: string) -> (width, heigth: number) * +\***************************************************************************/ +static int cdlua5_gettextsize(lua_State *L) +{ + int width; + int height; + cdCanvasGetTextSize(cdlua_checkcanvas(L, 1), luaL_checkstring(L, 2), &width, &height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + return 2; +} + +/***************************************************************************\ +* cd.wGetTextSize(text: string) -> (width, heigth: number) * +\***************************************************************************/ +static int wdlua5_gettextsize(lua_State *L) +{ + double width; + double height; + wdCanvasGetTextSize(cdlua_checkcanvas(L, 1), luaL_checkstring(L, 2), &width, &height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + return 2; +} + +/****************************************************************************\ +* cd.GetTextBox(x, y: number, text: string) -> (xmin, xmax, ymin, ymax: number) * +\****************************************************************************/ +static int cdlua5_gettextbox(lua_State *L) +{ + int xmin, xmax, ymin, ymax; + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + const char* s = luaL_checkstring(L, 4); + + cdCanvasGetTextBox(cdlua_checkcanvas(L, 1), x, y, s, &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/*****************************************************************************\ +* cd.wGetTextBox(x, y: number, text: string) -> (xmin, xmax, ymin, ymax: number) * +\*****************************************************************************/ +static int wdlua5_gettextbox(lua_State *L) +{ + double xmin, xmax, ymin, ymax; + double x = luaL_checknumber(L, 2); + double y = luaL_checknumber(L, 3); + const char* s = luaL_checkstring(L, 4); + + wdCanvasGetTextBox(cdlua_checkcanvas(L, 1), x, y, s, &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/***************************************************************************************************************\ +* cd.GetTextBounds(x, y: number, text: string) -> (rect0, rect1, rect2, rect3, rect4, rect5, rect6, rect7: number) * +\***************************************************************************************************************/ +static int cdlua5_gettextbounds(lua_State *L) +{ + int rect[8]; + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + const char* s = luaL_checkstring(L, 4); + + cdCanvasGetTextBounds(cdlua_checkcanvas(L, 1), x, y, s, rect); + lua_pushnumber(L, rect[0]); + lua_pushnumber(L, rect[1]); + lua_pushnumber(L, rect[2]); + lua_pushnumber(L, rect[3]); + lua_pushnumber(L, rect[4]); + lua_pushnumber(L, rect[5]); + lua_pushnumber(L, rect[6]); + lua_pushnumber(L, rect[7]); + return 4; +} + +/****************************************************************************************************************\ +* cd.wGetTextBounds(x, y: number, text: string) -> (rect0, rect1, rect2, rect3, rect4, rect5, rect6, rect7: number) * +\****************************************************************************************************************/ +static int wdlua5_gettextbounds(lua_State *L) +{ + double rect[8]; + double x = luaL_checknumber(L, 2); + double y = luaL_checknumber(L, 3); + const char* s = luaL_checkstring(L, 4); + + wdCanvasGetTextBounds(cdlua_checkcanvas(L, 1), x, y, s, rect); + lua_pushnumber(L, rect[0]); + lua_pushnumber(L, rect[1]); + lua_pushnumber(L, rect[2]); + lua_pushnumber(L, rect[3]); + lua_pushnumber(L, rect[4]); + lua_pushnumber(L, rect[5]); + lua_pushnumber(L, rect[6]); + lua_pushnumber(L, rect[7]); + return 4; +} + + + +/***************************************************************************\ +* Text * +\***************************************************************************/ + +/***************************************************************************\ +* cd.VectorText(x, y: number, text: string) * +\***************************************************************************/ +static int cdlua5_vectortext(lua_State *L) +{ + const char* s = luaL_checkstring(L,4); + cdCanvasVectorText(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3), s); + return 0; +} + +/***************************************************************************\ +* cd.wVectorText(x, y: number, text: string) * +\***************************************************************************/ +static int wdlua5_vectortext(lua_State *L) +{ + const char* s = luaL_checkstring(L, 4); + wdCanvasVectorText(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3),s); + return 0; +} + +/***************************************************************************\ +* cd.MultiLineVectorText(x, y: number, text: string) * +\***************************************************************************/ +static int cdlua5_multilinevectortext(lua_State *L) +{ + const char* s = luaL_checkstring(L, 4); + cdCanvasMultiLineVectorText(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3), s); + return 0; +} + +/***************************************************************************\ +* cd.wMultiLineVectorText(x, y: number, text: string) * +\***************************************************************************/ +static int wdlua5_multilinevectortext(lua_State *L) +{ + const char* s = luaL_checkstring(L, 4); + wdCanvasMultiLineVectorText(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3), s); + return 0; +} + +/***************************************************************************\ +* cd.VectorTextDirection(x1, y1, x2, y2: number) * +\***************************************************************************/ +static int cdlua5_vectortextdirection(lua_State *L) +{ + int x1 = luaL_checkint(L,2); + int y1 = luaL_checkint(L,3); + int x2 = luaL_checkint(L,4); + int y2 = luaL_checkint(L,5); + cdCanvasVectorTextDirection(cdlua_checkcanvas(L, 1), x1, y1, x2, y2); + return 0; +} + +/***************************************************************************\ +* cd.wVectorTextDirection(x1, y1, x2, y2: number) * +\***************************************************************************/ +static int wdlua5_vectortextdirection(lua_State *L) +{ + double x1 = luaL_checknumber(L, 2); + double y1 = luaL_checknumber(L, 3); + double x2 = luaL_checknumber(L, 4); + double y2 = luaL_checknumber(L, 5); + wdCanvasVectorTextDirection(cdlua_checkcanvas(L, 1), x1, y1, x2, y2); + return 0; +} + + +/***************************************************************************\ +* cd.VectorTextTransform(matrix: table) -> (old_matrix: table) * +\***************************************************************************/ +static int cdlua5_vectortexttransform(lua_State *L) +{ + double matrix[6], *old_matrix; + int i; + + if (!lua_istable(L, 2)) + luaL_argerror(L, 2, "invalid matrix, must be a table"); + + for (i=0; i < 6; i++) + { + lua_rawgeti(L, 2, i+1); + + if (!lua_isnumber(L, -1)) + luaL_argerror(L, 2, "invalid matrix value, must be a number"); + + matrix[i] = lua_tonumber(L, -1); + lua_pop(L, 1); + } + + old_matrix = cdCanvasVectorTextTransform(cdlua_checkcanvas(L, 1), matrix); + lua_newtable(L); + for (i=0; i < 6; i++) + { + lua_pushnumber(L, old_matrix[i]); + lua_rawseti(L, 1, i+1); + } + return 1; +} + +/***************************************************************************\ +* cd.VectorFontSize(w, h: number, text: string) * +\***************************************************************************/ +static int cdlua5_vectorfontsize(lua_State *L) +{ + cdCanvasVectorFontSize(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3)); + return 0; +} + +/***************************************************************************\ +* cd.GetVectorFontSize(text: string) -> (w, h: number) * +\***************************************************************************/ +static int cdlua5_getvectorfontsize(lua_State *L) +{ + double width; + double height; + cdCanvasGetVectorFontSize(cdlua_checkcanvas(L, 1), &width, &height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + return 2; +} + +/***************************************************************************\ +* cd.VectorTextSize(w, h: number, text: string) * +\***************************************************************************/ +static int cdlua5_vectortextsize(lua_State *L) +{ + const char* s = luaL_checkstring(L, 4); + cdCanvasVectorTextSize(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3), s); + return 0; +} + +/***************************************************************************\ +* cd.wVectorTextSize(w, h: number, text: string) * +\***************************************************************************/ +static int wdlua5_vectortextsize(lua_State *L) +{ + const char* s = luaL_checkstring(L, 4); + wdCanvasVectorTextSize(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3), s); + return 0; +} + +/***************************************************************************\ +* cd.VectorTextSize(w, h: number, text: string) * +\***************************************************************************/ +static int cdlua5_vectorcharsize(lua_State *L) +{ + lua_pushnumber(L, cdCanvasVectorCharSize(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.wVectorTextSize(w, h: number, text: string) * +\***************************************************************************/ +static int wdlua5_vectorcharsize(lua_State *L) +{ + lua_pushnumber(L, wdCanvasVectorCharSize(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.VectorFont(filename: string) -> (font_name: string) * +\***************************************************************************/ +static int cdlua5_vectorfont(lua_State *L) +{ + lua_pushstring(L, cdCanvasVectorFont(cdlua_checkcanvas(L, 1), luaL_checkstring(L, 2))); + return 1; +} + +/***************************************************************************\ +* cd.GetVectorTextSize(text: string) -> (w, h: number) * +\***************************************************************************/ +static int cdlua5_getvectortextsize(lua_State *L) +{ + int width; + int height; + cdCanvasGetVectorTextSize(cdlua_checkcanvas(L, 1), luaL_checkstring(L, 2), &width, &height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + return 2; +} + +/***************************************************************************\ +* cd.wGetVectorTextSize(text: string) -> (w, h: number) * +\***************************************************************************/ +static int wdlua5_getvectortextsize(lua_State *L) +{ + double width; + double height; + wdCanvasGetVectorTextSize(cdlua_checkcanvas(L, 1), luaL_checkstring(L, 2), &width, &height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + return 2; +} + +/***************************************************************************\ +* cd.GetVectorTextBounds(s: string, px,py: number) -> (rect: table) * +\***************************************************************************/ +static int cdlua5_getvectortextbounds(lua_State *L) +{ + const char* s = luaL_checkstring(L, 2); + int x = luaL_checkint(L, 3); + int y = luaL_checkint(L, 4); + int rect[8], i; + + cdCanvasGetVectorTextBounds(cdlua_checkcanvas(L, 1), s, x, y, rect); + lua_newtable(L); + for (i=0; i < 8; i++) + { + lua_pushnumber(L, rect[i]); + lua_rawseti(L, -2, i+1); + } + return 1; +} + +/***************************************************************************\ +* cd.wGetVectorTextBounds(s: string, px,py: number) -> (rect: table) * +\***************************************************************************/ +static int wdlua5_getvectortextbounds(lua_State *L) +{ + const char* s = luaL_checkstring(L, 2); + double x = luaL_checknumber(L, 3); + double y = luaL_checknumber(L, 4); + double rect[8]; + int i; + + wdCanvasGetVectorTextBounds(cdlua_checkcanvas(L, 1), s, x, y, rect); + lua_newtable(L); + for (i=0; i < 8; i++) + { + lua_pushnumber(L, rect[i]); + lua_rawseti(L, -2, i+1); + } + return 1; +} + +/****************************************************************************\ +* cd.GetVectorTextBox(x, y: number, text: string) -> (xmin, xmax, ymin, ymax: number) * +\****************************************************************************/ +static int cdlua5_getvectortextbox(lua_State *L) +{ + int xmin, xmax, ymin, ymax; + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + const char* s = luaL_checkstring(L, 4); + + cdCanvasGetVectorTextBox(cdlua_checkcanvas(L, 1), x, y, s, &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + +/*****************************************************************************\ +* cd.wGetVectorTextBox(x, y: number, text: string) -> (xmin, xmax, ymin, ymax: number) * +\*****************************************************************************/ +static int wdlua5_getvectortextbox(lua_State *L) +{ + double xmin, xmax, ymin, ymax; + double x = luaL_checknumber(L, 2); + double y = luaL_checknumber(L, 3); + const char* s = luaL_checkstring(L, 4); + + wdCanvasGetVectorTextBox(cdlua_checkcanvas(L, 1), x, y, s, &xmin, &xmax, &ymin, &ymax); + lua_pushnumber(L, xmin); + lua_pushnumber(L, xmax); + lua_pushnumber(L, ymin); + lua_pushnumber(L, ymax); + return 4; +} + + + +/***************************************************************************\ +* Client Images. * +\***************************************************************************/ + +static int cdlua5_getimagergb(lua_State *L) +{ + cdluaImageRGB* imagergb_p = cdlua_checkimagergb(L, 2); + int x = luaL_checkint(L, 3); + int y = luaL_checkint(L, 4); + cdCanvasGetImageRGB(cdlua_checkcanvas(L, 1), imagergb_p->red, imagergb_p->green, imagergb_p->blue, + x, y, imagergb_p->width, imagergb_p->height); + return 0; +} + +static int cdlua5_putimagerectrgb(lua_State *L) +{ + cdluaImageRGB* imagergb_p = cdlua_checkimagergb(L, 2); + int x = luaL_checkint(L, 3); + int y = luaL_checkint(L, 4); + int w = luaL_checkint(L, 5); + int h = luaL_checkint(L, 6); + int xmin = luaL_checkint(L, 7); + int xmax = luaL_checkint(L, 8); + int ymin = luaL_checkint(L, 9); + int ymax = luaL_checkint(L, 10); + + if (w < 0 || h < 0) + luaL_argerror(L, 5, "target region dimensions should be positive integers"); + + cdCanvasPutImageRectRGB(cdlua_checkcanvas(L, 1), imagergb_p->width, imagergb_p->height, imagergb_p->red, + imagergb_p->green, imagergb_p->blue, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_putimagerectrgb(lua_State *L) +{ + cdluaImageRGB* imagergb_p = cdlua_checkimagergb(L, 2); + double x = luaL_checknumber(L, 3); + double y = luaL_checknumber(L, 4); + double w = luaL_checknumber(L, 5); + double h = luaL_checknumber(L, 6); + int xmin = luaL_checkint(L, 7); + int xmax = luaL_checkint(L, 8); + int ymin = luaL_checkint(L, 9); + int ymax = luaL_checkint(L, 10); + + if (w < 0 || h < 0) + luaL_argerror(L, 5, "target region dimensions should be positive integers"); + + wdCanvasPutImageRectRGB(cdlua_checkcanvas(L, 1), imagergb_p->width, imagergb_p->height, imagergb_p->red, + imagergb_p->green, imagergb_p->blue, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_putimagerectrgba(lua_State *L) +{ + cdluaImageRGBA* imagergba_p = cdlua_checkimagergba(L, 2); + int x = luaL_checkint(L, 3); + int y = luaL_checkint(L, 4); + int w = luaL_checkint(L, 5); + int h = luaL_checkint(L, 6); + int xmin = luaL_checkint(L, 7); + int xmax = luaL_checkint(L, 8); + int ymin = luaL_checkint(L, 9); + int ymax = luaL_checkint(L, 10); + + if (w < 0 || h < 0) + luaL_argerror(L, 5, "target region dimensions should be positive integers"); + + cdCanvasPutImageRectRGBA(cdlua_checkcanvas(L, 1), imagergba_p->width, imagergba_p->height, imagergba_p->red, + imagergba_p->green, imagergba_p->blue, imagergba_p->alpha, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_putimagerectrgba(lua_State *L) +{ + cdluaImageRGBA* imagergba_p = cdlua_checkimagergba(L, 2); + double x = luaL_checknumber(L, 3); + double y = luaL_checknumber(L, 4); + double w = luaL_checknumber(L, 5); + double h = luaL_checknumber(L, 6); + int xmin = luaL_checkint(L, 7); + int xmax = luaL_checkint(L, 8); + int ymin = luaL_checkint(L, 9); + int ymax = luaL_checkint(L, 10); + + if (w < 0 || h < 0) + luaL_argerror(L, 5, "target region dimensions should be positive integers"); + + wdCanvasPutImageRectRGBA(cdlua_checkcanvas(L, 1), imagergba_p->width, imagergba_p->height, imagergba_p->red, + imagergba_p->green, imagergba_p->blue, imagergba_p->alpha, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_putimagerectmap(lua_State *L) +{ + cdluaImageMap* imagemap_p = cdlua_checkimagemap(L, 2); + cdluaPalette *pal = cdlua_checkpalette(L, 3); + int x = luaL_checkint(L, 4); + int y = luaL_checkint(L, 5); + int w = luaL_checkint(L, 6); + int h = luaL_checkint(L, 7); + int xmin = luaL_checkint(L, 8); + int xmax = luaL_checkint(L, 9); + int ymin = luaL_checkint(L, 10); + int ymax = luaL_checkint(L, 11); + + if (w < 0 || h < 0) + luaL_argerror(L, 6, "target region dimensions should be positive integers"); + + cdCanvasPutImageRectMap(cdlua_checkcanvas(L, 1), imagemap_p->width, imagemap_p->height, imagemap_p->index, + pal->color, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_putimagerectmap(lua_State *L) +{ + cdluaImageMap* imagemap_p = cdlua_checkimagemap(L, 2); + cdluaPalette *pal = cdlua_checkpalette(L, 3); + double x = luaL_checknumber(L, 4); + double y = luaL_checknumber(L, 5); + double w = luaL_checknumber(L, 6); + double h = luaL_checknumber(L, 7); + int xmin = luaL_checkint(L, 8); + int xmax = luaL_checkint(L, 9); + int ymin = luaL_checkint(L, 10); + int ymax = luaL_checkint(L, 11); + + if (w < 0 || h < 0) + luaL_argerror(L, 6, "target region dimensions should be positive integers"); + + wdCanvasPutImageRectMap(cdlua_checkcanvas(L, 1), imagemap_p->width, imagemap_p->height, imagemap_p->index, + pal->color, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +static int cdlua5_putbitmap(lua_State *L) +{ + cdBitmap *bitmap = cdlua_checkbitmap(L, 2); + int x = luaL_checkint(L, 3); + int y = luaL_checkint(L, 4); + int w = luaL_checkint(L, 5); + int h = luaL_checkint(L, 6); + + if (w < 0 || h < 0) + luaL_argerror(L, 5, "target region dimensions should be positive integers"); + + cdCanvasPutBitmap(cdlua_checkcanvas(L, 1), bitmap, x, y, w, h); + return 0; +} + +static int wdlua5_putbitmap(lua_State *L) +{ + cdBitmap *bitmap = cdlua_checkbitmap(L, 2); + double x = luaL_checknumber(L, 3); + double y = luaL_checknumber(L, 4); + double w = luaL_checknumber(L, 5); + double h = luaL_checknumber(L, 6); + + if (w < 0 || h < 0) + luaL_argerror(L, 5, "target region dimensions should be positive integers"); + + wdCanvasPutBitmap(cdlua_checkcanvas(L, 1), bitmap, x, y, w, h); + return 0; +} + +static int cdlua5_getbitmap(lua_State *L) +{ + cdBitmap *bitmap = cdlua_checkbitmap(L, 2); + int x = luaL_checkint(L, 3); + int y = luaL_checkint(L, 4); + cdCanvasGetBitmap(cdlua_checkcanvas(L, 1), bitmap, x, y); + return 0; +} + +/***************************************************************************\ +* Server Images. * +\***************************************************************************/ + +static int cdlua5_createimage(lua_State *L) +{ + cdImage *image; + int width = luaL_checkint(L, 2); + int height = luaL_checkint(L, 3); + + if (width < 1 || height < 1) + luaL_argerror(L, 2, "image dimensions should be positive integers"); + + image = cdCanvasCreateImage(cdlua_checkcanvas(L, 1), width, height); + if (image) + cdlua_pushimage(L, image); + else + lua_pushnil(L); + + return 1; +} + +static int cdlua5_getimage(lua_State *L) +{ + cdImage* image = cdlua_checkimage(L, 2); + int x = luaL_checkint(L, 3); + int y = luaL_checkint(L, 4); + cdCanvasGetImage(cdlua_checkcanvas(L, 1), image, x, y); + return 0; +} + +static int cdlua5_putimagerect(lua_State *L) +{ + cdImage* image = cdlua_checkimage(L, 2); + int x = luaL_checkint(L, 3); + int y = luaL_checkint(L, 4); + int xmin = luaL_checkint(L, 5); + int xmax = luaL_checkint(L, 6); + int ymin = luaL_checkint(L, 7); + int ymax = luaL_checkint(L, 8); + cdCanvasPutImageRect(cdlua_checkcanvas(L, 1), image, x, y, xmin, xmax, ymin, ymax); + return 0; +} + +static int wdlua5_putimagerect(lua_State *L) +{ + cdImage* image = cdlua_checkimage(L, 2); + double x = luaL_checknumber(L, 3); + double y = luaL_checknumber(L, 4); + int xmin = luaL_checkint(L, 5); + int xmax = luaL_checkint(L, 6); + int ymin = luaL_checkint(L, 7); + int ymax = luaL_checkint(L, 8); + wdCanvasPutImageRect(cdlua_checkcanvas(L, 1), image, x, y, xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* cd.ScrollArea(xmin, xmax, ymin, ymax, dx, dy: number) * +\***************************************************************************/ +static int cdlua5_scrollarea(lua_State *L) +{ + int xmin = luaL_checkint(L, 2); + int xmax = luaL_checkint(L, 3); + int ymin = luaL_checkint(L, 4); + int ymax = luaL_checkint(L, 5); + int dx = luaL_checkint(L, 6); + int dy = luaL_checkint(L, 7); + cdCanvasScrollArea(cdlua_checkcanvas(L, 1), xmin, xmax, ymin, ymax, dx, dy); + return 0; +} + + + +/***************************************************************************\ +* Other * +\***************************************************************************/ + +/********************************************************************************\ +* cd.Play(ctx, xmin, xmax, ymin, ymax: number, data: string) -> (status: number) * +\********************************************************************************/ + +static int cdlua5_play(lua_State *L) +{ + cdluaContext* cdlua_ctx = cdlua_getcontext(L, 2); + int xmin = luaL_checkint(L,3); + int xmax = luaL_checkint(L,4); + int ymin = luaL_checkint(L,5); + int ymax = luaL_checkint(L,6); + const char *data_s = luaL_checkstring(L,7); + + cdlua_setplaystate(L); + cdCanvasPlay(cdlua_checkcanvas(L, 1), cdlua_ctx->ctx(), xmin, xmax, ymin, ymax, (void*)data_s); + cdlua_setplaystate(NULL); + return 0; +} + +/***************************************************************************\ +* cd.GetColorPlanes() -> (bpp: number) * +\***************************************************************************/ +static int cdlua5_getcolorplanes(lua_State *L) +{ + lua_pushnumber(L, cdCanvasGetColorPlanes(cdlua_checkcanvas(L, 1))); + return 1; +} + +static int cdlua5_palette(lua_State *L) +{ + cdluaPalette *pal = cdlua_checkpalette(L, 2); + int mode_i = luaL_checkint(L, 3); + cdCanvasPalette(cdlua_checkcanvas(L, 1), pal->count, pal->color, mode_i); + return 0; +} + +/***************************************************************************\ +* cd.ImageRGB * +\***************************************************************************/ +static int cdlua5_imagergb(lua_State *L) +{ + int w, h, type = CD_RGB; + + cdCanvas* canvas = cdlua_checkcanvas(L, 1); + + if (cdCanvasGetContext(canvas) != CD_IMAGERGB) + luaL_argerror(L, 1, "invalid canvas, must be CD_IMAGERGB"); + + if (cdAlphaImage(canvas)) + type = CD_RGBA; + + cdCanvasGetSize(canvas, &w, &h, NULL, NULL); + + /* mark the image NOT to be freed */ + if (type == CD_RGBA) + cdlua_pushimagergba_ex(L, cdRedImage(canvas), cdGreenImage(canvas), cdBlueImage(canvas), cdAlphaImage(canvas), w, h); + else + cdlua_pushimagergb_ex(L, cdRedImage(canvas), cdGreenImage(canvas), cdBlueImage(canvas), w, h); + + return 1; +} + +/***************************************************************************\ +* cd.ImageRGBBitmap * +\***************************************************************************/ +static int cdlua5_imagergbbitmap(lua_State *L) +{ + int w, h, type = CD_RGB; + + cdCanvas* canvas = cdlua_checkcanvas(L, 1); + + if (cdCanvasGetContext(canvas) != CD_IMAGERGB) + luaL_argerror(L, 1, "invalid canvas, must be CD_IMAGERGB"); + + if (cdAlphaImage(canvas)) + type = CD_RGBA; + + cdCanvasGetSize(canvas, &w, &h, NULL, NULL); + + cdlua_pushbitmap(L, cdInitBitmap(w, h, type, + cdRedImage(canvas), + cdGreenImage(canvas), + cdBlueImage(canvas), + cdAlphaImage(canvas))); + + return 1; +} + +/***************************************************************************\ +* Hardcopy * +\***************************************************************************/ +static lua_State* wdlua5_hardcopy_luaState = NULL; + +static void wdlua5_hardcopy_func(cdCanvas* canvas) +{ + lua_State* L = wdlua5_hardcopy_luaState; + lua_pushvalue(L, 4); /* push the function in the stack */ + cdlua_pushcanvas(L, canvas); + if(lua_pcall(L, 1, 0, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); +} + +static int wdlua5_hardcopy(lua_State *L) +{ + cdCanvas* canvas = cdlua_checkcanvas(L, 1); + cdluaContext* cdlua_ctx = cdlua_getcontext(L, 2); + void *data_p = cdlua_ctx->checkdata(L,3); + luaL_argcheck(L, !lua_isfunction(L, 4), 4, "invalid draw function"); + + wdlua5_hardcopy_luaState = L; + wdCanvasHardcopy(canvas, cdlua_ctx->ctx(), data_p, wdlua5_hardcopy_func); + wdlua5_hardcopy_luaState = NULL; + + return 0; +} + + +/***************************************************************************\ +* Polygon functions * +\***************************************************************************/ + +/***************************************************************************\ +* cd.Begin(mode: number) * +\***************************************************************************/ +static int cdlua5_begin(lua_State *L) +{ + cdCanvasBegin(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2)); + return 0; +} + +static int cdlua5_vertex(lua_State *L) +{ + cdCanvasVertex(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3)); + return 0; +} + +static int wdlua5_vertex(lua_State *L) +{ + wdCanvasVertex(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3)); + return 0; +} + +static int cdlua5_fvertex(lua_State *L) +{ + cdfCanvasVertex(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3)); + return 0; +} + +static int cdlua5_end(lua_State *L) +{ + cdCanvasEnd(cdlua_checkcanvas(L, 1)); + return 0; +} + + +/********************************************************************************\ +* Lua Exported functions * +\********************************************************************************/ + +static const struct luaL_reg cdlib_canvas_meta[] = { + + /* Initialization */ + {"GetContext" , cdlua5_getcontext}, + {"Kill" , cdlua5_killcanvas}, + {"Activate" , cdlua5_activate}, + {"Deactivate" , cdlua5_deactivate}, + {"Simulate" , cdlua5_simulate}, + + /* Control */ + {"Clear" , cdlua5_clear}, + {"Flush" , cdlua5_flush}, + {"SaveState" , cdlua5_savestate}, + {"RestoreState" , cdlua5_restorestate}, + {"SetAttribute" , cdlua5_setattribute}, + {"GetAttribute" , cdlua5_getattribute}, + + /* Coordinate System */ + {"GetSize" , cdlua5_getcanvassize}, + {"UpdateYAxis" , cdlua5_updateyaxis}, + {"InvertYAxis" , cdlua5_invertyaxis}, + {"MM2Pixel" , cdlua5_mm2pixel}, + {"Pixel2MM" , cdlua5_pixel2mm}, + {"Origin" , cdlua5_origin}, + {"GetOrigin" , cdlua5_getorigin}, + {"fMM2Pixel" , cdlua5_fmm2pixel}, + {"fPixel2MM" , cdlua5_fpixel2mm}, + {"fOrigin" , cdlua5_forigin}, + {"fGetOrigin" , cdlua5_fgetorigin}, + {"Transform" , cdlua5_transform}, + {"GetTransform" , cdlua5_gettransform}, + {"TransformMultiply" , cdlua5_transformmultiply}, + {"TransformRotate" , cdlua5_transformrotate}, + {"TransformScale" , cdlua5_transformscale}, + {"TransformTranslate" , cdlua5_transformtranslate}, + {"TransformPoint" , cdlua5_transformpoint}, + {"fTransformPoint" , cdlua5_ftransformpoint}, + + /* World Coordinates */ + {"wWindow" , wdlua5_window}, + {"wGetWindow" , wdlua5_getwindow}, + {"wViewport" , wdlua5_viewport}, + {"wGetViewport" , wdlua5_getviewport}, + {"wWorld2Canvas" , wdlua5_world2canvas}, + {"wCanvas2World" , wdlua5_canvas2world}, + + {"wHardcopy" , wdlua5_hardcopy}, + + /* General Attributes */ + {"Foreground" , cdlua5_foreground}, + {"Background" , cdlua5_background}, + {"SetForeground" , cdlua5_setforeground}, + {"SetBackground" , cdlua5_setbackground}, + {"WriteMode" , cdlua5_writemode}, + + /* Clipping */ + {"Clip" , cdlua5_clip}, + {"ClipArea" , cdlua5_cliparea}, + {"GetClipArea" , cdlua5_getcliparea}, + {"wClipArea" , wdlua5_cliparea}, + {"wGetClipArea" , wdlua5_getcliparea}, + {"fClipArea" , cdlua5_fcliparea}, + {"fGetClipArea" , cdlua5_fgetcliparea}, + + /* Regions */ + {"RegionCombineMode" , cdlua5_regioncombinemode}, + {"IsPointInRegion" , cdlua5_pointinregion}, + {"wIsPointInRegion" , wdlua5_pointinregion}, + {"OffsetRegion" , cdlua5_offsetregion}, + {"wOffsetRegion" , wdlua5_offsetregion}, + {"GetRegionBox" , cdlua5_regionbox}, + {"wGetRegionBox" , wdlua5_regionbox}, + + /* Marks */ + {"Pixel" , cdlua5_pixel}, + {"wPixel" , wdlua5_pixel}, + {"Mark" , cdlua5_mark}, + {"wMark" , wdlua5_mark}, + {"MarkType" , cdlua5_marktype}, + {"MarkSize" , cdlua5_marksize}, + {"wMarkSize" , wdlua5_marksize}, + + /* Line */ + {"Line" , cdlua5_line}, + {"wLine" , wdlua5_line}, + {"fLine" , cdlua5_fline}, + {"Rect" , cdlua5_rect}, + {"wRect" , wdlua5_rect}, + {"fRect" , cdlua5_frect}, + {"Arc" , cdlua5_arc}, + {"wArc" , wdlua5_arc}, + {"fArc" , cdlua5_farc}, + {"LineStyle" , cdlua5_linestyle}, + {"LineStyleDashes" , cdlua5_linestyledashes}, + {"LineWidth" , cdlua5_linewidth}, + {"wLineWidth" , wdlua5_linewidth}, + {"LineJoin" , cdlua5_linejoin}, + {"LineCap" , cdlua5_linecap}, + + /* Filled Areas */ + {"Box" , cdlua5_box}, + {"wBox" , wdlua5_box}, + {"fBox" , cdlua5_fbox}, + {"Sector" , cdlua5_sector}, + {"wSector" , wdlua5_sector}, + {"fSector" , cdlua5_fsector}, + {"Chord" , cdlua5_chord}, + {"wChord" , wdlua5_chord}, + {"fChord" , cdlua5_fchord}, + {"BackOpacity" , cdlua5_backopacity}, + {"FillMode" , cdlua5_fillmode}, + {"InteriorStyle" , cdlua5_interiorstyle}, + {"Hatch" , cdlua5_hatch}, + + /* Stipple */ + {"Stipple" , cdlua5_stipple}, + {"wStipple" , wdlua5_stipple}, + {"GetStipple" , cdlua5_getstipple}, + + /* Pattern */ + {"Pattern" , cdlua5_pattern}, + {"wPattern" , wdlua5_pattern}, + {"GetPattern" , cdlua5_getpattern}, + + /* Text */ + {"Text" , cdlua5_text}, + {"wText" , wdlua5_text}, + {"fText" , cdlua5_ftext}, + {"Font" , cdlua5_font}, + {"wFont" , wdlua5_font}, + {"GetFont" , cdlua5_getfont}, + {"wGetFont" , wdlua5_getfont}, + {"NativeFont" , cdlua5_nativefont}, + {"TextAlignment" , cdlua5_textalignment}, + {"TextOrientation" , cdlua5_textorientation}, + {"GetFontDim" , cdlua5_getfontdim}, + {"wGetFontDim" , wdlua5_getfontdim}, + {"GetTextSize" , cdlua5_gettextsize}, + {"wGetTextSize" , wdlua5_gettextsize}, + {"GetTextBox" , cdlua5_gettextbox}, + {"wGetTextBox" , wdlua5_gettextbox}, + {"GetTextBounds" , cdlua5_gettextbounds}, + {"wGetTextBounds" , wdlua5_gettextbounds}, + + /* Vector Text */ + {"VectorText" , cdlua5_vectortext}, + {"wVectorText" , wdlua5_vectortext}, + {"MultiLineVectorText" , cdlua5_multilinevectortext}, + {"wMultiLineVectorText" , wdlua5_multilinevectortext}, + {"VectorTextDirection" , cdlua5_vectortextdirection}, + {"wVectorTextDirection" , wdlua5_vectortextdirection}, + {"VectorTextTransform" , cdlua5_vectortexttransform}, + {"VectorFontSize" , cdlua5_vectorfontsize}, + {"GetVectorFontSize" , cdlua5_getvectorfontsize}, + {"VectorTextSize" , cdlua5_vectortextsize}, + {"wVectorTextSize" , wdlua5_vectortextsize}, + {"VectorCharSize" , cdlua5_vectorcharsize}, + {"wVectorCharSize" , wdlua5_vectorcharsize}, + {"VectorFont" , cdlua5_vectorfont}, + {"GetVectorTextSize" , cdlua5_getvectortextsize}, + {"wGetVectorTextSize" , wdlua5_getvectortextsize}, + {"GetVectorTextBounds" , cdlua5_getvectortextbounds}, + {"wGetVectorTextBounds" , wdlua5_getvectortextbounds}, + {"GetVectorTextBox" , cdlua5_getvectortextbox}, + {"wGetVectorTextBox" , wdlua5_getvectortextbox}, + + /* Client Images */ + {"GetImageRGB" , cdlua5_getimagergb}, + {"PutImageRectRGB" , cdlua5_putimagerectrgb}, + {"wPutImageRectRGB" , wdlua5_putimagerectrgb}, + {"PutImageRectRGBA" , cdlua5_putimagerectrgba}, + {"wPutImageRectRGBA", wdlua5_putimagerectrgba}, + {"PutImageRectMap" , cdlua5_putimagerectmap}, + {"wPutImageRectMap" , wdlua5_putimagerectmap}, + {"GetBitmap" , cdlua5_getbitmap}, + {"PutBitmap" , cdlua5_putbitmap}, + {"wPutBitmap" , wdlua5_putbitmap}, + + /* Server Images */ + {"CreateImage" , cdlua5_createimage}, + {"GetImage" , cdlua5_getimage}, + {"PutImageRect" , cdlua5_putimagerect}, + {"wPutImageRect" , wdlua5_putimagerect}, + {"ScrollArea" , cdlua5_scrollarea}, + + /* Other */ + {"Play" , cdlua5_play}, + + /* Color Coding */ + {"GetColorPlanes" , cdlua5_getcolorplanes}, + + /* Palette */ + {"Palette" , cdlua5_palette}, + + /* Polygon */ + {"Begin" , cdlua5_begin}, + {"Vertex" , cdlua5_vertex}, + {"wVertex" , wdlua5_vertex}, + {"fVertex" , cdlua5_fvertex}, + {"End" , cdlua5_end}, + + {"__eq", cdluaCanvas_eq}, + {"__tostring", cdluaCanvas_tostring}, + + {NULL, NULL}, +}; + +static const struct luaL_reg cdlib_canvas[] = { + /* Initialization */ + {"CreateCanvas" , cdlua5_createcanvas}, + {"KillCanvas" , cdlua5_killcanvas}, + {"GetContext" , cdlua5_getcontext}, /* compatibility name */ + {"ImageRGB" , cdlua5_imagergb}, + {"ImageRGBBitmap" , cdlua5_imagergbbitmap}, + {NULL, NULL}, +}; + +void cdlua_open_canvas (lua_State *L) +{ + /* "cd" table is at the top of the stack */ + + /* Object Oriented Access */ + luaL_newmetatable(L, "cdCanvas"); /* create new metatable for cdCanvas handles */ + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); /* push metatable */ + lua_rawset(L, -3); /* metatable.__index = metatable */ + luaL_register(L, NULL, cdlib_canvas_meta); /* register methods */ + lua_pop(L, 1); /* removes the metatable from the top of the stack */ + + luaL_register(L, NULL, cdlib_canvas); +} diff --git a/cd/src/lua5/cdlua5ctx.c b/cd/src/lua5/cdlua5ctx.c new file mode 100755 index 0000000..e3bd19e --- /dev/null +++ b/cd/src/lua5/cdlua5ctx.c @@ -0,0 +1,802 @@ +/***************************************************************************\ +* $Id: cdlua5ctx.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ +* * +\***************************************************************************/ + +#include +#include +#include +#include + +#include "cd.h" +#include "wd.h" + +#include "cdimage.h" +#include "cdirgb.h" +#include "cddxf.h" +#include "cddgn.h" +#include "cdcgm.h" +#include "cdwmf.h" +#include "cdemf.h" +#include "cdnative.h" +#include "cdprint.h" +#include "cdclipbd.h" +#include "cdmf.h" +#include "cdps.h" +#include "cddbuf.h" +#include "cdgdiplus.h" + +#include +#include + +#include "cdlua.h" +#include "cdlua5_private.h" + + +/***************************************************************************\ +* CD_CGM. * +\***************************************************************************/ +static void *cdcgm_checkdata(lua_State * L, int param) +{ + return (void *)luaL_checkstring(L,param); +} + +static int cgm_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h); +static int cgm_countercb(cdCanvas *canvas, double percent); +static int cgm_sclmdecb(cdCanvas *canvas, short scl_mde, short *draw_mode_i, double *factor_f); +static int cgm_vdcextcb(cdCanvas *canvas, short type, void *xmn, void *ymn, void *xmx, void *ymx); +static int cgm_begpictcb(cdCanvas *canvas, char *pict); +static int cgm_begpictbcb(cdCanvas *canvas); +static int cgm_begmtfcb(cdCanvas *canvas, int *xmn, int *ymn, int *xmx, int *ymx); + +static cdluaCallback cdluacgmcb[7] = { +{ + -1, + "SIZECB", + (cdCallback)cgm_sizecb +}, +{ + -1, + "CGMCOUNTERCB", + (cdCallback)cgm_countercb +}, +{ + -1, + "CGMSCLMDECB", + (cdCallback)cgm_sclmdecb +}, +{ + -1, + "CGMVDCEXTCB", + (cdCallback)cgm_vdcextcb +}, +{ + -1, + "CGMBEGPICTCB", + (cdCallback)cgm_begpictcb +}, +{ + -1, + "CGMBEGPICTBCB", + (cdCallback)cgm_begpictbcb +}, +{ + -1, + "CGMBEGMTFCB", + (cdCallback)cgm_begmtfcb +} +}; + +static cdluaContext cdluacgmctx = +{ + 0, + "CGM", + cdContextCGM, + cdcgm_checkdata, + cdluacgmcb, + 7 +}; + +/***************************************************************************\ +* CGM CD_COUNTERCB. * +\***************************************************************************/ +static int cgm_countercb(cdCanvas *canvas, double percent) +{ + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + + lua_getref(L, cdluacgmcb[CD_CGMCOUNTERCB].lock); + + cdlua_pushcanvas(L, canvas); + lua_pushnumber(L, percent); + if(lua_pcall(L, 2, 1, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L,-1)) + luaL_error(L, "invalid return value"); + + return luaL_checkint(L,-1); +} + +/***************************************************************************\ +* CGM CD_BEGPICTCB. * +\***************************************************************************/ +static int cgm_begpictcb(cdCanvas *canvas, char *pict) +{ + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + + lua_getref(L, cdluacgmcb[CD_CGMBEGPICTCB].lock); + + cdlua_pushcanvas(L, canvas); + lua_pushstring(L, pict); + if(lua_pcall(L, 2, 1, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L,-1)) + luaL_error(L,"invalid return value"); + + return luaL_checkint(L,-1); +} + +static int cgm_begmtfcb(cdCanvas *canvas, int *xmn, int *ymn, int *xmx, int *ymx) +{ + int result_i; + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + + lua_getref(L, cdluacgmcb[CD_CGMBEGMTFCB].lock); + + cdlua_pushcanvas(L, canvas); + if(lua_pcall(L, 1, 5, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L, -5)) + luaL_error(L, "invalid return value"); + + result_i = luaL_checkint(L, -5); + if (result_i == 1) + return 1; + + if (!lua_isnumber(L, -4)) + luaL_error(L, "invalid xmn return value"); + *xmn = luaL_checkint(L, -4); + + if (!lua_isnumber(L, -3)) + luaL_error(L, "invalid ymn return value"); + *ymn = luaL_checkint(L, -3); + + if (!lua_isnumber(L, -2)) + luaL_error(L, "invalid xmx return value"); + *xmx = luaL_checkint(L, -2); + + if (!lua_isnumber(L, -1)) + luaL_error(L, "invalid ymx return value"); + *ymx = luaL_checkint(L, -1); + + return result_i; +} + +/***************************************************************************\ +* CGM CD_BEGPICTBCB. * +\***************************************************************************/ +static int cgm_begpictbcb(cdCanvas *canvas) +{ + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + + lua_getref(L, cdluacgmcb[CD_CGMBEGPICTBCB].lock); + + cdlua_pushcanvas(L, canvas); + if(lua_pcall(L, 1, 1, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L, -1)) + luaL_error(L, "invalid return value"); + + return luaL_checkint(L,-1); +} + +/***************************************************************************\ +* CGM CD_SIZECB. * +\***************************************************************************/ +static int cgm_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) +{ + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + + lua_getref(L,cdluacgmcb[CD_SIZECB].lock); + + cdlua_pushcanvas(L, canvas); + lua_pushnumber(L, w ); + lua_pushnumber(L, h ); + lua_pushnumber(L, mm_w ); + lua_pushnumber(L, mm_h ); + if(lua_pcall(L, 5, 1, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L, -1)) + luaL_error(L, "invalid return value"); + + return luaL_checkint(L,-1); +} + +/***************************************************************************\ +* CGM CD_SCLMDE. * +\***************************************************************************/ +static int cgm_sclmdecb(cdCanvas *canvas, short scl_mde, short *draw_mode_i, double *factor_f) +{ + int result_i; + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + + lua_getref(L,cdluacgmcb[CD_CGMSCLMDECB].lock); + + cdlua_pushcanvas(L, canvas); + lua_pushnumber(L, scl_mde); + if(lua_pcall(L, 2, 3, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L, -3)) + luaL_error(L, "invalid return value"); + + result_i = luaL_checkint(L, -3); + + if (result_i == 1) + return 1; + + if (!lua_isnumber(L, -2)) + luaL_error(L, "invalid draw mode return value"); + *draw_mode_i = (short) lua_tonumber(L,-2); + + if (!lua_isnumber(L, -1)) + luaL_error(L, "invalid factor return value"); + + *factor_f = (double) lua_tonumber(L, -1); + + return result_i; +} + +/***************************************************************************\ +* CGM CD_VDCEXTCB. * +\***************************************************************************/ +static int cgm_vdcextcb(cdCanvas *canvas, short type, void *xmn, void *ymn, void *xmx, void *ymx) +{ + int result_i; + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + + lua_getref(L, cdluacgmcb[CD_CGMVDCEXTCB].lock); + + cdlua_pushcanvas(L, canvas); + if(lua_pcall(L, 1, 5, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L, -5)) + luaL_error(L, "invalid return value"); + result_i = luaL_checkint(L,-5); + if (result_i == 1) + return 1; + + if (!lua_isnumber(L, -4)) + luaL_error(L, "invalid xmn return value"); + if (type == 1) *((float *) xmn) = (float) lua_tonumber(L, -4); + else *((int *) xmn) = luaL_checkint(L, -4); + + if (!lua_isnumber(L, -3)) + luaL_error(L, "invalid ymn return value"); + if (type == 1) *((float *) ymn) = (float) lua_tonumber(L, -3); + else *((int *) ymn) = luaL_checkint(L, -3); + + if (!lua_isnumber(L, -2)) + luaL_error(L,"invalid xmx return value"); + if (type == 1) *((float *) xmx) = (float) lua_tonumber(L, -2); + else *((int *) xmx) = luaL_checkint(L, -2); + + if (!lua_isnumber(L, -1)) + luaL_error(L,"invalid ymx return value"); + if (type == 1) *((float *) ymx) = (float) lua_tonumber(L, -1); + else *((int *) ymx) = (int) luaL_checkint(L, -1); + + return result_i; +} + +/***************************************************************************\ +* CD_DBUFFER. * +\***************************************************************************/ +static void *cddbuf_checkdata(lua_State * L, int param) +{ + return cdlua_checkcanvas(L, param); +} + +static cdluaContext cdluadbufctx = +{ + 0, + "DBUFFER", + cdContextDBuffer, + cddbuf_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_IMAGE. * +\***************************************************************************/ +static void *cdimage_checkdata(lua_State *L, int param) +{ + return cdlua_checkimage(L, param); +} + +static cdluaContext cdluaimagectx = +{ + 0, + "IMAGE", + cdContextImage, + cdimage_checkdata, + NULL, + 0 +}; + +static int cdlua_rawchecktype(lua_State *L, int param, const char* type) +{ + if (lua_isuserdata(L, param)) /* value is a userdata? */ + { + if (lua_getmetatable(L, param)) /* does it have a metatable? */ + { + lua_getfield(L, LUA_REGISTRYINDEX, type); /* get correct metatable */ + if (lua_rawequal(L, -1, -2)) /* does it have the correct mt? */ + { + lua_pop(L, 2); /* remove both metatables */ + return 1; + } + else + { + lua_pop(L, 2); /* remove both metatables */ + return -1; /* test for other metatables */ + } + } + } + return 0; /* do not continue */ +} + +/***************************************************************************\ +* CD_IMAGERGB. * +\***************************************************************************/ +static void *cdimagergb_checkdata(lua_State* L, int param) +{ + static char data_s[100] = ""; + + if (lua_isstring(L, param)) + { + const char* str = lua_tostring(L, param); + strcpy(data_s, str); + } + else + { + int ret = cdlua_rawchecktype(L, param, "cdBitmap"); + + if (ret == 0) + luaL_typerror(L, param, "cdBitmap"); /* not a user data and not a metatable */ + + if (ret == 1) + { + cdBitmap* *bitmap_p = (cdBitmap**)luaL_checkudata(L, param, "cdBitmap"); + if (!(*bitmap_p)) + luaL_argerror(L, param, "killed cdBitmap"); + + if ((*bitmap_p)->type != CD_RGB && (*bitmap_p)->type != CD_RGBA) + luaL_argerror(L, param, "bitmap should be of type rgb or rgba"); + + if (lua_isnoneornil(L, param+1)) + { + if ((*bitmap_p)->type == CD_RGBA) + sprintf(data_s, "%dx%d %p %p %p %p -a", (*bitmap_p)->w, (*bitmap_p)->h, + cdBitmapGetData(*bitmap_p, CD_IRED), + cdBitmapGetData(*bitmap_p, CD_IGREEN), + cdBitmapGetData(*bitmap_p, CD_IBLUE), + cdBitmapGetData(*bitmap_p, CD_IALPHA)); + else + sprintf(data_s, "%dx%d %p %p %p", (*bitmap_p)->w, (*bitmap_p)->h, + cdBitmapGetData(*bitmap_p, CD_IRED), + cdBitmapGetData(*bitmap_p, CD_IGREEN), + cdBitmapGetData(*bitmap_p, CD_IBLUE)); + } + else + { + double res_f = luaL_checknumber(L, param+1); + if ((*bitmap_p)->type == CD_RGBA) + sprintf(data_s, "%dx%d %p %p %p %p -r%g -a", (*bitmap_p)->w, (*bitmap_p)->h, + cdBitmapGetData(*bitmap_p, CD_IRED), + cdBitmapGetData(*bitmap_p, CD_IGREEN), + cdBitmapGetData(*bitmap_p, CD_IBLUE), + cdBitmapGetData(*bitmap_p, CD_IALPHA), + res_f); + else + sprintf(data_s, "%dx%d %p %p %p -r%g", (*bitmap_p)->w, (*bitmap_p)->h, + cdBitmapGetData(*bitmap_p, CD_IRED), + cdBitmapGetData(*bitmap_p, CD_IGREEN), + cdBitmapGetData(*bitmap_p, CD_IBLUE), + res_f); + } + + return data_s; + } + + ret = cdlua_rawchecktype(L, param, "cdImageRGB"); + if (ret == 1) + { + cdluaImageRGB *imagergb_p = (cdluaImageRGB*) luaL_checkudata(L, param, "cdImageRGB"); + if (!imagergb_p->red) + luaL_argerror(L, param, "killed cdImageRGB"); + + if (lua_isnoneornil(L, param+1)) + { + sprintf(data_s, "%dx%d %p %p %p", imagergb_p->width, imagergb_p->height, + imagergb_p->red, imagergb_p->green, imagergb_p->blue); + } + else + { + double res_f = luaL_checknumber(L, param+1); + sprintf(data_s, "%dx%d %p %p %p -r%g", imagergb_p->width, imagergb_p->height, + imagergb_p->red, imagergb_p->green, imagergb_p->blue, res_f); + } + + return data_s; + } + + ret = cdlua_rawchecktype(L, param, "cdImageRGBA"); + if (ret == 1) + { + cdluaImageRGBA *imagergba_p = (cdluaImageRGBA*) luaL_checkudata(L, param, "cdImageRGBA"); + if (!imagergba_p->red) + luaL_argerror(L, param, "killed cdImageRGBA"); + + if (lua_isnoneornil(L, param+1)) + { + sprintf(data_s, "%dx%d %p %p %p %p -a", imagergba_p->width, imagergba_p->height, + imagergba_p->red, imagergba_p->green, imagergba_p->blue, imagergba_p->alpha); + } + else + { + double res_f = luaL_checknumber(L, param+1); + sprintf(data_s, "%dx%d %p %p %p %p -r%g -a", imagergba_p->width, imagergba_p->height, + imagergba_p->red, imagergba_p->green, imagergba_p->blue, imagergba_p->alpha, res_f); + } + + return data_s; + } + + luaL_typerror(L, param, "cdBitmap"); /* is a metatable but it is not one of the accepted */ + } + + return data_s; +} + +static cdluaContext cdluaimagergbctx = +{ + 0, + "IMAGERGB", + cdContextImageRGB, + cdimagergb_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_DXF. * +\***************************************************************************/ +static void *cddxf_checkdata(lua_State * L, int param) +{ + return (void *)luaL_checkstring(L,param); +} + +static cdluaContext cdluadxfctx = +{ + 0, + "DXF", + cdContextDXF, + cddxf_checkdata +}; + +/***************************************************************************\ +* CD_DGN. * +\***************************************************************************/ +static void *cddgn_checkdata(lua_State * L, int param) +{ + return (void *)luaL_checkstring(L,param); +} + +static cdluaContext cdluadgnctx = +{ + 0, + "DGN", + cdContextDGN, + cddgn_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_WMF. * +\***************************************************************************/ +static void *cdwmf_checkdata(lua_State * L, int param) +{ + return (void *)luaL_checkstring(L,param); +} + +static int wmf_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h); + +static cdluaCallback cdluawmfcb[1] = +{{ + -1, + "SIZECB", + (cdCallback)wmf_sizecb +}}; + +static cdluaContext cdluawmfctx = +{ + 0, + "WMF", + cdContextWMF, + cdwmf_checkdata, + cdluawmfcb, + 1 +}; + +/***************************************************************************\ +* WMF CD_SIZECB. * +\***************************************************************************/ +static int wmf_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) +{ + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + + lua_getref(L,cdluawmfcb[CD_SIZECB].lock); + + cdlua_pushcanvas(L, canvas); + lua_pushnumber(L, w); + lua_pushnumber(L, h); + lua_pushnumber(L, mm_w); + lua_pushnumber(L, mm_h); + if(lua_pcall(L, 5, 1, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L, -1)) + luaL_error(L,"invalid return value"); + + return luaL_checkint(L,-1); +} + +/***************************************************************************\ +* CD_EMF. * +\***************************************************************************/ +static void *cdemf_checkdata(lua_State *L, int param) +{ + return (void *)luaL_checkstring(L,param); +} + +static int emf_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h); + +static cdluaCallback cdluaemfcb[1] = +{{ + -1, + "SIZECB", + (cdCallback)emf_sizecb +}}; + +static cdluaContext cdluaemfctx = +{ + 0, + "EMF", + cdContextEMF, + cdemf_checkdata, + cdluaemfcb, + 1 +}; + +/***************************************************************************\ +* EMF CD_SIZECB. * +\***************************************************************************/ +static int emf_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) +{ + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + + lua_getref(L,cdluaemfcb[CD_SIZECB].lock); + + cdlua_pushcanvas(L, canvas); + lua_pushnumber(L, w); + lua_pushnumber(L, h); + lua_pushnumber(L, mm_w); + lua_pushnumber(L, mm_h); + if(lua_pcall(L, 5, 1, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L,-1)) + luaL_error(L, "invalid return value"); + + return luaL_checkint(L,-1); +} + +/***************************************************************************\ +* CD_METAFILE. * +\***************************************************************************/ +static void *cdmetafile_checkdata(lua_State *L,int param) +{ + return (void *)luaL_checkstring(L,param); +} + +static int metafile_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h); + +static cdluaCallback cdluamfcb[1] = +{{ + -1, + "SIZECB", + (cdCallback)metafile_sizecb +}}; + +static cdluaContext cdluamfctx = +{ + 0, + "METAFILE", + cdContextMetafile, + cdmetafile_checkdata, + cdluamfcb, + 1 +}; + +/***************************************************************************\ +* METAFILE CD_SIZECB. * +\***************************************************************************/ +static int metafile_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) +{ + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + + lua_getref(L, cdluamfcb[CD_SIZECB].lock); + + cdlua_pushcanvas(L, canvas); + lua_pushnumber(L, w); + lua_pushnumber(L, h); + lua_pushnumber(L, mm_w); + lua_pushnumber(L, mm_h); + if(lua_pcall(L, 5, 1, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L, -1)) + luaL_error(L, "invalid return value"); + + return luaL_checkint(L,-1); +} + +/***************************************************************************\ +* CD_PS. * +\***************************************************************************/ +static void *cdps_checkdata( lua_State *L, int param) +{ + return (void *)luaL_checkstring(L, param); +} + +static cdluaContext cdluapsctx = +{ + 0, + "PS", + cdContextPS, + cdps_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_PRINTER. * +\***************************************************************************/ +static void *cdprinter_checkdata(lua_State *L, int param) +{ + return (void *)luaL_checkstring(L,param); +} + +static cdluaContext cdluaprinterctx = +{ + 0, + "PRINTER", + cdContextPrinter, + cdprinter_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_CLIPBOARD. * +\***************************************************************************/ +static void *cdclipboard_checkdata(lua_State *L, int param) +{ + return (void *)luaL_checkstring(L,param); +} + +static int clipboard_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h); + +static cdluaCallback cdluaclipboardcb[1] = +{{ + -1, + "SIZECB", + (cdCallback)clipboard_sizecb +}}; + +static cdluaContext cdluaclipboardctx = +{ + 0, + "CLIPBOARD", + cdContextClipboard, + cdclipboard_checkdata, + cdluaclipboardcb, + 1 +}; + +/***************************************************************************\ +* CLIPBOARD CD_SIZECB. * +\***************************************************************************/ +static int clipboard_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) +{ + /* little Wrapper */ + lua_State * L = cdlua_getplaystate(); + lua_getref(L, cdluaclipboardcb[CD_SIZECB].lock); + + cdlua_pushcanvas(L, canvas); + lua_pushnumber(L, w); + lua_pushnumber(L, h); + lua_pushnumber(L, mm_w); + lua_pushnumber(L, mm_h); + if(lua_pcall(L, 5, 1, 0) != 0) + luaL_error(L, "error running function: %s", lua_tostring(L, -1)); + + if (!lua_isnumber(L,-1)) + luaL_error(L, "invalid return value"); + + return luaL_checkint(L,-1); +} + +/***************************************************************************\ +* CD_NATIVEWINDOW. * +\***************************************************************************/ +static void *cdnativewindow_checkdata(lua_State *L, int param) +{ +#ifdef WIN32 + if (!lua_isnil(L,param) && !lua_isuserdata(L,param)) + luaL_argerror(L, param, "data should be of type userdata"); + + return lua_touserdata(L,param); +#else + return (void *)luaL_checkstring(L,param); +#endif +} + +static cdluaContext cdluanativewindowctx = +{ + 0, + "NATIVEWINDOW", + cdContextNativeWindow, + cdnativewindow_checkdata, + NULL, + 0 +}; + + +/*******************************************************************************\ +* Init all CD Drivers * +*********************************************************************************/ +void cdlua_initdrivers(lua_State * L, cdluaLuaState* cdL) +{ + cdlua_addcontext(L, cdL, &cdluaimagectx); + cdlua_addcontext(L, cdL, &cdluaimagergbctx); + cdlua_addcontext(L, cdL, &cdluadxfctx); + cdlua_addcontext(L, cdL, &cdluadgnctx); + cdlua_addcontext(L, cdL, &cdluacgmctx); + cdlua_addcontext(L, cdL, &cdluamfctx); + cdlua_addcontext(L, cdL, &cdluapsctx); + cdlua_addcontext(L, cdL, &cdluaclipboardctx); + cdlua_addcontext(L, cdL, &cdluanativewindowctx); + cdlua_addcontext(L, cdL, &cdluaprinterctx); + cdlua_addcontext(L, cdL, &cdluawmfctx); + cdlua_addcontext(L, cdL, &cdluaemfctx); + cdlua_addcontext(L, cdL, &cdluadbufctx); +} diff --git a/cd/src/lua5/cdluacontextplus5.c b/cd/src/lua5/cdluacontextplus5.c new file mode 100755 index 0000000..de69167 --- /dev/null +++ b/cd/src/lua5/cdluacontextplus5.c @@ -0,0 +1,44 @@ +/** \file + * \brief Context Plus Lua 5 Binding + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "cd.h" + +#include +#include + + +static int cdlua5_initcontextplus(lua_State *L) +{ + (void)L; + cdInitContextPlus(); + return 0; +} + +static const struct luaL_reg cdlib[] = { + {"InitContextPlus", cdlua5_initcontextplus}, + {NULL, NULL}, +}; + + +static int cdluacontextplus_open (lua_State *L) +{ + cdInitContextPlus(); + luaL_register(L, "cd", cdlib); /* leave "cd" table at the top of the stack */ + return 1; +} + +int luaopen_cdluacontextplus(lua_State* L) +{ + return cdluacontextplus_open(L); +} + +int luaopen_cdluacontextplus51(lua_State* L) +{ + return cdluacontextplus_open(L); +} diff --git a/cd/src/lua5/cdluacontextplus5.def b/cd/src/lua5/cdluacontextplus5.def new file mode 100755 index 0000000..55e478b --- /dev/null +++ b/cd/src/lua5/cdluacontextplus5.def @@ -0,0 +1,4 @@ +EXPORTS + luaopen_cdluacontextplus + luaopen_cdluacontextplus51 + \ No newline at end of file diff --git a/cd/src/lua5/cdluaim5.c b/cd/src/lua5/cdluaim5.c new file mode 100755 index 0000000..77ffc4f --- /dev/null +++ b/cd/src/lua5/cdluaim5.c @@ -0,0 +1,265 @@ +/** \file + * \brief CD+IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + */ + +#include +#include + +#define CD_NO_OLD_INTERFACE + +#include +#include + +#include "cd.h" +#include "cdirgb.h" +#include "wd.h" + +#include +#include + +#include + +#include "cdlua.h" +#include "cdlua5_private.h" + + +/*****************************************************************************\ + image:cdInitBitmap() -> cdBitmap +\*****************************************************************************/ +static int imlua_cdInitBitmap(lua_State *L) +{ + cdBitmap* bitmap; + imImage *image = imlua_checkimage(L, 1); + + if (!imImageIsBitmap(image)) + luaL_argerror(L, 1, "image is not a bitmap"); + + if (image->color_space == IM_RGB) + bitmap = cdInitBitmap(image->width, image->height, CD_RGB, image->data[0], image->data[1], image->data[2]); + else + bitmap = cdInitBitmap(image->width, image->height, CD_MAP, image->data[0], image->palette); + + if (!bitmap) + luaL_error(L, "insuficient memory to create bitmap"); + + cdlua_pushbitmap(L, bitmap); + return 1; +} + +/*****************************************************************************\ + image:cdCreateBitmap() -> cdBitmap +\*****************************************************************************/ +static int imlua_cdCreateBitmap(lua_State *L) +{ + cdBitmap* bitmap; + imImage *image = imlua_checkimage(L, 1); + + if (!imImageIsBitmap(image)) + luaL_argerror(L, 1, "image is not a bitmap"); + + if (image->color_space == IM_RGB) + bitmap = cdCreateBitmap(image->width, image->height, CD_RGB); + else + bitmap = cdCreateBitmap(image->width, image->height, CD_MAP); + + if (!bitmap) + luaL_error(L, "insuficient memory to create bitmap"); + + if (image->color_space == IM_RGB) + { + memcpy(cdBitmapGetData(bitmap, CD_IRED), image->data[0], image->plane_size); + memcpy(cdBitmapGetData(bitmap, CD_IGREEN), image->data[1], image->plane_size); + memcpy(cdBitmapGetData(bitmap, CD_IBLUE), image->data[2], image->plane_size); + } + else + { + memcpy(cdBitmapGetData(bitmap, CD_INDEX), image->data[0], image->plane_size); + memcpy(cdBitmapGetData(bitmap, CD_COLORS), image->palette, image->palette_count*sizeof(long int)); + } + + cdlua_pushbitmap(L, bitmap); + return 1; +} + +/*****************************************************************************\ + cd:imImageCreate(bitmap: cdBitmap) -> imImage +\*****************************************************************************/ +static int cdlua_imImageCreate(lua_State *L) +{ + imImage *image; + cdBitmap* bitmap = cdlua_checkbitmap(L, 1); + + if (bitmap->type == CD_RGB) + image = imImageCreate(bitmap->w, bitmap->h, IM_RGB, IM_BYTE); + else + image = imImageCreate(bitmap->w, bitmap->h, IM_MAP, IM_BYTE); + + if (!image) + luaL_error(L, "insuficient memory to create image"); + + if (bitmap->type == CD_RGB) + { + memcpy(image->data[0], cdBitmapGetData(bitmap, CD_IRED), image->plane_size); + memcpy(image->data[1], cdBitmapGetData(bitmap, CD_IGREEN), image->plane_size); + memcpy(image->data[2], cdBitmapGetData(bitmap, CD_IBLUE), image->plane_size); + } + else + { + memcpy(image->data[0], cdBitmapGetData(bitmap, CD_INDEX), image->plane_size); + memcpy(image->palette, cdBitmapGetData(bitmap, CD_COLORS), 256*sizeof(long int)); + } + + imlua_pushimage(L, image); + return 1; +} + +/*****************************************************************************\ + image:wdCanvasPutImageRect(_canvas, _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax) +\*****************************************************************************/ +static int imlua_wdCanvasPutImageRect(lua_State *L) +{ + int xr, yr, wr, hr; + imImage *image = imlua_checkimage(L, 1); + cdCanvas* canvas = cdlua_checkcanvas(L, 2); + double x = luaL_checknumber(L, 3); + double y = luaL_checknumber(L, 4); + double w = luaL_checknumber(L, 5); + double h = luaL_checknumber(L, 6); + int xmin = luaL_optint(L, 7, 0); + int xmax = luaL_optint(L, 8, 0); + int ymin = luaL_optint(L, 9, 0); + int ymax = luaL_optint(L, 10, 0); + + if (!imImageIsBitmap(image)) + luaL_argerror(L, 1, "image is not a bitmap"); + + wdCanvasWorld2Canvas(canvas, x, y, &xr, &yr); + wdCanvasWorld2CanvasSize(canvas, w, h, &wr, &hr); + + imcdCanvasPutImage(canvas, image, xr, yr, wr, hr, xmin, xmax, ymin, ymax); + return 0; +} + +/*****************************************************************************\ + image:cdCanvasPutImageRect(_canvas, _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax) +\*****************************************************************************/ +static int imlua_cdCanvasPutImageRect(lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + cdCanvas* canvas = cdlua_checkcanvas(L, 2); + int x = luaL_checkint(L, 3); + int y = luaL_checkint(L, 4); + int w = luaL_checkint(L, 5); + int h = luaL_checkint(L, 6); + int xmin = luaL_optint(L, 7, 0); + int xmax = luaL_optint(L, 8, 0); + int ymin = luaL_optint(L, 9, 0); + int ymax = luaL_optint(L, 10, 0); + + if (!imImageIsBitmap(image)) + luaL_argerror(L, 1, "image is not a bitmap"); + + imcdCanvasPutImage(canvas, image, x, y, w, h, xmin, xmax, ymin, ymax); + return 0; +} + +/***************************************************************************\ +* image:cdCanvasGetImage(_canvas, x, y: number) * +\***************************************************************************/ +static int imlua_cdCanvasGetImage(lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + cdCanvas* canvas = cdlua_checkcanvas(L, 2); + int x = luaL_optint(L, 3, 0); + int y = luaL_optint(L, 4, 0); + + if (image->color_space != IM_RGB || image->data_type != IM_BYTE) + luaL_argerror(L, 1, "image is not RGB/byte"); + + cdCanvasGetImageRGB(canvas, image->data[0], image->data[1], image->data[2], x, y, image->width, image->height); + return 0; +} + +/***************************************************************************\ +* image:cdCreateCanvas(res: number) -> cdCanvas * +\***************************************************************************/ +static int imlua_cdCreateCanvas(lua_State * L) +{ + cdCanvas**canvas_p, *canvas; + char data_s[100]; + + imImage *image = imlua_checkimage(L, 1); + + if (lua_isnoneornil(L, 2)) + { + sprintf(data_s, "%dx%d %p %p %p", image->width, image->height, + image->data[0], image->data[1], image->data[2]); + } + else + { + double res_f = luaL_checknumber(L, 2); + sprintf(data_s, "%dx%d %p %p %p -r%g", image->width, image->height, + image->data[0], image->data[1], image->data[2], res_f); + } + + canvas = cdCreateCanvas(CD_IMAGERGB, data_s); + if (!canvas) + { + lua_pushnil(L); + return 1; + } + + canvas_p = (cdCanvas**) lua_newuserdata(L, sizeof(cdCanvas*)); + luaL_getmetatable(L, "cdCanvas"); + lua_setmetatable(L, -2); + *canvas_p = canvas; + + return 1; +} + +static const luaL_reg cdim_metalib[] = { + {"imImageCreate", cdlua_imImageCreate}, + {NULL, NULL} +}; + +static const luaL_reg imcd_metalib[] = { + {"cdCreateBitmap", imlua_cdCreateBitmap}, + {"cdInitBitmap", imlua_cdInitBitmap}, + {"cdCreateCanvas", imlua_cdCreateCanvas}, + {"wdCanvasPutImageRect", imlua_wdCanvasPutImageRect}, + {"cdCanvasPutImageRect", imlua_cdCanvasPutImageRect}, + {"cdCanvasGetImage", imlua_cdCanvasGetImage}, + + {NULL, NULL} +}; + +static void createmeta (lua_State *L) +{ + /* add methods to already created metatables */ + + luaL_getmetatable(L, "imImage"); + luaL_register(L, NULL, imcd_metalib); /* register methods */ + lua_pop(L, 1); /* removes the metatable from the top of the stack */ + + luaL_getmetatable(L, "cdBitmap"); + luaL_register(L, NULL, cdim_metalib); /* register methods */ + lua_pop(L, 1); /* removes the metatable from the top of the stack */ +} + +int cdluaim_open(lua_State *L) +{ + createmeta(L); + return 0; +} + +int luaopen_cdluaim(lua_State *L) +{ + return cdluaim_open(L); +} + +int luaopen_cdluaim51(lua_State *L) +{ + return cdluaim_open(L); +} diff --git a/cd/src/lua5/cdluaim5.def b/cd/src/lua5/cdluaim5.def new file mode 100755 index 0000000..0b26928 --- /dev/null +++ b/cd/src/lua5/cdluaim5.def @@ -0,0 +1,4 @@ +EXPORTS + cdluaim_open + luaopen_cdluaim + luaopen_cdluaim51 diff --git a/cd/src/lua5/cdluapdf5.c b/cd/src/lua5/cdluapdf5.c new file mode 100755 index 0000000..eb3f221 --- /dev/null +++ b/cd/src/lua5/cdluapdf5.c @@ -0,0 +1,53 @@ +/** \file + * \brief PDF Canvas Lua 5 Binding + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "cd.h" +#include "cdpdf.h" + +#include +#include + +#include "cdlua.h" +#include "cdluapdf.h" +#include "cdlua5_private.h" + + +static void *cdpdf_checkdata(lua_State *L, int param) +{ + return (void *)luaL_checkstring(L, param); +} + +static cdluaContext cdluapdfctx = +{ + 0, + "PDF", + cdContextPDF, + cdpdf_checkdata, + NULL, + 0 +}; + +int cdluapdf_open (lua_State *L) +{ + cdluaLuaState* cdL = cdlua_getstate(L); + lua_pushliteral(L, "cd"); + lua_gettable(L, LUA_GLOBALSINDEX); /* leave "cd" table at the top of the stack */ + cdlua_addcontext(L, cdL, &cdluapdfctx); + return 1; +} + +int luaopen_cdluapdf(lua_State* L) +{ + return cdluapdf_open(L); +} + +int luaopen_cdluapdf51(lua_State* L) +{ + return cdluapdf_open(L); +} diff --git a/cd/src/lua5/cdluapdf5.def b/cd/src/lua5/cdluapdf5.def new file mode 100755 index 0000000..bfbc889 --- /dev/null +++ b/cd/src/lua5/cdluapdf5.def @@ -0,0 +1,4 @@ +EXPORTS + cdluapdf_open + luaopen_cdluapdf + luaopen_cdluapdf51 \ No newline at end of file diff --git a/cd/src/lua5/cdvoid5.c b/cd/src/lua5/cdvoid5.c new file mode 100755 index 0000000..2424e1d --- /dev/null +++ b/cd/src/lua5/cdvoid5.c @@ -0,0 +1,130 @@ +/** \file + * \brief CD Void driver for error checking while there is no active canvas + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "cd.h" +#include "cd_private.h" + +#include +#include + +#include "cdlua5_private.h" + + +struct _cdCtxCanvas +{ + cdCanvas* canvas; + lua_State * L; +}; + +void cdlua_setvoidstate(cdCanvas* canvas, lua_State * L) +{ + canvas->ctxcanvas->L = L; +} + +static void cdcreatecanvas(cdCanvas *canvas, void *data) +{ + cdCtxCanvas *ctxcanvas = (cdCtxCanvas*) malloc(sizeof(cdCtxCanvas)); + ctxcanvas->canvas = canvas; + canvas->ctxcanvas = ctxcanvas; + (void)data; +} + +static void cdkillcanvas(cdCtxCanvas* ctxcanvas) +{ + free(ctxcanvas); +} + +/***************************************************************************\ +* Echos an error if called. * +\***************************************************************************/ +static void cdvoid_error(cdCtxCanvas* ctxcanvas) +{ + luaL_error(ctxcanvas->L, "cdlua: there is no active canvas"); +} + +/***************************************************************************\ +* Dummy. * +\***************************************************************************/ +static int cdvoid_dummy(void) +{ + return CD_OK; +} + +/***************************************************************************\ +* Driver function table. * +\***************************************************************************/ + +void cdinittable(cdCanvas* canvas) +{ + /* attribute functions can not be set, because of default attributes */ + + canvas->cxClip = (int (*)(cdCtxCanvas*, int))cdvoid_error; + canvas->cxClipArea = (void (*)(cdCtxCanvas*, int, int, int, int))cdvoid_error; + canvas->cxNewRegion = (void (*)(cdCtxCanvas*))cdvoid_error; + canvas->cxIsPointInRegion = (int (*)(cdCtxCanvas*, int, int))cdvoid_error; + canvas->cxOffsetRegion = (void (*)(cdCtxCanvas*, int, int))cdvoid_error; + canvas->cxGetRegionBox = (void (*)(cdCtxCanvas*, int *, int *, int *, int *))cdvoid_error; + canvas->cxFlush = (void ( *)(cdCtxCanvas*))cdvoid_error; + canvas->cxClear = (void ( *)(cdCtxCanvas*))cdvoid_error; + canvas->cxPixel = (void ( *)(cdCtxCanvas*, int ,int ,long ))cdvoid_error; + canvas->cxLine = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ))cdvoid_error; + canvas->cxPoly = (void ( *)(cdCtxCanvas*, int ,struct _cdPoint *,int ))cdvoid_error; + canvas->cxRect = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ))cdvoid_error; + canvas->cxBox = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ))cdvoid_error; + canvas->cxArc = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ,double ,double ))cdvoid_error; + canvas->cxSector = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ,double ,double ))cdvoid_error; + canvas->cxChord = (void ( *)(cdCtxCanvas*, int ,int ,int ,int ,double ,double ))cdvoid_error; + canvas->cxText = (void (*)(cdCtxCanvas*, int ,int ,const char *))cdvoid_error; + canvas->cxGetFontDim = (void (*)(cdCtxCanvas*, int *,int *,int *,int *))cdvoid_error; + canvas->cxGetTextSize = (void (*)(cdCtxCanvas*, const char *,int *,int *))cdvoid_error; + canvas->cxPutImageRectRGB = (void (*)(cdCtxCanvas*, int ,int ,const unsigned char *,const unsigned char *,const unsigned char *,int ,int ,int ,int ,int ,int ,int ,int ))cdvoid_error; + canvas->cxPutImageRectRGBA = (void (*)(cdCtxCanvas*, int ,int ,const unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *,int ,int ,int ,int ,int ,int ,int ,int ))cdvoid_error; + canvas->cxPutImageRectMap = (void (*)(cdCtxCanvas*, int ,int ,const unsigned char *,const long *,int ,int ,int ,int ,int ,int ,int ,int ))cdvoid_error; + canvas->cxScrollArea = (void (*)(cdCtxCanvas*, int ,int ,int ,int ,int ,int ))cdvoid_error; + canvas->cxFLine = (void (*)(cdCtxCanvas*, double ,double ,double ,double ))cdvoid_error; + canvas->cxFPoly = (void (*)(cdCtxCanvas*, int , cdfPoint*,int ))cdvoid_error; + canvas->cxFRect = (void (*)(cdCtxCanvas*, double ,double ,double ,double ))cdvoid_error; + canvas->cxFBox = (void (*)(cdCtxCanvas*, double ,double ,double ,double ))cdvoid_error; + canvas->cxFArc = (void (*)(cdCtxCanvas*, double ,double ,double ,double ,double ,double ))cdvoid_error; + canvas->cxFSector = (void (*)(cdCtxCanvas*, double ,double ,double ,double ,double ,double ))cdvoid_error; + canvas->cxFText = (void (*)(cdCtxCanvas*, double ,double ,const char *))cdvoid_error; + canvas->cxStipple = (void (*)(cdCtxCanvas*, int ,int ,const unsigned char *))cdvoid_error; + canvas->cxPattern = (void (*)(cdCtxCanvas*, int ,int , const long *))cdvoid_error; + canvas->cxNativeFont = (int (*)(cdCtxCanvas*, const char*))cdvoid_error; + canvas->cxPalette = (void (*)(cdCtxCanvas*, int ,const long *,int ))cdvoid_error; + canvas->cxGetImageRGB = (void (*)(cdCtxCanvas*, unsigned char *,unsigned char *,unsigned char *,int ,int ,int ,int ))cdvoid_error; + canvas->cxCreateImage = (cdCtxImage* (*)(cdCtxCanvas*, int ,int ))cdvoid_error; + canvas->cxGetImage = (void (*)(cdCtxCanvas*, cdCtxImage*, int ,int ))cdvoid_error; + canvas->cxPutImageRect = (void (*)(cdCtxCanvas*, cdCtxImage*,int ,int ,int ,int ,int ,int ))cdvoid_error; + canvas->cxKillImage = (void (*)(cdCtxImage*))cdvoid_error; + canvas->cxFClipArea = (void (*)(cdCtxCanvas*, double,double,double,double))cdvoid_error; + + /* must not be the error callback */ + canvas->cxActivate = (int (*)(cdCtxCanvas*))cdvoid_dummy; + canvas->cxDeactivate = (void (*)(cdCtxCanvas*))cdvoid_dummy; + canvas->cxFont = (int (*)(cdCtxCanvas*, const char *, int, int))cdvoid_dummy; + + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdVoidContext = +{ + 0, + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL +}; + +cdContext* cdContextVoid(void) +{ + return &cdVoidContext; +} + diff --git a/cd/src/lua5/cdvoid5.h b/cd/src/lua5/cdvoid5.h new file mode 100755 index 0000000..75bf6e7 --- /dev/null +++ b/cd/src/lua5/cdvoid5.h @@ -0,0 +1,18 @@ +#ifndef _CD_VOID_ +#define _CD_VOID_ + +#ifdef __cplusplus +extern "C" { +#endif + +cdContext* cdContextVoid(void); +void cdlua_setvoidstate(cdCanvas* cnv, lua_State * L); + +#define CD_VOID cdContextVoid() + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef _CD_VOID_ */ + diff --git a/cd/src/make_uname b/cd/src/make_uname new file mode 100755 index 0000000..6de18ef --- /dev/null +++ b/cd/src/make_uname @@ -0,0 +1,16 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake $1 MF=cd_freetype $2 $3 $4 $5 $6 $7 $8 +tecmake $1 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=cd_pdflib $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=cdpdf $2 $3 $4 $5 $6 $7 $8 +#tecmake $1 MF=cdlua3 $2 $3 $4 $5 $6 $7 $8 +#tecmake $1 MF=cdluapdf3 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=cdlua5 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=cdluaim5 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=cdluapdf5 $2 $3 $4 $5 $6 $7 $8 + +# XRender is NOT available in AIX, IRIX and SunOS +# It is available in Linux, Darwin and FreeBSD +tecmake $1 MF=cdcontextplus $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=cdluacontextplus5 $2 $3 $4 $5 $6 $7 $8 diff --git a/cd/src/make_uname.bat b/cd/src/make_uname.bat new file mode 100755 index 0000000..70c3510 --- /dev/null +++ b/cd/src/make_uname.bat @@ -0,0 +1,57 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +if "%1"=="VC" goto gdiplus_VC +if "%1"=="vc-all" goto all-vc + +call tecmake %1 "MF=cd_freetype" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=cd_pdflib" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=cdpdf" %2 %3 %4 %5 %6 %7 %8 +REM call tecmake %1 "MF=cdlua3" %2 %3 %4 %5 %6 %7 %8 +REM call tecmake %1 "MF=cdluapdf3" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=cdlua5" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=cdluapdf5" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=cdluaim5" %2 %3 %4 %5 %6 %7 %8 + +if "%1"=="vc6" goto gdiplus +if "%1"=="vc7" goto gdiplus +if "%1"=="vc8" goto gdiplus +if "%1"=="vc8_64" goto gdiplus +if "%1"=="vc9" goto gdiplus +if "%1"=="vc9_64" goto gdiplus +if "%1"=="dll" goto gdiplus +if "%1"=="dll7" goto gdiplus +if "%1"=="dll8" goto gdiplus +if "%1"=="dll8_64" goto gdiplus +if "%1"=="dll9" goto gdiplus +if "%1"=="dll9_64" goto gdiplus +if "%1"=="all" goto all-vc +goto end + +:gdiplus +call tecmake %1 "MF=cdcontextplus" %2 %3 %4 %5 %6 +call tecmake %1 "MF=cdluacontextplus5" %2 %3 %4 %5 %6 %7 %8 +goto end + +:gdiplus_VC +call tecmake %2 "MF=cdcontextplus" %3 %4 %5 %6 +call tecmake %2 "MF=cdluacontextplus5" %3 %4 %5 %6 %7 %8 +goto end + +:all-vc +call make_uname VC vc6 %2 %3 %4 %5 %6 +call make_uname VC vc7 %2 %3 %4 %5 %6 +call make_uname VC vc8 %2 %3 %4 %5 %6 +call make_uname VC vc8_64 %2 %3 %4 %5 %6 +call make_uname VC vc9 %2 %3 %4 %5 %6 +call make_uname VC vc9_64 %2 %3 %4 %5 %6 +call make_uname VC dll %2 %3 %4 %5 %6 +call make_uname VC dll7 %2 %3 %4 %5 %6 +call make_uname VC dll8 %2 %3 %4 %5 %6 +call make_uname VC dll8_64 %2 %3 %4 %5 %6 +call make_uname VC dll9 %2 %3 %4 %5 %6 +call make_uname VC dll9_64 %2 %3 %4 %5 %6 +goto end + +:end diff --git a/cd/src/rgb2map.c b/cd/src/rgb2map.c new file mode 100755 index 0000000..fa6a3bd --- /dev/null +++ b/cd/src/rgb2map.c @@ -0,0 +1,976 @@ +/** \file + * \brief RGB2Map Conversion + * + * See Copyright Notice in cd.h + */ + + +#include +#include + +#include "cd.h" + +#define PARM(a) a +typedef unsigned char byte; +/* RANGE forces a to be in the range b..c (inclusive) */ +#define RANGE(a,b,c) { if (a < b) a = b; if (a > c) a = c; } +typedef unsigned long uu_long; +typedef unsigned short uu_short; +#define INT32 int +#define TRUE 1 +#define FALSE 0 + + +static void xvbzero(char *s, size_t len) +{ + for ( ; len>0; len--) *s++ = 0; +} + +static void xvbcopy(char *src, char *dst, size_t len) +{ + /* determine if the regions overlap + * + * 3 cases: src=dst, srcdst + * + * if src=dst, they overlap completely, but nothing needs to be moved + * if srcdst then they overlap + * if src>dst and srcdst) { /* do a backward copy */ + src = src + len - 1; + dst = dst + len - 1; + for ( ; len>0; len--, src--, dst--) *dst = *src; + } + + else { /* they either overlap (src>dst) or they don't overlap */ + /* do a forward copy */ + for ( ; len>0; len--, src++, dst++) *dst = *src; + } +} + +/****************************/ +static int quick_map(const byte *red, const byte *green, const byte *blue, int w, int h, byte *map, byte *rmap, byte *gmap, byte *bmap, int *maxcol) +{ +/* scans picture until it finds more than 'maxcol' different colors. If it +finds more than 'maxcol' colors, it returns '0'. If it DOESN'T, it does +the 24-to-8 conversion by simply sticking the colors it found into +a colormap, and changing instances of a color in pic24 into colormap + indicies (in pic8) */ + + unsigned long colors[256],col; + int i, nc, low, high, mid; + const byte *pred, *pgreen, *pblue; + byte *pix; + + /* put the first color in the table by hand */ + nc = 0; mid = 0; + + for (i=w*h,pred=red,pgreen=green,pblue=blue; i; i--) + { + col = (((uu_long) *pred++) << 16); + col += (((uu_long) *pgreen++) << 8); + col += *pblue++; + + /* binary search the 'colors' array to see if it's in there */ + low = 0; high = nc-1; + while (low <= high) + { + mid = (low+high)/2; + if (col < colors[mid]) high = mid - 1; + else if (col > colors[mid]) low = mid + 1; + else break; + } + + if (high < low) + { /* didn't find color in list, add it. */ + if (nc>=*maxcol) + return 0; + + xvbcopy((char *) &colors[low], (char *) &colors[low+1], (nc - low) * sizeof(uu_long)); + colors[low] = col; + nc++; + } + } + + /* run through the data a second time, this time mapping pixel values in + pic24 into colormap offsets into 'colors' */ + + for (i=w*h,pred=red,pgreen=green,pblue=blue, pix=map; i; i--,pix++) + { + col = (((uu_long) *pred++) << 16); + col += (((uu_long) *pgreen++) << 8); + col += *pblue++; + + /* binary search the 'colors' array. It *IS* in there */ + low = 0; high = nc-1; + while (low <= high) + { + mid = (low+high)/2; + if (col < colors[mid]) high = mid - 1; + else if (col > colors[mid]) low = mid + 1; + else break; + } + + if (high < low) + return 0; + + *pix = (unsigned char)mid; + } + + /* and load up the 'desired colormap' */ + for (i=0; i>16); + gmap[i] = (unsigned char)((colors[i]>>8) & 0xff); + bmap[i] = (unsigned char)( colors[i] & 0xff); + } + + *maxcol = nc; + + return 1; +} + + + +/***************************************************************/ +/* The following is based on jquant2.c from version 5 */ +/* of the IJG JPEG software, which is */ +/* Copyright (C) 1991-1994, Thomas G. Lane. */ +/***************************************************************/ + +#define MAXNUMCOLORS 256 /* maximum size of colormap */ + +#define C0_SCALE 2 /* scale R distances by this much */ +#define C1_SCALE 3 /* scale G distances by this much */ +#define C2_SCALE 1 /* and B by this much */ + +#define HIST_C0_BITS 5 /* bits of precision in R histogram */ +#define HIST_C1_BITS 6 /* bits of precision in G histogram */ +#define HIST_C2_BITS 5 /* bits of precision in B histogram */ + +/* Number of elements along histogram axes. */ +#define HIST_C0_ELEMS (1< 0) + { + /* get pixel value and index into the histogram */ + histp = & histogram[*red >> C0_SHIFT] [*green >> C1_SHIFT] [*blue >> C2_SHIFT]; + + /* increment, check for overflow and undo increment if so. */ + if (++(*histp) <= 0) + (*histp)--; + + red++; + green++; + blue++; + } +} + + +static boxptr find_biggest_color_pop (boxptr boxlist, int numboxes) +{ + register boxptr boxp; + register int i; + register long maxc = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->colorcount > maxc && boxp->volume > 0) { + which = boxp; + maxc = boxp->colorcount; + } + } + return which; +} + + +static boxptr find_biggest_volume (boxptr boxlist, int numboxes) +{ + register boxptr boxp; + register int i; + register INT32 maxv = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->volume > maxv) { + which = boxp; + maxv = boxp->volume; + } + } + return which; +} + + +static void update_box (boxptr boxp) +{ + hist2d * histogram = sl_histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + INT32 dist0,dist1,dist2; + long ccount; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + if (c0max > c0min) + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0min = c0min = c0; + goto have_c0min; + } + } +have_c0min: + if (c0max > c0min) + for (c0 = c0max; c0 >= c0min; c0--) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0max = c0max = c0; + goto have_c0max; + } + } +have_c0max: + if (c1max > c1min) + for (c1 = c1min; c1 <= c1max; c1++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1min = c1min = c1; + goto have_c1min; + } + } +have_c1min: + if (c1max > c1min) + for (c1 = c1max; c1 >= c1min; c1--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1max = c1max = c1; + goto have_c1max; + } + } +have_c1max: + if (c2max > c2min) + for (c2 = c2min; c2 <= c2max; c2++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2min = c2min = c2; + goto have_c2min; + } + } +have_c2min: + if (c2max > c2min) + for (c2 = c2max; c2 >= c2min; c2--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2max = c2max = c2; + goto have_c2max; + } + } +have_c2max: + + dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE; + dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE; + dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE; + boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2; + + ccount = 0; + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++, histp++) + if (*histp != 0) { + ccount++; + } + } + boxp->colorcount = ccount; +} + + +static int median_cut (boxptr boxlist, int numboxes, int desired_colors) +{ + int n,lb; + int c0,c1,c2,cmax; + register boxptr b1,b2; + + while (numboxes < desired_colors) { + /* Select box to split. + * Current algorithm: by population for first half, then by volume. + */ + if (numboxes*2 <= desired_colors) { + b1 = find_biggest_color_pop(boxlist, numboxes); + } else { + b1 = find_biggest_volume(boxlist, numboxes); + } + if (b1 == NULL) /* no splittable boxes left! */ + break; + b2 = &boxlist[numboxes]; /* where new box will go */ + /* Copy the color bounds to the new box. */ + b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; + b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; + /* Choose which axis to split the box on. + */ + c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE; + c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE; + c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE; + cmax = c1; n = 1; + if (c0 > cmax) { cmax = c0; n = 0; } + if (c2 > cmax) { n = 2; } + switch (n) { + case 0: + lb = (b1->c0max + b1->c0min) / 2; + b1->c0max = lb; + b2->c0min = lb+1; + break; + case 1: + lb = (b1->c1max + b1->c1min) / 2; + b1->c1max = lb; + b2->c1min = lb+1; + break; + case 2: + lb = (b1->c2max + b1->c2min) / 2; + b1->c2max = lb; + b2->c2min = lb+1; + break; + } + /* Update stats for boxes */ + update_box(b1); + update_box(b2); + numboxes++; + } + return numboxes; +} + + +static void compute_color (boxptr boxp, int icolor) +{ + /* Current algorithm: mean weighted by pixels (not colors) */ + /* Note it is important to get the rounding correct! */ + hist2d * histogram = sl_histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + long count; + long total = 0; + long c0total = 0; + long c1total = 0; + long c2total = 0; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) { + if ((count = *histp++) != 0) { + total += count; + c0total += ((c0 << C0_SHIFT) + ((1<>1)) * count; + c1total += ((c1 << C1_SHIFT) + ((1<>1)) * count; + c2total += ((c2 << C2_SHIFT) + ((1<>1)) * count; + } + } + } + + sl_colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total); + sl_colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total); + sl_colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total); +} + + +static void slow_select_colors (int *descolors) +/* Master routine for color selection */ +{ + box boxlist[MAXNUMCOLORS]; + int numboxes; + int i; + + /* Initialize one box containing whole space */ + numboxes = 1; + boxlist[0].c0min = 0; + boxlist[0].c0max = 255 >> C0_SHIFT; + boxlist[0].c1min = 0; + boxlist[0].c1max = 255 >> C1_SHIFT; + boxlist[0].c2min = 0; + boxlist[0].c2max = 255 >> C2_SHIFT; + /* Shrink it to actually-used volume and set its statistics */ + update_box(& boxlist[0]); + /* Perform median-cut to produce final box list */ + numboxes = median_cut(boxlist, numboxes, *descolors); + /* Compute the representative color for each box, fill colormap */ + for (i = 0; i < numboxes; i++) + compute_color(& boxlist[i], i); + sl_num_colors = numboxes; + + *descolors = sl_num_colors; +} + + +/* log2(histogram cells in update box) for each axis; this can be adjusted */ +#define BOX_C0_LOG (HIST_C0_BITS-3) +#define BOX_C1_LOG (HIST_C1_BITS-3) +#define BOX_C2_LOG (HIST_C2_BITS-3) + +#define BOX_C0_ELEMS (1<> 1; + maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT)); + centerc1 = (minc1 + maxc1) >> 1; + maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); + centerc2 = (minc2 + maxc2) >> 1; + + minmaxdist = 0x7FFFFFFFL; + + for (i = 0; i < numcolors; i++) { + /* We compute the squared-c0-distance term, then add in the other two. */ + x = sl_colormap[0][i]; + if (x < minc0) { + tdist = (x - minc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else if (x > maxc0) { + tdist = (x - maxc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + min_dist = 0; + if (x <= centerc0) { + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } + } + + x = sl_colormap[1][i]; + if (x < minc1) { + tdist = (x - minc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc1) { + tdist = (x - maxc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc1) { + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } + } + + x = sl_colormap[2][i]; + if (x < minc2) { + tdist = (x - minc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc2) { + tdist = (x - maxc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc2) { + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } + } + + mindist[i] = min_dist; /* save away the results */ + if (max_dist < minmaxdist) + minmaxdist = max_dist; + } + + ncolors = 0; + for (i = 0; i < numcolors; i++) { + if (mindist[i] <= minmaxdist) + colorlist[ncolors++] = (JSAMPLE) i; + } + return ncolors; +} + + +static void find_best_colors (int minc0, int minc1, int minc2, int numcolors, + JSAMPLE colorlist[], JSAMPLE bestcolor[]) +{ + int ic0, ic1, ic2; + int i, icolor; + register INT32 * bptr; /* pointer into bestdist[] array */ + JSAMPLE * cptr; /* pointer into bestcolor[] array */ + INT32 dist0, dist1; /* initial distance values */ + register INT32 dist2; /* current distance in inner loop */ + INT32 xx0, xx1; /* distance increments */ + register INT32 xx2; + INT32 inc0, inc1, inc2; /* initial values for increments */ + /* This array holds the distance to the nearest-so-far color for each cell */ + INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Initialize best-distance for each cell of the update box */ + bptr = bestdist; + for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) + *bptr++ = 0x7FFFFFFFL; + + /* Nominal steps between cell centers ("x" in Thomas article) */ +#define STEP_C0 ((1 << C0_SHIFT) * C0_SCALE) +#define STEP_C1 ((1 << C1_SHIFT) * C1_SCALE) +#define STEP_C2 ((1 << C2_SHIFT) * C2_SCALE) + + for (i = 0; i < numcolors; i++) { + icolor = colorlist[i]; + /* Compute (square of) distance from minc0/c1/c2 to this color */ + inc0 = (minc0 - (int) sl_colormap[0][icolor]) * C0_SCALE; + dist0 = inc0*inc0; + inc1 = (minc1 - (int) sl_colormap[1][icolor]) * C1_SCALE; + dist0 += inc1*inc1; + inc2 = (minc2 - (int) sl_colormap[2][icolor]) * C2_SCALE; + dist0 += inc2*inc2; + /* Form the initial difference increments */ + inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; + inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; + inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; + /* Now loop over all cells in box, updating distance per Thomas method */ + bptr = bestdist; + cptr = bestcolor; + xx0 = inc0; + for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) { + dist1 = dist0; + xx1 = inc1; + for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) { + dist2 = dist1; + xx2 = inc2; + for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) { + if (dist2 < *bptr) { + *bptr = dist2; + *cptr = (JSAMPLE) icolor; + } + dist2 += xx2; + xx2 += 2 * STEP_C2 * STEP_C2; + bptr++; + cptr++; + } + dist1 += xx1; + xx1 += 2 * STEP_C1 * STEP_C1; + } + dist0 += xx0; + xx0 += 2 * STEP_C0 * STEP_C0; + } + } +} + + +static void fill_inverse_cmap (int c0, int c1, int c2) +{ + hist2d * histogram = sl_histogram; + int minc0, minc1, minc2; /* lower left corner of update box */ + int ic0, ic1, ic2; + register JSAMPLE * cptr; /* pointer into bestcolor[] array */ + register histptr cachep; /* pointer into main cache array */ + /* This array lists the candidate colormap indexes. */ + JSAMPLE colorlist[MAXNUMCOLORS]; + int numcolors; /* number of candidate colors */ + /* This array holds the actually closest colormap index for each cell. */ + JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Convert cell coordinates to update box ID */ + c0 >>= BOX_C0_LOG; + c1 >>= BOX_C1_LOG; + c2 >>= BOX_C2_LOG; + + minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1); + minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1); + minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1); + + numcolors = find_nearby_colors(minc0, minc1, minc2, colorlist); + + /* Determine the actually nearest colors. */ + find_best_colors(minc0, minc1, minc2, numcolors, colorlist, bestcolor); + + /* Save the best color numbers (plus 1) in the main cache array */ + c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ + c1 <<= BOX_C1_LOG; + c2 <<= BOX_C2_LOG; + cptr = bestcolor; + for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) { + for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) { + cachep = & histogram[c0+ic0][c1+ic1][c2]; + for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { + *cachep++ = (histcell) (*cptr++ + 1); + } + } + } +} + + +static void slow_map_pixels(const byte *red, const byte *green, const byte *blue, int width, int height, byte *map) +{ + register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ + LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ + LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ + register FSERRPTR errorptr; /* => fserrors[] at column before current */ + JSAMPROW inRptr, inGptr, inBptr; /* => current input pixel */ + JSAMPROW outptr; /* => current output pixel */ + histptr cachep; + int dir; /* +1 or -1 depending on direction */ + int dir3; /* 3*dir, for advancing errorptr */ + int row, col, offset; + int *error_limit = sl_error_limiter; + JSAMPROW colormap0 = sl_colormap[0]; + JSAMPROW colormap1 = sl_colormap[1]; + JSAMPROW colormap2 = sl_colormap[2]; + hist2d * histogram = sl_histogram; + + for (row = 0; row < height; row++) + { + offset = row * width; + + inRptr = (JSAMPROW)&red[offset]; + inGptr = (JSAMPROW)&green[offset]; + inBptr = (JSAMPROW)&blue[offset]; + outptr = &map[offset]; + + if (sl_on_odd_row) + { + /* work right to left in this row */ + offset = width-1; + + inRptr += offset; /* so point to rightmost pixel */ + inGptr += offset; /* so point to rightmost pixel */ + inBptr += offset; /* so point to rightmost pixel */ + + outptr += offset; + + dir = -1; + dir3 = -3; + errorptr = sl_fserrors + (width+1)*3; /* => entry after last column */ + sl_on_odd_row = FALSE; /* flip for next time */ + } + else + { + /* work left to right in this row */ + dir = 1; + dir3 = 3; + errorptr = sl_fserrors; /* => entry before first real column */ + sl_on_odd_row = TRUE; /* flip for next time */ + } + + /* Preset error values: no error propagated to first pixel from left */ + cur0 = cur1 = cur2 = 0; + /* and no error propagated to row below yet */ + belowerr0 = belowerr1 = belowerr2 = 0; + bpreverr0 = bpreverr1 = bpreverr2 = 0; + + for (col = width; col > 0; col--) + { + cur0 = (cur0 + errorptr[dir3+0] + 8) >> 4; + cur1 = (cur1 + errorptr[dir3+1] + 8) >> 4; + cur2 = (cur2 + errorptr[dir3+2] + 8) >> 4; + + cur0 = error_limit[cur0]; + cur1 = error_limit[cur1]; + cur2 = error_limit[cur2]; + + cur0 += inRptr[0]; + cur1 += inGptr[0]; + cur2 += inBptr[0]; + + RANGE(cur0, 0, 255); + RANGE(cur1, 0, 255); + RANGE(cur2, 0, 255); + + /* Index into the cache with adjusted pixel value */ + cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; + + /* If we have not seen this color before, find nearest colormap */ + /* entry and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cur0>>C0_SHIFT, cur1>>C1_SHIFT, cur2>>C2_SHIFT); + + /* Now emit the colormap index for this cell */ + { + register int pixcode = *cachep - 1; + *outptr = (JSAMPLE) pixcode; + /* Compute representation error for this pixel */ + cur0 -= (int) colormap0[pixcode]; + cur1 -= (int) colormap1[pixcode]; + cur2 -= (int) colormap2[pixcode]; + } + + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. */ + { + register LOCFSERROR bnexterr, delta; + bnexterr = cur0; /* Process component 0 */ + delta = cur0 * 2; + cur0 += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr0 + cur0); + cur0 += delta; /* form error * 5 */ + bpreverr0 = belowerr0 + cur0; + belowerr0 = bnexterr; + cur0 += delta; /* form error * 7 */ + bnexterr = cur1; /* Process component 1 */ + delta = cur1 * 2; + cur1 += delta; /* form error * 3 */ + errorptr[1] = (FSERROR) (bpreverr1 + cur1); + cur1 += delta; /* form error * 5 */ + bpreverr1 = belowerr1 + cur1; + belowerr1 = bnexterr; + cur1 += delta; /* form error * 7 */ + bnexterr = cur2; /* Process component 2 */ + delta = cur2 * 2; + cur2 += delta; /* form error * 3 */ + errorptr[2] = (FSERROR) (bpreverr2 + cur2); + cur2 += delta; /* form error * 5 */ + bpreverr2 = belowerr2 + cur2; + belowerr2 = bnexterr; + cur2 += delta; /* form error * 7 */ + } + + /* At this point curN contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + inRptr += dir; /* Advance pixel pointers to next column */ + inGptr += dir; /* Advance pixel pointers to next column */ + inBptr += dir; /* Advance pixel pointers to next column */ + outptr += dir; + errorptr += dir3; /* advance errorptr to current column */ + } + + /* Post-loop cleanup: we must unload the final error values into the + * final fserrors[] entry. Note we need not unload belowerrN because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */ + errorptr[1] = (FSERROR) bpreverr1; + errorptr[2] = (FSERROR) bpreverr2; + } +} + + +/* Allocate and fill in the error_limiter table */ +static void init_error_limit (void) +{ + int * table; + int in, out, STEPSIZE; + + table = (int *) malloc((size_t) ((255*2+1) * sizeof(int))); + if (! table) return; + + table += 255; /* so can index -255 .. +255 */ + sl_error_limiter = table; + + STEPSIZE = ((255+1)/16); + + /* Map errors 1:1 up to +- 255/16 */ + out = 0; + for (in = 0; in < STEPSIZE; in++, out++) + { + table[in] = out; + table[-in] = -out; + } + + /* Map errors 1:2 up to +- 3*255/16 */ + for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) + { + table[in] = out; + table[-in] = -out; + } + + /* Clamp the rest to final out value (which is (255+1)/8) */ + for (; in <= 255; in++) + { + table[in] = out; + table[-in] = -out; + } +} + +void cdRGB2Map(int width, int height, const unsigned char *red, const unsigned char *green, const unsigned char *blue, unsigned char *map, int pal_size, long *colors) +{ + int i, err; + byte rm[256], gm[256], bm[256]; + int num_colors; + + if (pal_size <= 0 || pal_size > 256) + pal_size = 256; + + num_colors = pal_size; + + if (!quick_map(red, green, blue, width, height, map, rm, gm, bm, &num_colors)) + { + err = slow_quant(red, green, blue, width, height, map, rm, gm, bm, &num_colors); + if (err) + return; + } + + for (i=0; i < num_colors; i++) + *colors++ = cdEncodeColor(rm[i], gm[i], bm[i]); + + if (num_colors < pal_size) + { + for (i=num_colors; i < pal_size; i++) + *colors++ = 0; + } +} diff --git a/cd/src/sim/cd_truetype.c b/cd/src/sim/cd_truetype.c new file mode 100755 index 0000000..be0e860 --- /dev/null +++ b/cd/src/sim/cd_truetype.c @@ -0,0 +1,177 @@ +/** \file + * \brief Text and Font Simulation using FreeType library. + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include + +#include "cd_truetype.h" + +/******************************************* + Inicializa o Rasterizador +********************************************/ + +#ifdef WIN32 +#include +static int ReadStringKey(HKEY base_key, char* key_name, char* value_name, char* value) +{ + HKEY key; + DWORD max_size = 512; + + if (RegOpenKeyEx(base_key, key_name, 0, KEY_READ, &key) != ERROR_SUCCESS) + return 0; + + if (RegQueryValueEx(key, value_name, NULL, NULL, (LPBYTE)value, &max_size) != ERROR_SUCCESS) + { + RegCloseKey(key); + return 0; + } + + RegCloseKey(key); + return 1; +} + +char* GetFontDir(void) +{ + static char font_dir[512]; + if (!ReadStringKey(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Fonts", font_dir)) + return ""; + else + { + int i, size = (int)strlen(font_dir); + for(i = 0; i < size; i++) + { + if (font_dir[i] == '\\') + font_dir[i] = '/'; + } + return font_dir; + } +} +#endif + +int cdTT_load(cdTT_Text * tt_text, const char *font, int size, double xres, double yres) +{ + char filename[10240]; + FILE *file; /* usado apenas para procurar pelo arquivo */ + FT_Error error; + FT_Face face; + + /* abre arq. no dir. corrente */ + sprintf(filename, "%s.ttf", font); + file = fopen(filename, "r"); + + if (file) + fclose(file); + else + { + /* se nao conseguiu, abre arq. no dir. do cd, */ + char* env = getenv("CDDIR"); + if (env) + { + sprintf(filename, "%s/%s.ttf", env, font); + file = fopen(filename, "r"); + } + + if (file) + fclose(file); + else + { +#ifdef WIN32 + /* no caso do Windows procura no seu diretorio de fontes. */ + sprintf(filename, "%s/%s.ttf", GetFontDir(), font); + file = fopen(filename, "r"); + + if (file) + fclose(file); + else + return 0; +#else + return 0; +#endif + } + } + + error = FT_New_Face(tt_text->library, filename, 0, &face ); + if (error) + return 0; + + /* char_height is 1/64th of points */ + error = FT_Set_Char_Size(face, 0, size*64, (int)(xres*25.4), (int)(yres*25.4)); + if (error) + { + FT_Done_Face(face); + return 0; + } + + if (tt_text->face && tt_text->face != face) + FT_Done_Face(tt_text->face); + + tt_text->face = face; + + tt_text->ascent = face->size->metrics.ascender >> 6; + tt_text->descent = abs(face->size->metrics.descender >> 6); + tt_text->max_height = face->size->metrics.height >> 6; + tt_text->max_width = face->size->metrics.max_advance >> 6; + + if (!face->charmap) + FT_Set_Charmap(face, face->charmaps[0]); + + return 1; +} + +static void cdTT_checkversion(cdTT_Text* tt_text) +{ + FT_Int major, minor, patch; + FT_Library_Version(tt_text->library, &major, &minor, &patch); + if (major != FREETYPE_MAJOR || + minor != FREETYPE_MINOR || + patch != FREETYPE_PATCH) + { + printf("CD - Canvas Draw: Warning - Different FreeType library used!\n" + " Compiled = %d.%d.%d\n" + " RunTime = %d.%d.%d\n", + FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH, major, minor, patch); + } +} + +/******************************************* + Inicializaccao +********************************************/ +cdTT_Text* cdTT_create(void) +{ + cdTT_Text * tt_text = malloc(sizeof(cdTT_Text)); + memset(tt_text, 0, sizeof(cdTT_Text)); + + FT_Init_FreeType(&tt_text->library); + + cdTT_checkversion(tt_text); + + return tt_text; +} + +/******************************************* + Desaloca Recursos +********************************************/ +void cdTT_free(cdTT_Text * tt_text) +{ + if (tt_text->rgba_data) + free(tt_text->rgba_data); + + if (tt_text->face) + FT_Done_Face(tt_text->face); + + FT_Done_FreeType(tt_text->library); + + free(tt_text); +} + +#ifdef SunOS_OLD +void *memmove( void *dest, const void *src, size_t count ) +{ + return memcpy(dest, src, count); +} +#endif diff --git a/cd/src/sim/cd_truetype.h b/cd/src/sim/cd_truetype.h new file mode 100755 index 0000000..f29fb82 --- /dev/null +++ b/cd/src/sim/cd_truetype.h @@ -0,0 +1,46 @@ +/** \file + * \brief Text and Font Simulation using FreeType library. + * + * See Copyright Notice in cd.h + */ + +#ifndef __TRUETYPE_H +#define __TRUETYPE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "ft2build.h" +#include FT_FREETYPE_H + +/* + In CD version 4.4 we start to use FreeType 2. + Only TrueType font support is enabled. +*/ + +typedef struct _cdTT_Text +{ + FT_Library library; + FT_Face face; + + unsigned char* rgba_data; /* the image where one character is drawn with the foreground color during text output */ + int rgba_data_size; + + int max_height; + int max_width; + int descent; + int ascent; + +}cdTT_Text; + +cdTT_Text* cdTT_create(void); +void cdTT_free(cdTT_Text * tt_text); +int cdTT_load(cdTT_Text * tt_text, const char *font,int size, double xres, double yres); + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef _CD_TRUETYPE_ */ + diff --git a/cd/src/sim/cdfontex.c b/cd/src/sim/cdfontex.c new file mode 100755 index 0000000..bafa5e7 --- /dev/null +++ b/cd/src/sim/cdfontex.c @@ -0,0 +1,646 @@ +/** \file + * \brief Font Properties Estimation + * + * See Copyright Notice in cd.h + */ + + +#include "cd.h" +#include "cd_private.h" +#include +#include + +typedef struct _cd_font_styles +{ + unsigned char s[4]; +}cd_font_styles; + +static cd_font_styles helv[256] = { +{0, 0, 0, 0}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{30, 30, 30, 30}, +{30, 30, 30, 35}, +{35, 50, 35, 50}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{90, 85, 90, 90}, +{70, 75, 70, 75}, +{20, 25, 20, 25}, +{35, 35, 35, 35}, +{35, 35, 35, 35}, +{40, 40, 40, 40}, +{60, 60, 60, 60}, +{30, 30, 30, 30}, +{35, 35, 35, 35}, +{30, 30, 30, 30}, +{30, 30, 30, 30}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{30, 35, 30, 35}, +{30, 35, 30, 35}, +{60, 60, 60, 60}, +{60, 60, 60, 60}, +{60, 60, 60, 60}, +{55, 65, 55, 60}, +{100, 100, 100, 100}, +{65, 70, 70, 75}, +{70, 70, 70, 70}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{70, 65, 70, 70}, +{60, 60, 65, 65}, +{80, 80, 80, 80}, +{70, 70, 75, 75}, +{25, 30, 30, 30}, +{50, 55, 55, 55}, +{70, 75, 70, 75}, +{55, 65, 55, 65}, +{80, 85, 85, 90}, +{70, 70, 75, 75}, +{80, 80, 80, 80}, +{65, 70, 70, 70}, +{80, 80, 80, 80}, +{75, 70, 75, 75}, +{70, 70, 70, 70}, +{60, 65, 65, 65}, +{70, 70, 75, 75}, +{65, 70, 70, 70}, +{100, 95, 100, 95}, +{65, 70, 70, 70}, +{65, 65, 70, 65}, +{60, 60, 65, 65}, +{30, 35, 30, 35}, +{30, 30, 30, 30}, +{30, 35, 30, 35}, +{45, 60, 50, 60}, +{55, 55, 55, 55}, +{35, 35, 35, 35}, +{55, 60, 55, 60}, +{55, 65, 60, 65}, +{55, 55, 55, 55}, +{55, 65, 55, 60}, +{55, 60, 55, 55}, +{30, 35, 30, 35}, +{55, 65, 55, 60}, +{55, 65, 55, 65}, +{25, 30, 25, 30}, +{25, 30, 25, 30}, +{50, 60, 55, 60}, +{25, 30, 25, 30}, +{85, 90, 85, 90}, +{55, 65, 55, 65}, +{55, 65, 55, 65}, +{55, 65, 55, 60}, +{55, 65, 55, 65}, +{35, 40, 35, 40}, +{55, 55, 55, 55}, +{30, 35, 30, 35}, +{55, 65, 55, 60}, +{50, 55, 50, 55}, +{75, 80, 70, 80}, +{50, 60, 50, 55}, +{50, 55, 50, 55}, +{50, 55, 50, 50}, +{35, 40, 35, 40}, +{25, 30, 25, 30}, +{35, 40, 35, 40}, +{60, 60, 60, 60}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{25, 30, 25, 30}, +{55, 55, 55, 55}, +{35, 55, 30, 55}, +{100, 100, 100, 100}, +{55, 55, 55, 55}, +{55, 55, 55, 55}, +{35, 35, 35, 35}, +{100, 105, 100, 100}, +{70, 70, 70, 70}, +{35, 35, 35, 35}, +{100, 105, 100, 100}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{25, 30, 20, 30}, +{25, 30, 20, 30}, +{35, 55, 35, 55}, +{35, 55, 30, 55}, +{35, 35, 35, 35}, +{55, 55, 55, 55}, +{100, 100, 100, 100}, +{30, 35, 30, 35}, +{100, 100, 100, 100}, +{55, 55, 55, 55}, +{35, 35, 35, 35}, +{95, 95, 95, 95}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{65, 65, 70, 65}, +{30, 30, 30, 30}, +{30, 30, 35, 35}, +{55, 55, 55, 60}, +{55, 55, 55, 55}, +{60, 55, 60, 55}, +{55, 55, 55, 55}, +{25, 30, 25, 30}, +{55, 55, 55, 55}, +{35, 35, 35, 35}, +{75, 75, 75, 80}, +{35, 40, 40, 40}, +{55, 55, 55, 55}, +{60, 60, 60, 60}, +{35, 35, 35, 35}, +{75, 75, 75, 80}, +{55, 55, 55, 55}, +{40, 40, 40, 40}, +{55, 55, 55, 60}, +{35, 35, 35, 35}, +{35, 35, 35, 35}, +{35, 35, 35, 35}, +{60, 60, 55, 60}, +{55, 55, 55, 55}, +{30, 30, 30, 30}, +{35, 35, 35, 35}, +{35, 35, 35, 35}, +{40, 40, 40, 40}, +{55, 55, 55, 55}, +{85, 85, 85, 85}, +{85, 85, 85, 85}, +{85, 85, 85, 85}, +{60, 65, 65, 60}, +{65, 70, 70, 75}, +{65, 70, 70, 75}, +{65, 70, 70, 75}, +{65, 70, 70, 75}, +{65, 70, 70, 75}, +{65, 70, 70, 75}, +{100, 100, 100, 100}, +{75, 75, 75, 75}, +{70, 65, 70, 70}, +{70, 65, 70, 70}, +{70, 65, 70, 70}, +{70, 65, 70, 70}, +{25, 30, 30, 30}, +{25, 30, 30, 30}, +{25, 30, 30, 30}, +{25, 30, 30, 30}, +{75, 75, 75, 75}, +{70, 70, 75, 75}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{60, 60, 60, 60}, +{80, 80, 80, 80}, +{70, 70, 75, 75}, +{70, 70, 75, 75}, +{70, 70, 75, 75}, +{70, 70, 75, 75}, +{65, 65, 70, 65}, +{70, 70, 70, 70}, +{65, 65, 65, 65}, +{55, 60, 55, 60}, +{55, 60, 55, 60}, +{55, 60, 55, 60}, +{55, 60, 55, 60}, +{55, 60, 55, 60}, +{55, 60, 55, 60}, +{90, 90, 90, 90}, +{55, 55, 55, 55}, +{55, 60, 55, 55}, +{55, 60, 55, 55}, +{55, 60, 55, 55}, +{55, 60, 55, 55}, +{25, 30, 25, 30}, +{25, 30, 25, 30}, +{25, 30, 25, 30}, +{25, 30, 25, 30}, +{55, 65, 55, 60}, +{55, 65, 55, 65}, +{55, 65, 55, 65}, +{55, 65, 55, 65}, +{55, 65, 55, 65}, +{55, 65, 55, 65}, +{55, 65, 55, 65}, +{55, 55, 55, 55}, +{60, 65, 65, 60}, +{55, 65, 55, 60}, +{55, 65, 55, 60}, +{55, 65, 55, 60}, +{55, 65, 55, 60}, +{50, 55, 50, 55}, +{55, 65, 55, 65}, +{50, 55, 50, 55} +}; + +static cd_font_styles times[256] = { +{0, 0, 0, 0}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{25, 25, 25, 25}, +{35, 35, 30, 35}, +{40, 55, 45, 55}, +{55, 55, 55, 50}, +{50, 55, 55, 55}, +{85, 100, 85, 85}, +{80, 85, 75, 80}, +{20, 30, 25, 30}, +{35, 35, 35, 35}, +{35, 35, 35, 35}, +{50, 55, 55, 55}, +{60, 60, 70, 60}, +{25, 25, 25, 25}, +{35, 35, 35, 35}, +{25, 25, 25, 25}, +{30, 30, 30, 30}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{25, 35, 35, 35}, +{30, 35, 35, 35}, +{60, 60, 70, 60}, +{60, 60, 70, 60}, +{60, 60, 70, 60}, +{45, 55, 55, 55}, +{95, 95, 95, 85}, +{70, 70, 60, 70}, +{65, 70, 65, 70}, +{70, 75, 70, 70}, +{75, 75, 75, 75}, +{60, 65, 65, 70}, +{55, 60, 60, 70}, +{70, 80, 75, 75}, +{75, 80, 75, 80}, +{35, 40, 35, 40}, +{40, 55, 45, 50}, +{75, 80, 65, 70}, +{60, 65, 55, 65}, +{90, 95, 85, 90}, +{75, 75, 70, 75}, +{75, 80, 75, 75}, +{60, 65, 60, 65}, +{75, 80, 75, 75}, +{65, 75, 65, 70}, +{55, 60, 55, 55}, +{65, 65, 55, 65}, +{70, 70, 75, 75}, +{70, 70, 60, 65}, +{95, 100, 80, 90}, +{70, 70, 65, 70}, +{70, 70, 55, 65}, +{60, 65, 55, 65}, +{35, 35, 40, 35}, +{30, 30, 30, 30}, +{35, 35, 45, 35}, +{45, 60, 45, 60}, +{55, 55, 55, 55}, +{35, 35, 35, 35}, +{45, 50, 55, 55}, +{50, 55, 55, 50}, +{45, 45, 45, 45}, +{50, 55, 55, 55}, +{45, 50, 45, 45}, +{35, 35, 30, 35}, +{50, 55, 55, 50}, +{50, 55, 55, 55}, +{25, 30, 30, 30}, +{25, 35, 30, 30}, +{50, 55, 50, 55}, +{25, 30, 30, 30}, +{75, 85, 75, 80}, +{50, 55, 55, 55}, +{50, 50, 55, 50}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{35, 45, 40, 40}, +{40, 40, 40, 40}, +{30, 35, 30, 30}, +{50, 55, 55, 55}, +{50, 50, 45, 45}, +{70, 70, 65, 70}, +{50, 50, 45, 55}, +{50, 50, 45, 45}, +{45, 45, 40, 40}, +{50, 40, 40, 35}, +{20, 25, 30, 25}, +{50, 40, 40, 35}, +{55, 55, 55, 60}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{35, 35, 35, 35}, +{50, 55, 50, 55}, +{45, 55, 55, 55}, +{100, 100, 90, 100}, +{50, 50, 55, 55}, +{50, 55, 55, 55}, +{35, 35, 35, 35}, +{100, 100, 100, 105}, +{55, 60, 55, 55}, +{35, 35, 35, 35}, +{90, 100, 95, 95}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{35, 35, 35, 35}, +{35, 35, 35, 35}, +{45, 55, 55, 55}, +{45, 55, 55, 55}, +{35, 40, 35, 35}, +{55, 55, 55, 55}, +{100, 100, 90, 100}, +{35, 35, 35, 35}, +{100, 105, 100, 100}, +{40, 40, 40, 40}, +{35, 35, 35, 35}, +{75, 75, 70, 75}, +{80, 80, 80, 80}, +{80, 80, 80, 80}, +{70, 70, 55, 65}, +{25, 25, 25, 25}, +{35, 30, 40, 35}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{55, 55, 50, 50}, +{55, 55, 55, 55}, +{20, 25, 30, 25}, +{50, 55, 55, 55}, +{35, 40, 30, 35}, +{75, 75, 75, 75}, +{30, 30, 30, 30}, +{50, 55, 55, 55}, +{60, 60, 70, 60}, +{35, 35, 35, 35}, +{75, 75, 80, 75}, +{55, 55, 55, 55}, +{40, 40, 40, 40}, +{55, 55, 55, 55}, +{30, 30, 30, 30}, +{30, 30, 30, 30}, +{30, 35, 35, 35}, +{55, 60, 60, 60}, +{45, 55, 55, 55}, +{25, 25, 25, 25}, +{30, 35, 35, 35}, +{30, 30, 30, 30}, +{30, 35, 35, 30}, +{50, 55, 55, 55}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{75, 75, 75, 75}, +{45, 55, 50, 55}, +{70, 70, 60, 70}, +{70, 70, 60, 70}, +{70, 70, 60, 70}, +{70, 70, 60, 70}, +{70, 70, 60, 70}, +{70, 70, 60, 70}, +{90, 100, 90, 95}, +{70, 75, 70, 70}, +{60, 65, 65, 70}, +{60, 65, 65, 70}, +{60, 65, 65, 70}, +{60, 65, 65, 70}, +{35, 40, 35, 40}, +{35, 40, 35, 40}, +{35, 40, 35, 40}, +{35, 40, 35, 40}, +{75, 75, 75, 75}, +{75, 75, 70, 75}, +{75, 80, 75, 75}, +{75, 80, 75, 75}, +{75, 80, 75, 75}, +{75, 80, 75, 75}, +{75, 80, 75, 75}, +{60, 60, 70, 60}, +{75, 80, 75, 75}, +{75, 70, 75, 75}, +{75, 70, 75, 75}, +{75, 70, 75, 75}, +{75, 70, 75, 75}, +{70, 70, 55, 65}, +{60, 65, 65, 65}, +{50, 55, 55, 55}, +{45, 50, 55, 55}, +{45, 50, 55, 55}, +{45, 50, 55, 55}, +{45, 50, 55, 55}, +{45, 50, 55, 55}, +{45, 50, 55, 55}, +{70, 75, 70, 75}, +{45, 45, 45, 45}, +{45, 50, 45, 45}, +{45, 50, 45, 45}, +{45, 50, 45, 45}, +{45, 50, 45, 45}, +{30, 30, 30, 30}, +{30, 30, 30, 30}, +{30, 30, 30, 30}, +{30, 30, 30, 30}, +{55, 50, 55, 55}, +{50, 55, 55, 55}, +{50, 50, 55, 50}, +{50, 50, 55, 50}, +{50, 50, 55, 50}, +{50, 50, 55, 50}, +{50, 50, 55, 50}, +{55, 55, 55, 55}, +{55, 50, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 55, 55, 55}, +{50, 50, 45, 45}, +{55, 55, 50, 50}, +{50, 50, 45, 45} +}; + + +typedef struct _cdFontType +{ + int max_width, line_height, ascent, descent, style, size; + double sizex; + int (*CharWidth)(char c); +}cdFontType; + + +static cdFontType font; + + +static int CharWidthCourier(char c) +{ + (void)c; + return (int)(0.60 * font.sizex + 0.5); +} + + +static int CharWidthTimesRoman(char c) +{ + return (int)(times[(int)c].s[font.style] * font.sizex / 100 + 0.5); +} + + +static int CharWidthHelvetica(char c) +{ + return (int)(helv[(int)c].s[font.style] * font.sizex / 100 + 0.5); +} + + +static void cdFontEx(cdCanvas* canvas, const char* type_face, int style, int size) +{ + double mm_dx, mm_dy; + double sizey, sizex; + + font.style = style; + + if (size < 0) + { + double size_mm; + cdCanvasPixel2MM(canvas, -size, 0, &size_mm, NULL); + size = (int)(size_mm * CD_MM2PT + 0.5); + } + + font.size = size; + + cdCanvasPixel2MM(canvas, 1, 1, &mm_dx, &mm_dy); + + sizey = ((25.4 / 72) / mm_dy) * size; + sizex = ((25.4 / 72) / mm_dx) * size; + + font.sizex = sizex; + + font.line_height = (int)(1.2 * sizey + 0.5); + font.ascent = (int)(0.75 * font.line_height + 0.5); + font.descent = (int)(0.20 * font.line_height + 0.5); + + if (strcmp(type_face, "Times")==0) + { + if (style == CD_PLAIN || style == CD_BOLD) + font.max_width = (int)(1.05 * sizex + 0.5); + else + font.max_width = (int)(1.15 * sizex + 0.5); + + font.CharWidth = CharWidthTimesRoman; + } + else if (strcmp(type_face, "Helvetica")==0) + { + if (style == CD_PLAIN || style == CD_BOLD) + font.max_width = (int)(1.05 * sizex + 0.5); + else + font.max_width = (int)(1.15 * sizex + 0.5); + + font.CharWidth = CharWidthHelvetica; + } + else + { + if (style == CD_PLAIN || style == CD_ITALIC) + font.max_width = (int)(0.65 * sizex + 0.5); + else + font.max_width = (int)(0.80 * sizex + 0.5); + + font.CharWidth = CharWidthCourier; + } +} + +void cdgetfontdimEX(cdCtxCanvas* ctxcanvas, int *max_width, int *line_height, int *ascent, int *descent) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + cdFontEx(canvas, canvas->font_type_face, canvas->font_style, canvas->font_size); + if (line_height) *line_height = font.line_height; + if (max_width) *max_width = font.max_width; + if (ascent) *ascent = font.ascent; + if (descent) *descent = font.descent; +} + +void cdgettextsizeEX(cdCtxCanvas* ctxcanvas, const char *s, int len, int *width, int *height) +{ + int i = 0, w = 0; + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + cdFontEx(canvas, canvas->font_type_face, canvas->font_style, canvas->font_size); + while (i < len) + { + w += font.CharWidth(s[i]); + i++; + } + + if (height) *height = font.line_height; + if (width) *width = w; +} diff --git a/cd/src/sim/sim.c b/cd/src/sim/sim.c new file mode 100755 index 0000000..349624a --- /dev/null +++ b/cd/src/sim/sim.c @@ -0,0 +1,326 @@ +/** \file + * \brief Simulation Base Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" +#include "cd_truetype.h" +#include "sim.h" + + +static unsigned char SimHatchBits[6][8] = { /* [style][y] (8x8) */ + {0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00}, /* CD_HORIZONTAL */ + {0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, /* CD_VERTICAL */ + {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}, /* CD_BDIAGONAL */ + {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01}, /* CD_FDIAGONAL */ + {0x10, 0x10, 0x10, 0xFF, 0x10, 0x10, 0x10, 0x10}, /* CD_CROSS */ + {0x81, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x81}};/* CD_DIAGCROSS */ + +#define CalcYPat(y, h) (canvas->invert_yaxis? h-1-(y%h): y%h) +#define CalcYHatch(y, h) (canvas->invert_yaxis? h-(y&h): y&h) + +void simFillDrawAAPixel(cdCanvas *canvas, int x, int y, unsigned short alpha_weigth) +{ + unsigned char aa_alpha; + long color, aa_color; + + switch(canvas->interior_style) + { + default: /* CD_SOLID */ + { + color = canvas->foreground; + break; + } + case CD_PATTERN: + { + long *pattern = canvas->pattern; + int yp = CalcYPat(y, canvas->pattern_h); + int xp = x % canvas->pattern_w; + color = pattern[canvas->pattern_w*yp + xp]; + break; + } + case CD_HATCH: + { + unsigned char hatch = SimHatchBits[canvas->hatch_style][CalcYHatch(y, 7)]; + unsigned char n = (unsigned char)(x&7); + simRotateHatchN(hatch, n); + if (hatch & 0x80) + color = canvas->foreground; + else if (canvas->back_opacity == CD_OPAQUE) + color = canvas->background; + else + return; + break; + } + case CD_STIPPLE: + { + unsigned char *stipple = canvas->stipple; + int yp = CalcYPat(y, canvas->stipple_h); + int xp = x % canvas->stipple_w; + if(stipple[canvas->stipple_w*yp + xp]) + color = canvas->foreground; + else if (canvas->back_opacity == CD_OPAQUE) + color = canvas->background; + else + return; + break; + } + } + + aa_alpha = (unsigned char)((alpha_weigth * cdAlpha(color)) / 255); + aa_color = cdEncodeAlpha(color, aa_alpha); + canvas->cxPixel(canvas->ctxcanvas, x, y, aa_color); +} + +void simFillHorizLine(cdSimulation* simulation, int xmin, int y, int xmax) +{ + cdCanvas* canvas = simulation->canvas; + + if(xmin > xmax) + _cdSwapInt(xmin, xmax); + + switch(canvas->interior_style) + { + case CD_SOLID: + simulation->SolidLine(canvas, xmin,y,xmax); + break; + case CD_PATTERN: + simulation->PatternLine(canvas, xmin,xmax,y,canvas->pattern_w, + canvas->pattern + + canvas->pattern_w*CalcYPat(y, canvas->pattern_h)); + break; + case CD_HATCH: + simulation->HatchLine(canvas, xmin,xmax,y,SimHatchBits[canvas->hatch_style][CalcYHatch(y, 7)]); + break; + case CD_STIPPLE: + simulation->StippleLine(canvas, xmin, xmax, y, + canvas->stipple_w, + canvas->stipple + + canvas->stipple_w*CalcYPat(y, canvas->stipple_h)); + } +} + +static void simSolidLine(cdCanvas* canvas, int xmin, int y, int xmax) +{ + /* cdpolySIM and cdboxSIM will set line attributes so this can work */ + canvas->cxLine(canvas->ctxcanvas, xmin, y, xmax, y); +} + +static void simPatternLine(cdCanvas* canvas, int xmin, int xmax, int y, int pw, const long *pattern) +{ + cdSimulation* simulation = canvas->simulation; + int x,i; + int xb; + long curColor, old_color; + + i = xmin % pw; + + old_color = canvas->foreground; + + for (x = xmin; x <= xmax;) + { + if (i == pw) + i = 0; + + curColor=pattern[i]; + xb=x; + + while(pattern[i]==curColor && (x <= xmax)) + { + i++; + if (i == pw) + i = 0; + x++; + } + + if(xb==x-1) + canvas->cxPixel(canvas->ctxcanvas, xb,y,curColor); + else + { + cdCanvasSetForeground(canvas, curColor); + simulation->SolidLine(canvas, xb,y,x-1); + } + } + + cdCanvasSetForeground(canvas, old_color); +} + +static void simStippleLine(cdCanvas* canvas, int xmin, int xmax, int y, int pw, const unsigned char *stipple) +{ + cdSimulation* simulation = canvas->simulation; + int x,xb,i; + long fgColor,bgColor; + int opacity; + int curCase; + + fgColor = canvas->foreground; + opacity=canvas->back_opacity; + + if(opacity==CD_OPAQUE) + { + bgColor=canvas->background; + cdCanvasSetForeground(canvas, fgColor); + for (x = xmin, i=xmin%pw ; x <= xmax;) + { + if(i==pw) + i=0; + xb=x; + curCase=stipple[i]; + while (stipple[i]==curCase && (x<=xmax)) + { + x++; + i++; + if(i==pw) + i=0; + } + if (curCase) + { + if(xb==x-1) + canvas->cxPixel(canvas->ctxcanvas, xb,y,fgColor); + else + simulation->SolidLine(canvas, xb,y,x-1); + } + } + cdCanvasSetForeground(canvas, bgColor); + for (x = xmin, i=xmin%pw ; x <= xmax;) + { + if(i==pw) + i=0; + xb=x; + curCase=stipple[i]; + while (stipple[i]==curCase && (x<=xmax)) + { + x++; + i++; + if(i==pw) + i=0; + } + if (!curCase) + { + if(xb==x-1) + canvas->cxPixel(canvas->ctxcanvas, xb,y,bgColor); + else + simulation->SolidLine(canvas, xb,y,x-1); + } + } + } + else + { + cdCanvasSetForeground(canvas, fgColor); + for (x = xmin,i=xmin%pw; x <= xmax;) + { + xb=x; + curCase=stipple[i]; + while (stipple[i]==curCase && (x<=xmax)) + { + i++; + x++; + if(i==pw) + i=0; + } + if(curCase) + { + if(xb==x-1) + canvas->cxPixel(canvas->ctxcanvas, xb,y,fgColor); + else + simulation->SolidLine(canvas, xb,y,x-1); + } + } + } + cdCanvasSetForeground(canvas, fgColor); +} + +static void simHatchLine(cdCanvas* canvas, int xmin, int xmax, int y, unsigned char hatch) +{ + cdSimulation* simulation = canvas->simulation; + int x,xb; + int opacity, mask; + unsigned char startp, n; + long curColor, fgColor, bgColor; + + n = (unsigned char)(xmin&7); + simRotateHatchN(hatch,n); + fgColor=canvas->foreground; + opacity=canvas->back_opacity; + + if(opacity==CD_OPAQUE) + { + bgColor=canvas->background; + for (x = xmin; x <= xmax; x++) + { + curColor=(hatch&0x80)?fgColor:bgColor; + + xb=x; + startp = hatch&0x80? 1: 0; + _cdRotateHatch(hatch); + while (startp == (hatch&0x80? 1: 0) && x <= xmax) + { + x++; + _cdRotateHatch(hatch); + } + + if(xb==x) + canvas->cxPixel(canvas->ctxcanvas, xb,y,curColor); + else + { + cdCanvasSetForeground(canvas, curColor); + simulation->SolidLine(canvas, xb,y,x); + } + } + } + else + { + cdCanvasSetForeground(canvas, fgColor); + for (x = xmin; x <= xmax; x++) + { + mask=(hatch&0x80)?1:0; + + xb=x; + startp = hatch&0x80? 1: 0; + _cdRotateHatch(hatch); + while (startp == (hatch&0x80? 1: 0) && x <= xmax) + { + x++; + _cdRotateHatch(hatch); + } + + if(mask) + { + if(xb==x) + canvas->cxPixel(canvas->ctxcanvas, xb,y,fgColor); + else + simulation->SolidLine(canvas, xb,y,x); + } + } + } + + cdCanvasSetForeground(canvas, fgColor); +} + +cdSimulation* cdCreateSimulation(cdCanvas* canvas) +{ + cdSimulation* simulation = (cdSimulation*)malloc(sizeof(cdSimulation)); + memset(simulation, 0, sizeof(cdSimulation)); + + simulation->canvas = canvas; + + simulation->SolidLine = simSolidLine; + simulation->PatternLine = simPatternLine; + simulation->StippleLine = simStippleLine; + simulation->HatchLine = simHatchLine; + + return simulation; +} + +void cdKillSimulation(cdSimulation* simulation) +{ + memset(simulation, 0, sizeof(cdSimulation)); + free(simulation); +} diff --git a/cd/src/sim/sim.h b/cd/src/sim/sim.h new file mode 100755 index 0000000..fec3ce6 --- /dev/null +++ b/cd/src/sim/sim.h @@ -0,0 +1,55 @@ +/** \file + * \brief Simulation Base Driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __SIM_H +#define __SIM_H + + +struct _cdSimulation +{ + int antialias; + + cdCanvas *canvas; + + const char* font_map[100]; + int font_map_n; + + /* horizontal line draw functions */ + void (*SolidLine)(cdCanvas* canvas, int xmin, int y, int xmax); + void (*PatternLine)(cdCanvas* canvas, int xmin, int xmax, int y, int pw, const long *pattern); + void (*StippleLine)(cdCanvas* canvas, int xmin, int xmax, int y, int pw, const unsigned char *stipple); + void (*HatchLine)(cdCanvas* canvas, int xmin, int xmax, int y, unsigned char hatch); +}; + +#define simRotateHatchN(_x,_n) ((_x) = ((_x) << (_n)) | ((_x) >> (8-(_n)))) + +void simFillDrawAAPixel(cdCanvas *canvas, int x, int y, unsigned short alpha_weigth); +void simFillHorizLine(cdSimulation* simulation, int xmin, int y, int xmax); +int simIsPointInPolyWind(cdPoint* poly, int n, int x, int y); + +/* list of non-horizontal line segments */ +typedef struct _simLineSegment +{ + int x1, y1; /* always y1 < y2 */ + int x2, y2; /* (x2,y2) is not included in the segment to avoid duplicated intersections */ + int x; /* incremental x from x2 to x1 */ + int DeltaX, DeltaY, XDir; + unsigned short ErrorInc, ErrorAcc; +} simLineSegment; + +void simAddSegment(simLineSegment* segment, int x1, int y1, int x2, int y2, int *y_max, int *y_min); +int simSegmentInc(simLineSegment* segment, cdCanvas* canvas, int y); + +void simPolyFill(cdSimulation* simulation, cdPoint* poly, int n); +void simLineThin(cdCanvas* canvas, int x1, int y1, int x2, int y2); +void simLineThick(cdCanvas* canvas, int x1, int y1, int x2, int y2); +void simfLineThin(cdCanvas* canvas, double x1, double y1, double x2, double y2, int *last_xi_a, int *last_yi_a, int *last_xi_b, int *last_yi_b); +extern int simLineStyleNoReset; + +int simCalcEllipseNumSegments(cdCanvas* canvas, int xc, int yc, int width, int height); + +#endif + diff --git a/cd/src/sim/sim_linepolyfill.c b/cd/src/sim/sim_linepolyfill.c new file mode 100755 index 0000000..1a20907 --- /dev/null +++ b/cd/src/sim/sim_linepolyfill.c @@ -0,0 +1,1000 @@ +/** \file + * \brief Primitives of the Simulation Base Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" +#include "cd_truetype.h" +#include "sim.h" + + +/* para estilos de linha usando rotacao de bits */ +static const unsigned short int simLineStyleBitTable[5]= +{ + 0xFFFF, /* CD_CONTINUOUS */ + 0xFF00, /* CD_DASHED */ + 0x1111, /* CD_DOTTED */ + 0xFE10, /* CD_DASH_DOT */ + 0xFF24, /* CD_DASH_DOT_DOT*/ +}; +int simLineStyleNoReset = 0; +static unsigned short int simLineStyleLastBits = 0; + +#define simRotateLineStyle(_x) (((_x) & 0x8000)? ((_x) << 1)|(0x0001): ((_x) << 1)) + +#define INTENSITYSHIFT 8 /* # of bits by which to shift ErrorAcc to get intensity level */ + + +/* Point in Polygon was obtained from: + www.geometryalgorithms.com/Archive/algorithm_0103/algorithm_0103.htm + + Copyright 2001, softSurfer (www.softsurfer.com) + This code may be freely used and modified for any purpose + providing that this copyright notice is included with it. + SoftSurfer makes no warranty for this code, and cannot be held + liable for any real or imagined damage resulting from its use. +*/ + +#define isLeft( _P0, _P1, _x, _y ) ((_P1.x - _P0.x)*(_y - _P0.y) - (_x - _P0.x)*(_P1.y - _P0.y)) + +int simIsPointInPolyWind(cdPoint* poly, int n, int x, int y) +{ + int i, i1, + wn = 0; /* the winding number counter */ + + for (i = 0; i < n; i++) + { + i1 = (i+1)%n; /* next point(i+1), next of last(n-1) is first(0) */ + + if (poly[i].y <= y) + { + if (poly[i1].y > y) /* an upward crossing */ + if (isLeft(poly[i], poly[i1], x, y) > 0) /* P left of edge */ + ++wn; /* have a valid up intersect */ + } + else + { + if (poly[i1].y <= y) /* a downward crossing */ + if (isLeft(poly[i], poly[i1], x, y) < 0) /* P right of edge */ + --wn; /* have a valid down intersect */ + } + } + + return wn; +} + +static int compare_int(const int* xx1, const int* xx2) +{ + return *xx1 - *xx2; +} + +void simAddSegment(simLineSegment* segment, int x1, int y1, int x2, int y2, int *y_max, int *y_min) +{ + /* Make sure p2.y > p1.y */ + if (y1 > y2) + { + _cdSwapInt(y1, y2); + _cdSwapInt(x1, x2); + } + + segment->x1 = x1; + segment->y1 = y1; + segment->x2 = x2; + segment->y2 = y2; + + segment->x = x2; /* initial value */ + + segment->DeltaY = y2 - y1; + segment->DeltaX = x2 - x1; + if (segment->DeltaX >= 0) + segment->XDir = -1; /* inverted from simLineThin since here is from p2 to p1 */ + else + { + segment->XDir = 1; + segment->DeltaX = -segment->DeltaX; /* make DeltaX positive */ + } + + segment->ErrorAcc = 0; /* initialize the line error accumulator to 0 */ + + /* Is this an X-major or Y-major line? */ + if (segment->DeltaY > segment->DeltaX) + { + if (segment->DeltaY==0) /* do not compute for horizontal segments */ + return; + + /* Y-major line; calculate 16-bit fixed-point fractional part of a + pixel that X advances each time Y advances 1 pixel, truncating the + result so that we won't overrun the endpoint along the X axis */ + segment->ErrorInc = (unsigned short)(((unsigned long)segment->DeltaX << 16) / (unsigned long)segment->DeltaY); + } + else + { + if (segment->DeltaX==0) /* do not compute for vertical segments */ + return; + + /* It's an X-major line; calculate 16-bit fixed-point fractional part of a + pixel that Y advances each time X advances 1 pixel, truncating the + result to avoid overrunning the endpoint along the X axis */ + segment->ErrorInc = (unsigned short)(((unsigned long)segment->DeltaY << 16) / (unsigned long)segment->DeltaX); + } + + /* also calculates y_max and y_min of the polygon */ + if (y2 > *y_max) + *y_max = y2; + if (y1 < *y_min) + *y_min = y1; +} + +int simSegmentInc(simLineSegment* segment, cdCanvas* canvas, int y) +{ + unsigned short ErrorAccTemp, Weighting; + + if (segment->DeltaY == 0) + { + /* Horizontal line */ + while (segment->DeltaX-- != 0) + segment->x += segment->XDir; + return segment->x; + } + + if (segment->DeltaX == 0) + { + /* Vertical line */ + segment->DeltaY--; + return segment->x; + } + + if (segment->DeltaX == segment->DeltaY) + { + /* Perfect Diagonal line */ + segment->x += segment->XDir; + segment->DeltaY--; + return segment->x; + } + + /* Is this an X-major or Y-major line? */ + if (segment->DeltaY > segment->DeltaX) + { + /* Increment pixels other than the first and last */ + ErrorAccTemp = segment->ErrorAcc; /* remember currrent accumulated error */ + segment->ErrorAcc += segment->ErrorInc; /* calculate error for next pixel */ + if (segment->ErrorAcc <= ErrorAccTemp) + { + /* The error accumulator turned over, so advance the X coord */ + segment->x += segment->XDir; + } + + Weighting = segment->ErrorAcc >> INTENSITYSHIFT; + + if (Weighting < 128) + return segment->x; + else + return segment->x + segment->XDir; + } + else + { + /* Increment all pixels other than the first and last */ + int hline_end = 0; + while (!hline_end) + { + ErrorAccTemp = segment->ErrorAcc; /* remember currrent accumulated error */ + segment->ErrorAcc += segment->ErrorInc; /* calculate error for next pixel */ + if (segment->ErrorAcc <= ErrorAccTemp) + { + /* The error accumulator turned over, so advance the Y coord */ + hline_end = 1; + } + + segment->x += segment->XDir; /* X-major, so always advance X */ + } + + return segment->x; + } +} + +typedef struct _simIntervalList +{ + int* xx; + int n, count; +} simIntervalList; + +static int simFillCheckAAPixel(simIntervalList* line_int_list, int x) +{ + int i, *xx = line_int_list->xx; + for (i = 0; i < line_int_list->n; i+=2) + { + if (xx[i] <= x && x <= xx[i+1]) + return 0; /* inside, already drawn, do not draw */ + } + return 1; +} + +static void simPolyAAPixels(cdCanvas *canvas, simIntervalList* line_int_list, int y_min, int y_max, int x1, int y1, int x2, int y2) +{ + unsigned short ErrorInc, ErrorAcc; + unsigned short ErrorAccTemp, Weighting; + int DeltaX, DeltaY, XDir; + int no_antialias = !(canvas->simulation->antialias); + + /* Make sure p2.y > p1.y */ + if (y1 > y2) + { + _cdSwapInt(y1, y2); + _cdSwapInt(x1, x2); + } + + DeltaX = x2 - x1; + if (DeltaX >= 0) + XDir = 1; + else + { + XDir = -1; + DeltaX = -DeltaX; /* make DeltaX positive */ + } + + /* Special-case horizontal, vertical, and diagonal lines, which + require no weighting because they go right through the center of + every pixel */ + DeltaY = y2 - y1; + if (DeltaY == 0 || DeltaX == 0 || DeltaX == DeltaY) return; + + /* Line is not horizontal, diagonal, or vertical */ + + /* start and end pixels are not necessary + since they are always drawn in the previous step. */ + + ErrorAcc = 0; /* initialize the line error accumulator to 0 */ + + /* Is this an X-major or Y-major line? */ + if (DeltaY > DeltaX) + { + ErrorInc = (unsigned short)(((unsigned long)DeltaX << 16) / (unsigned long)DeltaY); + + /* Draw all pixels other than the first and last */ + while (--DeltaY) + { + ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ + ErrorAcc += ErrorInc; /* calculate error for next pixel */ + if (ErrorAcc <= ErrorAccTemp) + x1 += XDir; + + y1++; /* Y-major, so always advance Y */ + + Weighting = ErrorAcc >> INTENSITYSHIFT; + + if (y1 < y_min || y1 > y_max) continue; + + if (no_antialias) + { + if (Weighting < 128) + { + if (simFillCheckAAPixel(line_int_list+(y1-y_min), x1)) + simFillDrawAAPixel(canvas, x1, y1, 255); + } + else + { + if (simFillCheckAAPixel(line_int_list+(y1-y_min), x1 + XDir)) + simFillDrawAAPixel(canvas, x1 + XDir, y1, 255); + } + } + else + { + if (simFillCheckAAPixel(line_int_list+(y1-y_min), x1)) + simFillDrawAAPixel(canvas, x1, y1, 255-Weighting); + + if (simFillCheckAAPixel(line_int_list+(y1-y_min), x1 + XDir)) + simFillDrawAAPixel(canvas, x1 + XDir, y1, Weighting); + } + } + } + else + { + ErrorInc = (unsigned short)(((unsigned long)DeltaY << 16) / (unsigned long)DeltaX); + + /* Draw all pixels other than the first and last */ + while (--DeltaX) + { + ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ + ErrorAcc += ErrorInc; /* calculate error for next pixel */ + if (ErrorAcc <= ErrorAccTemp) + y1++; + + x1 += XDir; /* X-major, so always advance X */ + + Weighting = ErrorAcc >> INTENSITYSHIFT; + + if (y1 < y_min || y1 > y_max) continue; + + if (no_antialias) + { + if (Weighting < 128) + { + if (simFillCheckAAPixel(line_int_list+(y1-y_min), x1)) + simFillDrawAAPixel(canvas, x1, y1, 255); + } + else + { + if (y1+1 < y_min || y1+1 > y_max) continue; + + if (simFillCheckAAPixel(line_int_list+(y1+1-y_min), x1)) + simFillDrawAAPixel(canvas, x1, y1+1, 255); + } + } + else + { + if (simFillCheckAAPixel(line_int_list+(y1-y_min), x1)) + simFillDrawAAPixel(canvas, x1, y1, 255-Weighting); + + if (y1+1 < y_min || y1+1 > y_max) continue; + + if (simFillCheckAAPixel(line_int_list+(y1+1-y_min), x1)) + simFillDrawAAPixel(canvas, x1, y1+1, Weighting); + } + } + } +} + +static void simLineIntervallInit(simIntervalList* line_int_list, int count) +{ + line_int_list->xx = malloc(sizeof(int)*count); + line_int_list->n = 0; + line_int_list->count = count; +} + +static void simLineIntervallAdd(simIntervalList* line_int_list, int x1, int x2) +{ + int i = line_int_list->n; + line_int_list->xx[i] = x1; + line_int_list->xx[i+1] = x2; + line_int_list->n += 2; +} + +void simPolyFill(cdSimulation* simulation, cdPoint* poly, int n) +{ + simLineSegment *seg_i; + simIntervalList* line_int_list, *line_il; + int y_max, y_min, i, y, i1, fill_mode, num_lines, + inter_count, width, height, *xx; + + simLineSegment *segment = (simLineSegment *)malloc(n*sizeof(simLineSegment)); + + width = simulation->canvas->w; + height = simulation->canvas->h; + fill_mode = simulation->canvas->fill_mode; + + y_max = poly[0].y; + y_min = poly[0].y; + for(i = 0; i < n; i++) + { + i1 = (i+1)%n; /* next point(i+1), next of last(n-1) is first(0) */ + simAddSegment(segment+i, poly[i].x, poly[i].y, poly[i1].x, poly[i1].y, &y_max, &y_min); + } + + if (y_min > height-1 || y_max < 0) + { + free(segment); + return; + } + + if (y_min < 0) + y_min = 0; + + if (y_max > height-1) + num_lines = height-y_min; + else + num_lines = y_max-y_min+1; + + line_int_list = malloc(sizeof(simIntervalList)*num_lines); + memset(line_int_list, 0, sizeof(simIntervalList)*num_lines); + + xx = (int*)malloc((n+1)*sizeof(int)); + + /* for all horizontal lines between y_max and y_min */ + for(y = y_max; y >= y_min; y--) + { + inter_count = 0; + + /* for all segments, calculates the intervals to be filled + from the intersection with the horizontal line y. */ + for(i = 0; i < n; i++) + { + seg_i = segment + i; + + /* if the minimum Y coordinate of the segment is greater than the current y, then ignore the segment. */ + /* if it is an horizontal line, then ignore the segment. */ + if (seg_i->y1 > y || + seg_i->y1 == seg_i->y2) + continue; + + if (y == seg_i->y1) /* intersection at the start point (x1,y1) */ + { + int i_next = (i==n-1)? 0: i+1; + int i_prev = (i==0)? n-1: i-1; + simLineSegment *seg_i_next = segment + i_next; + simLineSegment *seg_i_prev = segment + i_prev; + + /* always save at least one intersection point for (y1) */ + + xx[inter_count++] = seg_i->x1; /* save the intersection point */ + + /* check for missing bottom-corner points (|_|), must duplicate the intersection */ + if ((seg_i_next->y1 == y && seg_i_next->y2 == seg_i_next->y1) || /* next is an horizontal line */ + (seg_i_prev->y1 == y && seg_i_prev->y2 == seg_i_prev->y1)) /* previous is an horizontal line */ + { + xx[inter_count++] = seg_i->x1; /* save the intersection point */ + } + } + else if ((y > seg_i->y1) && (y < seg_i->y2)) /* intersection inside the segment, do not include y2 */ + { + xx[inter_count++] = simSegmentInc(seg_i, simulation->canvas, y); /* save the intersection point */ + } + else if (y == seg_i->y2) /* intersection at the end point (x2,y2) */ + { + int i_next = (i==n-1)? 0: i+1; + int i_prev = (i==0)? n-1: i-1; + simLineSegment *seg_i_next = segment + i_next; + simLineSegment *seg_i_prev = segment + i_prev; + + /* only save the intersection point for (y2) if not handled by (y1) of another segment */ + + /* check for missing top-corner points (^) or (|¯¯|) */ + if ((seg_i_next->y2 == y && seg_i_next->y2 == seg_i_next->y1) || /* next is an horizontal line */ + (seg_i_prev->y2 == y && seg_i_prev->y2 == seg_i_prev->y1) || /* previous is an horizontal line */ + (seg_i_next->y2 == y && seg_i_next->x2 == seg_i->x2 && seg_i_next->x1 != seg_i->x1) || + (seg_i_prev->y2 == y && seg_i_prev->x2 == seg_i->x2 && seg_i_prev->x1 != seg_i->x1)) + { + xx[inter_count++] = seg_i->x2; /* save the intersection point */ + } + } + } + + /* if outside the canvas, ignore the intervals and */ + /* continue since the segments where updated. */ + if (y > height-1 || inter_count == 0) + continue; + + /* sort the intervals */ + qsort(xx, inter_count, sizeof(int), (int (*)(const void*,const void*))compare_int); + + line_il = line_int_list+(y-y_min); + simLineIntervallInit(line_il, inter_count*2); + + /* for all intervals, fill the interval */ + for(i = 0; i < inter_count; i += 2) /* process only pairs */ + { + if (fill_mode == CD_EVENODD) + { + /* since it fills only pairs of intervals, */ + /* it is the EVENODD fill rule. */ + simFillHorizLine(simulation, xx[i], y, xx[i+1]); + simLineIntervallAdd(line_il, xx[i], xx[i+1]); + } + else + { + simFillHorizLine(simulation, xx[i], y, xx[i+1]); + simLineIntervallAdd(line_il, xx[i], xx[i+1]); + if ((i+2 < inter_count) && (xx[i+1] < xx[i+2])) /* avoid point intervals */ + if (simIsPointInPolyWind(poly, n, (xx[i+1]+xx[i+2])/2, y)) /* if the next interval is inside the polygon then fill it */ + { + simFillHorizLine(simulation, xx[i+1], y, xx[i+2]); + simLineIntervallAdd(line_il, xx[i+1], xx[i+2]); + } + } + } + } + + free(xx); + free(segment); + + /* Once the polygon has been filled, now let's draw the + * antialiased and incomplete pixels at the edges */ + + if (y_max > height-1) + y_max = height-1; + + /* Go through all line segments of the poly */ + for(i = 0; i < n; i++) + { + i1 = (i+1)%n; + simPolyAAPixels(simulation->canvas, line_int_list, y_min, y_max, poly[i].x, poly[i].y, poly[i1].x, poly[i1].y); + } + + for (i = 0; i < num_lines; i++) + { + if (line_int_list[i].xx) + free(line_int_list[i].xx); + } + free(line_int_list); +} + +/*************************************************************************************/ +/*************************************************************************************/ + +#define _cdLineDrawPixel(_canvas, _x1, _y1, _ls, _fgcolor, _bgcolor) \ +{ \ + if (_ls & 1) \ + _canvas->cxPixel(_canvas->ctxcanvas, _x1, _y1, _fgcolor); \ + else if (canvas->back_opacity == CD_OPAQUE) \ + _canvas->cxPixel(_canvas->ctxcanvas, _x1, _y1, _bgcolor); \ +} + +void simLineThick(cdCanvas* canvas, int x1, int y1, int x2, int y2) +{ + const int interior = canvas->interior_style; + const int width = canvas->line_width; + const int style = canvas->line_style; + + const int dx = x2-x1; + const int dy = y2-y1; + + const double len = hypot(dx,dy); + + const double dnx = dx/len; + const double dny = dy/len; + + const int w1 = (int)width/2; + const int w2 = width-w1; + + const int n1x = cdRound( w1*dny); + const int n1y = cdRound(-w1*dnx); + + const int n2x = cdRound(-w2*dny); + const int n2y = cdRound( w2*dnx); + + const int p1x = x1 + n1x; + const int p1y = y1 + n1y; + const int p2x = x1 + n2x; + const int p2y = y1 + n2y; + const int p3x = p2x + dx; + const int p3y = p2y + dy; + const int p4x = p1x + dx; + const int p4y = p1y + dy; + + cdPoint poly[4]; + + cdCanvasLineWidth(canvas, 1); + cdCanvasInteriorStyle(canvas, CD_SOLID); + cdCanvasLineStyle(canvas, CD_CONTINUOUS); + + poly[0].x = p1x; + poly[0].y = p1y; + poly[1].x = p2x; + poly[1].y = p2y; + poly[2].x = p3x; + poly[2].y = p3y; + poly[3].x = p4x; + poly[3].y = p4y; + + simPolyFill(canvas->simulation, poly, 4); + + cdCanvasLineWidth(canvas, width); + cdCanvasInteriorStyle(canvas, interior); + cdCanvasLineStyle(canvas, style); +} + +void simLineThin(cdCanvas* canvas, int x1, int y1, int x2, int y2) +{ + unsigned short ErrorInc, ErrorAcc; + unsigned short ErrorAccTemp, Weighting; + int DeltaX, DeltaY, XDir; + long aa_fgcolor; + unsigned char alpha = cdAlpha(canvas->foreground), aa_alpha; + int no_antialias = !(canvas->simulation->antialias); + unsigned short int ls; + long fgcolor = canvas->foreground; + long bgcolor = canvas->background; + + if (simLineStyleNoReset == 2) + ls = simLineStyleLastBits; + else + { + ls = simLineStyleBitTable[canvas->line_style]; + + if (simLineStyleNoReset == 1) + simLineStyleNoReset = 2; + } + + /* Make sure p2.y > p1.y */ + if (y1 > y2) + { + _cdSwapInt(y1, y2); + _cdSwapInt(x1, x2); + } + + /* Draw the initial pixel, which is always exactly intersected by + the line and so needs no weighting */ + _cdLineDrawPixel(canvas, x1, y1, ls, fgcolor, bgcolor); + ls = simRotateLineStyle(ls); + + DeltaX = x2 - x1; + if (DeltaX >= 0) + XDir = 1; + else + { + XDir = -1; + DeltaX = -DeltaX; /* make DeltaX positive */ + } + + /* Special-case horizontal, vertical, and diagonal lines, which + require no weighting because they go right through the center of + every pixel */ + DeltaY = y2 - y1; + if (DeltaY == 0) + { + /* Horizontal line */ + while (DeltaX-- != 0) + { + x1 += XDir; + _cdLineDrawPixel(canvas, x1, y1, ls, fgcolor, bgcolor); + ls = simRotateLineStyle(ls); + } + simLineStyleLastBits = ls; + return; + } + + if (DeltaX == 0) + { + /* Vertical line */ + do + { + y1++; + _cdLineDrawPixel(canvas, x1, y1, ls, fgcolor, bgcolor); + ls = simRotateLineStyle(ls); + } while (--DeltaY != 0); + simLineStyleLastBits = ls; + return; + } + + if (DeltaX == DeltaY) + { + /* Perfect Diagonal line */ + do + { + x1 += XDir; + y1++; + _cdLineDrawPixel(canvas, x1, y1, ls, fgcolor, bgcolor); + ls = simRotateLineStyle(ls); + } while (--DeltaY != 0); + simLineStyleLastBits = ls; + return; + } + + /* Line is not horizontal, diagonal, or vertical */ + + ErrorAcc = 0; /* initialize the line error accumulator to 0 */ + + /* Is this an X-major or Y-major line? */ + if (DeltaY > DeltaX) + { + /* Y-major line; calculate 16-bit fixed-point fractional part of a + pixel that X advances each time Y advances 1 pixel, truncating the + result so that we won't overrun the endpoint along the X axis */ + ErrorInc = (unsigned short)(((unsigned long)DeltaX << 16) / (unsigned long)DeltaY); + + /* Draw all pixels other than the first and last */ + while (--DeltaY) + { + ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ + ErrorAcc += ErrorInc; /* calculate error for next pixel */ + if (ErrorAcc <= ErrorAccTemp) + { + /* The error accumulator turned over, so advance the X coord */ + x1 += XDir; + } + + y1++; /* Y-major, so always advance Y */ + + Weighting = ErrorAcc >> INTENSITYSHIFT; + + if (no_antialias) + { + if (Weighting < 128) + _cdLineDrawPixel(canvas, x1, y1, ls, fgcolor, bgcolor) + else + _cdLineDrawPixel(canvas, x1 + XDir, y1, ls, fgcolor, bgcolor) + ls = simRotateLineStyle(ls); + } + else + { + /* The IntensityBits most significant bits of ErrorAcc give us the + intensity weighting for this pixel, and the complement of the + weighting for the paired pixel. + Combine the Weighting with the existing alpha, + When Weighting is zero alpha must be fully preserved. */ + aa_alpha = ((255-Weighting) * alpha) / 255; + + aa_fgcolor = cdEncodeAlpha(fgcolor, aa_alpha); + _cdLineDrawPixel(canvas, x1, y1, ls, aa_fgcolor, bgcolor); + aa_fgcolor = cdEncodeAlpha(fgcolor, 255-aa_alpha); + _cdLineDrawPixel(canvas, x1 + XDir, y1, ls, aa_fgcolor, bgcolor); + ls = simRotateLineStyle(ls); + } + } + /* Draw the final pixel, which is always exactly intersected by the line + and so needs no weighting */ + _cdLineDrawPixel(canvas, x2, y2, ls, fgcolor, bgcolor); + ls = simRotateLineStyle(ls); + } + else + { + /* It's an X-major line; calculate 16-bit fixed-point fractional part of a + pixel that Y advances each time X advances 1 pixel, truncating the + result to avoid overrunning the endpoint along the X axis */ + ErrorInc = (unsigned short)(((unsigned long)DeltaY << 16) / (unsigned long)DeltaX); + + /* Draw all pixels other than the first and last */ + while (--DeltaX) + { + ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ + ErrorAcc += ErrorInc; /* calculate error for next pixel */ + if (ErrorAcc <= ErrorAccTemp) + { + /* The error accumulator turned over, so advance the Y coord */ + y1++; + } + + x1 += XDir; /* X-major, so always advance X */ + + Weighting = ErrorAcc >> INTENSITYSHIFT; + + if (no_antialias) + { + if (Weighting < 128) + _cdLineDrawPixel(canvas, x1, y1, ls, fgcolor, bgcolor) + else + _cdLineDrawPixel(canvas, x1, y1+1, ls, fgcolor, bgcolor) + ls = simRotateLineStyle(ls); + } + else + { + /* The IntensityBits most significant bits of ErrorAcc give us the + intensity weighting for this pixel, and the complement of the + weighting for the paired pixel. + Combine the Weighting with the existing alpha, + When Weighting is zero alpha must be fully preserved. */ + aa_alpha = ((255-Weighting) * alpha) / 255; + + aa_fgcolor = cdEncodeAlpha(fgcolor, aa_alpha); + _cdLineDrawPixel(canvas, x1, y1, ls, aa_fgcolor, bgcolor); + aa_fgcolor = cdEncodeAlpha(fgcolor, 255-aa_alpha); + _cdLineDrawPixel(canvas, x1, y1+1, ls, aa_fgcolor, bgcolor); + ls = simRotateLineStyle(ls); + } + } + + /* Draw the final pixel, which is always exactly intersected by the line + and so needs no weighting */ + _cdLineDrawPixel(canvas, x2, y2, ls, fgcolor, bgcolor); + ls = simRotateLineStyle(ls); + } + + simLineStyleLastBits = ls; +} + +void simfLineThin(cdCanvas* canvas, double x1, double y1, double x2, double y2, int *last_xi_a, int *last_yi_a, int *last_xi_b, int *last_yi_b) +{ + double DeltaX, DeltaY, a, b; + long aa_fgcolor; + unsigned char alpha = cdAlpha(canvas->foreground), aa_alpha; + int no_antialias = !(canvas->simulation->antialias); + int yi, xi, update_a = 1, update_b = 1; + unsigned short int ls; + long fgcolor = canvas->foreground; + long bgcolor = canvas->background; + + if (simLineStyleNoReset == 2) + ls = simLineStyleLastBits; + else + { + ls = simLineStyleBitTable[canvas->line_style]; + + if (simLineStyleNoReset == 1) + simLineStyleNoReset = 2; + } + + DeltaX = fabs(x2 - x1); + DeltaY = fabs(y2 - y1); + + if (DeltaX > 0.0001) + { + a = (y1-y2)/(x1-x2); + b = y1 - a*x1; + } + else + { + a = 0; + b = x1; + } + + /* NOTICE: all the complexity of this function + is related to check and update the previous point */ + + /* Is this an X-major or Y-major line? */ + if (DeltaY > DeltaX) + { + /* Increment in Y */ + int y1i = _cdRound(y1), + y2i = _cdRound(y2); + int yi_first = y1i; + int yi_last = y2i, xi_last; + + if (y1i > y2i) + _cdSwapInt(y1i, y2i); + + for (yi = y1i; yi <= y2i; yi++) + { + double x; + if (a) + x = (yi - b)/a; + else + x = b; + + xi = (int)floor(x); + + /* if at the last pixel, store the return value */ + if (yi == yi_last) + xi_last = xi; + + /* Combine the Weighting with the existing alpha, + When Weighting is zero alpha must be fully preserved. */ + aa_alpha = (int)((1.0-(x - xi)) * alpha); + + if (no_antialias) + { + if (aa_alpha > 128) + _cdLineDrawPixel(canvas, xi, yi, ls, fgcolor, bgcolor) + else + _cdLineDrawPixel(canvas, xi+1, yi, ls, fgcolor, bgcolor) + } + else + { + if (yi == yi_first) + { + if (yi == yi_last) /* one pixel only */ + { + update_a = 0; + update_b = 0; + } + + /* if at first, compare with the last two previously drawn */ + /* if the new is equal to the previous, do NOT draw */ + if ((xi != *last_xi_a || yi != *last_yi_a) && + (xi != *last_xi_b || yi != *last_yi_b)) + { + aa_fgcolor = cdEncodeAlpha(fgcolor, aa_alpha); + _cdLineDrawPixel(canvas, xi, yi, ls, aa_fgcolor, bgcolor); + + if (yi == yi_last) /* one pixel only */ + update_a = 1; + } + + if ((xi+1 != *last_xi_a || yi != *last_yi_a) && + (xi+1 != *last_xi_b || yi != *last_yi_b)) + { + aa_fgcolor = cdEncodeAlpha(fgcolor, 255-aa_alpha); + _cdLineDrawPixel(canvas, xi+1, yi, ls, aa_fgcolor, bgcolor); + + if (yi == yi_last) /* one pixel only */ + update_b = 1; + } + } + else + { + aa_fgcolor = cdEncodeAlpha(fgcolor, aa_alpha); + _cdLineDrawPixel(canvas, xi, yi, ls, aa_fgcolor, bgcolor); + aa_fgcolor = cdEncodeAlpha(fgcolor, 255-aa_alpha); + _cdLineDrawPixel(canvas, xi+1, yi, ls, aa_fgcolor, bgcolor); + } + } + + ls = simRotateLineStyle(ls); + } + + if (update_a) + { + *last_xi_a = xi_last; + *last_yi_a = yi_last; + } + if (update_b) + { + *last_xi_b = xi_last+1; + *last_yi_b = yi_last; + } + } + else + { + /* Increment in X */ + int x1i = _cdRound(x1), + x2i = _cdRound(x2); + int xi_first = x1i; + int xi_last = x2i, yi_last; + + if (x1i > x2i) + _cdSwapInt(x1i, x2i); + + for (xi = x1i; xi <= x2i; xi++) + { + double y = a*xi + b; + yi = (int)floor(y); + + /* if at the last pixel, store the return value */ + if (xi == xi_last) + yi_last = yi; + + /* Combine the Weighting with the existing alpha, + When Weighting is zero alpha must be fully preserved. */ + aa_alpha = (int)((1.0-(y - yi)) * alpha); + + if (no_antialias) + { + if (aa_alpha > 128) + _cdLineDrawPixel(canvas, xi, yi, ls, fgcolor, bgcolor) + else + _cdLineDrawPixel(canvas, xi, yi+1, ls, fgcolor, bgcolor) + } + else + { + if (xi == xi_first) + { + if (xi == xi_last) /* one pixel only */ + { + update_a = 0; + update_b = 0; + } + + /* if at first, compare with the last to draw */ + /* if new is equal to the previous, do NOT draw */ + if ((xi != *last_xi_a || yi != *last_yi_a) && + (xi != *last_xi_b || yi != *last_yi_b)) + { + aa_fgcolor = cdEncodeAlpha(fgcolor, aa_alpha); + _cdLineDrawPixel(canvas, xi, yi, ls, aa_fgcolor, bgcolor); + + if (xi == xi_last) /* one pixel only */ + update_a = 1; + } + + if ((xi != *last_xi_a || yi+1 != *last_yi_a) && + (xi != *last_xi_b || yi+1 != *last_yi_b)) + { + aa_fgcolor = cdEncodeAlpha(fgcolor, 255-aa_alpha); + _cdLineDrawPixel(canvas, xi, yi+1, ls, aa_fgcolor, bgcolor); + + if (xi == xi_last) /* one pixel only */ + update_b = 1; + } + } + else + { + aa_fgcolor = cdEncodeAlpha(fgcolor, aa_alpha); + _cdLineDrawPixel(canvas, xi, yi, ls, aa_fgcolor, bgcolor); + aa_fgcolor = cdEncodeAlpha(fgcolor, 255-aa_alpha); + _cdLineDrawPixel(canvas, xi, yi+1, ls, aa_fgcolor, bgcolor); + } + } + + ls = simRotateLineStyle(ls); + } + + if (update_a) + { + *last_xi_a = xi_last; + *last_yi_a = yi_last; + } + if (update_b) + { + *last_xi_b = xi_last; + *last_yi_b = yi_last+1; + } + } + + simLineStyleLastBits = ls; +} diff --git a/cd/src/sim/sim_other.c b/cd/src/sim/sim_other.c new file mode 100755 index 0000000..0954406 --- /dev/null +++ b/cd/src/sim/sim_other.c @@ -0,0 +1,411 @@ +/** \file + * \brief Simulation that is independent of the Simulation Base Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" + + +void cdSimMark(cdCanvas* canvas, int x, int y) +{ + int oldinteriorstyle = canvas->interior_style; + int oldlinestyle = canvas->line_style; + int oldlinewidth = canvas->line_width; + int size = canvas->mark_size; + int half_size = size/2; + int bottom = y-half_size; + int top = y+half_size; + int left = x-half_size; + int right = x+half_size; + + if (canvas->interior_style != CD_SOLID && + (canvas->mark_type == CD_CIRCLE || + canvas->mark_type == CD_BOX || + canvas->mark_type == CD_DIAMOND)) + cdCanvasInteriorStyle(canvas, CD_SOLID); + + if (canvas->line_style != CD_CONTINUOUS && + (canvas->mark_type == CD_STAR || + canvas->mark_type == CD_PLUS || + canvas->mark_type == CD_X || + canvas->mark_type == CD_HOLLOW_BOX || + canvas->mark_type == CD_HOLLOW_CIRCLE || + canvas->mark_type == CD_HOLLOW_DIAMOND)) + cdCanvasLineStyle(canvas, CD_CONTINUOUS); + + if (canvas->line_width != 1 && + (canvas->mark_type == CD_STAR || + canvas->mark_type == CD_PLUS || + canvas->mark_type == CD_X || + canvas->mark_type == CD_HOLLOW_BOX || + canvas->mark_type == CD_HOLLOW_CIRCLE || + canvas->mark_type == CD_HOLLOW_DIAMOND)) + cdCanvasLineWidth(canvas, 1); + + switch (canvas->mark_type) + { + case CD_STAR: + canvas->cxLine(canvas->ctxcanvas, left, bottom, right, top); + canvas->cxLine(canvas->ctxcanvas, left, top, right, bottom); + /* continue */ + case CD_PLUS: + canvas->cxLine(canvas->ctxcanvas, left, y, right, y); + canvas->cxLine(canvas->ctxcanvas, x, bottom, x, top); + break; + case CD_HOLLOW_CIRCLE: + canvas->cxArc(canvas->ctxcanvas, x, y, size, size, 0, 360); + break; + case CD_HOLLOW_BOX: + canvas->cxRect(canvas->ctxcanvas, left, right, bottom, top); + break; + case CD_HOLLOW_DIAMOND: + canvas->cxLine(canvas->ctxcanvas, left, y, x, top); + canvas->cxLine(canvas->ctxcanvas, x, top, right, y); + canvas->cxLine(canvas->ctxcanvas, right, y, x, bottom); + canvas->cxLine(canvas->ctxcanvas, x, bottom, left, y); + break; + case CD_X: + canvas->cxLine(canvas->ctxcanvas, left, bottom, right, top); + canvas->cxLine(canvas->ctxcanvas, left, top, right, bottom); + break; + case CD_CIRCLE: + canvas->cxSector(canvas->ctxcanvas, x, y, size, size, 0, 360); + break; + case CD_BOX: + canvas->cxBox(canvas->ctxcanvas, left, right, bottom, top); + break; + case CD_DIAMOND: + { + cdPoint poly[5]; + poly[0].x = left; + poly[0].y = y; + poly[1].x = x; + poly[1].y = top; + poly[2].x = right; + poly[2].y = y; + poly[3].x = x; + poly[3].y = bottom; + canvas->cxPoly(canvas->ctxcanvas, CD_FILL, poly, 4); + } + break; + } + + if (canvas->interior_style != oldinteriorstyle && + (canvas->mark_type == CD_CIRCLE || + canvas->mark_type == CD_BOX || + canvas->mark_type == CD_DIAMOND)) + cdCanvasInteriorStyle(canvas, oldinteriorstyle); + + if (canvas->line_style != oldlinestyle && + (canvas->mark_type == CD_STAR || + canvas->mark_type == CD_PLUS || + canvas->mark_type == CD_X || + canvas->mark_type == CD_HOLLOW_BOX || + canvas->mark_type == CD_HOLLOW_CIRCLE || + canvas->mark_type == CD_HOLLOW_DIAMOND)) + cdCanvasLineStyle(canvas, oldlinestyle); + + if (canvas->line_width != oldlinewidth && + (canvas->mark_type == CD_STAR || + canvas->mark_type == CD_PLUS || + canvas->mark_type == CD_X || + canvas->mark_type == CD_HOLLOW_BOX || + canvas->mark_type == CD_HOLLOW_CIRCLE || + canvas->mark_type == CD_HOLLOW_DIAMOND)) + cdCanvasLineWidth(canvas, oldlinewidth); +} + +/* Setup Bezier coefficient array once for each control polygon. + */ +static void BezierForm(const cdPoint* p, cdfPoint* c) +{ + int k; + static int choose[4] = {1, 3, 3, 1}; + for (k = 0; k < 4; k++) + { + c[k].x = p[k].x * choose[k]; + c[k].y = p[k].y * choose[k]; + } +} + +static void fBezierForm(const cdfPoint* p, cdfPoint* c) +{ + int k; + static int choose[4] = {1, 3, 3, 1}; + for (k = 0; k < 4; k++) + { + c[k].x = p[k].x * choose[k]; + c[k].y = p[k].y * choose[k]; + } +} + +/* Return Point pt(t), t <= 0 <= 1 from C. + * BezierForm must be called once for any given control polygon. + */ +static void BezierCurve(const cdfPoint* c, cdfPoint *pt, double t) +{ + int k; + double t1, tt, u; + cdfPoint b[4]; + + u = t; + + b[0].x = c[0].x; + b[0].y = c[0].y; + for(k = 1; k < 4; k++) + { + b[k].x = c[k].x * u; + b[k].y = c[k].y * u; + u =u*t; + } + + pt->x = b[3].x; + pt->y = b[3].y; + t1 = 1-t; + tt = t1; + for(k = 2; k >= 0; k--) + { + pt->x += b[k].x * tt; + pt->y += b[k].y * tt; + tt =tt*t1; + } +} + +static int BezierNumSegments(cdCanvas* canvas, const cdPoint* p) +{ + int i, K, dx, dy, d, + xmax = p[0].x, + ymax = p[0].y, + xmin = p[0].x, + ymin = p[0].y; + + for (i = 1; i < 4; i++) + { + if (p[i].x > xmax) + xmax = p[i].x; + if (p[i].y > ymax) + ymax = p[i].y; + if (p[i].x < xmin) + xmin = p[i].x; + if (p[i].y < ymin) + ymin = p[i].y; + } + + if (canvas->use_matrix) + { + cdMatrixTransformPoint(canvas->matrix, xmin, ymin, &xmin, &ymin); + cdMatrixTransformPoint(canvas->matrix, xmax, ymax, &xmax, &ymax); + } + + /* diagonal of the bouding box */ + dx = (xmax-xmin); + dy = (ymax-ymin); + d = (int)(sqrt(dx*dx + dy*dy)); + K = d / 8; + if (K < 8) K = 8; + return K; +} + +static int fBezierNumSegments(cdCanvas* canvas, const cdfPoint* p) +{ + int i, K, d; + double dx, dy, + xmax = p[0].x, + ymax = p[0].y, + xmin = p[0].x, + ymin = p[0].y; + + for (i = 1; i < 4; i++) + { + if (p[i].x > xmax) + xmax = p[i].x; + if (p[i].y > ymax) + ymax = p[i].y; + if (p[i].x < xmin) + xmin = p[i].x; + if (p[i].y < ymin) + ymin = p[i].y; + } + + /* diagonal of the bouding box */ + dx = (xmax-xmin); + dy = (ymax-ymin); + d = (int)(sqrt(dx*dx + dy*dy)); + K = d / 8; + if (K < 8) K = 8; + return K; +} + +/* from sim.h */ +void simfLineThin(cdCanvas* canvas, double x1, double y1, double x2, double y2, int *last_xi_a, int *last_yi_a, int *last_xi_b, int *last_yi_b); + +/* Quick and Simple Bezier Curve Drawing --- Robert D. Miller + * Graphics GEMS V */ +void cdSimPolyBezier(cdCanvas* canvas, const cdPoint* points, int n) +{ + int i = 0, k, K, poly_max = 0; + cdfPoint pt, prev_pt; + cdfPoint bezier_control[4]; + cdPoint* poly = NULL; + int use_poly = 0, + last_xi_a = -65535, + last_yi_a = -65535, + last_xi_b = -65535, + last_yi_b = -65535; + + /* Use special floating point anti-alias line draw when + line_width==1, and NOT using cdlineSIM. */ + if (canvas->line_width > 1 || canvas->cxLine != cdlineSIM) + use_poly = 1; + + n--; /* first n is 4 */ + while (n >= 3) + { + BezierForm(points+i, bezier_control); + K = BezierNumSegments(canvas, points+i); + + if (use_poly && poly_max < K+1) + { + poly = realloc(poly, sizeof(cdPoint)*(K+1)); /* K+1 points */ + if (!poly) return; + poly_max = K+1; + } + + /* first segment */ + BezierCurve(bezier_control, &pt, 0); + if (use_poly) + { + poly[0].x = _cdRound(pt.x); + poly[0].y = _cdRound(pt.y); + } + else + prev_pt = pt; + + for(k = 1; k < K+1; k++) + { + BezierCurve(bezier_control, &pt, (double)k/(double)K); + + if (use_poly) + { + poly[k].x = _cdRound(pt.x); + poly[k].y = _cdRound(pt.y); + } + else + { + int old_use_matrix = canvas->use_matrix; + double x1 = prev_pt.x, + y1 = prev_pt.y, + x2 = pt.x, + y2 = pt.y; + + if (canvas->use_matrix && !canvas->invert_yaxis) + { + cdfMatrixTransformPoint(canvas->matrix, x1, y1, &x1, &y1); + cdfMatrixTransformPoint(canvas->matrix, x2, y2, &x2, &y2); + } + + /* must disable transformation here, because line simulation use cxPixel */ + canvas->use_matrix = 0; + + simfLineThin(canvas, x1, y1, x2, y2, &last_xi_a, &last_yi_a, &last_xi_b, &last_yi_b); + + canvas->use_matrix = old_use_matrix; + prev_pt = pt; + } + } + + if (use_poly) + canvas->cxPoly(canvas->ctxcanvas, CD_OPEN_LINES, poly, k); + + n -= 3; i += 3; + } + + if (poly) free(poly); +} + +void cdfSimPolyBezier(cdCanvas* canvas, const cdfPoint* points, int n) +{ + int i = 0, k, K, poly_max = 0; + cdfPoint pt; + cdfPoint bezier_control[4]; + cdfPoint* poly = NULL; + + n--; /* first n is 4 */ + while (n >= 3) + { + fBezierForm(points+i, bezier_control); + K = fBezierNumSegments(canvas, points+i); + + if (poly_max < K+1) + { + poly = realloc(poly, sizeof(cdfPoint)*(K+1)); /* K+1 points */ + if (!poly) return; + poly_max = K+1; + } + + /* first segment */ + BezierCurve(bezier_control, &pt, 0); + poly[0].x = _cdRound(pt.x); + poly[0].y = _cdRound(pt.y); + + for(k = 1; k < K+1; k++) + { + BezierCurve(bezier_control, &pt, (double)k/(double)K); + + poly[k].x = _cdRound(pt.x); + poly[k].y = _cdRound(pt.y); + } + + canvas->cxFPoly(canvas->ctxcanvas, CD_OPEN_LINES, poly, k); + n -= 3; i += 3; + } + + if (poly) free(poly); +} + +void cdSimPutImageRectRGBA(cdCanvas* canvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int size, i, j, dst, src, *fx, *fy, rw, rh; + unsigned char *ar, *ag, *ab, al; + + size = w * h; + ar = (unsigned char*)malloc(size*3); + if (!ar) return; + ag = ar + size; + ab = ag + size; + + canvas->cxGetImageRGB(canvas->ctxcanvas, ar, ag, ab, x, y, w, h); + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + fx = cdGetZoomTable(w, rw, xmin); + fy = cdGetZoomTable(h, rh, ymin); + + for (j = 0; j < h; j++) + { + for (i = 0; i < w; i++) + { + dst = j * w + i; + src = fy[j] * iw + fx[i]; + al = a[src]; + ar[dst] = CD_ALPHA_BLEND(r[src], ar[dst], al); + ag[dst] = CD_ALPHA_BLEND(g[src], ag[dst], al); + ab[dst] = CD_ALPHA_BLEND(b[src], ab[dst], al); + } + } + + canvas->cxPutImageRectRGB(canvas->ctxcanvas, w, h, ar, ag, ab, x, y, w, h, 0, 0, 0, 0); + + free(ar); + + free(fx); + free(fy); +} diff --git a/cd/src/sim/sim_primitives.c b/cd/src/sim/sim_primitives.c new file mode 100755 index 0000000..5f5e0a3 --- /dev/null +++ b/cd/src/sim/sim_primitives.c @@ -0,0 +1,524 @@ +/** \file + * \brief Primitives of the Simulation Base Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include + +#include "cd.h" +#include "cd_private.h" +#include "cd_truetype.h" +#include "sim.h" + +void cdlineSIM(cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + int old_use_matrix = canvas->use_matrix; + + if (canvas->use_matrix && !canvas->invert_yaxis) + { + cdMatrixTransformPoint(canvas->matrix, x1, y1, &x1, &y1); + cdMatrixTransformPoint(canvas->matrix, x2, y2, &x2, &y2); + } + + /* must disable transformation here, because line simulation use cxPixel */ + canvas->use_matrix = 0; + + if(canvas->line_width > 1) + simLineThick(canvas, x1, y1, x2, y2); + else + simLineThin(canvas, x1, y1, x2, y2); + + canvas->use_matrix = old_use_matrix; +} + +void cdrectSIM(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + cdPoint poly[5]; /* leave room of one more point */ + poly[0].x = xmin; poly[0].y = ymin; + poly[1].x = xmin; poly[1].y = ymax; + poly[2].x = xmax; poly[2].y = ymax; + poly[3].x = xmax; poly[3].y = ymin; + canvas->cxPoly(canvas->ctxcanvas, CD_CLOSED_LINES, poly, 4); +} + +void cdboxSIM(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + + if (canvas->use_matrix) + { + cdPoint poly[5]; /* leave room of one more point */ + poly[0].x = xmin; poly[0].y = ymin; + poly[1].x = xmin; poly[1].y = ymax; + poly[2].x = xmax; poly[2].y = ymax; + poly[3].x = xmax; poly[3].y = ymin; + canvas->cxPoly(canvas->ctxcanvas, CD_FILL, poly, 4); + } + else + { + cdSimulation* simulation = canvas->simulation; + int y; + + /* must set line attributes here, because fill simulation use cxLine and cxPixel */ + int old_line_style = cdCanvasLineStyle(canvas, CD_CONTINUOUS); + int old_line_width = cdCanvasLineWidth(canvas, 1); + + for(y=ymin;y<=ymax;y++) + simFillHorizLine(simulation, xmin, y, xmax); + + cdCanvasLineStyle(canvas, old_line_style); + cdCanvasLineWidth(canvas, old_line_width); + } +} + +void cdfSimBox(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + cdfPoint poly[5]; /* leave room of one more point */ + poly[0].x = xmin; poly[0].y = ymin; + poly[1].x = xmin; poly[1].y = ymax; + poly[2].x = xmax; poly[2].y = ymax; + poly[3].x = xmax; poly[3].y = ymin; + canvas->cxFPoly(canvas->ctxcanvas, CD_FILL, poly, 4); +} + +void cdfSimRect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + cdfPoint poly[5]; /* leave room of one more point */ + poly[0].x = xmin; poly[0].y = ymin; + poly[1].x = xmin; poly[1].y = ymax; + poly[2].x = xmax; poly[2].y = ymax; + poly[3].x = xmax; poly[3].y = ymin; + canvas->cxFPoly(canvas->ctxcanvas, CD_CLOSED_LINES, poly, 4); +} + +int simCalcEllipseNumSegments(cdCanvas* canvas, int xc, int yc, int width, int height) +{ + int n, dx, dy, hd; + int w2 = width/2; + int h2 = height/2; + int x1 = xc-w2, + y1 = yc-h2, + x2 = xc+w2, + y2 = yc+h2; + + if (canvas->use_matrix) + { + cdMatrixTransformPoint(canvas->matrix, x1, y1, &x1, &y1); + cdMatrixTransformPoint(canvas->matrix, x2, y2, &x2, &y2); + } + + dx = (x1-x2); + dy = (y1-y2); + hd = (int)(sqrt(dx*dx + dy*dy)/2); + + /* Estimation Heuristic: + use half diagonal to estimate the number of segments for 360 degrees. + Use the difference of the half diagonal and its projection to calculate the minimum angle: + cos(min_angle) = hd / (hd + 1) or min_angle = acos(hd / (hd + 1)) + The number of segments will be 360 / min_angle. + */ + + n = (int)((360.0*CD_DEG2RAD) / acos((double)hd / (hd + 1.0)) + 0.5); /* round up */ + + /* multiple of 4 */ + n = ((n + 3)/4)*4; + + /* minimum number is 4 */ + if (n < 4) n = 4; + + return n; +} + +void cdarcSIM(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + double c, s, sx, sy, x, y, prev_x, prev_y; + double da; + int i, yc2 = 2*yc, p, + last_xi_a = -65535, + last_yi_a = -65535, + last_xi_b = -65535, + last_yi_b = -65535; + cdPoint* poly = NULL; + + /* number of segments of equivalent poligonal for a full ellipse */ + int n = simCalcEllipseNumSegments(canvas, xc, yc, width, height); + + /* Use special floating point anti-alias line draw when + line_width==1, and NOT using cdlineSIM. */ + if (canvas->line_width > 1 || canvas->cxLine != cdlineSIM) + { + poly = (cdPoint*)malloc(sizeof(cdPoint)*(n+1)); /* n+1 points */ + if (!poly) return; + } + + /* number of segments for the arc */ + n = cdRound((fabs(angle2-angle1)*n)/360); + if (n < 1) n = 1; + + /* converts degrees into radians */ + angle1 *= CD_DEG2RAD; + angle2 *= CD_DEG2RAD; + + /* generates arc points at origin with axis x and y */ + + da = (angle2-angle1)/n; + c = cos(da); + s = sin(da); + sx = -(width*s)/height; + sy = (height*s)/width; + + x = (width/2.0f)*cos(angle1); + y = (height/2.0f)*sin(angle1); + prev_x = x; + prev_y = y; + if (poly) + { + poly[0].x = _cdRound(x)+xc; + poly[0].y = _cdRound(y)+yc; + + if (canvas->invert_yaxis) /* must invert because of the angle orientation */ + poly[0].y = yc2 - poly[0].y; + + p = 1; + } + else + simLineStyleNoReset = 1; + + for (i = 1; i < n+1; i++) /* n+1 points */ + { + x = c*prev_x + sx*prev_y; + y = sy*prev_x + c*prev_y; + + if (poly) + { + poly[p].x = _cdRound(x)+xc; + poly[p].y = _cdRound(y)+yc; + + if (canvas->invert_yaxis) /* must invert because of the angle orientation */ + poly[p].y = yc2 - poly[p].y; + + if (poly[p-1].x != poly[p].x || poly[p-1].y != poly[p].y) + p++; + } + else + { + int old_use_matrix = canvas->use_matrix; + double x1 = prev_x+xc, + y1 = prev_y+yc, + x2 = x+xc, + y2 = y+yc; + + if (canvas->use_matrix && !canvas->invert_yaxis) + { + cdfMatrixTransformPoint(canvas->matrix, x1, y1, &x1, &y1); + cdfMatrixTransformPoint(canvas->matrix, x2, y2, &x2, &y2); + } + + /* must disable transformation here, because line simulation use cxPixel */ + canvas->use_matrix = 0; + + if (canvas->invert_yaxis) /* must invert because of the angle orientation */ + { + y1 = yc2 - y1; + y2 = yc2 - y2; + } + + simfLineThin(canvas, x1, y1, x2, y2, &last_xi_a, &last_yi_a, &last_xi_b, &last_yi_b); + + canvas->use_matrix = old_use_matrix; + } + + prev_x = x; + prev_y = y; + } + + if (poly) + { + canvas->cxPoly(canvas->ctxcanvas, CD_OPEN_LINES, poly, p); + free(poly); + } + else + simLineStyleNoReset = 0; +} + +void cdfSimArc(cdCtxCanvas *ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + double c, s, sx, sy, x, y, prev_x, prev_y, da; + int i, p; + cdfPoint* poly = NULL; + + /* number of segments of equivalent poligonal for a full ellipse */ + int n = simCalcEllipseNumSegments(canvas, (int)xc, (int)yc, (int)width, (int)height); + + poly = (cdfPoint*)malloc(sizeof(cdfPoint)*(n+1)); /* n+1 points */ + if (!poly) return; + + /* number of segments for the arc */ + n = cdRound((fabs(angle2-angle1)*n)/360); + if (n < 1) n = 1; + + /* converts degrees into radians */ + angle1 *= CD_DEG2RAD; + angle2 *= CD_DEG2RAD; + + /* generates arc points at origin with axis x and y */ + + da = (angle2-angle1)/n; + c = cos(da); + s = sin(da); + sx = -(width*s)/height; + sy = (height*s)/width; + + x = (width/2.0f)*cos(angle1); + y = (height/2.0f)*sin(angle1); + prev_x = x; + prev_y = y; + poly[0].x = x+xc; + poly[0].y = y+yc; + + p = 1; + + for (i = 1; i < n+1; i++) /* n+1 points */ + { + x = c*prev_x + sx*prev_y; + y = sy*prev_x + c*prev_y; + + poly[p].x = x+xc; + poly[p].y = y+yc; + + if (poly[p-1].x != poly[p].x || + poly[p-1].y != poly[p].y) + p++; + + prev_x = x; + prev_y = y; + } + + canvas->cxFPoly(canvas->ctxcanvas, CD_OPEN_LINES, poly, p); + free(poly); +} + +void cdfSimElipse(cdCtxCanvas* ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2, int sector) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + double c, s, sx, sy, x, y, prev_x, prev_y, da; + int i, p; + cdfPoint* poly; + + /* number of segments of equivalent poligonal for a full ellipse */ + int n = simCalcEllipseNumSegments(canvas, (int)xc, (int)yc, (int)width, (int)height); + + /* number of segments for the arc */ + n = cdRound(((angle2-angle1)*n)/360); + if (n < 1) n = 1; + + poly = (cdfPoint*)malloc(sizeof(cdfPoint)*(n+2+1)); /* n+1 points +1 center */ + + /* converts degrees into radians */ + angle1 *= CD_DEG2RAD; + angle2 *= CD_DEG2RAD; + + /* generates arc points at origin with axis x and y */ + + da = (angle2-angle1)/n; + c = cos(da); + s = sin(da); + sx = -(width*s)/height; + sy = (height*s)/width; + + x = xc + (width/2.0)*cos(angle1); + y = yc + (height/2.0)*sin(angle1); + prev_x = x; + prev_y = y; + + poly[0].x = x; + poly[0].y = y; + p = 1; + + for (i = 1; i < n+1; i++) /* n+1 points */ + { + x = xc + c*(prev_x-xc) + sx*(prev_y-yc); + y = yc + sy*(prev_x-xc) + c*(prev_y-yc); + + poly[p].x = x; + poly[p].y = y; + + if (poly[p-1].x != poly[p].x || poly[p-1].y != poly[p].y) + p++; + + prev_x = x; + prev_y = y; + } + + if (poly[p-1].x != poly[0].x || poly[p-1].y != poly[0].y) + { + if (sector) /* cdSector */ + { + /* add center */ + poly[p].x = xc; + poly[p].y = yc; + } + else /* cdChord */ + { + /* add initial point */ + poly[p].x = poly[0].x; + poly[p].y = poly[0].y; + } + p++; + } + + canvas->cxFPoly(canvas->ctxcanvas, CD_FILL, poly, p); + free(poly); +} + +static void cdSimElipse(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2, int sector) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + float c, s, sx, sy, x, y, prev_x, prev_y; + double da; + int i, p, yc2 = 2*yc; + cdPoint* poly; + + /* number of segments of equivalent poligonal for a full ellipse */ + int n = simCalcEllipseNumSegments(canvas, xc, yc, width, height); + + /* number of segments for the arc */ + n = cdRound(((angle2-angle1)*n)/360); + if (n < 1) n = 1; + + poly = (cdPoint*)malloc(sizeof(cdPoint)*(n+2+1)); /* n+1 points +1 center */ + + /* converts degrees into radians */ + angle1 *= CD_DEG2RAD; + angle2 *= CD_DEG2RAD; + + /* generates arc points at origin with axis x and y */ + + da = (angle2-angle1)/n; + c = (float)cos(da); + s = (float)sin(da); + sx = -(width*s)/height; + sy = (height*s)/width; + + x = xc + (width/2.0f)*(float)cos(angle1); + y = yc + (height/2.0f)*(float)sin(angle1); + prev_x = x; + prev_y = y; + + poly[0].x = _cdRound(x); + poly[0].y = _cdRound(y); + if (canvas->invert_yaxis) + poly[0].y = yc2 - poly[0].y; + p = 1; + + for (i = 1; i < n+1; i++) /* n+1 points */ + { + x = xc + c*(prev_x-xc) + sx*(prev_y-yc); + y = yc + sy*(prev_x-xc) + c*(prev_y-yc); + + poly[p].x = _cdRound(x); + poly[p].y = _cdRound(y); + + if (canvas->invert_yaxis) + poly[p].y = yc2 - poly[p].y; + + if (poly[p-1].x != poly[p].x || poly[p-1].y != poly[p].y) + p++; + + prev_x = x; + prev_y = y; + } + + if (poly[p-1].x != poly[0].x || poly[p-1].y != poly[0].y) + { + if (sector) /* cdSector */ + { + /* add center */ + poly[p].x = xc; + poly[p].y = yc; + } + else /* cdChord */ + { + /* add initial point */ + poly[p].x = poly[0].x; + poly[p].y = poly[0].y; + } + p++; + } + + canvas->cxPoly(canvas->ctxcanvas, CD_FILL, poly, p); + + free(poly); +} + +void cdsectorSIM(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2) +{ + cdSimElipse(ctxcanvas, xc, yc, width, height, angle1, angle2, 1); +} + +void cdchordSIM(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2) +{ + cdSimElipse(ctxcanvas, xc, yc, width, height, angle1, angle2, 0); +} + +void cdpolySIM(cdCtxCanvas* ctxcanvas, int mode, cdPoint* poly, int n) +{ + cdCanvas* canvas = ((cdCtxCanvasBase*)ctxcanvas)->canvas; + int i, reset = 1; + + switch(mode) + { + case CD_CLOSED_LINES: + poly[n] = poly[0]; + n++; + /* continue */ + case CD_OPEN_LINES: + if (simLineStyleNoReset) /* Bezier simulation use several poly */ + { + reset = 0; + simLineStyleNoReset = 1; + } + for (i = 0; i< n - 1; i++) + canvas->cxLine(canvas->ctxcanvas, poly[i].x, poly[i].y, poly[i+1].x, poly[i+1].y); + if (reset) simLineStyleNoReset = 0; + break; + case CD_BEZIER: + simLineStyleNoReset = 1; + cdSimPolyBezier(canvas, poly, n); + simLineStyleNoReset = 0; + break; + case CD_FILL: + { + /* must set line attributes here, because fill simulation use cxLine */ + int oldwidth = cdCanvasLineWidth(canvas, 1); + int oldstyle = cdCanvasLineStyle(canvas, CD_CONTINUOUS); + int old_use_matrix = canvas->use_matrix; + + if (canvas->use_matrix && !canvas->invert_yaxis) + { + for(i = 0; i < n; i++) + cdMatrixTransformPoint(canvas->matrix, poly[i].x, poly[i].y, &poly[i].x, &poly[i].y); + } + + /* must disable transformation here, because line simulation use cxPixel */ + canvas->use_matrix = 0; + + simPolyFill(canvas->simulation, poly, n); + + canvas->use_matrix = old_use_matrix; + cdCanvasLineStyle(canvas, oldstyle); + cdCanvasLineWidth(canvas, oldwidth); + } + break; + } +} diff --git a/cd/src/sim/truetype.h b/cd/src/sim/truetype.h new file mode 100755 index 0000000..5675998 --- /dev/null +++ b/cd/src/sim/truetype.h @@ -0,0 +1,46 @@ +/** \file + * \brief Text and Font Simulation using FreeType library. + * + * See Copyright Notice in cd.h + */ + +#ifndef __TRUETYPE_H +#define __TRUETYPE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "ft2build.h" +#include FT_FREETYPE_H + +/* + In CD version 4.4 we start to use FreeType 2. + Only TrueType font support is enabled. +*/ + +typedef struct _cdTT_Text +{ + FT_Library library; + FT_Face face; + + unsigned char* rgba_data; + int rgba_data_size; + + int max_height; + int max_width; + int descent; + int ascent; + +}cdTT_Text; + +cdTT_Text* cdTT_create(void); +void cdTT_free(cdTT_Text * tt_text); +int cdTT_load(cdTT_Text * tt_text, const char *font,int size, double xres, double yres); + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef _CD_TRUETYPE_ */ + diff --git a/cd/src/tecmake_compact.mak b/cd/src/tecmake_compact.mak new file mode 100755 index 0000000..08e642e --- /dev/null +++ b/cd/src/tecmake_compact.mak @@ -0,0 +1,1172 @@ +#-------------------------------------------------------------------------# +#- Tecmake (Compact Version) -# +#- Generic Makefile to build applications and libraries at TeCGraf -# +#- The user makefile usually has the name "config.mak". -# +#-------------------------------------------------------------------------# + +# Tecmake Version +VERSION = 3.19 + +# First target +.PHONY: build +build: tecmake + + +#---------------------------------# +# System Variables Definitions + +# Base Defintions +TEC_SYSNAME:=$(shell uname -s) +TEC_SYSVERSION:=$(shell uname -r|cut -f1 -d.) +TEC_SYSMINOR:=$(shell uname -r|cut -f2 -d.) +TEC_SYSARCH:=$(shell uname -m) + +# Fixes +ifeq ($(TEC_SYSNAME), SunOS) + TEC_SYSARCH:=$(shell uname -p) +endif +ifeq ($(TEC_SYSNAME), IRIX) + TEC_SYSARCH:=$(shell uname -p) +endif +ifeq ($(TEC_SYSNAME), FreeBSD) + TEC_SYSMINOR:=$(shell uname -r|cut -f2 -d.|cut -f1 -d-) +endif +ifeq ($(TEC_SYSNAME), AIX) + TEC_SYSVERSION:=$(shell uname -v) + TEC_SYSMINOR:=$(shell uname -r) + TEC_SYSARCH:=ppc +endif +ifeq ($(TEC_SYSNAME), Darwin) + TEC_SYSARCH:=$(shell uname -p) +endif + +ifeq ($(TEC_SYSARCH), powerpc) + TEC_SYSARCH:=ppc +endif +ifeq ($(TEC_SYSARCH), i686) + TEC_SYSARCH:=x86 +endif +ifeq ($(TEC_SYSARCH), i386) + TEC_SYSARCH:=x86 +endif +ifeq ($(TEC_SYSARCH), x86_64) + TEC_SYSARCH:=x64 +endif + +# Compose +TEC_SYSRELEASE:=$(TEC_SYSVERSION).$(TEC_SYSMINOR) +TEC_UNAME:=$(TEC_SYSNAME)$(TEC_SYSVERSION)$(TEC_SYSMINOR) + +# Linux 2.4 and GCC 3.x +ifeq ($(TEC_UNAME), Linux24) + GCCVER:=$(shell gcc -dumpversion|cut -f1 -d.) + ifeq ($(GCCVER), 3) + TEC_UNAME:=$(TEC_UNAME)g3 + endif +endif + +# Linux 2.6 and GCC 4.x +ifeq ($(TEC_UNAME), Linux26) + GCCVER:=$(shell gcc -dumpversion|cut -f1 -d.) + ifeq ($(GCCVER), 4) + TEC_UNAME:=$(TEC_UNAME)g4 + endif +endif + +# Linux and PowerPC +ifeq ($(TEC_SYSNAME), Linux) + ifeq ($(TEC_SYSARCH), ppc) + TEC_UNAME:=$(TEC_UNAME)ppc + endif +endif + +# 64-bits Linux +ifeq ($(TEC_SYSARCH), x64) + BUILD_64=Yes + TEC_UNAME:=$(TEC_UNAME)_64 +endif + +ifeq ($(TEC_SYSARCH), ia64) + BUILD_64=Yes + TEC_UNAME:=$(TEC_UNAME)_ia64 +endif + +# Solaris and Intel +ifeq ($(TEC_SYSNAME), SunOS) + ifeq ($(TEC_SYSARCH) , x86) + TEC_UNAME:=$(TEC_UNAME)x86 + endif +endif + +# Darwin and Intel +ifeq ($(TEC_SYSNAME), Darwin) +ifeq ($(TEC_SYSARCH), x86) + TEC_UNAME:=$(TEC_UNAME)x86 + endif +endif + +# System Info +.PHONY: sysinfo +sysinfo: + @echo ''; echo 'Tecmake - System Info' + @echo 'TEC_SYSNAME = $(TEC_SYSNAME)' + @echo 'TEC_SYSVERSION = $(TEC_SYSVERSION)' + @echo 'TEC_SYSMINOR = $(TEC_SYSMINOR)' + @echo 'TEC_SYSARCH = $(TEC_SYSARCH)' + @echo 'TEC_UNAME = $(TEC_UNAME)'; echo '' + +#---------------------------------# +# Directories Definitions +PROJDIR = .. +SRCDIR = . +OBJROOT = $(PROJDIR)/obj + + +#---------------------------------# +# Byte Order and Word Size + +ifneq ($(findstring x86, $(TEC_SYSARCH)), ) + TEC_BYTEORDER = TEC_LITTLEENDIAN +else +ifeq ($(TEC_SYSARCH), arm) + TEC_BYTEORDER = TEC_LITTLEENDIAN +else + TEC_BYTEORDER = TEC_LITTLEENDIAN +endif +endif + +ifeq ($(TEC_SYSARCH), x64) + TEC_WORDSIZE = TEC_64 +else +ifdef BUILD_64 + TEC_WORDSIZE = TEC_64 +else + TEC_WORDSIZE = TEC_32 +endif +endif + +# Itanium Exception +ifeq ($(TEC_SYSARCH), ia64) + TEC_BYTEORDER = TEC_LITTLEENDIAN + TEC_WORDSIZE = TEC_64 +endif + + +#---------------------------------# +# Compilation Flags +STDFLAGS := -Wall +STDDEFS := -DTEC_UNAME=$(TEC_UNAME) -DTEC_SYSNAME=$(TEC_SYSNAME) -D$(TEC_SYSNAME)=$(TEC_SYSRELEASE) -D$(TEC_BYTEORDER) -D$(TEC_WORDSIZE) -DFUNCPROTO=15 +STDINCS := +OPTFLAGS := -O3 +STDLFLAGS := r +DEBUGFLAGS := -g +STDLDFLAGS := -shared +DLIBEXT := so + +ifneq ($(findstring Linux, $(TEC_UNAME)), ) + GTK_DEFAULT := +endif +ifneq ($(findstring Darwin, $(TEC_UNAME)), ) + GTK_DEFAULT := +endif +ifneq ($(findstring FreeBSD, $(TEC_UNAME)), ) + GTK_DEFAULT := +endif +ifneq ($(findstring Linux24, $(TEC_UNAME)), ) + GTK_DEFAULT := +endif + +#---------------------------------# +# Build Tools + +CC := $(TEC_TOOLCHAIN)gcc +CPPC := $(TEC_TOOLCHAIN)g++ +FF := $(TEC_TOOLCHAIN)g77 +RANLIB := $(TEC_TOOLCHAIN)ranlib +AR := $(TEC_TOOLCHAIN)ar +DEBUGGER := $(TEC_TOOLCHAIN)gdb +RCC := $(TEC_TOOLCHAIN)windres +LD := $(TEC_TOOLCHAIN)gcc + +ifeq ($(TEC_UNAME), gcc2) + ifdef USE_GCC_2 + CC := $(CC)-2 + CPPC := $(CPPC)-2 + FF := $(FF)-2 + endif +endif + + +#---------------------------------# +# User Configuration File + +MAKENAME = config.mak + +ifdef MF + MAKENAME = $(MF).mak +endif + +################### +include $(MAKENAME) +################### + + +#---------------------------------# +# Definitions of public variables + +ifdef LIBNAME + TARGETNAME = $(LIBNAME) + MAKETYPE = LIB +else + TARGETNAME = $(APPNAME) + MAKETYPE = APP +endif + +ifndef TARGETNAME + $(error LIBNAME nor APPNAME defined in $(MAKENAME)) +endif + +PROJNAME ?= $(TARGETNAME) + +DEPEND := $(TARGETNAME).dep + +ifdef DEPENDDIR + DEPEND := $(DEPENDDIR)/$(TARGETNAME).dep.$(TEC_UNAME) +endif + +SRCLUADIR ?= $(SRCDIR) +LOHDIR ?= $(SRCLUADIR) + +ifeq ($(MAKETYPE), APP) + TARGETROOT ?= $(PROJDIR)/bin +else + TARGETROOT ?= $(PROJDIR)/lib +endif + +ifneq ($(PROJNAME), $(TARGETNAME)) + OBJROOT := $(OBJROOT)/$(TARGETNAME) +endif + +ifdef DBG + STDFLAGS += $(DEBUGFLAGS) + STDDEFS += -DDEBUG +else + STDDEFS += -DNDEBUG + ifdef OPT + STDFLAGS += $(OPTFLAGS) + ifeq ($(findstring gcc, $(TEC_UNAME)), ) + STRIP ?= Yes + endif + endif +endif + +ifdef BUILD_64 + ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + USE_CC = Yes + BUILD_64_DIR = Yes + endif + ifneq ($(findstring AIX, $(TEC_UNAME)), ) + USE_CC = Yes + BUILD_64_DIR = Yes + endif + ifneq ($(findstring IRIX, $(TEC_UNAME)), ) + USE_CC = Yes + BUILD_64_DIR = Yes + endif +endif + +ifdef USE_CC + CC := cc + CPPC := CC + STDFLAGS = + ifdef USE_CC_DIR + TEC_UNAME := $(TEC_UNAME)cc + endif +endif + +ifdef BUILD_64 + ifdef BUILD_64_DIR + TEC_UNAME := $(TEC_UNAME)_64 + endif +endif + +ifneq ($(findstring gcc, $(TEC_UNAME)), ) + ifeq ($(MAKETYPE), APP) + TEC_UNAME_DIR ?= $(TEC_SYSNAME) + endif +endif + +TEC_UNAME_DIR ?= $(TEC_UNAME) +ifdef DBG + ifdef DBG_DIR + TEC_UNAME_DIR := $(TEC_UNAME_DIR)d + endif +endif + +OBJDIR := $(OBJROOT)/$(TEC_UNAME_DIR) +TARGETDIR := $(TARGETROOT)/$(TEC_UNAME_DIR) + +# Change linker if any C++ source +ifndef LINKER + ifneq "$(findstring .cpp, $(SRC))" "" + LINKER := $(CPPC) + else + LINKER := $(CC) + endif +endif + + +#---------------------------------# +# LO and LOH Suffix + +ifeq ($(TEC_BYTEORDER), TEC_BIGENDIAN) + ifeq ($(TEC_WORDSIZE), TEC_64) + LO_SUFFIX ?= _be64 + else + LO_SUFFIX ?= _be32 + endif +else + ifeq ($(TEC_WORDSIZE), TEC_64) + LO_SUFFIX ?= _le64 + else + LO_SUFFIX ?= + endif +endif + + +#---------------------------------# +# Platform specific variables + +# Definicoes para o X11 +X11_LIBS := Xmu Xt Xext X11 +#X11_LIB := +#X11_INC := #include + +# Definicoes para o OpenGL +OPENGL_LIBS := GLU GL +#OPENGL_LIB := +#OPENGL_INC := #include and possibly +MOTIFGL_LIB := GLw #include + +# Definicoes para o Motif +#MOTIF_LIB := +#MOTIF_INC := #include + +# Definicoes para o GLUT +#GLUT_LIB := +#GLUT_INC := + + +ifneq ($(findstring cygw, $(TEC_UNAME)), ) + NO_DYNAMIC ?= Yes + ifdef BUILD_64 + X11_LIB := /usr/X11R6/lib64 + else + X11_LIB := /usr/X11R6/lib + endif + X11_INC := /usr/X11R6/include + MOTIFGL_LIB := +endif + +ifneq ($(findstring Linux, $(TEC_UNAME)), ) + ifdef BUILD_64 + ifeq ($(TEC_SYSARCH), ia64) + STDFLAGS += -fPIC + X11_LIB := /usr/X11R6/lib + else + STDFLAGS += -m64 -fPIC + X11_LIB := /usr/X11R6/lib64 + endif + else + X11_LIB := /usr/X11R6/lib + endif + X11_INC := /usr/X11R6/include + MOTIFGL_LIB := +endif + +ifneq ($(findstring IRIX, $(TEC_UNAME)), ) # any IRIX + LD = ld + STDLDFLAGS := -elf -shared -rdata_shared -soname lib$(TARGETNAME).so + RANLIB := /bin/true + X11_LIBS := Xmu Xt X11 + ifdef BUILD_64 + ifdef USE_CC + STDFLAGS += -64 -KPIC + STDLDFLAGS += -64 + LINKER += -64 + endif + X11_LIB := /usr/lib64 + MOTIF_LIB := /usr/Motif-2.1/lib64 + else + X11_LIB := /usr/lib32 + MOTIF_LIB := /usr/Motif-2.1/lib32 + endif + MOTIF_INC = /usr/Motif-2.1/include +endif + +ifneq ($(findstring AIX, $(TEC_UNAME)), ) + NO_DYNAMIC ?= Yes + ifdef BUILD_64 + ifdef USE_CC + STDFLAGS += -q64 # to compilers C and C++ + STDLFLAGS := -X64 $(STDLFLAGS) # to librarian + STDLDFLAGS += -64 + LINKER += -q64 # to linker + endif + endif +endif + +ifneq ($(findstring HP-UX, $(TEC_UNAME)), ) + NO_DYNAMIC ?= Yes + MOTIF_INC := /usr/include/Motif2.1 + X11_LIBS := Xt Xext X11 + OPENGL_LIB := /opt/graphics/OpenGL/lib + OPENGL_INC := /opt/graphics/OpenGL/include + STDDEFS := -DTEC_UNAME=$(TEC_UNAME) -DTEC_SYSNAME=$(TEC_SYSNAME) -D$(TEC_BYTEORDER) -D$(TEC_WORDSIZE) -DFUNCPROTO=15 + CC := aCC + CPPC := aCC + LINKER := aCC +endif + +ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + LD = ld + STDLDFLAGS := -G + X11_INC := /usr/openwin/share/include + X11_LIB := /usr/openwin/lib + MOTIF_INC := /usr/dt/share/include + MOTIF_LIB := /usr/dt/lib + OPENGL_INC := /usr/openwin/share/include/X11 + GLUT_LIB := /usr/local/glut-3.7/lib/glut + GLUT_INC := /usr/local/glut-3.7/include + ifdef BUILD_64 + ifdef USE_CC + STDFLAGS += -xarch=v9 -KPIC + # have to force these PATHs because of a conflict with standard PATHs + STDLDFLAGS += -64 -L/usr/lib/64 -L/usr/ucblib/sparcv9 + LINKER += -xarch=v9 + endif + endif +endif + +ifneq ($(findstring Darwin, $(TEC_UNAME)), ) + X11_LIBS := Xmu Xp Xt Xext X11 + X11_LIB := /usr/X11R6/lib + X11_INC := /usr/X11R6/include + MOTIF_INC := /usr/OpenMotif/include + MOTIF_LIB := /usr/OpenMotif/lib + ifdef BUILD_DYLIB + STDLDFLAGS := -dynamiclib -install_name lib$(TARGETNAME).dylib + DLIBEXT := dylib + else + STDLDFLAGS := -bundle -undefined dynamic_lookup + endif +endif + +ifneq ($(findstring FreeBSD, $(TEC_UNAME)), ) + X11_LIB := /usr/X11R6/lib + X11_INC := /usr/X11R6/include +endif + + +################################ +# Allows an extra configuration file. +ifdef EXTRA_CONFIG +include $(EXTRA_CONFIG) +endif +################################ + + +#---------------------------------# +# Tecgraf Libraries Location +TECTOOLS_HOME ?= ../.. + +IUP ?= $(TECTOOLS_HOME)/iup +CD ?= $(TECTOOLS_HOME)/cd +IM ?= $(TECTOOLS_HOME)/im +LUA ?= $(TECTOOLS_HOME)/lua +LUA51 ?= $(TECTOOLS_HOME)/lua5.1 + + +#---------------------------------# +# Pre-defined libraries + +# Library order: +# user + iupcd + cd + iup + motif + X +# Library path order is the oposite + +USE_MOTIF = Yes + +ifdef USE_LUA + LUASUFX := + LIBLUASUFX := 3 +endif + +ifdef USE_LUA4 + LUASUFX := 4 + LIBLUASUFX := 4 + override USE_LUA = Yes + LUA := $(LUA4) +endif + +ifdef USE_LUA5 + LUASUFX := 5 + LIBLUASUFX := 5 + override USE_LUA = Yes + LUA := $(LUA5) +endif + +ifdef USE_LUA50 + LUASUFX := 50 + LIBLUASUFX := 5 + override USE_LUA = Yes + LUA := $(LUA50) + NO_LUALIB := Yes +endif + +ifdef USE_LUA51 + LUASUFX := 5.1 + LIBLUASUFX := 51 + override USE_LUA = Yes + LUA := $(LUA51) + NO_LUALIB := Yes +endif + +ifdef USE_IUP3 + override USE_IUP = Yes +endif + +ifdef USE_IUP3BETA + IUP := $(IUP)3 +endif + +ifdef USE_IUPBETA + IUP := $(IUP)/beta +endif + +ifdef USE_CDBETA + CD := $(CD)/beta +endif + +ifdef USE_IMBETA + IM := $(IM)/beta +endif + +ifdef USE_GLUT + override USE_OPENGL = Yes +endif + +ifdef USE_IUPCONTROLS + override USE_CD = Yes + override USE_IUP = Yes + ifdef USE_IUPLUA + ifdef USE_STATIC + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupluacontrols$(LIBLUASUFX).a + else + LIBS += iupluacontrols$(LIBLUASUFX) + endif + override USE_CDLUA = Yes + endif + ifdef USE_STATIC + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupcontrols.a + else + LIBS += iupcontrols + endif +endif + +ifdef USE_IMLUA + override USE_IM = Yes + ifdef USE_STATIC + SLIB += $(IM)/lib/$(TEC_UNAME)/libimlua$(LIBLUASUFX).a + else + LIBS += imlua$(LIBLUASUFX) + endif +endif + +ifdef USE_CDLUA + override USE_CD = Yes + ifdef USE_STATIC + ifdef USE_IUP + ifdef USE_OLDNAMES + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdluaiup$(LIBLUASUFX).a + endif + endif + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdlua$(LIBLUASUFX).a + else + ifdef USE_IUP + ifdef USE_OLDNAMES + LIBS += cdluaiup$(LIBLUASUFX) + endif + endif + LIBS += cdlua$(LIBLUASUFX) + endif +endif + +ifdef USE_IUPLUA + override USE_IUP = Yes + ifdef USE_STATIC + ifdef USE_CD + ifndef USE_OLDNAMES + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupluacd$(LIBLUASUFX).a + endif + endif + ifdef USE_OPENGL + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupluagl$(LIBLUASUFX).a + endif + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiuplua$(LIBLUASUFX).a + else + ifdef USE_CD + ifndef USE_OLDNAMES + LIBS += iupluacd$(LIBLUASUFX) + endif + endif + ifdef USE_OPENGL + LIBS += iupluagl$(LIBLUASUFX) + endif + LIBS += iuplua$(LIBLUASUFX) + endif +endif + +ifdef USE_LUA + LUA_LIB ?= $(LUA)/lib/$(TEC_UNAME) + ifdef USE_STATIC + ifndef NO_LUALIB + SLIB += $(LUA_LIB)/liblualib$(LUASUFX).a + endif + SLIB += $(LUA_LIB)/liblua$(LUASUFX).a + else + ifndef NO_LUALIB + LIBS += lualib$(LUASUFX) + endif + ifndef NO_LUALINK + LIBS += lua$(LUASUFX) + LDIR += $(LUA_LIB) + endif + endif + + LUA_INC ?= $(LUA)/include + INCLUDES += $(LUA_INC) + + LUA_BIN ?= $(LUA)/bin/$(TEC_UNAME) + BIN2C := $(LUA_BIN)/bin2c$(LUASUFX) + LUAC := $(LUA_BIN)/luac$(LUASUFX) + LUABIN := $(LUA_BIN)/lua$(LUASUFX) +endif + +ifdef USE_IUP + IUPSUFX := + ifdef USE_IUP3 + ifdef GTK_DEFAULT + ifdef USE_MOTIF + IUPSUFX := mot + else + override USE_GTK = Yes + endif + else + ifdef USE_GTK + IUPSUFX := gtk + else + override USE_MOTIF = Yes + endif + endif + else + override USE_MOTIF = Yes + endif + ifdef USE_STATIC + ifdef USE_CD + ifndef USE_OLDNAMES + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupcd.a + endif + endif + ifdef USE_OPENGL + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupgl.a + endif + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiup$(IUPSUFX).a + else + ifdef USE_CD + ifndef USE_OLDNAMES + LIBS += iupcd + endif + endif + ifdef USE_OPENGL + LIBS += iupgl + endif + LIBS += iup$(IUPSUFX) + LDIR += $(IUP)/lib/$(TEC_UNAME) + endif + INCLUDES += $(IUP)/include +endif + +ifdef USE_CD + override USE_X11 = Yes + ifdef USE_STATIC + ifdef USE_IUP + ifdef USE_OLDNAMES + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdiup.a + endif + endif + ifdef USE_XRENDER + ifdef USE_OLDNAMES + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdxrender.a + else + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdcontextplus.a + endif + endif + SLIB += $(CD)/lib/$(TEC_UNAME)/libcd.a + ifdef USE_XRENDER + LIBS += Xrender Xft + else + ifndef USE_GTK + ifndef USE_OLDNAMES + # Freetype is included in GTK +# SLIB += $(CD)/lib/$(TEC_UNAME)/libfreetype.a + endif + endif + endif + else + ifdef USE_XRENDER + ifdef USE_OLDNAMES + LIBS += cdxrender + else + LIBS += cdcontextplus + endif + endif + LIBS += cd + LDIR += $(CD)/lib/$(TEC_UNAME) + ifdef USE_XRENDER + LIBS += Xrender Xft + else + ifndef USE_GTK + ifndef USE_OLDNAMES + # Freetype is included in GTK + LIBS += freetype + endif + endif + endif + endif + INCLUDES += $(CD)/include +endif + +ifdef USE_IM + ifdef USE_STATIC + SLIB += $(IM)/lib/$(TEC_UNAME)/libim.a + else + LIBS += im + LDIR += $(IM)/lib/$(TEC_UNAME) + endif + INCLUDES += $(IM)/include +endif + +# All except gcc in Windows (Cygwin) +ifeq ($(findstring gcc, $(TEC_UNAME)), ) + +ifdef USE_GLUT + LIBS += glut + LDIR += $(GLUT_LIB) + STDINCS += $(GLUT_INC) +endif + +ifdef USE_OPENGL + override USE_X11 = Yes + ifdef USE_MOTIF + LIBS += $(MOTIFGL_LIB) + endif + LIBS += $(OPENGL_LIBS) + LDIR += $(OPENGL_LIB) + STDINCS += $(OPENGL_INC) +endif + +ifdef USE_MOTIF + override USE_X11 = Yes + LIBS += Xm + LDIR += $(MOTIF_LIB) + STDINCS += $(MOTIF_INC) + ifneq ($(findstring Linux, $(TEC_UNAME)), ) + X11_LIBS := Xpm $(X11_LIBS) + endif + ifneq ($(findstring cygw, $(TEC_UNAME)), ) + X11_LIBS := Xpm $(X11_LIBS) + endif +endif + +ifdef USE_GTK +# ifneq ($(findstring Darwin, $(TEC_UNAME)), ) +# STDINCS += /Library/Frameworks/Gtk.framework/Headers +# STDINCS += /Library/Frameworks/GLib.framework/Headers +# STDINCS += /Library/Frameworks/Cairo.framework/Headers +# LFLAGS += -framework Gtk +# else + ifneq ($(findstring Darwin, $(TEC_UNAME)), ) + GTK_BASE := /sw + LDIR += /sw/lib + LIBS += freetype + else + GTK_BASE := /usr + endif + override USE_X11 = Yes + LIBS += gtk-x11-2.0 gdk-x11-2.0 gdk_pixbuf-2.0 pango-1.0 pangox-1.0 gobject-2.0 gmodule-2.0 glib-2.0 + STDINCS += $(GTK_BASE)/include/atk-1.0 $(GTK_BASE)/include/gtk-2.0 $(GTK_BASE)/include/cairo $(GTK_BASE)/include/pango-1.0 $(GTK_BASE)/include/glib-2.0 + ifeq ($(TEC_SYSARCH), x64) + STDINCS += $(GTK_BASE)/lib64/glib-2.0/include $(GTK_BASE)/lib64/gtk-2.0/include + else + ifeq ($(TEC_SYSARCH), ia64) + STDINCS += $(GTK_BASE)/lib64/glib-2.0/include $(GTK_BASE)/lib64/gtk-2.0/include + else + STDINCS += $(GTK_BASE)/lib/glib-2.0/include $(GTK_BASE)/lib/gtk-2.0/include + endif + endif + ifneq ($(findstring FreeBSD, $(TEC_UNAME)), ) + STDINCS += /lib/X11R6/include/gtk-2.0 + endif +# endif +endif + +ifdef USE_QT + override USE_X11 = Yes + LIBS += QtGui QtCore + QT_BASE_INC := /usr/include/qt4 + STDINCS += $(QT_BASE_INC) $(QT_BASE_INC)/QtCore $(QT_BASE_INC)/QtGui + STDDEFS += -DQT_DLL -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT +endif + +ifdef USE_X11 + LIBS += $(X11_LIBS) + LDIR += $(X11_LIB) + STDINCS += $(X11_INC) +endif + +LIBS += m + +else + # gcc in Windows + NO_DYNAMIC ?= Yes + STDDEFS += -DWIN32 + + ifdef USE_NOCYGWIN + STDFLAGS += -mno-cygwin + endif + + ifdef USE_GLUT + LIBS += glut32 + endif + + ifdef USE_OPENGL + LIBS += opengl32 glu32 glaux + endif + + LIBS += gdi32 winspool comdlg32 comctl32 ole32 + + ifdef USE_GTK + LIBS += gtk-win32-2.0 gdk-win32-2.0 gdk_pixbuf-2.0 pango-1.0 pangowin32-1.0 gobject-2.0 gmodule-2.0 glib-2.0 + #LDIR += $(GTK)/lib + GTK_INC = /usr + STDINCS += $(GTK_INC)/include/atk-1.0 $(GTK_INC)/include/gtk-2.0 $(GTK_INC)/include/cairo $(GTK_INC)/include/pango-1.0 $(GTK_INC)/include/glib-2.0 $(GTK_INC)/lib/glib-2.0/include $(GTK_INC)/lib/gtk-2.0/include + endif + + APPTYPE ?= windows + + ifeq ($(APPTYPE), windows) + LFLAGS += -mwindows + + ifdef USE_NOCYGWIN + LFLAGS += -mno-cygwin + endif + endif +endif + + +#---------------------------------# +# Building compilation flags that are sets + +INCLUDES := $(addprefix -I, $(INCLUDES)) +STDINCS := $(addprefix -I, $(STDINCS)) +EXTRAINCS := $(addprefix -I, $(EXTRAINCS)) +DEFINES := $(addprefix -D, $(DEFINES)) + +LIBS := $(addprefix -l, $(LIBS)) +ifdef LDIR + LDIR := $(addprefix -L, $(LDIR)) +endif + + +#---------------------------------# +# Definitions of private variables + +# Library flags for application and dynamic library linker +LFLAGS += $(LDIR) $(LIBS) +# C compiler flags +CFLAGS = $(FLAGS) $(STDFLAGS) $(INCLUDES) $(STDINCS) $(EXTRAINCS) $(DEFINES) $(STDDEFS) +# C++ compiler flags +CXXFLAGS = $(CPPFLAGS) $(STDFLAGS) $(INCLUDES) $(STDINCS) $(EXTRAINCS) $(DEFINES) $(STDDEFS) + +# Sources with relative path +SOURCES := $(addprefix $(SRCDIR)/, $(SRC)) + +# Target for applications or libraries +ifeq ($(MAKETYPE), APP) + TARGET := $(TARGETDIR)/$(TARGETNAME) +else + ifeq ($(NO_DYNAMIC), Yes) + TARGET := $(TARGETDIR)/lib$(TARGETNAME).a + else + TARGET := $(TARGETDIR)/lib$(TARGETNAME).a $(TARGETDIR)/lib$(TARGETNAME).$(DLIBEXT) + endif +endif + +# OBJ: list of .o, without path +# OBJS: list of .o with relative path +OBJ = $(notdir $(SRC)) +OBJ := $(OBJ:.c=.o) +OBJ := $(OBJ:.cpp=.o) +OBJ := $(OBJ:.cxx=.o) +OBJ := $(OBJ:.cc=.o) +OBJ := $(OBJ:.f=.o) +OBJ := $(OBJ:.for=.o) +OBJ := $(OBJ:.rc=.ro) +OBJS = $(addprefix $(OBJDIR)/, $(OBJ)) + +# LOH: list of .loh, without path +# LOHS: list of .loh, with relative path +LO = $(notdir $(SRCLUA)) +LO := $(LO:.lua=$(LO_SUFFIX).lo) +LOS = $(addprefix $(OBJROOT)/, $(LO)) + +LOH = $(notdir $(SRCLUA)) +LOH := $(LOH:.lua=$(LO_SUFFIX).loh) +LOHS = $(addprefix $(LOHDIR)/, $(LOH)) + +# Construct VPATH variable +P-SRC = $(dir $(SRC)) +P-SRC += $(dir $(SRCLUA)) +VPATH = .:$(foreach dir,$(P-SRC),$(if $(dir)="./",:$(dir))) + + +#---------------------------------# +# Main Rule - Build Everything that it is necessary + +.PHONY: tecmake +ifeq ($(MAKETYPE), APP) + tecmake: print-start directories application scripts +else + ifeq ($(NO_DYNAMIC), Yes) + tecmake: print-start directories static-lib + else + tecmake: print-start directories static-lib dynamic-lib + endif +endif + +.PHONY: print-start +print-start: + @echo ''; echo 'Tecmake - Starting [ $(TARGETNAME):$(TEC_UNAME) ]' + + +#---------------------------------# +# Dynamic Library Build + +.PHONY: dynamic-lib +dynamic-lib: $(TARGETDIR)/lib$(TARGETNAME).$(DLIBEXT) + +$(TARGETDIR)/lib$(TARGETNAME).$(DLIBEXT) : $(LOHS) $(OBJS) $(EXTRADEPS) + $(LD) $(STDLDFLAGS) -o $@ $(OBJS) $(SLIB) $(LFLAGS) + @echo 'Tecmake - Dynamic Library ($@) Done.'; echo '' + + +#---------------------------------# +# Static Library Build + +.PHONY: static-lib +static-lib: $(TARGETDIR)/lib$(TARGETNAME).a + +$(TARGETDIR)/lib$(TARGETNAME).a : $(LOHS) $(OBJS) $(EXTRADEPS) + $(AR) $(STDLFLAGS) $@ $(OBJS) $(SLIB) $(LCFLAGS) + -$(RANLIB) $@ + @echo 'Tecmake - Static Library ($@) Done.'; echo '' + + +#---------------------------------# +# Application Build + +.PHONY: application +application: $(TARGETDIR)/$(TARGETNAME) + +$(TARGETDIR)/$(TARGETNAME) : $(LOHS) $(OBJS) $(EXTRADEPS) + $(LINKER) -o $@ $(OBJS) $(SLIB) $(LFLAGS) + @if [ ! -z "$(STRIP)" ]; then \ + echo "Striping debug information" ;\ + strip $@ ;\ + fi + @echo 'Tecmake - Application ($@) Done.'; echo '' + + +#---------------------------------# +# Application Scripts + +# Script name +SRELEASE := $(SRCDIR)/$(TARGETNAME) + +.PHONY: scripts +ifdef NO_SCRIPTS + scripts: ; +else + scripts: $(SRELEASE) ; +endif + +$(SRELEASE): $(MAKENAME) + @echo 'Building script $(@F)' + @echo "#!/bin/csh" > $@ + @echo "# Script generated automatically by tecmake v$(VERSION)" >> $@ + @echo "# Remove the comment bellow to set the LD_LIBRARY_PATH if needed." >> $@ + @echo '#setenv LD_LIBRARY_PATH $(MYLIB1)/lib/$${TEC_UNAME}:$(MYLIB2)/lib/$${TEC_UNAME}:$$LD_LIBRARY_PATH' >> $@ + @echo 'if ( -r app.env ) source app.env' >> $@ + @echo 'exec $(TARGETROOT)/$$TEC_UNAME/$(TARGETNAME) $$*' >> $@ + @chmod a+x $@ + + +#---------------------------------# +# Directories Creation + +.PHONY: directories +directories: $(OBJDIR) $(TARGETDIR) $(EXTRADIR) $(LOHDIR) + +$(OBJDIR) $(TARGETDIR): + if [ ! -d $@ ] ; then mkdir -p $@ ; fi + +ifdef EXTRADIR + $(EXTRADIR): + if [ ! -d $@ ] ; then mkdir -p $@ ; fi +else + $(EXTRADIR): ; +endif + +ifdef LOHDIR + $(LOHDIR): + if [ ! -d $@ ] ; then mkdir -p $@ ; fi +else + $(LOHDIR): ; +endif + + +#---------------------------------# +# Compilation Rules + +$(OBJDIR)/%.o: $(SRCDIR)/%.c + @echo Compiling $( $@ + +$(OBJROOT)/%$(LO_SUFFIX).lo: $(SRCLUADIR)/%.lua + @echo Compiling $( $(DEPEND) + @which $(CPPC) 2> /dev/null 1>&2 ;\ + if [ $$? -eq 0 ]; then \ + echo "Building dependencies... (can be slow)" ;\ + $(CPPC) $(INCLUDES) $(DEFINES) $(STDDEFS) -MM $(SOURCES) | \ + sed -e '1,$$s/^\([^ ]\)/$$(OBJDIR)\/\1/' > $(DEPEND) ;\ + else \ + echo "" ;\ + echo "$(CPPC) not found. Dependencies can not be built." ;\ + echo "Must set USE_NODEPEND=Yes." ;\ + echo "" ;\ + exit 1 ;\ + fi + endif + +################### +ifndef USE_NODEPEND +include $(DEPEND) +endif +################### + + +#---------------------------------# +# Management Rules + +# make clean-extra +# Remove extra files +.PHONY: clean-extra +clean-extra: + rm -f $(DEPEND) $(SRELEASE) so_locations + +# make clean-lohs +# Remove Lua object inclusion files +.PHONY: clean-lohs +clean-lohs: + rm -f $(LOS) $(LOHS) + +# make clean-obj +# Remove object files +.PHONY: clean-obj +clean-obj: + rm -f $(OBJS) + +# make clean-target +# Remove target +.PHONY: clean-target +clean-target: + rm -f $(TARGET) + +# make clean +# Remove target and object files +.PHONY: clean +clean: clean-target clean-obj + +# make rebuild +# Remove symbols from executables +.PHONY: strip +strip: + test -r $(TARGETDIR)/$(TARGETNAME) && strip $(TARGETDIR)/$(TARGETNAME) + +# make rebuild +# Rebuild target and object files +.PHONY: rebuild +rebuild: clean-extra clean-lohs clean-obj clean-target tecmake + +# make relink +# Rebuild target without rebuilding object files +.PHONY: relink +relink: clean-target tecmake + +.PHONY: version +version: + @echo "Tecmake Compact Version $(VERSION)" + +#---------------------------------# diff --git a/cd/src/wd.c b/cd/src/wd.c new file mode 100755 index 0000000..85e01dd --- /dev/null +++ b/cd/src/wd.c @@ -0,0 +1,473 @@ +/** \file + * \brief World Coordinate Functions + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#include "cd.h" +#include "wd.h" + +#include "cd_private.h" + + +static void wdUpdateTransformation(cdCanvas* canvas) +{ + if (canvas->window.xmax != canvas->window.xmin) + canvas->sx = (canvas->viewport.xmax - canvas->viewport.xmin)/(canvas->window.xmax - canvas->window.xmin); + else + canvas->sx = 0; + canvas->tx = canvas->viewport.xmin - canvas->window.xmin*canvas->sx; + + if (canvas->window.ymax != canvas->window.ymin) + canvas->sy = (canvas->viewport.ymax - canvas->viewport.ymin)/(canvas->window.ymax - canvas->window.ymin); + else + canvas->sy = 0; + canvas->ty = canvas->viewport.ymin - canvas->window.ymin*canvas->sy; + + canvas->s = sqrt(canvas->sx * canvas->sx + canvas->sy * canvas->sy); +} + +void wdSetDefaults(cdCanvas* canvas) +{ + canvas->window.xmin = 0; + canvas->window.xmax = canvas->w_mm; + canvas->window.ymin = 0; + canvas->window.ymax = canvas->h_mm; + + canvas->viewport.xmin = 0; + canvas->viewport.xmax = canvas->w-1; + canvas->viewport.ymin = 0; + canvas->viewport.ymax = canvas->h-1; + + wdUpdateTransformation(canvas); +} + +void wdCanvasWindow(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax) +{ + canvas->window.xmin = xmin; + canvas->window.xmax = xmax; + canvas->window.ymin = ymin; + canvas->window.ymax = ymax; + + wdUpdateTransformation(canvas); +} + +void wdCanvasGetWindow (cdCanvas* canvas, double *xmin, double *xmax, double *ymin, double *ymax) +{ + if (xmin) *xmin = canvas->window.xmin; + if (xmax) *xmax = canvas->window.xmax; + if (ymin) *ymin = canvas->window.ymin; + if (ymax) *ymax = canvas->window.ymax; +} + +void wdCanvasViewport(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax) +{ + canvas->viewport.xmin = xmin; + canvas->viewport.xmax = xmax; + canvas->viewport.ymin = ymin; + canvas->viewport.ymax = ymax; + + wdUpdateTransformation(canvas); +} + +void wdCanvasGetViewport(cdCanvas* canvas, int *xmin, int *xmax, int *ymin, int *ymax) +{ + if (xmin) *xmin = canvas->viewport.xmin; + if (xmax) *xmax = canvas->viewport.xmax; + if (ymin) *ymin = canvas->viewport.ymin; + if (ymax) *ymax = canvas->viewport.ymax; +} + +#define _wWorld2Canvas(_canvas, _xw, _yw, _xv, _yv) \ +{ \ + _xv = cdRound(_canvas->sx*(_xw) + _canvas->tx); \ + _yv = cdRound(_canvas->sy*(_yw) + _canvas->ty); \ +} + +#define _wfWorld2Canvas(_canvas, _xw, _yw, _xv, _yv) \ +{ \ + _xv = (_canvas->sx*(_xw) + _canvas->tx); \ + _yv = (_canvas->sy*(_yw) + _canvas->ty); \ +} + +void wdCanvasWorld2Canvas(cdCanvas* canvas, double xw, double yw, int *xv, int *yv) +{ + if (xv) *xv = cdRound(canvas->sx*xw + canvas->tx); + if (yv) *yv = cdRound(canvas->sy*yw + canvas->ty); +} + +#define _wWorld2CanvasSize(_canvas, _Ww, _Hw, _Wv, _Hv) \ +{ \ + _Wv = cdRound(_canvas->sx*(_Ww)); \ + _Hv = cdRound(_canvas->sy*(_Hw)); \ +} + +#define _wfWorld2CanvasSize(_canvas, _Ww, _Hw, _Wv, _Hv) \ +{ \ + _Wv = (_canvas->sx*(_Ww)); \ + _Hv = (_canvas->sy*(_Hw)); \ +} + +void wdCanvasWorld2CanvasSize(cdCanvas* canvas, double hw, double vw, int *hv, int *vv) +{ + if (hv) *hv = cdRound(canvas->sx*hw); + if (vv) *vv = cdRound(canvas->sy*vw); +} + +#define _wCanvas2World(_canvas, _xv, _yv, _xw, _yw) \ +{ \ + _xw = ((double)(_xv) - _canvas->tx)/_canvas->sx; \ + _yw = ((double)(_yv) - _canvas->ty)/_canvas->sy; \ +} + +void wdCanvasCanvas2World(cdCanvas* canvas, int xv, int yv, double *xw, double *yw) +{ + if (xw) *xw = ((double)xv - canvas->tx)/canvas->sx; + if (yw) *yw = ((double)yv - canvas->ty)/canvas->sy; +} + +void wdCanvasClipArea(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax) +{ + int xminr, xmaxr, yminr, ymaxr; + + _wWorld2Canvas(canvas, xmin, ymin, xminr, yminr); + _wWorld2Canvas(canvas, xmax, ymax, xmaxr, ymaxr); + + cdCanvasClipArea(canvas, xminr, xmaxr, yminr, ymaxr); +} + +int wdCanvasIsPointInRegion(cdCanvas* canvas, double x, double y) +{ + int xr, yr; + _wWorld2Canvas(canvas, x, y, xr, yr); + return cdCanvasIsPointInRegion(canvas, xr, yr); +} + +void wdCanvasOffsetRegion(cdCanvas* canvas, double x, double y) +{ + int xr, yr; + _wWorld2Canvas(canvas, x, y, xr, yr); + cdCanvasOffsetRegion(canvas, xr, yr); +} + +void wdCanvasGetRegionBox(cdCanvas* canvas, double *xmin, double *xmax, double *ymin, double *ymax) +{ + int xminr, xmaxr, yminr, ymaxr; + cdCanvasGetRegionBox(canvas, &xminr, &xmaxr, &yminr, &ymaxr); + _wCanvas2World(canvas, xminr, yminr, *xmin, *ymin); + _wCanvas2World(canvas, xmaxr, ymaxr, *xmax, *ymax); +} + +int wdCanvasGetClipArea(cdCanvas* canvas, double *xmin, double *xmax, double *ymin, double *ymax) +{ + int xminr, xmaxr, yminr, ymaxr; + int clip = cdCanvasGetClipArea(canvas, &xminr, &xmaxr, &yminr, &ymaxr); + _wCanvas2World(canvas, xminr, yminr, *xmin, *ymin); + _wCanvas2World(canvas, xmaxr, ymaxr, *xmax, *ymax); + return clip; +} + +void wdCanvasLine(cdCanvas* canvas, double x1, double y1, double x2, double y2) +{ + double xr1, xr2, yr1, yr2; + _wfWorld2Canvas(canvas, x1, y1, xr1, yr1); + _wfWorld2Canvas(canvas, x2, y2, xr2, yr2); + cdfCanvasLine(canvas, xr1, yr1, xr2, yr2); +} + +void wdCanvasBox(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax) +{ + double xminr, xmaxr, yminr, ymaxr; + _wfWorld2Canvas(canvas, xmin, ymin, xminr, yminr); + _wfWorld2Canvas(canvas, xmax, ymax, xmaxr, ymaxr); + cdfCanvasBox(canvas, xminr, xmaxr, yminr, ymaxr); +} + +void wdCanvasRect(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax) +{ + double xminr, xmaxr, yminr, ymaxr; + _wfWorld2Canvas(canvas, xmin, ymin, xminr, yminr); + _wfWorld2Canvas(canvas, xmax, ymax, xmaxr, ymaxr); + cdfCanvasRect(canvas, xminr, xmaxr, yminr, ymaxr); +} + +void wdCanvasArc(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2) +{ + double xcr, ycr, wr, hr; + _wfWorld2Canvas(canvas, xc, yc, xcr, ycr); + _wfWorld2CanvasSize(canvas, w, h, wr, hr); + cdfCanvasArc(canvas, xcr, ycr, wr, hr, angle1, angle2); +} + +void wdCanvasSector(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2) +{ + double xcr, ycr, wr, hr; + _wfWorld2Canvas(canvas, xc, yc, xcr, ycr); + _wfWorld2CanvasSize(canvas, w, h, wr, hr); + cdfCanvasSector(canvas, xcr, ycr, wr, hr, angle1, angle2); +} + +void wdCanvasChord(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2) +{ + double xcr, ycr, wr, hr; + _wfWorld2Canvas(canvas, xc, yc, xcr, ycr); + _wfWorld2CanvasSize(canvas, w, h, wr, hr); + cdfCanvasChord(canvas, xcr, ycr, wr, hr, angle1, angle2); +} + +void wdCanvasText(cdCanvas* canvas, double x, double y, const char *s) +{ + double xr, yr; + _wfWorld2Canvas(canvas, x, y, xr, yr); + cdfCanvasText(canvas, xr, yr, s); +} + +void wdCanvasVertex(cdCanvas* canvas, double x, double y) +{ + double xr, yr; + _wfWorld2Canvas(canvas, x, y, xr, yr); + cdfCanvasVertex(canvas, xr, yr); +} + +void wdCanvasMark(cdCanvas* canvas, double x, double y) +{ + int xr, yr; + _wWorld2Canvas(canvas, x, y, xr, yr); + cdCanvasMark(canvas, xr, yr); +} + +void wdCanvasPixel(cdCanvas* canvas, double x, double y, long color) +{ + int xr, yr; + _wWorld2Canvas(canvas, x, y, xr, yr); + cdCanvasPixel(canvas, xr, yr, color); +} + +void wdCanvasPutImageRect(cdCanvas* canvas, cdImage* image, double x, double y, int xmin, int xmax, int ymin, int ymax) +{ + int xr, yr; + _wWorld2Canvas(canvas, x, y, xr, yr); + cdCanvasPutImageRect(canvas, image, xr, yr, xmin, xmax, ymin, ymax); +} + +void wdCanvasPutImageRectRGB(cdCanvas* canvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) +{ + int xr, yr, wr, hr; + _wWorld2Canvas(canvas, x, y, xr, yr); + _wWorld2CanvasSize(canvas, w, h, wr, hr); + cdCanvasPutImageRectRGB(canvas, iw, ih, r, g, b, xr, yr, wr, hr, xmin, xmax, ymin, ymax); +} + +void wdCanvasPutImageRectRGBA(cdCanvas* canvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) +{ + int xr, yr, wr, hr; + _wWorld2Canvas(canvas, x, y, xr, yr); + _wWorld2CanvasSize(canvas, w, h, wr, hr); + cdCanvasPutImageRectRGBA(canvas, iw, ih, r, g, b, a, xr, yr, wr, hr, xmin, xmax, ymin, ymax); +} + +void wdCanvasPutImageRectMap(cdCanvas* canvas, int iw, int ih, const unsigned char *index, const long *colors, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) +{ + int xr, yr, wr, hr; + _wWorld2Canvas(canvas, x, y, xr, yr); + _wWorld2CanvasSize(canvas, w, h, wr, hr); + cdCanvasPutImageRectMap(canvas, iw, ih, index, colors, xr, yr, wr, hr, xmin, xmax, ymin, ymax); +} + +void wdCanvasPutBitmap(cdCanvas* canvas, cdBitmap* image, double x, double y, double w, double h) +{ + int xr, yr, wr, hr; + _wWorld2Canvas(canvas, x, y, xr, yr); + _wWorld2CanvasSize(canvas, w, h, wr, hr); + cdCanvasPutBitmap(canvas, image, xr, yr, wr, hr); +} + +double wdCanvasLineWidth(cdCanvas* canvas, double width_mm) +{ + int width; + double line_width_mm = canvas->line_width/canvas->xres; + + if (width_mm == CD_QUERY) + return line_width_mm; + + width = cdRound(width_mm*canvas->xres); + if (width < 1) width = 1; + + cdCanvasLineWidth(canvas, width); + + return line_width_mm; +} + +int wdCanvasFont(cdCanvas* canvas, const char* type_face, int style, double size_mm) +{ + return cdCanvasFont(canvas, type_face, style, cdRound(size_mm*CD_MM2PT)); +} + +void wdCanvasGetFont(cdCanvas* canvas, char *type_face, int *style, double *size) +{ + int point_size; + cdCanvasGetFont(canvas, type_face, style, &point_size); + if (point_size<0) + { + if (size) cdCanvasPixel2MM(canvas, -point_size, 0, size, NULL); + } + else + { + if (size) *size = ((double)point_size) / CD_MM2PT; + } +} + +double wdCanvasMarkSize(cdCanvas* canvas, double size_mm) +{ + int size; + double mark_size_mm = canvas->mark_size/canvas->xres; + + if (size_mm == CD_QUERY) + return mark_size_mm; + + size = cdRound(size_mm*canvas->xres); + if (size < 1) size = 1; + + canvas->mark_size = size; + + return mark_size_mm; +} + +void wdCanvasGetFontDim(cdCanvas* canvas, double *max_width, double *height, double *ascent, double *descent) +{ + double origin_x, origin_y, tmp = 0; + double distance_x, distance_y; + int font_max_width, font_height, font_ascent, font_descent; + cdCanvasGetFontDim(canvas, &font_max_width, &font_height, &font_ascent, &font_descent); + _wCanvas2World(canvas, 0, 0, origin_x, origin_y); + _wCanvas2World(canvas, font_max_width, font_height, distance_x, distance_y); + if (max_width) *max_width = fabs(distance_x - origin_x); + if (height) *height = fabs(distance_y - origin_y); + _wCanvas2World(canvas, tmp, font_ascent, tmp, distance_y); + if (ascent) *ascent = fabs(distance_y - origin_y); + _wCanvas2World(canvas, tmp, font_descent, tmp, distance_y); + if (descent) *descent = fabs(distance_y - origin_y); +} + +void wdCanvasGetTextSize(cdCanvas* canvas, const char *s, double *width, double *height) +{ + int text_width, text_height; + double origin_x, origin_y; + double text_x, text_y; + _wCanvas2World(canvas, 0, 0, origin_x, origin_y); + cdCanvasGetTextSize(canvas, s, &text_width, &text_height); + _wCanvas2World(canvas, text_width, text_height, text_x, text_y); + if (width) *width = fabs(text_x - origin_x); + if (height) *height = fabs(text_y - origin_y); +} + +void wdCanvasGetTextBox(cdCanvas* canvas, double x, double y, const char *s, double *xmin, double *xmax, double *ymin, double *ymax) +{ + int rx, ry, rxmin, rxmax, rymin, rymax; + + _wWorld2Canvas(canvas, x, y, rx, ry); + cdCanvasGetTextBox(canvas, rx, ry, s, &rxmin, &rxmax, &rymin, &rymax); + + _wCanvas2World(canvas, rxmin, rymin, *xmin, *ymin); + _wCanvas2World(canvas, rxmax, rymax, *xmax, *ymax); +} + +void wdCanvasGetTextBounds(cdCanvas* canvas, double x, double y, const char *s, double *rect) +{ + int rx, ry, rrect[8]; + + _wWorld2Canvas(canvas, x, y, rx, ry); + cdCanvasGetTextBounds(canvas, rx, ry, s, rrect); + + _wCanvas2World(canvas, rrect[0], rrect[1], rect[0], rect[1]); + _wCanvas2World(canvas, rrect[2], rrect[3], rect[2], rect[3]); + _wCanvas2World(canvas, rrect[4], rrect[5], rect[4], rect[5]); + _wCanvas2World(canvas, rrect[6], rrect[7], rect[6], rect[7]); +} + +void wdCanvasPattern(cdCanvas* canvas, int w, int h, const long *color, double w_mm, double h_mm) +{ + long *pattern = 0; + int w_pxl, h_pxl, x, y, cx, cy; + int wratio, hratio; + int *XTab, *YTab; + + cdCanvasMM2Pixel(canvas, w_mm, h_mm, &w_pxl, &h_pxl); + + wratio = cdRound((double)w_pxl/(double)w); + hratio = cdRound((double)h_pxl/(double)h); + + wratio = (wratio <= 0)? 1: wratio; + hratio = (hratio <= 0)? 1: hratio; + + w_pxl = wratio * w; + h_pxl = hratio * h; + + pattern = (long*)malloc(w_pxl*h_pxl*sizeof(long)); + + XTab = cdGetZoomTable(w_pxl, w, 0); + YTab = cdGetZoomTable(h_pxl, h, 0); + + for (y=0; y +#include + +#include "cd.h" +#include "wd.h" + +/* from cd_private.h */ +int cdRound(double x); + +/* re-declared here to ignore CD_NO_OLD_INTERFACE definition */ +int cdActivate(cdCanvas* canvas); +cdCanvas* cdActiveCanvas(void); + +/* +** --------------------------------------------------------------- +** Private functions: +*/ + +static void _wdHdcpyDoit(cdCanvas *canvas, cdCanvas *canvas_copy, void (*draw_func)(cdCanvas *canvas_copy)) +{ + cdCanvas *old_active; + double left, right, bottom, top; /* canvas visualization window */ + int canvas_hsize, canvas_vsize; /* canvas sizes in pixels */ + int hdcpy_hsize, hdcpy_vsize; /* paper sizes in points */ + double canvas_vpr; /* canvas viewport distortion ratio */ + double hdcpy_vpr; /* paper viewport distortion ratio */ + int xc, yc; /* paper center in pixels */ + int xmin, xmax, ymin, ymax; /* paper viewport */ + + /* Activate canvas visualization surface. */ + if (cdCanvasActivate(canvas) != CD_OK) return; + + /* Get current canvas window parameters and sizes. */ + wdCanvasGetWindow(canvas, &left, &right, &bottom, &top); + cdCanvasGetSize(canvas, &canvas_hsize, &canvas_vsize, 0L, 0L); + + /* Activate hardcopy visualization surface. */ + if (cdCanvasActivate(canvas_copy) != CD_OK) return; + + /* Set window parameters on hardcopy surface. */ + wdCanvasWindow(canvas_copy, left, right, bottom, top); + + /* Adjust paper viewport, centralized, matching canvas viewport. */ + canvas_vpr = (double)canvas_vsize / (double)canvas_hsize; + cdCanvasGetSize(canvas_copy, &hdcpy_hsize, &hdcpy_vsize, 0L, 0L); + hdcpy_vpr = (double)hdcpy_vsize / (double)hdcpy_hsize; + xc = (int)((double)hdcpy_hsize/2.0); + yc = (int)((double)hdcpy_vsize/2.0); + + if (canvas_vpr < hdcpy_vpr) + { + xmin = 0; + xmax = hdcpy_hsize; + ymin = yc - (int)((double)hdcpy_hsize*(double)canvas_vpr/2.0); + ymax = yc + (int)((double)hdcpy_hsize*(double)canvas_vpr/2.0); + } + else + { + xmin = xc - (int)((double)hdcpy_vsize/(double)canvas_vpr/2.0); + xmax = xc + (int)((double)hdcpy_vsize/(double)canvas_vpr/2.0); + ymin = 0; + ymax = hdcpy_vsize; + } + + cdCanvasClipArea(canvas_copy, xmin, xmax, ymin, ymax); + cdCanvasClip(canvas_copy, CD_CLIPAREA); + wdCanvasViewport(canvas_copy, xmin, xmax, ymin, ymax); + + /* for backward compatibility */ + old_active = cdActiveCanvas(); + cdActivate(canvas_copy); + + /* Draw on hardcopy surface. */ + draw_func(canvas_copy); + + if (old_active) cdActivate(old_active); +} + +/* +** --------------------------------------------------------------- +** Entry points begin here: +*/ + +void wdCanvasHardcopy(cdCanvas *canvas, cdContext* ctx, void *data, void(*draw_func)(cdCanvas *canvas_copy)) +{ + /* Create a visualization surface. */ + cdCanvas *canvas_copy = cdCreateCanvas(ctx, data); + if (!canvas_copy) return; + + /* Do hardcopy. */ + _wdHdcpyDoit(canvas, canvas_copy, draw_func); + + /* Destroy visualization surface. */ + cdKillCanvas(canvas_copy); +} diff --git a/cd/src/win32/cdwclp.c b/cd/src/win32/cdwclp.c new file mode 100755 index 0000000..a62e9e8 --- /dev/null +++ b/cd/src/win32/cdwclp.c @@ -0,0 +1,552 @@ +/** \file + * \brief Windows Clipboard Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include + +#include "cdwin.h" +#include "cdclipbd.h" +#include "cdmf.h" +#include "cdemf.h" +#include "cdwmf.h" +#include "cdmf_private.h" + + +static cdSizeCB cdsizecb = NULL; + +static int cdregistercallback(int cb, cdCallback func) +{ + switch (cb) + { + case CD_SIZECB: + cdsizecb = (cdSizeCB)func; + return CD_OK; + } + + return CD_ERROR; +} + +/* +%F cdPlay para Clipboard. +Interpreta os dados do clipboard, seja metafile ou bitmap. +*/ +static int cdplay(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data) +{ + char tmpPath[512]; + char filename[1024]; + HANDLE hFile; + DWORD dwSize, nBytesWrite; + int err; + unsigned char* buffer; + (void)data; + + if (IsClipboardFormatAvailable(CF_TEXT)) + { + HANDLE Handle; + + GetTempPath(512, tmpPath); + GetTempFileName(tmpPath, "~cd", 0, filename); + + OpenClipboard(NULL); + Handle = GetClipboardData(CF_TEXT); + if (Handle == NULL) + { + CloseClipboard(); + return CD_ERROR; + } + + buffer = (unsigned char*)GlobalLock(Handle); + dwSize = (DWORD)GlobalSize(Handle); + + hFile = CreateFile(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); + WriteFile(hFile, buffer, dwSize, &nBytesWrite, NULL); + CloseHandle(hFile); + + GlobalUnlock(Handle); + + CloseClipboard(); + + err = cdCanvasPlay(canvas, CD_METAFILE, xmin, xmax, ymin, ymax, filename); + + DeleteFile(filename); + + if (err == CD_OK) + return err; + } + + if (IsClipboardFormatAvailable(CF_ENHMETAFILE)) + { + HENHMETAFILE Handle; + + GetTempPath(512, tmpPath); + GetTempFileName(tmpPath, "~cd", 0, filename); + + OpenClipboard(NULL); + Handle = (HENHMETAFILE)GetClipboardData(CF_ENHMETAFILE); + if (Handle == NULL) + { + CloseClipboard(); + return CD_ERROR; + } + + dwSize = GetEnhMetaFileBits(Handle, 0, NULL); + + buffer = (unsigned char*)malloc(dwSize); + + GetEnhMetaFileBits(Handle, dwSize, buffer); + + hFile = CreateFile(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); + WriteFile(hFile, buffer, dwSize, &nBytesWrite, NULL); + CloseHandle(hFile); + + free(buffer); + + CloseClipboard(); + + err = cdCanvasPlay(canvas, CD_EMF, xmin, xmax, ymin, ymax, filename); + + DeleteFile(filename); + + return err; + } + + if (IsClipboardFormatAvailable(CF_METAFILEPICT)) + { + HANDLE Handle; + METAFILEPICT* lpMFP; + + GetTempPath(512, tmpPath); + GetTempFileName(tmpPath, "~cd", 0, filename); + + OpenClipboard(NULL); + Handle = GetClipboardData(CF_METAFILEPICT); + if (Handle == NULL) + { + CloseClipboard(); + return CD_ERROR; + } + + lpMFP = (METAFILEPICT*) GlobalLock(Handle); + + dwSize = GetMetaFileBitsEx(lpMFP->hMF, 0, NULL); + buffer = (unsigned char*)malloc(dwSize); + + GetMetaFileBitsEx(lpMFP->hMF, dwSize, buffer); + + hFile = CreateFile(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); + wmfWritePlacebleFile(hFile, buffer, dwSize, lpMFP->mm, lpMFP->xExt, lpMFP->yExt); + CloseHandle(hFile); + + GlobalUnlock(Handle); + free(buffer); + + CloseClipboard(); + + err = cdCanvasPlay(canvas, CD_WMF, xmin, xmax, ymin, ymax, filename); + + DeleteFile(filename); + + return err; + } + + if (IsClipboardFormatAvailable(CF_DIB)) + { + HANDLE Handle; + int size; + cdwDIB dib; + + OpenClipboard(NULL); + Handle = GetClipboardData(CF_DIB); + if (Handle == NULL) + { + CloseClipboard(); + return CD_ERROR; + } + + cdwDIBReference(&dib, (BYTE*) GlobalLock(Handle), NULL); + + if (dib.type == -1) + { + GlobalUnlock(Handle); + CloseClipboard(); + return CD_ERROR; + } + + if (cdsizecb) + { + int err; + err = cdsizecb(canvas, dib.w, dib.h, dib.w, dib.h); + if (err) + { + GlobalUnlock(Handle); + CloseClipboard(); + return CD_ERROR; + } + } + + size = dib.w*dib.h; + + if (xmax == 0) xmax = dib.w + xmin - 1; + if (ymax == 0) ymax = dib.h + ymin - 1; + + if (dib.type == 0) + { + unsigned char *r, *g, *b; + + r = (unsigned char*)malloc(size); + g = (unsigned char*)malloc(size); + b = (unsigned char*)malloc(size); + + cdwDIBDecodeRGB(&dib, r, g, b); + + cdCanvasPutImageRectRGB(canvas, dib.w, dib.h, r, g, b, xmin, ymin, xmax - xmin + 1, ymax - ymin + 1, 0, 0, 0, 0); + + free(r); + free(g); + free(b); + } + else + { + unsigned char *index; + long *colors; + + index = (unsigned char*)malloc(size); + colors = (long*)malloc(256*sizeof(long)); + + cdwDIBDecodeMap(&dib, index, colors); + + cdCanvasPutImageRectMap(canvas, dib.w, dib.h, index, colors, xmin, ymin, xmax - xmin + 1, ymax - ymin + 1, 0, 0, 0, 0); + + free(index); + free(colors); + } + + GlobalUnlock(Handle); + + CloseClipboard(); + + return CD_ERROR; + } + + if (IsClipboardFormatAvailable(CF_BITMAP)) + { + HBITMAP Handle; + int size, type; + cdwDIB dib; + HDC ScreenDC; + SIZE sz; + + OpenClipboard(NULL); + Handle = GetClipboardData(CF_BITMAP); + if (Handle == NULL) + { + CloseClipboard(); + return CD_ERROR; + } + + GetBitmapDimensionEx(Handle, &sz); + + ScreenDC = GetDC(NULL); + if (GetDeviceCaps(ScreenDC, BITSPIXEL) > 8) + type = 0; + else + type = 1; + + dib.w = sz.cx; + dib.h = sz.cy; + dib.type = type; + + if (cdsizecb) + { + int err; + err = cdsizecb(canvas, dib.w, dib.h, dib.w, dib.h); + if (err) + { + ReleaseDC(NULL, ScreenDC); + CloseClipboard(); + return CD_ERROR; + } + } + + cdwCreateDIB(&dib); + + GetDIBits(ScreenDC, Handle, 0, sz.cy, dib.bits, dib.bmi, DIB_RGB_COLORS); + ReleaseDC(NULL, ScreenDC); + + size = dib.w*dib.h; + + if (dib.type == 0) + { + unsigned char *r, *g, *b; + + r = (unsigned char*)malloc(size); + g = (unsigned char*)malloc(size); + b = (unsigned char*)malloc(size); + + cdwDIBDecodeRGB(&dib, r, g, b); + + cdCanvasPutImageRectRGB(canvas, dib.w, dib.h, r, g, b, 0, 0, dib.w, dib.h, 0, 0, 0, 0); + + free(r); + free(g); + free(b); + } + else + { + unsigned char *index; + long *colors; + + index = (unsigned char*)malloc(size); + colors = (long*)malloc(256*sizeof(long)); + + cdwDIBDecodeMap(&dib, index, colors); + + cdCanvasPutImageRectMap(canvas, dib.w, dib.h, index, colors, 0, 0, dib.w, dib.h, 0, 0, 0, 0); + + free(index); + free(colors); + } + + cdwKillDIB(&dib); + + CloseClipboard(); + + return CD_ERROR; + } + + return CD_ERROR; +} + +static void cdkillcanvasCLIPBDMF (cdCtxCanvas *ctxcanvas) +{ + HANDLE Handle, hFile; + char* buffer; + DWORD dwSize, nBytesRead; + char filename[10240]; + cdCanvasMF* mfcanvas = (cdCanvasMF*)ctxcanvas; + + /* guardar antes de remover o canvas */ + strcpy(filename, mfcanvas->filename); + + OpenClipboard(NULL); + EmptyClipboard(); + + cdkillcanvasMF(mfcanvas); /* this will close the file */ + + hFile = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, NULL); + dwSize = GetFileSize (hFile, NULL) ; + + Handle = GlobalAlloc(GMEM_MOVEABLE, dwSize+1); + buffer = (char*)GlobalLock(Handle); + ReadFile(hFile, buffer, dwSize, &nBytesRead, NULL); + buffer[dwSize] = 0; + GlobalUnlock(Handle); + + CloseHandle(hFile); + + SetClipboardData(CF_TEXT, Handle); + + CloseClipboard(); +} + +static void cdkillcanvas (cdCtxCanvas *ctxcanvas) +{ + cdwKillCanvas(ctxcanvas); + + OpenClipboard(NULL); + EmptyClipboard(); + + if (ctxcanvas->wtype == CDW_WMF) + { + HMETAFILE hmf = CloseMetaFile(ctxcanvas->hDC); + + HANDLE hMemG; + METAFILEPICT* lpMFP; + + hMemG = GlobalAlloc(GHND|GMEM_DDESHARE, (DWORD)sizeof(METAFILEPICT)); + lpMFP = (METAFILEPICT*) GlobalLock(hMemG); + + lpMFP->mm = MM_ANISOTROPIC; + lpMFP->xExt = (long)(100 * ctxcanvas->canvas->w_mm); + lpMFP->yExt = (long)(100 * ctxcanvas->canvas->h_mm); + + lpMFP->hMF = hmf; + + GlobalUnlock(hMemG); + SetClipboardData(CF_METAFILEPICT, hMemG); + } + else if (ctxcanvas->wtype == CDW_EMF) + { + HENHMETAFILE hmf = CloseEnhMetaFile(ctxcanvas->hDC); + SetClipboardData(CF_ENHMETAFILE, hmf); + } + else + { + HANDLE hDib; + + GdiFlush(); + + hDib = cdwCreateCopyHDIB(&ctxcanvas->bmiClip, ctxcanvas->bitsClip); + + SelectObject(ctxcanvas->hDC, ctxcanvas->hOldBitmapClip); + DeleteObject(ctxcanvas->hBitmapClip); + DeleteDC(ctxcanvas->hDC); + + SetClipboardData(CF_DIB, hDib); + } + + CloseClipboard(); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + char* strsize = (char*)data; + int w = 0, h = 0, wtype = CDW_EMF; /* default clipboard type */ + double xres=0, yres=0; + HDC hDC; + BITMAPINFO bmi; + BYTE* bits; + HBITMAP hBitmapClip, hOldBitmapClip; + + /* Inicializa parametros */ + if (strsize == NULL) + return; + + if (strstr(strsize, "-b") != NULL) + wtype = CDW_BMP; + else if (strstr(strsize, "-m") != NULL) + wtype = -1; /* CD METAFILE */ + + if (wtype != -1) + { + sscanf(strsize,"%dx%d",&w, &h); + if (w == 0 || h == 0) + return; + } + + if (wtype == CDW_EMF) + { + HDC ScreenDC = GetDC(NULL); + RECT rect; + /* LOGPIXELS can not be used for EMF */ + xres = (double)GetDeviceCaps(ScreenDC, HORZRES) / (double)GetDeviceCaps(ScreenDC, HORZSIZE); + yres = (double)GetDeviceCaps(ScreenDC, VERTRES) / (double)GetDeviceCaps(ScreenDC, VERTSIZE); + rect.left = 0; + rect.top = 0; + rect.right = (int)(100. * w / xres); + rect.bottom = (int)(100. * h / yres); + hDC = CreateEnhMetaFile(ScreenDC,NULL,&rect,NULL); + ReleaseDC(NULL, ScreenDC); + } + else if (wtype == CDW_BMP) + { + HDC ScreenDC = GetDC(NULL); + hDC = CreateCompatibleDC(ScreenDC); + xres = (double)GetDeviceCaps(ScreenDC, HORZRES) / (double)GetDeviceCaps(ScreenDC, HORZSIZE); + yres = (double)GetDeviceCaps(ScreenDC, VERTRES) / (double)GetDeviceCaps(ScreenDC, VERTSIZE); + + bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bmi.bmiHeader.biWidth = w; + bmi.bmiHeader.biHeight = h; + bmi.bmiHeader.biPlanes = 1; + bmi.bmiHeader.biBitCount = 24; + bmi.bmiHeader.biCompression = BI_RGB; + bmi.bmiHeader.biSizeImage = 0; + bmi.bmiHeader.biXPelsPerMeter = (long)(GetDeviceCaps(ScreenDC, LOGPIXELSX) / 0.0254); + bmi.bmiHeader.biYPelsPerMeter = (long)(GetDeviceCaps(ScreenDC, LOGPIXELSY) / 0.0254); + bmi.bmiHeader.biClrUsed = 0; + bmi.bmiHeader.biClrImportant = 0; + + hBitmapClip = CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, &bits, NULL, 0); + + ReleaseDC(NULL, ScreenDC); + + if (!hBitmapClip) + return; + + hOldBitmapClip = SelectObject(hDC, hBitmapClip); + } + + if (wtype == -1) + { + char filename[1024]; + char tmpPath[512]; + char str[1024]; + + GetTempPath(512, tmpPath); + GetTempFileName(tmpPath, "~cd", 0, filename); + + sprintf(str, "%s %s", filename, strsize); + cdcreatecanvasMF(canvas, str); + } + else + { + cdCtxCanvas* ctxcanvas; + + /* Inicializa driver WIN32 */ + ctxcanvas = cdwCreateCanvas(canvas, NULL, hDC, wtype); + + canvas->w = w; + canvas->h = h; + canvas->xres = xres; + canvas->yres = yres; + canvas->w_mm = ((double)w) / xres; + canvas->h_mm = ((double)h) / yres; + canvas->bpp = 24; + ctxcanvas->clip_pnt[2].x = ctxcanvas->clip_pnt[1].x = canvas->w - 1; + ctxcanvas->clip_pnt[3].y = ctxcanvas->clip_pnt[2].y = canvas->h - 1; + + if (wtype == CDW_BMP) + { + ctxcanvas->hBitmapClip = hBitmapClip; + ctxcanvas->hOldBitmapClip = hOldBitmapClip; + ctxcanvas->bmiClip = bmi; + ctxcanvas->bitsClip = bits; + } + } +} + +static void cdinittable(cdCanvas* canvas) +{ + if (canvas->invert_yaxis == 0) /* a simple way to distinguish MF from WIN */ + { + cdinittableMF(canvas); + canvas->cxKillCanvas = cdkillcanvasCLIPBDMF; + } + else + { + cdwInitTable(canvas); + canvas->cxKillCanvas = cdkillcanvas; + } +} + +static cdContext cdClipboardContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_YAXIS | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | + CD_CAP_FPRIMTIVES ), + 0, + cdcreatecanvas, + cdinittable, + cdplay, + cdregistercallback +}; + +cdContext* cdContextClipboard(void) +{ + if (cdUseContextPlus(CD_QUERY)) + { + cdContext* ctx = cdGetContextPlus(CD_CTX_CLIPBOARD); + if (ctx != NULL) + return ctx; + } + + return &cdClipboardContext; +} diff --git a/cd/src/win32/cdwdbuf.c b/cd/src/win32/cdwdbuf.c new file mode 100755 index 0000000..85af87c --- /dev/null +++ b/cd/src/win32/cdwdbuf.c @@ -0,0 +1,181 @@ +/** \file + * \brief Windows Double Buffer + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "cdwin.h" +#include "cddbuf.h" + + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + cdKillImage(ctxcanvas->image_dbuffer); + cdwKillCanvas(ctxcanvas); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +static void cddeactivate(cdCtxCanvas* ctxcanvas) +{ + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + /* this is done in the canvas_dbuffer context */ + cdCanvasDeactivate(canvas_dbuffer); +} + +static void cdflush(cdCtxCanvas *ctxcanvas) +{ + int old_writemode; + cdImage* image_dbuffer = ctxcanvas->image_dbuffer; + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + + GdiFlush(); + + /* this is done in the canvas_dbuffer context */ + /* Flush can be affected by Origin and Clipping, but not WriteMode */ + old_writemode = cdCanvasWriteMode(canvas_dbuffer, CD_REPLACE); + cdCanvasPutImageRect(canvas_dbuffer, image_dbuffer, 0, 0, 0, 0, 0, 0); + cdCanvasWriteMode(canvas_dbuffer, old_writemode); +} + +static void cdcreatecanvas(cdCanvas* canvas, cdCanvas* canvas_dbuffer) +{ + int w, h; + cdCtxCanvas* ctxcanvas; + cdImage* image_dbuffer; + cdCtxImage* ctximage; + + cdCanvasActivate(canvas_dbuffer); + w = canvas_dbuffer->w; + h = canvas_dbuffer->h; + if (w==0) w=1; + if (h==0) h=1; + + /* this is done in the canvas_dbuffer context */ + image_dbuffer = cdCanvasCreateImage(canvas_dbuffer, w, h); + if (!image_dbuffer) + return; + + ctximage = image_dbuffer->ctximage; + + /* Inicializa driver DBuffer */ + ctxcanvas = cdwCreateCanvas(canvas, NULL, ctximage->hDC, CDW_BMP); + + ctxcanvas->image_dbuffer = image_dbuffer; + ctxcanvas->canvas_dbuffer = canvas_dbuffer; + + canvas->w = ctximage->w; + canvas->h = ctximage->h; + canvas->w_mm = ctximage->w_mm; + canvas->h_mm = ctximage->h_mm; + canvas->bpp = ctximage->bpp; + canvas->xres = ctximage->xres; + canvas->yres = ctximage->yres; + ctxcanvas->clip_pnt[2].x = ctxcanvas->clip_pnt[1].x = ctximage->w - 1; + ctxcanvas->clip_pnt[3].y = ctxcanvas->clip_pnt[2].y = ctximage->h - 1; +} + +static int cdactivate(cdCtxCanvas *ctxcanvas) +{ + int w, h; + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + + /* this is done in the canvas_dbuffer context */ + /* this will update canvas size */ + cdCanvasActivate(canvas_dbuffer); + w = canvas_dbuffer->w; + h = canvas_dbuffer->h; + if (w==0) w=1; + if (h==0) h=1; + + /* check if the size changed */ + if (w != ctxcanvas->image_dbuffer->w || + h != ctxcanvas->image_dbuffer->h) + { + cdCanvas* canvas = ctxcanvas->canvas; + /* save the current, if the rebuild fail */ + cdImage* old_image_dbuffer = ctxcanvas->image_dbuffer; + cdCtxCanvas* old_ctxcanvas = ctxcanvas; + + /* if the image is rebuild, the canvas that uses the image must be also rebuild */ + + /* rebuild the image and the canvas */ + canvas->ctxcanvas = NULL; + cdcreatecanvas(canvas, canvas_dbuffer); + if (!canvas->ctxcanvas) + { + canvas->ctxcanvas = old_ctxcanvas; + return CD_ERROR; + } + + /* remove the old image and canvas */ + cdKillImage(old_image_dbuffer); + cdwKillCanvas(old_ctxcanvas); + free(old_ctxcanvas); + + ctxcanvas = canvas->ctxcanvas; + + /* update canvas attributes */ + canvas->cxBackground(ctxcanvas, canvas->background); + canvas->cxForeground(ctxcanvas, canvas->foreground); + canvas->cxBackOpacity(ctxcanvas, canvas->back_opacity); + canvas->cxWriteMode(ctxcanvas, canvas->write_mode); + canvas->cxLineStyle(ctxcanvas, canvas->line_style); + canvas->cxLineWidth(ctxcanvas, canvas->line_width); + canvas->cxLineCap(ctxcanvas, canvas->line_cap); + canvas->cxLineJoin(ctxcanvas, canvas->line_join); + canvas->cxHatch(ctxcanvas, canvas->hatch_style); + if (canvas->stipple) canvas->cxStipple(ctxcanvas, canvas->stipple_w, canvas->stipple_h, canvas->stipple); + if (canvas->pattern) canvas->cxPattern(ctxcanvas, canvas->pattern_w, canvas->pattern_h, canvas->pattern); + canvas->cxInteriorStyle(ctxcanvas, canvas->interior_style); + if (canvas->native_font[0] == 0) canvas->cxFont(ctxcanvas, canvas->font_type_face, canvas->font_style, canvas->font_size); + else canvas->cxNativeFont(ctxcanvas, canvas->native_font); + canvas->cxTextAlignment(ctxcanvas, canvas->text_alignment); + canvas->cxTextOrientation(ctxcanvas, canvas->text_orientation); + if (canvas->use_matrix && canvas->cxTransform) canvas->cxTransform(ctxcanvas, canvas->matrix); + if (canvas->clip_mode == CD_CLIPAREA && canvas->cxClipArea) canvas->cxClipArea(ctxcanvas, canvas->clip_rect.xmin, canvas->clip_rect.xmax, canvas->clip_rect.ymin, canvas->clip_rect.ymax); +/* if (canvas->clip_mode == CD_CLIPAREA && canvas->cxFClipArea) canvas->cxFClipArea(ctxcanvas, canvas->clip_frect.xmin, canvas->clip_frect.xmax, canvas->clip_frect.ymin, canvas->clip_frect.ymax); */ + if (canvas->clip_mode == CD_CLIPPOLYGON && canvas->clip_poly) canvas->cxPoly(ctxcanvas, CD_CLIP, canvas->clip_poly, canvas->clip_poly_n); +/* if (canvas->clip_mode == CD_CLIPPOLYGON && canvas->clip_fpoly) canvas->cxFPoly(ctxcanvas, CD_CLIP, canvas->clip_fpoly, canvas->clip_poly_n); */ + if (canvas->clip_mode != CD_CLIPOFF) canvas->cxClip(ctxcanvas, canvas->clip_mode); + } + + return CD_OK; +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwInitTable(canvas); + + canvas->cxActivate = cdactivate; + canvas->cxDeactivate = cddeactivate; + canvas->cxFlush = cdflush; + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdDBufferContext = +{ + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | + CD_CAP_FPRIMTIVES ), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +cdContext* cdContextDBuffer(void) +{ + if (cdUseContextPlus(CD_QUERY)) + { + cdContext* ctx = cdGetContextPlus(CD_CTX_DBUFFER); + if (ctx != NULL) + return ctx; + } + + return &cdDBufferContext; +} diff --git a/cd/src/win32/cdwdib.c b/cd/src/win32/cdwdib.c new file mode 100755 index 0000000..aff3f64 --- /dev/null +++ b/cd/src/win32/cdwdib.c @@ -0,0 +1,662 @@ +/** \file + * \brief Windows DIB Utilities + * + * See Copyright Notice in cd.h + */ + +#include "cdwin.h" + + +/* +%F Calcula o tamanho de uma linha. O DIB existe em uma "long boundary", +ou seja cada linha e' um multiplo de quatro bytes ou 32 bits. +*/ +static int cdwDIBLineSize(int width, int bpp) +{ + return ((width * bpp + 31L) / 32L) * 4L; +} + + +/* +%F Alloca memoria para o DIB com os par^ametros do cdwDIB. +*/ +int cdwCreateDIB(cdwDIB* dib) +{ + int dibSize, pal_size; + BITMAPINFOHEADER* bmih; + + pal_size = dib->type? 256: 0; + dibSize = sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * pal_size + cdwDIBLineSize(dib->w, dib->type? 8: 24) * dib->h; + + dib->dib = (BYTE*) calloc(dibSize, 1); + if (dib->dib == NULL) + return 0; + + dib->bmi = (BITMAPINFO*)dib->dib; + dib->bmih = (BITMAPINFOHEADER*)dib->dib; + dib->bmic = (RGBQUAD*)(dib->dib + sizeof(BITMAPINFOHEADER)); + dib->bits = dib->dib + sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * pal_size; + + bmih = dib->bmih; + bmih->biSize = sizeof(BITMAPINFOHEADER); + bmih->biWidth = dib->w; + bmih->biHeight = dib->h; + bmih->biPlanes = 1; + bmih->biBitCount = dib->type? 8: 24; + bmih->biCompression = 0; + bmih->biSizeImage = 0; + bmih->biXPelsPerMeter = 0; + bmih->biYPelsPerMeter = 0; + bmih->biClrUsed = dib->type? 256: 0; + bmih->biClrImportant = dib->type? 256: 0; + + return 1; +} + +HANDLE cdwCreateCopyHDIB(BITMAPINFO* bmi, BYTE* bits) +{ + int dibSize, pal_size, headerSize; + HANDLE hDib; unsigned char* pDib; + + if (bmi->bmiHeader.biBitCount > 8) + { + pal_size = 0; + + if (bmi->bmiHeader.biCompression == BI_BITFIELDS) + pal_size = 3; + } + else + { + if (bmi->bmiHeader.biClrUsed != 0) + pal_size = bmi->bmiHeader.biClrUsed; + else + pal_size = 1 << bmi->bmiHeader.biBitCount; + } + + /* calc size */ + headerSize = sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * pal_size; + dibSize = headerSize + cdwDIBLineSize(bmi->bmiHeader.biWidth, bmi->bmiHeader.biBitCount) * bmi->bmiHeader.biHeight; + + hDib = GlobalAlloc(GHND, dibSize); + if (!hDib) + return NULL; + + /* Get a pointer to the memory block */ + pDib = (LPBYTE)GlobalLock(hDib); + + /* copy struct data */ + CopyMemory(pDib, bmi, headerSize); + + /* copy dib data */ + CopyMemory(pDib + headerSize, bits, dibSize - headerSize); + + GlobalUnlock(hDib); + + return hDib; +} + +int cdwCreateDIBRefBuffer(cdwDIB* dib, unsigned char* *bits, int *size) +{ + int dibSize, pal_size; + BITMAPINFOHEADER* bmih; + + pal_size = dib->type? 256: 0; + dibSize = sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * pal_size + cdwDIBLineSize(dib->w, dib->type? 8: 24) * dib->h; + + /* bits may contains an allocated buffer, but no dib */ + if (*bits && *size >= dibSize) + dib->dib = *bits; + else + { + *size = dibSize; + + if (*bits) + *bits = realloc(*bits, *size); + else + *bits = malloc(*size); + + dib->dib = *bits; + } + + if (dib->dib == NULL) + return 0; + + dib->bmi = (BITMAPINFO*)dib->dib; + dib->bmih = (BITMAPINFOHEADER*)dib->dib; + dib->bmic = (RGBQUAD*)(dib->dib + sizeof(BITMAPINFOHEADER)); + dib->bits = dib->dib + sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * pal_size; + + bmih = dib->bmih; + bmih->biSize = sizeof(BITMAPINFOHEADER); + bmih->biWidth = dib->w; + bmih->biHeight = dib->h; + bmih->biPlanes = 1; + bmih->biBitCount = dib->type? 8: 24; + bmih->biCompression = 0; + bmih->biSizeImage = 0; + bmih->biXPelsPerMeter = 0; + bmih->biYPelsPerMeter = 0; + bmih->biClrUsed = dib->type? 256: 0; + bmih->biClrImportant = dib->type? 256: 0; + + return 1; +} + +void cdwCreateDIBRefBits(cdwDIB* dib, unsigned char *bits) +{ + BITMAPINFO* bmi = malloc(sizeof(BITMAPINFO)); + + bmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bmi->bmiHeader.biWidth = dib->w; + bmi->bmiHeader.biHeight = dib->h; + bmi->bmiHeader.biPlanes = 1; + bmi->bmiHeader.biBitCount = dib->type==0? 24: 32; + bmi->bmiHeader.biCompression = BI_RGB; + bmi->bmiHeader.biXPelsPerMeter = 0; + bmi->bmiHeader.biYPelsPerMeter = 0; + bmi->bmiHeader.biSizeImage = 0; + bmi->bmiHeader.biClrUsed = 0; + bmi->bmiHeader.biClrImportant = 0; + + cdwDIBReference(dib, (BYTE*)bmi, bits); + + /* restore correct type */ + if (bmi->bmiHeader.biBitCount == 32) + dib->type = 2; +} + +HBITMAP cdwCreateDIBSection(cdwDIB* dib, HDC hDC) +{ + HBITMAP hbitmap; + BYTE *pvBits; + BITMAPINFO* bmi = malloc(sizeof(BITMAPINFO)); + + bmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bmi->bmiHeader.biWidth = dib->w; + bmi->bmiHeader.biHeight = dib->h; + bmi->bmiHeader.biPlanes = 1; + bmi->bmiHeader.biBitCount = dib->type==0? 24: 32; + bmi->bmiHeader.biCompression = BI_RGB; + bmi->bmiHeader.biXPelsPerMeter = (long)(GetDeviceCaps(hDC, LOGPIXELSX) / 0.0254); + bmi->bmiHeader.biYPelsPerMeter = (long)(GetDeviceCaps(hDC, LOGPIXELSY) / 0.0254); + bmi->bmiHeader.biSizeImage = 0; + bmi->bmiHeader.biClrUsed = 0; + bmi->bmiHeader.biClrImportant = 0; + + hbitmap = CreateDIBSection(hDC, bmi, DIB_RGB_COLORS, &pvBits, NULL, 0x0); + + if (hbitmap) + { + cdwDIBReference(dib, (BYTE*)bmi, pvBits); + + /* restore correct type */ + if (bmi->bmiHeader.biBitCount == 32) + dib->type = 2; + } + else + free(bmi); + + return hbitmap; +} + +void cdwDIBReference(cdwDIB* dib, BYTE* bmi, BYTE* bits) +{ + int pal_size; + + dib->dib = bmi; + + dib->bmi = (BITMAPINFO*)bmi; + dib->bmih = &dib->bmi->bmiHeader; + dib->bmic = dib->bmi->bmiColors; + + if (dib->bmih->biBitCount > 8) + { + dib->type = 0; + pal_size = 0; + + if (dib->bmih->biCompression == BI_BITFIELDS) + pal_size = 3; + } + else + { + dib->type = 1; + + if (dib->bmih->biClrUsed != 0) + pal_size = dib->bmih->biClrUsed; + else + pal_size = 1 << dib->bmih->biBitCount; + } + + if (bits == NULL) + dib->bits = dib->dib + sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * pal_size; + else + dib->bits = bits; + + dib->w = dib->bmih->biWidth; + dib->h = dib->bmih->biHeight; +} + + +/* %F Libera a memoria alocada para o DIB. */ +void cdwKillDIB(cdwDIB* dib) +{ + free(dib->dib); +} + +/* %F Converte cor de CD para DIB. */ +static RGBQUAD sColorToDIB(long cd_color) +{ + RGBQUAD color; + color.rgbRed = cdRed(cd_color); + color.rgbGreen = cdGreen(cd_color); + color.rgbBlue = cdBlue(cd_color); + return color; +} + +void cdwDIBEncodeRGBRect(cdwDIB* dib, const unsigned char *red, const unsigned char *green, const unsigned char *blue, int xi, int yi, int wi, int hi) +{ + int x,y, resto1, resto2, offset; + BYTE* bits; + + bits = dib->bits; + resto1 = cdwDIBLineSize(dib->w, 24) - dib->w * 3; + resto2 = wi - dib->w; + + offset = wi * yi + xi; + + red = red + offset; + green = green + offset; + blue = blue + offset; + + for (y = 0; y < dib->h; y++) + { + for (x = 0; x < dib->w; x++) + { + *bits++ = *blue++; + *bits++ = *green++; + *bits++ = *red++; + } + + bits += resto1; + + red += resto2; + green += resto2; + blue += resto2; + } +} + +/* RGB in RGBA DIBs are pre-multiplied by alpha to AlphaBlend usage. */ +#define CD_ALPHAPRE(_src, _alpha) (((_src)*(_alpha))/255) + +void cdwDIBEncodeRGBARect(cdwDIB* dib, const unsigned char *red, const unsigned char *green, const unsigned char *blue, const unsigned char *alpha, int xi, int yi, int wi, int hi) +{ + int x,y, resto1, resto2, offset; + BYTE* bits; + + bits = dib->bits; + resto1 = cdwDIBLineSize(dib->w, 32) - dib->w * 4; + resto2 = wi - dib->w; + + offset = wi * yi + xi; + + red = red + offset; + green = green + offset; + blue = blue + offset; + alpha = alpha + offset; + + for (y = 0; y < dib->h; y++) + { + for (x = 0; x < dib->w; x++) + { + *bits++ = CD_ALPHAPRE(*blue, *alpha); blue++; + *bits++ = CD_ALPHAPRE(*green, *alpha); green++; + *bits++ = CD_ALPHAPRE(*red, *alpha); red++; + *bits++ = *alpha++; + } + + bits += resto1; + + red += resto2; + green += resto2; + blue += resto2; + alpha += resto2; + } +} + +void cdwDIBEncodeAlphaRect(cdwDIB* dib, const unsigned char *alpha, int xi, int yi, int wi, int hi) +{ + int x,y, resto1, resto2, offset; + BYTE* bits; + + bits = dib->bits; + resto1 = cdwDIBLineSize(dib->w, 32) - dib->w * 4; + resto2 = wi - dib->w; + + offset = wi * yi + xi; + + alpha = alpha + offset; + + for (y = 0; y < dib->h; y++) + { + for (x = 0; x < dib->w; x++) + { + *bits++ = CD_ALPHAPRE(*bits, *alpha); + *bits++ = CD_ALPHAPRE(*bits, *alpha); + *bits++ = CD_ALPHAPRE(*bits, *alpha); + *bits++ = *alpha++; + } + + bits += resto1; + alpha += resto2; + } +} + +void cdwDIBEncodeRGBARectZoom(cdwDIB* dib, const unsigned char *red, const unsigned char *green, const unsigned char *blue, const unsigned char *alpha, int w, int h, int xi, int yi, int wi, int hi) +{ + int x,y, resto1, resto2, offset; + BYTE* bits; + const unsigned char *_red, *_green, *_blue, *_alpha; + unsigned char a; + + bits = dib->bits; + resto1 = cdwDIBLineSize(dib->w, 24) - dib->w * 3; + + if (dib->w != wi || dib->h != hi) + { + int* XTab = cdGetZoomTable(dib->w, wi, xi); + int* YTab = cdGetZoomTable(dib->h, hi, yi); + + for (y = 0; y < dib->h; y++) + { + offset = YTab[y] * w; + _red = red + offset; + _green = green + offset; + _blue = blue + offset; + _alpha = alpha + offset; + + for (x = 0; x < dib->w; x++) + { + offset = XTab[x]; + a = _alpha[offset]; + *bits++ = CD_ALPHA_BLEND(_blue[offset], *bits, a); + *bits++ = CD_ALPHA_BLEND(_green[offset], *bits, a); + *bits++ = CD_ALPHA_BLEND(_red[offset], *bits, a); + } + + bits += resto1; + } + + free(XTab); + free(YTab); + } + else + { + resto2 = w - wi; + + offset = w * yi + xi; + red = red + offset; + green = green + offset; + blue = blue + offset; + alpha = alpha + offset; + + for (y = 0; y < dib->h; y++) + { + for (x = 0; x < dib->w; x++) + { + a = *alpha++; + *bits++ = CD_ALPHA_BLEND(*blue++, *bits, a); + *bits++ = CD_ALPHA_BLEND(*green++, *bits, a); + *bits++ = CD_ALPHA_BLEND(*red++, *bits, a); + } + + bits += resto1; + + red += resto2; + green += resto2; + blue += resto2; + alpha += resto2; + } + } +} + +/* +%F Copia os pixels de um DIB em 3 matrizes red, green e +blue, respectivamente. As matrizes, armazenadas num vetor de bytes devem +ter a mesma dimens~ao da imagem. +*/ +void cdwDIBDecodeRGB(cdwDIB* dib, unsigned char *red, unsigned char *green, unsigned char *blue) +{ + int x,y, offset; + unsigned short color; + BYTE* bits; + unsigned long rmask=0, gmask=0, bmask=0, + roff = 0, goff = 0, boff = 0; /* pixel bit mask control when reading 16 and 32 bpp images */ + + bits = dib->bits; + + if (dib->bmih->biBitCount == 16) + offset = cdwDIBLineSize(dib->w, dib->bmih->biBitCount); + else + offset = cdwDIBLineSize(dib->w, dib->bmih->biBitCount) - dib->w * (dib->bmih->biBitCount == 24?3:4); + + if (dib->bmih->biCompression == BI_BITFIELDS) + { + unsigned long Mask; + unsigned long* palette = (unsigned long*)dib->bmic; + + rmask = Mask = palette[0]; + while (!(Mask & 0x01)) + {Mask >>= 1; roff++;} + + gmask = Mask = palette[1]; + while (!(Mask & 0x01)) + {Mask >>= 1; goff++;} + + bmask = Mask = palette[2]; + while (!(Mask & 0x01)) + {Mask >>= 1; boff++;} + } + else if (dib->bmih->biBitCount == 16) + { + bmask = 0x001F; + gmask = 0x03E0; + rmask = 0x7C00; + boff = 0; + goff = 5; + roff = 10; + } + + for (y = 0; y < dib->h; y++) + { + for (x = 0; x < dib->w; x++) + { + if (dib->bmih->biBitCount != 16) + { + *blue++ = *bits++; + *green++ = *bits++; + *red++ = *bits++; + + if (dib->bmih->biBitCount == 32) + bits++; + } + else + { + color = ((unsigned short*)bits)[x]; + *red++ = (unsigned char)((((rmask & color) >> roff) * 255) / (rmask >> roff)); + *green++ = (unsigned char)((((gmask & color) >> goff) * 255) / (gmask >> goff)); + *blue++ = (unsigned char)((((bmask & color) >> boff) * 255) / (bmask >> boff)); + } + } + + bits += offset; + } +} + +void cdwDIBDecodeMap(cdwDIB* dib, unsigned char *index, long *colors) +{ + int x,y, line_size,c,pal_size; + BYTE* bits; + RGBQUAD* bmic; + + bmic = dib->bmic; + bits = dib->bits; + line_size = cdwDIBLineSize(dib->w, dib->bmih->biBitCount); + pal_size = dib->bmih->biClrUsed != 0? dib->bmih->biClrUsed: 1 << dib->bmih->biBitCount; + + for (y = 0; y < dib->h; y++) + { + for (x = 0; x < dib->w; x++) + { + switch (dib->bmih->biBitCount) + { + case 1: + *index++ = (unsigned char)((bits[x / 8] >> (7 - x % 8)) & 0x01); + break; + case 4: + *index++ = (unsigned char)((bits[x / 2] >> ((1 - x % 2) * 4)) & 0x0F); + break; + case 8: + *index++ = bits[x]; + break; + } + } + + bits += line_size; + } + + for (c = 0; c < pal_size; c++) + { + colors[c] = cdEncodeColor(bmic->rgbRed, bmic->rgbGreen, bmic->rgbBlue); + bmic++; + } +} + +/* +%F Cria uma Logical palette a partir da palette do DIB. +*/ +HPALETTE cdwDIBLogicalPalette(cdwDIB* dib) +{ + LOGPALETTE* pLogPal; + PALETTEENTRY* pPalEntry; + HPALETTE hPal; + RGBQUAD* bmic; + int c; + + pLogPal = (LOGPALETTE*)malloc(sizeof(LOGPALETTE) + 256 * sizeof(PALETTEENTRY)); + pLogPal->palVersion = 0x300; + pLogPal->palNumEntries = 256; + + bmic = dib->bmic; + pPalEntry = pLogPal->palPalEntry; + + for (c = 0; c < 256; c++) + { + pPalEntry->peRed = bmic->rgbRed; + pPalEntry->peGreen = bmic->rgbGreen; + pPalEntry->peBlue = bmic->rgbBlue; + pPalEntry->peFlags = PC_NOCOLLAPSE; + + pPalEntry++; + bmic++; + } + + hPal = CreatePalette(pLogPal); + free(pLogPal); + + return hPal; +} + +/* +%F Copia os pixels definidos por uma matriz de indices e palheta de +de cores num DIB de mesma dimens~ao. +*/ +void cdwDIBEncodeMap(cdwDIB* dib, unsigned char *index, long int *colors) +{ + int x,y, pal_size, resto, c; + BYTE* bits; + RGBQUAD* bmic; + + bits = dib->bits; + bmic = dib->bmic; + resto = cdwDIBLineSize(dib->w, 8) - dib->w; + + /* Como nao sabemos o tamanho da palette a priori, + teremos que ver qual o maior indice usado na imagem. */ + pal_size = *index; + + for (y = 0; y < dib->h; y++) + { + for (x = 0; x < dib->w; x++) + { + if (*index > pal_size) + pal_size = *index; + + *bits++ = *index++; + } + + bits += resto; + } + + pal_size++; + + for (c = 0; c < pal_size; c++) + *bmic++ = sColorToDIB(colors[c]); +} + +void cdwDIBEncodeMapRect(cdwDIB* dib, const unsigned char *index, const long int *colors, int xi, int yi, int wi, int hi) +{ + int x,y, pal_size, resto1, resto2, c; + BYTE* bits; + RGBQUAD* bmic; + + bits = dib->bits; + bmic = dib->bmic; + resto1 = cdwDIBLineSize(dib->w, 8) - dib->w; + resto2 = wi - dib->w; + + index = index + (wi * yi + xi); + + /* Como nao sabemos o tamanho da palette a priori, + teremos que ver qual o maior indice usado na imagem. */ + pal_size = *index; + + for (y = 0; y < dib->h; y++) + { + for (x = 0; x < dib->w; x++) + { + if (*index > pal_size) + pal_size = *index; + + *bits++ = *index++; + } + + bits += resto1; + index += resto2; + } + + pal_size++; + + for (c = 0; c < pal_size; c++) + *bmic++ = sColorToDIB(colors[c]); +} + +void cdwDIBEncodePattern(cdwDIB* dib, const long int *colors) +{ + int x,y, resto1; + BYTE* bits; + + bits = dib->bits; + resto1 = cdwDIBLineSize(dib->w, 24) - dib->w * 3; + + for (y = 0; y < dib->h; y++) + { + for (x = 0; x < dib->w; x++) + { + *bits++ = cdBlue(*colors); + *bits++ = cdGreen(*colors); + *bits++ = cdRed(*colors); + colors++; + } + bits += resto1; + } +} diff --git a/cd/src/win32/cdwemf.c b/cd/src/win32/cdwemf.c new file mode 100755 index 0000000..ad037c9 --- /dev/null +++ b/cd/src/win32/cdwemf.c @@ -0,0 +1,117 @@ +/** \file + * \brief Windows EMF Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "cdwin.h" +#include "cdemf.h" + + + +static void cdkillcanvas (cdCtxCanvas* ctxcanvas) +{ + HENHMETAFILE hmf; + + cdwKillCanvas(ctxcanvas); + + hmf = CloseEnhMetaFile(ctxcanvas->hDC); + DeleteEnhMetaFile(hmf); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +/* +%F cdCreateCanvas para EMF. +O DC é um EMF em memoria. +*/ +static void cdcreatecanvas(cdCanvas* canvas, void* data) +{ + cdCtxCanvas* ctxcanvas; + char* strdata = (char*)data; + int w = 0, h = 0; + double xres, yres; + FILE* file; + char filename[10240] = ""; + HDC ScreenDC, hDC; + RECT rect; + + /* Inicializa parametros */ + if (strdata == NULL) + return; + + strdata += cdGetFileName(strdata, filename); + if (filename[0] == 0) + return; + + sscanf(strdata,"%dx%d", &w, &h); + if (w == 0 || h == 0) + return; + + /* Verifica se o arquivo pode ser aberto para escrita */ + file = fopen(filename, "wb"); + if (file == NULL) return; + fclose(file); + + ScreenDC = GetDC(NULL); + /* LOGPIXELS can not be used for EMF */ + xres = (double)GetDeviceCaps(ScreenDC, HORZRES) / (double)GetDeviceCaps(ScreenDC, HORZSIZE); + yres = (double)GetDeviceCaps(ScreenDC, VERTRES) / (double)GetDeviceCaps(ScreenDC, VERTSIZE); + rect.left = 0; + rect.top = 0; + rect.right = (int)(100. * w / xres); + rect.bottom = (int)(100. * h / yres); + hDC = CreateEnhMetaFile(ScreenDC,filename,&rect,NULL); + ReleaseDC(NULL, ScreenDC); + + if(!hDC) + return; + + /* Inicializa driver WIN32 */ + ctxcanvas = cdwCreateCanvas(canvas, NULL, hDC, CDW_EMF); + + canvas->w = w; + canvas->h = h; + canvas->xres = xres; + canvas->yres = yres; + canvas->w_mm = ((double)w) / xres; + canvas->h_mm = ((double)h) / yres; + canvas->bpp = 24; + ctxcanvas->clip_pnt[2].x = ctxcanvas->clip_pnt[1].x = canvas->w - 1; + ctxcanvas->clip_pnt[3].y = ctxcanvas->clip_pnt[2].y = canvas->h - 1; +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdEMFContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_YAXIS | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | + CD_CAP_FPRIMTIVES ), + 0, + cdcreatecanvas, + cdinittable, + cdplayEMF, + cdregistercallbackEMF +}; + +cdContext* cdContextEMF(void) +{ + if (cdUseContextPlus(CD_QUERY)) + { + cdContext* ctx = cdGetContextPlus(CD_CTX_EMF); + if (ctx != NULL) + return ctx; + } + + return &cdEMFContext; +} diff --git a/cd/src/win32/cdwimg.c b/cd/src/win32/cdwimg.c new file mode 100755 index 0000000..47d99f9 --- /dev/null +++ b/cd/src/win32/cdwimg.c @@ -0,0 +1,83 @@ +/** \file + * \brief Windows Image Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "cdwin.h" +#include "cdimage.h" + + + +static void cdkillcanvas (cdCtxCanvas *ctxcanvas) +{ + cdwKillCanvas(ctxcanvas); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +/* +%F cdCreateCanvas para Image. +O DC é um BITMAP em memoria. +*/ +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + cdCtxCanvas* ctxcanvas; + cdCtxImage* ctximage; + + if (data == NULL) + return; + + ctximage = ((cdImage*)data)->ctximage; + + /* Inicializa parametros */ + if (ctximage == NULL) + return; + + /* Inicializa driver Image */ + ctxcanvas = cdwCreateCanvas(canvas, NULL, ctximage->hDC, CDW_BMP); + + canvas->w = ctximage->w; + canvas->h = ctximage->h; + canvas->w_mm = ctximage->w_mm; + canvas->h_mm = ctximage->h_mm; + canvas->bpp = ctximage->bpp; + canvas->xres = ctximage->xres; + canvas->yres = ctximage->yres; + ctxcanvas->clip_pnt[2].x = ctxcanvas->clip_pnt[1].x = canvas->w - 1; + ctxcanvas->clip_pnt[3].y = ctxcanvas->clip_pnt[2].y = canvas->h - 1; +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdImageContext = +{ + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | + CD_CAP_FPRIMTIVES ), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +cdContext* cdContextImage(void) +{ + if (cdUseContextPlus(CD_QUERY)) + { + cdContext* ctx = cdGetContextPlus(CD_CTX_IMAGE); + if (ctx != NULL) + return ctx; + } + + return &cdImageContext; +} diff --git a/cd/src/win32/cdwin.c b/cd/src/win32/cdwin.c new file mode 100755 index 0000000..371bb6d --- /dev/null +++ b/cd/src/win32/cdwin.c @@ -0,0 +1,2368 @@ +/** \file + * \brief Windows Base Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include + +#include "cdwin.h" + +#ifndef AC_SRC_ALPHA +#define AC_SRC_ALPHA 0x01 +#endif + +/* CD region combine to WIN32 region combine */ +static int sCombineRegion2win [] ={RGN_OR, RGN_AND, RGN_DIFF, RGN_XOR}; + +typedef BOOL (CALLBACK* AlphaBlendFunc)( HDC hdcDest, + int xoriginDest, int yoriginDest, + int wDest, int hDest, HDC hdcSrc, + int xoriginSrc, int yoriginSrc, + int wSrc, int hSrc, + BLENDFUNCTION ftn); +static AlphaBlendFunc cdwAlphaBlend = NULL; + +static void cdgettextsize (cdCtxCanvas* ctxcanvas, const char *s, int len, int *width, int *height); + +/* +%F Libera memoria e handles alocados pelo driver Windows. +*/ +void cdwKillCanvas(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->clip_pnt != NULL) + free(ctxcanvas->clip_pnt); + + if (ctxcanvas->dib_bits != NULL) + free(ctxcanvas->dib_bits); + + /* apaga as areas de memoria do windows para os padroes */ + + if (ctxcanvas->clip_hrgn) DeleteObject(ctxcanvas->clip_hrgn); + if (ctxcanvas->new_rgn) DeleteObject(ctxcanvas->new_rgn); + + if (ctxcanvas->hOldBitmapPat) SelectObject(ctxcanvas->hDCMemPat, ctxcanvas->hOldBitmapPat); + if (ctxcanvas->hBitmapPat) DeleteObject(ctxcanvas->hBitmapPat); + if (ctxcanvas->hDCMemPat) DeleteDC(ctxcanvas->hDCMemPat); + + if (ctxcanvas->hOldBitmapStip) SelectObject(ctxcanvas->hDCMemStip, ctxcanvas->hOldBitmapStip); + if (ctxcanvas->hBitmapStip) DeleteObject(ctxcanvas->hBitmapStip); + if (ctxcanvas->hDCMemStip) DeleteDC(ctxcanvas->hDCMemStip); + + if (ctxcanvas->img_mask) DeleteObject(ctxcanvas->img_mask); + + SelectObject(ctxcanvas->hDC, ctxcanvas->hOldFont); + DeleteObject(ctxcanvas->hFont); /* Fonte */ + + SelectObject(ctxcanvas->hDC, ctxcanvas->hOldPen); /* restaura os objetos */ + DeleteObject(ctxcanvas->hPen); /* Pen corrente */ + + SelectObject(ctxcanvas->hDC, ctxcanvas->hOldBrush); /* default do canvas */ + DeleteObject(ctxcanvas->hBrush); /* Brush corrente */ + + DeleteObject(ctxcanvas->hNullPen); /* Pen para tirar borda */ + DeleteObject(ctxcanvas->hBkBrush); /* Brush para o background */ + + /* ctxcanvas e ctxcanvas->hDC sao liberados em cada driver */ +} + +/* +Restaura os atributos do CD que sao guardados no DC do Windows quando +ha uma troca de DC. Usado pelos drivers Native Window e Printer. +*/ +void cdwRestoreDC(cdCtxCanvas *ctxcanvas) +{ + /* cdClipArea */ + SelectClipRgn(ctxcanvas->hDC, ctxcanvas->clip_hrgn); + + /* cdForeground */ + SetTextColor(ctxcanvas->hDC, ctxcanvas->fg); + + /* cdBackground */ + SetBkColor(ctxcanvas->hDC, ctxcanvas->bg); + + /* cdBackOpacity */ + switch (ctxcanvas->canvas->back_opacity) + { + case CD_TRANSPARENT: + SetBkMode(ctxcanvas->hDC, TRANSPARENT); + break; + case CD_OPAQUE: + SetBkMode(ctxcanvas->hDC, OPAQUE); + break; + } + + /* cdWriteMode */ + switch (ctxcanvas->canvas->write_mode) + { + case CD_REPLACE: + SetROP2(ctxcanvas->hDC, R2_COPYPEN); + break; + case CD_XOR: + SetROP2(ctxcanvas->hDC, R2_XORPEN); + break; + case CD_NOT_XOR: + SetROP2(ctxcanvas->hDC, R2_NOTXORPEN); + break; + } + + /* Text Alignment is calculated from this state */ + SetTextAlign(ctxcanvas->hDC,TA_LEFT|TA_BASELINE); + + /* cdLineStyle e cdLineWidth */ + ctxcanvas->hOldPen = SelectObject(ctxcanvas->hDC, ctxcanvas->hPen); + + /* cdInteriorStyle */ + ctxcanvas->hOldBrush = SelectObject(ctxcanvas->hDC, ctxcanvas->hBrush); + + /* cdFont */ + ctxcanvas->hOldFont = SelectObject(ctxcanvas->hDC, ctxcanvas->hFont); +} + + +/*********************************************************************/ +/* +%S Cor +*/ +/*********************************************************************/ + +static long int sColorFromWindows(COLORREF color) +{ + return cdEncodeColor(GetRValue(color),GetGValue(color),GetBValue(color)); +} + +static COLORREF sColorToWindows(cdCtxCanvas* ctxcanvas, long int cd_color) +{ + unsigned char red,green,blue; + COLORREF color; + + cdDecodeColor(cd_color,&red,&green,&blue); + + if (ctxcanvas->canvas->bpp <= 8) + color=PALETTERGB((BYTE)red,(BYTE)green,(BYTE)blue); + else + color=RGB((BYTE)red,(BYTE)green,(BYTE)blue); + + return color; +} + +static long int cdforeground (cdCtxCanvas* ctxcanvas, long int color) +{ + ctxcanvas->fg = sColorToWindows(ctxcanvas, color); + SetTextColor(ctxcanvas->hDC, ctxcanvas->fg); + ctxcanvas->rebuild_pen = 1; + return color; +} + +static void sCreatePen(cdCtxCanvas* ctxcanvas) +{ + int cd2win_cap[] = {PS_ENDCAP_FLAT, PS_ENDCAP_SQUARE, PS_ENDCAP_ROUND}; + int cd2win_join[] = {PS_JOIN_MITER, PS_JOIN_BEVEL, PS_JOIN_ROUND}; + + ctxcanvas->logPen.lopnColor = ctxcanvas->fg; + + if (ctxcanvas->hOldPen) SelectObject(ctxcanvas->hDC, ctxcanvas->hOldPen); + if (ctxcanvas->hPen) DeleteObject(ctxcanvas->hPen); + + if (ctxcanvas->logPen.lopnWidth.x == 1) + { + LOGBRUSH LogBrush; + LogBrush.lbStyle = BS_SOLID; + LogBrush.lbColor = ctxcanvas->logPen.lopnColor; + LogBrush.lbHatch = 0; + + if (ctxcanvas->canvas->line_style == CD_CUSTOM) + { + ctxcanvas->hPen = ExtCreatePen(PS_COSMETIC | PS_USERSTYLE, + 1, &LogBrush, + ctxcanvas->canvas->line_dashes_count, (DWORD*)ctxcanvas->canvas->line_dashes); + } + else + { + ctxcanvas->hPen = ExtCreatePen(PS_COSMETIC | ctxcanvas->logPen.lopnStyle, + 1, &LogBrush, + 0, NULL); + } + } + else + { + int style = PS_GEOMETRIC; + LOGBRUSH LogBrush; + LogBrush.lbStyle = BS_SOLID; + LogBrush.lbColor = ctxcanvas->logPen.lopnColor; + LogBrush.lbHatch = 0; + + style |= cd2win_cap[ctxcanvas->canvas->line_cap]; + style |= cd2win_join[ctxcanvas->canvas->line_join]; + + if (ctxcanvas->canvas->line_style == CD_CUSTOM) + { + ctxcanvas->hPen = ExtCreatePen( PS_USERSTYLE | style, + ctxcanvas->logPen.lopnWidth.x, &LogBrush, + ctxcanvas->canvas->line_dashes_count, (DWORD*)ctxcanvas->canvas->line_dashes); + } + else + ctxcanvas->hPen = ExtCreatePen( ctxcanvas->logPen.lopnStyle | style, + ctxcanvas->logPen.lopnWidth.x, &LogBrush, + 0, NULL); + } + + ctxcanvas->hOldPen = SelectObject(ctxcanvas->hDC, ctxcanvas->hPen); + ctxcanvas->rebuild_pen = 0; +} + +static int cdbackopacity (cdCtxCanvas* ctxcanvas, int opacity) +{ + switch (opacity) + { + case CD_TRANSPARENT: + SetBkMode(ctxcanvas->hDC, TRANSPARENT); + break; + case CD_OPAQUE: + SetBkMode(ctxcanvas->hDC, OPAQUE); + break; + } + + return opacity; +} + +static int cdwritemode (cdCtxCanvas* ctxcanvas, int mode) +{ + switch (mode) + { + case CD_REPLACE: + SetROP2(ctxcanvas->hDC, R2_COPYPEN); + ctxcanvas->RopBlt = SRCCOPY; + break; + case CD_XOR: + SetROP2(ctxcanvas->hDC, R2_XORPEN); + ctxcanvas->RopBlt = SRCINVERT; + break; + case CD_NOT_XOR: + SetROP2(ctxcanvas->hDC, R2_NOTXORPEN); + ctxcanvas->RopBlt = SRCINVERT; + break; + } + + return mode; +} + +static long int cdbackground (cdCtxCanvas* ctxcanvas, long int color) +{ + ctxcanvas->bg = sColorToWindows(ctxcanvas, color); + SetBkColor(ctxcanvas->hDC, ctxcanvas->bg); + + if (ctxcanvas->hBkBrush) DeleteObject(ctxcanvas->hBkBrush); + ctxcanvas->hBkBrush = CreateSolidBrush(ctxcanvas->bg); + + return color; +} + +static void cdpalette(cdCtxCanvas* ctxcanvas, int n, const long int *palette, int mode) +{ + LOGPALETTE* pLogPal; + unsigned char red,green,blue; + int k, np = n; + (void)mode; + + if (ctxcanvas->canvas->bpp > 8) /* se o sistema for true color */ + return; + + if (n < 246) + np += 10; + + pLogPal = (LOGPALETTE*)malloc(sizeof(LOGPALETTE) + np * sizeof(PALETTEENTRY)); + pLogPal->palVersion = 0x300; + pLogPal->palNumEntries = (WORD)np; + + if (n < 246) + { + k = 10; + GetSystemPaletteEntries(ctxcanvas->hDC, 0, 10, pLogPal->palPalEntry); + } + else + k=0; + + for (; k < np; k++) + { + cdDecodeColor(palette[k],&red,&green,&blue); + + pLogPal->palPalEntry[k].peRed = (BYTE)red; + pLogPal->palPalEntry[k].peGreen = (BYTE)green; + pLogPal->palPalEntry[k].peBlue = (BYTE)blue; + pLogPal->palPalEntry[k].peFlags = PC_NOCOLLAPSE; + } + + if (ctxcanvas->hPal) + { + if (ctxcanvas->hOldPal) SelectPalette(ctxcanvas->hDC, ctxcanvas->hOldPal, FALSE); + DeleteObject(ctxcanvas->hPal); + } + + ctxcanvas->hPal = CreatePalette(pLogPal); + ctxcanvas->hOldPal = SelectPalette(ctxcanvas->hDC, ctxcanvas->hPal, FALSE); + + RealizePalette(ctxcanvas->hDC); + + free(pLogPal); +} + + +/*********************************************************************/ +/* +%S Canvas e clipping +*/ +/*********************************************************************/ + +static HRGN sClipRect(cdCtxCanvas* ctxcanvas) +{ + HRGN clip_hrgn; + + if (ctxcanvas->clip_hrgn) + DeleteObject(ctxcanvas->clip_hrgn); + + clip_hrgn = CreateRectRgn(ctxcanvas->canvas->clip_rect.xmin, ctxcanvas->canvas->clip_rect.ymin, + ctxcanvas->canvas->clip_rect.xmax+1, ctxcanvas->canvas->clip_rect.ymax+1); + + SelectClipRgn(ctxcanvas->hDC, clip_hrgn); + return clip_hrgn; +} + +static HRGN sClipPoly(cdCtxCanvas* ctxcanvas) +{ + HRGN clip_hrgn; + + if (ctxcanvas->clip_hrgn) + DeleteObject(ctxcanvas->clip_hrgn); + + clip_hrgn = CreatePolygonRgn(ctxcanvas->clip_pnt, + ctxcanvas->clip_pnt_n, + ctxcanvas->canvas->fill_mode==CD_EVENODD?ALTERNATE:WINDING); + SelectClipRgn(ctxcanvas->hDC, clip_hrgn); + return clip_hrgn; +} + +static int cdclip (cdCtxCanvas* ctxcanvas, int clip_mode) +{ + if (ctxcanvas->wtype == CDW_WMF) + return clip_mode; + + switch (clip_mode) + { + case CD_CLIPOFF: + SelectClipRgn(ctxcanvas->hDC, NULL); /* toda 'area do canvas */ + if (ctxcanvas->clip_hrgn) + DeleteObject(ctxcanvas->clip_hrgn); + ctxcanvas->clip_hrgn = NULL; + break; + case CD_CLIPAREA: + ctxcanvas->clip_hrgn = sClipRect(ctxcanvas); + break; + case CD_CLIPPOLYGON: + ctxcanvas->clip_hrgn = sClipPoly(ctxcanvas); + break; + case CD_CLIPREGION: + if (ctxcanvas->clip_hrgn) + DeleteObject(ctxcanvas->clip_hrgn); + ctxcanvas->clip_hrgn = CreateRectRgn(0,0,0,0); + CombineRgn(ctxcanvas->clip_hrgn, ctxcanvas->new_rgn, NULL, RGN_COPY); + SelectClipRgn(ctxcanvas->hDC, ctxcanvas->clip_hrgn); + break; + } + + return clip_mode; +} + +static void cdcliparea(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if (ctxcanvas->wtype == CDW_WMF) + return; + + if (ctxcanvas->canvas->clip_mode == CD_CLIPAREA) + { + ctxcanvas->canvas->clip_rect.xmin = xmin; + ctxcanvas->canvas->clip_rect.xmax = xmax; + ctxcanvas->canvas->clip_rect.ymin = ymin; + ctxcanvas->canvas->clip_rect.ymax = ymax; + ctxcanvas->clip_hrgn = sClipRect(ctxcanvas); + } +} + +static void cdnewregion(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->new_rgn) + DeleteObject(ctxcanvas->new_rgn); + ctxcanvas->new_rgn = CreateRectRgn(0, 0, 0, 0); +} + +static int cdispointinregion(cdCtxCanvas* ctxcanvas, int x, int y) +{ + if (!ctxcanvas->new_rgn) + return 0; + + if (PtInRegion(ctxcanvas->new_rgn, x, y)) + return 1; + + return 0; +} + +static void cdoffsetregion(cdCtxCanvas* ctxcanvas, int x, int y) +{ + if (!ctxcanvas->new_rgn) + return; + + OffsetRgn(ctxcanvas->new_rgn, x, y); +} + +static void cdgetregionbox(cdCtxCanvas* ctxcanvas, int *xmin, int *xmax, int *ymin, int *ymax) +{ + RECT rect; + + if (!ctxcanvas->new_rgn) + return; + + GetRgnBox(ctxcanvas->new_rgn, &rect); + + /* RECT in Windows does not includes the right, bottom. */ + *xmin = rect.left; + *xmax = rect.right-1; + *ymin = rect.top; + *ymax = rect.bottom-1; +} + +/******************************************************************/ +/* +%S Primitivas e seus atributos +*/ +/******************************************************************/ + +static int cdlinestyle (cdCtxCanvas* ctxcanvas, int style) +{ + switch (style) + { + case CD_CONTINUOUS: + ctxcanvas->logPen.lopnStyle = PS_SOLID; + break; + case CD_DASHED: + ctxcanvas->logPen.lopnStyle = PS_DASH; + break; + case CD_DOTTED: + ctxcanvas->logPen.lopnStyle = PS_DOT; + break; + case CD_DASH_DOT: + ctxcanvas->logPen.lopnStyle = PS_DASHDOT; + break; + case CD_DASH_DOT_DOT: + ctxcanvas->logPen.lopnStyle = PS_DASHDOTDOT; + break; + } + + ctxcanvas->rebuild_pen = 1; + + return style; +} + +static int cdlinewidth (cdCtxCanvas* ctxcanvas, int width) +{ + ctxcanvas->logPen.lopnWidth.x = width; + ctxcanvas->rebuild_pen = 1; + return width; +} + +static int cdlinecap (cdCtxCanvas* ctxcanvas, int cap) +{ + ctxcanvas->rebuild_pen = 1; + return cap; +} + +static int cdlinejoin (cdCtxCanvas* ctxcanvas, int join) +{ + ctxcanvas->rebuild_pen = 1; + return join; +} + +static int cdhatch (cdCtxCanvas* ctxcanvas, int hatch_style) +{ + switch (hatch_style) + { + case CD_HORIZONTAL: + ctxcanvas->logBrush.lbHatch = HS_HORIZONTAL; + break; + case CD_VERTICAL: + ctxcanvas->logBrush.lbHatch = HS_VERTICAL; + break; + case CD_FDIAGONAL: + ctxcanvas->logBrush.lbHatch = HS_FDIAGONAL; + break; + case CD_BDIAGONAL: + ctxcanvas->logBrush.lbHatch = HS_BDIAGONAL; + break; + case CD_CROSS: + ctxcanvas->logBrush.lbHatch = HS_CROSS; + break; + case CD_DIAGCROSS: + ctxcanvas->logBrush.lbHatch = HS_DIAGCROSS; + break; + } + + ctxcanvas->logBrush.lbColor=ctxcanvas->fg; + ctxcanvas->logBrush.lbStyle=BS_HATCHED; + + if (ctxcanvas->hOldBrush) SelectObject(ctxcanvas->hDC, ctxcanvas->hOldBrush); + if (ctxcanvas->hBrush) DeleteObject(ctxcanvas->hBrush); + + ctxcanvas->hBrush = CreateBrushIndirect(&ctxcanvas->logBrush); + ctxcanvas->hOldBrush = SelectObject(ctxcanvas->hDC, ctxcanvas->hBrush); + + return hatch_style; +} + +static HBITMAP Stipple2Bitmap(int w, int h, const unsigned char *index, int negative) +{ + HBITMAP hBitmap; + BYTE *buffer; + + int nb; /* number of bytes per line */ + int x,y,k,offset; + + /* Cria um bitmap com os indices dados */ + nb = ((w + 15) / 16) * 2; /* Must be in a word boundary. */ + buffer = (BYTE *) malloc (nb*h); + memset(buffer, 0xff, nb*h); + + for (y=0; yhOldBrush) SelectObject(ctxcanvas->hDC, ctxcanvas->hOldBrush); + if (ctxcanvas->hBrush) DeleteObject(ctxcanvas->hBrush); + + ctxcanvas->hBrush = CreatePatternBrush(hBitmap); + ctxcanvas->hOldBrush = SelectObject(ctxcanvas->hDC, ctxcanvas->hBrush); + + DeleteObject(hBitmap); +} + +static void cdpattern(cdCtxCanvas* ctxcanvas, int w, int h, const long int *colors) +{ + cdwDIB dib; + HBRUSH hBrush; + + if (ctxcanvas->wtype == CDW_WMF) + return; + + dib.w = w; + dib.h = h; + dib.type = 0; + if (!cdwCreateDIB(&dib)) + return; + + cdwDIBEncodePattern(&dib, colors); + hBrush = CreateDIBPatternBrushPt(dib.dib, DIB_RGB_COLORS); + cdwKillDIB(&dib); + + if (hBrush) + { + if (ctxcanvas->hOldBrush) SelectObject(ctxcanvas->hDC, ctxcanvas->hOldBrush); + if (ctxcanvas->hBrush) DeleteObject(ctxcanvas->hBrush); + + ctxcanvas->hBrush = hBrush; + ctxcanvas->hOldBrush = SelectObject(ctxcanvas->hDC, ctxcanvas->hBrush); + } +} + +static int cdinteriorstyle (cdCtxCanvas* ctxcanvas, int style) +{ + switch (style) + { + case CD_SOLID: + ctxcanvas->logBrush.lbStyle=BS_SOLID; + ctxcanvas->logBrush.lbColor=ctxcanvas->fg; + + if (ctxcanvas->hOldBrush) SelectObject(ctxcanvas->hDC, ctxcanvas->hOldBrush); + if (ctxcanvas->hBrush) DeleteObject(ctxcanvas->hBrush); + + ctxcanvas->hBrush = CreateBrushIndirect(&ctxcanvas->logBrush); + ctxcanvas->hOldBrush = SelectObject(ctxcanvas->hDC, ctxcanvas->hBrush); + break; + case CD_HATCH: + cdhatch(ctxcanvas, ctxcanvas->canvas->hatch_style); + break; + case CD_STIPPLE: + cdstipple(ctxcanvas, ctxcanvas->canvas->stipple_w, ctxcanvas->canvas->stipple_h, ctxcanvas->canvas->stipple); + break; + case CD_PATTERN: + if (ctxcanvas->wtype == CDW_WMF) + return style; + cdpattern(ctxcanvas, ctxcanvas->canvas->pattern_w, ctxcanvas->canvas->pattern_h, ctxcanvas->canvas->pattern); + break; + } + + return style; +} + +static void cdline (cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2) +{ + if (ctxcanvas->rebuild_pen) + sCreatePen(ctxcanvas); + + MoveToEx( ctxcanvas->hDC, x1, y1, NULL ); + LineTo( ctxcanvas->hDC, x2, y2 ); + SetPixelV(ctxcanvas->hDC, x2, y2, ctxcanvas->fg); +} + +static void cdrect (cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + HBRUSH oldBrush; + + if (ctxcanvas->rebuild_pen) + sCreatePen(ctxcanvas); + + oldBrush = SelectObject(ctxcanvas->hDC, GetStockObject(NULL_BRUSH)); /* tira o desenho do interior */ + Rectangle(ctxcanvas->hDC, xmin, ymin, xmax+1, ymax+1); /* +1 porque nao inclue right/bottom */ + SelectObject(ctxcanvas->hDC, oldBrush); /* restaura o brush corrente */ +} + +static void cdbox (cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if ((ctxcanvas->logBrush.lbColor != ctxcanvas->fg) && + (ctxcanvas->canvas->interior_style != CD_PATTERN) ) + cdinteriorstyle(ctxcanvas, ctxcanvas->canvas->interior_style); + + if (ctxcanvas->canvas->new_region) + { + HRGN rgn = CreateRectRgn(xmin, ymin, xmax+1, ymax+1); + CombineRgn(ctxcanvas->new_rgn, ctxcanvas->new_rgn, rgn, sCombineRegion2win[ctxcanvas->canvas->combine_mode]); + DeleteObject(rgn); + } + else + { + SelectObject(ctxcanvas->hDC, ctxcanvas->hNullPen); /* tira o desenho da borda */ + Rectangle(ctxcanvas->hDC, xmin, ymin, xmax+2, ymax+2); /* +2 porque a pena e' NULL NULL e o nao inclue right/bottom */ + SelectObject(ctxcanvas->hDC, ctxcanvas->hPen); /* restaura a Pen corrente */ + } +} + +typedef struct _winArcParam +{ + int LeftRect, /* x-coordinate of upper-left corner of bounding rectangle */ + TopRect, /* y-coordinate of upper-left corner of bounding rectangle */ + RightRect, /* x-coordinate of lower-right corner of bounding rectangle */ + BottomRect, /* y-coordinate of lower-right corner of bounding rectangle */ + XStartArc, /* first radial ending point */ + YStartArc, /* first radial ending point */ + XEndArc, /* second radial ending point */ + YEndArc; /* second radial ending point */ +} winArcParam; + +static void calcArc(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2, winArcParam* arc) +{ + arc->LeftRect = xc - w/2; + arc->RightRect = xc + w/2 + 1; + arc->XStartArc = xc + cdRound(w * cos(CD_DEG2RAD * angle1) / 2.0); + arc->XEndArc = xc + cdRound(w * cos(CD_DEG2RAD * angle2) / 2.0); + + if (ctxcanvas->canvas->invert_yaxis) + { + arc->TopRect = yc - h/2; + arc->BottomRect = yc + h/2 + 1; + arc->YStartArc = yc - cdRound(h * sin(CD_DEG2RAD * angle1) / 2.0); + arc->YEndArc = yc - cdRound(h * sin(CD_DEG2RAD * angle2) / 2.0); + } + else + { + arc->BottomRect = yc - h/2; + arc->TopRect = yc + h/2 + 1; + arc->YStartArc = yc + cdRound(h * sin(CD_DEG2RAD * angle1) / 2.0); + arc->YEndArc = yc + cdRound(h * sin(CD_DEG2RAD * angle2) / 2.0); + + /* it is clock-wise when axis inverted */ + _cdSwapInt(arc->XStartArc, arc->XEndArc); + _cdSwapInt(arc->YStartArc, arc->YEndArc); + } +} + +static void cdarc(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2) +{ + winArcParam arc; + calcArc(ctxcanvas, xc, yc, w, h, angle1, angle2, &arc); + + if (ctxcanvas->rebuild_pen) + sCreatePen(ctxcanvas); + + Arc(ctxcanvas->hDC, arc.LeftRect, arc.TopRect, arc.RightRect, arc.BottomRect, arc.XStartArc, arc.YStartArc, arc.XEndArc, arc.YEndArc); +} + +static void cdsector(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2) +{ + winArcParam arc; + calcArc(ctxcanvas, xc, yc, w, h, angle1, angle2, &arc); + + if ((ctxcanvas->logBrush.lbColor != ctxcanvas->fg) && + (ctxcanvas->canvas->interior_style != CD_PATTERN) ) + cdinteriorstyle(ctxcanvas, ctxcanvas->canvas->interior_style); + + if (angle1==0 && angle2==360) + { + if (ctxcanvas->canvas->new_region) + { + HRGN rgn = CreateEllipticRgn(arc.LeftRect, arc.TopRect, arc.RightRect+1, arc.BottomRect+1); + CombineRgn(ctxcanvas->new_rgn, ctxcanvas->new_rgn, rgn, sCombineRegion2win[ctxcanvas->canvas->combine_mode]); + DeleteObject(rgn); + } + else + { + SelectObject(ctxcanvas->hDC, ctxcanvas->hNullPen); /* tira o desenho da borda */ + Ellipse(ctxcanvas->hDC,arc.LeftRect, arc.TopRect, arc.RightRect+1, arc.BottomRect+1); /* +1 porque a pena e' NULL e +1 porque nao inclue right/bottom */ + SelectObject(ctxcanvas->hDC, ctxcanvas->hPen); /* restaura a Pen corrente */ + } + } + else + { + if (ctxcanvas->canvas->new_region) + BeginPath(ctxcanvas->hDC); + + SelectObject(ctxcanvas->hDC, ctxcanvas->hNullPen); /* tira o desenho da borda */ + Pie(ctxcanvas->hDC,arc.LeftRect, arc.TopRect, arc.RightRect+1, arc.BottomRect+1,arc.XStartArc, arc.YStartArc, arc.XEndArc, arc.YEndArc); /* +1 porque a pena e' NULL e +1 porque nao inclue right/bottom */ + SelectObject(ctxcanvas->hDC, ctxcanvas->hPen); /* restaura a Pen corrente */ + + if (ctxcanvas->canvas->new_region) + { + HRGN rgn; + EndPath(ctxcanvas->hDC); + rgn = PathToRegion(ctxcanvas->hDC); + CombineRgn(ctxcanvas->new_rgn, ctxcanvas->new_rgn, rgn, sCombineRegion2win[ctxcanvas->canvas->combine_mode]); + DeleteObject(rgn); + } + } +} + +static void cdchord(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2) +{ + winArcParam arc; + calcArc(ctxcanvas, xc, yc, w, h, angle1, angle2, &arc); + + if ((ctxcanvas->logBrush.lbColor != ctxcanvas->fg) && + (ctxcanvas->canvas->interior_style != CD_PATTERN) ) + cdinteriorstyle(ctxcanvas, ctxcanvas->canvas->interior_style); + + if (angle1==0 && angle2==360) + { + if (ctxcanvas->canvas->new_region) + { + HRGN rgn = CreateEllipticRgn(arc.LeftRect, arc.TopRect, arc.RightRect+1, arc.BottomRect+1); + CombineRgn(ctxcanvas->new_rgn, ctxcanvas->new_rgn, rgn, sCombineRegion2win[ctxcanvas->canvas->combine_mode]); + DeleteObject(rgn); + } + else + { + SelectObject(ctxcanvas->hDC, ctxcanvas->hNullPen); /* tira o desenho da borda */ + Ellipse(ctxcanvas->hDC,arc.LeftRect, arc.TopRect, arc.RightRect+1, arc.BottomRect+1); /* +1 porque a pena e' NULL e +1 porque nao inclue right/bottom */ + SelectObject(ctxcanvas->hDC, ctxcanvas->hPen); /* restaura a Pen corrente */ + } + } + else + { + if (ctxcanvas->canvas->new_region) + BeginPath(ctxcanvas->hDC); + + SelectObject(ctxcanvas->hDC, ctxcanvas->hNullPen); /* tira o desenho da borda */ + Chord(ctxcanvas->hDC,arc.LeftRect, arc.TopRect, arc.RightRect+1, arc.BottomRect+1,arc.XStartArc, arc.YStartArc, arc.XEndArc, arc.YEndArc); /* +2 porque a pena e' NULL e o nao inclue right/bottom */ + SelectObject(ctxcanvas->hDC, ctxcanvas->hPen); /* restaura a Pen corrente */ + + if (ctxcanvas->canvas->new_region) + { + HRGN rgn; + EndPath(ctxcanvas->hDC); + rgn = PathToRegion(ctxcanvas->hDC); + CombineRgn(ctxcanvas->new_rgn, ctxcanvas->new_rgn, rgn, sCombineRegion2win[ctxcanvas->canvas->combine_mode]); + DeleteObject(rgn); + } + } +} + +static void cdpoly(cdCtxCanvas* ctxcanvas, int mode, cdPoint* poly, int n) +{ + int i, t, nc; + POINT* pnt; + HPEN oldPen = NULL, Pen = NULL; + + switch( mode ) + { + case CD_CLOSED_LINES: + poly[n].x = poly[0].x; + poly[n].y = poly[0].y; + n++; + /* continua */ + case CD_OPEN_LINES: + if (ctxcanvas->rebuild_pen) + sCreatePen(ctxcanvas); + Polyline(ctxcanvas->hDC, (POINT*)poly, n); + break; + case CD_BEZIER: + if (ctxcanvas->rebuild_pen) + sCreatePen(ctxcanvas); + PolyBezier(ctxcanvas->hDC, (POINT*)poly, n); + break; + case CD_FILL: + poly[n].x = poly[0].x; + poly[n].y = poly[0].y; + n++; + if (ctxcanvas->canvas->new_region) + { + HRGN rgn = CreatePolygonRgn((POINT*)poly, n, ctxcanvas->canvas->fill_mode==CD_EVENODD?ALTERNATE:WINDING); + CombineRgn(ctxcanvas->new_rgn, ctxcanvas->new_rgn, rgn, sCombineRegion2win[ctxcanvas->canvas->combine_mode]); + DeleteObject(rgn); + } + else + { + if ((ctxcanvas->logBrush.lbColor != ctxcanvas->fg) && + (ctxcanvas->canvas->interior_style != CD_PATTERN)) + cdinteriorstyle(ctxcanvas, ctxcanvas->canvas->interior_style); + + if (ctxcanvas->canvas->interior_style != CD_SOLID || ctxcanvas->fill_attrib[0] == '0') + { + SelectObject(ctxcanvas->hDC, ctxcanvas->hNullPen); /* tira o desenho da borda */ + } + else + { + Pen = CreatePen(PS_SOLID, 1, ctxcanvas->fg); + oldPen = SelectObject(ctxcanvas->hDC, Pen); + } + + SetPolyFillMode(ctxcanvas->hDC, ctxcanvas->canvas->fill_mode==CD_EVENODD?ALTERNATE:WINDING); + Polygon(ctxcanvas->hDC, (POINT*)poly, n); + + if (ctxcanvas->canvas->interior_style != CD_SOLID || ctxcanvas->fill_attrib[0] == '0') + { + SelectObject(ctxcanvas->hDC, ctxcanvas->hPen); /* restaura a Pen corrente */ + } + else + { + SelectObject(ctxcanvas->hDC, oldPen); + DeleteObject(Pen); + } + } + break; + case CD_CLIP: + poly[n].x = poly[0].x; + poly[n].y = poly[0].y; + n++; + + if (ctxcanvas->wtype == CDW_WMF) + return; + + if (ctxcanvas->clip_pnt) + free(ctxcanvas->clip_pnt); + + ctxcanvas->clip_pnt = (POINT*)malloc(n*sizeof(POINT)); + + pnt = (POINT*)poly; + t = n; + nc = 1; + + ctxcanvas->clip_pnt[0] = *pnt; + pnt++; + + for (i = 1; i < t-1; i++, pnt++) + { + if (!((pnt->x == ctxcanvas->clip_pnt[nc-1].x && pnt->x == (pnt + 1)->x) || + (pnt->y == ctxcanvas->clip_pnt[nc-1].y && pnt->y == (pnt + 1)->y))) + { + ctxcanvas->clip_pnt[nc] = *pnt; + nc++; + } + } + + ctxcanvas->clip_pnt_n = nc; + + if (ctxcanvas->canvas->clip_mode == CD_CLIPPOLYGON) + ctxcanvas->clip_hrgn = sClipPoly(ctxcanvas); + + break; + } +} + +static void cdtransform(cdCtxCanvas *ctxcanvas, const double* matrix) +{ + if (matrix) + { + XFORM xForm; + SetGraphicsMode(ctxcanvas->hDC, GM_ADVANCED); + ModifyWorldTransform(ctxcanvas->hDC, NULL, MWT_IDENTITY); + + /* configure a bottom-up coordinate system */ + + /* Equivalent of: + SetMapMode(ctxcanvas->hDC, MM_ISOTROPIC); + SetWindowExtEx(ctxcanvas->hDC, ctxcanvas->canvas->w-1, ctxcanvas->canvas->h-1, NULL); + SetWindowOrgEx(ctxcanvas->hDC, 0, 0, NULL); + SetViewportExtEx(ctxcanvas->hDC, ctxcanvas->canvas->w-1, -(ctxcanvas->canvas->h-1), NULL); + SetViewportOrgEx(ctxcanvas->hDC, 0, ctxcanvas->canvas->h-1, NULL); + */ + + xForm.eM11 = (FLOAT)1; + xForm.eM12 = (FLOAT)0; + xForm.eM21 = (FLOAT)0; + xForm.eM22 = (FLOAT)-1; + xForm.eDx = (FLOAT)0; + xForm.eDy = (FLOAT)(ctxcanvas->canvas->h-1); + ModifyWorldTransform(ctxcanvas->hDC, &xForm, MWT_LEFTMULTIPLY); + + ctxcanvas->canvas->invert_yaxis = 0; + + xForm.eM11 = (FLOAT)matrix[0]; + xForm.eM12 = (FLOAT)matrix[1]; + xForm.eM21 = (FLOAT)matrix[2]; + xForm.eM22 = (FLOAT)matrix[3]; + xForm.eDx = (FLOAT)matrix[4]; + xForm.eDy = (FLOAT)matrix[5]; + ModifyWorldTransform(ctxcanvas->hDC, &xForm, MWT_LEFTMULTIPLY); + } + else + { + ctxcanvas->canvas->invert_yaxis = 1; + ModifyWorldTransform(ctxcanvas->hDC, NULL, MWT_IDENTITY); + SetGraphicsMode(ctxcanvas->hDC, GM_COMPATIBLE); + } +} + +static void sTextOutBlt(cdCtxCanvas* ctxcanvas, int px, int py, const char* s, int len) +{ + HDC hBitmapDC; + HBITMAP hBitmap, hOldBitmap; + HFONT hOldFont; + int w, h, wt, ht, x, y, off, px_off = 0, py_off = 0; + double teta = ctxcanvas->canvas->text_orientation*CD_DEG2RAD; + double cos_teta = cos(teta); + double sin_teta = sin(teta); + + cdgettextsize(ctxcanvas, s, len, &w, &h); + wt = w; + ht = h; + + if (ctxcanvas->canvas->text_orientation != 0) + { + /* novo tamanho da imagem */ + w = (int)(w * cos_teta + h * sin_teta); + h = (int)(h * cos_teta + w * sin_teta); + } + + /* coloca no centro da imagem */ + y = h/2; + x = w/2; + + /* corrige alinhamento do centro */ + off = ht/2 - ctxcanvas->font.descent; + if (ctxcanvas->canvas->text_orientation != 0) + { + y += (int)(off * cos_teta); + x += (int)(off * sin_teta); + } + else + y += off; + + /* calcula o alinhamento da imagem no canvas */ + if (ctxcanvas->canvas->text_orientation != 0) + { + double d = sqrt(wt*wt + ht*ht); + + switch (ctxcanvas->canvas->text_alignment) + { + case CD_CENTER: + py_off = 0; + px_off = 0; + break; + case CD_BASE_LEFT: + py_off = - (int)(off * cos_teta + w/2 * sin_teta); + px_off = (int)(w/2 * cos_teta - off * sin_teta); + break; + case CD_BASE_CENTER: + py_off = - (int)(off * cos_teta); + px_off = - (int)(off * sin_teta); + break; + case CD_BASE_RIGHT: + py_off = - (int)(off * cos_teta - w/2 * sin_teta); + px_off = - (int)(w/2 * cos_teta + off * sin_teta); + break; + case CD_NORTH: + py_off = (int)(ht/2 * cos_teta); + px_off = (int)(ht/2 * sin_teta); + break; + case CD_SOUTH: + py_off = - (int)(ht/2 * cos_teta); + px_off = - (int)(ht/2 * sin_teta); + break; + case CD_EAST: + py_off = (int)(wt/2 * sin_teta); + px_off = - (int)(wt/2 * cos_teta); + break; + case CD_WEST: + py_off = - (int)(wt/2 * sin_teta); + px_off = (int)(wt/2 * cos_teta); + break; + case CD_NORTH_EAST: + py_off = (int)(h/2); + px_off = - (int)(sqrt(d*d - h*h)/2); + break; + case CD_NORTH_WEST: + py_off = (int)(sqrt(d*d - w*w)/2); + px_off = - (int)(w/2); + break; + case CD_SOUTH_WEST: + py_off = - (int)(h/2); + px_off = (int)(sqrt(d*d - h*h)/2); + break; + case CD_SOUTH_EAST: + py_off = - (int)(sqrt(d*d - w*w)/2); + px_off = (int)(w/2); + break; + } + } + else + { + switch (ctxcanvas->canvas->text_alignment) + { + case CD_BASE_RIGHT: + case CD_NORTH_EAST: + case CD_EAST: + case CD_SOUTH_EAST: + px_off = - w/2; + break; + case CD_BASE_CENTER: + case CD_CENTER: + case CD_NORTH: + case CD_SOUTH: + px_off = 0; + break; + case CD_BASE_LEFT: + case CD_NORTH_WEST: + case CD_WEST: + case CD_SOUTH_WEST: + px_off = w/2; + break; + } + + switch (ctxcanvas->canvas->text_alignment) + { + case CD_BASE_LEFT: + case CD_BASE_CENTER: + case CD_BASE_RIGHT: + py_off = - off; + break; + case CD_SOUTH_EAST: + case CD_SOUTH_WEST: + case CD_SOUTH: + py_off = - h/2; + break; + case CD_NORTH_EAST: + case CD_NORTH: + case CD_NORTH_WEST: + py_off = + h/2; + break; + case CD_CENTER: + case CD_EAST: + case CD_WEST: + py_off = py; + break; + } + } + + /* move do centro da imagem para o canto superior esquerdo da imagem */ + px_off -= w/2; + py_off -= h/2; + + /* desloca o ponto dado */ + if (ctxcanvas->canvas->invert_yaxis) + { + px += px_off; + py += py_off; + } + else + { + px += px_off; + py -= py_off; + } + + hBitmap = CreateCompatibleBitmap(ctxcanvas->hDC, w, h); + hBitmapDC = CreateCompatibleDC(ctxcanvas->hDC); + + hOldBitmap = SelectObject(hBitmapDC, hBitmap); + + /* copia a area do canvas para o bitmap */ + BitBlt(hBitmapDC, 0, 0, w, h, ctxcanvas->hDC, px, py, SRCCOPY); + + /* compensa a ROP antes de desenhar */ + BitBlt(hBitmapDC, 0, 0, w, h, ctxcanvas->hDC, px, py, ctxcanvas->RopBlt); + + SetBkMode(hBitmapDC, TRANSPARENT); + SetBkColor(hBitmapDC, ctxcanvas->bg); + SetTextColor(hBitmapDC, ctxcanvas->fg); + SetTextAlign(hBitmapDC, TA_CENTER | TA_BASELINE); + hOldFont = SelectObject(hBitmapDC, ctxcanvas->hFont); + + TextOut(hBitmapDC, x, y, s, len); + + if (ctxcanvas->canvas->invert_yaxis) + BitBlt(ctxcanvas->hDC, px, py, w, h, hBitmapDC, 0, 0, ctxcanvas->RopBlt); + else + StretchBlt(ctxcanvas->hDC, px, py, w, -h, hBitmapDC, 0, 0, w, h, ctxcanvas->RopBlt); + + SelectObject(hBitmapDC, hOldFont); + SelectObject(hBitmapDC, hOldBitmap); + + DeleteObject(hBitmap); + DeleteDC(hBitmapDC); +} + +static void cdgettextsize (cdCtxCanvas* ctxcanvas, const char *s, int len, int *width, int *height) +{ + SIZE size; + + GetTextExtentPoint32(ctxcanvas->hDC, s, len, &size); + + if (width) + *width = size.cx; + + if (height) + *height = size.cy; +} + +static void cdwCanvasGetTextHeight(cdCanvas* canvas, int x, int y, const char *s, int len, int *hbox, int *hoff) +{ + int w, h, ascent, height, baseline; + int xmin, xmax, ymin, ymax; + + cdgettextsize(canvas->ctxcanvas, s, len, &w, &h); + cdCanvasGetFontDim(canvas, NULL, &height, &ascent, NULL); + baseline = height - ascent; + + /* move to bottom-left */ + cdTextTranslatePoint(canvas, x, y, w, h, baseline, &xmin, &ymin); + + *hoff = y - ymin; + + xmax = xmin + w-1; + ymax = ymin + h-1; + + if (canvas->text_orientation) + { + double cos_theta = cos(canvas->text_orientation*CD_DEG2RAD); + double sin_theta = sin(canvas->text_orientation*CD_DEG2RAD); + int rectY[4]; + + *hoff = (int)(*hoff * cos_theta); + + cdRotatePointY(canvas, xmin, ymin, x, y, &rectY[0], sin_theta, cos_theta); + cdRotatePointY(canvas, xmax, ymin, x, y, &rectY[1], sin_theta, cos_theta); + cdRotatePointY(canvas, xmax, ymax, x, y, &rectY[2], sin_theta, cos_theta); + cdRotatePointY(canvas, xmin, ymax, x, y, &rectY[3], sin_theta, cos_theta); + + ymin = ymax = rectY[0]; + if (rectY[1] < ymin) ymin = rectY[1]; + if (rectY[2] < ymin) ymin = rectY[2]; + if (rectY[3] < ymin) ymin = rectY[3]; + if (rectY[1] > ymax) ymax = rectY[1]; + if (rectY[2] > ymax) ymax = rectY[2]; + if (rectY[3] > ymax) ymax = rectY[3]; + } + + *hbox = ymax-ymin+1; +} + +static void cdwTextTransform(cdCtxCanvas* ctxcanvas, const char* s, int len, int *x, int *y) +{ + XFORM xForm; + int hoff, h; + + cdwCanvasGetTextHeight(ctxcanvas->canvas, *x, *y, s, len, &h, &hoff); + + /* move to (x,y) and remove a vertical offset since text reference point is top-left */ + xForm.eM11 = (FLOAT)1; + xForm.eM12 = (FLOAT)0; + xForm.eM21 = (FLOAT)0; + xForm.eM22 = (FLOAT)1; + xForm.eDx = (FLOAT)*x; + xForm.eDy = (FLOAT)(*y - (h-1) - hoff); + ModifyWorldTransform(ctxcanvas->hDC, &xForm, MWT_LEFTMULTIPLY); + + /* invert the text vertical orientation, relative to itself */ + xForm.eM11 = (FLOAT)1; + xForm.eM12 = (FLOAT)0; + xForm.eM21 = (FLOAT)0; + xForm.eM22 = (FLOAT)-1; + xForm.eDx = (FLOAT)0; + xForm.eDy = (FLOAT)(h-1); + ModifyWorldTransform(ctxcanvas->hDC, &xForm, MWT_LEFTMULTIPLY); + + *x = 0; + *y = 0; +} + +static void cdtext(cdCtxCanvas* ctxcanvas, int x, int y, const char *s, int len) +{ + if (ctxcanvas->canvas->write_mode == CD_REPLACE || + ctxcanvas->wtype == CDW_EMF || + ctxcanvas->wtype == CDW_WMF || + ctxcanvas->canvas->new_region) + { + int h = -1; + + if ((ctxcanvas->canvas->text_alignment == CD_CENTER || + ctxcanvas->canvas->text_alignment == CD_EAST || + ctxcanvas->canvas->text_alignment == CD_WEST) && + ctxcanvas->wtype != CDW_WMF) + { + /* compensa deficiencia do alinhamento no windows */ + int off; + cdgettextsize(ctxcanvas, s, len, NULL, &h); + off = h/2 - ctxcanvas->font.descent; + + if (ctxcanvas->canvas->text_orientation != 0) + { + y += (int)(off * cos(ctxcanvas->canvas->text_orientation*CD_DEG2RAD)); + x += (int)(off * sin(ctxcanvas->canvas->text_orientation*CD_DEG2RAD)); + } + else + y += off; + } + + if (ctxcanvas->canvas->back_opacity == CD_OPAQUE) + SetBkMode(ctxcanvas->hDC, TRANSPARENT); + + if (ctxcanvas->canvas->new_region) + BeginPath(ctxcanvas->hDC); + + if (ctxcanvas->canvas->use_matrix) + cdwTextTransform(ctxcanvas, s, len, &x, &y); + + TextOut(ctxcanvas->hDC, x, y+1, s, len); /* compensa erro de desenho com +1 */ + + if (ctxcanvas->canvas->use_matrix) + cdtransform(ctxcanvas, ctxcanvas->canvas->matrix); + + if (ctxcanvas->canvas->new_region) + { + HRGN rgn; + EndPath(ctxcanvas->hDC); + rgn = PathToRegion(ctxcanvas->hDC); + CombineRgn(ctxcanvas->new_rgn, ctxcanvas->new_rgn, rgn, sCombineRegion2win[ctxcanvas->canvas->combine_mode]); + DeleteObject(rgn); + } + + if (ctxcanvas->canvas->back_opacity == CD_OPAQUE) + SetBkMode(ctxcanvas->hDC, OPAQUE); + } + else + sTextOutBlt(ctxcanvas, x, y+1, s, len); +} + +static int cdtextalignment(cdCtxCanvas* ctxcanvas, int text_align) +{ + int align = TA_NOUPDATECP; + + switch (text_align) + { + case CD_BASE_RIGHT: + case CD_NORTH_EAST: + case CD_EAST: + case CD_SOUTH_EAST: + align |= TA_RIGHT; + break; + case CD_BASE_CENTER: + case CD_CENTER: + case CD_NORTH: + case CD_SOUTH: + align |= TA_CENTER; + break; + case CD_BASE_LEFT: + case CD_NORTH_WEST: + case CD_WEST: + case CD_SOUTH_WEST: + align |= TA_LEFT; + break; + } + + switch (text_align) + { + case CD_BASE_LEFT: + case CD_BASE_CENTER: + case CD_BASE_RIGHT: + align |= TA_BASELINE; + break; + case CD_SOUTH_EAST: + case CD_SOUTH_WEST: + case CD_SOUTH: + align |= TA_BOTTOM; + break; + case CD_NORTH_EAST: + case CD_NORTH: + case CD_NORTH_WEST: + align |= TA_TOP; + break; + case CD_CENTER: + case CD_EAST: + case CD_WEST: + align |= TA_BASELINE; /* tem que compensar ao desenhar o texto */ + break; + } + + SetTextAlign(ctxcanvas->hDC, align); + + return text_align; +} + +static int cdfont(cdCtxCanvas* ctxcanvas, const char *type_face, int style, int size) +{ + TEXTMETRIC tm; + DWORD bold, italic = 0, underline = 0, strikeout = 0; + int angle, size_pixel; + HFONT hFont; + + if (style&CD_BOLD) + bold = FW_BOLD; + else + bold = FW_NORMAL; + + if (style&CD_ITALIC) + italic = 1; + + if (style&CD_UNDERLINE) + underline = 1; + + if (style&CD_STRIKEOUT) + strikeout = 1; + + angle = ctxcanvas->font_angle; + + if (cdStrEqualNoCase(type_face, "Courier") || cdStrEqualNoCase(type_face, "Monospace")) + type_face = "Courier New"; + else if (cdStrEqualNoCase(type_face, "Times") || cdStrEqualNoCase(type_face, "Serif")) + type_face = "Times New Roman"; + else if (cdStrEqualNoCase(type_face, "Helvetica") || cdStrEqualNoCase(type_face, "Sans")) + type_face = "Arial"; + + size_pixel = cdGetFontSizePixels(ctxcanvas->canvas, size); + hFont = CreateFont(-size_pixel, 0, angle, angle, bold, italic, underline, strikeout, + DEFAULT_CHARSET,OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FF_DONTCARE|DEFAULT_PITCH, + type_face); + if (!hFont) return 0; + + if (ctxcanvas->hOldFont) SelectObject(ctxcanvas->hDC, ctxcanvas->hOldFont); + if (ctxcanvas->hFont) DeleteObject(ctxcanvas->hFont); + ctxcanvas->hFont = hFont; + ctxcanvas->hOldFont = SelectObject(ctxcanvas->hDC, ctxcanvas->hFont); + + GetTextMetrics (ctxcanvas->hDC, &tm); + ctxcanvas->font.max_width = tm.tmMaxCharWidth; + ctxcanvas->font.height = tm.tmHeight + tm.tmExternalLeading ; + ctxcanvas->font.ascent = tm.tmAscent; + ctxcanvas->font.descent = tm.tmDescent; + + return 1; +} + +static int cdnativefont (cdCtxCanvas* ctxcanvas, const char* nativefont) +{ + TEXTMETRIC tm; + HFONT hFont; + int size = 12, bold = FW_NORMAL, italic = 0, + style = CD_PLAIN, underline = 0, strikeout = 0, + size_pixel; + char type_face[1024]; + + if (nativefont[0] == '-' && nativefont[1] == 'd') + { + COLORREF rgbColors; + CHOOSEFONT cf; + LOGFONT lf; + + ZeroMemory(&cf, sizeof(CHOOSEFONT)); + + cf.lStructSize = sizeof(CHOOSEFONT); + cf.hwndOwner = GetForegroundWindow(); + cf.lpLogFont = &lf; + cf.Flags = CF_SCREENFONTS | CF_EFFECTS | CF_INITTOLOGFONTSTRUCT; + rgbColors = cf.rgbColors = ctxcanvas->fg; + + GetTextFace(ctxcanvas->hDC, 50, type_face); + GetTextMetrics(ctxcanvas->hDC, &tm); /* get the current selected nativefont */ + + size_pixel = cdGetFontSizePixels(ctxcanvas->canvas, ctxcanvas->canvas->font_size); + + strcpy(lf.lfFaceName, type_face); + lf.lfWeight = tm.tmWeight; + lf.lfHeight = -size_pixel; + lf.lfItalic = tm.tmItalic; + lf.lfUnderline = tm.tmUnderlined; + lf.lfStrikeOut = tm.tmStruckOut; + lf.lfCharSet = tm.tmCharSet; + lf.lfEscapement = ctxcanvas->font_angle; + lf.lfOrientation = ctxcanvas->font_angle; + lf.lfWidth = 0; + lf.lfOutPrecision = OUT_TT_PRECIS; + lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; + lf.lfQuality = DEFAULT_QUALITY; + lf.lfPitchAndFamily = FF_DONTCARE|DEFAULT_PITCH; + + if (ChooseFont(&cf)) + { + if (rgbColors != cf.rgbColors) + cdCanvasSetForeground(ctxcanvas->canvas, sColorFromWindows(cf.rgbColors)); + + hFont = CreateFontIndirect(&lf); + } + else + return 0; + + bold = lf.lfWeight; + italic = lf.lfItalic; + size = lf.lfHeight; + strcpy(type_face, lf.lfFaceName); + underline = lf.lfUnderline; + strikeout = lf.lfStrikeOut; + + if (bold!=FW_NORMAL) style |= CD_BOLD; + if (italic) style |= CD_ITALIC; + if (underline) style |= CD_UNDERLINE; + if (strikeout) style |= CD_STRIKEOUT; + } + else + { + if (!cdParseIupWinFont(nativefont, type_face, &style, &size)) + { + if (!cdParsePangoFont(nativefont, type_face, &style, &size)) + return 0; + } + + if (style&CD_BOLD) + bold = FW_BOLD; + if (style&CD_ITALIC) + italic = 1; + if (style&CD_UNDERLINE) + underline = 1; + if (style&CD_STRIKEOUT) + strikeout = 1; + + size_pixel = cdGetFontSizePixels(ctxcanvas->canvas, size); + + hFont = CreateFont(-size_pixel, 0, ctxcanvas->font_angle, ctxcanvas->font_angle, + bold, italic, underline, strikeout, + DEFAULT_CHARSET,OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FF_DONTCARE|DEFAULT_PITCH, type_face); + if (!hFont) return 0; + } + + if (ctxcanvas->hOldFont) SelectObject(ctxcanvas->hDC, ctxcanvas->hOldFont); + DeleteObject(ctxcanvas->hFont); + ctxcanvas->hFont = hFont; + ctxcanvas->hOldFont = SelectObject(ctxcanvas->hDC, ctxcanvas->hFont); + + GetTextMetrics(ctxcanvas->hDC, &tm); + ctxcanvas->font.max_width = tm.tmMaxCharWidth; + ctxcanvas->font.height = tm.tmHeight + tm.tmExternalLeading; + ctxcanvas->font.ascent = tm.tmAscent; + ctxcanvas->font.descent = tm.tmDescent; + + /* update cdfont parameters */ + ctxcanvas->canvas->font_style = style; + ctxcanvas->canvas->font_size = size; + strcpy(ctxcanvas->canvas->font_type_face, type_face); + + return 1; +} + +static double cdtextorientation(cdCtxCanvas* ctxcanvas, double angle) +{ + if (ctxcanvas->font_angle == angle) /* first time angle=0, do not create font twice */ + return angle; + + ctxcanvas->font_angle = (int)(angle * 10); + + cdfont(ctxcanvas, ctxcanvas->canvas->font_type_face, ctxcanvas->canvas->font_style, ctxcanvas->canvas->font_size); + + return angle; +} + +static void cdgetfontdim (cdCtxCanvas* ctxcanvas, int *max_width, int *line_height, int *ascent, int *descent) +{ + if (max_width) + *max_width = ctxcanvas->font.max_width; + + if (line_height) + *line_height = ctxcanvas->font.height; + + if (ascent) + *ascent = ctxcanvas->font.ascent; + + if (descent) + *descent = ctxcanvas->font.descent; + + return; +} + +/* +%F Desenha um retangulo no canvas todo com a cor do fundo. +*/ +static void cdclear(cdCtxCanvas* ctxcanvas) +{ + RECT rect; + + if (ctxcanvas->canvas->clip_mode != CD_CLIPOFF) + SelectClipRgn( ctxcanvas->hDC, NULL ); /* toda 'area do canvas */ + + SetRect(&rect, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); + FillRect(ctxcanvas->hDC, &rect, ctxcanvas->hBkBrush); + + if (ctxcanvas->canvas->clip_mode != CD_CLIPOFF) + cdclip(ctxcanvas, ctxcanvas->canvas->clip_mode); +} + + +/******************************************************************/ +/* +%S Funcoes de imagens do cliente +*/ +/******************************************************************/ + +static void cdgetimagergb(cdCtxCanvas* ctxcanvas, unsigned char *red, unsigned char *green, unsigned char *blue, int x, int y, int w, int h) +{ + XFORM xForm; + cdwDIB dib; + HDC hDCMem; + HBITMAP hOldBitmap,hBitmap; + int yr; + + hBitmap = CreateCompatibleBitmap(ctxcanvas->hDC, w, h); + if (hBitmap == NULL) + return; + + hDCMem = CreateCompatibleDC(ctxcanvas->hDC); + + hOldBitmap = SelectObject(hDCMem, hBitmap); + + if (GetGraphicsMode(ctxcanvas->hDC) == GM_ADVANCED) + { + GetWorldTransform(ctxcanvas->hDC, &xForm); + ModifyWorldTransform(ctxcanvas->hDC, NULL, MWT_IDENTITY); + } + + if (ctxcanvas->canvas->invert_yaxis==0) // if 0, then the transform was reset + y = _cdInvertYAxis(ctxcanvas->canvas, y); + + yr = y - (h - 1); /* y starts at the bottom of the image */ + BitBlt(hDCMem,0,0,w,h,ctxcanvas->hDC, x, yr, SRCCOPY); + + if (GetGraphicsMode(ctxcanvas->hDC) == GM_ADVANCED) + ModifyWorldTransform(ctxcanvas->hDC, &xForm, MWT_LEFTMULTIPLY); + + dib.w = w; + dib.h = h; + dib.type = 0; + + if (!cdwCreateDIB(&dib)) + { + SelectObject(hDCMem, hOldBitmap); + DeleteObject(hBitmap); + DeleteDC(hDCMem); + return; + } + + GetDIBits(ctxcanvas->hDC, hBitmap, 0, h, dib.bits, dib.bmi, DIB_RGB_COLORS); + + SelectObject(hDCMem, hOldBitmap); + DeleteObject(hBitmap); + DeleteDC(hDCMem); + + cdwDIBDecodeRGB(&dib, red, green, blue); + + cdwKillDIB(&dib); +} + +static void sFixImageY(cdCanvas* canvas, int *y, int *h) +{ + /* Here, y is from top to bottom, + is at the bottom-left corner of the image if h>0 + is at the top-left corner of the image if h<0. (Undocumented feature) + cdCalcZoom expects Y at top-left if h>0 + and Y at bottom-left if h<0 + if h<0 then eh<0 to StretchDIBits mirror the image. + BUT!!!!!! AlphaBlend will NOT mirror the image. */ + + if (!canvas->invert_yaxis) + *h = -(*h); + + if (*h < 0) + *y -= ((*h) + 1); /* compensate for cdCalcZoom */ + else + *y -= ((*h) - 1); /* move Y to top-left corner, since it was at the bottom of the image */ +} + +static void cdputimagerectmap(cdCtxCanvas* ctxcanvas, int width, int height, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + cdwDIB dib; + int ew, eh, ex, ey; /* posicao da imagem com zoom no canvas e tamanho da imagem com zoom depois de otimizado */ + int bw, bh, bx, by; /* posicao dentro da imagem e tamanho dentro da imagem do pedaco que sera desenhado depois de otimizado */ + int rw, rh; /* tamanho dentro da imagem antes de otimizado */ + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + sFixImageY(ctxcanvas->canvas, &y, &h); + + if (!cdCalcZoom(ctxcanvas->canvas->w, x, w, &ex, &ew, xmin, rw, &bx, &bw, 1)) + return; + + if (!cdCalcZoom(ctxcanvas->canvas->h, y, h, &ey, &eh, ymin, rh, &by, &bh, 0)) + return; + + dib.w = bw; + dib.h = bh; + dib.type = 1; + + if (!cdwCreateDIBRefBuffer(&dib, &ctxcanvas->dib_bits, &ctxcanvas->bits_size)) + return; + + cdwDIBEncodeMapRect(&dib, index, colors, bx, by, width, height); + + StretchDIBits(ctxcanvas->hDC, + ex, ey, ew, eh, + 0, 0, bw, bh, + dib.bits, dib.bmi, DIB_RGB_COLORS, ctxcanvas->RopBlt); +} + +static void cdputimagerectrgb(cdCtxCanvas* ctxcanvas, int width, int height, const unsigned char *red, + const unsigned char *green, const unsigned char *blue, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + cdwDIB dib; + int ew, eh, ex, ey; + int bw, bh, bx, by; + int rw, rh; + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + sFixImageY(ctxcanvas->canvas, &y, &h); + + if (!cdCalcZoom(ctxcanvas->canvas->w, x, w, &ex, &ew, xmin, rw, &bx, &bw, 1)) + return; + + if (!cdCalcZoom(ctxcanvas->canvas->h, y, h, &ey, &eh, ymin, rh, &by, &bh, 0)) + return; + + dib.w = bw; + dib.h = bh; + dib.type = 0; + + if (!cdwCreateDIBRefBuffer(&dib, &ctxcanvas->dib_bits, &ctxcanvas->bits_size)) + return; + + cdwDIBEncodeRGBRect(&dib, red, green, blue, bx, by, width, height); + + StretchDIBits(ctxcanvas->hDC, + ex, ey, ew, eh, + 0, 0, bw, bh, + dib.bits, dib.bmi, DIB_RGB_COLORS, ctxcanvas->RopBlt); +} + +static void cdputimagerectrgba(cdCtxCanvas* ctxcanvas, int width, int height, const unsigned char *red, + const unsigned char *green, const unsigned char *blue, const unsigned char *alpha, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + cdwDIB dib; + HDC hDCMem; + HBITMAP hOldBitmap, hBitmap; + int ew, eh, ex, ey; + int bw, bh, bx, by; + int rw, rh; + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + + sFixImageY(ctxcanvas->canvas, &y, &h); + + if (!cdCalcZoom(ctxcanvas->canvas->w, x, w, &ex, &ew, xmin, rw, &bx, &bw, 1)) + return; + + if (!cdCalcZoom(ctxcanvas->canvas->h, y, h, &ey, &eh, ymin, rh, &by, &bh, 0)) + return; + + hDCMem = CreateCompatibleDC(ctxcanvas->hDC); + + if (cdwAlphaBlend) + { + BLENDFUNCTION blendfunc; + + dib.w = bw; + dib.h = bh; + dib.type = 2; /* RGBA */ + + hBitmap = cdwCreateDIBSection(&dib, hDCMem); + if (!hBitmap) + { + DeleteDC(hDCMem); + return; + } + + cdwDIBEncodeRGBARect(&dib, red, green, blue, alpha, bx, by, width, height); + + if (eh < 0) /* must mirror the image */ + { + XFORM xForm; + + eh = -eh; + + SetGraphicsMode(hDCMem, GM_ADVANCED); + ModifyWorldTransform(hDCMem, NULL, MWT_IDENTITY); + + /* configure a bottom-up coordinate system */ + xForm.eM11 = (FLOAT)1; + xForm.eM12 = (FLOAT)0; + xForm.eM21 = (FLOAT)0; + xForm.eM22 = (FLOAT)-1; + xForm.eDx = (FLOAT)0; + xForm.eDy = (FLOAT)(bh-1); + ModifyWorldTransform(hDCMem, &xForm, MWT_LEFTMULTIPLY); + } + + hOldBitmap = SelectObject(hDCMem, hBitmap); + + blendfunc.BlendOp = AC_SRC_OVER; + blendfunc.BlendFlags = 0; + blendfunc.SourceConstantAlpha = 0xFF; + blendfunc.AlphaFormat = AC_SRC_ALPHA; + + cdwAlphaBlend(ctxcanvas->hDC, + ex, ey, ew, eh, + hDCMem, + 0, 0, bw, bh, + blendfunc); + } + else + { + hBitmap = CreateCompatibleBitmap(ctxcanvas->hDC, ew, eh); /* captura do tamanho do destino */ + if (!hBitmap) + { + DeleteDC(hDCMem); + return; + } + + hOldBitmap = SelectObject(hDCMem, hBitmap); + + BitBlt(hDCMem, 0, 0, ew, eh, ctxcanvas->hDC, ex, ey, SRCCOPY); + + dib.w = ew; /* neste caso o tamanho usado e´ o de destino */ + dib.h = eh; + dib.type = 0; + + if (!cdwCreateDIB(&dib)) + { + SelectObject(hDCMem, hOldBitmap); + DeleteObject(hBitmap); + DeleteDC(hDCMem); + return; + } + + GetDIBits(hDCMem, hBitmap, 0, eh, dib.bits, dib.bmi, DIB_RGB_COLORS); + + cdwDIBEncodeRGBARectZoom(&dib, red, green, blue, alpha, width, height, bx, by, bw, bh); + + StretchDIBits(ctxcanvas->hDC, + ex, ey, ew, eh, + 0, 0, ew, eh, /* Nao tem zoom neste caso, pois e´ feito manualmente pela EncodeRGBA */ + dib.bits, dib.bmi, DIB_RGB_COLORS, ctxcanvas->RopBlt); + } + + SelectObject(hDCMem, hOldBitmap); + DeleteObject(hBitmap); + DeleteDC(hDCMem); + cdwKillDIB(&dib); +} + + +/********************************************************************/ +/* +%S Funcoes de imagens do servidor +*/ +/********************************************************************/ + +static void cdpixel(cdCtxCanvas* ctxcanvas, int x, int y, long int cd_color) +{ + SetPixelV(ctxcanvas->hDC, x, y, sColorToWindows(ctxcanvas, cd_color)); +} + +static cdCtxImage *cdcreateimage(cdCtxCanvas* ctxcanvas, int width, int height) +{ + HDC hDCMem; + HBITMAP hOldBitmap,hBitmap; + cdCtxImage *ctximage; + void* rgba_dib = NULL; + unsigned char* alpha = NULL; + + if (ctxcanvas->img_format) + { + cdwDIB dib; + + dib.w = width; + dib.h = height; + if (ctxcanvas->img_format == 32) + dib.type = CDW_RGBA; + else + dib.type = CDW_RGB; + + hBitmap = cdwCreateDIBSection(&dib, ctxcanvas->hDC); + if (!hBitmap) + return NULL; + + rgba_dib = dib.bits; + alpha = ctxcanvas->img_alpha; + + cdwKillDIB(&dib); /* this will just remove the headers not the dib bits in this case */ + } + else + { + hBitmap = CreateCompatibleBitmap(ctxcanvas->hDC, width, height); + if (!hBitmap) + return NULL; + } + + hDCMem = CreateCompatibleDC(ctxcanvas->hDC); + hOldBitmap = SelectObject(hDCMem, hBitmap); + + PatBlt(hDCMem, 0, 0, width, height, WHITENESS); + + /* salva o contexto desta imagem */ + ctximage = (cdCtxImage*)malloc(sizeof(cdCtxImage)); + + ctximage->hDC = hDCMem; + ctximage->hBitmap = hBitmap; + ctximage->hOldBitmap = hOldBitmap; + ctximage->w = width; + ctximage->h = height; + ctximage->rgba_dib = rgba_dib; + ctximage->alpha = alpha; + + ctximage->bpp = ctxcanvas->canvas->bpp; + ctximage->xres = ctxcanvas->canvas->xres; + ctximage->yres = ctxcanvas->canvas->yres; + + ctximage->w_mm = ctximage->w / ctximage->xres; + ctximage->h_mm = ctximage->h / ctximage->yres; + + return ctximage; +} + +static void cdgetimage(cdCtxCanvas* ctxcanvas, cdCtxImage *ctximage, int x, int y) +{ + int yr; + XFORM xForm; + + if (GetGraphicsMode(ctxcanvas->hDC) == GM_ADVANCED) + { + GetWorldTransform(ctxcanvas->hDC, &xForm); + ModifyWorldTransform(ctxcanvas->hDC, NULL, MWT_IDENTITY); + } + + if (ctxcanvas->canvas->invert_yaxis==0) // if 0, then the transform was reset + y = _cdInvertYAxis(ctxcanvas->canvas, y); + + yr = y - (ctximage->h - 1); + BitBlt(ctximage->hDC, 0, 0, ctximage->w, ctximage->h, ctxcanvas->hDC, x, yr, SRCCOPY); + + if (GetGraphicsMode(ctxcanvas->hDC) == GM_ADVANCED) + ModifyWorldTransform(ctxcanvas->hDC, &xForm, MWT_LEFTMULTIPLY); +} + +static void cdputimagerect(cdCtxCanvas* ctxcanvas, cdCtxImage *ctximage, int x0, int y0, int xmin, int xmax, int ymin, int ymax) +{ + int yr = y0 - (ymax-ymin+1)+1; /* y0 starts at the bottom of the image */ + + if (ctximage->alpha && ctximage->bpp == 32 && cdwAlphaBlend) + { + cdwDIB dib; + BLENDFUNCTION blendfunc; + blendfunc.BlendOp = AC_SRC_OVER; + blendfunc.BlendFlags = 0; + blendfunc.SourceConstantAlpha = 0xFF; + blendfunc.AlphaFormat = AC_SRC_ALPHA; + + dib.w = ctximage->w; + dib.h = ctximage->h; + dib.type = CDW_RGBA; + cdwCreateDIBRefBits(&dib, ctximage->rgba_dib); + + cdwDIBEncodeAlphaRect(&dib, ctximage->alpha, 0, 0, ctximage->w, ctximage->h); + + GdiFlush(); + cdwAlphaBlend(ctxcanvas->hDC, + x0, yr, xmax-xmin+1, ymax-ymin+1, + ctximage->hDC, + xmin, ctximage->h-ymax-1, xmax-xmin+1, ymax-ymin+1, + blendfunc); + + cdwKillDIB(&dib); + } + else if(ctxcanvas->use_img_points) + { + POINT pts[3]; + pts[0] = ctxcanvas->img_points[0]; + pts[1] = ctxcanvas->img_points[1]; + pts[2] = ctxcanvas->img_points[2]; + if (ctxcanvas->canvas->invert_yaxis) + { + pts[0].y = _cdInvertYAxis(ctxcanvas->canvas, pts[0].y); + pts[1].y = _cdInvertYAxis(ctxcanvas->canvas, pts[1].y); + pts[2].y = _cdInvertYAxis(ctxcanvas->canvas, pts[2].y); + } + PlgBlt(ctxcanvas->hDC, pts, ctximage->hDC, xmin, ctximage->h-ymax-1, xmax-xmin+1, ymax-ymin+1, ctxcanvas->img_mask, 0, 0); + } + else if (ctxcanvas->img_mask) + MaskBlt(ctxcanvas->hDC,x0,yr, xmax-xmin+1, ymax-ymin+1, ctximage->hDC, xmin, ctximage->h-ymax-1, ctxcanvas->img_mask, 0, 0, MAKEROP4(ctxcanvas->RopBlt, 0xAA0000)); + else + BitBlt(ctxcanvas->hDC,x0,yr, xmax-xmin+1, ymax-ymin+1, ctximage->hDC, xmin, ctximage->h-ymax-1, ctxcanvas->RopBlt); +} + +static void cdkillimage(cdCtxImage *ctximage) +{ + SelectObject(ctximage->hDC, ctximage->hOldBitmap); + DeleteObject(ctximage->hBitmap); + DeleteDC(ctximage->hDC); + free(ctximage); +} + +static void cdscrollarea(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax, int dx, int dy) +{ + XFORM xForm; + RECT rect; + rect.left = xmin; + rect.right = xmax+1; + rect.top = ymin; + rect.bottom = ymax+1; + + if (GetGraphicsMode(ctxcanvas->hDC) == GM_ADVANCED) + { + GetWorldTransform(ctxcanvas->hDC, &xForm); + ModifyWorldTransform(ctxcanvas->hDC, NULL, MWT_IDENTITY); + } + + if (ctxcanvas->canvas->invert_yaxis==0) // if 0, then the transform was reset + { + dy = -dy; + ymin = _cdInvertYAxis(ctxcanvas->canvas, ymin); + ymax = _cdInvertYAxis(ctxcanvas->canvas, ymax); + _cdSwapInt(ymin, ymax); + } + + ScrollDC(ctxcanvas->hDC, dx, dy, &rect, NULL, NULL, NULL); + + if (GetGraphicsMode(ctxcanvas->hDC) == GM_ADVANCED) + ModifyWorldTransform(ctxcanvas->hDC, &xForm, MWT_LEFTMULTIPLY); +} + +static void cdflush(cdCtxCanvas* ctxcanvas) +{ + (void)ctxcanvas; + GdiFlush(); +} + +/********************************************************************/ +/* +%S Atributos personalizados +*/ +/********************************************************************/ + +static void set_img_format_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (!data) + ctxcanvas->img_format = 0; + else + { + int bpp = 0; + sscanf(data, "%d", &bpp); + if (bpp == 0) + return; + + if (bpp == 32) + ctxcanvas->img_format = 32; + else + ctxcanvas->img_format = 24; + } +} + +static char* get_img_format_attrib(cdCtxCanvas* ctxcanvas) +{ + if (!ctxcanvas->img_format) + return NULL; + + if (ctxcanvas->img_format == 32) + return "32"; + else + return "24"; +} + +static cdAttribute img_format_attrib = +{ + "IMAGEFORMAT", + set_img_format_attrib, + get_img_format_attrib +}; + +static void set_img_alpha_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (!data) + ctxcanvas->img_alpha = NULL; + else + ctxcanvas->img_alpha = (unsigned char*)data; +} + +static char* get_img_alpha_attrib(cdCtxCanvas* ctxcanvas) +{ + return (char*)ctxcanvas->img_alpha; +} + +static cdAttribute img_alpha_attrib = +{ + "IMAGEALPHA", + set_img_alpha_attrib, + get_img_alpha_attrib +}; + +static void set_img_mask_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (!data) + { + if (ctxcanvas->img_mask) DeleteObject(ctxcanvas->img_mask); + ctxcanvas->img_mask = NULL; + } + else + { + int w = 0, h = 0; + unsigned char *index = 0; + sscanf(data, "%d %d %p", &w, &h, &index); + if (w && h && index) + ctxcanvas->img_mask = Stipple2Bitmap(w, h, index, 1); + } +} + +static cdAttribute img_mask_attrib = +{ + "IMAGEMASK", + set_img_mask_attrib, + NULL +}; + +static void set_img_points_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + int p[6]; + + if (!data) + { + ctxcanvas->use_img_points = 0; + return; + } + + sscanf(data, "%d %d %d %d %d %d", &p[0], &p[1], &p[2], &p[3], &p[4], &p[5]); + + ctxcanvas->img_points[0].x = p[0]; + ctxcanvas->img_points[0].y = p[1]; + ctxcanvas->img_points[1].x = p[2]; + ctxcanvas->img_points[1].y = p[3]; + ctxcanvas->img_points[2].x = p[4]; + ctxcanvas->img_points[2].y = p[5]; + + ctxcanvas->use_img_points = 1; +} + +static char* get_img_points_attrib(cdCtxCanvas* ctxcanvas) +{ + static char data[100]; + + if (!ctxcanvas->use_img_points) + return NULL; + + sprintf(data, "%d %d %d %d %d %d", ctxcanvas->img_points[0].x, + ctxcanvas->img_points[0].y, + ctxcanvas->img_points[1].x, + ctxcanvas->img_points[1].y, + ctxcanvas->img_points[2].x, + ctxcanvas->img_points[2].y); + + return data; +} + +static cdAttribute img_points_attrib = +{ + "IMAGEPOINTS", + set_img_points_attrib, + get_img_points_attrib +}; + +static void set_rotate_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + /* ignore ROTATE if transform is set */ + if (ctxcanvas->canvas->use_matrix) + return; + + if (data) + { + XFORM xForm; + sscanf(data, "%g %d %d", &ctxcanvas->rotate_angle, + &ctxcanvas->rotate_center_x, + &ctxcanvas->rotate_center_y); + + /* the rotation must be corrected because of the Y axis orientation */ + + SetGraphicsMode(ctxcanvas->hDC, GM_ADVANCED); + ModifyWorldTransform(ctxcanvas->hDC, NULL, MWT_IDENTITY); + + xForm.eM11 = (FLOAT) cos(-CD_DEG2RAD*ctxcanvas->rotate_angle); + xForm.eM12 = (FLOAT) sin(-CD_DEG2RAD*ctxcanvas->rotate_angle); + xForm.eM21 = (FLOAT) -xForm.eM12; + xForm.eM22 = (FLOAT) xForm.eM11; + xForm.eDx = (FLOAT) ctxcanvas->rotate_center_x; + xForm.eDy = (FLOAT) _cdInvertYAxis(ctxcanvas->canvas, ctxcanvas->rotate_center_y); + ModifyWorldTransform(ctxcanvas->hDC, &xForm, MWT_LEFTMULTIPLY); + + xForm.eM11 = (FLOAT) 1; + xForm.eM12 = (FLOAT) 0; + xForm.eM21 = (FLOAT) 0; + xForm.eM22 = (FLOAT) 1; + xForm.eDx = (FLOAT) -ctxcanvas->rotate_center_x; + xForm.eDy = (FLOAT) -_cdInvertYAxis(ctxcanvas->canvas, ctxcanvas->rotate_center_y); + ModifyWorldTransform(ctxcanvas->hDC, &xForm, MWT_LEFTMULTIPLY); + } + else + { + ctxcanvas->rotate_angle = 0; + ctxcanvas->rotate_center_x = 0; + ctxcanvas->rotate_center_y = 0; + + ModifyWorldTransform(ctxcanvas->hDC, NULL, MWT_IDENTITY); + SetGraphicsMode(ctxcanvas->hDC, GM_COMPATIBLE); + } +} + +static char* get_rotate_attrib(cdCtxCanvas* ctxcanvas) +{ + static char data[100]; + + if (!ctxcanvas->rotate_angle) + return NULL; + + sprintf(data, "%g %d %d", (double)ctxcanvas->rotate_angle, + ctxcanvas->rotate_center_x, + ctxcanvas->rotate_center_y); + + return data; +} + +static cdAttribute rotate_attrib = +{ + "ROTATE", + set_rotate_attrib, + get_rotate_attrib +}; + +static void set_fill_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + ctxcanvas->fill_attrib[0] = data[0]; +} + +static char* get_fill_attrib(cdCtxCanvas* ctxcanvas) +{ + return ctxcanvas->fill_attrib; +} + +static cdAttribute fill_attrib = +{ + "PENFILLPOLY", + set_fill_attrib, + get_fill_attrib +}; + +static void set_window_rgn(cdCtxCanvas* ctxcanvas, char* data) +{ + if (data) + { + HRGN hrgn = CreateRectRgn(0,0,0,0); + CombineRgn(hrgn, ctxcanvas->new_rgn, NULL, RGN_COPY); + SetWindowRgn(ctxcanvas->hWnd, hrgn, TRUE); + } + else + SetWindowRgn(ctxcanvas->hWnd, NULL, TRUE); +} + +static cdAttribute window_rgn_attrib = +{ + "WINDOWRGN", + set_window_rgn, + NULL +}; + +static char* get_hdc_attrib(cdCtxCanvas* ctxcanvas) +{ + return (char*)ctxcanvas->hDC; +} + +static cdAttribute hdc_attrib = +{ + "HDC", + NULL, + get_hdc_attrib +}; + +/* +%F Cria o canvas para o driver Windows. +*/ +cdCtxCanvas *cdwCreateCanvas(cdCanvas* canvas, HWND hWnd, HDC hDC, int wtype) +{ + cdCtxCanvas* ctxcanvas; + LOGPEN logNullPen; + + ctxcanvas = (cdCtxCanvas*)malloc(sizeof(cdCtxCanvas)); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + + /* store the base canvas */ + ctxcanvas->canvas = canvas; + + /* update canvas context */ + canvas->ctxcanvas = ctxcanvas; + + ctxcanvas->hWnd = hWnd; + ctxcanvas->hDC = hDC; + canvas->invert_yaxis = 1; + + /* linha nula para fill de interior apenas */ + logNullPen.lopnStyle = PS_NULL; + ctxcanvas->hNullPen = CreatePenIndirect(&logNullPen); + + ctxcanvas->logPen.lopnStyle = PS_SOLID; + ctxcanvas->logPen.lopnWidth.x = 1; /* 1 para que a linha possa ter estilo */ + ctxcanvas->logPen.lopnColor = 0; + ctxcanvas->rebuild_pen = 1; + + ctxcanvas->logBrush.lbStyle = BS_SOLID; + ctxcanvas->logBrush.lbColor = 0; + ctxcanvas->logBrush.lbHatch = HS_BDIAGONAL; + + ctxcanvas->clip_pnt = (POINT*)malloc(sizeof(POINT)*4); + memset(ctxcanvas->clip_pnt, 0, sizeof(POINT)*4); + ctxcanvas->clip_pnt_n = 4; + + ctxcanvas->wtype = wtype; + + SetStretchBltMode(ctxcanvas->hDC, COLORONCOLOR); + + ctxcanvas->fill_attrib[0] = '1'; + ctxcanvas->fill_attrib[1] = 0; + + cdRegisterAttribute(canvas, &hdc_attrib); + cdRegisterAttribute(canvas, &fill_attrib); + cdRegisterAttribute(canvas, &img_points_attrib); + cdRegisterAttribute(canvas, &img_mask_attrib); + cdRegisterAttribute(canvas, &rotate_attrib); + cdRegisterAttribute(canvas, &img_alpha_attrib); + cdRegisterAttribute(canvas, &img_format_attrib); + cdRegisterAttribute(canvas, &window_rgn_attrib); + + if (!cdwAlphaBlend) + { + HINSTANCE lib = LoadLibrary("Msimg32"); + if (lib) + cdwAlphaBlend = (AlphaBlendFunc)GetProcAddress(lib, "AlphaBlend"); + } + + return ctxcanvas; +} + +void cdwInitTable(cdCanvas* canvas) +{ + cdCtxCanvas* ctxcanvas = canvas->ctxcanvas; + + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxPoly = cdpoly; + canvas->cxRect = cdrect; + canvas->cxBox = cdbox; + canvas->cxArc = cdarc; + canvas->cxSector = cdsector; + canvas->cxChord = cdchord; + canvas->cxText = cdtext; + canvas->cxGetFontDim = cdgetfontdim; + canvas->cxGetTextSize = cdgettextsize; + canvas->cxPutImageRectRGB = cdputimagerectrgb; + canvas->cxPutImageRectMap = cdputimagerectmap; + canvas->cxScrollArea = cdscrollarea; + canvas->cxNewRegion = cdnewregion; + canvas->cxIsPointInRegion = cdispointinregion; + canvas->cxOffsetRegion = cdoffsetregion; + canvas->cxGetRegionBox = cdgetregionbox; + + canvas->cxClip = cdclip; + canvas->cxClipArea = cdcliparea; + canvas->cxBackOpacity = cdbackopacity; + canvas->cxWriteMode = cdwritemode; + canvas->cxLineStyle = cdlinestyle; + canvas->cxLineWidth = cdlinewidth; + canvas->cxLineCap = cdlinecap; + canvas->cxLineJoin = cdlinejoin; + canvas->cxInteriorStyle = cdinteriorstyle; + canvas->cxHatch = cdhatch; + canvas->cxStipple = cdstipple; + canvas->cxPattern = cdpattern; + canvas->cxFont = cdfont; + canvas->cxNativeFont = cdnativefont; + canvas->cxTextOrientation = cdtextorientation; + canvas->cxTextAlignment = cdtextalignment; + canvas->cxPalette = cdpalette; + canvas->cxBackground = cdbackground; + canvas->cxForeground = cdforeground; + canvas->cxTransform = cdtransform; + + canvas->cxKillCanvas = cdwKillCanvas; + canvas->cxFlush = cdflush; + + if (ctxcanvas->wtype == CDW_WIN || ctxcanvas->wtype == CDW_BMP) + { + canvas->cxClear = cdclear; + canvas->cxGetImageRGB = cdgetimagergb; + canvas->cxPutImageRectRGBA = cdputimagerectrgba; + canvas->cxCreateImage = cdcreateimage; + canvas->cxGetImage = cdgetimage; + canvas->cxPutImageRect = cdputimagerect; + canvas->cxKillImage = cdkillimage; + } + + if (ctxcanvas->wtype == CDW_EMF) + canvas->cxPutImageRectRGBA = cdputimagerectrgba; +} diff --git a/cd/src/win32/cdwin.h b/cd/src/win32/cdwin.h new file mode 100755 index 0000000..a8230e7 --- /dev/null +++ b/cd/src/win32/cdwin.h @@ -0,0 +1,181 @@ +/** \file + * \brief Windows Base Driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CDWIN_H +#define __CDWIN_H + +#include +#include "cd.h" +#include "cd_private.h" + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Contexto de cada imagem no servidor */ +struct _cdCtxImage +{ + HDC hDC; /* handle para o contexto de imagem na memoria */ + HBITMAP hBitmap; /* handle para o bitmap associado */ + HBITMAP hOldBitmap; /* handle para o bitmap associado inicialmente */ + int w; /* largura da imagem */ + int h; /* altura da imagem */ + double w_mm, h_mm; /* size in mm */ + double xres, yres; /* resolution in pixels/mm */ + int bpp; + + void* rgba_dib; /* used by 32 bpp to set alpha before putimage */ + unsigned char* alpha; /* the alpha values must be stored here */ +}; + +/* Contexto de cada canvas (CanvasContext). */ +struct _cdCtxCanvas +{ + cdCanvas* canvas; + + HWND hWnd; /* handle para janela */ + HDC hDC; /* contexto gr'afico para janela */ + int release_dc; + + COLORREF fg, bg; /* foreground, backgound */ + + LOGPEN logPen; /* pena logica - struct com tipo, cor,... */ + HPEN hPen; /* handle para a pena corrente */ + HPEN hNullPen; /* handle da pena que nao desenha nada */ + HPEN hOldPen; /* pena anterior selecionado */ + int rebuild_pen; + + LOGBRUSH logBrush; /* pincel l'ogico - struct com tipo, cor,... */ + HBRUSH hBrush; /* handle para o pincel corrente */ + HBRUSH hOldBrush; /* brush anterior selecionado */ + HBRUSH hBkBrush; /* handle para o pincel com a cor de fundo */ + + HDC hDCMemPat; + HBITMAP hOldBitmapPat,hBitmapPat; + + HDC hDCMemStip; + HBITMAP hOldBitmapStip,hBitmapStip; + + HFONT hFont; /* handle para o fonte corrente */ + HFONT hOldFont; + + int font_angle; + + float rotate_angle; + int rotate_center_x, + rotate_center_y; + + struct + { + int max_width; + int height; + int ascent; + int descent; + } font; + + POINT *clip_pnt; /* coordenadas do pixel no X,Y */ + int clip_pnt_n; /* numero de pontos correntes */ + HRGN clip_hrgn; + + HRGN new_rgn; + + HPALETTE hPal, hOldPal; /* handle para a paleta corrente */ + LOGPALETTE* pLogPal; /* paleta logica do canvas */ + + char *filename; /* Nome do arquivo para WMF */ + int wtype; /* Flag indicando qual o tipo de superficie */ + + HBITMAP hBitmapClip, hOldBitmapClip; /* Bitmap para copiar para clipboard */ + BITMAPINFO bmiClip; + BYTE* bitsClip; + DWORD RopBlt; /* Raster Operation for bitmaps */ + int isOwnedDC; /* usado pelo Native canvas */ + + BYTE* dib_bits; + int bits_size; + + cdImage* image_dbuffer; /* utilizado pelo driver de Double buffer */ + cdCanvas* canvas_dbuffer; + + HBITMAP img_mask; /* used by PutImage with mask and rotation and transparency */ + + POINT img_points[3]; + int use_img_points; + + char fill_attrib[2]; + + int img_format; + unsigned char* img_alpha; +}; + +enum{CDW_WIN, CDW_BMP, CDW_WMF, CDW_EMF}; + +/* Cria um canvas no driver Windows e inicializa valores default */ +cdCtxCanvas *cdwCreateCanvas(cdCanvas* canvas, HWND hWnd, HDC hDC, int wtype); +void cdwInitTable(cdCanvas* canvas); +void cdwRestoreDC(cdCtxCanvas *ctxcanvas); + +/* Remove valores comuns do driver Windows, deve ser chamado por todos os drivers */ +void cdwKillCanvas(cdCtxCanvas* canvas); + + +/* implemented in the wmfmeta.c module */ +void wmfMakePlaceableMetafile(HMETAFILE hmf, const char* filename, int w, int h); +void wmfWritePlacebleFile(HANDLE hFile, unsigned char* buffer, DWORD dwSize, LONG mm, LONG xExt, LONG yExt); + +/* implemented in the wmf_emf.c module */ +int cdplayWMF(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data); +int cdregistercallbackWMF(int cb, cdCallback func); +int cdplayEMF(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data); +int cdregistercallbackEMF(int cb, cdCallback func); + +/* Estrutura que descreve um DIB. The secondary members are pointers to the main dib pointer. */ +typedef struct _cdwDIB +{ + BYTE* dib; /* The DIB as it is defined */ + BITMAPINFO* bmi; /* Bitmap Info = Bitmap Info Header + Palette*/ + BITMAPINFOHEADER* bmih; /* Bitmap Info Header */ + RGBQUAD* bmic; /* Palette */ + BYTE* bits; /* Bitmap Bits */ + int w; + int h; + int type; /* RGB = 0 or MAP = 1 or RGBA = 2 (dib section only) */ +} cdwDIB; + +enum {CDW_RGB, CDW_MAP, CDW_RGBA}; + +int cdwCreateDIB(cdwDIB* dib); +void cdwKillDIB(cdwDIB* dib); + +HANDLE cdwCreateCopyHDIB(BITMAPINFO* bmi, BYTE* bits); +void cdwDIBReference(cdwDIB* dib, BYTE* bmi, BYTE* bits); +int cdwCreateDIBRefBuffer(cdwDIB* dib, unsigned char* *bits, int *size); +void cdwCreateDIBRefBits(cdwDIB* dib, unsigned char *bits); +HBITMAP cdwCreateDIBSection(cdwDIB* dib, HDC hDC); + +HPALETTE cdwDIBLogicalPalette(cdwDIB* dib); + +/* copy from DIB */ +void cdwDIBDecodeRGB(cdwDIB* dib, unsigned char *red, unsigned char *green, unsigned char *blue); +void cdwDIBDecodeMap(cdwDIB* dib, unsigned char *index, long *colors); + +/* copy to DIB */ +void cdwDIBEncodePattern(cdwDIB* dib, const long int *colors); +void cdwDIBEncodeMapRect(cdwDIB* dib, const unsigned char *index, const long int *colors, int xi, int yi, int wi, int hi); +void cdwDIBEncodeRGBRect(cdwDIB* dib, const unsigned char *red, const unsigned char *green, const unsigned char *blue, int xi, int yi, int wi, int hi); +void cdwDIBEncodeRGBARect(cdwDIB* dib, const unsigned char *red, const unsigned char *green, const unsigned char *blue, const unsigned char *alpha, int xi, int yi, int wi, int hi); +void cdwDIBEncodeRGBARectZoom(cdwDIB* dib, const unsigned char *red, const unsigned char *green, const unsigned char *blue, const unsigned char *alpha, int w, int h, int xi, int yi, int wi, int hi); +void cdwDIBEncodeAlphaRect(cdwDIB* dib, const unsigned char *alpha, int xi, int yi, int wi, int hi); + + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef CDWIN_H */ + diff --git a/cd/src/win32/cdwnative.c b/cd/src/win32/cdwnative.c new file mode 100755 index 0000000..fdc223e --- /dev/null +++ b/cd/src/win32/cdwnative.c @@ -0,0 +1,209 @@ +/** \file + * \brief Windows Native Window Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "cdwin.h" +#include "cdnative.h" + + +int cdGetScreenColorPlanes(void) +{ + int bpp; + HDC ScreenDC = GetDC(NULL); + bpp = GetDeviceCaps(ScreenDC, BITSPIXEL); + ReleaseDC(NULL, ScreenDC); + return bpp; +} + +void cdGetScreenSize(int *width, int *height, double *width_mm, double *height_mm) +{ + HDC ScreenDC = GetDC(NULL); + if (width) *width = GetDeviceCaps(ScreenDC, HORZRES); + if (height) *height = GetDeviceCaps(ScreenDC, VERTRES); + if (width_mm) *width_mm = ((GetDeviceCaps(ScreenDC, HORZRES) * 25.4) / GetDeviceCaps(ScreenDC, LOGPIXELSX)); + if (height_mm) *height_mm = ((GetDeviceCaps(ScreenDC, VERTRES) * 25.4) / GetDeviceCaps(ScreenDC, LOGPIXELSY)); + ReleaseDC(NULL, ScreenDC); +} + +static void cdwReleaseDC(cdCtxCanvas *ctxcanvas) +{ + SelectObject(ctxcanvas->hDC, ctxcanvas->hOldBrush); + SelectObject(ctxcanvas->hDC, ctxcanvas->hOldPen); + SelectObject(ctxcanvas->hDC, ctxcanvas->hOldFont); + ReleaseDC(ctxcanvas->hWnd, ctxcanvas->hDC); + ctxcanvas->hDC = NULL; +} + +static int cdactivate(cdCtxCanvas *ctxcanvas) +{ + if (ctxcanvas->hWnd) + { + RECT rect; + HDC ScreenDC; + GetClientRect(ctxcanvas->hWnd, &rect); + ctxcanvas->canvas->w = rect.right - rect.left; + ctxcanvas->canvas->h = rect.bottom - rect.top; + + ctxcanvas->canvas->w_mm = ((double)ctxcanvas->canvas->w) / ctxcanvas->canvas->xres; + ctxcanvas->canvas->h_mm = ((double)ctxcanvas->canvas->h) / ctxcanvas->canvas->yres; + + ScreenDC = GetDC(NULL); + ctxcanvas->canvas->bpp = GetDeviceCaps(ScreenDC, BITSPIXEL); + ReleaseDC(NULL, ScreenDC); + + if (ctxcanvas->canvas->use_matrix) + ctxcanvas->canvas->cxTransform(ctxcanvas, ctxcanvas->canvas->matrix); + } + + /* Se nao e' ownwer, tem que restaurar o contexto */ + if (!ctxcanvas->isOwnedDC) + { + if (ctxcanvas->hDC) /* deactivate not called */ + cdwReleaseDC(ctxcanvas); + + ctxcanvas->hDC = GetDC(ctxcanvas->hWnd); + cdwRestoreDC(ctxcanvas); + } + + return CD_OK; +} + +static void cddeactivate(cdCtxCanvas *ctxcanvas) +{ + /* Se nao e' ownwer, tem que liberar o contexto */ + if (!ctxcanvas->isOwnedDC && ctxcanvas->hDC) + cdwReleaseDC(ctxcanvas); +} + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + /* se nao e' owner e nao esta' ativo, simula ativacao */ + if (!ctxcanvas->isOwnedDC && !ctxcanvas->hDC) + { + ctxcanvas->hDC = GetDC(ctxcanvas->hWnd); + cdwRestoreDC(ctxcanvas); + } + + cdwKillCanvas(ctxcanvas); + + if (ctxcanvas->release_dc) + ReleaseDC(ctxcanvas->hWnd, ctxcanvas->hDC); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + cdCtxCanvas* ctxcanvas; + HWND hWnd = NULL; + HDC hDC, ScreenDC; + int release_dc = 0; + + ScreenDC = GetDC(NULL); + canvas->bpp = GetDeviceCaps(ScreenDC, BITSPIXEL); + canvas->xres = (float)(((double)GetDeviceCaps(ScreenDC, LOGPIXELSX)) / 25.4); + canvas->yres = (float)(((double)GetDeviceCaps(ScreenDC, LOGPIXELSY)) / 25.4); + ReleaseDC(NULL, ScreenDC); + + if (!data) + { + hDC = GetDC(NULL); + release_dc = 1; + canvas->w = GetDeviceCaps(hDC, HORZRES); + canvas->h = GetDeviceCaps(hDC, VERTRES); + } + else if (IsWindow((HWND)data)) + { + RECT rect; + hWnd = (HWND)data; + + hDC = GetDC(hWnd); + release_dc = 1; + + GetClientRect(hWnd, &rect); + canvas->w = rect.right - rect.left; + canvas->h = rect.bottom - rect.top; + } + else /* can be a HDC or a string */ + { + DWORD objtype = GetObjectType((HGDIOBJ)data); + if (objtype == OBJ_DC || objtype == OBJ_MEMDC || + objtype == OBJ_ENHMETADC || objtype == OBJ_METADC) + { + hDC = (HDC)data; + canvas->w = GetDeviceCaps(hDC, HORZRES); + canvas->h = GetDeviceCaps(hDC, VERTRES); + } + else + { + hDC = NULL; + canvas->w = 0; + canvas->h = 0; + sscanf((char*)data,"%p %dx%d", &hDC, &canvas->w, &canvas->h); + + if (!hDC || !canvas->w || !canvas->h) + return; + } + release_dc = 0; + } + + canvas->w_mm = ((double)canvas->w) / canvas->xres; + canvas->h_mm = ((double)canvas->h) / canvas->yres; + + /* Inicializa driver WIN32 */ + ctxcanvas = cdwCreateCanvas(canvas, hWnd, hDC, CDW_WIN); + + ctxcanvas->release_dc = release_dc; + ctxcanvas->clip_pnt[2].x = ctxcanvas->clip_pnt[1].x = canvas->w - 1; + ctxcanvas->clip_pnt[3].y = ctxcanvas->clip_pnt[2].y = canvas->h - 1; + + if (hWnd) + { + LONG style; + style = GetClassLong(hWnd, GCL_STYLE); + ctxcanvas->isOwnedDC = (int) ((style & CS_OWNDC) || (style & CS_CLASSDC)); + } + else + ctxcanvas->isOwnedDC = 1; + + /* Se nao e' ownwer, tem que liberar o contexto */ + if (!ctxcanvas->isOwnedDC) + cdwReleaseDC(ctxcanvas); +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxActivate = cdactivate; + canvas->cxDeactivate = cddeactivate; +} + +static cdContext cdNativeContext = +{ + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_FPRIMTIVES ), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +cdContext* cdContextNativeWindow(void) +{ + if (cdUseContextPlus(CD_QUERY)) + { + cdContext* ctx = cdGetContextPlus(CD_CTX_NATIVEWINDOW); + if (ctx != NULL) + return ctx; + } + + return &cdNativeContext; +} diff --git a/cd/src/win32/cdwprn.c b/cd/src/win32/cdwprn.c new file mode 100755 index 0000000..95e4aca --- /dev/null +++ b/cd/src/win32/cdwprn.c @@ -0,0 +1,184 @@ +/** \file + * \brief Windows Printer Driver + * + * See Copyright Notice in cd.h + */ + + +#include +#include +#include + +#include "cdwin.h" +#include "cdprint.h" + +#ifndef DC_COLORDEVICE +#define DC_COLORDEVICE 32 /* declared only if WINVER 0x0500 */ +#endif + +/* +%F cdKillCanvas para Printer. +Termina a pagina e termina o documento, enviando-o para a impressora. +*/ +static void cdkillcanvas (cdCtxCanvas *ctxcanvas) +{ + EndPage(ctxcanvas->hDC); + EndDoc(ctxcanvas->hDC); + + cdwKillCanvas(ctxcanvas); + + DeleteDC(ctxcanvas->hDC); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +/* +%F cdFlush para Printer. +Termina uma pagina e inicia outra. +*/ +static void cdflush(cdCtxCanvas *ctxcanvas) +{ + GdiFlush(); + EndPage(ctxcanvas->hDC); + + StartPage(ctxcanvas->hDC); + cdwRestoreDC(ctxcanvas); +} + +/* +%F cdCreateCanvas para Impresora. +Usa a impressora default. +*/ +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + cdCtxCanvas* ctxcanvas; + char *data_str = (char*) data; + char docname[256] = "CD - Canvas Draw Document"; + DOCINFO di; + HDC hDC; + int dialog = 0, wtype; + PRINTDLG pd; + + /* Inicializa parametros */ + if (data_str == NULL) + return; + + if (data_str[0] != 0) + { + char *ptr = strstr(data_str, "-d"); + + if (ptr != NULL) + dialog = 1; + + if (data_str[0] != '-') + { + strcpy(docname, data_str); + + if (dialog) + docname[ptr - data_str - 1] = 0; + } + } + + ZeroMemory(&pd, sizeof(PRINTDLG)); + pd.lStructSize = sizeof(PRINTDLG); + pd.nCopies = 1; + + if (dialog) + { + pd.Flags = PD_RETURNDC | PD_USEDEVMODECOPIES | PD_COLLATE | PD_NOPAGENUMS | PD_NOSELECTION; + pd.hwndOwner = GetForegroundWindow(); + } + else + { + pd.Flags = PD_RETURNDC | PD_RETURNDEFAULT; + } + + if (!PrintDlg(&pd)) + { + if(pd.hDevMode) + GlobalFree(pd.hDevMode); + if(pd.hDevNames) + GlobalFree(pd.hDevNames); + return; + } + + hDC = pd.hDC; + + /* Inicializa documento */ + di.cbSize = sizeof(DOCINFO); + di.lpszDocName = docname; + di.lpszOutput = (LPTSTR) NULL; + di.lpszDatatype = (LPTSTR) NULL; + di.fwType = 0; + + StartDoc(hDC, &di); + + StartPage(hDC); + + wtype = CDW_EMF; + + /* Inicializa driver WIN32 */ + ctxcanvas = cdwCreateCanvas(canvas, NULL, hDC, wtype); + + canvas->w = GetDeviceCaps(hDC, HORZRES); + canvas->h = GetDeviceCaps(hDC, VERTRES); + canvas->w_mm = (double) GetDeviceCaps(hDC, HORZSIZE); + canvas->h_mm = (double) GetDeviceCaps(hDC, VERTSIZE); + canvas->bpp = GetDeviceCaps(hDC, BITSPIXEL); + canvas->xres = canvas->w / canvas->w_mm; + canvas->yres = canvas->h / canvas->h_mm; + ctxcanvas->clip_pnt[2].x = ctxcanvas->clip_pnt[1].x = canvas->w - 1; + ctxcanvas->clip_pnt[3].y = ctxcanvas->clip_pnt[2].y = canvas->h - 1; + + /* PDF Writer returns bpp=1, so we check if color is supported and overwrite this value */ + if (canvas->bpp==1 && pd.hDevNames) + { + unsigned char* devnames = (unsigned char*)GlobalLock(pd.hDevNames); + DEVNAMES* dn = (DEVNAMES*)devnames; + char* name = (char*)(devnames + dn->wDeviceOffset); + char* port = (char*)(devnames + dn->wOutputOffset); + + if (DeviceCapabilities(name, port, DC_COLORDEVICE, NULL, NULL)) + canvas->bpp = 24; + + GlobalUnlock(pd.hDevNames); + } + + if(pd.hDevMode) + GlobalFree(pd.hDevMode); + if(pd.hDevNames) + GlobalFree(pd.hDevNames); +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxFlush = cdflush; +} + +static cdContext cdPrinterContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_PLAY | CD_CAP_YAXIS | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | + CD_CAP_FPRIMTIVES ), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL +}; + +cdContext* cdContextPrinter(void) +{ + if (cdUseContextPlus(CD_QUERY)) + { + cdContext* ctx = cdGetContextPlus(CD_CTX_PRINTER); + if (ctx != NULL) + return ctx; + } + + return &cdPrinterContext; +} diff --git a/cd/src/win32/cdwwmf.c b/cd/src/win32/cdwwmf.c new file mode 100755 index 0000000..0571c9f --- /dev/null +++ b/cd/src/win32/cdwwmf.c @@ -0,0 +1,109 @@ +/** \file + * \brief Windows WMF Driver + * Aldus Placeable Metafile + * + * See Copyright Notice in cd.h + */ + + +#include +#include + +#include "cdwin.h" +#include "cdwmf.h" + + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + HMETAFILE hmf; + + cdwKillCanvas(ctxcanvas); + + hmf = CloseMetaFile(ctxcanvas->hDC); + wmfMakePlaceableMetafile(hmf, ctxcanvas->filename, ctxcanvas->canvas->w, ctxcanvas->canvas->h); + DeleteMetaFile(hmf); + + free(ctxcanvas->filename); + + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + free(ctxcanvas); +} + +static void cdcreatecanvas(cdCanvas* canvas, void* data) +{ + cdCtxCanvas* ctxcanvas; + char* strdata = (char*)data; + int w = 0, h = 0; + float res; + HDC ScreenDC; + FILE* fh; + char filename[10240] = ""; + + /* Inicializa parametros */ + if (strdata == NULL) + return; + + ScreenDC = GetDC(NULL); + res = (float)(((double)GetDeviceCaps(ScreenDC, LOGPIXELSX)) / 25.4); + ReleaseDC(NULL, ScreenDC); + + strdata += cdGetFileName(strdata, filename); + if (filename[0] == 0) + return; + + sscanf(strdata,"%dx%d %g", &w, &h, &res); + if (w == 0 || h == 0) + return; + + /* Verifica se o arquivo pode ser aberto para escrita */ + fh = fopen(filename, "w"); + if (fh == 0) + return; + + fclose(fh); + + /* Inicializa driver WIN32 */ + ctxcanvas = cdwCreateCanvas(canvas, NULL, CreateMetaFile(NULL), CDW_WMF); + + canvas->w = w; + canvas->h = h; + canvas->xres = res; + canvas->yres = res; + canvas->w_mm = ((double)w) / res; + canvas->h_mm = ((double)h) / res; + canvas->bpp = 24; + ctxcanvas->clip_pnt[2].x = ctxcanvas->clip_pnt[1].x = canvas->w - 1; + ctxcanvas->clip_pnt[3].y = ctxcanvas->clip_pnt[2].y = canvas->h - 1; + + /* Inicializacao de variaveis particulares para o WMF */ + ctxcanvas->filename = cdStrDup(filename); +} + +static void cdinittable(cdCanvas* canvas) +{ + cdwInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; + + /* overwrite the base Win32 driver functions */ + canvas->cxGetTextSize = cdgettextsizeEX; +} + +static cdContext cdWMFContext = +{ + CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_YAXIS | CD_CAP_TEXTSIZE | + CD_CAP_CLIPAREA | CD_CAP_CLIPPOLY | CD_CAP_PATTERN | + CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | + CD_CAP_LINECAP | CD_CAP_LINEJOIN | + CD_CAP_FPRIMTIVES ), + 0, + cdcreatecanvas, + cdinittable, + cdplayWMF, + cdregistercallbackWMF +}; + +cdContext* cdContextWMF(void) +{ + return &cdWMFContext; +} diff --git a/cd/src/win32/wmf_emf.c b/cd/src/win32/wmf_emf.c new file mode 100755 index 0000000..d876874 --- /dev/null +++ b/cd/src/win32/wmf_emf.c @@ -0,0 +1,2121 @@ +/** \file + * \brief EMF and WMF Play + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#include "cdwin.h" +#include "cdwmf.h" +#include "cdemf.h" + +/* placeable metafile data definitions */ +#define ALDUSKEY 0x9AC6CDD7 + +#ifndef PS_JOIN_MASK +#define PS_JOIN_MASK 0x0000F000 +#endif + +/* +%F Definicao do header do APM. Ver comentario no final deste arquivo. +*/ +typedef struct _APMFILEHEADER +{ + WORD key1, + key2, + hmf, + bleft, btop, bright, bbottom, + inch, + reserved1, + reserved2, + checksum; +} APMFILEHEADER; + + +/* coordinates convertion */ + +static double wmf_xfactor = 1; +static double wmf_yfactor = -1; /* negative because top-down orientation */ +static int wmf_xmin = 0; +static int wmf_ymin = 0; +static int wmf_left = 0; +static int wmf_bottom = 0; /* bottom and right are not included */ +static int wmf_top = 0; +static int wmf_right = 0; + +static int sScaleX(int x) +{ + return cdRound((x - wmf_left) * wmf_xfactor + wmf_xmin); +} + +static int sScaleY(int y) +{ + return cdRound((y - (wmf_bottom-1)) * wmf_yfactor + wmf_ymin); +} + +static int sScaleW(int w) +{ + int s = (int)(w * fabs(wmf_xfactor) + 0.5); + return s > 0? s: 1; +} + +static int sScaleH(int h) +{ + int s = (int)(h * fabs(wmf_yfactor) + 0.5); + return s > 0? s: 1; +} + +static void sCalcSizeX(int x) +{ + if (x < wmf_left) + { + wmf_left = x; + return; + } + + if (x+1 > wmf_right) + { + wmf_right = x+1; + return; + } +} + +static void sCalcSizeY(int y) +{ + if (y < wmf_top) + { + wmf_top = y; + return; + } + + if (y+1 > wmf_bottom) + { + wmf_bottom = y+1; + return; + } +} + +static int CALLBACK CalcSizeEMFEnumProc(HDC hDC, HANDLETABLE *lpHTable, const ENHMETARECORD *lpEMFR, int nObj, LPARAM lpData) +{ + switch (lpEMFR->iType) + { + case EMR_POLYGON: + { + EMRPOLYGON* data = (EMRPOLYGON*)lpEMFR; + int i; + for (i = 0; i < (int)data->cptl; i++) + { + sCalcSizeX(data->aptl[i].x); + sCalcSizeY(data->aptl[i].y); + } + + break; + } + case EMR_POLYLINE: + { + EMRPOLYLINE* data = (EMRPOLYLINE*)lpEMFR; + int i; + for (i = 0; i < (int)data->cptl; i++) + { + sCalcSizeX(data->aptl[i].x); + sCalcSizeY(data->aptl[i].y); + } + + break; + } + case EMR_POLYLINETO: + { + EMRPOLYLINETO* data = (EMRPOLYLINETO*)lpEMFR; + int i; + for (i = 0; i < (int)data->cptl; i++) + { + sCalcSizeX(data->aptl[i].x); + sCalcSizeY(data->aptl[i].y); + } + + break; + } + case EMR_POLYPOLYLINE: + { + EMRPOLYPOLYLINE* data = (EMRPOLYPOLYLINE*)lpEMFR; + POINTL* aptl = (POINTL*)(data->aPolyCounts + data->nPolys); /* skip the array of counts */ + int c, i; /* data->aptl can not be used if count greater than 1 */ + for (c = 0; c < (int)data->nPolys; c++) + { + for (i = 0; i < (int)data->aPolyCounts[c]; i++, aptl++) + { + sCalcSizeX(aptl->x); + sCalcSizeY(aptl->y); + } + } + break; + } + case EMR_POLYPOLYGON: + { + EMRPOLYPOLYGON* data = (EMRPOLYPOLYGON*)lpEMFR; + POINTL* aptl = (POINTL*)(data->aPolyCounts + data->nPolys); /* skip the array of counts */ + int c, i; /* data->aptl can not be used if count greater than 1 */ + for (c = 0; c < (int)data->nPolys; c++) + { + for (i = 0; i < (int)data->aPolyCounts[c]; i++, aptl++) + { + sCalcSizeX(aptl->x); + sCalcSizeY(aptl->y); + } + } + break; + } + case EMR_SETPIXELV: + { + EMRSETPIXELV* data = (EMRSETPIXELV*)lpEMFR; + sCalcSizeX(data->ptlPixel.x); + sCalcSizeY(data->ptlPixel.y); + break; + } + case EMR_MOVETOEX: + { + EMRMOVETOEX* data = (EMRMOVETOEX*)lpEMFR; + sCalcSizeX(data->ptl.x); + sCalcSizeY(data->ptl.y); + break; + } + case EMR_ANGLEARC: + { + EMRANGLEARC* data = (EMRANGLEARC*)lpEMFR; + int x, y; + + x = (int)(data->nRadius * cos(CD_DEG2RAD * data->eStartAngle + data->eSweepAngle)); + y = (int)(data->nRadius * sin(CD_DEG2RAD * data->eStartAngle + data->eSweepAngle)); + + sCalcSizeX(data->ptlCenter.x); + sCalcSizeY(data->ptlCenter.y); + sCalcSizeX(x); + sCalcSizeY(y); + break; + } + case EMR_ELLIPSE: + { + EMRELLIPSE* data = (EMRELLIPSE*)lpEMFR; + sCalcSizeX(data->rclBox.left); + sCalcSizeX(data->rclBox.right); + sCalcSizeY(data->rclBox.top); + sCalcSizeY(data->rclBox.bottom); + break; + } + case EMR_RECTANGLE: + { + EMRRECTANGLE* data = (EMRRECTANGLE*)lpEMFR; + sCalcSizeX(data->rclBox.left); + sCalcSizeX(data->rclBox.right); + sCalcSizeY(data->rclBox.bottom); + sCalcSizeY(data->rclBox.top); + break; + } + case EMR_ROUNDRECT: + { + EMRROUNDRECT* data = (EMRROUNDRECT*)lpEMFR; + sCalcSizeX(data->rclBox.left); + sCalcSizeX(data->rclBox.right); + sCalcSizeY(data->rclBox.bottom); + sCalcSizeY(data->rclBox.top); + break; + } + case EMR_ARC: + { + EMRARC* data = (EMRARC*)lpEMFR; + sCalcSizeX(data->rclBox.left); + sCalcSizeX(data->rclBox.right); + sCalcSizeY(data->rclBox.top); + sCalcSizeY(data->rclBox.bottom); + break; + } + case EMR_CHORD: + { + EMRCHORD* data = (EMRCHORD*)lpEMFR; + sCalcSizeX(data->rclBox.left); + sCalcSizeX(data->rclBox.right); + sCalcSizeY(data->rclBox.top); + sCalcSizeY(data->rclBox.bottom); + break; + } + case EMR_PIE: + { + EMRPIE* data = (EMRPIE*)lpEMFR; + sCalcSizeX(data->rclBox.left); + sCalcSizeX(data->rclBox.right); + sCalcSizeY(data->rclBox.top); + sCalcSizeY(data->rclBox.bottom); + break; + } + case EMR_LINETO: + { + EMRLINETO* data = (EMRLINETO*)lpEMFR; + sCalcSizeX(data->ptl.x); + sCalcSizeY(data->ptl.y); + break; + } + case EMR_ARCTO: + { + EMRARCTO* data = (EMRARCTO*)lpEMFR; + sCalcSizeX(data->rclBox.left); + sCalcSizeX(data->rclBox.right); + sCalcSizeY(data->rclBox.top); + sCalcSizeY(data->rclBox.bottom); + break; + } + case EMR_POLYDRAW: + { + int p; + EMRPOLYDRAW* data = (EMRPOLYDRAW*)lpEMFR; + + for(p = 0; p < (int)data->cptl; p++) + { + switch (data->abTypes[p]) + { + case PT_MOVETO: + { + sCalcSizeX(data->aptl[p].x); + sCalcSizeY(data->aptl[p].y); + break; + } + case PT_LINETO: + { + sCalcSizeX(data->aptl[p].x); + sCalcSizeY(data->aptl[p].y); + break; + } + } + } + break; + } + case EMR_BITBLT: + { + EMRBITBLT* data = (EMRBITBLT*)lpEMFR; + cdwDIB dib; + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmiSrc, ((BYTE*)data) + data->offBitsSrc); + + if (dib.type == -1) + break; + + sCalcSizeX(data->xDest); + sCalcSizeY(data->yDest); + sCalcSizeX(data->xDest + dib.w); + sCalcSizeY(data->yDest + abs(dib.h)); + break; + } + case EMR_STRETCHBLT: + { + EMRSTRETCHBLT* data = (EMRSTRETCHBLT*)lpEMFR; + cdwDIB dib; + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmiSrc, ((BYTE*)data) + data->offBitsSrc); + + if (dib.type == -1) + break; + + sCalcSizeX(data->xDest); + sCalcSizeY(data->yDest); + sCalcSizeX(data->xDest + data->cxDest); + sCalcSizeY(data->yDest + data->cyDest); + break; + } + case EMR_MASKBLT: + { + EMRMASKBLT* data = (EMRMASKBLT*)lpEMFR; + cdwDIB dib; + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmiSrc, ((BYTE*)data) + data->offBitsSrc); + + if (dib.type == -1) + break; + + sCalcSizeX(data->xDest); + sCalcSizeY(data->yDest); + sCalcSizeX(data->xDest + dib.w); + sCalcSizeY(data->yDest + abs(dib.h)); + break; + } + case EMR_SETDIBITSTODEVICE: + { + EMRSETDIBITSTODEVICE* data = (EMRSETDIBITSTODEVICE*)lpEMFR; + cdwDIB dib; + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmiSrc, ((BYTE*)data) + data->offBitsSrc); + + if (dib.type == -1) + break; + + sCalcSizeX(data->xDest); + sCalcSizeY(data->yDest); + sCalcSizeX(data->xDest + dib.w); + sCalcSizeY(data->yDest + abs(dib.h)); + break; + } + case EMR_STRETCHDIBITS: + { + EMRSTRETCHDIBITS* data = (EMRSTRETCHDIBITS*)lpEMFR; + cdwDIB dib; + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmiSrc, ((BYTE*)data) + data->offBitsSrc); + + if (dib.type == -1) + break; + + sCalcSizeX(data->xDest); + sCalcSizeY(data->yDest); + sCalcSizeX(data->xDest + data->cxDest); + sCalcSizeY(data->yDest + data->cyDest); + break; + } + case EMR_EXTTEXTOUTA: + { + EMREXTTEXTOUTA* data = (EMREXTTEXTOUTA*)lpEMFR; + sCalcSizeX(data->emrtext.ptlReference.x); + sCalcSizeY(data->emrtext.ptlReference.y); + break; + } + case EMR_EXTTEXTOUTW: + { + EMREXTTEXTOUTW* data = (EMREXTTEXTOUTW*)lpEMFR; + sCalcSizeX(data->emrtext.ptlReference.x); + sCalcSizeY(data->emrtext.ptlReference.y); + break; + } + case EMR_POLYGON16: + { + EMRPOLYGON16* data = (EMRPOLYGON16*)lpEMFR; + int i; + for (i = 0; i < (int)data->cpts; i++) + { + sCalcSizeX(data->apts[i].x); + sCalcSizeY(data->apts[i].y); + } + break; + } + case EMR_POLYLINE16: + { + EMRPOLYLINE16* data = (EMRPOLYLINE16*)lpEMFR; + int i; + for (i = 0; i < (int)data->cpts; i++) + { + sCalcSizeX(data->apts[i].x); + sCalcSizeY(data->apts[i].y); + } + break; + } + case EMR_POLYLINETO16: + { + EMRPOLYLINETO16* data = (EMRPOLYLINETO16*)lpEMFR; + int i; + for (i = 0; i < (int)data->cpts; i++) + { + sCalcSizeX(data->apts[i].x); + sCalcSizeY(data->apts[i].y); + } + break; + } + case EMR_POLYPOLYLINE16: + { + EMRPOLYPOLYLINE16* data = (EMRPOLYPOLYLINE16*)lpEMFR; + POINTS* apts = (POINTS*)(data->aPolyCounts + data->nPolys); /* skip the array of counts */ + int c, i; /* data->apts can not be used if count greater than 1 */ + for (c = 0; c < (int)data->nPolys; c++) + { + for (i = 0; i < (int)data->aPolyCounts[c]; i++, apts++) + { + sCalcSizeX(apts->x); + sCalcSizeY(apts->y); + } + } + break; + } + case EMR_POLYPOLYGON16: + { + EMRPOLYPOLYGON16* data = (EMRPOLYPOLYGON16*)lpEMFR; + POINTS* apts = (POINTS*)(data->aPolyCounts + data->nPolys); /* skip the array of counts */ + int c, i; /* data->apts can not be used if count greater than 1 */ + for (c = 0; c < (int)data->nPolys; c++) + { + for (i = 0; i < (int)data->aPolyCounts[c]; i++, apts++) + { + sCalcSizeX(apts->x); + sCalcSizeY(apts->y); + } + } + break; + } + case EMR_POLYDRAW16: + { + EMRPOLYDRAW16* data = (EMRPOLYDRAW16*)lpEMFR; + int p; + for(p = 0; p < (int)data->cpts; p++) + { + switch (data->abTypes[p]) + { + case PT_MOVETO: + { + sCalcSizeX(data->apts[p].x); + sCalcSizeY(data->apts[p].y); + break; + } + case PT_LINETO: + { + sCalcSizeX(data->apts[p].x); + sCalcSizeY(data->apts[p].y); + break; + } + } + } + break; + } + case EMR_POLYTEXTOUTA: + { + EMRPOLYTEXTOUTA* data = (EMRPOLYTEXTOUTA*)lpEMFR; + int t; + for (t = 0; t < data->cStrings; t++) + { + sCalcSizeX(data->aemrtext[t].ptlReference.x); + sCalcSizeY(data->aemrtext[t].ptlReference.y); + } + break; + } + case EMR_POLYTEXTOUTW: + { + EMRPOLYTEXTOUTW* data = (EMRPOLYTEXTOUTW*)lpEMFR; + int t; + for (t = 0; t < data->cStrings; t++) + { + sCalcSizeX(data->aemrtext[t].ptlReference.x); + sCalcSizeY(data->aemrtext[t].ptlReference.y); + } + break; + } + } + + return 1; +} + +static int CALLBACK EMFEnumProc(HDC hDC, HANDLETABLE *lpHTable, const ENHMETARECORD *lpEMFR, int nObj, LPARAM lpData) +{ + static int curx = 0, cury = 0; + static int upd_xy = 0; + cdCanvas* canvas = (cdCanvas*)lpData; + + switch (lpEMFR->iType) + { + case EMR_SETWORLDTRANSFORM: + { + double matrix[6]; + EMRSETWORLDTRANSFORM* data = (EMRSETWORLDTRANSFORM*)lpEMFR; + matrix[0] = data->xform.eM11; + matrix[1] = data->xform.eM12; + matrix[2] = data->xform.eM21; + matrix[3] = data->xform.eM22; + matrix[4] = data->xform.eDx; + matrix[5] = data->xform.eDy; + cdCanvasTransform(canvas, matrix); + break; + } + case EMR_MODIFYWORLDTRANSFORM: + { + EMRMODIFYWORLDTRANSFORM* data = (EMRMODIFYWORLDTRANSFORM*)lpEMFR; + if (data->iMode == MWT_IDENTITY) + cdCanvasTransform(canvas, NULL); + else if (data->iMode == MWT_LEFTMULTIPLY) + { + double matrix[6]; + matrix[0] = data->xform.eM11; + matrix[1] = data->xform.eM12; + matrix[2] = data->xform.eM21; + matrix[3] = data->xform.eM22; + matrix[4] = data->xform.eDx; + matrix[5] = data->xform.eDy; + cdCanvasTransformMultiply(canvas, matrix); + } + break; + } + case EMR_POLYGON: + { + EMRPOLYGON* data = (EMRPOLYGON*)lpEMFR; + int i; + + cdCanvasBegin(canvas, CD_FILL); + + for (i = 0; i < (int)data->cptl; i++) + cdCanvasVertex(canvas, sScaleX(data->aptl[i].x), sScaleY(data->aptl[i].y)); + + cdCanvasEnd(canvas); + break; + } + case EMR_POLYLINE: + { + EMRPOLYLINE* data = (EMRPOLYLINE*)lpEMFR; + int i; + + cdCanvasBegin(canvas, CD_OPEN_LINES); + + for (i = 0; i < (int)data->cptl; i++) + cdCanvasVertex(canvas, sScaleX(data->aptl[i].x), sScaleY(data->aptl[i].y)); + + cdCanvasEnd(canvas); + break; + } + case EMR_POLYBEZIER: + { + EMRPOLYBEZIER* data = (EMRPOLYBEZIER*)lpEMFR; + int i; + + cdCanvasBegin(canvas, CD_BEZIER); + + for (i = 0; i < (int)data->cptl; i++) + cdCanvasVertex(canvas, sScaleX(data->aptl[i].x), sScaleY(data->aptl[i].y)); + + cdCanvasEnd(canvas); + break; + } + case EMR_POLYLINETO: + { + EMRPOLYLINETO* data = (EMRPOLYLINETO*)lpEMFR; + int i; + + cdCanvasBegin(canvas, CD_OPEN_LINES); + + for (i = 0; i < (int)data->cptl; i++) + cdCanvasVertex(canvas, sScaleX(data->aptl[i].x), sScaleY(data->aptl[i].y)); + + curx = data->aptl[data->cptl - 1].x; + cury = data->aptl[data->cptl - 1].y; + + cdCanvasEnd(canvas); + break; + } + case EMR_POLYBEZIERTO: + { + EMRPOLYBEZIERTO* data = (EMRPOLYBEZIERTO*)lpEMFR; + int i; + + cdCanvasBegin(canvas, CD_BEZIER); + + for (i = 0; i < (int)data->cptl; i++) + cdCanvasVertex(canvas, sScaleX(data->aptl[i].x), sScaleY(data->aptl[i].y)); + + curx = data->aptl[data->cptl - 1].x; + cury = data->aptl[data->cptl - 1].y; + + cdCanvasEnd(canvas); + break; + } + case EMR_POLYPOLYLINE: + { + EMRPOLYPOLYLINE* data = (EMRPOLYPOLYLINE*)lpEMFR; + POINTL* aptl = (POINTL*)(data->aPolyCounts + data->nPolys); /* skip the array of counts */ + int c, i; /* data->aptl can not be used if count greater than 1 */ + + for (c = 0; c < (int)data->nPolys; c++) + { + cdCanvasBegin(canvas, CD_OPEN_LINES); + + for (i = 0; i < (int)data->aPolyCounts[c]; i++, aptl++) + cdCanvasVertex(canvas, sScaleX(aptl->x), sScaleY(aptl->y)); + + cdCanvasEnd(canvas); + } + break; + } + case EMR_POLYPOLYGON: + { + EMRPOLYPOLYGON* data = (EMRPOLYPOLYGON*)lpEMFR; + POINTL* aptl = (POINTL*)(data->aPolyCounts + data->nPolys); /* skip the array of counts */ + int c, i; /* data->aptl can not be used if count greater than 1 */ + + for (c = 0; c < (int)data->nPolys; c++) + { + cdCanvasBegin(canvas, CD_FILL); + + for (i = 0; i < (int)data->aPolyCounts[c]; i++, aptl++) + cdCanvasVertex(canvas, sScaleX(aptl->x), sScaleY(aptl->y)); + + cdCanvasEnd(canvas); + } + break; + } + case EMR_SETPIXELV: + { + EMRSETPIXELV* data = (EMRSETPIXELV*)lpEMFR; + cdCanvasPixel(canvas, sScaleX(data->ptlPixel.x), sScaleY(data->ptlPixel.y), cdEncodeColor(GetRValue(data->crColor),GetGValue(data->crColor),GetBValue(data->crColor))); + break; + } + case EMR_SETBKMODE: + { + EMRSETBKMODE* data = (EMRSETBKMODE*)lpEMFR; + cdCanvasBackOpacity(canvas, data->iMode == TRANSPARENT? CD_TRANSPARENT: CD_OPAQUE); + break; + } + case EMR_SETROP2: + { + EMRSETROP2* data = (EMRSETROP2*)lpEMFR; + cdCanvasWriteMode(canvas, data->iMode == R2_NOTXORPEN? CD_NOT_XOR: (data->iMode == R2_XORPEN? CD_XOR: CD_REPLACE)); + break; + } + case EMR_SETTEXTALIGN: + { + EMRSETTEXTALIGN* data = (EMRSETTEXTALIGN*)lpEMFR; + upd_xy = 0; + + if (data->iMode & TA_UPDATECP) + { + upd_xy = 1; + data->iMode &= ~TA_UPDATECP; + } + + switch (data->iMode) + { + case 0: /* top-left */ + cdCanvasTextAlignment(canvas, CD_NORTH_WEST); + break; + case 2: /* top-right */ + cdCanvasTextAlignment(canvas, CD_NORTH_EAST); + break; + case 6: /* top-center */ + cdCanvasTextAlignment(canvas, CD_NORTH); + break; + case 8: /* bottom-left */ + cdCanvasTextAlignment(canvas, CD_SOUTH_WEST); + break; + case 10: /* bottom-right */ + cdCanvasTextAlignment(canvas, CD_SOUTH_EAST); + break; + case 14: /* bottom-center */ + cdCanvasTextAlignment(canvas, CD_SOUTH); + break; + case 24: /* baseline-left */ + cdCanvasTextAlignment(canvas, CD_BASE_LEFT); + break; + case 26: /* baseline-right */ + cdCanvasTextAlignment(canvas, CD_BASE_RIGHT); + break; + case 30: /* baseline-center */ + cdCanvasTextAlignment(canvas, CD_BASE_CENTER); + break; + } + + break; + } + case EMR_SETTEXTCOLOR: + { + EMRSETTEXTCOLOR* data = (EMRSETTEXTCOLOR*)lpEMFR; + cdCanvasSetForeground(canvas, cdEncodeColor(GetRValue(data->crColor),GetGValue(data->crColor),GetBValue(data->crColor))); + break; + } + case EMR_SETBKCOLOR: + { + EMRSETBKCOLOR* data = (EMRSETBKCOLOR*)lpEMFR; + cdCanvasSetBackground(canvas, cdEncodeColor(GetRValue(data->crColor),GetGValue(data->crColor),GetBValue(data->crColor))); + break; + } + case EMR_MOVETOEX: + { + EMRMOVETOEX* data = (EMRMOVETOEX*)lpEMFR; + curx = data->ptl.x; + cury = data->ptl.y; + break; + } + case EMR_CREATEPEN: + { + EMRCREATEPEN* data = (EMRCREATEPEN*)lpEMFR; + int style; + + switch (data->lopn.lopnStyle) + { + case PS_SOLID: + style = CD_CONTINUOUS; + break; + case PS_DASH: + style = CD_DASHED; + break; + case PS_DOT: + style = CD_DOTTED; + break; + case PS_DASHDOT: + style = CD_DASH_DOT; + break; + case PS_DASHDOTDOT: + style = CD_DASH_DOT_DOT; + break; + case PS_NULL: + style = -1; + break; + default: + style = CD_CONTINUOUS; + break; + } + + if (style != -1) + { + cdCanvasLineStyle(canvas, style); + cdCanvasLineWidth(canvas, sScaleW(data->lopn.lopnWidth.x == 0? 1: data->lopn.lopnWidth.x)); + cdCanvasSetForeground(canvas, cdEncodeColor(GetRValue(data->lopn.lopnColor),GetGValue(data->lopn.lopnColor),GetBValue(data->lopn.lopnColor))); + } + break; + } + case EMR_EXTCREATEPEN: + { + EMREXTCREATEPEN* data = (EMREXTCREATEPEN*)lpEMFR; + int style; + + switch (data->elp.elpPenStyle & PS_STYLE_MASK) + { + case PS_SOLID: + style = CD_CONTINUOUS; + break; + case PS_DASH: + style = CD_DASHED; + break; + case PS_DOT: + style = CD_DOTTED; + break; + case PS_DASHDOT: + style = CD_DASH_DOT; + break; + case PS_DASHDOTDOT: + style = CD_DASH_DOT_DOT; + break; + case PS_NULL: + style = -1; + break; + case PS_USERSTYLE: + style = CD_CUSTOM; + cdCanvasLineStyleDashes(canvas, (int*)data->elp.elpStyleEntry, data->elp.elpNumEntries); + break; + default: + style = CD_CONTINUOUS; + break; + } + + if (style != -1) + { + switch (data->elp.elpPenStyle & PS_ENDCAP_MASK) + { + case PS_ENDCAP_FLAT: + cdCanvasLineCap(canvas, CD_CAPFLAT); + break; + case PS_ENDCAP_ROUND: + cdCanvasLineCap(canvas, CD_CAPROUND); + break; + case PS_ENDCAP_SQUARE: + cdCanvasLineCap(canvas, CD_CAPSQUARE); + break; + } + + switch (data->elp.elpPenStyle & PS_JOIN_MASK) + { + case PS_JOIN_MITER: + cdCanvasLineJoin(canvas, CD_MITER); + break; + case PS_JOIN_BEVEL: + cdCanvasLineJoin(canvas, CD_BEVEL); + break; + case PS_JOIN_ROUND: + cdCanvasLineJoin(canvas, CD_ROUND); + break; + } + + cdCanvasLineStyle(canvas, style); + cdCanvasLineWidth(canvas, sScaleW(data->elp.elpWidth == 0? 1: data->elp.elpWidth)); + cdCanvasSetForeground(canvas, cdEncodeColor(GetRValue(data->elp.elpColor),GetGValue(data->elp.elpColor),GetBValue(data->elp.elpColor))); + } + break; + } + case EMR_CREATEBRUSHINDIRECT: + { + EMRCREATEBRUSHINDIRECT* data = (EMRCREATEBRUSHINDIRECT*)lpEMFR; + cdCanvasSetForeground(canvas, cdEncodeColor(GetRValue(data->lb.lbColor),GetGValue(data->lb.lbColor),GetBValue(data->lb.lbColor))); + + switch (data->lb.lbStyle) + { + case BS_HATCHED: + { + int hatch = 0; + + switch (data->lb.lbHatch) + { + case HS_BDIAGONAL: + hatch = CD_BDIAGONAL; + break; + case HS_CROSS: + hatch = CD_CROSS; + break; + case HS_DIAGCROSS: + hatch = CD_DIAGCROSS; + break; + case HS_FDIAGONAL: + hatch = CD_FDIAGONAL; + break; + case HS_HORIZONTAL: + hatch = CD_HORIZONTAL; + break; + case HS_VERTICAL: + hatch = CD_VERTICAL; + break; + } + + cdCanvasHatch(canvas, hatch); + cdCanvasInteriorStyle(canvas, CD_HATCH); + break; + } + case BS_SOLID: + cdCanvasInteriorStyle(canvas, CD_SOLID); + break; + case BS_NULL: + cdCanvasInteriorStyle(canvas, CD_HOLLOW); + break; + default: + break; + } + break; + } + case EMR_ANGLEARC: + { + EMRANGLEARC* data = (EMRANGLEARC*)lpEMFR; + int x, y; + + x = (int)(data->nRadius * cos(CD_DEG2RAD * data->eStartAngle + data->eSweepAngle)); + y = (int)(data->nRadius * sin(CD_DEG2RAD * data->eStartAngle + data->eSweepAngle)); + + cdCanvasLine(canvas, sScaleX(data->ptlCenter.x), sScaleY(data->ptlCenter.y), sScaleX(x), sScaleY(y)); + cdCanvasArc(canvas, data->ptlCenter.x, data->ptlCenter.y, 2 * data->nRadius, 2 * data->nRadius, data->eStartAngle, data->eStartAngle + data->eSweepAngle); + break; + } + case EMR_ELLIPSE: + { + EMRELLIPSE* data = (EMRELLIPSE*)lpEMFR; + int xc, yc, w, h; + + xc = sScaleX((data->rclBox.left + data->rclBox.right - 1) / 2); + w = sScaleW(data->rclBox.right - data->rclBox.left - 1); + yc = sScaleY((data->rclBox.top + data->rclBox.bottom - 1) / 2); + h = sScaleH(data->rclBox.bottom - data->rclBox.top - 1); + + cdCanvasSector(canvas, xc, yc, w, h, 0, 360); + break; + } + case EMR_RECTANGLE: + { + EMRRECTANGLE* data = (EMRRECTANGLE*)lpEMFR; + cdCanvasBox (canvas, sScaleX(data->rclBox.left), sScaleX(data->rclBox.right-2), sScaleY(data->rclBox.bottom-2), sScaleY(data->rclBox.top)); + break; + } + case EMR_ROUNDRECT: + { + EMRROUNDRECT* data = (EMRROUNDRECT*)lpEMFR; + cdCanvasBox (canvas, sScaleX(data->rclBox.left), sScaleX(data->rclBox.right-2), sScaleY(data->rclBox.bottom-2), sScaleY(data->rclBox.top)); + break; + } + case EMR_ARC: + { + EMRARC* data = (EMRARC*)lpEMFR; + int xc, yc, w, h; + double angle1, angle2; + + xc = (data->rclBox.left + data->rclBox.right - 1) / 2; + yc = (data->rclBox.top + data->rclBox.bottom - 1) / 2; + + w = sScaleW(data->rclBox.right - data->rclBox.left - 1); + h = sScaleH(data->rclBox.bottom - data->rclBox.top - 1); + + angle1 = atan2((yc - data->ptlStart.y)*(data->rclBox.right - data->rclBox.left - 1), (data->ptlStart.x - xc)*(data->rclBox.bottom - data->rclBox.top - 1)) / CD_DEG2RAD; + angle2 = atan2((yc - data->ptlEnd.y)*(data->rclBox.right - data->rclBox.left - 1), (data->ptlEnd.x - xc)*(data->rclBox.bottom - data->rclBox.top - 1)) / CD_DEG2RAD; + + if (angle1 == angle2) + angle2+=360; + + xc = sScaleX(xc); + yc = sScaleY(yc); + + cdCanvasArc(canvas, xc, yc, w, h, angle1, angle2); + break; + } + case EMR_CHORD: + { + EMRCHORD* data = (EMRCHORD*)lpEMFR; + int xc, yc, w, h; + double angle1, angle2; + + xc = (data->rclBox.left + data->rclBox.right - 1) / 2; + yc = (data->rclBox.top + data->rclBox.bottom - 1) / 2; + + w = sScaleW(data->rclBox.right - data->rclBox.left - 1); + h = sScaleH(data->rclBox.bottom - data->rclBox.top - 1); + + angle1 = atan2((yc - data->ptlStart.y)*(data->rclBox.right - data->rclBox.left - 1), (data->ptlStart.x - xc)*(data->rclBox.bottom - data->rclBox.top - 1)) / CD_DEG2RAD; + angle2 = atan2((yc - data->ptlEnd.y)*(data->rclBox.right - data->rclBox.left - 1), (data->ptlEnd.x - xc)*(data->rclBox.bottom - data->rclBox.top - 1)) / CD_DEG2RAD; + + if (angle1 == angle2) + angle2+=360; + + xc = sScaleX(xc); + yc = sScaleY(yc); + + cdCanvasChord(canvas, xc, yc, w, h, angle1, angle2); + break; + } + case EMR_PIE: + { + EMRPIE* data = (EMRPIE*)lpEMFR; + int xc, yc, w, h; + double angle1, angle2; + + xc = (data->rclBox.left + data->rclBox.right - 1) / 2; + yc = (data->rclBox.top + data->rclBox.bottom - 1) / 2; + + w = sScaleW(data->rclBox.right - data->rclBox.left - 1); + h = sScaleH(data->rclBox.bottom - data->rclBox.top - 1); + + angle1 = atan2((yc - data->ptlStart.y)*(data->rclBox.right - data->rclBox.left - 1), (data->ptlStart.x - xc)*(data->rclBox.bottom - data->rclBox.top - 1)) / CD_DEG2RAD; + angle2 = atan2((yc - data->ptlEnd.y)*(data->rclBox.right - data->rclBox.left - 1), (data->ptlEnd.x - xc)*(data->rclBox.bottom - data->rclBox.top - 1)) / CD_DEG2RAD; + + if (angle1 == angle2) + angle2+=360; + + xc = sScaleX(xc); + yc = sScaleY(yc); + + cdCanvasSector(canvas, xc, yc, w, h, angle1, angle2); + break; + } + case EMR_CREATEPALETTE: + { + int k; + EMRCREATEPALETTE* data = (EMRCREATEPALETTE*)lpEMFR; + long palette[256]; + + for (k=0; k < data->lgpl.palNumEntries; k++) + palette[k] = cdEncodeColor(data->lgpl.palPalEntry[k].peRed, data->lgpl.palPalEntry[k].peGreen, data->lgpl.palPalEntry[k].peBlue); + + cdCanvasPalette(canvas, data->lgpl.palNumEntries, palette, CD_POLITE); + break; + } + case EMR_LINETO: + { + EMRLINETO* data = (EMRLINETO*)lpEMFR; + cdCanvasLine(canvas, sScaleX(curx), sScaleY(cury), sScaleX(data->ptl.x), sScaleY(data->ptl.y)); + curx = data->ptl.x; + cury = data->ptl.y; + break; + } + case EMR_ARCTO: + { + EMRARCTO* data = (EMRARCTO*)lpEMFR; + int xc, yc, w, h; + double angle1, angle2; + + xc = (data->rclBox.left + data->rclBox.right - 1) / 2; + yc = (data->rclBox.top + data->rclBox.bottom - 1) / 2; + + w = sScaleW(data->rclBox.right - data->rclBox.left - 1); + h = sScaleH(data->rclBox.bottom - data->rclBox.top - 1); + + angle1 = atan2((yc - data->ptlStart.y)*(data->rclBox.right - data->rclBox.left - 1), (data->ptlStart.x - xc)*(data->rclBox.bottom - data->rclBox.top - 1)) / CD_DEG2RAD; + angle2 = atan2((yc - data->ptlEnd.y)*(data->rclBox.right - data->rclBox.left - 1), (data->ptlEnd.x - xc)*(data->rclBox.bottom - data->rclBox.top - 1)) / CD_DEG2RAD; + + if (angle1 == angle2) + angle2+=360; + + xc = sScaleX(xc); + yc = sScaleY(yc); + + cdCanvasArc(canvas, xc, yc, w, h, angle1, angle2); + + curx = data->ptlEnd.x; /* isto nao esta' certo mas e' a minha melhor aproximacao */ + cury = data->ptlEnd.y; + break; + } + case EMR_POLYDRAW: + { + int p; + EMRPOLYDRAW* data = (EMRPOLYDRAW*)lpEMFR; + + for(p = 0; p < (int)data->cptl; p++) + { + switch (data->abTypes[p]) + { + case PT_MOVETO: + { + curx = data->aptl[p].x; + cury = data->aptl[p].y; + break; + } + case PT_LINETO: + { + cdCanvasLine(canvas, sScaleX(curx), sScaleY(cury), sScaleX(data->aptl[p].x), sScaleY(data->aptl[p].y)); + curx = data->aptl[p].x; + cury = data->aptl[p].y; + break; + } + } + } + break; + } + case EMR_BITBLT: + { + EMRBITBLT* data = (EMRBITBLT*)lpEMFR; + int size; + cdwDIB dib; + int old_write_mode; + + if (data->dwRop == SRCINVERT) + old_write_mode = cdCanvasWriteMode(canvas, CD_XOR); + else + old_write_mode = cdCanvasWriteMode(canvas, CD_REPLACE); + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmiSrc, ((BYTE*)data) + data->offBitsSrc); + + if (dib.type == -1) + break; + + size = dib.w*abs(dib.h); + + if (dib.type == 0) + { + unsigned char *r, *g, *b; + + r = (unsigned char*)malloc(size); + g = (unsigned char*)malloc(size); + b = (unsigned char*)malloc(size); + + cdwDIBDecodeRGB(&dib, r, g, b); + + cdCanvasPutImageRectRGB(canvas, dib.w, abs(dib.h), r, g, b, sScaleX(data->xDest), sScaleY(data->yDest + abs(dib.h)), dib.w, dib.h, 0, 0, 0, 0); + + free(r); + free(g); + free(b); + } + else + { + unsigned char *index; + long *colors; + + index = (unsigned char*)malloc(size); + colors = (long*)malloc(256*sizeof(long)); + + cdwDIBDecodeMap(&dib, index, colors); + + cdCanvasPutImageRectMap(canvas, dib.w, abs(dib.h), index, colors, sScaleX(data->xDest), sScaleY(data->yDest + abs(dib.h)), dib.w, dib.h, 0, 0, 0, 0); + + free(index); + free(colors); + } + + cdCanvasWriteMode(canvas, old_write_mode); + break; + } + case EMR_STRETCHBLT: + { + EMRSTRETCHBLT* data = (EMRSTRETCHBLT*)lpEMFR; + int size; + cdwDIB dib; + int old_write_mode; + + if (data->dwRop == SRCINVERT) + old_write_mode = cdCanvasWriteMode(canvas, CD_XOR); + else + old_write_mode = cdCanvasWriteMode(canvas, CD_REPLACE); + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmiSrc, ((BYTE*)data) + data->offBitsSrc); + + if (dib.type == -1) + break; + + size = dib.w*abs(dib.h); + + if (dib.type == 0) + { + unsigned char *r, *g, *b; + + r = (unsigned char*)malloc(size); + g = (unsigned char*)malloc(size); + b = (unsigned char*)malloc(size); + + cdwDIBDecodeRGB(&dib, r, g, b); + + cdCanvasPutImageRectRGB(canvas, dib.w, abs(dib.h), r, g, b, sScaleX(data->xDest), sScaleY(data->yDest + abs(dib.h)), sScaleW(data->cxDest), sScaleH(data->cyDest), 0, 0, 0, 0); + + free(r); + free(g); + free(b); + } + else + { + unsigned char *index; + long *colors; + + index = (unsigned char*)malloc(size); + colors = (long*)malloc(256*sizeof(long)); + + cdwDIBDecodeMap(&dib, index, colors); + + cdCanvasPutImageRectMap(canvas, dib.w, abs(dib.h), index, colors, sScaleX(data->xDest), sScaleY(data->yDest + abs(dib.h)), sScaleW(data->cxDest), sScaleH(data->cyDest), 0, 0, 0, 0); + + free(index); + free(colors); + } + + cdCanvasWriteMode(canvas, old_write_mode); + break; + } + case EMR_MASKBLT: + { + EMRMASKBLT* data = (EMRMASKBLT*)lpEMFR; + int size; + cdwDIB dib; + int old_write_mode; + + if (data->dwRop == SRCINVERT) + old_write_mode = cdCanvasWriteMode(canvas, CD_XOR); + else + old_write_mode = cdCanvasWriteMode(canvas, CD_REPLACE); + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmiSrc, ((BYTE*)data) + data->offBitsSrc); + + if (dib.type == -1) + break; + + size = dib.w*abs(dib.h); + + if (dib.type == 0) + { + unsigned char *r, *g, *b; + + r = (unsigned char*)malloc(size); + g = (unsigned char*)malloc(size); + b = (unsigned char*)malloc(size); + + cdwDIBDecodeRGB(&dib, r, g, b); + + cdCanvasPutImageRectRGB(canvas, dib.w, abs(dib.h), r, g, b, sScaleX(data->xDest), sScaleY(data->yDest + abs(dib.h)), dib.w, dib.h, 0, 0, 0, 0); + + free(r); + free(g); + free(b); + } + else + { + unsigned char *index; + long *colors; + + index = (unsigned char*)malloc(size); + colors = (long*)malloc(256*sizeof(long)); + + cdwDIBDecodeMap(&dib, index, colors); + + cdCanvasPutImageRectMap(canvas, dib.w, abs(dib.h), index, colors, sScaleX(data->xDest), sScaleY(data->yDest + abs(dib.h)), dib.w, dib.h, 0, 0, 0, 0); + + free(index); + free(colors); + } + + cdCanvasWriteMode(canvas, old_write_mode); + break; + } + case EMR_SETDIBITSTODEVICE: + { + EMRSETDIBITSTODEVICE* data = (EMRSETDIBITSTODEVICE*)lpEMFR; + int size; + cdwDIB dib; + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmiSrc, ((BYTE*)data) + data->offBitsSrc); + + if (dib.type == -1) + break; + + size = dib.w*abs(dib.h); + + if (dib.type == 0) + { + unsigned char *r, *g, *b; + + r = (unsigned char*)malloc(size); + g = (unsigned char*)malloc(size); + b = (unsigned char*)malloc(size); + + cdwDIBDecodeRGB(&dib, r, g, b); + + cdCanvasPutImageRectRGB(canvas, dib.w, abs(dib.h), r, g, b, sScaleX(data->xDest), sScaleY(data->yDest + abs(dib.h)), dib.w, dib.h, 0, 0, 0, 0); + + free(r); + free(g); + free(b); + } + else + { + unsigned char *index; + long *colors; + + index = (unsigned char*)malloc(size); + colors = (long*)malloc(256*sizeof(long)); + + cdwDIBDecodeMap(&dib, index, colors); + + cdCanvasPutImageRectMap(canvas, dib.w, abs(dib.h), index, colors, sScaleX(data->xDest), sScaleY(data->yDest + abs(dib.h)), dib.w, dib.h, 0, 0, 0, 0); + + free(index); + free(colors); + } + break; + } + case EMR_STRETCHDIBITS: + { + EMRSTRETCHDIBITS* data = (EMRSTRETCHDIBITS*)lpEMFR; + int size; + cdwDIB dib; + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmiSrc, ((BYTE*)data) + data->offBitsSrc); + + if (dib.type == -1) + break; + + size = dib.w*abs(dib.h); + + if (dib.type == 0) + { + unsigned char *r, *g, *b; + + r = (unsigned char*)malloc(size); + g = (unsigned char*)malloc(size); + b = (unsigned char*)malloc(size); + + cdwDIBDecodeRGB(&dib, r, g, b); + + cdCanvasPutImageRectRGB(canvas, dib.w, abs(dib.h), r, g, b, sScaleX(data->xDest), sScaleY(data->yDest + abs(dib.h)), sScaleW(data->cxDest), sScaleH(data->cyDest), 0, 0, 0, 0); + + free(r); + free(g); + free(b); + } + else + { + unsigned char *index; + long *colors; + + index = (unsigned char*)malloc(size); + colors = (long*)malloc(256*sizeof(long)); + + cdwDIBDecodeMap(&dib, index, colors); + + cdCanvasPutImageRectMap(canvas, dib.w, abs(dib.h), index, colors, sScaleX(data->xDest), sScaleY(data->yDest + abs(dib.h)), sScaleW(data->cxDest), sScaleH(data->cyDest), 0, 0, 0, 0); + + free(index); + free(colors); + } + break; + } + case EMR_EXTCREATEFONTINDIRECTW: + { + EMREXTCREATEFONTINDIRECTW* data = (EMREXTCREATEFONTINDIRECTW*)lpEMFR; + int style, size; + char type_face[256]; + + style = CD_PLAIN; + + if (data->elfw.elfLogFont.lfWeight >= FW_BOLD) + style = CD_BOLD; + + if (data->elfw.elfLogFont.lfItalic == 1) + style = CD_ITALIC; + + if (data->elfw.elfLogFont.lfWeight >= FW_BOLD && data->elfw.elfLogFont.lfItalic == 1) + style = CD_BOLD_ITALIC; + + if (data->elfw.elfLogFont.lfUnderline) + style |= CD_UNDERLINE; + + if (data->elfw.elfLogFont.lfStrikeOut) + style |= CD_STRIKEOUT; + + WideCharToMultiByte(CP_ACP, 0, data->elfw.elfLogFont.lfFaceName, LF_FACESIZE, type_face, 256, NULL, NULL); + + size = sScaleH(abs(data->elfw.elfLogFont.lfHeight)); + if (size < 5) size = 5; + + if (data->elfw.elfLogFont.lfOrientation) + cdCanvasTextOrientation(canvas, data->elfw.elfLogFont.lfOrientation/10); + + cdCanvasFont(canvas, type_face, style, -size); + break; + } + case EMR_EXTTEXTOUTA: + { + EMREXTTEXTOUTA* data = (EMREXTTEXTOUTA*)lpEMFR; + + char* str = malloc(data->emrtext.nChars + 1); + memcpy(str, ((unsigned char*)data) + data->emrtext.offString, data->emrtext.nChars + 1); + str[data->emrtext.nChars] = 0; + + cdCanvasText(canvas, sScaleX(data->emrtext.ptlReference.x), sScaleY(data->emrtext.ptlReference.y), str); + + if (upd_xy == 1) + { + curx = data->emrtext.ptlReference.x; + cury = data->emrtext.ptlReference.y; + } + + free(str); + break; + } + case EMR_EXTTEXTOUTW: + { + EMREXTTEXTOUTW* data = (EMREXTTEXTOUTW*)lpEMFR; + char str[256]; + + WideCharToMultiByte(CP_ACP, 0, (unsigned short*)(((unsigned char*)data) + data->emrtext.offString), data->emrtext.nChars, str, 256, NULL, NULL); + + str[data->emrtext.nChars] = 0; + + cdCanvasText(canvas, sScaleX(data->emrtext.ptlReference.x), sScaleY(data->emrtext.ptlReference.y), str); + + if (upd_xy == 1) + { + curx = data->emrtext.ptlReference.x; + cury = data->emrtext.ptlReference.y; + } + break; + } + case EMR_SETPOLYFILLMODE: + { + EMRSETPOLYFILLMODE* data = (EMRSETPOLYFILLMODE*)lpEMFR; + if (data->iMode == ALTERNATE) + cdCanvasFillMode(canvas, CD_EVENODD); + else + cdCanvasFillMode(canvas, CD_WINDING); + break; + } + case EMR_POLYGON16: + { + EMRPOLYGON16* data = (EMRPOLYGON16*)lpEMFR; + int i; + + cdCanvasBegin(canvas, CD_FILL); + + for (i = 0; i < (int)data->cpts; i++) + cdCanvasVertex(canvas, sScaleX(data->apts[i].x), sScaleY(data->apts[i].y)); + + cdCanvasEnd(canvas); + break; + } + case EMR_POLYLINE16: + { + EMRPOLYLINE16* data = (EMRPOLYLINE16*)lpEMFR; + int i; + + cdCanvasBegin(canvas, CD_OPEN_LINES); + + for (i = 0; i < (int)data->cpts; i++) + cdCanvasVertex(canvas, sScaleX(data->apts[i].x), sScaleY(data->apts[i].y)); + + cdCanvasEnd(canvas); + break; + } + case EMR_POLYLINETO16: + { + EMRPOLYLINETO16* data = (EMRPOLYLINETO16*)lpEMFR; + int i; + + cdCanvasBegin(canvas, CD_OPEN_LINES); + + for (i = 0; i < (int)data->cpts; i++) + cdCanvasVertex(canvas, sScaleX(data->apts[i].x), sScaleY(data->apts[i].y)); + + curx = data->apts[data->cpts - 1].x; + cury = data->apts[data->cpts - 1].y; + + cdCanvasEnd(canvas); + break; + } + case EMR_POLYBEZIER16: + { + EMRPOLYBEZIER16* data = (EMRPOLYBEZIER16*)lpEMFR; + int i; + + cdCanvasBegin(canvas, CD_BEZIER); + + for (i = 0; i < (int)data->cpts; i++) + cdCanvasVertex(canvas, sScaleX(data->apts[i].x), sScaleY(data->apts[i].y)); + + cdCanvasEnd(canvas); + break; + } + case EMR_POLYBEZIERTO16: + { + EMRPOLYBEZIERTO16* data = (EMRPOLYBEZIERTO16*)lpEMFR; + int i; + + cdCanvasBegin(canvas, CD_BEZIER); + + for (i = 0; i < (int)data->cpts; i++) + cdCanvasVertex(canvas, sScaleX(data->apts[i].x), sScaleY(data->apts[i].y)); + + curx = data->apts[data->cpts - 1].x; + cury = data->apts[data->cpts - 1].y; + + cdCanvasEnd(canvas); + break; + } + case EMR_POLYPOLYLINE16: + { + EMRPOLYPOLYLINE16* data = (EMRPOLYPOLYLINE16*)lpEMFR; + POINTS* apts = (POINTS*)(data->aPolyCounts + data->nPolys); /* skip the array of counts */ + int c, i; /* data->apts can not be used if count greater than 1 */ + + for (c = 0; c < (int)data->nPolys; c++) + { + cdCanvasBegin(canvas, CD_OPEN_LINES); + + for (i = 0; i < (int)data->aPolyCounts[c]; i++, apts++) + cdCanvasVertex(canvas, sScaleX(apts->x), sScaleY(apts->y)); + + cdCanvasEnd(canvas); + } + break; + } + case EMR_POLYPOLYGON16: + { + EMRPOLYPOLYGON16* data = (EMRPOLYPOLYGON16*)lpEMFR; + POINTS* apts = (POINTS*)(data->aPolyCounts + data->nPolys); /* skip the array of counts */ + int c, i; /* data->apts can not be used if count greater than 1 */ + + for (c = 0; c < (int)data->nPolys; c++) + { + cdCanvasBegin(canvas, CD_FILL); + + for (i = 0; i < (int)data->aPolyCounts[c]; i++, apts++) + cdCanvasVertex(canvas, sScaleX(apts->x), sScaleY(apts->y)); + + cdCanvasEnd(canvas); + } + break; + } + case EMR_POLYDRAW16: + { + int p; + EMRPOLYDRAW16* data = (EMRPOLYDRAW16*)lpEMFR; + + for(p = 0; p < (int)data->cpts; p++) + { + switch (data->abTypes[p]) + { + case PT_MOVETO: + { + curx = data->apts[p].x; + cury = data->apts[p].y; + break; + } + case PT_LINETO: + { + cdCanvasLine(canvas, sScaleX(curx), sScaleY(cury), sScaleX(data->apts[p].x), sScaleY(data->apts[p].y)); + curx = data->apts[p].x; + cury = data->apts[p].y; + break; + } + } + } + break; + } + case EMR_CREATEMONOBRUSH: + { + EMRCREATEMONOBRUSH* data = (EMRCREATEMONOBRUSH*)lpEMFR; + int size, i; + cdwDIB dib; + long *pattern; + unsigned char *stipple; + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmi, ((BYTE*)data) + data->offBits); + + if (dib.type == -1) + break; + + size = dib.w*abs(dib.h); + + if (dib.bmih->biBitCount == 1) + stipple = malloc(size); + else + pattern = (long*)malloc(size*sizeof(long)); + + if (dib.type == 0) + { + unsigned char *r, *g, *b; + + r = (unsigned char*)malloc(size); + g = (unsigned char*)malloc(size); + b = (unsigned char*)malloc(size); + + cdwDIBDecodeRGB(&dib, r, g, b); + + for (i = 0; i < size; i++) + pattern[i] = cdEncodeColor(r[i], g[i], b[i]); + + free(r); + free(g); + free(b); + } + else + { + unsigned char *index; + long *colors; + + index = (unsigned char*)malloc(size); + colors = (long*)malloc(256*sizeof(long)); + + cdwDIBDecodeMap(&dib, index, colors); + + if (dib.bmih->biBitCount == 1) + { + for (i = 0; i < size; i++) + stipple[i] = index[i]? 0: 1; + } + else + { + for (i = 0; i < size; i++) + pattern[i] = colors[index[i]]; + } + + free(index); + free(colors); + } + + if (dib.bmih->biBitCount == 1) + { + cdCanvasStipple(canvas, dib.w, abs(dib.h), stipple); + free(stipple); + } + else + { + cdCanvasPattern(canvas, dib.w, abs(dib.h), pattern); + free(pattern); + } + break; + } + case EMR_CREATEDIBPATTERNBRUSHPT: + { + EMRCREATEDIBPATTERNBRUSHPT* data = (EMRCREATEDIBPATTERNBRUSHPT*)lpEMFR; + int size, i; + cdwDIB dib; + long *pattern; + unsigned char *stipple; + + cdwDIBReference(&dib, ((BYTE*)data) + data->offBmi, ((BYTE*)data) + data->offBits); + + if (dib.type == -1) + break; + + size = dib.w*abs(dib.h); + + if (dib.bmih->biBitCount == 1) + stipple = malloc(size); + else + pattern = malloc(size*sizeof(long)); + + if (dib.type == 0) + { + unsigned char *r, *g, *b; + + r = (unsigned char*)malloc(size); + g = (unsigned char*)malloc(size); + b = (unsigned char*)malloc(size); + + cdwDIBDecodeRGB(&dib, r, g, b); + + for (i = 0; i < size; i++) + pattern[i] = cdEncodeColor(r[i], g[i], b[i]); + + free(r); + free(g); + free(b); + } + else + { + unsigned char *index; + long *colors; + + index = (unsigned char*)malloc(size); + colors = (long*)malloc(256*sizeof(long)); + + cdwDIBDecodeMap(&dib, index, colors); + + if (dib.bmih->biBitCount == 1) + { + for (i = 0; i < size; i++) + stipple[i] = index[i]? 0: 1; + } + else + { + for (i = 0; i < size; i++) + pattern[i] = colors[index[i]]; + } + + free(index); + free(colors); + } + + if (dib.bmih->biBitCount == 1) + { + cdCanvasStipple(canvas, dib.w, abs(dib.h), stipple); + free(stipple); + } + else + { + cdCanvasPattern(canvas, dib.w, abs(dib.h), pattern); + free(pattern); + } + break; + } + case EMR_POLYTEXTOUTA: + { + int t; + EMRPOLYTEXTOUTA* data = (EMRPOLYTEXTOUTA*)lpEMFR; + + for (t = 0; t < data->cStrings; t++) + { + char* str = malloc(data->aemrtext[t].nChars + 1); + memcpy(str, ((unsigned char*)data) + data->aemrtext[t].offString, data->aemrtext[t].nChars + 1); + str[data->aemrtext[t].nChars] = 0; + + cdCanvasText(canvas, sScaleX(data->aemrtext[t].ptlReference.x), sScaleY(data->aemrtext[t].ptlReference.y), str); + + free(str); + } + break; + } + case EMR_POLYTEXTOUTW: + { + int t; + EMRPOLYTEXTOUTW* data = (EMRPOLYTEXTOUTW*)lpEMFR; + char str[256]; + + for (t = 0; t < data->cStrings; t++) + { + WideCharToMultiByte(CP_ACP, 0, (unsigned short*)(((unsigned char*)data) + data->aemrtext[t].offString), data->aemrtext[t].nChars, str, 256, NULL, NULL); + str[data->aemrtext[t].nChars] = 0; + cdCanvasText(canvas, sScaleX(data->aemrtext[t].ptlReference.x), sScaleY(data->aemrtext[t].ptlReference.y), str); + } + break; + } + } + + return 1; +} + + +static cdSizeCB cdsizecbWMF = NULL; + +int cdregistercallbackWMF(int cb, cdCallback func) +{ + switch (cb) + { + case CD_SIZECB: + cdsizecbWMF = (cdSizeCB)func; + return CD_OK; + } + + return CD_ERROR; +} + + +/*********************************************************************** +Read the metafile bits, metafile header and placeable +metafile header of a placeable metafile. +************************************************************************/ + +static HANDLE GetPlaceableMetaFile(int fh) +{ + HANDLE hMF; + HANDLE hMem; + LPSTR lpMem; + int wBytesRead; + APMFILEHEADER aldusMFHeader; + METAHEADER mfHeader; + + /* seek to beginning of file and read aldus header */ + lseek(fh, 0, 0); + + /* read the placeable header */ + wBytesRead = read(fh, (LPSTR)&aldusMFHeader, sizeof(APMFILEHEADER)); + + /* if there is an error, return */ + if(wBytesRead == -1 || wBytesRead < sizeof(APMFILEHEADER)) + return NULL; + + /* read the metafile header */ + wBytesRead = read(fh, (LPSTR)&mfHeader, sizeof(METAHEADER)); + + /* if there is an error return */ + if( wBytesRead == -1 || wBytesRead < sizeof(METAHEADER) ) + return NULL; + + /* allocate memory for the metafile bits */ + if (!(hMem = GlobalAlloc(GHND, mfHeader.mtSize * 2L))) + return NULL; + + /* lock the memory */ + if (!(lpMem = GlobalLock(hMem))) + { + GlobalFree(hMem); + return NULL; + } + + /* seek to the metafile bits */ + lseek(fh, sizeof(APMFILEHEADER), 0); + + /* read metafile bits */ + wBytesRead = read(fh, lpMem, (WORD)(mfHeader.mtSize * 2L)); + + /* if there was an error */ + if( wBytesRead == -1 ) + { + GlobalUnlock(hMem); + GlobalFree(hMem); + return NULL; + } + + if (!(hMF = SetMetaFileBitsEx(mfHeader.mtSize * 2L, lpMem))) + return NULL; + + GlobalUnlock(hMem); + GlobalFree(hMem); + + return hMF; +} + + +/* +%F cdPlay para WMF. +Interpreta os dados do WMF. +*/ +int cdplayWMF(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data) +{ + char* filename = (char*)data; + int fh; + int wBytesRead; + DWORD dwIsAldus; + HANDLE hMF; + HENHMETAFILE hEMF; + ENHMETAHEADER emh; + BYTE* buffer; + int size; + + /* try to open the file. */ + fh = open(filename, O_BINARY | O_RDONLY); + + /* if opened failed */ + if (fh == -1) + return CD_ERROR; + + /* read the first dword of the file to see if it is a placeable wmf */ + wBytesRead = read(fh,(LPSTR)&dwIsAldus, sizeof(dwIsAldus)); + if (wBytesRead == -1 || wBytesRead < sizeof(dwIsAldus)) + { + close(fh); + return CD_ERROR; + } + + /* if this is windows metafile, not a placeable wmf */ + if (dwIsAldus != ALDUSKEY) + { + METAHEADER mfHeader; + + /* seek to the beginning of the file */ + lseek(fh, 0, 0); + + /* read the wmf header */ + wBytesRead = read(fh, (LPSTR)&mfHeader, sizeof(METAHEADER)); + + /* done with file so close it */ + close(fh); + + /* if read failed */ + if (wBytesRead == -1 || wBytesRead < sizeof(METAHEADER)) + return CD_ERROR; + + hMF = GetMetaFile(filename); + } + else /* this is a placeable metafile */ + { + /* convert the placeable format into something that can + be used with GDI metafile functions */ + hMF = GetPlaceableMetaFile(fh); + + /* close the file */ + close(fh); + } + + if (!hMF) + return CD_ERROR; + + size = GetMetaFileBitsEx(hMF, 0, NULL); + + buffer = malloc(size); + + GetMetaFileBitsEx(hMF, size, buffer); + + hEMF = SetWinMetaFileBits(size, buffer, NULL, NULL); + + GetEnhMetaFileHeader(hEMF, sizeof(ENHMETAHEADER), &emh); + + /* when converted from WMF, only rclBounds is available */ + wmf_bottom = emh.rclBounds.bottom; + wmf_left = emh.rclBounds.left; + wmf_top = emh.rclBounds.top; + wmf_right = emh.rclBounds.right; + + if ((xmax-xmin+1)>1 && (ymax-ymin+1)>1) /* always update wmf_rect when scaling */ + EnumEnhMetaFile(NULL, hEMF, CalcSizeEMFEnumProc, NULL, NULL); + + if ((wmf_bottom-wmf_top)>1 && + (wmf_right-wmf_left)>1 && + (xmax-xmin+1)>1 && + (ymax-ymin+1)>1) + { + wmf_yfactor = ((double)(ymax-ymin+1)) / (double)(wmf_top-wmf_bottom); /* negative because top-down orientation */ + wmf_xfactor = ((double)(xmax-xmin+1)) / (double)(wmf_right-wmf_left); + wmf_xmin = xmin; + wmf_ymin = ymin; + } + else + { + wmf_yfactor = -1; /* negative because top-down orientation */ + wmf_xfactor = 1; + wmf_xmin = 0; + wmf_ymin = 0; + } + + free(buffer); + + if (cdsizecbWMF && dwIsAldus == ALDUSKEY) + { + int err; + err = cdsizecbWMF(canvas, wmf_right-wmf_left, wmf_bottom-wmf_top, 0, 0); + if (err) + { + DeleteEnhMetaFile (hEMF); + return CD_ERROR; + } + } + + EnumEnhMetaFile(NULL, hEMF, EMFEnumProc, canvas, NULL); + + DeleteEnhMetaFile (hEMF); + + DeleteMetaFile (hMF); + + return CD_OK; +} + + +static cdSizeCB cdsizecbEMF = NULL; + +int cdregistercallbackEMF(int cb, cdCallback func) +{ + switch (cb) + { + case CD_SIZECB: + cdsizecbEMF = (cdSizeCB)func; + return CD_OK; + } + + return CD_ERROR; +} + + +int cdplayEMF(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data) +{ + char* filename = (char*)data; + HENHMETAFILE hEMF; + ENHMETAHEADER emh; + double xres, yres; + + hEMF = GetEnhMetaFile(filename); + + GetEnhMetaFileHeader(hEMF, sizeof(ENHMETAHEADER), &emh); + + /* this is obtained from the hdcRef of CreateEnhMetaFile */ + xres = ((double)emh.szlDevice.cx) / emh.szlMillimeters.cx; + yres = ((double)emh.szlDevice.cy) / emh.szlMillimeters.cy; + + /* this is the same as used in RECT of CreateEnhMetaFile */ + wmf_bottom = (int)((emh.rclFrame.bottom * yres) / 100); + wmf_left = (int)((emh.rclFrame.left * xres) / 100); + wmf_top = (int)((emh.rclFrame.top * yres) / 100); + wmf_right = (int)((emh.rclFrame.right * xres) / 100); + + if ((xmax-xmin+1)>1 && (ymax-ymin+1)>1) /* always update wmf_rect when scaling */ + EnumEnhMetaFile(NULL, hEMF, CalcSizeEMFEnumProc, NULL, NULL); + + if ((wmf_bottom-wmf_top)>1 && + (wmf_right-wmf_left)>1 && + (xmax-xmin+1)>1 && + (ymax-ymin+1)>1) + { + wmf_yfactor = ((double)(ymax-ymin+1)) / (double)(wmf_top-wmf_bottom); /* negative because top-down orientation */ + wmf_xfactor = ((double)(xmax-xmin+1)) / (double)(wmf_right-wmf_left); + wmf_xmin = xmin; + wmf_ymin = ymin; + } + else + { + wmf_yfactor = -1; /* negative because top-down orientation */ + wmf_xfactor = 1; + wmf_xmin = 0; + wmf_ymin = 0; + } + + if (cdsizecbEMF) + { + int err; + err = cdsizecbEMF(canvas, wmf_right-wmf_left, wmf_bottom-wmf_top, 0, 0); + if (err) + { + DeleteEnhMetaFile (hEMF); + return CD_ERROR; + } + } + + EnumEnhMetaFile(NULL, hEMF, EMFEnumProc, canvas, NULL); + + DeleteEnhMetaFile (hEMF); + + return CD_OK; +} + +/* +%F Calculo do CheckSum. +*/ +static WORD sAPMChecksum(APMFILEHEADER* papm) +{ + WORD* pw = (WORD*)papm; + WORD wSum = 0; + int i; + + /* The checksum in a Placeable Metafile header is calculated */ + /* by XOR-ing the first 10 words of the header. */ + + for (i = 0; i < 10; i++) + wSum ^= *pw++; + + return wSum; +} + + + +/* +Aldus placeable metafile format + + DWORD key; + HANDLE hmf; + RECT bbox; + WORD inch; + DWORD reserved; + WORD checksum; + char metafileData[]; + + These fields have the following meanings: + + Field Definition + + key Binary key that uniquely identifies this + file type. This must be 0x9AC6CDD7L. + + hmf Unused; must be zero. + + bbox The coordinates of a rectangle that tightly + bounds the picture. These coordinates are in + metafile units as defined below. + + inch The number of metafile units to the inch. To + avoid numeric overflow in PageMaker, this value + should be less than 1440. + + reserved A reserved double word. Must be zero. + + checksum A checksum of the 10 words that precede it, + calculated by XORing zero with these 10 words + and putting the result in the checksum field. + + metafileData The actual content of the Windows metafile + retrieved by copying the data returned by + GetMetafileBits to the file. The number of + bytes should be equal to the MS-DOS file length + minus 22. The content of a PageMaker placeable + metafile cannot currently exceed 64K (this may + have changed in 4.0). +*/ + +/* +%F Cria um APM em arquivo a partir de um WMF em memoria. +*/ +void wmfMakePlaceableMetafile(HMETAFILE hmf, const char* filename, int w, int h) +{ + int fh, nSize; + LPSTR lpData; + APMFILEHEADER APMHeader; + + fh = open(filename, O_CREAT | O_BINARY | O_WRONLY); + + APMHeader.key1 = 0xCDD7; + APMHeader.key2 = 0x9AC6; + APMHeader.hmf = 0; + APMHeader.bleft = 0; + APMHeader.btop = 0; + APMHeader.bright = (short)w; + APMHeader.bbottom = (short)h; + APMHeader.inch = 100; /* this number works fine in Word, etc.. */ + APMHeader.reserved1 = 0; + APMHeader.reserved2 = 0; + APMHeader.checksum = sAPMChecksum(&APMHeader); + + write(fh, (LPSTR)&APMHeader, sizeof(APMFILEHEADER)); + + nSize = GetMetaFileBitsEx(hmf, 0, NULL); + lpData = malloc(nSize); + GetMetaFileBitsEx(hmf, nSize, lpData); + + write(fh, lpData, nSize); + free(lpData); + + close(fh); +} + +void wmfWritePlacebleFile(HANDLE hFile, unsigned char* buffer, DWORD dwSize, LONG mm, LONG xExt, LONG yExt) +{ + DWORD nBytesWrite; + APMFILEHEADER APMHeader; + int w = xExt, h = yExt; + + if (mm == MM_ANISOTROPIC || mm == MM_ISOTROPIC) + { + int res = 30; + w = xExt / res; + h = yExt / res; + } + + APMHeader.key1 = 0xCDD7; + APMHeader.key2 = 0x9AC6; + APMHeader.hmf = 0; + APMHeader.bleft = 0; + APMHeader.btop = 0; + APMHeader.bright = (short)w; + APMHeader.bbottom = (short)h; + APMHeader.inch = 100; /* this number works fine in Word, etc.. */ + APMHeader.reserved1 = 0; + APMHeader.reserved2 = 0; + APMHeader.checksum = sAPMChecksum(&APMHeader); + + WriteFile(hFile, (LPSTR)&APMHeader, sizeof(APMFILEHEADER), &nBytesWrite, NULL); + WriteFile(hFile, buffer, dwSize, &nBytesWrite, NULL); +} + diff --git a/cd/src/x11/cdx11.c b/cd/src/x11/cdx11.c new file mode 100755 index 0000000..4f427e3 --- /dev/null +++ b/cd/src/x11/cdx11.c @@ -0,0 +1,2446 @@ +/** \file + * \brief X-Windows Base Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#include "cdx11.h" +#include "xvertex.h" + +#include + +unsigned long (*cdxGetPixel)(cdCtxCanvas *ctxcanvas, unsigned long rgb); /* acesso a tabela de cores */ +void (*cdxGetRGB)(cdCtxCanvas *ctxcanvas, unsigned long pixel, + unsigned char* red, + unsigned char* green, + unsigned char* blue); /* acesso a tabela de cores */ +static XGCValues gcval; + +static int cdxDirectColorTable[256]; /* used with directColor visuals */ + +#define NUM_HATCHES 6 +#define HATCH_WIDTH 8 +#define HATCH_HEIGHT 8 +/* +** 6 padroes pre-definidos a serem acessados atraves de cdHatch( + CD_HORIZONTAL | CD_VERTICAL | CD_FDIAGONAL | CD_BDIAGONAL | + CD_CROSS | CD_DIAGCROSS) + +*/ +static char hatches[NUM_HATCHES][8] = { + {0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00}, /* HORIZONTAL */ + {0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22}, /* VERTICAL */ + {0x08,0x10,0x20,0x40,0x80,0x01,0x02,0x04}, /* FDIAGONAL */ + {0x10,0x08,0x04,0x02,0x01,0x80,0x40,0x20}, /* BDIAGONAL */ + {0x22,0x22,0xFF,0x22,0x22,0x22,0xFF,0x22}, /* CROSS */ + {0x18,0x18,0x24,0x42,0x81,0x81,0x42,0x24} /* DIAGCROSS */ +}; + +/******************************************************/ + +static int cdxErrorHandler(Display* dpy, XErrorEvent *err) +{ + char msg[80]; + + /* Se for erro de BadMatch em XGetImage, tudo bem */ + if (err->request_code==X_GetImage && err->error_code==BadMatch) + return 0; + + /* Se for erro de BadAcess em XFreeColors, tudo bem */ + if (err->request_code==X_FreeColors && err->error_code==BadAccess) + return 0; + + XGetErrorText(dpy, err->error_code, msg, 80 ); + fprintf(stderr,"CanvasDraw: Xlib request %d: %s\n", err->request_code, msg); + + return 0; +} + +static void update_colors(cdCtxCanvas *ctxcanvas) +{ + XQueryColors(ctxcanvas->dpy, ctxcanvas->colormap, ctxcanvas->color_table, ctxcanvas->num_colors); +} + +static int find_color(cdCtxCanvas *ctxcanvas, XColor* xc1) +{ + int pos = 0, i; + unsigned long min_dist = ULONG_MAX, this_dist; + int dr, dg, db; + XColor* xc2; + + for (i=0; inum_colors; i++) + { + xc2 = &(ctxcanvas->color_table[i]); + + dr = (xc1->red - xc2->red) / 850; /* 0.30 / 255 */ + dg = (xc1->green - xc2->green) / 432; /* 0.59 / 255 */ + db = (xc1->blue - xc2->blue) / 2318; /* 0.11 / 255 */ + + this_dist = dr*dr + dg*dg + db*db; + + if (this_dist < min_dist) + { + min_dist = this_dist; + pos = i; + } + } + + return pos; +} + +/* Busca o RGB mais proximo na tabela de cores */ +static unsigned long nearest_rgb(cdCtxCanvas *ctxcanvas, XColor* xc) +{ + static int nearest_try = 0; + + int pos = find_color(ctxcanvas, xc); + + /* verifico se a cor ainda esta alocada */ + /* Try to allocate the closest match color. + This should fail only if the cell is read/write. + Otherwise, we're incrementing the cell's reference count. + (comentario extraido da biblioteca Mesa) */ + if (!XAllocColor(ctxcanvas->dpy, ctxcanvas->colormap, &(ctxcanvas->color_table[pos]))) + { + /* nao esta, preciso atualizar a tabela e procurar novamente */ + /* isto acontece porque a cor encontrada pode ter sido de uma aplicacao que nao existe mais */ + /* uma vez atualizada, o problema nao ocorrera' na nova procura */ + /* ou a celula e' read write */ + + if (nearest_try == 1) + { + nearest_try = 0; + return ctxcanvas->color_table[pos].pixel; + } + + /* o que e' mais lento? + Dar um query colors em todo o nearest, --> Isso deve ser mais lento + ou fazer a busca acima antes e arriscar uma repeticao? */ + + update_colors(ctxcanvas); + + nearest_try = 1; /* garante que so' vai tentar isso uma vez */ + return nearest_rgb(ctxcanvas, xc); + } + + return ctxcanvas->color_table[pos].pixel; +} + +/* Funcao get_pixel usando tabela de conversao. \ + Usada quando nao estamos em TrueColor. */ +static unsigned long not_truecolor_get_pixel(cdCtxCanvas *ctxcanvas, unsigned long rgb) +{ + unsigned long pixel; + XColor xc; + xc.red = cdCOLOR8TO16(cdRed(rgb)); + xc.green = cdCOLOR8TO16(cdGreen(rgb)); + xc.blue = cdCOLOR8TO16(cdBlue(rgb)); + xc.flags = DoRed | DoGreen | DoBlue; + + /* verificamos se a nova cor ja' esta' disponivel */ + if (!XAllocColor(ctxcanvas->dpy, ctxcanvas->colormap, &xc)) + { + /* nao estava disponivel, procuro pela mais proxima na tabela de cores */ + pixel = nearest_rgb(ctxcanvas, &xc); + } + else + { + /* ja' estava disponivel */ + /* atualizo a tabela de cores */ + ctxcanvas->color_table[xc.pixel] = xc; + pixel = xc.pixel; + } + + return pixel; +} + +/* +%F Funcao usando tabela de conversao. \ + Usada quando nao estamos em TrueColor. +*/ +static void not_truecolor_get_rgb(cdCtxCanvas *ctxcanvas, unsigned long pixel, unsigned char* red, unsigned char* green, unsigned char* blue) +{ + XColor xc; + xc.pixel = pixel; + XQueryColor(ctxcanvas->dpy, ctxcanvas->colormap, &xc); + *red = cdCOLOR16TO8(xc.red); + *green = cdCOLOR16TO8(xc.green); + *blue = cdCOLOR16TO8(xc.blue); +} + +/* +%F Funcao get_rgb usada quando estamos em TrueColor. +*/ +static void truecolor_get_rgb(cdCtxCanvas *ctxcanvas, unsigned long pixel, unsigned char* red, unsigned char* green, unsigned char* blue) +{ + unsigned long r = pixel & ctxcanvas->vis->red_mask; + unsigned long g = pixel & ctxcanvas->vis->green_mask; + unsigned long b = pixel & ctxcanvas->vis->blue_mask; + if (ctxcanvas->rshift<0) r = r >> (-ctxcanvas->rshift); + else r = r << ctxcanvas->rshift; + if (ctxcanvas->gshift<0) g = g >> (-ctxcanvas->gshift); + else g = g << ctxcanvas->gshift; + if (ctxcanvas->bshift<0) b = b >> (-ctxcanvas->bshift); + else b = b << ctxcanvas->bshift; + *red = cdCOLOR16TO8(r); + *green = cdCOLOR16TO8(g); + *blue = cdCOLOR16TO8(b); +} + +/* +%F Funcao get_pixel usada quando estamos em TrueColor. +*/ +static unsigned long truecolor_get_pixel(cdCtxCanvas *ctxcanvas, unsigned long rgb) +{ + unsigned long r = cdCOLOR8TO16(cdRed(rgb)); + unsigned long g = cdCOLOR8TO16(cdGreen(rgb)); + unsigned long b = cdCOLOR8TO16(cdBlue(rgb)); + + if (ctxcanvas->rshift<0) + r = r << (-ctxcanvas->rshift); + else + r = r >> ctxcanvas->rshift; + + if (ctxcanvas->gshift<0) + g = g << (-ctxcanvas->gshift); + else + g = g >> ctxcanvas->gshift; + + if (ctxcanvas->bshift<0) + b = b << (-ctxcanvas->bshift); + else + b = b >> ctxcanvas->bshift; + + r = r & ctxcanvas->vis->red_mask; + g = g & ctxcanvas->vis->green_mask; + b = b & ctxcanvas->vis->blue_mask; + + return r | g | b; +} + +static int highbit(unsigned long ul) +{ +/* returns position of highest set bit in 'ul' as an integer (0-31), + or -1 if none */ + int i; unsigned long hb; + + hb = 0x80; hb = hb << 24; /* hb = 0x80000000UL */ + for (i=31; ((ul & hb) == 0) && i>=0; i--, ul<<=1); + return i; +} + +static void makeDirectCmap(cdCtxCanvas *ctxcanvas, Colormap cmap) +{ + int i, cmaplen, numgot; + unsigned char origgot[256]; + XColor c; + unsigned long rmask, gmask, bmask; + int rshift, gshift, bshift; + + rmask = ctxcanvas->vis->red_mask; + gmask = ctxcanvas->vis->green_mask; + bmask = ctxcanvas->vis->blue_mask; + + rshift = highbit(rmask) - 15; + gshift = highbit(gmask) - 15; + bshift = highbit(bmask) - 15; + + if (rshift<0) rmask = rmask << (-rshift); + else rmask = rmask >> rshift; + + if (gshift<0) gmask = gmask << (-gshift); + else gmask = gmask >> gshift; + + if (bshift<0) bmask = bmask << (-bshift); + else bmask = bmask >> bshift; + + cmaplen = ctxcanvas->vis->map_entries; + if (cmaplen>256) cmaplen=256; + + /* try to alloc a 'cmaplen' long grayscale colormap. May not get all + entries for whatever reason. Build table 'cdxDirectColorTable[]' that + maps range [0..(cmaplen-1)] into set of colors we did get */ + + for (i=0; i<256; i++) { origgot[i] = 0; cdxDirectColorTable[i] = i; } + + for (i=numgot=0; idpy, cmap, &c)) + { + origgot[i] = 1; + numgot++; + } + } + + if (numgot == 0) + return; + + /* cdxDirectColorTable may or may not have holes in it. */ + for (i=0; i= 0 && !origgot[i-numbak]) numbak++; + while ((i + numfwd) < cmaplen && !origgot[i+numfwd]) numfwd++; + + if (i-numbak<0 || !origgot[i-numbak]) numbak = 999; + if (i+numfwd>=cmaplen || !origgot[i+numfwd]) numfwd = 999; + + if (numbakcanvas->bpp <= 8) + { + unsigned long pixels[256]; + int i; + + /* libera todas as cores usadas na palette */ + for(i = 0; i < ctxcanvas->num_colors; i++) + pixels[i] = ctxcanvas->color_table[i].pixel; + + if (ctxcanvas->colormap != DefaultColormap(ctxcanvas->dpy, ctxcanvas->scr)) + XFreeColormap(ctxcanvas->dpy, ctxcanvas->colormap); + } + + if (ctxcanvas->xidata) free(ctxcanvas->xidata); + if (ctxcanvas->font) XFreeFont(ctxcanvas->dpy, ctxcanvas->font); + if (ctxcanvas->last_hatch) XFreePixmap(ctxcanvas->dpy, ctxcanvas->last_hatch); + if (ctxcanvas->clip_polygon) XFreePixmap(ctxcanvas->dpy, ctxcanvas->clip_polygon); + + if (ctxcanvas->new_region) + { + XFreeGC(ctxcanvas->dpy, ctxcanvas->region_aux_gc); + XFreePixmap(ctxcanvas->dpy, ctxcanvas->region_aux); + XFreePixmap(ctxcanvas->dpy, ctxcanvas->new_region); + } + + if (ctxcanvas->last_pattern) + { + XFreeGC(ctxcanvas->dpy, ctxcanvas->last_pattern_gc); + XFreePixmap(ctxcanvas->dpy, ctxcanvas->last_pattern); + } + + if (ctxcanvas->last_stipple) + { + XFreeGC(ctxcanvas->dpy, ctxcanvas->last_stipple_gc); + XFreePixmap(ctxcanvas->dpy, ctxcanvas->last_stipple); + } + + XFreeGC(ctxcanvas->dpy, ctxcanvas->gc); + + free(ctxcanvas); +} + +/******************************************************/ + +static void cdflush(cdCtxCanvas *ctxcanvas) +{ + XFlush(ctxcanvas->dpy); +} + +/******************************************************/ + +static Pixmap build_clip_polygon(cdCtxCanvas *ctxcanvas, XPoint* pnt, int n) +{ + Pixmap pix = XCreatePixmap(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->canvas->w, ctxcanvas->canvas->h, 1); + GC gc = XCreateGC(ctxcanvas->dpy, pix, 0, NULL); + + XSetForeground(ctxcanvas->dpy, gc, 0); + XFillRectangle(ctxcanvas->dpy, pix, gc, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); + + XSetForeground(ctxcanvas->dpy, gc, 1); + XSetFillRule(ctxcanvas->dpy, gc, ctxcanvas->canvas->fill_mode==CD_EVENODD?EvenOddRule:WindingRule); + XFillPolygon(ctxcanvas->dpy, pix, gc, pnt, n, Complex, CoordModeOrigin); + + XFreeGC(ctxcanvas->dpy, gc); + return pix; +} + +static void xsetclip_area(cdCtxCanvas *ctxcanvas) +{ + cdRect* clip_rect = &ctxcanvas->canvas->clip_rect; + if (ctxcanvas->canvas->use_matrix) + { + cdPoint poly[4]; + poly[0].x = clip_rect->xmin; poly[0].y = clip_rect->ymin; + poly[1].x = clip_rect->xmin; poly[1].y = clip_rect->ymax; + poly[2].x = clip_rect->xmax; poly[2].y = clip_rect->ymax; + poly[3].x = clip_rect->xmax; poly[3].y = clip_rect->ymin; + ctxcanvas->canvas->cxPoly(ctxcanvas, CD_CLIP, poly, 4); + } + else + { + XRectangle rect; + rect.x = (short)clip_rect->xmin; + rect.y = (short)clip_rect->ymin; + rect.width = (unsigned short)(clip_rect->xmax - clip_rect->xmin + 1); + rect.height = (unsigned short)(clip_rect->ymax - clip_rect->ymin + 1); + XSetClipRectangles(ctxcanvas->dpy, ctxcanvas->gc, 0, 0, &rect, 1, Unsorted); + } +} + +int cdxClip(cdCtxCanvas *ctxcanvas, int clip_mode) +{ + switch (clip_mode) + { + case CD_CLIPOFF: + XSetClipMask(ctxcanvas->dpy, ctxcanvas->gc, None); + break; + case CD_CLIPAREA: + xsetclip_area(ctxcanvas); + break; + case CD_CLIPPOLYGON: + if (ctxcanvas->clip_polygon) + XSetClipMask(ctxcanvas->dpy, ctxcanvas->gc, ctxcanvas->clip_polygon); + break; + case CD_CLIPREGION: + if (ctxcanvas->new_region) + XSetClipMask(ctxcanvas->dpy, ctxcanvas->gc, ctxcanvas->new_region); + break; + } + return clip_mode; +} + +static void cdcliparea(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if (ctxcanvas->canvas->clip_mode == CD_CLIPAREA) + { + ctxcanvas->canvas->clip_rect.xmin = xmin; + ctxcanvas->canvas->clip_rect.ymin = ymin; + ctxcanvas->canvas->clip_rect.xmax = xmax; + ctxcanvas->canvas->clip_rect.ymax = ymax; + cdxClip(ctxcanvas, CD_CLIPAREA); + } +} + +static void cdnewregion(cdCtxCanvas *ctxcanvas) +{ + if (ctxcanvas->new_region) + { + XFreeGC(ctxcanvas->dpy, ctxcanvas->region_aux_gc); + XFreePixmap(ctxcanvas->dpy, ctxcanvas->region_aux); + XFreePixmap(ctxcanvas->dpy, ctxcanvas->new_region); + } + + ctxcanvas->new_region = XCreatePixmap(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->canvas->w, ctxcanvas->canvas->h, 1); + + { + GC gc = XCreateGC(ctxcanvas->dpy, ctxcanvas->new_region, 0, NULL); + XSetForeground(ctxcanvas->dpy, gc, 0); + XFillRectangle(ctxcanvas->dpy, ctxcanvas->new_region, gc, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); + XFreeGC(ctxcanvas->dpy, gc); + } + + ctxcanvas->region_aux = XCreatePixmap(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->canvas->w, ctxcanvas->canvas->h, 1); + ctxcanvas->region_aux_gc = XCreateGC(ctxcanvas->dpy, ctxcanvas->region_aux, 0, NULL); + XSetBackground(ctxcanvas->dpy, ctxcanvas->region_aux_gc, 0); +} + +static int cdispointinregion(cdCtxCanvas *ctxcanvas, int x, int y) +{ + if (!ctxcanvas->new_region) + return 0; + + if (x >= 0 && y >= 0 && x < ctxcanvas->canvas->w && y < ctxcanvas->canvas->h) + { + long p; + XImage* img = XGetImage(ctxcanvas->dpy, ctxcanvas->new_region, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h, 1, XYPixmap); + p = XGetPixel(img, x, y); + XDestroyImage(img); + + if (p) return 1; + } + + return 0; +} + +static void cdgetregionbox(cdCtxCanvas *ctxcanvas, int *xmin, int *xmax, int *ymin, int *ymax) +{ + if (!ctxcanvas->new_region) + return; + + *xmin = ctxcanvas->canvas->w-1; + *xmax = 0; + *ymin = ctxcanvas->canvas->h-1; + *ymax = 0; + + { + int x, y; + long p; + XImage* img = XGetImage(ctxcanvas->dpy, ctxcanvas->new_region, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h, 1, XYPixmap); + + for (y = 0; y < ctxcanvas->canvas->h; y++) + { + for (x = 0; x < ctxcanvas->canvas->w; x++) + { + p = XGetPixel(img, x, y); + + if (p) + { + if (x < *xmin) *xmin = x; + if (x > *xmax) *xmax = x; + if (y < *ymin) *ymin = y; + if (y > *ymax) *ymax = y; + break; + } + } + + if (x != ctxcanvas->canvas->w-1) + { + for (x = ctxcanvas->canvas->w-1; x >= 0; x--) + { + p = XGetPixel(img, x, y); + + if (p) + { + if (x < *xmin) *xmin = x; + if (x > *xmax) *xmax = x; + if (y < *ymin) *ymin = y; + if (y > *ymax) *ymax = y; + break; + } + } + } + } + + XDestroyImage(img); + } +} + +static void sPrepareRegion(cdCtxCanvas *ctxcanvas) +{ + if (!ctxcanvas->new_region) + return; + + XSetFunction(ctxcanvas->dpy, ctxcanvas->region_aux_gc, GXcopy); + XSetForeground(ctxcanvas->dpy, ctxcanvas->region_aux_gc, 0); + XFillRectangle(ctxcanvas->dpy, ctxcanvas->region_aux, ctxcanvas->region_aux_gc, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); + XSetForeground(ctxcanvas->dpy, ctxcanvas->region_aux_gc, 1); +} + +static void sCombineRegion(cdCtxCanvas *ctxcanvas) +{ + switch(ctxcanvas->canvas->combine_mode) + { + case CD_UNION: + XSetFunction(ctxcanvas->dpy, ctxcanvas->region_aux_gc, GXor); + break; + case CD_INTERSECT: + XSetFunction(ctxcanvas->dpy, ctxcanvas->region_aux_gc, GXand); + break; + case CD_DIFFERENCE: + XSetFunction(ctxcanvas->dpy, ctxcanvas->region_aux_gc, GXandInverted); + break; + case CD_NOTINTERSECT: + XSetFunction(ctxcanvas->dpy, ctxcanvas->region_aux_gc, GXxor); + break; + } + + XCopyArea(ctxcanvas->dpy, ctxcanvas->region_aux, ctxcanvas->new_region, ctxcanvas->region_aux_gc, + 0, 0, + ctxcanvas->canvas->w, ctxcanvas->canvas->h, + 0, 0); +} + +static void cdoffsetregion(cdCtxCanvas *ctxcanvas, int x, int y) +{ + if (!ctxcanvas->new_region) + return; + + sPrepareRegion(ctxcanvas); + + XCopyArea(ctxcanvas->dpy, ctxcanvas->new_region, ctxcanvas->region_aux, ctxcanvas->region_aux_gc, + 0, 0, + ctxcanvas->canvas->w-x, ctxcanvas->canvas->h-y, + x, y); + + XCopyArea(ctxcanvas->dpy, ctxcanvas->region_aux, ctxcanvas->new_region, ctxcanvas->region_aux_gc, + 0, 0, + ctxcanvas->canvas->w, ctxcanvas->canvas->h, + 0, 0); +} + +/******************************************************/ + +static int cdwritemode(cdCtxCanvas *ctxcanvas, int write_mode) +{ + switch (write_mode) + { + case CD_REPLACE: + XSetFunction(ctxcanvas->dpy, ctxcanvas->gc, GXcopy); + break; + case CD_XOR: + XSetFunction(ctxcanvas->dpy, ctxcanvas->gc, GXxor); + break; + case CD_NOT_XOR: + XSetFunction(ctxcanvas->dpy, ctxcanvas->gc, GXequiv); + break; + } + + return write_mode; +} + +static int cdinteriorstyle(cdCtxCanvas *ctxcanvas, int style) +{ + int sty = FillSolid; + + switch (style) + { + case CD_SOLID: + sty = FillSolid; + break; + case CD_HATCH : + if (!ctxcanvas->last_hatch) + return ctxcanvas->canvas->interior_style; + + XSetStipple(ctxcanvas->dpy, ctxcanvas->gc, ctxcanvas->last_hatch); + + if (ctxcanvas->canvas->back_opacity == CD_OPAQUE) + sty = FillOpaqueStippled; + else + sty = FillStippled; + break; + case CD_STIPPLE: + XSetStipple(ctxcanvas->dpy, ctxcanvas->gc, ctxcanvas->last_stipple); + + if (ctxcanvas->canvas->back_opacity == CD_OPAQUE) + sty = FillOpaqueStippled; + else + sty = FillStippled; + break; + case CD_PATTERN: + XSetTile(ctxcanvas->dpy, ctxcanvas->gc, ctxcanvas->last_pattern); + sty = FillTiled; + break; + } + + XSetFillStyle(ctxcanvas->dpy, ctxcanvas->gc, sty); + + return style; +} + +static int cdhatch(cdCtxCanvas *ctxcanvas, int hatch_style) +{ + if (ctxcanvas->last_hatch) + XFreePixmap(ctxcanvas->dpy, ctxcanvas->last_hatch); + + ctxcanvas->last_hatch = XCreatePixmapFromBitmapData(ctxcanvas->dpy, + ctxcanvas->wnd, hatches[hatch_style], + HATCH_WIDTH, HATCH_HEIGHT, 1, 0, 1); + + cdinteriorstyle(ctxcanvas, CD_HATCH); + + return hatch_style; +} + +static void cdstipple(cdCtxCanvas *ctxcanvas, int w, int h, const unsigned char *data) +{ + int x, y; + + if (ctxcanvas->last_stipple == 0 || (ctxcanvas->last_stipple_w != w || ctxcanvas->last_stipple_h != h)) + { + if (ctxcanvas->last_stipple != 0) + { + XFreePixmap(ctxcanvas->dpy, ctxcanvas->last_stipple); + XFreeGC(ctxcanvas->dpy, ctxcanvas->last_stipple_gc); + } + + ctxcanvas->last_stipple = XCreatePixmap(ctxcanvas->dpy,ctxcanvas->wnd,w,h,1); + if (!ctxcanvas->last_stipple) return; + ctxcanvas->last_stipple_gc = XCreateGC(ctxcanvas->dpy, ctxcanvas->last_stipple, 0, 0); + ctxcanvas->last_stipple_w = w; + ctxcanvas->last_stipple_h = h; + } + + for (y=0; ydpy, ctxcanvas->last_stipple_gc, data[y*w+x]? 1: 0); + XDrawPoint(ctxcanvas->dpy, ctxcanvas->last_stipple, ctxcanvas->last_stipple_gc, x, h-y-1); + } + } + + cdinteriorstyle(ctxcanvas, CD_STIPPLE); +} + +static int find_match(unsigned long* palette, int pal_size, unsigned long color, unsigned char *match) +{ + int i; + + for (i=0;ilast_pattern == 0 || (ctxcanvas->last_pattern_w != w || ctxcanvas->last_pattern_h != h)) + { + if (ctxcanvas->last_pattern != 0) + { + XFreePixmap(ctxcanvas->dpy, ctxcanvas->last_pattern); + XFreeGC(ctxcanvas->dpy, ctxcanvas->last_pattern_gc); + } + + ctxcanvas->last_pattern = XCreatePixmap(ctxcanvas->dpy,ctxcanvas->wnd,w,h,ctxcanvas->depth); + if (!ctxcanvas->last_pattern) return; + ctxcanvas->last_pattern_gc = XCreateGC(ctxcanvas->dpy, ctxcanvas->last_pattern, 0, 0); + ctxcanvas->last_pattern_w = w; + ctxcanvas->last_pattern_h = h; + } + + pixels = (unsigned long*)malloc(w*h*sizeof(long)); + + if (ctxcanvas->canvas->bpp <= 8) + { + long int match_table[256]; /* X colors */ + unsigned long palette[256]; /* CD colors */ + unsigned char *index = (unsigned char*)malloc(size), match; + int pal_size = 1; + palette[0] = colors[0]; + + /* encontra as n primeiras cores diferentes da imagem (ate 256) */ + for(i=0;idpy, ctxcanvas->last_pattern_gc, pixels[y*w+x]); + XDrawPoint(ctxcanvas->dpy, ctxcanvas->last_pattern, ctxcanvas->last_pattern_gc, x, h-y-1); + } + } + + cdinteriorstyle(ctxcanvas, CD_PATTERN); + + free(pixels); +} + +static int cdlinestyle(cdCtxCanvas *ctxcanvas, int style) +{ + switch (style) + { + case CD_CONTINUOUS: + gcval.line_style = LineSolid; + break; + case CD_DASHED: + case CD_DOTTED: + case CD_DASH_DOT: + case CD_DASH_DOT_DOT: + { + static struct { + int size; + char list[6]; + } dashes[4] = { + { 2, { 6, 2 } }, + { 2, { 2, 2 } }, + { 4, { 6, 2, 2, 2 } }, + { 6, { 6, 2, 2, 2, 2, 2 } } + }; + + if (ctxcanvas->canvas->back_opacity == CD_OPAQUE) + gcval.line_style = LineDoubleDash; + else + gcval.line_style = LineOnOffDash; + + XSetDashes(ctxcanvas->dpy, ctxcanvas->gc, 0, dashes[style-CD_DASHED].list, + dashes[style-CD_DASHED].size); + break; + } + case CD_CUSTOM: + { + int i; + char* dash_style = (char*)malloc(ctxcanvas->canvas->line_dashes_count); + for (i = 0; i < ctxcanvas->canvas->line_dashes_count; i++) + dash_style[i] = (char)ctxcanvas->canvas->line_dashes[i]; + + if (ctxcanvas->canvas->back_opacity == CD_OPAQUE) + gcval.line_style = LineDoubleDash; + else + gcval.line_style = LineOnOffDash; + + XSetDashes(ctxcanvas->dpy, ctxcanvas->gc, 0, dash_style, + ctxcanvas->canvas->line_dashes_count); + free(dash_style); + break; + } + } + XChangeGC(ctxcanvas->dpy, ctxcanvas->gc, GCLineStyle, &gcval); + return style; +} + +static int cdlinewidth(cdCtxCanvas *ctxcanvas, int width) +{ + if (width == 1) + gcval.line_width = 0; + else + gcval.line_width = width; + + XChangeGC(ctxcanvas->dpy, ctxcanvas->gc, GCLineWidth, &gcval); + + return width; +} + +static int cdlinecap(cdCtxCanvas *ctxcanvas, int cap) +{ + int cd2x_cap[] = {CapButt, CapProjecting, CapRound}; + + gcval.cap_style = cd2x_cap[cap]; + XChangeGC(ctxcanvas->dpy, ctxcanvas->gc, GCCapStyle, &gcval); + + return cap; +} + +static int cdlinejoin(cdCtxCanvas *ctxcanvas, int join) +{ + int cd2x_join[] = {JoinMiter, JoinBevel, JoinRound}; + + gcval.join_style = cd2x_join[join]; + XChangeGC(ctxcanvas->dpy, ctxcanvas->gc, GCJoinStyle, &gcval); + + return join; +} + +static int cdbackopacity(cdCtxCanvas *ctxcanvas, int opaque) +{ + ctxcanvas->canvas->back_opacity = opaque; + cdinteriorstyle(ctxcanvas, ctxcanvas->canvas->interior_style); + cdlinestyle(ctxcanvas, ctxcanvas->canvas->line_style); + return opaque; +} + +static int cdxGetFontSize(char* font_name) +{ + int i = 0; + while (i < 8) + { + font_name = strchr(font_name, '-')+1; + i++; + } + + *(strchr(font_name, '-')) = 0; + return atoi(font_name); +} + +static int cdfont(cdCtxCanvas *ctxcanvas, const char *type_face, int style, int size) +{ + XFontStruct *font; + char **font_names_list; + char font_name[1024]; + char* foundry = "*"; + int i, num_fonts, font_size, near_size, change_italic = 0; + + /* no underline or strikeout support */ + + static char * type[] = + { + "medium-r", /* CD_PLAIN */ + "bold-r", /* CD_BOLD */ + "medium-i", /* CD_ITALIC */ + "bold-i" /* CD_BOLD_ITALIC */ + }; + + if (cdStrEqualNoCase(type_face, "System")) + type_face = "fixed"; + else if (cdStrEqualNoCase(type_face, "Monospace") || cdStrEqualNoCase(type_face, "Courier New")) + type_face = "courier"; + else if (cdStrEqualNoCase(type_face, "Serif") || cdStrEqualNoCase(type_face, "Times New Roman")) + type_face = "times"; + else if (cdStrEqualNoCase(type_face, "Sans") || cdStrEqualNoCase(type_face, "Arial")) + type_face = "helvetica"; + + if (cdStrEqualNoCase(type_face, "Fixed")) + foundry = "misc"; + + sprintf(font_name,"-%s-%s-%s-*-*-*-*-*-*-*-*-*-*", foundry, type_face, type[style&3]); + + font_names_list = XListFonts(ctxcanvas->dpy, font_name, 32767, &num_fonts); + if (!num_fonts) + { + /* try changing 'i' to 'o', for italic */ + if (style&CD_ITALIC) + { + change_italic = 1; + strstr(font_name, "-i-")[1] = 'o'; + font_names_list = XListFonts(ctxcanvas->dpy, font_name, 32767, &num_fonts); + } + + if (!num_fonts) + return 0; + } + + size = cdGetFontSizePoints(ctxcanvas->canvas, size); + + size *= 10; /* convert to deci-points */ + + near_size = -1000; + for (i=0; idpy, font_name); + if (!font) + return 0; + + if (ctxcanvas->font) + XFreeFont(ctxcanvas->dpy, ctxcanvas->font); + + ctxcanvas->font = font; + XSetFont(ctxcanvas->dpy, ctxcanvas->gc, ctxcanvas->font->fid); + return 1; +} + +static int cdnativefont(cdCtxCanvas *ctxcanvas, const char* nativefont) +{ + int size = 12, style = CD_PLAIN; + char type_face[1024]; + + if (nativefont[0] == '-') + { + XFontStruct *font = XLoadQueryFont(ctxcanvas->dpy, nativefont); + if (!font) + return 0; + + if (!cdParseXWinFont(nativefont, type_face, &style, &size)) + { + XFreeFont(ctxcanvas->dpy, font); + return 0; + } + + if (ctxcanvas->font) XFreeFont(ctxcanvas->dpy, ctxcanvas->font); + ctxcanvas->font = font; + XSetFont(ctxcanvas->dpy, ctxcanvas->gc, ctxcanvas->font->fid); + } + else + { + if (!cdParsePangoFont(nativefont, type_face, &style, &size)) + return 0; + + if (!cdfont(ctxcanvas, type_face, style, size)) + return 0; + } + + /* update cdfont parameters */ + ctxcanvas->canvas->font_style = style; + ctxcanvas->canvas->font_size = size; + strcpy(ctxcanvas->canvas->font_type_face, type_face); + + return 1; +} + +static void cdgetfontdim(cdCtxCanvas *ctxcanvas, int *max_width, int *height, int *ascent, int *descent) +{ + if (!ctxcanvas->font) return; + if (max_width) *max_width = ctxcanvas->font->max_bounds.width; + if (height) *height = ctxcanvas->font->ascent + ctxcanvas->font->descent; + if (ascent) *ascent = ctxcanvas->font->ascent; + if (descent) *descent = ctxcanvas->font->descent; +} + +static long int cdbackground(cdCtxCanvas *ctxcanvas, long int color) +{ + XSetBackground(ctxcanvas->dpy, ctxcanvas->gc, cdxGetPixel(ctxcanvas, color)); + return color; +} + +static long int cdforeground(cdCtxCanvas *ctxcanvas, long int color) +{ + ctxcanvas->fg = cdxGetPixel(ctxcanvas, color); + XSetForeground(ctxcanvas->dpy, ctxcanvas->gc, ctxcanvas->fg); + return color; +} + +static void cdpalette(cdCtxCanvas *ctxcanvas, int n, const long int *palette, int mode) +{ + unsigned long pixels[256]; + int i; + + for(i = 0; i < ctxcanvas->num_colors; i++) + pixels[i] = ctxcanvas->color_table[i].pixel; + + XFreeColors(ctxcanvas->dpy, ctxcanvas->colormap, pixels, ctxcanvas->num_colors, 0); + + if (mode == CD_FORCE) + { + XColor xc; + int tokeep; + + /* se antes era POLITE aloca palette propria */ + if (ctxcanvas->colormap == DefaultColormap(ctxcanvas->dpy, ctxcanvas->scr)) + ctxcanvas->colormap = XCreateColormap(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->vis, AllocNone); + + /* se for FORCE ira' alocar todas as cores, + mas se o numero de cores desejado e' menor que o maximo + entao uso a diferenca para preservar as primeiras cores alocadas no colormap default. */ + tokeep = ctxcanvas->num_colors - n; + if (tokeep) + { + for (i=0; icolor_table[i].pixel=i; + + XQueryColors(ctxcanvas->dpy, DefaultColormap(ctxcanvas->dpy, ctxcanvas->scr), ctxcanvas->color_table, tokeep); + + /* reservo estas cores para o CD tambem */ + for (i=0; idpy, ctxcanvas->colormap, &(ctxcanvas->color_table[i])); + } + + /*aloco todas as cores da palette para o CD */ + for (i=0; idpy, ctxcanvas->colormap, &xc); + } + + /* atualizo toda a tabela de cores */ + XSetWindowColormap(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->colormap); + update_colors(ctxcanvas); + } + else + { + /* se antes era FORCE, remove palette propria */ + if (ctxcanvas->colormap != DefaultColormap(ctxcanvas->dpy, ctxcanvas->scr)) + { + XFreeColormap(ctxcanvas->dpy, ctxcanvas->colormap); + ctxcanvas->colormap = DefaultColormap(ctxcanvas->dpy, ctxcanvas->scr); + } + + /* atualizo a tabela antes de acrescentar novas cores afinal liberamos todas as que podiamos antes disso */ + update_colors(ctxcanvas); + + /* se for POLITE apenas tento alocar todas as cores da palette */ + for (i=0; icanvas->interior_style == CD_SOLID) + return; + + if (set) + XSetFillStyle(ctxcanvas->dpy, ctxcanvas->gc, FillSolid); + else + cdinteriorstyle(ctxcanvas, ctxcanvas->canvas->interior_style); +} + +static void cdclear(cdCtxCanvas* ctxcanvas) +{ + cdxCheckSolidStyle(ctxcanvas, 1); + XSetForeground(ctxcanvas->dpy, ctxcanvas->gc, cdxGetPixel(ctxcanvas, ctxcanvas->canvas->background)); + XFillRectangle(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); + XSetForeground(ctxcanvas->dpy, ctxcanvas->gc, cdxGetPixel(ctxcanvas, ctxcanvas->canvas->foreground)); + cdxCheckSolidStyle(ctxcanvas, 0); +} + +static void cdline(cdCtxCanvas *ctxcanvas, int x1, int y1, int x2, int y2) +{ + if (ctxcanvas->canvas->use_matrix) + { + cdMatrixTransformPoint(ctxcanvas->xmatrix, x1, y1, &x1, &y1); + cdMatrixTransformPoint(ctxcanvas->xmatrix, x2, y2, &x2, &y2); + } + + cdxCheckSolidStyle(ctxcanvas, 1); + XDrawLine(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, x1, y1, x2, y2); + cdxCheckSolidStyle(ctxcanvas, 0); +} + +static void cdarc(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + if (ctxcanvas->canvas->use_matrix) + { + cdarcSIM(ctxcanvas, xc, yc, w, h, a1, a2); + return; + } + + cdxCheckSolidStyle(ctxcanvas, 1); + XDrawArc(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, xc-w/2, yc-h/2, w, h, cdRound(a1*64), cdRound((a2 - a1)*64)); + cdxCheckSolidStyle(ctxcanvas, 0); +} + +static void cdsector(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + if (ctxcanvas->canvas->use_matrix) + { + cdsectorSIM(ctxcanvas, xc, yc, w, h, a1, a2); + return; + } + + if (ctxcanvas->canvas->new_region) + { + sPrepareRegion(ctxcanvas); + XSetArcMode(ctxcanvas->dpy, ctxcanvas->region_aux_gc, ArcPieSlice); + XFillArc(ctxcanvas->dpy, ctxcanvas->region_aux, ctxcanvas->region_aux_gc, xc-w/2, yc-h/2, w, h, cdRound(a1*64), cdRound((a2 - a1)*64)); + sCombineRegion(ctxcanvas); + } + else + { + XSetArcMode(ctxcanvas->dpy, ctxcanvas->gc, ArcPieSlice); + XFillArc(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, xc-w/2, yc-h/2, w, h, cdRound(a1*64), cdRound((a2 - a1)*64)); + } +} + +static void cdchord(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + if (ctxcanvas->canvas->use_matrix) + { + cdchordSIM(ctxcanvas, xc, yc, w, h, a1, a2); + return; + } + + if (ctxcanvas->canvas->new_region) + { + sPrepareRegion(ctxcanvas); + XSetArcMode(ctxcanvas->dpy, ctxcanvas->region_aux_gc, ArcChord); + XFillArc(ctxcanvas->dpy, ctxcanvas->region_aux, ctxcanvas->region_aux_gc, xc-w/2, yc-h/2, w, h, cdRound(a1*64), cdRound((a2 - a1)*64)); + sCombineRegion(ctxcanvas); + } + else + { + XSetArcMode(ctxcanvas->dpy, ctxcanvas->gc, ArcChord); + XFillArc(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, xc-w/2, yc-h/2, w, h, cdRound(a1*64), cdRound((a2 - a1)*64)); + } +} + +static void cdrect(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if (ctxcanvas->canvas->use_matrix) + { + cdrectSIM(ctxcanvas, xmin, xmax, ymin, ymax); + return; + } + + cdxCheckSolidStyle(ctxcanvas, 1); + XDrawRectangle(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, xmin, ymin, xmax-xmin, ymax-ymin); + cdxCheckSolidStyle(ctxcanvas, 0); +} + +static void cdbox(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if (ctxcanvas->canvas->use_matrix) + { + cdboxSIM(ctxcanvas, xmin, xmax, ymin, ymax); + return; + } + + if (ctxcanvas->canvas->new_region) + { + sPrepareRegion(ctxcanvas); + XFillRectangle(ctxcanvas->dpy, ctxcanvas->region_aux, ctxcanvas->region_aux_gc, xmin, ymin, xmax-xmin+1, ymax-ymin+1); + sCombineRegion(ctxcanvas); + } + else + XFillRectangle(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, xmin, ymin, xmax-xmin+1, ymax-ymin+1); +} + +static int cd2xvertex [12] = {XR_TCENTRE, XR_BCENTRE, + XR_MRIGHT, XR_MLEFT, + XR_TRIGHT, XR_TLEFT, + XR_BRIGHT, XR_BLEFT, + XR_MCENTRE, XR_LEFT, + XR_CENTRE, XR_RIGHT}; + +static void cdtext(cdCtxCanvas *ctxcanvas, int x, int y, const char *s, int len) +{ + int w, h, dir = -1; + + if (ctxcanvas->canvas->text_orientation != 0) + { + cdxCheckSolidStyle(ctxcanvas, 1); + + if (ctxcanvas->canvas->use_matrix) + cdMatrixTransformPoint(ctxcanvas->xmatrix, x, y, &x, &y); + + if (ctxcanvas->canvas->new_region) + { + sPrepareRegion(ctxcanvas); + XRotDrawString(ctxcanvas->dpy, ctxcanvas->font, ctxcanvas->canvas->text_orientation, + ctxcanvas->region_aux, ctxcanvas->region_aux_gc, x, y, s, len, + cd2xvertex[ctxcanvas->canvas->text_alignment], 0); + sCombineRegion(ctxcanvas); + } + else + XRotDrawString(ctxcanvas->dpy, ctxcanvas->font, ctxcanvas->canvas->text_orientation, + ctxcanvas->wnd, ctxcanvas->gc, x, y, s, len, + cd2xvertex[ctxcanvas->canvas->text_alignment], 0); + + cdxCheckSolidStyle(ctxcanvas, 0); + + return; + } + + w = XTextWidth(ctxcanvas->font, s, len); + h = ctxcanvas->font->ascent + ctxcanvas->font->descent; + + switch (ctxcanvas->canvas->text_alignment) + { + case CD_BASE_RIGHT: + case CD_NORTH_EAST: + case CD_EAST: + case CD_SOUTH_EAST: + x = x - w; + break; + case CD_BASE_CENTER: + case CD_CENTER: + case CD_NORTH: + case CD_SOUTH: + x = x - w/2; + break; + case CD_BASE_LEFT: + case CD_NORTH_WEST: + case CD_WEST: + case CD_SOUTH_WEST: + x = x; + break; + } + + if (ctxcanvas->canvas->invert_yaxis) + dir = 1; + + switch (ctxcanvas->canvas->text_alignment) + { + case CD_BASE_LEFT: + case CD_BASE_CENTER: + case CD_BASE_RIGHT: + y = y; + break; + case CD_SOUTH_EAST: + case CD_SOUTH_WEST: + case CD_SOUTH: + y = y - dir*ctxcanvas->font->descent; + break; + case CD_NORTH_EAST: + case CD_NORTH: + case CD_NORTH_WEST: + y = y + dir*(h - ctxcanvas->font->descent); + break; + case CD_CENTER: + case CD_EAST: + case CD_WEST: + y = y + dir*(h/2 - ctxcanvas->font->descent); + break; + } + + cdxCheckSolidStyle(ctxcanvas, 1); + + if (ctxcanvas->canvas->use_matrix) + cdMatrixTransformPoint(ctxcanvas->xmatrix, x, y, &x, &y); + + if (ctxcanvas->canvas->new_region) + { + sPrepareRegion(ctxcanvas); + XSetFont(ctxcanvas->dpy, ctxcanvas->region_aux_gc, ctxcanvas->font->fid); + XDrawString(ctxcanvas->dpy, ctxcanvas->region_aux, ctxcanvas->region_aux_gc, x, y+1, s, len); + sCombineRegion(ctxcanvas); + } + else + XDrawString(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, x, y+1, s, len); + + cdxCheckSolidStyle(ctxcanvas, 0); +} + +static void cdgettextsize(cdCtxCanvas *ctxcanvas, const char *s, int len, int *width, int *height) +{ + if (!ctxcanvas->font) return; + if (width) *width = XTextWidth(ctxcanvas->font, s, len); + if (height) *height = ctxcanvas->font->ascent + ctxcanvas->font->descent; +} + +void cdxPoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n) +{ + int i; + XPoint* pnt = NULL; + + if (mode != CD_BEZIER) + { + pnt = (XPoint*)malloc((n+1) * sizeof(XPoint)); /* XPoint uses short for coordinates */ + + for (i = 0; i < n; i++) + { + int x = poly[i].x, + y = poly[i].y; + + if (ctxcanvas->canvas->use_matrix) + cdMatrixTransformPoint(ctxcanvas->xmatrix, x, y, &x, &y); + + pnt[i].x = (short)x; + pnt[i].y = (short)y; + } + } + + switch( mode ) + { + case CD_FILL: + if (ctxcanvas->canvas->new_region) + { + sPrepareRegion(ctxcanvas); + XSetFillRule(ctxcanvas->dpy, ctxcanvas->region_aux_gc, ctxcanvas->canvas->fill_mode==CD_EVENODD?EvenOddRule:WindingRule); + XFillPolygon(ctxcanvas->dpy, ctxcanvas->region_aux, ctxcanvas->region_aux_gc, + pnt, n, Complex, CoordModeOrigin); + sCombineRegion(ctxcanvas); + } + else + { + XSetFillRule(ctxcanvas->dpy, ctxcanvas->gc, ctxcanvas->canvas->fill_mode==CD_EVENODD?EvenOddRule:WindingRule); + XFillPolygon(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, + pnt, n, Complex, CoordModeOrigin); + } + break; + case CD_CLOSED_LINES: + pnt[n].x = pnt[0].x; + pnt[n].y = pnt[0].y; + n++; + /* continua */ + case CD_OPEN_LINES: + { + cdxCheckSolidStyle(ctxcanvas, 1); + XDrawLines(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, pnt, n, CoordModeOrigin); + cdxCheckSolidStyle(ctxcanvas, 0); + break; + } + case CD_CLIP: + if (ctxcanvas->clip_polygon) XFreePixmap(ctxcanvas->dpy, ctxcanvas->clip_polygon); + ctxcanvas->clip_polygon = build_clip_polygon(ctxcanvas, pnt, n); + if (ctxcanvas->canvas->clip_mode == CD_CLIPPOLYGON) cdxClip(ctxcanvas, CD_CLIPPOLYGON); + break; + case CD_BEZIER: + cdSimPolyBezier(ctxcanvas->canvas, poly, n); + break; + } + + if (pnt) free(pnt); +} + +/******************************************************/ + +static int byte_order(void) +{ + unsigned short us = 0xFF00; + unsigned char *uc = (unsigned char *)&us; + return (uc[0]==0xFF) ? MSBFirst : LSBFirst; +} + +static void cdgetimagergb(cdCtxCanvas *ctxcanvas, unsigned char *r, unsigned char *g, unsigned char *b, int x, int y, int w, int h) +{ + int col, lin, pos; + XImage *xi = XGetImage(ctxcanvas->dpy, ctxcanvas->wnd, x, y-h+1, w, h, ULONG_MAX, ZPixmap); + if (!xi) + { + fprintf(stderr, "CanvasDraw: error getting image\n"); + return; + } + + for (lin=0; linxidata) + { + ctxcanvas->xisize = size; + ctxcanvas->xidata = (long int *)malloc(ctxcanvas->xisize); + } + else if (ctxcanvas->xisize < size) + { + ctxcanvas->xisize = size; + ctxcanvas->xidata = (long int *)realloc(ctxcanvas->xidata, ctxcanvas->xisize); + } + + if (!ctxcanvas->xidata) + ctxcanvas->xisize = 0; + + return ctxcanvas->xidata; +} + +static XImage *map2ximage(cdCtxCanvas *ctxcanvas, int ew, int eh, const unsigned char *index, const long int * colors, int by, int bx, int bw, int bh, int iw) +{ + long int match_table[256]; + int i, j, pal_size; + unsigned long xcol; + XImage *xim; + int *fx, *fy, src, dst; + unsigned char idx; + + xim = (XImage *) NULL; + + /* Como nao sabemos o tamanho da palette a priori, + teremos que ver qual o maior indice usado na imagem. */ + pal_size = 0; + + for (i=0; i pal_size) + pal_size = idx; + } + } + + pal_size++; + + for (i = 0; i < pal_size; i++) + match_table[i] = cdxGetPixel(ctxcanvas, colors[i]); + + fx = cdGetZoomTable(ew, bw, bx); + fy = cdGetZoomTable(eh, bh, by); + + switch (ctxcanvas->depth) + { + case 8: + { + unsigned char *imagedata, *ip; + int imew, nullCount; + + nullCount = (4 - (ew % 4)) & 0x03; /* # of padding bytes per line */ + imew = ew + nullCount; + + /* Now get the image data - pad each scanline as necessary */ + imagedata = (unsigned char*)get_data_buffer(ctxcanvas, eh * imew); + if (!imagedata) + { + fprintf(stderr, "CanvasDraw: not enough memory putting image\n"); + return NULL; + } + + for (i=0; idpy,ctxcanvas->vis,ctxcanvas->depth,ZPixmap,0, (char *) imagedata, ew, eh, 32, imew); + if (!xim) + { + fprintf(stderr, "CanvasDraw: not enough memory putting image\n"); + return NULL; + } + } + break; + + case 12: + case 15: + case 16: + { + unsigned char *imagedata; + unsigned short *ip, *tip; + + /* Now get the image data - pad each scanline as necessary */ + imagedata = (unsigned char*)get_data_buffer(ctxcanvas, 2*ew*eh); + if (!imagedata) + { + fprintf(stderr, "CanvasDraw: not enough memory putting image\n"); + return NULL; + } + + xim = XCreateImage(ctxcanvas->dpy,ctxcanvas->vis,ctxcanvas->depth,ZPixmap,0, (char *) imagedata, ew, eh, 16, 0); + if (!xim) + { + fprintf(stderr, "CanvasDraw: not enough memory putting image\n"); + return NULL; + } + + if (ctxcanvas->depth == 12 && xim->bits_per_pixel != 16) + { + xim->data = NULL; + XDestroyImage(xim); + fprintf(stderr,"No code for this type of display (depth=%d, bperpix=%d)", ctxcanvas->depth, xim->bits_per_pixel); + return NULL; + } + + ip = (unsigned short*)(imagedata + (eh-1)*xim->bytes_per_line); + + for (i=0; ibyte_order == MSBFirst) + { + *tip++ = (unsigned short)(xcol & 0xffff); + } + else + { + /* WAS *tip++ = ((xcol>>8) & 0xff) | ((xcol&0xff) << 8); */ + *tip++ = (unsigned short)(xcol); + } + } + + ip -= ew; + } + } + break; + + case 24: + case 32: + { + unsigned char *imagedata, *ip, *tip; + int do32; + + /* Now get the image data - pad each scanline as necessary */ + imagedata = (unsigned char*)get_data_buffer(ctxcanvas, 4*ew*eh); + if (!imagedata) + { + fprintf(stderr, "CanvasDraw: not enough memory putting image\n"); + return NULL; + } + + xim = XCreateImage(ctxcanvas->dpy,ctxcanvas->vis,ctxcanvas->depth,ZPixmap,0, (char *) imagedata, ew, eh, 32, 0); + if (!xim) + { + fprintf(stderr, "CanvasDraw: not enough memory putting image\n"); + return NULL; + } + + do32 = (xim->bits_per_pixel == 32? 1: 0); + + ip = imagedata + (eh-1)*xim->bytes_per_line; + + for (i=0; ibyte_order == MSBFirst) + { + if (do32) *tip++ = 0; + *tip++ = (unsigned char)((xcol>>16) & 0xff); + *tip++ = (unsigned char)((xcol>>8) & 0xff); + *tip++ = (unsigned char)( xcol & 0xff); + } + else + { /* LSBFirst */ + *tip++ = (unsigned char)( xcol & 0xff); + *tip++ = (unsigned char)((xcol>>8) & 0xff); + *tip++ = (unsigned char)((xcol>>16) & 0xff); + if (do32) *tip++ = 0; + } + } + + ip -= xim->bytes_per_line; + } + } + break; + default: + { + /* Now get the image data - pad each scanline as necessary */ + unsigned long* imagedata = (unsigned long*)get_data_buffer(ctxcanvas, 4*ew*eh); + if (!imagedata) + { + fprintf(stderr, "CanvasDraw: not enough memory putting image\n"); + return NULL; + } + + xim = XCreateImage(ctxcanvas->dpy,ctxcanvas->vis,ctxcanvas->depth,ZPixmap,0, (char *) imagedata, ew, eh, 32, ew*4); + if (!xim) + { + fprintf(stderr, "CanvasDraw: not enough memory putting image\n"); + return NULL; + } + + xim->bits_per_pixel = 32; + xim->bytes_per_line = 4 * iw; + xim->byte_order = byte_order(); + xim->bitmap_bit_order = MSBFirst; + + for (i=0; ivis->red_mask; + gmask = ctxcanvas->vis->green_mask; + bmask = ctxcanvas->vis->blue_mask; + rshift = 7 - highbit(rmask); + gshift = 7 - highbit(gmask); + bshift = 7 - highbit(bmask); + + maplen = ctxcanvas->vis->map_entries; + if (maplen>256) maplen=256; + cshift = 7 - highbit((unsigned long) (maplen-1)); + + xim = XCreateImage(ctxcanvas->dpy, ctxcanvas->vis, ctxcanvas->depth, ZPixmap, 0, NULL, ew, eh, 32, 0); + if (!xim) + { + fprintf(stderr, "CanvasDraw: not enough memory putting image\n"); + return NULL; + } + + bperline = xim->bytes_per_line; + bperpix = xim->bits_per_pixel; + byte_order = xim->byte_order; + + if (bperpix != 8 && bperpix != 16 && bperpix != 24 && bperpix != 32) + { + XDestroyImage(xim); + fprintf(stderr, "CanvasDraw: bpp=%d not supported!\n", bperpix); + return NULL; + } + + imagedata = (unsigned char*)get_data_buffer(ctxcanvas, eh * bperline); + if (!imagedata) + { + XDestroyImage(xim); + fprintf(stderr, "CanvasDraw: not enough memory putting image\n"); + return NULL; + } + + fx = cdGetZoomTable(ew, bw, bx); + fy = cdGetZoomTable(eh, bh, by); + + xim->data = (char *) imagedata; + + lip = imagedata + (eh-1)*bperline; + + for (i=0; ivis->c_class == DirectColor) +#else + if (ctxcanvas->vis->class == DirectColor) +#endif + { + r = (unsigned long) cdxDirectColorTable[(r>>cshift) & 0xff] << cshift; + g = (unsigned long) cdxDirectColorTable[(g>>cshift) & 0xff] << cshift; + b = (unsigned long) cdxDirectColorTable[(b>>cshift) & 0xff] << cshift; + } + + /* shift the bits around */ + if (rshift<0) r = r << (-rshift); + else r = r >> rshift; + + if (gshift<0) g = g << (-gshift); + else g = g >> gshift; + + if (bshift<0) b = b << (-bshift); + else b = b >> bshift; + + r = r & rmask; + g = g & gmask; + b = b & bmask; + + xcol = r | g | b; + + if (bperpix == 32) + { + if (byte_order == MSBFirst) { + *ip++ = (unsigned char)((xcol>>24) & 0xff); + *ip++ = (unsigned char)((xcol>>16) & 0xff); + *ip++ = (unsigned char)((xcol>>8) & 0xff); + *ip++ = (unsigned char)( xcol & 0xff); + } + else + { /* LSBFirst */ + *ip++ = (unsigned char)( xcol & 0xff); + *ip++ = (unsigned char)((xcol>>8) & 0xff); + *ip++ = (unsigned char)((xcol>>16) & 0xff); + *ip++ = (unsigned char)((xcol>>24) & 0xff); + } + } + else if (bperpix == 24) + { + if (byte_order == MSBFirst) + { + *ip++ = (unsigned char)((xcol>>16) & 0xff); + *ip++ = (unsigned char)((xcol>>8) & 0xff); + *ip++ = (unsigned char)( xcol & 0xff); + } + else + { /* LSBFirst */ + *ip++ = (unsigned char)( xcol & 0xff); + *ip++ = (unsigned char)((xcol>>8) & 0xff); + *ip++ = (unsigned char)((xcol>>16) & 0xff); + } + } + else if (bperpix == 16) + { + if (byte_order == MSBFirst) + { + *ip++ = (unsigned char)((xcol>>8) & 0xff); + *ip++ = (unsigned char)( xcol & 0xff); + } + else { /* LSBFirst */ + *ip++ = (unsigned char)( xcol & 0xff); + *ip++ = (unsigned char)((xcol>>8) & 0xff); + } + } + else if (bperpix == 8) + { + *ip++ = (unsigned char)(xcol & 0xff); + } + } + } + + free(fx); + free(fy); + + return xim; +} + +static void cdputimagerectrgba_matrix(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int t_xmin, t_xmax, t_ymin, t_ymax, ew, eh, + t_x, t_y, dst_offset, size, nc, doff, rect[8]; + float i_x, i_y, xfactor, yfactor; + unsigned char *dst_r, *dst_g, *dst_b, *dst_a = NULL; + double inv_matrix[6]; + + /* calculate the destination limits */ + cdImageRGBCalcDstLimits(ctxcanvas->canvas, x, y, w, h, &t_xmin, &t_xmax, &t_ymin, &t_ymax, rect); + + /* Setup inverse transform (use the original transform here, NOT ctxcanvas->xmatrix) */ + cdImageRGBInitInverseTransform(w, h, xmin, xmax, ymin, ymax, &xfactor, &yfactor, ctxcanvas->canvas->matrix, inv_matrix); + + /* create an image for the destination area */ + ew = (t_xmax-t_xmin+1); + eh = (t_ymax-t_ymin+1); + size = ew*eh; + nc = 3; + if (a) nc = 4; + dst_r = malloc(nc*size); + if (!dst_r) + { + fprintf(stderr, "CanvasDraw: no enough memory\n"); + return; + } + dst_g = dst_r + size; + dst_b = dst_g + size; + if (a) dst_a = dst_b + size; + memset(dst_r, 0, nc*size); + + /* for all pixels in the destiny area */ + for(t_y = t_ymin; t_y <= t_ymax; t_y++) + { + dst_offset = (t_y-t_ymin) * ew; + + for(t_x = t_xmin; t_x <= t_xmax; t_x++) + { + cdImageRGBInverseTransform(t_x, t_y, &i_x, &i_y, xfactor, yfactor, xmin, ymin, x, y, inv_matrix); + + if (i_x > xmin && i_y > ymin && i_x < xmax+1 && i_y < ymax+1) + { + doff = (t_x-t_xmin) + dst_offset; + *(dst_r+doff) = cdBilinearInterpolation(iw, ih, r, i_x, i_y); + *(dst_g+doff) = cdBilinearInterpolation(iw, ih, g, i_x, i_y); + *(dst_b+doff) = cdBilinearInterpolation(iw, ih, b, i_x, i_y); + if (a) *(dst_a+doff) = cdBilinearInterpolation(iw, ih, a, i_x, i_y); + } + } + } + + { + int ex = t_xmin, + ey = t_ymin + eh-1; /* XImage origin is at top-left */ + XImage *xi, *oxi = NULL; + Pixmap clip_polygon, clip_mask = 0; + XPoint pnt[4]; + + /* Since the transformation used was the original transformation, */ + /* must invert the Y axis here. */ + ey = _cdInvertYAxis(ctxcanvas->canvas, ey); + + /* use clipping to select only the transformed rectangle */ + pnt[0].x = (short)rect[0]; pnt[0].y = (short)_cdInvertYAxis(ctxcanvas->canvas, rect[1]); + pnt[1].x = (short)rect[2]; pnt[1].y = (short)_cdInvertYAxis(ctxcanvas->canvas, rect[3]); + pnt[2].x = (short)rect[4]; pnt[2].y = (short)_cdInvertYAxis(ctxcanvas->canvas, rect[5]); + pnt[3].x = (short)rect[6]; pnt[3].y = (short)_cdInvertYAxis(ctxcanvas->canvas, rect[7]); + clip_polygon = build_clip_polygon(ctxcanvas, pnt, 4); + + /* combine with the existing clipping */ + if (ctxcanvas->canvas->clip_mode == CD_CLIPAREA || ctxcanvas->canvas->clip_mode == CD_CLIPPOLYGON) + clip_mask = ctxcanvas->clip_polygon; + else if (ctxcanvas->canvas->clip_mode == CD_CLIPREGION) + clip_mask = ctxcanvas->new_region; + XSetFunction(ctxcanvas->dpy, ctxcanvas->gc, GXand); + XCopyArea(ctxcanvas->dpy, clip_mask, clip_polygon, ctxcanvas->gc, + 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h, 0, 0); + XSetClipMask(ctxcanvas->dpy, ctxcanvas->gc, clip_polygon); + cdwritemode(ctxcanvas, ctxcanvas->canvas->write_mode); /* reset XSetFunction */ + + if (a) + { + oxi = XGetImage(ctxcanvas->dpy, ctxcanvas->wnd, ex, ey, ew, eh, ULONG_MAX, ZPixmap); + if (!oxi) + { + fprintf(stderr, "CanvasDraw: error getting image\n"); + free(dst_r); + return; + } + } + + xi = rgb2ximage(ctxcanvas, ew, eh, dst_r, dst_g, dst_b, dst_a, oxi, 0, 0, ew, eh, ew); + if (!xi) + return; + + XPutImage(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, xi, 0, 0, ex, ey, ew, eh); + + /* reset cliping */ + XFreePixmap(ctxcanvas->dpy, clip_polygon); + cdxClip(ctxcanvas, ctxcanvas->canvas->clip_mode); + + xi->data = NULL; + XDestroyImage(xi); + if (oxi) XDestroyImage(oxi); + } + + free(dst_r); +} + +static void cdputimagerectmap_matrix(cdCtxCanvas* ctxcanvas, int iw, int ih, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int t_xmin, t_xmax, t_ymin, t_ymax, ew, eh, + t_x, t_y, dst_offset, size, doff, rect[8]; + float i_x, i_y, xfactor, yfactor; + unsigned char *dst_index; + double inv_matrix[6]; + + /* calculate the destination limits */ + cdImageRGBCalcDstLimits(ctxcanvas->canvas, x, y, w, h, &t_xmin, &t_xmax, &t_ymin, &t_ymax, rect); + + /* Setup inverse transform (use the original transform here, NOT ctxcanvas->xmatrix) */ + cdImageRGBInitInverseTransform(w, h, xmin, xmax, ymin, ymax, &xfactor, &yfactor, ctxcanvas->canvas->matrix, inv_matrix); + + /* create an image for the destination area */ + ew = (t_xmax-t_xmin+1); + eh = (t_ymax-t_ymin+1); + size = ew*eh; + dst_index = malloc(size); + if (!dst_index) + { + fprintf(stderr, "CanvasDraw: no enough memory\n"); + return; + } + memset(dst_index, 0, size); + + /* for all pixels in the destiny area */ + for(t_y = t_ymin; t_y <= t_ymax; t_y++) + { + dst_offset = (t_y-t_ymin) * ew; + + for(t_x = t_xmin; t_x <= t_xmax; t_x++) + { + cdImageRGBInverseTransform(t_x, t_y, &i_x, &i_y, xfactor, yfactor, xmin, ymin, x, y, inv_matrix); + + if (i_x > xmin && i_y > ymin && i_x < xmax+1 && i_y < ymax+1) + { + doff = (t_x-t_xmin) + dst_offset; + *(dst_index+doff) = cdZeroOrderInterpolation(iw, ih, index, i_x, i_y); + } + } + } + + { + int ex = t_xmin, + ey = t_ymin + eh-1; /* XImage origin is at top-left */ + XImage *xi; + Pixmap clip_polygon, clip_mask = 0; + XPoint pnt[4]; + + /* Since the transformation used was the original transformation, */ + /* must invert the Y axis here. */ + ey = _cdInvertYAxis(ctxcanvas->canvas, ey); + + /* use clipping to select only the transformed rectangle */ + pnt[0].x = (short)rect[0]; pnt[0].y = (short)_cdInvertYAxis(ctxcanvas->canvas, rect[1]); + pnt[1].x = (short)rect[2]; pnt[1].y = (short)_cdInvertYAxis(ctxcanvas->canvas, rect[3]); + pnt[2].x = (short)rect[4]; pnt[2].y = (short)_cdInvertYAxis(ctxcanvas->canvas, rect[5]); + pnt[3].x = (short)rect[6]; pnt[3].y = (short)_cdInvertYAxis(ctxcanvas->canvas, rect[7]); + clip_polygon = build_clip_polygon(ctxcanvas, pnt, 4); + + /* combine with the existing clipping */ + if (ctxcanvas->canvas->clip_mode == CD_CLIPAREA || ctxcanvas->canvas->clip_mode == CD_CLIPPOLYGON) + clip_mask = ctxcanvas->clip_polygon; + else if (ctxcanvas->canvas->clip_mode == CD_CLIPREGION) + clip_mask = ctxcanvas->new_region; + XSetFunction(ctxcanvas->dpy, ctxcanvas->gc, GXand); + XCopyArea(ctxcanvas->dpy, clip_mask, clip_polygon, ctxcanvas->gc, + 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h, 0, 0); + XSetClipMask(ctxcanvas->dpy, ctxcanvas->gc, clip_polygon); + cdwritemode(ctxcanvas, ctxcanvas->canvas->write_mode); /* reset XSetFunction */ + + xi = map2ximage(ctxcanvas, ew, eh, dst_index, colors, 0, 0, ew, eh, ew); + if (!xi) + return; + + XPutImage(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, xi, 0, 0, ex, ey, ew, eh); + + /* reset cliping */ + XFreePixmap(ctxcanvas->dpy, clip_polygon); + cdxClip(ctxcanvas, ctxcanvas->canvas->clip_mode); + + xi->data = NULL; + XDestroyImage(xi); + } + + free(dst_index); +} + +static void cdputimagerectrgb(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int ew = w, eh = h, ex = x, ey = y; + int bw = iw, bh = ih, bx = 0, by = 0; + int rw, rh; + XImage *xi; + + if (ctxcanvas->canvas->use_matrix) + { + cdputimagerectrgba_matrix(ctxcanvas, iw, ih, r, g, b, NULL, x, y, w, h, xmin, xmax, ymin, ymax); + return; + } + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + y -= (h - 1); /* XImage origin is at top-left */ + + if (!cdCalcZoom(ctxcanvas->canvas->w, x, w, &ex, &ew, xmin, rw, &bx, &bw, 1)) + return; + + if (!cdCalcZoom(ctxcanvas->canvas->h, y, h, &ey, &eh, ymin, rh, &by, &bh, 0)) + return; + + xi = rgb2ximage(ctxcanvas, ew, eh, r, g, b, NULL, NULL, by, bx, bw, bh, iw); + if (!xi) + return; + + XPutImage(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, xi, 0, 0, ex, ey, ew, eh); + + xi->data = NULL; + XDestroyImage(xi); +} + +static void cdputimagerectrgba(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + XImage *xi, *oxi; + int ew = w, eh = h, ex = x, ey = y; + int bw = iw, bh = ih, bx = 0, by = 0; + int rw, rh; + + if (ctxcanvas->canvas->use_matrix) + { + cdputimagerectrgba_matrix(ctxcanvas, iw, ih, r, g, b, a, x, y, w, h, xmin, xmax, ymin, ymax); + return; + } + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + y -= (h - 1); /* XImage origin is at top-left */ + + if (!cdCalcZoom(ctxcanvas->canvas->w, x, w, &ex, &ew, xmin, rw, &bx, &bw, 1)) + return; + + if (!cdCalcZoom(ctxcanvas->canvas->h, y, h, &ey, &eh, ymin, rh, &by, &bh, 0)) + return; + + oxi = XGetImage(ctxcanvas->dpy, ctxcanvas->wnd, ex, ey, ew, eh, ULONG_MAX, ZPixmap); + if (!oxi) + { + fprintf(stderr, "CanvasDraw: error getting image\n"); + return; + } + + xi = rgb2ximage(ctxcanvas, ew, eh, r, g, b, a, oxi, by, bx, bw, bh, iw); + if (!xi) + return; + + XPutImage(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, xi, 0, 0, ex, ey, ew, eh); + + xi->data = NULL; + XDestroyImage(xi); + XDestroyImage(oxi); +} + +static void cdputimagerectmap(cdCtxCanvas *ctxcanvas, int iw, int ih, const unsigned char *index, const long int *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) +{ + int ew = w, eh = h, ex = x, ey = y; + int bw = iw, bh = ih, bx = 0, by = 0; + int rw, rh; + XImage *xi; + + if (ctxcanvas->canvas->use_matrix) + { + cdputimagerectmap_matrix(ctxcanvas, iw, ih, index, colors, x, y, w, h, xmin, xmax, ymin, ymax); + return; + } + + rw = xmax-xmin+1; + rh = ymax-ymin+1; + y -= (h - 1); /* XImage origin is at top-left */ + + if (!cdCalcZoom(ctxcanvas->canvas->w, x, w, &ex, &ew, xmin, rw, &bx, &bw, 1)) + return; + + if (!cdCalcZoom(ctxcanvas->canvas->h, y, h, &ey, &eh, ymin, rh, &by, &bh, 0)) + return; + + xi = map2ximage(ctxcanvas, ew, eh, index, colors, by, bx, bw, bh, iw); + if (!xi) + return; + + XPutImage(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, xi, 0, 0, ex, ey, ew, eh); + + xi->data = NULL; + XDestroyImage(xi); +} + +static void cdpixel(cdCtxCanvas *ctxcanvas, int x, int y, long int color) +{ + if (ctxcanvas->canvas->foreground != color) + XSetForeground(ctxcanvas->dpy, ctxcanvas->gc, cdxGetPixel(ctxcanvas, color)); + + if (ctxcanvas->canvas->use_matrix) + cdMatrixTransformPoint(ctxcanvas->xmatrix, x, y, &x, &y); + + XDrawPoint(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, x, y); + + if (ctxcanvas->canvas->foreground != color) + XSetForeground(ctxcanvas->dpy, ctxcanvas->gc, ctxcanvas->fg); +} + +static cdCtxImage *cdcreateimage (cdCtxCanvas *ctxcanvas, int w, int h) +{ + GC gc; + cdCtxImage *ctximage = (cdCtxImage *)malloc(sizeof(cdCtxImage)); + + ctximage->w = w; + ctximage->h = h; + ctximage->depth = ctxcanvas->depth; + ctximage->dpy = ctxcanvas->dpy; + ctximage->scr = ctxcanvas->scr; + ctximage->vis = ctxcanvas->vis; + + ctximage->img = XCreatePixmap(ctxcanvas->dpy, ctxcanvas->wnd, w, h, ctxcanvas->depth); + if (!ctximage->img) + { + free(ctximage); + return (void *)0; + } + + gc = XCreateGC(ctximage->dpy, ctximage->img, 0, NULL); + XSetForeground(ctximage->dpy, gc, cdxGetPixel(ctxcanvas, CD_WHITE)); + XFillRectangle(ctximage->dpy, ctximage->img, gc, 0, 0, ctximage->w, ctxcanvas->canvas->h); + XFreeGC(ctximage->dpy, gc); + + return (void *)ctximage; +} + +static void cdgetimage (cdCtxCanvas *ctxcanvas, cdCtxImage *ctximage, int x, int y) +{ + XCopyArea(ctxcanvas->dpy, ctxcanvas->wnd, ctximage->img, ctxcanvas->gc, + x, y - ctximage->h+1, ctximage->w, ctximage->h, 0, 0); +} + +static void cdputimagerect (cdCtxCanvas *ctxcanvas, cdCtxImage *ctximage, int x, int y, int xmin, int xmax, int ymin, int ymax) +{ + XCopyArea(ctxcanvas->dpy, ctximage->img, ctxcanvas->wnd, ctxcanvas->gc, + xmin, ctximage->h-ymax-1, xmax-xmin+1, ymax-ymin+1, x, y-(ymax-ymin+1)+1); +} + +static void cdkillimage (cdCtxImage *ctximage) +{ + XFreePixmap(ctximage->dpy, ctximage->img); + free(ctximage); +} + +static void cdscrollarea (cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax, int dx, int dy) +{ + XCopyArea(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->wnd, ctxcanvas->gc, + xmin, ymin, + xmax-xmin+1, ymax-ymin+1, + xmin+dx, ymin+dy); +} + +static void cdtransform(cdCtxCanvas *ctxcanvas, const double* matrix) +{ + if (matrix) + { + /* configure a bottom-up coordinate system */ + ctxcanvas->xmatrix[0] = 1; + ctxcanvas->xmatrix[1] = 0; + ctxcanvas->xmatrix[2] = 0; + ctxcanvas->xmatrix[3] = -1; + ctxcanvas->xmatrix[4] = 0; + ctxcanvas->xmatrix[5] = (ctxcanvas->canvas->h-1); + cdMatrixMultiply(matrix, ctxcanvas->xmatrix); + + ctxcanvas->canvas->invert_yaxis = 0; + } + else + { + ctxcanvas->canvas->invert_yaxis = 1; + } +} + +/******************************************************************/ + +static void set_rotate_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (data) + { + sscanf(data, "%g %d %d", &ctxcanvas->rotate_angle, + &ctxcanvas->rotate_center_x, + &ctxcanvas->rotate_center_y); + + cdCanvasTransformTranslate(ctxcanvas->canvas, ctxcanvas->rotate_center_x, ctxcanvas->rotate_center_y); + cdCanvasTransformRotate(ctxcanvas->canvas, ctxcanvas->rotate_angle); + cdCanvasTransformTranslate(ctxcanvas->canvas, -ctxcanvas->rotate_center_x, -ctxcanvas->rotate_center_y); + } + else + { + ctxcanvas->rotate_angle = 0; + ctxcanvas->rotate_center_x = 0; + ctxcanvas->rotate_center_y = 0; + + cdCanvasTransform(ctxcanvas->canvas, NULL); + } +} + +static char* get_rotate_attrib(cdCtxCanvas* ctxcanvas) +{ + static char data[100]; + + if (!ctxcanvas->rotate_angle) + return NULL; + + sprintf(data, "%g %d %d", (double)ctxcanvas->rotate_angle, + ctxcanvas->rotate_center_x, + ctxcanvas->rotate_center_y); + + return data; +} + +static cdAttribute rotate_attrib = +{ + "ROTATE", + set_rotate_attrib, + get_rotate_attrib +}; + +static char* get_gc_attrib(cdCtxCanvas *ctxcanvas) +{ + return (char*)ctxcanvas->gc; +} + +static cdAttribute gc_attrib = +{ + "GC", + NULL, + get_gc_attrib +}; + +static void get_geometry(Display *dpy, Drawable wnd, cdCtxCanvas *ctxcanvas) +{ + Window root; + int x, y; + unsigned int w, h, b, d; + XGetGeometry(dpy, wnd, &root, &x, &y, &w, &h, &b, &d); + ctxcanvas->canvas->w = w; + ctxcanvas->canvas->h = h; + ctxcanvas->depth = d; +} + +cdCtxCanvas *cdxCreateCanvas(cdCanvas* canvas, Display *dpy, int scr, Drawable wnd, Visual *vis) +{ + static int first = 1; + cdCtxCanvas *ctxcanvas = (cdCtxCanvas *)malloc(sizeof(cdCtxCanvas)); + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + + ctxcanvas->dpy = dpy; + ctxcanvas->scr = scr; + ctxcanvas->wnd = wnd; + ctxcanvas->vis = vis; + ctxcanvas->gc = XCreateGC(dpy, wnd, 0, NULL); + if (ctxcanvas->gc == 0) + { + free(canvas); + return NULL; + } + + ctxcanvas->canvas = canvas; + canvas->ctxcanvas = ctxcanvas; + + get_geometry(dpy, wnd, ctxcanvas); + + canvas->bpp = ctxcanvas->depth; + canvas->xres = ((double)DisplayWidth(dpy, scr) / (double)DisplayWidthMM(dpy, scr)); + canvas->yres = ((double)DisplayHeight(dpy, scr) / (double)DisplayHeightMM(dpy, scr)); + canvas->w_mm = ((double)canvas->w) / canvas->xres; + canvas->h_mm = ((double)canvas->h) / canvas->yres; + canvas->invert_yaxis = 1; + + if (first) + { + if (canvas->bpp > 8) + { + cdxGetRGB = truecolor_get_rgb; + cdxGetPixel = truecolor_get_pixel; + + /* make linear colormap for DirectColor visual */ +#ifdef __cplusplus + if (ctxcanvas->vis->c_class == DirectColor) +#else + if (ctxcanvas->vis->class == DirectColor) +#endif + makeDirectCmap(ctxcanvas, DefaultColormap(ctxcanvas->dpy, ctxcanvas->scr)); + } + else + { + cdxGetRGB = not_truecolor_get_rgb; + cdxGetPixel = not_truecolor_get_pixel; + } + } + + if (canvas->bpp > 8) + { + ctxcanvas->rshift = 15 - highbit(ctxcanvas->vis->red_mask); + ctxcanvas->gshift = 15 - highbit(ctxcanvas->vis->green_mask); + ctxcanvas->bshift = 15 - highbit(ctxcanvas->vis->blue_mask); + + ctxcanvas->num_colors = 0; + ctxcanvas->colormap = (Colormap)0; + + /* para canvas bpp <= 8 RGBA e' simulado com cdGetImageRGB */ + canvas->cxPutImageRectRGBA = cdputimagerectrgba; + } + else + { + int i; + + ctxcanvas->colormap = DefaultColormap(dpy, scr); + ctxcanvas->num_colors = 1L << canvas->bpp; + + for (i=0; inum_colors; i++) + ctxcanvas->color_table[i].pixel = i; + + update_colors(ctxcanvas); + } + + if (first) + { + if(!getenv("CD_XERROR")) + XSetErrorHandler(cdxErrorHandler); + } + + cdRegisterAttribute(canvas, &gc_attrib); + cdRegisterAttribute(canvas, &rotate_attrib); + + first = 0; + + return ctxcanvas; +} + +void cdxInitTable(cdCanvas* canvas) +{ + canvas->cxFlush = cdflush; + canvas->cxClear = cdclear; + canvas->cxPixel = cdpixel; + canvas->cxLine = cdline; + canvas->cxPoly = cdxPoly; + canvas->cxRect = cdrect; + canvas->cxBox = cdbox; + canvas->cxArc = cdarc; + canvas->cxSector = cdsector; + canvas->cxChord = cdchord; + canvas->cxText = cdtext; + + canvas->cxNewRegion = cdnewregion; + canvas->cxIsPointInRegion = cdispointinregion; + canvas->cxOffsetRegion = cdoffsetregion; + canvas->cxGetRegionBox = cdgetregionbox; + canvas->cxClip = cdxClip; + canvas->cxClipArea = cdcliparea; + canvas->cxWriteMode = cdwritemode; + canvas->cxLineStyle = cdlinestyle; + canvas->cxLineWidth = cdlinewidth; + canvas->cxLineCap = cdlinecap; + canvas->cxLineJoin = cdlinejoin; + canvas->cxBackOpacity = cdbackopacity; + canvas->cxInteriorStyle = cdinteriorstyle; + canvas->cxHatch = cdhatch; + canvas->cxStipple = cdstipple; + canvas->cxPattern = cdpattern; + canvas->cxFont = cdfont; + canvas->cxNativeFont = cdnativefont; + canvas->cxGetFontDim = cdgetfontdim; + canvas->cxGetTextSize = cdgettextsize; + canvas->cxPalette = cdpalette; + canvas->cxBackground = cdbackground; + canvas->cxForeground = cdforeground; + canvas->cxTransform = cdtransform; + + canvas->cxGetImageRGB = cdgetimagergb; + canvas->cxScrollArea = cdscrollarea; + + canvas->cxCreateImage = cdcreateimage; + canvas->cxGetImage = cdgetimage; + canvas->cxPutImageRect = cdputimagerect; + canvas->cxKillImage = cdkillimage; + + canvas->cxPutImageRectRGB = cdputimagerectrgb; + canvas->cxPutImageRectMap = cdputimagerectmap; + + if (canvas->bpp > 8) + canvas->cxPutImageRectRGBA = cdputimagerectrgba; +} diff --git a/cd/src/x11/cdx11.h b/cd/src/x11/cdx11.h new file mode 100755 index 0000000..a68fdf9 --- /dev/null +++ b/cd/src/x11/cdx11.h @@ -0,0 +1,85 @@ +/** \file + * \brief X-Windows Base Driver + * + * See Copyright Notice in cd.h + */ + +#ifndef __CDX11_H +#define __CDX11_H + +#include +#include + +#include "cd.h" +#include "cd_private.h" + + +/* Hidden declaration for the Context Plus driver */ +typedef struct _cdxContextPlus cdxContextPlus; + +struct _cdCtxImage { + unsigned int w, h, depth; + Pixmap img; + Display *dpy; + int scr; + Visual *vis; +}; + +struct _cdCtxCanvas { + cdCanvas* canvas; + Display* dpy; /* display da aplicacao no X */ + Visual* vis; /* visual usado pela aplicacao */ + int scr; /* screen da aplicacao */ + GC gc; /* contexto grafico */ + Drawable wnd; /* drawable */ + long int fg; + Pixmap last_hatch; /* ultimo hatch setado pelo usuario */ + Pixmap last_stipple; /* ultimo stipple setado pelo usuario */ + Pixmap last_pattern; /* ultimo pattern setado pelo usuario */ + GC last_stipple_gc; + int last_stipple_w; + int last_stipple_h; + GC last_pattern_gc; + int last_pattern_w; + int last_pattern_h; + XFontStruct *font; /* fonte de caracteres no X */ + unsigned int depth; /* depth do canvas */ + Pixmap clip_polygon; /* poligono de clipping */ + Pixmap new_region, region_aux; + GC region_aux_gc; + void *data; /* informacoes especificas do driver */ + long int *xidata; /* ximage cache */ + int xisize; + Colormap colormap; /* colormap para todos os canvas */ + XColor color_table[256]; /* tabela de cores do colormap */ + int num_colors; /* tamanho maximo da tabela de cores */ + int rshift; /* constante red para calculo truecolor */ + int gshift; /* constante green para calculo truecolor */ + int bshift; /* constante blue para calculo truecolor */ + double xmatrix[6]; /* transformation matrix that includes axis inversion */ + float rotate_angle; + int rotate_center_x, + rotate_center_y; + + cdImage* image_dbuffer; /* utilizado pelo driver de Double buffer */ + cdCanvas* canvas_dbuffer; + + cdxContextPlus* ctxplus; +}; + +#define cdCOLOR8TO16(_x) (_x*257) /* 65535/255 = 257 */ +#define cdCOLOR16TO8(_x) ((unsigned char)(_x/257)) + +extern unsigned long (*cdxGetPixel)(cdCtxCanvas *ctxcanvas, unsigned long rgb); +extern void (*cdxGetRGB)(cdCtxCanvas *ctxcanvas, unsigned long pixel, + unsigned char* red, + unsigned char* green, + unsigned char* blue); + +cdCtxCanvas *cdxCreateCanvas(cdCanvas* canvas, Display *dpy, int scr, Drawable wnd, Visual *vis); +void cdxInitTable(cdCanvas* canvas); +void cdxKillCanvas(cdCtxCanvas *ctxcanvas); +int cdxClip(cdCtxCanvas *ctxcanvas, int clip_mode); +void cdxPoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n); + +#endif diff --git a/cd/src/x11/cdxclp.c b/cd/src/x11/cdxclp.c new file mode 100755 index 0000000..d775fde --- /dev/null +++ b/cd/src/x11/cdxclp.c @@ -0,0 +1,136 @@ +/** \file + * \brief X-Windows Clipboard Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include + +#include +#include + +#include "cd.h" +#include "cd_private.h" +#include "cdclipbd.h" +#include "cdmf.h" +#include "cdmf_private.h" + + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + char* buffer; + long dwSize; + FILE* file; + char filename[10240]; + cdCanvasMF* mfcanvas = (cdCanvasMF*)ctxcanvas; + Display* dpy = (Display*)mfcanvas->data; + + /* guardar antes de remover o canvas */ + strcpy(filename, mfcanvas->filename); + + cdkillcanvasMF(mfcanvas); + + file = fopen(filename, "r"); + fseek(file, 0, SEEK_END); + dwSize = ftell(file); + fseek(file, 0, SEEK_SET); + + buffer = (char*)malloc(dwSize); + fread(buffer, dwSize, 1, file); + + fclose(file); + + remove(filename); + + XStoreBytes(dpy, buffer, dwSize); +} + +static int cdplay(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data) +{ + char filename[1024]; + char* buffer; + int dwSize; + FILE* file; + + buffer = XFetchBytes((Display*)data, &dwSize); + if (!buffer) + return CD_ERROR; + + tmpnam(filename); + file = fopen(filename, "w"); + fwrite(buffer, dwSize, 1, file); + fclose(file); + + cdCanvasPlay(canvas, CD_METAFILE, xmin, xmax, ymin, ymax, filename); + + remove(filename); + + XFree(buffer); + + return CD_OK; +} + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + char tmpPath[512]; + char* str = (char*)data; + Display* dpy = NULL; + + /* Inicializa parametros */ + if (str == NULL) + return; + +#ifdef SunOS_OLD + sscanf(str, "%d", &dpy); +#else + sscanf(str, "%p", &dpy); +#endif + + if (!dpy) + return; + + str = strstr(str, " "); + if (!str) + return; + + str++; + tmpnam(tmpPath); + + strcat(tmpPath, " "); + strcat(tmpPath, str); + + cdcreatecanvasMF(canvas, str); + if (!canvas->ctxcanvas) + return; + + { + cdCanvasMF* mfcanvas = (cdCanvasMF*)canvas->ctxcanvas; + mfcanvas->data = dpy; + } +} + +static void cdinittable(cdCanvas* canvas) +{ + cdinittableMF(canvas); + canvas->cxKillCanvas = cdkillcanvas; +} + + +static cdContext cdClipboardContext = +{ + CD_CAP_ALL & ~(CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | CD_CAP_FONTDIM | CD_CAP_TEXTSIZE), + 0, + cdcreatecanvas, + cdinittable, + cdplay, + NULL +}; + +cdContext* cdContextClipboard(void) +{ + return &cdClipboardContext; +} + + diff --git a/cd/src/x11/cdxdbuf.c b/cd/src/x11/cdxdbuf.c new file mode 100755 index 0000000..835687c --- /dev/null +++ b/cd/src/x11/cdxdbuf.c @@ -0,0 +1,168 @@ +/** \file + * \brief X-Windows Double Buffer Driver + * + * See Copyright Notice in cd.h + */ + +#include "cdx11.h" +#include "cddbuf.h" +#include +#include + + +static void cdkillcanvas (cdCtxCanvas* ctxcanvas) +{ + cdKillImage(ctxcanvas->image_dbuffer); + cdxKillCanvas(ctxcanvas); +} + +static void cddeactivate(cdCtxCanvas* ctxcanvas) +{ + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + /* this is done in the canvas_dbuffer context */ + cdCanvasDeactivate(canvas_dbuffer); +} + +static void cdflush(cdCtxCanvas* ctxcanvas) +{ + int old_writemode; + cdImage* image_dbuffer = ctxcanvas->image_dbuffer; + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + + /* flush the writing in the image */ + XFlush(ctxcanvas->dpy); + + /* this is done in the canvas_dbuffer context */ + /* Flush can be affected by Origin and Clipping, but not WriteMode */ + old_writemode = cdCanvasWriteMode(canvas_dbuffer, CD_REPLACE); + cdCanvasPutImageRect(canvas_dbuffer, image_dbuffer, 0, 0, 0, 0, 0, 0); + cdCanvasWriteMode(canvas_dbuffer, old_writemode); +} + +static void cdcreatecanvas(cdCanvas* canvas, cdCanvas* canvas_dbuffer) +{ + int w, h; + cdCtxCanvas* ctxcanvas; + cdImage* image_dbuffer; + cdCtxImage* ctximage; + + cdCanvasActivate(canvas_dbuffer); + w = canvas_dbuffer->w; + h = canvas_dbuffer->h; + if (w==0) w=1; + if (h==0) h=1; + + /* this is done in the canvas_dbuffer context */ + image_dbuffer = cdCanvasCreateImage(canvas_dbuffer, w, h); + if (!image_dbuffer) + return; + + ctximage = image_dbuffer->ctximage; + + /* Inicializa driver DBuffer */ + ctxcanvas = cdxCreateCanvas(canvas, ctximage->dpy, ctximage->scr, ctximage->img, ctximage->vis); + if (!ctxcanvas) + return; + + ctxcanvas->image_dbuffer = image_dbuffer; + ctxcanvas->canvas_dbuffer = canvas_dbuffer; +} + +static int cdactivate(cdCtxCanvas* ctxcanvas) +{ + int w, h; + cdCanvas* canvas_dbuffer = ctxcanvas->canvas_dbuffer; + + /* this is done in the canvas_dbuffer context */ + /* this will update canvas size */ + cdCanvasActivate(canvas_dbuffer); + w = canvas_dbuffer->w; + h = canvas_dbuffer->h; + if (w==0) w=1; + if (h==0) h=1; + + /* check if the size changed */ + if (w != ctxcanvas->image_dbuffer->w || + h != ctxcanvas->image_dbuffer->h) + { + cdCanvas* canvas = ctxcanvas->canvas; + /* save the current, if the rebuild fail */ + cdImage* old_image_dbuffer = ctxcanvas->image_dbuffer; + cdCtxCanvas* old_ctxcanvas = ctxcanvas; + + /* if the image is rebuild, the canvas that uses the image must be also rebuild */ + + /* rebuild the image and the canvas */ + canvas->ctxcanvas = NULL; + canvas->context->cxCreateCanvas(canvas, canvas_dbuffer); + if (!canvas->ctxcanvas) + { + canvas->ctxcanvas = old_ctxcanvas; + return CD_ERROR; + } + + /* remove the old image and canvas */ + cdKillImage(old_image_dbuffer); + cdxKillCanvas(old_ctxcanvas); + + ctxcanvas = canvas->ctxcanvas; + + /* update canvas attributes */ + canvas->cxBackground(ctxcanvas, canvas->background); + canvas->cxForeground(ctxcanvas, canvas->foreground); + canvas->cxBackOpacity(ctxcanvas, canvas->back_opacity); + canvas->cxWriteMode(ctxcanvas, canvas->write_mode); + canvas->cxLineStyle(ctxcanvas, canvas->line_style); + canvas->cxLineWidth(ctxcanvas, canvas->line_width); + canvas->cxLineCap(ctxcanvas, canvas->line_cap); + canvas->cxLineJoin(ctxcanvas, canvas->line_join); + canvas->cxHatch(ctxcanvas, canvas->hatch_style); + if (canvas->stipple) canvas->cxStipple(ctxcanvas, canvas->stipple_w, canvas->stipple_h, canvas->stipple); + if (canvas->pattern) canvas->cxPattern(ctxcanvas, canvas->pattern_w, canvas->pattern_h, canvas->pattern); + canvas->cxInteriorStyle(ctxcanvas, canvas->interior_style); + if (canvas->native_font[0] == 0) canvas->cxFont(ctxcanvas, canvas->font_type_face, canvas->font_style, canvas->font_size); + else canvas->cxNativeFont(ctxcanvas, canvas->native_font); +/* canvas->cxTextAlignment(ctxcanvas, canvas->text_alignment); */ +/* canvas->cxTextOrientation(ctxcanvas, canvas->text_orientation); */ + if (canvas->clip_mode == CD_CLIPAREA && canvas->cxClipArea) canvas->cxClipArea(ctxcanvas, canvas->clip_rect.xmin, canvas->clip_rect.xmax, canvas->clip_rect.ymin, canvas->clip_rect.ymax); +/* if (canvas->clip_mode == CD_CLIPAREA && canvas->cxFClipArea) canvas->cxFClipArea(ctxcanvas, canvas->clip_frect.xmin, canvas->clip_frect.xmax, canvas->clip_frect.ymin, canvas->clip_frect.ymax); */ + if (canvas->clip_mode == CD_CLIPPOLYGON && canvas->clip_poly) canvas->cxPoly(ctxcanvas, CD_CLIP, canvas->clip_poly, canvas->clip_poly_n); +/* if (canvas->clip_mode == CD_CLIPPOLYGON && canvas->clip_fpoly) canvas->cxFPoly(ctxcanvas, CD_CLIP, canvas->clip_fpoly, canvas->clip_poly_n); */ + if (canvas->clip_mode != CD_CLIPOFF) canvas->cxClip(ctxcanvas, canvas->clip_mode); + } + + return CD_OK; +} + +static void cdinittable(cdCanvas* canvas) +{ + cdxInitTable(canvas); + + canvas->cxActivate = cdactivate; + canvas->cxDeactivate = cddeactivate; + canvas->cxFlush = cdflush; + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdDBufferContext = +{ + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | + CD_CAP_FPRIMTIVES ), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + +cdContext* cdContextDBuffer(void) +{ + if (cdUseContextPlus(CD_QUERY)) + { + cdContext* ctx = cdGetContextPlus(CD_CTX_DBUFFER); + if (ctx != NULL) + return ctx; + } + + return &cdDBufferContext; +} diff --git a/cd/src/x11/cdximg.c b/cd/src/x11/cdximg.c new file mode 100755 index 0000000..8131f78 --- /dev/null +++ b/cd/src/x11/cdximg.c @@ -0,0 +1,52 @@ +/** \file + * \brief X-Windows Image Driver + * + * See Copyright Notice in cd.h + */ + +#include + +#include "cdx11.h" +#include "cdimage.h" + + +static void cdkillcanvas(cdCtxCanvas* ctxcanvas) +{ + cdxKillCanvas(ctxcanvas); +} + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + cdCtxImage *ctximage = ((cdImage*)data)->ctximage; + cdxCreateCanvas(canvas, ctximage->dpy, ctximage->scr, ctximage->img, ctximage->vis); +} + +static void cdinittable(cdCanvas* canvas) +{ + cdxInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; +} + +static cdContext cdImageContext = +{ + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_FPRIMTIVES ), + 0, + cdcreatecanvas, + cdinittable, + NULL, + NULL +}; + + +cdContext* cdContextImage(void) +{ + if (cdUseContextPlus(CD_QUERY)) + { + cdContext* ctx = cdGetContextPlus(CD_CTX_IMAGE); + if (ctx != NULL) + return ctx; + } + + return &cdImageContext; +} diff --git a/cd/src/x11/cdxnative.c b/cd/src/x11/cdxnative.c new file mode 100755 index 0000000..c708d20 --- /dev/null +++ b/cd/src/x11/cdxnative.c @@ -0,0 +1,165 @@ +/** \file + * \brief X-Windows Native Window Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "cdx11.h" +#include "cdnative.h" + + +int cdGetScreenColorPlanes(void) +{ + static int first = 1; + static int bpp; + + if (first) + { + int nitems; + XVisualInfo info; + Display* drv_display = XOpenDisplay(NULL); + + info.depth = 24; + if (XGetVisualInfo(drv_display, VisualDepthMask, &info, &nitems) != NULL) + { + bpp = 24; + XCloseDisplay(drv_display); + return bpp; + } + + info.depth = 16; + if (XGetVisualInfo(drv_display, VisualDepthMask, &info, &nitems) != NULL) + { + bpp = 16; + XCloseDisplay(drv_display); + return bpp; + } + + info.depth = 8; + if (XGetVisualInfo(drv_display, VisualDepthMask, &info, &nitems) != NULL) + { + bpp = 8; + XCloseDisplay(drv_display); + return bpp; + } + + info.depth = 4; + if (XGetVisualInfo(drv_display, VisualDepthMask, &info, &nitems) != NULL) + { + bpp = 4; + XCloseDisplay(drv_display); + return bpp; + } + + bpp = 2; + XCloseDisplay(drv_display); + + first = 0; + } + + return bpp; +} + +void cdGetScreenSize(int *width, int *height, double *width_mm, double *height_mm) +{ + static int first = 1; + static int dpy_width, dpy_height, dpy_width_mm, dpy_height_mm; + + if (first) + { + Display* drv_display = XOpenDisplay(NULL); + int drv_screen = DefaultScreen (drv_display); + + dpy_width = DisplayWidth(drv_display,drv_screen); + dpy_height = DisplayHeight(drv_display,drv_screen); + dpy_width_mm = DisplayWidthMM(drv_display,drv_screen); + dpy_height_mm = DisplayHeightMM(drv_display,drv_screen); + + XCloseDisplay(drv_display); + + first = 0; + } + + if (width) *width = dpy_width; + if (height) *height = dpy_height; + if (width_mm) *width_mm = dpy_width_mm; + if (height_mm) *height_mm = dpy_height_mm; +} + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + cdxKillCanvas(ctxcanvas); +} + +static int cdactivate(cdCtxCanvas *ctxcanvas) +{ + Window root; + int x, y; + unsigned int bw, d; + XGetGeometry(ctxcanvas->dpy, ctxcanvas->wnd, &root, &x, &y, + (unsigned int*)&ctxcanvas->canvas->w, (unsigned int*)&ctxcanvas->canvas->h, &bw, &d); + + ctxcanvas->canvas->w_mm = ((double)ctxcanvas->canvas->w) / ctxcanvas->canvas->xres; + ctxcanvas->canvas->h_mm = ((double)ctxcanvas->canvas->h) / ctxcanvas->canvas->yres; + + if (ctxcanvas->canvas->use_matrix) + ctxcanvas->canvas->cxTransform(ctxcanvas, ctxcanvas->canvas->matrix); + + return CD_OK; +} + +static void cdcreatecanvas(cdCanvas* canvas, void *data) +{ + char* data_str = (char*)data; + Window wnd; + Display *dpy; + XWindowAttributes wa; + +#ifdef SunOS_OLD + sscanf(data_str, "%d %lu", &dpy, &wnd); +#else + sscanf(data_str, "%p %lu", &dpy, &wnd); +#endif + + if (!dpy || !wnd) + return; + + XGetWindowAttributes(dpy, wnd, &wa); + cdxCreateCanvas(canvas, dpy, XScreenNumberOfScreen(wa.screen), wnd, wa.visual); +} + +static void cdinittable(cdCanvas* canvas) +{ + cdxInitTable(canvas); + + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxActivate = cdactivate; +} + +/******************************************************/ + +static cdContext cdNativeWindowContext = +{ + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_FPRIMTIVES ), + 1, + cdcreatecanvas, + cdinittable, + NULL, + NULL, +}; + + +cdContext* cdContextNativeWindow(void) +{ + if (cdUseContextPlus(CD_QUERY)) + { + cdContext* ctx = cdGetContextPlus(CD_CTX_NATIVEWINDOW); + if (ctx != NULL) + return ctx; + } + + return &cdNativeWindowContext; +} diff --git a/cd/src/x11/xvertex.c b/cd/src/x11/xvertex.c new file mode 100755 index 0000000..e1ca7ee --- /dev/null +++ b/cd/src/x11/xvertex.c @@ -0,0 +1,1431 @@ +/* ********************************************************************** */ + +/* xvertext 5.0, Copyright (c) 1993 Alan Richardson (mppa3@uk.ac.sussex.syma) +* +* Permission to use, copy, modify, and distribute this software and its +* documentation for any purpose and without fee is hereby granted, provided +* that the above copyright notice appear in all copies and that both the +* copyright notice and this permission notice appear in supporting +* documentation. All work developed as a consequence of the use of +* this program should duly acknowledge such use. No representations are +* made about the suitability of this software for any purpose. It is +* provided "as is" without express or implied warranty. +*/ + +#include +#include +#include + +#include +#include +#include +#include + +#include "xvertex.h" + + +/* ---------------------------------------------------------------------- */ + + +/* Make sure cache size is set */ + +#ifndef CACHE_SIZE_LIMIT +#define CACHE_SIZE_LIMIT 300 +#endif /*CACHE_SIZE_LIMIT */ + +/* Make sure a cache method is specified */ + +#ifndef CACHE_XIMAGES +#ifndef CACHE_BITMAPS +#define CACHE_BITMAPS +#endif /*CACHE_BITMAPS*/ +#endif /*CACHE_XIMAGES*/ + + +/* ---------------------------------------------------------------------- */ + + +/* Debugging macros */ + +#ifdef DEBUG +#define DEBUG_PRINT1(a) printf (a) +#define DEBUG_PRINT2(a, b) printf (a, b) +#define DEBUG_PRINT3(a, b, c) printf (a, b, c) +#define DEBUG_PRINT4(a, b, c, d) printf (a, b, c, d) +#define DEBUG_PRINT5(a, b, c, d, e) printf (a, b, c, d, e) +#else +#define DEBUG_PRINT1(a) (a) +#define DEBUG_PRINT2(a, b) (a, b) +#define DEBUG_PRINT3(a, b, c) (a, b, c) +#define DEBUG_PRINT4(a, b, c, d) (a, b, c, d) +#define DEBUG_PRINT5(a, b, c, d, e) (a, b, c, d, e) +#endif /*DEBUG*/ + + + +/* ---------------------------------------------------------------------- */ + + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + + +/* ---------------------------------------------------------------------- */ + + +/* A structure holding everything needed for a rotated string */ + +typedef struct rotated_text_item_template { + Pixmap bitmap; + XImage *ximage; + + char *text; + char *font_name; + Font fid; + double angle; + int align; + double magnify; + + int cols_in; + int rows_in; + int cols_out; + int rows_out; + + int nl; + int max_width; + double *corners_x; + double *corners_y; + + long int size; + int cached; + + struct rotated_text_item_template *next; +} RotatedTextItem; + +static RotatedTextItem *first_text_item=NULL; + + +/* ---------------------------------------------------------------------- */ + + +/* A structure holding current magnification and bounding box padding */ + +static struct style_template { + double magnify; + int bbx_pad; +} style={ + 1., + 0 +}; + + +/* ---------------------------------------------------------------------- */ + +static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font, double angle, const char *text, int len, int align); +static void XRotAddToLinkedList(Display *dpy, RotatedTextItem *item); +static XImage *XRotMagnifyImage(Display *dpy, XImage *ximage); +static void XRotFreeTextItem(Display *dpy, RotatedTextItem *item); + +/* ---------------------------------------------------------------------- */ + +/**************************************************************************/ +/* Routine to mimic `my_strdup()' (some machines don't have it) */ +/**************************************************************************/ + +static char *my_strdup(const char *str, int len) +{ + char *s; + + if(str==NULL) + return NULL; + + s=(char *)malloc((unsigned)(len+1)); + if(s!=NULL) + { + memcpy(s, str, len); + s[len]=0; + } + + return s; +} + +/**************************************************************************/ +/* Routine to replace `strtok' : this one returns a zero length string if */ +/* it encounters two consecutive delimiters */ +/**************************************************************************/ + +static char *my_strtok(char *str1, const char *str2) +{ + char *ret; + int i, j, stop, len2; + static int start, len; + static char *stext; + + if(str2==NULL) + return NULL; + + /* initialise if str1 not NULL */ + if(str1!=NULL) + { + start=0; + stext=str1; + len=strlen(str1); + } + + /* run out of tokens ? */ + if(start>=len) + return NULL; + + len2 = strlen(str2); + + /* loop through characters */ + for(i=start; ibyte_order=I->bitmap_bit_order=MSBFirst; + return I; +} + +/* ---------------------------------------------------------------------- */ + + +/* ---------------------------------------------------------------------- */ + + +/**************************************************************************/ +/* Draw a horizontal string in a quick fashion */ +/**************************************************************************/ + +static int XRotDrawHorizontalString(Display *dpy, XFontStruct *font, Drawable drawable, GC gc, int x, int y, const char *text, int len, int align, int bg) +{ + GC my_gc; + int nl=1, i; + int height; + int xp, yp; + char *str1, *str2, *str3; + char *str2_a="\0", *str2_b="\n\0"; + int dir, asc, desc; + XCharStruct overall; + + DEBUG_PRINT1("**\nHorizontal text.\n"); + + /* this gc has similar properties to the user's gc (including stipple) */ + my_gc=XCreateGC(dpy, drawable, 0, 0); + XCopyGC(dpy, gc, GCForeground|GCBackground|GCFunction|GCStipple|GCFillStyle| GCTileStipXOrigin|GCTileStipYOrigin|GCPlaneMask, my_gc); + XSetFont(dpy, my_gc, font->fid); + + /* count number of sections in string */ + if(align!=XR_LEFT) + for(i=0; iascent+font->descent; + + /* y position */ + if(align==XR_TLEFT || align==XR_TCENTRE || align==XR_TRIGHT) + yp=y+font->ascent; + else if(align==XR_MLEFT || align==XR_MCENTRE || align==XR_MRIGHT) + yp=y-nl*height/2+font->ascent; + else if(align==XR_BLEFT || align==XR_BCENTRE || align==XR_BRIGHT) + yp=y-nl*height+font->ascent; + else + yp=y; + + str1=my_strdup(text, len); + if(str1==NULL) + return 1; + + /* loop through each section in the string */ + str3=my_strtok(str1, str2); + do + { + int len3 = strlen(str3); + XTextExtents(font, str3, len3, &dir, &asc, &desc, &overall); + + /* where to draw section in x ? */ + if(align==XR_TLEFT || align==XR_MLEFT || align==XR_BLEFT || align==XR_LEFT) + xp=x; + else if(align==XR_TCENTRE || align==XR_MCENTRE || align==XR_BCENTRE || align==XR_CENTRE) + xp=x-overall.rbearing/2; + else + xp=x-overall.rbearing; + + /* draw string onto bitmap */ + if(!bg) + XDrawString(dpy, drawable, my_gc, xp, yp, str3, len3); + else + XDrawImageString(dpy, drawable, my_gc, xp, yp, str3, len3); + + /* move to next line */ + yp+=height; + + str3=my_strtok((char *)NULL, str2); + } while(str3!=NULL); + + free(str1); + XFreeGC(dpy, my_gc); + + return 0; +} + + +/* ---------------------------------------------------------------------- */ + + +/**************************************************************************/ +/* Query cache for a match with this font/text/angle/alignment */ +/* request, otherwise arrange for its creation */ +/**************************************************************************/ + +static RotatedTextItem *XRotRetrieveFromCache(Display *dpy, XFontStruct *font, double angle, const char *text, int len, int align) +{ + Font fid; + char *font_name=NULL; + unsigned long name_value; + RotatedTextItem *item=NULL; + RotatedTextItem *i1=first_text_item; + + /* get font name, if it exists */ + if(XGetFontProperty(font, XA_FONT, &name_value)) { + DEBUG_PRINT1("got font name OK\n"); + font_name=XGetAtomName(dpy, name_value); + fid=0; + } +#ifdef CACHE_FID + /* otherwise rely (unreliably?) on font ID */ + else { + DEBUG_PRINT1("can't get fontname, caching FID\n"); + font_name=NULL; + fid=font->fid; + } +#else + /* not allowed to cache font ID's */ + else { + DEBUG_PRINT1("can't get fontname, can't cache\n"); + font_name=NULL; + fid=0; + } +#endif /*CACHE_FID*/ + + /* look for a match in cache */ + + /* matching formula: + identical text; + identical fontname (if defined, font ID's if not); + angles close enough (<0.00001 here, could be smaller); + HORIZONTAL alignment matches, OR it's a one line string; + magnifications the same */ + + while(i1 && !item) + { + /* match everything EXCEPT fontname/ID */ + if(strcmp(text, i1->text)==0 && + fabs(angle-i1->angle)<0.00001 && + style.magnify==i1->magnify && + (i1->nl==1 || + ((align==0)?9:(align-1))%3== + ((i1->align==0)?9:(i1->align-1))%3)) + { + + /* now match fontname/ID */ + if(font_name!=NULL && i1->font_name!=NULL) + { + if(strcmp(font_name, i1->font_name)==0) + { + item=i1; + DEBUG_PRINT1("Matched against font names\n"); + } + else + i1=i1->next; + } +#ifdef CACHE_FID + else if(font_name==NULL && i1->font_name==NULL) + { + if(fid==i1->fid) + { + item=i1; + DEBUG_PRINT1("Matched against FID's\n"); + } + else + i1=i1->next; + } +#endif /*CACHE_FID*/ + else + i1=i1->next; + } + else + i1=i1->next; + } + + if(item) + DEBUG_PRINT1("**\nFound target in cache.\n"); + if(!item) + DEBUG_PRINT1("**\nNo match in cache.\n"); + + /* no match */ + if(!item) + { + /* create new item */ + item=XRotCreateTextItem(dpy, font, angle, text, len, align); + if(!item) + return NULL; + + /* record what it shows */ + item->text=my_strdup(text, len); + + /* fontname or ID */ + if(font_name!=NULL) + { + item->font_name=my_strdup(font_name, strlen(font_name)); + item->fid=0; + } + else + { + item->font_name=NULL; + item->fid=fid; + } + + item->angle=angle; + item->align=align; + item->magnify=style.magnify; + + /* cache it */ + XRotAddToLinkedList(dpy, item); + } + + if(font_name) + XFree(font_name); + + /* if XImage is cached, need to recreate the bitmap */ + +#ifdef CACHE_XIMAGES + { + GC depth_one_gc; + + /* create bitmap to hold rotated text */ + item->bitmap=XCreatePixmap(dpy, DefaultRootWindow(dpy), + item->cols_out, item->rows_out, 1); + + /* depth one gc */ + depth_one_gc=XCreateGC(dpy, item->bitmap, 0, 0); + XSetBackground(dpy, depth_one_gc, 0); + XSetForeground(dpy, depth_one_gc, 1); + + /* make the text bitmap from XImage */ + XPutImage(dpy, item->bitmap, depth_one_gc, item->ximage, 0, 0, 0, 0, + item->cols_out, item->rows_out); + + XFreeGC(dpy, depth_one_gc); + } +#endif /*CACHE_XIMAGES*/ + + return item; +} + + +/* ---------------------------------------------------------------------- */ + + +/**************************************************************************/ +/* Create a rotated text item */ +/**************************************************************************/ + +static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font, double angle, const char *text, int len, int align) +{ + RotatedTextItem *item=NULL; + Pixmap canvas; + GC font_gc; + XImage *I_in; + register int i, j; + char *str1, *str2, *str3; + char *str2_a="\0", *str2_b="\n\0"; + int height; + int byte_w_in, byte_w_out; + int xp, yp; + double sin_angle, cos_angle; + int it, jt; + double di, dj; + int ic=0; + double xl, xr, xinc; + int byte_out; + int dir, asc, desc; + XCharStruct overall; + int old_cols_in=0, old_rows_in=0; + + /* allocate memory */ + item=(RotatedTextItem *)malloc((unsigned)sizeof(RotatedTextItem)); + if(!item) + return NULL; + + /* count number of sections in string */ + item->nl=1; + if(align!=XR_LEFT) + for(i=0; inl++; + + /* ignore newline characters if not doing alignment */ + if(align==XR_LEFT) + str2=str2_a; + else + str2=str2_b; + + /* find width of longest section */ + str1=my_strdup(text, len); + if(str1==NULL) + return NULL; + + str3=my_strtok(str1, str2); + + XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc, &overall); + + item->max_width=overall.rbearing; + + /* loop through each section */ + do + { + str3=my_strtok((char *)NULL, str2); + + if(str3!=NULL) + { + XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc, &overall); + + if(overall.rbearing>item->max_width) + item->max_width=overall.rbearing; + } + } while(str3!=NULL); + + free(str1); + + /* overall font height */ + height=font->ascent+font->descent; + + /* dimensions horizontal text will have */ + item->cols_in=item->max_width; + item->rows_in=item->nl*height; + + /* bitmap for drawing on */ + canvas=XCreatePixmap(dpy, DefaultRootWindow(dpy), + item->cols_in, item->rows_in, 1); + + /* create a GC for the bitmap */ + font_gc=XCreateGC(dpy, canvas, 0, 0); + XSetBackground(dpy, font_gc, 0); + XSetFont(dpy, font_gc, font->fid); + + /* make sure the bitmap is blank */ + XSetForeground(dpy, font_gc, 0); + XFillRectangle(dpy, canvas, font_gc, 0, 0, + item->cols_in+1, item->rows_in+1); + XSetForeground(dpy, font_gc, 1); + + /* pre-calculate sin and cos */ + sin_angle=sin(angle); + cos_angle=cos(angle); + + if (fabs(sin_angle)==1.0) cos_angle=0; + if (fabs(cos_angle)==1.0) sin_angle=0; + + /* text background will be drawn using XFillPolygon */ + item->corners_x= + (double *)malloc((unsigned)(4*item->nl*sizeof(double))); + if(!item->corners_x) + return NULL; + + item->corners_y= + (double *)malloc((unsigned)(4*item->nl*sizeof(double))); + if(!item->corners_y) + return NULL; + + /* draw text horizontally */ + + /* start at top of bitmap */ + yp=font->ascent; + + str1=my_strdup(text, len); + if(str1==NULL) + return NULL; + + str3=my_strtok(str1, str2); + + /* loop through each section in the string */ + do + { + XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc, &overall); + + /* where to draw section in x ? */ + if(align==XR_TLEFT || align==XR_MLEFT || align==XR_BLEFT || align==XR_LEFT) + xp=0; + else if(align==XR_TCENTRE || align==XR_MCENTRE || align==XR_BCENTRE || align==XR_CENTRE) + xp=(item->max_width-overall.rbearing)/2; + else + xp=item->max_width-overall.rbearing; + + /* draw string onto bitmap */ + XDrawString(dpy, canvas, font_gc, xp, yp, str3, strlen(str3)); + + /* keep a note of corner positions of this string */ + item->corners_x[ic]=((double)xp-(double)item->cols_in/2)*style.magnify; + item->corners_y[ic]=((double)(yp-font->ascent)-(double)item->rows_in/2) + *style.magnify; + item->corners_x[ic+1]=item->corners_x[ic]; + item->corners_y[ic+1]=item->corners_y[ic]+(double)height*style.magnify; + item->corners_x[item->nl*4-1-ic]=item->corners_x[ic]+ + (double)overall.rbearing*style.magnify; + item->corners_y[item->nl*4-1-ic]=item->corners_y[ic]; + item->corners_x[item->nl*4-2-ic]= + item->corners_x[item->nl*4-1-ic]; + item->corners_y[item->nl*4-2-ic]=item->corners_y[ic+1]; + + ic+=2; + + /* move to next line */ + yp+=height; + + str3=my_strtok((char *)NULL, str2); + } while(str3!=NULL); + + free(str1); + + /* create image to hold horizontal text */ + I_in=MakeXImage(dpy, item->cols_in, item->rows_in); + if(I_in==NULL) + return NULL; + + /* extract horizontal text */ + XGetSubImage(dpy, canvas, 0, 0, item->cols_in, item->rows_in, 1, XYPixmap, I_in, 0, 0); + I_in->format=XYBitmap; + + /* magnify horizontal text */ + if(style.magnify!=1.) + { + I_in=XRotMagnifyImage(dpy, I_in); + + old_cols_in=item->cols_in; + old_rows_in=item->rows_in; + item->cols_in=(double)item->cols_in*style.magnify; + item->rows_in=(double)item->rows_in*style.magnify; + } + + /* how big will rotated text be ? */ + item->cols_out=fabs((double)item->rows_in*sin_angle) + + fabs((double)item->cols_in*cos_angle) +0.99999 +2; + + item->rows_out=fabs((double)item->rows_in*cos_angle) + + fabs((double)item->cols_in*sin_angle) +0.99999 +2; + + if(item->cols_out%2==0) + item->cols_out++; + + if(item->rows_out%2==0) + item->rows_out++; + + /* create image to hold rotated text */ + item->ximage=MakeXImage(dpy, item->cols_out, item->rows_out); + if(item->ximage==NULL) + return NULL; + + byte_w_in=(item->cols_in-1)/8+1; + byte_w_out=(item->cols_out-1)/8+1; + + /* we try to make this bit as fast as possible - which is why it looks + a bit over-the-top */ + + /* vertical distance from centre */ + dj=0.5-(double)item->rows_out/2; + + /* where abouts does text actually lie in rotated image? */ + if(angle==0 || angle==M_PI/2 || angle==M_PI || angle==3*M_PI/2) + { + xl=0; + xr=(double)item->cols_out; + xinc=0; + } + else if(anglecols_out/2+ + (dj-(double)item->rows_in/(2*cos_angle))/ + tan(angle)-2; + + xr=(double)item->cols_out/2+ + (dj+(double)item->rows_in/(2*cos_angle))/ + tan(angle)+2; + + xinc=1./tan(angle); + } + else + { + xl=(double)item->cols_out/2+ + (dj+(double)item->rows_in/(2*cos_angle))/ + tan(angle)-2; + + xr=(double)item->cols_out/2+ + (dj-(double)item->rows_in/(2*cos_angle))/ + tan(angle)+2; + + xinc=1./tan(angle); + } + + /* loop through all relevent bits in rotated image */ + for(j=0; jrows_out; j++) + { + /* no point re-calculating these every pass */ + di=(double)((xl<0)?0:(int)xl)+0.5-(double)item->cols_out/2; + byte_out=(item->rows_out-j-1)*byte_w_out; + + /* loop through meaningful columns */ + for(i=((xl<0)?0:(int)xl);i<((xr>=item->cols_out)?item->cols_out:(int)xr); i++) + { + /* rotate coordinates */ + it=(double)item->cols_in/2 + ( di*cos_angle + dj*sin_angle); + jt=(double)item->rows_in/2 - (-di*sin_angle + dj*cos_angle); + + /* set pixel if required */ + if(it>=0 && itcols_in && jt>=0 && jtrows_in) + if((I_in->data[jt*byte_w_in+it/8] & 128>>(it%8))>0) + item->ximage->data[byte_out+i/8]|=128>>i%8; + + di+=1; + } + + dj+=1; + xl+=xinc; + xr+=xinc; + } + + XDestroyImage(I_in); + + if(style.magnify!=1.) + { + item->cols_in=old_cols_in; + item->rows_in=old_rows_in; + } + + +#ifdef CACHE_BITMAPS + + /* create a bitmap to hold rotated text */ + item->bitmap=XCreatePixmap(dpy, DefaultRootWindow(dpy), + item->cols_out, item->rows_out, 1); + + /* make the text bitmap from XImage */ + XPutImage(dpy, item->bitmap, font_gc, item->ximage, 0, 0, 0, 0, + item->cols_out, item->rows_out); + + XDestroyImage(item->ximage); + +#endif /*CACHE_BITMAPS*/ + + XFreeGC(dpy, font_gc); + XFreePixmap(dpy, canvas); + + return item; +} + + +/* ---------------------------------------------------------------------- */ + + +/**************************************************************************/ +/* Adds a text item to the end of the cache, removing as many items */ +/* from the front as required to keep cache size below limit */ +/**************************************************************************/ + +static void XRotAddToLinkedList(Display *dpy, RotatedTextItem *item) +{ + + static long int current_size=0; + static RotatedTextItem *last=NULL; + RotatedTextItem *i1=first_text_item, *i2=NULL; + +#ifdef CACHE_BITMAPS + + /* I don't know how much memory a pixmap takes in the server - + probably this + a bit more we can't account for */ + + item->size=((item->cols_out-1)/8+1)*item->rows_out; + +#else + + /* this is pretty much the size of a RotatedTextItem */ + + item->size=((item->cols_out-1)/8+1)*item->rows_out + + sizeof(XImage) + strlen(item->text) + + item->nl*8*sizeof(double) + sizeof(RotatedTextItem); + + if(item->font_name!=NULL) + item->size+=strlen(item->font_name); + else + item->size+=sizeof(Font); + +#endif /*CACHE_BITMAPS */ + +#ifdef DEBUG + /* count number of items in cache, for debugging */ + { + int i=0; + + while(i1) { + i++; + i1=i1->next; + } + DEBUG_PRINT2("Cache has %d items.\n", i); + i1=first_text_item; + } +#endif + + DEBUG_PRINT4("current cache size=%ld, new item=%ld, limit=%d\n", + current_size, item->size, CACHE_SIZE_LIMIT*1024); + + /* if this item is bigger than whole cache, forget it */ + if(item->size>CACHE_SIZE_LIMIT*1024) { + DEBUG_PRINT1("Too big to cache\n\n"); + item->cached=0; + return; + } + + /* remove elements from cache as needed */ + while(i1 && current_size+item->size>CACHE_SIZE_LIMIT*1024) { + + DEBUG_PRINT2("Removed %ld bytes\n", i1->size); + + if(i1->font_name!=NULL) + DEBUG_PRINT5(" (`%s'\n %s\n angle=%f align=%d)\n", + i1->text, i1->font_name, i1->angle, i1->align); + +#ifdef CACHE_FID + if(i1->font_name==NULL) + DEBUG_PRINT5(" (`%s'\n FID=%ld\n angle=%f align=%d)\n", + i1->text, i1->fid, i1->angle, i1->align); +#endif /*CACHE_FID*/ + + current_size-=i1->size; + + i2=i1->next; + + /* free resources used by the unlucky item */ + XRotFreeTextItem(dpy, i1); + + /* remove it from linked list */ + first_text_item=i2; + i1=i2; + } + + /* add new item to end of linked list */ + if(first_text_item==NULL) { + item->next=NULL; + first_text_item=item; + last=item; + } + else { + item->next=NULL; + last->next=item; + last=item; + } + + /* new cache size */ + current_size+=item->size; + + item->cached=1; + + DEBUG_PRINT1("Added item to cache.\n"); +} + + +/* ---------------------------------------------------------------------- */ + + +/**************************************************************************/ +/* Free the resources used by a text item */ +/**************************************************************************/ + +static void XRotFreeTextItem(Display *dpy, RotatedTextItem *item) +{ + free(item->text); + + if(item->font_name!=NULL) + free(item->font_name); + + free((char *)item->corners_x); + free((char *)item->corners_y); + +#ifdef CACHE_BITMAPS + XFreePixmap(dpy, item->bitmap); +#else + XDestroyImage(item->ximage); +#endif /* CACHE_BITMAPS */ + + free((char *)item); +} + + +/* ---------------------------------------------------------------------- */ + + +/**************************************************************************/ +/* Magnify an XImage using bilinear interpolation */ +/**************************************************************************/ + +static XImage *XRotMagnifyImage(Display *dpy, XImage *ximage) +{ + int i, j; + double x, y; + double u,t; + XImage *I_out; + int cols_in, rows_in; + int cols_out, rows_out; + register int i2, j2; + double z1, z2, z3, z4; + int byte_width_in, byte_width_out; + double mag_inv; + + /* size of input image */ + cols_in=ximage->width; + rows_in=ximage->height; + + /* size of final image */ + cols_out=(double)cols_in*style.magnify; + rows_out=(double)rows_in*style.magnify; + + /* this will hold final image */ + I_out=MakeXImage(dpy, cols_out, rows_out); + if(I_out==NULL) + return NULL; + + /* width in bytes of input, output images */ + byte_width_in=(cols_in-1)/8+1; + byte_width_out=(cols_out-1)/8+1; + + /* for speed */ + mag_inv=1./style.magnify; + + y=0.; + + /* loop over magnified image */ + for(j2=0; j2data[j*byte_width_in+i/8] & 128>>(i%8))>0; + z2=z1; + z3=(ximage->data[(j+1)*byte_width_in+i/8] & 128>>(i%8))>0; + z4=z3; + } + /* top edge */ + else if(i!=cols_in-1 && j==rows_in-1) + { + t=x-(double)i; + u=0; + + z1=(ximage->data[j*byte_width_in+i/8] & 128>>(i%8))>0; + z2=(ximage->data[j*byte_width_in+(i+1)/8] & 128>>((i+1)%8))>0; + z3=z2; + z4=z1; + } + /* top right corner */ + else if(i==cols_in-1 && j==rows_in-1) + { + u=0; + t=0; + + z1=(ximage->data[j*byte_width_in+i/8] & 128>>(i%8))>0; + z2=z1; + z3=z1; + z4=z1; + } + /* somewhere `safe' */ + else + { + t=x-(double)i; + u=y-(double)j; + + z1=(ximage->data[j*byte_width_in+i/8] & 128>>(i%8))>0; + z2=(ximage->data[j*byte_width_in+(i+1)/8] & 128>>((i+1)%8))>0; + z3=(ximage->data[(j+1)*byte_width_in+(i+1)/8] & + 128>>((i+1)%8))>0; + z4=(ximage->data[(j+1)*byte_width_in+i/8] & 128>>(i%8))>0; + } + + /* if interpolated value is greater than 0.5, set bit */ + if(((1-t)*(1-u)*z1 + t*(1-u)*z2 + t*u*z3 + (1-t)*u*z4)>0.5) + I_out->data[j2*byte_width_out+i2/8]|=128>>i2%8; + + x+=mag_inv; + } + y+=mag_inv; + } + + /* destroy original */ + XDestroyImage(ximage); + + /* return big image */ + return I_out; +} + + + + +/**************************************************************************/ +/* Return version/copyright information */ +/**************************************************************************/ + +double XRotVersion(char* str, int n) +{ + if(str!=NULL) + strncpy(str, XV_COPYRIGHT, n); + return XV_VERSION; +} + + +/* ---------------------------------------------------------------------- */ + + +/**************************************************************************/ +/* Set the font magnification factor for all subsequent operations */ +/**************************************************************************/ + +void XRotSetMagnification(double m) +{ + if(m>0.) + style.magnify=m; +} + + +/* ---------------------------------------------------------------------- */ + + +/**************************************************************************/ +/* Set the padding used when calculating bounding boxes */ +/**************************************************************************/ + +void XRotSetBoundingBoxPad(int p) +{ + if(p>=0) + style.bbx_pad=p; +} + + +/* ---------------------------------------------------------------------- */ + + +/**************************************************************************/ +/* Calculate the bounding box some text will have when painted */ +/**************************************************************************/ + +XPoint *XRotTextExtents(Display* dpy, XFontStruct* font, double angle, int x, int y, const char* text, int len, int align) +{ + register int i; + char *str1, *str2, *str3; + char *str2_a="\0", *str2_b="\n\0"; + int height; + double sin_angle, cos_angle; + int nl, max_width; + int cols_in, rows_in; + double hot_x, hot_y; + XPoint *xp_in, *xp_out; + int dir, asc, desc; + XCharStruct overall; + + /* manipulate angle to 0<=angle<360 degrees */ + while(angle<0) + angle+=360; + + while(angle>360) + angle-=360; + + angle*=M_PI/180; + + /* count number of sections in string */ + nl=1; + if(align!=XR_LEFT) + for(i=0; imax_width) + max_width=overall.rbearing; + } + } while(str3!=NULL); + + free(str1); + + /* overall font height */ + height=font->ascent+font->descent; + + /* dimensions horizontal text will have */ + cols_in=max_width; + rows_in=nl*height; + + /* pre-calculate sin and cos */ + sin_angle=sin(angle); + cos_angle=cos(angle); + + /* y position */ + if(align==XR_TLEFT || align==XR_TCENTRE || align==XR_TRIGHT) + hot_y=(double)rows_in/2*style.magnify; + else if(align==XR_MLEFT || align==XR_MCENTRE || align==XR_MRIGHT) + hot_y=0; + else if(align==XR_BLEFT || align==XR_BCENTRE || align==XR_BRIGHT) + hot_y=-(double)rows_in/2*style.magnify; + else + hot_y=-((double)rows_in/2-(double)font->descent)*style.magnify; + + /* x position */ + if(align==XR_TLEFT || align==XR_MLEFT || align==XR_BLEFT || align==XR_LEFT) + hot_x=-(double)max_width/2*style.magnify; + else if(align==XR_TCENTRE || align==XR_MCENTRE || align==XR_BCENTRE || align==XR_CENTRE) + hot_x=0; + else + hot_x=(double)max_width/2*style.magnify; + + /* reserve space for XPoints */ + xp_in=(XPoint *)malloc((unsigned)(5*sizeof(XPoint))); + if(!xp_in) + return NULL; + + xp_out=(XPoint *)malloc((unsigned)(5*sizeof(XPoint))); + if(!xp_out) + return NULL; + + /* bounding box when horizontal, relative to bitmap centre */ + xp_in[0].x=-(double)cols_in*style.magnify/2-style.bbx_pad; + xp_in[0].y= (double)rows_in*style.magnify/2+style.bbx_pad; + xp_in[1].x= (double)cols_in*style.magnify/2+style.bbx_pad; + xp_in[1].y= (double)rows_in*style.magnify/2+style.bbx_pad; + xp_in[2].x= (double)cols_in*style.magnify/2+style.bbx_pad; + xp_in[2].y=-(double)rows_in*style.magnify/2-style.bbx_pad; + xp_in[3].x=-(double)cols_in*style.magnify/2-style.bbx_pad; + xp_in[3].y=-(double)rows_in*style.magnify/2-style.bbx_pad; + xp_in[4].x=xp_in[0].x; + xp_in[4].y=xp_in[0].y; + + /* rotate and translate bounding box */ + for(i=0; i<5; i++) + { + xp_out[i].x=(double)x + ( ((double)xp_in[i].x-hot_x)*cos_angle + + ((double)xp_in[i].y+hot_y)*sin_angle); + + xp_out[i].y=(double)y + (-((double)xp_in[i].x-hot_x)*sin_angle + + ((double)xp_in[i].y+hot_y)*cos_angle); + } + + free((char *)xp_in); + + return xp_out; +} + +/* ---------------------------------------------------------------------- */ + +/**************************************************************************/ +/* Aligns and paints a rotated string */ +/**************************************************************************/ + +int XRotDrawString(Display* dpy, XFontStruct* font, double angle, Drawable drawable, GC gc, int x, int y, const char* text, int len, int align, int bg) +{ + int i; + GC my_gc; + int xp, yp; + double hot_x, hot_y; + double hot_xp, hot_yp; + double sin_angle, cos_angle; + RotatedTextItem *item; + Pixmap bitmap_to_paint; + + /* manipulate angle to 0<=angle<360 degrees */ + while(angle<0) + angle+=360; + + while(angle>=360) + angle-=360; + + angle*=M_PI/180; + + /* horizontal text made easy */ + if(angle==0. && style.magnify==1.) + return(XRotDrawHorizontalString(dpy, font, drawable, gc, x, y, text, len, align, bg)); + + /* get a rotated bitmap */ + item=XRotRetrieveFromCache(dpy, font, angle, text, len, align); + if(item==NULL) + return 0; + + /* this gc has similar properties to the user's gc */ + my_gc=XCreateGC(dpy, drawable, 0, 0); + XCopyGC(dpy, gc, GCForeground|GCBackground|GCFunction|GCPlaneMask, my_gc); + + /* alignment : which point (hot_x, hot_y) relative to bitmap centre + coincides with user's specified point? */ + + /* y position */ + if(align==XR_TLEFT || align==XR_TCENTRE || align==XR_TRIGHT) + hot_y=(double)item->rows_in/2*style.magnify; + else if(align==XR_MLEFT || align==XR_MCENTRE || align==XR_MRIGHT) + hot_y=0; + else if(align==XR_BLEFT || align==XR_BCENTRE || align==XR_BRIGHT) + hot_y=-(double)item->rows_in/2*style.magnify; + else + hot_y=-((double)item->rows_in/2-(double)font->descent)*style.magnify; + + /* x position */ + if(align==XR_TLEFT || align==XR_MLEFT || align==XR_BLEFT || align==XR_LEFT) + hot_x=-(double)item->max_width/2*style.magnify; + else if(align==XR_TCENTRE || align==XR_MCENTRE || align==XR_BCENTRE || align==XR_CENTRE) + hot_x=0; + else + hot_x=(double)item->max_width/2*style.magnify; + + /* pre-calculate sin and cos */ + sin_angle=sin(angle); + cos_angle=cos(angle); + + /* rotate hot_x and hot_y around bitmap centre */ + hot_xp= hot_x*cos_angle - hot_y*sin_angle; + hot_yp= hot_x*sin_angle + hot_y*cos_angle; + + /* text background will be drawn using XFillPolygon */ + if(bg) + { + GC depth_one_gc; + XPoint *xpoints; + Pixmap empty_stipple; + + /* reserve space for XPoints */ + xpoints=(XPoint *)malloc((unsigned)(4*item->nl*sizeof(XPoint))); + if(!xpoints) + return 1; + + /* rotate corner positions */ + for(i=0; i<4*item->nl; i++) + { + xpoints[i].x=(double)x + ( (item->corners_x[i]-hot_x)*cos_angle + + (item->corners_y[i]+hot_y)*sin_angle); + + xpoints[i].y=(double)y + (-(item->corners_x[i]-hot_x)*sin_angle + + (item->corners_y[i]+hot_y)*cos_angle); + } + + /* we want to swap foreground and background colors here; + XGetGCValues() is only available in R4+ */ + + empty_stipple=XCreatePixmap(dpy, drawable, 1, 1, 1); + + depth_one_gc=XCreateGC(dpy, empty_stipple, 0, 0); + XSetForeground(dpy, depth_one_gc, 0); + XFillRectangle(dpy, empty_stipple, depth_one_gc, 0, 0, 2, 2); + + XSetStipple(dpy, my_gc, empty_stipple); + XSetFillStyle(dpy, my_gc, FillOpaqueStippled); + + XFillPolygon(dpy, drawable, my_gc, xpoints, 4*item->nl, Nonconvex, + CoordModeOrigin); + + /* free our resources */ + free((char *)xpoints); + XFreeGC(dpy, depth_one_gc); + XFreePixmap(dpy, empty_stipple); + } + + /* where should top left corner of bitmap go ? */ + xp=(double)x-((double)item->cols_out/2 +hot_xp); + yp=(double)y-((double)item->rows_out/2 -hot_yp); + + /* by default we draw the rotated bitmap, solid */ + bitmap_to_paint=item->bitmap; + + /* handle user stippling */ +#ifndef X11R3 + { + GC depth_one_gc; + XGCValues values; + Pixmap new_bitmap, inverse; + + /* try and get some GC properties */ + if(XGetGCValues(dpy, gc, + GCStipple|GCFillStyle|GCForeground|GCBackground| + GCTileStipXOrigin|GCTileStipYOrigin, + &values)) + { + /* only do this if stippling requested */ + if((values.fill_style==FillStippled || + values.fill_style==FillOpaqueStippled) && !bg) + { + /* opaque stipple: draw rotated text in background colour */ + if(values.fill_style==FillOpaqueStippled) + { + XSetForeground(dpy, my_gc, values.background); + XSetFillStyle(dpy, my_gc, FillStippled); + XSetStipple(dpy, my_gc, item->bitmap); + XSetTSOrigin(dpy, my_gc, xp, yp); + XFillRectangle(dpy, drawable, my_gc, xp, yp, + item->cols_out, item->rows_out); + XSetForeground(dpy, my_gc, values.foreground); + } + + /* this will merge the rotated text and the user's stipple */ + new_bitmap=XCreatePixmap(dpy, drawable, + item->cols_out, item->rows_out, 1); + + /* create a GC */ + depth_one_gc=XCreateGC(dpy, new_bitmap, 0, 0); + XSetForeground(dpy, depth_one_gc, 1); + XSetBackground(dpy, depth_one_gc, 0); + + /* set the relative stipple origin */ + XSetTSOrigin(dpy, depth_one_gc, + values.ts_x_origin-xp, values.ts_y_origin-yp); + + /* fill the whole bitmap with the user's stipple */ + XSetStipple(dpy, depth_one_gc, values.stipple); + XSetFillStyle(dpy, depth_one_gc, FillOpaqueStippled); + XFillRectangle(dpy, new_bitmap, depth_one_gc, + 0, 0, item->cols_out, item->rows_out); + + /* set stipple origin back to normal */ + XSetTSOrigin(dpy, depth_one_gc, 0, 0); + + /* this will contain an inverse copy of the rotated text */ + inverse=XCreatePixmap(dpy, drawable, + item->cols_out, item->rows_out, 1); + + /* invert text */ + XSetFillStyle(dpy, depth_one_gc, FillSolid); + XSetFunction(dpy, depth_one_gc, GXcopyInverted); + XCopyArea(dpy, item->bitmap, inverse, depth_one_gc, + 0, 0, item->cols_out, item->rows_out, 0, 0); + + /* now delete user's stipple everywhere EXCEPT on text */ + XSetForeground(dpy, depth_one_gc, 0); + XSetBackground(dpy, depth_one_gc, 1); + XSetStipple(dpy, depth_one_gc, inverse); + XSetFillStyle(dpy, depth_one_gc, FillStippled); + XSetFunction(dpy, depth_one_gc, GXcopy); + XFillRectangle(dpy, new_bitmap, depth_one_gc, + 0, 0, item->cols_out, item->rows_out); + + /* free resources */ + XFreePixmap(dpy, inverse); + XFreeGC(dpy, depth_one_gc); + + /* this is the new bitmap */ + bitmap_to_paint=new_bitmap; + } + } + } +#endif /*X11R3*/ + + /* paint text using stipple technique */ + XSetFillStyle(dpy, my_gc, FillStippled); + XSetStipple(dpy, my_gc, bitmap_to_paint); + XSetTSOrigin(dpy, my_gc, xp, yp); + XFillRectangle(dpy, drawable, my_gc, xp, yp, + item->cols_out, item->rows_out); + + /* free our resources */ + XFreeGC(dpy, my_gc); + + /* stippled bitmap no longer needed */ + if(bitmap_to_paint!=item->bitmap) + XFreePixmap(dpy, bitmap_to_paint); + +#ifdef CACHE_XIMAGES + XFreePixmap(dpy, item->bitmap); +#endif /*CACHE_XIMAGES*/ + + /* if item isn't cached, destroy it completely */ + if(!item->cached) + XRotFreeTextItem(dpy,item); + + /* we got to the end OK! */ + return 0; +} + + diff --git a/cd/src/x11/xvertex.h b/cd/src/x11/xvertex.h new file mode 100755 index 0000000..8bb247d --- /dev/null +++ b/cd/src/x11/xvertex.h @@ -0,0 +1,31 @@ +/* ************************************************************************ */ +/* Header file for the `xvertext 5.0' routines. + + Copyright (c) 1993 Alan Richardson (mppa3@uk.ac.sussex.syma) */ +/* ************************************************************************ */ + +#ifndef __XVERTEXT_H +#define __XVERTEXT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define XV_VERSION 5.0 +#define XV_COPYRIGHT \ + "xvertext routines Copyright (c) 1993 Alan Richardson" + +/* text alignment */ +enum {XR_LEFT, XR_CENTRE, XR_RIGHT, XR_TLEFT, XR_TCENTRE, XR_TRIGHT, XR_MLEFT, XR_MCENTRE, XR_MRIGHT, XR_BLEFT, XR_BCENTRE, XR_BRIGHT}; + +double XRotVersion(char* str, int n); +void XRotSetMagnification(double m); +void XRotSetBoundingBoxPad(int p); +XPoint *XRotTextExtents(Display* dpy, XFontStruct* font, double angle, int x, int y, const char* text, int len, int align); +int XRotDrawString(Display* dpy, XFontStruct* font, double angle, Drawable drawable, GC gc, int x, int y, const char* text, int len, int align, int bg); + +#ifdef __cplusplus +} +#endif + +#endif /* _XVERTEXT_INCLUDED_ */ diff --git a/cd/src/xrender/cdxrender.c b/cd/src/xrender/cdxrender.c new file mode 100755 index 0000000..4dc69e2 --- /dev/null +++ b/cd/src/xrender/cdxrender.c @@ -0,0 +1,1137 @@ +/** file + * brief XRender Base Driver + * + * See Copyright Notice in cd.h + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include "cdx11.h" +#include "cddbuf.h" +#include "cdimage.h" +#include "cdnative.h" +#include "truetype.h" +#include "sim.h" + +#include + +#define NUM_HATCHES 6 +static unsigned char hatches[NUM_HATCHES][8] = { + {0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00}, /* HORIZONTAL */ + {0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22}, /* VERTICAL */ + {0x08,0x10,0x20,0x40,0x80,0x01,0x02,0x04}, /* FDIAGONAL */ + {0x10,0x08,0x04,0x02,0x01,0x80,0x40,0x20}, /* BDIAGONAL */ + {0x22,0x22,0xFF,0x22,0x22,0x22,0xFF,0x22}, /* CROSS */ + {0x18,0x18,0x24,0x42,0x81,0x81,0x42,0x24} /* DIAGCROSS */ +}; + +struct _cdxContextPlus +{ + XftDraw* draw; + Picture solid_pic, pattern_pic, fill_picture, dst_picture; + XftFont *font, + *flat_font; /* used only for text size when orientation!=0 */ + XRenderPictFormat* maskFormat; + + int antialias; + +#if (RENDER_MAJOR>0 || RENDER_MINOR>=10) + XLinearGradient linegradient; + Picture linegradient_pic; +#endif + + void (*cxKillCanvas)(cdCtxCanvas* ctxcanvas); +}; + + +static void xrInitColor(XRenderColor *rendercolor, long color) +{ + rendercolor->red = cdCOLOR8TO16(cdRed(color)); + rendercolor->green = cdCOLOR8TO16(cdGreen(color)); + rendercolor->blue = cdCOLOR8TO16(cdBlue(color)); + rendercolor->alpha = cdCOLOR8TO16(cdAlpha(color)); +} + +static void xrPolyFill(cdCtxCanvas* ctxcanvas, XPointDouble* fpoly, int n) +{ + XRenderCompositeDoublePoly(ctxcanvas->dpy, PictOpOver, ctxcanvas->ctxplus->fill_picture, + ctxcanvas->ctxplus->dst_picture, ctxcanvas->ctxplus->maskFormat, 0, 0, 0, 0, + fpoly, n, ctxcanvas->canvas->fill_mode==CD_EVENODD?EvenOddRule:WindingRule); +} + +static void xrLine(cdCtxCanvas *ctxcanvas, XPointDouble* fpoly) +{ + XRenderCompositeDoublePoly(ctxcanvas->dpy, PictOpOver, ctxcanvas->ctxplus->solid_pic, + ctxcanvas->ctxplus->dst_picture, ctxcanvas->ctxplus->maskFormat, 0, 0, 0, 0, + fpoly, 4, 0); +} + +static void xrSetClipMask(cdCtxCanvas* ctxcanvas, Pixmap clip_mask) +{ + XRenderPictureAttributes pa; + pa.clip_mask = clip_mask; + XRenderChangePicture(ctxcanvas->dpy, ctxcanvas->ctxplus->dst_picture, CPClipMask, &pa); +} + +static void xrSetClipArea(cdCtxCanvas* ctxcanvas) +{ + cdRect* clip_rect = &ctxcanvas->canvas->clip_rect; + XRectangle rect; + rect.x = (short)clip_rect->xmin; + rect.y = (short)clip_rect->ymin; + rect.width = (unsigned short)(clip_rect->xmax - clip_rect->xmin + 1); + rect.height = (unsigned short)(clip_rect->ymax - clip_rect->ymin + 1); + XRenderSetPictureClipRectangles(ctxcanvas->dpy, ctxcanvas->ctxplus->dst_picture, 0, 0, &rect, 1); +} + +static int cdclip(cdCtxCanvas *ctxcanvas, int clip_mode) +{ + switch (clip_mode) + { + case CD_CLIPOFF: + xrSetClipMask(ctxcanvas, None); + break; + case CD_CLIPAREA: + xrSetClipArea(ctxcanvas); + break; + case CD_CLIPPOLYGON: + if (ctxcanvas->clip_polygon) + xrSetClipMask(ctxcanvas, ctxcanvas->clip_polygon); + break; + case CD_CLIPREGION: + if (ctxcanvas->new_region) + xrSetClipMask(ctxcanvas, ctxcanvas->new_region); + break; + } + + /* call original method, to set the clipping for the PutImage* methods */ + cdxClip(ctxcanvas, clip_mode); + + return clip_mode; +} + +static void cdcliparea(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + if (ctxcanvas->canvas->clip_mode == CD_CLIPAREA) + { + ctxcanvas->canvas->clip_rect.xmin = xmin; + ctxcanvas->canvas->clip_rect.ymin = ymin; + ctxcanvas->canvas->clip_rect.xmax = xmax; + ctxcanvas->canvas->clip_rect.ymax = ymax; + cdclip(ctxcanvas, CD_CLIPAREA); + } +} + +static void cdfline(cdCtxCanvas *ctxcanvas, double x1, double y1, double x2, double y2) +{ + int ix1, ix2, iy1, iy2; + +#ifndef CD_XRENDER_MATRIX + if (ctxcanvas->canvas->use_matrix) + { + cdfMatrixTransformPoint(ctxcanvas->xmatrix, x1, y1, &x1, &y1); + cdfMatrixTransformPoint(ctxcanvas->xmatrix, x2, y2, &x2, &y2); + } +#endif + + ix1 = _cdRound(x1); + ix2 = _cdRound(x2); + iy1 = _cdRound(y1); + iy2 = _cdRound(y2); + if ((ctxcanvas->canvas->line_width == 1) && + ((ix1 == ix2 && ix1==x1) || (iy1 == iy2 && iy1==y1))) + { + XRenderColor rendercolor; + xrInitColor(&rendercolor, ctxcanvas->canvas->foreground); + if (ix2 < ix1) _cdSwapInt(ix2, ix1); + if (iy2 < iy1) _cdSwapInt(iy2, iy1); + XRenderFillRectangle(ctxcanvas->dpy, PictOpSrc, ctxcanvas->ctxplus->dst_picture, &rendercolor, ix1, iy1, ix2-ix1+1, iy2-iy1+1); + } + else + { + double half_width = ctxcanvas->canvas->line_width/2.0; + XPointDouble fpoly[4]; + + /* XRender does not have a function to draw lines. + So we have to draw a poligon that covers the line area. */ + + double dx = x2-x1; + double dy = y2-y1; + double d = half_width/hypot(dx, dy); + double dnx = d*dx; + double dny = d*dy; + + fpoly[0].x = x1 + dny; + fpoly[0].y = y1 - dnx; + fpoly[1].x = x1 - dny; + fpoly[1].y = y1 + dnx; + fpoly[2].x = fpoly[1].x + dx; + fpoly[2].y = fpoly[1].y + dy; + fpoly[3].x = fpoly[0].x + dx; + fpoly[3].y = fpoly[0].y + dy; + + xrLine(ctxcanvas, fpoly); + } +} + +static void cdline(cdCtxCanvas *ctxcanvas, int x1, int y1, int x2, int y2) +{ + cdfline(ctxcanvas, (double)x1, (double)y1, (double)x2, (double)y2); +} + +static void cdrect(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + cdfSimRect(ctxcanvas, (double)xmin, (double)xmax, (double)ymin, (double)ymax); +} + +static void cdbox(cdCtxCanvas *ctxcanvas, int xmin, int xmax, int ymin, int ymax) +{ + cdfSimBox(ctxcanvas, (double)xmin, (double)xmax, (double)ymin, (double)ymax); +} + +static void xrFixAngles(cdCtxCanvas *ctxcanvas, double *angle1, double *angle2) +{ + if (ctxcanvas->canvas->invert_yaxis) + { + double temp = 360 - *angle1; + *angle1 = 360 - *angle2; + *angle2 = temp; + } +} + +static void cdarc(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + xrFixAngles(ctxcanvas, &a1, &a2); + cdfSimArc(ctxcanvas, (double)xc, (double)yc, (double)w, (double)h, a1, a2); +} + +static void cdfarc(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + xrFixAngles(ctxcanvas, &a1, &a2); + cdfSimArc(ctxcanvas, xc, yc, w, h, a1, a2); +} + +static void cdfsector(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + xrFixAngles(ctxcanvas, &a1, &a2); + cdfSimElipse(ctxcanvas, xc, yc, w, h, a1, a2, 1); +} + +static void cdsector(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + xrFixAngles(ctxcanvas, &a1, &a2); + cdfSimElipse(ctxcanvas, (double)xc, (double)yc, (double)w, (double)h, a1, a2, 1); +} + +static void cdfchord(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, double h, double a1, double a2) +{ + xrFixAngles(ctxcanvas, &a1, &a2); + cdfSimElipse(ctxcanvas, xc, yc, w, h, a1, a2, 0); +} + +static void cdchord(cdCtxCanvas *ctxcanvas, int xc, int yc, int w, int h, double a1, double a2) +{ + xrFixAngles(ctxcanvas, &a1, &a2); + cdfSimElipse(ctxcanvas, (double)xc, (double)yc, (double)w, (double)h, a1, a2, 0); +} + +static void cdfpoly(cdCtxCanvas* ctxcanvas, int mode, cdfPoint* fpoly, int n) +{ + int i; + + switch(mode) + { + case CD_CLOSED_LINES: + fpoly[n] = fpoly[0]; + n++; + /* continue */ + case CD_OPEN_LINES: + for (i = 0; i< n - 1; i++) + cdfline(ctxcanvas, fpoly[i].x, fpoly[i].y, fpoly[i+1].x, fpoly[i+1].y); + break; + case CD_BEZIER: + cdfSimPolyBezier(ctxcanvas->canvas, fpoly, n); + break; + case CD_FILL: + { + if (ctxcanvas->canvas->new_region) + { + cdPoint* poly = malloc(sizeof(cdPoint)*n); + + for (i = 0; icanvas->use_matrix) + cdfMatrixTransformPoint(ctxcanvas->xmatrix, poly[i].x, poly[i].y, &poly[i].x, &poly[i].y); +#endif + } + + xrPolyFill(ctxcanvas, poly, n); + + free(poly); + } + } + break; + case CD_CLIP: + { + cdPoint* poly = malloc(sizeof(cdPoint)*n); + + for (i = 0; icanvas->clip_mode == CD_CLIPPOLYGON) cdclip(ctxcanvas, CD_CLIPPOLYGON); + } + break; + } +} + +static void cdpoly(cdCtxCanvas* ctxcanvas, int mode, cdPoint* poly, int n) +{ + int i; + + switch(mode) + { + case CD_CLOSED_LINES: + poly[n] = poly[0]; + n++; + /* continue */ + case CD_OPEN_LINES: + for (i = 0; icanvas, fpoly, n); + + free(fpoly); + } + break; + case CD_FILL: + { + if (ctxcanvas->canvas->new_region) + { + cdxPoly(ctxcanvas, CD_FILL, poly, n); + } + else + { + XPointDouble* fpoly = malloc(sizeof(XPointDouble)*n); + + for (i = 0; icanvas->use_matrix) + cdfMatrixTransformPoint(ctxcanvas->xmatrix, fpoly[i].x, fpoly[i].y, &fpoly[i].x, &fpoly[i].y); +#endif + } + + xrPolyFill(ctxcanvas, fpoly, n); + + free(fpoly); + } + } + break; + case CD_CLIP: + cdxPoly(ctxcanvas, CD_CLIP, poly, n); + if (ctxcanvas->canvas->clip_mode == CD_CLIPPOLYGON) cdclip(ctxcanvas, CD_CLIPPOLYGON); + break; + } +} + +static void cdtransform(cdCtxCanvas *ctxcanvas, const double* matrix) +{ +#ifndef CD_XRENDER_MATRIX + if (matrix) + { + /* configure a bottom-up coordinate system */ + ctxcanvas->xmatrix[0] = 1; + ctxcanvas->xmatrix[1] = 0; + ctxcanvas->xmatrix[2] = 0; + ctxcanvas->xmatrix[3] = -1; + ctxcanvas->xmatrix[4] = 0; + ctxcanvas->xmatrix[5] = (ctxcanvas->canvas->h-1); + cdMatrixMultiply(matrix, ctxcanvas->xmatrix); + + ctxcanvas->canvas->invert_yaxis = 0; + } + else + { + ctxcanvas->canvas->invert_yaxis = 1; + } +#else + XTransform transform; + double identity[6] = {1, 0, 0, 1, 0, 0}; + + if (!matrix) + matrix = &identity[0]; + + transform.matrix[0][0] = XDoubleToFixed(matrix[0]); /* |m0 m2 m4| |00 01 02| */ + transform.matrix[0][1] = XDoubleToFixed(matrix[2]); /* |m1 m3 m5| = |10 11 12| */ + transform.matrix[0][2] = XDoubleToFixed(matrix[4]); /* |0 0 1| |20 21 22| */ + transform.matrix[1][0] = XDoubleToFixed(matrix[1]); + transform.matrix[1][1] = XDoubleToFixed(matrix[3]); + transform.matrix[1][2] = XDoubleToFixed(matrix[5]); + transform.matrix[2][0] = XDoubleToFixed(0); + transform.matrix[2][1] = XDoubleToFixed(0); + transform.matrix[2][2] = XDoubleToFixed(1); + + /* TODO: This is not working. It gives a BadPicture error */ + XRenderSetPictureTransform(ctxcanvas->dpy, ctxcanvas->ctxplus->dst_picture, &transform); +#endif +} + +static int cdinteriorstyle(cdCtxCanvas *ctxcanvas, int style) +{ + switch (style) + { + case CD_SOLID: + if (!ctxcanvas->ctxplus->solid_pic) + return ctxcanvas->canvas->interior_style; + ctxcanvas->ctxplus->fill_picture = ctxcanvas->ctxplus->solid_pic; + break; + case CD_HATCH: + case CD_STIPPLE: + case CD_PATTERN: + if (!ctxcanvas->ctxplus->pattern_pic) + return ctxcanvas->canvas->interior_style; + ctxcanvas->ctxplus->fill_picture = ctxcanvas->ctxplus->pattern_pic; + break; + } + return style; +} + +static void cdpattern(cdCtxCanvas *ctxcanvas, int w, int h, const long int *colors) +{ + int x, y; + Pixmap pixmap; + XRenderPictureAttributes pa; + XRenderPictFormat* format; + + if (ctxcanvas->ctxplus->pattern_pic) + XRenderFreePicture(ctxcanvas->dpy, ctxcanvas->ctxplus->pattern_pic); + + format = XRenderFindStandardFormat(ctxcanvas->dpy, PictStandardARGB32); + pixmap = XCreatePixmap(ctxcanvas->dpy, DefaultRootWindow(ctxcanvas->dpy), w, h, format->depth); + pa.repeat = 1; + ctxcanvas->ctxplus->pattern_pic = XRenderCreatePicture(ctxcanvas->dpy, pixmap, format, CPRepeat, &pa); + + for (y=0; ydpy, PictOpSrc, ctxcanvas->ctxplus->pattern_pic, &rendercolor, x, h-y-1, 1, 1); + } + } + + cdinteriorstyle(ctxcanvas, CD_PATTERN); +} + +static void cdstipple(cdCtxCanvas *ctxcanvas, int w, int h, const unsigned char *data) +{ + int x, y, i; + long transparent = cdEncodeAlpha(0, 0); + long int *colors = malloc(sizeof(long)*w*h); + + for (y=0; ycanvas->back_opacity == CD_OPAQUE) + { + if (data[i]) + colors[i] = ctxcanvas->canvas->foreground; + else + colors[i] = ctxcanvas->canvas->background; + } + else + { + if (data[i]) + colors[i] = ctxcanvas->canvas->foreground; + else + colors[i] = transparent; + } + } + } + + cdpattern(ctxcanvas, w, h, colors); + free(colors); +} + +static int cdhatch(cdCtxCanvas *ctxcanvas, int hatch_style) +{ + int y; + unsigned char data[8*8]; + unsigned char *hatch = hatches[hatch_style]; + + for (y=0; y<8; y++) + { + int i = y*8; + unsigned char c = hatch[y]; + data[i+7] = (c&0x01)>>0; + data[i+6] = (c&0x02)>>1; + data[i+5] = (c&0x04)>>2; + data[i+4] = (c&0x08)>>3; + data[i+3] = (c&0x10)>>4; + data[i+2] = (c&0x20)>>5; + data[i+1] = (c&0x40)>>6; + data[i+0] = (c&0x80)>>7; + } + + cdstipple(ctxcanvas, 8, 8, data); + return hatch_style; +} + +static int cdbackopacity(cdCtxCanvas *ctxcanvas, int back_opacity) +{ + ctxcanvas->canvas->back_opacity = back_opacity; + if (ctxcanvas->canvas->interior_style == CD_STIPPLE) + cdstipple(ctxcanvas, ctxcanvas->canvas->stipple_w, ctxcanvas->canvas->stipple_h, ctxcanvas->canvas->stipple); + else if (ctxcanvas->canvas->interior_style == CD_HATCH) + cdhatch(ctxcanvas, ctxcanvas->canvas->hatch_style); + return back_opacity; +} + +static void cdclear(cdCtxCanvas* ctxcanvas) +{ + XRenderColor rendercolor; + xrInitColor(&rendercolor, ctxcanvas->canvas->background); + XRenderFillRectangle(ctxcanvas->dpy, PictOpSrc, ctxcanvas->ctxplus->dst_picture, &rendercolor, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); +} + +static void cdpixel(cdCtxCanvas *ctxcanvas, int x, int y, long int color) +{ + XRenderColor rendercolor; + xrInitColor(&rendercolor, color); + XRenderFillRectangle(ctxcanvas->dpy, PictOpSrc, ctxcanvas->ctxplus->dst_picture, &rendercolor, x, y, 1, 1); +} + +#if (RENDER_MAJOR==0 && RENDER_MINOR<10) +static Picture XRenderCreateSolidFill(Display *dpy, const XRenderColor *color) +{ + Picture pict; + XRenderPictureAttributes pa; + XRenderPictFormat* format = XRenderFindStandardFormat(dpy, PictStandardARGB32); + Pixmap pix = XCreatePixmap(dpy, DefaultRootWindow(dpy), 1, 1, format->depth); + pa.repeat = True; + pict = XRenderCreatePicture(dpy, pix, format, CPRepeat, &pa); + XFreePixmap(dpy, pix); + + XRenderFillRectangle(dpy, PictOpSrc, pict, color, 0, 0, 1, 1); + return pict; +} +#endif + +static long int cdforeground(cdCtxCanvas *ctxcanvas, long int color) +{ + XRenderPictureAttributes pa; + XRenderColor rendercolor; + xrInitColor(&rendercolor, color); + if (ctxcanvas->ctxplus->solid_pic) + XRenderFreePicture(ctxcanvas->dpy, ctxcanvas->ctxplus->solid_pic); + ctxcanvas->ctxplus->solid_pic = XRenderCreateSolidFill(ctxcanvas->dpy, &rendercolor); + pa.repeat = 1; + XRenderChangePicture(ctxcanvas->dpy, ctxcanvas->ctxplus->solid_pic, CPRepeat, &pa); + if (ctxcanvas->canvas->interior_style == CD_STIPPLE) + cdstipple(ctxcanvas, ctxcanvas->canvas->stipple_w, ctxcanvas->canvas->stipple_h, ctxcanvas->canvas->stipple); + else if (ctxcanvas->canvas->interior_style == CD_HATCH) + cdhatch(ctxcanvas, ctxcanvas->canvas->hatch_style); + else if (ctxcanvas->canvas->interior_style == CD_SOLID) + cdinteriorstyle(ctxcanvas, CD_SOLID); + return color; +} + +static long int cdbackground(cdCtxCanvas *ctxcanvas, long int color) +{ + if (ctxcanvas->canvas->back_opacity == CD_OPAQUE) + { + if (ctxcanvas->canvas->interior_style == CD_STIPPLE) + cdstipple(ctxcanvas, ctxcanvas->canvas->stipple_w, ctxcanvas->canvas->stipple_h, ctxcanvas->canvas->stipple); + else if (ctxcanvas->canvas->interior_style == CD_HATCH) + cdhatch(ctxcanvas, ctxcanvas->canvas->hatch_style); + } + return color; +} + +static int cdfont(cdCtxCanvas *ctxcanvas, const char *type_face, int style, int size) +{ + char font_name[1024]; + XftFont *font; + char matrix[200] = ""; + + /* no underline or strikeout support */ + + static char* type_style[] = + { + "", /* CD_PLAIN */ + ":bold", /* CD_BOLD */ + ":slant=italic,oblique", /* CD_ITALIC */ + ":bold:slant=italic,oblique" /* CD_BOLD_ITALIC */ + }; + + if (cdStrEqualNoCase(type_face, "Fixed") || cdStrEqualNoCase(type_face, "System")) + type_face = "monospace"; + else if (cdStrEqualNoCase(type_face, "Courier") || cdStrEqualNoCase(type_face, "Courier New")) + type_face = "monospace"; + else if (cdStrEqualNoCase(type_face, "Times") || cdStrEqualNoCase(type_face, "Times New Roman")) + type_face = "serif"; + else if (cdStrEqualNoCase(type_face, "Helvetica") || cdStrEqualNoCase(type_face, "Arial")) + type_face = "sans"; + + if (ctxcanvas->canvas->text_orientation) + { + double angle = CD_DEG2RAD*ctxcanvas->canvas->text_orientation; + double cos_angle = cos(angle); + double sin_angle = sin(angle); + + sprintf(matrix,":matrix=%f %f %f %f", cos_angle, -sin_angle, sin_angle, cos_angle); + } + + size = cdGetFontSizePoints(ctxcanvas->canvas, size); + + sprintf(font_name,"%s-%d%s%s", type_face, size, type_style[style&3], matrix); + font = XftFontOpenName(ctxcanvas->dpy, ctxcanvas->scr, font_name); + if (!font) + return 0; + + if (ctxcanvas->ctxplus->font) + XftFontClose(ctxcanvas->dpy, ctxcanvas->ctxplus->font); + + if (ctxcanvas->canvas->text_orientation) + { + /* XftTextExtents8 will return the size of the rotated text, but we want the size without orientation. + So create a font without orientation just to return the correct text size. */ + + if (ctxcanvas->ctxplus->flat_font) + XftFontClose(ctxcanvas->dpy, ctxcanvas->ctxplus->flat_font); + + sprintf(font_name,"%s-%d%s", type_face, size, type_style[style&3]); + ctxcanvas->ctxplus->flat_font = XftFontOpenName(ctxcanvas->dpy, ctxcanvas->scr, font_name); + } + + ctxcanvas->ctxplus->font = font; + + return 1; +} + +static int cdnativefont(cdCtxCanvas *ctxcanvas, const char* nativefont) +{ + int size = 12, style = CD_PLAIN; + char type_face[1024]; + + if (nativefont[0] == '-') + { + XftFont *font = XftFontOpenXlfd(ctxcanvas->dpy, ctxcanvas->scr, nativefont); + if (!font) + return 0; + + if (!cdParseXWinFont(nativefont, type_face, &style, &size)) + { + XftFontClose(ctxcanvas->dpy, font); + return 0; + } + + if (ctxcanvas->ctxplus->font) + XftFontClose(ctxcanvas->dpy, ctxcanvas->ctxplus->font); + + ctxcanvas->canvas->text_orientation = 0; /* orientation not supported when using XLFD */ + + ctxcanvas->ctxplus->font = font; + } + else + { + if (!cdParsePangoFont(nativefont, type_face, &style, &size)) + return 0; + + if (!cdfont(ctxcanvas, type_face, style, size)) + return 0; + } + + /* update cdfont parameters */ + ctxcanvas->canvas->font_style = style; + ctxcanvas->canvas->font_size = size; + strcpy(ctxcanvas->canvas->font_type_face, type_face); + + return 1; +} + +static double cdtextorientation(cdCtxCanvas *ctxcanvas, double angle) +{ + /* must recriate the font if orientation changes */ + ctxcanvas->canvas->text_orientation = angle; + cdfont(ctxcanvas, ctxcanvas->canvas->font_type_face, ctxcanvas->canvas->font_style, ctxcanvas->canvas->font_size); + return angle; +} + +static void cdgetfontdim(cdCtxCanvas *ctxcanvas, int *max_width, int *height, int *ascent, int *descent) +{ + if (!ctxcanvas->ctxplus->font) + return; + + if (max_width) *max_width = ctxcanvas->ctxplus->font->max_advance_width; + if (height) *height = ctxcanvas->ctxplus->font->ascent + ctxcanvas->ctxplus->font->descent; + if (ascent) *ascent = ctxcanvas->ctxplus->font->ascent; + if (descent) *descent = ctxcanvas->ctxplus->font->descent; +} + +static void cdgettextsize(cdCtxCanvas *ctxcanvas, const char *text, int len, int *width, int *height) +{ + XGlyphInfo extents; + if (!ctxcanvas->ctxplus->font) + return; + + if (ctxcanvas->canvas->text_orientation) + XftTextExtents8(ctxcanvas->dpy, ctxcanvas->ctxplus->flat_font, (XftChar8*)text, len, &extents); + else + XftTextExtents8(ctxcanvas->dpy, ctxcanvas->ctxplus->font, (XftChar8*)text, len, &extents); + + if (width) *width = extents.width+extents.x; + if (height) *height = extents.height+extents.y; +} + +static void cdtext(cdCtxCanvas *ctxcanvas, int x, int y, const char *text, int len) +{ + XGlyphInfo extents; + int ox, oy, w, h, descent, dir = -1; + + if (!ctxcanvas->ctxplus->font) + return; + + if (ctxcanvas->canvas->text_orientation) + XftTextExtents8(ctxcanvas->dpy, ctxcanvas->ctxplus->flat_font, (XftChar8*)text, len, &extents); + else + XftTextExtents8(ctxcanvas->dpy, ctxcanvas->ctxplus->font, (XftChar8*)text, len, &extents); + w = extents.width+extents.x; + h = extents.height+extents.y; + + descent = ctxcanvas->ctxplus->font->descent; + + ox = x; + oy = y; + + switch (ctxcanvas->canvas->text_alignment) + { + case CD_BASE_RIGHT: + case CD_NORTH_EAST: + case CD_EAST: + case CD_SOUTH_EAST: + x = x - w; + break; + case CD_BASE_CENTER: + case CD_CENTER: + case CD_NORTH: + case CD_SOUTH: + x = x - w/2; + break; + case CD_BASE_LEFT: + case CD_NORTH_WEST: + case CD_WEST: + case CD_SOUTH_WEST: + x = x; + break; + } + + if (ctxcanvas->canvas->invert_yaxis) + dir = 1; + + switch (ctxcanvas->canvas->text_alignment) + { + case CD_BASE_LEFT: + case CD_BASE_CENTER: + case CD_BASE_RIGHT: + y = y; + break; + case CD_SOUTH_EAST: + case CD_SOUTH_WEST: + case CD_SOUTH: + y = y - dir*descent; + break; + case CD_NORTH_EAST: + case CD_NORTH: + case CD_NORTH_WEST: + y = y + dir*(h - descent); + break; + case CD_CENTER: + case CD_EAST: + case CD_WEST: + y = y + dir*(h/2 - descent); + break; + } + + if (ctxcanvas->canvas->text_orientation) + { + double angle = CD_DEG2RAD*ctxcanvas->canvas->text_orientation; + double cos_angle = cos(angle); + double sin_angle = sin(angle); + + /* manually rotate the initial point */ + cdRotatePoint(ctxcanvas->canvas, x, y, ox, oy, &x, &y, sin_angle, cos_angle); + } + +#ifndef CD_XRENDER_MATRIX + if (ctxcanvas->canvas->use_matrix) + cdMatrixTransformPoint(ctxcanvas->xmatrix, x, y, &x, &y); +#endif + + if (!ctxcanvas->canvas->new_region) + { + XftColor xftcolor; + XRenderColor rendercolor; + xrInitColor(&rendercolor, ctxcanvas->canvas->foreground); + XftColorAllocValue(ctxcanvas->dpy, ctxcanvas->vis, ctxcanvas->colormap, &rendercolor, &xftcolor); + XftDrawString8(ctxcanvas->ctxplus->draw, &xftcolor, ctxcanvas->ctxplus->font, x, y, (XftChar8*)text, len); + } +} + +/******************************************************************/ + +#if (RENDER_MAJOR>0 || RENDER_MINOR>=10) +static void set_linegradient_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (ctxcanvas->ctxplus->linegradient_pic) + { + XRenderFreePicture(ctxcanvas->dpy, ctxcanvas->ctxplus->linegradient_pic); + ctxcanvas->ctxplus->linegradient_pic = 0; + } + + if (data) + { + XRenderPictureAttributes pa; + XFixed stops[2]; + XRenderColor colors[2]; + int x1, y1, x2, y2; + sscanf(data, "%d %d %d %d", &x1, &y1, &x2, &y2); + + if (ctxcanvas->canvas->invert_yaxis) + { + y1 = _cdInvertYAxis(ctxcanvas->canvas, y1); + y2 = _cdInvertYAxis(ctxcanvas->canvas, y2); + } + + stops[0] = XDoubleToFixed(0.0); + stops[1] = XDoubleToFixed(1.0); + + xrInitColor(&colors[0], ctxcanvas->canvas->foreground); + xrInitColor(&colors[1], ctxcanvas->canvas->background); + + ctxcanvas->ctxplus->linegradient.p1.x = XDoubleToFixed((double)x1); + ctxcanvas->ctxplus->linegradient.p1.y = XDoubleToFixed((double)y1); + ctxcanvas->ctxplus->linegradient.p2.x = XDoubleToFixed((double)x2); + ctxcanvas->ctxplus->linegradient.p2.y = XDoubleToFixed((double)y2); + + ctxcanvas->ctxplus->linegradient_pic = XRenderCreateLinearGradient(ctxcanvas->dpy, &ctxcanvas->ctxplus->linegradient, stops, colors, 2); + pa.repeat = 1; + XRenderChangePicture(ctxcanvas->dpy, ctxcanvas->ctxplus->linegradient_pic, CPRepeat, &pa); + + ctxcanvas->ctxplus->fill_picture = ctxcanvas->ctxplus->linegradient_pic; + } + else + cdinteriorstyle(ctxcanvas, ctxcanvas->canvas->interior_style); +} + +static char* get_linegradient_attrib(cdCtxCanvas* ctxcanvas) +{ + static char data[100]; + + sprintf(data, "%d %d %d %d", (int)XFixedToDouble(ctxcanvas->ctxplus->linegradient.p1.x), + (int)XFixedToDouble(ctxcanvas->ctxplus->linegradient.p1.y), + (int)XFixedToDouble(ctxcanvas->ctxplus->linegradient.p2.x), + (int)XFixedToDouble(ctxcanvas->ctxplus->linegradient.p2.y)); + + return data; +} + +static cdAttribute linegradient_attrib = +{ + "LINEGRADIENT", + set_linegradient_attrib, + get_linegradient_attrib +}; +#endif + +static void set_aa_attrib(cdCtxCanvas* ctxcanvas, char* data) +{ + if (!data || data[0] == '0') + ctxcanvas->ctxplus->antialias = 0; + else + ctxcanvas->ctxplus->antialias = 1; + + ctxcanvas->ctxplus->maskFormat = XRenderFindStandardFormat(ctxcanvas->dpy, ctxcanvas->ctxplus->antialias? PictStandardA8: PictStandardA1); +} + +static char* get_aa_attrib(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->ctxplus->antialias) + return "1"; + else + return "0"; +} + +static cdAttribute aa_attrib = +{ + "ANTIALIAS", + set_aa_attrib, + get_aa_attrib +}; + +static char cdxXRenderVersion[50] = ""; + +static char* get_version_attrib(cdCtxCanvas* ctxcanvas) +{ + if (ctxcanvas->ctxplus) + return cdxXRenderVersion; + else + return "0"; +} + +static cdAttribute version_attrib = +{ + "XRENDERVERSION", + NULL, + get_version_attrib +}; + +static void cdkillcanvas(cdCtxCanvas *ctxcanvas) +{ + /* fill_picture is NOT released, since it is a pointer to one of the other pictures */ + if (ctxcanvas->ctxplus->solid_pic) + XRenderFreePicture(ctxcanvas->dpy, ctxcanvas->ctxplus->solid_pic); + + if (ctxcanvas->ctxplus->pattern_pic) + XRenderFreePicture(ctxcanvas->dpy, ctxcanvas->ctxplus->pattern_pic); + +#if (RENDER_MAJOR>0 || RENDER_MINOR>=10) + if (ctxcanvas->ctxplus->linegradient_pic) + XRenderFreePicture(ctxcanvas->dpy, ctxcanvas->ctxplus->linegradient_pic); +#endif + + if (ctxcanvas->ctxplus->flat_font) + XftFontClose(ctxcanvas->dpy, ctxcanvas->ctxplus->flat_font); + + if (ctxcanvas->ctxplus->font) + XftFontClose(ctxcanvas->dpy, ctxcanvas->ctxplus->font); + + XftDrawDestroy(ctxcanvas->ctxplus->draw); + free(ctxcanvas->ctxplus); + + /* call original method */ + ctxcanvas->ctxplus->cxKillCanvas(ctxcanvas); +} + +static void xrInitTable(cdCanvas* canvas) +{ + /* set new methods */ + canvas->cxKillCanvas = cdkillcanvas; + canvas->cxClip = cdclip; + canvas->cxClipArea = cdcliparea; + canvas->cxTransform = cdtransform; + canvas->cxInteriorStyle = cdinteriorstyle; + canvas->cxBackOpacity = cdbackopacity; + canvas->cxForeground = cdforeground; + canvas->cxBackground = cdbackground; + canvas->cxHatch = cdhatch; + canvas->cxStipple = cdstipple; + canvas->cxPattern = cdpattern; + canvas->cxTextOrientation = cdtextorientation; + + canvas->cxPixel = cdpixel; + canvas->cxClear = cdclear; + canvas->cxLine = cdline; + canvas->cxFLine = cdfline; + canvas->cxRect = cdrect; + canvas->cxFRect = cdfSimRect; + canvas->cxBox = cdbox; + canvas->cxFBox = cdfSimBox; + canvas->cxArc = cdarc; + canvas->cxFArc = cdfarc; + canvas->cxSector = cdsector; + canvas->cxFSector = cdfsector; + canvas->cxChord = cdchord; + canvas->cxFChord = cdfchord; + canvas->cxPoly = cdpoly; + canvas->cxFPoly = cdfpoly; + + /* TODO: canvas->cxPutImageRectRGBA = cdputimagerectrgba; */ + + canvas->cxFont = cdfont; + canvas->cxNativeFont = cdnativefont; + canvas->cxGetTextSize = cdgettextsize; + canvas->cxText = cdtext; + canvas->cxGetFontDim = cdgetfontdim; +} + +static void xrCreateContextPlus(cdCtxCanvas *ctxcanvas) +{ + ctxcanvas->ctxplus = (cdxContextPlus *)malloc(sizeof(cdxContextPlus)); + memset(ctxcanvas->ctxplus, 0, sizeof(cdxContextPlus)); + + if (cdxXRenderVersion[0] == 0 && XftDefaultHasRender(ctxcanvas->dpy)) + sprintf(cdxXRenderVersion,"%d.%d", RENDER_MAJOR, RENDER_MINOR); + + cdRegisterAttribute(ctxcanvas->canvas, &aa_attrib); + cdRegisterAttribute(ctxcanvas->canvas, &version_attrib); +#if (RENDER_MAJOR>0 || RENDER_MINOR>=10) + cdRegisterAttribute(ctxcanvas->canvas, &linegradient_attrib); +#endif + + ctxcanvas->ctxplus->draw = XftDrawCreate(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->vis, ctxcanvas->colormap); + ctxcanvas->ctxplus->dst_picture = XftDrawPicture(ctxcanvas->ctxplus->draw); + ctxcanvas->ctxplus->maskFormat = XRenderFindStandardFormat(ctxcanvas->dpy, PictStandardA8); + + ctxcanvas->ctxplus->antialias = 1; +} + +/*******************************************************************************************************/ + +static cdContext cdDBufferContext = {0,0,NULL,NULL,NULL,NULL}; +static cdContext cdNativeWindowContext = {0,0,NULL,NULL,NULL,NULL}; +static cdContext cdImageContext = {0,0,NULL,NULL,NULL,NULL}; + +static void (*cdcreatecanvasDBUFFER)(cdCanvas* canvas, void* data) = NULL; +static void (*cdcreatecanvasNATIVE)(cdCanvas* canvas, void* data) = NULL; +static void (*cdcreatecanvasIMAGE)(cdCanvas* canvas, void* data) = NULL; + +static void (*cdinittableDBUFFER)(cdCanvas* canvas) = NULL; +static void (*cdinittableNATIVE)(cdCanvas* canvas) = NULL; +static void (*cdinittableIMAGE)(cdCanvas* canvas) = NULL; + +static void (*cdkillcanvasDBUFFER)(cdCtxCanvas* ctxcanvas) = NULL; +static void (*cdkillcanvasNATIVE)(cdCtxCanvas* ctxcanvas) = NULL; +static void (*cdkillcanvasIMAGE)(cdCtxCanvas* ctxcanvas) = NULL; + +static void xrCreateCanvasDBUFFER(cdCanvas* canvas, void *data) +{ + cdcreatecanvasDBUFFER(canvas, data); /* call original first */ + xrCreateContextPlus(canvas->ctxcanvas); + canvas->ctxcanvas->ctxplus->cxKillCanvas = cdkillcanvasDBUFFER; /* must set it here since CreateContext clears the structure */ +} + +static void xrInitTableDBUFFER(cdCanvas* canvas) +{ + if (!cdkillcanvasDBUFFER) cdkillcanvasDBUFFER = canvas->cxKillCanvas; /* save original method */ + cdinittableDBUFFER(canvas); + xrInitTable(canvas); +} + +cdContext* cdContextDBufferPlus(void) +{ + if (!cdDBufferContext.plus) + { + int old_plus = cdUseContextPlus(0); /* disable context plus */ + cdDBufferContext = *cdContextDBuffer(); /* copy original context */ + cdDBufferContext.plus = 1; /* mark as plus */ + + /* save original methods */ + cdcreatecanvasDBUFFER = cdDBufferContext.cxCreateCanvas; + cdinittableDBUFFER = cdDBufferContext.cxInitTable; + + /* replace by new methods */ + cdDBufferContext.cxCreateCanvas = xrCreateCanvasDBUFFER; + cdDBufferContext.cxInitTable = xrInitTableDBUFFER; + + cdUseContextPlus(old_plus); /* enable context plus */ + } + return &cdDBufferContext; +} + +static void xrCreateCanvasNATIVE(cdCanvas* canvas, void *data) +{ + cdcreatecanvasNATIVE(canvas, data); + xrCreateContextPlus(canvas->ctxcanvas); + canvas->ctxcanvas->ctxplus->cxKillCanvas = cdkillcanvasNATIVE; +} + +static void xrInitTableNATIVE(cdCanvas* canvas) +{ + if (!cdkillcanvasNATIVE) cdkillcanvasNATIVE = canvas->cxKillCanvas; + cdinittableNATIVE(canvas); + xrInitTable(canvas); +} + +cdContext* cdContextNativeWindowPlus(void) +{ + if (!cdNativeWindowContext.plus) + { + int old_plus = cdUseContextPlus(0); + cdNativeWindowContext = *cdContextNativeWindow(); + cdcreatecanvasNATIVE = cdNativeWindowContext.cxCreateCanvas; + cdinittableNATIVE = cdNativeWindowContext.cxInitTable; + cdNativeWindowContext.cxCreateCanvas = xrCreateCanvasNATIVE; + cdNativeWindowContext.cxInitTable = xrInitTableNATIVE; + cdNativeWindowContext.plus = 1; + cdUseContextPlus(old_plus); + } + return &cdNativeWindowContext; +} + +static void xrCreateCanvasIMAGE(cdCanvas* canvas, void *data) +{ + cdcreatecanvasIMAGE(canvas, data); + xrCreateContextPlus(canvas->ctxcanvas); + canvas->ctxcanvas->ctxplus->cxKillCanvas = cdkillcanvasIMAGE; +} + +static void xrInitTableIMAGE(cdCanvas* canvas) +{ + if (!cdkillcanvasIMAGE) cdkillcanvasIMAGE = canvas->cxKillCanvas; + cdinittableIMAGE(canvas); + xrInitTable(canvas); +} + +cdContext* cdContextImagePlus(void) +{ + if (!cdImageContext.plus) + { + int old_plus = cdUseContextPlus(0); + cdImageContext = *cdContextImage(); + cdcreatecanvasIMAGE = cdImageContext.cxCreateCanvas; + cdinittableIMAGE = cdImageContext.cxInitTable; + cdImageContext.cxCreateCanvas = xrCreateCanvasIMAGE; + cdImageContext.cxInitTable = xrInitTableIMAGE; + cdImageContext.plus = 1; + cdUseContextPlus(old_plus); + } + return &cdImageContext; +} diff --git a/cd/src/xrender/cdxrplus.c b/cd/src/xrender/cdxrplus.c new file mode 100755 index 0000000..f938a6f --- /dev/null +++ b/cd/src/xrender/cdxrplus.c @@ -0,0 +1,26 @@ +/** \file + * \brief X-Render Control + * + * See Copyright Notice in cd.h + */ + +#include "cd.h" +#include "cd_private.h" +#include +#include + +cdContext* cdContextNativeWindowPlus(void); +cdContext* cdContextImagePlus(void); +cdContext* cdContextDBufferPlus(void); + +void cdInitContextPlus(void) +{ + cdContext* ctx_list[NUM_CONTEXTPLUS]; + memset(ctx_list, 0, sizeof(ctx_list)); + + ctx_list[CD_CTX_NATIVEWINDOW] = cdContextNativeWindowPlus(); + ctx_list[CD_CTX_IMAGE] = cdContextImagePlus(); + ctx_list[CD_CTX_DBUFFER] = cdContextDBufferPlus(); + + cdInitContextPlusList(ctx_list); +} diff --git a/cd/test/cdtest/cdtest.bat b/cd/test/cdtest/cdtest.bat new file mode 100755 index 0000000..3249300 --- /dev/null +++ b/cd/test/cdtest/cdtest.bat @@ -0,0 +1,3 @@ +@echo off +REM Script generated automatically by tecmake v3.10 +..\bin\Win32\cdtest.exe %* diff --git a/cd/test/cdtest/cdtest.c b/cd/test/cdtest/cdtest.c new file mode 100755 index 0000000..9180bf4 --- /dev/null +++ b/cd/test/cdtest/cdtest.c @@ -0,0 +1,2669 @@ +/*=========================================================================*/ +/* CDTEST.C - 09/12/95 */ +/* Canvas Draw Test. */ +/*=========================================================================*/ + +/*- Convenccoes Usadas: ---------------------------------------------------*/ +/* - Identificadores de funccoes associadas a um callback comeccam por f. */ +/* Ex: fResize, fRepaint. */ +/* - Identificadores de constantes sao escritos em maiusculas. */ +/* Ex: LINE, ARC, NEWPOINT. */ +/* - Identificadores de funcoes internas do programa sao escritas em */ +/* minusculas. */ +/* Ex: newpolypoint, dellist. */ +/*-------------------------------------------------------------------------*/ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "cdtest.h" + +/*- Contexto do CD Test: --------------------------------------------------*/ +tCTC ctgc; + +/*- Parametros geometricos da primitiva sendo desenhada: ------------------*/ +tLinePos line_pos; +tBoxPos box_pos; +tPixelPos pixel_pos; +tMarkPos mark_pos; +tArcPos arc_pos; + +//#define USE_GDIPLUS + +#ifdef USE_GDIPLUS +static const int use_gdiplus = 1; +#else +static const int use_gdiplus = 0; +#endif + +static const int antialias = 1; + + +/*-------------------------------------------------------------------------*/ +/* Associa os call-backs do IUP. */ +/*-------------------------------------------------------------------------*/ +void setcallbacks(void) +{ + IupSetFunction("cmdFileExit", (Icallback) fFileExit); + + IupSetFunction("cmdEditClear", (Icallback) fEditClear); + IupSetFunction("cmdEditUndo", (Icallback) fEditUndo); + + IupSetFunction("cmdHelpAbout", (Icallback) fHelpAbout); + IupSetFunction("cmdCloseAbout", (Icallback) fCloseAbout); + + IupSetFunction("cmdWDCanvas", (Icallback) fWDCanvas); + IupSetFunction("cmdCloseWD", (Icallback) fCloseWD); + IupSetFunction("cmdPICCanvas", (Icallback) fPICCanvas); + IupSetFunction("cmdClosePIC", (Icallback) fClosePIC); + + IupSetFunction("cmdShowDialog", (Icallback) fShowDialog); + IupSetFunction("cmdLine", (Icallback) fLine); + IupSetFunction("cmdRect", (Icallback) fRect); + IupSetFunction("cmdBox", (Icallback) fBox); + IupSetFunction("cmdArc", (Icallback) fArc); + IupSetFunction("cmdSector", (Icallback) fSector); + IupSetFunction("cmdChord", (Icallback) fChord); + IupSetFunction("cmdPixel", (Icallback) fPixel); + IupSetFunction("cmdMark", (Icallback) fMark); + IupSetFunction("cmdText", (Icallback) fText); + IupSetFunction("cmdPoly", (Icallback) fPoly); + + IupSetFunction("cmdOptions", (Icallback) fOptions); + IupSetFunction("cmdOptionsHide", (Icallback) fOptionsHide); + IupSetFunction("cmdAttributes", (Icallback) fAttributes); + IupSetFunction("cmdAttributesHide", (Icallback) fAttributesHide); + IupSetFunction("cmdMsgHide", (Icallback) fMsgHide); + IupSetFunction("cmdSimulate", (Icallback) fSimulate); + IupSetFunction("cmdStretchPlay", (Icallback) fStretchPlay); + + IupSetFunction("cmdWriteMode", (Icallback) fWriteMode); + IupSetFunction("cmdLineStyle", (Icallback) fLineStyle); + IupSetFunction("cmdLineCap", (Icallback) fLineCap); + IupSetFunction("cmdLineJoin", (Icallback) fLineJoin); + IupSetFunction("cmdFillMode", (Icallback) fFillMode); + IupSetFunction("cmdFontStyle", (Icallback) fFontStyle); + IupSetFunction("cmdFontTypeFace", (Icallback) fFontTypeFace); + IupSetFunction("cmdMarkType", (Icallback) fMarkType); + IupSetFunction("cmdTextAlignment", (Icallback) fTextAlignment); + IupSetFunction("cmdHatchStyle", (Icallback) fHatchStyle); + IupSetFunction("cmdOpacity", (Icallback) fOpacity); + + IupSetFunction("cmdNoBuffering", (Icallback) fNoBuffering); + IupSetFunction("cmdImageBuffer", (Icallback) fImageBuffer); + IupSetFunction("cmdRGBBuffer", (Icallback) fRGBBuffer); + + IupSetFunction("cmdInteger", (Icallback) fInteger); + IupSetFunction("cmdReal", (Icallback) fReal); + IupSetFunction("cmdDraw", (Icallback) fDraw); + + IupSetFunction("cmdSolid", (Icallback) fSolid); + IupSetFunction("cmdHatch", (Icallback) fHatch); + IupSetFunction("cmdStipple", (Icallback) fStipple); + IupSetFunction("cmdPattern", (Icallback) fPattern); + + IupSetFunction("cmdOpenLines", (Icallback) fOpenLines); + IupSetFunction("cmdClosedLines", (Icallback) fClosedLines); + IupSetFunction("cmdFill", (Icallback) fFill); + IupSetFunction("cmdPolyClip", (Icallback) fPolyClip); + IupSetFunction("cmdPolyBezier", (Icallback) fPolyBezier); + + IupSetFunction("cmdClip", (Icallback) fClip); + IupSetFunction("cmdClipArea", (Icallback) fClipArea); + IupSetFunction("cmdClipOff", (Icallback) fClipOff); + IupSetFunction("cmdClipPoly", (Icallback) fClipPoly); + + IupSetFunction("cmdImage", (Icallback) fImage); + IupSetFunction("cmdImagePut", (Icallback) fImagePut); + IupSetFunction("cmdImageGet", (Icallback) fImageGet); + + IupSetFunction("cmdImageRGB", (Icallback) fImageRGB); + IupSetFunction("cmdImageRGBPut", (Icallback) fImageRGBPut); + IupSetFunction("cmdImageRGBGet", (Icallback) fImageRGBGet); +} + +/*-------------------------------------------------------------------------*/ +/* Inicializa o stipple e o pattern exemplo. */ +/*-------------------------------------------------------------------------*/ +void initsamples(void) +{ + int i; + + /* zera os vetores */ + for (i=0; i<100; i++) { + ctgc.stipple[i] = 0; + ctgc.pattern[i] = 0xffffffl; + } + + /* especificaccao do stipple */ + ctgc.stipple[11] = 1; /*------------*/ + ctgc.stipple[21] = 1; /* 0123456789*/ + ctgc.stipple[31] = 1; /* */ + ctgc.stipple[41] = 1; /*9 0000000000*/ + ctgc.stipple[51] = 1; /*8 0000111110*/ + /*7 0001000110*/ + ctgc.stipple[12] = 1; /*6 0010001010*/ + ctgc.stipple[52] = 1; /*5 0111110010*/ + ctgc.stipple[62] = 1; /*4 0100010010*/ + /*3 0100010100*/ + ctgc.stipple[13] = 1; /*2 0100011000*/ + ctgc.stipple[53] = 1; /*1 0111110000*/ + ctgc.stipple[73] = 1; /*0 0000000000*/ + /*------------*/ + ctgc.stipple[14] = 1; + ctgc.stipple[54] = 1; + ctgc.stipple[84] = 1; + + ctgc.stipple[15] = 1; ctgc.stipple[26] = 1; + ctgc.stipple[25] = 1; ctgc.stipple[66] = 1; + ctgc.stipple[35] = 1; ctgc.stipple[86] = 1; + ctgc.stipple[45] = 1; + ctgc.stipple[55] = 1; ctgc.stipple[48] = 1; + ctgc.stipple[85] = 1; ctgc.stipple[58] = 1; + ctgc.stipple[68] = 1; + ctgc.stipple[37] = 1; ctgc.stipple[78] = 1; + ctgc.stipple[77] = 1; ctgc.stipple[88] = 1; + ctgc.stipple[87] = 1; + + + /* especificaccao do stipple */ + ctgc.pattern[11] = CD_RED; /*------------*/ + ctgc.pattern[21] = CD_RED; /* 0123456789*/ + ctgc.pattern[31] = CD_RED; /* */ + ctgc.pattern[41] = CD_RED; /*9 WWWWWWWWWW*/ + ctgc.pattern[51] = CD_RED; /*8 WWWWGGGGGW*/ + ctgc.pattern[12] = CD_RED; /*7 WWWGGGGGBW*/ + ctgc.pattern[22] = CD_RED; /*6 WWGGGGGBBW*/ + ctgc.pattern[32] = CD_RED; /*5 WrrrrrBBBW*/ + ctgc.pattern[42] = CD_RED; /*4 WrrrrrBBBW*/ + ctgc.pattern[52] = CD_RED; /*3 WrrrrrBBWW*/ + ctgc.pattern[13] = CD_RED; /*2 WrrrrrBWWW*/ + ctgc.pattern[23] = CD_RED; /*1 WrrrrrWWWW*/ + ctgc.pattern[33] = CD_RED; /*0 WWWWWWWWWW*/ + ctgc.pattern[43] = CD_RED; /*------------*/ + ctgc.pattern[53] = CD_RED; + ctgc.pattern[14] = CD_RED; ctgc.pattern[15] = CD_RED; + ctgc.pattern[24] = CD_RED; ctgc.pattern[25] = CD_RED; + ctgc.pattern[34] = CD_RED; ctgc.pattern[35] = CD_RED; + ctgc.pattern[44] = CD_RED; ctgc.pattern[45] = CD_RED; + ctgc.pattern[54] = CD_RED; ctgc.pattern[55] = CD_RED; + + ctgc.pattern[26] = CD_BLUE; ctgc.pattern[37] = CD_BLUE; + ctgc.pattern[36] = CD_BLUE; ctgc.pattern[47] = CD_BLUE; + ctgc.pattern[46] = CD_BLUE; ctgc.pattern[57] = CD_BLUE; + ctgc.pattern[56] = CD_BLUE; ctgc.pattern[67] = CD_BLUE; + + ctgc.pattern[48] = CD_BLUE; ctgc.pattern[62] = CD_GREEN; + ctgc.pattern[58] = CD_BLUE; ctgc.pattern[63] = CD_GREEN; + ctgc.pattern[68] = CD_BLUE; ctgc.pattern[64] = CD_GREEN; + ctgc.pattern[78] = CD_BLUE; ctgc.pattern[65] = CD_GREEN; + ctgc.pattern[66] = CD_GREEN; + + ctgc.pattern[73] = CD_GREEN; ctgc.pattern[84] = CD_GREEN; + ctgc.pattern[74] = CD_GREEN; ctgc.pattern[85] = CD_GREEN; + ctgc.pattern[75] = CD_GREEN; ctgc.pattern[86] = CD_GREEN; + ctgc.pattern[76] = CD_GREEN; ctgc.pattern[87] = CD_GREEN; + ctgc.pattern[77] = CD_GREEN; ctgc.pattern[88] = CD_GREEN; + + ctgc.dashes[0] = 10; + ctgc.dashes[1] = 2; + ctgc.dashes[2] = 5; + ctgc.dashes[3] = 2; +} + +/*-------------------------------------------------------------------------*/ +/* Inicializa o CD Test. */ +/*-------------------------------------------------------------------------*/ +void CDTestInit(void) +{ + memset(&ctgc, 0, sizeof(ctgc)); + + if (use_gdiplus) + { +#ifdef USE_GDIPLUS + cdInitGdiPlus(); +#endif + } + + /* inicializaccao dos drivers */ + DriversInit(); + + /* mostra o dialogo principal */ + IupShow(IupGetHandle("dlgMain")); + + /* inicializaccao da barra de cores */ + ColorBarInit(IupGetHandle("dlgMain"), IupGetHandle("cnvColorBar"), &ctgc.foreground, &ctgc.background); + + /* cria o canvas do CD associado ao canvas do IUP */ + if (use_gdiplus) cdUseContextPlus(1); + ctgc.iup_canvas = cdCreateCanvas(CD_IUP, IupGetHandle("cnvMain")); + if (!antialias) cdCanvasSetAttribute(ctgc.iup_canvas, "ANTIALIAS", "0"); + cdActivate(ctgc.iup_canvas); + if (use_gdiplus) cdUseContextPlus(0); + + /* associa os call-backs */ + setcallbacks(); + + /* os call-backs do canvas devem ser associados depois de sua criacao */ + IupSetFunction("cmdRepaint", (Icallback) fRepaint); + IupSetFunction("cmdMotionCB", (Icallback) fMotionCB); + IupSetFunction("cmdButtonCB", (Icallback) fButtonCB); + IupSetFunction("cmdResizeCB", (Icallback) fResizeCB); + IupSetFunction("cmdGetFocusCB", (Icallback) fGetFocusCB); + + /* inicializaccao do contexto */ + ctgc.write_mode = CD_REPLACE; + ctgc.line_style = CD_CONTINUOUS; + ctgc.line_cap = CD_CAPFLAT; + ctgc.line_join = CD_MITER; + ctgc.fill_mode = CD_EVENODD; + ctgc.line_width = 1; + ctgc.font_style = CD_PLAIN; + ctgc.font_typeface = CD_SYSTEM; + ctgc.font_size = CD_STANDARD; + ctgc.text_alignment = CD_BASE_LEFT; + ctgc.text_orientation = 0; + ctgc.back_opacity = CD_TRANSPARENT; + ctgc.mark_type = CD_STAR; + ctgc.poly_mode = CD_OPEN_LINES; + ctgc.interior_style = CD_SOLID; + ctgc.hatch = CD_HORIZONTAL; + ctgc.following = FALSE; + ctgc.foreground = CD_BLACK; + ctgc.background = CD_WHITE; + ctgc.head = NULL; + ctgc.test_image = NULL; + ctgc.sim = 0; + ctgc.stretch_play = 0; + ctgc.dlg_x = IUP_CENTER; + ctgc.dlg_y = IUP_CENTER; + ctgc.visible = 0; + + /* inicializa os vetores stipple e pattern */ + initsamples(); + + /* inicializa o CDTest com a primitiva LINE */ + ctgc.dlg_cur_prim = IupGetHandle("dlgLB"); + ctgc.bt_cur_prim = IupGetHandle("btCurPrim"); + ctgc.cur_prim = LINE; + + /* inicializaccao do Canvas do IUP */ + cdActivate(ctgc.iup_canvas); + cdFont(ctgc.font_typeface,ctgc.font_style,ctgc.font_size); + cdBackground(ctgc.background); + cdClear(); + cdGetCanvasSize(&(ctgc.w),&(ctgc.h),NULL,NULL); + ctgc.bpp = cdGetColorPlanes(); + + { + double mm, xres; + cdPixel2MM(1, 0, &mm, NULL); + xres = 1.0/mm; + ctgc.res = xres; + } + + /* inicializa o canvas off-screen de double-bufering */ + ctgc.buffering = NO_BUFFER; + ctgc.buffer_canvas = NULL; + + /* inicializa o clipping */ + ctgc.clip_mode = CD_CLIPOFF; + cdGetClipArea(&(ctgc.clip_xmin), &(ctgc.clip_xmax), + &(ctgc.clip_ymin), &(ctgc.clip_ymax)); + + /* zera o buffer temporario de pontos */ + ctgc.num_points = 0; + + /* a lista de primitivas jah estah vazia, nao hah o que apagar */ + IupSetAttribute(IupGetHandle("itEditUndo"), IUP_ACTIVE, IUP_NO); + + /* atualiza o tamanho do canvas em pixels na barra de titulo */ + sprintf(ctgc.title, "CDTest 5.3 (%dx%d - %dbpp)", ctgc.w, ctgc.h, ctgc.bpp); + IupSetAttribute(IupGetHandle("dlgMain"), IUP_TITLE, ctgc.title); + + /* inicializa a barra de status */ + sprintf(ctgc.status_line, "LEFT click and drag."); + set_status(); + + /* inicializa a posiccao do mouse */ + mouse_pos(0, 0); + + /* constroi os dialogos do CDTest sem mostra-los */ + IupMap(IupGetHandle("dlgLB")); + IupMap(IupGetHandle("dlgAS")); + IupMap(IupGetHandle("dlgPixel")); + IupMap(IupGetHandle("dlgImage")); + IupMap(IupGetHandle("dlgImageRGB")); + IupMap(IupGetHandle("dlgMark")); + IupMap(IupGetHandle("dlgText")); + IupMap(IupGetHandle("dlgClip")); + IupMap(IupGetHandle("dlgAttributes")); + IupMap(IupGetHandle("dlgWDCanvas")); + IupMap(IupGetHandle("dlgPICCanvas")); + + /* cria o canvas WD */ + if (use_gdiplus) cdUseContextPlus(1); + ctgc.wd_canvas = cdCreateCanvas(CD_IUP, IupGetHandle("cnvWDCanvas")); + ctgc.pic_canvas = cdCreateCanvas(CD_IUP, IupGetHandle("cnvPICCanvas")); + ctgc.picture = cdCreateCanvas(CD_PICTURE, ""); + if (use_gdiplus) cdUseContextPlus(0); + + /* CDTEST default values */ + cdActivate(ctgc.picture); + cdLineStyleDashes(ctgc.dashes, 4); + cdPattern(10, 10, ctgc.pattern); + cdStipple(10, 10, ctgc.stipple); + cdInteriorStyle(CD_SOLID); + + cdActivate(ctgc.wd_canvas); + cdLineStyleDashes(ctgc.dashes, 4); + cdPattern(10, 10, ctgc.pattern); + cdStipple(10, 10, ctgc.stipple); + cdInteriorStyle(CD_SOLID); + + /* reativa o canvas IUP */ + cdActivate(ctgc.iup_canvas); + cdLineStyleDashes(ctgc.dashes, 4); + cdPattern(10, 10, ctgc.pattern); + cdStipple(10, 10, ctgc.stipple); + cdInteriorStyle(CD_SOLID); +} + +static void CDTestClose(void) +{ + dellist(); + + ColorBarClose(); + + if (ctgc.buffer_canvas) cdKillCanvas(ctgc.buffer_canvas); + if (ctgc.test_image) cdKillImage(ctgc.test_image); + cdKillCanvas(ctgc.picture); + cdKillCanvas(ctgc.pic_canvas); + cdKillCanvas(ctgc.wd_canvas); + cdKillCanvas(ctgc.iup_canvas); + + memset(&ctgc, 0, sizeof(tCTC)); + + IupDestroy(IupGetHandle("dlgLB")); + IupDestroy(IupGetHandle("dlgAS")); + IupDestroy(IupGetHandle("dlgPixel")); + IupDestroy(IupGetHandle("dlgImage")); + IupDestroy(IupGetHandle("dlgImageRGB")); + IupDestroy(IupGetHandle("dlgMark")); + IupDestroy(IupGetHandle("dlgText")); + IupDestroy(IupGetHandle("dlgClip")); + IupDestroy(IupGetHandle("dlgAttributes")); + IupDestroy(IupGetHandle("dlgWDCanvas")); + IupDestroy(IupGetHandle("dlgPICCanvas")); + + IupDestroy(IupGetHandle("dlgMain")); +} + +static int iscurvisible(void) +{ + char* vis = IupGetAttribute(ctgc.dlg_cur_prim, IUP_VISIBLE); + if (!vis) + return 0; + return strcmp(vis, IUP_YES) == 0? 1: 0; +} + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo da lista de primitivas para o dispositivo ativo. */ +/*-------------------------------------------------------------------------*/ +void putlist(cdCanvas *target) +{ + tList *temp; + int wdc_w, wdc_h, wd = 0; + + /* ativa o canvas destino */ + cdActivate(target); + + if (target == ctgc.wd_canvas) + { + cdGetCanvasSize(&wdc_w, &wdc_h, NULL, NULL); + wdWindow(0, ctgc.w, 0, ctgc.h); + wdViewport(0, wdc_w, 0, wdc_h); + wd = 1; + } + + /* limpa o canvas com a cor de fundo */ + cdBackground(ctgc.background); + cdClear(); + cdClipArea(ctgc.clip_xmin, ctgc.clip_xmax, ctgc.clip_ymin, ctgc.clip_ymax); + cdClip(ctgc.clip_mode); + + /* coloca a lista de primitivas no canvas */ + for (temp = ctgc.head; temp; temp = (tList *) temp->next) + { + switch (temp->type) { + case LINE: + cdWriteMode(temp->par.lineboxpar.write_mode); + cdLineCap(temp->par.lineboxpar.line_cap); + cdLineJoin(temp->par.lineboxpar.line_join); + cdLineStyle(temp->par.lineboxpar.line_style); + cdLineWidth(temp->par.lineboxpar.line_width); + cdForeground(temp->par.lineboxpar.foreground); + if (wd) + wdLine(temp->par.lineboxpar.x1, temp->par.lineboxpar.y1, + temp->par.lineboxpar.x2, temp->par.lineboxpar.y2); + else + cdLine(temp->par.lineboxpar.x1, temp->par.lineboxpar.y1, + temp->par.lineboxpar.x2, temp->par.lineboxpar.y2); + break; + case RECT: + cdWriteMode(temp->par.lineboxpar.write_mode); + cdLineCap(temp->par.lineboxpar.line_cap); + cdLineJoin(temp->par.lineboxpar.line_join); + cdLineStyle(temp->par.lineboxpar.line_style); + cdLineWidth(temp->par.lineboxpar.line_width); + cdForeground(temp->par.lineboxpar.foreground); + if (wd) + wdRect(temp->par.lineboxpar.x1, temp->par.lineboxpar.x2, + temp->par.lineboxpar.y1, temp->par.lineboxpar.y2); + else + cdRect(temp->par.lineboxpar.x1, temp->par.lineboxpar.x2, + temp->par.lineboxpar.y1, temp->par.lineboxpar.y2); + break; + case BOX: + cdWriteMode(temp->par.lineboxpar.write_mode); + cdLineCap(temp->par.lineboxpar.line_cap); + cdLineJoin(temp->par.lineboxpar.line_join); + cdLineStyle(temp->par.lineboxpar.line_style); + cdLineWidth(temp->par.lineboxpar.line_width); + cdForeground(temp->par.lineboxpar.foreground); + cdBackground(temp->par.lineboxpar.background); + cdBackOpacity(temp->par.lineboxpar.back_opacity); + cdHatch(temp->par.lineboxpar.hatch); + cdInteriorStyle(temp->par.lineboxpar.interior_style); + if (wd) + wdBox(temp->par.lineboxpar.x1, temp->par.lineboxpar.x2, + temp->par.lineboxpar.y1, temp->par.lineboxpar.y2); + else + cdBox(temp->par.lineboxpar.x1, temp->par.lineboxpar.x2, + temp->par.lineboxpar.y1, temp->par.lineboxpar.y2); + break; + case ARC: + cdWriteMode(temp->par.arcsectorpar.write_mode); + cdLineCap(temp->par.arcsectorpar.line_cap); + cdLineJoin(temp->par.arcsectorpar.line_join); + cdLineStyle(temp->par.arcsectorpar.line_style); + cdLineWidth(temp->par.arcsectorpar.line_width); + cdForeground(temp->par.arcsectorpar.foreground); + if (wd) + wdArc(temp->par.arcsectorpar.xc, temp->par.arcsectorpar.yc, + temp->par.arcsectorpar.w, temp->par.arcsectorpar.h, + temp->par.arcsectorpar.angle1, temp->par.arcsectorpar.angle2); + else + cdArc(temp->par.arcsectorpar.xc, temp->par.arcsectorpar.yc, + temp->par.arcsectorpar.w, temp->par.arcsectorpar.h, + temp->par.arcsectorpar.angle1, temp->par.arcsectorpar.angle2); + break; + case CHORD: + cdWriteMode(temp->par.arcsectorpar.write_mode); + cdLineCap(temp->par.arcsectorpar.line_cap); + cdLineJoin(temp->par.arcsectorpar.line_join); + cdLineStyle(temp->par.arcsectorpar.line_style); + cdLineWidth(temp->par.arcsectorpar.line_width); + cdForeground(temp->par.arcsectorpar.foreground); + cdBackground(temp->par.arcsectorpar.background); + cdBackOpacity(temp->par.arcsectorpar.back_opacity); + cdHatch(temp->par.arcsectorpar.hatch); + cdInteriorStyle(temp->par.arcsectorpar.interior_style); + if (wd) + wdChord(temp->par.arcsectorpar.xc, temp->par.arcsectorpar.yc, + temp->par.arcsectorpar.w, temp->par.arcsectorpar.h, + temp->par.arcsectorpar.angle1, temp->par.arcsectorpar.angle2); + else + cdChord(temp->par.arcsectorpar.xc, temp->par.arcsectorpar.yc, + temp->par.arcsectorpar.w, temp->par.arcsectorpar.h, + temp->par.arcsectorpar.angle1, temp->par.arcsectorpar.angle2); + break; + case SECTOR: + cdWriteMode(temp->par.arcsectorpar.write_mode); + cdLineCap(temp->par.arcsectorpar.line_cap); + cdLineJoin(temp->par.arcsectorpar.line_join); + cdLineStyle(temp->par.arcsectorpar.line_style); + cdLineWidth(temp->par.arcsectorpar.line_width); + cdForeground(temp->par.arcsectorpar.foreground); + cdBackground(temp->par.arcsectorpar.background); + cdBackOpacity(temp->par.arcsectorpar.back_opacity); + cdHatch(temp->par.arcsectorpar.hatch); + cdInteriorStyle(temp->par.arcsectorpar.interior_style); + if (wd) + wdSector(temp->par.arcsectorpar.xc, temp->par.arcsectorpar.yc, + temp->par.arcsectorpar.w, temp->par.arcsectorpar.h, + temp->par.arcsectorpar.angle1, temp->par.arcsectorpar.angle2); + else + cdSector(temp->par.arcsectorpar.xc, temp->par.arcsectorpar.yc, + temp->par.arcsectorpar.w, temp->par.arcsectorpar.h, + temp->par.arcsectorpar.angle1, temp->par.arcsectorpar.angle2); + break; + case PIXEL: + cdWriteMode(temp->par.pixelpar.write_mode); + cdPixel(temp->par.pixelpar.x, temp->par.pixelpar.y, + temp->par.pixelpar.foreground); + break; + case MARK: + cdWriteMode(temp->par.markpar.write_mode); + cdMarkSize(temp->par.markpar.mark_size); + cdMarkType(temp->par.markpar.mark_type); + cdForeground(temp->par.markpar.foreground); + if (wd) + wdMark(temp->par.markpar.x, temp->par.markpar.y); + else + cdMark(temp->par.markpar.x, temp->par.markpar.y); + break; + case TEXT: + cdWriteMode(temp->par.textpar.write_mode); + cdForeground(temp->par.textpar.foreground); + cdBackground(temp->par.textpar.background); + cdBackOpacity(temp->par.textpar.back_opacity); + cdTextAlignment(temp->par.textpar.text_alignment); + cdTextOrientation(temp->par.textpar.text_orientation); + cdFont(temp->par.textpar.font_typeface, + temp->par.textpar.font_style, + temp->par.textpar.font_size); + if (wd) + wdText(temp->par.textpar.x, temp->par.textpar.y, + temp->par.textpar.s); + else + cdText(temp->par.textpar.x, temp->par.textpar.y, + temp->par.textpar.s); + break; + case POLY: { + int i; + cdForeground(temp->par.polypar.foreground); + cdBackground(temp->par.polypar.background); + cdWriteMode(temp->par.polypar.write_mode); + cdLineCap(temp->par.polypar.line_cap); + cdLineJoin(temp->par.polypar.line_join); + cdLineStyle(temp->par.polypar.line_style); + cdLineWidth(temp->par.polypar.line_width); + cdFillMode(temp->par.polypar.fill_mode); + cdBackOpacity(temp->par.polypar.back_opacity); + cdHatch(temp->par.polypar.hatch); + cdInteriorStyle(temp->par.polypar.interior_style); + cdBegin(temp->par.polypar.poly_mode); + if (wd) + for (i=0; (ipar.polypar.num_points); i++) { + wdVertex(temp->par.polypar.points[i].x, + temp->par.polypar.points[i].y); + } + else + for (i=0; (ipar.polypar.num_points); i++) { + cdVertex(temp->par.polypar.points[i].x, + temp->par.polypar.points[i].y); + } + cdEnd(); + break; + case META: + cdWriteMode(CD_REPLACE); + cdLineStyle(CD_CONTINUOUS); + cdLineWidth(1); + cdBackground(CD_WHITE); + cdBackOpacity(CD_TRANSPARENT); + cdForeground(CD_BLACK); + cdInteriorStyle(CD_SOLID); + if (ctgc.stretch_play) + { + if (wd) + cdPlay(temp->par.metapar.ctx, 0, wdc_w-1, 0, wdc_h-1, temp->par.metapar.filename); + else + cdPlay(temp->par.metapar.ctx, 0, ctgc.w-1, 0, ctgc.h-1, temp->par.metapar.filename); + } + else + cdPlay(temp->par.metapar.ctx, 0, 0, 0, 0, temp->par.metapar.filename); + break; + default: + break; + } + } + } + + /* volta o clip-mode para o corrente */ + cdClip(ctgc.clip_mode); +} + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo da lista de primitivas no canvas WD. */ +/*-------------------------------------------------------------------------*/ +int fWDRepaint(void) +{ + putlist(ctgc.wd_canvas); + + /* reativa o canvas iup */ + cdActivate(ctgc.iup_canvas); + + return IUP_DEFAULT; +} + +int fPICRepaint(void) +{ + int w, h; + putlist(ctgc.picture); + + cdActivate(ctgc.pic_canvas); + cdGetCanvasSize(&w, &h, NULL, NULL); + cdClear(); + if (ctgc.stretch_play) + cdPlay(CD_PICTURE, 0, w-1, 0, h-1, ctgc.picture); + else + cdPlay(CD_PICTURE, 0, 0, 0, 0, ctgc.picture); + + /* reativa o canvas iup */ + cdActivate(ctgc.iup_canvas); + + return IUP_DEFAULT; +} + +/*-------------------------------------------------------------------------*/ +/* Redesenha o canvas. */ +/*-------------------------------------------------------------------------*/ +void updatecanvas(void) +{ + if (ctgc.buffering == NO_BUFFER) + putlist(ctgc.iup_canvas); + else + { + cdActivate(ctgc.iup_canvas); + cdClip(CD_CLIPOFF); + + putlist(ctgc.buffer_canvas); + cdFlush(); + + cdActivate(ctgc.iup_canvas); + cdClip(ctgc.clip_mode); + } + + if (ctgc.wd_dialog) + fWDRepaint(); + + if (ctgc.pic_dialog) + fPICRepaint(); +} + +/*-------------------------------------------------------------------------*/ +/* Redesenha o canvas. */ +/*-------------------------------------------------------------------------*/ +int fRepaint(void) +{ + int i; + + /* ativa o canvas na tela */ + cdActivate(ctgc.iup_canvas); + wdViewport(0, ctgc.w, 0, ctgc.h); + + /* desliga o clipping durante o evento Repaint */ + cdClip(CD_CLIPOFF); + + /* double-buffering? */ + cdWriteMode(CD_REPLACE); + updatecanvas(); + + /* se o evento repaint for gerado durante o rubber band...*/ + /* ...eh preciso restaurar o estado anterior */ + if (ctgc.following) { + cdWriteMode(CD_NOT_XOR); + cdForeground(CD_BLACK); + cdLineStyle(CD_CONTINUOUS); + cdLineWidth(1); + switch (ctgc.cur_prim) { + case POLY: + for (i=0; (i 1) { + cdBegin(ctgc.poly_mode); + for (a=0; (a='0') && ((_)<='9')) +#define ignore(_) (void)(_) + +/*-------------------------------------------------------------------------*/ +/* Tipos enumerados. */ +/*-------------------------------------------------------------------------*/ +typedef enum { + LINE, + RECT, + BOX, + ARC, + SECTOR, + CHORD, + PIXEL, + MARK, + TEXT, + POLY, + CLIP, + IMAGE, + RGB, + META +} tPrim; + +enum { + BACKGROUND, + FOREGROUND +}; + +enum { + NO_BUFFER, + IMAGE_BUFFER, + IMAGERGB_BUFFER +}; + +typedef enum { + NEWPOINT, + MOVE, + CLOSE, + CENTER, + REPAINT +} tRubber; + +#if ((!defined(FALSE))&&(!defined(TRUE))) +typedef enum { + FALSE, + TRUE +} tBoolean; +#else +#define tBoolean int +#endif + +/*-------------------------------------------------------------------------*/ +/* Definicao das estruturas de dados usadas. */ +/*-------------------------------------------------------------------------*/ +typedef struct { + int x, y; +} tPoint; + +typedef struct { + cdContext* ctx; + char *filename; +} tMeta; + +typedef struct { + int x1; + int y1; + int x2; + int y2; + int write_mode; + int line_style; + int line_width; + int line_cap; + int line_join; + int interior_style; + int back_opacity; + int hatch; + long foreground; + long background; +} tLB; /* cdLine ou cdBox ou cdRect */ + +typedef struct { + int xc; + int yc; + int w; + int h; + double angle1; + double angle2; + int write_mode; + int line_style; + int line_width; + int line_cap; + int line_join; + int interior_style; + int back_opacity; + int hatch; + long foreground; + long background; +} tAS; /* cdArc e cdSector e Chord */ + +typedef struct { + int x; + int y; + int write_mode; + long foreground; +} tPixel; /* cdPixel */ + +typedef struct { + int x; + int y; + int write_mode; + int mark_type; + int mark_size; + long foreground; +} tMark; /* cdMark */ + +typedef struct { + int x; + int y; + char *s; + int write_mode; + int font_size; + int font_style; + int font_typeface; + int back_opacity; + double text_orientation; + int text_alignment; + long foreground; + long background; +} tText; /* cdText */ + +typedef struct { + int poly_mode; + int write_mode; + int line_style; + int line_width; + int line_cap; + int line_join; + int fill_mode; + int back_opacity; + int interior_style; + int hatch; + long foreground; + long background; + int num_points; + tPoint *points; +} tPoly; /* cdBegin, cdVertex e cdEnd */ + +typedef struct tnode { + tPrim type; + union { + tLB lineboxpar; + tAS arcsectorpar; + tPoly polypar; + tPixel pixelpar; + tMark markpar; + tText textpar; + tMeta metapar; + } par; + struct tnode *next; +} tList; + +/*-------------------------------------------------------------------------*/ +/* Contexto do CD Test. */ +/*-------------------------------------------------------------------------*/ +typedef struct { + cdCanvas *iup_canvas; /* canvas do iup */ + int w, h; /* largura e altura do canvas */ + double res; + int bpp; + + cdCanvas *wd_canvas; /* canvas IUP p/ WD */ + int wd_dialog; /* se o dialogo do canvas WD estah na tela */ + + cdCanvas *pic_canvas; /* canvas IUP p/ Picture */ + cdCanvas *picture; /* Picture */ + int pic_dialog; /* se o dialogo do canvas Picture estah na tela */ + + cdCanvas *buffer_canvas; /* canvas para double-buffering */ + int buffering; + + Ihandle *dlg_cur_prim; /* handle do dialogo de primitiva ativo */ + Ihandle *bt_cur_prim; /* handle do botao da primitiva corente */ + + tPrim cur_prim; /* primitiva corrente */ + tBoolean following; /* flag de rubber-band */ + int dlg_x; + int dlg_y; + int visible; + + int write_mode; /* atributos do CD */ + int line_cap; + int line_join; + int line_style; + int line_width; + int fill_mode; + int font_typeface; + int font_style; + int font_size; + int text_alignment; + double text_orientation; + int back_opacity; + int mark_type; + int poly_mode; + long foreground; + long background; + int interior_style; + int hatch; + + unsigned char stipple[100];/* sample stipple */ + long pattern[100]; /* sample pattern */ + int dashes[4]; /* sample dash */ + + int clip_xmin; + int clip_xmax; + int clip_ymin; + int clip_ymax; + int clip_mode; + + unsigned char *red; /* imagem RGB */ + unsigned char *green; + unsigned char *blue; + int rgb_w, rgb_h; /* largura e altura da imagem RGB */ + + cdImage *test_image; /* imagem off-screen para testes */ + + int num_points; /* numero de pontos no poligono corrente */ + tPoint points[MAXPOINTS]; /* armazanamento temporario do poligono */ + + char status_line[256]; /* linha de status */ + char title[80]; /* barra de titulo do programa */ + + int x, y; /* posiccao do mouse no canvas */ + char mouse_pos[40]; /* posiccao do mouse em uma string */ + + int sim; /* flag para simulacao */ + int stretch_play; + + tList *head; /* lista de primitivas */ +} tCTC; /* CD Test Context */ + +extern tCTC ctgc; + +/* parametros geometricos das primitivas */ +typedef struct { + int x1, x2, y1, y2; +} tLinePos; + +typedef struct { + int xmin, xmax, ymin, ymax; + int x, y; +} tBoxPos; + +typedef struct { + int x, y; +} tPixelPos; + +typedef struct { + int x, y; + int size; +} tMarkPos; + +typedef struct { + int xc, yc; + int w, h; + double angle1, angle2; +} tArcPos; + +/*-------------------------------------------------------------------------*/ +/* Funccoes do modulo CDTEST.C. */ +/*-------------------------------------------------------------------------*/ +int fEditUndo(void); +int fEditClear(void); + +int fRepaint(void); +int fFileExit(void); +int fOK(void); +int fOpenLines(void); +int fClosedLines(void); +int fPolyBezier(void); +int fFill(void); +int fSolid(void); +int fHatch(void); +int fStipple(void); +int fPattern(void); + +int fPolyClip(void); +int fClipPoly(void); + +int fWDCanvas(void); +int fCloseWD(void); +int fWDRepaint(void); + +int fPICCanvas(void); +int fClosePIC(void); +int fPICRepaint(void); + +int fOpacity(Ihandle *, char *, int, int); +int fMarkType(Ihandle *, char *, int, int); + +int fNoBuffering(Ihandle *, int); +int fImageBuffer(Ihandle *, int); +int fRGBBuffer(Ihandle *, int); + +int fWriteMode(Ihandle *, char *, int, int); +int fLineStyle(Ihandle *, char *, int, int); +int fLineCap(Ihandle *, char *, int, int); +int fLineJoin(Ihandle *, char *, int, int); +int fFillMode(Ihandle *, char *, int, int); +int fFontStyle(Ihandle *, char *, int, int); +int fFontTypeFace(Ihandle *, char *, int, int); +int fTextAlignment(Ihandle *, char *, int, int); +int fHatchStyle(Ihandle *, char *, int, int); + +int fColor(Ihandle *); + +int fClip(Ihandle *); +int fClipArea(void); +int fClipOff(void); + +int fImage(Ihandle *); +int fImagePut(void); +int fImageGet(void); + +int fImageRGB(Ihandle *); +int fImageRGBPut(void); +int fImageRGBGet(void); + +int fLine(Ihandle *); +int fRect(Ihandle *); +int fBox(Ihandle *); +int fArc(Ihandle *); +int fSector(Ihandle *); +int fChord(Ihandle *); +int fPixel(Ihandle *); +int fMark(Ihandle *); +int fText(Ihandle *); +int fPoly(Ihandle *); + +int fShowDialog(void); + +int fStretchPlay(Ihandle*, int); +int fSimulate(Ihandle *, int); +int fOptionsHide(void); +int fOptions(void); +int fAttributes(void); +int fAttributesHide(void); +int fMsgHide(void); + +int fInteger(Ihandle *, int); +int fReal(Ihandle *, int); + +int fDraw(void); + +int fHelpAbout(void); +int fCloseAbout(void); + +int fMotionCB(Ihandle *, int, int, char *); +int fButtonCB(Ihandle *, int, int, int, int, char *); +int fResizeCB(Ihandle *, int, int); +int fGetFocusCB(Ihandle *); + +void set_status(void); +void mouse_pos(int, int); +void putlist(cdCanvas *target); +void draw(void); + +/*-------------------------------------------------------------------------*/ +/* Funccoes do modulo RUBBER.C. */ +/*-------------------------------------------------------------------------*/ +void follow(int, int); +void line(tRubber, int, int); +void box(tRubber, int, int); +void arc(tRubber, int, int); +void polygon(tRubber, int, int); + +/*-------------------------------------------------------------------------*/ +/* Funccoes do modulo LIST.C. */ +/*-------------------------------------------------------------------------*/ +int newpolypoint(int, int); +int newline(int, int, int, int); +int newrect(int, int, int, int); +int newbox(int, int, int, int); +int newarc(int, int, int, int, double, double); +int newsector(int, int, int, int, double, double); +int newchord(int, int, int, int, double, double); +int newpixel(int, int); +int newmark(int, int, int); +int newtext(int, int, char *); +int newmetafile(char *, cdContext* ctx); +int newpoly(void); +void dellist(void); +void dellast(void); + +/*-------------------------------------------------------------------------*/ +/* Funccoes do modulo DRIVERS.C. */ +/*-------------------------------------------------------------------------*/ +void DriversInit(void); + +/*-------------------------------------------------------------------------*/ +/* Funccoes do modulo COLORBAR.C. */ +/*-------------------------------------------------------------------------*/ +int ColorBarInit(Ihandle *parent, Ihandle *canvas, long *foreground, long *background); +void ColorBarClose(void); + +#endif diff --git a/cd/test/cdtest/cdtest.ico b/cd/test/cdtest/cdtest.ico new file mode 100755 index 0000000..ba4b8af Binary files /dev/null and b/cd/test/cdtest/cdtest.ico differ diff --git a/cd/test/cdtest/cdtest.led b/cd/test/cdtest/cdtest.led new file mode 100755 index 0000000..1f2c412 --- /dev/null +++ b/cd/test/cdtest/cdtest.led @@ -0,0 +1,1508 @@ +#===========================================================================# +# CDTEST.LED - 05/12/95 # +#===========================================================================# + +#---------------------------------------------------------------------------# +# Icones da Barra de Primitivas. # +#---------------------------------------------------------------------------# +imgLine = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgClip = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0, + 0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0, + 0,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0, + 0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,0,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0, + 0,0,0,1,1,0,0,0,0,1,0,1,1,0,0,0,0,0, + 0,0,0,1,1,0,0,0,1,0,0,1,1,0,0,0,0,0, + 0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,0,0,0, + 0,0,0,1,1,0,1,0,0,0,0,1,1,0,0,0,0,0, + 0,0,0,1,1,1,0,0,0,0,0,1,1,0,0,0,0,0, + 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, + 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgImage = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0", + 2 = "255 255 255", + 3 = "153 153 153" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0, + 0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0, + 0,0,0,0,1,1,2,2,2,2,2,1,1,0,0,0,0,0, + 0,0,0,0,1,1,2,2,2,2,2,1,1,0,0,0,0,0, + 0,0,0,1,1,2,1,1,2,1,1,2,1,1,0,0,0,0, + 0,0,0,1,2,2,1,2,2,2,1,2,2,1,0,0,0,0, + 0,0,0,1,2,2,2,2,1,2,2,2,2,1,0,0,0,0, + 0,0,0,1,1,2,2,2,1,3,2,2,1,1,0,0,0,0, + 0,0,0,0,1,2,2,2,2,1,2,2,1,3,0,0,0,0, + 0,0,0,0,1,2,2,2,1,1,2,2,1,3,0,0,0,0, + 0,0,0,0,1,2,2,2,2,2,2,2,1,3,0,0,0,0, + 0,0,0,0,0,1,2,1,3,1,2,1,3,0,0,0,0,0, + 0,0,0,0,0,1,2,2,1,3,2,1,3,0,0,0,0,0, + 0,0,0,0,0,0,1,2,2,2,1,3,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,1,1,3,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,2,1,3,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,2,1,3,0,0,0,0,0,0,0 +) + +imgImageRGB = IMAGE +[ + 0 = "BGCOLOR", + 1 = "255 0 0", + 2 = "0 255 0", + 3 = "0 0 255" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0, + 0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0, + 0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0, + 0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0, + 0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0, + 0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0, + 0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0, + 0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0, + 0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0, + 0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgBox = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0", + 2 = "255 255 255" +] +( + 18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,0,0, + 0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,0,0, + 0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,0,0, + 0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,0,0, + 0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,0,0, + 0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,0,0, + 0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,0,0, + 0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgRect = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0", + 2 = "255 255 255" +] +( + 18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0, + 0,0,1,0,0,0,0,0,2,2,2,2,2,2,2,2,0,0, + 0,0,1,0,0,0,0,0,2,0,0,0,1,0,0,2,0,0, + 0,0,1,0,0,0,0,0,2,0,0,0,1,0,0,2,0,0, + 0,0,1,0,0,0,0,0,2,0,0,0,1,0,0,2,0,0, + 0,0,1,1,1,1,1,1,2,1,1,1,1,0,0,2,0,0, + 0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0, + 0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0, + 0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgSector = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0" , + 2 = "255 255 255" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0, + 0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,0,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,2,2,2,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,0,0,0, + 0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,0,0, + 0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,0,0, + 0,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,0,0, + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, + 0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, + 0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgChord = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0" , + 2 = "255 255 255" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,1,1,2,2,2,0,0,0,0,0,0,0, + 0,0,0,0,1,1,1,1,1,2,2,2,2,0,0,0,0,0, + 0,0,0,1,1,1,1,1,1,1,2,2,2,2,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,2,2,2,0,0,0, + 0,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,0,0, + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,0,0, + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,0, + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, + 0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, + 0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgArc = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0", + 2 = "255 255 255" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0, + 0,0,0,2,0,0,0,2,0,0,1,2,2,0,0,0,0,0, + 0,0,0,0,2,2,2,0,1,1,0,0,0,2,2,0,0,0, + 0,0,0,0,0,0,0,0,1,0,0,0,0,0,2,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0, + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0, + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0, + 0,0,0,0,0,0,0,0,1,0,0,0,0,0,2,0,0,0, + 0,0,0,0,0,0,0,0,1,1,0,0,0,2,2,0,0,0, + 0,0,0,0,0,0,0,0,0,0,1,1,2,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgText = IMAGE +[ + 0 = "BGCOLOR", + 1 = "255 255 255", + 2 = "0 0 0" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,2,2,2,2,0,0,0,0,0,0,0,0,0,0, + 0,0,0,2,2,0,0,2,2,0,0,1,1,0,0,0,0,0, + 0,0,2,2,0,0,0,0,2,2,0,0,1,0,0,0,0,0, + 0,0,2,2,0,0,0,0,2,2,0,0,1,0,0,0,0,0, + 0,0,2,2,0,0,0,0,2,2,0,0,1,1,1,1,0,0, + 0,0,2,2,2,2,2,2,2,2,0,0,1,0,0,0,1,0, + 0,0,2,2,0,0,0,0,2,2,0,0,1,0,0,0,1,0, + 0,0,2,2,0,0,0,0,2,2,0,0,1,0,0,0,1,0, + 0,0,2,2,0,0,0,0,2,2,0,0,1,0,0,0,1,0, + 0,0,2,2,0,0,0,0,2,2,0,1,1,1,1,1,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgPoly = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0, + 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0, + 0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0, + 0,0,1,1,1,1,0,0,0,0,1,1,1,0,0,0,0,0, + 0,0,0,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0, + 0,0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,0,0, + 0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0, + 0,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0, + 0,0,0,1,1,0,0,0,0,0,0,1,1,1,1,0,0,0, + 0,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgMark = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0, + 0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0, + 0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0, + 0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0, + 0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, + 0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0, + 0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0, + 0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +imgPixel = IMAGE +[ + 0 = "BGCOLOR", + 1 = "0 0 0", + 2 = "255 255 255" +] +(18, 18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,2,2,0,0,0,0,0,0,0,2,2,0,0,0,0, + 0,0,0,2,2,0,0,0,0,0,0,0,2,2,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,2,2,0,0,0,1,1,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +) + +#---------------------------------------------------------------------------# +# Descricao dos Menus. # +#---------------------------------------------------------------------------# +mnOpen = MENU +( + ITEM("MF...", cmdPlayMF), + itPlayCGM = ITEM[ACTIVE=NO]("CGM...", cmdPlayCGM), + itPlayEMF = ITEM[ACTIVE=NO]("EMF...", cmdPlayEMF), + itPlayWMF = ITEM[ACTIVE=NO]("WMF...", cmdPlayWMF) +) + +mnSave = MENU +( + ITEM("MF...", cmdMF), + itPDF = ITEM[ACTIVE=NO]("PDF...", cmdPDF), + itPS = ITEM[ACTIVE=NO]("PS...", cmdPS), + itEPS = ITEM[ACTIVE=NO]("EPS...", cmdEPS), + itCGMt = ITEM[ACTIVE=NO]("CGMt...", cmdCGMt), + itCGMb = ITEM[ACTIVE=NO]("CGMb...", cmdCGMb), + itDGN = ITEM[ACTIVE=NO]("DGN...", cmdDGN), + itDXF = ITEM[ACTIVE=NO]("DXF...", cmdDXF), + itEMF = ITEM[ACTIVE=NO]("EMF...", cmdEMF), + itWMF = ITEM[ACTIVE=NO]("WMF...", cmdWMF) +) + +mnFile = MENU +( + SUBMENU[KEY=K_O]("Open", mnOpen), + SEPARATOR(), + SUBMENU[KEY=K_S]("Save", mnSave), + SEPARATOR(), + itPrint = ITEM[KEY=K_P]("Print...", cmdPrint), + SEPARATOR(), + ITEM[KEY=K_x]("Exit", cmdFileExit) +) + +mnEdit = MENU +( + itEditUndo = ITEM("Undo", cmdEditUndo), + SEPARATOR(), + itClipBoard = ITEM[ACTIVE=NO]("Copy as EMF/WMF", cmdClipBoard), + itClipBoardBitmap = ITEM[ACTIVE=NO]("Copy as Bitmap", cmdClipBoardBitmap), + itClipBoardMetafile = ITEM[ACTIVE=NO]("Copy as CD Metafile", cmdClipBoardMetafile), + itClipBoardPaste = ITEM[ACTIVE=NO]("Paste", cmdClipBoardPaste), + SEPARATOR(), + ITEM("Clear", cmdEditClear), + SEPARATOR(), + ITEM("Options...", cmdOptions) +) + +mnPrimitives = MENU +( + ITEM("Pixel...", cmdPixel), + ITEM("Mark...", cmdMark), + ITEM("Line...", cmdLine), + ITEM("Polygon...", cmdPoly), + ITEM("Rect...", cmdRect), + ITEM("Box...", cmdBox), + ITEM("Arc...", cmdArc), + ITEM("Sector...", cmdSector), + ITEM("Chord...", cmdChord), + ITEM("Text...", cmdText), + SEPARATOR(), + ITEM("Server Image...", cmdImage), + ITEM("RGB Image...", cmdImageRGB) +) + +mnDraw = MENU[ISMENU=YES] +( + SUBMENU[KEY=K_P]("Primitives", mnPrimitives), + SEPARATOR(), + ITEM("Clipping...", cmdClip), + ITEM("Attributes...", cmdAttributes), + SEPARATOR(), + itWDCanvas = ITEM("Show WD Canvas", cmdWDCanvas), + itPICCanvas = ITEM("Show Picture Canvas", cmdPICCanvas) +) + +mnHelp = MENU +( + ITEM("About...", cmdHelpAbout) +) + +mnMain = MENU +( + SUBMENU[KEY=K_mF]("File", mnFile), + SUBMENU[KEY=K_mE]("Edit", mnEdit), + SUBMENU[KEY=K_mD]("Draw", mnDraw), + SUBMENU[KEY=K_mH]("Help", mnHelp) +) + +#===========================================================================# +# Barras de Ferramentas. # +#===========================================================================# + +#---------------------------------------------------------------------------# +# Barra de status. # +#---------------------------------------------------------------------------# +lbStatusLine = LABEL[EXPAND=HORIZONTAL]("Esta eh a barra de status do CDTest.") + +#---------------------------------------------------------------------------# +# Barra de Primitivas. # +#---------------------------------------------------------------------------# + +btLine = BUTTON[IMAGE=imgLine, TIP="Line"]("",cmdLine) +btBox = BUTTON[IMAGE=imgBox, TIP="Box"]("",cmdBox) +btRect = BUTTON[IMAGE=imgRect, TIP="Rect"]("",cmdRect) +btArc = BUTTON[IMAGE=imgArc, TIP="Arc"]("", cmdArc) +btSector = BUTTON[IMAGE=imgSector, TIP="Sector"]("", cmdSector) +btChord = BUTTON[IMAGE=imgChord, TIP="Chord"]("", cmdChord) +btPixel = BUTTON[IMAGE=imgPixel, TIP="Pixel"]("", cmdPixel) +btMark = BUTTON[IMAGE=imgMark, TIP="Mark"]("", cmdMark) +btText = BUTTON[IMAGE=imgText, TIP="Text"]("", cmdText) +btPoly = BUTTON[IMAGE=imgPoly, TIP="Polygon"]("", cmdPoly) + +btImageRGB = BUTTON[IMAGE=imgImageRGB, TIP="RGB Image"]("", cmdImageRGB) +btImage = BUTTON[IMAGE=imgImage, TIP="Server Image"]("", cmdImage) +btClip = BUTTON[IMAGE=imgClip, TIP="Clipping Area"]("", cmdClip) + +btCurPrim = BUTTON[IMAGE=imgLine, TIP="Show primitive dialog"]("", cmdShowDialog) + +lbMousePos = LABEL[SIZE=90]("( , )") + +PrimBar = VBOX[GAP=2] +( + btCurPrim, + FILL[SIZE=20](), + btPixel, + btMark, + btLine, + btPoly, + btRect, + btBox, + btArc, + btSector, + btChord, + btText, + FILL[SIZE=5](), + btImage, + btImageRGB, + FILL[SIZE=5](), + btClip, + FILL[SIZE=30]() +) + +#---------------------------------------------------------------------------# +# Barra de Cores. # +#---------------------------------------------------------------------------# +cnvColorBar = CANVAS +[ + BUTTON_CB = cmdColorBarButtonCB, + RESIZE_CB = cmdColorBarResizeCB, + SIZE = 220x12, + BORDER = NO, + EXPAND = NO +] +(cmdColorBarRepaint) + +#===========================================================================# +# Dialogo Principal # +#===========================================================================# + +#---------------------------------------------------------------------------# +# Canvas para visualizacao das primitivas. # +#---------------------------------------------------------------------------# +cnvMain = CANVAS +[ + MOTION_CB=cmdMotionCB, + BUTTON_CB=cmdButtonCB, + RESIZE_CB=cmdResizeCB +] +(cmdRepaint) + +#---------------------------------------------------------------------------# +# Area de trabalho. # +#---------------------------------------------------------------------------# +DeskTop = VBOX +( + FILL[SIZE=5](), + HBOX + ( + FILL[SIZE=5](), + PrimBar, + FILL[SIZE=2](), + VBOX + ( + FILL[SIZE=2](), + lbMousePos, + FILL[SIZE=5](), + cnvMain, + FILL[SIZE=2](), + cnvColorBar, + FILL[SIZE=5](), + lbStatusLine + ), + FILL[SIZE=5]() + ), + FILL[SIZE=5]() +) + +#---------------------------------------------------------------------------# +# Dialogo principal. # +#---------------------------------------------------------------------------# +dlgMain = DIALOG +[ + TITLE = "CD Test 5.3", + MENU = mnMain, + ICON = "CdTestIcon", + K_cZ = cmdEditUndo, + GETFOCUS_CB = cmdGetFocusCB, + KILLFOCUS_CB = cmdKillFocusCB, + CLOSE_CB = cmdFileExit +] +(DeskTop) + +#===========================================================================# +# Especificacao dos dialogos auxiliares. # +#===========================================================================# + +#---------------------------------------------------------------------------# +# Dialogo com o canvas para exibiccao de primitivas WD. # +#---------------------------------------------------------------------------# +cnvWDCanvas = CANVAS[BORDER=NO](cmdWDRepaint) +dlgWDCanvas = DIALOG +[ + TITLE = "WD Canvas", + CLISE_CB = cmdCloseWD, + SIZE = 200x200, + PARENTDIALOG="dlgMain", + GAP=5x5 +] +(cnvWDCanvas) + +cnvPICCanvas = CANVAS[BORDER=NO](cmdPICRepaint) +dlgPICCanvas = DIALOG +[ + TITLE = "PIC Canvas", + CLISE_CB = cmdClosePIC, + SIZE = 200x200, + PARENTDIALOG="dlgMain", + GAP=5x5 +] +(cnvPICCanvas) + +#---------------------------------------------------------------------------# +# Dialogo Options # +#---------------------------------------------------------------------------# +btOptionsHide = BUTTON[SIZE=30]("Hide", cmdOptionsHide) + +tgSimulate = TOGGLE[VALUE=OFF, SIZE=55]("Simulate", cmdSimulate) +tgStretchPlay = TOGGLE[VALUE=OFF, SIZE=70]("Stretch Play", cmdStretchPlay) + +tgNoBuffering = TOGGLE[VALUE=ON]("No buffering", cmdNoBuffering) +tgImageBuffer = TOGGLE("CD_DBUFFER", cmdImageBuffer) +tgRGBBuffer = TOGGLE("CD_DBUFFERRGB", cmdRGBBuffer) + +rdBuffering = RADIO +( + VBOX + ( + tgNoBuffering, + tgImageBuffer, + tgRGBBuffer + ) +) + +OptionsDesktop = VBOX +( + VBOX[GAP=2] + ( + FRAME[TITLE="Buffering:", MARGIN=5x5, SIZE=80] + ( + rdBuffering + ), + FILL[SIZE=10](), + tgSimulate, + tgStretchPlay, + FILL[SIZE=10](), + btOptionsHide, + FILL[SIZE=2]() + ) +) + +dlgOptions = DIALOG +[ + TITLE="Options", + PARENTDIALOG="dlgMain", + MAXBOX=NO, + MINBOX=NO, + RESIZE=NO, + MARGIN=5x2 +] +(OptionsDesktop) + +#---------------------------------------------------------------------------# +# Dialogo Attributes # +#---------------------------------------------------------------------------# +lstTextAlignment = LIST +[ + 1="CD_NORTH", + 2="CD_SOUTH", + 3="CD_EAST", + 4="CD_WEST", + 5="CD_NORTH_EAST", + 6="CD_NORTH_WEST", + 7="CD_SOUTH_EAST", + 8="CD_SOUTH_WEST", + 9="CD_CENTER", + 10="CD_BASE_LEFT", + 11="CD_BASE_CENTER", + 12="CD_BASE_RIGHT", + DROPDOWN=YES, + VALUE=10, + SIZE=89 +] +(cmdTextAlignment) + +txtMarkSize = TEXT[NC=4, SIZE=20x12, VALUE="10"](cmdInteger) + +lstMarkType = LIST +[ + 1="CD_PLUS", + 2="CD_STAR", + 3="CD_CIRCLE", + 4="CD_X", + 5="CD_BOX", + 6="CD_DIAMOND", + 7="CD_HOLLOW_CIRCLE", + 8="CD_HOLLOW_BOX", + 9="CD_HOLLOW_DIAMOND", + DROPDOWN=YES, + VALUE=2, + SIZE=80 +](cmdMarkType) + +lstWriteMode = LIST +[ + 1="CD_REPLACE", + 2="CD_XOR", + 3="CD_NOT_XOR", + VALUE=1, + DROPDOWN=YES, + SIZE=80 +] +(cmdWriteMode) + +lstFontTypeFace = LIST +[ + 1="CD_SYSTEM", + 2="CD_COURIER", + 3="CD_TIMES_ROMAN", + 4="CD_HELVETICA", + VALUE=1, + DROPDOWN=YES, + SIZE=80 +] +(cmdFontTypeFace) + +lstLineCap = LIST +[ + 1="CD_CAPFLAT", + 2="CD_CAPSQUARE", + 3="CD_CAPROUND", + VALUE=1, + DROPDOWN=YES, + SIZE=80 +] +(cmdLineCap) + +lstLineJoin = LIST +[ + 1="CD_BEVEL", + 2="CD_MITER", + 3="CD_ROUND", + VALUE=1, + DROPDOWN=YES, + SIZE=80 +] +(cmdLineJoin) + +lstFillMode = LIST +[ + 1="CD_EVENODD", + 2="CD_WINDING", + VALUE=1, + DROPDOWN=YES, + SIZE=80 +] +(cmdFillMode) + +lstFontStyle = LIST +[ + 1="CD_PLAIN", + 2="CD_BOLD", + 3="CD_ITALIC", + 4="CD_BOLD_ITALIC", + VALUE=1, + DROPDOWN=YES, + SIZE=80 +] +(cmdFontStyle) + +txtLineWidth = TEXT[SIZE=30, NC=3, VALUE="1"](cmdInteger) +txtFontSize = TEXT[SIZE=30, NC=3, VALUE="12"](cmdInteger) +txtTextOrientation = TEXT[SIZE=30, NC=3, VALUE="0"](cmdInteger) + +lstLineStyle = LIST +[ + 1="CD_CONTINUOUS", + 2="CD_DASHED", + 3="CD_DOTTED", + 4="CD_DASH_DOT", + 5="CD_DASH_DOT_DOT", + 6="CD_CUSTOM", + VALUE=1, + DROPDOWN=YES, + SIZE=80 +] +(cmdLineStyle) + +tgSolid = TOGGLE[VALUE=ON] ("CD_SOLID", cmdSolid) +tgHatch = TOGGLE("CD_HATCH", cmdHatch) +tgStipple = TOGGLE("CD_STIPPLE", cmdStipple) +tgPattern = TOGGLE("CD_PATTERN", cmdPattern) + +lstOpacity = LIST +[ + 1="CD_OPAQUE", + 2="CD_TRANSPARENT", + VALUE=2, + DROPDOWN=YES, + SIZE=80, + ACTIVE=YES +] +(cmdOpacity) + +lstHatchStyle = LIST +[ + 1="CD_HORIZONTAL", + 2="CD_VERTICAL", + 3="CD_FDIAGONAL", + 4="CD_BDIAGONAL", + 5="CD_CROSS", + 6="CD_DIAGCROSS", + VALUE=1, + DROPDOWN=YES, + SIZE=80, + ACTIVE=YES +] +(cmdHatchStyle) + +btAttributesHide = BUTTON[SIZE=30]("Hide", cmdAttributesHide) + +rdInteriorStyle = RADIO +( + VBOX + ( + tgSolid, + tgHatch, + tgStipple, + tgPattern + ) +) + +AttributesDesktop = VBOX +( + HBOX + ( + VBOX[GAP=2] + ( + LABEL("Write Mode:"), + lstWriteMode, + FILL[SIZE=4](), + FRAME[TITLE="Fill Attributes", MARGIN=5x5] + ( + VBOX + ( + LABEL("Back Opacity:"), + lstOpacity, + FILL[SIZE=2](), + LABEL("Fill Mode:"), + lstFillMode, + FILL[SIZE=2](), + FRAME[TITLE="Interior Style:", MARGIN=5x5, SIZE=80] + ( + rdInteriorStyle + ), + FILL[SIZE=2](), + LABEL("Hatch Style:"), + lstHatchStyle + ) + ), + FILL[SIZE=10](), + FRAME[TITLE="Mark Attributes", MARGIN=5x5] + ( + VBOX + ( + LABEL("Mark Type:"), + lstMarkType, + FILL[SIZE=2](), + LABEL("Mark Size:"), + txtMarkSize + ) + ), + FILL[SIZE=10](), + btAttributesHide + ), + VBOX[GAP=2] + ( + FRAME[TITLE="Text Attributes", MARGIN=5x5] + ( + VBOX + ( + LABEL("Font Typeface:"), + lstFontTypeFace, + FILL[SIZE=2](), + LABEL("Font Style:"), + lstFontStyle, + FILL[SIZE=2](), + LABEL("Font Size:"), + txtFontSize, + FILL[SIZE=2](), + LABEL[SIZE=x9]("Text Alignment:"), + lstTextAlignment, + FILL[SIZE=2](), + LABEL[SIZE=x9]("Text Orientation:"), + txtTextOrientation + ) + ), + FILL[SIZE=10](), + FRAME[TITLE="Line Attributes", MARGIN=5x5] + ( + VBOX + ( + LABEL("Line Style:"), + lstLineStyle, + FILL[SIZE=2](), + LABEL("Line Width:"), + txtLineWidth, + FILL[SIZE=2](), + LABEL("Line Cap:"), + lstLineCap, + FILL[SIZE=2](), + LABEL("Line Join:"), + lstLineJoin + ) + ) + ) + ) +) + +dlgAttributes = DIALOG +[ + TITLE="Attributes", + PARENTDIALOG="dlgMain", + MAXBOX=NO, + MINBOX=NO, + RESIZE=NO, + CLOSE_CB=cmdAttributesHide, + MARGIN=5x2 +] +(AttributesDesktop) + +#---------------------------------------------------------------------------# +# Dialogo Line ou Box ou Rect. # +#---------------------------------------------------------------------------# +txtLBX1 = TEXT[NC=8, SIZE=30x12, VALUE="0"](cmdInteger) +txtLBX2 = TEXT[NC=8, SIZE=30x12, VALUE="0"](cmdInteger) +txtLBY1 = TEXT[NC=8, SIZE=30x12, VALUE="0"](cmdInteger) +txtLBY2 = TEXT[NC=8, SIZE=30x12, VALUE="0"](cmdInteger) + +btLBDraw = BUTTON[SIZE=30]("Draw", cmdDraw) +btLBHide = BUTTON[SIZE=30]("Hide", cmdMsgHide) + +LBData = VBOX +( + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=15x9]("X1:"), + txtLBX1, + FILL[SIZE=5](), + LABEL[SIZE=15x9]("Y1:"), + txtLBY1 + ), + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=15x9]("X2:"), + txtLBX2, + FILL[SIZE=5](), + LABEL[SIZE=15x9]("Y2:"), + txtLBY2 + ) +) + +LBDeskTop = VBOX +( + HBOX + ( + FILL(), + LBData, + FILL() + ), + HBOX + ( + FILL(), + btLBDraw, + FILL[SIZE=5](), + btLBHide, + FILL() + ) +) + +dlgLB = DIALOG +[ + TITLE="Line Parameters", + PARENTDIALOG="dlgMain", + MAXBOX=NO, + MINBOX=NO, + RESIZE=NO, + CLOSE_CB=cmdMsgHide, + MARGIN=5x5 +] +(LBDeskTop) + +#---------------------------------------------------------------------------# +# Dialogo Arc ou Sector. # +#---------------------------------------------------------------------------# +txtASXC = TEXT[NC=4, SIZE=30x12, VALUE="0"](cmdInteger) +txtASYC = TEXT[NC=4, SIZE=30x12, VALUE="0"](cmdInteger) +txtASW = TEXT[NC=4, SIZE=30x12, VALUE="0"](cmdInteger) +txtASH = TEXT[NC=4, SIZE=30x12, VALUE="0"](cmdInteger) +txtASAngle1 = TEXT[NC=10, SIZE=30x12, VALUE="0"](cmdReal) +txtASAngle2 = TEXT[NC=10, SIZE=30x12, VALUE="360"](cmdReal) + +btASDraw = BUTTON[SIZE=30]("Draw", cmdDraw) +btASHide = BUTTON[SIZE=30]("Hide", cmdMsgHide) + +ASData = VBOX +( + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=30x9]("Xc:"), + txtASXC, + FILL[SIZE=5](), + LABEL[SIZE=30x9]("Yc:"), + txtASYC + ), + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=30x9]("W:"), + txtASW, + FILL[SIZE=5](), + LABEL[SIZE=30x9]("H:"), + txtASH + ), + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=30x9]("Angle1:"), + txtASAngle1, + FILL[SIZE=5](), + LABEL[SIZE=30x9]("Angle2:"), + txtASAngle2 + ) +) + +ASDeskTop = VBOX +( + HBOX + ( + FILL(), + ASData, + FILL() + ), + HBOX + ( + FILL(), + btASDraw, + FILL[SIZE=5](), + btASHide, + FILL() + ) +) + +dlgAS = DIALOG +[ + PARENTDIALOG="dlgMain", + TITLE="Arc Parameters", + MAXBOX=NO, + MINBOX=NO, + RESIZE=NO, + CLOSE_CB=cmdMsgHide, + MARGIN=5x5 +] +(ASDeskTop) + +#---------------------------------------------------------------------------# +# Dialogo Pixel. # +#---------------------------------------------------------------------------# +txtPixelX = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtPixelY = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) + +btPixelDraw = BUTTON[SIZE=30]("Draw", cmdDraw) +btPixelHide = BUTTON[SIZE=30]("Hide", cmdMsgHide) + +PixelData = VBOX +( + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=10x9]("X:"), + txtPixelX, + FILL[SIZE=5](), + LABEL[SIZE=10x9]("Y:"), + txtPixelY + ) +) + +PixelDeskTop = VBOX +( + HBOX + ( + FILL(), + PixelData, + FILL() + ), + HBOX + ( + FILL(), + btPixelDraw, + FILL[SIZE=5](), + btPixelHide, + FILL() + ) +) + +dlgPixel = DIALOG +[ + PARENTDIALOG="dlgMain", + TITLE="Pixel Parameters", + MAXBOX=NO, + MINBOX=NO, + RESIZE=NO, + CLOSE_CB=cmdMsgHide, + MARGIN=5x5 +] +(PixelDeskTop) + +#---------------------------------------------------------------------------# +# Dialogo Mark. # +#---------------------------------------------------------------------------# +txtMarkX = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtMarkY = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) + +btMarkDraw = BUTTON[SIZE=30]("Draw", cmdDraw) +btMarkHide = BUTTON[SIZE=30]("Hide", cmdMsgHide) + +MarkData = VBOX +( + HBOX[ALIGNMENT=ACENTER] + ( + FILL(), + LABEL[SIZE=10x9]("X:"), + txtMarkX, + FILL[SIZE=5](), + LABEL[SIZE=10x9]("Y:"), + txtMarkY, + FILL() + ) +) + +MarkDeskTop = VBOX +( + HBOX + ( + FILL(), + MarkData, + FILL() + ), + HBOX + ( + FILL(), + btMarkDraw, + FILL[SIZE=5](), + btMarkHide, + FILL() + ) +) + +dlgMark = DIALOG +[ + PARENTDIALOG="dlgMain", + TITLE="Mark Parameters", + MAXBOX=NO, + MINBOX=NO, + RESIZE=NO, + CLOSE_CB=cmdMsgHide, + MARGIN=5x5 +] +(MarkDeskTop) + +#---------------------------------------------------------------------------# +# Dialogo Text. # +#---------------------------------------------------------------------------# +txtTextX = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtTextY = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtTextS = TEXT[NC=100, SIZE=89x12, VALUE="Text"](cmdString) + +btTextDraw = BUTTON[SIZE=30]("Draw", cmdDraw) +btTextHide = BUTTON[SIZE=30]("Hide", cmdMsgHide) + +TextData = VBOX +( + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=10x9]("X:"), + txtTextX, + FILL[SIZE=5](), + LABEL[SIZE=10x9]("Y:"), + txtTextY + ), + HBOX + ( + VBOX + ( + LABEL[SIZE=25x9]("Text:"), + txtTextS + ) + ) +) + +TextDeskTop = VBOX +( + HBOX + ( + FILL(), + TextData, + FILL() + ), + HBOX + ( + FILL(), + btTextDraw, + FILL[SIZE=5](), + btTextHide, + FILL() + ) +) + +dlgText = DIALOG +[ + PARENTDIALOG="dlgMain", + TITLE="Text Parameters", + MAXBOX=NO, + MINBOX=NO, + CLOSE_CB=cmdMsgHide, + RESIZE=NO, + MARGIN=5x5 +] +(TextDeskTop) + +#---------------------------------------------------------------------------# +# Dialogo Poly. # +#---------------------------------------------------------------------------# +tgOpenLines = TOGGLE[VALUE=ON]("CD_OPEN_LINES", cmdOpenLines) +tgClosedLines = TOGGLE("CD_CLOSED_LINES", cmdClosedLines) +tgFilled = TOGGLE("CD_FILL", cmdFill) +tgClip = TOGGLE("CD_CLIP", cmdPolyClip) +tgBezier = TOGGLE("CD_BEZIER", cmdPolyBezier) + +btPolyHide = BUTTON[SIZE=30]("Hide", cmdMsgHide) + +rdMode = RADIO +( + VBOX + ( + tgOpenLines, + tgClosedLines, + tgFilled, + tgClip, + tgBezier + ) +) + +PolyDesktop = VBOX +( + FILL[SIZE=5](), + HBOX + ( + FILL(), + FRAME[TITLE="Polygon Mode:"] + ( + HBOX + ( + FILL[SIZE=5](), + rdMode + ) + ), + FILL() + ), + FILL[SIZE=10](), + HBOX + ( + FILL(), + btPolyHide, + FILL() + ), + FILL[SIZE=5]() +) + +dlgPoly = DIALOG +[ + PARENTDIALOG="dlgMain", + TITLE="Polygon Parameters", + MAXBOX=NO, + MINBOX=NO, + RESIZE=NO, + CLOSE_CB=cmdMsgHide +] +(PolyDesktop) + +#---------------------------------------------------------------------------# +# Dialogo Clip. # +#---------------------------------------------------------------------------# +txtClipXmin = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtClipXmax = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtClipYmin = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtClipYmax = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) + +btClipOff = BUTTON[SIZE=30]("Off", cmdClipOff) +btClipArea = BUTTON[SIZE=30]("Area", cmdClipArea) +btClipPoly = BUTTON[SIZE=50]("Polygon", cmdClipPoly) +btClipHide = BUTTON[SIZE=30]("Hide", cmdMsgHide) + +ClipData = VBOX +( + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=25x9]("Xmin:"), + txtClipXmin, + FILL[SIZE=5](), + LABEL[SIZE=25x9]("Ymin:"), + txtClipYmin + ), + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=25x9]("Xmax:"), + txtClipXmax, + FILL[SIZE=5](), + LABEL[SIZE=25x9]("Ymax:"), + txtClipYmax + ) +) + +ClipDeskTop = VBOX +( + HBOX + ( + FILL(), + ClipData, + FILL() + ), + HBOX + ( + FILL(), + btClipOff, + FILL[SIZE=5](), + btClipArea, + FILL[SIZE=5](), + btClipPoly, + FILL[SIZE=5](), + btClipHide, + FILL() + ) +) + +dlgClip = DIALOG +[ + PARENTDIALOG="dlgMain", + TITLE="Clipping", + MAXBOX=NO, + CLOSE_CB=cmdMsgHide, + MINBOX=NO, + RESIZE=NO, + MARGIN=5x5 +] +(ClipDeskTop) + +#---------------------------------------------------------------------------# +# Dialogo Image. # +#---------------------------------------------------------------------------# +txtImageX = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtImageY = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtImageW = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtImageH = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) + +btImagePut = BUTTON[SIZE=30]("Put", cmdImagePut) +btImageGet = BUTTON[SIZE=30]("Get", cmdImageGet) +btImageHide = BUTTON[SIZE=30]("Hide", cmdMsgHide) + +ImageData = VBOX +( + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=30x9]("X:"), + txtImageX, + FILL[SIZE=5](), + LABEL[SIZE=30x9]("Y:"), + txtImageY + ), + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=30x9]("Width:"), + txtImageW, + FILL[SIZE=5](), + LABEL[SIZE=30x9]("Height:"), + txtImageH + ) +) + +ImageDeskTop = VBOX +( + HBOX + ( + FILL(), + ImageData, + FILL() + ), + HBOX + ( + FILL(), + btImageGet, + FILL[SIZE=5](), + btImagePut, + FILL[SIZE=5](), + btImageHide, + FILL() + ) +) + +dlgImage = DIALOG +[ + PARENTDIALOG="dlgMain", + TITLE="Server Image", + MAXBOX=NO, + MINBOX=NO, + CLOSE_CB=cmdMsgHide, + RESIZE=NO, + MARGIN=5x5 +] +(ImageDeskTop) + +#---------------------------------------------------------------------------# +# Dialogo ImageRGB. # +#---------------------------------------------------------------------------# +txtImageRGBX = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtImageRGBY = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtImageRGBW = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) +txtImageRGBH = TEXT[NC=5, SIZE=30x12, VALUE="0"](cmdInteger) + +btImageRGBPut = BUTTON[SIZE=30]("Put", cmdImageRGBPut) +btImageRGBGet = BUTTON[SIZE=30]("Get", cmdImageRGBGet) +btImageRGBHide = BUTTON[SIZE=30]("Hide", cmdMsgHide) + +ImageRGBData = VBOX +( + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=30x9]("X:"), + txtImageRGBX, + FILL[SIZE=5](), + LABEL[SIZE=30x9]("Y:"), + txtImageRGBY + ), + HBOX[ALIGNMENT=ACENTER] + ( + LABEL[SIZE=30x9]("Width:"), + txtImageRGBW, + FILL[SIZE=5](), + LABEL[SIZE=30x9]("Height:"), + txtImageRGBH + ) +) + +ImageRGBDeskTop = VBOX +( + HBOX + ( + FILL(), + ImageRGBData, + FILL() + ), + HBOX + ( + FILL(), + btImageRGBGet, + FILL[SIZE=5](), + btImageRGBPut, + FILL[SIZE=5](), + btImageRGBHide, + FILL() + ) +) + +dlgImageRGB = DIALOG +[ + PARENTDIALOG="dlgMain", + TITLE="RGB Image", + MAXBOX=NO, + MINBOX=NO, + CLOSE_CB=cmdMsgHide, + RESIZE=NO, + MARGIN=5x5 +] +(ImageRGBDeskTop) + +#---------------------------------------------------------------------------# +# Dialogo About. # +#---------------------------------------------------------------------------# + +btCDTest = BUTTON("Close", cmdCloseAbout) + +AboutDeskTop = HBOX[MARGIN=5x5, GAP=2] +( + FILL(), + VBOX[ALIGNMENT=ACENTER]( + LABEL("CD Test 5.3"), + FILL[SIZE=5](), + LABEL("Antonio Scuri"), + LABEL("Diego Nehab"), + FILL[SIZE=5](), + LABEL("Tecgraf/PUC-Rio"), + FILL[SIZE=5](), + LABEL("CD Library Version"), + lblVersion = LABEL(""), + btCDTest + ), + FILL() +) + +dlgHelpAbout = DIALOG +[ + PARENTDIALOG="dlgMain", + TITLE="About", + MAXBOX=NO, + MINBOX=NO, + RESIZE=NO +] +(AboutDeskTop) + + + \ No newline at end of file diff --git a/cd/test/cdtest/cdtest.rc b/cd/test/cdtest/cdtest.rc new file mode 100755 index 0000000..c7e3ebc --- /dev/null +++ b/cd/test/cdtest/cdtest.rc @@ -0,0 +1 @@ +CdTestIcon ICON "cdtest.ico" diff --git a/cd/test/cdtest/cdtest_led.c b/cd/test/cdtest/cdtest_led.c new file mode 100644 index 0000000..b4530b4 --- /dev/null +++ b/cd/test/cdtest/cdtest_led.c @@ -0,0 +1,1590 @@ +/* Automatically generated by Iup ledc 2.6 */ + +#include +#include +#include + +static Ihandle* named[ 172 ]; + +static Ihandle* decl( char* name, Ihandle* elem, char* first, ...) +{ + char *attr, *val; + va_list arg; + va_start (arg, first); + attr = first; + while (attr) + { + val = va_arg(arg,char*); + IupSetAttribute( elem, attr, val ); + attr = va_arg(arg,char*); + } + va_end (arg); + if(name) IupSetHandle( name, elem ); + return elem; +} + +static void image_imgLine (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgLine", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", NULL ); +} + +static void image_imgClip (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgClip", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", NULL ); +} + +static void image_imgImage (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 2, 2, 2, 1, 3, 2, 2, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 2, 2, 2, 2, 1, 2, 2, 1, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 2, 2, 2, 1, 1, 2, 2, 1, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 1, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 1, 3, 1, 2, 1, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 2, 1, 3, 2, 1, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 1, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgImage", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", + "2", "255 255 255", + "3", "153 153 153", NULL ); +} + +static void image_imgImageRGB (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgImageRGB", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "255 0 0", + "2", "0 255 0", + "3", "0 0 255", NULL ); +} + +static void image_imgBox (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgBox", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", + "2", "255 255 255", NULL ); +} + +static void image_imgRect (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 2, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 2, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 2, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgRect", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", + "2", "255 255 255", NULL ); +} + +static void image_imgSector (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgSector", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", + "2", "255 255 255", NULL ); +} + +static void image_imgChord (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgChord", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", + "2", "255 255 255", NULL ); +} + +static void image_imgArc (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 1, 2, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 2, 0, 1, 1, 0, 0, 0, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgArc", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", + "2", "255 255 255", NULL ); +} + +static void image_imgText (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 1, 0, 0, 0, 1, 0, + 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0, 1, 0, + 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0, 1, 0, + 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0, 1, 0, + 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 1, 1, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgText", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "255 255 255", + "2", "0 0 0", NULL ); +} + +static void image_imgPoly (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgPoly", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", NULL ); +} + +static void image_imgMark (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgMark", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", NULL ); +} + +static void image_imgPixel (void) +{ + unsigned char map[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1 }; + + decl( "imgPixel", IupImage( 18, 18, map ), + "0", "BGCOLOR", + "1", "0 0 0", + "2", "255 255 255", NULL ); +} + + +void cdtest_loadled (void) +{ + image_imgLine (); + image_imgClip (); + image_imgImage (); + image_imgImageRGB (); + image_imgBox (); + image_imgRect (); + image_imgSector (); + image_imgChord (); + image_imgArc (); + image_imgText (); + image_imgPoly (); + image_imgMark (); + image_imgPixel (); + named[0] = decl( "mnOpen", IupMenu( + IupItem( "MF...", "cmdPlayMF" ), + named[1] = decl( "itPlayCGM", IupItem( "CGM...", "cmdPlayCGM" ), + "ACTIVE", "NO", NULL ), + named[2] = decl( "itPlayEMF", IupItem( "EMF...", "cmdPlayEMF" ), + "ACTIVE", "NO", NULL ), + named[3] = decl( "itPlayWMF", IupItem( "WMF...", "cmdPlayWMF" ), + "ACTIVE", "NO", NULL ), + NULL), NULL ); + named[4] = decl( "mnSave", IupMenu( + IupItem( "MF...", "cmdMF" ), + named[5] = decl( "itPDF", IupItem( "PDF...", "cmdPDF" ), + "ACTIVE", "NO", NULL ), + named[6] = decl( "itPS", IupItem( "PS...", "cmdPS" ), + "ACTIVE", "NO", NULL ), + named[7] = decl( "itEPS", IupItem( "EPS...", "cmdEPS" ), + "ACTIVE", "NO", NULL ), + named[8] = decl( "itCGMt", IupItem( "CGMt...", "cmdCGMt" ), + "ACTIVE", "NO", NULL ), + named[9] = decl( "itCGMb", IupItem( "CGMb...", "cmdCGMb" ), + "ACTIVE", "NO", NULL ), + named[10] = decl( "itDGN", IupItem( "DGN...", "cmdDGN" ), + "ACTIVE", "NO", NULL ), + named[11] = decl( "itDXF", IupItem( "DXF...", "cmdDXF" ), + "ACTIVE", "NO", NULL ), + named[12] = decl( "itEMF", IupItem( "EMF...", "cmdEMF" ), + "ACTIVE", "NO", NULL ), + named[13] = decl( "itWMF", IupItem( "WMF...", "cmdWMF" ), + "ACTIVE", "NO", NULL ), + NULL), NULL ); + named[14] = decl( "mnFile", IupMenu( + decl( NULL, IupSubmenu( "Open", + named[0] /* mnOpen */ + ), + "KEY", "K_O", NULL ), + IupSeparator(), + decl( NULL, IupSubmenu( "Save", + named[4] /* mnSave */ + ), + "KEY", "K_S", NULL ), + IupSeparator(), + named[15] = decl( "itPrint", IupItem( "Print...", "cmdPrint" ), + "KEY", "K_P", NULL ), + IupSeparator(), + decl( NULL, IupItem( "Exit", "cmdFileExit" ), + "KEY", "K_x", NULL ), + NULL), NULL ); + named[16] = decl( "mnEdit", IupMenu( + named[17] = decl( "itEditUndo", IupItem( "Undo", "cmdEditUndo" ), NULL ), + IupSeparator(), + named[18] = decl( "itClipBoard", IupItem( "Copy as EMF/WMF", "cmdClipBoard" ), + "ACTIVE", "NO", NULL ), + named[19] = decl( "itClipBoardBitmap", IupItem( "Copy as Bitmap", "cmdClipBoardBitmap" ), + "ACTIVE", "NO", NULL ), + named[20] = decl( "itClipBoardMetafile", IupItem( "Copy as CD Metafile", "cmdClipBoardMetafile" ), + "ACTIVE", "NO", NULL ), + named[21] = decl( "itClipBoardPaste", IupItem( "Paste", "cmdClipBoardPaste" ), + "ACTIVE", "NO", NULL ), + IupSeparator(), + IupItem( "Clear", "cmdEditClear" ), + IupSeparator(), + IupItem( "Options...", "cmdOptions" ), + NULL), NULL ); + named[22] = decl( "mnPrimitives", IupMenu( + IupItem( "Pixel...", "cmdPixel" ), + IupItem( "Mark...", "cmdMark" ), + IupItem( "Line...", "cmdLine" ), + IupItem( "Polygon...", "cmdPoly" ), + IupItem( "Rect...", "cmdRect" ), + IupItem( "Box...", "cmdBox" ), + IupItem( "Arc...", "cmdArc" ), + IupItem( "Sector...", "cmdSector" ), + IupItem( "Chord...", "cmdChord" ), + IupItem( "Text...", "cmdText" ), + IupSeparator(), + IupItem( "Server Image...", "cmdImage" ), + IupItem( "RGB Image...", "cmdImageRGB" ), + NULL), NULL ); + named[23] = decl( "mnDraw", IupMenu( + decl( NULL, IupSubmenu( "Primitives", + named[22] /* mnPrimitives */ + ), + "KEY", "K_P", NULL ), + IupSeparator(), + IupItem( "Clipping...", "cmdClip" ), + IupItem( "Attributes...", "cmdAttributes" ), + IupSeparator(), + named[24] = decl( "itWDCanvas", IupItem( "Show WD Canvas", "cmdWDCanvas" ), NULL ), + named[25] = decl( "itPICCanvas", IupItem( "Show Picture Canvas", "cmdPICCanvas" ), NULL ), + NULL), + "ISMENU", "YES", NULL ); + named[26] = decl( "mnHelp", IupMenu( + IupItem( "About...", "cmdHelpAbout" ), + NULL), NULL ); + named[27] = decl( "mnMain", IupMenu( + decl( NULL, IupSubmenu( "File", + named[14] /* mnFile */ + ), + "KEY", "K_mF", NULL ), + decl( NULL, IupSubmenu( "Edit", + named[16] /* mnEdit */ + ), + "KEY", "K_mE", NULL ), + decl( NULL, IupSubmenu( "Draw", + named[23] /* mnDraw */ + ), + "KEY", "K_mD", NULL ), + decl( NULL, IupSubmenu( "Help", + named[26] /* mnHelp */ + ), + "KEY", "K_mH", NULL ), + NULL), NULL ); + named[28] = decl( "lbStatusLine", IupLabel( "Esta eh a barra de status do CDTest." ), + "EXPAND", "HORIZONTAL", NULL ); + named[29] = decl( "btLine", IupButton( "", "cmdLine" ), + "IMAGE", "imgLine", + "TIP", "Line", NULL ); + named[30] = decl( "btBox", IupButton( "", "cmdBox" ), + "IMAGE", "imgBox", + "TIP", "Box", NULL ); + named[31] = decl( "btRect", IupButton( "", "cmdRect" ), + "IMAGE", "imgRect", + "TIP", "Rect", NULL ); + named[32] = decl( "btArc", IupButton( "", "cmdArc" ), + "IMAGE", "imgArc", + "TIP", "Arc", NULL ); + named[33] = decl( "btSector", IupButton( "", "cmdSector" ), + "IMAGE", "imgSector", + "TIP", "Sector", NULL ); + named[34] = decl( "btChord", IupButton( "", "cmdChord" ), + "IMAGE", "imgChord", + "TIP", "Chord", NULL ); + named[35] = decl( "btPixel", IupButton( "", "cmdPixel" ), + "IMAGE", "imgPixel", + "TIP", "Pixel", NULL ); + named[36] = decl( "btMark", IupButton( "", "cmdMark" ), + "IMAGE", "imgMark", + "TIP", "Mark", NULL ); + named[37] = decl( "btText", IupButton( "", "cmdText" ), + "IMAGE", "imgText", + "TIP", "Text", NULL ); + named[38] = decl( "btPoly", IupButton( "", "cmdPoly" ), + "IMAGE", "imgPoly", + "TIP", "Polygon", NULL ); + named[39] = decl( "btImageRGB", IupButton( "", "cmdImageRGB" ), + "IMAGE", "imgImageRGB", + "TIP", "RGB Image", NULL ); + named[40] = decl( "btImage", IupButton( "", "cmdImage" ), + "IMAGE", "imgImage", + "TIP", "Server Image", NULL ); + named[41] = decl( "btClip", IupButton( "", "cmdClip" ), + "IMAGE", "imgClip", + "TIP", "Clipping Area", NULL ); + named[42] = decl( "btCurPrim", IupButton( "", "cmdShowDialog" ), + "IMAGE", "imgLine", + "TIP", "Show primitive dialog", NULL ); + named[43] = decl( "lbMousePos", IupLabel( "( , )" ), + "SIZE", "90", NULL ); + named[44] = decl( "PrimBar", IupVbox( + named[42] /* btCurPrim */, + decl( NULL, IupFill(), + "SIZE", "20", NULL ), + named[35] /* btPixel */, + named[36] /* btMark */, + named[29] /* btLine */, + named[38] /* btPoly */, + named[31] /* btRect */, + named[30] /* btBox */, + named[32] /* btArc */, + named[33] /* btSector */, + named[34] /* btChord */, + named[37] /* btText */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[40] /* btImage */, + named[39] /* btImageRGB */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[41] /* btClip */, + decl( NULL, IupFill(), + "SIZE", "30", NULL ), + NULL), + "GAP", "2", NULL ); + named[45] = decl( "cnvColorBar", IupCanvas( "cmdColorBarRepaint" ), + "BUTTON_CB", "cmdColorBarButtonCB", + "RESIZE_CB", "cmdColorBarResizeCB", + "SIZE", "220x12", + "BORDER", "NO", + "EXPAND", "NO", NULL ); + named[46] = decl( "cnvMain", IupCanvas( "cmdRepaint" ), + "MOTION_CB", "cmdMotionCB", + "BUTTON_CB", "cmdButtonCB", + "RESIZE_CB", "cmdResizeCB", NULL ); + named[47] = decl( "DeskTop", IupVbox( + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + IupHbox( + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[44] /* PrimBar */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + IupVbox( + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + named[43] /* lbMousePos */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[46] /* cnvMain */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + named[45] /* cnvColorBar */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[28] /* lbStatusLine */, + NULL), + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + NULL), + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + NULL), NULL ); + named[48] = decl( "dlgMain", IupDialog( + named[47] /* DeskTop */ + ), + "TITLE", "CD Test 5.3", + "MENU", "mnMain", + "ICON", "CdTestIcon", + "K_cZ", "cmdEditUndo", + "GETFOCUS_CB", "cmdGetFocusCB", + "KILLFOCUS_CB", "cmdKillFocusCB", + "CLOSE_CB", "cmdFileExit", NULL ); + named[49] = decl( "cnvWDCanvas", IupCanvas( "cmdWDRepaint" ), + "BORDER", "NO", NULL ); + named[50] = decl( "dlgWDCanvas", IupDialog( + named[49] /* cnvWDCanvas */ + ), + "TITLE", "WD Canvas", + "CLISE_CB", "cmdCloseWD", + "SIZE", "200x200", + "PARENTDIALOG", "dlgMain", + "GAP", "5x5", NULL ); + named[51] = decl( "cnvPICCanvas", IupCanvas( "cmdPICRepaint" ), + "BORDER", "NO", NULL ); + named[52] = decl( "dlgPICCanvas", IupDialog( + named[51] /* cnvPICCanvas */ + ), + "TITLE", "PIC Canvas", + "CLISE_CB", "cmdClosePIC", + "SIZE", "200x200", + "PARENTDIALOG", "dlgMain", + "GAP", "5x5", NULL ); + named[53] = decl( "btOptionsHide", IupButton( "Hide", "cmdOptionsHide" ), + "SIZE", "30", NULL ); + named[54] = decl( "tgSimulate", IupToggle( "Simulate", "cmdSimulate" ), + "VALUE", "OFF", + "SIZE", "55", NULL ); + named[55] = decl( "tgStretchPlay", IupToggle( "Stretch Play", "cmdStretchPlay" ), + "VALUE", "OFF", + "SIZE", "70", NULL ); + named[56] = decl( "tgNoBuffering", IupToggle( "No buffering", "cmdNoBuffering" ), + "VALUE", "ON", NULL ); + named[57] = decl( "tgImageBuffer", IupToggle( "CD_DBUFFER", "cmdImageBuffer" ), NULL ); + named[58] = decl( "tgRGBBuffer", IupToggle( "CD_DBUFFERRGB", "cmdRGBBuffer" ), NULL ); + named[59] = decl( "rdBuffering", IupRadio( + IupVbox( + named[56] /* tgNoBuffering */, + named[57] /* tgImageBuffer */, + named[58] /* tgRGBBuffer */, + NULL) + ), NULL ); + named[60] = decl( "OptionsDesktop", IupVbox( + decl( NULL, IupVbox( + decl( NULL, IupFrame( + named[59] /* rdBuffering */ + ), + "TITLE", "Buffering:", + "MARGIN", "5x5", + "SIZE", "80", NULL ), + decl( NULL, IupFill(), + "SIZE", "10", NULL ), + named[54] /* tgSimulate */, + named[55] /* tgStretchPlay */, + decl( NULL, IupFill(), + "SIZE", "10", NULL ), + named[53] /* btOptionsHide */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + NULL), + "GAP", "2", NULL ), + NULL), NULL ); + named[61] = decl( "dlgOptions", IupDialog( + named[60] /* OptionsDesktop */ + ), + "TITLE", "Options", + "PARENTDIALOG", "dlgMain", + "MAXBOX", "NO", + "MINBOX", "NO", + "RESIZE", "NO", + "MARGIN", "5x2", NULL ); + named[62] = decl( "lstTextAlignment", IupList( "cmdTextAlignment" ), + "1", "CD_NORTH", + "2", "CD_SOUTH", + "3", "CD_EAST", + "4", "CD_WEST", + "5", "CD_NORTH_EAST", + "6", "CD_NORTH_WEST", + "7", "CD_SOUTH_EAST", + "8", "CD_SOUTH_WEST", + "9", "CD_CENTER", + "10", "CD_BASE_LEFT", + "11", "CD_BASE_CENTER", + "12", "CD_BASE_RIGHT", + "DROPDOWN", "YES", + "VALUE", "10", + "SIZE", "89", NULL ); + named[63] = decl( "txtMarkSize", IupText( "cmdInteger" ), + "NC", "4", + "SIZE", "20x12", + "VALUE", "10", NULL ); + named[64] = decl( "lstMarkType", IupList( "cmdMarkType" ), + "1", "CD_PLUS", + "2", "CD_STAR", + "3", "CD_CIRCLE", + "4", "CD_X", + "5", "CD_BOX", + "6", "CD_DIAMOND", + "7", "CD_HOLLOW_CIRCLE", + "8", "CD_HOLLOW_BOX", + "9", "CD_HOLLOW_DIAMOND", + "DROPDOWN", "YES", + "VALUE", "2", + "SIZE", "80", NULL ); + named[65] = decl( "lstWriteMode", IupList( "cmdWriteMode" ), + "1", "CD_REPLACE", + "2", "CD_XOR", + "3", "CD_NOT_XOR", + "VALUE", "1", + "DROPDOWN", "YES", + "SIZE", "80", NULL ); + named[66] = decl( "lstFontTypeFace", IupList( "cmdFontTypeFace" ), + "1", "CD_SYSTEM", + "2", "CD_COURIER", + "3", "CD_TIMES_ROMAN", + "4", "CD_HELVETICA", + "VALUE", "1", + "DROPDOWN", "YES", + "SIZE", "80", NULL ); + named[67] = decl( "lstLineCap", IupList( "cmdLineCap" ), + "1", "CD_CAPFLAT", + "2", "CD_CAPSQUARE", + "3", "CD_CAPROUND", + "VALUE", "1", + "DROPDOWN", "YES", + "SIZE", "80", NULL ); + named[68] = decl( "lstLineJoin", IupList( "cmdLineJoin" ), + "1", "CD_BEVEL", + "2", "CD_MITER", + "3", "CD_ROUND", + "VALUE", "1", + "DROPDOWN", "YES", + "SIZE", "80", NULL ); + named[69] = decl( "lstFillMode", IupList( "cmdFillMode" ), + "1", "CD_EVENODD", + "2", "CD_WINDING", + "VALUE", "1", + "DROPDOWN", "YES", + "SIZE", "80", NULL ); + named[70] = decl( "lstFontStyle", IupList( "cmdFontStyle" ), + "1", "CD_PLAIN", + "2", "CD_BOLD", + "3", "CD_ITALIC", + "4", "CD_BOLD_ITALIC", + "VALUE", "1", + "DROPDOWN", "YES", + "SIZE", "80", NULL ); + named[71] = decl( "txtLineWidth", IupText( "cmdInteger" ), + "SIZE", "30", + "NC", "3", + "VALUE", "1", NULL ); + named[72] = decl( "txtFontSize", IupText( "cmdInteger" ), + "SIZE", "30", + "NC", "3", + "VALUE", "12", NULL ); + named[73] = decl( "txtTextOrientation", IupText( "cmdInteger" ), + "SIZE", "30", + "NC", "3", + "VALUE", "0", NULL ); + named[74] = decl( "lstLineStyle", IupList( "cmdLineStyle" ), + "1", "CD_CONTINUOUS", + "2", "CD_DASHED", + "3", "CD_DOTTED", + "4", "CD_DASH_DOT", + "5", "CD_DASH_DOT_DOT", + "6", "CD_CUSTOM", + "VALUE", "1", + "DROPDOWN", "YES", + "SIZE", "80", NULL ); + named[75] = decl( "tgSolid", IupToggle( "CD_SOLID", "cmdSolid" ), + "VALUE", "ON", NULL ); + named[76] = decl( "tgHatch", IupToggle( "CD_HATCH", "cmdHatch" ), NULL ); + named[77] = decl( "tgStipple", IupToggle( "CD_STIPPLE", "cmdStipple" ), NULL ); + named[78] = decl( "tgPattern", IupToggle( "CD_PATTERN", "cmdPattern" ), NULL ); + named[79] = decl( "lstOpacity", IupList( "cmdOpacity" ), + "1", "CD_OPAQUE", + "2", "CD_TRANSPARENT", + "VALUE", "2", + "DROPDOWN", "YES", + "SIZE", "80", + "ACTIVE", "YES", NULL ); + named[80] = decl( "lstHatchStyle", IupList( "cmdHatchStyle" ), + "1", "CD_HORIZONTAL", + "2", "CD_VERTICAL", + "3", "CD_FDIAGONAL", + "4", "CD_BDIAGONAL", + "5", "CD_CROSS", + "6", "CD_DIAGCROSS", + "VALUE", "1", + "DROPDOWN", "YES", + "SIZE", "80", + "ACTIVE", "YES", NULL ); + named[81] = decl( "btAttributesHide", IupButton( "Hide", "cmdAttributesHide" ), + "SIZE", "30", NULL ); + named[82] = decl( "rdInteriorStyle", IupRadio( + IupVbox( + named[75] /* tgSolid */, + named[76] /* tgHatch */, + named[77] /* tgStipple */, + named[78] /* tgPattern */, + NULL) + ), NULL ); + named[83] = decl( "AttributesDesktop", IupVbox( + IupHbox( + decl( NULL, IupVbox( + IupLabel( "Write Mode:" ), + named[65] /* lstWriteMode */, + decl( NULL, IupFill(), + "SIZE", "4", NULL ), + decl( NULL, IupFrame( + IupVbox( + IupLabel( "Back Opacity:" ), + named[79] /* lstOpacity */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + IupLabel( "Fill Mode:" ), + named[69] /* lstFillMode */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + decl( NULL, IupFrame( + named[82] /* rdInteriorStyle */ + ), + "TITLE", "Interior Style:", + "MARGIN", "5x5", + "SIZE", "80", NULL ), + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + IupLabel( "Hatch Style:" ), + named[80] /* lstHatchStyle */, + NULL) + ), + "TITLE", "Fill Attributes", + "MARGIN", "5x5", NULL ), + decl( NULL, IupFill(), + "SIZE", "10", NULL ), + decl( NULL, IupFrame( + IupVbox( + IupLabel( "Mark Type:" ), + named[64] /* lstMarkType */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + IupLabel( "Mark Size:" ), + named[63] /* txtMarkSize */, + NULL) + ), + "TITLE", "Mark Attributes", + "MARGIN", "5x5", NULL ), + decl( NULL, IupFill(), + "SIZE", "10", NULL ), + named[81] /* btAttributesHide */, + NULL), + "GAP", "2", NULL ), + decl( NULL, IupVbox( + decl( NULL, IupFrame( + IupVbox( + IupLabel( "Font Typeface:" ), + named[66] /* lstFontTypeFace */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + IupLabel( "Font Style:" ), + named[70] /* lstFontStyle */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + IupLabel( "Font Size:" ), + named[72] /* txtFontSize */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + decl( NULL, IupLabel( "Text Alignment:" ), + "SIZE", "x9", NULL ), + named[62] /* lstTextAlignment */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + decl( NULL, IupLabel( "Text Orientation:" ), + "SIZE", "x9", NULL ), + named[73] /* txtTextOrientation */, + NULL) + ), + "TITLE", "Text Attributes", + "MARGIN", "5x5", NULL ), + decl( NULL, IupFill(), + "SIZE", "10", NULL ), + decl( NULL, IupFrame( + IupVbox( + IupLabel( "Line Style:" ), + named[74] /* lstLineStyle */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + IupLabel( "Line Width:" ), + named[71] /* txtLineWidth */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + IupLabel( "Line Cap:" ), + named[67] /* lstLineCap */, + decl( NULL, IupFill(), + "SIZE", "2", NULL ), + IupLabel( "Line Join:" ), + named[68] /* lstLineJoin */, + NULL) + ), + "TITLE", "Line Attributes", + "MARGIN", "5x5", NULL ), + NULL), + "GAP", "2", NULL ), + NULL), + NULL), NULL ); + named[84] = decl( "dlgAttributes", IupDialog( + named[83] /* AttributesDesktop */ + ), + "TITLE", "Attributes", + "PARENTDIALOG", "dlgMain", + "MAXBOX", "NO", + "MINBOX", "NO", + "RESIZE", "NO", + "CLOSE_CB", "cmdAttributesHide", + "MARGIN", "5x2", NULL ); + named[85] = decl( "txtLBX1", IupText( "cmdInteger" ), + "NC", "8", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[86] = decl( "txtLBX2", IupText( "cmdInteger" ), + "NC", "8", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[87] = decl( "txtLBY1", IupText( "cmdInteger" ), + "NC", "8", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[88] = decl( "txtLBY2", IupText( "cmdInteger" ), + "NC", "8", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[89] = decl( "btLBDraw", IupButton( "Draw", "cmdDraw" ), + "SIZE", "30", NULL ); + named[90] = decl( "btLBHide", IupButton( "Hide", "cmdMsgHide" ), + "SIZE", "30", NULL ); + named[91] = decl( "LBData", IupVbox( + decl( NULL, IupHbox( + decl( NULL, IupLabel( "X1:" ), + "SIZE", "15x9", NULL ), + named[85] /* txtLBX1 */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Y1:" ), + "SIZE", "15x9", NULL ), + named[87] /* txtLBY1 */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + decl( NULL, IupHbox( + decl( NULL, IupLabel( "X2:" ), + "SIZE", "15x9", NULL ), + named[86] /* txtLBX2 */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Y2:" ), + "SIZE", "15x9", NULL ), + named[88] /* txtLBY2 */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + NULL), NULL ); + named[92] = decl( "LBDeskTop", IupVbox( + IupHbox( + IupFill(), + named[91] /* LBData */, + IupFill(), + NULL), + IupHbox( + IupFill(), + named[89] /* btLBDraw */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[90] /* btLBHide */, + IupFill(), + NULL), + NULL), NULL ); + named[93] = decl( "dlgLB", IupDialog( + named[92] /* LBDeskTop */ + ), + "TITLE", "Line Parameters", + "PARENTDIALOG", "dlgMain", + "MAXBOX", "NO", + "MINBOX", "NO", + "RESIZE", "NO", + "CLOSE_CB", "cmdMsgHide", + "MARGIN", "5x5", NULL ); + named[94] = decl( "txtASXC", IupText( "cmdInteger" ), + "NC", "4", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[95] = decl( "txtASYC", IupText( "cmdInteger" ), + "NC", "4", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[96] = decl( "txtASW", IupText( "cmdInteger" ), + "NC", "4", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[97] = decl( "txtASH", IupText( "cmdInteger" ), + "NC", "4", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[98] = decl( "txtASAngle1", IupText( "cmdReal" ), + "NC", "10", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[99] = decl( "txtASAngle2", IupText( "cmdReal" ), + "NC", "10", + "SIZE", "30x12", + "VALUE", "360", NULL ); + named[100] = decl( "btASDraw", IupButton( "Draw", "cmdDraw" ), + "SIZE", "30", NULL ); + named[101] = decl( "btASHide", IupButton( "Hide", "cmdMsgHide" ), + "SIZE", "30", NULL ); + named[102] = decl( "ASData", IupVbox( + decl( NULL, IupHbox( + decl( NULL, IupLabel( "Xc:" ), + "SIZE", "30x9", NULL ), + named[94] /* txtASXC */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Yc:" ), + "SIZE", "30x9", NULL ), + named[95] /* txtASYC */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + decl( NULL, IupHbox( + decl( NULL, IupLabel( "W:" ), + "SIZE", "30x9", NULL ), + named[96] /* txtASW */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "H:" ), + "SIZE", "30x9", NULL ), + named[97] /* txtASH */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + decl( NULL, IupHbox( + decl( NULL, IupLabel( "Angle1:" ), + "SIZE", "30x9", NULL ), + named[98] /* txtASAngle1 */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Angle2:" ), + "SIZE", "30x9", NULL ), + named[99] /* txtASAngle2 */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + NULL), NULL ); + named[103] = decl( "ASDeskTop", IupVbox( + IupHbox( + IupFill(), + named[102] /* ASData */, + IupFill(), + NULL), + IupHbox( + IupFill(), + named[100] /* btASDraw */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[101] /* btASHide */, + IupFill(), + NULL), + NULL), NULL ); + named[104] = decl( "dlgAS", IupDialog( + named[103] /* ASDeskTop */ + ), + "PARENTDIALOG", "dlgMain", + "TITLE", "Arc Parameters", + "MAXBOX", "NO", + "MINBOX", "NO", + "RESIZE", "NO", + "CLOSE_CB", "cmdMsgHide", + "MARGIN", "5x5", NULL ); + named[105] = decl( "txtPixelX", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[106] = decl( "txtPixelY", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[107] = decl( "btPixelDraw", IupButton( "Draw", "cmdDraw" ), + "SIZE", "30", NULL ); + named[108] = decl( "btPixelHide", IupButton( "Hide", "cmdMsgHide" ), + "SIZE", "30", NULL ); + named[109] = decl( "PixelData", IupVbox( + decl( NULL, IupHbox( + decl( NULL, IupLabel( "X:" ), + "SIZE", "10x9", NULL ), + named[105] /* txtPixelX */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Y:" ), + "SIZE", "10x9", NULL ), + named[106] /* txtPixelY */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + NULL), NULL ); + named[110] = decl( "PixelDeskTop", IupVbox( + IupHbox( + IupFill(), + named[109] /* PixelData */, + IupFill(), + NULL), + IupHbox( + IupFill(), + named[107] /* btPixelDraw */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[108] /* btPixelHide */, + IupFill(), + NULL), + NULL), NULL ); + named[111] = decl( "dlgPixel", IupDialog( + named[110] /* PixelDeskTop */ + ), + "PARENTDIALOG", "dlgMain", + "TITLE", "Pixel Parameters", + "MAXBOX", "NO", + "MINBOX", "NO", + "RESIZE", "NO", + "CLOSE_CB", "cmdMsgHide", + "MARGIN", "5x5", NULL ); + named[112] = decl( "txtMarkX", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[113] = decl( "txtMarkY", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[114] = decl( "btMarkDraw", IupButton( "Draw", "cmdDraw" ), + "SIZE", "30", NULL ); + named[115] = decl( "btMarkHide", IupButton( "Hide", "cmdMsgHide" ), + "SIZE", "30", NULL ); + named[116] = decl( "MarkData", IupVbox( + decl( NULL, IupHbox( + IupFill(), + decl( NULL, IupLabel( "X:" ), + "SIZE", "10x9", NULL ), + named[112] /* txtMarkX */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Y:" ), + "SIZE", "10x9", NULL ), + named[113] /* txtMarkY */, + IupFill(), + NULL), + "ALIGNMENT", "ACENTER", NULL ), + NULL), NULL ); + named[117] = decl( "MarkDeskTop", IupVbox( + IupHbox( + IupFill(), + named[116] /* MarkData */, + IupFill(), + NULL), + IupHbox( + IupFill(), + named[114] /* btMarkDraw */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[115] /* btMarkHide */, + IupFill(), + NULL), + NULL), NULL ); + named[118] = decl( "dlgMark", IupDialog( + named[117] /* MarkDeskTop */ + ), + "PARENTDIALOG", "dlgMain", + "TITLE", "Mark Parameters", + "MAXBOX", "NO", + "MINBOX", "NO", + "RESIZE", "NO", + "CLOSE_CB", "cmdMsgHide", + "MARGIN", "5x5", NULL ); + named[119] = decl( "txtTextX", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[120] = decl( "txtTextY", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[121] = decl( "txtTextS", IupText( "cmdString" ), + "NC", "100", + "SIZE", "89x12", + "VALUE", "Text", NULL ); + named[122] = decl( "btTextDraw", IupButton( "Draw", "cmdDraw" ), + "SIZE", "30", NULL ); + named[123] = decl( "btTextHide", IupButton( "Hide", "cmdMsgHide" ), + "SIZE", "30", NULL ); + named[124] = decl( "TextData", IupVbox( + decl( NULL, IupHbox( + decl( NULL, IupLabel( "X:" ), + "SIZE", "10x9", NULL ), + named[119] /* txtTextX */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Y:" ), + "SIZE", "10x9", NULL ), + named[120] /* txtTextY */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + IupHbox( + IupVbox( + decl( NULL, IupLabel( "Text:" ), + "SIZE", "25x9", NULL ), + named[121] /* txtTextS */, + NULL), + NULL), + NULL), NULL ); + named[125] = decl( "TextDeskTop", IupVbox( + IupHbox( + IupFill(), + named[124] /* TextData */, + IupFill(), + NULL), + IupHbox( + IupFill(), + named[122] /* btTextDraw */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[123] /* btTextHide */, + IupFill(), + NULL), + NULL), NULL ); + named[126] = decl( "dlgText", IupDialog( + named[125] /* TextDeskTop */ + ), + "PARENTDIALOG", "dlgMain", + "TITLE", "Text Parameters", + "MAXBOX", "NO", + "MINBOX", "NO", + "CLOSE_CB", "cmdMsgHide", + "RESIZE", "NO", + "MARGIN", "5x5", NULL ); + named[127] = decl( "tgOpenLines", IupToggle( "CD_OPEN_LINES", "cmdOpenLines" ), + "VALUE", "ON", NULL ); + named[128] = decl( "tgClosedLines", IupToggle( "CD_CLOSED_LINES", "cmdClosedLines" ), NULL ); + named[129] = decl( "tgFilled", IupToggle( "CD_FILL", "cmdFill" ), NULL ); + named[130] = decl( "tgClip", IupToggle( "CD_CLIP", "cmdPolyClip" ), NULL ); + named[131] = decl( "tgBezier", IupToggle( "CD_BEZIER", "cmdPolyBezier" ), NULL ); + named[132] = decl( "btPolyHide", IupButton( "Hide", "cmdMsgHide" ), + "SIZE", "30", NULL ); + named[133] = decl( "rdMode", IupRadio( + IupVbox( + named[127] /* tgOpenLines */, + named[128] /* tgClosedLines */, + named[129] /* tgFilled */, + named[130] /* tgClip */, + named[131] /* tgBezier */, + NULL) + ), NULL ); + named[134] = decl( "PolyDesktop", IupVbox( + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + IupHbox( + IupFill(), + decl( NULL, IupFrame( + IupHbox( + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[133] /* rdMode */, + NULL) + ), + "TITLE", "Polygon Mode:", NULL ), + IupFill(), + NULL), + decl( NULL, IupFill(), + "SIZE", "10", NULL ), + IupHbox( + IupFill(), + named[132] /* btPolyHide */, + IupFill(), + NULL), + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + NULL), NULL ); + named[135] = decl( "dlgPoly", IupDialog( + named[134] /* PolyDesktop */ + ), + "PARENTDIALOG", "dlgMain", + "TITLE", "Polygon Parameters", + "MAXBOX", "NO", + "MINBOX", "NO", + "RESIZE", "NO", + "CLOSE_CB", "cmdMsgHide", NULL ); + named[136] = decl( "txtClipXmin", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[137] = decl( "txtClipXmax", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[138] = decl( "txtClipYmin", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[139] = decl( "txtClipYmax", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[140] = decl( "btClipOff", IupButton( "Off", "cmdClipOff" ), + "SIZE", "30", NULL ); + named[141] = decl( "btClipArea", IupButton( "Area", "cmdClipArea" ), + "SIZE", "30", NULL ); + named[142] = decl( "btClipPoly", IupButton( "Polygon", "cmdClipPoly" ), + "SIZE", "50", NULL ); + named[143] = decl( "btClipHide", IupButton( "Hide", "cmdMsgHide" ), + "SIZE", "30", NULL ); + named[144] = decl( "ClipData", IupVbox( + decl( NULL, IupHbox( + decl( NULL, IupLabel( "Xmin:" ), + "SIZE", "25x9", NULL ), + named[136] /* txtClipXmin */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Ymin:" ), + "SIZE", "25x9", NULL ), + named[138] /* txtClipYmin */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + decl( NULL, IupHbox( + decl( NULL, IupLabel( "Xmax:" ), + "SIZE", "25x9", NULL ), + named[137] /* txtClipXmax */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Ymax:" ), + "SIZE", "25x9", NULL ), + named[139] /* txtClipYmax */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + NULL), NULL ); + named[145] = decl( "ClipDeskTop", IupVbox( + IupHbox( + IupFill(), + named[144] /* ClipData */, + IupFill(), + NULL), + IupHbox( + IupFill(), + named[140] /* btClipOff */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[141] /* btClipArea */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[142] /* btClipPoly */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[143] /* btClipHide */, + IupFill(), + NULL), + NULL), NULL ); + named[146] = decl( "dlgClip", IupDialog( + named[145] /* ClipDeskTop */ + ), + "PARENTDIALOG", "dlgMain", + "TITLE", "Clipping", + "MAXBOX", "NO", + "CLOSE_CB", "cmdMsgHide", + "MINBOX", "NO", + "RESIZE", "NO", + "MARGIN", "5x5", NULL ); + named[147] = decl( "txtImageX", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[148] = decl( "txtImageY", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[149] = decl( "txtImageW", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[150] = decl( "txtImageH", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[151] = decl( "btImagePut", IupButton( "Put", "cmdImagePut" ), + "SIZE", "30", NULL ); + named[152] = decl( "btImageGet", IupButton( "Get", "cmdImageGet" ), + "SIZE", "30", NULL ); + named[153] = decl( "btImageHide", IupButton( "Hide", "cmdMsgHide" ), + "SIZE", "30", NULL ); + named[154] = decl( "ImageData", IupVbox( + decl( NULL, IupHbox( + decl( NULL, IupLabel( "X:" ), + "SIZE", "30x9", NULL ), + named[147] /* txtImageX */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Y:" ), + "SIZE", "30x9", NULL ), + named[148] /* txtImageY */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + decl( NULL, IupHbox( + decl( NULL, IupLabel( "Width:" ), + "SIZE", "30x9", NULL ), + named[149] /* txtImageW */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Height:" ), + "SIZE", "30x9", NULL ), + named[150] /* txtImageH */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + NULL), NULL ); + named[155] = decl( "ImageDeskTop", IupVbox( + IupHbox( + IupFill(), + named[154] /* ImageData */, + IupFill(), + NULL), + IupHbox( + IupFill(), + named[152] /* btImageGet */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[151] /* btImagePut */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[153] /* btImageHide */, + IupFill(), + NULL), + NULL), NULL ); + named[156] = decl( "dlgImage", IupDialog( + named[155] /* ImageDeskTop */ + ), + "PARENTDIALOG", "dlgMain", + "TITLE", "Server Image", + "MAXBOX", "NO", + "MINBOX", "NO", + "CLOSE_CB", "cmdMsgHide", + "RESIZE", "NO", + "MARGIN", "5x5", NULL ); + named[157] = decl( "txtImageRGBX", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[158] = decl( "txtImageRGBY", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[159] = decl( "txtImageRGBW", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[160] = decl( "txtImageRGBH", IupText( "cmdInteger" ), + "NC", "5", + "SIZE", "30x12", + "VALUE", "0", NULL ); + named[161] = decl( "btImageRGBPut", IupButton( "Put", "cmdImageRGBPut" ), + "SIZE", "30", NULL ); + named[162] = decl( "btImageRGBGet", IupButton( "Get", "cmdImageRGBGet" ), + "SIZE", "30", NULL ); + named[163] = decl( "btImageRGBHide", IupButton( "Hide", "cmdMsgHide" ), + "SIZE", "30", NULL ); + named[164] = decl( "ImageRGBData", IupVbox( + decl( NULL, IupHbox( + decl( NULL, IupLabel( "X:" ), + "SIZE", "30x9", NULL ), + named[157] /* txtImageRGBX */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Y:" ), + "SIZE", "30x9", NULL ), + named[158] /* txtImageRGBY */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + decl( NULL, IupHbox( + decl( NULL, IupLabel( "Width:" ), + "SIZE", "30x9", NULL ), + named[159] /* txtImageRGBW */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + decl( NULL, IupLabel( "Height:" ), + "SIZE", "30x9", NULL ), + named[160] /* txtImageRGBH */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + NULL), NULL ); + named[165] = decl( "ImageRGBDeskTop", IupVbox( + IupHbox( + IupFill(), + named[164] /* ImageRGBData */, + IupFill(), + NULL), + IupHbox( + IupFill(), + named[162] /* btImageRGBGet */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[161] /* btImageRGBPut */, + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + named[163] /* btImageRGBHide */, + IupFill(), + NULL), + NULL), NULL ); + named[166] = decl( "dlgImageRGB", IupDialog( + named[165] /* ImageRGBDeskTop */ + ), + "PARENTDIALOG", "dlgMain", + "TITLE", "RGB Image", + "MAXBOX", "NO", + "MINBOX", "NO", + "CLOSE_CB", "cmdMsgHide", + "RESIZE", "NO", + "MARGIN", "5x5", NULL ); + named[167] = decl( "btCDTest", IupButton( "Close", "cmdCloseAbout" ), NULL ); + named[168] = decl( "AboutDeskTop", IupHbox( + IupFill(), + decl( NULL, IupVbox( + IupLabel( "CD Test 5.3" ), + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + IupLabel( "Antonio Scuri" ), + IupLabel( "Diego Nehab" ), + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + IupLabel( "Tecgraf/PUC-Rio" ), + decl( NULL, IupFill(), + "SIZE", "5", NULL ), + IupLabel( "CD Library Version" ), + named[169] = decl( "lblVersion", IupLabel( "" ), NULL ), + named[167] /* btCDTest */, + NULL), + "ALIGNMENT", "ACENTER", NULL ), + IupFill(), + NULL), + "MARGIN", "5x5", + "GAP", "2", NULL ); + named[170] = decl( "dlgHelpAbout", IupDialog( + named[168] /* AboutDeskTop */ + ), + "PARENTDIALOG", "dlgMain", + "TITLE", "About", + "MAXBOX", "NO", + "MINBOX", "NO", + "RESIZE", "NO", NULL ); +} diff --git a/cd/test/cdtest/colobar.h b/cd/test/cdtest/colobar.h new file mode 100755 index 0000000..263cb53 --- /dev/null +++ b/cd/test/cdtest/colobar.h @@ -0,0 +1,7 @@ +#ifndef COLORBAR_H +#define COLORBAR_H + +int ColorBarInit(Ihandle *parent, Ihandle *canvas, long int *fc, long int *bc); +void ColorBarClose(void); + +#endif diff --git a/cd/test/cdtest/colorbar.c b/cd/test/cdtest/colorbar.c new file mode 100755 index 0000000..c83f539 --- /dev/null +++ b/cd/test/cdtest/colorbar.c @@ -0,0 +1,565 @@ +/*=========================================================================*/ +/* COLORBAR.C - 03/03/96 */ +/* Color Bar implementation. */ +/*=========================================================================*/ + +/*- Constantes: -----------------------------------------------------------*/ +#define NUMCOLORS 16 + +/*- Bibliotecas padrao usadas ---------------------------------------------*/ +#include +#include +#include +#include + +/*- Inclusao das bibliotecas IUP e CD: ------------------------------------*/ +#include +#include +#include +#include + +/*- Declaraccoes e Prototypes: --------------------------------------------*/ +#include "cdtest.h" + +#undef isdigit +#include + + +/*- Globais: --------------------------------------------------------------*/ +static struct { + cdCanvas *bar_canvas; /* canvas da colorbar */ + cdCanvas *other_canvas; /* canvas ativo anteriormente */ + int w, h; /* dimensoes do canvas */ + int bgr, bgg, bgb; /* cor de fundo do dialogo pai */ + int bci, fci; /* indice das cores correntes */ + long *p_foreground, *p_background; /* variaveis do usuario */ + long colors[NUMCOLORS]; /* palheta interna */ + int bounds[2*(NUMCOLORS+1)]; /* fronteiras dos elementos da palheta */ +} colorbar; /* contexto da colorbar */ + +/*- Dialogo para mudancca da cor da palheta: ------------------------------*/ +static struct { + Ihandle *dialog; + Ihandle *red; + Ihandle *green; + Ihandle *blue; + Ihandle *alpha; + Ihandle *bt_ok; + Ihandle *bt_cancel; + int to_change; +} color_change; + +/*- Macros: ---------------------------------------------------------------*/ +#define ignore(_) (void)(_) + +/*-------------------------------------------------------------------------*/ +/* Filtra inteiros. */ +/*-------------------------------------------------------------------------*/ +static int integer(Ihandle *self, int c) +{ + ignore(self); + + if (isdigit(c)) { + return IUP_DEFAULT; + } + else if ((c==K_TAB) || (c==K_CR) || (c==K_LEFT) || + (c==K_RIGHT) || (c==K_DEL) || (c==K_BS) || (c==K_sTAB)) { + return IUP_DEFAULT; + } + else { + return IUP_IGNORE; + } +} + +/*-------------------------------------------------------------------------*/ +/* Retorna a cor de indice i. */ +/*-------------------------------------------------------------------------*/ +static long getcolor(int i) +{ + if (i<=NUMCOLORS) { + return colorbar.colors[i-1]; + } + else return 0; +} + +/*-------------------------------------------------------------------------*/ +/* Mostra a caixa de dialogo Color Change. */ +/*-------------------------------------------------------------------------*/ +static void color_change_show(int c) +{ + unsigned char r, g, b, a; + long color; + char s[4]; + + /* mostra o dialogo Color Change */ + IupShow(color_change.dialog); + + /* mostra a cor atual */ + color = getcolor(c); + cdDecodeColor(color, &r, &g, &b); + sprintf(s, "%d", r); + IupSetAttribute(color_change.red, IUP_VALUE, s); + sprintf(s, "%d", g); + IupSetAttribute(color_change.green, IUP_VALUE, s); + sprintf(s, "%d", b); + IupSetAttribute(color_change.blue, IUP_VALUE, s); + + a = cdDecodeAlpha(color); + sprintf(s, "%d", a); + IupSetAttribute(color_change.alpha, IUP_VALUE, s); + + /* salva cor a ser alterada no contexto */ + color_change.to_change = c; +} + + +/*-------------------------------------------------------------------------*/ +/* Cancela a operaccao de mudancca de cor. */ +/*-------------------------------------------------------------------------*/ +static int color_change_cancel(void) +{ + IupHide(color_change.dialog); + + return IUP_DEFAULT; +} + +/*-------------------------------------------------------------------------*/ +/* Determina as fronteiras dos elementos da palheta. */ +/*-------------------------------------------------------------------------*/ +static void bounds(int dx, int p, int *x) +{ + int i; /* contador dos intervalos */ + int j; /* indice do vetor x */ + int k; /* inicio do intervalo */ + int e; /* erro da aproximacao inteira */ + int _2p; /* dobro do numero de intervalos */ + int q; /* quociente da divisao inteira */ + int _2r; /* dobro do resto da divisao inteira */ + + /* inicializa as variaveis */ + k = 0; /* inicio do primeiro intervalo */ + j = 0; /* indice do vetor x */ + e = 0; /* inicializa o erro */ + _2p = p << 1; /* dobro do numero de intervalos */ + _2r = (dx % p) << 1; /* dobro do resto da divisao inteira */ + q = dx / p; /* quociente da divisao inteira */ + + /* gera o vetor de intervalos */ + for (i=0; i= p) { /* estourou? */ + e -= _2p; /* ajusta o novo limite */ + k += q + 1; /* arredonda para cima */ + } + else { + k += q; /* arredonda para baixo */ + } + x[j++] = k - 2; /* fim do intervalo */ + } +} + +/*-------------------------------------------------------------------------*/ +/* Acha a cor onde o mouse foi clicado por busca binaria. Retorna zero se */ +/* o click foi fora de qualquer cor. */ +/*-------------------------------------------------------------------------*/ +static int findwhere(int x, int y, int c1, int c2) +{ + int mid; + + /* so pode ser este ou o click foi fora */ + if (c1 == c2) { + if ((x > colorbar.bounds[c1<<1]) && (x < colorbar.bounds[(c1<<1) + 1])) { + if ((y > 0) && (y < (colorbar.h-1))) return c1; + else return 0; + } + else return 0; + } + + /* elemento intermediario */ + mid = (c1 + c2)>>1; + + /* se o click estah a direita do elemento intermediario */ + if (x > colorbar.bounds[(mid<<1) + 1]) return findwhere(x, y, mid+1, c2); + + /* se estah a esquerda do elemento intermediario */ + else if (x < colorbar.bounds[mid<<1]) return findwhere(x, y, c1, mid-1); + + /* estah no meio do intermediario e a vertical estah legal, eh esse */ + else if ((y > 0) && (y < (colorbar.h-1))) return mid; + + /* o programa nunca chega aqui, mas o compilador fica feliz */ + return 0; +} + +/*-------------------------------------------------------------------------*/ +/* Desenha a moldura do elemento da palheta. */ +/*-------------------------------------------------------------------------*/ +static void hollowbox(int xmin, int xmax, int ymin, int ymax) +{ + cdForeground(cdEncodeColor(255, 255, 255)); + cdLine(xmin, ymin, xmax, ymin); + cdLine(xmax, ymin+1, xmax, ymax); + + cdForeground(cdEncodeColor(102, 102, 102)); + cdLine(xmin, ymin+1, xmin, ymax); + cdLine(xmin+1, ymax, xmax-1, ymax); +} + + +/*-------------------------------------------------------------------------*/ +/* Muda a cor de indice i e retorna a anterior. */ +/*-------------------------------------------------------------------------*/ +static long changecolor(int i, long color) +{ + long temp; + + if (i<=NUMCOLORS) { + temp = colorbar.colors[i-1]; + colorbar.colors[i-1] = color; + return temp; + } + else return 0; +} + + +/*-------------------------------------------------------------------------*/ +/* Inicializa o vetor de cores. */ +/*-------------------------------------------------------------------------*/ +static void resetcolors(void) +{ + colorbar.colors[ 0] = cdEncodeColor( 0, 0, 0); + colorbar.colors[ 1] = cdEncodeColor(153, 153, 153); + colorbar.colors[ 2] = cdEncodeColor(178, 178, 178); + colorbar.colors[ 3] = cdEncodeColor(255, 255, 255); + colorbar.colors[ 4] = cdEncodeColor(255, 255, 0); + colorbar.colors[ 5] = cdEncodeColor(255, 0, 0); + colorbar.colors[ 6] = cdEncodeColor(255, 0, 255); + colorbar.colors[ 7] = cdEncodeColor( 0, 255, 255); + colorbar.colors[ 8] = cdEncodeColor( 0, 0, 255); + colorbar.colors[ 9] = cdEncodeColor( 0, 255, 0); + colorbar.colors[10] = cdEncodeColor(128, 128, 0); + colorbar.colors[11] = cdEncodeColor(128, 0, 0); + colorbar.colors[12] = cdEncodeColor(128, 0, 128); + colorbar.colors[13] = cdEncodeColor( 0, 128, 128); + colorbar.colors[14] = cdEncodeColor( 0, 0, 128); + colorbar.colors[15] = cdEncodeColor( 0, 128, 0); +} + +/*-------------------------------------------------------------------------*/ +/* Desenha a ColorBar. */ +/*-------------------------------------------------------------------------*/ +static int fColorBarRepaint(void) +{ + int i; + double dt; + + /* salva o canvas ativo no momento */ + colorbar.other_canvas = cdActiveCanvas(); + + /* ativa o canvas da colorbar */ + if (cdActivate(colorbar.bar_canvas) == CD_ERROR) { + printf("Color Bar Error: Unable to activate canvas."); + return 1; + } + cdClear(); + + /* desenha as cores da palheta */ + for (i=2; i<=2*NUMCOLORS; i+=2) { + cdForeground(getcolor(i>>1)); + cdBox(colorbar.bounds[i], colorbar.bounds[i+1], 1, colorbar.h-1); + hollowbox(colorbar.bounds[i], colorbar.bounds[i+1], 1, colorbar.h-1); + } + + /* desenha o fedback */ + dt = (colorbar.w-1)/(NUMCOLORS+1); + /* desenha a cor de fundo */ + cdForeground(getcolor(colorbar.bci)); + cdBox(1, (int)(2.0*dt/3.0), 1, (int)(2.0*(colorbar.h-1)/3.0)); + hollowbox(1, (int)(2.0*dt/3.0), 1, (int)(2.0*(colorbar.h-1)/3.0)); + /* desenha a cor de frente */ + cdForeground(getcolor(colorbar.fci)); + cdBox((int)(dt/3.0), (int)(dt)-1, (int)((colorbar.h-1)/3.0)+1, colorbar.h-1); + hollowbox((int)(dt/3.0), (int)(dt)-1, (int)((colorbar.h-1)/3.0)+1, colorbar.h-1); + + /* restaura o canvas anteriormente ativo */ + cdActivate(colorbar.other_canvas); + + return IUP_DEFAULT; +} + +/*-------------------------------------------------------------------------*/ +/* Funcao associada ao botao do mouse. */ +/*-------------------------------------------------------------------------*/ +static int fColorBarButtonCB(Ihandle *self, int b, int e, int x, int y, char *r) +{ + int c; + + ignore(self); + ignore(r); + + /* salva o canvas ativo no momento */ + colorbar.other_canvas = cdActiveCanvas(); + + /* ativa o canvas da colorbar */ + if (cdActivate(colorbar.bar_canvas) == CD_ERROR) { + printf("Color Bar Error: Unable to activate canvas."); + return 1; + } + + /* converte para coordenadas do canvas */ + cdUpdateYAxis(&y); + + /* se o botao foi pressionado */ + if (e) { + + /* acha onde foi o click */ + c = findwhere(x, y, 1, 16); + + /* se o click foi dentro de alguma cor... */ + if (c != 0) { + + /* botao da esquerda eh mudancca de cor de foreground */ + if (b == IUP_BUTTON1) { + + /* se for double-click */ + if ((isdouble(r)) && (c == colorbar.fci) ) { + + /* mostra o dialogo */ + color_change_show(c); + } + + /* muda a cor de frente corrente */ + else { + + /* largura de cada celula */ + double dt; + unsigned char r, g, b; + + /* altera a variavel do usuario */ + *(colorbar.p_foreground) = getcolor(c); + + /* altera o indice da cor de frente corrente */ + colorbar.fci = c; + + cdDecodeColor(getcolor(colorbar.fci), &r, &g, &b); + sprintf(ctgc.status_line, "cdForeground(cdEncodeColor(%d, %d, %d))", (int)r, (int)g, (int)b); + set_status(); + + /* altera o feedback no primeiro elemento da palheta */ + dt = (colorbar.w-1)/(NUMCOLORS+1); + cdForeground(getcolor(colorbar.fci)); + cdBox((int)(dt/3.0), (int)(dt)-1, (int)((colorbar.h-1)/3.0)+1, colorbar.h-1); + hollowbox((int)(dt/3.0), (int)(dt)-1, (int)((colorbar.h-1)/3.0)+1, colorbar.h-1); + } + + } + + else if (b == IUP_BUTTON3) { + + /* largura de cada celula */ + double dt; + unsigned char r, g, b; + + /* altera a variavel do usuario */ + *(colorbar.p_background) = getcolor(c); + + /* altera o indice da cor de frente corrente */ + colorbar.bci = c; + + cdDecodeColor(getcolor(colorbar.bci), &r, &g, &b); + sprintf(ctgc.status_line, "cdBackground(cdEncodeColor(%d, %d, %d))", (int)r, (int)g, (int)b); + set_status(); + + /* altera o feedback no primeiro elemento da palheta */ + dt = (colorbar.w-1)/(NUMCOLORS+1); + cdForeground(getcolor(colorbar.bci)); + cdBox(1, (int)(2.0*dt/3.0), 1, (int)(2.0*(colorbar.h-1)/3.0)); + hollowbox(1, (int)(2.0*dt/3.0), 1, (int)(2.0*(colorbar.h-1)/3.0)); + cdForeground(getcolor(colorbar.fci)); + cdBox((int)(dt/3.0), (int)(dt)-1, (int)((colorbar.h-1)/3.0)+1, colorbar.h-1); + hollowbox((int)(dt/3.0), (int)(dt)-1, (int)((colorbar.h-1)/3.0)+1, colorbar.h-1); + } + + } + + } + + /* restaura o canvas anteriormente ativo */ + cdActivate(colorbar.other_canvas); + + return IUP_DEFAULT; +} + +/*-------------------------------------------------------------------------*/ +/* Callback associado ao resize do canvas. */ +/*-------------------------------------------------------------------------*/ +static int fColorBarResizeCB(Ihandle *self, int w, int h) +{ + ignore(self); + + /* atualiza as dimensoes do canvas */ + colorbar.w = w; + colorbar.h = h; + + /* atualiza as fronteiras dos elementos da palheta */ + bounds(colorbar.w, NUMCOLORS+1, colorbar.bounds); + + return IUP_DEFAULT; +} + +/*-------------------------------------------------------------------------*/ +/* Confirma a mudanca de cores. */ +/*-------------------------------------------------------------------------*/ +static int color_change_ok(void) +{ + int r, g, b, a; + long new_color; + + /* pega os novos valores */ + r = IupGetInt(color_change.red, IUP_VALUE); + g = IupGetInt(color_change.green, IUP_VALUE); + b = IupGetInt(color_change.blue, IUP_VALUE); + a = IupGetInt(color_change.alpha, IUP_VALUE); + + /* se todos forem validos */ + if ((r<256)&&(g<256)&&(b<256)) { + + /* esconde a caixa de dialogo */ + IupHide(color_change.dialog); + + /* atualiza a cor no contexto */ + new_color = cdEncodeColor((unsigned char)r, (unsigned char) g, (unsigned char) b); + new_color = cdEncodeAlpha(new_color, (unsigned char)a); + changecolor(color_change.to_change, new_color); + + colorbar.fci = color_change.to_change; + + /* redesenha a colorbar */ + fColorBarRepaint(); + + /* altera a variavel do usuario */ + *(colorbar.p_foreground) = new_color; + + } + + return IUP_DEFAULT; +} + +/*-------------------------------------------------------------------------*/ +/* Inicializa a ColorBar. */ +/*-------------------------------------------------------------------------*/ +void ColorBarClose(void) +{ + cdKillCanvas(colorbar.bar_canvas); + IupDestroy(color_change.dialog); +} + +int ColorBarInit(Ihandle *parent, Ihandle *canvas, long *foreground, long *background) +{ + char *bg_color; + + /* pega a cor de fundo do dialogo parente */ + bg_color = IupGetAttribute(parent, "BGCOLOR"); + if (bg_color == NULL) { + printf("Color Bar Error: Unable to get bg_color."); + return 0; + } + sscanf(bg_color, "%d %d %d", &colorbar.bgr, &colorbar.bgg, &colorbar.bgb); + + /* inicializa as cores de fundo e de frente defaults */ + colorbar.fci = 1; + colorbar.bci = 4; + + /* pega o enderecco das variaveis do usuario */ + colorbar.p_foreground = foreground; + colorbar.p_background = background; + + /* inicializa a palheta interna de cores */ + resetcolors(); + + /* cria o canvas do CD */ + colorbar.bar_canvas = cdCreateCanvas(CD_IUP, canvas); + if (colorbar.bar_canvas == NULL) { + printf("Color Bar Error: Unable to create canvas."); + return 0; + } + + /* salva o canvas ativo no momento */ + colorbar.other_canvas = cdActiveCanvas(); + + /* ativa o canvas da colorbar */ + if (cdActivate(colorbar.bar_canvas) == CD_ERROR) { + printf("Color Bar Error: Unable to activate canvas."); + return 0; + } + + /* pega as dimensoes do canvas pela primeira vez */ + cdGetCanvasSize(&colorbar.w, &colorbar.h, NULL, NULL); + + /* restaura o canvas anteriormente ativo */ + if (colorbar.other_canvas != NULL) cdActivate(colorbar.other_canvas); + + /* cria o vetor com as fronteiras dos elementos da palheta */ + bounds(colorbar.w, NUMCOLORS+1, colorbar.bounds); + + /* associa os callbacks */ + IupSetFunction("cmdColorBarButtonCB", (Icallback) fColorBarButtonCB); + IupSetFunction("cmdColorBarRepaint", (Icallback) fColorBarRepaint); + IupSetFunction("cmdColorBarResizeCB", (Icallback) fColorBarResizeCB); + + /* desenha a barra de cores pela primeira vez */ + fColorBarRepaint(); + + /* inicializa o dialogo de troca de cores da palheta */ + color_change.dialog = IupDialog( + IupVbox( + IupHbox( + IupLabel("R:"), + color_change.red = IupText("cmdInteger"), + IupLabel("G:"), + color_change.green = IupText("cmdInteger"), + IupLabel("B:"), + color_change.blue = IupText("cmdInteger"), + IupLabel("A:"), + color_change.alpha = IupText("cmdInteger"), + NULL + ), + IupHbox( + IupFill(), + color_change.bt_ok = IupButton("OK", "cmdColorChangeOK"), + color_change.bt_cancel = IupButton("Cancel", "cmdColorChangeCancel"), + IupFill(), + NULL + ), + NULL + ) + ); + + /* atributos do dialogo */ + IupSetAttribute(color_change.dialog, IUP_TITLE, "Color Change:"); + IupSetAttribute(color_change.dialog, IUP_MARGIN, "5x5"); + IupSetAttribute(color_change.dialog, IUP_GAP, "5"); + IupSetAttribute(color_change.dialog, "MAXBOX", "NO"); + IupSetAttribute(color_change.dialog, "MINBOX", "NO"); + IupSetAttribute(color_change.dialog, "PARENTDIALOG", "dlgMain"); + + /* atributos dos texts */ + IupSetFunction("cmdInteger", (Icallback) integer); + IupSetAttribute(color_change.red, "NC", "3"); + IupSetAttribute(color_change.green, "NC", "3"); + IupSetAttribute(color_change.blue, "NC", "3"); + IupSetAttribute(color_change.alpha, "NC", "3"); + IupSetAttribute(color_change.red, "SIZE", "24"); + IupSetAttribute(color_change.green, "SIZE", "24"); + IupSetAttribute(color_change.blue, "SIZE", "24"); + IupSetAttribute(color_change.alpha, "SIZE", "24"); + + /* atributos dos botoes */ + IupSetAttribute(color_change.bt_ok, IUP_SIZE, "30"); + IupSetAttribute(color_change.bt_cancel, IUP_SIZE, "30"); + IupSetFunction("cmdColorChangeCancel", (Icallback) color_change_cancel); + IupSetFunction("cmdColorChangeOK", (Icallback) color_change_ok); + + return 1; +} diff --git a/cd/test/cdtest/config.mak b/cd/test/cdtest/config.mak new file mode 100755 index 0000000..e04e7d1 --- /dev/null +++ b/cd/test/cdtest/config.mak @@ -0,0 +1,24 @@ +APPNAME = cdtest + +SRC = cdtest.c cdtest_led.c colorbar.c drivers.c list.c rubber.c + +ifeq "$(TEC_SYSNAME)" "Win32" + SRC += cdtest.rc +endif + +USE_CD=Yes +USE_IUP3=Yes + +cdtest_led.c: cdtest.led + ledc -f cdtest_loadled -o cdtest_led.c cdtest.led + +USE_STATIC = Yes + +#IUP = ../../../iup +#CD = ../.. + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + LIBS = cdpdflib pdflib +else + SLIB = $(CD)/lib/$(TEC_UNAME)/libcdpdf.a $(CD)/lib/$(TEC_UNAME)/libpdflib.a +endif diff --git a/cd/test/cdtest/drivers.c b/cd/test/cdtest/drivers.c new file mode 100755 index 0000000..93918d5 --- /dev/null +++ b/cd/test/cdtest/drivers.c @@ -0,0 +1,457 @@ +/*=========================================================================*/ +/* DRIVERS.C - 10/02/95 */ +/* Suporte para os drivers do CD. */ +/*=========================================================================*/ + +/*- Bibliotecas padrao usadas: --------------------------------------------*/ +#include +#include +#include + +/*- Inclusao das bibliotecas IUP e CD: ------------------------------------*/ +#include +#include +#include + +/*- Prototypes e declaracoes do CDTest: -----------------------------------*/ +#include "cdtest.h" + +/*- Contexto do CDTest (declarado em CDTEST.C): ---------------------------*/ +extern tCTC ctgc; + +#ifdef CDTEST_WIN32 +#define CLIPBOARD_WIN32 +#define WMF +#define PRINTER +#endif + +#define CLIPBOARD +#define CGM +#define MF +#define PS +#define DXF +#define DGN +#define PDF + +static int LoadCanvas(char* ctx_name, cdContext* ctx, char *filename) +{ + if (IupGetFile(filename) == 0) + { + newmetafile(filename, ctx); + cdActivate(ctgc.iup_canvas); + cdWriteMode(CD_REPLACE); + cdLineStyle(CD_CONTINUOUS); + cdLineWidth(1); + cdBackground(CD_WHITE); + cdBackOpacity(CD_TRANSPARENT); + cdForeground(CD_BLACK); + cdInteriorStyle(CD_SOLID); + if (ctgc.stretch_play) + { + cdPlay(ctx, 0, ctgc.w-1, 0, ctgc.h-1, filename); + sprintf(ctgc.status_line, "cdPlay(%s, 0, %d, 0, %d, %s)", ctx_name, ctgc.w-1, ctgc.h-1, filename); + } + else + { + cdPlay(ctx, 0, 0, 0, 0, filename); + sprintf(ctgc.status_line, "cdPlay(%s, 0, 0, 0, 0, %s)", ctx_name, filename); + } + set_status(); + } + + return IUP_DEFAULT; +} + +static int SaveCanvas(char* ctx_name, cdContext* ctx, char *data) +{ + cdCanvas *canvas; + + canvas = cdCreateCanvas(ctx, data); + if (!canvas) + { + IupMessage("Error!", "Can not create canvas."); + return IUP_DEFAULT; + } + + cdActivate(canvas); + + cdPattern(10, 10, ctgc.pattern); + cdStipple(10, 10, ctgc.stipple); + cdInteriorStyle(CD_SOLID); + + if (ctgc.sim == 1) + cdSimulate(CD_SIM_ALL); + else + cdSimulate(CD_SIM_NONE); + + putlist(canvas); + + cdKillCanvas(canvas); + + return IUP_DEFAULT; +} + + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para o clipboard do Windows, vetorial. */ +/*-------------------------------------------------------------------------*/ +#ifdef CLIPBOARD +#include + +static int fClipBoard(void) +{ + char data[1000]; + sprintf(data, "%dx%d %g", ctgc.w, ctgc.h, ctgc.res); + return SaveCanvas("CD_CLIPBOARD", CD_CLIPBOARD, data); +} + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para o clipboard do Windows, BitMap. */ +/*-------------------------------------------------------------------------*/ +static int fClipBoardBitmap(void) +{ + char data[1000]; + sprintf(data, "%dx%d %g -b", ctgc.w, ctgc.h, ctgc.res); + return SaveCanvas("CD_CLIPBOARD", CD_CLIPBOARD, data); +} + +static int fClipBoardMetafile(void) +{ + char data[1000]; +#ifdef WIN32 + sprintf(data, "%gx%g %g -m", ((double)ctgc.w)/ctgc.res, ((double)ctgc.h)/ctgc.res, ctgc.res); +#else + sprintf(data, "%p %gx%g %g", IupGetAttribute(IupGetHandle("cnvMain"), "XDISPLAY"), ((double)ctgc.w)/ctgc.res, ((double)ctgc.h)/ctgc.res, ctgc.res); +#endif + return SaveCanvas("CD_CLIPBOARD", CD_CLIPBOARD, data); +} + +static int fClipBoardPaste(void) +{ + char* data; + newmetafile("", CD_CLIPBOARD); + cdActivate(ctgc.iup_canvas); + cdWriteMode(CD_REPLACE); + cdLineStyle(CD_CONTINUOUS); + cdLineWidth(1); + cdBackground(CD_WHITE); + cdBackOpacity(CD_TRANSPARENT); + cdForeground(CD_BLACK); + cdInteriorStyle(CD_SOLID); + +#ifdef WIN32 + data = ""; +#else + data = IupGetAttribute(IupGetHandle("cnvMain"), "XDISPLAY"); +#endif + + if (ctgc.stretch_play) + { + cdPlay(CD_CLIPBOARD, 0, ctgc.w-1, 0, ctgc.h-1, data); + sprintf(ctgc.status_line, "cdPlay(CD_CLIPBOARD, 0, %d, 0, %d, \"\")", ctgc.w-1, ctgc.h-1); + } + else + { + cdPlay(CD_CLIPBOARD, 0, 0, 0, 0, data); + sprintf(ctgc.status_line, "cdPlay(CD_CLIPBOARD, 0, 0, 0, 0, \"\")"); + } + set_status(); + return IUP_DEFAULT; +} + +#endif + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para um arquivo PostScript. */ +/*-------------------------------------------------------------------------*/ +#ifdef PS +#include + +static int fPS(void) +{ + char filename[1024]="*.ps"; + char data[1024]; + + if (IupGetFile(filename)>=0) + { + sprintf(data, "%s -s%d", filename, (int)(ctgc.res * 25.4)); + return SaveCanvas("CD_PS", CD_PS, data); + } + + return IUP_DEFAULT; +} + +static int fEPS(void) +{ + char filename[1024]="*.eps"; + char data[1024]; + + if (IupGetFile(filename)>=0) + { + sprintf(data, "%s -s%d -e -l0 -r0 -t0 -b0", filename, (int)(ctgc.res * 25.4)); + return SaveCanvas("CD_PS", CD_PS, data); + } + + return IUP_DEFAULT; +} +#endif + +#ifdef PDF +#include + +static int fPDF(void) +{ + char filename[1024]="*.pdf"; + char data[1024]; + + if (IupGetFile(filename)>=0) + { + sprintf(data, "%s -s%d", filename, (int)(ctgc.res * 25.4)); + return SaveCanvas("CD_PDF", CD_PDF, data); + } + + return IUP_DEFAULT; +} +#endif + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para um arquivo CGM. */ +/*-------------------------------------------------------------------------*/ +#ifdef CGM +#include + +static int fCGMb(void) +{ + char filename[1024]="*.cgm"; + char data[1000]; + + if (IupGetFile(filename)>=0) + { + sprintf(data, "%s %gx%g %g", filename, ((double)ctgc.w)/ctgc.res, ((double)ctgc.h)/ctgc.res, ctgc.res); + return SaveCanvas("CD_CGM", CD_CGM, data); + } + + return IUP_DEFAULT; +} + +static int fCGMt(void) +{ + char filename[1024]="*.cgm"; + char data[1000]; + + if (IupGetFile(filename)>=0) + { + sprintf(data, "%s %gx%g %g -t", filename, ((double)ctgc.w)/ctgc.res, ((double)ctgc.h)/ctgc.res, ctgc.res); + return SaveCanvas("CD_CGM", CD_CGM, data); + } + + return IUP_DEFAULT; +} + +static int fPlayCGM(void) +{ + char filename[1024]="*.cgm"; + return LoadCanvas("CD_CGM", CD_CGM, filename); +} + +#endif + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para um arquivo DXF. */ +/*-------------------------------------------------------------------------*/ +#ifdef DXF +#include + +static int fDXF(void) +{ + char filename[1024]="*.dxf"; + char data[1000]; + + if (IupGetFile(filename)>=0) + { + sprintf(data, "%s %gx%g %g", filename, ((double)ctgc.w)/ctgc.res, ((double)ctgc.h)/ctgc.res, ctgc.res); + return SaveCanvas("CD_DXF", CD_DXF, data); + } + + return IUP_DEFAULT; +} +#endif + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para um arquivo DGN. */ +/*-------------------------------------------------------------------------*/ +#ifdef DGN +#include + +static int fDGN(void) +{ + char filename[1024]="*.dgn"; + char data[1000]; + + if (IupGetFile(filename)>=0) + { + sprintf(data, "%s %gx%g %g -sseed2d.dgn", filename, ((double)ctgc.w)/ctgc.res, ((double)ctgc.h)/ctgc.res, ctgc.res); + return SaveCanvas("CD_DGN", CD_DGN, data); + } + + return IUP_DEFAULT; +} +#endif + +#ifdef MF +#include +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para um arquivo metafile do CD. */ +/*-------------------------------------------------------------------------*/ +static int fMF(void) +{ + char filename[1024]="*.mf"; + char data[1000]; + + if (IupGetFile(filename)>=0) + { + sprintf(data, "%s %gx%g %g", filename, ((double)ctgc.w)/ctgc.res, ((double)ctgc.h)/ctgc.res, ctgc.res); + return SaveCanvas("CD_METAFILE", CD_METAFILE, data); + } + + return IUP_DEFAULT; +} + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para um arquivo metafile do CD. */ +/*-------------------------------------------------------------------------*/ +static int fPlayMF(void) +{ + char filename[1024]="*.mf"; + return LoadCanvas("CD_METAFILE", CD_METAFILE, filename); +} +#endif + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para um arquivo WMF. */ +/*-------------------------------------------------------------------------*/ +#ifdef WMF +#include + +static int fWMF(void) +{ + char filename[1024]="*.wmf"; + char data[1000]; + + if (IupGetFile(filename)>=0) + { + sprintf(data, "%s %dx%d %g", filename, ctgc.w, ctgc.h, ctgc.res); + return SaveCanvas("CD_WMF", CD_WMF, data); + } + + return IUP_DEFAULT; +} + +static int fPlayWMF(void) +{ + char filename[1024]="*.wmf"; + return LoadCanvas("CD_WMF", CD_WMF, filename); +} + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para um arquivo EMF. */ +/*-------------------------------------------------------------------------*/ +#include + +static int fEMF(void) +{ + char filename[1024]="*.emf"; + char data[1000]; + + if (IupGetFile(filename)>=0) + { + sprintf(data, "%s %dx%d %g", filename, ctgc.w, ctgc.h, ctgc.res); + return SaveCanvas("CD_EMF", CD_EMF, data); + } + + return IUP_DEFAULT; +} + +static int fPlayEMF(void) +{ + char filename[1024]="*.emf"; + return LoadCanvas("CD_EMF", CD_EMF, filename); +} +#endif + +/*-------------------------------------------------------------------------*/ +/* Copia o conteudo do canvas para a impressora. */ +/*-------------------------------------------------------------------------*/ +#ifdef PRINTER +#include + +static int fPrint(void) +{ + char *data = "CDTEST.PRN -d"; + return SaveCanvas("CD_PRINTER", CD_PRINTER, data); + return IUP_DEFAULT; +} +#endif + +/*-------------------------------------------------------------------------*/ +/* Inicializa os menus de Save e Open. */ +/*-------------------------------------------------------------------------*/ +void DriversInit(void) +{ +#ifdef MF + IupSetFunction("cmdMF", (Icallback) fMF); + IupSetFunction("cmdPlayMF", (Icallback) fPlayMF); +#endif +#ifdef PS + IupSetAttribute(IupGetHandle("itPS"), IUP_ACTIVE, IUP_YES); + IupSetAttribute(IupGetHandle("itEPS"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdPS", (Icallback) fPS); + IupSetFunction("cmdEPS", (Icallback) fEPS); +#endif +#ifdef PDF + IupSetAttribute(IupGetHandle("itPDF"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdPDF", (Icallback) fPDF); +#endif +#ifdef CLIPBOARD + IupSetAttribute(IupGetHandle("itClipBoardMetafile"), IUP_ACTIVE, IUP_YES); + IupSetAttribute(IupGetHandle("itClipBoardPaste"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdClipBoardMetafile", (Icallback)fClipBoardMetafile); + IupSetFunction("cmdClipBoardPaste", (Icallback)fClipBoardPaste); +#endif +#ifdef CLIPBOARD_WIN32 + IupSetAttribute(IupGetHandle("itClipBoardBitmap"), IUP_ACTIVE, IUP_YES); + IupSetAttribute(IupGetHandle("itClipBoard"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdClipBoardBitmap", (Icallback)fClipBoardBitmap); + IupSetFunction("cmdClipBoard", (Icallback)fClipBoard); +#endif +#ifdef DXF + IupSetAttribute(IupGetHandle("itDXF"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdDXF", (Icallback) fDXF); +#endif +#ifdef DGN + IupSetAttribute(IupGetHandle("itDGN"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdDGN", (Icallback) fDGN); +#endif +#ifdef CGM + IupSetAttribute(IupGetHandle("itCGMb"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdCGMb", (Icallback) fCGMb); + IupSetAttribute(IupGetHandle("itCGMt"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdCGMt", (Icallback) fCGMt); + IupSetAttribute(IupGetHandle("itPlayCGM"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdPlayCGM", (Icallback) fPlayCGM); +#endif +#ifdef WMF + IupSetAttribute(IupGetHandle("itEMF"), IUP_ACTIVE, IUP_YES); + IupSetAttribute(IupGetHandle("itWMF"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdEMF", (Icallback) fEMF); + IupSetFunction("cmdWMF", (Icallback) fWMF); + IupSetAttribute(IupGetHandle("itPlayEMF"), IUP_ACTIVE, IUP_YES); + IupSetAttribute(IupGetHandle("itPlayWMF"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdPlayEMF", (Icallback) fPlayEMF); + IupSetFunction("cmdPlayWMF", (Icallback) fPlayWMF); +#endif +#ifdef PRINTER + IupSetAttribute(IupGetHandle("itPrint"), IUP_ACTIVE, IUP_YES); + IupSetFunction("cmdPrint", (Icallback) fPrint); +#endif +} diff --git a/cd/test/cdtest/list.c b/cd/test/cdtest/list.c new file mode 100755 index 0000000..a41c5bc --- /dev/null +++ b/cd/test/cdtest/list.c @@ -0,0 +1,278 @@ +/*=========================================================================*/ +/* LIST.C 10/12/95 */ +/* Funcoes para a manipulacao da lista de primitivas. */ +/*=========================================================================*/ + +/*- Bibliotecas padrao usadas ---------------------------------------------*/ +#include +#include +#include +#include + +/*- Inclusao das bibliotecas IUP e CD: ------------------------------------*/ +#include +#include +#include + +/*- Prototypes e declaracoes do CD Test: ----------------------------------*/ +#include "cdtest.h" + +/*- Contexto do CD Test (declarado em CDTEST.C): --------------------------*/ +extern tCTC ctgc; + +/*-------------------------------------------------------------------------*/ +/* Adiciona um ponto ao poligono temporario corrente. */ +/*-------------------------------------------------------------------------*/ +int newpolypoint(int x, int y) +{ + if (ctgc.num_points <= MAXPOINTS) { + ctgc.points[ctgc.num_points].x = x; + ctgc.points[ctgc.num_points].y = y; + ctgc.num_points++; + return TRUE; + } + else return FALSE; +} + +tList* newNode(void) +{ + tList *newnode = (tList *) malloc(sizeof (tList)); + newnode->next = NULL; + + if (ctgc.head != NULL) + { + tList *temp; + for(temp = ctgc.head; temp->next; temp = (tList *)temp->next); + temp->next = newnode; /* coloca o novo item no final da lista */ + } + else + ctgc.head = newnode; + + return newnode; +} + +/*-------------------------------------------------------------------------*/ +/* Adiciona uma linha/rect/caixa a lista de primitivas. */ +/*-------------------------------------------------------------------------*/ + +static int newtLB(int x1, int y1, int x2, int y2, int type) +{ + tList* newnode = newNode(); + + newnode->type = type; + newnode->par.lineboxpar.x1 = x1; + newnode->par.lineboxpar.x2 = x2; + newnode->par.lineboxpar.y1 = y1; + newnode->par.lineboxpar.y2 = y2; + newnode->par.lineboxpar.foreground = ctgc.foreground; + newnode->par.lineboxpar.background = ctgc.background; + newnode->par.lineboxpar.line_style = ctgc.line_style; + newnode->par.lineboxpar.line_width = ctgc.line_width; + newnode->par.lineboxpar.write_mode = ctgc.write_mode; + newnode->par.lineboxpar.line_cap = ctgc.line_cap; + newnode->par.lineboxpar.line_join = ctgc.line_join; + newnode->par.lineboxpar.interior_style = ctgc.interior_style; + newnode->par.lineboxpar.back_opacity = ctgc.back_opacity; + newnode->par.lineboxpar.hatch = ctgc.hatch; + + return TRUE; +} + +int newline(int x1, int y1, int x2, int y2) +{ + return newtLB(x1, y1, x2, y2, LINE); +} + +int newrect(int x1, int x2, int y1, int y2) +{ + return newtLB(x1, y1, x2, y2, RECT); +} + +int newbox(int x1, int x2, int y1, int y2) +{ + return newtLB(x1, y1, x2, y2, BOX); +} + +/*-------------------------------------------------------------------------*/ +/* Adiciona um arc/sector/chord a lista de primitivas. */ +/*-------------------------------------------------------------------------*/ +static int newtAS(int xc, int yc, int w, int h, double angle1, double angle2, int type) +{ + tList* newnode = newNode(); + + newnode->type = type; + newnode->par.arcsectorpar.xc = xc; + newnode->par.arcsectorpar.yc = yc; + newnode->par.arcsectorpar.w = w; + newnode->par.arcsectorpar.h = h; + newnode->par.arcsectorpar.angle1 = angle1; + newnode->par.arcsectorpar.angle2 = angle2; + newnode->par.arcsectorpar.foreground = ctgc.foreground; + newnode->par.arcsectorpar.background = ctgc.background; + newnode->par.arcsectorpar.line_style = ctgc.line_style; + newnode->par.arcsectorpar.line_width = ctgc.line_width; + newnode->par.arcsectorpar.line_cap = ctgc.line_cap; + newnode->par.arcsectorpar.line_join = ctgc.line_join; + newnode->par.arcsectorpar.write_mode = ctgc.write_mode; + newnode->par.arcsectorpar.interior_style = ctgc.interior_style; + newnode->par.arcsectorpar.back_opacity = ctgc.back_opacity; + newnode->par.arcsectorpar.hatch = ctgc.hatch; + + return TRUE; +} + +int newarc(int xc, int yc, int w, int h, double angle1, double angle2) +{ + return newtAS(xc, yc, w, h, angle1, angle2, ARC); +} + +int newsector(int xc, int yc, int w, int h, double angle1, double angle2) +{ + return newtAS(xc, yc, w, h, angle1, angle2, SECTOR); +} + +int newchord(int xc, int yc, int w, int h, double angle1, double angle2) +{ + return newtAS(xc, yc, w, h, angle1, angle2, CHORD); +} + +/*-------------------------------------------------------------------------*/ +/* Adiciona um pixel a lista de primitivas. */ +/*-------------------------------------------------------------------------*/ +int newpixel(int x, int y) +{ + tList* newnode = newNode(); + + newnode->type = PIXEL; + newnode->par.pixelpar.x = x; + newnode->par.pixelpar.y = y; + newnode->par.pixelpar.foreground = ctgc.foreground; + newnode->par.pixelpar.write_mode = ctgc.write_mode; + + return TRUE; +} + +/*-------------------------------------------------------------------------*/ +/* Adiciona um metafile a lista de primitivas. */ +/*-------------------------------------------------------------------------*/ +int newmetafile(char *filename, cdContext* ctx) +{ + tList* newnode = newNode(); + + newnode->type = META; + newnode->par.metapar.filename = (char *) malloc(strlen(filename) + 1); + newnode->par.metapar.ctx = ctx; + strcpy(newnode->par.metapar.filename, filename); + + return TRUE; +} + +/*-------------------------------------------------------------------------*/ +/* Adiciona uma marca a lista de primitivas. */ +/*-------------------------------------------------------------------------*/ +int newmark(int x, int y, int mark_size) +{ + tList* newnode = newNode(); + + newnode->type = MARK; + newnode->par.markpar.x = x; + newnode->par.markpar.y = y; + newnode->par.markpar.mark_size = mark_size; + newnode->par.markpar.foreground = ctgc.foreground; + newnode->par.markpar.write_mode = ctgc.write_mode; + newnode->par.markpar.mark_type = ctgc.mark_type; + + return TRUE; +} + +/*-------------------------------------------------------------------------*/ +/* Adiciona um texto a lista de primitivas. */ +/*-------------------------------------------------------------------------*/ +int newtext(int x, int y, char *s) +{ + tList* newnode = newNode(); + + newnode->type = TEXT; + newnode->par.textpar.x = x; + newnode->par.textpar.y = y; + newnode->par.textpar.foreground = ctgc.foreground; + newnode->par.textpar.background = ctgc.background; + newnode->par.textpar.font_style = ctgc.font_style; + newnode->par.textpar.font_typeface = ctgc.font_typeface; + newnode->par.textpar.font_size = ctgc.font_size; + newnode->par.textpar.write_mode = ctgc.write_mode; + newnode->par.textpar.back_opacity = ctgc.back_opacity; + newnode->par.textpar.text_alignment = ctgc.text_alignment; + newnode->par.textpar.text_orientation = ctgc.text_orientation; + newnode->par.textpar.s = (char *) malloc(strlen(s) + 1); + strcpy(newnode->par.textpar.s, s); + + return TRUE; +} + +/*-------------------------------------------------------------------------*/ +/* Adiciona um poligono a lista de primitivas. */ +/*-------------------------------------------------------------------------*/ +int newpoly(void) +{ + tList* newnode = newNode(); + + newnode->type = POLY; + newnode->par.polypar.foreground = ctgc.foreground; + newnode->par.polypar.background = ctgc.background; + newnode->par.polypar.line_style = ctgc.line_style; + newnode->par.polypar.line_width = ctgc.line_width; + newnode->par.polypar.write_mode = ctgc.write_mode; + newnode->par.polypar.fill_mode = ctgc.fill_mode; + newnode->par.polypar.line_cap = ctgc.line_cap; + newnode->par.polypar.line_join = ctgc.line_join; + newnode->par.polypar.poly_mode = ctgc.poly_mode; + newnode->par.polypar.interior_style = ctgc.interior_style; + newnode->par.polypar.back_opacity = ctgc.back_opacity; + newnode->par.polypar.hatch = ctgc.hatch; + newnode->par.polypar.points = (tPoint *) malloc(ctgc.num_points*sizeof(tPoint)); + newnode->par.polypar.num_points = ctgc.num_points; + memcpy(newnode->par.polypar.points, ctgc.points, ctgc.num_points*sizeof(tPoint)); + newnode->next = NULL; + + return TRUE; +} + +/*-------------------------------------------------------------------------*/ +/* Mata a lista de primitivas. */ +/*-------------------------------------------------------------------------*/ +void dellist(void) +{ + tList *killer, *back; + + for (killer = ctgc.head; killer; killer = back) { + back = (tList *) (killer->next); + if (killer->type == TEXT) { /* se for TEXT... */ + free(killer->par.textpar.s); /* ...mata a string */ + } + if (killer->type == POLY) { /* se for POLY... */ + free(killer->par.polypar.points); /* ...mata os pontos */ + } + free(killer); + } + ctgc.head = NULL; +} + +/*-------------------------------------------------------------------------*/ +/* Mata a ultima primitiva. */ +/*-------------------------------------------------------------------------*/ +void dellast(void) +{ + tList *killer; + + if (ctgc.head == NULL ) return; + else if (ctgc.head->next == NULL) { + free(ctgc.head); + ctgc.head = NULL; + } + else { + for (killer = ctgc.head; killer->next->next; killer = killer->next); + free(killer->next); + killer->next = NULL; + } +} diff --git a/cd/test/cdtest/rubber.c b/cd/test/cdtest/rubber.c new file mode 100755 index 0000000..80a5921 --- /dev/null +++ b/cd/test/cdtest/rubber.c @@ -0,0 +1,387 @@ +/*=========================================================================*/ +/* RUBBER.C - 10/12/95 */ +/* Funcoes para o desenho interativo das primitivas. */ +/*=========================================================================*/ + +/*- Bibliotecas padrao usadas ---------------------------------------------*/ +#include +#include +#include +#include + +/*- Inclusao das bibliotecas IUP e CD: ------------------------------------*/ +#include +#include +#include + +/*- Prototypes e declaracoes do CD Test: ----------------------------------*/ +#include "cdtest.h" + +/*- Contexto do CD Test (declarado em CDTEST.C): --------------------------*/ +extern tCTC ctgc; + +/*- Parametros para o desenho das primitivas: -----------------------------*/ +extern tLinePos line_pos; +extern tBoxPos box_pos; +extern tPixelPos pixel_pos; +extern tMarkPos mark_pos; +extern tArcPos arc_pos; + +/*-------------------------------------------------------------------------*/ +/* Segue as coordenadas do mouse atualizando o TXT apropriado. */ +/*-------------------------------------------------------------------------*/ +void follow(int x, int y) +{ + static char mx[10], my[10]; + static char nx[10], ny[10]; + + sprintf(nx, "%d", x); + sprintf(ny, "%d", y); + + switch(ctgc.cur_prim) { + case PIXEL: + /* atualiza os parametros do pixel */ + pixel_pos.x = x; + pixel_pos.y = y; + /* atualiza a caixa de dialogo */ + sprintf(mx, "%d", x); + sprintf(my, "%d", y); + IupSetAttribute(IupGetHandle("txtPixelX"), IUP_VALUE, mx); + IupSetAttribute(IupGetHandle("txtPixelY"), IUP_VALUE, my); + break; + case MARK: + /* atualiza os parametros da mark */ + mark_pos.x = x; + mark_pos.y = y; + /* atualiza a caixa de dialogo */ + sprintf(mx, "%d", x); + sprintf(my, "%d", y); + IupSetAttribute(IupGetHandle("txtMarkX"), IUP_VALUE, mx); + IupSetAttribute(IupGetHandle("txtMarkY"), IUP_VALUE, my); + break; + case RECT: + case BOX: + /* atualiza os parametros da box */ + if (ctgc.following) { + if (x < box_pos.x) { + box_pos.xmin = x; + box_pos.xmax = box_pos.x; + } + else { + box_pos.xmax = x; + box_pos.xmin = box_pos.x; + } + + if (y < box_pos.y) { + box_pos.ymin = y; + box_pos.ymax = box_pos.y; + } + else { + box_pos.ymax = y; + box_pos.ymin = box_pos.y; + } + } + else { + box_pos.xmax = box_pos.xmin = x; + box_pos.ymax = box_pos.ymin = y; + } + /* atualiza a caixa de dialogo */ + sprintf(mx, "%d", box_pos.xmin); + sprintf(nx, "%d", box_pos.xmax); + sprintf(my, "%d", box_pos.ymin); + sprintf(ny, "%d", box_pos.ymax); + IupSetAttribute(IupGetHandle("txtLBX1"), IUP_VALUE, mx); + IupSetAttribute(IupGetHandle("txtLBX2"), IUP_VALUE, nx); + IupSetAttribute(IupGetHandle("txtLBY1"), IUP_VALUE, my); + IupSetAttribute(IupGetHandle("txtLBY2"), IUP_VALUE, ny); + break; + case LINE: + sprintf(mx, "%d", x); + sprintf(my, "%d", y); + line_pos.x2 = x; + line_pos.y2 = y; + if (ctgc.following) { + IupSetAttribute(IupGetHandle("txtLBX2"), IUP_VALUE, mx); + IupSetAttribute(IupGetHandle("txtLBY2"), IUP_VALUE, my); + } + else { + line_pos.x1 = x; + line_pos.y1 = y; + IupSetAttribute(IupGetHandle("txtLBX1"), IUP_VALUE, mx); + IupSetAttribute(IupGetHandle("txtLBX2"), IUP_VALUE, mx); + IupSetAttribute(IupGetHandle("txtLBY1"), IUP_VALUE, my); + IupSetAttribute(IupGetHandle("txtLBY2"), IUP_VALUE, my); + } + break; + case ARC: /* ARC e SECTOR... */ + case CHORD: + case SECTOR: /* ...sao equivalentes */ + if (ctgc.following) { + /* atualiza os parametros do arc */ + arc_pos.w = 2*abs(arc_pos.xc-x+1); + arc_pos.h = 2*abs(arc_pos.yc-y+1); + /* atualiza a caixa de dialogo */ + sprintf(mx, "%d", arc_pos.w); + sprintf(my, "%d", arc_pos.h); + IupSetAttribute(IupGetHandle("txtASW"), IUP_VALUE, mx); + IupSetAttribute(IupGetHandle("txtASH"), IUP_VALUE, my); + } + else { + /* atualiza os parametros do arc */ + arc_pos.xc = x; + arc_pos.xc = y; + /* atualiza a caixa de dialogo */ + sprintf(mx, "%d", x); + sprintf(my, "%d", y); + IupSetAttribute(IupGetHandle("txtASXC"), IUP_VALUE, mx); + IupSetAttribute(IupGetHandle("txtASYC"), IUP_VALUE, my); + } + break; + case TEXT: + IupSetAttribute(IupGetHandle("txtTextX"), IUP_VALUE, nx); + IupSetAttribute(IupGetHandle("txtTextY"), IUP_VALUE, ny); + break; + case CLIP: + if (ctgc.following) { + if (atoi(nx) >= atoi(mx)) { + IupSetAttribute(IupGetHandle("txtClipXmax"), IUP_VALUE, nx); + IupSetAttribute(IupGetHandle("txtClipXmin"), IUP_VALUE, mx); + } + else { + IupSetAttribute(IupGetHandle("txtClipXmin"), IUP_VALUE, nx); + IupSetAttribute(IupGetHandle("txtClipXmax"), IUP_VALUE, mx); + } + if (atoi(ny) >= atoi(my)) { + IupSetAttribute(IupGetHandle("txtClipYmax"), IUP_VALUE, ny); + IupSetAttribute(IupGetHandle("txtClipYmin"), IUP_VALUE, my); + } + else { + IupSetAttribute(IupGetHandle("txtClipYmin"), IUP_VALUE, ny); + IupSetAttribute(IupGetHandle("txtClipYmax"), IUP_VALUE, my); + } + } + else { + IupSetAttribute(IupGetHandle("txtClipXmin"), IUP_VALUE, nx); + IupSetAttribute(IupGetHandle("txtClipYmin"), IUP_VALUE, ny); + IupSetAttribute(IupGetHandle("txtClipXmax"), IUP_VALUE, nx); + IupSetAttribute(IupGetHandle("txtClipYmax"), IUP_VALUE, ny); + strcpy(mx, nx); + strcpy(my, ny); + } + break; + case IMAGE: + if (ctgc.following) { + if (atoi(mx) <= atoi(nx)) { + sprintf(nx, "%d", abs(atoi(nx)-atoi(mx))); + IupSetAttribute(IupGetHandle("txtImageW"), IUP_VALUE, nx); + } + else { + IupSetAttribute(IupGetHandle("txtImageX"), IUP_VALUE, nx); + sprintf(nx, "%d", abs(atoi(nx)-atoi(mx))); + IupSetAttribute(IupGetHandle("txtImageW"), IUP_VALUE, nx); + } + if (atoi(my) <= atoi(ny)) { + sprintf(ny, "%d", abs(atoi(ny)-atoi(my))); + IupSetAttribute(IupGetHandle("txtImageH"), IUP_VALUE, ny); + } + else { + IupSetAttribute(IupGetHandle("txtImageY"), IUP_VALUE, ny); + sprintf(ny, "%d", abs(atoi(ny)-atoi(my))); + IupSetAttribute(IupGetHandle("txtImageH"), IUP_VALUE, ny); + } + } + else { + IupSetAttribute(IupGetHandle("txtImageX"), IUP_VALUE, nx); + IupSetAttribute(IupGetHandle("txtImageY"), IUP_VALUE, ny); + strcpy(mx, nx); + strcpy(my, ny); + } + break; + case RGB: + if (ctgc.following) { + if (atoi(mx) <= atoi(nx)) { + sprintf(nx, "%d", abs(atoi(nx)-atoi(mx))); + IupSetAttribute(IupGetHandle("txtImageRGBW"), IUP_VALUE, nx); + } + else { + IupSetAttribute(IupGetHandle("txtImageRGBX"), IUP_VALUE, nx); + sprintf(nx, "%d", abs(atoi(nx)-atoi(mx))); + IupSetAttribute(IupGetHandle("txtImageRGBW"), IUP_VALUE, nx); + } + if (atoi(my) <= atoi(ny)) { + sprintf(ny, "%d", abs(atoi(ny)-atoi(my))); + IupSetAttribute(IupGetHandle("txtImageRGBH"), IUP_VALUE, ny); + } + else { + IupSetAttribute(IupGetHandle("txtImageRGBY"), IUP_VALUE, ny); + sprintf(ny, "%d", abs(atoi(ny)-atoi(my))); + IupSetAttribute(IupGetHandle("txtImageRGBH"), IUP_VALUE, ny); + } + } + else { + IupSetAttribute(IupGetHandle("txtImageRGBX"), IUP_VALUE, nx); + IupSetAttribute(IupGetHandle("txtImageRGBY"), IUP_VALUE, ny); + strcpy(mx, nx); + strcpy(my, ny); + } + break; + default: + break; + } +} + + +/*-------------------------------------------------------------------------*/ +/* Desenha uma linha em rubber band. */ +/*-------------------------------------------------------------------------*/ +void line(tRubber what, int x, int y) +{ + static int x1, x2, y1, y2; + static int lastwhat = CLOSE; + + switch (what) { + case NEWPOINT: + x1 = x2 = x; /* novo segmento comeca no... */ + y1 = y2 = y; /* ...fim do primeiro */ + break; + case MOVE: + if (lastwhat == MOVE) { + cdLine(x1, y1, x2, y2); /* apaga o segmento velho */ + } + cdLine(x1, y1, x, y); /* desenha o novo */ + x2 = x; /* o novo se... */ + y2 = y; /* ...torna velho */ + break; + case REPAINT: + cdLine(x1, y1, x2, y2); /* recupera o segmento perdido */ + return; /* nao modifica lastwhat */ + case CLOSE: + cdLine(x1, y1, x2, y2); /* apaga o ultimo segmento */ + break; + default: + break; + } + lastwhat = what; +} + +/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ +/* Desenha uma caixa vazia (funcao nao exportada). */ +/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ +static void frame(int x1, int y1, int x2, int y2) +{ + cdLine(x1, y1, x1, y2); + cdLine(x2, y1, x2, y2); + cdLine(x1, y1, x2, y1); + cdLine(x1, y2, x2, y2); +} + +/*-------------------------------------------------------------------------*/ +/* Desenha uma caixa em rubber band. */ +/*-------------------------------------------------------------------------*/ +void box(tRubber what, int x, int y) +{ + static int x1, x2, y1, y2; + static int lastwhat = CLOSE; + + switch (what) { + case NEWPOINT: + x1 = x2 = x; /* novo segmento comeca no... */ + y1 = y2 = y; /* fim do primeiro */ + break; + case MOVE: + if (lastwhat == MOVE) { + frame(x1, y1, x2, y2); /* apaga a caixa anterior */ + } + frame(x1, y1, x, y); /* desenha a nova */ + x2 = x; /* o novo se... */ + y2 = y; /* torna velho */ + break; + case REPAINT: + frame(x1, y1, x2, y2); /* restaura a caixa perdida */ + return; /* nao modifica lastwhat */ + case CLOSE: + frame(x1, y1, x2, y2); /* apaga a caixa definitiva */ + break; + default: + break; + } + lastwhat = what; +} + +/*-------------------------------------------------------------------------*/ +/* Desenha uma caixa centrada, em rubber band. */ +/*-------------------------------------------------------------------------*/ +void arc(tRubber what, int x, int y) +{ + static int xc, yc, y1, x1; + static int lastwhat = CLOSE; + + switch (what) { + case CENTER: + xc = x1 = x; /* novo segmento comeca no... */ + yc = y1 = y; /* fim do primeiro */ + break; + case MOVE: + if (lastwhat == MOVE) { + cdArc(xc, yc, 2*abs(xc-x1+1), 2*abs(yc-y1+1), 0, 360); + } + cdArc(xc, yc, 2*abs(xc-x+1), 2*abs(yc-y+1), 0, 360); + x1 = x; /* o novo se... */ + y1 = y; /* torna velho */ + break; + case REPAINT: + cdArc(xc, yc, 2*abs(xc-x1+1), 2*abs(yc-y1+1), 0, 360); + return; /* nao modifica lastwhat */ + case CLOSE: + cdArc(xc, yc, 2*abs(xc-x1+1), 2*abs(yc-y1+1), 0, 360); + break; + default: + break; + } + lastwhat = what; +} + +/*-------------------------------------------------------------------------*/ +/* Desenha o poligono em rubber band. */ +/*-------------------------------------------------------------------------*/ +void polygon(tRubber what, int x, int y) +{ + static int x1, x2, y1, y2; + static int lastwhat = CLOSE; + + switch (what) { + case NEWPOINT: + if (lastwhat != CLOSE) { + cdLine(x1, y1, x2, y2); /* ...apaga a anterior e... */ + cdLine(x1, y1, x, y); /* desenha a definitiva */ + } + x1 = x; /* novo segmento comeca no... */ + y1 = y; /* fim do primeiro */ + break; + case MOVE: + if (lastwhat == MOVE) { + cdLine(x1, y1, x2, y2); /* apaga o segmento velho */ + } + cdLine(x1, y1, x, y); /* desenha o novo */ + x2 = x; /* o novo se... */ + y2 = y; /* torna velho */ + break; + case REPAINT: + cdLine(x1, y1, x2, y2); /* recupera o segmento perdido */ + return; /* nao modifica lastwhat */ + case CLOSE: + if (lastwhat != CLOSE) { + int i; + cdLine(x1, y1, x2, y2); /* apaga o ultimo segmento */ + /* apaga o poligono temporario inteiro */ + for (i=0; (i +#include +void draw(); +int marktype; + + +void main(void) +{ + cdCanvas *canvas; + canvas = cdCreateCanvas(CD_METAFILE,"TESTE.MF 100x100"); + cdActivate(canvas); + draw(); + cdKillCanvas(canvas); +} + + +void draw(void) +{ + cdMarkSize(5) + cdMarkType(CD_PLUS); + cdMark(10,90); + cdMarkType(CD_STAR); + cdMark(20,90); + cdMarkType(CD_CIRCLE); + cdMark(30,90); + cdMarkType(CD_X); + cdMark(40,90); + cdMarkType(CD_BOX); + cdMark(50,90); + cdMarkType(CD_DIAMOND); + cdMark(60,90); + cdMarkType(CD_HOLLOW_CIRCLE); + cdMark(70,90); + cdMarkType(CD_HOLLOW_BOX); + cdMark(80,90); + cdMarkType(CD_HOLLOW_DIAMOND); + cdMark(90,90); + + cdLineStyle(CD_CONTINUOUS); + cdLine(10,80,80,80); + cdLineStyle(CD_DASHED); + cdLine(10,75,80,75); + cdLineStyle(CD_DOTTED); + cdLine(10,70,80,70); + cdLineStyle(CD_DASH_DOT); + cdLine(10,65,80,65); + cdLineStyle(CD_DASH_DOT_DOT); + cdLine(10,60,80,60); + + cdLineStyle(CD_CONTINUOUS); + + cdHatch(CD_HORIZONTAL); + + cdBegin(CD_FILL); + cdVertex(10,50); + cdVertex(50,50); + cdVertex(50,10); + cdVertex(10,10); + cdEnd(); + + cdHatch(CD_VERTICAL); + cdBegin(CD_FILL); + cdVertex(60,50); + cdVertex(100,50); + cdVertex(100,10); + cdVertex(60,10); + cdEnd(); + + cdHatch(CD_FDIAGONAL); + cdBegin(CD_FILL); + cdVertex(110,50); + cdVertex(150,50); + cdVertex(150,10); + cdVertex(110,10); + cdEnd(); + + cdHatch(CD_BDIAGONAL); + cdBegin(CD_FILL); + cdVertex(160,50); + cdVertex(200,50); + cdVertex(200,10); + cdVertex(160,10); + cdEnd(); + + cdHatch(CD_CROSS); + cdBegin(CD_FILL); + cdVertex(210,50); + cdVertex(250,50); + cdVertex(250,10); + cdVertex(210,10); + cdEnd(); + + cdHatch(CD_DIAGCROSS); + cdBegin(CD_FILL); + cdVertex(260,50); + cdVertex(300,50); + cdVertex(300,10); + cdVertex(260,10); + cdEnd(); + + cdFont(CD_SYSTEM,CD_BOLD,CD_STANDARD); + cdText(10,100,'Teste'); + cdFont(CD_COURIER,CD_BOLD,CD_STANDARD); + cdText(60,100,'Teste'); + cdFont(CD_TIMES_ROMAN,CD_BOLD,CD_STANDARD); + cdText(110,100,'Teste'); + cdFont(CD_HELVETICA,CD_BOLD,CD_STANDARD); + cdText(160,100,'Teste'); +} diff --git a/cd/test/mf/align.mf b/cd/test/mf/align.mf new file mode 100755 index 0000000..110ac39 --- /dev/null +++ b/cd/test/mf/align.mf @@ -0,0 +1,45 @@ +CDMF 383 410 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +1 +25 5 +27 0 255 255 +12 151 328 +21 2 0 10 +8 151 329 TMWjfgoiuá +23 10 +8 150 328 TMWjfgoiuá +23 11 +8 151 327 TMWjfgoiuá +12 151 253 +23 0 +8 151 253 TMWjfgoiuá +23 1 +8 151 252 TMWjfgoiuá +23 2 +8 150 254 TMWjfgoiuá +23 3 +8 152 255 TMWjfgoiuá +12 285 335 +23 8 +8 285 336 TMWjfgoiuá +12 150 151 +23 4 +8 151 151 TMWjfgoiuá +23 5 +8 150 151 TMWjfgoiuá +23 6 +8 149 152 TMWjfgoiuá +23 7 +8 149 152 TMWjfgoiuá diff --git a/cd/test/mf/alignorient.mf b/cd/test/mf/alignorient.mf new file mode 100755 index 0000000..dbaa907 --- /dev/null +++ b/cd/test/mf/alignorient.mf @@ -0,0 +1,44 @@ +CDMF 383 410 +27 255 255 255 +28 0 255 255 +13 1 +14 1 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 60 +24 1 +25 10 +1 +25 5 +12 151 328 +21 2 0 24 +8 151 329 Text +23 10 +8 150 328 Text +23 11 +8 151 327 Text +12 151 253 +23 0 +8 151 253 Text +23 1 +8 151 252 Text +23 2 +8 150 254 Text +23 3 +8 152 255 Text +12 285 335 +23 8 +8 285 336 Text +12 150 151 +23 4 +8 151 151 Text +23 5 +8 150 151 Text +23 6 +8 149 152 Text +23 7 +8 149 152 Text diff --git a/cd/test/mf/alignxor.mf b/cd/test/mf/alignxor.mf new file mode 100755 index 0000000..0b7f25d --- /dev/null +++ b/cd/test/mf/alignxor.mf @@ -0,0 +1,44 @@ +CDMF 383 410 +27 255 255 255 +28 0 255 255 +13 0 +14 1 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +1 +25 5 +12 151 328 +21 2 0 24 +8 151 329 Text +23 10 +8 150 328 Text +23 11 +8 151 327 Text +12 151 253 +23 0 +8 151 253 Text +23 1 +8 151 252 Text +23 2 +8 150 254 Text +23 3 +8 152 255 Text +12 285 335 +23 8 +8 285 336 Text +12 150 151 +23 4 +8 151 151 Text +23 5 +8 150 151 Text +23 6 +8 149 152 Text +23 7 +8 149 152 Text diff --git a/cd/test/mf/arc.mf b/cd/test/mf/arc.mf new file mode 100755 index 0000000..cf4a8b7 --- /dev/null +++ b/cd/test/mf/arc.mf @@ -0,0 +1,25 @@ +CDMF 383 410 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +1 +13 0 +6 59 351 74 84 0 360 +6 185 348 86 76 0 180 +6 155 309 94 60 180 360 +6 307 284 86 84 180 360 +6 55 218 80 72 0 90 +6 181 190 66 84 90 180 +6 79 124 86 96 180 270 +6 236 150 82 92 45 100 +6 228 104 112 118 100 200 diff --git a/cd/test/mf/circles.mf b/cd/test/mf/circles.mf new file mode 100755 index 0000000..e1ea53c --- /dev/null +++ b/cd/test/mf/circles.mf @@ -0,0 +1,47 @@ +CDMF 619334269 619334269 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +60 0 +61 0 +18 0 +17 0 +74 0 12 System +23 9 +33 0 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +17 0 +1 +3 0 272 0 396 +6 582 376 788 718 0 360 +6 555 359 376 374 0 360 +6 537 360 124 116 0 360 +6 534 359 32 32 0 360 +6 534 359 8 8 0 360 +6 858 436 4 4 0 360 +6 869 425 4 6 0 360 +6 851 424 2 2 0 360 diff --git a/cd/test/mf/cliparea.mf b/cd/test/mf/cliparea.mf new file mode 100755 index 0000000..eb5a938 --- /dev/null +++ b/cd/test/mf/cliparea.mf @@ -0,0 +1,80 @@ +CDMF 499 442 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +1 +3 72 308 136 284 +2 1 +28 255 0 0 +18 0 +17 0 +5 7 369 38 368 +27 0 0 0 +4 144 347 376 144 +28 0 0 255 +4 214 329 362 161 +4 202 136 362 220 +4 18 282 169 83 +27 255 255 255 +34 27 161 211 318 +27 0 0 0 +6 56 190 114 72 0 360 +27 255 255 255 +18 0 +17 0 +7 166 150 52 60 0 360 +8 57 129 Text +8 92 132 Text +8 101 134 Text +8 166 278 Text +8 169 287 Text +8 206 285 Text +18 0 +17 0 +9 1 +10 190 260 +10 305 342 +10 399 254 +10 262 197 +10 181 220 +11 +18 0 +17 0 +9 0 +10 120 253 +10 72 324 +10 134 326 +10 141 294 +11 diff --git a/cd/test/mf/fill.mf b/cd/test/mf/fill.mf new file mode 100755 index 0000000..8367875 --- /dev/null +++ b/cd/test/mf/fill.mf @@ -0,0 +1,48 @@ +CDMF 480 405 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +1 +3 0 272 0 396 +28 255 0 0 +17 0 +13 0 +5 40 111 256 330 +17 1 +5 153 215 265 326 +17 2 +5 43 155 140 206 +17 3 +5 219 324 107 201 diff --git a/cd/test/mf/fill_x_hollow.mf b/cd/test/mf/fill_x_hollow.mf new file mode 100755 index 0000000..b8f429a --- /dev/null +++ b/cd/test/mf/fill_x_hollow.mf @@ -0,0 +1,170 @@ +CDMF 1239 759 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +60 0 +61 0 +18 0 +17 0 +74 0 12 System +23 9 +33 0 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +17 0 +1 +3 0 272 0 396 +18 0 +17 0 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +17 0 +1 +18 0 +17 0 +9 2 +10 55 428 +10 300 427 +10 121 345 +10 159 499 +10 252 334 +11 +18 0 +17 0 +9 2 +10 444 432 +10 637 430 +10 472 357 +10 529 502 +10 596 350 +11 +18 0 +17 0 +9 2 +10 499 98 +10 684 96 +10 680 215 +10 546 215 +10 546 171 +10 633 169 +10 634 132 +10 578 132 +10 578 258 +10 473 256 +11 +18 0 +17 0 +9 2 +10 90 94 +10 264 95 +10 259 220 +10 140 220 +10 141 149 +10 218 151 +10 218 117 +10 168 116 +10 168 255 +10 73 253 +11 +28 255 0 0 +9 0 +10 55 428 +10 300 427 +10 121 345 +10 159 499 +10 252 334 +11 +18 0 +17 0 +58 1 +9 0 +10 444 432 +10 637 430 +10 472 357 +10 529 502 +10 596 350 +11 +18 0 +17 0 +9 0 +10 499 98 +10 684 96 +10 680 215 +10 546 215 +10 546 171 +10 633 169 +10 634 132 +10 578 132 +10 578 258 +10 473 256 +11 +18 0 +17 0 +58 0 +9 0 +10 90 94 +10 264 95 +10 259 220 +10 140 220 +10 141 149 +10 218 151 +10 218 117 +10 168 116 +10 168 255 +10 73 253 +11 +28 0 0 0 +34 318 394 283 376 +28 255 0 0 +18 0 +17 0 +5 318 394 283 376 +28 0 0 0 +6 363 174 82 148 0 360 +28 255 0 0 +18 0 +17 0 +7 363 174 82 148 0 360 diff --git a/cd/test/mf/font.mf b/cd/test/mf/font.mf new file mode 100755 index 0000000..72f16ad --- /dev/null +++ b/cd/test/mf/font.mf @@ -0,0 +1,49 @@ +CDMF 488 466 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +1 +3 0 382 0 409 +21 0 0 24 +13 0 +8 39 420 System +21 0 1 24 +8 48 383 System +21 0 2 24 +8 49 352 System +21 0 3 24 +8 67 317 System +21 1 3 24 +8 229 316 Courier +21 1 2 24 +8 236 352 Courier +21 1 1 24 +8 233 387 Courier +21 1 0 24 +8 229 430 Courier +21 2 0 24 +8 57 264 Times +21 2 1 24 +8 89 226 Times +21 2 2 24 +8 104 187 Times +21 2 3 24 +8 99 157 Times +21 3 0 24 +8 302 273 Helvetica +21 3 1 24 +8 326 238 Helvetica +21 3 2 24 +8 337 200 Helvetica +21 3 3 24 +8 336 145 Helvetica diff --git a/cd/test/mf/grays.mf b/cd/test/mf/grays.mf new file mode 100755 index 0000000..23a176c --- /dev/null +++ b/cd/test/mf/grays.mf @@ -0,0 +1,59 @@ +CDMF 980 599 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +17 0 +1 +3 0 272 0 396 +25 5 +12 167 511 +12 166 487 +12 167 472 +12 168 440 +12 167 423 +12 168 402 +12 167 377 +12 166 358 +12 166 329 +12 166 312 +31 227 512 0 0 0 +31 227 313 255 255 255 +31 232 401 128 128 128 +31 229 460 64 64 64 +31 232 348 192 192 192 +31 228 484 32 32 32 +31 230 431 96 96 96 +31 233 374 160 160 160 +31 232 326 224 224 224 diff --git a/cd/test/mf/hatch.mf b/cd/test/mf/hatch.mf new file mode 100755 index 0000000..d8e30d6 --- /dev/null +++ b/cd/test/mf/hatch.mf @@ -0,0 +1,47 @@ +CDMF 472 410 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +1 +3 0 382 0 409 +28 255 0 0 +18 5 +17 0 +5 20 455 264 370 +5 21 452 124 229 +28 0 0 255 +18 0 +13 0 +5 29 78 286 347 +18 1 +5 97 142 285 346 +18 2 +5 165 214 286 345 +18 3 +5 231 287 285 346 +18 4 +5 307 366 284 346 +18 5 +5 386 438 286 347 +13 1 +5 383 439 142 202 +18 4 +5 308 362 145 203 +18 3 +5 234 290 144 202 +18 2 +5 163 218 142 203 +18 1 +5 99 149 140 208 +18 0 +5 28 87 141 208 diff --git a/cd/test/mf/lines.mf b/cd/test/mf/lines.mf new file mode 100755 index 0000000..1b91129 --- /dev/null +++ b/cd/test/mf/lines.mf @@ -0,0 +1,44 @@ +CDMF 511 397 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +1 +3 0 272 0 396 +28 255 0 0 +13 0 +5 58 439 214 345 +5 59 454 40 158 +28 0 0 255 +4 74 318 419 315 +15 1 +4 79 294 409 286 +15 2 +4 81 276 414 260 +15 3 +4 79 258 416 236 +15 4 +4 77 231 411 223 +13 1 +4 81 49 417 47 +15 3 +4 84 63 427 59 +15 2 +4 88 80 443 75 +15 1 +4 78 100 440 93 +15 0 +4 79 122 436 113 +16 10 +4 76 201 438 201 +15 1 +4 80 174 441 176 diff --git a/cd/test/mf/marks.mf b/cd/test/mf/marks.mf new file mode 100755 index 0000000..2e3d561 --- /dev/null +++ b/cd/test/mf/marks.mf @@ -0,0 +1,33 @@ +CDMF 511 397 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +1 +3 0 272 0 396 +25 15 +28 0 0 255 +12 37 344 +24 2 +12 84 343 +24 3 +12 129 335 +24 4 +12 173 332 +24 5 +12 227 334 +24 6 +12 274 331 +24 7 +12 297 329 +24 8 +12 338 319 diff --git a/cd/test/mf/natal.mf b/cd/test/mf/natal.mf new file mode 100755 index 0000000..85de77f --- /dev/null +++ b/cd/test/mf/natal.mf @@ -0,0 +1,1933 @@ +CDMF 719 433 +27 255 255 255 +2 0 +1 +3 0 383 0 381 +2 0 +28 0 128 0 +27 255 255 255 +14 0 +15 0 +16 1 +18 0 +17 0 +13 0 +9 1 +10 297 384 +10 375 314 +10 313 310 +10 413 246 +10 331 243 +10 407 166 +10 328 165 +10 368 112 +10 243 115 +10 295 151 +10 228 153 +10 281 225 +10 210 229 +10 283 294 +10 226 299 +10 297 383 +11 +3 0 383 0 381 +2 0 +14 0 +31 285 351 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 301 356 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 285 338 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 275 331 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 318 332 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 299 332 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 297 313 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 307 289 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 296 267 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 274 254 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 256 253 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 252 253 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 252 246 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 293 243 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 295 244 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 292 272 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 290 277 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 345 271 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 363 260 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 387 254 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 374 258 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 300 256 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 310 254 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 312 244 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 323 264 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 316 267 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 302 238 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 282 198 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 319 193 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 325 216 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 350 193 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 365 187 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 331 182 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 236 176 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 281 169 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 270 169 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 277 195 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 297 219 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 299 215 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 291 171 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 306 164 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 309 147 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 273 137 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 295 128 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 363 119 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 317 119 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 320 123 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 321 127 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 341 123 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 342 127 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 318 143 0 128 0 +3 0 383 0 381 +2 0 +14 0 +31 316 163 0 128 0 +3 0 383 0 381 +2 0 +28 0 128 0 +27 0 128 0 +14 0 +15 0 +16 1 +18 0 +17 0 +13 0 +9 1 +10 297 382 +10 374 314 +10 316 310 +10 416 244 +10 338 240 +10 406 168 +10 329 164 +10 369 114 +10 243 114 +10 296 151 +10 235 153 +10 281 229 +10 208 229 +10 279 293 +10 238 302 +10 297 380 +11 +3 0 383 0 381 +2 0 +14 0 +25 5 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 107 123 111 127 +4 107 127 111 123 +4 107 125 111 125 +4 109 123 109 127 +17 0 +15 0 +16 1 +3 0 383 0 381 +2 0 +14 0 +25 5 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 294 224 298 228 +4 294 228 298 224 +4 294 226 298 226 +4 296 224 296 228 +17 0 +15 0 +16 1 +3 0 383 0 381 +2 0 +14 0 +25 5 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 318 173 322 177 +4 318 177 322 173 +4 318 175 322 175 +4 320 173 320 177 +17 0 +15 0 +16 1 +3 0 383 0 381 +2 0 +14 0 +25 5 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 293 165 297 169 +4 293 169 297 165 +4 293 167 297 167 +4 295 165 295 169 +17 0 +15 0 +16 1 +3 0 383 0 381 +2 0 +14 0 +25 5 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 294 164 298 168 +4 294 168 298 164 +4 294 166 298 166 +4 296 164 296 168 +17 0 +15 0 +16 1 +3 0 383 0 381 +2 0 +14 0 +25 5 +24 1 +28 153 153 153 +17 0 +15 0 +16 1 +4 153 62 157 66 +4 153 66 157 62 +4 153 64 157 64 +4 155 62 155 66 +17 0 +15 0 +16 1 +3 0 383 0 381 +2 0 +14 0 +25 5 +24 1 +28 153 153 153 +17 0 +15 0 +16 1 +4 251 95 255 99 +4 251 99 255 95 +4 251 97 255 97 +4 253 95 253 99 +17 0 +15 0 +16 1 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 153 153 153 +4 298 377 300 377 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 300 379 245 308 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 241 303 288 300 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 288 297 217 232 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 217 232 287 232 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 286 229 227 156 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 227 156 285 153 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 285 152 228 104 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 228 104 360 106 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 359 112 324 166 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 324 166 395 167 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 392 177 331 238 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 331 240 411 249 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 411 249 310 312 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 310 312 363 321 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 363 321 302 375 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 302 375 333 323 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 319 322 292 367 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 285 353 302 316 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 273 335 333 243 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 258 320 283 308 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 303 309 348 253 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 333 291 366 254 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 369 266 377 261 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 282 284 352 182 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 328 235 374 174 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 345 177 351 173 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 294 286 313 234 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 277 268 336 180 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 257 267 274 244 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 240 249 261 241 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 288 238 323 169 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 280 217 340 119 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 268 200 315 116 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 248 177 253 165 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 255 187 263 170 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 263 199 329 113 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 282 141 306 112 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 271 130 280 110 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 261 123 264 106 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 0 128 0 +4 255 177 323 165 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 245 307 10 8 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 259 314 10 8 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 277 343 6 10 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 331 328 10 14 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 357 322 6 6 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 284 270 2 2 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 297 296 8 6 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 329 280 18 26 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 356 260 8 8 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 298 256 8 6 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 271 254 8 8 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 244 248 2 6 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 284 235 22 14 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 323 224 12 16 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 341 204 12 16 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 379 177 2 4 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 337 177 10 4 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 354 183 6 10 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 356 172 4 10 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 268 199 10 14 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 294 205 4 6 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 266 190 4 14 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 240 174 8 6 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 276 170 24 10 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 309 165 0 4 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 310 176 6 8 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 314 158 2 4 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 320 138 6 10 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 338 114 6 2 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 287 115 8 6 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 291 131 6 4 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 264 122 6 10 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 244 111 6 6 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 0 0 +27 0 128 0 +18 0 +17 0 +13 0 +7 322 110 8 2 0 360 +3 0 383 0 381 +2 0 +14 0 +15 0 +16 14 +28 255 255 255 +27 0 128 0 +18 0 +17 0 +13 0 +7 287 359 0 0 0 360 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 273 355 285 367 +4 273 367 285 355 +4 273 361 285 361 +4 279 355 279 367 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 309 352 321 364 +4 309 364 321 352 +4 309 358 321 358 +4 315 352 315 364 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 309 318 321 330 +4 309 330 321 318 +4 309 324 321 324 +4 315 318 315 330 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 279 299 291 311 +4 279 311 291 299 +4 279 305 291 305 +4 285 299 285 311 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 268 267 280 279 +4 268 279 280 267 +4 268 273 280 273 +4 274 267 274 279 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 269 242 281 254 +4 269 254 281 242 +4 269 248 281 248 +4 275 242 275 254 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 237 236 249 248 +4 237 248 249 236 +4 237 242 249 242 +4 243 236 243 248 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 214 239 226 251 +4 214 251 226 239 +4 214 245 226 245 +4 220 239 220 251 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 212 206 224 218 +4 212 218 224 206 +4 212 212 224 212 +4 218 206 218 218 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 280 240 292 252 +4 280 252 292 240 +4 280 246 292 246 +4 286 240 286 252 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 344 249 356 261 +4 344 261 356 249 +4 344 255 356 255 +4 350 249 350 261 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 342 287 354 299 +4 342 299 354 287 +4 342 293 354 293 +4 348 287 348 299 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 376 264 388 276 +4 376 276 388 264 +4 376 270 388 270 +4 382 264 382 276 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 380 229 392 241 +4 380 241 392 229 +4 380 235 392 235 +4 386 229 386 241 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 380 241 392 253 +4 380 253 392 241 +4 380 247 392 247 +4 386 241 386 253 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 311 283 323 295 +4 311 295 323 283 +4 311 289 323 289 +4 317 283 317 295 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 306 339 318 351 +4 306 351 318 339 +4 306 345 318 345 +4 312 339 312 351 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 299 359 311 371 +4 299 371 311 359 +4 299 365 311 365 +4 305 359 305 371 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 277 325 289 337 +4 277 337 289 325 +4 277 331 289 331 +4 283 325 283 337 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 259 315 271 327 +4 259 327 271 315 +4 259 321 271 321 +4 265 315 265 327 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 306 282 318 294 +4 306 294 318 282 +4 306 288 318 288 +4 312 282 312 294 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 308 236 320 248 +4 308 248 320 236 +4 308 242 320 242 +4 314 236 314 248 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 294 215 306 227 +4 294 227 306 215 +4 294 221 306 221 +4 300 215 300 227 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 290 191 302 203 +4 290 203 302 191 +4 290 197 302 197 +4 296 191 296 203 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 248 156 260 168 +4 248 168 260 156 +4 248 162 260 162 +4 254 156 254 168 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 216 157 228 169 +4 216 169 228 157 +4 216 163 228 163 +4 222 157 222 169 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 246 187 258 199 +4 246 199 258 187 +4 246 193 258 193 +4 252 187 252 199 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 296 182 308 194 +4 296 194 308 182 +4 296 188 308 188 +4 302 182 302 194 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 360 175 372 187 +4 360 187 372 175 +4 360 181 372 181 +4 366 175 366 187 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 398 170 410 182 +4 398 182 410 170 +4 398 176 410 176 +4 404 170 404 182 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 355 208 367 220 +4 355 220 367 208 +4 355 214 367 214 +4 361 208 361 220 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 323 210 335 222 +4 323 222 335 210 +4 323 216 335 216 +4 329 210 329 222 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 324 183 336 195 +4 324 195 336 183 +4 324 189 336 189 +4 330 183 330 195 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 323 152 335 164 +4 323 164 335 152 +4 323 158 335 158 +4 329 152 329 164 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 328 131 340 143 +4 328 143 340 131 +4 328 137 340 137 +4 334 131 334 143 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 334 110 346 122 +4 334 122 346 110 +4 334 116 346 116 +4 340 110 340 122 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 289 109 301 121 +4 289 121 301 109 +4 289 115 301 115 +4 295 109 295 121 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 284 135 296 147 +4 284 147 296 135 +4 284 141 296 141 +4 290 135 290 147 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 267 127 279 139 +4 267 139 279 127 +4 267 133 279 133 +4 273 127 273 139 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 259 111 271 123 +4 259 123 271 111 +4 259 117 271 117 +4 265 111 265 123 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 233 109 245 121 +4 233 121 245 109 +4 233 115 245 115 +4 239 109 239 121 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 303 107 315 119 +4 303 119 315 107 +4 303 113 315 113 +4 309 107 309 119 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 317 111 329 123 +4 317 123 329 111 +4 317 117 329 117 +4 323 111 323 123 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 312 134 324 146 +4 312 146 324 134 +4 312 140 324 140 +4 318 134 318 146 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 255 +17 0 +15 0 +16 1 +4 313 191 325 203 +4 313 203 325 191 +4 313 197 325 197 +4 319 191 319 203 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 12 +24 1 +28 255 255 0 +17 0 +15 0 +16 1 +4 295 377 307 389 +4 295 389 307 377 +4 295 383 307 383 +4 301 377 301 389 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 22 +24 1 +28 255 255 0 +17 0 +15 0 +16 1 +4 292 369 314 391 +4 292 391 314 369 +4 292 380 314 380 +4 303 369 303 391 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 22 +24 1 +28 255 255 0 +17 0 +15 0 +16 1 +4 287 371 309 393 +4 287 393 309 371 +4 287 382 309 382 +4 298 371 298 393 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 22 +24 1 +28 255 255 0 +17 0 +15 0 +16 1 +4 292 380 314 402 +4 292 402 314 380 +4 292 391 314 391 +4 303 380 303 402 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 22 +24 1 +28 255 255 0 +17 0 +15 0 +16 1 +4 287 370 309 392 +4 287 392 309 370 +4 287 381 309 381 +4 298 370 298 392 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 22 +24 1 +28 255 255 0 +17 0 +15 0 +16 1 +4 287 372 309 394 +4 287 394 309 372 +4 287 383 309 383 +4 298 372 298 394 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 22 +24 1 +28 255 255 0 +17 0 +15 0 +16 1 +4 290 373 312 395 +4 290 395 312 373 +4 290 384 312 384 +4 301 373 301 395 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 22 +24 1 +28 255 255 0 +17 0 +15 0 +16 1 +4 292 373 314 395 +4 292 395 314 373 +4 292 384 314 384 +4 303 373 303 395 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 22 +24 1 +28 255 255 0 +17 0 +15 0 +16 1 +4 294 373 316 395 +4 294 395 316 373 +4 294 384 316 384 +4 305 373 305 395 +17 0 +15 0 +16 14 +3 0 383 0 381 +2 0 +14 0 +25 22 +24 1 +28 255 255 0 +17 0 +15 0 +16 1 +4 291 383 313 405 +4 291 405 313 383 +4 291 394 313 394 +4 302 383 302 405 +17 0 +15 0 +16 14 +2 0 diff --git a/cd/test/mf/poly.mf b/cd/test/mf/poly.mf new file mode 100755 index 0000000..d299180 --- /dev/null +++ b/cd/test/mf/poly.mf @@ -0,0 +1,88 @@ +CDMF 619334269 619334269 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +60 0 +61 0 +18 0 +17 0 +74 0 12 System +23 9 +33 0 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +17 0 +1 +3 0 272 0 396 +18 0 +17 0 +58 0 +9 0 +10 55 428 +10 300 427 +10 121 345 +10 159 499 +10 252 334 +11 +18 0 +17 0 +58 1 +9 0 +10 444 432 +10 637 430 +10 472 357 +10 529 502 +10 596 350 +11 +18 0 +17 0 +9 0 +10 499 98 +10 684 96 +10 680 215 +10 546 215 +10 546 171 +10 633 169 +10 634 132 +10 578 132 +10 578 258 +10 473 256 +11 +18 0 +17 0 +58 0 +9 0 +10 90 94 +10 264 95 +10 259 220 +10 140 220 +10 141 149 +10 218 151 +10 218 117 +10 168 116 +10 168 255 +10 73 253 +11 diff --git a/cd/test/mf/poly2.mf b/cd/test/mf/poly2.mf new file mode 100755 index 0000000..387431c --- /dev/null +++ b/cd/test/mf/poly2.mf @@ -0,0 +1,88 @@ +CDMF 619334269 619334269 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +60 0 +61 0 +18 0 +17 0 +74 0 12 System +23 9 +33 0 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +17 0 +1 +3 0 272 0 396 +18 0 +17 0 +58 0 +9 2 +10 55 428 +10 300 427 +10 121 345 +10 159 499 +10 252 334 +11 +18 0 +17 0 +58 1 +9 2 +10 444 432 +10 637 430 +10 472 357 +10 529 502 +10 596 350 +11 +18 0 +17 0 +9 2 +10 499 98 +10 684 96 +10 680 215 +10 546 215 +10 546 171 +10 633 169 +10 634 132 +10 578 132 +10 578 258 +10 473 256 +11 +18 0 +17 0 +58 0 +9 2 +10 90 94 +10 264 95 +10 259 220 +10 140 220 +10 141 149 +10 218 151 +10 218 117 +10 168 116 +10 168 255 +10 73 253 +11 diff --git a/cd/test/mf/poly3.mf b/cd/test/mf/poly3.mf new file mode 100755 index 0000000..e9f06d1 --- /dev/null +++ b/cd/test/mf/poly3.mf @@ -0,0 +1,136 @@ +CDMF 619334269 619334269 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +60 0 +61 0 +18 0 +17 0 +74 0 12 System +23 9 +33 0 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +17 0 +1 +3 0 272 0 396 +18 0 +17 0 +58 0 +9 2 +10 55 428 +10 300 427 +10 121 345 +10 159 499 +10 252 334 +11 +18 0 +17 0 +58 1 +9 2 +10 444 432 +10 637 430 +10 472 357 +10 529 502 +10 596 350 +11 +18 0 +17 0 +9 2 +10 499 98 +10 684 96 +10 680 215 +10 546 215 +10 546 171 +10 633 169 +10 634 132 +10 578 132 +10 578 258 +10 473 256 +11 +18 0 +17 0 +58 0 +9 2 +10 90 94 +10 264 95 +10 259 220 +10 140 220 +10 141 149 +10 218 151 +10 218 117 +10 168 116 +10 168 255 +10 73 253 +11 +28 255 0 0 +58 0 +9 0 +10 55 428 +10 300 427 +10 121 345 +10 159 499 +10 252 334 +11 +18 0 +17 0 +58 1 +9 0 +10 444 432 +10 637 430 +10 472 357 +10 529 502 +10 596 350 +11 +18 0 +17 0 +9 0 +10 499 98 +10 684 96 +10 680 215 +10 546 215 +10 546 171 +10 633 169 +10 634 132 +10 578 132 +10 578 258 +10 473 256 +11 +18 0 +17 0 +58 0 +9 0 +10 90 94 +10 264 95 +10 259 220 +10 140 220 +10 141 149 +10 218 151 +10 218 117 +10 168 116 +10 168 255 +10 73 253 +11 diff --git a/cd/test/mf/poly4.mf b/cd/test/mf/poly4.mf new file mode 100755 index 0000000..83cf601 --- /dev/null +++ b/cd/test/mf/poly4.mf @@ -0,0 +1,136 @@ +CDMF 619334269 619334269 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +60 0 +61 0 +18 0 +17 0 +74 0 12 System +23 9 +33 0 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +17 0 +1 +3 0 272 0 396 +18 0 +17 0 +58 0 +9 0 +10 55 428 +10 300 427 +10 121 345 +10 159 499 +10 252 334 +11 +18 0 +17 0 +58 1 +9 0 +10 444 432 +10 637 430 +10 472 357 +10 529 502 +10 596 350 +11 +18 0 +17 0 +9 0 +10 499 98 +10 684 96 +10 680 215 +10 546 215 +10 546 171 +10 633 169 +10 634 132 +10 578 132 +10 578 258 +10 473 256 +11 +18 0 +17 0 +58 0 +9 0 +10 90 94 +10 264 95 +10 259 220 +10 140 220 +10 141 149 +10 218 151 +10 218 117 +10 168 116 +10 168 255 +10 73 253 +11 +28 255 0 0 +58 0 +9 2 +10 55 428 +10 300 427 +10 121 345 +10 159 499 +10 252 334 +11 +18 0 +17 0 +58 1 +9 2 +10 444 432 +10 637 430 +10 472 357 +10 529 502 +10 596 350 +11 +18 0 +17 0 +9 2 +10 499 98 +10 684 96 +10 680 215 +10 546 215 +10 546 171 +10 633 169 +10 634 132 +10 578 132 +10 578 258 +10 473 256 +11 +18 0 +17 0 +58 0 +9 2 +10 90 94 +10 264 95 +10 259 220 +10 140 220 +10 141 149 +10 218 151 +10 218 117 +10 168 116 +10 168 255 +10 73 253 +11 diff --git a/cd/test/mf/poly5.mf b/cd/test/mf/poly5.mf new file mode 100755 index 0000000..acbb116 --- /dev/null +++ b/cd/test/mf/poly5.mf @@ -0,0 +1,89 @@ +CDMF 619334269 619334269 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +60 0 +61 0 +18 0 +17 0 +74 0 12 System +23 9 +33 0 +20 10 10 +255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 19 10 10 +0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 +0 1 0 0 0 1 1 0 0 0 +0 1 0 0 0 1 0 1 0 0 +0 1 0 0 0 1 0 0 1 0 +0 1 1 1 1 1 0 0 1 0 +0 0 1 0 0 0 1 0 1 0 +0 0 0 1 0 0 0 1 1 0 +0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 +17 0 +1 +3 0 272 0 396 +18 0 +17 0 +28 255 0 0 +58 0 +9 0 +10 55 428 +10 300 427 +10 121 345 +10 159 499 +10 252 334 +11 +18 0 +17 0 +58 1 +9 0 +10 444 432 +10 637 430 +10 472 357 +10 529 502 +10 596 350 +11 +18 0 +17 0 +9 0 +10 499 98 +10 684 96 +10 680 215 +10 546 215 +10 546 171 +10 633 169 +10 634 132 +10 578 132 +10 578 258 +10 473 256 +11 +18 0 +17 0 +58 0 +9 0 +10 90 94 +10 264 95 +10 259 220 +10 140 220 +10 141 149 +10 218 151 +10 218 117 +10 168 116 +10 168 255 +10 73 253 +11 diff --git a/cd/test/mf/sector.mf b/cd/test/mf/sector.mf new file mode 100755 index 0000000..d889752 --- /dev/null +++ b/cd/test/mf/sector.mf @@ -0,0 +1,22 @@ +CDMF 383 410 +27 255 255 255 +28 0 0 0 +13 1 +14 0 +15 0 +16 1 +18 0 +17 0 +21 0 0 12 +23 9 +33 0 +24 1 +25 10 +1 +13 0 +7 66 336 70 74 0 360 +7 181 348 74 88 45 100 +7 188 234 122 102 0 180 +7 126 96 150 100 180 360 +7 238 159 88 70 180 360 +7 309 63 76 68 100 200 diff --git a/cd/test/screencapture.c b/cd/test/screencapture.c new file mode 100755 index 0000000..1ac8d2c --- /dev/null +++ b/cd/test/screencapture.c @@ -0,0 +1,36 @@ +#include +#include +#include +#include +#include + +void main() +{ + cdCanvas *cd_canvas; + unsigned char *red, *green, *blue; + int width, height, size; + + cd_canvas = cdCreateCanvas(CD_NATIVEWINDOW, NULL); + if (!cd_canvas) + { + printf("Error creating canvas.\n"); + return; + } + + cdActivate(cd_canvas); + + cdGetCanvasSize(&width, &height, NULL, NULL); + size = width * height; + red = (unsigned char*)calloc(size, 1); + green = (unsigned char*)calloc(size, 1); + blue = (unsigned char*)calloc(size, 1); + + cdGetImageRGB(red, green, blue, 0, 0, width, height); + imSaveRGB(width, height, IM_JPG|IM_COMPRESSED, red, green, blue, "scap.jpg"); + + cdKillCanvas(cd_canvas); + + free(red); + free(green); + free(blue); +} diff --git a/cd/test/screencapture.mak b/cd/test/screencapture.mak new file mode 100755 index 0000000..1744375 --- /dev/null +++ b/cd/test/screencapture.mak @@ -0,0 +1,8 @@ +APPNAME = screencapture +APPTYPE = console + +USE_CD = Yes +USE_IUP = YEs +USE_IM = Yes + +SRC = screencapture.c diff --git a/cd/test/simple/config.mak b/cd/test/simple/config.mak new file mode 100755 index 0000000..fee0960 --- /dev/null +++ b/cd/test/simple/config.mak @@ -0,0 +1,24 @@ +APPNAME = simple + +SRC = simple.c simple_led.c iupmain.c + +DBG = Yes +USE_CD=Yes +USE_IUP3=Yes + +simple_led.c: simple.led + ledc -f simple_loadled -o simple_led.c simple.led + +USE_STATIC = Yes + +#IUP = ../../../iup +#CD = ../.. + +#USE_IM = Yes + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + LIBS = cdpdf pdflib cdcontextplus gdiplus +else + SLIB = $(CD)/lib/$(TEC_UNAME)/libcdpdf.a $(CD)/lib/$(TEC_UNAME)/libpdflib.a $(CD)/lib/$(TEC_UNAME)/libcdcontextplus.a + LIBS = Xrender Xft +endif diff --git a/cd/test/simple/gdiplustest.cpp b/cd/test/simple/gdiplustest.cpp new file mode 100755 index 0000000..af7b643 --- /dev/null +++ b/cd/test/simple/gdiplustest.cpp @@ -0,0 +1,116 @@ +#include +#include +using namespace Gdiplus; + +/* Visual C++ 7.1 + SP1 + GDI+ 1.0 File Version 5.1.3102.2180 +*/ + +void DrawLineMarks(Graphics* graphics, Pen* greenPen, int x, int y, int w, int h) +{ + graphics->DrawLine(greenPen, x+w-1, y-5, x+w-1, y+5); // end markers + graphics->DrawLine(greenPen, x-5, y+h-1, x+5, y+h-1); +} + +void SimpleImageTest(HWND hWnd) +{ + int x, y; + Graphics* graphics = new Graphics(hWnd); + graphics->Clear(Color(255, 255, 255)); // white background + + Bitmap image(16, 16, PixelFormat24bppRGB); + image.SetResolution(graphics->GetDpiX(), graphics->GetDpiX()); + + /* black pixel border */ + for (y = 0; y < 16; y++) + image.SetPixel(0, y, Color(0, 0, 0)); + for (y = 0; y < 16; y++) + image.SetPixel(15, y, Color(0, 0, 0)); + for (x = 1; x < 15; x++) + image.SetPixel(x, 0, Color(0, 0, 0)); + for (x = 1; x < 15; x++) + image.SetPixel(x, 15, Color(0, 0, 0)); + + /* light yellow contents */ + for (y = 1; y < 15; y++) + for (x = 1; x < 15; x++) + image.SetPixel(x, y, Color(192, 192, 0)); + + Pen redPen(Color(255, 0, 0), 1); + redPen.SetDashStyle(DashStyleDash); + Pen greenPen(Color(0, 255, 0), 1); + greenPen.SetDashStyle(DashStyleDash); + + // I add {} to avoid reusing some Rect in the next test + + graphics->SetPixelOffsetMode(PixelOffsetModeHalf); // pixel center is (.5,.5) instead of (0, 0) + + // NO zoom + { + RectF actualRect(10, 10, 16, 16); + graphics->DrawImage(&image, 10, 10); + graphics->DrawRectangle(&redPen, actualRect); + DrawLineMarks(graphics, &greenPen, 10, 10, 16, 16); + } + + // zoom using Bilinear Interpolation + { + RectF zoomRect(50, 10, 160, 160); + graphics->SetInterpolationMode(InterpolationModeBilinear); + graphics->DrawImage(&image, zoomRect); + graphics->DrawRectangle(&redPen, zoomRect); + DrawLineMarks(graphics, &greenPen, 50, 10, 160, 160); + } + + // zoom using Nearest Neighborhood + { + RectF zoomRect2(250, 10, 160, 160); + graphics->SetInterpolationMode(InterpolationModeNearestNeighbor); + graphics->DrawImage(&image, zoomRect2); + graphics->DrawRectangle(&redPen, zoomRect2); + DrawLineMarks(graphics, &greenPen, 250, 10, 160, 160); + } + + + // Using a source image size, smaller than actual + + + // NO zoom + { + RectF actualRect3(10, 200, 16, 16); + graphics->DrawImage(&image, actualRect3, 0, 0, 16-1, 16-1, UnitPixel, NULL, NULL); + graphics->DrawRectangle(&redPen, actualRect3); + DrawLineMarks(graphics, &greenPen, 10, 400, 16, 16); + } + + // zoom using Bilinear Interpolation + { + RectF zoomRect6(50, 200, 160, 160); + graphics->SetInterpolationMode(InterpolationModeBilinear); + graphics->DrawImage(&image, zoomRect6, 0, 0, 16-1, 16-1, UnitPixel, NULL, NULL); + graphics->DrawRectangle(&redPen, zoomRect6); + DrawLineMarks(graphics, &greenPen, 50, 400, 160, 160); + } + + // zoom using Nearest Neighborhood + { + RectF zoomRect7(250, 200, 160, 160); + graphics->SetInterpolationMode(InterpolationModeNearestNeighbor); + graphics->DrawImage(&image, zoomRect7, 0, 0, 16-1, 16-1, UnitPixel, NULL, NULL); + graphics->DrawRectangle(&redPen, zoomRect7); + DrawLineMarks(graphics, &greenPen, 250, 400, 160, 160); + } + + delete graphics; +} + +#include + +extern "C" char* winData; +extern "C" void SimpleDrawTest(void); + +void SimpleDrawTest(void) +{ + HWND hWnd = (HWND)IupGetAttribute((Ihandle*)winData, "HWND"); + SimpleImageTest(hWnd); +} diff --git a/cd/test/simple/iupmain.c b/cd/test/simple/iupmain.c new file mode 100755 index 0000000..4eb4a5d --- /dev/null +++ b/cd/test/simple/iupmain.c @@ -0,0 +1,83 @@ +#include +#include +#include + +#include "simple.h" + +int cmdExit(void) +{ + return IUP_CLOSE; +} + +void simple_loadled (void); + +int main(int argc, char** argv) +{ + IupOpen(&argc, &argv); + + cdInitContextPlus(); + + simple_loadled(); + + IupSetAttribute(IupGetHandle("SimpleDialog"), "PLACEMENT", "MAXIMIZED"); + IupShow(IupGetHandle("SimpleDialog")); + + SimpleCreateCanvas((char*)IupGetHandle("SimpleCanvas")); + + IupSetFunction("cmdExit", (Icallback) cmdExit); + + IupSetFunction("SimplePlayClipboard", (Icallback) SimplePlayClipboard); + IupSetFunction("SimplePlayCGMText", (Icallback) SimplePlayCGMText); + IupSetFunction("SimplePlayCGMBin", (Icallback) SimplePlayCGMBin); + IupSetFunction("SimplePlayMetafile", (Icallback) SimplePlayMetafile); + IupSetFunction("SimplePlayWMF", (Icallback) SimplePlayWMF); + IupSetFunction("SimplePlayEMF", (Icallback) SimplePlayEMF); + + IupSetFunction("SimpleDrawDebug", (Icallback) SimpleDrawDebug); + IupSetFunction("SimpleDrawWindow", (Icallback) SimpleDrawWindow); + IupSetFunction("SimpleDrawCGMText", (Icallback) SimpleDrawCGMText); + IupSetFunction("SimpleDrawCGMBin", (Icallback) SimpleDrawCGMBin); + IupSetFunction("SimpleDrawDXF", (Icallback) SimpleDrawDXF); + IupSetFunction("SimpleDrawDGN", (Icallback) SimpleDrawDGN); + IupSetFunction("SimpleDrawEMF", (Icallback) SimpleDrawEMF); + IupSetFunction("SimpleDrawMetafile", (Icallback) SimpleDrawMetafile); + IupSetFunction("SimpleDrawPDF", (Icallback) SimpleDrawPDF); + IupSetFunction("SimpleDrawPS", (Icallback) SimpleDrawPS); + IupSetFunction("SimpleDrawEPS", (Icallback) SimpleDrawEPS); + IupSetFunction("SimpleDrawWMF", (Icallback) SimpleDrawWMF); + IupSetFunction("SimpleDrawPrint", (Icallback) SimpleDrawPrint); + IupSetFunction("SimpleDrawPrintDialog", (Icallback) SimpleDrawPrintDialog); + IupSetFunction("SimpleDrawClipboardBitmap", (Icallback) SimpleDrawClipboardBitmap); + IupSetFunction("SimpleDrawClipboardMetafile", (Icallback) SimpleDrawClipboardMetafile); + IupSetFunction("SimpleDrawClipboardEMF", (Icallback) SimpleDrawClipboardEMF); + IupSetFunction("SimpleDrawImage", (Icallback) SimpleDrawImage); + IupSetFunction("SimpleDrawImageRGB", (Icallback) SimpleDrawImageRGB); + IupSetFunction("SimpleDrawSimulate", (Icallback) SimpleDrawSimulate); + + IupSetFunction("SimpleNotXor", (Icallback) SimpleNotXor); + IupSetFunction("SimpleXor", (Icallback) SimpleXor); + IupSetFunction("SimpleReplace", (Icallback) SimpleReplace); + IupSetFunction("SimpleClippingOff", (Icallback) SimpleClippingOff); + IupSetFunction("SimpleClippingArea", (Icallback) SimpleClippingArea); + IupSetFunction("SimpleClippingPolygon", (Icallback) SimpleClippingPolygon); + IupSetFunction("SimpleClippingRegion", (Icallback) SimpleClippingRegion); + IupSetFunction("SimpleContextPlus", (Icallback) SimpleContextPlus); + IupSetFunction("SimpleTransform", (Icallback) SimpleTransform); + + IupSetFunction("SimpleDrawAll", (Icallback) SimpleDrawAll); + IupSetFunction("SimpleDrawTextAlign", (Icallback) SimpleDrawTextAlign); + IupSetFunction("SimpleDrawTextFonts", (Icallback) SimpleDrawTextFonts); + IupSetFunction("SimpleDrawTest", (Icallback) SimpleDrawTest); + + IupSetFunction("SimpleRepaint", (Icallback) SimpleDrawRepaint); + + SimpleDrawWindow(); + + IupMainLoop(); + + SimpleKillCanvas(); + + IupClose(); + + return EXIT_SUCCESS; +} diff --git a/cd/test/simple/simple.bat b/cd/test/simple/simple.bat new file mode 100755 index 0000000..fa8f118 --- /dev/null +++ b/cd/test/simple/simple.bat @@ -0,0 +1,3 @@ +@echo off +REM Script generated automatically by tecmake v3.13 +..\bin\Win32\simple.exe %* diff --git a/cd/test/simple/simple.c b/cd/test/simple/simple.c new file mode 100755 index 0000000..bc0e59b --- /dev/null +++ b/cd/test/simple/simple.c @@ -0,0 +1,1313 @@ +/* + + Simple Draw Application + + Shows the same picture on several canvas. Used to quick test the CD library and + to demonstrate the use of CD library functions. + + This module uses only the CD library, there is another module to initialize the Window and its menus. + +*/ + + +#include "cd.h" +#include "cdcgm.h" +#include "cddgn.h" +#include "cddxf.h" +#include "cdclipbd.h" +#include "cdemf.h" +#include "cdimage.h" +#include "cdirgb.h" +#include "cdmf.h" +#include "cdprint.h" +#include "cdps.h" +#include "cdpdf.h" +#include "cdwmf.h" +#include "cdiup.h" +#include "cddbuf.h" +#include "cddebug.h" +#include "wd.h" +#include "cdgdiplus.h" + +#include "simple.h" + +#include +#include +#include +#include + +/* Global variables */ + +cdCanvas *winCanvas = NULL; /* The window drawing canvas */ +char* winData = NULL; +cdCanvas *dbCanvas = NULL; /* The double buffer canvas */ +cdCanvas *curCanvas = NULL; /* The current canvas */ + +int clipping = CD_CLIPOFF; /* Clipping flag, same as the CD */ +int write_mode = CD_REPLACE; /* Write Mode flag, same as the CD */ +int gdpiplus = 0; +int simple_draw = 0; +int use_transform = 0; +int simulate = 0; + +enum {DRAW_ALL, DRAW_TEXTFONTS, DRAW_TEXTALIGN, DRAW_TEST}; + +#define STYLE_SIZE 10 /* A small pattern and stipple size */ +long pattern[STYLE_SIZE*STYLE_SIZE]; /* Pattern buffer */ +unsigned char stipple[STYLE_SIZE*STYLE_SIZE]; /* Stipple buffer */ + +#define IMAGE_SIZE 100 +unsigned char red[IMAGE_SIZE*IMAGE_SIZE]; /* Red image buffer */ +unsigned char green[IMAGE_SIZE*IMAGE_SIZE]; /* Green image buffer */ +unsigned char blue[IMAGE_SIZE*IMAGE_SIZE]; /* Blue image buffer */ +unsigned char alpha[IMAGE_SIZE*IMAGE_SIZE]; /* Alpha image buffer */ + + +/* Prototype of the function that makes the drawing independent of canvas. */ +void SimpleDraw(void); + +void SimpleInitAlpha(int width, int height, unsigned char* _alpha) +{ + int c, l; + /* initialize the alpha image buffer with a degrade from transparent to opaque */ + for (l = 0; l < height; l++) + for (c = 0; c < width; c++) + _alpha[l*width + c] = (unsigned char)((c*255)/(width-1)); +} + +void SimpleCreateCanvasWindow(void) +{ + /* creates the canvas based in an existing window */ + if (gdpiplus) cdUseContextPlus(1); + winCanvas = cdCreateCanvas(CD_IUP, winData); + if (gdpiplus) cdUseContextPlus(0); + curCanvas = winCanvas; +} + +void SimpleCreateCanvas(char* data) +{ + int c, l; + + memset(pattern, 0xFF, STYLE_SIZE*STYLE_SIZE*4); + + pattern[11] = CD_RED; /*------------*/ + pattern[21] = CD_RED; /* 0123456789*/ + pattern[31] = CD_RED; /* */ + pattern[41] = CD_RED; /*9 WWWWWWWWWW*/ + pattern[51] = CD_RED; /*8 WWWWGGGGGW*/ + pattern[12] = CD_RED; /*7 WWWGGGGGBW*/ + pattern[22] = CD_RED; /*6 WWGGGGGBBW*/ + pattern[32] = CD_RED; /*5 WrrrrrBBBW*/ + pattern[42] = CD_RED; /*4 WrrrrrBBBW*/ + pattern[52] = CD_RED; /*3 WrrrrrBBWW*/ + pattern[13] = CD_RED; /*2 WrrrrrBWWW*/ + pattern[23] = CD_RED; /*1 WrrrrrWWWW*/ + pattern[33] = CD_RED; /*0 WWWWWWWWWW*/ + pattern[43] = CD_RED; /*------------*/ + pattern[53] = CD_RED; + pattern[14] = CD_RED; pattern[15] = CD_RED; + pattern[24] = CD_RED; pattern[25] = CD_RED; + pattern[34] = CD_RED; pattern[35] = CD_RED; + pattern[44] = CD_RED; pattern[45] = CD_RED; + pattern[54] = CD_RED; pattern[55] = CD_RED; + + pattern[26] = CD_BLUE; pattern[37] = CD_BLUE; + pattern[36] = CD_BLUE; pattern[47] = CD_BLUE; + pattern[46] = CD_BLUE; pattern[57] = CD_BLUE; + pattern[56] = CD_BLUE; pattern[67] = CD_BLUE; + + pattern[48] = CD_BLUE; pattern[62] = CD_GREEN; + pattern[58] = CD_BLUE; pattern[63] = CD_GREEN; + pattern[68] = CD_BLUE; pattern[64] = CD_GREEN; + pattern[78] = CD_BLUE; pattern[65] = CD_GREEN; + pattern[66] = CD_GREEN; + + pattern[73] = CD_GREEN; pattern[84] = CD_GREEN; + pattern[74] = CD_GREEN; pattern[85] = CD_GREEN; + pattern[75] = CD_GREEN; pattern[86] = CD_GREEN; + pattern[76] = CD_GREEN; pattern[87] = CD_GREEN; + pattern[77] = CD_GREEN; pattern[88] = CD_GREEN; + + /* initialize the stipple buffer with cross pattern */ + for (l = 0; l < STYLE_SIZE; l++) + for (c = 0; c < STYLE_SIZE; c++) + stipple[l*STYLE_SIZE + c] = (c % 4) == 0? 1: 0; + + SimpleInitAlpha(IMAGE_SIZE, IMAGE_SIZE, alpha); + + winData = data; + SimpleCreateCanvasWindow(); + SimpleDrawWindow(); +} + +int SimpleTransform(void) +{ + use_transform = !use_transform; + SimpleDrawRepaint(); + return 0; +} + +int SimpleContextPlus(void) +{ + gdpiplus = !gdpiplus; + SimpleKillCanvas(); + SimpleCreateCanvasWindow(); + SimpleDrawRepaint(); + return 0; +} + +void PlayCanvasDriver(cdContext* ctx, char* StrData) +{ + int w, h; + cdActivate(curCanvas); + cdBackground(CD_WHITE); + cdClear(); + cdGetCanvasSize(&w, &h, 0, 0); + cdPlay(ctx, 100, w-100, 100, h-100, StrData); +// cdPlay(ctx, 0, 0, 0, 0, StrData); +} + +int SimplePlayClipboard(void) +{ + PlayCanvasDriver(CD_CLIPBOARD, NULL); + return 0; +} + +int SimplePlayCGMBin(void) +{ + PlayCanvasDriver(CD_CGM, "simple_b.cgm"); + return 0; +} + +int SimplePlayCGMText(void) +{ + PlayCanvasDriver(CD_CGM, "simple_t.cgm"); + return 0; +} + +int SimplePlayMetafile(void) +{ + PlayCanvasDriver(CD_METAFILE, "simple.mf"); + return 0; +} + +int SimplePlayWMF(void) +{ + PlayCanvasDriver(CD_WMF, "simple.wmf"); + return 0; +} + +int SimplePlayEMF(void) +{ + PlayCanvasDriver(CD_EMF, "simple.emf"); + return 0; +} + +int SimpleDrawRepaint(void) +{ + cdActivate(curCanvas); + SimpleDraw(); + cdFlush(); + return 0; +} + +int SimpleDrawWindow(void) +{ + curCanvas = winCanvas; + return SimpleDrawRepaint(); +} + +void DrawCanvasDriver(cdContext* ctx, char* StrData) +{ + cdCanvas* tmpCanvas = cdCreateCanvas(ctx, StrData); + if (tmpCanvas == NULL) return; + cdActivate(tmpCanvas); + SimpleDraw(); + cdKillCanvas(tmpCanvas); + cdActivate(curCanvas); +} + +void DrawCanvasDriverSize(cdContext* ctx, char* name, int pixels) +{ + char StrData[100]; + int w, h; + double w_mm, h_mm; + cdActivate(curCanvas); + cdGetCanvasSize(&w, &h, &w_mm, &h_mm); + if (pixels) + sprintf(StrData, "%s %dx%d", name, w, h); + else + sprintf(StrData, "%s %gx%g", name, w_mm, h_mm); + DrawCanvasDriver(ctx, StrData); +} + +void DrawCanvasDriverSizeParam(cdContext* ctx, char* param) +{ + char StrData[100]; + int w, h; + cdActivate(curCanvas); + cdGetCanvasSize(&w, &h, 0, 0); + sprintf(StrData, "%dx%d %s", w, h, param); + DrawCanvasDriver(ctx, StrData); +} + +int SimpleDrawDebug(void) +{ + DrawCanvasDriverSize(CD_DEBUG, "simple_debug.txt", 0); + return 0; +} + +int SimpleDrawCGMText(void) +{ + DrawCanvasDriverSize(CD_CGM, "simple_t.cgm - t", 0); + return 0; +} + +int SimpleDrawCGMBin(void) +{ + DrawCanvasDriverSize(CD_CGM, "simple_b.cgm", 0); + return 0; +} + +int SimpleDrawDXF(void) +{ + DrawCanvasDriverSize(CD_DXF, "simple.dxf", 0); + return 0; +} + +int SimpleDrawDGN(void) +{ + DrawCanvasDriverSize(CD_DGN, "simple.dgn", 0); + return 0; +} + +int SimpleDrawEMF(void) +{ + if (gdpiplus) cdUseContextPlus(1); + DrawCanvasDriverSize(CD_EMF, "simple.emf", 1); + if (gdpiplus) cdUseContextPlus(0); + return 0; +} + +int SimpleDrawMetafile(void) +{ + DrawCanvasDriverSize(CD_METAFILE, "simple.mf", 0); + return 0; +} + +int SimpleDrawPS(void) +{ + DrawCanvasDriver(CD_PS, "simple.ps"); + return 0; +} + +int SimpleDrawPDF(void) +{ + DrawCanvasDriver(CD_PDF, "simple.pdf"); + return 0; +} + +int SimpleDrawEPS(void) +{ + DrawCanvasDriver(CD_PS, "simple.eps -e"); + return 0; +} + +int SimpleDrawWMF(void) +{ + DrawCanvasDriverSize(CD_WMF, "simple.wmf", 1); + return 0; +} + +int SimpleDrawPrint(void) +{ + if (gdpiplus) cdUseContextPlus(1); + DrawCanvasDriver(CD_PRINTER, "simple print"); + if (gdpiplus) cdUseContextPlus(0); + return 0; +} + +int SimpleDrawPrintDialog(void) +{ + if (gdpiplus) cdUseContextPlus(1); + DrawCanvasDriver(CD_PRINTER, "simple -d"); + if (gdpiplus) cdUseContextPlus(0); + return 0; +} + +int SimpleDrawClipboardBitmap(void) +{ + if (gdpiplus) cdUseContextPlus(1); + DrawCanvasDriverSizeParam(CD_CLIPBOARD, "-b"); + if (gdpiplus) cdUseContextPlus(0); + return 0; +} + +int SimpleDrawClipboardMetafile(void) +{ + if (gdpiplus) cdUseContextPlus(1); + DrawCanvasDriverSizeParam(CD_CLIPBOARD, "-m"); + if (gdpiplus) cdUseContextPlus(0); + return 0; +} + +int SimpleDrawClipboardEMF(void) +{ + if (gdpiplus) cdUseContextPlus(1); + DrawCanvasDriverSizeParam(CD_CLIPBOARD, ""); + if (gdpiplus) cdUseContextPlus(0); + return 0; +} + +int SimpleReplace(void) +{ + write_mode = CD_REPLACE; + cdActivate(curCanvas); + SimpleDrawAll(); + return 0; +} + +int SimpleXor(void) +{ + write_mode = CD_XOR; + cdActivate(curCanvas); + SimpleDrawAll(); + return 0; +} + +int SimpleNotXor(void) +{ + write_mode = CD_NOT_XOR; + cdActivate(curCanvas); + SimpleDrawAll(); + return 0; +} + +int SimpleClippingOff(void) +{ + clipping = CD_CLIPOFF; + cdActivate(curCanvas); + SimpleDrawAll(); + return 0; +} + +int SimpleClippingArea(void) +{ + clipping = CD_CLIPAREA; + cdActivate(curCanvas); + SimpleDrawAll(); + return 0; +} + +int SimpleClippingPolygon(void) +{ + clipping = CD_CLIPPOLYGON; + cdActivate(curCanvas); + SimpleDrawAll(); + return 0; +} + +int SimpleClippingRegion(void) +{ + clipping = CD_CLIPREGION; + cdActivate(curCanvas); + SimpleDrawAll(); + return 0; +} + +void* CreateImageRGBA(int w, int h) +{ + void* myImage; + unsigned char * _alpha = malloc(w * h); + SimpleInitAlpha(w, h, _alpha); + cdSetAttribute("IMAGEALPHA", (char*)_alpha); + cdSetAttribute("IMAGEFORMAT", "32"); // afetara´ o proximo cdCreateImage + myImage = cdCreateImage(w, h); + cdSetAttribute("IMAGEFORMAT", NULL); // remove o atributo para nao afetar outros cdCreateImage + return myImage; +} + +int SimpleDrawImage(void) +{ + if (dbCanvas) cdKillCanvas(dbCanvas); + + if (gdpiplus) cdUseContextPlus(1); + dbCanvas = cdCreateCanvas(CD_DBUFFER, winCanvas); + if (gdpiplus) cdUseContextPlus(0); + + curCanvas = dbCanvas; + SimpleDrawRepaint(); + + return 0; +} + +int SimpleDrawImageRGB(void) +{ + if (dbCanvas) cdKillCanvas(dbCanvas); + + if (gdpiplus) cdUseContextPlus(1); + dbCanvas = cdCreateCanvas(CD_DBUFFERRGB, winCanvas); + if (gdpiplus) cdUseContextPlus(0); + + curCanvas = dbCanvas; + SimpleDrawRepaint(); + + return 0; +} + +int SimpleDrawSimulate(void) +{ + cdActivate(curCanvas); + + simulate = !simulate; + + if (simulate) + cdSimulate(CD_SIM_ALL); + else + cdSimulate(CD_SIM_NONE); + + SimpleDrawRepaint(); + + return 0; +} + +void SimpleKillCanvas(void) +{ + if (dbCanvas) + { + cdKillCanvas(dbCanvas); + dbCanvas = NULL; + } + if (winCanvas) + { + cdKillCanvas(winCanvas); + winCanvas = NULL; + } +} + +void SimpleDraw(void) +{ + if (simple_draw == DRAW_TEXTFONTS) + SimpleDrawTextFonts(); + else if (simple_draw == DRAW_TEXTALIGN) + SimpleDrawTextAlign(); + else if (simple_draw == DRAW_TEST) + SimpleDrawTest(); + else + SimpleDrawAll(); +} + +int SimpleDrawAll(void) +{ + int w, h; + cdGetCanvasSize(&w, &h, 0, 0); + + simple_draw = DRAW_ALL; + + wdViewport(0,w-1,0,h-1); + if (w>h) + wdWindow(0,(double)w/(double)h,0,1); + else + wdWindow(0,1,0,(double)h/(double)w); + + /* Clear the background to be white */ + cdBackground(CD_WHITE); +// cdBackground(CD_GREEN); + cdClear(); + + cdLineWidth(3); + cdForeground(cdEncodeAlpha(CD_DARK_MAGENTA, 128)); + cdRect(100, 200, 100, 200); + + cdBegin(CD_OPEN_LINES); + cdVertex(300, 250); + cdVertex(320, 270); + cdVertex(350, 260); + cdVertex(340, 200); + cdVertex(310, 210); + cdEnd(); + + cdInteriorStyle(CD_SOLID); + + cdForeground(CD_RED); + cdLineWidth(3); + { + int dashes[] = {20, 15, 5, 5}; + cdLineStyleDashes(dashes, 4); + } + cdLineStyle(CD_CUSTOM); + cdLine(0, 0, w-1, h-1); + + cdForeground(CD_BLUE); + cdLineWidth(10); + cdLineStyle(CD_DOTTED); + //cdLine(0, 0, 500, 500); +// wdLine(0, 1, 1, 0); + cdLine(0, h-1, w-1, 0); + + switch(clipping) + { + case CD_CLIPOFF: + cdClip(CD_CLIPOFF); + break; + case CD_CLIPAREA: + /* Defines the clipping area equals the canvas area minus a 100 pixels margin. */ + cdClipArea(100, w - 100, 100, h - 100); + cdClip(CD_CLIPAREA); + break; + case CD_CLIPPOLYGON: + cdBegin(CD_CLIP); + cdVertex(100, 100); + cdVertex(w - 100, 100); + cdVertex(w / 2, h - 100); + cdEnd(); + cdClip(CD_CLIPPOLYGON); + break; + case CD_CLIPREGION: + cdTextAlignment(CD_CENTER); + cdFont(CD_TIMES_ROMAN, CD_BOLD, 50); + + cdBegin(CD_REGION); + cdRegionCombineMode(CD_UNION); + cdBox(100, 200, 100, 200); + cdSector(w/2-50, h/2+50, 150, 150, 0, 360); + cdSector(w/2-50, h/2-50, 150, 150, 0, 360); + cdSector(w/2+50, h/2+50, 150, 150, 0, 360); + cdSector(w/2+50, h/2-50, 150, 150, 0, 360); + cdRegionCombineMode(CD_DIFFERENCE); + cdText(w/2, h/2, "TEXT"); + cdEnd(); +// cdOffsetRegion(-50, 50); + cdClip(CD_CLIPREGION); + + cdForeground(CD_DARK_RED); + cdBox(0,w,0,h); + break; + } + + switch(write_mode) + { + case CD_REPLACE: + cdWriteMode(CD_REPLACE); + break; + case CD_XOR: + cdWriteMode(CD_XOR); + break; + case CD_NOT_XOR: + cdWriteMode(CD_NOT_XOR); + break; + } + + if (use_transform) + { + cdCanvasTransform(cdActiveCanvas(), NULL); + cdCanvasTransformTranslate(cdActiveCanvas(), w/2, h/2); + cdCanvasTransformRotate(cdActiveCanvas(), 30); + cdCanvasTransformScale(cdActiveCanvas(), 0.5, 0.5); + cdCanvasTransformTranslate(cdActiveCanvas(), -w/2, -h/2); + } + +// cdSetfAttribute("ROTATE", "15 %d %d", w/2, h/2); + + cdLineStyle(CD_CONTINUOUS); + cdLineWidth(1); + cdBackOpacity(CD_TRANSPARENT); + + cdForeground(CD_MAGENTA); + cdSector(w-100, 100, 100, 100, 50, 180); + cdForeground(CD_RED); + cdArc(100, 100, 100, 100, 50, 180); + + cdForeground(CD_YELLOW); + cdBox(w/2 - 100, w/2 + 100, h/2 - 100, h/2 + 100); + + cdTextAlignment(CD_CENTER); + cdTextOrientation(70); + cdFont(CD_TIMES_ROMAN, CD_BOLD, 24); + + { + int rect[8]; + cdTextBounds(w/2, h/2, "cdMin Draw (çãí)", rect); + cdForeground(CD_RED); + cdBegin(CD_CLOSED_LINES); + cdVertex(rect[0], rect[1]); + cdVertex(rect[2], rect[3]); + cdVertex(rect[4], rect[5]); + cdVertex(rect[6], rect[7]); + cdEnd(); + } + cdForeground(CD_BLUE); + cdText(w/2, h/2, "cdMin Draw (çãí)"); + cdTextOrientation(0); + + wdBox(0.20, 0.30, 0.40, 0.50); + cdForeground(CD_RED); + wdLine(0.20, 0.40, 0.30, 0.50); + +// wdVectorTextDirection(0, 0, 1, 1); + wdVectorCharSize(0.07); + +// wdVectorText(0.1, 0.4, "ñç áéíóú àèìòù âêîôû äëïöü"); +// wdVectorText(0.1, 0.2, "ÑÇ ÁÉÍÓÚ ÀÈÌÒÙ ÂÊÎÔÛ ÄËÏÖÜ"); + //{ + // int i; + // char t[2]; + // char s[10]; + // int x = 20; + // int y = 0; + // t[1] = 0; + // for (i = 0; i < 256; i++) + // { + // int dx = 90; + // t[0] = (char)i; + // sprintf(s, "%d", i); + // cdText(x, y, s); + // cdText(x+dx, y, t); + // cdVectorText(x+2*dx, y, t); + // + // x += 3*dx + 2*dx/3; + // if ((i+1) % 7 == 0) + // { + // x = 20; + // y += 90; + // } + + // } + //} + + { + double rect[8]; + cdForeground(CD_RED); + if (gdpiplus) + wdGetVectorTextBounds("WDj-Plus", 0.25, 0.35, rect); + else + wdGetVectorTextBounds("WDj", 0.25, 0.35, rect); + cdBegin(CD_CLOSED_LINES); + wdVertex(rect[0], rect[1]); + wdVertex(rect[2], rect[3]); + wdVertex(rect[4], rect[5]); + wdVertex(rect[6], rect[7]); + cdEnd(); + } + + cdPixel(10, h/2+0, CD_RED); + cdPixel(11, h/2+1, CD_GREEN); + cdPixel(12, h/2+2, CD_BLUE); + + /* draws all the mark type possibilities */ + cdForeground(CD_RED); + cdMarkSize(30); + cdMarkType(CD_PLUS); + cdMark(200, 200); + cdMarkType(CD_CIRCLE); + cdMark(w - 200, 200); + cdMarkType(CD_HOLLOW_CIRCLE); + cdMark(200, h - 200); + cdMarkType(CD_DIAMOND); + cdMark(w - 200, h - 200); + + /* draws all the line style possibilities */ + cdLineWidth(1); + cdLineStyle(CD_CONTINUOUS); + cdLine(0, 10, w, 10); + cdLineStyle(CD_DASHED); + cdLine(0, 20, w, 20); + cdLineStyle(CD_DASH_DOT); + cdLine(0, 30, w, 30); + cdLineStyle(CD_DASH_DOT_DOT); + cdLine(0, 40, w, 40); + + /* draws all the hatch style possibilities */ + cdHatch(CD_VERTICAL); + cdBox(0, 50, h - 60, h); + cdHatch(CD_FDIAGONAL); + cdBox(50, 100, h - 60, h); + cdHatch(CD_BDIAGONAL); + cdBox(100, 150, h - 60, h); + cdHatch(CD_CROSS); + cdBox(150, 200, h - 60, h); + cdHatch(CD_HORIZONTAL); + cdBox(200, 250, h - 60, h); + cdHatch(CD_DIAGCROSS); + cdBox(250, 300, h - 60, h); + + /* closed polygon */ + cdBegin(CD_CLOSED_LINES); + cdVertex(w/2, h - 100); + cdVertex(w/2 + 50, h - 150); + cdVertex(w/2, h - 200); + cdVertex(w/2 - 50, h - 150); + cdEnd(); + + /* hatch filled polygon */ + cdHatch(CD_DIAGCROSS); + cdBegin(CD_FILL); + cdVertex(100, h/2); + cdVertex(150, h/2 + 50); + cdVertex(200, h/2); + cdVertex(150, h/2 - 50); + cdEnd(); + + /* pattern filled polygon */ + cdPattern(STYLE_SIZE, STYLE_SIZE, pattern); + cdBegin(CD_FILL); + cdVertex(w - 100, h/2); + cdVertex(w - 150, h/2 + 50); + cdVertex(w - 200, h/2); + cdVertex(w - 150, h/2 - 50); + cdEnd(); + + /* stipple filled polygon */ + cdStipple(STYLE_SIZE, STYLE_SIZE, stipple); + cdBegin(CD_FILL); + cdVertex(w/2, 100); + cdVertex(w/2 + 50, 150); + cdVertex(w/2, 200); + cdVertex(w/2 - 50, 150); + cdEnd(); + + cdBegin(CD_BEZIER); + cdVertex(100, 100); + cdVertex(150, 200); + cdVertex(180, 250); + cdVertex(180, 200); + cdVertex(180, 150); + cdVertex(150, 100); + cdVertex(300, 100); + cdEnd(); + + cdLineWidth(2); + cdLineStyle(CD_CONTINUOUS); + if (gdpiplus) + wdVectorText(0.25, 0.35, "WDj-Plus"); + else + wdVectorText(0.25, 0.35, "WDj"); + + /* always clear the image buffer contents */ +//#define IMAGE_SIZE 16 + memset(red, 0xFF, IMAGE_SIZE*IMAGE_SIZE/2); + memset(green, 0x5F, IMAGE_SIZE*IMAGE_SIZE/2); + memset(blue, 0x5F, IMAGE_SIZE*IMAGE_SIZE/2); + memset(red+IMAGE_SIZE*IMAGE_SIZE/2, 0x5F, IMAGE_SIZE*IMAGE_SIZE/2); + memset(green+IMAGE_SIZE*IMAGE_SIZE/2, 0x8F, IMAGE_SIZE*IMAGE_SIZE/2); + memset(blue+IMAGE_SIZE*IMAGE_SIZE/2, 0x5F, IMAGE_SIZE*IMAGE_SIZE/2); + memset(red+IMAGE_SIZE*(IMAGE_SIZE-1), 0, IMAGE_SIZE); + memset(green+IMAGE_SIZE*(IMAGE_SIZE-1), 0, IMAGE_SIZE); + memset(blue+IMAGE_SIZE*(IMAGE_SIZE-1), 0, IMAGE_SIZE); + memset(red, 0, IMAGE_SIZE); + memset(green, 0, IMAGE_SIZE); + memset(blue, 0, IMAGE_SIZE); + { + int i, offset; + for (i = 0; i < IMAGE_SIZE; i++) + { + offset = i*IMAGE_SIZE; + red[offset] = 0; + green[offset] = 0; + blue[offset] = 0; + red[offset+IMAGE_SIZE-1] = 0; + green[offset+IMAGE_SIZE-1] = 0; + blue[offset+IMAGE_SIZE-1] = 0; + } + } + + //cdSetAttribute("ANTIALIAS", "0"); +// cdGetImageRGB(red, green, blue, w/2 - 50, h/2-50, 100, 100); +// cdPutImageRectRGB(14, 13, red, green, blue, -20, -15, 649, 603, 0, 13, 0, 12); +// cdPutImageRectRGB(16, 16, red, green, blue, 10, 10, 608, 608, 5, 10, 5, 10); +// cdPutImageRectRGB(16, 16, red, green, blue, 10, 10, 64, 64, 5, 10, 5, 10); + +// cdPutImageRGB(IMAGE_SIZE, IMAGE_SIZE, red, green, blue, 100, h - 200, IMAGE_SIZE, IMAGE_SIZE); +// cdPutImageRGBA(IMAGE_SIZE, IMAGE_SIZE, red, green, blue, alpha, 100, h - 200, IMAGE_SIZE, IMAGE_SIZE); + cdPutImageRGB(IMAGE_SIZE, IMAGE_SIZE, red, green, blue, w - 400, h - 310, 3*IMAGE_SIZE, 3*IMAGE_SIZE); +// cdPutImageRGBA(IMAGE_SIZE, IMAGE_SIZE, red, green, blue, alpha, w - 400, h - 310, 3*IMAGE_SIZE, 3*IMAGE_SIZE); + + cdSetAttribute("ROTATE", NULL); + if (use_transform) + cdCanvasTransform(cdActiveCanvas(), NULL); + cdClip(CD_CLIPOFF); + cdFlush(); + + return 0; +} + +void DrawVectorTextBox(int x, int y, char* text) +{ + int rect[8], draw_box; + + cdLineWidth(1); + cdLineStyle(CD_CONTINUOUS); + + draw_box = 0; + if (draw_box) + { + int xmin, xmax, ymin, ymax; + cdCanvasGetVectorTextBox(cdActiveCanvas(), x, y, text, &xmin, &xmax, &ymin, &ymax); + cdForeground(CD_GREEN); + cdRect(xmin, xmax, ymin, ymax); + + if (cdTextOrientation(CD_QUERY) == 0) + { + cdForeground(CD_RED); + cdLine(xmin, y, xmax, y); + } + } + else + { + /* bounding box */ + cdGetVectorTextBounds(text, x, y, rect); + cdForeground(CD_GREEN); + cdBegin(CD_CLOSED_LINES); + cdVertex(rect[0], rect[1]); + cdVertex(rect[2], rect[3]); + cdVertex(rect[4], rect[5]); + cdVertex(rect[6], rect[7]); + cdEnd(); + } + + /* reference point */ + cdForeground(CD_BLUE); + cdMarkType(CD_PLUS); + cdMarkSize(30); + cdMark(x, y); + + cdForeground(CD_BLACK); + cdVectorText(x, y, text); +} + +void DrawTextBox(int x, int y, char* text) +{ + int rect[8], draw_box; + + cdLineWidth(1); + cdLineStyle(CD_CONTINUOUS); + + draw_box = 0; + if (draw_box) + { + int xmin, xmax, ymin, ymax; + cdTextBox(x, y, text, &xmin, &xmax, &ymin, &ymax); + cdRect(xmin, xmax, ymin, ymax); + + if (cdTextOrientation(CD_QUERY) == 0) + { + cdForeground(CD_RED); + cdLine(xmin, y, xmax, y); + } + } + else + { + /* bounding box */ + cdTextBounds(x, y, text, rect); + cdForeground(CD_GREEN); + cdBegin(CD_CLOSED_LINES); + cdVertex(rect[0], rect[1]); + cdVertex(rect[2], rect[3]); + cdVertex(rect[4], rect[5]); + cdVertex(rect[6], rect[7]); + cdEnd(); + } + + /* reference point */ + cdForeground(CD_BLUE); + cdMarkType(CD_PLUS); + cdMarkSize(30); + cdMark(x, y); + + cdForeground(CD_BLACK); + cdText(x, y, text); +} + +int SimpleDrawTextAlign(void) +{ + int w, h, i, xoff, yoff, use_vector; + + int text_aligment[] = { + CD_NORTH, + CD_SOUTH, + CD_EAST, + CD_WEST, + CD_NORTH_EAST, + CD_NORTH_WEST, + CD_SOUTH_EAST, + CD_SOUTH_WEST, + CD_CENTER, + CD_BASE_CENTER, + CD_BASE_RIGHT, + CD_BASE_LEFT + }; + +#if 1 + char* text_aligment_str[] = { + "North (Ãyj)\nSecond Line (Ãyj)", + "South (Ãyj)\nSecond Line (Ãyj)", + "East (Ãyj)\nSecond Line (Ãyj)", + "West (Ãyj)\nSecond Line (Ãyj)", + "North East (Ãyj)\nSecond Line (Ãyj)", + "North West (Ãyj)\nSecond Line (Ãyj)", + "South East (Ãyj)\nSecond Line (Ãyj)", + "South West (Ãyj)\nSecond Line (Ãyj)", + "Center (Ãyj)\nSecond Line (Ãyj)", + "Base Center (Ãyj)\nSecond Line (Ãyj)", + "Base Right (Ãyj)\nSecond Line (Ãyj)", + "Base Left (Ãyj)\nSecond Line (Ãyj)" + }; +#else + char* text_aligment_str[] = { + "North (Ãyj)", + "South (Ãyj)", + "East (Ãyj)", + "West (Ãyj)", + "North East (Ãyj)", + "North West (Ãyj)", + "South East (Ãyj)", + "South West (Ãyj)", + "Center (Ãyj)", + "Base Center (Ãyj)", + "Base Right (Ãyj)", + "Base Left (Ãyj)" + }; +#endif + + cdGetCanvasSize(&w, &h, 0, 0); + + cdBackground(CD_WHITE); + cdClear(); + + simple_draw = DRAW_TEXTALIGN; + + use_vector = 0; + +#if 0 + if (use_vector) + cdVectorTextDirection(0, 0, 1, 1); + else + cdTextOrientation(45); +#endif + + xoff = w/4; + yoff = h/7; + + if (use_vector) + cdVectorCharSize(30); + else + { + //cdFont(CD_TIMES_ROMAN, CD_PLAIN, 14); + cdFont(CD_HELVETICA, CD_PLAIN, 24); + } + + for (i = 0; i < 12; i++) + { + cdTextAlignment(text_aligment[i]); + if (i < 6) + { + if (use_vector) + DrawVectorTextBox(xoff, yoff*(i+1), text_aligment_str[i]); + else + DrawTextBox(xoff, yoff*(i+1), text_aligment_str[i]); + } + else + { + if (use_vector) + DrawVectorTextBox(3*xoff, yoff*(i-5), text_aligment_str[i]); + else + DrawTextBox(3*xoff, yoff*(i-5), text_aligment_str[i]); + } + } + + cdFlush(); + return 0; +} + +void DrawTextFont(int font, int size, int xoff, int yoff, char* text) +{ + cdFont(font, CD_PLAIN, size); + DrawTextBox(xoff, yoff, text); + + cdFont(font, CD_BOLD, size); + DrawTextBox(2*xoff, yoff, text); + + cdFont(font, CD_ITALIC, size); + DrawTextBox(3*xoff, yoff, text); + + cdFont(font, CD_BOLD_ITALIC, size); + DrawTextBox(4*xoff, yoff, text); +} + +int SimpleDrawTextFonts(void) +{ + int xoff, yoff, size; + + cdBackground(CD_WHITE); + cdClear(); + + simple_draw = DRAW_TEXTFONTS; + + xoff = 470; + yoff = 150; + size = -30; + + cdTextAlignment(CD_CENTER); + + DrawTextFont(CD_COURIER, size, xoff, yoff, "Courier"); + DrawTextFont(CD_TIMES_ROMAN, size, xoff, 2*yoff, "Times Roman"); + DrawTextFont(CD_HELVETICA, size, xoff, 3*yoff, "Helvetica"); + DrawTextFont(CD_SYSTEM, size, xoff, 4*yoff, "System"); + + { +// static char native[50] = "Tecmedia, -60"; +// static char native[50] = "-*-helvetica-medium-r-*-*-8-*"; +// static char native[50] = "Edwardian Script ITC, 24"; +// cdSetAttribute("ADDFONTMAP","Edwardian Script ITC=ITCEDSCR"); + +// char native[50] = "Book Antiqua, 24"; +// cdSetAttribute("ADDFONTMAP", "Book Antiqua=BKANT"); + +// cdNativeFont("-d"); +// cdNativeFont(native); +// DrawTextBox(xoff, yoff, native); +// DrawTextBox(xoff, yoff, "The quick brown fox."); + } + + //cdNativeFont("Tecmedia, 36"); + + //cdSetAttribute("ADDFONTMAP", "WingDings=WingDing"); + //cdNativeFont("WingDings, 36"); + + //cdText(500, 50, "X"); + //cdText(500, 50, "abcdefghijklmnopqrstuvwxyz"); + //cdText(500, 150, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + //cdText(500, 250, "1234567890"); + //cdText(500, 350, "'\"!@#$%¨&*()_+-=[]^/;.,"); + + //cdFont(CD_COURIER, 0, 22); + //cdText(10, 60, "abcdefghijklmnopqrstuvwxyz"); + //cdText(10, 160, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + //cdText(10, 260, "1234567890"); + //cdText(500, 360, "'\"!@#$%¨&*()_+-=[]^/;.,"); + + cdFlush(); + return 0; +} + +//void SimpleDrawTest(void) +void SimpleDrawMainTest(void) +{ + long pattern[16]; /* 4x4 pattern */ + int w, h; + int xmin, xmax, ymin, ymax; + + simple_draw = DRAW_TEST; + +/* notice that if we are not using world coordinates + it is harder to position all the objetcs we want. */ + cdGetCanvasSize(&w, &h, 0, 0); + + cdBackground(CD_WHITE); + cdClear(); + +/* pattern initialization */ + pattern[0] = CD_RED; pattern[1] = CD_RED; /* first line */ + pattern[2] = CD_YELLOW; pattern[3] = CD_YELLOW; + pattern[4] = CD_RED; pattern[5] = CD_RED; /* second line */ + pattern[6] = CD_YELLOW; pattern[7] = CD_YELLOW; + pattern[8] = CD_YELLOW; pattern[9] = CD_YELLOW; /* third line */ + pattern[10] = CD_YELLOW; pattern[11] = CD_YELLOW; + pattern[12] = CD_YELLOW; pattern[13] = CD_YELLOW; /* fourth line */ + pattern[14] = CD_YELLOW; pattern[15] = CD_YELLOW; + +/* set the line attributes */ + cdLineWidth(4); + cdLineStyle(CD_CONTINUOUS); + +/* in the center draw a pattern pizza + with a slice mising */ + cdPattern(4, 4, pattern); + cdSector(w/2, h/2, w/2, h/2, 45, 0); +/* draws a dark red border */ + cdForeground(CD_DARK_RED); + cdInteriorStyle(CD_HOLLOW); + cdSector(w/2, h/2, w/2, h/2, 45, 0); + +/* on the left a red hash diamond */ +/* notice the the default back opacity is transparent + and the pattern of the sector will still be visible + inside the hatch where the two objects intersect */ + cdForeground(CD_RED); + cdHatch(CD_DIAGCROSS); + cdBegin(CD_FILL); + cdVertex(w/4, h/4); + cdVertex(w/2-w/8, h/2); + cdVertex(w/4, 3*h/4); + cdVertex(w/8, h/2); + cdEnd(); + +/* draws a blue roof.*/ + cdForeground(CD_BLUE); + cdLine(w/8, h/2, w/4, 3*h/4); + cdLine(w/4, 3*h/4, w/2-w/8, h/2); + +/* draws a dashed ribbon on the right + with a custom color */ + cdForeground(cdEncodeColor(100, 25, 200)); + cdLineStyle(CD_DASH_DOT); + cdBegin(CD_BEZIER); + cdVertex(3*w/4-20, h/2-50); + cdVertex(3*w/4+150, 3*h/4-50); + cdVertex(3*w/4-150, 3*h/4-50); + cdVertex(3*w/4+20, h/2-50); + cdEnd(); + + cdFont(CD_HELVETICA, CD_BOLD, 40); + cdTextAlignment(CD_CENTER); + cdText(w/2, h/4-50, "Canvas Draw"); + cdTextBox(w/2, h/4-50, "Canvas Draw", &xmin, &xmax, &ymin, &ymax); + cdRect(xmin, xmax, ymin, ymax); + cdFlush(); +} + +void draw_wd(void) +{ + char* text; + double x, y; + double rect[8]; + + cdBackground(CD_WHITE); + cdClear(); + cdLineStyle(CD_CONTINUOUS); + cdLineWidth(1); + +// wdVectorTextDirection(0, 0, 1, 1); + cdTextAlignment(CD_NORTH_WEST); + +// text = "Vector Text"; + text = "Vector Text\nSecond Line\nThird Line"; + x = 0.25; + y = 0.40; + + cdForeground(CD_BLACK); + wdLine(0, 0, 1, 1); + wdLine(0, 1, 1, 0); + + cdForeground(CD_GREEN); + cdMarkType(CD_STAR); + wdMark(x, y); + + cdForeground(CD_BLUE); + wdVectorCharSize(0.1); + wdVectorText(x, y, text); + + cdForeground(CD_RED); + wdGetVectorTextBounds(text, x, y, rect); + cdBegin(CD_CLOSED_LINES); + wdVertex(rect[0], rect[1]); + wdVertex(rect[2], rect[3]); + wdVertex(rect[4], rect[5]); + wdVertex(rect[6], rect[7]); + cdEnd(); + + cdFlush(); +} + +void SimpleDrawTest(void) +//void SimpleDrawTestHardCopy(void) +{ + int w, h; + cdGetCanvasSize(&w, &h, 0, 0); + + simple_draw = DRAW_ALL; + + wdViewport(0,w-1,0,h-1); + if (w>h) + wdWindow(0,(double)w/(double)h,0,1); + else + wdWindow(0,1,0,(double)h/(double)w); + + draw_wd(); + + //wdHardcopy(CD_CLIPBOARD, "800x600", cdActiveCanvas(), draw_wd ); + //cdFlush(); +} + +//void SimpleDrawTest(void) +void SimpleDrawTestImageRGB(void) +{ + int size = 2048*2048; + unsigned char *red, *green, *blue; + cdCanvas* canvas = cdCreateCanvas(CD_IMAGERGB, "2048x2048"); + cdActivate(canvas); + + red = calloc(size, 1); + green = calloc(size, 1); + blue = calloc(size, 1); + + cdPutImageRectRGB(2048, 2048, red, green, blue, 0, 3, 2048, 2017, 0, 2047, 3, 2020); + + free(red); + free(green); + free(blue); + + cdKillCanvas(canvas); + cdFlush(); +} + +//void SimpleDrawTest(void) +void SimpleDrawVectorFont(void) +{ + simple_draw = DRAW_TEST; + cdBackground(CD_WHITE); + cdClear(); + cdLineStyle(CD_CONTINUOUS); + cdLineWidth(1); + +// wdVectorText(0.1, 0.4, "ãõñç áéíóú àèìòù âêîôû äëïöü"); +// wdVectorText(0.1, 0.2, "ÃÕÑÇ ÁÉÍÓÚ ÀÈÌÒÙ ÂÊÎÔÛ ÄËÏÖÜ "); + cdVectorFont("../etc/vectorfont26.txt"); /* original Simplex II */ + { + int i; + char t[2]; + char s[10]; + int x = 10; + int y = 600; + t[1] = 0; + cdFont(CD_COURIER, CD_BOLD, 14); + cdVectorCharSize(25); + for (i = 128; i < 256; i++) + { + int dx = 30; + t[0] = (char)i; + sprintf(s, "%3d", i); + cdForeground(CD_DARK_RED); + cdText(x, y, s); +// cdText(x+dx, y, t); + cdForeground(CD_BLACK); + cdVectorText(x+2*dx-10, y, t); + + x += 3*dx; + if ((i+1) % 8 == 0) + { + x = 10; + y -= 30; + } + } + //cdFont(CD_TIMES_ROMAN, CD_PLAIN, 24); + //cdVectorCharSize(24); + // for (i = 192; i < 256; i++) + // { + // int dx = 92; + // t[0] = (char)i; + // sprintf(s, "%d", i); + // cdText(x, y, s); + // cdText(x+dx, y, t); + // cdVectorText(x+2*dx, y, t); + // + // x += 3*dx + 2*dx/3; + // if ((i+1) % 4 == 0) + // { + // x = 30; + // y += 52; + // } + // } + } + cdFlush(); +} diff --git a/cd/test/simple/simple.h b/cd/test/simple/simple.h new file mode 100755 index 0000000..123b31c --- /dev/null +++ b/cd/test/simple/simple.h @@ -0,0 +1,54 @@ + +#ifndef __Simple_H +#define __Simple_H + +#include + +void SimpleCreateCanvas(char* data); +void SimpleKillCanvas(void); + +int SimplePlayClipboard(void); +int SimplePlayCGMBin(void); +int SimplePlayCGMText(void); +int SimplePlayMetafile(void); +int SimplePlayWMF(void); +int SimplePlayEMF(void); + +int SimpleDrawDebug(void); +int SimpleDrawWindow(void); +int SimpleDrawCGMText(void); +int SimpleDrawCGMBin(void); +int SimpleDrawDXF(void); +int SimpleDrawDGN(void); +int SimpleDrawEMF(void); +int SimpleDrawMetafile(void); +int SimpleDrawPDF(void); +int SimpleDrawPS(void); +int SimpleDrawEPS(void); +int SimpleDrawWMF(void); +int SimpleDrawPrint(void); +int SimpleDrawPrintDialog(void); +int SimpleDrawClipboardBitmap(void); +int SimpleDrawClipboardMetafile(void); +int SimpleDrawClipboardEMF(void); +int SimpleDrawImage(void); +int SimpleDrawImageRGB(void); +int SimpleDrawSimulate(void); + +int SimpleNotXor(void); +int SimpleXor(void); +int SimpleReplace(void); +int SimpleClippingOff(void); +int SimpleClippingArea(void); +int SimpleClippingPolygon(void); +int SimpleClippingRegion(void); + +int SimpleTransform(void); +int SimpleContextPlus(void); +int SimpleDrawAll(void); +int SimpleDrawTextAlign(void); +int SimpleDrawTextFonts(void); +void SimpleDrawTest(void); +int SimpleDrawRepaint(void); + +#endif diff --git a/cd/test/simple/simple.led b/cd/test/simple/simple.led new file mode 100755 index 0000000..cdf4430 --- /dev/null +++ b/cd/test/simple/simple.led @@ -0,0 +1,93 @@ +mnOpen = MENU +( + ITEM("CGM - Binary", SimplePlayCGMBin), + ITEM("CGM - Text", SimplePlayCGMText), + ITEM("METAFILE", SimplePlayMetafile), + ITEM("WMF", SimplePlayWMF), + ITEM("EMF", SimplePlayEMF) +) + +mnSaveAs = MENU +( + ITEM("DEBUG", SimpleDrawDebug), + ITEM("CGM - Binary", SimpleDrawCGMBin), + ITEM("CGM - Text", SimpleDrawCGMText), + ITEM("DGN", SimpleDrawDGN), + ITEM("DXF", SimpleDrawDXF), + ITEM("EMF", SimpleDrawEMF), + ITEM("METAFILE", SimpleDrawMetafile), + ITEM("PDF", SimpleDrawPDF), + ITEM("PS", SimpleDrawPS), + ITEM("EPS", SimpleDrawEPS), + ITEM("WMF", SimpleDrawWMF) +) + +mnFile = MENU +( + SUBMENU("Open", mnOpen), + SUBMENU("Save As", mnSaveAs), + SEPARATOR(), + ITEM("Print", SimpleDrawPrint), + ITEM("Print Dialog...", SimpleDrawPrintDialog), + SEPARATOR(), + ITEM("Exit", cmdExit) +) + +mnEdit = MENU +( + ITEM("Copy as Metafile", SimpleDrawClipboardMetafile), + ITEM("Copy as EMF", SimpleDrawClipboardEMF), + ITEM("Copy as Bitmap", SimpleDrawClipboardBitmap), + ITEM("Paste", SimplePlayClipboard) +) + +mnClipping = MENU +( + ITEM("Off", SimpleClippingOff), + ITEM("Area", SimpleClippingArea), + ITEM("Polygon", SimpleClippingPolygon), + ITEM("Region", SimpleClippingRegion) +) + +mnWriteMode = MENU +( + ITEM("Replace", SimpleReplace), + ITEM("Xor", SimpleXor), + ITEM("Not Xor", SimpleNotXor) +) + +mnOptions = MENU +( + SUBMENU("Clipping", mnClipping), + SUBMENU("Write Mode", mnWriteMode), + ITEM("Simulate", SimpleDrawSimulate), + ITEM("Transform", SimpleTransform), + ITEM("Context Plus", SimpleContextPlus) +) + +mnSurface = MENU +( + ITEM("Window", SimpleDrawWindow), + ITEM("Server Image", SimpleDrawImage), + ITEM("Image RGB", SimpleDrawImageRGB) +) + +mnPrimitives = MENU +( + ITEM("All", SimpleDrawAll), + ITEM("Text Align", SimpleDrawTextAlign), + ITEM("Text Fonts", SimpleDrawTextFonts), + ITEM("Test", SimpleDrawTest) +) + +mnSimpleMenu = MENU +( + SUBMENU("File", mnFile), + SUBMENU("Edit", mnEdit), + SUBMENU("Options", mnOptions), + SUBMENU("Surface", mnSurface), + SUBMENU("Primitives", mnPrimitives) +) + +SimpleCanvas = CANVAS[BORDER=0](SimpleRepaint) +SimpleDialog = DIALOG [TITLE="Simple Draw", MENU=mnSimpleMenu](SimpleCanvas) diff --git a/cd/test/simple/simple_led.c b/cd/test/simple/simple_led.c new file mode 100755 index 0000000..07eebc8 --- /dev/null +++ b/cd/test/simple/simple_led.c @@ -0,0 +1,125 @@ +/* Arquivo gerado automaticamente por ledc 2.5 */ + +#include +#include +#include + +static Ihandle* named[ 13 ]; + +static Ihandle* decl( char* name, Ihandle* elem, char* first, ...) +{ + char *attr, *val; + va_list arg; + va_start (arg, first); + attr = first; + while (attr) + { + val = va_arg(arg,char*); + IupSetAttribute( elem, attr, val ); + attr = va_arg(arg,char*); + } + va_end (arg); + if(name) IupSetHandle( name, elem ); + return elem; +} + + +void simple_loadled (void) +{ + named[0] = decl( "mnOpen", IupMenu( + IupItem( "CGM - Binary", "SimplePlayCGMBin" ), + IupItem( "CGM - Text", "SimplePlayCGMText" ), + IupItem( "METAFILE", "SimplePlayMetafile" ), + IupItem( "WMF", "SimplePlayWMF" ), + IupItem( "EMF", "SimplePlayEMF" ), + NULL), NULL ); + named[1] = decl( "mnSaveAs", IupMenu( + IupItem( "DEBUG", "SimpleDrawDebug" ), + IupItem( "CGM - Binary", "SimpleDrawCGMBin" ), + IupItem( "CGM - Text", "SimpleDrawCGMText" ), + IupItem( "DGN", "SimpleDrawDGN" ), + IupItem( "DXF", "SimpleDrawDXF" ), + IupItem( "EMF", "SimpleDrawEMF" ), + IupItem( "METAFILE", "SimpleDrawMetafile" ), + IupItem( "PDF", "SimpleDrawPDF" ), + IupItem( "PS", "SimpleDrawPS" ), + IupItem( "EPS", "SimpleDrawEPS" ), + IupItem( "WMF", "SimpleDrawWMF" ), + NULL), NULL ); + named[2] = decl( "mnFile", IupMenu( + IupSubmenu( "Open", + named[0] /* mnOpen */ + ), + IupSubmenu( "Save As", + named[1] /* mnSaveAs */ + ), + IupSeparator(), + IupItem( "Print", "SimpleDrawPrint" ), + IupItem( "Print Dialog...", "SimpleDrawPrintDialog" ), + IupSeparator(), + IupItem( "Exit", "cmdExit" ), + NULL), NULL ); + named[3] = decl( "mnEdit", IupMenu( + IupItem( "Copy as Metafile", "SimpleDrawClipboardMetafile" ), + IupItem( "Copy as EMF", "SimpleDrawClipboardEMF" ), + IupItem( "Copy as Bitmap", "SimpleDrawClipboardBitmap" ), + IupItem( "Paste", "SimplePlayClipboard" ), + NULL), NULL ); + named[4] = decl( "mnClipping", IupMenu( + IupItem( "Off", "SimpleClippingOff" ), + IupItem( "Area", "SimpleClippingArea" ), + IupItem( "Polygon", "SimpleClippingPolygon" ), + IupItem( "Region", "SimpleClippingRegion" ), + NULL), NULL ); + named[5] = decl( "mnWriteMode", IupMenu( + IupItem( "Replace", "SimpleReplace" ), + IupItem( "Xor", "SimpleXor" ), + IupItem( "Not Xor", "SimpleNotXor" ), + NULL), NULL ); + named[6] = decl( "mnOptions", IupMenu( + IupSubmenu( "Clipping", + named[4] /* mnClipping */ + ), + IupSubmenu( "Write Mode", + named[5] /* mnWriteMode */ + ), + IupItem( "Simulate", "SimpleDrawSimulate" ), + IupItem( "Transform", "SimpleTransform" ), + IupItem( "Context Plus", "SimpleContextPlus" ), + NULL), NULL ); + named[7] = decl( "mnSurface", IupMenu( + IupItem( "Window", "SimpleDrawWindow" ), + IupItem( "Server Image", "SimpleDrawImage" ), + IupItem( "Image RGB", "SimpleDrawImageRGB" ), + NULL), NULL ); + named[8] = decl( "mnPrimitives", IupMenu( + IupItem( "All", "SimpleDrawAll" ), + IupItem( "Text Align", "SimpleDrawTextAlign" ), + IupItem( "Text Fonts", "SimpleDrawTextFonts" ), + IupItem( "Test", "SimpleDrawTest" ), + NULL), NULL ); + named[9] = decl( "mnSimpleMenu", IupMenu( + IupSubmenu( "File", + named[2] /* mnFile */ + ), + IupSubmenu( "Edit", + named[3] /* mnEdit */ + ), + IupSubmenu( "Options", + named[6] /* mnOptions */ + ), + IupSubmenu( "Surface", + named[7] /* mnSurface */ + ), + IupSubmenu( "Primitives", + named[8] /* mnPrimitives */ + ), + NULL), NULL ); + named[10] = decl( "SimpleCanvas", IupCanvas( "SimpleRepaint" ), + "BORDER", "0", NULL ); + named[11] = decl( "SimpleDialog", IupDialog( + named[10] /* SimpleCanvas */ + ), + "TITLE", "Simple Draw", + "MENU", "mnSimpleMenu", NULL ); +} diff --git a/im/dox/im.dox b/im/dox/im.dox new file mode 100755 index 0000000..5188237 --- /dev/null +++ b/im/dox/im.dox @@ -0,0 +1,1528 @@ +# Doxyfile 1.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = IM + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 3.5 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = ../html + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = NO + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = NO + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = YES + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set +# FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = NO + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = NO + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = NO + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= NO + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = NO + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../include + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = *.h \ + iup.c + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = NO + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = en/doxygen/ + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = YES + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = ../include/ + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = LUA_TNONE + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 1000 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/im/include/im.h b/im/include/im.h new file mode 100755 index 0000000..a324199 --- /dev/null +++ b/im/include/im.h @@ -0,0 +1,287 @@ +/** \file + * \brief Main API + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_H +#define __IM_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** Image data type descriptors. \n + * See also \ref datatypeutl. + * \ingroup imagerep */ +enum imDataType +{ + IM_BYTE, /**< "unsigned char". 1 byte from 0 to 255. */ + IM_USHORT, /**< "unsigned short". 2 bytes from 0 to 65,535. */ + IM_INT, /**< "int". 4 bytes from -2,147,483,648 to 2,147,483,647. */ + IM_FLOAT, /**< "float". 4 bytes single precision IEEE floating point. */ + IM_CFLOAT /**< complex "float". 2 float values in sequence, real and imaginary parts. */ +}; + +/** Image color mode color space descriptors (first byte). \n + * See also \ref colormodeutl. + * \ingroup imagerep */ +enum imColorSpace +{ + IM_RGB, /**< Red, Green and Blue (nonlinear). */ + IM_MAP, /**< Indexed by RGB color map (data_type=IM_BYTE). */ + IM_GRAY, /**< Shades of gray, luma (nonlinear Luminance), or an intensity value that is not related to color. */ + IM_BINARY, /**< Indexed by 2 colors: black (0) and white (1) (data_type=IM_BYTE). */ + IM_CMYK, /**< Cian, Magenta, Yellow and Black (nonlinear). */ + IM_YCBCR, /**< ITU-R 601 Y'CbCr. Y' is luma (nonlinear Luminance). */ + IM_LAB, /**< CIE L*a*b*. L* is Lightness (nonlinear Luminance, nearly perceptually uniform). */ + IM_LUV, /**< CIE L*u*v*. L* is Lightness (nonlinear Luminance, nearly perceptually uniform). */ + IM_XYZ /**< CIE XYZ. Linear Light Tristimulus, Y is linear Luminance. */ +}; + +/** Image color mode configuration/extra descriptors (1 bit each in the second byte). \n + * See also \ref colormodeutl. + * \ingroup imagerep */ +enum imColorModeConfig +{ + IM_ALPHA = 0x100, /**< adds an Alpha channel */ + IM_PACKED = 0x200, /**< packed components (rgbrgbrgb...) */ + IM_TOPDOWN = 0x400 /**< orientation from top down to bottom */ +}; + + + +/** File Access Error Codes + * \ingroup file */ +enum imErrorCodes +{ + IM_ERR_NONE, /**< No error. */ + IM_ERR_OPEN, /**< Error while opening the file (read or write). */ + IM_ERR_ACCESS, /**< Error while accessing the file (read or write). */ + IM_ERR_FORMAT, /**< Invalid or unrecognized file format. */ + IM_ERR_DATA, /**< Invalid or unsupported data. */ + IM_ERR_COMPRESS, /**< Invalid or unsupported compression. */ + IM_ERR_MEM, /**< Insuficient memory */ + IM_ERR_COUNTER /**< Interrupted by the counter */ +}; + +/* Internal Image File Structure. */ +typedef struct _imFile imFile; + +/** Opens the file for reading. It must exists. Also reads file header. + * It will try to identify the file format. + * See also \ref imErrorCodes. \n + * In Lua the IM file metatable name is "imFile". + * When converted to a string will return "imFile(%p)" where %p is replaced by the userdata address. + * If the file is already closed by im.FileClose, then it will return also the suffix "-closed". + * + * \verbatim im.FileOpen(file_name: string) -> ifile: imFile, error: number [in Lua 5] \endverbatim + * \ingroup file */ +imFile* imFileOpen(const char* file_name, int *error); + +/** Opens the file for reading using a specific format. It must exists. Also reads file header. + * See also \ref imErrorCodes and \ref format. + * + * \verbatim im.FileOpenAs(file_name, format: string) -> ifile: imFile, error: number [in Lua 5] \endverbatim + * \ingroup file */ +imFile* imFileOpenAs(const char* file_name, const char* format, int *error); + +/** Creates a new file for writing using a specific format. If the file exists will be replaced. \n + * It will only initialize the format driver and create the file, no data is actually written. + * See also \ref imErrorCodes and \ref format. + * + * \verbatim im.FileNew(file_name: string, format: string) -> ifile: imFile, error: number [in Lua 5] \endverbatim + * \ingroup file */ +imFile* imFileNew(const char* file_name, const char* format, int *error); + +/** Closes the file. \n + * In Lua if this function is not called, the file is closed by the garbage collector. + * + * \verbatim im.FileClose(ifile: imFile) [in Lua 5] \endverbatim + * \verbatim ifile:Close() [in Lua 5] \endverbatim + * \ingroup file */ +void imFileClose(imFile* ifile); + +/** Returns an internal handle. + * index=0 returns always an imBinFile* handle, + * but for some formats returns NULL because they do not use imBinFile (like AVI and WMV). + * index=1 return an internal structure used by the format, usually is a handle + * to a third party library structure. This is file format dependent. + * + * \verbatim ifile:Handle() -> handle: userdata [in Lua 5] \endverbatim + * \ingroup file */ +void* imFileHandle(imFile* ifile, int index); + +/** Returns file information. + * image_count is the number of images in a stack or + * the number of frames in a video/animation or the depth of a volume data. \n + * compression and image_count can be NULL. \n + * These informations are also available as attributes: + * \verbatim FileFormat (string) \endverbatim + * \verbatim FileCompression (string) \endverbatim + * \verbatim FileImageCount IM_INT (1) \endverbatim + * See also \ref format. + * + * \verbatim ifile:GetInfo() -> format: string, compression: string, image_count: number [in Lua 5] \endverbatim + * \ingroup file */ +void imFileGetInfo(imFile* ifile, char* format, char* compression, int *image_count); + +/** Changes the write compression method. \n + * If the compression is not supported will return an error code when writting. \n + * Use NULL to set the default compression. You can use the imFileGetInfo to retrieve the actual compression + * but only after \ref imFileWriteImageInfo. Only a few formats allow you to change the compression between frames. + * + * \verbatim ifile:SetInfo(compression: string) [in Lua 5] \endverbatim + * \ingroup file */ +void imFileSetInfo(imFile* ifile, const char* compression); + +/** Changes an extended attribute. \n + * The data will be internally duplicated. \n + * If data is NULL the attribute is removed. + * If data_type is BYTE then count can be -1 to indicate a NULL terminated string. + * See also \ref imDataType. + * + * \verbatim ifile:SetAttribute(attrib: string, data_type: number, data: table of numbers or string) [in Lua 5] \endverbatim + * If data_type is IM_BYTE, as_string can be used as data. + * \ingroup file */ +void imFileSetAttribute(imFile* ifile, const char* attrib, int data_type, int count, const void* data); + +/** Returns an extended attribute. \n + * Returns NULL if not found. data_type and count can be NULL. + * See also \ref imDataType. + * + * \verbatim ifile:GetAttribute(attrib: string, [as_string: boolean]) -> data: table of numbers or string, data_type: number [in Lua 5] \endverbatim + * If data_type is IM_BYTE, as_string can be used to return a string instead of a table. + * \ingroup file */ +const void* imFileGetAttribute(imFile* ifile, const char* attrib, int *data_type, int *count); + +/** Returns a list of the attribute names. \n + * "attrib" must contain room enough for "attrib_count" names. Use "attrib=NULL" to return only the count. + * + * \verbatim ifile:GetAttributeList() -> data: table of strings [in Lua 5] \endverbatim + * \ingroup file */ +void imFileGetAttributeList(imFile* ifile, char** attrib, int *attrib_count); + +/** Returns the pallete if any. \n + * "palette" must be a 256 colors alocated array. \n + * Returns zero in "palette_count" if there is no palette. "palette_count" is >0 and <=256. + * + * \verbatim ifile:GetPalette() -> palette: imPalette [in Lua 5] \endverbatim + * \ingroup file */ +void imFileGetPalette(imFile* ifile, long* palette, int *palette_count); + +/** Changes the pallete. \n + * "palette_count" is >0 and <=256. + * + * \verbatim ifile:SetPalette(palette: imPalette) [in Lua 5] \endverbatim + * \ingroup file */ +void imFileSetPalette(imFile* ifile, long* palette, int palette_count); + +/** Reads the image header if any and returns image information. \n + * Reads also the extended image attributes, so other image attributes will be available only after calling this function. \n + * Returns an error code. + * index specifies the image number between 0 and image_count-1. \n + * Some drivers reads only in sequence, so "index" can be ignored by the format driver. \n + * Any parameters can be NULL. This function must be called at least once, check each format documentation. + * See also \ref imErrorCodes, \ref imDataType, \ref imColorSpace and \ref imColorModeConfig. + * + * \verbatim ifile:ReadImageInfo([index: number]) -> error: number, width: number, height: number, file_color_mode: number, file_data_type: number [in Lua 5] \endverbatim + * Default index is 0. + * \ingroup file */ +int imFileReadImageInfo(imFile* ifile, int index, int *width, int *height, int *file_color_mode, int *file_data_type); + +/** Writes the image header. Writes the file header at the first time it is called. + * Writes also the extended image attributes. \n + * Must call imFileSetPalette and set other attributes before calling this function. \n + * In some formats the color space will be converted to match file format specification. \n + * Returns an error code. This function must be called at least once, check each format documentation. + * See also \ref imErrorCodes, \ref imDataType, \ref imColorSpace and \ref imColorModeConfig. + * + * \verbatim ifile:WriteImageInfo(width: number, height: number, user_color_mode: number, user_data_type: number) -> error: number [in Lua 5] \endverbatim + * \ingroup file */ +int imFileWriteImageInfo(imFile* ifile, int width, int height, int user_color_mode, int user_data_type); + +/** Reads the image data with or without conversion. \n + * The data can be converted to bitmap when reading. + * Data type conversion to byte will always scan for min-max then scale to 0-255, + * except integer values that min-max are already between 0-255. Complex to real conversions will use the magnitude. \n + * Color mode flags contains packed, alpha and top-botttom information. + * If flag is 0 means unpacked, no alpha and bottom up. If flag is -1 the file original flags are used. \n + * Returns an error code. + * See also \ref imErrorCodes, \ref imDataType, \ref imColorSpace and \ref imColorModeConfig. + * + * \verbatim ifile:ReadImageData(data: userdata, convert2bitmap: boolean, color_mode_flags: number) -> error: number [in Lua 5] \endverbatim + * \ingroup file */ +int imFileReadImageData(imFile* ifile, void* data, int convert2bitmap, int color_mode_flags); + +/** Writes the image data. \n + * Returns an error code. + * + * \verbatim ifile:WriteImageData(data: userdata) -> error: number [in Lua 5] \endverbatim + * \ingroup file */ +int imFileWriteImageData(imFile* ifile, void* data); + + + + +/** Registers all the internal formats. \n + * It is automatically called internally when a format is accessed, + * but can be called to force the internal formats to be registered before other formats. + * Notice that additional formats when registered will be registered before the internal formats + * if imFormatRegisterInternal is not called yet. \n + * To control the register order is usefull when two format drivers handle the same format. + * The first registered format will always be used first. + * \ingroup format */ +void imFormatRegisterInternal(void); + +/** Remove all registered formats. + * \ingroup format */ +void imFormatRemoveAll(void); + +/** Returns a list of the registered formats. \n + * format_list is an array of format identifiers. + * Each format identifier is 10 chars max, maximum of 50 formats. + * You can use "char* format_list[50]". + * + * \verbatim im.FormatList() -> format_list: table of strings [in Lua 5] \endverbatim + * \ingroup format */ +void imFormatList(char** format_list, int *format_count); + +/** Returns the format description. \n + * Format description is 50 chars max. \n + * Extensions are separated like "*.tif;*.tiff;", 50 chars max. \n + * Returns an error code. The parameters can be NULL, except format. + * See also \ref format. + * + * \verbatim im.FormatInfo(format: string) -> error: number, desc: string, ext: string, can_sequence: boolean [in Lua 5] \endverbatim + * \ingroup format */ +int imFormatInfo(const char* format, char* desc, char* ext, int *can_sequence); + +/** Returns the format compressions. \n + * Compressions are 20 chars max each, maximum of 50 compressions. You can use "char* comp[50]". \n + * color_mode and data_type are optional, use -1 to ignore them. \n + * If you use them they will select only the allowed compressions checked like in \ref imFormatCanWriteImage. \n + * Returns an error code. + * See also \ref format, \ref imErrorCodes, \ref imDataType, \ref imColorSpace and \ref imColorModeConfig. + * + * \verbatim im.FormatCompressions(format: string, [color_mode: number], [data_type: number]) -> error: number, comp: table of strings [in Lua 5] \endverbatim + * \ingroup format */ +int imFormatCompressions(const char* format, char** comp, int *comp_count, int color_mode, int data_type); + +/** Checks if the format suport the given image class at the given compression. \n + * Returns an error code. + * See also \ref format, \ref imErrorCodes, \ref imDataType, \ref imColorSpace and \ref imColorModeConfig. + * + * \verbatim im.FormatCanWriteImage(format: string, compression: string, color_mode: number, data_type: number) -> can_write: boolean [in Lua 5] \endverbatim + * \ingroup format */ +int imFormatCanWriteImage(const char* format, const char* compression, int color_mode, int data_type); + + +#if defined(__cplusplus) +} +#endif + +#include "old_im.h" + +#endif diff --git a/im/include/im_attrib.h b/im/include/im_attrib.h new file mode 100755 index 0000000..76302ef --- /dev/null +++ b/im/include/im_attrib.h @@ -0,0 +1,120 @@ +/** \file + * \brief Attributes Table. + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_ATTRIB_H_ +#define __IM_ATTRIB_H_ + +#include "im_attrib_flat.h" + +/** \brief Attributes Table. + * + * \par + * All the attributes have a name, a type, a count and the data.\n + * Names are usually strings with less that 30 chars. + * \par + * Attributes are stored in a hash table for fast access. \n + * We use the hash function described in "The Pratice of Programming" of Kernighan & Pike. + * \ingroup util */ +class imAttribTable +{ + imAttribTablePrivate* ptable; +public: + + /** Creates an empty table. + * If size is zero the default size of 101 is used. Size must be a prime number. + * Other common values are 67, 599 and 1499.*/ + imAttribTable(int hash_size) + { ptable = imAttribTableCreate(hash_size); } + + /** Destroys the table and all the attributes. */ + ~imAttribTable() + { imAttribTableDestroy(ptable); ptable = 0; } + + /** Returns the number of elements in the table. */ + int Count() const + { return imAttribTableCount(ptable); } + + /** Removes all the attributes in the table */ + void RemoveAll() + { imAttribTableRemoveAll(ptable); } + + /** Copies the contents of the given table into this table. */ + void CopyFrom(const imAttribTable& table) + { imAttribTableCopyFrom(ptable, table.ptable); } + + /** Inserts an attribute into the table. \n + * If data_type is BYTE then count can be -1 to indicate a NULL terminated string. + * Data is duplicated if not NULL, else data is initialized with zeros. + * See also \ref imDataType. */ + void Set(const char* name, int data_type, int count, const void* data) + { imAttribTableSet(ptable, name, data_type, count, data); } + + /** Removes an attribute from the table given its name. */ + void UnSet(const char *name) + { imAttribTableUnSet(ptable, name); } + + /** Finds an attribute in the table. + * Returns the attribute if found, NULL otherwise. + * See also \ref imDataType. */ + const void* Get(const char *name, int *data_type = 0, int *count = 0) const + { return imAttribTableGet(ptable, name, data_type, count); } + + /** For each attribute calls the user callback. If the callback returns 0 the function returns. */ + void ForEach(void* user_data, imAttribTableCallback attrib_func) const + { imAttribTableForEach(ptable, user_data, attrib_func); } +}; + +/** \brief Attributes Table. + * + * \par + * Same as \ref imAttribTable, but uses an array of fixed size. + * \ingroup util */ +class imAttribArray +{ + imAttribTablePrivate* ptable; +public: + + /** Creates an empty array. */ + imAttribArray(int count) + { ptable = imAttribArrayCreate(count); } + + /** Destroys the array and all the attributes. */ + ~imAttribArray() + { imAttribTableDestroy(ptable); ptable = 0; } + + /** Returns the number of elements in the array. */ + int Count() const + { return imAttribTableCount(ptable); } + + /** Removes all the attributes in the array */ + void RemoveAll() + { imAttribTableRemoveAll(ptable); } + + /** Copies the contents of the given table into this table. */ + void CopyFrom(const imAttribArray& table) + { imAttribArrayCopyFrom(ptable, table.ptable); } + + /** Inserts one attribute into the array. + * The attribute data is a simple array of data_type elements of count length. \n + * Data is duplicated if not NULL, else data is initialized with zeros. + * When NULL is specified use the Get method to retrieve a pointer to the data + * so you can initialize it with other values. + * See also \ref imDataType. */ + void Set(int index, const char* name, int data_type, int count, const void* data) + { imAttribArraySet(ptable, index, name, data_type, count, data); } + + /** Finds one attribute in the array. + * Returns the attribute if found, NULL otherwise. + * See also \ref imDataType. */ + const void* Get(int index, char *name = 0, int *data_type = 0, int *count = 0) const + { return imAttribArrayGet(ptable, index, name, data_type, count); } + + /** For each attribute calls the user callback. If the callback returns 0 the function returns. */ + void ForEach(void* user_data, imAttribTableCallback attrib_func) const + { imAttribTableForEach(ptable, user_data, attrib_func); } +}; + +#endif diff --git a/im/include/im_attrib_flat.h b/im/include/im_attrib_flat.h new file mode 100755 index 0000000..db6c2d8 --- /dev/null +++ b/im/include/im_attrib_flat.h @@ -0,0 +1,39 @@ +/** \file + * \brief Attributes Table Flat API. + * This will simplify the DLL export, and can be used for C aplications. + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_ATTRIB_FLAT_H_ +#define __IM_ATTRIB_FLAT_H_ + +#if defined(__cplusplus) +extern "C" { +#endif + +struct imAttribTablePrivate; + +/** Definition of the callback used in ForEach function. */ +typedef int (*imAttribTableCallback)(void* user_data, int index, const char* name, int data_type, int count, const void* data); + +imAttribTablePrivate* imAttribTableCreate(int hash_size); +void imAttribTableDestroy(imAttribTablePrivate* ptable); +int imAttribTableCount(imAttribTablePrivate* ptable); +void imAttribTableRemoveAll(imAttribTablePrivate* ptable); +const void* imAttribTableGet(const imAttribTablePrivate* ptable, const char *name, int *data_type, int *count); +void imAttribTableSet(imAttribTablePrivate* ptable, const char* name, int data_type, int count, const void* data); +void imAttribTableUnSet(imAttribTablePrivate* ptable, const char *name); +void imAttribTableCopyFrom(imAttribTablePrivate* ptable_dst, const imAttribTablePrivate* ptable_src); +void imAttribTableForEach(const imAttribTablePrivate* ptable, void* user_data, imAttribTableCallback attrib_func); + +imAttribTablePrivate* imAttribArrayCreate(int hash_size); +const void* imAttribArrayGet(const imAttribTablePrivate* ptable, int index, char *name, int *data_type, int *count); +void imAttribArraySet(imAttribTablePrivate* ptable, int index, const char* name, int data_type, int count, const void* data); +void imAttribArrayCopyFrom(imAttribTablePrivate* ptable_dst, const imAttribTablePrivate* ptable_src); + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_binfile.h b/im/include/im_binfile.h new file mode 100755 index 0000000..08af47a --- /dev/null +++ b/im/include/im_binfile.h @@ -0,0 +1,224 @@ +/** \file + * \brief Binary File Access. + * + * See Copyright Notice in im_lib.h + */ + +#include "im_util.h" + +#ifndef __IM_BINFILE_H +#define __IM_BINFILE_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup binfile Binary File Access + * + * \par + * These functions are very usefull for reading/writing binary files + * that have headers or data that have to be converted depending on + * the current CPU byte order. It can invert 2, 4 or 8 bytes numbers to/from little/big-endian orders. + * \par + * It will process the data only if the file format is diferent from the current CPU. + * \par + * Can read from disk or memory. In case of a memory buffer, the file name must be the \ref imBinMemoryFileName structure. + * \par + * See \ref im_binfile.h + * \ingroup util */ + +typedef struct _imBinFile imBinFile; + +/** Opens an existant binary file for reading. + * The default file byte order is the CPU byte order. + * Returns NULL if failed. + * \ingroup binfile */ +imBinFile* imBinFileOpen(const char* pFileName); + +/** Creates a new binary file for writing. + * The default file byte order is the CPU byte order. + * Returns NULL if failed. + * \ingroup binfile */ +imBinFile* imBinFileNew(const char* pFileName); + +/** Closes the file. + * \ingroup binfile */ +void imBinFileClose(imBinFile* bfile); + +/** Indicates that was an error on the last operation. + * \ingroup binfile */ +int imBinFileError(imBinFile* bfile); + +/** Returns the file size in bytes. + * \ingroup binfile */ +unsigned long imBinFileSize(imBinFile* bfile); + +/** Changes the file byte order. Returns the old one. + * \ingroup binfile */ +int imBinFileByteOrder(imBinFile* bfile, int pByteOrder); + +/** Reads an array of count values with byte sizes: 1, 2, 4, or 8. And invert the byte order if necessary after read. + * \ingroup binfile */ +unsigned long imBinFileRead(imBinFile* bfile, void* pValues, unsigned long pCount, int pSizeOf); + +/** Writes an array of values with sizes: 1, 2, 4, or 8. And invert the byte order if necessary before write.\n + * ATENTION: The function will not make a temporary copy of the values to invert the byte order.\n + * So after the call the values will be invalid, if the file byte order is diferent from the CPU byte order. + * \ingroup binfile */ +unsigned long imBinFileWrite(imBinFile* bfile, void* pValues, unsigned long pCount, int pSizeOf); + +/** Writes a string without the NULL terminator. The function uses sprintf to compose the string. \n + * The internal buffer is fixed at 4096 bytes. + * \ingroup binfile */ +unsigned long imBinFilePrintf(imBinFile* bfile, char *format, ...); + +/** Reads an integer number from the current position until found a non integer character. + * Returns a non zero value if sucessfull. + * \ingroup binfile */ +int imBinFileReadInteger(imBinFile* handle, int *value); + +/** Reads an floating point number from the current position until found a non number character. + * Returns a non zero value if sucessfull. + * \ingroup binfile */ +int imBinFileReadFloat(imBinFile* handle, float *value); + +/** Moves the file pointer from the begining of the file.\n + * When writing to a file seeking can go beyond the end of the file. + * \ingroup binfile */ +void imBinFileSeekTo(imBinFile* bfile, unsigned long pOffset); + +/** Moves the file pointer from current position.\n + * If the offset is a negative value the pointer moves backwards. + * \ingroup binfile */ +void imBinFileSeekOffset(imBinFile* bfile, long pOffset); + +/** Moves the file pointer from the end of the file.\n + * The offset is usually a negative value. + * \ingroup binfile */ +void imBinFileSeekFrom(imBinFile* bfile, long pOffset); + +/** Returns the current offset position. + * \ingroup binfile */ +unsigned long imBinFileTell(imBinFile* bfile); + +/** Indicates that the file pointer is at the end of the file. + * \ingroup binfile */ +int imBinFileEndOfFile(imBinFile* bfile); + +/** Predefined I/O Modules. + * \ingroup binfile */ +enum imBinFileModule +{ + IM_RAWFILE, /**< System dependent file I/O Rotines. */ + IM_STREAM, /**< Standard Ansi C Stream I/O Rotines. */ + IM_MEMFILE, /**< Uses a memory buffer (see \ref imBinMemoryFileName). */ + IM_SUBFILE, /**< It is a sub file. FileName is a imBinFile* pointer from any other module. */ + IM_FILEHANDLE,/**< System dependent file I/O Rotines, but FileName is a system file handle ("int" in UNIX and "HANDLE" in Windows). */ + IM_IOCUSTOM0 /**< Other registered modules starts from here. */ +}; + +/** Sets the current I/O module. + * \returns the previous function set, or -1 if failed. + * See also \ref imBinFileModule. + * \ingroup binfile */ +int imBinFileSetCurrentModule(int pModule); + +/** \brief Memory File I/O Filename + * + * \par + * Fake file name for the memory I/O module. + * \ingroup binfile */ +typedef struct _imBinMemoryFileName +{ + unsigned char *buffer; /**< The memory buffer. If you are reading the buffer must exists. + * If you are writing the buffer can be internally allocated to the given size. The buffer is never free. + * The buffer is allocated using "malloc", and reallocated using "realloc". Use "free" to release it. + * To avoid RTL conflicts use the function imBinMemoryRelease. */ + int size; /**< Size of the buffer. */ + float reallocate; /**< Reallocate factor for the memory buffer when writing (size += reallocate*size). + * Set reallocate to 0 to disable reallocation, in this case buffer must not be NULL. */ +}imBinMemoryFileName; + +/** Release the internal memory allocated when writing a Memory File (see \ref imBinMemoryFileName). + * \ingroup binfile */ +void imBinMemoryRelease(unsigned char *buffer); + + +#if defined(__cplusplus) +} +#endif + + +#if defined(__cplusplus) + +/** Base class to help the creation of new modules.\n + * It handles the read/write operations with byte order correction if necessary. + * \ingroup binfile */ +class imBinFileBase +{ + friend class imBinSubFile; + +protected: + int IsNew, + FileByteOrder, + DoByteOrder; // to speed up byte order checking + + // These will actually read/write the data + virtual unsigned long ReadBuf(void* pValues, unsigned long pSize) = 0; + virtual unsigned long WriteBuf(void* pValues, unsigned long pSize) = 0; + +public: + + int InitByteOrder(int ByteOrder) + { + int old_byte_order = this->FileByteOrder; + this->FileByteOrder = ByteOrder; + + if (ByteOrder != imBinCPUByteOrder()) + this->DoByteOrder = 1; + else + this->DoByteOrder = 0; + return old_byte_order; + } + + // These will take care of byte swap if needed. + + unsigned long Read(void* pValues, unsigned long pCount, int pSizeOf) + { + unsigned long rSize = ReadBuf(pValues, pCount * pSizeOf); + if (pSizeOf != 1 && DoByteOrder) imBinSwapBytes(pValues, pCount, pSizeOf); + return rSize/pSizeOf; + } + + unsigned long Write(void* pValues, unsigned long pCount, int pSizeOf) + { + if (pSizeOf != 1 && DoByteOrder) imBinSwapBytes(pValues, pCount, pSizeOf); + return WriteBuf(pValues, pCount * pSizeOf)/pSizeOf; + } + + virtual void Open(const char* pFileName) = 0; + virtual void New(const char* pFileName) = 0; + virtual void Close() = 0; + virtual unsigned long FileSize() = 0; + virtual int HasError() const = 0; + virtual void SeekTo(unsigned long pOffset) = 0; + virtual void SeekOffset(long pOffset) = 0; + virtual void SeekFrom(long pOffset) = 0; + virtual unsigned long Tell() const = 0; + virtual int EndOfFile() const = 0; +}; + +/** File I/O module creation callback. + * \ingroup binfile */ +typedef imBinFileBase* (*imBinFileNewFunc)(); + +/** Register a user I/O module.\n + * Returns the new function set id.\n + * Accepts up to 10 modules. + * \ingroup binfile */ +int imBinFileRegisterModule(imBinFileNewFunc pNewFunc); + +#endif + +#endif diff --git a/im/include/im_capture.h b/im/include/im_capture.h new file mode 100755 index 0000000..bc5f732 --- /dev/null +++ b/im/include/im_capture.h @@ -0,0 +1,365 @@ +/** \file + * \brief Video Capture + * + * See Copyright Notice in im.h + */ + +#ifndef __IM_CAPTURE_H +#define __IM_CAPTURE_H + +#if defined(__cplusplus) +extern "C" { +#endif + +/* declarations to create an export library for Watcom. */ +#if ! defined (IM_DECL) + #if defined (__WATCOMC__) + #define IM_DECL __cdecl + #elif defined(__WATCOM_CPLUSPLUS__) + #define IM_DECL __cdecl + #else + #define IM_DECL + #endif +#endif + +/** \defgroup capture Image Capture + * \par + * Functions to capture images from live video devices. + * \par + * See \ref im_capture.h + */ + +typedef struct _imVideoCapture imVideoCapture; + +/** Returns the number of available devices. + * + * \verbatim im.VideoCaptureDeviceCount() -> count: number [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureDeviceCount(void); + +/** Returns the device description. Returns NULL only if it is an invalid device. + * + * \verbatim im.VideoCaptureDeviceDesc(device: number) -> desc: string [in Lua 5] \endverbatim + * \ingroup capture */ +const char* IM_DECL imVideoCaptureDeviceDesc(int device); + +/** Returns the extendend device description. May return NULL. + * + * \verbatim im.VideoCaptureDeviceExDesc(device: number) -> desc: string [in Lua 5] \endverbatim + * \ingroup capture */ +const char* IM_DECL imVideoCaptureDeviceExDesc(int device); + +/** Returns the device path configuration. This is a unique string. + * + * \verbatim im.VideoCaptureDevicePath(device: number) -> desc: string [in Lua 5] \endverbatim + * \ingroup capture */ +const char* IM_DECL imVideoCaptureDevicePath(int device); + +/** Returns the vendor information. May return NULL. + * + * \verbatim im.VideoCaptureDeviceVendorInfo(device: number) -> desc: string [in Lua 5] \endverbatim + * \ingroup capture */ +const char* IM_DECL imVideoCaptureDeviceVendorInfo(int device); + +/** Reload the device list. The devices can be dynamically removed or added to the system. + * Returns the number of available devices. + * + * \verbatim im.imVideoCaptureReloadDevices() -> count: number [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureReloadDevices(void); + +/** Creates a new imVideoCapture object. \n + * Returns NULL if there is no capture device available. \n + * In Windows returns NULL if DirectX version is older than 8. \n + * In Lua the IM videocapture metatable name is "imVideoCapture". + * When converted to a string will return "imVideoCapture(%p)" where %p is replaced by the userdata address. + * If the videocapture is already destroyed by im.VideoCaptureDestroy, then it will return also the suffix "-destroyed". + * + * \verbatim im.VideoCaptureCreate() -> vc: imVideoCapture [in Lua 5] \endverbatim + * \ingroup capture */ +imVideoCapture* IM_DECL imVideoCaptureCreate(void); + +/** Destroys a imVideoCapture object. \n + * In Lua if this function is not called, the videocapture is destroyed by the garbage collector. + * + * \verbatim im.VideoCaptureDestroy(vc: imVideoCapture) [in Lua 5] \endverbatim + * \verbatim vc:Destroy() [in Lua 5] \endverbatim + * \ingroup capture */ +void IM_DECL imVideoCaptureDestroy(imVideoCapture* vc); + +/** Connects to a capture device. + * More than one imVideoCapture object can be created + * but they must be connected to different devices. \n + * If the object is conected it will disconnect first. \n + * Use -1 to return the current connected device, + * in this case returns -1 if not connected. \n + * Returns zero if failed. + * + * \verbatim vc:Connect([device: number]) -> ret: number [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureConnect(imVideoCapture* vc, int device); + +/** Disconnect from a capture device. + * + * \verbatim vc:Disconnect() [in Lua 5] \endverbatim + * \ingroup capture */ +void IM_DECL imVideoCaptureDisconnect(imVideoCapture* vc); + +/** Returns the number of available configuration dialogs. + * + * \verbatim vc:DialogCount() -> count: number [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureDialogCount(imVideoCapture* vc); + +/** Displays a configuration modal dialog of the connected device. \n + * In Windows, the capturing will be stopped in some cases. \n + * In Windows parent is a HWND of a parent window, it can be NULL. \n + * dialog can be from 0 to \ref imVideoCaptureDialogCount. \n + * Returns zero if failed. + * + * \verbatim vc:ShowDialog(dialog: number, parent: userdata) -> error: boolean [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureShowDialog(imVideoCapture* vc, int dialog, void* parent); + +/** Allows to control the input and output of devices that have multiple input and outputs. + * The cross index controls in which stage the input/output will be set. Usually use 1, but some capture boards + * has a second stage. In Direct X it controls the crossbars. + * + * \verbatim vc:SetInOut(input, output, cross: number) -> error: boolean [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureSetInOut(imVideoCapture* vc, int input, int output, int cross); + +/** Returns the description of a configuration dialog. + * dialog can be from 0 to \ref imVideoCaptureDialogCount. \n + * + * \verbatim vc:DialogDesc(dialog: number) -> desc: string [in Lua 5] \endverbatim + * \ingroup capture */ +const char* IM_DECL imVideoCaptureDialogDesc(imVideoCapture* vc, int dialog); + +/** Returns the number of available video formats. \n + * Returns zero if failed. + * + * \verbatim vc:FormatCount() -> count: number [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureFormatCount(imVideoCapture* vc); + +/** Returns information about the video format. \n + * format can be from 0 to \ref imVideoCaptureFormatCount. \n + * desc should be of size 10. \n + * The image size is usually the maximum size for that format. + * Other sizes can be available using \ref imVideoCaptureSetImageSize. \n + * Returns zero if failed. + * + * \verbatim vc:GetFormat(format: number) -> error: boolean, width: number, height: number, desc: string [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureGetFormat(imVideoCapture* vc, int format, int *width, int *height, char* desc); + +/** Changes the video format of the connected device. \n + * Should NOT work for DV devices. Use \ref imVideoCaptureSetImageSize only. \n + * Use -1 to return the current format, in this case returns -1 if failed. \n + * When the format is changed in the dialog, for some formats + * the returned format is the preferred format, not the current format. \n + * This will not affect color_mode of the capture image. \n + * Returns zero if failed. + * + * \verbatim vc:SetFormat([format: number]) -> error: boolean | format: number [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureSetFormat(imVideoCapture* vc, int format); + +/** Returns the current image size of the connected device. \n + * width and height returns 0 if not connected. + * + * \verbatim vc:GetImageSize() -> width: number, height: number [in Lua 5] \endverbatim + * \ingroup capture */ +void IM_DECL imVideoCaptureGetImageSize(imVideoCapture* vc, int *width, int *height); + +/** Changes the image size of the connected device. \n + * Similar to \ref imVideoCaptureSetFormat, but changes only the size. \n + * Valid sizes can be obtained with \ref imVideoCaptureGetFormat. \n + * Returns zero if failed. + * + * \verbatim vc:SetImageSize(width: number, height: number) -> error: boolean [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureSetImageSize(imVideoCapture* vc, int width, int height); + +/** Returns a new captured frame. Use -1 for infinite timeout. \n + * Color space can be IM_RGB or IM_GRAY, and mode can be packed (IM_PACKED) or not. \n + * Data type is always IM_BYTE. \n + * It can not have an alpha channel and orientation is always bottom up. \n + * Returns zero if failed or timeout expired, the buffer is not changed. + * + * \verbatim vc:Frame(image: imImage, timeout: number) -> error: boolean [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureFrame(imVideoCapture* vc, unsigned char* data, int color_mode, int timeout); + +/** Start capturing, returns the new captured frame and stop capturing. \n + * This is more usefull if you are switching between devices. \n + * Data format is the same as imVideoCaptureFrame. \n + * Returns zero if failed. + * + * \verbatim vc:OneFrame(image: imImage) -> error: boolean [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureOneFrame(imVideoCapture* vc, unsigned char* data, int color_mode); + +/** Start capturing. \n + * Use -1 to return the current state. \n + * Returns zero if failed. + * + * \verbatim vc:Live([live: number]) -> error: boolean | live: number [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureLive(imVideoCapture* vc, int live); + +/** Resets a camera or video attribute to the default value or + * to the automatic setting. \n + * Not all attributes support automatic modes. \n + * Returns zero if failed. + * + * \verbatim vc:ResetAttribute(attrib: string, fauto: boolean) -> error: boolean [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureResetAttribute(imVideoCapture* vc, const char* attrib, int fauto); + +/** Returns a camera or video attribute in percentage of the valid range value. \n + * Returns zero if failed or attribute not supported. + * + * \verbatim vc:GetAttribute(attrib: string) -> error: boolean, percent: number [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureGetAttribute(imVideoCapture* vc, const char* attrib, float *percent); + +/** Changes a camera or video attribute in percentage of the valid range value. \n + * Returns zero if failed or attribute not supported. + * + * \verbatim vc:SetAttribute(attrib: string, percent: number) -> error: boolean [in Lua 5] \endverbatim + * \ingroup capture */ +int IM_DECL imVideoCaptureSetAttribute(imVideoCapture* vc, const char* attrib, float percent); + +/** Returns a list of the description of the valid attributes for the device class. \n + * But each device may still not support some of the returned attributes. \n + * Use the return value of \ref imVideoCaptureGetAttribute to check if the attribute is supported. + * + * \verbatim vc:GetAttributeList() -> attrib_list: table of strings [in Lua 5] \endverbatim + * \ingroup capture */ +const char** IM_DECL imVideoCaptureGetAttributeList(imVideoCapture* vc, int *num_attrib); + + +/** \defgroup winattrib Windows Attributes Names + * Not all attributes are supported by each device. + * Use the return value of \ref imVideoCaptureGetAttribute to check if the attribute is supported. +\verbatim + VideoBrightness - Specifies the brightness, also called the black level. + VideoContrast - Specifies the contrast, expressed as gain factor. + VideoHue - Specifies the hue angle. + VideoSaturation - Specifies the saturation. + VideoSharpness - Specifies the sharpness. + VideoGamma - Specifies the gamma. + VideoColorEnable - Specifies the color enable setting. (0/100) + VideoWhiteBalance - Specifies the white balance, as a color temperature in degrees Kelvin. + VideoBacklightCompensation - Specifies the backlight compensation setting. (0/100) + VideoGain - Specifies the gain adjustment. + CameraPanAngle - Specifies the camera's pan angle. To 100 rotate right, To 0 rotate left (view from above). + CameraTiltAngle - Specifies the camera's tilt angle. To 100 rotate up, To 0 rotate down. + CameraRollAngle - Specifies the camera's roll angle. To 100 rotate right, To 0 rotate left. + CameraLensZoom - Specifies the camera's zoom setting. + CameraExposure - Specifies the exposure setting. + CameraIris - Specifies the camera's iris setting. + CameraFocus - Specifies the camera's focus setting, as the distance to the optimally focused target. + FlipHorizontal - Specifies the video will be flipped in the horizontal direction. + FlipVertical - Specifies the video will be flipped in the vertical direction. + AnalogFormat - Specifies the video format standard NTSC, PAL, etc. Valid values: + NTSC_M = 0 + NTSC_M_J = 1 + NTSC_433 = 2 + PAL_B = 3 + PAL_D = 4 + PAL_H = 5 + PAL_I = 6 + PAL_M = 7 + PAL_N = 8 + PAL_60 = 9 + SECAM_B = 10 + SECAM_D = 11 + SECAM_G = 12 + SECAM_H = 13 + SECAM_K = 14 + SECAM_K1 = 15 + SECAM_L = 16 + SECAM_L1 = 17 + PAL_N_COMBO = 18 +\endverbatim + * \ingroup capture */ + + +#if defined(__cplusplus) +} + +/** A C++ Wrapper for the imVideoCapture structure functions. + * \ingroup capture */ +class imCapture +{ +public: + imCapture() + { vc = imVideoCaptureCreate(); } + + ~imCapture() + { if (vc) imVideoCaptureDestroy(vc); } + + int Failed() + { if (!vc) return 0; else return 1; } + + int Connect(int device) + { return imVideoCaptureConnect(vc, device); } + + void Disconnect() + { imVideoCaptureDisconnect(vc); } + + int DialogCount() + { return imVideoCaptureDialogCount(vc); } + + int ShowDialog(int dialog, void* parent) + { return imVideoCaptureShowDialog(vc, dialog, parent); } + + const char* DialogDescription(int dialog) + { return imVideoCaptureDialogDesc(vc, dialog); } + + int FormatCount() + { return imVideoCaptureFormatCount(vc); } + + int GetFormat(int format, int *width, int *height, char* desc) + { return imVideoCaptureGetFormat(vc, format, width, height, desc); } + + int SetFormat(int format) + { return imVideoCaptureSetFormat(vc, format); } + + void GetImageSize(int *width, int *height) + { imVideoCaptureGetImageSize(vc, width, height); } + + int SetImageSize(int width, int height) + { return imVideoCaptureSetImageSize(vc, width, height); } + + int GetFrame(unsigned char* data, int color_mode, int timeout) + { return imVideoCaptureFrame(vc, data, color_mode, timeout); } + + int GetOneFrame(unsigned char* data, int color_mode) + { return imVideoCaptureOneFrame(vc, data, color_mode); } + + int Live(int live) + { return imVideoCaptureLive(vc, live); } + + int ResetAttribute(const char* attrib, int fauto) + { return imVideoCaptureResetAttribute(vc, attrib, fauto); } + + int GetAttribute(const char* attrib, float *percent) + { return imVideoCaptureGetAttribute(vc, attrib, percent); } + + int SetAttribute(const char* attrib, float percent) + { return imVideoCaptureSetAttribute(vc, attrib, percent); } + + const char** GetAttributeList(int *num_attrib) + { return imVideoCaptureGetAttributeList(vc, num_attrib); } + +protected: + imVideoCapture* vc; +}; + +#endif + +#endif diff --git a/im/include/im_color.h b/im/include/im_color.h new file mode 100755 index 0000000..b38b22c --- /dev/null +++ b/im/include/im_color.h @@ -0,0 +1,465 @@ +/** \file + * \brief Color Manipulation + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_COLOR_H +#define __IM_COLOR_H + +#include "im_math.h" + +/** \defgroup color Color Manipulation + * + * \par + * Functions to convert from one color space to another, + * and color gammut utilities. + * \par + * See \ref im_color.h + * + * \section s1 Some Color Science + * \par + * Y is luminance, a linear-light quantity. + * It is directly proportional to physical intensity + * weighted by the spectral sensitivity of human vision. + * \par + * L* is lightness, a nonlinear luminance + * that aproximates the perception of brightness. + * It is nearly perceptual uniform. + * It has a range of 0 to 100. + * \par + * Y' is luma, a nonlinear luminance that aproximates lightness. + * \par + * Brightness is a visual sensation according to which an area + * apears to exhibit more or less light. + * It is a subjective quantity and can not be measured. + * \par + * One unit of euclidian distante in CIE L*u*v* or CIE L*a*b* corresponds + * roughly to a just-noticeable difference (JND) of color. + * \par +\verbatim + ChromaUV = sqrt(u*u + v*v) + HueUV = atan2(v, u) + SaturationUV = ChromaUV / L (called psychometric saturation) + (the same can be calculated for Lab) +\endverbatim + * \par + * IEC 61966-2.1 Default RGB colour space - sRGB + * \li ITU-R Recommendation BT.709 (D65 white point). + * \li D65 White Point (X,Y,Z) = (0.9505 1.0000 1.0890) + * \par + * Documentation extracted from Charles Poynton - Digital Video and HDTV - Morgan Kaufmann - 2003. + * + * \section Links + * \li www.color.org - ICC + * \li www.srgb.com - sRGB + * \li www.poynton.com - Charles Poynton + * \li www.littlecms.com - A free Color Management System (use this if you need precise color conversions) + * + * \section cci Color Component Intervals + * \par + * All the color components are stored in the 0-max interval, even the signed ones. \n + * Here are the pre-defined intervals for each data type. These values are used for standard color conversion. + * You should normalize data before converting betwwen color spaces. + * \par +\verbatim + byte [0,255] or [-128,+127] (1 byte) + ushort [0,65535] or [-32768,+32767] (2 bytes) + int [0,16777215] or [-8388608,+8388607] (3 bytes) + float [0,1] or [-0.5,+0.5] (4 bytes) +\endverbatim + * \ingroup util */ + +/** Returns the zero value for color conversion porpouses. \n + * This is a value to be compensated when the data_type is unsigned and component is signed. \n + * \ingroup color */ +inline float imColorZero(int data_type) +{ + float zero[] = {128.0f, 32768.0f, 8388608.0f, 0.5f}; + return zero[data_type]; +} + +/** Returns the maximum value for color conversion porpouses. \n + * \ingroup color */ +inline int imColorMax(int data_type) +{ + int max[] = {255, 65535, 16777215, 1}; + return max[data_type]; +} + +/** Quantize r=0-1 values into q=0-max. + * max is the maximum value. + * max and the returned value are usually integers, + * but the dummy quantizer uses real values. + * See also \ref math. + * \ingroup color */ +template +inline T imColorQuantize(const float& value, const T& max) +{ + if (max == 1) return (T)value; // to allow a dummy quantizer + if (value >= 1) return max; + if (value <= 0) return 0; + /* return (T)imRound(value*(max + 1) - 0.5f); not necessary since all values are positive */ + return (T)(value*(max + 1)); +} + +/** Reconstruct 0-max values into 0-1. \n + * max is the maximum value. + * max and the given value are usually integers, + * but the dummy reconstructor uses real values. + * See also \ref math. + * \ingroup color */ +template +inline float imColorReconstruct(const T& value, const T& max) +{ + if (max == 1) return (float)value; // to allow a dummy reconstructor + if (value <= 0) return 0; + if (value >= max) return 1; + return (((float)value + 0.5f)/((float)max + 1.0f)); +} + +/** Converts Y'CbCr to R'G'B' (all nonlinear). \n + * ITU-R Recommendation 601-1 with no headroom/footroom. +\verbatim + 0 <= Y <= 1 ; -0.5 <= CbCr <= 0.5 ; 0 <= RGB <= 1 + + R'= Y' + 0.000 *Cb + 1.402 *Cr + G'= Y' - 0.344 *Cb - 0.714 *Cr + B'= Y' + 1.772 *Cb + 0.000 *Cr +\endverbatim + * \ingroup color */ +template +inline void imColorYCbCr2RGB(const T Y, const T Cb, const T Cr, + T& R, T& G, T& B, + const T& zero, const T& max) +{ + float r = float(Y + 1.402f * (Cr - zero)); + float g = float(Y - 0.344f * (Cb - zero) - 0.714f * (Cr - zero)); + float b = float(Y + 1.772f * (Cb - zero)); + + // now we should enforce 0<= rgb <= max + + R = (T)IM_CROPMAX(r, max); + G = (T)IM_CROPMAX(g, max); + B = (T)IM_CROPMAX(b, max); +} + +/** Converts R'G'B' to Y'CbCr (all nonlinear). \n + * ITU-R Recommendation 601-1 with no headroom/footroom. +\verbatim + 0 <= Y <= 1 ; -0.5 <= CbCr <= 0.5 ; 0 <= RGB <= 1 + + Y' = 0.299 *R' + 0.587 *G' + 0.114 *B' + Cb = -0.169 *R' - 0.331 *G' + 0.500 *B' + Cr = 0.500 *R' - 0.419 *G' - 0.081 *B' +\endverbatim + * \ingroup color */ +template +inline void imColorRGB2YCbCr(const T R, const T G, const T B, + T& Y, T& Cb, T& Cr, + const T& zero) +{ + Y = (T)( 0.299f *R + 0.587f *G + 0.114f *B); + Cb = (T)(-0.169f *R - 0.331f *G + 0.500f *B + (float)zero); + Cr = (T)( 0.500f *R - 0.419f *G - 0.081f *B + (float)zero); + + // there is no need for cropping here, YCrCr is already at the limits +} + +/** Converts C'M'Y'K' to R'G'B' (all nonlinear). \n + * This is a poor conversion that works for a simple visualization. +\verbatim + 0 <= CMYK <= 1 ; 0 <= RGB <= 1 + + R = (1 - K) * (1 - C) + G = (1 - K) * (1 - M) + B = (1 - K) * (1 - Y) +\endverbatim + * \ingroup color */ +template +inline void imColorCMYK2RGB(const T C, const T M, const T Y, const T K, + T& R, T& G, T& B, const T& max) +{ + T W = max - K; + R = (T)((W * (max - C)) / max); + G = (T)((W * (max - M)) / max); + B = (T)((W * (max - Y)) / max); + + // there is no need for cropping here, RGB is already at the limits +} + +/** Converts CIE XYZ to Rec 709 RGB (all linear). \n + * ITU-R Recommendation BT.709 (D65 white point). \n +\verbatim + 0 <= XYZ <= 1 ; 0 <= RGB <= 1 + + R = 3.2406 *X - 1.5372 *Y - 0.4986 *Z + G = -0.9689 *X + 1.8758 *Y + 0.0415 *Z + B = 0.0557 *X - 0.2040 *Y + 1.0570 *Z +\endverbatim + * \ingroup color */ +template +inline void imColorXYZ2RGB(const T X, const T Y, const T Z, + T& R, T& G, T& B, const T& max) +{ + float r = 3.2406f *X - 1.5372f *Y - 0.4986f *Z; + float g = -0.9689f *X + 1.8758f *Y + 0.0415f *Z; + float b = 0.0557f *X - 0.2040f *Y + 1.0570f *Z; + + // we need to crop because not all XYZ colors are visible + + R = (T)IM_CROPMAX(r, max); + G = (T)IM_CROPMAX(g, max); + B = (T)IM_CROPMAX(b, max); +} + +/** Converts Rec 709 RGB to CIE XYZ (all linear). \n + * ITU-R Recommendation BT.709 (D65 white point). \n +\verbatim + 0 <= XYZ <= 1 ; 0 <= RGB <= 1 + + X = 0.4124 *R + 0.3576 *G + 0.1805 *B + Y = 0.2126 *R + 0.7152 *G + 0.0722 *B + Z = 0.0193 *R + 0.1192 *G + 0.9505 *B +\endverbatim + * \ingroup color */ +template +inline void imColorRGB2XYZ(const T R, const T G, const T B, + T& X, T& Y, T& Z) +{ + X = (T)(0.4124f *R + 0.3576f *G + 0.1805f *B); + Y = (T)(0.2126f *R + 0.7152f *G + 0.0722f *B); + Z = (T)(0.0193f *R + 0.1192f *G + 0.9505f *B); + + // there is no need for cropping here, XYZ is already at the limits +} + +#define IM_FWLAB(_w) (_w > 0.008856f? \ + powf(_w, 1.0f/3.0f): \ + 7.787f * _w + 0.16f/1.16f) + +/** Converts CIE XYZ (linear) to CIE L*a*b* (nonlinear). \n + * The white point is D65. \n +\verbatim + 0 <= L <= 1 ; -0.5 <= ab <= +0.5 ; 0 <= XYZ <= 1 + + if (t > 0.008856) + f(t) = pow(t, 1/3) + else + f(t) = 7.787*t + 16/116 + + fX = f(X / Xn) fY = f(Y / Yn) fZ = f(Z / Zn) + + L = 1.16 * fY - 0.16 + a = 2.5 * (fX - fY) + b = (fY - fZ) + +\endverbatim + * \ingroup color */ +inline void imColorXYZ2Lab(const float X, const float Y, const float Z, + float& L, float& a, float& b) +{ + float fX = X / 0.9505f; // white point D65 + float fY = Y / 1.0f; + float fZ = Z / 1.0890f; + + fX = IM_FWLAB(fX); + fY = IM_FWLAB(fY); + fZ = IM_FWLAB(fZ); + + L = 1.16f * fY - 0.16f; + a = 2.5f * (fX - fY); + b = (fY - fZ); +} + +#define IM_GWLAB(_w) (_w > 0.20689f? \ + powf(_w, 3.0f): \ + 0.1284f * (_w - 0.16f/1.16f)) + +/** Converts CIE L*a*b* (nonlinear) to CIE XYZ (linear). \n + * The white point is D65. \n + * 0 <= L <= 1 ; -0.5 <= ab <= +0.5 ; 0 <= XYZ <= 1 + * \ingroup color */ +inline void imColorLab2XYZ(const float L, const float a, const float b, + float& X, float& Y, float& Z) + +{ + float fY = (L + 0.16f) / 1.16f; + float gY = IM_GWLAB(fY); + + float fgY = IM_FWLAB(gY); + float gX = fgY + a / 2.5f; + float gZ = fgY - b; + gX = IM_GWLAB(gX); + gZ = IM_GWLAB(gZ); + + X = gX * 0.9505f; // white point D65 + Y = gY * 1.0f; + Z = gZ * 1.0890f; +} + +/** Converts CIE XYZ (linear) to CIE L*u*v* (nonlinear). \n + * The white point is D65. \n +\verbatim + 0 <= L <= 1 ; -1 <= uv <= +1 ; 0 <= XYZ <= 1 + + Y = Y / 1.0 (for D65) + if (Y > 0.008856) + fY = pow(Y, 1/3) + else + fY = 7.787 * Y + 0.16/1.16 + L = 1.16 * fY - 0.16 + + U(x, y, z) = (4 * x)/(x + 15 * y + 3 * z) + V(x, y, z) = (9 * x)/(x + 15 * y + 3 * z) + un = U(Xn, Yn, Zn) = 0.1978 (for D65) + vn = V(Xn, Yn, Zn) = 0.4683 (for D65) + fu = U(X, Y, Z) + fv = V(X, Y, Z) + + u = 13 * L * (fu - un) + v = 13 * L * (fv - vn) +\endverbatim + * \ingroup color */ +inline void imColorXYZ2Luv(const float X, const float Y, const float Z, + float& L, float& u, float& v) +{ + float XYZ = (float)(X + 15 * Y + 3 * Z); + float fY = Y / 1.0f; + + if (XYZ != 0) + { + L = 1.16f * IM_FWLAB(fY) - 0.16f; + u = 6.5f * L * ((4 * X)/XYZ - 0.1978f); + v = 6.5f * L * ((9 * Y)/XYZ - 0.4683f); + } + else + { + L = u = v = 0; + } +} + +/** Converts CIE L*u*v* (nonlinear) to CIE XYZ (linear). \n + * The white point is D65. + * 0 <= L <= 1 ; -0.5 <= uv <= +0.5 ; 0 <= XYZ <= 1 \n + * \ingroup color */ +inline void imColorLuv2XYZ(const float L, const float u, const float v, + float& X, float& Y, float& Z) + +{ + float fY = (L + 0.16f) / 1.16f; + Y = IM_GWLAB(fY) * 1.0f; + + float ul = 0.1978f, vl = 0.4683f; + if (L != 0) + { + ul = u / (6.5f * L) + 0.1978f; + vl = v / (6.5f * L) + 0.4683f; + } + + X = ((9 * ul) / (4 * vl)) * Y; + Z = ((12 - 3 * ul - 20 * vl) / (4 * vl)) * Y; +} + +/** Converts nonlinear values to linear values. \n + * We use the sRGB transfer function. sRGB uses ITU-R 709 primaries and D65 white point. \n +\verbatim + 0 <= l <= 1 ; 0 <= v <= 1 + + if (v < 0.03928) + l = v / 12.92 + else + l = pow((v + 0.055) / 1.055, 2.4) +\endverbatim + * \ingroup color */ +inline float imColorTransfer2Linear(const float& nonlinear_value) +{ + if (nonlinear_value < 0.03928f) + return nonlinear_value / 12.92f; + else + return powf((nonlinear_value + 0.055f) / 1.055f, 2.4f); +} + +/** Converts linear values to nonlinear values. \n + * We use the sRGB transfer function. sRGB uses ITU-R 709 primaries and D65 white point. \n +\verbatim + 0 <= l <= 1 ; 0 <= v <= 1 + + if (l < 0.0031308) + v = 12.92 * l + else + v = 1.055 * pow(l, 1/2.4) - 0.055 +\endverbatim + * \ingroup color */ +inline float imColorTransfer2Nonlinear(const float& value) +{ + if (value < 0.0031308f) + return 12.92f * value; + else + return 1.055f * powf(value, 1.0f/2.4f) - 0.055f; +} + +/** Converts RGB (linear) to R'G'B' (nonlinear). + * \ingroup color */ +inline void imColorRGB2RGBNonlinear(const float RL, const float GL, const float BL, + float& R, float& G, float& B) +{ + R = imColorTransfer2Nonlinear(RL); + G = imColorTransfer2Nonlinear(GL); + B = imColorTransfer2Nonlinear(BL); +} + +/** Converts R'G'B' to Y' (all nonlinear). \n +\verbatim + Y' = 0.299 *R' + 0.587 *G' + 0.114 *B' +\endverbatim + * \ingroup color */ +template +inline T imColorRGB2Luma(const T R, const T G, const T B) +{ + return (T)((299 * R + 587 * G + 114 * B) / 1000); +} + +/** Converts Luminance (CIE Y) to Lightness (CIE L*) (all linear). \n + * The white point is D65. +\verbatim + 0 <= Y <= 1 ; 0 <= L* <= 1 + + Y = Y / 1.0 (for D65) + if (Y > 0.008856) + fY = pow(Y, 1/3) + else + fY = 7.787 * Y + 0.16/1.16 + L = 1.16 * fY - 0.16 +\endverbatim + * \ingroup color */ +inline float imColorLuminance2Lightness(const float& Y) +{ + return 1.16f * IM_FWLAB(Y) - 0.16f; +} + +/** Converts Lightness (CIE L*) to Luminance (CIE Y) (all linear). \n + * The white point is D65. +\verbatim + 0 <= Y <= 1 ; 0 <= L* <= 1 + + fY = (L + 0.16)/1.16 + if (fY > 0.20689) + Y = pow(fY, 3) + else + Y = 0.1284 * (fY - 0.16/1.16) + Y = Y * 1.0 (for D65) +\endverbatim + * \ingroup color */ +inline float imColorLightness2Luminance(const float& L) +{ + float fY = (L + 0.16f) / 1.16f; + return IM_GWLAB(fY); +} + +#undef IM_FWLAB +#undef IM_GWLAB +#undef IM_CROPL +#undef IM_CROPC + +#endif diff --git a/im/include/im_colorhsi.h b/im/include/im_colorhsi.h new file mode 100755 index 0000000..9749002 --- /dev/null +++ b/im/include/im_colorhsi.h @@ -0,0 +1,56 @@ +/** \file + * \brief HSI Color Manipulation + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_COLORHSI_H +#define __IM_COLORHSI_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup hsi HSI Color Coordinate System Conversions + * + * \par + * HSI is just the RGB color space written in a different coordinate system. + * \par + * "I" is defined along the cube diagonal. It ranges from 0 (black) to 1 (white). \n + * HS are the polar coordinates of a plane normal to "I". \n + * "S" is the normal distance from the diagonal of the RGB cube. It ranges from 0 to 1. \n + * "H" is the angle starting from the red vector, given in degrees. + * \par + * This is not a new color space, this is exactly the same gammut as RGB. \n + * \par + * See \ref im_colorhsi.h + * \ingroup color */ + + +/** Returns I where S is maximum given H (here in radians). + * \ingroup hsi */ +float imColorHSI_ImaxS(float h, double cosh, double sinh); + +/** Converts from RGB to HSI. + * \ingroup hsi */ +void imColorRGB2HSI(float r, float g, float b, float *h, float *s, float *i); + +/** Converts from RGB (byte) to HSI. + * \ingroup hsi */ +void imColorRGB2HSIbyte(unsigned char r, unsigned char g, unsigned char b, float *h, float *s, float *i); + +/** Converts from HSI to RGB. + * \ingroup hsi */ +void imColorHSI2RGB(float h, float s, float i, float *r, float *g, float *b); + +/** Converts from HSI to RGB (byte). + * \ingroup hsi */ +void imColorHSI2RGBbyte(float h, float s, float i, unsigned char *r, unsigned char *g, unsigned char *b); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_complex.h b/im/include/im_complex.h new file mode 100755 index 0000000..1328dd5 --- /dev/null +++ b/im/include/im_complex.h @@ -0,0 +1,180 @@ +/** \file + * \brief Complex Data Type. + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_COMPLEX_H +#define __IM_COMPLEX_H + +#include "im_math.h" + +/** \defgroup cpx Complex Numbers + * \par + * See \ref im_complex.h + * \ingroup util + */ + +/** \brief Complex Float Data Type + * + * \par + * Complex class using two floats, one for real part, one for the imaginary part. + * \par + * It is not a complete complex class, we just implement constructors inside the class. + * All the other operators and functions are external to the class. + * \ingroup cpx */ +class imcfloat +{ +public: + float real; ///< Real part. + float imag; ///< Imaginary part. + + /// Default Constructor (0,0). + imcfloat():real(0), imag(0) {} + + /// Constructor from (real, imag) + imcfloat(const float& r, const float& i):real(r),imag(i) {} + + /// Constructor from (real) + imcfloat(const float& r):real(r),imag(0) {} +}; + +/** \addtogroup cpx + * Complex numbers operators. + * @{ + */ + +inline int operator <= (const imcfloat& C1, const imcfloat& C2) +{ + return ((C1.real <= C2.real) && (C1.imag <= C2.imag)); +} + +inline int operator <= (const imcfloat& C, const float& F) +{ + return ((F <= C.real) && (0 <= C.imag)); +} + +inline int operator < (const imcfloat& C1, const imcfloat& C2) +{ + return ((C1.real < C2.real) && (C1.imag < C2.imag)); +} + +inline int operator < (const imcfloat& C, const float& F) +{ + return ((F < C.real) && (0 < C.imag)); +} + +inline int operator > (const imcfloat& C1, const imcfloat& C2) +{ + return ((C1.real > C2.real) && (C1.imag > C2.imag)); +} + +inline int operator > (const imcfloat& C, const float& F) +{ + return ((F > C.real) && (0 > C.imag)); +} + +inline imcfloat operator + (const imcfloat& C1, const imcfloat& C2) +{ + return imcfloat(C1.real + C2.real, C1.imag + C2.imag); +} + +inline imcfloat operator += (const imcfloat& C1, const imcfloat& C2) +{ + return imcfloat(C1.real + C2.real, C1.imag + C2.imag); +} + +inline imcfloat operator - (const imcfloat& C1, const imcfloat& C2) +{ + return imcfloat(C1.real - C2.real, C1.imag - C2.imag); +} + +inline imcfloat operator * (const imcfloat& C1, const imcfloat& C2) +{ + return imcfloat(C1.real * C2.real - C1.imag * C2.imag, + C1.imag * C2.real + C1.real * C2.imag); +} + +inline imcfloat operator / (const imcfloat& C1, const imcfloat& C2) +{ + float den = C2.real * C2.real - C2.imag * C2.imag; + return imcfloat((C1.real * C2.real + C1.imag * C2.imag) / den, + (C1.imag * C2.real - C1.real * C2.imag) / den); +} + +inline imcfloat operator / (const imcfloat& C, const float& R) +{ + return imcfloat(C.real / R, C.imag / R); +} + +inline imcfloat operator /= (const imcfloat& C, const float& R) +{ + return imcfloat(C.real / R, C.imag / R); +} + +inline imcfloat operator * (const imcfloat& C, const float& R) +{ + return imcfloat(C.real * R, C.imag * R); +} + +inline int operator == (const imcfloat& C1, const imcfloat& C2) +{ + return ((C1.real == C2.real) && (C1.imag == C2.imag)); +} + +inline float cpxreal(const imcfloat& C) +{ + return C.real; +} + +inline float cpximag(const imcfloat& C) +{ + return C.imag; +} + +inline float cpxmag(const imcfloat& C) +{ + return sqrtf(C.real*C.real + C.imag*C.imag); +} + +inline float cpxphase(const imcfloat& C) +{ + return atan2f(C.real, C.imag); +} + +inline imcfloat cpxconj(const imcfloat& C) +{ + return imcfloat(C.real, -C.imag); +} + +inline imcfloat log(const imcfloat& C) +{ + return imcfloat(logf(cpxmag(C)), atan2f(C.real, C.imag)); +} + +inline imcfloat exp(const imcfloat& C) +{ + float mag = expf(C.real); + return imcfloat(mag * cosf(C.imag), mag * sinf(C.imag)); +} + +inline imcfloat pow(const imcfloat& C1, const imcfloat& C2) +{ + return exp(C1 * log(C2)); +} + +inline imcfloat sqrt(const imcfloat& C) +{ + float mag = sqrtf(sqrtf(C.real*C.real + C.imag*C.imag)); + float phase = atan2f(C.real, C.imag) / 2; + return imcfloat(mag * cosf(phase), mag * sinf(phase)); +} + +inline imcfloat cpxpolar(const float& mag, const float& phase) +{ + return imcfloat(mag * cosf(phase), mag * sinf(phase)); +} + +/** @} */ + +#endif diff --git a/im/include/im_convert.h b/im/include/im_convert.h new file mode 100755 index 0000000..794eed9 --- /dev/null +++ b/im/include/im_convert.h @@ -0,0 +1,142 @@ +/** \file + * \brief Image Conversion + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_CONVERT_H +#define __IM_CONVERT_H + +#include "im_image.h" + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup convert Image Conversion + * \par + * Converts one type of image into another. Can convert between color modes + * and between data types. + * \par + * See \ref im_convert.h + * \ingroup imgclass */ + + +/** Complex to real conversions + * \ingroup convert */ +enum imComplex2Real +{ + IM_CPX_REAL, + IM_CPX_IMAG, + IM_CPX_MAG, + IM_CPX_PHASE +}; + +/** Predefined Gamma factors. Gamma can be any real number. + * When gamma<0 use logarithmic, when gamma>0 use exponential. + * gamma(x,g) = ((e^(g*x))-1)/(exp(g)-1) + * gamma(x,g) = (log((g*x)+1))/(log(g+1)) + * \ingroup convert */ +enum imGammaFactor +{ + IM_GAMMA_LINEAR = 0, + IM_GAMMA_LOGLITE = -10, + IM_GAMMA_LOGHEAVY = -1000, + IM_GAMMA_EXPLITE = 2, + IM_GAMMA_EXPHEAVY = 7 +}; + +/** Predefined Cast Modes + * \ingroup convert */ +enum imCastMode +{ + IM_CAST_MINMAX, /**< scan for min and max values */ + IM_CAST_FIXED, /**< use predefied 0-max values, see \ref color Color Manipulation. */ + IM_CAST_DIRECT /**< direct type cast the value. Only byte and ushort will be cropped. */ +}; + +/** Changes the image data type, using a complex2real conversion, + * a gamma factor, and an abssolute mode (modulus). \n + * When demoting the data type the function will scan for min/max values or use fixed values (cast_mode) + * to scale the result according to the destiny range. \n + * Except complex to real that will use only the complex2real conversion. \n + * Images must be of the same size and color mode. \n + * Returns IM_ERR_NONE, IM_ERR_DATA or IM_ERR_COUNTER, see also \ref imErrorCodes. + * See also \ref imComplex2Real, \ref imGammaFactor and \ref imCastMode. + * + * \verbatim im.ConvertDataType(src_image: imImage, dst_image: imImage, cpx2real: number, gamma: number, abssolute: boolean, cast_mode: number) -> error: number [in Lua 5] \endverbatim + * \verbatim im.ConvertDataTypeNew(image: imImage, data_type: number, cpx2real: number, gamma: number, abssolute: boolean, cast_mode: number) -> error: number, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convert */ +int imConvertDataType(const imImage* src_image, imImage* dst_image, int cpx2real, float gamma, int abssolute, int cast_mode); + +/** Converts one color space to another. Images must be of the same size and data type. \n + * CMYK can be converted to RGB only, and it is a very simple conversion. \n + * All colors can be converted to Binary, the non zero gray values are converted to 1. \n + * RGB to Map uses the median cut implementation from the free IJG JPEG software, copyright Thomas G. Lane. \n + * Alpha channel is considered and Transparency* attributes are converted to alpha channel. \n + * All other color space conversions assume sRGB and CIE definitions. \n + * Returns IM_ERR_NONE, IM_ERR_DATA or IM_ERR_COUNTER, see also \ref imErrorCodes. + * + * \verbatim im.ConvertColorSpace(src_image: imImage, dst_image: imImage) -> error: number [in Lua 5] \endverbatim + * \verbatim im.ConvertColorSpaceNew(image: imImage, color_space: number, has_alpha: boolean) -> error: number, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convert */ +int imConvertColorSpace(const imImage* src_image, imImage* dst_image); + +/** Converts the image to its bitmap equivalent, + * uses \ref imConvertColorSpace and \ref imConvertDataType. \n + * Returns IM_ERR_NONE, IM_ERR_DATA or IM_ERR_COUNTER, see also \ref imErrorCodes. + * See also \ref imComplex2Real, \ref imGammaFactor and \ref imCastMode. \n + * The function im.ConvertToBitmapNew uses the default convertion result from \ref imColorModeToBitmap if color_space is nil. + * + * \verbatim im.ConvertToBitmap(src_image: imImage, dst_image: imImage, cpx2real: number, gamma: number, abssolute: boolean, cast_mode: number) -> error: number [in Lua 5] \endverbatim + * \verbatim im.ConvertToBitmapNew(image: imImage, color_space: number, has_alpha: boolean, cpx2real: number, gamma: number, abssolute: boolean, cast_mode: number) -> error: number, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convert */ +int imConvertToBitmap(const imImage* src_image, imImage* dst_image, int cpx2real, float gamma, int abssolute, int cast_mode); + +/** Returns an OpenGL compatible data buffer. Also returns the correspondant pixel format. \n + * The memory allocated is stored in the attribute "GLDATA" with BYTE type. And it will exists while the image exists. \n + * It can be cleared by setting the attribute to NULL. \n + * MAP images are converted to RGB, and BINARY images are converted to GRAY. + * Alpha channel is considered and Transparency* attributes are converted to alpha channel. + * So calculate depth from glformat, not from image depth. + * + * \verbatim image:GetOpenGLData() -> gldata: userdata, glformat: number [in Lua 5] \endverbatim + * \ingroup convert */ +void* imImageGetOpenGLData(const imImage* image, int *glformat); + + + +/** \defgroup cnvutil Raw Data Conversion Utilities + * \par + * Utilities for raw data buffers. + * \par + * See \ref im_convert.h + * \ingroup imagerep */ + + +/** Changes the packing of the data buffer. Both must have the same depth. + * \ingroup cnvutil */ +void imConvertPacking(const void* src_data, void* dst_data, int width, int height, int depth, int data_type, int src_is_packed); + +/** Changes in-place a MAP data into a RGB data. The data must have room for the RGB image. \n + * depth can be 3 or 4. count=width*height. \n + * \ingroup cnvutil */ +void imConvertMapToRGB(unsigned char* data, int count, int depth, int packed, long* palette, int palette_count); + + + +/* Converts a RGB bitmap into a map bitmap using the median cut algorithm. + * Used only "im_convertcolor.cpp" implemented in "im_rgb2map.cpp". + * Internal function kept here because of the compatibility module. + * Will not be at the documentation. */ +int imConvertRGB2Map(int width, int height, + unsigned char *red, unsigned char *green, unsigned char *blue, + unsigned char *map, long *palette, int *palette_count); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_counter.h b/im/include/im_counter.h new file mode 100755 index 0000000..82714f5 --- /dev/null +++ b/im/include/im_counter.h @@ -0,0 +1,69 @@ +/** \file + * \brief Processing Counter + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_COUNTER_H +#define __IM_COUNTER_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup counter Counter + * \par + * Used to notify the application that a step in the loading, saving or processing operation has been performed. + * \par + * See \ref im_counter.h + * \ingroup util */ + +/** Counter callback, informs the progress of the operation to the client. \n + * Text contains a constant string that is NULL during normal counting, a title in the begining of a sequence + * and a message in the begining of a count. + * Counter id identifies diferrent counters. \n + * Progress in a count reports a value from 0 to 1000. If -1 indicates the start of a sequence of operations, 1001 ends the sequence. \n + * If returns 0 the client should abort the operation. \n + * If the counter is aborted, the callback will be called one last time at 1001. + * \ingroup counter */ +typedef int (*imCounterCallback)(int counter, void* user_data, const char* text, int progress); + +/** Changes the counter callback. Returns old callback. \n + * User data is changed only if not NULL. + * \ingroup counter */ +imCounterCallback imCounterSetCallback(void* user_data, imCounterCallback counter_func); + +/** Begins a new count, or a partial-count in a sequence. \n + * Calls the callback with "-1" and text=title, if it is at the top level. \n + * This is to be used by the operations. Returns a counter Id. + * \ingroup counter */ +int imCounterBegin(const char* title); + +/** Ends a count, or a partial-count in a sequence. \n + * Calls the callback with "1001", text=null, and releases the counter if it is at top level count. \n + * \ingroup counter */ +void imCounterEnd(int counter); + +/** Increments a count. Must set the total first. \n + * Calls the callback, text=message if it is the first increment for the count. \n + * Returns 0 if the callback aborted, 1 if returns normally. + * \ingroup counter */ +int imCounterInc(int counter); + +/** Set a specific count. Must set the total first. \n + * Calls the callback, text=message if it is the first increment for the count. \n + * Returns 0 if the callback aborted, 1 if returns normally. + * \ingroup counter */ +int imCounterIncTo(int counter, int count); + +/** Sets the total increments of a count. + * \ingroup counter */ +void imCounterTotal(int counter, int total, const char* message); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_dib.h b/im/include/im_dib.h new file mode 100755 index 0000000..49077b8 --- /dev/null +++ b/im/include/im_dib.h @@ -0,0 +1,195 @@ +/** \file + * \brief Windows DIB (Device Independent Bitmap) + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_DIB_H +#define __IM_DIB_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup dib Windows DIB + * + * \par + * Windows DIBs in memory are handled just like a BMP file without the file header. \n + * These functions will work only in Windows. They are usefull for interchanging data + * with the clipboard, with capture drivers, with the AVI and WMF file formats and others. + * \par + * Supported DIB aspects: + * \li bpp must be 1, 4, 8, 16, 24, or 32. + * \li BITMAPV4HEADER or BITMAPV5HEADER are handled but ignored. \n + * \li BITMAPCOREHEADER is not handled . + * \li BI_JPEG and BI_PNG compressions are not handled. + * \li biHeight can be negative, compression can be RLE only if created + * from imDibCreateReference, imDibPasteClipboard, imDibLoadFile. + * \li can not encode/decode Images to/from RLE compressed Dibs. + * \li if working with RLE Dibs bits_size is greatter than used. + * \li the resolution of a new Dib is taken from the screen. + * \li SetDIBitsToDevice(start_scan is 0, scan_lines is dib->bmih->biHeight). + * \li StretchDIBits(use always DIB_RGB_COLORS). + * \li CreateDIBPatternBrushPt(packed_dib is dib->dib). + * \par + * Must include before using these functions. \n + * Check for structures and definitions. + * \par + * See \ref im_dib.h + * \ingroup util */ + + +/** \brief Windows DIB Structure + * + * \par + * Handles a DIB in memory. \n + * The DIB is stored in only one buffer. + * The secondary members are pointers to the main buffer. + * \ingroup dib */ +typedef struct _imDib +{ + HGLOBAL handle; /**< The windows memory handle */ + BYTE* dib; /**< The DIB as it is defined in memory */ + int size; /**< Full size in memory */ + + BITMAPINFO* bmi; /**< Bitmap Info = Bitmap Info Header + Palette */ + BITMAPINFOHEADER* bmih; /**< Bitmap Info Header */ + RGBQUAD* bmic; /**< Bitmap Info Colors = Palette */ + BYTE* bits; /**< Bitmap Bits */ + + int palette_count; /**< number of colors in the palette */ + int bits_size; /**< size in bytes of the Bitmap Bits */ + int line_size; /**< size in bytes of one line, includes padding */ + int pad_size; /**< number of bytes remaining in the line, lines are in a word boundary */ + + int is_reference; /**< only a reference, do not free pointer */ +} imDib; + +/** Creates a new DIB. \n + * use bpp=-16/-32 to allocate space for BITFLIEDS. + * \ingroup dib */ +imDib* imDibCreate(int width, int height, int bpp); + +/** Duplicates the DIB contents in a new DIB. + * \ingroup dib */ +imDib* imDibCreateCopy(const imDib* dib); + +/** Creates a DIB using an already allocated memory. \n + * "bmi" must be a pointer to BITMAPINFOHEADER. \n + * "bits" can be NULL if it is inside "bmi" after the palette. + * \ingroup dib */ +imDib* imDibCreateReference(BYTE* bmi, BYTE* bits); + +/** Creates a DIB section for drawing porposes. \n + * Returns the image handle also created. + * \ingroup dib */ +imDib* imDibCreateSection(HDC hDC, HBITMAP *image, int width, int height, int bpp); + +/** Destroy the DIB + * \ingroup dib */ +void imDibDestroy(imDib* dib); + +/** DIB GetPixel function definition. \n + * the DWORD is a raw copy of the bits, use (unsigned char*)&pixel + * \ingroup dib */ +typedef unsigned int (*imDibLineGetPixel)(unsigned char* line, int col); + +/** Returns a function to read pixels from a DIB line. + * \ingroup dib */ +imDibLineGetPixel imDibLineGetPixelFunc(int bpp); + +/** DIB SetPixel function definition + * \ingroup dib */ +typedef void (*imDibLineSetPixel)(unsigned char* line, int col, unsigned int pixel); + +/** Returns a function to write pixels into a DIB line. + * \ingroup dib */ +imDibLineSetPixel imDibLineSetPixelFunc(int bpp); + +/** Creates a DIB from a image handle and a palette handle. + * \ingroup dib */ +imDib* imDibFromHBitmap(const HBITMAP image, const HPALETTE hPalette); + +/** Creates a image handle from a DIB. + * \ingroup dib */ +HBITMAP imDibToHBitmap(const imDib* dib); + +/** Returns a Logical palette from the DIB palette. \n + * DIB bpp must be <=8. + * \ingroup dib */ +HPALETTE imDibLogicalPalette(const imDib* dib); + +/** Captures the screen into a DIB. + * \ingroup dib */ +imDib* imDibCaptureScreen(int x, int y, int width, int height); + +/** Transfer the DIB to the clipboard. \n + * "dib" pointer can not be used after, or use imDibCopyClipboard(imDibCreateCopy(dib)). + * Warning: Clipboard functions in C++ can fail with Visual C++ /EHsc (Enable C++ Exceptions) +* \ingroup dib */ +void imDibCopyClipboard(imDib* dib); + +/** Creates a reference for the DIB in the clipboard if any. Returns NULL otherwise. + * Warning: Clipboard functions in C++ can fail with Visual C++ /EHsc (Enable C++ Exceptions) + * \ingroup dib */ +imDib* imDibPasteClipboard(void); + +/** Checks if there is a dib at the clipboard. + * \ingroup dib */ +int imDibIsClipboardAvailable(void); + +/** Saves the DIB into a file ".bmp". + * \ingroup dib */ +int imDibSaveFile(const imDib* dib, const char* filename); + +/** Creates a DIB from a file ".bmp". + * \ingroup dib */ +imDib* imDibLoadFile(const char* filename); + +/** Converts a DIB into an RGBA image. alpha is optional. bpp must be >8. \n + * alpha is used only when bpp=32. + * \ingroup dib */ +void imDibDecodeToRGBA(const imDib* dib, unsigned char* red, unsigned char* green, unsigned char* blue, unsigned char* alpha); + +/** Converts a DIB into an indexed image. bpp must be <=8. colors must have room for at least 256 colors. + * colors is rgb packed (RGBRGBRGB...) + * \ingroup dib */ +void imDibDecodeToMap(const imDib* dib, unsigned char* map, long* palette); + +/** Converts an RGBA image into a DIB. alpha is optional. bpp must be >8. \n + * alpha is used only when bpp=32. + * \ingroup dib */ +void imDibEncodeFromRGBA(imDib* dib, const unsigned char* red, const unsigned char* green, const unsigned char* blue, const unsigned char* alpha); + +/** Converts an indexed image into a DIB. bpp must be <=8. \n + * colors is rgb packed (RGBRGBRGB...) + * \ingroup dib */ +void imDibEncodeFromMap(imDib* dib, const unsigned char* map, const long* palette, int palette_count); + +/** Converts a IM_RGB packed image, with or without alpha, into a DIB. + * \ingroup dib */ +void imDibEncodeFromBitmap(imDib* dib, const unsigned char* data); + +/** Converts a DIB into IM_RGB packed image, with or without alpha. + * \ingroup dib */ +void imDibDecodeToBitmap(const imDib* dib, unsigned char* data); + +#ifdef __IM_IMAGE_H +/* You must include "im_image.h" before this header to enable these declarations. */ + +/** Creates a imImage from the dib data. + * \ingroup dib */ +imImage* imDibToImage(const imDib* dib); + +/** Creates a Dib from the image. It must be a bitmap image. + * \ingroup dib */ +imDib* imDibFromImage(const imImage* image); + +#endif + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_file.h b/im/include/im_file.h new file mode 100755 index 0000000..58022eb --- /dev/null +++ b/im/include/im_file.h @@ -0,0 +1,115 @@ +/** \file + * \brief File Access + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_FILE_H +#define __IM_FILE_H + +#include "im.h" + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup filesdk File Format SDK + * \par + * All the file formats are based on theses structures. Use them to create new file formats. \n + * The LineBuffer functions will help transfer image from format buffer to application buffer and vice-versa. + * \par + * See \ref im_file.h + * \ingroup file */ + + +/** \brief Image File Format Base Class (SDK Use Only) + * + * \par + * Base container to hold format independent state variables. + * \ingroup filesdk */ +struct _imFile +{ + int is_new; + void* attrib_table; /**< in fact is a imAttribTable, but we hide this here */ + + void* line_buffer; /**< used for line convertion, contains all components if packed, or only one if not */ + int line_buffer_size; + int line_buffer_extra; /**< extra bytes to be allocated */ + int line_buffer_alloc; /**< total allocated so far */ + int counter; + + int convert_bpp; /**< number of bpp to unpack/pack to/from 1 byte. + When reading converts n packed bits to 1 byte (unpack). If n>1 will also expand to 0-255. + When writing converts 1 byte to 1 bit (pack). + If negative will only expand to 0-255 (no unpack or pack). */ + int switch_type; /**< flag to switch the original data type: char-byte, short-ushort, uint-int, double-float */ + + long palette[256]; + int palette_count; + + int user_color_mode, + user_data_type, + file_color_mode, /* these two must be filled by te driver always. */ + file_data_type; + + /* these must be filled by the driver when reading, + and given by the user when writing. */ + + char compression[10]; + int image_count, + image_index, + width, + height; +}; + + +/* Internal Use only */ + +/* Initializes the imFile structure. + * Used by the special format RAW. */ +void imFileClear(imFile* ifile); + +/* Initializes the line buffer. + * Used by "im_file.cpp" only. */ +void imFileLineBufferInit(imFile* ifile); + +/* Check if the conversion is valid. + * Used by "im_file.cpp" only. */ +int imFileCheckConversion(imFile* ifile); + + +/* File Format SDK */ + +/** Number of lines to be accessed. + * \ingroup filesdk */ +int imFileLineBufferCount(imFile* ifile); + +/** Increments the row and plane counters. + * \ingroup filesdk */ +void imFileLineBufferInc(imFile* ifile, int *row, int *plane); + +/** Converts from FILE color mode to USER color mode. + * \ingroup filesdk */ +void imFileLineBufferRead(imFile* ifile, void* data, int line, int plane); + +/** Converts from USER color mode to FILE color mode. + * \ingroup filesdk */ +void imFileLineBufferWrite(imFile* ifile, const void* data, int line, int plane); + +/** Utility to calculate the line size in byte with a specified alignment. \n + * "align" can be 1, 2 or 4. + * \ingroup filesdk */ +int imFileLineSizeAligned(int width, int bpp, int align); + +/** Set the attributes FileFormat, FileCompression and FileImageCount. \n + * Used in imFileOpen and imFileOpenAs, and after the attribute list cleared with RemoveAll. + * \ingroup filesdk */ +void imFileSetBaseAttributes(imFile* ifile); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_format.h b/im/include/im_format.h new file mode 100755 index 0000000..6ee0473 --- /dev/null +++ b/im/include/im_format.h @@ -0,0 +1,97 @@ +/** \file + * \brief File Format Access + * + * See Copyright Notice in im_lib.h + */ + +#include "im_file.h" +#include "im_attrib.h" + +#ifndef __IM_FORMAT_H +#define __IM_FORMAT_H + + +class imFormat; + +/** \brief Image File Format Virtual Class (SDK Use Only) + * + * \par + * Virtual Base class for file formats. All file formats inherit from this class. + * \ingroup filesdk */ +class imFileFormatBase: public _imFile +{ +public: + const imFormat* iformat; + + imFileFormatBase(const imFormat* _iformat): iformat(_iformat) {} + virtual ~imFileFormatBase() {} + + imAttribTable* AttribTable() {return (imAttribTable*)this->attrib_table;} + + /* Pure Virtual Methods. Every driver must implement all the following methods. */ + + virtual int Open(const char* file_name) = 0; // Must initialize compression and image_count + virtual int New(const char* file_name) = 0; + virtual void Close() = 0; + virtual void* Handle(int index) = 0; + virtual int ReadImageInfo(int index) = 0; // Should update compression + virtual int ReadImageData(void* data) = 0; + virtual int WriteImageInfo() = 0; // Should update compression + virtual int WriteImageData(void* data) = 0; // Must update image_count +}; + +/** \brief Image File Format Descriptor (SDK Use Only) + * + * \par + * All file formats must define these informations. They are stored by \ref imFormatRegister. + * \ingroup filesdk */ +class imFormat +{ +public: + const char* format; + const char* desc; + const char* ext; + const char** comp; + int comp_count, + can_sequence; + + virtual imFileFormatBase* Create() const = 0; + virtual int CanWrite(const char* compression, int color_mode, int data_type) const = 0; + + imFormat(const char* _format, const char* _desc, const char* _ext, + const char** _comp, int _comp_count, int _can_sequence) + :format(_format), desc(_desc), ext(_ext), comp(_comp), + comp_count(_comp_count), can_sequence(_can_sequence) + {} + virtual ~imFormat() {} +}; + +extern "C" +{ + +/* Internal Use only */ + +/* Opens a file with the respective format driver + * Uses the file extension to speed up the search for the format driver. + * Used by "im_file.cpp" only. */ +imFileFormatBase* imFileFormatBaseOpen(const char* file_name, int *error); + +/* Opens a file with the given format + * Used by "im_file.cpp" only. */ +imFileFormatBase* imFileFormatBaseOpenAs(const char* file_name, const char* format, int *error); + +/* Creates a file using the given format driver. + * Used by "im_file.cpp" only. */ +imFileFormatBase* imFileFormatBaseNew(const char* file_name, const char* format, int *error); + + +/* File Format SDK */ + +/** Register a format driver. + * \ingroup filesdk */ +void imFormatRegister(imFormat* iformat); + + +} + +#endif diff --git a/im/include/im_format_all.h b/im/include/im_format_all.h new file mode 100755 index 0000000..8ebe938 --- /dev/null +++ b/im/include/im_format_all.h @@ -0,0 +1,360 @@ +/** \file + * \brief All the Internal File Formats. + * They are all automatically registered by the library. + * The signatures are in C, but the functions are C++. + * Header for internal use only. + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_FORMAT_ALL_H +#define __IM_FORMAT_ALL_H + +#if defined(__cplusplus) +extern "C" { +#endif + +/** \defgroup gif GIF - Graphics Interchange Format + * \section Description + * + * \par + * Copyright (c) 1987,1988,1989,1990 CompuServe Incorporated. \n + * GIF is a Service Mark property of CompuServe Incorporated. \n + * Graphics Interchange Format Programming Reference, 1990. \n + * LZW Copyright Unisys. + * \par + * Patial Internal Implementation. \n + * Decoding and encoding code were extracted from GIFLib 1.0. \n + * Copyright (c) 1989 Gershon Elber. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: MAP only, (Gray and Binary saved as MAP) + Compressions: + LZW - Lempel-Ziv & Welch [default] + Can have more than one image. + No alpha channel. + Internally the lines are arranged from top down to bottom. + + Attributes: + ScreenHeight, ScreenWidth IM_USHORT (1) screen size [default to the first image size] + Interlaced IM_INT (1 | 0) default 0 + Description (string) + TransparencyIndex IM_BYTE (1) + XScreen, YScreen IM_USHORT (1) screen position + UserInput IM_BYTE (1) [1, 0] + Disposal (string) [UNDEF, LEAVE, RBACK, RPREV] + Delay IM_USHORT (1) [time to wait betweed frames in 1/100 of a second] + Iterations IM_USHORT (1) (NETSCAPE2.0 Application Extension) [The number of times to repeat the animation. 0 means to repeat forever. ] + + Comments: + Attributes after the last image are ignored. + Reads GIF87 and GIF89, but writes GIF89 always. + Ignored attributes: Background Color Index, Pixel Aspect Ratio, + Plain Text Extensions, Application Extensions... +\endverbatim + * \ingroup format */ +void imFormatRegisterGIF(void); + +/** \defgroup bmp BMP - Windows Device Independent Bitmap + * \section Description + * + * \par + * Windows Copyright Microsoft Corporation. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: RGB, MAP and Binary (Gray saved as MAP) + Compressions: + NONE - no compression [default] + RLE - Run Lenght Encoding (only for MAP and Gray) + Only one image. + Can have an alpha channel (only for RGB) + Internally the components are always packed. + Lines arranged from top down to bottom or bottom up to top. But are saved always as bottom up. + + Attributes: + ResolutionUnit (string) ["DPC", "DPI"] + XResolution, YResolution IM_FLOAT (1) + + Comments: + Reads OS2 1.x and Windows 3, but writes Windows 3 always. + Version 4 and 5 BMPs are not supported. +\endverbatim + * \ingroup format */ +void imFormatRegisterBMP(void); + +/** \defgroup ras RAS - Sun Raster File + * \section Description + * + * \par + * Copyright Sun Corporation. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: Gray, RGB, MAP and Binary + Compressions: + NONE - no compression [default] + RLE - Run Lenght Encoding + Only one image. + Can have an alpha channel (only for IM_RGB) + Internally the components are always packed. + Internally the lines are arranged from top down to bottom. + + Attributes: + none +\endverbatim + * \ingroup format */ +void imFormatRegisterRAS(void); + +/** \defgroup led LED - IUP image in LED + * \section Description + * + * \par + * Copyright Tecgraf/PUC-Rio and PETROBRAS/CENPES. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: MAP only (Gray and Binary saved as MAP) + Compressions: + NONE - no compression [default] + Only one image. + No alpha channel. + Internally the lines are arranged from top down to bottom. + + Attributes: + none + + Comments: + LED file must start with "LEDImage = IMAGE[". +\endverbatim + * \ingroup format */ +void imFormatRegisterLED(void); + +/** \defgroup sgi SGI - Silicon Graphics Image File Format + * \section Description + * + * \par + * SGI is a trademark of Silicon Graphics, Inc. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte and UShort + Color Spaces: Gray and RGB (Binary saved as Gray, MAP with fixed palette when reading only) + Compressions: + NONE - no compression [default] + RLE - Run Lenght Encoding + Only one image. + Can have an alpha channel (only for IM_RGB) + Internally the components are always packed. + Internally the lines are arranged from bottom up to top. + + Attributes: + Description (string) +\endverbatim + * \ingroup format */ +void imFormatRegisterSGI(void); + +/** \defgroup pcx PCX - ZSoft Picture + * \section Description + * + * \par + * Copyright ZSoft Corporation. \n + * ZSoft (1988) PCX Technical Reference Manual. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: RGB, MAP and Binary (Gray saved as MAP) + Compressions: + NONE - no compression + RLE - Run Lenght Encoding [default - since uncompressed PCX is not well supported] + Only one image. + No alpha channel. + Internally the components are always packed. + Internally the lines are arranged from top down to bottom. + + Attributes: + ResolutionUnit (string) ["DPC", "DPI"] + XResolution, YResolution IM_FLOAT (1) + XScreen, YScreen IM_USHORT (1) screen position + + Comments: + Reads Versions 0-5, but writes Version 5 always. +\endverbatim + * \ingroup format */ +void imFormatRegisterPCX(void); + +/** \defgroup tga TGA - Truevision Graphics Adapter File + * \section Description + * + * \par + * Truevision TGA File Format Specification Version 2.0 \n + * Technical Manual Version 2.2 January, 1991 \n + * Copyright 1989, 1990, 1991 Truevision, Inc. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Supports 8 bits per component only. Data type is always Byte. + Color Spaces: Gray, RGB and MAP (Binary saved as Gray) + Compressions: + NONE - no compression [default] + RLE - Run Lenght Encoding + Only one image. + No alpha channel. + Internally the components are always packed. + Internally the lines are arranged from bottom up to top or from top down to bottom. + + Attributes: + XScreen, YScreen IM_USHORT (1) screen position + Title, Author, Description, JobName, Software (string) + SoftwareVersion (read only) (string) + DateTimeModified (string) [when writing uses the current system time] + Gamma IM_FLOAT (1) +\endverbatim + * \ingroup format */ +void imFormatRegisterTGA(void); + +/** \defgroup pnm PNM - Netpbm Portable Image Map + * \section Description + * + * \par + * PNM formats Copyright Jef Poskanzer + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte and UShort + Color Spaces: Gray, RGB and Binary + Compressions: + NONE - no compression [default] + ASCII (textual data) + Can have more than one image, but sequencial access only. + No alpha channel. + Internally the components are always packed. + Internally the lines are arranged from top down to bottom. + + Attributes: + Description (string) + + Comments: + In fact ASCII is an expansion, not a compression, because the file will be larger than binary data. +\endverbatim + * \ingroup format */ +void imFormatRegisterPNM(void); + +/** \defgroup ico ICO - Windows Icon + * \section Description + * + * \par + * Windows Copyright Microsoft Corporation. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: RGB, MAP and Binary (Gray saved as MAP) + Compressions: + NONE - no compression [default] + Can have more than one image. But writing is limited to 5 images, + and all images must have different sizes and bpp. + Can have an alpha channel (only for RGB) + Internally the components are always packed. + Internally the lines are arranged from bottom up to top. + + Attributes: + TransparencyIndex IM_BYTE (1) + + Comments: + If the user specifies an alpha channel, the AND mask is loaded as alpha if + the file color mode does not contain the IM_ALPHA flag. + For MAP imagens, if the user does not specifies an alpha channel + the TransparencyIndex is used to initialize the AND mask when writing, + and if the user does specifies an alpha channel + the most repeated index with transparency will be the transparent index. + Although any size and common bpp can be used is recomended to use the typical configurations: + 16x16, 32x32, 48x48, 64x64 or 96x96 + 2 colors, 16 colors, 256 colors, 24bpp or 32bpp +\endverbatim + * \ingroup format */ +void imFormatRegisterICO(void); + +/** \defgroup krn KRN - IM Kernel File Format + * \section Description + * + * \par + * Textual format to provied a simple way to create kernel convolution images. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte, Int + Color Spaces: Gray + Compressions: + NONE - no compression [default] + Only one image. + No alpha channel. + Internally the lines are arranged from top down to bottom. + + Attributes: + Description (string) + + Comments: + The format is very simple, inspired by PNM. + It was developed because PNM does not have support for INT and FLOAT. + Remeber that usually convolution operations use kernel size an odd number. + + Format Model: + IMKERNEL + Description up to 512 characters + width height + type (0 - IM_INT, 1 - IM_FLOAT) + data... + + Example: + IMKERNEL + Gradian + 3 3 + 0 + 0 -1 0 + 0 1 0 + 0 0 0 +\endverbatim + * \ingroup format */ +void imFormatRegisterKRN(void); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_format_avi.h b/im/include/im_format_avi.h new file mode 100755 index 0000000..535aa37 --- /dev/null +++ b/im/include/im_format_avi.h @@ -0,0 +1,88 @@ +/** \file + * \brief Register the AVI Format + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_FORMAT_AVI_H +#define __IM_FORMAT_AVI_H + +#if defined(__cplusplus) +extern "C" { +#endif + +/** \defgroup avi AVI - Windows Audio-Video Interleaved RIFF + * \section Description + * + * \par + * Windows Copyright Microsoft Corporation. + * \par + * Access to the AVI format uses Windows AVIFile library. Available in Windows Only. \n + * When writing a new file you must use an ".avi" extension, or the Windows API will fail. \n + * You must link the application with "im_avi.lib" + * and you must call the function \ref imFormatRegisterAVI once + * to register the format into the IM core library. + * In Lua call require"imlua_avi". \n + * Depends also on the VFW library (vfw32.lib). + * When using the "im_avi.dll" this extra library is not necessary. \n + * If using Cygwin or MingW must link with "-lvfw32". + * Old versions of Cygwin and MingW use the "-lvfw_ms32" and "-lvfw_avi32". + * \par + * See \ref im_format_avi.h + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: RGB, MAP and Binary (Gray saved as MAP) + Compressions (installed in Windows XP by default): + NONE - no compression [default] + RLE - Microsoft RLE (8bpp only) + CINEPACK - Cinepak Codec by Radius + MSVC - Microsoft Video 1 (old) + M261 - Microsoft H.261 Video Codec + M263 - Microsoft H.263 Video Codec + I420 - Intel 4:2:0 Video Codec (same as M263) + IV32 - Intel Indeo Video Codec 3.2 (old) + IV41 - Intel Indeo Video Codec 4.5 (old) + IV50 - Intel Indeo Video 5.1 + IYUV - Intel IYUV Codec + MPG4 - Microsoft MPEG-4 Video Codec V1 (not MPEG-4 compliant) (old) + MP42 - Microsoft MPEG-4 Video Codec V2 (not MPEG-4 compliant) + CUSTOM - (show compression dialog) + DIVX - DivX 5.0.4 Codec (DivX must be installed) + (others, must be the 4 charaters of the fourfcc code) + Can have more than one image. + Can have an alpha channel (only for RGB) + Internally the components are always packed. + Lines arranged from top down to bottom or bottom up to top. But are saved always as bottom up. + Handle(0) returns NULL. imBinFile is not supported. + Handle(1) returns PAVIFILE. + Handle(2) returns PAVISTREAM. + + Attributes: + FPS IM_FLOAT (1) (should set when writing, default 15) + AVIQuality IM_INT (1) [1-10000, default -1] (write only) [unsed if compression=CUSTOM] + KeyFrameRate IM_INT (1) (write only) [key frame frequency, if 0 not using key frames, default 15, unsed if compression=CUSTOM] + DataRate IM_INT (1) (write only) [kilobits/second, default 2400, unsed if compression=CUSTOM] + + Comments: + Reads only the first video stream. Other streams are ignored. + All the images have the same size, you must call imFileReadImageInfo/imFileWriteImageInfo + at least once. + For codecs comparsion and download go to: + http://graphics.lcs.mit.edu/~tbuehler/video/codecs/ + http://www.fourcc.org +\endverbatim + * \ingroup format */ + +/** Register the AVI Format. \n + * In Lua, when using require"imlua_avi" this function will be automatically called. + * \ingroup avi */ +void imFormatRegisterAVI(void); + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_format_ecw.h b/im/include/im_format_ecw.h new file mode 100755 index 0000000..c9e91a3 --- /dev/null +++ b/im/include/im_format_ecw.h @@ -0,0 +1,93 @@ +/** \file + * \brief Register the ECW Format + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_FORMAT_ECW_H +#define __IM_FORMAT_ECW_H + +#if defined(__cplusplus) +extern "C" { +#endif + +/** \defgroup ecw ECW - ECW JPEG 2000 + * \section Description + * + * \par + * ECW JPEG 2000 Copyright 1998 Earth Resource Mapping Ltd. + * Two formats are supported with this module. The ECW (Enhanced Compression Wavelet) format and the ISO JPEG 2000 format. + * \par + * Access to the ECW format uses the ECW JPEG 2000 SDK version 3.3. + * Available in Windows, Linux and Solaris Only. But source code is also available. \n + * You must link the application with "im_ecw.lib" + * and you must call the function \ref imFormatRegisterECW once + * to register the format into the IM core library. \n + * Depends also on the ECW JPEG 2000 SDK libraries (NCSEcw.lib). + * \par + * When using other JPEG 2000 libraries the first registered library will be used to guess the file format. + * Use the extension *.ecw to shortcut to this implementation of the JPEG 2000 format. + * \par + * See \ref im_format_ecw.h + * \par + * \par + * http://www.ermapper.com/ecw/ \n + * The three types of licenses available for the ECW JPEG 2000 SDK are as follows: +\verbatim + - ECW JPEG 2000 SDK Free Use License Agreement - This license governs the free use of + the ECW JPEG 2000 SDK with Unlimited Decompression and Limited Compression (Less + than 500MB). + - ECW JPEG 2000 SDK Public Use License Agreement - This license governs the use of the + ECW SDK with Unlimited Decompression and Unlimited Compression for applications + licensed under a GNU General Public style license. + - ECW JPEG 2000 SDK Commercial Use License Agreement - This license governs the use + of the ECW JPEG 2000 SDK with Unlimited Decompression and Unlimited Compression + for commercial applications. +\endverbatim + * + * \section Features + * +\verbatim + Data Types: Byte, UShort, Float + Color Spaces: BINARY, GRAY, RGB, YCBCR + Compressions: + ECW - Enhanced Compression Wavelet + JPEG-2000 - ISO JPEG 2000 + Only one image. + Can have an alpha channel + Internally the components are always packed. + Lines arranged from top down to bottom. + Handle() returns NCSFileView* when reading, NCSEcwCompressClient* when writing. + + Attributes: + CompressionRatio IM_FLOAT (1) [example: Ratio=7 just like 7:1] + OriginX, OriginY IM_FLOAT (1) + Rotation IM_FLOAT (1) + CellIncrementX, CellIncrementY IM_FLOAT (1) + CellUnits (string) + Datum (string) + Projection (string) + ViewWidth, ViewHeight IM_INT (1) [view zoom] + ViewXmin, ViewYmin, ViewXmax, ViewYmax IM_INT (1) [view limits] + MultiBandCount IM_USHORT (1) [Number of bands in a multiband gray image.] + MultiBandSelect IM_USHORT (1) [Band number to read one band of a multiband gray image. Must be set before reading image info.] + + Comments: + Only read support is implemented. + To read a region of the image you must set the View* attributes before reading the image data. + After reading a partial image the width and height returned in ReadImageInfo is the view size. + The view limits define the region to be read. + The view size is the actual size of the image, so the result can be zoomed. +\endverbatim + * \ingroup format */ + +/** Register the ECW Format + * \ingroup ecw */ +void imFormatRegisterECW(void); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_format_jp2.h b/im/include/im_format_jp2.h new file mode 100755 index 0000000..5a8cd73 --- /dev/null +++ b/im/include/im_format_jp2.h @@ -0,0 +1,79 @@ +/** \file + * \brief Register the JP2 Format + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_FORMAT_JP2_H +#define __IM_FORMAT_JP2_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup jp2 JP2 - JPEG-2000 JP2 File Format + * \section Description + * + * \par + * ISO/IEC 15444 (2000, 2003)\n + * http://www.jpeg.org/ + * \par + * You must link the application with "im_jp2.lib" + * and you must call the function \ref imFormatRegisterJP2 once + * to register the format into the IM core library. + * In Lua call require"imlua_jp2". \n + * \par + * Access to the JPEG2000 file format uses libJasper version 1.900.1 \n + * http://www.ece.uvic.ca/~mdadams/jasper \n + * Copyright (c) 2001-2006 Michael David Adams. \n + * and GeoJasPer 1.4.0 \n + * Copyright (c) 2003-2007 Dmitry V. Fedorov. \n + * http://www.dimin.net/software/geojasper/ \n + * + * \par + * See \ref im_format_jp2.h + * + * \section Features + * +\verbatim + Data Types: Byte and UShort + Color Spaces: Binary, Gray, RGB, YCbCr, Lab and XYZ + Compressions: + JPEG-2000 - ISO JPEG 2000 [default] + Only one image. + Can have an alpha channel. + Internally the components are always unpacked. + Internally the lines are arranged from top down to bottom. + Handle(1) returns jas_image_t* + Handle(2) returns jas_stream_t* + + Attributes: + CompressionRatio IM_FLOAT (1) [write only, example: Ratio=7 just like 7:1] + GeoTIFFBox IM_BYTE (n) + XMLPacket IM_BYTE (n) + + Comments: + We read code stream syntax and JP2, but we write always as JP2. + Used definitions EXCLUDE_JPG_SUPPORT,EXCLUDE_MIF_SUPPORT, + EXCLUDE_PNM_SUPPORT,EXCLUDE_RAS_SUPPORT, + EXCLUDE_BMP_SUPPORT,EXCLUDE_PGX_SUPPORT + Changed jas_config.h to match our needs. + New file jas_binfile.c + Changed base/jas_stream.c to export jas_stream_create and jas_stream_initbuf. + Changed jp2/jp2_dec.c and jpc/jpc_cs.c to remove "uint" and "ulong" usage. + The counter is restarted many times, because it has many phases. +\endverbatim + * \ingroup format */ + +/** Register the JP2 Format. \n + * In Lua, when using require"imlua_jp2" this function will be automatically called. + * \ingroup jp2 */ +void imFormatRegisterJP2(void); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_format_raw.h b/im/include/im_format_raw.h new file mode 100755 index 0000000..4600271 --- /dev/null +++ b/im/include/im_format_raw.h @@ -0,0 +1,74 @@ +/** \file + * \brief Initialize the RAW Format Driver + * Header for internal use only. + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_FORMAT_RAW_H +#define __IM_FORMAT_RAW_H + +#if defined(__cplusplus) +extern "C" { +#endif + +/** \defgroup raw RAW - RAW File + * + * \par + * The file must be open/created with the functions \ref imFileOpenRaw and \ref imFileNewRaw. + * + * \section Description + * + * \par + * Internal Implementation. + * \par + * Supports RAW binary images. This is an unstructured and uncompressed binary data. + * It is NOT a Camera RAW file generated in many professional digital cameras. \n + * You must know image parameters a priori and must set the IM_INT attributes "Width", "Height", "ColorMode", "DataType" + * before the imFileReadImageInfo/imFileWriteImageInfo functions. + * \par + * The data must be in binary form, but can start in an arbitrary offset from the begining of the file, use attribute "StartOffset". + * The default is at 0 offset. + * \par + * Integer sign and double precision can be converted using attribute "SwitchType". \n + * The conversions will be BYTE<->CHAR, USHORT<->SHORT, INT<->UINT, FLOAT<->DOUBLE. + * \par + * Byte Order can be Little Endian (Intel=1) or Big Endian (Motorola=0), use the attribute "ByteOrder", the default is the current CPU. + * \par + * The lines can be aligned to a BYTE (1), WORD (2) or DWORD (4) boundaries, ue attribute "Padding" with the respective value. + * \par + * If the compression is ASCII the data is stored in textual format, instead of binary. + * In this case SwitchType and ByteOrder are ignored, and Padding should be 0. + * \par + * See \ref im_raw.h + * + * \section Features + * +\verbatim + Data Types: + Color Spaces: all, except MAP. + Compressions: + NONE - no compression [default] + ASCII (textual data) + Can have more than one image, depends on "StartOffset" attribute. + Can have an alpha channel. + Components can be packed or not. + Lines arranged from top down to bottom or bottom up to top. + + Attributes: + Width, Height, ColorMode, DataType IM_INT (1) + ImageCount[1], StartOffset[0], SwitchType[FALSE], ByteOrder[IM_LITTLEENDIAN], Padding[0] IM_INT (1) + + Comments: + In fact ASCII is an expansion, not a compression, because the file will be larger than binary data. +\endverbatim + * \ingroup format */ +imFormat* imFormatInitRAW(void); + +void imFormatFinishRAW(void); + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_format_wmv.h b/im/include/im_format_wmv.h new file mode 100755 index 0000000..b60d4c4 --- /dev/null +++ b/im/include/im_format_wmv.h @@ -0,0 +1,101 @@ +/** \file + * \brief Register the WMF Format + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_FORMAT_WMV_H +#define __IM_FORMAT_WMV_H + +#if defined(__cplusplus) +extern "C" { +#endif + +/** \defgroup wmv WMV - Windows Media Video Format + * \section Description + * + * \par + * Advanced Systems Format (ASF) \n + * Windows Copyright Microsoft Corporation. + * \par + * Access to the WMV format uses Windows Media SDK. Available in Windows Only. \n + * You must link the application with "im_wmv.lib" + * and you must call the function \ref imFormatRegisterWMV once + * to register the format into the IM core library. + * In Lua call require"imlua_wmv". \n + * Depends also on the WMF SDK (wmvcore.lib). + * When using the "im_wmv.dll" this extra library is not necessary. + * \par + * The application users should have the WMV codec 9 installed: + * http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx + * \par + * You must agree with the WMF SDK EULA to use the SDK. \n + * http://wmlicense.smdisp.net/v9sdk/ + * \par + * For more information: \n + * http://www.microsoft.com/windows/windowsmedia/9series/sdk.aspx \n + * http://msdn.microsoft.com/library/en-us/wmform/htm/introducingwindowsmediaformat.asp + * \par + * See \ref im_format_wmv.h + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: RGB and MAP (Gray and Binary saved as MAP) + Compressions (installed in Windows XP by default): + NONE - no compression + MPEG-4v3 - Windows Media MPEG-4 Video V3 + MPEG-4v1 - ISO MPEG-4 Video V1 + WMV7 - Windows Media Video V7 + WMV7Screen - Windows Media Screen V7 + WMV8 - Windows Media Video V8 + WMV9Screen - Windows Media Video 9 Screen + WMV9 - Windows Media Video 9 [default] + Unknown - Others + Can have more than one image. + Can have an alpha channel (only for RGB) ? + Internally the components are always packed. + Lines arranged from top down to bottom or bottom up to top. + Handle(0) return NULL. imBinFile is not supported. + Handle(1) returns IWMSyncReader* when reading, IWMWriter* when writing. + + Attributes: + FPS IM_FLOAT (1) (should set when writing, default 15) + WMFQuality IM_INT (1) [0-100, default 50] (write only) + MaxKeyFrameTime IM_INT (1) (write only) [maximum key frame interval in miliseconds, default 5 seconds] + DataRate IM_INT (1) (write only) [kilobits/second, default 2400] + VBR IM_INT (1) [0, 1] (write only) [0 - Constant Bit Rate (default), 1 - Variable Bit Rate (Quality-Based)] + (and several others from the file-level attributes) For ex: + Title, Author, Copyright, Description (string) + Duration IM_INT [100-nanosecond units] + Seekable, HasAudio, HasVideo, Is_Protected, Is_Trusted, IsVBR IM_INT (1) [0, 1] + NumberOfFrames IM_INT (1) + + Comments: + IMPORTANT - The "image_count" and the "FPS" attribute may not be available from the file, + we try to estimate from the duration and from the average time between frames, or using the default value. + We do not handle DRM protected files (Digital Rights Management). + Reads only the first video stream. Other streams are ignored. + All the images have the same size, you must call imFileReadImageInfo/imFileWriteImageInfo + at least once. + For optimal random reading, the file should be indexed previously. + If not indexed by frame, random positioning may not be precise. + Sequencial reading will always be precise. + When writing we use a custom profile and time indexing only. + We do not support multipass encoding. + Since the driver uses COM, CoInitialize(NULL) and CoUninitialize() are called every Open/Close. +\endverbatim + * \ingroup format */ + +/** Register the WMF Format. \n + * In Lua, when using require"imlua_wmv" this function will be automatically called. + * \ingroup wmv */ +void imFormatRegisterWMV(void); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_image.h b/im/include/im_image.h new file mode 100755 index 0000000..12dbad8 --- /dev/null +++ b/im/include/im_image.h @@ -0,0 +1,411 @@ +/** \file + * \brief Image Manipulation + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_IMAGE_H +#define __IM_IMAGE_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup imgclass imImage + * + * \par + * Base definitions and functions for image representation. \n + * Only the image processing operations depends on these definitions, + * Image Storage and Image Capture are completely independent. + * \par + * You can also initialize a structure with your own memory buffer, see \ref imImageInit. + * To release the structure without releasing the buffer, + * set "data[0]" to NULL before calling imImageDestroy. + * \par + * See \ref im_image.h + * \ingroup imagerep */ + + + +/** \brief imImage Structure Definition. + * + * \par + * An image representation than supports all the color spaces, + * but planes are always unpacked and the orientation is always bottom up. + * \ingroup imgclass */ +typedef struct _imImage +{ + /* main parameters */ + int width; /**< Number of columns. image:Width() -> width: number [in Lua 5]. */ + int height; /**< Number of lines. image:Height() -> height: number [in Lua 5]. */ + int color_space; /**< Color space descriptor. See also \ref imColorSpace. image:ColorSpace() -> color_space: number [in Lua 5]. */ + int data_type; /**< Data type descriptor. See also \ref imDataType. image:DataType() -> data_type: number [in Lua 5]. */ + int has_alpha; /**< Indicates that there is an extra channel with alpha. image:HasAlpha() -> has_alpha: number [in Lua 5]. \n + It will not affect the secondary parameters, i.e. the number of planes will be in fact depth+1. \n + It is always 0 unless imImageAddAlpha is called, this is done in image load functions. */ + + /* secondary parameters */ + int depth; /**< Number of planes (ColorSpaceDepth) */ + int line_size; /**< Number of bytes per line in one plane (width * DataTypeSize) */ + int plane_size; /**< Number of bytes per plane. (line_size * height) */ + int size; /**< Number of bytes occupied by the image (plane_size * depth) */ + int count; /**< Number of pixels (width * height) */ + + /* image data */ + void** data; /**< Image data organized as a 2D matrix with several planes. \n + But plane 0 is also a pointer to the full data. \n + The remaining planes are: data[i] = data[0] + i*plane_size \n + In Lua, data indexing is possible using: image[plane][row][column] */ + + /* image attributes */ + long *palette; /**< Color palette. image:GetPalette() -> palette: imPalette [in Lua 5]. \n + Used when depth=1. Otherwise is NULL. */ + int palette_count; /**< The palette is always 256 colors allocated, but can have less colors used. */ + + void* attrib_table; /**< in fact is an imAttribTable, but we hide this here */ +} imImage; + + +/** Creates a new image. + * See also \ref imDataType and \ref imColorSpace. Image data is cleared as \ref imImageClear. \n + * In Lua the IM image metatable name is "imImage". + * When converted to a string will return "imImage(%p) [width=%d,height=%d,color_space=%s,data_type=%s,depth=%d]" where %p is replaced by the userdata address, + * and other values are replaced by the respective attributes. + * If the image is already destroyed by im.ImageDestroy, then it will return also the suffix "-destroyed". + * + * \verbatim im.ImageCreate(width: number, height: number, color_space: number, data_type: number) -> image: imImage [in Lua 5] \endverbatim + * \ingroup imgclass */ +imImage* imImageCreate(int width, int height, int color_space, int data_type); + +/** Initializes the image structure but does not allocates image data. + * See also \ref imDataType and \ref imColorSpace. + * \ingroup imgclass */ +imImage* imImageInit(int width, int height, int color_space, int data_type, void* data_buffer, long* palette, int palette_count); + +/** Creates a new image based on an existing one. \n + * If the addicional parameters are -1, the given image parameters are used. \n + * The image atributes always are copied. HasAlpha is copied. + * See also \ref imDataType and \ref imColorSpace. + * + * \verbatim im.ImageCreateBased(image: imImage, [width: number], [height: number], [color_space: number], [data_type: number]) -> image: imImage [in Lua 5] \endverbatim + * The addicional parameters in Lua can be nil, + * and they can also be functions with the based image as a parameter to return the respective value. + * \ingroup imgclass */ +imImage* imImageCreateBased(const imImage* image, int width, int height, int color_space, int data_type); + +/** Destroys the image and frees the memory used. + * image data is destroyed only if its data[0] is not NULL. \n + * In Lua if this function is not called, the image is destroyed by the garbage collector. + * + * \verbatim im.ImageDestroy(image: imImage) [in Lua 5] \endverbatim + * \verbatim image:Destroy() [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageDestroy(imImage* image); + +/** Adds an alpha channel plane. + * + * \verbatim image:AddAlpha() [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageAddAlpha(imImage* image); + +/** Changes the buffer size. Reallocate internal buffers if the new size is larger than the original. + * + * \verbatim image:Reshape(width: number, height: number) [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageReshape(imImage* image, int width, int height); + +/** Copy image data and attributes from one image to another. \n + * Images must have the same size and type. + * + * \verbatim image:Copy(dst_image: imImage) [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageCopy(const imImage* src_image, imImage* dst_image); + +/** Copy image data only fom one image to another. \n + * Images must have the same size and type. + * + * \verbatim image:CopyData(dst_image: imImage) [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageCopyData(const imImage* src_image, imImage* dst_image); + +/** Creates a copy of the image. + * + * \verbatim image:Duplicate() -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup imgclass */ +imImage* imImageDuplicate(const imImage* image); + +/** Creates a clone of the image. i.e. same attributes but ignore contents. + * + * \verbatim image:Clone() -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup imgclass */ +imImage* imImageClone(const imImage* image); + +/** Changes an extended attribute. \n + * The data will be internally duplicated. \n + * If data is NULL and count==0 the attribute is removed. \n + * If count is -1 and data_type is IM_BYTE then data is zero terminated. + * See also \ref imDataType. + * + * \verbatim image:SetAttribute(attrib: string, data_type: number, data: table of numbers or string) [in Lua 5] \endverbatim + * If data_type is IM_BYTE, as_string can be used as data. + * \ingroup imgclass */ +void imImageSetAttribute(const imImage* image, const char* attrib, int data_type, int count, const void* data); + +/** Returns an extended attribute. \n + * Returns NULL if not found. + * See also \ref imDataType. + * + * \verbatim image:GetAttribute(attrib: string, [as_string: boolean]) -> data: table of numbers or string, data_type: number [in Lua 5] \endverbatim + * If data_type is IM_BYTE, as_string can be used to return a string instead of a table. + * \ingroup imgclass */ +const void* imImageGetAttribute(const imImage* image, const char* attrib, int *data_type, int *count); + +/** Returns a list of the attribute names. \n + * "attrib" must contain room enough for "attrib_count" names. Use "attrib=NULL" to return only the count. + * + * \verbatim image:GetAttributeList() -> data: table of strings [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageGetAttributeList(const imImage* image, char** attrib, int *attrib_count); + +/** Sets all image data to zero. But if color space is YCBCR, LAB or LUV, and data type is BYTE or USHORT, then + * data is initialized with 128 or 32768 accordingly. Alpha is initialized as transparent (0). + * + * \verbatim image:Clear() [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageClear(imImage* image); + +/** Indicates that the image can be viewed in common graphic devices. + * Data type must be IM_BYTE. Color mode can be IM_RGB, IM_MAP, IM_GRAY or IM_BINARY. + * + * \verbatim image:IsBitmap() -> is_bitmap: boolean [in Lua 5] \endverbatim + * \ingroup imgclass */ +int imImageIsBitmap(const imImage* image); + +/** Changes the image palette. + * This will destroy the existing palette and replace it with the given palette pointer. + * Only the pointer is stored, so the palette should be a new palette and it can not be a static array. + * + * \verbatim image:SetPalette(palette: imPalette) [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageSetPalette(imImage* image, long* palette, int palette_count); + +/** Copies the image attributes from src to dst. + * + * \verbatim image:CopyAttributes(dst_image: imImage) [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageCopyAttributes(const imImage* src_image, imImage* dst_image); + +/** Returns 1 if the images match width and height. Returns 0 otherwise. + * + * \verbatim image:MatchSize(image2: imImage) -> match: boolean [in Lua 5] \endverbatim + * \ingroup imgclass */ +int imImageMatchSize(const imImage* image1, const imImage* image2); + +/** Returns 1 if the images match color mode and data type. Returns 0 otherwise. + * + * \verbatim image:MatchColor(image2: imImage) -> match: boolean [in Lua 5] \endverbatim + * \ingroup imgclass */ +int imImageMatchColor(const imImage* image1, const imImage* image2); + +/** Returns 1 if the images match width, height and data type. Returns 0 otherwise. + * + * \verbatim image:MatchDataType(image2: imImage) -> match: boolean [in Lua 5] \endverbatim + * \ingroup imgclass */ +int imImageMatchDataType(const imImage* image1, const imImage* image2); + +/** Returns 1 if the images match width, height and color space. Returns 0 otherwise. + * + * \verbatim image:MatchColorSpace(image2: imImage) -> match: boolean [in Lua 5] \endverbatim + * \ingroup imgclass */ +int imImageMatchColorSpace(const imImage* image1, const imImage* image2); + +/** Returns 1 if the images match in width, height, data type and color space. Returns 0 otherwise. + * + * \verbatim image:Match(image2: imImage) -> match: boolean [in Lua 5] \endverbatim + * \ingroup imgclass */ +int imImageMatch(const imImage* image1, const imImage* image2); + +/** Changes the image color space from gray to binary by just changing color_space and the palette. + * + * \verbatim image:SetBinary() [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageSetBinary(imImage* image); + +/** Changes a gray BYTE data (0,255) into a binary data (0,1), done in-place. Color space is not changed. + * + * \verbatim image:MakeBinary() [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageMakeBinary(imImage *image); + +/** Changes a binary data (0,1) into a gray BYTE data (0,255), done in-place. Color space is not changed. + * + * \verbatim image:MakeGray() [in Lua 5] \endverbatim + * \ingroup imgclass */ +void imImageMakeGray(imImage *image); + + + +/** \defgroup imgfile imImage Storage + * + * \par + * Functions to simplify the process of reading and writting imImage structures. + * Will also load and save the alpha planes when possible. + * \par + * See \ref im_image.h + * \ingroup file */ + + +/** Loads an image from an already open file. Returns NULL if failed. \n + * This will call \ref imFileReadImageInfo and \ref imFileReadImageData. \n + * index specifies the image number between 0 and image_count-1. \n + * The returned image will be of the same color_space and data_type of the image in the file. \n + * Attributes from the file will be stored at the image. + * See also \ref imErrorCodes. + * + * \verbatim ifile:LoadImage([index: number]) -> image: imImage, error: number [in Lua 5] \endverbatim + * Default index is 0. + * \ingroup imgfile */ +imImage* imFileLoadImage(imFile* ifile, int index, int *error); + +/** Loads an image from an already open file. Returns NULL if failed. \n + * This function assumes that the image in the file has the same parameters as the given image. \n + * This will call \ref imFileReadImageInfo and \ref imFileReadImageData. \n + * index specifies the image number between 0 and image_count-1. \n + * The returned image will be of the same color_space and data_type of the image in the file. \n + * Attributes from the file will be stored at the image. + * See also \ref imErrorCodes. + * + * \verbatim ifile:LoadImageFrame(index: number, image: imImage) -> error: number [in Lua 5] \endverbatim + * Default index is 0. + * \ingroup imgfile */ +void imFileLoadImageFrame(imFile* ifile, int index, imImage* image, int *error); + +/** Loads an image from an already open file, but forces the image to be a bitmap.\n + * The returned imagem will be always a Bitmap image, with color_space RGB, MAP, GRAY or BINARY, and data_type IM_BYTE. \n + * index specifies the image number between 0 and image_count-1. \n + * Returns NULL if failed. + * Attributes from the file will be stored at the image. + * See also \ref imErrorCodes. + * + * \verbatim ifile:LoadBitmap([index: number]) -> image: imImage, error: number [in Lua 5] \endverbatim + * Default index is 0. + * \ingroup imgfile */ +imImage* imFileLoadBitmap(imFile* ifile, int index, int *error); + +/** Loads an image region from an already open file. Returns NULL if failed. \n + * This will call \ref imFileReadImageInfo and \ref imFileReadImageData. \n + * index specifies the image number between 0 and image_count-1. \n + * The returned image will be of the same color_space and data_type of the image in the file, + * or will be a Bitmap image. \n + * Attributes from the file will be stored at the image. + * See also \ref imErrorCodes. \n + * For now, it works only for the ECW file format. + * + * \verbatim ifile:LoadRegion(index, bitmap, xmin, xmax, ymin, ymax, width, height: number) -> image: imImage, error: number [in Lua 5] \endverbatim + * Default index is 0. + * \ingroup imgfile */ +imImage* imFileLoadImageRegion(imFile* ifile, int index, int bitmap, int *error, + int xmin, int xmax, int ymin, int ymax, int width, int height); + +/** Loads an image from an already open file, but forces the image to be a bitmap.\n + * This function assumes that the image in the file has the same parameters as the given image. \n + * The imagem must be a Bitmap image, with color_space RGB, MAP, GRAY or BINARY, and data_type IM_BYTE. \n + * index specifies the image number between 0 and image_count-1. \n + * Returns NULL if failed. + * Attributes from the file will be stored at the image. + * See also \ref imErrorCodes. + * + * \verbatim ifile:LoadBitmapFrame(index: number, image: imImage) -> error: number [in Lua 5] \endverbatim + * Default index is 0. + * \ingroup imgfile */ +void imFileLoadBitmapFrame(imFile* ifile, int index, imImage* image, int *error); + +/** Saves the image to an already open file. \n + * This will call \ref imFileWriteImageInfo and \ref imFileWriteImageData. \n + * Attributes from the image will be stored at the file. + * Returns error code. + * + * \verbatim ifile:SaveImage(image: imImage) -> error: number [in Lua 5] \endverbatim + * \ingroup imgfile */ +int imFileSaveImage(imFile* ifile, const imImage* image); + +/** Loads an image from file. Open, loads and closes the file. \n + * index specifies the image number between 0 and image_count-1. \n + * Returns NULL if failed. + * Attributes from the file will be stored at the image. + * See also \ref imErrorCodes. + * + * \verbatim im.FileImageLoad(file_name: string, [index: number]) -> image: imImage, error: number [in Lua 5] \endverbatim + * Default index is 0. + * \ingroup imgfile */ +imImage* imFileImageLoad(const char* file_name, int index, int *error); + +/** Loads an image from file, but forces the image to be a bitmap. Open, loads and closes the file. \n + * index specifies the image number between 0 and image_count-1. \n + * Returns NULL if failed. + * Attributes from the file will be stored at the image. + * See also \ref imErrorCodes. + * + * \verbatim im.FileImageLoadBitmap(file_name: string, [index: number]) -> image: imImage, error: number [in Lua 5] \endverbatim + * Default index is 0. + * \ingroup imgfile */ +imImage* imFileImageLoadBitmap(const char* file_name, int index, int *error); + +/** Loads an image region from file. Open, loads and closes the file. \n + * index specifies the image number between 0 and image_count-1. \n + * Returns NULL if failed. + * Attributes from the file will be stored at the image. + * See also \ref imErrorCodes. \n + * For now, it works only for the ECW file format. + * + * \verbatim im.FileImageLoadRegion(file_name: string, index, bitmap, xmin, xmax, ymin, ymax, width, height: number, ) -> image: imImage, error: number [in Lua 5] \endverbatim + * Default index is 0. + * \ingroup imgfile */ +imImage* imFileImageLoadRegion(const char* file_name, int index, int bitmap, int *error, + int xmin, int xmax, int ymin, int ymax, int width, int height); + +/** Saves the image to file. Open, saves and closes the file. \n + * Returns error code. \n + * Attributes from the image will be stored at the file. + * + * \verbatim im.FileImageSave(file_name: string, format: string, image: imImage) -> error: number [in Lua 5] \endverbatim + * \verbatim image:Save(file_name: string, format: string) -> error: number [in Lua 5] \endverbatim + * \ingroup imgfile */ +int imFileImageSave(const char* file_name, const char* format, const imImage* image); + + + +/** Utility macro to draw the image in a CD library canvas. + * Works only for data_type IM_BYTE, and color spaces: IM_RGB, IM_MAP, IMGRAY and IM_BINARY. + * \ingroup imgclass */ +#define imcdCanvasPutImage(_canvas, _image, _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax) \ + { \ + if (_image->color_space == IM_RGB) \ + { \ + if (_image->has_alpha) \ + cdCanvasPutImageRectRGBA(_canvas, _image->width, _image->height, \ + (unsigned char*)_image->data[0], \ + (unsigned char*)_image->data[1], \ + (unsigned char*)_image->data[2], \ + (unsigned char*)_image->data[3], \ + _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \ + else \ + cdCanvasPutImageRectRGB(_canvas, _image->width, _image->height, \ + (unsigned char*)_image->data[0], \ + (unsigned char*)_image->data[1], \ + (unsigned char*)_image->data[2], \ + _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \ + } \ + else \ + cdCanvasPutImageRectMap(_canvas, _image->width, _image->height, \ + (unsigned char*)_image->data[0], _image->palette, \ + _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \ + } + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_kernel.h b/im/include/im_kernel.h new file mode 100755 index 0000000..db066d8 --- /dev/null +++ b/im/include/im_kernel.h @@ -0,0 +1,315 @@ +/** \file + * \brief Kernel Generators + * Creates several known kernels + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_KERNEL_H +#define __IM_KERNEL_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup kernel Kernel Generators + * \par + * Creates several known kernels + * \par + * See \ref im_kernel.h + * \ingroup convolve */ + + +/** Creates a kernel with the following values: + * +\verbatim + 1 2 1 + 0 0 0 + -1 -2 -1 +\endverbatim + * + * \verbatim im.KernelSobel() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelSobel(void); + +/** Creates a kernel with the following values: + * +\verbatim + 1 1 1 + 0 0 0 + -1 -1 -1 +\endverbatim + * + * \verbatim im.KernelPrewitt() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelPrewitt(void); + +/** Creates a kernel with the following values: + * +\verbatim + 5 5 5 + -3 0 -3 + -3 -3 -3 +\endverbatim + * + * \verbatim im.KernelKirsh() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelKirsh(void); + +/** Creates a kernel with the following values: + * +\verbatim + 0 -1 0 + -1 4 -1 + 0 -1 0 +\endverbatim + * + * \verbatim im.KernelLaplacian4() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelLaplacian4(void); + +/** Creates a kernel with the following values: + * +\verbatim + -1 -1 -1 + -1 8 -1 + -1 -1 -1 +\endverbatim + * + * \verbatim im.KernelLaplacian8() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelLaplacian8(void); + +/** Creates a kernel with the following values: + * +\verbatim + 0 -1 -1 -1 0 + -1 0 1 0 -1 + -1 1 8 1 -1 + -1 0 1 0 -1 + 0 -1 -1 -1 0 +\endverbatim + * + * \verbatim im.KernelLaplacian5x5() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelLaplacian5x5(void); + +/** Creates a kernel with the following values: + * +\verbatim + -1 -1 -1 -1 -1 -1 -1 + -1 -1 -1 -1 -1 -1 -1 + -1 -1 -1 -1 -1 -1 -1 + -1 -1 -1 48 -1 -1 -1 + -1 -1 -1 -1 -1 -1 -1 + -1 -1 -1 -1 -1 -1 -1 + -1 -1 -1 -1 -1 -1 -1 +\endverbatim + * + * \verbatim im.KernelLaplacian7x7() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelLaplacian7x7(void); + +/** Creates a kernel with the following values: + * +\verbatim + 0 -1 0 + 0 1 0 + 0 0 0 +\endverbatim + * + * \verbatim im.KernelGradian3x3() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelGradian3x3(void); + +/** Creates a kernel with the following values: + * +\verbatim + 0 -1 -1 0 1 1 0 + -1 -2 -2 0 2 2 1 + -1 -2 -3 0 3 2 1 + -1 -2 -3 0 3 2 1 + -1 -2 -3 0 3 2 1 + -1 -2 -2 0 2 2 1 + 0 -1 -1 0 1 1 0 +\endverbatim + * + * \verbatim im.KernelGradian7x7() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelGradian7x7(void); + +/** Creates a kernel with the following values: + * +\verbatim + -1 0 0 + 0 0 0 + 0 0 1 +\endverbatim + * + * \verbatim im.KernelSculpt() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelSculpt(void); + +/** Creates a kernel with the following values: + * +\verbatim + 1 1 1 + 1 1 1 + 1 1 1 +\endverbatim + * + * \verbatim im.KernelMean3x3() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelMean3x3(void); + +/** Creates a kernel with the following values: + * +\verbatim + 1 1 1 1 1 + 1 1 1 1 1 + 1 1 1 1 1 + 1 1 1 1 1 + 1 1 1 1 1 +\endverbatim + * + * \verbatim im.KernelMean5x5() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelMean5x5(void); + +/** Creates a kernel with the following values: + * +\verbatim + 0 1 1 1 0 + 1 1 1 1 1 + 1 1 1 1 1 + 1 1 1 1 1 + 0 1 1 1 0 +\endverbatim + * + * \verbatim im.KernelMean5x5() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelCircularMean5x5(void); + +/** Creates a kernel with the following values: + * +\verbatim + 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 +\endverbatim + * + * \verbatim im.KernelMean7x7() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelMean7x7(void); + +/** Creates a kernel with the following values: + * +\verbatim + 0 0 1 1 1 0 0 + 0 1 1 1 1 1 0 + 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 + 0 1 1 1 1 1 0 + 0 0 1 1 1 0 0 +\endverbatim + * + * \verbatim im.KernelCircularMean7x7() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelCircularMean7x7(void); + +/** Creates a kernel with the following values: + * +\verbatim + 1 2 1 + 2 4 2 + 1 2 1 +\endverbatim + * + * \verbatim im.KernelGaussian3x3() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelGaussian3x3(void); + +/** Creates a kernel with the following values: + * +\verbatim + 1 4 6 4 1 + 4 16 24 16 4 + 6 24 36 24 6 + 4 16 24 16 4 + 1 4 6 4 1 +\endverbatim + * + * \verbatim im.KernelGaussian5x5() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelGaussian5x5(void); + +/** Creates a kernel with the following values: + * +\verbatim + 1 2 3 2 1 + 2 4 6 4 2 + 3 6 9 6 3 + 2 4 6 4 2 + 1 2 3 2 1 +\endverbatim + * + * \verbatim im.KernelBarlett5x5() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelBarlett5x5(void); + +/** Creates a kernel with the following values: + * +\verbatim + 0 -1 -1 -1 0 + -1 -1 3 -1 -1 + -1 3 4 3 -1 + -1 -1 3 -1 -1 + 0 -1 -1 -1 0 +\endverbatim + * + * \verbatim im.KernelTopHat5x5() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelTopHat5x5(void); + +/** Creates a kernel with the following values: + * +\verbatim + 0 0 -1 -1 -1 0 0 + 0 -1 -1 -1 -1 -1 0 + -1 -1 3 3 3 -1 -1 + -1 -1 3 4 3 -1 -1 + -1 -1 3 3 3 -1 -1 + 0 -1 -1 -1 -1 -1 0 + 0 0 -1 -1 -1 0 0 +\endverbatim + * + * \verbatim im.KernelTopHat7x7() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelTopHat7x7(void); + +/** Creates a kernel with the following values: + * +\verbatim + 0 -1 -2 -1 0 + -1 -4 0 -4 -1 + -2 0 40 0 -2 + -1 -4 0 -4 -1 + 0 -1 -2 -1 0 +\endverbatim + * + * \verbatim im.KernelEnhance() -> kernel: imImage [in Lua 5] \endverbatim + * \ingroup kernel */ +imImage* imKernelEnhance(void); + +#if defined(__cplusplus) +} +#endif + +#endif + diff --git a/im/include/im_lib.h b/im/include/im_lib.h new file mode 100755 index 0000000..b72b646 --- /dev/null +++ b/im/include/im_lib.h @@ -0,0 +1,191 @@ +/** \file + * \brief Library Management and Main Documentation + * + * See Copyright Notice in this file. + */ + +#ifndef __IM_LIB_H +#define __IM_LIB_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup lib Library Management + * \ingroup util + * \par + * Usefull definitions for about dialogs and + * for comparing the compiled version with the linked version of the library. + * \par + * \verbatim im._AUTHOR [in Lua 5] \endverbatim + * \verbatim im._COPYRIGHT [in Lua 5] \endverbatim + * \verbatim im._VERSION [in Lua 5] \endverbatim + * \verbatim im._VERSION_DATE [in Lua 5] \endverbatim + * \verbatim im._VERSION_NUMBER [in Lua 5] \endverbatim + * \verbatim im._DESCRIPTION [in Lua 5] \endverbatim + * \verbatim im._NAME [in Lua 5] \endverbatim + * \par + * See \ref im_lib.h + * @{ + */ +#define IM_AUTHOR "Antonio Scuri" +#define IM_COPYRIGHT "Copyright (C) 1994-2009 Tecgraf, PUC-Rio." +#define IM_VERSION "3.5" /* bug fixes are reported only by imVersion functions */ +#define IM_VERSION_NUMBER 305000 +#define IM_VERSION_DATE "2009/10/02" +#define IM_DESCRIPTION "Image Representation, Storage, Capture and Processing" +#define IM_NAME "IM - An Imaging Toolkit" +/** @} */ + + +/** Returns the library current version. Returns the definition IM_VERSION plus the bug fix number. + * + * \verbatim im.Version() -> version: string [in Lua 5] \endverbatim + * \ingroup lib */ +const char* imVersion(void); + +/** Returns the library current version release date. Returns the definition IM_VERSION_DATE. + * + * \verbatim im.VersionDate() -> date: string [in Lua 5] \endverbatim + * \ingroup lib */ +const char* imVersionDate(void); + +/** Returns the library current version number. Returns the definition IM_VERSION_NUMBER plus the bug fix number. \n + * Can be compared in run time with IM_VERSION_NUMBER to compare compiled and linked versions of the library. + * + * \verbatim im.VersionNumber() -> version: number [in Lua 5] \endverbatim + * \ingroup lib */ +int imVersionNumber(void); + + +#if defined(__cplusplus) +} +#endif + + +/*! \mainpage IM + *
+ *

Image Representation, Storage, Capture and Processing

+ * Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil \n + * http://www.tecgraf.puc-rio.br/im \n + * mailto:im@tecgraf.puc-rio.br + *
+ * + * \section over Overview + * \par + * IM is a toolkit for Digital Imaging. + * \par + * It provides support for image capture, several image file formats and many image processing operations. + * \par + * Image representation includes scientific data types (like IEEE floating point data) + * and attributes (or metadata like GeoTIFF and Exif tags). + * Animation, video and volumes are supported as image sequences, + * but there is no digital audio support. + * \par + * The main goal of the library is to provide a simple API and abstraction + * of images for scientific applications. + * \par + * The toolkit API is written in C. + * The core library source code is implemented in C++ and it is very portable, + * it can be compiled in Windows and UNIX with no modifications. + * New image processing operations can be implemented in C or in C++. + * \par + * IM is free software, can be used for public and commercial applications. + * \par + * This work was developed at Tecgraf/PUC-Rio + * by means of the partnership with PETROBRAS/CENPES. + * + * \section author Author + * \par + * Basic Software Group @ Tecgraf/PUC-Rio + * - Antonio Scuri scuri@tecgraf.puc-rio.br + * + * \section copyright Copyright Notice +\verbatim + +**************************************************************************** +Copyright (C) 1994-2009 Tecgraf, PUC-Rio. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +**************************************************************************** +\endverbatim + */ + + +/** \defgroup imagerep Image Representation + * \par + * See \ref im.h + */ + + +/** \defgroup file Image Storage + * \par + * See \ref im.h + */ + + +/** \defgroup format File Formats + * \par + * See \ref im.h + * + * Internal Predefined File Formats: + * \li "BMP" - Windows Device Independent Bitmap + * \li "PCX" - ZSoft Picture + * \li "GIF" - Graphics Interchange Format + * \li "TIFF" - Tagged Image File Format + * \li "RAS" - Sun Raster File + * \li "SGI" - Silicon Graphics Image File Format + * \li "JPEG" - JPEG File Interchange Format + * \li "LED" - IUP image in LED + * \li "TGA" - Truevision Targa + * \li "RAW" - RAW File + * \li "PNM" - Netpbm Portable Image Map + * \li "ICO" - Windows Icon + * \li "PNG" - Portable Network Graphic Format + * + * Other Supported File Formats: + * \li "JP2" - JPEG-2000 JP2 File Format + * \li "AVI" - Windows Audio-Video Interleaved RIFF + * \li "WMV" - Windows Media Video Format + * + * Some Known Compressions: + * \li "NONE" - No Compression. + * \li "RLE" - Run Lenght Encoding. + * \li "LZW" - Lempel, Ziff and Welsh. + * \li "JPEG" - Join Photographics Experts Group. + * \li "DEFLATE" - LZ77 variation (ZIP) + * + * \ingroup file */ + + +/* Library Names Convention + * + * Global Functions and Types - "im[Object][Action]" using first capitals (imFileOpen) + * Local Functions and Types - "i[Object][Action]" using first capitals (iTIFFGetCompIndex) + * Local Static Variables - same as local functions and types (iFormatCount) + * Local Static Tables - same as local functions and types with "Table" suffix (iTIFFCompTable) + * Variables and Members - no prefix, all lower case (width) + * Defines and Enumerations - all capitals (IM_ERR_NONE) + * + */ + + +#endif diff --git a/im/include/im_math.h b/im/include/im_math.h new file mode 100755 index 0000000..8e9b3dd --- /dev/null +++ b/im/include/im_math.h @@ -0,0 +1,368 @@ +/** \file + * \brief Math Utilities + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_MATH_H +#define __IM_MATH_H + +#include +#include "im_util.h" + +#ifdef IM_DEFMATHFLOAT +inline float acosf(float _X) {return ((float)acos((double)_X)); } +inline float asinf(float _X) {return ((float)asin((double)_X)); } +inline float atanf(float _X) {return ((float)atan((double)_X)); } +inline float atan2f(float _X, float _Y) {return ((float)atan2((double)_X, (double)_Y)); } +inline float ceilf(float _X) {return ((float)ceil((double)_X)); } +inline float cosf(float _X) {return ((float)cos((double)_X)); } +inline float coshf(float _X) {return ((float)cosh((double)_X)); } +inline float expf(float _X) {return ((float)exp((double)_X)); } +inline float fabsf(float _X) {return ((float)fabs((double)_X)); } +inline float floorf(float _X) {return ((float)floor((double)_X)); } +inline float fmodf(float _X, float _Y) {return ((float)fmod((double)_X, (double)_Y)); } +inline float logf(float _X) {return ((float)log((double)_X)); } +inline float log10f(float _X) {return ((float)log10((double)_X)); } +inline float powf(float _X, float _Y) {return ((float)pow((double)_X, (double)_Y)); } +inline float sinf(float _X) {return ((float)sin((double)_X)); } +inline float sinhf(float _X) {return ((float)sinh((double)_X)); } +inline float sqrtf(float _X) {return ((float)sqrt((double)_X)); } +inline float tanf(float _X) {return ((float)tan((double)_X)); } +inline float tanhf(float _X) {return ((float)tanh((double)_X)); } +#endif + +/** \defgroup math Math Utilities + * \par + * When converting between continuous and discrete use: \n + * Continuous = Discrete + 0.5 [Reconstruction/Interpolation] \n + * Discrete = Round(Continuous - 0.5) [Sampling/Quantization] \n + * \par + * Notice that must check 0-max limits when converting from Continuous to Discrete. + * \par + * When converting between discrete and discrete use: \n + * integer src_size, dst_len, src_i, dst_i \n + * real factor = (real)(dst_size)/(real)(src_size) \n + * dst_i = Round(factor*(src_i + 0.5) - 0.5) + * \par + * See \ref im_math.h + * \ingroup util */ + + +/** Round a real to the nearest integer. + * \ingroup math */ +inline int imRound(float x) +{ + return (int)(x < 0? x-0.5f: x+0.5f); +} +inline int imRound(double x) +{ + return (int)(x < 0? x-0.5: x+0.5); +} + +/** Converts between two discrete grids. + * factor is "dst_size/src_size". + * \ingroup math */ +inline int imResample(int x, float factor) +{ + float xr = factor*(x + 0.5f) - 0.5f; + return (int)(xr < 0? xr-0.5f: xr+0.5f); /* Round */ +} + +/** Does Zero Order Decimation (Mean). + * \ingroup math */ +template +inline T imZeroOrderDecimation(int width, int height, T *map, float xl, float yl, float box_width, float box_height, TU Dummy) +{ + int x0,x1,y0,y1; + (void)Dummy; + + x0 = (int)floor(xl - box_width/2.0 - 0.5) + 1; + y0 = (int)floor(yl - box_height/2.0 - 0.5) + 1; + x1 = (int)floor(xl + box_width/2.0 - 0.5); + y1 = (int)floor(yl + box_height/2.0 - 0.5); + + if (x0 == x1) x1++; + if (y0 == y1) y1++; + + x0 = x0<0? 0: x0>width-1? width-1: x0; + y0 = y0<0? 0: y0>height-1? height-1: y0; + x1 = x1<0? 0: x1>width-1? width-1: x1; + y1 = y1<0? 0: y1>height-1? height-1: y1; + + TU Value; + int Count = 0; + + Value = 0; + + for (int y = y0; y <= y1; y++) + { + for (int x = x0; x <= x1; x++) + { + Value += map[y*width+x]; + Count++; + } + } + + if (Count == 0) + { + Value = 0; + return (T)Value; + } + + return (T)(Value/(float)Count); +} + +/** Does Bilinear Decimation. + * \ingroup math */ +template +inline T imBilinearDecimation(int width, int height, T *map, float xl, float yl, float box_width, float box_height, TU Dummy) +{ + int x0,x1,y0,y1; + (void)Dummy; + + x0 = (int)floor(xl - box_width/2.0 - 0.5) + 1; + y0 = (int)floor(yl - box_height/2.0 - 0.5) + 1; + x1 = (int)floor(xl + box_width/2.0 - 0.5); + y1 = (int)floor(yl + box_height/2.0 - 0.5); + + if (x0 == x1) x1++; + if (y0 == y1) y1++; + + x0 = x0<0? 0: x0>width-1? width-1: x0; + y0 = y0<0? 0: y0>height-1? height-1: y0; + x1 = x1<0? 0: x1>width-1? width-1: x1; + y1 = y1<0? 0: y1>height-1? height-1: y1; + + TU Value, LineValue; + float LineNorm, Norm, dxr, dyr; + + Value = 0; + Norm = 0; + + for (int y = y0; y <= y1; y++) + { + dyr = yl - (y+0.5f); + if (dyr < 0) dyr *= -1; + + LineValue = 0; + LineNorm = 0; + + for (int x = x0; x <= x1; x++) + { + dxr = xl - (x+0.5f); + if (dxr < 0) dxr *= -1; + + LineValue += map[y*width+x] * dxr; + LineNorm += dxr; + } + + Value += LineValue * dyr; + Norm += dyr * LineNorm; + } + + if (Norm == 0) + { + Value = 0; + return (T)Value; + } + + return (T)(Value/Norm); +} + +/** Does Zero Order Interpolation (Nearest Neighborhood). + * \ingroup math */ +template +inline T imZeroOrderInterpolation(int width, int height, T *map, float xl, float yl) +{ + int x0 = imRound(xl-0.5f); + int y0 = imRound(yl-0.5f); + x0 = x0<0? 0: x0>width-1? width-1: x0; + y0 = y0<0? 0: y0>height-1? height-1: y0; + return map[y0*width + x0]; +} + +/** Does Bilinear Interpolation. + * \ingroup math */ +template +inline T imBilinearInterpolation(int width, int height, T *map, float xl, float yl) +{ + int x0, y0, x1, y1; + float t, u; + + if (xl < 0.5) + { + x1 = x0 = 0; + t = 0; + } + else if (xl > width-0.5) + { + x1 = x0 = width-1; + t = 0; + } + else + { + x0 = (int)(xl-0.5f); + x1 = x0+1; + t = xl - (x0+0.5f); + } + + if (yl < 0.5) + { + y1 = y0 = 0; + u = 0; + } + else if (yl > height-0.5) + { + y1 = y0 = height-1; + u = 0; + } + else + { + y0 = (int)(yl-0.5f); + y1 = y0+1; + u = yl - (y0+0.5f); + } + + T fll = map[y0*width + x0]; + T fhl = map[y0*width + x1]; + T flh = map[y1*width + x0]; + T fhh = map[y1*width + x1]; + + return (T)((fhh - flh - fhl + fll) * u * t + + (fhl - fll) * t + + (flh - fll) * u + + fll); +} + +/** Does Bicubic Interpolation. + * \ingroup math */ +template +inline T imBicubicInterpolation(int width, int height, T *map, float xl, float yl, TU Dummy) +{ + int X[4], Y[4]; + float t, u; + (void)Dummy; + + if (xl > width-0.5) + { + X[3] = X[2] = X[1] = width-1; + X[0] = X[1]-1; + t = 0; + } + else + { + X[1] = (int)(xl-0.5f); + if (X[1] < 0) X[1] = 0; + + X[0] = X[1]-1; + X[2] = X[1]+1; + X[3] = X[1]+2; + + if (X[0] < 0) X[0] = 0; + if (X[3] > width-1) X[3] = width-1; + + t = xl - (X[1]+0.5f); + } + + if (yl > height-0.5) + { + Y[3] = Y[2] = Y[1] = height-1; + Y[0] = Y[1]-1; + u = 0; + } + else + { + Y[1] = (int)(yl-0.5f); + if (Y[1] < 0) Y[1] = 0; + + Y[0] = Y[1]-1; + Y[2] = Y[1]+1; + Y[3] = Y[1]+2; + + if (Y[0] < 0) Y[0] = 0; + if (Y[3] > height-1) Y[3] = height-1; + + u = yl - (Y[1]+0.5f); + } + + float CX[4], CY[4]; + + // Optimize calculations + { + float c, c2, c3; + +#define C0 (-c3 + 2.0f*c2 - c) +#define C1 ( c3 - 2.0f*c2 + 1.0f) +#define C2 (-c3 + c2 + c) +#define C3 ( c3 - c2) + + c = t; + c2 = c*c; c3 = c2*c; + CX[0] = C0; CX[1] = C1; CX[2] = C2; CX[3] = C3; + + c = u; + c2 = c*c; c3 = c2*c; + CY[0] = C0; CY[1] = C1; CY[2] = C2; CY[3] = C3; + +#undef C0 +#undef C1 +#undef C2 +#undef C3 + } + + TU LineValue, Value; + float LineNorm, Norm; + + Value = 0; + Norm = 0; + + for (int y = 0; y < 4; y++) + { + LineValue = 0; + LineNorm = 0; + + for (int x = 0; x < 4; x++) + { + LineValue += map[Y[y]*width+X[x]] * CX[x]; + LineNorm += CX[x]; + } + + Value += LineValue * CY[y]; + Norm += CY[y] * LineNorm; + } + + if (Norm == 0) + { + Value = 0; + return (T)Value; + } + + Value = (Value/Norm); + + int size = sizeof(T); + if (size == 1) + return (T)(Value<=(TU)0? (TU)0: Value<=(TU)255? Value: (TU)255); + else + return (T)(Value); +} + +/** Calculates minimum and maximum values. + * \ingroup math */ +template +inline void imMinMax(const T *map, int count, T& min, T& max) +{ + min = *map++; + max = min; + for (int i = 1; i < count; i++) + { + T value = *map++; + + if (value > max) + max = value; + else if (value < min) + min = value; + } +} + +#endif diff --git a/im/include/im_math_op.h b/im/include/im_math_op.h new file mode 100755 index 0000000..2a4794f --- /dev/null +++ b/im/include/im_math_op.h @@ -0,0 +1,214 @@ +/** \file + * \brief Math Operations + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_MATH_OP_H +#define __IM_MATH_OP_H + +#include "im_complex.h" + + +/// Crop value to Byte limit +template +inline T crop_byte(const T& v) +{ + return v < 0? 0: v > 255? 255: v; +} + +/// Generic Addition with 2 template types +template +inline T1 add_op(const T1& v1, const T2& v2) +{ + return v2 + v1; +} + +/// Generic Subtraction with 2 template types +template +inline T1 sub_op(const T1& v1, const T2& v2) +{ + return v2 - v1; +} + +/// Generic Multiplication with 2 template types +template +inline T1 mul_op(const T1& v1, const T2& v2) +{ + return v2 * v1; +} + +/// Generic Division with 2 template types +template +inline T1 div_op(const T1& v1, const T2& v2) +{ + return v1 / v2; +} + +/// Generic Invert +template +inline T inv_op(const T& v) +{ + return 1/v; +} + +/// Generic Difference with 2 template types +template +inline T1 diff_op(const T1& v1, const T2& v2) +{ + if (v1 < v2) + return v2 - v1; + return v1 - v2; +} + +/// Generic Minimum with 2 template types +template +inline T1 min_op(const T1& v1, const T2& v2) +{ + if (v1 < v2) + return v1; + return v2; +} + +/// Generic Maximum with 2 template types +template +inline T1 max_op(const T1& v1, const T2& v2) +{ + if (v1 < v2) + return v2; + return v1; +} + +inline imbyte pow_op(const imbyte& v1, const imbyte& v2) +{ + return (imbyte)pow((float)v1, v2); +} + +inline imushort pow_op(const imushort& v1, const imushort& v2) +{ + return (imushort)pow((float)v1, v2); +} + +inline int pow_op(const int& v1, const int& v2) +{ + return (int)pow((float)v1, v2); +} + +/// Generic Power with 2 template types +template +inline T1 pow_op(const T1& v1, const T2& v2) +{ + return (T1)pow(v1, v2); +} + +/// Generic Abssolute +template +inline T abs_op(const T& v) +{ + if (v < 0) + return -1*v; + return v; +} + +/// Generic Less +template +inline T less_op(const T& v) +{ + return -1*v; +} + +/// Generic Square +template +inline T sqr_op(const T& v) +{ + return v*v; +} + +inline int sqrt(const int& C) +{ + return (int)sqrt(float(C)); +} + +/// Generic Square Root +template +inline T sqrt_op(const T& v) +{ + return (T)sqrt(v); +} + +inline int exp(const int& v) +{ + return (int)exp((float)v); +} + +/// Generic Exponential +template +inline T exp_op(const T& v) +{ + return (T)exp(v); +} + +inline int log(const int& v) +{ + return (int)log((float)v); +} + +/// Generic Logarithm +template +inline T log_op(const T& v) +{ + return (T)log(v); +} + +// Dummy sin +inline imcfloat sin(const imcfloat& v) +{ + return (v); +} + +inline int sin(const int& v) +{ + return (int)sin((float)v); +} + +/// Generic Sine +template +inline T sin_op(const T& v) +{ + return (T)sin(v); +} + +inline int cos(const int& v) +{ + return (int)cos((float)v); +} + +// Dummy cos +inline imcfloat cos(const imcfloat& v) +{ + return (v); +} + +/// Generic Cosine +template +inline T cos_op(const T& v) +{ + return (T)cos(v); +} + +/// Sets a bit in an array +inline void imDataBitSet(imbyte* data, int index, int bit) +{ + if (bit) + data[index / 8] |= (0x01 << (7 - (index % 8))); + else + data[index / 8] &= ~(0x01 << (7 - (index % 8))); +} + +/// Gets a bit from an array +inline int imDataBitGet(imbyte* data, int index) +{ + return (data[index / 8] >> (7 - (index % 8))) & 0x01; +} + +#endif diff --git a/im/include/im_palette.h b/im/include/im_palette.h new file mode 100755 index 0000000..c7ed88c --- /dev/null +++ b/im/include/im_palette.h @@ -0,0 +1,172 @@ +/** \file + * \brief Palette Generators + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_PALETTE_H +#define __IM_PALETTE_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup palette Palette Generators + * \par + * Creates several standard palettes. The palette is just an array of encoded color values. + * See also \ref colorutl. + * \par + * In Lua, to create a palette you can call im.PaletteCreate. + * \verbatim im.PaletteCreate([count: number]) -> pal: imPalette [in Lua 5] \endverbatim + * Default count is 256. + * IMLua and CDLua palettes are 100% compatible. The IM palette metatable name is "imPalette". \n + * When converted to a string will return "imPalete(%p)" where %p is replaced by the userdata address. + * If the palette is already destroyed by im.PaletteDestroy, then it will return also the suffix "-destroyed". + * \par + * In Lua, to destroy a palette you can call im.PaletteDestroy. + * If this function is not called, the palette is destroyed by the garbage collector. + * \verbatim im.PaletteDestroy(pal: imPalette) [in Lua 5] \endverbatim + * \par + * In Lua, array access is enabled so you can do:. + * \verbatim color = pal[index] \endverbatim + * \verbatim pal[index] = color \endverbatim + * \verbatim count = #pal \endverbatim + * \par + * See \ref im_palette.h + * \ingroup util */ + + +/** Searches for the nearest color on the table and returns the color index if successful. + * It looks in all palette entries and finds the minimum euclidian square distance. + * If the color matches the given color it returns immediately. + * See also \ref colorutl. + * + * \verbatim im.PaletteFindNearest(pal: imPalette, color: lightuserdata) -> index: number [in Lua 5] \endverbatim + * \ingroup palette */ +int imPaletteFindNearest(const long *palette, int palette_count, long color); + +/** Searches for the color on the table and returns the color index if successful. + * If the tolerance is 0 search for the exact match in the palette else search for the + * first color that fits in the tolerance range. + * See also \ref colorutl. + * + * \verbatim im.PaletteFindColor(pal: imPalette, color: lightuserdata, tol: number) -> index: number [in Lua 5] \endverbatim + * \ingroup palette */ +int imPaletteFindColor(const long *palette, int palette_count, long color, unsigned char tol); + +/** Creates a palette of gray scale values. + * The colors are arranged from black to white. + * + * \verbatim im.PaletteGray() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteGray(void); + +/** Creates a palette of a gradient of red colors. + * The colors are arranged from black to pure red. + * + * \verbatim im.PaletteRed() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteRed(void); + +/** Creates a palette of a gradient of green colors. + * The colors are arranged from black to pure green. + * + * \verbatim im.PaletteGreen() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteGreen(void); + +/** Creates a palette of a gradient of blue colors. + * The colors are arranged from black to pure blue. + * + * \verbatim im.PaletteBlue() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteBlue(void); + +/** Creates a palette of a gradient of yellow colors. + * The colors are arranged from black to pure yellow. + * + * \verbatim im.PaletteYellow() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteYellow(void); + +/** Creates a palette of a gradient of magenta colors. + * The colors are arranged from black to pure magenta. + * + * \verbatim im.PaletteMagenta() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteMagenta(void); + +/** Creates a palette of a gradient of cian colors. + * The colors are arranged from black to pure cian. + * + * \verbatim im.PaletteCian() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteCian(void); + +/** Creates a palette of rainbow colors. + * The colors are arranged in the light wave length spectrum order (starting from purple). + * + * \verbatim im.PaletteRainbow() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteRainbow(void); + +/** Creates a palette of hues with maximum saturation. + * + * \verbatim im.PaletteHues() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteHues(void); + +/** Creates a palette of a gradient of blue colors. + * The colors are arranged from pure blue to white. + * + * \verbatim im.PaletteBlueIce() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteBlueIce(void); + +/** Creates a palette of a gradient from black to white passing trough red and orange. + * + * \verbatim im.PaletteHotIron() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteHotIron(void); + +/** Creates a palette of a gradient from black to white passing trough red and yellow. + * + * \verbatim im.PaletteBlackBody() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteBlackBody(void); + +/** Creates a palette with high contrast colors. + * + * \verbatim im.PaletteHighContrast() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteHighContrast(void); + +/** Creates a palette of an uniform range of colors from black to white. + * This is a 2^(2.6) bits per pixel palette. + * + * \verbatim im.PaletteUniform() -> pal: imPalette [in Lua 5] \endverbatim + * \ingroup palette */ +long* imPaletteUniform(void); + +/** Returns the index of the correspondent RGB color of an uniform palette. + * + * \verbatim im.PaletteUniformIndex(color: lightuserdata) -> index: number [in Lua 5] \endverbatim + * \ingroup palette */ +int imPaletteUniformIndex(long color); + +/** Returns the index of the correspondent RGB color of an uniform palette. + * Uses an 8x8 ordered dither to lookup the index in a halftone matrix. + * The spatial position used by the halftone method. + * + * \verbatim im.PaletteUniformIndexHalftoned(color: lightuserdata, x: number, y: number) -> index: number [in Lua 5] \endverbatim + * \ingroup palette */ +int imPaletteUniformIndexHalftoned(long color, int x, int y); + + +#if defined(__cplusplus) +} +#endif + +#endif + diff --git a/im/include/im_plus.h b/im/include/im_plus.h new file mode 100755 index 0000000..0aabd1f --- /dev/null +++ b/im/include/im_plus.h @@ -0,0 +1,73 @@ +/** \file + * \brief C++ Wrapper for File Access + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_PLUS_H +#define __IM_PLUS_H + + +/** \brief C++ Wrapper for the Image File Structure + * + * \par + * Usage is just like the C API. Open and New are replaced by equivalent constructors. \n + * Close is replaced by the destructor. Error checking is done by the Error() member. \n + * Open and New errors are cheked using the Failed() member. + * \ingroup file */ +class imImageFile +{ + imFile* ifile; + int error; + + imImageFile() {}; + +public: + + imImageFile(const char* file_name) + { this->ifile = imFileOpen(file_name, &this->error); } + + imImageFile(const char* file_name, const char* format) + { this->ifile = imFileNew(file_name, format, &this->error); } + + ~imImageFile() + { if (this->ifile) imFileClose(this->ifile); } + + int Failed() + { return this->ifile == 0; } + + int Error() + { return this->error; } + + void SetAttribute(const char* attrib, int data_type, int count, const void* data) + { imFileSetAttribute(this->ifile, attrib, data_type, count, data); } + + const void* GetAttribute(const char* attrib, int *data_type, int *count) + { return imFileGetAttribute(this->ifile, attrib, data_type, count); } + + void GetInfo(char* format, char* compression, int *image_count) + { imFileGetInfo(this->ifile, format, compression, image_count); } + + void ReadImageInfo(int index, int *width, int *height, int *color_mode, int *data_type) + { this->error = imFileReadImageInfo(this->ifile, index, width, height, color_mode, data_type); } + + void GetPalette(long* palette, int *palette_count) + { imFileGetPalette(this->ifile, palette, palette_count); } + + void ReadImageData(void* data, int convert2bitmap, int color_mode_flags) + { this->error = imFileReadImageData(this->ifile, data, convert2bitmap, color_mode_flags); } + + void SetInfo(const char* compression) + { imFileSetInfo(this->ifile, compression); } + + void SetPalette(long* palette, int palette_count) + { imFileSetPalette(this->ifile, palette, palette_count); } + + void WriteImageInfo(int width, int height, int color_mode, int data_type) + { this->error = imFileWriteImageInfo(this->ifile, width, height, color_mode, data_type); } + + void WriteImageData(void* data) + { this->error = imFileWriteImageData(this->ifile, data); } +}; + +#endif diff --git a/im/include/im_process.h b/im/include/im_process.h new file mode 100755 index 0000000..812dad1 --- /dev/null +++ b/im/include/im_process.h @@ -0,0 +1,36 @@ +/** \file + * \brief Image Processing + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_PROCESS_H +#define __IM_PROCESS_H + +#include "im_process_pon.h" +#include "im_process_loc.h" +#include "im_process_glo.h" +#include "im_process_ana.h" + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup process Image Processing + * \par + * Several image processing functions based on the \ref imImage structure. + * \par + * You must link the application with "im_process.lib/.a/.so". + * In Lua call require"imlua_process". \n + * Some complex operations use the \ref counter.\n + * There is no check on the input/output image properties, + * check each function documentation before using it. + */ + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_process_ana.h b/im/include/im_process_ana.h new file mode 100755 index 0000000..e7a897a --- /dev/null +++ b/im/include/im_process_ana.h @@ -0,0 +1,222 @@ +/** \file + * \brief Image Statistics and Analysis + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_PROC_ANA_H +#define __IM_PROC_ANA_H + +#include "im_image.h" + +#if defined(__cplusplus) +extern "C" { +#endif + + + +/** \defgroup stats Image Statistics Calculations + * \par + * Operations to calculate some statistics over images. + * \par + * See \ref im_process_ana.h + * \ingroup process */ + +/** Calculates the RMS error between two images (Root Mean Square Error). + * + * \verbatim im.CalcRMSError(image1: imImage, image2: imImage) -> rms: number [in Lua 5] \endverbatim + * \ingroup stats */ +float imCalcRMSError(const imImage* image1, const imImage* image2); + +/** Calculates the SNR of an image and its noise (Signal Noise Ratio). + * + * \verbatim im.CalcSNR(src_image: imImage, noise_image: imImage) -> snr: number [in Lua 5] \endverbatim + * \ingroup stats */ +float imCalcSNR(const imImage* src_image, const imImage* noise_image); + +/** Count the number of different colors in an image. \n + * Image must be IM_BYTE, but all color spaces except IM_CMYK. + * + * \verbatim im.CalcCountColors(image: imImage) -> count: number [in Lua 5] \endverbatim + * \ingroup stats */ +unsigned long imCalcCountColors(const imImage* image); + +/** Calculates the histogram of a IM_BYTE data. \n + * Histogram is always 256 positions long. \n + * When cumulative is different from zero it calculates the cumulative histogram. + * + * \verbatim im.CalcHistogram(image: imImage, plane: number, cumulative: boolean) -> histo: table of numbers [in Lua 5] \endverbatim + * Where plane is the depth plane to calculate the histogram. \n + * The returned table is zero indexed. image can be IM_USHORT or IM_BYTE. + * \ingroup stats */ +void imCalcHistogram(const unsigned char* data, int count, unsigned long* histo, int cumulative); + +/** Calculates the histogram of a IM_USHORT data. \n + * Histogram is always 65535 positions long. \n + * When cumulative is different from zero it calculates the cumulative histogram. \n + * Use \ref imCalcHistogram in Lua. + * \ingroup stats */ +void imCalcUShortHistogram(const unsigned short* data, int count, unsigned long* histo, int cumulative); + +/** Calculates the gray histogram of an image. \n + * Image must be IM_BYTE/(IM_RGB, IM_GRAY, IM_BINARY or IM_MAP). \n + * If the image is IM_RGB then the histogram of the luma component is calculated. \n + * Histogram is always 256 positions long. \n + * When cumulative is different from zero it calculates the cumulative histogram. + * + * \verbatim im.CalcGrayHistogram(image: imImage, cumulative: boolean) -> histo: table of numbers [in Lua 5] \endverbatim + * \ingroup stats */ +void imCalcGrayHistogram(const imImage* image, unsigned long* histo, int cumulative); + +/** Numerical Statistics Structure + * \ingroup stats */ +typedef struct _imStats +{ + float max; /**< Maximum value */ + float min; /**< Minimum value */ + unsigned long positive; /**< Number of Positive Values */ + unsigned long negative; /**< Number of Negative Values */ + unsigned long zeros; /**< Number of Zeros */ + float mean; /**< Mean */ + float stddev; /**< Standard Deviation */ +} imStats; + +/** Calculates the statistics about the image data. \n + * There is one stats for each depth plane. For ex: stats[0]=red stats, stats[0]=green stats, ... \n + * Supports all data types except IM_CFLOAT. \n + * + * \verbatim im.CalcImageStatistics(image: imImage) -> stats: table [in Lua 5] \endverbatim + * Table contains the following fields: max, min, positive, negative, zeros, mean, stddev. + * The same as the \ref imStats structure. + * \ingroup stats */ +void imCalcImageStatistics(const imImage* image, imStats* stats); + +/** Calculates the statistics about the image histogram data.\n + * There is one stats for each depth plane. For ex: stats[0]=red stats, stats[0]=green stats, ... \n + * Only IM_BYTE images are supported. + * + * \verbatim im.CalcHistogramStatistics(image: imImage) -> stats: table [in Lua 5] \endverbatim + * \ingroup stats */ +void imCalcHistogramStatistics(const imImage* image, imStats* stats); + +/** Calculates some extra statistics about the image histogram data.\n + * There is one stats for each depth plane. \n + * Only IM_BYTE images are supported. \n + * mode will be -1 if more than one max is found. + * + * \verbatim im.CalcHistoImageStatistics(image: imImage) -> median: number, mode: number [in Lua 5] \endverbatim + * \ingroup stats */ +void imCalcHistoImageStatistics(const imImage* image, int* median, int* mode); + + + +/** \defgroup analyze Image Analysis + * \par + * See \ref im_process_ana.h + * \ingroup process */ + +/** Find white regions in binary image. \n + * Result is IM_GRAY/IM_USHORT type. Regions can be 4 connected or 8 connected. \n + * Returns the number of regions found. Background is marked as 0. \n + * Regions touching the border are considered only if touch_border=1. + * + * \verbatim im.AnalyzeFindRegions(src_image: imImage, dst_image: imImage, connect: number, touch_border: boolean) -> count: number [in Lua 5] \endverbatim + * \verbatim im.AnalyzeFindRegionsNew(image: imImage, connect: number, touch_border: boolean) -> count: number, new_image: imImage [in Lua 5] \endverbatim + * \ingroup analyze */ +int imAnalyzeFindRegions(const imImage* src_image, imImage* dst_image, int connect, int touch_border); + +/** Measure the actual area of all regions. Holes are not included. \n + * This is the number of pixels of each region. \n + * Source image is IM_GRAY/IM_USHORT type (the result of \ref imAnalyzeFindRegions). \n + * area has size the number of regions. + * + * \verbatim im.AnalyzeMeasureArea(image: imImage, [region_count: number]) -> area: table of numbers [in Lua 5] \endverbatim + * The returned table is zero indexed. + * \ingroup analyze */ +void imAnalyzeMeasureArea(const imImage* image, int* area, int region_count); + +/** Measure the polygonal area limited by the perimeter line of all regions. Holes are not included. \n + * Notice that some regions may have polygonal area zero. \n + * Source image is IM_GRAY/IM_USHORT type (the result of \ref imAnalyzeFindRegions). \n + * perimarea has size the number of regions. + * + * \verbatim im.AnalyzeMeasurePerimArea(image: imImage, [region_count: number]) -> perimarea: table of numbers [in Lua 5] \endverbatim + * The returned table is zero indexed. + * \ingroup analyze */ +void imAnalyzeMeasurePerimArea(const imImage* image, float* perimarea); + +/** Calculate the centroid position of all regions. Holes are not included. \n + * Source image is IM_GRAY/IM_USHORT type (the result of \ref imAnalyzeFindRegions). \n + * area, cx and cy have size the number of regions. If area is NULL will be internally calculated. + * + * \verbatim im.AnalyzeMeasureCentroid(image: imImage, [area: table of numbers], [region_count: number]) -> cx: table of numbers, cy: table of numbers [in Lua 5] \endverbatim + * The returned tables are zero indexed. + * \ingroup analyze */ +void imAnalyzeMeasureCentroid(const imImage* image, const int* area, int region_count, float* cx, float* cy); + +/** Calculate the principal major axis slope of all regions. \n + * Source image is IM_GRAY/IM_USHORT type (the result of \ref imAnalyzeFindRegions). \n + * data has size the number of regions. If area or centroid are NULL will be internally calculated. \n + * Principal (major and minor) axes are defined to be those axes that pass through the + * centroid, about which the moment of inertia of the region is, respectively maximal or minimal. + * + * \verbatim im.AnalyzeMeasurePrincipalAxis(image: imImage, [area: table of numbers], [cx: table of numbers], [cy: table of numbers], [region_count: number]) + -> major_slope: table of numbers, major_length: table of numbers, minor_slope: table of numbers, minor_length: table of numbers [in Lua 5] \endverbatim + * The returned tables are zero indexed. + * \ingroup analyze */ +void imAnalyzeMeasurePrincipalAxis(const imImage* image, const int* area, const float* cx, const float* cy, + const int region_count, float* major_slope, float* major_length, + float* minor_slope, float* minor_length); + +/** Measure the number and area of holes of all regions. \n + * Source image is IM_USHORT type (the result of \ref imAnalyzeFindRegions). \n + * area and perim has size the number of regions, if some is NULL it will be not calculated. + * + * \verbatim im.AnalyzeMeasureHoles(image: imImage, connect: number, [region_count: number]) -> holes_count: number, area: table of numbers, perim: table of numbers [in Lua 5] \endverbatim + * The returned tables are zero indexed. + * \ingroup analyze */ +void imAnalyzeMeasureHoles(const imImage* image, int connect, int *holes_count, int* area, float* perim); + +/** Measure the total perimeter of all regions (external and internal). \n + * Source image is IM_GRAY/IM_USHORT type (the result of imAnalyzeFindRegions). \n + * It uses a half-pixel inter distance for 8 neighboors in a perimeter of a 4 connected region. \n + * This function can also be used to measure line lenght. \n + * perim has size the number of regions. + * + * \verbatim im.AnalyzeMeasurePerimeter(image: imImage) -> perim: table of numbers [in Lua 5] \endverbatim + * \ingroup analyze */ +void imAnalyzeMeasurePerimeter(const imImage* image, float* perim, int region_count); + +/** Isolates the perimeter line of gray integer images. Background is defined as being black (0). \n + * It just checks if at least one of the 4 connected neighboors is non zero. Image borders are extended with zeros. + * + * \verbatim im.ProcessPerimeterLine(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessPerimeterLineNew(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup analyze */ +void imProcessPerimeterLine(const imImage* src_image, imImage* dst_image); + +/** Eliminates regions that have area size outside or inside the given interval. \n + * Source and destiny are a binary images. Regions can be 4 connected or 8 connected. \n + * Can be done in-place. end_size can be zero to indicate no upper limit or an area with width*height size. \n + * When searching inside the region the limits are inclusive (<= size >=), when searching outside the limits are exclusive (> size <). + * + * \verbatim im.ProcessRemoveByArea(src_image: imImage, dst_image: imImage, connect: number, start_size: number, end_size: number, inside: boolean) [in Lua 5] \endverbatim + * \verbatim im.ProcessRemoveByAreaNew(image: imImage, connect: number, start_size: number, end_size: number, inside: boolean) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup analyze */ +void imProcessRemoveByArea(const imImage* src_image, imImage* dst_image, int connect, int start_size, int end_size, int inside); + +/** Fill holes inside white regions. \n + * Source and destiny are a binary images. Regions can be 4 connected or 8 connected. \n + * Can be done in-place. + * + * \verbatim im.ProcessFillHoles(src_image: imImage, dst_image: imImage, connect: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessFillHolesNew(image: imImage, connect: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup analyze */ +void imProcessFillHoles(const imImage* src_image, imImage* dst_image, int connect); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_process_glo.h b/im/include/im_process_glo.h new file mode 100755 index 0000000..d50c4c1 --- /dev/null +++ b/im/include/im_process_glo.h @@ -0,0 +1,170 @@ +/** \file + * \brief Image Processing - Global Operations + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_PROCESS_GLO_H +#define __IM_PROCESS_GLO_H + +#include "im_image.h" + +#if defined(__cplusplus) +extern "C" { +#endif + + + +/** \defgroup transform Other Domain Transform Operations + * \par + * Hough, Distance. + * + * See \ref im_process_glo.h + * \ingroup process */ + +/** Hough Lines Transform. \n + * It will detect white lines in a black background. So the source image must be a IM_BINARY image + * with the white lines of interest enhanced. The better the threshold with the white lines the better + * the line detection. \n + * The destiny image must have IM_GRAY, IM_INT, hg_width=180, hg_height=2*rmax+1, + * where rmax is the image diagonal/2 (rmax = srqrt(width*width + height*height)). \n + * The hough transform defines "cos(theta) * X + sin(theta) * Y = rho" and the parameters are in the interval: \n + * theta = "0 .. 179", rho = "-hg_height/2 .. hg_height/2" .\n + * Where rho is the perpendicular distance from the center of the image and theta the angle with the normal. + * So do not confuse theta with the line angle, they are perpendicular. \n + * Returns zero if the counter aborted. \n + * Inspired from ideas in XITE, Copyright 1991, Blab, UiO \n + * http://www.ifi.uio.no/~blab/Software/Xite/ + * + * \verbatim im.ProcessHoughLines(src_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessHoughLinesNew(image: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup transform */ +int imProcessHoughLines(const imImage* src_image, imImage* dst_image); + +/** Draw detected hough lines. \n + * The source image must be IM_GRAY and IM_BYTE. The destiny image can be a clone of the source image or + * it can be the source image for in place processing. \n + * If the hough transform is not NULL, then the hough points are filtered to include only lines + * that are significally different from each other. \n + * The hough image is the hough transform image, but it is optional and can be NULL. + * If not NULL then it will be used to filter lines that are very similar. \n + * The hough points image is a hough transform image that was thresholded to a IM_BINARY image, + * usually using a Local Max threshold operation (see \ref imProcessLocalMaxThreshold). Again the better the threshold the better the results. \n + * The destiny image will be set to IM_MAP, and the detected lines will be drawn using a red color. \n + * Returns the number of detected lines. + * + * \verbatim im.ProcessHoughLinesDraw(src_image: imImage, hough: imImage, hough_points: imImage, dst_image: imImage) -> lines: number [in Lua 5] \endverbatim + * \verbatim im.ProcessHoughLinesDrawNew(image: imImage, hough: imImage, hough_points: imImage) -> lines: number, new_image: imImage [in Lua 5] \endverbatim + * \ingroup transform */ +int imProcessHoughLinesDraw(const imImage* src_image, const imImage* hough, const imImage* hough_points, imImage* dst_image); + +/** Calculates the Cross Correlation in the frequency domain. \n + * CrossCorr(a,b) = IFFT(Conj(FFT(a))*FFT(b)) \n + * Images must be of the same size and only destiny image must be of type complex. + * + * \verbatim im.ProcessCrossCorrelation(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessCrossCorrelationNew(image1: imImage, image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup transform */ +void imProcessCrossCorrelation(const imImage* src_image1, const imImage* src_image2, imImage* dst_image); + +/** Calculates the Auto Correlation in the frequency domain. \n + * Uses the cross correlation. + * Images must be of the same size and only destiny image must be of type complex. + * + * \verbatim im.ProcessAutoCorrelation(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessAutoCorrelationNew(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup transform */ +void imProcessAutoCorrelation(const imImage* src_image, imImage* dst_image); + +/** Calculates the Distance Transform of a binary image + * using an aproximation of the euclidian distance.\n + * Each white pixel in the binary image is + * assigned a value equal to its distance from the nearest + * black pixel. \n + * Uses a two-pass algorithm incrementally calculating the distance. \n + * Source image must be IM_BINARY, destiny must be IM_FLOAT. + * + * \verbatim im.ProcessDistanceTransform(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessDistanceTransformNew(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup transform */ +void imProcessDistanceTransform(const imImage* src_image, imImage* dst_image); + +/** Marks all the regional maximum of the distance transform. \n + * source is IMGRAY/IM_FLOAT destiny in IM_BINARY. \n + * We consider maximum all connected pixel values that have smaller pixel values around it. + * + * \verbatim im.ProcessRegionalMaximum(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessRegionalMaximumNew(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup transform */ +void imProcessRegionalMaximum(const imImage* src_image, imImage* dst_image); + + + +/** \defgroup fourier Fourier Transform Operations + * \par + * All Fourier transforms use FFTW library. \n + * The pre-compiled binaries for FFTW version 2.1.5 includes all the necessary files. + * The pre-compiled binaries for FFTW version 3.x depends on an external library, not provided. + * To build the code that uses FFTW version 3 you must define USE_FFTW3. + * \par + * FFTW Copyright Matteo Frigo, Steven G. Johnson and the MIT. \n + * http://www.fftw.org \n + * See "fftw.h" + * \par + * Must link with "im_fftw" library. \n + * \par + * IMPORTANT: The FFTW lib has a GPL license. The license of the "im_fftw" library is automatically the GPL. + * So you cannot use it for commercial applications without contacting the authors. + * \par + * See \ref im_process_glo.h + * \ingroup process */ + +/** Forward FFT. \n + * The result has its lowest frequency at the center of the image. \n + * This is an unnormalized fft. \n + * Images must be of the same size. Destiny image must be of type complex. + * + * \verbatim im.ProcessFFT(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessFFTNew(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup fourier */ +void imProcessFFT(const imImage* src_image, imImage* dst_image); + +/** Inverse FFT. \n + * The image has its lowest frequency restored to the origin before the transform. \n + * The result is normalized by (width*height). \n + * Images must be of the same size and both must be of type complex. + * + * \verbatim im.ProcessIFFT(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessIFFTNew(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup fourier */ +void imProcessIFFT(const imImage* src_image, imImage* dst_image); + +/** Raw in-place FFT (forward or inverse). \n + * The lowest frequency can be centered after forward, or + * can be restored to the origin before inverse. \n + * The result can be normalized after the transform by sqrt(w*h) [1] or by (w*h) [2], + * or left unnormalized [0]. \n + * Images must be of the same size and both must be of type complex. + * + * \verbatim im.ProcessFFTraw(image: imImage, inverse: number, center: number, normalize: number) [in Lua 5] \endverbatim + * \ingroup fourier */ +void imProcessFFTraw(imImage* image, int inverse, int center, int normalize); + +/** Auxiliary function for the raw FFT. \n + * This is the function used internally to change the lowest frequency position in the image. \n + * If the image size has even dimensions the flag "center2origin" is useless. But if it is odd, + * you must specify if its from center to origin (usually used before inverse) or + * from origin to center (usually used after forward). \n + * Notice that this function is used for images in the the frequency domain. \n + * Image type must be complex. + * + * \verbatim im.ProcessSwapQuadrants(image: imImage, center2origin: number) [in Lua 5] \endverbatim + * \ingroup fourier */ +void imProcessSwapQuadrants(imImage* image, int center2origin); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_process_loc.h b/im/include/im_process_loc.h new file mode 100755 index 0000000..44e8281 --- /dev/null +++ b/im/include/im_process_loc.h @@ -0,0 +1,606 @@ +/** \file + * \brief Image Processing - Local Operations + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_PROCESS_LOC_H +#define __IM_PROCESS_LOC_H + +#include "im_image.h" + +#if defined(__cplusplus) +extern "C" { +#endif + + + +/** \defgroup resize Image Resize + * \par + * Operations to change the image size. + * \par + * See \ref im_process_loc.h + * \ingroup process */ + +/** Only reduze the image size using the given decimation order. \n + * Supported decimation orders: + * \li 0 - zero order (mean) + * \li 1 - first order (bilinear decimation) + * Images must be of the same type. If image type is IM_MAP or IM_BINARY, must use order=0. \n + * Returns zero if the counter aborted. + * + * \verbatim im.ProcessReduce(src_image: imImage, dst_image: imImage, order: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessReduceNew(image: imImage, order: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup resize */ +int imProcessReduce(const imImage* src_image, imImage* dst_image, int order); + +/** Change the image size using the given interpolation order. \n + * Supported interpolation orders: + * \li 0 - zero order (near neighborhood) + * \li 1 - first order (bilinear interpolation) + * \li 3 - third order (bicubic interpolation) + * Images must be of the same type. If image type is IM_MAP or IM_BINARY, must use order=0. \n + * Returns zero if the counter aborted. + * + * \verbatim im.ProcessResize(src_image: imImage, dst_image: imImage, order: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessResizeNew(image: imImage, order: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup resize */ +int imProcessResize(const imImage* src_image, imImage* dst_image, int order); + +/** Reduze the image area by 4 (w/2,h/2). \n + * Images must be of the same type. Destiny image size must be source image width/2, height/2. + * Can not operate on IM_MAP nor IM_BINARY images. + * + * \verbatim im.ProcessReduceBy4(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessReduceBy4New(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup resize */ +void imProcessReduceBy4(const imImage* src_image, imImage* dst_image); + +/** Extract a rectangular region from an image. \n + * Images must be of the same type. Destiny image size must be smaller than source image width-xmin, height-ymin. \n + * ymin and xmin must be >0 and new_image: imImage [in Lua 5] \endverbatim + * \ingroup resize */ +void imProcessCrop(const imImage* src_image, imImage* dst_image, int xmin, int ymin); + +/** Insert a rectangular region in an image. \n + * Images must be of the same type. Region image size can be larger than source image. \n + * ymin and xmin must be >0 and new_image: imImage [in Lua 5] \endverbatim + * \ingroup resize */ +void imProcessInsert(const imImage* src_image, const imImage* region_image, imImage* dst_image, int xmin, int ymin); + +/** Increase the image size by adding pixels with zero value. \n + * Images must be of the same type. Destiny image size must be greatter than source image width+xmin, height+ymin. + * + * \verbatim im.ProcessAddMargins(src_image: imImage, dst_image: imImage, xmin: number, ymin: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessAddMarginsNew(image: imImage, xmin: number, xmax: number, ymin: number, ymax: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup resize */ +void imProcessAddMargins(const imImage* src_image, imImage* dst_image, int xmin, int ymin); + + + +/** \defgroup geom Geometric Operations + * \par + * Operations to change the shape of the image. + * \par + * See \ref im_process_loc.h + * \ingroup process */ + +/** Calculates the size of the new image after rotation. + * + * \verbatim im.ProcessCalcRotateSize(width: number, height: number, cos0: number, sin0: number) [in Lua 5] \endverbatim + * \ingroup geom */ +void imProcessCalcRotateSize(int width, int height, int *new_width, int *new_height, double cos0, double sin0); + +/** Rotates the image using the given interpolation order (see \ref imProcessResize). \n + * Images must be of the same type. The destiny size can be calculated using \ref imProcessCalcRotateSize to fit the new image size, + * or can be any size, including the original size. The rotation is relative to the center of the image. \n + * Returns zero if the counter aborted. + * + * \verbatim im.ProcessRotate(src_image: imImage, dst_image: imImage, cos0: number, sin0: number, order: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRotateNew(image: imImage, cos0: number, sin0: number, order: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup geom */ +int imProcessRotate(const imImage* src_image, imImage* dst_image, double cos0, double sin0, int order); + +/** Rotates the image using the given interpolation order (see \ref imProcessResize). \n + * Images must be of the same type. Destiny can have any size, including the original size. \n + * The rotation is relative to the reference point. But the result can be shifted to the origin. \n + * Returns zero if the counter aborted. + * + * \verbatim im.ProcessRotateRef(src_image: imImage, dst_image: imImage, cos0: number, sin0: number, x: number, y: number, to_origin: boolean, order: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRotateRefNew(image: imImage, cos0: number, sin0: number, x: number, y: number, to_origin: boolean, order: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup geom */ +int imProcessRotateRef(const imImage* src_image, imImage* dst_image, double cos0, double sin0, int x, int y, int to_origin, int order); + +/** Rotates the image in 90 degrees counterclockwise or clockwise. Swap columns by lines. \n + * Images must be of the same type. Destiny width and height must be source height and width. \n + * Direction can be clockwise (1) or counter clockwise (-1). + * + * \verbatim im.ProcessRotate90(src_image: imImage, dst_image: imImage, dir_clockwise: boolean) [in Lua 5] \endverbatim + * \verbatim im.ProcessRotate90New(image: imImage, dir_clockwise: boolean) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup geom */ +void imProcessRotate90(const imImage* src_image, imImage* dst_image, int dir_clockwise); + +/** Rotates the image in 180 degrees. Swap columns and swap lines. \n + * Images must be of the same type and size. + * + * \verbatim im.ProcessRotate180(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessRotate180New(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup geom */ +void imProcessRotate180(const imImage* src_image, imImage* dst_image); + +/** Mirror the image in a horizontal flip. Swap columns. \n + * Images must be of the same type and size. + * Can be done in-place. + * + * \verbatim im.ProcessMirror(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessMirrorNew(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup geom */ +void imProcessMirror(const imImage* src_image, imImage* dst_image); + +/** Apply a vertical flip. Swap lines. \n + * Images must be of the same type and size. + * Can be done in-place. + * + * \verbatim im.ProcessFlip(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessFlipNew(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup geom */ +void imProcessFlip(const imImage* src_image, imImage* dst_image); + +/** Apply a radial distortion using the given interpolation order (see imProcessResize). \n + * Images must be of the same type and size. Returns zero if the counter aborted. + * + * \verbatim im.ProcessRadial(src_image: imImage, dst_image: imImage, k1: number, order: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRadialNew(image: imImage, k1: number, order: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup geom */ +int imProcessRadial(const imImage* src_image, imImage* dst_image, float k1, int order); + +/** Apply a swirl distortion using the given interpolation order (see imProcessResize). \n + * Images must be of the same type and size. Returns zero if the counter aborted. + * + * \verbatim im.ProcessSwirl(src_image: imImage, dst_image: imImage, k: number, order: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessSwirlNew(image: imImage, k: number, order: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup geom */ +int imProcessSwirl(const imImage* src_image, imImage* dst_image, float k1, int order); + +/** Split the image in two images, one containing the odd lines and other containing the even lines. \n + * Images must be of the same type. Height of the output images must be half the height of the input image. + * If the height of the input image is odd then the first image must have height equals to half+1. + * + * \verbatim im.ProcessInterlaceSplit(src_image: imImage, dst_image1: imImage, dst_image2: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessInterlaceSplitNew(image: imImage) -> new_image1: imImage, new_image2: imImage [in Lua 5] \endverbatim + * \ingroup geom */ +void imProcessInterlaceSplit(const imImage* src_image, imImage* dst_image1, imImage* dst_image2); + + + +/** \defgroup morphgray Morphology Operations for Gray Images + * \par + * See \ref im_process_loc.h + * \ingroup process */ + +/** Base gray morphology convolution. \n + * Supports all data types except IM_CFLOAT. Can be applied on color images. \n + * Kernel is always IM_INT. Use kernel size odd for better results. \n + * Use -1 for don't care positions in kernel. Kernel values are added to image values, then \n + * you can use the maximum or the minimum within the kernel area. \n + * No border extensions are used. + * All the gray morphology operations use this function. \n + * If the kernel image attribute "Description" exists it is used by the counter. + * + * \verbatim im.ProcessGrayMorphConvolve(src_image: imImage, dst_image: imImage, kernel: imImage, ismax: boolean) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessGrayMorphConvolveNew(image: imImage, kernel: imImage, ismax: boolean) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphgray */ +int imProcessGrayMorphConvolve(const imImage* src_image, imImage* dst_image, const imImage* kernel, int ismax); + +/** Gray morphology convolution with a kernel full of "0"s and use minimum value. + * + * \verbatim im.ProcessGrayMorphErode(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessGrayMorphErodeNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphgray */ +int imProcessGrayMorphErode(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Gray morphology convolution with a kernel full of "0"s and use maximum value. + * + * \verbatim im.ProcessGrayMorphDilate(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessGrayMorphDilateNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphgray */ +int imProcessGrayMorphDilate(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Erode+Dilate. + * + * \verbatim im.ProcessGrayMorphOpen(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessGrayMorphOpenNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphgray */ +int imProcessGrayMorphOpen(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Dilate+Erode. + * + * \verbatim im.ProcessGrayMorphClose(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessGrayMorphCloseNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphgray */ +int imProcessGrayMorphClose(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Open+Difference. + * + * \verbatim im.ProcessGrayMorphTopHat(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessGrayMorphTopHatNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphgray */ +int imProcessGrayMorphTopHat(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Close+Difference. + * + * \verbatim im.ProcessGrayMorphWell(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessGrayMorphWellNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphgray */ +int imProcessGrayMorphWell(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Difference(Erode, Dilate). + * + * \verbatim im.ProcessGrayMorphGradient(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessGrayMorphGradientNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphgray */ +int imProcessGrayMorphGradient(const imImage* src_image, imImage* dst_image, int kernel_size); + + + +/** \defgroup morphbin Morphology Operations for Binary Images + * \par + * See \ref im_process_loc.h + * \ingroup process */ + +/** Base binary morphology convolution. \n + * Images are all IM_BINARY. Kernel is IM_INT, but values can be only 1, 0 or -1. Use kernel size odd for better results. \n + * Hit white means hit=1 and miss=0, or else hit=0 and miss=1. \n + * Use -1 for don't care positions in kernel. Kernel values are simply compared with image values. \n + * The operation can be repeated by a number of iterations. + * The border is zero extended. \n + * Almost all the binary morphology operations use this function.\n + * If the kernel image attribute "Description" exists it is used by the counter. + * + * \verbatim im.ProcessBinMorphConvolve(src_image: imImage, dst_image: imImage, kernel: imImage, hit_white: boolean, iter: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessBinMorphConvolveNew(image: imImage, kernel: imImage, hit_white: boolean, iter: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphbin */ +int imProcessBinMorphConvolve(const imImage* src_image, imImage* dst_image, const imImage* kernel, int hit_white, int iter); + +/** Binary morphology convolution with a kernel full of "1"s and hit white. + * + * \verbatim im.ProcessBinMorphErode(src_image: imImage, dst_image: imImage, kernel_size: number, iter: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessBinMorphErodeNew(image: imImage, kernel_size: number, iter: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphbin */ +int imProcessBinMorphErode(const imImage* src_image, imImage* dst_image, int kernel_size, int iter); + +/** Binary morphology convolution with a kernel full of "0"s and hit black. + * + * \verbatim im.ProcessBinMorphDilate(src_image: imImage, dst_image: imImage, kernel_size: number, iter: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessBinMorphDilateNew(image: imImage, kernel_size: number, iter: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphbin */ +int imProcessBinMorphDilate(const imImage* src_image, imImage* dst_image, int kernel_size, int iter); + +/** Erode+Dilate. + * When iteration is more than one it means Erode+Erode+Erode+...+Dilate+Dilate+Dilate+... + * + * \verbatim im.ProcessBinMorphOpen(src_image: imImage, dst_image: imImage, kernel_size: number, iter: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessBinMorphOpenNew(image: imImage, kernel_size: number, iter: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphbin */ +int imProcessBinMorphOpen(const imImage* src_image, imImage* dst_image, int kernel_size, int iter); + +/** Dilate+Erode. + * + * \verbatim im.ProcessBinMorphClose(src_image: imImage, dst_image: imImage, kernel_size: number, iter: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessBinMorphCloseNew(image: imImage, kernel_size: number, iter: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphbin */ +int imProcessBinMorphClose(const imImage* src_image, imImage* dst_image, int kernel_size, int iter); + +/** Erode+Difference. \n + * The difference from the source image is applied only once. + * + * \verbatim im.ProcessBinMorphOutline(src_image: imImage, dst_image: imImage, kernel_size: number, iter: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessBinMorphOutlineNew(image: imImage, kernel_size: number, iter: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphbin */ +int imProcessBinMorphOutline(const imImage* src_image, imImage* dst_image, int kernel_size, int iter); + +/** Thins the supplied binary image using Rosenfeld's parallel thinning algorithm. \n + * Reference: \n + * "Efficient Binary Image Thinning using Neighborhood Maps" \n + * by Joseph M. Cychosz, 3ksnn64@ecn.purdue.edu \n + * in "Graphics Gems IV", Academic Press, 1994 + * + * \verbatim im.ProcessBinMorphThin(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessBinMorphThinNew(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup morphbin */ +void imProcessBinMorphThin(const imImage* src_image, imImage* dst_image); + + + +/** \defgroup rank Rank Convolution Operations + * \par + * All the rank convolution use the same base function. Near the border the base function + * includes only the real image pixels in the rank. No border extensions are used. + * \par + * See \ref im_process_loc.h + * \ingroup process */ + +/** Rank convolution using the median value. \n + * Returns zero if the counter aborted. \n + * Supports all data types except IM_CFLOAT. Can be applied on color images. + * + * \verbatim im.ProcessMedianConvolve(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessMedianConvolveNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup rank */ +int imProcessMedianConvolve(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Rank convolution using (maximum-minimum) value. \n + * Returns zero if the counter aborted. \n + * Supports all data types except IM_CFLOAT. Can be applied on color images. + * + * \verbatim im.ProcessRangeConvolve(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRangeConvolveNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup rank */ +int imProcessRangeConvolve(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Rank convolution using the closest maximum or minimum value. \n + * Returns zero if the counter aborted. \n + * Supports all data types except IM_CFLOAT. Can be applied on color images. + * + * \verbatim im.ProcessRankClosestConvolve(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRankClosestConvolveNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup rank */ +int imProcessRankClosestConvolve(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Rank convolution using the maximum value. \n + * Returns zero if the counter aborted. \n + * Supports all data types except IM_CFLOAT. Can be applied on color images. + * + * \verbatim im.ProcessRankMaxConvolve(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRankMaxConvolveNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup rank */ +int imProcessRankMaxConvolve(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Rank convolution using the minimum value. \n + * Returns zero if the counter aborted. \n + * Supports all data types except IM_CFLOAT. Can be applied on color images. + * + * \verbatim im.ProcessRankMinConvolve(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRankMinConvolveNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup rank */ +int imProcessRankMinConvolve(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Threshold using a rank convolution with a range contrast function. \n + * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny. \n + * Local variable threshold by the method of Bernsen. \n + * Extracted from XITE, Copyright 1991, Blab, UiO \n + * http://www.ifi.uio.no/~blab/Software/Xite/ +\verbatim + Reference: + Bernsen, J: "Dynamic thresholding of grey-level images" + Proc. of the 8th ICPR, Paris, Oct 1986, 1251-1255. + Author: Oivind Due Trier +\endverbatim + * Returns zero if the counter aborted. + * + * \verbatim im.ProcessRangeContrastThreshold(src_image: imImage, dst_image: imImage, kernel_size: number, min_range: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRangeContrastThresholdNew(image: imImage, kernel_size: number, min_range: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +int imProcessRangeContrastThreshold(const imImage* src_image, imImage* dst_image, int kernel_size, int min_range); + +/** Threshold using a rank convolution with a local max function. \n + * Returns zero if the counter aborted. \n + * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny. + * + * \verbatim im.ProcessLocalMaxThreshold(src_image: imImage, dst_image: imImage, kernel_size: number, min_level: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessLocalMaxThresholdNew(image: imImage, kernel_size: number, min_level: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +int imProcessLocalMaxThreshold(const imImage* src_image, imImage* dst_image, int kernel_size, int min_level); + + + +/** \defgroup convolve Convolution Operations + * \par + * See \ref im_process_loc.h + * \ingroup process */ + +/** Base Convolution with a kernel. \n + * Kernel can be IM_INT or IM_FLOAT, but always IM_GRAY. Use kernel size odd for better results. \n + * Supports all data types. The border is mirrored. \n + * Returns zero if the counter aborted. Most of the convolutions use this function.\n + * If the kernel image attribute "Description" exists it is used by the counter. + * + * \verbatim im.ProcessConvolve(src_image: imImage, dst_image: imImage, kernel: imImage) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessConvolveNew(image: imImage, kernel: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessConvolve(const imImage* src_image, imImage* dst_image, const imImage* kernel); + +/** Base convolution when the kernel is separable. Only the first line and the first column will be used. \n + * Returns zero if the counter aborted.\n + * If the kernel image attribute "Description" exists it is used by the counter. + * + * \verbatim im.ProcessConvolveSep(src_image: imImage, dst_image: imImage, kernel: imImage) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessConvolveSepNew(image: imImage, kernel: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessConvolveSep(const imImage* src_image, imImage* dst_image, const imImage* kernel); + +/** Base Convolution with two kernels. The result is the magnitude of the result of each convolution. \n + * Kernel can be IM_INT or IM_FLOAT, but always IM_GRAY. Use kernel size odd for better results. \n + * Supports all data types. The border is mirrored. \n + * Returns zero if the counter aborted. Most of the convolutions use this function.\n + * If the kernel image attribute "Description" exists it is used by the counter. + * + * \verbatim im.ProcessConvolveDual(src_image: imImage, dst_image: imImage, kernel1, kernel2: imImage) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessConvolveDualNew(image: imImage, kernel1, kernel2: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessConvolveDual(const imImage* src_image, imImage* dst_image, const imImage *kernel1, const imImage *kernel2); + +/** Repeats the convolution a number of times. \n + * Returns zero if the counter aborted.\n + * If the kernel image attribute "Description" exists it is used by the counter. + * + * \verbatim im.ProcessConvolveRep(src_image: imImage, dst_image: imImage, kernel: imImage, count: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessConvolveRepNew(image: imImage, kernel: imImage, count: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessConvolveRep(const imImage* src_image, imImage* dst_image, const imImage* kernel, int count); + +/** Convolve with a kernel rotating it 8 times and getting the absolute maximum value. \n + * Kernel must be square. \n + * The rotation is implemented only for kernel sizes 3x3, 5x5 and 7x7. \n + * Supports all data types except IM_CFLOAT. + * Returns zero if the counter aborted.\n + * If the kernel image attribute "Description" exists it is used by the counter. + * + * \verbatim im.ProcessCompassConvolve(src_image: imImage, dst_image: imImage, kernel: imImage) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessCompassConvolveNew(image: imImage, kernel: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessCompassConvolve(const imImage* src_image, imImage* dst_image, imImage* kernel); + +/** Utility function to rotate a kernel one time. + * + * \verbatim im.ProcessRotateKernel(kernel: imImage) [in Lua 5] \endverbatim + * \ingroup convolve */ +void imProcessRotateKernel(imImage* kernel); + +/** Difference(Gaussian1, Gaussian2). \n + * Supports all data types, + * but if source is IM_BYTE or IM_USHORT destiny image must be of type IM_INT. + * + * \verbatim im.ProcessDiffOfGaussianConvolve(src_image: imImage, dst_image: imImage, stddev1: number, stddev2: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessDiffOfGaussianConvolveNew(image: imImage, stddev1: number, stddev2: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessDiffOfGaussianConvolve(const imImage* src_image, imImage* dst_image, float stddev1, float stddev2); + +/** Convolution with a laplacian of a gaussian kernel. \n + * Supports all data types, + * but if source is IM_BYTE or IM_USHORT destiny image must be of type IM_INT. + * + * \verbatim im.ProcessLapOfGaussianConvolve(src_image: imImage, dst_image: imImage, stddev: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessLapOfGaussianConvolveNew(image: imImage, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessLapOfGaussianConvolve(const imImage* src_image, imImage* dst_image, float stddev); + +/** Convolution with a kernel full of "1"s inside a circle. \n + * Supports all data types. + * + * \verbatim im.ProcessMeanConvolve(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessMeanConvolveNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessMeanConvolve(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Convolution with a float gaussian kernel. \n + * If sdtdev is negative its magnitude will be used as the kernel size. \n + * Supports all data types. + * + * \verbatim im.ProcessGaussianConvolve(src_image: imImage, dst_image: imImage, stddev: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessGaussianConvolveNew(image: imImage, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessGaussianConvolve(const imImage* src_image, imImage* dst_image, float stddev); + +/** Convolution with a barlett kernel. \n + * Supports all data types. + * + * \verbatim im.ProcessBarlettConvolve(src_image: imImage, dst_image: imImage, kernel_size: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessBarlettConvolveNew(image: imImage, kernel_size: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessBarlettConvolve(const imImage* src_image, imImage* dst_image, int kernel_size); + +/** Magnitude of the sobel convolution. \n + * Supports all data types. + * + * \verbatim im.ProcessSobelConvolve(src_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessSobelConvolveNew(image: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessSobelConvolve(const imImage* src_image, imImage* dst_image); + +/** Magnitude of the prewitt convolution. \n + * Supports all data types. + * + * \verbatim im.ProcessPrewittConvolve(src_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessPrewittConvolveNew(image: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessPrewittConvolve(const imImage* src_image, imImage* dst_image); + +/** Spline edge dectection. \n + * Supports all data types. + * + * \verbatim im.ProcessSplineEdgeConvolve(src_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessSplineEdgeConvolveNew(image: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessSplineEdgeConvolve(const imImage* src_image, imImage* dst_image); + +/** Finds the zero crossings of IM_INT and IM_FLOAT images. Crossings are marked with non zero values + * indicating the intensity of the edge. It is usually used after a second derivative, laplace. \n + * Extracted from XITE, Copyright 1991, Blab, UiO \n + * http://www.ifi.uio.no/~blab/Software/Xite/ + * + * \verbatim im.ProcessZeroCrossing(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessZeroCrossingNew(image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +void imProcessZeroCrossing(const imImage* src_image, imImage* dst_image); + +/** First part of the Canny edge detector. Includes the gaussian filtering and the nonmax suppression. \n + * After using this you could apply a Hysteresis Threshold, see \ref imProcessHysteresisThreshold. \n + * Image must be IM_BYTE/IM_GRAY. \n + * Implementation from the book: + \verbatim + J. R. Parker + "Algoritms for Image Processing and Computer Vision" + WILEY + \endverbatim + * + * \verbatim im.ProcessCanny(src_image: imImage, dst_image: imImage, stddev: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessCannyNew(image: imImage, stddev: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +void imProcessCanny(const imImage* src_image, imImage* dst_image, float stddev); + +/** Calculates the kernel size given the standard deviation. \n + * If sdtdev is negative its magnitude will be used as the kernel size. + * + * \verbatim im.GaussianStdDev2KernelSize(stddev: number) -> kernel_size: number [in Lua 5] \endverbatim + * \ingroup convolve */ +int imGaussianStdDev2KernelSize(float stddev); + +/** Calculates the standard deviation given the kernel size. + * + * \verbatim im.GaussianKernelSize2StdDev(kernel_size: number) -> stddev: number [in Lua 5] \endverbatim + * \ingroup convolve */ +float imGaussianKernelSize2StdDev(int kernel_size); + +/** Edge enhancement using Unsharp mask. stddev control the gaussian filter, + * amount controls how much the edges will enhance the image (0 new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessUnsharp(const imImage* src_image, imImage* dst_image, float stddev, float amount, float threshold); + +/** Edge enhancement using Laplacian8 mask. + * amount controls how much the edges will enhance the image (0 new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessSharp(const imImage* src_image, imImage* dst_image, float amount, float threshold); + +/** Edge enhancement using a given kernel. + * If kernel has all positive values, then the unsharp technique is used, else sharp is used. + * amount controls how much the edges will enhance the image (0 new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessSharpKernel(const imImage* src_image, const imImage* kernel, imImage* dst_image, float amount, float threshold); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_process_pon.h b/im/include/im_process_pon.h new file mode 100755 index 0000000..0611cc6 --- /dev/null +++ b/im/include/im_process_pon.h @@ -0,0 +1,720 @@ +/** \file + * \brief Image Processing - Pontual Operations + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_PROCESS_PON_H +#define __IM_PROCESS_PON_H + +#include "im_image.h" + +#if defined(__cplusplus) +extern "C" { +#endif + + + +/** \defgroup arithm Arithmetic Operations + * \par + * Simple math operations for images. + * \par + * See \ref im_process_pon.h + * \ingroup process */ + +/** Unary Arithmetic Operations. \n + * Inverse and log may lead to math exceptions. + * \ingroup arithm */ +enum imUnaryOp { + IM_UN_EQL, /**< equal = a */ + IM_UN_ABS, /**< abssolute = |a| */ + IM_UN_LESS, /**< less = -a */ + IM_UN_INV, /**< invert = 1/a (#) */ + IM_UN_SQR, /**< square = a*a */ + IM_UN_SQRT, /**< square root = a^(1/2) */ + IM_UN_LOG, /**< natural logarithm = ln(a) (#) */ + IM_UN_EXP, /**< exponential = exp(a) */ + IM_UN_SIN, /**< sine = sin(a) */ + IM_UN_COS, /**< cosine = cos(a) */ + IM_UN_CONJ, /**< complex conjugate = ar - ai*i */ + IM_UN_CPXNORM /**< complex normalization by magnitude = a / cpxmag(a) */ +}; + +/** Apply an arithmetic unary operation. \n + * Can be done in place, images must match size. \n + * Destiny image can be several types depending on source: \n + * \li byte -> byte, ushort, int, float + * \li ushort -> byte, ushort, int, float + * \li int -> byte, ushort, int, float + * \li float -> float + * \li complex -> complex + * If destiny is byte, then the result is cropped to 0-255. + * + * \verbatim im.ProcessUnArithmeticOp(src_image: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessUnArithmeticOpNew(image: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup arithm */ +void imProcessUnArithmeticOp(const imImage* src_image, imImage* dst_image, int op); + +/** Binary Arithmetic Operations. \n + * Divide may lead to math exceptions. + * \ingroup arithm */ +enum imBinaryOp { + IM_BIN_ADD, /**< add = a+b */ + IM_BIN_SUB, /**< subtract = a-b */ + IM_BIN_MUL, /**< multiply = a*b */ + IM_BIN_DIV, /**< divide = a/b (#) */ + IM_BIN_DIFF, /**< difference = |a-b| */ + IM_BIN_POW, /**< power = a^b */ + IM_BIN_MIN, /**< minimum = (a < b)? a: b */ + IM_BIN_MAX /**< maximum = (a > b)? a: b */ +}; + +/** Apply a binary arithmetic operation. \n + * Can be done in place, images must match size. \n + * Source images must match type, destiny image can be several types depending on source: \n + * \li byte -> byte, ushort, int, float + * \li ushort -> ushort, int, float + * \li int -> int, float + * \li float -> float + * \li complex -> complex + * One exception is that you can combine complex with float resulting complex. + * If destiny is byte, then the result is cropped to 0-255. + * + * \verbatim im.ProcessArithmeticOp(src_image1: imImage, src_image2: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessArithmeticOpNew(image1: imImage, image2: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim + * The New function will create a new image of the same type of the source images. + * \ingroup arithm */ +void imProcessArithmeticOp(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int op); + +/** Apply a binary arithmetic operation with a constant value. \n + * Can be done in place, images must match size. \n + * Destiny image can be several types depending on source: \n + * \li byte -> byte, ushort, int, float + * \li ushort -> byte, ushort, int, float + * \li int -> byte, ushort, int, float + * \li float -> float + * \li complex -> complex + * The constant value is type casted to an apropriate type before the operation. + * If destiny is byte, then the result is cropped to 0-255. + * + * \verbatim im.ProcessArithmeticConstOp(src_image: imImage, src_const: number, dst_image: imImage, op: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessArithmeticConstOpNew(image: imImage, src_const: number, op: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup arithm */ +void imProcessArithmeticConstOp(const imImage* src_image, float src_const, imImage* dst_image, int op); + +/** Blend two images using an alpha value = [a * alpha + b * (1 - alpha)]. \n + * Can be done in place, images must match size and type. \n + * alpha value must be in the interval [0.0 - 1.0]. + * + * \verbatim im.ProcessBlendConst(src_image1: imImage, src_image2: imImage, dst_image: imImage, alpha: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessBlendConstNew(image1: imImage, image2: imImage, alpha: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup arithm */ +void imProcessBlendConst(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, float alpha); + +/** Blend two images using an alpha channel = [a * alpha + b * (1 - alpha)]. \n + * Can be done in place, images must match size and type. \n + * alpha_image must have the same data type except for complex images that must be float, and color_space must be IM_GRAY. + * integer alpha values must be: +\verbatim +0 - 255 IM_BYTE +0 - 65535 IM_USHORT +0 - 2147483647 IM_INT +\endverbatim + * that will be normalized to 0 - 1. + * \verbatim im.ProcessBlend(src_image1: imImage, src_image2: imImage, alpha_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessBlendNew(image1: imImage, image2: imImage, alpha_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup arithm */ +void imProcessBlend(const imImage* src_image1, const imImage* src_image2, const imImage* alpha_image, imImage* dst_image); + +/** Split a complex image into two images with real and imaginary parts \n + * or magnitude and phase parts (polar). \n + * Source image must be IM_CFLOAT, destiny images must be IM_FLOAT. + * + * \verbatim im.ProcessSplitComplex(src_image: imImage, dst_image1: imImage, dst_image2: imImage, polar: boolean) [in Lua 5] \endverbatim + * \verbatim im.ProcessSplitComplexNew(image: imImage, polar: boolean) -> dst_image1: imImage, dst_image2: imImage [in Lua 5] \endverbatim + * \ingroup arithm */ +void imProcessSplitComplex(const imImage* src_image, imImage* dst_image1, imImage* dst_image2, int polar); + +/** Merges two images as the real and imaginary parts of a complex image, \n + * or as magnitude and phase parts (polar = 1). \n + * Source images must be IM_FLOAT, destiny image must be IM_CFLOAT. + * + * \verbatim im.ProcessMergeComplex(src_image1: imImage, src_image2: imImage, dst_image: imImage, polar: boolean) [in Lua 5] \endverbatim + * \verbatim im.ProcessMergeComplexNew(image1: imImage, image2: imImage, polar: boolean) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup arithm */ +void imProcessMergeComplex(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int polar); + +/** Calculates the mean of multiple images. \n + * Images must match size and type. + * + * \verbatim im.ProcessMultipleMean(src_image_list: table of imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessMultipleMeanNew(src_image_list: table of imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup arithm */ +void imProcessMultipleMean(const imImage** src_image_list, int src_image_count, imImage* dst_image); + +/** Calculates the standard deviation of multiple images. \n + * Images must match size and type. Use \ref imProcessMultipleMean to calculate the mean_image. + * + * \verbatim im.ProcessMultipleStdDev(src_image_list: table of imImage, mean_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessMultipleStdDevNew(src_image_list: table of imImage, mean_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup arithm */ +void imProcessMultipleStdDev(const imImage** src_image_list, int src_image_count, const imImage *mean_image, imImage* dst_image); + +/** Calculates the auto-covariance of an image with the mean of a set of images. \n + * Images must match size and type. Returns zero if the counter aborted. \n + * Destiny is IM_FLOAT. + * + * \verbatim im.ProcessAutoCovariance(src_image: imImage, mean_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessAutoCovarianceNew(src_image: imImage, mean_image: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup arithm */ +int imProcessAutoCovariance(const imImage* src_image, const imImage* mean_image, imImage* dst_image); + +/** Multiplies the conjugate of one complex image with another complex image. \n + * Images must match size. Conj(img1) * img2 \n + * Can be done in-place. + * + * \verbatim im.ProcessMultiplyConj(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessMultiplyConjNew(src_image1: imImage, src_image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup arithm */ +void imProcessMultiplyConj(const imImage* src_image1, const imImage* src_image2, imImage* dst_image); + + + +/** \defgroup quantize Additional Image Quantization Operations + * \par + * Additionally operations to the \ref imConvertColorSpace function. + * \par + * See \ref im_process_pon.h + * \ingroup process */ + +/** Converts a RGB image to a MAP image using uniform quantization + * with an optional 8x8 ordered dither. The RGB image must have data type IM_BYTE. + * + * \verbatim im.ProcessQuantizeRGBUniform(src_image: imImage, dst_image: imImage, do_dither: boolean) [in Lua 5] \endverbatim + * \verbatim im.ProcessQuantizeRGBUniformNew(src_image: imImage, do_dither: boolean) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup quantize */ +void imProcessQuantizeRGBUniform(const imImage* src_image, imImage* dst_image, int do_dither); + +/** Quantizes a gray scale image in less that 256 grays using uniform quantization. \n + * Both images must be IM_BYTE/IM_GRAY. Can be done in place. + * + * \verbatim im.ProcessQuantizeGrayUniform(src_image: imImage, dst_image: imImage, grays: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessQuantizeGrayUniformNew(src_image: imImage, grays: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup quantize */ +void imProcessQuantizeGrayUniform(const imImage* src_image, imImage* dst_image, int grays); + + + +/** \defgroup histo Histogram Based Operations + * \par + * See \ref im_process_pon.h + * \ingroup process */ + +/** Performs an histogram expansion based on a percentage of the number of pixels. \n + * Percentage defines an amount of pixels to include at the lowest level and at the highest level. + * If its is zero only empty counts of the histogram will be considered. \n + * Images must be IM_BYTE/(IM_RGB or IM_GRAY). Can be done in place. \n + * To expand the gammut without using the histogram, by just specifing the lowest and highest levels + * use the \ref IM_GAMUT_EXPAND tone gammut operation (\ref imProcessToneGamut). + * + * \verbatim im.ProcessExpandHistogram(src_image: imImage, dst_image: imImage, percent: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessExpandHistogramNew(src_image: imImage, percent: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup histo */ +void imProcessExpandHistogram(const imImage* src_image, imImage* dst_image, float percent); + +/** Performs an histogram equalization. \n + * Images must be IM_BYTE/(IM_RGB or IM_GRAY). Can be done in place. + * + * \verbatim im.ProcessEqualizeHistogram(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessEqualizeHistogramNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup histo */ +void imProcessEqualizeHistogram(const imImage* src_image, imImage* dst_image); + + + +/** \defgroup colorproc Color Processing Operations + * \par + * Operations to change the color components configuration. + * \par + * See \ref im_process_pon.h + * \ingroup process */ + +/** Split a RGB image into luma and chroma. \n + * Chroma is calculated as R-Y,G-Y,B-Y. Source image must be IM_RGB/IM_BYTE. \n + * luma image is IM_GRAY/IM_BYTE and chroma is IM_RGB/IM_BYTE. \n + * Source and destiny must have the same size. + * + * \verbatim im.ProcessSplitYChroma(src_image: imImage, y_image: imImage, chroma_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessSplitYChromaNew(src_image: imImage) -> y_image: imImage, chroma_image: imImage [in Lua 5] \endverbatim + * \ingroup colorproc */ +void imProcessSplitYChroma(const imImage* src_image, imImage* y_image, imImage* chroma_image); + +/** Split a RGB image into HSI planes. \n + * Source image must be IM_RGB/IM_BYTE,IM_FLOAT. Destiny images are all IM_GRAY/IM_FLOAT. \n + * Source images must normalized to 0-1 if type is IM_FLOAT (\ref imProcessToneGamut can be used). See \ref hsi for a definition of the color conversion.\n + * Source and destiny must have the same size. + * + * \verbatim im.ProcessSplitHSI(src_image: imImage, h_image: imImage, s_image: imImage, i_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessSplitHSINew(src_image: imImage) -> h_image: imImage, s_image: imImage, i_image: imImage [in Lua 5] \endverbatim + * \ingroup colorproc */ +void imProcessSplitHSI(const imImage* src_image, imImage* h_image, imImage* s_image, imImage* i_image); + +/** Merge HSI planes into a RGB image. \n + * Source images must be IM_GRAY/IM_FLOAT. Destiny image can be IM_RGB/IM_BYTE,IM_FLOAT. \n + * Source and destiny must have the same size. See \ref hsi for a definition of the color conversion. + * + * \verbatim im.ProcessMergeHSI(h_image: imImage, s_image: imImage, i_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessMergeHSINew(h_image: imImage, s_image: imImage, i_image: imImage) -> dst_image: imImage [in Lua 5] \endverbatim + * \ingroup colorproc */ +void imProcessMergeHSI(const imImage* h_image, const imImage* s_image, const imImage* i_image, imImage* dst_image); + +/** Split a multicomponent image into separate components.\n + * Destiny images must be IM_GRAY. Size and data types must be all the same.\n + * The number of destiny images must match the depth of the source image. + * + * \verbatim im.ProcessSplitComponents(src_image: imImage, dst_image_list: table of imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessSplitComponentsNew(src_image: imImage) -> dst_image_list: table of imImage [in Lua 5] \endverbatim + * \ingroup colorproc */ +void imProcessSplitComponents(const imImage* src_image, imImage** dst_image_list); + +/** Merges separate components into a multicomponent image.\n + * Source images must be IM_GRAY. Size and data types must be all the same.\n + * The number of source images must match the depth of the destiny image. + * + * \verbatim im.ProcessMergeComponents(src_image_list: table of imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessMergeComponentsNew(src_image_list: table of imImage) -> dst_image: imImage [in Lua 5] \endverbatim + * \ingroup colorproc */ +void imProcessMergeComponents(const imImage** src_image_list, imImage* dst_image); + +/** Normalize the color components by their sum. Example: c1 = c1/(c1+c2+c3). \n + * Destiny image must be IM_FLOAT. + * + * \verbatim im.ProcessNormalizeComponents(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessNormalizeComponentsNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup colorproc */ +void imProcessNormalizeComponents(const imImage* src_image, imImage* dst_image); + +/** Replaces the source color by the destiny color. \n + * The color will be type casted to the image data type. \n + * The colors must have the same number of components of the images. \n + * Supports all color spaces and all data types except IM_CFLOAT. + * + * \verbatim im.ProcessReplaceColor(src_image: imImage, dst_image: imImage, src_color: table of numbers, dst_color: table of numbers) [in Lua 5] \endverbatim + * \verbatim im.ProcessReplaceColorNew(src_image: imImage, src_color: table of numbers, dst_color: table of numbers) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup colorproc */ +void imProcessReplaceColor(const imImage* src_image, imImage* dst_image, float* src_color, float* dst_color); + + + +/** \defgroup logic Logical Arithmetic Operations + * \par + * Logical binary math operations for images. + * \par + * See \ref im_process_pon.h + * \ingroup process */ + +/** Logical Operations. + * \ingroup logic */ +enum imLogicOp { + IM_BIT_AND, /**< and = a & b */ + IM_BIT_OR, /**< or = a | b */ + IM_BIT_XOR /**< xor = ~(a | b) */ +}; + +/** Apply a logical operation.\n + * Images must have data type IM_BYTE, IM_USHORT or IM_INT. Can be done in place. + * + * \verbatim im.ProcessBitwiseOp(src_image1: imImage, src_image2: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessBitwiseOpNew(src_image1: imImage, src_image2: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup logic */ +void imProcessBitwiseOp(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int op); + +/** Apply a logical NOT operation.\n + * Images must have data type IM_BYTE, IM_USHORT or IM_INT. Can be done in place. + * + * \verbatim im.ProcessBitwiseNot(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessBitwiseNotNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup logic */ +void imProcessBitwiseNot(const imImage* src_image, imImage* dst_image); + +/** Apply a bit mask. \n + * The same as imProcessBitwiseOp but the second image is replaced by a fixed mask. \n + * Images must have data type IM_BYTE. It is valid only for AND, OR and XOR. Can be done in place. + * + * \verbatim im.ProcessBitMask(src_image: imImage, dst_image: imImage, mask: string, op: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessBitMaskNew(src_image: imImage, mask: string, op: number) -> new_image: imImage [in Lua 5] \endverbatim + * In Lua, mask is a string with 0s and 1s, for example: "11001111". + * \ingroup logic */ +void imProcessBitMask(const imImage* src_image, imImage* dst_image, unsigned char mask, int op); + +/** Extract or Reset a bit plane. For ex: 000X0000 or XXX0XXXX (plane=3).\n + * Images must have data type IM_BYTE. Can be done in place. + * + * \verbatim im.ProcessBitPlane(src_image: imImage, dst_image: imImage, plane: number, do_reset: boolean) [in Lua 5] \endverbatim + * \verbatim im.ProcessBitPlaneNew(src_image: imImage, plane: number, do_reset: boolean) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup logic */ +void imProcessBitPlane(const imImage* src_image, imImage* dst_image, int plane, int do_reset); + + + +/** \defgroup render Synthetic Image Render + * \par + * Renders some 2D mathematical functions as images. All the functions operates in place + * and supports all data types except IM_CFLOAT. + * \par + * See \ref im_process_pon.h + * \ingroup process */ + +/** Render Funtion. + * \verbatim render_func(x: number, y: number, d: number, param: table of number) -> value: number [in Lua 5] \endverbatim + * \ingroup render */ +typedef float (*imRenderFunc)(int x, int y, int d, float* param); + +/** Render Conditional Funtion. + * \verbatim render_cond_func(x: number, y: number, d: number, param: table of number) -> value: number, cond: boolean [in Lua 5] \endverbatim + * \ingroup render */ +typedef float (*imRenderCondFunc)(int x, int y, int d, int *cond, float* param); + +/** Render a synthetic image using a render function. \n + * plus will make the render be added to the current image data, + * or else all data will be replaced. All the render functions use this or the conditional function. \n + * Returns zero if the counter aborted. + * + * \verbatim im.ProcessRenderOp(image: imImage, render_func: function, render_name: string, param: table of number, plus: boolean) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderOp(imImage* image, imRenderFunc render_func, char* render_name, float* param, int plus); + +/** Render a synthetic image using a conditional render function. \n + * Data will be rendered only if the condional param is true. \n + * Returns zero if the counter aborted. + * + * \verbatim im.ProcessRenderCondOp(image: imImage, render_cond_func: function, render_name: string, param: table of number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderCondOp(imImage* image, imRenderCondFunc render_cond_func, char* render_name, float* param); + +/** Render speckle noise on existing data. Can be done in place. + * + * \verbatim im.ProcessRenderAddSpeckleNoise(src_image: imImage, dst_image: imImage, percent: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRenderAddSpeckleNoiseNew(src_image: imImage, percent: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderAddSpeckleNoise(const imImage* src_image, imImage* dst_image, float percent); + +/** Render gaussian noise on existing data. Can be done in place. + * + * \verbatim im.ProcessRenderAddGaussianNoise(src_image: imImage, dst_image: imImage, mean: number, stddev: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRenderAddGaussianNoiseNew(src_image: imImage, mean: number, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderAddGaussianNoise(const imImage* src_image, imImage* dst_image, float mean, float stddev); + +/** Render uniform noise on existing data. Can be done in place. + * + * \verbatim im.ProcessRenderAddUniformNoise(src_image: imImage, dst_image: imImage, mean: number, stddev: number) -> counter: boolean [in Lua 5] \endverbatim + * \verbatim im.ProcessRenderAddUniformNoiseNew(src_image: imImage, mean: number, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderAddUniformNoise(const imImage* src_image, imImage* dst_image, float mean, float stddev); + +/** Render random noise. + * + * \verbatim im.ProcessRenderRandomNoise(image: imImage) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderRandomNoise(imImage* image); + +/** Render a constant. The number of values must match the depth of the image. + * + * \verbatim im.ProcessRenderConstant(image: imImage, value: table of number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderConstant(imImage* image, float* value); + +/** Render a centered wheel. + * + * \verbatim im.ProcessRenderWheel(image: imImage, internal_radius: number, external_radius: number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderWheel(imImage* image, int internal_radius, int external_radius); + +/** Render a centered cone. + * + * \verbatim im.ProcessRenderCone(image: imImage, radius: number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderCone(imImage* image, int radius); + +/** Render a centered tent. + * + * \verbatim im.ProcessRenderTent(image: imImage, tent_width: number, tent_height: number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderTent(imImage* image, int tent_width, int tent_height); + +/** Render a ramp. Direction can be vertical (1) or horizontal (0). + * + * \verbatim im.ProcessRenderRamp(image: imImage, start: number, end: number, vert_dir: boolean) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderRamp(imImage* image, int start, int end, int vert_dir); + +/** Render a centered box. + * + * \verbatim im.ProcessRenderBox(image: imImage, box_width: number, box_height: number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderBox(imImage* image, int box_width, int box_height); + +/** Render a centered sinc. + * + * \verbatim im.ProcessRenderSinc(image: imImage, x_period: number, y_period: number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderSinc(imImage* image, float x_period, float y_period); + +/** Render a centered gaussian. + * + * \verbatim im.ProcessRenderGaussian(image: imImage, stddev: number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderGaussian(imImage* image, float stddev); + +/** Render the laplacian of a centered gaussian. + * + * \verbatim im.ProcessRenderLapOfGaussian(image: imImage, stddev: number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderLapOfGaussian(imImage* image, float stddev); + +/** Render a centered cosine. + * + * \verbatim im.ProcessRenderCosine(image: imImage, x_period: number, y_period: number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderCosine(imImage* image, float x_period, float y_period); + +/** Render a centered grid. + * + * \verbatim im.ProcessRenderGrid(image: imImage, x_space: number, y_space: number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderGrid(imImage* image, int x_space, int y_space); + +/** Render a centered chessboard. + * + * \verbatim im.ProcessRenderChessboard(image: imImage, x_space: number, y_space: number) -> counter: boolean [in Lua 5] \endverbatim + * \ingroup render */ +int imProcessRenderChessboard(imImage* image, int x_space, int y_space); + + + +/** \defgroup tonegamut Tone Gamut Operations + * \par + * Operations that try to preserve the min-max interval in the output (the dynamic range). + * \par + * See \ref im_process_pon.h + * \ingroup process */ + + +/** Tone Gamut Operations. + * \ingroup tonegamut */ +enum imToneGamut { + IM_GAMUT_NORMALIZE, /**< normalize = (a-min) / (max-min) (destiny image must be IM_FLOAT) */ + IM_GAMUT_POW, /**< pow = ((a-min) / (max-min))^gamma * (max-min) + min \n + param[0]=gamma */ + IM_GAMUT_LOG, /**< log = log(K * (a-min) / (max-min) + 1))*(max-min)/log(K+1) + min \n + param[0]=K (K>0) */ + IM_GAMUT_EXP, /**< exp = (exp(K * (a-min) / (max-min)) - 1))*(max-min)/(exp(K)-1) + min \n + param[0]=K */ + IM_GAMUT_INVERT, /**< invert = max - (a-min) */ + IM_GAMUT_ZEROSTART, /**< zerostart = a - min */ + IM_GAMUT_SOLARIZE, /**< solarize = a < level ? a: (level * (max-min) - a * (level-min)) / (max-level) \n + param[0]=level percentage (0-100) relative to min-max \n + photography solarization effect. */ + IM_GAMUT_SLICE, /**< slice = start < a || a > end ? min: binarize? max: a \n + param[0]=start, param[1]=end, param[2]=binarize */ + IM_GAMUT_EXPAND, /**< expand = a < start ? min: a > end ? max : (a-start)*(max-min)/(end-start) + min \n + param[0]=start, param[1]=end */ + IM_GAMUT_CROP, /**< crop = a < start ? start: a > end ? end : a \n + param[0]=start, param[1]=end */ + IM_GAMUT_BRIGHTCONT /**< brightcont = a < min ? min: a > max ? max: a * tan(c_a) + b_s + (max-min)*(1 - tan(c_a))/2 \n + param[0]=bright_shift (-100%..+100%), param[1]=contrast_factor (-100%..+100%) \n + change brightness and contrast simultaneously. */ +}; + +/** Apply a gamut operation with arguments. \n + * Supports all data types except IM_CFLOAT. \n + * The linear operation do a special convertion when min > 0 and max < 1, it forces min=0 and max=1. \n + * IM_BYTE images have min=0 and max=255 always. \n + * Can be done in place. When there is no extra params, can use NULL. + * + * \verbatim im.ProcessToneGamut(src_image: imImage, dst_image: imImage, op: number, param: table of number) [in Lua 5] \endverbatim + * \verbatim im.ProcessToneGamutNew(src_image: imImage, op: number, param: table of number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup tonegamut */ +void imProcessToneGamut(const imImage* src_image, imImage* dst_image, int op, float* param); + +/** Converts from (0-1) to (0-255), crop out of bounds values. \n + * Source image must be IM_FLOAT, and destiny image must be IM_BYTE. + * + * \verbatim im.ProcessUnNormalize(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessUnNormalizeNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup tonegamut */ +void imProcessUnNormalize(const imImage* src_image, imImage* dst_image); + +/** Directly converts IM_USHORT, IM_INT and IM_FLOAT into IM_BYTE images. \n + * This can also be done using \ref imConvertDataType with IM_CAST_DIRECT. + * + * \verbatim im.ProcessDirectConv(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessDirectConvNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup tonegamut */ +void imProcessDirectConv(const imImage* src_image, imImage* dst_image); + +/** A negative effect. Uses \ref imProcessToneGamut with IM_GAMUT_INVERT for non MAP images. \n + * Supports all color spaces and all data types except IM_CFLOAT. \n + * Can be done in place. + * + * \verbatim im.ProcessNegative(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessNegativeNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup tonegamut */ +void imProcessNegative(const imImage* src_image, imImage* dst_image); + + + +/** \defgroup threshold Threshold Operations + * \par + * Operations that converts a usually IM_GRAY/IM_BYTE image into a IM_BINARY image using several threshold techniques. + * \par + * See \ref im_process_pon.h + * \ingroup process */ + +/** Apply a manual threshold. \n + * threshold = a <= level ? 0: value \n + * Normal value is 1 but another common value is 255. Can be done in place for IM_BYTE source. \n + * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny. + * + * \verbatim im.ProcessThreshold(src_image: imImage, dst_image: imImage, level: number, value: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessThresholdNew(src_image: imImage, level: number, value: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +void imProcessThreshold(const imImage* src_image, imImage* dst_image, int level, int value); + +/** Apply a threshold by the difference of two images. \n + * threshold = a1 <= a2 ? 0: 1 \n + * Can be done in place. + * + * \verbatim im.ProcessThresholdByDiff(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim + * \verbatim im.ProcessThresholdByDiffNew(src_image1: imImage, src_image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +void imProcessThresholdByDiff(const imImage* src_image1, const imImage* src_image2, imImage* dst_image); + +/** Apply a threshold by the Hysteresis method. \n + * Hysteresis thersholding of edge pixels. Starting at pixels with a + * value greater than the HIGH threshold, trace a connected sequence + * of pixels that have a value greater than the LOW threhsold. \n + * Supports only IM_BYTE images. + * Note: could not find the original source code author name. + * + * \verbatim im.ProcessHysteresisThreshold(src_image: imImage, dst_image: imImage, low_thres: number, high_thres: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessHysteresisThresholdNew(src_image: imImage, low_thres: number, high_thres: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +void imProcessHysteresisThreshold(const imImage* src_image, imImage* dst_image, int low_thres, int high_thres); + +/** Estimates hysteresis low and high threshold levels. \n + * Supports only IM_BYTE images. + * Usefull for \ref imProcessHysteresisThreshold. + * + * \verbatim im.ProcessHysteresisThresEstimate(image: imImage) -> low_level: number, high_level: number [in Lua 5] \endverbatim + * \ingroup threshold */ +void imProcessHysteresisThresEstimate(const imImage* image, int *low_level, int *high_level); + +/** Calculates the threshold level for manual threshold using an uniform error approach. \n + * Supports only IM_BYTE images. + * Extracted from XITE, Copyright 1991, Blab, UiO \n + * http://www.ifi.uio.no/~blab/Software/Xite/ +\verbatim + Reference: + S. M. Dunn & D. Harwood & L. S. Davis: + "Local Estimation of the Uniform Error Threshold" + IEEE Trans. on PAMI, Vol PAMI-6, No 6, Nov 1984. + Comments: It only works well on images whith large objects. + Author: Olav Borgli, BLAB, ifi, UiO + Image processing lab, Department of Informatics, University of Oslo +\endverbatim + * Returns the used level. + * + * \verbatim im.ProcessUniformErrThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim + * \verbatim im.ProcessUniformErrThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +int imProcessUniformErrThreshold(const imImage* src_image, imImage* dst_image); + +/** Apply a dithering on each image channel by using a difusion error method. \n + * It can be applied on any IM_BYTE images. It will "threshold" each channel indivudually, so + * source and destiny must be of the same depth. + * + * \verbatim im.ProcessDifusionErrThreshold(src_image: imImage, dst_image: imImage, level: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessDifusionErrThresholdNew(src_image: imImage, level: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +void imProcessDifusionErrThreshold(const imImage* src_image, imImage* dst_image, int level); + +/** Calculates the threshold level for manual threshold using a percentage of pixels + * that should stay bellow the threshold. \n + * Supports only IM_BYTE images. + * Returns the used level. + * + * \verbatim im.ProcessPercentThreshold(src_image: imImage, dst_image: imImage, percent: number) -> level: number [in Lua 5] \endverbatim + * \verbatim im.ProcessPercentThresholdNew(src_image: imImage, percent: number) -> level: number, new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +int imProcessPercentThreshold(const imImage* src_image, imImage* dst_image, float percent); + +/** Calculates the threshold level for manual threshold using the Otsu approach. \n + * Returns the used level. \n + * Supports only IM_BYTE images. + * Original implementation by Flavio Szenberg. + * + * \verbatim im.ProcessOtsuThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim + * \verbatim im.ProcessOtsuThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +int imProcessOtsuThreshold(const imImage* src_image, imImage* dst_image); + +/** Calculates the threshold level for manual threshold using (max-min)/2. \n + * Returns the used level. \n + * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny. + * + * \verbatim im.ProcessMinMaxThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim + * \verbatim im.ProcessMinMaxThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +int imProcessMinMaxThreshold(const imImage* src_image, imImage* dst_image); + +/** Estimates Local Max threshold level for IM_BYTE images. + * + * \verbatim im.ProcessLocalMaxThresEstimate(image: imImage) -> level: number [in Lua 5] \endverbatim + * \ingroup threshold */ +void imProcessLocalMaxThresEstimate(const imImage* image, int *level); + +/** Apply a manual threshold using an interval. \n + * threshold = start_level <= a <= end_level ? 1: 0 \n + * Normal value is 1 but another common value is 255. Can be done in place for IM_BYTE source. \n + * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny. + * + * \verbatim im.ProcessSliceThreshold(src_image: imImage, dst_image: imImage, start_level: number, end_level: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessSliceThresholdNew(src_image: imImage, start_level: number, end_level: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup threshold */ +void imProcessSliceThreshold(const imImage* src_image, imImage* dst_image, int start_level, int end_level); + + +/** \defgroup effects Special Effects + * \par + * Operations to change image appearance. + * \par + * See \ref im_process_pon.h + * \ingroup process */ + + +/** Generates a zoom in effect averaging colors inside a square region. \n + * Operates only on IM_BYTE images. + * + * \verbatim im.ProcessPixelate(src_image: imImage, dst_image: imImage, box_size: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessPixelateNew(src_image: imImage, box_size: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup effects */ +void imProcessPixelate(const imImage* src_image, imImage* dst_image, int box_size); + +/** A simple Posterize effect. It reduces the number of colors in the image eliminating + * less significant bit planes. Can have 1 to 7 levels. See \ref imProcessBitMask. \n + * Images must have data type IM_BYTE. + * + * \verbatim im.ProcessPosterize(src_image: imImage, dst_image: imImage, level: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessPosterizeNew(src_image: imImage, level: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup effects */ +void imProcessPosterize(const imImage* src_image, imImage* dst_image, int level); + + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_raw.h b/im/include/im_raw.h new file mode 100755 index 0000000..073ad7d --- /dev/null +++ b/im/include/im_raw.h @@ -0,0 +1,34 @@ +/** \file + * \brief RAW File Format + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_RAW_H +#define __IM_RAW_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** Opens a RAW image file. + * See also \ref imErrorCodes. + * + * \verbatim im.FileOpenRaw(file_name: string) -> ifile: imFile, error: number [in Lua 5] \endverbatim + * \ingroup raw */ +imFile* imFileOpenRaw(const char* file_name, int *error); + +/** Creates a RAW image file. + * See also \ref imErrorCodes. + * + * \verbatim im.FileNewRaw(file_name: string) -> ifile: imFile, error: number [in Lua 5] \endverbatim + * \ingroup raw */ +imFile* imFileNewRaw(const char* file_name, int *error); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/im_util.h b/im/include/im_util.h new file mode 100755 index 0000000..7858b39 --- /dev/null +++ b/im/include/im_util.h @@ -0,0 +1,277 @@ +/** \file + * \brief Utilities + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_UTIL_H +#define __IM_UTIL_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/** \defgroup util Utilities + * \par + * See \ref im_util.h + * @{ + */ + +#define IM_MIN(_a, _b) (_a < _b? _a: _b) +#define IM_MAX(_a, _b) (_a > _b? _a: _b) + +/** @} */ + + +/** \defgroup str String Utilities + * \par + * See \ref im_util.h + * \ingroup util */ + +/** Check if the two strings are equal. + * \ingroup str */ +int imStrEqual(const char* str1, const char* str2); + +/** Calculate the size of the string but limited to max_len. + * \ingroup str */ +int imStrNLen(const char* str, int max_len); + +/** Check if the data is a string. + * \ingroup str */ +int imStrCheck(const void* data, int count); + + + +/** \defgroup imageutil Raw Data Utilities + * \par + * See \ref im_util.h + * \ingroup imagerep */ + +/** Returns the size of the data buffer. + * + * \verbatim im.ImageDataSize(width: number, height: number, color_mode: number, data_type: number) -> datasize: number [in Lua 5] \endverbatim + * \ingroup imageutil */ +int imImageDataSize(int width, int height, int color_mode, int data_type); + +/** Returns the size of one line of the data buffer. \n + * This depends if the components are packed. If packed includes all components, if not includes only one. + * + * \verbatim im.ImageLineSize(width: number, color_mode: number, data_type: number) -> linesize: number [in Lua 5] \endverbatim + * \ingroup imageutil */ +int imImageLineSize(int width, int color_mode, int data_type); + +/** Returns the number of elements of one line of the data buffer. \n + * This depends if the components are packed. If packed includes all components, if not includes only one. + * + * \verbatim im.ImageLineCount(width: number, color_mode: number) -> linecount: number [in Lua 5] \endverbatim + * \ingroup imageutil */ +int imImageLineCount(int width, int color_mode); + +/** Check if the combination color_mode+data_type is valid. + * + * \verbatim im.ImageCheckFormat(color_mode: number, data_type: number) -> check: boolean [in Lua 5] \endverbatim + * \ingroup imageutil */ +int imImageCheckFormat(int color_mode, int data_type); + + + +/** \defgroup colorutl Color Utilities + * \par + * See \ref im_util.h + * \ingroup util */ + +/** Encode RGB components in a long for palete usage. \n + * "long" definition is compatible with the CD library definition. + * + * \verbatim im.ColorEncode(red: number, green: number, blue: number) -> color: lightuserdata [in Lua 5] \endverbatim + * \ingroup colorutl */ +long imColorEncode(unsigned char red, unsigned char green, unsigned char blue); + +/** Decode RGB components from a long for palete usage. \n + * "long" definition is compatible with the CD library definition. + * + * \verbatim im.ColorDecode(color: lightuserdata) -> red: number, green: number, blue: number [in Lua 5] \endverbatim + * \ingroup colorutl */ +void imColorDecode(unsigned char *red, unsigned char *green, unsigned char *blue, long color); + + + +/** \defgroup colormodeutl Color Mode Utilities + * \par + * See \ref im_util.h + * \ingroup imagerep */ + +/** Returns the color mode name. + * + * \verbatim im.ColorModeSpaceName(color_mode: number) -> name: string [in Lua 5] \endverbatim + * \ingroup colormodeutl */ +const char* imColorModeSpaceName(int color_mode); + +/** Returns the number of components of the color space including alpha. + * + * \verbatim im.ColorModeDepth(color_mode: number) -> depth: number [in Lua 5] \endverbatim + * \ingroup colormodeutl */ +int imColorModeDepth(int color_mode); + +/** Returns the color space of the color mode. + * + * \verbatim im.ColorModeSpace(color_mode: number) -> color_space: number [in Lua 5] \endverbatim + * \ingroup colormodeutl */ +#define imColorModeSpace(_cm) (_cm & 0xFF) + +/** Check if the two color modes match. Only the color space is compared. + * + * \verbatim im.ColorModeMatch(color_mode1: number, color_mode2: number) -> match: boolean [in Lua 5] \endverbatim + * \ingroup colormodeutl */ +#define imColorModeMatch(_cm1, _cm2) (imColorModeSpace(_cm1) == imColorModeSpace(_cm2)) + +/** Check if the color mode has an alpha channel. + * + * \verbatim im.ColorModeHasAlpha(color_mode: number) -> has_alpha: boolean [in Lua 5] \endverbatim + * \ingroup colormodeutl */ +#define imColorModeHasAlpha(_cm) (_cm & IM_ALPHA) + +/** Check if the color mode components are packed in one plane. + * + * \verbatim im.ColorModeIsPacked(color_mode: number) -> is_packed: boolean [in Lua 5] \endverbatim + * \ingroup colormodeutl */ +#define imColorModeIsPacked(_cm) (_cm & IM_PACKED) + +/** Check if the color mode orients the image from top down to bottom. + * + * \verbatim im.ColorModeIsTopDown(color_mode: number) -> is_top_down: boolean [in Lua 5] \endverbatim + * \ingroup colormodeutl */ +#define imColorModeIsTopDown(_cm) (_cm & IM_TOPDOWN) + +/** Returns the color space of the equivalent display bitmap image. \n + * Original packing and alpha are ignored. Returns IM_RGB, IM_GRAY, IM_MAP or IM_BINARY. + * + * \verbatim im.ColorModeToBitmap(color_mode: number) -> color_space: number [in Lua 5] \endverbatim + * \ingroup colormodeutl */ +int imColorModeToBitmap(int color_mode); + +/** Check if the color mode and data_type defines a display bitmap image. + * + * \verbatim im.ColorModeIsBitmap(color_mode: number, data_type: number) -> is_bitmap: boolean [in Lua 5] \endverbatim + * \ingroup colormodeutl */ +int imColorModeIsBitmap(int color_mode, int data_type); + + + +/** \defgroup datatypeutl Data Type Utilities + * \par + * See \ref im_util.h + * \ingroup util + * @{ + */ + +typedef unsigned char imbyte; +typedef unsigned short imushort; + +#define IM_BYTECROP(_v) (_v < 0? 0: _v > 255? 255: _v) +#define IM_CROPMAX(_v, _max) (_v < 0? 0: _v > _max? _max: _v) + +/** @} */ + +/** Returns the size in bytes of a specified numeric data type. + * + * \verbatim im.DataTypeSize(data_type: number) -> size: number [in Lua 5] \endverbatim + * \ingroup datatypeutl */ +int imDataTypeSize(int data_type); + +/** Returns the numeric data type name given its identifier. + * + * \verbatim im.DataTypeName(data_type: number) -> name: string [in Lua 5] \endverbatim + * \ingroup datatypeutl */ +const char* imDataTypeName(int data_type); + +/** Returns the maximum value of an integer data type. For floating point returns 0. + * + * \verbatim im.DataTypeIntMax(data_type: number) -> int_max: number [in Lua 5] \endverbatim + * \ingroup datatypeutl */ +unsigned long imDataTypeIntMax(int data_type); + +/** Returns the minimum value of an integer data type. For floating point returns 0. + * + * \verbatim im.DataTypeIntMin(data_type: number) -> int_min: number [in Lua 5] \endverbatim + * \ingroup datatypeutl */ +long imDataTypeIntMin(int data_type); + + + +/** \defgroup bin Binary Data Utilities + * \par + * See \ref im_util.h + * \ingroup util */ + +/** CPU Byte Orders. + * \ingroup bin */ +enum imByteOrder +{ + IM_LITTLEENDIAN, /**< Little Endian - The most significant byte is on the right end of a word. Used by Intel processors. */ + IM_BIGENDIAN /**< Big Endian - The most significant byte is on the left end of a word. Used by Motorola processors, also is the network standard byte order. */ +}; + +/** Returns the current CPU byte order. + * \ingroup bin */ +int imBinCPUByteOrder(void); + +/** Changes the byte order of an array of 2, 4 or 8 byte values. + * \ingroup bin */ +void imBinSwapBytes(void *data, int count, int size); + +/** Changes the byte order of an array of 2 byte values. + * \ingroup bin */ +void imBinSwapBytes2(void *data, int count); + +/** Inverts the byte order of the 4 byte values + * \ingroup bin */ +void imBinSwapBytes4(void *data, int count); + +/** Inverts the byte order of the 8 byte values + * \ingroup bin */ +void imBinSwapBytes8(void *data, int count); + + + +/** \defgroup compress Data Compression Utilities + * \par + * Deflate compression support uses zlib version 1.2.3. \n + * http://www.zlib.org/ \n + * Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler + * \par + * LZF compression support uses libLZF version 3.5. \n + * http://software.schmorp.de/pkg/liblzf \n + * Copyright (C) 2000-2009 Marc Alexander Lehmann + * See \ref im_util.h + * \ingroup util */ + +/** Compresses the data using the ZLIB Deflate compression. \n + * The destination buffer must be at least 0.1% larger than source_size plus 12 bytes. \n + * It compresses raw byte data. zip_quality can be 1 to 9. \n + * Returns the size of the compressed buffer or zero if failed. + * \ingroup compress */ +int imCompressDataZ(const void* src_data, int src_size, void* dst_data, int dst_size, int zip_quality); + +/** Uncompresses the data compressed with the ZLIB Deflate compression. \n + * Returns zero if failed. + * \ingroup compress */ +int imCompressDataUnZ(const void* src_data, int src_size, void* dst_data, int dst_size); + +/** Compresses the data using the libLZF compression. \n + * Returns the size of the compressed buffer or zero if failed. + * \ingroup compress */ +int imCompressDataLZF(const void* src_data, int src_size, void* dst_data, int dst_size, int zip_quality); + +/** Uncompresses the data compressed with the libLZF compression. + * Returns zero if failed. + * \ingroup compress */ +int imCompressDataUnLZF(const void* src_data, int src_size, void* dst_data, int dst_size); + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/include/imlua.h b/im/include/imlua.h new file mode 100755 index 0000000..5714dff --- /dev/null +++ b/im/include/imlua.h @@ -0,0 +1,83 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IMLUA_H +#define __IMLUA_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** \defgroup imlua IM Lua 5 Binding + * \par + * Binding for the Lua 5 scripting language. \n + * Lua 5.1 Copyright (C) 1994-2005 Lua.org, PUC-Rio \n + * R. Ierusalimschy, L. H. de Figueiredo & W. Celes \n + * http://www.lua.org + * \par + * The name of the functions were changed because of the namespace "im" and because of the object orientation. \n + * As a general rule use: +\verbatim + imXxx -> im.Xxx + IM_XXX -> im.XXX + imFileXXX(ifile,... -> ifile:XXX(... + imImageXXX(image,... -> image:XXX(... +\endverbatim + * All the objects are garbage collected by the Lua garbage collector. + * \par + * See \ref imlua.h + * \ingroup util */ + +#ifdef LUA_NOOBJECT /* Lua 3 */ +void imlua_open(void); +#endif + +#ifdef LUA_TNONE /* Lua 5 */ + +/** Initializes the Lua binding of the main IM library. \n + * Returns 1 (leaves the "im" table on the top of the stack). + * You must link the application with the "imlua51" library. + * \ingroup imlua */ +int imlua_open(lua_State *L); +int luaopen_imlua(lua_State *L); + +/** Pushes an image as a metatable on the stack. + * \ingroup imlua */ +void imlua_pushimage(lua_State *L, imImage* image); + +/** Gets an image as a metatable from the stack, checks for correct type. + * \ingroup imlua */ +imImage* imlua_checkimage(lua_State *L, int param); + +/** Initializes the Lua binding of the capture library. \n + * Returns 1 (leaves the "im" table on the top of the stack). + * You must link the application with the "imlua_capture51" library. + * \ingroup imlua */ +int imlua_open_capture(lua_State *L); +int luaopen_imlua_capture(lua_State *L); + +/** Initializes the Lua binding of the process library. \n + * Returns 1 (leaves the "im" table on the top of the stack). + * You must link the application with the "imlua_process51" library. + * \ingroup imlua */ +int imlua_open_process(lua_State *L); +int luaopen_imlua_process(lua_State *L); + +/** Initializes the Lua binding of the fourier transform library. \n + * Returns 1 (leaves the "im" table on the top of the stack). + * You must link the application with the "imlua_fftw51" library. + * \ingroup imlua */ +int imlua_open_fftw(lua_State *L); +int luaopen_imlua_fftw(lua_State *L); + + +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/im/include/old_im.h b/im/include/old_im.h new file mode 100755 index 0000000..f000221 --- /dev/null +++ b/im/include/old_im.h @@ -0,0 +1,59 @@ +/** \file + * \brief Old API + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_OLD_H +#define __IM_OLD_H + +#if defined(__cplusplus) +extern "C" { +#endif + +enum {IM_BMP, IM_PCX, IM_GIF, IM_TIF, IM_RAS, IM_SGI, IM_JPG, IM_LED, IM_TGA}; +enum {IM_NONE = 0x0000, IM_DEFAULT = 0x0100, IM_COMPRESSED = 0x0200}; + +#define IM_ERR_READ IM_ERR_ACCESS +#define IM_ERR_WRITE IM_ERR_ACCESS +#define IM_ERR_TYPE IM_ERR_DATA +#define IM_ERR_COMP IM_ERR_COMPRESS + +long imEncodeColor(unsigned char red, unsigned char green, unsigned char blue); +void imDecodeColor(unsigned char* red, unsigned char* green, unsigned char* blue, long palette); +int imFileFormat(char *filename, int* format); +int imImageInfo(char *filename, int *width, int *height, int *type, int *palette_count); +int imLoadRGB(char *filename, unsigned char *red, unsigned char *green, unsigned char *blue); +int imSaveRGB(int width, int height, int format, unsigned char *red, unsigned char *green, unsigned char *blue, char *filename); +int imLoadMap(char *filename, unsigned char *map, long *palette); +int imSaveMap(int width, int height, int format, unsigned char *map, int palette_count, long *palette, char *filename); +void imRGB2Map(int width, int height, unsigned char *red, unsigned char *green, unsigned char *blue, unsigned char *map, int palette_count, long *palette); +void imMap2RGB(int width, int height, unsigned char *map, int palette_count, long *colors, unsigned char *red, unsigned char *green, unsigned char *blue); +void imRGB2Gray(int width, int height, unsigned char *red, unsigned char *green, unsigned char *blue, unsigned char *map, long *grays); +void imMap2Gray(int width, int height, unsigned char *map, int palette_count, long *colors, unsigned char *grey_map, long *grays); +void imResize(int src_width, int src_height, unsigned char *src_map, int dst_width, int dst_height, unsigned char *dst_map); +void imStretch(int src_width, int src_height, unsigned char *src_map, int dst_width, int dst_height, unsigned char *dst_map); +typedef int (*imCallback)(char *filename); +int imRegisterCallback(imCallback cb, int cb_id, int format); + +#define IM_INTERRUPTED -1 +#define IM_ALL -1 +#define IM_COUNTER_CB 0 +typedef int (*imFileCounterCallback)(char *filename, int percent, int io); + +#define IM_RESOLUTION_CB 1 +typedef int (*imResolutionCallback)(char *filename, double* xres, double* yres, int* res_unit); + +enum {IM_RES_NONE, IM_RES_DPI, IM_RES_DPC}; + +#define IM_GIF_TRANSPARENT_COLOR_CB 0 +typedef int (*imGifTranspIndex)(char *filename, unsigned char *transp_index); + +#define IM_TIF_IMAGE_DESCRIPTION_CB 0 +typedef int (*imTiffImageDesc)(char *filename, char* img_desc); + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/im/mak.vc8/im.sln b/im/mak.vc8/im.sln new file mode 100755 index 0000000..3860357 --- /dev/null +++ b/im/mak.vc8/im.sln @@ -0,0 +1,177 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im", "im.vcproj", "{5A761929-07C3-48BD-8E4A-B37EC5C72C42}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_avi", "im_avi.vcproj", "{CB863607-6B6C-0000-0000-000000000000}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_capture", "im_capture.vcproj", "{CB868607-6B6C-4CDF-9B6D-27AA925AE473}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_jp2", "im_jp2.vcproj", "{CB96E607-6B6C-0000-0000-000000000000}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_process", "im_process.vcproj", "{CB80E607-6B6C-4ADF-9B6D-27AA925AE493}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_wmv", "im_wmv.vcproj", "{CB86E507-6B6C-4FDF-9B6D-27AA925AE463}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_fftw", "im_fftw.vcproj", "{CB80E607-6B6C-345F-9B6D-27AA9123E493}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imlua3", "imlua3.vcproj", "{43564684-75A9-41FE-847B-BF8514C14571}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imlua5", "imlua5.vcproj", "{CB863607-6B6C-0000-0000-000000001234}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imlua_capture5", "imlua_capture5.vcproj", "{CB863607-6B6C-0000-0000-678900001234}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imlua_fftw5", "imlua_fftw5.vcproj", "{CB863607-6B6C-0000-1234-000000001234}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imlua_process5", "imlua_process5.vcproj", "{CB863607-6B6C-0000-7689-000000001234}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_ecw", "im_ecw.vcproj", "{CB86E507-6B6C-4FDF-9B6D-27AA123AE463}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua3", "Lua3", "{0AB99E2F-D746-4ABC-BF14-33F6936CF927}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{F36FF650-2081-42D4-82C2-645324897900}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua5", "Lua5", "{45695057-0514-4294-AE1D-15D4017F0389}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Formats", "Formats", "{E23E03B7-7DFC-4A8F-B996-F0D052E8EBDD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_info", "im_info.vcproj", "{909637FA-8229-45A9-9F42-53D8ED5F91C5}" + ProjectSection(ProjectDependencies) = postProject + {CB863607-6B6C-0000-0000-000000000000} = {CB863607-6B6C-0000-0000-000000000000} + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463} = {CB86E507-6B6C-4FDF-9B6D-27AA925AE463} + {CB96E607-6B6C-0000-0000-000000000000} = {CB96E607-6B6C-0000-0000-000000000000} + {5A761929-07C3-48BD-8E4A-B37EC5C72C42} = {5A761929-07C3-48BD-8E4A-B37EC5C72C42} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_copy", "im_copy.vcproj", "{328002C9-0726-4BB5-AD09-1BA1DC96F912}" + ProjectSection(ProjectDependencies) = postProject + {CB863607-6B6C-0000-0000-000000000000} = {CB863607-6B6C-0000-0000-000000000000} + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463} = {CB86E507-6B6C-4FDF-9B6D-27AA925AE463} + {CB96E607-6B6C-0000-0000-000000000000} = {CB96E607-6B6C-0000-0000-000000000000} + {5A761929-07C3-48BD-8E4A-B37EC5C72C42} = {5A761929-07C3-48BD-8E4A-B37EC5C72C42} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_view", "im_view.vcproj", "{99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}" + ProjectSection(ProjectDependencies) = postProject + {CB863607-6B6C-0000-0000-000000000000} = {CB863607-6B6C-0000-0000-000000000000} + {CB96E607-6B6C-0000-0000-000000000000} = {CB96E607-6B6C-0000-0000-000000000000} + {5A761929-07C3-48BD-8E4A-B37EC5C72C42} = {5A761929-07C3-48BD-8E4A-B37EC5C72C42} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5A761929-07C3-48BD-8E4A-B37EC5C72C42}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A761929-07C3-48BD-8E4A-B37EC5C72C42}.Debug|Win32.Build.0 = Debug|Win32 + {5A761929-07C3-48BD-8E4A-B37EC5C72C42}.Debug|x64.ActiveCfg = Debug|x64 + {5A761929-07C3-48BD-8E4A-B37EC5C72C42}.Release|Win32.ActiveCfg = Debug|Win32 + {5A761929-07C3-48BD-8E4A-B37EC5C72C42}.Release|x64.ActiveCfg = Debug|x64 + {CB863607-6B6C-0000-0000-000000000000}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000000000}.Debug|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-000000000000}.Debug|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000000000}.Release|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000000000}.Release|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-000000000000}.Release|x64.ActiveCfg = Debug|Win32 + {CB868607-6B6C-4CDF-9B6D-27AA925AE473}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB868607-6B6C-4CDF-9B6D-27AA925AE473}.Debug|Win32.Build.0 = Debug|Win32 + {CB868607-6B6C-4CDF-9B6D-27AA925AE473}.Debug|x64.ActiveCfg = Debug|Win32 + {CB868607-6B6C-4CDF-9B6D-27AA925AE473}.Release|Win32.ActiveCfg = Debug|Win32 + {CB868607-6B6C-4CDF-9B6D-27AA925AE473}.Release|x64.ActiveCfg = Debug|Win32 + {CB96E607-6B6C-0000-0000-000000000000}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB96E607-6B6C-0000-0000-000000000000}.Debug|Win32.Build.0 = Debug|Win32 + {CB96E607-6B6C-0000-0000-000000000000}.Debug|x64.ActiveCfg = Debug|Win32 + {CB96E607-6B6C-0000-0000-000000000000}.Release|Win32.ActiveCfg = Debug|Win32 + {CB96E607-6B6C-0000-0000-000000000000}.Release|x64.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-4ADF-9B6D-27AA925AE493}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-4ADF-9B6D-27AA925AE493}.Debug|Win32.Build.0 = Debug|Win32 + {CB80E607-6B6C-4ADF-9B6D-27AA925AE493}.Debug|x64.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-4ADF-9B6D-27AA925AE493}.Release|Win32.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-4ADF-9B6D-27AA925AE493}.Release|x64.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463}.Debug|Win32.Build.0 = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463}.Debug|x64.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463}.Release|Win32.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463}.Release|x64.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-345F-9B6D-27AA9123E493}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-345F-9B6D-27AA9123E493}.Debug|Win32.Build.0 = Debug|Win32 + {CB80E607-6B6C-345F-9B6D-27AA9123E493}.Debug|x64.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-345F-9B6D-27AA9123E493}.Release|Win32.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-345F-9B6D-27AA9123E493}.Release|x64.ActiveCfg = Debug|Win32 + {43564684-75A9-41FE-847B-BF8514C14571}.Debug|Win32.ActiveCfg = Debug|Win32 + {43564684-75A9-41FE-847B-BF8514C14571}.Debug|Win32.Build.0 = Debug|Win32 + {43564684-75A9-41FE-847B-BF8514C14571}.Debug|x64.ActiveCfg = Debug|Win32 + {43564684-75A9-41FE-847B-BF8514C14571}.Release|Win32.ActiveCfg = Debug|Win32 + {43564684-75A9-41FE-847B-BF8514C14571}.Release|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Debug|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Debug|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Release|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Release|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Release|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Debug|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Debug|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Release|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Release|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Release|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Debug|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Debug|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Release|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Release|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Release|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Debug|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Debug|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Release|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Release|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Release|x64.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Debug|Win32.Build.0 = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Debug|x64.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Release|Win32.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Release|Win32.Build.0 = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Release|x64.ActiveCfg = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Debug|Win32.ActiveCfg = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Debug|Win32.Build.0 = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Debug|x64.ActiveCfg = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Release|Win32.ActiveCfg = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Release|Win32.Build.0 = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Release|x64.ActiveCfg = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Debug|Win32.ActiveCfg = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Debug|Win32.Build.0 = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Debug|x64.ActiveCfg = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Release|Win32.ActiveCfg = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Release|Win32.Build.0 = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Release|x64.ActiveCfg = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Debug|Win32.ActiveCfg = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Debug|Win32.Build.0 = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Debug|x64.ActiveCfg = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Release|Win32.ActiveCfg = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Release|Win32.Build.0 = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Release|x64.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {43564684-75A9-41FE-847B-BF8514C14571} = {0AB99E2F-D746-4ABC-BF14-33F6936CF927} + {909637FA-8229-45A9-9F42-53D8ED5F91C5} = {F36FF650-2081-42D4-82C2-645324897900} + {328002C9-0726-4BB5-AD09-1BA1DC96F912} = {F36FF650-2081-42D4-82C2-645324897900} + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B} = {F36FF650-2081-42D4-82C2-645324897900} + {CB863607-6B6C-0000-7689-000000001234} = {45695057-0514-4294-AE1D-15D4017F0389} + {CB863607-6B6C-0000-1234-000000001234} = {45695057-0514-4294-AE1D-15D4017F0389} + {CB863607-6B6C-0000-0000-678900001234} = {45695057-0514-4294-AE1D-15D4017F0389} + {CB863607-6B6C-0000-0000-000000001234} = {45695057-0514-4294-AE1D-15D4017F0389} + {CB863607-6B6C-0000-0000-000000000000} = {E23E03B7-7DFC-4A8F-B996-F0D052E8EBDD} + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463} = {E23E03B7-7DFC-4A8F-B996-F0D052E8EBDD} + {CB96E607-6B6C-0000-0000-000000000000} = {E23E03B7-7DFC-4A8F-B996-F0D052E8EBDD} + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463} = {E23E03B7-7DFC-4A8F-B996-F0D052E8EBDD} + EndGlobalSection + GlobalSection(DevPartner Solution Properties) = postSolution + EndGlobalSection +EndGlobal diff --git a/im/mak.vc8/im.vcproj b/im/mak.vc8/im.vcproj new file mode 100755 index 0000000..afce120 --- /dev/null +++ b/im/mak.vc8/im.vcproj @@ -0,0 +1,1224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/im_avi.vcproj b/im/mak.vc8/im_avi.vcproj new file mode 100755 index 0000000..40238d5 --- /dev/null +++ b/im/mak.vc8/im_avi.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/im_capture.vcproj b/im/mak.vc8/im_capture.vcproj new file mode 100755 index 0000000..bbfcb42 --- /dev/null +++ b/im/mak.vc8/im_capture.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/im_copy.vcproj b/im/mak.vc8/im_copy.vcproj new file mode 100755 index 0000000..9beee7b --- /dev/null +++ b/im/mak.vc8/im_copy.vcproj @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/im_ecw.vcproj b/im/mak.vc8/im_ecw.vcproj new file mode 100755 index 0000000..e980260 --- /dev/null +++ b/im/mak.vc8/im_ecw.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/im_fftw.vcproj b/im/mak.vc8/im_fftw.vcproj new file mode 100755 index 0000000..49ddd6a --- /dev/null +++ b/im/mak.vc8/im_fftw.vcproj @@ -0,0 +1,425 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/im_info.vcproj b/im/mak.vc8/im_info.vcproj new file mode 100755 index 0000000..700b113 --- /dev/null +++ b/im/mak.vc8/im_info.vcproj @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/im_jp2.vcproj b/im/mak.vc8/im_jp2.vcproj new file mode 100755 index 0000000..b139e55 --- /dev/null +++ b/im/mak.vc8/im_jp2.vcproj @@ -0,0 +1,444 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/im_process.vcproj b/im/mak.vc8/im_process.vcproj new file mode 100755 index 0000000..bf3773d --- /dev/null +++ b/im/mak.vc8/im_process.vcproj @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/im_view.vcproj b/im/mak.vc8/im_view.vcproj new file mode 100755 index 0000000..e7d8c56 --- /dev/null +++ b/im/mak.vc8/im_view.vcproj @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/im_wmv.vcproj b/im/mak.vc8/im_wmv.vcproj new file mode 100755 index 0000000..79d9234 --- /dev/null +++ b/im/mak.vc8/im_wmv.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/imlua3.vcproj b/im/mak.vc8/imlua3.vcproj new file mode 100755 index 0000000..1ad10a9 --- /dev/null +++ b/im/mak.vc8/imlua3.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/imlua5.vcproj b/im/mak.vc8/imlua5.vcproj new file mode 100755 index 0000000..8ddd74a --- /dev/null +++ b/im/mak.vc8/imlua5.vcproj @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/imlua_capture5.vcproj b/im/mak.vc8/imlua_capture5.vcproj new file mode 100755 index 0000000..9ee907b --- /dev/null +++ b/im/mak.vc8/imlua_capture5.vcproj @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/imlua_fftw5.vcproj b/im/mak.vc8/imlua_fftw5.vcproj new file mode 100755 index 0000000..0219dcc --- /dev/null +++ b/im/mak.vc8/imlua_fftw5.vcproj @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc8/imlua_process5.vcproj b/im/mak.vc8/imlua_process5.vcproj new file mode 100755 index 0000000..f490e45 --- /dev/null +++ b/im/mak.vc8/imlua_process5.vcproj @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im.sln b/im/mak.vc9/im.sln new file mode 100755 index 0000000..2a2d791 --- /dev/null +++ b/im/mak.vc9/im.sln @@ -0,0 +1,177 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im", "im.vcproj", "{5A761929-07C3-48BD-8E4A-B37EC5C72C42}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_avi", "im_avi.vcproj", "{CB863607-6B6C-0000-0000-000000000000}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_capture", "im_capture.vcproj", "{CB868607-6B6C-4CDF-9B6D-27AA925AE473}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_jp2", "im_jp2.vcproj", "{CB96E607-6B6C-0000-0000-000000000000}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_process", "im_process.vcproj", "{CB80E607-6B6C-4ADF-9B6D-27AA925AE493}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_wmv", "im_wmv.vcproj", "{CB86E507-6B6C-4FDF-9B6D-27AA925AE463}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_fftw", "im_fftw.vcproj", "{CB80E607-6B6C-345F-9B6D-27AA9123E493}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imlua3", "imlua3.vcproj", "{43564684-75A9-41FE-847B-BF8514C14571}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imlua5", "imlua5.vcproj", "{CB863607-6B6C-0000-0000-000000001234}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imlua_capture5", "imlua_capture5.vcproj", "{CB863607-6B6C-0000-0000-678900001234}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imlua_fftw5", "imlua_fftw5.vcproj", "{CB863607-6B6C-0000-1234-000000001234}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imlua_process5", "imlua_process5.vcproj", "{CB863607-6B6C-0000-7689-000000001234}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_ecw", "im_ecw.vcproj", "{CB86E507-6B6C-4FDF-9B6D-27AA123AE463}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua3", "Lua3", "{0AB99E2F-D746-4ABC-BF14-33F6936CF927}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{F36FF650-2081-42D4-82C2-645324897900}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua5", "Lua5", "{45695057-0514-4294-AE1D-15D4017F0389}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Formats", "Formats", "{E23E03B7-7DFC-4A8F-B996-F0D052E8EBDD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_info", "im_info.vcproj", "{909637FA-8229-45A9-9F42-53D8ED5F91C5}" + ProjectSection(ProjectDependencies) = postProject + {CB863607-6B6C-0000-0000-000000000000} = {CB863607-6B6C-0000-0000-000000000000} + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463} = {CB86E507-6B6C-4FDF-9B6D-27AA925AE463} + {CB96E607-6B6C-0000-0000-000000000000} = {CB96E607-6B6C-0000-0000-000000000000} + {5A761929-07C3-48BD-8E4A-B37EC5C72C42} = {5A761929-07C3-48BD-8E4A-B37EC5C72C42} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_copy", "im_copy.vcproj", "{328002C9-0726-4BB5-AD09-1BA1DC96F912}" + ProjectSection(ProjectDependencies) = postProject + {CB863607-6B6C-0000-0000-000000000000} = {CB863607-6B6C-0000-0000-000000000000} + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463} = {CB86E507-6B6C-4FDF-9B6D-27AA925AE463} + {CB96E607-6B6C-0000-0000-000000000000} = {CB96E607-6B6C-0000-0000-000000000000} + {5A761929-07C3-48BD-8E4A-B37EC5C72C42} = {5A761929-07C3-48BD-8E4A-B37EC5C72C42} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im_view", "im_view.vcproj", "{99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}" + ProjectSection(ProjectDependencies) = postProject + {CB863607-6B6C-0000-0000-000000000000} = {CB863607-6B6C-0000-0000-000000000000} + {CB96E607-6B6C-0000-0000-000000000000} = {CB96E607-6B6C-0000-0000-000000000000} + {5A761929-07C3-48BD-8E4A-B37EC5C72C42} = {5A761929-07C3-48BD-8E4A-B37EC5C72C42} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5A761929-07C3-48BD-8E4A-B37EC5C72C42}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A761929-07C3-48BD-8E4A-B37EC5C72C42}.Debug|Win32.Build.0 = Debug|Win32 + {5A761929-07C3-48BD-8E4A-B37EC5C72C42}.Debug|x64.ActiveCfg = Debug|x64 + {5A761929-07C3-48BD-8E4A-B37EC5C72C42}.Release|Win32.ActiveCfg = Debug|Win32 + {5A761929-07C3-48BD-8E4A-B37EC5C72C42}.Release|x64.ActiveCfg = Debug|x64 + {CB863607-6B6C-0000-0000-000000000000}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000000000}.Debug|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-000000000000}.Debug|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000000000}.Release|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000000000}.Release|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-000000000000}.Release|x64.ActiveCfg = Debug|Win32 + {CB868607-6B6C-4CDF-9B6D-27AA925AE473}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB868607-6B6C-4CDF-9B6D-27AA925AE473}.Debug|Win32.Build.0 = Debug|Win32 + {CB868607-6B6C-4CDF-9B6D-27AA925AE473}.Debug|x64.ActiveCfg = Debug|Win32 + {CB868607-6B6C-4CDF-9B6D-27AA925AE473}.Release|Win32.ActiveCfg = Debug|Win32 + {CB868607-6B6C-4CDF-9B6D-27AA925AE473}.Release|x64.ActiveCfg = Debug|Win32 + {CB96E607-6B6C-0000-0000-000000000000}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB96E607-6B6C-0000-0000-000000000000}.Debug|Win32.Build.0 = Debug|Win32 + {CB96E607-6B6C-0000-0000-000000000000}.Debug|x64.ActiveCfg = Debug|Win32 + {CB96E607-6B6C-0000-0000-000000000000}.Release|Win32.ActiveCfg = Debug|Win32 + {CB96E607-6B6C-0000-0000-000000000000}.Release|x64.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-4ADF-9B6D-27AA925AE493}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-4ADF-9B6D-27AA925AE493}.Debug|Win32.Build.0 = Debug|Win32 + {CB80E607-6B6C-4ADF-9B6D-27AA925AE493}.Debug|x64.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-4ADF-9B6D-27AA925AE493}.Release|Win32.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-4ADF-9B6D-27AA925AE493}.Release|x64.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463}.Debug|Win32.Build.0 = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463}.Debug|x64.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463}.Release|Win32.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463}.Release|x64.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-345F-9B6D-27AA9123E493}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-345F-9B6D-27AA9123E493}.Debug|Win32.Build.0 = Debug|Win32 + {CB80E607-6B6C-345F-9B6D-27AA9123E493}.Debug|x64.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-345F-9B6D-27AA9123E493}.Release|Win32.ActiveCfg = Debug|Win32 + {CB80E607-6B6C-345F-9B6D-27AA9123E493}.Release|x64.ActiveCfg = Debug|Win32 + {43564684-75A9-41FE-847B-BF8514C14571}.Debug|Win32.ActiveCfg = Debug|Win32 + {43564684-75A9-41FE-847B-BF8514C14571}.Debug|Win32.Build.0 = Debug|Win32 + {43564684-75A9-41FE-847B-BF8514C14571}.Debug|x64.ActiveCfg = Debug|Win32 + {43564684-75A9-41FE-847B-BF8514C14571}.Release|Win32.ActiveCfg = Debug|Win32 + {43564684-75A9-41FE-847B-BF8514C14571}.Release|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Debug|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Debug|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Release|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Release|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-000000001234}.Release|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Debug|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Debug|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Release|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Release|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-0000-678900001234}.Release|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Debug|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Debug|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Release|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Release|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-1234-000000001234}.Release|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Debug|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Debug|x64.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Release|Win32.ActiveCfg = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Release|Win32.Build.0 = Debug|Win32 + {CB863607-6B6C-0000-7689-000000001234}.Release|x64.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Debug|Win32.Build.0 = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Debug|x64.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Release|Win32.ActiveCfg = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Release|Win32.Build.0 = Debug|Win32 + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463}.Release|x64.ActiveCfg = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Debug|Win32.ActiveCfg = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Debug|Win32.Build.0 = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Debug|x64.ActiveCfg = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Release|Win32.ActiveCfg = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Release|Win32.Build.0 = Debug|Win32 + {909637FA-8229-45A9-9F42-53D8ED5F91C5}.Release|x64.ActiveCfg = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Debug|Win32.ActiveCfg = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Debug|Win32.Build.0 = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Debug|x64.ActiveCfg = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Release|Win32.ActiveCfg = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Release|Win32.Build.0 = Debug|Win32 + {328002C9-0726-4BB5-AD09-1BA1DC96F912}.Release|x64.ActiveCfg = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Debug|Win32.ActiveCfg = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Debug|Win32.Build.0 = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Debug|x64.ActiveCfg = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Release|Win32.ActiveCfg = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Release|Win32.Build.0 = Debug|Win32 + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B}.Release|x64.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {CB96E607-6B6C-0000-0000-000000000000} = {E23E03B7-7DFC-4A8F-B996-F0D052E8EBDD} + {CB86E507-6B6C-4FDF-9B6D-27AA925AE463} = {E23E03B7-7DFC-4A8F-B996-F0D052E8EBDD} + {CB86E507-6B6C-4FDF-9B6D-27AA123AE463} = {E23E03B7-7DFC-4A8F-B996-F0D052E8EBDD} + {CB863607-6B6C-0000-0000-000000000000} = {E23E03B7-7DFC-4A8F-B996-F0D052E8EBDD} + {43564684-75A9-41FE-847B-BF8514C14571} = {0AB99E2F-D746-4ABC-BF14-33F6936CF927} + {CB863607-6B6C-0000-0000-678900001234} = {45695057-0514-4294-AE1D-15D4017F0389} + {CB863607-6B6C-0000-1234-000000001234} = {45695057-0514-4294-AE1D-15D4017F0389} + {CB863607-6B6C-0000-7689-000000001234} = {45695057-0514-4294-AE1D-15D4017F0389} + {CB863607-6B6C-0000-0000-000000001234} = {45695057-0514-4294-AE1D-15D4017F0389} + {909637FA-8229-45A9-9F42-53D8ED5F91C5} = {F36FF650-2081-42D4-82C2-645324897900} + {328002C9-0726-4BB5-AD09-1BA1DC96F912} = {F36FF650-2081-42D4-82C2-645324897900} + {99675DC2-A7EE-4BC8-B7E7-CD437D4FAC3B} = {F36FF650-2081-42D4-82C2-645324897900} + EndGlobalSection + GlobalSection(DevPartner Solution Properties) = postSolution + EndGlobalSection +EndGlobal diff --git a/im/mak.vc9/im.vcproj b/im/mak.vc9/im.vcproj new file mode 100755 index 0000000..964847a --- /dev/null +++ b/im/mak.vc9/im.vcproj @@ -0,0 +1,1224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im_avi.vcproj b/im/mak.vc9/im_avi.vcproj new file mode 100755 index 0000000..9222223 --- /dev/null +++ b/im/mak.vc9/im_avi.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im_capture.vcproj b/im/mak.vc9/im_capture.vcproj new file mode 100755 index 0000000..bb61644 --- /dev/null +++ b/im/mak.vc9/im_capture.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im_copy.vcproj b/im/mak.vc9/im_copy.vcproj new file mode 100755 index 0000000..d9bc064 --- /dev/null +++ b/im/mak.vc9/im_copy.vcproj @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im_ecw.vcproj b/im/mak.vc9/im_ecw.vcproj new file mode 100755 index 0000000..4528dfc --- /dev/null +++ b/im/mak.vc9/im_ecw.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im_fftw.vcproj b/im/mak.vc9/im_fftw.vcproj new file mode 100755 index 0000000..702d5ff --- /dev/null +++ b/im/mak.vc9/im_fftw.vcproj @@ -0,0 +1,425 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im_info.vcproj b/im/mak.vc9/im_info.vcproj new file mode 100755 index 0000000..7cdd700 --- /dev/null +++ b/im/mak.vc9/im_info.vcproj @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im_jp2.vcproj b/im/mak.vc9/im_jp2.vcproj new file mode 100755 index 0000000..ec88634 --- /dev/null +++ b/im/mak.vc9/im_jp2.vcproj @@ -0,0 +1,444 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im_process.vcproj b/im/mak.vc9/im_process.vcproj new file mode 100755 index 0000000..7365b39 --- /dev/null +++ b/im/mak.vc9/im_process.vcproj @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im_view.vcproj b/im/mak.vc9/im_view.vcproj new file mode 100755 index 0000000..e7642c7 --- /dev/null +++ b/im/mak.vc9/im_view.vcproj @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/im_wmv.vcproj b/im/mak.vc9/im_wmv.vcproj new file mode 100755 index 0000000..f767689 --- /dev/null +++ b/im/mak.vc9/im_wmv.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/imlua3.vcproj b/im/mak.vc9/imlua3.vcproj new file mode 100755 index 0000000..30955af --- /dev/null +++ b/im/mak.vc9/imlua3.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/imlua5.vcproj b/im/mak.vc9/imlua5.vcproj new file mode 100755 index 0000000..20ab587 --- /dev/null +++ b/im/mak.vc9/imlua5.vcproj @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/imlua_capture5.vcproj b/im/mak.vc9/imlua_capture5.vcproj new file mode 100755 index 0000000..4d3064f --- /dev/null +++ b/im/mak.vc9/imlua_capture5.vcproj @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/imlua_fftw5.vcproj b/im/mak.vc9/imlua_fftw5.vcproj new file mode 100755 index 0000000..bd0ae2a --- /dev/null +++ b/im/mak.vc9/imlua_fftw5.vcproj @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/mak.vc9/imlua_process5.vcproj b/im/mak.vc9/imlua_process5.vcproj new file mode 100755 index 0000000..e80ba7d --- /dev/null +++ b/im/mak.vc9/imlua_process5.vcproj @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/im/src/COPYRIGHT b/im/src/COPYRIGHT new file mode 100755 index 0000000..ca0b899 --- /dev/null +++ b/im/src/COPYRIGHT @@ -0,0 +1,32 @@ +IM License +----------- + +IM is licensed under the terms of the MIT license reproduced below. +This means that IM is free software and can be used for both academic +and commercial purposes at absolutely no cost. + +=============================================================================== + +Copyright (C) 1994-2009 Tecgraf, PUC-Rio. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +=============================================================================== + +(end of COPYRIGHT) diff --git a/im/src/Makefile b/im/src/Makefile new file mode 100755 index 0000000..3fe5908 --- /dev/null +++ b/im/src/Makefile @@ -0,0 +1,15 @@ + +.PHONY: do_all im im_jp2 im_process imlua3 imlua5 imlua_jp2 imlua_process5 +#do_all: im im_jp2 im_process im_fftw imlua3 imlua5 imlua_jp2 imlua_process5 imlua_fftw5 +do_all: im im_process imlua5 imlua_jp2 imlua_process5 + +im: + $(MAKE) --no-print-directory -f tecmake_compact.mak +im_process: + @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=im_process +imlua3: + @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=imlua3 +imlua5: + @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=imlua5 +imlua_process5: + @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=imlua_process5 diff --git a/im/src/README b/im/src/README new file mode 100755 index 0000000..3dbcbd5 --- /dev/null +++ b/im/src/README @@ -0,0 +1,11 @@ +README for IM + + IM is a toolkit for Digital Imaging. IM is based on 4 concepts: Image Representation, Storage, Processing and Capture. The main goal of the library is to provide a simple API and abstraction of images for scientific applications. + The most popular file formats are supported: TIFF, BMP, PNG, JPEG, GIF and AVI. Image representation includes scientific data types. About a hundred Image Processing operations are available. + + Build instructions and usage are available in the IM documentation. + + For complete information, visit IM's web site at http://www.tecgraf.puc-rio.br/im + or access its documentation in the HTML folder. + +(end of README) diff --git a/im/src/config.mak b/im/src/config.mak new file mode 100755 index 0000000..a938100 --- /dev/null +++ b/im/src/config.mak @@ -0,0 +1,89 @@ +PROJNAME = im +LIBNAME = im +OPT = YES + +INCLUDES = . ../include + +# WORDS_BIGENDIAN used by libTIFF +ifeq ($(TEC_SYSARCH), ppc) + DEFINES = WORDS_BIGENDIAN +endif +ifeq ($(TEC_SYSARCH), mips) + DEFINES = WORDS_BIGENDIAN +endif +ifeq ($(TEC_SYSARCH), sparc) + DEFINES = WORDS_BIGENDIAN +endif + +SRC = \ + old_imcolor.c old_imresize.c im_converttype.cpp \ + im_attrib.cpp im_format.cpp im_format_tga.cpp im_filebuffer.cpp \ + im_bin.cpp im_format_all.cpp im_format_raw.cpp \ + im_binfile.cpp im_format_sgi.cpp im_datatype.cpp im_format_pcx.cpp \ + im_colorhsi.cpp im_format_bmp.cpp im_image.cpp im_rgb2map.cpp \ + im_colormode.cpp im_format_gif.cpp im_lib.cpp im_format_pnm.cpp \ + im_colorutil.cpp im_format_ico.cpp im_palette.cpp \ + im_convertbitmap.cpp im_format_led.cpp im_counter.cpp im_str.cpp \ + im_convertcolor.cpp im_fileraw.cpp im_format_krn.cpp \ + im_file.cpp im_format_ras.cpp old_im.cpp \ + $(SRCJPEG) $(SRCTIFF) $(SRCPNG) $(SRCZLIB) $(SRCLZF) + + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + SRC += im_sysfile_win32.cpp im_dib.cpp im_dibxbitmap.cpp + + ifneq ($(findstring dll, $(TEC_UNAME)), ) + SRC += im.rc + endif + + ifeq ($(findstring _64, $(TEC_UNAME)), ) + # optimize PNG lib for VC + ifneq ($(findstring vc, $(TEC_UNAME)), ) + SRC += libpng/pngvcrd.c + DEFINES += PNG_USE_PNGVCRD + endif + ifneq ($(findstring dll, $(TEC_UNAME)), ) + SRC += libpng/pngvcrd.c + DEFINES += PNG_USE_PNGVCRD + endif + endif + + # force the definition of math functions using float + # Watcom does not define them + ifneq ($(findstring ow, $(TEC_UNAME)), ) + DEFINES += IM_DEFMATHFLOAT + endif + + ifneq ($(findstring bc, $(TEC_UNAME)), ) + DEFINES += IM_DEFMATHFLOAT + else + USE_EXIF = Yes + endif +else + SRC += im_sysfile_unix.cpp +endif + +ifdef USE_EXIF + SRC += $(SRCEXIF) + DEFINES += USE_EXIF +endif + +ifneq ($(findstring Linux, $(TEC_UNAME)), ) + # optimize PNG lib for Linux in x86 + ifeq "$(TEC_SYSARCH)" "x86" + SRC += libpng/pnggccrd.c + DEFINES += PNG_USE_PNGGCCRD + endif +endif + +ifneq ($(findstring AIX, $(TEC_UNAME)), ) + DEFINES += IM_DEFMATHFLOAT +endif + +ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + DEFINES += IM_DEFMATHFLOAT +endif + +ifneq ($(findstring HP-UX, $(TEC_UNAME)), ) + DEFINES += IM_DEFMATHFLOAT +endif diff --git a/im/src/im.def b/im/src/im.def new file mode 100755 index 0000000..41aa175 --- /dev/null +++ b/im/src/im.def @@ -0,0 +1,200 @@ +EXPORTS + imFileGetAttribute + imFileNew + imFileOpen + imFileFormat + imFileReadImageData + imFileReadImageInfo + imFileWriteImageData + imFileWriteImageInfo + imFileClose + imFileGetInfo + imFileGetPalette + imFileSetAttribute + imFileGetAttributeList + imFileSetBaseAttributes + imFileSetInfo + imFileSetPalette + imFileOpenAs + imFileHandle + imFileLineBufferCount + imFileLineSizeAligned + imFileLineBufferInc + imFileLineBufferRead + imFileLineBufferWrite + imFileImageLoad + imFileImageLoadBitmap + imFileImageSave + imFileLoadImageFrame + imFileLoadBitmapFrame + imFileSaveImage + imFileLoadBitmap + imFileLoadImage + imVersion + imVersionDate + imVersionNumber + imPaletteFindColor + imPaletteFindNearest + imPaletteUniformIndex + imPaletteUniformIndexHalftoned + imPaletteBlackBody + imPaletteBlue + imPaletteBlueIce + imPaletteCian + imPaletteGray + imPaletteGreen + imPaletteHotIron + imPaletteHues + imPaletteMagenta + imPaletteRainbow + imPaletteRed + imPaletteUniform + imPaletteYellow + imPaletteHighContrast + imFormatRegister + imFormatRegisterInternal + imFormatRemoveAll + imFormatCanWriteImage + imFormatCompressions + imFormatInfo + imFormatList + imColorModeSpaceName + imDataTypeName + imBinCPUByteOrder + imColorModeDepth + imColorModeIsBitmap + imColorModeToBitmap + imDataTypeSize + imStrCheck + imStrEqual + imStrNLen + imColorEncode + imDataTypeIntMin + imDataTypeIntMax + imBinSwapBytes2 + imBinSwapBytes4 + imBinSwapBytes8 + imColorDecode + imCounterSetCallback + imCounterBegin + imCounterInc + imCounterIncTo + imCounterEnd + imCounterTotal + imAttribTableCreate + imAttribTableDestroy + imAttribTableCount + imAttribTableRemoveAll + imAttribTableGet + imAttribTableSet + imAttribTableUnSet + imAttribTableCopyFrom + imAttribTableForEach + imImageGetAttribute + imImageClone + imImageCreate + imImageDuplicate + imImageInit + imImageCheckFormat + imImageDataSize + imImageLineCount + imImageLineSize + imImageIsBitmap + imImageGetOpenGLData + imImageMatch + imImageMatchColor + imImageMatchColorSpace + imImageMatchDataType + imImageMatchSize + imImageClear + imImageCopyAttributes + imImageDestroy + imImageGetAttributeList + imImageReshape + imImageSetAttribute + imImageSetBinary + imImageMakeBinary + imImageMakeGray + imImageSetPalette + imImageCopy + imImageCopyData + imImageCreateBased + imImageAddAlpha + imDibToHBitmap + imDibLogicalPalette + imDibCaptureScreen + imDibCreate + imDibCreateCopy + imDibCreateReference + imDibCreateSection + imDibFromHBitmap + imDibFromImage + imDibLoadFile + imDibPasteClipboard + imDibLineGetPixelFunc + imDibLineSetPixelFunc + imDibToImage + imDibIsClipboardAvailable + imDibSaveFile + imDibCopyClipboard + imDibDecodeToBitmap + imDibDecodeToMap + imDibDecodeToRGBA + imDibDestroy + imDibEncodeFromBitmap + imDibEncodeFromMap + imDibEncodeFromRGBA + imConvertColorSpace + imConvertDataType + imConvertToBitmap + imConvertPacking + imConvertMapToRGB + imConvertRGB2Map + imFileNewRaw + imFileOpenRaw + imBinFileNew + imBinFileOpen + imBinFileByteOrder + imBinFileEndOfFile + imBinFileError + imBinFileRegisterModule + imBinFileSetCurrentModule + imBinFilePrintf + imBinFileReadInteger + imBinFileReadFloat + imBinFileRead + imBinFileSize + imBinFileTell + imBinFileWrite + imBinFileClose + imBinFileSeekFrom + imBinFileSeekOffset + imBinFileSeekTo + imColorHSI_ImaxS + imColorHSI2RGB + imColorHSI2RGBbyte + imColorRGB2HSI + imColorRGB2HSIbyte + imEncodeColor + imDecodeColor + imImageInfo + imLoadRGB + imSaveRGB + imLoadMap + imSaveMap + imRGB2Map + imMap2RGB + imRGB2Gray + imMap2Gray + imResize + imStretch + imRegisterCallback + imCompressDataZ + imCompressDataUnZ + imAttribArrayCreate + imAttribArrayGet + imAttribArraySet + imAttribArrayCopyFrom + imBinMemoryRelease + imFileImageLoadRegion + imFileLoadImageRegion diff --git a/im/src/im.dep b/im/src/im.dep new file mode 100644 index 0000000..9f83359 --- /dev/null +++ b/im/src/im.dep @@ -0,0 +1,121 @@ +$(OBJDIR)/old_imcolor.o: old_imcolor.c ../include/old_im.h ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_image.h \ + ../include/im_convert.h ../include/im_image.h +$(OBJDIR)/old_imresize.o: old_imresize.c ../include/old_im.h +$(OBJDIR)/im_converttype.o: im_converttype.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_complex.h ../include/im_math.h \ + ../include/im_util.h ../include/im_image.h ../include/im_convert.h \ + ../include/im_image.h ../include/im_color.h ../include/im_counter.h +$(OBJDIR)/im_attrib.o: im_attrib.cpp ../include/im_attrib.h \ + ../include/im_attrib_flat.h ../include/im_util.h +$(OBJDIR)/im_format.o: im_format.cpp ../include/im.h ../include/old_im.h \ + ../include/im_format.h ../include/im_file.h ../include/im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h ../include/im_util.h +$(OBJDIR)/im_format_tga.o: im_format_tga.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h ../include/im_util.h \ + ../include/im_format_all.h ../include/im_counter.h ../include/im_math.h \ + ../include/im_util.h ../include/im_binfile.h +$(OBJDIR)/im_filebuffer.o: im_filebuffer.cpp ../include/im.h ../include/old_im.h \ + ../include/im_format.h ../include/im_file.h ../include/im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h ../include/im_util.h \ + ../include/im_complex.h ../include/im_math.h ../include/im_util.h \ + ../include/im_color.h +$(OBJDIR)/im_bin.o: im_bin.cpp ../include/im_util.h +$(OBJDIR)/im_format_all.o: im_format_all.cpp ../include/im.h ../include/old_im.h \ + ../include/im_format.h ../include/im_file.h ../include/im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h \ + ../include/im_format_all.h +$(OBJDIR)/im_format_raw.o: im_format_raw.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h ../include/im_util.h \ + ../include/im_format_raw.h ../include/im_counter.h \ + ../include/im_binfile.h ../include/im_util.h +$(OBJDIR)/im_binfile.o: im_binfile.cpp ../include/im_util.h ../include/im_binfile.h \ + ../include/im_util.h +$(OBJDIR)/im_format_sgi.o: im_format_sgi.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h ../include/im_util.h \ + ../include/im_format_all.h ../include/im_counter.h \ + ../include/im_binfile.h ../include/im_util.h +$(OBJDIR)/im_datatype.o: im_datatype.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h +$(OBJDIR)/im_format_pcx.o: im_format_pcx.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h \ + ../include/im_format_all.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_binfile.h ../include/im_util.h +$(OBJDIR)/im_colorhsi.o: im_colorhsi.cpp ../include/im_colorhsi.h \ + ../include/im_color.h ../include/im_math.h ../include/im_util.h +$(OBJDIR)/im_format_bmp.o: im_format_bmp.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h \ + ../include/im_format_all.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_binfile.h ../include/im_util.h +$(OBJDIR)/im_image.o: im_image.cpp ../include/im.h ../include/old_im.h \ + ../include/im_image.h ../include/im_util.h ../include/im_attrib.h \ + ../include/im_attrib_flat.h ../include/im_file.h ../include/im.h +$(OBJDIR)/im_rgb2map.o: im_rgb2map.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_convert.h ../include/im_image.h \ + ../include/im_counter.h +$(OBJDIR)/im_colormode.o: im_colormode.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h +$(OBJDIR)/im_format_gif.o: im_format_gif.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h \ + ../include/im_format_all.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_binfile.h ../include/im_util.h +$(OBJDIR)/im_lib.o: im_lib.cpp ../include/im_lib.h +$(OBJDIR)/im_format_pnm.o: im_format_pnm.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h \ + ../include/im_format_all.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_binfile.h ../include/im_util.h +$(OBJDIR)/im_colorutil.o: im_colorutil.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h +$(OBJDIR)/im_format_ico.o: im_format_ico.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h \ + ../include/im_format_all.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_binfile.h ../include/im_util.h +$(OBJDIR)/im_palette.o: im_palette.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_palette.h ../include/im_colorhsi.h +$(OBJDIR)/im_convertbitmap.o: im_convertbitmap.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_complex.h \ + ../include/im_math.h ../include/im_util.h ../include/im_image.h \ + ../include/im_convert.h ../include/im_image.h ../include/im_counter.h +$(OBJDIR)/im_format_led.o: im_format_led.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h \ + ../include/im_format_all.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_binfile.h ../include/im_util.h +$(OBJDIR)/im_counter.o: im_counter.cpp ../include/im_counter.h +$(OBJDIR)/im_str.o: im_str.cpp ../include/im_util.h +$(OBJDIR)/im_convertcolor.o: im_convertcolor.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_complex.h \ + ../include/im_math.h ../include/im_util.h ../include/im_image.h \ + ../include/im_convert.h ../include/im_image.h ../include/im_color.h \ + ../include/im_counter.h +$(OBJDIR)/im_fileraw.o: im_fileraw.cpp ../include/im.h ../include/old_im.h \ + ../include/im_image.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_raw.h ../include/im_format.h ../include/im_file.h \ + ../include/im.h ../include/im_attrib.h ../include/im_attrib_flat.h \ + ../include/im_format_raw.h +$(OBJDIR)/im_format_krn.o: im_format_krn.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h \ + ../include/im_format_all.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_binfile.h ../include/im_util.h +$(OBJDIR)/im_file.o: im_file.cpp ../include/im.h ../include/old_im.h \ + ../include/im_format.h ../include/im_file.h ../include/im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h ../include/im_util.h \ + ../include/im_attrib.h ../include/im_counter.h ../include/im_plus.h +$(OBJDIR)/im_format_ras.o: im_format_ras.cpp ../include/im_format.h \ + ../include/im_file.h ../include/im.h ../include/old_im.h \ + ../include/im_attrib.h ../include/im_attrib_flat.h \ + ../include/im_format_all.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_binfile.h ../include/im_util.h +$(OBJDIR)/old_im.o: old_im.cpp ../include/old_im.h ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_counter.h +$(OBJDIR)/im_sysfile_unix.o: im_sysfile_unix.cpp ../include/im_util.h \ + ../include/im_binfile.h ../include/im_util.h diff --git a/im/src/im.rc b/im/src/im.rc new file mode 100755 index 0000000..990266a --- /dev/null +++ b/im/src/im.rc @@ -0,0 +1,19 @@ +1 VERSIONINFO + FILEVERSION 3,4,2,0 + PRODUCTVERSION 3,4,2,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "www.tecgraf.puc-rio.br/im\0" + VALUE "CompanyName", "Tecgraf/PUC-Rio\0" + VALUE "FileDescription", "IM - Image Representation, Storage, Capture and Processing\0" + VALUE "FileVersion", "3.4.2\0" + VALUE "LegalCopyright", "Copyright © 1994-2009 Tecgraf, PUC-Rio.\0" + VALUE "OriginalFilename", "im.dll\0" + VALUE "ProductName", "IM for Windows\0" + VALUE "ProductVersion", "3.4.2\0" + END + END +END diff --git a/im/src/im_attrib.cpp b/im/src/im_attrib.cpp new file mode 100755 index 0000000..10d4599 --- /dev/null +++ b/im/src/im_attrib.cpp @@ -0,0 +1,319 @@ +/** \file + * \brief Attributes Table + * + * See Copyright Notice in im_lib.h + * $Id: im_attrib.cpp,v 1.3 2009/08/22 04:31:04 scuri Exp $ + */ + +#include +#include +#include +#include + +#include "im_attrib.h" +#include "im_util.h" + +#define IM_DEFAULTSIZE 101 +#define IM_MULTIPLIER 31 + +// Unique Hash index for a name +static int iHashIndex(const char *name, int hash_size) +{ + unsigned short hash = 0; + const unsigned char *p_name = (const unsigned char*)name; + + for(; *p_name; p_name++) + hash = hash*IM_MULTIPLIER + *p_name; + + return hash % hash_size; +} + + +/*******************************************************************/ + + +class imAttribNode +{ +public: + int data_type; + int count; + void* data; + char* name; + + imAttribNode* next; + + imAttribNode(const char* name, int _data_type, int _count, const void* _data, imAttribNode* next); + ~imAttribNode(); +}; + +static char* utlStrDup(const char* str) +{ + int size; + char* new_str; + + assert(str); + + size = strlen(str) + 1; + new_str = (char*)malloc(size); + memcpy(new_str, str, size); + + return new_str; +} + +imAttribNode::imAttribNode(const char* name, int _data_type, int _count, const void* _data, imAttribNode* _next) +{ + if (_data_type == 0 && _count == -1) /* BYTE meaning a string */ + _count = strlen((char*)_data)+1; + + this->name = utlStrDup(name); + this->data_type = _data_type; + this->count = _count; + this->next = _next; + + int size = _count * imDataTypeSize(_data_type); + this->data = malloc(size); + if (_data) memcpy(this->data, _data, size); + else memset(this->data, 0, size); +} + +imAttribNode::~imAttribNode() +{ + free(this->name); + free(this->data); +} + + +/*******************************************************************/ + +struct imAttribTablePrivate +{ + int count, + hash_size; + imAttribNode* *hash_table; +}; + +imAttribTablePrivate* imAttribTableCreate(int hash_size) +{ + imAttribTablePrivate* ptable = (imAttribTablePrivate*)malloc(sizeof(imAttribTablePrivate)); + ptable->count = 0; + ptable->hash_size = (hash_size == 0)? IM_DEFAULTSIZE: hash_size; + ptable->hash_table = (imAttribNode**)malloc(ptable->hash_size*sizeof(imAttribNode*)); + memset(ptable->hash_table, 0, ptable->hash_size*sizeof(imAttribNode*)); + return ptable; +} + +imAttribTablePrivate* imAttribArrayCreate(int count) +{ + imAttribTablePrivate* ptable = (imAttribTablePrivate*)malloc(sizeof(imAttribTablePrivate)); + ptable->hash_size = ptable->count = count; + ptable->hash_table = (imAttribNode**)malloc(ptable->count*sizeof(imAttribNode*)); + memset(ptable->hash_table, 0, ptable->hash_size*sizeof(imAttribNode*)); + return ptable; +} + +void imAttribTableDestroy(imAttribTablePrivate* ptable) +{ + imAttribTableRemoveAll(ptable); + free(ptable->hash_table); + free(ptable); +} + +int imAttribTableCount(imAttribTablePrivate* ptable) +{ + return ptable->count; +} + +void imAttribTableRemoveAll(imAttribTablePrivate* ptable) +{ + if (ptable->count == 0) return; + + int n = 0; + for(int i = 0; i < ptable->hash_size; i++) + { + imAttribNode* cur_node = ptable->hash_table[i]; + while (cur_node) + { + imAttribNode* next_node = cur_node->next; + delete cur_node; + cur_node = next_node; + n++; + } + + ptable->hash_table[i] = NULL; + + if (n == ptable->count) + break; + } + + ptable->count = 0; +} + +void imAttribTableSet(imAttribTablePrivate* ptable, const char* name, int data_type, int count, const void* data) +{ + assert(name); + + int index = iHashIndex(name, ptable->hash_size); + imAttribNode* first_node = ptable->hash_table[index]; + + // The name already exists ? + imAttribNode* cur_node = first_node; + imAttribNode* prev_node = NULL; + while (cur_node) + { + if (imStrEqual(cur_node->name, name)) + { + // Found, replace current node. + imAttribNode* new_node = new imAttribNode(name, data_type, count, data, cur_node->next); + + // Is first node ? + if (cur_node == first_node) + ptable->hash_table[index] = new_node; + else + prev_node->next = new_node; + + delete cur_node; + return; + } + + prev_node = cur_node; + cur_node = cur_node->next; + } + + // Not found, the new item goes first. + cur_node = new imAttribNode(name, data_type, count, data, first_node); + ptable->hash_table[index] = cur_node; + ptable->count++; +} + +void imAttribTableUnSet(imAttribTablePrivate* ptable, const char *name) +{ + assert(name); + + if (ptable->count == 0) return; + + int index = iHashIndex(name, ptable->hash_size); + + imAttribNode* cur_node = ptable->hash_table[index]; + imAttribNode* prev_node = cur_node; + while (cur_node) + { + if (imStrEqual(cur_node->name, name)) + { + // Is first node ? + if (cur_node == prev_node) + ptable->hash_table[index] = cur_node->next; + else + prev_node->next = cur_node->next; + + delete cur_node; + ptable->count--; + return; + } + + prev_node = cur_node; + cur_node = cur_node->next; + } +} + +const void* imAttribTableGet(const imAttribTablePrivate* ptable, const char *name, int *data_type, int *count) +{ + assert(name); + + if (ptable->count == 0) return NULL; + + int index = iHashIndex(name, ptable->hash_size); + + imAttribNode* cur_node = ptable->hash_table[index]; + while (cur_node) + { + if (imStrEqual(cur_node->name, name)) + { + if (data_type) *data_type = cur_node->data_type; + if (count) *count = cur_node->count; + return cur_node->data; + } + + cur_node = cur_node->next; + } + + return NULL; +} + +void imAttribArraySet(imAttribTablePrivate* ptable, int index, const char* name, int data_type, int count, const void* data) +{ + assert(name); + assert(index < ptable->count); + + if (index >= ptable->count) return; + + imAttribNode* node = ptable->hash_table[index]; + if (node) delete node; + + ptable->hash_table[index] = new imAttribNode(name, data_type, count, data, NULL); +} + +const void* imAttribArrayGet(const imAttribTablePrivate* ptable, int index, char *name, int *data_type, int *count) +{ + if (ptable->count == 0) return NULL; + + imAttribNode* node = ptable->hash_table[index]; + if (node) + { + if (name) strcpy(name, node->name); + if (data_type) *data_type = node->data_type; + if (count) *count = node->count; + return node->data; + } + + return NULL; +} + +void imAttribTableForEach(const imAttribTablePrivate* ptable, void* user_data, imAttribTableCallback attrib_func) +{ + assert(attrib_func); + + if (ptable->count == 0) return; + + int index = 0; + for(int i = 0; i < ptable->hash_size; i++) + { + imAttribNode* cur_node = ptable->hash_table[i]; + while (cur_node) + { + if (!attrib_func(user_data, index, cur_node->name, cur_node->data_type, cur_node->count, cur_node->data)) + return; + + index++; + cur_node = cur_node->next; + } + + if (index == ptable->count) + return; + } +} + +static int iCopyFunc(void* user_data, int index, const char* name, int data_type, int count, const void* data) +{ + (void)index; + imAttribTablePrivate* ptable = (imAttribTablePrivate*)user_data; + imAttribTableSet(ptable, name, data_type, count, data); + return 1; +} + +void imAttribTableCopyFrom(imAttribTablePrivate* ptable_dst, const imAttribTablePrivate* ptable_src) +{ + imAttribTableForEach(ptable_src, (void*)ptable_dst, iCopyFunc); +} + +static int iCopyArrayFunc(void* user_data, int index, const char* name, int data_type, int count, const void* data) +{ + (void)index; + imAttribTablePrivate* ptable = (imAttribTablePrivate*)user_data; + imAttribArraySet(ptable, index, name, data_type, count, data); + return 1; +} + +void imAttribArrayCopyFrom(imAttribTablePrivate* ptable_dst, const imAttribTablePrivate* ptable_src) +{ + imAttribTableForEach(ptable_src, (void*)ptable_dst, iCopyArrayFunc); +} diff --git a/im/src/im_bin.cpp b/im/src/im_bin.cpp new file mode 100755 index 0000000..de279b5 --- /dev/null +++ b/im/src/im_bin.cpp @@ -0,0 +1,111 @@ +/** \file + * \brief Binary Data Utilities + * + * See Copyright Notice in im_lib.h + * $Id: im_bin.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + +#include + +#include "im_util.h" + + +int imBinCPUByteOrder(void) +{ + static int CPUByteOrder = -1; + + if (CPUByteOrder == -1) + { + unsigned short w = 0x0001; + unsigned char* b = (unsigned char*)&w; + CPUByteOrder = (b[0] == 0x01)? IM_LITTLEENDIAN: IM_BIGENDIAN; + } + + return CPUByteOrder; +} + +void imBinSwapBytes(void *data, int count, int size) +{ + switch(size) + { + case 2: + imBinSwapBytes2(data, count); + break; + case 4: + imBinSwapBytes4(data, count); + break; + case 8: + imBinSwapBytes8(data, count); + break; + } +} + +void imBinSwapBytes2(void *data, int count) +{ + assert(data); + + unsigned char lTemp; + unsigned char *values = (unsigned char *)data; + + while (count-- != 0) + { + lTemp = values[1]; + values[1] = values[0]; + values[0] = lTemp; + + values += 2; + } +} + +void imBinSwapBytes4(void *data, int count) +{ + assert(data); + + unsigned char lTemp; + unsigned char *values = (unsigned char *)data; + + while (count-- != 0) + { + lTemp = values[3]; + values[3] = values[0]; + values[0] = lTemp; + + lTemp = values[2]; + values[2] = values[1]; + values[1] = lTemp; + + values += 4; + } +} + +void imBinSwapBytes8(void *data, int count) +{ + assert(data); + + unsigned char lTemp; + unsigned char *values = (unsigned char *)data; + + assert(values); + + while (count-- != 0) + { + lTemp = values[7]; + values[7] = values[0]; + values[0] = lTemp; + + lTemp = values[6]; + values[6] = values[1]; + values[1] = lTemp; + + lTemp = values[5]; + values[5] = values[2]; + values[2] = lTemp; + + lTemp = values[4]; + values[4] = values[3]; + values[3] = lTemp; + + values += 8; + } +} + diff --git a/im/src/im_binfile.cpp b/im/src/im_binfile.cpp new file mode 100755 index 0000000..7171032 --- /dev/null +++ b/im/src/im_binfile.cpp @@ -0,0 +1,710 @@ +/** \file + * \brief Binary File Access + * + * See Copyright Notice in im_lib.h + * $Id: im_binfile.cpp,v 1.2 2009/10/01 14:15:47 scuri Exp $ + */ + + +#include +#include +#include +#include +#include + +#include "im_util.h" +#include "im_binfile.h" + + +/************************************************** + imBinMemoryFile +***************************************************/ + +class imBinMemoryFile: public imBinFileBase +{ +protected: + unsigned long CurrentSize, BufferSize; + unsigned char* Buffer, *CurPos; + int Error; + float Reallocate; + imBinMemoryFileName* file_name; + + unsigned long ReadBuf(void* pValues, unsigned long pSize); + unsigned long WriteBuf(void* pValues, unsigned long pSize); + +public: + void Open(const char* pFileName); + void New(const char* pFileName); + void Close() {} // Does nothing, the memory belongs to the user + + unsigned long FileSize(); + int HasError() const; + void SeekTo(unsigned long pOffset); + void SeekOffset(long pOffset); + void SeekFrom(long pOffset); + unsigned long Tell() const; + int EndOfFile() const; +}; + +static imBinFileBase* iBinMemoryFileNewFunc() +{ + return new imBinMemoryFile(); +} + +void imBinMemoryRelease(unsigned char *buffer) +{ + free(buffer); +} + +void imBinMemoryFile::Open(const char* pFileName) +{ + this->file_name = (imBinMemoryFileName*)pFileName; + + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 0; + + assert(this->file_name->size); + + this->Buffer = this->file_name->buffer; + this->BufferSize = this->file_name->size; + this->Reallocate = this->file_name->reallocate; + this->CurrentSize = this->BufferSize; + this->CurPos = this->Buffer; + this->Error = 0; +} + +void imBinMemoryFile::New(const char* pFileName) +{ + this->file_name = (imBinMemoryFileName*)pFileName; + + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 1; + + assert(this->file_name->size); + + this->Buffer = this->file_name->buffer; + this->BufferSize = this->file_name->size; + this->Reallocate = this->file_name->reallocate; + this->CurrentSize = 0; + + if (!this->Buffer) + { + this->Buffer = (unsigned char*)malloc(this->BufferSize); + this->file_name->buffer = this->Buffer; + } + + this->CurPos = this->Buffer; + this->Error = 0; +} + +unsigned long imBinMemoryFile::ReadBuf(void* pValues, unsigned long pSize) +{ + assert(this->Buffer); + + unsigned long lOffset = this->CurPos - this->Buffer; + + this->Error = 0; + if (lOffset + pSize > this->CurrentSize) + { + this->Error = 1; + pSize = this->CurrentSize - lOffset; + } + + if (pSize) + { + memcpy(pValues, this->CurPos, pSize); + this->CurPos += pSize; + } + + return pSize; +} + +unsigned long imBinMemoryFile::WriteBuf(void* pValues, unsigned long pSize) +{ + assert(this->Buffer); + + unsigned long lOffset = this->CurPos - this->Buffer; + + this->Error = 0; + if (lOffset + pSize > this->BufferSize) + { + if (this->Reallocate != 0.0) + { + unsigned long nSize = this->BufferSize; + while (lOffset + pSize > nSize) + nSize += (unsigned long)(this->Reallocate*(float)this->BufferSize); + + this->Buffer = (unsigned char*)realloc(this->Buffer, nSize); + + if (this->Buffer) + { + this->BufferSize = nSize; + this->file_name->buffer = this->Buffer; + this->file_name->size = this->BufferSize; + } + else + { + this->Buffer = this->file_name->buffer; + this->Error = 1; + pSize = this->BufferSize - lOffset; + } + + this->CurPos = this->Buffer + lOffset; + } + else + { + this->Error = 1; + pSize = this->BufferSize - lOffset; + } + } + + memcpy(this->CurPos, pValues, pSize); + + if (lOffset + pSize > this->CurrentSize) + this->CurrentSize = lOffset + pSize; + + this->CurPos += pSize; + + return pSize; +} + +unsigned long imBinMemoryFile::FileSize() +{ + assert(this->Buffer); + return this->CurrentSize; +} + +int imBinMemoryFile::HasError() const +{ + if (!this->Buffer) return 1; + return this->Error; +} + +void imBinMemoryFile::SeekTo(unsigned long pOffset) +{ + assert(this->Buffer); + + this->Error = 0; + if (pOffset > this->BufferSize) + { + this->Error = 1; + return; + } + + this->CurPos = this->Buffer + pOffset; + + /* update size if we seek after EOF */ + if (pOffset > this->CurrentSize) + this->CurrentSize = pOffset; +} + +void imBinMemoryFile::SeekFrom(long pOffset) +{ + assert(this->Buffer); + + /* remember that offset is usually a negative value in this case */ + + this->Error = 0; + if (this->CurrentSize + pOffset > this->BufferSize || + (long)this->CurrentSize + pOffset < 0) + { + this->Error = 1; + return; + } + + this->CurPos = this->Buffer + this->CurrentSize + pOffset; + + /* update size if we seek after EOF */ + if (pOffset > 0) + this->CurrentSize = this->CurrentSize + pOffset; +} + +void imBinMemoryFile::SeekOffset(long pOffset) +{ + assert(this->Buffer); + long lOffset = this->CurPos - this->Buffer; + + this->Error = 0; + if (lOffset + pOffset < 0 || lOffset + pOffset > (long)this->BufferSize) + { + this->Error = 1; + return; + } + + this->CurPos += pOffset; + + /* update size if we seek after EOF */ + if (lOffset + pOffset > (long)this->CurrentSize) + this->CurrentSize = lOffset + pOffset; +} + +unsigned long imBinMemoryFile::Tell() const +{ + assert(this->Buffer); + unsigned long lOffset = this->CurPos - this->Buffer; + return lOffset; +} + +int imBinMemoryFile::EndOfFile() const +{ + assert(this->Buffer); + unsigned long lOffset = this->CurPos - this->Buffer; + return lOffset == this->CurrentSize? 1: 0; +} + +/************************************************** + imBinSubFile +**************************************************/ + +static imBinFileBase* iBinFileBaseHandle(const char* pFileName); + +class imBinSubFile: public imBinFileBase +{ +protected: + imBinFileBase* FileHandle; + unsigned long StartOffset; + + unsigned long ReadBuf(void* pValues, unsigned long pSize); + unsigned long WriteBuf(void* pValues, unsigned long pSize); + +public: + void Open(const char* pFileName); + void New(const char* pFileName); + void Close() {} // Does nothing, the file should be close by the parent file. + + unsigned long FileSize(); + int HasError() const; + void SeekTo(unsigned long pOffset); + void SeekOffset(long pOffset); + void SeekFrom(long pOffset); + unsigned long Tell() const; + int EndOfFile() const; +}; + +static imBinFileBase* iBinSubFileNewFunc() +{ + return new imBinSubFile(); +} + +void imBinSubFile::Open(const char* pFileName) +{ + this->FileHandle = iBinFileBaseHandle(pFileName); + this->FileByteOrder = this->FileByteOrder; + this->IsNew = 0; + + StartOffset = this->FileHandle->Tell(); +} + +void imBinSubFile::New(const char* pFileName) +{ + this->FileHandle = iBinFileBaseHandle(pFileName); + this->FileByteOrder = this->FileByteOrder; + this->IsNew = 1; + + StartOffset = this->FileHandle->Tell(); +} + +unsigned long imBinSubFile::FileSize() +{ + assert(this->FileHandle); + return this->FileHandle->FileSize(); +} + +unsigned long imBinSubFile::ReadBuf(void* pValues, unsigned long pSize) +{ + assert(this->FileHandle); + return this->FileHandle->ReadBuf(pValues, pSize); +} + +unsigned long imBinSubFile::WriteBuf(void* pValues, unsigned long pSize) +{ + assert(this->FileHandle); + return this->FileHandle->WriteBuf(pValues, pSize); +} + +int imBinSubFile::HasError() const +{ + assert(this->FileHandle); + return this->FileHandle->HasError(); +} + +void imBinSubFile::SeekTo(unsigned long pOffset) +{ + assert(this->FileHandle); + this->FileHandle->SeekTo(StartOffset + pOffset); +} + +void imBinSubFile::SeekOffset(long pOffset) +{ + assert(this->FileHandle); + this->FileHandle->SeekOffset(pOffset); +} + +void imBinSubFile::SeekFrom(long pOffset) +{ + assert(this->FileHandle); + this->FileHandle->SeekFrom(pOffset); +} + +unsigned long imBinSubFile::Tell() const +{ + assert(this->FileHandle); + return this->FileHandle->Tell() - StartOffset; +} + +int imBinSubFile::EndOfFile() const +{ + assert(this->FileHandle); + return this->FileHandle->EndOfFile(); +} + +/************************************************** + imBinStreamFile +**************************************************/ + +class imBinStreamFile: public imBinFileBase +{ +protected: + FILE* FileHandle; + + unsigned long ReadBuf(void* pValues, unsigned long pSize); + unsigned long WriteBuf(void* pValues, unsigned long pSize); + +public: + void Open(const char* pFileName); + void New(const char* pFileName); + void Close(); + + unsigned long FileSize(); + int HasError() const; + void SeekTo(unsigned long pOffset); + void SeekOffset(long pOffset); + void SeekFrom(long pOffset); + unsigned long Tell() const; + int EndOfFile() const; +}; + +static imBinFileBase* iBinStreamFileNewFunc() +{ + return new imBinStreamFile(); +} + +void imBinStreamFile::Open(const char* pFileName) +{ + this->FileHandle = fopen(pFileName, "rb"); + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 0; +} + +void imBinStreamFile::New(const char* pFileName) +{ + this->FileHandle = fopen(pFileName, "wb"); + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 1; +} + +void imBinStreamFile::Close() +{ + if (this->FileHandle) fclose(this->FileHandle); +} + +unsigned long imBinStreamFile::FileSize() +{ + assert(this->FileHandle); + unsigned long lCurrentPosition = ftell(this->FileHandle); + fseek(this->FileHandle, 0L, SEEK_END); + unsigned long lSize = ftell(this->FileHandle); + fseek(this->FileHandle, lCurrentPosition, SEEK_SET); + return lSize; +} + +unsigned long imBinStreamFile::ReadBuf(void* pValues, unsigned long pSize) +{ + assert(this->FileHandle); + return fread(pValues, 1, pSize, this->FileHandle); +} + +unsigned long imBinStreamFile::WriteBuf(void* pValues, unsigned long pSize) +{ + assert(this->FileHandle); + return fwrite(pValues, 1, pSize, this->FileHandle); +} + +int imBinStreamFile::HasError() const +{ + if (!this->FileHandle) return 1; + return ferror(this->FileHandle) == 0? 0: 1; +} + +void imBinStreamFile::SeekTo(unsigned long pOffset) +{ + assert(this->FileHandle); + fseek(this->FileHandle, pOffset, SEEK_SET); +} + +void imBinStreamFile::SeekOffset(long pOffset) +{ + assert(this->FileHandle); + fseek(this->FileHandle, pOffset, SEEK_CUR); +} + +void imBinStreamFile::SeekFrom(long pOffset) +{ + assert(this->FileHandle); + fseek(this->FileHandle, pOffset, SEEK_END); +} + +unsigned long imBinStreamFile::Tell() const +{ + assert(this->FileHandle); + return ftell(this->FileHandle); +} + +int imBinStreamFile::EndOfFile() const +{ + assert(this->FileHandle); + return feof(this->FileHandle) == 0? 0: 1; +} + +/************************************************** + NewFuncModules +**************************************************/ + +/* implemented in "im_sysfile*.cpp" */ +imBinFileBase* iBinSystemFileNewFunc(); +imBinFileBase* iBinSystemFileHandleNewFunc(); + +#define MAX_MODULES 10 + +static imBinFileNewFunc iBinFileModule[MAX_MODULES] = +{ + iBinSystemFileNewFunc, + iBinStreamFileNewFunc, + iBinMemoryFileNewFunc, + iBinSubFileNewFunc, + iBinSystemFileHandleNewFunc +}; +static int iBinFileModuleCount = 5; +static int iBinFileModuleCurrent = 0; // default module is the first + +int imBinFileSetCurrentModule(int pModule) +{ + int old_module = iBinFileModuleCurrent; + + if (pModule >= iBinFileModuleCount) + return -1; + + iBinFileModuleCurrent = pModule; + + return old_module; +} + +int imBinFileRegisterModule(imBinFileNewFunc pNewFunc) +{ + if (iBinFileModuleCount == MAX_MODULES) return -1; + int id = iBinFileModuleCount; + iBinFileModule[id] = pNewFunc; + iBinFileModuleCount++; + return id; +} + +/************************************************** + imBinFile +**************************************************/ + +struct _imBinFile +{ + imBinFileBase* binfile; +}; + +imBinFile* imBinFileOpen(const char* pFileName) +{ + assert(pFileName); + + assert(iBinFileModuleCurrent < iBinFileModuleCount); + assert(iBinFileModuleCurrent < MAX_MODULES); + + imBinFileNewFunc NewFunc = iBinFileModule[iBinFileModuleCurrent]; + imBinFileBase* binfile = NewFunc(); + + binfile->Open(pFileName); + if (binfile->HasError()) + { + delete binfile; + return NULL; + } + + imBinFile* bfile = new imBinFile; + bfile->binfile = binfile; + + return bfile; +} + +imBinFile* imBinFileNew(const char* pFileName) +{ + assert(pFileName); + + imBinFileNewFunc NewFunc = iBinFileModule[iBinFileModuleCurrent]; + imBinFileBase* binfile = NewFunc(); + + binfile->New(pFileName); + if (binfile->HasError()) + { + delete binfile; + return NULL; + } + + imBinFile* bfile = new imBinFile; + bfile->binfile = binfile; + + return bfile; +} + +void imBinFileClose(imBinFile* bfile) +{ + assert(bfile); + bfile->binfile->Close(); + delete bfile->binfile; + delete bfile; +} + +int imBinFileByteOrder(imBinFile* bfile, int pByteOrder) +{ + assert(bfile); + return bfile->binfile->InitByteOrder(pByteOrder); +} + +int imBinFileError(imBinFile* bfile) +{ + assert(bfile); + return bfile->binfile->HasError(); +} + +unsigned long imBinFileSize(imBinFile* bfile) +{ + assert(bfile); + return bfile->binfile->FileSize(); +} + +unsigned long imBinFileRead(imBinFile* bfile, void* pValues, unsigned long pCount, int pSizeOf) +{ + assert(bfile); + return bfile->binfile->Read(pValues, pCount, pSizeOf); +} + +unsigned long imBinFileWrite(imBinFile* bfile, void* pValues, unsigned long pCount, int pSizeOf) +{ + assert(bfile); + return bfile->binfile->Write(pValues, pCount, pSizeOf); +} + +void imBinFileSeekTo(imBinFile* bfile, unsigned long pOffset) +{ + assert(bfile); + bfile->binfile->SeekTo(pOffset); +} + +void imBinFileSeekOffset(imBinFile* bfile, long pOffset) +{ + assert(bfile); + bfile->binfile->SeekOffset(pOffset); +} + +void imBinFileSeekFrom(imBinFile* bfile, long pOffset) +{ + assert(bfile); + bfile->binfile->SeekFrom(pOffset); +} + +unsigned long imBinFileTell(imBinFile* bfile) +{ + assert(bfile); + return bfile->binfile->Tell(); +} + +int imBinFileEndOfFile(imBinFile* bfile) +{ + assert(bfile); + return bfile->binfile->EndOfFile(); +} + +unsigned long imBinFilePrintf(imBinFile* bfile, char *format, ...) +{ + va_list arglist; + va_start(arglist, format); + char buffer[4096]; + int size = vsprintf(buffer, format, arglist); + return imBinFileWrite(bfile, buffer, size, 1); +} + +int imBinFileReadInteger(imBinFile* handle, int *value) +{ + int i = 0, found = 0; + char buffer[11], c; + + while (!found) + { + imBinFileRead(handle, &c, 1, 1); + + /* if it's an integer, increments the number of characters read */ + if ((c >= '0' && c <= '9') || (c == '-')) + { + buffer[i] = c; + i++; + } + else + { + /* if it's not, and we read some characters, convert them to an integer */ + if (i > 0) + { + buffer[i] = 0; + *value = atoi(buffer); + found = 1; + } + } + + if (imBinFileError(handle) || i > 10) + return 0; + } + + return 1; +} + +int imBinFileReadFloat(imBinFile* handle, float *value) +{ + int i = 0, found = 0; + char buffer[17], c; + + while (!found) + { + imBinFileRead(handle, &c, 1, 1); + + /* if it's a floating point number, increments the number of characters read */ + if ((c >= '0' && c <= '9') || c == '-' || c == '+' || c == '.' || c == 'e' || c == 'E') + { + buffer[i] = c; + i++; + } + else + { + /* if it's not, and we read some characters convert them to an integer */ + if (i > 0) + { + buffer[i] = 0; + *value = (float)atof(buffer); + found = 1; + } + } + + if (imBinFileError(handle) || i > 16) + return 0; + } + + return 1; +} + +static imBinFileBase* iBinFileBaseHandle(const char* pFileName) +{ + imBinFile* bfile = (imBinFile*)pFileName; + return (imBinFileBase*)bfile->binfile; +} diff --git a/im/src/im_capture.def b/im/src/im_capture.def new file mode 100755 index 0000000..6b44ac3 --- /dev/null +++ b/im/src/im_capture.def @@ -0,0 +1,27 @@ +EXPORTS + imVideoCaptureDeviceCount + imVideoCaptureDeviceDesc + imVideoCaptureReloadDevices + imVideoCaptureCreate + imVideoCaptureDestroy + imVideoCaptureConnect + imVideoCaptureDisconnect + imVideoCaptureShowDialog + imVideoCaptureDialogCount + imVideoCaptureDialogDesc + imVideoCaptureGetImageSize + imVideoCaptureSetImageSize + imVideoCaptureFrame + imVideoCaptureOneFrame + imVideoCaptureLive + imVideoCaptureResetAttribute + imVideoCaptureGetAttribute + imVideoCaptureSetAttribute + imVideoCaptureGetAttributeList + imVideoCaptureFormatCount + imVideoCaptureGetFormat + imVideoCaptureSetFormat + imVideoCaptureSetInOut + imVideoCaptureDeviceExDesc + imVideoCaptureDevicePath + imVideoCaptureDeviceVendorInfo diff --git a/im/src/im_capture.mak b/im/src/im_capture.mak new file mode 100755 index 0000000..8f10bc7 --- /dev/null +++ b/im/src/im_capture.mak @@ -0,0 +1,73 @@ +PROJNAME = im +LIBNAME = im_capture +OPT = YES + +INCLUDES = ../include + +# New Direct X does not includes Direct Show +# Direct Show is included in latest Platform SDK, but depends on Direct X... +DXSDK = d:/lng/dxsdk +WINSDK = d:/lng/winsdk + +ifeq ($(TEC_UNAME), vc6) + #Use old Direct X with Direct Show + #But do NOT use the VC6 strmiids.lib + PLATSDK = d:/lng/vc7/PlatformSDK +endif + +ifeq ($(TEC_UNAME), dll) + #Use old Direct X with Direct Show + PLATSDK = d:/lng/vc7/PlatformSDK + LDIR = ../lib/$(TEC_UNAME) +endif + +ifeq ($(TEC_UNAME), vc8) + INCLUDES += $(WINSDK)/include + LDIR = $(WINSDK)/lib +endif + +ifeq ($(TEC_UNAME), dll8) + INCLUDES += $(WINSDK)/include + LDIR = $(WINSDK)/lib +endif + +ifeq ($(TEC_UNAME), vc8_64) + INCLUDES += $(WINSDK)/include + LDIR = $(WINSDK)/lib/amd64 +endif + +ifeq ($(TEC_UNAME), dll8_64) + INCLUDES += $(WINSDK)/include + LDIR = $(WINSDK)/lib/amd64 +endif + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + INCLUDES += $(DXSDK)/include + SRC = im_capture_dx.cpp +endif + +#ifneq ($(findstring Linux, $(TEC_UNAME)), ) +# SRC = im_capture_v4l.cpp +#endif + +LIBS = strmiids + +mingw3-dll: + @echo Importing MingW stub library + @cd ../lib/dll + @dlltool -d im_capture.def -D im_capture.dll -l ../lib/mingw3/libim_capture.a + @cd ../src + +mingw4-dll: + @echo Importing MingW stub library + @cd ../lib/dll + @dlltool -d im_capture.def -D im_capture.dll -l ../lib/mingw4/libim_capture.a + @cd ../src + +bc56-dll: + @echo Importing Bcc stub library + @d:/lng/cbuilderx/bin/implib -a ../lib/bc56/im_capture.lib ../lib/dll/im_capture.dll + +#owc1-dll: +# @wlib -b -c -n -q -fo -io ../lib/owc1/im_capture.lib @im_capture.wlib +# TEST @wlib -b -c -n -q -fo -io ../lib/owc1/im_capture.lib +../lib/dll/im_capture.dll diff --git a/im/src/im_capture.wlib b/im/src/im_capture.wlib new file mode 100644 index 0000000..7dca75e --- /dev/null +++ b/im/src/im_capture.wlib @@ -0,0 +1,22 @@ +++imVideoCaptureDeviceCount.im_capture._imVideoCaptureDeviceCount +++imVideoCaptureDeviceDesc.im_capture._imVideoCaptureDeviceDesc +++imVideoCaptureReloadDevices.im_capture._imVideoCaptureReloadDevices +++imVideoCaptureCreate.im_capture._imVideoCaptureCreate +++imVideoCaptureDestroy.im_capture._imVideoCaptureDestroy +++imVideoCaptureConnect.im_capture._imVideoCaptureConnect +++imVideoCaptureDisconnect.im_capture._imVideoCaptureDisconnect +++imVideoCaptureShowDialog.im_capture._imVideoCaptureShowDialog +++imVideoCaptureDialogCount.im_capture._imVideoCaptureDialogCount +++imVideoCaptureDialogDesc.im_capture._imVideoCaptureDialogDesc +++imVideoCaptureGetImageSize.im_capture._imVideoCaptureGetImageSize +++imVideoCaptureSetImageSize.im_capture._imVideoCaptureSetImageSize +++imVideoCaptureFrame.im_capture._imVideoCaptureFrame +++imVideoCaptureOneFrame.im_capture._imVideoCaptureOneFrame +++imVideoCaptureLive.im_capture._imVideoCaptureLive +++imVideoCaptureResetAttribute.im_capture._imVideoCaptureResetAttribute +++imVideoCaptureGetAttribute.im_capture._imVideoCaptureGetAttribute +++imVideoCaptureSetAttribute.im_capture._imVideoCaptureSetAttribute +++imVideoCaptureGetAttributeList.im_capture._imVideoCaptureGetAttributeList +++imVideoCaptureFormatCount.im_capture._imVideoCaptureFormatCount +++imVideoCaptureGetFormat.im_capture._imVideoCaptureGetFormat +++imVideoCaptureSetFormat.im_capture._imVideoCaptureSetFormat diff --git a/im/src/im_capture_dx.cpp b/im/src/im_capture_dx.cpp new file mode 100755 index 0000000..cb4749b --- /dev/null +++ b/im/src/im_capture_dx.cpp @@ -0,0 +1,2255 @@ +/** \file + * \brief Video Capture Using Direct Show 9 + * + * See Copyright Notice in im.h + * $Id: im_capture_dx.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + +/* + The Direct Show Graph is composed by 3 components: + capture source, sample grabber and null renderer. + + Filters are connected: + capture_filter(out)->(int)grabber_filter(out)->(in)null_filter + + But when the graph is rendered other transform filters + can be inserted to connect the capture and the grabber. + + We do not use MFC, ATL and the Direct Show Base Classes. + This module only needs the library "strmiids.lib". + If the extra error functions were used, you will need to link with "quartz.lib" or "dxerr9.lib". + + We use the buffer of the ISampleGrabber. But this can not be done in a user callback, + so we leave the grab loop for the application, it can also be done in the idle function. + + If you use the idle function for the grab loop, then WDM Source Dialog will interrupt the "live" mode. + Just because it is a modal dialog and it does not use the application message loop. + It can be solved if the grab loop is implemented using a timer. + + Since there is no gray format, bpp is always 24bpp. +*/ + +#define _WIN32_WINNT 0x0500 // Because of TryEnterCriticalSection + +#include +#include + +#include +#include +#include + +#include +#include + +#include "im_capture.h" + +#define VC_CAMERADELAY 200 // This vary from camera to camera, so we use a reasonable value and hope it will work for all. +#define VC_MAXVIDDEVICES 30 // Maximum number of devices to list + +//#define VC_REGISTER_FILTERGRAPH // Use this to allow GraphEdit to spy the graph +//#define VC_INCLUDE_VFW_DEVICES // Use this to allow old video for windows devices +//#define VC_PRINT_ERROR_MESSAGES // Use this to display a system custom error message + +#if defined(_DEBUG) | defined(DEBUG) +#define VC_REGISTER_FILTERGRAPH +#define VC_PRINT_ERROR_MESSAGES +#endif + + +/************************************************************************** + imTrackingGrabberCB +***************************************************************************/ + +// This is better than using the sample grabber internal buffer +// because we have a more precise control of the data flow. + +class imTrackingGrabberCB: public ISampleGrabberCB +{ +public: + imTrackingGrabberCB(); + ~imTrackingGrabberCB(); + + STDMETHODIMP SampleCB(double SampleTime, IMediaSample *pSample); + STDMETHODIMP BufferCB(double SampleTime, BYTE *pBuffer, long BufferLen) {return E_NOTIMPL;} + STDMETHODIMP_(ULONG) AddRef() {return 2;} + STDMETHODIMP_(ULONG) Release() {return 1;} + STDMETHODIMP QueryInterface(REFIID riid, void ** ppv); + + void SetImageSize(int width, int height); + int GetImage(unsigned char* data, int color_mode, int timeout); + +protected: + int m_Width, m_Height; + bool m_newImageFlag; + unsigned char *m_ImageData; + CRITICAL_SECTION m_sect; + HANDLE m_imageReady; +}; + +imTrackingGrabberCB::imTrackingGrabberCB() +{ + InitializeCriticalSection(&m_sect); + m_newImageFlag = 0; + m_ImageData = NULL; + m_imageReady = CreateEvent(NULL, FALSE, TRUE, NULL); +} + +imTrackingGrabberCB::~imTrackingGrabberCB() +{ + CloseHandle(m_imageReady); + EnterCriticalSection(&m_sect); + DeleteCriticalSection(&m_sect); + if (m_ImageData) delete m_ImageData; +} + +STDMETHODIMP imTrackingGrabberCB::QueryInterface(REFIID riid, void ** ppv) +{ + if( riid == IID_ISampleGrabberCB || riid == IID_IUnknown ) { + *ppv = (void *) static_cast (this); + return NOERROR; + } + return E_NOINTERFACE; +} + +void imTrackingGrabberCB::SetImageSize(int width, int height) +{ + EnterCriticalSection(&m_sect); + + // This can be done because the capture system always returns + // images that are a multiple of 4. + int new_size = width * height * 3; + + if (!m_ImageData) + { + m_ImageData = (BYTE*)calloc(new_size, 1); + m_Width = width; + m_Height = height; + } + + if (m_Width*m_Height < new_size) + m_ImageData = (BYTE*)realloc(m_ImageData, new_size); + + m_Width = width; + m_Height = height; + + LeaveCriticalSection(&m_sect); +} + +STDMETHODIMP imTrackingGrabberCB::SampleCB(double, IMediaSample *pSample) +{ + if (!m_ImageData) return S_OK; + + EnterCriticalSection(&m_sect); + + int size = pSample->GetSize(); + if (size > m_Width*m_Height*3) + { + LeaveCriticalSection(&m_sect); + return S_OK; + } + + BYTE *pData; + pSample->GetPointer(&pData); + CopyMemory(m_ImageData, pData, size); + m_newImageFlag = 1; + + LeaveCriticalSection(&m_sect); + + SetEvent(m_imageReady); + + return S_OK; +} + +int imTrackingGrabberCB::GetImage(unsigned char* data, int color_mode, int timeout) +{ + if (timeout != 0) + { + DWORD ret = WaitForSingleObject(m_imageReady, timeout); + if (ret != WAIT_OBJECT_0) + return 0; + } + + if (!TryEnterCriticalSection(&m_sect)) + return 0; + + if (m_newImageFlag == 1) + { + int count = m_Width*m_Height; + unsigned char* src_data = m_ImageData; + + if (imColorModeSpace(color_mode) == IM_RGB) + { + if (imColorModeIsPacked(color_mode)) + { + unsigned char* dst_data = data; + for (int i = 0; i < count; i++) + { + *(dst_data+2) = *src_data++; + *(dst_data+1) = *src_data++; + *dst_data = *src_data++; + dst_data += 3; + } + } + else + { + unsigned char* red = data; + unsigned char* green = data + count; + unsigned char* blue = data + 2*count; + for (int i = 0; i < count; i++) + { + *blue++ = *src_data++; + *green++ = *src_data++; + *red++ = *src_data++; + } + } + } + else + { + unsigned char* map = data; + for (int i = 0; i < count; i++) + { + *map++ = *src_data; + src_data += 3; + } + } + + m_newImageFlag = 0; + + LeaveCriticalSection(&m_sect); + return 1; + } + + LeaveCriticalSection(&m_sect); + return 0; +} + + +/************************************************************************** + Direct Show Only +***************************************************************************/ + + +struct vcDevice +{ + IBaseFilter *filter; + char vendorinfo[128]; + char desc[128]; + char ex_desc[256]; + char path[512]; +}; +static vcDevice vc_DeviceList[VC_MAXVIDDEVICES]; +static int vc_DeviceCount = 0; + +static void vc_AddDevice(IBaseFilter *filter, char* desc, char* ex_desc, char* path, char* vendorinfo) +{ + int i = vc_DeviceCount; + vcDevice* device = &vc_DeviceList[i]; + + memset(device, 0, sizeof(vcDevice)); + + device->filter = filter; + + if (!desc) desc = "device"; + sprintf(device->desc, "%d - %s", i, desc); + + if (ex_desc) strcpy(device->ex_desc, ex_desc); + if (path) strcpy(device->path, path); + if (vendorinfo) strcpy(device->vendorinfo, vendorinfo); + + vc_DeviceCount++; +} + + +#ifdef VC_PRINT_ERROR_MESSAGES +//#include + +static int vc_ShowError(HRESULT hr) +{ + if (FAILED(hr)) + { + TCHAR szErr[MAX_ERROR_TEXT_LEN]; + DWORD res = AMGetErrorText(hr, szErr, MAX_ERROR_TEXT_LEN); // Must link with quartz.lib + if (res == 0) wsprintf(szErr, "Unknown Error: 0x%2x", hr); + MessageBox(0, szErr, "imCapture Error!", MB_OK | MB_ICONERROR); +// MessageBox(NULL, DXGetErrorDescription9(hr), DXGetErrorString9(hr), MB_OK | MB_ICONERROR); + return 1; + } + + return 0; +} + +#define VC_HARDFAILED(_x) vc_ShowError(_x) +#else +#define VC_HARDFAILED FAILED +#endif + +static char* vc_Wide2Char(WCHAR* wstr) +{ + if (wstr) + { + int n = wcslen(wstr)+1; + char* str = (char*)malloc(n); + WideCharToMultiByte(CP_ACP, 0, wstr, -1, str, n, NULL, NULL); + return str; + } + + return NULL; +} + +#ifdef VC_INCLUDE_VFW_DEVICES +#define VC_CATEGORY_FLAG 0 +#else +#define VC_CATEGORY_FLAG CDEF_DEVMON_FILTER|CDEF_DEVMON_PNP_DEVICE +#endif + +static char* vc_GetDeviceProp(IPropertyBag *pPropBag, const WCHAR* PropName) +{ + VARIANT varProp; + VariantInit(&varProp); + HRESULT hr = pPropBag->Read(PropName, &varProp, 0); + if (SUCCEEDED(hr)) + { + char* str = vc_Wide2Char(varProp.bstrVal); + VariantClear(&varProp); + return str; + } + return NULL; +} + +static void vc_EnumerateDevices(void) +{ + // Selecting a Capture Device + ICreateDevEnum *pDevEnum = NULL; + IEnumMoniker *pEnum = NULL; + + CoInitialize(NULL); + + // Create the System Device Enumerator. + HRESULT hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, + CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, + reinterpret_cast(&pDevEnum)); + if (FAILED(hr)) return; + + // Create an enumerator for the video capture category. + hr = pDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnum, VC_CATEGORY_FLAG); + if (FAILED(hr) || !pEnum) + { + pDevEnum->Release(); + return; + } + + IMoniker *pMoniker = NULL; + while (pEnum->Next(1, &pMoniker, NULL) == S_OK) + { + IBaseFilter *capture_filter = NULL; + hr = pMoniker->BindToObject(0, 0, IID_IBaseFilter, (void**)&capture_filter); + if (FAILED(hr)) + { + pMoniker->Release(); + continue; // Skip this one, maybe the next one will work. + } + + IPropertyBag *pPropBag; + hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)(&pPropBag)); + if (FAILED(hr)) + { + capture_filter->Release(); + pMoniker->Release(); + continue; // Skip this one, maybe the next one will work. + } + + char* desc = vc_GetDeviceProp(pPropBag, L"FriendlyName"); + char* ex_desc = vc_GetDeviceProp(pPropBag, L"Description"); + char* path = vc_GetDeviceProp(pPropBag, L"DevicePath"); + + char* vendorinfo = NULL; + LPWSTR VendorInfo; + if (capture_filter->QueryVendorInfo(&VendorInfo) == S_OK) + { + vendorinfo = vc_Wide2Char(VendorInfo); + CoTaskMemFree(VendorInfo); + } + + vc_AddDevice(capture_filter, desc, ex_desc, path, vendorinfo); + + if (desc) free(desc); + if (ex_desc) free(ex_desc); + if (path) free(path); + if (vendorinfo) free(vendorinfo); + + pPropBag->Release(); + pMoniker->Release(); + } + + pEnum->Release(); + pDevEnum->Release(); +} + +static IPin* vc_GetPin(IBaseFilter* pFilter, PIN_DIRECTION dir) +{ + IEnumPins* pEnumPins = NULL; + IPin* pPin = NULL; + + pFilter->EnumPins(&pEnumPins); + if(!pEnumPins) + return NULL; + + for(;;) + { + ULONG cFetched = 0; + PIN_DIRECTION pinDir = PIN_DIRECTION(-1); + pPin = 0; + + if (FAILED(pEnumPins->Next(1, &pPin, &cFetched))) + { + pEnumPins->Release(); + return NULL; + } + + if(cFetched == 1 && pPin != 0) + { + pPin->QueryDirection(&pinDir); + if(pinDir == dir) break; + pPin->Release(); + } + } + + pEnumPins->Release(); + return pPin; +} + +static void vc_NukeDownstream(IGraphBuilder* filter_builder, IBaseFilter *filter) +{ + IPin *pPin=0, *pPinTo=0; + IEnumPins *pEnumPins = NULL; + PIN_INFO pininfo; + + HRESULT hr = filter->EnumPins(&pEnumPins); + if (FAILED(hr)) return; + + pEnumPins->Reset(); + + while(hr == NOERROR) + { + hr = pEnumPins->Next(1, &pPin, NULL); + if(hr == S_OK && pPin) + { + pPin->ConnectedTo(&pPinTo); + if(pPinTo) + { + hr = pPinTo->QueryPinInfo(&pininfo); + if(hr == NOERROR) + { + if(pininfo.dir == PINDIR_INPUT) + { + vc_NukeDownstream(filter_builder, pininfo.pFilter); + filter_builder->Disconnect(pPinTo); + filter_builder->Disconnect(pPin); + filter_builder->RemoveFilter(pininfo.pFilter); + } + + pininfo.pFilter->Release(); + } + + pPinTo->Release(); + } + + pPin->Release(); + } + } + + pEnumPins->Release(); +} + +static int vc_DisconnectFilters(IGraphBuilder* filter_builder, IBaseFilter* source, IBaseFilter* destiny) +{ + IPin *pOut = vc_GetPin(source, PINDIR_OUTPUT); + IPin *pIn = vc_GetPin(destiny, PINDIR_INPUT); + HRESULT hr = filter_builder->Disconnect(pOut); + hr = filter_builder->Disconnect(pIn); + pOut->Release(); + pIn->Release(); + if (VC_HARDFAILED(hr)) return 0; + return 1; +} + +static int vc_DisconnectFilterPin(IGraphBuilder* filter_builder, IBaseFilter* filter, PIN_DIRECTION dir) +{ + IPin *pIn = vc_GetPin(filter, dir); + IPin *pOut; + pIn->ConnectedTo(&pOut); + + HRESULT hr = filter_builder->Disconnect(pIn); + pIn->Release(); + if (VC_HARDFAILED(hr)) + { + if (pOut) pOut->Release(); + return 0; + } + + if (pOut) + { + hr = filter_builder->Disconnect(pOut); + pOut->Release(); + + if (VC_HARDFAILED(hr)) + return 0; + } + + return 1; +} + +static int vc_ConnectFilters(IGraphBuilder* filter_builder, IBaseFilter* source, IBaseFilter* destiny, int direct) +{ + HRESULT hr; + IPin *pOut = vc_GetPin(source, PINDIR_OUTPUT); + IPin *pIn = vc_GetPin(destiny, PINDIR_INPUT); + if (direct) + hr = filter_builder->ConnectDirect(pOut, pIn, NULL); + else + hr = filter_builder->Connect(pOut, pIn); + pOut->Release(); + pIn->Release(); + if (VC_HARDFAILED(hr)) return 0; + return 1; +} + +static DWORD vc_AddGraphToRot(IUnknown *pUnkGraph) +{ + IMoniker * pMoniker; + IRunningObjectTable *pROT; + WCHAR wsz[128]; + HRESULT hr; + + if (FAILED(GetRunningObjectTable(0, &pROT))) + return 0; + + wsprintfW(wsz, L"FilterGraph %08x pid %08x\0", (DWORD_PTR)pUnkGraph, GetCurrentProcessId()); + + hr = CreateItemMoniker(L"!", wsz, &pMoniker); + if (SUCCEEDED(hr)) + { + DWORD dwRegister; + hr = pROT->Register(ROTFLAGS_REGISTRATIONKEEPSALIVE, pUnkGraph, pMoniker, &dwRegister); + pROT->Release(); + + pMoniker->Release(); + + if (SUCCEEDED(hr)) + return dwRegister; + } + + pROT->Release(); + return 0; +} + +static void vc_RemoveGraphFromRot(DWORD pdwRegister) +{ + IRunningObjectTable *pROT; + + if (SUCCEEDED(GetRunningObjectTable(0, &pROT))) + { + pROT->Revoke(pdwRegister); + pROT->Release(); + } +} + +/************************************************************************** + imVideoCapture +***************************************************************************/ + +typedef int (*vcDialogFunc)(imVideoCapture* vc, HWND parent); + +struct _imVideoCapture +{ + int registered_graph, + live, + device; /* current connected device. -1 if not connected. */ + + char* dialog_desc[6]; + vcDialogFunc dialog_func[6]; + int dialog_count; /* number of available configuration dialogs for the current connection. */ + + IGraphBuilder* filter_builder; /* The Filter Graph Manager */ + ICaptureGraphBuilder2* capture_graph_builder; /* Helps the Filter Graph Manager */ + IBaseFilter* capture_filter; /* the capture device (can vary), it's a source filter. */ + IBaseFilter* grabber_filter; /* returns the capture data, it's a transform filter */ + IBaseFilter* null_filter; /* does nothing, act as a terminator, it's a rendering filter */ + ISampleGrabber* sample_grabber; /* Used to access the ISampleGrabber interface, since grabber_filter is a generic IBaseFilter interface based on ISampleGrabber. */ + IMediaControl* media_control; /* Used to Run and Stop the graph flow. */ + IBaseFilter* overlay_renderer; /* Used when there is a video port without a preview */ + IBaseFilter *overlay_mixer; + + IAMVideoProcAmp* video_prop; /* Used to set/get video properties */ + IAMCameraControl* camera_prop; /* Used to set/get camera properties */ + IAMVideoControl* videoctrl_prop; /* Used to set/get video properties */ + + imTrackingGrabberCB* sample_callback; /* Used to intercept the samples. */ + + int format_count; /* number of supported formats */ + int format_current; /* current format */ + int format_map[50]; /* table to map returned formats to direct X formats */ +}; + +int imVideoCaptureDeviceCount(void) +{ + return vc_DeviceCount; +} + +int imVideoCaptureReloadDevices(void) +{ + for (int i = 0; i < vc_DeviceCount; i++) + { + vc_DeviceList[i].filter->Release(); + } + + vc_DeviceCount = 0; + vc_EnumerateDevices(); + return vc_DeviceCount; +} + +static int vc_CheckDeviceList(int device) +{ + // List available Devices once + if (vc_DeviceCount == 0) + { + vc_EnumerateDevices(); + + if (vc_DeviceCount == 0) + return 0; + } + + if (device < 0 || device >= vc_DeviceCount) + return 0; + + return 1; +} + +const char* imVideoCaptureDeviceDesc(int device) +{ + if (!vc_CheckDeviceList(device)) + return NULL; + + return vc_DeviceList[device].desc; +} + +const char* imVideoCaptureDeviceExDesc(int device) +{ + if (!vc_CheckDeviceList(device)) + return NULL; + + return vc_DeviceList[device].ex_desc; +} + +const char* imVideoCaptureDevicePath(int device) +{ + if (!vc_CheckDeviceList(device)) + return NULL; + + return vc_DeviceList[device].path; +} + +const char* imVideoCaptureDeviceVendorInfo(int device) +{ + if (!vc_CheckDeviceList(device)) + return NULL; + + return vc_DeviceList[device].vendorinfo; +} + +#define vc_SafeRelease(_p) { if( (_p) != 0 ) { (_p)->Release(); (_p)= NULL; } } + +static void vc_CheckVideoPort(imVideoCapture* vc) +{ +/* + If the video capture card supports the video port pin without a video preview pin this will not work. + The DirectShow architecture requires that the video port pin be connected to the Overlay Mixer Filter. + If this pin is not connected, data cannot be captured in DirectShow. +*/ + HRESULT hr; + + IPin *pPreviewPin = NULL; + hr = vc->capture_graph_builder->FindPin( + vc->capture_filter, // Pointer to the capture filter. + PINDIR_OUTPUT, // Look for an output pin. + &PIN_CATEGORY_PREVIEW, // Look for a preview pin. + NULL, // Any media type. + FALSE, // Pin can be connected. + 0, // Retrieve the first matching pin. + &pPreviewPin // Receives a pointer to the pin. + ); + if (hr == S_OK) + { + pPreviewPin->Release(); + return; + } + + IPin *pVideoPortPin = NULL; + hr = vc->capture_graph_builder->FindPin( + vc->capture_filter, // Pointer to the capture filter. + PINDIR_OUTPUT, // Look for an output pin. + &PIN_CATEGORY_VIDEOPORT, // Look for a video port pin. + NULL, // Any media type. + FALSE, // Pin can be connected. + 0, // Retrieve the first matching pin. + &pVideoPortPin // Receives a pointer to the pin. + ); + if (FAILED(hr)) return; + + // Create the overlay mixer. + CoCreateInstance(CLSID_OverlayMixer, NULL, CLSCTX_INPROC, + IID_IBaseFilter, (void **)&vc->overlay_mixer); + + // Add it to the filter graph. + vc->filter_builder->AddFilter(vc->overlay_mixer, L"Overlay Mixer"); + + IPin *pOverlayPin = NULL; + vc->capture_graph_builder->FindPin(vc->overlay_mixer, PINDIR_INPUT, NULL, NULL, TRUE, 0, &pOverlayPin); + + vc->filter_builder->Connect(pVideoPortPin, pOverlayPin); + if (FAILED(hr)) return; + + vc_SafeRelease(pVideoPortPin); + vc_SafeRelease(pOverlayPin); + + CoCreateInstance(CLSID_VideoRenderer, NULL, CLSCTX_INPROC_SERVER, + IID_IBaseFilter, reinterpret_cast(&vc->overlay_renderer)); + vc->filter_builder->AddFilter(vc->overlay_renderer, L"Overlay Renderer"); + + vc_ConnectFilters(vc->filter_builder, vc->overlay_mixer, vc->overlay_renderer, 1); + + IVideoWindow* pVideoWindow = NULL; + vc->overlay_renderer->QueryInterface(IID_IVideoWindow,(void**)&pVideoWindow); + pVideoWindow->put_AutoShow(OAFALSE); + pVideoWindow->Release(); +} + +static void vc_ReleaseMixer(imVideoCapture* vc) +{ + IPin *pOverlayPin = vc_GetPin(vc->overlay_mixer, PINDIR_INPUT); + IPin *pVideoPortPin = NULL; + pOverlayPin->ConnectedTo(&pVideoPortPin); + vc->filter_builder->Disconnect(pOverlayPin); + vc->filter_builder->Disconnect(pVideoPortPin); + vc_SafeRelease(pVideoPortPin); + vc_SafeRelease(pOverlayPin); + + vc_DisconnectFilters(vc->filter_builder, vc->overlay_mixer, vc->overlay_renderer); + + vc->filter_builder->RemoveFilter(vc->overlay_renderer); + vc->filter_builder->RemoveFilter(vc->overlay_mixer); + vc_SafeRelease(vc->overlay_renderer); + vc_SafeRelease(vc->overlay_mixer); +} + +static int vc_InitCaptureGraphBuilder(imVideoCapture* vc) +{ + HRESULT hr = CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC_SERVER, + IID_ICaptureGraphBuilder2, reinterpret_cast(&vc->capture_graph_builder)); + if (FAILED(hr)) return 0; + + hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, + IID_IGraphBuilder, reinterpret_cast(&vc->filter_builder)); + if (FAILED(hr)) return 0; + + hr = CoCreateInstance(CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, + IID_IBaseFilter, reinterpret_cast(&vc->grabber_filter)); + if (FAILED(hr)) return 0; + + hr = CoCreateInstance(CLSID_NullRenderer, NULL, CLSCTX_INPROC_SERVER, + IID_IBaseFilter, reinterpret_cast(&vc->null_filter)); + if (FAILED(hr)) return 0; + + // Initialize the Capture Graph Builder. + vc->capture_graph_builder->SetFiltergraph(vc->filter_builder); + + hr = vc->filter_builder->QueryInterface(IID_IMediaControl,(void**)&vc->media_control); + hr = vc->grabber_filter->QueryInterface(IID_ISampleGrabber, (void **)&vc->sample_grabber); + + AM_MEDIA_TYPE mt; + ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE)); + mt.majortype = MEDIATYPE_Video; + mt.subtype = MEDIASUBTYPE_RGB24; // Force 24 bpp + vc->sample_grabber->SetMediaType(&mt); + vc->sample_grabber->SetOneShot(FALSE); + vc->sample_grabber->SetBufferSamples(FALSE); + + vc->sample_callback = new imTrackingGrabberCB(); + + hr = vc->filter_builder->AddFilter(vc->grabber_filter, L"imSampleGrabber"); + hr = vc->filter_builder->AddFilter(vc->null_filter, L"imNullRenderer"); + + // Remove clock to speed up things + IMediaFilter* pMediaFilter = NULL; + vc->filter_builder->QueryInterface(IID_IMediaFilter, (void**)&pMediaFilter); + pMediaFilter->SetSyncSource(NULL); + pMediaFilter->Release(); + +#ifdef VC_REGISTER_FILTERGRAPH + vc->registered_graph = vc_AddGraphToRot(vc->filter_builder); +#endif + + return 1; +} + +imVideoCapture* imVideoCaptureCreate(void) +{ + imVideoCapture* vc = (imVideoCapture*)malloc(sizeof(imVideoCapture)); + memset(vc, 0, sizeof(imVideoCapture)); + + // List available Devices once + if (vc_DeviceCount == 0) + { + vc_EnumerateDevices(); + + if (vc_DeviceCount == 0) + { + free(vc); + return NULL; + } + } + + if (!vc_InitCaptureGraphBuilder(vc)) + { + vc_SafeRelease(vc->grabber_filter); + vc_SafeRelease(vc->filter_builder); + vc_SafeRelease(vc->capture_graph_builder); + vc_SafeRelease(vc->null_filter); + free(vc); + return NULL; + } + + vc->device = -1; + + return vc; +} + +static void vc_CaptureRemove(imVideoCapture* vc) +{ + vc->filter_builder->RemoveFilter(vc->capture_filter); + + vc->capture_filter = NULL; /* do not release here */ + vc_SafeRelease(vc->video_prop); + vc_SafeRelease(vc->camera_prop); + vc_SafeRelease(vc->videoctrl_prop); + + vc->dialog_count = 0; + vc->live = 0; + vc->device = -1; +} + +void imVideoCaptureDestroy(imVideoCapture* vc) +{ + assert(vc); + +#ifdef VC_REGISTER_FILTERGRAPH + if (vc->registered_graph) vc_RemoveGraphFromRot(vc->registered_graph); +#endif + + imVideoCaptureDisconnect(vc); + + delete vc->sample_callback; + + vc_SafeRelease(vc->overlay_mixer); + vc_SafeRelease(vc->overlay_renderer); + vc_SafeRelease(vc->media_control); + vc_SafeRelease(vc->sample_grabber); + + vc->null_filter->Release(); + vc->grabber_filter->Release(); + vc->filter_builder->Release(); + vc->capture_graph_builder->Release(); + + free(vc); +} + +static void vc_StopLive(imVideoCapture* vc) +{ + if (vc->live) // If it is live, stop it + { + vc->media_control->Stop(); + Sleep(VC_CAMERADELAY); + } +} + +static int vc_StartLive(imVideoCapture* vc) +{ + if (vc->live) // If it should be started, start it + { + HRESULT hr = vc->media_control->Run(); + if (VC_HARDFAILED(hr)) + { + vc->live = 0; + return 0; + } + + Sleep(VC_CAMERADELAY); + } + + return 1; +} + +int imVideoCaptureOneFrame(imVideoCapture* vc, unsigned char* data, int color_mode) +{ + assert(vc); + assert(vc->device != -1); + + vc_StopLive(vc); + vc->live = 0; + + vc->sample_grabber->SetOneShot(TRUE); + + vc->live = 1; + if (!vc_StartLive(vc)) + { + vc->sample_grabber->SetOneShot(FALSE); + return 0; + } + + int ret = imVideoCaptureFrame(vc, data, color_mode, -1); + + vc_StopLive(vc); + vc->live = 0; + + vc->sample_grabber->SetOneShot(FALSE); + + return ret; +} + +int imVideoCaptureFrame(imVideoCapture* vc, unsigned char* data, int color_mode, int timeout) +{ + assert(vc); + assert(vc->device != -1); + assert(vc->live); + return vc->sample_callback->GetImage(data, color_mode, timeout); +} + +static int vc_CaptureDisconnect(imVideoCapture* vc) +{ + vc->sample_grabber->SetCallback(NULL, 0); + + if (vc->overlay_mixer) + vc_ReleaseMixer(vc); + + vc_DisconnectFilters(vc->filter_builder, vc->grabber_filter, vc->null_filter); + + // Disconnect the grabber to preserve it + if (!vc_DisconnectFilterPin(vc->filter_builder, vc->grabber_filter, PINDIR_INPUT)) + return 0; + + // Remove everything downstream the capture filter, except the null renderer + vc_NukeDownstream(vc->filter_builder, vc->capture_filter); + + return 1; +} + +void imVideoCaptureDisconnect(imVideoCapture* vc) +{ + assert(vc); + + if (vc->device == -1) + return; + + vc_StopLive(vc); + vc->live = 0; + + vc_CaptureDisconnect(vc); + vc_CaptureRemove(vc); +} + +static void vc_UpdateSize(imVideoCapture* vc) +{ + int width, height; + imVideoCaptureGetImageSize(vc, &width, &height); + vc->sample_callback->SetImageSize(width, height); +} + +static void vc_UpdateDialogs(imVideoCapture* vc); +static void vc_UpdateFormatList(imVideoCapture* vc); + +static int vc_CaptureConnect(imVideoCapture* vc) +{ + vc_CheckVideoPort(vc); + + if (!vc_ConnectFilters(vc->filter_builder, vc->capture_filter, vc->grabber_filter, 0)) + { + vc_CaptureRemove(vc); + return 0; + } + + vc_ConnectFilters(vc->filter_builder, vc->grabber_filter, vc->null_filter, 1); + + vc_UpdateDialogs(vc); + vc_UpdateFormatList(vc); + vc_UpdateSize(vc); + vc->sample_grabber->SetCallback(vc->sample_callback, 0); // associate the sample_grabber with the sample_callback + + return 1; +} + +int imVideoCaptureConnect(imVideoCapture* vc, int device) +{ + assert(vc); + + if (device == -1) + return vc->device; + + if (device == vc->device) + return 1; + + if (device < -1 || device > vc_DeviceCount) + return 0; + + if (vc->device != -1) + imVideoCaptureDisconnect(vc); + + vc->capture_filter = vc_DeviceList[device].filter; + if (!vc->capture_filter) + return 0; + + vc->filter_builder->AddFilter(vc->capture_filter, L"imCaptureSource"); + vc->device = device; + + if (!vc_CaptureConnect(vc)) + return 0; + + return 1; +} + +int imVideoCaptureLive(imVideoCapture* vc, int live) +{ + assert(vc); + + if (live == -1) + return vc->live; + + if (vc->device == -1) + return 0; + + if (live == vc->live) + return 1; + + if (live) + { + vc->live = 1; + if (!vc_StartLive(vc)) + return 0; + } + else + { + vc_StopLive(vc); + vc->live = 0; + } + + return 1; +} + + +/************************************************************************** + Format and Size +***************************************************************************/ + + +void imVideoCaptureGetImageSize(imVideoCapture* vc, int *width, int *height) +{ + assert(vc); + assert(vc->device != -1); + + AM_MEDIA_TYPE mt; + ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE)); + HRESULT hr = vc->sample_grabber->GetConnectedMediaType(&mt); + + if ( SUCCEEDED(hr) && + (mt.majortype == MEDIATYPE_Video) && + (mt.formattype == FORMAT_VideoInfo) && + (mt.cbFormat >= sizeof (VIDEOINFOHEADER)) && + (mt.pbFormat != NULL)) + { + VIDEOINFOHEADER *pVih = (VIDEOINFOHEADER*)mt.pbFormat; + *width = pVih->bmiHeader.biWidth; + *height = abs(pVih->bmiHeader.biHeight); + CoTaskMemFree((PVOID)mt.pbFormat); + } + else + { + *width = 0; + *height = 0; + } +} + +static IIPDVDec* vc_GetDVDecoder(imVideoCapture* vc) +{ + IIPDVDec *pDV = NULL; + HRESULT hr = vc->capture_graph_builder->FindInterface(NULL, + &MEDIATYPE_Video, vc->capture_filter, IID_IIPDVDec, (void **)&pDV); + if(FAILED(hr)) + return NULL; + + return pDV; +} + +static IAMStreamConfig* vc_GetStreamConfig(imVideoCapture* vc) +{ + IAMStreamConfig *pSC = NULL; + if (FAILED(vc->capture_graph_builder->FindInterface(&PIN_CATEGORY_CAPTURE, + &MEDIATYPE_Video, vc->capture_filter, IID_IAMStreamConfig, (void **)&pSC))) + return NULL; + + return pSC; +} + +static void vc_DeleteMediaType(AM_MEDIA_TYPE *pmt) +{ + CoTaskMemFree((PVOID)pmt->pbFormat); + CoTaskMemFree(pmt); +} + +static int vc_SetStreamSize(imVideoCapture* vc, int width, int height) +{ + IAMStreamConfig *pSC = vc_GetStreamConfig(vc); + if (!pSC) return 0; + + AM_MEDIA_TYPE *pmt; + HRESULT hr = pSC->GetFormat(&pmt); + if (FAILED(hr)) return 0; + + VIDEOINFOHEADER* vih = (VIDEOINFOHEADER*)pmt->pbFormat; + BITMAPINFOHEADER* bih = &vih->bmiHeader; + + /* dibs are DWORD aligned */ + int data_size = height * ((width * bih->biBitCount + 31) / 32) * 4; /* 4 bytes boundary */ + + bih->biSize = sizeof(BITMAPINFOHEADER); + bih->biHeight = height; + bih->biWidth = width; + bih->biSizeImage = data_size; + + int fps = 30; // desired frame rate + vih->dwBitRate = fps * data_size; + vih->AvgTimePerFrame = 10000000 / fps; + + pmt->cbFormat = sizeof(VIDEOINFOHEADER); + pmt->lSampleSize = data_size; + + hr = pSC->SetFormat(pmt); + pSC->Release(); + + vc_DeleteMediaType(pmt); + + return SUCCEEDED(hr); +} + +static int vc_SetImageSize(imVideoCapture* vc, int width, int height) +{ + IIPDVDec* pDV = vc_GetDVDecoder(vc); + if (pDV) + { + int size = 0; + + switch(width) + { + case 720: + size = DVRESOLUTION_FULL; + break; + case 360: + size = DVRESOLUTION_HALF; + break; + case 180: + size = DVRESOLUTION_QUARTER; + break; + case 88: + size = DVRESOLUTION_DC; + break; + } + + if (!size) + return 0; + + int ret = SUCCEEDED(pDV->put_IPDisplay(size)); + if (ret) + vc->sample_callback->SetImageSize(width, height); + + return ret; + } + + int ret = vc_SetStreamSize(vc, width, height); + if (ret) + vc->sample_callback->SetImageSize(width, height); + + return ret; +} + +int imVideoCaptureSetImageSize(imVideoCapture* vc, int width, int height) +{ + assert(vc); + assert(vc->device != -1); + + vc_StopLive(vc); + + // must be disconnected to change size or format + vc_CaptureDisconnect(vc); + + int ret = vc_SetImageSize(vc, width, height); + + if (!vc_CaptureConnect(vc)) + ret = 0; + + vc_StartLive(vc); + + return ret; +} + +static void vc_UpdateFormatList(imVideoCapture* vc) +{ + vc->format_count = 0; + vc->format_current = -1; + + IAMStreamConfig *pSC = vc_GetStreamConfig(vc); + if (!pSC) return; + + int iCount = 0, iSize = 0; + if (FAILED(pSC->GetNumberOfCapabilities(&iCount, &iSize))) + { + pSC->Release(); + return; + } + + AM_MEDIA_TYPE *curr_pmt; + HRESULT hr = pSC->GetFormat(&curr_pmt); + if (FAILED(hr)) + { + pSC->Release(); + return; + } + + for (int iFormat = 0; iFormat < iCount; iFormat++) + { + VIDEO_STREAM_CONFIG_CAPS scc; + AM_MEDIA_TYPE *pmt; + if (SUCCEEDED(pSC->GetStreamCaps(iFormat, &pmt, (BYTE*)&scc))) + { + if (scc.guid == FORMAT_VideoInfo) + { + VIDEOINFOHEADER* vih = (VIDEOINFOHEADER*)curr_pmt->pbFormat; + BITMAPINFOHEADER* bih = &vih->bmiHeader; + int width = bih->biWidth; + int height = abs(bih->biHeight); + + if (curr_pmt->subtype == pmt->subtype && + width == scc.InputSize.cx && + height == scc.InputSize.cy) + { + vc->format_current = vc->format_count; + } + + vc->format_map[vc->format_count] = iFormat; + vc->format_count++; + } + + vc_DeleteMediaType(pmt); + } + } + + vc_DeleteMediaType(curr_pmt); + pSC->Release(); +} + +int imVideoCaptureFormatCount(imVideoCapture* vc) +{ + assert(vc); + assert(vc->device != -1); + + return vc->format_count; +} + +static void vc_GetFormatName(GUID subtype, char* desc) +{ +#define VC_NUM_FORMATS 7 + typedef struct _guid2name { + char* name; + const GUID* subtype; + } guid2name; + static guid2name map_table[VC_NUM_FORMATS] = { + {"RGB1",&MEDIASUBTYPE_RGB1}, + {"RGB4",&MEDIASUBTYPE_RGB4}, + {"RGB8",&MEDIASUBTYPE_RGB8}, + {"RGB565",&MEDIASUBTYPE_RGB565}, + {"RGB555",&MEDIASUBTYPE_RGB555}, + {"RGB24",&MEDIASUBTYPE_RGB24}, + {"RGB32",&MEDIASUBTYPE_RGB32} + }; + + for (int i = 0; i < VC_NUM_FORMATS; i++) + { + if (*(map_table[i].subtype) == subtype) + { + strcpy(desc, map_table[i].name); + return; + } + } + + desc[0] = (char)(subtype.Data1); + desc[1] = (char)(subtype.Data1 >> 8); + desc[2] = (char)(subtype.Data1 >> 16); + desc[3] = (char)(subtype.Data1 >> 32); + desc[4] = 0; +} + +int imVideoCaptureGetFormat(imVideoCapture* vc, int format, int *width, int *height, char* desc) +{ + assert(vc); + assert(vc->device != -1); + assert(vc->format_count); + + if (format >= vc->format_count) + return 0; + + IAMStreamConfig *pSC = vc_GetStreamConfig(vc); + if (!pSC) return 0; + + VIDEO_STREAM_CONFIG_CAPS scc; + AM_MEDIA_TYPE *pmt; + if (SUCCEEDED(pSC->GetStreamCaps(vc->format_map[format], &pmt, (BYTE*)&scc))) + { + *width = scc.InputSize.cx; + *height = scc.InputSize.cy; + vc_GetFormatName(pmt->subtype, desc); + + pSC->Release(); + vc_DeleteMediaType(pmt); + return 1; + } + + pSC->Release(); + return 0; +} + +static int vc_SetStreamFormat(imVideoCapture* vc, int format) +{ + IAMStreamConfig *pSC = vc_GetStreamConfig(vc); + if (!pSC) return 0; + + VIDEO_STREAM_CONFIG_CAPS scc; + AM_MEDIA_TYPE *pmt; + if (FAILED(pSC->GetStreamCaps(vc->format_map[format], &pmt, (BYTE*)&scc))) + { + pSC->Release(); + return 0; + } + + pSC->SetFormat(pmt); + pSC->Release(); + + vc->sample_callback->SetImageSize(scc.InputSize.cx, scc.InputSize.cy); + + vc_DeleteMediaType(pmt); + + return 1; +} + +int imVideoCaptureSetFormat(imVideoCapture* vc, int format) +{ + assert(vc); + assert(vc->device != -1); + + if (format == -1) + return vc->format_current; + + if (format >= vc->format_count) + return 0; + + vc_StopLive(vc); + + // must be disconnected to change size or format + vc_CaptureDisconnect(vc); + + int ok = vc_SetStreamFormat(vc, format); + + if (!vc_CaptureConnect(vc)) + ok = 0; + + if (ok) + vc->format_current = format; + + vc_StartLive(vc); + + return ok; +} + + +/************************************************************************** + Dialogs +***************************************************************************/ + + +static ISpecifyPropertyPages* vc_GetPropertyPages(IUnknown* obj) +{ + ISpecifyPropertyPages *pSpec = NULL; + + HRESULT hr = obj->QueryInterface(IID_ISpecifyPropertyPages, (void **)&pSpec); + if (FAILED(hr)) return NULL; + + CAUUID cauuid; + hr = pSpec->GetPages(&cauuid); + CoTaskMemFree(cauuid.pElems); + + if (FAILED(hr)) + { + pSpec->Release(); + return NULL; + } + + return pSpec; +} + +static int vc_ShowPropertyPages(HWND parent, IUnknown* obj, WCHAR* title) +{ + ISpecifyPropertyPages *pSpec = vc_GetPropertyPages(obj); + + CAUUID cauuid; + pSpec->GetPages(&cauuid); + + HRESULT hr = OleCreatePropertyFrame(parent, 30, 30, title, 1, + &obj, cauuid.cElems, (GUID *)cauuid.pElems, 0, 0, NULL); + + CoTaskMemFree(cauuid.pElems); + pSpec->Release(); + + if (FAILED(hr)) return 0; + return 1; +} + +static IAMVfwCaptureDialogs* vc_getVfwDialogs(imVideoCapture* vc) +{ + IAMVfwCaptureDialogs* pDlg = NULL; + HRESULT hr = vc->capture_graph_builder->FindInterface(&PIN_CATEGORY_CAPTURE, + &MEDIATYPE_Video, vc->capture_filter, IID_IAMVfwCaptureDialogs, (void **)&pDlg); + + if (FAILED(hr)) + return NULL; + + return pDlg; +} + +static int vc_ShowVfwDialog(imVideoCapture* vc, HWND parent, VfwCaptureDialogs dialog) +{ + assert(vc); + assert(vc->device != -1); + + IAMVfwCaptureDialogs *pDlg = vc_getVfwDialogs(vc); + if(!pDlg) return 0; + + HRESULT hr = pDlg->HasDialog(dialog); + if (FAILED(hr)) + { + pDlg->Release(); + return 0; + } + + int ret = 0; + vc_StopLive(vc); + + // must be disconnected to change size or format + vc_CaptureDisconnect(vc); + + hr = pDlg->ShowDialog(dialog, parent); + if (SUCCEEDED(hr)) + ret = 1; + + if (!vc_CaptureConnect(vc)) + ret = 0; + + vc_StartLive(vc); + + pDlg->Release(); + return ret; +} + +static int vc_ShowVfwFormatDialog(imVideoCapture* vc, HWND parent) +{ + return vc_ShowVfwDialog(vc, parent, VfwCaptureDialog_Format); +} + +static int vc_ShowVfwSourceDialog(imVideoCapture* vc, HWND parent) +{ + return vc_ShowVfwDialog(vc, parent, VfwCaptureDialog_Source); +} + +static int vc_ShowVfwDisplayDialog(imVideoCapture* vc, HWND parent) +{ + return vc_ShowVfwDialog(vc, parent, VfwCaptureDialog_Display); +} + +static int vc_ShowFormatDialog(imVideoCapture* vc, HWND parent) +{ + assert(vc); + assert(vc->device != -1); + + IAMStreamConfig *pSC = vc_GetStreamConfig(vc); + if (!pSC) return 0; + + vc_StopLive(vc); + + // must be disconnected to change size or format + vc_CaptureDisconnect(vc); + + int ok = vc_ShowPropertyPages(parent, (IUnknown*)pSC, L"Format"); + pSC->Release(); + + if (!vc_CaptureConnect(vc)) + ok = 0; + + vc_StartLive(vc); + + return ok; +} + +static int vc_ShowSourceDialog(imVideoCapture* vc, HWND parent) +{ + assert(vc); + assert(vc->device != -1); + + return vc_ShowPropertyPages(parent, (IUnknown*)vc->capture_filter, L"Source"); +} + +static IAMTVTuner* vc_GetTVTuner(imVideoCapture* vc) +{ + IAMTVTuner *pTVT = NULL; + + HRESULT hr = vc->capture_graph_builder->FindInterface(&PIN_CATEGORY_CAPTURE, + &MEDIATYPE_Video, vc->capture_filter, IID_IAMTVTuner, (void **)&pTVT); + if(FAILED(hr)) + return NULL; + + return pTVT; +} + +static int vc_ShowTVTunerDialog(imVideoCapture* vc, HWND parent) +{ + assert(vc); + assert(vc->device != -1); + + IAMTVTuner* pTVT = vc_GetTVTuner(vc); + if (!pTVT) + return 0; + + int ret = vc_ShowPropertyPages(parent, (IUnknown*)pTVT, L"TV Turner"); + pTVT->Release(); + return ret; +} + +static IAMCrossbar* vc_GetCrossBar(imVideoCapture* vc) +{ + IAMCrossbar *pX = NULL; + HRESULT hr = vc->capture_graph_builder->FindInterface(&PIN_CATEGORY_CAPTURE, + &MEDIATYPE_Video, vc->capture_filter, IID_IAMCrossbar, (void **)&pX); + if(FAILED(hr)) + return NULL; + + return pX; +} + +static int vc_ShowCrossbarDialog(imVideoCapture* vc, HWND parent) +{ + assert(vc); + assert(vc->device != -1); + + IAMCrossbar* pX = vc_GetCrossBar(vc); + if (!pX) + return 0; + + int ret = vc_ShowPropertyPages(parent, (IUnknown*)pX, L"Crossbar"); + pX->Release(); + return ret; +} + +static IAMCrossbar* vc_GetSecondCrossBar(imVideoCapture* vc, IAMCrossbar *pX) +{ + IAMCrossbar *pX2 = NULL; + IBaseFilter *pXF; + HRESULT hr = pX->QueryInterface(IID_IBaseFilter, (void **)&pXF); + if(hr != S_OK) return NULL; + + hr = vc->capture_graph_builder->FindInterface(&LOOK_UPSTREAM_ONLY, + NULL, pXF, IID_IAMCrossbar, (void **)&pX2); + pXF->Release(); + if(FAILED(hr)) return NULL; + + return pX2; +} + +static int vc_ShowSecondCrossbarDialog(imVideoCapture* vc, HWND parent) +{ + assert(vc); + assert(vc->device != -1); + + IAMCrossbar* pX = vc_GetCrossBar(vc); + if (!pX) + return 0; + + IAMCrossbar* pX2 = vc_GetSecondCrossBar(vc, pX); + if (!pX2) + { + pX->Release(); + return 0; + } + + int ret = vc_ShowPropertyPages(parent, (IUnknown*)pX2, L"Second Crossbar"); + pX->Release(); + pX2->Release(); + return ret; +} + +static int vc_ShowDVDecDialog(imVideoCapture* vc, HWND parent) +{ + assert(vc); + assert(vc->device != -1); + + IIPDVDec* pDV = vc_GetDVDecoder(vc); + if (!pDV) + return 0; + + vc_StopLive(vc); + + int ret = vc_ShowPropertyPages(parent, (IUnknown*)pDV, L"DV Decoder"); + pDV->Release(); + + vc_StartLive(vc); + + return ret; +} + +static void vc_UpdateDialogs(imVideoCapture* vc) +{ + vc->dialog_count = 0; + + IAMVfwCaptureDialogs *pDlg = vc_getVfwDialogs(vc); + if(pDlg) + { + if(pDlg->HasDialog(VfwCaptureDialog_Format) == S_OK) + { + vc->dialog_desc[vc->dialog_count] = "Format... (VFW)"; + vc->dialog_func[vc->dialog_count] = vc_ShowVfwFormatDialog; + vc->dialog_count++; + } + + if(pDlg->HasDialog(VfwCaptureDialog_Source) == S_OK) + { + vc->dialog_desc[vc->dialog_count] = "Source... (VFW)"; + vc->dialog_func[vc->dialog_count] = vc_ShowVfwSourceDialog; + vc->dialog_count++; + } + + if(pDlg->HasDialog(VfwCaptureDialog_Display) == S_OK) + { + vc->dialog_desc[vc->dialog_count] = "Display... (VFW)"; + vc->dialog_func[vc->dialog_count] = vc_ShowVfwDisplayDialog; + vc->dialog_count++; + } + + return; + } + + ISpecifyPropertyPages *pSpec; + IAMStreamConfig *pSC = vc_GetStreamConfig(vc); + if (pSC) + { + pSpec = vc_GetPropertyPages((IUnknown*)pSC); + if (pSpec) + { + vc->dialog_desc[vc->dialog_count] = "Format..."; + vc->dialog_func[vc->dialog_count] = vc_ShowFormatDialog; + vc->dialog_count++; + pSpec->Release(); + } + + pSC->Release(); + } + + pSpec = vc_GetPropertyPages((IUnknown*)vc->capture_filter); + if (pSpec) + { + vc->dialog_desc[vc->dialog_count] = "Source..."; + vc->dialog_func[vc->dialog_count] = vc_ShowSourceDialog; + vc->dialog_count++; + pSpec->Release(); + } + + IIPDVDec* pDV = vc_GetDVDecoder(vc); + if (pDV) + { + pSpec = vc_GetPropertyPages((IUnknown*)pDV); + if (pSpec) + { + vc->dialog_desc[vc->dialog_count] = "DV Decoder..."; + vc->dialog_func[vc->dialog_count] = vc_ShowDVDecDialog; + vc->dialog_count++; + pSpec->Release(); + } + + pDV->Release(); + } + + IAMCrossbar* pX = vc_GetCrossBar(vc); + if (pX) + { + pSpec = vc_GetPropertyPages((IUnknown*)pX); + if (pSpec) + { + vc->dialog_desc[vc->dialog_count] = "Crossbar..."; + vc->dialog_func[vc->dialog_count] = vc_ShowCrossbarDialog; + vc->dialog_count++; + pSpec->Release(); + } + + IAMCrossbar* pX2 = vc_GetSecondCrossBar(vc, pX); + if (pX2) + { + pSpec = vc_GetPropertyPages((IUnknown*)pX2); + if (pSpec) + { + vc->dialog_desc[vc->dialog_count] = "Second Crossbar..."; + vc->dialog_func[vc->dialog_count] = vc_ShowSecondCrossbarDialog; + vc->dialog_count++; + pSpec->Release(); + } + + pX2->Release(); + } + + pX->Release(); + } + + IAMTVTuner* pTVT = vc_GetTVTuner(vc); + if (pTVT) + { + pSpec = vc_GetPropertyPages((IUnknown*)pTVT); + if (pSpec) + { + vc->dialog_desc[vc->dialog_count] = "TV Tuner..."; + vc->dialog_func[vc->dialog_count] = vc_ShowTVTunerDialog; + vc->dialog_count++; + pSpec->Release(); + } + + pTVT->Release(); + } +} + +int imVideoCaptureDialogCount(imVideoCapture* vc) +{ + assert(vc); + assert(vc->device != -1); + + return vc->dialog_count; +} + +const char* imVideoCaptureDialogDesc(imVideoCapture* vc, int dialog) +{ + assert(vc); + assert(vc->device != -1); + + if (dialog >= vc->dialog_count) + return NULL; + + return vc->dialog_desc[dialog]; +} + +int imVideoCaptureShowDialog(imVideoCapture* vc, int dialog, void* parent) +{ + assert(vc); + assert(vc->device != -1); + + if (dialog >= vc->dialog_count) + return 0; + + return vc->dialog_func[dialog](vc, (HWND)parent); +} + +int imVideoCaptureSetInOut(imVideoCapture* vc, int input, int output, int cross) +{ + assert(vc); + assert(vc->device != -1); + + IAMCrossbar* pX = vc_GetCrossBar(vc); + if (pX) + { + HRESULT hr = S_FALSE; + + if (cross == 1) + hr = pX->Route(output, input); + else + { + IAMCrossbar* pX2 = vc_GetSecondCrossBar(vc, pX); + if (pX2) + { + hr = pX2->Route(output, input); + pX2->Release(); + } + } + + pX->Release(); + if (hr == S_OK) + return 1; + } + + return 0; +} + +/************************************************************************** + Attributes +***************************************************************************/ + + +static float vc_Value2Percent(long Min, long Max, long Val) +{ + return ((Val - Min)*100.0f)/((float)(Max - Min)); +} + +static long vc_Percent2Value(long Min, long Max, long Step, float Per) +{ + long Val = (long)((Per/100.)*(Max - Min) + Min); + if (Step == 1) + return Val; + + long num_step = (Val - Min + Step-1) / Step; + return num_step*Step + Min; +} + +static IAMVideoProcAmp* vc_InitVideoProcAmp(IBaseFilter* capture_filter, IAMVideoProcAmp* *video_prop) +{ + if (*video_prop) + return *video_prop; + + HRESULT hr = capture_filter->QueryInterface(IID_IAMVideoProcAmp, (void**)video_prop); + if (FAILED(hr)) + return NULL; + + return *video_prop; +} + +static int vc_SetVideoProcAmpProperty(IBaseFilter* capture_filter, IAMVideoProcAmp* *video_prop, long property, float percent) +{ + IAMVideoProcAmp *pProp = vc_InitVideoProcAmp(capture_filter, video_prop); + if (!pProp) return 0; + HRESULT hr; + VideoProcAmpProperty prop = (VideoProcAmpProperty)property; + long Min, Max, Step, Default, Flags; + hr = pProp->GetRange(prop, &Min, &Max, &Step, &Default, &Flags); + hr = pProp->Set(prop, vc_Percent2Value(Min, Max, Step, percent), VideoProcAmp_Flags_Manual); + if (FAILED(hr)) return 0; + return 1; +} + +static int vc_GetVideoProcAmpProperty(IBaseFilter* capture_filter, IAMVideoProcAmp* *video_prop, long property, float *percent) +{ + IAMVideoProcAmp *pProp = vc_InitVideoProcAmp(capture_filter, video_prop); + if (!pProp) return 0; + + HRESULT hr; + VideoProcAmpProperty prop = (VideoProcAmpProperty)property; + long Min, Max, Step, Default, Flags, Val; + hr = pProp->GetRange(prop, &Min, &Max, &Step, &Default, &Flags); + hr = pProp->Get(prop, &Val, &Flags); + + if (FAILED(hr)) return 0; + *percent = vc_Value2Percent(Min, Max, Val); + return 1; +} + +static int vc_ResetVideoProcAmpProperty(IBaseFilter* capture_filter, IAMVideoProcAmp* *video_prop, long property, int fauto) +{ + IAMVideoProcAmp *pProp = vc_InitVideoProcAmp(capture_filter, video_prop); + if (!pProp) return 0; + + HRESULT hr; + VideoProcAmpProperty prop = (VideoProcAmpProperty)property; + long Min, Max, Step, Default, Flags; + hr = pProp->GetRange(prop, &Min, &Max, &Step, &Default, &Flags); + + if (fauto && (Flags & VideoProcAmp_Flags_Auto)) + hr = pProp->Set(prop, Default, VideoProcAmp_Flags_Auto); + else + hr = pProp->Set(prop, Default, VideoProcAmp_Flags_Manual); + + if (FAILED(hr)) return 0; + return 1; +} + +static IAMCameraControl* vc_InitCameraControl(IBaseFilter* capture_filter, IAMCameraControl* *camera_prop) +{ + if (*camera_prop) + return *camera_prop; + + HRESULT hr = capture_filter->QueryInterface(IID_IAMCameraControl, (void**)camera_prop); + if (FAILED(hr)) + return NULL; + + return *camera_prop; +} + +static int vc_SetCameraControlProperty(IBaseFilter* capture_filter, IAMCameraControl* *camera_prop, long property, float percent) +{ + IAMCameraControl *pProp = vc_InitCameraControl(capture_filter, camera_prop); + if (!pProp) return 0; + + HRESULT hr; + CameraControlProperty prop = (CameraControlProperty)property; + long Min, Max, Step, Default, Flags; + hr = pProp->GetRange(prop, &Min, &Max, &Step, &Default, &Flags); + hr = pProp->Set(prop, vc_Percent2Value(Min, Max, Step, percent), CameraControl_Flags_Manual); + + if (FAILED(hr)) return 0; + return 1; +} + +static int vc_GetCameraControlProperty(IBaseFilter* capture_filter, IAMCameraControl* *camera_prop, long property, float *percent) +{ + IAMCameraControl *pProp = vc_InitCameraControl(capture_filter, camera_prop); + if (!pProp) return 0; + + HRESULT hr; + CameraControlProperty prop = (CameraControlProperty)property; + long Min, Max, Step, Default, Flags, Val; + hr = pProp->GetRange(prop, &Min, &Max, &Step, &Default, &Flags); + hr = pProp->Get(prop, &Val, &Flags); + + if (FAILED(hr)) return 0; + *percent = vc_Value2Percent(Min, Max, Val); + return 1; +} + +static int vc_ResetCameraControlProperty(IBaseFilter* capture_filter, IAMCameraControl* *camera_prop, long property, int fauto) +{ + IAMCameraControl *pProp = vc_InitCameraControl(capture_filter, camera_prop); + if (!pProp) return 0; + + HRESULT hr; + CameraControlProperty prop = (CameraControlProperty)property; + long Min, Max, Step, Default, Flags; + hr = pProp->GetRange(prop, &Min, &Max, &Step, &Default, &Flags); + + if (fauto && (Flags & CameraControl_Flags_Auto)) + hr = pProp->Set(prop, Default, CameraControl_Flags_Auto); + else + hr = pProp->Set(prop, Default, CameraControl_Flags_Manual); + + if (FAILED(hr)) return 0; + return 1; +} + +static IAMVideoControl* vc_InitVideoControl(IBaseFilter* capture_filter, IAMVideoControl* *video_prop) +{ + if (*video_prop) + return *video_prop; + + HRESULT hr = capture_filter->QueryInterface(IID_IAMVideoControl, (void**)video_prop); + if (FAILED(hr)) + return NULL; + + return *video_prop; +} + +static int vc_SetVideoControlProperty(IBaseFilter* capture_filter, IAMVideoControl* *video_prop, long property, float percent) +{ + IAMVideoControl *pProp = vc_InitVideoControl(capture_filter, video_prop); + if (!pProp) return 0; + + HRESULT hr; + IPin *pOutPin = vc_GetPin(capture_filter, PINDIR_OUTPUT); + long Mode; + hr = pProp->GetMode(pOutPin, &Mode); + if (percent) + Mode = Mode | property; + else + Mode = Mode & ~property; + hr = pProp->SetMode(pOutPin, Mode); + pOutPin->Release(); + + if (FAILED(hr)) return 0; + return 1; +} + +static int vc_GetVideoControlProperty(IBaseFilter* capture_filter, IAMVideoControl* *video_prop, long property, float *percent) +{ + IAMVideoControl *pProp = vc_InitVideoControl(capture_filter, video_prop); + if (!pProp) return 0; + + HRESULT hr; + long Mode; + IPin *pOutPin = vc_GetPin(capture_filter, PINDIR_OUTPUT); + hr = pProp->GetMode(pOutPin, &Mode); + pOutPin->Release(); + + if (FAILED(hr)) return 0; + if (Mode & property) + *percent = 100.; + else + *percent = 0.; + return 1; +} + +static int vc_ResetVideoControlProperty(IBaseFilter* capture_filter, IAMVideoControl* *video_prop, long property, int fauto) +{ + IAMVideoControl *pProp = vc_InitVideoControl(capture_filter, video_prop); + if (!pProp) return 0; + + HRESULT hr; + long Mode; + IPin *pOutPin = vc_GetPin(capture_filter, PINDIR_OUTPUT); + hr = pProp->GetMode(pOutPin, &Mode); + if (Mode & property) + Mode = Mode & ~property; + else + Mode = Mode | property; + hr = pProp->SetMode(pOutPin, Mode); + pOutPin->Release(); + + if (FAILED(hr)) return 0; + return 1; +} + +static long vc_AnalogFormat[19] = +{ + AnalogVideo_NTSC_M, + AnalogVideo_NTSC_M_J, + AnalogVideo_NTSC_433, + AnalogVideo_PAL_B, + AnalogVideo_PAL_D, + AnalogVideo_PAL_H, + AnalogVideo_PAL_I, + AnalogVideo_PAL_M, + AnalogVideo_PAL_N, + AnalogVideo_PAL_60, + AnalogVideo_SECAM_B, + AnalogVideo_SECAM_D, + AnalogVideo_SECAM_G, + AnalogVideo_SECAM_H, + AnalogVideo_SECAM_K, + AnalogVideo_SECAM_K1, + AnalogVideo_SECAM_L, + AnalogVideo_SECAM_L1, + AnalogVideo_PAL_N_COMBO +}; + +static int vc_SetAnalogFormat(IBaseFilter* capture_filter, float percent) +{ + IAMAnalogVideoDecoder* video_decoder = NULL; + HRESULT hr = capture_filter->QueryInterface(IID_IAMAnalogVideoDecoder, (void**)video_decoder); + if (FAILED(hr)) + return 0; + + hr = video_decoder->put_TVFormat(vc_AnalogFormat[(int)percent]); + video_decoder->Release(); + + if (FAILED(hr)) return 0; + return 1; +} + +static int vc_GetAnalogFormat(IBaseFilter* capture_filter, float *percent) +{ + IAMAnalogVideoDecoder* video_decoder = NULL; + HRESULT hr = capture_filter->QueryInterface(IID_IAMAnalogVideoDecoder, (void**)video_decoder); + if (FAILED(hr)) + return 0; + + long format; + hr = video_decoder->get_TVFormat(&format); + video_decoder->Release(); + + if (FAILED(hr)) return 0; + for (int i = 0; i < 19; i++) + { + if (vc_AnalogFormat[i] == format) + { + *percent = (float)i; + return 1; + } + } + return 0; +} + +#define VC_HASH_SIZE 101 +#define VC_HASH_MULTIPLIER 31 + +/** Unique Hash index for a key + * We use the hash function described in "The Pratice of Programming" of Kernighan & Pike. */ +static int vc_HashIndex(const char *key, int hash_size) +{ + unsigned short hash = 0; + const unsigned char *p_key = (const unsigned char*)key; + + for(; *p_key; p_key++) + hash = hash*VC_HASH_MULTIPLIER + *p_key; + + return hash % hash_size; +} + +#define VC_CAMERASHIFT 20 +#define VC_VIDEOSHIFT 40 +#define VC_ANALOGSHIFT 60 + +static long vc_Attrib2Property(const char* attrib) +{ + static long prop_table[VC_HASH_SIZE]; + static int first = 1; + if (first) + { + memset(prop_table, 0, VC_HASH_SIZE*sizeof(long)); + prop_table[vc_HashIndex("CameraPanAngle", VC_HASH_SIZE)] = (long)CameraControl_Pan + VC_CAMERASHIFT + 1; + prop_table[vc_HashIndex("CameraTiltAngle", VC_HASH_SIZE)] = (long)CameraControl_Tilt + VC_CAMERASHIFT + 1; + prop_table[vc_HashIndex("CameraRollAngle", VC_HASH_SIZE)] = (long)CameraControl_Roll + VC_CAMERASHIFT + 1; + prop_table[vc_HashIndex("CameraLensZoom", VC_HASH_SIZE)] = (long)CameraControl_Zoom + VC_CAMERASHIFT + 1; + prop_table[vc_HashIndex("CameraExposure", VC_HASH_SIZE)] = (long)CameraControl_Exposure + VC_CAMERASHIFT + 1; + prop_table[vc_HashIndex("CameraIris", VC_HASH_SIZE)] = (long)CameraControl_Iris + VC_CAMERASHIFT + 1; + prop_table[vc_HashIndex("CameraFocus", VC_HASH_SIZE)] = (long)CameraControl_Focus + VC_CAMERASHIFT + 1; + prop_table[vc_HashIndex("VideoBrightness", VC_HASH_SIZE)] = (long)VideoProcAmp_Brightness + 1; + prop_table[vc_HashIndex("VideoContrast", VC_HASH_SIZE)] = (long)VideoProcAmp_Contrast + 1; + prop_table[vc_HashIndex("VideoHue", VC_HASH_SIZE)] = (long)VideoProcAmp_Hue + 1; + prop_table[vc_HashIndex("VideoSaturation", VC_HASH_SIZE)] = (long)VideoProcAmp_Saturation + 1; + prop_table[vc_HashIndex("VideoSharpness", VC_HASH_SIZE)] = (long)VideoProcAmp_Sharpness + 1; + prop_table[vc_HashIndex("VideoGamma", VC_HASH_SIZE)] = (long)VideoProcAmp_Gamma + 1; + prop_table[vc_HashIndex("VideoColorEnable", VC_HASH_SIZE)] = (long)VideoProcAmp_ColorEnable + 1; + prop_table[vc_HashIndex("VideoWhiteBalance", VC_HASH_SIZE)] = (long)VideoProcAmp_WhiteBalance + 1; + prop_table[vc_HashIndex("VideoBacklightCompensation", VC_HASH_SIZE)] = (long)VideoProcAmp_BacklightCompensation + 1; + prop_table[vc_HashIndex("VideoGain", VC_HASH_SIZE)] = (long)VideoProcAmp_Gain + 1; + prop_table[vc_HashIndex("FlipHorizontal", VC_HASH_SIZE)] = (long)VideoControlFlag_FlipHorizontal + VC_VIDEOSHIFT + 1; + prop_table[vc_HashIndex("FlipVertical", VC_HASH_SIZE)] = (long)VideoControlFlag_FlipVertical + VC_VIDEOSHIFT + 1; + prop_table[vc_HashIndex("AnalogFormat", VC_HASH_SIZE)] = (long)0 + VC_ANALOGSHIFT + 1; + first = 0; + } + long prop = prop_table[vc_HashIndex(attrib, VC_HASH_SIZE)]; + if (!prop) + return 0; + return prop-1; +} + +int imVideoCaptureSetAttribute(imVideoCapture* vc, const char* attrib, float percent) +{ + assert(vc); + assert(vc->device != -1); + + long property = vc_Attrib2Property(attrib); + if (property == -1) return 0; + if (property < VC_CAMERASHIFT) + return vc_SetVideoProcAmpProperty(vc->capture_filter, &vc->video_prop, property, percent); + else if (property < VC_VIDEOSHIFT) + return vc_SetCameraControlProperty(vc->capture_filter, &vc->camera_prop, property-VC_CAMERASHIFT, percent); + else if (property < VC_ANALOGSHIFT) + return vc_SetVideoControlProperty(vc->capture_filter, &vc->videoctrl_prop, property-VC_VIDEOSHIFT, percent); + else + return vc_SetAnalogFormat(vc->capture_filter, percent); +} + +int imVideoCaptureGetAttribute(imVideoCapture* vc, const char* attrib, float *percent) +{ + assert(vc); + assert(vc->device != -1); + + long property = vc_Attrib2Property(attrib); + if (property == -1) return 0; + if (property < VC_CAMERASHIFT) + return vc_GetVideoProcAmpProperty(vc->capture_filter, &vc->video_prop, property, percent); + else if (property < VC_VIDEOSHIFT) + return vc_GetCameraControlProperty(vc->capture_filter, &vc->camera_prop, property-VC_CAMERASHIFT, percent); + else if (property < VC_ANALOGSHIFT) + return vc_GetVideoControlProperty(vc->capture_filter, &vc->videoctrl_prop, property-VC_VIDEOSHIFT, percent); + else + return vc_GetAnalogFormat(vc->capture_filter, percent); +} + +int imVideoCaptureResetAttribute(imVideoCapture* vc, const char* attrib, int fauto) +{ + assert(vc); + assert(vc->device != -1); + + long property = vc_Attrib2Property(attrib); + if (property == -1) return 0; + if (property < VC_CAMERASHIFT) + return vc_ResetVideoProcAmpProperty(vc->capture_filter, &vc->video_prop, property, fauto); + else if (property < VC_VIDEOSHIFT) + return vc_ResetCameraControlProperty(vc->capture_filter, &vc->camera_prop, property-VC_CAMERASHIFT, fauto); + else if (property < VC_ANALOGSHIFT) + return vc_ResetVideoControlProperty(vc->capture_filter, &vc->videoctrl_prop, property-VC_VIDEOSHIFT, fauto); + return 0; +} + +const char** imVideoCaptureGetAttributeList(imVideoCapture* vc, int *num_attrib) +{ +#define VC_VIDEOPROC_MAX 10 +#define VC_CAMERACONTROL_MAX 7 +#define VC_VIDEOCONTROL_MAX 2 +#define VC_VIDEODECODER_MAX 1 +#define VC_NUM_ATTRIB_MAX (VC_VIDEOPROC_MAX+VC_CAMERACONTROL_MAX+VC_VIDEOCONTROL_MAX+VC_VIDEODECODER_MAX) + static char* attrib_list[VC_NUM_ATTRIB_MAX]; + static char* all_attrib_list[VC_NUM_ATTRIB_MAX] = + { //Pre-calculated Hash Index: + "VideoBrightness", // (97) + "VideoContrast", // (80) + "VideoHue", // (98) + "VideoSaturation", // (4) + "VideoSharpness", // (56) + "VideoGamma", // (67) + "VideoColorEnable", // (91) + "VideoWhiteBalance", // (26) + "VideoBacklightCompensation", // (50) + "VideoGain", // (36) + "CameraPanAngle", // (64) + "CameraTiltAngle", // (54) + "CameraRollAngle", // (85) + "CameraLensZoom", // (57) + "CameraExposure", // (84) + "CameraIris", // (20) + "CameraFocus", // (62) + "FlipHorizontal", // (21) + "FlipVertical", // (28) + "AnalogFormat"}; // (89) + + int i; + *num_attrib = 0; + + IAMVideoProcAmp *video_prop; + HRESULT hr = vc->capture_filter->QueryInterface(IID_IAMVideoProcAmp, (void**)&video_prop); + if (SUCCEEDED(hr)) + { + for (i = 0; i < VC_VIDEOPROC_MAX; i++) + attrib_list[i] = all_attrib_list[i]; + *num_attrib = VC_VIDEOPROC_MAX; + video_prop->Release(); + } + + IAMCameraControl *camera_prop; + hr = vc->capture_filter->QueryInterface(IID_IAMCameraControl, (void**)&camera_prop); + if (SUCCEEDED(hr)) + { + for (i = 0; i < VC_CAMERACONTROL_MAX; i++) + attrib_list[i+*num_attrib] = all_attrib_list[i+VC_VIDEOPROC_MAX]; + *num_attrib += VC_CAMERACONTROL_MAX; + camera_prop->Release(); + } + + IAMVideoControl* video_ctrl; + hr = vc->capture_filter->QueryInterface(IID_IAMVideoControl, (void**)&video_ctrl); + if (SUCCEEDED(hr)) + { + for (i = 0; i < VC_VIDEOCONTROL_MAX; i++) + attrib_list[i+*num_attrib] = all_attrib_list[i+VC_VIDEOPROC_MAX+VC_CAMERACONTROL_MAX]; + *num_attrib += VC_VIDEOCONTROL_MAX; + video_ctrl->Release(); + } + + IAMAnalogVideoDecoder* video_decoder = NULL; + hr = vc->capture_filter->QueryInterface(IID_IAMAnalogVideoDecoder, (void**)&video_decoder); + if (SUCCEEDED(hr)) + { + for (i = 0; i < VC_VIDEODECODER_MAX; i++) + attrib_list[i+*num_attrib] = all_attrib_list[i+VC_VIDEOPROC_MAX+VC_CAMERACONTROL_MAX+VC_VIDEOCONTROL_MAX]; + *num_attrib += VC_VIDEODECODER_MAX; + video_decoder->Release(); + } + + return (const char**)attrib_list; +} + +//VIDEOINFOHEADER +// AvgTimePerFrame diff --git a/im/src/im_colorhsi.cpp b/im/src/im_colorhsi.cpp new file mode 100755 index 0000000..953bb2c --- /dev/null +++ b/im/src/im_colorhsi.cpp @@ -0,0 +1,265 @@ +/** \file + * \brief HSI Color Manipulation + * + * See Copyright Notice in im_lib.h + * $Id: im_colorhsi.cpp,v 1.2 2008/11/18 13:15:46 scuri Exp $ + */ + + +#include + +#include "im_colorhsi.h" +#include "im_color.h" + +static const float rad60 = 1.0471975f; +static const float rad120 = 2.0943951f; +static const float rad180 = 3.1415926f; +static const float rad240 = 4.1887902f; +static const float rad300 = 5.2359877f; +static const float rad360 = 6.2831853f; +static const float sqrt3 = 1.7320508f; +static const float rad2deg = 57.2957795131f; + + +static double iColorNormHue(double H) +{ + while (H < 0.0) + H += rad360; + + if (H > rad360) + H = fmod(H, (double)rad360); + + return H; +} + +/**********************************/ +/* HSI MAX S */ +/**********************************/ + +static void iColorSmax01(float h, float hr, float hb, float hg, float *h0, float *h1) +{ + if (h < rad60) + { + *h0 = hb; + *h1 = hr; + } + else if (h < rad120) + { + *h0 = hb; + *h1 = hg; + } + else if (h < rad180) + { + *h0 = hr; + *h1 = hg; + } + else if (h < rad240) + { + *h0 = hr; + *h1 = hb; + } + else if (h < rad300) + { + *h0 = hg; + *h1 = hb; + } + else + { + *h0 = hg; + *h1 = hr; + } +} + +static float iColorHSI_Smax(float h, double cosH, double sinH, float i) +{ + float hr, hb, hg, imax, h0, h1; + + /* i here is normalized between 0-1 */ + + if (i == 0 || i == 1) + return 0.0f; + + /* Making r=0, g=0, b=0, r=1, g=1 or b=1 in the parametric equations and + writting s in function of H and I. */ + + hr = (float)(cosH / 1.5); + hg = (float)((-cosH + sinH*sqrt3)/ 3.0); + hb = (float)((-cosH - sinH*sqrt3)/ 3.0); + + /* at bottom */ + if (i <= 1.0f/3.0f) + { + /* face B=0 */ + if (h < rad120) + return -i/hb; + + /* face R=0 */ + if (h < rad240) + return -i/hr; + + /* face G=0 */ + return -i/hg; + } + + /* at top */ + if (i >= 2.0f/3.0f) + { + /* face R=1 */ + if (h < rad60 || h > rad300) + return (1-i)/hr; + + /* face G=1 */ + if (h < rad180) + return (1-i)/hg; + + /* face B=1 */ + return (1-i)/hb; + } + + /* in the middle */ + + iColorSmax01(h, hr, hb, hg, &h0, &h1); + + if (h == 0 || h == rad120 || h == rad240) + imax = 1.0f/3.0f; + else if (h == rad60 || h == rad180 || h == rad300) + imax = 2.0f/3.0f; + else + imax = h0 / (h0 - h1); + + if (i < imax) + return -i/h0; + else + return (1-i)/h1; +} + +float imColorHSI_ImaxS(float h, double cosH, double sinH) +{ + float i, h0, h1; + float hr, hb, hg; + + if (h == 0 || h == rad120 || h == rad240) + return 1.0f/3.0f; + + if (h == rad60 || h == rad180 || h == rad300) + return 2.0f/3.0f; + + hr = (float)(cosH / 1.5f); + hg = (float)((-cosH + sinH*sqrt3)/ 3.0); + hb = (float)((-cosH - sinH*sqrt3)/ 3.0); + + iColorSmax01(h, hr, hb, hg, &h0, &h1); + + i = h0 / (h0 - h1); + + return i; +} + +/**********************************/ +/* RGB 2 HSI */ +/**********************************/ + +void imColorRGB2HSI(float r, float g, float b, float *h, float *s, float *i) +{ + float v, u; + double H; + + /* Parametric equations */ + v = r - (g + b)/2; + u = (g - b) * (sqrt3/2); + + *i = (r + g + b)/3; /* already normalized to 0-1 */ + *s = (float)sqrt(v*v + u*u); /* s is between 0-1, it is linear in the cube and it is in u,v space. */ + + if (*s == 0) + *h = 360.0f; /* by definition */ + else + { + H = atan2(u, v); + H = iColorNormHue(H); + *h = (float)(H * rad2deg); + + /* must scale S from 0-Smax to 0-1 */ + float Smax = iColorHSI_Smax((float)H, cos(H), sin(H), *i); + if (Smax == 0.0f) + *s = 0.0f; + else + { + if (*s > Smax) /* because of round problems when calculating s and Smax */ + *s = Smax; + *s /= Smax; + } + } +} + +void imColorRGB2HSIbyte(unsigned char r, unsigned char g, unsigned char b, float *h, float *s, float *i) +{ + float fr = imColorReconstruct(r, (imbyte)255); + float fg = imColorReconstruct(g, (imbyte)255); + float fb = imColorReconstruct(b, (imbyte)255); + + imColorRGB2HSI(fr, fg, fb, h, s, i); +} + +/**********************************/ +/* HSI 2 RGB */ +/**********************************/ + +void imColorHSI2RGB(float h, float s, float i, float *r, float *g, float *b) +{ + double cosH, sinH, H, v, u; + + if (i < 0) i = 0; + else if (i > 1) i = 1; + + if (s < 0) s = 0; + else if (s > 1) s = 1; + + if (s == 0.0f || i == 1.0f || i == 0.0f || (int)h == 360) + { + *r = i; + *g = i; + *b = i; + return; + } + + H = h/rad2deg; + H = iColorNormHue(H); + + cosH = cos(H); + sinH = sin(H); + + /* must scale S from 0-1 to 0-Smax */ + float Smax = iColorHSI_Smax((float)H, cosH, sinH, i); + s *= Smax; + if (s > 1.0f) /* because of round problems when calculating s and Smax */ + s = 1.0f; + + v = s * cosH; + u = s * sinH; + + /* Inverse of the Parametric equations, using i normalized to 0-1 */ + *r = (float)(i + v/1.5); + *g = (float)(i - (v - u*sqrt3)/3.0); + *b = (float)(i - (v + u*sqrt3)/3.0); + + /* fix round errors */ + if (*r < 0) *r = 0; + if (*g < 0) *g = 0; + if (*b < 0) *b = 0; + + if (*r > 1) *r = 1.0f; + if (*g > 1) *g = 1.0f; + if (*b > 1) *b = 1.0f; +} + +void imColorHSI2RGBbyte(float h, float s, float i, unsigned char *r, unsigned char *g, unsigned char *b) +{ + float fr, fg, fb; + + imColorHSI2RGB(h, s, i, &fr, &fg, &fb); + + *r = imColorQuantize(fr, (imbyte)255); + *g = imColorQuantize(fg, (imbyte)255); + *b = imColorQuantize(fb, (imbyte)255); +} diff --git a/im/src/im_colormode.cpp b/im/src/im_colormode.cpp new file mode 100755 index 0000000..2a99183 --- /dev/null +++ b/im/src/im_colormode.cpp @@ -0,0 +1,87 @@ +/** \file + * \brief Color Mode Utilities + * + * See Copyright Notice in im_lib.h + * $Id: im_colormode.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + + +#include +#include +#include + +#include "im.h" +#include "im_util.h" + +const char* imColorModeSpaceName(int color_mode) +{ + int color_space = imColorModeSpace(color_mode); + switch (color_space) + { + case IM_RGB: return "RGB"; + case IM_MAP: return "Map"; + case IM_GRAY: return "Gray"; + case IM_BINARY: return "Binary"; + case IM_CMYK: return "CMYK"; + case IM_YCBCR: return "Y'CbCr"; + case IM_LAB: return "CIE L*a*b*"; + case IM_LUV: return "CIE L*u*v*"; + case IM_XYZ: return "CIE XYZ"; + } + + return NULL; +} + +int imColorModeDepth(int color_mode) +{ + int depth = 0; + + int color_space = imColorModeSpace(color_mode); + switch (color_space) + { + case IM_GRAY: + case IM_BINARY: + case IM_MAP: + depth = 1; + break; + case IM_CMYK: + depth = 4; + break; + default: + depth = 3; + break; + } + + if (imColorModeHasAlpha(color_mode)) + depth++; + + return depth; +} + +int imColorModeToBitmap(int color_mode) +{ + int color_space = imColorModeSpace(color_mode); + switch (color_space) + { + case IM_BINARY: + case IM_GRAY: + case IM_MAP: + return color_space; + default: + return IM_RGB; + } +} + +int imColorModeIsBitmap(int color_mode, int data_type) +{ + if (imColorModeSpace(color_mode) == IM_BINARY || + imColorModeSpace(color_mode) == IM_MAP) + return 1; + + if ((imColorModeSpace(color_mode) == IM_RGB || + imColorModeSpace(color_mode) == IM_GRAY) && + (data_type == IM_BYTE)) + return 1; + + return 0; +} diff --git a/im/src/im_colorutil.cpp b/im/src/im_colorutil.cpp new file mode 100755 index 0000000..9e96c65 --- /dev/null +++ b/im/src/im_colorutil.cpp @@ -0,0 +1,27 @@ +/** \file + * \brief Color Utilities + * + * See Copyright Notice in im_lib.h + * $Id: im_colorutil.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + + +#include +#include +#include + +#include "im.h" +#include "im_util.h" + +long imColorEncode(unsigned char Red, unsigned char Green, unsigned char Blue) +{ + return (((long)Red) << 16) | (((long)Green) << 8) | ((long)Blue); +} + +void imColorDecode(unsigned char* Red, unsigned char* Green, unsigned char* Blue, long Color) +{ + if (Red) *Red = (imbyte)(Color >> 16); + if (Green) *Green = (imbyte)(Color >> 8); + if (Blue) *Blue = (imbyte)Color; +} + diff --git a/im/src/im_convertbitmap.cpp b/im/src/im_convertbitmap.cpp new file mode 100755 index 0000000..a4f6b70 --- /dev/null +++ b/im/src/im_convertbitmap.cpp @@ -0,0 +1,284 @@ +/** \file + * \brief Image Conversion + * + * See Copyright Notice in im_lib.h + * $Id: im_convertbitmap.cpp,v 1.3 2009/08/18 02:23:33 scuri Exp $ + */ + +#include "im.h" +#include "im_util.h" +#include "im_complex.h" +#include "im_image.h" +#include "im_convert.h" +#include "im_counter.h" + +#include +#include +#include + +int imConvertToBitmap(const imImage* src_image, imImage* dst_image, int cpx2real, float gamma, int abssolute, int cast_mode) +{ + assert(src_image); + assert(dst_image); + + if (!imImageMatchSize(src_image, dst_image) || !imImageIsBitmap(dst_image)) + return IM_ERR_DATA; + + int counter = imCounterBegin("Building Bitmap"); + + int ret; + if (src_image->data_type == IM_BYTE) + { + // NO data type conversion, only color mode conversion + ret = imConvertColorSpace(src_image, dst_image); + } + else + { + if (src_image->color_space == IM_RGB || + src_image->color_space == IM_GRAY) + { + // data type conversion, but NO color mode conversion + ret = imConvertDataType(src_image, dst_image, cpx2real, gamma, abssolute, cast_mode); + } + else + { + // data type conversion AND color mode conversion + imImage* temp_image = imImageCreate(src_image->width, src_image->height, dst_image->color_space, src_image->data_type); + if (!temp_image) + ret = IM_ERR_MEM; + else + { + // first convert color_mode in the bigger precision + ret = imConvertColorSpace(src_image, temp_image); + if (ret == IM_ERR_NONE) + { + // second just convert data type + ret = imConvertDataType(temp_image, dst_image, cpx2real, gamma, abssolute, cast_mode); + } + imImageDestroy(temp_image); + } + } + } + + imCounterEnd(counter); + return ret; +} + + +template +void iDoChangePacking(const T* src_data, T* dst_data, int width, int height, int depth, + int src_is_packed) +{ + int count = width*height; + if (src_is_packed) + { + for (int i = 0; i < count; i++) + { + for (int d = 0; d < depth; d++) + { + *(dst_data + d*count) = *src_data++; + } + + dst_data++; + } + } + else + { + for (int i = 0; i < count; i++) + { + for (int d = 0; d < depth; d++) + { + *dst_data++ = *(src_data + d*count); + } + + src_data++; + } + } +} + +void imConvertPacking(const void* src_data, void* dst_data, int width, int height, int depth, + int data_type, int src_is_packed) +{ + switch(data_type) + { + case IM_BYTE: + iDoChangePacking((const imbyte*)src_data, (imbyte*)dst_data, width, height, depth, src_is_packed); + break; + case IM_USHORT: + iDoChangePacking((const imushort*)src_data, (imushort*)dst_data, width, height, depth, src_is_packed); + break; + case IM_INT: + iDoChangePacking((const int*)src_data, (int*)dst_data, width, height, depth, src_is_packed); + break; + case IM_FLOAT: + iDoChangePacking((const float*)src_data, (float*)dst_data, width, height, depth, src_is_packed); + break; + case IM_CFLOAT: + iDoChangePacking((const imcfloat*)src_data, (imcfloat*)dst_data, width, height, depth, src_is_packed); + break; + } +} + +static void iImageMakeGray(imbyte *map, int count, int step) +{ + for(int i = 0; i < count; i++) + { + if (*map) + *map = 255; + map += step; + } +} + +static void iImageGLCopyMapAlpha(imbyte *map, imbyte *gldata, int depth, int count) +{ + /* gldata can be GL_RGBA or GL_LUMINANCE_ALPHA */ + gldata += depth-1; /* position at first alpha */ + for(int i = 0; i < count; i++) + { + *gldata = *map; + map++; + gldata += depth; /* skip to next alpha */ + } +} + +static void iImageGLSetTranspColor(imbyte *gldata, int count, imbyte r, imbyte g, imbyte b) +{ + /* gldata is GL_RGBA */ + for(int i = 0; i < count; i++) + { + if (*(gldata+0) == r && + *(gldata+1) == g && + *(gldata+2) == b) + *(gldata+3) = 0; /* transparent */ + else + *(gldata+3) = 255; /* opaque */ + gldata += 4; + } +} + +static void iImageGLSetTranspMap(imbyte *map, imbyte *gldata, int count, imbyte *transp_map, int transp_count) +{ + /* gldata is GL_RGBA */ + gldata += 3; /* position at first alpha */ + for(int i = 0; i < count; i++) + { + if (*map < transp_count) + *gldata = transp_map[*map]; + else + *gldata = 255; /* opaque */ + + map++; + gldata += 4; + } +} + +static void iImageGLSetTranspIndex(imbyte *map, imbyte *gldata, int depth, int count, imbyte index) +{ + /* gldata can be GL_RGBA or GL_LUMINANCE_ALPHA */ + gldata += depth-1; /* position at first alpha */ + for(int i = 0; i < count; i++) + { + if (*map == index) + *gldata = 0; /* full transparent */ + else + *gldata = 255; /* opaque */ + + map++; + gldata += depth; /* skip to next alpha */ + } +} + +/* To avoid including gl.h */ +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A + +void* imImageGetOpenGLData(const imImage* image, int *format) +{ + if (!imImageIsBitmap(image)) + return NULL; + + int transp_count; + imbyte* transp_index = (imbyte*)imImageGetAttribute(image, "TransparencyIndex", NULL, NULL); + imbyte* transp_map = (imbyte*)imImageGetAttribute(image, "TransparencyMap", NULL, &transp_count); + imbyte* transp_color = (imbyte*)imImageGetAttribute(image, "TransparencyColor", NULL, NULL); + + int glformat; + switch(image->color_space) + { + case IM_MAP: + if (image->has_alpha || transp_map || transp_index) + glformat = GL_RGBA; + else + glformat = GL_RGB; + break; + case IM_RGB: + if (image->has_alpha || transp_color) + glformat = GL_RGBA; + else + glformat = GL_RGB; + break; + case IM_BINARY: + default: /* IM_GRAY */ + if (image->has_alpha || transp_index) + glformat = GL_LUMINANCE_ALPHA; + else + glformat = GL_LUMINANCE; + break; + } + + int depth; + switch (glformat) + { + case GL_RGB: + depth = 3; + break; + case GL_RGBA: + depth = 4; + break; + case GL_LUMINANCE_ALPHA: + depth = 2; + break; + default: /* GL_LUMINANCE */ + depth = 1; + break; + } + + int size = image->count*depth; + imImageSetAttribute(image, "GLDATA", IM_BYTE, size, NULL); + imbyte* gldata = (imbyte*)imImageGetAttribute(image, "GLDATA", NULL, NULL); + + if (image->color_space == IM_RGB) + { + if (image->has_alpha) + imConvertPacking(image->data[0], gldata, image->width, image->height, 4, IM_BYTE, 0); + else + { + imConvertPacking(image->data[0], gldata, image->width, image->height, 3, IM_BYTE, 0); + + if (transp_color) + iImageGLSetTranspColor(gldata, image->count, *(transp_color+0), *(transp_color+1), *(transp_color+2)); + } + } + else + { + memcpy(gldata, image->data[0], image->size); + + if (image->color_space == IM_MAP) + imConvertMapToRGB(gldata, image->count, depth, 1, image->palette, image->palette_count); + else if (image->color_space == IM_BINARY) + iImageMakeGray(gldata, image->count, (glformat==GL_LUMINANCE_ALPHA)? 2: 1); + + if (image->has_alpha) + iImageGLCopyMapAlpha((imbyte*)image->data[1], gldata, depth, image->count); + else if (transp_map) + iImageGLSetTranspMap((imbyte*)image->data[0], gldata, image->count, transp_map, transp_count); + else if (transp_index) + iImageGLSetTranspIndex((imbyte*)image->data[0], gldata, depth, image->count, *transp_index); + } + + if (format) *format = glformat; + return gldata; +} + diff --git a/im/src/im_convertcolor.cpp b/im/src/im_convertcolor.cpp new file mode 100755 index 0000000..e68730f --- /dev/null +++ b/im/src/im_convertcolor.cpp @@ -0,0 +1,985 @@ +/** \file + * \brief Image Conversion + * + * See Copyright Notice in im_lib.h + * $Id: im_convertcolor.cpp,v 1.3 2009/08/18 05:13:18 scuri Exp $ + */ + +#include "im.h" +#include "im_util.h" +#include "im_complex.h" +#include "im_image.h" +#include "im_convert.h" +#include "im_color.h" +#include "im_counter.h" + +#include +#include +#include + +void imConvertMapToRGB(unsigned char* data, int count, int depth, int packed, long* palette, int palette_count) +{ + int c, i, delta; + unsigned char r[256], g[256], b[256]; + unsigned char *r_data, *g_data, *b_data; + + unsigned char* src_data = data + count-1; + if (packed) + { + r_data = data + depth*(count-1); + g_data = r_data + 1; + b_data = r_data + 2; + delta = depth; + } + else + { + r_data = data + count - 1; + g_data = data + 2*count - 1; + b_data = data + 3*count - 1; + delta = 1; + } + + for (c = 0; c < palette_count; c++) + imColorDecode(&r[c], &g[c], &b[c], palette[c]); + + for (i = 0; i < count; i++) + { + int index = *src_data; + *r_data = r[index]; + *g_data = g[index]; + *b_data = b[index]; + + r_data -= delta; + g_data -= delta; + b_data -= delta; + src_data--; + } +} + +static void iConvertSetTranspMap(imbyte *src_map, imbyte *dst_alpha, int count, imbyte *transp_map, int transp_count) +{ + for(int i = 0; i < count; i++) + { + if (*src_map < transp_count) + *dst_alpha = transp_map[*src_map]; + else + *dst_alpha = 255; /* opaque */ + + src_map++; + dst_alpha++; + } +} + +static void iConvertSetTranspIndex(imbyte *src_map, imbyte *dst_alpha, int count, imbyte index) +{ + for(int i = 0; i < count; i++) + { + if (*src_map == index) + *dst_alpha = 0; /* full transparent */ + else + *dst_alpha = 255; /* opaque */ + + src_map++; + dst_alpha++; + } +} + +static void iConvertSetTranspColor(imbyte **dst_data, int count, imbyte r, imbyte g, imbyte b) +{ + imbyte *pr = dst_data[0]; + imbyte *pg = dst_data[1]; + imbyte *pb = dst_data[2]; + imbyte *pa = dst_data[3]; + + for(int i = 0; i < count; i++) + { + if (*pr == r && + *pg == g && + *pb == b) + *pa = 0; /* transparent */ + else + *pa = 255; /* opaque */ + + pr++; + pg++; + pb++; + pa++; + } +} + +// convert bin2gray and gray2bin +inline void iConvertBinary(imbyte* map, int count, imbyte value) +{ + imbyte thres = (value == 255)? 1: 128; + + // if gray2bin, check for invalid gray that already is binary + if (value != 255) + { + imbyte vmax = 0, *pmap = map; + for (int i = 0; i < count; i++) + { + if (*pmap > vmax) + vmax = *pmap; + + pmap++; + } + + if (vmax == 1) + thres = 1; + else + thres = vmax / 2; + } + + for (int i = 0; i < count; i++) + { + if (*map >= thres) + *map = value; + else + *map = 0; + + map++; + } +} + +static void iConvertMap2Gray(const imbyte* src_map, imbyte* dst_map, int count, const long* palette, const int palette_count) +{ + imbyte r, g, b; + imbyte remap[256]; + + for (int c = 0; c < palette_count; c++) + { + imColorDecode(&r, &g, &b, palette[c]); + remap[c] = imColorRGB2Luma(r, g, b); + } + + for (int i = 0; i < count; i++) + { + *dst_map++ = remap[*src_map++]; + } +} + +static void iConvertMapToRGB(const imbyte* src_map, imbyte* red, imbyte* green, imbyte* blue, int count, const long* palette, const int palette_count) +{ + imbyte r[256], g[256], b[256]; + for (int c = 0; c < palette_count; c++) + imColorDecode(&r[c], &g[c], &b[c], palette[c]); + + for (int i = 0; i < count; i++) + { + int index = *src_map++; + *red++ = r[index]; + *green++ = g[index]; + *blue++ = b[index]; + } +} + +template +int iDoConvert2Gray(int count, int data_type, + const T** src_data, int src_color_space, T** dst_data, int counter) +{ + int i; + T max; + + const T* src_map0 = src_data[0]; + const T* src_map1 = src_data[1]; + const T* src_map2 = src_data[2]; + const T* src_map3 = (src_color_space == IM_CMYK)? src_data[3]: 0; + T* dst_map = dst_data[0]; + + imCounterTotal(counter, count, "Converting To Gray..."); + + switch(src_color_space) + { + case IM_XYZ: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // scale to 0-1 + float c1 = imColorReconstruct(*src_map1++, max); // use only Y component + + // do gamma correction then scale back to 0-max + *dst_map++ = imColorQuantize(imColorTransfer2Nonlinear(c1), max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_CMYK: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + T r, g, b; + // result is still 0-max + imColorCMYK2RGB(*src_map0++, *src_map1++, *src_map2++, *src_map3++, r, g, b, max); + *dst_map++ = imColorRGB2Luma(r, g, b); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_RGB: + for (i = 0; i < count; i++) + { + *dst_map++ = imColorRGB2Luma(*src_map0++, *src_map1++, *src_map2++); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_LUV: + case IM_LAB: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + + float c0 = imColorReconstruct(*src_map0++, max); // scale to 0-1 + c0 = imColorLightness2Luminance(c0); // do the convertion + + // do gamma correction then scale back to 0-max + *dst_map++ = imColorQuantize(imColorTransfer2Nonlinear(c0), max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + default: + return IM_ERR_DATA; + } + + return IM_ERR_NONE; +} + +template +int iDoConvert2RGB(int count, int data_type, + const T** src_data, int src_color_space, T** dst_data, int counter) +{ + int i; + T max, zero; + + const T* src_map0 = src_data[0]; + const T* src_map1 = src_data[1]; + const T* src_map2 = src_data[2]; + const T* src_map3 = (src_color_space == IM_CMYK)? src_data[3]: 0; + T* dst_map0 = dst_data[0]; + T* dst_map1 = dst_data[1]; + T* dst_map2 = dst_data[2]; + + imCounterTotal(counter, count, "Converting To RGB..."); + + switch(src_color_space) + { + case IM_XYZ: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + + // scale to 0-1 + float c0 = imColorReconstruct(*src_map0++, max); + float c1 = imColorReconstruct(*src_map1++, max); + float c2 = imColorReconstruct(*src_map2++, max); + + // result is still 0-1 + imColorXYZ2RGB(c0, c1, c2, + c0, c1, c2, 1.0f); + + // do gamma correction then scale back to 0-max + *dst_map0++ = imColorQuantize(imColorTransfer2Nonlinear(c0), max); + *dst_map1++ = imColorQuantize(imColorTransfer2Nonlinear(c1), max); + *dst_map2++ = imColorQuantize(imColorTransfer2Nonlinear(c2), max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_YCBCR: + max = (T)imColorMax(data_type); + zero = (T)imColorZero(data_type); + for (i = 0; i < count; i++) + { + imColorYCbCr2RGB(*src_map0++, *src_map1++, *src_map2++, + *dst_map0++, *dst_map1++, *dst_map2++, zero, max); + } + break; + case IM_CMYK: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // result is still 0-max + imColorCMYK2RGB(*src_map0++, *src_map1++, *src_map2++, *src_map3++, + *dst_map0++, *dst_map1++, *dst_map2++, max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_LUV: + case IM_LAB: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + + // scale to 0-1 and -0.5/+0.5 + float c0 = imColorReconstruct(*src_map0++, max); + float c1 = imColorReconstruct(*src_map1++, max) - 0.5f; + float c2 = imColorReconstruct(*src_map2++, max) - 0.5f; + + if (src_color_space == IM_LUV) + imColorLuv2XYZ(c0, c1, c2, // conversion in-place + c0, c1, c2); + else + imColorLab2XYZ(c0, c1, c2, // conversion in-place + c0, c1, c2); + + imColorXYZ2RGB(c0, c1, c2, // conversion in-place + c0, c1, c2, 1.0f); + + // do gamma correction then scale back to 0-max + *dst_map0++ = imColorQuantize(imColorTransfer2Nonlinear(c0), max); + *dst_map1++ = imColorQuantize(imColorTransfer2Nonlinear(c1), max); + *dst_map2++ = imColorQuantize(imColorTransfer2Nonlinear(c2), max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + default: + return IM_ERR_DATA; + } + + return IM_ERR_NONE; +} + +template +int iDoConvert2YCbCr(int count, int data_type, + const T** src_data, int src_color_space, T** dst_data, int counter) +{ + int i; + T zero; + + const T* src_map0 = src_data[0]; + const T* src_map1 = src_data[1]; + const T* src_map2 = src_data[2]; + T* dst_map0 = dst_data[0]; + T* dst_map1 = dst_data[1]; + T* dst_map2 = dst_data[2]; + + imCounterTotal(counter, count, "Converting To YCbCr..."); + + switch(src_color_space) + { + case IM_RGB: + zero = (T)imColorZero(data_type); + for (i = 0; i < count; i++) + { + imColorRGB2YCbCr(*src_map0++, *src_map1++, *src_map2++, + *dst_map0++, *dst_map1++, *dst_map2++, zero); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + default: + return IM_ERR_DATA; + } + + return IM_ERR_NONE; +} + +template +int iDoConvert2XYZ(int count, int data_type, + const T** src_data, int src_color_space, T** dst_data, int counter) +{ + int i; + T max; + + const T* src_map0 = src_data[0]; + const T* src_map1 = (src_color_space == IM_GRAY)? 0: src_data[1]; + const T* src_map2 = (src_color_space == IM_GRAY)? 0: src_data[2]; + T* dst_map0 = dst_data[0]; + T* dst_map1 = dst_data[1]; + T* dst_map2 = dst_data[2]; + + imCounterTotal(counter, count, "Converting To XYZ..."); + + switch(src_color_space) + { + case IM_GRAY: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // scale to 0-1 + float c0 = imColorReconstruct(*src_map0++, max); + + // do gamma correction + c0 = imColorTransfer2Linear(c0); + + // then scale back to 0-max + *dst_map0++ = imColorQuantize(c0*0.9505f, max); // Compensate D65 white point + *dst_map1++ = imColorQuantize(c0, max); + *dst_map2++ = imColorQuantize(c0*1.0890f, max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_RGB: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + + // scale to 0-1 + float c0 = imColorReconstruct(*src_map0++, max); + float c1 = imColorReconstruct(*src_map1++, max); + float c2 = imColorReconstruct(*src_map2++, max); + + // do gamma correction + c0 = imColorTransfer2Linear(c0); + c1 = imColorTransfer2Linear(c1); + c2 = imColorTransfer2Linear(c2); + + // result is still 0-1 + imColorRGB2XYZ(c0, c1, c2, + c0, c1, c2); + + // then scale back to 0-max + *dst_map0++ = imColorQuantize(c0, max); + *dst_map1++ = imColorQuantize(c1, max); + *dst_map2++ = imColorQuantize(c2, max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_LUV: + case IM_LAB: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + // scale to 0-1 and -0.5/+0.5 + float c0 = imColorReconstruct(*src_map0++, max); + float c1 = imColorReconstruct(*src_map1++, max) - 0.5f; + float c2 = imColorReconstruct(*src_map2++, max) - 0.5f; + + if (src_color_space == IM_LUV) + imColorLuv2XYZ(c0, c1, c2, // convertion in-place + c0, c1, c2); + else + imColorLab2XYZ(c0, c1, c2, // convertion in-place + c0, c1, c2); + + // scale back to 0-max + *dst_map0++ = imColorQuantize(c0, max); + *dst_map1++ = imColorQuantize(c1, max); + *dst_map2++ = imColorQuantize(c2, max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + default: + return IM_ERR_DATA; + } + + return IM_ERR_NONE; +} + +template +int iDoConvert2Lab(int count, int data_type, + const T** src_data, int src_color_space, T** dst_data, int counter) +{ + int i; + T max; + + const T* src_map0 = src_data[0]; + const T* src_map1 = (src_color_space == IM_GRAY)? 0: src_data[1]; + const T* src_map2 = (src_color_space == IM_GRAY)? 0: src_data[2]; + T* dst_map0 = dst_data[0]; + T* dst_map1 = dst_data[1]; + T* dst_map2 = dst_data[2]; + + imCounterTotal(counter, count, "Converting To Lab..."); + + switch(src_color_space) + { + case IM_GRAY: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // scale to 0-1 + float c0 = imColorReconstruct(*src_map0++, max); + + // do gamma correction + c0 = imColorTransfer2Linear(c0); + + // do conversion + c0 = imColorLuminance2Lightness(c0); + + // then scale back to 0-max + *dst_map0++ = imColorQuantize(c0, max); // update only the L component + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_RGB: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + + // scale to 0-1 + float c0 = imColorReconstruct(*src_map0++, max); + float c1 = imColorReconstruct(*src_map1++, max); + float c2 = imColorReconstruct(*src_map2++, max); + + // do gamma correction + c0 = imColorTransfer2Linear(c0); + c1 = imColorTransfer2Linear(c1); + c2 = imColorTransfer2Linear(c2); + + imColorRGB2XYZ(c0, c1, c2, // convertion in-place + c0, c1, c2); + + imColorXYZ2Lab(c0, c1, c2, // convertion in-place + c0, c1, c2); + + // then scale back to 0-max + *dst_map0++ = imColorQuantize(c0, max); + *dst_map1++ = imColorQuantize(c1 + 0.5f, max); + *dst_map2++ = imColorQuantize(c2 + 0.5f, max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_XYZ: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + // scale to 0-1 and -0.5/+0.5 + float c0 = imColorReconstruct(*src_map0++, max); + float c1 = imColorReconstruct(*src_map1++, max); + float c2 = imColorReconstruct(*src_map2++, max); + + imColorXYZ2Lab(c0, c1, c2, // convertion in-place + c0, c1, c2); + + // scale back to 0-max + *dst_map0++ = imColorQuantize(c0, max); + *dst_map1++ = imColorQuantize(c1 + 0.5f, max); + *dst_map2++ = imColorQuantize(c2 + 0.5f, max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_LUV: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + // scale to 0-1 and -0.5/+0.5 + float c0 = imColorReconstruct(*src_map0++, max); + float c1 = imColorReconstruct(*src_map1++, max) - 0.5f; + float c2 = imColorReconstruct(*src_map2++, max) - 0.5f; + + imColorLuv2XYZ(c0, c1, c2, // convertion in-place + c0, c1, c2); + imColorXYZ2Lab(c0, c1, c2, // convertion in-place + c0, c1, c2); + + // scale back to 0-max + *dst_map0++ = imColorQuantize(c0, max); + *dst_map1++ = imColorQuantize(c1 + 0.5f, max); + *dst_map2++ = imColorQuantize(c2 + 0.5f, max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + default: + return IM_ERR_DATA; + } + + return IM_ERR_NONE; +} + +template +int iDoConvert2Luv(int count, int data_type, + const T** src_data, int src_color_space, T** dst_data, int counter) +{ + int i; + T max; + + const T* src_map0 = src_data[0]; + const T* src_map1 = (src_color_space == IM_GRAY)? 0: src_data[1]; + const T* src_map2 = (src_color_space == IM_GRAY)? 0: src_data[2]; + T* dst_map0 = dst_data[0]; + T* dst_map1 = dst_data[1]; + T* dst_map2 = dst_data[2]; + + imCounterTotal(counter, count, "Converting To Luv..."); + + switch(src_color_space) + { + case IM_GRAY: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // scale to 0-1 + float c0 = imColorReconstruct(*src_map0++, max); + + // do gamma correction + c0 = imColorTransfer2Linear(c0); + + // do conversion + c0 = imColorLuminance2Lightness(c0); + + // then scale back to 0-max + *dst_map0++ = imColorQuantize(c0, max); // update only the L component + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_RGB: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + + // scale to 0-1 + float c0 = imColorReconstruct(*src_map0++, max); + float c1 = imColorReconstruct(*src_map1++, max); + float c2 = imColorReconstruct(*src_map2++, max); + + // do gamma correction + c0 = imColorTransfer2Linear(c0); + c1 = imColorTransfer2Linear(c1); + c2 = imColorTransfer2Linear(c2); + + imColorRGB2XYZ(c0, c1, c2, // convertion in-place + c0, c1, c2); + + imColorXYZ2Luv(c0, c1, c2, // convertion in-place + c0, c1, c2); + + // then scale back to 0-max + *dst_map0++ = imColorQuantize(c0, max); + *dst_map1++ = imColorQuantize(c1 + 0.5f, max); + *dst_map2++ = imColorQuantize(c2 + 0.5f, max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_XYZ: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + // scale to 0-1 and -0.5/+0.5 + float c0 = imColorReconstruct(*src_map0++, max); + float c1 = imColorReconstruct(*src_map1++, max); + float c2 = imColorReconstruct(*src_map2++, max); + + imColorXYZ2Luv(c0, c1, c2, // convertion in-place + c0, c1, c2); + + // scale back to 0-max + *dst_map0++ = imColorQuantize(c0, max); + *dst_map1++ = imColorQuantize(c1 + 0.5f, max); + *dst_map2++ = imColorQuantize(c2 + 0.5f, max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + case IM_LAB: + max = (T)imColorMax(data_type); + for (i = 0; i < count; i++) + { + // to increase precision do intermediate conversions in float + // scale to 0-1 and -0.5/+0.5 + float c0 = imColorReconstruct(*src_map0++, max); + float c1 = imColorReconstruct(*src_map1++, max) - 0.5f; + float c2 = imColorReconstruct(*src_map2++, max) - 0.5f; + + imColorLab2XYZ(c0, c1, c2, // convertion in-place + c0, c1, c2); + imColorXYZ2Luv(c0, c1, c2, // convertion in-place + c0, c1, c2); + + // scale back to 0-max + *dst_map0++ = imColorQuantize(c0, max); + *dst_map1++ = imColorQuantize(c1 + 0.5f, max); + *dst_map2++ = imColorQuantize(c2 + 0.5f, max); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + break; + default: + return IM_ERR_DATA; + } + + return IM_ERR_NONE; +} + +template +int iDoConvertColorSpace(int count, int data_type, + const T** src_data, int src_color_space, + T** dst_data, int dst_color_space) +{ + int ret = IM_ERR_DATA, + convert2rgb = 0; + + if ((dst_color_space == IM_XYZ || + dst_color_space == IM_LAB || + dst_color_space == IM_LUV) && + (src_color_space == IM_CMYK || + src_color_space == IM_YCBCR)) + { + convert2rgb = 1; + } + + if (dst_color_space == IM_YCBCR && src_color_space != IM_RGB) + convert2rgb = 1; + + int counter = imCounterBegin("Convert Color Space"); + + if (convert2rgb) + { + ret = iDoConvert2RGB(count, data_type, src_data, src_color_space, dst_data, counter); + + if (ret != IM_ERR_NONE) + { + imCounterEnd(counter); + return ret; + } + + src_data = (const T**)dst_data; + src_color_space = IM_RGB; + } + + switch(dst_color_space) + { + case IM_GRAY: + ret = iDoConvert2Gray(count, data_type, src_data, src_color_space, dst_data, counter); + break; + case IM_RGB: + ret = iDoConvert2RGB(count, data_type, src_data, src_color_space, dst_data, counter); + break; + case IM_YCBCR: + ret = iDoConvert2YCbCr(count, data_type, src_data, src_color_space, dst_data, counter); + break; + case IM_XYZ: + ret = iDoConvert2XYZ(count, data_type, src_data, src_color_space, dst_data, counter); + break; + case IM_LAB: + ret = iDoConvert2Lab(count, data_type, src_data, src_color_space, dst_data, counter); + break; + case IM_LUV: + ret = iDoConvert2Luv(count, data_type, src_data, src_color_space, dst_data, counter); + break; + default: + ret = IM_ERR_DATA; + break; + } + + imCounterEnd(counter); + + return ret; +} + +static int iConvertColorSpace(const imImage* src_image, imImage* dst_image) +{ + switch(src_image->data_type) + { + case IM_BYTE: + return iDoConvertColorSpace(src_image->count, src_image->data_type, + (const imbyte**)src_image->data, src_image->color_space, + (imbyte**)dst_image->data, dst_image->color_space); + case IM_USHORT: + return iDoConvertColorSpace(src_image->count, src_image->data_type, + (const imushort**)src_image->data, src_image->color_space, + (imushort**)dst_image->data, dst_image->color_space); + case IM_INT: + return iDoConvertColorSpace(src_image->count, src_image->data_type, + (const int**)src_image->data, src_image->color_space, + (int**)dst_image->data, dst_image->color_space); + case IM_FLOAT: + return iDoConvertColorSpace(src_image->count, src_image->data_type, + (const float**)src_image->data, src_image->color_space, + (float**)dst_image->data, dst_image->color_space); + case IM_CFLOAT: + /* treat complex as two real values */ + return iDoConvertColorSpace(2*src_image->count, src_image->data_type, + (const float**)src_image->data, src_image->color_space, + (float**)dst_image->data, dst_image->color_space); + } + + return IM_ERR_DATA; +} + +int imConvertColorSpace(const imImage* src_image, imImage* dst_image) +{ + int ret = IM_ERR_NONE; + assert(src_image); + assert(dst_image); + + if (!imImageMatchDataType(src_image, dst_image)) + return IM_ERR_DATA; + + if (src_image->color_space != dst_image->color_space) + { + switch(dst_image->color_space) + { + case IM_RGB: + switch(src_image->color_space) + { + case IM_BINARY: + memcpy(dst_image->data[0], src_image->data[0], dst_image->plane_size); + iConvertBinary((imbyte*)dst_image->data[0], dst_image->count, 255); + memcpy(dst_image->data[1], dst_image->data[0], dst_image->plane_size); + memcpy(dst_image->data[2], dst_image->data[0], dst_image->plane_size); + ret = IM_ERR_NONE; + break; + case IM_MAP: + iConvertMapToRGB((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], (imbyte*)dst_image->data[1], (imbyte*)dst_image->data[2], dst_image->count, src_image->palette, src_image->palette_count); + ret = IM_ERR_NONE; + break; + case IM_GRAY: + memcpy(dst_image->data[0], src_image->data[0], dst_image->plane_size); + memcpy(dst_image->data[1], src_image->data[0], dst_image->plane_size); + memcpy(dst_image->data[2], src_image->data[0], dst_image->plane_size); + ret = IM_ERR_NONE; + break; + default: + ret = iConvertColorSpace(src_image, dst_image); + break; + } + break; + case IM_GRAY: + switch(src_image->color_space) + { + case IM_BINARY: + memcpy(dst_image->data[0], src_image->data[0], dst_image->size); + iConvertBinary((imbyte*)dst_image->data[0], dst_image->count, 255); + ret = IM_ERR_NONE; + break; + case IM_MAP: + iConvertMap2Gray((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], dst_image->count, src_image->palette, src_image->palette_count); + ret = IM_ERR_NONE; + break; + case IM_YCBCR: + memcpy(dst_image->data[0], src_image->data[0], dst_image->plane_size); + ret = IM_ERR_NONE; + break; + default: + ret = iConvertColorSpace(src_image, dst_image); + break; + } + break; + case IM_MAP: + switch(src_image->color_space) + { + case IM_BINARY: // no break, same procedure as gray + case IM_GRAY: + memcpy(dst_image->data[0], src_image->data[0], dst_image->size); + dst_image->palette_count = src_image->palette_count; + memcpy(dst_image->palette, src_image->palette, dst_image->palette_count*sizeof(long)); + ret = IM_ERR_NONE; + break; + case IM_RGB: + dst_image->palette_count = 256; + ret = imConvertRGB2Map(src_image->width, src_image->height, + (imbyte*)src_image->data[0], (imbyte*)src_image->data[1], (imbyte*)src_image->data[2], + (imbyte*)dst_image->data[0], dst_image->palette, &dst_image->palette_count); + break; + default: + ret = IM_ERR_DATA; + break; + } + break; + case IM_BINARY: + switch(src_image->color_space) + { + case IM_GRAY: + memcpy(dst_image->data[0], src_image->data[0], dst_image->size); + iConvertBinary((imbyte*)dst_image->data[0], dst_image->count, 1); + ret = IM_ERR_NONE; + break; + case IM_MAP: // convert to gray, then convert to binary + iConvertMap2Gray((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], dst_image->count, src_image->palette, src_image->palette_count); + iConvertBinary((imbyte*)dst_image->data[0], dst_image->count, 1); + ret = IM_ERR_NONE; + break; + case IM_YCBCR: // convert to gray, then convert to binary + memcpy(dst_image->data[0], src_image->data[0], dst_image->plane_size); + iConvertBinary((imbyte*)dst_image->data[0], dst_image->count, 1); + ret = IM_ERR_NONE; + break; + default: // convert to gray, then convert to binary + dst_image->color_space = IM_GRAY; + ret = iConvertColorSpace(src_image, dst_image); + dst_image->color_space = IM_BINARY; + if (ret == IM_ERR_NONE) + iConvertBinary((imbyte*)dst_image->data[0], dst_image->count, 1); + ret = IM_ERR_NONE; + break; + } + break; + case IM_YCBCR: + switch(src_image->color_space) + { + case IM_GRAY: + memcpy(dst_image->data[0], src_image->data[0], dst_image->plane_size); + ret = IM_ERR_NONE; + break; + default: + ret = iConvertColorSpace(src_image, dst_image); + break; + } + break; + default: + ret = iConvertColorSpace(src_image, dst_image); + break; + } + } + + if (src_image->has_alpha && dst_image->has_alpha) + memcpy(dst_image->data[dst_image->depth], src_image->data[src_image->depth], src_image->plane_size); + else if (dst_image->color_space == IM_RGB && dst_image->data_type == IM_BYTE && dst_image->has_alpha) + { + if (src_image->color_space == IM_RGB) + { + imbyte* transp_color = (imbyte*)imImageGetAttribute(src_image, "TransparencyColor", NULL, NULL); + if (transp_color) + iConvertSetTranspColor((imbyte**)dst_image->data, dst_image->count, *(transp_color+0), *(transp_color+1), *(transp_color+2)); + else + memset(dst_image->data[3], 255, dst_image->count); + } + else + { + int transp_count; + imbyte* transp_index = (imbyte*)imImageGetAttribute(src_image, "TransparencyIndex", NULL, NULL); + imbyte* transp_map = (imbyte*)imImageGetAttribute(src_image, "TransparencyMap", NULL, &transp_count); + if (transp_map) + iConvertSetTranspMap((imbyte*)src_image->data[0], (imbyte*)dst_image->data[3], dst_image->count, transp_map, transp_count); + else if (transp_index) + iConvertSetTranspIndex((imbyte*)src_image->data[0], (imbyte*)dst_image->data[3], dst_image->count, *transp_index); + else + memset(dst_image->data[3], 255, dst_image->count); + } + } + + return ret; +} + diff --git a/im/src/im_converttype.cpp b/im/src/im_converttype.cpp new file mode 100755 index 0000000..ee69b6f --- /dev/null +++ b/im/src/im_converttype.cpp @@ -0,0 +1,555 @@ +/** \file + * \brief Image Data Type Conversion + * + * See Copyright Notice in im_lib.h + * $Id: im_converttype.cpp,v 1.3 2009/09/29 21:30:57 scuri Exp $ + */ + +#include "im.h" +#include "im_util.h" +#include "im_complex.h" +#include "im_image.h" +#include "im_convert.h" +#include "im_color.h" +#include "im_counter.h" + +#include +#include +#include +#include + + +/* IMPORTANT: leave template functions not "static" + because of some weird compiler bizarre errors. + Report on AIX C++. +*/ + +/* if gamma is applied then factor contains two conversions + one for applying gamma, + and other for normal destiny conversion to dst_min-dst_max range. + because gamma(0) = 0 + For EXP: gamma(x) = (e^(g*x))-1 + For LOG: gamma(x) = log((g*x)+1) + because gamma(1) = 1 + gfactor = exp(g)-1 + gfactor = log(g+1) +*/ + +inline float iGammaFactor(float range, float gamma) +{ + if (gamma == 0) + return range; + else if (gamma < 0) + return range/float(log((-gamma) + 1)); + else + return range/float(exp(gamma) - 1); +} + +inline float iGammaFunc(float factor, float min, float gamma, float value) +{ + // Here 0 +inline T iAbs(const T& v) +{ + if (v < 0) + return -1*v; + return v; +} + +template +inline void iDataTypeIntMax(T& max) +{ + int size_of = sizeof(T); + int data_type = (size_of == 1)? IM_BYTE: (size_of == 2)? IM_USHORT: IM_INT; + max = (T)imColorMax(data_type); +} + +template +inline void iMinMaxAbs(int count, const T *map, T& min, T& max, int abssolute) +{ + if (abssolute) + min = iAbs(*map++); + else + min = *map++; + + max = min; + + for (int i = 1; i < count; i++) + { + T value; + + if (abssolute) + value = iAbs(*map++); + else + value = *map++; + + if (value > max) + max = value; + else if (value < min) + min = value; + } + + if (min == max) + { + max = min + 1; + + if (min != 0) + min = min - 1; + } +} + +template +int iCopy(int count, const SRCT *src_map, DSTT *dst_map) +{ + for (int i = 0; i < count; i++) + { + *dst_map++ = (DSTT)(*src_map++); + } + + return IM_ERR_NONE; +} + +template +int iCopyCrop(int count, const SRCT *src_map, DSTT *dst_map, int abssolute) +{ + SRCT value; + DSTT dst_max; + iDataTypeIntMax(dst_max); + + for (int i = 0; i < count; i++) + { + if (abssolute) + value = iAbs(*src_map++); + else + value = *src_map++; + + if (value > dst_max) + value = (SRCT)dst_max; + + if (!(value >= 0)) + value = 0; + + *dst_map++ = (DSTT)(value); + } + + return IM_ERR_NONE; +} + +template +int iPromote2Cpx(int count, const SRCT *src_map, imcfloat *dst_map) +{ + for (int i = 0; i < count; i++) + { + dst_map->real = (float)(*src_map++); + dst_map++; + } + + return IM_ERR_NONE; +} + +template +int iConvertInt2Int(int count, const SRCT *src_map, DSTT *dst_map, int abssolute, int cast_mode, int counter) +{ + SRCT min, max; + + if (cast_mode == IM_CAST_MINMAX) + { + iMinMaxAbs(count, src_map, min, max, abssolute); + + if (min >= 0 && max <= 255) + { + min = 0; + max = 255; + } + } + else + { + min = 0; + iDataTypeIntMax(max); + } + + DSTT dst_max; + iDataTypeIntMax(dst_max); + + float factor = ((float)dst_max + 1.0f) / ((float)max - (float)min + 1.0f); + + for (int i = 0; i < count; i++) + { + SRCT value; + if (abssolute) + value = iAbs(*src_map++); + else + value = *src_map++; + + if (value >= max) + *dst_map++ = dst_max; + else if (value <= min) + *dst_map++ = 0; + else + *dst_map++ = (DSTT)imResample(value - min, factor); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +template +int iPromoteInt2Real(int count, const SRCT *src_map, float *dst_map, float gamma, int abssolute, int cast_mode, int counter) +{ + SRCT min, max; + + if (cast_mode == IM_CAST_MINMAX) + { + iMinMaxAbs(count, src_map, min, max, abssolute); + + if (min >= 0 && max <= 255) + { + min = 0; + max = 255; + } + } + else + { + min = 0; + iDataTypeIntMax(max); + + if (max == 16777215 && !abssolute) /* IM_INT */ + { + min = (SRCT)iIntMin(); + max = (SRCT)iIntMax(); + } + } + + float range = float(max - min + 1); + float dst_min = 0.0f; + float dst_max = 1.0f; + int size_of = sizeof(SRCT); + if (size_of == 4 && !abssolute) + { + dst_min = -0.5f; + dst_max = +0.5f; + } + + gamma = -gamma; // gamma is inverted here, because we are promoting int2real + float factor = iGammaFactor(1.0f, gamma); + + for (int i = 0; i < count; i++) + { + float fvalue; + if (abssolute) + fvalue = (iAbs(*src_map++) - min + 0.5f)/range; + else + fvalue = (*src_map++ - min + 0.5f)/range; + + // Now 0 <= value <= 1 (if min-max are correct) + + if (fvalue >= 1) + *dst_map++ = dst_max; + else if (fvalue <= 0) + *dst_map++ = dst_min; + else + *dst_map++ = iGammaFunc(factor, dst_min, gamma, fvalue); + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +template +int iDemoteReal2Int(int count, const float *src_map, DSTT *dst_map, float gamma, int abssolute, int cast_mode, int counter) +{ + float min, max; + + DSTT dst_min = 0, dst_max; + iDataTypeIntMax(dst_max); + if (dst_max == 16777215 && !abssolute) /* IM_INT */ + { + dst_min = (DSTT)iIntMin(); + dst_max = (DSTT)iIntMax(); + } + + if (cast_mode == IM_CAST_MINMAX) + iMinMaxAbs(count, src_map, min, max, abssolute); + else + { + min = 0; + max = 1; + } + + int dst_range = dst_max - dst_min + 1; + float range = max - min; + + float factor = iGammaFactor((float)dst_range, gamma); + + for (int i = 0; i < count; i++) + { + float value; + if (abssolute) + value = ((float)iAbs(*src_map++) - min)/range; + else + value = (*src_map++ - min)/range; + + if (i==3603) + i=i; + + // Now 0 <= value <= 1 (if min-max are correct) + + if (value >= 1) + *dst_map++ = dst_max; + else if (value <= 0) + *dst_map++ = dst_min; + else + { + value = iGammaFunc(factor, (float)dst_min, gamma, value); + int ivalue = imRound(value); + if (ivalue >= dst_max) + *dst_map++ = dst_max; + else if (ivalue <= dst_min) + *dst_map++ = dst_min; + else + *dst_map++ = (DSTT)imRound(value - 0.5f); + } + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int iDemoteCpx2Real(int count, const imcfloat* src_map, float *dst_map, int cpx2real) +{ + float (*CpxCnv)(const imcfloat& cpx) = NULL; + + switch(cpx2real) + { + case IM_CPX_REAL: CpxCnv = cpxreal; break; + case IM_CPX_IMAG: CpxCnv = cpximag; break; + case IM_CPX_MAG: CpxCnv = cpxmag; break; + case IM_CPX_PHASE: CpxCnv = cpxphase; break; + } + + for (int i = 0; i < count; i++) + { + *dst_map++ = CpxCnv(*src_map++); + } + + return IM_ERR_NONE; +} + +template +int iDemoteCpx2Int(int count, const imcfloat* src_map, DSTT *dst_map, int cpx2real, float gamma, int abssolute, int cast_mode, int counter) +{ + float* real_map = (float*)malloc(count*sizeof(float)); + if (!real_map) return IM_ERR_MEM; + + iDemoteCpx2Real(count, src_map, real_map, cpx2real); + + if (iDemoteReal2Int(count, real_map, dst_map, gamma, abssolute, cast_mode, counter) != IM_ERR_NONE) + { + free(real_map); + return IM_ERR_COUNTER; + } + + free(real_map); + return IM_ERR_NONE; +} + +template +int iPromoteInt2Cpx(int count, const SRCT* src_map, imcfloat *dst_map, float gamma, int abssolute, int cast_mode, int counter) +{ + float* real_map = (float*)malloc(count*sizeof(float)); + if (!real_map) return IM_ERR_MEM; + + if (iPromoteInt2Real(count, src_map, real_map, gamma, abssolute, cast_mode, counter) != IM_ERR_NONE) + { + free(real_map); + return IM_ERR_COUNTER; + } + + iPromote2Cpx(count, real_map, dst_map); + + free(real_map); + return IM_ERR_NONE; +} + +int imConvertDataType(const imImage* src_image, imImage* dst_image, int cpx2real, float gamma, int abssolute, int cast_mode) +{ + assert(src_image); + assert(dst_image); + + if (!imImageMatchColorSpace(src_image, dst_image)) + return IM_ERR_DATA; + + if (src_image->data_type == dst_image->data_type) + return IM_ERR_DATA; + + int total_count = src_image->depth * src_image->count; + int ret = IM_ERR_DATA; + int counter = imCounterBegin("Convert Data Type"); + char msg[50]; + sprintf(msg, "Converting to %s...", imDataTypeName(dst_image->data_type)); + imCounterTotal(counter, total_count, msg); + + switch(src_image->data_type) + { + case IM_BYTE: + switch(dst_image->data_type) + { + case IM_USHORT: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopy(total_count, (const imbyte*)src_image->data[0], (imushort*)dst_image->data[0]); + else + ret = iConvertInt2Int(total_count, (const imbyte*)src_image->data[0], (imushort*)dst_image->data[0], abssolute, cast_mode, counter); + break; + case IM_INT: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopy(total_count, (const imbyte*)src_image->data[0], (int*)dst_image->data[0]); + else + ret = iConvertInt2Int(total_count, (const imbyte*)src_image->data[0], (int*)dst_image->data[0], abssolute, cast_mode, counter); + break; + case IM_FLOAT: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopy(total_count, (const imbyte*)src_image->data[0], (float*)dst_image->data[0]); + else + ret = iPromoteInt2Real(total_count, (const imbyte*)src_image->data[0], (float*)dst_image->data[0], gamma, abssolute, cast_mode, counter); + break; + case IM_CFLOAT: + if (cast_mode == IM_CAST_DIRECT) + ret = iPromote2Cpx(total_count, (const imbyte*)src_image->data[0], (imcfloat*)dst_image->data[0]); + else + ret = iPromoteInt2Cpx(total_count, (const imbyte*)src_image->data[0], (imcfloat*)dst_image->data[0], gamma, abssolute, cast_mode, counter); + break; + } + break; + case IM_USHORT: + switch(dst_image->data_type) + { + case IM_BYTE: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopyCrop(total_count, (const imushort*)src_image->data[0], (imbyte*)dst_image->data[0], abssolute); + else + ret = iConvertInt2Int(total_count, (const imushort*)src_image->data[0], (imbyte*)dst_image->data[0], abssolute, cast_mode, counter); + break; + case IM_INT: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopy(total_count, (const imushort*)src_image->data[0], (int*)dst_image->data[0]); + else + ret = iConvertInt2Int(total_count, (const imushort*)src_image->data[0], (int*)dst_image->data[0], abssolute, cast_mode, counter); + break; + case IM_FLOAT: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopy(total_count, (const imushort*)src_image->data[0], (float*)dst_image->data[0]); + else + ret = iPromoteInt2Real(total_count, (const imushort*)src_image->data[0], (float*)dst_image->data[0], gamma, abssolute, cast_mode, counter); + break; + case IM_CFLOAT: + if (cast_mode == IM_CAST_DIRECT) + ret = iPromote2Cpx(total_count, (const imushort*)src_image->data[0], (imcfloat*)dst_image->data[0]); + else + ret = iPromoteInt2Cpx(total_count, (const imushort*)src_image->data[0], (imcfloat*)dst_image->data[0], gamma, abssolute, cast_mode, counter); + break; + } + break; + case IM_INT: + switch(dst_image->data_type) + { + case IM_BYTE: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopyCrop(total_count, (const int*)src_image->data[0], (imbyte*)dst_image->data[0], abssolute); + else + ret = iConvertInt2Int(total_count, (const int*)src_image->data[0], (imbyte*)dst_image->data[0], abssolute, cast_mode, counter); + break; + case IM_USHORT: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopyCrop(total_count, (const int*)src_image->data[0], (imushort*)dst_image->data[0], abssolute); + else + ret = iConvertInt2Int(total_count, (const int*)src_image->data[0], (imushort*)dst_image->data[0], abssolute, cast_mode, counter); + break; + case IM_FLOAT: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopy(total_count, (const int*)src_image->data[0], (float*)dst_image->data[0]); + else + ret = iPromoteInt2Real(total_count, (const int*)src_image->data[0], (float*)dst_image->data[0], gamma, abssolute, cast_mode, counter); + break; + case IM_CFLOAT: + if (cast_mode == IM_CAST_DIRECT) + ret = iPromote2Cpx(total_count, (const int*)src_image->data[0], (imcfloat*)dst_image->data[0]); + else + ret = iPromoteInt2Cpx(total_count, (const int*)src_image->data[0], (imcfloat*)dst_image->data[0], gamma, abssolute, cast_mode, counter); + break; + } + break; + case IM_FLOAT: + switch(dst_image->data_type) + { + case IM_BYTE: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopyCrop(total_count, (const float*)src_image->data[0], (imbyte*)dst_image->data[0], abssolute); + else + ret = iDemoteReal2Int(total_count, (const float*)src_image->data[0], (imbyte*)dst_image->data[0], gamma, abssolute, cast_mode, counter); + break; + case IM_USHORT: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopyCrop(total_count, (const float*)src_image->data[0], (imushort*)dst_image->data[0], abssolute); + else + ret = iDemoteReal2Int(total_count, (const float*)src_image->data[0], (imushort*)dst_image->data[0], gamma, abssolute, cast_mode, counter); + break; + case IM_INT: + if (cast_mode == IM_CAST_DIRECT) + ret = iCopy(total_count, (const float*)src_image->data[0], (int*)dst_image->data[0]); + else + ret = iDemoteReal2Int(total_count, (const float*)src_image->data[0], (int*)dst_image->data[0], gamma, abssolute, cast_mode, counter); + break; + case IM_CFLOAT: + ret = iPromote2Cpx(total_count, (const float*)src_image->data[0], (imcfloat*)dst_image->data[0]); + break; + } + break; + case IM_CFLOAT: + switch(dst_image->data_type) + { + case IM_BYTE: + ret = iDemoteCpx2Int(total_count, (const imcfloat*)src_image->data[0], (imbyte*)dst_image->data[0], cpx2real, gamma, abssolute, cast_mode, counter); + break; + case IM_USHORT: + ret = iDemoteCpx2Int(total_count, (const imcfloat*)src_image->data[0], (imushort*)dst_image->data[0], cpx2real, gamma, abssolute, cast_mode, counter); + break; + case IM_INT: + ret = iDemoteCpx2Int(total_count, (const imcfloat*)src_image->data[0], (int*)dst_image->data[0], cpx2real, gamma, abssolute, cast_mode, counter); + break; + case IM_FLOAT: + ret = iDemoteCpx2Real(total_count, (const imcfloat*)src_image->data[0], (float*)dst_image->data[0], cpx2real); + break; + } + break; + } + + imCounterEnd(counter); + return ret; +} diff --git a/im/src/im_counter.cpp b/im/src/im_counter.cpp new file mode 100755 index 0000000..8c5cd5c --- /dev/null +++ b/im/src/im_counter.cpp @@ -0,0 +1,151 @@ +/** \file + * \brief Processing Counter + * + * See Copyright Notice in im_lib.h + * $Id: im_counter.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + +#include "im_counter.h" + +#include +#include + + +static imCounterCallback iCounterFunc = NULL; +static void* iCounterUserData = NULL; + +imCounterCallback imCounterSetCallback(void* user_data, imCounterCallback counter_func) +{ + imCounterCallback old_counter_func = iCounterFunc; + iCounterFunc = counter_func; + if (user_data) + iCounterUserData = user_data; + return old_counter_func; +} + +struct iCounter +{ + int total; + int current; + int sequence; + const char* message; +}; + +#define MAX_COUNTERS 10 +static iCounter iCounterList[MAX_COUNTERS]; + +int imCounterBegin(const char* title) +{ + static int first = 1; + if (first) + { + memset(iCounterList, 0, MAX_COUNTERS*sizeof(iCounter)); + first = 0; + } + + if (!iCounterFunc) // counter management is useless + return -1; + + int counter = -1; + for (int i = 0; i < MAX_COUNTERS; i++) + { + if (iCounterList[i].sequence == 0 || // the counter is free + iCounterList[i].current == 0) // or we are in a sequence + { + counter = i; + break; + } + } + + if (counter == -1) return -1; // too many counters + + iCounter *ct = &iCounterList[counter]; + + ct->sequence++; + + if (ct->sequence == 1) // top level counter + iCounterFunc(counter, iCounterUserData, title, -1); + + return counter; +} + +void imCounterEnd(int counter) +{ + if (counter == -1 || !iCounterFunc) return; // invalid counter + + iCounter *ct = &iCounterList[counter]; + + if (ct->sequence == 1) // top level counter + { + iCounterFunc(counter, iCounterUserData, NULL, 1001); + memset(ct, 0, sizeof(iCounter)); + } + else + ct->sequence--; +} + +int imCounterInc(int counter) +{ + if (counter == -1 || !iCounterFunc) // invalid counter + return 1; + + iCounter *ct = &iCounterList[counter]; + + if (ct->sequence == 0 || // counter with no begin or no total + ct->total == 0) + return 1; + + const char* msg = NULL; + if (ct->current == 0) + msg = ct->message; + + ct->current++; + + int progress = (int)((ct->current * 1000.0f)/ct->total); + + if (ct->current == ct->total) + ct->current = 0; + + return iCounterFunc(counter, iCounterUserData, msg, progress); +} + +int imCounterIncTo(int counter, int count) +{ + if (counter == -1 || !iCounterFunc) // invalid counter + return 1; + + iCounter *ct = &iCounterList[counter]; + + if (ct->sequence == 0 || // counter with no begin or no total + ct->total == 0) + return 1; + + if (count <= 0) count = 0; + if (count >= ct->total) count = ct->total; + + ct->current = count; + + const char* msg = NULL; + if (ct->current == 0) + msg = ct->message; + + int progress = (int)((ct->current * 1000.0f)/ct->total); + + if (ct->current == ct->total) + ct->current = 0; + + return iCounterFunc(counter, iCounterUserData, msg, progress); +} + +void imCounterTotal(int counter, int total, const char* message) +{ + if (counter == -1 || !iCounterFunc) return; // invalid counter + + iCounter *ct = &iCounterList[counter]; + + if (ct->sequence == 0) return; // counter with no begin + + ct->message = message; + ct->total = total; + ct->current = 0; +} diff --git a/im/src/im_datatype.cpp b/im/src/im_datatype.cpp new file mode 100755 index 0000000..c75483e --- /dev/null +++ b/im/src/im_datatype.cpp @@ -0,0 +1,54 @@ +/** \file + * \brief Data Type Utilities + * + * See Copyright Notice in im_lib.h + * $Id: im_datatype.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + + +#include "im.h" +#include "im_util.h" + +#include + +typedef struct _iTypeInfo +{ + int size; + unsigned long max; + long min; + char* name; +} iTypeInfo; + +static iTypeInfo iTypeInfoTable[] = +{ + {1, 255, 0, "byte"}, + {2, 65535, 0, "ushort"}, + {4, 2147483647, -2147483647-1, "int"}, + {4, 0, 0, "float"}, + {8, 0, 0, "cfloat"} +}; + +const char* imDataTypeName(int data_type) +{ + assert(data_type >= IM_BYTE && data_type <= IM_CFLOAT); + return iTypeInfoTable[data_type].name; +} + +int imDataTypeSize(int data_type) +{ + assert(data_type >= IM_BYTE && data_type <= IM_CFLOAT); + assert(sizeof(int) == 4); + return iTypeInfoTable[data_type].size; +} + +unsigned long imDataTypeIntMax(int data_type) +{ + assert(data_type >= IM_BYTE && data_type <= IM_CFLOAT); + return iTypeInfoTable[data_type].max; +} + +long imDataTypeIntMin(int data_type) +{ + assert(data_type >= IM_BYTE && data_type <= IM_CFLOAT); + return iTypeInfoTable[data_type].min; +} diff --git a/im/src/im_dib.cpp b/im/src/im_dib.cpp new file mode 100755 index 0000000..3dd6780 --- /dev/null +++ b/im/src/im_dib.cpp @@ -0,0 +1,1136 @@ +/** \file + * \brief Windows DIB + * + * See Copyright Notice in im_lib.h + * $Id: im_dib.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + + +#include +#include +#include + +#include "im_dib.h" + +/***************** + Private Funtions +*****************/ + +/* Long returned in getpixel is an array of 4 bytes, not actually a DWORD */ +/* 32 bpp max */ +/* Windows use Little Endian always, this means LSB first: 0xF3F2F1F0 = "F0F1F2F3" */ + +#define iSETDWORD(_vLong, _Line, _Nb) \ + { \ + unsigned char* _pLong = (unsigned char*)&_vLong; \ + int b = _Nb; \ + while(b--) \ + *_pLong++ = *_Line++; \ + } + +#define iGETDWORD(_vLong, _Line, _Nb) \ + { \ + unsigned char* _pLong = (unsigned char*)&_vLong; \ + int b = _Nb; \ + while(b--) \ + *_Line++ = *_pLong++; \ + } + +#define iGETDWORDMASK(_vLong, _vMask, _Line, _Nb) \ + { \ + unsigned char* _pLong = (unsigned char*)&_vLong; \ + unsigned char* _pMask = (unsigned char*)&_vMask; \ + int b = _Nb; \ + while(b--) \ + *_Line++ = *_pLong++ | (~*_pMask++ & *_Line); \ + } + +static unsigned int iMakeBitMask(int bpp) +{ + unsigned int mask = 1; + + while (bpp > 1) + { + mask = (mask << 1) + 1; + bpp--; + } + + return mask; +} + +static unsigned int iLineGetPixel1(unsigned char* line, int col) +{ + return (line[col / 8] >> (7 - col % 8)) & 0x01; /* LSB is filled */ +} + +static void iLineSetPixel1(unsigned char* line, int col, unsigned int pixel) +{ + if (pixel) /* only test 1/0 */ + line[col / 8] |= (0x01 << (7 - (col % 8))); + else + line[col / 8] &= (0xFE << (7 - (col % 8))); +} + +static unsigned int iLineGetPixel4(unsigned char* line, int col) +{ + return (line[col / 2] >> ((1 - col % 2) * 4)) & 0x0F; /* LSB is filled */ +} + +static void iLineSetPixel4(unsigned char* line, int col, unsigned int pixel) +{ + unsigned char mask = (col % 2)? 0xF0: 0x0F; /* LSB is used */ + line[col/2] = (unsigned char)((mask & (((unsigned char)pixel) << ((1 - col % 2) * 4))) | (~mask & line[col/2])); +} + +static unsigned int iLineGetPixel8(unsigned char* line, int col) +{ + return line[col]; /* LSB is filled */ +} + +static void iLineSetPixel8(unsigned char* line, int col, unsigned int pixel) +{ + line[col] = (unsigned char)pixel; /* LSB is used */ +} + +static unsigned int iLineGetPixel16(unsigned char* line, int col) +{ + return ((unsigned short*)line)[col]; /* 0xF1F0 => "F0F10000" */ +} + +static void iLineSetPixel16(unsigned char* line, int col, unsigned int pixel) +{ + ((unsigned short*)line)[col] = (unsigned short)pixel; /* inverse of above */ +} + +static unsigned int iLineGetPixel24(unsigned char* line, int col) +{ + unsigned int pixel = 0; + line += col*3; + iSETDWORD(pixel, line, 3); + return pixel; +} + +static void iLineSetPixel24(unsigned char* line, int col, unsigned int pixel) +{ + line += col*3; + iGETDWORD(pixel, line, 3); +} + +static unsigned int iLineGetPixel32(unsigned char* line, int col) +{ + return ((unsigned int*)line)[col]; /* direct mapping */ +} + +static void iLineSetPixel32(unsigned char* line, int col, unsigned int pixel) +{ + ((unsigned int*)line)[col] = pixel; /* direct mapping */ +} + +static int iGetPixelAnyBpp = 0; +static unsigned int iGetPixelAnyMask = 0; + +static unsigned int iAnyGet(unsigned char* line, int col, int bpp) +{ + int s_byte = (col*bpp) >> 3; + int s_bit = (col*bpp) & 0x7; + unsigned int pixel = 0; + unsigned int mask = (~0) >> (32-bpp); + int n_bytes = (bpp + s_bit + 7) >> 3; + int shift = (n_bytes << 3) - bpp - s_bit; + line += s_byte; + while (n_bytes) + { + pixel |= *line++; + if (--n_bytes > 0) pixel <<= 8; + else break; + } + pixel >>= shift; + return pixel & mask; +} + +static void iAnySet(unsigned char* line, int col, int bpp, unsigned int pixel) +{ + int s_byte = (col*bpp) >> 3; + int s_bit = (col*bpp) & 0x7; + unsigned int mask = (~0) >> (32-bpp); + int n_bytes = (bpp + s_bit + 7) >> 3; + int shift = (n_bytes << 3) - bpp - s_bit; + unsigned char* p_pixel = (unsigned char*) &pixel, *p_mask = (unsigned char*) &mask; + line += s_byte + n_bytes - 1; + pixel <<= shift; + mask <<= shift; + while (n_bytes--) { + *line = (*line & ~(*p_mask)) | (*p_pixel & *p_mask); + p_mask++; p_pixel++; line--; + } +} + +static unsigned int iLineGetPixelAny(unsigned char* line, int col) +{ + return iAnyGet(line, col, iGetPixelAnyBpp); +#if 0 + unsigned int pixel = 0; + int rbits = (col * iGetPixelAnyBpp) % 8; /* calc remaining bits */ + line += (col * iGetPixelAnyBpp) / 8; /* position pointer */ + + /* transfer from pixel line to a DWORD in little endian, so it can be shifted */ + { + int nbytes = (iGetPixelAnyBpp + rbits + 7) / 8; /* bytes used */ + iSETDWORD(pixel, line, nbytes); + } + + /* shift down pixel remaining bits and mask extra non pixel bits */ + return (pixel >> rbits) & iGetPixelAnyMask; +#endif +} + +static int iSetPixelAnyBpp = 0; +static unsigned int iSetPixelAnyMask = 0; + +static void iLineSetPixelAny(unsigned char* line, int col, unsigned int pixel) +{ + iAnySet(line, col, iSetPixelAnyBpp, pixel); +#if 0 + int rbits = (col * iSetPixelAnyBpp) % 8; /* calc remaining bits */ + line += (col * iSetPixelAnyBpp) / 8; /* position pointer */ + + pixel = pixel << rbits; /* position bits */ + + { + unsigned int mask = iSetPixelAnyMask << rbits; /* position mask */ + int nbytes = (iGetPixelAnyBpp + rbits + 7) / 8; /* bytes used */ + iGETDWORDMASK(pixel, mask, line, nbytes); + } +#endif +} + +static long iQuad2Long(RGBQUAD* quad_color) +{ + return (((unsigned long)quad_color->rgbRed) << 16) | + (((unsigned long)quad_color->rgbGreen) << 8) | + (((unsigned long)quad_color->rgbBlue) << 0); +} + +static RGBQUAD iLong2Quad(long long_color) +{ + RGBQUAD quad_color; + + quad_color.rgbRed = (unsigned char)(((long_color) >> 16) & 0xFF); + quad_color.rgbGreen = (unsigned char)(((long_color) >> 8) & 0xFF); + quad_color.rgbBlue = (unsigned char)(((long_color) >> 0) & 0xFF); + + return quad_color; +} + +static int iImageLineSize(int width, int bpp) +{ + return (width * bpp + 7) / 8; /* 1 byte boundary */ +} + +static int iLineSize(int width, int bpp) +{ + return ((width * bpp + 31) / 32) * 4; /* 4 bytes boundary */ +} + +static void iInitHeadersReference(imDib* dib) +{ + dib->bmi = (BITMAPINFO*)dib->dib; + dib->bmih = (BITMAPINFOHEADER*)dib->dib; + dib->bmic = (RGBQUAD*)(dib->dib + sizeof(BITMAPINFOHEADER)); +} + +static void iInitSizes(imDib* dib, int width, int height, int bpp) +{ + dib->line_size = iLineSize(width, bpp); + dib->pad_size = dib->line_size - iImageLineSize(width, bpp); + dib->bits_size = dib->line_size * height; + dib->size = sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * dib->palette_count + dib->bits_size; +} + +static void iInitInfoHeader(BITMAPINFOHEADER* bmih, int width, int height, int bpp, int palette_count) +{ + bmih->biSize = sizeof(BITMAPINFOHEADER); + bmih->biWidth = width; + bmih->biHeight = height; + bmih->biPlanes = 1; + bmih->biBitCount = (WORD)bpp; + bmih->biCompression = 0; + bmih->biSizeImage = 0; + bmih->biClrUsed = palette_count; + bmih->biClrImportant = 0; + + { + HDC ScreenDC = GetDC(NULL); + + bmih->biXPelsPerMeter = (unsigned int)(GetDeviceCaps(ScreenDC, LOGPIXELSX) / 0.0254); + bmih->biYPelsPerMeter = (unsigned int)(GetDeviceCaps(ScreenDC, LOGPIXELSY) / 0.0254); + + ReleaseDC(NULL, ScreenDC); + } +} + +static void iInitBits(imDib* dib, BYTE* bits) +{ + if (bits == NULL) + dib->bits = dib->dib + sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * dib->palette_count; + else + dib->bits = bits; +} + +static int iGetValidBpp(int bpp) +{ + if (bpp == 1) + bpp = 1; + else if (bpp <= 4) + bpp = 4; + else if (bpp <= 8) + bpp = 8; + else if (bpp <= 16) + bpp = 16; + else if (bpp <= 24) + bpp = 24; + else if (bpp <= 32) + bpp = 32; + else + bpp = 0; + + return bpp; +} + +static int iCheckHeader(BITMAPINFOHEADER *bmih) +{ + if (bmih->biSize != sizeof(BITMAPINFOHEADER)) + return 0; + + if (bmih->biWidth <= 0) + return 0; + + if (bmih->biHeight == 0) + return 0; + + { + int bpp = iGetValidBpp(bmih->biBitCount); + if (!bpp) + return 0; + + if (bmih->biCompression == BI_RLE8 && bpp != 8) + return 0; + + if (bmih->biCompression == BI_RLE4 && bpp != 4) + return 0; + + if (bmih->biCompression == BI_BITFIELDS && (bpp != 16 || bpp != 32)) + return 0; + + if (bmih->biHeight < 0 && (bmih->biCompression == BI_RLE8 || bmih->biCompression == BI_RLE4)) + return 0; + +/* if (bmih->biCompression == BI_JPEG || bmih->biCompression == BI_PNG) + return 0; */ + } + + return 1; +} + +/***************** + Creation +*****************/ + +static void AllocDib(imDib* dib) +{ + dib->dib = NULL; + dib->handle = GlobalAlloc(GMEM_MOVEABLE, dib->size); + if (!dib->handle) return; + dib->dib = (BYTE*)GlobalLock(dib->handle); +} + +imDib* imDibCreate(int width, int height, int bpp) +{ + imDib* dib; + int obpp = bpp; + + bpp = iGetValidBpp(abs(bpp)); + + assert(width > 0 && height > 0); + assert(bpp); + + dib = (imDib*)malloc(sizeof(imDib)); + + if (bpp > 8) + { + if ((bpp == 16 || bpp == 32) && obpp < 0) + dib->palette_count = 3; + else + dib->palette_count = 0; + } + else + dib->palette_count = 1 << bpp; + + iInitSizes(dib, width, height, bpp); + + AllocDib(dib); + if (dib->dib == NULL) + { + free(dib); + return NULL; + } + + iInitHeadersReference(dib); + + iInitInfoHeader(dib->bmih, width, height, bpp, dib->palette_count); + + iInitBits(dib, NULL); + + dib->is_reference = 0; + + return dib; +} + +imDib* imDibCreateSection(HDC hDC, HBITMAP *bitmap, int width, int height, int bpp) +{ + BITMAPINFO* bmi; + BYTE* bits; + int palette_count; + int obpp = bpp; + + bpp = iGetValidBpp(abs(bpp)); + + assert(hDC); + assert(width > 0 && height > 0); + assert(bpp); + + if (bpp > 8) + { + if ((bpp == 16 || bpp == 32) && obpp < 0) + palette_count = 3; + else + palette_count = 0; + } + else + palette_count = 1 << bpp; + + bmi = (BITMAPINFO*)malloc(sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * palette_count); + + iInitInfoHeader(&bmi->bmiHeader, width, height, bpp, palette_count); + + if (bpp > 8 && palette_count == 3) + { + DWORD *masks = (DWORD*)(bmi + sizeof(BITMAPINFOHEADER)); + masks[0] = 0x001F; + masks[1] = 0x03E0; + masks[2] = 0x7C00; + } + + *bitmap = CreateDIBSection(hDC, bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); + + { + imDib* dib; + dib = imDibCreateReference((BYTE*)bmi, bits); + dib->is_reference = 0; + return dib; + } +} + + +imDib* imDibCreateCopy(const imDib* src_dib) +{ + imDib* dib; + + assert(src_dib); + + dib = (imDib*)malloc(sizeof(imDib)); + + memcpy(dib, src_dib, sizeof(imDib)); + + AllocDib(dib); + if (dib->dib == NULL) + { + free(dib); + return NULL; + } + + iInitHeadersReference(dib); + + memcpy(dib->dib, src_dib->dib, dib->size - dib->bits_size); + + iInitBits(dib, NULL); + + memcpy(dib->bits, src_dib->bits, dib->bits_size); + + dib->is_reference = 0; + + return dib; +} + +imDib* imDibCreateReference(BYTE* bmi, BYTE* bits) +{ + imDib* dib; + + assert(bmi); + + dib = (imDib*)malloc(sizeof(imDib)); + + dib->dib = bmi; + + iInitHeadersReference(dib); + + if (dib->bmih->biBitCount > 8) + { + dib->palette_count = 0; + + if (dib->bmih->biCompression == BI_BITFIELDS) + dib->palette_count = 3; + } + else + { + if (dib->bmih->biClrUsed != 0) + dib->palette_count = dib->bmih->biClrUsed; + else + dib->palette_count = 1 << dib->bmih->biBitCount; + } + + iInitBits(dib, bits); + + dib->is_reference = 1; + + iInitSizes(dib, dib->bmih->biWidth, abs(dib->bmih->biHeight), dib->bmih->biBitCount); + + return dib; +} + +void imDibDestroy(imDib* dib) +{ + assert(dib); + if (!dib->is_reference) + { + GlobalUnlock(dib->handle); + GlobalFree(dib->handle); + } + free(dib); +} + +/***************** + Line Acess +*****************/ + +imDibLineGetPixel imDibLineGetPixelFunc(int bpp) +{ + switch(bpp) + { + case 1: + return &iLineGetPixel1; + case 4: + return &iLineGetPixel4; + case 8: + return &iLineGetPixel8; + case 16: + return &iLineGetPixel16; + case 24: + return &iLineGetPixel24; + case 32: + return &iLineGetPixel32; + default: + if (bpp > 32) return NULL; + iGetPixelAnyBpp = bpp; + iGetPixelAnyMask = iMakeBitMask(bpp); + return &iLineGetPixelAny; + } +} + +imDibLineSetPixel imDibLineSetPixelFunc(int bpp) +{ + switch(bpp) + { + case 1: + return &iLineSetPixel1; + case 4: + return &iLineSetPixel4; + case 8: + return &iLineSetPixel8; + case 16: + return &iLineSetPixel16; + case 24: + return &iLineSetPixel24; + case 32: + return &iLineSetPixel32; + default: + if (bpp > 32) return NULL; + iSetPixelAnyBpp = bpp; + iSetPixelAnyMask = iMakeBitMask(bpp); + return &iLineSetPixelAny; + } +} + +/***************** + DIB <-> Bitmap +*****************/ + +imDib* imDibFromHBitmap(const HBITMAP bitmap, const HPALETTE hPalette) +{ + imDib* dib; + + assert(bitmap); + + { + BITMAP bmp; + + if (!GetObject(bitmap, sizeof(BITMAP), (LPSTR)&bmp)) + return NULL; + + dib = imDibCreate(bmp.bmWidth, bmp.bmHeight, bmp.bmPlanes * bmp.bmBitsPixel); + } + + if (!dib) + return NULL; + + { + HDC ScreenDC = GetDC(NULL); + HPALETTE hOldPalette = NULL; + if (hPalette) hOldPalette = SelectPalette(ScreenDC, hPalette, FALSE); + RealizePalette(ScreenDC); + + GetDIBits(ScreenDC, bitmap, 0, dib->bmih->biHeight, dib->bits, dib->bmi, DIB_RGB_COLORS); + + if (hOldPalette) SelectPalette(ScreenDC, hOldPalette, FALSE); + ReleaseDC(NULL, ScreenDC); + } + + return dib; +} + +HBITMAP imDibToHBitmap(const imDib* dib) +{ + HBITMAP bitmap; + + assert(dib); + + { + HDC ScreenDC = GetDC(NULL); + bitmap = CreateDIBitmap(ScreenDC, dib->bmih, CBM_INIT, dib->bits, dib->bmi, DIB_RGB_COLORS); + ReleaseDC(NULL, ScreenDC); + } + +/* + Another Way + bitmap = CreateCompatibleBitmap(ScreenDC, dib->bmih->biWidth, dib->bmih->biHeight); + SetDIBits(ScreenDC, bitmap, 0, dib->bmih->biHeight, dib->bits, dib->bmi, DIB_RGB_COLORS); +*/ + + return bitmap; +} + +/******************* + DIB <-> Clipboard +*******************/ + +int imDibIsClipboardAvailable(void) +{ + if (IsClipboardFormatAvailable(CF_DIB) || + IsClipboardFormatAvailable(CF_BITMAP)) + return 1; + + return 0; +} + +imDib* imDibPasteClipboard(void) +{ + int clip_type = 0; + if (IsClipboardFormatAvailable(CF_DIB)) + clip_type = CF_DIB; + else if (IsClipboardFormatAvailable(CF_BITMAP)) + clip_type = CF_BITMAP; + + if (!clip_type) + return NULL; + + OpenClipboard(NULL); + HANDLE Handle = GetClipboardData(clip_type); + if (Handle == NULL) + { + CloseClipboard(); + return NULL; + } + + imDib *dib; + if (clip_type == CF_DIB) + { + BYTE* bmi = (BYTE*)GlobalLock(Handle); + if (!bmi || !iCheckHeader((BITMAPINFOHEADER*)bmi)) + { + CloseClipboard(); + return NULL; + } + + { + imDib* clip_dib = imDibCreateReference(bmi, NULL); + dib = imDibCreateCopy(clip_dib); + imDibDestroy(clip_dib); + GlobalUnlock(Handle); + } + } + else + { + HPALETTE hpal = (HPALETTE)GetClipboardData(CF_PALETTE); + + /* If there is a CF_PALETTE object in the clipboard, this is the palette to assume */ + /* the bitmap is realized against. */ + if (!hpal) + hpal = (HPALETTE)GetStockObject(DEFAULT_PALETTE); + + dib = imDibFromHBitmap((HBITMAP)Handle, hpal); + } + + CloseClipboard(); + + return dib; +} + +void imDibCopyClipboard(imDib* dib) +{ + assert(dib); + + if (!OpenClipboard(NULL)) + return; + EmptyClipboard(); + GlobalUnlock(dib->handle); + SetClipboardData(CF_DIB, dib->handle); + CloseClipboard(); + + dib->dib = NULL; + dib->is_reference = 1; + imDibDestroy(dib); +} + +/******************* + DIB -> Palette +*******************/ + +HPALETTE imDibLogicalPalette(const imDib* dib) +{ + LOGPALETTE* pLogPal; + PALETTEENTRY* pPalEntry; + HPALETTE hPal; + RGBQUAD* bmic; + int c; + + assert(dib); + assert(dib->bmih->biBitCount <= 8); + + pLogPal = (LOGPALETTE*)malloc(sizeof(LOGPALETTE) + dib->palette_count * sizeof(PALETTEENTRY)); + pLogPal->palVersion = 0x300; + pLogPal->palNumEntries = (WORD)dib->palette_count; + + bmic = dib->bmic; + pPalEntry = pLogPal->palPalEntry; + + for (c = 0; c < dib->palette_count; c++) + { + pPalEntry->peRed = bmic->rgbRed; + pPalEntry->peGreen = bmic->rgbGreen; + pPalEntry->peBlue = bmic->rgbBlue; + pPalEntry->peFlags = PC_NOCOLLAPSE; + + pPalEntry++; + bmic++; + } + + hPal = CreatePalette(pLogPal); + free(pLogPal); + + return hPal; +} + +/******************* + DIB <-> RGB Image +*******************/ + +void imDibEncodeFromRGBA(imDib* dib, const unsigned char* red, const unsigned char* green, const unsigned char* blue, const unsigned char* alpha) +{ + int x, y; + BYTE* bits; + + if (dib->bmih->biHeight < 0) + bits = dib->bits + (dib->bits_size - dib->line_size); /* start of last line */ + else + bits = dib->bits; + + assert(dib->bmih->biBitCount > 16); + + for (y = 0; y < abs(dib->bmih->biHeight); y++) + { + for (x = 0; x < dib->bmih->biWidth; x++) + { + *bits++ = *blue++; + *bits++ = *green++; + *bits++ = *red++; + + if (dib->bmih->biBitCount == 32) + { + if (alpha) + *bits++ = *alpha++; + else + *bits++ = 0xFF; /* opaque */ + } + } + + bits += dib->pad_size; + + if (dib->bmih->biHeight < 0) + bits -= 2*dib->line_size; + } +} + +void imDibDecodeToRGBA(const imDib* dib, unsigned char* red, unsigned char* green, unsigned char* blue, unsigned char* alpha) +{ + int x, y, offset; + unsigned short color; + BYTE* bits; + unsigned int rmask = 0, gmask = 0, bmask = 0, + roff = 0, goff = 0, boff = 0; /* pixel bit mask control when reading 16 and 32 bpp images */ + + assert(dib); + assert(dib->bmih->biBitCount > 8); + assert(red && green && blue); + + if (dib->bmih->biHeight < 0) + bits = dib->bits + (dib->bits_size - dib->line_size); /* start of last line */ + else + bits = dib->bits; + + if (dib->bmih->biBitCount == 16) + offset = dib->line_size; /* do not increment for each pixel, jump line */ + else + offset = dib->pad_size; /* increment for each pixel, jump pad */ + + if (dib->bmih->biCompression == BI_BITFIELDS) + { + unsigned int Mask; + unsigned int* palette = (unsigned int*)dib->bmic; + + rmask = Mask = palette[0]; + while (!(Mask & 0x01)) + {Mask >>= 1; roff++;} + + gmask = Mask = palette[1]; + while (!(Mask & 0x01)) + {Mask >>= 1; goff++;} + + bmask = Mask = palette[2]; + while (!(Mask & 0x01)) + {Mask >>= 1; boff++;} + } + else if (dib->bmih->biBitCount == 16) + { + bmask = 0x001F; + gmask = 0x03E0; + rmask = 0x7C00; + boff = 0; + goff = 5; + roff = 10; + } + + for (y = 0; y < abs(dib->bmih->biHeight); y++) + { + for (x = 0; x < dib->bmih->biWidth; x++) + { + if (dib->bmih->biBitCount == 16) + { + color = ((unsigned short*)bits)[x]; + *red++ = (unsigned char)((((rmask & color) >> roff) * 255) / (rmask >> roff)); + *green++ = (unsigned char)((((gmask & color) >> goff) * 255) / (gmask >> goff)); + *blue++ = (unsigned char)((((bmask & color) >> boff) * 255) / (bmask >> boff)); + } + else + { + *blue++ = *bits++; + *green++ = *bits++; + *red++ = *bits++; + + if (dib->bmih->biBitCount == 32) + { + if (alpha) + *alpha++ = *bits++; + else + bits++; + } + } + } + + bits += offset; + + if (dib->bmih->biHeight < 0) + bits -= 2*dib->line_size; + } +} + +/******************* + DIB <-> Map Image +*******************/ + +void imDibEncodeFromMap(imDib* dib, const unsigned char* map, const long* palette, int palette_count) +{ + assert(dib); + assert(map && palette); + assert(dib->bmih->biBitCount <= 8); + assert(dib->bmih->biCompression != BI_RLE8); + + { + int x, y; + BYTE* bits; + + if (dib->bmih->biHeight < 0) + bits = dib->bits + (dib->bits_size - dib->line_size); /* start of last line */ + else + bits = dib->bits; + + for (y = 0; y < abs(dib->bmih->biHeight); y++) + { + for (x = 0; x < dib->bmih->biWidth; x++) + bits[x] = *map++; + + if (dib->bmih->biHeight < 0) + bits -= dib->line_size; + else + bits += dib->line_size; + } + } + + { + int c; + RGBQUAD* bmic = dib->bmic; + + for (c = 0; c < palette_count; c++) + *bmic++ = iLong2Quad(palette[c]); + } + + dib->bmih->biClrUsed = palette_count; + dib->bmih->biClrImportant = 0; + dib->palette_count = palette_count; +} + +void imDibDecodeToMap(const imDib* dib, unsigned char* map, long* palette) +{ + assert(dib); + assert(dib->bmih->biBitCount <= 8); + assert(map && palette); + + { + int x, y; + BYTE* bits; + + if (dib->bmih->biHeight < 0) + bits = dib->bits + (dib->bits_size - dib->line_size); /* start of last line */ + else + bits = dib->bits; + + for (y = 0; y < abs(dib->bmih->biHeight); y++) + { + for (x = 0; x < dib->bmih->biWidth; x++) + { + switch (dib->bmih->biBitCount) + { + case 1: + *map++ = (unsigned char)((bits[x / 8] >> (7 - x % 8)) & 0x01); + break; + case 4: + *map++ = (unsigned char)((bits[x / 2] >> ((1 - x % 2) * 4)) & 0x0F); + break; + case 8: + *map++ = bits[x]; + break; + } + } + + if (dib->bmih->biHeight < 0) + bits -= dib->line_size; + else + bits += dib->line_size; + } + } + + { + int c; + RGBQUAD* bmic = dib->bmic; + + for (c = 0; c < dib->palette_count; c++) + { + palette[c] = iQuad2Long(bmic); + *bmic++; + } + } +} + +/******************* + DIB <-> File +*******************/ + +int imDibSaveFile(const imDib* dib, char* filename) +{ + DWORD dwTmp; + HANDLE hFile; /* file handle */ + BITMAPFILEHEADER file_header; /* bitmap file-header */ + + assert(dib); + assert(filename); + + hFile = CreateFile(filename, GENERIC_WRITE, (DWORD) 0, + (LPSECURITY_ATTRIBUTES)NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, (HANDLE) NULL); + + if (hFile == INVALID_HANDLE_VALUE) + return 0; + + /* 0x42 = "B" 0x4d = "M" */ + file_header.bfType = 0x4d42; + + /* Compute the size of the entire file. */ + file_header.bfSize = (DWORD) (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + dib->palette_count*sizeof(RGBQUAD) + dib->bits_size); + + file_header.bfReserved1 = 0; + file_header.bfReserved2 = 0; + + /* Compute the offset to the bits array. */ + file_header.bfOffBits = (DWORD) sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + dib->palette_count*sizeof(RGBQUAD); + + /* Copy the BITMAPFILEHEADER into the .BMP file. */ + if (!WriteFile(hFile, (LPVOID)&file_header, sizeof(BITMAPFILEHEADER), (LPDWORD)&dwTmp, (LPOVERLAPPED)NULL)) + goto save_error; + + /* Copy the BITMAPINFOHEADER into the file. */ + if (!WriteFile(hFile, (LPVOID)dib->bmih, sizeof(BITMAPINFOHEADER), (LPDWORD)&dwTmp, (LPOVERLAPPED)NULL)) + goto save_error; + + /* Copy the RGBQUAD array into the file. */ + if (dib->palette_count > 0) + { + if (!WriteFile(hFile, (LPVOID)dib->bmic, dib->palette_count*sizeof(RGBQUAD), (LPDWORD)&dwTmp, (LPOVERLAPPED)NULL)) + goto save_error; + } + + /* Copy the bits array into the .BMP file. */ + if (!WriteFile(hFile, dib->bits, dib->bits_size, (LPDWORD)&dwTmp, (LPOVERLAPPED)NULL)) + goto save_error; + + /* Close the .BMP file. */ + CloseHandle(hFile); + + return 1; + +save_error: + CloseHandle(hFile); + return 0; +} + +imDib* imDibLoadFile(const char* filename) +{ + HANDLE hFile; /* file handle */ + DWORD dwTmp; + imDib* dib = NULL; + BITMAPFILEHEADER file_header; /* bitmap file-header */ + BITMAPINFOHEADER bmih; + + assert(filename); + + hFile = CreateFile(filename, GENERIC_READ, (DWORD) 0, + (LPSECURITY_ATTRIBUTES)NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, (HANDLE) NULL); + + if (hFile == INVALID_HANDLE_VALUE) + return NULL; + + /* Read the BITMAPFILEHEADER from the .BMP file. */ + if (!ReadFile(hFile, (LPVOID)&file_header, sizeof(BITMAPFILEHEADER), (LPDWORD)&dwTmp, (LPOVERLAPPED)NULL)) + goto load_error; + + if (file_header.bfType != 0x4d42) + goto load_error; + + /* Read the BITMAPINFOHEADER from the file. */ + if (!ReadFile(hFile, (LPVOID)&bmih, sizeof(BITMAPINFOHEADER), (LPDWORD)&dwTmp, (LPOVERLAPPED)NULL)) + goto load_error; + + if(!iCheckHeader(&bmih)) + goto load_error; + + dib = imDibCreate(bmih.biWidth, abs(bmih.biHeight), bmih.biCompression==BI_BITFIELDS? -bmih.biBitCount: bmih.biBitCount); + + memcpy(dib->bmih, &bmih, bmih.biSize); + + if (bmih.biSize != sizeof(BITMAPINFOHEADER)) + { + /* skip newer BIH definitions */ + SetFilePointer(hFile, bmih.biSize - sizeof(BITMAPINFOHEADER), NULL, FILE_CURRENT); + dib->bmih->biSize = sizeof(BITMAPINFOHEADER); + } + + /* Read the RGBQUAD array from the file. */ + if (dib->palette_count > 0) + { + if (!ReadFile(hFile, (LPVOID)dib->bmic, dib->palette_count*sizeof(RGBQUAD), (LPDWORD)&dwTmp, (LPOVERLAPPED)NULL)) + goto load_error; + } + + /* Read the Bits array from the .BMP file. */ + SetFilePointer(hFile, file_header.bfOffBits, NULL, FILE_BEGIN); + + { + int bits_size = dib->bits_size; + + if (bmih.biBitCount < 16 && bmih.biCompression != BI_RGB) + bits_size = GetFileSize(hFile, NULL) - file_header.bfOffBits; + + if (bits_size > dib->bits_size) + goto load_error; + + if (!ReadFile(hFile, dib->bits, bits_size, (LPDWORD)&dwTmp, (LPOVERLAPPED)NULL)) + goto load_error; + } + + /* Close the .BMP file. */ + CloseHandle(hFile); + + return dib; + +load_error: + if (dib) imDibDestroy(dib); + CloseHandle(hFile); + return NULL; +} + +/******************* + Screen -> DIB +*******************/ + +imDib* imDibCaptureScreen(int x, int y, int width, int height) +{ + HBITMAP bitmap; + HDC ScreenDC = GetDC(NULL); + HDC hdcCompatible = CreateCompatibleDC(ScreenDC); + + if (width == 0) width = GetDeviceCaps(ScreenDC, HORZRES); + if (height == 0) height = GetDeviceCaps(ScreenDC, VERTRES); + + bitmap = CreateCompatibleBitmap(ScreenDC, width, height); + + if (!bitmap) + { + ReleaseDC(NULL, ScreenDC); + return NULL; + } + + /* Select the bitmaps into the compatible DC. */ + SelectObject(hdcCompatible, bitmap); + + /* Copy color data for the entire display into a */ + /* bitmap that is selected into a compatible DC. */ + BitBlt(hdcCompatible, 0, 0, width, height, ScreenDC, x, y, SRCCOPY); + + ReleaseDC(NULL, ScreenDC); + DeleteDC(hdcCompatible); + + { + imDib* dib = imDibFromHBitmap(bitmap, NULL); + DeleteObject(bitmap); + return dib; + } +} diff --git a/im/src/im_dibxbitmap.cpp b/im/src/im_dibxbitmap.cpp new file mode 100755 index 0000000..8fabd4a --- /dev/null +++ b/im/src/im_dibxbitmap.cpp @@ -0,0 +1,181 @@ +/** \file + * \brief Conversion between imDib and imImage + * + * See Copyright Notice in im_lib.h + * $Id: im_dibxbitmap.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + + +#include +#include + +#include "im.h" +#include "im_image.h" +#include "im_dib.h" +#include "im_util.h" + + +void imDibEncodeFromBitmap(imDib* dib, const unsigned char* data) +{ + int x, y; + BYTE* bits; + + assert(dib); + assert(dib->bmih->biBitCount > 16); + assert(data); + + if (dib->bmih->biHeight < 0) + bits = dib->bits + (dib->bits_size - dib->line_size); /* start of last line */ + else + bits = dib->bits; + + for (y = 0; y < abs(dib->bmih->biHeight); y++) + { + for (x = 0; x < dib->bmih->biWidth; x++) + { + *bits++ = *(data+2); // R + *bits++ = *(data+1); // G + *bits++ = *(data+0); // B + + data += 3; + + if (dib->bmih->biBitCount == 32) + *bits++ = *data++; + } + + bits += dib->pad_size; + + if (dib->bmih->biHeight < 0) + bits -= 2*dib->line_size; + } +} + +void imDibDecodeToBitmap(const imDib* dib, unsigned char* data) +{ + int x, y, offset; + unsigned short color; + BYTE* bits; + unsigned int rmask = 0, gmask = 0, bmask = 0, + roff = 0, goff = 0, boff = 0; /* pixel bit mask control when reading 16 and 32 bpp images */ + + assert(dib); + assert(dib->bmih->biBitCount > 8); + assert(data); + + if (dib->bmih->biHeight < 0) + bits = dib->bits + (dib->bits_size - dib->line_size); /* start of last line */ + else + bits = dib->bits; + + if (dib->bmih->biBitCount == 16) + offset = dib->line_size; /* do not increment for each pixel, jump line */ + else + offset = dib->pad_size; /* increment for each pixel, jump pad */ + + if (dib->bmih->biCompression == BI_BITFIELDS) + { + unsigned int Mask; + unsigned int* palette = (unsigned int*)dib->bmic; + + rmask = Mask = palette[0]; + while (!(Mask & 0x01)) + {Mask >>= 1; roff++;} + + gmask = Mask = palette[1]; + while (!(Mask & 0x01)) + {Mask >>= 1; goff++;} + + bmask = Mask = palette[2]; + while (!(Mask & 0x01)) + {Mask >>= 1; boff++;} + } + else if (dib->bmih->biBitCount == 16) + { + bmask = 0x001F; + gmask = 0x03E0; + rmask = 0x7C00; + boff = 0; + goff = 5; + roff = 10; + } + + for (y = 0; y < abs(dib->bmih->biHeight); y++) + { + for (x = 0; x < dib->bmih->biWidth; x++) + { + if (dib->bmih->biBitCount == 16) + { + color = ((unsigned short*)bits)[x]; + *data++ = (unsigned char)((((rmask & color) >> roff) * 255) / (rmask >> roff)); + *data++ = (unsigned char)((((gmask & color) >> goff) * 255) / (gmask >> goff)); + *data++ = (unsigned char)((((bmask & color) >> boff) * 255) / (bmask >> boff)); + } + else + { + *(data+2) = *bits++; // B + *(data+1) = *bits++; // G + *(data+0) = *bits++; // R + + data += 3; + + if (dib->bmih->biBitCount == 32) + *data++ = *bits++; + } + } + + bits += offset; + + if (dib->bmih->biHeight < 0) + bits -= 2*dib->line_size; + } +} + +imImage* imDibToImage(const imDib* dib) +{ + assert(dib); + + int color_space = IM_RGB; + if (dib->bmih->biBitCount <= 8) + color_space = IM_MAP; + + imImage* image = imImageCreate(dib->bmih->biWidth, abs(dib->bmih->biHeight), color_space, IM_BYTE); + if (!image) + return NULL; + + if (image->color_space == IM_MAP) + { + image->palette_count = dib->palette_count; + imDibDecodeToMap(dib, (imbyte*)image->data[0], image->palette); + } + else + { + imDibDecodeToRGBA(dib, (imbyte*)image->data[0], (imbyte*)image->data[1], (imbyte*)image->data[2], NULL); + } + + return image; +} + +imDib* imDibFromImage(const imImage* image) +{ + assert(image); + assert(imImageIsBitmap(image)); + + if (!imImageIsBitmap(image)) + return NULL; + + int bpp; + if (image->color_space != IM_RGB) + bpp = 8; + else + bpp = 24; + + imDib* dib = imDibCreate(image->width, image->height, bpp); + if (!dib) return NULL; + + if (image->color_space != IM_RGB) + imDibEncodeFromMap(dib, (const imbyte*)image->data[0], image->palette, image->palette_count); + else + imDibEncodeFromRGBA(dib, (const imbyte*)image->data[0], (const imbyte*)image->data[1], (const imbyte*)image->data[2], NULL); + + return dib; +} diff --git a/im/src/im_ecw.def b/im/src/im_ecw.def new file mode 100755 index 0000000..a0c8858 --- /dev/null +++ b/im/src/im_ecw.def @@ -0,0 +1,2 @@ +EXPORTS + imFormatRegisterECW \ No newline at end of file diff --git a/im/src/im_ecw.mak b/im/src/im_ecw.mak new file mode 100755 index 0000000..0894425 --- /dev/null +++ b/im/src/im_ecw.mak @@ -0,0 +1,16 @@ +PROJNAME = im +LIBNAME = im_ecw +OPT = YES + +SRC = im_format_ecw.cpp + +ECWSDKINC = d:/lng/ecw_sdk/include +ECWSDKLIB = d:/lng/ecw_sdk/lib/$(TEC_UNAME) + +INCLUDES = ../include $(ECWSDKINC) + +LDIR = $(ECWSDKLIB) +LIBS = NCSEcw + +IM = .. +USE_IM = Yes diff --git a/im/src/im_file.cpp b/im/src/im_file.cpp new file mode 100755 index 0000000..3bfa779 --- /dev/null +++ b/im/src/im_file.cpp @@ -0,0 +1,465 @@ +/** \file + * \brief File Access + * + * See Copyright Notice in im_lib.h + * $Id: im_file.cpp,v 1.5 2009/08/23 23:57:51 scuri Exp $ + */ + +#include +#include +#include + +#include "im.h" +#include "im_format.h" +#include "im_util.h" +#include "im_attrib.h" +#include "im_counter.h" +#include "im_plus.h" // make shure that this file is compiled + + +void imFileClear(imFile* ifile) +{ + // can not reset compression and image_count + + ifile->is_new = 0; + ifile->attrib_table = 0; + + ifile->line_buffer = 0; + ifile->line_buffer_size = 0; + ifile->line_buffer_extra = 0; + ifile->line_buffer_alloc = 0; + + ifile->convert_bpp = 0; + ifile->switch_type = 0; + + ifile->width = 0; + ifile->height = 0; + ifile->image_index = -1; + ifile->user_data_type = 0; + ifile->user_color_mode = 0; + ifile->file_data_type = 0; + ifile->file_color_mode = 0; + + ifile->palette_count = 256; + for (int i = 0; i < 256; i++) + ifile->palette[i] = imColorEncode((imbyte)i, (imbyte)i, (imbyte)i); +} + +void imFileSetBaseAttributes(imFile* ifile) +{ + imFileFormatBase* ifileformat = (imFileFormatBase*)ifile; + imAttribTable* atable = (imAttribTable*)ifileformat->attrib_table; + + atable->Set("FileFormat", IM_BYTE, -1, ifileformat->iformat->format); + atable->Set("FileCompression", IM_BYTE, -1, ifileformat->compression); + atable->Set("FileImageCount", IM_INT, 1, &ifileformat->image_count); +} + +imFile* imFileOpen(const char* file_name, int *error) +{ + assert(file_name); + + imFileFormatBase* ifileformat = imFileFormatBaseOpen(file_name, error); + if (!ifileformat) + return NULL; + + imFileClear(ifileformat); + + ifileformat->attrib_table = new imAttribTable(599); + imFileSetBaseAttributes(ifileformat); + + ifileformat->counter = imCounterBegin(file_name); + + return ifileformat; +} + +imFile* imFileOpenAs(const char* file_name, const char* format, int *error) +{ + assert(file_name); + + imFileFormatBase* ifileformat = imFileFormatBaseOpenAs(file_name, format, error); + if (!ifileformat) + return NULL; + + imFileClear(ifileformat); + + ifileformat->attrib_table = new imAttribTable(599); + imFileSetBaseAttributes(ifileformat); + + ifileformat->counter = imCounterBegin(file_name); + + return ifileformat; +} + +imFile* imFileNew(const char* file_name, const char* format, int *error) +{ + assert(file_name); + + imFileFormatBase* ifileformat = imFileFormatBaseNew(file_name, format, error); + if (!ifileformat) + return NULL; + + imFileClear(ifileformat); + + ifileformat->is_new = 1; + ifileformat->image_count = 0; + ifileformat->compression[0] = 0; + + ifileformat->attrib_table = new imAttribTable(101); + + ifileformat->counter = imCounterBegin(file_name); + + return ifileformat; +} + +void imFileClose(imFile* ifile) +{ + assert(ifile); + imFileFormatBase* ifileformat = (imFileFormatBase*)ifile; + imAttribTable* attrib_table = (imAttribTable*)ifile->attrib_table; + + imCounterEnd(ifile->counter); + + ifileformat->Close(); + + if (ifile->line_buffer) free(ifile->line_buffer); + + delete attrib_table; +} + +void* imFileHandle(imFile* ifile, int index) +{ + assert(ifile); + imFileFormatBase* ifileformat = (imFileFormatBase*)ifile; + return ifileformat->Handle(index); +} + +void imFileSetAttribute(imFile* ifile, const char* attrib, int data_type, int count, const void* data) +{ + assert(ifile); + assert(attrib); + imFileFormatBase* ifileformat = (imFileFormatBase*)ifile; + imAttribTable* atable = (imAttribTable*)ifileformat->attrib_table; + if (data) + atable->Set(attrib, data_type, count, data); + else + atable->UnSet(attrib); +} + +const void* imFileGetAttribute(imFile* ifile, const char* attrib, int *data_type, int *count) +{ + assert(ifile); + assert(attrib); + imFileFormatBase* ifileformat = (imFileFormatBase*)ifile; + imAttribTable* attrib_table = (imAttribTable*)ifileformat->attrib_table; + return attrib_table->Get(attrib, data_type, count); +} + +static int iAttribCB(void* user_data, int index, const char* name, int data_type, int count, const void* data) +{ + (void)data_type; + (void)data; + (void)count; + char** attrib = (char**)user_data; + attrib[index] = (char*)name; + return 1; +} + +void imFileGetAttributeList(imFile* ifile, char** attrib, int *attrib_count) +{ + assert(ifile); + assert(attrib_count); + + imAttribTable* attrib_table = (imAttribTable*)ifile->attrib_table; + *attrib_count = attrib_table->Count(); + + if (attrib) attrib_table->ForEach((void*)attrib, iAttribCB); +} + +void imFileGetInfo(imFile* ifile, char* format, char* compression, int *image_count) +{ + assert(ifile); + imFileFormatBase* ifileformat = (imFileFormatBase*)ifile; + + if(compression) strcpy(compression, ifile->compression); + if(format) strcpy(format, ifileformat->iformat->format); + if (image_count) *image_count = ifile->image_count; +} + +static int iFileCheckPaletteGray(imFile* ifile) +{ + int i; + imbyte r, g, b; + imbyte remaped[256]; + memset(remaped, 0, 256); + + for (i = 0; i < ifile->palette_count; i++) + { + imColorDecode(&r, &g, &b, ifile->palette[i]); + + /* if there are colors abort */ + if (r != g || g != b) + return 0; + + /* grays out of order, will be remapped, but must be unique, + if there are duplicates maybe they are used for different pourposes */ + if (i != r) + { + if (!remaped[r]) + remaped[r] = 1; + else + return 0; + } + } + + return 1; +} + +static int iFileCheckPaletteBinary(imFile* ifile) +{ + if (ifile->palette_count > 2) + return 0; + + imbyte r, g, b; + + imColorDecode(&r, &g, &b, ifile->palette[0]); + if ((r != 0 || g != 0 || b != 0) && + (r != 1 || g != 1 || b != 1) && + (r != 255 || g != 255 || b != 255)) + return 0; + + imColorDecode(&r, &g, &b, ifile->palette[1]); + if ((r != 0 || g != 0 || b != 0) && + (r != 1 || g != 1 || b != 1) && + (r != 255 || g != 255 || b != 255)) + return 0; + + return 1; +} + +int imFileReadImageInfo(imFile* ifile, int index, int *width, int *height, int *file_color_mode, int *file_data_type) +{ + assert(ifile); + assert(!ifile->is_new); + imFileFormatBase* ifileformat = (imFileFormatBase*)ifile; + + if (index >= ifile->image_count) + return IM_ERR_DATA; + + if (ifile->image_index != -1 && + ifile->image_index == index) + { + if(width) *width = ifile->width; + if(height) *height = ifile->height; + if(file_color_mode) *file_color_mode = ifile->file_color_mode; + if(file_data_type) *file_data_type = ifile->file_data_type; + + return IM_ERR_NONE; + } + + ifile->convert_bpp = 0; + ifile->switch_type = 0; + + int error = ifileformat->ReadImageInfo(index); + if (error) return error; + + if (!imImageCheckFormat(ifile->file_color_mode, ifile->file_data_type)) + return IM_ERR_DATA; + + if (imColorModeSpace(ifile->file_color_mode) == IM_BINARY) + { + ifile->palette_count = 2; + ifile->palette[0] = imColorEncode(0, 0, 0); + ifile->palette[1] = imColorEncode(255, 255, 255); + } + + if (imColorModeSpace(ifile->file_color_mode) == IM_MAP) + { + if (iFileCheckPaletteGray(ifile)) + ifile->file_color_mode = (ifile->file_color_mode & 0xFF00) | IM_GRAY; + + if (iFileCheckPaletteBinary(ifile)) + ifile->file_color_mode = (ifile->file_color_mode & 0xFF00) | IM_BINARY; + } + + if(width) *width = ifile->width; + if(height) *height = ifile->height; + if(file_color_mode) *file_color_mode = ifile->file_color_mode; + if(file_data_type) *file_data_type = ifile->file_data_type; + + ifile->image_index = index; + + return IM_ERR_NONE; +} + +void imFileGetPalette(imFile* ifile, long* palette, int *palette_count) +{ + assert(ifile); + assert(palette); + + if (ifile->palette_count != 0 && palette) + memcpy(palette, ifile->palette, ifile->palette_count*sizeof(long)); + + if (palette_count) *palette_count = ifile->palette_count; +} + +static void iFileCheckConvertGray(imFile* ifile, imbyte* data) +{ + int i, do_remap = 0; + imbyte remap[256], r, g, b; + + // enforce the palette to only have grays in the correct order. + + for (i = 0; i < ifile->palette_count; i++) + { + imColorDecode(&r, &g, &b, ifile->palette[i]); + + if (r != i) + { + ifile->palette[i] = imColorEncode((imbyte)i, (imbyte)i, (imbyte)i); + do_remap = 1; + } + + remap[i] = r; + } + + if (!do_remap) + return; + + int count = ifile->width*ifile->height; + for(i = 0; i < count; i++) + { + *data = remap[*data]; + data++; + } + + int transp_count; + imbyte* transp_map = (imbyte*)imFileGetAttribute(ifile, "TransparencyMap", NULL, &transp_count); + if (transp_map) + { + imbyte new_transp_map[256]; + for (i=0; iwidth*ifile->height; + for(int i = 0; i < count; i++) + { + if (*data) + *data = 1; + data++; + } +} + +int imFileReadImageData(imFile* ifile, void* data, int convert2bitmap, int color_mode_flags) +{ + assert(ifile); + assert(!ifile->is_new); + imFileFormatBase* ifileformat = (imFileFormatBase*)ifile; + + if (ifile->image_index == -1) + return IM_ERR_DATA; + + ifile->user_color_mode = ifile->file_color_mode; + ifile->user_data_type = ifile->file_data_type; + + if (convert2bitmap) + { + ifile->user_data_type = IM_BYTE; + ifile->user_color_mode = imColorModeToBitmap(ifile->file_color_mode); + } + + if (color_mode_flags != -1) + { + ifile->user_color_mode = imColorModeSpace(ifile->user_color_mode); + ifile->user_color_mode |= color_mode_flags; + } + + if (!imImageCheckFormat(ifile->user_color_mode, ifile->user_data_type)) + return IM_ERR_DATA; + + if (!imFileCheckConversion(ifile)) + return IM_ERR_DATA; + + imFileLineBufferInit(ifile); + + int ret = ifileformat->ReadImageData(data); + + // here we can NOT change the file_color_mode we already returned to the user + // so just check for gray and binary consistency + + if (imColorModeSpace(ifile->file_color_mode) == IM_GRAY && ifile->file_data_type == IM_BYTE) + iFileCheckConvertGray(ifile, (imbyte*)data); + + if (imColorModeSpace(ifile->file_color_mode) == IM_BINARY) + iFileCheckConvertBinary(ifile, (imbyte*)data); + + return ret; +} + +void imFileSetInfo(imFile* ifile, const char* compression) +{ + assert(ifile); + assert(ifile->is_new); + + if (!compression) + ifile->compression[0] = 0; + else + strcpy(ifile->compression, compression); +} + +void imFileSetPalette(imFile* ifile, long* palette, int palette_count) +{ + assert(ifile); + assert(palette); + assert(palette_count != 0); + + memcpy(ifile->palette, palette, palette_count*sizeof(long)); + ifile->palette_count = palette_count; +} + +int imFileWriteImageInfo(imFile* ifile, int width, int height, int user_color_mode, int user_data_type) +{ + assert(ifile); + assert(ifile->is_new); + imFileFormatBase* ifileformat = (imFileFormatBase*)ifile; + + if (!imImageCheckFormat(user_color_mode, user_data_type)) + return IM_ERR_DATA; + + int error = ifileformat->iformat->CanWrite(ifile->compression, user_color_mode, user_data_type); + if (error) return error; + + ifile->width = width; + ifile->height = height; + ifile->user_color_mode = user_color_mode; + ifile->user_data_type = user_data_type; + + if (imColorModeSpace(user_color_mode) == IM_BINARY) + { + ifile->palette_count = 2; + ifile->palette[0] = imColorEncode(0, 0, 0); + ifile->palette[1] = imColorEncode(255, 255, 255); + } + + return ifileformat->WriteImageInfo(); +} + +int imFileWriteImageData(imFile* ifile, void* data) +{ + assert(ifile); + assert(ifile->is_new); + assert(data); + imFileFormatBase* ifileformat = (imFileFormatBase*)ifile; + + if (!imFileCheckConversion(ifile)) + return IM_ERR_DATA; + + imFileLineBufferInit(ifile); + + return ifileformat->WriteImageData(data); +} diff --git a/im/src/im_filebuffer.cpp b/im/src/im_filebuffer.cpp new file mode 100755 index 0000000..09c5ad4 --- /dev/null +++ b/im/src/im_filebuffer.cpp @@ -0,0 +1,695 @@ +/** \file + * \brief File Access - Buffer Management + * + * See Copyright Notice in im_lib.h + * $Id: im_filebuffer.cpp,v 1.2 2009/08/13 22:34:25 scuri Exp $ + */ + +#include +#include +#include + +#include "im.h" +#include "im_format.h" +#include "im_util.h" +#include "im_complex.h" +#include "im_color.h" + + +int imFileLineSizeAligned(int width, int bpp, int align) +{ + if (align == 4) + return ((width * bpp + 31) / 32) * 4; + else if (align == 2) + return ((width * bpp + 15) / 16) * 2; + else + return (width * bpp + 7) / 8; +} + +template +static void iDoFillLineBuffer(int width, int height, int line, int plane, + int file_color_mode, T* line_buffer, + int user_color_mode, const T* data) +{ + // (writing) from data to file + // will handle packing and alpha + + int file_depth = imColorModeDepth(file_color_mode); + int data_depth = imColorModeDepth(user_color_mode); + int data_plane_size = width*height; // This will be used in UNpacked data + + if (imColorModeIsPacked(user_color_mode)) + data += line*width*data_depth; + else + data += line*width; + + for (int x = 0; x < width; x++) + { + int x_data_offset = x*data_depth; // This will be used in packed data + + if (imColorModeIsPacked(file_color_mode)) + { + int x_file_offset = x*file_depth; // This will be used in packed data + + // file is packed + // NO color space conversion, color_space must match + // Ignore alpha if necessary. + int depth = IM_MIN(file_depth, data_depth); + for (int d = 0; d < depth; d++) + { + if (imColorModeIsPacked(user_color_mode)) + line_buffer[x_file_offset + d] = data[x_data_offset + d]; + else + line_buffer[x_file_offset + d] = data[d*data_plane_size + x]; + } + } + else + { + // file NOT packed, copy just one plane + // NO color space conversion, color_space must match + + if (plane >= imColorModeDepth(user_color_mode)) + return; + + if (imColorModeIsPacked(user_color_mode)) + line_buffer[x] = data[x_data_offset + plane]; + else + line_buffer[x] = data[plane*data_plane_size + x]; + } + } +} + +template +static void iDoFillData(int width, int height, int line, int plane, + int file_color_mode, const T* line_buffer, + int user_color_mode, T* data) +{ + // (reading) from file to data + // will handle packing and alpha + + int file_depth = imColorModeDepth(file_color_mode); + int data_depth = imColorModeDepth(user_color_mode); + int data_plane_size = width*height; // This will be used in UNpacked data + + if (imColorModeIsPacked(user_color_mode)) + data += line*width*data_depth; + else + data += line*width; + + for (int x = 0; x < width; x++) + { + int x_data_offset = x*data_depth; // This will be used in packed data + + if (imColorModeIsPacked(file_color_mode)) + { + int x_file_offset = x*file_depth; // This will be used in packed data + + // file is packed + // NO color space conversion, color_space must match + // ignore alpha if necessary. + int depth = IM_MIN(file_depth, data_depth); + for (int d = 0; d < depth; d++) + { + if (imColorModeIsPacked(user_color_mode)) + data[x_data_offset + d] = line_buffer[x_file_offset + d]; + else + data[d*data_plane_size + x] = line_buffer[x_file_offset + d]; + } + } + else + { + // file NOT packed, copy just one plane + // NO color space conversion, color_space must match + + if (plane >= imColorModeDepth(user_color_mode)) + return; + + if (imColorModeIsPacked(user_color_mode)) + data[x_data_offset + plane] = line_buffer[x]; + else + data[plane*data_plane_size + x] = line_buffer[x]; + } + } +} + +template +static inline void iConvertColor2RGB(T* data, int color_space, int data_type) +{ + T zero, max = (T)imColorMax(data_type); + + // These are identical procedures to iDoConvert2RGB in "im_filebuffer.cpp". + + switch (color_space) + { + case IM_XYZ: + { + // to increase precision do intermediate conversions in float + + // scale to 0-1 + float c0 = imColorReconstruct(data[0], max); + float c1 = imColorReconstruct(data[1], max); + float c2 = imColorReconstruct(data[2], max); + + // result is still 0-1 + imColorXYZ2RGB(c0, c1, c2, + c0, c1, c2, 1.0f); + + // do gamma correction then scale back to 0-max + data[0] = imColorQuantize(imColorTransfer2Nonlinear(c0), max); + data[1] = imColorQuantize(imColorTransfer2Nonlinear(c1), max); + data[2] = imColorQuantize(imColorTransfer2Nonlinear(c2), max); + } + break; + case IM_YCBCR: + zero = (T)imColorZero(data_type); + imColorYCbCr2RGB(data[0], data[1], data[2], + data[0], data[1], data[2], zero, max); + break; + case IM_CMYK: + imColorCMYK2RGB(data[0], data[1], data[2], data[3], + data[0], data[1], data[2], max); + break; + case IM_LUV: + case IM_LAB: + { + // to increase precision do intermediate conversions in float + // scale to 0-1 and -0.5/+0.5 + float c0 = imColorReconstruct(data[0], max); + float c1 = imColorReconstruct(data[1], max) - 0.5f; + float c2 = imColorReconstruct(data[2], max) - 0.5f; + + if (color_space == IM_LUV) + imColorLuv2XYZ(c0, c1, c2, // conversion in-place + c0, c1, c2); + else + imColorLab2XYZ(c0, c1, c2, // conversion in-place + c0, c1, c2); + + imColorXYZ2RGB(c0, c1, c2, // conversion in-place + c0, c1, c2, 1.0f); + + // do gamma correction then scale back to 0-max + data[0] = imColorQuantize(imColorTransfer2Nonlinear(c0), max); + data[1] = imColorQuantize(imColorTransfer2Nonlinear(c1), max); + data[2] = imColorQuantize(imColorTransfer2Nonlinear(c2), max); + } + break; + } +} + +// These functions will be always converting RGB -> RGB (0-max) -> (0-255) + +static inline imbyte iConvertType2Byte(const imbyte& data) + { return data; } + +static inline imbyte iConvertType2Byte(const imushort& data) + { return imColorQuantize(imColorReconstruct(data, (imushort)65535), (imbyte)255); } + +static inline imbyte iConvertType2Byte(const int& data) + { return imColorQuantize(imColorReconstruct(data, 16777215), (imbyte)255); } + +static inline imbyte iConvertType2Byte(const float& data) + { return imColorQuantize(data, (imbyte)255); } + +// Fake float to avoid erros in the color conversion template rotines. +// Since the color conversion use the double value, they are invalid, +// so the automatic conversion to bitmap for complex images works only for RGB. +static inline imbyte iConvertType2Byte(const double& data) +{ + imcfloat* fdata = (imcfloat*)&data; + return imColorQuantize(cpxmag(*fdata), (imbyte)255); +} + +template +static void iDoFillDataBitmap(int width, int height, int line, int plane, int data_type, + int file_color_mode, const T* line_buffer, + int user_color_mode, imbyte* data) +{ + // (reading) from file to data + // will handle packing, alpha, color space conversion to RGB and data_type to BYTE + + int file_depth = imColorModeDepth(file_color_mode); + int data_depth = imColorModeDepth(user_color_mode); + int copy_alpha = imColorModeHasAlpha(file_color_mode) && imColorModeHasAlpha(user_color_mode); + int data_plane_size = width*height; // This will be used in UNpacked data + + if (imColorModeIsPacked(user_color_mode)) + data += line*width*data_depth; + else + data += line*width; + + for (int x = 0; x < width; x++) + { + int x_data_offset = x*data_depth; // This will be used in packed data + + if (imColorModeIsPacked(file_color_mode)) + { + int x_file_offset = x*file_depth; // This will be used in packed data + + if (imColorModeMatch(file_color_mode, user_color_mode)) + { + // file is packed + // same color space components (in this case means RGB) + // ignore alpha if necessary. + int depth = IM_MIN(file_depth, data_depth); + for (int d = 0; d < depth; d++) + { + if (imColorModeIsPacked(user_color_mode)) + data[x_data_offset + d] = iConvertType2Byte(line_buffer[x_file_offset + d]); + else + data[d*data_plane_size + x] = iConvertType2Byte(line_buffer[x_file_offset + d]); + } + } + else + { + // file is packed + // but different color space components + // only to RGB conversions are accepted + + if (imColorModeSpace(user_color_mode) != IM_RGB) + return; + + T src_data[4]; + src_data[0] = line_buffer[x_file_offset]; + src_data[1] = line_buffer[x_file_offset + 1]; + src_data[2] = line_buffer[x_file_offset + 2]; + if (imColorModeSpace(file_color_mode) == IM_CMYK) + src_data[3] = line_buffer[x_file_offset + 3]; + + // Do conversion in place + iConvertColor2RGB(src_data, imColorModeSpace(file_color_mode), data_type); + + if (imColorModeIsPacked(user_color_mode)) + { + data[x_data_offset] = iConvertType2Byte(src_data[0]); + data[x_data_offset + 1] = iConvertType2Byte(src_data[1]); + data[x_data_offset + 2] = iConvertType2Byte(src_data[2]); + + if (copy_alpha) + { + if (imColorModeSpace(file_color_mode) == IM_CMYK) + data[x_data_offset + 3] = iConvertType2Byte(line_buffer[x_file_offset + 4]); + else + data[x_data_offset + 3] = iConvertType2Byte(line_buffer[x_file_offset + 3]); + } + } + else + { + data[x] = iConvertType2Byte(src_data[0]); + data[data_plane_size + x] = iConvertType2Byte(src_data[1]); + data[2*data_plane_size + x] = iConvertType2Byte(src_data[2]); + + if (copy_alpha) + { + if (imColorModeSpace(file_color_mode) == IM_CMYK) + data[3*data_plane_size + x] = iConvertType2Byte(line_buffer[x_file_offset + 4]); + else + data[3*data_plane_size + x] = iConvertType2Byte(line_buffer[x_file_offset + 3]); + } + } + } + } + else + { + // file NOT packed, copy just one plane + // NO color space conversion possible now + + if (plane >= imColorModeDepth(user_color_mode)) + return; + + if (imColorModeIsPacked(user_color_mode)) + data[x_data_offset + plane] = iConvertType2Byte(line_buffer[x]); + else + data[plane*data_plane_size + x] = iConvertType2Byte(line_buffer[x]); + } + } +} + +static void iFileExpandBits(imFile* ifile) +{ + // conversion will be done in place in backward order (from end to start) + + if (abs(ifile->convert_bpp) < 8) + { + imbyte* byte_buffer = (imbyte*)ifile->line_buffer; + imbyte* bit_buffer = (imbyte*)ifile->line_buffer; + + byte_buffer += ifile->width-1; + int bpp = ifile->convert_bpp; + int expand_range = imColorModeSpace(ifile->file_color_mode) == IM_GRAY? 1: 0; + + for (int i=ifile->width-1; i >= 0; i--) + { + if (bpp == 1) + *byte_buffer = (imbyte)((bit_buffer[i / 8] >> (7 - i % 8)) & 0x01); + else if (bpp == 4) + *byte_buffer = (imbyte)((bit_buffer[i / 2] >> ((1 - i % 2) * 4)) & 0x0F); + else if (bpp == 2) + *byte_buffer = (imbyte)((bit_buffer[i / 4] >> ((3 - i % 4) * 2)) & 0x03); + + if (expand_range) /* if convert_bpp<0 then only expand its range */ + { + if (bpp == 4 || bpp == -4) + *byte_buffer *= 17; + else if (bpp == 2 || bpp == -2) + *byte_buffer *= 85; + } + + byte_buffer--; + } + } + else if (ifile->convert_bpp == 12) + { + imushort* ushort_buffer = (imushort*)ifile->line_buffer; + imbyte* bit_buffer = (imbyte*)ifile->line_buffer; + + for (int i=ifile->width-1; i >= 0; i--) + { + int byte_index = (3*i)/2; + if (i%2) + ushort_buffer[i] = (bit_buffer[byte_index] << 4) | (bit_buffer[byte_index+1] & 0x0F); + else + ushort_buffer[i] = ((bit_buffer[byte_index] & 0x0F) << 8) | (bit_buffer[byte_index+1]); + } + } +} + +static void iFileCompactBits(imFile* ifile) +{ + // conversion will be done in place + imbyte* byte_buffer = (imbyte*)ifile->line_buffer; + imbyte* bit_buffer = (imbyte*)ifile->line_buffer; + + if (ifile->convert_bpp == 1) + { + for (int i = 0; i < ifile->width; i++) + { + if (*byte_buffer) + bit_buffer[i / 8] |= (0x01 << (7 - (i % 8))); + else + bit_buffer[i / 8] &= ~(0x01 << (7 - (i % 8))); + + byte_buffer++; + } + } + else // -1 == expand 1 to 255 + { + for (int i = 0; i < ifile->width; i++) + { + if (*byte_buffer) + *byte_buffer = 255; + + byte_buffer++; + } + } +} + +template +static void iDoSwitchInt(int count, const SRC* src_data, DST* dst_data, int offset) +{ + for (int i = 0; i < count; i++) + { + *dst_data++ = (DST)((int)*src_data++ + offset); + } +} + +template +static void iDoSwitchReal(int count, const SRC* src_data, DST* dst_data) +{ + for (int i = 0; i < count; i++) + { + *dst_data++ = (DST)(*src_data++); + } +} + +static void iFileSwitchFromType(imFile* ifile) +{ + int line_count = imImageLineCount(ifile->width, ifile->file_color_mode); + switch(ifile->file_data_type) + { + case IM_BYTE: // Source is char + iDoSwitchInt(line_count, (const char*)ifile->line_buffer, (imbyte*)ifile->line_buffer, 128); + break; + case IM_USHORT: // Source is short + iDoSwitchInt(line_count, (const short*)ifile->line_buffer, (imushort*)ifile->line_buffer, 32768); + break; + case IM_INT: // Source is uint + iDoSwitchInt(line_count, (const unsigned int*)ifile->line_buffer, (int*)ifile->line_buffer, -8388608); + break; + case IM_FLOAT: // Source is double + iDoSwitchReal(line_count, (const double*)ifile->line_buffer, (float*)ifile->line_buffer); + break; + case IM_CFLOAT: // Source is complex double + iDoSwitchReal(2*line_count, (const double*)ifile->line_buffer, (float*)ifile->line_buffer); + break; + } +} + +static void iFileSwitchToType(imFile* ifile) +{ + int line_count = imImageLineCount(ifile->width, ifile->file_color_mode); + switch(ifile->file_data_type) + { + case IM_BYTE: // Destiny is char + iDoSwitchInt(line_count, (const imbyte*)ifile->line_buffer, (char*)ifile->line_buffer, -128); + break; + case IM_USHORT: // Destiny is short + iDoSwitchInt(line_count, (const imushort*)ifile->line_buffer, (short*)ifile->line_buffer, -32768); + break; + case IM_INT: // Destiny is uint + iDoSwitchInt(line_count, (const int*)ifile->line_buffer, (unsigned int*)ifile->line_buffer, 8388608); + break; + case IM_FLOAT: // Destiny is double + iDoSwitchReal(line_count, (const float*)ifile->line_buffer, (double*)ifile->line_buffer); + break; + case IM_CFLOAT: // Destiny is complex double + iDoSwitchReal(2*line_count, (const float*)ifile->line_buffer, (double*)ifile->line_buffer); + break; + } +} + +void imFileLineBufferWrite(imFile* ifile, const void* data, int line, int plane) +{ + // (writing) from data to file + + if (imColorModeIsTopDown(ifile->file_color_mode) != imColorModeIsTopDown(ifile->user_color_mode)) + line = ifile->height-1 - line; + + if ((ifile->file_color_mode & 0x3FF) == + (ifile->user_color_mode & 0x3FF)) // compare only packing, alpha and color space + { + int data_offset = line*ifile->line_buffer_size; + if (plane != 0) + data_offset += plane*ifile->height*ifile->line_buffer_size; + + memcpy(ifile->line_buffer, (unsigned char*)data + data_offset, ifile->line_buffer_size); + } + else + { + switch(ifile->file_data_type) + { + case IM_BYTE: + iDoFillLineBuffer(ifile->width, ifile->height, line, plane, + ifile->file_color_mode, (imbyte*)ifile->line_buffer, + ifile->user_color_mode, (const imbyte*)data); + break; + case IM_USHORT: + iDoFillLineBuffer(ifile->width, ifile->height, line, plane, + ifile->file_color_mode, (imushort*)ifile->line_buffer, + ifile->user_color_mode, (const imushort*)data); + break; + case IM_INT: + iDoFillLineBuffer(ifile->width, ifile->height, line, plane, + ifile->file_color_mode, (int*)ifile->line_buffer, + ifile->user_color_mode, (const int*)data); + break; + case IM_FLOAT: + iDoFillLineBuffer(ifile->width, ifile->height, line, plane, + ifile->file_color_mode, (float*)ifile->line_buffer, + ifile->user_color_mode, (const float*)data); + break; + case IM_CFLOAT: + iDoFillLineBuffer(ifile->width, ifile->height, line, plane, + ifile->file_color_mode, (imcfloat*)ifile->line_buffer, + ifile->user_color_mode, (const imcfloat*)data); + break; + } + } + + if (ifile->convert_bpp) + iFileCompactBits(ifile); + + if (ifile->switch_type) + iFileSwitchToType(ifile); +} + +void imFileLineBufferRead(imFile* ifile, void* data, int line, int plane) +{ + // (reading) from file to data + + if (imColorModeIsTopDown(ifile->file_color_mode) != imColorModeIsTopDown(ifile->user_color_mode)) + line = ifile->height-1 - line; + + if (ifile->convert_bpp) + iFileExpandBits(ifile); + + if (ifile->switch_type) + iFileSwitchFromType(ifile); + + if ((ifile->file_color_mode & 0x3FF) == (ifile->user_color_mode & 0x3FF) && // compare only packing, alpha and color space, ignore bottom up. + ifile->file_data_type == ifile->user_data_type) // compare data type when reading + { + int data_offset = line*ifile->line_buffer_size; + if (plane != 0) + data_offset += plane*ifile->height*ifile->line_buffer_size; + + memcpy((unsigned char*)data + data_offset, ifile->line_buffer, ifile->line_buffer_size); + } + else + { + // now we have 2 conversions groups + // one to convert only packing and alpha + // and the other to convert packing, alpha, color space and data type + int convert2bitmap = 0; + if (imColorModeSpace(ifile->user_color_mode) != imColorModeSpace(ifile->file_color_mode) || + ifile->file_data_type != IM_BYTE) + convert2bitmap = 1; + + switch(ifile->file_data_type) + { + case IM_BYTE: + if (convert2bitmap) + iDoFillDataBitmap(ifile->width, ifile->height, line, plane, ifile->file_data_type, + ifile->file_color_mode, (const imbyte*)ifile->line_buffer, + ifile->user_color_mode, (imbyte*)data); + else + iDoFillData(ifile->width, ifile->height, line, plane, + ifile->file_color_mode, (const imbyte*)ifile->line_buffer, + ifile->user_color_mode, (imbyte*)data); + break; + case IM_USHORT: + if (convert2bitmap) + iDoFillDataBitmap(ifile->width, ifile->height, line, plane, ifile->file_data_type, + ifile->file_color_mode, (const imushort*)ifile->line_buffer, + ifile->user_color_mode, (imbyte*)data); + else + iDoFillData(ifile->width, ifile->height, line, plane, + ifile->file_color_mode, (const imushort*)ifile->line_buffer, + ifile->user_color_mode, (imushort*)data); + break; + case IM_INT: + if (convert2bitmap) + iDoFillDataBitmap(ifile->width, ifile->height, line, plane, ifile->file_data_type, + ifile->file_color_mode, (const int*)ifile->line_buffer, + ifile->user_color_mode, (imbyte*)data); + else + iDoFillData(ifile->width, ifile->height, line, plane, + ifile->file_color_mode, (const int*)ifile->line_buffer, + ifile->user_color_mode, (int*)data); + break; + case IM_FLOAT: + if (convert2bitmap) + iDoFillDataBitmap(ifile->width, ifile->height, line, plane, ifile->file_data_type, + ifile->file_color_mode, (const float*)ifile->line_buffer, + ifile->user_color_mode, (imbyte*)data); + else + iDoFillData(ifile->width, ifile->height, line, plane, + ifile->file_color_mode, (const float*)ifile->line_buffer, + ifile->user_color_mode, (float*)data); + break; + case IM_CFLOAT: + if (convert2bitmap) + iDoFillDataBitmap(ifile->width, ifile->height, line, plane, ifile->file_data_type, + ifile->file_color_mode, (const double*)ifile->line_buffer, + ifile->user_color_mode, (imbyte*)data); + else + iDoFillData(ifile->width, ifile->height, line, plane, + ifile->file_color_mode, (const imcfloat*)ifile->line_buffer, + ifile->user_color_mode, (imcfloat*)data); + break; + } + } +} + +void imFileLineBufferInit(imFile* ifile) +{ + ifile->line_buffer_size = imImageLineSize(ifile->width, ifile->file_color_mode, ifile->file_data_type); + + if (ifile->switch_type && (ifile->file_data_type == IM_FLOAT || ifile->file_data_type == IM_CFLOAT)) + ifile->line_buffer_extra += ifile->line_buffer_size; // double the size at least + + if (ifile->line_buffer_size + ifile->line_buffer_extra > ifile->line_buffer_alloc) + { + ifile->line_buffer_alloc = ifile->line_buffer_size + ifile->line_buffer_extra; + ifile->line_buffer = realloc(ifile->line_buffer, ifile->line_buffer_alloc); + } +} + +int imFileLineBufferCount(imFile* ifile) +{ + int count = ifile->height; + if (!imColorModeIsPacked(ifile->file_color_mode)) + { + if (imColorModeHasAlpha(ifile->file_color_mode) && imColorModeHasAlpha(ifile->user_color_mode)) + count *= imColorModeDepth(ifile->file_color_mode); + else + count *= imColorModeDepth(imColorModeSpace(ifile->file_color_mode)); + } + return count; +} + +void imFileLineBufferInc(imFile* ifile, int *row, int *plane) +{ + if (!imColorModeIsPacked(ifile->file_color_mode)) + { + if (*row == ifile->height-1) + { + *row = 0; + (*plane)++; + return; + } + } + + (*row)++; +} + +int imFileCheckConversion(imFile* ifile) +{ + if ((ifile->file_color_mode & 0x3FF) == (ifile->user_color_mode & 0x3FF) && // compare only packing, alpha and color space + ifile->file_data_type == ifile->user_data_type) + return 1; + + int user_color_space = imColorModeSpace(ifile->user_color_mode); + int file_color_space = imColorModeSpace(ifile->file_color_mode); + + // NO color space conversion if file is not packed. + if(user_color_space != file_color_space && + imColorModeDepth(file_color_space) > 1 && + !imColorModeIsPacked(ifile->file_color_mode)) + return 0; + + if (ifile->is_new) + { + // (writing) from data to file + + // NO data type conversions when writing. + if (ifile->file_data_type != ifile->user_data_type) + return 0; + + // NO color space conversions when writing. + // If there is a necessary conversion the format driver will do it. + if (user_color_space != file_color_space) + return 0; + } + else + { + // (reading) from file to data + + // Data type conversions only to byte + if (ifile->file_data_type != ifile->user_data_type && + ifile->user_data_type != IM_BYTE) + return 0; + } + + return 1; +} diff --git a/im/src/im_fileraw.cpp b/im/src/im_fileraw.cpp new file mode 100755 index 0000000..91be826 --- /dev/null +++ b/im/src/im_fileraw.cpp @@ -0,0 +1,66 @@ +/** \file + * \brief RAW File Format Open/New Functions + * + * See Copyright Notice in im_lib.h + * $Id: im_fileraw.cpp,v 1.3 2009/09/10 17:33:35 scuri Exp $ + */ + +#include "im.h" +#include "im_image.h" +#include "im_util.h" +#include "im_counter.h" +#include "im_raw.h" +#include "im_format.h" +#include "im_format_raw.h" + +#include +#include + + +imFile* imFileOpenRaw(const char* file_name, int *error) +{ + assert(file_name); + + imFormat* iformat = imFormatInitRAW(); + imFileFormatBase* ifileformat = iformat->Create(); + *error = ifileformat->Open(file_name); + if (*error) + { + delete ifileformat; + return NULL; + } + + imFileClear(ifileformat); + + ifileformat->attrib_table = new imAttribTable(599); + + ifileformat->counter = imCounterBegin(file_name); + + return ifileformat; +} + +imFile* imFileNewRaw(const char* file_name, int *error) +{ + assert(file_name); + + imFormat* iformat = imFormatInitRAW(); + imFileFormatBase* ifileformat = iformat->Create(); + *error = ifileformat->New(file_name); + if (*error) + { + delete ifileformat; + return NULL; + } + + imFileClear(ifileformat); + + ifileformat->is_new = 1; + ifileformat->image_count = 0; + ifileformat->compression[0] = 0; + + ifileformat->attrib_table = new imAttribTable(101); + + ifileformat->counter = imCounterBegin(file_name); + + return ifileformat; +} diff --git a/im/src/im_format.cpp b/im/src/im_format.cpp new file mode 100755 index 0000000..d389743 --- /dev/null +++ b/im/src/im_format.cpp @@ -0,0 +1,299 @@ +/** \file + * \brief File Format Access + * + * See Copyright Notice in im_lib.h + * $Id: im_format.cpp,v 1.2 2008/12/03 15:45:34 scuri Exp $ + */ + + +#include +#include +#include +#include +#include + +#include "im.h" +#include "im_format.h" +#include "im_util.h" + + +static imFormat* iFormatList[50]; +static int iFormatCount = 0; +static int iFormatRegistredAll = 0; + +void imFormatRemoveAll(void) +{ + for (int i = 0; i < iFormatCount; i++) + { + imFormat* iformat = iFormatList[i]; + delete iformat; + iFormatList[i] = NULL; + } + iFormatCount = 0; + iFormatRegistredAll = 0; +} + +void imFormatRegister(imFormat* iformat) +{ + iFormatList[iFormatCount] = iformat; + iFormatCount++; +} + +static imFormat* iFormatFind(const char* format) +{ + assert(format); + + if (!iFormatRegistredAll) + { + imFormatRegisterInternal(); + iFormatRegistredAll = 1; + } + + for (int i = 0; i < iFormatCount; i++) + { + imFormat* iformat = iFormatList[i]; + if (imStrEqual(format, iformat->format)) + return iformat; + } + return NULL; +} + +void imFormatList(char** format_list, int *format_count) +{ + assert(format_list); + assert(format_count); + + if (!iFormatRegistredAll) + { + imFormatRegisterInternal(); + iFormatRegistredAll = 1; + } + + static char format_list_buffer[50][50]; + + *format_count = iFormatCount; + for (int i = 0; i < iFormatCount; i++) + { + imFormat* iformat = iFormatList[i]; + strcpy(format_list_buffer[i], iformat->format); + format_list[i] = format_list_buffer[i]; + } +} + +int imFormatInfo(const char* format, char* desc, char* ext, int *can_sequence) +{ + imFormat* iformat = iFormatFind(format); + if (!iformat) return IM_ERR_FORMAT; + + if (desc) strcpy(desc, iformat->desc); + if (ext) strcpy(ext, iformat->ext); + if (can_sequence) *can_sequence = iformat->can_sequence; + + return IM_ERR_NONE; +} + +int imFormatCompressions(const char* format, char** comp, int *comp_count, int color_mode, int data_type) +{ + imFormat* iformat = iFormatFind(format); + if (!iformat) return IM_ERR_FORMAT; + + int count = 0; + + static char comp_buffer[50][50]; + + for (int i = 0; i < iformat->comp_count; i++) + { + if (color_mode == -1 || data_type == -1 || + iformat->CanWrite(iformat->comp[i], color_mode, data_type) == IM_ERR_NONE) + { + strcpy(comp_buffer[count], iformat->comp[i]); + comp[count] = comp_buffer[count]; + count++; + } + } + + *comp_count = count; + + return IM_ERR_NONE; +} + +int imFormatCanWriteImage(const char* format, const char* compression, int color_mode, int data_type) +{ + assert(format); + + imFormat* iformat = iFormatFind(format); + if (!iformat) return IM_ERR_FORMAT; + + int error = iformat->CanWrite(compression, color_mode, data_type); + return error; +} + +static char* utlFileGetExt(const char *file_name) +{ + int len = strlen(file_name); + + // Starts at the last character + int offset = len - 1; + while (offset != 0) + { + // if found a path separator, no extension found + if (file_name[offset] == '\\' || file_name[offset] == '/') + return NULL; + + if (file_name[offset] == '.') + { + offset++; + break; + } + + offset--; + } + + // if at the first character, no extension found + if (offset == 0) + return NULL; + + int ext_size = len - offset + 1; + char* file_ext = (char*)malloc(ext_size); + + for (int i = 0; i < ext_size-1; i++) + file_ext[i] = (char)tolower(file_name[i+offset]); + file_ext[ext_size-1] = 0; + + return file_ext; +} + +imFileFormatBase* imFileFormatBaseOpen(const char* file_name, int *error) +{ + int i; + + assert(file_name); + assert(error); + + if (!iFormatRegistredAll) + { + imFormatRegisterInternal(); + iFormatRegistredAll = 1; + } + + int* ext_mark = new int [iFormatCount]; + memset(ext_mark, 0, sizeof(int)*iFormatCount); + + // Search for the extension first, this usually is going to speed the search + char* extension = utlFileGetExt(file_name); + if (extension) + { + for(i = 0; i < iFormatCount; i++) + { + imFormat* iformat = iFormatList[i]; + + if (strstr(iformat->ext, extension) != NULL) + { + ext_mark[i] = 1; // Mark this format to avoid testing it again in the next phase + + imFileFormatBase* ifileformat = iformat->Create(); + *error = ifileformat->Open(file_name); + if (*error != IM_ERR_NONE && *error != IM_ERR_FORMAT) // Error situation that must abort + { // Only IM_ERR_FORMAT is a valid error here + free(extension); + delete [] ext_mark; + delete ifileformat; + return NULL; + } + else if (*error == IM_ERR_NONE) // Sucessfully oppened the file + { + free(extension); + delete [] ext_mark; + return ifileformat; + } + } + } + + free(extension); + } + + // If the search did not work, try all the formats + // except those already tested. + + for(i = 0; i < iFormatCount; i++) + { + if (!ext_mark[i]) + { + imFormat* iformat = iFormatList[i]; + imFileFormatBase* ifileformat = iformat->Create(); + *error = ifileformat->Open(file_name); + if (*error != IM_ERR_NONE && *error != IM_ERR_FORMAT) // Error situation that must abort + { // Only IM_ERR_FORMAT is a valid error here + delete [] ext_mark; + delete ifileformat; + return NULL; + } + else if (*error == IM_ERR_NONE) // Sucessfully oppened the file + { + delete [] ext_mark; + return ifileformat; + } + } + } + + *error = IM_ERR_FORMAT; + delete [] ext_mark; + return NULL; +} + +imFileFormatBase* imFileFormatBaseOpenAs(const char* file_name, const char* format, int *error) +{ + assert(file_name); + assert(format); + assert(error); + + if (!iFormatRegistredAll) + { + imFormatRegisterInternal(); + iFormatRegistredAll = 1; + } + + imFormat* iformat = iFormatFind(format); + if (!format) + { + *error = IM_ERR_FORMAT; + return NULL; + } + + imFileFormatBase* ifileformat = iformat->Create(); + *error = ifileformat->Open(file_name); + if (*error != IM_ERR_NONE && *error != IM_ERR_FORMAT) // Error situation that must abort + { + delete ifileformat; + return NULL; + } + else if (*error == IM_ERR_NONE) // Sucessfully oppened the file + return ifileformat; + + *error = IM_ERR_FORMAT; + return NULL; +} + +imFileFormatBase* imFileFormatBaseNew(const char* file_name, const char* format, int *error) +{ + assert(file_name); + assert(format); + assert(error); + + imFormat* iformat = iFormatFind(format); + if (!iformat) + { + *error = IM_ERR_FORMAT; + return NULL; + } + + imFileFormatBase* ifileformat = iformat->Create(); + *error = ifileformat->New(file_name); + if (*error) + { + delete ifileformat; + return NULL; + } + + return ifileformat; +} diff --git a/im/src/im_format_all.cpp b/im/src/im_format_all.cpp new file mode 100755 index 0000000..c10b30a --- /dev/null +++ b/im/src/im_format_all.cpp @@ -0,0 +1,34 @@ +/** \file + * \brief Register all the internal File Format Classes + * + * See Copyright Notice in im_lib.h + * $Id: im_format_all.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + + +#include +#include +#include +#include + +#include "im.h" +#include "im_format.h" +#include "im_format_all.h" + +void imFormatRegisterInternal(void) +{ + // IMPORTANT: RAW format is not registered. + + // The internal formats registration + imFormatRegisterGIF(); + imFormatRegisterBMP(); + imFormatRegisterRAS(); + imFormatRegisterICO(); + imFormatRegisterPNM(); + imFormatRegisterKRN(); + imFormatRegisterLED(); + imFormatRegisterSGI(); + imFormatRegisterPCX(); + imFormatRegisterTGA(); +} + diff --git a/im/src/im_format_bmp.cpp b/im/src/im_format_bmp.cpp new file mode 100755 index 0000000..5cfe013 --- /dev/null +++ b/im/src/im_format_bmp.cpp @@ -0,0 +1,949 @@ +/** \file + * \brief BMP - Windows Device Independent Bitmap + * + * See Copyright Notice in im_lib.h + * $Id: im_format_bmp.cpp,v 1.4 2009/10/01 14:15:47 scuri Exp $ + */ + +#include "im_format.h" +#include "im_format_all.h" +#include "im_util.h" +#include "im_counter.h" + +#include "im_binfile.h" + +#include +#include +#include + + +#define BMP_ID 0x4d42 /* BMP "magic" number */ + +#define BMP_COMPRESS_RGB 0L /* No compression */ +#define BMP_COMPRESS_RLE8 1L /* 8 bits per pixel compression */ +#define BMP_COMPRESS_RLE4 2L /* 4 bits per pixel compression */ +#define BMP_BITFIELDS 3L /* no compression, palette is mask for 16 and 32 bits images */ + +/* State-machine definitions */ +#define BMP_READING 0 /* General READING mode */ +#define BMP_ENCODING 1 /* Encoding same-color pixel runs */ +#define BMP_ABSMODE 2 /* Absolute-mode encoding */ +#define BMP_SINGLE 3 /* Encoding short absolute-mode runs */ +#define BMP_ENDOFLINE 4 /* End of scan line detected */ + +#define BMP_LSN(value) (unsigned char)((value) & 0x0f) /* Least-significant nibble */ +#define BMP_MSN(value) (unsigned char)(((value) & 0xf0) >> 4) /* Most-significant nibble */ + + +/* File Header Structure. + * 2 Type; File Type Identifier + * 4 FileSize; Size of File + * 2 Reserved1; Reserved (should be 0) + * 2 Reserved2; Reserved (should be 0) + * 4 Offset; Offset to bitmap data + * 14 TOTAL */ + +/* Information Header Structure. + * 4 Size; Size of Remaining Header + * 4 Width; Width of Bitmap in Pixels + * 4 Height; Height of Bitmap in Pixels + * 2 Planes; Number of Planes + * 2 BitCount; Bits Per Pixel + * 4 Compression; Compression Scheme + * 4 SizeImage; Size of bitmap + * 4 XPelsPerMeter; Horz. Resolution in Pixels/Meter + * 4 YPelsPerMeter; Vert. Resolution in Pixels/Meter + * 4 ClrUsed; Number of Colors in Color Table + * 4 ClrImportant; Number of Important Colors + * 40 TOTAL V3 + * 4 RedMask; + * 4 GreenMask; + * 4 BlueMask; + * 4 AlphaMask; + * 4 CSType; + * 12 ciexyzRed(x, y, z); [3*FXPT2DOT30] + * 12 ciexyzGreen(x, y, z); " + * 12 ciexyzBlue(x, y, z); " + * 4 GammaRed; + * 4 GammaGreen; + * 4 GammaBlue; + * 108 TOTAL V4 (not supported here) + * 4 Intent; + * 4 ProfileData; + * 4 ProfileSize; + * 4 Reserved; + * 120 TOTAL V5 (not supported here) + */ + +/* RGB Color Quadruple Structure. */ +/* 1 rgbBlue; Blue Intensity Value */ +/* 1 rgbGreen; Green Intensity Value */ +/* 1 rgbRed; Red Intensity Value */ +/* 1 rgbReserved; Reserved (should be 0) */ +/* 4 */ + +static int iBMPDecodeScanLine(imBinFile* handle, unsigned char* DecodedBuffer, int Width) +{ + unsigned char runCount; /* Number of pixels in the run */ + unsigned char runValue; /* Value of pixels in the run */ + int Index = 0; /* The index of DecodedBuffer */ + int cont = 1, remain; + + while (cont) + { + imBinFileRead(handle, &runCount, 1, 1); /* Number of pixels in the run */ + imBinFileRead(handle, &runValue, 1, 1); /* Value of pixels in the run */ + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (runCount) + { + while (runCount-- && Index < Width) + DecodedBuffer[Index++] = runValue; + } + else /* Abssolute Mode or Escape Code */ + { + switch(runValue) + { + case 0: /* End of Scan Line Escape Code */ + case 1: /* End of Bitmap Escape Code */ + cont = 0; + break; + case 2: /* Delta Escape Code (ignored) */ + imBinFileRead(handle, &runCount, 1, 1); + imBinFileRead(handle, &runCount, 1, 1); + break; + default: /* Abssolute Mode */ + remain = runValue % 2; + runValue = (unsigned char)(Index + runValue < (Width + 1)? runValue: (Width - 1) - Index); + imBinFileRead(handle, DecodedBuffer + Index, runValue, 1); + if (remain) + imBinFileSeekOffset(handle, 1); + Index += runValue; + } + } + + if (imBinFileError(handle) || Index > Width) + return IM_ERR_ACCESS; + } + + return IM_ERR_NONE; +} + +static int iBMPEncodeScanLine(unsigned char* EncodedBuffer, unsigned char* sl, int np) +{ + int slx = 0; /* Scan line index */ + int state = BMP_READING; /* State machine control variable */ + int count = 0; /* Used by various states */ + unsigned char pixel; /* Holds single pixels from sl */ + int done = 0; /* Ends while loop when true */ + int oldcount, oldslx; /* Copies of count and slx */ + int BufSize = 0; + + while (!done) + { + switch (state) + { + case BMP_READING: + /* Input: */ + /* np == number of pixels in scan line */ + /* sl == scan line */ + /* sl[slx] == next pixel to process */ + + if (slx >= np) /* No pixels left */ + state = BMP_ENDOFLINE; + else if (slx == np - 1) /* One pixel left */ + { + count = 1; + state = BMP_SINGLE; + } + else if (sl[slx] == sl[slx + 1]) /* Next 2 pixels equal */ + state = BMP_ENCODING; + else /* Next 2 pixels differ */ + state = BMP_ABSMODE; + + break; + case BMP_ENCODING: + /* Input: */ + /* slx <= np - 2 (at least 2 pixels in run) */ + /* sl[slx] == first pixel of run */ + /* sl[slx] == sl[slx + 1] */ + + count = 2; + pixel = sl[slx]; + slx += 2; + + while ((slx < np) && (pixel == sl[slx]) && (count < 255)) + { + count++; + slx++; + } + + *EncodedBuffer++ = (unsigned char)count; + BufSize++; + *EncodedBuffer++ = pixel; + BufSize++; + state = BMP_READING; + + break; + case BMP_ABSMODE: + /* Input: */ + /* slx <= np - 2 (at least 2 pixels in run) */ + /* sl[slx] == first pixel of run */ + /* sl[slx] != sl[slx + 1] */ + + oldslx = slx; + count = 2; + slx += 2; + + /* Compute number of bytes in run */ + while ((slx < np) && (sl[slx] != sl[slx - 1]) && (count < 255)) + { + count++; + slx++; + } + + /* If same-color run found, back up one byte */ + if ((slx < np) && (sl[slx] == sl[slx - 1])) + if (count > 1) + count--; + + slx = oldslx; /* Restore scan-line index */ + + /* Output short absolute runs of less than 3 pixels */ + if (count < 3 ) + state = BMP_SINGLE; + else + { + /* Output absolute-mode run */ + *EncodedBuffer++ = 0; + BufSize++; + *EncodedBuffer++ = (unsigned char)count; + BufSize++; + oldcount = count; + + while (count > 0) + { + *EncodedBuffer++ = sl[slx]; + BufSize++; + slx++; + count--; + } + + if (oldcount % 2) + { + *EncodedBuffer++ = 0; + BufSize++; + } + + state = BMP_READING; + } + break; + + case BMP_SINGLE: + /* Input: */ + /* count == number of pixels to output */ + /* slx < np */ + /* sl[slx] == first pixel of run */ + /* sl[slx] != sl[slx + 1] */ + + while (count > 0) + { + *EncodedBuffer++ = (unsigned char)1; + BufSize++; + *EncodedBuffer++ = sl[slx]; + BufSize++; + slx++; + count--; + } + + state = BMP_READING; + + break; + case BMP_ENDOFLINE: + *EncodedBuffer++ = (unsigned char)0; + BufSize++; + *EncodedBuffer++ = (unsigned char)0; + BufSize++; + done = 1; + + break; + default: + break; + } + } + + return BufSize; +} + +static const char* iBMPCompTable[2] = +{ + "NONE", + "RLE" +}; + +class imFileFormatBMP: public imFileFormatBase +{ + imBinFile* handle; /* the binary file handle */ + unsigned short bpp; /* number of bits per pixel */ + unsigned int offset, /* image data offset, used only when reading */ + comp_type; /* bmp compression information */ + int is_os2, /* indicates an os2 1.x BMP */ + line_raw_size; // raw line size + unsigned int rmask, gmask, bmask, + roff, goff, boff; /* pixel bit mask control when reading 16 and 32 bpp images */ + + int ReadPalette(); + int WritePalette(); + void FixRGBOrder(); + +public: + imFileFormatBMP(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatBMP() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatBMP: public imFormat +{ +public: + imFormatBMP() + :imFormat("BMP", + "Windows Device Independent Bitmap", + "*.bmp;*.dib;", + iBMPCompTable, + 2, + 0) + {} + ~imFormatBMP() {} + + imFileFormatBase* Create(void) const { return new imFileFormatBMP(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + + +void imFormatRegisterBMP(void) +{ + imFormatRegister(new imFormatBMP()); +} + +int imFileFormatBMP::Open(const char* file_name) +{ + unsigned short id; + unsigned int dword; + + /* opens the binary file for reading with intel byte order */ + handle = imBinFileOpen(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_LITTLEENDIAN); + + /* reads the BMP format identifier */ + imBinFileRead(handle, &id, 1, 2); + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + if (id != BMP_ID) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + /* jump 8 bytes (file size,reserved) */ + imBinFileSeekOffset(handle, 8); + + /* reads the image offset */ + imBinFileRead(handle, &this->offset, 1, 4); + + /* reads the header size */ + imBinFileRead(handle, &dword, 1, 4); + + if (dword == 40) + this->is_os2 = 0; + else if (dword == 12) + this->is_os2 = 1; + else + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + this->image_count = 1; + + /* reads the compression information */ + if (this->is_os2) + { + this->comp_type = BMP_COMPRESS_RGB; + strcpy(this->compression, "NONE"); + } + else + { + imBinFileSeekOffset(handle, 12); + + imBinFileRead(handle, &this->comp_type, 1, 4); + + switch (this->comp_type) + { + case BMP_COMPRESS_RGB: + strcpy(this->compression, "NONE"); + break; + case BMP_COMPRESS_RLE8: + strcpy(this->compression, "RLE"); + break; + case BMP_COMPRESS_RLE4: + default: + imBinFileClose(handle); + return IM_ERR_COMPRESS; + } + + imBinFileSeekOffset(handle, -16); + } + + return IM_ERR_NONE; +} + +int imFileFormatBMP::New(const char* file_name) +{ + /* opens the binary file for writing with intel byte order */ + handle = imBinFileNew(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_LITTLEENDIAN); + + this->image_count = 1; + + return IM_ERR_NONE; +} + +void imFileFormatBMP::Close() +{ + imBinFileClose(handle); +} + +void* imFileFormatBMP::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +int imFileFormatBMP::ReadImageInfo(int index) +{ + (void)index; + unsigned int dword; + + this->file_data_type = IM_BYTE; + + if (this->is_os2) + { + short word; + + /* reads the image width */ + imBinFileRead(handle, &word, 1, 2); + this->width = (int)word; + + /* reads the image height */ + imBinFileRead(handle, &word, 1, 2); + this->height = (int)((word < 0)? -word: word); + + dword = word; // it will be used later + } + else + { + /* reads the image width */ + imBinFileRead(handle, &dword, 1, 4); + this->width = (int)dword; + + /* reads the image height */ + imBinFileRead(handle, &dword, 1, 4); + this->height = (int)dword; + if (this->height < 0) + this->height = -this->height; + } + + /* jump 2 bytes (planes) */ + imBinFileSeekOffset(handle, 2); + + /* reads the number of bits per pixel */ + imBinFileRead(handle, &this->bpp, 1, 2); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + // sanity check + if (this->bpp != 1 && this->bpp != 4 && this->bpp != 8 && + this->bpp != 16 && this->bpp != 24 && this->bpp != 32) + return IM_ERR_DATA; + + // another sanity check + if (this->comp_type == BMP_BITFIELDS && this->bpp != 16 && this->bpp != 32) + return IM_ERR_DATA; + + if (this->bpp > 8) + { + this->file_color_mode = IM_RGB; + this->file_color_mode |= IM_PACKED; + } + else + { + this->palette_count = 1 << bpp; + this->file_color_mode = IM_MAP; + } + + if (this->bpp < 8) + this->convert_bpp = this->bpp; + + if (this->bpp == 32) + this->file_color_mode |= IM_ALPHA; + + if (dword < 0) + this->file_color_mode |= IM_TOPDOWN; + + this->line_raw_size = imFileLineSizeAligned(this->width, this->bpp, 4); + this->line_buffer_extra = 4; // room enough for padding + + if (this->is_os2) + { + if (this->bpp < 24) + return ReadPalette(); + + return IM_ERR_NONE; + } + + /* we already read the compression information */ + /* jump 8 bytes (compression, image size) */ + imBinFileSeekOffset(handle, 8); + + /* read the x resolution */ + imBinFileRead(handle, &dword, 1, 4); + float xres = (float)dword / 100.0f; + + /* read the y resolution */ + imBinFileRead(handle, &dword, 1, 4); + float yres = (float)dword / 100.0f; + + if (xres && yres) + { + imAttribTable* attrib_table = AttribTable(); + attrib_table->Set("XResolution", IM_FLOAT, 1, &xres); + attrib_table->Set("YResolution", IM_FLOAT, 1, &yres); + attrib_table->Set("ResolutionUnit", IM_BYTE, -1, "DPC"); + } + + if (this->bpp <= 8) + { + /* reads the number of colors used */ + imBinFileRead(handle, &dword, 1, 4); + + /* updates the palette_count based on the number of colors used */ + if (dword != 0 && dword < (unsigned int)this->palette_count) + this->palette_count = dword; + + /* jump 4 bytes (important colors) */ + imBinFileSeekOffset(handle, 4); + } + else + { + /* jump 8 bytes (used colors, important colors) */ + imBinFileSeekOffset(handle, 8); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->bpp <= 8) + return ReadPalette(); + + if (this->bpp == 16 || this->bpp == 32) + { + if (this->comp_type == BMP_BITFIELDS) + { + unsigned int Mask; + unsigned int PalMask[3]; + + imBinFileRead(handle, PalMask, 3, 4); + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + this->roff = 0; + this->rmask = Mask = PalMask[0]; + while (!(Mask & 0x01) && (Mask != 0)) + {Mask >>= 1; this->roff++;} + + this->goff = 0; + this->gmask = Mask = PalMask[1]; + while (!(Mask & 0x01) && (Mask != 0)) + {Mask >>= 1; this->goff++;} + + this->boff = 0; + this->bmask = Mask = PalMask[2]; + while (!(Mask & 0x01) && (Mask != 0)) + {Mask >>= 1; this->boff++;} + } + else + { + if (this->bpp == 16) + { + this->rmask = 0x7C00; + this->roff = 10; + + this->gmask = 0x03E0; + this->goff = 5; + + this->bmask = 0x001F; + this->boff = 0; + } + else + { + this->rmask = 0x00FF0000; + this->roff = 16; + + this->gmask = 0x0000FF00; + this->goff = 8; + + this->bmask = 0x000000FF; + this->boff = 0; + } + } + } + + return IM_ERR_NONE; +} + +int imFileFormatBMP::WriteImageInfo() +{ + // force bottom up orientation + this->file_data_type = IM_BYTE; + this->file_color_mode = imColorModeSpace(this->user_color_mode); + + if (imStrEqual(this->compression, "RLE")) + this->comp_type = BMP_COMPRESS_RLE8; + else + this->comp_type = BMP_COMPRESS_RGB; + + if (this->file_color_mode == IM_BINARY) + { + this->bpp = 1; + this->convert_bpp = 1; + } + else if (this->file_color_mode == IM_RGB) + { + this->file_color_mode |= IM_PACKED; + this->bpp = 24; + + if (imColorModeHasAlpha(this->user_color_mode)) + { + this->file_color_mode |= IM_ALPHA; + this->bpp = 32; + + this->rmask = 0x00FF0000; + this->roff = 16; + + this->gmask = 0x0000FF00; + this->goff = 8; + + this->bmask = 0x000000FF; + this->boff = 0; + } + } + else + this->bpp = 8; + + this->line_raw_size = imFileLineSizeAligned(this->width, this->bpp, 4); + this->line_buffer_extra = 4; // room enough for padding + + if (this->comp_type == BMP_COMPRESS_RLE8) + { + // allocates more than enough since compression algoritm can be ineficient + this->line_buffer_extra += 2*this->line_raw_size; + } + + /* writes the BMP file header */ + int palette_size = (this->bpp > 8)? 0: palette_count*4; + short word_value = BMP_ID; + imBinFileWrite(handle, &word_value, 1, 2); /* identifier */ + unsigned int dword_value = 14 + 40 + palette_size + line_raw_size * this->height; + imBinFileWrite(handle, &dword_value, 1, 4); /* file size for uncompressed images */ + word_value = 0; + imBinFileWrite(handle, &word_value, 1, 2); /* reserved 1 */ + imBinFileWrite(handle, &word_value, 1, 2); /* reserved 2 */ + dword_value = 14 + 40 + palette_size; + imBinFileWrite(handle, &dword_value, 1, 4); /* data offset */ + + /* writes the BMP info header */ + + dword_value = 40; + imBinFileWrite(handle, &dword_value, 1, 4); /* header size */ + dword_value = this->width; + imBinFileWrite(handle, &dword_value, 1, 4); /* width */ + dword_value = this->height; + imBinFileWrite(handle, &dword_value, 1, 4); /* height */ + word_value = 1; + imBinFileWrite(handle, &word_value, 1, 2); /* planes */ + word_value = this->bpp; + imBinFileWrite(handle, &word_value, 1, 2); /* bpp */ + dword_value = this->comp_type; + imBinFileWrite(handle, &dword_value, 1, 4); /* compression */ + dword_value = line_raw_size * this->height; + imBinFileWrite(handle, &dword_value, 1, 4); /* image size */ + + imAttribTable* attrib_table = AttribTable(); + unsigned int xppm = 0, yppm = 0; + + const void* attrib_data = attrib_table->Get("ResolutionUnit"); + if (attrib_data) + { + char* res_unit = (char*)attrib_data; + + float* xres = (float*)attrib_table->Get("XResolution"); + float* yres = (float*)attrib_table->Get("YResolution"); + + if (xres && yres) + { + if (imStrEqual(res_unit, "DPI")) + { + xppm = (unsigned int)(*xres * 100. / 2.54); + yppm = (unsigned int)(*yres * 100. / 2.54); + } + else + { + xppm = (unsigned int)(*xres * 100.); + yppm = (unsigned int)(*yres * 100.); + } + } + } + + imBinFileWrite(handle, &xppm, 1, 4); /* x dpm */ + imBinFileWrite(handle, &yppm, 1, 4); /* y dpm */ + + dword_value = (this->bpp > 8)? 0: this->palette_count; + imBinFileWrite(handle, &dword_value, 1, 4); /* colors used */ + dword_value = 0; + imBinFileWrite(handle, &dword_value, 1, 4); /* colors important (all) */ + + /* tests if everything was ok */ + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->bpp < 24) + return WritePalette(); + + return IM_ERR_NONE; +} + +int imFileFormatBMP::ReadPalette() +{ + int nc; + if (this->is_os2) + nc = 3; + else + nc = 4; + + /* reads the color palette */ + unsigned char bmp_colors[256 * 4]; + imBinFileRead(handle, bmp_colors, this->palette_count * nc, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + /* convert the color map to the IM format */ + for (int c = 0; c < this->palette_count; c++) + { + int i = c * nc; + this->palette[c] = imColorEncode(bmp_colors[i + 2], + bmp_colors[i + 1], + bmp_colors[i]); + } + + return IM_ERR_NONE; +} + +int imFileFormatBMP::WritePalette() +{ + unsigned char bmp_colors[256 * 4]; + + /* convert the color map to the IM format */ + for (int c = 0; c < this->palette_count; c++) + { + int i = c * 4; + imColorDecode(&bmp_colors[i + 2], &bmp_colors[i + 1], &bmp_colors[i], this->palette[c]); + bmp_colors[i + 3] = 0; + } + + /* writes the color palette */ + imBinFileWrite(handle, bmp_colors, this->palette_count * 4, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +void imFileFormatBMP::FixRGBOrder() +{ + int x; + + switch (this->bpp) + { + case 16: + { + /* inverts the WORD values if not intel */ + if (imBinCPUByteOrder() == IM_BIGENDIAN) + imBinSwapBytes2(this->line_buffer, this->width); + + imushort* word_data = (imushort*)this->line_buffer; + imbyte* byte_data = (imbyte*)this->line_buffer; + + // from end to start + for (x = this->width-1; x >= 0; x--) + { + imushort word_value = word_data[x]; + int c = x*3; + byte_data[c] = (imbyte)((((this->rmask & word_value) >> this->roff) * 255) / (this->rmask >> this->roff)); + byte_data[c+1] = (imbyte)((((this->gmask & word_value) >> this->goff) * 255) / (this->gmask >> this->goff)); + byte_data[c+2] = (imbyte)((((this->bmask & word_value) >> this->boff) * 255) / (this->bmask >> this->boff)); + } + } + break; + case 32: + { + /* inverts the DWORD values if not intel */ + if (imBinCPUByteOrder() == IM_BIGENDIAN) + imBinSwapBytes4(this->line_buffer, this->width); + + unsigned int* dword_data = (unsigned int*)this->line_buffer; + imbyte* byte_data = (imbyte*)this->line_buffer; + + for (x = 0; x < this->width; x++) + { + unsigned int dword_value = dword_data[x]; + int c = x*4; + byte_data[c] = (imbyte)((this->rmask & dword_value) >> this->roff); + byte_data[c+1] = (imbyte)((this->gmask & dword_value) >> this->goff); + byte_data[c+2] = (imbyte)((this->bmask & dword_value) >> this->boff); + byte_data[c+3] = (imbyte)((0xFF000000 & dword_value) >> 24); + } + } + break; + default: // 24 + { + imbyte* byte_data = (imbyte*)this->line_buffer; + for (x = 0; x < this->width; x++) + { + int c = x*3; + imbyte temp = byte_data[c]; // swap R and B + byte_data[c] = byte_data[c+2]; + byte_data[c+2] = temp; + } + } + break; + } +} + +int imFileFormatBMP::ReadImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Reading BMP..."); + + /* jump to the begin of image data */ + imBinFileSeekTo(handle, this->offset); + + for (int row = 0; row < this->height; row++) + { + /* read and decompress the data */ + if (this->comp_type == BMP_COMPRESS_RGB) + { + imBinFileRead(handle, this->line_buffer, this->line_raw_size, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + else + { + if (iBMPDecodeScanLine(handle, (imbyte*)this->line_buffer, this->width) == IM_ERR_ACCESS) + return IM_ERR_ACCESS; + } + + if (this->bpp > 8) + FixRGBOrder(); + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int imFileFormatBMP::WriteImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Writing BMP..."); + + imbyte* compressed_buffer = NULL; + if (this->comp_type == BMP_COMPRESS_RLE8) // point to the extra buffer + compressed_buffer = (imbyte*)this->line_buffer + this->line_buffer_size+4; + + for (int row = 0; row < this->height; row++) + { + imFileLineBufferWrite(this, data, row, 0); + + if (this->bpp > 8) + FixRGBOrder(); + + if (this->comp_type == BMP_COMPRESS_RGB) + { + imBinFileWrite(handle, this->line_buffer, this->line_raw_size, 1); + } + else + { + int compressed_size = iBMPEncodeScanLine(compressed_buffer, (imbyte*)this->line_buffer, this->width); + imBinFileWrite(handle, compressed_buffer, compressed_size, 1); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int imFormatBMP::CanWrite(const char* compression, int color_mode, int data_type) const +{ + int color_space = imColorModeSpace(color_mode); + + if (color_space == IM_YCBCR || color_space == IM_LAB || + color_space == IM_LUV || color_space == IM_XYZ || + color_space == IM_CMYK) + return IM_ERR_DATA; + + if (data_type != IM_BYTE) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "NONE") && !imStrEqual(compression, "RLE")) + return IM_ERR_COMPRESS; + + if (imStrEqual(compression, "RLE") && (color_space == IM_RGB || color_space == IM_BINARY)) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} diff --git a/im/src/im_format_ecw.cpp b/im/src/im_format_ecw.cpp new file mode 100755 index 0000000..bba99b0 --- /dev/null +++ b/im/src/im_format_ecw.cpp @@ -0,0 +1,385 @@ +/** \file + * \brief ECW - ECW JPEG 2000 + * + * See Copyright Notice in im_lib.h + */ + +#include "im_format.h" +#include "im_util.h" +#include "im_format_ecw.h" +#include "im_counter.h" + +#include +// #include + +#include +#include +#include +#include + +static const char* iECWCompTable[2] = +{ + "ECW", + "JPEG-2000", +}; + +class imFileFormatECW: public imFileFormatBase +{ + NCSFileView *pNCSFileView; +// NCSEcwCompressClient *pClient; + +public: + imFileFormatECW(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatECW() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(){return 0;} // do nothing for now; + int WriteImageData(void* data){(void)data; return 0;} // do nothing for now; +}; + +class imFormatECW: public imFormat +{ +public: + imFormatECW() + :imFormat("ECW", + "ECW JPEG-2000 File Format", + "*.ecw;*.jp2;*.j2k;*.jpc;*.j2c;", + iECWCompTable, + 2, + 0) + {} + ~imFormatECW() {} + + imFileFormatBase* Create(void) const { return new imFileFormatECW(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + +void imFormatRegisterECW(void) +{ + imFormatRegister(new imFormatECW()); +} + +int imFileFormatECW::Open(const char* file_name) +{ + NCSError eError = NCScbmOpenFileView((char*)file_name, &this->pNCSFileView, NULL); + if (eError != NCS_SUCCESS) + { + if (eError == NCS_FILE_OPEN_ERROR || + eError == NCS_FILE_NOT_FOUND || + eError == NCS_FILE_INVALID) + return IM_ERR_OPEN; + else if (eError == NCS_FILE_OPEN_FAILED) + return IM_ERR_FORMAT; + else + return IM_ERR_ACCESS; + } + + NCSFileType fileType = NCScbmGetFileType(this->pNCSFileView); + if (fileType == NCS_FILE_ECW) + strcpy(this->compression, "ECW"); + else if (fileType == NCS_FILE_JP2) + strcpy(this->compression, "JPEG-2000"); + else + return IM_ERR_COMPRESS; + + this->image_count = 1; + + return IM_ERR_NONE; +} + +int imFileFormatECW::New(const char* file_name) +{ + strcpy(this->compression, "JPEG-2000"); + this->image_count = 1; + + (void)file_name; + return IM_ERR_FORMAT; +} + +void imFileFormatECW::Close() +{ + if (this->is_new) + ;// NCSEcwCompressClose(this->pClient); + else + NCScbmCloseFileView(this->pNCSFileView); +} + +void* imFileFormatECW::Handle(int index) +{ + (void)index; + + if (this->is_new) + return NULL; // return (void*)this->pClient; + else + return (void*)this->pNCSFileView; +} + +int imFileFormatECW::ReadImageInfo(int index) +{ + NCSFileViewFileInfoEx *pNCSFileInfo; + imAttribTable* attrib_table = AttribTable(); + (void)index; + + if (NCScbmGetViewFileInfoEx(this->pNCSFileView, &pNCSFileInfo) != NCS_SUCCESS) + return IM_ERR_ACCESS; + + this->width = pNCSFileInfo->nSizeX; + this->height = pNCSFileInfo->nSizeY; + + switch(pNCSFileInfo->eColorSpace) + { + case NCSCS_GREYSCALE: + this->file_color_mode = IM_GRAY; + break; + case NCSCS_YUV: + case NCSCS_sRGB: + this->file_color_mode = IM_RGB; + break; + case NCSCS_YCbCr: + this->file_color_mode = IM_YCBCR; + break; + case NCSCS_MULTIBAND: + /* multiband data, we read only one band */ + this->file_color_mode = IM_GRAY; + attrib_table->Set("MultiBandCount", IM_USHORT, 1, (void*)&pNCSFileInfo->nBands); + break; + default: + return IM_ERR_DATA; + } + + switch(pNCSFileInfo->eCellType) + { + case NCSCT_INT8: + case NCSCT_UINT8: + this->file_data_type = IM_BYTE; + break; + case NCSCT_INT16: + case NCSCT_UINT16: + this->file_data_type = IM_USHORT; + break; + case NCSCT_UINT64: + case NCSCT_INT64: + case NCSCT_UINT32: + case NCSCT_INT32: + // Should be: this->file_data_type = IM_INT; + // but 32bits ints are not supported by the NCScbmReadViewLineBILEx function + this->file_data_type = IM_USHORT; + break; + case NCSCT_IEEE4: + case NCSCT_IEEE8: + this->file_data_type = IM_FLOAT; + break; + default: + return IM_ERR_DATA; + } + + int prec = pNCSFileInfo->pBands->nBits; + if (prec < 8) + this->convert_bpp = -prec; // just expand to 0-255 + + if (prec == 1 && this->file_color_mode == IM_GRAY) + this->file_color_mode = IM_BINARY; + + if (pNCSFileInfo->nBands > imColorModeDepth(this->file_color_mode)) + this->file_color_mode |= IM_ALPHA; + + if (this->file_color_mode != IM_GRAY) + this->file_color_mode |= IM_PACKED; + + this->file_color_mode |= IM_TOPDOWN; + + float float_value = (float)pNCSFileInfo->fOriginX; + attrib_table->Set("OriginX", IM_FLOAT, 1, (void*)&float_value); + + float_value = (float)pNCSFileInfo->fOriginY; + attrib_table->Set("OriginY", IM_FLOAT, 1, (void*)&float_value); + + float_value = (float)pNCSFileInfo->fCWRotationDegrees; + attrib_table->Set("Rotation", IM_FLOAT, 1, (void*)&float_value); + + float_value = (float)pNCSFileInfo->fCellIncrementX; + attrib_table->Set("CellIncrementX", IM_FLOAT, 1, (void*)&float_value); + + float_value = (float)pNCSFileInfo->fCellIncrementY; + attrib_table->Set("CellIncrementY", IM_FLOAT, 1, (void*)&float_value); + + attrib_table->Set("Datum", IM_BYTE, strlen(pNCSFileInfo->szDatum)+1, pNCSFileInfo->szDatum); + attrib_table->Set("Projection", IM_BYTE, strlen(pNCSFileInfo->szProjection)+1, pNCSFileInfo->szProjection); + + switch (pNCSFileInfo->eCellSizeUnits) + { + case ECW_CELL_UNITS_INVALID: + attrib_table->Set("CellUnits", IM_BYTE, 8, "INVALID"); + break; + case ECW_CELL_UNITS_METERS: + attrib_table->Set("CellUnits", IM_BYTE, 7, "METERS"); + break; + case ECW_CELL_UNITS_DEGREES: + attrib_table->Set("CellUnits", IM_BYTE, 7, "DEGREES"); + break; + case ECW_CELL_UNITS_FEET: + attrib_table->Set("CellUnits", IM_BYTE, 5, "FEET"); + break; + case ECW_CELL_UNITS_UNKNOWN: + attrib_table->Set("CellUnits", IM_BYTE, 8, "UNKNOWN"); + break; + } + + float_value = (float)pNCSFileInfo->nCompressionRate; + attrib_table->Set("CompressionRatio", IM_FLOAT, 1, (void*)&float_value); + + return IM_ERR_NONE; +} + +static void iCopyDataBuffer(UINT8 **ppOutputLine, imbyte* line_buffer, int nBands, int view_width, int type_size) +{ + if (nBands > 1) + { + for(int i = 0; i < view_width; i++) + { + for(int j = 0; j < nBands; j++) + { + for(int k = 0; k < type_size; k++) + { + *line_buffer++ = (ppOutputLine[j])[i*type_size + k]; + } + } + } + } + else + memcpy(line_buffer, ppOutputLine[0], nBands*type_size*view_width); +} + +int imFileFormatECW::ReadImageData(void* data) +{ + imAttribTable* attrib_table = AttribTable(); + int i, *attrib_data, view_width, view_height, + nBands = imColorModeDepth(this->file_color_mode); + + // this size is free, can be anything, but we restricted to less than the image size + attrib_data = (int*)attrib_table->Get("ViewWidth"); + view_width = attrib_data? *attrib_data: this->width; + if (view_width > this->width) view_width = this->width; + + attrib_data = (int*)attrib_table->Get("ViewHeight"); + view_height = attrib_data? *attrib_data: this->height; + if (view_height > this->height) view_height = this->height; + + imCounterTotal(this->counter, view_height, "Reading ECW..."); + + { + int xmin, xmax, ymin, ymax, band_start; + + // full image if not defined. + // this size must be inside the image + attrib_data = (int*)attrib_table->Get("ViewXmin"); + xmin = attrib_data? *attrib_data: 0; + if (xmin < 0) xmin = 0; + + attrib_data = (int*)attrib_table->Get("ViewYmin"); + ymin = attrib_data? *attrib_data: 0; + if (ymin < 0) ymin = 0; + + attrib_data = (int*)attrib_table->Get("ViewXmax"); + xmax = attrib_data? *attrib_data: this->width-1; + if (xmax > this->width-1) xmax = this->width-1; + + attrib_data = (int*)attrib_table->Get("ViewYmax"); + ymax = attrib_data? *attrib_data: this->height-1; + if (ymax > this->height-1) ymax = this->height-1; + + band_start = 0; + UINT16* start_plane = (UINT16*)attrib_table->Get("MultiBandSelect"); + if (start_plane) + band_start = *start_plane; + + UINT32 *pBandList = (UINT32*)malloc(sizeof(UINT32)*nBands); + for(i = 0; i < nBands; i++) + pBandList[i] = i+band_start; + + NCSError eError = NCScbmSetFileView(this->pNCSFileView, nBands, pBandList, + xmin, ymin, xmax, ymax, + view_width, view_height); + free(pBandList); + + if( eError != NCS_SUCCESS) + return IM_ERR_DATA; + } + + // this is necessary to fool line buffer management + this->width = view_width; + this->height = view_height; + this->line_buffer_size = imImageLineSize(this->width, this->file_color_mode, this->file_data_type); + + NCSEcwCellType eType = NCSCT_UINT8; + int type_size = 1; + if (this->file_data_type == IM_USHORT) + { + eType = NCSCT_UINT16; + type_size = 2; + } + else if (this->file_data_type == IM_FLOAT) + { + eType = NCSCT_IEEE4; + type_size = 4; + } + UINT8 **ppOutputLine = (UINT8**)malloc(sizeof(UINT8*)*nBands); + UINT8 *ppOutputBuffer = (UINT8*)malloc(type_size*view_width*nBands); + for(i = 0; i < nBands; i++) + ppOutputLine[i] = ppOutputBuffer + i*type_size*view_width; + + for (int row = 0; row < view_height; row++) + { + NCSEcwReadStatus eError = NCScbmReadViewLineBILEx(this->pNCSFileView, eType, (void**)ppOutputLine); + if( eError != NCS_SUCCESS) + { + free(ppOutputLine); + free(ppOutputBuffer); + return IM_ERR_DATA; + } + + iCopyDataBuffer(ppOutputLine, (imbyte*)this->line_buffer, nBands, view_width, type_size); + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + { + free(ppOutputLine); + free(ppOutputBuffer); + return IM_ERR_COUNTER; + } + } + + free(ppOutputLine); + free(ppOutputBuffer); + return IM_ERR_NONE; +} + +int imFormatECW::CanWrite(const char* compression, int color_mode, int data_type) const +{ + (void)compression; + (void)color_mode; + (void)data_type; + return IM_ERR_DATA; + + //int color_space = imColorModeSpace(color_mode); + + //if (color_space != IM_GRAY && color_space != IM_RGB)// && color_space != IM_LUV) + // return IM_ERR_DATA; + // + //if (data_type != IM_BYTE && data_type != IM_USHORT && data_type != IM_FLOAT) + // return IM_ERR_DATA; + + //if (!compression || compression[0] == 0) + // return IM_ERR_NONE; + + //if (!imStrEqual(compression, "JPEG-2000")) + // return IM_ERR_COMPRESS; + + //return IM_ERR_NONE; +} diff --git a/im/src/im_format_gif.cpp b/im/src/im_format_gif.cpp new file mode 100755 index 0000000..caadd0f --- /dev/null +++ b/im/src/im_format_gif.cpp @@ -0,0 +1,1510 @@ +/** \file + * \brief GIF - Graphics Interchange Format + * + * See Copyright Notice in im_lib.h + * $Id: im_format_gif.cpp,v 1.5 2009/08/23 23:57:51 scuri Exp $ + */ + +#include "im_format.h" +#include "im_format_all.h" +#include "im_util.h" +#include "im_counter.h" + +#include "im_binfile.h" + +#include +#include +#include + +static const int InterlacedOffset[4] = { 0, 4, 2, 1 }, /* The way Interlaced image should */ + InterlacedJumps[4] = { 8, 8, 4, 2 }; /* be read - offsets and jumps... */ + +#define GIF_STAMP "GIF" /* First chars in file - GIF stamp. */ +#define GIF_VERSION "89a" /* First chars in file - GIF stamp. */ + +#define GIF_LZ_BITS 12 + +#define GIF_LZ_MAX_CODE 4095 /* Biggest code possible in 12 bits. */ +#define GIF_FLUSH_OUTPUT 4096 /* Impossible code, to signal flush. */ +#define GIF_FIRST_CODE 4097 /* Impossible code, to signal first. */ +#define GIF_NO_SUCH_CODE 4098 /* Impossible code, to signal empty. */ + +#define GIF_HT_KEY_MASK 0x1FFF /* 13bits keys */ +#define GIF_HT_KEY_NUM_BITS 13 /* 13bits keys */ +#define GIF_HT_MAX_KEY 8191 /* 13bits - 1, maximal code possible */ +#define GIF_HT_SIZE 8192 /* 12bits = 4096 or twice as big! */ + +/* GIF89 extension function codes */ +#define COMMENT_EXT_FUNC_CODE 0xFE /* comment */ +#define GRAPHICS_EXT_FUNC_CODE 0xF9 /* graphics control */ +#define PLAINTEXT_EXT_FUNC_CODE 0x01 /* plaintext */ +#define APPLICATION_EXT_FUNC_CODE 0xFF /* application block */ + +/* The 32 bits of the integer are divided into two parts for the key & code: */ +/* 1. The code is 12 bits as our compression algorithm is limited to 12bits */ +/* 2. The key is 12 bits Prefix code + 8 bit new char or 20 bits. */ +#define GIF_HT_GET_KEY(l) (l >> 12) +#define GIF_HT_GET_CODE(l) (l & 0x0FFF) +#define GIF_HT_PUT_KEY(l) (l << 12) +#define GIF_HT_PUT_CODE(l) (l & 0x0FFF) + +struct iGIFData +{ + unsigned char global_colors[256 * 3]; /* global color table if any */ + int global_num_colors, /* global color table number of colors */ + offset, /* image offset */ + step, /* interlaced step */ + interlaced, /* image is interlaced or not */ + screen_width, + screen_height, + start_offset[512], /* offset of first block */ + ClearCode, /* The CLEAR LZ code. */ + BitsPerPixel, /* Bits per pixel (Codes uses at list this + 1). */ + EOFCode, /* The EOF LZ code. */ + RunningCode, /* The next code algorithm can generate. */ + RunningBits, /* The number of bits required to represent RunningCode. */ + MaxCode1, /* 1 bigger than max. possible code, in RunningBits bits. */ + LastCode, /* The code before the current code. */ + CrntCode, /* Current algorithm code. */ + StackPtr, /* For character stack (see below). */ + CrntShiftState; /* Number of bits in CrntShiftDWord. */ + unsigned char Buf[256]; /* Compressed input is buffered here. */ + unsigned int CrntShiftDWord; /* For bytes decomposition into codes. */ + unsigned char Stack[GIF_LZ_MAX_CODE]; /* Decoded pixels are stacked here. */ + unsigned char Suffix[GIF_LZ_MAX_CODE+1]; /* So we can trace the codes. */ + unsigned int Prefix[GIF_LZ_MAX_CODE+1]; + unsigned int HTable[GIF_HT_SIZE]; /* hash table for the compression only, when using LZW */ +}; + +/****************************************************************************** +* Routine to generate an HKey for the hashtable out of the given unique key. * +* The given Key is assumed to be 20 bits as follows: lower 8 bits are the * +* new postfix character, while the upper 12 bits are the prefix code. * +* Because the average hit ratio is only 2 (2 hash references per entry), * +* evaluating more complex keys (such as twin prime keys) does not worth it! * +******************************************************************************/ +static int iGIFHashKeyItem(unsigned int Item) +{ + return ((Item >> 12) ^ Item) & GIF_HT_KEY_MASK; +} + +/****************************************************************************** +* Routine to insert a new Item into the HashTable. The data is assumed to be * +* new one. * +******************************************************************************/ +static void iGIFInsertHashTable(unsigned int *HTable, unsigned int Key, int Code) +{ + int HKey = iGIFHashKeyItem(Key); + + while (GIF_HT_GET_KEY(HTable[HKey]) != 0xFFFFFL) + { + HKey = (HKey + 1) & GIF_HT_KEY_MASK; + } + + HTable[HKey] = GIF_HT_PUT_KEY(Key) | GIF_HT_PUT_CODE(Code); +} + +/****************************************************************************** +* Routine to test if given Key exists in HashTable and if so returns its code * +* Returns the Code if key was found, -1 if not. * +******************************************************************************/ +static int iGIFExistsHashTable(unsigned int *HTable, unsigned int Key) +{ + int HKey = iGIFHashKeyItem(Key); + unsigned int HTKey; + + while ((HTKey = GIF_HT_GET_KEY(HTable[HKey])) != 0xFFFFFL) + { + if (Key == HTKey) + return GIF_HT_GET_CODE(HTable[HKey]); + + HKey = (HKey + 1) & GIF_HT_KEY_MASK; + } + + return -1; +} + +/****************************************************************************** +* This routines buffers the given characters until 255 characters are ready * +* to be output. If Code is equal to -1 the buffer is flushed (EOF). * +* The buffer is Dumped with first byte as its size, as GIF format requires. * +******************************************************************************/ +static int iGIFBufferedOutput(imBinFile* handle, unsigned char *Buf, int c) +{ + if (c == GIF_FLUSH_OUTPUT) + { + /* Flush everything out. */ + if (Buf[0] != 0) + imBinFileWrite(handle, Buf, Buf[0] + 1, 1); + + /* Mark end of compressed data, by an empty block (see GIF doc): */ + Buf[0] = 0; + imBinFileWrite(handle, Buf, 1, 1); + } + else + { + if (Buf[0] == 255) + { + /* Dump out this buffer - it is full: */ + imBinFileWrite(handle, Buf, Buf[0] + 1, 1); + Buf[0] = 0; + } + + Buf[++Buf[0]] = (unsigned char)c; + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +static int iGIFWriteNetscapeApplication(imBinFile* handle, short iterations) +{ + /* record type byte */ + imBinFileWrite(handle, (void*)"!", 1, 1); + + /* block label */ + imBinFileWrite(handle, (void*)"\xFF", 1, 1); + + /* block size */ + imBinFileWrite(handle, (void*)"\x0B", 1, 1); + + /* application identifier + athentication code */ + imBinFileWrite(handle, (void*)"NETSCAPE2.0", 11, 1); + + /* sub block size */ + imBinFileWrite(handle, (void*)"\x3", 1, 1); + + /* ??? */ + imBinFileWrite(handle, (void*)"\x1", 1, 1); + + /* iterations */ + imBinFileWrite(handle, &iterations, 1, 2); + + /* block terminator */ + imBinFileWrite(handle, (void*)"\0", 1, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +/****************************************************************************** +* The LZ compression output routine: * +* This routine is responsable for the compression of the bit stream into * +* 8 bits (bytes) packets. * +******************************************************************************/ +static int iGIFCompressOutput(iGIFData* igif, imBinFile* handle, int Code) +{ + int error = IM_ERR_NONE; + + if (Code == GIF_FLUSH_OUTPUT) + { + while (igif->CrntShiftState > 0) + { + /* Get Rid of what is left in DWord, and flush it. */ + error = iGIFBufferedOutput(handle, igif->Buf, igif->CrntShiftDWord & 0xff); + igif->CrntShiftDWord >>= 8; + igif->CrntShiftState -= 8; + } + igif->CrntShiftState = 0; /* For next time. */ + error = iGIFBufferedOutput(handle, igif->Buf, GIF_FLUSH_OUTPUT); + } + else + { + igif->CrntShiftDWord |= ((int) Code) << igif->CrntShiftState; + igif->CrntShiftState += igif->RunningBits; + while (igif->CrntShiftState >= 8) + { + /* Dump out full bytes: */ + error = iGIFBufferedOutput(handle, igif->Buf, igif->CrntShiftDWord & 0xff); + igif->CrntShiftDWord >>= 8; + igif->CrntShiftState -= 8; + } + } + + /* If code cannt fit into RunningBits bits, must raise its size. Note */ + /* however that codes above 4095 are used for special signaling. */ + if (igif->RunningCode >= igif->MaxCode1 && Code <= GIF_LZ_MAX_CODE) + { + igif->MaxCode1 = 1 << ++igif->RunningBits; + } + + return error; +} + +/****************************************************************************** +* The LZ compression routine: * +* This version compress the given buffer Line of length LineLen. * +* This routine can be called few times (one per scan line, for example), in * +* order the complete the whole image. * +******************************************************************************/ +static int iGIFCompressLine(iGIFData* igif, imBinFile* handle, unsigned char *Line, int LineLen) +{ + int i = 0, CrntCode, NewCode; + unsigned int NewKey; + unsigned char Pixel; + + if (igif->CrntCode == GIF_FIRST_CODE) /* Its first time! */ + CrntCode = Line[i++]; + else + CrntCode = igif->CrntCode; /* Get last code in compression. */ + + while (i < LineLen) + { /* Decode LineLen items. */ + Pixel = Line[i++]; /* Get next pixel from stream. */ + /* Form a new unique key to search hash table for the code combines */ + /* CrntCode as Prefix string with Pixel as postfix char. */ + NewKey = (((unsigned int) CrntCode) << 8) + Pixel; + + if ((NewCode = iGIFExistsHashTable(igif->HTable, NewKey)) >= 0) + { + /* This Key is already there, or the string is old one, so */ + /* simple take new code as our CrntCode: */ + CrntCode = NewCode; + } + else + { + /* Put it in hash table, output the prefix code, and make our */ + /* CrntCode equal to Pixel. */ + if (iGIFCompressOutput(igif, handle, CrntCode) != IM_ERR_NONE) + return IM_ERR_ACCESS; + + CrntCode = Pixel; + + /* If however the HashTable if full, we send a clear first and */ + /* Clear the hash table. */ + if (igif->RunningCode >= GIF_LZ_MAX_CODE) + { + /* Time to do some clearance: */ + if (iGIFCompressOutput(igif, handle, igif->ClearCode) != IM_ERR_NONE) + return IM_ERR_ACCESS; + + igif->RunningCode = igif->EOFCode + 1; + igif->RunningBits = igif->BitsPerPixel + 1; + igif->MaxCode1 = 1 << igif->RunningBits; + memset(igif->HTable, 0xFF, GIF_HT_SIZE * sizeof(int)); + } + else + { + /* Put this unique key with its relative Code in hash table: */ + iGIFInsertHashTable(igif->HTable, NewKey, igif->RunningCode++); + } + } + } + + /* Preserve the current state of the compression algorithm: */ + igif->CrntCode = CrntCode; + + return IM_ERR_NONE; +} + +/****************************************************************************** +* This routines read one gif data block at a time and buffers it internally * +* so that the decompression routine could access it. * +* The routine returns the next byte from its internal buffer (or read next * +* block in if buffer empty). * +******************************************************************************/ +static int iGIFBufferedInput(imBinFile* handle, unsigned char *Buf, unsigned char *NextByte) +{ + if (Buf[0] == 0) + { + /* Needs to read the next buffer - this one is empty: */ + imBinFileRead(handle, Buf, 1, 1); + imBinFileRead(handle, &Buf[1], Buf[0], 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + *NextByte = Buf[1]; + Buf[1] = 2; /* We use now the second place as last char read! */ + Buf[0]--; + } + else + { + *NextByte = Buf[Buf[1]++]; + Buf[0]--; + } + + return IM_ERR_NONE; +} + +/****************************************************************************** +* The LZ decompression input routine: * +* This routine is responsable for the decompression of the bit stream from * +* 8 bits (bytes) packets, into the real codes. * +******************************************************************************/ +static int iGIFDecompressInput(iGIFData* igif, imBinFile* handle, int *Code) +{ + unsigned char NextByte; + static unsigned int CodeMasks[] = + { + 0x0000, 0x0001, 0x0003, 0x0007, + 0x000f, 0x001f, 0x003f, 0x007f, + 0x00ff, 0x01ff, 0x03ff, 0x07ff, + 0x0fff + }; + + while (igif->CrntShiftState < igif->RunningBits) + { + /* Needs to get more bytes from input stream for next code: */ + if (iGIFBufferedInput(handle, igif->Buf, &NextByte) != IM_ERR_NONE) + return IM_ERR_ACCESS; + + igif->CrntShiftDWord |= ((unsigned int) NextByte) << igif->CrntShiftState; + igif->CrntShiftState += 8; + } + + *Code = igif->CrntShiftDWord & CodeMasks[igif->RunningBits]; + + igif->CrntShiftDWord >>= igif->RunningBits; + igif->CrntShiftState -= igif->RunningBits; + + /* If code cannt fit into RunningBits bits, must raise its size. Note */ + /* however that codes above 4095 are used for special signaling. */ + if (++(igif->RunningCode) > igif->MaxCode1 && igif->RunningBits < GIF_LZ_BITS) + { + igif->MaxCode1 <<= 1; + igif->RunningBits++; + } + + return IM_ERR_NONE; +} + +/****************************************************************************** +* Routine to trace the Prefixes linked list until we get a prefix which is * +* not code, but a pixel value (less than ClearCode). Returns that pixel value.* +* If image is defective, we might loop here forever, so we limit the loops to * +* the maximum possible if image O.k. - LZ_MAX_CODE times. * +******************************************************************************/ +static int iGIFGetPrefixChar(unsigned int *Prefix, int Code, int ClearCode) +{ + int i = 0; + + while (Code > ClearCode && i++ <= GIF_LZ_MAX_CODE) + Code = Prefix[Code]; + + return Code; +} + +static int iGIFDecompressLine(iGIFData* igif, imBinFile* handle, unsigned char *Line, int LineLen) +{ + int i = 0, j, CrntCode, EOFCode, ClearCode, CrntPrefix, LastCode, StackPtr; + unsigned char *Stack, *Suffix; + unsigned int *Prefix; + + StackPtr = igif->StackPtr; + Prefix = igif->Prefix; + Suffix = igif->Suffix; + Stack = igif->Stack; + EOFCode = igif->EOFCode; + ClearCode = igif->ClearCode; + LastCode = igif->LastCode; + + if (StackPtr != 0) + { + /* Let pop the stack off before continueing to read the gif file: */ + while (StackPtr != 0 && i < LineLen) + Line[i++] = Stack[--StackPtr]; + } + + while (i < LineLen) + { + /* Decode LineLen items. */ + if (iGIFDecompressInput(igif, handle, &CrntCode)) + return IM_ERR_ACCESS; + + if (CrntCode == EOFCode) + { + /* Note however that usually we will not be here as we will stop */ + /* decoding as soon as we got all the pixel, or EOF code will */ + /* not be read at all, and DGifGetLine/Pixel clean everything. */ + if (i != LineLen - 1) + return IM_ERR_ACCESS; + + i++; + } + else if (CrntCode == ClearCode) + { + /* We need to start over again: */ + for (j = 0; j <= GIF_LZ_MAX_CODE; j++) + Prefix[j] = GIF_NO_SUCH_CODE; + + igif->RunningCode = igif->EOFCode + 1; + igif->RunningBits = igif->BitsPerPixel + 1; + igif->MaxCode1 = 1 << igif->RunningBits; + LastCode = igif->LastCode = GIF_NO_SUCH_CODE; + } + else + { + /* Its regular code - if in pixel range simply add it to output */ + /* stream, otherwise trace to codes linked list until the prefix */ + /* is in pixel range: */ + if (CrntCode < ClearCode) + { + /* This is simple - its pixel scalar, so add it to output: */ + Line[i++] = (unsigned char)CrntCode; + } + else + { + /* Its a code to needed to be traced: trace the linked list */ + /* until the prefix is a pixel, while pushing the suffix */ + /* pixels on our stack. If we done, pop the stack in reverse */ + /* (thats what stack is good for!) order to output. */ + if (Prefix[CrntCode] == GIF_NO_SUCH_CODE) + { + /* Only allowed if CrntCode is exactly the running code: */ + /* In that case CrntCode = XXXCode, CrntCode or the */ + /* prefix code is last code and the suffix char is */ + /* exactly the prefix of last code! */ + if (CrntCode == igif->RunningCode - 2) + { + CrntPrefix = LastCode; + Suffix[igif->RunningCode - 2] = + Stack[StackPtr++] = (unsigned char)iGIFGetPrefixChar(Prefix, LastCode, ClearCode); + } + else + return IM_ERR_ACCESS; + } + else + CrntPrefix = CrntCode; + + /* Now (if image is O.K.) we should not get an NO_SUCH_CODE */ + /* During the trace. As we might loop forever, in case of */ + /* defective image, we count the number of loops we trace */ + /* and stop if we got LZ_MAX_CODE. obviously we can not */ + /* loop more than that. */ + j = 0; + while (j++ <= GIF_LZ_MAX_CODE && CrntPrefix > ClearCode && CrntPrefix <= GIF_LZ_MAX_CODE) + { + Stack[StackPtr++] = Suffix[CrntPrefix]; + CrntPrefix = Prefix[CrntPrefix]; + } + + if (j >= GIF_LZ_MAX_CODE || CrntPrefix > GIF_LZ_MAX_CODE) + return IM_ERR_ACCESS; + + /* Push the last character on stack: */ + Stack[StackPtr++] = (unsigned char)CrntPrefix; + + /* Now lets pop all the stack into output: */ + while (StackPtr != 0 && i < LineLen) + Line[i++] = Stack[--StackPtr]; + } + + if (LastCode != GIF_NO_SUCH_CODE) + { + Prefix[igif->RunningCode - 2] = LastCode; + + if (CrntCode == igif->RunningCode - 2) + { + /* Only allowed if CrntCode is exactly the running code: */ + /* In that case CrntCode = XXXCode, CrntCode or the */ + /* prefix code is last code and the suffix char is */ + /* exactly the prefix of last code! */ + Suffix[igif->RunningCode - 2] = (unsigned char)iGIFGetPrefixChar(Prefix, LastCode, ClearCode); + } + else + { + Suffix[igif->RunningCode - 2] = (unsigned char)iGIFGetPrefixChar(Prefix, CrntCode, ClearCode); + } + } + + LastCode = CrntCode; + } + } + + igif->LastCode = LastCode; + igif->StackPtr = StackPtr; + + return IM_ERR_NONE; +} + +/******************************************* +* Skip sub-blocks until terminator found * +********************************************/ +static int iGIFSkipSubBlocks(imBinFile* handle) +{ + unsigned char byte_value; + do + { + /* reads the number of bytes of the block or the terminator */ + imBinFileRead(handle, &byte_value, 1, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + /* jump number of bytes, ignores the contents */ + if (byte_value) imBinFileSeekOffset(handle, byte_value); + }while (byte_value != 0); + + return IM_ERR_NONE; +} + +static int iGIFSkipImage(imBinFile* handle, int *image_count, int *terminate) +{ + int found_image = 0; + unsigned char byte_value; + + *terminate = 0; + do + { + /* reads the record type byte */ + byte_value = 0; + imBinFileRead(handle, &byte_value, 1, 1); + + switch (byte_value) + { + case ',': /* image description */ + /* jump 8 bytes */ + imBinFileSeekOffset(handle, 8); + + /* reads the image information byte */ + imBinFileRead(handle, &byte_value, 1, 1); + + if (byte_value & 0x80) + { + int bpp = (byte_value & 0x07) + 1; + int num_colors = 1 << bpp; + + /* skip the color table */ + imBinFileSeekOffset(handle, 3*num_colors); + } + + /* jump 1 byte (LZW Min Code) */ + imBinFileSeekOffset(handle, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + /* skip sub blocks */ + if (iGIFSkipSubBlocks(handle) != IM_ERR_NONE) + return IM_ERR_ACCESS; + + /* one more image */ + found_image = 1; + (*image_count)++; + break; + case '!': /* extension */ + /* jump 1 byte (label) */ + imBinFileSeekOffset(handle, 1); + + /* skip sub blocks */ + if (iGIFSkipSubBlocks(handle) != IM_ERR_NONE) + return IM_ERR_ACCESS; + break; + case ';': /* terminate */ + default: /* probably EOF */ + *terminate = 1; + break; + } + + } while (!(*terminate) && (!found_image)); + + if (!found_image && *image_count == 0) + return IM_ERR_FORMAT; + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +static void iGIFReadGraphicsControl(imBinFile* handle, imAttribTable* attrib_table) +{ + unsigned char byte_value; + unsigned short word_value; + + /* jump 1 bytes (size) */ + imBinFileSeekOffset(handle, 1); + + /* reads the packed descrition */ + imBinFileRead(handle, &byte_value, 1, 1); + if (imBinFileError(handle)) + return; + + /* user input */ + if (byte_value & 0x02) + attrib_table->Set("UserInput", IM_BYTE, 1, "\x1"); + + /* disposal */ + if (byte_value & 0x1C) + { + char* disposal; + int disp = (byte_value & 0x1C) >> 2; + + switch (disp) + { + default: + disposal = "UNDEF"; + break; + case 0x01: + disposal = "LEAVE"; + break; + case 0x02: + disposal = "RBACK"; + break; + case 0x04: + disposal = "RPREV"; + break; + } + + attrib_table->Set("Disposal", IM_BYTE, -1, disposal); + } + + /* delay time */ + imBinFileRead(handle, &word_value, 1, 2); + if (word_value) + attrib_table->Set("Delay", IM_USHORT, 1, &word_value); + + /* transparency index */ + if (byte_value & 0x01) + { + imBinFileRead(handle, &byte_value, 1, 1); + attrib_table->Set("TransparencyIndex", IM_BYTE, 1, &byte_value); + } + else + imBinFileSeekOffset(handle, 1); + + /* jump 1 bytes (terminator) */ + imBinFileSeekOffset(handle, 1); +} + +static int iGIFReadApplication(imBinFile* handle, imAttribTable* attrib_table) +{ + char identifier[9]; + + /* jump 1 byte (size) */ + imBinFileSeekOffset(handle, 1); + + /* reads the application identifier */ + imBinFileRead(handle, identifier, 8, 1); + if (identifier[7] != 0) + identifier[8] = 0; + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (imStrEqual(identifier, "NETSCAPE")) + { + unsigned char authentication[4]; + /* reads the application authentication code */ + imBinFileRead(handle, authentication, 3, 1); + authentication[3] = 0; + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (strcmp((char*)authentication, "2.0") == 0) + { + unsigned short word_value; + + /* jump 2 bytes (size + 1) */ + imBinFileSeekOffset(handle, 2); + + /* reads the number of iterations */ + imBinFileRead(handle, &word_value, 1, 2); + + attrib_table->Set("Iterations", IM_USHORT, 1, &word_value); + + /* jump 1 byte (terminator) */ + imBinFileSeekOffset(handle, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + else + { + /* Skip remaining blocks */ + if (iGIFSkipSubBlocks(handle) != IM_ERR_NONE) + return IM_ERR_ACCESS; + } + } + else + { + /* jump 3 bytes (authentication code) */ + imBinFileSeekOffset(handle, 3); + + /* Skip remaining blocks */ + if (iGIFSkipSubBlocks(handle) != IM_ERR_NONE) + return IM_ERR_ACCESS; + } + + return IM_ERR_NONE; +} + +static int iGIFReadComment(imBinFile* handle, imAttribTable* attrib_table) +{ + unsigned char byte_value, buffer[255*100] = "", *buffer_ptr; + int size = 0; + + buffer_ptr = &buffer[0]; + + do + { + /* reads the number of bytes of the block or the terminator */ + imBinFileRead(handle, &byte_value, 1, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + /* reads data */ + if (byte_value) + { + imBinFileRead(handle, buffer_ptr, byte_value, 1); + + if (buffer_ptr[byte_value-1] == 0) + { + size += byte_value-1; + buffer_ptr += byte_value-1; + } + else + { + size += byte_value; + buffer_ptr += byte_value; + } + } + + }while (byte_value != 0); + + if (buffer[0] != 0) + attrib_table->Set("Description", IM_BYTE, size, buffer); + + return IM_ERR_NONE; +} + +static int iGIFReadExtension(imBinFile* handle, imAttribTable* attrib_table) +{ + unsigned char byte_value; + + /* read block label */ + imBinFileRead(handle, &byte_value, 1, 1); + + if (byte_value == 0xF9) + { + /* Graphics Control Extension */ + iGIFReadGraphicsControl(handle, attrib_table); + } + else if (byte_value == 0xFE) + { + /* Comment Extension */ + if (iGIFReadComment(handle, attrib_table) != IM_ERR_NONE) + return IM_ERR_ACCESS; + } + else if (byte_value == 0xFF) + { + /* Application Extension */ + if (iGIFReadApplication(handle, attrib_table) != IM_ERR_NONE) + return IM_ERR_ACCESS; + } + else + { + /* skip sub blocks */ + if (iGIFSkipSubBlocks(handle) != IM_ERR_NONE) + return IM_ERR_ACCESS; + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +static int iGIFWriteComment(imBinFile* handle, unsigned char *buffer, int size) +{ + unsigned char byte_value; + + /* record type byte */ + imBinFileWrite(handle, (void*)"!", 1, 1); + + /* block label */ + imBinFileWrite(handle, (void*)"\xFE", 1, 1); + + while (size > 0) + { + if (size > 255) + byte_value = 255; + else + byte_value = (unsigned char)size; + + /* sub block size */ + imBinFileWrite(handle, &byte_value, 1, 1); + + /* sub block data */ + imBinFileWrite(handle, buffer, byte_value, 1); + + buffer += byte_value; + size -= byte_value; + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + + /* block terminator */ + imBinFileWrite(handle, (void*)"\0", 1, 1); + + return IM_ERR_NONE; +} + +static int iGIFWriteGraphicsControl(imBinFile* handle, imAttribTable* attrib_table) +{ + const void *attrib_user_input, *attrib_disposal, *attrib_delay, *attrib_transparency; + unsigned char byte_value; + + attrib_user_input = attrib_table->Get("UserInput"); + attrib_disposal = attrib_table->Get("Disposal"); + attrib_delay = attrib_table->Get("Delay"); + attrib_transparency = attrib_table->Get("TransparencyIndex"); + + /* Writes the Graphics Control Extension */ + if (attrib_user_input || attrib_disposal || attrib_delay || attrib_transparency) + { + unsigned short word_value; + + /* record type byte */ + imBinFileWrite(handle, (void*)"!", 1, 1); + + /* block label */ + imBinFileWrite(handle, (void*)"\xF9", 1, 1); + + /* block size */ + imBinFileWrite(handle, (void*)"\x04", 1, 1); + + byte_value = 0; + + /* user input flag */ + if (attrib_user_input && *(unsigned char*)attrib_user_input == 1) + byte_value |= 0x02; + + /* transparency flag */ + if (attrib_transparency) + byte_value |= 0x01; + + /* disposal flag */ + if (attrib_disposal) + { + int disp = 0; + if (imStrEqual((char*)attrib_disposal, "LEAVE")) + disp = 0x01; + else if (imStrEqual((char*)attrib_disposal, "RBACK")) + disp = 0x02; + else if (imStrEqual((char*)attrib_disposal, "RPREV")) + disp = 0x04; + + disp = disp << 2; + byte_value |= disp; + } + + /* packed */ + imBinFileWrite(handle, &byte_value, 1, 1); + + /* delay time */ + if (attrib_delay) + word_value = *(unsigned short*)attrib_delay; + else + word_value = 0; + + imBinFileWrite(handle, &word_value, 1, 2); + + /* transparency index */ + if (attrib_transparency) + { + byte_value = *(unsigned char*)attrib_transparency; + imBinFileWrite(handle, &byte_value, 1, 1); + } + else + imBinFileWrite(handle, (void*)"\0", 1, 1); + + /* terminator */ + imBinFileWrite(handle, (void*)"\0", 1, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + + return IM_ERR_NONE; +} + +static const char* iGIFCompTable[1] = +{ + "LZW" +}; + +class imFileFormatGIF: public imFileFormatBase +{ + imBinFile* handle; + iGIFData gif_data; + + int GIFReadImageInfo(); + int GIFWriteImageInfo(); + +public: + imFileFormatGIF(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatGIF() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatGIF: public imFormat +{ +public: + imFormatGIF() + :imFormat("GIF", + "Graphics Interchange Format", + "*.gif;", + iGIFCompTable, + 1, + 1) + {} + ~imFormatGIF() {} + + imFileFormatBase* Create(void) const { return new imFileFormatGIF(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + +void imFormatRegisterGIF(void) +{ + imFormatRegister(new imFormatGIF()); +} + +int imFileFormatGIF::Open(const char* file_name) +{ + this->handle = imBinFileOpen(file_name); + if (this->handle == NULL) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_LITTLEENDIAN); + + unsigned char sig[4]; + if (!imBinFileRead(this->handle, sig, 3, 1)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + sig[3] = 0; + if (!imStrEqual((char*)sig, GIF_STAMP)) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + /* ignore version */ + imBinFileSeekOffset(handle, 3); + + strcpy(this->compression, "LZW"); + + /* reads screen width and screen height */ + imushort word_value; + imBinFileRead(handle, &word_value, 1, 2); + gif_data.screen_width = word_value; + + imBinFileRead(handle, &word_value, 1, 2); + gif_data.screen_height = word_value; + + /* reads color table information byte */ + imbyte byte_value; + imBinFileRead(handle, &byte_value, 1, 1); + + /* jump 2 bytes (bgcolor + aspect ratio) */ + imBinFileSeekOffset(handle, 2); + + /* global color table, if exists */ + if (byte_value & 0x80) + { + int bpp = (byte_value & 0x07) + 1; + gif_data.global_num_colors = 1 << bpp; + + /* reads the color palette */ + imBinFileRead(handle, gif_data.global_colors, gif_data.global_num_colors * 3, 1); + } + + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + /* count number of images */ + int error, terminate; + this->image_count = 0; + do + { + // store each offset before counting images + gif_data.start_offset[this->image_count] = imBinFileTell(handle); + error = iGIFSkipImage(handle, &this->image_count, &terminate); + } while (!terminate && error == IM_ERR_NONE); + + if (this->image_count == 0 || error != IM_ERR_NONE) + { + imBinFileClose(handle); + return error; + } + + return IM_ERR_NONE; +} + +int imFileFormatGIF::New(const char* file_name) +{ + this->handle = imBinFileNew(file_name); + if (this->handle == NULL) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_LITTLEENDIAN); + + /* writes the GIF STAMP and version - header */ + imBinFileWrite(handle, (void*)GIF_STAMP, 3, 1); /* identifier */ + imBinFileWrite(handle, (void*)GIF_VERSION, 3, 1); /* format version */ + + // File header will be written at the first image + + /* tests if everything was ok */ + if (imBinFileError(handle)) + { + imBinFileClose(this->handle); + return IM_ERR_ACCESS; + } + + strcpy(this->compression, "LZW"); + + return IM_ERR_NONE; +} + +void imFileFormatGIF::Close() +{ + if (this->is_new && !imBinFileError(this->handle)) + imBinFileWrite(this->handle, (void*)";", 1, 1); + + imBinFileClose(this->handle); +} + +void* imFileFormatGIF::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +int imFileFormatGIF::GIFReadImageInfo() +{ + imbyte byte_value; + imushort word_value; + int int_value; + + imAttribTable* attrib_table = AttribTable(); + + /* reads the image left position */ + imBinFileRead(handle, &word_value, 1, 2); + if (word_value) + attrib_table->Set("XScreen", IM_USHORT, 1, &word_value); + + /* reads the image top position */ + imBinFileRead(handle, &word_value, 1, 2); + if (word_value) + attrib_table->Set("YScreen", IM_USHORT, 1, &word_value); + + /* reads the image width */ + imBinFileRead(handle, &word_value, 1, 2); + this->width = word_value; + + /* reads the image height */ + imBinFileRead(handle, &word_value, 1, 2); + this->height = word_value; + + /* reads the image information byte */ + imBinFileRead(handle, &byte_value, 1, 1); + + gif_data.interlaced = (byte_value & 0x40)? 1: 0; + if (gif_data.interlaced) + { + int_value = 1; + attrib_table->Set("Interlaced", IM_INT, 1, &int_value); + } + + this->file_color_mode = IM_MAP; + this->file_data_type = IM_BYTE; + + /* local color table */ + int num_colors; + unsigned char *colors; + unsigned char local_colors[256 * 3]; + + if (byte_value & 0x80) + { + int bpp = (byte_value & 0x07) + 1; + num_colors = 1 << bpp; + colors = local_colors; + + /* reads the color table */ + imBinFileRead(handle, local_colors, num_colors * 3, 1); + } + else if (gif_data.global_num_colors) + { + colors = gif_data.global_colors; + num_colors = gif_data.global_num_colors; + } + else + return IM_ERR_FORMAT; + + long palette[256]; + for (int c = 0; c < num_colors; c++) + { + palette[c] = imColorEncode(colors[c*3], + colors[c*3+1], + colors[c*3+2]); + } + + imFileSetPalette(this, palette, num_colors); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + this->file_color_mode |= IM_TOPDOWN; + + return IM_ERR_NONE; +} + +int imFileFormatGIF::GIFWriteImageInfo() +{ + this->file_data_type = IM_BYTE; + this->file_color_mode = imColorModeSpace(this->user_color_mode); + this->file_color_mode |= IM_TOPDOWN; + + imAttribTable* attrib_table = AttribTable(); + const void* attrib = attrib_table->Get("Interlaced"); + if (attrib) + gif_data.interlaced = *(int*)attrib; + + imBinFileWrite(handle, (void*)",", 1, 1); /* Image separator character. */ + + imushort word_value; + + attrib = attrib_table->Get("XScreen"); + if (attrib) + word_value = *(unsigned short*)attrib; + else + word_value = 0; + imBinFileWrite(handle, &word_value, 1, 2); /* image left */ + + attrib = attrib_table->Get("YScreen"); + if (attrib) + word_value = *(unsigned short*)attrib; + else + word_value = 0; + imBinFileWrite(handle, &word_value, 1, 2); /* image top */ + + word_value = (unsigned short)this->width; + imBinFileWrite(handle, &word_value, 1, 2); /* image width */ + word_value = (unsigned short)this->height; + imBinFileWrite(handle, &word_value, 1, 2); /* image height */ + + /* local color table */ + imbyte byte_value = 0x80; + if (gif_data.interlaced) + byte_value |= 0x40; + + int num_colors = 256; + if (imColorModeSpace(this->user_color_mode) == IM_MAP) + { + int bpp = 0, c = this->palette_count-1; + while (c) {c = c >> 1;bpp++;} + byte_value |= (bpp-1); + num_colors = 1 << bpp; + } + else + byte_value |= 0x07; /* 8 bits = 256 grays */ + + imBinFileWrite(handle, &byte_value, 1, 1); /* image information */ + + /* write color table */ + unsigned char local_colors[256*3]; + for (int c = 0; c < num_colors; c++) // write all data, even not used colors + { + unsigned char r, g, b; + imColorDecode(&r, &g, &b, this->palette[c]); + local_colors[c*3] = r; + local_colors[c*3+1] = g; + local_colors[c*3+2] = b; + } + imBinFileWrite(handle, local_colors, num_colors*3, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +int imFileFormatGIF::ReadImageInfo(int index) +{ + imAttribTable* attrib_table = AttribTable(); + + /* must clear the attribute list, because it can have multiple images and + has many attributes that may exists only for specific images. */ + attrib_table->RemoveAll(); + imFileSetBaseAttributes(this); + + if (gif_data.screen_width) + { + imushort word_value = (imushort)gif_data.screen_width; + attrib_table->Set("ScreenWidth", IM_USHORT, 1, &word_value); + } + + if (gif_data.screen_height) + { + imushort word_value = (imushort)gif_data.screen_height; + attrib_table->Set("ScreenHeight", IM_USHORT, 1, &word_value); + } + + /* jump to start offset of the image */ + imBinFileSeekTo(handle, gif_data.start_offset[index]); + + int found_image = 0; + imbyte byte_value; + + int terminate = 0; + do + { + /* reads the record type byte */ + byte_value = 0; + imBinFileRead(handle, &byte_value, 1, 1); + + switch (byte_value) + { + case '!': /* 0x21 extension (appears before the image) */ + if (iGIFReadExtension(handle, attrib_table) != IM_ERR_NONE) + return IM_ERR_ACCESS; + break; + case ',': /* 0x2C image description and color table */ + if (GIFReadImageInfo() != IM_ERR_NONE) + return IM_ERR_ACCESS; + + /* we will read only this image for now, so break the loop */ + found_image = 1; + break; + case ';': /* if terminate before find image return error */ + default: + terminate = 1; + break; + } + } while (!terminate && !found_image); + + if (!found_image) + return IM_ERR_ACCESS; + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + /* reads the LZW Min code byte */ + imBinFileRead(handle, &byte_value, 1, 1); + + /* now initialize the compression control data */ + + gif_data.BitsPerPixel = byte_value; + gif_data.ClearCode = (1 << byte_value); + gif_data.EOFCode = gif_data.ClearCode + 1; + gif_data.RunningCode = gif_data.EOFCode + 1; + gif_data.RunningBits = byte_value + 1; /* Number of bits per code. */ + gif_data.MaxCode1 = 1 << gif_data.RunningBits; /* Max. code + 1. */ + gif_data.StackPtr = 0; /* No pixels on the pixel stack. */ + gif_data.LastCode = GIF_NO_SUCH_CODE; + gif_data.CrntShiftState = 0; /* No information in CrntShiftDWord. */ + gif_data.CrntShiftDWord = 0; + gif_data.Buf[0] = 0; /* Input Buffer empty. */ + + for (int i = 0; i <= GIF_LZ_MAX_CODE; i++) + gif_data.Prefix[i] = GIF_NO_SUCH_CODE; + + gif_data.step = 0; + + return IM_ERR_NONE; +} + +int imFileFormatGIF::WriteImageInfo() +{ + this->file_color_mode = imColorModeSpace(this->user_color_mode); + this->file_color_mode |= IM_TOPDOWN; + this->file_data_type = this->user_data_type; + + imAttribTable* attrib_table = AttribTable(); + const void* attrib_data; + int attrib_size; + + if (this->image_count == 0) + { + imushort word_value; + + // write file header + + /* logical screen descriptor */ + attrib_data = attrib_table->Get("ScreenWidth"); + if (attrib_data) word_value = *(imushort*)attrib_data; + else word_value = (imushort)this->width; + imBinFileWrite(handle, &word_value, 1, 2); + + attrib_data = attrib_table->Get("ScreenHeight"); + if (attrib_data) word_value = *(imushort*)attrib_data; + else word_value = (imushort)this->height; + imBinFileWrite(handle, &word_value, 1, 2); + + imbyte byte_value = 0; /* no global color table, 0 colors */ + imBinFileWrite(handle, &byte_value, 1, 1); /* screen information */ + imBinFileWrite(handle, (void*)"\0\0", 2, 1); /* (bgcolor + aspect ratio) */ + } + + attrib_data = attrib_table->Get("Description", NULL, &attrib_size); + if (attrib_data) + { + if (iGIFWriteComment(handle, (imbyte*)attrib_data, attrib_size) != IM_ERR_NONE) + return IM_ERR_ACCESS; + } + + attrib_data = attrib_table->Get("Iterations"); + if (attrib_data) + { + if (iGIFWriteNetscapeApplication(handle, *(short*)attrib_data) != IM_ERR_NONE) + return IM_ERR_ACCESS; + } + + if (iGIFWriteGraphicsControl(handle, attrib_table) != IM_ERR_NONE) + return IM_ERR_ACCESS; + + if (GIFWriteImageInfo() != IM_ERR_NONE) + return IM_ERR_ACCESS; + + /* initializes the hash table */ + memset(gif_data.HTable, 0xFF, GIF_HT_SIZE * sizeof(int)); + + /* initializes compression data */ + + imbyte byte_value = 8; + imBinFileWrite(handle, &byte_value, 1, 1); /* Write the Code size to file. */ + + gif_data.Buf[0] = 0; /* Nothing was output yet. */ + gif_data.BitsPerPixel = 8; + gif_data.ClearCode = (1 << 8); + gif_data.EOFCode = gif_data.ClearCode + 1; + gif_data.RunningBits = 8 + 1; /* Number of bits per code. */ + gif_data.MaxCode1 = 1 << gif_data.RunningBits; /* Max. code + 1. */ + gif_data.CrntCode = GIF_FIRST_CODE; /* Signal that this is first one! */ + gif_data.CrntShiftState = 0; /* No information in CrntShiftDWord. */ + gif_data.CrntShiftDWord = 0; + + gif_data.RunningCode = gif_data.EOFCode + 1; + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + gif_data.step = 0; /* interlaced step */ + + return iGIFCompressOutput(&gif_data, handle, gif_data.ClearCode); +} + +int imFileFormatGIF::ReadImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Reading GIF..."); + + int row = 0, error; + for (int i = 0; i < this->height; i++) + { + error = iGIFDecompressLine(&gif_data, handle, (imbyte*)this->line_buffer, this->width); + if (error != IM_ERR_NONE) + return IM_ERR_ACCESS; + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + + if (gif_data.interlaced) + { + row += InterlacedJumps[gif_data.step]; + + if (row > this->height-1) + { + gif_data.step++; + row = InterlacedOffset[gif_data.step]; + } + } + else + row++; + } + + /* Skip remaining empty blocks of the image data */ + if (iGIFSkipSubBlocks(handle) != IM_ERR_NONE) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +int imFileFormatGIF::WriteImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Writing GIF..."); + + int row = 0, error; + for (int i = 0; i < this->height; i++) + { + imFileLineBufferWrite(this, data, row, 0); + + error = iGIFCompressLine(&gif_data, handle, (imbyte*)this->line_buffer, this->width); + + if (error != IM_ERR_NONE) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + + if (gif_data.interlaced) + { + row += InterlacedJumps[gif_data.step]; + + if (row > this->height-1) + { + gif_data.step++; + row = InterlacedOffset[gif_data.step]; + } + } + else + row++; + } + + /* writes the end picture code */ + iGIFCompressOutput(&gif_data, handle, gif_data.CrntCode); + iGIFCompressOutput(&gif_data, handle, gif_data.EOFCode); + iGIFCompressOutput(&gif_data, handle, GIF_FLUSH_OUTPUT); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + this->image_count++; + return IM_ERR_NONE; +} + +int imFormatGIF::CanWrite(const char* compression, int color_mode, int data_type) const +{ + int color_space = imColorModeSpace(color_mode); + + if (color_space != IM_MAP && color_space != IM_GRAY && color_space != IM_BINARY) + return IM_ERR_DATA; + + if (data_type != IM_BYTE) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "LZW")) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} + diff --git a/im/src/im_format_ico.cpp b/im/src/im_format_ico.cpp new file mode 100755 index 0000000..b10f30e --- /dev/null +++ b/im/src/im_format_ico.cpp @@ -0,0 +1,660 @@ +/** \file + * \brief ICO - Windows Icon + * + * See Copyright Notice in im_lib.h + * $Id: im_format_ico.cpp,v 1.2 2008/12/03 15:45:34 scuri Exp $ + */ + +#include "im_format.h" +#include "im_format_all.h" +#include "im_util.h" +#include "im_counter.h" + +#include "im_binfile.h" + +#include +#include +#include + +/* +typedef struct +{ + WORD idReserved; // Reserved (must be 0) + WORD idType; // Resource Type (1 for icons) + WORD idCount; // How many images? + ICONDIRENTRY idEntries[1]; // An entry for each image (idCount of 'em) +} ICONDIR, *LPICONDIR; // 6 +typedef struct +{ + BYTE bWidth; // Width, in pixels, of the image + BYTE bHeight; // Height, in pixels, of the image + BYTE bColorCount; // Number of colors in image (0 if >=8bpp) + BYTE bReserved; // Reserved ( must be 0) + WORD wPlanes; // Color Planes + WORD wBitCount; // Bits per pixel + DWORD dwBytesInRes; // How many bytes in this resource? + DWORD dwImageOffset; // Where in the file is this image? +} ICONDIRENTRY, *LPICONDIRENTRY; // 16 +typdef struct +{ + BITMAPINFOHEADER icHeader; // DIB header + RGBQUAD icColors[1]; // Color table + BYTE icXOR[1]; // DIB bits for XOR mask + BYTE icAND[1]; // DIB bits for AND mask (1 bpp) +} ICONIMAGE, *LPICONIMAGE; +*/ + +static const char* iICOCompTable[1] = +{ + "NONE" +}; + +class imFileFormatICO: public imFileFormatBase +{ + imBinFile* handle; /* the binary file handle */ + unsigned short bpp; /* number of bits per pixel */ + unsigned int offset[10], + next_offset; + int line_raw_size; // raw line size + + int ReadPalette(); + int WritePalette(); + void FixRGBOrder(); + +public: + imFileFormatICO(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatICO() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatICO: public imFormat +{ +public: + imFormatICO() + :imFormat("ICO", + "Windows Icon", + "*.ico;", + iICOCompTable, + 1, + 1) + {} + ~imFormatICO() {} + + imFileFormatBase* Create(void) const { return new imFileFormatICO(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + + +void imFormatRegisterICO(void) +{ + imFormatRegister(new imFormatICO()); +} + +int imFileFormatICO::Open(const char* file_name) +{ + unsigned short word; + + /* opens the binary file for reading with intel byte order */ + handle = imBinFileOpen(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_LITTLEENDIAN); + + /* reads the reserved value */ + imBinFileRead(handle, &word, 1, 2); + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + if (word != 0) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + /* reads the resource type */ + imBinFileRead(handle, &word, 1, 2); + if (word != 1) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + /* reads the number of images */ + imBinFileRead(handle, &word, 1, 2); + + this->image_count = word > 10? 10: word; + strcpy(this->compression, "NONE"); + + for (int i = 0; i < this->image_count; i++) + { + /* skip ICONDIRENTRY data except image offset */ + imBinFileSeekOffset(handle, 12); + + /* reads the image offset */ + imBinFileRead(handle, &this->offset[i], 1, 4); + + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + } + + return IM_ERR_NONE; +} + +int imFileFormatICO::New(const char* file_name) +{ + /* opens the binary file for writing with intel byte order */ + handle = imBinFileNew(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_LITTLEENDIAN); + + imushort word_value = 0; + imBinFileWrite(handle, &word_value, 1, 2); /* reserved */ + word_value = 1; + imBinFileWrite(handle, &word_value, 1, 2); /* resource type */ + imBinFileWrite(handle, &word_value, 1, 2); /* number of images, at least one, must update at close */ + + this->next_offset = 6 + 5 * 16; // offset to the first image, room for 5 ICONDIRENTRY + + return IM_ERR_NONE; +} + +void imFileFormatICO::Close() +{ + if (this->is_new) + { + if (this->image_count > 1) + { + imBinFileSeekTo(handle, 4); + imushort word_value = (imushort)this->image_count; + imBinFileWrite(handle, &word_value, 1, 2); /* number of images */ + } + } + + imBinFileClose(handle); +} + +void* imFileFormatICO::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +int imFileFormatICO::ReadImageInfo(int index) +{ + this->file_data_type = IM_BYTE; + unsigned int dword_value; + + if (index >= image_count) + return IM_ERR_DATA; + + // offset + size + imBinFileSeekTo(handle, this->offset[index] + 4); + + /* reads the image width */ + imBinFileRead(handle, &dword_value, 1, 4); + this->width = (int)dword_value; + + /* reads the image height */ + imBinFileRead(handle, &dword_value, 1, 4); + this->height = (int)(dword_value / 2); + + /* jump 2 bytes (planes) */ + imBinFileSeekOffset(handle, 2); + + // bpp + imBinFileRead(handle, &this->bpp, 1, 2); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + // sanity check + if (this->bpp != 1 && this->bpp != 4 && this->bpp != 8 && + this->bpp != 24 && this->bpp != 32) + return IM_ERR_DATA; + + if (this->bpp > 8) + { + this->file_color_mode = IM_RGB; + this->file_color_mode |= IM_PACKED; + if (this->bpp == 32) + this->file_color_mode |= IM_ALPHA; + } + else + { + this->file_color_mode = IM_MAP; + this->palette_count = 1 << bpp; + } + + if (this->bpp < 8) + this->convert_bpp = this->bpp; + + this->line_raw_size = imFileLineSizeAligned(this->width, this->bpp, 4); + this->line_buffer_extra = 4; // room enough for padding + + /* jump 8 bytes (compression, image size, resolution) */ + imBinFileSeekOffset(handle, 16); + + if (this->bpp <= 8) + { + /* reads the number of colors used */ + imBinFileRead(handle, &dword_value, 1, 4); + + /* updates the palette_count based on the number of colors used */ + if (dword_value != 0 && (int)dword_value < this->palette_count) + this->palette_count = dword_value; + + /* jump 4 bytes (important colors) */ + imBinFileSeekOffset(handle, 4); + } + else + { + /* jump 8 bytes (used colors, important colors) */ + imBinFileSeekOffset(handle, 8); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->bpp <= 8) + return ReadPalette(); + + return IM_ERR_NONE; +} + +int imFileFormatICO::WriteImageInfo() +{ + this->file_data_type = IM_BYTE; + this->file_color_mode = imColorModeSpace(this->user_color_mode); + + if (this->image_count == 5) + return IM_ERR_DATA; + + if (this->width > 255 || this->height > 255) + return IM_ERR_DATA; + + if (this->file_color_mode == IM_BINARY) + { + this->bpp = 1; + this->convert_bpp = 1; + } + else if (this->file_color_mode == IM_RGB) + { + this->file_color_mode |= IM_PACKED; + if (imColorModeHasAlpha(this->user_color_mode)) + { + this->file_color_mode |= IM_ALPHA; + this->bpp = 32; + } + else + this->bpp = 24; + } + else + this->bpp = 8; + + this->line_raw_size = imFileLineSizeAligned(this->width, this->bpp, 4); + this->line_buffer_extra = 4; // room enough for padding + int palette_size = (this->bpp > 8)? 0: this->palette_count*4; + + imbyte byte_value; + imushort word_value; + + /* updates the ICON directory entry */ + + imBinFileSeekTo(handle, 6 + this->image_count * 16); // ICONDIR + i * ICONDIRENTRY + + byte_value = (imbyte)this->width; + imBinFileWrite(handle, &byte_value, 1, 1); /* width */ + byte_value = (imbyte)this->height; + imBinFileWrite(handle, &byte_value, 1, 1); /* height */ + byte_value = (imbyte)((this->bpp > 8)? 0: this->palette_count); + imBinFileWrite(handle, &byte_value, 1, 1); /* color count */ + imBinFileWrite(handle, (void*)"\0", 1, 1); /* reserved */ + word_value = 1; + imBinFileWrite(handle, &word_value, 1, 2); /* planes */ + word_value = this->bpp; + imBinFileWrite(handle, &word_value, 1, 2); /* bit count */ + int and_line_size = imFileLineSizeAligned(this->width, 1, 4); + int resource_size = 40 + palette_size + (line_raw_size + and_line_size) * this->height; + unsigned int dword_value = resource_size; + imBinFileWrite(handle, &dword_value, 1, 4); /* resource size */ + dword_value = this->next_offset; + imBinFileWrite(handle, &dword_value, 1, 4); /* data offset */ + + this->offset[this->image_count] = this->next_offset; + this->next_offset += resource_size; + + /* writes the image */ + + imBinFileSeekTo(handle, this->offset[this->image_count]); + + dword_value = 40; + imBinFileWrite(handle, &dword_value, 1, 4); /* header size */ + dword_value = this->width; + imBinFileWrite(handle, &dword_value, 1, 4); /* width */ + dword_value = this->height*2; + imBinFileWrite(handle, &dword_value, 1, 4); /* height */ + word_value = 1; + imBinFileWrite(handle, &word_value, 1, 2); /* planes */ + word_value = this->bpp; + imBinFileWrite(handle, &word_value, 1, 2); /* bpp */ + dword_value = 0; + imBinFileWrite(handle, &dword_value, 1, 4); /* compression */ + dword_value = line_raw_size * this->height; + imBinFileWrite(handle, &dword_value, 1, 4); /* data size */ + + imBinFileWrite(handle, (void*)"\0\0\0\0\0\0\0\0", 8, 1); /* resolution */ + + dword_value = (this->bpp > 8)? 0: this->palette_count; + imBinFileWrite(handle, &dword_value, 1, 4); /* colors used */ + dword_value = 0; + imBinFileWrite(handle, &dword_value, 1, 4); /* colors important (all) */ + + /* tests if everything was ok */ + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->bpp < 24) + return WritePalette(); + + return IM_ERR_NONE; +} + +int imFileFormatICO::ReadPalette() +{ + /* reads the color palette */ + unsigned char bmp_colors[256 * 4]; + imBinFileRead(handle, bmp_colors, this->palette_count * 4, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + /* convert the color map to the IM format */ + for (int c = 0; c < this->palette_count; c++) + { + int i = c * 4; + this->palette[c] = imColorEncode(bmp_colors[i + 2], + bmp_colors[i + 1], + bmp_colors[i]); + } + + return IM_ERR_NONE; +} + +int imFileFormatICO::WritePalette() +{ + unsigned char bmp_colors[256 * 4]; + + /* convert the color map to the IM format */ + for (int c = 0; c < this->palette_count; c++) + { + int i = c * 4; + imColorDecode(&bmp_colors[i + 2], &bmp_colors[i + 1], &bmp_colors[i], this->palette[c]); + bmp_colors[i + 3] = 0; + } + + /* writes the color palette */ + imBinFileWrite(handle, bmp_colors, this->palette_count * 4, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +void imFileFormatICO::FixRGBOrder() +{ + if (this->bpp == 24) + { + imbyte* byte_data = (imbyte*)this->line_buffer; + for (int x = 0; x < this->width; x++) + { + int c = x*3; + imbyte temp = byte_data[c]; // swap R and B + byte_data[c] = byte_data[c+2]; + byte_data[c+2] = temp; + } + } + else /* bpp == 32 */ + { + /* inverts the DWORD values if not intel */ + if (imBinCPUByteOrder() == IM_BIGENDIAN) + imBinSwapBytes4(this->line_buffer, this->width); + + unsigned int* dword_data = (unsigned int*)this->line_buffer; + imbyte* byte_data = (imbyte*)this->line_buffer; + + for (int x = 0; x < this->width; x++) + { + unsigned int dword_value = dword_data[x]; + int c = x*4; + byte_data[c] = (imbyte)((0x00FF0000 & dword_value) >> 16); + byte_data[c+1] = (imbyte)((0x0000FF00 & dword_value) >> 8); + byte_data[c+2] = (imbyte)((0x000000FF & dword_value) >> 0); + byte_data[c+3] = (imbyte)((0xFF000000 & dword_value) >> 24); + } + } +} + +static inline int PixelOffset(int is_top_down, int is_packed, int width, int height, int depth, int col, int row, int plane) +{ + if (is_top_down) + row = height-1 - row; + + if (is_packed) + return row*width*depth + col*depth + plane; + else + return plane*width*height + row*width + col; +} + +int imFileFormatICO::ReadImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Reading ICO..."); + + for (int row = 0; row < this->height; row++) + { + imBinFileRead(handle, this->line_buffer, this->line_raw_size, 1); + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->bpp > 8) + FixRGBOrder(); + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + if ((imColorModeHasAlpha(this->user_color_mode) && this->bpp!=32) || /* user has alpha and file does not have alpha -> alpha came from AND data */ + imColorModeSpace(this->user_color_mode) == IM_MAP) /* or MAP */ + { + int line_size = imFileLineSizeAligned(this->width, 1, 4); + int image_size = this->height*line_size; + imbyte* and_data = new imbyte[image_size]; + + imBinFileRead(handle, and_data, image_size, 1); + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + imbyte* and_data_line = and_data; + imbyte* user_data = (imbyte*)data; + unsigned long histo[256]; + int depth = imColorModeDepth(this->user_color_mode); + int alpha_plane = 0; + if (imColorModeHasAlpha(this->user_color_mode)) + alpha_plane = depth - 1; + else + memset(histo, 0, 256*sizeof(unsigned long)); + + for (int j = 0; j < this->height; j++) + { + for (int i = 0; i < this->width; i++) + { + int offset = PixelOffset(imColorModeIsTopDown(this->user_color_mode), + imColorModeIsPacked(this->user_color_mode), + this->width, this->height, depth, i, j, alpha_plane); + + if (imColorModeHasAlpha(this->user_color_mode)) + { + if (((and_data_line[i / 8] >> (7 - i % 8)) & 0x01)) + user_data[offset] = 0; + else + user_data[offset] = 255; + } + else + { + /* the most repeated index with transparency will be the transparent index. */ + if (((and_data_line[i / 8] >> (7 - i % 8)) & 0x01)) + histo[user_data[offset]]++; + } + } + and_data_line += line_size; + } + + if (imColorModeSpace(this->user_color_mode) == IM_MAP) + { + imbyte transp_index = 0; + unsigned long histo_max = histo[0]; + + for (int i = 1; i < 256; i++) + { + if (histo_max < histo[i]) + { + histo_max = histo[i]; + transp_index = (imbyte)i; + } + } + AttribTable()->Set("TransparencyIndex", IM_BYTE, 1, &transp_index); + } + + delete [] and_data; + } + + return IM_ERR_NONE; +} + +int imFileFormatICO::WriteImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Writing ICO..."); + + /* Image Data */ + + for (int row = 0; row < this->height; row++) + { + imFileLineBufferWrite(this, data, row, 0); + + if (this->bpp > 8) + FixRGBOrder(); + + imBinFileWrite(handle, this->line_buffer, this->line_raw_size, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + /* AND Data */ + + int and_line_size = imFileLineSizeAligned(this->width, 1, 4); + int and_size = this->height*and_line_size; + imbyte* and_data = new imbyte[and_size]; + memset(and_data, 0, and_size); /* zero = opaque */ + + if (imColorModeHasAlpha(this->user_color_mode)) + { + imbyte* and_data_line = and_data; + imbyte* user_data = (imbyte*)data; + int depth = imColorModeDepth(this->user_color_mode); + int alpha_plane = depth - 1; + + for (int j = 0; j < this->height; j++) + { + for (int i = 0; i < this->width; i++) + { + int offset = PixelOffset(imColorModeIsTopDown(this->user_color_mode), + imColorModeIsPacked(this->user_color_mode), + this->width, this->height, depth, i, j, alpha_plane); + + if (user_data[offset] == 0) /* mark only full transparent pixels */ + and_data_line[i / 8] |= (0x01 << (7 - (i % 8))); + } + and_data_line += and_line_size; + } + } + else + { + const imbyte* transp_index = (const imbyte*)AttribTable()->Get("TransparencyIndex"); + if (imColorModeSpace(this->user_color_mode) == IM_MAP && transp_index) + { + imbyte* and_data_line = and_data; + imbyte* user_data = (imbyte*)data; + int depth = imColorModeDepth(this->user_color_mode); + + for (int j = 0; j < this->height; j++) + { + for (int i = 0; i < this->width; i++) + { + int offset = PixelOffset(imColorModeIsTopDown(this->user_color_mode), + imColorModeIsPacked(this->user_color_mode), + this->width, this->height, depth, i, j, 0); + + if (user_data[offset] == *transp_index) + and_data_line[i / 8] |= (0x01 << (7 - (i % 8))); + } + and_data_line += and_line_size; + } + } + } + + imBinFileWrite(handle, and_data, and_size, 1); + delete [] and_data; + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + this->image_count++; + + return IM_ERR_NONE; +} + +int imFormatICO::CanWrite(const char* compression, int color_mode, int data_type) const +{ + int color_space = imColorModeSpace(color_mode); + + if (color_space == IM_YCBCR || color_space == IM_LAB || + color_space == IM_LUV || color_space == IM_XYZ || + color_space == IM_CMYK) + return IM_ERR_DATA; + + if (data_type != IM_BYTE) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "NONE")) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} diff --git a/im/src/im_format_krn.cpp b/im/src/im_format_krn.cpp new file mode 100755 index 0000000..a47d650 --- /dev/null +++ b/im/src/im_format_krn.cpp @@ -0,0 +1,325 @@ +/** \file + * \brief KRN - IM Kernel File Format + * + * See Copyright Notice in im_lib.h + * $Id: im_format_krn.cpp,v 1.3 2009/10/01 14:15:47 scuri Exp $ + */ + +#include "im_format.h" +#include "im_format_all.h" +#include "im_util.h" +#include "im_counter.h" + +#include "im_binfile.h" + +#include +#include +#include +#include + +static int iKRNReadDescription(imBinFile* handle, char* comment, int *size) +{ + imbyte byte_value = 0; + + // find the first \n + while(byte_value != '\n') + { + imBinFileRead(handle, &byte_value, 1, 1); + if (imBinFileError(handle)) + return 0; + } + + *size = 0; + + // Read up to the next \n + + imBinFileRead(handle, &byte_value, 1, 1); + if (imBinFileError(handle)) + return 0; + + while(byte_value != '\n') + { + if (byte_value != '\r') + { + comment[*size] = byte_value; + (*size)++; + } + + imBinFileRead(handle, &byte_value, 1, 1); + if (imBinFileError(handle)) + return 0; + } + + if (*size != 0) + { + comment[*size] = 0; + (*size)++; + } + + return 1; +} + +static const char* iKRNCompTable[1] = +{ + "NONE" +}; + +class imFileFormatKRN: public imFileFormatBase +{ + imBinFile* handle; /* the binary file handle */ + +public: + imFileFormatKRN(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatKRN() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatKRN: public imFormat +{ +public: + imFormatKRN() + :imFormat("KRN", + "IM Kernel File Format", + "*.krn;", + iKRNCompTable, + 1, + 0) + {} + ~imFormatKRN() {} + + imFileFormatBase* Create(void) const { return new imFileFormatKRN(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + +void imFormatRegisterKRN(void) +{ + imFormatRegister(new imFormatKRN()); +} + +int imFileFormatKRN::Open(const char* file_name) +{ + char sig[9]; + + /* opens the binary file for reading */ + handle = imBinFileOpen(file_name); + if (!handle) + return IM_ERR_OPEN; + + /* reads the KRN format identifier */ + imBinFileRead(handle, sig, 8, 1); + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + sig[8] = 0; + + if (!imStrEqual(sig, "IMKERNEL")) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + this->image_count = 1; + strcpy(this->compression, "NONE"); + + return IM_ERR_NONE; +} + +int imFileFormatKRN::New(const char* file_name) +{ + /* opens the binary file for writing */ + handle = imBinFileNew(file_name); + if (!handle) + return IM_ERR_OPEN; + + this->image_count = 1; + if (!imBinFileWrite(handle, (void*)"IMKERNEL\n", 9, 1)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + return IM_ERR_NONE; +} + +void imFileFormatKRN::Close() +{ + imBinFileClose(handle); +} + +void* imFileFormatKRN::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +int imFileFormatKRN::ReadImageInfo(int index) +{ + (void)index; + this->file_color_mode = IM_GRAY|IM_TOPDOWN; + + char desc[512]; + int desc_size; + if (!iKRNReadDescription(handle, desc, &desc_size)) + return IM_ERR_ACCESS; + + imAttribTable* attrib_table = AttribTable(); + if (desc_size) + attrib_table->Set("Description", IM_BYTE, desc_size, desc); + + if (!imBinFileReadInteger(handle, &this->width)) + return IM_ERR_ACCESS; + + if (!imBinFileReadInteger(handle, &this->height)) + return IM_ERR_ACCESS; + + int type; + if (!imBinFileReadInteger(handle, &type)) + return IM_ERR_ACCESS; + + if (type == 0) + this->file_data_type = IM_INT; + else + this->file_data_type = IM_FLOAT; + + return IM_ERR_NONE; +} + +int imFileFormatKRN::WriteImageInfo() +{ + this->file_data_type = this->user_data_type; + this->file_color_mode = IM_GRAY|IM_TOPDOWN; + + imAttribTable* attrib_table = AttribTable(); + + int attrib_size; + const void* attrib_data = attrib_table->Get("Description", NULL, &attrib_size); + if (attrib_data) + { + char* desc = (char*)attrib_data; + int size = 0; + while(size < (attrib_size-1) && (desc[size] != '\r' && desc[size] != '\n')) + size++; + + imBinFileWrite(handle, desc, size, 1); + } + imBinFileWrite(handle, (void*)"\n", 1, 1); + + imBinFilePrintf(handle, "%d\n", this->width); + imBinFilePrintf(handle, "%d\n", this->height); + + if (this->file_data_type == IM_INT) + imBinFileWrite(handle, (void*)"0\n", 1, 1); + else + imBinFileWrite(handle, (void*)"1\n", 1, 1); + + /* tests if everything was ok */ + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +int imFileFormatKRN::ReadImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Reading KRN..."); + + for (int row = 0; row < this->height; row++) + { + for (int col = 0; col < this->width; col++) + { + if (this->file_data_type == IM_INT) + { + int value; + if (!imBinFileReadInteger(handle, &value)) + return IM_ERR_ACCESS; + + ((int*)this->line_buffer)[col] = value; + } + else + { + float value; + if (!imBinFileReadFloat(handle, &value)) + return IM_ERR_ACCESS; + + ((float*)this->line_buffer)[col] = value; + } + } + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int imFileFormatKRN::WriteImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Writing KRN..."); + + for (int row = 0; row < this->height; row++) + { + imFileLineBufferWrite(this, data, row, 0); + + for (int col = 0; col < this->width; col++) + { + if (this->file_data_type == IM_INT) + { + int value = ((int*)this->line_buffer)[col]; + + if (!imBinFilePrintf(handle, "%d ", value)) + return IM_ERR_ACCESS; + } + else + { + float value = ((float*)this->line_buffer)[col]; + + if (!imBinFilePrintf(handle, "%f ", (double)value)) + return IM_ERR_ACCESS; + } + } + + imBinFileWrite(handle, (void*)"\n", 1, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int imFormatKRN::CanWrite(const char* compression, int color_mode, int data_type) const +{ + int color_space = imColorModeSpace(color_mode); + + if (color_space != IM_GRAY) + return IM_ERR_DATA; + + if (data_type != IM_INT && data_type != IM_FLOAT) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "NONE")) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} diff --git a/im/src/im_format_led.cpp b/im/src/im_format_led.cpp new file mode 100755 index 0000000..7b75443 --- /dev/null +++ b/im/src/im_format_led.cpp @@ -0,0 +1,341 @@ +/** \file + * \brief LED - IUP image in LED + * + * See Copyright Notice in im_lib.h + * $Id: im_format_led.cpp,v 1.3 2009/10/01 14:15:47 scuri Exp $ + */ + +#include "im_format.h" +#include "im_format_all.h" +#include "im_util.h" +#include "im_counter.h" + +#include "im_binfile.h" + +#include +#include +#include +#include + +/* Sample LED Image +LEDImage = IMAGE[ +0 = "0 0 0", +1 = "192 192 192", +2 = "0 0 128", +3 = "255 255 255"] +(20, 19 +,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,0,3,3,3,3,0,0,1,1,1,1,1,1,1,1,1,1,1 +,1,1,0,3,3,3,3,0,3,0,1,1,1,1,1,1,1,1,1,1 +,1,1,0,3,0,0,3,0,2,2,2,2,2,2,1,1,1,1,1,1 +,1,1,0,3,3,3,3,3,2,3,3,3,3,2,2,1,1,1,1,1 +,1,1,0,3,0,0,0,0,2,3,3,3,3,2,3,2,1,1,1,1 +,1,1,0,3,3,3,3,3,2,3,0,0,3,2,2,2,2,1,1,1 +,1,1,0,3,0,0,0,0,2,3,3,3,3,3,3,3,2,1,1,1 +,1,1,0,3,3,3,3,3,2,3,0,0,0,0,0,3,2,1,1,1 +,1,1,0,0,0,0,0,0,2,3,3,3,3,3,3,3,2,1,1,1 +,1,1,1,1,1,1,1,1,2,3,0,0,0,0,0,3,2,1,1,1 +,1,1,1,1,1,1,1,1,2,3,3,3,3,3,3,3,2,1,1,1 +,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,1,1,1 +,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +) +*/ + +static const char* iLEDCompTable[1] = +{ + "NONE" +}; + +class imFileFormatLED: public imFileFormatBase +{ + imBinFile* handle; /* the binary file handle */ + int pal_count; + + int ReadPalette(); + int WritePalette(); + +public: + imFileFormatLED(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatLED() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatLED: public imFormat +{ +public: + imFormatLED() + :imFormat("LED", + "IUP image in LED special format", + "*.led;", + iLEDCompTable, + 1, + 0) + {} + ~imFormatLED() {} + + imFileFormatBase* Create(void) const { return new imFileFormatLED(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + + +void imFormatRegisterLED(void) +{ + imFormatRegister(new imFormatLED()); +} + +int imFileFormatLED::Open(const char* file_name) +{ + char sig[4]; + unsigned char byte_value; + int found = 0; + + /* opens the binary file for reading */ + handle = imBinFileOpen(file_name); + if (!handle) + return IM_ERR_OPEN; + + this->image_count = 1; + strcpy(this->compression, "NONE"); + + imBinFileRead(handle, sig, 3, 1); + sig[3] = 0; + + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + if (!imStrEqual(sig, "LED")) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + unsigned long offset = imBinFileTell(handle); + + /* count the number of colors */ + this->pal_count = -1; // will count the first '=' that is not a color + while (!found) + { + imBinFileRead(handle, &byte_value, 1, 1); + + if (byte_value == '(') + found = 1; + + if (byte_value == '=') + this->pal_count++; + + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + } + + imBinFileSeekTo(handle, offset); + + return IM_ERR_NONE; +} + +int imFileFormatLED::New(const char* file_name) +{ + /* opens the binary file for writing */ + handle = imBinFileNew(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileWrite(handle, (void*)"LEDImage = IMAGE", 16, 1); + + /* tests if everything was ok */ + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + return IM_ERR_NONE; +} + +void imFileFormatLED::Close() +{ + imBinFileClose(handle); +} + +void* imFileFormatLED::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +int imFileFormatLED::ReadImageInfo(int index) +{ + (void)index; + + this->palette_count = this->pal_count; + + if (ReadPalette() != IM_ERR_NONE) + return IM_ERR_ACCESS; + + imBinFileReadInteger(handle, &this->width); + imBinFileReadInteger(handle, &this->height); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + this->file_data_type = IM_BYTE; + this->file_color_mode = IM_MAP; + this->file_color_mode |= IM_TOPDOWN; + + return IM_ERR_NONE; +} + +int imFileFormatLED::WriteImageInfo() +{ + this->file_data_type = IM_BYTE; + this->file_color_mode = imColorModeSpace(this->user_color_mode); + this->file_color_mode |= IM_TOPDOWN; + + if (WritePalette() != IM_ERR_NONE) + return IM_ERR_ACCESS; + + imBinFilePrintf(handle, "(%d, %d\n", this->width, this->height); + + return IM_ERR_NONE; +} + +int imFileFormatLED::ReadPalette() +{ + int c, r, g, b, i; + + /* convert the color map to the IM format */ + for (c = 0; c < this->palette_count; c++) + { + imBinFileReadInteger(handle, &i); + imBinFileReadInteger(handle, &r); + imBinFileReadInteger(handle, &g); + imBinFileReadInteger(handle, &b); + + this->palette[i] = imColorEncode((unsigned char)r, (unsigned char)g, (unsigned char)b); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + + return IM_ERR_NONE; +} + +int imFileFormatLED::WritePalette() +{ + int c; + unsigned char r, g, b; + + imBinFileWrite(handle, (void*)"[\n", 2, 1); + + /* convert the color map from the IM format */ + for (c = 0; c < this->palette_count; c++) + { + imColorDecode(&r, &g, &b, this->palette[c]); + imBinFilePrintf(handle, "%d = \"%d %d %d\"", c, (int)r, (int)g, (int)b); + + if (c != this->palette_count - 1) + imBinFileWrite(handle, (void*)",\n", 2, 1); + } + + imBinFileWrite(handle, (void*)"]\n", 2, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +int imFileFormatLED::ReadImageData(void* data) +{ + int value; + + imCounterTotal(this->counter, this->height, "Reading LED..."); + + for (int row = 0; row < this->height; row++) + { + for (int col = 0; col < this->width; col++) + { + if (!imBinFileReadInteger(handle, &value)) + return IM_ERR_ACCESS; + + ((imbyte*)this->line_buffer)[col] = (unsigned char)value; + } + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int imFileFormatLED::WriteImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Writing LED..."); + + for (int row = 0; row < this->height; row++) + { + imFileLineBufferWrite(this, data, row, 0); + + for (int col = 0; col < this->width; col++) + { + if (!imBinFilePrintf(handle, ",%d", (int)((imbyte*)this->line_buffer)[col])) + return IM_ERR_ACCESS; + } + + imBinFileWrite(handle, (void*)"\n", 1, 1); + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + imBinFileWrite(handle, (void*)")", 1, 1); + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +int imFormatLED::CanWrite(const char* compression, int color_mode, int data_type) const +{ + int color_space = imColorModeSpace(color_mode); + + if (color_space == IM_YCBCR || color_space == IM_LAB || + color_space == IM_LUV || color_space == IM_XYZ || + color_space == IM_CMYK) + return IM_ERR_DATA; + + if (data_type != IM_BYTE) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "NONE")) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} diff --git a/im/src/im_format_pcx.cpp b/im/src/im_format_pcx.cpp new file mode 100755 index 0000000..d340927 --- /dev/null +++ b/im/src/im_format_pcx.cpp @@ -0,0 +1,711 @@ +/** \file + * \brief PCX - ZSoft Picture + * + * See Copyright Notice in im_lib.h + * $Id: im_format_pcx.cpp,v 1.3 2009/08/19 18:39:43 scuri Exp $ + */ + +#include "im_format.h" +#include "im_format_all.h" +#include "im_util.h" +#include "im_counter.h" + +#include "im_binfile.h" + +#include +#include +#include + +#define PCX_ID 0x0A + + +/* PCX file header */ +/* 1 Id; Manufacturer ID */ +/* 1 Version; Version */ +/* 1 Encoding; Encoding Scheme */ +/* 1 BitsPerPixel; Bits/Pixel/Plane */ +/* 2 Xmin; X Start (upper left) */ +/* 2 Ymin; Y Start (top) */ +/* 2 Xmax; X End (lower right) */ +/* 2 Ymax; Y End (bottom) */ +/* 2 Hdpi; Horizontal Resolution */ +/* 2 Vdpi; Vertical Resolution */ +/* 3*16 Colormap; 16-Color EGA Palette */ +/* 1 Reserved; Reserved */ +/* 1 NPlanes; Number of Color Planes */ +/* 2 BytesPerLine; Bytes/Line/Plane */ +/* 2 PaletteInfo; Palette Interpretation */ +/* 2 HScreenSize; Horizontal Screen Size */ +/* 2 VScreenSize; Vertical Screen Size */ +/* 54 Filler; Reserved */ +/* 128 */ + +/* Default 16 color VGA palette */ +static unsigned char iPCXDefaultPalette[3*16] = +{ + 0, 0, 0, + 0, 0, 255, + 0, 255, 0, + 0, 255, 255, + 255, 0, 0, + 255, 0, 255, + 255, 255, 0, + 255, 255, 255, + 85, 85, 255, + 85, 85, 85, + 0, 170, 0, + 170, 0, 0, + 85, 255, 255, + 255, 85, 255, + 255, 255, 85, + 255, 255, 255 +}; + +static int iPCXEncodeScanLine(unsigned char* EncodedBuffer, const unsigned char* DecodedBuffer, int BufferSize) +{ + int index = 0; /* Index into uncompressed data buffer */ + int scanindex = 0; /* Index into compressed data buffer */ + unsigned char runcount; /* Length of encoded pixel run */ + unsigned char runvalue; /* Value of encoded pixel run */ + + while (index < BufferSize) + { + /** Get the run count of the next pixel value run. + ** Pixel value runs are encoded until a different pixel value + ** is encountered, the end of the scan line is reached, or 63 + ** pixel values have been counted. */ + for (runcount = 1, runvalue = DecodedBuffer[index]; + index + runcount < BufferSize && runvalue == DecodedBuffer[index + runcount] && runcount < 63; + runcount++); + + /** Encode the run into a one or two-unsigned char code. + ** Multiple pixel runs are stored in two-unsigned char codes. If a single + ** pixel run has a value of less than 64 then it is stored in a + ** one-unsigned char code. If a single pixel run has a value of 64 to 255 + ** then it is stored in a two-unsigned char code. */ + + if (runcount > 1) /* Multiple pixel run */ + { + EncodedBuffer[scanindex++] = (unsigned char)(runcount | 0xC0); + EncodedBuffer[scanindex++] = runvalue; + } + else /* Single pixel run */ + { + if (DecodedBuffer[index] < 64) /* Value is 0 to 63 */ + EncodedBuffer[scanindex++] = runvalue; + else /* Value is 64 to 255 */ + { + EncodedBuffer[scanindex++] = (unsigned char)(runcount | 0xC0); + EncodedBuffer[scanindex++] = runvalue; + } + } + + index += runcount; /* Jump ahead to next pixel run value */ + } + + return scanindex; /* Return the number of unsigned chars written to buffer */ +} + +static int iPCXDecodeScanLine(imBinFile* handle, unsigned char* DecodedBuffer, int BufferSize) +{ + int index = 0; /* Index into compressed scan line buffer */ + unsigned char data; /* Data byte read from PCX file */ + unsigned char runcount = 0; /* Length of decoded pixel run */ + unsigned char runvalue = 0; /* Value of decoded pixel run */ + + while (index < BufferSize) /* Read until the end of the buffer */ + { + imBinFileRead(handle, &data, 1, 1); + + if ((data & 0xC0) == 0xC0) /* Two-unsigned char code */ + { + runcount = (unsigned char)(data & 0x3F); /* Get run count */ + imBinFileRead(handle, &runvalue, 1, 1); + } + else /* One unsigned char code */ + { + runcount = 1; /* Run count is one */ + runvalue = data; /* Pixel value */ + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + /* Write the pixel run to the buffer */ + for (;runcount && (index < BufferSize); runcount--, index++) + DecodedBuffer[index] = runvalue; /* Assign value to buffer */ + } + + return IM_ERR_NONE; +} + +static const char* iPCXCompTable[2] = +{ + "NONE", + "RLE" +}; + +class imFileFormatPCX: public imFileFormatBase +{ + imBinFile* handle; /* the binary file handle */ + int bpp; /* number of bits per pixel */ + unsigned char version; /* format version */ + unsigned char comp_type; /* PCX compression information */ + int line_raw_size; /* bytes per line per plane */ + + int ReadPalette(); + int WritePalette(); + void Expand4bpp(); + void Pack24bpp(); + void Unpack24bpp(); + +public: + imFileFormatPCX(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatPCX() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatPCX: public imFormat +{ +public: + imFormatPCX() + :imFormat("PCX", + "ZSoft Picture", + "*.pcx;", + iPCXCompTable, + 2, + 0) + {} + ~imFormatPCX() {} + + imFileFormatBase* Create(void) const { return new imFileFormatPCX(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + + +void imFormatRegisterPCX(void) +{ + imFormatRegister(new imFormatPCX()); +} + +int imFileFormatPCX::Open(const char* file_name) +{ + unsigned char id; + + /* opens the binary file for reading with intel unsigned char order */ + handle = imBinFileOpen(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_LITTLEENDIAN); + + /* reads the PCX format identifier */ + imBinFileRead(handle, &id, 1, 1); + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + if (id != PCX_ID) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + /* reads the format version */ + imBinFileRead(handle, &this->version, 1, 1); + + /* reads the compression comp_type */ + imBinFileRead(handle, &this->comp_type, 1, 1); + if (this->comp_type) + strcpy(this->compression, "RLE"); + else + strcpy(this->compression, "NONE"); + + this->image_count = 1; + + return IM_ERR_NONE; +} + +int imFileFormatPCX::New(const char* file_name) +{ + /* opens the binary file for writing with intel byte order */ + handle = imBinFileNew(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_LITTLEENDIAN); + + return IM_ERR_NONE; +} + +void imFileFormatPCX::Close() +{ + imBinFileClose(handle); +} + +void* imFileFormatPCX::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +int imFileFormatPCX::ReadImageInfo(int index) +{ + unsigned char bppp, planes; + unsigned short xmin, xmax, ymax, ymin, word, bplp; + (void)index; + + this->file_data_type = IM_BYTE; + + /* reads the Number of bits/pixel per plane */ + imBinFileRead(handle, &bppp, 1, 1); + + /* reads the image width and height */ + imBinFileRead(handle, &xmin, 1, 2); + imBinFileRead(handle, &ymin, 1, 2); + imBinFileRead(handle, &xmax, 1, 2); + imBinFileRead(handle, &ymax, 1, 2); + this->width = xmax - xmin + 1; + this->height = ymax - ymin + 1; + + imAttribTable* attrib_table = AttribTable(); + + if (xmin && ymin) + { + attrib_table->Set("XScreen", IM_USHORT, 1, &xmin); + attrib_table->Set("YScreen", IM_USHORT, 1, &ymin); + } + + /* read the x resolution */ + imBinFileRead(handle, &word, 1, 2); + float xres = word; + + /* read the y resolution */ + imBinFileRead(handle, &word, 1, 2); + float yres = word; + + if (xres && yres) + { + attrib_table->Set("XResolution", IM_FLOAT, 1, &xres); + attrib_table->Set("YResolution", IM_FLOAT, 1, &yres); + attrib_table->Set("ResolutionUnit", IM_BYTE, -1, "DPI"); + } + + /* jump 3*16+1 bytes (colormap + reserved) */ + imBinFileSeekOffset(handle, 3*16+1); + + /* reads the Number of color planes */ + imBinFileRead(handle, &planes, 1, 1); + this->bpp = bppp * planes; + + /* reads the Number of bytes per scan line per color planes */ + imBinFileRead(handle, &bplp, 1, 2); + this->line_raw_size = bplp * planes; + this->line_buffer_extra = 2; // room enough for padding + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + // sanity check + if (this->bpp != 1 && this->bpp != 4 && + this->bpp != 8 && this->bpp != 24) + return IM_ERR_DATA; + + if (this->bpp > 8) + { + this->file_color_mode = IM_RGB; + this->file_color_mode |= IM_PACKED; + this->line_buffer_extra += 3*this->width; // room for 24 bpp packing + } + else + { + this->file_color_mode = IM_MAP; + this->palette_count = 1 << this->bpp; + + if (this->bpp == 1) // only 1 bpp, 4 bpp will be expanded here + this->convert_bpp = 1; + + if (this->bpp == 4) + this->line_buffer_extra += this->width; // room for 4 bpp expansion + } + + this->file_color_mode |= IM_TOPDOWN; + + if (this->bpp <= 8) + return ReadPalette(); + + return IM_ERR_NONE; +} + +int imFileFormatPCX::WriteImageInfo() +{ + unsigned short word_value, bplp; + unsigned char byte_value, filler[54+3*2]; + + this->file_data_type = IM_BYTE; + + this->file_color_mode = imColorModeSpace(this->user_color_mode); + + if (imStrEqual(this->compression, "NONE")) + this->comp_type = (unsigned char)0; + else + this->comp_type = (unsigned char)1; + + if (this->file_color_mode == IM_BINARY) + { + this->bpp = 1; + this->convert_bpp = 1; + } + else if (this->file_color_mode == IM_RGB) + { + this->bpp = 24; + this->file_color_mode |= IM_PACKED; + } + else + this->bpp = 8; + + this->file_color_mode |= IM_TOPDOWN; + + int planes = imColorModeDepth(this->file_color_mode); + bplp = (unsigned short)imFileLineSizeAligned(this->width, this->bpp/planes, 2); + this->line_raw_size = bplp * planes; + this->line_buffer_extra = 2; // room enough for padding + + if (this->comp_type || this->bpp == 24) + { + // allocates room for 24 bpp packing/unpacking and/or compression + // allocates more than enough since compression algoritm can be ineficient + this->line_buffer_extra += 2*this->line_raw_size; + } + + this->version = 5; + + imAttribTable* attrib_table = AttribTable(); + /* writes the PCX file header */ + + unsigned short xmin = 0, ymin = 0; + const void* attrib_data = attrib_table->Get("XScreen"); + if (attrib_data) xmin = *(unsigned short*)attrib_data; + attrib_data = attrib_table->Get("YScreen"); + if (attrib_data) ymin = *(unsigned short*)attrib_data; + + byte_value = PCX_ID; + imBinFileWrite(handle, &byte_value, 1, 1); /* identifier */ + imBinFileWrite(handle, &this->version, 1, 1); /* format version */ + imBinFileWrite(handle, &this->comp_type, 1, 1); /* compression comp_type */ + byte_value = (imbyte)(this->bpp/planes); + imBinFileWrite(handle, &byte_value, 1, 1); /* bits/pixel/plane */ + word_value = xmin; + imBinFileWrite(handle, &word_value, 1, 2); /* xmin */ + word_value = ymin; + imBinFileWrite(handle, &word_value, 1, 2); /* ymin */ + word_value = (unsigned short)(this->width - 1) + xmin; + imBinFileWrite(handle, &word_value, 1, 2); /* xmax */ + word_value = (unsigned short)(this->height - 1) + ymin; + imBinFileWrite(handle, &word_value, 1, 2); /* ymax */ + + unsigned short hdpi = 0, vdpi = 0; + attrib_data = attrib_table->Get("ResolutionUnit"); + if (attrib_data) + { + char* res_unit = (char*)attrib_data; + + float* xres = (float*)attrib_table->Get("XResolution"); + float* yres = (float*)attrib_table->Get("YResolution"); + + if (imStrEqual(res_unit, "DPC")) + { + hdpi = (unsigned short)(*xres * 2.54); + vdpi = (unsigned short)(*yres * 2.54); + } + } + + /* write the x resolution */ + word_value = hdpi; + imBinFileWrite(handle, &word_value, 1, 2); /* hdpi */ + + /* write the y resolution */ + word_value = vdpi; + imBinFileWrite(handle, &word_value, 1, 2); /* vdpi */ + + imBinFileWrite(handle, iPCXDefaultPalette, 3*16, 1); /* 16 colors palette */ + byte_value = 0; + imBinFileWrite(handle, &byte_value, 1, 1); /* reserved */ + byte_value = (imbyte)planes; + imBinFileWrite(handle, &byte_value, 1, 1); /* planes */ + word_value = bplp; + imBinFileWrite(handle, &word_value, 1, 2); /* bytes per line per plane */ + memset(filler, 0, 54+3*2); + imBinFileWrite(handle, filler, 54+3*2, 1); /* palette info, hscreen size, vscreen size, filler */ + + /* tests if everything was ok */ + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +int imFileFormatPCX::ReadPalette() +{ + unsigned char pcx_colors[256 * 3]; + + if (this->version == 5 && this->bpp == 1) + { + pcx_colors[0] = 0; pcx_colors[1] = 0; pcx_colors[2] = 0; + pcx_colors[3] = 255; pcx_colors[4] = 255; pcx_colors[5] = 255; + } + else if (this->version == 5 && this->bpp == 8) + { + unsigned char ExtPal; + + /* jump to the end of file minus the palette data */ + imBinFileSeekFrom(handle, -769); + + /* reads palette identifier */ + imBinFileRead(handle, &ExtPal, 1, 1); + + if (ExtPal != 12) + return IM_ERR_ACCESS; + + /* reads palette colors */ + imBinFileRead(handle, pcx_colors, 768, 1); + } + else if (this->version == 3) + { + memcpy(pcx_colors, iPCXDefaultPalette, this->palette_count * 3); + } + else + { + /* jump to the begining of the file at the start of the palette data */ + imBinFileSeekTo(handle, 4+6*2); + + /* reads palette colors */ + imBinFileRead(handle, pcx_colors, 3 * 16, 1); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + /* convert the color map to the IM format */ + for (int c = 0; c < this->palette_count; c++) + { + int i = c * 3; + this->palette[c] = imColorEncode(pcx_colors[i], pcx_colors[i+1], pcx_colors[i+2]); + } + + return IM_ERR_NONE; +} + +int imFileFormatPCX::WritePalette() +{ + unsigned char ExtPal = (unsigned char)12; + unsigned char pcx_colors[256 * 3]; + + /* convert the color map to the IM format */ + for (int c = 0; c < this->palette_count; c++) + { + int i = c * 3; + imColorDecode(&pcx_colors[i], &pcx_colors[i+1], &pcx_colors[i+2], this->palette[c]); + } + + /* writes the palette identifier */ + imBinFileWrite(handle, &ExtPal, 1, 1); + + /* writes the color palette */ + imBinFileWrite(handle, pcx_colors, 256 * 3, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +void imFileFormatPCX::Expand4bpp() +{ + int num_bits = 8, WidthDiv8 = (this->width + 7) / 8; + + int line_plane_size = this->line_raw_size / 4; + imbyte *in_data = (unsigned char*)this->line_buffer; + imbyte *out_data = in_data + this->line_buffer_size+2; + + for (int x = 0; x < WidthDiv8; x++) + { + imbyte b1 = in_data[x]; + imbyte b2 = (in_data + line_plane_size)[x]; + imbyte b3 = (in_data + 2 * line_plane_size)[x]; + imbyte b4 = (in_data + 3 * line_plane_size)[x]; + + if (x == WidthDiv8-1) + num_bits = this->width % 8; + + for (int b = 0; b < num_bits; b++) + { + imbyte byte_value = 0; + + /* If the most significant bit is set... */ + /* Set the appropriate bit in the higher order nibble */ + if (b1 & '\x80') byte_value |= 0x01; + if (b2 & '\x80') byte_value |= 0x02; + if (b3 & '\x80') byte_value |= 0x04; + if (b4 & '\x80') byte_value |= 0x08; + b1<<=1; b2<<=1; b3<<=1; b4<<=1; + + *out_data++ = byte_value; + } + } + + memcpy(this->line_buffer, in_data + this->line_buffer_size+2, this->width); +} + +void imFileFormatPCX::Pack24bpp() +{ + imbyte *in_data = (unsigned char*)this->line_buffer; + imbyte *out_data = in_data + this->line_buffer_size+2; + + int line_plane_size = this->line_raw_size / 3; + + imbyte *red = in_data; + imbyte *green = in_data + line_plane_size; + imbyte *blue = in_data + 2*line_plane_size; + + for (int i = 0; i < this->width; i++) + { + *out_data++ = *red++; + *out_data++ = *green++; + *out_data++ = *blue++; + } + + memcpy(in_data, in_data + this->line_buffer_size+2, this->line_raw_size); +} + +void imFileFormatPCX::Unpack24bpp() +{ + imbyte *in_data = (unsigned char*)this->line_buffer; + imbyte *out_data = in_data + this->line_buffer_size+2; + + int line_plane_size = this->line_raw_size / 3; + + imbyte *red = out_data; + imbyte *green = out_data + line_plane_size; + imbyte *blue = out_data + 2*line_plane_size; + + for (int i = 0; i < this->width; i++) + { + *red++ = *in_data++; + *green++ = *in_data++; + *blue++ = *in_data++; + } + + memcpy(out_data - (this->line_buffer_size+2), out_data, this->line_raw_size); +} + +int imFileFormatPCX::ReadImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Reading PCX..."); + + imBinFileSeekTo(handle, 128); + + for (int row = 0; row < this->height; row++) + { + /* read and decompress the data */ + if (this->comp_type) + { + if (iPCXDecodeScanLine(handle, (imbyte*)this->line_buffer, this->line_raw_size) == IM_ERR_ACCESS) + return IM_ERR_ACCESS; + } + else + { + imBinFileRead(handle, this->line_buffer, this->line_raw_size, 1); + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + + if (this->bpp == 4) + Expand4bpp(); + + if (this->bpp == 24) + Pack24bpp(); + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int imFileFormatPCX::WriteImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Writing PCX..."); + + imBinFileSeekTo(handle, 128); + + imbyte* compressed_buffer = NULL; + if (this->comp_type) // point to the extra buffer + compressed_buffer = (imbyte*)this->line_buffer + this->line_buffer_size+2; + + for (int row = 0; row < this->height; row++) + { + imFileLineBufferWrite(this, data, row, 0); + + if (this->bpp == 24) + Unpack24bpp(); + + /* compress and writes the data */ + /* the compressed buffer size will probably be diferent from the uncompressed buffer size */ + if (this->comp_type) + { + int compressed_size = iPCXEncodeScanLine(compressed_buffer, (imbyte*)this->line_buffer, this->line_raw_size); + imBinFileWrite(handle, compressed_buffer, compressed_size, 1); + } + else + { + imBinFileWrite(handle, this->line_buffer, this->line_raw_size, 1); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + if (this->bpp == 8) + return WritePalette(); + + return IM_ERR_NONE; +} + +int imFormatPCX::CanWrite(const char* compression, int color_mode, int data_type) const +{ + int color_space = imColorModeSpace(color_mode); + + if (color_space == IM_YCBCR || color_space == IM_LAB || + color_space == IM_LUV || color_space == IM_XYZ || + color_space == IM_CMYK) + return IM_ERR_DATA; + + if (data_type != IM_BYTE) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "NONE") && !imStrEqual(compression, "RLE")) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} diff --git a/im/src/im_format_pnm.cpp b/im/src/im_format_pnm.cpp new file mode 100755 index 0000000..9347ddc --- /dev/null +++ b/im/src/im_format_pnm.cpp @@ -0,0 +1,483 @@ +/** \file + * \brief PNM - Netpbm Portable Image Map + * + * See Copyright Notice in im_lib.h + * $Id: im_format_pnm.cpp,v 1.3 2009/10/01 14:15:47 scuri Exp $ + */ + +#include "im_format.h" +#include "im_format_all.h" +#include "im_util.h" +#include "im_counter.h" + +#include "im_binfile.h" + +#include +#include +#include + + +/* comments start with '#' after the first \n */ +static int iPNMReadComment(imBinFile* handle, char* comment, int *size) +{ + imbyte byte_value = 0; + + // find the first \n + while(byte_value != '\n') + { + imBinFileRead(handle, &byte_value, 1, 1); + if (imBinFileError(handle)) + return 0; + } + + *size = 0; + + imBinFileRead(handle, &byte_value, 1, 1); + if (imBinFileError(handle)) + return 0; + + if (byte_value == '#') + { + while(byte_value != '\n') + { + imBinFileRead(handle, &byte_value, 1, 1); + if (imBinFileError(handle)) + return 0; + + if (byte_value != '\r') + { + comment[*size] = byte_value; + (*size)++; + } + } + } + else + imBinFileSeekOffset(handle, -1); + + if (*size != 0) + { + comment[*size] = 0; + (*size)++; + } + + return 1; +} + +static const char* iPNMCompTable[2] = +{ + "NONE", + "ASCII" +}; + +class imFileFormatPNM: public imFileFormatBase +{ + imBinFile* handle; /* the binary file handle */ + unsigned char image_type; + + void FixBinary(); + +public: + imFileFormatPNM(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatPNM() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatPNM: public imFormat +{ +public: + imFormatPNM() + :imFormat("PNM", + "Netpbm Portable Image Map", + "*.pnm;*.pbm;*.ppm;*.pgm;", + iPNMCompTable, + 2, + 1) + {} + ~imFormatPNM() {} + + imFileFormatBase* Create(void) const { return new imFileFormatPNM(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + + +void imFormatRegisterPNM(void) +{ + imFormatRegister(new imFormatPNM()); +} + +int imFileFormatPNM::Open(const char* file_name) +{ + unsigned char sig[2]; + + /* opens the binary file for reading */ + handle = imBinFileOpen(file_name); + if (!handle) + return IM_ERR_OPEN; + + /* reads the PNM format identifier */ + imBinFileRead(handle, sig, 2, 1); + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + if (sig[0] != 'P' || (sig[1] != '1' && sig[1] != '2' && + sig[1] != '3' && sig[1] != '4' && + sig[1] != '5' && sig[1] != '6')) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + this->image_type = sig[1]; + this->image_count = 1; // increment this if found image after data + + if (this->image_type == '1' || this->image_type == '2' || this->image_type == '3') + strcpy(this->compression, "ASCII"); + else + strcpy(this->compression, "NONE"); + + return IM_ERR_NONE; +} + +int imFileFormatPNM::New(const char* file_name) +{ + /* opens the binary file for writing */ + handle = imBinFileNew(file_name); + if (!handle) + return IM_ERR_OPEN; + + this->image_count = 1; + + return IM_ERR_NONE; +} + +void imFileFormatPNM::Close() +{ + imBinFileClose(handle); +} + +void* imFileFormatPNM::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +int imFileFormatPNM::ReadImageInfo(int index) +{ + (void)index; + + switch (this->image_type) + { + case '4': + this->convert_bpp = 1; + case '1': + this->file_color_mode = IM_BINARY; + break; + case '2': + case '5': + this->file_color_mode = IM_GRAY; + break; + case '3': + case '6': + this->file_color_mode = IM_RGB | IM_PACKED; + break; + } + + this->file_color_mode |= IM_TOPDOWN; + + imAttribTable* attrib_table = AttribTable(); + + char comment[4096]; + int size; + if (!iPNMReadComment(handle, comment, &size)) + return IM_ERR_ACCESS; + + if (size) + attrib_table->Set("Description", IM_BYTE, size, comment); + + if (!imBinFileReadInteger(handle, &this->width)) + return IM_ERR_ACCESS; + + if (!imBinFileReadInteger(handle, &this->height)) + return IM_ERR_ACCESS; + + if (this->height <= 0 || this->width <= 0) + return IM_ERR_DATA; + + int max_val = 255; + if (this->image_type != '4' && this->image_type != '1') + { + if (!imBinFileReadInteger(handle, &max_val)) + return IM_ERR_ACCESS; + } + + this->file_data_type = IM_BYTE; + if (max_val > 255) + this->file_data_type = IM_USHORT; + + return IM_ERR_NONE; +} + +int imFileFormatPNM::WriteImageInfo() +{ + this->file_data_type = this->user_data_type; + this->file_color_mode = imColorModeSpace(this->user_color_mode); + + int ascii; + if (imStrEqual(this->compression, "ASCII")) + ascii = 1; + else + ascii = 0; + + switch (this->file_color_mode) + { + case IM_BINARY: + if (ascii) + this->image_type = '1'; + else + { + this->image_type = '4'; + this->convert_bpp = 1; + } + break; + case IM_GRAY: + if (ascii) + this->image_type = '2'; + else + this->image_type = '5'; + break; + case IM_RGB: + if (ascii) + this->image_type = '3'; + else + this->image_type = '6'; + this->file_color_mode |= IM_PACKED; + break; + } + + this->file_color_mode |= IM_TOPDOWN; + + imBinFilePrintf(handle, "P%c\n", (int)this->image_type); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + imAttribTable* attrib_table = AttribTable(); + + int attrib_size; + const void* attrib_data = attrib_table->Get("Description", NULL, &attrib_size); + if (attrib_data) + { + char* desc = (char*)attrib_data; + int size = 0; + while(size < (attrib_size-1) && (desc[size] != '\r' && desc[size] != '\n')) + size++; + + imBinFileWrite(handle, (void*)"#", 1, 1); + imBinFileWrite(handle, desc, size, 1); + imBinFileWrite(handle, (void*)"\n", 1, 1); + } + + imBinFilePrintf(handle, "%d\n", this->width); + imBinFilePrintf(handle, "%d\n", this->height); + + if (this->image_type != '4' && this->image_type != '1') + { + int max_val = 255; + if (this->file_data_type == IM_USHORT) + max_val = 65535; + + imBinFilePrintf(handle, "%d\n", max_val); + } + + /* tests if everything was ok */ + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +void imFileFormatPNM::FixBinary() +{ + unsigned char* buf = (unsigned char*)this->line_buffer; + for (int b = 0; b < this->line_buffer_size; b++) + { + *buf = ~(*buf); + buf++; + } +} + +int imFileFormatPNM::ReadImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Reading PNM..."); + + int line_count = imImageLineCount(this->width, this->file_color_mode); + + int line_raw_size; + if (this->image_type == '4') + line_raw_size = imFileLineSizeAligned(this->width, 1, 1); + else + line_raw_size = imImageLineSize(this->width, this->file_color_mode, this->file_data_type); + + int ascii = 0; + if (this->image_type == '1' || this->image_type == '2' || this->image_type == '3') + ascii = 1; + + for (int row = 0; row < this->height; row++) + { + if (ascii) + { + int value; + for (int col = 0; col < line_count; col++) + { + if (!imBinFileReadInteger(handle, &value)) + return IM_ERR_ACCESS; + + if (this->image_type == '1' && value < 2) + value = 1 - value; + + if (this->file_data_type == IM_USHORT) + ((imushort*)this->line_buffer)[col] = (imushort)value; + else + ((imbyte*)this->line_buffer)[col] = (unsigned char)value; + } + } + else + { + imBinFileRead(handle, this->line_buffer, line_raw_size, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->image_type == '4') + FixBinary(); + } + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + // try to find another image, ignore errors from here + + /* reads the PNM format identifier */ + unsigned char sig[2]; + imBinFileRead(handle, sig, 2, 1); + if (imBinFileError(handle)) + return IM_ERR_NONE; + + if (sig[0] != 'P' || (sig[1] != '1' && sig[1] != '2' && + sig[1] != '3' && sig[1] != '4' && + sig[1] != '5' && sig[1] != '6')) + return IM_ERR_NONE; + + this->image_type = sig[1]; + this->image_count++; + + if (this->image_type == '1' || this->image_type == '2' || this->image_type == '3') + strcpy(this->compression, "ASCII"); + else + strcpy(this->compression, "NONE"); + + return IM_ERR_NONE; +} + +int imFileFormatPNM::WriteImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Writing PNM..."); + + int line_count = imImageLineCount(this->width, this->file_color_mode); + + int line_raw_size; + if (this->image_type == '4') + line_raw_size = imFileLineSizeAligned(this->width, 1, 1); + else + line_raw_size = imImageLineSize(this->width, this->file_color_mode, this->file_data_type); + + int ascii = 0; + if (this->image_type == '1' || this->image_type == '2' || this->image_type == '3') + ascii = 1; + + for (int row = 0; row < this->height; row++) + { + imFileLineBufferWrite(this, data, row, 0); + + if (ascii) + { + int line_size = 0; + for (int col = 0; col < line_count; col++) + { + int value; + if (this->file_data_type == IM_USHORT) + value = ((imushort*)this->line_buffer)[col]; + else + value = ((imbyte*)this->line_buffer)[col]; + + if (this->image_type == '1' && value < 2) + value = 1 - value; + + int write_size = imBinFilePrintf(handle, "%d ", value); + if (!write_size) + return IM_ERR_ACCESS; + + line_size += write_size; + + // No line should be longer than 70 characters. + if (line_size > 60 || col == line_count-1) + { + line_size = 0; + imBinFileWrite(handle, (void*)"\n", 1, 1); + } + } + } + else + { + if (this->image_type == '4') + FixBinary(); + + imBinFileWrite(handle, this->line_buffer, line_raw_size, 1); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int imFormatPNM::CanWrite(const char* compression, int color_mode, int data_type) const +{ + int color_space = imColorModeSpace(color_mode); + + if (color_space == IM_YCBCR || color_space == IM_LAB || + color_space == IM_LUV || color_space == IM_XYZ || + color_space == IM_CMYK || color_space == IM_MAP) + return IM_ERR_DATA; + + if (data_type != IM_BYTE && data_type != IM_USHORT) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "NONE") && !imStrEqual(compression, "ASCII")) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} diff --git a/im/src/im_format_ras.cpp b/im/src/im_format_ras.cpp new file mode 100755 index 0000000..1960c49 --- /dev/null +++ b/im/src/im_format_ras.cpp @@ -0,0 +1,608 @@ +/** \file + * \brief RAS - Sun Raster File + * + * See Copyright Notice in im_lib.h + * $Id: im_format_ras.cpp,v 1.2 2008/12/03 15:45:34 scuri Exp $ + */ + +#include "im_format.h" +#include "im_format_all.h" +#include "im_util.h" +#include "im_counter.h" + +#include "im_binfile.h" + +#include +#include +#include + +/* File Header Structure. */ +/* 4 Magic; magic number */ +/* 4 BufferSize; width (pixels) of image */ +/* 4 Height; height (pixels) of image */ +/* 4 Depth; depth (1, 8, 24, or 32) of pixel */ +/* 4 Length; length (bytes) of image */ +/* 4 Type; type of file; see RT_OLD below */ +/* 4 MapType; type of colormap; see RAS_NONE below */ +/* 4 MapLength; length (bytes) of following map */ +/* 32 */ + +#define RAS_ID 0x59A66A95 + +/* Sun supported ras_type's */ +#define RAS_OLD 0 /* Raw pixrect image in 68000 byte order */ +#define RAS_STANDARD 1 /* Raw pixrect image in 68000 byte order */ +#define RAS_BYTE_ENCODED 2 /* Run-length compression of bytes */ +#define RAS_EXPERIMENTAL 0xffff /* Reserved for testing */ + +#define RAS_ESCAPE 0x80 + +/* Sun supported ras_maptype's */ +#define RAS_NONE 0 /* ras_maplength is expected to be 0 */ +#define RAS_EQUAL_RGB 1 /* red[ras_maplength/3],green[],blue[] */ +#define RAS_RAW 2 /* Sun registered ras_maptype's */ + + +/* NOTES: + * Each line of the image is rounded out to a multiple of 16 bits. + * This corresponds to the rounding convention used by the memory pixrect + * package (/usr/include/pixrect/memvar.h) of the SunWindows system. + * The ras_encoding field (always set to 0 by Sun's supported software) + * was renamed to ras_length in release 2.0. As a result, rasterfiles + * of type 0 generated by the old software claim to have 0 length; for + * compatibility, code reading rasterfiles must be prepared to compute the + * true length from the width, height, and depth fields. */ + +static int iRASDecodeScanLine(imBinFile* handle, unsigned char* DecodedBuffer, int BufferSize) +{ + int index = 0; + unsigned char count = 0; + unsigned char value = 0; + + while (index < BufferSize) + { + imBinFileRead(handle, &value, 1, 1); + + if (value == RAS_ESCAPE) + { + imBinFileRead(handle, &count, 1, 1); + + if (count != 0) + { + imBinFileRead(handle, &value, 1, 1); + + count++; + while (count-- && index < BufferSize) + { + *DecodedBuffer++ = value; + index++; + } + } + else + { + *DecodedBuffer++ = RAS_ESCAPE; + index++; + } + } + else + { + *DecodedBuffer++ = value; + index++; + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + + return IM_ERR_NONE; +} + +static int iRASEncodeScanLine(imbyte* EncodedBuffer, const imbyte* DecodedBuffer, int BufferSize) +{ + int index = 0; /* Index into uncompressed data buffer */ + int scanindex = 0; /* Index into compressed data buffer */ + int runcount; /* Length of encoded pixel run */ + unsigned char runvalue; /* Value of encoded pixel run */ + + while (index < BufferSize) + { + for (runcount = 1, runvalue = DecodedBuffer[index]; + index + runcount < BufferSize && runvalue == DecodedBuffer[index + runcount] && runcount < 256; + runcount++); + + if (runcount > 2) /* Multiple pixel run */ + { + EncodedBuffer[scanindex++] = RAS_ESCAPE; + EncodedBuffer[scanindex++] = (imbyte)(runcount-1); + EncodedBuffer[scanindex++] = runvalue; + } + else if (runcount == 2) + { + if (runvalue == RAS_ESCAPE) /* Two Escapes */ + { + EncodedBuffer[scanindex++] = RAS_ESCAPE; + EncodedBuffer[scanindex++] = 1; + EncodedBuffer[scanindex++] = RAS_ESCAPE; + } + else /* Two Single runs */ + { + EncodedBuffer[scanindex++] = runvalue; + EncodedBuffer[scanindex++] = runvalue; + } + } + else /* Single run */ + { + if (runvalue == RAS_ESCAPE) + { + EncodedBuffer[scanindex++] = RAS_ESCAPE; + EncodedBuffer[scanindex++] = 0; + } + else + EncodedBuffer[scanindex++] = runvalue; + } + + index += runcount; /* Jump ahead to next pixel run value */ + } + + return scanindex; /* Return the number of unsigned chars written to buffer */ +} + +static const char* iRASCompTable[2] = +{ + "NONE", + "RLE" +}; + +class imFileFormatRAS: public imFileFormatBase +{ + imBinFile* handle; /* the binary file handle */ + unsigned int bpp, /* number of bits per pixel */ + comp_type, /* ras compression information */ + map_type, /* palette information */ + line_raw_size; /* line buffer size */ + + int ReadPalette(); + int WritePalette(); + void FixRGB(); + +public: + imFileFormatRAS(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatRAS() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatRAS: public imFormat +{ +public: + imFormatRAS() + :imFormat("RAS", + "Sun Raster File", + "*.ras;", + iRASCompTable, + 2, + 0) + {} + ~imFormatRAS() {} + + imFileFormatBase* Create(void) const { return new imFileFormatRAS(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + + +void imFormatRegisterRAS(void) +{ + imFormatRegister(new imFormatRAS()); +} + +int imFileFormatRAS::Open(const char* file_name) +{ + unsigned int dword_value; + + /* opens the binary file for reading with motorola byte order */ + handle = imBinFileOpen(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_BIGENDIAN); + + /* reads the RAS format identifier */ + imBinFileRead(handle, &dword_value, 1, 4); + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + if (dword_value != RAS_ID) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + /* reads the compression information */ + imBinFileSeekOffset(handle, 16); + + imBinFileRead(handle, &this->comp_type, 1, 4); + if (this->comp_type == RAS_BYTE_ENCODED) + strcpy(this->compression, "RLE"); + else if (this->comp_type == RAS_OLD || this->comp_type == RAS_STANDARD) + strcpy(this->compression, "NONE"); + else + { + imBinFileClose(handle); + return IM_ERR_COMPRESS; + } + + imBinFileSeekOffset(handle, -20); + + this->image_count = 1; + + return IM_ERR_NONE; +} + +int imFileFormatRAS::New(const char* file_name) +{ + /* opens the binary file for writing with motorola byte order */ + handle = imBinFileNew(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_BIGENDIAN); + + this->image_count = 1; + + return IM_ERR_NONE; +} + +void imFileFormatRAS::Close() +{ + imBinFileClose(handle); +} + +void* imFileFormatRAS::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +int imFileFormatRAS::ReadImageInfo(int index) +{ + (void)index; + unsigned int dword_value; + + this->file_data_type = IM_BYTE; + + /* reads the image width */ + imBinFileRead(handle, &dword_value, 1, 4); + this->width = (int)dword_value; + + /* reads the image height */ + imBinFileRead(handle, &dword_value, 1, 4); + this->height = (int)dword_value; + + /* reads the number of bits per pixel */ + imBinFileRead(handle, &this->bpp, 1, 4); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + // sanity check + if (this->bpp != 1 && this->bpp != 8 && + this->bpp != 24 && this->bpp != 32) + return IM_ERR_DATA; + + if (this->bpp > 8) + { + this->file_color_mode = IM_RGB; + this->file_color_mode |= IM_PACKED; + + if (this->bpp == 32) + this->file_color_mode |= IM_ALPHA; + } + else + { + this->file_color_mode = IM_MAP; + + if (this->bpp == 1) + { + this->convert_bpp = 1; + this->palette_count = 2; + } + } + + this->file_color_mode |= IM_TOPDOWN; + + this->line_raw_size = imFileLineSizeAligned(this->width, this->bpp, 2); + this->line_buffer_extra = 2; // room enough for padding + + /* jump 8 bytes (Length+Compression) */ + imBinFileSeekOffset(handle, 8); + + /* reads the palette information */ + imBinFileRead(handle, &this->map_type, 1, 4); + + /* reads the palette size */ + imBinFileRead(handle, &dword_value, 1, 4); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + /* updates the pal_size based on the palette size */ + if (this->bpp <= 8 && this->map_type != RAS_NONE) + { + this->palette_count = dword_value / 3; + return ReadPalette(); + } + + if (this->bpp <= 8 && this->map_type == RAS_NONE) + { + if (this->bpp == 1) + this->file_color_mode = IM_BINARY; + else + this->file_color_mode = IM_GRAY; + + this->file_color_mode |= IM_TOPDOWN; + } + + return IM_ERR_NONE; +} + +int imFileFormatRAS::WriteImageInfo() +{ + this->file_data_type = IM_BYTE; + this->file_color_mode = imColorModeSpace(this->user_color_mode); + + if (imStrEqual(this->compression, "RLE")) + this->comp_type = RAS_BYTE_ENCODED; + else + this->comp_type = RAS_STANDARD; + + // Force the palette, even for Binary and Gray. + this->map_type = RAS_EQUAL_RGB; + + if (this->file_color_mode == IM_BINARY) + { + this->bpp = 1; + this->convert_bpp = 1; + } + else if (this->file_color_mode == IM_RGB) + { + this->file_color_mode |= IM_PACKED; + this->map_type = RAS_NONE; + this->bpp = 24; + + if (imColorModeHasAlpha(this->user_color_mode)) + { + this->file_color_mode |= IM_ALPHA; + this->bpp = 32; + } + } + else + this->bpp = 8; + + this->file_color_mode |= IM_TOPDOWN; + + this->line_raw_size = imFileLineSizeAligned(this->width, this->bpp, 2); + this->line_buffer_extra = 2; // room enough for padding + + if (this->comp_type == RAS_BYTE_ENCODED) + { + // allocates more than enough since compression algoritm can be ineficient + this->line_buffer_extra += 2*this->line_raw_size; + } + + /* writes the RAS file header */ + + unsigned int dword_value = RAS_ID; + imBinFileWrite(handle, &dword_value, 1, 4); /* identifier */ + dword_value = this->width; + imBinFileWrite(handle, &dword_value, 1, 4); /* image width */ + dword_value = this->height; + imBinFileWrite(handle, &dword_value, 1, 4); /* image height */ + dword_value = this->bpp; + imBinFileWrite(handle, &dword_value, 1, 4); /* bits per pixel */ + dword_value = this->height * this->line_raw_size; + imBinFileWrite(handle, &dword_value, 1, 4); /* image lenght */ + dword_value = this->comp_type; + imBinFileWrite(handle, &dword_value, 1, 4); /* compression information */ + dword_value = this->map_type; + imBinFileWrite(handle, &dword_value, 1, 4); /* palette information */ + dword_value = (this->map_type == RAS_NONE)? 0: this->palette_count * 3; + imBinFileWrite(handle, &dword_value, 1, 4); /* palette lenght */ + + /* tests if everything was ok */ + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->map_type != RAS_NONE) + return WritePalette(); + + return IM_ERR_NONE; +} + +int imFileFormatRAS::ReadPalette() +{ + unsigned char ras_colors[256 * 3]; + + /* reads the color palette */ + imBinFileRead(handle, ras_colors, this->palette_count * 3, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + /* convert the color map to the IM format */ + for (int c = 0; c < this->palette_count; c++) + { + if (this->map_type == RAS_RAW) + { + int i = c * 3; + this->palette[c] = imColorEncode(ras_colors[i], + ras_colors[i+1], + ras_colors[i+2]); + } + else + { + this->palette[c] = imColorEncode(ras_colors[c], + ras_colors[c+this->palette_count], + ras_colors[c+2*this->palette_count]); + } + } + + return IM_ERR_NONE; +} + +int imFileFormatRAS::WritePalette() +{ + int c; + unsigned char ras_colors[256 * 3]; + + /* convert the color map to the IM format */ + for (c = 0; c < this->palette_count; c++) + { + imColorDecode(&ras_colors[c], &ras_colors[c+this->palette_count], &ras_colors[c+2*this->palette_count], this->palette[c]); + } + + /* writes the color palette */ + imBinFileWrite(handle, ras_colors, this->palette_count * 3, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +void imFileFormatRAS::FixRGB() +{ + int x; + imbyte* byte_data = (imbyte*)this->line_buffer; + + switch (this->bpp) + { + case 32: + { + // convert ABGR <-> RGBA + for (x = 0; x < this->width; x++) + { + int c = x*4; + imbyte temp = byte_data[c]; // swap R and A + byte_data[c] = byte_data[c+3]; + byte_data[c+3] = temp; + + temp = byte_data[c+1]; // swap G and B + byte_data[c+1] = byte_data[c+2]; + byte_data[c+2] = temp; + } + } + break; + default: // 24 + { + // convert BGR <-> RGB + for (x = 0; x < this->width; x++) + { + int c = x*3; + imbyte temp = byte_data[c]; // swap R and B + byte_data[c] = byte_data[c+2]; + byte_data[c+2] = temp; + } + } + break; + } +} + +int imFileFormatRAS::ReadImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Reading RAS..."); + + for (int row = 0; row < this->height; row++) + { + /* read and decompress the data */ + if (this->comp_type != RAS_BYTE_ENCODED) + { + imBinFileRead(handle, this->line_buffer, this->line_raw_size, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + else + { + if (iRASDecodeScanLine(handle, (imbyte*)this->line_buffer, this->line_raw_size) == IM_ERR_ACCESS) + return IM_ERR_ACCESS; + } + + if (this->bpp > 8) + FixRGB(); + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int imFileFormatRAS::WriteImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Writing RAS..."); + + imbyte* compressed_buffer = NULL; + if (this->comp_type == RAS_BYTE_ENCODED) // point to the extra buffer + compressed_buffer = (imbyte*)this->line_buffer + this->line_buffer_size+2; + + for (int row = 0; row < this->height; row++) + { + imFileLineBufferWrite(this, data, row, 0); + + if (this->bpp > 8) + FixRGB(); + + if (this->comp_type == RAS_BYTE_ENCODED) + { + int compressed_size = iRASEncodeScanLine(compressed_buffer, (imbyte*)this->line_buffer, this->line_raw_size); + imBinFileWrite(handle, compressed_buffer, compressed_size, 1); + } + else + { + imBinFileWrite(handle, this->line_buffer, this->line_raw_size, 1); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int imFormatRAS::CanWrite(const char* compression, int color_mode, int data_type) const +{ + int color_space = imColorModeSpace(color_mode); + + if (color_space == IM_YCBCR || color_space == IM_LAB || + color_space == IM_LUV || color_space == IM_XYZ || + color_space == IM_CMYK) + return IM_ERR_DATA; + + if (data_type != IM_BYTE) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "NONE") && !imStrEqual(compression, "RLE")) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} diff --git a/im/src/im_format_raw.cpp b/im/src/im_format_raw.cpp new file mode 100755 index 0000000..56a2096 --- /dev/null +++ b/im/src/im_format_raw.cpp @@ -0,0 +1,366 @@ +/** \file + * \brief RAW File Format + * + * See Copyright Notice in im_lib.h + * $Id: im_format_raw.cpp,v 1.5 2009/10/01 14:15:47 scuri Exp $ + */ + +#include "im_format.h" +#include "im_util.h" +#include "im_format_raw.h" +#include "im_counter.h" + +#include "im_binfile.h" + +#include +#include + +static const char* iRAWCompTable[2] = +{ + "NONE", + "ASCII" +}; + +class imFileFormatRAW: public imFileFormatBase +{ + imBinFile* handle; + int padding; + + int iRawUpdateParam(int index); + +public: + imFileFormatRAW(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatRAW() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatRAW: public imFormat +{ +public: + imFormatRAW() + :imFormat("RAW", + "RAW File Format", + "*.*;", + iRAWCompTable, + 2, + 1) + {} + ~imFormatRAW() {} + + imFileFormatBase* Create(void) const { return new imFileFormatRAW(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + +static imFormat* raw_format = NULL; + +void imFormatFinishRAW(void) +{ + if (raw_format) + { + delete raw_format; + raw_format = NULL; + } +} + +imFormat* imFormatInitRAW(void) +{ + if (!raw_format) + raw_format = new imFormatRAW(); + + return raw_format; +} + +int imFileFormatRAW::Open(const char* file_name) +{ + this->handle = imBinFileOpen(file_name); + if (this->handle == NULL) + return IM_ERR_OPEN; + + strcpy(this->compression, "NONE"); + + this->image_count = 1; /* at least one image */ + this->padding = 0; + + return IM_ERR_NONE; +} + +int imFileFormatRAW::New(const char* file_name) +{ + this->handle = imBinFileNew(file_name); + if (this->handle == NULL) + return IM_ERR_OPEN; + + this->padding = 0; + + return IM_ERR_NONE; +} + +void imFileFormatRAW::Close() +{ + imBinFileClose(this->handle); +} + +void* imFileFormatRAW::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +static int iCalcPad(int padding, int line_size) +{ + if (padding == 1) + return 0; + + { + int rest = line_size % padding; + if (rest == 0) + return 0; + + return padding - rest; + } +} + +int imFileFormatRAW::iRawUpdateParam(int index) +{ + (void)index; + + imAttribTable* attrib_table = AttribTable(); + + // update image count + int* icount = (int*)attrib_table->Get("ImageCount"); + if (icount) + this->image_count = *icount; + else + this->image_count = 1; + + // update file byte order + int* byte_order = (int*)attrib_table->Get("ByteOrder"); + if (byte_order) + imBinFileByteOrder(this->handle, *byte_order); + + // position at start offset, the default is at 0 + int* start_offset = (int*)attrib_table->Get("StartOffset"); + if (!start_offset) + imBinFileSeekOffset(this->handle, 0); + else + imBinFileSeekOffset(this->handle, *start_offset); + + if (imBinFileError(this->handle)) + return IM_ERR_ACCESS; + + int* stype = (int*)attrib_table->Get("SwitchType"); + if (stype) + this->switch_type = *stype; + + // The following attributes MUST exist + this->width = *(int*)attrib_table->Get("Width"); + this->height = *(int*)attrib_table->Get("Height"); + this->file_color_mode = *(int*)attrib_table->Get("ColorMode"); + this->file_data_type = *(int*)attrib_table->Get("DataType"); + + int* pad = (int*)attrib_table->Get("Padding"); + if (pad) + { + int line_size = imImageLineSize(this->width, this->file_color_mode, this->file_data_type); + if (this->switch_type && (this->file_data_type == IM_FLOAT || this->file_data_type == IM_CFLOAT)) + line_size *= 2; + this->padding = iCalcPad(*pad, line_size); + } + + return IM_ERR_NONE; +} + +int imFileFormatRAW::ReadImageInfo(int index) +{ + return iRawUpdateParam(index); +} + +int imFileFormatRAW::WriteImageInfo() +{ + this->file_color_mode = this->user_color_mode; + this->file_data_type = this->user_data_type; + + return iRawUpdateParam(this->image_count); +} + +static int iFileDataTypeSize(int file_data_type, int switch_type) +{ + int type_size = imDataTypeSize(file_data_type); + if ((file_data_type == IM_FLOAT || file_data_type == IM_CFLOAT) && switch_type) + type_size *= 2; + return type_size; +} + +int imFileFormatRAW::ReadImageData(void* data) +{ + int count = imFileLineBufferCount(this); + int line_count = imImageLineCount(this->width, this->file_color_mode); + int type_size = iFileDataTypeSize(this->file_data_type, this->switch_type); + + // treat complex as 2 real + if (this->file_data_type == IM_CFLOAT) + { + type_size /= 2; + line_count *= 2; + } + + int ascii; + if (imStrEqual(this->compression, "ASCII")) + ascii = 1; + else + ascii = 0; + + imCounterTotal(this->counter, count, "Reading RAW..."); + + int row = 0, plane = 0; + for (int i = 0; i < count; i++) + { + if (ascii) + { + for (int col = 0; col < line_count; col++) + { + if (this->file_data_type == IM_FLOAT) + { + float value; + if (!imBinFileReadFloat(handle, &value)) + return IM_ERR_ACCESS; + + ((float*)this->line_buffer)[col] = value; + } + else + { + int value; + if (!imBinFileReadInteger(handle, &value)) + return IM_ERR_ACCESS; + + if (this->file_data_type == IM_INT) + ((int*)this->line_buffer)[col] = value; + else if (this->file_data_type == IM_USHORT) + ((imushort*)this->line_buffer)[col] = (imushort)value; + else + ((imbyte*)this->line_buffer)[col] = (unsigned char)value; + } + } + } + else + { + imBinFileRead(this->handle, (imbyte*)this->line_buffer, line_count, type_size); + + if (imBinFileError(this->handle)) + return IM_ERR_ACCESS; + } + + imFileLineBufferRead(this, data, row, plane); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + + imFileLineBufferInc(this, &row, &plane); + + if (this->padding) + imBinFileSeekOffset(this->handle, this->padding); + } + + return IM_ERR_NONE; +} + +int imFileFormatRAW::WriteImageData(void* data) +{ + int count = imFileLineBufferCount(this); + int line_count = imImageLineCount(this->width, this->file_color_mode); + int type_size = iFileDataTypeSize(this->file_data_type, this->switch_type); + + // treat complex as 2 real + if (this->file_data_type == IM_CFLOAT) + { + type_size /= 2; + line_count *= 2; + } + + int ascii; + if (imStrEqual(this->compression, "ASCII")) + ascii = 1; + else + ascii = 0; + + imCounterTotal(this->counter, count, "Writing RAW..."); + + int row = 0, plane = 0; + for (int i = 0; i < count; i++) + { + imFileLineBufferWrite(this, data, row, plane); + + if (ascii) + { + for (int col = 0; col < line_count; col++) + { + if (this->file_data_type == IM_FLOAT) + { + float value = ((float*)this->line_buffer)[col]; + + if (!imBinFilePrintf(handle, "%f ", (double)value)) + return IM_ERR_ACCESS; + } + else + { + int value; + if (this->file_data_type == IM_INT) + value = ((int*)this->line_buffer)[col]; + else if (this->file_data_type == IM_USHORT) + value = ((imushort*)this->line_buffer)[col]; + else + value = ((imbyte*)this->line_buffer)[col]; + + if (!imBinFilePrintf(handle, "%d ", value)) + return IM_ERR_ACCESS; + } + } + + imBinFileWrite(handle, (void*)"\n", 1, 1); + } + else + { + imBinFileWrite(this->handle, (imbyte*)this->line_buffer, line_count, type_size); + } + + if (imBinFileError(this->handle)) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + + imFileLineBufferInc(this, &row, &plane); + + if (this->padding) + imBinFileSeekOffset(this->handle, this->padding); + } + + this->image_count++; + return IM_ERR_NONE; +} + +int imFormatRAW::CanWrite(const char* compression, int color_mode, int data_type) const +{ + (void)data_type; + + if (imColorSpace(color_mode) == IM_MAP) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "NONE") && !imStrEqual(compression, "ASCII")) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} diff --git a/im/src/im_format_sgi.cpp b/im/src/im_format_sgi.cpp new file mode 100755 index 0000000..08bbf4d --- /dev/null +++ b/im/src/im_format_sgi.cpp @@ -0,0 +1,616 @@ +/** \file + * \brief SGI - Silicon Graphics Image File Format + * + * See Copyright Notice in im_lib.h + * $Id: im_format_sgi.cpp,v 1.2 2008/12/03 15:45:34 scuri Exp $ + */ + +#include "im_format.h" +#include "im_util.h" +#include "im_format_all.h" +#include "im_counter.h" + +#include "im_binfile.h" + +#include +#include +#include + +/* File Header Structure. */ +/* 2 Magic; 474 */ +/* 1 Storage; 0 ou 1 Compression */ +/* 1 BPC; 1 ou 2 Bytes Per Pixel Component */ +/* 2 Dimension; 1 ou 2 ou 3 */ +/* 2 XSize; Width */ +/* 2 YSize; Height */ +/* 2 ZSize; Number of Channels. B/W=1, RGB=3, RGBA=4 */ +/* 4 PixMin; Minimum Pixel Value */ +/* 4 PixMax; Maximum Pixel Value */ +/* 4 Dummy1; */ +/* 80 ImageName;*/ +/* 4 ColorMap; 0 ou 1 ou 2 ou 3 */ +/* 404 Dummy2;*/ +/* 512 */ + +#define SGI_ID 474 + +/* Compression */ +#define SGI_VERBATIM 0 +#define SGI_RLE 1 + +/* ColorMap Ids */ +#define SGI_NORMAL 0 +#define SGI_DITHERED 1 +#define SGI_SCREEN 2 +#define SGI_COLORMAP 3 + +template +static int iSGIDecodeScanLine(T *optr, const T *iptr, int width) +{ + T pixel; + int c = 0, count; + + while (c < width) + { + pixel = *iptr++; + + count = pixel & 0x7f; + if (!count) + break; + + c += count; + if (c > width) + return IM_ERR_ACCESS; + + if (pixel & 0x80) + { + while (count--) + *optr++ = *iptr++; + } + else + { + pixel = *iptr++; + while (count--) + *optr++ = pixel; + } + } + + if (c < width) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +template +static int iSGIEncodeScanLine(T *optr, const T *iptr, int width) +{ + const T *ibufend = iptr + width, + *sptr; + T *start_optr = optr; + int todo, cc, count; + + while(iptr < ibufend) + { + sptr = iptr; + iptr += 2; + while ((iptr < ibufend) && + ((iptr[-2] != iptr[-1]) || (iptr[-1] != iptr[0]))) + iptr++; + iptr -= 2; + count = iptr-sptr; + + while (count) + { + todo = (count > 126) ? 126: count; + count -= todo; + *optr++ = (T)(0x80 | todo); + while(todo--) + *optr++ = *sptr++; + } + sptr = iptr; + cc = *iptr++; + + while((iptr < ibufend) && (*iptr == cc)) + iptr++; + count = iptr-sptr; + + while(count) + { + todo = (count > 126)? 126: count; + count -= todo; + *optr++ = (T)todo; + *optr++ = (T)cc; + } + } + *optr++ = 0; + + return optr-start_optr; +} + +static const char* iSGICompTable[2] = +{ + "NONE", + "RLE" +}; + +class imFileFormatSGI: public imFileFormatBase +{ + imBinFile* handle; /* the binary file handle */ + unsigned char comp_type, /* sgi compression information */ + bpc; /* bytes per channels */ + unsigned int *starttab, /* compression control buffer */ + *lengthtab; /* compression control buffer */ + +public: + imFileFormatSGI(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatSGI() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatSGI: public imFormat +{ +public: + imFormatSGI() + :imFormat("SGI", + "Silicon Graphics Image File Format", + "*.rgb;*.rgba;*.bw;*.sgi;", + iSGICompTable, + 2, + 0) + {} + ~imFormatSGI() {} + + imFileFormatBase* Create(void) const { return new imFileFormatSGI(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + +void imFormatRegisterSGI(void) +{ + imFormatRegister(new imFormatSGI()); +} + +int imFileFormatSGI::Open(const char* file_name) +{ + unsigned short word_value; + + /* opens the binary file for reading with motorola byte order */ + handle = imBinFileOpen(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_BIGENDIAN); + + /* reads the SGI format identifier */ + imBinFileRead(handle, &word_value, 1, 2); + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + if (word_value != SGI_ID) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + /* reads the compression information */ + imBinFileRead(handle, &this->comp_type, 1, 1); + if (this->comp_type == SGI_RLE) + strcpy(this->compression, "RLE"); + else if (this->comp_type == SGI_VERBATIM) + strcpy(this->compression, "NONE"); + else + { + imBinFileClose(handle); + return IM_ERR_COMPRESS; + } + + this->starttab = NULL; + this->lengthtab = NULL; + + this->image_count = 1; + + return IM_ERR_NONE; +} + +int imFileFormatSGI::New(const char* file_name) +{ + /* opens the binary file for writing with motorola byte order */ + handle = imBinFileNew(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_BIGENDIAN); + + this->starttab = NULL; + this->lengthtab = NULL; + + this->image_count = 1; + + return IM_ERR_NONE; +} + +void imFileFormatSGI::Close() +{ + if (this->starttab) free(this->starttab); + if (this->lengthtab) free(this->lengthtab); + imBinFileClose(handle); +} + +void* imFileFormatSGI::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +int imFileFormatSGI::ReadImageInfo(int index) +{ + (void)index; + unsigned short word_value, dimension, depth; + + /* reads the number of bits per channel */ + imBinFileRead(handle, &this->bpc, 1, 1); + + /* reads the number of dimensions */ + imBinFileRead(handle, &dimension, 1, 2); + + /* reads the image width */ + imBinFileRead(handle, &word_value, 1, 2); + this->width = word_value; + + /* reads the image height */ + imBinFileRead(handle, &word_value, 1, 2); + this->height = word_value; + + /* reads the number of channels */ + imBinFileRead(handle, &depth, 1, 2); + + /* jump 12 bytes (min, max, dummy) */ + imBinFileSeekOffset(handle, 12); + + /* reads the image name */ + char image_name[80]; + imBinFileRead(handle, image_name, 80, 1); + + if (image_name[0] != 0) + AttribTable()->Set("Description", IM_BYTE, imStrNLen(image_name, 80)+1, image_name); + + /* reads the color map information */ + unsigned int color_map_id; + imBinFileRead(handle, &color_map_id, 1, 4); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + this->file_data_type = IM_BYTE; + if (this->bpc == 2) + this->file_data_type = IM_USHORT; + + switch (dimension) + { + case 1: + this->height = 1; + depth = 1; + case 2: + depth = 1; + break; + case 3: + break; + default: + return IM_ERR_DATA; + } + + switch (color_map_id) + { + case SGI_NORMAL: + switch(depth) + { + case 1: + this->file_color_mode = IM_GRAY; + break; + case 3: + this->file_color_mode = IM_RGB; + break; + case 4: + this->file_color_mode = IM_RGB | IM_ALPHA; + break; + default: + return IM_ERR_DATA; + } + break; + case SGI_DITHERED: + this->file_color_mode = IM_MAP; + break; + case SGI_COLORMAP: + this->file_color_mode = IM_RGB; + break; + case SGI_SCREEN: + this->file_color_mode = IM_GRAY; + break; + default: + return IM_ERR_DATA; + } + + /* jump 404 bytes (dummy) */ + imBinFileSeekOffset(handle, 404); + + if (this->comp_type == SGI_RLE) + { + int tablen = this->height * depth; + this->starttab = (unsigned int *)malloc(tablen * sizeof(int)); + this->lengthtab = (unsigned int *)malloc(tablen * sizeof(int)); + + /* reads the compression control information */ + imBinFileRead(handle, this->starttab, tablen, 4); + imBinFileRead(handle, this->lengthtab, tablen, 4); + + // allocates more than enough since compression algoritm can be ineficient + this->line_buffer_extra = 2*imImageLineSize(this->width, this->file_color_mode, this->file_data_type); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (color_map_id == SGI_DITHERED) + { + static int red[8] = {0, 36, 73, 109, 146, 182, 218, 255}; + static int green[8] = {0, 36, 73, 109, 146, 182, 218, 255}; + static int blue[4] = {0, 85, 170, 255}; + + int c = 0; + for (int b = 0; b < 4; b++) + { + for (int g = 0; g < 8; g++) + { + for (int r = 0; r < 8; r++) + { + this->palette[c] = imColorEncode((imbyte)red[r], + (imbyte)green[g], + (imbyte)blue[b]); + c++; + } + } + } + } + + return IM_ERR_NONE; +} + +int imFileFormatSGI::WriteImageInfo() +{ + unsigned int dword_value; + unsigned short word_value; + unsigned char dummy[404]; + memset(dummy, 0, 404); + + this->comp_type = SGI_VERBATIM; + if (imStrEqual(this->compression, "RLE")) + this->comp_type = SGI_RLE; + + unsigned int color_map_id = SGI_NORMAL; + + this->file_color_mode = imColorModeSpace(this->user_color_mode); + + int dimension = 2; + if (this->file_color_mode == IM_BINARY) + this->convert_bpp = -1; // expand 1 to 255 + else if (this->file_color_mode == IM_RGB) + { + dimension = 3; + if (imColorModeHasAlpha(this->user_color_mode)) + this->file_color_mode |= IM_ALPHA; + } + + this->file_data_type = this->user_data_type; + + this->bpc = 1; + int max = 255; + if (this->file_data_type == IM_USHORT) + { + max = 65535; + this->bpc = 2; + } + + this->starttab = NULL; + this->lengthtab = NULL; + + /* writes the SGI file header */ + word_value = SGI_ID; + imBinFileWrite(handle, &word_value, 1, 2); /* identifier */ + imBinFileWrite(handle, &this->comp_type, 1, 1); /* storage */ + imBinFileWrite(handle, &this->bpc, 1, 1); /* bpc */ + word_value = (imushort)dimension; + imBinFileWrite(handle, &word_value, 1, 2); /* dimension */ + word_value = (unsigned short)this->width; + imBinFileWrite(handle, &word_value, 1, 2); /* image width */ + word_value = (unsigned short)this->height; + imBinFileWrite(handle, &word_value, 1, 2); /* image height */ + word_value = (imushort)imColorModeDepth(this->file_color_mode); + imBinFileWrite(handle, &word_value, 1, 2); /* depth */ + dword_value = 0; + imBinFileWrite(handle, &dword_value, 1, 4); /* min */ + dword_value = max; + imBinFileWrite(handle, &dword_value, 1, 4); /* max */ + imBinFileWrite(handle, dummy, 4, 1); /* dummy */ + + /* tests if everything was ok */ + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + int size; + char* image_name = (char*)AttribTable()->Get("Description", NULL, &size); + if (image_name) + { + if (size < 80) + { + imBinFileWrite(handle, image_name, size, 1); + imBinFileWrite(handle, dummy, 80-size, 1); + } + else + { + imBinFileWrite(handle, image_name, 79, 1); + imBinFileWrite(handle, (void*)"\0", 1, 1); + } + } + else + imBinFileWrite(handle, dummy, 80, 1); /* empty image name */ + + dword_value = color_map_id; + imBinFileWrite(handle, &dword_value, 1, 4); /* color_map_id */ + imBinFileWrite(handle, dummy, 404, 1); /* dummy */ + + /* tests if everything was ok */ + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->comp_type == SGI_RLE) + { + int tablen = this->height * imColorModeDepth(this->file_color_mode); + this->starttab = (unsigned int *)malloc(tablen*4); + this->lengthtab = (unsigned int *)malloc(tablen*4); + + /* writes the empty compression control information */ + /* we will write again at the end */ + imBinFileWrite(handle, this->starttab, tablen*4, 1); + imBinFileWrite(handle, this->lengthtab, tablen*4, 1); + + // allocates more than enough since compression algoritm can be ineficient + this->line_buffer_extra = 2*imImageLineSize(this->width, this->file_color_mode, this->file_data_type); + } + + /* tests if everything was ok */ + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +int imFileFormatSGI::ReadImageData(void* data) +{ + int count = imFileLineBufferCount(this); + + imCounterTotal(this->counter, count, "Reading SGI..."); + + imbyte* compressed_buffer = NULL; + if (this->comp_type == SGI_RLE) // point to the extra buffer + compressed_buffer = (imbyte*)this->line_buffer + this->line_buffer_size; + + int row = 0, plane = 0; + for (int i = 0; i < count; i++) + { + if (this->comp_type == SGI_VERBATIM) + { + imBinFileRead(handle, this->line_buffer, this->line_buffer_size/this->bpc, this->bpc); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + else + { + int row_index = row + plane*this->height; + imBinFileSeekTo(handle, this->starttab[row_index]); + imBinFileRead(handle, compressed_buffer, this->lengthtab[row_index] / this->bpc, this->bpc); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->bpc == 1) + iSGIDecodeScanLine((imbyte*)this->line_buffer, compressed_buffer, this->width); + else + iSGIDecodeScanLine((imushort*)this->line_buffer, (imushort*)compressed_buffer, this->width); + } + + imFileLineBufferRead(this, data, row, plane); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + + imFileLineBufferInc(this, &row, &plane); + } + + return IM_ERR_NONE; +} + +int imFileFormatSGI::WriteImageData(void* data) +{ + int count = imFileLineBufferCount(this); + + imCounterTotal(this->counter, count, "Writing SGI..."); + + imbyte* compressed_buffer = NULL; + if (this->comp_type == SGI_RLE) // point to the extra buffer + compressed_buffer = (imbyte*)this->line_buffer + this->line_buffer_size; + + int row = 0, plane = 0; + for (int i = 0; i < count; i++) + { + imFileLineBufferWrite(this, data, row, plane); + + if (this->comp_type == SGI_VERBATIM) + imBinFileWrite(handle, this->line_buffer, this->line_buffer_size/this->bpc, this->bpc); + else + { + int length; + if (this->bpc == 1) + length = iSGIEncodeScanLine(compressed_buffer, (imbyte*)this->line_buffer, this->width); + else + length = iSGIEncodeScanLine((imushort*)compressed_buffer, (imushort*)this->line_buffer, this->width); + + int row_index = row + plane*this->height; + this->starttab[row_index] = imBinFileTell(handle); + this->lengthtab[row_index] = length*this->bpc; + + imBinFileWrite(handle, compressed_buffer, length, this->bpc); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + + imFileLineBufferInc(this, &row, &plane); + } + + if (this->comp_type == SGI_RLE) + { + imBinFileSeekTo(this->handle, 512); + int tablen = this->height * imColorModeDepth(this->file_color_mode); + imBinFileWrite(handle, this->starttab, tablen, 4); + imBinFileWrite(handle, this->lengthtab, tablen, 4); + } + + return IM_ERR_NONE; +} + +int imFormatSGI::CanWrite(const char* compression, int color_mode, int data_type) const +{ + int color_space = imColorModeSpace(color_mode); + + if (color_space == IM_YCBCR || color_space == IM_LAB || + color_space == IM_LUV || color_space == IM_XYZ || + color_space == IM_CMYK || color_space == IM_MAP) + return IM_ERR_DATA; + + if (data_type != IM_BYTE && data_type != IM_USHORT) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "NONE") && !imStrEqual(compression, "RLE")) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} diff --git a/im/src/im_format_tga.cpp b/im/src/im_format_tga.cpp new file mode 100755 index 0000000..86e968a --- /dev/null +++ b/im/src/im_format_tga.cpp @@ -0,0 +1,1113 @@ +/** \file + * \brief TGA - Truevision Graphics Adapter File + * + * See Copyright Notice in im_lib.h + * $Id: im_format_tga.cpp,v 1.2 2008/12/03 15:45:34 scuri Exp $ + */ + +#include "im_format.h" +#include "im_util.h" +#include "im_format_all.h" +#include "im_counter.h" +#include "im_math.h" + +#include "im_binfile.h" + +#include +#include +#include +#include +#include +#include + + +/* +|--------|--------|------------------------------------------------------------| +| 0 | 1 | Number of Characters in Identification Field. | +| | | This field is a one-byte unsigned integer, specifying | +| | | the length of the Image Identification Field. Its range | +| | | is 0 to 255. A value of 0 means that no Image | +| | | Identification Field is included. | +|--------|--------|------------------------------------------------------------| +| 1 | 1 | Color Map Type. | +|--------|--------|------------------------------------------------------------| +| 2 | 1 | Image Type Code. | +|--------|--------|------------------------------------------------------------| +| 3 | 5 | Color Map Specification. | +| 3 | 2 | Color Map Origin. | +| | | Integer ( lo-hi ) index of first color map entry. | +| 5 | 2 | Color Map Length. | +| | | Integer ( lo-hi ) count of color map entries. | +| 7 | 1 | Color Map Entry Size. | +| | | Number of bits in each color map entry. 16 for | +| | | the Targa 16, 24 for the Targa 24, 32 for the Targa 32. | +|--------|--------|------------------------------------------------------------| +| 8 | 10 | Image Specification. | +| 8 | 2 | X Origin of Image. | +| | | Integer ( lo-hi ) X coordinate of the lower left corner | +| | | of the image. | +| 10 | 2 | Y Origin of Image. | +| | | Integer ( lo-hi ) Y coordinate of the lower left corner | +| | | of the image. | +| 12 | 2 | Width of Image. | +| | | Integer ( lo-hi ) width of the image in pixels. | +| 14 | 2 | Height of Image. | +| | | Integer ( lo-hi ) height of the image in pixels. | +| 16 | 1 | Image Pixel Size. | +| | | Number of bits in a stored pixel index. | +| 17 | 1 | Image Descriptor Byte. | +| | | Bits 3-0 - number of attribute bits associated with each | +| | | pixel. | +| | | Bit 4 - reserved. Must be set to 0. | +| | | Bit 5 - screen origin bit. | +| | | 0 = Origin in lower left-hand corner. | +| | | 1 = Origin in upper left-hand corner. | +| | | Must be 0 for Truevision images. | +| | | Bits 7-6 - Data storage interleaving flag. | +| | | 00 = non-interleaved. | +| | | 01 = two-way (even/odd) interleaving. | +| | | 10 = four way interleaving. | +| | | 11 = reserved. | +| | | This entire byte should be set to 0. Don't ask me. | +|--------|--------|------------------------------------------------------------| +| 18 | varies | Image Identification Field. | +| | | Contains a free-form identification field of the length | +| | | specified in byte 1 of the image record. It's usually | +| | | omitted ( length in byte 1 = 0 ), but can be up to 255 | +| | | characters. If more identification information is | +| | | required, it can be stored after the image data. | +|--------|--------|------------------------------------------------------------| + +Extension Area: + +* The inclusion of a scaled-down “postage stamp” copy of the image +* Date and Time of image file creation +* Author Name +* Author Comments +* Job Name +* Job Accumulated Time +* Gamma Value +* Correct Color LUT +* Pixel Aspect Ratio +* Scan Line Offset Table +* Key Color +* Software Package Name and Version Number +* Developer Definable Areas +* Attribute (Alpha) channel Type +* The ability for simple expansion +*/ + +static int iTGADecodeScanLine(imBinFile* handle, imbyte *DecodedBuffer, int width, int pixel_size) +{ + int i=0; + unsigned char runcount; /* repetition count field */ + imbyte pixel_buffer[4]; + + while (i < width) + { + imBinFileRead(handle, &runcount, 1, 1); + + if (runcount & 0x80) + { + imBinFileRead(handle, pixel_buffer, pixel_size, 1); + runcount &= 0x7F; + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + runcount++; + while (runcount-- && i < width) + { + memcpy(DecodedBuffer, pixel_buffer, pixel_size); + i++; + DecodedBuffer += pixel_size; + } + } + else + { + runcount++; + while (runcount-- && i < width) + { + imBinFileRead(handle, pixel_buffer, pixel_size, 1); + memcpy(DecodedBuffer, pixel_buffer, pixel_size); + i++; + DecodedBuffer += pixel_size; + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + } + + return IM_ERR_NONE; +} + +static inline int iTGAEqualPixel(const imbyte* Buffer1, const imbyte* Buffer2, int pixel_size) +{ + while(pixel_size--) + { + if (*Buffer1++ != *Buffer2++) + return 0; + } + return 1; +} + +static int iTGAEncodeScanLine(imbyte* EncodedBuffer, const imbyte* DecodedBuffer, int width, int pixel_size) +{ + imbyte pixel_buffer[4]; + unsigned char runcount; /* Length of encoded pixel run */ + int x = 0; /* Index into uncompressed data buffer */ + imbyte* StartBuffer = EncodedBuffer; + + while (x < width) + { + runcount = 1; + memcpy(pixel_buffer, &DecodedBuffer[x*pixel_size], pixel_size); + + // count equal pixels + while (x+runcount < width && runcount < 128 && + iTGAEqualPixel(pixel_buffer, &DecodedBuffer[(x+runcount)*pixel_size], pixel_size)) + runcount++; + + if (runcount == 1) + { + // count different pixels + while (x+runcount+1 < width && runcount < 128) + { + memcpy(pixel_buffer, &DecodedBuffer[(x+runcount)*pixel_size], pixel_size); + + if (!iTGAEqualPixel(pixel_buffer, &DecodedBuffer[(x+runcount+1)*pixel_size], pixel_size)) + runcount++; + else + break; + } + + *EncodedBuffer++ = (imbyte)(runcount-1); + + memcpy(EncodedBuffer, &DecodedBuffer[x*pixel_size], runcount*pixel_size); + EncodedBuffer += runcount*pixel_size; + } + else + { + *EncodedBuffer++ = (imbyte)(0x80 | (runcount-1)); + + memcpy(EncodedBuffer, pixel_buffer, pixel_size); + EncodedBuffer += pixel_size; + } + + x += runcount; + } + + return EncodedBuffer-StartBuffer; /* Return the number of unsigned chars written to buffer */ +} + +static const char* iTGACompTable[2] = +{ + "NONE", + "RLE" +}; + +class imFileFormatTGA: public imFileFormatBase +{ + imBinFile* handle; /* the binary file handle */ + unsigned char id_lenght; + unsigned char map_type, image_type, map_bpp, bpp; + + int ReadPalette(); + int WritePalette(); + void FixRGB(); + int LoadExtensionArea(); + int SaveExtensionArea(); + +public: + imFileFormatTGA(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatTGA() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatTGA: public imFormat +{ +public: + imFormatTGA() + :imFormat("TGA", + "Truevision Graphics Adapter File", + "*.tga;*.icb;*.vst;*.tpic;", + iTGACompTable, + 2, + 0) + {} + ~imFormatTGA() {} + + imFileFormatBase* Create(void) const { return new imFileFormatTGA(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + +void imFormatRegisterTGA(void) +{ + imFormatRegister(new imFormatTGA()); +} + +int imFileFormatTGA::Open(const char* file_name) +{ + /* opens the binary file for reading with intel byte order */ + handle = imBinFileOpen(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_LITTLEENDIAN); + + imBinFileRead(handle, &this->id_lenght, 1, 1); + imBinFileRead(handle, &this->map_type, 1, 1); + imBinFileRead(handle, &this->image_type, 1, 1); + + if (imBinFileError(handle)) + { + imBinFileClose(handle); + return IM_ERR_ACCESS; + } + + if (this->image_type != 1 && this->image_type != 2 && this->image_type != 3 && + this->image_type != 9 && this->image_type != 10 && this->image_type != 11) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + if (this->map_type != 0 && this->map_type != 1) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + if (this->map_type == 0 && (this->image_type == 1 || this->image_type == 9)) + { + imBinFileClose(handle); + return IM_ERR_FORMAT; + } + + if (this->image_type == 9 || this->image_type == 10 || this->image_type == 11) + strcpy(this->compression, "RLE"); + else + strcpy(this->compression, "NONE"); + + this->image_count = 1; + + return IM_ERR_NONE; +} + +int imFileFormatTGA::New(const char* file_name) +{ + /* opens the binary file for writing with intel byte order */ + handle = imBinFileNew(file_name); + if (!handle) + return IM_ERR_OPEN; + + imBinFileByteOrder(handle, IM_LITTLEENDIAN); + + return IM_ERR_NONE; +} + +void imFileFormatTGA::Close() +{ + imBinFileClose(handle); +} + +void* imFileFormatTGA::Handle(int index) +{ + if (index == 0) + return (void*)this->handle; + else + return NULL; +} + +int imFileFormatTGA::ReadImageInfo(int index) +{ + (void)index; + unsigned char byte_value; + unsigned short word_value; + + this->file_data_type = IM_BYTE; + + if (this->image_type == 1 || this->image_type == 9) + this->file_color_mode = IM_MAP; + else if (this->image_type == 2 || this->image_type == 10) + { + this->file_color_mode = IM_RGB; + this->file_color_mode |= IM_PACKED; + } + else if (this->image_type == 3 || this->image_type == 11) + this->file_color_mode = IM_GRAY; + else + return IM_ERR_DATA; + + if (this->map_type == 0) + imBinFileSeekOffset(handle, 5); // jump color map information + else + { + /* jump 2 bytes (first entry index) */ + imBinFileSeekOffset(handle, 2); + + imBinFileRead(handle, &word_value, 1, 2); + this->palette_count = word_value; + + imBinFileRead(handle, &this->map_bpp, 1, 1); + + if (this->map_bpp == 15) this->map_bpp = 16; + + if (this->map_bpp != 16 && this->map_bpp != 24 && this->map_bpp != 32) + return IM_ERR_DATA; + } + + /* jump 4 bytes (X-Origin, Y-Origin) */ + unsigned short xmin, ymin; + imBinFileRead(handle, &xmin, 1, 2); + imBinFileRead(handle, &ymin, 1, 2); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + imAttribTable* attrib_table = AttribTable(); + + if (xmin && ymin) + { + attrib_table->Set("XScreen", IM_USHORT, 1, &xmin); + attrib_table->Set("YScreen", IM_USHORT, 1, &ymin); + } + + /* reads the image width */ + imBinFileRead(handle, &word_value, 1, 2); + this->width = word_value; + + /* reads the image height */ + imBinFileRead(handle, &word_value, 1, 2); + this->height = word_value; + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + imBinFileRead(handle, &this->bpp, 1, 1); + + if (this->bpp > 8 && imColorModeSpace(this->file_color_mode) != IM_RGB) + return IM_ERR_DATA; + + if (this->bpp == 15) this->bpp = 16; + + if (this->bpp != 8 && this->bpp != 16 && + this->bpp != 24 && this->bpp != 32) + return IM_ERR_DATA; + + if (this->bpp == 32) + this->file_color_mode |= IM_ALPHA; + + // image descriptor + imBinFileRead(handle, &byte_value, 1, 1); + + if (byte_value & 0x20) + this->file_color_mode |= IM_TOPDOWN; + + // image ID + if (this->id_lenght) + { + char desc[256]; + imBinFileRead(handle, desc, this->id_lenght, 1); + desc[this->id_lenght] = 0; + attrib_table->Set("Title", IM_BYTE, this->id_lenght+1, desc); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->map_type) + { + if (!ReadPalette()) + return IM_ERR_ACCESS; + } + + long cur_offset = imBinFileTell(handle); + imBinFileSeekFrom(handle, -18); + char ext_sig[18]; + imBinFileRead(handle, ext_sig, 18, 1); + if (ext_sig[17] == 0 && imStrEqual(ext_sig, "TRUEVISION-XFILE.")) + { + if (!LoadExtensionArea()) + return IM_ERR_ACCESS; + } + imBinFileSeekTo(handle, cur_offset); + + return IM_ERR_NONE; +} + +int imFileFormatTGA::WriteImageInfo() +{ + unsigned char byte_value; + unsigned short word_value; + + this->map_bpp = 0; + this->map_type = 0; + + this->file_color_mode = imColorModeSpace(this->user_color_mode); + switch (this->file_color_mode) + { + case IM_BINARY: + this->convert_bpp = -1; // expand 1 to 255 + case IM_GRAY: + this->bpp = 8; + if (imStrEqual(this->compression, "RLE")) + this->image_type = 11; + else + this->image_type = 3; + break; + case IM_MAP: + this->bpp = 8; + this->map_bpp = 24; + this->map_type = 1; + if (imStrEqual(this->compression, "RLE")) + this->image_type = 9; + else + this->image_type = 1; + break; + case IM_RGB: + this->bpp = 24; + this->file_color_mode |= IM_PACKED; + if (imStrEqual(this->compression, "RLE")) + this->image_type = 10; + else + this->image_type = 2; + break; + } + + if (this->image_type > 3) + { + // allocates more than enough since compression algoritm can be ineficient + this->line_buffer_extra += 2*this->width*imColorModeDepth(this->file_color_mode); + } + + imAttribTable* attrib_table = AttribTable(); + + /* writes the TGA file header */ + + int length = 0; + const char* desc_attrib = (const char*)attrib_table->Get("Title", NULL, &length); + if (desc_attrib) + { + if (length > 255) + this->id_lenght = 255; + else + this->id_lenght = (imbyte)length; + } + else + this->id_lenght = 0; + + /* IDLength */ + imBinFileWrite(handle, &this->id_lenght, 1, 1); + + /* Color Map Type */ + imBinFileWrite(handle, &this->map_type, 1, 1); + + /* Image Type */ + imBinFileWrite(handle, &this->image_type, 1, 1); + + /* Color Map Specification - 1st entry index */ + word_value = 0; + imBinFileWrite(handle, &word_value, 1, 2); + + /* Color map length */ + word_value = (unsigned short) this->palette_count; + imBinFileWrite(handle, &word_value, 1, 2); + + /* Color Map Entry size */ + byte_value = this->map_type? this->map_bpp: (imbyte)0; + imBinFileWrite(handle, &byte_value, 1, 1); + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + unsigned short xmin = 0, ymin = 0; + const void* attrib_data = attrib_table->Get("XScreen"); + if (attrib_data) xmin = *(unsigned short*)attrib_data; + attrib_data = attrib_table->Get("YScreen"); + if (attrib_data) ymin = *(unsigned short*)attrib_data; + + /* X-orign of image */ + word_value = xmin; + imBinFileWrite(handle, &word_value, 1, 2); + + /* Y-orign of image */ + word_value = ymin; + imBinFileWrite(handle, &word_value, 1, 2); + + /* Image Width */ + word_value = (imushort)this->width; + imBinFileWrite(handle, &word_value, 1, 2); + + /* Image Height */ + word_value = (imushort)this->height; + imBinFileWrite(handle, &word_value, 1, 2); + + /* Pixel Depth */ + imBinFileWrite(handle, &this->bpp, 1, 1); + + /* Image Descriptor */ + byte_value = 0x00; + imBinFileWrite(handle, &byte_value, 1, 1); + + /* image ID */ + if (this->id_lenght) + { + if (length > 255) + { + imBinFileWrite(handle, (void*)desc_attrib, 254, 1); + byte_value = 0x00; + imBinFileWrite(handle, &byte_value, 1, 1); + } + else + imBinFileWrite(handle, (void*)desc_attrib, this->id_lenght, 1); + } + + /* tests if everything was ok */ + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (this->map_type) + { + if (!WritePalette()) + return IM_ERR_ACCESS; + } + + return IM_ERR_NONE; +} + +static long iTGARGB2Color(int c, unsigned char *colors, int map_bpp) +{ + unsigned char r,g,b; + + if (map_bpp == 16) + { + unsigned short word_value = ((unsigned short*)colors)[c]; + + r = (imbyte)(((word_value & 0x7C00) >> 10)*8); + g = (imbyte)(((word_value & 0x03E0) >> 5)*8); + b = (imbyte)( (word_value & 0x001F) *8); + } + else // 24 or 32 + { + int i = c * (map_bpp / 8); + + r = colors[i+2]; + g = colors[i+1]; + b = colors[i]; + } + + return imColorEncode(r, g, b); +} + +int imFileFormatTGA::ReadPalette() +{ + int map_size = imFileLineSizeAligned(this->palette_count, this->map_bpp, 1); + unsigned char* tga_colors = (unsigned char*) malloc(map_size); + + /* reads the color palette */ + imBinFileRead(handle, tga_colors, map_size, 1); + if (imBinFileError(handle)) + return 0; + + if (imBinCPUByteOrder() == IM_BIGENDIAN && this->map_bpp == 16) + imBinSwapBytes2(tga_colors, map_size/2); + + /* convert the color map to the IM format */ + for (int c = 0; c < this->palette_count; c++) + this->palette[c] = iTGARGB2Color(c, tga_colors, this->map_bpp); + + free(tga_colors); + + return 1; +} + +int imFileFormatTGA::WritePalette() +{ + unsigned char tga_color[256*3]; + + /* convert the color map from the IM format */ + for (int c = 0; c < this->palette_count; c++) + { + int i = 3*c; + imColorDecode(&tga_color[i+2], &tga_color[i+1], &tga_color[i], this->palette[c]); + } + + /* writes the color palette */ + imBinFileWrite(handle, tga_color, this->palette_count * 3, 1); + + if (imBinFileError(handle)) + return 0; + + return 1; +} + +int imFileFormatTGA::LoadExtensionArea() +{ + unsigned int dword_value; + imBinFileSeekFrom(handle, -26); + + // extension offset + imBinFileRead(handle, &dword_value, 1, 4); + if (imBinFileError(handle)) + return 0; + + imBinFileSeekTo(handle, dword_value); + if (imBinFileError(handle)) + return 0; + + unsigned short word_value; + imbyte buffer[512]; + imAttribTable* attrib_table = AttribTable(); + + // extension size + imBinFileSeekOffset(handle, 2); + + // author name + imBinFileRead(handle, buffer, 41, 1); + if (buffer[0] != 0) + attrib_table->Set("Author", IM_BYTE, imStrNLen((char*)buffer, 41)+1, buffer); + + // author comments + imBinFileRead(handle, buffer, 324, 1); + if (buffer[0] != 0) + { + int size1 = imStrNLen((char*)buffer, 81); + for (int i = 1; i < 4; i++) + { + int sizei = imStrNLen((char*)buffer + i*81, 81); + if (sizei) + { + memcpy(buffer + size1, buffer + i*81, sizei); + size1 += sizei; + } + } + buffer[size1] = 0; + + attrib_table->Set("Description", IM_BYTE, size1+1, buffer); + } + + if (imBinFileError(handle)) + return 0; + + { + tm ttm; + ttm.tm_wday = 0; + ttm.tm_yday = 0; + ttm.tm_isdst = -1; + + int valid = 0; + imBinFileRead(handle, &word_value, 1, 2); // moth + ttm.tm_mon = word_value-1; + if (word_value) valid = 1; + imBinFileRead(handle, &word_value, 1, 2); // day + ttm.tm_mday = word_value; + if (word_value) valid = 1; + imBinFileRead(handle, &word_value, 1, 2); // year + ttm.tm_year = word_value-1900; + if (word_value) valid = 1; + imBinFileRead(handle, &word_value, 1, 2); // hour + ttm.tm_hour = word_value; + imBinFileRead(handle, &word_value, 1, 2); // minute + ttm.tm_min = word_value; + imBinFileRead(handle, &word_value, 1, 2); // seconds + ttm.tm_sec = word_value; + + if (imBinFileError(handle)) + return 0; + + if (valid) + { + time_t tt = mktime(&ttm); + char* str = ctime(&tt); + if (str) + { + int size = strlen(str); + str[size-1] = 0; // remove "\n" + attrib_table->Set("DateTimeModified", IM_BYTE, size, str); + } + } + } + + // job name + imBinFileRead(handle, buffer, 41, 1); + if (buffer[0] != 0) + attrib_table->Set("JobName", IM_BYTE, imStrNLen((char*)buffer, 41)+1, buffer); + + // job time + imBinFileSeekOffset(handle, 6); + + // Software + imBinFileRead(handle, buffer, 41, 1); + if (buffer[0] != 0) + attrib_table->Set("Software", IM_BYTE, imStrNLen((char*)buffer, 41)+1, buffer); + + if (imBinFileError(handle)) + return 0; + + // Software Version + imBinFileRead(handle, &word_value, 1, 2); + if (word_value) + { + int size = sprintf((char*)buffer, "%f", (double)word_value / 100.0); + imBinFileRead(handle, &buffer[size], 1, 1); + buffer[size+1] = 0; + attrib_table->Set("SoftwareVersion", IM_BYTE, size+1, buffer); + } + + // key color, aspect ratio + imBinFileSeekOffset(handle, 8); + + // gamma + imBinFileRead(handle, &word_value, 1, 2); // num + if (word_value) + { + float gamma = (float)word_value; + imBinFileRead(handle, &word_value, 1, 2); // den + if (word_value) + { + gamma /= (float)word_value; + attrib_table->Set("Gamma", IM_FLOAT, 1, &gamma); + } + } + + if (imBinFileError(handle)) + return 0; + + return 1; +} + +static void iGetRational(float fvalue, int *num, int *den) +{ + if (floorf(fvalue) == fvalue) + { + *num = (int)floorf(fvalue); + *den = 1; + return; + } + + float ivalue = 1.0f/fvalue; + if (floorf(ivalue) == ivalue) + { + *den = (int)floorf(ivalue); + *num = 1; + return; + } + + *den = 1; + if (fvalue > 0) + { + while (fvalue < 1L<<(31-3) && *den < 1L<<(31-3)) + { + fvalue *= 1<<3; + *den *= 1<<3; + } + } + + *num = imRound(fvalue); +} + +int imFileFormatTGA::SaveExtensionArea() +{ + unsigned int dword_value; + unsigned short word_value; + + // get offset before write + long ext_offset = imBinFileTell(handle); + + imbyte buffer[512]; + memset(buffer, 0, 512); + + imAttribTable* attrib_table = AttribTable(); + + // extension size + word_value = 495; + imBinFileWrite(handle, &word_value, 1, 2); + + // author name + int attrib_size; + const void* attrib_data = attrib_table->Get("Author", NULL, &attrib_size); + if (attrib_data) + { + int size = attrib_size > 41? 40: attrib_size; + imBinFileWrite(handle, (void*)attrib_data, size, 1); + if (size < 41) + imBinFileWrite(handle, buffer, 41-size, 1); + } + else + imBinFileWrite(handle, buffer, 41, 1); + + // author comments + attrib_data = attrib_table->Get("Description", NULL, &attrib_size); + if (attrib_data) + { + int size = 0, size2 = 0, i = 0; + while(attrib_size && i < 4) + { + int line_size; + if (attrib_size > 81) + line_size = 80; + else + line_size = attrib_size; + + memcpy(buffer + size, (imbyte*)attrib_data + size2, line_size); + + attrib_size -= line_size; + size2 += line_size; + size += line_size; + i++; + + int remain = 81-line_size; + if (remain) + { + memset(buffer + size, 0, remain); + size += remain; + } + } + + imBinFileWrite(handle, buffer, 324, 1); + memset(buffer, 0, 512); + } + else + imBinFileWrite(handle, buffer, 324, 1); + + if (imBinFileError(handle)) + return 0; + + attrib_data = attrib_table->Get("DateTimeModified"); + if (attrib_data) + { + time_t cur_time; + time(&cur_time); + tm* ttm = localtime(&cur_time); + + word_value = (imushort)ttm->tm_mon+1; + imBinFileWrite(handle, &word_value, 1, 2); // moth + word_value = (imushort)ttm->tm_mday; + imBinFileWrite(handle, &word_value, 1, 2); // day + word_value = (imushort)ttm->tm_year+1900; + imBinFileWrite(handle, &word_value, 1, 2); // year + word_value = (imushort)ttm->tm_hour; + imBinFileWrite(handle, &word_value, 1, 2); // hour + word_value = (imushort)ttm->tm_min; + imBinFileWrite(handle, &word_value, 1, 2); // minute + word_value = (imushort)ttm->tm_sec; + imBinFileWrite(handle, &word_value, 1, 2); // seconds + + if (imBinFileError(handle)) + return 0; + } + else + imBinFileWrite(handle, buffer, 12, 1); + + // job name + attrib_data = attrib_table->Get("JobName", NULL, &attrib_size); + if (attrib_data) + { + int size = attrib_size > 41? 40: attrib_size; + imBinFileWrite(handle, (void*)attrib_data, size, 1); + if (size < 41) + imBinFileWrite(handle, buffer, 41-size, 1); + } + else + imBinFileWrite(handle, buffer, 41, 1); + + // job time + imBinFileWrite(handle, buffer, 6, 1); + + // Software + attrib_data = attrib_table->Get("Software", NULL, &attrib_size); + if (attrib_data) + { + int size = attrib_size > 41? 40: attrib_size; + imBinFileWrite(handle, (void*)attrib_data, size, 1); + if (size < 41) + imBinFileWrite(handle, buffer, 41-size, 1); + } + else + imBinFileWrite(handle, buffer, 41, 1); + + if (imBinFileError(handle)) + return 0; + + // Software Version, key color, aspect ratio + imBinFileWrite(handle, buffer, 11, 1); + + // gamma + attrib_data = attrib_table->Get("Gamma"); + if (attrib_data) + { + float gamma = *(float*)attrib_data; + + int num, den; + iGetRational(gamma, &num, &den); + + word_value = (imushort)num; + imBinFileWrite(handle, &word_value, 1, 2); // num + word_value = (imushort)den; + imBinFileWrite(handle, &word_value, 1, 2); // den + } + else + imBinFileWrite(handle, buffer, 4, 1); + + // Color Correction, Postage Stamp, Scanline Offset, Attributes Type + imBinFileWrite(handle, buffer, 13, 1); + + // FOOTER + + // extension offset + dword_value = ext_offset; + imBinFileWrite(handle, &dword_value, 1, 4); + + // Developer Directory Offset + imBinFileWrite(handle, buffer, 4, 1); + + // signature, reserved, zero string terminator + imBinFileWrite(handle, (void*)"TRUEVISION-XFILE.\0", 18, 1); + + if (imBinFileError(handle)) + return 0; + + return 1; +} + +void imFileFormatTGA::FixRGB() +{ + int x; + imbyte* byte_data = (imbyte*)this->line_buffer; + + if (this->bpp == 16) + { + /* inverts the WORD values if not intel */ + if (imBinCPUByteOrder() == IM_BIGENDIAN) + imBinSwapBytes2(this->line_buffer, this->width); + + imushort* word_data = (imushort*)this->line_buffer; + + // from end to start + for (x = this->width-1; x >= 0; x--) + { + imushort word_value = word_data[x]; + int c = x*3; + byte_data[c] = (imbyte)(((word_value & 0x7C00) >> 10)*8); + byte_data[c+1] = (imbyte)(((word_value & 0x03E0) >> 5)*8); + byte_data[c+2] = (imbyte)( (word_value & 0x001F) *8); + } + } + else // 24 and 32 + { + // convert BGR <-> RGB + // convert BGRA <-> RGBA + imbyte* byte_data = (imbyte*)this->line_buffer; + int planes = this->bpp/8; + for (x = 0; x < this->width; x++) + { + int c = x*planes; + imbyte temp = byte_data[c]; // swap R and B + byte_data[c] = byte_data[c+2]; + byte_data[c+2] = temp; + } + } +} + +int imFileFormatTGA::ReadImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Reading TGA..."); + + int line_size = this->line_buffer_size; + if (this->bpp == 16) + line_size = this->width*2; + + for (int row = 0; row < this->height; row++) + { + if (this->image_type > 3) + { + if (iTGADecodeScanLine(handle, (imbyte*)this->line_buffer, this->width, this->bpp/8) == IM_ERR_ACCESS) + return IM_ERR_ACCESS; + } + else + { + imBinFileRead(handle, this->line_buffer, line_size, 1); + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + } + + if (this->bpp > 8) + FixRGB(); + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + return IM_ERR_NONE; +} + +int imFileFormatTGA::WriteImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Writing TGA..."); + + imbyte* compressed_buffer = NULL; + if (this->image_type > 3) // point to the extra buffer + compressed_buffer = (imbyte*)this->line_buffer + this->line_buffer_size; + + for (int row = 0; row < this->height; row++) + { + imFileLineBufferWrite(this, data, row, 0); + + if (this->bpp > 8) + FixRGB(); + + if (this->image_type > 3) + { + int compressed_size = iTGAEncodeScanLine(compressed_buffer, (imbyte*)this->line_buffer, this->width, this->bpp/8); + imBinFileWrite(handle, compressed_buffer, compressed_size, 1); + } + else + { + imBinFileWrite(handle, this->line_buffer, this->line_buffer_size, 1); + } + + if (imBinFileError(handle)) + return IM_ERR_ACCESS; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + if (!SaveExtensionArea()) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +int imFormatTGA::CanWrite(const char* compression, int color_mode, int data_type) const +{ + int color_space = imColorModeSpace(color_mode); + + if (color_space == IM_YCBCR || color_space == IM_LAB || + color_space == IM_LUV || color_space == IM_XYZ || + color_space == IM_CMYK) + return IM_ERR_DATA; + + if (data_type != IM_BYTE) + return IM_ERR_DATA; + + if (!compression || compression[0] == 0) + return IM_ERR_NONE; + + if (!imStrEqual(compression, "NONE") && !imStrEqual(compression, "RLE")) + return IM_ERR_COMPRESS; + + return IM_ERR_NONE; +} diff --git a/im/src/im_format_wmv.cpp b/im/src/im_format_wmv.cpp new file mode 100755 index 0000000..4f3b31b --- /dev/null +++ b/im/src/im_format_wmv.cpp @@ -0,0 +1,1633 @@ +/** \file + * \brief WMV - Windows Media Video Format + * + * See Copyright Notice in im_lib.h + * $Id: im_format_wmv.cpp,v 1.3 2009/08/23 23:57:52 scuri Exp $ + */ + +#include "im_format.h" +#include "im_util.h" +#include "im_format_wmv.h" +#include "im_counter.h" + +#include + +//#include +#define AMINTERLACE_1FieldPerSample 0x00000002 +#define AMINTERLACE_Field1First 0x00000004 + +#include "im_dib.h" + +#include +#include +#include +#include + + +#define SAFE_RELEASE( x ) \ + if ( x ) \ + { \ + x->Release(); \ + x = NULL; \ + } + +#define SAFE_ARRAYDELETE( x ) \ + if ( x ) \ + { \ + delete[] x; \ + x = NULL; \ + } + +static HRESULT iConfigCompressedStream( IWMStreamConfig * pStreamConfig, + IWMProfile * pIWMProfile, + BOOL fIsVBR, DWORD dwBitrate, DWORD dwQuality, DWORD dwSecPerKey, + WM_MEDIA_TYPE * pmt ) +{ + WORD wFALSE = 0; + HRESULT hr = S_OK; + + do + { + // This is used just to get the stream number, it will be released and + // NOT added to the profile + IWMStreamConfig * pStreamConfig2 = NULL; + hr = pIWMProfile->CreateNewStream( WMMEDIATYPE_Video, &pStreamConfig2 ); + if (FAILED(hr)) + break; + + WORD wStreamNum = 0; + hr = pStreamConfig2->GetStreamNumber( &wStreamNum ); + + SAFE_RELEASE( pStreamConfig2 ); + + if (FAILED(hr)) + break; + + // Configure the stream + + hr = pStreamConfig->SetStreamNumber( wStreamNum ); + if (FAILED(hr)) + break; + + hr = pStreamConfig->SetStreamName( L"Video Stream" ); + if (FAILED(hr)) + break; + + // Each stream in the profile has to have a unique connection name. + // Let's use the stream number to create it. + + WCHAR pwszConnectionName[10]; + swprintf( pwszConnectionName, L"Video%d", (DWORD)wStreamNum ); + + hr = pStreamConfig->SetConnectionName( pwszConnectionName ); + if (FAILED(hr)) + break; + + hr = pStreamConfig->SetBitrate( dwBitrate ); + if (FAILED(hr)) + break; + + hr = pStreamConfig->SetBufferWindow( (DWORD)-1 ); + if (FAILED(hr)) + break; + + IWMVideoMediaProps * pIWMMediaProps = NULL; + hr = pStreamConfig->QueryInterface( IID_IWMVideoMediaProps, (void **) &pIWMMediaProps ); + if (FAILED(hr)) + break; + + hr = pIWMMediaProps->SetQuality( dwQuality ); + hr = pIWMMediaProps->SetMaxKeyFrameSpacing( 10000 * (QWORD)dwSecPerKey ); + + hr = pIWMMediaProps->SetMediaType( pmt ); + + SAFE_RELEASE( pIWMMediaProps ); + + if (FAILED(hr)) + break; + + IWMPropertyVault* pPropertyVault = NULL; + hr = pStreamConfig->QueryInterface( IID_IWMPropertyVault, (void**)&pPropertyVault ); + if (FAILED(hr)) + break; + + hr = pPropertyVault->SetProperty( g_wszVBREnabled, WMT_TYPE_BOOL, (BYTE*)&fIsVBR, sizeof( BOOL ) ); + if ( SUCCEEDED( hr ) && fIsVBR) + pPropertyVault->SetProperty( g_wszVBRQuality, WMT_TYPE_DWORD, (BYTE*)&dwQuality, sizeof( DWORD ) ); + + SAFE_RELEASE( pPropertyVault ); + + hr = S_OK; + + } while( wFALSE ); + + return( hr ); +} + +static HRESULT iCreateCompressedStream(IWMProfileManager * pManager, + IWMStreamConfig* *pNewStreamConfig, + WM_MEDIA_TYPE* *pNewMediaType, + WORD biBitCount, GUID subtype) +{ + IWMCodecInfo * pCodecInfo = NULL; + IWMMediaProps * pMediaProps = NULL; + + IWMStreamConfig* pStreamConfig = NULL; + WM_MEDIA_TYPE* pMediaType = NULL; + + HRESULT hr = S_OK; + WORD wFALSE = 0; + + do + { + hr = pManager->QueryInterface(IID_IWMCodecInfo, (void **) &pCodecInfo); + if (FAILED(hr)) + break; + + DWORD cCodecs; + hr = pCodecInfo->GetCodecInfoCount( WMMEDIATYPE_Video, &cCodecs ); + if (FAILED(hr)) + break; + + for( int i = cCodecs-1; i >= 0; i-- ) + { + DWORD cFormats; + hr = pCodecInfo->GetCodecFormatCount( WMMEDIATYPE_Video, i, &cFormats ); + if (FAILED(hr)) + break; + + for(DWORD j = 0; j < cFormats; j++ ) + { + SAFE_RELEASE( pStreamConfig ); + + hr = pCodecInfo->GetCodecFormat( WMMEDIATYPE_Video, i, j, &pStreamConfig ); + if (FAILED(hr)) + break; + + SAFE_RELEASE( pMediaProps ); + + hr = pStreamConfig->QueryInterface( IID_IWMMediaProps, (void **) &pMediaProps ); + if (FAILED(hr)) + break; + + DWORD cbMT; + hr = pMediaProps->GetMediaType( NULL, &cbMT ); + if (FAILED(hr)) + break; + + SAFE_ARRAYDELETE( pMediaType ); + + pMediaType = (WM_MEDIA_TYPE *) new BYTE[ cbMT ]; + if( !pMediaType ) + { + hr = E_OUTOFMEMORY; + break; + } + + hr = pMediaProps->GetMediaType( pMediaType, &cbMT ); + if (FAILED(hr)) + break; + + if( pMediaType->formattype != WMFORMAT_VideoInfo || + pMediaType->subtype != subtype) // This is our main target + { + SAFE_RELEASE( pStreamConfig ); + continue; + } + + WMVIDEOINFOHEADER* pVIH = (WMVIDEOINFOHEADER*) pMediaType->pbFormat; + + if( pVIH->bmiHeader.biBitCount >= biBitCount ) + break; // SUCCESS !!!!! + + SAFE_RELEASE( pStreamConfig ); + } + + if( FAILED( hr ) || NULL != pStreamConfig ) + break; + } + + if (FAILED(hr)) + break; + + if( NULL == pStreamConfig ) + { + hr = NS_E_VIDEO_CODEC_NOT_INSTALLED; + break; + } + + } while( wFALSE ); + + SAFE_RELEASE( pCodecInfo ); + SAFE_RELEASE( pMediaProps ); + + *pNewStreamConfig = pStreamConfig; + *pNewMediaType = pMediaType; + + return( hr ); +} + +static HRESULT iAddCompressedVideoStream( IWMProfileManager * pManager, IWMProfile * pIWMProfile, + GUID subtype, BITMAPINFOHEADER * bmiHeader, float fps, + BOOL fIsVBR, DWORD dwBitRate, DWORD dwQuality, DWORD dwSecPerKey) +{ + HRESULT hr = S_OK; + WORD wFALSE = 0; + + IWMStreamConfig* pStreamConfig = NULL; + WM_MEDIA_TYPE* pMediaType = NULL; + + do + { + hr = iCreateCompressedStream(pManager, &pStreamConfig, &pMediaType, + bmiHeader->biBitCount, subtype); + if (FAILED(hr)) + break; + + WMVIDEOINFOHEADER * pVIH = (WMVIDEOINFOHEADER *) pMediaType->pbFormat; + + pVIH->dwBitRate = dwBitRate; + + // Video content does not play correctly unless it is encoded + // to a size that is a multiple of four for both width and height. + pVIH->bmiHeader.biWidth = ((bmiHeader->biWidth + 3) / 4) * 4; + pVIH->bmiHeader.biHeight = ((bmiHeader->biHeight + 3) / 4) * 4; + + pVIH->rcSource.left = 0; + pVIH->rcSource.top = 0; + pVIH->rcSource.bottom = pVIH->bmiHeader.biHeight; + pVIH->rcSource.right = pVIH->bmiHeader.biWidth; + pVIH->rcTarget = pVIH->rcSource; + pVIH->dwBitErrorRate = 0; + pVIH->AvgTimePerFrame = (LONGLONG)(10000000.0f / fps); + + hr = iConfigCompressedStream( pStreamConfig, pIWMProfile, + fIsVBR, dwBitRate, dwQuality, + dwSecPerKey, pMediaType ); + if (FAILED(hr)) + break; + + hr = pIWMProfile->AddStream( pStreamConfig ); + if (FAILED(hr)) + break; + } + while( wFALSE ); + + SAFE_RELEASE( pStreamConfig ); + SAFE_ARRAYDELETE( pMediaType ); + + return( hr ); +} + +static HRESULT iConfigUncompressedStream( IWMStreamConfig * pStreamConfig, + DWORD dwBitrate, + WM_MEDIA_TYPE * pmt ) +{ + WORD wFALSE = 0; + HRESULT hr = S_OK; + + do + { + // Configure the stream + + hr = pStreamConfig->SetStreamName( L"Video Stream" ); + if (FAILED(hr)) + break; + + // Each stream in the profile has to have a unique connection name. + // Let's use the stream number to create it. + + WORD wStreamNum = 0; + hr = pStreamConfig->GetStreamNumber( &wStreamNum ); + if (FAILED(hr)) + break; + + WCHAR pwszConnectionName[10]; + swprintf( pwszConnectionName, L"Video%d", (DWORD)wStreamNum ); + + hr = pStreamConfig->SetConnectionName( pwszConnectionName ); + if (FAILED(hr)) + break; + + hr = pStreamConfig->SetBitrate( dwBitrate ); + if (FAILED(hr)) + break; + + hr = pStreamConfig->SetBufferWindow( 0 ); + if (FAILED(hr)) + break; + + IWMMediaProps * pIWMMediaProps = NULL; + hr = pStreamConfig->QueryInterface( IID_IWMMediaProps, (void **) &pIWMMediaProps ); + if (FAILED(hr)) + break; + + hr = pIWMMediaProps->SetMediaType( pmt ); + + SAFE_RELEASE( pIWMMediaProps ); + + if (FAILED(hr)) + break; + + IWMPropertyVault* pPropertyVault = NULL; + hr = pStreamConfig->QueryInterface( IID_IWMPropertyVault, (void**)&pPropertyVault ); + if (FAILED(hr)) + break; + + BOOL fFalse = FALSE; + hr = pPropertyVault->SetProperty( g_wszVBREnabled, WMT_TYPE_BOOL, (BYTE*)&fFalse, sizeof( BOOL ) ); + + SAFE_RELEASE( pPropertyVault ); + + hr = S_OK; + + } while( wFALSE ); + + return( hr ); +} + +static HRESULT iAddUncompressedVideoStream( IWMProfile * pProfile, + BITMAPINFOHEADER * bmiHeader, + int BitmapInfoSize, int BitmapDataSize, + float fps) +{ + HRESULT hr = S_OK; + WORD wFALSE = 0; + + IWMStreamConfig* pStreamConfig = NULL; + WM_MEDIA_TYPE* pMediaType = NULL; + + do + { + hr = pProfile->CreateNewStream( WMMEDIATYPE_Video, &pStreamConfig ); + if ( FAILED( hr ) ) + break; + + DWORD cbVideoInfo = sizeof(WMVIDEOINFOHEADER) - sizeof(BITMAPINFOHEADER) + BitmapInfoSize; + + // Create a new Media Type + pMediaType = (WM_MEDIA_TYPE*) new BYTE[ sizeof( WM_MEDIA_TYPE ) + cbVideoInfo ]; + if ( !pMediaType) + { + hr = E_OUTOFMEMORY; + break; + } + + switch (bmiHeader->biBitCount) + { + case 32: + pMediaType->subtype = WMMEDIASUBTYPE_RGB32; + break; + case 24: + pMediaType->subtype = WMMEDIASUBTYPE_RGB24; + break; + case 8: + pMediaType->subtype = WMMEDIASUBTYPE_RGB8; + break; + } + + pMediaType->majortype = WMMEDIATYPE_Video; + pMediaType->bFixedSizeSamples = TRUE; + pMediaType->bTemporalCompression = FALSE; + pMediaType->lSampleSize = BitmapDataSize; + pMediaType->formattype = WMFORMAT_VideoInfo; + pMediaType->pUnk = NULL; + pMediaType->cbFormat = cbVideoInfo; + pMediaType->pbFormat = ( ((BYTE*) pMediaType) + sizeof( WM_MEDIA_TYPE ) ); // Format data is immediately after media type + + WMVIDEOINFOHEADER * pVIH = (WMVIDEOINFOHEADER *) pMediaType->pbFormat; + + pVIH->rcSource.left = 0; + pVIH->rcSource.top = 0; + pVIH->rcSource.bottom = bmiHeader->biHeight; + pVIH->rcSource.right = bmiHeader->biWidth; + pVIH->rcTarget = pVIH->rcSource; + pVIH->dwBitRate = (DWORD)(BitmapDataSize * fps); + pVIH->dwBitErrorRate = 0; + pVIH->AvgTimePerFrame = (LONGLONG)(10000000.0f / fps); + + CopyMemory(&pVIH->bmiHeader, bmiHeader, BitmapInfoSize); + + hr = iConfigUncompressedStream( pStreamConfig, pVIH->dwBitRate, pMediaType ); + if (FAILED(hr)) + break; + + hr = pProfile->AddStream( pStreamConfig ); + if (FAILED(hr)) + break; + } + while( wFALSE ); + + SAFE_RELEASE( pStreamConfig ); + SAFE_ARRAYDELETE( pMediaType ); + + return( hr ); +} + +#define WMV_COMPRESS_COUNT 7 +#define WMV_UNCOMPRESS_COUNT 9 + +static GUID iWMVCompSubtypeTable[WMV_COMPRESS_COUNT+WMV_UNCOMPRESS_COUNT]; + +static void iInitGuid() +{ + iWMVCompSubtypeTable[0] = WMMEDIASUBTYPE_MP43; + iWMVCompSubtypeTable[1] = WMMEDIASUBTYPE_MP4S; + iWMVCompSubtypeTable[2] = WMMEDIASUBTYPE_WMV1; + iWMVCompSubtypeTable[3] = WMMEDIASUBTYPE_MSS1; + iWMVCompSubtypeTable[4] = WMMEDIASUBTYPE_WMV2; + iWMVCompSubtypeTable[5] = WMMEDIASUBTYPE_MSS2; + iWMVCompSubtypeTable[6] = WMMEDIASUBTYPE_WMV3; + + iWMVCompSubtypeTable[WMV_COMPRESS_COUNT+0] = WMMEDIASUBTYPE_RGB555; + iWMVCompSubtypeTable[WMV_COMPRESS_COUNT+1] = WMMEDIASUBTYPE_RGB24; + iWMVCompSubtypeTable[WMV_COMPRESS_COUNT+2] = WMMEDIASUBTYPE_RGB32; + iWMVCompSubtypeTable[WMV_COMPRESS_COUNT+3] = WMMEDIASUBTYPE_I420; + iWMVCompSubtypeTable[WMV_COMPRESS_COUNT+4] = WMMEDIASUBTYPE_IYUV; + iWMVCompSubtypeTable[WMV_COMPRESS_COUNT+5] = WMMEDIASUBTYPE_YV12; + iWMVCompSubtypeTable[WMV_COMPRESS_COUNT+6] = WMMEDIASUBTYPE_YUY2; + iWMVCompSubtypeTable[WMV_COMPRESS_COUNT+7] = WMMEDIASUBTYPE_UYVY; + iWMVCompSubtypeTable[WMV_COMPRESS_COUNT+8] = WMMEDIASUBTYPE_YVYU; +} + +static const char* iWMVCompTable[WMV_COMPRESS_COUNT+1] = +{ + "NONE", + "MPEG-4v3", + "MPEG-4v1", + "WMV7", + "WMV7Screen", + "WMV8", + "WMV9Screen", + "WMV9" +}; + +static const char* iWMFCompFindName(GUID SubType) +{ + int i; + for(i = 0; i < WMV_COMPRESS_COUNT; i++) + { + if (SubType == iWMVCompSubtypeTable[i]) + return iWMVCompTable[i+1]; + } + + for(; i < WMV_COMPRESS_COUNT+WMV_UNCOMPRESS_COUNT; i++) + { + if (SubType == iWMVCompSubtypeTable[i]) + return iWMVCompTable[0]; + } + + return "Unknown"; +} + +static GUID iWMFCompFindSubType(const char* compression) +{ + if (compression[0] == 0) + return WMMEDIASUBTYPE_WMV3; + + for(int i = 0; i < WMV_COMPRESS_COUNT; i++) + { + if (imStrEqual(compression, iWMVCompTable[i+1])) + return iWMVCompSubtypeTable[i]; + } + + return WMMEDIASUBTYPE_Base; +} + +class imFileFormatWMV: public imFileFormatBase +{ + IWMSyncReader* Reader; // When reading + WM_MEDIA_TYPE* MediaType; + WORD stream_number; + DWORD seekable; + int current_frame; + + IWMWriter* Writer; // When writing + DWORD input_number; + DWORD BitmapDataSize; + DWORD BitmapInfoSize; + + float fps; + WCHAR wfile_name[4096]; + IWMHeaderInfo* HeaderInfo; + BITMAPINFOHEADER* bmiHeader; + unsigned int rmask, gmask, bmask, + roff, goff, boff; /* pixel bit mask control when reading 16 and 32 bpp images */ + + void ReadPalette(unsigned char* bmp_colors); + void WritePalette(unsigned char* bmp_colors); + void FixRGB(int bpp); + void InitMasks(imDib* dib); + void iReadAttrib(imAttribTable* attrib_table); + void iWriteAttrib(imAttribTable* attrib_table); + void CalcFPS(); + void SetOutputProps(); + int SetInputProps(); + int SetProfile(); + +public: + imFileFormatWMV(const imFormat* _iformat): imFileFormatBase(_iformat) {} + ~imFileFormatWMV() {} + + int Open(const char* file_name); + int New(const char* file_name); + void Close(); + void* Handle(int index); + int ReadImageInfo(int index); + int ReadImageData(void* data); + int WriteImageInfo(); + int WriteImageData(void* data); +}; + +class imFormatWMV: public imFormat +{ +public: + imFormatWMV() + :imFormat("WMV", + "Windows Media Video Format", + "*.wmv;*.asf;", + iWMVCompTable, + WMV_COMPRESS_COUNT+1, + 1) + {} + ~imFormatWMV() {} + + imFileFormatBase* Create(void) const { return new imFileFormatWMV(this); } + int CanWrite(const char* compression, int color_mode, int data_type) const; +}; + +void imFormatRegisterWMV(void) +{ + imFormatRegister(new imFormatWMV()); +} + +int imFileFormatWMV::Open(const char* file_name) +{ + /* initializes COM */ + CoInitialize(NULL); + iInitGuid(); + + HRESULT hr = WMCreateSyncReader(NULL, 0, &Reader); + if (hr != 0) + { + CoUninitialize(); + return IM_ERR_MEM; + } + + /* open existing file */ + MultiByteToWideChar(CP_ACP, 0, file_name, -1, wfile_name, 4096); + hr = Reader->Open(wfile_name); + if (hr != 0) + { + Reader->Release(); + CoUninitialize(); + + if (hr == NS_E_FILE_OPEN_FAILED || + hr == NS_E_FILE_NOT_FOUND || + hr == NS_E_INVALID_DATA) + return IM_ERR_OPEN; + else if (hr == NS_E_UNRECOGNIZED_STREAM_TYPE) + return IM_ERR_FORMAT; + else + return IM_ERR_ACCESS; + } + + IWMProfile* pProfile = NULL; + Reader->QueryInterface(IID_IWMProfile, (VOID**)&pProfile); + + DWORD stream_count; + pProfile->GetStreamCount(&stream_count); + + this->stream_number = (WORD)-1; + for (int i = 0; i < (int)stream_count; i++) + { + IWMStreamConfig* StreamConfig; + pProfile->GetStream(i, &StreamConfig); + + GUID StreamType; + StreamConfig->GetStreamType(&StreamType); + + if (StreamType == WMMEDIATYPE_Video || + StreamType == WMMEDIATYPE_Image) + { + hr = StreamConfig->GetStreamNumber(&this->stream_number); + + IWMMediaProps* Props; + StreamConfig->QueryInterface(IID_IWMMediaProps, (VOID**)&Props); + + DWORD pcbType; + Props->GetMediaType(NULL, &pcbType); + MediaType = (WM_MEDIA_TYPE*)malloc(pcbType); + Props->GetMediaType(MediaType, &pcbType); + + Props->Release(); + + const char* comp_name = iWMFCompFindName(MediaType->subtype); + strcpy(this->compression, comp_name); + break; + } + + StreamConfig->Release(); + } + + if (this->stream_number == (WORD)-1) + { + pProfile->Release(); + Reader->Close(); + Reader->Release(); + CoUninitialize(); + return IM_ERR_DATA; + } + + hr = Reader->QueryInterface(IID_IWMHeaderInfo, (VOID**)&HeaderInfo); + + CalcFPS(); + + WMT_ATTR_DATATYPE attrib_type; + WORD attrib_length; + WORD StreamNumber = 0; + + seekable = 0; + attrib_length = 4; + attrib_type = WMT_TYPE_BOOL; + hr = HeaderInfo->GetAttributeByName(&StreamNumber, g_wszWMSeekable, + &attrib_type, (BYTE*)&seekable, &attrib_length); + + QWORD num_frame = 0; + attrib_length = 8; + attrib_type = WMT_TYPE_QWORD; + hr = HeaderInfo->GetAttributeByName(&stream_number, g_wszWMNumberOfFrames, + &attrib_type, (BYTE*)&num_frame, &attrib_length); + + if (num_frame == 0) + { + QWORD duration = 0; + attrib_length = 8; + attrib_type = WMT_TYPE_QWORD; + hr = HeaderInfo->GetAttributeByName(&StreamNumber, g_wszWMDuration, + &attrib_type, (BYTE*)&duration, &attrib_length); + + num_frame = (int)(((double)(unsigned int)duration * (double)fps) / 10000000.0); + } + + this->image_count = (int)num_frame; + + SetOutputProps(); + + WMT_STREAM_SELECTION wmtSS = WMT_ON; + hr = Reader->SetStreamsSelected(1, &stream_number, &wmtSS); + hr = Reader->SetReadStreamSamples(stream_number, FALSE); + + this->bmiHeader = NULL; + this->current_frame = 0; + + return IM_ERR_NONE; +} + +int imFileFormatWMV::New(const char* file_name) +{ + /* initializes COM */ + CoInitialize(NULL); + iInitGuid(); + + HRESULT hr = WMCreateWriter(NULL, &Writer); + if (hr != 0) + { + CoUninitialize(); + return IM_ERR_MEM; + } + + MultiByteToWideChar(CP_ACP, 0, file_name, -1, wfile_name, 4096); + + Writer->QueryInterface(IID_IWMHeaderInfo, (VOID**)&HeaderInfo); + + this->bmiHeader = NULL; + this->current_frame = 0; + + return IM_ERR_NONE; +} + +void imFileFormatWMV::Close() +{ + HeaderInfo->Release(); + + if (this->is_new) + { + free(this->bmiHeader); + + Writer->EndWriting(); + Writer->Release(); + } + else + { + free(MediaType); + + Reader->Close(); + Reader->Release(); + } + + CoUninitialize(); +} + +void* imFileFormatWMV::Handle(int index) +{ + if (index == 1) + { + if (this->is_new) + return (void*)this->Writer; + else + return (void*)this->Reader; + } + else + return NULL; +} + +void imFileFormatWMV::iReadAttrib(imAttribTable* attrib_table) +{ + WORD StreamNumber = 0; + WORD attrib_list_count = 0; + HeaderInfo->GetAttributeCount(StreamNumber, &attrib_list_count); + + WCHAR* attrib_name = NULL; + int name_max_size = 0; + char* name = NULL; + WORD attrib_name_count; + WMT_ATTR_DATATYPE attrib_type; + BYTE* attrib_data = NULL; + WORD attrib_length; + int data_max_size = 0; + HRESULT hr; + int data_type, data_count; + + for (WORD i = 0; i < attrib_list_count; i++) + { + attrib_name_count = 0; + attrib_length = 0; + + hr = HeaderInfo->GetAttributeByIndex(i, &StreamNumber, NULL, &attrib_name_count, + &attrib_type, NULL, &attrib_length); + + if (FAILED(hr)) + continue; + + if (attrib_length == 0) + continue; + + if (name_max_size < attrib_name_count) + { + attrib_name = (WCHAR*)realloc(attrib_name, attrib_name_count*2); + name = (char*)realloc(name, attrib_name_count); + name_max_size = attrib_name_count; + } + + if (data_max_size < attrib_length) + { + attrib_data = (BYTE*)realloc(attrib_data, attrib_length); + data_max_size = attrib_length; + } + + HeaderInfo->GetAttributeByIndex(i, &StreamNumber, attrib_name, &attrib_name_count, + &attrib_type, attrib_data, &attrib_length); + + WideCharToMultiByte(CP_ACP, 0, attrib_name, attrib_name_count, name, attrib_name_count, NULL, NULL); + + switch (attrib_type) + { + case WMT_TYPE_BOOL: + { + DWORD* ddata = (DWORD*)attrib_data; + if (*ddata == 0) + continue; + } + case WMT_TYPE_DWORD: + data_type = IM_INT; + data_count = attrib_length/4; + break; + case WMT_TYPE_STRING: + data_type = IM_BYTE; + data_count = attrib_length/2; + { + WCHAR* wdata = (WCHAR*)attrib_data; + CHAR* sdata = (CHAR*)attrib_data; + for (int j = 0; j < data_count; j++) + { + CHAR cvalue; + WideCharToMultiByte(CP_ACP, 0, &wdata[j], 1, &cvalue, 1, NULL, NULL); + sdata[j] = cvalue; + } + } + break; + case WMT_TYPE_BINARY: + data_type = IM_BYTE; + data_count = attrib_length; + break; + case WMT_TYPE_QWORD: + { + data_type = IM_INT; + data_count = attrib_length/8; + // convert to int in-place + QWORD* qdata = (QWORD*)attrib_data; + DWORD* ddata = (DWORD*)attrib_data; + for (int j = 0; j < data_count; j++) + { + ddata[j] = (DWORD)qdata[j]; + } + } + break; + case WMT_TYPE_WORD: + data_type = IM_USHORT; + data_count = attrib_length/2; + break; + default: + continue; + } + + attrib_table->Set(name, data_type, data_count, attrib_data); + } + + if (name) free(name); + if (attrib_name) free(attrib_name); + if (attrib_data) free(attrib_data); +} + +static int iAttribSet(void* user_data, int index, const char* name, int data_type, int data_count, const void* data) +{ + (void)index; + WORD StreamNumber = 0; + IWMHeaderInfo* HeaderInfo = (IWMHeaderInfo*)user_data; + + WCHAR wName[50]; + WMT_ATTR_DATATYPE Type; + BYTE* Value = NULL; + WORD ValueSize = 0; + + MultiByteToWideChar(CP_ACP, 0, name, -1, wName, 50); + + switch(data_type) + { + case IM_BYTE: + if (imStrCheck(data, data_count)) + Type = WMT_TYPE_STRING; + else + Type = WMT_TYPE_BINARY; + break; + case IM_USHORT: + Type = WMT_TYPE_WORD; + break; + case IM_INT: + Type = WMT_TYPE_DWORD; + break; + default: + return 1; + } + + switch (Type) + { + case WMT_TYPE_BOOL: + case WMT_TYPE_DWORD: + ValueSize = (WORD)(data_count*4); + break; + case WMT_TYPE_STRING: + ValueSize = (WORD)(data_count*2); + Value = (BYTE*)malloc(ValueSize); + MultiByteToWideChar(CP_ACP, 0, (char*)data, data_count, (WCHAR*)Value, data_count); + break; + case WMT_TYPE_BINARY: + ValueSize = (WORD)data_count; + break; + case WMT_TYPE_QWORD: + { + ValueSize = (WORD)(data_count*8); + Value = (BYTE*)malloc(ValueSize); + + QWORD* qdata = (QWORD*)Value; + int* idata = (int*)data; + for (int j = 0; j < data_count; j++) + { + qdata[j] = (QWORD)idata[j]; + } + } + break; + case WMT_TYPE_WORD: + ValueSize = (WORD)(data_count*2); + break; + } + + if (Value) + { + HeaderInfo->SetAttribute(StreamNumber, wName, Type, + Value, ValueSize); + free(Value); + } + else + HeaderInfo->SetAttribute(StreamNumber, wName, Type, + (BYTE*)data, ValueSize); + return 1; +} + +void imFileFormatWMV::iWriteAttrib(imAttribTable* attrib_table) +{ + attrib_table->ForEach((void*)HeaderInfo, iAttribSet); +} + +void imFileFormatWMV::CalcFPS() +{ + LONGLONG AvgTimePerFrame = 0; + + if (MediaType->formattype == WMFORMAT_VideoInfo) + { + WMVIDEOINFOHEADER* info_header = (WMVIDEOINFOHEADER*)MediaType->pbFormat; + bmiHeader = &info_header->bmiHeader; + AvgTimePerFrame = info_header->AvgTimePerFrame; + } + else if (MediaType->formattype == WMFORMAT_MPEG2Video) + { + WMVIDEOINFOHEADER2* info_header = (WMVIDEOINFOHEADER2*)MediaType->pbFormat; + bmiHeader = &info_header->bmiHeader; + AvgTimePerFrame = info_header->AvgTimePerFrame; + } + + WMT_ATTR_DATATYPE attrib_type; + WORD attrib_length; + + DWORD frame_rate = 0; + attrib_length = 4; + HeaderInfo->GetAttributeByName(&stream_number, g_wszWMVideoFrameRate, // V9 Only + &attrib_type, (BYTE*)&frame_rate, &attrib_length); + + fps = (float)frame_rate; + if (frame_rate == 0) + { + if (AvgTimePerFrame == 0) + { + fps = 15; // default value + } + else + { + fps = 10000000.0f / (float)AvgTimePerFrame; + + int ifps = (int)(fps * 100); + if (ifps == 2997 || ifps == 2996 || ifps == 2998) + fps = (30.0f * 1000.0f) / 1001.0f; + else if (ifps == 2397 || ifps == 2396 || ifps == 2398) + fps = (24.0f * 1000.0f) / 1001.0f; + else if (ifps == 2400) + fps = 24.0f; + else if (ifps == 3000) + fps = 30.0f; + } + } +} + +void imFileFormatWMV::SetOutputProps() +{ + DWORD output_number; + Reader->GetOutputNumberForStream(stream_number, &output_number); + + DWORD format_count; + Reader->GetOutputFormatCount(output_number, &format_count); + + for(DWORD f = 0; f < format_count; f++) + { + IWMOutputMediaProps* Props; + Reader->GetOutputFormat(output_number, f, &Props); + + DWORD pcbType; + Props->GetMediaType(NULL, &pcbType); + WM_MEDIA_TYPE* mt = (WM_MEDIA_TYPE*)malloc(pcbType); + Props->GetMediaType(mt, &pcbType); + + if (mt->subtype == WMMEDIASUBTYPE_RGB24 || + mt->subtype == WMMEDIASUBTYPE_RGB8) + { + Reader->SetOutputProps(output_number, Props); + Props->Release(); + free(mt); + return; + } + + Props->Release(); + free(mt); + } +} + +int imFileFormatWMV::SetInputProps() +{ + DWORD input_count; + Writer->GetInputCount(&input_count); + + GUID guidInputType; + IWMInputMediaProps* Props = NULL; + + input_number = (DWORD)-1; + for(DWORD i = 0; i < input_count; i++) + { + Writer->GetInputProps(i, &Props); + + Props->GetType(&guidInputType); + + if(guidInputType == WMMEDIATYPE_Video) + { + input_number = i; + break; + } + + Props->Release(); + } + + if (input_number == (DWORD)-1) + return 0; + + DWORD cbVideoInfo = sizeof(WMVIDEOINFOHEADER) - sizeof(BITMAPINFOHEADER) + this->BitmapInfoSize; + WMVIDEOINFOHEADER* pVideoInfo = (WMVIDEOINFOHEADER*)new BYTE[cbVideoInfo]; + + pVideoInfo->rcSource.left = 0; + pVideoInfo->rcSource.top = 0; + pVideoInfo->rcSource.bottom = this->bmiHeader->biHeight; + pVideoInfo->rcSource.right = this->bmiHeader->biWidth; + pVideoInfo->rcTarget = pVideoInfo->rcSource; + pVideoInfo->dwBitRate = (DWORD)(this->BitmapDataSize * fps); + pVideoInfo->dwBitErrorRate = 0; + pVideoInfo->AvgTimePerFrame = (LONGLONG)(10000000.0f / fps); + + CopyMemory(&(pVideoInfo->bmiHeader), this->bmiHeader, BitmapInfoSize); + + WM_MEDIA_TYPE mt; + mt.majortype = WMMEDIATYPE_Video; + mt.bFixedSizeSamples = TRUE; + mt.bTemporalCompression = FALSE; + mt.lSampleSize = BitmapDataSize; + mt.formattype = WMFORMAT_VideoInfo; + mt.pUnk = NULL; + mt.cbFormat = cbVideoInfo; + mt.pbFormat = (BYTE*)pVideoInfo; + + switch (this->bmiHeader->biBitCount) + { + case 32: + mt.subtype = WMMEDIASUBTYPE_RGB32; + break; + case 24: + mt.subtype = WMMEDIASUBTYPE_RGB24; + break; + case 8: + mt.subtype = WMMEDIASUBTYPE_RGB8; + break; + } + + Props->SetMediaType(&mt); + + HRESULT hr = Writer->SetInputProps(input_number, Props); + Props->Release(); + free(pVideoInfo); + + if (FAILED(hr)) + return 0; + + return 1; +} + +int imFileFormatWMV::SetProfile() +{ + HRESULT hr; + + IWMProfileManager* ProfileManager = NULL; + WMCreateProfileManager(&ProfileManager); + + IWMProfile* Profile = NULL; + hr = ProfileManager->CreateEmptyProfile(WMT_VER_9_0, &Profile); + if (FAILED(hr)) + { + ProfileManager->Release(); + return 0; + } + + if (imStrEqual(this->compression, "NONE")) + { + hr = iAddUncompressedVideoStream(Profile, + this->bmiHeader, + this->BitmapInfoSize, this->BitmapDataSize, this->fps); + } + else + { + DWORD dwBitRate = 2400*1000; + const void* attrib_data = AttribTable()->Get("DataRate"); + if (attrib_data) + dwBitRate = (*(int*)attrib_data) * 1000; + + DWORD dwQuality = 50; + attrib_data = AttribTable()->Get("WMFQuality"); + if (attrib_data) + dwQuality = *(int*)attrib_data; + + DWORD dwSecPerKey = 5000; + attrib_data = AttribTable()->Get("MaxKeyFrameTime"); + if (attrib_data) + dwSecPerKey = *(int*)attrib_data; + + BOOL fIsVBR = FALSE; // CBR is the default + attrib_data = AttribTable()->Get("VBR"); + if (attrib_data) + fIsVBR = *(int*)attrib_data; + + GUID subtype = iWMFCompFindSubType(this->compression); + if (subtype == WMMEDIASUBTYPE_Base) + { + Profile->Release(); + ProfileManager->Release(); + return 0; + } + + hr = iAddCompressedVideoStream(ProfileManager, Profile, subtype, + this->bmiHeader, this->fps, + fIsVBR, dwBitRate, dwQuality, dwSecPerKey); + } + + hr = Writer->SetProfile(Profile); + Profile->Release(); + ProfileManager->Release(); + + if (FAILED(hr)) + return 0; + + return 1; +} + +int imFileFormatWMV::ReadImageInfo(int index) +{ + if (this->seekable && this->current_frame != index) + { + HRESULT hr = Reader->SetRangeByFrame(stream_number, index, 0); + this->current_frame = index; + + if (hr == NS_E_INVALID_REQUEST) + { + QWORD start_time = (QWORD)(index * (10000000.0f / fps)); + hr = Reader->SetRange(start_time, 0); + } + + if (hr != S_OK) + return IM_ERR_ACCESS; + } + + if (this->bmiHeader != NULL) + return IM_ERR_NONE; + + imAttribTable* attrib_table = AttribTable(); + + /* must clear the attribute list, because it can have multiple images and + has many attributes that may exists only for specific images. */ + attrib_table->RemoveAll(); + imFileSetBaseAttributes(this); + + if (MediaType->formattype == WMFORMAT_VideoInfo) + { + WMVIDEOINFOHEADER* info_header = (WMVIDEOINFOHEADER*)MediaType->pbFormat; + bmiHeader = &info_header->bmiHeader; + + if (info_header->dwBitRate) + { + int data_rate = info_header->dwBitRate/1000; + attrib_table->Set("DataRate", IM_INT, 1, &data_rate); + } + } + else if (MediaType->formattype == WMFORMAT_MPEG2Video) + { + WMVIDEOINFOHEADER2* info_header = (WMVIDEOINFOHEADER2*)MediaType->pbFormat; + bmiHeader = &info_header->bmiHeader; + + if (info_header->dwBitRate) + { + int data_rate = info_header->dwBitRate/1000; + attrib_table->Set("DataRate", IM_INT, 1, &data_rate); + } + + if (info_header->dwInterlaceFlags) + { + int int_value = 1; + attrib_table->Set("Interlaced", IM_INT, 1, &int_value); + + if (info_header->dwInterlaceFlags & AMINTERLACE_1FieldPerSample) + int_value = 1; + else + int_value = 2; + + attrib_table->Set("FieldsPerSample", IM_INT, 1, &int_value); + + if (info_header->dwInterlaceFlags & AMINTERLACE_Field1First) + int_value = 1; + else + int_value = 2; + + attrib_table->Set("FirstField", IM_INT, 1, &int_value); + + // OBS: The top field in PAL is field 1, and the top field in NTSC is field 2 + } + + if (info_header->dwPictAspectRatioX) + attrib_table->Set("XAspectRatio", IM_INT, 1, &info_header->dwPictAspectRatioX); + if (info_header->dwPictAspectRatioY) + attrib_table->Set("YAspectRatio", IM_INT, 1, &info_header->dwPictAspectRatioY); + } + else + return IM_ERR_DATA; + + attrib_table->Set("FPS", IM_FLOAT, 1, &fps); + + int top_down = 0; + if (bmiHeader->biHeight < 0) + top_down = 1; + + this->width = bmiHeader->biWidth; + this->height = top_down? -bmiHeader->biHeight: bmiHeader->biHeight; + + int bpp = bmiHeader->biBitCount; + + this->file_data_type = IM_BYTE; + + if (bpp > 8) + { + this->file_color_mode = IM_RGB; + this->file_color_mode |= IM_PACKED; + } + else + { + this->palette_count = 1 << bpp; + this->file_color_mode = IM_MAP; + } + + if (bpp < 8) + this->convert_bpp = bpp; + + if (bpp == 32) + this->file_color_mode |= IM_ALPHA; + + if (top_down) + this->file_color_mode |= IM_TOPDOWN; + + if (bpp <= 8) + { + /* updates the palette_count based on the number of colors used */ + if (bmiHeader->biClrUsed != 0 && + (int)bmiHeader->biClrUsed < this->palette_count) + this->palette_count = bmiHeader->biClrUsed; + + ReadPalette((unsigned char*)(bmiHeader + 1)); + } + + this->line_buffer_extra = 4; // room enough for padding + + iReadAttrib(attrib_table); + + return IM_ERR_NONE; +} + +int imFileFormatWMV::WriteImageInfo() +{ + if (this->bmiHeader) + { + if (this->bmiHeader->biWidth != width || this->bmiHeader->biHeight != height || + imColorModeSpace(file_color_mode) != imColorModeSpace(user_color_mode)) + return IM_ERR_DATA; + + return IM_ERR_NONE; // parameters can be set only once + } + + // force bottom up orientation + this->file_data_type = IM_BYTE; + this->file_color_mode = imColorModeSpace(this->user_color_mode); + + int bpp; + if (this->file_color_mode == IM_RGB) + { + this->file_color_mode |= IM_PACKED; + bpp = 24; + + if (imColorModeHasAlpha(this->user_color_mode)) + { + this->file_color_mode |= IM_ALPHA; + bpp = 32; + + this->rmask = 0x00FF0000; + this->roff = 16; + + this->gmask = 0x0000FF00; + this->goff = 8; + + this->bmask = 0x000000FF; + this->boff = 0; + } + } + else + bpp = 8; + + this->line_buffer_extra = 4; // room enough for padding + + imAttribTable* attrib_table = AttribTable(); + + const void* attrib_data = attrib_table->Get("FPS"); + if (attrib_data) + fps = *(float*)attrib_data; + else + fps = 15; + + this->BitmapDataSize = this->height * imFileLineSizeAligned(this->width, bpp, 4); + + DWORD biClrUsed = bpp > 8? 0: this->palette_count; + this->BitmapInfoSize = sizeof(BITMAPINFOHEADER) + biClrUsed * sizeof(RGBQUAD); + + this->bmiHeader = (BITMAPINFOHEADER*)malloc(this->BitmapInfoSize); + this->bmiHeader->biSize = sizeof(BITMAPINFOHEADER); + this->bmiHeader->biWidth = this->width; + this->bmiHeader->biHeight = this->height; + this->bmiHeader->biPlanes = 1; + this->bmiHeader->biBitCount = (WORD)bpp; + this->bmiHeader->biCompression = BI_RGB; + this->bmiHeader->biSizeImage = this->BitmapDataSize; + this->bmiHeader->biXPelsPerMeter = 0; + this->bmiHeader->biYPelsPerMeter = 0; + this->bmiHeader->biClrUsed = biClrUsed; + this->bmiHeader->biClrImportant = 0; + + if (this->bmiHeader->biBitCount <= 8) + WritePalette((unsigned char*)(this->bmiHeader + 1)); + + if (!SetProfile()) + return IM_ERR_COMPRESS; + + if (!SetInputProps()) + return IM_ERR_ACCESS; + + HRESULT hr = Writer->SetOutputFilename(wfile_name); + if(FAILED(hr)) + return IM_ERR_ACCESS; + + iWriteAttrib(attrib_table); + + hr = Writer->BeginWriting(); + if(FAILED(hr)) + return IM_ERR_ACCESS; + + return IM_ERR_NONE; +} + +void imFileFormatWMV::ReadPalette(unsigned char* bmp_colors) +{ + /* convert the color map to the IM format */ + for (int c = 0; c < this->palette_count; c++) + { + int i = c * 4; + this->palette[c] = imColorEncode(bmp_colors[i + 2], + bmp_colors[i + 1], + bmp_colors[i]); + } +} + +void imFileFormatWMV::WritePalette(unsigned char* bmp_colors) +{ + /* convert the color map to the IM format */ + for (int c = 0; c < this->palette_count; c++) + { + int i = c * 4; + imColorDecode(&bmp_colors[i + 2], &bmp_colors[i + 1], &bmp_colors[i], this->palette[c]); + bmp_colors[i + 3] = 0; + } +} + +void imFileFormatWMV::InitMasks(imDib* dib) +{ + if (dib->bmih->biCompression == BI_BITFIELDS) + { + unsigned int Mask; + unsigned int *PalMask = (unsigned int*)dib->bmic; + + this->roff = 0; + this->rmask = Mask = PalMask[0]; + while (!(Mask & 0x01) && (Mask != 0)) + {Mask >>= 1; this->roff++;} + + this->goff = 0; + this->gmask = Mask = PalMask[1]; + while (!(Mask & 0x01) && (Mask != 0)) + {Mask >>= 1; this->goff++;} + + this->boff = 0; + this->bmask = Mask = PalMask[2]; + while (!(Mask & 0x01) && (Mask != 0)) + {Mask >>= 1; this->boff++;} + } + else + { + if (dib->bmih->biBitCount == 16) + { + this->rmask = 0x7C00; + this->roff = 10; + + this->gmask = 0x03E0; + this->goff = 5; + + this->bmask = 0x001F; + this->boff = 0; + } + else + { + this->rmask = 0x00FF0000; + this->roff = 16; + + this->gmask = 0x0000FF00; + this->goff = 8; + + this->bmask = 0x000000FF; + this->boff = 0; + } + } +} + +void imFileFormatWMV::FixRGB(int bpp) +{ + int x; + + switch (bpp) + { + case 16: + { + /* inverts the WORD values if not intel */ + if (imBinCPUByteOrder() == IM_BIGENDIAN) + imBinSwapBytes2(this->line_buffer, this->width); + + imushort* word_data = (imushort*)this->line_buffer; + imbyte* byte_data = (imbyte*)this->line_buffer; + + // from end to start + for (x = this->width-1; x >= 0; x--) + { + imushort word_value = word_data[x]; + int c = x*3; + byte_data[c] = (imbyte)((((rmask & word_value) >> roff) * 255) / (rmask >> roff)); + byte_data[c+1] = (imbyte)((((gmask & word_value) >> goff) * 255) / (gmask >> goff)); + byte_data[c+2] = (imbyte)((((bmask & word_value) >> boff) * 255) / (bmask >> boff)); + } + } + break; + case 32: + { + unsigned int* dword_data = (unsigned int*)this->line_buffer; + imbyte* byte_data = (imbyte*)this->line_buffer; + + for (x = 0; x < this->width; x++) + { + unsigned int dword_value = dword_data[x]; + int c = x*3; + byte_data[c] = (imbyte)((rmask & dword_value) >> roff); + byte_data[c+1] = (imbyte)((gmask & dword_value) >> goff); + byte_data[c+2] = (imbyte)((bmask & dword_value) >> boff); + byte_data[c+3] = (imbyte)((0xFF000000 & dword_value) >> 24); + } + } + break; + default: // 24 + { + imbyte* byte_data = (imbyte*)this->line_buffer; + for (x = 0; x < this->width; x++) + { + int c = x*3; + imbyte temp = byte_data[c]; // swap R and B + byte_data[c] = byte_data[c+2]; + byte_data[c+2] = temp; + } + } + break; + } +} + +int imFileFormatWMV::ReadImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Reading WMV Frame..."); + + INSSBuffer* pSample = NULL; + + { + QWORD cnsSampleTime = 0; // All will be ignored + QWORD cnsDuration = 0; + DWORD dwFlags = 0; + WORD wStreamNum = 0; + DWORD dwOutputNum = 0; + HRESULT hr; + + hr = Reader->GetNextSample(stream_number, &pSample, &cnsSampleTime, + &cnsDuration, &dwFlags, + &dwOutputNum, &wStreamNum); + + if (FAILED(hr)) + return IM_ERR_ACCESS; + } + + imbyte* dib_bits = NULL; + pSample->GetBuffer(&dib_bits); + if (!dib_bits) + { + pSample->Release(); + return IM_ERR_MEM; + } + + imDib* dib = imDibCreateReference((imbyte*)this->bmiHeader, dib_bits); + + if (dib->bmih->biBitCount == 16 || dib->bmih->biBitCount == 32) + InitMasks(dib); + else if (dib->bmih->biBitCount <= 8) + { + this->palette_count = dib->palette_count; + ReadPalette((unsigned char*)dib->bmic); + } + + for (int row = 0; row < this->height; row++) + { + CopyMemory(this->line_buffer, dib_bits, dib->line_size); + dib_bits += dib->line_size; + + if (dib->bmih->biBitCount > 8) + FixRGB(dib->bmih->biBitCount); + + imFileLineBufferRead(this, data, row, 0); + + if (!imCounterInc(this->counter)) + { + imDibDestroy(dib); + dib = NULL; + pSample->Release(); + return IM_ERR_COUNTER; + } + } + + imDibDestroy(dib); + pSample->Release(); + this->current_frame++; + + return IM_ERR_NONE; +} + +int imFileFormatWMV::WriteImageData(void* data) +{ + imCounterTotal(this->counter, this->height, "Writing WMV Frame..."); + + INSSBuffer* pSample = NULL; + Writer->AllocateSample(BitmapDataSize, &pSample); + + imbyte* dib_bits = NULL; + if (pSample) pSample->GetBuffer(&dib_bits); + if (!dib_bits || !pSample) + { + if (pSample) pSample->Release(); + return IM_ERR_MEM; + } + + imDib* dib = imDibCreateReference((imbyte*)this->bmiHeader, dib_bits); + if (dib->bmih->biBitCount <= 8) + WritePalette((unsigned char*)dib->bmic); + + for (int row = 0; row < this->height; row++) + { + imFileLineBufferWrite(this, data, row, 0); + + if (dib->bmih->biBitCount > 8) + FixRGB(dib->bmih->biBitCount); + + CopyMemory(dib_bits, this->line_buffer, dib->line_size); + dib_bits += dib->line_size; + + if (!imCounterInc(this->counter)) + return IM_ERR_COUNTER; + } + + QWORD VideoTime = (QWORD)(this->image_count * (10000000.0f / fps)); + + HRESULT hr = Writer->WriteSample(input_number, + VideoTime, + 0, + pSample); + if (hr != 0) + return IM_ERR_ACCESS; + + imDibDestroy(dib); + pSample->Release(); + this->image_count++; + + return IM_ERR_NONE; +} + +int imFormatWMV::CanWrite(const char* compression, int color_mode, int data_type) const +{ + (void)compression; + + int color_space = imColorModeSpace(color_mode); + + if (color_space == IM_YCBCR || color_space == IM_LAB || + color_space == IM_LUV || color_space == IM_XYZ || + color_space == IM_CMYK) + return IM_ERR_DATA; + + if (data_type != IM_BYTE) + return IM_ERR_DATA; + + return IM_ERR_NONE; +} diff --git a/im/src/im_image.cpp b/im/src/im_image.cpp new file mode 100755 index 0000000..1fb993d --- /dev/null +++ b/im/src/im_image.cpp @@ -0,0 +1,695 @@ +/** \file + * \brief Image Manipulation + * + * See Copyright Notice in im_lib.h + * $Id: im_image.cpp,v 1.4 2009/08/13 22:34:25 scuri Exp $ + */ + +#include +#include +#include +#include + +#include "im.h" +#include "im_image.h" +#include "im_util.h" +#include "im_attrib.h" +#include "im_file.h" + + +int imImageCheckFormat(int color_mode, int data_type) +{ + if ((imColorModeSpace(color_mode) == IM_MAP || imColorModeSpace(color_mode) == IM_BINARY) && + (data_type != IM_BYTE)) + return 0; + + return 1; +} + +int imImagePixelOffset(int is_packed, int width, int height, int depth, int col, int row, int plane) +{ + if (is_packed) + return row*width*depth + col*depth + plane; + else + return plane*width*height + row*width + col; +} + +int imImageDataSize(int width, int height, int color_mode, int data_type) +{ + return width * height * imColorModeDepth(color_mode) * imDataTypeSize(data_type); +} + +int imImageLineCount(int width, int color_mode) +{ + if (imColorModeIsPacked(color_mode)) + return width*imColorModeDepth(color_mode); + else + return width; +} + +int imImageLineSize(int width, int color_mode, int data_type) +{ + return imImageLineCount(width, color_mode) * imDataTypeSize(data_type); +} + +static void iImageInit(imImage* image, int width, int height, int color_space, int data_type, int has_alpha) +{ + assert(width>0); + assert(height>0); + assert(color_space >= IM_RGB && color_space <= IM_XYZ); + assert(data_type >= IM_BYTE && data_type <= IM_CFLOAT); + + image->width = width; + image->height = height; + image->color_space = color_space; + image->data_type = data_type; + image->has_alpha = has_alpha; + + image->depth = imColorModeDepth(color_space); + image->line_size = image->width * imDataTypeSize(data_type); + image->plane_size = image->line_size * image->height; + image->size = image->plane_size * image->depth; + image->count = image->width * image->height; + + int depth = image->depth+1; // add room for an alpha plane pointer, even if does not have alpha now. + + if (image->data) + { + /* if reallocating, preserve the data buffer */ + void* data0 = image->data[0]; + + free(image->data); + image->data = (void**)malloc(depth * sizeof(void*)); + + image->data[0] = data0; + } + else + image->data = (void**)malloc(depth * sizeof(void*)); +} + +imImage* imImageInit(int width, int height, int color_space, int data_type, void* data_buffer, long* palette, int palette_count) +{ + if (!imImageCheckFormat(color_space, data_type)) + return NULL; + + imImage* image = (imImage*)malloc(sizeof(imImage)); + image->data = 0; + + iImageInit(image, width, height, color_space, data_type, 0); + + if (data_buffer) + { + for (int d = 0; d < image->depth; d++) + image->data[d] = (imbyte*)data_buffer + d*image->plane_size; + } + + if (imColorModeDepth(color_space) == 1) + { + image->palette = palette; + image->palette_count = palette_count; + } + else + { + image->palette = NULL; + image->palette_count = 0; + } + + image->attrib_table = new imAttribTable(599); + + return image; +} + +imImage* imImageCreate(int width, int height, int color_space, int data_type) +{ + imImage* image = imImageInit(width, height, color_space, data_type, NULL, NULL, 0); + if (!image) return NULL; + + /* palette is available to BINARY, MAP and GRAY */ + if (imColorModeDepth(color_space) == 1) + { + image->palette = (long*)malloc(256*sizeof(long)); + + if (image->color_space == IM_BINARY) + { + image->palette_count = 2; + image->palette[0] = imColorEncode(0, 0, 0); + image->palette[1] = imColorEncode(255, 255, 255); + } + else + { + image->palette_count = 256; + for (int i = 0; i < 256; i++) + image->palette[i] = imColorEncode((imbyte)i, (imbyte)i, (imbyte)i); + } + } + + /* allocate data buffer */ + image->data[0] = malloc(image->size); + if (!image->data[0]) + { + imImageDestroy(image); + return NULL; + } + + /* initialize data plane pointers */ + for (int d = 1; d < image->depth; d++) + image->data[d] = (imbyte*)(image->data[0]) + d*image->plane_size; + + imImageClear(image); + + return image; +} + +imImage* imImageCreateBased(const imImage* image, int width, int height, int color_space, int data_type) +{ + assert(image); + + if (width <= 0) width = image->width; + if (height <= 0) height = image->height; + if (color_space < 0) color_space = image->color_space; + if (data_type < 0) data_type = image->data_type; + + imImage* new_image = imImageCreate(width, height, color_space, data_type); + imImageCopyAttributes(image, new_image); + + if (image->has_alpha) + imImageAddAlpha(new_image); + + return new_image; +} + +void imImageAddAlpha(imImage* image) +{ + assert(image); + + if (image->has_alpha) + return; + + unsigned char* new_data = (unsigned char*)realloc(image->data[0], image->size+image->plane_size); + if (!new_data) + return; + + image->data[0] = new_data; + for (int d = 1; d < image->depth+1; d++) + image->data[d] = (imbyte*)(image->data[0]) + d*image->plane_size; + + memset(image->data[image->depth], 0, image->plane_size); + + image->has_alpha = IM_ALPHA; +} + +void imImageReshape(imImage* image, int width, int height) +{ + assert(image); + + int old_size = image->size, + old_width = width, + old_height = height; + + iImageInit(image, width, height, image->color_space, image->data_type, image->has_alpha); + + if (old_size < image->size) + { + void* data0 = realloc(image->data[0], image->has_alpha? image->size+image->plane_size: image->size); + if (!data0) // if failed restore the previous size + iImageInit(image, old_width, old_height, image->color_space, image->data_type, image->has_alpha); + else + image->data[0] = data0; + } + + /* initialize data plane pointers */ + int depth = image->has_alpha? image->depth+1: image->depth; + for (int d = 1; d < depth; d++) + image->data[d] = (imbyte*)image->data[0] + d*image->plane_size; +} + +void imImageDestroy(imImage* image) +{ + assert(image); + + imAttribTable* attrib_table = (imAttribTable*)image->attrib_table; + delete attrib_table; + + if (image->data[0]) + free(image->data[0]); + + if (image->palette) + free(image->palette); + + free(image->data); + + // This will help detect invalid image usage after destroy. + memset(image, 0, sizeof(imImage)); + + free(image); +} + +void imImageClear(imImage* image) +{ + assert(image); + + if ((image->color_space == IM_YCBCR || image->color_space == IM_LAB || image->color_space == IM_LUV) && + (image->data_type == IM_BYTE || image->data_type == IM_USHORT)) + { + memset(image->data[0], 0, image->plane_size); + + if (image->data_type == IM_BYTE) + { + imbyte* usdata = (imbyte*)image->data[1]; + for (int i = 0; i < 2*image->count; i++) + *usdata++ = 128; + } + else + { + imushort* usdata = (imushort*)image->data[1]; + for (int i = 0; i < 2*image->count; i++) + *usdata++ = 32768; + } + } + else + memset(image->data[0], 0, image->size); + + if (image->has_alpha) + memset(image->data[image->depth], 0, image->plane_size); +} + +int imImageIsBitmap(const imImage* image) +{ + assert(image); + return imColorModeIsBitmap(image->color_space, image->data_type); +} + +void imImageCopy(const imImage* src_image, imImage* dst_image) +{ + assert(src_image); + assert(dst_image); + + imImageCopyData(src_image, dst_image); + + if (dst_image != src_image) + imImageCopyAttributes(src_image, dst_image); +} + +void imImageCopyData(const imImage* src_image, imImage* dst_image) +{ + assert(src_image); + assert(dst_image); + assert(imImageMatch(src_image, dst_image)); + + if (dst_image != src_image) + { + memcpy(dst_image->data[0], src_image->data[0], (src_image->has_alpha && dst_image->has_alpha)? src_image->size+src_image->plane_size: src_image->size); + } +} + +imImage* imImageDuplicate(const imImage* image) +{ + assert(image); + + imImage* new_image = imImageCreate(image->width, image->height, image->color_space, image->data_type); + if (!new_image) + return NULL; + + if (image->has_alpha) + imImageAddAlpha(new_image); + + imImageCopy(image, new_image); + + return new_image; +} + +imImage* imImageClone(const imImage* image) +{ + assert(image); + + imImage* new_image = imImageCreate(image->width, image->height, image->color_space, image->data_type); + if (!new_image) + return NULL; + + if (image->has_alpha) + imImageAddAlpha(new_image); + + imImageCopyAttributes(image, new_image); + + return new_image; +} + +void imImageSetAttribute(const imImage* image, const char* attrib, int data_type, int count, const void* data) +{ + assert(image); + assert(attrib); + imAttribTable* attrib_table = (imAttribTable*)image->attrib_table; + if (data) + { + if (count == -1 && data_type == IM_BYTE) // Data is zero terminated like a string + count = strlen((char*)data)+1; + + attrib_table->Set(attrib, data_type, count, data); + } + else if (count == 0) + attrib_table->UnSet(attrib); + else + attrib_table->Set(attrib, data_type, count, NULL); +} + +const void* imImageGetAttribute(const imImage* image, const char* attrib, int *data_type, int *count) +{ + assert(image); + assert(attrib); + imAttribTable* attrib_table = (imAttribTable*)image->attrib_table; + return attrib_table->Get(attrib, data_type, count); +} + +static void iAttributeTableCopy(const void* src_attrib_table, void* dst_attrib_table) +{ + const imAttribTable* src_table = (const imAttribTable*)src_attrib_table; + imAttribTable* dst_table = (imAttribTable*)dst_attrib_table; + dst_table->CopyFrom(*src_table); +} + +void imImageCopyAttributes(const imImage* src_image, imImage* dst_image) +{ + assert(src_image); + assert(dst_image); + + if (src_image->palette && dst_image->palette && + src_image->color_space == dst_image->color_space) + { + memcpy(dst_image->palette, src_image->palette, 256*sizeof(long)); + dst_image->palette_count = src_image->palette_count; + } + + iAttributeTableCopy(src_image->attrib_table, dst_image->attrib_table); +} + +static int iAttribCB(void* user_data, int index, const char* name, int data_type, int count, const void* data) +{ + (void)data_type; + (void)data; + (void)count; + char** attrib = (char**)user_data; + attrib[index] = (char*)name; + return 1; +} + +void imImageGetAttributeList(const imImage* image, char** attrib, int *attrib_count) +{ + assert(image); + assert(attrib_count); + + imAttribTable* attrib_table = (imAttribTable*)image->attrib_table; + *attrib_count = attrib_table->Count(); + + if (attrib) attrib_table->ForEach((void*)attrib, iAttribCB); +} + +void imImageSetPalette(imImage* image, long* palette, int palette_count) +{ + assert(image); + + if (image->palette) + { + free(image->palette); + image->palette = palette; + image->palette_count = palette_count; + } +} + +int imImageMatchSize(const imImage* image1, const imImage* image2) +{ + assert(image1); + assert(image2); + + return ((image1->width == image2->width) && + (image1->height == image2->height)); +} + +int imImageMatchColor(const imImage* image1, const imImage* image2) +{ + assert(image1); + assert(image2); + + return (image1->data_type == image2->data_type && + image1->color_space == image2->color_space); +} + +int imImageMatchDataType(const imImage* image1, const imImage* image2) +{ + assert(image1); + assert(image2); + + return (image1->data_type == image2->data_type && + image1->width == image2->width && + image1->height == image2->height); +} + +int imImageMatchColorSpace(const imImage* image1, const imImage* image2) +{ + assert(image1); + assert(image2); + + return (image1->width == image2->width && + image1->height == image2->height && + image1->color_space == image2->color_space); +} + +int imImageMatch(const imImage* image1, const imImage* image2) +{ + assert(image1); + assert(image2); + + return (image1->data_type == image2->data_type && + image1->width == image2->width && + image1->height == image2->height && + image1->color_space == image2->color_space); +} + +void imImageSetBinary(imImage* image) +{ + assert(image); + + if (image->palette) + { + image->color_space = IM_BINARY; + image->palette_count = 2; + image->palette[0] = imColorEncode(0, 0, 0); + image->palette[1] = imColorEncode(255, 255, 255); + } +} + +void imImageMakeBinary(imImage *image) +{ + assert(image); + + imbyte *map = (imbyte*)image->data[0]; + for(int i = 0; i < image->count; i++) + { + if (*map) + *map = 1; + map++; + } +} + +void imImageMakeGray(imImage *image) +{ + assert(image); + + imbyte *map = (imbyte*)image->data[0]; + for(int i = 0; i < image->count; i++) + { + if (*map) + *map = 255; + map++; + } +} + +static void iLoadImageData(imFile* ifile, imImage* image, int *error, int bitmap) +{ + iAttributeTableCopy(ifile->attrib_table, image->attrib_table); + *error = imFileReadImageData(ifile, image->data[0], bitmap, image->has_alpha); + if (image->color_space == IM_MAP) + imFileGetPalette(ifile, image->palette, &image->palette_count); +} + +imImage* imFileLoadImage(imFile* ifile, int index, int *error) +{ + assert(ifile); + + int width, height, color_mode, data_type; + *error = imFileReadImageInfo(ifile, index, &width, &height, &color_mode, &data_type); + if (*error) return NULL; + + imImage* image = imImageCreate(width, height, imColorModeSpace(color_mode), data_type); + if (!image) + { + *error = IM_ERR_MEM; + return NULL; + } + + if (imColorModeHasAlpha(color_mode)) + imImageAddAlpha(image); + + iLoadImageData(ifile, image, error, 0); + + return image; +} + +void imFileLoadImageFrame(imFile* ifile, int index, imImage* image, int *error) +{ + assert(ifile); + + int width, height, color_mode, data_type; + *error = imFileReadImageInfo(ifile, index, &width, &height, &color_mode, &data_type); + if (*error) return; + + // check if we can reuse the data + if (image->width != width || + image->height != height || + image->depth != imColorModeDepth(imColorModeSpace(color_mode)) || + image->has_alpha != imColorModeHasAlpha(color_mode) || + image->data_type != data_type) + { + *error = IM_ERR_DATA; + return; + } + + image->color_space = imColorModeSpace(color_mode); + iLoadImageData(ifile, image, error, 0); +} + +imImage* imFileLoadBitmap(imFile* ifile, int index, int *error) +{ + assert(ifile); + + int width, height, color_mode, data_type; + *error = imFileReadImageInfo(ifile, index, &width, &height, &color_mode, &data_type); + if (*error) return NULL; + + imImage* image = imImageCreate(width, height, imColorModeToBitmap(color_mode), IM_BYTE); + if (!image) + { + *error = IM_ERR_MEM; + return NULL; + } + + if (imColorModeHasAlpha(color_mode)) + imImageAddAlpha(image); + + iLoadImageData(ifile, image, error, 1); + + return image; +} + +void imFileLoadBitmapFrame(imFile* ifile, int index, imImage* image, int *error) +{ + assert(ifile); + + int width, height, color_mode, data_type; + *error = imFileReadImageInfo(ifile, index, &width, &height, &color_mode, &data_type); + if (*error) return; + + // check if we can reuse the data + if (image->width != width || + image->height != height || + image->depth != imColorModeDepth(imColorModeToBitmap(color_mode)) || + image->has_alpha != imColorModeHasAlpha(color_mode) || + image->data_type != IM_BYTE) + { + *error = IM_ERR_DATA; + return; + } + + image->color_space = imColorModeToBitmap(color_mode); + iLoadImageData(ifile, image, error, 1); +} + +imImage* imFileLoadImageRegion(imFile* ifile, int index, int bitmap, int *error, + int xmin, int xmax, int ymin, int ymax, int width, int height) +{ + assert(ifile); + + int color_mode, data_type; + *error = imFileReadImageInfo(ifile, index, NULL, NULL, &color_mode, &data_type); + if (*error) return NULL; + + imImage* image = imImageCreate(width, height, + bitmap? imColorModeToBitmap(color_mode): imColorModeSpace(color_mode), + bitmap? IM_BYTE: data_type); + if (!image) + { + *error = IM_ERR_MEM; + return NULL; + } + + if (imColorModeHasAlpha(color_mode)) + imImageAddAlpha(image); + + imFileSetAttribute(ifile, "ViewXmin", IM_INT, 1, &xmin); + imFileSetAttribute(ifile, "ViewXmax", IM_INT, 1, &xmax); + imFileSetAttribute(ifile, "ViewYmin", IM_INT, 1, &ymin); + imFileSetAttribute(ifile, "ViewYmax", IM_INT, 1, &ymax); + imFileSetAttribute(ifile, "ViewWidth", IM_INT, 1, &width); + imFileSetAttribute(ifile, "ViewHeight", IM_INT, 1, &height); + + iLoadImageData(ifile, image, error, bitmap); + + return image; +} + +int imFileSaveImage(imFile* ifile, const imImage* image) +{ + assert(ifile); + assert(image); + + if (image->color_space == IM_MAP) + imFileSetPalette(ifile, image->palette, image->palette_count); + + iAttributeTableCopy(image->attrib_table, ifile->attrib_table); + + int color_mode = image->color_space; + if (image->has_alpha) + color_mode |= IM_ALPHA; + + int error = imFileWriteImageInfo(ifile, image->width, image->height, color_mode, image->data_type); + if (error) return error; + + return imFileWriteImageData(ifile, image->data[0]); +} + +imImage* imFileImageLoad(const char* file_name, int index, int *error) +{ + imFile* ifile = imFileOpen(file_name, error); + if (!ifile) return NULL; + imImage* image = imFileLoadImage(ifile, index, error); + imFileClose(ifile); + return image; +} + +imImage* imFileImageLoadBitmap(const char* file_name, int index, int *error) +{ + imFile* ifile = imFileOpen(file_name, error); + if (!ifile) return NULL; + imImage* image = imFileLoadBitmap(ifile, index, error); + imFileClose(ifile); + return image; +} + +imImage* imFileImageLoadRegion(const char* file_name, int index, int bitmap, int *error, + int xmin, int xmax, int ymin, int ymax, int width, int height) +{ + imFile* ifile = imFileOpen(file_name, error); + if (!ifile) return NULL; + imImage* image = imFileLoadImageRegion(ifile, index, bitmap, error, xmin, xmax, ymin, ymax, width, height); + imFileClose(ifile); + return image; +} + +int imFileImageSave(const char* file_name, const char* format, const imImage* image) +{ + int error; + imFile* ifile = imFileNew(file_name, format, &error); + if (!ifile) return error; + error = imFileSaveImage(ifile, image); + imFileClose(ifile); + return error; +} diff --git a/im/src/im_lib.cpp b/im/src/im_lib.cpp new file mode 100755 index 0000000..05a71d8 --- /dev/null +++ b/im/src/im_lib.cpp @@ -0,0 +1,38 @@ +/** \file + * \brief Library Management + * + * See Copyright Notice in im_lib.h + * $Id: im_lib.cpp,v 1.5 2009/10/01 14:43:42 scuri Exp $ + */ + +#include +#include + +#include "im_lib.h" + +/* This appears only here to avoid changing the im_lib.h header for bug fixes */ +#define IM_VERSION_FIX "" +#define IM_VERSION_FIX_NUMBER 0 + +static char *iVersion = "TECVERID.str:IM:LIB:" IM_VERSION IM_VERSION_FIX; + +const char iIdent[] = + "$IM: " IM_VERSION IM_VERSION_FIX " " IM_COPYRIGHT " $\n" + "$URL: www.tecgraf.puc-rio.br/im $\n"; + +const char* imVersion(void) +{ + (void)iVersion; + (void)iIdent; + return IM_VERSION IM_VERSION_FIX; +} + +const char* imVersionDate(void) +{ + return IM_VERSION_DATE; +} + +int imVersionNumber(void) +{ + return IM_VERSION_NUMBER+IM_VERSION_FIX_NUMBER; +} diff --git a/im/src/im_lua3.c b/im/src/im_lua3.c new file mode 100755 index 0000000..1c85e59 --- /dev/null +++ b/im/src/im_lua3.c @@ -0,0 +1,1297 @@ +/** \file + * \brief LuaBinding for Lua 3 + * + * See Copyright Notice in im_lib.h + * $Id: im_lua3.c,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + +#include +#include +#include + +#include + +#include "im.h" +#include "im_lib.h" + +#include +#include + +#include "imlua.h" + + +/***************************************************************************\ +* Globals. * +\***************************************************************************/ +static int color_tag; +static int imagergb_tag; +static int imagergba_tag; +static int palette_tag; +static int imagemap_tag; +static int channel_tag; + +static channel_t channel_info; + +#define IMLUA_VERSION "IMLua 1.2" +/***************************************************************************\ +* Creation and destruction functions. * +\***************************************************************************/ + +/***************************************************************************\ +* Creates a buffer for a RGB image. * +\***************************************************************************/ +static void imlua_createimagergb(void) +{ + lua_Object width, height; + long int width_i, height_i; + imagergb_t *imagergb_p; + + width = lua_getparam(1); + height = lua_getparam(2); + if (!(lua_isnumber(width) && lua_isnumber(height))) + lua_error("imCreateImageRGB: invalid dimensions parameter!"); + width_i = (long int) lua_getnumber(width); + height_i = (long int) lua_getnumber(height); + if (width_i < 1 || height_i < 1) + lua_error("imCreateImageRGB: image dimensions should be positive integers!"); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("imCreateImageRGB: too many parameters!"); + + imagergb_p = (imagergb_t *) malloc(sizeof(imagergb_t)); + if (!imagergb_p) { + lua_pushnil(); + return; + } + + imagergb_p->width = width_i; + imagergb_p->height = height_i; + imagergb_p->size = width_i*height_i; + imagergb_p->red = (unsigned char *) malloc(imagergb_p->size); + imagergb_p->green = (unsigned char *) malloc(imagergb_p->size); + imagergb_p->blue = (unsigned char *) malloc(imagergb_p->size); + + if (!(imagergb_p->red && imagergb_p->green && imagergb_p->blue)) { + if (imagergb_p->red) free(imagergb_p->red); + if (imagergb_p->green) free(imagergb_p->green); + if (imagergb_p->blue) free(imagergb_p->blue); + free(imagergb_p); + lua_pushnil(); + return; + } + + memset(imagergb_p->red, 255, imagergb_p->size); + memset(imagergb_p->green, 255, imagergb_p->size); + memset(imagergb_p->blue, 255, imagergb_p->size); + + lua_pushusertag((void *) imagergb_p, imagergb_tag); +} + +/***************************************************************************\ +* Frees a previously allocated imagergb. We don't free imagergb_p to avoid * +* problems if the user called killimagergb twice with the same object. The * +* structure will be freed by a userdata "gc" fallback in LUA 3.0. * +\***************************************************************************/ +static void imlua_killimagergb(void) +{ + lua_Object imagergb; + imagergb_t *imagergb_p; + + imagergb = lua_getparam(1); + if (imagergb == LUA_NOOBJECT) + lua_error("imKillImageRGB: imagergb parameter missing!"); + if (lua_isnil(imagergb)) + lua_error("imKillImageRGB: attempt to kill a NIL imagergb!"); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("imKillImageRGB: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!(imagergb_p->red && imagergb_p->green && imagergb_p->blue)) + lua_error("imKillImageRGB: attempt to kill a killed imagergb!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("imKillImageRGB: too many parameters!"); + + free(imagergb_p->red); + free(imagergb_p->green); + free(imagergb_p->blue); + imagergb_p->red = NULL; + imagergb_p->green = NULL; + imagergb_p->blue = NULL; +} + +/***************************************************************************\ +* Creates a palette as a palette_tag usertag lua_Object. A palette can be * +* considered and treated as a color table. * +\***************************************************************************/ +static void imlua_createpalette(void) +{ + lua_Object size; + long int size_i; + palette_t *palette_p; + + size = lua_getparam(1); + if (!(lua_isnumber(size))) + lua_error("imCreatePalette: invalid palette parameter!"); + size_i = (long int) lua_getnumber(size); + if (size_i < 1) + lua_error("imCreatePalette: palette size should be a positive integer!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("imCreatePalette: too many parameters!"); + + palette_p = (palette_t *) malloc(sizeof(palette_t)); + if (!palette_p) { + lua_pushnil(); + return; + } + + palette_p->size = size_i; + palette_p->color = (long int *) malloc(palette_p->size * sizeof(long int)); + if (!palette_p->color) { + free(palette_p); + lua_pushnil(); + return; + } + + memset(palette_p->color, 255, palette_p->size * sizeof(long int)); + lua_pushusertag((void *) palette_p, palette_tag); +} + +/***************************************************************************\ +* Frees a previously allocated palette. We don't free palette_p to prevent * +* a problem if the user called killpalette twice with the same object. The * +* structure will be freed by a userdata "gc" fallback in LUA 3.0. * +\***************************************************************************/ +static void imlua_killpalette(void) +{ + lua_Object palette; + palette_t *palette_p; + + palette = lua_getparam(1); + if (palette == LUA_NOOBJECT) + lua_error("imKillPalette: palette parameter missing!"); + if (lua_isnil(palette)) + lua_error("imKillPalette: attempt to kill a NIL palette!"); + if (lua_tag(palette) != palette_tag) + lua_error("imKillPalette: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p->color) + lua_error("imKillPalette: attempt to kill a killed palette!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("imKillPalette: too many parameters!"); + + free(palette_p->color); + palette_p->color = NULL; +} + +/***************************************************************************\ +* Creates a imagemap as a imagemap_tag usertag lua_Object. * +\***************************************************************************/ +static void imlua_createimagemap(void) +{ + lua_Object width; + lua_Object height; + + long int width_i; + long int height_i; + imagemap_t *imagemap_p; + + width = lua_getparam(1); + height = lua_getparam(2); + if (!(lua_isnumber(width) && lua_isnumber(height))) + lua_error("imCreateImageMap: invalid dimensions parameter!"); + width_i = (long int) lua_getnumber(width); + height_i = (long int) lua_getnumber(height); + if (width_i < 1 || height_i < 1) + lua_error("imCreateImageMap: imagemap dimensions should be positive integers!"); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("imCreateImageMap: too many parameters!"); + + imagemap_p = (imagemap_t *) malloc(sizeof(imagemap_t)); + if (!imagemap_p) { + lua_pushnil(); + return; + } + + imagemap_p->size = width_i*height_i; + imagemap_p->width = width_i; + imagemap_p->height = height_i; + imagemap_p->index = (unsigned char *) malloc(imagemap_p->size); + if (!imagemap_p->index) { + free(imagemap_p); + lua_pushnil(); + return; + } + + memset(imagemap_p->index, 0, imagemap_p->size); + lua_pushusertag((void *) imagemap_p, imagemap_tag); +} + +/***************************************************************************\ +* Frees a previously allocated imagemap. We don't free imagemap_p to avoid * +* problems if the user called killimagemap twice with the same object. The * +* structure will be freed by a userdata "gc" fallback in LUA 3.0. * +\***************************************************************************/ +static void imlua_killimagemap(void) +{ + lua_Object imagemap; + imagemap_t *imagemap_p; + + imagemap = lua_getparam(1); + if (imagemap == LUA_NOOBJECT) + lua_error("imKillImageMap: imagemap parameter missing!"); + if (lua_isnil(imagemap)) + lua_error("imKillImageMap: attempt to kill a NIL imagemap!"); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("imKillImageMap: invalid imagemap parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p->index) + lua_error("imKillImageMap: attempt to kill a killed imagemap!"); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("imKillImageMap: too many parameters!"); + + free(imagemap_p->index); + imagemap_p->index = NULL; +} + +/***************************************************************************\ +* IM API Functions. * +\***************************************************************************/ + +/***************************************************************************\ +* imFileFormat * +\***************************************************************************/ +static void imlua_fileformat(void) +{ + lua_Object file; + + char *file_s; + int format_i; + int compress_i; + + int err; + + file = lua_getparam(1); + if (!lua_isstring(file)) + lua_error("imFileFormat: invalid filename parameter!"); + file_s = (char *) lua_getstring(file); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("imFileFormat: too many parameters!"); + + err = imFileFormat(file_s, &format_i); + + compress_i = (format_i & IM_DEFAULT) ? 1 : 0; + format_i = format_i & 0xFF; + + /* if success, return the format */ + if (err == IM_ERR_NONE) { + lua_pushnumber( format_i); + lua_pushnumber( compress_i); + } + /* if failure, return nil */ + else { + lua_pushnil(); + lua_pushnil(); + } + + lua_pushnumber( err); +} + +/***************************************************************************\ +* imFileFormat * +\***************************************************************************/ +static void imlua_imageinfo(void) +{ + lua_Object file; + + char *file_s; + + int width, height, image_type, pal_size; + int err; + + file = lua_getparam(1); + if (!lua_isstring(file)) + lua_error("imFileFormat: invalid filename parameter!"); + file_s = (char *) lua_getstring(file); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("imFileFormat: too many parameters!"); + + err = imImageInfo(file_s, &width, &height, &image_type, &pal_size); + + /* if success, return the format */ + if (err == IM_ERR_NONE) { + lua_pushnumber( width); + lua_pushnumber( height); + lua_pushnumber( image_type); + lua_pushnumber( pal_size); + } + /* if failure, return nil */ + else { + lua_pushnil(); + lua_pushnil(); + lua_pushnil(); + lua_pushnil(); + } + + lua_pushnumber( err); +} + +/***************************************************************************\ +* imEncodeColor * +\***************************************************************************/ +static void imlua_encodecolor(void) +{ + lua_Object red, green, blue; + float red_f, green_f, blue_f; + unsigned char red_i, green_i, blue_i; + long int color_i; + + red = lua_getparam(1); + green = lua_getparam(2); + blue = lua_getparam(3); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("imEncodeColor: too many parameters!"); + + if (!(lua_isnumber(red) && lua_isnumber(green) && lua_isnumber(blue))) + lua_error("imEncodeColor: invalid color component parameter!"); + + red_f = (float)lua_getnumber(red); + green_f = (float)lua_getnumber(green); + blue_f = (float)lua_getnumber(blue); + + if (red_f < 0 || red_f > 255 || green_f < 0 || + green_f > 255 || blue_f < 0 || blue_f > 255) + lua_error("imEncodeColor: color components values should be in range [0, 255]!"); + + red_i = (unsigned char) (red_f); + green_i = (unsigned char) (green_f); + blue_i = (unsigned char) (blue_f); + + color_i = imEncodeColor(red_i, green_i, blue_i); + lua_pushusertag((void *) color_i, color_tag); +} + +/***************************************************************************\ +* imDecodeColor * +\***************************************************************************/ +static void imlua_decodecolor(void) +{ + lua_Object color; + long int color_i; + unsigned char red_i, green_i, blue_i; + + color = lua_getparam(1); + if (lua_tag(color) != color_tag) + lua_error("imDecodeColor: invalid color parameter!"); + color_i = (long int) lua_getuserdata(color); + + if (lua_getparam(2) != LUA_NOOBJECT) + lua_error("imDecodeColor: too many parameters!"); + + imDecodeColor(&red_i, &green_i, &blue_i, color_i); + + lua_pushnumber( red_i); + lua_pushnumber( green_i); + lua_pushnumber( blue_i); +} + +/***************************************************************************\ +* imLoadRGB * +\***************************************************************************/ +static void imlua_loadrgb(void) +{ + lua_Object file, imagergb; + + imagergb_t *imagergb_p; + char *file_s; + + int err; + + file = lua_getparam(1); + if (!lua_isstring(file)) + lua_error("imLoadRGB: invalid filename parameter!"); + file_s = (char *) lua_getstring(file); + + imagergb = lua_getparam(2); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("imLoadRGB: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("imLoadRGB: too many parameters!"); + + err = imLoadRGB(file_s, imagergb_p->red, imagergb_p->green, imagergb_p->blue); + lua_pushnumber( err); +} + +/***************************************************************************\ +* imLoadMap * +\***************************************************************************/ +static void imlua_loadmap(void) +{ + lua_Object file, imagemap, palette; + + imagemap_t *imagemap_p; + palette_t *palette_p; + char *file_s; + + int err; + + file = lua_getparam(1); + if (!lua_isstring(file)) + lua_error("imLoadMap: invalid filename parameter!"); + file_s = (char *) lua_getstring(file); + + imagemap = lua_getparam(2); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("imLoadMap: invalid imagemap parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + + palette = lua_getparam(3); + if (lua_tag(palette) != palette_tag) + lua_error("imLoadMap: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("imLoadMap: too many parameters!"); + + err = imLoadMap(file_s, imagemap_p->index, palette_p->color); + lua_pushnumber( err); +} + +/***************************************************************************\ +* imSaveRGB * +\***************************************************************************/ +static void imlua_savergb(void) +{ + lua_Object file, imagergb, format, compress; + + imagergb_t *imagergb_p; + char *file_s; + int format_i; + int compress_i; + + int err; + + imagergb = lua_getparam(1); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("imSaveRGB: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + + format = lua_getparam(2); + if (!lua_isnumber(format)) + lua_error("imSaveRGB: invalid format parameter!"); + format_i = (int) lua_getnumber(format); + + compress = lua_getparam(3); + if (!lua_isnumber(compress)) + lua_error("imSaveRGB: invalid compression parameter!"); + compress_i = (int) lua_getnumber(compress); + + file = lua_getparam(4); + if (!lua_isstring(file)) + lua_error("imSaveRGB: invalid filename parameter!"); + file_s = (char *) lua_getstring(file); + + if (lua_getparam(5) != LUA_NOOBJECT) + lua_error("imSaveRGB: too many parameters!"); + + err = imSaveRGB(imagergb_p->width, imagergb_p->height, format_i | (compress_i << 8), + imagergb_p->red, imagergb_p->green, imagergb_p->blue, file_s); + lua_pushnumber( err); +} + +/***************************************************************************\ +* imSaveMap * +\***************************************************************************/ +static void imlua_savemap(void) +{ + lua_Object file, imagemap, palette, format, compress; + + imagemap_t *imagemap_p; + palette_t *palette_p; + char *file_s; + int format_i; + int compress_i; + + int err; + + imagemap = lua_getparam(1); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("imSaveMap: invalid imagemap parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + + palette = lua_getparam(2); + if (lua_tag(palette) != palette_tag) + lua_error("imLoadMap: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + + format = lua_getparam(3); + if (!lua_isnumber(format)) + lua_error("imSaveMap: invalid format parameter!"); + format_i = (int) lua_getnumber(format); + + compress = lua_getparam(4); + if (!lua_isnumber(compress)) + lua_error("imSaveMap: invalid compression parameter!"); + compress_i = (int) lua_getnumber(compress); + + file = lua_getparam(5); + if (!lua_isstring(file)) + lua_error("imSaveMap: invalid filename parameter!"); + file_s = (char *) lua_getstring(file); + + if (lua_getparam(6) != LUA_NOOBJECT) + lua_error("imSaveMap: too many parameters!"); + + err = imSaveMap(imagemap_p->width, imagemap_p->height, format_i | (compress_i << 8), + imagemap_p->index, palette_p->size, palette_p->color, file_s); + lua_pushnumber( err); +} + +/***************************************************************************\ +* imRGB2Map * +\***************************************************************************/ +static void imlua_rgb2map(void) +{ + lua_Object imagergb, imagemap, palette; + + imagemap_t *imagemap_p; + palette_t *palette_p; + imagergb_t *imagergb_p; + + imagergb = lua_getparam(1); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("imRGB2Map: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + + imagemap = lua_getparam(2); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("imRGB2Map: invalid imagemap parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + + palette = lua_getparam(3); + if (lua_tag(palette) != palette_tag) + lua_error("imRGB2Map: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("imRGB2Map: too many parameters!"); + + if (imagergb_p->size != imagemap_p->size) + lua_error("imRGB2Map: images have incompatible dimensions!"); + + imRGB2Map(imagergb_p->width, imagergb_p->height, imagergb_p->red, + imagergb_p->green, imagergb_p->blue, imagemap_p->index, palette_p->size, + palette_p->color); +} + +/***************************************************************************\ +* imMap2RGB * +\***************************************************************************/ +static void imlua_map2rgb(void) +{ + lua_Object imagergb, imagemap, palette; + + imagemap_t *imagemap_p; + palette_t *palette_p; + imagergb_t *imagergb_p; + + imagemap = lua_getparam(1); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("imMap2RGB: invalid imagemap parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + + palette = lua_getparam(2); + if (lua_tag(palette) != palette_tag) + lua_error("imMap2RGB: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + + imagergb = lua_getparam(3); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("imMap2RGB: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("imMap2RGB: too many parameters!"); + + if (imagergb_p->size != imagemap_p->size) + lua_error("imMap2RGB: images have incompatible dimensions!"); + + imMap2RGB(imagemap_p->width, imagemap_p->height, imagemap_p->index, palette_p->size, + palette_p->color, imagergb_p->red, imagergb_p->green, imagergb_p->blue); +} + +/***************************************************************************\ +* imMap2Gray * +\***************************************************************************/ +static void imlua_map2gray(void) +{ + lua_Object imagemap, palette, graymap, grays; + + imagemap_t *imagemap_p; + palette_t *palette_p; + imagemap_t *graymap_p; + palette_t *grays_p; + + imagemap = lua_getparam(1); + if (lua_tag(imagemap) != imagemap_tag) + lua_error("imMap2Gray: invalid imagemap parameter!"); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + + palette = lua_getparam(2); + if (lua_tag(palette) != palette_tag) + lua_error("imMap2Gray: invalid palette parameter!"); + palette_p = (palette_t *) lua_getuserdata(palette); + + graymap = lua_getparam(3); + if (lua_tag(graymap) != imagemap_tag) + lua_error("imMap2Gray: invalid graymap parameter!"); + graymap_p = (imagemap_t *) lua_getuserdata(graymap); + + grays = lua_getparam(4); + if (lua_tag(grays) != palette_tag) + lua_error("imMap2Gray: invalid grays parameter!"); + grays_p = (palette_t *) lua_getuserdata(grays); + + if (lua_getparam(5) != LUA_NOOBJECT) + lua_error("imMap2Gray: too many parameters!"); + + if (imagemap_p->size != graymap_p->size) + lua_error("imMap2Gray: images have incompatible dimensions!"); + + if (grays_p->size < 256) + lua_error("imMap2Gray: grays palette should be of size 256!"); + + imMap2Gray(imagemap_p->width, imagemap_p->height, imagemap_p->index, + palette_p->size, palette_p->color, graymap_p->index, grays_p->color); +} + +/***************************************************************************\ +* imRGB2Gray * +\***************************************************************************/ +static void imlua_rgb2gray(void) +{ + lua_Object imagergb, graymap, grays; + + imagergb_t *imagergb_p; + imagemap_t *graymap_p; + palette_t *grays_p; + + imagergb = lua_getparam(1); + if (lua_tag(imagergb) != imagergb_tag) + lua_error("imRGB2Gray: invalid imagergb parameter!"); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + + graymap = lua_getparam(2); + if (lua_tag(graymap) != imagemap_tag) + lua_error("imRGB2Gray: invalid graymap parameter!"); + graymap_p = (imagemap_t *) lua_getuserdata(graymap); + + grays = lua_getparam(3); + if (lua_tag(grays) != palette_tag) + lua_error("imRGB2Gray: invalid grays parameter!"); + grays_p = (palette_t *) lua_getuserdata(grays); + + if (lua_getparam(4) != LUA_NOOBJECT) + lua_error("imRGB2Gray: too many parameters!"); + + if (imagergb_p->size != graymap_p->size) + lua_error("imRGB2Gray: images have incompatible dimensions!"); + + if (grays_p->size < 256) + lua_error("imRGB2Gray: grays palette should be of size 256!"); + + imRGB2Gray(imagergb_p->width, imagergb_p->height, imagergb_p->red, + imagergb_p->green, imagergb_p->blue, graymap_p->index, grays_p->color); +} + +/***************************************************************************\ +* imStretch. * +\***************************************************************************/ +static void imlua_stretch(void) +{ + lua_Object src, dst; + + imagemap_t *srcmap_p; + imagemap_t *dstmap_p; + imagergb_t *srcrgb_p; + imagergb_t *dstrgb_p; + + src = lua_getparam(1); + dst = lua_getparam(2); + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("imStretch: too many parameters!"); + + if ((lua_tag(src) == imagergb_tag) && (lua_tag(dst) == imagergb_tag)) { + srcrgb_p = (imagergb_t *) lua_getuserdata(src); + dstrgb_p = (imagergb_t *) lua_getuserdata(dst); + imStretch(srcrgb_p->width, srcrgb_p->height, srcrgb_p->red, + dstrgb_p->width, dstrgb_p->height, dstrgb_p->red); + imStretch(srcrgb_p->width, srcrgb_p->height, srcrgb_p->green, + dstrgb_p->width, dstrgb_p->height, dstrgb_p->green); + imStretch(srcrgb_p->width, srcrgb_p->height, srcrgb_p->blue, + dstrgb_p->width, dstrgb_p->height, dstrgb_p->blue); + } + else if ((lua_tag(src) == imagemap_tag) && (lua_tag(dst) == imagemap_tag)) { + srcmap_p = (imagemap_t *) lua_getuserdata(src); + dstmap_p = (imagemap_t *) lua_getuserdata(dst); + imStretch(srcmap_p->width, srcmap_p->height, srcmap_p->index, + dstmap_p->width, dstmap_p->height, dstmap_p->index); + } + else { + lua_error("imStretch: inconsistent parameters!"); + } +} + +/***************************************************************************\ +* imResize. * +\***************************************************************************/ +static void imlua_resize(void) +{ + lua_Object src, dst; + + imagergb_t *srcrgb_p; + imagergb_t *dstrgb_p; + + src = lua_getparam(1); + dst = lua_getparam(2); + if (lua_getparam(3) != LUA_NOOBJECT) + lua_error("imResize: too many parameters!"); + + if ((lua_tag(src) == imagergb_tag) && (lua_tag(dst) == imagergb_tag)) { + srcrgb_p = (imagergb_t *) lua_getuserdata(src); + dstrgb_p = (imagergb_t *) lua_getuserdata(dst); + imStretch(srcrgb_p->width, srcrgb_p->height, srcrgb_p->red, + dstrgb_p->width, dstrgb_p->height, dstrgb_p->red); + imStretch(srcrgb_p->width, srcrgb_p->height, srcrgb_p->green, + dstrgb_p->width, dstrgb_p->height, dstrgb_p->green); + imStretch(srcrgb_p->width, srcrgb_p->height, srcrgb_p->blue, + dstrgb_p->width, dstrgb_p->height, dstrgb_p->blue); + } + else { + lua_error("imResize: parameters must be of type imagergb_tag!"); + } +} + +/***************************************************************************\ +* imVersion. * +\***************************************************************************/ +static void imlua_version(void) +{ + if (lua_getparam(1) != LUA_NOOBJECT) + lua_error("imVersion: too many parameters!"); + + lua_pushstring(imVersion()); +} + +/***************************************************************************\ +* Fallback implementation. * +\***************************************************************************/ + +/***************************************************************************\ +* imagemap "settable" fallback. * +\***************************************************************************/ +static void imagemapsettable_fb(void) +{ + lua_Object imagemap, index, value; + + imagemap_t *imagemap_p; + long int index_i; + long int value_i; + + imagemap = lua_getparam(1); + index = lua_getparam(2); + value = lua_getparam(3); + + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p) { + lua_error("imagemap_tag \"settable\": invalid imagemap_tag object!"); + } + + if (!lua_isnumber(index)) { + lua_error("imagemap_tag \"settable\": index should be a number!"); + } + + if (!lua_isnumber(value)) { + lua_error("imagemap_tag \"settable\": value should be a number!"); + } + + value_i = (long int) lua_getnumber(value); + if ((value_i < 0 || value_i > 255)) + lua_error("imagemap_tag \"settable\": value should be in range [0, 255]!"); + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= imagemap_p->size) + lua_error("imagemap_tag \"settable\": index is out of bounds!"); + + imagemap_p->index[index_i] = (unsigned char) value_i; +} + +/***************************************************************************\ +* palette "settable" fallback. * +\***************************************************************************/ +static void palettesettable_fb(void) +{ + lua_Object palette, index, color; + + palette_t *palette_p; + long int index_i; + long int color_i; + + palette = lua_getparam(1); + index = lua_getparam(2); + color = lua_getparam(3); + + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p) { + lua_error("palette_tag \"settable\": invalid palette_tag object!"); + } + + if (!lua_isnumber(index)) { + lua_error("palette_tag \"settable\": index should be a number!"); + } + + if (lua_tag(color) != color_tag) + lua_error("palette_tag \"settable\": value should be of type color_tag!"); + + color_i = (long int) lua_getuserdata(color); + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= palette_p->size) + lua_error("palette_tag \"settable\": index is out of bounds!"); + + palette_p->color[index_i] = color_i; +} + +/***************************************************************************\ +* channel "settable" fallback. This fallback is called when a LUA line like * +* "imagergb.r[y*w + x] = c" is executed. The imagergb "gettable" fallback * +* fills and returns a channel structure with info about the buffer. This * +* structure is consulted and the value is assigned where it should. * +\***************************************************************************/ +static void channelsettable_fb(void) +{ + lua_Object channel, index, value; + + channel_t *channel_p; + long int index_i; + long int value_i; + + channel = lua_getparam(1); + index = lua_getparam(2); + value = lua_getparam(3); + + channel_p = (channel_t *) lua_getuserdata(channel); + if (!channel_p) { + lua_error("channel_tag \"settable\": invalid channel_tag object!"); + } + + if (!lua_isnumber(index)) { + lua_error("channel_tag \"settable\": index should be a number!"); + } + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= channel_p->size) { + lua_error("channel_tag \"settable\": index is out of bounds!"); + } + + if (!lua_isnumber(value)) { + lua_error("channel_tag \"settable\": value should be a number!"); + } + value_i = (long int) lua_getnumber(value); + if ((value_i < 0 || value_i > 255)) { + lua_error("channel_tag \"settable\": value should be in range [0, 255]!"); + } + + channel_p->value[index_i] = (unsigned char) value_i; +} + +/***************************************************************************\ +* imagemap "gettable" fallback. * +\***************************************************************************/ +static void imagemapgettable_fb(void) +{ + lua_Object imagemap, index; + + imagemap_t *imagemap_p; + long int index_i; + + imagemap = lua_getparam(1); + index = lua_getparam(2); + + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p) + lua_error("imagemap_tag \"gettable\": invalid imagemap_tag object!"); + + if (!lua_isnumber(index)) { + lua_error("imagemap_tag \"gettable\": index should be a number!"); + } + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= imagemap_p->size) + lua_error("imagemap_tag \"gettable\": index is out of bounds!"); + + lua_pushnumber( imagemap_p->index[index_i]); +} + +/***************************************************************************\ +* palette "gettable" fallback. * +\***************************************************************************/ +static void palettegettable_fb(void) +{ + lua_Object palette, index; + + palette_t *palette_p; + long int index_i; + + palette = lua_getparam(1); + index = lua_getparam(2); + + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p) + lua_error("palette_tag \"gettable\": invalid palette_tag object!"); + + if (!lua_isnumber(index)) { + lua_error("palette_tag \"gettable\": index should be a number!"); + } + + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= palette_p->size) + lua_error("palette_tag \"gettable\": index is out of bounds!"); + + lua_pushusertag((void *) palette_p->color[index_i], color_tag); +} + +/***************************************************************************\ +* channel "gettable" fallback. This fallback is called when a LUA line like * +* "c = imagergb.r[y*w + x]" is executed. The imagergb "gettable" fallback * +* fills and returns a channel structure with info about the buffer. This * +* structure is consulted and the appropriate value is returned. * +\***************************************************************************/ +static void channelgettable_fb(void) +{ + lua_Object channel, index; + + channel_t *channel_p; + long int index_i; + + channel = lua_getparam(1); + index = lua_getparam(2); + + channel_p = (channel_t *) lua_getuserdata(channel); + if (!channel_p) { + lua_error("channel_tag \"gettable\": invalid channel_tag object!"); + } + + if (!lua_isnumber(index)) { + lua_error("channel_tag \"gettable\": index should be a number!"); + } + index_i = (long int) lua_getnumber(index); + if (index_i < 0 || index_i >= channel_p->size) { + lua_error("channel_tag \"gettable\": index is out of bounds!"); + } + + lua_pushnumber( channel_p->value[index_i]); +} + +/***************************************************************************\ +* imagergb "gettable" fallback. This fallback is called when a LUA line * +* like "c = imagergb.r[y*w + x]" or "imagergb.r[y*w + x] = c" is executed. * +* The channel_info global is filled and its address is returned with a * +* channel_tag usertag lua_Object. The following "gettable" or "settable" * +* then assigns or returns the appropriate value. * +\***************************************************************************/ +static void imagergbgettable_fb(void) +{ + lua_Object imagergb, index; + + char *index_s; + imagergb_t *imagergb_p; + + imagergb = lua_getparam(1); + index = lua_getparam(2); + + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!imagergb_p) + lua_error("imagergb_tag \"gettable\": invalid imagergb_tag object!"); + + if (!lua_isstring(index)) { + lua_error("imagergb_tag \"gettable\": index should be a channel name!"); + } + index_s = (char *) lua_getstring(index); + + channel_info.size = imagergb_p->size; + + if (*index_s == 'r' || *index_s == 'R') { + channel_info.value = imagergb_p->red; + } + else if (*index_s == 'g' || *index_s == 'G') { + channel_info.value = imagergb_p->green; + } + else if (*index_s == 'b' || *index_s == 'B') { + channel_info.value = imagergb_p->blue; + } + else { + lua_error("imagergb_tag \"gettable\": index is an invalid channel name!"); + } + + lua_pushusertag((void *) &channel_info, channel_tag); +} + +/***************************************************************************\ +* imagergba "gettable" fallback. This fallback is called when a LUA line * +* like "c = imagergba.r[y*w + x]" or "imagergba.r[y*w + x] = c" is executed.* +* The channel_info global is filled and its address is returned with a * +* channel_tag usertag lua_Object. The following "gettable" or "settable" * +* then assigns or returns the appropriate value. * +\***************************************************************************/ +static void imagergbagettable_fb(void) +{ + lua_Object imagergba, index; + + char *index_s; + imagergba_t *imagergba_p; + + imagergba = lua_getparam(1); + index = lua_getparam(2); + + imagergba_p = (imagergba_t *) lua_getuserdata(imagergba); + if (!imagergba_p) + lua_error("imagergba_tag \"gettable\": invalid imagergba_tag object!"); + + if (!lua_isstring(index)) { + lua_error("imagergba_tag \"gettable\": index should be a channel name!"); + } + index_s = (char *) lua_getstring(index); + + channel_info.size = imagergba_p->size; + + if (*index_s == 'r' || *index_s == 'R') { + channel_info.value = imagergba_p->red; + } + else if (*index_s == 'g' || *index_s == 'G') { + channel_info.value = imagergba_p->green; + } + else if (*index_s == 'b' || *index_s == 'B') { + channel_info.value = imagergba_p->blue; + } + else if (*index_s == 'a' || *index_s == 'A') { + channel_info.value = imagergba_p->alpha; + } + else { + lua_error("imagergba_tag \"gettable\": index is an invalid channel name!"); + } + + lua_pushusertag((void *) &channel_info, channel_tag); +} + +/***************************************************************************\ +* palette "gc" fallback. * +\***************************************************************************/ +static void palettegc_fb(void) +{ + lua_Object palette; + + palette_t *palette_p; + + palette = lua_getparam(1); + palette_p = (palette_t *) lua_getuserdata(palette); + if (!palette_p) + lua_error("palette_tag \"gc\": invalid palette_tag object!"); + + /* if the palette has not been killed, kill it */ + if (palette_p->color) free(palette_p->color); + + /* free the palette_t structure */ + free(palette_p); +} + +/***************************************************************************\ +* imagergb "gc" fallback. * +\***************************************************************************/ +static void imagergbgc_fb(void) +{ + lua_Object imagergb; + + imagergb_t *imagergb_p; + + imagergb = lua_getparam(1); + imagergb_p = (imagergb_t *) lua_getuserdata(imagergb); + if (!imagergb_p) + lua_error("imagergb_tag \"gc\": invalid imagergb_tag object!"); + + /* if the imagergb has not been killed, kill it */ + if (imagergb_p->red) free(imagergb_p->red); + if (imagergb_p->green) free(imagergb_p->green); + if (imagergb_p->blue) free(imagergb_p->blue); + + /* free the imagergb_t structure */ + free(imagergb_p); +} + +/***************************************************************************\ +* imagergba "gc" fallback. * +\***************************************************************************/ +static void imagergbagc_fb(void) +{ + lua_Object imagergba; + + imagergba_t *imagergba_p; + + imagergba = lua_getparam(1); + imagergba_p = (imagergba_t *) lua_getuserdata(imagergba); + if (!imagergba_p) + lua_error("imagergba_tag \"gc\": invalid imagergba_tag object!"); + + /* if the imagergba has not been killed, kill it */ + if (imagergba_p->red) free(imagergba_p->red); + if (imagergba_p->green) free(imagergba_p->green); + if (imagergba_p->blue) free(imagergba_p->blue); + if (imagergba_p->alpha) free(imagergba_p->alpha); + + /* free the imagergba_t structure */ + free(imagergba_p); +} + +/***************************************************************************\ +* imagemap "gc" fallback. * +\***************************************************************************/ +static void imagemapgc_fb(void) +{ + lua_Object imagemap; + + imagemap_t *imagemap_p; + + imagemap = lua_getparam(1); + imagemap_p = (imagemap_t *) lua_getuserdata(imagemap); + if (!imagemap_p) + lua_error("imagemap_tag \"gc\": invalid imagemap_tag object!"); + + /* if the imagemap has not been killed, kill it */ + if (imagemap_p->index) free(imagemap_p->index); + + /* free the imagemap_t structure */ + free(imagemap_p); +} + +/***************************************************************************\ +* Initialization code. * +\***************************************************************************/ + +/***************************************************************************\ +* Initializes IMLua. * +\***************************************************************************/ +void imlua_open(void) +{ + lua_Object cdlua_tag; + + /* check if CD has been initialized */ + cdlua_tag = lua_getglobal("CDLUA_INSTALLED"); + + /* get CD defined tags, let CD deal with the user tag objects */ + if ((cdlua_tag != LUA_NOOBJECT) && (!lua_isnil(cdlua_tag))) { + cdlua_tag = lua_getglobal("CDLUA_COLOR_TAG"); + color_tag = (int) lua_getnumber(cdlua_tag); + cdlua_tag = lua_getglobal("CDLUA_IMAGERGB_TAG"); + imagergb_tag = (int) lua_getnumber(cdlua_tag); + cdlua_tag = lua_getglobal("CDLUA_IMAGERGBA_TAG"); + imagergba_tag = (int) lua_getnumber(cdlua_tag); + cdlua_tag = lua_getglobal("CDLUA_PALETTE_TAG"); + palette_tag = (int) lua_getnumber(cdlua_tag); + cdlua_tag = lua_getglobal("CDLUA_IMAGEMAP_TAG"); + imagemap_tag = (int) lua_getnumber(cdlua_tag); + cdlua_tag = lua_getglobal("CDLUA_CHANNEL_TAG"); + channel_tag = (int) lua_getnumber(cdlua_tag); + } + /* define IM own tags and fallbacks */ + else { + color_tag = lua_newtag(); + imagergb_tag = lua_newtag(); + imagergba_tag = lua_newtag(); + imagemap_tag = lua_newtag(); + palette_tag = lua_newtag(); + channel_tag = lua_newtag(); + + /* associate the fallbacks */ + lua_pushcfunction(palettesettable_fb); lua_settagmethod(palette_tag, "settable"); + lua_pushcfunction(channelsettable_fb); lua_settagmethod(channel_tag, "settable"); + lua_pushcfunction(imagemapsettable_fb); lua_settagmethod(imagemap_tag, "settable"); + + lua_pushcfunction(imagergbgettable_fb); lua_settagmethod(imagergb_tag, "gettable"); + lua_pushcfunction(imagergbagettable_fb); lua_settagmethod(imagergba_tag, "gettable"); + lua_pushcfunction(palettegettable_fb); lua_settagmethod(palette_tag, "gettable"); + lua_pushcfunction(imagemapgettable_fb); lua_settagmethod(imagemap_tag, "gettable"); + lua_pushcfunction(channelgettable_fb); lua_settagmethod(channel_tag, "gettable"); + + lua_pushcfunction(imagergbgc_fb); lua_settagmethod(imagergb_tag, "gc"); + lua_pushcfunction(imagergbagc_fb); lua_settagmethod(imagergba_tag, "gc"); + lua_pushcfunction(palettegc_fb); lua_settagmethod(palette_tag, "gc"); + lua_pushcfunction(imagemapgc_fb); lua_settagmethod(imagemap_tag, "gc"); + } + + /* register used tags in global context for other libraries use */ + lua_pushnumber(1.0f); lua_setglobal("IMLUA_INSTALLED"); + lua_pushnumber( color_tag); lua_setglobal("IMLUA_COLOR_TAG"); + lua_pushnumber( imagergb_tag); lua_setglobal("IMLUA_IMAGERGB_TAG"); + lua_pushnumber( imagergba_tag); lua_setglobal("IMLUA_IMAGERGBA_TAG"); + lua_pushnumber( imagemap_tag); lua_setglobal("IMLUA_IMAGEMAP_TAG"); + lua_pushnumber( palette_tag); lua_setglobal("IMLUA_PALETTE_TAG"); + lua_pushnumber( channel_tag); lua_setglobal("IMLUA_CHANNEL_TAG"); + + /* registered IM functions */ + lua_register("imDecodeColor", imlua_decodecolor); + lua_register("imEncodeColor", imlua_encodecolor); + lua_register("imLoadRGB", imlua_loadrgb); + lua_register("imLoadMap", imlua_loadmap); + lua_register("imSaveRGB", imlua_savergb); + lua_register("imSaveMap", imlua_savemap); + lua_register("imFileFormat", imlua_fileformat); + lua_register("imImageInfo", imlua_imageinfo); + lua_register("imRGB2Map", imlua_rgb2map); + lua_register("imMap2RGB", imlua_map2rgb); + lua_register("imRGB2Gray", imlua_rgb2gray); + lua_register("imMap2Gray", imlua_map2gray); + lua_register("imVersion", imlua_version); + lua_register("imResize", imlua_resize); + lua_register("imStretch", imlua_stretch); + + /* creation and destruction functions */ + lua_register("imCreateImageRGB", imlua_createimagergb); + lua_register("imCreateImageMap", imlua_createimagemap); + lua_register("imCreatePalette", imlua_createpalette); + lua_register("imKillImageRGB", imlua_killimagergb); + lua_register("imKillImageMap", imlua_killimagemap); + lua_register("imKillPalette", imlua_killpalette); + + /* im constants */ + lua_pushnumber( IM_BMP); lua_setglobal("IM_BMP"); + lua_pushnumber( IM_PCX); lua_setglobal("IM_PCX"); + lua_pushnumber( IM_GIF); lua_setglobal("IM_GIF"); + lua_pushnumber( IM_TIF); lua_setglobal("IM_TIF"); + lua_pushnumber( IM_RAS); lua_setglobal("IM_RAS"); + lua_pushnumber( IM_SGI); lua_setglobal("IM_SGI"); + lua_pushnumber( IM_JPG); lua_setglobal("IM_JPG"); + lua_pushnumber( IM_LED); lua_setglobal("IM_LED"); + lua_pushnumber( IM_TGA); lua_setglobal("IM_TGA"); + + lua_pushnumber( 0); lua_setglobal("IM_NONE"); + lua_pushnumber( 1); lua_setglobal("IM_DEFAULT"); + lua_pushnumber( 2); lua_setglobal("IM_COMPRESSED"); + + lua_pushnumber( IM_RGB); lua_setglobal("IM_RGB"); + lua_pushnumber( IM_MAP); lua_setglobal("IM_MAP"); + + lua_pushnumber( IM_ERR_NONE); lua_setglobal("IM_ERR_NONE"); + lua_pushnumber( IM_ERR_OPEN); lua_setglobal("IM_ERR_OPEN"); + lua_pushnumber( IM_ERR_READ); lua_setglobal("IM_ERR_READ"); + lua_pushnumber( IM_ERR_WRITE); lua_setglobal("IM_ERR_WRITE"); + lua_pushnumber( IM_ERR_FORMAT); lua_setglobal("IM_ERR_FORMAT"); + lua_pushnumber( IM_ERR_TYPE); lua_setglobal("IM_ERR_TYPE"); + lua_pushnumber( IM_ERR_COMP); lua_setglobal("IM_ERR_COMP"); +} diff --git a/im/src/im_palette.cpp b/im/src/im_palette.cpp new file mode 100755 index 0000000..0e6f967 --- /dev/null +++ b/im/src/im_palette.cpp @@ -0,0 +1,551 @@ +/** \file + * \brief Palette Generators + * Creates several standard palettes + * + * See Copyright Notice in im_lib.h + * $Id: im_palette.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + +#include "im.h" +#include "im_util.h" +#include "im_palette.h" +#include "im_colorhsi.h" + +#include +#include +#include +#include + +static inline int iSqr(int x) +{ + return x*x; +} + +static inline int iAbs(int x) +{ + return x < 0? -x: x; +} + +int imPaletteFindNearest(const long* palette, int palette_count, long color) +{ + assert(palette); + assert(palette_count); + + int lSqrDiff, lBestDiff = (unsigned int)-1; + int pIndex = -1; + + imbyte red1, green1, blue1; + imColorDecode(&red1, &green1, &blue1, color); + + for (int lIndex = 0; lIndex < palette_count; lIndex++, palette++) + { + if (color == *palette) + return lIndex; + + imbyte red2, green2, blue2; + imColorDecode(&red2, &green2, &blue2, *palette); + + lSqrDiff = iSqr(red1 - red2) + + iSqr(green1 - green2) + + iSqr(blue1 - blue2); + + if (lSqrDiff < lBestDiff) + { + lBestDiff = lSqrDiff; + pIndex = lIndex; + } + } + + return pIndex; +} + +int imPaletteFindColor(const long* palette, int palette_count, long color, unsigned char tol) +{ + assert(palette); + assert(palette_count); + + /* Divides in two section for faster results when Tolerance is 0.*/ + if (tol == 0) + { + for (int lIndex = 0; lIndex < palette_count; lIndex++, palette++) + { + if (color == *palette) + return lIndex; + } + } + else + { + imbyte red1, green1, blue1; + imColorDecode(&red1, &green1, &blue1, color); + + for (int lIndex = 0; lIndex < palette_count; lIndex++, palette++) + { + imbyte red2, green2, blue2; + imColorDecode(&red2, &green2, &blue2, *palette); + + if (iAbs(red1 - red2) < tol && + iAbs(green1 - green2) < tol && + iAbs(blue1 - blue2) < tol) + { + return lIndex; + } + } + } + + return -1; +} + +long* imPaletteGray(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + + for (int lIndex = 0; lIndex < 256; lIndex++) + { + /* From (0, 0, 0) to (255, 255, 255)*/ + /* From Black to White */ + *(ct++) = imColorEncode((imbyte)lIndex, (imbyte)lIndex, (imbyte)lIndex); + } + + return palette; +} + +long* imPaletteRed(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + + for (int lIndex = 0; lIndex < 256; lIndex++) + { + /* From (0, 0, 0) to (255, 0, 0) */ + /* From Black to Red */ + *(ct++) = imColorEncode((imbyte)lIndex, 0, 0); + } + + return palette; +} + +long* imPaletteGreen(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + + for (int lIndex = 0; lIndex < 256; lIndex++) + { + /* From (0, 0, 0) to (0, 255, 0)*/ + /* From Black to Green */ + *(ct++) = imColorEncode(0, (imbyte)lIndex, 0); + } + + return palette; +} + +long* imPaletteBlue(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + + for (int lIndex = 0; lIndex < 256; lIndex++) + { + /* From (0, 0, 0) to (0, 0, 255)*/ + /* From Black to Blue */ + *(ct++) = imColorEncode(0, 0, (imbyte)lIndex); + } + + return palette; +} + +long* imPaletteYellow(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + + for (int lIndex = 0; lIndex < 256; lIndex++) + { + /* From (0, 0, 0) to (255, 255, 0)*/ + /* From Black to Yellow */ + *(ct++) = imColorEncode((imbyte)lIndex, (imbyte)lIndex, 0); + } + + return palette; +} + +long* imPaletteMagenta(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + + for (int lIndex = 0; lIndex < 256; lIndex++) + { + /* From (0, 0, 0) to (255, 0, 255)*/ + /* From Black to Magenta */ + *(ct++) = imColorEncode((imbyte)lIndex, 0, (imbyte)lIndex); + } + + return palette; +} + +long* imPaletteCian(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + + for (int lIndex = 0; lIndex < 256; lIndex++) + { + /* From (0, 0, 0) to (0, 255, 255)*/ + /* From Black to Cian */ + *(ct++) = imColorEncode(0, (imbyte)lIndex, (imbyte)lIndex); + } + + return palette; +} + +long* imPaletteHues(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + int i; + float tone, step1 = 255.0f/41.0f, step2 = 255.0f/42.0f; + + /* 1+42+1+41+1+42+1+41+1+42+1+41+1 = 256 */ + + /* red */ + *(ct++) = imColorEncode((imbyte)255, 0, 0); + + for (tone = step2, i = 0; i < 42; i++, tone += step2) + { + /* From (255, 0, 0) to (255, 255, 0) */ + /* From Red to Yellow */ + *(ct++) = imColorEncode((imbyte)255, (imbyte)tone, 0); + } + + /* yellow */ + *(ct++) = imColorEncode((imbyte)255, (imbyte)255, 0); + + for (tone = step1, i = 0; i < 41; i++, tone += step1) + { + /* From (255, 255, 0) to (0, 255, 0) */ + /* From Yellow to Green */ + *(ct++) = imColorEncode((imbyte)(255.0f-tone), (imbyte)255, 0); + } + + /* green */ + *(ct++) = imColorEncode(0, (imbyte)255, 0);; + + for (tone = step2, i = 0; i < 42; i++, tone += step2) + { + /* From (0, 255, 0) to (0, 255, 255) */ + /* From Green to Cian */ + *(ct++) = imColorEncode(0, (imbyte)255, (imbyte)tone); + } + + /* cian */ + *(ct++) = imColorEncode(0, (imbyte)255, (imbyte)255); + + for (tone = step1, i = 0; i < 41; i++, tone += step1) + { + /* From (0, 255, 255) to (0, 0, 255) */ + /* From Cian to Blue */ + *(ct++) = imColorEncode(0, (imbyte)(255.0f-tone), (imbyte)255); + } + + /* blue */ + *(ct++) = imColorEncode(0, 0, (imbyte)255); + + for (tone = step2, i = 0; i < 42; i++, tone += step2) + { + /* From (0, 0, 255) to (255, 0, 255) */ + /* From Blue to Magenta */ + *(ct++) = imColorEncode((imbyte)tone, 0, (imbyte)255); + } + + /* magenta */ + *(ct++) = imColorEncode((imbyte)255, 0, (imbyte)255); + + for (tone = step1, i = 0; i < 41; i++, tone += step1) + { + /* From (255, 0, 255) to (255, 0, 0) */ + /* From Magenta to Red */ + *(ct++) = imColorEncode((imbyte)255, 0, (imbyte)(255.0f-tone)); + } + + /* black */ + *(ct++) = imColorEncode(0, 0, 0);; + + return palette; +} + +long* imPaletteRainbow(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + int hue; + unsigned char r, g, b; + float h, s, i, factor, H; + + s = 1.0f; + factor = 360.0f / 256.0f; + + for (hue = 0; hue < 256; hue++) + { + h = hue * factor; + h = 300-h; + if (h < 0) h += 360; + H = h/57.2957795131f; + + i = imColorHSI_ImaxS(H, cos(H), sin(H)); + + imColorHSI2RGBbyte(h, s, i, &r, &g, &b); + + *(ct++) = imColorEncode(r, g, b);; + } + + return palette; +} + +long* imPaletteBlueIce(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + + for (int lIndex = 0; lIndex < 256; lIndex++) + { + /* From (0, 0, 255) to (255, 255, 255)*/ + /* From Blue to White */ + *(ct++) = imColorEncode((imbyte)lIndex, (imbyte)lIndex, 255); + } + + return palette; +} + +long* imPaletteHotIron(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + int lIndex, lSubIndex; + + for (lIndex = 0, lSubIndex = 0; lSubIndex < 128; lSubIndex++, lIndex += 2) + { + /* From (0, 0, 0) to (254, 0, 0) */ + /* From Black to ~Red */ + *(ct++) = imColorEncode((imbyte)lIndex, 0, 0); + } + + for (lIndex = 0, lSubIndex = 0; lSubIndex < 64; lSubIndex++, lIndex += 2) + { + /* From (255, 0, 0) to (255, 126, 0) */ + /* From Red to ~Orange */ + *(ct++) = imColorEncode(255, (imbyte)lIndex, 0); + } + + for (lIndex = 0, lSubIndex = 0; lSubIndex < 63; lSubIndex++, lIndex += 2) + { + /* From (255, 128, 0) to (255, 252, 252)*/ + /* From Orange to ~White */ + imbyte red = 255; + imbyte green = (imbyte)(128 + lIndex); + imbyte blue = (imbyte)(lIndex * 2 + 4); + + *(ct++) = imColorEncode(red, green, blue); + } + + *(ct++) = imColorEncode(255, 255, 255); + + return palette; +} + +long* imPaletteBlackBody(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + int lIndex, lSubIndex; + + for (lIndex = 0, lSubIndex = 0; lSubIndex < 85; lSubIndex++, lIndex += 3) + { + /* From (0, 0, 0) to (252, 0, 0) */ + /* From Black to ~Red */ + *(ct++) = imColorEncode((imbyte)lIndex, 0, 0); + } + + for (lIndex = 0, lSubIndex = 0; lSubIndex < 85; lSubIndex++, lIndex += 3) + { + /* From (255, 0, 0) to (255, 252, 0)*/ + /* From Red to ~Yellow */ + *(ct++) = imColorEncode(255, (imbyte)lIndex, 0); + } + + for (lIndex = 0, lSubIndex = 0; lSubIndex < 86; lSubIndex++, lIndex += 3) + { + /* From (255, 255, 0) to (255, 255, 255)*/ + /* From Yellow to White */ + *(ct++) = imColorEncode(255, 255, (imbyte)lIndex); + } + + return palette; +} + +long* imPaletteHighContrast(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + int lIndex; + + static struct{unsigned char r, g, b;} HighContrastColors[65] = { + { 0,0,0 }, + + { 255,0,0 }, { 128,0,0 }, { 64,0,0 }, { 192,0,0 }, + { 0,255,0 }, { 0,128,0 }, { 0,64,0 }, { 0,192,0 }, + { 0,0,255 }, { 0,0,128 }, { 0,0,64 }, { 0,0,192 }, + { 255,255,0 }, { 128,128,0 }, { 64,64,0 }, { 192,192,0 }, + { 255,0,255 }, { 128,0,128 }, { 64,0,64 }, { 192,0,192 }, + { 0,255,255 }, { 0,128,128 }, { 0,64,64 }, { 0,192,192 }, + { 255,255,255 }, { 128,128,128 }, { 64,64,64 }, { 192,192,192 }, + + { 255,128,128 }, { 64,255,255 }, { 192,255,255 }, + { 128,255,128 }, { 255,64,255 }, { 255,192,255 }, + { 128,128,255 }, { 255,255,64 }, { 255,255,192 }, + { 255,255,128 }, { 64,64,255 }, { 192,192,255 }, + { 255,128,255 }, { 64,255,64 }, { 192,255,192 }, + { 128,255,255 }, { 255,64,64 }, { 255,192,192 }, + + { 128,64,64 }, { 128,192,192 }, + { 64,128,64 }, { 192,128,192 }, + { 64,64,128 }, { 192,192,128 }, + { 128,128,64 }, { 128,128,192 }, + { 128,64,128 }, { 128,192,128 }, + { 64,128,128 }, { 192,128,128 }, + + { 192,64,64 }, + { 64,192,64 }, + { 64,64,192 }, + { 192,192,64 }, + { 192,64,192 }, + { 64,192,192 }, + }; + + for (lIndex = 0; lIndex < 65; lIndex++) + { + *(ct++) = imColorEncode(HighContrastColors[lIndex].r, + HighContrastColors[lIndex].g, + HighContrastColors[lIndex].b); + } + + for (; lIndex < 256; lIndex++) + { + *(ct++) = imColorEncode((imbyte)lIndex, (imbyte)lIndex, (imbyte)lIndex); + } + + return palette; +} + +/* 256 divided in 6 steps results in these steps.*/ +static int iSixStepsTable[6] = {0, 51, 102, 153, 204, 255}; + +long* imPaletteUniform(void) +{ + long* palette = (long*)malloc(sizeof(long)*256); + long* ct = palette; + + for (int lRedIndex = 0; lRedIndex < 6; lRedIndex++) + for (int lGreenIndex = 0; lGreenIndex < 6; lGreenIndex++) + for (int lBlueIndex = 0; lBlueIndex < 6; lBlueIndex++) + { + imbyte red = (imbyte)iSixStepsTable[lRedIndex]; + imbyte green = (imbyte)iSixStepsTable[lGreenIndex]; + imbyte blue = (imbyte)iSixStepsTable[lBlueIndex]; + + *(ct++) = imColorEncode(red, green, blue); + } + + /* We initialize only 216 colors (6x6x6), rest 40 colors.*/ + /* Fill them with a gray scale palette.*/ + for (int lIndex = 6; lIndex < 246; lIndex += 6) + { + *(ct++) = imColorEncode((imbyte)lIndex, (imbyte)lIndex, (imbyte)lIndex); + } + + return palette; +} + +/* X divided by 51. Convert to 216 color space. */ +static int iDividedBy51Table[256] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 +}; + +/* X multiplied by 36. Shift to red position.*/ +static int iTimes36Table[6] = {0, 36, 72, 108, 144, 180}; + +/* X multiplied by 36. Shift to green position.*/ +static int iTimes6Table[6] = {0, 6, 12, 18, 24, 30}; + +int imPaletteUniformIndex(long color) +{ + imbyte red, green, blue; + imColorDecode(&red, &green, &blue, color); + return iTimes36Table[iDividedBy51Table[red]] + iTimes6Table[iDividedBy51Table[green]] + iDividedBy51Table[blue]; +} + +/* Remainder of X divided by 51. Used to position in the halftone*/ +static int iModulo51Table[256] = +{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 0, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 0 +}; + +/* Dither matrices for 8 bit to 2.6 bit halftones.*/ +static int iHalftone8x8Table[64] = +{ + 0, 38, 9, 47, 2, 40, 11, 50, + 25, 12, 35, 22, 27, 15, 37, 24, + 6, 44, 3, 41, 8, 47, 5, 43, + 31, 19, 28, 15, 34, 21, 31, 18, + 1, 39, 11, 49, 0, 39, 10, 48, + 27, 14, 36, 23, 26, 13, 35, 23, + 7, 46, 4, 43, 7, 45, 3, 42, + 33, 20, 30, 17, 32, 19, 29, 16 +}; + +int imPaletteUniformIndexHalftoned(long color, int x, int y) +{ + int lHalf = iHalftone8x8Table[(x % 8) * 8 + y % 8]; + + imbyte red, green, blue; + imColorDecode(&red, &green, &blue, color); + + /* Now, look up each value in the halftone matrix using an 8x8 ordered dither.*/ + int lRed = iDividedBy51Table[red] + (iModulo51Table[red] > lHalf? 1: 0); + int lGreen = iDividedBy51Table[green] + (iModulo51Table[green] > lHalf? 1: 0); + int lBlue = iDividedBy51Table[blue] + (iModulo51Table[blue] > lHalf? 1: 0); + + return iTimes36Table[lRed] + iTimes6Table[lGreen] + lBlue; +} diff --git a/im/src/im_process.def b/im/src/im_process.def new file mode 100755 index 0000000..07bba47 --- /dev/null +++ b/im/src/im_process.def @@ -0,0 +1,165 @@ +EXPORTS + imCalcRMSError + imCalcSNR + imProcessAutoCovariance + imProcessBinMorphClose + imProcessBinMorphConvolve + imProcessBinMorphDilate + imProcessBinMorphErode + imProcessBinMorphOpen + imProcessBinMorphOutline + imProcessCompassConvolve + imProcessConvolve + imProcessConvolveRep + imProcessConvolveSep + imProcessDiffOfGaussianConvolve + imProcessGaussianConvolve + imProcessGrayMorphClose + imProcessGrayMorphConvolve + imProcessGrayMorphDilate + imProcessGrayMorphErode + imProcessGrayMorphGradient + imProcessGrayMorphOpen + imProcessGrayMorphTopHat + imProcessGrayMorphWell + imProcessHoughLines + imProcessHoughLinesDraw + imProcessLapOfGaussianConvolve + imProcessLocalMaxThreshold + imProcessMeanConvolve + imProcessMedianConvolve + imProcessMinMaxThreshold + imProcessOtsuThreshold + imProcessPercentThreshold + imProcessRadial + imProcessRangeContrastThreshold + imProcessRangeConvolve + imProcessRankClosestConvolve + imProcessRankMaxConvolve + imProcessRankMinConvolve + imProcessReduce + imProcessRenderAddGaussianNoise + imProcessRenderAddSpeckleNoise + imProcessRenderAddUniformNoise + imProcessRenderBox + imProcessRenderCondOp + imProcessRenderCone + imProcessRenderConstant + imProcessRenderCosine + imProcessRenderGaussian + imProcessRenderLapOfGaussian + imProcessRenderOp + imProcessRenderRamp + imProcessRenderRandomNoise + imProcessRenderSinc + imProcessRenderTent + imProcessRenderWheel + imProcessResize + imProcessRotate + imProcessSobelConvolve + imProcessUniformErrThreshold + imCalcCountColors + imCalcGrayHistogram + imCalcHistogram + imCalcHistogramStatistics + imCalcHistoImageStatistics + imCalcImageStatistics + imProcessPixelate + imProcessArithmeticConstOp + imProcessArithmeticOp + imProcessBinMorphThin + imProcessBitMask + imProcessBitPlane + imProcessBitwiseOp + imProcessBlendConst + imProcessBlend + imProcessCalcRotateSize + imProcessDifusionErrThreshold + imProcessDirectConv + imProcessEqualizeHistogram + imProcessExpandHistogram + imProcessFlip + imProcessHysteresisThresEstimate + imProcessHysteresisThreshold + imProcessLocalMaxThresEstimate + imProcessMergeComplex + imProcessMergeComponents + imProcessMergeHSI + imProcessMirror + imProcessMultipleMean + imProcessMultipleStdDev + imProcessQuantizeGrayUniform + imProcessQuantizeRGBUniform + imProcessReduceBy4 + imProcessRotate180 + imProcessRotate90 + imProcessSplitComplex + imProcessSplitComponents + imProcessSplitHSI + imProcessSplitYChroma + imProcessThreshold + imProcessThresholdByDiff + imProcessToneGamut + imProcessUnArithmeticOp + imProcessUnNormalize + imProcessZeroCrossing + imProcessRotateKernel + imProcessAddMargins + imProcessReplaceColor + imProcessPosterize + imProcessNegative + imProcessCanny + imProcessMultiplyConj + imProcessNormalizeComponents + imGaussianStdDev2KernelSize + imProcessBitwiseNot + imProcessDistanceTransform + imAnalyzeFindRegions + imAnalyzeMeasureArea + imAnalyzeMeasureCentroid + imAnalyzeMeasurePrincipalAxis + imAnalyzeMeasureHoles + imProcessPerimeterLine + imAnalyzeMeasurePerimeter + imProcessRemoveByArea + imProcessFillHoles + imAnalyzeMeasurePerimArea + imProcessSliceThreshold + imProcessRenderGrid + imProcessRenderChessboard + imProcessInsert + imProcessCrop + imProcessRegionalMaximum + imCalcUShortHistogram + imProcessSwirl + imProcessPrewittConvolve + imProcessSplineEdgeConvolve + imProcessConvolveDual + imKernelSobel + imKernelPrewitt + imKernelKirsh + imKernelLaplacian4 + imKernelLaplacian8 + imKernelLaplacian5x5 + imKernelLaplacian7x7 + imKernelGradian3x3 + imKernelGradian7x7 + imKernelSculpt + imKernelMean3x3 + imKernelMean5x5 + imKernelCircularMean5x5 + imKernelMean7x7 + imKernelCircularMean7x7 + imKernelGaussian3x3 + imKernelGaussian5x5 + imKernelBarlett5x5 + imKernelTopHat5x5 + imKernelTopHat7x7 + imKernelEnhance + imGaussianKernelSize2StdDev + imProcessRotateRef + imProcessInterlaceSplit + imProcessBarlettConvolve + imProcessUnsharp + imProcessSharp + imProcessSharpKernel diff --git a/im/src/im_process.dep b/im/src/im_process.dep new file mode 100644 index 0000000..83b76c9 --- /dev/null +++ b/im/src/im_process.dep @@ -0,0 +1,84 @@ +$(OBJDIR)/im_arithmetic_bin.o: process/im_arithmetic_bin.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_math.h \ + ../include/im_util.h ../include/im_complex.h ../include/im_math.h \ + ../include/im_counter.h ../include/im_process_pon.h \ + ../include/im_image.h ../include/im_math_op.h ../include/im_complex.h +$(OBJDIR)/im_morphology_gray.o: process/im_morphology_gray.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_convert.h ../include/im_image.h \ + ../include/im_process_loc.h ../include/im_process_pon.h +$(OBJDIR)/im_quantize.o: process/im_quantize.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_palette.h \ + ../include/im_math.h ../include/im_util.h ../include/im_process_pon.h \ + ../include/im_image.h +$(OBJDIR)/im_arithmetic_un.o: process/im_arithmetic_un.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_math.h \ + ../include/im_util.h ../include/im_complex.h ../include/im_math.h \ + ../include/im_process_pon.h ../include/im_image.h \ + ../include/im_math_op.h ../include/im_complex.h +$(OBJDIR)/im_geometric.o: process/im_geometric.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_process_loc.h ../include/im_image.h \ + ../include/im_math_op.h ../include/im_complex.h ../include/im_math.h \ + ../include/im_util.h +$(OBJDIR)/im_render.o: process/im_render.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_counter.h ../include/im_math.h \ + ../include/im_util.h ../include/im_process_pon.h ../include/im_image.h +$(OBJDIR)/im_color.o: process/im_color.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_colorhsi.h ../include/im_palette.h \ + ../include/im_process_pon.h ../include/im_image.h +$(OBJDIR)/im_histogram.o: process/im_histogram.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_math.h \ + ../include/im_util.h ../include/im_process_pon.h ../include/im_image.h \ + ../include/im_process_ana.h +$(OBJDIR)/im_resize.o: process/im_resize.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_math.h ../include/im_util.h \ + ../include/im_complex.h ../include/im_math.h ../include/im_counter.h \ + ../include/im_process_loc.h ../include/im_image.h +$(OBJDIR)/im_convolve.o: process/im_convolve.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_complex.h ../include/im_math.h ../include/im_util.h \ + ../include/im_math_op.h ../include/im_complex.h ../include/im_image.h \ + ../include/im_kernel.h ../include/im_process_loc.h \ + ../include/im_image.h ../include/im_process_pon.h +$(OBJDIR)/im_houghline.o: process/im_houghline.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_complex.h \ + ../include/im_math.h ../include/im_util.h ../include/im_convert.h \ + ../include/im_image.h ../include/im_counter.h \ + ../include/im_process_glo.h +$(OBJDIR)/im_statistics.o: process/im_statistics.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_math_op.h \ + ../include/im_complex.h ../include/im_math.h ../include/im_util.h \ + ../include/im_process_ana.h ../include/im_image.h +$(OBJDIR)/im_convolve_rank.o: process/im_convolve_rank.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_math.h ../include/im_util.h ../include/im_process_loc.h \ + ../include/im_image.h +$(OBJDIR)/im_logic.o: process/im_logic.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_process_pon.h ../include/im_image.h +$(OBJDIR)/im_threshold.o: process/im_threshold.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_process_pon.h \ + ../include/im_image.h ../include/im_process_ana.h +$(OBJDIR)/im_effects.o: process/im_effects.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_math.h ../include/im_util.h \ + ../include/im_complex.h ../include/im_math.h \ + ../include/im_process_pon.h ../include/im_image.h \ + ../include/im_math_op.h ../include/im_complex.h +$(OBJDIR)/im_morphology_bin.o: process/im_morphology_bin.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_counter.h \ + ../include/im_process_loc.h ../include/im_image.h \ + ../include/im_process_pon.h +$(OBJDIR)/im_tonegamut.o: process/im_tonegamut.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_math.h \ + ../include/im_util.h ../include/im_process_pon.h ../include/im_image.h +$(OBJDIR)/im_canny.o: process/im_canny.cpp ../include/im.h ../include/old_im.h \ + ../include/im_process_loc.h ../include/im_image.h +$(OBJDIR)/im_distance.o: process/im_distance.cpp ../include/im.h \ + ../include/old_im.h ../include/im_util.h ../include/im_process_glo.h \ + ../include/im_image.h +$(OBJDIR)/im_analyze.o: process/im_analyze.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_math.h ../include/im_util.h \ + ../include/im_process_ana.h ../include/im_image.h \ + ../include/im_process_pon.h +$(OBJDIR)/im_kernel.o: process/im_kernel.cpp ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_image.h ../include/im_kernel.h diff --git a/im/src/im_process.mak b/im/src/im_process.mak new file mode 100755 index 0000000..064be76 --- /dev/null +++ b/im/src/im_process.mak @@ -0,0 +1,36 @@ +PROJNAME = im +LIBNAME = im_process +OPT = YES + +SRC = \ + im_arithmetic_bin.cpp im_morphology_gray.cpp im_quantize.cpp \ + im_arithmetic_un.cpp im_geometric.cpp im_render.cpp \ + im_color.cpp im_histogram.cpp im_resize.cpp \ + im_convolve.cpp im_houghline.cpp im_statistics.cpp \ + im_convolve_rank.cpp im_logic.cpp im_threshold.cpp \ + im_effects.cpp im_morphology_bin.cpp im_tonegamut.cpp \ + im_canny.cpp im_distance.cpp im_analyze.cpp \ + im_kernel.cpp +SRC := $(addprefix process/, $(SRC)) + +USE_IM = Yes +IM = .. + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + ifneq ($(findstring ow, $(TEC_UNAME)), ) + DEFINES += IM_DEFMATHFLOAT + endif + ifneq ($(findstring bc, $(TEC_UNAME)), ) + DEFINES += IM_DEFMATHFLOAT + endif +else + ifneq ($(findstring AIX, $(TEC_UNAME)), ) + DEFINES += IM_DEFMATHFLOAT + endif + ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + DEFINES += IM_DEFMATHFLOAT + endif + ifneq ($(findstring HP-UX, $(TEC_UNAME)), ) + DEFINES += IM_DEFMATHFLOAT + endif +endif diff --git a/im/src/im_rgb2map.cpp b/im/src/im_rgb2map.cpp new file mode 100755 index 0000000..465743a --- /dev/null +++ b/im/src/im_rgb2map.cpp @@ -0,0 +1,964 @@ +/** \file + * \brief RGB to Map Conversion + * + * Most part of this code is based on jquant2.c from version 5 + * of the IJG JPEG software, + * copyright (C) 1991-1994, Thomas G. Lane. + * Some other parts are from XV software + * copyright John Bradley. + * This file doen not follows the IM library nomenclature convention. + * + * See Copyright Notice in im_lib.h + * $Id: im_rgb2map.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + + +#include +#include +#include + +#include "im.h" +#include "im_util.h" +#include "im_convert.h" +#include "im_counter.h" + + +/* RANGE forces a to be in the range b..c (inclusive) */ +#define RANGE(a,b,c) { if (a < b) a = b; if (a > c) a = c; } + +static void xvbcopy(const imbyte* src, imbyte* dst, int len) +{ + /* determine if the regions overlap + * + * 3 cases: src=dst, srcdst + * + * if src=dst, they overlap completely, but nothing needs to be moved + * if srcdst then they overlap + * if src>dst and srcdst) { /* do a backward copy */ + src = src + len - 1; + dst = dst + len - 1; + for ( ; len>0; len--, src--, dst--) *dst = *src; + } + + else { /* they either overlap (src>dst) or they don't overlap */ + /* do a forward copy */ + for ( ; len>0; len--, src++, dst++) *dst = *src; + } +} + +/****************************/ +static int quick_map(imbyte *red, imbyte *green, imbyte *blue, int w, int h, imbyte *map, + imbyte *rmap, imbyte *gmap, imbyte *bmap, int maxcol) +{ +/* scans picture until it finds more than 'maxcol' different colors. If it +finds more than 'maxcol' colors, it returns '0'. If it DOESN'T, it does +the 24-to-8 conversion by simply sticking the colors it found into +a colormap, and changing instances of a color in pic24 into colormap + indicies (in pic8) */ + + unsigned long colors[256],col; + int i, nc, low, high, mid, count; + imbyte *pred, *pgreen, *pblue, *pix; + + if (maxcol>256) maxcol = 256; + + /* put the first color in the table by hand */ + nc = 0; mid = 0; + + count = w*h; + for (i=count,pred=red,pgreen=green,pblue=blue; i; i--) + { + col = (((unsigned long) *pred++) << 16); + col += (((unsigned long) *pgreen++) << 8); + col += *pblue++; + + /* binary search the 'colors' array to see if it's in there */ + low = 0; high = nc-1; + while (low <= high) + { + mid = (low+high)/2; + if (col < colors[mid]) high = mid - 1; + else if (col > colors[mid]) low = mid + 1; + else break; + } + + if (high < low) + { /* didn't find color in list, add it. */ + if (nc>=maxcol) + return 0; + + xvbcopy((const imbyte*)&colors[low], (imbyte*)&colors[low+1], (nc - low) * sizeof(unsigned long)); + colors[low] = col; + nc++; + } + } + + /* run through the data a second time, this time mapping pixel values in + pic24 into colormap offsets into 'colors' */ + + for (i=count,pred=red,pgreen=green,pblue=blue, pix=map; i; i--,pix++) + { + col = (((unsigned long) *pred++) << 16); + col += (((unsigned long) *pgreen++) << 8); + col += *pblue++; + + /* binary search the 'colors' array. It *IS* in there */ + low = 0; high = nc-1; + while (low <= high) + { + mid = (low+high)/2; + if (col < colors[mid]) high = mid - 1; + else if (col > colors[mid]) low = mid + 1; + else break; + } + + if (high < low) + return 0; + + *pix = (imbyte)mid; + } + + /* and load up the 'desired colormap' */ + for (i=0; i>16); + gmap[i] = (unsigned char)((colors[i]>>8) & 0xff); + bmap[i] = (unsigned char)( colors[i] & 0xff); + } + + return nc; +} + +#define MAXNUMCOLORS 256 /* maximum size of colormap */ + +#define C0_SCALE 2 /* scale R distances by this much */ +#define C1_SCALE 3 /* scale G distances by this much */ +#define C2_SCALE 1 /* and B by this much */ + +#define HIST_C0_BITS 5 /* bits of precision in R histogram */ +#define HIST_C1_BITS 6 /* bits of precision in G histogram */ +#define HIST_C2_BITS 5 /* bits of precision in B histogram */ + +/* Number of elements along histogram axes. */ +#define HIST_C0_ELEMS (1< 0) + { + /* get pixel value and index into the histogram */ + histp = & histogram[*red >> C0_SHIFT] [*green >> C1_SHIFT] [*blue >> C2_SHIFT]; + + /* increment, check for overflow and undo increment if so. */ + if (++(*histp) <= 0) + (*histp)--; + + red++; + green++; + blue++; + } +} + + +static boxptr find_biggest_color_pop (boxptr boxlist, int numboxes) +{ + register boxptr boxp; + register int i; + register long maxc = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->colorcount > maxc && boxp->volume > 0) { + which = boxp; + maxc = boxp->colorcount; + } + } + return which; +} + +static boxptr find_biggest_volume (boxptr boxlist, int numboxes) +{ + register boxptr boxp; + register int i; + register int maxv = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->volume > maxv) { + which = boxp; + maxv = boxp->volume; + } + } + return which; +} + + +static void update_box (boxptr boxp) +{ + hist2d * histogram = sl_histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + int dist0,dist1,dist2; + long ccount; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + if (c0max > c0min) + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0min = c0min = c0; + goto have_c0min; + } + } +have_c0min: + if (c0max > c0min) + for (c0 = c0max; c0 >= c0min; c0--) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0max = c0max = c0; + goto have_c0max; + } + } +have_c0max: + if (c1max > c1min) + for (c1 = c1min; c1 <= c1max; c1++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1min = c1min = c1; + goto have_c1min; + } + } +have_c1min: + if (c1max > c1min) + for (c1 = c1max; c1 >= c1min; c1--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1max = c1max = c1; + goto have_c1max; + } + } +have_c1max: + if (c2max > c2min) + for (c2 = c2min; c2 <= c2max; c2++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2min = c2min = c2; + goto have_c2min; + } + } +have_c2min: + if (c2max > c2min) + for (c2 = c2max; c2 >= c2min; c2--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2max = c2max = c2; + goto have_c2max; + } + } +have_c2max: + + dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE; + dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE; + dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE; + boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2; + + ccount = 0; + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++, histp++) + if (*histp != 0) { + ccount++; + } + } + boxp->colorcount = ccount; +} + + +static int median_cut (boxptr boxlist, int numboxes, int desired_colors) +{ + int n,lb; + int c0,c1,c2,cmax; + register boxptr b1,b2; + + while (numboxes < desired_colors) { + /* Select box to split. + * Current algorithm: by population for first half, then by volume. + */ + if (numboxes*2 <= desired_colors) { + b1 = find_biggest_color_pop(boxlist, numboxes); + } else { + b1 = find_biggest_volume(boxlist, numboxes); + } + if (b1 == NULL) /* no splittable boxes left! */ + break; + b2 = &boxlist[numboxes]; /* where new box will go */ + /* Copy the color bounds to the new box. */ + b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; + b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; + /* Choose which axis to split the box on. + */ + c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE; + c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE; + c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE; + cmax = c1; n = 1; + if (c0 > cmax) { cmax = c0; n = 0; } + if (c2 > cmax) { n = 2; } + switch (n) { + case 0: + lb = (b1->c0max + b1->c0min) / 2; + b1->c0max = lb; + b2->c0min = lb+1; + break; + case 1: + lb = (b1->c1max + b1->c1min) / 2; + b1->c1max = lb; + b2->c1min = lb+1; + break; + case 2: + lb = (b1->c2max + b1->c2min) / 2; + b1->c2max = lb; + b2->c2min = lb+1; + break; + } + /* Update stats for boxes */ + update_box(b1); + update_box(b2); + numboxes++; + } + return numboxes; +} + +static void compute_color (boxptr boxp, int icolor) +{ + /* Current algorithm: mean weighted by pixels (not colors) */ + /* Note it is important to get the rounding correct! */ + hist2d * histogram = sl_histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + long count; + long total = 0; + long c0total = 0; + long c1total = 0; + long c2total = 0; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) { + if ((count = *histp++) != 0) { + total += count; + c0total += ((c0 << C0_SHIFT) + ((1<>1)) * count; + c1total += ((c1 << C1_SHIFT) + ((1<>1)) * count; + c2total += ((c2 << C2_SHIFT) + ((1<>1)) * count; + } + } + } + + sl_colormap[0][icolor] = (imbyte) ((c0total + (total>>1)) / total); + sl_colormap[1][icolor] = (imbyte) ((c1total + (total>>1)) / total); + sl_colormap[2][icolor] = (imbyte) ((c2total + (total>>1)) / total); +} + + +static void slow_select_colors (int descolors) +/* Master routine for color selection */ +{ + box boxlist[MAXNUMCOLORS]; + int numboxes; + int i; + + /* Initialize one box containing whole space */ + numboxes = 1; + boxlist[0].c0min = 0; + boxlist[0].c0max = 255 >> C0_SHIFT; + boxlist[0].c1min = 0; + boxlist[0].c1max = 255 >> C1_SHIFT; + boxlist[0].c2min = 0; + boxlist[0].c2max = 255 >> C2_SHIFT; + /* Shrink it to actually-used volume and set its statistics */ + update_box(& boxlist[0]); + /* Perform median-cut to produce final box list */ + numboxes = median_cut(boxlist, numboxes, descolors); + /* Compute the representative color for each box, fill colormap */ + for (i = 0; i < numboxes; i++) + compute_color(& boxlist[i], i); + sl_num_colors = numboxes; +} + + +/* log2(histogram cells in update box) for each axis; this can be adjusted */ +#define BOX_C0_LOG (HIST_C0_BITS-3) +#define BOX_C1_LOG (HIST_C1_BITS-3) +#define BOX_C2_LOG (HIST_C2_BITS-3) + +#define BOX_C0_ELEMS (1<> 1; + maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT)); + centerc1 = (minc1 + maxc1) >> 1; + maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); + centerc2 = (minc2 + maxc2) >> 1; + + minmaxdist = 0x7FFFFFFFL; + + for (i = 0; i < numcolors; i++) { + /* We compute the squared-c0-distance term, then add in the other two. */ + x = sl_colormap[0][i]; + if (x < minc0) { + tdist = (x - minc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else if (x > maxc0) { + tdist = (x - maxc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + min_dist = 0; + if (x <= centerc0) { + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } + } + + x = sl_colormap[1][i]; + if (x < minc1) { + tdist = (x - minc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc1) { + tdist = (x - maxc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc1) { + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } + } + + x = sl_colormap[2][i]; + if (x < minc2) { + tdist = (x - minc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc2) { + tdist = (x - maxc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc2) { + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } + } + + mindist[i] = min_dist; /* save away the results */ + if (max_dist < minmaxdist) + minmaxdist = max_dist; + } + + ncolors = 0; + for (i = 0; i < numcolors; i++) { + if (mindist[i] <= minmaxdist) + colorlist[ncolors++] = (imbyte) i; + } + return ncolors; +} + + +static void find_best_colors (int minc0, int minc1, int minc2, int numcolors, + imbyte* colorlist, imbyte* bestcolor) +{ + int ic0, ic1, ic2; + int i, icolor; + register int * bptr; /* pointer into bestdist[] array */ + imbyte * cptr; /* pointer into bestcolor[] array */ + int dist0, dist1; /* initial distance values */ + register int dist2; /* current distance in inner loop */ + int xx0, xx1; /* distance increments */ + register int xx2; + int inc0, inc1, inc2; /* initial values for increments */ + /* This array holds the distance to the nearest-so-far color for each cell */ + int bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Initialize best-distance for each cell of the update box */ + bptr = bestdist; + for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) + *bptr++ = 0x7FFFFFFFL; + + /* Nominal steps between cell centers ("x" in Thomas article) */ +#define STEP_C0 ((1 << C0_SHIFT) * C0_SCALE) +#define STEP_C1 ((1 << C1_SHIFT) * C1_SCALE) +#define STEP_C2 ((1 << C2_SHIFT) * C2_SCALE) + + for (i = 0; i < numcolors; i++) { + icolor = colorlist[i]; + /* Compute (square of) distance from minc0/c1/c2 to this color */ + inc0 = (minc0 - (int) sl_colormap[0][icolor]) * C0_SCALE; + dist0 = inc0*inc0; + inc1 = (minc1 - (int) sl_colormap[1][icolor]) * C1_SCALE; + dist0 += inc1*inc1; + inc2 = (minc2 - (int) sl_colormap[2][icolor]) * C2_SCALE; + dist0 += inc2*inc2; + /* Form the initial difference increments */ + inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; + inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; + inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; + /* Now loop over all cells in box, updating distance per Thomas method */ + bptr = bestdist; + cptr = bestcolor; + xx0 = inc0; + for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) { + dist1 = dist0; + xx1 = inc1; + for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) { + dist2 = dist1; + xx2 = inc2; + for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) { + if (dist2 < *bptr) { + *bptr = dist2; + *cptr = (imbyte) icolor; + } + dist2 += xx2; + xx2 += 2 * STEP_C2 * STEP_C2; + bptr++; + cptr++; + } + dist1 += xx1; + xx1 += 2 * STEP_C1 * STEP_C1; + } + dist0 += xx0; + xx0 += 2 * STEP_C0 * STEP_C0; + } + } +} + + +static void fill_inverse_cmap (int c0, int c1, int c2) +{ + hist2d * histogram = sl_histogram; + int minc0, minc1, minc2; /* lower left corner of update box */ + int ic0, ic1, ic2; + register imbyte * cptr; /* pointer into bestcolor[] array */ + register histptr cachep; /* pointer into main cache array */ + /* This array lists the candidate colormap indexes. */ + imbyte colorlist[MAXNUMCOLORS]; + int numcolors; /* number of candidate colors */ + /* This array holds the actually closest colormap index for each cell. */ + imbyte bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Convert cell coordinates to update box ID */ + c0 >>= BOX_C0_LOG; + c1 >>= BOX_C1_LOG; + c2 >>= BOX_C2_LOG; + + minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1); + minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1); + minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1); + + numcolors = find_nearby_colors(minc0, minc1, minc2, colorlist); + + /* Determine the actually nearest colors. */ + find_best_colors(minc0, minc1, minc2, numcolors, colorlist, bestcolor); + + /* Save the best color numbers (plus 1) in the main cache array */ + c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ + c1 <<= BOX_C1_LOG; + c2 <<= BOX_C2_LOG; + cptr = bestcolor; + for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) { + for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) { + cachep = & histogram[c0+ic0][c1+ic1][c2]; + for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { + *cachep++ = (histcell) (*cptr++ + 1); + } + } + } +} + + +static void slow_map_pixels (imbyte *red, imbyte *green, imbyte *blue, int width, int height, imbyte *map) +{ + register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ + LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ + LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ + register FSERRPTR errorptr; /* => fserrors[] at column before current */ + imbyte *inRptr, *inGptr, *inBptr; /* => current input pixel */ + imbyte* outptr; /* => current output pixel */ + histptr cachep; + int dir; /* +1 or -1 depending on direction */ + int dir3; /* 3*dir, for advancing errorptr */ + int row, col, offset; + int *error_limit = sl_error_limiter; + imbyte* colormap0 = sl_colormap[0]; + imbyte* colormap1 = sl_colormap[1]; + imbyte* colormap2 = sl_colormap[2]; + hist2d * histogram = sl_histogram; + + for (row = 0; row < height; row++) + { + offset = row * width; + + inRptr = & red[offset]; + inGptr = & green[offset]; + inBptr = & blue[offset]; + outptr = & map[offset]; + + if (sl_on_odd_row) + { + /* work right to left in this row */ + offset = width-1; + + inRptr += offset; /* so point to rightmost pixel */ + inGptr += offset; /* so point to rightmost pixel */ + inBptr += offset; /* so point to rightmost pixel */ + + outptr += offset; + + dir = -1; + dir3 = -3; + errorptr = sl_fserrors + (width+1)*3; /* => entry after last column */ + sl_on_odd_row = 0; /* flip for next time */ + } + else + { + /* work left to right in this row */ + dir = 1; + dir3 = 3; + errorptr = sl_fserrors; /* => entry before first real column */ + sl_on_odd_row = 1; /* flip for next time */ + } + + /* Preset error values: no error propagated to first pixel from left */ + cur0 = cur1 = cur2 = 0; + /* and no error propagated to row below yet */ + belowerr0 = belowerr1 = belowerr2 = 0; + bpreverr0 = bpreverr1 = bpreverr2 = 0; + + for (col = width; col > 0; col--) + { + cur0 = (cur0 + errorptr[dir3+0] + 8) >> 4; + cur1 = (cur1 + errorptr[dir3+1] + 8) >> 4; + cur2 = (cur2 + errorptr[dir3+2] + 8) >> 4; + + cur0 = error_limit[cur0]; + cur1 = error_limit[cur1]; + cur2 = error_limit[cur2]; + + cur0 += inRptr[0]; + cur1 += inGptr[0]; + cur2 += inBptr[0]; + + RANGE(cur0, 0, 255); + RANGE(cur1, 0, 255); + RANGE(cur2, 0, 255); + + /* Index into the cache with adjusted pixel value */ + cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; + + /* If we have not seen this color before, find nearest colormap */ + /* entry and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cur0>>C0_SHIFT, cur1>>C1_SHIFT, cur2>>C2_SHIFT); + + /* Now emit the colormap index for this cell */ + { + register int pixcode = *cachep - 1; + *outptr = (imbyte) pixcode; + /* Compute representation error for this pixel */ + cur0 -= (int) colormap0[pixcode]; + cur1 -= (int) colormap1[pixcode]; + cur2 -= (int) colormap2[pixcode]; + } + + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. */ + { + register LOCFSERROR bnexterr, delta; + bnexterr = cur0; /* Process component 0 */ + delta = cur0 * 2; + cur0 += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr0 + cur0); + cur0 += delta; /* form error * 5 */ + bpreverr0 = belowerr0 + cur0; + belowerr0 = bnexterr; + cur0 += delta; /* form error * 7 */ + bnexterr = cur1; /* Process component 1 */ + delta = cur1 * 2; + cur1 += delta; /* form error * 3 */ + errorptr[1] = (FSERROR) (bpreverr1 + cur1); + cur1 += delta; /* form error * 5 */ + bpreverr1 = belowerr1 + cur1; + belowerr1 = bnexterr; + cur1 += delta; /* form error * 7 */ + bnexterr = cur2; /* Process component 2 */ + delta = cur2 * 2; + cur2 += delta; /* form error * 3 */ + errorptr[2] = (FSERROR) (bpreverr2 + cur2); + cur2 += delta; /* form error * 5 */ + bpreverr2 = belowerr2 + cur2; + belowerr2 = bnexterr; + cur2 += delta; /* form error * 7 */ + } + + /* At this point curN contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + inRptr += dir; /* Advance pixel pointers to next column */ + inGptr += dir; /* Advance pixel pointers to next column */ + inBptr += dir; /* Advance pixel pointers to next column */ + outptr += dir; + errorptr += dir3; /* advance errorptr to current column */ + } + + /* Post-loop cleanup: we must unload the final error values into the + * final fserrors[] entry. Note we need not unload belowerrN because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */ + errorptr[1] = (FSERROR) bpreverr1; + errorptr[2] = (FSERROR) bpreverr2; + } +} + + +/* Allocate and fill in the error_limiter table */ +static void init_error_limit (void) +{ + int * table; + int in, out, STEPSIZE; + + table = (int *) malloc((size_t) ((255*2+1) * sizeof(int))); + if (! table) return; + + table += 255; /* so can index -255 .. +255 */ + sl_error_limiter = table; + + STEPSIZE = ((255+1)/16); + + /* Map errors 1:1 up to +- 255/16 */ + out = 0; + for (in = 0; in < STEPSIZE; in++, out++) + { + table[in] = out; + table[-in] = -out; + } + + /* Map errors 1:2 up to +- 3*255/16 */ + for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) + { + table[in] = out; + table[-in] = -out; + } + + /* Clamp the rest to final out value (which is (255+1)/8) */ + for (; in <= 255; in++) + { + table[in] = out; + table[-in] = -out; + } +} + +int imConvertRGB2Map(int width, int height, unsigned char *red, unsigned char *green, unsigned char *blue, unsigned char *map, long *palette, int *palette_count) +{ + int i, err, new_palette_count; + imbyte rm[256], gm[256], bm[256]; + + if (*palette_count <= 0 || *palette_count > 256) + *palette_count = 256; + + new_palette_count = quick_map(red, green, blue, width, height, map, rm, gm, bm, *palette_count); + if (new_palette_count) + { + for (i=0; i < new_palette_count; i++) + *palette++ = imColorEncode(rm[i], gm[i], bm[i]); + + *palette_count = new_palette_count; + return IM_ERR_NONE; + } + + err = slow_quant(red, green, blue, width, height, map, rm, gm, bm, *palette_count); + if (err) + return IM_ERR_MEM; + + for (i=0; i < *palette_count; i++) + *palette++ = imColorEncode(rm[i], gm[i], bm[i]); + + return IM_ERR_NONE; +} + diff --git a/im/src/im_str.cpp b/im/src/im_str.cpp new file mode 100755 index 0000000..f50dcf1 --- /dev/null +++ b/im/src/im_str.cpp @@ -0,0 +1,67 @@ +/** \file + * \brief String Utilities + * + * See Copyright Notice in im_lib.h + * $Id: im_str.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + + +#include +#include +#include + +#include "im_util.h" + +int imStrEqual(const char* str1, const char* str2) +{ + assert(str1); + assert(str2); + + /* While both strings are equal and not 0 */ + while (*str1 == *str2 && *str1) + { + str1++; + str2++; + } + + /* Is last char not equal ? */ + if (*str1 != *str2) + return 0; + + return 1; +} + +int imStrNLen(const char* str, int max_len) +{ + assert(str); + + const char* start_str = str; + + while(max_len && *str) + { + max_len--; + str++; + } + + return str - start_str; +} + +int imStrCheck(const void* data, int count) +{ + const char* str = (char*)data; + + if (str[count-1] == 0) + return 1; + + while(count && *str) + { + count--; + str++; + } + + if (count > 0) + return 1; + + return 0; +} + diff --git a/im/src/im_sysfile_unix.cpp b/im/src/im_sysfile_unix.cpp new file mode 100755 index 0000000..2065bb6 --- /dev/null +++ b/im/src/im_sysfile_unix.cpp @@ -0,0 +1,211 @@ +/** \file + * \brief System Dependent Binary File Access (UNIX) + * + * See Copyright Notice in im_lib.h + * $Id: im_sysfile_unix.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "im_util.h" +#include "im_binfile.h" + + +class imBinSystemFile: public imBinFileBase +{ +protected: + int FileHandle, + Error; + + unsigned long ReadBuf(void* pValues, unsigned long pSize); + unsigned long WriteBuf(void* pValues, unsigned long pSize); + +public: + virtual void Open(const char* pFileName); + virtual void New(const char* pFileName); + virtual void Close(); + + unsigned long FileSize(); + int HasError() const; + void SeekTo(unsigned long pOffset); + void SeekOffset(long pOffset); + void SeekFrom(long pOffset); + unsigned long Tell() const; + int EndOfFile() const; +}; + +imBinFileBase* iBinSystemFileNewFunc() +{ + return new imBinSystemFile(); +} + +void imBinSystemFile::Open(const char* pFileName) +{ + int mode = O_RDONLY; +#ifdef O_BINARY + mode |= O_BINARY; +#endif + this->FileHandle = open(pFileName, mode, 0); + if (this->FileHandle < 0) + this->Error = errno; + else + this->Error = 0; + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 0; +} + +void imBinSystemFile::New(const char* pFileName) +{ + int mode = O_WRONLY | O_CREAT | O_TRUNC; +#ifdef O_BINARY + mode |= O_BINARY; +#endif + this->FileHandle = open(pFileName, mode, 0666); // User/Group/Other can read and write + if (this->FileHandle < 0) + this->Error = errno; + else + this->Error = 0; + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 1; +} + +void imBinSystemFile::Close() +{ + assert(this->FileHandle > -1); + int ret = close(this->FileHandle); + if (ret < 0) + this->Error = errno; + else + this->Error = 0; +} + +int imBinSystemFile::HasError() const +{ + if (this->FileHandle < 0 || this->Error) return 1; + return 0; +} + +unsigned long imBinSystemFile::ReadBuf(void* pValues, unsigned long pSize) +{ + assert(this->FileHandle > -1); + int ret = read(this->FileHandle, pValues, (size_t)pSize); + if (ret < 0) + this->Error = errno; + else + this->Error = 0; + return ret < 0? 0: ret; +} + +unsigned long imBinSystemFile::WriteBuf(void* pValues, unsigned long pSize) +{ + assert(this->FileHandle > -1); + int ret = write(this->FileHandle, pValues, (size_t)pSize); + if (ret < 0) + this->Error = errno; + else + this->Error = 0; + return ret < 0? 0: ret; +} + +void imBinSystemFile::SeekTo(unsigned long pOffset) +{ + assert(this->FileHandle > -1); + int ret = lseek(this->FileHandle, pOffset, SEEK_SET); + if (ret < 0) + this->Error = errno; + else + this->Error = 0; +} + +void imBinSystemFile::SeekOffset(long pOffset) +{ + assert(this->FileHandle > -1); + int ret = lseek(this->FileHandle, pOffset, SEEK_CUR); + if (ret < 0) + this->Error = errno; + else + this->Error = 0; +} + +void imBinSystemFile::SeekFrom(long pOffset) +{ + assert(this->FileHandle > -1); + int ret = lseek(this->FileHandle, pOffset, SEEK_END); + if (ret < 0) + this->Error = errno; + else + this->Error = 0; +} + +unsigned long imBinSystemFile::Tell() const +{ + assert(this->FileHandle > -1); + long offset = lseek(this->FileHandle, 0L, SEEK_CUR); + return offset < 0? 0: offset; +} + +unsigned long imBinSystemFile::FileSize() +{ + assert(this->FileHandle > -1); + long lCurrentPosition = lseek(this->FileHandle, 0L, SEEK_CUR); + long lSize = lseek(this->FileHandle, 0L, SEEK_END); + lseek(this->FileHandle, lCurrentPosition, SEEK_SET); + return lSize < 0? 0: lSize; +} + +int imBinSystemFile::EndOfFile() const +{ + assert(this->FileHandle > -1); + long lCurrentPosition = lseek(this->FileHandle, 0L, SEEK_CUR); + long lSize = lseek(this->FileHandle, 0L, SEEK_END); + lseek(this->FileHandle, lCurrentPosition, SEEK_SET); + return lCurrentPosition == lSize? 1: 0; +} + + + +class imBinSystemFileHandle: public imBinSystemFile +{ +public: + virtual void Open(const char* pFileName); + virtual void New(const char* pFileName); + virtual void Close(); +}; + +imBinFileBase* iBinSystemFileHandleNewFunc() +{ + return new imBinSystemFileHandle(); +} + +void imBinSystemFileHandle::Open(const char* pFileName) +{ + // the file was successfully opened already by the client + + int *s = (int*)pFileName; + this->FileHandle = s[0]; + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 0; + this->Error = 0; +} + +void imBinSystemFileHandle::New(const char* pFileName) +{ + // the file was successfully opened already the client + + int *s = (int*)pFileName; + this->FileHandle = s[0]; + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 1; + this->Error = 0; +} + +void imBinSystemFileHandle::Close() +{ + // does nothing, the client must close the file +} diff --git a/im/src/im_sysfile_win32.cpp b/im/src/im_sysfile_win32.cpp new file mode 100755 index 0000000..1daf85b --- /dev/null +++ b/im/src/im_sysfile_win32.cpp @@ -0,0 +1,207 @@ +/** \file + * \brief System Dependent Binary File Access. + * + * See Copyright Notice in im_lib.h + * $Id: im_sysfile_win32.cpp,v 1.2 2009/10/01 16:12:24 scuri Exp $ + */ + +#include + +#include +#include +#include +#include + +#include "im_util.h" +#include "im_binfile.h" + +/* not defined in VC6 */ +#ifndef INVALID_SET_FILE_POINTER +#define INVALID_SET_FILE_POINTER ((DWORD)-1) +#endif + +class imBinSystemFile: public imBinFileBase +{ +protected: + HANDLE FileHandle; + int Error; + + unsigned long ReadBuf(void* pValues, unsigned long pSize); + unsigned long WriteBuf(void* pValues, unsigned long pSize); + +public: + virtual void Open(const char* pFileName); + virtual void New(const char* pFileName); + virtual void Close(); + + unsigned long FileSize(); + int HasError() const; + void SeekTo(unsigned long pOffset); + void SeekOffset(long pOffset); + void SeekFrom(long pOffset); + unsigned long Tell() const; + int EndOfFile() const; +}; + +imBinFileBase* iBinSystemFileNewFunc() +{ + return new imBinSystemFile(); +} + +void imBinSystemFile::Open(const char* pFileName) +{ + this->FileHandle = CreateFile(pFileName, GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); + this->Error = (this->FileHandle == INVALID_HANDLE_VALUE)? 1: 0; + SetLastError(NO_ERROR); + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 0; +} + +void imBinSystemFile::New(const char* pFileName) +{ + this->FileHandle = CreateFile(pFileName, GENERIC_READ | GENERIC_WRITE, + 0, + NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, + NULL); + this->Error = (this->FileHandle == INVALID_HANDLE_VALUE)? 1: 0; + SetLastError(NO_ERROR); + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 1; +} + +void imBinSystemFile::Close() +{ + if (this->FileHandle != INVALID_HANDLE_VALUE) + CloseHandle(this->FileHandle); + + this->FileHandle = INVALID_HANDLE_VALUE; + this->Error = 1; +} + +unsigned long imBinSystemFile::FileSize() +{ + assert(this->FileHandle != INVALID_HANDLE_VALUE); + this->Error = 0; + DWORD Size = GetFileSize(this->FileHandle, NULL); + if (Size == INVALID_FILE_SIZE) + this->Error = 1; + return Size; +} + +unsigned long imBinSystemFile::ReadBuf(void* pValues, unsigned long pSize) +{ + assert(this->FileHandle != INVALID_HANDLE_VALUE); + this->Error = 0; + DWORD dwSize = 0; + ReadFile(this->FileHandle, pValues, pSize, &dwSize, NULL); + if (dwSize != pSize) + this->Error = 1; + return dwSize; +} + +unsigned long imBinSystemFile::WriteBuf(void* pValues, unsigned long pSize) +{ + assert(this->FileHandle != INVALID_HANDLE_VALUE); + this->Error = 0; + DWORD dwSize = 0; + WriteFile(this->FileHandle, pValues, pSize, &dwSize, NULL); + if (dwSize != pSize) + this->Error = 1; + return dwSize; +} + +int imBinSystemFile::HasError() const +{ + return this->Error; +} + +void imBinSystemFile::SeekTo(unsigned long pOffset) +{ + assert(this->FileHandle != INVALID_HANDLE_VALUE); + this->Error = 0; + DWORD ret = SetFilePointer(this->FileHandle, pOffset, NULL, FILE_BEGIN); + if (ret == INVALID_SET_FILE_POINTER) + this->Error = 1; +} + +void imBinSystemFile::SeekOffset(long pOffset) +{ + assert(this->FileHandle != INVALID_HANDLE_VALUE); + this->Error = 0; + DWORD ret = SetFilePointer(this->FileHandle, pOffset, NULL, FILE_CURRENT); + if (ret == INVALID_SET_FILE_POINTER) + this->Error = 1; +} + +void imBinSystemFile::SeekFrom(long pOffset) +{ + assert(this->FileHandle != INVALID_HANDLE_VALUE); + this->Error = 0; + DWORD ret = SetFilePointer(this->FileHandle, pOffset, NULL, FILE_END); + if (ret == INVALID_SET_FILE_POINTER) + this->Error = 1; +} + +unsigned long imBinSystemFile::Tell() const +{ + assert(this->FileHandle != INVALID_HANDLE_VALUE); + return SetFilePointer(this->FileHandle, 0, NULL, FILE_CURRENT); +} + +int imBinSystemFile::EndOfFile() const +{ + assert(this->FileHandle != INVALID_HANDLE_VALUE); + DWORD cur_pos = SetFilePointer(this->FileHandle, 0, NULL, FILE_CURRENT); + DWORD end_pos = SetFilePointer(this->FileHandle, 0, NULL, FILE_END); + SetFilePointer(this->FileHandle, cur_pos, NULL, FILE_CURRENT); + return (cur_pos == end_pos)? 1: 0; +} + + + +class imBinSystemFileHandle: public imBinSystemFile +{ +public: + virtual void Open(const char* pFileName); + virtual void New(const char* pFileName); + virtual void Close(); +}; + +imBinFileBase* iBinSystemFileHandleNewFunc() +{ + return new imBinSystemFileHandle(); +} + +void imBinSystemFileHandle::Open(const char* pFileName) +{ + // the file was successfully opened already the client + + HANDLE file_handle = (HANDLE)pFileName; + this->FileHandle = file_handle; + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 0; + this->Error = 0; +} + +void imBinSystemFileHandle::New(const char* pFileName) +{ + // the file was successfully opened already the client + + HANDLE file_handle = (HANDLE)pFileName; + this->FileHandle = file_handle; + InitByteOrder(imBinCPUByteOrder()); + this->IsNew = 1; + this->Error = 0; +} + +void imBinSystemFileHandle::Close() +{ + // does nothing, the client must close the file +} diff --git a/im/src/im_wmv.def b/im/src/im_wmv.def new file mode 100755 index 0000000..1e017f3 --- /dev/null +++ b/im/src/im_wmv.def @@ -0,0 +1,2 @@ +EXPORTS + imFormatRegisterWMV \ No newline at end of file diff --git a/im/src/im_wmv.mak b/im/src/im_wmv.mak new file mode 100755 index 0000000..fef3c40 --- /dev/null +++ b/im/src/im_wmv.mak @@ -0,0 +1,23 @@ +PROJNAME = im +LIBNAME = im_wmv +OPT = YES + +SRC = im_format_wmv.cpp + +ifneq ($(findstring _64, $(TEC_UNAME)), ) + WMFSDK = d:/lng/wmfsdk95 + INCLUDES = $(WMFSDK)/include +else +# WMFSDK = d:/lng/wmfsdk11 +# EXTRAINCS = $(WMFSDK)/include + WMFSDK = d:/lng/wmfsdk9 + INCLUDES = $(WMFSDK)/include +endif + +DEFINES = _CRT_NON_CONFORMING_SWPRINTFS + +LDIR = $(WMFSDK)/lib +LIBS = wmvcore + +USE_IM = Yes +IM = .. diff --git a/im/src/imlua3.def b/im/src/imlua3.def new file mode 100755 index 0000000..d27384d --- /dev/null +++ b/im/src/imlua3.def @@ -0,0 +1,2 @@ +EXPORTS + imlua_open \ No newline at end of file diff --git a/im/src/imlua3.mak b/im/src/imlua3.mak new file mode 100755 index 0000000..aac7b00 --- /dev/null +++ b/im/src/imlua3.mak @@ -0,0 +1,12 @@ +PROJNAME = im +LIBNAME = imlua3 +OPT = YES + +SRC = im_lua3.c + +USE_LUA = Yes +#Do NOT use USE_CD because we use no CD functions, only headers are used. +INCLUDES = $(CD)/include + +USE_IM = Yes +IM = .. diff --git a/im/src/imlua5.mak b/im/src/imlua5.mak new file mode 100755 index 0000000..554b701 --- /dev/null +++ b/im/src/imlua5.mak @@ -0,0 +1,18 @@ +PROJNAME = im +LIBNAME = imlua51 + +OPT = YES + +LOHDIR = lua5/loh +SRC = lua5/imlua.c lua5/imlua_aux.c lua5/imlua_convert.c lua5/imlua_file.c lua5/imlua_image.c lua5/imlua_palette.c lua5/imlua_util.c +DEF_FILE = lua5/imlua.def + +SRCLUA = lua5/im_image.lua lua5/im_convert.lua +SRCLUADIR = lua5 + +INCLUDES = lua5 + +USE_IM = YES +USE_LUA51 = YES +NO_LUALINK = Yes +IM = .. diff --git a/im/src/imlua51.dep b/im/src/imlua51.dep new file mode 100644 index 0000000..ff88e68 --- /dev/null +++ b/im/src/imlua51.dep @@ -0,0 +1,38 @@ +$(OBJDIR)/imlua.o: lua5/imlua.c ../include/im.h ../include/old_im.h \ + ../include/im_lib.h ../include/im_image.h ../include/im_convert.h \ + ../include/im_image.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/imlua.h lua5/imlua_aux.h \ + lua5/imlua_image.h lua5/imlua_palette.h +$(OBJDIR)/imlua_aux.o: lua5/imlua_aux.c ../include/im.h ../include/old_im.h \ + ../include/im_image.h ../include/im_util.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/imlua.h lua5/imlua_aux.h \ + lua5/imlua_image.h +$(OBJDIR)/imlua_convert.o: lua5/imlua_convert.c ../include/im.h ../include/old_im.h \ + ../include/im_image.h ../include/im_convert.h ../include/im_image.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/luaconf.h \ + ../../lua5.1/include/lauxlib.h ../../lua5.1/include/lua.h \ + ../include/imlua.h lua5/imlua_image.h lua5/imlua_aux.h \ + lua5/loh/im_convert_be64.loh +$(OBJDIR)/imlua_file.o: lua5/imlua_file.c ../include/im.h ../include/old_im.h \ + ../include/im_raw.h ../include/im_image.h ../include/im_util.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/luaconf.h \ + ../../lua5.1/include/lauxlib.h ../../lua5.1/include/lua.h \ + ../include/imlua.h lua5/imlua_aux.h lua5/imlua_image.h \ + lua5/imlua_palette.h +$(OBJDIR)/imlua_image.o: lua5/imlua_image.c ../include/im.h ../include/old_im.h \ + ../include/im_image.h ../include/im_util.h ../include/im_convert.h \ + ../include/im_image.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/imlua.h lua5/imlua_image.h \ + lua5/imlua_palette.h lua5/imlua_aux.h lua5/loh/im_image_be64.loh +$(OBJDIR)/imlua_palette.o: lua5/imlua_palette.c ../include/im.h ../include/old_im.h \ + ../include/im_image.h ../include/im_util.h ../include/im_palette.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/luaconf.h \ + ../../lua5.1/include/lauxlib.h ../../lua5.1/include/lua.h \ + ../include/imlua.h lua5/imlua_aux.h lua5/imlua_palette.h +$(OBJDIR)/imlua_util.o: lua5/imlua_util.c ../include/im.h ../include/old_im.h \ + ../include/im_util.h ../include/im_image.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/imlua.h lua5/imlua_aux.h diff --git a/im/src/imlua_capture5.mak b/im/src/imlua_capture5.mak new file mode 100755 index 0000000..a4fe97c --- /dev/null +++ b/im/src/imlua_capture5.mak @@ -0,0 +1,18 @@ +PROJNAME = im +LIBNAME = imlua_capture51 +DEF_FILE = imlua_capture.def + +OPT = YES + +SRCDIR = lua5 + +SRC = imlua_capture.c + +LIBS = im_capture + +INCLUDES = lua5 + +USE_IMLUA = Yes +USE_LUA51 = Yes +NO_LUALINK = Yes +IM = .. diff --git a/im/src/imlua_process5.mak b/im/src/imlua_process5.mak new file mode 100755 index 0000000..85415c4 --- /dev/null +++ b/im/src/imlua_process5.mak @@ -0,0 +1,19 @@ +PROJNAME = im +LIBNAME = imlua_process51 + +OPT = YES + +LOHDIR = lua5/loh +SRC = lua5/imlua_process.c lua5/imlua_kernel.c +DEF_FILE = lua5/imlua_process.def + +SRCLUA = lua5/im_process.lua +SRCLUADIR = lua5 + +LIBS = im_process +INCLUDES = lua5 + +USE_IMLUA = YES +USE_LUA51 = YES +NO_LUALINK = Yes +IM = .. diff --git a/im/src/imlua_process51.dep b/im/src/imlua_process51.dep new file mode 100644 index 0000000..5f98a3b --- /dev/null +++ b/im/src/imlua_process51.dep @@ -0,0 +1,17 @@ +$(OBJDIR)/imlua_process.o: lua5/imlua_process.c ../include/im.h ../include/old_im.h \ + ../include/im_image.h ../include/im_process.h \ + ../include/im_process_pon.h ../include/im_image.h \ + ../include/im_process_loc.h ../include/im_process_glo.h \ + ../include/im_process_ana.h ../include/im_util.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/luaconf.h \ + ../../lua5.1/include/lauxlib.h ../../lua5.1/include/lua.h \ + ../include/imlua.h lua5/imlua_aux.h lua5/imlua_image.h \ + lua5/loh/im_process_be64.loh +$(OBJDIR)/imlua_kernel.o: lua5/imlua_kernel.c ../include/im.h ../include/old_im.h \ + ../include/im_image.h ../include/im_process.h \ + ../include/im_process_pon.h ../include/im_image.h \ + ../include/im_process_loc.h ../include/im_process_glo.h \ + ../include/im_process_ana.h ../include/im_util.h ../include/im_kernel.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/luaconf.h \ + ../../lua5.1/include/lauxlib.h ../../lua5.1/include/lua.h \ + ../include/imlua.h lua5/imlua_aux.h lua5/imlua_image.h diff --git a/im/src/imlua_wmv.mak b/im/src/imlua_wmv.mak new file mode 100755 index 0000000..f487075 --- /dev/null +++ b/im/src/imlua_wmv.mak @@ -0,0 +1,17 @@ +PROJNAME = im +LIBNAME = imlua_wmv51 +DEF_FILE = imlua_wmv.def + +OPT = YES + +SRCDIR = lua5 + +SRC = imlua_wmv.c + +LIBS = im_wmv + +INCLUDES = lua5 + +USE_IMLUA = Yes +USE_LUA51 = Yes +IM = .. diff --git a/im/src/jas_binfile.c b/im/src/jas_binfile.c new file mode 100755 index 0000000..487a2d3 --- /dev/null +++ b/im/src/jas_binfile.c @@ -0,0 +1,97 @@ +/** \file + * \brief libJasper I/O + * I/O uses imBinFile instead of libJasper original handlers. + * + * See Copyright Notice in im_lib.h + * $Id: jas_binfile.c,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + +#include + +#include "jasper/jas_types.h" +#include "jasper/jas_stream.h" +#include "jasper/jas_malloc.h" +#include "jasper/jas_math.h" + +#include "im_binfile.h" + +/* These were static in jas_stream.c */ +jas_stream_t *jas_stream_create(void); +void jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf, int bufsize); + +static int file_read(jas_stream_obj_t *obj, char *buf, int cnt) +{ + imBinFile* file_bin = (imBinFile*)obj; + return imBinFileRead(file_bin, buf, cnt, 1); +} + +static int file_write(jas_stream_obj_t *obj, char *buf, int cnt) +{ + imBinFile* file_bin = (imBinFile*)obj; + return imBinFileWrite(file_bin, buf, cnt, 1); +} + +static long file_seek(jas_stream_obj_t *obj, long offset, int origin) +{ + imBinFile* file_bin = (imBinFile*)obj; + switch (origin) + { + case SEEK_SET: + imBinFileSeekTo(file_bin, offset); + break; + case SEEK_CUR: + imBinFileSeekOffset(file_bin, offset); + break; + case SEEK_END: + imBinFileSeekFrom(file_bin, offset); + break; + } + + return imBinFileError(file_bin); +} + +static int file_close(jas_stream_obj_t *obj) +{ + imBinFile* file_bin = (imBinFile*)obj; + imBinFileClose(file_bin); + return 0; +} + +static jas_stream_ops_t jas_stream_fileops = { + file_read, + file_write, + file_seek, + file_close +}; + +jas_stream_t *jas_binfile_open(const char *file_name, int is_new) +{ + void* handle; + jas_stream_t *stream; + + if (is_new) + handle = (void*)imBinFileNew(file_name); + else + handle = (void*)imBinFileOpen(file_name); + + if (!handle) + return 0; + + /* Allocate a stream object. */ + stream = jas_stream_create(); + + if (is_new) + stream->openmode_ = JAS_STREAM_WRITE | JAS_STREAM_CREATE | JAS_STREAM_BINARY; + else + stream->openmode_ = JAS_STREAM_READ | JAS_STREAM_BINARY; + + /* Select the operations for a file stream object. */ + stream->ops_ = &jas_stream_fileops; + + stream->obj_ = handle; + + /* By default, use full buffering for this type of stream. */ + jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0); + + return stream; +} diff --git a/im/src/lua5/im_convert.lua b/im/src/lua5/im_convert.lua new file mode 100755 index 0000000..231bdb5 --- /dev/null +++ b/im/src/lua5/im_convert.lua @@ -0,0 +1,18 @@ + +function im.ConvertDataTypeNew(src_image, data_type, cpx2real, gamma, abssolute, cast_mode) + local dst_image = im.ImageCreateBased(src_image, nil, nil, nil, data_type) + return im.ConvertDataType(src_image, dst_image, cpx2real, gamma, abssolute, cast_mode), dst_image +end + +function im.ConvertColorSpaceNew(src_image, color_space, has_alpha) + local dst_image = im.ImageCreateBased(src_image, nil, nil, color_space) + if (has_alpha) then dst_image:AddAlpha() end + return im.ConvertColorSpace(src_image, dst_image), dst_image +end + +function im.ConvertToBitmapNew(src_image, color_space, has_alpha, cpx2real, gamma, abssolute, cast_mode) + if (not color_space) then color_space = im.ColorModeToBitmap(src_image:ColorSpace()) end + local dst_image = im.ImageCreateBased(src_image, nil, nil, color_space) + if (has_alpha) then dst_image:AddAlpha() end + return im.ConvertToBitmap(src_image, dst_image, cpx2real, gamma, abssolute, cast_mode), dst_image +end diff --git a/im/src/lua5/im_fftw.lua b/im/src/lua5/im_fftw.lua new file mode 100755 index 0000000..7bae53e --- /dev/null +++ b/im/src/lua5/im_fftw.lua @@ -0,0 +1,57 @@ + +------------------------------------------------------------------------------- +-- Creates a new function, with the name suffixed by "New". This new function +-- creates a new image, based on a source image, and calls the previous function +-- with this new image. +-- We assume here that the functions returns only one parameter or none. + +local function OneSourceOneDest (funcname, width, height, color_space, data_type) + local func = im[funcname] + assert(func) -- see if function is really defined + + -- define function with "New" suffix + im[funcname.."New"] = function (src_image, ...) + -- create destination image + local dst_image = im.ImageCreateBased(src_image, width, height, color_space, data_type) + + -- call previous method, repassing all parameters + local ret = func(src_image, dst_image, unpack(arg)) + if (ret) then + return ret, dst_image + else + return dst_image + end + end +end + +------------------------------------------------------------------------------- +-- This function is similar to OneSourceOneDest, but it receives two source +-- images. + +local function TwoSourcesOneDest (funcname, width, height, color_space, data_type) + local func = im[funcname] + + -- see if function is really defined + assert(func, string.format("undefined function `%s'", funcname)) + + -- define function with "New" suffix + im[funcname.."New"] = function (src_image1, src_image2, ...) + -- create destination image + local dst_image = im.ImageCreateBased(src_image1, width, height, color_space, data_type) + + -- call previous method, repassing all parameters + local ret = func(src_image1, src_image2, dst_image, unpack(arg)) + if (ret) then + return ret, dst_image + else + return dst_image + end + end +end + +------------------------------------------------------------------------------- + +TwoSourcesOneDest("ProcessCrossCorrelation") +OneSourceOneDest("ProcessAutoCorrelation", nil, nil, nil, im.CFLOAT) +OneSourceOneDest("ProcessFFT") +OneSourceOneDest("ProcessIFFT") diff --git a/im/src/lua5/im_image.lua b/im/src/lua5/im_image.lua new file mode 100755 index 0000000..5eb9fd4 --- /dev/null +++ b/im/src/lua5/im_image.lua @@ -0,0 +1,24 @@ +-- If all parameteres, besides the image, are nil, this is equivalent to image:Clone. +-- If any parameter is not nil, then the value is used instead of the one from the source image. +-- If a parameter is a function, then the function is called, passing the source +-- image as parameter, to obtain the substituion value. + +function im.ImageCreateBased(image, width, height, color_space, data_type) + -- default values are those of the source image + width = width or image:Width() + height = height or image:Height() + color_space = color_space or image:ColorSpace() + data_type = data_type or image:DataType() + + -- callback to calculate parameters based on source image + if type(width) == "function" then width = width(image) end + if type(height) == "function" then height = height(image) end + if type(color_space) == "function" then color_space = color_space(image) end + if type(data_type) == "function" then data_type = data_type(image) end + + -- create a new image + local new_image = im.ImageCreate(width, height, color_space, data_type) + image:CopyAttributes(new_image) + if (image:HasAlpha()) then new_image:AddAlpha() end + return new_image +end diff --git a/im/src/lua5/im_process.lua b/im/src/lua5/im_process.lua new file mode 100755 index 0000000..d74c6b1 --- /dev/null +++ b/im/src/lua5/im_process.lua @@ -0,0 +1,329 @@ + +------------------------------------------------------------------------------- +-- Creates a new function, with the name suffixed by "New". This new function +-- creates a new image, based on a source image, and calls the previous function +-- with this new image. +-- We assume here that the functions returns only one parameter or none. + +local function OneSourceOneDest (funcname, width, height, color_space, data_type) + local func = im[funcname] + assert(func) -- see if function is really defined + + -- define function with "New" suffix + im[funcname.."New"] = function (src_image, ...) + -- create destination image + local dst_image = im.ImageCreateBased(src_image, width, height, color_space, data_type) + + -- call previous method, repassing all parameters + local ret = func(src_image, dst_image, unpack(arg)) + if (ret) then + return ret, dst_image + else + return dst_image + end + end +end + +------------------------------------------------------------------------------- +-- This function is similar to OneSourceOneDest, but it receives two source +-- images. + +local function TwoSourcesOneDest (funcname, width, height, color_space, data_type) + local func = im[funcname] + + -- see if function is really defined + assert(func, string.format("undefined function `%s'", funcname)) + + -- define function with "New" suffix + im[funcname.."New"] = function (src_image1, src_image2, ...) + -- create destination image + local dst_image = im.ImageCreateBased(src_image1, width, height, color_space, data_type) + + -- call previous method, repassing all parameters + local ret = func(src_image1, src_image2, dst_image, unpack(arg)) + if (ret) then + return ret, dst_image + else + return dst_image + end + end +end + +------------------------------------------------------------------------------- +-- This function is similar to OneSourceOneDest, but it receives three source +-- images. + +local function ThreeSourcesOneDest (funcname, width, height, color_space, data_type) + local func = im[funcname] + assert(func) -- see if function is really defined + + -- define function with "New" suffix + im[funcname.."New"] = function (src_image1, src_image2, src_image3, ...) + -- create destination image + local dst_image = im.ImageCreateBased(src_image1, width, height, color_space, data_type) + + -- call previous method, repassing all parameters + local ret = func(src_image1, src_image2, src_image3, dst_image, unpack(arg)) + if (ret) then + return ret, dst_image + else + return dst_image + end + end +end + +------------------------------------------------------------------------------- +-- This function is similar to OneSourceOneDest, but it creates two destiny +-- images. + +local function OneSourceTwoDests (funcname, width, height, color_space, data_type) + local func = im[funcname] + assert(func) -- see if function is really defined + + -- define function with "New" suffix + im[funcname.."New"] = function (src_image, ...) + -- create destination image + local dst_image1 = im.ImageCreateBased(src_image, width, height, color_space, data_type) + local dst_image2 = im.ImageCreateBased(src_image, width, height, color_space, data_type) + + -- call previous method, repassing all parameters + local ret = func(src_image, dst_image1, dst_image2, unpack(arg)) + if (ret) then + return ret, dst_image1, dst_image2 + else + return dst_image1, dst_image2 + end + end +end + +------------------------------------------------------------------------------- +-- This function is similar to OneSourceOneDest, but it creates three destiny +-- images. + +local function OneSourceThreeDests (funcname, width, height, color_space, data_type) + local func = im[funcname] + assert(func) -- see if function is really defined + + -- define function with "New" suffix + im[funcname.."New"] = function (src_image, ...) + -- create destination image + local dst_image1 = im.ImageCreateBased(src_image, width, height, color_space, data_type) + local dst_image2 = im.ImageCreateBased(src_image, width, height, color_space, data_type) + local dst_image3 = im.ImageCreateBased(src_image, width, height, color_space, data_type) + + -- call previous method, repassing all parameters + local ret = func(src_image, dst_image1, dst_image2, dst_image3, unpack(arg)) + if (ret) then + return ret, dst_image1, dst_image2, dst_image3 + else + return dst_image1, dst_image2, dst_image3 + end + end +end + +------------------------------------------------------------------------------- + +local function hough_height(image) + local function sqr(x) return x*x end + local rmax = math.sqrt(sqr(image:Width()) + sqr(image:Height())) / 2 + return 2*rmax+1 +end + +OneSourceOneDest("AnalyzeFindRegions", nil, nil, nil, im.USHORT) +OneSourceOneDest("ProcessPerimeterLine") +OneSourceOneDest("ProcessRemoveByArea") +OneSourceOneDest("ProcessFillHoles") +OneSourceOneDest("ProcessHoughLines", 180, hough_height, im.GRAY, im.INT) +OneSourceOneDest("ProcessHoughLinesDraw") +OneSourceOneDest("ProcessDistanceTransform", nil, nil, nil, im.FLOAT) +OneSourceOneDest("ProcessRegionalMaximum", nil, nil, im.BINARY, nil) + +function im.ProcessReduceNew (src_image, width, height) + local dst_image = im.ImageCreateBased(src_image, width, height) + return im.ProcessReduce(src_image, dst_image), dst_image +end + +function im.ProcessResizeNew (src_image, width, height) + local dst_image = im.ImageCreateBased(src_image, width, height) + return im.ProcessResize(src_image, dst_image), dst_image +end + +OneSourceOneDest("ProcessReduceBy4", function (image) return image:Width() / 2 end, + function (image) return image:Height() / 2 end) + +function im.ProcessCropNew (src_image, xmin, xmax, ymin, ymax) + local width = xmax - xmin + 1 + local height = ymax - ymin + 1 + local dst_image = im.ImageCreateBased(src_image, width, height) + im.ProcessCrop(src_image, dst_image, xmin, ymin) + return dst_image +end + +TwoSourcesOneDest("ProcessInsert") + +function im.ProcessAddMarginsNew (src_image, xmin, xmax, ymin, ymax) + local width = xmax - xmin + 1 + local height = ymax - ymin + 1 + local dst_image = im.ImageCreateBased(src_image, width, height) + im.ProcessAddMargins(src_image, dst_image, xmin, ymin) + return dst_image +end + +function im.ProcessRotateNew (src_image, cos0, sin0, order) + local width, height = im.ProcessCalcRotateSize(src_image:Width(), src_image:Height(), cos0, sin0) + local dst_image = im.ImageCreateBased(src_image, width, height) + return im.ProcessRotate(src_image, dst_image, cos0, sin0, order), dst_image +end + +OneSourceOneDest("ProcessRotateRef") +OneSourceOneDest("ProcessRotate90", function (image) return image:Height() end, function (image) return image:Width() end) +OneSourceOneDest("ProcessRotate180") +OneSourceOneDest("ProcessMirror") +OneSourceOneDest("ProcessFlip") +OneSourceOneDest("ProcessRadial") +OneSourceOneDest("ProcessGrayMorphConvolve") +OneSourceOneDest("ProcessGrayMorphErode") +OneSourceOneDest("ProcessGrayMorphDilate") +OneSourceOneDest("ProcessGrayMorphOpen") +OneSourceOneDest("ProcessGrayMorphClose") +OneSourceOneDest("ProcessGrayMorphTopHat") +OneSourceOneDest("ProcessGrayMorphWell") +OneSourceOneDest("ProcessGrayMorphGradient") +OneSourceOneDest("ProcessBinMorphConvolve") +OneSourceOneDest("ProcessBinMorphErode") +OneSourceOneDest("ProcessBinMorphDilate") +OneSourceOneDest("ProcessBinMorphOpen") +OneSourceOneDest("ProcessBinMorphClose") +OneSourceOneDest("ProcessBinMorphOutline") +OneSourceOneDest("ProcessBinMorphThin") +OneSourceOneDest("ProcessMedianConvolve") +OneSourceOneDest("ProcessRangeConvolve") +OneSourceOneDest("ProcessRankClosestConvolve") +OneSourceOneDest("ProcessRankMaxConvolve") +OneSourceOneDest("ProcessRankMinConvolve") +OneSourceOneDest("ProcessConvolve") +OneSourceOneDest("ProcessConvolveSep") +OneSourceOneDest("ProcessConvolveRep") +OneSourceOneDest("ProcessConvolveDual") +OneSourceOneDest("ProcessCompassConvolve") +OneSourceOneDest("ProcessMeanConvolve") +OneSourceOneDest("ProcessGaussianConvolve") +OneSourceOneDest("ProcessBarlettConvolve") +OneSourceTwoDests("ProcessInterlaceSplit", nil, function (image) if (image:Height()) then return image:Height() else return image:Height()/2 end end) + +function im.ProcessInterlaceSplitNew(src_image) + -- create destination image + local dst_height1 = src_image:Height()/2 + if math.mod(src_image:Height(), 2) then + dst_height1 = dst_height1 + 1 + end + + local dst_image1 = im.ImageCreateBased(src_image, nil, dst_height1) + local dst_image2 = im.ImageCreateBased(src_image, nil, src_image:Height()/2) + + -- call method, repassing all parameters + im.ProcessInterlaceSplit(src_image, dst_image1, dst_image2) + return dst_image1, dst_image2 +end + +local function int_datatype (image) + local data_type = image:DataType() + if data_type == im.BYTE or data_type == im.USHORT then + data_type = im.INT + end + return data_type +end + +OneSourceOneDest("ProcessDiffOfGaussianConvolve", nil, nil, nil, int_datatype) +OneSourceOneDest("ProcessLapOfGaussianConvolve", nil, nil, nil, int_datatype) +OneSourceOneDest("ProcessSobelConvolve") +OneSourceOneDest("ProcessSplineEdgeConvolve") +OneSourceOneDest("ProcessPrewittConvolve") +OneSourceOneDest("ProcessZeroCrossing") +OneSourceOneDest("ProcessCanny") +OneSourceOneDest("ProcessUnArithmeticOp") +TwoSourcesOneDest("ProcessArithmeticOp") +OneSourceOneDest("ProcessUnsharp") +OneSourceOneDest("ProcessSharp") +TwoSourcesOneDest("ProcessSharpKernel") + +function im.ProcessArithmeticConstOpNew (src_image, src_const, op) + local dst_image = im.ImageCreateBased(src_image) + im.ProcessArithmeticConstOp(src_image, src_const, dst_image, op) + return dst_image +end + +TwoSourcesOneDest("ProcessBlendConst") +ThreeSourcesOneDest("ProcessBlend") +OneSourceTwoDests("ProcessSplitComplex") +TwoSourcesOneDest("ProcessMergeComplex", nil, nil, nil, im.CFLOAT) + +function im.ProcessMultipleMeanNew (src_image_list, dst_image) + local dst_image = im.ImageCreateBased(src_image_list[1]) + im.ProcessMultipleMean(src_image_list, dst_image) + return dst_image +end + +function im.ProcessMultipleStdDevNew (src_image_list, mean_image) + local dst_image = im.ImageCreateBased(src_image_list[1]) + im.ProcessMultipleStdDev(src_image_list, mean_image, dst_image) + return dst_image +end + +TwoSourcesOneDest("ProcessAutoCovariance") +OneSourceOneDest("ProcessMultiplyConj") +OneSourceOneDest("ProcessQuantizeRGBUniform", nil, nil, im.MAP, nil) +OneSourceOneDest("ProcessQuantizeGrayUniform") +OneSourceOneDest("ProcessExpandHistogram") +OneSourceOneDest("ProcessEqualizeHistogram") + +function im.ProcessSplitYChromaNew (src_image) + local y_image = im.ImageCreateBased(src_image, nil, nil, im.GRAY, im.BYTE) + local chroma_image = im.ImageCreateBased(src_image, nil, nil, im.RGB, im.BYTE) + im.ProcessSplitYChroma(src_image, y_image, chroma_image) + return y_image, chroma_image +end + +OneSourceThreeDests("ProcessSplitHSI", nil, nil, im.GRAY, im.FLOAT) +ThreeSourcesOneDest("ProcessMergeHSI", nil, nil, im.RGB, im.BYTE) + +function im.ProcessSplitComponentsNew (src_image) + local depth = src_image:Depth() + local dst_images = {} + for i = 1, depth do + table.insert(dst_images, im.ImageCreateBased(src_image, nil, nil, im.GRAY)) + end + im.ProcessSplitComponents(src_image, dst_images) + return unpack(dst_images) +end + +function im.ProcessMergeComponentsNew (src_image_list) + local dst_image = im.ImageCreateBased(src_image_list[1], nil, nil, im.RGB) + im.ProcessMergeComponents(src_image_list, dst_image) + return dst_image +end + +OneSourceOneDest("ProcessNormalizeComponents", nil, nil, nil, im.FLOAT) +OneSourceOneDest("ProcessReplaceColor") +TwoSourcesOneDest("ProcessBitwiseOp") +OneSourceOneDest("ProcessBitwiseNot") +OneSourceOneDest("ProcessBitMask") +OneSourceOneDest("ProcessBitPlane") +OneSourceOneDest("ProcessToneGamut") +OneSourceOneDest("ProcessUnNormalize", nil, nil, nil, im.BYTE) +OneSourceOneDest("ProcessDirectConv", nil, nil, nil, im.BYTE) +OneSourceOneDest("ProcessNegative") +OneSourceOneDest("ProcessRangeContrastThreshold", nil, nil, im.BINARY, nil) +OneSourceOneDest("ProcessLocalMaxThreshold", nil, nil, im.BINARY, nil) +OneSourceOneDest("ProcessThreshold", nil, nil, im.BINARY, nil) +TwoSourcesOneDest("ProcessThresholdByDiff") +OneSourceOneDest("ProcessHysteresisThreshold", nil, nil, im.BINARY, nil) +OneSourceOneDest("ProcessUniformErrThreshold", nil, nil, im.BINARY, nil) +OneSourceOneDest("ProcessDifusionErrThreshold") +OneSourceOneDest("ProcessPercentThreshold") +OneSourceOneDest("ProcessOtsuThreshold") +OneSourceOneDest("ProcessMinMaxThreshold", nil, nil, im.BINARY, nil) +OneSourceOneDest("ProcessSliceThreshold", nil, nil, im.BINARY, nil) +OneSourceOneDest("ProcessPixelate") +OneSourceOneDest("ProcessPosterize") + diff --git a/im/src/lua5/imlua.c b/im/src/lua5/imlua.c new file mode 100755 index 0000000..7e5c328 --- /dev/null +++ b/im/src/lua5/imlua.c @@ -0,0 +1,252 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua.c,v 1.2 2008/12/11 19:02:49 scuri Exp $ + */ + +#include +#include +#include + +#include "im.h" +#include "im_lib.h" +#include "im_image.h" +#include "im_convert.h" + +#include +#include + +#include "imlua.h" +#include "imlua_aux.h" +#include "imlua_image.h" +#include "imlua_palette.h" + +/*****************************************************************************\ + im.Version() +\*****************************************************************************/ +static int imluaVersion (lua_State *L) +{ + lua_pushstring(L, imVersion()); + return 1; +} + +/*****************************************************************************\ + im.VersionDate() +\*****************************************************************************/ +static int imluaVersionDate (lua_State *L) +{ + lua_pushstring(L, imVersionDate()); + return 1; +} + +/*****************************************************************************\ + im.VersionNumber() +\*****************************************************************************/ +static int imluaVersionNumber (lua_State *L) +{ + lua_pushnumber(L, imVersionNumber()); + return 1; +} + +/*****************************************************************************\ + im.FormatList() +\*****************************************************************************/ +static int imluaFormatList (lua_State *L) +{ + int i, format_count; + char *format_list[50]; + + imFormatList(format_list, &format_count); + + lua_newtable(L); + for (i = 0; i < format_count; i++) + { + lua_pushstring(L, format_list[i]); + lua_settable(L, -2); + } + + return 1; +} + +/*****************************************************************************\ + im.FormatInfo(format) +\*****************************************************************************/ +static int imluaFormatInfo (lua_State *L) +{ + char desc[50]; + char ext[50]; + int can_sequence; + int error; + + error = imFormatInfo(luaL_checkstring(L, 1), desc, ext, &can_sequence); + + imlua_pusherror(L, error); + if (error) + return 1; + + lua_pushstring(L, desc); + lua_pushstring(L, ext); + lua_pushboolean(L, can_sequence); + + return 4; +} + +/*****************************************************************************\ + im.FormatCompressions(format) +\*****************************************************************************/ +static int imluaFormatCompressions (lua_State *L) +{ + int i, comp_count; + int error; + char *comp[50]; + + int color_mode = luaL_optint(L, 2, -1); + int data_type = luaL_optint(L, 3, -1); + + error = imFormatCompressions(luaL_checkstring(L, 1), comp, &comp_count, color_mode, data_type); + + imlua_pusherror(L, error); + if (error) + return 1; + + lua_newtable(L); + for (i = 0; i < comp_count; i++) + { + lua_pushstring(L, comp[i]); + lua_settable(L, -2); + } + + return 2; +} + +/*****************************************************************************\ + im.FormatCanWriteImage(format, compression, color_mode, data_type) +\*****************************************************************************/ +static int imluaFormatCanWriteImage (lua_State *L) +{ + const char *format = luaL_checkstring(L, 1); + const char *compression = luaL_checkstring(L, 2); + int color_mode = luaL_checkint(L, 3); + int data_type = luaL_checkint(L, 4); + + lua_pushboolean(L, imFormatCanWriteImage(format, compression, color_mode, data_type)); + return 1; +} + +/*****************************************************************************\ + Constants +\*****************************************************************************/ +static const imlua_constant im_constants[] = { + + { "BYTE", IM_BYTE, NULL }, + { "USHORT", IM_USHORT, NULL }, + { "INT", IM_INT, NULL }, + { "FLOAT", IM_FLOAT, NULL }, + { "CFLOAT", IM_CFLOAT, NULL }, + + { "RGB", IM_RGB, NULL }, + { "MAP", IM_MAP, NULL }, + { "GRAY", IM_GRAY, NULL }, + { "BINARY", IM_BINARY, NULL }, + { "CMYK", IM_CMYK, NULL }, + { "YCBCR", IM_YCBCR, NULL }, + { "LAB", IM_LAB, NULL }, + { "LUV", IM_LUV, NULL }, + { "XYZ", IM_XYZ, NULL }, + + { "ALPHA", IM_ALPHA, NULL }, + { "PACKED", IM_PACKED, NULL }, + { "TOPDOWN", IM_TOPDOWN, NULL }, + + { "ERR_NONE", IM_ERR_NONE, NULL }, + { "ERR_OPEN", IM_ERR_OPEN, NULL }, + { "ERR_ACCESS", IM_ERR_ACCESS, NULL }, + { "ERR_FORMAT", IM_ERR_FORMAT, NULL }, + { "ERR_DATA", IM_ERR_DATA, NULL }, + { "ERR_COMPRESS", IM_ERR_COMPRESS, NULL }, + { "ERR_MEM", IM_ERR_MEM, NULL }, + { "ERR_COUNTER", IM_ERR_COUNTER, NULL }, + + { "CPX_REAL", IM_CPX_REAL, NULL }, + { "CPX_IMAG", IM_CPX_IMAG, NULL }, + { "CPX_MAG", IM_CPX_MAG, NULL }, + { "CPX_PHASE", IM_CPX_PHASE, NULL }, + + { "GAMMA_LINEAR", IM_GAMMA_LINEAR, NULL }, + { "GAMMA_LOGLITE", IM_GAMMA_LOGLITE, NULL }, + { "GAMMA_LOGHEAVY", IM_GAMMA_LOGHEAVY, NULL }, + { "GAMMA_EXPLITE", IM_GAMMA_EXPLITE, NULL }, + { "GAMMA_EXPHEAVY", IM_GAMMA_EXPHEAVY, NULL }, + + { "CAST_MINMAX", IM_CAST_MINMAX, NULL }, + { "CAST_FIXED", IM_CAST_FIXED, NULL }, + { "CAST_DIRECT", IM_CAST_DIRECT, NULL }, + + { "_AUTHOR", 0, IM_AUTHOR }, + { "_COPYRIGHT", 0, IM_COPYRIGHT }, + { "_VERSION_DATE", 0, IM_VERSION_DATE }, + { "_DESCRIPTION", 0, IM_DESCRIPTION }, + { "_NAME", 0, IM_NAME }, + + { NULL, -1, NULL }, +}; + +void imlua_regconstants (lua_State *L, const imlua_constant *imconst) +{ + const imlua_constant *l = imconst; + for (; l->name; l++) + { + lua_pushstring(L, l->name); + if (l->str_value) + lua_pushstring(L, l->str_value); + else + lua_pushnumber(L, l->value); + lua_settable(L, -3); + } + + lua_pushstring(L, "_VERSION"); + lua_pushstring(L, imVersion()); + lua_settable(L, -3); + + lua_pushstring(L, "_VERSION_NUMBER"); + lua_pushnumber(L, imVersionNumber()); + lua_settable(L, -3); +} + +static const luaL_reg im_lib[] = { + {"Version", imluaVersion}, + {"VersionDate", imluaVersionDate}, + {"VersionNumber", imluaVersionNumber}, + + {"FormatList", imluaFormatList}, + {"FormatInfo", imluaFormatInfo}, + {"FormatCompressions", imluaFormatCompressions}, + {"FormatCanWriteImage", imluaFormatCanWriteImage}, + + {NULL, NULL} +}; + +int imlua_open (lua_State *L) +{ + luaL_register(L, "im", im_lib); /* leave "im" table at the top of the stack */ + imlua_regconstants(L, im_constants); + + imlua_open_file(L); + imlua_open_image(L); + imlua_open_convert(L); + imlua_open_util(L); + imlua_open_palette(L); + + return 1; +} + +int luaopen_imlua(lua_State *L) +{ + return imlua_open(L); +} + +int luaopen_imlua51(lua_State *L) +{ + return imlua_open(L); +} diff --git a/im/src/lua5/imlua.def b/im/src/lua5/imlua.def new file mode 100755 index 0000000..259c822 --- /dev/null +++ b/im/src/lua5/imlua.def @@ -0,0 +1,24 @@ +EXPORTS + luaopen_imlua + luaopen_imlua51 + imlua_open + imlua_checkimage + imlua_newarrayulong + imlua_newarrayint + imlua_newarrayfloat + imlua_checkdatatype + imlua_checkcolorspace + imlua_toarrayint + imlua_toarrayfloat + imlua_toarrayulong + imlua_getn + imlua_checktype + imlua_checkmask + imlua_regconstants + imlua_pushimage + imlua_matchcolor + imlua_matchsize + imlua_matchdatatype + imlua_matchcolorspace + imlua_match + \ No newline at end of file diff --git a/im/src/lua5/imlua_aux.c b/im/src/lua5/imlua_aux.c new file mode 100755 index 0000000..e472dca --- /dev/null +++ b/im/src/lua5/imlua_aux.c @@ -0,0 +1,256 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_aux.c,v 1.2 2009/08/04 21:35:26 scuri Exp $ + */ + +#include +#include +#include + +#include "im.h" +#include "im_image.h" +#include "im_util.h" + +#include +#include + +#include "imlua.h" +#include "imlua_aux.h" +#include "imlua_image.h" + + +/*****************************************************************************\ +\*****************************************************************************/ +int imlua_getn (lua_State *L, int index) +{ + int n; + lua_pushstring(L, "table"); + lua_gettable(L, LUA_GLOBALSINDEX); + lua_pushstring(L, "getn"); + lua_gettable(L, -2); + lua_pushvalue(L, index); + lua_call(L, 1, 1); + n = luaL_checkint(L, -1); + lua_pop(L, 2); + return n; +} + +/*****************************************************************************\ + Creates an int array. +\*****************************************************************************/ +int imlua_newarrayint (lua_State *L, int *value, int count, int start) +{ + int i; + lua_newtable(L); + for (i = 0; i < count; i++) + { + lua_pushnumber(L, value[i]); + lua_rawseti(L, -2, i+start); + } + return 1; +} + +/*****************************************************************************\ + Creates an unsigned long array. +\*****************************************************************************/ +int imlua_newarrayulong (lua_State *L, unsigned long *value, int count, int start) +{ + int i; + lua_newtable(L); + for (i = 0; i < count; i++) + { + lua_pushnumber(L, value[i]); + lua_rawseti(L, -2, i+start); + } + return 1; +} + +/*****************************************************************************\ + Creates a float array. +\*****************************************************************************/ +int imlua_newarrayfloat (lua_State *L, float *value, int count, int start) +{ + int i; + lua_newtable(L); + for (i = 0; i < count; i++) + { + lua_pushnumber(L, value[i]); + lua_rawseti(L, -2, i+start); + } + return 1; +} + +/*****************************************************************************\ + Retrieve an int array. +\*****************************************************************************/ +int *imlua_toarrayint (lua_State *L, int index, int *count, int start) +{ + int i, n; + int *value = NULL; + + if (lua_istable(L, index)) + { + n = imlua_getn(L, index); + if (start == 0) n++; + if (count) *count = n; + + value = (int*) malloc (sizeof(int) * n); + for (i = 0; i < n; i++) + { + lua_rawgeti(L, index, i+start); + value[i] = luaL_checkint(L, -1); + lua_pop(L, 1); + } + } + return value; +} + +/*****************************************************************************\ + Retrieve an ulong array. +\*****************************************************************************/ +unsigned long *imlua_toarrayulong (lua_State *L, int index, int *count, int start) +{ + int i, n; + unsigned long *value = NULL; + + if (lua_istable(L, index)) + { + n = imlua_getn(L, index); + if (start == 0) n++; + if (count) *count = n; + + value = (unsigned long*) malloc (sizeof(unsigned long) * n); + for (i = 0; i < n; i++) + { + lua_rawgeti(L, index, i+start); + value[i] = luaL_checkint(L, -1); + lua_pop(L, 1); + } + } + return value; +} + +/*****************************************************************************\ + Retrieve a float array. +\*****************************************************************************/ +float *imlua_toarrayfloat (lua_State *L, int index, int *count, int start) +{ + int i, n; + float *value = NULL; + + if (lua_istable(L, index)) + { + n = imlua_getn(L, index); + if (start == 0) n++; + if (count) *count = n; + + value = (float*) malloc (sizeof(float) * n); + for (i = 0; i < n; i++) + { + lua_rawgeti(L, index, i+start); + value[i] = (float) luaL_checknumber(L, -1); + lua_pop(L, 1); + } + } + return value; +} + + +/*****************************************************************************\ + Creates a bit mask based on a string formatted as "11000110". +\*****************************************************************************/ +unsigned char imlua_checkmask (lua_State *L, int index) +{ + int i; + unsigned char mask = 0; + const char *str = luaL_checkstring(L, index); + if (strlen(str) != 8) + luaL_argerror(L, index, "invalid mask, must have 8 elements"); + + for (i = 0; i < 8; i++) + { + char c = str[i]; + if (c != '0' && c != '1') + luaL_argerror(L, index, "invalid mask, must have 0s or 1s only"); + + mask |= (c - '0') << (7 - i); + } + + return mask; +} + +/*****************************************************************************\ + Checks data_type and color_space of an image. If it doesn't match throw a lua error. +\*****************************************************************************/ +void imlua_checktype (lua_State *L, int index, imImage *image, int color_space, int data_type) +{ + if (image->data_type != data_type) + { + char msg[100] = "image data type must be "; + strcat(msg, imDataTypeName(data_type)); + luaL_argerror(L, index, msg); + } + + if (image->color_space != color_space) + { + char msg[100] = "image color space must be "; + strcat(msg, imColorModeSpaceName(color_space)); + luaL_argerror(L, index, msg); + } +} + +/*****************************************************************************\ + Checks color_space of an image. If it doesn't match throw a lua error. +\*****************************************************************************/ +void imlua_checkcolorspace (lua_State *L, int index, imImage *image, int color_space) +{ + if (image->color_space != color_space) + { + char msg[100] = "image color space must be "; + strcat(msg, imColorModeSpaceName(color_space)); + luaL_argerror(L, index, msg); + } +} + +/*****************************************************************************\ + Checks a data_type of an image. If it doesn't match throw a lua error. +\*****************************************************************************/ +void imlua_checkdatatype (lua_State *L, int index, imImage *image, int data_type) +{ + if (image->data_type != data_type) + { + char msg[100] = "image data type must be "; + strcat(msg, imDataTypeName(data_type)); + luaL_argerror(L, index, msg); + } +} + +/*****************************************************************************\ + Checks if the size of the two images are equal. If it doesn't match throw a lua error. +\*****************************************************************************/ +void imlua_matchsize(lua_State *L, imImage *image1, imImage *image2) +{ + imlua_matchcheck(L, imImageMatchSize(image1, image2), "images must have the same size"); +} + +void imlua_matchcolor(lua_State *L, imImage *image1, imImage *image2) +{ + imlua_matchcheck(L, imImageMatchColor(image1, image2), "images must have the same data type and color space"); +} + +void imlua_matchdatatype(lua_State *L, imImage *image1, imImage *image2) +{ + imlua_matchcheck(L, imImageMatchDataType(image1, image2), "images must have the same size and data type"); +} + +void imlua_matchcolorspace(lua_State *L, imImage *image1, imImage *image2) +{ + imlua_matchcheck(L, imImageMatchColorSpace(image1, image2), "images must have the same size and color space"); +} + +void imlua_match(lua_State *L, imImage *image1, imImage *image2) +{ + imlua_matchcheck(L, imImageMatch(image1, image2), "images must have the same size, data type and color space"); +} diff --git a/im/src/lua5/imlua_aux.h b/im/src/lua5/imlua_aux.h new file mode 100755 index 0000000..2dc4466 --- /dev/null +++ b/im/src/lua5/imlua_aux.h @@ -0,0 +1,82 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_aux.h,v 1.1 2008/10/17 06:16:32 scuri Exp $ + */ + +#ifndef __IMLUA_AUX_H +#define __IMLUA_AUX_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/********************************/ +/* exported from "imlua_aux.c". */ +/********************************/ + +/* get table size */ + +int imlua_getn(lua_State *L, int index); + +/* array */ + +int imlua_newarrayint(lua_State *L, int *value, int count, int start); +int imlua_newarrayulong(lua_State *L, unsigned long *value, int count, int start); +int imlua_newarrayfloat(lua_State *L, float *value, int count, int start); + +int *imlua_toarrayint(lua_State *L, int index, int *count, int start); +unsigned long *imlua_toarrayulong (lua_State *L, int index, int *count, int start); +float *imlua_toarrayfloat(lua_State *L, int index, int *count, int start); + +/* other parameter checking */ + +unsigned char imlua_checkmask(lua_State *L, int index); + +void imlua_checktype(lua_State *L, int index, imImage *image, int color_space, int data_type); +void imlua_checkdatatype(lua_State *L, int index, imImage *image, int data_type); +void imlua_checkcolorspace(lua_State *L, int index, imImage *image, int color_space); + +void imlua_matchsize(lua_State *L, imImage *image1, imImage *image2); +void imlua_matchcolor(lua_State *L, imImage *image1, imImage *image2); +void imlua_matchdatatype(lua_State *L, imImage *image1, imImage *image2); +void imlua_matchcolorspace(lua_State *L, imImage *image1, imImage *image2); +void imlua_match(lua_State *L, imImage *image1, imImage *image2); + +/* used only when comparing two images */ +#define imlua_matchcheck(L, cond, extramsg) if (!(cond)) \ + luaL_error(L, extramsg) + +#define imlua_pusherror(L, _e) ((_e == IM_ERR_NONE)? lua_pushnil(L): lua_pushnumber(L, _e)) + + +/********************************/ +/* exported from "imlua.c". */ +/********************************/ + +/* constant registration. */ + +typedef struct _imlua_constant { + const char *name; + lua_Number value; + const char *str_value; +} imlua_constant; + +void imlua_regconstants(lua_State *L, const imlua_constant *imconst); + + +/********************************/ +/* private module open */ +/********************************/ + +void imlua_open_convert(lua_State *L); /* imlua_convert.c */ +void imlua_open_util(lua_State *L); /* imlua_util.c */ +void imlua_open_file(lua_State *L); /* imlua_file.c */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/im/src/lua5/imlua_avi.c b/im/src/lua5/imlua_avi.c new file mode 100755 index 0000000..f2cd7f4 --- /dev/null +++ b/im/src/lua5/imlua_avi.c @@ -0,0 +1,44 @@ +/** \file + * \brief AVI format Lua 5 Binding + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "im_format_avi.h" + +#include +#include + + +static int imlua_FormatRegisterAVI(lua_State *L) +{ + (void)L; + imFormatRegisterAVI(); + return 0; +} + +static const struct luaL_reg imlib[] = { + {"FormatRegisterAVI", imlua_FormatRegisterAVI}, + {NULL, NULL}, +}; + + +static int imlua_avi_open (lua_State *L) +{ + imFormatRegisterAVI(); + luaL_register(L, "im", imlib); /* leave "im" table at the top of the stack */ + return 1; +} + +int luaopen_imlua_avi(lua_State* L) +{ + return imlua_avi_open(L); +} + +int luaopen_imlua_avi51(lua_State* L) +{ + return imlua_avi_open(L); +} diff --git a/im/src/lua5/imlua_avi.def b/im/src/lua5/imlua_avi.def new file mode 100755 index 0000000..3086a0d --- /dev/null +++ b/im/src/lua5/imlua_avi.def @@ -0,0 +1,4 @@ +EXPORTS + luaopen_imlua_avi + luaopen_imlua_avi51 + \ No newline at end of file diff --git a/im/src/lua5/imlua_capture.c b/im/src/lua5/imlua_capture.c new file mode 100755 index 0000000..59ec0fb --- /dev/null +++ b/im/src/lua5/imlua_capture.c @@ -0,0 +1,443 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_capture.c,v 1.2 2009/08/12 04:09:17 scuri Exp $ + */ + +#include +#include + +#include "im.h" +#include "im_image.h" +#include "im_capture.h" + +#include +#include + +#include "imlua.h" +#include "imlua_aux.h" +#include "imlua_image.h" + + + +static imVideoCapture** imlua_rawcheckvideocapture (lua_State *L, int param) +{ + return (imVideoCapture**)luaL_checkudata(L, param, "imVideoCapture"); +} + +static imVideoCapture* imlua_checkvideocapture (lua_State *L, int param) +{ + imVideoCapture** vc_p = imlua_rawcheckvideocapture(L, param); + + if (!(*vc_p)) + luaL_argerror(L, param, "destroyed imVideoCapture"); + + return *vc_p; +} + +static void imlua_pushvideocapture(lua_State *L, imVideoCapture* vc) +{ + if (!vc) + lua_pushnil(L); + else + { + imVideoCapture** vc_p = (imVideoCapture**) lua_newuserdata(L, sizeof(imVideoCapture*)); + *vc_p = vc; + luaL_getmetatable(L, "imVideoCapture"); + lua_setmetatable(L, -2); + } +} + +/*****************************************************************************\ + im.VideoCaptureDeviceCount() +\*****************************************************************************/ +static int imluaVideoCaptureDeviceCount (lua_State *L) +{ + lua_pushnumber(L, imVideoCaptureDeviceCount()); + return 1; +} + +/*****************************************************************************\ + im.VideoCaptureDeviceDesc(device) +\*****************************************************************************/ +static int imluaVideoCaptureDeviceDesc (lua_State *L) +{ + lua_pushstring(L, imVideoCaptureDeviceDesc(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.VideoCaptureDeviceDesc(device) +\*****************************************************************************/ +static int imluaVideoCaptureReloadDevices (lua_State *L) +{ + lua_pushnumber(L, imVideoCaptureReloadDevices()); + return 1; +} + +/*****************************************************************************\ + im.VideoCaptureCreate() +\*****************************************************************************/ +static int imluaVideoCaptureCreate (lua_State *L) +{ + imlua_pushvideocapture(L, imVideoCaptureCreate()); + return 1; +} + +/*****************************************************************************\ + vc:Connect([device]) +\*****************************************************************************/ +static int imluaVideoCaptureConnect (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + int device = luaL_optint(L, 2, -1); + if (device == -1) + lua_pushnumber(L, imVideoCaptureConnect(vc, device)); + else + lua_pushboolean(L, imVideoCaptureConnect(vc, device)); + return 1; +} + +/*****************************************************************************\ + vc:Disconnect() +\*****************************************************************************/ +static int imluaVideoCaptureDisconnect (lua_State *L) +{ + imVideoCaptureDisconnect(imlua_checkvideocapture(L, 1)); + return 0; +} + +/*****************************************************************************\ + vc:DialogCount() +\*****************************************************************************/ +static int imluaVideoCaptureDialogCount (lua_State *L) +{ + lua_pushnumber(L, imVideoCaptureDialogCount(imlua_checkvideocapture(L, 1))); + return 1; +} + +/*****************************************************************************\ + vc:ShowDialog() +\*****************************************************************************/ +static int imluaVideoCaptureShowDialog (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + int dialog = luaL_checkint(L, 2); + void *parent = lua_touserdata(L, 3); + + lua_pushboolean(L, imVideoCaptureShowDialog(vc, dialog, parent)); + return 1; +} + +/*****************************************************************************\ + vc:DialogDesc() +\*****************************************************************************/ +static int imluaVideoCaptureDialogDesc (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + int dialog = luaL_checkint(L, 2); + + lua_pushstring(L, imVideoCaptureDialogDesc(vc, dialog)); + return 1; +} + +/*****************************************************************************\ + vc:FormatCount() +\*****************************************************************************/ +static int imluaVideoCaptureFormatCount (lua_State *L) +{ + lua_pushnumber(L, imVideoCaptureFormatCount(imlua_checkvideocapture(L, 1))); + return 1; +} + +/*****************************************************************************\ + vc:GetFormat() +\*****************************************************************************/ +static int imluaVideoCaptureGetFormat (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + int format = luaL_checkint(L, 2); + int width, height; + char desc[10]; + + lua_pushboolean(L, imVideoCaptureGetFormat(vc, format, &width, &height, desc)); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + lua_pushstring(L, desc); + + return 4; +} + +/*****************************************************************************\ + vc:GetImageSize() +\*****************************************************************************/ +static int imluaVideoCaptureGetImageSize (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + int width, height; + + imVideoCaptureGetImageSize(vc, &width, &height); + lua_pushnumber(L, width); + lua_pushnumber(L, height); + + return 2; +} + +/*****************************************************************************\ + vc:SetImageSize() +\*****************************************************************************/ +static int imluaVideoCaptureSetImageSize (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + int width = luaL_checkint(L, 2); + int height = luaL_checkint(L, 3); + + lua_pushboolean(L, imVideoCaptureSetImageSize(vc, width, height)); + + return 1; +} + +/*****************************************************************************\ + vc:SetInOut() +\*****************************************************************************/ +static int imluaVideoCaptureSetInOut(lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + int input = luaL_checkint(L, 2); + int output = luaL_checkint(L, 3); + int cross = luaL_checkint(L, 4); + + lua_pushboolean(L, imVideoCaptureSetInOut(vc, input, output, cross)); + + return 1; +} + +/*****************************************************************************\ + vc:SetFormat() +\*****************************************************************************/ +static int imluaVideoCaptureSetFormat (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + int format = luaL_optint(L, 2, -1); + if (format == -1) + lua_pushnumber(L, imVideoCaptureSetFormat(vc, format)); + else + lua_pushboolean(L, imVideoCaptureSetFormat(vc, format)); + return 1; +} + +/*****************************************************************************\ + vc:ResetAttribute(attrib, fauto) +\*****************************************************************************/ +static int imluaVideoCaptureResetAttribute (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + const char *attrib = luaL_checkstring(L, 2); + int fauto = lua_toboolean(L, 3); + + lua_pushboolean(L, imVideoCaptureResetAttribute(vc, attrib, fauto)); + return 1; +} + +/*****************************************************************************\ + vc:SetAttribute(attrib, percent) +\*****************************************************************************/ +static int imluaVideoCaptureSetAttribute (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + const char *attrib = luaL_checkstring(L, 2); + float percent = (float) luaL_checknumber(L, 3); + + lua_pushboolean(L, imVideoCaptureSetAttribute(vc, attrib, percent)); + return 1; +} + +/*****************************************************************************\ + vc:GetAttribute(attrib) +\*****************************************************************************/ +static int imluaVideoCaptureGetAttribute (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + const char *attrib = luaL_checkstring(L, 2); + float percent; + + lua_pushboolean(L, imVideoCaptureGetAttribute(vc, attrib, &percent)); + lua_pushnumber(L, percent); + return 2; +} + +/*****************************************************************************\ + vc:GetAttributeList() +\*****************************************************************************/ +static int imluaVideoCaptureGetAttributeList (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + int num_attrib; + const char **attribs; + int i; + + attribs = imVideoCaptureGetAttributeList(vc, &num_attrib); + lua_newtable(L); + for (i = 0; i < num_attrib; i++) + { + lua_pushstring(L, attribs[i]); + lua_rawseti(L, -2, i + 1); + } + + return 1; +} + +/*****************************************************************************\ + vc:Frame(image) +\*****************************************************************************/ +static int imluaVideoCaptureFrame (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + imImage *image = imlua_checkimage(L, 2); + int timeout = luaL_checkint(L, 3); + + if (!(image->color_space == IM_RGB || image->color_space == IM_GRAY)) + luaL_argerror(L, 2, "image must be of RGB or Gray color spaces"); + imlua_checkdatatype(L, 2, image, IM_BYTE); + + lua_pushboolean(L, imVideoCaptureFrame(vc, image->data[0], image->color_space, timeout)); + + return 1; +} + +/*****************************************************************************\ + vc:OneFrame(image) +\*****************************************************************************/ +static int imluaVideoCaptureOneFrame (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + imImage *image = imlua_checkimage(L, 2); + + if (!(image->color_space == IM_RGB || image->color_space == IM_GRAY)) + luaL_argerror(L, 2, "image must be of RGB or Gray color spaces"); + imlua_checkdatatype(L, 2, image, IM_BYTE); + + lua_pushboolean(L, imVideoCaptureOneFrame(vc, image->data[0], image->color_space)); + + return 1; +} + +/*****************************************************************************\ + vc:Live(image) +\*****************************************************************************/ +static int imluaVideoCaptureLive (lua_State *L) +{ + imVideoCapture *vc = imlua_checkvideocapture(L, 1); + int live = luaL_optint(L, 2, -1); + if (live == -1) + lua_pushnumber(L, imVideoCaptureLive(vc, live)); + else + lua_pushboolean(L, imVideoCaptureLive(vc, live)); + + return 1; +} + +/*****************************************************************************\ + vc:Destroy() +\*****************************************************************************/ +static int imluaVideoCaptureDestroy (lua_State *L) +{ + imVideoCapture **vc_p = imlua_rawcheckvideocapture(L, 1); + if (!(*vc_p)) + luaL_argerror(L, 1, "destroyed imVideoCapture"); + + imVideoCaptureDestroy(*vc_p); + *vc_p = NULL; /* mark as destroyed */ + + return 0; +} + +/*****************************************************************************\ + gc +\*****************************************************************************/ +static int imluaVideoCapture_gc (lua_State *L) +{ + imVideoCapture **vc_p = (imVideoCapture **)lua_touserdata(L, 1); + if (*vc_p) + { + imVideoCaptureDestroy(*vc_p); + *vc_p = NULL; /* mark as destroyed */ + } + return 0; +} + +/*****************************************************************************\ + tostring +\*****************************************************************************/ +static int imluaVideoCapture_tostring (lua_State *L) +{ + imVideoCapture **vc_p = (imVideoCapture **)lua_touserdata(L, 1); + lua_pushfstring(L, "imVideoCapture (%p)%s", vc_p, (*vc_p)? "": "-destroyed"); + return 1; +} + +static const luaL_reg imcapture_lib[] = { + {"VideoCaptureDeviceCount", imluaVideoCaptureDeviceCount}, + {"VideoCaptureDeviceDesc", imluaVideoCaptureDeviceDesc}, + {"VideoCaptureReloadDevices", imluaVideoCaptureReloadDevices}, + {"VideoCaptureCreate", imluaVideoCaptureCreate}, + {"VideoCaptureDestroy", imluaVideoCaptureDestroy}, + {NULL, NULL} +}; + +static const luaL_reg imcapture_metalib[] = { + {"Destroy", imluaVideoCaptureDestroy}, + {"Connect", imluaVideoCaptureConnect}, + {"Disconnect", imluaVideoCaptureDisconnect}, + {"DialogCount", imluaVideoCaptureDialogCount}, + {"ShowDialog", imluaVideoCaptureShowDialog}, + {"DialogDesc", imluaVideoCaptureDialogDesc}, + {"FormatCount", imluaVideoCaptureFormatCount}, + {"GetFormat", imluaVideoCaptureGetFormat}, + {"SetFormat", imluaVideoCaptureSetFormat}, + {"GetImageSize", imluaVideoCaptureGetImageSize}, + {"SetImageSize", imluaVideoCaptureSetImageSize}, + {"SetInOut", imluaVideoCaptureSetInOut}, + {"ResetAttribute", imluaVideoCaptureResetAttribute}, + {"GetAttribute", imluaVideoCaptureGetAttribute}, + {"SetAttribute", imluaVideoCaptureSetAttribute}, + {"GetAttributeList", imluaVideoCaptureGetAttributeList}, + {"OneFrame", imluaVideoCaptureOneFrame}, + {"Frame", imluaVideoCaptureFrame}, + {"Live", imluaVideoCaptureLive}, + + {"__gc", imluaVideoCapture_gc}, + {"__tostring", imluaVideoCapture_tostring}, + + {NULL, NULL} +}; + +static void createmeta (lua_State *L) +{ + /* Object Oriented Access */ + luaL_newmetatable(L, "imVideoCapture"); /* create new metatable for imVideoCapture handle */ + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); /* push metatable */ + lua_rawset(L, -3); /* metatable.__index = metatable */ + luaL_register(L, NULL, imcapture_metalib); /* register methods */ + lua_pop(L, 1); /* removes the metatable from the top of the stack */ +} + +int imlua_open_capture(lua_State *L) +{ + createmeta(L); + luaL_register(L, "im", imcapture_lib); /* leave "im" table at the top of the stack */ + return 1; +} + +int luaopen_imlua_capture(lua_State *L) +{ + return imlua_open_capture(L); +} + +int luaopen_imlua_capture51(lua_State *L) +{ + return imlua_open_capture(L); +} + diff --git a/im/src/lua5/imlua_capture.def b/im/src/lua5/imlua_capture.def new file mode 100755 index 0000000..1b279cf --- /dev/null +++ b/im/src/lua5/imlua_capture.def @@ -0,0 +1,5 @@ +EXPORTS + imlua_open_capture + luaopen_imlua_capture + luaopen_imlua_capture51 + \ No newline at end of file diff --git a/im/src/lua5/imlua_convert.c b/im/src/lua5/imlua_convert.c new file mode 100755 index 0000000..c2c56d9 --- /dev/null +++ b/im/src/lua5/imlua_convert.c @@ -0,0 +1,96 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_convert.c,v 1.3 2009/08/18 02:23:33 scuri Exp $ + */ + +#include "im.h" +#include "im_image.h" +#include "im_convert.h" + +#include +#include + +#include "imlua.h" +#include "imlua_image.h" +#include "imlua_aux.h" + +/*****************************************************************************\ + im.ConvertDataType(src_image, dst_image, cpx2real, gamma, abssolute, cast_mode) +\*****************************************************************************/ +static int imluaConvertDataType (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + int cpx2real = luaL_checkint(L, 3); + float gamma = (float) luaL_checknumber(L, 4); + int abssolute = lua_toboolean(L, 5); + int cast_mode = luaL_checkint(L, 6); + + imlua_matchcolorspace(L, src_image, dst_image); + imlua_pusherror(L, imConvertDataType(src_image, dst_image, cpx2real, gamma, abssolute, cast_mode)); + return 1; +} + +/*****************************************************************************\ + im.ConvertColorSpace(src_image, dst_image) +\*****************************************************************************/ +static int imluaConvertColorSpace (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + imlua_matchdatatype(L, src_image, dst_image); + imlua_pusherror(L, imConvertColorSpace(src_image, dst_image)); + return 1; +} + +/*****************************************************************************\ + im.ConvertToBitmap(src_image, dst_image, cpx2real, gamma, abssolute, cast_mode) +\*****************************************************************************/ +static int imluaConvertToBitmap (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + int cpx2real = luaL_checkint(L, 3); + float gamma = (float) luaL_checknumber(L, 4); + int abssolute = lua_toboolean(L, 5); + int cast_mode = luaL_checkint(L, 6); + + imlua_matchsize(L, src_image, dst_image); + imlua_matchcheck(L, imImageIsBitmap(dst_image), "image must be a bitmap"); + + imlua_pusherror(L, imConvertToBitmap(src_image, dst_image, cpx2real, gamma, abssolute, cast_mode)); + return 1; +} + +static const luaL_reg imconvert_lib[] = { + {"ConvertDataType", imluaConvertDataType}, + {"ConvertColorSpace", imluaConvertColorSpace}, + {"ConvertToBitmap", imluaConvertToBitmap}, + {NULL, NULL} +}; + +void imlua_open_convert (lua_State *L) +{ + /* "im" table is at the top of the stack */ + luaL_register(L, NULL, imconvert_lib); +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/im_convert_be64.loh" +#else +#include "loh/im_convert_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/im_convert_le64w.loh" +#else +#include "loh/im_convert_le64.loh" +#endif +#else +#include "loh/im_convert.loh" +#endif +#endif +} diff --git a/im/src/lua5/imlua_fftw.c b/im/src/lua5/imlua_fftw.c new file mode 100755 index 0000000..c8ad3df --- /dev/null +++ b/im/src/lua5/imlua_fftw.c @@ -0,0 +1,162 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_fftw.c,v 1.2 2008/11/26 17:25:51 scuri Exp $ + */ + +#include + +#include "im.h" +#include "im_image.h" +#include "im_process.h" +#include "im_util.h" + +#include +#include + +#include "imlua.h" +#include "imlua_aux.h" +#include "imlua_image.h" + + +/*****************************************************************************\ + Domain Transform Operations +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessFFT(src_image, dst_image) +\*****************************************************************************/ +static int imluaProcessFFT (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + imlua_matchsize(L, src_image, dst_image); + imlua_checkdatatype(L, 2, dst_image, IM_CFLOAT); + + imProcessFFT(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessIFFT(src_image, dst_image) +\*****************************************************************************/ +static int imluaProcessIFFT (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + imlua_matchsize(L, src_image, dst_image); + imlua_checkdatatype(L, 1, src_image, IM_CFLOAT); + imlua_checkdatatype(L, 2, dst_image, IM_CFLOAT); + + imProcessIFFT(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessFFTRaw(src_image, inverse, center, normalize) +\*****************************************************************************/ +static int imluaProcessFFTraw (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + int inverse = luaL_checkint(L, 2); + int center = luaL_checkint(L, 3); + int normalize = luaL_checkint(L, 4); + + imlua_checkdatatype(L, 1, src_image, IM_CFLOAT); + + imProcessFFTraw(src_image, inverse, center, normalize); + return 0; +} + +/*****************************************************************************\ + im.ProcessSwapQuadrants(src_image, inverse, center, normalize) +\*****************************************************************************/ +static int imluaProcessSwapQuadrants (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + int center2origin = luaL_checkint(L, 2); + + imlua_checkdatatype(L, 1, src_image, IM_CFLOAT); + + imProcessSwapQuadrants(src_image, center2origin); + return 0; +} + +/*****************************************************************************\ + im.ProcessCrossCorrelation(image1, image2, dst_image) +\*****************************************************************************/ +static int imluaProcessCrossCorrelation (lua_State *L) +{ + imImage* image1 = imlua_checkimage(L, 1); + imImage* image2 = imlua_checkimage(L, 2); + imImage* dst_image = imlua_checkimage(L, 3); + + imlua_matchsize(L, image1, dst_image); + imlua_matchsize(L, image2, dst_image); + imlua_checkdatatype(L, 3, dst_image, IM_CFLOAT); + + imProcessCrossCorrelation(image1, image2, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessAutoCorrelation(src_image, dst_image) +\*****************************************************************************/ +static int imluaProcessAutoCorrelation (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + imlua_matchsize(L, src_image, dst_image); + imlua_checkdatatype(L, 2, dst_image, IM_CFLOAT); + + imProcessAutoCorrelation(src_image, dst_image); + return 0; +} + +static const luaL_reg imfftw_lib[] = { + {"ProcessFFT", imluaProcessFFT}, + {"ProcessIFFT", imluaProcessIFFT}, + {"ProcessFFTraw", imluaProcessFFTraw}, + {"ProcessSwapQuadrants", imluaProcessSwapQuadrants}, + {"ProcessCrossCorrelation", imluaProcessCrossCorrelation}, + {"ProcessAutoCorrelation", imluaProcessAutoCorrelation}, + + {NULL, NULL} +}; + +int imlua_open_fftw (lua_State *L) +{ + luaL_register(L, "im", imfftw_lib); /* leave "im" table at the top of the stack */ +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/im_fftw_be64.loh" +#else +#include "loh/im_fftw_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/im_fftw_le64w.loh" +#else +#include "loh/im_fftw_le64.loh" +#endif +#else +#include "loh/im_fftw.loh" +#endif +#endif + return 1; +} + +int luaopen_imlua_fftw(lua_State *L) +{ + return imlua_open_fftw(L); +} + +int luaopen_imlua_fftw51(lua_State *L) +{ + return imlua_open_fftw(L); +} diff --git a/im/src/lua5/imlua_fftw.def b/im/src/lua5/imlua_fftw.def new file mode 100755 index 0000000..216c967 --- /dev/null +++ b/im/src/lua5/imlua_fftw.def @@ -0,0 +1,4 @@ +EXPORTS + imlua_open_fftw + luaopen_imlua_fftw + luaopen_imlua_fftw51 \ No newline at end of file diff --git a/im/src/lua5/imlua_file.c b/im/src/lua5/imlua_file.c new file mode 100755 index 0000000..066dd76 --- /dev/null +++ b/im/src/lua5/imlua_file.c @@ -0,0 +1,661 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_file.c,v 1.2 2009/08/04 21:35:26 scuri Exp $ + */ + +#include +#include +#include + +#include "im.h" +#include "im_raw.h" +#include "im_image.h" +#include "im_util.h" + +#include +#include + +#include "imlua.h" +#include "imlua_aux.h" +#include "imlua_image.h" +#include "imlua_palette.h" + + + +static imFile** imlua_rawcheckfile(lua_State *L, int param) +{ + return (imFile**)luaL_checkudata(L, param, "imFile"); +} + +static imFile* imlua_checkfile (lua_State *L, int param) +{ + imFile** ifile_p = imlua_rawcheckfile(L, param); + + if (!(*ifile_p)) + luaL_argerror(L, param, "closed imFile"); + + return *ifile_p; +} + +static int imlua_pushifileerror(lua_State *L, imFile* ifile, int error) +{ + if (error) + { + lua_pushnil(L); + imlua_pusherror(L, error); + return 2; + } + else + { + imFile** ifile_p = (imFile**) lua_newuserdata(L, sizeof(imFile*)); + *ifile_p = ifile; + luaL_getmetatable(L, "imFile"); + lua_setmetatable(L, -2); + return 1; + } +} + + +/*****************************************************************************\ + im.FileOpen(filename) +\*****************************************************************************/ +static int imluaFileOpen (lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + int error; + imFile *ifile = imFileOpen(filename, &error); + return imlua_pushifileerror(L, ifile, error); +} + +/*****************************************************************************\ + im.FileOpenAs(filename) +\*****************************************************************************/ +static int imluaFileOpenAs (lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + const char *format = luaL_checkstring(L, 2); + int error; + imFile *ifile = imFileOpenAs(filename, format, &error); + return imlua_pushifileerror(L, ifile, error); +} + +/*****************************************************************************\ + im.FileOpenRaw(filename) +\*****************************************************************************/ +static int imluaFileOpenRaw (lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + int error; + imFile *ifile = imFileOpenRaw(filename, &error); + return imlua_pushifileerror(L, ifile, error); +} + +/*****************************************************************************\ + im.FileNew(filename, format) +\*****************************************************************************/ +static int imluaFileNew (lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + const char *format = luaL_checkstring(L, 2); + int error; + + imFile *ifile = imFileNew(filename, format, &error); + return imlua_pushifileerror(L, ifile, error); +} + +/*****************************************************************************\ + im.FileNewRaw(filename) +\*****************************************************************************/ +static int imluaFileNewRaw (lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + int error; + imFile *ifile = imFileNewRaw(filename, &error); + return imlua_pushifileerror(L, ifile, error); +} + +/*****************************************************************************\ + file:Handle() +\*****************************************************************************/ +static int imluaFileHandle (lua_State *L) +{ + lua_pushlightuserdata(L, imFileHandle(imlua_checkfile(L, 1), luaL_checkint(L, 2))); + return 1; +} + +/*****************************************************************************\ + file:LoadImage() +\*****************************************************************************/ +static int imluaFileLoadImage (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + int index = luaL_optint(L, 2, 0); + int error; + imImage *image = imFileLoadImage(ifile, index, &error); + return imlua_pushimageerror(L, image, error); +} + +/*****************************************************************************\ + file:LoadImageFrame() +\*****************************************************************************/ +static int imluaFileLoadImageFrame (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + int index = luaL_checkint(L, 2); + imImage *image = imlua_checkimage(L, 3); + int error; + + imFileLoadImageFrame(ifile, index, image, &error); + imlua_pusherror(L, error); + + return 1; +} + +/*****************************************************************************\ + file:LoadImageRegion() +\*****************************************************************************/ +static int imluaFileLoadImageRegion (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + int index = luaL_checkint(L, 2); + int bitmap = luaL_checkint(L, 3); + int xmin = luaL_checkint(L, 4); + int xmax = luaL_checkint(L, 5); + int ymin = luaL_checkint(L, 6); + int ymax = luaL_checkint(L, 7); + int width = luaL_checkint(L, 8); + int height = luaL_checkint(L, 9); + int error; + imImage *image = imFileLoadImageRegion(ifile, index, bitmap, &error, xmin, xmax, ymin, ymax, width, height); + return imlua_pushimageerror(L, image, error); +} + +/*****************************************************************************\ + file:LoadBitmap() +\*****************************************************************************/ +static int imluaFileLoadBitmap (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + int index = luaL_optint(L, 2, 0); + int error; + imImage *image = imFileLoadBitmap(ifile, index, &error); + return imlua_pushimageerror(L, image, error); +} + +/*****************************************************************************\ + file:LoadBitmapFrame() +\*****************************************************************************/ +static int imluaFileLoadBitmapFrame (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + int index = luaL_checkint(L, 2); + imImage *image = imlua_checkimage(L, 3); + int error; + + imFileLoadBitmapFrame(ifile, index, image, &error); + imlua_pusherror(L, error); + + return 1; +} + +/*****************************************************************************\ + file:SaveImage() +\*****************************************************************************/ +static int imluaFileSaveImage (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + imImage *image = imlua_checkimage(L, 2); + + imlua_pusherror(L, imFileSaveImage(ifile, image)); + return 1; +} + +/*****************************************************************************\ + file:GetInfo() +\*****************************************************************************/ +static int imluaFileGetInfo (lua_State *L) +{ + int image_count; + char format[10]; + char compression[20]; + + imFile *ifile = imlua_checkfile(L, 1); + + imFileGetInfo(ifile, format, compression, &image_count); + + lua_pushstring(L, format); + lua_pushstring(L, compression); + lua_pushnumber(L, image_count); + + return 3; +} + +/*****************************************************************************\ + file:SetInfo() +\*****************************************************************************/ +static int imluaFileSetInfo (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + const char *compression = luaL_checkstring(L, 2); + + imFileSetInfo(ifile, compression); + + return 0; +} + +/*****************************************************************************\ + file:SetAttribute(attrib, data_type, data) +\*****************************************************************************/ +static int imluaFileSetAttribute (lua_State *L) +{ + int i, count = 0; + void *data = NULL; + + imFile *ifile = imlua_checkfile(L, 1); + const char *attrib = luaL_checkstring(L, 2); + int data_type = luaL_checkint(L, 3); + + if (!lua_isnil(L, 4)) + { + if (lua_isstring(L, 4) && data_type != IM_BYTE) + luaL_argerror(L, 4, "if value is a string, then data type must be byte"); + else + { + luaL_checktype(L, 4, LUA_TTABLE); + count = imlua_getn(L, 4); + data = malloc(imDataTypeSize(data_type) * count); + } + + switch (data_type) + { + case IM_BYTE: + { + if (lua_isstring(L, 4)) + { + const char* str = lua_tostring(L, 4); + count = strlen(str)+1; + data = malloc(imDataTypeSize(data_type) * count); + memcpy(data, str, count); + } + else + { + imbyte *d = (imbyte*) data; + for (i = 0; i < count; i++) + { + lua_rawgeti(L, 4, i+1); + d[i] = (imbyte) luaL_checkint(L, -1); + lua_pop(L, 1); + } + } + } + break; + + case IM_USHORT: + { + imushort *d = (imushort*) data; + for (i = 0; i < count; i++) + { + lua_rawgeti(L, 4, i+1); + d[i] = (imushort) luaL_checkint(L, -1); + lua_pop(L, 1); + } + } + break; + + case IM_INT: + { + int *d = (int*) data; + for (i = 0; i < count; i++) + { + lua_rawgeti(L, 4, i+1); + d[i] = luaL_checkint(L, -1); + lua_pop(L, 1); + } + } + break; + + case IM_FLOAT: + { + float *d = (float*) data; + for (i = 0; i < count; i++) + { + lua_rawgeti(L, 4, i+1); + d[i] = (float) luaL_checknumber(L, -1); + lua_pop(L, 1); + } + } + break; + + case IM_CFLOAT: + { + float *data_float = (float*) data; + for (i = 0; i < count; i++) + { + int two; + float *value = imlua_toarrayfloat(L, -1, &two, 1); + if (two != 2) + { + free(value); + luaL_argerror(L, 4, "invalid value"); + } + + data_float[i] = value[0]; + data_float[i+1] = value[1]; + free(value); + lua_pop(L, 1); + } + } + break; + } + } + + imFileSetAttribute(ifile, attrib, data_type, count, data); + return 0; +} + +/*****************************************************************************\ + file:GetAttribute(attrib) +\*****************************************************************************/ +static int imluaFileGetAttribute (lua_State *L) +{ + int data_type; + int i, count; + const void *data; + int as_string = 0; + + imFile *ifile = imlua_checkfile(L, 1); + const char *attrib = luaL_checkstring(L, 2); + + data = imFileGetAttribute(ifile, attrib, &data_type, &count); + if (!data) + { + lua_pushnil(L); + return 1; + } + + if (data_type == IM_BYTE && lua_isboolean(L, 3)) + as_string = lua_toboolean(L, 3); + + if (!as_string) + lua_newtable(L); + + switch (data_type) + { + case IM_BYTE: + { + if (as_string) + { + lua_pushstring(L, (const char*)data); + } + else + { + imbyte *data_byte = (imbyte*) data; + for (i = 0; i < count; i++, data_byte++) + { + lua_pushnumber(L, *data_byte); + lua_rawseti(L, -2, i+1); + } + } + } + break; + + case IM_USHORT: + { + imushort *data_ushort = (imushort*) data; + for (i = 0; i < count; i++, data_ushort += 2) + { + lua_pushnumber(L, *data_ushort); + lua_rawseti(L, -2, i+1); + } + } + break; + + case IM_INT: + { + int *data_int = (int*) data; + for (i = 0; i < count; i++, data_int++) + { + lua_pushnumber(L, *data_int); + lua_rawseti(L, -2, i+1); + } + } + break; + + case IM_FLOAT: + { + float *data_float = (float*) data; + for (i = 0; i < count; i++, data_float++) + { + lua_pushnumber(L, *data_float); + lua_rawseti(L, -2, i+1); + } + } + break; + + case IM_CFLOAT: + { + float *data_float = (float*) data; + for (i = 0; i < count; i++, data_float += 2) + { + imlua_newarrayfloat(L, data_float, 2, 1); + lua_rawseti(L, -2, i+1); + } + } + break; + } + + lua_pushnumber(L, data_type); + + return 2; +} + +/*****************************************************************************\ + file:GetAttributeList() +\*****************************************************************************/ +static int imluaFileGetAttributeList (lua_State *L) +{ + int i, attrib_count; + char **attrib; + + imFile* ifile = imlua_checkfile(L, 1); + + imFileGetAttributeList(ifile, NULL, &attrib_count); + + attrib = (char**) malloc(attrib_count * sizeof(char*)); + + imFileGetAttributeList(ifile, attrib, &attrib_count); + + lua_newtable(L); + for (i = 0; i < attrib_count; i++) + { + lua_pushstring(L, attrib[i]); + lua_rawseti(L, -2, i+1); + } + + return 1; +} + +/*****************************************************************************\ + file:GetPalette() +\*****************************************************************************/ +static int imluaFileGetPalette (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + long* color = malloc(sizeof(long) * 256); + int count; + imFileGetPalette(ifile, color, &count); + imlua_pushpalette(L, color, count); + return 1; +} + +/*****************************************************************************\ + file:SetPalette(pal) +\*****************************************************************************/ +static int imluaFileSetPalette (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + imluaPalette *pal = imlua_checkpalette(L, 2); + imFileSetPalette(ifile, pal->color, pal->count); + return 0; +} + +/*****************************************************************************\ + file:ReadImageInfo() +\*****************************************************************************/ +static int imluaFileReadImageInfo (lua_State *L) +{ + int width, height; + int file_color_mode, file_data_type; + int error; + + imFile *ifile = imlua_checkfile(L, 1); + int index = luaL_optint(L, 2, 0); + + error = imFileReadImageInfo(ifile, index, &width, &height, &file_color_mode, &file_data_type); + + imlua_pusherror(L, error); + if (error) + return 1; + + lua_pushnumber(L, width); + lua_pushnumber(L, height); + lua_pushnumber(L, file_color_mode); + lua_pushnumber(L, file_data_type); + return 5; +} + +/*****************************************************************************\ + file:WriteImageInfo(width, height, user_color_mode, user_data_type) +\*****************************************************************************/ +static int imluaFileWriteImageInfo (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + int width = luaL_checkint(L, 2); + int height = luaL_checkint(L, 3); + int user_color_mode = luaL_checkint(L, 4); + int user_data_type = luaL_checkint(L, 5); + + imlua_pusherror(L, imFileWriteImageInfo(ifile, width, height, user_color_mode, user_data_type)); + return 1; +} + +/*****************************************************************************\ + file:ReadImageData(data) +\*****************************************************************************/ +static int imluaFileReadImageData (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + void* data = lua_touserdata(L, 2); + int convert2bitmap = lua_toboolean(L, 3); + int color_mode_flags = luaL_checkint(L, 4); + imlua_pusherror(L, imFileReadImageData(ifile, data, convert2bitmap, color_mode_flags)); + return 1; +} + +/*****************************************************************************\ + file:WriteImageData(data) +\*****************************************************************************/ +static int imluaFileWriteImageData (lua_State *L) +{ + imFile *ifile = imlua_checkfile(L, 1); + void* data = lua_touserdata(L, 2); + imlua_pusherror(L, imFileWriteImageData(ifile, data)); + return 1; +} + +/*****************************************************************************\ + file:Close() +\*****************************************************************************/ +static int imluaFileClose (lua_State *L) +{ + imFile** ifile_p = imlua_rawcheckfile(L, 1); + if (!(*ifile_p)) + luaL_argerror(L, 1, "closed imFile"); + + imFileClose(*ifile_p); + *ifile_p = NULL; /* mark as closed */ + return 0; +} + +/*****************************************************************************\ + gc +\*****************************************************************************/ +static int imluaFile_gc (lua_State *L) +{ + imFile **ifile_p = (imFile **)lua_touserdata(L, 1); + if (ifile_p && *ifile_p) + { + imFileClose(*ifile_p); + *ifile_p = NULL; /* mark as closed */ + } + return 0; +} + +/*****************************************************************************\ + tostring +\*****************************************************************************/ +static int imluaFile_tostring (lua_State *L) +{ + imFile **ifile_p = (imFile **)lua_touserdata(L, 1); + lua_pushfstring(L, "imFile(%p)%s", ifile_p, (*ifile_p)? "": "-closed"); + return 1; +} + +/*****************************************************************************\ +\*****************************************************************************/ +static const luaL_reg imfile_lib[] = { + {"FileOpen", imluaFileOpen}, + {"FileOpenAs", imluaFileOpenAs}, + {"FileOpenRaw", imluaFileOpenRaw}, + {"FileNew", imluaFileNew}, + {"FileNewRaw", imluaFileNewRaw}, + {"FileClose", imluaFileClose}, + {NULL, NULL} +}; + +static const luaL_reg imfile_metalib[] = { + {"Handle", imluaFileHandle}, + {"Close", imluaFileClose}, + {"LoadImage", imluaFileLoadImage}, + {"LoadImageFrame", imluaFileLoadImageFrame}, + {"LoadImageRegion", imluaFileLoadImageRegion}, + {"LoadBitmap", imluaFileLoadBitmap}, + {"LoadBitmapFrame", imluaFileLoadBitmapFrame}, + {"SaveImage", imluaFileSaveImage}, + {"GetInfo", imluaFileGetInfo}, + {"SetInfo", imluaFileSetInfo}, + {"SetAttribute", imluaFileSetAttribute}, + {"GetAttribute", imluaFileGetAttribute}, + {"GetAttributeList", imluaFileGetAttributeList}, + {"GetPalette", imluaFileGetPalette}, + {"SetPalette", imluaFileSetPalette}, + {"ReadImageInfo", imluaFileReadImageInfo}, + {"WriteImageInfo", imluaFileWriteImageInfo}, + {"ReadImageData", imluaFileReadImageData}, + {"WriteImageData", imluaFileWriteImageData}, + + {"__gc", imluaFile_gc}, + {"__tostring", imluaFile_tostring}, + + {NULL, NULL} +}; + +static void createmeta (lua_State *L) +{ + /* Object Oriented Access */ + luaL_newmetatable(L, "imFile"); /* create new metatable for imFile handles */ + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); /* push metatable */ + lua_rawset(L, -3); /* metatable.__index = metatable */ + luaL_register(L, NULL, imfile_metalib); /* register methods */ + lua_pop(L, 1); /* removes the metatable from the top of the stack */ +} + +void imlua_open_file (lua_State *L) +{ + /* "im" table is at the top of the stack */ + createmeta(L); + luaL_register(L, NULL, imfile_lib); +} diff --git a/im/src/lua5/imlua_image.c b/im/src/lua5/imlua_image.c new file mode 100755 index 0000000..40b1e9c --- /dev/null +++ b/im/src/lua5/imlua_image.c @@ -0,0 +1,1083 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_image.c,v 1.5 2009/09/25 18:40:31 scuri Exp $ + */ + +#include +#include +#include + +#include "im.h" +#include "im_image.h" +#include "im_util.h" +#include "im_convert.h" + +#include +#include + +#include "imlua.h" +#include "imlua_image.h" +#include "imlua_palette.h" +#include "imlua_aux.h" + + +static imImage** imlua_rawcheckimage(lua_State *L, int param) +{ + return (imImage**) luaL_checkudata(L, param, "imImage"); +} + +imImage* imlua_checkimage(lua_State *L, int param) +{ + imImage** image_p = imlua_rawcheckimage(L, param); + + if (!(*image_p)) + luaL_argerror(L, param, "destroyed imImage"); + + return *image_p; +} + +int imlua_pushimageerror(lua_State *L, imImage* image, int error) +{ + if (error) + { + lua_pushnil(L); + imlua_pusherror(L, error); + return 2; + } + else + { + imlua_pushimage(L, image); + return 1; + } +} + +void imlua_pushimage(lua_State *L, imImage* image) +{ + if (!image) + lua_pushnil(L); + else + { + imImage **image_p = (imImage**) lua_newuserdata(L, sizeof(imImage*)); + *image_p = image; + luaL_getmetatable(L, "imImage"); + lua_setmetatable(L, -2); + } +} + +/*****************************************************************************\ + image channel, for indexing +\*****************************************************************************/ +static imluaImageChannel *imlua_newimagechannel (lua_State *L, imImage *image, int channel) +{ + imluaImageChannel* imagechannel = (imluaImageChannel*) lua_newuserdata(L, sizeof(imluaImageChannel)); + imagechannel->image = image; + imagechannel->channel = channel; + luaL_getmetatable(L, "imImageChannel"); + lua_setmetatable(L, -2); + return imagechannel; +} + +static imluaImageChannel* imlua_checkimagechannel (lua_State *L, int param) +{ + return (imluaImageChannel*) luaL_checkudata(L, param, "imImageChannel"); +} + +/*****************************************************************************\ + image row, for indexing +\*****************************************************************************/ +static imluaImageRow *imlua_newimagerow (lua_State *L, imImage *image, int channel, int row) +{ + imluaImageRow* imagerow = (imluaImageRow*) lua_newuserdata(L, sizeof(imluaImageRow)); + imagerow->image = image; + imagerow->channel = channel; + imagerow->row = row; + luaL_getmetatable(L, "imImageChannelRow"); + lua_setmetatable(L, -2); + return imagerow; +} + +static imluaImageRow* imlua_checkimagerow (lua_State *L, int param) +{ + return (imluaImageRow*) luaL_checkudata(L, param, "imImageChannelRow"); +} + +/*****************************************************************************\ + im.ImageCreate(width, height, color_space, data_type) +\*****************************************************************************/ +static int imluaImageCreate (lua_State *L) +{ + int width = luaL_checkint(L, 1); + int height = luaL_checkint(L, 2); + int color_space = luaL_checkint(L, 3); + int data_type = luaL_checkint(L, 4); + + imImage *image = imImageCreate(width, height, color_space, data_type); + imlua_pushimage(L, image); + return 1; +} + +/*****************************************************************************\ + image:AddAlpha() +\*****************************************************************************/ +static int imluaImageAddAlpha (lua_State *L) +{ + imImageAddAlpha(imlua_checkimage(L, 1)); + return 0; +} + +/*****************************************************************************\ + image:Reshape() +\*****************************************************************************/ +static int imluaImageReshape (lua_State *L) +{ + imImage* im = imlua_checkimage(L, 1); + int width = luaL_checkint(L, 2); + int height = luaL_checkint(L, 3); + + imImageReshape(im, width, height); + return 0; +} + +/*****************************************************************************\ + image:Copy() +\*****************************************************************************/ +static int imluaImageCopy (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + imlua_match(L, src_image, dst_image); + imImageCopy(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + image:CopyData() +\*****************************************************************************/ +static int imluaImageCopyData (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + imlua_match(L, src_image, dst_image); + imImageCopyData(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + image:Duplicate() +\*****************************************************************************/ +static int imluaImageDuplicate (lua_State *L) +{ + imImage* image = imlua_checkimage(L, 1); + imImage *new_image = imImageDuplicate(image); + imlua_pushimage(L, new_image); + return 1; +} + +/*****************************************************************************\ + image:Clone() +\*****************************************************************************/ +static int imluaImageClone (lua_State *L) +{ + imImage* image = imlua_checkimage(L, 1); + imImage *new_image = imImageClone(image); + imlua_pushimage(L, new_image); + return 1; +} + +/*****************************************************************************\ + image:SetAttribute(attrib, data_type, count, data) +\*****************************************************************************/ +static int imluaImageSetAttribute (lua_State *L) +{ + int i, count = 0; + void *data = NULL; + + imImage* image = imlua_checkimage(L, 1); + const char *attrib = luaL_checkstring(L, 2); + int data_type = luaL_checkint(L, 3); + + if (!lua_isnil(L, 4)) + { + if (lua_isstring(L, 4) && data_type != IM_BYTE) + luaL_argerror(L, 4, "if value is string, then data type must be byte"); + else + { + luaL_checktype(L, 4, LUA_TTABLE); + count = imlua_getn(L, 4); + data = malloc(imDataTypeSize(data_type) * count); + } + + switch (data_type) + { + case IM_BYTE: + { + if (lua_isstring(L, 4)) + { + const char* str = lua_tostring(L, 4); + count = strlen(str)+1; + data = malloc(imDataTypeSize(data_type) * count); + memcpy(data, str, count); + } + else + { + imbyte *data_byte = (imbyte*) data; + for (i = 0; i < count; i++) + { + lua_rawgeti(L, 4, i+1); + data_byte[i] = (imbyte)luaL_checkint(L, -1); + lua_pop(L, 1); + } + } + } + break; + + case IM_USHORT: + { + imushort *data_ushort = (imushort*) data; + for (i = 0; i < count; i++) + { + lua_rawgeti(L, 4, i+1); + data_ushort[i] = (imushort)luaL_checkint(L, -1); + lua_pop(L, 1); + } + } + break; + + case IM_INT: + { + int *data_int = (int*) data; + for (i = 0; i < count; i++) + { + lua_rawgeti(L, 4, i+1); + data_int[i] = luaL_checkint(L, -1); + lua_pop(L, 1); + } + } + break; + + case IM_FLOAT: + { + float *data_float = (float*) data; + for (i = 0; i < count; i++) + { + lua_rawgeti(L, 4, i+1); + data_float[i] = (float) luaL_checknumber(L, -1); + lua_pop(L, 1); + } + } + break; + + case IM_CFLOAT: + { + float *data_float = (float*) data; + for (i = 0; i < count; i++) + { + int two; + float *value = imlua_toarrayfloat(L, -1, &two, 1); + if (two != 2) + { + free(value); + luaL_argerror(L, 4, "invalid value"); + } + + data_float[i] = value[0]; + data_float[i+1] = value[1]; + free(value); + lua_pop(L, 1); + } + } + break; + } + } + + imImageSetAttribute(image, attrib, data_type, count, data); + return 0; +} + +/*****************************************************************************\ + image:GetAttribute(attrib) +\*****************************************************************************/ +static int imluaImageGetAttribute (lua_State *L) +{ + int data_type; + int i, count; + const void *data; + int as_string = 0; + + imImage* image = imlua_checkimage(L, 1); + const char *attrib = luaL_checkstring(L, 2); + + data = imImageGetAttribute(image, attrib, &data_type, &count); + if (!data) + { + lua_pushnil(L); + return 1; + } + + if (data_type == IM_BYTE && lua_isboolean(L, 3)) + as_string = lua_toboolean(L, 3); + + if (!as_string) + lua_newtable(L); + + switch (data_type) + { + case IM_BYTE: + { + if (as_string) + { + lua_pushstring(L, (const char*)data); + } + else + { + imbyte *data_byte = (imbyte*) data; + for (i = 0; i < count; i++, data_byte++) + { + lua_pushnumber(L, *data_byte); + lua_rawseti(L, -2, i+1); + } + } + } + break; + + case IM_USHORT: + { + imushort *data_ushort = (imushort*) data; + for (i = 0; i < count; i++, data_ushort += 2) + { + lua_pushnumber(L, *data_ushort); + lua_rawseti(L, -2, i+1); + } + } + break; + + case IM_INT: + { + int *data_int = (int*) data; + for (i = 0; i < count; i++, data_int++) + { + lua_pushnumber(L, *data_int); + lua_rawseti(L, -2, i+1); + } + } + break; + + case IM_FLOAT: + { + float *data_float = (float*) data; + for (i = 0; i < count; i++, data_float++) + { + lua_pushnumber(L, *data_float); + lua_rawseti(L, -2, i+1); + } + } + break; + + case IM_CFLOAT: + { + float *data_float = (float*) data; + for (i = 0; i < count; i++, data_float += 2) + { + imlua_newarrayfloat(L, data_float, 2, 1); + lua_rawseti(L, -2, i+1); + } + } + break; + } + + lua_pushnumber(L, data_type); + + return 2; +} + +/*****************************************************************************\ + image:GetAttributeList() +\*****************************************************************************/ +static int imluaImageGetAttributeList (lua_State *L) +{ + int i, attrib_count; + char **attrib; + + imImage* image = imlua_checkimage(L, 1); + + imImageGetAttributeList(image, NULL, &attrib_count); + + attrib = (char**) malloc(attrib_count * sizeof(char*)); + + imImageGetAttributeList(image, attrib, &attrib_count); + + lua_newtable(L); + for (i = 0; i < attrib_count; i++) + { + lua_pushstring(L, attrib[i]); + lua_rawseti(L, -2, i+1); + } + + return 1; +} + +/*****************************************************************************\ + image:Clear() +\*****************************************************************************/ +static int imluaImageClear (lua_State *L) +{ + imImageClear(imlua_checkimage(L, 1)); + return 0; +} + +/*****************************************************************************\ + image:isBitmap() +\*****************************************************************************/ +static int imluaImageIsBitmap (lua_State *L) +{ + lua_pushboolean(L, imImageIsBitmap(imlua_checkimage(L, 1))); + return 1; +} + + +/*****************************************************************************\ + image:GetOpenGLData() +\*****************************************************************************/ +static int imluaImageGetOpenGLData (lua_State *L) +{ + int format; + imbyte* gldata; + imImage *image = imlua_checkimage(L, 1); + + gldata = imImageGetOpenGLData(image, &format); + if (!gldata) + { + lua_pushnil(L); + return 1; + } + + lua_pushlightuserdata(L, gldata); + lua_pushinteger(L, format); + return 2; +} + +/*****************************************************************************\ + image:GetPalette() +\*****************************************************************************/ +static int imluaImageGetPalette (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + long* color = malloc(sizeof(long) * 256); + memcpy(color, image->palette, sizeof(long) * 256); + imlua_pushpalette(L, color, 256); + return 1; +} + +/*****************************************************************************\ + image:SetPalette +\*****************************************************************************/ +static int imluaImageSetPalette (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + imluaPalette *pal = imlua_checkpalette(L, 2); + long* palette = (long*)malloc(sizeof(long)*256); + memcpy(palette, pal->color, pal->count*sizeof(long)); + imImageSetPalette(image, palette, pal->count); + return 0; +} + +/*****************************************************************************\ + image:CopyAttributes(dst_image) +\*****************************************************************************/ +static int imluaImageCopyAttributes (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imImageCopyAttributes(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + image:MatchSize(image2) +\*****************************************************************************/ +static int imluaImageMatchSize (lua_State *L) +{ + imImage *image1 = imlua_checkimage(L, 1); + imImage *image2 = imlua_checkimage(L, 2); + + lua_pushboolean(L, imImageMatchSize(image1, image2)); + return 1; +} + +/*****************************************************************************\ + image:MatchColor(image2) +\*****************************************************************************/ +static int imluaImageMatchColor (lua_State *L) +{ + imImage *image1 = imlua_checkimage(L, 1); + imImage *image2 = imlua_checkimage(L, 2); + + lua_pushboolean(L, imImageMatchColor(image1, image2)); + return 1; +} + +/*****************************************************************************\ + image:MatchDataType(image2) +\*****************************************************************************/ +static int imluaImageMatchDataType (lua_State *L) +{ + imImage *image1 = imlua_checkimage(L, 1); + imImage *image2 = imlua_checkimage(L, 2); + + lua_pushboolean(L, imImageMatchDataType(image1, image2)); + return 1; +} + +/*****************************************************************************\ + image:MatchColorSpace(image2) +\*****************************************************************************/ +static int imluaImageMatchColorSpace (lua_State *L) +{ + imImage *image1 = imlua_checkimage(L, 1); + imImage *image2 = imlua_checkimage(L, 2); + + lua_pushboolean(L, imImageMatchColorSpace(image1, image2)); + return 1; +} + +/*****************************************************************************\ + image:Match(image2) +\*****************************************************************************/ +static int imluaImageMatch (lua_State *L) +{ + imImage *image1 = imlua_checkimage(L, 1); + imImage *image2 = imlua_checkimage(L, 2); + + lua_pushboolean(L, imImageMatch(image1, image2)); + return 1; +} + +/*****************************************************************************\ + image:SetBinary() +\*****************************************************************************/ +static int imluaImageSetBinary (lua_State *L) +{ + imImageSetBinary(imlua_checkimage(L, 1)); + return 0; +} + +/*****************************************************************************\ + image:MakeBinary() +\*****************************************************************************/ +static int imluaImageMakeBinary (lua_State *L) +{ + imImageMakeBinary(imlua_checkimage(L, 1)); + return 0; +} + +/*****************************************************************************\ + image:MakeGray() +\*****************************************************************************/ +static int imluaImageMakeGray (lua_State *L) +{ + imImageMakeGray(imlua_checkimage(L, 1)); + return 0; +} + +/*****************************************************************************\ + image:Width() +\*****************************************************************************/ +static int imluaImageWidth(lua_State *L) +{ + imImage *im = imlua_checkimage(L, 1); + lua_pushnumber(L, im->width); + return 1; +} + +/*****************************************************************************\ + image:Height() +\*****************************************************************************/ +static int imluaImageHeight(lua_State *L) +{ + imImage *im = imlua_checkimage(L, 1); + lua_pushnumber(L, im->height); + return 1; +} + +/*****************************************************************************\ + image:Depth() +\*****************************************************************************/ +static int imluaImageDepth(lua_State *L) +{ + imImage *im = imlua_checkimage(L, 1); + lua_pushnumber(L, im->depth); + return 1; +} + +/*****************************************************************************\ + image:DataType() +\*****************************************************************************/ +static int imluaImageDataType(lua_State *L) +{ + imImage *im = imlua_checkimage(L, 1); + lua_pushnumber(L, im->data_type); + return 1; +} + +/*****************************************************************************\ + image:ColorSpace() +\*****************************************************************************/ +static int imluaImageColorSpace(lua_State *L) +{ + imImage *im = imlua_checkimage(L, 1); + lua_pushnumber(L, im->color_space); + return 1; +} + +/*****************************************************************************\ + image:HasAlpha() +\*****************************************************************************/ +static int imluaImageHasAlpha(lua_State *L) +{ + imImage *im = imlua_checkimage(L, 1); + lua_pushnumber(L, im->has_alpha); + return 1; +} + +/*****************************************************************************\ + im.FileImageLoad(filename, [index]) +\*****************************************************************************/ +static int imluaFileImageLoad (lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + int index = luaL_optint(L, 2, 0); + int error; + imImage *image = imFileImageLoad(filename, index, &error); + return imlua_pushimageerror(L, image, error); +} + +/*****************************************************************************\ + im.FileImageLoadRegion(filename, [index]) +\*****************************************************************************/ +static int imluaFileImageLoadRegion (lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + int index = luaL_checkint(L, 2); + int bitmap = luaL_checkint(L, 3); + int xmin = luaL_checkint(L, 4); + int xmax = luaL_checkint(L, 5); + int ymin = luaL_checkint(L, 6); + int ymax = luaL_checkint(L, 7); + int width = luaL_checkint(L, 8); + int height = luaL_checkint(L, 9); + int error; + imImage *image = imFileImageLoadRegion(filename, index, bitmap, &error, xmin, xmax, ymin, ymax, width, height); + return imlua_pushimageerror(L, image, error); +} + +/*****************************************************************************\ + im.FileImageLoadBitmap(filename, [index]) +\*****************************************************************************/ +static int imluaFileImageLoadBitmap (lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + int index = luaL_optint(L, 2, 0); + int error; + imImage *image = imFileImageLoadBitmap(filename, index, &error); + return imlua_pushimageerror(L, image, error); +} + +/*****************************************************************************\ + im.FileImageSave(filename, format, image) +\*****************************************************************************/ +static int imluaFileImageSave (lua_State *L) +{ + const char *file_name = luaL_checkstring(L, 1); + const char *format = luaL_checkstring(L, 2); + imImage *image = imlua_checkimage(L, 3); + + imlua_pusherror(L, imFileImageSave(file_name, format, image)); + return 1; +} + +/*****************************************************************************\ + image:Save(filename, format) +\*****************************************************************************/ +static int imluaImageSave (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + const char *file_name = luaL_checkstring(L, 2); + const char *format = luaL_checkstring(L, 3); + + imlua_pusherror(L, imFileImageSave(file_name, format, image)); + return 1; +} + +/*****************************************************************************\ + image:Destroy() +\*****************************************************************************/ +static int imluaImageDestroy (lua_State *L) +{ + imImage** image_p = imlua_rawcheckimage(L, 1); + if (!(*image_p)) + luaL_argerror(L, 1, "destroyed imImage"); + + imImageDestroy(*image_p); + *image_p = NULL; /* mark as destroyed */ + return 0; +} + +/*****************************************************************************\ + gc +\*****************************************************************************/ +static int imluaImage_gc (lua_State *L) +{ + imImage** image_p = imlua_rawcheckimage(L, 1); + if (*image_p) + { + imImageDestroy(*image_p); + *image_p = NULL; /* mark as destroyed */ + } + + return 0; +} + +/*****************************************************************************\ + image tostring +\*****************************************************************************/ +static int imluaImage_tostring (lua_State *L) +{ + imImage** image_p = (imImage**)lua_touserdata(L, 1); + if (*image_p) + { + imImage *image = *image_p; + lua_pushfstring(L, "imImage(%p) [width=%d,height=%d,color_space=%s,data_type=%s,depth=%d]", + image_p, + image->width, + image->height, + imColorModeSpaceName(image->color_space), + imDataTypeName(image->data_type), + image->depth + ); + } + else + { + lua_pushfstring(L, "imImage(%p)-destroyed", image_p); + } + + return 1; +} + +/*****************************************************************************\ + imagechannel tostring +\*****************************************************************************/ +static int imluaImageChannel_tostring (lua_State *L) +{ + imluaImageChannel *imagechannel = imlua_checkimagechannel(L, 1); + lua_pushfstring(L, "imImageChannel(%p) [channel=%d]", + imagechannel, + imagechannel->channel + ); + return 1; +} + +/*****************************************************************************\ + imagerow tostring +\*****************************************************************************/ +static int imluaImageRow_tostring (lua_State *L) +{ + char buff[32]; + imluaImageRow *imagerow = imlua_checkimagerow(L, 1); + + sprintf(buff, "%p", lua_touserdata(L, 1)); + lua_pushfstring(L, "imImageRow(%s) [channel=%d,row=%d]", + buff, + imagerow->channel, + imagerow->row + ); + return 1; +} + +/*****************************************************************************\ + image row indexing +\*****************************************************************************/ +static int imluaImageRow_index (lua_State *L) +{ + int index; + imluaImageRow *imagerow = imlua_checkimagerow(L, 1); + imImage *image = imagerow->image; + int channel = imagerow->channel; + int row = imagerow->row; + int column = luaL_checkint(L, 2); + + if (column < 0 || column >= imagerow->image->width) + luaL_argerror(L, 2, "invalid column, out of bounds"); + + index = channel * image->width * image->height + row * image->width + column; + + switch (image->data_type) + { + case IM_BYTE: + { + imbyte *bdata = (imbyte*) image->data[0]; + lua_pushnumber(L, (lua_Number) bdata[index]); + } + break; + + case IM_USHORT: + { + imushort *udata = (imushort*) image->data[0]; + lua_pushnumber(L, (lua_Number) udata[index]); + } + break; + + case IM_INT: + { + int *idata = (int*) image->data[0]; + lua_pushnumber(L, (lua_Number) idata[index]); + } + break; + + case IM_FLOAT: + { + float *fdata = (float*) image->data[0]; + lua_pushnumber(L, (lua_Number) fdata[index]); + } + break; + + case IM_CFLOAT: + { + float *cdata = (float*) image->data[0]; + imlua_newarrayfloat(L, cdata + (2*index), 2, 1); + } + break; + } + + return 1; +} + +/*****************************************************************************\ + image row new index +\*****************************************************************************/ +static int imluaImageRow_newindex (lua_State *L) +{ + int index; + imluaImageRow *imagerow = imlua_checkimagerow(L, 1); + imImage *image = imagerow->image; + int channel = imagerow->channel; + int row = imagerow->row; + int column = luaL_checkint(L, 2); + + if (column < 0 || column >= imagerow->image->width) + luaL_argerror(L, 2, "invalid column, out of bounds"); + + index = channel * image->width * image->height + row * image->width + column; + + switch (image->data_type) + { + case IM_BYTE: + { + lua_Number value = luaL_checknumber(L, 3); + imbyte *bdata = (imbyte*) image->data[0]; + bdata[index] = (imbyte) value; + } + break; + + case IM_USHORT: + { + lua_Number value = luaL_checknumber(L, 3); + imushort *udata = (imushort*) image->data[0]; + udata[index] = (imushort) value; + } + break; + + case IM_INT: + { + lua_Number value = luaL_checknumber(L, 3); + int *idata = (int*) image->data[0]; + idata[index] = (int) value; + } + break; + + case IM_FLOAT: + { + lua_Number value = luaL_checknumber(L, 3); + float *fdata = (float*) image->data[0]; + fdata[index] = (float) value; + } + break; + + case IM_CFLOAT: + { + int count; + float *cdata = (float*) image->data[0]; + float *value = imlua_toarrayfloat(L, 3, &count, 1); + if (count != 2) + { + free(value); + luaL_argerror(L, 3, "invalid value"); + } + + cdata[2*index] = value[0]; + cdata[2*index+1] = value[1]; + free(value); + } + break; + } + + return 0; +} + +/*****************************************************************************\ + image channel indexing +\*****************************************************************************/ +static int imluaImageChannel_index (lua_State *L) +{ + imluaImageChannel *imagechannel = imlua_checkimagechannel(L, 1); + int row = luaL_checkint(L, 2); + + if (row < 0 || row >= imagechannel->image->height) + luaL_argerror(L, 2, "invalid row, out of bounds"); + + imlua_newimagerow(L, imagechannel->image, imagechannel->channel, row); + return 1; +} + +/*****************************************************************************\ + image indexing +\*****************************************************************************/ +static int imluaImage_index (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + + if (lua_isnumber(L, 2)) + { + /* handle numeric indexing */ + int channel = luaL_checkint(L, 2); + + /* create channel */ + if (channel < 0 || channel >= image->depth) + luaL_argerror(L, 2, "invalid channel, out of bounds"); + + imlua_newimagechannel(L, image, channel); + } + else if (lua_isstring(L, 2)) + { + /* get raw method */ + lua_getmetatable(L, 1); + lua_pushvalue(L, 2); + lua_rawget(L, -2); + } + else + { + lua_pushnil(L); + } + + return 1; +} + +static const luaL_reg imimage_lib[] = { + {"ImageCreate", imluaImageCreate}, + {"ImageDestroy", imluaImageDestroy}, + {"FileImageLoad", imluaFileImageLoad}, + {"FileImageLoadBitmap", imluaFileImageLoadBitmap}, + {"FileImageLoadRegion", imluaFileImageLoadRegion}, + {"FileImageSave", imluaFileImageSave}, + {NULL, NULL} +}; + +static const luaL_reg imimage_metalib[] = { + {"Destroy", imluaImageDestroy}, + {"AddAlpha", imluaImageAddAlpha}, + {"Reshape", imluaImageReshape}, + {"Copy", imluaImageCopy}, + {"CopyData", imluaImageCopyData}, + {"Duplicate", imluaImageDuplicate}, + {"Clone", imluaImageClone}, + {"SetAttribute", imluaImageSetAttribute}, + {"GetAttribute", imluaImageGetAttribute}, + {"GetAttributeList", imluaImageGetAttributeList}, + {"Clear", imluaImageClear}, + {"IsBitmap", imluaImageIsBitmap}, + {"GetOpenGLData", imluaImageGetOpenGLData}, + {"SetPalette", imluaImageSetPalette}, + {"GetPalette", imluaImageGetPalette}, + {"CopyAttributes", imluaImageCopyAttributes}, + {"MatchSize", imluaImageMatchSize}, + {"MatchColor", imluaImageMatchColor}, + {"MatchDataType", imluaImageMatchDataType}, + {"MatchColorSpace", imluaImageMatchColorSpace}, + {"Match", imluaImageMatch}, + {"SetBinary", imluaImageSetBinary}, + {"MakeBinary", imluaImageMakeBinary}, + {"MakeGray", imluaImageMakeGray}, + {"Width", imluaImageWidth}, + {"Height", imluaImageHeight}, + {"Depth", imluaImageDepth}, + {"DataType", imluaImageDataType}, + {"ColorSpace", imluaImageColorSpace}, + {"HasAlpha", imluaImageHasAlpha}, + {"Save", imluaImageSave}, + + {"__gc", imluaImage_gc}, + {"__tostring", imluaImage_tostring}, + {"__index", imluaImage_index}, + + {NULL, NULL} +}; + +static void createmeta (lua_State *L) +{ + luaL_newmetatable(L, "imImageChannel"); /* create new metatable for imImageChannel handles */ + lua_pushliteral(L, "__index"); + lua_pushcfunction(L, imluaImageChannel_index); + lua_rawset(L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, imluaImageChannel_tostring); + lua_rawset(L, -3); + lua_pop(L, 1); /* removes the metatable from the top of the stack */ + + luaL_newmetatable(L, "imImageChannelRow"); /* create new metatable for imImageChannelRow handles */ + lua_pushliteral(L, "__index"); + lua_pushcfunction(L, imluaImageRow_index); + lua_rawset(L, -3); + lua_pushliteral(L, "__newindex"); + lua_pushcfunction(L, imluaImageRow_newindex); + lua_rawset(L, -3); + lua_pushliteral(L, "__tostring"); + lua_pushcfunction(L, imluaImageRow_tostring); + lua_rawset(L, -3); + lua_pop(L, 1); /* removes the metatable from the top of the stack */ + + /* Object Oriented Access */ + luaL_newmetatable(L, "imImage"); /* create new metatable for imImage handles */ + lua_pushliteral(L, "__index"); /* dummy code because imluaImage_index will overwrite this behavior */ + lua_pushvalue(L, -2); /* push metatable */ + lua_rawset(L, -3); /* metatable.__index = metatable */ + luaL_register(L, NULL, imimage_metalib); /* register methods */ + lua_pop(L, 1); /* removes the metatable from the top of the stack */ +} + +void imlua_open_image (lua_State *L) +{ + /* "im" table is at the top of the stack */ + createmeta(L); + luaL_register(L, NULL, imimage_lib); +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/im_image_be64.loh" +#else +#include "loh/im_image_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/im_image_le64w.loh" +#else +#include "loh/im_image_le64.loh" +#endif +#else +#include "loh/im_image.loh" +#endif +#endif +} diff --git a/im/src/lua5/imlua_image.h b/im/src/lua5/imlua_image.h new file mode 100755 index 0000000..0a39863 --- /dev/null +++ b/im/src/lua5/imlua_image.h @@ -0,0 +1,38 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_image.h,v 1.1 2008/10/17 06:16:32 scuri Exp $ + */ + +#ifndef __IMLUA_IMAGE_H +#define __IMLUA_IMAGE_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +typedef struct _imluaImageChannel { + imImage *image; + int channel; +} imluaImageChannel; + +typedef struct _imluaImageRow { + imImage *image; + int channel; + int row; +} imluaImageRow; + +void imlua_open_image(lua_State *L); + +int imlua_pushimageerror(lua_State *L, imImage* image, int error); +void imlua_pushimage(lua_State *L, imImage* image); +imImage* imlua_checkimage(lua_State *L, int param); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/im/src/lua5/imlua_jp2.c b/im/src/lua5/imlua_jp2.c new file mode 100755 index 0000000..d69ba7e --- /dev/null +++ b/im/src/lua5/imlua_jp2.c @@ -0,0 +1,44 @@ +/** \file + * \brief jp2 format Lua 5 Binding + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "im_format_jp2.h" + +#include +#include + + +static int imlua_FormatRegisterJP2(lua_State *L) +{ + (void)L; + imFormatRegisterJP2(); + return 0; +} + +static const struct luaL_reg imlib[] = { + {"FormatRegisterJP2", imlua_FormatRegisterJP2}, + {NULL, NULL}, +}; + + +static int imlua_jp2_open (lua_State *L) +{ + imFormatRegisterJP2(); + luaL_register(L, "im", imlib); /* leave "im" table at the top of the stack */ + return 1; +} + +int luaopen_imlua_jp2(lua_State* L) +{ + return imlua_jp2_open(L); +} + +int luaopen_imlua_jp251(lua_State* L) +{ + return imlua_jp2_open(L); +} diff --git a/im/src/lua5/imlua_jp2.def b/im/src/lua5/imlua_jp2.def new file mode 100755 index 0000000..29aa05c --- /dev/null +++ b/im/src/lua5/imlua_jp2.def @@ -0,0 +1,4 @@ +EXPORTS + luaopen_imlua_jp2 + luaopen_imlua_jp251 + \ No newline at end of file diff --git a/im/src/lua5/imlua_kernel.c b/im/src/lua5/imlua_kernel.c new file mode 100755 index 0000000..770a989 --- /dev/null +++ b/im/src/lua5/imlua_kernel.c @@ -0,0 +1,182 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_kernel.c,v 1.1 2008/10/17 06:16:32 scuri Exp $ + */ + +#include +#include +#include + +#include "im.h" +#include "im_image.h" +#include "im_process.h" +#include "im_util.h" +#include "im_kernel.h" + +#include +#include + +#include "imlua.h" +#include "imlua_aux.h" +#include "imlua_image.h" + + +static int imluaKernelSobel(lua_State *L) +{ + imlua_pushimage(L, imKernelSobel()); + return 1; +} + +static int imluaKernelPrewitt(lua_State *L) +{ + imlua_pushimage(L, imKernelPrewitt()); + return 1; +} + +static int imluaKernelKirsh(lua_State *L) +{ + imlua_pushimage(L, imKernelKirsh()); + return 1; +} + +static int imluaKernelLaplacian4(lua_State *L) +{ + imlua_pushimage(L, imKernelLaplacian4()); + return 1; +} + +static int imluaKernelLaplacian8(lua_State *L) +{ + imlua_pushimage(L, imKernelLaplacian8()); + return 1; +} + +static int imluaKernelLaplacian5x5(lua_State *L) +{ + imlua_pushimage(L, imKernelLaplacian5x5()); + return 1; +} + +static int imluaKernelLaplacian7x7(lua_State *L) +{ + imlua_pushimage(L, imKernelLaplacian7x7()); + return 1; +} + +static int imluaKernelGradian3x3(lua_State *L) +{ + imlua_pushimage(L, imKernelGradian3x3()); + return 1; +} + +static int imluaKernelGradian7x7(lua_State *L) +{ + imlua_pushimage(L, imKernelGradian7x7()); + return 1; +} + +static int imluaKernelSculpt(lua_State *L) +{ + imlua_pushimage(L, imKernelSculpt()); + return 1; +} + +static int imluaKernelMean3x3(lua_State *L) +{ + imlua_pushimage(L, imKernelMean3x3()); + return 1; +} + +static int imluaKernelMean5x5(lua_State *L) +{ + imlua_pushimage(L, imKernelMean5x5()); + return 1; +} + +static int imluaKernelCircularMean5x5(lua_State *L) +{ + imlua_pushimage(L, imKernelCircularMean5x5()); + return 1; +} + +static int imluaKernelMean7x7(lua_State *L) +{ + imlua_pushimage(L, imKernelMean7x7()); + return 1; +} + +static int imluaKernelCircularMean7x7(lua_State *L) +{ + imlua_pushimage(L, imKernelCircularMean7x7()); + return 1; +} + +static int imluaKernelGaussian3x3(lua_State *L) +{ + imlua_pushimage(L, imKernelGaussian3x3()); + return 1; +} + +static int imluaKernelGaussian5x5(lua_State *L) +{ + imlua_pushimage(L, imKernelGaussian5x5()); + return 1; +} + +static int imluaKernelBarlett5x5(lua_State *L) +{ + imlua_pushimage(L, imKernelBarlett5x5()); + return 1; +} + +static int imluaKernelTopHat5x5(lua_State *L) +{ + imlua_pushimage(L, imKernelTopHat5x5()); + return 1; +} + +static int imluaKernelTopHat7x7(lua_State *L) +{ + imlua_pushimage(L, imKernelTopHat7x7()); + return 1; +} + +static int imluaKernelEnhance(lua_State *L) +{ + imlua_pushimage(L, imKernelEnhance()); + return 1; +} + + +static const luaL_reg imkernel_lib[] = { + {"KernelSobel", imluaKernelSobel}, + {"KernelPrewitt", imluaKernelPrewitt}, + {"KernelKirsh", imluaKernelKirsh}, + {"KernelLaplacian4", imluaKernelLaplacian4}, + {"KernelLaplacian8", imluaKernelLaplacian8}, + {"KernelLaplacian5x5", imluaKernelLaplacian5x5}, + {"KernelLaplacian7x7", imluaKernelLaplacian7x7}, + {"KernelGradian3x3", imluaKernelGradian3x3}, + {"KernelGradian7x7", imluaKernelGradian7x7}, + {"KernelSculpt", imluaKernelSculpt}, + {"KernelMean3x3", imluaKernelMean3x3}, + {"KernelMean5x5", imluaKernelMean5x5}, + {"KernelCircularMean5x5", imluaKernelCircularMean5x5}, + {"KernelMean7x7", imluaKernelMean7x7}, + {"KernelCircularMean7x7", imluaKernelCircularMean7x7}, + {"KernelGaussian3x3", imluaKernelGaussian3x3}, + {"KernelGaussian5x5", imluaKernelGaussian5x5}, + {"KernelBarlett5x5", imluaKernelBarlett5x5}, + {"KernelTopHat5x5", imluaKernelTopHat5x5}, + {"KernelTopHat7x7", imluaKernelTopHat7x7}, + {"KernelEnhance", imluaKernelEnhance}, + {NULL, NULL} +}; + +void imlua_open_kernel (lua_State *L) +{ + /* "im" table is at the top of the stack */ + luaL_register(L, NULL, imkernel_lib); +} diff --git a/im/src/lua5/imlua_palette.c b/im/src/lua5/imlua_palette.c new file mode 100755 index 0000000..80d23eb --- /dev/null +++ b/im/src/lua5/imlua_palette.c @@ -0,0 +1,399 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_palette.c,v 1.1 2008/10/17 06:16:32 scuri Exp $ + */ + +#include +#include +#include + +#include "im.h" +#include "im_image.h" +#include "im_util.h" +#include "im_palette.h" + +#include +#include + +#include "imlua.h" +#include "imlua_aux.h" +#include "imlua_palette.h" + + +static imluaPalette* imlua_rawcheckpalette(lua_State *L, int param) +{ + void *p = lua_touserdata(L, param); + if (p != NULL) { /* value is a userdata? */ + if (lua_getmetatable(L, param)) { /* does it have a metatable? */ + lua_getfield(L, LUA_REGISTRYINDEX, "imPalette"); /* get correct metatable */ + if (lua_rawequal(L, -1, -2)) { /* does it have the correct mt? */ + lua_pop(L, 2); /* remove both metatables */ + return (imluaPalette*)p; + } + lua_pop(L, 1); /* remove previous metatable */ + + /* check also for CD palette */ + lua_getfield(L, LUA_REGISTRYINDEX, "cdPalette"); /* get correct metatable */ + if (lua_rawequal(L, -1, -2)) { /* does it have the correct mt? */ + lua_pop(L, 2); /* remove both metatables */ + return (imluaPalette*)p; + } + } + } + luaL_typerror(L, param, "imPalette"); /* else error */ + return NULL; /* to avoid warnings */ +} + +imluaPalette* imlua_checkpalette (lua_State *L, int param) +{ + imluaPalette* pal = imlua_rawcheckpalette(L, param); + if (!pal->color) + luaL_argerror(L, param, "destroyed imPalette"); + + return pal; +} + +void imlua_pushpalette(lua_State *L, long* color, int count) +{ + imluaPalette *pal = (imluaPalette*) lua_newuserdata(L, sizeof(imluaPalette)); + pal->count = count; + pal->color = color; + luaL_getmetatable(L, "imPalette"); + lua_setmetatable(L, -2); +} + +/***************************************************************************\ +* Creates a palette as a "imPalette" userdata. A palette can be * +* considered and treated as a color table. * +* im.PaletteCreate(count: number) -> (palette: "imPalette") * +\***************************************************************************/ +static int imluaPaletteCreate(lua_State *L) +{ + long* color; + + int count = luaL_optint(L, 1, 256); + if (count < 1 || count > 256) + luaL_argerror(L, 1, "palette count should be a positive integer and less then 256"); + + color = (long*)malloc(256*sizeof(long)); + memset(color, 0, 256*sizeof(long)); + + imlua_pushpalette(L, color, count); + return 1; +} + + +/*****************************************************************************\ + im.PaletteFindNearest +\*****************************************************************************/ +static int imluaPaletteFindNearest (lua_State *L) +{ + imluaPalette *pal = imlua_checkpalette(L, 1); + long color = (long int) lua_touserdata(L, 1); + + lua_pushnumber(L, imPaletteFindNearest(pal->color, pal->count, color)); + return 1; +} + +/*****************************************************************************\ + im.PaletteFindColor +\*****************************************************************************/ +static int imluaPaletteFindColor (lua_State *L) +{ + imluaPalette *pal = imlua_checkpalette(L, 1); + long color = (long) lua_touserdata(L, 2); + unsigned char tol = (unsigned char)luaL_checkint(L, 3); + + lua_pushnumber(L, imPaletteFindColor(pal->color, pal->count, color, tol)); + return 1; +} + +/*****************************************************************************\ + im.PaletteGray +\*****************************************************************************/ +static int imluaPaletteGray (lua_State *L) +{ + imlua_pushpalette(L, imPaletteGray(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteRed +\*****************************************************************************/ +static int imluaPaletteRed (lua_State *L) +{ + imlua_pushpalette(L, imPaletteRed(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteGreen +\*****************************************************************************/ +static int imluaPaletteGreen (lua_State *L) +{ + imlua_pushpalette(L, imPaletteGreen(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteBlue +\*****************************************************************************/ +static int imluaPaletteBlue (lua_State *L) +{ + imlua_pushpalette(L, imPaletteBlue(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteYellow +\*****************************************************************************/ +static int imluaPaletteYellow (lua_State *L) +{ + imlua_pushpalette(L, imPaletteYellow(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteMagenta +\*****************************************************************************/ +static int imluaPaletteMagenta (lua_State *L) +{ + imlua_pushpalette(L, imPaletteMagenta(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteCian +\*****************************************************************************/ +static int imluaPaletteCian (lua_State *L) +{ + imlua_pushpalette(L, imPaletteCian(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteRainbow +\*****************************************************************************/ +static int imluaPaletteRainbow (lua_State *L) +{ + imlua_pushpalette(L, imPaletteRainbow(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteHues +\*****************************************************************************/ +static int imluaPaletteHues (lua_State *L) +{ + imlua_pushpalette(L, imPaletteHues(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteBlueIce +\*****************************************************************************/ +static int imluaPaletteBlueIce (lua_State *L) +{ + imlua_pushpalette(L, imPaletteBlueIce(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteHotIron +\*****************************************************************************/ +static int imluaPaletteHotIron (lua_State *L) +{ + imlua_pushpalette(L, imPaletteHotIron(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteBlackBody +\*****************************************************************************/ +static int imluaPaletteBlackBody (lua_State *L) +{ + imlua_pushpalette(L, imPaletteBlackBody(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteHighContrast +\*****************************************************************************/ +static int imluaPaletteHighContrast (lua_State *L) +{ + imlua_pushpalette(L, imPaletteHighContrast(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteUniform +\*****************************************************************************/ +static int imluaPaletteUniform (lua_State *L) +{ + imlua_pushpalette(L, imPaletteUniform(), 256); + return 1; +} + +/*****************************************************************************\ + im.PaletteUniformIndex +\*****************************************************************************/ +static int imluaPaletteUniformIndex (lua_State *L) +{ + lua_pushnumber(L, imPaletteUniformIndex((long int) lua_touserdata(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.PaletteUniformIndexHalftoned +\*****************************************************************************/ +static int imluaPaletteUniformIndexHalftoned (lua_State *L) +{ + long color = (long) lua_touserdata(L, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + + lua_pushnumber(L, imPaletteUniformIndexHalftoned(color, x, y)); + return 1; +} + +/***************************************************************************\ +* Frees a previously allocated palette * +* im.PaletteDestroy(palette: "imPalette") * +\***************************************************************************/ +static int imluaPaletteDestroy (lua_State *L) +{ + imluaPalette *pal = imlua_rawcheckpalette(L, 1); + if (!pal->color) + luaL_argerror(L, 1, "destroyed imPalette"); + + free(pal->color); + pal->color = NULL; /* mark as destroyed */ + pal->count = 0; + + return 0; +} + +/*****************************************************************************\ + gc +\*****************************************************************************/ +static int imluaPalette_gc(lua_State *L) +{ + imluaPalette *pal = (imluaPalette*)lua_touserdata(L, 1); + if (pal && pal->color) + { + free(pal->color); + pal->color = NULL; /* mark as destroyed */ + pal->count = 0; + } + + return 0; +} + +/***************************************************************************\ +* color = palette[i] * +\***************************************************************************/ +static int imluaPalette_index(lua_State *L) +{ + imluaPalette *pal = imlua_checkpalette(L, 1); + int index_i = luaL_checkint(L, 2); + + if (index_i < 0 || index_i >= pal->count) + luaL_argerror(L, 2, "index is out of bounds"); + + lua_pushlightuserdata(L, (void*) pal->color[index_i]); + return 1; +} + +/***************************************************************************\ +* palette[i] = color * +\***************************************************************************/ +static int imluaPalette_newindex(lua_State *L) +{ + long color_i; + imluaPalette *pal = imlua_checkpalette(L, 1); + int index_i = luaL_checkint(L, 2); + + if (index_i < 0 || index_i >= pal->count) + luaL_argerror(L, 2, "index is out of bounds"); + + if (!lua_islightuserdata(L, 3)) + luaL_argerror(L, 3, "color must be a light user data"); + + color_i = (long int) lua_touserdata(L, 3); + + pal->color[index_i] = color_i; + return 0; +} + +/*****************************************************************************\ + len +\*****************************************************************************/ +static int imluaPalette_len(lua_State *L) +{ + imluaPalette *pal = (imluaPalette*)lua_touserdata(L, 1); + lua_pushinteger(L, pal->count); + return 1; +} + +/*****************************************************************************\ + tostring +\*****************************************************************************/ +static int imluaPalette_tostring (lua_State *L) +{ + imluaPalette *pal = (imluaPalette*)lua_touserdata(L, 1); + lua_pushfstring(L, "imPalette(%p)%s", pal, (pal->color)? "": "-destroyed"); + return 1; +} + +static const luaL_reg impalette_lib[] = { + {"PaletteFindNearest", imluaPaletteFindNearest}, + {"PaletteFindColor", imluaPaletteFindColor}, + {"PaletteGray", imluaPaletteGray }, + {"PaletteRed", imluaPaletteRed }, + {"PaletteGreen", imluaPaletteGreen }, + {"PaletteBlue", imluaPaletteBlue }, + {"PaletteYellow", imluaPaletteYellow }, + {"PaletteMagenta", imluaPaletteMagenta }, + {"PaletteCian", imluaPaletteCian }, + {"PaletteRainbow", imluaPaletteRainbow }, + {"PaletteHues", imluaPaletteHues }, + {"PaletteBlueIce", imluaPaletteBlueIce }, + {"PaletteHotIron", imluaPaletteHotIron }, + {"PaletteBlackBody", imluaPaletteBlackBody }, + {"PaletteHighContrast", imluaPaletteHighContrast }, + {"PaletteUniform", imluaPaletteUniform }, + {"PaletteUniformIndex", imluaPaletteUniformIndex }, + {"PaletteUniformIndexHalftoned", imluaPaletteUniformIndexHalftoned }, + + {"PaletteDestroy", imluaPaletteDestroy}, + {"PaletteCreate", imluaPaletteCreate}, + + {NULL, NULL} +}; + +static const luaL_reg impalette_metalib[] = { + {"__gc", imluaPalette_gc}, + {"__tostring", imluaPalette_tostring}, + {"__index", imluaPalette_index}, + {"__newindex", imluaPalette_newindex}, + {"__len", imluaPalette_len}, + + {NULL, NULL} +}; + +static void createmeta (lua_State *L) +{ + /* there is no object orientation for imPalette, only array access */ + luaL_newmetatable(L, "imPalette"); /* create new metatable for imPalette handles */ + luaL_register(L, NULL, impalette_metalib); /* register methods */ + lua_pop(L, 1); /* removes the metatable from the top of the stack */ +} + +void imlua_open_palette (lua_State *L) +{ + /* "im" table is at the top of the stack */ + createmeta(L); + luaL_register(L, NULL, impalette_lib); +} diff --git a/im/src/lua5/imlua_palette.h b/im/src/lua5/imlua_palette.h new file mode 100755 index 0000000..453fd01 --- /dev/null +++ b/im/src/lua5/imlua_palette.h @@ -0,0 +1,32 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_palette.h,v 1.1 2008/10/17 06:16:32 scuri Exp $ + */ + +#ifndef __IMLUA_PALETTE_H +#define __IMLUA_PALETTE_H + +#if defined(__cplusplus) +extern "C" { +#endif + + +/* this is the same declaration used in the CD toolkit for cdPalette in Lua */ +typedef struct _imPalette { + long* color; + int count; +} imluaPalette; + +void imlua_pushpalette(lua_State *L, long* color, int count); +imluaPalette* imlua_checkpalette (lua_State *L, int param); + +void imlua_open_palette(lua_State *L); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/im/src/lua5/imlua_process.c b/im/src/lua5/imlua_process.c new file mode 100755 index 0000000..863c1d6 --- /dev/null +++ b/im/src/lua5/imlua_process.c @@ -0,0 +1,3143 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_process.c,v 1.8 2009/10/01 02:56:58 scuri Exp $ + */ + +#include +#include +#include + +#include "im.h" +#include "im_image.h" +#include "im_process.h" +#include "im_util.h" + +#include +#include + +#include "imlua.h" +#include "imlua_aux.h" +#include "imlua_image.h" + + + +/*****************************************************************************\ + Image Statistics Calculations +\*****************************************************************************/ + +/*****************************************************************************\ + im.CalcRMSError(image1, image2) +\*****************************************************************************/ +static int imluaCalcRMSError (lua_State *L) +{ + imImage* image1 = imlua_checkimage(L, 1); + imImage* image2 = imlua_checkimage(L, 2); + + imlua_match(L, image1, image2); + + lua_pushnumber(L, imCalcRMSError(image1, image2)); + return 1; +} + +/*****************************************************************************\ + im.CalcSNR(src_image, noise_image) +\*****************************************************************************/ +static int imluaCalcSNR (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* noise_image = imlua_checkimage(L, 2); + + imlua_match(L, src_image, noise_image); + + lua_pushnumber(L, imCalcSNR(src_image, noise_image)); + return 1; +} + +/*****************************************************************************\ + im.CalcCountColors(src_image) +\*****************************************************************************/ +static int imluaCalcCountColors (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + + imlua_checkdatatype(L, 1, src_image, IM_BYTE); + if (src_image->color_space >= IM_CMYK) + luaL_argerror(L, 1, "color space can be RGB, Gray, Binary or Map only"); + + lua_pushnumber(L, imCalcCountColors(src_image)); + return 1; +} + +/*****************************************************************************\ + im.CalcHistogram(src_image, plane, cumulative) +\*****************************************************************************/ +static int imluaCalcHistogram (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + int plane = luaL_checkint(L, 2); + int cumulative = lua_toboolean(L, 3); + + switch (src_image->data_type) + { + case IM_BYTE: + { + unsigned long hist[256]; + imCalcHistogram((imbyte*) src_image->data[plane], src_image->count, hist, cumulative); + imlua_newarrayulong(L, hist, 256, 0); + } + break; + + case IM_USHORT: + { + unsigned long hist[65535]; + imCalcUShortHistogram(src_image->data[plane], src_image->count, hist, cumulative); + imlua_newarrayulong(L, hist, 65535, 0); + } + break; + + default: + luaL_argerror(L, 1, "data_type can be byte or ushort only"); + break; + } + + return 1; +} + +/*****************************************************************************\ + im.CalcGrayHistogram(src_image, cumulative) +\*****************************************************************************/ +static int imluaCalcGrayHistogram (lua_State *L) +{ + unsigned long hist[256]; + imImage* src_image = imlua_checkimage(L, 1); + int cumulative = lua_toboolean(L, 2); + + imlua_checkdatatype(L, 1, src_image, IM_BYTE); + if (src_image->color_space >= IM_CMYK) + luaL_argerror(L, 1, "color space can be RGB, Gray, Binary or Map only"); + + imCalcGrayHistogram(src_image, hist, cumulative); + imlua_newarrayulong(L, hist, 256, 0); + + return 1; +} + +/*****************************************************************************\ + im.CalcImageStatistics(src_image) +\*****************************************************************************/ +static int imluaCalcImageStatistics (lua_State *L) +{ + imStats stats; + imImage *image = imlua_checkimage(L, 1); + + if (image->data_type == IM_CFLOAT) + luaL_argerror(L, 1, "data type can NOT be of type cfloat"); + + imCalcImageStatistics(image, &stats); + + lua_newtable(L); + lua_pushstring(L, "max"); lua_pushnumber(L, stats.max); lua_settable(L, -3); + lua_pushstring(L, "min"); lua_pushnumber(L, stats.min); lua_settable(L, -3); + lua_pushstring(L, "positive"); lua_pushnumber(L, stats.positive); lua_settable(L, -3); + lua_pushstring(L, "negative"); lua_pushnumber(L, stats.negative); lua_settable(L, -3); + lua_pushstring(L, "zeros"); lua_pushnumber(L, stats.zeros); lua_settable(L, -3); + lua_pushstring(L, "mean"); lua_pushnumber(L, stats.mean); lua_settable(L, -3); + lua_pushstring(L, "stddev"); lua_pushnumber(L, stats.stddev); lua_settable(L, -3); + return 1; +} + +/*****************************************************************************\ + im.CalcHistogramStatistics(src_image) +\*****************************************************************************/ +static int imluaCalcHistogramStatistics (lua_State *L) +{ + imStats stats; + imImage *image = imlua_checkimage(L, 1); + + imlua_checkdatatype(L, 1, image, IM_BYTE); + + imCalcHistogramStatistics(image, &stats); + + lua_newtable(L); + lua_pushstring(L, "max"); lua_pushnumber(L, stats.max); lua_settable(L, -3); + lua_pushstring(L, "min"); lua_pushnumber(L, stats.min); lua_settable(L, -3); + lua_pushstring(L, "positive"); lua_pushnumber(L, stats.positive); lua_settable(L, -3); + lua_pushstring(L, "negative"); lua_pushnumber(L, stats.negative); lua_settable(L, -3); + lua_pushstring(L, "zeros"); lua_pushnumber(L, stats.zeros); lua_settable(L, -3); + lua_pushstring(L, "mean"); lua_pushnumber(L, stats.mean); lua_settable(L, -3); + lua_pushstring(L, "stddev"); lua_pushnumber(L, stats.stddev); lua_settable(L, -3); + return 1; +} + +/*****************************************************************************\ + im.CalcHistoImageStatistics +\*****************************************************************************/ +static int imluaCalcHistoImageStatistics (lua_State *L) +{ + int* median; + int* mode; + + imImage *image = imlua_checkimage(L, 1); + + imlua_checkdatatype(L, 1, image, IM_BYTE); + + median = (int*)malloc(sizeof(int)*image->depth); + mode = (int*)malloc(sizeof(int)*image->depth); + + imCalcHistoImageStatistics(image, median, mode); + + imlua_newarrayint (L, median, image->depth, 0); + imlua_newarrayint (L, mode, image->depth, 0); + + free(median); + free(mode); + + return 2; +} + +/*****************************************************************************\ + Image Analysis +\*****************************************************************************/ + +/*****************************************************************************\ + im.AnalyzeFindRegions(src_image, dst_image, connect, touch_border) +\*****************************************************************************/ +static int imluaAnalyzeFindRegions (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + int connect = luaL_checkint(L, 3); + int touch_border = lua_toboolean(L, 4); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_checktype(L, 2, dst_image, IM_GRAY, IM_USHORT); + + luaL_argcheck(L, (connect == 4 || connect == 8), 3, "invalid connect value, must be 4 or 8"); + lua_pushnumber(L, imAnalyzeFindRegions(src_image, dst_image, connect, touch_border)); + return 1; +} + +static int iGetMax(imImage* image) +{ + int max = 0; + int i; + + imushort* data = (imushort*)image->data[0]; + for (i = 0; i < image->count; i++) + { + if (*data > max) + max = *data; + + data++; + } + + return max; +} + +static int imlua_checkregioncount(lua_State *L, int narg, imImage* image) +{ + if (lua_isnoneornil(L, narg)) return iGetMax(image); + else return (int)luaL_checknumber(L, narg); +} + + +/*****************************************************************************\ + im.AnalyzeMeasureArea(image, [count]) +\*****************************************************************************/ +static int imluaAnalyzeMeasureArea (lua_State *L) +{ + int count; + int *area; + + imImage* image = imlua_checkimage(L, 1); + + imlua_checktype(L, 1, image, IM_GRAY, IM_USHORT); + + count = imlua_checkregioncount(L, 2, image); + area = (int*) malloc(sizeof(int) * count); + + imAnalyzeMeasureArea(image, area, count); + + imlua_newarrayint(L, area, count, 0); + free(area); + + return 1; +} + +/*****************************************************************************\ + im.AnalyzeMeasurePerimArea(image) +\*****************************************************************************/ +static int imluaAnalyzeMeasurePerimArea (lua_State *L) +{ + int count; + float *perimarea; + + imImage* image = imlua_checkimage(L, 1); + + imlua_checktype(L, 1, image, IM_GRAY, IM_USHORT); + + count = imlua_checkregioncount(L, 2, image); + perimarea = (float*) malloc(sizeof(float) * count); + + imAnalyzeMeasurePerimArea(image, perimarea); + + imlua_newarrayfloat (L, perimarea, count, 0); + free(perimarea); + + return 1; +} + +/*****************************************************************************\ + im.AnalyzeMeasureCentroid(image, [area], [count]) +\*****************************************************************************/ +static int imluaAnalyzeMeasureCentroid (lua_State *L) +{ + int count; + float *cx, *cy; + int *area; + + imImage* image = imlua_checkimage(L, 1); + + imlua_checktype(L, 1, image, IM_GRAY, IM_USHORT); + + area = imlua_toarrayint(L, 2, &count, 0); + count = imlua_checkregioncount(L, 3, image); + + cx = (float*) malloc (sizeof(float) * count); + cy = (float*) malloc (sizeof(float) * count); + + imAnalyzeMeasureCentroid(image, area, count, cx, cy); + + imlua_newarrayfloat(L, cx, count, 0); + imlua_newarrayfloat(L, cy, count, 0); + + if (area) + free(area); + free(cx); + free(cy); + + return 2; +} + +/*****************************************************************************\ + im.AnalyzeMeasurePrincipalAxis(image, [area], [cx], [cy]) +\*****************************************************************************/ +static int imluaAnalyzeMeasurePrincipalAxis (lua_State *L) +{ + int count; + float *cx, *cy; + int *area; + float *major_slope, *major_length, *minor_slope, *minor_length; + + imImage* image = imlua_checkimage(L, 1); + + imlua_checktype(L, 1, image, IM_GRAY, IM_USHORT); + + area = imlua_toarrayint(L, 2, &count, 0); + cx = imlua_toarrayfloat(L, 3, NULL, 0); + cy = imlua_toarrayfloat(L, 4, NULL, 0); + count = imlua_checkregioncount(L, 5, image); + + major_slope = (float*) malloc (sizeof(float) * count); + major_length = (float*) malloc (sizeof(float) * count); + minor_slope = (float*) malloc (sizeof(float) * count); + minor_length = (float*) malloc (sizeof(float) * count); + + imAnalyzeMeasurePrincipalAxis(image, area, cx, cy, count, major_slope, major_length, minor_slope, minor_length); + + imlua_newarrayfloat(L, major_slope, count, 0); + imlua_newarrayfloat(L, major_length, count, 0); + imlua_newarrayfloat(L, minor_slope, count, 0); + imlua_newarrayfloat(L, minor_length, count, 0); + + if (area) + free(area); + if (cx) + free(cx); + if (cy) + free(cy); + + free(major_slope); + free(major_length); + free(minor_slope); + free(minor_length); + + return 4; +} + +/*****************************************************************************\ + im.AnalyzeMeasureHoles +\*****************************************************************************/ +static int imluaAnalyzeMeasureHoles (lua_State *L) +{ + int holes_count, count; + int connect; + int *area = NULL; + float *perim = NULL; + + imImage* image = imlua_checkimage(L, 1); + + imlua_checktype(L, 1, image, IM_GRAY, IM_USHORT); + + connect = luaL_checkint(L, 2); + count = imlua_checkregioncount(L, 3, image); + + area = (int*) malloc (sizeof(int) * count); + perim = (float*) malloc (sizeof(float) * count); + + imAnalyzeMeasureHoles(image, connect, &holes_count, area, perim); + + lua_pushnumber(L, holes_count); + imlua_newarrayint(L, area, holes_count, 0); + imlua_newarrayfloat(L, perim, holes_count, 0); + + if (area) + free(area); + if (perim) + free(perim); + + return 3; +} + +/*****************************************************************************\ + im.AnalyzeMeasurePerimeter(image, [count]) +\*****************************************************************************/ +static int imluaAnalyzeMeasurePerimeter (lua_State *L) +{ + int count; + float *perim; + + imImage* image = imlua_checkimage(L, 1); + + imlua_checktype(L, 1, image, IM_GRAY, IM_USHORT); + + count = imlua_checkregioncount(L, 2, image); + perim = (float*) malloc(sizeof(float) * count); + + imAnalyzeMeasurePerimeter(image, perim, count); + + imlua_newarrayfloat(L, perim, count, 0); + + free(perim); + + return 1; +} + +/*****************************************************************************\ + im.ProcessPerimeterLine(src_image, dst_image) +\*****************************************************************************/ +static int imluaProcessPerimeterLine (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + luaL_argcheck(L, (src_image->data_type < IM_FLOAT), 1, "image data type can be integer only"); + imlua_match(L, src_image, dst_image); + + imProcessPerimeterLine(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessRemoveByArea(src_image, dst_image, connect, start_size, end_size, inside) +\*****************************************************************************/ +static int imluaProcessRemoveByArea (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + int connect = luaL_checkint(L, 3); + int start_size = luaL_checkint(L, 4); + int end_size = luaL_checkint(L, 5); + int inside = lua_toboolean(L, 6); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_match(L, src_image, dst_image); + luaL_argcheck(L, (connect == 4 || connect == 8), 3, "invalid connect value, must be 4 or 8"); + + imProcessRemoveByArea(src_image, dst_image, connect, start_size, end_size, inside); + return 0; +} + +/*****************************************************************************\ + im.ProcessFillHoles(src_image, dst_image, connect) +\*****************************************************************************/ +static int imluaProcessFillHoles (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + int connect = luaL_checkint(L, 3); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_match(L, src_image, dst_image); + luaL_argcheck(L, (connect == 4 || connect == 8), 3, "invalid connect value, must be 4 or 8"); + + imProcessFillHoles(src_image, dst_image, connect); + return 0; +} + +static void imlua_checkhoughsize(lua_State *L, imImage* image, imImage* hough_image, int param) +{ +#define IMSQR(_x) (_x*_x) + int hough_rmax; + if (hough_image->width != 180) + luaL_argerror(L, param, "invalid image width"); + + hough_rmax = (int)(sqrt((double)(IMSQR(image->width) + IMSQR(image->height)))/2.0); + if (hough_image->height != 2*hough_rmax+1) + luaL_argerror(L, param, "invalid image height"); +} + +/*****************************************************************************\ + im.ProcessHoughLines(src_image, dst_image) +\*****************************************************************************/ +static int imluaProcessHoughLines (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_checktype(L, 2, dst_image, IM_GRAY, IM_INT); + imlua_checkhoughsize(L, src_image, dst_image, 2); + + lua_pushboolean(L, imProcessHoughLines(src_image, dst_image)); + return 0; +} + +/*****************************************************************************\ + im.ProcessHoughLinesDraw(src_image, hough_points, dst_image) +\*****************************************************************************/ +static int imluaProcessHoughLinesDraw (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* hough_points = imlua_checkimage(L, 3); + imImage* dst_image = imlua_checkimage(L, 4); + imImage* hough = NULL; + if (lua_isuserdata(L, 2)) + { + hough = imlua_checkimage(L, 2); + imlua_checktype(L, 2, hough, IM_GRAY, IM_INT); + imlua_checkhoughsize(L, src_image, hough, 2); + } + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + imlua_checkcolorspace(L, 3, hough_points, IM_BINARY); + imlua_checkhoughsize(L, src_image, hough_points, 3); + imlua_matchsize(L, src_image, dst_image); + + lua_pushnumber(L, imProcessHoughLinesDraw(src_image, hough, hough_points, dst_image)); + return 0; +} + +/*****************************************************************************\ + im.ProcessDistanceTransform(src_image, dst_image) +\*****************************************************************************/ +static int imluaProcessDistanceTransform (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_checkdatatype(L, 2, dst_image, IM_FLOAT); + imlua_matchsize(L, src_image, dst_image); + + imProcessDistanceTransform(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessRegionalMaximum(src_image, dst_image) +\*****************************************************************************/ +static int imluaProcessRegionalMaximum (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_FLOAT); + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image, dst_image); + + imProcessRegionalMaximum(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + Image Resize +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessReduce(src_image, dst_image, order) +\*****************************************************************************/ +static int imluaProcessReduce (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + int order = luaL_checkint(L, 3); + + imlua_matchcolor(L, src_image, dst_image); + luaL_argcheck(L, (order == 0 || order == 1), 3, "invalid order, must be 0 or 1"); + + lua_pushboolean(L, imProcessReduce(src_image, dst_image, order)); + return 1; +} + +/*****************************************************************************\ + im.ProcessResize(src_image, dst_image, order) +\*****************************************************************************/ +static int imluaProcessResize (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + int order = luaL_checkint(L, 3); + + imlua_matchcolor(L, src_image, dst_image); + luaL_argcheck(L, (order == 0 || order == 1 || order == 3), 3, "invalid order, must be 0, 1 or 3"); + + lua_pushboolean(L, imProcessResize(src_image, dst_image, order)); + return 1; +} + +/*****************************************************************************\ + im.ProcessReduceBy4(src_image, dst_image) +\*****************************************************************************/ +static int imluaProcessReduceBy4 (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + + imlua_matchcolor(L, src_image, dst_image); + luaL_argcheck(L, + dst_image->width == (src_image->width / 2) && + dst_image->height == (src_image->height / 2), 3, "destiny image size must be source image width/2, height/2"); + + imProcessReduceBy4(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessCrop(src_image, dst_image, xmin, ymin) +\*****************************************************************************/ +static int imluaProcessCrop (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + int xmin = luaL_checkint(L, 3); + int ymin = luaL_checkint(L, 4); + + imlua_matchcolor(L, src_image, dst_image); + luaL_argcheck(L, xmin >= 0 && xmin < src_image->width, 3, "xmin must be >= 0 and < width"); + luaL_argcheck(L, ymin >= 0 && ymin < src_image->height, 4, "ymin must be >= 0 and < height"); + luaL_argcheck(L, dst_image->width <= (src_image->width - xmin), 2, "destiny image size must be smaller than source image width-xmin"); + luaL_argcheck(L, dst_image->height <= (src_image->height - ymin), 2, "destiny image size must be smaller than source image height-ymin"); + + imProcessCrop(src_image, dst_image, xmin, ymin); + return 0; +} + +/*****************************************************************************\ + im.ProcessInsert(src_image, region_image, dst_image, xmin, ymin) +\*****************************************************************************/ +static int imluaProcessInsert (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* region_image = imlua_checkimage(L, 2); + imImage* dst_image = imlua_checkimage(L, 3); + int xmin = luaL_checkint(L, 4); + int ymin = luaL_checkint(L, 5); + + imlua_matchcolor(L, src_image, dst_image); + luaL_argcheck(L, xmin >= 0 && xmin < src_image->width, 3, "xmin must be >= 0 and < width"); + luaL_argcheck(L, ymin >= 0 && ymin < src_image->height, 3, "ymin must be >= 0 and < height"); + + imProcessInsert(src_image, region_image, dst_image, xmin, ymin); + return 0; +} + +/*****************************************************************************\ + im.ProcessAddMargins(src_image, dst_image, xmin, ymin) +\*****************************************************************************/ +static int imluaProcessAddMargins (lua_State *L) +{ + imImage* src_image = imlua_checkimage(L, 1); + imImage* dst_image = imlua_checkimage(L, 2); + int xmin = luaL_checkint(L, 3); + int ymin = luaL_checkint(L, 4); + + imlua_matchcolor(L, src_image, dst_image); + luaL_argcheck(L, dst_image->width > (src_image->width + xmin), 2, "destiny image size must be greatter than source image width+xmin, height+ymin"); + luaL_argcheck(L, dst_image->height > (src_image->height + ymin), 2, "destiny image size must be greatter than source image width+xmin, height+ymin"); + + imProcessAddMargins(src_image, dst_image, xmin, ymin); + return 0; +} + + + +/*****************************************************************************\ + Geometric Operations +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessCalcRotateSize +\*****************************************************************************/ +static int imluaProcessCalcRotateSize (lua_State *L) +{ + int new_width, new_height; + + int width = luaL_checkint(L, 1); + int height = luaL_checkint(L, 2); + double cos0 = (double) luaL_checknumber(L, 3); + double sin0 = (double) luaL_checknumber(L, 4); + + imProcessCalcRotateSize(width, height, &new_width, &new_height, cos0, sin0); + lua_pushnumber(L, new_width); + lua_pushnumber(L, new_height); + return 2; +} + +/*****************************************************************************\ + im.ProcessRotate +\*****************************************************************************/ +static int imluaProcessRotate (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + double cos0 = (double) luaL_checknumber(L, 3); + double sin0 = (double) luaL_checknumber(L, 4); + int order = luaL_checkint(L, 5); + + imlua_matchcolor(L, src_image, dst_image); + luaL_argcheck(L, (order == 0 || order == 1 || order == 3), 5, "invalid order, must be 0, 1 or 3"); + + lua_pushboolean(L, imProcessRotate(src_image, dst_image, cos0, sin0, order)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRotateRef +\*****************************************************************************/ +static int imluaProcessRotateRef (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + double cos0 = (double) luaL_checknumber(L, 3); + double sin0 = (double) luaL_checknumber(L, 4); + int x = luaL_checkint(L, 5); + int y = luaL_checkint(L, 6); + int to_origin = lua_toboolean(L, 7); + int order = luaL_checkint(L, 8); + + imlua_matchcolor(L, src_image, dst_image); + luaL_argcheck(L, (order == 0 || order == 1 || order == 3), 5, "invalid order, must be 0, 1, or 3"); + + lua_pushboolean(L, imProcessRotateRef(src_image, dst_image, cos0, sin0, x, y, to_origin, order)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRotate90 +\*****************************************************************************/ +static int imluaProcessRotate90 (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int dir = lua_toboolean(L, 3); + + imlua_matchcolor(L, src_image, dst_image); + luaL_argcheck(L, dst_image->width == src_image->height && dst_image->height == src_image->width, 2, "destiny width and height must have the source height and width"); + luaL_argcheck(L, (dir == -1 || dir == 1), 3, "invalid dir, can be -1 or 1 only"); + + imProcessRotate90(src_image, dst_image, dir); + return 0; +} + +/*****************************************************************************\ + im.ProcessRotate180 +\*****************************************************************************/ +static int imluaProcessRotate180 (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_match(L, src_image, dst_image); + + imProcessRotate180(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessMirror +\*****************************************************************************/ +static int imluaProcessMirror (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_match(L, src_image, dst_image); + + imProcessMirror(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessFlip +\*****************************************************************************/ +static int imluaProcessFlip (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_match(L, src_image, dst_image); + + imProcessFlip(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessInterlaceSplit +\*****************************************************************************/ +static int imluaProcessInterlaceSplit (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image1 = imlua_checkimage(L, 2); + imImage *dst_image2 = imlua_checkimage(L, 3); + + imlua_matchcolor(L, src_image, dst_image1); + imlua_matchcolor(L, src_image, dst_image2); + luaL_argcheck(L, dst_image1->width == src_image->width && dst_image2->width == src_image->width, 2, "destiny width must be equal to source width"); + + if (src_image->height%2) + { + int dst_height1 = src_image->height/2 + 1; + luaL_argcheck(L, dst_image1->height == dst_height1, 2, "destiny1 height must be equal to source height/2+1 if height odd"); + } + else + luaL_argcheck(L, dst_image1->height == src_image->height/2, 2, "destiny1 height must be equal to source height/2 if height even"); + + luaL_argcheck(L, dst_image2->height == src_image->height/2, 2, "destiny2 height must be equal to source height/2"); + + imProcessInterlaceSplit(src_image, dst_image1, dst_image2); + return 0; +} + +/*****************************************************************************\ + im.ProcessRadial +\*****************************************************************************/ +static int imluaProcessRadial (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float k1 = (float) luaL_checknumber(L, 3); + int order = luaL_checkint(L, 4); + + imlua_match(L, src_image, dst_image); + luaL_argcheck(L, (order == 0 || order == 1 || order == 3), 4, "invalid order"); + + lua_pushboolean(L, imProcessRadial(src_image, dst_image, k1, order)); + return 1; +} + +/*****************************************************************************\ + im.ProcessSwirl +\*****************************************************************************/ +static int imluaProcessSwirl(lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float k1 = (float) luaL_checknumber(L, 3); + int order = luaL_checkint(L, 4); + + imlua_match(L, src_image, dst_image); + luaL_argcheck(L, (order == 0 || order == 1 || order == 3), 4, "invalid order, can be 0, 1 or 3"); + + lua_pushboolean(L, imProcessSwirl(src_image, dst_image, k1, order)); + return 1; +} + +static void imlua_checknotcfloat(lua_State *L, imImage *image, int index) +{ + if (image->data_type == IM_CFLOAT) + luaL_argerror(L, index, "image data type can NOT be cfloat"); +} + + +/*****************************************************************************\ + Morphology Operations for Gray Images +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessGrayMorphConvolve +\*****************************************************************************/ +static int imluaProcessGrayMorphConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + imImage *kernel = imlua_checkimage(L, 3); + int ismax = lua_toboolean(L, 4); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + imlua_checkdatatype(L, 3, kernel, IM_INT); + imlua_matchsize(L, src_image, kernel); + + lua_pushboolean(L, imProcessGrayMorphConvolve(src_image, dst_image, kernel, ismax)); + return 1; +} + +/*****************************************************************************\ + im.ProcessGrayMorphErode +\*****************************************************************************/ +static int imluaProcessGrayMorphErode (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessGrayMorphErode(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessGrayMorphDilate +\*****************************************************************************/ +static int imluaProcessGrayMorphDilate (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessGrayMorphDilate(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessGrayMorphOpen +\*****************************************************************************/ +static int imluaProcessGrayMorphOpen (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessGrayMorphOpen(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessGrayMorphClose +\*****************************************************************************/ +static int imluaProcessGrayMorphClose (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessGrayMorphClose(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessGrayMorphTopHat +\*****************************************************************************/ +static int imluaProcessGrayMorphTopHat (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessGrayMorphTopHat(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessGrayMorphWell +\*****************************************************************************/ +static int imluaProcessGrayMorphWell (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessGrayMorphWell(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessGrayMorphGradient +\*****************************************************************************/ +static int imluaProcessGrayMorphGradient (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessGrayMorphGradient(src_image, dst_image, kernel_size)); + return 1; +} + + + +/*****************************************************************************\ + Morphology Operations for Binary Images +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessBinMorphConvolve +\*****************************************************************************/ +static int imluaProcessBinMorphConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + imImage *kernel = imlua_checkimage(L, 3); + int hit_white = lua_toboolean(L, 4); + int iter = luaL_checkint(L, 5); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_match(L, src_image, dst_image); + imlua_checkdatatype(L, 3, kernel, IM_INT); + imlua_matchsize(L, src_image, kernel); + + lua_pushboolean(L, imProcessBinMorphConvolve(src_image, dst_image, kernel, hit_white, iter)); + return 1; +} + +/*****************************************************************************\ + im.ProcessBinMorphErode +\*****************************************************************************/ +static int imluaProcessBinMorphErode (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + int iter = luaL_checkint(L, 4); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessBinMorphErode(src_image, dst_image, kernel_size, iter)); + return 1; +} + +/*****************************************************************************\ + im.ProcessBinMorphDilate +\*****************************************************************************/ +static int imluaProcessBinMorphDilate (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + int iter = luaL_checkint(L, 4); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessBinMorphDilate(src_image, dst_image, kernel_size, iter)); + return 1; +} + +/*****************************************************************************\ + im.ProcessBinMorphOpen +\*****************************************************************************/ +static int imluaProcessBinMorphOpen (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + int iter = luaL_checkint(L, 4); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessBinMorphOpen(src_image, dst_image, kernel_size, iter)); + return 1; +} + +/*****************************************************************************\ + im.ProcessBinMorphClose +\*****************************************************************************/ +static int imluaProcessBinMorphClose (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + int iter = luaL_checkint(L, 4); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessBinMorphClose(src_image, dst_image, kernel_size, iter)); + return 1; +} + +/*****************************************************************************\ + im.ProcessBinMorphOutline +\*****************************************************************************/ +static int imluaProcessBinMorphOutline (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + int iter = luaL_checkint(L, 4); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessBinMorphOutline(src_image, dst_image, kernel_size, iter)); + return 1; +} + +/*****************************************************************************\ + im.ProcessBinMorphThin +\*****************************************************************************/ +static int imluaProcessBinMorphThin (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_checkcolorspace(L, 1, src_image, IM_BINARY); + imlua_match(L, src_image, dst_image); + + imProcessBinMorphThin(src_image, dst_image); + return 0; +} + + + +/*****************************************************************************\ + Rank Convolution Operations +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessMedianConvolve +\*****************************************************************************/ +static int imluaProcessMedianConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessMedianConvolve(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRangeConvolve +\*****************************************************************************/ +static int imluaProcessRangeConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessRangeConvolve(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRankClosestConvolve +\*****************************************************************************/ +static int imluaProcessRankClosestConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessRankClosestConvolve(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRankMaxConvolve +\*****************************************************************************/ +static int imluaProcessRankMaxConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessRankMaxConvolve(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRankMinConvolve +\*****************************************************************************/ +static int imluaProcessRankMinConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessRankMinConvolve(src_image, dst_image, kernel_size)); + return 1; +} + + +/*****************************************************************************\ + Convolution Operations +\*****************************************************************************/ + +static void imlua_checkkernel(lua_State *L, imImage* kernel, int index) +{ + imlua_checkcolorspace(L, index, kernel, IM_GRAY); + luaL_argcheck(L, kernel->data_type == IM_INT || kernel->data_type == IM_FLOAT, index, "kernel data type can be int or float only"); +} + +/*****************************************************************************\ + im.ProcessConvolve +\*****************************************************************************/ +static int imluaProcessConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + imImage *kernel = imlua_checkimage(L, 3); + + imlua_match(L, src_image, dst_image); + imlua_checkkernel(L, kernel, 3); + + lua_pushboolean(L, imProcessConvolve(src_image, dst_image, kernel)); + return 1; +} + +/*****************************************************************************\ + im.ProcessConvolveDual +\*****************************************************************************/ +static int imluaProcessConvolveDual (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + imImage *kernel1 = imlua_checkimage(L, 3); + imImage *kernel2 = imlua_checkimage(L, 4); + + imlua_match(L, src_image, dst_image); + imlua_checkkernel(L, kernel1, 3); + imlua_checkkernel(L, kernel2, 4); + + lua_pushboolean(L, imProcessConvolveDual(src_image, dst_image, kernel1, kernel2)); + return 1; +} + +/*****************************************************************************\ + im.ProcessConvolveRep +\*****************************************************************************/ +static int imluaProcessConvolveRep (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + imImage *kernel = imlua_checkimage(L, 3); + int count = luaL_checkint(L, 4); + + imlua_match(L, src_image, dst_image); + imlua_checkkernel(L, kernel, 3); + + lua_pushboolean(L, imProcessConvolveRep(src_image, dst_image, kernel, count)); + return 1; +} + +/*****************************************************************************\ + im.ProcessConvolveSep +\*****************************************************************************/ +static int imluaProcessConvolveSep (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + imImage *kernel = imlua_checkimage(L, 3); + + imlua_match(L, src_image, dst_image); + imlua_checkkernel(L, kernel, 3); + + lua_pushboolean(L, imProcessConvolveSep(src_image, dst_image, kernel)); + return 1; +} + +/*****************************************************************************\ + im.ProcessCompassConvolve +\*****************************************************************************/ +static int imluaProcessCompassConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + imImage *kernel = imlua_checkimage(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + imlua_checkkernel(L, kernel, 3); + + lua_pushboolean(L, imProcessCompassConvolve(src_image, dst_image, kernel)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRotateKernel +\*****************************************************************************/ +static int imluaProcessRotateKernel (lua_State *L) +{ + imProcessRotateKernel(imlua_checkimage(L, 1)); + return 0; +} + +/*****************************************************************************\ + im.ProcessDiffOfGaussianConvolve +\*****************************************************************************/ +static int imluaProcessDiffOfGaussianConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float stddev1 = (float) luaL_checknumber(L, 3); + float stddev2 = (float) luaL_checknumber(L, 4); + + if (src_image->data_type == IM_BYTE || src_image->data_type == IM_USHORT) + { + imlua_matchcolor(L, src_image, dst_image); + imlua_checkdatatype(L, 2, dst_image, IM_INT); + } + else + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessDiffOfGaussianConvolve(src_image, dst_image, stddev1, stddev2)); + return 1; +} + +/*****************************************************************************\ + im.ProcessLapOfGaussianConvolve +\*****************************************************************************/ +static int imluaProcessLapOfGaussianConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float stddev = (float) luaL_checknumber(L, 3); + + if (src_image->data_type == IM_BYTE || src_image->data_type == IM_USHORT) + { + imlua_matchcolor(L, src_image, dst_image); + imlua_checkdatatype(L, 2, dst_image, IM_INT); + } + else + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessLapOfGaussianConvolve(src_image, dst_image, stddev)); + return 1; +} + +/*****************************************************************************\ + im.ProcessMeanConvolve +\*****************************************************************************/ +static int imluaProcessMeanConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessMeanConvolve(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessBarlettConvolve +\*****************************************************************************/ +static int imluaProcessBarlettConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessBarlettConvolve(src_image, dst_image, kernel_size)); + return 1; +} + +/*****************************************************************************\ + im.ProcessGaussianConvolve +\*****************************************************************************/ +static int imluaProcessGaussianConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float stddev = (float) luaL_checknumber(L, 3); + + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessGaussianConvolve(src_image, dst_image, stddev)); + return 1; +} + +/*****************************************************************************\ + im.ProcessPrewittConvolve +\*****************************************************************************/ +static int imluaProcessPrewittConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessPrewittConvolve(src_image, dst_image)); + return 1; +} + +/*****************************************************************************\ + im.ProcessSplineEdgeConvolve +\*****************************************************************************/ +static int imluaProcessSplineEdgeConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessSplineEdgeConvolve(src_image, dst_image)); + return 1; +} + +/*****************************************************************************\ + im.ProcessSobelConvolve +\*****************************************************************************/ +static int imluaProcessSobelConvolve (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessSobelConvolve(src_image, dst_image)); + return 1; +} + +/*****************************************************************************\ + im.ProcessZeroCrossing +\*****************************************************************************/ +static int imluaProcessZeroCrossing (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + luaL_argcheck(L, src_image->data_type == IM_INT || src_image->data_type == IM_FLOAT, 1, "image data type can be int or float only"); + imlua_match(L, src_image, dst_image); + + imProcessZeroCrossing(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessCanny +\*****************************************************************************/ +static int imluaProcessCanny (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float stddev = (float) luaL_checknumber(L, 3); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + imlua_match(L, src_image, dst_image); + + imProcessCanny(src_image, dst_image, stddev); + return 0; +} + +/*****************************************************************************\ + im.ProcessUnsharp +\*****************************************************************************/ +static int imluaProcessUnsharp(lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float p1 = (float)luaL_checknumber(L, 3); + float p2 = (float)luaL_checknumber(L, 4); + float p3 = (float)luaL_checknumber(L, 5); + + imlua_match(L, src_image, dst_image); + + imProcessUnsharp(src_image, dst_image, p1, p2, p3); + return 0; +} + +/*****************************************************************************\ + im.ProcessSharp +\*****************************************************************************/ +static int imluaProcessSharp(lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float p1 = (float)luaL_checknumber(L, 3); + float p2 = (float)luaL_checknumber(L, 4); + + imlua_match(L, src_image, dst_image); + + imProcessSharp(src_image, dst_image, p1, p2); + return 0; +} + +/*****************************************************************************\ + im.ProcessSharpKernel +\*****************************************************************************/ +static int imluaProcessSharpKernel(lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *kernel = imlua_checkimage(L, 2); + imImage *dst_image = imlua_checkimage(L, 3); + float p1 = (float)luaL_checknumber(L, 4); + float p2 = (float)luaL_checknumber(L, 5); + + imlua_match(L, src_image, dst_image); + + imProcessSharpKernel(src_image, kernel, dst_image, p1, p2); + return 0; +} + +/*****************************************************************************\ + im.GaussianStdDev2Repetitions +\*****************************************************************************/ +static int imluaGaussianKernelSize2StdDev(lua_State *L) +{ + lua_pushnumber(L, imGaussianKernelSize2StdDev((int)luaL_checknumber(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.GaussianStdDev2KernelSize +\*****************************************************************************/ +static int imluaGaussianStdDev2KernelSize (lua_State *L) +{ + lua_pushnumber(L, imGaussianStdDev2KernelSize((float)luaL_checknumber(L, 1))); + return 1; +} + + + +/*****************************************************************************\ + Arithmetic Operations +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessUnArithmeticOp +\*****************************************************************************/ +static int imluaProcessUnArithmeticOp (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int op = luaL_checkint(L, 3); + + imlua_matchcolorspace(L, src_image, dst_image); + + imProcessUnArithmeticOp(src_image, dst_image, op); + return 0; +} + +/*****************************************************************************\ + im.ProcessArithmeticOp +\*****************************************************************************/ +static int imluaProcessArithmeticOp (lua_State *L) +{ + imImage *src_image1 = imlua_checkimage(L, 1); + imImage *src_image2 = imlua_checkimage(L, 2); + imImage *dst_image = imlua_checkimage(L, 3); + int op = luaL_checkint(L, 4); + + imlua_match(L, src_image1, src_image2); + imlua_matchsize(L, src_image1, dst_image); + imlua_matchsize(L, src_image2, dst_image); + + switch (src_image1->data_type) + { + case IM_BYTE: + luaL_argcheck(L, + dst_image->data_type == IM_BYTE || + dst_image->data_type == IM_USHORT || + dst_image->data_type == IM_INT || + dst_image->data_type == IM_FLOAT, + 2, "source image is byte, destiny image data type can be byte, ushort, int and float only."); + break; + case IM_USHORT: + luaL_argcheck(L, + dst_image->data_type == IM_USHORT || + dst_image->data_type == IM_INT || + dst_image->data_type == IM_FLOAT, + 2, "source image is ushort, destiny image data type can be ushort, int and float only."); + break; + case IM_INT: + luaL_argcheck(L, + dst_image->data_type == IM_INT || + dst_image->data_type == IM_FLOAT, + 2, "source image is int, destiny image data type can be int and float only."); + break; + case IM_FLOAT: + luaL_argcheck(L, + dst_image->data_type == IM_FLOAT, + 2, "source image is float, destiny image data type can be float only."); + break; + case IM_CFLOAT: + luaL_argcheck(L, + dst_image->data_type == IM_CFLOAT, + 2, "source image is cfloat, destiny image data type can be cfloat only."); + break; + } + + imProcessArithmeticOp(src_image1, src_image2, dst_image, op); + return 0; +} + +/*****************************************************************************\ + im.ProcessArithmeticConstOp +\*****************************************************************************/ +static int imluaProcessArithmeticConstOp (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + float src_const = (float) luaL_checknumber(L, 2); + imImage *dst_image = imlua_checkimage(L, 3); + int op = luaL_checkint(L, 4); + + imlua_matchsize(L, src_image, dst_image); + + switch (src_image->data_type) + { + case IM_BYTE: + luaL_argcheck(L, + dst_image->data_type == IM_BYTE || + dst_image->data_type == IM_USHORT || + dst_image->data_type == IM_INT || + dst_image->data_type == IM_FLOAT, + 2, "source image is byte, destiny image data type can be byte, ushort, int and float only."); + break; + case IM_USHORT: + luaL_argcheck(L, + dst_image->data_type == IM_USHORT || + dst_image->data_type == IM_INT || + dst_image->data_type == IM_FLOAT, + 2, "source image is ushort, destiny image data type can be ushort, int and float only."); + break; + case IM_INT: + luaL_argcheck(L, + dst_image->data_type == IM_INT || + dst_image->data_type == IM_FLOAT, + 2, "source image is int, destiny image data type can be int and float only."); + break; + case IM_FLOAT: + luaL_argcheck(L, + dst_image->data_type == IM_FLOAT, + 2, "source image is float, destiny image data type can be float only."); + break; + case IM_CFLOAT: + luaL_argcheck(L, + dst_image->data_type == IM_CFLOAT, + 2, "source image is cfloat, destiny image data type can be cfloat only."); + break; + } + + imProcessArithmeticConstOp(src_image, src_const, dst_image, op); + return 0; +} + +/*****************************************************************************\ + im.ProcessBlendConst +\*****************************************************************************/ +static int imluaProcessBlendConst (lua_State *L) +{ + imImage *src_image1 = imlua_checkimage(L, 1); + imImage *src_image2 = imlua_checkimage(L, 2); + imImage *dst_image = imlua_checkimage(L, 3); + float alpha = (float) luaL_checknumber(L, 4); + + imlua_match(L, src_image1, src_image2); + imlua_match(L, src_image1, dst_image); + + imProcessBlendConst(src_image1, src_image2, dst_image, alpha); + return 0; +} + +/*****************************************************************************\ + im.ProcessBlend +\*****************************************************************************/ +static int imluaProcessBlend (lua_State *L) +{ + imImage *src_image1 = imlua_checkimage(L, 1); + imImage *src_image2 = imlua_checkimage(L, 2); + imImage *alpha_image = imlua_checkimage(L, 3); + imImage *dst_image = imlua_checkimage(L, 4); + + imlua_match(L, src_image1, src_image2); + imlua_match(L, src_image1, dst_image); + imlua_matchdatatype(L, src_image1, alpha_image); + + imProcessBlend(src_image1, src_image2, alpha_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessSplitComplex +\*****************************************************************************/ +static int imluaProcessSplitComplex (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image1 = imlua_checkimage(L, 2); + imImage *dst_image2 = imlua_checkimage(L, 3); + int polar = lua_toboolean(L, 4); + + imlua_checkdatatype(L, 1, src_image, IM_CFLOAT); + imlua_checkdatatype(L, 2, dst_image1, IM_FLOAT); + imlua_checkdatatype(L, 3, dst_image2, IM_FLOAT); + imlua_matchcolorspace(L, src_image, dst_image1); + imlua_matchcolorspace(L, src_image, dst_image2); + + imProcessSplitComplex(src_image, dst_image1, dst_image2, polar); + return 0; +} + +/*****************************************************************************\ + im.ProcessMergeComplex +\*****************************************************************************/ +static int imluaProcessMergeComplex (lua_State *L) +{ + imImage *src_image1 = imlua_checkimage(L, 1); + imImage *src_image2 = imlua_checkimage(L, 2); + imImage *dst_image = imlua_checkimage(L, 3); + int polar = lua_toboolean(L, 4); + + imlua_checkdatatype(L, 1, src_image1, IM_FLOAT); + imlua_checkdatatype(L, 2, src_image2, IM_FLOAT); + imlua_checkdatatype(L, 3, dst_image, IM_CFLOAT); + imlua_matchcolorspace(L, src_image1, src_image2); + imlua_matchcolorspace(L, src_image1, dst_image); + + imProcessMergeComplex(src_image1, src_image2, dst_image, polar); + return 0; +} + +/*****************************************************************************\ + im.ProcessMultipleMean +\*****************************************************************************/ +static int imluaProcessMultipleMean (lua_State *L) +{ + int i, src_image_count; + imImage *dst_image; + imImage **src_image_list; + + luaL_checktype(L, 1, LUA_TTABLE); + src_image_count = imlua_getn(L, 1); + + src_image_list = (imImage**)malloc(sizeof(imImage*)*src_image_count); + + for (i = 0; i < src_image_count; i++) + { + lua_rawgeti(L, 1, i+1); + src_image_list[i] = imlua_checkimage(L, -1); + } + + dst_image = imlua_checkimage(L, 2); + + for (i = 0; i < src_image_count; i++) + { + int check = imImageMatchDataType(src_image_list[i], dst_image); + if (!check) free(src_image_list); + imlua_matchcheck(L, check, "images must have the same size and data type"); + } + + imProcessMultipleMean((const imImage**)src_image_list, src_image_count, dst_image); + free(src_image_list); + return 0; +} + +/*****************************************************************************\ + im.ProcessMultipleStdDev +\*****************************************************************************/ +static int imluaProcessMultipleStdDev (lua_State *L) +{ + int i, src_image_count, check; + imImage *dst_image, *mean_image; + imImage **src_image_list; + + if (!lua_istable(L, 1)) + luaL_argerror(L, 1, "must be a table"); + + lua_pushstring(L, "table"); + lua_gettable(L, LUA_GLOBALSINDEX); + lua_pushstring(L, "getn"); + lua_gettable(L, -2); + src_image_count = luaL_checkint(L, -1); + lua_pop(L, 1); + + src_image_list = (imImage**) malloc(src_image_count * sizeof(imImage*)); + + for (i = 0; i < src_image_count; i++) + { + lua_rawgeti(L, 1, i+1); + src_image_list[i] = imlua_checkimage(L, -1); + } + + mean_image = imlua_checkimage(L, 2); + dst_image = imlua_checkimage(L, 3); + + for (i = 0; i < src_image_count; i++) + { + check = imImageMatchDataType(src_image_list[i], dst_image); + if (!check) free(src_image_list); + imlua_matchcheck(L, check, "images must have the same size and data type"); + } + check = imImageMatchDataType(mean_image, dst_image); + if (!check) free(src_image_list); + imlua_matchcheck(L, check, "images must have the same size and data type"); + + imProcessMultipleStdDev((const imImage**)src_image_list, src_image_count, mean_image, dst_image); + free(src_image_list); + return 0; +} + +/*****************************************************************************\ + im.ProcessAutoCovariance +\*****************************************************************************/ +static int imluaProcessAutoCovariance (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *mean_image = imlua_checkimage(L, 2); + imImage *dst_image = imlua_checkimage(L, 3); + + imlua_match(L, src_image, mean_image); + imlua_matchcolorspace(L, src_image, dst_image); + imlua_checkdatatype(L, 3, dst_image, IM_FLOAT); + + lua_pushboolean(L, imProcessAutoCovariance(src_image, mean_image, dst_image)); + return 1; +} + +/*****************************************************************************\ + im.ProcessMultiplyConj +\*****************************************************************************/ +static int imluaProcessMultiplyConj (lua_State *L) +{ + imImage *src_image1 = imlua_checkimage(L, 1); + imImage *src_image2 = imlua_checkimage(L, 2); + imImage *dst_image = imlua_checkimage(L, 3); + + imlua_match(L, src_image1, src_image2); + imlua_match(L, src_image1, dst_image); + + imProcessMultiplyConj(src_image1, src_image2, dst_image); + return 0; +} + + +/*****************************************************************************\ + Additional Image Quantization Operations +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessQuantizeRGBUniform +\*****************************************************************************/ +static int imluaProcessQuantizeRGBUniform (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int dither = lua_toboolean(L, 3); + + imlua_checktype(L, 1, src_image, IM_RGB, IM_BYTE); + imlua_checkcolorspace(L, 2, dst_image, IM_MAP); + imlua_matchsize(L, src_image, dst_image); + + imProcessQuantizeRGBUniform(src_image, dst_image, dither); + return 0; +} + +/*****************************************************************************\ + im.ProcessQuantizeGrayUniform +\*****************************************************************************/ +static int imluaProcessQuantizeGrayUniform (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int grays = luaL_checkint(L, 3); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + imlua_checktype(L, 2, dst_image, IM_GRAY, IM_BYTE); + imlua_match(L, src_image, dst_image); + + imProcessQuantizeGrayUniform(src_image, dst_image, grays); + return 0; +} + + +/*****************************************************************************\ + Histogram Based Operations +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessExpandHistogram +\*****************************************************************************/ +static int imluaProcessExpandHistogram (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float percent = (float) luaL_checknumber(L, 3); + + imlua_checkdatatype(L, 1, src_image, IM_BYTE); + imlua_match(L, src_image, dst_image); + luaL_argcheck(L, src_image->color_space == IM_RGB || src_image->color_space == IM_GRAY, 1, "color space can be RGB or Gray only"); + luaL_argcheck(L, dst_image->color_space == IM_RGB || dst_image->color_space == IM_GRAY, 2, "color space can be RGB or Gray only"); + + imProcessExpandHistogram(src_image, dst_image, percent); + return 0; +} + +/*****************************************************************************\ + im.ProcessEqualizeHistogram +\*****************************************************************************/ +static int imluaProcessEqualizeHistogram (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_checkdatatype(L, 1, src_image, IM_BYTE); + imlua_match(L, src_image, dst_image); + luaL_argcheck(L, src_image->color_space == IM_RGB || src_image->color_space == IM_GRAY, 1, "color space can be RGB or Gray only"); + luaL_argcheck(L, dst_image->color_space == IM_RGB || dst_image->color_space == IM_GRAY, 2, "color space can be RGB or Gray only"); + + imProcessEqualizeHistogram(src_image, dst_image); + return 0; +} + + + +/*****************************************************************************\ + Color Processing Operations +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessSplitYChroma +\*****************************************************************************/ +static int imluaProcessSplitYChroma (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *y_image = imlua_checkimage(L, 2); + imImage *chroma_image = imlua_checkimage(L, 3); + + imlua_checktype(L, 1, src_image, IM_RGB, IM_BYTE); + imlua_checktype(L, 2, y_image, IM_GRAY, IM_BYTE); + imlua_checktype(L, 3, chroma_image, IM_RGB, IM_BYTE); + imlua_matchsize(L, src_image, y_image); + imlua_matchsize(L, src_image, chroma_image); + + imProcessSplitYChroma(src_image, y_image, chroma_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessSplitHSI +\*****************************************************************************/ +static int imluaProcessSplitHSI (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *h_image = imlua_checkimage(L, 2); + imImage *s_image = imlua_checkimage(L, 3); + imImage *i_image = imlua_checkimage(L, 4); + + imlua_checkcolorspace(L, 1, src_image, IM_RGB); + luaL_argcheck(L, src_image->data_type == IM_BYTE || src_image->data_type == IM_FLOAT, 1, "data type can be float or byte only"); + imlua_checktype(L, 2, h_image, IM_GRAY, IM_FLOAT); + imlua_checktype(L, 3, s_image, IM_GRAY, IM_FLOAT); + imlua_checktype(L, 4, i_image, IM_GRAY, IM_FLOAT); + imlua_matchsize(L, src_image, h_image); + imlua_matchsize(L, src_image, s_image); + imlua_matchsize(L, src_image, i_image); + + imProcessSplitHSI(src_image, h_image, s_image, i_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessMergeHSI +\*****************************************************************************/ +static int imluaProcessMergeHSI (lua_State *L) +{ + imImage *h_image = imlua_checkimage(L, 1); + imImage *s_image = imlua_checkimage(L, 2); + imImage *i_image = imlua_checkimage(L, 3); + imImage *dst_image = imlua_checkimage(L, 4); + + imlua_checktype(L, 1, h_image, IM_GRAY, IM_FLOAT); + imlua_checktype(L, 2, s_image, IM_GRAY, IM_FLOAT); + imlua_checktype(L, 3, i_image, IM_GRAY, IM_FLOAT); + imlua_checkcolorspace(L, 4, dst_image, IM_RGB); + luaL_argcheck(L, dst_image->data_type == IM_BYTE || dst_image->data_type == IM_FLOAT, 4, "data type can be float or byte only"); + imlua_matchsize(L, dst_image, h_image); + imlua_matchsize(L, dst_image, s_image); + imlua_matchsize(L, dst_image, i_image); + + imProcessMergeHSI(h_image, s_image, i_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessSplitComponents(src_image, { r, g, b} ) +\*****************************************************************************/ +static int imluaProcessSplitComponents (lua_State *L) +{ + int i; + imImage *src_image = imlua_checkimage(L, 1); + imImage **dst_image_list; + + luaL_checktype(L, 2, LUA_TTABLE); + + if (imlua_getn(L, 2) != src_image->depth) + luaL_error(L, "number of destiny images must match the depth of the source image"); + + dst_image_list = (imImage**)malloc(sizeof(imImage*)*src_image->depth); + + for (i = 0; i < src_image->depth; i++) + { + lua_pushnumber(L, i+1); + lua_gettable(L, 2); + dst_image_list[i] = imlua_checkimage(L, -1); + imlua_checkcolorspace(L, 2, dst_image_list[i], IM_GRAY); /* if error here, there will be a memory leak */ + lua_pop(L, 1); + } + + for (i = 0; i < src_image->depth; i++) + { + int check = imImageMatchDataType(src_image, dst_image_list[i]); + if (!check) free(dst_image_list); + imlua_matchcheck(L, check, "images must have the same size and data type"); + } + + imProcessSplitComponents(src_image, dst_image_list); + + free(dst_image_list); + + return 0; +} + +/*****************************************************************************\ + im.ProcessMergeComponents({r, g, b}, rgb) +\*****************************************************************************/ +static int imluaProcessMergeComponents (lua_State *L) +{ + int i; + imImage** src_image_list; + imImage *dst_image; + + luaL_checktype(L, 1, LUA_TTABLE); + dst_image = imlua_checkimage(L, 2); + + if (imlua_getn(L, 1) != dst_image->depth) + luaL_error(L, "number of source images must match the depth of the destination image"); + + src_image_list = (imImage**)malloc(sizeof(imImage*)*dst_image->depth); + + for (i = 0; i < dst_image->depth; i++) + { + lua_pushnumber(L, i+1); + lua_gettable(L, 1); + src_image_list[i] = imlua_checkimage(L, -1); + imlua_checkcolorspace(L, 1, src_image_list[i], IM_GRAY); + lua_pop(L, 1); + } + + for (i = 0; i < dst_image->depth; i++) + { + int check = imImageMatchDataType(src_image_list[i], dst_image); + if (!check) free(src_image_list); + imlua_matchcheck(L, check, "images must have the same size and data type"); + } + + imProcessMergeComponents((const imImage**)src_image_list, dst_image); + + free(src_image_list); + + return 0; +} + +/*****************************************************************************\ + im.ProcessNormalizeComponents +\*****************************************************************************/ +static int imluaProcessNormalizeComponents (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_checkdatatype(L, 2, dst_image, IM_FLOAT); + imlua_matchcolorspace(L, src_image, dst_image); + + imProcessNormalizeComponents(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessReplaceColor +\*****************************************************************************/ +static int imluaProcessReplaceColor (lua_State *L) +{ + int src_count, dst_count; + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float *src_color = imlua_toarrayfloat(L, 3, &src_count, 1); + float *dst_color = imlua_toarrayfloat(L, 4, &dst_count, 1); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + luaL_argcheck(L, src_count == src_image->depth, 3, "the colors must have the same number of components of the images"); + luaL_argcheck(L, dst_count == src_image->depth, 4, "the colors must have the same number of components of the images"); + + imProcessReplaceColor(src_image, dst_image, src_color, dst_color); + return 0; +} + + + +/*****************************************************************************\ + Logical Arithmetic Operations +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessBitwiseOp +\*****************************************************************************/ +static int imluaProcessBitwiseOp (lua_State *L) +{ + imImage *src_image1 = imlua_checkimage(L, 1); + imImage *src_image2 = imlua_checkimage(L, 2); + imImage *dst_image = imlua_checkimage(L, 3); + int op = luaL_checkint(L, 4); + + luaL_argcheck(L, (src_image1->data_type < IM_FLOAT), 1, "image data type can be integer only"); + imlua_match(L, src_image1, src_image2); + imlua_match(L, src_image1, dst_image); + + imProcessBitwiseOp(src_image1, src_image2, dst_image, op); + return 0; +} + +/*****************************************************************************\ + im.ProcessBitwiseNot +\*****************************************************************************/ +static int imluaProcessBitwiseNot (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + luaL_argcheck(L, (src_image->data_type < IM_FLOAT), 1, "image data type can be integer only"); + imlua_match(L, src_image, dst_image); + + imProcessBitwiseNot(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessBitMask(src_image, dst_image, mask, op) +\*****************************************************************************/ +static int imluaProcessBitMask (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + unsigned char mask = imlua_checkmask(L, 3); + int op = luaL_checkint(L, 4); + + imlua_checkdatatype(L, 1, src_image, IM_BYTE); + imlua_match(L, src_image, dst_image); + + imProcessBitMask(src_image, dst_image, mask, op); + return 0; +} + +/*****************************************************************************\ + im.ProcessBitPlane(src_image, dst_image, plane, reset) +\*****************************************************************************/ +static int imluaProcessBitPlane (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int plane = luaL_checkint(L, 3); + int reset = lua_toboolean(L, 4); + + imlua_checkdatatype(L, 1, src_image, IM_BYTE); + imlua_match(L, src_image, dst_image); + + imProcessBitPlane(src_image, dst_image, plane, reset); + return 0; +} + + + +/*****************************************************************************\ + Synthetic Image Render +\*****************************************************************************/ + +/* NOTE: This breaks on multithread */ +static lua_State *g_renderState = NULL; +int g_paramCount = 0; + +static float imluaRenderFunc (int x, int y, int d, float *param) +{ + lua_State *L = g_renderState; + + luaL_checktype(L, 2, LUA_TFUNCTION); + lua_pushvalue(L, 2); + lua_pushnumber(L, x); + lua_pushnumber(L, y); + lua_pushnumber(L, d); + imlua_newarrayfloat(L, param, g_paramCount, 1); + + lua_call(L, 4, 1); + + return (float) luaL_checknumber(L, -1); +} + +/*****************************************************************************\ + im.ProcessRenderOp(image, function, name, param, plus) +\*****************************************************************************/ +static int imluaProcessRenderOp (lua_State *L) +{ + int count; + + imImage *image = imlua_checkimage(L, 1); + const char *render_name = luaL_checkstring(L, 3); + float *param = imlua_toarrayfloat(L, 4, &count, 1); + int plus = luaL_checkint(L, 5); + + imlua_checknotcfloat(L, image, 1); + + luaL_checktype(L, 2, LUA_TFUNCTION); + + g_renderState = L; + g_paramCount = count; + lua_pushboolean(L, imProcessRenderOp(image, imluaRenderFunc, (char*) render_name, param, plus)); + return 1; +} + +static float imluaRenderCondFunc (int x, int y, int d, int *cond, float *param) +{ + lua_State *L = g_renderState; + + luaL_checktype(L, 2, LUA_TFUNCTION); + lua_pushvalue(L, 2); + lua_pushnumber(L, x); + lua_pushnumber(L, y); + lua_pushnumber(L, d); + imlua_newarrayfloat(L, param, g_paramCount, 1); + + lua_call(L, 4, 2); + + *cond = lua_toboolean(L, -1); + return (float) luaL_checknumber(L, -2); +} + +/*****************************************************************************\ + im.ProcessRenderCondOp(image, function, name, param) +\*****************************************************************************/ +static int imluaProcessRenderCondOp (lua_State *L) +{ + int count; + + imImage *image = imlua_checkimage(L, 1); + const char *render_name = luaL_checkstring(L, 3); + float *param = imlua_toarrayfloat(L, 4, &count, 1); + + imlua_checknotcfloat(L, image, 1); + + luaL_checktype(L, 2, LUA_TFUNCTION); + + g_renderState = L; + g_paramCount = count; + lua_pushboolean(L, imProcessRenderCondOp(image, imluaRenderCondFunc, (char*) render_name, param)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderAddSpeckleNoise +\*****************************************************************************/ +static int imluaProcessRenderAddSpeckleNoise (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float percent = (float) luaL_checknumber(L, 3); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessRenderAddSpeckleNoise(src_image, dst_image, percent)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderAddGaussianNoise +\*****************************************************************************/ +static int imluaProcessRenderAddGaussianNoise (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float mean = (float) luaL_checknumber(L, 3); + float stddev = (float) luaL_checknumber(L, 4); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessRenderAddGaussianNoise(src_image, dst_image, mean, stddev)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderAddUniformNoise +\*****************************************************************************/ +static int imluaProcessRenderAddUniformNoise (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float mean = (float) luaL_checknumber(L, 3); + float stddev = (float) luaL_checknumber(L, 4); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + lua_pushboolean(L, imProcessRenderAddUniformNoise(src_image, dst_image, mean, stddev)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderRandomNoise +\*****************************************************************************/ +static int imluaProcessRenderRandomNoise (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + imlua_checknotcfloat(L, image, 1); + lua_pushboolean(L, imProcessRenderRandomNoise(image)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderConstant(image, [count]) +\*****************************************************************************/ +static int imluaProcessRenderConstant (lua_State *L) +{ + int i; + float *value = NULL; + + imImage *image = imlua_checkimage(L, 1); + int count = image->depth; + + imlua_checknotcfloat(L, image, 1); + + if (lua_istable(L, 2)) + { + value = (float*) malloc (sizeof(float) * count); + + for (i = 0; i < count; i++) + { + lua_rawgeti(L, 2, i+1); + value[i] = (float) lua_tonumber(L, -1); + lua_pop(L, 1); + } + } + + lua_pushboolean(L, imProcessRenderConstant(image, value)); + + if (value) + free(value); + + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderWheel +\*****************************************************************************/ +static int imluaProcessRenderWheel (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + int int_radius = luaL_checkint(L, 2); + int ext_radius = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderWheel(image, int_radius, ext_radius)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderCone +\*****************************************************************************/ +static int imluaProcessRenderCone (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + int radius = luaL_checkint(L, 2); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderCone(image, radius)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderTent +\*****************************************************************************/ +static int imluaProcessRenderTent (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + int width = luaL_checkint(L, 2); + int height = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderTent(image, width, height)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderRamp +\*****************************************************************************/ +static int imluaProcessRenderRamp (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + int start = luaL_checkint(L, 2); + int end = luaL_checkint(L, 3); + int dir = luaL_checkint(L, 4); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderRamp(image, start, end, dir)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderBox +\*****************************************************************************/ +static int imluaProcessRenderBox (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + int width = luaL_checkint(L, 2); + int height = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderBox(image, width, height)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderSinc +\*****************************************************************************/ +static int imluaProcessRenderSinc (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + float xperiod = (float) luaL_checknumber(L, 2); + float yperiod = (float) luaL_checknumber(L, 3); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderSinc(image, xperiod, yperiod)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderGaussian +\*****************************************************************************/ +static int imluaProcessRenderGaussian (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + float stddev = (float) luaL_checknumber(L, 2); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderGaussian(image, stddev)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderLapOfGaussian +\*****************************************************************************/ +static int imluaProcessRenderLapOfGaussian (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + float stddev = (float) luaL_checknumber(L, 2); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderLapOfGaussian(image, stddev)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderCosine +\*****************************************************************************/ +static int imluaProcessRenderCosine (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + float xperiod = (float) luaL_checknumber(L, 2); + float yperiod = (float) luaL_checknumber(L, 3); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderCosine(image, xperiod, yperiod)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderGrid +\*****************************************************************************/ +static int imluaProcessRenderGrid (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + int x_space = luaL_checkint(L, 2); + int y_space = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderGrid(image, x_space, y_space)); + return 1; +} + +/*****************************************************************************\ + im.ProcessRenderChessboard +\*****************************************************************************/ +static int imluaProcessRenderChessboard (lua_State *L) +{ + imImage *image = imlua_checkimage(L, 1); + int x_space = luaL_checkint(L, 2); + int y_space = luaL_checkint(L, 3); + + imlua_checknotcfloat(L, image, 1); + + lua_pushboolean(L, imProcessRenderChessboard(image, x_space, y_space)); + return 1; +} + + + +/*****************************************************************************\ + Tone Gamut Operations +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessToneGamut +\*****************************************************************************/ +static int imluaProcessToneGamut (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int op = luaL_checkint(L, 3); + float *param = NULL; + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + param = imlua_toarrayfloat(L, 4, NULL, 1); + + imProcessToneGamut(src_image, dst_image, op, param); + + if (param) + free(param); + + return 0; +} + +/*****************************************************************************\ + im.ProcessUnNormalize +\*****************************************************************************/ +static int imluaProcessUnNormalize (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_checkdatatype(L, 1, src_image, IM_FLOAT); + imlua_checkdatatype(L, 2, dst_image, IM_BYTE); + imlua_matchcolorspace(L, src_image, dst_image); + + imProcessUnNormalize(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessDirectConv +\*****************************************************************************/ +static int imluaProcessDirectConv (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + luaL_argcheck(L, + src_image->data_type == IM_USHORT || + src_image->data_type == IM_INT || + src_image->data_type == IM_FLOAT, + 1, "data type can be ushort, int or float only"); + imlua_checkdatatype(L, 2, dst_image, IM_BYTE); + imlua_matchsize(L, src_image, dst_image); + + imProcessDirectConv(src_image, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessNegative +\*****************************************************************************/ +static int imluaProcessNegative (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_checknotcfloat(L, src_image, 1); + imlua_match(L, src_image, dst_image); + + imProcessNegative(src_image, dst_image); + return 0; +} + + + +/*****************************************************************************\ + Threshold Operations +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessRangeContrastThreshold +\*****************************************************************************/ +static int imluaProcessRangeContrastThreshold (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + int min_range = luaL_checkint(L, 4); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + luaL_argcheck(L, (src_image->data_type < IM_FLOAT), 1, "image data type can be integer only"); + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image, dst_image); + + lua_pushboolean(L, imProcessRangeContrastThreshold(src_image, dst_image, kernel_size, min_range)); + return 1; +} + +/*****************************************************************************\ + im.ProcessLocalMaxThreshold +\*****************************************************************************/ +static int imluaProcessLocalMaxThreshold (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int kernel_size = luaL_checkint(L, 3); + int min_thres = luaL_checkint(L, 4); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + luaL_argcheck(L, (src_image->data_type < IM_FLOAT), 1, "image data type can be integer only"); + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image, dst_image); + + lua_pushboolean(L, imProcessLocalMaxThreshold(src_image, dst_image, kernel_size, min_thres)); + return 1; +} + +/*****************************************************************************\ + im.ProcessThreshold +\*****************************************************************************/ +static int imluaProcessThreshold (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int level = luaL_checkint(L, 3); + int value = luaL_checkint(L, 4); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + luaL_argcheck(L, (src_image->data_type < IM_FLOAT), 1, "image data type can be integer only"); + + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image, dst_image); + + imProcessThreshold(src_image, dst_image, level, value); + return 0; +} + +/*****************************************************************************\ + im.ProcessThresholdByDiff +\*****************************************************************************/ +static int imluaProcessThresholdByDiff (lua_State *L) +{ + imImage *src_image1 = imlua_checkimage(L, 1); + imImage *src_image2 = imlua_checkimage(L, 2); + imImage *dst_image = imlua_checkimage(L, 3); + + imlua_checktype(L, 1, src_image1, IM_GRAY, IM_BYTE); + imlua_match(L, src_image1, src_image2); + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image1, dst_image); + + imProcessThresholdByDiff(src_image1, src_image2, dst_image); + return 0; +} + +/*****************************************************************************\ + im.ProcessHysteresisThreshold +\*****************************************************************************/ +static int imluaProcessHysteresisThreshold (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int low_thres = luaL_checkint(L, 3); + int high_thres = luaL_checkint(L, 4); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image, dst_image); + + imProcessHysteresisThreshold(src_image, dst_image, low_thres, high_thres); + return 0; +} + +/*****************************************************************************\ + im.ProcessHysteresisThresEstimate +\*****************************************************************************/ +static int imluaProcessHysteresisThresEstimate (lua_State *L) +{ + int low_thres, high_thres; + + imImage *src_image = imlua_checkimage(L, 1); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + + imProcessHysteresisThresEstimate(src_image, &low_thres, &high_thres); + lua_pushnumber(L, low_thres); + lua_pushnumber(L, high_thres); + + return 2; +} + +/*****************************************************************************\ + im.ProcessUniformErrThreshold +\*****************************************************************************/ +static int imluaProcessUniformErrThreshold (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image, dst_image); + + lua_pushboolean(L, imProcessUniformErrThreshold(src_image, dst_image)); + return 1; +} + +/*****************************************************************************\ + im.ProcessDifusionErrThreshold +\*****************************************************************************/ +static int imluaProcessDifusionErrThreshold (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int level = luaL_checkint(L, 3); + + imlua_checkdatatype(L, 1, src_image, IM_BYTE); + imlua_checkdatatype(L, 2, dst_image, IM_BYTE); + imlua_matchcheck(L, src_image->depth == dst_image->depth, "images must have the same depth"); + imlua_matchsize(L, src_image, dst_image); + + imProcessDifusionErrThreshold(src_image, dst_image, level); + return 0; +} + +/*****************************************************************************\ + im.ProcessPercentThreshold +\*****************************************************************************/ +static int imluaProcessPercentThreshold (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + float percent = (float) luaL_checknumber(L, 3); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image, dst_image); + + lua_pushboolean(L, imProcessPercentThreshold(src_image, dst_image, percent)); + return 1; +} + +/*****************************************************************************\ + im.ProcessOtsuThreshold +\*****************************************************************************/ +static int imluaProcessOtsuThreshold (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_checktype(L, 1, src_image, IM_GRAY, IM_BYTE); + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image, dst_image); + + lua_pushnumber(L, imProcessOtsuThreshold(src_image, dst_image)); + return 1; +} + +/*****************************************************************************\ + im.ProcessMinMaxThreshold +\*****************************************************************************/ +static int imluaProcessMinMaxThreshold (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + imlua_checkcolorspace(L, 1, src_image, IM_GRAY); + luaL_argcheck(L, (src_image->data_type < IM_FLOAT), 1, "image data type can be integer only"); + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image, dst_image); + + lua_pushboolean(L, imProcessMinMaxThreshold(src_image, dst_image)); + return 1; +} + +/*****************************************************************************\ + im.ProcessLocalMaxThresEstimate +\*****************************************************************************/ +static int imluaProcessLocalMaxThresEstimate (lua_State *L) +{ + int thres; + imImage *image = imlua_checkimage(L, 1); + + imlua_checkdatatype(L, 1, image, IM_BYTE); + + imProcessLocalMaxThresEstimate(image, &thres); + + lua_pushnumber(L, thres); + return 1; +} + +/*****************************************************************************\ + im.ProcessSliceThreshold +\*****************************************************************************/ +static int imluaProcessSliceThreshold (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + + int start_level = luaL_checkint(L, 3); + int end_level = luaL_checkint(L, 4); + + imlua_checkcolorspace(L, 1, src_image, IM_GRAY); + luaL_argcheck(L, (src_image->data_type < IM_FLOAT), 1, "image data type can be integer only"); + imlua_checkcolorspace(L, 2, dst_image, IM_BINARY); + imlua_matchsize(L, src_image, dst_image); + + imProcessSliceThreshold(src_image, dst_image, start_level, end_level); + return 0; +} + + +/*****************************************************************************\ + Special Effects +\*****************************************************************************/ + +/*****************************************************************************\ + im.ProcessPixelate +\*****************************************************************************/ +static int imluaProcessPixelate (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int box_size = luaL_checkint(L, 3); + + imlua_checkdatatype(L, 1, src_image, IM_BYTE); + imlua_match(L, src_image, dst_image); + + imProcessPixelate(src_image, dst_image, box_size); + return 0; +} + +/*****************************************************************************\ + im.ProcessPosterize +\*****************************************************************************/ +static int imluaProcessPosterize (lua_State *L) +{ + imImage *src_image = imlua_checkimage(L, 1); + imImage *dst_image = imlua_checkimage(L, 2); + int level = luaL_checkint(L, 3); + + imlua_checkdatatype(L, 1, src_image, IM_BYTE); + imlua_match(L, src_image, dst_image); + luaL_argcheck(L, (level >= 1 && level <= 7), 3, "invalid level, must be >=1 and <=7"); + + imProcessPosterize(src_image, dst_image, level); + return 0; +} + + + +static const luaL_reg improcess_lib[] = { + {"CalcRMSError", imluaCalcRMSError}, + {"CalcSNR", imluaCalcSNR}, + {"CalcCountColors", imluaCalcCountColors}, + {"CalcHistogram", imluaCalcHistogram}, + /*{"CalcUShortHistogram", imluaCalcUShortHistogram}, done by imluaCalcHistogram */ + {"CalcGrayHistogram", imluaCalcGrayHistogram}, + {"CalcImageStatistics", imluaCalcImageStatistics}, + {"CalcHistogramStatistics", imluaCalcHistogramStatistics}, + {"CalcHistoImageStatistics", imluaCalcHistoImageStatistics}, + + {"AnalyzeFindRegions", imluaAnalyzeFindRegions}, + {"AnalyzeMeasureArea", imluaAnalyzeMeasureArea}, + {"AnalyzeMeasurePerimArea", imluaAnalyzeMeasurePerimArea}, + {"AnalyzeMeasureCentroid", imluaAnalyzeMeasureCentroid}, + {"AnalyzeMeasurePrincipalAxis", imluaAnalyzeMeasurePrincipalAxis}, + {"AnalyzeMeasurePerimeter", imluaAnalyzeMeasurePerimeter}, + {"AnalyzeMeasureHoles", imluaAnalyzeMeasureHoles}, + + {"ProcessPerimeterLine", imluaProcessPerimeterLine}, + {"ProcessRemoveByArea", imluaProcessRemoveByArea}, + {"ProcessFillHoles", imluaProcessFillHoles}, + + {"ProcessHoughLines", imluaProcessHoughLines}, + {"ProcessHoughLinesDraw", imluaProcessHoughLinesDraw}, + {"ProcessDistanceTransform", imluaProcessDistanceTransform}, + {"ProcessRegionalMaximum", imluaProcessRegionalMaximum}, + + {"ProcessReduce", imluaProcessReduce}, + {"ProcessResize", imluaProcessResize}, + {"ProcessReduceBy4", imluaProcessReduceBy4}, + {"ProcessCrop", imluaProcessCrop}, + {"ProcessAddMargins", imluaProcessAddMargins}, + {"ProcessInsert", imluaProcessInsert}, + + {"ProcessCalcRotateSize", imluaProcessCalcRotateSize}, + {"ProcessRotate", imluaProcessRotate}, + {"ProcessRotateRef", imluaProcessRotateRef}, + {"ProcessRotate90", imluaProcessRotate90}, + {"ProcessRotate180", imluaProcessRotate180}, + {"ProcessMirror", imluaProcessMirror}, + {"ProcessFlip", imluaProcessFlip}, + {"ProcessRadial", imluaProcessRadial}, + {"ProcessSwirl", imluaProcessSwirl}, + {"ProcessInterlaceSplit", imluaProcessInterlaceSplit}, + + {"ProcessGrayMorphConvolve", imluaProcessGrayMorphConvolve}, + {"ProcessGrayMorphErode", imluaProcessGrayMorphErode}, + {"ProcessGrayMorphDilate", imluaProcessGrayMorphDilate}, + {"ProcessGrayMorphOpen", imluaProcessGrayMorphOpen}, + {"ProcessGrayMorphClose", imluaProcessGrayMorphClose}, + {"ProcessGrayMorphTopHat", imluaProcessGrayMorphTopHat}, + {"ProcessGrayMorphWell", imluaProcessGrayMorphWell}, + {"ProcessGrayMorphGradient", imluaProcessGrayMorphGradient}, + + {"ProcessBinMorphConvolve", imluaProcessBinMorphConvolve}, + {"ProcessBinMorphErode", imluaProcessBinMorphErode}, + {"ProcessBinMorphDilate", imluaProcessBinMorphDilate}, + {"ProcessBinMorphOpen", imluaProcessBinMorphOpen}, + {"ProcessBinMorphClose", imluaProcessBinMorphClose}, + {"ProcessBinMorphOutline", imluaProcessBinMorphOutline}, + {"ProcessBinMorphThin", imluaProcessBinMorphThin}, + + {"ProcessMedianConvolve", imluaProcessMedianConvolve}, + {"ProcessRangeConvolve", imluaProcessRangeConvolve}, + {"ProcessRankClosestConvolve", imluaProcessRankClosestConvolve}, + {"ProcessRankMaxConvolve", imluaProcessRankMaxConvolve}, + {"ProcessRankMinConvolve", imluaProcessRankMinConvolve}, + + {"ProcessConvolve", imluaProcessConvolve}, + {"ProcessConvolveDual", imluaProcessConvolveDual}, + {"ProcessConvolveRep", imluaProcessConvolveRep}, + {"ProcessConvolveSep", imluaProcessConvolveSep}, + {"ProcessCompassConvolve", imluaProcessCompassConvolve}, + {"ProcessRotateKernel", imluaProcessRotateKernel}, + {"ProcessDiffOfGaussianConvolve", imluaProcessDiffOfGaussianConvolve}, + {"ProcessLapOfGaussianConvolve", imluaProcessLapOfGaussianConvolve}, + {"ProcessMeanConvolve", imluaProcessMeanConvolve}, + {"ProcessBarlettConvolve", imluaProcessBarlettConvolve}, + {"ProcessGaussianConvolve", imluaProcessGaussianConvolve}, + {"ProcessSobelConvolve", imluaProcessSobelConvolve}, + {"ProcessPrewittConvolve", imluaProcessPrewittConvolve}, + {"ProcessSplineEdgeConvolve", imluaProcessSplineEdgeConvolve}, + {"ProcessZeroCrossing", imluaProcessZeroCrossing}, + {"ProcessCanny", imluaProcessCanny}, + {"ProcessUnsharp", imluaProcessUnsharp}, + {"ProcessSharp", imluaProcessSharp}, + {"ProcessSharpKernel", imluaProcessSharpKernel}, + {"GaussianKernelSize2StdDev", imluaGaussianKernelSize2StdDev}, + {"GaussianStdDev2KernelSize", imluaGaussianStdDev2KernelSize}, + + {"ProcessUnArithmeticOp", imluaProcessUnArithmeticOp}, + {"ProcessArithmeticOp", imluaProcessArithmeticOp}, + {"ProcessArithmeticConstOp", imluaProcessArithmeticConstOp}, + {"ProcessBlendConst", imluaProcessBlendConst}, + {"ProcessBlend", imluaProcessBlend}, + {"ProcessSplitComplex", imluaProcessSplitComplex}, + {"ProcessMergeComplex", imluaProcessMergeComplex}, + {"ProcessMultipleMean", imluaProcessMultipleMean}, + {"ProcessMultipleStdDev", imluaProcessMultipleStdDev}, + {"ProcessAutoCovariance", imluaProcessAutoCovariance}, + {"ProcessMultiplyConj", imluaProcessMultiplyConj}, + + {"ProcessQuantizeRGBUniform", imluaProcessQuantizeRGBUniform}, + {"ProcessQuantizeGrayUniform", imluaProcessQuantizeGrayUniform}, + + {"ProcessExpandHistogram", imluaProcessExpandHistogram}, + {"ProcessEqualizeHistogram", imluaProcessEqualizeHistogram}, + + {"ProcessSplitYChroma", imluaProcessSplitYChroma}, + {"ProcessSplitHSI", imluaProcessSplitHSI}, + {"ProcessMergeHSI", imluaProcessMergeHSI}, + {"ProcessSplitComponents", imluaProcessSplitComponents}, + {"ProcessMergeComponents", imluaProcessMergeComponents}, + {"ProcessNormalizeComponents", imluaProcessNormalizeComponents}, + {"ProcessReplaceColor", imluaProcessReplaceColor}, + + {"ProcessBitwiseOp", imluaProcessBitwiseOp}, + {"ProcessBitwiseNot", imluaProcessBitwiseNot}, + {"ProcessBitMask", imluaProcessBitMask}, + {"ProcessBitPlane", imluaProcessBitPlane}, + + {"ProcessRenderOp", imluaProcessRenderOp}, + {"ProcessRenderCondOp", imluaProcessRenderCondOp}, + {"ProcessRenderAddSpeckleNoise", imluaProcessRenderAddSpeckleNoise}, + {"ProcessRenderAddGaussianNoise", imluaProcessRenderAddGaussianNoise}, + {"ProcessRenderAddUniformNoise", imluaProcessRenderAddUniformNoise}, + {"ProcessRenderRandomNoise", imluaProcessRenderRandomNoise}, + {"ProcessRenderConstant", imluaProcessRenderConstant}, + {"ProcessRenderWheel", imluaProcessRenderWheel}, + {"ProcessRenderCone", imluaProcessRenderCone}, + {"ProcessRenderTent", imluaProcessRenderTent}, + {"ProcessRenderRamp", imluaProcessRenderRamp}, + {"ProcessRenderBox", imluaProcessRenderBox}, + {"ProcessRenderSinc", imluaProcessRenderSinc}, + {"ProcessRenderGaussian", imluaProcessRenderGaussian}, + {"ProcessRenderLapOfGaussian", imluaProcessRenderLapOfGaussian}, + {"ProcessRenderCosine", imluaProcessRenderCosine}, + {"ProcessRenderGrid", imluaProcessRenderGrid}, + {"ProcessRenderChessboard", imluaProcessRenderChessboard}, + + {"ProcessToneGamut", imluaProcessToneGamut}, + {"ProcessUnNormalize", imluaProcessUnNormalize}, + {"ProcessDirectConv", imluaProcessDirectConv}, + {"ProcessNegative", imluaProcessNegative}, + + {"ProcessRangeContrastThreshold", imluaProcessRangeContrastThreshold}, + {"ProcessLocalMaxThreshold", imluaProcessLocalMaxThreshold}, + {"ProcessThreshold", imluaProcessThreshold}, + {"ProcessThresholdByDiff", imluaProcessThresholdByDiff}, + {"ProcessHysteresisThreshold", imluaProcessHysteresisThreshold}, + {"ProcessHysteresisThresEstimate", imluaProcessHysteresisThresEstimate}, + {"ProcessUniformErrThreshold", imluaProcessUniformErrThreshold}, + {"ProcessDifusionErrThreshold", imluaProcessDifusionErrThreshold}, + {"ProcessPercentThreshold", imluaProcessPercentThreshold}, + {"ProcessOtsuThreshold", imluaProcessOtsuThreshold}, + {"ProcessMinMaxThreshold", imluaProcessMinMaxThreshold}, + {"ProcessLocalMaxThresEstimate", imluaProcessLocalMaxThresEstimate}, + {"ProcessSliceThreshold", imluaProcessSliceThreshold}, + + {"ProcessPixelate", imluaProcessPixelate}, + {"ProcessPosterize", imluaProcessPosterize}, + + {NULL, NULL} +}; + +/*****************************************************************************\ + Constants +\*****************************************************************************/ +static const imlua_constant im_process_constants[] = { + + { "UN_EQL", IM_UN_EQL, NULL }, + { "UN_ABS", IM_UN_ABS, NULL }, + { "UN_LESS", IM_UN_LESS, NULL }, + { "UN_INV", IM_UN_INV, NULL }, + { "UN_SQR", IM_UN_SQR, NULL }, + { "UN_SQRT", IM_UN_SQRT, NULL }, + { "UN_LOG", IM_UN_LOG, NULL }, + { "UN_EXP", IM_UN_EXP, NULL }, + { "UN_SIN", IM_UN_SIN, NULL }, + { "UN_COS", IM_UN_COS, NULL }, + { "UN_CONJ", IM_UN_CONJ, NULL }, + { "UN_CPXNORM", IM_UN_CPXNORM, NULL }, + + { "BIN_ADD", IM_BIN_ADD, NULL }, + { "BIN_SUB", IM_BIN_SUB, NULL }, + { "BIN_MUL", IM_BIN_MUL, NULL }, + { "BIN_DIV", IM_BIN_DIV, NULL }, + { "BIN_DIFF", IM_BIN_DIFF, NULL }, + { "BIN_POW", IM_BIN_POW, NULL }, + { "BIN_MIN", IM_BIN_MIN, NULL }, + { "BIN_MAX", IM_BIN_MAX, NULL }, + + { "BIT_AND", IM_BIT_AND, NULL }, + { "BIT_OR", IM_BIT_OR, NULL }, + { "BIT_XOR", IM_BIT_XOR, NULL }, + + { "GAMUT_NORMALIZE", IM_GAMUT_NORMALIZE, NULL }, + { "GAMUT_POW", IM_GAMUT_POW, NULL }, + { "GAMUT_LOG", IM_GAMUT_LOG, NULL }, + { "GAMUT_EXP", IM_GAMUT_EXP, NULL }, + { "GAMUT_INVERT", IM_GAMUT_INVERT, NULL }, + { "GAMUT_ZEROSTART", IM_GAMUT_ZEROSTART, NULL }, + { "GAMUT_SOLARIZE", IM_GAMUT_SOLARIZE, NULL }, + { "GAMUT_SLICE", IM_GAMUT_SLICE, NULL }, + { "GAMUT_EXPAND", IM_GAMUT_EXPAND, NULL }, + { "GAMUT_CROP", IM_GAMUT_CROP, NULL }, + { "GAMUT_BRIGHTCONT", IM_GAMUT_BRIGHTCONT, NULL }, + + { NULL, -1, NULL }, +}; + +/* from imlua_kernel.c */ +void imlua_open_kernel(lua_State *L); + +int imlua_open_process(lua_State *L) +{ + luaL_register(L, "im", improcess_lib); /* leave "im" table at the top of the stack */ + imlua_regconstants(L, im_process_constants); +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/im_process_be64.loh" +#else +#include "loh/im_process_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/im_process_le64w.loh" +#else +#include "loh/im_process_le64.loh" +#endif +#else +#include "loh/im_process.loh" +#endif +#endif + imlua_open_kernel(L); + return 1; +} + +int luaopen_imlua_process(lua_State *L) +{ + return imlua_open_process(L); +} + +int luaopen_imlua_process51(lua_State *L) +{ + return imlua_open_process(L); +} diff --git a/im/src/lua5/imlua_process.def b/im/src/lua5/imlua_process.def new file mode 100755 index 0000000..2b77e77 --- /dev/null +++ b/im/src/lua5/imlua_process.def @@ -0,0 +1,4 @@ +EXPORTS + imlua_open_process + luaopen_imlua_process + luaopen_imlua_process51 \ No newline at end of file diff --git a/im/src/lua5/imlua_util.c b/im/src/lua5/imlua_util.c new file mode 100755 index 0000000..69cfb19 --- /dev/null +++ b/im/src/lua5/imlua_util.c @@ -0,0 +1,279 @@ +/** \file + * \brief IM Lua 5 Binding + * + * See Copyright Notice in im_lib.h + * $Id: imlua_util.c,v 1.1 2008/10/17 06:16:32 scuri Exp $ + */ + +#include "im.h" +#include "im_util.h" +#include "im_image.h" + +#include +#include + +#include "imlua.h" +#include "imlua_aux.h" + +/*****************************************************************************\ + im.ImageDataSize(width, height, color_mode, data_type) +\*****************************************************************************/ +static int imluaImageDataSize (lua_State *L) +{ + int width = luaL_checkint(L, 1); + int height = luaL_checkint(L, 2); + int color_mode = luaL_checkint(L, 3); + int data_type = luaL_checkint(L, 4); + + lua_pushnumber(L, imImageDataSize(width, height, color_mode, data_type)); + return 1; +} + +/*****************************************************************************\ + im.ImageLineSize(width, color_mode, data_type) +\*****************************************************************************/ +static int imluaImageLineSize (lua_State *L) +{ + int width = luaL_checkint(L, 1); + int color_mode = luaL_checkint(L, 2); + int data_type = luaL_checkint(L, 3); + + lua_pushnumber(L, imImageLineSize(width, color_mode, data_type)); + return 1; +} + +/*****************************************************************************\ + im.ImageLineCount(width, color_mode) +\*****************************************************************************/ +static int imluaImageLineCount (lua_State *L) +{ + int width = luaL_checkint(L, 1); + int color_mode = luaL_checkint(L, 2); + + lua_pushnumber(L, imImageLineCount(width, color_mode)); + return 1; +} + +/*****************************************************************************\ + im.ImageCheckFormat(width, color_mode) +\*****************************************************************************/ +static int imluaImageCheckFormat (lua_State *L) +{ + int color_mode = luaL_checkint(L, 1); + int data_type = luaL_checkint(L, 2); + + lua_pushboolean(L, imImageCheckFormat(color_mode, data_type)); + return 1; +} + +/*****************************************************************************\ + im.ColorModeSpaceName(color_mode) +\*****************************************************************************/ +static int imluaColorModeSpaceName (lua_State *L) +{ + lua_pushstring(L, imColorModeSpaceName(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.ColorModeDepth(color_mode) +\*****************************************************************************/ +static int imluaColorModeDepth (lua_State *L) +{ + lua_pushnumber(L, imColorModeDepth(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + +\*****************************************************************************/ + +/*****************************************************************************\ + im.ColorModeSpace(color_mode) +\*****************************************************************************/ +static int imluaColorModeSpace (lua_State *L) +{ + lua_pushnumber(L, imColorModeSpace(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.ColorModeHasAlpha(color_mode) +\*****************************************************************************/ +static int imluaColorModeMatch (lua_State *L) +{ + lua_pushboolean(L, imColorModeMatch(luaL_checkint(L, 1), luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.ColorModeHasAlpha(color_mode) +\*****************************************************************************/ +static int imluaColorModeHasAlpha (lua_State *L) +{ + lua_pushboolean(L, imColorModeHasAlpha(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.ColorModeIsPacked(color_mode) +\*****************************************************************************/ +static int imluaColorModeIsPacked (lua_State *L) +{ + lua_pushboolean(L, imColorModeIsPacked(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.ColorModeIsTopDown(color_mode) +\*****************************************************************************/ +static int imluaColorModeIsTopDown (lua_State *L) +{ + lua_pushboolean(L, imColorModeIsTopDown(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.ColorModeToBitmap(color_mode) +\*****************************************************************************/ +static int imluaColorModeToBitmap (lua_State *L) +{ + lua_pushnumber(L, imColorModeToBitmap(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.ColorModeIsBitmap +\*****************************************************************************/ +static int imluaColorModeIsBitmap (lua_State *L) +{ + int color_mode = luaL_checkint(L, 1); + int data_type = luaL_checkint(L, 2); + + lua_pushboolean(L, imColorModeIsBitmap(color_mode, data_type)); + return 1; +} + +/*****************************************************************************\ + im.DataTypeSize(data_type) +\*****************************************************************************/ +static int imluaDataTypeSize (lua_State *L) +{ + lua_pushnumber(L, imDataTypeSize(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.DataTypeName(data_type) +\*****************************************************************************/ +static int imluaDataTypeName (lua_State *L) +{ + lua_pushstring(L, imDataTypeName(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.DataTypeIntMax(data_type) +\*****************************************************************************/ +static int imluaDataTypeIntMax(lua_State *L) +{ + lua_pushnumber(L, imDataTypeIntMax(luaL_checkint(L, 1))); + return 1; +} + +/*****************************************************************************\ + im.DataTypeIntMin(data_type) +\*****************************************************************************/ +static int imluaDataTypeIntMin(lua_State *L) +{ + lua_pushnumber(L, imDataTypeIntMin(luaL_checkint(L, 1))); + return 1; +} + +/***************************************************************************\ +* Creates a color as a light userdata. The color value is * +* placed in the (void *) value. Not beautiful, but works best. * +* im.ColorEncode(r, g, b: number) -> (c: color) * +\***************************************************************************/ +static int imlua_colorencode(lua_State *L) +{ + int red_f, green_f, blue_f; + unsigned char red_i, green_i, blue_i; + long int color_i; + + red_f = luaL_checkint(L, 1); + green_f = luaL_checkint(L, 2); + blue_f = luaL_checkint(L, 3); + + if (red_f < 0 || red_f > 255) + luaL_argerror(L, 1, "color components values should be in range [0, 255]"); + if (green_f < 0 || green_f > 255) + luaL_argerror(L, 2, "color components values should be in range [0, 255]"); + if (blue_f < 0 || blue_f > 255) + luaL_argerror(L, 3, "color components values should be in range [0, 255]"); + + red_i = (unsigned char) (red_f); + green_i = (unsigned char) (green_f); + blue_i = (unsigned char) (blue_f); + + color_i = imColorEncode(red_i, green_i, blue_i); + lua_pushlightuserdata(L, (void *)color_i); + + return 1; +} + +/***************************************************************************\ +* Decodes a color previously created. * +* im.ColorDecode(c: color) -> (r, g, b: number) * +\***************************************************************************/ +static int imlua_colordecode(lua_State *L) +{ + long int color_i; + unsigned char red_i, green_i, blue_i; + + if (!lua_islightuserdata(L, 1)) + luaL_argerror(L, 1, "color must be a light user data"); + + color_i = (long int) lua_touserdata(L,1); + + imColorDecode(&red_i, &green_i, &blue_i, color_i); + lua_pushnumber(L, red_i); + lua_pushnumber(L, green_i); + lua_pushnumber(L, blue_i); + + return 3; +} + +static const luaL_reg imutil_lib[] = { + {"ImageDataSize", imluaImageDataSize}, + {"ImageLineSize", imluaImageLineSize}, + {"ImageLineCount", imluaImageLineCount}, + {"ImageCheckFormat", imluaImageCheckFormat}, + + {"ColorModeSpace", imluaColorModeSpace}, + {"ColorModeSpaceName", imluaColorModeSpaceName}, + {"ColorModeDepth", imluaColorModeDepth}, + + {"ColorModeToBitmap", imluaColorModeToBitmap}, + {"ColorModeIsBitmap", imluaColorModeIsBitmap}, + {"ColorModeMatch", imluaColorModeMatch}, + {"ColorModeHasAlpha", imluaColorModeHasAlpha}, + {"ColorModeIsPacked", imluaColorModeIsPacked}, + {"ColorModeIsTopDown", imluaColorModeIsTopDown}, + + {"DataTypeSize", imluaDataTypeSize}, + {"DataTypeName", imluaDataTypeName}, + {"DataTypeIntMax", imluaDataTypeIntMax}, + {"DataTypeIntMin", imluaDataTypeIntMin}, + + {"ColorEncode", imlua_colorencode}, + {"ColorDecode", imlua_colordecode}, + + {NULL, NULL} +}; + +void imlua_open_util(lua_State *L) +{ + /* "im" table is at the top of the stack */ + luaL_register(L, NULL, imutil_lib); +} diff --git a/im/src/lua5/imlua_wmv.c b/im/src/lua5/imlua_wmv.c new file mode 100755 index 0000000..7f61030 --- /dev/null +++ b/im/src/lua5/imlua_wmv.c @@ -0,0 +1,44 @@ +/** \file + * \brief wmv format Lua 5 Binding + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include "im_format_wmv.h" + +#include +#include + + +static int imlua_FormatRegisterWMV(lua_State *L) +{ + (void)L; + imFormatRegisterWMV(); + return 0; +} + +static const struct luaL_reg imlib[] = { + {"FormatRegisterWMV", imlua_FormatRegisterWMV}, + {NULL, NULL}, +}; + + +static int imlua_wmv_open (lua_State *L) +{ + imFormatRegisterWMV(); + luaL_register(L, "im", imlib); /* leave "im" table at the top of the stack */ + return 1; +} + +int luaopen_imlua_wmv(lua_State* L) +{ + return imlua_wmv_open(L); +} + +int luaopen_imlua_wmv51(lua_State* L) +{ + return imlua_wmv_open(L); +} diff --git a/im/src/lua5/imlua_wmv.def b/im/src/lua5/imlua_wmv.def new file mode 100755 index 0000000..0c05563 --- /dev/null +++ b/im/src/lua5/imlua_wmv.def @@ -0,0 +1,4 @@ +EXPORTS + luaopen_imlua_wmv + luaopen_imlua_wmv51 + \ No newline at end of file diff --git a/im/src/lua5/loh/im_convert.loh b/im/src/lua5/loh/im_convert.loh new file mode 100644 index 0000000..7d4b03f --- /dev/null +++ b/im/src/lua5/loh/im_convert.loh @@ -0,0 +1,87 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua51/im_convert.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua51/im_convert.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 21, 0, 0, 0, 64,108,117, 97, + 53, 47,105,109, 95, 99,111,110,118,101,114,116, 46,108,117, 97, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 10, 0, 0, 0, 5, 0, 0, 0,100, 0, 0, + 0, 9, 64,128,128, 5, 0, 0, 0,100, 64, 0, 0, 9, 64, 0,129, 5, 0, 0, + 0,100,128, 0, 0, 9, 64,128,129, 30, 0,128, 0, 4, 0, 0, 0, 4, 3, 0, + 0, 0,105,109, 0, 4, 19, 0, 0, 0, 67,111,110,118,101,114,116, 68, 97,116, + 97, 84,121,112,101, 78,101,119, 0, 4, 21, 0, 0, 0, 67,111,110,118,101,114, +116, 67,111,108,111,114, 83,112, 97, 99,101, 78,101,119, 0, 4, 19, 0, 0, 0, + 67,111,110,118,101,114,116, 84,111, 66,105,116,109, 97,112, 78,101,119, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 0, 6, 0, 14, 18, + 0, 0, 0,133, 1, 0, 0,134, 65, 64, 3,192, 1, 0, 0, 3, 2, 0, 5,192, + 2,128, 0,156,129, 0, 3,197, 1, 0, 0,198,129,192, 3, 0, 2, 0, 0, 64, + 2, 0, 3,128, 2, 0, 1,192, 2,128, 1, 0, 3, 0, 2, 64, 3,128, 2,220, +129,128, 3, 0, 2, 0, 3,222, 1,128, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, + 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, 97,103,101, 67,114,101, + 97,116,101, 66, 97,115,101,100, 0, 4, 16, 0, 0, 0, 67,111,110,118,101,114, +116, 68, 97,116, 97, 84,121,112,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, 3, 0, + 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 7, 0, 0, 0, 10, 0, 0, 0,115,114, + 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, +100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 9, 0, + 0, 0, 99,112,120, 50,114,101, 97,108, 0, 0, 0, 0, 0, 17, 0, 0, 0, 6, + 0, 0, 0,103, 97,109,109, 97, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, + 0, 97, 98,115,115,111,108,117,116,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, + 0, 0, 0, 99, 97,115,116, 95,109,111,100,101, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 6, 0, 0, 0, 17, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 11, 0, 0, 0, 0, + 3, 0, 8, 18, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 67, + 1, 0, 3,192, 1,128, 0,220,128,128, 2,154, 0, 0, 0, 22, 64, 0,128, 11, +129,192, 1, 28, 65, 0, 1, 5, 1, 0, 0, 6,193, 64, 2, 64, 1, 0, 0,128, + 1,128, 1, 28,129,128, 1, 64, 1,128, 1, 30, 1,128, 1, 30, 0,128, 0, 4, + 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, 97,103, +101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 9, 0, 0, 0, 65,100, +100, 65,108,112,104, 97, 0, 4, 18, 0, 0, 0, 67,111,110,118,101,114,116, 67, +111,108,111,114, 83,112, 97, 99,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, 8, 0, + 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, + 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 10, 0, + 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0,115,114, + 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 12, 0, 0, 0, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 10, 0, 0, 0,104, 97,115, 95, 97,108,112,104, 97, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 6, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, + 0, 7, 0, 15, 30, 0, 0, 0, 90, 64, 0, 0, 22, 64, 1,128,197, 1, 0, 0, +198, 65,192, 3, 11,130, 64, 0, 28, 2, 0, 1,220,129, 0, 0, 64, 0,128, 3, +197, 1, 0, 0,198,193,192, 3, 0, 2, 0, 0, 67, 2, 0, 5,192, 2,128, 0, +220,129,128, 2,154, 0, 0, 0, 22, 64, 0,128, 11, 2,193, 3, 28, 66, 0, 1, + 5, 2, 0, 0, 6, 66, 65, 4, 64, 2, 0, 0,128, 2,128, 3,192, 2,128, 1, + 0, 3, 0, 2, 64, 3,128, 2,128, 3, 0, 3, 28,130,128, 3, 64, 2,128, 3, + 30, 2,128, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, + 4, 18, 0, 0, 0, 67,111,108,111,114, 77,111,100,101, 84,111, 66,105,116,109, + 97,112, 0, 4, 11, 0, 0, 0, 67,111,108,111,114, 83,112, 97, 99,101, 0, 4, + 17, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 4, 9, 0, 0, 0, 65,100,100, 65,108,112,104, 97, 0, 4, 16, 0, 0, 0, + 67,111,110,118,101,114,116, 84,111, 66,105,116,109, 97,112, 0, 0, 0, 0, 0, + 30, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, + 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 18, 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, 0,115,114, 99, 95,105,109, 97,103, +101, 0, 0, 0, 0, 0, 29, 0, 0, 0, 12, 0, 0, 0, 99,111,108,111,114, 95, +115,112, 97, 99,101, 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, 0, 0, 0,104, 97, +115, 95, 97,108,112,104, 97, 0, 0, 0, 0, 0, 29, 0, 0, 0, 9, 0, 0, 0, + 99,112,120, 50,114,101, 97,108, 0, 0, 0, 0, 0, 29, 0, 0, 0, 6, 0, 0, + 0,103, 97,109,109, 97, 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, 0, 0, 0, 97, + 98,115,115,111,108,117,116,101, 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, 0, 0, + 0, 99, 97,115,116, 95,109,111,100,101, 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, + 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 14, 0, 0, 0, 29, 0, 0, + 0, 0, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, + 0, 7, 0, 0, 0, 11, 0, 0, 0, 7, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, + 0, 13, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua51/im_convert.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_convert_be32.loh b/im/src/lua5/loh/im_convert_be32.loh new file mode 100755 index 0000000..eebe1de --- /dev/null +++ b/im/src/lua5/loh/im_convert_be32.loh @@ -0,0 +1,87 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua51/im_convert_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua51/im_convert_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 21, 64,108,117, 97, + 53, 47,105,109, 95, 99,111,110,118,101,114,116, 46,108,117, 97, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 10, 0, 0, 0, 5, 0, 0, 0, +100,128,128, 64, 9, 0, 0, 0, 5, 0, 0, 64,100,129, 0, 64, 9, 0, 0, 0, + 5, 0, 0,128,100,129,128, 64, 9, 0,128, 0, 30, 0, 0, 0, 4, 4, 0, 0, + 0, 3,105,109, 0, 4, 0, 0, 0, 19, 67,111,110,118,101,114,116, 68, 97,116, + 97, 84,121,112,101, 78,101,119, 0, 4, 0, 0, 0, 21, 67,111,110,118,101,114, +116, 67,111,108,111,114, 83,112, 97, 99,101, 78,101,119, 0, 4, 0, 0, 0, 19, + 67,111,110,118,101,114,116, 84,111, 66,105,116,109, 97,112, 78,101,119, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 6, 0, 14, 0, + 0, 0, 18, 0, 0, 1,133, 3, 64, 65,134, 0, 0, 1,192, 5, 0, 2, 3, 0, +128, 2,192, 3, 0,129,156, 0, 0, 1,197, 3,192,129,198, 0, 0, 2, 0, 3, + 0, 2, 64, 1, 0, 2,128, 1,128, 2,192, 2, 0, 3, 0, 2,128, 3, 64, 3, +128,129,220, 3, 0, 2, 0, 1,128, 1,222, 0,128, 0, 30, 0, 0, 0, 3, 4, + 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, 97,103,101, 67,114,101, + 97,116,101, 66, 97,115,101,100, 0, 4, 0, 0, 0, 16, 67,111,110,118,101,114, +116, 68, 97,116, 97, 84,121,112,101, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, + 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, + 0, 3, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, + 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, + 0, 4, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 7, 0, 0, 0, 10,115,114, + 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, +100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 9, 99,112,120, 50,114,101, 97,108, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 6,103, 97,109,109, 97, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 10, 97, 98,115,115,111,108,117,116,101, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 10, 99, 97,115,116, 95,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, 0, 0, 6, 0, + 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 11, 0, + 3, 0, 8, 0, 0, 0, 18, 0, 0, 0,197, 1,192, 64,198, 0, 0, 1, 0, 3, + 0, 1, 67, 0,128, 1,192, 2,128,128,220, 0, 0, 0,154,128, 0, 64, 22, 1, +192,129, 11, 1, 0, 65, 28, 0, 0, 1, 5, 2, 64,193, 6, 0, 0, 1, 64, 1, +128, 1,128, 1,128,129, 28, 1,128, 1, 64, 1,128, 1, 30, 0,128, 0, 30, 0, + 0, 0, 4, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, 97,103, +101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 0, 0, 0, 9, 65,100, +100, 65,108,112,104, 97, 0, 4, 0, 0, 0, 18, 67,111,110,118,101,114,116, 67, +111,108,111,114, 83,112, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, + 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, + 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, + 0, 10, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 4, 0, 0, 0, 10,115,114, + 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 12, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 17, + 0, 0, 0, 10,104, 97,115, 95, 97,108,112,104, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, 0, 0, 6, + 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 18, + 0, 7, 0, 15, 0, 0, 0, 30, 0, 0, 64, 90,128, 1, 64, 22, 0, 0, 1,197, + 3,192, 65,198, 0, 64,130, 11, 1, 0, 2, 28, 0, 0,129,220, 3,128, 0, 64, + 0, 0, 1,197, 3,192,193,198, 0, 0, 2, 0, 5, 0, 2, 67, 0,128, 2,192, + 2,128,129,220, 0, 0, 0,154,128, 0, 64, 22, 3,193, 2, 11, 1, 0, 66, 28, + 0, 0, 2, 5, 4, 65, 66, 6, 0, 0, 2, 64, 3,128, 2,128, 1,128, 2,192, + 2, 0, 3, 0, 2,128, 3, 64, 3, 0, 3,128, 3,128,130, 28, 3,128, 2, 64, + 1,128, 2, 30, 0,128, 0, 30, 0, 0, 0, 6, 4, 0, 0, 0, 3,105,109, 0, + 4, 0, 0, 0, 18, 67,111,108,111,114, 77,111,100,101, 84,111, 66,105,116,109, + 97,112, 0, 4, 0, 0, 0, 11, 67,111,108,111,114, 83,112, 97, 99,101, 0, 4, + 0, 0, 0, 17, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 4, 0, 0, 0, 9, 65,100,100, 65,108,112,104, 97, 0, 4, 0, 0, 0, 16, + 67,111,110,118,101,114,116, 84,111, 66,105,116,109, 97,112, 0, 0, 0, 0, 0, + 0, 0, 0, 30, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 18, 0, 0, 0, 8, 0, 0, 0, 10,115,114, 99, 95,105,109, 97,103, +101, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 12, 99,111,108,111,114, 95, +115,112, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 10,104, 97, +115, 95, 97,108,112,104, 97, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 9, + 99,112,120, 50,114,101, 97,108, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, + 6,103, 97,109,109, 97, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, 97, + 98,115,115,111,108,117,116,101, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, + 10, 99, 97,115,116, 95,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, + 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, 0, 0, 14, 0, 0, 0, + 29, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, + 2, 0, 0, 0, 7, 0, 0, 0, 11, 0, 0, 0, 7, 0, 0, 0, 13, 0, 0, 0, + 18, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua51/im_convert_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_convert_be64.loh b/im/src/lua5/loh/im_convert_be64.loh new file mode 100644 index 0000000..52c5ec4 --- /dev/null +++ b/im/src/lua5/loh/im_convert_be64.loh @@ -0,0 +1,95 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua51/im_convert_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua51/im_convert_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 21, 0, 0, 0, 0, 0, 0, 0, + 64,108,117, 97, 53, 47,105,109, 95, 99,111,110,118,101,114,116, 46,108,117, 97, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 10, 0, 0, 0, 5, 0, 0, + 0,100, 0, 0, 0, 9, 64,128,128, 5, 0, 0, 0,100, 64, 0, 0, 9, 64, 0, +129, 5, 0, 0, 0,100,128, 0, 0, 9, 64,128,129, 30, 0,128, 0, 4, 0, 0, + 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 19, 0, 0, 0, 0, 0, + 0, 0, 67,111,110,118,101,114,116, 68, 97,116, 97, 84,121,112,101, 78,101,119, + 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 67,111,110,118,101,114,116, 67,111,108, +111,114, 83,112, 97, 99,101, 78,101,119, 0, 4, 19, 0, 0, 0, 0, 0, 0, 0, + 67,111,110,118,101,114,116, 84,111, 66,105,116,109, 97,112, 78,101,119, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 0, + 6, 0, 14, 18, 0, 0, 0,133, 1, 0, 0,134, 65, 64, 3,192, 1, 0, 0, 3, + 2, 0, 5,192, 2,128, 0,156,129, 0, 3,197, 1, 0, 0,198,129,192, 3, 0, + 2, 0, 0, 64, 2, 0, 3,128, 2, 0, 1,192, 2,128, 1, 0, 3, 0, 2, 64, + 3,128, 2,220,129,128, 3, 0, 2, 0, 3,222, 1,128, 1, 30, 0,128, 0, 3, + 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, + 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 67,111,110,118,101,114,116, 68, 97,116, + 97, 84,121,112,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, 3, 0, 0, 0, 3, 0, + 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 4, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, + 0, 0, 5, 0, 0, 0, 7, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, + 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, + 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 99,112,120, 50,114,101, 97,108, 0, 0, + 0, 0, 0, 17, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,103, 97,109,109, 97, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 97, 98,115, +115,111,108,117,116,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0, 99, 97,115,116, 95,109,111,100,101, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 6, + 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, + 0, 0, 0, 11, 0, 0, 0, 0, 3, 0, 8, 18, 0, 0, 0,197, 0, 0, 0,198, + 64,192, 1, 0, 1, 0, 0, 67, 1, 0, 3,192, 1,128, 0,220,128,128, 2,154, + 0, 0, 0, 22, 64, 0,128, 11,129,192, 1, 28, 65, 0, 1, 5, 1, 0, 0, 6, +193, 64, 2, 64, 1, 0, 0,128, 1,128, 1, 28,129,128, 1, 64, 1,128, 1, 30, + 1,128, 1, 30, 0,128, 0, 4, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, +105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, + 97,116,101, 66, 97,115,101,100, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 65,100, +100, 65,108,112,104, 97, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67,111,110,118, +101,114,116, 67,111,108,111,114, 83,112, 97, 99,101, 0, 0, 0, 0, 0, 18, 0, + 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, + 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 4, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, + 97, 99,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, +104, 97,115, 95, 97,108,112,104, 97, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 6, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, + 18, 0, 0, 0, 0, 7, 0, 15, 30, 0, 0, 0, 90, 64, 0, 0, 22, 64, 1,128, +197, 1, 0, 0,198, 65,192, 3, 11,130, 64, 0, 28, 2, 0, 1,220,129, 0, 0, + 64, 0,128, 3,197, 1, 0, 0,198,193,192, 3, 0, 2, 0, 0, 67, 2, 0, 5, +192, 2,128, 0,220,129,128, 2,154, 0, 0, 0, 22, 64, 0,128, 11, 2,193, 3, + 28, 66, 0, 1, 5, 2, 0, 0, 6, 66, 65, 4, 64, 2, 0, 0,128, 2,128, 3, +192, 2,128, 1, 0, 3, 0, 2, 64, 3,128, 2,128, 3, 0, 3, 28,130,128, 3, + 64, 2,128, 3, 30, 2,128, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, + 0, 0, 0, 0, 0,105,109, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67,111,108, +111,114, 77,111,100,101, 84,111, 66,105,116,109, 97,112, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0, 67,111,108,111,114, 83,112, 97, 99,101, 0, 4, 17, 0, 0, 0, + 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 65,100,100, 65,108,112,104, 97, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0, 67,111,110,118,101,114,116, 84,111, 66,105,116, +109, 97,112, 0, 0, 0, 0, 0, 30, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, + 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, + 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, 0, + 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 29, 0, + 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99, +101, 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,104, 97, +115, 95, 97,108,112,104, 97, 0, 0, 0, 0, 0, 29, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 99,112,120, 50,114,101, 97,108, 0, 0, 0, 0, 0, 29, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0,103, 97,109,109, 97, 0, 0, 0, 0, 0, 29, + 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 97, 98,115,115,111,108,117,116,101, + 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 99, 97,115, +116, 95,109,111,100,101, 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 14, 0, 0, 0, 29, 0, 0, + 0, 0, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, + 0, 7, 0, 0, 0, 11, 0, 0, 0, 7, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, + 0, 13, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua51/im_convert_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_convert_le64.loh b/im/src/lua5/loh/im_convert_le64.loh new file mode 100755 index 0000000..e2d2a06 --- /dev/null +++ b/im/src/lua5/loh/im_convert_le64.loh @@ -0,0 +1,95 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua51/im_convert_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua51/im_convert_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 21, 0, 0, 0, 0, 0, 0, 0, + 64,108,117, 97, 53, 47,105,109, 95, 99,111,110,118,101,114,116, 46,108,117, 97, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 10, 0, 0, 0, 5, 0, 0, + 0,100, 0, 0, 0, 9, 64,128,128, 5, 0, 0, 0,100, 64, 0, 0, 9, 64, 0, +129, 5, 0, 0, 0,100,128, 0, 0, 9, 64,128,129, 30, 0,128, 0, 4, 0, 0, + 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 19, 0, 0, 0, 0, 0, + 0, 0, 67,111,110,118,101,114,116, 68, 97,116, 97, 84,121,112,101, 78,101,119, + 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 67,111,110,118,101,114,116, 67,111,108, +111,114, 83,112, 97, 99,101, 78,101,119, 0, 4, 19, 0, 0, 0, 0, 0, 0, 0, + 67,111,110,118,101,114,116, 84,111, 66,105,116,109, 97,112, 78,101,119, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 0, + 6, 0, 14, 18, 0, 0, 0,133, 1, 0, 0,134, 65, 64, 3,192, 1, 0, 0, 3, + 2, 0, 5,192, 2,128, 0,156,129, 0, 3,197, 1, 0, 0,198,129,192, 3, 0, + 2, 0, 0, 64, 2, 0, 3,128, 2, 0, 1,192, 2,128, 1, 0, 3, 0, 2, 64, + 3,128, 2,220,129,128, 3, 0, 2, 0, 3,222, 1,128, 1, 30, 0,128, 0, 3, + 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, + 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 67,111,110,118,101,114,116, 68, 97,116, + 97, 84,121,112,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, 3, 0, 0, 0, 3, 0, + 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 4, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, + 0, 0, 5, 0, 0, 0, 7, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, + 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, + 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 99,112,120, 50,114,101, 97,108, 0, 0, + 0, 0, 0, 17, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,103, 97,109,109, 97, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 97, 98,115, +115,111,108,117,116,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0, 99, 97,115,116, 95,109,111,100,101, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 6, + 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, + 0, 0, 0, 11, 0, 0, 0, 0, 3, 0, 8, 18, 0, 0, 0,197, 0, 0, 0,198, + 64,192, 1, 0, 1, 0, 0, 67, 1, 0, 3,192, 1,128, 0,220,128,128, 2,154, + 0, 0, 0, 22, 64, 0,128, 11,129,192, 1, 28, 65, 0, 1, 5, 1, 0, 0, 6, +193, 64, 2, 64, 1, 0, 0,128, 1,128, 1, 28,129,128, 1, 64, 1,128, 1, 30, + 1,128, 1, 30, 0,128, 0, 4, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, +105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, + 97,116,101, 66, 97,115,101,100, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 65,100, +100, 65,108,112,104, 97, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67,111,110,118, +101,114,116, 67,111,108,111,114, 83,112, 97, 99,101, 0, 0, 0, 0, 0, 18, 0, + 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, + 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 4, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, + 97, 99,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, +104, 97,115, 95, 97,108,112,104, 97, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 6, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, + 18, 0, 0, 0, 0, 7, 0, 15, 30, 0, 0, 0, 90, 64, 0, 0, 22, 64, 1,128, +197, 1, 0, 0,198, 65,192, 3, 11,130, 64, 0, 28, 2, 0, 1,220,129, 0, 0, + 64, 0,128, 3,197, 1, 0, 0,198,193,192, 3, 0, 2, 0, 0, 67, 2, 0, 5, +192, 2,128, 0,220,129,128, 2,154, 0, 0, 0, 22, 64, 0,128, 11, 2,193, 3, + 28, 66, 0, 1, 5, 2, 0, 0, 6, 66, 65, 4, 64, 2, 0, 0,128, 2,128, 3, +192, 2,128, 1, 0, 3, 0, 2, 64, 3,128, 2,128, 3, 0, 3, 28,130,128, 3, + 64, 2,128, 3, 30, 2,128, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, + 0, 0, 0, 0, 0,105,109, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67,111,108, +111,114, 77,111,100,101, 84,111, 66,105,116,109, 97,112, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0, 67,111,108,111,114, 83,112, 97, 99,101, 0, 4, 17, 0, 0, 0, + 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 65,100,100, 65,108,112,104, 97, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0, 67,111,110,118,101,114,116, 84,111, 66,105,116, +109, 97,112, 0, 0, 0, 0, 0, 30, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, + 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, + 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, 0, + 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 29, 0, + 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99, +101, 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,104, 97, +115, 95, 97,108,112,104, 97, 0, 0, 0, 0, 0, 29, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 99,112,120, 50,114,101, 97,108, 0, 0, 0, 0, 0, 29, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0,103, 97,109,109, 97, 0, 0, 0, 0, 0, 29, + 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 97, 98,115,115,111,108,117,116,101, + 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 99, 97,115, +116, 95,109,111,100,101, 0, 0, 0, 0, 0, 29, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 14, 0, 0, 0, 29, 0, 0, + 0, 0, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, + 0, 7, 0, 0, 0, 11, 0, 0, 0, 7, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, + 0, 13, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua51/im_convert_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_fftw.loh b/im/src/lua5/loh/im_fftw.loh new file mode 100755 index 0000000..9e7c78a --- /dev/null +++ b/im/src/lua5/loh/im_fftw.loh @@ -0,0 +1,110 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua_fftw51/im_fftw.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua_fftw51/im_fftw.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 18, 0, 0, 0, 64,108,117, 97, + 53, 47,105,109, 95,102,102,116,119, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 8, 18, 0, 0, 0, 36, 0, 0, 0,100, 64, 0, 0,128, 0, +128, 0,193, 0, 0, 0,156, 64, 0, 1,128, 0, 0, 0,193, 64, 0, 0, 3, 1, + 0, 3,197,129, 0, 0,198,193,192, 3,156, 64, 0, 3,128, 0, 0, 0,193, 0, + 1, 0,156, 64, 0, 1,128, 0, 0, 0,193, 64, 1, 0,156, 64, 0, 1, 30, 0, +128, 0, 6, 0, 0, 0, 4, 24, 0, 0, 0, 80,114,111, 99,101,115,115, 67,114, +111,115,115, 67,111,114,114,101,108, 97,116,105,111,110, 0, 4, 23, 0, 0, 0, + 80,114,111, 99,101,115,115, 65,117,116,111, 67,111,114,114,101,108, 97,116,105, +111,110, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 67, 70, 76, 79, + 65, 84, 0, 4, 11, 0, 0, 0, 80,114,111, 99,101,115,115, 70, 70, 84, 0, 4, + 12, 0, 0, 0, 80,114,111, 99,101,115,115, 73, 70, 70, 84, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 25, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, + 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1, +133, 1, 0, 0,192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, + 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2, +137, 1,130, 3, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, + 4, 7, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, 0, 78,101,119, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 5, 1, 7, + 8, 23, 0, 0, 0,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 4, 1, 0, + 0, 68, 1,128, 0,132, 1, 0, 1,196, 1,128, 1,156,128, 0, 3,196, 0, 0, + 2, 0, 1, 0, 0, 64, 1, 0, 1,133,129, 0, 0,192, 1,128, 0,156, 1, 0, + 1,220,128, 0, 0,218, 0, 0, 0, 22,192, 0,128, 0, 1,128, 1, 64, 1, 0, + 1, 30, 1,128, 1, 22, 0, 0,128,158, 0, 0, 1, 30, 0,128, 0, 3, 0, 0, + 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, 97,103,101, 67, +114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0,117,110,112, 97, + 99,107, 0, 0, 0, 0, 0, 23, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 24, + 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, + 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 22, 0, 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 8, + 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0,114,101,116, 0, 15, 0, 0, 0, 22, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, 0, 7, 0, 0, + 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 99,111,108,111,114, 95,115,112, + 97, 99,101, 0, 10, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, + 0, 0,102,117,110, 99, 0, 17, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 10, + 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 6, + 0, 0, 0, 9, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, 0, 0, 0, 0, 0, 16, 0, + 0, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, + 0, 12, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 10, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, + 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 50, 0, 0, 0, + 0, 5, 0, 11, 22, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0, +192, 1,128, 2, 5,130, 0, 0, 6,194, 64, 4, 65, 2, 1, 0,128, 2, 0, 0, + 28, 2,128, 1,156, 65, 0, 0,133, 1, 0, 0,192, 1, 0, 0, 1, 66, 1, 0, +213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, + 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, 6, 0, 0, 0, + 4, 3, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 97,115,115,101,114,116, 0, + 4, 7, 0, 0, 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, 0,102,111,114, +109, 97,116, 0, 4, 24, 0, 0, 0,117,110,100,101,102,105,110,101,100, 32,102, +117,110, 99,116,105,111,110, 32, 96, 37,115, 39, 0, 4, 4, 0, 0, 0, 78,101, +119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 49, 0, 0, 0, 5, 2, + 7, 10, 24, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 68, 1, + 0, 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, 3, 4, 1, + 0, 2, 64, 1, 0, 0,128, 1,128, 0,192, 1,128, 1, 5,130, 0, 0, 64, 2, + 0, 1, 28, 2, 0, 1, 28,129, 0, 0, 26, 1, 0, 0, 22,192, 0,128, 64, 1, + 0, 2,128, 1,128, 1, 94, 1,128, 1, 22, 0, 0,128,222, 0, 0, 1, 30, 0, +128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73, +109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, 0, 0, + 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 24, 0, 0, 0, 40, 0, 0, 0, + 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, + 40, 0, 0, 0, 40, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 44, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, + 45, 0, 0, 0, 47, 0, 0, 0, 49, 0, 0, 0, 5, 0, 0, 0, 11, 0, 0, 0, +115,114, 99, 95,105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 23, 0, 0, 0, 11, + 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 23, 0, 0, 0, 10, 0, + 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, 23, 0, 0, 0, + 4, 0, 0, 0,114,101,116, 0, 16, 0, 0, 0, 23, 0, 0, 0, 5, 0, 0, 0, + 6, 0, 0, 0,119,105,100,116,104, 0, 7, 0, 0, 0,104,101,105,103,104,116, + 0, 12, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, + 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0,102,117,110, 99, 0, + 22, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, + 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, + 49, 0, 0, 0, 49, 0, 0, 0, 50, 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0, +102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 6, 0, 0, + 0,119,105,100,116,104, 0, 0, 0, 0, 0, 21, 0, 0, 0, 7, 0, 0, 0,104, +101,105,103,104,116, 0, 0, 0, 0, 0, 21, 0, 0, 0, 12, 0, 0, 0, 99,111, +108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 10, 0, + 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, + 5, 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, + 0, 18, 0, 0, 0, 25, 0, 0, 0, 50, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, + 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 55, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, + 0, 57, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, 2, 0, 0, + 0, 17, 0, 0, 0, 79,110,101, 83,111,117,114, 99,101, 79,110,101, 68,101,115, +116, 0, 1, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 84,119,111, 83,111,117, +114, 99,101,115, 79,110,101, 68,101,115,116, 0, 2, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua_fftw51/im_fftw.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_fftw_be32.loh b/im/src/lua5/loh/im_fftw_be32.loh new file mode 100755 index 0000000..754d56a --- /dev/null +++ b/im/src/lua5/loh/im_fftw_be32.loh @@ -0,0 +1,110 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua_fftw51/im_fftw_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua_fftw51/im_fftw_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 18, 64,108,117, 97, + 53, 47,105,109, 95,102,102,116,119, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 8, 0, 0, 0, 18, 0, 0, 0, 36, 0, 0, 64,100, 0,128, + 0,128, 0, 0, 0,193, 1, 0, 64,156, 0, 0, 0,128, 0, 0, 64,193, 3, 0, + 1, 3, 0, 0,129,197, 3,192,193,198, 3, 0, 64,156, 0, 0, 0,128, 0, 1, + 0,193, 1, 0, 64,156, 0, 0, 0,128, 0, 1, 64,193, 1, 0, 64,156, 0,128, + 0, 30, 0, 0, 0, 6, 4, 0, 0, 0, 24, 80,114,111, 99,101,115,115, 67,114, +111,115,115, 67,111,114,114,101,108, 97,116,105,111,110, 0, 4, 0, 0, 0, 23, + 80,114,111, 99,101,115,115, 65,117,116,111, 67,111,114,114,101,108, 97,116,105, +111,110, 0, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 7, 67, 70, 76, 79, + 65, 84, 0, 4, 0, 0, 0, 11, 80,114,111, 99,101,115,115, 70, 70, 84, 0, 4, + 0, 0, 0, 12, 80,114,111, 99,101,115,115, 73, 70, 70, 84, 0, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 25, 0, 5, 0, 9, 0, 0, 0, 17, + 0, 0, 1, 69, 2,128, 1, 70, 0, 0, 65,133, 2,128, 1,192, 1, 0, 65,156, + 0, 0, 1,133, 0, 0, 1,192, 0, 0,130, 1, 3,130, 1,213, 0, 0, 2, 36, + 0,128, 0, 0, 1, 0, 0, 0, 1,128, 0, 0, 2, 0, 0, 0, 2,128, 0, 0, + 3,130, 1,137, 0,128, 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 3,105,109, 0, + 4, 0, 0, 0, 7, 97,115,115,101,114,116, 0, 4, 0, 0, 0, 4, 78,101,119, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 24, 5, 1, 7, + 8, 0, 0, 0, 23, 0, 0, 0,133, 1, 64, 64,134, 0, 0, 0,192, 0, 0, 1, + 4, 0,128, 1, 68, 1, 0, 1,132, 1,128, 1,196, 3, 0,128,156, 2, 0, 0, +196, 0, 0, 1, 0, 1, 0, 1, 64, 0, 0,129,133, 0,128, 1,192, 1, 0, 1, +156, 0, 0,128,220, 0, 0, 0,218,128, 0,192, 22, 1,128, 1, 0, 1, 0, 1, + 64, 1,128, 1, 30,128, 0, 0, 22, 1, 0, 0,158, 0,128, 0, 30, 0, 0, 0, + 3, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, 97,103,101, 67, +114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 0, 0, 0, 7,117,110,112, 97, + 99,107, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, 0, + 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 10,115,114, 99, 95,105,109, 97,103,101, + 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, + 0, 0, 0, 0, 22, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, + 0, 0, 8, 0, 0, 0, 22, 0, 0, 0, 4,114,101,116, 0, 0, 0, 0, 15, 0, + 0, 0, 22, 0, 0, 0, 5, 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, + 7,104,101,105,103,104,116, 0, 0, 0, 0, 12, 99,111,108,111,114, 95,115,112, + 97, 99,101, 0, 0, 0, 0, 10,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, + 0, 5,102,117,110, 99, 0, 0, 0, 0, 17, 0, 0, 0, 9, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 13, 0, 0, 0, 13, 0, + 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, + 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, + 0, 0, 6, 0, 0, 0, 9,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 12, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 10,100, 97,116, 97, 95,116,121,112,101, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5,102,117,110, 99, 0, 0, 0, 0, 2, + 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 50, + 0, 5, 0, 11, 0, 0, 0, 22, 0, 0, 1, 69, 2,128, 1, 70, 0, 0, 65,133, + 2,128, 1,192, 0, 0,130, 5, 4, 64,194, 6, 0, 1, 2, 65, 0, 0, 2,128, + 1,128, 2, 28, 0, 0, 65,156, 0, 0, 1,133, 0, 0, 1,192, 0, 1, 66, 1, + 3,130, 1,213, 0, 0, 2, 36, 0,128, 0, 0, 1, 0, 0, 0, 1,128, 0, 0, + 2, 0, 0, 0, 2,128, 0, 0, 3,130, 1,137, 0,128, 0, 30, 0, 0, 0, 6, + 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 7, 97,115,115,101,114,116, 0, + 4, 0, 0, 0, 7,115,116,114,105,110,103, 0, 4, 0, 0, 0, 7,102,111,114, +109, 97,116, 0, 4, 0, 0, 0, 24,117,110,100,101,102,105,110,101,100, 32,102, +117,110, 99,116,105,111,110, 32, 96, 37,115, 39, 0, 4, 0, 0, 0, 4, 78,101, +119, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 49, 5, 2, + 7, 10, 0, 0, 0, 24, 0, 0, 0,197, 1,192, 64,198, 0, 0, 1, 0, 0, 0, + 1, 68, 0,128, 1,132, 1, 0, 1,196, 1,128, 2, 4, 3, 0,128,220, 2, 0, + 1, 4, 0, 0, 1, 64, 0,128, 1,128, 1,128, 1,192, 0, 0,130, 5, 1, 0, + 2, 64, 1, 0, 2, 28, 0, 0,129, 28, 0, 0, 1, 26,128, 0,192, 22, 2, 0, + 1, 64, 1,128, 1,128, 1,128, 1, 94,128, 0, 0, 22, 1, 0, 0,222, 0,128, + 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73, +109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 0, 0, 0, + 7,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 40, + 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, + 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, + 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, + 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, + 0, 0, 0, 45, 0, 0, 0, 47, 0, 0, 0, 49, 0, 0, 0, 5, 0, 0, 0, 11, +115,114, 99, 95,105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 11,115,114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, 0, 0, 0, 0, + 0, 23, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, + 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, 0, 0, 8, 0, 0, 0, 23, + 0, 0, 0, 4,114,101,116, 0, 0, 0, 0, 16, 0, 0, 0, 23, 0, 0, 0, 5, + 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, 7,104,101,105,103,104,116, + 0, 0, 0, 0, 12, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, + 10,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 5,102,117,110, 99, 0, + 0, 0, 0, 22, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, + 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, + 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 50, 0, 0, 0, 6, 0, 0, 0, 9, +102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, + 6,119,105,100,116,104, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 7,104, +101,105,103,104,116, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 12, 99,111, +108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, + 0, 10,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 0, 0, 0, 21, + 0, 0, 0, 5,102,117,110, 99, 0, 0, 0, 0, 2, 0, 0, 0, 21, 0, 0, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 25, 0, 0, 0, 50, 0, 0, 0, 54, 0, 0, 0, + 54, 0, 0, 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, + 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, + 56, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, + 2, 0, 0, 0, 17, 79,110,101, 83,111,117,114, 99,101, 79,110,101, 68,101,115, +116, 0, 0, 0, 0, 1, 0, 0, 0, 17, 0, 0, 0, 18, 84,119,111, 83,111,117, +114, 99,101,115, 79,110,101, 68,101,115,116, 0, 0, 0, 0, 2, 0, 0, 0, 17, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua_fftw51/im_fftw_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_fftw_be64.loh b/im/src/lua5/loh/im_fftw_be64.loh new file mode 100644 index 0000000..3b1a6cb --- /dev/null +++ b/im/src/lua5/loh/im_fftw_be64.loh @@ -0,0 +1,122 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua_fftw51/im_fftw_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua_fftw51/im_fftw_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 18, 0, 0, 0, 0, 0, 0, 0, + 64,108,117, 97, 53, 47,105,109, 95,102,102,116,119, 46,108,117, 97, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 8, 18, 0, 0, 0, 36, 0, 0, 0,100, 64, + 0, 0,128, 0,128, 0,193, 0, 0, 0,156, 64, 0, 1,128, 0, 0, 0,193, 64, + 0, 0, 3, 1, 0, 3,197,129, 0, 0,198,193,192, 3,156, 64, 0, 3,128, 0, + 0, 0,193, 0, 1, 0,156, 64, 0, 1,128, 0, 0, 0,193, 64, 1, 0,156, 64, + 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 24, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 67,114,111,115,115, 67,111,114,114,101,108, 97,116,105, +111,110, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 65, +117,116,111, 67,111,114,114,101,108, 97,116,105,111,110, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 67, 70, 76, 79, + 65, 84, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 70, + 70, 84, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73, + 70, 70, 84, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, + 25, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2, +133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0,192, 1, 0, 0, + 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, + 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, + 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, + 0, 24, 0, 0, 0, 5, 1, 7, 8, 23, 0, 0, 0,133, 0, 0, 0,134, 64, 64, + 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, 0,132, 1, 0, 1,196, 1,128, + 1,156,128, 0, 3,196, 0, 0, 2, 0, 1, 0, 0, 64, 1, 0, 1,133,129, 0, + 0,192, 1,128, 0,156, 1, 0, 1,220,128, 0, 0,218, 0, 0, 0, 22,192, 0, +128, 0, 1,128, 1, 64, 1, 0, 1, 30, 1,128, 1, 22, 0, 0,128,158, 0, 0, + 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, + 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116, +101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, + 99,107, 0, 0, 0, 0, 0, 23, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 24, + 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105, +109, 97,103,101, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 22, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, + 0,100,115,116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, 22, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 15, 0, 0, 0, 22, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, 0, 0, 0, 0, +100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117, +110, 99, 0, 17, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 10, + 0, 0, 0, 10, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108, +111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, + 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, + 50, 0, 0, 0, 0, 5, 0, 11, 22, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2, +133, 65, 0, 0,192, 1,128, 2, 5,130, 0, 0, 6,194, 64, 4, 65, 2, 1, 0, +128, 2, 0, 0, 28, 2,128, 1,156, 65, 0, 0,133, 1, 0, 0,192, 1, 0, 0, + 1, 66, 1, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, + 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, + 6, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,111,114, +109, 97,116, 0, 4, 24, 0, 0, 0, 0, 0, 0, 0,117,110,100,101,102,105,110, +101,100, 32,102,117,110, 99,116,105,111,110, 32, 96, 37,115, 39, 0, 4, 4, 0, + 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 38, 0, 0, 0, 49, 0, 0, 0, 5, 2, 7, 10, 24, 0, 0, 0,197, 0, + 0, 0,198, 64,192, 1, 0, 1, 0, 0, 68, 1, 0, 0,132, 1,128, 0,196, 1, + 0, 1, 4, 2,128, 1,220,128, 0, 3, 4, 1, 0, 2, 64, 1, 0, 0,128, 1, +128, 0,192, 1,128, 1, 5,130, 0, 0, 64, 2, 0, 1, 28, 2, 0, 1, 28,129, + 0, 0, 26, 1, 0, 0, 22,192, 0,128, 64, 1, 0, 2,128, 1,128, 1, 94, 1, +128, 1, 22, 0, 0,128,222, 0, 0, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, + 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73, +109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 24, 0, 0, 0, + 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, + 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, + 45, 0, 0, 0, 45, 0, 0, 0, 47, 0, 0, 0, 49, 0, 0, 0, 5, 0, 0, 0, + 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 49, 0, 0, + 0, 0, 0, 23, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105, +109, 97,103,101, 50, 0, 0, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 23, 0, 0, 0, 10, 0, 0, 0, 0, 0, + 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, 23, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 16, 0, 0, 0, 23, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 0, 0, 0, + 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, 0, 0, 0, + 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, 0, 0,102, +117,110, 99, 0, 22, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, + 38, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, + 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 50, 0, 0, 0, 6, 0, 0, 0, + 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, + 0, 21, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, + 0, 0, 0, 21, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104, +116, 0, 0, 0, 0, 0, 21, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111, +108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, + 21, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, + 0, 21, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 25, 0, 0, 0, 50, 0, 0, + 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 56, 0, 0, + 0, 56, 0, 0, 0, 56, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, + 0, 57, 0, 0, 0, 2, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 79,110,101, + 83,111,117,114, 99,101, 79,110,101, 68,101,115,116, 0, 1, 0, 0, 0, 17, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 84,119,111, 83,111,117,114, 99,101,115, + 79,110,101, 68,101,115,116, 0, 2, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua_fftw51/im_fftw_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_fftw_le64.loh b/im/src/lua5/loh/im_fftw_le64.loh new file mode 100755 index 0000000..c5b497a --- /dev/null +++ b/im/src/lua5/loh/im_fftw_le64.loh @@ -0,0 +1,122 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua_fftw51/im_fftw_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua_fftw51/im_fftw_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 18, 0, 0, 0, 0, 0, 0, 0, + 64,108,117, 97, 53, 47,105,109, 95,102,102,116,119, 46,108,117, 97, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 8, 18, 0, 0, 0, 36, 0, 0, 0,100, 64, + 0, 0,128, 0,128, 0,193, 0, 0, 0,156, 64, 0, 1,128, 0, 0, 0,193, 64, + 0, 0, 3, 1, 0, 3,197,129, 0, 0,198,193,192, 3,156, 64, 0, 3,128, 0, + 0, 0,193, 0, 1, 0,156, 64, 0, 1,128, 0, 0, 0,193, 64, 1, 0,156, 64, + 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 24, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 67,114,111,115,115, 67,111,114,114,101,108, 97,116,105, +111,110, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 65, +117,116,111, 67,111,114,114,101,108, 97,116,105,111,110, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 67, 70, 76, 79, + 65, 84, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 70, + 70, 84, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73, + 70, 70, 84, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, + 25, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2, +133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0,192, 1, 0, 0, + 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, + 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, + 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, + 0, 24, 0, 0, 0, 5, 1, 7, 8, 23, 0, 0, 0,133, 0, 0, 0,134, 64, 64, + 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, 0,132, 1, 0, 1,196, 1,128, + 1,156,128, 0, 3,196, 0, 0, 2, 0, 1, 0, 0, 64, 1, 0, 1,133,129, 0, + 0,192, 1,128, 0,156, 1, 0, 1,220,128, 0, 0,218, 0, 0, 0, 22,192, 0, +128, 0, 1,128, 1, 64, 1, 0, 1, 30, 1,128, 1, 22, 0, 0,128,158, 0, 0, + 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, + 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116, +101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, + 99,107, 0, 0, 0, 0, 0, 23, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 24, + 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105, +109, 97,103,101, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 22, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, + 0,100,115,116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, 22, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 15, 0, 0, 0, 22, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, 0, 0, 0, 0, +100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117, +110, 99, 0, 17, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 10, + 0, 0, 0, 10, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108, +111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, + 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, + 50, 0, 0, 0, 0, 5, 0, 11, 22, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2, +133, 65, 0, 0,192, 1,128, 2, 5,130, 0, 0, 6,194, 64, 4, 65, 2, 1, 0, +128, 2, 0, 0, 28, 2,128, 1,156, 65, 0, 0,133, 1, 0, 0,192, 1, 0, 0, + 1, 66, 1, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, + 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, + 6, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,111,114, +109, 97,116, 0, 4, 24, 0, 0, 0, 0, 0, 0, 0,117,110,100,101,102,105,110, +101,100, 32,102,117,110, 99,116,105,111,110, 32, 96, 37,115, 39, 0, 4, 4, 0, + 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 38, 0, 0, 0, 49, 0, 0, 0, 5, 2, 7, 10, 24, 0, 0, 0,197, 0, + 0, 0,198, 64,192, 1, 0, 1, 0, 0, 68, 1, 0, 0,132, 1,128, 0,196, 1, + 0, 1, 4, 2,128, 1,220,128, 0, 3, 4, 1, 0, 2, 64, 1, 0, 0,128, 1, +128, 0,192, 1,128, 1, 5,130, 0, 0, 64, 2, 0, 1, 28, 2, 0, 1, 28,129, + 0, 0, 26, 1, 0, 0, 22,192, 0,128, 64, 1, 0, 2,128, 1,128, 1, 94, 1, +128, 1, 22, 0, 0,128,222, 0, 0, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, + 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73, +109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 24, 0, 0, 0, + 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, + 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, + 45, 0, 0, 0, 45, 0, 0, 0, 47, 0, 0, 0, 49, 0, 0, 0, 5, 0, 0, 0, + 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 49, 0, 0, + 0, 0, 0, 23, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105, +109, 97,103,101, 50, 0, 0, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 23, 0, 0, 0, 10, 0, 0, 0, 0, 0, + 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, 23, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 16, 0, 0, 0, 23, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 0, 0, 0, + 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, 0, 0, 0, + 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, 0, 0,102, +117,110, 99, 0, 22, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, + 38, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, + 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 50, 0, 0, 0, 6, 0, 0, 0, + 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, + 0, 21, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, + 0, 0, 0, 21, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104, +116, 0, 0, 0, 0, 0, 21, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111, +108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, + 21, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, + 0, 21, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 25, 0, 0, 0, 50, 0, 0, + 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 56, 0, 0, + 0, 56, 0, 0, 0, 56, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, + 0, 57, 0, 0, 0, 2, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 79,110,101, + 83,111,117,114, 99,101, 79,110,101, 68,101,115,116, 0, 1, 0, 0, 0, 17, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 84,119,111, 83,111,117,114, 99,101,115, + 79,110,101, 68,101,115,116, 0, 2, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua_fftw51/im_fftw_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_fftw_le64w.loh b/im/src/lua5/loh/im_fftw_le64w.loh new file mode 100755 index 0000000..51fec14 --- /dev/null +++ b/im/src/lua5/loh/im_fftw_le64w.loh @@ -0,0 +1,115 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua_fftw51/im_fftw_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/imlua_fftw51/im_fftw_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 18, 0, 0, 0, 0, 0, 0, 0, + 64,108,117, 97, 53, 47,105,109, 95,102,102,116,119, 46,108,117, 97, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 8, 18, 0, 0, 0, 36, 0, 0, 0,100, 64, + 0, 0,128, 0,128, 0,193, 0, 0, 0,156, 64, 0, 1,128, 0, 0, 0,193, 64, + 0, 0, 3, 1, 0, 3,197,129, 0, 0,198,193,192, 3,156, 64, 0, 3,128, 0, + 0, 0,193, 0, 1, 0,156, 64, 0, 1,128, 0, 0, 0,193, 64, 1, 0,156, 64, + 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 24, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 67,114,111,115,115, 67,111,114,114,101,108, 97,116,105, +111,110, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 65, +117,116,111, 67,111,114,114,101,108, 97,116,105,111,110, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 67, 70, 76, 79, + 65, 84, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 70, + 70, 84, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73, + 70, 70, 84, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, + 20, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2, +133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0,192, 1, 0, 0, + 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, + 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, + 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, + 0, 19, 0, 0, 0, 5, 1, 7, 8, 17, 0, 0, 0,133, 0, 0, 0,134, 64, 64, + 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, 0,132, 1, 0, 1,196, 1,128, + 1,156,128, 0, 3,196, 0, 0, 2, 0, 1, 0, 0, 64, 1, 0, 1,133,129, 0, + 0,192, 1,128, 0,156, 1, 0, 1,220, 64, 0, 0,158, 0, 0, 1, 30, 0,128, + 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, + 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115, +101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 17, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 3, 0, 0, 0, 10, + 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97, +103,101, 0, 8, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0,119,105,100,116,104, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105, +103,104,116, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, + 97, 99,101, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112, +101, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 17, 0, 0, 0, 8, + 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 12, + 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102, +117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, + 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, + 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 41, 0, 0, 0, 0, 5, 0, 11, + 22, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2, + 5,130, 0, 0, 6,194, 64, 4, 65, 2, 1, 0,128, 2, 0, 0, 28, 2,128, 1, +156, 65, 0, 0,133, 1, 0, 0,192, 1, 0, 0, 1, 66, 1, 0,213, 1,130, 3, + 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, + 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, + 0, 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115, +101,114,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,102,111,114,109, 97,116, 0, 4, 24, 0, 0, + 0, 0, 0, 0, 0,117,110,100,101,102,105,110,101,100, 32,102,117,110, 99,116, +105,111,110, 32, 96, 37,115, 39, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 78,101, +119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 40, 0, + 0, 0, 5, 2, 7, 10, 18, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, + 0, 0, 68, 1, 0, 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, + 0, 3, 4, 1, 0, 2, 64, 1, 0, 0,128, 1,128, 0,192, 1,128, 1, 5,130, + 0, 0, 64, 2, 0, 1, 28, 2, 0, 1, 28, 65, 0, 0,222, 0, 0, 1, 30, 0, +128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, + 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97, +115,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, + 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 39, 0, 0, 0, 40, 0, 0, 0, + 4, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103, +101, 49, 0, 0, 0, 0, 0, 17, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115, +114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 17, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, + 17, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116, +104, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, + 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, + 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, + 0, 0, 0,102,117,110, 99, 0, 22, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, + 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, + 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, + 33, 0, 0, 0, 33, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, + 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 41, 0, 0, 0, + 6, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, + 0, 0, 0, 0, 0, 21, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100, +116,104, 0, 0, 0, 0, 0, 21, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, +101,105,103,104,116, 0, 0, 0, 0, 0, 21, 0, 0, 0, 12, 0, 0, 0, 0, 0, + 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 21, 0, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, + 0, 0, 0, 0, 21, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, + 0, 2, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, + 0, 41, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, + 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, + 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, + 0, 48, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, + 0, 79,110,101, 83,111,117,114, 99,101, 79,110,101, 68,101,115,116, 0, 1, 0, + 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 84,119,111, 83,111,117, +114, 99,101,115, 79,110,101, 68,101,115,116, 0, 2, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua_fftw51/im_fftw_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/im/src/lua5/loh/im_image.loh b/im/src/lua5/loh/im_image.loh new file mode 100644 index 0000000..c43eb8c --- /dev/null +++ b/im/src/lua5/loh/im_image.loh @@ -0,0 +1,63 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua51/im_image.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua51/im_image.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 19, 0, 0, 0, 64,108,117, 97, + 53, 47,105,109, 95,105,109, 97,103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 4, 0, 0, 0, 5, 0, 0, 0,100, 0, 0, 0, 9, + 64,128,128, 30, 0,128, 0, 2, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, + 17, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 0, 5, 0, + 10, 74, 0, 0, 0, 90, 64, 0, 0, 22,128, 0,128, 75, 1, 64, 0, 92,129, 0, + 1, 64, 0,128, 2,154, 64, 0, 0, 22,128, 0,128, 75, 65, 64, 0, 92,129, 0, + 1,128, 0,128, 2,218, 64, 0, 0, 22,128, 0,128, 75,129, 64, 0, 92,129, 0, + 1,192, 0,128, 2, 26, 65, 0, 0, 22,128, 0,128, 75,193, 64, 0, 92,129, 0, + 1, 0, 1,128, 2, 69, 1, 1, 0,128, 1,128, 0, 92,129, 0, 1, 23, 64,193, + 2, 22,192, 0,128, 64, 1,128, 0,128, 1, 0, 0, 92,129, 0, 1, 64, 0,128, + 2, 69, 1, 1, 0,128, 1, 0, 1, 92,129, 0, 1, 23, 64,193, 2, 22,192, 0, +128, 64, 1, 0, 1,128, 1, 0, 0, 92,129, 0, 1,128, 0,128, 2, 69, 1, 1, + 0,128, 1,128, 1, 92,129, 0, 1, 23, 64,193, 2, 22,192, 0,128, 64, 1,128, + 1,128, 1, 0, 0, 92,129, 0, 1,192, 0,128, 2, 69, 1, 1, 0,128, 1, 0, + 2, 92,129, 0, 1, 23, 64,193, 2, 22,192, 0,128, 64, 1, 0, 2,128, 1, 0, + 0, 92,129, 0, 1, 0, 1,128, 2, 69,129, 1, 0, 70,193,193, 2,128, 1,128, + 0,192, 1, 0, 1, 0, 2,128, 1, 64, 2, 0, 2, 92,129,128, 2,139, 1, 66, + 0, 0, 2,128, 2,156, 65,128, 1,139, 65, 66, 0,156,129, 0, 1,154, 1, 0, + 0, 22, 64, 0,128,139,129,194, 2,156, 65, 0, 1, 94, 1, 0, 1, 30, 0,128, + 0, 11, 0, 0, 0, 4, 6, 0, 0, 0, 87,105,100,116,104, 0, 4, 7, 0, 0, + 0, 72,101,105,103,104,116, 0, 4, 11, 0, 0, 0, 67,111,108,111,114, 83,112, + 97, 99,101, 0, 4, 9, 0, 0, 0, 68, 97,116, 97, 84,121,112,101, 0, 4, 5, + 0, 0, 0,116,121,112,101, 0, 4, 9, 0, 0, 0,102,117,110, 99,116,105,111, +110, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 12, 0, 0, 0, 73,109, 97,103,101, + 67,114,101, 97,116,101, 0, 4, 15, 0, 0, 0, 67,111,112,121, 65,116,116,114, +105, 98,117,116,101,115, 0, 4, 9, 0, 0, 0, 72, 97,115, 65,108,112,104, 97, + 0, 4, 9, 0, 0, 0, 65,100,100, 65,108,112,104, 97, 0, 0, 0, 0, 0, 74, + 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, + 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, + 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, + 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, + 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, + 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 73, 0, 0, + 0, 6, 0, 0, 0,119,105,100,116,104, 0, 0, 0, 0, 0, 73, 0, 0, 0, 7, + 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 73, 0, 0, 0, 12, 0, + 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 73, 0, + 0, 0, 10, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, + 73, 0, 0, 0, 10, 0, 0, 0,110,101,119, 95,105,109, 97,103,101, 0, 63, 0, + 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 24, 0, + 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua51/im_image.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_image_be32.loh b/im/src/lua5/loh/im_image_be32.loh new file mode 100755 index 0000000..04bafc0 --- /dev/null +++ b/im/src/lua5/loh/im_image_be32.loh @@ -0,0 +1,63 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua51/im_image_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua51/im_image_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 19, 64,108,117, 97, + 53, 47,105,109, 95,105,109, 97,103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0,100,128, +128, 64, 9, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 3,105,109, 0, 4, + 0, 0, 0, 17, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 24, 0, 5, 0, + 10, 0, 0, 0, 74, 0, 0, 64, 90,128, 0,128, 22, 0, 64, 1, 75, 1, 0,129, + 92, 2,128, 0, 64, 0, 0, 64,154,128, 0,128, 22, 0, 64, 65, 75, 1, 0,129, + 92, 2,128, 0,128, 0, 0, 64,218,128, 0,128, 22, 0, 64,129, 75, 1, 0,129, + 92, 2,128, 0,192, 0, 0, 65, 26,128, 0,128, 22, 0, 64,193, 75, 1, 0,129, + 92, 2,128, 1, 0, 0, 1, 1, 69, 0,128, 1,128, 1, 0,129, 92, 2,193, 64, + 23,128, 0,192, 22, 0,128, 1, 64, 0, 0, 1,128, 1, 0,129, 92, 2,128, 0, + 64, 0, 1, 1, 69, 1, 0, 1,128, 1, 0,129, 92, 2,193, 64, 23,128, 0,192, + 22, 1, 0, 1, 64, 0, 0, 1,128, 1, 0,129, 92, 2,128, 0,128, 0, 1, 1, + 69, 1,128, 1,128, 1, 0,129, 92, 2,193, 64, 23,128, 0,192, 22, 1,128, 1, + 64, 0, 0, 1,128, 1, 0,129, 92, 2,128, 0,192, 0, 1, 1, 69, 2, 0, 1, +128, 1, 0,129, 92, 2,193, 64, 23,128, 0,192, 22, 2, 0, 1, 64, 0, 0, 1, +128, 1, 0,129, 92, 2,128, 1, 0, 0, 1,129, 69, 2,193,193, 70, 0,128, 1, +128, 1, 0, 1,192, 1,128, 2, 0, 2, 0, 2, 64, 2,128,129, 92, 0, 66, 1, +139, 2,128, 2, 0, 1,128, 65,156, 0, 66, 65,139, 1, 0,129,156, 0, 0, 1, +154,128, 0, 64, 22, 2,194,129,139, 1, 0, 65,156, 1, 0, 1, 94, 0,128, 0, + 30, 0, 0, 0, 11, 4, 0, 0, 0, 6, 87,105,100,116,104, 0, 4, 0, 0, 0, + 7, 72,101,105,103,104,116, 0, 4, 0, 0, 0, 11, 67,111,108,111,114, 83,112, + 97, 99,101, 0, 4, 0, 0, 0, 9, 68, 97,116, 97, 84,121,112,101, 0, 4, 0, + 0, 0, 5,116,121,112,101, 0, 4, 0, 0, 0, 9,102,117,110, 99,116,105,111, +110, 0, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 12, 73,109, 97,103,101, + 67,114,101, 97,116,101, 0, 4, 0, 0, 0, 15, 67,111,112,121, 65,116,116,114, +105, 98,117,116,101,115, 0, 4, 0, 0, 0, 9, 72, 97,115, 65,108,112,104, 97, + 0, 4, 0, 0, 0, 9, 65,100,100, 65,108,112,104, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 74, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, + 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, + 0, 0, 11, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, + 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, + 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 24, 0, + 0, 0, 6, 0, 0, 0, 6,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, + 73, 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, 0, 0, 0, 0, 73, 0, + 0, 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, 0, 0, 0, 0, 73, 0, 0, + 0, 12, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, + 0, 73, 0, 0, 0, 10,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, + 0, 0, 0, 73, 0, 0, 0, 10,110,101,119, 95,105,109, 97,103,101, 0, 0, 0, + 0, 63, 0, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, + 0, 24, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua51/im_image_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_image_be64.loh b/im/src/lua5/loh/im_image_be64.loh new file mode 100644 index 0000000..6aed993 --- /dev/null +++ b/im/src/lua5/loh/im_image_be64.loh @@ -0,0 +1,68 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua51/im_image_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua51/im_image_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 19, 0, 0, 0, 0, 0, 0, 0, + 64,108,117, 97, 53, 47,105,109, 95,105,109, 97,103,101, 46,108,117, 97, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 4, 0, 0, 0, 5, 0, 0, 0,100, + 0, 0, 0, 9, 64,128,128, 30, 0,128, 0, 2, 0, 0, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103, +101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 0, 5, 0, 10, 74, 0, 0, + 0, 90, 64, 0, 0, 22,128, 0,128, 75, 1, 64, 0, 92,129, 0, 1, 64, 0,128, + 2,154, 64, 0, 0, 22,128, 0,128, 75, 65, 64, 0, 92,129, 0, 1,128, 0,128, + 2,218, 64, 0, 0, 22,128, 0,128, 75,129, 64, 0, 92,129, 0, 1,192, 0,128, + 2, 26, 65, 0, 0, 22,128, 0,128, 75,193, 64, 0, 92,129, 0, 1, 0, 1,128, + 2, 69, 1, 1, 0,128, 1,128, 0, 92,129, 0, 1, 23, 64,193, 2, 22,192, 0, +128, 64, 1,128, 0,128, 1, 0, 0, 92,129, 0, 1, 64, 0,128, 2, 69, 1, 1, + 0,128, 1, 0, 1, 92,129, 0, 1, 23, 64,193, 2, 22,192, 0,128, 64, 1, 0, + 1,128, 1, 0, 0, 92,129, 0, 1,128, 0,128, 2, 69, 1, 1, 0,128, 1,128, + 1, 92,129, 0, 1, 23, 64,193, 2, 22,192, 0,128, 64, 1,128, 1,128, 1, 0, + 0, 92,129, 0, 1,192, 0,128, 2, 69, 1, 1, 0,128, 1, 0, 2, 92,129, 0, + 1, 23, 64,193, 2, 22,192, 0,128, 64, 1, 0, 2,128, 1, 0, 0, 92,129, 0, + 1, 0, 1,128, 2, 69,129, 1, 0, 70,193,193, 2,128, 1,128, 0,192, 1, 0, + 1, 0, 2,128, 1, 64, 2, 0, 2, 92,129,128, 2,139, 1, 66, 0, 0, 2,128, + 2,156, 65,128, 1,139, 65, 66, 0,156,129, 0, 1,154, 1, 0, 0, 22, 64, 0, +128,139,129,194, 2,156, 65, 0, 1, 94, 1, 0, 1, 30, 0,128, 0, 11, 0, 0, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 72,101,105,103,104,116, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0, 67,111,108,111,114, 83,112, 97, 99,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 68, 97,116, 97, 84,121,112,101, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116, +121,112,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,116,105,111, +110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 0, 4, 15, 0, 0, 0, + 0, 0, 0, 0, 67,111,112,121, 65,116,116,114,105, 98,117,116,101,115, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 72, 97,115, 65,108,112,104, 97, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0, 65,100,100, 65,108,112,104, 97, 0, 0, 0, 0, 0, 74, + 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, + 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, + 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, + 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, + 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, + 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, + 0, 73, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, + 0, 0, 0, 73, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104, +116, 0, 0, 0, 0, 0, 73, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111, +108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 73, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, + 73, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,110,101,119, 95,105,109, 97,103, +101, 0, 63, 0, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 6, 0, + 0, 0, 24, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua51/im_image_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_image_le64.loh b/im/src/lua5/loh/im_image_le64.loh new file mode 100755 index 0000000..6a4d127 --- /dev/null +++ b/im/src/lua5/loh/im_image_le64.loh @@ -0,0 +1,68 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua51/im_image_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua51/im_image_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 19, 0, 0, 0, 0, 0, 0, 0, + 64,108,117, 97, 53, 47,105,109, 95,105,109, 97,103,101, 46,108,117, 97, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 4, 0, 0, 0, 5, 0, 0, 0,100, + 0, 0, 0, 9, 64,128,128, 30, 0,128, 0, 2, 0, 0, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103, +101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 0, 5, 0, 10, 74, 0, 0, + 0, 90, 64, 0, 0, 22,128, 0,128, 75, 1, 64, 0, 92,129, 0, 1, 64, 0,128, + 2,154, 64, 0, 0, 22,128, 0,128, 75, 65, 64, 0, 92,129, 0, 1,128, 0,128, + 2,218, 64, 0, 0, 22,128, 0,128, 75,129, 64, 0, 92,129, 0, 1,192, 0,128, + 2, 26, 65, 0, 0, 22,128, 0,128, 75,193, 64, 0, 92,129, 0, 1, 0, 1,128, + 2, 69, 1, 1, 0,128, 1,128, 0, 92,129, 0, 1, 23, 64,193, 2, 22,192, 0, +128, 64, 1,128, 0,128, 1, 0, 0, 92,129, 0, 1, 64, 0,128, 2, 69, 1, 1, + 0,128, 1, 0, 1, 92,129, 0, 1, 23, 64,193, 2, 22,192, 0,128, 64, 1, 0, + 1,128, 1, 0, 0, 92,129, 0, 1,128, 0,128, 2, 69, 1, 1, 0,128, 1,128, + 1, 92,129, 0, 1, 23, 64,193, 2, 22,192, 0,128, 64, 1,128, 1,128, 1, 0, + 0, 92,129, 0, 1,192, 0,128, 2, 69, 1, 1, 0,128, 1, 0, 2, 92,129, 0, + 1, 23, 64,193, 2, 22,192, 0,128, 64, 1, 0, 2,128, 1, 0, 0, 92,129, 0, + 1, 0, 1,128, 2, 69,129, 1, 0, 70,193,193, 2,128, 1,128, 0,192, 1, 0, + 1, 0, 2,128, 1, 64, 2, 0, 2, 92,129,128, 2,139, 1, 66, 0, 0, 2,128, + 2,156, 65,128, 1,139, 65, 66, 0,156,129, 0, 1,154, 1, 0, 0, 22, 64, 0, +128,139,129,194, 2,156, 65, 0, 1, 94, 1, 0, 1, 30, 0,128, 0, 11, 0, 0, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 72,101,105,103,104,116, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0, 67,111,108,111,114, 83,112, 97, 99,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 68, 97,116, 97, 84,121,112,101, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116, +121,112,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,116,105,111, +110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 0, 4, 15, 0, 0, 0, + 0, 0, 0, 0, 67,111,112,121, 65,116,116,114,105, 98,117,116,101,115, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 72, 97,115, 65,108,112,104, 97, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0, 65,100,100, 65,108,112,104, 97, 0, 0, 0, 0, 0, 74, + 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, + 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, + 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, + 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, + 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, + 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, + 0, 73, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, + 0, 0, 0, 73, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104, +116, 0, 0, 0, 0, 0, 73, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111, +108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 73, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, + 73, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,110,101,119, 95,105,109, 97,103, +101, 0, 63, 0, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 6, 0, + 0, 0, 24, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua51/im_image_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_process.loh b/im/src/lua5/loh/im_process.loh new file mode 100755 index 0000000..47dc66e --- /dev/null +++ b/im/src/lua5/loh/im_process.loh @@ -0,0 +1,817 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua_process51/im_process.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua_process51/im_process.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 21, 0, 0, 0, 64,108,117, 97, + 53, 47,105,109, 95,112,114,111, 99,101,115,115, 46,108,117, 97, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 13,144, 1, 0, 0, 36, 0, 0, 0,100, 64, 0, + 0,164,128, 0, 0,228,192, 0, 0, 36, 1, 1, 0,100, 65, 1, 0,128, 1, 0, + 0,193, 1, 0, 0, 3, 2, 0, 5,197, 66, 0, 0,198,130,192, 5,156, 65, 0, + 3,128, 1, 0, 0,193,193, 0, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 1, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 1, 0,156, 65, 0, 1,128, 1, 0, + 0,193,129, 1, 0, 1,194, 1, 0, 64, 2,128, 2,133, 66, 0, 0,134, 2, 66, + 5,197, 66, 0, 0,198, 66,194, 5,156, 65, 0, 3,128, 1, 0, 0,193,129, 2, + 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 2, 0, 3, 2, 0, 5,197, 66, 0, + 0,198, 2,195, 5,156, 65, 0, 3,128, 1, 0, 0,193, 65, 3, 0, 3, 2,128, + 4,133, 66, 0, 0,134,130, 67, 5,195, 2,128, 5,156, 65, 0, 3,133, 65, 0, + 0,228,129, 1, 0,137,193,129,135,133, 65, 0, 0,228,193, 1, 0,137,193, 1, +136,128, 1, 0, 0,193, 65, 4, 0, 36, 2, 2, 0,100, 66, 2, 0,156, 65, 0, + 2,133, 65, 0, 0,228,129, 2, 0,137,193, 1,137,128, 1,128, 0,193,193, 4, + 0,156, 65, 0, 1,133, 65, 0, 0,228,193, 2, 0,137,193, 1,138,133, 65, 0, + 0,228, 1, 3, 0,137,193,129,138,128, 1, 0, 0,193,129, 5, 0,156, 65, 0, + 1,128, 1, 0, 0,193,193, 5, 0, 36, 66, 3, 0,100,130, 3, 0,156, 65, 0, + 2,128, 1, 0, 0,193, 1, 6, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 6, + 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 6, 0,156, 65, 0, 1,128, 1, 0, + 0,193,193, 6, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 7, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 65, 7, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 7, + 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 7, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 1, 8, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 8, 0,156, 65, 0, + 1,128, 1, 0, 0,193,129, 8, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 8, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 9, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 65, 9, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 9, 0,156, 65, 0, + 1,128, 1, 0, 0,193,193, 9, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 10, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 10, 0,156, 65, 0, 1,128, 1, 0, + 0,193,129, 10, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 10, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 1, 11, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 11, + 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 11, 0,156, 65, 0, 1,128, 1, 0, + 0,193,193, 11, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 12, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 65, 12, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 12, + 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 12, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 1, 13, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 13, 0,156, 65, 0, + 1,128, 1, 0, 0,193,129, 13, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 13, + 0,156, 65, 0, 1,128, 1,128, 1,193, 1, 14, 0, 3, 2, 0, 4,100,194, 3, + 0,156, 65, 0, 2,133, 65, 0, 0,228, 1, 4, 0,137,193,129,156,164, 65, 4, + 0,192, 1, 0, 0, 1,130, 14, 0, 67, 2,128, 5, 0, 3, 0, 3,220, 65, 0, + 3,192, 1, 0, 0, 1,194, 14, 0, 67, 2,128, 5, 0, 3, 0, 3,220, 65, 0, + 3,192, 1, 0, 0, 1, 2, 15, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 66, 15, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 15, 0,220, 65, 0, 1,192, 1, 0, + 0, 1,194, 15, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 16, 0,220, 65, 0, + 1,192, 1, 0, 0, 1, 66, 16, 0,220, 65, 0, 1,192, 1,128, 0, 1,130, 16, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 16, 0,220, 65, 0, 1,192, 1, 0, + 0, 1, 2, 17, 0,220, 65, 0, 1,192, 1,128, 0, 1, 66, 17, 0,220, 65, 0, + 1,197, 65, 0, 0, 36,130, 4, 0,201, 1, 2,163,192, 1,128, 0, 1,194, 17, + 0,220, 65, 0, 1,192, 1, 0, 1, 1, 2, 18, 0,220, 65, 0, 1,192, 1,128, + 1, 1, 66, 18, 0,220, 65, 0, 1,192, 1,128, 0, 1,130, 18, 0, 67, 2,128, + 5, 5, 67, 0, 0, 6,195, 82, 6,220, 65, 0, 3,197, 65, 0, 0, 36,194, 4, + 0,201, 1, 2,166,197, 65, 0, 0, 36, 2, 5, 0,201, 1,130,166,192, 1,128, + 0, 1,130, 19, 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 19, 0,220, 65, 0, + 1,192, 1, 0, 0, 1, 2, 20, 0, 67, 2, 0, 5,197, 66, 0, 0,198, 66,212, + 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1,130, 20, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,194, 20, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 21, + 0,220, 65, 0, 1,197, 65, 0, 0, 36, 66, 5, 0,201, 1,130,170,192, 1, 0, + 2, 1,130, 21, 0, 67, 2, 0, 5,197, 66, 0, 0,198, 2,194, 5, 5, 67, 0, + 0, 6, 3, 67, 6,220, 65, 0, 3,192, 1, 0, 1, 1,194, 21, 0, 67, 2, 0, + 5,197, 66, 0, 0,198, 2,214, 5, 5, 67, 0, 0, 6, 67, 86, 6,220, 65, 0, + 3,197, 65, 0, 0, 36,130, 5, 0,201, 1, 2,173,197, 65, 0, 0, 36,194, 5, + 0,201, 1,130,173,192, 1, 0, 0, 1, 2, 23, 0, 67, 2,128, 5, 5, 67, 0, + 0, 6, 3, 67, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 23, 0,220, 65, 0, + 1,192, 1,128, 0, 1,130, 23, 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 23, + 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 24, 0,220, 65, 0, 1,192, 1, 0, + 0, 1, 66, 24, 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 24, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,194, 24, 0, 67, 2,128, 5, 5, 67, 0, 0, 6, 67, 86, + 6,220, 65, 0, 3,192, 1, 0, 0, 1, 2, 25, 0, 67, 2,128, 5, 5, 67, 0, + 0, 6, 67, 86, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 25, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,130, 25, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, + 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1,194, 25, 0, 67, 2, 0, + 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, + 0, 1, 2, 26, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, + 6,220, 65, 0, 3,192, 1,128, 0, 1, 66, 26, 0,220, 65, 0, 1,192, 1, 0, + 0, 1,130, 26, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, + 6,220, 65, 0, 3,192, 1, 0, 0, 1,194, 26, 0, 67, 2, 0, 5,197, 66, 0, + 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 2, 27, + 0,220, 65, 0, 1,192, 1, 0, 0, 1, 66, 27, 0,220, 65, 0, 1,192, 1, 0, + 0, 1,130, 27, 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 27, 0, 67, 2, 0, + 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, + 0, 1, 2, 28, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, + 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 28, 0,220, 65, 0, 1,192, 1, 0, + 0, 1,130, 28, 0,220, 65, 0, 1, 30, 0,128, 0,115, 0, 0, 0, 4, 19, 0, + 0, 0, 65,110, 97,108,121,122,101, 70,105,110,100, 82,101,103,105,111,110,115, + 0, 4, 3, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 85, 83, 72, 79, 82, 84, + 0, 4, 21, 0, 0, 0, 80,114,111, 99,101,115,115, 80,101,114,105,109,101,116, +101,114, 76,105,110,101, 0, 4, 20, 0, 0, 0, 80,114,111, 99,101,115,115, 82, +101,109,111,118,101, 66,121, 65,114,101, 97, 0, 4, 17, 0, 0, 0, 80,114,111, + 99,101,115,115, 70,105,108,108, 72,111,108,101,115, 0, 4, 18, 0, 0, 0, 80, +114,111, 99,101,115,115, 72,111,117,103,104, 76,105,110,101,115, 0, 3, 0, 0, + 0, 0, 0,128,102, 64, 4, 5, 0, 0, 0, 71, 82, 65, 89, 0, 4, 4, 0, 0, + 0, 73, 78, 84, 0, 4, 22, 0, 0, 0, 80,114,111, 99,101,115,115, 72,111,117, +103,104, 76,105,110,101,115, 68,114, 97,119, 0, 4, 25, 0, 0, 0, 80,114,111, + 99,101,115,115, 68,105,115,116, 97,110, 99,101, 84,114, 97,110,115,102,111,114, +109, 0, 4, 6, 0, 0, 0, 70, 76, 79, 65, 84, 0, 4, 23, 0, 0, 0, 80,114, +111, 99,101,115,115, 82,101,103,105,111,110, 97,108, 77, 97,120,105,109,117,109, + 0, 4, 7, 0, 0, 0, 66, 73, 78, 65, 82, 89, 0, 4, 17, 0, 0, 0, 80,114, +111, 99,101,115,115, 82,101,100,117, 99,101, 78,101,119, 0, 4, 17, 0, 0, 0, + 80,114,111, 99,101,115,115, 82,101,115,105,122,101, 78,101,119, 0, 4, 17, 0, + 0, 0, 80,114,111, 99,101,115,115, 82,101,100,117, 99,101, 66,121, 52, 0, 4, + 15, 0, 0, 0, 80,114,111, 99,101,115,115, 67,114,111,112, 78,101,119, 0, 4, + 14, 0, 0, 0, 80,114,111, 99,101,115,115, 73,110,115,101,114,116, 0, 4, 21, + 0, 0, 0, 80,114,111, 99,101,115,115, 65,100,100, 77, 97,114,103,105,110,115, + 78,101,119, 0, 4, 17, 0, 0, 0, 80,114,111, 99,101,115,115, 82,111,116, 97, +116,101, 78,101,119, 0, 4, 17, 0, 0, 0, 80,114,111, 99,101,115,115, 82,111, +116, 97,116,101, 82,101,102, 0, 4, 16, 0, 0, 0, 80,114,111, 99,101,115,115, + 82,111,116, 97,116,101, 57, 48, 0, 4, 17, 0, 0, 0, 80,114,111, 99,101,115, +115, 82,111,116, 97,116,101, 49, 56, 48, 0, 4, 14, 0, 0, 0, 80,114,111, 99, +101,115,115, 77,105,114,114,111,114, 0, 4, 12, 0, 0, 0, 80,114,111, 99,101, +115,115, 70,108,105,112, 0, 4, 14, 0, 0, 0, 80,114,111, 99,101,115,115, 82, + 97,100,105, 97,108, 0, 4, 25, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, + 97,121, 77,111,114,112,104, 67,111,110,118,111,108,118,101, 0, 4, 22, 0, 0, + 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 69,114,111, +100,101, 0, 4, 23, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77, +111,114,112,104, 68,105,108, 97,116,101, 0, 4, 21, 0, 0, 0, 80,114,111, 99, +101,115,115, 71,114, 97,121, 77,111,114,112,104, 79,112,101,110, 0, 4, 22, 0, + 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 67,108, +111,115,101, 0, 4, 23, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, + 77,111,114,112,104, 84,111,112, 72, 97,116, 0, 4, 21, 0, 0, 0, 80,114,111, + 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 87,101,108,108, 0, 4, 25, + 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 71, +114, 97,100,105,101,110,116, 0, 4, 24, 0, 0, 0, 80,114,111, 99,101,115,115, + 66,105,110, 77,111,114,112,104, 67,111,110,118,111,108,118,101, 0, 4, 21, 0, + 0, 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 69,114,111, +100,101, 0, 4, 22, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111, +114,112,104, 68,105,108, 97,116,101, 0, 4, 20, 0, 0, 0, 80,114,111, 99,101, +115,115, 66,105,110, 77,111,114,112,104, 79,112,101,110, 0, 4, 21, 0, 0, 0, + 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 67,108,111,115,101, + 0, 4, 23, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112, +104, 79,117,116,108,105,110,101, 0, 4, 20, 0, 0, 0, 80,114,111, 99,101,115, +115, 66,105,110, 77,111,114,112,104, 84,104,105,110, 0, 4, 22, 0, 0, 0, 80, +114,111, 99,101,115,115, 77,101,100,105, 97,110, 67,111,110,118,111,108,118,101, + 0, 4, 21, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,103,101, 67,111, +110,118,111,108,118,101, 0, 4, 27, 0, 0, 0, 80,114,111, 99,101,115,115, 82, + 97,110,107, 67,108,111,115,101,115,116, 67,111,110,118,111,108,118,101, 0, 4, + 23, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,107, 77, 97,120, 67,111, +110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, 80,114,111, 99,101,115,115, 82, + 97,110,107, 77,105,110, 67,111,110,118,111,108,118,101, 0, 4, 16, 0, 0, 0, + 80,114,111, 99,101,115,115, 67,111,110,118,111,108,118,101, 0, 4, 19, 0, 0, + 0, 80,114,111, 99,101,115,115, 67,111,110,118,111,108,118,101, 83,101,112, 0, + 4, 19, 0, 0, 0, 80,114,111, 99,101,115,115, 67,111,110,118,111,108,118,101, + 82,101,112, 0, 4, 20, 0, 0, 0, 80,114,111, 99,101,115,115, 67,111,110,118, +111,108,118,101, 68,117, 97,108, 0, 4, 23, 0, 0, 0, 80,114,111, 99,101,115, +115, 67,111,109,112, 97,115,115, 67,111,110,118,111,108,118,101, 0, 4, 20, 0, + 0, 0, 80,114,111, 99,101,115,115, 77,101, 97,110, 67,111,110,118,111,108,118, +101, 0, 4, 24, 0, 0, 0, 80,114,111, 99,101,115,115, 71, 97,117,115,115,105, + 97,110, 67,111,110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, 80,114,111, 99, +101,115,115, 66, 97,114,108,101,116,116, 67,111,110,118,111,108,118,101, 0, 4, + 22, 0, 0, 0, 80,114,111, 99,101,115,115, 73,110,116,101,114,108, 97, 99,101, + 83,112,108,105,116, 0, 4, 25, 0, 0, 0, 80,114,111, 99,101,115,115, 73,110, +116,101,114,108, 97, 99,101, 83,112,108,105,116, 78,101,119, 0, 4, 30, 0, 0, + 0, 80,114,111, 99,101,115,115, 68,105,102,102, 79,102, 71, 97,117,115,115,105, + 97,110, 67,111,110,118,111,108,118,101, 0, 4, 29, 0, 0, 0, 80,114,111, 99, +101,115,115, 76, 97,112, 79,102, 71, 97,117,115,115,105, 97,110, 67,111,110,118, +111,108,118,101, 0, 4, 21, 0, 0, 0, 80,114,111, 99,101,115,115, 83,111, 98, +101,108, 67,111,110,118,111,108,118,101, 0, 4, 26, 0, 0, 0, 80,114,111, 99, +101,115,115, 83,112,108,105,110,101, 69,100,103,101, 67,111,110,118,111,108,118, +101, 0, 4, 23, 0, 0, 0, 80,114,111, 99,101,115,115, 80,114,101,119,105,116, +116, 67,111,110,118,111,108,118,101, 0, 4, 20, 0, 0, 0, 80,114,111, 99,101, +115,115, 90,101,114,111, 67,114,111,115,115,105,110,103, 0, 4, 13, 0, 0, 0, + 80,114,111, 99,101,115,115, 67, 97,110,110,121, 0, 4, 22, 0, 0, 0, 80,114, +111, 99,101,115,115, 85,110, 65,114,105,116,104,109,101,116,105, 99, 79,112, 0, + 4, 20, 0, 0, 0, 80,114,111, 99,101,115,115, 65,114,105,116,104,109,101,116, +105, 99, 79,112, 0, 4, 15, 0, 0, 0, 80,114,111, 99,101,115,115, 85,110,115, +104, 97,114,112, 0, 4, 13, 0, 0, 0, 80,114,111, 99,101,115,115, 83,104, 97, +114,112, 0, 4, 19, 0, 0, 0, 80,114,111, 99,101,115,115, 83,104, 97,114,112, + 75,101,114,110,101,108, 0, 4, 28, 0, 0, 0, 80,114,111, 99,101,115,115, 65, +114,105,116,104,109,101,116,105, 99, 67,111,110,115,116, 79,112, 78,101,119, 0, + 4, 18, 0, 0, 0, 80,114,111, 99,101,115,115, 66,108,101,110,100, 67,111,110, +115,116, 0, 4, 13, 0, 0, 0, 80,114,111, 99,101,115,115, 66,108,101,110,100, + 0, 4, 20, 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111, +109,112,108,101,120, 0, 4, 20, 0, 0, 0, 80,114,111, 99,101,115,115, 77,101, +114,103,101, 67,111,109,112,108,101,120, 0, 4, 7, 0, 0, 0, 67, 70, 76, 79, + 65, 84, 0, 4, 23, 0, 0, 0, 80,114,111, 99,101,115,115, 77,117,108,116,105, +112,108,101, 77,101, 97,110, 78,101,119, 0, 4, 25, 0, 0, 0, 80,114,111, 99, +101,115,115, 77,117,108,116,105,112,108,101, 83,116,100, 68,101,118, 78,101,119, + 0, 4, 22, 0, 0, 0, 80,114,111, 99,101,115,115, 65,117,116,111, 67,111,118, + 97,114,105, 97,110, 99,101, 0, 4, 20, 0, 0, 0, 80,114,111, 99,101,115,115, + 77,117,108,116,105,112,108,121, 67,111,110,106, 0, 4, 26, 0, 0, 0, 80,114, +111, 99,101,115,115, 81,117, 97,110,116,105,122,101, 82, 71, 66, 85,110,105,102, +111,114,109, 0, 4, 4, 0, 0, 0, 77, 65, 80, 0, 4, 27, 0, 0, 0, 80,114, +111, 99,101,115,115, 81,117, 97,110,116,105,122,101, 71,114, 97,121, 85,110,105, +102,111,114,109, 0, 4, 23, 0, 0, 0, 80,114,111, 99,101,115,115, 69,120,112, + 97,110,100, 72,105,115,116,111,103,114, 97,109, 0, 4, 25, 0, 0, 0, 80,114, +111, 99,101,115,115, 69,113,117, 97,108,105,122,101, 72,105,115,116,111,103,114, + 97,109, 0, 4, 23, 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, + 89, 67,104,114,111,109, 97, 78,101,119, 0, 4, 16, 0, 0, 0, 80,114,111, 99, +101,115,115, 83,112,108,105,116, 72, 83, 73, 0, 4, 16, 0, 0, 0, 80,114,111, + 99,101,115,115, 77,101,114,103,101, 72, 83, 73, 0, 4, 4, 0, 0, 0, 82, 71, + 66, 0, 4, 5, 0, 0, 0, 66, 89, 84, 69, 0, 4, 26, 0, 0, 0, 80,114,111, + 99,101,115,115, 83,112,108,105,116, 67,111,109,112,111,110,101,110,116,115, 78, +101,119, 0, 4, 26, 0, 0, 0, 80,114,111, 99,101,115,115, 77,101,114,103,101, + 67,111,109,112,111,110,101,110,116,115, 78,101,119, 0, 4, 27, 0, 0, 0, 80, +114,111, 99,101,115,115, 78,111,114,109, 97,108,105,122,101, 67,111,109,112,111, +110,101,110,116,115, 0, 4, 20, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101, +112,108, 97, 99,101, 67,111,108,111,114, 0, 4, 17, 0, 0, 0, 80,114,111, 99, +101,115,115, 66,105,116,119,105,115,101, 79,112, 0, 4, 18, 0, 0, 0, 80,114, +111, 99,101,115,115, 66,105,116,119,105,115,101, 78,111,116, 0, 4, 15, 0, 0, + 0, 80,114,111, 99,101,115,115, 66,105,116, 77, 97,115,107, 0, 4, 16, 0, 0, + 0, 80,114,111, 99,101,115,115, 66,105,116, 80,108, 97,110,101, 0, 4, 17, 0, + 0, 0, 80,114,111, 99,101,115,115, 84,111,110,101, 71, 97,109,117,116, 0, 4, + 19, 0, 0, 0, 80,114,111, 99,101,115,115, 85,110, 78,111,114,109, 97,108,105, +122,101, 0, 4, 18, 0, 0, 0, 80,114,111, 99,101,115,115, 68,105,114,101, 99, +116, 67,111,110,118, 0, 4, 16, 0, 0, 0, 80,114,111, 99,101,115,115, 78,101, +103, 97,116,105,118,101, 0, 4, 30, 0, 0, 0, 80,114,111, 99,101,115,115, 82, + 97,110,103,101, 67,111,110,116,114, 97,115,116, 84,104,114,101,115,104,111,108, +100, 0, 4, 25, 0, 0, 0, 80,114,111, 99,101,115,115, 76,111, 99, 97,108, 77, + 97,120, 84,104,114,101,115,104,111,108,100, 0, 4, 17, 0, 0, 0, 80,114,111, + 99,101,115,115, 84,104,114,101,115,104,111,108,100, 0, 4, 23, 0, 0, 0, 80, +114,111, 99,101,115,115, 84,104,114,101,115,104,111,108,100, 66,121, 68,105,102, +102, 0, 4, 27, 0, 0, 0, 80,114,111, 99,101,115,115, 72,121,115,116,101,114, +101,115,105,115, 84,104,114,101,115,104,111,108,100, 0, 4, 27, 0, 0, 0, 80, +114,111, 99,101,115,115, 85,110,105,102,111,114,109, 69,114,114, 84,104,114,101, +115,104,111,108,100, 0, 4, 28, 0, 0, 0, 80,114,111, 99,101,115,115, 68,105, +102,117,115,105,111,110, 69,114,114, 84,104,114,101,115,104,111,108,100, 0, 4, + 24, 0, 0, 0, 80,114,111, 99,101,115,115, 80,101,114, 99,101,110,116, 84,104, +114,101,115,104,111,108,100, 0, 4, 21, 0, 0, 0, 80,114,111, 99,101,115,115, + 79,116,115,117, 84,104,114,101,115,104,111,108,100, 0, 4, 23, 0, 0, 0, 80, +114,111, 99,101,115,115, 77,105,110, 77, 97,120, 84,104,114,101,115,104,111,108, +100, 0, 4, 22, 0, 0, 0, 80,114,111, 99,101,115,115, 83,108,105, 99,101, 84, +104,114,101,115,104,111,108,100, 0, 4, 16, 0, 0, 0, 80,114,111, 99,101,115, +115, 80,105,120,101,108, 97,116,101, 0, 4, 17, 0, 0, 0, 80,114,111, 99,101, +115,115, 80,111,115,116,101,114,105,122,101, 0, 24, 0, 0, 0, 0, 0, 0, 0, + 8, 0, 0, 0, 25, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, + 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0, +192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, + 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, + 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 7, 0, 0, + 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, 0, 78,101,119, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 5, 1, 7, 8, 23, 0, 0, + 0,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, + 0,132, 1, 0, 1,196, 1,128, 1,156,128, 0, 3,196, 0, 0, 2, 0, 1, 0, + 0, 64, 1, 0, 1,133,129, 0, 0,192, 1,128, 0,156, 1, 0, 1,220,128, 0, + 0,218, 0, 0, 0, 22,192, 0,128, 0, 1,128, 1, 64, 1, 0, 1, 30, 1,128, + 1, 22, 0, 0,128,158, 0, 0, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, + 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116, +101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 23, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 24, 0, 0, 0, 4, + 0, 0, 0, 10, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, + 0, 22, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, 22, + 0, 0, 0, 4, 0, 0, 0,114,101,116, 0, 15, 0, 0, 0, 22, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, 0, 7, 0, 0, 0,104,101,105, +103,104,116, 0, 12, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, + 10, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0,102,117, +110, 99, 0, 17, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 10, + 0, 0, 0, 10, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 9, + 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, + 6, 0, 0, 0,119,105,100,116,104, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, + 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, + 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, + 0, 10, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 5, 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 50, 0, 0, 0, 0, 5, 0, 11, + 22, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2, + 5,130, 0, 0, 6,194, 64, 4, 65, 2, 1, 0,128, 2, 0, 0, 28, 2,128, 1, +156, 65, 0, 0,133, 1, 0, 0,192, 1, 0, 0, 1, 66, 1, 0,213, 1,130, 3, + 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, + 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, + 0,105,109, 0, 4, 7, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 7, 0, 0, + 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, 0,102,111,114,109, 97,116, 0, + 4, 24, 0, 0, 0,117,110,100,101,102,105,110,101,100, 32,102,117,110, 99,116, +105,111,110, 32, 96, 37,115, 39, 0, 4, 4, 0, 0, 0, 78,101,119, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 49, 0, 0, 0, 5, 2, 7, 10, 24, 0, + 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 68, 1, 0, 0,132, 1, +128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, 3, 4, 1, 0, 2, 64, 1, + 0, 0,128, 1,128, 0,192, 1,128, 1, 5,130, 0, 0, 64, 2, 0, 1, 28, 2, + 0, 1, 28,129, 0, 0, 26, 1, 0, 0, 22,192, 0,128, 64, 1, 0, 2,128, 1, +128, 1, 94, 1,128, 1, 22, 0, 0,128,222, 0, 0, 1, 30, 0,128, 0, 3, 0, + 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, 97,103,101, + 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0,117,110,112, + 97, 99,107, 0, 0, 0, 0, 0, 24, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, + 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, + 40, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, + 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, + 47, 0, 0, 0, 49, 0, 0, 0, 5, 0, 0, 0, 11, 0, 0, 0,115,114, 99, 95, +105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 23, 0, 0, 0, 11, 0, 0, 0,115, +114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, 0, 0, 23, 0, 0, 0, 4, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 23, 0, 0, 0, 10, 0, 0, 0,100,115, +116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, +114,101,116, 0, 16, 0, 0, 0, 23, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, +119,105,100,116,104, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, + 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0,100, 97,116, + 97, 95,116,121,112,101, 0, 5, 0, 0, 0,102,117,110, 99, 0, 22, 0, 0, 0, + 32, 0, 0, 0, 32, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 49, 0, 0, 0, + 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, + 49, 0, 0, 0, 50, 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0,102,117,110, 99, +110, 97,109,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 6, 0, 0, 0,119,105,100, +116,104, 0, 0, 0, 0, 0, 21, 0, 0, 0, 7, 0, 0, 0,104,101,105,103,104, +116, 0, 0, 0, 0, 0, 21, 0, 0, 0, 12, 0, 0, 0, 99,111,108,111,114, 95, +115,112, 97, 99,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 10, 0, 0, 0,100, 97, +116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 5, 0, 0, 0, +102,117,110, 99, 0, 2, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 56, 0, 0, 0, 73, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, + 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, + 0,192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, + 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, + 3, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 7, 0, + 0, 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, 0, 78,101,119, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 61, 0, 0, 0, 72, 0, 0, 0, 5, 3, 7, 12, 25, 0, + 0, 0, 5, 1, 0, 0, 6, 65, 64, 2, 64, 1, 0, 0,132, 1, 0, 0,196, 1, +128, 0, 4, 2, 0, 1, 68, 2,128, 1, 28,129, 0, 3, 68, 1, 0, 2,128, 1, + 0, 0,192, 1,128, 0, 0, 2, 0, 1, 64, 2, 0, 2,133,130, 0, 0,192, 2, +128, 1,156, 2, 0, 1, 92,129, 0, 0, 90, 1, 0, 0, 22,192, 0,128,128, 1, +128, 2,192, 1, 0, 2,158, 1,128, 1, 22, 0, 0,128, 30, 1, 0, 1, 30, 0, +128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73, +109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, 0, 0, + 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 25, 0, 0, 0, 63, 0, 0, 0, + 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, + 63, 0, 0, 0, 63, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, + 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, + 66, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, + 68, 0, 0, 0, 68, 0, 0, 0, 70, 0, 0, 0, 72, 0, 0, 0, 6, 0, 0, 0, + 11, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 24, + 0, 0, 0, 11, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, + 0, 0, 24, 0, 0, 0, 11, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 51, + 0, 0, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 24, 0, 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 8, + 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0,114,101,116, 0, 17, 0, 0, 0, 24, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, 0, 7, 0, 0, + 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 99,111,108,111,114, 95,115,112, + 97, 99,101, 0, 10, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, + 0, 0,102,117,110, 99, 0, 17, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, 58, + 0, 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, + 0, 0, 0, 61, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, + 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 6, + 0, 0, 0, 9, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, 0, 0, 0, 0, 0, 16, 0, + 0, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, + 0, 12, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 10, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, + 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, 97, 0, 0, 0, + 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0, +192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0,192, 1, 0, 0, 1,130, 0, 0, +213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, + 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, 3, 0, 0, 0, + 4, 3, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 97,115,115,101,114,116, 0, + 4, 4, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, + 0, 96, 0, 0, 0, 5, 1, 7, 10, 35, 0, 0, 0,133, 0, 0, 0,134, 64, 64, + 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, 0,132, 1, 0, 1,196, 1,128, + 1,156,128, 0, 3,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 68, 1, 0, + 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, 3, 4, 1, 0, + 2, 64, 1, 0, 0,128, 1, 0, 1,192, 1,128, 1, 5,130, 0, 0, 64, 2,128, + 0, 28, 2, 0, 1, 28,129, 0, 0, 26, 1, 0, 0, 22, 0, 1,128, 64, 1, 0, + 2,128, 1, 0, 1,192, 1,128, 1, 94, 1, 0, 2, 22,128, 0,128, 64, 1, 0, + 1,128, 1,128, 1, 94, 1,128, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, + 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116, +101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 35, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, + 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 87, + 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, + 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, + 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, + 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, + 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, + 0, 0, 0, 96, 0, 0, 0, 5, 0, 0, 0, 10, 0, 0, 0,115,114, 99, 95,105, +109, 97,103,101, 0, 0, 0, 0, 0, 34, 0, 0, 0, 4, 0, 0, 0, 97,114,103, + 0, 0, 0, 0, 0, 34, 0, 0, 0, 11, 0, 0, 0,100,115,116, 95,105,109, 97, +103,101, 49, 0, 8, 0, 0, 0, 34, 0, 0, 0, 11, 0, 0, 0,100,115,116, 95, +105,109, 97,103,101, 50, 0, 16, 0, 0, 0, 34, 0, 0, 0, 4, 0, 0, 0,114, +101,116, 0, 24, 0, 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0,119, +105,100,116,104, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0,100, 97,116, 97, + 95,116,121,112,101, 0, 5, 0, 0, 0,102,117,110, 99, 0, 17, 0, 0, 0, 80, + 0, 0, 0, 80, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 96, 0, 0, 0, 96, + 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, + 0, 0, 0, 97, 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0,102,117,110, 99,110, + 97,109,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0,119,105,100,116, +104, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0,104,101,105,103,104,116, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 99,111,108,111,114, 95,115, +112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 10, 0, 0, 0,100, 97,116, + 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0,102, +117,110, 99, 0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +103, 0, 0, 0,122, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, + 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0, +192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, + 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, + 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 7, 0, 0, + 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, 0, 78,101,119, 0, 1, 0, 0, + 0, 0, 0, 0, 0,108, 0, 0, 0,121, 0, 0, 0, 5, 1, 7, 12, 46, 0, 0, + 0,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, + 0,132, 1, 0, 1,196, 1,128, 1,156,128, 0, 3,197, 0, 0, 0,198, 64,192, + 1, 0, 1, 0, 0, 68, 1, 0, 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, + 1,220,128, 0, 3, 5, 1, 0, 0, 6, 65, 64, 2, 64, 1, 0, 0,132, 1, 0, + 0,196, 1,128, 0, 4, 2, 0, 1, 68, 2,128, 1, 28,129, 0, 3, 68, 1, 0, + 2,128, 1, 0, 0,192, 1, 0, 1, 0, 2,128, 1, 64, 2, 0, 2,133,130, 0, + 0,192, 2,128, 0,156, 2, 0, 1, 92,129, 0, 0, 90, 1, 0, 0, 22, 64, 1, +128,128, 1,128, 2,192, 1, 0, 1, 0, 2,128, 1, 64, 2, 0, 2,158, 1,128, + 2, 22,192, 0,128,128, 1, 0, 1,192, 1,128, 1, 0, 2, 0, 2,158, 1, 0, + 2, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, + 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, + 7, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 46, 0, 0, 0,110, + 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, + 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, + 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, + 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, + 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,115, 0, 0, 0,115, + 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, + 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,116, 0, 0, 0,116, 0, 0, 0,117, + 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, + 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,121, + 0, 0, 0, 6, 0, 0, 0, 10, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, + 0, 0, 0, 0, 0, 45, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 45, 0, 0, 0, 11, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 49, 0, + 8, 0, 0, 0, 45, 0, 0, 0, 11, 0, 0, 0,100,115,116, 95,105,109, 97,103, +101, 50, 0, 16, 0, 0, 0, 45, 0, 0, 0, 11, 0, 0, 0,100,115,116, 95,105, +109, 97,103,101, 51, 0, 24, 0, 0, 0, 45, 0, 0, 0, 4, 0, 0, 0,114,101, +116, 0, 33, 0, 0, 0, 45, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0,119,105, +100,116,104, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 99, +111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0,100, 97,116, 97, 95, +116,121,112,101, 0, 5, 0, 0, 0,102,117,110, 99, 0, 17, 0, 0, 0,104, 0, + 0, 0,104, 0, 0, 0,105, 0, 0, 0,105, 0, 0, 0,105, 0, 0, 0,108, 0, + 0, 0,108, 0, 0, 0,108, 0, 0, 0,108, 0, 0, 0,121, 0, 0, 0,121, 0, + 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, + 0, 0,122, 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0,102,117,110, 99,110, 97, +109,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 99,111,108,111,114, 95,115,112, + 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 10, 0, 0, 0,100, 97,116, 97, + 95,116,121,112,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0,102,117, +110, 99, 0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, + 0, 0, 0,130, 0, 0, 0, 0, 1, 0, 7, 18, 0, 0, 0,100, 0, 0, 0,133, + 0, 0, 0,134, 64, 64, 1,192, 0,128, 0, 11,129, 64, 0, 28, 1, 0, 1,220, +128, 0, 0, 0, 1,128, 0, 75,193, 64, 0, 92, 1, 0, 1, 28,129, 0, 0,204, + 0,129, 1,156,128, 0, 1,143, 0, 65, 1,206,128, 0,130,204, 64,193, 1,222, + 0, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 5, 0, 0, 0,109, 97,116,104, + 0, 4, 5, 0, 0, 0,115,113,114,116, 0, 4, 6, 0, 0, 0, 87,105,100,116, +104, 0, 4, 7, 0, 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 64, 3, 0, 0, 0, 0, 0, 0,240, 63, 1, 0, 0, 0, 0, 0, 0, 0, +127, 0, 0, 0,127, 0, 0, 0, 0, 1, 0, 2, 3, 0, 0, 0, 78, 0, 0, 0, + 94, 0, 0, 1, 30, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, +127, 0, 0, 0,127, 0, 0, 0,127, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, +120, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0,127, 0, + 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, + 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, + 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,129, 0, 0, 0,129, 0, + 0, 0,129, 0, 0, 0,130, 0, 0, 0, 3, 0, 0, 0, 6, 0, 0, 0,105,109, + 97,103,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0,115,113,114, 0, + 1, 0, 0, 0, 17, 0, 0, 0, 5, 0, 0, 0,114,109, 97,120, 0, 14, 0, 0, + 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 0, 0, 0,144, 0, 0, + 0, 0, 3, 0, 7, 14, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, + 0, 64, 1,128, 0,128, 1, 0, 1,220,128, 0, 2, 5, 1, 0, 0, 6,129, 64, + 2, 64, 1, 0, 0,128, 1,128, 1, 28,129,128, 1, 64, 1,128, 1, 30, 1,128, + 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, + 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, + 14, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101,100,117, 99,101, 0, 0, 0, + 0, 0, 14, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, + 0, 0,142, 0, 0, 0,142, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, + 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,144, 0, + 0, 0, 4, 0, 0, 0, 10, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, 0, 0, 0, + 0, 0, 13, 0, 0, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, + 0, 13, 0, 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 6, + 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,146, 0, 0, 0,149, + 0, 0, 0, 0, 3, 0, 7, 14, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, + 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220,128, 0, 2, 5, 1, 0, 0, 6, +129, 64, 2, 64, 1, 0, 0,128, 1,128, 1, 28,129,128, 1, 64, 1,128, 1, 30, + 1,128, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, + 17, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 4, 14, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101,115,105,122,101, 0, + 0, 0, 0, 0, 14, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0, +147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0, +148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0, +149, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0,115,114, 99, 95,105,109, 97,103, +101, 0, 0, 0, 0, 0, 13, 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, + 0, 6, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,151, 0, 0, + 0,151, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, + 1, 79, 64,192, 0, 94, 0, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, + 0, 0, 87,105,100,116,104, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, + 0, 5, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, + 0,151, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0,105,109, 97,103,101, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 0, 0, 0,152, + 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1, 79, + 64,192, 0, 94, 0, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, + 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, + 5, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0, +152, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 0, 0, 0,160, 0, + 0, 0, 0, 5, 0, 13, 19, 0, 0, 0, 77, 65, 0, 1, 76, 1,192, 2,141,193, + 0, 2,140, 1, 64, 3,197, 65, 0, 0,198,129,192, 3, 0, 2, 0, 0, 64, 2, +128, 2,128, 2, 0, 3,220,129, 0, 2, 5, 66, 0, 0, 6,194, 64, 4, 64, 2, + 0, 0,128, 2,128, 3,192, 2,128, 0, 0, 3,128, 1, 28, 66,128, 2,222, 1, + 0, 1, 30, 0,128, 0, 4, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, + 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, 97,103,101, 67,114,101, + 97,116,101, 66, 97,115,101,100, 0, 4, 12, 0, 0, 0, 80,114,111, 99,101,115, +115, 67,114,111,112, 0, 0, 0, 0, 0, 19, 0, 0, 0,155, 0, 0, 0,155, 0, + 0, 0,156, 0, 0, 0,156, 0, 0, 0,157, 0, 0, 0,157, 0, 0, 0,157, 0, + 0, 0,157, 0, 0, 0,157, 0, 0, 0,157, 0, 0, 0,158, 0, 0, 0,158, 0, + 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, + 0, 0,159, 0, 0, 0,160, 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, 0,115,114, + 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, +120,109,105,110, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0,120,109, 97, +120, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0,121,109,105,110, 0, 0, + 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0,121,109, 97,120, 0, 0, 0, 0, 0, + 18, 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, 0, 2, 0, 0, 0, 18, 0, + 0, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, 4, 0, 0, 0, 18, 0, 0, + 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 10, 0, 0, 0, 18, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,164, 0, 0, 0,170, 0, 0, 0, 0, + 5, 0, 13, 19, 0, 0, 0, 77, 65, 0, 1, 76, 1,192, 2,141,193, 0, 2,140, + 1, 64, 3,197, 65, 0, 0,198,129,192, 3, 0, 2, 0, 0, 64, 2,128, 2,128, + 2, 0, 3,220,129, 0, 2, 5, 66, 0, 0, 6,194, 64, 4, 64, 2, 0, 0,128, + 2,128, 3,192, 2,128, 0, 0, 3,128, 1, 28, 66,128, 2,222, 1, 0, 1, 30, + 0,128, 0, 4, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 3, 0, 0, + 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, + 66, 97,115,101,100, 0, 4, 18, 0, 0, 0, 80,114,111, 99,101,115,115, 65,100, +100, 77, 97,114,103,105,110,115, 0, 0, 0, 0, 0, 19, 0, 0, 0,165, 0, 0, + 0,165, 0, 0, 0,166, 0, 0, 0,166, 0, 0, 0,167, 0, 0, 0,167, 0, 0, + 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,168, 0, 0, + 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, + 0,168, 0, 0, 0,169, 0, 0, 0,170, 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, + 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, + 0, 0, 0,120,109,105,110, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, +120,109, 97,120, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0,121,109,105, +110, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0,121,109, 97,120, 0, 0, + 0, 0, 0, 18, 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, 0, 2, 0, 0, + 0, 18, 0, 0, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, 4, 0, 0, 0, + 18, 0, 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 10, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,172, 0, 0, 0,176, 0, + 0, 0, 0, 4, 0, 13, 26, 0, 0, 0, 5, 1, 0, 0, 6, 65, 64, 2, 75,129, + 64, 0, 92,129, 0, 1,139,193, 64, 0,156,129, 0, 1,192, 1,128, 0, 0, 2, + 0, 1, 28,193,128, 2,133, 1, 0, 0,134, 1, 65, 3,192, 1, 0, 0, 0, 2, + 0, 2, 64, 2,128, 2,156,129, 0, 2,197, 1, 0, 0,198, 65,193, 3, 0, 2, + 0, 0, 64, 2, 0, 3,128, 2,128, 0,192, 2, 0, 1, 0, 3,128, 1,220,129, + 0, 3, 0, 2, 0, 3,222, 1,128, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, + 0, 0, 0,105,109, 0, 4, 22, 0, 0, 0, 80,114,111, 99,101,115,115, 67, 97, +108, 99, 82,111,116, 97,116,101, 83,105,122,101, 0, 4, 6, 0, 0, 0, 87,105, +100,116,104, 0, 4, 7, 0, 0, 0, 72,101,105,103,104,116, 0, 4, 17, 0, 0, + 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 14, + 0, 0, 0, 80,114,111, 99,101,115,115, 82,111,116, 97,116,101, 0, 0, 0, 0, + 0, 26, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, + 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, + 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, + 0,174, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, + 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, + 0,175, 0, 0, 0,176, 0, 0, 0, 7, 0, 0, 0, 10, 0, 0, 0,115,114, 99, + 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 25, 0, 0, 0, 5, 0, 0, 0, 99, +111,115, 48, 0, 0, 0, 0, 0, 25, 0, 0, 0, 5, 0, 0, 0,115,105,110, 48, + 0, 0, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0,111,114,100,101,114, 0, 0, + 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0,119,105,100,116,104, 0, 9, 0, 0, + 0, 25, 0, 0, 0, 7, 0, 0, 0,104,101,105,103,104,116, 0, 9, 0, 0, 0, + 25, 0, 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 15, 0, + 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,179, 0, 0, 0,179, 0, + 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 75, 0, 64, 0, 93, 0, 0, 1, 94, 0, + 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 72,101,105,103,104, +116, 0, 0, 0, 0, 0, 4, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, + 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0,105,109, 97,103,101, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,179, 0, 0, 0, +179, 0, 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 75, 0, 64, 0, 93, 0, 0, 1, + 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 87,105,100, +116,104, 0, 0, 0, 0, 0, 4, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, + 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0,105,109, 97,103,101, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,212, 0, 0, + 0,212, 0, 0, 0, 0, 1, 0, 3, 13, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, + 1, 90, 0, 0, 0, 22,192, 0,128, 75, 0, 64, 0, 93, 0, 0, 1, 94, 0, 0, + 0, 22,192, 0,128, 75, 0, 64, 0, 92,128, 0, 1, 79, 64,192, 0, 94, 0, 0, + 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, 72,101,105,103,104,116, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 13, 0, 0, 0,212, 0, + 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, + 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, + 0, 0,212, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0,105,109, + 97,103,101, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +214, 0, 0, 0,227, 0, 0, 0, 0, 1, 0, 8, 36, 0, 0, 0, 75, 0, 64, 0, + 92,128, 0, 1, 79, 64,192, 0,133,128, 0, 0,134,192, 64, 1,203, 0, 64, 0, +220,128, 0, 1, 1, 65, 0, 0,156,128,128, 1,154, 0, 0, 0, 22, 0, 0,128, + 76, 0,193, 0,133, 64, 1, 0,134,128, 65, 1,192, 0, 0, 0, 3, 1, 0, 2, + 64, 1,128, 0,156,128, 0, 2,197, 64, 1, 0,198,128,193, 1, 0, 1, 0, 0, + 67, 1,128, 2,139, 1, 64, 0,156,129, 0, 1,143, 65, 64, 3,220,128, 0, 2, + 5, 65, 1, 0, 6,193, 65, 2, 64, 1, 0, 0,128, 1, 0, 1,192, 1,128, 1, + 28, 65, 0, 2, 0, 1, 0, 1, 64, 1,128, 1, 30, 1,128, 1, 30, 0,128, 0, + 8, 0, 0, 0, 4, 7, 0, 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 64, 4, 5, 0, 0, 0,109, 97,116,104, 0, 4, 4, 0, 0, 0, +109,111,100, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 3, 0, 0, 0,105,109, + 0, 4, 17, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115, +101,100, 0, 4, 22, 0, 0, 0, 80,114,111, 99,101,115,115, 73,110,116,101,114, +108, 97, 99,101, 83,112,108,105,116, 0, 0, 0, 0, 0, 36, 0, 0, 0,216, 0, + 0, 0,216, 0, 0, 0,216, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, + 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, + 0, 0,218, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, + 0, 0,221, 0, 0, 0,221, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, + 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, + 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, + 0, 0,225, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,227, 0, + 0, 0, 4, 0, 0, 0, 10, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, + 0, 0, 0, 0, 35, 0, 0, 0, 12, 0, 0, 0,100,115,116, 95,104,101,105,103, +104,116, 49, 0, 3, 0, 0, 0, 35, 0, 0, 0, 11, 0, 0, 0,100,115,116, 95, +105,109, 97,103,101, 49, 0, 18, 0, 0, 0, 35, 0, 0, 0, 11, 0, 0, 0,100, +115,116, 95,105,109, 97,103,101, 50, 0, 26, 0, 0, 0, 35, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,229, 0, 0, 0,235, 0, 0, 0, 0, 1, 0, 3, 14, 0, + 0, 0, 75, 0, 64, 0, 92,128, 0, 1,133, 64, 0, 0,134,128, 64, 1, 87,128, +128, 0, 22,192, 0,128,133, 64, 0, 0,134,192, 64, 1, 23,128,128, 0, 22, 64, + 0,128,133, 64, 0, 0, 70, 0, 65, 1, 94, 0, 0, 1, 30, 0,128, 0, 5, 0, + 0, 0, 4, 9, 0, 0, 0, 68, 97,116, 97, 84,121,112,101, 0, 4, 3, 0, 0, + 0,105,109, 0, 4, 5, 0, 0, 0, 66, 89, 84, 69, 0, 4, 7, 0, 0, 0, 85, + 83, 72, 79, 82, 84, 0, 4, 4, 0, 0, 0, 73, 78, 84, 0, 0, 0, 0, 0, 14, + 0, 0, 0,230, 0, 0, 0,230, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, + 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, + 0, 0, 0,232, 0, 0, 0,232, 0, 0, 0,234, 0, 0, 0,235, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 13, 0, 0, + 0, 10, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 2, 0, 0, 0, 13, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0, 0, 0,254, 0, 0, 0, 0, + 3, 0, 9, 13, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0,220, +128, 0, 1, 5, 1, 0, 0, 6,129, 64, 2, 64, 1, 0, 0,128, 1,128, 0,192, + 1,128, 1, 0, 2, 0, 1, 28, 65,128, 2,222, 0, 0, 1, 30, 0,128, 0, 3, + 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, 97,103, +101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 25, 0, 0, 0, 80,114, +111, 99,101,115,115, 65,114,105,116,104,109,101,116,105, 99, 67,111,110,115,116, + 79,112, 0, 0, 0, 0, 0, 13, 0, 0, 0,251, 0, 0, 0,251, 0, 0, 0,251, + 0, 0, 0,251, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, + 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,253, 0, 0, 0,254, + 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, + 0, 0, 0, 0, 0, 12, 0, 0, 0, 10, 0, 0, 0,115,114, 99, 95, 99,111,110, +115,116, 0, 0, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0,111,112, 0, 0, 0, + 0, 0, 12, 0, 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, + 4, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 1, 0, 0, + 9, 1, 0, 0, 0, 2, 0, 6, 11, 0, 0, 0,133, 0, 0, 0,134, 64, 64, 1, +198,128, 64, 0,156,128, 0, 1,197, 0, 0, 0,198,192,192, 1, 0, 1, 0, 0, + 64, 1, 0, 1,220, 64,128, 1,158, 0, 0, 1, 30, 0,128, 0, 4, 0, 0, 0, + 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, 97,103,101, 67,114, +101, 97,116,101, 66, 97,115,101,100, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, + 20, 0, 0, 0, 80,114,111, 99,101,115,115, 77,117,108,116,105,112,108,101, 77, +101, 97,110, 0, 0, 0, 0, 0, 11, 0, 0, 0, 6, 1, 0, 0, 6, 1, 0, 0, + 6, 1, 0, 0, 6, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, + 7, 1, 0, 0, 7, 1, 0, 0, 8, 1, 0, 0, 9, 1, 0, 0, 3, 0, 0, 0, + 15, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 95,108,105,115,116, 0, 0, + 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, + 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97, +103,101, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 1, 0, 0, 15, 1, 0, 0, 0, 2, 0, 7, 12, 0, 0, 0,133, 0, 0, 0,134, + 64, 64, 1,198,128, 64, 0,156,128, 0, 1,197, 0, 0, 0,198,192,192, 1, 0, + 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2,158, 0, 0, 1, 30, + 0,128, 0, 4, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, + 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 3, 0, 0, + 0, 0, 0, 0,240, 63, 4, 22, 0, 0, 0, 80,114,111, 99,101,115,115, 77,117, +108,116,105,112,108,101, 83,116,100, 68,101,118, 0, 0, 0, 0, 0, 12, 0, 0, + 0, 12, 1, 0, 0, 12, 1, 0, 0, 12, 1, 0, 0, 12, 1, 0, 0, 13, 1, 0, + 0, 13, 1, 0, 0, 13, 1, 0, 0, 13, 1, 0, 0, 13, 1, 0, 0, 13, 1, 0, + 0, 14, 1, 0, 0, 15, 1, 0, 0, 3, 0, 0, 0, 15, 0, 0, 0,115,114, 99, + 95,105,109, 97,103,101, 95,108,105,115,116, 0, 0, 0, 0, 0, 11, 0, 0, 0, + 11, 0, 0, 0,109,101, 97,110, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 11, + 0, 0, 0, 10, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 4, 0, 0, + 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 1, 0, 0, 29, 1, 0, + 0, 0, 1, 0, 8, 28, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,128, 0, 0, + 0,195, 0, 0, 2, 69, 1, 0, 0, 70,129,192, 2,133, 1, 0, 0,134,193, 64, + 3, 92,128, 0, 3,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 3, 1,128, + 2,133, 1, 0, 0,134, 1, 65, 3,197, 1, 0, 0,198,193,192, 3,156,128, 0, + 3,197, 0, 0, 0,198, 64,193, 1, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, + 1,220, 64, 0, 2,192, 0,128, 0, 0, 1, 0, 1,222, 0,128, 1, 30, 0,128, + 0, 6, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 73,109, + 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 5, 0, 0, 0, + 71, 82, 65, 89, 0, 4, 5, 0, 0, 0, 66, 89, 84, 69, 0, 4, 4, 0, 0, 0, + 82, 71, 66, 0, 4, 20, 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105, +116, 89, 67,104,114,111,109, 97, 0, 0, 0, 0, 0, 28, 0, 0, 0, 25, 1, 0, + 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, + 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, + 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, + 0, 26, 1, 0, 0, 26, 1, 0, 0, 27, 1, 0, 0, 27, 1, 0, 0, 27, 1, 0, + 0, 27, 1, 0, 0, 27, 1, 0, 0, 27, 1, 0, 0, 28, 1, 0, 0, 28, 1, 0, + 0, 28, 1, 0, 0, 29, 1, 0, 0, 3, 0, 0, 0, 10, 0, 0, 0,115,114, 99, + 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 27, 0, 0, 0, 8, 0, 0, 0,121, + 95,105,109, 97,103,101, 0, 9, 0, 0, 0, 27, 0, 0, 0, 13, 0, 0, 0, 99, +104,114,111,109, 97, 95,105,109, 97,103,101, 0, 18, 0, 0, 0, 27, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 34, 1, 0, 0, 42, 1, 0, 0, 0, 1, 0, 14, + 29, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1,138, 0, 0, 0,193, 64, 0, 0, + 0, 1,128, 0, 65, 65, 0, 0,224,128, 2,128,197,129, 0, 0,198,193,192, 3, + 0, 2, 0, 1, 69, 2, 1, 0, 70, 66,193, 4,128, 2, 0, 0,195, 2, 0, 6, + 69, 3, 1, 0, 70,131,193, 6, 92, 2,128, 2,220, 65, 0, 0,223,192,252,127, +197, 0, 1, 0,198,192,193, 1, 0, 1, 0, 0, 64, 1, 0, 1,220, 64,128, 1, +197, 0, 2, 0, 0, 1, 0, 1,221, 0, 0, 1,222, 0, 0, 0, 30, 0,128, 0, + 9, 0, 0, 0, 4, 6, 0, 0, 0, 68,101,112,116,104, 0, 3, 0, 0, 0, 0, + 0, 0,240, 63, 4, 6, 0, 0, 0,116, 97, 98,108,101, 0, 4, 7, 0, 0, 0, +105,110,115,101,114,116, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, + 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 5, 0, + 0, 0, 71, 82, 65, 89, 0, 4, 23, 0, 0, 0, 80,114,111, 99,101,115,115, 83, +112,108,105,116, 67,111,109,112,111,110,101,110,116,115, 0, 4, 7, 0, 0, 0, +117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 29, 0, 0, 0, 35, 1, 0, 0, 35, + 1, 0, 0, 36, 1, 0, 0, 37, 1, 0, 0, 37, 1, 0, 0, 37, 1, 0, 0, 37, + 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, + 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, + 1, 0, 0, 38, 1, 0, 0, 37, 1, 0, 0, 40, 1, 0, 0, 40, 1, 0, 0, 40, + 1, 0, 0, 40, 1, 0, 0, 40, 1, 0, 0, 41, 1, 0, 0, 41, 1, 0, 0, 41, + 1, 0, 0, 41, 1, 0, 0, 42, 1, 0, 0, 7, 0, 0, 0, 10, 0, 0, 0,115, +114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 28, 0, 0, 0, 6, 0, 0, + 0,100,101,112,116,104, 0, 2, 0, 0, 0, 28, 0, 0, 0, 11, 0, 0, 0,100, +115,116, 95,105,109, 97,103,101,115, 0, 3, 0, 0, 0, 28, 0, 0, 0, 12, 0, + 0, 0, 40,102,111,114, 32,105,110,100,101,120, 41, 0, 6, 0, 0, 0, 19, 0, + 0, 0, 12, 0, 0, 0, 40,102,111,114, 32,108,105,109,105,116, 41, 0, 6, 0, + 0, 0, 19, 0, 0, 0, 11, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, + 0, 6, 0, 0, 0, 19, 0, 0, 0, 2, 0, 0, 0,105, 0, 7, 0, 0, 0, 18, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 48, 1, 0, 0, 0, + 1, 0, 6, 14, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,134,128, 64, 0,195, + 0, 0, 2, 69, 1, 0, 0, 70,193,192, 2, 92,128,128, 2,133, 0, 0, 0,134, + 0, 65, 1,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 94, 0, 0, 1, 30, + 0,128, 0, 5, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, + 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 3, 0, 0, + 0, 0, 0, 0,240, 63, 4, 4, 0, 0, 0, 82, 71, 66, 0, 4, 23, 0, 0, 0, + 80,114,111, 99,101,115,115, 77,101,114,103,101, 67,111,109,112,111,110,101,110, +116,115, 0, 0, 0, 0, 0, 14, 0, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 45, + 1, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 46, + 1, 0, 0, 46, 1, 0, 0, 46, 1, 0, 0, 46, 1, 0, 0, 46, 1, 0, 0, 47, + 1, 0, 0, 48, 1, 0, 0, 2, 0, 0, 0, 15, 0, 0, 0,115,114, 99, 95,105, +109, 97,103,101, 95,108,105,115,116, 0, 0, 0, 0, 0, 13, 0, 0, 0, 10, 0, + 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 7, 0, 0, 0, 13, 0, 0, 0, + 0, 0, 0, 0,144, 1, 0, 0, 25, 0, 0, 0, 50, 0, 0, 0, 73, 0, 0, 0, + 97, 0, 0, 0,122, 0, 0, 0,130, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0, +132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,133, 0, 0, 0, +133, 0, 0, 0,133, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0, +135, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0, +136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0, +136, 0, 0, 0,136, 0, 0, 0,137, 0, 0, 0,137, 0, 0, 0,137, 0, 0, 0, +138, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0, +138, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0, +139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,141, 0, 0, 0,144, 0, 0, 0, +141, 0, 0, 0,146, 0, 0, 0,149, 0, 0, 0,146, 0, 0, 0,151, 0, 0, 0, +151, 0, 0, 0,151, 0, 0, 0,152, 0, 0, 0,151, 0, 0, 0,154, 0, 0, 0, +160, 0, 0, 0,154, 0, 0, 0,162, 0, 0, 0,162, 0, 0, 0,162, 0, 0, 0, +164, 0, 0, 0,170, 0, 0, 0,164, 0, 0, 0,172, 0, 0, 0,176, 0, 0, 0, +172, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,179, 0, 0, 0, +179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,180, 0, 0, 0, +180, 0, 0, 0,180, 0, 0, 0,181, 0, 0, 0,181, 0, 0, 0,181, 0, 0, 0, +182, 0, 0, 0,182, 0, 0, 0,182, 0, 0, 0,183, 0, 0, 0,183, 0, 0, 0, +183, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,185, 0, 0, 0, +185, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0, +187, 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0,188, 0, 0, 0,188, 0, 0, 0, +188, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,190, 0, 0, 0, +190, 0, 0, 0,190, 0, 0, 0,191, 0, 0, 0,191, 0, 0, 0,191, 0, 0, 0, +192, 0, 0, 0,192, 0, 0, 0,192, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0, +193, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,195, 0, 0, 0, +195, 0, 0, 0,195, 0, 0, 0,196, 0, 0, 0,196, 0, 0, 0,196, 0, 0, 0, +197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0, +198, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,200, 0, 0, 0, +200, 0, 0, 0,200, 0, 0, 0,201, 0, 0, 0,201, 0, 0, 0,201, 0, 0, 0, +202, 0, 0, 0,202, 0, 0, 0,202, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0, +203, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,205, 0, 0, 0, +205, 0, 0, 0,205, 0, 0, 0,206, 0, 0, 0,206, 0, 0, 0,206, 0, 0, 0, +207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,208, 0, 0, 0,208, 0, 0, 0, +208, 0, 0, 0,209, 0, 0, 0,209, 0, 0, 0,209, 0, 0, 0,210, 0, 0, 0, +210, 0, 0, 0,210, 0, 0, 0,211, 0, 0, 0,211, 0, 0, 0,211, 0, 0, 0, +212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0, +214, 0, 0, 0,227, 0, 0, 0,214, 0, 0, 0,235, 0, 0, 0,237, 0, 0, 0, +237, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,238, 0, 0, 0, +238, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,239, 0, 0, 0, +239, 0, 0, 0,239, 0, 0, 0,240, 0, 0, 0,240, 0, 0, 0,240, 0, 0, 0, +241, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0,242, 0, 0, 0,242, 0, 0, 0, +242, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,244, 0, 0, 0, +244, 0, 0, 0,244, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0, +246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,247, 0, 0, 0,247, 0, 0, 0, +247, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0,250, 0, 0, 0, +254, 0, 0, 0,250, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, + 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, + 2, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, + 3, 1, 0, 0, 3, 1, 0, 0, 5, 1, 0, 0, 9, 1, 0, 0, 5, 1, 0, 0, + 11, 1, 0, 0, 15, 1, 0, 0, 11, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, + 17, 1, 0, 0, 18, 1, 0, 0, 18, 1, 0, 0, 18, 1, 0, 0, 19, 1, 0, 0, + 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, + 19, 1, 0, 0, 20, 1, 0, 0, 20, 1, 0, 0, 20, 1, 0, 0, 21, 1, 0, 0, + 21, 1, 0, 0, 21, 1, 0, 0, 22, 1, 0, 0, 22, 1, 0, 0, 22, 1, 0, 0, + 24, 1, 0, 0, 29, 1, 0, 0, 24, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, + 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, + 31, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, + 32, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, 34, 1, 0, 0, + 42, 1, 0, 0, 34, 1, 0, 0, 44, 1, 0, 0, 48, 1, 0, 0, 44, 1, 0, 0, + 50, 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, + 50, 1, 0, 0, 51, 1, 0, 0, 51, 1, 0, 0, 51, 1, 0, 0, 52, 1, 0, 0, + 52, 1, 0, 0, 52, 1, 0, 0, 53, 1, 0, 0, 53, 1, 0, 0, 53, 1, 0, 0, + 54, 1, 0, 0, 54, 1, 0, 0, 54, 1, 0, 0, 55, 1, 0, 0, 55, 1, 0, 0, + 55, 1, 0, 0, 56, 1, 0, 0, 56, 1, 0, 0, 56, 1, 0, 0, 57, 1, 0, 0, + 57, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, + 58, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, + 58, 1, 0, 0, 59, 1, 0, 0, 59, 1, 0, 0, 59, 1, 0, 0, 60, 1, 0, 0, + 60, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, + 60, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, + 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, + 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, + 63, 1, 0, 0, 63, 1, 0, 0, 63, 1, 0, 0, 64, 1, 0, 0, 64, 1, 0, 0, + 64, 1, 0, 0, 64, 1, 0, 0, 64, 1, 0, 0, 64, 1, 0, 0, 64, 1, 0, 0, + 65, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, + 65, 1, 0, 0, 65, 1, 0, 0, 66, 1, 0, 0, 66, 1, 0, 0, 66, 1, 0, 0, + 67, 1, 0, 0, 67, 1, 0, 0, 67, 1, 0, 0, 68, 1, 0, 0, 68, 1, 0, 0, + 68, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, + 69, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, 70, 1, 0, 0, 70, 1, 0, 0, + 70, 1, 0, 0, 70, 1, 0, 0, 70, 1, 0, 0, 70, 1, 0, 0, 70, 1, 0, 0, + 71, 1, 0, 0, 71, 1, 0, 0, 71, 1, 0, 0, 72, 1, 0, 0, 72, 1, 0, 0, + 72, 1, 0, 0, 72, 1, 0, 0, 7, 0, 0, 0, 17, 0, 0, 0, 79,110,101, 83, +111,117,114, 99,101, 79,110,101, 68,101,115,116, 0, 1, 0, 0, 0,143, 1, 0, + 0, 18, 0, 0, 0, 84,119,111, 83,111,117,114, 99,101,115, 79,110,101, 68,101, +115,116, 0, 2, 0, 0, 0,143, 1, 0, 0, 20, 0, 0, 0, 84,104,114,101,101, + 83,111,117,114, 99,101,115, 79,110,101, 68,101,115,116, 0, 3, 0, 0, 0,143, + 1, 0, 0, 18, 0, 0, 0, 79,110,101, 83,111,117,114, 99,101, 84,119,111, 68, +101,115,116,115, 0, 4, 0, 0, 0,143, 1, 0, 0, 20, 0, 0, 0, 79,110,101, + 83,111,117,114, 99,101, 84,104,114,101,101, 68,101,115,116,115, 0, 5, 0, 0, + 0,143, 1, 0, 0, 13, 0, 0, 0,104,111,117,103,104, 95,104,101,105,103,104, +116, 0, 6, 0, 0, 0,143, 1, 0, 0, 13, 0, 0, 0,105,110,116, 95,100, 97, +116, 97,116,121,112,101, 0,182, 0, 0, 0,143, 1, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua_process51/im_process.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_process_be32.loh b/im/src/lua5/loh/im_process_be32.loh new file mode 100755 index 0000000..be77d66 --- /dev/null +++ b/im/src/lua5/loh/im_process_be32.loh @@ -0,0 +1,817 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua_process51/im_process_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua_process51/im_process_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 21, 64,108,117, 97, + 53, 47,105,109, 95,112,114,111, 99,101,115,115, 46,108,117, 97, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 13, 0, 0, 1,144, 0, 0, 0, 36, 0, 0, 64, +100, 0, 0,128,164, 0, 0,192,228, 0, 1, 1, 36, 0, 1, 65,100, 0, 0, 1, +128, 0, 0, 1,193, 5, 0, 2, 3, 0, 0, 66,197, 5,192,130,198, 3, 0, 65, +156, 0, 0, 1,128, 0, 0,193,193, 1, 0, 65,156, 0, 0, 1,128, 0, 1, 1, +193, 1, 0, 65,156, 0, 0, 1,128, 0, 1, 65,193, 1, 0, 65,156, 0, 0, 1, +128, 0, 1,129,193, 0, 1,194, 1, 2,128, 2, 64, 0, 0, 66,133, 5, 66, 2, +134, 0, 0, 66,197, 5,194, 66,198, 3, 0, 65,156, 0, 0, 1,128, 0, 2,129, +193, 1, 0, 65,156, 0, 0, 1,128, 0, 2,193,193, 5, 0, 2, 3, 0, 0, 66, +197, 5,195, 2,198, 3, 0, 65,156, 0, 0, 1,128, 0, 3, 65,193, 4,128, 2, + 3, 0, 0, 66,133, 5, 67,130,134, 5,128, 2,195, 3, 0, 65,156, 0, 0, 65, +133, 0, 1,129,228,135,129,193,137, 0, 0, 65,133, 0, 1,193,228,136, 1,193, +137, 0, 0, 1,128, 0, 4, 65,193, 0, 2, 2, 36, 0, 2, 66,100, 2, 0, 65, +156, 0, 0, 65,133, 0, 2,129,228,137, 1,193,137, 0,128, 1,128, 0, 4,193, +193, 1, 0, 65,156, 0, 0, 65,133, 0, 2,193,228,138, 1,193,137, 0, 0, 65, +133, 0, 3, 1,228,138,129,193,137, 0, 0, 1,128, 0, 5,129,193, 1, 0, 65, +156, 0, 0, 1,128, 0, 5,193,193, 0, 3, 66, 36, 0, 3,130,100, 2, 0, 65, +156, 0, 0, 1,128, 0, 6, 1,193, 1, 0, 65,156, 0, 0, 1,128, 0, 6, 65, +193, 1, 0, 65,156, 0, 0, 1,128, 0, 6,129,193, 1, 0, 65,156, 0, 0, 1, +128, 0, 6,193,193, 1, 0, 65,156, 0, 0, 1,128, 0, 7, 1,193, 1, 0, 65, +156, 0, 0, 1,128, 0, 7, 65,193, 1, 0, 65,156, 0, 0, 1,128, 0, 7,129, +193, 1, 0, 65,156, 0, 0, 1,128, 0, 7,193,193, 1, 0, 65,156, 0, 0, 1, +128, 0, 8, 1,193, 1, 0, 65,156, 0, 0, 1,128, 0, 8, 65,193, 1, 0, 65, +156, 0, 0, 1,128, 0, 8,129,193, 1, 0, 65,156, 0, 0, 1,128, 0, 8,193, +193, 1, 0, 65,156, 0, 0, 1,128, 0, 9, 1,193, 1, 0, 65,156, 0, 0, 1, +128, 0, 9, 65,193, 1, 0, 65,156, 0, 0, 1,128, 0, 9,129,193, 1, 0, 65, +156, 0, 0, 1,128, 0, 9,193,193, 1, 0, 65,156, 0, 0, 1,128, 0, 10, 1, +193, 1, 0, 65,156, 0, 0, 1,128, 0, 10, 65,193, 1, 0, 65,156, 0, 0, 1, +128, 0, 10,129,193, 1, 0, 65,156, 0, 0, 1,128, 0, 10,193,193, 1, 0, 65, +156, 0, 0, 1,128, 0, 11, 1,193, 1, 0, 65,156, 0, 0, 1,128, 0, 11, 65, +193, 1, 0, 65,156, 0, 0, 1,128, 0, 11,129,193, 1, 0, 65,156, 0, 0, 1, +128, 0, 11,193,193, 1, 0, 65,156, 0, 0, 1,128, 0, 12, 1,193, 1, 0, 65, +156, 0, 0, 1,128, 0, 12, 65,193, 1, 0, 65,156, 0, 0, 1,128, 0, 12,129, +193, 1, 0, 65,156, 0, 0, 1,128, 0, 12,193,193, 1, 0, 65,156, 0, 0, 1, +128, 0, 13, 1,193, 1, 0, 65,156, 0, 0, 1,128, 0, 13, 65,193, 1, 0, 65, +156, 0, 0, 1,128, 0, 13,129,193, 1, 0, 65,156, 0, 0, 1,128, 0, 13,193, +193, 1, 0, 65,156, 1,128, 1,128, 0, 14, 1,193, 4, 0, 2, 3, 0, 3,194, +100, 2, 0, 65,156, 0, 0, 65,133, 0, 4, 1,228,156,129,193,137, 0, 4, 65, +164, 0, 0, 1,192, 0, 14,130, 1, 5,128, 2, 67, 3, 0, 3, 0, 3, 0, 65, +220, 0, 0, 1,192, 0, 14,194, 1, 5,128, 2, 67, 3, 0, 3, 0, 3, 0, 65, +220, 0, 0, 1,192, 0, 15, 2, 1, 1, 0, 65,220, 0, 0, 1,192, 0, 15, 66, + 1, 1, 0, 65,220, 0, 0, 1,192, 0, 15,130, 1, 1, 0, 65,220, 0, 0, 1, +192, 0, 15,194, 1, 1, 0, 65,220, 0, 0, 1,192, 0, 16, 2, 1, 1, 0, 65, +220, 0, 0, 1,192, 0, 16, 66, 1, 1, 0, 65,220, 0,128, 1,192, 0, 16,130, + 1, 1, 0, 65,220, 0, 0, 1,192, 0, 16,194, 1, 1, 0, 65,220, 0, 0, 1, +192, 0, 17, 2, 1, 1, 0, 65,220, 0,128, 1,192, 0, 17, 66, 1, 1, 0, 65, +220, 0, 0, 65,197, 0, 4,130, 36,163, 2, 1,201, 0,128, 1,192, 0, 17,194, + 1, 1, 0, 65,220, 1, 0, 1,192, 0, 18, 2, 1, 1, 0, 65,220, 1,128, 1, +192, 0, 18, 66, 1, 1, 0, 65,220, 0,128, 1,192, 0, 18,130, 1, 5,128, 2, + 67, 0, 0, 67, 5, 6, 82,195, 6, 3, 0, 65,220, 0, 0, 65,197, 0, 4,194, + 36,166, 2, 1,201, 0, 0, 65,197, 0, 5, 2, 36,166,130, 1,201, 0,128, 1, +192, 0, 19,130, 1, 1, 0, 65,220, 0, 0, 1,192, 0, 19,194, 1, 1, 0, 65, +220, 0, 0, 1,192, 0, 20, 2, 1, 5, 0, 2, 67, 0, 0, 66,197, 5,212, 66, +198, 6, 0, 3, 3, 3, 0, 65,220, 0, 0, 1,192, 0, 20,130, 1, 1, 0, 65, +220, 0, 0, 1,192, 0, 20,194, 1, 1, 0, 65,220, 0, 0, 1,192, 0, 21, 2, + 1, 1, 0, 65,220, 0, 0, 65,197, 0, 5, 66, 36,170,130, 1,201, 2, 0, 1, +192, 0, 21,130, 1, 5, 0, 2, 67, 0, 0, 66,197, 5,194, 2,198, 0, 0, 67, + 5, 6, 67, 3, 6, 3, 0, 65,220, 1, 0, 1,192, 0, 21,194, 1, 5, 0, 2, + 67, 0, 0, 66,197, 5,214, 2,198, 0, 0, 67, 5, 6, 86, 67, 6, 3, 0, 65, +220, 0, 0, 65,197, 0, 5,130, 36,173, 2, 1,201, 0, 0, 65,197, 0, 5,194, + 36,173,130, 1,201, 0, 0, 1,192, 0, 23, 2, 1, 5,128, 2, 67, 0, 0, 67, + 5, 6, 67, 3, 6, 3, 0, 65,220, 0, 0, 1,192, 0, 23, 66, 1, 1, 0, 65, +220, 0,128, 1,192, 0, 23,130, 1, 1, 0, 65,220, 0, 0, 1,192, 0, 23,194, + 1, 1, 0, 65,220, 0, 0, 1,192, 0, 24, 2, 1, 1, 0, 65,220, 0, 0, 1, +192, 0, 24, 66, 1, 1, 0, 65,220, 0, 0, 1,192, 0, 24,130, 1, 1, 0, 65, +220, 0, 0, 1,192, 0, 24,194, 1, 5,128, 2, 67, 0, 0, 67, 5, 6, 86, 67, + 6, 3, 0, 65,220, 0, 0, 1,192, 0, 25, 2, 1, 5,128, 2, 67, 0, 0, 67, + 5, 6, 86, 67, 6, 3, 0, 65,220, 0, 0, 1,192, 0, 25, 66, 1, 1, 0, 65, +220, 0, 0, 1,192, 0, 25,130, 1, 5, 0, 2, 67, 0, 0, 66,197, 5,195,130, +198, 6, 0, 3, 3, 3, 0, 65,220, 0, 0, 1,192, 0, 25,194, 1, 5, 0, 2, + 67, 0, 0, 66,197, 5,195,130,198, 6, 0, 3, 3, 3, 0, 65,220, 0, 0, 1, +192, 0, 26, 2, 1, 5, 0, 2, 67, 0, 0, 66,197, 5,195,130,198, 6, 0, 3, + 3, 3, 0, 65,220, 0,128, 1,192, 0, 26, 66, 1, 1, 0, 65,220, 0, 0, 1, +192, 0, 26,130, 1, 5, 0, 2, 67, 0, 0, 66,197, 5,195,130,198, 6, 0, 3, + 3, 3, 0, 65,220, 0, 0, 1,192, 0, 26,194, 1, 5, 0, 2, 67, 0, 0, 66, +197, 5,195,130,198, 6, 0, 3, 3, 3, 0, 65,220, 0, 0, 1,192, 0, 27, 2, + 1, 1, 0, 65,220, 0, 0, 1,192, 0, 27, 66, 1, 1, 0, 65,220, 0, 0, 1, +192, 0, 27,130, 1, 1, 0, 65,220, 0, 0, 1,192, 0, 27,194, 1, 5, 0, 2, + 67, 0, 0, 66,197, 5,195,130,198, 6, 0, 3, 3, 3, 0, 65,220, 0, 0, 1, +192, 0, 28, 2, 1, 5, 0, 2, 67, 0, 0, 66,197, 5,195,130,198, 6, 0, 3, + 3, 3, 0, 65,220, 0, 0, 1,192, 0, 28, 66, 1, 1, 0, 65,220, 0, 0, 1, +192, 0, 28,130, 1, 1, 0, 65,220, 0,128, 0, 30, 0, 0, 0,115, 4, 0, 0, + 0, 19, 65,110, 97,108,121,122,101, 70,105,110,100, 82,101,103,105,111,110,115, + 0, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 7, 85, 83, 72, 79, 82, 84, + 0, 4, 0, 0, 0, 21, 80,114,111, 99,101,115,115, 80,101,114,105,109,101,116, +101,114, 76,105,110,101, 0, 4, 0, 0, 0, 20, 80,114,111, 99,101,115,115, 82, +101,109,111,118,101, 66,121, 65,114,101, 97, 0, 4, 0, 0, 0, 17, 80,114,111, + 99,101,115,115, 70,105,108,108, 72,111,108,101,115, 0, 4, 0, 0, 0, 18, 80, +114,111, 99,101,115,115, 72,111,117,103,104, 76,105,110,101,115, 0, 3, 64,102, +128, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5, 71, 82, 65, 89, 0, 4, 0, 0, 0, + 4, 73, 78, 84, 0, 4, 0, 0, 0, 22, 80,114,111, 99,101,115,115, 72,111,117, +103,104, 76,105,110,101,115, 68,114, 97,119, 0, 4, 0, 0, 0, 25, 80,114,111, + 99,101,115,115, 68,105,115,116, 97,110, 99,101, 84,114, 97,110,115,102,111,114, +109, 0, 4, 0, 0, 0, 6, 70, 76, 79, 65, 84, 0, 4, 0, 0, 0, 23, 80,114, +111, 99,101,115,115, 82,101,103,105,111,110, 97,108, 77, 97,120,105,109,117,109, + 0, 4, 0, 0, 0, 7, 66, 73, 78, 65, 82, 89, 0, 4, 0, 0, 0, 17, 80,114, +111, 99,101,115,115, 82,101,100,117, 99,101, 78,101,119, 0, 4, 0, 0, 0, 17, + 80,114,111, 99,101,115,115, 82,101,115,105,122,101, 78,101,119, 0, 4, 0, 0, + 0, 17, 80,114,111, 99,101,115,115, 82,101,100,117, 99,101, 66,121, 52, 0, 4, + 0, 0, 0, 15, 80,114,111, 99,101,115,115, 67,114,111,112, 78,101,119, 0, 4, + 0, 0, 0, 14, 80,114,111, 99,101,115,115, 73,110,115,101,114,116, 0, 4, 0, + 0, 0, 21, 80,114,111, 99,101,115,115, 65,100,100, 77, 97,114,103,105,110,115, + 78,101,119, 0, 4, 0, 0, 0, 17, 80,114,111, 99,101,115,115, 82,111,116, 97, +116,101, 78,101,119, 0, 4, 0, 0, 0, 17, 80,114,111, 99,101,115,115, 82,111, +116, 97,116,101, 82,101,102, 0, 4, 0, 0, 0, 16, 80,114,111, 99,101,115,115, + 82,111,116, 97,116,101, 57, 48, 0, 4, 0, 0, 0, 17, 80,114,111, 99,101,115, +115, 82,111,116, 97,116,101, 49, 56, 48, 0, 4, 0, 0, 0, 14, 80,114,111, 99, +101,115,115, 77,105,114,114,111,114, 0, 4, 0, 0, 0, 12, 80,114,111, 99,101, +115,115, 70,108,105,112, 0, 4, 0, 0, 0, 14, 80,114,111, 99,101,115,115, 82, + 97,100,105, 97,108, 0, 4, 0, 0, 0, 25, 80,114,111, 99,101,115,115, 71,114, + 97,121, 77,111,114,112,104, 67,111,110,118,111,108,118,101, 0, 4, 0, 0, 0, + 22, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 69,114,111, +100,101, 0, 4, 0, 0, 0, 23, 80,114,111, 99,101,115,115, 71,114, 97,121, 77, +111,114,112,104, 68,105,108, 97,116,101, 0, 4, 0, 0, 0, 21, 80,114,111, 99, +101,115,115, 71,114, 97,121, 77,111,114,112,104, 79,112,101,110, 0, 4, 0, 0, + 0, 22, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 67,108, +111,115,101, 0, 4, 0, 0, 0, 23, 80,114,111, 99,101,115,115, 71,114, 97,121, + 77,111,114,112,104, 84,111,112, 72, 97,116, 0, 4, 0, 0, 0, 21, 80,114,111, + 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 87,101,108,108, 0, 4, 0, + 0, 0, 25, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 71, +114, 97,100,105,101,110,116, 0, 4, 0, 0, 0, 24, 80,114,111, 99,101,115,115, + 66,105,110, 77,111,114,112,104, 67,111,110,118,111,108,118,101, 0, 4, 0, 0, + 0, 21, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 69,114,111, +100,101, 0, 4, 0, 0, 0, 22, 80,114,111, 99,101,115,115, 66,105,110, 77,111, +114,112,104, 68,105,108, 97,116,101, 0, 4, 0, 0, 0, 20, 80,114,111, 99,101, +115,115, 66,105,110, 77,111,114,112,104, 79,112,101,110, 0, 4, 0, 0, 0, 21, + 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 67,108,111,115,101, + 0, 4, 0, 0, 0, 23, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112, +104, 79,117,116,108,105,110,101, 0, 4, 0, 0, 0, 20, 80,114,111, 99,101,115, +115, 66,105,110, 77,111,114,112,104, 84,104,105,110, 0, 4, 0, 0, 0, 22, 80, +114,111, 99,101,115,115, 77,101,100,105, 97,110, 67,111,110,118,111,108,118,101, + 0, 4, 0, 0, 0, 21, 80,114,111, 99,101,115,115, 82, 97,110,103,101, 67,111, +110,118,111,108,118,101, 0, 4, 0, 0, 0, 27, 80,114,111, 99,101,115,115, 82, + 97,110,107, 67,108,111,115,101,115,116, 67,111,110,118,111,108,118,101, 0, 4, + 0, 0, 0, 23, 80,114,111, 99,101,115,115, 82, 97,110,107, 77, 97,120, 67,111, +110,118,111,108,118,101, 0, 4, 0, 0, 0, 23, 80,114,111, 99,101,115,115, 82, + 97,110,107, 77,105,110, 67,111,110,118,111,108,118,101, 0, 4, 0, 0, 0, 16, + 80,114,111, 99,101,115,115, 67,111,110,118,111,108,118,101, 0, 4, 0, 0, 0, + 19, 80,114,111, 99,101,115,115, 67,111,110,118,111,108,118,101, 83,101,112, 0, + 4, 0, 0, 0, 19, 80,114,111, 99,101,115,115, 67,111,110,118,111,108,118,101, + 82,101,112, 0, 4, 0, 0, 0, 20, 80,114,111, 99,101,115,115, 67,111,110,118, +111,108,118,101, 68,117, 97,108, 0, 4, 0, 0, 0, 23, 80,114,111, 99,101,115, +115, 67,111,109,112, 97,115,115, 67,111,110,118,111,108,118,101, 0, 4, 0, 0, + 0, 20, 80,114,111, 99,101,115,115, 77,101, 97,110, 67,111,110,118,111,108,118, +101, 0, 4, 0, 0, 0, 24, 80,114,111, 99,101,115,115, 71, 97,117,115,115,105, + 97,110, 67,111,110,118,111,108,118,101, 0, 4, 0, 0, 0, 23, 80,114,111, 99, +101,115,115, 66, 97,114,108,101,116,116, 67,111,110,118,111,108,118,101, 0, 4, + 0, 0, 0, 22, 80,114,111, 99,101,115,115, 73,110,116,101,114,108, 97, 99,101, + 83,112,108,105,116, 0, 4, 0, 0, 0, 25, 80,114,111, 99,101,115,115, 73,110, +116,101,114,108, 97, 99,101, 83,112,108,105,116, 78,101,119, 0, 4, 0, 0, 0, + 30, 80,114,111, 99,101,115,115, 68,105,102,102, 79,102, 71, 97,117,115,115,105, + 97,110, 67,111,110,118,111,108,118,101, 0, 4, 0, 0, 0, 29, 80,114,111, 99, +101,115,115, 76, 97,112, 79,102, 71, 97,117,115,115,105, 97,110, 67,111,110,118, +111,108,118,101, 0, 4, 0, 0, 0, 21, 80,114,111, 99,101,115,115, 83,111, 98, +101,108, 67,111,110,118,111,108,118,101, 0, 4, 0, 0, 0, 26, 80,114,111, 99, +101,115,115, 83,112,108,105,110,101, 69,100,103,101, 67,111,110,118,111,108,118, +101, 0, 4, 0, 0, 0, 23, 80,114,111, 99,101,115,115, 80,114,101,119,105,116, +116, 67,111,110,118,111,108,118,101, 0, 4, 0, 0, 0, 20, 80,114,111, 99,101, +115,115, 90,101,114,111, 67,114,111,115,115,105,110,103, 0, 4, 0, 0, 0, 13, + 80,114,111, 99,101,115,115, 67, 97,110,110,121, 0, 4, 0, 0, 0, 22, 80,114, +111, 99,101,115,115, 85,110, 65,114,105,116,104,109,101,116,105, 99, 79,112, 0, + 4, 0, 0, 0, 20, 80,114,111, 99,101,115,115, 65,114,105,116,104,109,101,116, +105, 99, 79,112, 0, 4, 0, 0, 0, 15, 80,114,111, 99,101,115,115, 85,110,115, +104, 97,114,112, 0, 4, 0, 0, 0, 13, 80,114,111, 99,101,115,115, 83,104, 97, +114,112, 0, 4, 0, 0, 0, 19, 80,114,111, 99,101,115,115, 83,104, 97,114,112, + 75,101,114,110,101,108, 0, 4, 0, 0, 0, 28, 80,114,111, 99,101,115,115, 65, +114,105,116,104,109,101,116,105, 99, 67,111,110,115,116, 79,112, 78,101,119, 0, + 4, 0, 0, 0, 18, 80,114,111, 99,101,115,115, 66,108,101,110,100, 67,111,110, +115,116, 0, 4, 0, 0, 0, 13, 80,114,111, 99,101,115,115, 66,108,101,110,100, + 0, 4, 0, 0, 0, 20, 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111, +109,112,108,101,120, 0, 4, 0, 0, 0, 20, 80,114,111, 99,101,115,115, 77,101, +114,103,101, 67,111,109,112,108,101,120, 0, 4, 0, 0, 0, 7, 67, 70, 76, 79, + 65, 84, 0, 4, 0, 0, 0, 23, 80,114,111, 99,101,115,115, 77,117,108,116,105, +112,108,101, 77,101, 97,110, 78,101,119, 0, 4, 0, 0, 0, 25, 80,114,111, 99, +101,115,115, 77,117,108,116,105,112,108,101, 83,116,100, 68,101,118, 78,101,119, + 0, 4, 0, 0, 0, 22, 80,114,111, 99,101,115,115, 65,117,116,111, 67,111,118, + 97,114,105, 97,110, 99,101, 0, 4, 0, 0, 0, 20, 80,114,111, 99,101,115,115, + 77,117,108,116,105,112,108,121, 67,111,110,106, 0, 4, 0, 0, 0, 26, 80,114, +111, 99,101,115,115, 81,117, 97,110,116,105,122,101, 82, 71, 66, 85,110,105,102, +111,114,109, 0, 4, 0, 0, 0, 4, 77, 65, 80, 0, 4, 0, 0, 0, 27, 80,114, +111, 99,101,115,115, 81,117, 97,110,116,105,122,101, 71,114, 97,121, 85,110,105, +102,111,114,109, 0, 4, 0, 0, 0, 23, 80,114,111, 99,101,115,115, 69,120,112, + 97,110,100, 72,105,115,116,111,103,114, 97,109, 0, 4, 0, 0, 0, 25, 80,114, +111, 99,101,115,115, 69,113,117, 97,108,105,122,101, 72,105,115,116,111,103,114, + 97,109, 0, 4, 0, 0, 0, 23, 80,114,111, 99,101,115,115, 83,112,108,105,116, + 89, 67,104,114,111,109, 97, 78,101,119, 0, 4, 0, 0, 0, 16, 80,114,111, 99, +101,115,115, 83,112,108,105,116, 72, 83, 73, 0, 4, 0, 0, 0, 16, 80,114,111, + 99,101,115,115, 77,101,114,103,101, 72, 83, 73, 0, 4, 0, 0, 0, 4, 82, 71, + 66, 0, 4, 0, 0, 0, 5, 66, 89, 84, 69, 0, 4, 0, 0, 0, 26, 80,114,111, + 99,101,115,115, 83,112,108,105,116, 67,111,109,112,111,110,101,110,116,115, 78, +101,119, 0, 4, 0, 0, 0, 26, 80,114,111, 99,101,115,115, 77,101,114,103,101, + 67,111,109,112,111,110,101,110,116,115, 78,101,119, 0, 4, 0, 0, 0, 27, 80, +114,111, 99,101,115,115, 78,111,114,109, 97,108,105,122,101, 67,111,109,112,111, +110,101,110,116,115, 0, 4, 0, 0, 0, 20, 80,114,111, 99,101,115,115, 82,101, +112,108, 97, 99,101, 67,111,108,111,114, 0, 4, 0, 0, 0, 17, 80,114,111, 99, +101,115,115, 66,105,116,119,105,115,101, 79,112, 0, 4, 0, 0, 0, 18, 80,114, +111, 99,101,115,115, 66,105,116,119,105,115,101, 78,111,116, 0, 4, 0, 0, 0, + 15, 80,114,111, 99,101,115,115, 66,105,116, 77, 97,115,107, 0, 4, 0, 0, 0, + 16, 80,114,111, 99,101,115,115, 66,105,116, 80,108, 97,110,101, 0, 4, 0, 0, + 0, 17, 80,114,111, 99,101,115,115, 84,111,110,101, 71, 97,109,117,116, 0, 4, + 0, 0, 0, 19, 80,114,111, 99,101,115,115, 85,110, 78,111,114,109, 97,108,105, +122,101, 0, 4, 0, 0, 0, 18, 80,114,111, 99,101,115,115, 68,105,114,101, 99, +116, 67,111,110,118, 0, 4, 0, 0, 0, 16, 80,114,111, 99,101,115,115, 78,101, +103, 97,116,105,118,101, 0, 4, 0, 0, 0, 30, 80,114,111, 99,101,115,115, 82, + 97,110,103,101, 67,111,110,116,114, 97,115,116, 84,104,114,101,115,104,111,108, +100, 0, 4, 0, 0, 0, 25, 80,114,111, 99,101,115,115, 76,111, 99, 97,108, 77, + 97,120, 84,104,114,101,115,104,111,108,100, 0, 4, 0, 0, 0, 17, 80,114,111, + 99,101,115,115, 84,104,114,101,115,104,111,108,100, 0, 4, 0, 0, 0, 23, 80, +114,111, 99,101,115,115, 84,104,114,101,115,104,111,108,100, 66,121, 68,105,102, +102, 0, 4, 0, 0, 0, 27, 80,114,111, 99,101,115,115, 72,121,115,116,101,114, +101,115,105,115, 84,104,114,101,115,104,111,108,100, 0, 4, 0, 0, 0, 27, 80, +114,111, 99,101,115,115, 85,110,105,102,111,114,109, 69,114,114, 84,104,114,101, +115,104,111,108,100, 0, 4, 0, 0, 0, 28, 80,114,111, 99,101,115,115, 68,105, +102,117,115,105,111,110, 69,114,114, 84,104,114,101,115,104,111,108,100, 0, 4, + 0, 0, 0, 24, 80,114,111, 99,101,115,115, 80,101,114, 99,101,110,116, 84,104, +114,101,115,104,111,108,100, 0, 4, 0, 0, 0, 21, 80,114,111, 99,101,115,115, + 79,116,115,117, 84,104,114,101,115,104,111,108,100, 0, 4, 0, 0, 0, 23, 80, +114,111, 99,101,115,115, 77,105,110, 77, 97,120, 84,104,114,101,115,104,111,108, +100, 0, 4, 0, 0, 0, 22, 80,114,111, 99,101,115,115, 83,108,105, 99,101, 84, +104,114,101,115,104,111,108,100, 0, 4, 0, 0, 0, 16, 80,114,111, 99,101,115, +115, 80,105,120,101,108, 97,116,101, 0, 4, 0, 0, 0, 17, 80,114,111, 99,101, +115,115, 80,111,115,116,101,114,105,122,101, 0, 0, 0, 0, 24, 0, 0, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 25, 0, 5, 0, 9, 0, 0, 0, 17, 0, 0, 1, 69, + 2,128, 1, 70, 0, 0, 65,133, 2,128, 1,192, 1, 0, 65,156, 0, 0, 1,133, + 0, 0, 1,192, 0, 0,130, 1, 3,130, 1,213, 0, 0, 2, 36, 0,128, 0, 0, + 1, 0, 0, 0, 1,128, 0, 0, 2, 0, 0, 0, 2,128, 0, 0, 3,130, 1,137, + 0,128, 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, + 7, 97,115,115,101,114,116, 0, 4, 0, 0, 0, 4, 78,101,119, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 24, 5, 1, 7, 8, 0, 0, 0, + 23, 0, 0, 0,133, 1, 64, 64,134, 0, 0, 0,192, 0, 0, 1, 4, 0,128, 1, + 68, 1, 0, 1,132, 1,128, 1,196, 3, 0,128,156, 2, 0, 0,196, 0, 0, 1, + 0, 1, 0, 1, 64, 0, 0,129,133, 0,128, 1,192, 1, 0, 1,156, 0, 0,128, +220, 0, 0, 0,218,128, 0,192, 22, 1,128, 1, 0, 1, 0, 1, 64, 1,128, 1, + 30,128, 0, 0, 22, 1, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 3, 4, 0, 0, + 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, 97,103,101, 67,114,101, 97,116, +101, 66, 97,115,101,100, 0, 4, 0, 0, 0, 7,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 24, 0, + 0, 0, 4, 0, 0, 0, 10,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, + 0, 0, 0, 0, 22, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, + 22, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, 0, 0, 8, 0, + 0, 0, 22, 0, 0, 0, 4,114,101,116, 0, 0, 0, 0, 15, 0, 0, 0, 22, 0, + 0, 0, 5, 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, 7,104,101,105, +103,104,116, 0, 0, 0, 0, 12, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, + 0, 0, 0, 10,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 5,102,117, +110, 99, 0, 0, 0, 0, 17, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 10, 0, + 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, + 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, + 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 6, 0, + 0, 0, 9,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, + 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, + 12, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 10,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 5,102,117,110, 99, 0, 0, 0, 0, 2, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 50, 0, 5, 0, 11, + 0, 0, 0, 22, 0, 0, 1, 69, 2,128, 1, 70, 0, 0, 65,133, 2,128, 1,192, + 0, 0,130, 5, 4, 64,194, 6, 0, 1, 2, 65, 0, 0, 2,128, 1,128, 2, 28, + 0, 0, 65,156, 0, 0, 1,133, 0, 0, 1,192, 0, 1, 66, 1, 3,130, 1,213, + 0, 0, 2, 36, 0,128, 0, 0, 1, 0, 0, 0, 1,128, 0, 0, 2, 0, 0, 0, + 2,128, 0, 0, 3,130, 1,137, 0,128, 0, 30, 0, 0, 0, 6, 4, 0, 0, 0, + 3,105,109, 0, 4, 0, 0, 0, 7, 97,115,115,101,114,116, 0, 4, 0, 0, 0, + 7,115,116,114,105,110,103, 0, 4, 0, 0, 0, 7,102,111,114,109, 97,116, 0, + 4, 0, 0, 0, 24,117,110,100,101,102,105,110,101,100, 32,102,117,110, 99,116, +105,111,110, 32, 96, 37,115, 39, 0, 4, 0, 0, 0, 4, 78,101,119, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 49, 5, 2, 7, 10, 0, 0, + 0, 24, 0, 0, 0,197, 1,192, 64,198, 0, 0, 1, 0, 0, 0, 1, 68, 0,128, + 1,132, 1, 0, 1,196, 1,128, 2, 4, 3, 0,128,220, 2, 0, 1, 4, 0, 0, + 1, 64, 0,128, 1,128, 1,128, 1,192, 0, 0,130, 5, 1, 0, 2, 64, 1, 0, + 2, 28, 0, 0,129, 28, 0, 0, 1, 26,128, 0,192, 22, 2, 0, 1, 64, 1,128, + 1,128, 1,128, 1, 94,128, 0, 0, 22, 1, 0, 0,222, 0,128, 0, 30, 0, 0, + 0, 3, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, 97,103,101, + 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 0, 0, 0, 7,117,110,112, + 97, 99,107, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 40, 0, 0, 0, 40, + 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, + 0, 0, 0, 40, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, + 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, + 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, + 0, 0, 0, 47, 0, 0, 0, 49, 0, 0, 0, 5, 0, 0, 0, 11,115,114, 99, 95, +105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 11,115, +114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, + 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 10,100,115, +116, 95,105,109, 97,103,101, 0, 0, 0, 0, 8, 0, 0, 0, 23, 0, 0, 0, 4, +114,101,116, 0, 0, 0, 0, 16, 0, 0, 0, 23, 0, 0, 0, 5, 0, 0, 0, 6, +119,105,100,116,104, 0, 0, 0, 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, + 12, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 10,100, 97,116, + 97, 95,116,121,112,101, 0, 0, 0, 0, 5,102,117,110, 99, 0, 0, 0, 0, 22, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 49, + 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, + 0, 0, 0, 49, 0, 0, 0, 50, 0, 0, 0, 6, 0, 0, 0, 9,102,117,110, 99, +110, 97,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 6,119,105,100, +116,104, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 7,104,101,105,103,104, +116, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 12, 99,111,108,111,114, 95, +115,112, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 10,100, 97, +116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 5, +102,117,110, 99, 0, 0, 0, 0, 2, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 56, 0, 0, 0, 73, 0, 5, 0, 9, 0, 0, 0, 17, 0, 0, 1, + 69, 2,128, 1, 70, 0, 0, 65,133, 2,128, 1,192, 1, 0, 65,156, 0, 0, 1, +133, 0, 0, 1,192, 0, 0,130, 1, 3,130, 1,213, 0, 0, 2, 36, 0,128, 0, + 0, 1, 0, 0, 0, 1,128, 0, 0, 2, 0, 0, 0, 2,128, 0, 0, 3,130, 1, +137, 0,128, 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, + 0, 7, 97,115,115,101,114,116, 0, 4, 0, 0, 0, 4, 78,101,119, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, 0, 72, 5, 3, 7, 12, 0, 0, + 0, 25, 0, 0, 1, 5, 2, 64, 65, 6, 0, 0, 1, 64, 0, 0, 1,132, 0,128, + 1,196, 1, 0, 2, 4, 1,128, 2, 68, 3, 0,129, 28, 2, 0, 1, 68, 0, 0, + 1,128, 0,128, 1,192, 1, 0, 2, 0, 2, 0, 2, 64, 0, 0,130,133, 1,128, + 2,192, 1, 0, 2,156, 0, 0,129, 92, 0, 0, 1, 90,128, 0,192, 22, 2,128, + 1,128, 2, 0, 1,192, 1,128, 1,158,128, 0, 0, 22, 1, 0, 1, 30, 0,128, + 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73, +109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 0, 0, 0, + 7,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, + 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, + 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 68, 0, 0, 0, 68, + 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 70, 0, 0, 0, 72, 0, 0, 0, 6, + 0, 0, 0, 11,115,114, 99, 95,105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 0, + 0, 0, 24, 0, 0, 0, 11,115,114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, + 0, 0, 0, 0, 0, 24, 0, 0, 0, 11,115,114, 99, 95,105,109, 97,103,101, 51, + 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, + 0, 0, 0, 0, 24, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, + 0, 0, 8, 0, 0, 0, 24, 0, 0, 0, 4,114,101,116, 0, 0, 0, 0, 17, 0, + 0, 0, 24, 0, 0, 0, 5, 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, + 7,104,101,105,103,104,116, 0, 0, 0, 0, 12, 99,111,108,111,114, 95,115,112, + 97, 99,101, 0, 0, 0, 0, 10,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, + 0, 5,102,117,110, 99, 0, 0, 0, 0, 17, 0, 0, 0, 57, 0, 0, 0, 57, 0, + 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 61, 0, 0, 0, 61, 0, + 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, + 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 73, 0, + 0, 0, 6, 0, 0, 0, 9,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 12, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 10,100, 97,116, 97, 95,116,121,112,101, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5,102,117,110, 99, 0, 0, 0, 0, 2, + 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, 97, + 0, 5, 0, 9, 0, 0, 0, 17, 0, 0, 1, 69, 2,128, 1, 70, 0, 0, 65,133, + 2,128, 1,192, 1, 0, 65,156, 0, 0, 1,133, 0, 0, 1,192, 0, 0,130, 1, + 3,130, 1,213, 0, 0, 2, 36, 0,128, 0, 0, 1, 0, 0, 0, 1,128, 0, 0, + 2, 0, 0, 0, 2,128, 0, 0, 3,130, 1,137, 0,128, 0, 30, 0, 0, 0, 3, + 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 7, 97,115,115,101,114,116, 0, + 4, 0, 0, 0, 4, 78,101,119, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 84, 0, 0, 0, 96, 5, 1, 7, 10, 0, 0, 0, 35, 0, 0, 0,133, 1, 64, 64, +134, 0, 0, 0,192, 0, 0, 1, 4, 0,128, 1, 68, 1, 0, 1,132, 1,128, 1, +196, 3, 0,128,156, 0, 0, 0,197, 1,192, 64,198, 0, 0, 1, 0, 0, 0, 1, + 68, 0,128, 1,132, 1, 0, 1,196, 1,128, 2, 4, 3, 0,128,220, 2, 0, 1, + 4, 0, 0, 1, 64, 1, 0, 1,128, 1,128, 1,192, 0, 0,130, 5, 0,128, 2, + 64, 1, 0, 2, 28, 0, 0,129, 28, 0, 0, 1, 26,128, 1, 0, 22, 2, 0, 1, + 64, 1, 0, 1,128, 1,128, 1,192, 2, 0, 1, 94,128, 0,128, 22, 1, 0, 1, + 64, 1,128, 1,128, 1,128, 1, 94, 0,128, 0, 30, 0, 0, 0, 3, 4, 0, 0, + 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, 97,103,101, 67,114,101, 97,116, +101, 66, 97,115,101,100, 0, 4, 0, 0, 0, 7,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, + 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, + 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, + 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 90, 0, 0, 0, 90, 0, + 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, + 0, 0, 90, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 92, 0, 0, 0, 92, 0, + 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 94, 0, 0, 0, 94, 0, + 0, 0, 94, 0, 0, 0, 96, 0, 0, 0, 5, 0, 0, 0, 10,115,114, 99, 95,105, +109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 4, 97,114,103, + 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 11,100,115,116, 95,105,109, 97, +103,101, 49, 0, 0, 0, 0, 8, 0, 0, 0, 34, 0, 0, 0, 11,100,115,116, 95, +105,109, 97,103,101, 50, 0, 0, 0, 0, 16, 0, 0, 0, 34, 0, 0, 0, 4,114, +101,116, 0, 0, 0, 0, 24, 0, 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 6,119, +105,100,116,104, 0, 0, 0, 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, 12, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 10,100, 97,116, 97, + 95,116,121,112,101, 0, 0, 0, 0, 5,102,117,110, 99, 0, 0, 0, 0, 17, 0, + 0, 0, 80, 0, 0, 0, 80, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, + 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 96, 0, + 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, + 0, 0, 96, 0, 0, 0, 97, 0, 0, 0, 6, 0, 0, 0, 9,102,117,110, 99,110, + 97,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 6,119,105,100,116, +104, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7,104,101,105,103,104,116, + 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 99,111,108,111,114, 95,115, +112, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 10,100, 97,116, + 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5,102, +117,110, 99, 0, 0, 0, 0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,103, 0, 0, 0,122, 0, 5, 0, 9, 0, 0, 0, 17, 0, 0, 1, 69, + 2,128, 1, 70, 0, 0, 65,133, 2,128, 1,192, 1, 0, 65,156, 0, 0, 1,133, + 0, 0, 1,192, 0, 0,130, 1, 3,130, 1,213, 0, 0, 2, 36, 0,128, 0, 0, + 1, 0, 0, 0, 1,128, 0, 0, 2, 0, 0, 0, 2,128, 0, 0, 3,130, 1,137, + 0,128, 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, + 7, 97,115,115,101,114,116, 0, 4, 0, 0, 0, 4, 78,101,119, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0,108, 0, 0, 0,121, 5, 1, 7, 12, 0, 0, 0, + 46, 0, 0, 0,133, 1, 64, 64,134, 0, 0, 0,192, 0, 0, 1, 4, 0,128, 1, + 68, 1, 0, 1,132, 1,128, 1,196, 3, 0,128,156, 0, 0, 0,197, 1,192, 64, +198, 0, 0, 1, 0, 0, 0, 1, 68, 0,128, 1,132, 1, 0, 1,196, 1,128, 2, + 4, 3, 0,128,220, 0, 0, 1, 5, 2, 64, 65, 6, 0, 0, 1, 64, 0, 0, 1, +132, 0,128, 1,196, 1, 0, 2, 4, 1,128, 2, 68, 3, 0,129, 28, 2, 0, 1, + 68, 0, 0, 1,128, 1, 0, 1,192, 1,128, 2, 0, 2, 0, 2, 64, 0, 0,130, +133, 0,128, 2,192, 1, 0, 2,156, 0, 0,129, 92, 0, 0, 1, 90,128, 1, 64, + 22, 2,128, 1,128, 1, 0, 1,192, 1,128, 2, 0, 2, 0, 2, 64, 2,128, 1, +158,128, 0,192, 22, 1, 0, 1,128, 1,128, 1,192, 2, 0, 2, 0, 2, 0, 1, +158, 0,128, 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, + 0, 17, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, + 0, 0, 0, 7,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, + 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, + 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,111, 0, 0, 0,111, 0, + 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, + 0, 0,111, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, + 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,115, 0, + 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, + 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,116, 0, 0, 0,116, 0, + 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, 0, + 0, 0,117, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, + 0, 0,121, 0, 0, 0, 6, 0, 0, 0, 10,115,114, 99, 95,105,109, 97,103,101, + 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, + 0, 0, 0, 0, 45, 0, 0, 0, 11,100,115,116, 95,105,109, 97,103,101, 49, 0, + 0, 0, 0, 8, 0, 0, 0, 45, 0, 0, 0, 11,100,115,116, 95,105,109, 97,103, +101, 50, 0, 0, 0, 0, 16, 0, 0, 0, 45, 0, 0, 0, 11,100,115,116, 95,105, +109, 97,103,101, 51, 0, 0, 0, 0, 24, 0, 0, 0, 45, 0, 0, 0, 4,114,101, +116, 0, 0, 0, 0, 33, 0, 0, 0, 45, 0, 0, 0, 5, 0, 0, 0, 6,119,105, +100,116,104, 0, 0, 0, 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, 12, 99, +111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 10,100, 97,116, 97, 95, +116,121,112,101, 0, 0, 0, 0, 5,102,117,110, 99, 0, 0, 0, 0, 17, 0, 0, + 0,104, 0, 0, 0,104, 0, 0, 0,105, 0, 0, 0,105, 0, 0, 0,105, 0, 0, + 0,108, 0, 0, 0,108, 0, 0, 0,108, 0, 0, 0,108, 0, 0, 0,121, 0, 0, + 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, + 0,121, 0, 0, 0,122, 0, 0, 0, 6, 0, 0, 0, 9,102,117,110, 99,110, 97, +109,101, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 6,119,105,100,116,104, + 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7,104,101,105,103,104,116, 0, + 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 99,111,108,111,114, 95,115,112, + 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 10,100, 97,116, 97, + 95,116,121,112,101, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5,102,117, +110, 99, 0, 0, 0, 0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,126, 0, 0, 0,130, 0, 1, 0, 7, 0, 0, 0, 18, 0, 0, 0,100, 0, + 0, 0,133, 1, 64, 64,134, 0,128, 0,192, 0, 64,129, 11, 1, 0, 1, 28, 0, + 0,128,220, 0,128, 1, 0, 0, 64,193, 75, 1, 0, 1, 92, 0, 0,129, 28, 1, +129, 0,204, 1, 0,128,156, 1, 65, 0,143,130, 0,128,206, 1,193, 64,204, 1, + 0, 0,222, 0,128, 0, 30, 0, 0, 0, 6, 4, 0, 0, 0, 5,109, 97,116,104, + 0, 4, 0, 0, 0, 5,115,113,114,116, 0, 4, 0, 0, 0, 6, 87,105,100,116, +104, 0, 4, 0, 0, 0, 7, 72,101,105,103,104,116, 0, 3, 64, 0, 0, 0, 0, + 0, 0, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0,127, 0, 0, 0,127, 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 78, + 1, 0, 0, 94, 0,128, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 0,127, 0, 0, 0,127, 0, 0, 0,127, 0, 0, 0, 1, 0, 0, 0, 2, +120, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, + 0,127, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, + 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, + 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,129, 0, 0, + 0,129, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0, 3, 0, 0, 0, 6,105,109, + 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4,115,113,114, 0, + 0, 0, 0, 1, 0, 0, 0, 17, 0, 0, 0, 5,114,109, 97,120, 0, 0, 0, 0, + 14, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 0, 0, 0, +144, 0, 3, 0, 7, 0, 0, 0, 14, 0, 0, 0,197, 1,192, 64,198, 0, 0, 1, + 0, 0,128, 1, 64, 1, 0, 1,128, 2, 0,128,220, 0, 0, 1, 5, 2, 64,129, + 6, 0, 0, 1, 64, 1,128, 1,128, 1,128,129, 28, 1,128, 1, 64, 1,128, 1, + 30, 0,128, 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, + 0, 17, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, + 0, 0, 0, 14, 80,114,111, 99,101,115,115, 82,101,100,117, 99,101, 0, 0, 0, + 0, 0, 0, 0, 0, 14, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, + 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,143, 0, 0, 0,143, 0, 0, + 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, + 0,144, 0, 0, 0, 4, 0, 0, 0, 10,115,114, 99, 95,105,109, 97,103,101, 0, + 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, + 0, 0, 0, 0, 0, 13, 0, 0, 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, + 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,146, 0, + 0, 0,149, 0, 3, 0, 7, 0, 0, 0, 14, 0, 0, 0,197, 1,192, 64,198, 0, + 0, 1, 0, 0,128, 1, 64, 1, 0, 1,128, 2, 0,128,220, 0, 0, 1, 5, 2, + 64,129, 6, 0, 0, 1, 64, 1,128, 1,128, 1,128,129, 28, 1,128, 1, 64, 1, +128, 1, 30, 0,128, 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 3,105,109, 0, 4, + 0, 0, 0, 17, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 4, 0, 0, 0, 14, 80,114,111, 99,101,115,115, 82,101,115,105,122,101, 0, + 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, + 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,148, 0, 0, 0,148, + 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, + 0, 0, 0,149, 0, 0, 0, 4, 0, 0, 0, 10,115,114, 99, 95,105,109, 97,103, +101, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 6,119,105,100,116,104, 0, + 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 7,104,101,105,103,104,116, 0, 0, + 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, + 0, 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +151, 0, 0, 0,151, 0, 1, 0, 3, 0, 0, 0, 5, 0, 64, 0, 75, 1, 0,128, + 92, 0,192, 64, 79, 1, 0, 0, 94, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, + 0, 6, 87,105,100,116,104, 0, 3, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0, +151, 0, 0, 0,151, 0, 0, 0, 1, 0, 0, 0, 6,105,109, 97,103,101, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 0, + 0, 0,152, 0, 1, 0, 3, 0, 0, 0, 5, 0, 64, 0, 75, 1, 0,128, 92, 0, +192, 64, 79, 1, 0, 0, 94, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 7, + 72,101,105,103,104,116, 0, 3, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, + 0, 0, 0,152, 0, 0, 0, 1, 0, 0, 0, 6,105,109, 97,103,101, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 0, 0, + 0,160, 0, 5, 0, 13, 0, 0, 0, 19, 1, 0, 65, 77, 2,192, 1, 76, 2, 0, +193,141, 3, 64, 1,140, 0, 0, 65,197, 3,192,129,198, 0, 0, 2, 0, 2,128, + 2, 64, 3, 0, 2,128, 2, 0,129,220, 0, 0, 66, 5, 4, 64,194, 6, 0, 0, + 2, 64, 3,128, 2,128, 0,128, 2,192, 1,128, 3, 0, 2,128, 66, 28, 1, 0, + 1,222, 0,128, 0, 30, 0, 0, 0, 4, 3, 63,240, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, 97,103,101, 67,114,101, + 97,116,101, 66, 97,115,101,100, 0, 4, 0, 0, 0, 12, 80,114,111, 99,101,115, +115, 67,114,111,112, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0,155, 0, 0, + 0,155, 0, 0, 0,156, 0, 0, 0,156, 0, 0, 0,157, 0, 0, 0,157, 0, 0, + 0,157, 0, 0, 0,157, 0, 0, 0,157, 0, 0, 0,157, 0, 0, 0,158, 0, 0, + 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, + 0,158, 0, 0, 0,159, 0, 0, 0,160, 0, 0, 0, 8, 0, 0, 0, 10,115,114, + 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, +120,109,105,110, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5,120,109, 97, +120, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5,121,109,105,110, 0, 0, + 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5,121,109, 97,120, 0, 0, 0, 0, 0, + 0, 0, 0, 18, 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, 2, 0, 0, + 0, 18, 0, 0, 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, 4, 0, 0, 0, + 18, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, 0, 0, 10, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,164, 0, 0, 0,170, 0, + 5, 0, 13, 0, 0, 0, 19, 1, 0, 65, 77, 2,192, 1, 76, 2, 0,193,141, 3, + 64, 1,140, 0, 0, 65,197, 3,192,129,198, 0, 0, 2, 0, 2,128, 2, 64, 3, + 0, 2,128, 2, 0,129,220, 0, 0, 66, 5, 4, 64,194, 6, 0, 0, 2, 64, 3, +128, 2,128, 0,128, 2,192, 1,128, 3, 0, 2,128, 66, 28, 1, 0, 1,222, 0, +128, 0, 30, 0, 0, 0, 4, 3, 63,240, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, 97,103,101, 67,114,101, 97,116,101, + 66, 97,115,101,100, 0, 4, 0, 0, 0, 18, 80,114,111, 99,101,115,115, 65,100, +100, 77, 97,114,103,105,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, +165, 0, 0, 0,165, 0, 0, 0,166, 0, 0, 0,166, 0, 0, 0,167, 0, 0, 0, +167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0, +168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0, +168, 0, 0, 0,168, 0, 0, 0,169, 0, 0, 0,170, 0, 0, 0, 8, 0, 0, 0, + 10,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, + 0, 0, 5,120,109,105,110, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, +120,109, 97,120, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5,121,109,105, +110, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5,121,109, 97,120, 0, 0, + 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, + 2, 0, 0, 0, 18, 0, 0, 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, 4, + 0, 0, 0, 18, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, 0, + 0, 10, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,172, 0, 0, + 0,176, 0, 4, 0, 13, 0, 0, 0, 26, 0, 0, 1, 5, 2, 64, 65, 6, 0, 64, +129, 75, 1, 0,129, 92, 0, 64,193,139, 1, 0,129,156, 0,128, 1,192, 1, 0, + 2, 0, 2,128,193, 28, 0, 0, 1,133, 3, 65, 1,134, 0, 0, 1,192, 2, 0, + 2, 0, 2,128, 2, 64, 2, 0,129,156, 0, 0, 1,197, 3,193, 65,198, 0, 0, + 2, 0, 3, 0, 2, 64, 0,128, 2,128, 1, 0, 2,192, 1,128, 3, 0, 3, 0, +129,220, 3, 0, 2, 0, 1,128, 1,222, 0,128, 0, 30, 0, 0, 0, 6, 4, 0, + 0, 0, 3,105,109, 0, 4, 0, 0, 0, 22, 80,114,111, 99,101,115,115, 67, 97, +108, 99, 82,111,116, 97,116,101, 83,105,122,101, 0, 4, 0, 0, 0, 6, 87,105, +100,116,104, 0, 4, 0, 0, 0, 7, 72,101,105,103,104,116, 0, 4, 0, 0, 0, + 17, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 0, + 0, 0, 14, 80,114,111, 99,101,115,115, 82,111,116, 97,116,101, 0, 0, 0, 0, + 0, 0, 0, 0, 26, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0, +173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0, +173, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0, +174, 0, 0, 0,174, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0, +175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0, +175, 0, 0, 0,175, 0, 0, 0,176, 0, 0, 0, 7, 0, 0, 0, 10,115,114, 99, + 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 5, 99, +111,115, 48, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 5,115,105,110, 48, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 6,111,114,100,101,114, 0, 0, + 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 6,119,105,100,116,104, 0, 0, 0, 0, + 9, 0, 0, 0, 25, 0, 0, 0, 7,104,101,105,103,104,116, 0, 0, 0, 0, 9, + 0, 0, 0, 25, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, 0, + 0, 15, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,179, 0, 0, + 0,179, 0, 1, 0, 3, 0, 0, 0, 4, 0, 64, 0, 75, 1, 0, 0, 93, 0, 0, + 0, 94, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 7, 72,101,105,103,104, +116, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,179, 0, 0, 0,179, 0, 0, + 0,179, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 6,105,109, 97,103,101, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,179, + 0, 0, 0,179, 0, 1, 0, 3, 0, 0, 0, 4, 0, 64, 0, 75, 1, 0, 0, 93, + 0, 0, 0, 94, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 6, 87,105,100, +116,104, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,179, 0, 0, 0,179, 0, + 0, 0,179, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 6,105,109, 97,103,101, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +212, 0, 0, 0,212, 0, 1, 0, 3, 0, 0, 0, 13, 0, 64, 0, 75, 1, 0,128, + 92, 0, 0, 0, 90,128, 0,192, 22, 0, 64, 0, 75, 1, 0, 0, 93, 0, 0, 0, + 94,128, 0,192, 22, 0, 64, 0, 75, 1, 0,128, 92, 0,192, 64, 79, 1, 0, 0, + 94, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 7, 72,101,105,103,104,116, + 0, 3, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, + 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, + 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, + 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 6,105,109, + 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,214, 0, 0, 0,227, 0, 1, 0, 8, 0, 0, 0, 36, 0, 64, 0, 75, + 1, 0,128, 92, 0,192, 64, 79, 0, 0,128,133, 1, 64,192,134, 0, 64, 0,203, + 1, 0,128,220, 0, 0, 65, 1, 1,128,128,156, 0, 0, 0,154,128, 0, 0, 22, + 0,193, 0, 76, 0, 1, 64,133, 1, 65,128,134, 0, 0, 0,192, 2, 0, 1, 3, + 0,128, 1, 64, 2, 0,128,156, 0, 1, 64,197, 1,193,128,198, 0, 0, 1, 0, + 2,128, 1, 67, 0, 64, 1,139, 1, 0,129,156, 3, 64, 65,143, 2, 0,128,220, + 0, 1, 65, 5, 2, 65,193, 6, 0, 0, 1, 64, 1, 0, 1,128, 1,128, 1,192, + 2, 0, 65, 28, 1, 0, 1, 0, 1,128, 1, 64, 1,128, 1, 30, 0,128, 0, 30, + 0, 0, 0, 8, 4, 0, 0, 0, 7, 72,101,105,103,104,116, 0, 3, 64, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 5,109, 97,116,104, 0, 4, 0, 0, 0, 4, +109,111,100, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 3,105,109, + 0, 4, 0, 0, 0, 17, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115, +101,100, 0, 4, 0, 0, 0, 22, 80,114,111, 99,101,115,115, 73,110,116,101,114, +108, 97, 99,101, 83,112,108,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, + 0,216, 0, 0, 0,216, 0, 0, 0,216, 0, 0, 0,217, 0, 0, 0,217, 0, 0, + 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, + 0,217, 0, 0, 0,218, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, 0, + 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,222, 0, 0, 0,222, 0, 0, + 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, + 0,222, 0, 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, 0, + 0,225, 0, 0, 0,225, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, 0, 0, + 0,227, 0, 0, 0, 4, 0, 0, 0, 10,115,114, 99, 95,105,109, 97,103,101, 0, + 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 12,100,115,116, 95,104,101,105,103, +104,116, 49, 0, 0, 0, 0, 3, 0, 0, 0, 35, 0, 0, 0, 11,100,115,116, 95, +105,109, 97,103,101, 49, 0, 0, 0, 0, 18, 0, 0, 0, 35, 0, 0, 0, 11,100, +115,116, 95,105,109, 97,103,101, 50, 0, 0, 0, 0, 26, 0, 0, 0, 35, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 0, 0, 0,235, 0, 1, 0, 3, 0, 0, + 0, 14, 0, 64, 0, 75, 1, 0,128, 92, 0, 0, 64,133, 1, 64,128,134, 0,128, +128, 87,128, 0,192, 22, 0, 0, 64,133, 1, 64,192,134, 0,128,128, 23,128, 0, + 64, 22, 0, 0, 64,133, 1, 65, 0, 70, 1, 0, 0, 94, 0,128, 0, 30, 0, 0, + 0, 5, 4, 0, 0, 0, 9, 68, 97,116, 97, 84,121,112,101, 0, 4, 0, 0, 0, + 3,105,109, 0, 4, 0, 0, 0, 5, 66, 89, 84, 69, 0, 4, 0, 0, 0, 7, 85, + 83, 72, 79, 82, 84, 0, 4, 0, 0, 0, 4, 73, 78, 84, 0, 0, 0, 0, 0, 0, + 0, 0, 14, 0, 0, 0,230, 0, 0, 0,230, 0, 0, 0,231, 0, 0, 0,231, 0, + 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, + 0, 0,231, 0, 0, 0,232, 0, 0, 0,232, 0, 0, 0,234, 0, 0, 0,235, 0, + 0, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 0, 0, 0, 10,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 2, 0, + 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0, 0, 0,254, 0, + 3, 0, 9, 0, 0, 0, 13, 0, 0, 0,197, 1,192, 64,198, 0, 0, 1, 0, 1, + 0,128,220, 0, 0, 1, 5, 2, 64,129, 6, 0, 0, 1, 64, 0,128, 1,128, 1, +128, 1,192, 1, 0, 2, 0, 2,128, 65, 28, 1, 0, 0,222, 0,128, 0, 30, 0, + 0, 0, 3, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, 97,103, +101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 0, 0, 0, 25, 80,114, +111, 99,101,115,115, 65,114,105,116,104,109,101,116,105, 99, 67,111,110,115,116, + 79,112, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0,251, 0, 0, 0,251, 0, + 0, 0,251, 0, 0, 0,251, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, 0, + 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,253, 0, + 0, 0,254, 0, 0, 0, 4, 0, 0, 0, 10,115,114, 99, 95,105,109, 97,103,101, + 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 10,115,114, 99, 95, 99,111,110, +115,116, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 3,111,112, 0, 0, 0, + 0, 0, 0, 0, 0, 12, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, + 0, 0, 0, 4, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, + 0, 0, 1, 9, 0, 2, 0, 6, 0, 0, 0, 11, 0, 0, 0,133, 1, 64, 64,134, + 0, 64,128,198, 1, 0,128,156, 0, 0, 0,197, 1,192,192,198, 0, 0, 1, 0, + 1, 0, 1, 64, 1,128, 64,220, 1, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 4, + 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, 97,103,101, 67,114, +101, 97,116,101, 66, 97,115,101,100, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 20, 80,114,111, 99,101,115,115, 77,117,108,116,105,112,108,101, 77, +101, 97,110, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 1, 6, 0, 0, 1, 6, + 0, 0, 1, 6, 0, 0, 1, 6, 0, 0, 1, 7, 0, 0, 1, 7, 0, 0, 1, 7, + 0, 0, 1, 7, 0, 0, 1, 7, 0, 0, 1, 8, 0, 0, 1, 9, 0, 0, 0, 3, + 0, 0, 0, 15,115,114, 99, 95,105,109, 97,103,101, 95,108,105,115,116, 0, 0, + 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, + 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10,100,115,116, 95,105,109, 97, +103,101, 0, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 11, 0, 0, 1, 15, 0, 2, 0, 7, 0, 0, 0, 12, 0, 0, 0,133, 1, + 64, 64,134, 0, 64,128,198, 1, 0,128,156, 0, 0, 0,197, 1,192,192,198, 0, + 0, 1, 0, 0,128, 1, 64, 1, 0, 1,128, 2, 0, 64,220, 1, 0, 0,158, 0, +128, 0, 30, 0, 0, 0, 4, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, + 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 3, 63,240, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 22, 80,114,111, 99,101,115,115, 77,117, +108,116,105,112,108,101, 83,116,100, 68,101,118, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 1, 12, 0, 0, 1, 12, 0, 0, 1, 12, 0, 0, 1, 12, 0, 0, 1, + 13, 0, 0, 1, 13, 0, 0, 1, 13, 0, 0, 1, 13, 0, 0, 1, 13, 0, 0, 1, + 13, 0, 0, 1, 14, 0, 0, 1, 15, 0, 0, 0, 3, 0, 0, 0, 15,115,114, 99, + 95,105,109, 97,103,101, 95,108,105,115,116, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 0, 0, 0, 11,109,101, 97,110, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, + 0, 0, 11, 0, 0, 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, 0, 0, + 4, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 24, 0, 0, 1, + 29, 0, 1, 0, 8, 0, 0, 0, 28, 0, 0, 0, 69, 0,192, 64, 70, 0, 0, 0, +128, 2, 0, 0,195, 0, 0, 1, 69, 2,192,129, 70, 0, 0, 1,133, 3, 64,193, +134, 3, 0,128, 92, 0, 0, 0,133, 1, 64, 64,134, 0, 0, 0,192, 2,128, 1, + 3, 0, 0, 1,133, 3, 65, 1,134, 0, 0, 1,197, 3,192,193,198, 3, 0,128, +156, 0, 0, 0,197, 1,193, 64,198, 0, 0, 1, 0, 0,128, 1, 64, 1, 0, 1, +128, 2, 0, 64,220, 0,128, 0,192, 1, 0, 1, 0, 1,128, 0,222, 0,128, 0, + 30, 0, 0, 0, 6, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, 73,109, + 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 0, 0, 0, 5, + 71, 82, 65, 89, 0, 4, 0, 0, 0, 5, 66, 89, 84, 69, 0, 4, 0, 0, 0, 4, + 82, 71, 66, 0, 4, 0, 0, 0, 20, 80,114,111, 99,101,115,115, 83,112,108,105, +116, 89, 67,104,114,111,109, 97, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 1, + 25, 0, 0, 1, 25, 0, 0, 1, 25, 0, 0, 1, 25, 0, 0, 1, 25, 0, 0, 1, + 25, 0, 0, 1, 25, 0, 0, 1, 25, 0, 0, 1, 25, 0, 0, 1, 26, 0, 0, 1, + 26, 0, 0, 1, 26, 0, 0, 1, 26, 0, 0, 1, 26, 0, 0, 1, 26, 0, 0, 1, + 26, 0, 0, 1, 26, 0, 0, 1, 26, 0, 0, 1, 27, 0, 0, 1, 27, 0, 0, 1, + 27, 0, 0, 1, 27, 0, 0, 1, 27, 0, 0, 1, 27, 0, 0, 1, 28, 0, 0, 1, + 28, 0, 0, 1, 28, 0, 0, 1, 29, 0, 0, 0, 3, 0, 0, 0, 10,115,114, 99, + 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 8,121, + 95,105,109, 97,103,101, 0, 0, 0, 0, 9, 0, 0, 0, 27, 0, 0, 0, 13, 99, +104,114,111,109, 97, 95,105,109, 97,103,101, 0, 0, 0, 0, 18, 0, 0, 0, 27, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 34, 0, 0, 1, 42, 0, 1, 0, 14, + 0, 0, 0, 29, 0, 64, 0, 75, 1, 0,128, 92, 0, 0, 0,138, 0, 0, 64,193, + 0,128, 1, 0, 0, 0, 65, 65,128, 2,128,224, 0, 0,129,197, 3,192,193,198, + 1, 0, 2, 0, 0, 1, 2, 69, 4,193, 66, 70, 0, 0, 2,128, 6, 0, 2,195, + 0, 1, 3, 69, 6,193,131, 70, 2,128, 2, 92, 0, 0, 65,220,127,252,192,223, + 0, 1, 0,197, 1,193,192,198, 0, 0, 1, 0, 1, 0, 1, 64, 1,128, 64,220, + 0, 2, 0,197, 1, 0, 1, 0, 1, 0, 0,221, 0, 0, 0,222, 0,128, 0, 30, + 0, 0, 0, 9, 4, 0, 0, 0, 6, 68,101,112,116,104, 0, 3, 63,240, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 6,116, 97, 98,108,101, 0, 4, 0, 0, 0, 7, +105,110,115,101,114,116, 0, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, + 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 0, 0, + 0, 5, 71, 82, 65, 89, 0, 4, 0, 0, 0, 23, 80,114,111, 99,101,115,115, 83, +112,108,105,116, 67,111,109,112,111,110,101,110,116,115, 0, 4, 0, 0, 0, 7, +117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 1, 35, 0, + 0, 1, 35, 0, 0, 1, 36, 0, 0, 1, 37, 0, 0, 1, 37, 0, 0, 1, 37, 0, + 0, 1, 37, 0, 0, 1, 38, 0, 0, 1, 38, 0, 0, 1, 38, 0, 0, 1, 38, 0, + 0, 1, 38, 0, 0, 1, 38, 0, 0, 1, 38, 0, 0, 1, 38, 0, 0, 1, 38, 0, + 0, 1, 38, 0, 0, 1, 38, 0, 0, 1, 37, 0, 0, 1, 40, 0, 0, 1, 40, 0, + 0, 1, 40, 0, 0, 1, 40, 0, 0, 1, 40, 0, 0, 1, 41, 0, 0, 1, 41, 0, + 0, 1, 41, 0, 0, 1, 41, 0, 0, 1, 42, 0, 0, 0, 7, 0, 0, 0, 10,115, +114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, + 6,100,101,112,116,104, 0, 0, 0, 0, 2, 0, 0, 0, 28, 0, 0, 0, 11,100, +115,116, 95,105,109, 97,103,101,115, 0, 0, 0, 0, 3, 0, 0, 0, 28, 0, 0, + 0, 12, 40,102,111,114, 32,105,110,100,101,120, 41, 0, 0, 0, 0, 6, 0, 0, + 0, 19, 0, 0, 0, 12, 40,102,111,114, 32,108,105,109,105,116, 41, 0, 0, 0, + 0, 6, 0, 0, 0, 19, 0, 0, 0, 11, 40,102,111,114, 32,115,116,101,112, 41, + 0, 0, 0, 0, 6, 0, 0, 0, 19, 0, 0, 0, 2,105, 0, 0, 0, 0, 7, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 44, 0, 0, 1, 48, 0, + 1, 0, 6, 0, 0, 0, 14, 0, 0, 0, 69, 0,192, 64, 70, 0, 64,128,134, 2, + 0, 0,195, 0, 0, 1, 69, 2,192,193, 70, 2,128,128, 92, 0, 0, 0,133, 1, + 65, 0,134, 0, 0, 0,192, 0,128, 1, 0, 1,128, 64,156, 1, 0, 0, 94, 0, +128, 0, 30, 0, 0, 0, 5, 4, 0, 0, 0, 3,105,109, 0, 4, 0, 0, 0, 17, + 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 3, 63,240, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 82, 71, 66, 0, 4, 0, 0, 0, 23, + 80,114,111, 99,101,115,115, 77,101,114,103,101, 67,111,109,112,111,110,101,110, +116,115, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 1, 45, 0, 0, 1, 45, 0, + 0, 1, 45, 0, 0, 1, 45, 0, 0, 1, 45, 0, 0, 1, 45, 0, 0, 1, 45, 0, + 0, 1, 46, 0, 0, 1, 46, 0, 0, 1, 46, 0, 0, 1, 46, 0, 0, 1, 46, 0, + 0, 1, 47, 0, 0, 1, 48, 0, 0, 0, 2, 0, 0, 0, 15,115,114, 99, 95,105, +109, 97,103,101, 95,108,105,115,116, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, + 0, 10,100,115,116, 95,105,109, 97,103,101, 0, 0, 0, 0, 7, 0, 0, 0, 13, + 0, 0, 0, 0, 0, 0, 1,144, 0, 0, 0, 25, 0, 0, 0, 50, 0, 0, 0, 73, + 0, 0, 0, 97, 0, 0, 0,122, 0, 0, 0,130, 0, 0, 0,132, 0, 0, 0,132, + 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,133, + 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, + 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,136, 0, 0, 0,136, + 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, + 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,137, 0, 0, 0,137, 0, 0, 0,137, + 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,138, + 0, 0, 0,138, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, + 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,141, 0, 0, 0,144, + 0, 0, 0,141, 0, 0, 0,146, 0, 0, 0,149, 0, 0, 0,146, 0, 0, 0,151, + 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,152, 0, 0, 0,151, 0, 0, 0,154, + 0, 0, 0,160, 0, 0, 0,154, 0, 0, 0,162, 0, 0, 0,162, 0, 0, 0,162, + 0, 0, 0,164, 0, 0, 0,170, 0, 0, 0,164, 0, 0, 0,172, 0, 0, 0,176, + 0, 0, 0,172, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,179, + 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,180, + 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,181, 0, 0, 0,181, 0, 0, 0,181, + 0, 0, 0,182, 0, 0, 0,182, 0, 0, 0,182, 0, 0, 0,183, 0, 0, 0,183, + 0, 0, 0,183, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,185, + 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, + 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0,188, 0, 0, 0,188, + 0, 0, 0,188, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,190, + 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,191, 0, 0, 0,191, 0, 0, 0,191, + 0, 0, 0,192, 0, 0, 0,192, 0, 0, 0,192, 0, 0, 0,193, 0, 0, 0,193, + 0, 0, 0,193, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,195, + 0, 0, 0,195, 0, 0, 0,195, 0, 0, 0,196, 0, 0, 0,196, 0, 0, 0,196, + 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,198, 0, 0, 0,198, + 0, 0, 0,198, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,200, + 0, 0, 0,200, 0, 0, 0,200, 0, 0, 0,201, 0, 0, 0,201, 0, 0, 0,201, + 0, 0, 0,202, 0, 0, 0,202, 0, 0, 0,202, 0, 0, 0,203, 0, 0, 0,203, + 0, 0, 0,203, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,205, + 0, 0, 0,205, 0, 0, 0,205, 0, 0, 0,206, 0, 0, 0,206, 0, 0, 0,206, + 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,208, 0, 0, 0,208, + 0, 0, 0,208, 0, 0, 0,209, 0, 0, 0,209, 0, 0, 0,209, 0, 0, 0,210, + 0, 0, 0,210, 0, 0, 0,210, 0, 0, 0,211, 0, 0, 0,211, 0, 0, 0,211, + 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, + 0, 0, 0,214, 0, 0, 0,227, 0, 0, 0,214, 0, 0, 0,235, 0, 0, 0,237, + 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,238, + 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,239, + 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,240, 0, 0, 0,240, 0, 0, 0,240, + 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0,242, 0, 0, 0,242, + 0, 0, 0,242, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,244, + 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, + 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,247, 0, 0, 0,247, + 0, 0, 0,247, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0,250, + 0, 0, 0,254, 0, 0, 0,250, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 1, 2, + 0, 0, 1, 2, 0, 0, 1, 3, 0, 0, 1, 3, 0, 0, 1, 3, 0, 0, 1, 3, + 0, 0, 1, 3, 0, 0, 1, 3, 0, 0, 1, 5, 0, 0, 1, 9, 0, 0, 1, 5, + 0, 0, 1, 11, 0, 0, 1, 15, 0, 0, 1, 11, 0, 0, 1, 17, 0, 0, 1, 17, + 0, 0, 1, 17, 0, 0, 1, 18, 0, 0, 1, 18, 0, 0, 1, 18, 0, 0, 1, 19, + 0, 0, 1, 19, 0, 0, 1, 19, 0, 0, 1, 19, 0, 0, 1, 19, 0, 0, 1, 19, + 0, 0, 1, 19, 0, 0, 1, 20, 0, 0, 1, 20, 0, 0, 1, 20, 0, 0, 1, 21, + 0, 0, 1, 21, 0, 0, 1, 21, 0, 0, 1, 22, 0, 0, 1, 22, 0, 0, 1, 22, + 0, 0, 1, 24, 0, 0, 1, 29, 0, 0, 1, 24, 0, 0, 1, 31, 0, 0, 1, 31, + 0, 0, 1, 31, 0, 0, 1, 31, 0, 0, 1, 31, 0, 0, 1, 31, 0, 0, 1, 31, + 0, 0, 1, 31, 0, 0, 1, 32, 0, 0, 1, 32, 0, 0, 1, 32, 0, 0, 1, 32, + 0, 0, 1, 32, 0, 0, 1, 32, 0, 0, 1, 32, 0, 0, 1, 32, 0, 0, 1, 34, + 0, 0, 1, 42, 0, 0, 1, 34, 0, 0, 1, 44, 0, 0, 1, 48, 0, 0, 1, 44, + 0, 0, 1, 50, 0, 0, 1, 50, 0, 0, 1, 50, 0, 0, 1, 50, 0, 0, 1, 50, + 0, 0, 1, 50, 0, 0, 1, 51, 0, 0, 1, 51, 0, 0, 1, 51, 0, 0, 1, 52, + 0, 0, 1, 52, 0, 0, 1, 52, 0, 0, 1, 53, 0, 0, 1, 53, 0, 0, 1, 53, + 0, 0, 1, 54, 0, 0, 1, 54, 0, 0, 1, 54, 0, 0, 1, 55, 0, 0, 1, 55, + 0, 0, 1, 55, 0, 0, 1, 56, 0, 0, 1, 56, 0, 0, 1, 56, 0, 0, 1, 57, + 0, 0, 1, 57, 0, 0, 1, 57, 0, 0, 1, 57, 0, 0, 1, 57, 0, 0, 1, 57, + 0, 0, 1, 58, 0, 0, 1, 58, 0, 0, 1, 58, 0, 0, 1, 58, 0, 0, 1, 58, + 0, 0, 1, 58, 0, 0, 1, 59, 0, 0, 1, 59, 0, 0, 1, 59, 0, 0, 1, 60, + 0, 0, 1, 60, 0, 0, 1, 60, 0, 0, 1, 60, 0, 0, 1, 60, 0, 0, 1, 60, + 0, 0, 1, 60, 0, 0, 1, 61, 0, 0, 1, 61, 0, 0, 1, 61, 0, 0, 1, 61, + 0, 0, 1, 61, 0, 0, 1, 61, 0, 0, 1, 61, 0, 0, 1, 62, 0, 0, 1, 62, + 0, 0, 1, 62, 0, 0, 1, 62, 0, 0, 1, 62, 0, 0, 1, 62, 0, 0, 1, 62, + 0, 0, 1, 63, 0, 0, 1, 63, 0, 0, 1, 63, 0, 0, 1, 64, 0, 0, 1, 64, + 0, 0, 1, 64, 0, 0, 1, 64, 0, 0, 1, 64, 0, 0, 1, 64, 0, 0, 1, 64, + 0, 0, 1, 65, 0, 0, 1, 65, 0, 0, 1, 65, 0, 0, 1, 65, 0, 0, 1, 65, + 0, 0, 1, 65, 0, 0, 1, 65, 0, 0, 1, 66, 0, 0, 1, 66, 0, 0, 1, 66, + 0, 0, 1, 67, 0, 0, 1, 67, 0, 0, 1, 67, 0, 0, 1, 68, 0, 0, 1, 68, + 0, 0, 1, 68, 0, 0, 1, 69, 0, 0, 1, 69, 0, 0, 1, 69, 0, 0, 1, 69, + 0, 0, 1, 69, 0, 0, 1, 69, 0, 0, 1, 69, 0, 0, 1, 70, 0, 0, 1, 70, + 0, 0, 1, 70, 0, 0, 1, 70, 0, 0, 1, 70, 0, 0, 1, 70, 0, 0, 1, 70, + 0, 0, 1, 71, 0, 0, 1, 71, 0, 0, 1, 71, 0, 0, 1, 72, 0, 0, 1, 72, + 0, 0, 1, 72, 0, 0, 1, 72, 0, 0, 0, 7, 0, 0, 0, 17, 79,110,101, 83, +111,117,114, 99,101, 79,110,101, 68,101,115,116, 0, 0, 0, 0, 1, 0, 0, 1, +143, 0, 0, 0, 18, 84,119,111, 83,111,117,114, 99,101,115, 79,110,101, 68,101, +115,116, 0, 0, 0, 0, 2, 0, 0, 1,143, 0, 0, 0, 20, 84,104,114,101,101, + 83,111,117,114, 99,101,115, 79,110,101, 68,101,115,116, 0, 0, 0, 0, 3, 0, + 0, 1,143, 0, 0, 0, 18, 79,110,101, 83,111,117,114, 99,101, 84,119,111, 68, +101,115,116,115, 0, 0, 0, 0, 4, 0, 0, 1,143, 0, 0, 0, 20, 79,110,101, + 83,111,117,114, 99,101, 84,104,114,101,101, 68,101,115,116,115, 0, 0, 0, 0, + 5, 0, 0, 1,143, 0, 0, 0, 13,104,111,117,103,104, 95,104,101,105,103,104, +116, 0, 0, 0, 0, 6, 0, 0, 1,143, 0, 0, 0, 13,105,110,116, 95,100, 97, +116, 97,116,121,112,101, 0, 0, 0, 0,182, 0, 0, 1,143, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua_process51/im_process_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_process_be64.loh b/im/src/lua5/loh/im_process_be64.loh new file mode 100644 index 0000000..ee881bb --- /dev/null +++ b/im/src/lua5/loh/im_process_be64.loh @@ -0,0 +1,897 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua_process51/im_process_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua_process51/im_process_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 21, 0, 0, 0, 0, 0, 0, 0, + 64,108,117, 97, 53, 47,105,109, 95,112,114,111, 99,101,115,115, 46,108,117, 97, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 13,144, 1, 0, 0, 36, 0, 0, + 0,100, 64, 0, 0,164,128, 0, 0,228,192, 0, 0, 36, 1, 1, 0,100, 65, 1, + 0,128, 1, 0, 0,193, 1, 0, 0, 3, 2, 0, 5,197, 66, 0, 0,198,130,192, + 5,156, 65, 0, 3,128, 1, 0, 0,193,193, 0, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 1, 1, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 1, 0,156, 65, 0, + 1,128, 1, 0, 0,193,129, 1, 0, 1,194, 1, 0, 64, 2,128, 2,133, 66, 0, + 0,134, 2, 66, 5,197, 66, 0, 0,198, 66,194, 5,156, 65, 0, 3,128, 1, 0, + 0,193,129, 2, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 2, 0, 3, 2, 0, + 5,197, 66, 0, 0,198, 2,195, 5,156, 65, 0, 3,128, 1, 0, 0,193, 65, 3, + 0, 3, 2,128, 4,133, 66, 0, 0,134,130, 67, 5,195, 2,128, 5,156, 65, 0, + 3,133, 65, 0, 0,228,129, 1, 0,137,193,129,135,133, 65, 0, 0,228,193, 1, + 0,137,193, 1,136,128, 1, 0, 0,193, 65, 4, 0, 36, 2, 2, 0,100, 66, 2, + 0,156, 65, 0, 2,133, 65, 0, 0,228,129, 2, 0,137,193, 1,137,128, 1,128, + 0,193,193, 4, 0,156, 65, 0, 1,133, 65, 0, 0,228,193, 2, 0,137,193, 1, +138,133, 65, 0, 0,228, 1, 3, 0,137,193,129,138,128, 1, 0, 0,193,129, 5, + 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 5, 0, 36, 66, 3, 0,100,130, 3, + 0,156, 65, 0, 2,128, 1, 0, 0,193, 1, 6, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 65, 6, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 6, 0,156, 65, 0, + 1,128, 1, 0, 0,193,193, 6, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 7, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 7, 0,156, 65, 0, 1,128, 1, 0, + 0,193,129, 7, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 7, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 1, 8, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 8, + 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 8, 0,156, 65, 0, 1,128, 1, 0, + 0,193,193, 8, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 9, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 65, 9, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 9, + 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 9, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 1, 10, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 10, 0,156, 65, 0, + 1,128, 1, 0, 0,193,129, 10, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 10, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 11, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 65, 11, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 11, 0,156, 65, 0, + 1,128, 1, 0, 0,193,193, 11, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 12, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 12, 0,156, 65, 0, 1,128, 1, 0, + 0,193,129, 12, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 12, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 1, 13, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 13, + 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 13, 0,156, 65, 0, 1,128, 1, 0, + 0,193,193, 13, 0,156, 65, 0, 1,128, 1,128, 1,193, 1, 14, 0, 3, 2, 0, + 4,100,194, 3, 0,156, 65, 0, 2,133, 65, 0, 0,228, 1, 4, 0,137,193,129, +156,164, 65, 4, 0,192, 1, 0, 0, 1,130, 14, 0, 67, 2,128, 5, 0, 3, 0, + 3,220, 65, 0, 3,192, 1, 0, 0, 1,194, 14, 0, 67, 2,128, 5, 0, 3, 0, + 3,220, 65, 0, 3,192, 1, 0, 0, 1, 2, 15, 0,220, 65, 0, 1,192, 1, 0, + 0, 1, 66, 15, 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 15, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,194, 15, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 16, + 0,220, 65, 0, 1,192, 1, 0, 0, 1, 66, 16, 0,220, 65, 0, 1,192, 1,128, + 0, 1,130, 16, 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 16, 0,220, 65, 0, + 1,192, 1, 0, 0, 1, 2, 17, 0,220, 65, 0, 1,192, 1,128, 0, 1, 66, 17, + 0,220, 65, 0, 1,197, 65, 0, 0, 36,130, 4, 0,201, 1, 2,163,192, 1,128, + 0, 1,194, 17, 0,220, 65, 0, 1,192, 1, 0, 1, 1, 2, 18, 0,220, 65, 0, + 1,192, 1,128, 1, 1, 66, 18, 0,220, 65, 0, 1,192, 1,128, 0, 1,130, 18, + 0, 67, 2,128, 5, 5, 67, 0, 0, 6,195, 82, 6,220, 65, 0, 3,197, 65, 0, + 0, 36,194, 4, 0,201, 1, 2,166,197, 65, 0, 0, 36, 2, 5, 0,201, 1,130, +166,192, 1,128, 0, 1,130, 19, 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 19, + 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 20, 0, 67, 2, 0, 5,197, 66, 0, + 0,198, 66,212, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1,130, 20, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 20, 0,220, 65, 0, 1,192, 1, 0, + 0, 1, 2, 21, 0,220, 65, 0, 1,197, 65, 0, 0, 36, 66, 5, 0,201, 1,130, +170,192, 1, 0, 2, 1,130, 21, 0, 67, 2, 0, 5,197, 66, 0, 0,198, 2,194, + 5, 5, 67, 0, 0, 6, 3, 67, 6,220, 65, 0, 3,192, 1, 0, 1, 1,194, 21, + 0, 67, 2, 0, 5,197, 66, 0, 0,198, 2,214, 5, 5, 67, 0, 0, 6, 67, 86, + 6,220, 65, 0, 3,197, 65, 0, 0, 36,130, 5, 0,201, 1, 2,173,197, 65, 0, + 0, 36,194, 5, 0,201, 1,130,173,192, 1, 0, 0, 1, 2, 23, 0, 67, 2,128, + 5, 5, 67, 0, 0, 6, 3, 67, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 23, + 0,220, 65, 0, 1,192, 1,128, 0, 1,130, 23, 0,220, 65, 0, 1,192, 1, 0, + 0, 1,194, 23, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 24, 0,220, 65, 0, + 1,192, 1, 0, 0, 1, 66, 24, 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 24, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 24, 0, 67, 2,128, 5, 5, 67, 0, + 0, 6, 67, 86, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 2, 25, 0, 67, 2,128, + 5, 5, 67, 0, 0, 6, 67, 86, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 25, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 25, 0, 67, 2, 0, 5,197, 66, 0, + 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1,194, 25, + 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, + 3,192, 1, 0, 0, 1, 2, 26, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, + 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1,128, 0, 1, 66, 26, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,130, 26, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, + 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1,194, 26, 0, 67, 2, 0, + 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, + 0, 1, 2, 27, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 66, 27, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,130, 27, 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 27, + 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, + 3,192, 1, 0, 0, 1, 2, 28, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, + 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 28, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,130, 28, 0,220, 65, 0, 1, 30, 0,128, 0,115, 0, 0, + 0, 4, 19, 0, 0, 0, 0, 0, 0, 0, 65,110, 97,108,121,122,101, 70,105,110, +100, 82,101,103,105,111,110,115, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 85, 83, 72, 79, 82, 84, 0, 4, 21, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 80,101,114,105,109,101,116, +101,114, 76,105,110,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 82,101,109,111,118,101, 66,121, 65,114,101, 97, 0, 4, 17, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 70,105,108,108, 72,111,108,101, +115, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 72,111, +117,103,104, 76,105,110,101,115, 0, 3, 0, 0, 0, 0, 0,128,102, 64, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 71, 82, 65, 89, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 73, 78, 84, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 72,111,117,103,104, 76,105,110,101,115, 68,114, 97,119, 0, 4, 25, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 68,105,115,116, 97,110, 99,101, + 84,114, 97,110,115,102,111,114,109, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 70, + 76, 79, 65, 84, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 82,101,103,105,111,110, 97,108, 77, 97,120,105,109,117,109, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 66, 73, 78, 65, 82, 89, 0, 4, 17, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 82,101,100,117, 99,101, 78,101,119, 0, 4, + 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101,115,105,122, +101, 78,101,119, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 82,101,100,117, 99,101, 66,121, 52, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 67,114,111,112, 78,101,119, 0, 4, 14, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73,110,115,101,114,116, 0, 4, 21, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 65,100,100, 77, 97,114, +103,105,110,115, 78,101,119, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 82,111,116, 97,116,101, 78,101,119, 0, 4, 17, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 82,111,116, 97,116,101, 82,101,102, 0, + 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,111,116, 97, +116,101, 57, 48, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 82,111,116, 97,116,101, 49, 56, 48, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 77,105,114,114,111,114, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 70,108,105,112, 0, 4, 14, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,100,105, 97,108, 0, 4, 25, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111, +114,112,104, 67,111,110,118,111,108,118,101, 0, 4, 22, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 69,114,111, +100,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71, +114, 97,121, 77,111,114,112,104, 68,105,108, 97,116,101, 0, 4, 21, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, + 79,112,101,110, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 71,114, 97,121, 77,111,114,112,104, 67,108,111,115,101, 0, 4, 23, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112, +104, 84,111,112, 72, 97,116, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 87,101,108,108, 0, 4, 25, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111, +114,112,104, 71,114, 97,100,105,101,110,116, 0, 4, 24, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 67,111,110,118, +111,108,118,101, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 66,105,110, 77,111,114,112,104, 69,114,111,100,101, 0, 4, 22, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 68, +105,108, 97,116,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 66,105,110, 77,111,114,112,104, 79,112,101,110, 0, 4, 21, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 67, +108,111,115,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 66,105,110, 77,111,114,112,104, 79,117,116,108,105,110,101, 0, 4, 20, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112, +104, 84,104,105,110, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 77,101,100,105, 97,110, 67,111,110,118,111,108,118,101, 0, 4, 21, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,103,101, 67,111, +110,118,111,108,118,101, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 82, 97,110,107, 67,108,111,115,101,115,116, 67,111,110,118,111,108, +118,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, + 97,110,107, 77, 97,120, 67,111,110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,107, 77,105,110, 67,111, +110,118,111,108,118,101, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 67,111,110,118,111,108,118,101, 0, 4, 19, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 67,111,110,118,111,108,118,101, 83,101,112, 0, + 4, 19, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 67,111,110,118, +111,108,118,101, 82,101,112, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 67,111,110,118,111,108,118,101, 68,117, 97,108, 0, 4, 23, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 67,111,109,112, 97,115,115, + 67,111,110,118,111,108,118,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 77,101, 97,110, 67,111,110,118,111,108,118,101, 0, 4, 24, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71, 97,117,115,115,105, + 97,110, 67,111,110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 66, 97,114,108,101,116,116, 67,111,110,118,111,108, +118,101, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73, +110,116,101,114,108, 97, 99,101, 83,112,108,105,116, 0, 4, 25, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 73,110,116,101,114,108, 97, 99,101, 83, +112,108,105,116, 78,101,119, 0, 4, 30, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 68,105,102,102, 79,102, 71, 97,117,115,115,105, 97,110, 67,111, +110,118,111,108,118,101, 0, 4, 29, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 76, 97,112, 79,102, 71, 97,117,115,115,105, 97,110, 67,111,110,118, +111,108,118,101, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 83,111, 98,101,108, 67,111,110,118,111,108,118,101, 0, 4, 26, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,110,101, 69,100,103, +101, 67,111,110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 80,114,101,119,105,116,116, 67,111,110,118,111,108,118, +101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 90,101, +114,111, 67,114,111,115,115,105,110,103, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 67, 97,110,110,121, 0, 4, 22, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 85,110, 65,114,105,116,104,109,101,116,105, + 99, 79,112, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 65,114,105,116,104,109,101,116,105, 99, 79,112, 0, 4, 15, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 85,110,115,104, 97,114,112, 0, 4, 13, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,104, 97,114,112, 0, 4, + 19, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,104, 97,114,112, + 75,101,114,110,101,108, 0, 4, 28, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 65,114,105,116,104,109,101,116,105, 99, 67,111,110,115,116, 79,112, + 78,101,119, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 66,108,101,110,100, 67,111,110,115,116, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 66,108,101,110,100, 0, 4, 20, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111,109,112,108,101, +120, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77,101, +114,103,101, 67,111,109,112,108,101,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, + 67, 70, 76, 79, 65, 84, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 77,117,108,116,105,112,108,101, 77,101, 97,110, 78,101,119, 0, 4, + 25, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77,117,108,116,105, +112,108,101, 83,116,100, 68,101,118, 78,101,119, 0, 4, 22, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 65,117,116,111, 67,111,118, 97,114,105, 97, +110, 99,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 77,117,108,116,105,112,108,121, 67,111,110,106, 0, 4, 26, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 81,117, 97,110,116,105,122,101, 82, 71, 66, + 85,110,105,102,111,114,109, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 77, 65, 80, + 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 81,117, 97, +110,116,105,122,101, 71,114, 97,121, 85,110,105,102,111,114,109, 0, 4, 23, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 69,120,112, 97,110,100, 72, +105,115,116,111,103,114, 97,109, 0, 4, 25, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 69,113,117, 97,108,105,122,101, 72,105,115,116,111,103,114, + 97,109, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83, +112,108,105,116, 89, 67,104,114,111,109, 97, 78,101,119, 0, 4, 16, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 72, 83, 73, 0, + 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77,101,114,103, +101, 72, 83, 73, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 82, 71, 66, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 66, 89, 84, 69, 0, 4, 26, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111,109,112,111,110,101, +110,116,115, 78,101,119, 0, 4, 26, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 77,101,114,103,101, 67,111,109,112,111,110,101,110,116,115, 78,101, +119, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 78,111, +114,109, 97,108,105,122,101, 67,111,109,112,111,110,101,110,116,115, 0, 4, 20, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101,112,108, 97, 99, +101, 67,111,108,111,114, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 66,105,116,119,105,115,101, 79,112, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 66,105,116,119,105,115,101, 78,111,116, 0, + 4, 15, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,116, 77, + 97,115,107, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 66,105,116, 80,108, 97,110,101, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 84,111,110,101, 71, 97,109,117,116, 0, 4, 19, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 85,110, 78,111,114,109, 97,108,105, +122,101, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 68, +105,114,101, 99,116, 67,111,110,118, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 78,101,103, 97,116,105,118,101, 0, 4, 30, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,103,101, 67,111,110,116, +114, 97,115,116, 84,104,114,101,115,104,111,108,100, 0, 4, 25, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 76,111, 99, 97,108, 77, 97,120, 84,104, +114,101,115,104,111,108,100, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 84,104,114,101,115,104,111,108,100, 0, 4, 23, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 84,104,114,101,115,104,111,108,100, 66, +121, 68,105,102,102, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 72,121,115,116,101,114,101,115,105,115, 84,104,114,101,115,104,111,108, +100, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 85,110, +105,102,111,114,109, 69,114,114, 84,104,114,101,115,104,111,108,100, 0, 4, 28, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 68,105,102,117,115,105, +111,110, 69,114,114, 84,104,114,101,115,104,111,108,100, 0, 4, 24, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 80,101,114, 99,101,110,116, 84,104, +114,101,115,104,111,108,100, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 79,116,115,117, 84,104,114,101,115,104,111,108,100, 0, 4, 23, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77,105,110, 77, 97,120, + 84,104,114,101,115,104,111,108,100, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 83,108,105, 99,101, 84,104,114,101,115,104,111,108,100, + 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 80,105,120, +101,108, 97,116,101, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 80,111,115,116,101,114,105,122,101, 0, 24, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 25, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, + 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1, +133, 1, 0, 0,192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, + 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2, +137, 1,130, 3, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, + 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, + 4, 4, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 5, 1, 7, 8, 23, 0, 0, + 0,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, + 0,132, 1, 0, 1,196, 1,128, 1,156,128, 0, 3,196, 0, 0, 2, 0, 1, 0, + 0, 64, 1, 0, 1,133,129, 0, 0,192, 1,128, 0,156, 1, 0, 1,220,128, 0, + 0,218, 0, 0, 0, 22,192, 0,128, 0, 1,128, 1, 64, 1, 0, 1, 30, 1,128, + 1, 22, 0, 0,128,158, 0, 0, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, + 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, + 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 23, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 22, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 8, + 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 15, + 0, 0, 0, 22, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119, +105,100,116,104, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, + 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, + 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 17, 0, 0, 0, 9, 0, 0, 0, 9, + 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, + 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, + 97,109,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, +119,105,100,116,104, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, + 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121, +112,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102, +117,110, 99, 0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 31, 0, 0, 0, 50, 0, 0, 0, 0, 5, 0, 11, 22, 0, 0, 0, + 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2, 5,130, 0, 0, + 6,194, 64, 4, 65, 2, 1, 0,128, 2, 0, 0, 28, 2,128, 1,156, 65, 0, 0, +133, 1, 0, 0,192, 1, 0, 0, 1, 66, 1, 0,213, 1,130, 3, 36, 2, 0, 0, + 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2, +137, 1,130, 3, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, + 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,102,111,114,109, 97,116, 0, 4, 24, 0, 0, 0, 0, 0, 0, + 0,117,110,100,101,102,105,110,101,100, 32,102,117,110, 99,116,105,111,110, 32, + 96, 37,115, 39, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 49, 0, 0, 0, 5, 2, + 7, 10, 24, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 68, 1, + 0, 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, 3, 4, 1, + 0, 2, 64, 1, 0, 0,128, 1,128, 0,192, 1,128, 1, 5,130, 0, 0, 64, 2, + 0, 1, 28, 2, 0, 1, 28,129, 0, 0, 26, 1, 0, 0, 22,192, 0,128, 64, 1, + 0, 2,128, 1,128, 1, 94, 1,128, 1, 22, 0, 0,128,222, 0, 0, 1, 30, 0, +128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, + 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97, +115,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, + 0, 0, 0, 0, 24, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, + 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, + 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 47, 0, 0, 0, + 49, 0, 0, 0, 5, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95, +105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 23, 0, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, + 8, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, + 16, 0, 0, 0, 23, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, +119,105,100,116,104, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, + 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, + 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, + 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 22, 0, 0, 0, 32, 0, 0, 0, + 32, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 38, 0, 0, 0, + 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, + 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, + 50, 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, +110, 97,109,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0,119,105,100,116,104, 0, 0, 0, 0, 0, 21, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 21, 0, 0, 0, 12, 0, + 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, + 0, 0, 21, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116, +121,112,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99, 0, 2, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 56, 0, 0, 0, 73, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, + 0, 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, + 1,133, 1, 0, 0,192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, + 0, 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, + 2,137, 1,130, 3, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101,114,116, + 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 61, 0, 0, 0, 72, 0, 0, 0, 5, 3, 7, 12, 25, 0, + 0, 0, 5, 1, 0, 0, 6, 65, 64, 2, 64, 1, 0, 0,132, 1, 0, 0,196, 1, +128, 0, 4, 2, 0, 1, 68, 2,128, 1, 28,129, 0, 3, 68, 1, 0, 2,128, 1, + 0, 0,192, 1,128, 0, 0, 2, 0, 1, 64, 2, 0, 2,133,130, 0, 0,192, 2, +128, 1,156, 2, 0, 1, 92,129, 0, 0, 90, 1, 0, 0, 22,192, 0,128,128, 1, +128, 2,192, 1, 0, 2,158, 1,128, 1, 22, 0, 0,128, 30, 1, 0, 1, 30, 0, +128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, + 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97, +115,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, + 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, + 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, + 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, + 67, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, + 70, 0, 0, 0, 72, 0, 0, 0, 6, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, +115,114, 99, 95,105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 24, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, + 0, 0, 24, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, + 97,103,101, 51, 0, 0, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 24, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, + 0,100,115,116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, 24, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 17, 0, 0, 0, 24, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, 0, 0, 0, 0, +100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117, +110, 99, 0, 17, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, 58, 0, 0, 0, 58, + 0, 0, 0, 58, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, + 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, + 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 6, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108, +111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, + 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, + 97, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2, +133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0,192, 1, 0, 0, + 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, + 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, + 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, + 0, 96, 0, 0, 0, 5, 1, 7, 10, 35, 0, 0, 0,133, 0, 0, 0,134, 64, 64, + 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, 0,132, 1, 0, 1,196, 1,128, + 1,156,128, 0, 3,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 68, 1, 0, + 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, 3, 4, 1, 0, + 2, 64, 1, 0, 0,128, 1, 0, 1,192, 1,128, 1, 5,130, 0, 0, 64, 2,128, + 0, 28, 2, 0, 1, 28,129, 0, 0, 26, 1, 0, 0, 22, 0, 1,128, 64, 1, 0, + 2,128, 1, 0, 1,192, 1,128, 1, 94, 1, 0, 2, 22,128, 0,128, 64, 1, 0, + 1,128, 1,128, 1, 94, 1,128, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, + 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, + 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 35, 0, 0, 0, 86, + 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, + 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, + 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, + 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, + 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 91, 0, 0, 0, 91, + 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, + 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 96, 0, 0, 0, 5, + 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, + 0, 0, 0, 0, 0, 34, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, + 0, 0, 0, 0, 0, 34, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, + 95,105,109, 97,103,101, 49, 0, 8, 0, 0, 0, 34, 0, 0, 0, 11, 0, 0, 0, + 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 50, 0, 16, 0, 0, 0, 34, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 24, 0, 0, 0, 34, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, + 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, + 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, + 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, + 0, 0,102,117,110, 99, 0, 17, 0, 0, 0, 80, 0, 0, 0, 80, 0, 0, 0, 81, + 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, + 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 97, 0, 0, 0, 6, + 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116, +104, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101, +105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, + 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, + 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +103, 0, 0, 0,122, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, + 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0, +192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, + 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, + 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, + 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,108, 0, 0, 0,121, 0, 0, 0, 5, 1, 7, 12, 46, 0, 0, 0,133, 0, 0, + 0,134, 64, 64, 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, 0,132, 1, 0, + 1,196, 1,128, 1,156,128, 0, 3,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, + 0, 68, 1, 0, 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, + 3, 5, 1, 0, 0, 6, 65, 64, 2, 64, 1, 0, 0,132, 1, 0, 0,196, 1,128, + 0, 4, 2, 0, 1, 68, 2,128, 1, 28,129, 0, 3, 68, 1, 0, 2,128, 1, 0, + 0,192, 1, 0, 1, 0, 2,128, 1, 64, 2, 0, 2,133,130, 0, 0,192, 2,128, + 0,156, 2, 0, 1, 92,129, 0, 0, 90, 1, 0, 0, 22, 64, 1,128,128, 1,128, + 2,192, 1, 0, 1, 0, 2,128, 1, 64, 2, 0, 2,158, 1,128, 2, 22,192, 0, +128,128, 1, 0, 1,192, 1,128, 1, 0, 2, 0, 2,158, 1, 0, 2, 30, 0,128, + 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, + 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115, +101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 46, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, + 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,111, + 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, + 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, + 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, + 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, + 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,116, + 0, 0, 0,116, 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, + 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, + 0, 0, 0,119, 0, 0, 0,121, 0, 0, 0, 6, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 45, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 45, 0, 0, + 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 49, 0, + 8, 0, 0, 0, 45, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95, +105,109, 97,103,101, 50, 0, 16, 0, 0, 0, 45, 0, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 51, 0, 24, 0, 0, 0, 45, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 33, 0, 0, 0, 45, 0, + 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, + 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 0, + 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, 0, + 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, 0, + 0,102,117,110, 99, 0, 17, 0, 0, 0,104, 0, 0, 0,104, 0, 0, 0,105, 0, + 0, 0,105, 0, 0, 0,105, 0, 0, 0,108, 0, 0, 0,108, 0, 0, 0,108, 0, + 0, 0,108, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, + 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,122, 0, 0, 0, 6, 0, + 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105, +103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, + 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, + 0, 0, 0,130, 0, 0, 0, 0, 1, 0, 7, 18, 0, 0, 0,100, 0, 0, 0,133, + 0, 0, 0,134, 64, 64, 1,192, 0,128, 0, 11,129, 64, 0, 28, 1, 0, 1,220, +128, 0, 0, 0, 1,128, 0, 75,193, 64, 0, 92, 1, 0, 1, 28,129, 0, 0,204, + 0,129, 1,156,128, 0, 1,143, 0, 65, 1,206,128, 0,130,204, 64,193, 1,222, + 0, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +109, 97,116,104, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,115,113,114,116, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 3, + 0, 0, 0, 0, 0, 0,240, 63, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +127, 0, 0, 0,127, 0, 0, 0, 0, 1, 0, 2, 3, 0, 0, 0, 78, 0, 0, 0, + 94, 0, 0, 1, 30, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, +127, 0, 0, 0,127, 0, 0, 0,127, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 18, 0, + 0, 0,127, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, + 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, + 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,129, 0, + 0, 0,129, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0, 3, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0,115,113,114, 0, 1, 0, 0, 0, 17, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0,114,109, 97,120, 0, 14, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 0, 0, 0,144, 0, 0, + 0, 0, 3, 0, 7, 14, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, + 0, 64, 1,128, 0,128, 1, 0, 1,220,128, 0, 2, 5, 1, 0, 0, 6,129, 64, + 2, 64, 1, 0, 0,128, 1,128, 1, 28,129,128, 1, 64, 1,128, 1, 30, 1,128, + 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, + 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116, +101, 66, 97,115,101,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 82,101,100,117, 99,101, 0, 0, 0, 0, 0, 14, 0, 0, 0,142, 0, + 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, + 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, + 0, 0,143, 0, 0, 0,143, 0, 0, 0,144, 0, 0, 0, 4, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, + 13, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, + 0, 0, 13, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, + 0, 0, 0, 0, 0, 13, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, + 95,105,109, 97,103,101, 0, 6, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,146, 0, 0, 0,149, 0, 0, 0, 0, 3, 0, 7, 14, + 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 64, 1,128, 0,128, + 1, 0, 1,220,128, 0, 2, 5, 1, 0, 0, 6,129, 64, 2, 64, 1, 0, 0,128, + 1,128, 1, 28,129,128, 1, 64, 1,128, 1, 30, 1,128, 1, 30, 0,128, 0, 3, + 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, + 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101,115, +105,122,101, 0, 0, 0, 0, 0, 14, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0, +147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,148, 0, 0, 0, +148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0, +148, 0, 0, 0,149, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, +115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 13, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, 0, 0, 13, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 13, + 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, + 0, 6, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,151, 0, 0, 0,151, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 75, 0, 64, + 0, 92,128, 0, 1, 79, 64,192, 0, 94, 0, 0, 1, 30, 0,128, 0, 2, 0, 0, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 64, 0, 0, 0, 0, 5, 0, 0, 0,151, 0, 0, 0,151, 0, 0, + 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0, 0, + 1, 0, 3, 5, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1, 79, 64,192, 0, 94, + 0, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, + 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, + 5, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0, +152, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103, +101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,154, 0, 0, 0,160, 0, 0, 0, 0, 5, 0, 13, 19, 0, 0, 0, 77, 65, + 0, 1, 76, 1,192, 2,141,193, 0, 2,140, 1, 64, 3,197, 65, 0, 0,198,129, +192, 3, 0, 2, 0, 0, 64, 2,128, 2,128, 2, 0, 3,220,129, 0, 2, 5, 66, + 0, 0, 6,194, 64, 4, 64, 2, 0, 0,128, 2,128, 3,192, 2,128, 0, 0, 3, +128, 1, 28, 66,128, 2,222, 1, 0, 1, 30, 0,128, 0, 4, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, + 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, + 97,115,101,100, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 67,114,111,112, 0, 0, 0, 0, 0, 19, 0, 0, 0,155, 0, 0, 0,155, 0, + 0, 0,156, 0, 0, 0,156, 0, 0, 0,157, 0, 0, 0,157, 0, 0, 0,157, 0, + 0, 0,157, 0, 0, 0,157, 0, 0, 0,157, 0, 0, 0,158, 0, 0, 0,158, 0, + 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, + 0, 0,159, 0, 0, 0,160, 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, 0, 0, 0, + 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0,120,109,105,110, 0, 0, 0, 0, 0, 18, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0,120,109, 97,120, 0, 0, 0, 0, 0, 18, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,121,109,105,110, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,121,109, 97,120, 0, 0, 0, 0, 0, + 18, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 2, 0, + 0, 0, 18, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, + 0, 4, 0, 0, 0, 18, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, + 95,105,109, 97,103,101, 0, 10, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,164, 0, 0, 0,170, 0, 0, 0, 0, 5, 0, 13, 19, + 0, 0, 0, 77, 65, 0, 1, 76, 1,192, 2,141,193, 0, 2,140, 1, 64, 3,197, + 65, 0, 0,198,129,192, 3, 0, 2, 0, 0, 64, 2,128, 2,128, 2, 0, 3,220, +129, 0, 2, 5, 66, 0, 0, 6,194, 64, 4, 64, 2, 0, 0,128, 2,128, 3,192, + 2,128, 0, 0, 3,128, 1, 28, 66,128, 2,222, 1, 0, 1, 30, 0,128, 0, 4, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 3, 0, 0, 0, 0, 0, 0, + 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114, +101, 97,116,101, 66, 97,115,101,100, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 65,100,100, 77, 97,114,103,105,110,115, 0, 0, 0, 0, + 0, 19, 0, 0, 0,165, 0, 0, 0,165, 0, 0, 0,166, 0, 0, 0,166, 0, 0, + 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, + 0,167, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, + 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,169, 0, 0, 0,170, 0, 0, + 0, 8, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97, +103,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,120, +109,105,110, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, +120,109, 97,120, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0,121,109,105,110, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0,121,109, 97,120, 0, 0, 0, 0, 0, 18, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0,119,105,100,116,104, 0, 2, 0, 0, 0, 18, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 4, 0, 0, 0, 18, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 10, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,172, 0, + 0, 0,176, 0, 0, 0, 0, 4, 0, 13, 26, 0, 0, 0, 5, 1, 0, 0, 6, 65, + 64, 2, 75,129, 64, 0, 92,129, 0, 1,139,193, 64, 0,156,129, 0, 1,192, 1, +128, 0, 0, 2, 0, 1, 28,193,128, 2,133, 1, 0, 0,134, 1, 65, 3,192, 1, + 0, 0, 0, 2, 0, 2, 64, 2,128, 2,156,129, 0, 2,197, 1, 0, 0,198, 65, +193, 3, 0, 2, 0, 0, 64, 2, 0, 3,128, 2,128, 0,192, 2, 0, 1, 0, 3, +128, 1,220,129, 0, 3, 0, 2, 0, 3,222, 1,128, 1, 30, 0,128, 0, 6, 0, + 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 22, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 67, 97,108, 99, 82,111,116, 97,116,101, + 83,105,122,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 72,101,105,103,104,116, 0, 4, 17, 0, 0, + 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101, +100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,111, +116, 97,116,101, 0, 0, 0, 0, 0, 26, 0, 0, 0,173, 0, 0, 0,173, 0, 0, + 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, + 0,173, 0, 0, 0,173, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, + 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,175, 0, 0, 0,175, 0, 0, + 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, + 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,176, 0, 0, 0, 7, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, + 0, 0, 0, 25, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,111,115, 48, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,115,105,110, 48, + 0, 0, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,111,114,100, +101,114, 0, 0, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119, +105,100,116,104, 0, 9, 0, 0, 0, 25, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0,104,101,105,103,104,116, 0, 9, 0, 0, 0, 25, 0, 0, 0, 10, 0, 0, 0, + 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 15, 0, 0, 0, 25, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,179, 0, 0, 0,179, 0, + 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 75, 0, 64, 0, 93, 0, 0, 1, 94, 0, + 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 72, +101,105,103,104,116, 0, 0, 0, 0, 0, 4, 0, 0, 0,179, 0, 0, 0,179, 0, + 0, 0,179, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0, 0, 1, 0, 3, + 4, 0, 0, 0, 75, 0, 64, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, + 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, 0, + 0, 0, 0, 4, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, + 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,212, 0, 0, 0,212, 0, 0, 0, 0, 1, 0, 3, 13, 0, 0, 0, 75, 0, 64, + 0, 92,128, 0, 1, 90, 0, 0, 0, 22,192, 0,128, 75, 0, 64, 0, 93, 0, 0, + 1, 94, 0, 0, 0, 22,192, 0,128, 75, 0, 64, 0, 92,128, 0, 1, 79, 64,192, + 0, 94, 0, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, + 0, 0, 13, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, + 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, + 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0, 1, 0, + 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214, 0, 0, 0, +227, 0, 0, 0, 0, 1, 0, 8, 36, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1, + 79, 64,192, 0,133,128, 0, 0,134,192, 64, 1,203, 0, 64, 0,220,128, 0, 1, + 1, 65, 0, 0,156,128,128, 1,154, 0, 0, 0, 22, 0, 0,128, 76, 0,193, 0, +133, 64, 1, 0,134,128, 65, 1,192, 0, 0, 0, 3, 1, 0, 2, 64, 1,128, 0, +156,128, 0, 2,197, 64, 1, 0,198,128,193, 1, 0, 1, 0, 0, 67, 1,128, 2, +139, 1, 64, 0,156,129, 0, 1,143, 65, 64, 3,220,128, 0, 2, 5, 65, 1, 0, + 6,193, 65, 2, 64, 1, 0, 0,128, 1, 0, 1,192, 1,128, 1, 28, 65, 0, 2, + 0, 1, 0, 1, 64, 1,128, 1, 30, 1,128, 1, 30, 0,128, 0, 8, 0, 0, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 64, 4, 5, 0, 0, 0, 0, 0, 0, 0,109, 97,116,104, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0,109,111,100, 0, 3, 0, 0, 0, 0, 0, 0,240, + 63, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, + 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, + 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73,110,116,101,114, +108, 97, 99,101, 83,112,108,105,116, 0, 0, 0, 0, 0, 36, 0, 0, 0,216, 0, + 0, 0,216, 0, 0, 0,216, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, + 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, + 0, 0,218, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, + 0, 0,221, 0, 0, 0,221, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, + 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, + 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, + 0, 0,225, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,227, 0, + 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, + 97,103,101, 0, 0, 0, 0, 0, 35, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, +100,115,116, 95,104,101,105,103,104,116, 49, 0, 3, 0, 0, 0, 35, 0, 0, 0, + 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 49, 0, 18, + 0, 0, 0, 35, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105, +109, 97,103,101, 50, 0, 26, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,229, 0, 0, 0,235, 0, 0, 0, 0, 1, 0, 3, 14, 0, + 0, 0, 75, 0, 64, 0, 92,128, 0, 1,133, 64, 0, 0,134,128, 64, 1, 87,128, +128, 0, 22,192, 0,128,133, 64, 0, 0,134,192, 64, 1, 23,128,128, 0, 22, 64, + 0,128,133, 64, 0, 0, 70, 0, 65, 1, 94, 0, 0, 1, 30, 0,128, 0, 5, 0, + 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 68, 97,116, 97, 84,121,112,101, 0, + 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0, 66, 89, 84, 69, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 85, 83, 72, 79, 82, + 84, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 73, 78, 84, 0, 0, 0, 0, 0, 14, + 0, 0, 0,230, 0, 0, 0,230, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, + 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, + 0, 0, 0,232, 0, 0, 0,232, 0, 0, 0,234, 0, 0, 0,235, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, + 0, 13, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121, +112,101, 0, 2, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,250, 0, 0, 0,254, 0, 0, 0, 0, 3, 0, 9, 13, 0, 0, 0,197, + 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0,220,128, 0, 1, 5, 1, 0, 0, 6, +129, 64, 2, 64, 1, 0, 0,128, 1,128, 0,192, 1,128, 1, 0, 2, 0, 1, 28, + 65,128, 2,222, 0, 0, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103, +101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 25, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 65,114,105,116,104,109,101,116,105, 99, 67, +111,110,115,116, 79,112, 0, 0, 0, 0, 0, 13, 0, 0, 0,251, 0, 0, 0,251, + 0, 0, 0,251, 0, 0, 0,251, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, + 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,253, + 0, 0, 0,254, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115, +114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 12, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0,115,114, 99, 95, 99,111,110,115,116, 0, 0, 0, 0, 0, 12, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,111,112, 0, 0, 0, 0, 0, 12, 0, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, + 4, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 1, 0, 0, 9, 1, 0, 0, 0, 2, 0, 6, 11, 0, 0, 0,133, 0, 0, 0, +134, 64, 64, 1,198,128, 64, 0,156,128, 0, 1,197, 0, 0, 0,198,192,192, 1, + 0, 1, 0, 0, 64, 1, 0, 1,220, 64,128, 1,158, 0, 0, 1, 30, 0,128, 0, + 4, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, + 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101, +100, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 20, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 77,117,108,116,105,112,108,101, 77,101, 97,110, 0, + 0, 0, 0, 0, 11, 0, 0, 0, 6, 1, 0, 0, 6, 1, 0, 0, 6, 1, 0, 0, + 6, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, + 7, 1, 0, 0, 8, 1, 0, 0, 9, 1, 0, 0, 3, 0, 0, 0, 15, 0, 0, 0, + 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 95,108,105,115,116, 0, 0, + 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105, +109, 97,103,101, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, + 0,100,115,116, 95,105,109, 97,103,101, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 1, 0, 0, 15, 1, 0, 0, 0, + 2, 0, 7, 12, 0, 0, 0,133, 0, 0, 0,134, 64, 64, 1,198,128, 64, 0,156, +128, 0, 1,197, 0, 0, 0,198,192,192, 1, 0, 1, 0, 0, 64, 1,128, 0,128, + 1, 0, 1,220, 64, 0, 2,158, 0, 0, 1, 30, 0,128, 0, 4, 0, 0, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, + 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 3, 0, 0, + 0, 0, 0, 0,240, 63, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 77,117,108,116,105,112,108,101, 83,116,100, 68,101,118, 0, 0, 0, 0, + 0, 12, 0, 0, 0, 12, 1, 0, 0, 12, 1, 0, 0, 12, 1, 0, 0, 12, 1, 0, + 0, 13, 1, 0, 0, 13, 1, 0, 0, 13, 1, 0, 0, 13, 1, 0, 0, 13, 1, 0, + 0, 13, 1, 0, 0, 14, 1, 0, 0, 15, 1, 0, 0, 3, 0, 0, 0, 15, 0, 0, + 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 95,108,105,115,116, 0, + 0, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,109,101, 97,110, + 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 11, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 4, 0, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 1, 0, 0, 29, 1, 0, + 0, 0, 1, 0, 8, 28, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,128, 0, 0, + 0,195, 0, 0, 2, 69, 1, 0, 0, 70,129,192, 2,133, 1, 0, 0,134,193, 64, + 3, 92,128, 0, 3,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 3, 1,128, + 2,133, 1, 0, 0,134, 1, 65, 3,197, 1, 0, 0,198,193,192, 3,156,128, 0, + 3,197, 0, 0, 0,198, 64,193, 1, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, + 1,220, 64, 0, 2,192, 0,128, 0, 0, 1, 0, 1,222, 0,128, 1, 30, 0,128, + 0, 6, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, + 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115, +101,100, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 71, 82, 65, 89, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0, 66, 89, 84, 69, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, + 82, 71, 66, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 83,112,108,105,116, 89, 67,104,114,111,109, 97, 0, 0, 0, 0, 0, 28, 0, 0, + 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, + 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 26, 1, 0, + 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, + 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 27, 1, 0, 0, 27, 1, 0, + 0, 27, 1, 0, 0, 27, 1, 0, 0, 27, 1, 0, 0, 27, 1, 0, 0, 28, 1, 0, + 0, 28, 1, 0, 0, 28, 1, 0, 0, 29, 1, 0, 0, 3, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 27, + 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,121, 95,105,109, 97,103,101, 0, 9, + 0, 0, 0, 27, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 99,104,114,111,109, + 97, 95,105,109, 97,103,101, 0, 18, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 34, 1, 0, 0, 42, 1, 0, 0, 0, 1, 0, 14, + 29, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1,138, 0, 0, 0,193, 64, 0, 0, + 0, 1,128, 0, 65, 65, 0, 0,224,128, 2,128,197,129, 0, 0,198,193,192, 3, + 0, 2, 0, 1, 69, 2, 1, 0, 70, 66,193, 4,128, 2, 0, 0,195, 2, 0, 6, + 69, 3, 1, 0, 70,131,193, 6, 92, 2,128, 2,220, 65, 0, 0,223,192,252,127, +197, 0, 1, 0,198,192,193, 1, 0, 1, 0, 0, 64, 1, 0, 1,220, 64,128, 1, +197, 0, 2, 0, 0, 1, 0, 1,221, 0, 0, 1,222, 0, 0, 0, 30, 0,128, 0, + 9, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 68,101,112,116,104, 0, 3, + 0, 0, 0, 0, 0, 0,240, 63, 4, 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98, +108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,105,110,115,101,114,116, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, + 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0, 71, 82, 65, 89, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111,109,112,111,110,101,110, +116,115, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 29, 0, 0, 0, 35, 1, 0, 0, 35, 1, 0, 0, 36, 1, 0, 0, 37, + 1, 0, 0, 37, 1, 0, 0, 37, 1, 0, 0, 37, 1, 0, 0, 38, 1, 0, 0, 38, + 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, + 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 37, + 1, 0, 0, 40, 1, 0, 0, 40, 1, 0, 0, 40, 1, 0, 0, 40, 1, 0, 0, 40, + 1, 0, 0, 41, 1, 0, 0, 41, 1, 0, 0, 41, 1, 0, 0, 41, 1, 0, 0, 42, + 1, 0, 0, 7, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105, +109, 97,103,101, 0, 0, 0, 0, 0, 28, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0,100,101,112,116,104, 0, 2, 0, 0, 0, 28, 0, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0,100,115,116, 95,105,109, 97,103,101,115, 0, 3, 0, 0, 0, 28, 0, + 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,105,110,100,101,120, + 41, 0, 6, 0, 0, 0, 19, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102, +111,114, 32,108,105,109,105,116, 41, 0, 6, 0, 0, 0, 19, 0, 0, 0, 11, 0, + 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, 6, 0, 0, + 0, 19, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 7, 0, 0, 0, 18, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 48, + 1, 0, 0, 0, 1, 0, 6, 14, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,134, +128, 64, 0,195, 0, 0, 2, 69, 1, 0, 0, 70,193,192, 2, 92,128,128, 2,133, + 0, 0, 0,134, 0, 65, 1,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 94, + 0, 0, 1, 30, 0,128, 0, 5, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, +105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, + 97,116,101, 66, 97,115,101,100, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 4, + 0, 0, 0, 0, 0, 0, 0, 82, 71, 66, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 77,101,114,103,101, 67,111,109,112,111,110,101,110, +116,115, 0, 0, 0, 0, 0, 14, 0, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 45, + 1, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 46, + 1, 0, 0, 46, 1, 0, 0, 46, 1, 0, 0, 46, 1, 0, 0, 46, 1, 0, 0, 47, + 1, 0, 0, 48, 1, 0, 0, 2, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0,115, +114, 99, 95,105,109, 97,103,101, 95,108,105,115,116, 0, 0, 0, 0, 0, 13, 0, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, + 7, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0,144, 1, 0, 0, 25, 0, 0, 0, + 50, 0, 0, 0, 73, 0, 0, 0, 97, 0, 0, 0,122, 0, 0, 0,130, 0, 0, 0, +132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0, +132, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,134, 0, 0, 0, +134, 0, 0, 0,134, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0, +136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0, +136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,137, 0, 0, 0, +137, 0, 0, 0,137, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0, +138, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0, +139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0, +141, 0, 0, 0,144, 0, 0, 0,141, 0, 0, 0,146, 0, 0, 0,149, 0, 0, 0, +146, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,152, 0, 0, 0, +151, 0, 0, 0,154, 0, 0, 0,160, 0, 0, 0,154, 0, 0, 0,162, 0, 0, 0, +162, 0, 0, 0,162, 0, 0, 0,164, 0, 0, 0,170, 0, 0, 0,164, 0, 0, 0, +172, 0, 0, 0,176, 0, 0, 0,172, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0, +178, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0, +179, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,181, 0, 0, 0, +181, 0, 0, 0,181, 0, 0, 0,182, 0, 0, 0,182, 0, 0, 0,182, 0, 0, 0, +183, 0, 0, 0,183, 0, 0, 0,183, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0, +184, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0, +186, 0, 0, 0,186, 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0, +188, 0, 0, 0,188, 0, 0, 0,188, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0, +189, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,191, 0, 0, 0, +191, 0, 0, 0,191, 0, 0, 0,192, 0, 0, 0,192, 0, 0, 0,192, 0, 0, 0, +193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0, +194, 0, 0, 0,195, 0, 0, 0,195, 0, 0, 0,195, 0, 0, 0,196, 0, 0, 0, +196, 0, 0, 0,196, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0, +198, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0, +199, 0, 0, 0,200, 0, 0, 0,200, 0, 0, 0,200, 0, 0, 0,201, 0, 0, 0, +201, 0, 0, 0,201, 0, 0, 0,202, 0, 0, 0,202, 0, 0, 0,202, 0, 0, 0, +203, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0, +204, 0, 0, 0,205, 0, 0, 0,205, 0, 0, 0,205, 0, 0, 0,206, 0, 0, 0, +206, 0, 0, 0,206, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0, +208, 0, 0, 0,208, 0, 0, 0,208, 0, 0, 0,209, 0, 0, 0,209, 0, 0, 0, +209, 0, 0, 0,210, 0, 0, 0,210, 0, 0, 0,210, 0, 0, 0,211, 0, 0, 0, +211, 0, 0, 0,211, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0, +212, 0, 0, 0,212, 0, 0, 0,214, 0, 0, 0,227, 0, 0, 0,214, 0, 0, 0, +235, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0, +237, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0, +238, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,240, 0, 0, 0, +240, 0, 0, 0,240, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0, +242, 0, 0, 0,242, 0, 0, 0,242, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0, +243, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,245, 0, 0, 0, +245, 0, 0, 0,245, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0, +247, 0, 0, 0,247, 0, 0, 0,247, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0, +248, 0, 0, 0,250, 0, 0, 0,254, 0, 0, 0,250, 0, 0, 0, 0, 1, 0, 0, + 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, + 2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, + 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 5, 1, 0, 0, + 9, 1, 0, 0, 5, 1, 0, 0, 11, 1, 0, 0, 15, 1, 0, 0, 11, 1, 0, 0, + 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 18, 1, 0, 0, 18, 1, 0, 0, + 18, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, + 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 20, 1, 0, 0, 20, 1, 0, 0, + 20, 1, 0, 0, 21, 1, 0, 0, 21, 1, 0, 0, 21, 1, 0, 0, 22, 1, 0, 0, + 22, 1, 0, 0, 22, 1, 0, 0, 24, 1, 0, 0, 29, 1, 0, 0, 24, 1, 0, 0, + 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, + 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, + 32, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, + 32, 1, 0, 0, 34, 1, 0, 0, 42, 1, 0, 0, 34, 1, 0, 0, 44, 1, 0, 0, + 48, 1, 0, 0, 44, 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, + 50, 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, 51, 1, 0, 0, 51, 1, 0, 0, + 51, 1, 0, 0, 52, 1, 0, 0, 52, 1, 0, 0, 52, 1, 0, 0, 53, 1, 0, 0, + 53, 1, 0, 0, 53, 1, 0, 0, 54, 1, 0, 0, 54, 1, 0, 0, 54, 1, 0, 0, + 55, 1, 0, 0, 55, 1, 0, 0, 55, 1, 0, 0, 56, 1, 0, 0, 56, 1, 0, 0, + 56, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, + 57, 1, 0, 0, 57, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, + 58, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, 59, 1, 0, 0, 59, 1, 0, 0, + 59, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, + 60, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, + 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, + 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, + 62, 1, 0, 0, 62, 1, 0, 0, 63, 1, 0, 0, 63, 1, 0, 0, 63, 1, 0, 0, + 64, 1, 0, 0, 64, 1, 0, 0, 64, 1, 0, 0, 64, 1, 0, 0, 64, 1, 0, 0, + 64, 1, 0, 0, 64, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, + 65, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, 66, 1, 0, 0, + 66, 1, 0, 0, 66, 1, 0, 0, 67, 1, 0, 0, 67, 1, 0, 0, 67, 1, 0, 0, + 68, 1, 0, 0, 68, 1, 0, 0, 68, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, + 69, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, + 70, 1, 0, 0, 70, 1, 0, 0, 70, 1, 0, 0, 70, 1, 0, 0, 70, 1, 0, 0, + 70, 1, 0, 0, 70, 1, 0, 0, 71, 1, 0, 0, 71, 1, 0, 0, 71, 1, 0, 0, + 72, 1, 0, 0, 72, 1, 0, 0, 72, 1, 0, 0, 72, 1, 0, 0, 7, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 79,110,101, 83,111,117,114, 99,101, 79,110,101, + 68,101,115,116, 0, 1, 0, 0, 0,143, 1, 0, 0, 18, 0, 0, 0, 0, 0, 0, + 0, 84,119,111, 83,111,117,114, 99,101,115, 79,110,101, 68,101,115,116, 0, 2, + 0, 0, 0,143, 1, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 84,104,114,101,101, + 83,111,117,114, 99,101,115, 79,110,101, 68,101,115,116, 0, 3, 0, 0, 0,143, + 1, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 79,110,101, 83,111,117,114, 99,101, + 84,119,111, 68,101,115,116,115, 0, 4, 0, 0, 0,143, 1, 0, 0, 20, 0, 0, + 0, 0, 0, 0, 0, 79,110,101, 83,111,117,114, 99,101, 84,104,114,101,101, 68, +101,115,116,115, 0, 5, 0, 0, 0,143, 1, 0, 0, 13, 0, 0, 0, 0, 0, 0, + 0,104,111,117,103,104, 95,104,101,105,103,104,116, 0, 6, 0, 0, 0,143, 1, + 0, 0, 13, 0, 0, 0, 0, 0, 0, 0,105,110,116, 95,100, 97,116, 97,116,121, +112,101, 0,182, 0, 0, 0,143, 1, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua_process51/im_process_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_process_le64.loh b/im/src/lua5/loh/im_process_le64.loh new file mode 100755 index 0000000..fc76f99 --- /dev/null +++ b/im/src/lua5/loh/im_process_le64.loh @@ -0,0 +1,897 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua_process51/im_process_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/imlua_process51/im_process_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 21, 0, 0, 0, 0, 0, 0, 0, + 64,108,117, 97, 53, 47,105,109, 95,112,114,111, 99,101,115,115, 46,108,117, 97, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 13,144, 1, 0, 0, 36, 0, 0, + 0,100, 64, 0, 0,164,128, 0, 0,228,192, 0, 0, 36, 1, 1, 0,100, 65, 1, + 0,128, 1, 0, 0,193, 1, 0, 0, 3, 2, 0, 5,197, 66, 0, 0,198,130,192, + 5,156, 65, 0, 3,128, 1, 0, 0,193,193, 0, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 1, 1, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 1, 0,156, 65, 0, + 1,128, 1, 0, 0,193,129, 1, 0, 1,194, 1, 0, 64, 2,128, 2,133, 66, 0, + 0,134, 2, 66, 5,197, 66, 0, 0,198, 66,194, 5,156, 65, 0, 3,128, 1, 0, + 0,193,129, 2, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 2, 0, 3, 2, 0, + 5,197, 66, 0, 0,198, 2,195, 5,156, 65, 0, 3,128, 1, 0, 0,193, 65, 3, + 0, 3, 2,128, 4,133, 66, 0, 0,134,130, 67, 5,195, 2,128, 5,156, 65, 0, + 3,133, 65, 0, 0,228,129, 1, 0,137,193,129,135,133, 65, 0, 0,228,193, 1, + 0,137,193, 1,136,128, 1, 0, 0,193, 65, 4, 0, 36, 2, 2, 0,100, 66, 2, + 0,156, 65, 0, 2,133, 65, 0, 0,228,129, 2, 0,137,193, 1,137,128, 1,128, + 0,193,193, 4, 0,156, 65, 0, 1,133, 65, 0, 0,228,193, 2, 0,137,193, 1, +138,133, 65, 0, 0,228, 1, 3, 0,137,193,129,138,128, 1, 0, 0,193,129, 5, + 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 5, 0, 36, 66, 3, 0,100,130, 3, + 0,156, 65, 0, 2,128, 1, 0, 0,193, 1, 6, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 65, 6, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 6, 0,156, 65, 0, + 1,128, 1, 0, 0,193,193, 6, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 7, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 7, 0,156, 65, 0, 1,128, 1, 0, + 0,193,129, 7, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 7, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 1, 8, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 8, + 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 8, 0,156, 65, 0, 1,128, 1, 0, + 0,193,193, 8, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 9, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 65, 9, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 9, + 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 9, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 1, 10, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 10, 0,156, 65, 0, + 1,128, 1, 0, 0,193,129, 10, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 10, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 11, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 65, 11, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 11, 0,156, 65, 0, + 1,128, 1, 0, 0,193,193, 11, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 12, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 12, 0,156, 65, 0, 1,128, 1, 0, + 0,193,129, 12, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 12, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 1, 13, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 13, + 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 13, 0,156, 65, 0, 1,128, 1, 0, + 0,193,193, 13, 0,156, 65, 0, 1,128, 1,128, 1,193, 1, 14, 0, 3, 2, 0, + 4,100,194, 3, 0,156, 65, 0, 2,133, 65, 0, 0,228, 1, 4, 0,137,193,129, +156,164, 65, 4, 0,192, 1, 0, 0, 1,130, 14, 0, 67, 2,128, 5, 0, 3, 0, + 3,220, 65, 0, 3,192, 1, 0, 0, 1,194, 14, 0, 67, 2,128, 5, 0, 3, 0, + 3,220, 65, 0, 3,192, 1, 0, 0, 1, 2, 15, 0,220, 65, 0, 1,192, 1, 0, + 0, 1, 66, 15, 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 15, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,194, 15, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 16, + 0,220, 65, 0, 1,192, 1, 0, 0, 1, 66, 16, 0,220, 65, 0, 1,192, 1,128, + 0, 1,130, 16, 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 16, 0,220, 65, 0, + 1,192, 1, 0, 0, 1, 2, 17, 0,220, 65, 0, 1,192, 1,128, 0, 1, 66, 17, + 0,220, 65, 0, 1,197, 65, 0, 0, 36,130, 4, 0,201, 1, 2,163,192, 1,128, + 0, 1,194, 17, 0,220, 65, 0, 1,192, 1, 0, 1, 1, 2, 18, 0,220, 65, 0, + 1,192, 1,128, 1, 1, 66, 18, 0,220, 65, 0, 1,192, 1,128, 0, 1,130, 18, + 0, 67, 2,128, 5, 5, 67, 0, 0, 6,195, 82, 6,220, 65, 0, 3,197, 65, 0, + 0, 36,194, 4, 0,201, 1, 2,166,197, 65, 0, 0, 36, 2, 5, 0,201, 1,130, +166,192, 1,128, 0, 1,130, 19, 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 19, + 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 20, 0, 67, 2, 0, 5,197, 66, 0, + 0,198, 66,212, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1,130, 20, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 20, 0,220, 65, 0, 1,192, 1, 0, + 0, 1, 2, 21, 0,220, 65, 0, 1,197, 65, 0, 0, 36, 66, 5, 0,201, 1,130, +170,192, 1, 0, 2, 1,130, 21, 0, 67, 2, 0, 5,197, 66, 0, 0,198, 2,194, + 5, 5, 67, 0, 0, 6, 3, 67, 6,220, 65, 0, 3,192, 1, 0, 1, 1,194, 21, + 0, 67, 2, 0, 5,197, 66, 0, 0,198, 2,214, 5, 5, 67, 0, 0, 6, 67, 86, + 6,220, 65, 0, 3,197, 65, 0, 0, 36,130, 5, 0,201, 1, 2,173,197, 65, 0, + 0, 36,194, 5, 0,201, 1,130,173,192, 1, 0, 0, 1, 2, 23, 0, 67, 2,128, + 5, 5, 67, 0, 0, 6, 3, 67, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 23, + 0,220, 65, 0, 1,192, 1,128, 0, 1,130, 23, 0,220, 65, 0, 1,192, 1, 0, + 0, 1,194, 23, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 24, 0,220, 65, 0, + 1,192, 1, 0, 0, 1, 66, 24, 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 24, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 24, 0, 67, 2,128, 5, 5, 67, 0, + 0, 6, 67, 86, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 2, 25, 0, 67, 2,128, + 5, 5, 67, 0, 0, 6, 67, 86, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 25, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 25, 0, 67, 2, 0, 5,197, 66, 0, + 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1,194, 25, + 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, + 3,192, 1, 0, 0, 1, 2, 26, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, + 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1,128, 0, 1, 66, 26, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,130, 26, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, + 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1,194, 26, 0, 67, 2, 0, + 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, + 0, 1, 2, 27, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 66, 27, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,130, 27, 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 27, + 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, + 3,192, 1, 0, 0, 1, 2, 28, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, + 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 28, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,130, 28, 0,220, 65, 0, 1, 30, 0,128, 0,115, 0, 0, + 0, 4, 19, 0, 0, 0, 0, 0, 0, 0, 65,110, 97,108,121,122,101, 70,105,110, +100, 82,101,103,105,111,110,115, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 85, 83, 72, 79, 82, 84, 0, 4, 21, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 80,101,114,105,109,101,116, +101,114, 76,105,110,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 82,101,109,111,118,101, 66,121, 65,114,101, 97, 0, 4, 17, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 70,105,108,108, 72,111,108,101, +115, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 72,111, +117,103,104, 76,105,110,101,115, 0, 3, 0, 0, 0, 0, 0,128,102, 64, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 71, 82, 65, 89, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 73, 78, 84, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 72,111,117,103,104, 76,105,110,101,115, 68,114, 97,119, 0, 4, 25, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 68,105,115,116, 97,110, 99,101, + 84,114, 97,110,115,102,111,114,109, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 70, + 76, 79, 65, 84, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 82,101,103,105,111,110, 97,108, 77, 97,120,105,109,117,109, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 66, 73, 78, 65, 82, 89, 0, 4, 17, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 82,101,100,117, 99,101, 78,101,119, 0, 4, + 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101,115,105,122, +101, 78,101,119, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 82,101,100,117, 99,101, 66,121, 52, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 67,114,111,112, 78,101,119, 0, 4, 14, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73,110,115,101,114,116, 0, 4, 21, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 65,100,100, 77, 97,114, +103,105,110,115, 78,101,119, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 82,111,116, 97,116,101, 78,101,119, 0, 4, 17, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 82,111,116, 97,116,101, 82,101,102, 0, + 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,111,116, 97, +116,101, 57, 48, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 82,111,116, 97,116,101, 49, 56, 48, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 77,105,114,114,111,114, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 70,108,105,112, 0, 4, 14, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,100,105, 97,108, 0, 4, 25, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111, +114,112,104, 67,111,110,118,111,108,118,101, 0, 4, 22, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 69,114,111, +100,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71, +114, 97,121, 77,111,114,112,104, 68,105,108, 97,116,101, 0, 4, 21, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, + 79,112,101,110, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 71,114, 97,121, 77,111,114,112,104, 67,108,111,115,101, 0, 4, 23, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112, +104, 84,111,112, 72, 97,116, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 87,101,108,108, 0, 4, 25, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111, +114,112,104, 71,114, 97,100,105,101,110,116, 0, 4, 24, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 67,111,110,118, +111,108,118,101, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 66,105,110, 77,111,114,112,104, 69,114,111,100,101, 0, 4, 22, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 68, +105,108, 97,116,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 66,105,110, 77,111,114,112,104, 79,112,101,110, 0, 4, 21, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 67, +108,111,115,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 66,105,110, 77,111,114,112,104, 79,117,116,108,105,110,101, 0, 4, 20, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112, +104, 84,104,105,110, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 77,101,100,105, 97,110, 67,111,110,118,111,108,118,101, 0, 4, 21, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,103,101, 67,111, +110,118,111,108,118,101, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 82, 97,110,107, 67,108,111,115,101,115,116, 67,111,110,118,111,108, +118,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, + 97,110,107, 77, 97,120, 67,111,110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,107, 77,105,110, 67,111, +110,118,111,108,118,101, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 67,111,110,118,111,108,118,101, 0, 4, 19, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 67,111,110,118,111,108,118,101, 83,101,112, 0, + 4, 19, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 67,111,110,118, +111,108,118,101, 82,101,112, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 67,111,110,118,111,108,118,101, 68,117, 97,108, 0, 4, 23, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 67,111,109,112, 97,115,115, + 67,111,110,118,111,108,118,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 77,101, 97,110, 67,111,110,118,111,108,118,101, 0, 4, 24, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71, 97,117,115,115,105, + 97,110, 67,111,110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 66, 97,114,108,101,116,116, 67,111,110,118,111,108, +118,101, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73, +110,116,101,114,108, 97, 99,101, 83,112,108,105,116, 0, 4, 25, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 73,110,116,101,114,108, 97, 99,101, 83, +112,108,105,116, 78,101,119, 0, 4, 30, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 68,105,102,102, 79,102, 71, 97,117,115,115,105, 97,110, 67,111, +110,118,111,108,118,101, 0, 4, 29, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 76, 97,112, 79,102, 71, 97,117,115,115,105, 97,110, 67,111,110,118, +111,108,118,101, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 83,111, 98,101,108, 67,111,110,118,111,108,118,101, 0, 4, 26, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,110,101, 69,100,103, +101, 67,111,110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 80,114,101,119,105,116,116, 67,111,110,118,111,108,118, +101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 90,101, +114,111, 67,114,111,115,115,105,110,103, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 67, 97,110,110,121, 0, 4, 22, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 85,110, 65,114,105,116,104,109,101,116,105, + 99, 79,112, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 65,114,105,116,104,109,101,116,105, 99, 79,112, 0, 4, 15, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 85,110,115,104, 97,114,112, 0, 4, 13, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,104, 97,114,112, 0, 4, + 19, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,104, 97,114,112, + 75,101,114,110,101,108, 0, 4, 28, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 65,114,105,116,104,109,101,116,105, 99, 67,111,110,115,116, 79,112, + 78,101,119, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 66,108,101,110,100, 67,111,110,115,116, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 66,108,101,110,100, 0, 4, 20, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111,109,112,108,101, +120, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77,101, +114,103,101, 67,111,109,112,108,101,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, + 67, 70, 76, 79, 65, 84, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 77,117,108,116,105,112,108,101, 77,101, 97,110, 78,101,119, 0, 4, + 25, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77,117,108,116,105, +112,108,101, 83,116,100, 68,101,118, 78,101,119, 0, 4, 22, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 65,117,116,111, 67,111,118, 97,114,105, 97, +110, 99,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 77,117,108,116,105,112,108,121, 67,111,110,106, 0, 4, 26, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 81,117, 97,110,116,105,122,101, 82, 71, 66, + 85,110,105,102,111,114,109, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 77, 65, 80, + 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 81,117, 97, +110,116,105,122,101, 71,114, 97,121, 85,110,105,102,111,114,109, 0, 4, 23, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 69,120,112, 97,110,100, 72, +105,115,116,111,103,114, 97,109, 0, 4, 25, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 69,113,117, 97,108,105,122,101, 72,105,115,116,111,103,114, + 97,109, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83, +112,108,105,116, 89, 67,104,114,111,109, 97, 78,101,119, 0, 4, 16, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 72, 83, 73, 0, + 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77,101,114,103, +101, 72, 83, 73, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 82, 71, 66, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 66, 89, 84, 69, 0, 4, 26, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111,109,112,111,110,101, +110,116,115, 78,101,119, 0, 4, 26, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 77,101,114,103,101, 67,111,109,112,111,110,101,110,116,115, 78,101, +119, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 78,111, +114,109, 97,108,105,122,101, 67,111,109,112,111,110,101,110,116,115, 0, 4, 20, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101,112,108, 97, 99, +101, 67,111,108,111,114, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 66,105,116,119,105,115,101, 79,112, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 66,105,116,119,105,115,101, 78,111,116, 0, + 4, 15, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,116, 77, + 97,115,107, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 66,105,116, 80,108, 97,110,101, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 84,111,110,101, 71, 97,109,117,116, 0, 4, 19, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 85,110, 78,111,114,109, 97,108,105, +122,101, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 68, +105,114,101, 99,116, 67,111,110,118, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 78,101,103, 97,116,105,118,101, 0, 4, 30, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,103,101, 67,111,110,116, +114, 97,115,116, 84,104,114,101,115,104,111,108,100, 0, 4, 25, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 76,111, 99, 97,108, 77, 97,120, 84,104, +114,101,115,104,111,108,100, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 84,104,114,101,115,104,111,108,100, 0, 4, 23, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 84,104,114,101,115,104,111,108,100, 66, +121, 68,105,102,102, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 72,121,115,116,101,114,101,115,105,115, 84,104,114,101,115,104,111,108, +100, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 85,110, +105,102,111,114,109, 69,114,114, 84,104,114,101,115,104,111,108,100, 0, 4, 28, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 68,105,102,117,115,105, +111,110, 69,114,114, 84,104,114,101,115,104,111,108,100, 0, 4, 24, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 80,101,114, 99,101,110,116, 84,104, +114,101,115,104,111,108,100, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 79,116,115,117, 84,104,114,101,115,104,111,108,100, 0, 4, 23, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77,105,110, 77, 97,120, + 84,104,114,101,115,104,111,108,100, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 83,108,105, 99,101, 84,104,114,101,115,104,111,108,100, + 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 80,105,120, +101,108, 97,116,101, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 80,111,115,116,101,114,105,122,101, 0, 24, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 25, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, + 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1, +133, 1, 0, 0,192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, + 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2, +137, 1,130, 3, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, + 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, + 4, 4, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 5, 1, 7, 8, 23, 0, 0, + 0,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, + 0,132, 1, 0, 1,196, 1,128, 1,156,128, 0, 3,196, 0, 0, 2, 0, 1, 0, + 0, 64, 1, 0, 1,133,129, 0, 0,192, 1,128, 0,156, 1, 0, 1,220,128, 0, + 0,218, 0, 0, 0, 22,192, 0,128, 0, 1,128, 1, 64, 1, 0, 1, 30, 1,128, + 1, 22, 0, 0,128,158, 0, 0, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, + 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, + 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 23, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 22, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 8, + 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 15, + 0, 0, 0, 22, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119, +105,100,116,104, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, + 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, + 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 17, 0, 0, 0, 9, 0, 0, 0, 9, + 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, + 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, + 97,109,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, +119,105,100,116,104, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, + 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121, +112,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102, +117,110, 99, 0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 31, 0, 0, 0, 50, 0, 0, 0, 0, 5, 0, 11, 22, 0, 0, 0, + 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2, 5,130, 0, 0, + 6,194, 64, 4, 65, 2, 1, 0,128, 2, 0, 0, 28, 2,128, 1,156, 65, 0, 0, +133, 1, 0, 0,192, 1, 0, 0, 1, 66, 1, 0,213, 1,130, 3, 36, 2, 0, 0, + 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2, +137, 1,130, 3, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, + 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,102,111,114,109, 97,116, 0, 4, 24, 0, 0, 0, 0, 0, 0, + 0,117,110,100,101,102,105,110,101,100, 32,102,117,110, 99,116,105,111,110, 32, + 96, 37,115, 39, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 49, 0, 0, 0, 5, 2, + 7, 10, 24, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 68, 1, + 0, 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, 3, 4, 1, + 0, 2, 64, 1, 0, 0,128, 1,128, 0,192, 1,128, 1, 5,130, 0, 0, 64, 2, + 0, 1, 28, 2, 0, 1, 28,129, 0, 0, 26, 1, 0, 0, 22,192, 0,128, 64, 1, + 0, 2,128, 1,128, 1, 94, 1,128, 1, 22, 0, 0,128,222, 0, 0, 1, 30, 0, +128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, + 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97, +115,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, + 0, 0, 0, 0, 24, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, + 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, + 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 47, 0, 0, 0, + 49, 0, 0, 0, 5, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95, +105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 23, 0, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, + 8, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, + 16, 0, 0, 0, 23, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, +119,105,100,116,104, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, + 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, + 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, + 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 22, 0, 0, 0, 32, 0, 0, 0, + 32, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 38, 0, 0, 0, + 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, + 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, + 50, 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, +110, 97,109,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0,119,105,100,116,104, 0, 0, 0, 0, 0, 21, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 21, 0, 0, 0, 12, 0, + 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, + 0, 0, 21, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116, +121,112,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99, 0, 2, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 56, 0, 0, 0, 73, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, + 0, 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, + 1,133, 1, 0, 0,192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, + 0, 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, + 2,137, 1,130, 3, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101,114,116, + 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 61, 0, 0, 0, 72, 0, 0, 0, 5, 3, 7, 12, 25, 0, + 0, 0, 5, 1, 0, 0, 6, 65, 64, 2, 64, 1, 0, 0,132, 1, 0, 0,196, 1, +128, 0, 4, 2, 0, 1, 68, 2,128, 1, 28,129, 0, 3, 68, 1, 0, 2,128, 1, + 0, 0,192, 1,128, 0, 0, 2, 0, 1, 64, 2, 0, 2,133,130, 0, 0,192, 2, +128, 1,156, 2, 0, 1, 92,129, 0, 0, 90, 1, 0, 0, 22,192, 0,128,128, 1, +128, 2,192, 1, 0, 2,158, 1,128, 1, 22, 0, 0,128, 30, 1, 0, 1, 30, 0, +128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, + 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97, +115,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, + 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, + 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, + 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, + 67, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, + 70, 0, 0, 0, 72, 0, 0, 0, 6, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, +115,114, 99, 95,105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 24, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, + 0, 0, 24, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, + 97,103,101, 51, 0, 0, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 24, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, + 0,100,115,116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, 24, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 17, 0, 0, 0, 24, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, 0, 0, 0, 0, +100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117, +110, 99, 0, 17, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, 58, 0, 0, 0, 58, + 0, 0, 0, 58, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, + 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, + 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 6, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108, +111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, + 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, + 97, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2, +133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0,192, 1, 0, 0, + 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, + 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, + 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, + 0, 96, 0, 0, 0, 5, 1, 7, 10, 35, 0, 0, 0,133, 0, 0, 0,134, 64, 64, + 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, 0,132, 1, 0, 1,196, 1,128, + 1,156,128, 0, 3,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 68, 1, 0, + 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, 3, 4, 1, 0, + 2, 64, 1, 0, 0,128, 1, 0, 1,192, 1,128, 1, 5,130, 0, 0, 64, 2,128, + 0, 28, 2, 0, 1, 28,129, 0, 0, 26, 1, 0, 0, 22, 0, 1,128, 64, 1, 0, + 2,128, 1, 0, 1,192, 1,128, 1, 94, 1, 0, 2, 22,128, 0,128, 64, 1, 0, + 1,128, 1,128, 1, 94, 1,128, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, + 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, + 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 35, 0, 0, 0, 86, + 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, + 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, + 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, + 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, + 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 91, 0, 0, 0, 91, + 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, + 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 96, 0, 0, 0, 5, + 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, + 0, 0, 0, 0, 0, 34, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, + 0, 0, 0, 0, 0, 34, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, + 95,105,109, 97,103,101, 49, 0, 8, 0, 0, 0, 34, 0, 0, 0, 11, 0, 0, 0, + 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 50, 0, 16, 0, 0, 0, 34, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 24, 0, 0, 0, 34, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, + 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, + 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, + 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, + 0, 0,102,117,110, 99, 0, 17, 0, 0, 0, 80, 0, 0, 0, 80, 0, 0, 0, 81, + 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, + 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 97, 0, 0, 0, 6, + 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116, +104, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101, +105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, + 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, + 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +103, 0, 0, 0,122, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, + 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0, +192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, + 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, + 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, + 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,108, 0, 0, 0,121, 0, 0, 0, 5, 1, 7, 12, 46, 0, 0, 0,133, 0, 0, + 0,134, 64, 64, 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, 0,132, 1, 0, + 1,196, 1,128, 1,156,128, 0, 3,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, + 0, 68, 1, 0, 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, + 3, 5, 1, 0, 0, 6, 65, 64, 2, 64, 1, 0, 0,132, 1, 0, 0,196, 1,128, + 0, 4, 2, 0, 1, 68, 2,128, 1, 28,129, 0, 3, 68, 1, 0, 2,128, 1, 0, + 0,192, 1, 0, 1, 0, 2,128, 1, 64, 2, 0, 2,133,130, 0, 0,192, 2,128, + 0,156, 2, 0, 1, 92,129, 0, 0, 90, 1, 0, 0, 22, 64, 1,128,128, 1,128, + 2,192, 1, 0, 1, 0, 2,128, 1, 64, 2, 0, 2,158, 1,128, 2, 22,192, 0, +128,128, 1, 0, 1,192, 1,128, 1, 0, 2, 0, 2,158, 1, 0, 2, 30, 0,128, + 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, + 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115, +101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 46, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, + 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,111, + 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, + 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, + 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, + 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, + 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,116, + 0, 0, 0,116, 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, + 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, + 0, 0, 0,119, 0, 0, 0,121, 0, 0, 0, 6, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 45, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 45, 0, 0, + 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 49, 0, + 8, 0, 0, 0, 45, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95, +105,109, 97,103,101, 50, 0, 16, 0, 0, 0, 45, 0, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 51, 0, 24, 0, 0, 0, 45, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 33, 0, 0, 0, 45, 0, + 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, + 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 0, + 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, 0, + 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, 0, + 0,102,117,110, 99, 0, 17, 0, 0, 0,104, 0, 0, 0,104, 0, 0, 0,105, 0, + 0, 0,105, 0, 0, 0,105, 0, 0, 0,108, 0, 0, 0,108, 0, 0, 0,108, 0, + 0, 0,108, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, + 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,122, 0, 0, 0, 6, 0, + 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105, +103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, + 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, + 0, 0, 0,130, 0, 0, 0, 0, 1, 0, 7, 18, 0, 0, 0,100, 0, 0, 0,133, + 0, 0, 0,134, 64, 64, 1,192, 0,128, 0, 11,129, 64, 0, 28, 1, 0, 1,220, +128, 0, 0, 0, 1,128, 0, 75,193, 64, 0, 92, 1, 0, 1, 28,129, 0, 0,204, + 0,129, 1,156,128, 0, 1,143, 0, 65, 1,206,128, 0,130,204, 64,193, 1,222, + 0, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +109, 97,116,104, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,115,113,114,116, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 3, + 0, 0, 0, 0, 0, 0,240, 63, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +127, 0, 0, 0,127, 0, 0, 0, 0, 1, 0, 2, 3, 0, 0, 0, 78, 0, 0, 0, + 94, 0, 0, 1, 30, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, +127, 0, 0, 0,127, 0, 0, 0,127, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 18, 0, + 0, 0,127, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, + 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, + 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,129, 0, + 0, 0,129, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0, 3, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0,115,113,114, 0, 1, 0, 0, 0, 17, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0,114,109, 97,120, 0, 14, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 0, 0, 0,144, 0, 0, + 0, 0, 3, 0, 7, 14, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, + 0, 64, 1,128, 0,128, 1, 0, 1,220,128, 0, 2, 5, 1, 0, 0, 6,129, 64, + 2, 64, 1, 0, 0,128, 1,128, 1, 28,129,128, 1, 64, 1,128, 1, 30, 1,128, + 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, + 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116, +101, 66, 97,115,101,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 82,101,100,117, 99,101, 0, 0, 0, 0, 0, 14, 0, 0, 0,142, 0, + 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, + 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, + 0, 0,143, 0, 0, 0,143, 0, 0, 0,144, 0, 0, 0, 4, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, + 13, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, + 0, 0, 13, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, + 0, 0, 0, 0, 0, 13, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, + 95,105,109, 97,103,101, 0, 6, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,146, 0, 0, 0,149, 0, 0, 0, 0, 3, 0, 7, 14, + 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 64, 1,128, 0,128, + 1, 0, 1,220,128, 0, 2, 5, 1, 0, 0, 6,129, 64, 2, 64, 1, 0, 0,128, + 1,128, 1, 28,129,128, 1, 64, 1,128, 1, 30, 1,128, 1, 30, 0,128, 0, 3, + 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, + 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101,115, +105,122,101, 0, 0, 0, 0, 0, 14, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0, +147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,148, 0, 0, 0, +148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0, +148, 0, 0, 0,149, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, +115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 13, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, 0, 0, 13, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 13, + 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, + 0, 6, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,151, 0, 0, 0,151, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 75, 0, 64, + 0, 92,128, 0, 1, 79, 64,192, 0, 94, 0, 0, 1, 30, 0,128, 0, 2, 0, 0, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 64, 0, 0, 0, 0, 5, 0, 0, 0,151, 0, 0, 0,151, 0, 0, + 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0, 0, + 1, 0, 3, 5, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1, 79, 64,192, 0, 94, + 0, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, + 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, + 5, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0, +152, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103, +101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,154, 0, 0, 0,160, 0, 0, 0, 0, 5, 0, 13, 19, 0, 0, 0, 77, 65, + 0, 1, 76, 1,192, 2,141,193, 0, 2,140, 1, 64, 3,197, 65, 0, 0,198,129, +192, 3, 0, 2, 0, 0, 64, 2,128, 2,128, 2, 0, 3,220,129, 0, 2, 5, 66, + 0, 0, 6,194, 64, 4, 64, 2, 0, 0,128, 2,128, 3,192, 2,128, 0, 0, 3, +128, 1, 28, 66,128, 2,222, 1, 0, 1, 30, 0,128, 0, 4, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, + 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, + 97,115,101,100, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 67,114,111,112, 0, 0, 0, 0, 0, 19, 0, 0, 0,155, 0, 0, 0,155, 0, + 0, 0,156, 0, 0, 0,156, 0, 0, 0,157, 0, 0, 0,157, 0, 0, 0,157, 0, + 0, 0,157, 0, 0, 0,157, 0, 0, 0,157, 0, 0, 0,158, 0, 0, 0,158, 0, + 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, + 0, 0,159, 0, 0, 0,160, 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, 0, 0, 0, + 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0,120,109,105,110, 0, 0, 0, 0, 0, 18, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0,120,109, 97,120, 0, 0, 0, 0, 0, 18, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,121,109,105,110, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,121,109, 97,120, 0, 0, 0, 0, 0, + 18, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 2, 0, + 0, 0, 18, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, + 0, 4, 0, 0, 0, 18, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, + 95,105,109, 97,103,101, 0, 10, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,164, 0, 0, 0,170, 0, 0, 0, 0, 5, 0, 13, 19, + 0, 0, 0, 77, 65, 0, 1, 76, 1,192, 2,141,193, 0, 2,140, 1, 64, 3,197, + 65, 0, 0,198,129,192, 3, 0, 2, 0, 0, 64, 2,128, 2,128, 2, 0, 3,220, +129, 0, 2, 5, 66, 0, 0, 6,194, 64, 4, 64, 2, 0, 0,128, 2,128, 3,192, + 2,128, 0, 0, 3,128, 1, 28, 66,128, 2,222, 1, 0, 1, 30, 0,128, 0, 4, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 3, 0, 0, 0, 0, 0, 0, + 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114, +101, 97,116,101, 66, 97,115,101,100, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 65,100,100, 77, 97,114,103,105,110,115, 0, 0, 0, 0, + 0, 19, 0, 0, 0,165, 0, 0, 0,165, 0, 0, 0,166, 0, 0, 0,166, 0, 0, + 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, + 0,167, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, + 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,169, 0, 0, 0,170, 0, 0, + 0, 8, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97, +103,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,120, +109,105,110, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, +120,109, 97,120, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0,121,109,105,110, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0,121,109, 97,120, 0, 0, 0, 0, 0, 18, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0,119,105,100,116,104, 0, 2, 0, 0, 0, 18, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 4, 0, 0, 0, 18, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 10, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,172, 0, + 0, 0,176, 0, 0, 0, 0, 4, 0, 13, 26, 0, 0, 0, 5, 1, 0, 0, 6, 65, + 64, 2, 75,129, 64, 0, 92,129, 0, 1,139,193, 64, 0,156,129, 0, 1,192, 1, +128, 0, 0, 2, 0, 1, 28,193,128, 2,133, 1, 0, 0,134, 1, 65, 3,192, 1, + 0, 0, 0, 2, 0, 2, 64, 2,128, 2,156,129, 0, 2,197, 1, 0, 0,198, 65, +193, 3, 0, 2, 0, 0, 64, 2, 0, 3,128, 2,128, 0,192, 2, 0, 1, 0, 3, +128, 1,220,129, 0, 3, 0, 2, 0, 3,222, 1,128, 1, 30, 0,128, 0, 6, 0, + 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 22, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 67, 97,108, 99, 82,111,116, 97,116,101, + 83,105,122,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 72,101,105,103,104,116, 0, 4, 17, 0, 0, + 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101, +100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,111, +116, 97,116,101, 0, 0, 0, 0, 0, 26, 0, 0, 0,173, 0, 0, 0,173, 0, 0, + 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, + 0,173, 0, 0, 0,173, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, + 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,175, 0, 0, 0,175, 0, 0, + 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, + 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,176, 0, 0, 0, 7, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, + 0, 0, 0, 25, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,111,115, 48, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,115,105,110, 48, + 0, 0, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,111,114,100, +101,114, 0, 0, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119, +105,100,116,104, 0, 9, 0, 0, 0, 25, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0,104,101,105,103,104,116, 0, 9, 0, 0, 0, 25, 0, 0, 0, 10, 0, 0, 0, + 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 15, 0, 0, 0, 25, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,179, 0, 0, 0,179, 0, + 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 75, 0, 64, 0, 93, 0, 0, 1, 94, 0, + 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 72, +101,105,103,104,116, 0, 0, 0, 0, 0, 4, 0, 0, 0,179, 0, 0, 0,179, 0, + 0, 0,179, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0, 0, 1, 0, 3, + 4, 0, 0, 0, 75, 0, 64, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, + 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, 0, + 0, 0, 0, 4, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, + 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,212, 0, 0, 0,212, 0, 0, 0, 0, 1, 0, 3, 13, 0, 0, 0, 75, 0, 64, + 0, 92,128, 0, 1, 90, 0, 0, 0, 22,192, 0,128, 75, 0, 64, 0, 93, 0, 0, + 1, 94, 0, 0, 0, 22,192, 0,128, 75, 0, 64, 0, 92,128, 0, 1, 79, 64,192, + 0, 94, 0, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, + 0, 0, 13, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, + 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, + 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0, 1, 0, + 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214, 0, 0, 0, +227, 0, 0, 0, 0, 1, 0, 8, 36, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1, + 79, 64,192, 0,133,128, 0, 0,134,192, 64, 1,203, 0, 64, 0,220,128, 0, 1, + 1, 65, 0, 0,156,128,128, 1,154, 0, 0, 0, 22, 0, 0,128, 76, 0,193, 0, +133, 64, 1, 0,134,128, 65, 1,192, 0, 0, 0, 3, 1, 0, 2, 64, 1,128, 0, +156,128, 0, 2,197, 64, 1, 0,198,128,193, 1, 0, 1, 0, 0, 67, 1,128, 2, +139, 1, 64, 0,156,129, 0, 1,143, 65, 64, 3,220,128, 0, 2, 5, 65, 1, 0, + 6,193, 65, 2, 64, 1, 0, 0,128, 1, 0, 1,192, 1,128, 1, 28, 65, 0, 2, + 0, 1, 0, 1, 64, 1,128, 1, 30, 1,128, 1, 30, 0,128, 0, 8, 0, 0, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 64, 4, 5, 0, 0, 0, 0, 0, 0, 0,109, 97,116,104, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0,109,111,100, 0, 3, 0, 0, 0, 0, 0, 0,240, + 63, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, + 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, + 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73,110,116,101,114, +108, 97, 99,101, 83,112,108,105,116, 0, 0, 0, 0, 0, 36, 0, 0, 0,216, 0, + 0, 0,216, 0, 0, 0,216, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, + 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, + 0, 0,218, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, + 0, 0,221, 0, 0, 0,221, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, + 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, + 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, + 0, 0,225, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,227, 0, + 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, + 97,103,101, 0, 0, 0, 0, 0, 35, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, +100,115,116, 95,104,101,105,103,104,116, 49, 0, 3, 0, 0, 0, 35, 0, 0, 0, + 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 49, 0, 18, + 0, 0, 0, 35, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105, +109, 97,103,101, 50, 0, 26, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,229, 0, 0, 0,235, 0, 0, 0, 0, 1, 0, 3, 14, 0, + 0, 0, 75, 0, 64, 0, 92,128, 0, 1,133, 64, 0, 0,134,128, 64, 1, 87,128, +128, 0, 22,192, 0,128,133, 64, 0, 0,134,192, 64, 1, 23,128,128, 0, 22, 64, + 0,128,133, 64, 0, 0, 70, 0, 65, 1, 94, 0, 0, 1, 30, 0,128, 0, 5, 0, + 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 68, 97,116, 97, 84,121,112,101, 0, + 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0, 66, 89, 84, 69, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 85, 83, 72, 79, 82, + 84, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 73, 78, 84, 0, 0, 0, 0, 0, 14, + 0, 0, 0,230, 0, 0, 0,230, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, + 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, + 0, 0, 0,232, 0, 0, 0,232, 0, 0, 0,234, 0, 0, 0,235, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, + 0, 13, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121, +112,101, 0, 2, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,250, 0, 0, 0,254, 0, 0, 0, 0, 3, 0, 9, 13, 0, 0, 0,197, + 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0,220,128, 0, 1, 5, 1, 0, 0, 6, +129, 64, 2, 64, 1, 0, 0,128, 1,128, 0,192, 1,128, 1, 0, 2, 0, 1, 28, + 65,128, 2,222, 0, 0, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103, +101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 25, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 65,114,105,116,104,109,101,116,105, 99, 67, +111,110,115,116, 79,112, 0, 0, 0, 0, 0, 13, 0, 0, 0,251, 0, 0, 0,251, + 0, 0, 0,251, 0, 0, 0,251, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, + 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,252, 0, 0, 0,253, + 0, 0, 0,254, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115, +114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 12, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0,115,114, 99, 95, 99,111,110,115,116, 0, 0, 0, 0, 0, 12, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,111,112, 0, 0, 0, 0, 0, 12, 0, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, + 4, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 1, 0, 0, 9, 1, 0, 0, 0, 2, 0, 6, 11, 0, 0, 0,133, 0, 0, 0, +134, 64, 64, 1,198,128, 64, 0,156,128, 0, 1,197, 0, 0, 0,198,192,192, 1, + 0, 1, 0, 0, 64, 1, 0, 1,220, 64,128, 1,158, 0, 0, 1, 30, 0,128, 0, + 4, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, + 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101, +100, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 20, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 77,117,108,116,105,112,108,101, 77,101, 97,110, 0, + 0, 0, 0, 0, 11, 0, 0, 0, 6, 1, 0, 0, 6, 1, 0, 0, 6, 1, 0, 0, + 6, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, + 7, 1, 0, 0, 8, 1, 0, 0, 9, 1, 0, 0, 3, 0, 0, 0, 15, 0, 0, 0, + 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 95,108,105,115,116, 0, 0, + 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105, +109, 97,103,101, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, + 0,100,115,116, 95,105,109, 97,103,101, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 1, 0, 0, 15, 1, 0, 0, 0, + 2, 0, 7, 12, 0, 0, 0,133, 0, 0, 0,134, 64, 64, 1,198,128, 64, 0,156, +128, 0, 1,197, 0, 0, 0,198,192,192, 1, 0, 1, 0, 0, 64, 1,128, 0,128, + 1, 0, 1,220, 64, 0, 2,158, 0, 0, 1, 30, 0,128, 0, 4, 0, 0, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, + 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 3, 0, 0, + 0, 0, 0, 0,240, 63, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 77,117,108,116,105,112,108,101, 83,116,100, 68,101,118, 0, 0, 0, 0, + 0, 12, 0, 0, 0, 12, 1, 0, 0, 12, 1, 0, 0, 12, 1, 0, 0, 12, 1, 0, + 0, 13, 1, 0, 0, 13, 1, 0, 0, 13, 1, 0, 0, 13, 1, 0, 0, 13, 1, 0, + 0, 13, 1, 0, 0, 14, 1, 0, 0, 15, 1, 0, 0, 3, 0, 0, 0, 15, 0, 0, + 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 95,108,105,115,116, 0, + 0, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,109,101, 97,110, + 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 11, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 4, 0, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 1, 0, 0, 29, 1, 0, + 0, 0, 1, 0, 8, 28, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,128, 0, 0, + 0,195, 0, 0, 2, 69, 1, 0, 0, 70,129,192, 2,133, 1, 0, 0,134,193, 64, + 3, 92,128, 0, 3,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 3, 1,128, + 2,133, 1, 0, 0,134, 1, 65, 3,197, 1, 0, 0,198,193,192, 3,156,128, 0, + 3,197, 0, 0, 0,198, 64,193, 1, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, + 1,220, 64, 0, 2,192, 0,128, 0, 0, 1, 0, 1,222, 0,128, 1, 30, 0,128, + 0, 6, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, + 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115, +101,100, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 71, 82, 65, 89, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0, 66, 89, 84, 69, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, + 82, 71, 66, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 83,112,108,105,116, 89, 67,104,114,111,109, 97, 0, 0, 0, 0, 0, 28, 0, 0, + 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, + 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 26, 1, 0, + 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, + 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 27, 1, 0, 0, 27, 1, 0, + 0, 27, 1, 0, 0, 27, 1, 0, 0, 27, 1, 0, 0, 27, 1, 0, 0, 28, 1, 0, + 0, 28, 1, 0, 0, 28, 1, 0, 0, 29, 1, 0, 0, 3, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 27, + 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,121, 95,105,109, 97,103,101, 0, 9, + 0, 0, 0, 27, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 99,104,114,111,109, + 97, 95,105,109, 97,103,101, 0, 18, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 34, 1, 0, 0, 42, 1, 0, 0, 0, 1, 0, 14, + 29, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1,138, 0, 0, 0,193, 64, 0, 0, + 0, 1,128, 0, 65, 65, 0, 0,224,128, 2,128,197,129, 0, 0,198,193,192, 3, + 0, 2, 0, 1, 69, 2, 1, 0, 70, 66,193, 4,128, 2, 0, 0,195, 2, 0, 6, + 69, 3, 1, 0, 70,131,193, 6, 92, 2,128, 2,220, 65, 0, 0,223,192,252,127, +197, 0, 1, 0,198,192,193, 1, 0, 1, 0, 0, 64, 1, 0, 1,220, 64,128, 1, +197, 0, 2, 0, 0, 1, 0, 1,221, 0, 0, 1,222, 0, 0, 0, 30, 0,128, 0, + 9, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 68,101,112,116,104, 0, 3, + 0, 0, 0, 0, 0, 0,240, 63, 4, 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98, +108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,105,110,115,101,114,116, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, + 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0, 71, 82, 65, 89, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111,109,112,111,110,101,110, +116,115, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 29, 0, 0, 0, 35, 1, 0, 0, 35, 1, 0, 0, 36, 1, 0, 0, 37, + 1, 0, 0, 37, 1, 0, 0, 37, 1, 0, 0, 37, 1, 0, 0, 38, 1, 0, 0, 38, + 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, + 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 37, + 1, 0, 0, 40, 1, 0, 0, 40, 1, 0, 0, 40, 1, 0, 0, 40, 1, 0, 0, 40, + 1, 0, 0, 41, 1, 0, 0, 41, 1, 0, 0, 41, 1, 0, 0, 41, 1, 0, 0, 42, + 1, 0, 0, 7, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105, +109, 97,103,101, 0, 0, 0, 0, 0, 28, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0,100,101,112,116,104, 0, 2, 0, 0, 0, 28, 0, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0,100,115,116, 95,105,109, 97,103,101,115, 0, 3, 0, 0, 0, 28, 0, + 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,105,110,100,101,120, + 41, 0, 6, 0, 0, 0, 19, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102, +111,114, 32,108,105,109,105,116, 41, 0, 6, 0, 0, 0, 19, 0, 0, 0, 11, 0, + 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, 6, 0, 0, + 0, 19, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 7, 0, 0, 0, 18, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 48, + 1, 0, 0, 0, 1, 0, 6, 14, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,134, +128, 64, 0,195, 0, 0, 2, 69, 1, 0, 0, 70,193,192, 2, 92,128,128, 2,133, + 0, 0, 0,134, 0, 65, 1,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 94, + 0, 0, 1, 30, 0,128, 0, 5, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, +105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, + 97,116,101, 66, 97,115,101,100, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 4, + 0, 0, 0, 0, 0, 0, 0, 82, 71, 66, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 77,101,114,103,101, 67,111,109,112,111,110,101,110, +116,115, 0, 0, 0, 0, 0, 14, 0, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 45, + 1, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 45, 1, 0, 0, 46, + 1, 0, 0, 46, 1, 0, 0, 46, 1, 0, 0, 46, 1, 0, 0, 46, 1, 0, 0, 47, + 1, 0, 0, 48, 1, 0, 0, 2, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0,115, +114, 99, 95,105,109, 97,103,101, 95,108,105,115,116, 0, 0, 0, 0, 0, 13, 0, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, + 7, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0,144, 1, 0, 0, 25, 0, 0, 0, + 50, 0, 0, 0, 73, 0, 0, 0, 97, 0, 0, 0,122, 0, 0, 0,130, 0, 0, 0, +132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0, +132, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,134, 0, 0, 0, +134, 0, 0, 0,134, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0, +136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0, +136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,137, 0, 0, 0, +137, 0, 0, 0,137, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0, +138, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0, +139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0, +141, 0, 0, 0,144, 0, 0, 0,141, 0, 0, 0,146, 0, 0, 0,149, 0, 0, 0, +146, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,152, 0, 0, 0, +151, 0, 0, 0,154, 0, 0, 0,160, 0, 0, 0,154, 0, 0, 0,162, 0, 0, 0, +162, 0, 0, 0,162, 0, 0, 0,164, 0, 0, 0,170, 0, 0, 0,164, 0, 0, 0, +172, 0, 0, 0,176, 0, 0, 0,172, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0, +178, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0, +179, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,181, 0, 0, 0, +181, 0, 0, 0,181, 0, 0, 0,182, 0, 0, 0,182, 0, 0, 0,182, 0, 0, 0, +183, 0, 0, 0,183, 0, 0, 0,183, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0, +184, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0, +186, 0, 0, 0,186, 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0, +188, 0, 0, 0,188, 0, 0, 0,188, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0, +189, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,191, 0, 0, 0, +191, 0, 0, 0,191, 0, 0, 0,192, 0, 0, 0,192, 0, 0, 0,192, 0, 0, 0, +193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0, +194, 0, 0, 0,195, 0, 0, 0,195, 0, 0, 0,195, 0, 0, 0,196, 0, 0, 0, +196, 0, 0, 0,196, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0, +198, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0, +199, 0, 0, 0,200, 0, 0, 0,200, 0, 0, 0,200, 0, 0, 0,201, 0, 0, 0, +201, 0, 0, 0,201, 0, 0, 0,202, 0, 0, 0,202, 0, 0, 0,202, 0, 0, 0, +203, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0, +204, 0, 0, 0,205, 0, 0, 0,205, 0, 0, 0,205, 0, 0, 0,206, 0, 0, 0, +206, 0, 0, 0,206, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0, +208, 0, 0, 0,208, 0, 0, 0,208, 0, 0, 0,209, 0, 0, 0,209, 0, 0, 0, +209, 0, 0, 0,210, 0, 0, 0,210, 0, 0, 0,210, 0, 0, 0,211, 0, 0, 0, +211, 0, 0, 0,211, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0, +212, 0, 0, 0,212, 0, 0, 0,214, 0, 0, 0,227, 0, 0, 0,214, 0, 0, 0, +235, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0, +237, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0, +238, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,240, 0, 0, 0, +240, 0, 0, 0,240, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0, +242, 0, 0, 0,242, 0, 0, 0,242, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0, +243, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,245, 0, 0, 0, +245, 0, 0, 0,245, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0, +247, 0, 0, 0,247, 0, 0, 0,247, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0, +248, 0, 0, 0,250, 0, 0, 0,254, 0, 0, 0,250, 0, 0, 0, 0, 1, 0, 0, + 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, + 2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, + 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 5, 1, 0, 0, + 9, 1, 0, 0, 5, 1, 0, 0, 11, 1, 0, 0, 15, 1, 0, 0, 11, 1, 0, 0, + 17, 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 18, 1, 0, 0, 18, 1, 0, 0, + 18, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, + 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 20, 1, 0, 0, 20, 1, 0, 0, + 20, 1, 0, 0, 21, 1, 0, 0, 21, 1, 0, 0, 21, 1, 0, 0, 22, 1, 0, 0, + 22, 1, 0, 0, 22, 1, 0, 0, 24, 1, 0, 0, 29, 1, 0, 0, 24, 1, 0, 0, + 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, + 31, 1, 0, 0, 31, 1, 0, 0, 31, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, + 32, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, + 32, 1, 0, 0, 34, 1, 0, 0, 42, 1, 0, 0, 34, 1, 0, 0, 44, 1, 0, 0, + 48, 1, 0, 0, 44, 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, + 50, 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, 51, 1, 0, 0, 51, 1, 0, 0, + 51, 1, 0, 0, 52, 1, 0, 0, 52, 1, 0, 0, 52, 1, 0, 0, 53, 1, 0, 0, + 53, 1, 0, 0, 53, 1, 0, 0, 54, 1, 0, 0, 54, 1, 0, 0, 54, 1, 0, 0, + 55, 1, 0, 0, 55, 1, 0, 0, 55, 1, 0, 0, 56, 1, 0, 0, 56, 1, 0, 0, + 56, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, + 57, 1, 0, 0, 57, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, + 58, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, 59, 1, 0, 0, 59, 1, 0, 0, + 59, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, + 60, 1, 0, 0, 60, 1, 0, 0, 60, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, + 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, + 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, + 62, 1, 0, 0, 62, 1, 0, 0, 63, 1, 0, 0, 63, 1, 0, 0, 63, 1, 0, 0, + 64, 1, 0, 0, 64, 1, 0, 0, 64, 1, 0, 0, 64, 1, 0, 0, 64, 1, 0, 0, + 64, 1, 0, 0, 64, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, + 65, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, 66, 1, 0, 0, + 66, 1, 0, 0, 66, 1, 0, 0, 67, 1, 0, 0, 67, 1, 0, 0, 67, 1, 0, 0, + 68, 1, 0, 0, 68, 1, 0, 0, 68, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, + 69, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, + 70, 1, 0, 0, 70, 1, 0, 0, 70, 1, 0, 0, 70, 1, 0, 0, 70, 1, 0, 0, + 70, 1, 0, 0, 70, 1, 0, 0, 71, 1, 0, 0, 71, 1, 0, 0, 71, 1, 0, 0, + 72, 1, 0, 0, 72, 1, 0, 0, 72, 1, 0, 0, 72, 1, 0, 0, 7, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 79,110,101, 83,111,117,114, 99,101, 79,110,101, + 68,101,115,116, 0, 1, 0, 0, 0,143, 1, 0, 0, 18, 0, 0, 0, 0, 0, 0, + 0, 84,119,111, 83,111,117,114, 99,101,115, 79,110,101, 68,101,115,116, 0, 2, + 0, 0, 0,143, 1, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 84,104,114,101,101, + 83,111,117,114, 99,101,115, 79,110,101, 68,101,115,116, 0, 3, 0, 0, 0,143, + 1, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 79,110,101, 83,111,117,114, 99,101, + 84,119,111, 68,101,115,116,115, 0, 4, 0, 0, 0,143, 1, 0, 0, 20, 0, 0, + 0, 0, 0, 0, 0, 79,110,101, 83,111,117,114, 99,101, 84,104,114,101,101, 68, +101,115,116,115, 0, 5, 0, 0, 0,143, 1, 0, 0, 13, 0, 0, 0, 0, 0, 0, + 0,104,111,117,103,104, 95,104,101,105,103,104,116, 0, 6, 0, 0, 0,143, 1, + 0, 0, 13, 0, 0, 0, 0, 0, 0, 0,105,110,116, 95,100, 97,116, 97,116,121, +112,101, 0,182, 0, 0, 0,143, 1, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua_process51/im_process_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/im/src/lua5/loh/im_process_le64w.loh b/im/src/lua5/loh/im_process_le64w.loh new file mode 100755 index 0000000..b94506a --- /dev/null +++ b/im/src/lua5/loh/im_process_le64w.loh @@ -0,0 +1,890 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/imlua_process51/im_process_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/imlua_process51/im_process_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 21, 0, 0, 0, 0, 0, 0, 0, + 64,108,117, 97, 53, 47,105,109, 95,112,114,111, 99,101,115,115, 46,108,117, 97, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 13,135, 1, 0, 0, 36, 0, 0, + 0,100, 64, 0, 0,164,128, 0, 0,228,192, 0, 0, 36, 1, 1, 0,100, 65, 1, + 0,128, 1, 0, 0,193, 1, 0, 0, 3, 2, 0, 5,197, 66, 0, 0,198,130,192, + 5,156, 65, 0, 3,128, 1, 0, 0,193,193, 0, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 1, 1, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 1, 0,156, 65, 0, + 1,128, 1, 0, 0,193,129, 1, 0, 1,194, 1, 0, 64, 2,128, 2,133, 66, 0, + 0,134, 2, 66, 5,197, 66, 0, 0,198, 66,194, 5,156, 65, 0, 3,128, 1, 0, + 0,193,129, 2, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 2, 0, 3, 2, 0, + 5,197, 66, 0, 0,198, 2,195, 5,156, 65, 0, 3,128, 1, 0, 0,193, 65, 3, + 0, 3, 2,128, 4,133, 66, 0, 0,134,130, 67, 5,195, 2,128, 5,156, 65, 0, + 3,133, 65, 0, 0,228,129, 1, 0,137,193,129,135,133, 65, 0, 0,228,193, 1, + 0,137,193, 1,136,128, 1, 0, 0,193, 65, 4, 0, 36, 2, 2, 0,100, 66, 2, + 0,156, 65, 0, 2,133, 65, 0, 0,228,129, 2, 0,137,193, 1,137,128, 1,128, + 0,193,193, 4, 0,156, 65, 0, 1,133, 65, 0, 0,228,193, 2, 0,137,193, 1, +138,133, 65, 0, 0,228, 1, 3, 0,137,193,129,138,128, 1, 0, 0,193,129, 5, + 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 5, 0, 36, 66, 3, 0,100,130, 3, + 0,156, 65, 0, 2,128, 1, 0, 0,193, 1, 6, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 65, 6, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 6, 0,156, 65, 0, + 1,128, 1, 0, 0,193,193, 6, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 7, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 7, 0,156, 65, 0, 1,128, 1, 0, + 0,193,129, 7, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 7, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 1, 8, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 8, + 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 8, 0,156, 65, 0, 1,128, 1, 0, + 0,193,193, 8, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 9, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 65, 9, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 9, + 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 9, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 1, 10, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 10, 0,156, 65, 0, + 1,128, 1, 0, 0,193,129, 10, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 10, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 11, 0,156, 65, 0, 1,128, 1, 0, + 0,193, 65, 11, 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 11, 0,156, 65, 0, + 1,128, 1, 0, 0,193,193, 11, 0,156, 65, 0, 1,128, 1, 0, 0,193, 1, 12, + 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 12, 0,156, 65, 0, 1,128, 1, 0, + 0,193,129, 12, 0,156, 65, 0, 1,128, 1, 0, 0,193,193, 12, 0,156, 65, 0, + 1,128, 1, 0, 0,193, 1, 13, 0,156, 65, 0, 1,128, 1, 0, 0,193, 65, 13, + 0,156, 65, 0, 1,128, 1, 0, 0,193,129, 13, 0,156, 65, 0, 1,128, 1, 0, + 0,193,193, 13, 0,156, 65, 0, 1,128, 1,128, 1,193, 1, 14, 0, 3, 2, 0, + 4,100,194, 3, 0,156, 65, 0, 2,133, 65, 0, 0,228, 1, 4, 0,137,193,129, +156,164, 65, 4, 0,192, 1, 0, 0, 1,130, 14, 0, 67, 2,128, 5, 0, 3, 0, + 3,220, 65, 0, 3,192, 1, 0, 0, 1,194, 14, 0, 67, 2,128, 5, 0, 3, 0, + 3,220, 65, 0, 3,192, 1, 0, 0, 1, 2, 15, 0,220, 65, 0, 1,192, 1, 0, + 0, 1, 66, 15, 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 15, 0,220, 65, 0, + 1,192, 1, 0, 0, 1,194, 15, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 16, + 0,220, 65, 0, 1,192, 1, 0, 0, 1, 66, 16, 0,220, 65, 0, 1,192, 1,128, + 0, 1,130, 16, 0,220, 65, 0, 1,197, 65, 0, 0, 36,130, 4, 0,201, 1,130, +161,192, 1,128, 0, 1, 2, 17, 0,220, 65, 0, 1,192, 1, 0, 1, 1, 66, 17, + 0,220, 65, 0, 1,192, 1,128, 1, 1,130, 17, 0,220, 65, 0, 1,192, 1,128, + 0, 1,194, 17, 0, 67, 2,128, 5, 5, 67, 0, 0, 6, 3, 82, 6,220, 65, 0, + 3,197, 65, 0, 0, 36,194, 4, 0,201, 1,130,164,197, 65, 0, 0, 36, 2, 5, + 0,201, 1, 2,165,192, 1,128, 0, 1,194, 18, 0,220, 65, 0, 1,192, 1, 0, + 0, 1, 2, 19, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 66, 19, 0, 67, 2, 0, + 5,197, 66, 0, 0,198,130,211, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, + 0, 1,194, 19, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 20, 0,220, 65, 0, + 1,192, 1, 0, 0, 1, 66, 20, 0,220, 65, 0, 1,197, 65, 0, 0, 36, 66, 5, + 0,201, 1, 2,169,192, 1, 0, 2, 1,194, 20, 0, 67, 2, 0, 5,197, 66, 0, + 0,198, 2,194, 5, 5, 67, 0, 0, 6, 3, 67, 6,220, 65, 0, 3,192, 1, 0, + 1, 1, 2, 21, 0, 67, 2, 0, 5,197, 66, 0, 0,198, 66,213, 5, 5, 67, 0, + 0, 6,131, 85, 6,220, 65, 0, 3,197, 65, 0, 0, 36,130, 5, 0,201, 1,130, +171,197, 65, 0, 0, 36,194, 5, 0,201, 1, 2,172,192, 1, 0, 0, 1, 66, 22, + 0, 67, 2,128, 5, 5, 67, 0, 0, 6, 3, 67, 6,220, 65, 0, 3,192, 1, 0, + 0, 1,130, 22, 0,220, 65, 0, 1,192, 1,128, 0, 1,194, 22, 0,220, 65, 0, + 1,192, 1, 0, 0, 1, 2, 23, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 66, 23, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 23, 0,220, 65, 0, 1,192, 1, 0, + 0, 1,194, 23, 0,220, 65, 0, 1,192, 1, 0, 0, 1, 2, 24, 0, 67, 2,128, + 5, 5, 67, 0, 0, 6,131, 85, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 24, + 0, 67, 2,128, 5, 5, 67, 0, 0, 6,131, 85, 6,220, 65, 0, 3,192, 1, 0, + 0, 1,130, 24, 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 24, 0, 67, 2, 0, + 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, + 0, 1, 2, 25, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, + 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 25, 0, 67, 2, 0, 5,197, 66, 0, + 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1,128, 0, 1,130, 25, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 25, 0, 67, 2, 0, 5,197, 66, 0, + 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1, 2, 26, + 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, + 3,192, 1, 0, 0, 1, 66, 26, 0,220, 65, 0, 1,192, 1, 0, 0, 1,130, 26, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 26, 0,220, 65, 0, 1,192, 1, 0, + 0, 1, 2, 27, 0, 67, 2, 0, 5,197, 66, 0, 0,198,130,195, 5, 3, 3, 0, + 6,220, 65, 0, 3,192, 1, 0, 0, 1, 66, 27, 0, 67, 2, 0, 5,197, 66, 0, + 0,198,130,195, 5, 3, 3, 0, 6,220, 65, 0, 3,192, 1, 0, 0, 1,130, 27, + 0,220, 65, 0, 1,192, 1, 0, 0, 1,194, 27, 0,220, 65, 0, 1, 30, 0,128, + 0,112, 0, 0, 0, 4, 19, 0, 0, 0, 0, 0, 0, 0, 65,110, 97,108,121,122, +101, 70,105,110,100, 82,101,103,105,111,110,115, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 85, 83, 72, 79, 82, 84, + 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 80,101,114, +105,109,101,116,101,114, 76,105,110,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 80,114,117,110,101, 0, 4, 17, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 70,105,108,108, 72,111,108,101,115, 0, 4, + 18, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 72,111,117,103,104, + 76,105,110,101,115, 0, 3, 0, 0, 0, 0, 0,128,102, 64, 4, 5, 0, 0, 0, + 0, 0, 0, 0, 71, 82, 65, 89, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 73, 78, + 84, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 72,111, +117,103,104, 76,105,110,101,115, 68,114, 97,119, 0, 4, 25, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 68,105,115,116, 97,110, 99,101, 84,114, 97, +110,115,102,111,114,109, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 70, 76, 79, 65, + 84, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101, +103,105,111,110, 97,108, 77, 97,120,105,109,117,109, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 66, 73, 78, 65, 82, 89, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 82,101,100,117, 99,101, 78,101,119, 0, 4, 17, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101,115,105,122,101, 78,101, +119, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101, +100,117, 99,101, 66,121, 52, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 67,114,111,112, 78,101,119, 0, 4, 14, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 73,110,115,101,114,116, 0, 4, 21, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 65,100,100, 77, 97,114,103,105,110, +115, 78,101,119, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 82,111,116, 97,116,101, 78,101,119, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 82,111,116, 97,116,101, 82,101,102, 0, 4, 16, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,111,116, 97,116,101, 57, + 48, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,111, +116, 97,116,101, 49, 56, 48, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 77,105,114,114,111,114, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 70,108,105,112, 0, 4, 14, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 82, 97,100,105, 97,108, 0, 4, 25, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, + 67,111,110,118,111,108,118,101, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 69,114,111,100,101, 0, + 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, + 77,111,114,112,104, 68,105,108, 97,116,101, 0, 4, 21, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 79,112,101, +110, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, + 97,121, 77,111,114,112,104, 67,108,111,115,101, 0, 4, 23, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, 84,111, +112, 72, 97,116, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 71,114, 97,121, 77,111,114,112,104, 87,101,108,108, 0, 4, 25, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71,114, 97,121, 77,111,114,112,104, + 71,114, 97,100,105,101,110,116, 0, 4, 24, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 67,111,110,118,111,108,118, +101, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105, +110, 77,111,114,112,104, 69,114,111,100,101, 0, 4, 22, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 68,105,108, 97, +116,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66, +105,110, 77,111,114,112,104, 79,112,101,110, 0, 4, 21, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 67,108,111,115, +101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105, +110, 77,111,114,112,104, 79,117,116,108,105,110,101, 0, 4, 20, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,110, 77,111,114,112,104, 84,104, +105,110, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77, +101,100,105, 97,110, 67,111,110,118,111,108,118,101, 0, 4, 21, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,103,101, 67,111,110,118,111, +108,118,101, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 82, 97,110,107, 67,108,111,115,101,115,116, 67,111,110,118,111,108,118,101, 0, + 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,107, + 77, 97,120, 67,111,110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 82, 97,110,107, 77,105,110, 67,111,110,118,111, +108,118,101, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 67,111,110,118,111,108,118,101, 0, 4, 19, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 67,111,110,118,111,108,118,101, 83,101,112, 0, 4, 19, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 67,111,110,118,111,108,118, +101, 82,101,112, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 67,111,110,118,111,108,118,101, 68,117, 97,108, 0, 4, 23, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 67,111,109,112, 97,115,115, 67,111,110, +118,111,108,118,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 77,101, 97,110, 67,111,110,118,111,108,118,101, 0, 4, 24, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 71, 97,117,115,115,105, 97,110, 67, +111,110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 66, 97,114,108,101,116,116, 67,111,110,118,111,108,118,101, 0, + 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73,110,116,101, +114,108, 97, 99,101, 83,112,108,105,116, 0, 4, 25, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 73,110,116,101,114,108, 97, 99,101, 83,112,108,105, +116, 78,101,119, 0, 4, 30, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 68,105,102,102, 79,102, 71, 97,117,115,115,105, 97,110, 67,111,110,118,111, +108,118,101, 0, 4, 29, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 76, 97,112, 79,102, 71, 97,117,115,115,105, 97,110, 67,111,110,118,111,108,118, +101, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,111, + 98,101,108, 67,111,110,118,111,108,118,101, 0, 4, 26, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 83,112,108,105,110,101, 69,100,103,101, 67,111, +110,118,111,108,118,101, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 80,114,101,119,105,116,116, 67,111,110,118,111,108,118,101, 0, 4, + 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 90,101,114,111, 67, +114,111,115,115,105,110,103, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 67, 97,110,110,121, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 85,110, 65,114,105,116,104,109,101,116,105, 99, 79,112, + 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 65,114,105, +116,104,109,101,116,105, 99, 79,112, 0, 4, 28, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 65,114,105,116,104,109,101,116,105, 99, 67,111,110,115, +116, 79,112, 78,101,119, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 66,108,101,110,100, 67,111,110,115,116, 0, 4, 13, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 66,108,101,110,100, 0, 4, 20, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111,109, +112,108,101,120, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 77,101,114,103,101, 67,111,109,112,108,101,120, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 67, 70, 76, 79, 65, 84, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 77,117,108,116,105,112,108,101, 77,101, 97,110, 78,101, +119, 0, 4, 25, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77,117, +108,116,105,112,108,101, 83,116,100, 68,101,118, 78,101,119, 0, 4, 22, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 65,117,116,111, 67,111,118, 97, +114,105, 97,110, 99,101, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 77,117,108,116,105,112,108,121, 67,111,110,106, 0, 4, 26, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 81,117, 97,110,116,105,122,101, + 82, 71, 66, 85,110,105,102,111,114,109, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, + 77, 65, 80, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 81,117, 97,110,116,105,122,101, 71,114, 97,121, 85,110,105,102,111,114,109, 0, + 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 69,120,112, 97, +110,100, 72,105,115,116,111,103,114, 97,109, 0, 4, 25, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 69,113,117, 97,108,105,122,101, 72,105,115,116, +111,103,114, 97,109, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 83,112,108,105,116, 89, 67,104,114,111,109, 97, 78,101,119, 0, 4, 16, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 72, + 83, 73, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77, +101,114,103,101, 72, 83, 73, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 82, 71, 66, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 66, 89, 84, 69, 0, 4, 26, 0, 0, 0, + 0, 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111,109,112, +111,110,101,110,116,115, 78,101,119, 0, 4, 26, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 77,101,114,103,101, 67,111,109,112,111,110,101,110,116, +115, 78,101,119, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 78,111,114,109, 97,108,105,122,101, 67,111,109,112,111,110,101,110,116,115, + 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82,101,112, +108, 97, 99,101, 67,111,108,111,114, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 66,105,116,119,105,115,101, 79,112, 0, 4, 18, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66,105,116,119,105,115,101, 78, +111,116, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 66, +105,116, 77, 97,115,107, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 66,105,116, 80,108, 97,110,101, 0, 4, 17, 0, 0, 0, 0, 0, 0, + 0, 80,114,111, 99,101,115,115, 84,111,110,101, 71, 97,109,117,116, 0, 4, 19, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 85,110, 78,111,114,109, + 97,108,105,122,101, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101, +115,115, 68,105,114,101, 99,116, 67,111,110,118, 0, 4, 16, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 78,101,103, 97,116,105,118,101, 0, 4, 30, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 82, 97,110,103,101, 67, +111,110,116,114, 97,115,116, 84,104,114,101,115,104,111,108,100, 0, 4, 25, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 76,111, 99, 97,108, 77, 97, +120, 84,104,114,101,115,104,111,108,100, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 84,104,114,101,115,104,111,108,100, 0, 4, 23, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 84,104,114,101,115,104,111, +108,100, 66,121, 68,105,102,102, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 72,121,115,116,101,114,101,115,105,115, 84,104,114,101,115, +104,111,108,100, 0, 4, 27, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 85,110,105,102,111,114,109, 69,114,114, 84,104,114,101,115,104,111,108,100, + 0, 4, 28, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 68,105,102, +117,115,105,111,110, 69,114,114, 84,104,114,101,115,104,111,108,100, 0, 4, 24, + 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 80,101,114, 99,101,110, +116, 84,104,114,101,115,104,111,108,100, 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, + 80,114,111, 99,101,115,115, 79,116,115,117, 84,104,114,101,115,104,111,108,100, + 0, 4, 23, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 77,105,110, + 77, 97,120, 84,104,114,101,115,104,111,108,100, 0, 4, 22, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 83,108,105, 99,101, 84,104,114,101,115,104, +111,108,100, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 80,105,120,101,108, 97,116,101, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 80,111,115,116,101,114,105,122,101, 0, 24, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 25, 0, 0, 0, 0, 5, 0, 9, 17, + 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, + 65, 0, 1,133, 1, 0, 0,192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, + 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, + 0,128, 2,137, 1,130, 3, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101, +114,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 5, 1, 7, 8, + 23, 0, 0, 0,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 4, 1, 0, 0, + 68, 1,128, 0,132, 1, 0, 1,196, 1,128, 1,156,128, 0, 3,196, 0, 0, 2, + 0, 1, 0, 0, 64, 1, 0, 1,133,129, 0, 0,192, 1,128, 0,156, 1, 0, 1, +220,128, 0, 0,218, 0, 0, 0, 22,192, 0,128, 0, 1,128, 1, 64, 1, 0, 1, + 30, 1,128, 1, 22, 0, 0,128,158, 0, 0, 1, 30, 0,128, 0, 3, 0, 0, 0, + 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, + 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, + 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, + 22, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103, +101, 0, 8, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101, +116, 0, 15, 0, 0, 0, 22, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0,119,105,100,116,104, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103, +104,116, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, + 99,101, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, + 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 17, 0, 0, 0, 9, 0, + 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 13, 0, + 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 24, 0, + 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, + 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117, +110, 99,110, 97,109,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0,119,105,100,116,104, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, + 95,116,121,112,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 50, 0, 0, 0, 0, 5, 0, 11, 22, + 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2, 5, +130, 0, 0, 6,194, 64, 4, 65, 2, 1, 0,128, 2, 0, 0, 28, 2,128, 1,156, + 65, 0, 0,133, 1, 0, 0,192, 1, 0, 0, 1, 66, 1, 0,213, 1,130, 3, 36, + 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, + 0,128, 2,137, 1,130, 3, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101, +114,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,102,111,114,109, 97,116, 0, 4, 24, 0, 0, 0, + 0, 0, 0, 0,117,110,100,101,102,105,110,101,100, 32,102,117,110, 99,116,105, +111,110, 32, 96, 37,115, 39, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 78,101,119, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 49, 0, 0, + 0, 5, 2, 7, 10, 24, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, + 0, 68, 1, 0, 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, + 3, 4, 1, 0, 2, 64, 1, 0, 0,128, 1,128, 0,192, 1,128, 1, 5,130, 0, + 0, 64, 2, 0, 1, 28, 2, 0, 1, 28,129, 0, 0, 26, 1, 0, 0, 22,192, 0, +128, 64, 1, 0, 2,128, 1,128, 1, 94, 1,128, 1, 22, 0, 0,128,222, 0, 0, + 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, + 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116, +101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, + 99,107, 0, 0, 0, 0, 0, 24, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, + 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, + 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, + 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, + 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 47, + 0, 0, 0, 49, 0, 0, 0, 5, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115, +114, 99, 95,105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 23, 0, 0, 0, 11, 0, + 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 50, 0, 0, 0, 0, + 0, 23, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 23, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97, +103,101, 0, 8, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114, +101,116, 0, 16, 0, 0, 0, 23, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0,119,105,100,116,104, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105, +103,104,116, 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, + 97, 99,101, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112, +101, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 22, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 38, + 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 49, 0, 0, 0, 49, + 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, + 0, 0, 0, 50, 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102, +117,110, 99,110, 97,109,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, 0, 0, 21, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 21, 0, 0, + 0, 12, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, + 0, 0, 0, 0, 0, 21, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, + 97, 95,116,121,112,101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,102,117,110, 99, 0, 2, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 73, 0, 0, 0, 0, 5, 0, 9, + 17, 0, 0, 0, 69, 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2, +156, 65, 0, 1,133, 1, 0, 0,192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, + 36, 2, 0, 0, 0, 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, + 0, 0,128, 2,137, 1,130, 3, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, + 0, 0, 0, 0, 0,105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115, +101,114,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, 0, 72, 0, 0, 0, 5, 3, 7, + 12, 25, 0, 0, 0, 5, 1, 0, 0, 6, 65, 64, 2, 64, 1, 0, 0,132, 1, 0, + 0,196, 1,128, 0, 4, 2, 0, 1, 68, 2,128, 1, 28,129, 0, 3, 68, 1, 0, + 2,128, 1, 0, 0,192, 1,128, 0, 0, 2, 0, 1, 64, 2, 0, 2,133,130, 0, + 0,192, 2,128, 1,156, 2, 0, 1, 92,129, 0, 0, 90, 1, 0, 0, 22,192, 0, +128,128, 1,128, 2,192, 1, 0, 2,158, 1,128, 1, 22, 0, 0,128, 30, 1, 0, + 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, + 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116, +101, 66, 97,115,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, + 99,107, 0, 0, 0, 0, 0, 25, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, + 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 67, + 0, 0, 0, 67, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, + 0, 0, 0, 70, 0, 0, 0, 72, 0, 0, 0, 6, 0, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 49, 0, 0, 0, 0, 0, 24, 0, + 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 50, + 0, 0, 0, 0, 0, 24, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,115,114, 99, + 95,105,109, 97,103,101, 51, 0, 0, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 24, 0, 0, 0, 10, 0, 0, 0, + 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 8, 0, 0, 0, 24, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 17, 0, 0, 0, 24, 0, + 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, + 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, 0, 0, 0, + 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, 0, 0, 0, + 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, 0, 0, 0, + 0,102,117,110, 99, 0, 17, 0, 0, 0, 57, 0, 0, 0, 57, 0, 0, 0, 58, 0, + 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, + 0, 0, 61, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, + 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 6, 0, + 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105, +103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, + 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, + 0, 0, 0, 97, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, 1, 0, 0, 70, + 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, 1, 0, 0,192, + 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, 0,128, 0, 0, + 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, 1,130, 3, 30, + 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, 4, 0, 0, 0, + 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 84, 0, 0, 0, 96, 0, 0, 0, 5, 1, 7, 10, 35, 0, 0, 0,133, 0, 0, 0, +134, 64, 64, 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, 0,132, 1, 0, 1, +196, 1,128, 1,156,128, 0, 3,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, + 68, 1, 0, 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1,220,128, 0, 3, + 4, 1, 0, 2, 64, 1, 0, 0,128, 1, 0, 1,192, 1,128, 1, 5,130, 0, 0, + 64, 2,128, 0, 28, 2, 0, 1, 28,129, 0, 0, 26, 1, 0, 0, 22, 0, 1,128, + 64, 1, 0, 2,128, 1, 0, 1,192, 1,128, 1, 94, 1, 0, 2, 22,128, 0,128, + 64, 1, 0, 1,128, 1,128, 1, 94, 1,128, 1, 30, 0,128, 0, 3, 0, 0, 0, + 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, + 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 35, 0, + 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, + 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 87, 0, 0, 0, 87, 0, + 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, + 0, 0, 87, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, + 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 0, 91, 0, + 0, 0, 91, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, 0, + 0, 0, 92, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 96, 0, + 0, 0, 5, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, + 97,103,101, 0, 0, 0, 0, 0, 34, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 97,114,103, 0, 0, 0, 0, 0, 34, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, +100,115,116, 95,105,109, 97,103,101, 49, 0, 8, 0, 0, 0, 34, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 50, 0, 16, 0, + 0, 0, 34, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 24, 0, + 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105, +100,116,104, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, + 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, + 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, + 0, 0, 0, 0, 0,102,117,110, 99, 0, 17, 0, 0, 0, 80, 0, 0, 0, 80, 0, + 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 84, 0, 0, 0, 84, 0, + 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, + 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 97, 0, + 0, 0, 6, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97, +109,101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119, +105,100,116,104, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0,104,101,105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, + 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112, +101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117, +110, 99, 0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,103, 0, 0, 0,122, 0, 0, 0, 0, 5, 0, 9, 17, 0, 0, 0, 69, + 1, 0, 0, 70, 1,128, 2,133, 65, 0, 0,192, 1,128, 2,156, 65, 0, 1,133, + 1, 0, 0,192, 1, 0, 0, 1,130, 0, 0,213, 1,130, 3, 36, 2, 0, 0, 0, + 0,128, 0, 0, 0, 0, 1, 0, 0,128, 1, 0, 0, 0, 2, 0, 0,128, 2,137, + 1,130, 3, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, +105,109, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,115,115,101,114,116, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0, 78,101,119, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,108, 0, 0, 0,121, 0, 0, 0, 5, 1, 7, 12, 46, 0, 0, 0, +133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 4, 1, 0, 0, 68, 1,128, 0, +132, 1, 0, 1,196, 1,128, 1,156,128, 0, 3,197, 0, 0, 0,198, 64,192, 1, + 0, 1, 0, 0, 68, 1, 0, 0,132, 1,128, 0,196, 1, 0, 1, 4, 2,128, 1, +220,128, 0, 3, 5, 1, 0, 0, 6, 65, 64, 2, 64, 1, 0, 0,132, 1, 0, 0, +196, 1,128, 0, 4, 2, 0, 1, 68, 2,128, 1, 28,129, 0, 3, 68, 1, 0, 2, +128, 1, 0, 0,192, 1, 0, 1, 0, 2,128, 1, 64, 2, 0, 2,133,130, 0, 0, +192, 2,128, 0,156, 2, 0, 1, 92,129, 0, 0, 90, 1, 0, 0, 22, 64, 1,128, +128, 1,128, 2,192, 1, 0, 1, 0, 2,128, 1, 64, 2, 0, 2,158, 1,128, 2, + 22,192, 0,128,128, 1, 0, 1,192, 1,128, 1, 0, 2, 0, 2,158, 1, 0, 2, + 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, + 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, + 66, 97,115,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99, +107, 0, 0, 0, 0, 0, 46, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, + 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, 0, 0,110, 0, + 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, + 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,112, 0, 0, 0,112, 0, + 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, + 0, 0,112, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, + 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, + 0, 0,116, 0, 0, 0,116, 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, 0, + 0, 0,117, 0, 0, 0,117, 0, 0, 0,117, 0, 0, 0,119, 0, 0, 0,119, 0, + 0, 0,119, 0, 0, 0,119, 0, 0, 0,121, 0, 0, 0, 6, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, + 45, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, + 45, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103, +101, 49, 0, 8, 0, 0, 0, 45, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,100, +115,116, 95,105,109, 97,103,101, 50, 0, 16, 0, 0, 0, 45, 0, 0, 0, 11, 0, + 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 51, 0, 24, 0, 0, + 0, 45, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 33, 0, 0, + 0, 45, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100, +116,104, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 12, 0, + 0, 0, 0, 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 10, 0, + 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, 0, 5, 0, 0, 0, + 0, 0, 0, 0,102,117,110, 99, 0, 17, 0, 0, 0,104, 0, 0, 0,104, 0, 0, + 0,105, 0, 0, 0,105, 0, 0, 0,105, 0, 0, 0,108, 0, 0, 0,108, 0, 0, + 0,108, 0, 0, 0,108, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, + 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,121, 0, 0, 0,122, 0, 0, + 0, 6, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109, +101, 0, 0, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105, +100,116,104, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +104,101,105,103,104,116, 0, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, + 0, 0, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, 95,116,121,112,101, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, + 99, 0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,126, 0, 0, 0,130, 0, 0, 0, 0, 1, 0, 7, 18, 0, 0, 0,100, 0, + 0, 0,133, 0, 0, 0,134, 64, 64, 1,192, 0,128, 0, 11,129, 64, 0, 28, 1, + 0, 1,220,128, 0, 0, 0, 1,128, 0, 75,193, 64, 0, 92, 1, 0, 1, 28,129, + 0, 0,204, 0,129, 1,156,128, 0, 1,143, 0, 65, 1,206,128, 0,130,204, 64, +193, 1,222, 0, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 5, 0, 0, 0, 0, + 0, 0, 0,109, 97,116,104, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,115,113,114, +116, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, 0, + 0, 64, 3, 0, 0, 0, 0, 0, 0,240, 63, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,127, 0, 0, 0,127, 0, 0, 0, 0, 1, 0, 2, 3, 0, 0, 0, 78, + 0, 0, 0, 94, 0, 0, 1, 30, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 0,127, 0, 0, 0,127, 0, 0, 0,127, 0, 0, 0, 1, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, + 0, 18, 0, 0, 0,127, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, + 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, + 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, + 0,129, 0, 0, 0,129, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0, 3, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 17, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,115,113,114, 0, 1, 0, 0, 0, 17, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,114,109, 97,120, 0, 14, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 0, 0, 0, +144, 0, 0, 0, 0, 3, 0, 7, 14, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, + 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220,128, 0, 2, 5, 1, 0, 0, + 6,129, 64, 2, 64, 1, 0, 0,128, 1,128, 1, 28,129,128, 1, 64, 1,128, 1, + 30, 1,128, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, + 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114, +101, 97,116,101, 66, 97,115,101,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 80, +114,111, 99,101,115,115, 82,101,100,117, 99,101, 0, 0, 0, 0, 0, 14, 0, 0, + 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, + 0,142, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, + 0,143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,144, 0, 0, 0, 4, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, + 0, 0, 0, 0, 0, 13, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105, +103,104,116, 0, 0, 0, 0, 0, 13, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, +100,115,116, 95,105,109, 97,103,101, 0, 6, 0, 0, 0, 13, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,146, 0, 0, 0,149, 0, 0, 0, 0, 3, + 0, 7, 14, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0, 64, 1, +128, 0,128, 1, 0, 1,220,128, 0, 2, 5, 1, 0, 0, 6,129, 64, 2, 64, 1, + 0, 0,128, 1,128, 1, 28,129,128, 1, 64, 1,128, 1, 30, 1,128, 1, 30, 0, +128, 0, 3, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, + 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97, +115,101,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, + 82,101,115,105,122,101, 0, 0, 0, 0, 0, 14, 0, 0, 0,147, 0, 0, 0,147, + 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,148, + 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, 0, 0, 0,148, + 0, 0, 0,148, 0, 0, 0,149, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 13, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 0, 0, 0, 0, 13, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 0, 0, + 0, 0, 13, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, + 97,103,101, 0, 6, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, + 75, 0, 64, 0, 92,128, 0, 1, 79, 64,192, 0, 94, 0, 0, 1, 30, 0,128, 0, + 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116,104, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 5, 0, 0, 0,151, 0, 0, 0, +151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0, 1, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 0, 0, 0,152, 0, + 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1, 79, 64, +192, 0, 94, 0, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 0, + 0, 0, 0, 5, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, + 0, 0, 0,152, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105, +109, 97,103,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,154, 0, 0, 0,160, 0, 0, 0, 0, 5, 0, 13, 19, 0, 0, + 0, 77, 65, 0, 1, 76, 1,192, 2,141,193, 0, 1,140, 1, 64, 3,197, 65, 0, + 0,198,129,192, 3, 0, 2, 0, 0, 64, 2,128, 2,128, 2, 0, 3,220,129, 0, + 2, 5, 66, 0, 0, 6,194, 64, 4, 64, 2, 0, 0,128, 2,128, 3,192, 2,128, + 0, 0, 3,128, 1, 28, 66,128, 2,222, 1, 0, 1, 30, 0,128, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 3, 0, 0, 0, 0, 0, 0, 0,105, +109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97, +116,101, 66, 97,115,101,100, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111, + 99,101,115,115, 67,114,111,112, 0, 0, 0, 0, 0, 19, 0, 0, 0,155, 0, 0, + 0,155, 0, 0, 0,156, 0, 0, 0,156, 0, 0, 0,157, 0, 0, 0,157, 0, 0, + 0,157, 0, 0, 0,157, 0, 0, 0,157, 0, 0, 0,157, 0, 0, 0,158, 0, 0, + 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, 0,158, 0, 0, + 0,158, 0, 0, 0,159, 0, 0, 0,160, 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,120,109,105,110, 0, 0, 0, 0, 0, + 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,120,109, 97,120, 0, 0, 0, 0, + 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,121,109,105,110, 0, 0, 0, + 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,121,109, 97,120, 0, 0, + 0, 0, 0, 18, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, + 0, 2, 0, 0, 0, 18, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105, +103,104,116, 0, 4, 0, 0, 0, 18, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, +100,115,116, 95,105,109, 97,103,101, 0, 10, 0, 0, 0, 18, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,164, 0, 0, 0,170, 0, 0, 0, 0, 5, + 0, 13, 19, 0, 0, 0, 77, 65, 0, 1, 76, 1,192, 2,141,193, 0, 1,140, 1, + 64, 3,197, 65, 0, 0,198,129,192, 3, 0, 2, 0, 0, 64, 2,128, 2,128, 2, + 0, 3,220,129, 0, 2, 5, 66, 0, 0, 6,194, 64, 4, 64, 2, 0, 0,128, 2, +128, 3,192, 2,128, 0, 0, 3,128, 1, 28, 66,128, 2,222, 1, 0, 1, 30, 0, +128, 0, 4, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103, +101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0, 80,114,111, 99,101,115,115, 65,100,100, 77, 97,114,103,105,110,115, 0, + 0, 0, 0, 0, 19, 0, 0, 0,165, 0, 0, 0,165, 0, 0, 0,166, 0, 0, 0, +166, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0, +167, 0, 0, 0,167, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0, +168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,169, 0, 0, 0, +170, 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95, +105,109, 97,103,101, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0,120,109,105,110, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,120,109, 97,120, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0,121,109,105,110, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0,121,109, 97,120, 0, 0, 0, 0, 0, 18, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 2, 0, 0, 0, 18, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 4, 0, 0, 0, 18, + 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, + 0, 10, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,172, 0, 0, 0,176, 0, 0, 0, 0, 4, 0, 13, 26, 0, 0, 0, 5, 1, 0, + 0, 6, 65, 64, 2, 75,129, 64, 0, 92,129, 0, 1,139,193, 64, 0,156,129, 0, + 1,192, 1,128, 0, 0, 2, 0, 1, 28,193,128, 2,133, 1, 0, 0,134, 1, 65, + 3,192, 1, 0, 0, 0, 2, 0, 2, 64, 2,128, 2,156,129, 0, 2,197, 1, 0, + 0,198, 65,193, 3, 0, 2, 0, 0, 64, 2, 0, 3,128, 2,128, 0,192, 2, 0, + 1, 0, 3,128, 1,220,129, 0, 3, 0, 2, 0, 3,222, 1,128, 1, 30, 0,128, + 0, 6, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 22, 0, + 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 67, 97,108, 99, 82,111,116, + 97,116,101, 83,105,122,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100, +116,104, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 72,101,105,103,104,116, 0, 4, + 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, + 97,115,101,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115, +115, 82,111,116, 97,116,101, 0, 0, 0, 0, 0, 26, 0, 0, 0,173, 0, 0, 0, +173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0, +173, 0, 0, 0,173, 0, 0, 0,173, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0, +174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,175, 0, 0, 0, +175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0, +175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,176, 0, 0, 0, + 7, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103, +101, 0, 0, 0, 0, 0, 25, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,111, +115, 48, 0, 0, 0, 0, 0, 25, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,115, +105,110, 48, 0, 0, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, +111,114,100,101,114, 0, 0, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0,119,105,100,116,104, 0, 9, 0, 0, 0, 25, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0,104,101,105,103,104,116, 0, 9, 0, 0, 0, 25, 0, 0, 0, 10, + 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 15, 0, 0, + 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,179, 0, 0, + 0,179, 0, 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 75, 0, 64, 0, 93, 0, 0, + 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 72,101,105,103,104,116, 0, 0, 0, 0, 0, 4, 0, 0, 0,179, 0, 0, + 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0, 0, + 1, 0, 3, 4, 0, 0, 0, 75, 0, 64, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, + 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 87,105,100,116, +104, 0, 0, 0, 0, 0, 4, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, + 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, + 97,103,101, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0, 0, 1, 0, 3, 13, 0, 0, 0, + 75, 0, 64, 0, 92,128, 0, 1, 90, 0, 0, 0, 22,192, 0,128, 75, 0, 64, 0, + 93, 0, 0, 1, 94, 0, 0, 0, 22,192, 0,128, 75, 0, 64, 0, 92,128, 0, 1, + 79, 64,192, 0, 94, 0, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 72,101,105,103,104,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 64, 0, 0, 0, 0, 13, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, + 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, + 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, 0, 0, + 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 0, + 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214, + 0, 0, 0,227, 0, 0, 0, 0, 1, 0, 8, 36, 0, 0, 0, 75, 0, 64, 0, 92, +128, 0, 1, 79, 64,192, 0,133,128, 0, 0,134,192, 64, 1,203, 0, 64, 0,220, +128, 0, 1, 1, 65, 0, 0,156,128,128, 1,154, 0, 0, 0, 22, 0, 0,128, 76, + 0,193, 0,133, 64, 1, 0,134,128, 65, 1,192, 0, 0, 0, 3, 1, 0, 2, 64, + 1,128, 0,156,128, 0, 2,197, 64, 1, 0,198,128,193, 1, 0, 1, 0, 0, 67, + 1,128, 2,139, 1, 64, 0,156,129, 0, 1,143, 65, 64, 3,220,128, 0, 2, 5, + 65, 1, 0, 6,193, 65, 2, 64, 1, 0, 0,128, 1, 0, 1,192, 1,128, 1, 28, + 65, 0, 2, 0, 1, 0, 1, 64, 1,128, 1, 30, 1,128, 1, 30, 0,128, 0, 8, + 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 72,101,105,103,104,116, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 64, 4, 5, 0, 0, 0, 0, 0, 0, 0,109, 97,116, +104, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,109,111,100, 0, 3, 0, 0, 0, 0, + 0, 0,240, 63, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, + 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101, +100, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 73,110, +116,101,114,108, 97, 99,101, 83,112,108,105,116, 0, 0, 0, 0, 0, 36, 0, 0, + 0,216, 0, 0, 0,216, 0, 0, 0,216, 0, 0, 0,217, 0, 0, 0,217, 0, 0, + 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, 0,217, 0, 0, + 0,217, 0, 0, 0,218, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, 0, + 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,222, 0, 0, 0,222, 0, 0, + 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, + 0,222, 0, 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, 0, 0,225, 0, 0, + 0,225, 0, 0, 0,225, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, 0, 0, + 0,227, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, + 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 35, 0, 0, 0, 12, 0, 0, 0, 0, + 0, 0, 0,100,115,116, 95,104,101,105,103,104,116, 49, 0, 3, 0, 0, 0, 35, + 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, + 49, 0, 18, 0, 0, 0, 35, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,100,115, +116, 95,105,109, 97,103,101, 50, 0, 26, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 0, 0, 0,235, 0, 0, 0, 0, 1, 0, + 3, 14, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1,133, 64, 0, 0,134,128, 64, + 1, 87,128,128, 0, 22,192, 0,128,133, 64, 0, 0,134,192, 64, 1, 23,128,128, + 0, 22, 64, 0,128,133, 64, 0, 0, 70, 0, 65, 1, 94, 0, 0, 1, 30, 0,128, + 0, 5, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 68, 97,116, 97, 84,121, +112,101, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0, 66, 89, 84, 69, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 85, 83, + 72, 79, 82, 84, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 73, 78, 84, 0, 0, 0, + 0, 0, 14, 0, 0, 0,230, 0, 0, 0,230, 0, 0, 0,231, 0, 0, 0,231, 0, + 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, 0, 0,231, 0, + 0, 0,231, 0, 0, 0,232, 0, 0, 0,232, 0, 0, 0,234, 0, 0, 0,235, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100, 97,116, 97, + 95,116,121,112,101, 0, 2, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,247, 0, 0, 0,251, 0, 0, 0, 0, 3, 0, 9, 13, 0, + 0, 0,197, 0, 0, 0,198, 64,192, 1, 0, 1, 0, 0,220,128, 0, 1, 5, 1, + 0, 0, 6,129, 64, 2, 64, 1, 0, 0,128, 1,128, 0,192, 1,128, 1, 0, 2, + 0, 1, 28, 65,128, 2,222, 0, 0, 1, 30, 0,128, 0, 3, 0, 0, 0, 4, 3, + 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73, +109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 4, 25, 0, 0, + 0, 0, 0, 0, 0, 80,114,111, 99,101,115,115, 65,114,105,116,104,109,101,116, +105, 99, 67,111,110,115,116, 79,112, 0, 0, 0, 0, 0, 13, 0, 0, 0,248, 0, + 0, 0,248, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0,249, 0, 0, 0,249, 0, + 0, 0,249, 0, 0, 0,249, 0, 0, 0,249, 0, 0, 0,249, 0, 0, 0,249, 0, + 0, 0,250, 0, 0, 0,251, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 0, 0, + 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 12, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95, 99,111,110,115,116, 0, 0, 0, + 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,111,112, 0, 0, 0, 0, + 0, 12, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97, +103,101, 0, 4, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 1, 0, 0, 6, 1, 0, 0, 0, 2, 0, 6, 11, 0, 0, 0,133, + 0, 0, 0,134, 64, 64, 1,198,128, 64, 0,156,128, 0, 1,197, 0, 0, 0,198, +192,192, 1, 0, 1, 0, 0, 64, 1, 0, 1,220, 64,128, 1,158, 0, 0, 1, 30, + 0,128, 0, 4, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, + 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, + 97,115,101,100, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 20, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 77,117,108,116,105,112,108,101, 77,101, + 97,110, 0, 0, 0, 0, 0, 11, 0, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, + 1, 0, 0, 3, 1, 0, 0, 4, 1, 0, 0, 4, 1, 0, 0, 4, 1, 0, 0, 4, + 1, 0, 0, 4, 1, 0, 0, 5, 1, 0, 0, 6, 1, 0, 0, 3, 0, 0, 0, 15, + 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 95,108,105,115, +116, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115, +116, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, + 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 4, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 1, 0, 0, 12, 1, + 0, 0, 0, 2, 0, 7, 12, 0, 0, 0,133, 0, 0, 0,134, 64, 64, 1,198,128, + 64, 0,156,128, 0, 1,197, 0, 0, 0,198,192,192, 1, 0, 1, 0, 0, 64, 1, +128, 0,128, 1, 0, 1,220, 64, 0, 2,158, 0, 0, 1, 30, 0,128, 0, 4, 0, + 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, + 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, + 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114, +111, 99,101,115,115, 77,117,108,116,105,112,108,101, 83,116,100, 68,101,118, 0, + 0, 0, 0, 0, 12, 0, 0, 0, 9, 1, 0, 0, 9, 1, 0, 0, 9, 1, 0, 0, + 9, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, + 10, 1, 0, 0, 10, 1, 0, 0, 11, 1, 0, 0, 12, 1, 0, 0, 3, 0, 0, 0, + 15, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 95,108,105, +115,116, 0, 0, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,109, +101, 97,110, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 11, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101, 0, 4, 0, 0, 0, + 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 1, 0, 0, + 26, 1, 0, 0, 0, 1, 0, 8, 28, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0, +128, 0, 0, 0,195, 0, 0, 2, 69, 1, 0, 0, 70,129,192, 2,133, 1, 0, 0, +134,193, 64, 3, 92,128, 0, 3,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, + 3, 1,128, 2,133, 1, 0, 0,134, 1, 65, 3,197, 1, 0, 0,198,193,192, 3, +156,128, 0, 3,197, 0, 0, 0,198, 64,193, 1, 0, 1, 0, 0, 64, 1,128, 0, +128, 1, 0, 1,220, 64, 0, 2,192, 0,128, 0, 0, 1, 0, 1,222, 0,128, 1, + 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, + 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, + 66, 97,115,101,100, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 71, 82, 65, 89, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0, 66, 89, 84, 69, 0, 4, 4, 0, 0, 0, 0, + 0, 0, 0, 82, 71, 66, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 80,114,111, 99, +101,115,115, 83,112,108,105,116, 89, 67,104,114,111,109, 97, 0, 0, 0, 0, 0, + 28, 0, 0, 0, 22, 1, 0, 0, 22, 1, 0, 0, 22, 1, 0, 0, 22, 1, 0, 0, + 22, 1, 0, 0, 22, 1, 0, 0, 22, 1, 0, 0, 22, 1, 0, 0, 22, 1, 0, 0, + 23, 1, 0, 0, 23, 1, 0, 0, 23, 1, 0, 0, 23, 1, 0, 0, 23, 1, 0, 0, + 23, 1, 0, 0, 23, 1, 0, 0, 23, 1, 0, 0, 23, 1, 0, 0, 24, 1, 0, 0, + 24, 1, 0, 0, 24, 1, 0, 0, 24, 1, 0, 0, 24, 1, 0, 0, 24, 1, 0, 0, + 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 26, 1, 0, 0, 3, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0,115,114, 99, 95,105,109, 97,103,101, 0, 0, 0, + 0, 0, 27, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,121, 95,105,109, 97,103, +101, 0, 9, 0, 0, 0, 27, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 99,104, +114,111,109, 97, 95,105,109, 97,103,101, 0, 18, 0, 0, 0, 27, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 1, 0, 0, 39, 1, 0, 0, 0, + 1, 0, 14, 29, 0, 0, 0, 75, 0, 64, 0, 92,128, 0, 1,138, 0, 0, 0,193, + 64, 0, 0, 0, 1,128, 0, 65, 65, 0, 0,224,128, 2,128,197,129, 0, 0,198, +193,192, 3, 0, 2, 0, 1, 69, 2, 1, 0, 70, 66,193, 4,128, 2, 0, 0,195, + 2, 0, 6, 69, 3, 1, 0, 70,131,193, 6, 92, 2,128, 2,220, 65, 0, 0,223, +192,252,127,197, 0, 1, 0,198,192,193, 1, 0, 1, 0, 0, 64, 1, 0, 1,220, + 64,128, 1,197, 0, 2, 0, 0, 1, 0, 1,221, 0, 0, 1,222, 0, 0, 0, 30, + 0,128, 0, 9, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 68,101,112,116, +104, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 6, 0, 0, 0, 0, 0, 0, 0, +116, 97, 98,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,105,110,115,101,114, +116, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, + 0, 0, 0, 73,109, 97,103,101, 67,114,101, 97,116,101, 66, 97,115,101,100, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0, 71, 82, 65, 89, 0, 4, 23, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 83,112,108,105,116, 67,111,109,112,111, +110,101,110,116,115, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99, +107, 0, 0, 0, 0, 0, 29, 0, 0, 0, 32, 1, 0, 0, 32, 1, 0, 0, 33, 1, + 0, 0, 34, 1, 0, 0, 34, 1, 0, 0, 34, 1, 0, 0, 34, 1, 0, 0, 35, 1, + 0, 0, 35, 1, 0, 0, 35, 1, 0, 0, 35, 1, 0, 0, 35, 1, 0, 0, 35, 1, + 0, 0, 35, 1, 0, 0, 35, 1, 0, 0, 35, 1, 0, 0, 35, 1, 0, 0, 35, 1, + 0, 0, 34, 1, 0, 0, 37, 1, 0, 0, 37, 1, 0, 0, 37, 1, 0, 0, 37, 1, + 0, 0, 37, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, 0, 0, 38, 1, + 0, 0, 39, 1, 0, 0, 7, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,115,114, + 99, 95,105,109, 97,103,101, 0, 0, 0, 0, 0, 28, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0,100,101,112,116,104, 0, 2, 0, 0, 0, 28, 0, 0, 0, 11, 0, + 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97,103,101,115, 0, 3, 0, 0, + 0, 28, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,105,110, +100,101,120, 41, 0, 6, 0, 0, 0, 19, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, + 0, 40,102,111,114, 32,108,105,109,105,116, 41, 0, 6, 0, 0, 0, 19, 0, 0, + 0, 11, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, + 6, 0, 0, 0, 19, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 7, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 1, + 0, 0, 45, 1, 0, 0, 0, 1, 0, 6, 14, 0, 0, 0, 69, 0, 0, 0, 70, 64, +192, 0,134,128, 64, 0,195, 0, 0, 2, 69, 1, 0, 0, 70,193,192, 2, 92,128, +128, 2,133, 0, 0, 0,134, 0, 65, 1,192, 0, 0, 0, 0, 1,128, 0,156, 64, +128, 1, 94, 0, 0, 1, 30, 0,128, 0, 5, 0, 0, 0, 4, 3, 0, 0, 0, 0, + 0, 0, 0,105,109, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, + 67,114,101, 97,116,101, 66, 97,115,101,100, 0, 3, 0, 0, 0, 0, 0, 0,240, + 63, 4, 4, 0, 0, 0, 0, 0, 0, 0, 82, 71, 66, 0, 4, 23, 0, 0, 0, 0, + 0, 0, 0, 80,114,111, 99,101,115,115, 77,101,114,103,101, 67,111,109,112,111, +110,101,110,116,115, 0, 0, 0, 0, 0, 14, 0, 0, 0, 42, 1, 0, 0, 42, 1, + 0, 0, 42, 1, 0, 0, 42, 1, 0, 0, 42, 1, 0, 0, 42, 1, 0, 0, 42, 1, + 0, 0, 43, 1, 0, 0, 43, 1, 0, 0, 43, 1, 0, 0, 43, 1, 0, 0, 43, 1, + 0, 0, 44, 1, 0, 0, 45, 1, 0, 0, 2, 0, 0, 0, 15, 0, 0, 0, 0, 0, + 0, 0,115,114, 99, 95,105,109, 97,103,101, 95,108,105,115,116, 0, 0, 0, 0, + 0, 13, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,100,115,116, 95,105,109, 97, +103,101, 0, 7, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0,135, 1, 0, 0, 25, + 0, 0, 0, 50, 0, 0, 0, 73, 0, 0, 0, 97, 0, 0, 0,122, 0, 0, 0,130, + 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, + 0, 0, 0,132, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,134, + 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,135, + 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, + 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,137, + 0, 0, 0,137, 0, 0, 0,137, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,138, + 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,138, 0, 0, 0,139, 0, 0, 0,139, + 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, 0, 0, 0,139, + 0, 0, 0,141, 0, 0, 0,144, 0, 0, 0,141, 0, 0, 0,146, 0, 0, 0,149, + 0, 0, 0,146, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,152, + 0, 0, 0,151, 0, 0, 0,154, 0, 0, 0,160, 0, 0, 0,154, 0, 0, 0,162, + 0, 0, 0,162, 0, 0, 0,162, 0, 0, 0,164, 0, 0, 0,170, 0, 0, 0,164, + 0, 0, 0,172, 0, 0, 0,176, 0, 0, 0,172, 0, 0, 0,178, 0, 0, 0,178, + 0, 0, 0,178, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, + 0, 0, 0,179, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,181, + 0, 0, 0,181, 0, 0, 0,181, 0, 0, 0,182, 0, 0, 0,182, 0, 0, 0,182, + 0, 0, 0,183, 0, 0, 0,183, 0, 0, 0,183, 0, 0, 0,184, 0, 0, 0,184, + 0, 0, 0,184, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,186, + 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0,187, + 0, 0, 0,188, 0, 0, 0,188, 0, 0, 0,188, 0, 0, 0,189, 0, 0, 0,189, + 0, 0, 0,189, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,191, + 0, 0, 0,191, 0, 0, 0,191, 0, 0, 0,192, 0, 0, 0,192, 0, 0, 0,192, + 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,194, 0, 0, 0,194, + 0, 0, 0,194, 0, 0, 0,195, 0, 0, 0,195, 0, 0, 0,195, 0, 0, 0,196, + 0, 0, 0,196, 0, 0, 0,196, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, + 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,199, 0, 0, 0,199, + 0, 0, 0,199, 0, 0, 0,200, 0, 0, 0,200, 0, 0, 0,200, 0, 0, 0,201, + 0, 0, 0,201, 0, 0, 0,201, 0, 0, 0,202, 0, 0, 0,202, 0, 0, 0,202, + 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,204, 0, 0, 0,204, + 0, 0, 0,204, 0, 0, 0,205, 0, 0, 0,205, 0, 0, 0,205, 0, 0, 0,206, + 0, 0, 0,206, 0, 0, 0,206, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, + 0, 0, 0,208, 0, 0, 0,208, 0, 0, 0,208, 0, 0, 0,209, 0, 0, 0,209, + 0, 0, 0,209, 0, 0, 0,210, 0, 0, 0,210, 0, 0, 0,210, 0, 0, 0,211, + 0, 0, 0,211, 0, 0, 0,211, 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,212, + 0, 0, 0,212, 0, 0, 0,212, 0, 0, 0,214, 0, 0, 0,227, 0, 0, 0,214, + 0, 0, 0,235, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,237, 0, 0, 0,237, + 0, 0, 0,237, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,238, 0, 0, 0,238, + 0, 0, 0,238, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,240, + 0, 0, 0,240, 0, 0, 0,240, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0,241, + 0, 0, 0,242, 0, 0, 0,242, 0, 0, 0,242, 0, 0, 0,243, 0, 0, 0,243, + 0, 0, 0,243, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,245, + 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,247, 0, 0, 0,251, 0, 0, 0,247, + 0, 0, 0,253, 0, 0, 0,253, 0, 0, 0,253, 0, 0, 0,254, 0, 0, 0,254, + 0, 0, 0,254, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0, 0, + 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, + 1, 0, 0, 2, 1, 0, 0, 6, 1, 0, 0, 2, 1, 0, 0, 8, 1, 0, 0, 12, + 1, 0, 0, 8, 1, 0, 0, 14, 1, 0, 0, 14, 1, 0, 0, 14, 1, 0, 0, 15, + 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, + 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 17, + 1, 0, 0, 17, 1, 0, 0, 17, 1, 0, 0, 18, 1, 0, 0, 18, 1, 0, 0, 18, + 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 21, 1, 0, 0, 26, + 1, 0, 0, 21, 1, 0, 0, 28, 1, 0, 0, 28, 1, 0, 0, 28, 1, 0, 0, 28, + 1, 0, 0, 28, 1, 0, 0, 28, 1, 0, 0, 28, 1, 0, 0, 28, 1, 0, 0, 29, + 1, 0, 0, 29, 1, 0, 0, 29, 1, 0, 0, 29, 1, 0, 0, 29, 1, 0, 0, 29, + 1, 0, 0, 29, 1, 0, 0, 29, 1, 0, 0, 31, 1, 0, 0, 39, 1, 0, 0, 31, + 1, 0, 0, 41, 1, 0, 0, 45, 1, 0, 0, 41, 1, 0, 0, 47, 1, 0, 0, 47, + 1, 0, 0, 47, 1, 0, 0, 47, 1, 0, 0, 47, 1, 0, 0, 47, 1, 0, 0, 48, + 1, 0, 0, 48, 1, 0, 0, 48, 1, 0, 0, 49, 1, 0, 0, 49, 1, 0, 0, 49, + 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, 50, 1, 0, 0, 51, 1, 0, 0, 51, + 1, 0, 0, 51, 1, 0, 0, 52, 1, 0, 0, 52, 1, 0, 0, 52, 1, 0, 0, 53, + 1, 0, 0, 53, 1, 0, 0, 53, 1, 0, 0, 54, 1, 0, 0, 54, 1, 0, 0, 54, + 1, 0, 0, 54, 1, 0, 0, 54, 1, 0, 0, 54, 1, 0, 0, 55, 1, 0, 0, 55, + 1, 0, 0, 55, 1, 0, 0, 55, 1, 0, 0, 55, 1, 0, 0, 55, 1, 0, 0, 56, + 1, 0, 0, 56, 1, 0, 0, 56, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, 57, + 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, 57, 1, 0, 0, 58, + 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, 58, 1, 0, 0, 58, + 1, 0, 0, 58, 1, 0, 0, 59, 1, 0, 0, 59, 1, 0, 0, 59, 1, 0, 0, 59, + 1, 0, 0, 59, 1, 0, 0, 59, 1, 0, 0, 59, 1, 0, 0, 60, 1, 0, 0, 60, + 1, 0, 0, 60, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 61, + 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 61, 1, 0, 0, 62, 1, 0, 0, 62, + 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, 62, 1, 0, 0, 62, + 1, 0, 0, 63, 1, 0, 0, 63, 1, 0, 0, 63, 1, 0, 0, 64, 1, 0, 0, 64, + 1, 0, 0, 64, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, 65, 1, 0, 0, 66, + 1, 0, 0, 66, 1, 0, 0, 66, 1, 0, 0, 66, 1, 0, 0, 66, 1, 0, 0, 66, + 1, 0, 0, 66, 1, 0, 0, 67, 1, 0, 0, 67, 1, 0, 0, 67, 1, 0, 0, 67, + 1, 0, 0, 67, 1, 0, 0, 67, 1, 0, 0, 67, 1, 0, 0, 68, 1, 0, 0, 68, + 1, 0, 0, 68, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, 69, + 1, 0, 0, 7, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 79,110,101, 83,111, +117,114, 99,101, 79,110,101, 68,101,115,116, 0, 1, 0, 0, 0,134, 1, 0, 0, + 18, 0, 0, 0, 0, 0, 0, 0, 84,119,111, 83,111,117,114, 99,101,115, 79,110, +101, 68,101,115,116, 0, 2, 0, 0, 0,134, 1, 0, 0, 20, 0, 0, 0, 0, 0, + 0, 0, 84,104,114,101,101, 83,111,117,114, 99,101,115, 79,110,101, 68,101,115, +116, 0, 3, 0, 0, 0,134, 1, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 79,110, +101, 83,111,117,114, 99,101, 84,119,111, 68,101,115,116,115, 0, 4, 0, 0, 0, +134, 1, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 79,110,101, 83,111,117,114, 99, +101, 84,104,114,101,101, 68,101,115,116,115, 0, 5, 0, 0, 0,134, 1, 0, 0, + 13, 0, 0, 0, 0, 0, 0, 0,104,111,117,103,104, 95,104,101,105,103,104,116, + 0, 6, 0, 0, 0,134, 1, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0,105,110,116, + 95,100, 97,116, 97,116,121,112,101, 0,182, 0, 0, 0,134, 1, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/imlua_process51/im_process_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/im/src/make_uname b/im/src/make_uname new file mode 100755 index 0000000..b104eac --- /dev/null +++ b/im/src/make_uname @@ -0,0 +1,13 @@ +# This builds all the libraries of the folder for 1 uname + +tecmake $1 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=im_process $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=im_jp2 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=im_fftw $2 $3 $4 $5 $6 $7 $8 + +#tecmake $1 MF=imlua3 $2 $3 $4 $5 $6 $7 $8 + +tecmake $1 MF=imlua5 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=imlua_process5 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=imlua_jp2 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=imlua_fftw5 $2 $3 $4 $5 $6 $7 $8 diff --git a/im/src/make_uname.bat b/im/src/make_uname.bat new file mode 100755 index 0000000..0bfcec1 --- /dev/null +++ b/im/src/make_uname.bat @@ -0,0 +1,74 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +if "%1"=="VCC" goto do-vcc +if "%1"=="vc-all" goto start-all-vc + +call tecmake %1 %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=im_process" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=im_jp2" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=im_avi" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=im_fftw" %2 %3 %4 %5 %6 %7 %8 + +REM call tecmake %1 "MF=imlua3" %2 %3 %4 %5 %6 %7 %8 + +call tecmake %1 "MF=imlua5" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=imlua_process5" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=imlua_jp2" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=imlua_avi" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=imlua_fftw5" %2 %3 %4 %5 %6 %7 %8 + +if "%1"=="vc6" goto vc +if "%1"=="vc7" goto vc +if "%1"=="vc8" goto vc +if "%1"=="vc8_64" goto vc +if "%1"=="vc9" goto vc +if "%1"=="vc9_64" goto vc +if "%1"=="dll" goto vc +if "%1"=="dll7" goto vc +if "%1"=="dll8" goto vc +if "%1"=="dll8_64" goto vc +if "%1"=="dll9" goto vc +if "%1"=="dll9_64" goto vc +if "%1"=="all" goto start-all-vc +goto end + +:vc +call tecmake %1 "MF=im_wmv" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=imlua_wmv" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=im_capture" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=imlua_capture5" %2 %3 %4 %5 %6 %7 %8 +if "%1"=="dll" goto dll +goto end + +:dll +call tecmake mingw4 "MF=im_capture" mingw4-dll +call tecmake mingw3 "MF=im_capture" mingw3-dll +call tecmake bc56 "MF=im_capture" bc56-dll +REM call tecmake owc1 "MF=im_capture" owc1-dll +goto end + +:start-all-vc +call make_uname VCC vc6 %2 %3 %4 %5 %6 +call make_uname VCC vc7 %2 %3 %4 %5 %6 +call make_uname VCC vc8 %2 %3 %4 %5 %6 +call make_uname VCC vc8_64 %2 %3 %4 %5 %6 +call make_uname VCC vc9 %2 %3 %4 %5 %6 +call make_uname VCC vc9_64 %2 %3 %4 %5 %6 +call make_uname VCC dll %2 %3 %4 %5 %6 +call make_uname VCC dll7 %2 %3 %4 %5 %6 +call make_uname VCC dll8 %2 %3 %4 %5 %6 +call make_uname VCC dll8_64 %2 %3 %4 %5 %6 +call make_uname VCC dll9 %2 %3 %4 %5 %6 +call make_uname VCC dll9_64 %2 %3 %4 %5 %6 +goto end + +:do-vcc +call tecmake %2 "MF=im_wmv" %3 %4 %5 %6 %7 %8 +call tecmake %2 "MF=imlua_wmv" %3 %4 %5 %6 %7 %8 +call tecmake %2 "MF=im_capture" %3 %4 %5 %6 %7 %8 +call tecmake %2 "MF=imlua_capture5" %3 %4 %5 %6 %7 %8 +if "%2"=="dll" goto dll +goto end + +:end diff --git a/im/src/old_im.cpp b/im/src/old_im.cpp new file mode 100755 index 0000000..44a0e1c --- /dev/null +++ b/im/src/old_im.cpp @@ -0,0 +1,440 @@ +/** \file + * \brief Old API + * + * See Copyright Notice in im_lib.h + * $Id: old_im.cpp,v 1.2 2009/08/19 18:39:43 scuri Exp $ + */ + +#include +#include +#include + +#include "old_im.h" +#include "im.h" +#include "im_util.h" +#include "im_counter.h" + +long imEncodeColor(unsigned char Red, unsigned char Green, unsigned char Blue) +{ + return imColorEncode(Red, Green, Blue); +} + +void imDecodeColor(unsigned char* Red, unsigned char* Green, unsigned char* Blue, long Color) +{ + imColorDecode(Red, Green, Blue, Color); +} + +static int FormatNew2Old(const char* new_format, const char* compression) +{ + int format; + + if (!imStrEqual(new_format, "BMP")) + format = IM_BMP; + else if (!imStrEqual(new_format, "GIF")) + format = IM_GIF; + else if (!imStrEqual(new_format, "PCX")) + format = IM_PCX; + else if (!imStrEqual(new_format, "RAS")) + format = IM_RAS; + else if (!imStrEqual(new_format, "SGI")) + format = IM_SGI; + else if (!imStrEqual(new_format, "JPEG")) + format = IM_JPG; + else if (!imStrEqual(new_format, "LED")) + format = IM_LED; + else if (!imStrEqual(new_format, "TIFF")) + format = IM_TIF; + else if (!imStrEqual(new_format, "TGA")) + format = IM_TGA; + else + return -1; + + if (!imStrEqual(compression, "NONE")) + format |= IM_DEFAULT; + + return format; +} + +int imFileFormat(char *filename, int* format) +{ + char new_format[10], compression[10]; + int error, image_count; + + imFile* ifile = imFileOpen(filename, &error); + if (!ifile) return error; + + imFileGetInfo(ifile, new_format, compression, &image_count); + imFileClose(ifile); + + *format = FormatNew2Old(new_format, compression); + if (*format == -1) + return IM_ERR_FORMAT; + + return IM_ERR_NONE; +} + +static int ColorMode2Type(int color_mode) +{ + switch (imColorModeSpace(color_mode)) + { + case IM_BINARY: + case IM_GRAY: + case IM_MAP: + return IM_MAP; + default: + return IM_RGB; + } +} + +int imImageInfo(char *filename, int *width, int *height, int *type, int *palette_count) +{ + int error; + imFile* ifile = imFileOpen(filename, &error); + if (!ifile) return error; + + int data_type, color_mode; + error = imFileReadImageInfo(ifile, 0, width, height, &color_mode, &data_type); + if (error) + { + imFileClose(ifile); + return error; + } + + *type = ColorMode2Type(color_mode); + if (*type == -1) + { + imFileClose(ifile); + return IM_ERR_DATA; + } + + if (*type == IM_MAP) + { + long palette[256]; + imFileGetPalette(ifile, palette, palette_count); + } + + imFileClose(ifile); + return IM_ERR_NONE; +} + +static imTiffImageDesc iOldTiffImageDescCB = NULL; +static imGifTranspIndex iOldGifTranspIndexCB = NULL; +static imResolutionCallback iOldResolutionCB = NULL; +static imFileCounterCallback iOldCounterCB = NULL; + +static int iOldFileCounter(int counter, void* user_data, const char* name, int progress) +{ + (void)counter; + if (progress == -1 || progress == 1001) return 1; + return !iOldCounterCB((char*)user_data, progress/10, (name[4] == 'R')? 0: 1); +} + +int imRegisterCallback(imCallback cb, int cb_id, int format) +{ + if (format == IM_ALL) + { + switch(cb_id) + { + case IM_COUNTER_CB: + iOldCounterCB = (imFileCounterCallback)cb; + return 1; + case IM_RESOLUTION_CB: + iOldResolutionCB = (imResolutionCallback)cb; + return 1; + } + } + + if (format == IM_GIF && cb_id == IM_GIF_TRANSPARENT_COLOR_CB) + { + iOldGifTranspIndexCB = (imGifTranspIndex)cb; + return 1; + } + + if (format == IM_TIF && cb_id == IM_TIF_IMAGE_DESCRIPTION_CB) + { + iOldTiffImageDescCB = (imTiffImageDesc)cb; + return 1; + } + + return 0; +} + +static void iConvertMapToRGB(const imbyte* src_map, imbyte* red, imbyte* green, imbyte* blue, int count, const long* palette, const int palette_count) +{ + imbyte r[256], g[256], b[256]; + for (int c = 0; c < palette_count; c++) + imColorDecode(&r[c], &g[c], &b[c], palette[c]); + + for (int i = 0; i < count; i++) + { + int index = *src_map++; + *red++ = r[index]; + *green++ = g[index]; + *blue++ = b[index]; + } +} + +int imLoadRGB(char *filename, unsigned char *red, unsigned char *green, unsigned char *blue) +{ + int error; + imFile* ifile = imFileOpen(filename, &error); + if (!ifile) return error; + + int width, height, color_mode, data_type; + error = imFileReadImageInfo(ifile, 0, &width, &height, &color_mode, &data_type); + if (error) + { + imFileClose(ifile); + return error; + } + + if (iOldResolutionCB) + { + double xres = *(float*)imFileGetAttribute(ifile, "XResolution", NULL, NULL); + double yres = *(float*)imFileGetAttribute(ifile, "YResolution", NULL, NULL); + int res_unit = *(int*)imFileGetAttribute(ifile, "ResolutionUnit", NULL, NULL); + iOldResolutionCB(filename, &xres, &yres, &res_unit); + } + + if (iOldTiffImageDescCB) + { + char* img_desc = (char*)imFileGetAttribute(ifile, "Description", NULL, NULL); + iOldTiffImageDescCB(filename, img_desc); + } + + if (iOldGifTranspIndexCB) + { + unsigned char transp_index = *(unsigned char*)imFileGetAttribute(ifile, "TransparencyIndex", NULL, NULL); + iOldGifTranspIndexCB(filename, &transp_index); + } + + int count = width*height; + void* data; + if (green != red + count || blue != green + count) + data = malloc(imImageDataSize(width, height, IM_RGB, IM_BYTE)); + else + data = red; + + if (!data) + { + imFileClose(ifile); + return IM_ERR_MEM; + } + + if (iOldCounterCB) + imCounterSetCallback(filename, iOldFileCounter); + + error = imFileReadImageData(ifile, data, 1, 0); + if (error) + { + if (data != red) free(data); + imFileClose(ifile); + return error; + } + + if (imColorModeToBitmap(color_mode) != IM_RGB) + { + long palette[256]; + int palette_count; + imFileGetPalette(ifile, palette, &palette_count); + iConvertMapToRGB((imbyte*)data, red, green, blue, count, palette, palette_count); + } + else if (data != red) + { + memcpy(red, data, count); + memcpy(green, (unsigned char*)data+count, count); + memcpy(blue, (unsigned char*)data+2*count, count); + } + + imFileClose(ifile); + + if (data != red) free(data); + return IM_ERR_NONE; +} + +int imLoadMap(char *filename, unsigned char *map, long *palette) +{ + int error; + imFile* ifile = imFileOpen(filename, &error); + if (!ifile) return error; + + int width, height, color_mode, data_type; + error = imFileReadImageInfo(ifile, 0, &width, &height, &color_mode, &data_type); + if (error) + { + imFileClose(ifile); + return error; + } + + if (imColorModeSpace(color_mode) != IM_MAP && + imColorModeSpace(color_mode) != IM_GRAY && + imColorModeSpace(color_mode) != IM_BINARY) + return IM_ERR_DATA; + + if (iOldResolutionCB) + { + double xres = *(float*)imFileGetAttribute(ifile, "XResolution", NULL, NULL); + double yres = *(float*)imFileGetAttribute(ifile, "YResolution", NULL, NULL); + int res_unit = *(int*)imFileGetAttribute(ifile, "ResolutionUnit", NULL, NULL); + iOldResolutionCB(filename, &xres, &yres, &res_unit); + } + + if (iOldTiffImageDescCB) + { + char* img_desc = (char*)imFileGetAttribute(ifile, "Description", NULL, NULL); + iOldTiffImageDescCB(filename, img_desc); + } + + if (iOldGifTranspIndexCB) + { + unsigned char transp_index = *(unsigned char*)imFileGetAttribute(ifile, "TransparencyIndex", NULL, NULL); + iOldGifTranspIndexCB(filename, &transp_index); + } + + if (iOldCounterCB) + imCounterSetCallback(filename, iOldFileCounter); + + error = imFileReadImageData(ifile, map, 1, 0); + if (error) + { + imFileClose(ifile); + return error; + } + + int palette_count; + imFileGetPalette(ifile, palette, &palette_count); + + imFileClose(ifile); + + return IM_ERR_NONE; +} + +static char* i_format_old2new[] = {"BMP", "PCX", "GIF", "TIFF", "RAS", "SGI", "JPEG", "LED", "TGA"}; + +int imSaveRGB(int width, int height, int format, unsigned char *red, unsigned char *green, unsigned char *blue, char *filename) +{ + int error; + char* new_format = i_format_old2new[format & 0x00FF]; + + imFile* ifile = imFileNew(filename, new_format, &error); + if (!ifile) return error; + + if (format & 0xFF00) + imFileSetInfo(ifile, NULL); + else + imFileSetInfo(ifile, "NONE"); + + if (iOldResolutionCB) + { + double xres, yres; + int res_unit; + iOldResolutionCB(filename, &xres, &yres, &res_unit); + float fxres=(float)xres, fyres=(float)yres; + imFileSetAttribute(ifile, "XResolution", IM_FLOAT, 1, (void*)&fxres); + imFileSetAttribute(ifile, "YResolution", IM_FLOAT, 1, (void*)&fyres); + imFileSetAttribute(ifile, "ResolutionUnit", IM_INT, 1, (void*)&res_unit); + } + + if (iOldTiffImageDescCB) + { + char img_desc[50]; + iOldTiffImageDescCB(filename, img_desc); + imFileSetAttribute(ifile, "Description", IM_BYTE, -1, (void*)img_desc); + } + + if (iOldGifTranspIndexCB) + { + unsigned char transp_index; + iOldGifTranspIndexCB(filename, &transp_index); + imFileSetAttribute(ifile, "TransparencyIndex", IM_BYTE, 1, (void*)&transp_index); + } + + error = imFileWriteImageInfo(ifile, width, height, IM_RGB, IM_BYTE); + if (error) + { + imFileClose(ifile); + return error; + } + + if (iOldCounterCB) + imCounterSetCallback(filename, iOldFileCounter); + + int count = width*height; + void* data; + if (green != red + count || blue != green + count) + data = malloc(imImageDataSize(width, height, IM_RGB, IM_BYTE)); + else + data = red; + + if (!data) + { + imFileClose(ifile); + return IM_ERR_MEM; + } + + if (data != red) + { + memcpy(data, red, count); + memcpy((unsigned char*)data+count, green, count); + memcpy((unsigned char*)data+2*count, blue, count); + } + + error = imFileWriteImageData(ifile, data); + imFileClose(ifile); + if (data != red) free(data); + return error; +} + +int imSaveMap(int width, int height, int format, unsigned char *map, int palette_count, long *palette, char *filename) +{ + int error; + char* new_format = i_format_old2new[format & 0x00FF]; + imFile* ifile = imFileNew(filename, new_format, &error); + if (!ifile) return error; + + if (format & 0xFF00) + imFileSetInfo(ifile, NULL); + else + imFileSetInfo(ifile, "NONE"); + + imFileSetPalette(ifile, palette, palette_count); + + if (iOldResolutionCB) + { + double xres, yres; + int res_unit; + iOldResolutionCB(filename, &xres, &yres, &res_unit); + float fxres=(float)xres, fyres=(float)yres; + imFileSetAttribute(ifile, "XResolution", IM_FLOAT, 1, (void*)&fxres); + imFileSetAttribute(ifile, "YResolution", IM_FLOAT, 1, (void*)&fyres); + imFileSetAttribute(ifile, "ResolutionUnit", IM_INT, 1, (void*)&res_unit); + } + + if (iOldTiffImageDescCB) + { + char img_desc[50]; + iOldTiffImageDescCB(filename, img_desc); + imFileSetAttribute(ifile, "Description", IM_BYTE, -1, (void*)img_desc); + } + + if (iOldGifTranspIndexCB) + { + unsigned char transp_index; + iOldGifTranspIndexCB(filename, &transp_index); + imFileSetAttribute(ifile, "TransparencyIndex", IM_BYTE, 1, (void*)&transp_index); + } + + error = imFileWriteImageInfo(ifile, width, height, IM_MAP, IM_BYTE); + if (error) + { + imFileClose(ifile); + return error; + } + + if (iOldCounterCB) + imCounterSetCallback(filename, iOldFileCounter); + + error = imFileWriteImageData(ifile, map); + imFileClose(ifile); + return error; +} diff --git a/im/src/old_imcolor.c b/im/src/old_imcolor.c new file mode 100755 index 0000000..0c6b353 --- /dev/null +++ b/im/src/old_imcolor.c @@ -0,0 +1,75 @@ +/** \file + * \brief Old resize/stretch functions + * + * See Copyright Notice in im_lib.h + * $Id: old_imcolor.c,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + +#include "old_im.h" +#include "im.h" +#include "im_util.h" +#include "im_image.h" +#include "im_convert.h" + +void imRGB2Map(int width, int height, + unsigned char *red, unsigned char *green, unsigned char *blue, + unsigned char *map, int palette_count, long *palette) +{ + imConvertRGB2Map(width, height, + red, green, blue, + map, palette, &palette_count); +} + +void imMap2RGB(int width, int height, unsigned char *map, int palette_count, long *palette, unsigned char *red, unsigned char *green, unsigned char *blue) +{ + int i, count, c, index; + unsigned char r[256], g[256], b[256]; + + for (c = 0; c < palette_count; c++) + imColorDecode(&r[c], &g[c], &b[c], palette[c]); + + count = width*height; + for (i = 0; i < count; i++) + { + index = *map++; + *red++ = r[index]; + *green++ = g[index]; + *blue++ = b[index]; + } +} + +void imRGB2Gray(int width, int height, unsigned char *red, unsigned char *green, unsigned char *blue, unsigned char *map, long *grays) +{ + int i, count, c; + + for (c = 0; c < 256; c++) + *grays++ = imColorEncode((unsigned char)c, (unsigned char)c, (unsigned char)c); + + count = width*height; + for (i = 0; i < count; i++) + { + *map++ = (unsigned char)((*red++ * 30 + *green++ * 59 + *blue++ * 11) / 100); + } +} + +void imMap2Gray(int width, int height, unsigned char *map, int palette_count, long *palette, unsigned char *gray_map, long *grays) +{ + int i, count, c; + unsigned char cnv_table[256]; + unsigned char r, g, b; + + for (c = 0; c < 256; c++) + *grays++ = imColorEncode((unsigned char)c, (unsigned char)c, (unsigned char)c); + + for (c = 0; c < palette_count; c++) + { + imColorDecode(&r, &g, &b, palette[c]); + cnv_table[c] = (unsigned char)((r * 30 + g * 59 + b * 11) / 100); + } + + count = width*height; + for (i = 0; i < count; i++) + { + *gray_map++ = cnv_table[*map++]; + } +} diff --git a/im/src/old_imresize.c b/im/src/old_imresize.c new file mode 100755 index 0000000..8191037 --- /dev/null +++ b/im/src/old_imresize.c @@ -0,0 +1,117 @@ +/** \file + * \brief Old resize/stretch functions + * + * See Copyright Notice in im_lib.h + * $Id: old_imresize.c,v 1.1 2008/10/17 06:10:16 scuri Exp $ + */ + +#include "old_im.h" + +#include +#include +#include + + +/* + BILINEAR INTERPOLATION: + + x' = floor(x) f(x' , y') = fll + y' = floor(y) f(x' , y'+ 1) = flh + f(x'+ 1, y') = fhl + t = x - x' f(x'+ 1, y'+ 1) = fhh + u = y - y' + + f(x,y) = (1-t) * (1-u) * f(x' , y'), + (1-t) * u * f(x' , y'+ 1), + t * (1-u) * f(x'+ 1, y'), + t * u * f(x'+ 1, y'+ 1) + + f(x,y) = fll + (re-arranging) + t * (fhl - fll), + u * (flh - fll), + u * t * (fhh - flh - fhl + fll) + +*/ + +void imResize(int src_width, int src_height, unsigned char *src_map, int dst_width, int dst_height, unsigned char *dst_map) +{ + /* Do bilinear interpolation */ + + unsigned char *line_mapl, *line_maph; + double t, u, src_x, src_y, factor; + int fhh, fll, fhl, flh, xl, yl, xh, yh, x, y; + + int *XL = (int*)malloc(dst_width * sizeof(int)); + double *T = (double*)malloc(dst_width * sizeof(double)); + + factor = (double)(src_width-1) / (double)(dst_width-1); + for (x = 0; x < dst_width; x++) + { + src_x = x * factor; + xl = (int)floor(src_x); + T[x] = src_x - xl; + XL[x] = xl; + } + + factor = (double)(src_height-1) / (double)(dst_height-1); + + for (y = 0; y < dst_height; y++) + { + src_y = y * factor; + yl = (int)floor(src_y); + yh = (yl == src_height-1)? yl: yl + 1; + u = src_y - yl; + + line_mapl = src_map + yl * src_width; + line_maph = src_map + yh * src_width; + + for (x = 0; x < dst_width; x++) + { + xl = XL[x]; + xh = (xl == src_width-1)? xl: xl + 1; + t = T[x]; + + fll = line_mapl[xl]; + fhl = line_mapl[xh]; + flh = line_maph[xl]; + fhh = line_maph[xh]; + + *(dst_map++) = (unsigned char)(u * t * (fhh - flh - fhl + fll) + t * (fhl - fll) + u * (flh - fll) + fll); + } + } + + free(XL); + free(T); +} + +void imStretch(int src_width, int src_height, unsigned char *src_map, int dst_width, int dst_height, unsigned char *dst_map) +{ + int x, y, offset; + double factor; + unsigned char *line_map; + int* XTab = (int*)malloc(dst_width*sizeof(int)); + + /* initialize convertion tables to speed up the stretch process */ + factor = (double)(src_width-1) / (double)(dst_width-1); + for(x = 0; x < dst_width; x++) + XTab[x] = (int)(factor * x + 0.5); + + factor = (double)(src_height-1) / (double)(dst_height-1); + + line_map = src_map; + + for (y = 0; y < dst_height; y++) + { + for (x = 0; x < dst_width; x++) + { + offset = XTab[x]; + *(dst_map++) = line_map[offset]; + } + + offset = ((int)(factor * y + 0.5)) * src_width; + line_map = src_map + offset; + } + + free(XTab); +} + diff --git a/im/src/process/im_analyze.cpp b/im/src/process/im_analyze.cpp new file mode 100755 index 0000000..6fa9405 --- /dev/null +++ b/im/src/process/im_analyze.cpp @@ -0,0 +1,1268 @@ +/** \file + * \brief Image Analysis + * + * See Copyright Notice in im_lib.h + * $Id: im_analyze.cpp,v 1.2 2009/09/28 20:19:09 scuri Exp $ + */ + + +#include +#include +#include + +#include "im_process_ana.h" +#include "im_process_pon.h" + +#include +#include +#include +#include + +#define MAX_COUNT 65536 // maximum number of regions + +/* ajust the alias table to be a remap table (final step) */ +static void alias_update(imushort* alias_table, int ®ion_count) +{ + int i, real_count = region_count; + + for (i = 0; i < region_count; i++) + { + if (alias_table[i]) + { + // search for the first alias + imushort prev = alias_table[i]; + while (alias_table[prev]) + prev = alias_table[prev]; + + alias_table[i] = prev; + real_count--; // decrement aliases from the region count + } + } + + // now all the aliases in the same group point to only one alias + // transform the alias table into a remap table + + alias_table[0] = 0; + alias_table[1] = 0; // border is mapped to background + + int r = 1; + for (i = 2; i < region_count; i++) + { + if (!alias_table[i]) + { + alias_table[i] = (imushort)r; // only non alias get real values + r++; + } + else + alias_table[i] = (imushort)(alias_table[alias_table[i]]); + } + + region_count = real_count-2; // remove the regions (background,border) from the count +} + +/* find the smallest region number to be set as alias. */ +static void alias_getmin(imushort* alias_table, imushort region, imushort &min) +{ + while (alias_table[region]) + { + if (min > alias_table[region]) + min = alias_table[region]; + + region = alias_table[region]; + } +} + +/* replace all the aliases of a region by its smallest value. */ +static void alias_setmin(imushort* alias_table, imushort region, imushort min) +{ + while (alias_table[region]) + { + imushort next_region = alias_table[region]; + alias_table[region] = min; + region = next_region; + } + + if (region != min) + alias_table[region] = min; +} + +/* set a region number to be an alias of another */ +static void alias_set(imushort* alias_table, imushort region1, imushort region2) +{ + if (region1 == region2) + return; + + imushort min = region1 MAX_COUNT) + { + delete [] alias_table; + return -1; + } + } + } + } + } + + pmap1 = pmap; + new_pmap1 = new_pmap; + pmap += width; + new_pmap += width; + } + + // now all pixels are marked, + // but some marks are aliases to others + + // ajust the alias table to be a remap table + // and return the real region count + alias_update(alias_table, region_count); + + int count = width*height; + for (i = 0; i < count; i++) + { + new_map[i] = alias_table[new_map[i]]; + } + + delete [] alias_table; + + return region_count; +} + +static int DoAnalyzeFindRegionsBorder(int width, int height, imbyte* map, imushort* new_map, int connect) +{ + int i, j; + + imbyte* pmap1 = map - width; // previous line (line -1 = invalid) + imushort* new_pmap1 = new_map - width; + + imbyte* pmap = map; // current line (line 0) + imushort* new_pmap = new_map; + + int region_count = 2; // still consider: 0- background, 1-border + imushort* alias_table = new imushort [MAX_COUNT]; + memset(alias_table, 0, MAX_COUNT); // aliases are all zero at start (not used) + + for (i = 0; i < height; i++) + { + for (j = 0; j < width; j++) + { + if (pmap[j]) + { + int b01 = j > 0? 1: 0; // valid for pmap[j-1] + int b10 = i > 0? 1: 0; // valid for pmap1[j] + int b11 = i > 0 && j > 0? 1: 0; // valid for pmap1[j-1] + int b12 = i > 0 && j < width-1? 1: 0; // valid for pmap1[j+1] + + if ((b01&&pmap[j-1]) || (b10&&pmap1[j]) || + (connect == 8 && ((b11&&pmap1[j-1]) || (b12&&pmap1[j+1])))) // 4 or 8 connected to the previous neighbors + { + imushort region = 0; + + if (b01&&pmap[j-1]) + { + if (!region) + region = new_pmap[j-1]; // horizontal neighbor -00 + else // X1 + { + // this is a right border pixel that connects to an horizontal neighbor + + // this pixel can connect two different regions + alias_set(alias_table, region, new_pmap[j-1]); + } + } + + if (b10&&pmap1[j]) // vertical neighbor + { + if (!region) + region = new_pmap1[j]; // isolated vertical neighbor -X- + else // 01 + { + // an horizontal neighbor connects to a vertical neighbor -X- + // X1 + + // this pixel can connect two different regions + alias_set(alias_table, region, new_pmap1[j]); + } + } + else if (region && connect == 8 && (b12&&pmap1[j+1])) + { + // an horizontal neighbor connects to a right corner neighbor 00X + // X1 + + // this pixel can connect two different regions + alias_set(alias_table, region, new_pmap1[j+1]); + } + + if (connect == 8 && ((b11&&pmap1[j-1]) || (b12&&pmap1[j+1])) && !region) // isolated corner + { + // a left corner neighbor or a right corner neighbor X0X + // 01 + + if (b11&&pmap1[j-1]) // left corner + region = new_pmap1[j-1]; + + if (b12&&pmap1[j+1]) // right corner + { + if (!region) // isolated right corner + region = new_pmap1[j+1]; + else + { + // this pixel can connect two different regions + alias_set(alias_table, new_pmap1[j-1], new_pmap1[j+1]); + } + } + } + + new_pmap[j] = region; + } + else + { + // this pixel touches no pixels + + // create a new region 000 + // 01 + new_pmap[j] = (imushort)region_count; + region_count++; + + if (region_count > MAX_COUNT) + { + delete [] alias_table; + return -1; + } + } + } + } + + pmap1 = pmap; + new_pmap1 = new_pmap; + pmap += width; + new_pmap += width; + } + + // now all pixels are marked, + // but some marks are aliases to others + + // ajust the alias table to be a remap table + // and return the real region count + alias_update(alias_table, region_count); + + int count = width*height; + for (i = 0; i < count; i++) + { + new_map[i] = alias_table[new_map[i]]; + } + + delete [] alias_table; + + return region_count; +} + +int imAnalyzeFindRegions(const imImage* image, imImage* NewImage, int connect, int touch_border) +{ + imImageSetAttribute(NewImage, "REGION_CONNECT", IM_BYTE, 1, connect==4?"4":"8"); + if (touch_border) + return DoAnalyzeFindRegionsBorder(image->width, image->height, (imbyte*)image->data[0], (imushort*)NewImage->data[0], connect); + else + return DoAnalyzeFindRegions(image->width, image->height, (imbyte*)image->data[0], (imushort*)NewImage->data[0], connect); +} + +void imAnalyzeMeasureArea(const imImage* image, int* data_area, int region_count) +{ + imushort* img_data = (imushort*)image->data[0]; + + memset(data_area, 0, region_count*sizeof(int)); + + for (int i = 0; i < image->count; i++) + { + if (*img_data) + data_area[(*img_data) - 1]++; + img_data++; + } +} + +void imAnalyzeMeasureCentroid(const imImage* image, const int* data_area, int region_count, float* data_cx, float* data_cy) +{ + imushort* img_data = (imushort*)image->data[0]; + int* local_data_area = 0; + + if (!data_area) + { + local_data_area = (int*)malloc(region_count*sizeof(int)); + imAnalyzeMeasureArea(image, local_data_area, region_count); + data_area = (const int*)local_data_area; + } + + if (data_cx) memset(data_cx, 0, region_count*sizeof(float)); + if (data_cy) memset(data_cy, 0, region_count*sizeof(float)); + + for (int y = 0; y < image->height; y++) + { + int offset = y*image->width; + + for (int x = 0; x < image->width; x++) + { + int region_index = img_data[offset+x]; + if (region_index) + { + if (data_cx) data_cx[region_index-1] += (float)x; + if (data_cy) data_cy[region_index-1] += (float)y; + } + } + } + + for (int i = 0; i < region_count; i++) + { + if (data_cx) data_cx[i] /= (float)data_area[i]; + if (data_cy) data_cy[i] /= (float)data_area[i]; + } + + if (local_data_area) + free(local_data_area); +} + +static inline double ipow(double x, int j) +{ + double r = 1.0; + for (int i = 0; i < j; i++) + r *= x; + return r; +} + +static void iCalcMoment(double* cm, int px, int py, const imImage* image, const float* cx, const float* cy, int region_count) +{ + imushort* img_data = (imushort*)image->data[0]; + + memset(cm, 0, region_count*sizeof(double)); + + for (int y = 0; y < image->height; y++) + { + int offset = y*image->width; + + for (int x = 0; x < image->width; x++) + { + int region_index = img_data[offset+x]; + if (region_index) + { + int i = region_index-1; + + if (px == 0) + cm[i] += ipow(y-cy[i],py); + else if (py == 0) + cm[i] += ipow(x-cx[i],px); + else + cm[i] += ipow(x-cx[i],px)*ipow(y-cy[i],py); + } + } + } +} + +template +static inline int IsPerimeterPoint(T* map, int width, int height, int x, int y) +{ + // map here points to the start of the line, even if its an invalid line. + + // if outside the image, then is not a perimeter line. + if (x == -1 || x == width || + y == -1 || y == height) + return 0; + + T v = map[x]; // here v is image(x,y) + if (!v) + return 0; + + // if touches the border, then is a perimeter line. + if (x == 0 || x == width-1 || + y == 0 || y == height-1) + return 1; + + // if has 4 connected neighbors, then is a perimeter line. + if (map[width+x] != v || + map[x+1] != v || + map[x-1] != v || + map[-width+x] != v) + return 1; + + return 0; +} + +void imAnalyzeMeasurePrincipalAxis(const imImage* image, const int* data_area, const float* data_cx, const float* data_cy, + const int region_count, float* major_slope, float* major_length, + float* minor_slope, float* minor_length) +{ + int i; + int *local_data_area = 0; + float *local_data_cx = 0, *local_data_cy = 0; + + if (!data_area) + { + local_data_area = (int*)malloc(region_count*sizeof(int)); + imAnalyzeMeasureArea(image, local_data_area, region_count); + data_area = (const int*)local_data_area; + } + + if (!data_cx || !data_cy) + { + if (!data_cx) + { + local_data_cx = (float*)malloc(region_count*sizeof(float)); + data_cx = (const float*)local_data_cx; + } + + if (!data_cy) + { + local_data_cy = (float*)malloc(region_count*sizeof(float)); + data_cy = (const float*)local_data_cy; + } + + if (local_data_cx && local_data_cy) + imAnalyzeMeasureCentroid(image, data_area, region_count, local_data_cx, local_data_cy); + else if (local_data_cx) + imAnalyzeMeasureCentroid(image, data_area, region_count, local_data_cx, NULL); + else if (local_data_cy) + imAnalyzeMeasureCentroid(image, data_area, region_count, NULL, local_data_cy); + } + + // additional moments + double* cm20 = (double*)malloc(region_count*sizeof(double)); + double* cm02 = (double*)malloc(region_count*sizeof(double)); + double* cm11 = (double*)malloc(region_count*sizeof(double)); + + iCalcMoment(cm20, 2, 0, image, data_cx, data_cy, region_count); + iCalcMoment(cm02, 0, 2, image, data_cx, data_cy, region_count); + iCalcMoment(cm11, 1, 1, image, data_cx, data_cy, region_count); + + float *local_major_slope = 0, *local_minor_slope = 0; + if (!major_slope) + { + local_major_slope = (float*)malloc(region_count*sizeof(float)); + major_slope = local_major_slope; + } + if (!minor_slope) + { + local_minor_slope = (float*)malloc(region_count*sizeof(float)); + minor_slope = local_minor_slope; + } + +#define RAD2DEG 57.296 + + // We are going to find 2 axis parameters. + // Axis 1 are located in quadrants 1-3 + // Axis 2 are located in quadrants 2-4 + + // Quadrants + // 2 | 1 + // ----- + // 3 | 4 + + // line coeficients for lines that belongs to axis 1 and 2 + float* A1 = (float*)malloc(region_count*sizeof(float)); + float* A2 = (float*)malloc(region_count*sizeof(float)); + float* C1 = (float*)malloc(region_count*sizeof(float)); + float* C2 = (float*)malloc(region_count*sizeof(float)); + + float *slope1 = major_slope; // Use major_slope as a storage place, + float *slope2 = minor_slope; // and create an alias to make code clear. + + for (i = 0; i < region_count; i++) + { + if (cm11[i] == 0) + { + slope1[i] = 0; + slope2[i] = 90; + + // These should not be used + A1[i] = 0; + A2[i] = 0; // infinite + C1[i] = 0; // data_cy[i] + C2[i] = 0; + } + else + { + double b = (cm20[i] - cm02[i])/cm11[i]; + double delta = sqrt(b*b + 4.0); + double r1 = (-b-delta)/2.0; + double r2 = (-b+delta)/2.0; + float a1 = (float)(atan(r1)*RAD2DEG + 90); // to avoid negative results + float a2 = (float)(atan(r2)*RAD2DEG + 90); + + if (a1 == 180) a1 = 0; + if (a2 == 180) a2 = 0; + + if (a1 < 90) // a1 is quadrants q1-q3 + { + slope1[i] = a1; + slope2[i] = a2; + A1[i] = (float)r1; + A2[i] = (float)r2; + } + else // a2 is quadrants q1-q3 + { + slope1[i] = a2; + slope2[i] = a1; + A1[i] = (float)r2; + A2[i] = (float)r1; + } + + C1[i] = data_cy[i] - A1[i] * data_cx[i]; + C2[i] = data_cy[i] - A2[i] * data_cx[i]; + } + } + + // moments are not necessary anymore + free(cm20); free(cm02); free(cm11); + cm20 = 0; cm02 = 0; cm11 = 0; + + // maximum distance from a point in the perimeter to an axis in each side of the axis + // D1 is distance to axis 1, a and b are sides + float* D1a = (float*)malloc(region_count*sizeof(float)); + float* D1b = (float*)malloc(region_count*sizeof(float)); + float* D2a = (float*)malloc(region_count*sizeof(float)); + float* D2b = (float*)malloc(region_count*sizeof(float)); + memset(D1a, 0, region_count*sizeof(float)); + memset(D1b, 0, region_count*sizeof(float)); + memset(D2a, 0, region_count*sizeof(float)); + memset(D2b, 0, region_count*sizeof(float)); + + imushort* img_data = (imushort*)image->data[0]; + int width = image->width; + int height = image->height; + for (int y = 0; y < height; y++) + { + int offset = y*width; + + for (int x = 0; x < width; x++) + { + if (IsPerimeterPoint(img_data+offset, width, height, x, y)) + { + i = img_data[offset+x] - 1; + + float d1, d2; + if (slope2[i] == 90) + { + d2 = y - data_cy[i]; // I ckecked this many times, looks odd but it is correct. + d1 = x - data_cx[i]; + } + else + { + d1 = A1[i]*x - y + C1[i]; + d2 = A2[i]*x - y + C2[i]; + } + + if (d1 < 0) + { + d1 = (float)fabs(d1); + if (d1 > D1a[i]) + D1a[i] = d1; + } + else + { + if (d1 > D1b[i]) + D1b[i] = d1; + } + + if (d2 < 0) + { + d2 = (float)fabs(d2); + if (d2 > D2a[i]) + D2a[i] = d2; + } + else + { + if (d2 > D2b[i]) + D2b[i] = d2; + } + } + } + } + + for (i = 0; i < region_count; i++) + { + float AB1 = (float)sqrt(A1[i]*A1[i] + 1); + float AB2 = (float)sqrt(A2[i]*A2[i] + 1); + + float D1 = (D1a[i] + D1b[i]) / AB1; + float D2 = (D2a[i] + D2b[i]) / AB2; + + if (D1 < D2) // Major Axis in 2-4 quadrants + { + // now remember that we did an alias before + // slope1 -> major_slope + // slope2 -> minor_slope + + float tmp = major_slope[i]; + major_slope[i] = minor_slope[i]; + minor_slope[i] = tmp; + + if (minor_length) minor_length[i] = D1; + if (major_length) major_length[i] = D2; + } + else + { + if (minor_length) minor_length[i] = D2; + if (major_length) major_length[i] = D1; + } + } + + if (local_major_slope) free(local_major_slope); + if (local_minor_slope) free(local_minor_slope); + if (local_data_area) free(local_data_area); + if (local_data_cx) free(local_data_cx); + if (local_data_cy) free(local_data_cy); + + free(A1); + free(A2); + free(C1); + free(C2); + + free(D1b); + free(D2b); + free(D1a); + free(D2a); +} + +void imAnalyzeMeasureHoles(const imImage* image, int connect, int* count_data, int* area_data, float* perim_data) +{ + int i; + imImage *inv_image = imImageCreate(image->width, image->height, IM_BINARY, IM_BYTE); + imbyte* inv_data = (imbyte*)inv_image->data[0]; + imushort* img_data = (imushort*)image->data[0]; + + // finds the holes in the inverted image + for (i = 0; i < image->count; i++) + { + if (*img_data) + *inv_data = 0; + else + *inv_data = 1; + + img_data++; + inv_data++; + } + + imImage *holes_image = imImageClone(image); + if (!holes_image) + return; + + int holes_count = imAnalyzeFindRegions(inv_image, holes_image, connect, 0); + imImageDestroy(inv_image); + + if (!holes_count) + { + imImageDestroy(holes_image); + return; + } + + // measure the holes area + int* holes_area = (int*)malloc(holes_count*sizeof(int)); + imAnalyzeMeasureArea(holes_image, holes_area, holes_count); + + float* holes_perim = 0; + if (perim_data) + { + holes_perim = (float*)malloc(holes_count*sizeof(int)); + imAnalyzeMeasurePerimeter(holes_image, holes_perim, holes_count); + } + + imushort* holes_data = (imushort*)holes_image->data[0]; + img_data = (imushort*)image->data[0]; + + // holes do not touch the border + for (int y = 1; y < image->height-1; y++) + { + int offset_up = (y+1)*image->width; + int offset = y*image->width; + int offset_dw = (y-1)*image->width; + + for (int x = 1; x < image->width-1; x++) + { + int hole_index = holes_data[offset+x]; + + if (hole_index && holes_area[hole_index-1]) // a hole not yet used + { + // if the hole has not been used, + // it is the first time we encounter a pixel of this hole. + // then it is a pixel from the hole border. + // now find which region this hole is inside. + // a 4 connected neighbour is necessarilly a valid region or 0. + + int region_index = 0; + if (img_data[offset_up + x]) region_index = img_data[offset_up + x]; + else if (img_data[offset + x+1]) region_index = img_data[offset + x+1]; + else if (img_data[offset + x-1]) region_index = img_data[offset + x-1]; + else if (img_data[offset_dw+x]) region_index = img_data[offset_dw+x]; + + if (!region_index) continue; + + if (count_data) count_data[region_index-1]++; + if (area_data) area_data[region_index-1] += holes_area[hole_index-1]; + if (perim_data) perim_data[region_index-1] += holes_perim[hole_index-1]; + holes_area[hole_index-1] = 0; // mark hole as used + } + } + } + + if (holes_perim) free(holes_perim); + free(holes_area); + imImageDestroy(holes_image); +} + +template +static void DoPerimeterLine(T* map, T* new_map, int width, int height) +{ + int x, y, offset; + + for (y = 0; y < height; y++) + { + offset = y*width; + + for (x = 0; x < width; x++) + { + if (IsPerimeterPoint(map+offset, width, height, x, y)) + new_map[offset+x] = map[offset+x]; + else + new_map[offset+x] = 0; + } + } +} + +void imProcessPerimeterLine(const imImage* src_image, imImage* dst_image) +{ + switch(src_image->data_type) + { + case IM_BYTE: + DoPerimeterLine((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], src_image->width, src_image->height); + break; + case IM_USHORT: + DoPerimeterLine((imushort*)src_image->data[0], (imushort*)dst_image->data[0], src_image->width, src_image->height); + break; + case IM_INT: + DoPerimeterLine((int*)src_image->data[0], (int*)dst_image->data[0], src_image->width, src_image->height); + break; + } +} + +/* Perimeter Templates idea based in + Parker, Pratical Computer Vision Using C + +For 1.414 (sqrt(2)/2 + sqrt(2)/2) [1]: + 1 0 0 0 0 1 1 0 0 0 0 1 0 0 0 1 0 1 + 0 x 0 0 x 0 0 x 0 0 x 0 0 x 0 0 x 0 + 0 0 1 1 0 0 1 0 0 0 0 1 1 0 1 0 0 0 + 129 36 132 33 5 160 + +For 1.207 (sqrt(2)/2 + 1.0/2) [2]: + 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 + 1 x 0 1 x 0 0 x 0 0 x 0 0 x 0 0 x 0 0 x 1 0 x 1 + 0 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 + 17 48 68 65 130 34 12 136 + + 0 0 0 1 0 0 1 1 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 + 1 x 0 1 x 0 0 x 0 0 x 0 0 x 1 0 x 1 0 x 0 0 x 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 + 20 144 192 96 40 9 3 6 + +For 1.0 (1.0/2 + 1.0/2) [0]: + 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 + 1 x 1 0 x 0 1 x 0 0 x 1 1 x 0 0 x 1 + 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 + 24 66 18 10 80 72 + +For 0.707 (sqrt(2)/2) [3]: + 1 0 0 0 0 1 0 0 0 0 0 0 + 0 x 0 0 x 0 0 x 0 0 x 0 (For Line Length) + 0 0 0 0 0 0 0 0 1 1 0 0 + 128 32 1 4 + +For 0.5 (1.0/2) [4]: + 0 1 0 0 0 0 0 0 0 0 0 0 + 0 x 0 0 x 1 0 x 0 1 x 0 (For Line Length) + 0 0 0 0 0 0 0 1 0 0 0 0 + 64 8 2 16 + +*/ +static void iInitPerimTemplate(imbyte *templ, float *v) +{ + memset(templ, 0, 256); + + templ[129] = 1; + templ[36] = 1; + templ[132] = 1; + templ[33] = 1; + templ[5] = 1; + templ[160] = 1; + + templ[17] = 2; + templ[48] = 2; + templ[68] = 2; + templ[65] = 2; + templ[130] = 2; + templ[34] = 2; + templ[12] = 2; + templ[136] = 2; + templ[20] = 2; + templ[144] = 2; + templ[192] = 2; + templ[96] = 2; + templ[40] = 2; + templ[9] = 2; + templ[3] = 2; + templ[6] = 2; + + templ[24] = 0; + templ[66] = 0; + templ[18] = 0; + templ[10] = 0; + templ[80] = 0; + templ[72] = 0; + + templ[128] = 3; + templ[32] = 3; + templ[1] = 3; + templ[4] = 3; + + templ[64] = 4; + templ[8] = 4; + templ[2] = 4; + templ[16] = 4; + +const float DT_SQRT2 = 1.414213562373f; +const float DT_SQRT2D2 = 0.707106781187f; + + v[1] = DT_SQRT2; + v[2] = DT_SQRT2D2 + 0.5f; + v[0] = 1.0f; + v[3] = DT_SQRT2D2; + v[4] = 0.5f; +} + +void imAnalyzeMeasurePerimeter(const imImage* image, float* perim_data, int region_count) +{ + static imbyte templ[256]; + static float vt[5]; + static int first = 1; + if (first) + { + iInitPerimTemplate(templ, vt); + first = 0; + } + + imushort* map = (imushort*)image->data[0]; + + memset(perim_data, 0, region_count*sizeof(int)); + + int width = image->width; + int height = image->height; + for (int y = 0; y < height; y++) + { + int offset = y*image->width; + + for (int x = 0; x < width; x++) + { + if (IsPerimeterPoint(map+offset, width, height, x, y)) + { + int T = 0; + + // check the 8 neighboors if they belong to the perimeter + if (IsPerimeterPoint(map+offset+width, width, height, x-1, y+1)) + T |= 0x01; + if (IsPerimeterPoint(map+offset+width, width, height, x, y+1)) + T |= 0x02; + if (IsPerimeterPoint(map+offset+width, width, height, x+1, y+1)) + T |= 0x04; + + if (IsPerimeterPoint(map+offset, width, height, x-1, y)) + T |= 0x08; + if (IsPerimeterPoint(map+offset, width, height, x+1, y)) + T |= 0x10; + + if (IsPerimeterPoint(map+offset-width, width, height, x-1, y-1)) + T |= 0x20; + if (IsPerimeterPoint(map+offset-width, width, height, x, y-1)) + T |= 0x40; + if (IsPerimeterPoint(map+offset-width, width, height, x+1, y-1)) + T |= 0x80; + + if (T) + perim_data[map[offset+x] - 1] += vt[templ[T]]; + } + } + } +} + +/* Perimeter Area Templates + +For "1.0" (0): + + 1 1 1 + 1 x 1 + 1 1 1 + 255 + +For "0.75" (1): + + 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 + 1 x 1 1 x 1 1 x 1 1 x 1 0 x 1 1 x 0 1 x 1 1 x 1 + 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 + 251 254 127 223 239 247 253 191 + +For "0.625" (2): + + 1 1 1 0 0 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 0 + 1 x 1 1 x 1 0 x 1 1 x 0 0 x 1 1 x 0 1 x 1 1 x 1 + 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 0 0 1 1 1 + 249 63 111 215 235 246 252 159 + +For "0.5" (3): + + 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 0 0 1 1 1 + 1 x 1 0 x 1 1 x 1 1 x 0 0 x 1 0 x 1 1 x 0 1 x 0 + 1 1 1 0 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 0 0 + 31 107 248 214 233 47 151 244 + +For "0.375" (4): + + 0 0 0 1 1 1 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 1 1 + 1 x 0 1 x 0 1 x 0 0 x 1 1 x 0 0 x 1 0 x 1 0 x 1 + 1 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 0 0 0 + 23 240 212 105 150 43 15 232 + +For "0.25" (5): + + 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 1 1 + 1 x 0 0 x 1 1 x 0 0 x 1 1 x 0 0 x 1 0 x 0 0 x 0 + 1 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 0 0 0 + 22 11 208 104 148 41 7 224 + +For "0.125" (6): + + 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 + 1 x 0 0 x 0 0 x 0 0 x 1 1 x 0 0 x 1 0 x 0 0 x 0 + 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 + 20 3 192 40 144 9 6 96 + +*/ +static void iInitPerimAreaTemplate(imbyte *templ, float *v) +{ + memset(templ, 0, 256); + + templ[255] = 0; + + templ[251] = 1; + templ[254] = 1; + templ[127] = 1; + templ[223] = 1; + templ[239] = 1; + templ[247] = 1; + templ[253] = 1; + templ[191] = 1; + + templ[249] = 2; + templ[63] = 2; + templ[111] = 2; + templ[215] = 2; + templ[235] = 2; + templ[246] = 2; + templ[252] = 2; + templ[159] = 2; + + templ[31] = 3; + templ[107] = 3; + templ[248] = 3; + templ[214] = 3; + templ[233] = 3; + templ[47] = 3; + templ[151] = 3; + templ[244] = 3; + + templ[23] = 4; + templ[240] = 4; + templ[212] = 4; + templ[105] = 4; + templ[150] = 4; + templ[43] = 4; + templ[15] = 4; + templ[232] = 4; + + templ[22] = 5; + templ[11] = 5; + templ[208] = 5; + templ[104] = 5; + templ[148] = 5; + templ[41] = 5; + templ[7] = 5; + templ[224] = 5; + + templ[20] = 6; + templ[3] = 6; + templ[192] = 6; + templ[40] = 6; + templ[144] = 6; + templ[9] = 6; + templ[6] = 6; + templ[96] = 6; + + v[0] = 1.0f; + v[1] = 0.75f; + v[2] = 0.625f; + v[3] = 0.5f; + v[4] = 0.375f; + v[5] = 0.25f; + v[6] = 0.125f; +} + +void imAnalyzeMeasurePerimArea(const imImage* image, float* area_data) +{ + static imbyte templ[256]; + static float vt[7]; + static int first = 1; + if (first) + { + iInitPerimAreaTemplate(templ, vt); + first = 0; + } + + imushort* map = (imushort*)image->data[0]; + + int width = image->width; + int height = image->height; + for (int y = 0; y < height; y++) + { + int offset_up = (y+1)*width; + int offset = y*width; + int offset_dw = (y-1)*width; + + for (int x = 0; x < width; x++) + { + imushort v = map[offset+x]; + if (v) + { + int T = 0; + if (x>0 && y0 && map[offset + x-1] == v) T |= 0x08; + if (x0 && y>0 && map[offset_dw + x-1] == v) T |= 0x20; + if (y>0 && map[offset_dw + x ] == v) T |= 0x40; + if (x0 && map[offset_dw + x+1] == v) T |= 0x80; + + if (T) + area_data[v-1] += vt[templ[T]]; + } + } + } +} + +void imProcessRemoveByArea(const imImage* image, imImage* NewImage, int connect, int start_size, int end_size, int inside) +{ + imImage *region_image = imImageCreate(image->width, image->height, IM_GRAY, IM_USHORT); + if (!region_image) + return; + + int region_count = imAnalyzeFindRegions(image, region_image, connect, 1); + if (!region_count) + { + imImageClear(NewImage); + imImageDestroy(region_image); + return; + } + + if (end_size == 0) + end_size = image->width*image->height; + + int outside=0; + if (!inside) outside = 1; + + int* area_data = (int*)malloc(region_count*sizeof(int)); + imAnalyzeMeasureArea(region_image, area_data, region_count); + + imushort* region_data = (imushort*)region_image->data[0]; + imbyte* img_data = (imbyte*)NewImage->data[0]; + + for (int i = 0; i < image->count; i++) + { + if (*region_data) + { + int area = area_data[(*region_data) - 1]; + if (area < start_size || area > end_size) + *img_data = (imbyte)outside; + else + *img_data = (imbyte)inside; + } + else + *img_data = 0; + + region_data++; + img_data++; + } + + free(area_data); + imImageDestroy(region_image); +} + +void imProcessFillHoles(const imImage* image, imImage* NewImage, int connect) +{ + // finding regions in the inverted image will isolate only the holes. + imProcessNegative(image, NewImage); + + imImage *region_image = imImageCreate(image->width, image->height, IM_GRAY, IM_USHORT); + if (!region_image) + return; + + int holes_count = imAnalyzeFindRegions(NewImage, region_image, connect, 0); + if (!holes_count) + { + imImageCopy(image, NewImage); + imImageDestroy(region_image); + return; + } + + imushort* region_data = (imushort*)region_image->data[0]; + imbyte* dst_data = (imbyte*)NewImage->data[0]; + + for (int i = 0; i < image->count; i++) + { + if (*region_data) + *dst_data = 1; + else + *dst_data = !(*dst_data); // Fix negative data. + + region_data++; + dst_data++; + } + + imImageDestroy(region_image); +} diff --git a/im/src/process/im_arithmetic_bin.cpp b/im/src/process/im_arithmetic_bin.cpp new file mode 100755 index 0000000..494b6c0 --- /dev/null +++ b/im/src/process/im_arithmetic_bin.cpp @@ -0,0 +1,587 @@ +/** \file + * \brief Binary Arithmetic Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_arithmetic_bin.cpp,v 1.2 2009/10/01 02:56:58 scuri Exp $ + */ + + +#include +#include +#include +#include +#include + +#include "im_process_pon.h" +#include "im_math_op.h" + +#include +#include + + +template +static void DoBinaryOp(T1 *map1, T2 *map2, T3 *map, int count, int op) +{ + int i; + + switch(op) + { + case IM_BIN_ADD: + for (i = 0; i < count; i++) + map[i] = add_op((T3)map1[i], (T3)map2[i]); + break; + case IM_BIN_SUB: + for (i = 0; i < count; i++) + map[i] = sub_op((T3)map1[i], (T3)map2[i]); + break; + case IM_BIN_MUL: + for (i = 0; i < count; i++) + map[i] = mul_op((T3)map1[i], (T3)map2[i]); + break; + case IM_BIN_DIV: + for (i = 0; i < count; i++) + map[i] = div_op((T3)map1[i], (T3)map2[i]); + break; + case IM_BIN_DIFF: + for (i = 0; i < count; i++) + map[i] = diff_op((T3)map1[i], (T3)map2[i]); + break; + case IM_BIN_MIN: + for (i = 0; i < count; i++) + map[i] = min_op((T3)map1[i], (T3)map2[i]); + break; + case IM_BIN_MAX: + for (i = 0; i < count; i++) + map[i] = max_op((T3)map1[i], (T3)map2[i]); + break; + case IM_BIN_POW: + for (i = 0; i < count; i++) + map[i] = pow_op((T3)map1[i], (T3)map2[i]); + break; + } +} + +static void DoBinaryOpByte(imbyte *map1, imbyte *map2, imbyte *map, int count, int op) +{ + int i; + + switch(op) + { + case IM_BIN_ADD: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(add_op((int)map1[i], (int)map2[i])); + break; + case IM_BIN_SUB: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(sub_op((int)map1[i], (int)map2[i])); + break; + case IM_BIN_MUL: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(mul_op((int)map1[i], (int)map2[i])); + break; + case IM_BIN_DIV: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(div_op((int)map1[i], (int)map2[i])); + break; + case IM_BIN_DIFF: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(diff_op((int)map1[i], (int)map2[i])); + break; + case IM_BIN_MIN: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(min_op((int)map1[i], (int)map2[i])); + break; + case IM_BIN_MAX: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(max_op((int)map1[i], (int)map2[i])); + break; + case IM_BIN_POW: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(pow_op((int)map1[i], (int)map2[i])); + break; + } +} + +static void DoBinaryOpCpxReal(imcfloat *map1, float *map2, imcfloat *map, int count, int op) +{ + int i; + + switch(op) + { + case IM_BIN_ADD: + for (i = 0; i < count; i++) + map[i] = add_op(map1[i], map2[i]); + break; + case IM_BIN_SUB: + for (i = 0; i < count; i++) + map[i] = sub_op(map1[i], map2[i]); + break; + case IM_BIN_MUL: + for (i = 0; i < count; i++) + map[i] = mul_op(map1[i], map2[i]); + break; + case IM_BIN_DIV: + for (i = 0; i < count; i++) + map[i] = div_op(map1[i], (imcfloat)map2[i]); + break; + case IM_BIN_DIFF: + for (i = 0; i < count; i++) + map[i] = diff_op(map1[i], map2[i]); + break; + case IM_BIN_MIN: + for (i = 0; i < count; i++) + map[i] = min_op(map1[i], map2[i]); + break; + case IM_BIN_MAX: + for (i = 0; i < count; i++) + map[i] = max_op(map1[i], map2[i]); + break; + case IM_BIN_POW: + for (i = 0; i < count; i++) + map[i] = pow_op(map1[i], map2[i]); + break; + } +} + +void imProcessArithmeticOp(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int op) +{ + int count = src_image1->count; + + for (int i = 0; i < src_image1->depth; i++) + { + switch(src_image1->data_type) + { + case IM_BYTE: + if (dst_image->data_type == IM_FLOAT) + DoBinaryOp((imbyte*)src_image1->data[i], (imbyte*)src_image2->data[i], (float*)dst_image->data[i], count, op); + else if (dst_image->data_type == IM_USHORT) + DoBinaryOp((imbyte*)src_image1->data[i], (imbyte*)src_image2->data[i], (imushort*)dst_image->data[i], count, op); + else if (dst_image->data_type == IM_INT) + DoBinaryOp((imbyte*)src_image1->data[i], (imbyte*)src_image2->data[i], (int*)dst_image->data[i], count, op); + else + DoBinaryOpByte((imbyte*)src_image1->data[i], (imbyte*)src_image2->data[i], (imbyte*)dst_image->data[i], count, op); + break; + case IM_USHORT: + if (dst_image->data_type == IM_FLOAT) + DoBinaryOp((imushort*)src_image1->data[i], (imushort*)src_image2->data[i], (float*)dst_image->data[i], count, op); + else if (dst_image->data_type == IM_INT) + DoBinaryOp((imushort*)src_image1->data[i], (imushort*)src_image2->data[i], (int*)dst_image->data[i], count, op); + else + DoBinaryOp((imushort*)src_image1->data[i], (imushort*)src_image2->data[i], (imushort*)dst_image->data[i], count, op); + break; + case IM_INT: + if (dst_image->data_type == IM_FLOAT) + DoBinaryOp((int*)src_image1->data[i], (int*)src_image2->data[i], (float*)dst_image->data[i], count, op); + else + DoBinaryOp((int*)src_image1->data[i], (int*)src_image2->data[i], (int*)dst_image->data[i], count, op); + break; + case IM_FLOAT: + DoBinaryOp((float*)src_image1->data[i], (float*)src_image2->data[i], (float*)dst_image->data[i], count, op); + break; + case IM_CFLOAT: + if (src_image2->data_type == IM_FLOAT) + DoBinaryOpCpxReal((imcfloat*)src_image1->data[i], (float*)src_image2->data[i], (imcfloat*)dst_image->data[i], count, op); + else + DoBinaryOp((imcfloat*)src_image1->data[i], (imcfloat*)src_image2->data[i], (imcfloat*)dst_image->data[i], count, op); + break; + } + } +} + +template +static inline T blend_op(const T& v1, const T& v2, const float& alpha) +{ + return (T)(alpha*v1 + (1.0f - alpha)*v2); +} + +template +static void DoBlendConst(T *map1, T *map2, T *map, int count, float alpha) +{ + for (int i = 0; i < count; i++) + map[i] = blend_op(map1[i], map2[i], alpha); +} + +void imProcessBlendConst(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, float alpha) +{ + int count = src_image1->count; + + for (int i = 0; i < src_image1->depth; i++) + { + switch(src_image1->data_type) + { + case IM_BYTE: + DoBlendConst((imbyte*)src_image1->data[i], (imbyte*)src_image2->data[i], (imbyte*)dst_image->data[i], count, alpha); + break; + case IM_USHORT: + DoBlendConst((imushort*)src_image1->data[i], (imushort*)src_image2->data[i], (imushort*)dst_image->data[i], count, alpha); + break; + case IM_INT: + DoBlendConst((int*)src_image1->data[i], (int*)src_image2->data[i], (int*)dst_image->data[i], count, alpha); + break; + case IM_FLOAT: + DoBlendConst((float*)src_image1->data[i], (float*)src_image2->data[i], (float*)dst_image->data[i], count, alpha); + break; + case IM_CFLOAT: + DoBlendConst((imcfloat*)src_image1->data[i], (imcfloat*)src_image2->data[i], (imcfloat*)dst_image->data[i], count, alpha); + break; + } + } +} + +template +static void DoBlend(T *map1, T *map2, TA *alpha, T *map, int count, TA max) +{ + for (int i = 0; i < count; i++) + map[i] = blend_op(map1[i], map2[i], ((float)alpha[i])/max); +} + +void imProcessBlend(const imImage* src_image1, const imImage* src_image2, const imImage* alpha, imImage* dst_image) +{ + int count = src_image1->count; + + for (int i = 0; i < src_image1->depth; i++) + { + switch(src_image1->data_type) + { + case IM_BYTE: + DoBlend((imbyte*)src_image1->data[i], (imbyte*)src_image2->data[i], (imbyte*)alpha->data[0], (imbyte*)dst_image->data[i], count, (imbyte)255); + break; + case IM_USHORT: + DoBlend((imushort*)src_image1->data[i], (imushort*)src_image2->data[i], (imushort*)alpha->data[0], (imushort*)dst_image->data[i], count, (imushort)65535); + break; + case IM_INT: + DoBlend((int*)src_image1->data[i], (int*)src_image2->data[i], (int*)alpha->data[0], (int*)dst_image->data[i], count, (int)2147483647); + break; + case IM_FLOAT: + DoBlend((float*)src_image1->data[i], (float*)src_image2->data[i], (float*)alpha->data[0], (float*)dst_image->data[i], count, 1.0f); + break; + case IM_CFLOAT: + DoBlend((imcfloat*)src_image1->data[i], (imcfloat*)src_image2->data[i], (float*)alpha->data[0], (imcfloat*)dst_image->data[i], count, 1.0f); + break; + } + } +} + +static void DoBinaryConstOpCpxReal(imcfloat *map1, float value, imcfloat *map, int count, int op) +{ + int i; + + switch(op) + { + case IM_BIN_ADD: + for (i = 0; i < count; i++) + map[i] = add_op(map1[i], value); + break; + case IM_BIN_SUB: + for (i = 0; i < count; i++) + map[i] = sub_op(map1[i], value); + break; + case IM_BIN_MUL: + for (i = 0; i < count; i++) + map[i] = mul_op(map1[i], value); + break; + case IM_BIN_DIV: + for (i = 0; i < count; i++) + map[i] = div_op(map1[i], (imcfloat)value); + break; + case IM_BIN_DIFF: + for (i = 0; i < count; i++) + map[i] = diff_op(map1[i], value); + break; + case IM_BIN_MIN: + for (i = 0; i < count; i++) + map[i] = min_op(map1[i], value); + break; + case IM_BIN_MAX: + for (i = 0; i < count; i++) + map[i] = max_op(map1[i], value); + break; + case IM_BIN_POW: + for (i = 0; i < count; i++) + map[i] = pow_op(map1[i], value); + break; + } +} + +template +static void DoBinaryConstOp(T1 *map1, T2 value, T3 *map, int count, int op) +{ + int i; + + switch(op) + { + case IM_BIN_ADD: + for (i = 0; i < count; i++) + map[i] = (T3)add_op((T2)map1[i], value); + break; + case IM_BIN_SUB: + for (i = 0; i < count; i++) + map[i] = (T3)sub_op((T2)map1[i], value); + break; + case IM_BIN_MUL: + for (i = 0; i < count; i++) + map[i] = (T3)mul_op((T2)map1[i], value); + break; + case IM_BIN_DIV: + for (i = 0; i < count; i++) + map[i] = (T3)div_op((T2)map1[i], value); + break; + case IM_BIN_DIFF: + for (i = 0; i < count; i++) + map[i] = (T3)diff_op((T2)map1[i], value); + break; + case IM_BIN_MIN: + for (i = 0; i < count; i++) + map[i] = (T3)min_op((T2)map1[i], value); + break; + case IM_BIN_MAX: + for (i = 0; i < count; i++) + map[i] = (T3)max_op((T2)map1[i], value); + break; + case IM_BIN_POW: + for (i = 0; i < count; i++) + map[i] = (T3)pow_op((T2)map1[i], value); + break; + } +} + +template +static void DoBinaryConstOpByte(T1 *map1, int value, imbyte *map, int count, int op) +{ + int i; + + switch(op) + { + case IM_BIN_ADD: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(add_op((int)map1[i], value)); + break; + case IM_BIN_SUB: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(sub_op((int)map1[i], value)); + break; + case IM_BIN_MUL: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(mul_op((int)map1[i], value)); + break; + case IM_BIN_DIV: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(div_op((int)map1[i], value)); + break; + case IM_BIN_DIFF: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(diff_op((int)map1[i], value)); + break; + case IM_BIN_MIN: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(min_op((int)map1[i], value)); + break; + case IM_BIN_MAX: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(max_op((int)map1[i], value)); + break; + case IM_BIN_POW: + for (i = 0; i < count; i++) + map[i] = (imbyte)crop_byte(pow_op((int)map1[i], value)); + break; + } +} + +void imProcessArithmeticConstOp(const imImage* src_image1, float value, imImage* dst_image, int op) +{ + int count = src_image1->count; + + for (int i = 0; i < src_image1->depth; i++) + { + switch(src_image1->data_type) + { + case IM_BYTE: + if (dst_image->data_type == IM_FLOAT) + DoBinaryConstOp((imbyte*)src_image1->data[i], (float)value, (float*)dst_image->data[i], count, op); + else if (dst_image->data_type == IM_USHORT) + DoBinaryConstOp((imbyte*)src_image1->data[i], (imushort)value, (imushort*)dst_image->data[i], count, op); + else if (dst_image->data_type == IM_INT) + DoBinaryConstOp((imbyte*)src_image1->data[i], (int)value, (int*)dst_image->data[i], count, op); + else + DoBinaryConstOpByte((imbyte*)src_image1->data[i], (int)value, (imbyte*)dst_image->data[i], count, op); + break; + case IM_USHORT: + if (dst_image->data_type == IM_FLOAT) + DoBinaryConstOp((imushort*)src_image1->data[i], (float)value, (float*)dst_image->data[i], count, op); + else if (dst_image->data_type == IM_INT) + DoBinaryConstOp((imushort*)src_image1->data[i], (int)value, (int*)dst_image->data[i], count, op); + else if (dst_image->data_type == IM_BYTE) + DoBinaryConstOpByte((imushort*)src_image1->data[i], (int)value, (imbyte*)dst_image->data[i], count, op); + else + DoBinaryConstOp((imushort*)src_image1->data[i], (imushort)value, (imushort*)dst_image->data[i], count, op); + break; + case IM_INT: + if (dst_image->data_type == IM_FLOAT) + DoBinaryConstOp((int*)src_image1->data[i], (float)value, (float*)dst_image->data[i], count, op); + else if (dst_image->data_type == IM_USHORT) + DoBinaryConstOp((int*)src_image1->data[i], (int)value, (imushort*)dst_image->data[i], count, op); + else if (dst_image->data_type == IM_BYTE) + DoBinaryConstOpByte((int*)src_image1->data[i], (int)value, (imbyte*)dst_image->data[i], count, op); + else + DoBinaryConstOp((int*)src_image1->data[i], (int)value, (int*)dst_image->data[i], count, op); + break; + case IM_FLOAT: + DoBinaryConstOp((float*)src_image1->data[i], (float)value, (float*)dst_image->data[i], count, op); + break; + case IM_CFLOAT: + DoBinaryConstOpCpxReal((imcfloat*)src_image1->data[i], (float)value, (imcfloat*)dst_image->data[i], count, op); + break; + } + } +} + +void imProcessMultipleMean(const imImage** src_image_list, int src_image_count, imImage* dst_image) +{ + const imImage* image1 = src_image_list[0]; + + int data_type = image1->data_type; + if (image1->data_type == IM_BYTE) + data_type = IM_USHORT; + + imImage *acum_image = imImageCreate(image1->width, image1->height, image1->color_space, data_type); + if (!acum_image) + return; + + for(int i = 0; i < src_image_count; i++) + { + const imImage *image = src_image_list[i]; + imProcessArithmeticOp(image, acum_image, acum_image, IM_BIN_ADD); /* acum_image += image */ + + } + + imProcessArithmeticConstOp(acum_image, float(src_image_count), dst_image, IM_BIN_DIV); + + imImageDestroy(acum_image); +} + +void imProcessMultipleStdDev(const imImage** src_image_list, int src_image_count, const imImage *mean_image, imImage* dst_image) +{ + imImage* aux_image = imImageClone(dst_image); + if (!aux_image) + return; + + // sdtdev = sqrt( sum(sqr(x - m)) / N) + + // a = sum(sqr(x - m)) + for(int i = 0; i < src_image_count; i++) + { + // aux_image = image - mean_image + imProcessArithmeticOp(src_image_list[i], mean_image, aux_image, IM_BIN_SUB); + + // aux_image = aux_image * aux_image + imProcessUnArithmeticOp(aux_image, aux_image, IM_UN_SQR); + + // dst_image += aux_image + imProcessArithmeticOp(aux_image, dst_image, dst_image, IM_BIN_ADD); + } + + // dst_image = dst_image / src_image_count; + imProcessArithmeticConstOp(dst_image, float(src_image_count), dst_image, IM_BIN_DIV); + + // dst_image = sqrt(dst_image); + imProcessUnArithmeticOp(dst_image, dst_image, IM_UN_SQRT); + + imImageDestroy(aux_image); +} + +template +static float AutoCovCalc(int width, int height, DT *src_map, DT *mean_map, int x, int y, float count) +{ + float value = 0; + int ni = height - y; + int nj = width - x; + int offset, offset1; + int next = width*y + x; + + for (int i = 0; i < ni; i++) + { + for (int j = 0; j < nj; j++) + { + offset = width*i + j; + offset1 = offset + next; + value += float(src_map[offset] - mean_map[offset]) * float(src_map[offset1] - mean_map[offset1]); + } + } + + return (value/count); +} + +template +static int AutoCov(int width, int height, DT *src_map, DT *mean_map, float *dst_map, int counter) +{ + int count = width*height; + + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + *dst_map = AutoCovCalc(width, height, src_map, mean_map, x, y, (float)count); + dst_map++; + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +int imProcessAutoCovariance(const imImage* image, const imImage* mean_image, imImage* dst_image) +{ + int ret = 0; + + int counter = imCounterBegin("Auto Convariance"); + imCounterTotal(counter, image->depth*image->height, "Processing..."); + + for (int i = 0; i < image->depth; i++) + { + switch(image->data_type) + { + case IM_BYTE: + ret = AutoCov(image->width, image->height, (imbyte*)image->data[i], (imbyte*)mean_image->data[i], (float*)dst_image->data[i], counter); + break; + case IM_USHORT: + ret = AutoCov(image->width, image->height, (imushort*)image->data[i], (imushort*)mean_image->data[i], (float*)dst_image->data[i], counter); + break; + case IM_INT: + ret = AutoCov(image->width, image->height, (int*)image->data[i], (int*)mean_image->data[i], (float*)dst_image->data[i], counter); + break; + case IM_FLOAT: + ret = AutoCov(image->width, image->height, (float*)image->data[i], (float*)mean_image->data[i], (float*)dst_image->data[i], counter); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +void imProcessMultiplyConj(const imImage* image1, const imImage* image2, imImage* NewImage) +{ + int total_count = image1->count*image1->depth; + + imcfloat* map = (imcfloat*)NewImage->data[0]; + imcfloat* map1 = (imcfloat*)image1->data[0]; + imcfloat* map2 = (imcfloat*)image2->data[0]; + imcfloat tmp; // this will allow an in-place operation + + for (int i = 0; i < total_count; i++) + { + tmp.real = map1->real * map2->real + map1->imag * map2->imag; + tmp.imag = map1->real * map2->imag - map1->imag * map2->real; + *map = tmp; + + map++; + map1++; + map2++; + } +} diff --git a/im/src/process/im_arithmetic_un.cpp b/im/src/process/im_arithmetic_un.cpp new file mode 100755 index 0000000..e4dba8a --- /dev/null +++ b/im/src/process/im_arithmetic_un.cpp @@ -0,0 +1,256 @@ +/** \file + * \brief Unary Arithmetic Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_arithmetic_un.cpp,v 1.2 2009/10/01 02:56:58 scuri Exp $ + */ + + +#include +#include +#include +#include + +#include "im_process_pon.h" +#include "im_math_op.h" + +#include +#include + +// Fake complex operations for real types +static inline imbyte conj_op(const imbyte& v) {return v;} +static inline imushort conj_op(const imushort& v) {return v;} +static inline int conj_op(const int& v) {return v;} +static inline float conj_op(const float& v) {return v;} +static inline imbyte cpxnorm_op(const imbyte& v) {return v;} +static inline imushort cpxnorm_op(const imushort& v) {return v;} +static inline int cpxnorm_op(const int& v) {return v;} +static inline float cpxnorm_op(const float& v) {return v;} + +static inline imcfloat conj_op(const imcfloat& v) +{ + imcfloat r; + r.real = v.real; + r.imag = -v.imag; + return r; +} + +static inline imcfloat cpxnorm_op(const imcfloat& v) +{ + imcfloat r; + float rmag = cpxmag(v); + if (rmag != 0.0f) + { + r.real = v.real/rmag; + r.imag = v.imag/rmag; + } + else + { + r.real = 0.0f; + r.imag = 0.0f; + } + return r; +} + +template +static void DoUnaryOp(T1 *map, T2 *new_map, int count, int op) +{ + int i; + + switch(op) + { + case IM_UN_ABS: + for (i = 0; i < count; i++) + new_map[i] = abs_op((T2)map[i]); + break; + case IM_UN_INV: + for (i = 0; i < count; i++) + new_map[i] = inv_op((T2)map[i]); + break; + case IM_UN_EQL: + for (i = 0; i < count; i++) + new_map[i] = (T2)map[i]; + break; + case IM_UN_LESS: + for (i = 0; i < count; i++) + new_map[i] = less_op((T2)map[i]); + break; + case IM_UN_SQR: + for (i = 0; i < count; i++) + new_map[i] = sqr_op((T2)map[i]); + break; + case IM_UN_SQRT: + for (i = 0; i < count; i++) + new_map[i] = sqrt_op((T2)map[i]); + break; + case IM_UN_LOG: + for (i = 0; i < count; i++) + new_map[i] = log_op((T2)map[i]); + break; + case IM_UN_SIN: + for (i = 0; i < count; i++) + new_map[i] = sin_op((T2)map[i]); + break; + case IM_UN_COS: + for (i = 0; i < count; i++) + new_map[i] = cos_op((T2)map[i]); + break; + case IM_UN_EXP: + for (i = 0; i < count; i++) + new_map[i] = exp_op((T2)map[i]); + break; + case IM_UN_CONJ: + for (i = 0; i < count; i++) + new_map[i] = conj_op((T2)map[i]); + break; + case IM_UN_CPXNORM: + for (i = 0; i < count; i++) + new_map[i] = cpxnorm_op((T2)map[i]); + break; + } +} + +template +static void DoUnaryOpByte(T1 *map, imbyte *new_map, int count, int op) +{ + int i; + + switch(op) + { + case IM_UN_ABS: + for (i = 0; i < count; i++) + new_map[i] = (imbyte)crop_byte(abs_op((int)map[i])); + break; + case IM_UN_INV: + for (i = 0; i < count; i++) + new_map[i] = (imbyte)crop_byte(inv_op((int)map[i])); /* will always be 0 */ + break; + case IM_UN_EQL: + for (i = 0; i < count; i++) + new_map[i] = (imbyte)crop_byte((int)map[i]); + break; + case IM_UN_LESS: + for (i = 0; i < count; i++) + new_map[i] = (imbyte)crop_byte(less_op((int)map[i])); + break; + case IM_UN_SQR: + for (i = 0; i < count; i++) + new_map[i] = (imbyte)crop_byte(sqr_op((int)map[i])); + break; + case IM_UN_SQRT: + for (i = 0; i < count; i++) + new_map[i] = (imbyte)crop_byte(sqrt_op((int)map[i])); + break; + case IM_UN_LOG: + for (i = 0; i < count; i++) + new_map[i] = (imbyte)crop_byte(log_op((int)map[i])); + break; + case IM_UN_SIN: + for (i = 0; i < count; i++) + new_map[i] = (imbyte)crop_byte(sin_op((int)map[i])); + break; + case IM_UN_COS: + for (i = 0; i < count; i++) + new_map[i] = (imbyte)crop_byte(cos_op((int)map[i])); + break; + case IM_UN_EXP: + for (i = 0; i < count; i++) + new_map[i] = (imbyte)crop_byte(exp_op((int)map[i])); + break; + } +} + +void imProcessUnArithmeticOp(const imImage* src_image, imImage* dst_image, int op) +{ + int total_count = src_image->count * src_image->depth; + + switch(src_image->data_type) + { + case IM_BYTE: + if (dst_image->data_type == IM_FLOAT) + DoUnaryOp((imbyte*)src_image->data[0], (float*)dst_image->data[0], total_count, op); + else if (dst_image->data_type == IM_INT) + DoUnaryOp((imbyte*)src_image->data[0], (int*)dst_image->data[0], total_count, op); + else if (dst_image->data_type == IM_USHORT) + DoUnaryOp((imbyte*)src_image->data[0], (imushort*)dst_image->data[0], total_count, op); + else + DoUnaryOpByte((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], total_count, op); + break; + case IM_USHORT: + if (dst_image->data_type == IM_BYTE) + DoUnaryOpByte((imushort*)src_image->data[0], (imbyte*)dst_image->data[0], total_count, op); + else if (dst_image->data_type == IM_INT) + DoUnaryOp((imushort*)src_image->data[0], (int*)dst_image->data[0], total_count, op); + else if (dst_image->data_type == IM_FLOAT) + DoUnaryOp((imushort*)src_image->data[0], (float*)dst_image->data[0], total_count, op); + else + DoUnaryOp((imushort*)src_image->data[0], (imushort*)dst_image->data[0], total_count, op); + break; + case IM_INT: + if (dst_image->data_type == IM_BYTE) + DoUnaryOpByte((int*)src_image->data[0], (imbyte*)dst_image->data[0], total_count, op); + else if (dst_image->data_type == IM_USHORT) + DoUnaryOp((int*)src_image->data[0], (imushort*)dst_image->data[0], total_count, op); + else if (dst_image->data_type == IM_FLOAT) + DoUnaryOp((int*)src_image->data[0], (float*)dst_image->data[0], total_count, op); + else + DoUnaryOp((int*)src_image->data[0], (int*)dst_image->data[0], total_count, op); + break; + case IM_FLOAT: + DoUnaryOp((float*)src_image->data[0], (float*)dst_image->data[0], total_count, op); + break; + case IM_CFLOAT: + DoUnaryOp((imcfloat*)src_image->data[0], (imcfloat*)dst_image->data[0], total_count, op); + break; + } +} + +void imProcessSplitComplex(const imImage* image, imImage* NewImage1, imImage* NewImage2, int polar) +{ + int total_count = image->count*image->depth; + + imcfloat* map = (imcfloat*)image->data[0]; + float* map1 = (float*)NewImage1->data[0]; + float* map2 = (float*)NewImage2->data[0]; + + for (int i = 0; i < total_count; i++) + { + if (polar) + { + map1[i] = cpxmag(map[i]); + map2[i] = cpxphase(map[i]); + } + else + { + map1[i] = map[i].real; + map2[i] = map[i].imag; + } + } +} + +void imProcessMergeComplex(const imImage* image1, const imImage* image2, imImage* NewImage, int polar) +{ + int total_count = image1->count*image1->depth; + + imcfloat* map = (imcfloat*)NewImage->data[0]; + float* map1 = (float*)image1->data[0]; + float* map2 = (float*)image2->data[0]; + + for (int i = 0; i < total_count; i++) + { + if (polar) + { + float phase = map2[i]; + if (phase > 180) phase -= 360; + phase /= 57.2957795f; + + map[i].real = (float)(map1[i] * cos(phase)); + map[i].imag = (float)(map1[i] * sin(phase)); + } + else + { + map[i].real = map1[i]; + map[i].imag = map2[i]; + } + } +} diff --git a/im/src/process/im_canny.cpp b/im/src/process/im_canny.cpp new file mode 100755 index 0000000..d749fc0 --- /dev/null +++ b/im/src/process/im_canny.cpp @@ -0,0 +1,254 @@ +/** \file + * \brief Canny Edge Detector + * + * See Copyright Notice in im_lib.h + * $Id: im_canny.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + +#include + +#include "im_process_loc.h" + +#include +#include +#include + +/* Scale floating point magnitudes to 8 bits */ +static float MAG_SCALE; + +/* Biggest possible filter mask */ +#define MAX_MASK_SIZE 100 + +static float ** f2d (int nr, int nc); +static float gauss(float x, float sigma); +static float dGauss (float x, float sigma); +static float meanGauss (float x, float sigma); +static void seperable_convolution (const imImage* im, float *gau, int width, float **smx, float **smy); +static void dxy_seperable_convolution (float** im, int nr, int nc, float *gau, int width, float **sm, int which); +static void nonmax_suppress (float **dx, float **dy, imImage* mag); + +void imProcessCanny(const imImage* im, imImage* NewImage, float stddev) +{ + int width = 1; + float **smx,**smy; + float **dx,**dy; + int i; + float gau[MAX_MASK_SIZE], dgau[MAX_MASK_SIZE]; + +/* Create a Gaussian and a derivative of Gaussian filter mask */ + for(i=0; iheight, im->width); + smy = f2d (im->height, im->width); + +/* Convolution of source image with a Gaussian in X and Y directions */ + seperable_convolution (im, gau, width, smx, smy); + + MAG_SCALE = 0; + +/* Now convolve smoothed data with a derivative */ + dx = f2d (im->height, im->width); + dxy_seperable_convolution (smx, im->height, im->width, dgau, width, dx, 1); + free(smx[0]); free(smx); + + dy = f2d (im->height, im->width); + dxy_seperable_convolution (smy, im->height, im->width, dgau, width, dy, 0); + free(smy[0]); free(smy); + + if (MAG_SCALE) + MAG_SCALE = 255.0f/(1.4142f*MAG_SCALE); + + /* Non-maximum suppression - edge pixels should be a local max */ + nonmax_suppress (dx, dy, NewImage); + + free(dx[0]); free(dx); + free(dy[0]); free(dy); +} + +static float norm (float x, float y) +{ + return (float) sqrt ( (double)(x*x + y*y) ); +} + +static float ** f2d (int nr, int nc) +{ + float **x, *y; + int i; + + x = (float **)calloc ( nr, sizeof (float *) ); + if (!x) + return NULL; + + y = (float *)calloc ( nr*nc, sizeof (float) ); + if (!y) + return NULL; + + for (i=0; idata[0]; + + nr = im->height; + nc = im->width; + + for (i=0; iwidth + j]; y = gau[0] * im_data[i*im->width + j]; + for (k=1; kwidth + j] + gau[k]*im_data[I2*im->width + j]; + I1 = (j+k)%nc; I2 = (j-k+nc)%nc; + x += gau[k]*im_data[i*im->width + I1] + gau[k]*im_data[i*im->width + I2]; + } + smx[i][j] = x; smy[i][j] = y; + } + } +} + +static void dxy_seperable_convolution (float** im, int nr, int nc, float *gau, int width, float **sm, int which) +{ + int i,j,k, I1, I2; + float x; + + for (i=0; i MAG_SCALE) + MAG_SCALE = x; + } + } +} + +static unsigned char tobyte(float x) +{ + if (x > 255) return 255; + return (unsigned char)x; +} + +static void nonmax_suppress (float **dx, float **dy, imImage* mag) +{ + int i,j; + float xx, yy, g2, g1, g3, g4, g, xc, yc; + unsigned char* mag_data = (unsigned char*)mag->data[0]; + + for (i=1; iheight-1; i++) + { + for (j=1; jwidth-1; j++) + { + /* Treat the x and y derivatives as components of a vector */ + xc = dx[i][j]; + yc = dy[i][j]; + if (fabs(xc)<0.01 && fabs(yc)<0.01) continue; + + g = norm (xc, yc); + + /* Follow the gradient direction, as indicated by the direction of + the vector (xc, yc); retain pixels that are a local maximum. */ + + if (fabs(yc) > fabs(xc)) + { + /* The Y component is biggest, so gradient direction is basically UP/DOWN */ + xx = (float)(fabs(xc)/fabs(yc)); + yy = 1.0; + + g2 = norm (dx[i-1][j], dy[i-1][j]); + g4 = norm (dx[i+1][j], dy[i+1][j]); + if (xc*yc > 0.0) + { + g3 = norm (dx[i+1][j+1], dy[i+1][j+1]); + g1 = norm (dx[i-1][j-1], dy[i-1][j-1]); + } + else + { + g3 = norm (dx[i+1][j-1], dy[i+1][j-1]); + g1 = norm (dx[i-1][j+1], dy[i-1][j+1]); + } + + } + else + { + /* The X component is biggest, so gradient direction is basically LEFT/RIGHT */ + xx = (float)(fabs(yc)/fabs(xc)); + yy = 1.0; + + g2 = norm (dx[i][j+1], dy[i][j+1]); + g4 = norm (dx[i][j-1], dy[i][j-1]); + if (xc*yc > 0.0) + { + g3 = norm (dx[i-1][j-1], dy[i-1][j-1]); + g1 = norm (dx[i+1][j+1], dy[i+1][j+1]); + } + else + { + g1 = norm (dx[i-1][j+1], dy[i-1][j+1]); + g3 = norm (dx[i+1][j-1], dy[i+1][j-1]); + } + } + + /* Compute the interpolated value of the gradient magnitude */ + if ( (g > (xx*g1 + (yy-xx)*g2)) && (g > (xx*g3 + (yy-xx)*g4)) ) + { + mag_data[i*mag->width + j] = tobyte(g*MAG_SCALE); + } + } + } +} diff --git a/im/src/process/im_color.cpp b/im/src/process/im_color.cpp new file mode 100755 index 0000000..b27d4b3 --- /dev/null +++ b/im/src/process/im_color.cpp @@ -0,0 +1,255 @@ +/** \file + * \brief Color Processing Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_color.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + +#include +#include +#include +#include + +#include "im_process_pon.h" + +#include +#include + + +static void rgb2yrgb(imbyte* r, imbyte* g, imbyte* b, imbyte* y) +{ + int ri,gi,bi; + + *y = (imbyte)((299*(*r) + 587*(*g) + 114*(*b)) / 1000); + ri = (*r) - (*y) + 128; + gi = (*g) - (*y) + 128; + bi = (*b) - (*y) + 128; + + if (ri < 0) ri = 0; + if (gi < 0) gi = 0; + if (bi < 0) bi = 0; + + *r = (imbyte)ri; + *g = (imbyte)gi; + *b = (imbyte)bi; +} + +void imProcessSplitYChroma(const imImage* src_image, imImage* y_image, imImage* chroma_image) +{ + imbyte Y, + *red=(imbyte*)src_image->data[0], + *green=(imbyte*)src_image->data[1], + *blue=(imbyte*)src_image->data[2], + *red2=(imbyte*)chroma_image->data[0], + *green2=(imbyte*)chroma_image->data[1], + *blue2=(imbyte*)chroma_image->data[2], + *map1=(imbyte*)y_image->data[0]; + + for (int i = 0; i < src_image->count; i++) + { + imbyte R = red[i]; + imbyte G = green[i]; + imbyte B = blue[i]; + + rgb2yrgb(&R, &G, &B, &Y); + + map1[i] = Y; + + red2[i] = R; + green2[i] = G; + blue2[i] = B; + } +} + +static void DoSplitHSIFloat(float** data, float* hue, float* saturation, float* intensity, int count) +{ + float *red=data[0], + *green=data[1], + *blue=data[2]; + + for (int i = 0; i < count; i++) + { + imColorRGB2HSI(red[i], green[i], blue[i], &hue[i], &saturation[i], &intensity[i]); + } +} + +static void DoSplitHSIByte(imbyte** data, float* hue, float* saturation, float* intensity, int count) +{ + imbyte *red=data[0], + *green=data[1], + *blue=data[2]; + + for (int i = 0; i < count; i++) + { + imColorRGB2HSIbyte(red[i], green[i], blue[i], &hue[i], &saturation[i], &intensity[i]); + } +} + +void imProcessSplitHSI(const imImage* image, imImage* image1, imImage* image2, imImage* image3) +{ + switch(image->data_type) + { + case IM_BYTE: + DoSplitHSIByte((imbyte**)image->data, (float*)image1->data[0], (float*)image2->data[0], (float*)image3->data[0], image->count); + break; + case IM_FLOAT: + DoSplitHSIFloat((float**)image->data, (float*)image1->data[0], (float*)image2->data[0], (float*)image3->data[0], image->count); + break; + } + + imImageSetPalette(image1, imPaletteHues(), 256); +} + +static void DoMergeHSIFloat(float** data, float* hue, float* saturation, float* intensity, int count) +{ + float *red=data[0], + *green=data[1], + *blue=data[2]; + + for (int i = 0; i < count; i++) + { + imColorHSI2RGB(hue[i], saturation[i], intensity[i], &red[i], &green[i], &blue[i]); + } +} + +static void DoMergeHSIByte(imbyte** data, float* hue, float* saturation, float* intensity, int count) +{ + imbyte *red=data[0], + *green=data[1], + *blue=data[2]; + + for (int i = 0; i < count; i++) + { + imColorHSI2RGBbyte(hue[i], saturation[i], intensity[i], &red[i], &green[i], &blue[i]); + } +} + +void imProcessMergeHSI(const imImage* image1, const imImage* image2, const imImage* image3, imImage* image) +{ + switch(image->data_type) + { + case IM_BYTE: + DoMergeHSIByte((imbyte**)image->data, (float*)image1->data[0], (float*)image2->data[0], (float*)image3->data[0], image->count); + break; + case IM_FLOAT: + DoMergeHSIFloat((float**)image->data, (float*)image1->data[0], (float*)image2->data[0], (float*)image3->data[0], image->count); + break; + } +} + +void imProcessSplitComponents(const imImage* src_image, imImage** dst_image) +{ + memcpy(dst_image[0]->data[0], src_image->data[0], src_image->plane_size); + memcpy(dst_image[1]->data[0], src_image->data[1], src_image->plane_size); + memcpy(dst_image[2]->data[0], src_image->data[2], src_image->plane_size); + if (imColorModeDepth(src_image->color_space) == 4) + memcpy(dst_image[3]->data[0], src_image->data[3], src_image->plane_size); +} + +void imProcessMergeComponents(const imImage** src_image, imImage* dst_image) +{ + memcpy(dst_image->data[0], src_image[0]->data[0], dst_image->plane_size); + memcpy(dst_image->data[1], src_image[1]->data[0], dst_image->plane_size); + memcpy(dst_image->data[2], src_image[2]->data[0], dst_image->plane_size); + if (imColorModeDepth(dst_image->color_space) == 4) + memcpy(dst_image->data[3], src_image[3]->data[0], dst_image->plane_size); +} + +template +static void DoNormalizeComp(T** src_data, float** dst_data, int count, int depth) +{ + int d; + T* src_pdata[4]; + float* dst_pdata[4]; + + for(d = 0; d < depth; d++) + { + dst_pdata[d] = dst_data[d]; + src_pdata[d] = src_data[d]; + } + + for (int i = 0; i < count; i++) + { + float sum = 0; + for(d = 0; d < depth; d++) + sum += (float)*(src_pdata[d]); + + for(d = 0; d < depth; d++) + { + if (sum == 0) + *(dst_pdata[d]) = 0; + else + *(dst_pdata[d]) = (float)*(src_pdata[d]) / sum; + + dst_pdata[d]++; + src_pdata[d]++; + } + } +} + +void imProcessNormalizeComponents(const imImage* src_image, imImage* dst_image) +{ + switch(src_image->data_type) + { + case IM_BYTE: + DoNormalizeComp((imbyte**)src_image->data, (float**)dst_image->data, src_image->count, src_image->depth); + break; + case IM_USHORT: + DoNormalizeComp((imushort**)src_image->data, (float**)dst_image->data, src_image->count, src_image->depth); + break; + case IM_INT: + DoNormalizeComp((int**)src_image->data, (float**)dst_image->data, src_image->count, src_image->depth); + break; + case IM_FLOAT: + DoNormalizeComp((float**)src_image->data, (float**)dst_image->data, src_image->count, src_image->depth); + break; + } +} + +template +static void DoReplaceColor(T *src_data, T *dst_data, int width, int height, int depth, float* src_color, float* dst_color) +{ + int d, count = width*height; + for (int i = 0; i < count; i++) + { + int equal = 1; + for (d = 0; d < depth; d++) + { + if (*(src_data+d*count) != (T)src_color[d]) + { + equal = 0; + break; + } + } + + for (d = 0; d < depth; d++) + { + if (equal) + *(dst_data+d*count) = (T)dst_color[d]; + else + *(dst_data+d*count) = *(src_data+d*count); + } + + src_data++; + dst_data++; + } +} + +void imProcessReplaceColor(const imImage* src_image, imImage* dst_image, float* src_color, float* dst_color) +{ + switch(src_image->data_type) + { + case IM_BYTE: + DoReplaceColor((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], src_image->width, src_image->height, src_image->depth, src_color, dst_color); + break; + case IM_USHORT: + DoReplaceColor((imushort*)src_image->data[0], (imushort*)dst_image->data[0], src_image->width, src_image->height, src_image->depth, src_color, dst_color); + break; + case IM_INT: + DoReplaceColor((int*)src_image->data[0], (int*)dst_image->data[0], src_image->width, src_image->height, src_image->depth, src_color, dst_color); + break; + case IM_FLOAT: + DoReplaceColor((float*)src_image->data[0], (float*)dst_image->data[0], src_image->width, src_image->height, src_image->depth, src_color, dst_color); + break; + } +} diff --git a/im/src/process/im_convolve.cpp b/im/src/process/im_convolve.cpp new file mode 100755 index 0000000..a88a25c --- /dev/null +++ b/im/src/process/im_convolve.cpp @@ -0,0 +1,1594 @@ +/** \file + * \brief Convolution Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_convolve.cpp,v 1.2 2009/10/01 02:56:58 scuri Exp $ + */ + + +#include +#include +#include +#include +#include +#include +#include + +#include "im_process_loc.h" +#include "im_process_pon.h" + +#include +#include +#include +#include +#include + +/* Rotating Kernels +3x3 + 6 7 8 7 8 5 + 3 4 5 6 4 2 + 0 1 2 3 0 1 + +5x5 + 20 21 22 23 24 22 23 24 19 14 + 15 16 17 18 19 21 17 18 13 9 + 10 11 12 13 14 20 16 12 8 4 + 5 6 7 8 9 15 11 6 7 3 + 0 1 2 3 4 10 5 0 1 2 + +7x7 + 42 43 44 45 46 47 48 45 46 47 48 41 34 27 + 35 36 37 38 39 40 41 44 38 39 40 33 26 20 + 28 29 30 31 32 33 34 43 37 31 32 25 19 13 + 21 22 23 24 25 26 27 42 36 30 24 18 12 6 + 14 15 16 17 18 19 20 35 29 23 16 17 11 5 + 7 8 9 10 11 12 13 28 22 15 8 9 10 4 + 0 1 2 3 4 5 6 21 14 7 0 1 2 3 + + TO DO: a generic odd rotation function... +*/ + +template +static void iRotateKernel(KT* kernel_map, int kernel_size) +{ + KT temp; + + switch (kernel_size) + { + case 3: + { + temp = kernel_map[0]; + kernel_map[0] = kernel_map[3]; + kernel_map[3] = kernel_map[6]; + kernel_map[6] = kernel_map[7]; + kernel_map[7] = kernel_map[8]; + kernel_map[8] = kernel_map[5]; + kernel_map[5] = kernel_map[2]; + kernel_map[2] = kernel_map[1]; + kernel_map[1] = temp; + } + break; + case 5: + { + temp = kernel_map[0]; + kernel_map[0] = kernel_map[10]; + kernel_map[10] = kernel_map[20]; + kernel_map[20] = kernel_map[22]; + kernel_map[22] = kernel_map[24]; + kernel_map[24] = kernel_map[14]; + kernel_map[14] = kernel_map[4]; + kernel_map[4] = kernel_map[2]; + kernel_map[2] = temp; + + temp = kernel_map[5]; + kernel_map[5] = kernel_map[15]; + kernel_map[15] = kernel_map[21]; + kernel_map[21] = kernel_map[23]; + kernel_map[23] = kernel_map[19]; + kernel_map[19] = kernel_map[9]; + kernel_map[9] = kernel_map[3]; + kernel_map[3] = kernel_map[1]; + kernel_map[1] = temp; + + temp = kernel_map[6]; + kernel_map[6] = kernel_map[11]; + kernel_map[11] = kernel_map[16]; + kernel_map[16] = kernel_map[17]; + kernel_map[17] = kernel_map[18]; + kernel_map[18] = kernel_map[13]; + kernel_map[13] = kernel_map[8]; + kernel_map[8] = kernel_map[7]; + kernel_map[7] = temp; + } + break; + case 7: + { + temp = kernel_map[2]; + kernel_map[2] = kernel_map[7]; + kernel_map[7] = kernel_map[28]; + kernel_map[28] = kernel_map[43]; + kernel_map[43] = kernel_map[46]; + kernel_map[46] = kernel_map[41]; + kernel_map[41] = kernel_map[20]; + kernel_map[20] = kernel_map[5]; + kernel_map[5] = temp; + + temp = kernel_map[1]; + kernel_map[1] = kernel_map[14]; + kernel_map[14] = kernel_map[35]; + kernel_map[35] = kernel_map[44]; + kernel_map[44] = kernel_map[47]; + kernel_map[47] = kernel_map[34]; + kernel_map[34] = kernel_map[13]; + kernel_map[13] = kernel_map[4]; + kernel_map[4] = temp; + + temp = kernel_map[0]; + kernel_map[0] = kernel_map[21]; + kernel_map[21] = kernel_map[42]; + kernel_map[42] = kernel_map[45]; + kernel_map[45] = kernel_map[48]; + kernel_map[48] = kernel_map[27]; + kernel_map[27] = kernel_map[6]; + kernel_map[6] = kernel_map[3]; + kernel_map[3] = temp; + + temp = kernel_map[9]; + kernel_map[9] = kernel_map[15]; + kernel_map[15] = kernel_map[29]; + kernel_map[29] = kernel_map[37]; + kernel_map[37] = kernel_map[39]; + kernel_map[39] = kernel_map[33]; + kernel_map[33] = kernel_map[19]; + kernel_map[19] = kernel_map[11]; + kernel_map[11] = temp; + + temp = kernel_map[8]; + kernel_map[8] = kernel_map[22]; + kernel_map[22] = kernel_map[36]; + kernel_map[36] = kernel_map[38]; + kernel_map[38] = kernel_map[40]; + kernel_map[40] = kernel_map[26]; + kernel_map[26] = kernel_map[12]; + kernel_map[12] = kernel_map[10]; + kernel_map[10] = temp; + + temp = kernel_map[16]; + kernel_map[16] = kernel_map[23]; + kernel_map[23] = kernel_map[30]; + kernel_map[30] = kernel_map[31]; + kernel_map[31] = kernel_map[32]; + kernel_map[32] = kernel_map[25]; + kernel_map[25] = kernel_map[18]; + kernel_map[18] = kernel_map[17]; + kernel_map[17] = temp; + } + break; + } +} + +void imProcessRotateKernel(imImage* kernel) +{ + if (kernel->data_type == IM_INT) + iRotateKernel((int*)kernel->data[0], kernel->width); + else + iRotateKernel((float*)kernel->data[0], kernel->width); +} + +template +static int DoCompassConvolve(T* map, T* new_map, int width, int height, KT* orig_kernel_map, int kernel_size, int counter, CT) +{ + CT value; + KT total, *kernel_line, kvalue; + int offset, new_offset, i, j, x, y, kcount; + + // duplicate the kernel data so we can rotate it + kcount = kernel_size*kernel_size; + KT* kernel_map = (KT*)malloc(kcount*sizeof(KT)); + + int ks2 = kernel_size/2; + + total = 0; + for(j = 0; j < kcount; j++) + { + kvalue = orig_kernel_map[j]; + kernel_map[j] = kvalue; + total += kvalue; + } + + if (total == 0) + total = 1; + + for(j = 0; j < height; j++) + { + new_offset = j * width; + + for(i = 0; i < width; i++) + { + CT max_value = 0; + + for(int k = 0; k < 8; k++) // Rotate 8 times + { + value = 0; + + for(y = -ks2; y <= ks2; y++) + { + kernel_line = kernel_map + (y+ks2)*kernel_size; + + if (j + y < 0) // pass the bottom border + offset = -(y + j + 1) * width; + else if (j + y >= height) // pass the top border + offset = (2*height - 1 - (j + y)) * width; + else + offset = (j + y) * width; + + for(x = -ks2; x <= ks2; x++) + { + if (i + x < 0) // pass the left border + value += kernel_line[x+ks2] * map[offset - (i + x + 1)]; + else if (i + x >= width) // pass the right border + value += kernel_line[x+ks2] * map[offset + 2*width - 1 - (i + x)]; + else if (offset != -1) + value += kernel_line[x+ks2] * map[offset + (i + x)]; + } + } + + if (abs_op(value) > max_value) + max_value = abs_op(value); + + iRotateKernel(kernel_map, kernel_size); + } + + max_value /= total; + + int size_of = sizeof(imbyte); + if (sizeof(T) == size_of) + new_map[new_offset + i] = (T)IM_BYTECROP(max_value); + else + new_map[new_offset + i] = (T)max_value; + } + + if (!imCounterInc(counter)) + { + free(kernel_map); + return 0; + } + } + + free(kernel_map); + return 1; +} + +int imProcessCompassConvolve(const imImage* src_image, imImage* dst_image, imImage *kernel) +{ + int ret = 0; + + int counter = imCounterBegin("Compass Convolution"); + const char* msg = (const char*)imImageGetAttribute(kernel, "Description", NULL, NULL); + if (!msg) msg = "Filtering..."; + imCounterTotal(counter, src_image->depth*src_image->height, msg); + + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + if (kernel->data_type == IM_INT) + ret = DoCompassConvolve((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, counter, (int)0); + else + ret = DoCompassConvolve((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, counter, (float)0); + break; + case IM_USHORT: + if (kernel->data_type == IM_INT) + ret = DoCompassConvolve((imushort*)src_image->data[i], (imushort*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, counter, (int)0); + else + ret = DoCompassConvolve((imushort*)src_image->data[i], (imushort*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, counter, (float)0); + break; + case IM_INT: + if (kernel->data_type == IM_INT) + ret = DoCompassConvolve((int*)src_image->data[i], (int*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, counter, (int)0); + else + ret = DoCompassConvolve((int*)src_image->data[i], (int*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, counter, (float)0); + break; + case IM_FLOAT: + if (kernel->data_type == IM_INT) + ret = DoCompassConvolve((float*)src_image->data[i], (float*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, counter, (float)0); + else + ret = DoCompassConvolve((float*)src_image->data[i], (float*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, counter, (float)0); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +template +static int DoConvolveDual(T* map, T* new_map, int width, int height, KT* kernel_map1, KT* kernel_map2, int kernel_width, int kernel_height, int counter, CT) +{ + CT value1, value2, value; + KT total1, total2, *kernel_line; + int offset, new_offset, i, j, x, y; + + int kh2 = kernel_height/2; + int kw2 = kernel_width/2; + + if (kernel_height % 2 == 0) kh2--; + if (kernel_width % 2 == 0) kw2--; + + total1 = 0; + for(j = 0; j < kernel_height; j++) + { + for(i = 0; i < kernel_width; i++) + total1 += kernel_map1[j*kernel_width + i]; + } + + if (total1 == 0) + total1 = 1; + + total2 = 0; + for(j = 0; j < kernel_height; j++) + { + for(i = 0; i < kernel_width; i++) + total2 += kernel_map2[j*kernel_width + i]; + } + + if (total2 == 0) + total2 = 1; + + for(j = 0; j < height; j++) + { + new_offset = j * width; + + for(i = 0; i < width; i++) + { + value1 = 0; + value2 = 0; + + for(y = -kh2; y <= kh2; y++) + { + if (j + y < 0) // pass the bottom border + offset = -(y + j + 1) * width; + else if (j + y >= height) // pass the top border + offset = (2*height - 1 - (j + y)) * width; + else + offset = (j + y) * width; + + kernel_line = kernel_map1 + (y+kh2)*kernel_width; + for(x = -kw2; x <= kw2; x++) + { + if (i + x < 0) // pass the left border + value1 += kernel_line[x+kw2] * map[offset - (i + x + 1)]; + else if (i + x >= width) // pass the right border + value1 += kernel_line[x+kw2] * map[offset + 2*width - 1 - (i + x)]; + else if (offset != -1) + value1 += kernel_line[x+kw2] * map[offset + (i + x)]; + } + + kernel_line = kernel_map2 + (y+kh2)*kernel_width; + for(x = -kw2; x <= kw2; x++) + { + if (i + x < 0) // pass the left border + value2 += kernel_line[x+kw2] * map[offset - (i + x + 1)]; + else if (i + x >= width) // pass the right border + value2 += kernel_line[x+kw2] * map[offset + 2*width - 1 - (i + x)]; + else if (offset != -1) + value2 += kernel_line[x+kw2] * map[offset + (i + x)]; + } + } + + value1 /= total1; + value2 /= total2; + + value = (CT)sqrt((double)(value1*value1 + value2*value2)); + + int size_of = sizeof(imbyte); + if (sizeof(T) == size_of) + new_map[new_offset + i] = (T)IM_BYTECROP(value); + else + new_map[new_offset + i] = (T)value; + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +template +static int DoConvolveDualCpx(imcfloat* map, imcfloat* new_map, int width, int height, KT* kernel_map1, KT* kernel_map2, int kernel_width, int kernel_height, int counter) +{ + imcfloat value1, value2; + KT total1, total2, *kernel_line; + int offset, new_offset, i, j, x, y; + + int kh2 = kernel_height/2; + int kw2 = kernel_width/2; + + if (kernel_height % 2 == 0) kh2--; + if (kernel_width % 2 == 0) kw2--; + + total1 = 0; + for(j = 0; j < kernel_height; j++) + { + for(i = 0; i < kernel_width; i++) + total1 += kernel_map1[j*kernel_width + i]; + } + + if (total1 == 0) + total1 = 1; + + total2 = 0; + for(j = 0; j < kernel_height; j++) + { + for(i = 0; i < kernel_width; i++) + total2 += kernel_map1[j*kernel_width + i]; + } + + if (total2 == 0) + total2 = 1; + + for(j = 0; j < height; j++) + { + new_offset = j * width; + + for(i = 0; i < width; i++) + { + value1 = 0; + value2 = 0; + + for(y = -kh2; y <= kh2; y++) + { + if (j + y < 0) // pass the bottom border + offset = -(y + j + 1) * width; + else if (j + y >= height) // pass the top border + offset = (2*height - 1 - (j + y)) * width; + else + offset = (j + y) * width; + + kernel_line = kernel_map1 + (y+kh2)*kernel_width; + for(x = -kw2; x <= kw2; x++) + { + if (i + x < 0) // pass the left border + value1 += map[offset - (i + x + 1)] * (float)kernel_line[x+kw2]; + else if (i + x >= width) // pass the right border + value1 += map[offset + 2*width - 1 - (i + x)] * (float)kernel_line[x+kw2]; + else if (offset != -1) + value1 += map[offset + (i + x)] * (float)kernel_line[x+kw2]; + } + + kernel_line = kernel_map2 + (y+kh2)*kernel_width; + for(x = -kw2; x <= kw2; x++) + { + if (i + x < 0) // pass the left border + value2 += map[offset - (i + x + 1)] * (float)kernel_line[x+kw2]; + else if (i + x >= width) // pass the right border + value2 += map[offset + 2*width - 1 - (i + x)] * (float)kernel_line[x+kw2]; + else if (offset != -1) + value2 += map[offset + (i + x)] * (float)kernel_line[x+kw2]; + } + } + + value1 /= (float)total1; + value2 /= (float)total2; + + new_map[new_offset + i] = sqrt(value1*value1 + value2*value2); + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +int imProcessConvolveDual(const imImage* src_image, imImage* dst_image, const imImage *kernel1, const imImage *kernel2) +{ + int counter = imCounterBegin("Convolution"); + const char* msg = (const char*)imImageGetAttribute(kernel1, "Description", NULL, NULL); + if (!msg) msg = "Filtering..."; + imCounterTotal(counter, src_image->depth*src_image->height, msg); + + int ret = 0; + + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + if (kernel1->data_type == IM_INT) + ret = DoConvolveDual((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel1->data[0], (int*)kernel2->data[0], kernel1->width, kernel1->height, counter, (int)0); + else + ret = DoConvolveDual((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel1->data[0], (float*)kernel2->data[0], kernel1->width, kernel1->height, counter, (float)0); + break; + case IM_USHORT: + if (kernel1->data_type == IM_INT) + ret = DoConvolveDual((imushort*)src_image->data[i], (imushort*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel1->data[0], (int*)kernel2->data[0], kernel1->width, kernel1->height, counter, (int)0); + else + ret = DoConvolveDual((imushort*)src_image->data[i], (imushort*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel1->data[0], (float*)kernel2->data[0], kernel1->width, kernel1->height, counter, (float)0); + break; + case IM_INT: + if (kernel1->data_type == IM_INT) + ret = DoConvolveDual((int*)src_image->data[i], (int*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel1->data[0], (int*)kernel2->data[0], kernel1->width, kernel1->height, counter, (int)0); + else + ret = DoConvolveDual((int*)src_image->data[i], (int*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel1->data[0], (float*)kernel2->data[0], kernel1->width, kernel1->height, counter, (float)0); + break; + case IM_FLOAT: + if (kernel1->data_type == IM_INT) + ret = DoConvolveDual((float*)src_image->data[i], (float*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel1->data[0], (int*)kernel2->data[0], kernel1->width, kernel1->height, counter, (float)0); + else + ret = DoConvolveDual((float*)src_image->data[i], (float*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel1->data[0], (float*)kernel2->data[0], kernel1->width, kernel1->height, counter, (float)0); + break; + case IM_CFLOAT: + if (kernel1->data_type == IM_INT) + ret = DoConvolveDualCpx((imcfloat*)src_image->data[i], (imcfloat*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel1->data[0], (int*)kernel2->data[0], kernel1->width, kernel1->height, counter); + else + ret = DoConvolveDualCpx((imcfloat*)src_image->data[i], (imcfloat*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel1->data[0], (float*)kernel2->data[0], kernel1->width, kernel1->height, counter); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +template +static int DoConvolve(T* map, T* new_map, int width, int height, KT* kernel_map, int kernel_width, int kernel_height, int counter, CT) +{ + CT value; + KT total, *kernel_line; + int offset, new_offset, i, j, x, y; + + int kh2 = kernel_height/2; + int kw2 = kernel_width/2; + + if (kernel_height % 2 == 0) kh2--; + if (kernel_width % 2 == 0) kw2--; + + total = 0; + for(j = 0; j < kernel_height; j++) + { + for(i = 0; i < kernel_width; i++) + total += kernel_map[j*kernel_width + i]; + } + + if (total == 0) + total = 1; + + for(j = 0; j < height; j++) + { + new_offset = j * width; + + for(i = 0; i < width; i++) + { + value = 0; + + for(y = -kh2; y <= kh2; y++) + { + kernel_line = kernel_map + (y+kh2)*kernel_width; + + if (j + y < 0) // pass the bottom border + offset = -(y + j + 1) * width; + else if (j + y >= height) // pass the top border + offset = (2*height - 1 - (j + y)) * width; + else + offset = (j + y) * width; + + for(x = -kw2; x <= kw2; x++) + { + if (i + x < 0) // pass the left border + value += kernel_line[x+kw2] * map[offset - (i + x + 1)]; + else if (i + x >= width) // pass the right border + value += kernel_line[x+kw2] * map[offset + 2*width - 1 - (i + x)]; + else if (offset != -1) + value += kernel_line[x+kw2] * map[offset + (i + x)]; + } + } + + value /= total; + + int size_of = sizeof(imbyte); + if (sizeof(T) == size_of) + new_map[new_offset + i] = (T)IM_BYTECROP(value); + else + new_map[new_offset + i] = (T)value; + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +template +static int DoConvolveCpx(imcfloat* map, imcfloat* new_map, int width, int height, KT* kernel_map, int kernel_width, int kernel_height, int counter) +{ + imcfloat value; + KT total, *kernel_line; + int offset, new_offset, i, j, x, y; + + int kh2 = kernel_height/2; + int kw2 = kernel_width/2; + + if (kernel_height % 2 == 0) kh2--; + if (kernel_width % 2 == 0) kw2--; + + total = 0; + for(j = 0; j < kernel_height; j++) + { + for(i = 0; i < kernel_width; i++) + total += kernel_map[j*kernel_width + i]; + } + + if (total == 0) + total = 1; + + for(j = 0; j < height; j++) + { + new_offset = j * width; + + for(i = 0; i < width; i++) + { + value = 0; + + for(y = -kh2; y <= kh2; y++) + { + kernel_line = kernel_map + (y+kh2)*kernel_width; + + if (j + y < 0) // pass the bottom border + offset = -(y + j + 1) * width; + else if (j + y >= height) // pass the top border + offset = (2*height - 1 - (j + y)) * width; + else + offset = (j + y) * width; + + for(x = -kw2; x <= kw2; x++) + { + if (i + x < 0) // pass the left border + value += map[offset - (i + x + 1)] * (float)kernel_line[x+kw2]; + else if (i + x >= width) // pass the right border + value += map[offset + 2*width - 1 - (i + x)] * (float)kernel_line[x+kw2]; + else if (offset != -1) + value += map[offset + (i + x)] * (float)kernel_line[x+kw2]; + } + } + + value /= (float)total; + + new_map[new_offset + i] = value; + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +static int DoConvolveStep(const imImage* src_image, imImage* dst_image, const imImage *kernel, int counter) +{ + int ret = 0; + + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + if (kernel->data_type == IM_INT) + ret = DoConvolve((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, kernel->height, counter, (int)0); + else + ret = DoConvolve((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, kernel->height, counter, (float)0); + break; + case IM_USHORT: + if (kernel->data_type == IM_INT) + ret = DoConvolve((imushort*)src_image->data[i], (imushort*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, kernel->height, counter, (int)0); + else + ret = DoConvolve((imushort*)src_image->data[i], (imushort*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, kernel->height, counter, (float)0); + break; + case IM_INT: + if (kernel->data_type == IM_INT) + ret = DoConvolve((int*)src_image->data[i], (int*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, kernel->height, counter, (int)0); + else + ret = DoConvolve((int*)src_image->data[i], (int*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, kernel->height, counter, (float)0); + break; + case IM_FLOAT: + if (kernel->data_type == IM_INT) + ret = DoConvolve((float*)src_image->data[i], (float*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, kernel->height, counter, (float)0); + else + ret = DoConvolve((float*)src_image->data[i], (float*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, kernel->height, counter, (float)0); + break; + case IM_CFLOAT: + if (kernel->data_type == IM_INT) + ret = DoConvolveCpx((imcfloat*)src_image->data[i], (imcfloat*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, kernel->height, counter); + else + ret = DoConvolveCpx((imcfloat*)src_image->data[i], (imcfloat*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, kernel->height, counter); + break; + } + + if (!ret) + break; + } + + return ret; +} + +int imProcessConvolve(const imImage* src_image, imImage* dst_image, const imImage *kernel) +{ + int counter = imCounterBegin("Convolution"); + const char* msg = (const char*)imImageGetAttribute(kernel, "Description", NULL, NULL); + if (!msg) msg = "Filtering..."; + imCounterTotal(counter, src_image->depth*src_image->height, msg); + + int ret = DoConvolveStep(src_image, dst_image, kernel, counter); + + imCounterEnd(counter); + + return ret; +} + +int imProcessConvolveRep(const imImage* src_image, imImage* dst_image, const imImage *kernel, int ntimes) +{ + imImage *AuxImage = imImageClone(dst_image); + if (!AuxImage) + return 0; + + int counter = imCounterBegin("Repeated Convolution"); + const char* msg = (const char*)imImageGetAttribute(kernel, "Description", NULL, NULL); + if (!msg) msg = "Filtering..."; + imCounterTotal(counter, src_image->depth*src_image->height*ntimes, msg); + + const imImage *image1 = src_image; + imImage *image2 = dst_image; + + for (int i = 0; i < ntimes; i++) + { + if (!DoConvolveStep(image1, image2, kernel, counter)) + { + imCounterEnd(counter); + imImageDestroy(AuxImage); + return 0; + } + + image1 = image2; + + if (image1 == dst_image) + image2 = AuxImage; + else + image2 = dst_image; + } + + // The result is in image1, if in the Aux swap the data + if (image1 == AuxImage) + { + void** temp = (void**)dst_image->data; + dst_image->data = AuxImage->data; + AuxImage->data = (void**)temp; + } + + imCounterEnd(counter); + imImageDestroy(AuxImage); + + return 1; +} + +template +static int DoConvolveSep(T* map, T* new_map, int width, int height, KT* kernel_map, int kernel_width, int kernel_height, int counter, CT) +{ + CT value; + KT totalV, totalH, *kernel_line; + T* aux_line; + int offset, new_offset, i, j; + + int kh2 = kernel_height/2; + int kw2 = kernel_width/2; + + if (kernel_height % 2 == 0) kh2--; + if (kernel_width % 2 == 0) kw2--; + + // use only the first line and the first column of the kernel + + totalV = 0; + for(j = 0; j < kernel_height; j++) + totalV += kernel_map[j*kernel_width]; + + if (totalV == 0) + totalV = 1; + + totalH = 0; + for(i = 0; i < kernel_width; i++) + totalH += kernel_map[i]; + + if (totalH == 0) + totalH = 1; + + aux_line = (T*)malloc(width*sizeof(T)); + + for(j = 0; j < height; j++) + { + new_offset = j * width; + + for(i = 0; i < width; i++) + { + int y; + value = 0; + + // first pass, only for columns + + for(y = -kh2; y <= kh2; y++) + { + kernel_line = kernel_map + (y+kh2)*kernel_width; + + if (j + y < 0) // pass the bottom border + offset = -(y + j + 1) * width; + else if (j + y >= height) // pass the top border + offset = (2*height - 1 - (j + y)) * width; + else + offset = (j + y) * width; + + if (offset != -1) + value += kernel_line[0] * map[offset + i]; + } + + value /= totalV; + + int size_of = sizeof(imbyte); + if (sizeof(T) == size_of) + new_map[new_offset + i] = (T)IM_BYTECROP(value); + else + new_map[new_offset + i] = (T)value; + } + + if (!imCounterInc(counter)) + { + free(aux_line); + return 0; + } + } + + for(j = 0; j < height; j++) + { + offset = new_offset = j * width; + + for(i = 0; i < width; i++) + { + int x; + value = 0; + + // second pass, only for lines, but has to use an auxiliar buffer + + kernel_line = kernel_map; + + for(x = -kw2; x <= kw2; x++) + { + if (i + x < 0) // pass the left border + value += kernel_line[x+kw2] * new_map[offset - (i + x + 1)]; + else if (i + x >= width) // pass the right border + value += kernel_line[x+kw2] * new_map[offset + 2*width - 1 - (i + x)]; + else + value += kernel_line[x+kw2] * new_map[offset + (i + x)]; + } + + value /= totalH; + + int size_of = sizeof(imbyte); + if (sizeof(T) == size_of) + aux_line[i] = (T)IM_BYTECROP(value); + else + aux_line[i] = (T)value; + } + + memcpy(new_map + new_offset, aux_line, width*sizeof(T)); + + if (!imCounterInc(counter)) + { + free(aux_line); + return 0; + } + } + + free(aux_line); + return 1; +} + + +template +static int DoConvolveSepCpx(imcfloat* map, imcfloat* new_map, int width, int height, KT* kernel_map, int kernel_width, int kernel_height, int counter) +{ + imcfloat value; + KT totalV, totalH, *kernel_line; + imcfloat* aux_line; + int offset, new_offset, i, j; + + int kh2 = kernel_height/2; + int kw2 = kernel_width/2; + + if (kernel_height % 2 == 0) kh2--; + if (kernel_width % 2 == 0) kw2--; + + // use only the first line and the first column of the kernel + + totalV = 0; + for(j = 0; j < kernel_height; j++) + totalV += kernel_map[j*kernel_width]; + + if (totalV == 0) + totalV = 1; + + totalH = 0; + for(i = 0; i < kernel_width; i++) + totalH += kernel_map[i]; + + if (totalH == 0) + totalH = 1; + + aux_line = (imcfloat*)malloc(width*sizeof(imcfloat)); + + for(j = 0; j < height; j++) + { + new_offset = j * width; + + for(i = 0; i < width; i++) + { + int y; + value = 0; + + // first pass, only for columns + + for(y = -kh2; y <= kh2; y++) + { + kernel_line = kernel_map + (y+kh2)*kernel_width; + + if (j + y < 0) // pass the bottom border + offset = -(y + j + 1) * width; + else if (j + y >= height) // pass the top border + offset = (2*height - 1 - (j + y)) * width; + else + offset = (j + y) * width; + + if (offset != -1) + value += map[offset + i] * (float)kernel_line[0]; + } + + value /= (float)totalV; + + new_map[new_offset + i] = value; + } + + if (!imCounterInc(counter)) + { + free(aux_line); + return 0; + } + } + + for(j = 0; j < height; j++) + { + offset = new_offset = j * width; + + for(i = 0; i < width; i++) + { + int x; + value = 0; + + // second pass, only for lines, but has to use an auxiliar buffer + + kernel_line = kernel_map; + + for(x = -kw2; x <= kw2; x++) + { + if (i + x < 0) // pass the left border + value += new_map[offset - (i + x + 1)] * (float)kernel_line[x+kw2]; + else if (i + x >= width) // pass the right border + value += new_map[offset + 2*width - 1 - (i + x)] * (float)kernel_line[x+kw2]; + else if (offset != -1) + value += new_map[offset + (i + x)] * (float)kernel_line[x+kw2]; + } + + value /= (float)totalH; + + aux_line[i] = value; + } + + memcpy(new_map + new_offset, aux_line, width*sizeof(imcfloat)); + + if (!imCounterInc(counter)) + { + free(aux_line); + return 0; + } + } + + free(aux_line); + return 1; +} + +int imProcessConvolveSep(const imImage* src_image, imImage* dst_image, const imImage *kernel) +{ + int counter = imCounterBegin("Separable Convolution"); + const char* msg = (const char*)imImageGetAttribute(kernel, "Description", NULL, NULL); + if (!msg) msg = "Filtering..."; + imCounterTotal(counter, 2*src_image->depth*src_image->height, msg); + + int ret = 0; + + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + if (kernel->data_type == IM_INT) + ret = DoConvolveSep((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, kernel->height, counter, (int)0); + else + ret = DoConvolveSep((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, kernel->height, counter, (float)0); + break; + case IM_USHORT: + if (kernel->data_type == IM_INT) + ret = DoConvolveSep((imushort*)src_image->data[i], (imushort*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, kernel->height, counter, (int)0); + else + ret = DoConvolveSep((imushort*)src_image->data[i], (imushort*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, kernel->height, counter, (float)0); + break; + case IM_INT: + if (kernel->data_type == IM_INT) + ret = DoConvolveSep((int*)src_image->data[i], (int*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, kernel->height, counter, (int)0); + else + ret = DoConvolveSep((int*)src_image->data[i], (int*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, kernel->height, counter, (float)0); + break; + case IM_FLOAT: + if (kernel->data_type == IM_INT) + ret = DoConvolveSep((float*)src_image->data[i], (float*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, kernel->height, counter, (float)0); + else + ret = DoConvolveSep((float*)src_image->data[i], (float*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, kernel->height, counter, (float)0); + break; + case IM_CFLOAT: + if (kernel->data_type == IM_INT) + ret = DoConvolveSepCpx((imcfloat*)src_image->data[i], (imcfloat*)dst_image->data[i], src_image->width, src_image->height, (int*)kernel->data[0], kernel->width, kernel->height, counter); + else + ret = DoConvolveSepCpx((imcfloat*)src_image->data[i], (imcfloat*)dst_image->data[i], src_image->width, src_image->height, (float*)kernel->data[0], kernel->width, kernel->height, counter); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +/* +Description: + Can be used to find zero crossing of second derivative, + laplace. Can also be used to determine any other kind + of crossing. Pixels below or equal to 't' are set if the pixel + to the right or below is above 't', pixels above 't' are + set if the pixel to the right or below is below or equal to + 't'. Pixels that are "set" are set to the maximum absolute + difference of the two neighbours, to indicate the strength + of the edge. + + | IF (crossing t) + | out(x,y) = MAX(ABS(in(x,y)-in(x+1,y)), ABS(in(x,y)-in(x,y+1))) + | ELSE + | out(x,y) = 0 + +Author: Tor Lønnestad, BLAB, Ifi, UiO + +Copyright 1991, Blab, UiO +Image processing lab, Department of Informatics +University of Oslo +*/ +template +static void do_crossing(T* iband, T* oband, int width, int height, T t) +{ + int x, y, offset00 = 0, offset10 = 0, offset01 = 0; + T v, diff; + + for (y=0; y < height-1; y++) + { + offset00 = y*width; + offset10 = (y+1)*width; + offset01 = offset00 + 1; + + for (x=0; x < width-1; x++) + { + v = 0; + + if (iband[offset00] <= t) + { + if (iband[offset10] > t) + v = iband[offset10]-iband[offset00]; + + if (iband[offset01] > t) + { + diff = iband[offset01]-iband[offset00]; + if (diff > v) v = diff; + } + } + else + { + if (iband[offset10] <= t) + v = iband[offset00]-iband[offset10]; + + if (iband[offset01] <= t) + { + diff = iband[offset00]-iband[offset01]; + if (diff > v) v = diff; + } + } + + oband[offset00] = v; + + offset00++; + offset10++; + offset01++; + } + + /* last pixel on line */ + offset00++; + offset10++; + + v = 0; + + if (iband[offset00] <= t) + { + if (iband[offset10] > t) + v = iband[offset10]-iband[offset00]; + } + else + { + if (iband[offset10] <= t) + v = iband[offset00]-iband[offset10]; + } + + oband[offset00] = v; + } + + /* last line */ + offset00 = y*width; + offset01 = offset00 + 1; + + for (x=0; x < width-1; x++) + { + v = 0; + + if (iband[offset00] <= t) + { + if (iband[offset01] > t) + v = iband[offset01]-iband[offset00]; + } + else + { + if (iband[offset01] <= t) + v = iband[offset00]-iband[offset01]; + } + + oband[offset00] = v; + + offset00++; + offset01++; + } + + offset00++; + + /* last pixel */ + oband[offset00] = 0; +} + +void imProcessZeroCrossing(const imImage* src_image, imImage* dst_image) +{ + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_INT: + do_crossing((int*)src_image->data[i], (int*)dst_image->data[i], src_image->width, src_image->height, 0); + break; + case IM_FLOAT: + do_crossing((float*)src_image->data[i], (float*)dst_image->data[i], src_image->width, src_image->height, 0.0f); + break; + } + } +} + +int imProcessBarlettConvolve(const imImage* src_image, imImage* dst_image, int kernel_size) +{ + imImage* kernel = imImageCreate(kernel_size, kernel_size, IM_GRAY, IM_INT); + if (!kernel) + return 0; + + imImageSetAttribute(kernel, "Description", IM_BYTE, -1, (void*)"Barlett"); + + int* kernel_data = (int*)kernel->data[0]; + int half = kernel_size / 2; + for (int i = 0; i < kernel_size; i++) + { + if (i <= half) + kernel_data[i] = i+1; + else + kernel_data[i] = kernel_size-i; + } + for (int j = 0; j < kernel_size; j++) + { + if (j <= half) + kernel_data[j*kernel_size] = j+1; + else + kernel_data[j*kernel_size] = kernel_size-j; + } + + int ret = imProcessConvolveSep(src_image, dst_image, kernel); + + imImageDestroy(kernel); + + return ret; +} + +int imProcessSobelConvolve(const imImage* src_image, imImage* dst_image) +{ + int ret = 0; + + imImage* kernel1 = imKernelSobel(); + imImage* kernel2 = imImageCreate(3, 3, IM_GRAY, IM_INT); + imProcessRotate90(kernel1, kernel2, 1); + + ret = imProcessConvolveDual(src_image, dst_image, kernel1, kernel2); + + imImageDestroy(kernel1); + imImageDestroy(kernel2); + + return ret; +} + +int imProcessPrewittConvolve(const imImage* src_image, imImage* dst_image) +{ + int ret = 0; + + imImage* kernel1 = imKernelPrewitt(); + imImage* kernel2 = imImageClone(kernel1); + imProcessRotate90(kernel1, kernel2, 1); + + ret = imProcessConvolveDual(src_image, dst_image, kernel1, kernel2); + + imImageDestroy(kernel1); + imImageDestroy(kernel2); + + return ret; +} + +int imProcessSplineEdgeConvolve(const imImage* src_image, imImage* dst_image) +{ + int ret = 0; + + imImage* tmp_image = imImageClone(src_image); + if (!tmp_image) return 0; + + imImage* kernel1 = imImageCreate(5, 5, IM_GRAY, IM_INT); + imImageSetAttribute(kernel1, "Description", IM_BYTE, -1, (void*)"SplineEdge"); + + int* kernel_data = (int*)kernel1->data[0]; + kernel_data[10] = -1; + kernel_data[11] = 8; + kernel_data[12] = 0; + kernel_data[13] = -8; + kernel_data[14] = 1; + + imImage* kernel2 = imImageClone(kernel1); + imProcessRotate90(kernel1, kernel2, 1); + + imImage* kernel3 = imImageClone(kernel1); + imProcessRotateKernel(kernel3); + + imImage* kernel4 = imImageClone(kernel1); + imProcessRotate90(kernel3, kernel4, 1); + + ret = imProcessConvolveDual(src_image, tmp_image, kernel1, kernel2); + ret = imProcessConvolveDual(src_image, dst_image, kernel3, kernel4); + + imProcessArithmeticConstOp(tmp_image, (float)sqrt(2.0), tmp_image, IM_BIN_MUL); + imProcessArithmeticOp(tmp_image, dst_image, dst_image, IM_BIN_ADD); + + imImageDestroy(kernel1); + imImageDestroy(kernel2); + imImageDestroy(kernel3); + imImageDestroy(kernel4); + imImageDestroy(tmp_image); + + return ret; +} + +int imGaussianStdDev2KernelSize(float stddev) +{ + if (stddev < 0) + return (int)-stddev; + else + { + int width = (int)(3.35*stddev + 0.3333); + return 2*width + 1; + } +} + +float imGaussianKernelSize2StdDev(int kernel_size) +{ + int width = (kernel_size - 1)/2; + return (width - 0.3333f)/3.35f; +} + +int imProcessGaussianConvolve(const imImage* src_image, imImage* dst_image, float stddev) +{ + int kernel_size = imGaussianStdDev2KernelSize(stddev); + + imImage* kernel = imImageCreate(kernel_size, kernel_size, IM_GRAY, IM_FLOAT); + if (!kernel) + return 0; + + imImageSetAttribute(kernel, "Description", IM_BYTE, -1, (void*)"Gaussian"); + imProcessRenderGaussian(kernel, stddev); + + int ret = imProcessConvolveSep(src_image, dst_image, kernel); + + imImageDestroy(kernel); + + return ret; +} + +int imProcessLapOfGaussianConvolve(const imImage* src_image, imImage* dst_image, float stddev) +{ + int kernel_size = imGaussianStdDev2KernelSize(stddev); + + imImage* kernel = imImageCreate(kernel_size, kernel_size, IM_GRAY, IM_FLOAT); + if (!kernel) + return 0; + + imImageSetAttribute(kernel, "Description", IM_BYTE, -1, (void*)"Laplacian Of Gaussian"); + imProcessRenderLapOfGaussian(kernel, stddev); + + int ret; + if (src_image->data_type == IM_BYTE || src_image->data_type == IM_USHORT) + { + imImage* aux_image = imImageClone(dst_image); + if (!aux_image) + { + imImageDestroy(kernel); + return 0; + } + + imProcessUnArithmeticOp(src_image, aux_image, IM_UN_EQL); // Convert to IM_INT + ret = imProcessConvolve(aux_image, dst_image, kernel); + imImageDestroy(aux_image); + } + else + ret = imProcessConvolve(src_image, dst_image, kernel); + + imImageDestroy(kernel); + + return ret; +} + +int imProcessDiffOfGaussianConvolve(const imImage* src_image, imImage* dst_image, float stddev1, float stddev2) +{ + imImage* aux_image1 = imImageClone(src_image); + imImage* aux_image2 = imImageClone(src_image); + if (!aux_image1 || !aux_image2) + { + if (aux_image1) imImageDestroy(aux_image1); + return 0; + } + + int kernel_size1 = imGaussianStdDev2KernelSize(stddev1); + int kernel_size2 = imGaussianStdDev2KernelSize(stddev2); + int size = kernel_size1; + if (kernel_size1 < kernel_size2) size = kernel_size2; + + imImage* kernel1 = imImageCreate(size, size, IM_GRAY, IM_FLOAT); + imImage* kernel2 = imImageCreate(size, size, IM_GRAY, IM_FLOAT); + if (!kernel1 || !kernel2) + { + if (kernel1) imImageDestroy(kernel1); + if (kernel2) imImageDestroy(kernel2); + imImageDestroy(aux_image1); + imImageDestroy(aux_image2); + return 0; + } + + imImageSetAttribute(kernel1, "Description", IM_BYTE, -1, (void*)"Gaussian1"); + imImageSetAttribute(kernel2, "Description", IM_BYTE, -1, (void*)"Gaussian2"); + + imProcessRenderGaussian(kernel1, stddev1); + imProcessRenderGaussian(kernel2, stddev2); + + if (!imProcessConvolve(src_image, aux_image1, kernel1) || + !imProcessConvolve(src_image, aux_image2, kernel2)) + { + imImageDestroy(kernel1); + imImageDestroy(kernel2); + imImageDestroy(aux_image1); + imImageDestroy(aux_image2); + return 0; + } + + imProcessArithmeticOp(aux_image1, aux_image2, dst_image, IM_BIN_SUB); + + imImageDestroy(kernel1); + imImageDestroy(kernel2); + imImageDestroy(aux_image1); + imImageDestroy(aux_image2); + + return 1; +} + +int imProcessMeanConvolve(const imImage* src_image, imImage* dst_image, int ks) +{ + int counter = imCounterBegin("Mean Convolve"); + imCounterTotal(counter, src_image->depth*src_image->height, "Filtering..."); + + imImage* kernel = imImageCreate(ks, ks, IM_GRAY, IM_INT); + + int* kernel_data = (int*)kernel->data[0]; + + int ks2 = ks/2; + for(int ky = 0; ky < ks; ky++) + { + int ky2 = ky-ks2; + ky2 = ky2*ky2; + for(int kx = 0; kx < ks; kx++) + { + int kx2 = kx-ks2; + kx2 = kx2*kx2; + int radius = imRound(sqrt(double(kx2 + ky2))); + if (radius <= ks2) + kernel_data[ky*ks + kx] = 1; + } + } + + int ret = DoConvolveStep(src_image, dst_image, kernel, counter); + + imImageDestroy(kernel); + imCounterEnd(counter); + + return ret; +} + +template +static void DoSharpOp(T1 *src_map, T1 *dst_map, int count, float amount, T2 threshold, int gauss) +{ + int i; + T1 min, max; + + int size_of = sizeof(imbyte); + if (sizeof(T1) == size_of) + { + min = 0; + max = 255; + } + else + { + imMinMax(src_map, count, min, max); + + if (min == max) + { + max = min + 1; + + if (min != 0) + min = min - 1; + } + } + + for (i = 0; i < count; i++) + { + T2 diff; + + if (gauss) + diff = 20*(src_map[i] - dst_map[i]); /* dst_map contains a gaussian filter of the source image, must compensate for small edge values */ + else + diff = dst_map[i]; /* dst_map contains a laplacian filter of the source image */ + + if (threshold && abs_op(2*diff) < threshold) + diff = 0; + + T2 value = (T2)(src_map[i] + amount*diff); + if (value < min) + value = min; + else if (value > max) + value = max; + + dst_map[i] = (T1)value; + } +} + +static void doSharp(const imImage* src_image, imImage* dst_image, float amount, float threshold, int gauss) +{ + int count = src_image->count; + + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + DoSharpOp((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], count, amount, (int)threshold, gauss); + break; + case IM_USHORT: + DoSharpOp((imushort*)src_image->data[i], (imushort*)dst_image->data[i], count, amount, (int)threshold, gauss); + break; + case IM_INT: + DoSharpOp((int*)src_image->data[i], (int*)dst_image->data[i], count, amount, (int)threshold, gauss); + break; + case IM_FLOAT: + DoSharpOp((float*)src_image->data[i], (float*)dst_image->data[i], count, amount, (float)threshold, gauss); + break; + } + } +} + +int imProcessUnsharp(const imImage* src_image, imImage* dst_image, float stddev, float amount, float threshold) +{ + int kernel_size = imGaussianStdDev2KernelSize(stddev); + + imImage* kernel = imImageCreate(kernel_size, kernel_size, IM_GRAY, IM_FLOAT); + if (!kernel) + return 0; + + imImageSetAttribute(kernel, "Description", IM_BYTE, -1, (void*)"Unsharp"); + imProcessRenderGaussian(kernel, stddev); + + int ret = imProcessConvolveSep(src_image, dst_image, kernel); + doSharp(src_image, dst_image, amount, threshold, 1); + + imImageDestroy(kernel); + + return ret; +} + +int imProcessSharp(const imImage* src_image, imImage* dst_image, float amount, float threshold) +{ + imImage* kernel = imKernelLaplacian8(); + if (!kernel) + return 0; + + int ret = imProcessConvolve(src_image, dst_image, kernel); + doSharp(src_image, dst_image, amount, threshold, 0); + + imImageDestroy(kernel); + + return ret; +} + +static int iProcessCheckKernelType(const imImage* kernel) +{ + if (kernel->data_type == IM_INT) + { + int* kernel_data = (int*)kernel->data[0]; + for (int i = 0; i < kernel->count; i++) + { + if (kernel_data[i] < 0) /* if there are negative values, assume kernel is an edge detector */ + return 0; + } + } + else if (kernel->data_type == IM_FLOAT) + { + float* kernel_data = (float*)kernel->data[0]; + for (int i = 0; i < kernel->count; i++) + { + if (kernel_data[i] < 0) /* if there are negative values, assume kernel is an edge detector */ + return 0; + } + } + return 1; /* default is kernel is a smooth filter */ +} + +int imProcessSharpKernel(const imImage* src_image, const imImage* kernel, imImage* dst_image, float amount, float threshold) +{ + int ret = imProcessConvolve(src_image, dst_image, kernel); + doSharp(src_image, dst_image, amount, threshold, iProcessCheckKernelType(kernel)); + return ret; +} + diff --git a/im/src/process/im_convolve_rank.cpp b/im/src/process/im_convolve_rank.cpp new file mode 100755 index 0000000..5488a78 --- /dev/null +++ b/im/src/process/im_convolve_rank.cpp @@ -0,0 +1,701 @@ +/** \file + * \brief Rank Convolution Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_convolve_rank.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include +#include +#include + +#include "im_process_loc.h" + +#include +#include +#include +#include +#include + + +template +static int DoConvolveRankFunc(T *map, DT* new_map, int width, int height, int kw, int kh, T (*func)(T* value, int count, int center), int counter) +{ + T* value = new T[kw*kh]; + int offset, new_offset, i, j, x, y, v, c; + int kh1, kw1, kh2, kw2; + + kh2 = kh/2; + kw2 = kw/2; + kh1 = -kh2; + kw1 = -kw2; + if (kh%2==0) kh2--; // if not odd decrease 1 + if (kw%2==0) kw2--; + + for(j = 0; j < height; j++) + { + new_offset = j * width; + + for(i = 0; i < width; i++) + { + v = 0; c = 0; + + for(y = kh1; y <= kh2; y++) + { + if ((j + y < 0) || // pass the bottom border + (j + y >= height)) // pass the top border + continue; + + offset = (j + y) * width; + + for(x = kw1; x <= kw2; x++) + { + if ((i + x < 0) || // pass the left border + (i + x >= width)) // pass the right border + continue; + + if (x == 0 && y == 0) + c = v; + + value[v] = map[offset + (i + x)]; + v++; + } + } + + new_map[new_offset + i] = (DT)func(value, v, c); + } + + if (!imCounterInc(counter)) + { + delete[] value; + return 0; + } + } + + delete[] value; + return 1; +} + +static int compare_imReal(const void *elem1, const void *elem2) +{ + float* v1 = (float*)elem1; + float* v2 = (float*)elem2; + + if (*v1 < *v2) + return -1; + + if (*v1 > *v2) + return 1; + + return 0; +} + +static int compare_imInt(const void *elem1, const void *elem2) +{ + int* v1 = (int*)elem1; + int* v2 = (int*)elem2; + + if (*v1 < *v2) + return -1; + + if (*v1 > *v2) + return 1; + + return 0; +} + +static int compare_imUShort(const void *elem1, const void *elem2) +{ + imushort* v1 = (imushort*)elem1; + imushort* v2 = (imushort*)elem2; + + if (*v1 < *v2) + return -1; + + if (*v1 > *v2) + return 1; + + return 0; +} + +static int compare_imByte(const void *elem1, const void *elem2) +{ + imbyte* v1 = (imbyte*)elem1; + imbyte* v2 = (imbyte*)elem2; + + if (*v1 < *v2) + return -1; + + if (*v1 > *v2) + return 1; + + return 0; +} + +static imbyte median_op_byte(imbyte* value, int count, int center) +{ + (void)center; + qsort(value, count, sizeof(imbyte), compare_imByte); + return value[count/2]; +} + +static imushort median_op_ushort(imushort* value, int count, int center) +{ + (void)center; + qsort(value, count, sizeof(imushort), compare_imUShort); + return value[count/2]; +} + +static int median_op_int(int* value, int count, int center) +{ + (void)center; + qsort(value, count, sizeof(int), compare_imInt); + return value[count/2]; +} + +static float median_op_real(float* value, int count, int center) +{ + (void)center; + qsort(value, count, sizeof(float), compare_imReal); + return value[count/2]; +} + +int imProcessMedianConvolve(const imImage* src_image, imImage* dst_image, int ks) +{ + int i, ret = 0; + int counter; + + counter = imCounterBegin("Median Filter"); + imCounterTotal(counter, src_image->depth*src_image->height, "Filtering..."); + + for (i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = DoConvolveRankFunc((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, median_op_byte, counter); + break; + case IM_USHORT: + ret = DoConvolveRankFunc((imushort*)src_image->data[i], (imushort*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, median_op_ushort, counter); + break; + case IM_INT: + ret = DoConvolveRankFunc((int*)src_image->data[i], (int*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, median_op_int, counter); + break; + case IM_FLOAT: + ret = DoConvolveRankFunc((float*)src_image->data[i], (float*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, median_op_real, counter); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +static imbyte range_op_byte(imbyte* value, int count, int center) +{ + imbyte min, max; + (void)center; + imMinMax(value, count, min, max); + return max-min; +} + +static imushort range_op_ushort(imushort* value, int count, int center) +{ + imushort min, max; + (void)center; + imMinMax(value, count, min, max); + return max-min; +} + +static int range_op_int(int* value, int count, int center) +{ + int min, max; + (void)center; + imMinMax(value, count, min, max); + return max-min; +} + +static float range_op_real(float* value, int count, int center) +{ + float min, max; + (void)center; + imMinMax(value, count, min, max); + return max-min; +} + +int imProcessRangeConvolve(const imImage* src_image, imImage* dst_image, int ks) +{ + int i, ret = 0; + int counter; + + counter = imCounterBegin("Range Filter"); + imCounterTotal(counter, src_image->depth*src_image->height, "Filtering..."); + + for (i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = DoConvolveRankFunc((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, range_op_byte, counter); + break; + case IM_USHORT: + ret = DoConvolveRankFunc((imushort*)src_image->data[i], (imushort*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, range_op_ushort, counter); + break; + case IM_INT: + ret = DoConvolveRankFunc((int*)src_image->data[i], (int*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, range_op_int, counter); + break; + case IM_FLOAT: + ret = DoConvolveRankFunc((float*)src_image->data[i], (float*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, range_op_real, counter); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +/* +Local variable threshold by the method of Bernsen. + +Description: + If the difference between the largest and the smallest + pixel value within the 'dx'*'dy' window is greater than + or equal to 'cmin' (local contrast threshold), the average + of the two values is used as threshold. + + Pixels in homogenous areas (difference below 'cmin') + are assumed to be below the threshold. + +Reference: + Bernsen, J: "Dynamic thresholding of grey-level images" + Proc. of the 8th ICPR, Paris, Oct 1986, 1251-1255. + +Author: Oivind Due Trier + +Copyright 1990, Blab, UiO +Image processing lab, Department of Informatics +University of Oslo +*/ + +static int thresAux = 0; + +static imbyte contrast_thres_op_byte(imbyte* value, int count, int center) +{ + int c, t; + imbyte v = value[center], min, max; + + imMinMax(value, count, min, max); + + c = max-min; + + if (c < thresAux) + return 0; + else + { + t = ((int)max + (int)min) / 2; + + if (v >= t) + return 1; + else + return 0; + } +} + +static imushort contrast_thres_op_ushort(imushort* value, int count, int center) +{ + int c, t; + imushort v = value[center], min, max; + + imMinMax(value, count, min, max); + + c = max-min; + + if (c < thresAux) + return 0; + else + { + t = ((int)max + (int)min) / 2; + + if (v >= t) + return 1; + else + return 0; + } +} + +static int contrast_thres_op_int(int* value, int count, int center) +{ + int c, t; + int v = value[center], min, max; + + imMinMax(value, count, min, max); + + c = max-min; + + if (c < thresAux) + return 0; + else + { + t = ((int)max + (int)min) / 2; + + if (v >= t) + return 1; + else + return 0; + } +} + +int imProcessRangeContrastThreshold(const imImage* src_image, imImage* dst_image, int ks, int min_range) +{ + int ret = 0; + int counter = imCounterBegin("Range Contrast Threshold"); + imCounterTotal(counter, src_image->depth*src_image->height, "Filtering..."); + + thresAux = min_range; + + switch(src_image->data_type) + { + case IM_BYTE: + ret = DoConvolveRankFunc((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], + src_image->width, src_image->height, ks, ks, contrast_thres_op_byte, counter); + break; + case IM_USHORT: + ret = DoConvolveRankFunc((imushort*)src_image->data[0], (imbyte*)dst_image->data[0], + src_image->width, src_image->height, ks, ks, contrast_thres_op_ushort, counter); + break; + case IM_INT: + ret = DoConvolveRankFunc((int*)src_image->data[0], (imbyte*)dst_image->data[0], + src_image->width, src_image->height, ks, ks, contrast_thres_op_int, counter); + break; + } + + imCounterEnd(counter); + + return ret; +} + +static imbyte max_thres_op_byte(imbyte* value, int count, int center) +{ + imbyte v = value[center], min, max; + + if (v < thresAux) + return 0; + + imMinMax(value, count, min, max); + + if (v < max) + return 0; + + return 1; +} + +static imushort max_thres_op_ushort(imushort* value, int count, int center) +{ + imushort v = value[center], min, max; + + if (v < thresAux) + return 0; + + imMinMax(value, count, min, max); + + if (v < max) + return 0; + + return 1; +} + +static int max_thres_op_int(int* value, int count, int center) +{ + int v = value[center], min, max; + + if (v < thresAux) + return 0; + + imMinMax(value, count, min, max); + + if (v < max) + return 0; + + return 1; +} + +int imProcessLocalMaxThreshold(const imImage* src_image, imImage* dst_image, int ks, int min_thres) +{ + int ret = 0; + int counter = imCounterBegin("Local Max Threshold"); + imCounterTotal(counter, src_image->depth*src_image->height, "Filtering..."); + + thresAux = min_thres; + + switch(src_image->data_type) + { + case IM_BYTE: + ret = DoConvolveRankFunc((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], + src_image->width, src_image->height, ks, ks, max_thres_op_byte, counter); + break; + case IM_USHORT: + ret = DoConvolveRankFunc((imushort*)src_image->data[0], (imbyte*)dst_image->data[0], + src_image->width, src_image->height, ks, ks, max_thres_op_ushort, counter); + break; + case IM_INT: + ret = DoConvolveRankFunc((int*)src_image->data[0], (imbyte*)dst_image->data[0], + src_image->width, src_image->height, ks, ks, max_thres_op_int, counter); + break; + } + + imCounterEnd(counter); + + return ret; +} + +static imbyte rank_closest_op_byte(imbyte* value, int count, int center) +{ + imbyte v = value[center]; + imbyte min, max; + + imMinMax(value, count, min, max); + + if (v - min < max - v) + return min; + else + return max; +} + +static imushort rank_closest_op_ushort(imushort* value, int count, int center) +{ + imushort v = value[center]; + imushort min, max; + + imMinMax(value, count, min, max); + + if (v - min < max - v) + return min; + else + return max; +} + +static int rank_closest_op_int(int* value, int count, int center) +{ + int v = value[center]; + int min, max; + + imMinMax(value, count, min, max); + + if (v - min < max - v) + return min; + else + return max; +} + +static float rank_closest_op_real(float* value, int count, int center) +{ + float v = value[center]; + float min, max; + + imMinMax(value, count, min, max); + + if (v - min < max - v) + return min; + else + return max; +} + + +int imProcessRankClosestConvolve(const imImage* src_image, imImage* dst_image, int ks) +{ + int i, ret = 0; + int counter; + + counter = imCounterBegin("Rank Closest"); + imCounterTotal(counter, src_image->depth*src_image->height, "Filtering..."); + + for (i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = DoConvolveRankFunc((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_closest_op_byte, counter); + break; + case IM_USHORT: + ret = DoConvolveRankFunc((imushort*)src_image->data[i], (imushort*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_closest_op_ushort, counter); + break; + case IM_INT: + ret = DoConvolveRankFunc((int*)src_image->data[i], (int*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_closest_op_int, counter); + break; + case IM_FLOAT: + ret = DoConvolveRankFunc((float*)src_image->data[i], (float*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_closest_op_real, counter); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +static imbyte rank_max_op_byte(imbyte* value, int count, int center) +{ + imbyte min, max; + (void)center; + imMinMax(value, count, min, max); + return max; +} + +static imushort rank_max_op_ushort(imushort* value, int count, int center) +{ + imushort min, max; + (void)center; + imMinMax(value, count, min, max); + return max; +} + +static int rank_max_op_int(int* value, int count, int center) +{ + int min, max; + (void)center; + imMinMax(value, count, min, max); + return max; +} + +static float rank_max_op_real(float* value, int count, int center) +{ + float min, max; + (void)center; + imMinMax(value, count, min, max); + return max; +} + +int imProcessRankMaxConvolve(const imImage* src_image, imImage* dst_image, int ks) +{ + int i, ret = 0; + int counter; + + counter = imCounterBegin("Rank Max"); + imCounterTotal(counter, src_image->depth*src_image->height, "Filtering..."); + + for (i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = DoConvolveRankFunc((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_max_op_byte, counter); + break; + case IM_USHORT: + ret = DoConvolveRankFunc((imushort*)src_image->data[i], (imushort*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_max_op_ushort, counter); + break; + case IM_INT: + ret = DoConvolveRankFunc((int*)src_image->data[i], (int*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_max_op_int, counter); + break; + case IM_FLOAT: + ret = DoConvolveRankFunc((float*)src_image->data[i], (float*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_max_op_real, counter); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +static imbyte rank_min_op_byte(imbyte* value, int count, int center) +{ + imbyte min, max; + (void)center; + imMinMax(value, count, min, max); + return min; +} + +static imushort rank_min_op_ushort(imushort* value, int count, int center) +{ + imushort min, max; + (void)center; + imMinMax(value, count, min, max); + return min; +} + +static int rank_min_op_int(int* value, int count, int center) +{ + int min, max; + (void)center; + imMinMax(value, count, min, max); + return min; +} + +static float rank_min_op_real(float* value, int count, int center) +{ + float min, max; + (void)center; + imMinMax(value, count, min, max); + return min; +} + +int imProcessRankMinConvolve(const imImage* src_image, imImage* dst_image, int ks) +{ + int i, ret = 0; + int counter; + + counter = imCounterBegin("Rank Min"); + imCounterTotal(counter, src_image->depth*src_image->height, "Filtering..."); + + for (i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = DoConvolveRankFunc((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_min_op_byte, counter); + break; + case IM_USHORT: + ret = DoConvolveRankFunc((imushort*)src_image->data[i], (imushort*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_min_op_ushort, counter); + break; + case IM_INT: + ret = DoConvolveRankFunc((int*)src_image->data[i], (int*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_min_op_int, counter); + break; + case IM_FLOAT: + ret = DoConvolveRankFunc((float*)src_image->data[i], (float*)dst_image->data[i], + src_image->width, src_image->height, ks, ks, rank_min_op_real, counter); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} diff --git a/im/src/process/im_distance.cpp b/im/src/process/im_distance.cpp new file mode 100755 index 0000000..019356d --- /dev/null +++ b/im/src/process/im_distance.cpp @@ -0,0 +1,512 @@ +/** \file + * \brief Distance Transform + * + * See Copyright Notice in im_lib.h + * $Id: im_distance.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + +#include +#include + +#include "im_process_glo.h" + +#include +#include +#include + +const float DT_ONE = 1.0f; // 1x0 +const float DT_SQRT2 = 1.414213562373f; // 1x1 +const float DT_SQRT5 = 2.2360679775f; // 2x1 +const float DT_SQRT10 = 3.1622776601684f; // 3x1 +const float DT_SQRT13 = 3.605551275464f; // 3x2 +const float DT_SQRT17 = 4.12310562562f; // 4x1 +const float DT_SQRT25 = 5.0f; // 4x3 + +static inline void setValue(int r, int r1, int r2, int r3, int r4, float *image_data, int f) +{ + float v; + float minv = image_data[r]; // (x,y) + + if (f) + v = image_data[r - 1] + DT_ONE; // (x-1,y) + else + v = image_data[r + 1] + DT_ONE; // (x+1,y) + if (v < minv) minv = v; + + v = image_data[r1] + DT_ONE; // (x,y-1) (x,y+1) + if (v < minv) minv = v; + + if (minv < DT_SQRT2) + goto min_attrib; + + v = image_data[r1 - 1] + DT_SQRT2; // (x-1,y-1) (x-1,y+1) + if (v < minv) minv = v; + + v = image_data[r1 + 1] + DT_SQRT2; // (x+1,y-1) (x+1,y+1) + if (v < minv) minv = v; + + if (minv < DT_SQRT5) + goto min_attrib; + + v = image_data[r1 + 2] + DT_SQRT5; // (x+2,y-1) (x+2,y+1) + if (v < minv) minv = v; + + v = image_data[r1 - 2] + DT_SQRT5; // (x-2,y-1) (x-2,y+1) + if (v < minv) minv = v; + + v = image_data[r2 - 1] + DT_SQRT5; // (x-1,y-2) (x-1,y+2) + if (v < minv) minv = v; + + v = image_data[r2 + 1] + DT_SQRT5; // (x+1,y-2) (x+1,y+2) + if (v < minv) minv = v; + + if (minv < DT_SQRT10) + goto min_attrib; + + v = image_data[r1 + 3] + DT_SQRT10; // (x+3,y-1) (x+3,y+1) + if (v < minv) minv = v; + + v = image_data[r1 - 3] + DT_SQRT10; // (x-3,y-1) (x-3,y+1) + if (v < minv) minv = v; + + v = image_data[r3 - 1] + DT_SQRT10; // (x-1,y-3) (x-1,y+3) + if (v < minv) minv = v; + + v = image_data[r3 + 1] + DT_SQRT10; // (x+1,y-3) (x+1,y+3) + if (v < minv) minv = v; + + if (minv < DT_SQRT13) + goto min_attrib; + + v = image_data[r2 - 3] + DT_SQRT13; // (x-3,y-2) (x-3,y+2) + if (v < minv) minv = v; + + v = image_data[r2 + 3] + DT_SQRT13; // (x+3,y-2) (x+3,y+2) + if (v < minv) minv = v; + + v = image_data[r3 + 2] + DT_SQRT13; // (x+2,y-3) (x+2,y+3) + if (v < minv) minv = v; + + v = image_data[r3 - 2] + DT_SQRT13; // (x-2,y-3) (x-2,y+3) + if (v < minv) minv = v; + + if (minv < DT_SQRT17) + goto min_attrib; + + v = image_data[r1 + 4] + DT_SQRT17; // (x+4,y-1) (x+4,y+1) + if (v < minv) minv = v; + + v = image_data[r1 - 4] + DT_SQRT17; // (x-4,y-1) (x-4,y+1) + if (v < minv) minv = v; + + v = image_data[r4 - 1] + DT_SQRT17; // (x-1,y-4) (x-1,y+4) + if (v < minv) minv = v; + + v = image_data[r4 + 1] + DT_SQRT17; // (x+1,y-4) (x+1,y+4) + if (v < minv) minv = v; + + if (minv < DT_SQRT25) + goto min_attrib; + + v = image_data[r3 - 4] + DT_SQRT25; // (x-4,y-3) (x-4,y+3) + if (v < minv) minv = v; + + v = image_data[r3 + 4] + DT_SQRT25; // (x+4,y-3) (x+4,y+3) + if (v < minv) minv = v; + + v = image_data[r4 + 3] + DT_SQRT25; // (x+3,y-4) (x+3,y+4) + if (v < minv) minv = v; + + v = image_data[r4 - 3] + DT_SQRT25; // (x-3,y-4) (x-3,y+4) + if (v < minv) minv = v; + +min_attrib: + image_data[r] = minv; +} + +static inline void setValueForwardEdge(int r, int r1, int r2, int width, int x, int y, float *image_data) +{ + float v; + float minv = image_data[r]; // (x,y) + + if (y > 0) + { + v = image_data[r1] + DT_ONE; // (x,y-1) + if (v < minv) minv = v; + } + + if (x > 0) + { + v = image_data[r - 1] + DT_ONE; // (x-1,y) + if (v < minv) minv = v; + } + + if (x > 0 && y > 0) + { + v = image_data[r1 - 1] + DT_SQRT2; // (x-1,y-1) + if (v < minv) minv = v; + } + + if (x < width-2 && y > 0) + { + v = image_data[r1 + 1] + DT_SQRT2; // (x+1,y-1) + if (v < minv) minv = v; + } + + if (x > 0 && y > 1) + { + v = image_data[r2 - 1] + DT_SQRT5; // (x-1,y-2) + if (v < minv) minv = v; + } + + if (x < width-2 && y > 1) + { + v = image_data[r2 + 1] + DT_SQRT5; // (x+1,y-2) + if (v < minv) minv = v; + } + + if (x < width-3 && y > 0) + { + v = image_data[r1 + 2] + DT_SQRT5; // (x+2,y-1) + if (v < minv) minv = v; + } + + if (x > 1 && y > 0) + { + v = image_data[r1 - 2] + DT_SQRT5; // (x-2,y-1) + if (v < minv) minv = v; + } + + image_data[r] = minv; +} + +static inline void setValueBackwardEdge(int r, int r1, int r2, int width, int height, int x, int y, float *image_data) +{ + float v; + float minv = image_data[r]; // (x,y) + + if (x < width-2) + { + v = image_data[r + 1] + DT_ONE; // (x+1,y) + if (v < minv) minv = v; + } + + if (y < height-2) + { + v = image_data[r1] + DT_ONE; // (x,y+1) + if (v < minv) minv = v; + } + + if (y < height-2 && x > 0) + { + v = image_data[r1 - 1] + DT_SQRT2; // (x-1,y+1) + if (v < minv) minv = v; + } + + if (y < height-2 && x < width-2) + { + v = image_data[r1 + 1] + DT_SQRT2; // (x+1,y+1) + if (v < minv) minv = v; + } + + if (y < height-2 && x < width-3) + { + v = image_data[r1 + 2] + DT_SQRT5; // (x+2,y+1) + if (v < minv) minv = v; + } + + if (y < height-3 && x < width-2) + { + v = image_data[r2 + 1] + DT_SQRT5; // (x+1,y+2) + if (v < minv) minv = v; + } + + if (y < height-3 && x > 0) + { + v = image_data[r2 - 1] + DT_SQRT5; // (x-1,y+2) + if (v < minv) minv = v; + } + + if (y < height-2 && x > 1) + { + v = image_data[r1 - 2] + DT_SQRT5; // (x-2,y+1) + if (v < minv) minv = v; + } + + image_data[r] = minv; +} + +void imProcessDistanceTransform(const imImage* src_image, imImage* dst_image) +{ + int i, x, y, + offset, offset1, offset2, offset3, offset4, + width = src_image->width, + height = src_image->height; + + imbyte* src_data = (imbyte*)src_image->data[0]; + float* dst_data = (float*)dst_image->data[0]; + + float max_dist = (float)sqrt(double(width*width + height*height)); + + for (i = 0; i < src_image->count; i++) + { + // if pixel is background, then distance is zero. + if (src_data[i]) + dst_data[i] = max_dist; + } + + /* down->top, left->right */ + for (y = 0; y < height; y++) + { + offset = y * width; + offset1 = offset - width; + offset2 = offset - 2*width; + offset3 = offset - 3*width; + offset4 = offset - 4*width; + + for (x = 0; x < width; x++) + { + if (src_data[offset]) + { + if (x < 4 || x > width-5 || y < 4 || y > height-5) + setValueForwardEdge(offset, offset1, offset2, width, x, y, dst_data); + else + setValue(offset, offset1, offset2, offset3, offset4, dst_data, 1); + } + + offset++; + offset1++; + offset2++; + offset3++; + offset4++; + } + } + + /* top->down, right->left */ + for (y = height-1; y >= 0; y--) + { + offset = y * width + width-1; + offset1 = offset + width; + offset2 = offset + 2*width; + offset3 = offset + 3*width; + offset4 = offset + 4*width; + + for (x = width-1; x >= 0; x--) + { + if (src_data[offset]) + { + if (x < 4 || x > width-5 || y < 4 || y > height-5) + setValueBackwardEdge(offset, offset1, offset2, width, height, x, y, dst_data); + else + setValue(offset, offset1, offset2, offset3, offset4, dst_data, 0); + } + + offset--; + offset1--; + offset2--; + offset3--; + offset4--; + } + } +} + +static void iFillValue(imbyte* img_data, int x, int y, int width, int value) +{ + int r = y * width + x; + int r1a = r - width; + int r1b = r + width; + int v; + + int old_value = img_data[r]; + img_data[r] = (imbyte)value; + + v = img_data[r1a]; // (x,y-1) + if (v == old_value) + iFillValue(img_data, x, y-1, width, value); + + v = img_data[r - 1]; // (x-1,y) + if (v == old_value) + iFillValue(img_data, x-1, y, width, value); + + v = img_data[r1a - 1]; // (x-1,y-1) + if (v == old_value) + iFillValue(img_data, x-1, y-1, width, value); + + v = img_data[r1a + 1]; // (x+1,y-1) + if (v == old_value) + iFillValue(img_data, x+1, y-1, width, value); + + v = img_data[r + 1]; // (x+1,y) + if (v == old_value) + iFillValue(img_data, x+1, y, width, value); + + v = img_data[r1b]; // (x,y+1) + if (v == old_value) + iFillValue(img_data, x, y+1, width, value); + + v = img_data[r1b - 1]; // (x-1,y+1) + if (v == old_value) + iFillValue(img_data, x-1, y+1, width, value); + + v = img_data[r1b + 1]; // (x+1,y+1) + if (v == old_value) + iFillValue(img_data, x+1, y+1, width, value); +} + +static inline int iCheckFalseMaximum(int r, int r2a, int r2b, int width, float *src_data) +{ + /* we are ignoring valeys of 1 pixel. */ + /* this is not 100% fail proof */ + float v; + float maxv = src_data[r]; // (x,y) + int r1a = r - width; + int r1b = r + width; + + v = src_data[r2a - 1]; // (x-1,y-2) + if (v > maxv) return 1; + + v = src_data[r2a]; // (x,y-2) + if (v > maxv) return 1; + + v = src_data[r2a + 1]; // (x+1,y-2) + if (v > maxv) return 1; + + v = src_data[r2b - 1]; // (x-1,y+2) + if (v > maxv) return 1; + + v = src_data[r2b]; // (x,y+2) + if (v > maxv) return 1; + + v = src_data[r2b + 1]; // (x+1,y+2) + if (v > maxv) return 1; + + + v = src_data[r2b - 2]; // (x-2,y+2) + if (v > maxv) return 1; + + v = src_data[r1b - 2]; // (x-2,y+1) + if (v > maxv) return 1; + + v = src_data[r - 2]; // (x-2,y) + if (v > maxv) return 1; + + v = src_data[r1a - 2]; // (x-2,y-1) + if (v > maxv) return 1; + + v = src_data[r2a - 2]; // (x-2,y-2) + if (v > maxv) return 1; + + + v = src_data[r2a + 2]; // (x+2,y-2) + if (v > maxv) return 1; + + v = src_data[r1a + 2]; // (x+2,y-1) + if (v > maxv) return 1; + + v = src_data[r + 2]; // (x+2,y) + if (v > maxv) return 1; + + v = src_data[r1b + 2]; // (x+2,y+1) + if (v > maxv) return 1; + + v = src_data[r2b + 2]; // (x+2,y+2) + if (v > maxv) return 1; + + return 0; +} + +static inline void iCheckMaximum(int r, int r1a, int r1b, float *src_data, imbyte* dst_data) +{ + int unique = 1; + float v; + float maxv = src_data[r]; // (x,y) + + v = src_data[r1a]; // (x,y-1) + if (v >= maxv) { maxv = v; unique = 0; } + + v = src_data[r - 1]; // (x-1,y) + if (v >= maxv) { maxv = v; unique = 0; } + + v = src_data[r1a - 1]; // (x-1,y-1) + if (v >= maxv) { maxv = v; unique = 0; } + + v = src_data[r1a + 1]; // (x+1,y-1) + if (v >= maxv) { maxv = v; unique = 0; } + + v = src_data[r + 1]; // (x+1,y) + if (v >= maxv) { maxv = v; unique = 0; } + + v = src_data[r1b]; // (x,y+1) + if (v >= maxv) { maxv = v; unique = 0; } + + v = src_data[r1b - 1]; // (x-1,y+1) + if (v >= maxv) { maxv = v; unique = 0; } + + v = src_data[r1b + 1]; // (x+1,y+1) + if (v >= maxv) { maxv = v; unique = 0; } + + if (src_data[r] < maxv) // not a maximum + dst_data[r] = 0; + else + { + if (unique) // unique maximum + dst_data[r] = 1; + else // can be maximum + dst_data[r] = 2; + } +} + +void imProcessRegionalMaximum(const imImage* src_image, imImage* dst_image) +{ + int i, x, y, offset, offsetA, offsetB, + width = src_image->width, + height = src_image->height; + + float* src_data = (float*)src_image->data[0]; + imbyte* dst_data = (imbyte*)dst_image->data[0]; + + for (y = 1; y < height-1; y++) + { + offset = y * width + 1; + offsetA = offset - width; + offsetB = offset + width; + + for (x = 1; x < width-1; x++) + { + if (src_data[offset]) + iCheckMaximum(offset, offsetA, offsetB, src_data, dst_data); + + offset++; + offsetA++; + offsetB++; + } + } + + // remove false maximum + for (y = 2; y < height-2; y++) + { + offset = y * width + 2; + offsetA = offset - 2*width; + offsetB = offset + 2*width; + + for (x = 2; x < width-2; x++) + { + if (dst_data[offset] == 2) + { + if (iCheckFalseMaximum(offset, offsetA, offsetB, width, src_data)) + iFillValue(dst_data, x, y, width, 0); + } + + offset++; + offsetA++; + offsetB++; + } + } + + // update destiny with remaining maximum + for (i = 0; i < src_image->count; i++) + { + if (dst_data[i] == 2) + dst_data[i] = 1; + } +} diff --git a/im/src/process/im_effects.cpp b/im/src/process/im_effects.cpp new file mode 100755 index 0000000..7f65ce6 --- /dev/null +++ b/im/src/process/im_effects.cpp @@ -0,0 +1,86 @@ +/** \file + * \brief Effects + * + * See Copyright Notice in im_lib.h + * $Id: im_effects.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include +#include +#include + +#include "im_process_pon.h" +#include "im_math_op.h" + +#include +#include + +static unsigned char BoxMean(imbyte *map, int offset, int shift, int hbox_size, int vbox_size) +{ + map += offset; + int acum = 0; + for (int i = 0; i < vbox_size; i++) + { + for (int j = 0; j < hbox_size; j++) + { + acum += *map++; + } + + map += shift; + } + + return (unsigned char)(acum / (vbox_size*hbox_size)); +} + +static void BoxSet(imbyte *map, int offset, int shift, int hbox_size, int vbox_size, unsigned char value) +{ + map += offset; + for (int i = 0; i < vbox_size; i++) + { + for (int j = 0; j < hbox_size; j++) + { + *map++ = value; + } + + map += shift; + } +} + +void imProcessPixelate(const imImage* src_image, imImage* dst_image, int box_size) +{ + int hbox = ((src_image->width + box_size-1)/ box_size); + int vbox = ((src_image->height + box_size-1)/ box_size); + + for (int i = 0; i < src_image->depth; i++) + { + imbyte *src_map=(imbyte*)src_image->data[i]; + imbyte *dst_map=(imbyte*)dst_image->data[i]; + int vbox_size = box_size; + + for (int bv = 0; bv < vbox; bv++) + { + int bv_pos = bv*box_size; + if (bv == vbox-1) vbox_size = src_image->height - bv_pos; + int hbox_size = box_size; + + for (int bh = 0; bh < hbox; bh++) + { + int bh_pos = bh*box_size; + if (bh == hbox-1) hbox_size = src_image->width - bh_pos; + int offset = bv_pos*src_image->width + bh_pos; + int shift = src_image->width - hbox_size; + unsigned char mean = BoxMean(src_map, offset, shift, hbox_size, vbox_size); + BoxSet(dst_map, offset, shift, hbox_size, vbox_size, mean); + } + } + } +} + +void imProcessPosterize(const imImage* src_image, imImage* dst_image, int level) +{ + unsigned char mask = (unsigned char)(0xFF << level); + imProcessBitMask(src_image, dst_image, mask, IM_BIT_AND); +} + diff --git a/im/src/process/im_fft.cpp b/im/src/process/im_fft.cpp new file mode 100755 index 0000000..2a36880 --- /dev/null +++ b/im/src/process/im_fft.cpp @@ -0,0 +1,198 @@ +/** \file + * \brief Fast Fourier Transform using FFTW library + * + * See Copyright Notice in im_lib.h + * $Id: im_fft.cpp,v 1.2 2009/08/20 12:37:11 scuri Exp $ + */ + +#include +#include +#include +#include + +#include "im_process.h" + +#include +#include +#include + +#ifdef USE_FFTW3 +#include "fftw3.h" +#else +#include "fftw.h" +#endif + +static void iCopyCol(imcfloat *map1, imcfloat *map2, int height, int width1, int width2) +{ + int i; + for(i = 0; i < height; i++) + { + *map1 = *map2; + map1 += width1; + map2 += width2; + } +} + +static void iCenterFFT(imcfloat *map, int width, int height, int inverse) +{ + imcfloat *map1, *map2, *map3, *tmp; + int i, half1_width, half2_width, half1_height, half2_height; + + if (inverse) + { + half1_width = width/2; + half1_height = height/2; + + half2_width = (width+1)/2; + half2_height = (height+1)/2; + } + else + { + half1_width = (width+1)/2; + half1_height = (height+1)/2; + + half2_width = width/2; + half2_height = height/2; + } + + tmp = (imcfloat*)malloc(half1_width*sizeof(imcfloat)); + + map1 = map; + map2 = map + half1_width; + map3 = map + half2_width; + for(i = 0; i < height; i++) + { + memcpy(tmp, map1, half1_width*sizeof(imcfloat)); + memcpy(map1, map2, half2_width*sizeof(imcfloat)); + memcpy(map3, tmp, half1_width*sizeof(imcfloat)); + + map1 += width; + map2 += width; + map3 += width; + } + + free(tmp); + + tmp = (imcfloat*)malloc(half1_height*sizeof(imcfloat)); + + map1 = map; + map2 = map + half1_height*width; + map3 = map + half2_height*width; + for(i = 0; i < width; i++) + { + iCopyCol(tmp, map1, half1_height, 1, width); + iCopyCol(map1, map2, half2_height, width, width); + iCopyCol(map3, tmp, half1_height, width, 1); + + map1++; + map2++; + map3++; + } + + free(tmp); +} + +static void iDoFFT(void *map, int width, int height, int inverse, int center, int normalize) +{ + if (inverse && center) + iCenterFFT((imcfloat*)map, width, height, inverse); + +#ifdef USE_FFTW3 + fftwf_plan plan = fftwf_plan_dft_2d(height, width, + (fftwf_complex*)map, (fftwf_complex*)map, // in-place transform + inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE); + fftwf_execute(plan); + fftwf_destroy_plan(plan); +#else + fftwnd_plan plan = fftw2d_create_plan(height, width, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE|FFTW_IN_PLACE); + fftwnd(plan, 1, (FFTW_COMPLEX*)map, 1, 0, 0, 0, 0); + fftwnd_destroy_plan(plan); +#endif + + if (!inverse && center) + iCenterFFT((imcfloat*)map, width, height, inverse); + + if (normalize) + { + float NM = (float)(width * height); + int count = (int)(2*NM); + + if (normalize == 1) + NM = (float)sqrt(NM); + + float *fmap = (float*)map; + for (int i = 0; i < count; i++) + *fmap++ /= NM; + } +} + +void imProcessSwapQuadrants(imImage* image, int inverse) +{ + for (int i = 0; i < image->depth; i++) + iCenterFFT((imcfloat*)image->data[i], image->width, image->height, inverse); +} + +void imProcessFFTraw(imImage* image, int inverse, int center, int normalize) +{ + for (int i = 0; i < image->depth; i++) + iDoFFT(image->data[i], image->width, image->height, inverse, center, normalize); +} + +void imProcessFFT(const imImage* src_image, imImage* dst_image) +{ + if (src_image->data_type != IM_CFLOAT) + imConvertDataType(src_image, dst_image, 0, 0, 0, 0); + else + imImageCopy(src_image, dst_image); + + imProcessFFTraw(dst_image, 0, 1, 0); // forward, centered, unnormalized +} + +void imProcessIFFT(const imImage* src_image, imImage* dst_image) +{ + imImageCopy(src_image, dst_image); + + imProcessFFTraw(dst_image, 1, 1, 2); // inverse, uncentered, double normalized +} + +void imProcessCrossCorrelation(const imImage* src_image1, const imImage* src_image2, imImage* dst_image) +{ + imImage *tmp_image = imImageCreate(src_image2->width, src_image2->height, src_image2->color_space, IM_CFLOAT); + if (!tmp_image) + return; + + if (src_image2->data_type != IM_CFLOAT) + imConvertDataType(src_image2, tmp_image, 0, 0, 0, 0); + else + imImageCopy(src_image2, tmp_image); + + if (src_image1->data_type != IM_CFLOAT) + imConvertDataType(src_image1, dst_image, 0, 0, 0, 0); + else + imImageCopy(src_image1, dst_image); + + imProcessFFTraw(tmp_image, 0, 1, 1); // forward, centered, normalized + imProcessFFTraw(dst_image, 0, 1, 1); + + imProcessMultiplyConj(dst_image, tmp_image, dst_image); + + imProcessFFTraw(dst_image, 1, 1, 1); // inverse, uncentered, normalized + imProcessSwapQuadrants(dst_image, 0); // from origin to center + + imImageDestroy(tmp_image); +} + +void imProcessAutoCorrelation(const imImage* src_image, imImage* dst_image) +{ + if (src_image->data_type != IM_CFLOAT) + imConvertDataType(src_image, dst_image, 0, 0, 0, 0); + else + imImageCopy(src_image, dst_image); + + imProcessFFTraw(dst_image, 0, 0, 1); // forward, at origin, normalized + + imProcessMultiplyConj(dst_image, dst_image, dst_image); + + imProcessFFTraw(dst_image, 1, 0, 1); // inverse, at origin, normalized + imProcessSwapQuadrants(dst_image, 0); // from origin to center +} diff --git a/im/src/process/im_geometric.cpp b/im/src/process/im_geometric.cpp new file mode 100755 index 0000000..a0b5129 --- /dev/null +++ b/im/src/process/im_geometric.cpp @@ -0,0 +1,724 @@ +/** \file + * \brief Geometric Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_geometric.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include +#include + +#include "im_process_loc.h" +#include "im_math_op.h" + +#include +#include + +static inline void imRect2Polar(float x, float y, float *radius, float *theta) +{ + *radius = sqrtf(x*x + y*y); + *theta = atan2f(y, x); +} + +static inline void imPolar2Rect(float radius, float theta, float *x, float *y) +{ + *x = radius * cosf(theta); + *y = radius * sinf(theta); +} + +static inline void swirl_invtransf(int x, int y, float *xl, float *yl, float k, float xc, float yc) +{ + float radius, theta; + x -= (int)xc; + y -= (int)yc; + + imRect2Polar((float)x, (float)y, &radius, &theta); + + theta += k * radius; + + imPolar2Rect(radius, theta, xl, yl); + + *xl += xc; + *yl += yc; +} + +template +static int Swirl(int width, int height, DT *src_map, DT *dst_map, + float k, int counter, DTU Dummy, int order) +{ + float xl, yl; + float xc = float(width/2.); + float yc = float(height/2.); + + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + swirl_invtransf(x, y, &xl, &yl, k, xc, yc); + + // if inside the original image broad area + if (xl > 0.0 && yl > 0.0 && xl < width && yl < height) + { + if (order == 1) + *dst_map = imBilinearInterpolation(width, height, src_map, xl, yl); + else if (order == 3) + *dst_map = imBicubicInterpolation(width, height, src_map, xl, yl, Dummy); + else + *dst_map = imZeroOrderInterpolation(width, height, src_map, xl, yl); + } + + dst_map++; + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +static inline void radial_invtransf(int x, int y, float *xl, float *yl, float k1, float xc, float yc) +{ + float aux; + x -= (int)xc; + y -= (int)yc; + aux = 1.0f + k1*(x*x + y*y); + *xl = x*aux + xc; + *yl = y*aux + yc; +} + +template +static int Radial(int width, int height, DT *src_map, DT *dst_map, + float k1, int counter, DTU Dummy, int order) +{ + float xl, yl; + float xc = float(width/2.); + float yc = float(height/2.); + int diag = (int)sqrt(float(width*width + height*height)); + + k1 /= (diag * diag); + + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + radial_invtransf(x, y, &xl, &yl, k1, xc, yc); + + // if inside the original image broad area + if (xl > 0.0 && yl > 0.0 && xl < width && yl < height) + { + if (order == 1) + *dst_map = imBilinearInterpolation(width, height, src_map, xl, yl); + else if (order == 3) + *dst_map = imBicubicInterpolation(width, height, src_map, xl, yl, Dummy); + else + *dst_map = imZeroOrderInterpolation(width, height, src_map, xl, yl); + } + + dst_map++; + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +//******************************************************************************************* +//rotate_invtransf +// shift the center to the origin of the destiny image +// rotates centrered in the origin +// shift the origin back to the center of the original image +//******************************************************************************************* + +inline void rotate_invtransf(int x, int y, float *xl, float *yl, double cos0, double sin0, float dcx, float dcy, float scx, float scy) +{ + double xr = x+0.5 - dcx; + double yr = y+0.5 - dcy; + *xl = float(xr * cos0 - yr * sin0 + scx); + *yl = float(xr * sin0 + yr * cos0 + scy); +} + +template +static int RotateCenter(int src_width, int src_height, DT *src_map, + int dst_width, int dst_height, DT *dst_map, + double cos0, double sin0, int counter, DTU Dummy, int order) +{ + float xl, yl; + float dcx = float(dst_width/2.); + float dcy = float(dst_height/2.); + float scx = float(src_width/2.); + float scy = float(src_height/2.); + + for (int y = 0; y < dst_height; y++) + { + for (int x = 0; x < dst_width; x++) + { + rotate_invtransf(x, y, &xl, &yl, cos0, sin0, dcx, dcy, scx, scy); + + // if inside the original image broad area + if (xl > 0.0 && yl > 0.0 && xl < src_width && yl < src_height) + { + if (order == 1) + *dst_map = imBilinearInterpolation(src_width, src_height, src_map, xl, yl); + else if (order == 3) + *dst_map = imBicubicInterpolation(src_width, src_height, src_map, xl, yl, Dummy); + else + *dst_map = imZeroOrderInterpolation(src_width, src_height, src_map, xl, yl); + } + + dst_map++; + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +template +static int Rotate(int src_width, int src_height, DT *src_map, + int dst_width, int dst_height, DT *dst_map, + double cos0, double sin0, int ref_x, int ref_y, int to_origin, + int counter, DTU Dummy, int order) +{ + float xl, yl; + float sx = float(ref_x); + float sy = float(ref_y); + float dx = sx; + float dy = sy; + if (to_origin) + { + dx = 0; + dy = 0; + } + + for (int y = 0; y < dst_height; y++) + { + for (int x = 0; x < dst_width; x++) + { + rotate_invtransf(x, y, &xl, &yl, cos0, sin0, dx, dy, sx, sy); + + // if inside the original image broad area + if (xl > 0.0 && yl > 0.0 && xl < src_width && yl < src_height) + { + if (order == 1) + *dst_map = imBilinearInterpolation(src_width, src_height, src_map, xl, yl); + else if (order == 3) + *dst_map = imBicubicInterpolation(src_width, src_height, src_map, xl, yl, Dummy); + else + *dst_map = imZeroOrderInterpolation(src_width, src_height, src_map, xl, yl); + } + + dst_map++; + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +template +static void Rotate90(int src_width, + int src_height, + DT *src_map, + int dst_width, + int dst_height, + DT *dst_map, + int dir) +{ + int xd,yd,x,y; + + if (dir == 1) + xd = 0; + else + xd = dst_width - 1; + + for(y = 0 ; y < src_height ; y++) + { + if (dir == 1) + yd = dst_height - 1; + else + yd = 0; + + for(x = 0 ; x < src_width ; x++) + { + dst_map[yd * dst_width + xd] = src_map[y * src_width + x]; + + if (dir == 1) + yd--; + else + yd++; + } + + if (dir == 1) + xd++; + else + xd--; + } +} + +template +static void Rotate180(int src_width, + int src_height, + DT *src_map, + int dst_width, + int dst_height, + DT *dst_map) +{ + int xd,yd,x,y; + + yd = dst_height - 1; + + for(y = 0 ; y < src_height ; y++) + { + xd = dst_width - 1; + + for(x = 0 ; x < src_width ; x++) + { + dst_map[yd * dst_width + xd] = src_map[y * src_width + x]; + xd--; + } + + yd--; + } +} + +template +static void Mirror(int src_width, + int src_height, + DT *src_map, + int dst_width, + int dst_height, + DT *dst_map) +{ + int xd,x,y; + (void)dst_height; + + if (src_map == dst_map) // check of in-place operation + { + int half_width = src_width/2; + for(y = 0 ; y < src_height; y++) + { + xd = dst_width - 1; + + for(x = 0 ; x < half_width; x++) + { + DT temp_value = src_map[y * dst_width + xd]; + src_map[y * dst_width + xd] = src_map[y * src_width + x]; + src_map[y * src_width + x] = temp_value; + xd--; + } + } + } + else + { + for(y = 0 ; y < src_height; y++) + { + xd = dst_width - 1; + + for(x = 0 ; x < src_width; x++) + { + dst_map[y * dst_width + xd] = src_map[y * src_width + x]; + xd--; + } + } + } +} + +template +static void Flip(int src_width, + int src_height, + DT *src_map, + int dst_width, + int dst_height, + DT *dst_map) +{ + int yd,y; + + yd = dst_height - 1; + + if (src_map == dst_map) // check of in-place operation + { + DT* temp_line = (DT*)malloc(src_width*sizeof(DT)); + int half_height = src_height/2; + + for(y = 0 ; y < half_height; y++) + { + memcpy(temp_line, dst_map+yd*dst_width, src_width * sizeof(DT)); + memcpy(dst_map+yd*dst_width, src_map+y*src_width, src_width * sizeof(DT)); + memcpy(src_map+y*src_width, temp_line,src_width * sizeof(DT)); + yd--; + } + + free(temp_line); + } + else + { + for(y = 0 ; y < src_height; y++) + { + memcpy(dst_map+yd*dst_width,src_map+y*src_width,src_width * sizeof(DT)); + yd--; + } + } +} + +template +static void InterlaceSplit(int src_width, + int src_height, + DT *src_map, + int dst_width, + DT *dst_map1, + DT *dst_map2) +{ + int yd = 0, y; + + for(y = 0; y < src_height; y++) + { + if (y%2) + { + memcpy(dst_map2+yd*dst_width, src_map+y*src_width, src_width * sizeof(DT)); + yd++; // increment only when odd + } + else + memcpy(dst_map1+yd*dst_width, src_map+y*src_width, src_width * sizeof(DT)); + } +} + +void imProcessRotate90(const imImage* src_image, imImage* dst_image, int dir) +{ + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + Rotate90(src_image->width, src_image->height, (imbyte*)src_image->data[i], dst_image->width, dst_image->height, (imbyte*)dst_image->data[i], dir); + break; + case IM_USHORT: + Rotate90(src_image->width, src_image->height, (imushort*)src_image->data[i], dst_image->width, dst_image->height, (imushort*)dst_image->data[i], dir); + break; + case IM_INT: + Rotate90(src_image->width, src_image->height, (int*)src_image->data[i], dst_image->width, dst_image->height, (int*)dst_image->data[i], dir); + break; + case IM_FLOAT: + Rotate90(src_image->width, src_image->height, (float*)src_image->data[i], dst_image->width, dst_image->height, (float*)dst_image->data[i], dir); + break; + case IM_CFLOAT: + Rotate90(src_image->width, src_image->height, (imcfloat*)src_image->data[i], dst_image->width, dst_image->height, (imcfloat*)dst_image->data[i], dir); + break; + } + } +} + +void imProcessRotate180(const imImage* src_image, imImage* dst_image) +{ + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + Rotate180(src_image->width, src_image->height, (imbyte*)src_image->data[i], dst_image->width, dst_image->height, (imbyte*)dst_image->data[i]); + break; + case IM_USHORT: + Rotate180(src_image->width, src_image->height, (imushort*)src_image->data[i], dst_image->width, dst_image->height, (imushort*)dst_image->data[i]); + break; + case IM_INT: + Rotate180(src_image->width, src_image->height, (int*)src_image->data[i], dst_image->width, dst_image->height, (int*)dst_image->data[i]); + break; + case IM_FLOAT: + Rotate180(src_image->width, src_image->height, (float*)src_image->data[i], dst_image->width, dst_image->height, (float*)dst_image->data[i]); + break; + case IM_CFLOAT: + Rotate180(src_image->width, src_image->height, (imcfloat*)src_image->data[i], dst_image->width, dst_image->height, (imcfloat*)dst_image->data[i]); + break; + } + } +} + +int imProcessRadial(const imImage* src_image, imImage* dst_image, float k1, int order) +{ + int ret = 0; + + int counter = imCounterBegin("Radial Distort"); + imCounterTotal(counter, dst_image->depth*dst_image->height, "Processing..."); + + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = Radial(src_image->width, src_image->height, (imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], k1, counter, float(0), order); + break; + case IM_USHORT: + ret = Radial(src_image->width, src_image->height, (imushort*)src_image->data[i], (imushort*)dst_image->data[i], k1, counter, float(0), order); + break; + case IM_INT: + ret = Radial(src_image->width, src_image->height, (int*)src_image->data[i], (int*)dst_image->data[i], k1, counter, float(0), order); + break; + case IM_FLOAT: + ret = Radial(src_image->width, src_image->height, (float*)src_image->data[i], (float*)dst_image->data[i], k1, counter, float(0), order); + break; + case IM_CFLOAT: + ret = Radial(src_image->width, src_image->height, (imcfloat*)src_image->data[i], (imcfloat*)dst_image->data[i], k1, counter, imcfloat(0,0), order); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +int imProcessSwirl(const imImage* src_image, imImage* dst_image, float k, int order) +{ + int ret = 0; + + int counter = imCounterBegin("Swirl Distort"); + imCounterTotal(counter, dst_image->depth*dst_image->height, "Processing..."); + + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = Swirl(src_image->width, src_image->height, (imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], k, counter, float(0), order); + break; + case IM_USHORT: + ret = Swirl(src_image->width, src_image->height, (imushort*)src_image->data[i], (imushort*)dst_image->data[i], k, counter, float(0), order); + break; + case IM_INT: + ret = Swirl(src_image->width, src_image->height, (int*)src_image->data[i], (int*)dst_image->data[i], k, counter, float(0), order); + break; + case IM_FLOAT: + ret = Swirl(src_image->width, src_image->height, (float*)src_image->data[i], (float*)dst_image->data[i], k, counter, float(0), order); + break; + case IM_CFLOAT: + ret = Swirl(src_image->width, src_image->height, (imcfloat*)src_image->data[i], (imcfloat*)dst_image->data[i], k, counter, imcfloat(0,0), order); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +//******************************************************************************************* +//rotate_transf +// In this case shift to the origin, rotate, but do NOT shift back +//******************************************************************************************* + +static void rotate_transf(float cx, float cy, int x, int y, float *xl, float *yl, double cos0, double sin0) +{ + double xr = x+0.5 - cx; + double yr = y+0.5 - cy; + *xl = float( xr*cos0 + yr*sin0); + *yl = float(-xr*sin0 + yr*cos0); +} + +void imProcessCalcRotateSize(int width, int height, int *new_width, int *new_height, double cos0, double sin0) +{ + float xl, yl, xmin, xmax, ymin, ymax; + float wd2 = float(width)/2; + float hd2 = float(height)/2; + + rotate_transf(wd2, hd2, 0, 0, &xl, &yl, cos0, sin0); + xmin = xl; ymin = yl; + xmax = xl; ymax = yl; + + rotate_transf(wd2, hd2, width-1, height-1, &xl, &yl, cos0, sin0); + xmin = min_op(xmin, xl); ymin = min_op(ymin, yl); + xmax = max_op(xmax, xl); ymax = max_op(ymax, yl); + + rotate_transf(wd2, hd2, 0, height-1, &xl, &yl, cos0, sin0); + xmin = min_op(xmin, xl); ymin = min_op(ymin, yl); + xmax = max_op(xmax, xl); ymax = max_op(ymax, yl); + + rotate_transf(wd2, hd2, width-1, 0, &xl, &yl, cos0, sin0); + xmin = min_op(xmin, xl); ymin = min_op(ymin, yl); + xmax = max_op(xmax, xl); ymax = max_op(ymax, yl); + + *new_width = (int)(xmax - xmin + 2.0); + *new_height = (int)(ymax - ymin + 2.0); +} + +int imProcessRotate(const imImage* src_image, imImage* dst_image, double cos0, double sin0, int order) +{ + int ret = 0; + + int counter = imCounterBegin("Rotate"); + imCounterTotal(counter, dst_image->depth*dst_image->height, "Processing..."); + + if (src_image->color_space == IM_MAP) + { + ret = RotateCenter(src_image->width, src_image->height, (imbyte*)src_image->data[0], dst_image->width, dst_image->height, (imbyte*)dst_image->data[0], cos0, sin0, counter, float(0), 0); + } + else + { + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = RotateCenter(src_image->width, src_image->height, (imbyte*)src_image->data[i], dst_image->width, dst_image->height, (imbyte*)dst_image->data[i], cos0, sin0, counter, float(0), order); + break; + case IM_USHORT: + ret = RotateCenter(src_image->width, src_image->height, (imushort*)src_image->data[i], dst_image->width, dst_image->height, (imushort*)dst_image->data[i], cos0, sin0, counter, float(0), order); + break; + case IM_INT: + ret = RotateCenter(src_image->width, src_image->height, (int*)src_image->data[i], dst_image->width, dst_image->height, (int*)dst_image->data[i], cos0, sin0, counter, float(0), order); + break; + case IM_FLOAT: + ret = RotateCenter(src_image->width, src_image->height, (float*)src_image->data[i], dst_image->width, dst_image->height, (float*)dst_image->data[i], cos0, sin0, counter, float(0), order); + break; + case IM_CFLOAT: + ret = RotateCenter(src_image->width, src_image->height, (imcfloat*)src_image->data[i], dst_image->width, dst_image->height, (imcfloat*)dst_image->data[i], cos0, sin0, counter, imcfloat(0,0), order); + break; + } + + if (!ret) + break; + } + } + + imCounterEnd(counter); + + return ret; +} + +int imProcessRotateRef(const imImage* src_image, imImage* dst_image, double cos0, double sin0, int x, int y, int to_origin, int order) +{ + int ret = 0; + + int counter = imCounterBegin("RotateRef"); + imCounterTotal(counter, dst_image->depth*dst_image->height, "Processing..."); + + if (src_image->color_space == IM_MAP) + { + ret = Rotate(src_image->width, src_image->height, (imbyte*)src_image->data[0], dst_image->width, dst_image->height, (imbyte*)dst_image->data[0], cos0, sin0, x, y, to_origin, counter, float(0), 0); + } + else + { + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = Rotate(src_image->width, src_image->height, (imbyte*)src_image->data[i], dst_image->width, dst_image->height, (imbyte*)dst_image->data[i], cos0, sin0, x, y, to_origin, counter, float(0), order); + break; + case IM_USHORT: + ret = Rotate(src_image->width, src_image->height, (imushort*)src_image->data[i], dst_image->width, dst_image->height, (imushort*)dst_image->data[i], cos0, sin0, x, y, to_origin, counter, float(0), order); + break; + case IM_INT: + ret = Rotate(src_image->width, src_image->height, (int*)src_image->data[i], dst_image->width, dst_image->height, (int*)dst_image->data[i], cos0, sin0, x, y, to_origin, counter, float(0), order); + break; + case IM_FLOAT: + ret = Rotate(src_image->width, src_image->height, (float*)src_image->data[i], dst_image->width, dst_image->height, (float*)dst_image->data[i], cos0, sin0, x, y, to_origin, counter, float(0), order); + break; + case IM_CFLOAT: + ret = Rotate(src_image->width, src_image->height, (imcfloat*)src_image->data[i], dst_image->width, dst_image->height, (imcfloat*)dst_image->data[i], cos0, sin0, x, y, to_origin, counter, imcfloat(0,0), order); + break; + } + + if (!ret) + break; + } + } + + imCounterEnd(counter); + + return ret; +} + +void imProcessMirror(const imImage* src_image, imImage* dst_image) +{ + int i; + + for (i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + Mirror(src_image->width, src_image->height, (imbyte*)src_image->data[i], dst_image->width, dst_image->height, (imbyte*)dst_image->data[i]); + break; + case IM_USHORT: + Mirror(src_image->width, src_image->height, (imushort*)src_image->data[i], dst_image->width, dst_image->height, (imushort*)dst_image->data[i]); + break; + case IM_INT: + Mirror(src_image->width, src_image->height, (int*)src_image->data[i], dst_image->width, dst_image->height, (int*)dst_image->data[i]); + break; + case IM_FLOAT: + Mirror(src_image->width, src_image->height, (float*)src_image->data[i], dst_image->width, dst_image->height, (float*)dst_image->data[i]); + break; + case IM_CFLOAT: + Mirror(src_image->width, src_image->height, (imcfloat*)src_image->data[i], dst_image->width, dst_image->height, (imcfloat*)dst_image->data[i]); + break; + } + } +} + +void imProcessFlip(const imImage* src_image, imImage* dst_image) +{ + int i; + + for (i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + Flip(src_image->width, src_image->height, (imbyte*)src_image->data[i], dst_image->width, dst_image->height, (imbyte*)dst_image->data[i]); + break; + case IM_USHORT: + Flip(src_image->width, src_image->height, (imushort*)src_image->data[i], dst_image->width, dst_image->height, (imushort*)dst_image->data[i]); + break; + case IM_INT: + Flip(src_image->width, src_image->height, (int*)src_image->data[i], dst_image->width, dst_image->height, (int*)dst_image->data[i]); + break; + case IM_FLOAT: + Flip(src_image->width, src_image->height, (float*)src_image->data[i], dst_image->width, dst_image->height, (float*)dst_image->data[i]); + break; + case IM_CFLOAT: + Flip(src_image->width, src_image->height, (imcfloat*)src_image->data[i], dst_image->width, dst_image->height, (imcfloat*)dst_image->data[i]); + break; + } + } +} + +void imProcessInterlaceSplit(const imImage* src_image, imImage* dst_image1, imImage* dst_image2) +{ + int i; + + for (i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + InterlaceSplit(src_image->width, src_image->height, (imbyte*)src_image->data[i], dst_image1->width, (imbyte*)dst_image1->data[i], (imbyte*)dst_image2->data[i]); + break; + case IM_USHORT: + InterlaceSplit(src_image->width, src_image->height, (imushort*)src_image->data[i], dst_image1->width, (imushort*)dst_image1->data[i], (imushort*)dst_image2->data[i]); + break; + case IM_INT: + InterlaceSplit(src_image->width, src_image->height, (int*)src_image->data[i], dst_image1->width, (int*)dst_image1->data[i], (int*)dst_image2->data[i]); + break; + case IM_FLOAT: + InterlaceSplit(src_image->width, src_image->height, (float*)src_image->data[i], dst_image1->width, (float*)dst_image1->data[i], (float*)dst_image2->data[i]); + break; + case IM_CFLOAT: + InterlaceSplit(src_image->width, src_image->height, (imcfloat*)src_image->data[i], dst_image1->width, (imcfloat*)dst_image1->data[i], (imcfloat*)dst_image2->data[i]); + break; + } + } +} diff --git a/im/src/process/im_histogram.cpp b/im/src/process/im_histogram.cpp new file mode 100755 index 0000000..e6796fe --- /dev/null +++ b/im/src/process/im_histogram.cpp @@ -0,0 +1,105 @@ +/** \file + * \brief Histogram Based Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_histogram.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include +#include + +#include "im_process_pon.h" +#include "im_process_ana.h" + +#include +#include + +static void iExpandHistogram(const imImage* src_image, imImage* dst_image, int low_level, int high_level) +{ + int i, value; + + imbyte re_map[256]; + memset(re_map, 0, 256); + + int range = high_level-low_level+1; + float factor = 256.0f / (float)range; + + for (i = 0; i < 256; i++) + { + if (i < low_level) + re_map[i] = 0; + else if (i > high_level) + re_map[i] = 255; + else + { + value = imResample(i - low_level, factor); + re_map[i] = (imbyte)IM_BYTECROP(value); + } + } + + imbyte* dst_map = (imbyte*)dst_image->data[0]; + imbyte* src_map = (imbyte*)src_image->data[0]; + int total_count = src_image->count*src_image->depth; + for (i = 0; i < total_count; i++) + dst_map[i] = re_map[src_map[i]]; +} + +void imProcessExpandHistogram(const imImage* src_image, imImage* dst_image, float percent) +{ + unsigned long histo[256]; + imCalcGrayHistogram(src_image, histo, 0); + + unsigned long acum, cut = (unsigned long)((src_image->count * percent) / 100.0f); + int low_level, high_level; + + acum = 0; + for (low_level = 0; low_level < 256; low_level++) + { + acum += histo[low_level]; + if (acum > cut) + break; + } + + acum = 0; + for (high_level = 255; high_level > 0; high_level--) + { + acum += histo[high_level]; + if (acum > cut) + break; + } + + if (low_level >= high_level) + { + low_level = 0; + high_level = 255; + } + + iExpandHistogram(src_image, dst_image, low_level, high_level); +} + +void imProcessEqualizeHistogram(const imImage* src_image, imImage* dst_image) +{ + int i, value; + + imbyte re_map[256]; + memset(re_map, 0, 256); + + unsigned long histo[256]; + imCalcGrayHistogram(src_image, histo, 1); + + float factor = 256.0f / (float)src_image->count; + + for (i = 0; i < 256; i++) + { + value = imResample(histo[i], factor); + re_map[i] = (imbyte)IM_BYTECROP(value); + } + + imbyte* dst_map = (imbyte*)dst_image->data[0]; + imbyte* src_map = (imbyte*)src_image->data[0]; + int total_count = src_image->count*src_image->depth; + for (i = 0; i < total_count; i++) + dst_map[i] = re_map[src_map[i]]; +} diff --git a/im/src/process/im_houghline.cpp b/im/src/process/im_houghline.cpp new file mode 100755 index 0000000..6ead982 --- /dev/null +++ b/im/src/process/im_houghline.cpp @@ -0,0 +1,435 @@ +/** \file + * \brief Hough Transform + * + * See Copyright Notice in im_lib.h + * $Id: im_houghline.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + +#include +#include +#include +#include +#include + +#include "im_process_glo.h" + +#include +#include + + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +static double *costab=NULL, *sintab=NULL; + +static int hgAbs(int x) +{ + return x < 0? -x: x; +} + +typedef struct _point +{ + int rho, theta, count; +} point; + +typedef struct _listnode +{ + struct _listnode *next; + point pt; +} listnode; + +static listnode* listnew(point *pt) +{ + listnode* node = (listnode*)malloc(sizeof(listnode)); + node->next = NULL; + node->pt = *pt; + return node; +} + +static listnode* listadd(listnode* node, point *pt) +{ + node->next = listnew(pt); + return node->next; +} + +/* minimum angle to match similar angles */ +#define THETA_DELTA1 0.05 /* radians */ +#define THETA_DELTA2 3 /* degrees */ + +static int ptNear(point* pt1, point* pt2, int rho_delta) +{ + int theta_diff = hgAbs(pt1->theta - pt2->theta); + if ((hgAbs(pt1->rho - pt2->rho) < rho_delta && theta_diff < THETA_DELTA2) || + (hgAbs(pt1->rho + pt2->rho) < rho_delta && 180-theta_diff < THETA_DELTA2)) + { + if (pt2->count > pt1->count) + return 2; /* replace the line */ + else + return 1; + } + else + return 0; +} + +static listnode* listadd_filtered(listnode* list, listnode* cur_node, point *pt, int rho_delta) +{ + int ret; + listnode* lt = list; + while (lt) + { + ret = ptNear(<->pt, pt, rho_delta); + if (ret) + { + if (ret == 2) + lt->pt = *pt; /* replace the line */ + return cur_node; + } + lt = lt->next; + } + + cur_node->next = listnew(pt); + return cur_node->next; +} + +/*C* Initial version from XITE + + houghLine + $Id: im_houghline.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + Copyright 1990, Blab, UiO + Image processing lab, Department of Informatics + University of Oslo + E-mail: blab@ifi.uio.no +________________________________________________________________ + + houghLine - Hough transform for line detection + + Description: + Performs a Hough transform to detect lines. Every band in the + input image 'inimage' is transformed to a two dimensional + Hough space, a (theta, rho) space. + + After creating the transform, the Hough space may be searched + for local maxima. Within each band, only the largest local + maximum (maxima) within a 'ws'x'ws' area is registered. + Besides, only maxima with number of updates above a limit + given by the ul option are used. + + updateLimit determines the minimum number of updates for a maximum + to be used. The minimum number is determined from 'updateLimit' + and the size of the hough space image: + | updateLimit * MAX(horizontal size, vertical size) + Default: 0.1. + + All pixels above zero in the 'input' band are + transformed to (theta,rho) space in the 'output' + band. The 'input' band may have any size, while + the 'output' band currently must be at least + | xsize: 180 + | ysize: 2 * sqrt(inputXsize*inputXsize + + | inputYsize*inputYsize) + 1 + + Notice that band x coordinates 1..180 correspond + to angles theta = 0 .. 179, and y coordinates + 1..YSIZE correspond to rho = -(ysize/2) .. ysize/2. + + Restrictions: + 'input' must have pixel type imbyte. + 'output' must have pixel type int. + + Author: Tor Lønnestad, BLAB, Ifi, UiO +*/ + + +static int houghLine(const imImage* input, imImage* output, int counter) +{ + int ixsize, iysize, ixhalf, iyhalf, thetamax, x, y, rho, theta, rhomax; + imbyte *input_map = (imbyte*)input->data[0]; + int *output_map = (int*)output->data[0]; + + ixsize = input->width; + iysize = input->height; + ixhalf = ixsize/2; + iyhalf = iysize/2; + + thetamax = output->width; /* theta max = 180 */ + rhomax = output->height/2; /* rho shift to 0, -rmax <= r <= +rmax */ + + costab = (double*)malloc(thetamax*sizeof(double)); + sintab = (double*)malloc(thetamax*sizeof(double)); + + for (theta=0; theta < thetamax; theta++) + { + double th = (M_PI*theta)/thetamax; + costab[theta] = cos(th); + sintab[theta] = sin(th); + } + + for (y=0; y < iysize; y++) + { + for (x=0; x < ixsize; x++) + { + if (input_map[y*ixsize + x]) + { + for (theta=0; theta < thetamax; theta++) + { + rho = imRound((x-ixhalf)*costab[theta] + (y-iyhalf)*sintab[theta]); + if (rho > rhomax) continue; + if (rho < -rhomax) continue; + output_map[(rho+rhomax)*thetamax + theta]++; + } + } + } + + if (!imCounterInc(counter)) + { + free(costab); costab = NULL; + free(sintab); sintab = NULL; + return 0; + } + } + + free(costab); costab = NULL; + free(sintab); sintab = NULL; + + return 1; +} + +static listnode* findMaxima(const imImage* hough_points, int *line_count, const imImage* hough) +{ + int x, y, xsize, ysize, rhomax, offset, rho_delta = 0; + listnode* maxima = NULL, *cur_node = NULL; + point pt; + imbyte *map = (imbyte*)hough_points->data[0]; + int *hough_map = NULL; + + xsize = hough_points->width; /* X = theta */ + ysize = hough_points->height; /* Y = rho */ + rhomax = ysize/2; + + if (hough) + { + hough_map = (int*)hough->data[0]; + rho_delta = (int)(rhomax*tan(THETA_DELTA1)); + } + + for (y=0; y < ysize; y++) + { + for (x=0; x < xsize; x++) + { + offset = y*xsize + x; + + if (map[offset]) + { + pt.theta = x; + pt.rho = y-rhomax; + + if (!maxima) + { + cur_node = maxima = listnew(&pt); + (*line_count)++; + } + else + { + if (hough_map) + { + listnode* old_node = cur_node; + pt.count = hough_map[offset]; + cur_node = listadd_filtered(maxima, cur_node, &pt, rho_delta); + if (cur_node != old_node) + (*line_count)++; + } + else + { + cur_node = listadd(cur_node, &pt); + (*line_count)++; + } + } + } + } + } + + return maxima; +} + +#define SWAPINT(a, b) {int t = a; a = b; b = t; } + +static void drawLine(imImage* image, int theta, int rho) +{ + int xsize, ysize, xstart, xstop, ystart, ystop, xhalf, yhalf; + float a, b; + imbyte *map = (imbyte*)image->data[0]; + + xsize = image->width; + ysize = image->height; + xhalf = xsize/2; + yhalf = ysize/2; + + if (theta == 0) /* vertical line */ + { + int y; + if (rho+xhalf < 0 || rho+xhalf > xsize-1) return; + for (y=0; y < ysize; y++) + map[y*xsize + rho+xhalf]=254; + + return; + } + + if (theta == 90) /* horizontal line */ + { + int x; + if (rho+yhalf < 0 || rho+yhalf > ysize-1) return; + for (x=0; x < xsize; x++) + map[(rho+yhalf)*xsize + x]=254; + + return; + } + + a = (float)(-costab[theta]/sintab[theta]); + b = (float)((rho + xhalf*costab[theta] + yhalf*sintab[theta])/sintab[theta]); + + { + int x[2]; + int y[2]; + int c = 0; + int y1 = imRound(b); /* x = 0 */ + int y2 = imRound(a*(xsize-1)+b); /* x = xsize-1 */ + + int x1 = imRound(-b/a); /* y = 0 */ + int x2 = imRound((ysize-1-b)/a); /* y = ysize-1 */ + + if (y1 >= 0 && y1 < ysize) + { + y[c] = y1; + x[c] = 0; + c++; + } + + if (y2 >= 0 && y2 < ysize) + { + y[c] = y2; + x[c] = xsize-1; + c++; + } + + if (c < 2 && x1 >= 0 && x1 < xsize) + { + x[c] = x1; + y[c] = 0; + c++; + } + + if (c < 2 && x2 >= 0 && x2 < xsize) + { + x[c] = x2; + y[c] = ysize-1; + c++; + } + + if (c < 2) return; + + ystart = y[0]; + xstart = x[0]; + ystop = y[1]; + xstop = x[1]; + } + + { + int x, y; + if (45 <= theta && theta <= 135) + { + if (xstart > xstop) + SWAPINT(xstart, xstop); + + for (x=xstart; x <= xstop; x++) + { + y = imRound(a*x + b); + if (y < 0) continue; + if (y > ysize-1) continue; + map[y*xsize + x]=254; + } + } + else + { + if (ystart > ystop) + SWAPINT(ystart, ystop); + + for (y=ystart; y <= ystop; y++) + { + x = imRound((y-b)/a); + if (x < 0) continue; + if (x > xsize-1) continue; + map[y*xsize + x]=254; + } + } + } +} + +int imProcessHoughLines(const imImage* image, imImage *NewImage) +{ + int counter = imCounterBegin("Hough Line Transform"); + imCounterTotal(counter, image->height, "Processing..."); + + int ret = houghLine(image, NewImage, counter); + + imCounterEnd(counter); + + return ret; +} + +static void DrawPoints(imImage *image, listnode* maxima) +{ + listnode* cur_node; + while (maxima) + { + cur_node = maxima; + drawLine(image, cur_node->pt.theta, cur_node->pt.rho); + maxima = cur_node->next; + free(cur_node); + } +} + +static void ReplaceColor(imImage* NewImage) +{ + int i; + imbyte* map = (imbyte*)NewImage->data[0]; + + NewImage->color_space = IM_MAP; + NewImage->palette[254] = imColorEncode(255, 0, 0); + + for (i = 0; i < NewImage->count; i++) + { + if (map[i] == 254) + map[i] = 255; + } +} + +int imProcessHoughLinesDraw(const imImage* original_image, const imImage *hough, const imImage *hough_points, imImage *NewImage) +{ + int theta, line_count = 0; + + if (original_image != NewImage) + imImageCopyData(original_image, NewImage); + + listnode* maxima = findMaxima(hough_points, &line_count, hough); + + ReplaceColor(NewImage); + + costab = (double*)malloc(180*sizeof(double)); + sintab = (double*)malloc(180*sizeof(double)); + + for (theta=0; theta < 180; theta++) + { + double th = (M_PI*theta)/180.; + costab[theta] = cos(th); + sintab[theta] = sin(th); + } + + DrawPoints(NewImage, maxima); + + free(costab); costab = NULL; + free(sintab); sintab = NULL; + + return line_count; +} + diff --git a/im/src/process/im_kernel.cpp b/im/src/process/im_kernel.cpp new file mode 100755 index 0000000..d5e976e --- /dev/null +++ b/im/src/process/im_kernel.cpp @@ -0,0 +1,293 @@ +/** \file + * \brief Kernel Generators + * Creates several known kernels + * + * See Copyright Notice in im_lib.h + * $Id: im_kernel.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + +#include "im.h" +#include "im_util.h" +#include "im_image.h" +#include "im_kernel.h" + +#include +#include +#include +#include + + +static imImage* iKernelCreate(int w, int h, int* data, char* desc) +{ + imImage* kernel = imImageCreate(w, h, IM_GRAY, IM_INT); + int* kernel_data = (int*)kernel->data[0]; + memcpy(kernel_data, data, kernel->size); + imImageSetAttribute(kernel, "Description", IM_BYTE, -1, (void*)desc); + return kernel; +} + +imImage* imKernelSobel(void) +{ + int kernel_data[3*3] = { + -1, -2, -1, + 0, 0, 0, + 1, 2, 1 + }; + + return iKernelCreate(3, 3, kernel_data, "Sobel"); +} + +imImage* imKernelPrewitt(void) +{ + int kernel_data[3*3] = { + -1, -1, -1, + 0, 0, 0, + 1, 1, 1 + }; + + return iKernelCreate(3, 3, kernel_data, "Prewitt"); +} + +imImage* imKernelKirsh(void) +{ + int kernel_data[3*3] = { + -3, -3, -3, + -3, 0, -3, + 5, 5, 5 + }; + + return iKernelCreate(3, 3, kernel_data, "Kirsh"); +} + +imImage* imKernelLaplacian4(void) +{ + int kernel_data[3*3] = { + 0, -1, 0, + -1, 4, -1, + 0, -1, 0 + }; + + return iKernelCreate(3, 3, kernel_data, "Laplacian4"); +} + +imImage* imKernelLaplacian8(void) +{ + int kernel_data[3*3] = { + -1, -1, -1, + -1, 8, -1, + -1, -1, -1 + }; + + return iKernelCreate(3, 3, kernel_data, "Laplacian8"); +} + +imImage* imKernelLaplacian5x5(void) +{ + int kernel_data[5*5] = { + 0, -1, -1, -1, 0, + -1, 0, 1, 0, -1, + -1, 1, 8, 1, -1, + -1, 0, 1, 0, -1, + 0, -1, -1, -1, 0 + }; + + return iKernelCreate(5, 5, kernel_data, "Laplacian5x5"); +} + +imImage* imKernelLaplacian7x7(void) +{ + int kernel_data[7*7] = { + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1 + }; + + return iKernelCreate(7, 7, kernel_data, "Laplacian7x7"); +} + +imImage* imKernelGradian3x3(void) +{ + int kernel_data[3*3] = { + 0, -1, 0, + 0, 1, 0, + 0, 0, 0 + }; + + return iKernelCreate(3, 3, kernel_data, "Gradian3x3"); +} + +imImage* imKernelGradian7x7(void) +{ + int kernel_data[7*7] = { + 0, -1, -1, 0, 1, 1, 0, + -1, -2, -2, 0, 2, 2, 1, + -1, -2, -3, 0, 3, 2, 1, + -1, -2, -3, 0, 3, 2, 1, + -1, -2, -3, 0, 3, 2, 1, + -1, -2, -2, 0, 2, 2, 1, + 0, -1, -1, 0, 1, 1, 0 + }; + + return iKernelCreate(7, 7, kernel_data, "Gradian7x7"); +} + +imImage* imKernelSculpt(void) +{ + int kernel_data[3*3] = { + 0, 0, 1, + 0, 0, 0, + -1, 0, 0 + }; + + return iKernelCreate(3, 3, kernel_data, "Sculpt"); +} + +imImage* imKernelMean3x3(void) +{ + int kernel_data[3*3] = { + 1, 1, 1, + 1, 1, 1, + 1, 1, 1 + }; + + return iKernelCreate(3, 3, kernel_data, "Mean3x3"); +} + +imImage* imKernelMean5x5(void) +{ + int kernel_data[5*5] = { + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + }; + + return iKernelCreate(5, 5, kernel_data, "Mean5x5"); +} + +imImage* imKernelCircularMean5x5(void) +{ + int kernel_data[5*5] = { + 0, 1, 1, 1, 0, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 0, 1, 1, 1, 0 + }; + + return iKernelCreate(5, 5, kernel_data, "CircularMean5x5"); +} + +imImage* imKernelMean7x7(void) +{ + int kernel_data[7*7] = { + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1 + }; + + return iKernelCreate(7, 7, kernel_data, "Mean7x7"); +} + +imImage* imKernelCircularMean7x7(void) +{ + int kernel_data[7*7] = { + 0, 0, 1, 1, 1, 0, 0, + 0, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 0, + 0, 0, 1, 1, 1, 0, 0 + }; + + return iKernelCreate(7, 7, kernel_data, "CircularMean7x7"); +} + +imImage* imKernelGaussian3x3(void) +{ + int kernel_data[3*3] = { + 1, 2, 1, + 2, 4, 2, + 1, 2, 1 + }; + + return iKernelCreate(3, 3, kernel_data, "Gaussian3x3"); +} + +imImage* imKernelGaussian5x5(void) +{ + int kernel_data[5*5] = { + 1, 4, 6, 4, 1, + 4, 16, 24, 16, 4, + 6, 24, 36, 24, 6, + 4, 16, 24, 16, 4, + 1, 4, 6, 4, 1 + }; + + return iKernelCreate(5, 5, kernel_data, "Gaussian5x5"); +} + +imImage* imKernelBarlett5x5(void) +{ + int kernel_data[5*5] = { + 1, 2, 3, 2, 1, + 2, 4, 6, 4, 2, + 3, 6, 9, 6, 3, + 2, 4, 6, 4, 2, + 1, 2, 3, 2, 1 + }; + + return iKernelCreate(5, 5, kernel_data, "Barlett5x5"); +} + +imImage* imKernelTopHat5x5(void) +{ + int kernel_data[5*5] = { + 0, -1, -1, -1, 0, + -1, -1, 3, -1, -1, + -1, 3, 4, 3, -1, + -1, -1, 3, -1, -1, + 0, -1, -1, -1, 0 + }; + + return iKernelCreate(5, 5, kernel_data, "TopHat5x5"); +} + +imImage* imKernelTopHat7x7(void) +{ + int kernel_data[7*7] = { + 0, 0, -1, -1, -1, 0, 0, + 0, -1, -1, -1, -1, -1, 0, + -1, -1, 3, 3, 3, -1, -1, + -1, -1, 3, 4, 3, -1, -1, + -1, -1, 3, 3, 3, -1, -1, + 0, -1, -1, -1, -1, -1, 0, + 0, 0, -1, -1, -1, 0, 0 + }; + + return iKernelCreate(7, 7, kernel_data, "TopHat7x7"); +} + +imImage* imKernelEnhance(void) +{ + int kernel_data[5*5] = { + 0, -1, -2, -1, 0, + -1, -4, 0, -4, -1, + -2, 0, 40, 0, -2, + -1, -4, 0, -4, -1, + 0, -1, -2, -1, 0 + }; + + return iKernelCreate(5, 5, kernel_data, "Enhance"); +} + diff --git a/im/src/process/im_logic.cpp b/im/src/process/im_logic.cpp new file mode 100755 index 0000000..82e607d --- /dev/null +++ b/im/src/process/im_logic.cpp @@ -0,0 +1,136 @@ +/** \file + * \brief Logical Arithmetic Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_logic.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include + +#include "im_process_pon.h" + +#include +#include + +template +static void DoBitwiseOp(T *map1, T *map2, T *map, int count, int op) +{ + int i; + + switch(op) + { + case IM_BIT_AND: + for (i = 0; i < count; i++) + map[i] = map1[i] & map2[i]; + break; + case IM_BIT_OR: + for (i = 0; i < count; i++) + map[i] = map1[i] | map2[i]; + break; + case IM_BIT_XOR: + for (i = 0; i < count; i++) + map[i] = (T)~(map1[i] | map2[i]); + break; + } +} + +void imProcessBitwiseOp(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int op) +{ + int count = src_image1->count*src_image1->depth; + + switch(src_image1->data_type) + { + case IM_BYTE: + DoBitwiseOp((imbyte*)src_image1->data[0], (imbyte*)src_image2->data[0], (imbyte*)dst_image->data[0], count, op); + break; + case IM_USHORT: + DoBitwiseOp((imushort*)src_image1->data[0], (imushort*)src_image2->data[0], (imushort*)dst_image->data[0], count, op); + break; + case IM_INT: + DoBitwiseOp((int*)src_image1->data[0], (int*)src_image2->data[0], (int*)dst_image->data[0], count, op); + break; + } +} + +template +static void DoBitwiseNot(T *map1, T *map, int count) +{ + for (int i = 0; i < count; i++) + map[i] = ~map1[i]; +} + +static void DoBitwiseNotBin(imbyte *map1, imbyte *map, int count) +{ + for (int i = 0; i < count; i++) + map[i] = map1[i]? 0: 1; +} + +void imProcessBitwiseNot(const imImage* src_image, imImage* dst_image) +{ + int count = src_image->count*src_image->depth; + + if (dst_image->color_space == IM_BINARY) + { + DoBitwiseNotBin((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], count); + return; + } + + switch(src_image->data_type) + { + case IM_BYTE: + DoBitwiseNot((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], count); + break; + case IM_USHORT: + DoBitwiseNot((imushort*)src_image->data[0], (imushort*)dst_image->data[0], count); + break; + case IM_INT: + DoBitwiseNot((int*)src_image->data[0], (int*)dst_image->data[0], count); + break; + } +} + +void imProcessBitMask(const imImage* src_image, imImage* dst_image, unsigned char mask, int op) +{ + imbyte* src_map = (imbyte*)src_image->data[0]; + imbyte* dst_map = (imbyte*)dst_image->data[0]; + int i; + int count = dst_image->count * dst_image->depth; + switch(op) + { + case IM_BIT_AND: + for (i = 0; i < count; i++) + *dst_map++ = *src_map++ & mask; + break; + case IM_BIT_OR: + for (i = 0; i < count; i++) + *dst_map++ = *src_map++ | mask; + break; + case IM_BIT_XOR: + for (i = 0; i < count; i++) + *dst_map++ = (imbyte)~(*src_map++ | mask); + break; + } + + if ((op == IM_BIT_XOR || op == IM_BIT_OR) && dst_image->color_space == IM_BINARY && mask > 1) + dst_image->color_space = IM_GRAY; +} + +void imProcessBitPlane(const imImage* src_image, imImage* dst_image, int plane, int reset) +{ + imbyte mask = imbyte(0x01 << plane); + if (reset) mask = ~mask; + imbyte* src_map = (imbyte*)src_image->data[0]; + imbyte* dst_map = (imbyte*)dst_image->data[0]; + int count = dst_image->count * dst_image->depth; + for (int i = 0; i < count; i++) + { + if (reset) + *dst_map++ = *src_map & mask; + else + *dst_map++ = (*src_map & mask)? 1: 0; + + src_map++; + } +} diff --git a/im/src/process/im_morphology_bin.cpp b/im/src/process/im_morphology_bin.cpp new file mode 100755 index 0000000..9405ff6 --- /dev/null +++ b/im/src/process/im_morphology_bin.cpp @@ -0,0 +1,317 @@ +/** \file + * \brief Morphology Operations for Binary Images + * + * See Copyright Notice in im_lib.h + * $Id: im_morphology_bin.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include +#include + +#include "im_process_loc.h" +#include "im_process_pon.h" + +#include +#include +#include +#include +#include + +static int DoBinMorphConvolve(imbyte *map, imbyte* new_map, int width, int height, const imImage* kernel, int counter, int hit_value, int miss_value) +{ + int *kernel_line; + int offset, new_offset, i, j, x, y; + int kh, kw, kh2, kw2, hit; + + kh = kernel->height; + kw = kernel->width; + kh2 = kernel->height/2; + kw2 = kernel->width/2; + + int* kernel_data = (int*)kernel->data[0]; + + for(j = 0; j < height; j++) + { + new_offset = j * width; + + for(i = 0; i < width; i++) + { + hit = 1; + + for(y = -kh2; y <= kh2 && hit; y++) + { + kernel_line = kernel_data + (y+kh2)*kernel->width; + + if ((j + y < 0) || // pass the bottom border + (j + y >= height)) // pass the top border + offset = -1; + else + offset = (j + y) * width; + + for(x = -kw2; x <= kw2; x++) + { + if ((offset == -1) || + (i + x < 0) || // pass the left border + (i + x >= width)) // pass the right border + { + if(kernel_line[x+kw2] != -1 && kernel_line[x+kw2] != 0) // 0 extension beyond borders + hit = 0; + } + else + { + if(kernel_line[x+kw2] != -1 && kernel_line[x+kw2] != map[offset + (i + x)]) + hit = 0; + } + } + } + + new_map[new_offset + i] = (imbyte)(hit? hit_value: miss_value); + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +int imProcessBinMorphConvolve(const imImage* src_image, imImage* dst_image, const imImage *kernel, int hit_white, int iter) +{ + int j, ret = 0, hit_value, miss_value; + void *tmp = NULL; + int counter; + + if (hit_white) + { + hit_value = 1; + miss_value = 0; + } + else + { + hit_value = 0; + miss_value = 1; + } + + counter = imCounterBegin("Binary Morphological Convolution"); + const char* msg = (const char*)imImageGetAttribute(kernel, "Description", NULL, NULL); + if (!msg) msg = "Processing..."; + imCounterTotal(counter, src_image->height*iter, msg); + + if (iter > 1) + tmp = malloc(src_image->size); + + for (j = 0; j < iter; j++) + { + if (j == 0) + ret = DoBinMorphConvolve((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], src_image->width, src_image->height, kernel, counter, hit_value, miss_value); + else + { + memcpy(tmp, dst_image->data[0], src_image->size); + ret = DoBinMorphConvolve((imbyte*)tmp, (imbyte*)dst_image->data[0], src_image->width, src_image->height, kernel, counter, hit_value, miss_value); + } + + if (!ret) + break; + } + + if (tmp) free(tmp); + imCounterEnd(counter); + + return ret; +} + +int imProcessBinMorphErode(const imImage* src_image, imImage* dst_image, int kernel_size, int iter) +{ + imImage* kernel = imImageCreate(kernel_size, kernel_size, IM_GRAY, IM_INT); + imImageSetAttribute(kernel, "Description", IM_BYTE, -1, (void*)"Erode"); + + int* kernel_data = (int*)kernel->data[0]; + for(int i = 0; i < kernel->count; i++) + kernel_data[i] = 1; + + int ret = imProcessBinMorphConvolve(src_image, dst_image, kernel, 1, iter); + imImageDestroy(kernel); + return ret; +} + +int imProcessBinMorphDilate(const imImage* src_image, imImage* dst_image, int kernel_size, int iter) +{ + imImage* kernel = imImageCreate(kernel_size, kernel_size, IM_GRAY, IM_INT); + imImageSetAttribute(kernel, "Description", IM_BYTE, -1, (void*)"Dilate"); + // Kernel is all zeros + int ret = imProcessBinMorphConvolve(src_image, dst_image, kernel, 0, iter); + imImageDestroy(kernel); + return ret; +} + +int imProcessBinMorphOpen(const imImage* src_image, imImage* dst_image, int kernel_size, int iter) +{ + imImage*temp = imImageClone(src_image); + if (!temp) + return 0; + + if (!imProcessBinMorphErode(src_image, temp, kernel_size, iter)) {imImageDestroy(temp); return 0;} + if (!imProcessBinMorphDilate(temp, dst_image, kernel_size, iter)) {imImageDestroy(temp); return 0;} + + imImageDestroy(temp); + return 1; +} + +int imProcessBinMorphClose(const imImage* src_image, imImage* dst_image, int kernel_size, int iter) +{ + imImage*temp = imImageClone(src_image); + if (!temp) + return 0; + + if (!imProcessBinMorphDilate(src_image, temp, kernel_size, iter)) {imImageDestroy(temp); return 0;} + if (!imProcessBinMorphErode(temp, dst_image, kernel_size, iter)) {imImageDestroy(temp); return 0;} + + imImageDestroy(temp); + return 1; +} + +int imProcessBinMorphOutline(const imImage* src_image, imImage* dst_image, int kernel_size, int iter) +{ + if (!imProcessBinMorphErode(src_image, dst_image, kernel_size, iter)) return 0; + imProcessArithmeticOp(src_image, dst_image, dst_image, IM_BIN_DIFF); + return 1; +} + +/* Direction masks: */ +/* N S W E */ +static int masks[] = { 0200, 0002, 0040, 0010 }; + +/* True if pixel neighbor map indicates the pixel is 8-simple and */ +/* not an end point and thus can be deleted. The neighborhood */ +/* map is defined as an integer of bits abcdefghi with a non-zero */ +/* bit representing a non-zero pixel. The bit assignment for the */ +/* neighborhood is: */ +/* */ +/* a b c */ +/* d e f */ +/* g h i */ + +static unsigned char isdelete[512] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; + +static void DoThinImage(imbyte *map, int xsize, int ysize) +{ + int x, y; /* Pixel location */ + int i; /* Pass index */ + int pc = 0; /* Pass count */ + int count = 1; /* Deleted pixel count */ + int p, q; /* Neighborhood maps of adjacent cells */ + imbyte *qb; /* Neighborhood maps of previous scanline */ + int m; /* Deletion direction mask */ + + qb = (imbyte *) malloc(xsize); + qb[xsize-1] = 0; /* Used for lower-right pixel */ + + while ( count ) + { + /* Scan src_image while deletions */ + pc++; + count = 0; + + for ( i = 0 ; i < 4 ; i++ ) + { + m = masks[i]; + + /* Build initial previous scan buffer. */ + + p = map[0] != 0; + for (x = 0 ; x < xsize-1 ; x++) + { + p = ((p<<1)&0006) | (map[x+1] != 0); + qb[x] = (imbyte)p; + } + + /* Scan src_image for pixel deletion candidates. */ + + for ( y = 0 ; y < ysize-1 ; y++ ) + { + q = qb[0]; + p = ((q<<3)&0110) | (map[(y+1)*xsize] != 0); + + for ( x = 0 ; x < xsize-1 ; x++ ) + { + q = qb[x]; + p = ((p<<1)&0666) | ((q<<3)&0110) | (map[(y+1)*xsize + x+1] != 0); + qb[x] = (imbyte)p; + + if (((p&m) == 0) && isdelete[p] ) + { + count++; + map[y*xsize + x] = 0; + } + } + + /* Process right edge pixel. */ + + p = (p<<1)&0666; + if ( (p&m) == 0 && isdelete[p] ) + { + count++; + map[y*xsize + xsize-1] = 0; + } + } + + /* Process bottom scan line. */ + + for ( x = 0 ; x < xsize ; x++ ) + { + q = qb[x]; + p = ((p<<1)&0666) | ((q<<3)&0110); + + if ( (p&m) == 0 && isdelete[p] ) + { + count++; + map[(ysize-1)*xsize + x] = 0; + } + } + } + } + + free (qb); +} + +void imProcessBinMorphThin(const imImage* src_image, imImage* dst_image) +{ + imImageCopyData(src_image, dst_image); + DoThinImage((imbyte*)dst_image->data[0], dst_image->width, dst_image->height); +} diff --git a/im/src/process/im_morphology_gray.cpp b/im/src/process/im_morphology_gray.cpp new file mode 100755 index 0000000..c3c9d45 --- /dev/null +++ b/im/src/process/im_morphology_gray.cpp @@ -0,0 +1,231 @@ +/** \file + * \brief Morphology Operations for Gray Images + * + * See Copyright Notice in im_lib.h + * $Id: im_morphology_gray.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include +#include +#include + +#include "im_process_loc.h" +#include "im_process_pon.h" + +#include +#include +#include +#include +#include + + +template +static int DoGrayMorphConvolve(T *map, T* new_map, int width, int height, const imImage* kernel, int counter, int ismax, DT) +{ + DT value, *kernel_line, max = 0, min = 0; + int offset, new_offset, i, j, x, y, init; + int kh, kw, kh2, kw2; + + kh = kernel->height; + kw = kernel->width; + kh2 = kernel->height/2; + kw2 = kernel->width/2; + + DT* kernel_data = (DT*)kernel->data[0]; + + for(j = 0; j < height; j++) + { + new_offset = j * width; + + for(i = 0; i < width; i++) + { + init = 0; + + for(y = -kh2; y <= kh2; y++) + { + kernel_line = kernel_data + (y+kh2)*kw; + + if ((j + y < 0) || // pass the bottom border + (j + y >= height)) // pass the top border + continue; + else + offset = (j + y) * width; + + for(x = -kw2; x <= kw2; x++) + { + if (kernel_line[x+kw2] != -1) + { + if ((i + x < 0) || // pass the left border + (i + x >= width)) // pass the right border + continue; + else + value = kernel_line[x+kw2] + map[offset + (i + x)]; + + if (init == 0) // first time here for each pass + { + if (ismax) + max = value; + else + min = value; + + init = 1; + } + else + { + if (ismax && value > max) + max = value; + + if (!ismax && value < min) + min = value; + } + } + } + } + + int size_of = sizeof(imbyte); + if (sizeof(T) == size_of) + { + if (ismax) + new_map[new_offset + i] = (T)IM_BYTECROP(max); + else + new_map[new_offset + i] = (T)IM_BYTECROP(min); + } + else + { + if (ismax) + new_map[new_offset + i] = (T)max; + else + new_map[new_offset + i] = (T)min; + } + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +int imProcessGrayMorphConvolve(const imImage* src_image, imImage* dst_image, const imImage *kernel, int ismax) +{ + int ret = 0; + + int counter = imCounterBegin("Gray Morphological Convolution"); + const char* msg = (const char*)imImageGetAttribute(kernel, "Description", NULL, NULL); + if (!msg) msg = "Processing..."; + imCounterTotal(counter, src_image->depth*src_image->height, msg); + + imImage* fkernel = NULL; + + if (src_image->data_type == IM_FLOAT && kernel->data_type != IM_FLOAT) + { + fkernel = imImageCreate(kernel->width, kernel->height, IM_GRAY, IM_FLOAT); + imConvertDataType(kernel, fkernel, 0, 0, 0, IM_CAST_DIRECT); + kernel = fkernel; + } + + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = DoGrayMorphConvolve((imbyte*)src_image->data[i], (imbyte*)dst_image->data[i], src_image->width, src_image->height, kernel, counter, ismax, (int)0); + break; + case IM_USHORT: + ret = DoGrayMorphConvolve((imushort*)src_image->data[i], (imushort*)dst_image->data[i], src_image->width, src_image->height, kernel, counter, ismax, (int)0); + break; + case IM_INT: + ret = DoGrayMorphConvolve((int*)src_image->data[i], (int*)dst_image->data[i], src_image->width, src_image->height, kernel, counter, ismax, (int)0); + break; + case IM_FLOAT: + ret = DoGrayMorphConvolve((float*)src_image->data[i], (float*)dst_image->data[i], src_image->width, src_image->height, kernel, counter, ismax, (float)0); + break; + } + + if (!ret) + break; + } + + if (fkernel) imImageDestroy(fkernel); + imCounterEnd(counter); + + return ret; +} + +int imProcessGrayMorphErode(const imImage* src_image, imImage* dst_image, int kernel_size) +{ + imImage* kernel = imImageCreate(kernel_size, kernel_size, IM_GRAY, IM_INT); + imImageSetAttribute(kernel, "Description", IM_BYTE, -1, (void*)"Erode"); + // Kernel is all zeros + int ret = imProcessGrayMorphConvolve(src_image, dst_image, kernel, 0); + imImageDestroy(kernel); + return ret; +} + +int imProcessGrayMorphDilate(const imImage* src_image, imImage* dst_image, int kernel_size) +{ + imImage* kernel = imImageCreate(kernel_size, kernel_size, IM_GRAY, IM_INT); + imImageSetAttribute(kernel, "Description", IM_BYTE, -1, (void*)"Dilate"); + // Kernel is all zeros + int ret = imProcessGrayMorphConvolve(src_image, dst_image, kernel, 1); + imImageDestroy(kernel); + return ret; +} + +int imProcessGrayMorphOpen(const imImage* src_image, imImage* dst_image, int kernel_size) +{ + imImage*temp = imImageClone(src_image); + if (!temp) + return 0; + + if (!imProcessGrayMorphErode(src_image, temp, kernel_size)) {imImageDestroy(temp); return 0;} + if (!imProcessGrayMorphDilate(temp, dst_image, kernel_size)) {imImageDestroy(temp); return 0;} + + imImageDestroy(temp); + return 1; +} + +int imProcessGrayMorphClose(const imImage* src_image, imImage* dst_image, int kernel_size) +{ + imImage*temp = imImageClone(src_image); + if (!temp) + return 0; + + if (!imProcessGrayMorphDilate(src_image, temp, kernel_size)) {imImageDestroy(temp); return 0;} + if (!imProcessGrayMorphErode(temp, dst_image, kernel_size)) {imImageDestroy(temp); return 0;} + + imImageDestroy(temp); + return 1; +} + +int imProcessGrayMorphTopHat(const imImage* src_image, imImage* dst_image, int kernel_size) +{ + if (!imProcessGrayMorphOpen(src_image, dst_image, kernel_size)) return 0; + imProcessArithmeticOp(src_image, dst_image, dst_image, IM_BIN_DIFF); + return 1; +} + +int imProcessGrayMorphWell(const imImage* src_image, imImage* dst_image, int kernel_size) +{ + if (!imProcessGrayMorphClose(src_image, dst_image, kernel_size)) return 0; + imProcessArithmeticOp(src_image, dst_image, dst_image, IM_BIN_DIFF); + return 1; +} + +int imProcessGrayMorphGradient(const imImage* src_image, imImage* dst_image, int kernel_size) +{ + imImage*temp = imImageClone(src_image); + if (!temp) + return 0; + + if (!imProcessGrayMorphDilate(src_image, temp, kernel_size)) {imImageDestroy(temp); return 0;} + if (!imProcessGrayMorphErode(src_image, dst_image, kernel_size)) {imImageDestroy(temp); return 0;} + + imProcessArithmeticOp(temp, dst_image, dst_image, IM_BIN_DIFF); + + imImageDestroy(temp); + return 1; +} + diff --git a/im/src/process/im_quantize.cpp b/im/src/process/im_quantize.cpp new file mode 100755 index 0000000..de78cf4 --- /dev/null +++ b/im/src/process/im_quantize.cpp @@ -0,0 +1,64 @@ +/** \file + * \brief Additional Image Quantization Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_quantize.cpp,v 1.2 2009/09/25 18:40:32 scuri Exp $ + */ + + +#include +#include +#include +#include + +#include "im_process_pon.h" + +#include +#include + + +void imProcessQuantizeRGBUniform(const imImage* src_image, imImage* dst_image, int dither) +{ + imbyte *dst_map=(imbyte*)dst_image->data[0], + *red_map=(imbyte*)src_image->data[0], + *green_map=(imbyte*)src_image->data[1], + *blue_map=(imbyte*)src_image->data[2]; + + imImageSetPalette(dst_image, imPaletteUniform(), 256); + + for (int y = 0; y < src_image->height; y++) + { + for (int x = 0; x < src_image->width; x++) + { + if (dither) + *dst_map++ = (imbyte)imPaletteUniformIndexHalftoned(imColorEncode(*red_map++, *green_map++, *blue_map++), x, y); + else + *dst_map++ = (imbyte)imPaletteUniformIndex(imColorEncode(*red_map++, *green_map++, *blue_map++)); + } + } +} + +void imProcessQuantizeGrayUniform(const imImage* src_image, imImage* dst_image, int grays) +{ + int i, value; + + imbyte *dst_map=(imbyte*)dst_image->data[0], + *src_map=(imbyte*)src_image->data[0]; + + imbyte re_map[256]; + memset(re_map, 0, 256); + + float factor = (float)grays/256.0f; + float factor256 = 256.0f/(float)grays; + + for (i = 0; i < 256; i++) + { + value = imResample(i, factor); + value = imResample(value, factor256); + re_map[i] = (imbyte)IM_BYTECROP(value); + } + + int total_count = src_image->count*src_image->depth; + for (i = 0; i < total_count; i++) + dst_map[i] = re_map[src_map[i]]; +} diff --git a/im/src/process/im_render.cpp b/im/src/process/im_render.cpp new file mode 100755 index 0000000..f5d296f --- /dev/null +++ b/im/src/process/im_render.cpp @@ -0,0 +1,532 @@ +/** \file + * \brief Synthetic Image Render + * + * See Copyright Notice in im_lib.h + * $Id: im_render.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include +#include +#include + +#include "im_process_pon.h" + +#include +#include +#include +#include + +static float iGetFactor(int data_type) +{ + if (data_type == IM_BYTE) + return 255.0f; + else if (data_type == IM_INT || data_type == IM_USHORT) + return 65535.0f; + else + return 1.0f; +} + +template +static int DoRenderCondOp(T *map, int width, int height, int d, imRenderCondFunc render_func, float* param, int counter) +{ + int offset, cond = 1; + T Value; + + for(int y = 0; y < height; y++) + { + offset = y * width; + + for(int x = 0; x < width; x++) + { + Value = (T)(render_func(x, y, d, &cond, param)); + if (cond) map[offset + x] = Value; + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +int imProcessRenderCondOp(imImage* image, imRenderCondFunc render_func, char* render_name, float* param) +{ + int ret = 0; + + int counter = imCounterBegin(render_name); + imCounterTotal(counter, image->depth*image->height, "Rendering..."); + + for (int d = 0; d < image->depth; d++) + { + switch(image->data_type) + { + case IM_BYTE: + ret = DoRenderCondOp((imbyte*)image->data[d], image->width, image->height, d, render_func, param, counter); + break; + case IM_USHORT: + ret = DoRenderCondOp((imushort*)image->data[d], image->width, image->height, d, render_func, param, counter); + break; + case IM_INT: + ret = DoRenderCondOp((int*)image->data[d], image->width, image->height, d, render_func, param, counter); + break; + case IM_FLOAT: + ret = DoRenderCondOp((float*)image->data[d], image->width, image->height, d, render_func, param, counter); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +template +static int DoRenderOp(T *map, int width, int height, int d, imRenderFunc render_func, float* param, int counter, int plus) +{ + int offset; + + for(int y = 0; y < height; y++) + { + offset = y * width; + + for(int x = 0; x < width; x++) + { + if (plus) + { + int size_of = sizeof(imbyte); + float value = map[offset + x] + render_func(x, y, d, param); + if (sizeof(T) == size_of) + map[offset + x] = (T)IM_BYTECROP(value); + else + map[offset + x] = (T)value; + + } + else + map[offset + x] = (T)render_func(x, y, d, param); + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +int imProcessRenderOp(imImage* image, imRenderFunc render_func, char* render_name, float* param, int plus) +{ + int ret = 0; + + int counter = imCounterBegin(render_name); + imCounterTotal(counter, image->depth*image->height, "Rendering..."); + + for (int d = 0; d < image->depth; d++) + { + switch(image->data_type) + { + case IM_BYTE: + ret = DoRenderOp((imbyte*)image->data[d], image->width, image->height, d, render_func, param, counter, plus); + break; + case IM_USHORT: + ret = DoRenderOp((imushort*)image->data[d], image->width, image->height, d, render_func, param, counter, plus); + break; + case IM_INT: + ret = DoRenderOp((int*)image->data[d], image->width, image->height, d, render_func, param, counter, plus); + break; + case IM_FLOAT: + ret = DoRenderOp((float*)image->data[d], image->width, image->height, d, render_func, param, counter, plus); + break; + } + + if (!ret) + break; + } + + imCounterEnd(counter); + + return ret; +} + +static float do_add_specklenoise(int, int, int, int *cond, float* param) +{ + float rnd = float(rand()) / RAND_MAX; + if (rnd < param[1]) + { + *cond = 1; + return (rand() * param[0]) / RAND_MAX; + } + else + { + *cond = 0; + return 0; + } +} + +int imProcessRenderAddSpeckleNoise(const imImage* src_image, imImage* dst_image, float percent) +{ + float param[2]; + param[0] = iGetFactor(src_image->data_type); + param[1] = percent / 100.0f; + srand((unsigned)time(NULL)); + imImageCopyData(src_image, dst_image); + return imProcessRenderCondOp(dst_image, do_add_specklenoise, "Add Speckle Noise", param); +} + +static float do_add_gaussiannoise(int, int, int, float* param) +{ + float rnd, x1, x2; + + do + { + x1 = float(rand()) / RAND_MAX; /* [0,1] */ + x2 = float(rand()) / RAND_MAX; /* [0,1] */ + x1 = 2*x1 - 1; /* [-1,1] */ + x2 = 2*x2 - 1; /* [-1,1] */ + rnd = x1*x1 + x2*x2; + } while( rnd >= 1 || rnd == 0); + + rnd = (float)sqrt(-2 * log(rnd) / rnd) * x1; + return rnd * param[1] + param[0]; +} + +int imProcessRenderAddGaussianNoise(const imImage* src_image, imImage* dst_image, float mean, float stddev) +{ + float param[2]; + param[0] = mean; + param[1] = stddev; + srand((unsigned)time(NULL)); + imImageCopyData(src_image, dst_image); + return imProcessRenderOp(dst_image, do_add_gaussiannoise, "Add Gaussian Noise", param, 1); +} + +static float do_add_uniformnoise(int, int, int, float* param) +{ + float rnd = float(rand()) / RAND_MAX; + rnd = 2*rnd - 1; /* [-1,1] */ + return 1.7320508f * rnd * param[1] + param[0]; +} + +int imProcessRenderAddUniformNoise(const imImage* src_image, imImage* dst_image, float mean, float stddev) +{ + float param[2]; + param[0] = mean; + param[1] = stddev; + srand((unsigned)time(NULL)); + imImageCopyData(src_image, dst_image); + return imProcessRenderOp(dst_image, do_add_uniformnoise, "Add Uniform Noise", param, 1); +} + +static float do_const(int, int, int d, float* param) +{ + return param[d]; +} + +int imProcessRenderConstant(imImage* image, float* value) +{ + return imProcessRenderOp(image, do_const, "Constant", value, 0); +} + +static float do_noise(int, int, int, float* param) +{ + return (rand() * param[0]) / RAND_MAX; +} + +int imProcessRenderRandomNoise(imImage* image) +{ + static float param[1]; + param[0] = iGetFactor(image->data_type); + srand((unsigned)time(NULL)); + return imProcessRenderOp(image, do_noise, "Random Noise", param, 0); +} + +static float do_cosine(int x, int y, int, float* param) +{ + return float((cos(param[1]*(x-param[3])) * cos(param[2]*(y-param[4])) + param[5]) * param[0]); +} + +int imProcessRenderCosine(imImage* image, float xperiod, float yperiod) +{ + float param[6]; + param[0] = iGetFactor(image->data_type); + + if (xperiod == 0.0f) param[1] = 0.0; + else param[1] = 2.0f * 3.1416f / xperiod; + + if (yperiod == 0.0f) param[2] = 0.0; + else param[2] = 2.0f * 3.1416f / yperiod; + + param[3] = image->width/2.0f; + param[4] = image->height/2.0f; + + if (image->data_type < IM_FLOAT) + param[0] = param[0] / 2.0f; + + if (image->data_type == IM_BYTE) + param[5] = 1.0f; + else + param[5] = 0.0f; + + return imProcessRenderOp(image, do_cosine, "Cosine", param, 0); +} + +static float do_gaussian(int x, int y, int, float* param) +{ + int xd = x - (int)param[2]; + int yd = y - (int)param[3]; + xd *= xd; + yd *= yd; + return float(exp((xd + yd)*param[1])*param[0]); +} + +int imProcessRenderGaussian(imImage* image, float stddev) +{ + float param[4]; + param[0] = iGetFactor(image->data_type); + param[1] = -1.0f / (2.0f * stddev * stddev); + param[2] = image->width/2.0f; + param[3] = image->height/2.0f; + return imProcessRenderOp(image, do_gaussian, "Gaussian", param, 0); +} + +static float do_lapgauss(int x, int y, int, float* param) +{ + int xd = x - (int)param[2]; + int yd = y - (int)param[3]; + xd *= xd; + yd *= yd; + xd += yd; + return float((xd - param[4])*exp(xd*param[1])*param[0]); +} + +int imProcessRenderLapOfGaussian(imImage* image, float stddev) +{ + float param[5]; + param[0] = iGetFactor(image->data_type); + param[1] = -1.0f / (2.0f * stddev * stddev); + param[2] = image->width/2.0f; + param[3] = image->height/2.0f; + param[4] = 2.0f * stddev * stddev; + param[0] /= param[4]; + return imProcessRenderOp(image, do_lapgauss, "Laplacian of Gaussian", param, 0); +} + +static inline float sinc(float x) +{ + if (x == 0.0f) + return 1.0f; + else + return float(sin(x)/x); +} + +static float do_sinc(int x, int y, int, float* param) +{ + return float((sinc((x - param[3])*param[1])*sinc((y - param[4])*param[2]) + param[5])*param[0]); +} + +int imProcessRenderSinc(imImage* image, float xperiod, float yperiod) +{ + float param[6]; + param[0] = iGetFactor(image->data_type); + + if (xperiod == 0.0f) param[1] = 0.0; + else param[1] = 2.0f * 3.1416f / xperiod; + + if (yperiod == 0.0f) param[2] = 0.0; + else param[2] = 2.0f * 3.1416f / yperiod; + + param[3] = image->width/2.0f; + param[4] = image->height/2.0f; + + if (image->data_type < IM_FLOAT) + param[0] = param[0] / 1.3f; + + if (image->data_type == IM_BYTE) + param[5] = 0.3f; + else + param[5] = 0.0f; + + return imProcessRenderOp(image, do_sinc, "Sinc", param, 0); +} + +static float do_box(int x, int y, int, float* param) +{ + int xr = x - (int)param[3]; + int yr = y - (int)param[4]; + if (xr < -(int)param[1] || xr > (int)param[1] || + yr < -(int)param[2] || yr > (int)param[2]) + return 0; + else + return param[0]; +} + +int imProcessRenderBox(imImage* image, int width, int height) +{ + float param[5]; + param[0] = iGetFactor(image->data_type); + param[1] = width/2.0f; + param[2] = height/2.0f; + param[3] = image->width/2.0f; + param[4] = image->height/2.0f; + return imProcessRenderOp(image, do_box, "Box", param, 0); +} + +static float do_ramp(int x, int y, int, float* param) +{ + if (param[3]) + { + if (y < param[1]) + return 0; + if (y > param[2]) + return 0; + + return (y-param[1])*param[0]; + } + else + { + if (x < param[1]) + return 0; + if (x > param[2]) + return 0; + + return (x-param[1])*param[0]; + } +} + +int imProcessRenderRamp(imImage* image, int start, int end, int dir) +{ + float param[4]; + param[0] = iGetFactor(image->data_type); + param[1] = (float)start; + param[2] = (float)end; + param[3] = (float)dir; + param[0] /= float(end-start); + return imProcessRenderOp(image, do_ramp, "Ramp", param, 0); +} + +static inline int Tent(int t, int T) +{ + if (t < 0) + return (t + T); + else + return (T - t); +} + +static float do_tent(int x, int y, int, float* param) +{ + int xr = x - (int)param[3]; + int yr = y - (int)param[4]; + if (xr < -(int)param[1] || xr > (int)param[1] || + yr < -(int)param[2] || yr > (int)param[2]) + return 0; + else + return Tent(xr, (int)param[1]) * Tent(yr, (int)param[2]) * param[0]; +} + +int imProcessRenderTent(imImage* image, int width, int height) +{ + float param[5]; + param[0] = iGetFactor(image->data_type); + param[1] = width/2.0f; + param[2] = height/2.0f; + param[0] /= param[1]*param[2]; + param[3] = image->width/2.0f; + param[4] = image->height/2.0f; + return imProcessRenderOp(image, do_tent, "Tent", param, 0); +} + +static float do_cone(int x, int y, int, float* param) +{ + int xr = x - (int)param[2]; + int yr = y - (int)param[3]; + int radius = imRound(sqrt((double)(xr*xr + yr*yr))); + if (radius > (int)param[1]) + return 0; + else + return ((int)param[1] - radius)*param[0]; +} + +int imProcessRenderCone(imImage* image, int radius) +{ + float param[4]; + param[0] = iGetFactor(image->data_type); + param[1] = (float)radius; + param[0] /= param[1]; + param[2] = image->width/2.0f; + param[3] = image->height/2.0f; + return imProcessRenderOp(image, do_cone, "Cone", param, 0); +} + +static float do_wheel(int x, int y, int, float* param) +{ + int xr = x - (int)param[3]; + int yr = y - (int)param[4]; + int radius = imRound(sqrt((double)(xr*xr + yr*yr))); + if (radius < (int)param[1] || radius > (int)param[2]) + return 0; + else + return param[0]; +} + +int imProcessRenderWheel(imImage* image, int int_radius, int ext_radius) +{ + float param[5]; + param[0] = iGetFactor(image->data_type); + param[1] = (float)int_radius; + param[2] = (float)ext_radius; + param[3] = image->width/2.0f; + param[4] = image->height/2.0f; + return imProcessRenderOp(image, do_wheel, "Wheel", param, 0); +} + +static float do_grid(int x, int y, int, float* param) +{ + int xr = x - (int)param[3]; + int yr = y - (int)param[4]; + if (xr % (int)param[1] == 0 && yr % (int)param[2] == 0) + return param[0]; + else + return 0; +} + +int imProcessRenderGrid(imImage* image, int x_space, int y_space) +{ + float param[5]; + param[0] = iGetFactor(image->data_type); + param[1] = (float)x_space; + param[2] = (float)y_space; + param[3] = image->width/2.0f; + param[4] = image->height/2.0f; + return imProcessRenderOp(image, do_grid, "Grid", param, 0); +} + +static float do_chessboard(int x, int y, int, float* param) +{ + int xr = x - (int)param[3]; + int yr = y - (int)param[4]; + int xp = xr % (int)param[1]; + int yp = yr % (int)param[2]; + int xc = (int)param[1]/2; + int yc = (int)param[2]/2; + if (xr < 0) xc = -xc; + if (yr < 0) yc = -yc; + if ((xp < xc && yp < yc) || + (xp > xc && yp > yc)) + return param[0]; + else + return 0; +} + +int imProcessRenderChessboard(imImage* image, int x_space, int y_space) +{ + float param[5]; + param[0] = iGetFactor(image->data_type); + param[1] = (float)x_space*2; + param[2] = (float)y_space*2; + param[3] = image->width/2.0f; + param[4] = image->height/2.0f; + return imProcessRenderOp(image, do_chessboard, "Chessboard", param, 0); +} diff --git a/im/src/process/im_resize.cpp b/im/src/process/im_resize.cpp new file mode 100755 index 0000000..ddf6e47 --- /dev/null +++ b/im/src/process/im_resize.cpp @@ -0,0 +1,332 @@ +/** \file + * \brief Image Resize + * + * See Copyright Notice in im_lib.h + * $Id: im_resize.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include +#include +#include +#include + +#include "im_process_loc.h" + +#include +#include + + +static inline void iResizeInverse(int x, int y, float *xl, float *yl, float x_invfactor, float y_invfactor) +{ + *xl = (x + 0.5f) * x_invfactor; + *yl = (y + 0.5f) * y_invfactor; +} + +template +static int iResize(int src_width, int src_height, const DT *src_map, + int dst_width, int dst_height, DT *dst_map, + DTU Dummy, int order, int counter) +{ + float xl, yl; + float x_invfactor = float(src_width)/float(dst_width); + float y_invfactor = float(src_height)/float(dst_height); + + for (int y = 0; y < dst_height; y++) + { + for (int x = 0; x < dst_width; x++) + { + iResizeInverse(x, y, &xl, &yl, x_invfactor, y_invfactor); + + // if inside the original image + if (xl > 0.0 && yl > 0.0 && xl < src_width && yl < src_height) + { + if (order == 1) + *dst_map = imBilinearInterpolation(src_width, src_height, src_map, xl, yl); + else if (order == 3) + *dst_map = imBicubicInterpolation(src_width, src_height, src_map, xl, yl, Dummy); + else + *dst_map = imZeroOrderInterpolation(src_width, src_height, src_map, xl, yl); + } + + dst_map++; + } + + if (!imCounterInc(counter)) + return 0; + } + + return 1; +} + +template +static int iReduce(int src_width, int src_height, const DT *src_map, + int dst_width, int dst_height, DT *dst_map, + DTU Dummy, int order, int counter) +{ + float xl, yl; + float x_invfactor = float(src_width)/float(dst_width); + float y_invfactor = float(src_height)/float(dst_height); + + iResizeInverse(1, 1, &xl, &yl, x_invfactor, y_invfactor); + float xl0 = xl, yl0 = yl; + iResizeInverse(2, 2, &xl, &yl, x_invfactor, y_invfactor); + float xl1 = xl, yl1 = yl; + + float box_width = xl1 - xl0; + float box_height = yl1 - yl0; + + for (int y = 0; y < dst_height; y++) + { + for (int x = 0; x < dst_width; x++) + { + iResizeInverse(x, y, &xl, &yl, x_invfactor, y_invfactor); + + // if inside the original image + if (xl > 0.0 && yl > 0.0 && xl < src_width && yl < src_height) + { + if (order == 0) + *dst_map = imZeroOrderDecimation(src_width, src_height, src_map, xl, yl, box_width, box_height, Dummy); + else + *dst_map = imBilinearDecimation(src_width, src_height, src_map, xl, yl, box_width, box_height, Dummy); + } + + dst_map++; + } + + if (!imCounterInc(counter)) + return 0; + } + return 1; +} + +int imProcessReduce(const imImage* src_image, imImage* dst_image, int order) +{ + int ret = 0; + int counter = imCounterBegin("Reduce Size"); + const char* int_msg = (order == 1)? "Bilinear Decimation": "Zero Order Decimation"; + imCounterTotal(counter, src_image->depth*dst_image->height, int_msg); + + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = iReduce(src_image->width, src_image->height, (const imbyte*)src_image->data[i], + dst_image->width, dst_image->height, (imbyte*)dst_image->data[i], + float(0), order, counter); + break; + case IM_USHORT: + ret = iReduce(src_image->width, src_image->height, (const imushort*)src_image->data[i], + dst_image->width, dst_image->height, (imushort*)dst_image->data[i], + float(0), order, counter); + break; + case IM_INT: + ret = iReduce(src_image->width, src_image->height, (const int*)src_image->data[i], + dst_image->width, dst_image->height, (int*)dst_image->data[i], + float(0), order, counter); + break; + case IM_FLOAT: + ret = iReduce(src_image->width, src_image->height, (const float*)src_image->data[i], + dst_image->width, dst_image->height, (float*)dst_image->data[i], + float(0), order, counter); + break; + case IM_CFLOAT: + ret = iReduce(src_image->width, src_image->height, (const imcfloat*)src_image->data[i], + dst_image->width, dst_image->height, (imcfloat*)dst_image->data[i], + imcfloat(0,0), order, counter); + break; + } + } + + imCounterEnd(counter); + return ret; +} + +int imProcessResize(const imImage* src_image, imImage* dst_image, int order) +{ + int ret = 0; + int counter = imCounterBegin("Resize"); + const char* int_msg = (order == 3)? "Bicubic Interpolation": (order == 1)? "Bilinear Interpolation": "Zero Order Interpolation"; + imCounterTotal(counter, src_image->depth*dst_image->height, int_msg); + + for (int i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ret = iResize(src_image->width, src_image->height, (const imbyte*)src_image->data[i], + dst_image->width, dst_image->height, (imbyte*)dst_image->data[i], + float(0), order, counter); + break; + case IM_USHORT: + ret = iResize(src_image->width, src_image->height, (const imushort*)src_image->data[i], + dst_image->width, dst_image->height, (imushort*)dst_image->data[i], + float(0), order, counter); + break; + case IM_INT: + ret = iResize(src_image->width, src_image->height, (const int*)src_image->data[i], + dst_image->width, dst_image->height, (int*)dst_image->data[i], + float(0), order, counter); + break; + case IM_FLOAT: + ret = iResize(src_image->width, src_image->height, (const float*)src_image->data[i], + dst_image->width, dst_image->height, (float*)dst_image->data[i], + float(0), order, counter); + break; + case IM_CFLOAT: + ret = iResize(src_image->width, src_image->height, (const imcfloat*)src_image->data[i], + dst_image->width, dst_image->height, (imcfloat*)dst_image->data[i], + imcfloat(0,0), order, counter); + break; + } + } + + imCounterEnd(counter); + return ret; +} + +template +static void ReduceBy4(int src_width, + int src_height, + DT *src_map, + int dst_width, + int dst_height, + DT *dst_map) +{ + int x,y,yd,xd; + (void)dst_height; + + // make an even size + int height = (src_height/2)*2; + int width = (src_width/2)*2; + + for(y = 0 ; y < height ; y += 2) + { + yd = y/2; + for(x = 0 ; x < width ; x += 2) + { + xd = x/2; + dst_map[yd * dst_width + xd] = ((src_map[y * src_width + x] + + src_map[y * src_width + (x+1)] + + src_map[(y+1) * src_width + x] + + src_map[(y+1) * src_width + (x+1)])/4); + } + } +} + +void imProcessReduceBy4(const imImage* src_image, imImage* dst_image) +{ + int i; + + for (i = 0; i < src_image->depth; i++) + { + switch(src_image->data_type) + { + case IM_BYTE: + ReduceBy4(src_image->width, src_image->height, (imbyte*)src_image->data[i], dst_image->width, dst_image->height, (imbyte*)dst_image->data[i]); + break; + case IM_USHORT: + ReduceBy4(src_image->width, src_image->height, (imushort*)src_image->data[i], dst_image->width, dst_image->height, (imushort*)dst_image->data[i]); + break; + case IM_INT: + ReduceBy4(src_image->width, src_image->height, (int*)src_image->data[i], dst_image->width, dst_image->height, (int*)dst_image->data[i]); + break; + case IM_FLOAT: + ReduceBy4(src_image->width, src_image->height, (float*)src_image->data[i], dst_image->width, dst_image->height, (float*)dst_image->data[i]); + break; + case IM_CFLOAT: + ReduceBy4(src_image->width, src_image->height, (imcfloat*)src_image->data[i], dst_image->width, dst_image->height, (imcfloat*)dst_image->data[i]); + break; + } + } +} + +void imProcessCrop(const imImage* src_image, imImage* dst_image, int xmin, int ymin) +{ + int type_size = imDataTypeSize(src_image->data_type); + for (int i = 0; i < src_image->depth; i++) + { + imbyte *src_map = (imbyte*)src_image->data[i]; + imbyte *dst_map = (imbyte*)dst_image->data[i]; + + for (int y = 0; y < dst_image->height; y++) + { + int src_offset = (y + ymin)*src_image->line_size + xmin*type_size; + int dst_offset = y*dst_image->line_size; + + memcpy(&dst_map[dst_offset], &src_map[src_offset], dst_image->line_size); + } + } +} + +void imProcessInsert(const imImage* src_image, const imImage* rgn_image, imImage* dst_image, int xmin, int ymin) +{ + int type_size = imDataTypeSize(src_image->data_type); + int dst_size1 = xmin*type_size; + int dst_size2 = src_image->line_size - (rgn_image->line_size + dst_size1); + int dst_offset2 = dst_size1+rgn_image->line_size; + int ymax = ymin+rgn_image->height-1; + int rgn_size = rgn_image->line_size; + + if (dst_size2 < 0) + { + dst_size2 = 0; + rgn_size = src_image->line_size - dst_size1; + dst_offset2 = dst_size1+rgn_size; + } + + if (ymax > src_image->height-1) + ymax = src_image->height-1; + + for (int i = 0; i < src_image->depth; i++) + { + imbyte *src_map = (imbyte*)src_image->data[i]; + imbyte *rgn_map = (imbyte*)rgn_image->data[i]; + imbyte *dst_map = (imbyte*)dst_image->data[i]; + + for (int y = 0; y < src_image->height; y++) + { + if (y < ymin || y > ymax) + { + memcpy(dst_map, src_map, src_image->line_size); + } + else + { + if (dst_size1) + memcpy(dst_map, src_map, dst_size1); + + memcpy(dst_map + dst_size1, rgn_map, rgn_size); + + if (dst_size2) + memcpy(dst_map + dst_offset2, + src_map + dst_offset2, dst_size2); + + rgn_map += rgn_image->line_size; + } + + src_map += src_image->line_size; + dst_map += dst_image->line_size; + } + } +} + +void imProcessAddMargins(const imImage* src_image, imImage* dst_image, int xmin, int ymin) +{ + int type_size = imDataTypeSize(src_image->data_type); + for (int i = 0; i < src_image->depth; i++) + { + imbyte *dst_map = (imbyte*)dst_image->data[i]; + imbyte *src_map = (imbyte*)src_image->data[i]; + + for (int y = 0; y < src_image->height; y++) + { + int src_offset = y*src_image->line_size; + int dst_offset = (y + ymin)*dst_image->line_size + xmin*type_size; + + memcpy(&dst_map[dst_offset], &src_map[src_offset], src_image->line_size); + } + } +} + diff --git a/im/src/process/im_statistics.cpp b/im/src/process/im_statistics.cpp new file mode 100755 index 0000000..b9f086d --- /dev/null +++ b/im/src/process/im_statistics.cpp @@ -0,0 +1,341 @@ +/** \file + * \brief Image Statistics Calculations + * + * See Copyright Notice in im_lib.h + * $Id: im_statistics.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include +#include + +#include "im_process_ana.h" + +#include +#include +#include + +static unsigned long count_map(const imImage* image) +{ + unsigned long histo[256]; + int size = image->width * image->height; + imCalcHistogram((imbyte*)image->data[0], size, histo, 0); + unsigned long numcolor = 0; + + for (int i = 0; i < 256; i++) + { + if(histo[i] != 0) + numcolor++; + } + + return numcolor; +} + +// will count also all the 3 components color spaces +static unsigned long count_rgb(const imImage* image) +{ + imbyte *count = (imbyte*)calloc(sizeof(imbyte), 1 << 21 ); /* (2^24)/8=2^21 ~ 2Mb */ + if (!count) + return (unsigned long)-1; + + int size = image->width * image->height; + imbyte *red = (imbyte*)image->data[0]; + imbyte *green = (imbyte*)image->data[1]; + imbyte *blue = (imbyte*)image->data[2]; + + int index; + unsigned long numcolor = 0; + + for(int i = 0; i < size; i++) + { + index = red[i] << 16 | green[i] << 8 | blue[i]; + + if(imDataBitGet(count, index) == 0) + numcolor++; + + imDataBitSet(count, index, 1); + } + + free(count); + + return numcolor; +} + +unsigned long imCalcCountColors(const imImage* image) +{ + if (imColorModeDepth(image->color_space) > 1) + return count_rgb(image); + else + return count_map(image); +} + +void imCalcHistogram(const imbyte* map, int size, unsigned long* histo, int cumulative) +{ + int i; + + memset(histo, 0, 256 * sizeof(unsigned long)); + + for (i = 0; i < size; i++) + histo[*map++]++; + + if (cumulative) + { + /* make cumulative histogram */ + for (i = 1; i < 256; i++) + histo[i] += histo[i-1]; + } +} + +void imCalcUShortHistogram(const imushort* map, int size, unsigned long* histo, int cumulative) +{ + int i; + + memset(histo, 0, 65535 * sizeof(unsigned long)); + + for (i = 0; i < size; i++) + histo[*map++]++; + + if (cumulative) + { + /* make cumulative histogram */ + for (i = 1; i < 65535; i++) + histo[i] += histo[i-1]; + } +} + +void imCalcGrayHistogram(const imImage* image, unsigned long* histo, int cumulative) +{ + int i; + + memset(histo, 0, 256 * sizeof(unsigned long)); + + if (image->color_space == IM_GRAY) + { + imbyte* map = (imbyte*)image->data[0]; + for (i = 0; i < image->count; i++) + histo[*map++]++; + } + else if (image->color_space == IM_MAP || image->color_space == IM_BINARY) + { + imbyte* map = (imbyte*)image->data[0]; + imbyte gray_map[256], r, g, b; + + for (i = 0; i < image->palette_count; i++) + { + imColorDecode(&r, &g, &b, image->palette[i]); + gray_map[i] = (imbyte)((299*r + 587*g + 114*b) / 1000); + } + + for (i = 0; i < image->count; i++) + { + int index = *map++; + histo[gray_map[index]]++; + } + } + else + { + imbyte gray; + imbyte* r = (imbyte*)image->data[0]; + imbyte* g = (imbyte*)image->data[1]; + imbyte* b = (imbyte*)image->data[2]; + for (i = 0; i < image->count; i++) + { + gray = (imbyte)((299*(*r++) + 587*(*g++) + 114*(*b++)) / 1000); + histo[gray]++; + } + } + + if (cumulative) + { + /* make cumulative histogram */ + for (i = 1; i < 256; i++) + histo[i] += histo[i-1]; + } +} + +template +static void DoStats(T* data, int count, imStats* stats) +{ + memset(stats, 0, sizeof(imStats)); + + stats->min = (float)data[0]; + stats->max = (float)data[0]; + + for (int i = 0; i < count; i++) + { + if (data[i] < stats->min) + stats->min = (float)data[i]; + + if (data[i] > stats->max) + stats->max = (float)data[i]; + + if (data[i] > 0) + stats->positive++; + + if (data[i] < 0) + stats->negative++; + + if (data[i] == 0) + stats->zeros++; + + stats->mean += (float)data[i]; + stats->stddev += ((float)data[i])*((float)data[i]); + } + + stats->mean /= float(count); + stats->stddev = (float)sqrt((stats->stddev - count * stats->mean*stats->mean)/(count-1.0)); +} + +void imCalcImageStatistics(const imImage* image, imStats* stats) +{ + int count = image->width * image->height; + + for (int i = 0; i < image->depth; i++) + { + switch(image->data_type) + { + case IM_BYTE: + DoStats((imbyte*)image->data[i], count, &stats[i]); + break; + case IM_USHORT: + DoStats((imushort*)image->data[i], count, &stats[i]); + break; + case IM_INT: + DoStats((int*)image->data[i], count, &stats[i]); + break; + case IM_FLOAT: + DoStats((float*)image->data[i], count, &stats[i]); + break; + } + } +} + +void imCalcHistogramStatistics(const imImage* image, imStats* stats) +{ + int image_size = image->width * image->height; + unsigned long histo[256]; + + for (int d = 0; d < image->depth; d++) + { + imCalcHistogram((imbyte*)image->data[d], image_size, histo, 0); + DoStats((unsigned long*)histo, 256, &stats[d]); + } +} + +void imCalcHistoImageStatistics(const imImage* image, int* median, int* mode) +{ + unsigned long histo[256]; + + for (int d = 0; d < image->depth; d++) + { + int i; + imCalcHistogram((imbyte*)image->data[d], image->count, histo, 0); + + unsigned long half = image->count/2; + unsigned long count = histo[0]; + for (i = 1; i < 256; i++) + { + if (count > half) + { + median[d] = i-1; + break; + } + + count += histo[i]; + } + + unsigned long max = histo[0]; + for (i = 1; i < 256; i++) + { + if (max < histo[i]) + max = histo[i]; + } + + int found_mode = 0; + for (i = 0; i < 256; i++) + { + if (histo[i] == max) + { + if (found_mode) + { + mode[d] = -1; + break; + } + + mode[d] = i; + found_mode = 1; + } + } + } +} + +float imCalcSNR(const imImage* image, const imImage* noise_image) +{ + imStats stats[3]; + imCalcImageStatistics((imImage*)image, stats); + + imStats noise_stats[3]; + imCalcImageStatistics((imImage*)noise_image, noise_stats); + + if (image->color_space == IM_RGB) + { + noise_stats[0].stddev += noise_stats[1].stddev; + noise_stats[0].stddev += noise_stats[2].stddev; + noise_stats[0].stddev /= 3; + stats[0].stddev += stats[1].stddev; + stats[0].stddev += stats[2].stddev; + stats[0].stddev /= 3; + } + + if (noise_stats[0].stddev == 0) + return 0; + + return float(20.*log10(stats[0].stddev / noise_stats[0].stddev)); +} + +template +static float DoRMSOp(T *map1, T *map2, int count) +{ + float rmserror = 0.0f; + float diff; + + for (int i = 0; i < count; i++) + { + diff = float(map1[i] - map2[i]); + rmserror += diff * diff; + } + + return rmserror; +} + +float imCalcRMSError(const imImage* image1, const imImage* image2) +{ + float rmserror = 0.0f; + + int count = image1->count*image1->depth; + + switch(image1->data_type) + { + case IM_BYTE: + rmserror = DoRMSOp((imbyte*)image1->data[0], (imbyte*)image2->data[0], count); + break; + case IM_USHORT: + rmserror = DoRMSOp((imushort*)image1->data[0], (imushort*)image2->data[0], count); + break; + case IM_INT: + rmserror = DoRMSOp((int*)image1->data[0], (int*)image2->data[0], count); + break; + case IM_FLOAT: + rmserror = DoRMSOp((float*)image1->data[0], (float*)image2->data[0], count); + break; + case IM_CFLOAT: + rmserror = DoRMSOp((float*)image1->data[0], (float*)image2->data[0], 2*count); + break; + } + + rmserror = float(sqrt(rmserror / float((count * image1->depth)))); + + return rmserror; +} + diff --git a/im/src/process/im_threshold.cpp b/im/src/process/im_threshold.cpp new file mode 100755 index 0000000..4af72ee --- /dev/null +++ b/im/src/process/im_threshold.cpp @@ -0,0 +1,391 @@ +/** \file + * \brief Threshold Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_threshold.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include + +#include "im_process_pon.h" +#include "im_process_ana.h" + +#include +#include +#include +#include +#include + + +void imProcessSliceThreshold(const imImage* src_image, imImage* dst_image, int start_level, int end_level) +{ + float params[3]; + params[0] = (float)start_level; + params[1] = (float)end_level; + params[2] = (float)1; /* binarize 0-255 */ + imProcessToneGamut(src_image, dst_image, IM_GAMUT_SLICE, params); + imImageMakeBinary(dst_image); /* this compensates the returned values in IM_GAMUT_SLICE */ +} + +void imProcessThresholdByDiff(const imImage* image1, const imImage* image2, imImage* NewImage) +{ + imbyte *src_map1 = (imbyte*)image1->data[0]; + imbyte *src_map2 = (imbyte*)image2->data[0]; + imbyte *dst_map = (imbyte*)NewImage->data[0]; + int size = image1->count; + + for (int i = 0; i < size; i++) + { + if (*src_map1++ <= *src_map2++) + *dst_map++ = 0; + else + *dst_map++ = 1; + } +} + +template +static void doThreshold(T *src_map, imbyte *dst_map, int count, int level, int value) +{ + for (int i = 0; i < count; i++) + { + if (*src_map++ <= level) + *dst_map++ = 0; + else + *dst_map++ = (imbyte)value; + } +} + +void imProcessThreshold(const imImage* src_image, imImage* dst_image, int level, int value) +{ + switch(src_image->data_type) + { + case IM_BYTE: + doThreshold((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], + src_image->count, level, value); + break; + case IM_USHORT: + doThreshold((imushort*)src_image->data[0], (imbyte*)dst_image->data[0], + src_image->count, level, value); + break; + case IM_INT: + doThreshold((int*)src_image->data[0], (imbyte*)dst_image->data[0], + src_image->count, level, value); + break; + } +} + +static int compare_int(const void *elem1, const void *elem2) +{ + int* v1 = (int*)elem1; + int* v2 = (int*)elem2; + + if (*v1 < *v2) + return -1; + + if (*v1 > *v2) + return 1; + + return 0; +} + +static int thresUniErr(unsigned char* band, int width, int height) +{ + int x, y, i, bottom, top, ant2x2, maks1, maks2, maks4, t; + int xsize, ysize, offset1, offset2; + double a, b, c, phi; + int g[4], tab1[256], tab2[256], tab4[256]; + + memset(tab1, 0, sizeof(int)*256); + memset(tab2, 0, sizeof(int)*256); + memset(tab4, 0, sizeof(int)*256); + + xsize = width; + ysize = height; + + if (xsize%2 != 0) + xsize--; + + if (ysize%2 != 0) + ysize--; + + /* examine all 2x2 neighborhoods */ + + for (y=0; y=0; i--) + { + tab1[i] += tab1[i+1]; + tab2[i] += tab2[i+1]; + tab4[i] += tab4[i+1]; + } + + /* Tables are ready, find threshold */ + bottom = 0; top = 255; + ant2x2 = (xsize/2)*(ysize/2); + maks1 = tab1[0]; /* = ant2x2 * 4; */ + maks2 = tab2[0]; /* = ant2x2 * 6; */ + maks4 = tab4[0]; /* = ant2x2; */ + + /* binary search */ + t = 0; + while (bottom != top-1) + { + t = (int) ((bottom+top)/2); + + /* Calculate probabilities */ + a = (double) tab1[t+1]/maks1; + b = (double) tab2[t+1]/maks2; + c = (double) tab4[t+1]/maks4; + + phi = sqrt((b*b - c) / (a*a - b)); + + if (phi> 1) + bottom = t; + else + top = t; + } + + return t; +} + +int imProcessUniformErrThreshold(const imImage* image, imImage* NewImage) +{ + int level = thresUniErr((imbyte*)image->data[0], image->width, image->height); + imProcessThreshold(image, NewImage, level, 1); + return level; +} + +static void do_dither_error(imbyte* data1, imbyte* data2, int size, int t, int value) +{ + int i, error; + float scale = (float)(t/(255.0-t)); + + error = 0; /* always in [-127,127] */ + + for (i = 0; i < size; i++) + { + if ((int)(*data1 + error) > t) + { + error -= (int)(((int)255 - (int)*data1++)*scale); + *data2++ = (imbyte)value; + } + else + { + error += (int)*data1++; + *data2++ = (imbyte)0; + } + } +} + +void imProcessDifusionErrThreshold(const imImage* image, imImage* NewImage, int level) +{ + int value = image->depth > 1? 255: 1; + int size = image->width * image->height; + for (int i = 0; i < image->depth; i++) + { + do_dither_error((imbyte*)image->data[i], (imbyte*)NewImage->data[i], size, level, value); + } +} + +int imProcessPercentThreshold(const imImage* image, imImage* NewImage, float percent) +{ + unsigned long histo[256], cut; + + cut = (int)((image->width * image->height * percent)/100.); + + imCalcHistogram((imbyte*)image->data[0], image->width * image->height, histo, 1); + + int i; + for (i = 0; i < 256; i++) + { + if (histo[i] > cut) + break; + } + + int level = (i==0? 0: i==256? 254: i-1); + + imProcessThreshold(image, NewImage, level, 1); + return level; +} + +static int MaximizeDiscriminantFunction(double * p) +{ + double mi_255 = 0; + int k; + for (k=0; k<256; k++) + mi_255 += k*p[k]; + + int index = 0; + double max = 0; + double mi_k = 0; + double w_k = 0; + double value; + for (k=0; k<256; k++) + { + mi_k += k*p[k]; + w_k += p[k]; + value = ((w_k == 0) || (w_k == 1))? -1 : ((mi_255*w_k - mi_k)*(mi_255*w_k - mi_k))/(w_k*(1-w_k)); + if (value >= max) + { + index = k; + max = value; + } + } + + return index; +} + +static unsigned char Otsu(const imImage *image) +{ + unsigned long histo[256]; + imCalcHistogram((imbyte*)image->data[0], image->count, histo, 0); + + double totalPixels = image->count; + double p[256]; + for (int i=0; i<256; i++) + p[i] = histo[i]/totalPixels; + + return (unsigned char)MaximizeDiscriminantFunction(p); +} + +int imProcessOtsuThreshold(const imImage* image, imImage* NewImage) +{ + int level = Otsu(image); + imProcessThreshold(image, NewImage, level, 1); + return level; +} + +int imProcessMinMaxThreshold(const imImage* image, imImage* NewImage) +{ + imStats stats; + imCalcImageStatistics(image, &stats); + int level = (int)((stats.max - stats.min)/2.0f); + imProcessThreshold(image, NewImage, level, 1); + return level; +} + +void imProcessHysteresisThresEstimate(const imImage* image, int *low_thres, int *high_thres) +{ + unsigned long hist[256]; + imCalcHistogram((imbyte*)image->data[0], image->count, hist, 0); + + /* The high threshold should be > 80 or 90% of the pixels */ + unsigned long cut = (int)(0.1*image->count); + + int k = 255; + unsigned long count = hist[255]; + while (count < cut) + { + k--; + count += hist[k]; + } + *high_thres = k; + + k=0; + while (hist[k]==0) k++; + + *low_thres = (int)((*high_thres + k)/2.0) + k; +} + +void imProcessHysteresisThreshold(const imImage* image, imImage* NewImage, int low_thres, int high_thres) +{ + imbyte *src_map = (imbyte*)image->data[0]; + imbyte *dst_map = (imbyte*)NewImage->data[0]; + int i, j, size = image->count; + + for (i = 0; i < size; i++) + { + if (*src_map > high_thres) + *dst_map++ = 1; + else if (*src_map > low_thres) + *dst_map++ = 2; // mark for future replace + else + *dst_map++ = 0; + + src_map++; + } + + // now loop multiple times until there is no "2"s or no one was changed + dst_map = (imbyte*)NewImage->data[0]; + int changed = 1; + while (changed) + { + changed = 0; + for (j=1; jheight-1; j++) + { + for (i=1; iwidth-1; i++) + { + int offset = i+j*image->width; + if (dst_map[offset] == 2) + { + // if there is an edge neighbor mark this as edge too + if (dst_map[offset+1] == 1 || dst_map[offset-1] == 1 || + dst_map[offset+image->width] == 1 || dst_map[offset-image->width] == 1 || + dst_map[offset+image->width-1] == 1 || dst_map[offset+image->width+1] == 1 || + dst_map[offset-image->width-1] == 1 || dst_map[offset-image->width+1] == 1) + { + dst_map[offset] = 1; + changed = 1; + } + } + } + } + } + + // Clear the remaining "2"s + dst_map = (imbyte*)NewImage->data[0]; + for (i = 0; i < size; i++) + { + if (*dst_map == 2) + *dst_map = 0; + dst_map++; + } +} + +void imProcessLocalMaxThresEstimate(const imImage* image, int *thres) +{ + unsigned long hist[256]; + imCalcHistogram((imbyte*)image->data[0], image->count, hist, 0); + + int high_count = 0; + int index = 255; + while (high_count < 10 && index > 0) + { + if (hist[index] != 0) + high_count++; + + index--; + } + *thres = index+1; +} + diff --git a/im/src/process/im_tonegamut.cpp b/im/src/process/im_tonegamut.cpp new file mode 100755 index 0000000..cf63350 --- /dev/null +++ b/im/src/process/im_tonegamut.cpp @@ -0,0 +1,322 @@ +/** \file + * \brief Tone Gamut Operations + * + * See Copyright Notice in im_lib.h + * $Id: im_tonegamut.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + */ + + +#include +#include +#include + +#include "im_process_pon.h" + +#include +#include +#include +#include +#include + + +template +static inline T line_op(const T& v, const T& min, const T& max, const float& a, const float& b) +{ + float r = v * a + b; + if (r > (float)max) return max; + if (r < (float)min) return min; + return (T)r; +} + +template +static inline T normal_op(const T& v, const T& min, const T& range) +{ + return (T)(float(v - min) / float(range)); +} + +template +static inline T zerostart_op(const T& v, const T& min) +{ + return (T)(v - min); +} + +template +static inline float invert_op(const T& v, const T& min, const T& range) +{ + return 1.0f - float(v - min) / float(range); +} + +template +static inline T solarize_op(const T& v, const T& level, const float& A, const float& B) +{ + if (v > level) + return (T)(v * A + B); + else + return v; +} + +template +static inline T slice_op(const T& v, const T& min, const T& max, const T& start, const T& end, int bin) +{ + if (v < start || v > end) + return min; + else + { + if (bin) + return max; + else + return v; + } +} + +template +static inline T tonecrop_op(const T& v, const T& start, const T& end) +{ + if (v < start) + return start; + if (v > end) + return end; + else + return v; +} + +template +static inline T expand_op(const T& v, const T& min, const T& max, const T& start, const float& norm) +{ + float r = (v - start)*norm + min; + if (r > (float)max) return max; + if (r < (float)min) return min; + return (T)r; +} + +template +static inline float norm_pow_op(const T& v, const T& min, const T& range, const float& gamma) +{ + return (float)pow(float(v - min) / float(range), gamma); +} + +template +static inline float norm_log_op(const T& v, const T& min, const T& range, const float& norm, const float& K) +{ + return (float)(log(K * float(v - min) / float(range) + 1) / norm); +} + +template +static inline float norm_exp_op(const T& v, const T& min, const T& range, const float& norm, const float& K) +{ + return (float)((exp(K * float(v - min) / float(range)) - 1) / norm); +} + +template +static void DoNormalizedUnaryOp(T *map, T *new_map, int count, int op, float *args) +{ + int i; + T min, max, range; + + int size_of = sizeof(imbyte); + if (sizeof(T) == size_of) + { + min = 0; + max = 255; + } + else + { + imMinMax(map, count, min, max); + + if (min == max) + { + max = min + 1; + + if (min != 0) + min = min - 1; + } + } + + range = max-min; + + switch(op) + { + case IM_GAMUT_NORMALIZE: + { + if (min >= 0 && max <= 1) + { + for (i = 0; i < count; i++) + new_map[i] = (T)map[i]; + } + else + { + for (i = 0; i < count; i++) + new_map[i] = normal_op(map[i], min, range); + } + break; + } + case IM_GAMUT_INVERT: + for (i = 0; i < count; i++) + new_map[i] = (T)(invert_op(map[i], min, range)*range + min); + break; + case IM_GAMUT_ZEROSTART: + for (i = 0; i < count; i++) + new_map[i] = (T)zerostart_op(map[i], min); + break; + case IM_GAMUT_SOLARIZE: + { + T level = (T)(((100 - args[0]) * range) / 100.0f + min); + float A = float(level - min) / float(level - max); + float B = float(level * range) / float(max - level); + for (i = 0; i < count; i++) + new_map[i] = solarize_op(map[i], level, A, B); + break; + } + case IM_GAMUT_POW: + for (i = 0; i < count; i++) + new_map[i] = (T)(norm_pow_op(map[i], min, range, args[0])*range + min); + break; + case IM_GAMUT_LOG: + { + float norm = float(log(args[0] + 1)); + for (i = 0; i < count; i++) + new_map[i] = (T)(norm_log_op(map[i], min, range, norm, args[0])*range + min); + break; + } + case IM_GAMUT_EXP: + { + float norm = float(exp(args[0]) - 1); + for (i = 0; i < count; i++) + new_map[i] = (T)(norm_exp_op(map[i], min, range, norm, args[0])*range + min); + break; + } + case IM_GAMUT_SLICE: + { + if (args[0] > args[1]) { float tmp = args[1]; args[1] = args[0]; args[0] = tmp; } + if (args[1] > max) args[1] = (float)max; + if (args[0] < min) args[0] = (float)min; + for (i = 0; i < count; i++) + new_map[i] = slice_op(map[i], min, max, (T)args[0], (T)args[1], (int)args[2]); + break; + } + case IM_GAMUT_CROP: + { + if (args[0] > args[1]) { float tmp = args[1]; args[1] = args[0]; args[0] = tmp; } + if (args[1] > max) args[1] = (float)max; + if (args[0] < min) args[0] = (float)min; + for (i = 0; i < count; i++) + new_map[i] = tonecrop_op(map[i], (T)args[0], (T)args[1]); + break; + } + case IM_GAMUT_EXPAND: + { + if (args[0] > args[1]) { float tmp = args[1]; args[1] = args[0]; args[0] = tmp; } + if (args[1] > max) args[1] = (float)max; + if (args[0] < min) args[0] = (float)min; + float norm = float(max - min)/(args[1] - args[0]); + for (i = 0; i < count; i++) + new_map[i] = expand_op(map[i], min, max, (T)args[0], norm); + break; + } + case IM_GAMUT_BRIGHTCONT: + { + float bs = (args[0] * range) / 100.0f; + float a = (float)tan((45+args[1]*0.449999)/57.2957795); + float b = bs + (float)range*(1.0f - a)/2.0f; + for (i = 0; i < count; i++) + new_map[i] = line_op(map[i], min, max, a, b); + break; + } + } +} + +void imProcessToneGamut(const imImage* src_image, imImage* dst_image, int op, float *args) +{ + int count = src_image->count*src_image->depth; + + switch(src_image->data_type) + { + case IM_BYTE: + DoNormalizedUnaryOp((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], count, op, args); + break; + case IM_USHORT: + DoNormalizedUnaryOp((imushort*)src_image->data[0], (imushort*)dst_image->data[0], count, op, args); + break; + case IM_INT: + DoNormalizedUnaryOp((int*)src_image->data[0], (int*)dst_image->data[0], count, op, args); + break; + case IM_FLOAT: + DoNormalizedUnaryOp((float*)src_image->data[0], (float*)dst_image->data[0], count, op, args); + break; + } +} + +void imProcessUnNormalize(const imImage* image, imImage* NewImage) +{ + int count = image->count*image->depth; + + float* map = (float*)image->data[0]; + imbyte* new_map = (imbyte*)NewImage->data[0]; + + for (int i = 0; i < count; i++) + { + if (map[i] > 1) + new_map[i] = (imbyte)255; + else if (map[i] < 0) + new_map[i] = (imbyte)0; + else + new_map[i] = (imbyte)(map[i]*255); + } +} + +template +static void DoDirectConv(T* map, imbyte* new_map, int count) +{ + for (int i = 0; i < count; i++) + { + if (map[i] > 255) + new_map[i] = (imbyte)255; + else if (map[i] < 0) + new_map[i] = (imbyte)0; + else + new_map[i] = (imbyte)(map[i]); + } +} + +void imProcessDirectConv(const imImage* image, imImage* NewImage) +{ + int count = image->count*image->depth; + + switch(image->data_type) + { + case IM_USHORT: + DoDirectConv((imushort*)image->data[0], (imbyte*)NewImage->data[0], count); + break; + case IM_INT: + DoDirectConv((int*)image->data[0], (imbyte*)NewImage->data[0], count); + break; + case IM_FLOAT: + DoDirectConv((float*)image->data[0], (imbyte*)NewImage->data[0], count); + break; + } +} + +void imProcessNegative(const imImage* src_image, imImage* dst_image) +{ + if (src_image->color_space == IM_MAP) + { + unsigned char r, g, b; + for (int i = 0; i < src_image->palette_count; i++) + { + imColorDecode(&r, &g, &b, src_image->palette[i]); + r = ~r; g = ~g; b = ~b; + dst_image->palette[i] = imColorEncode(r, g, b); + } + + imImageCopyData(src_image, dst_image); + } + else if (src_image->color_space == IM_BINARY) + { + imbyte* map1 = (imbyte*)src_image->data[0]; + imbyte* map = (imbyte*)dst_image->data[0]; + for (int i = 0; i < src_image->count; i++) + map[i] = map1[i]? 0: 1; + } + else + imProcessToneGamut(src_image, dst_image, IM_GAMUT_INVERT, NULL); +} diff --git a/im/src/tecmake_compact.mak b/im/src/tecmake_compact.mak new file mode 100755 index 0000000..d4fe0af --- /dev/null +++ b/im/src/tecmake_compact.mak @@ -0,0 +1,1170 @@ +#-------------------------------------------------------------------------# +#- Tecmake (Compact Version) -# +#- Generic Makefile to build applications and libraries at TeCGraf -# +#- The user makefile usually has the name "config.mak". -# +#-------------------------------------------------------------------------# + +# Tecmake Version +VERSION = 3.19 + +# First target +.PHONY: build +build: tecmake + + +#---------------------------------# +# System Variables Definitions + +# Base Defintions +TEC_SYSNAME:=$(shell uname -s) +TEC_SYSVERSION:=$(shell uname -r|cut -f1 -d.) +TEC_SYSMINOR:=$(shell uname -r|cut -f2 -d.) +TEC_SYSARCH:=$(shell uname -m) + +# Fixes +ifeq ($(TEC_SYSNAME), SunOS) + TEC_SYSARCH:=$(shell uname -p) +endif +ifeq ($(TEC_SYSNAME), IRIX) + TEC_SYSARCH:=$(shell uname -p) +endif +ifeq ($(TEC_SYSNAME), FreeBSD) + TEC_SYSMINOR:=$(shell uname -r|cut -f2 -d.|cut -f1 -d-) +endif +ifeq ($(TEC_SYSNAME), AIX) + TEC_SYSVERSION:=$(shell uname -v) + TEC_SYSMINOR:=$(shell uname -r) + TEC_SYSARCH:=ppc +endif +ifeq ($(TEC_SYSNAME), Darwin) + TEC_SYSARCH:=$(shell uname -p) +endif + +ifeq ($(TEC_SYSARCH), powerpc) + TEC_SYSARCH:=ppc +endif +ifeq ($(TEC_SYSARCH), i686) + TEC_SYSARCH:=x86 +endif +ifeq ($(TEC_SYSARCH), i386) + TEC_SYSARCH:=x86 +endif +ifeq ($(TEC_SYSARCH), x86_64) + TEC_SYSARCH:=x64 +endif + +# Compose +TEC_SYSRELEASE:=$(TEC_SYSVERSION).$(TEC_SYSMINOR) +TEC_UNAME:=$(TEC_SYSNAME)$(TEC_SYSVERSION)$(TEC_SYSMINOR) + +# Linux 2.4 and GCC 3.x +ifeq ($(TEC_UNAME), Linux24) + GCCVER:=$(shell gcc -dumpversion|cut -f1 -d.) + ifeq ($(GCCVER), 3) + TEC_UNAME:=$(TEC_UNAME)g3 + endif +endif + +# Linux 2.6 and GCC 4.x +ifeq ($(TEC_UNAME), Linux26) + GCCVER:=$(shell gcc -dumpversion|cut -f1 -d.) + ifeq ($(GCCVER), 4) + TEC_UNAME:=$(TEC_UNAME)g4 + endif +endif + +# Linux and PowerPC +ifeq ($(TEC_SYSNAME), Linux) + ifeq ($(TEC_SYSARCH), ppc) + TEC_UNAME:=$(TEC_UNAME)ppc + endif +endif + +# 64-bits Linux +ifeq ($(TEC_SYSARCH), x64) + BUILD_64=Yes + TEC_UNAME:=$(TEC_UNAME)_64 +endif + +ifeq ($(TEC_SYSARCH), ia64) + BUILD_64=Yes + TEC_UNAME:=$(TEC_UNAME)_ia64 +endif + +# Solaris and Intel +ifeq ($(TEC_SYSNAME), SunOS) + ifeq ($(TEC_SYSARCH) , x86) + TEC_UNAME:=$(TEC_UNAME)x86 + endif +endif + +# Darwin and Intel +ifeq ($(TEC_SYSNAME), Darwin) +ifeq ($(TEC_SYSARCH), x86) + TEC_UNAME:=$(TEC_UNAME)x86 + endif +endif + +# System Info +.PHONY: sysinfo +sysinfo: + @echo ''; echo 'Tecmake - System Info' + @echo 'TEC_SYSNAME = $(TEC_SYSNAME)' + @echo 'TEC_SYSVERSION = $(TEC_SYSVERSION)' + @echo 'TEC_SYSMINOR = $(TEC_SYSMINOR)' + @echo 'TEC_SYSARCH = $(TEC_SYSARCH)' + @echo 'TEC_UNAME = $(TEC_UNAME)'; echo '' + +#---------------------------------# +# Directories Definitions +PROJDIR = .. +SRCDIR = . +OBJROOT = $(PROJDIR)/obj + + +#---------------------------------# +# Byte Order and Word Size + +ifneq ($(findstring x86, $(TEC_SYSARCH)), ) + TEC_BYTEORDER = TEC_LITTLEENDIAN +else +ifeq ($(TEC_SYSARCH), arm) + TEC_BYTEORDER = TEC_LITTLEENDIAN +else + TEC_BYTEORDER = TEC_BIGENDIAN +endif +endif + +ifeq ($(TEC_SYSARCH), x64) + TEC_WORDSIZE = TEC_64 +else +ifdef BUILD_64 + TEC_WORDSIZE = TEC_64 +else + TEC_WORDSIZE = TEC_32 +endif +endif + +# Itanium Exception +ifeq ($(TEC_SYSARCH), ia64) + TEC_BYTEORDER = TEC_LITTLEENDIAN + TEC_WORDSIZE = TEC_64 +endif + + +#---------------------------------# +# Compilation Flags +STDFLAGS := -Wall +STDDEFS := -DTEC_UNAME=$(TEC_UNAME) -DTEC_SYSNAME=$(TEC_SYSNAME) -D$(TEC_SYSNAME)=$(TEC_SYSRELEASE) -D$(TEC_BYTEORDER) -D$(TEC_WORDSIZE) -DFUNCPROTO=15 +STDINCS := +OPTFLAGS := -O2 +STDLFLAGS := r +DEBUGFLAGS := -g +STDLDFLAGS := -shared +DLIBEXT := so + +ifneq ($(findstring Linux, $(TEC_UNAME)), ) + GTK_DEFAULT = Yes +endif +ifneq ($(findstring Darwin, $(TEC_UNAME)), ) + GTK_DEFAULT = Yes +endif +ifneq ($(findstring FreeBSD, $(TEC_UNAME)), ) + GTK_DEFAULT = Yes +endif +ifneq ($(findstring Linux24, $(TEC_UNAME)), ) + GTK_DEFAULT := +endif + +#---------------------------------# +# Build Tools + +CC := $(TEC_TOOLCHAIN)gcc +CPPC := $(TEC_TOOLCHAIN)g++ +FF := $(TEC_TOOLCHAIN)g77 +RANLIB := $(TEC_TOOLCHAIN)ranlib +AR := $(TEC_TOOLCHAIN)ar +DEBUGGER := $(TEC_TOOLCHAIN)gdb +RCC := $(TEC_TOOLCHAIN)windres +LD := $(TEC_TOOLCHAIN)gcc + +ifeq ($(TEC_UNAME), gcc2) + ifdef USE_GCC_2 + CC := $(CC)-2 + CPPC := $(CPPC)-2 + FF := $(FF)-2 + endif +endif + + +#---------------------------------# +# User Configuration File + +MAKENAME = config.mak + +ifdef MF + MAKENAME = $(MF).mak +endif + +################### +include $(MAKENAME) +################### + + +#---------------------------------# +# Definitions of public variables + +ifdef LIBNAME + TARGETNAME = $(LIBNAME) + MAKETYPE = LIB +else + TARGETNAME = $(APPNAME) + MAKETYPE = APP +endif + +ifndef TARGETNAME + $(error LIBNAME nor APPNAME defined in $(MAKENAME)) +endif + +PROJNAME ?= $(TARGETNAME) + +DEPEND := $(TARGETNAME).dep + +ifdef DEPENDDIR + DEPEND := $(DEPENDDIR)/$(TARGETNAME).dep.$(TEC_UNAME) +endif + +SRCLUADIR ?= $(SRCDIR) +LOHDIR ?= $(SRCLUADIR) + +ifeq ($(MAKETYPE), APP) + TARGETROOT ?= $(PROJDIR)/bin +else + TARGETROOT ?= $(PROJDIR)/lib +endif + +ifneq ($(PROJNAME), $(TARGETNAME)) + OBJROOT := $(OBJROOT)/$(TARGETNAME) +endif + +ifdef DBG + STDFLAGS += $(DEBUGFLAGS) + STDDEFS += -DDEBUG +else + STDDEFS += -DNDEBUG + ifdef OPT + STDFLAGS += $(OPTFLAGS) + ifeq ($(findstring gcc, $(TEC_UNAME)), ) + STRIP ?= Yes + endif + endif +endif + +ifdef BUILD_64 + ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + USE_CC = Yes + BUILD_64_DIR = Yes + endif + ifneq ($(findstring AIX, $(TEC_UNAME)), ) + USE_CC = Yes + BUILD_64_DIR = Yes + endif + ifneq ($(findstring IRIX, $(TEC_UNAME)), ) + USE_CC = Yes + BUILD_64_DIR = Yes + endif +endif + +ifdef USE_CC + CC := cc + CPPC := CC + STDFLAGS = + ifdef USE_CC_DIR + TEC_UNAME := $(TEC_UNAME)cc + endif +endif + +ifdef BUILD_64 + ifdef BUILD_64_DIR + TEC_UNAME := $(TEC_UNAME)_64 + endif +endif + +ifneq ($(findstring gcc, $(TEC_UNAME)), ) + ifeq ($(MAKETYPE), APP) + TEC_UNAME_DIR ?= $(TEC_SYSNAME) + endif +endif + +TEC_UNAME_DIR ?= $(TEC_UNAME) +ifdef DBG + ifdef DBG_DIR + TEC_UNAME_DIR := $(TEC_UNAME_DIR)d + endif +endif + +OBJDIR := $(OBJROOT)/$(TEC_UNAME_DIR) +TARGETDIR := $(TARGETROOT)/$(TEC_UNAME_DIR) + +# Change linker if any C++ source +ifndef LINKER + ifneq "$(findstring .cpp, $(SRC))" "" + LINKER := $(CPPC) + else + LINKER := $(CC) + endif +endif + + +#---------------------------------# +# LO and LOH Suffix + +ifeq ($(TEC_BYTEORDER), TEC_BIGENDIAN) + ifeq ($(TEC_WORDSIZE), TEC_64) + LO_SUFFIX ?= _be64 + else + LO_SUFFIX ?= _be32 + endif +else + ifeq ($(TEC_WORDSIZE), TEC_64) + LO_SUFFIX ?= _le64 + else + LO_SUFFIX ?= + endif +endif + + +#---------------------------------# +# Platform specific variables + +# Definicoes para o X11 +X11_LIBS := Xmu Xt Xext X11 +#X11_LIB := +#X11_INC := #include + +# Definicoes para o OpenGL +OPENGL_LIBS := GLU GL +#OPENGL_LIB := +#OPENGL_INC := #include and possibly +MOTIFGL_LIB := GLw #include + +# Definicoes para o Motif +#MOTIF_LIB := +#MOTIF_INC := #include + +# Definicoes para o GLUT +#GLUT_LIB := +#GLUT_INC := + + +ifneq ($(findstring cygw, $(TEC_UNAME)), ) + NO_DYNAMIC ?= Yes + ifdef BUILD_64 + X11_LIB := /usr/X11R6/lib64 + else + X11_LIB := /usr/X11R6/lib + endif + X11_INC := /usr/X11R6/include + MOTIFGL_LIB := +endif + +ifneq ($(findstring Linux, $(TEC_UNAME)), ) + ifdef BUILD_64 + ifeq ($(TEC_SYSARCH), ia64) + STDFLAGS += -fPIC + X11_LIB := /usr/X11R6/lib + else + STDFLAGS += -m64 -fPIC + X11_LIB := /usr/X11R6/lib64 + endif + else + X11_LIB := /usr/X11R6/lib + endif + X11_INC := /usr/X11R6/include + MOTIFGL_LIB := +endif + +ifneq ($(findstring IRIX, $(TEC_UNAME)), ) # any IRIX + LD = ld + STDLDFLAGS := -elf -shared -rdata_shared -soname lib$(TARGETNAME).so + RANLIB := /bin/true + X11_LIBS := Xmu Xt X11 + ifdef BUILD_64 + ifdef USE_CC + STDFLAGS += -64 -KPIC + STDLDFLAGS += -64 + LINKER += -64 + endif + X11_LIB := /usr/lib64 + MOTIF_LIB := /usr/Motif-2.1/lib64 + else + X11_LIB := /usr/lib32 + MOTIF_LIB := /usr/Motif-2.1/lib32 + endif + MOTIF_INC = /usr/Motif-2.1/include +endif + +ifneq ($(findstring AIX, $(TEC_UNAME)), ) + NO_DYNAMIC ?= Yes + ifdef BUILD_64 + ifdef USE_CC + STDFLAGS += -q64 # to compilers C and C++ + STDLFLAGS := -X64 $(STDLFLAGS) # to librarian + STDLDFLAGS += -64 + LINKER += -q64 # to linker + endif + endif +endif + +ifneq ($(findstring HP-UX, $(TEC_UNAME)), ) + NO_DYNAMIC ?= Yes + MOTIF_INC := /usr/include/Motif2.1 + X11_LIBS := Xt Xext X11 + OPENGL_LIB := /opt/graphics/OpenGL/lib + OPENGL_INC := /opt/graphics/OpenGL/include + STDDEFS := -DTEC_UNAME=$(TEC_UNAME) -DTEC_SYSNAME=$(TEC_SYSNAME) -D$(TEC_BYTEORDER) -D$(TEC_WORDSIZE) -DFUNCPROTO=15 + CC := aCC + CPPC := aCC + LINKER := aCC +endif + +ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + LD = ld + STDLDFLAGS := -G + X11_INC := /usr/openwin/share/include + X11_LIB := /usr/openwin/lib + MOTIF_INC := /usr/dt/share/include + MOTIF_LIB := /usr/dt/lib + OPENGL_INC := /usr/openwin/share/include/X11 + GLUT_LIB := /usr/local/glut-3.7/lib/glut + GLUT_INC := /usr/local/glut-3.7/include + ifdef BUILD_64 + ifdef USE_CC + STDFLAGS += -xarch=v9 -KPIC + # have to force these PATHs because of a conflict with standard PATHs + STDLDFLAGS += -64 -L/usr/lib/64 -L/usr/ucblib/sparcv9 + LINKER += -xarch=v9 + endif + endif +endif + +ifneq ($(findstring Darwin, $(TEC_UNAME)), ) + X11_LIBS := Xmu Xp Xt Xext X11 + X11_LIB := /usr/X11R6/lib + X11_INC := /usr/X11R6/include + MOTIF_INC := /usr/OpenMotif/include + MOTIF_LIB := /usr/OpenMotif/lib + ifdef BUILD_DYLIB + STDLDFLAGS := -dynamiclib -install_name lib$(TARGETNAME).dylib + DLIBEXT := dylib + else + STDLDFLAGS := -bundle -undefined dynamic_lookup + endif +endif + +ifneq ($(findstring FreeBSD, $(TEC_UNAME)), ) + X11_LIB := /usr/X11R6/lib + X11_INC := /usr/X11R6/include +endif + + +################################ +# Allows an extra configuration file. +ifdef EXTRA_CONFIG +include $(EXTRA_CONFIG) +endif +################################ + + +#---------------------------------# +# Tecgraf Libraries Location +TECTOOLS_HOME ?= ../.. + +IUP ?= $(TECTOOLS_HOME)/iup +CD ?= $(TECTOOLS_HOME)/cd +IM ?= $(TECTOOLS_HOME)/im +LUA ?= $(TECTOOLS_HOME)/lua +LUA51 ?= $(TECTOOLS_HOME)/lua5.1 + + +#---------------------------------# +# Pre-defined libraries + +# Library order: +# user + iupcd + cd + iup + motif + X +# Library path order is the oposite + +ifdef USE_LUA + LUASUFX := + LIBLUASUFX := 3 +endif + +ifdef USE_LUA4 + LUASUFX := 4 + LIBLUASUFX := 4 + override USE_LUA = Yes + LUA := $(LUA4) +endif + +ifdef USE_LUA5 + LUASUFX := 5 + LIBLUASUFX := 5 + override USE_LUA = Yes + LUA := $(LUA5) +endif + +ifdef USE_LUA50 + LUASUFX := 50 + LIBLUASUFX := 5 + override USE_LUA = Yes + LUA := $(LUA50) + NO_LUALIB := Yes +endif + +ifdef USE_LUA51 + LUASUFX := 5.1 + LIBLUASUFX := 51 + override USE_LUA = Yes + LUA := $(LUA51) + NO_LUALIB := Yes +endif + +ifdef USE_IUP3 + override USE_IUP = Yes +endif + +ifdef USE_IUP3BETA + IUP := $(IUP)3 +endif + +ifdef USE_IUPBETA + IUP := $(IUP)/beta +endif + +ifdef USE_CDBETA + CD := $(CD)/beta +endif + +ifdef USE_IMBETA + IM := $(IM)/beta +endif + +ifdef USE_GLUT + override USE_OPENGL = Yes +endif + +ifdef USE_IUPCONTROLS + override USE_CD = Yes + override USE_IUP = Yes + ifdef USE_IUPLUA + ifdef USE_STATIC + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupluacontrols$(LIBLUASUFX).a + else + LIBS += iupluacontrols$(LIBLUASUFX) + endif + override USE_CDLUA = Yes + endif + ifdef USE_STATIC + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupcontrols.a + else + LIBS += iupcontrols + endif +endif + +ifdef USE_IMLUA + override USE_IM = Yes + ifdef USE_STATIC + SLIB += $(IM)/lib/$(TEC_UNAME)/libimlua$(LIBLUASUFX).a + else + LIBS += imlua$(LIBLUASUFX) + endif +endif + +ifdef USE_CDLUA + override USE_CD = Yes + ifdef USE_STATIC + ifdef USE_IUP + ifdef USE_OLDNAMES + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdluaiup$(LIBLUASUFX).a + endif + endif + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdlua$(LIBLUASUFX).a + else + ifdef USE_IUP + ifdef USE_OLDNAMES + LIBS += cdluaiup$(LIBLUASUFX) + endif + endif + LIBS += cdlua$(LIBLUASUFX) + endif +endif + +ifdef USE_IUPLUA + override USE_IUP = Yes + ifdef USE_STATIC + ifdef USE_CD + ifndef USE_OLDNAMES + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupluacd$(LIBLUASUFX).a + endif + endif + ifdef USE_OPENGL + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupluagl$(LIBLUASUFX).a + endif + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiuplua$(LIBLUASUFX).a + else + ifdef USE_CD + ifndef USE_OLDNAMES + LIBS += iupluacd$(LIBLUASUFX) + endif + endif + ifdef USE_OPENGL + LIBS += iupluagl$(LIBLUASUFX) + endif + LIBS += iuplua$(LIBLUASUFX) + endif +endif + +ifdef USE_LUA + LUA_LIB ?= $(LUA)/lib/$(TEC_UNAME) + ifdef USE_STATIC + ifndef NO_LUALIB + SLIB += $(LUA_LIB)/liblualib$(LUASUFX).a + endif + SLIB += $(LUA_LIB)/liblua$(LUASUFX).a + else + ifndef NO_LUALIB + LIBS += lualib$(LUASUFX) + endif + ifndef NO_LUALINK + LIBS += lua$(LUASUFX) + LDIR += $(LUA_LIB) + endif + endif + + LUA_INC ?= $(LUA)/include + INCLUDES += $(LUA_INC) + + LUA_BIN ?= $(LUA)/bin/$(TEC_UNAME) + BIN2C := $(LUA_BIN)/bin2c$(LUASUFX) + LUAC := $(LUA_BIN)/luac$(LUASUFX) + LUABIN := $(LUA_BIN)/lua$(LUASUFX) +endif + +ifdef USE_IUP + IUPSUFX := + ifdef USE_IUP3 + ifdef GTK_DEFAULT + ifdef USE_MOTIF + IUPSUFX := mot + else + override USE_GTK = Yes + endif + else + ifdef USE_GTK + IUPSUFX := gtk + else + override USE_MOTIF = Yes + endif + endif + else + override USE_MOTIF = Yes + endif + ifdef USE_STATIC + ifdef USE_CD + ifndef USE_OLDNAMES + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupcd.a + endif + endif + ifdef USE_OPENGL + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupgl.a + endif + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiup$(IUPSUFX).a + else + ifdef USE_CD + ifndef USE_OLDNAMES + LIBS += iupcd + endif + endif + ifdef USE_OPENGL + LIBS += iupgl + endif + LIBS += iup$(IUPSUFX) + LDIR += $(IUP)/lib/$(TEC_UNAME) + endif + INCLUDES += $(IUP)/include +endif + +ifdef USE_CD + override USE_X11 = Yes + ifdef USE_STATIC + ifdef USE_IUP + ifdef USE_OLDNAMES + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdiup.a + endif + endif + ifdef USE_XRENDER + ifdef USE_OLDNAMES + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdxrender.a + else + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdcontextplus.a + endif + endif + SLIB += $(CD)/lib/$(TEC_UNAME)/libcd.a + ifdef USE_XRENDER + LIBS += Xrender Xft + else + ifndef USE_GTK + ifndef USE_OLDNAMES + # Freetype is included in GTK + SLIB += $(CD)/lib/$(TEC_UNAME)/libfreetype.a + endif + endif + endif + else + ifdef USE_XRENDER + ifdef USE_OLDNAMES + LIBS += cdxrender + else + LIBS += cdcontextplus + endif + endif + LIBS += cd + LDIR += $(CD)/lib/$(TEC_UNAME) + ifdef USE_XRENDER + LIBS += Xrender Xft + else + ifndef USE_GTK + ifndef USE_OLDNAMES + # Freetype is included in GTK + LIBS += freetype + endif + endif + endif + endif + INCLUDES += $(CD)/include +endif + +ifdef USE_IM + ifdef USE_STATIC + SLIB += $(IM)/lib/$(TEC_UNAME)/libim.a + else + LIBS += im + LDIR += $(IM)/lib/$(TEC_UNAME) + endif + INCLUDES += $(IM)/include +endif + +# All except gcc in Windows (Cygwin) +ifeq ($(findstring gcc, $(TEC_UNAME)), ) + +ifdef USE_GLUT + LIBS += glut + LDIR += $(GLUT_LIB) + STDINCS += $(GLUT_INC) +endif + +ifdef USE_OPENGL + override USE_X11 = Yes + ifdef USE_MOTIF + LIBS += $(MOTIFGL_LIB) + endif + LIBS += $(OPENGL_LIBS) + LDIR += $(OPENGL_LIB) + STDINCS += $(OPENGL_INC) +endif + +ifdef USE_MOTIF + override USE_X11 = Yes + LIBS += Xm + LDIR += $(MOTIF_LIB) + STDINCS += $(MOTIF_INC) + ifneq ($(findstring Linux, $(TEC_UNAME)), ) + X11_LIBS := Xpm $(X11_LIBS) + endif + ifneq ($(findstring cygw, $(TEC_UNAME)), ) + X11_LIBS := Xpm $(X11_LIBS) + endif +endif + +ifdef USE_GTK +# ifneq ($(findstring Darwin, $(TEC_UNAME)), ) +# STDINCS += /Library/Frameworks/Gtk.framework/Headers +# STDINCS += /Library/Frameworks/GLib.framework/Headers +# STDINCS += /Library/Frameworks/Cairo.framework/Headers +# LFLAGS += -framework Gtk +# else + ifneq ($(findstring Darwin, $(TEC_UNAME)), ) + GTK_BASE := /sw + LDIR += /sw/lib + LIBS += freetype + else + GTK_BASE := /usr + endif + override USE_X11 = Yes + LIBS += gtk-x11-2.0 gdk-x11-2.0 gdk_pixbuf-2.0 pango-1.0 pangox-1.0 gobject-2.0 gmodule-2.0 glib-2.0 + STDINCS += $(GTK_BASE)/include/atk-1.0 $(GTK_BASE)/include/gtk-2.0 $(GTK_BASE)/include/cairo $(GTK_BASE)/include/pango-1.0 $(GTK_BASE)/include/glib-2.0 + ifeq ($(TEC_SYSARCH), x64) + STDINCS += $(GTK_BASE)/lib64/glib-2.0/include $(GTK_BASE)/lib64/gtk-2.0/include + else + ifeq ($(TEC_SYSARCH), ia64) + STDINCS += $(GTK_BASE)/lib64/glib-2.0/include $(GTK_BASE)/lib64/gtk-2.0/include + else + STDINCS += $(GTK_BASE)/lib/glib-2.0/include $(GTK_BASE)/lib/gtk-2.0/include + endif + endif + ifneq ($(findstring FreeBSD, $(TEC_UNAME)), ) + STDINCS += /lib/X11R6/include/gtk-2.0 + endif +# endif +endif + +ifdef USE_QT + override USE_X11 = Yes + LIBS += QtGui QtCore + QT_BASE_INC := /usr/include/qt4 + STDINCS += $(QT_BASE_INC) $(QT_BASE_INC)/QtCore $(QT_BASE_INC)/QtGui + STDDEFS += -DQT_DLL -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT +endif + +ifdef USE_X11 + LIBS += $(X11_LIBS) + LDIR += $(X11_LIB) + STDINCS += $(X11_INC) +endif + +LIBS += m + +else + # gcc in Windows + NO_DYNAMIC ?= Yes + STDDEFS += -DWIN32 + + ifdef USE_NOCYGWIN + STDFLAGS += -mno-cygwin + endif + + ifdef USE_GLUT + LIBS += glut32 + endif + + ifdef USE_OPENGL + LIBS += opengl32 glu32 glaux + endif + + LIBS += gdi32 winspool comdlg32 comctl32 ole32 + + ifdef USE_GTK + LIBS += gtk-win32-2.0 gdk-win32-2.0 gdk_pixbuf-2.0 pango-1.0 pangowin32-1.0 gobject-2.0 gmodule-2.0 glib-2.0 + #LDIR += $(GTK)/lib + GTK_INC = /usr + STDINCS += $(GTK_INC)/include/atk-1.0 $(GTK_INC)/include/gtk-2.0 $(GTK_INC)/include/cairo $(GTK_INC)/include/pango-1.0 $(GTK_INC)/include/glib-2.0 $(GTK_INC)/lib/glib-2.0/include $(GTK_INC)/lib/gtk-2.0/include + endif + + APPTYPE ?= windows + + ifeq ($(APPTYPE), windows) + LFLAGS += -mwindows + + ifdef USE_NOCYGWIN + LFLAGS += -mno-cygwin + endif + endif +endif + + +#---------------------------------# +# Building compilation flags that are sets + +INCLUDES := $(addprefix -I, $(INCLUDES)) +STDINCS := $(addprefix -I, $(STDINCS)) +EXTRAINCS := $(addprefix -I, $(EXTRAINCS)) +DEFINES := $(addprefix -D, $(DEFINES)) + +LIBS := $(addprefix -l, $(LIBS)) +ifdef LDIR + LDIR := $(addprefix -L, $(LDIR)) +endif + + +#---------------------------------# +# Definitions of private variables + +# Library flags for application and dynamic library linker +LFLAGS += $(LDIR) $(LIBS) +# C compiler flags +CFLAGS = $(FLAGS) $(STDFLAGS) $(INCLUDES) $(STDINCS) $(EXTRAINCS) $(DEFINES) $(STDDEFS) +# C++ compiler flags +CXXFLAGS = $(CPPFLAGS) $(STDFLAGS) $(INCLUDES) $(STDINCS) $(EXTRAINCS) $(DEFINES) $(STDDEFS) + +# Sources with relative path +SOURCES := $(addprefix $(SRCDIR)/, $(SRC)) + +# Target for applications or libraries +ifeq ($(MAKETYPE), APP) + TARGET := $(TARGETDIR)/$(TARGETNAME) +else + ifeq ($(NO_DYNAMIC), Yes) + TARGET := $(TARGETDIR)/lib$(TARGETNAME).a + else + TARGET := $(TARGETDIR)/lib$(TARGETNAME).a $(TARGETDIR)/lib$(TARGETNAME).$(DLIBEXT) + endif +endif + +# OBJ: list of .o, without path +# OBJS: list of .o with relative path +OBJ = $(notdir $(SRC)) +OBJ := $(OBJ:.c=.o) +OBJ := $(OBJ:.cpp=.o) +OBJ := $(OBJ:.cxx=.o) +OBJ := $(OBJ:.cc=.o) +OBJ := $(OBJ:.f=.o) +OBJ := $(OBJ:.for=.o) +OBJ := $(OBJ:.rc=.ro) +OBJS = $(addprefix $(OBJDIR)/, $(OBJ)) + +# LOH: list of .loh, without path +# LOHS: list of .loh, with relative path +LO = $(notdir $(SRCLUA)) +LO := $(LO:.lua=$(LO_SUFFIX).lo) +LOS = $(addprefix $(OBJROOT)/, $(LO)) + +LOH = $(notdir $(SRCLUA)) +LOH := $(LOH:.lua=$(LO_SUFFIX).loh) +LOHS = $(addprefix $(LOHDIR)/, $(LOH)) + +# Construct VPATH variable +P-SRC = $(dir $(SRC)) +P-SRC += $(dir $(SRCLUA)) +VPATH = .:$(foreach dir,$(P-SRC),$(if $(dir)="./",:$(dir))) + + +#---------------------------------# +# Main Rule - Build Everything that it is necessary + +.PHONY: tecmake +ifeq ($(MAKETYPE), APP) + tecmake: print-start directories application scripts +else + ifeq ($(NO_DYNAMIC), Yes) + tecmake: print-start directories static-lib + else + tecmake: print-start directories static-lib dynamic-lib + endif +endif + +.PHONY: print-start +print-start: + @echo ''; echo 'Tecmake - Starting [ $(TARGETNAME):$(TEC_UNAME) ]' + + +#---------------------------------# +# Dynamic Library Build + +.PHONY: dynamic-lib +dynamic-lib: $(TARGETDIR)/lib$(TARGETNAME).$(DLIBEXT) + +$(TARGETDIR)/lib$(TARGETNAME).$(DLIBEXT) : $(LOHS) $(OBJS) $(EXTRADEPS) + $(LD) $(STDLDFLAGS) -o $@ $(OBJS) $(SLIB) $(LFLAGS) + @echo 'Tecmake - Dynamic Library ($@) Done.'; echo '' + + +#---------------------------------# +# Static Library Build + +.PHONY: static-lib +static-lib: $(TARGETDIR)/lib$(TARGETNAME).a + +$(TARGETDIR)/lib$(TARGETNAME).a : $(LOHS) $(OBJS) $(EXTRADEPS) + $(AR) $(STDLFLAGS) $@ $(OBJS) $(SLIB) $(LCFLAGS) + -$(RANLIB) $@ + @echo 'Tecmake - Static Library ($@) Done.'; echo '' + + +#---------------------------------# +# Application Build + +.PHONY: application +application: $(TARGETDIR)/$(TARGETNAME) + +$(TARGETDIR)/$(TARGETNAME) : $(LOHS) $(OBJS) $(EXTRADEPS) + $(LINKER) -o $@ $(OBJS) $(SLIB) $(LFLAGS) + @if [ ! -z "$(STRIP)" ]; then \ + echo "Striping debug information" ;\ + strip $@ ;\ + fi + @echo 'Tecmake - Application ($@) Done.'; echo '' + + +#---------------------------------# +# Application Scripts + +# Script name +SRELEASE := $(SRCDIR)/$(TARGETNAME) + +.PHONY: scripts +ifdef NO_SCRIPTS + scripts: ; +else + scripts: $(SRELEASE) ; +endif + +$(SRELEASE): $(MAKENAME) + @echo 'Building script $(@F)' + @echo "#!/bin/csh" > $@ + @echo "# Script generated automatically by tecmake v$(VERSION)" >> $@ + @echo "# Remove the comment bellow to set the LD_LIBRARY_PATH if needed." >> $@ + @echo '#setenv LD_LIBRARY_PATH $(MYLIB1)/lib/$${TEC_UNAME}:$(MYLIB2)/lib/$${TEC_UNAME}:$$LD_LIBRARY_PATH' >> $@ + @echo 'if ( -r app.env ) source app.env' >> $@ + @echo 'exec $(TARGETROOT)/$$TEC_UNAME/$(TARGETNAME) $$*' >> $@ + @chmod a+x $@ + + +#---------------------------------# +# Directories Creation + +.PHONY: directories +directories: $(OBJDIR) $(TARGETDIR) $(EXTRADIR) $(LOHDIR) + +$(OBJDIR) $(TARGETDIR): + if [ ! -d $@ ] ; then mkdir -p $@ ; fi + +ifdef EXTRADIR + $(EXTRADIR): + if [ ! -d $@ ] ; then mkdir -p $@ ; fi +else + $(EXTRADIR): ; +endif + +ifdef LOHDIR + $(LOHDIR): + if [ ! -d $@ ] ; then mkdir -p $@ ; fi +else + $(LOHDIR): ; +endif + + +#---------------------------------# +# Compilation Rules + +$(OBJDIR)/%.o: $(SRCDIR)/%.c + @echo Compiling $( $@ + +$(OBJROOT)/%$(LO_SUFFIX).lo: $(SRCLUADIR)/%.lua + @echo Compiling $( $(DEPEND) + @which $(CPPC) 2> /dev/null 1>&2 ;\ + if [ $$? -eq 0 ]; then \ + echo "Building dependencies... (can be slow)" ;\ + $(CPPC) $(INCLUDES) $(DEFINES) $(STDDEFS) -MM $(SOURCES) | \ + sed -e '1,$$s/^\([^ ]\)/$$(OBJDIR)\/\1/' > $(DEPEND) ;\ + else \ + echo "" ;\ + echo "$(CPPC) not found. Dependencies can not be built." ;\ + echo "Must set USE_NODEPEND=Yes." ;\ + echo "" ;\ + exit 1 ;\ + fi + endif + +################### +ifndef USE_NODEPEND +include $(DEPEND) +endif +################### + + +#---------------------------------# +# Management Rules + +# make clean-extra +# Remove extra files +.PHONY: clean-extra +clean-extra: + rm -f $(DEPEND) $(SRELEASE) so_locations + +# make clean-lohs +# Remove Lua object inclusion files +.PHONY: clean-lohs +clean-lohs: + rm -f $(LOS) $(LOHS) + +# make clean-obj +# Remove object files +.PHONY: clean-obj +clean-obj: + rm -f $(OBJS) + +# make clean-target +# Remove target +.PHONY: clean-target +clean-target: + rm -f $(TARGET) + +# make clean +# Remove target and object files +.PHONY: clean +clean: clean-target clean-obj + +# make rebuild +# Remove symbols from executables +.PHONY: strip +strip: + test -r $(TARGETDIR)/$(TARGETNAME) && strip $(TARGETDIR)/$(TARGETNAME) + +# make rebuild +# Rebuild target and object files +.PHONY: rebuild +rebuild: clean-extra clean-lohs clean-obj clean-target tecmake + +# make relink +# Rebuild target without rebuilding object files +.PHONY: relink +relink: clean-target tecmake + +.PHONY: version +version: + @echo "Tecmake Compact Version $(VERSION)" + +#---------------------------------# diff --git a/im/test/glut_capture.c b/im/test/glut_capture.c new file mode 100644 index 0000000..80aadd2 --- /dev/null +++ b/im/test/glut_capture.c @@ -0,0 +1,415 @@ +/* GLUT Capture Sample + + Uses GLUT for user interface + OpenGL for drawing + IM for image I/O and capture + + Needs "opengl32.lib", "glu32.lib", "glut32.lib", "vfw32.lib", "strmiids.lib", + "im.lib", "im_capture.lib", "im_avi.lib" and "im_process.lib". + + Control Keys: + + - Terminates + - Activates/Deactivates the capturing. + , , , etc - Shows capture configuration dialogs, in general 2, but can have more. + - Starts to save every frame in an AVI file. + - Process a background image using an average of N frames. + - Saves the background image in a BMP file. + <1>, <2>, etc - Activates an processing operation. + Only operation 1 is working, it subtracts the background image if one was created. + <0> - Deactivates all the processing operations. + + ATENTION: These keys works at the GLUT window. + But the text input in done at the console window. + Check the correct window focus before typing keys. +*/ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Global Variables */ +imVideoCapture* myVideoCap; /* capture control */ +imImage* image = NULL; /* capture buffer */ +unsigned char* gl_data = NULL; /* opengl display buffer */ + +char video_filename[512] = ""; +imFile* video_file = NULL; + +imImage* back_image = NULL; /* background image */ +imImage* back_acum = NULL; /* aux image for background image calculation */ +int back_count = 0; /* number of images to average */ +int back_index = 0; /* average image counter */ + +int user_key[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; + +static void SimpleBackSub(imbyte *map, imbyte *back_map, int count, float tol) +{ + int i; + for (i = 0; i < count; i++) + { + int diff = map[i] - back_map[i]; + if (diff < 0) diff = -diff; + + if(diff <= tol) + map[i] = 0; + } +} + +static float tol = 10; /* you should use some key to change this */ + +void capture_process(int* user_key, imImage* image, imImage* back_image) +{ + if (user_key[0] && back_image) /* '1' */ + { + int i; + for (i = 0; i < image->depth; i++) /* notice that here depth is always 3 */ + { + SimpleBackSub((imbyte*)image->data[i], (imbyte*)back_image->data[i], image->count, tol); + } + } + + /***** call other operations here ******/ +} + + +/* Aux to draw a number in the display */ +void display_number(int num) +{ + int i; + char msg[30]; + sprintf(msg,"%4d", num); + glColor3f(1.0f,0.0f,0.0f); + glRasterPos2f(10.f,10.f); + for(i = 0; msg[i]; i++) + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, msg[i]); +} + +/* GLUT display callback */ +/* called everytime the window needs to be updated */ +void display(void) +{ + if (!image) + return; + + /* Draws the captured image at (0,0) */ + glRasterPos2f(0.f, 0.f); + glDrawPixels(image->width, image->height, GL_RGB, GL_UNSIGNED_BYTE, gl_data); + + glutSwapBuffers(); +} + + +/* GLUT reshape callback */ +/* called everytime the window changes its size */ +void reshape(int w, int h) +{ + glViewport(0, 0, w, h); +} + + +/* GLUT idle callback */ +/* called when there is no events to be processed */ +void idle(void) +{ + if (imVideoCaptureLive(myVideoCap, -1)) + { + imVideoCaptureFrame(myVideoCap, image->data[0], IM_RGB, 1000); + + if (back_image && back_index < back_count) + { + /* calculating the background image */ + + imProcessUnArithmeticOp(image, back_acum, IM_UN_INC); /* back_image += image */ + back_index++; + + if (back_index == back_count) /* last sum, divide by N */ + { + imProcessArithmeticConstOp(back_acum, (float)back_count, back_image, IM_BIN_DIV); + printf("Background image updated.\n"); + } + } + else + { + /* call some processing */ + capture_process(user_key, image, back_image); + + if (video_file) + { + imFileWriteImageInfo(video_file, image->width, image->height, IM_RGB, IM_BYTE); + imFileWriteImageData(video_file, image->data[0]); + } + } + + imConvertPacking(image->data[0], gl_data, image->width, image->height, image->depth, image->data_type, 0); + display(); + } +} + + +/* OpenGL initialization */ +void glinit(void) +{ + if (!image) + return; + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D (0.0, (GLdouble)image->width, 0.0, (GLdouble)image->height); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +} + + +/* updates the capture image size and display buffer size */ +void updatebuffer(void) +{ + int width, height; + + /* retrieve the image size */ + imVideoCaptureGetImageSize(myVideoCap, &width, &height); + + if (width != image->width || height != image->height) + { + /* fix the buffer size */ + imImageReshape(image, width, height); + gl_data = realloc(gl_data, image->size); + + /* fix the window size */ + glutReshapeWindow(image->width, image->height); + + /* re-inititalizes the OpenGL */ + glinit(); + } +} + + +/* GLUT function key callback */ +/* called everytime a function key is pressed */ +void parsefunckey(int key, int x, int y) +{ + switch (key) { + case GLUT_KEY_F1: /* F1, F2, F.. = shows the capture configuration dialogs */ + case GLUT_KEY_F2: + case GLUT_KEY_F3: + case GLUT_KEY_F4: + case GLUT_KEY_F5: + case GLUT_KEY_F6: + case GLUT_KEY_F7: + case GLUT_KEY_F8: + imVideoCaptureLive(myVideoCap, 0); /* deactivate the capture before calling the dialog */ + imVideoCaptureShowDialog(myVideoCap, key - GLUT_KEY_F1, NULL); + updatebuffer(); + imVideoCaptureLive(myVideoCap, 1); + break; + } +} + +/* GLUT key callback */ +/* called everytime an ASCII key is pressed */ +void parsekey(unsigned char key, int x, int y) +{ + int error, index; + switch (key) { + case 27: /* Esc = terminates */ + printf("\nTerminating...\n"); + imVideoCaptureDisconnect(myVideoCap); + imVideoCaptureDestroy(myVideoCap); + imImageDestroy(image); + if (video_file) + { + imFileClose(video_file); + printf("AVI file created.\n"); + } + free(gl_data); + exit(1); + case ' ': /* Space = activates/deactivates the capturing */ + if (imVideoCaptureLive(myVideoCap, -1)) + imVideoCaptureLive(myVideoCap, 0); + else + imVideoCaptureLive(myVideoCap, 1); + break; + case 'v': + if (video_file) + { + imFileClose(video_file); + printf("AVI file created.\n"); + video_file = NULL; + break; + } + printf("Enter the AVI file name:\n >"); + scanf("%s", video_filename); + video_file = imFileNew(video_filename, "AVI", &error); + if (!video_file) + printf("Error creating video file.\n"); + else + { + imFileSetInfo(video_file, "CUSTOM"); /* shows the compression options dialog */ + imFileWriteImageInfo(video_file, image->width, image->height, IM_RGB, IM_BYTE); + } + break; + case 'b': + if (back_image) + { + imImageDestroy(back_image); + imImageDestroy(back_acum); + } + printf("Enter the number of images to average:\n >"); + scanf("%d", &back_count); + back_acum = imImageCreate(image->width, image->height, IM_RGB, IM_USHORT); + back_image = imImageClone(image); + back_index = 0; + break; + case 's': + if (back_image) + { + char filename[512]; + imFile* ifile; + printf("Enter the BMP file name:\n >"); + scanf("%s", filename); + ifile = imFileNew(filename, "BMP", &error); + if (!ifile) { + printf("Error creating image file.\n"); return; + } + imFileSaveImage(ifile, back_image); + imFileClose(ifile); + printf("BMP file created.\n"); + } + break; + case '0': + memset(user_key, 0, 9*sizeof(int)); + break; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + index = key - '1'; + user_key[index] = user_key[index]? 0: 1; /* switch state */ + if (user_key[index]) + printf("Processing %c activated. \n", key); + else + printf("Processing %c deactivated. \n", key); + return; + default: + glutPostRedisplay(); + return; + } +} + + +/* Returns a capture device */ +int getcapture(void) +{ + int i; + int cap_count = imVideoCaptureDeviceCount(); + if (cap_count == 1) /* only one device */ + return 0; + + printf("Enter the capture device number to use:\n"); + for (i = 0; i < cap_count; i++) + { + printf(" %s\n", imVideoCaptureDeviceDesc(i)); + } + + printf(" > "); + scanf("%d", &i); + if (i < 0 || i >= cap_count) + return 0; + + return i; +} + + +/* Initializes the capture device */ +int initcapture(void) +{ + int width, height; + + /* creates an IM video capture manager */ + myVideoCap = imVideoCaptureCreate(); + if (!myVideoCap) { + printf("No capture device found.\n"); return 0; + } + + /* connects the device */ + if (!imVideoCaptureConnect(myVideoCap, getcapture())) { + imVideoCaptureDestroy(myVideoCap); + printf("Can not connect to capture device.\n"); return 0; + } + + if (!imVideoCaptureLive(myVideoCap, 1)) { + imVideoCaptureDisconnect(myVideoCap); + imVideoCaptureDestroy(myVideoCap); + printf("Can not activate capturing.\n"); return 0; + } + + /* retrieve the image size */ + imVideoCaptureGetImageSize(myVideoCap, &width, &height); + + /* alocates the buffers */ + image = imImageCreate(width, height, IM_RGB, IM_BYTE); + gl_data = malloc(image->size); + + return 1; +} + + +int main(int argc, char* argv[]) +{ + printf("GLUT Capture\n"); + printf(" - Terminates.\n" + " - Activates/Deactivates the capturing.\n" + " , , , ... - Shows capture configuration dialogs.\n" + " - Starts to save every frame in an AVI file.\n" + " - Process a background image using an average of N frames.\n" + " - Saves the background image in a BMP file.\n" + " <1>, <2>, ... - Activates an processing operation.\n" + " <0> - Deactivates all the processing operations.\n\n"); + + /* Initializes the capture device */ + if (!initcapture()) + return 1; + + imFormatRegisterAVI(); + + /* GLUT initialization */ + glutInit(&argc, argv); + glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); + glutInitWindowPosition(100, 100); + glutInitWindowSize(image->width, image->height); + glutCreateWindow("GLUT Capture"); + + glClearColor(0., 0., 0., 1.0); /* window background */ + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); /* data alignment is 1 */ + + /* register GLUT callbacks */ + glutDisplayFunc(display); + glutReshapeFunc(reshape); + glutKeyboardFunc(parsekey); + glutSpecialFunc(parsefunckey); + glutIdleFunc(idle); + + /* OpenGL initialization */ + glinit(); + + /* GLUT message loop */ + glutMainLoop(); + + return 0; +} diff --git a/im/test/im_copy.cpp b/im/test/im_copy.cpp new file mode 100755 index 0000000..5b4c8cd --- /dev/null +++ b/im/test/im_copy.cpp @@ -0,0 +1,145 @@ +/* IM 3 sample that copies an image from one file to another. + It is good to test the file formats read and write. + If the destiny does not supports the input image it aborts and returns an error. + + Needs "im.lib". + + Usage: im_copy [ [ +#include +#include +#include + +#include +#include + + +void PrintError(int error) +{ + switch (error) + { + case IM_ERR_OPEN: + printf("Error Opening File.\n"); + break; + case IM_ERR_MEM: + printf("Insuficient memory.\n"); + break; + case IM_ERR_ACCESS: + printf("Error Accessing File.\n"); + break; + case IM_ERR_DATA: + printf("Image type not Suported.\n"); + break; + case IM_ERR_FORMAT: + printf("Invalid Format.\n"); + break; + case IM_ERR_COMPRESS: + printf("Invalid or unsupported compression.\n"); + break; + default: + printf("Unknown Error.\n"); + } +} + +int main(int argc, char* argv[]) +{ + if (argc < 3) + { + printf("Invalid number of arguments.\n"); + return 0; + } + +// imFormatRegisterAVI(); +// imFormatRegisterWMV(); + + void* data = NULL; + imFile* ifile = NULL; + imFile* ofile = NULL; + + int error; + ifile = imFileOpen(argv[1], &error); + if (!ifile) + goto man_error; + + char format[10]; + char compression[20]; + int image_count; + imFileGetInfo(ifile, format, compression, &image_count); + + ofile = imFileNew(argv[2], (argc < 3)? format: argv[3], &error); + if (!ofile) + goto man_error; + + if (argc < 4) + imFileSetInfo(ofile, compression); + else + imFileSetInfo(ofile, argv[4]); + + for (int i = 0; i < image_count; i++) + { + int size, max_size = 0; + int width, height, color_mode, data_type; + error = imFileReadImageInfo(ifile, i, &width, &height, &color_mode, &data_type); + if (error != IM_ERR_NONE) + goto man_error; + + size = imImageDataSize(width, height, color_mode, data_type); + + if (size > max_size) + { + data = realloc(data, size); + max_size = size; + } + + error = imFileReadImageData(ifile, data, 0, -1); + if (error != IM_ERR_NONE) + goto man_error; + + char* attrib_list[50]; + int attrib_list_count; + imFileGetAttributeList(ifile, attrib_list, &attrib_list_count); + + for (int a = 0; a < attrib_list_count; a++) + { + int attrib_data_type, attrib_count; + const void* attrib_data = imFileGetAttribute(ifile, attrib_list[a], &attrib_data_type, &attrib_count); + imFileSetAttribute(ofile, attrib_list[a], attrib_data_type, attrib_count, attrib_data); + } + + if (imColorModeSpace(color_mode) == IM_MAP) + { + long palette[256]; + int palette_count; + imFileGetPalette(ifile, palette, &palette_count); + imFileSetPalette(ifile, palette, palette_count); + } + + error = imFileWriteImageInfo(ofile, width, height, color_mode, data_type); + if (error != IM_ERR_NONE) + goto man_error; + + error = imFileWriteImageData(ofile, data); + if (error != IM_ERR_NONE) + goto man_error; + + printf("."); + } + printf("done"); + + free(data); + imFileClose(ifile); + imFileClose(ofile); + + return 1; + +man_error: + PrintError(error); + if (data) free(data); + if (ifile) imFileClose(ifile); + if (ofile) imFileClose(ofile); + return 0; +} diff --git a/im/test/im_info.cpp b/im/test/im_info.cpp new file mode 100644 index 0000000..89ec8c4 --- /dev/null +++ b/im/test/im_info.cpp @@ -0,0 +1,211 @@ +/* IM 3 sample that returns information about a file. + + Needs "im.lib". + + Usage: im_info + + Example: im_info test.tif +*/ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +void PrintError(int error) +{ + switch (error) + { + case IM_ERR_OPEN: + printf("Error Opening File.\n"); + break; + case IM_ERR_MEM: + printf("Insuficient memory.\n"); + break; + case IM_ERR_ACCESS: + printf("Error Accessing File.\n"); + break; + case IM_ERR_DATA: + printf("Image type not Suported.\n"); + break; + case IM_ERR_FORMAT: + printf("Invalid Format.\n"); + break; + case IM_ERR_COMPRESS: + printf("Invalid or unsupported compression.\n"); + break; + default: + printf("Unknown Error.\n"); + } +} + +int FindZero(imbyte* data, int count) +{ + for (int i = 0; i < count; i++) + { + if (data[i] == 0) + return 1; + } + return 0; +} + +char* AttribData2Str(const void* data, int data_type) +{ + static char data_str[50] = ""; + + switch(data_type) + { + case IM_BYTE: + sprintf(data_str, "%3d", (int)(*((imbyte*)data))); + break; + case IM_USHORT: + sprintf(data_str, "%5d", (int)(*((imushort*)data))); + break; + case IM_INT: + sprintf(data_str, "%5d", *((int*)data)); + break; + case IM_FLOAT: + sprintf(data_str, "%5.2f", (double)(*((float*)data))); + break; + case IM_CFLOAT: + { + float *c = (float*)data; + sprintf(data_str, "%5.2g, %5.2f", (double)*c, (double)*(c+1)); + } + break; + } + + return data_str; +} + +char* GetSizeDesc(double *size) +{ + char* size_desc; + + if (*size < 1024) + size_desc = "b"; + else + { + *size /= 1024; + + if (*size < 1024) + size_desc = "Kb"; + else + { + *size /= 1024; + size_desc = "Mb"; + } + } + + return size_desc; +} + +unsigned long FileSize(const char* file_name) +{ + imBinFile* bfile = imBinFileOpen(file_name); + if (!bfile) return 0; + + unsigned long file_size = imBinFileSize(bfile); + + imBinFileClose(bfile); + return file_size; +} + +void PrintImageInfo(const char* file_name) +{ + printf("IM Info\n"); + printf(" File Name:\n %s\n", file_name); + + int error; + imFile* ifile = imFileOpen(file_name, &error); + if (!ifile) + { + PrintError(error); + return; + } + + double file_size = FileSize(file_name); + printf(" File Size: %.2f %s\n", file_size, GetSizeDesc(&file_size)); + + char format[10]; + char compression[20]; + int image_count; + imFileGetInfo(ifile, format, compression, &image_count); + + char format_desc[50]; + imFormatInfo(format, format_desc, NULL, NULL); + printf(" Format: %s - %s\n", format, format_desc); + printf(" Compression: %s\n", compression); + printf(" Image Count: %d\n", image_count); + + for (int i = 0; i < image_count; i++) + { + int width, height, color_mode, data_type; + + error = imFileReadImageInfo(ifile, i, &width, &height, &color_mode, &data_type); + if (error != IM_ERR_NONE) + { + PrintError(error); + imFileClose(ifile); + return; + } + + printf(" Image #%d\n", i); + printf(" Width: %d\n", width); + printf(" Height: %d\n", height); + printf(" Color Space: %s\n", imColorModeSpaceName(color_mode)); + printf(" Has Alpha: %s\n", imColorModeHasAlpha(color_mode)? "Yes": "No"); + printf(" Is Packed: %s\n", imColorModeIsPacked(color_mode)? "Yes": "No"); + printf(" Is Top Down: %s\n", imColorModeIsTopDown(color_mode)? "Yes": "No"); + printf(" Data Type: %s\n", imDataTypeName(data_type)); + + double image_size = imImageDataSize(width, height, color_mode, data_type); + printf(" Data Size: %.2f %s\n", image_size, GetSizeDesc(&image_size)); + + char* attrib_list[50]; // should be dynamic allocated + int attrib_list_count; + imFileGetAttributeList(ifile, attrib_list, &attrib_list_count); + + for (int a = 0; a < attrib_list_count; a++) + { + if (a == 0) + printf(" Attributes:\n"); + + int attrib_data_type, attrib_count; + const void* attrib_data = imFileGetAttribute(ifile, attrib_list[a], &attrib_data_type, &attrib_count); + + if (attrib_count == 1) + printf(" %s: %s\n", attrib_list[a], AttribData2Str(attrib_data, attrib_data_type)); + else if (attrib_data_type == IM_BYTE && FindZero((imbyte*)attrib_data, attrib_count)) + printf(" %s: %s\n", attrib_list[a], attrib_data); + else + printf(" %s: %s %s ...\n", attrib_list[a], AttribData2Str(attrib_data, attrib_data_type), AttribData2Str((imbyte*)attrib_data + imDataTypeSize(attrib_data_type), attrib_data_type)); + } + } + + imFileClose(ifile); +} + +int main(int argc, char* argv[]) +{ +// imFormatRegisterJP2(); +// imFormatRegisterAVI(); +// imFormatRegisterWMV(); + + if (argc < 2) + { + printf("Invalid number of arguments.\n"); + return 0; + } + + PrintImageInfo(argv[1]); + + return 1; +} + diff --git a/im/test/im_info.mak b/im/test/im_info.mak new file mode 100755 index 0000000..211e7af --- /dev/null +++ b/im/test/im_info.mak @@ -0,0 +1,11 @@ +APPNAME = im_info +APPTYPE = CONSOLE +LINKER = g++ + +SRC = im_info.cpp + +USE_IM = Yes + +IM = .. + +USE_STATIC = Yes diff --git a/im/test/im_view.c b/im/test/im_view.c new file mode 100644 index 0000000..e271394 --- /dev/null +++ b/im/test/im_view.c @@ -0,0 +1,182 @@ +/* IM 3 sample that shows an image. + + Needs "im.lib", "iup.lib", "cd.lib" and "cdiup.lib". + + Usage: im_view + + Example: im_view test.tif + + + Click on image to open another file. +*/ + +#include +#include +#include +#include +#include + +#include +#include + + +static int disable_repaint = 0; /* used to optimize repaint, while opening a new file */ + +static void PrintError(int error) +{ + switch (error) + { + case IM_ERR_OPEN: + IupMessage("IM", "Error Opening File."); + break; + case IM_ERR_MEM: + IupMessage("IM", "Insuficient memory."); + break; + case IM_ERR_ACCESS: + IupMessage("IM", "Error Accessing File."); + break; + case IM_ERR_DATA: + IupMessage("IM", "Image type not Suported."); + break; + case IM_ERR_FORMAT: + IupMessage("IM", "Invalid Format."); + break; + case IM_ERR_COMPRESS: + IupMessage("IM", "Invalid or unsupported compression."); + break; + default: + IupMessage("IM", "Unknown Error."); + } +} + +static int cbRepaint(Ihandle* iup_canvas) +{ + cdCanvas* cd_canvas = (cdCanvas*)IupGetAttribute(iup_canvas, "cdCanvas"); + imImage* image = (imImage*)IupGetAttribute(iup_canvas, "imImage"); + + if (!cd_canvas || disable_repaint) + return IUP_DEFAULT; + + cdCanvasActivate(cd_canvas); + cdCanvasClear(cd_canvas); + + if (!image) + return IUP_DEFAULT; + + imcdCanvasPutImage(cd_canvas, image, 0, 0, image->width, image->height, 0, 0, 0, 0); + + cdCanvasFlush(cd_canvas); + + return IUP_DEFAULT; +} + +static void ShowImage(char* file_name, Ihandle* iup_dialog) +{ + int error; + imImage* image = (imImage*)IupGetAttribute(iup_dialog, "imImage"); + if (image) imImageDestroy(image); + IupSetAttribute(iup_dialog, "imImage", NULL); + + image = imFileImageLoadBitmap(file_name, 0, &error); + if (error) PrintError(error); + if (!image) return; + + IupSetAttribute(iup_dialog, "imImage", (char*)image); + IupStoreAttribute(iup_dialog, "TITLE", file_name); + + cbRepaint(iup_dialog); /* we can do this because canvas inherit attributes from the dialog */ +} + +static int cbButton(Ihandle* iup_canvas, int but, int pressed) +{ + char file_name[200] = "*.*"; + + if (but != IUP_BUTTON1 || !pressed) + return IUP_DEFAULT; + + disable_repaint = 1; + if (IupGetFile(file_name) != 0) + { + disable_repaint = 0; + return IUP_DEFAULT; + } + + disable_repaint = 0; + ShowImage(file_name, IupGetDialog(iup_canvas)); + + return IUP_DEFAULT; +} + +static int cbClose(Ihandle* iup_dialog) +{ + cdCanvas* cd_canvas = (cdCanvas*)IupGetAttribute(iup_dialog, "cdCanvas"); + imImage* image = (imImage*)IupGetAttribute(iup_dialog, "imImage"); + + if (cd_canvas) cdKillCanvas(cd_canvas); + if (image) imImageDestroy(image); + + IupSetAttribute(iup_dialog, "cdCanvas", NULL); + IupSetAttribute(iup_dialog, "imImage", NULL); + + return IUP_CLOSE; +} + +static Ihandle* CreateDialog(void) +{ + Ihandle *iup_dialog; + Ihandle *iup_canvas; + cdCanvas* cd_canvas; + + iup_canvas = IupCanvas("do_nothing"); + IupSetAttribute(iup_canvas, IUP_BUTTON_CB, "cbButton"); + IupSetAttribute(iup_canvas, IUP_ACTION, "cbRepaint"); + + iup_dialog = IupDialog(iup_canvas); + IupSetAttribute(iup_dialog, IUP_CLOSE_CB, "cbClose"); + IupSetAttribute(iup_dialog, IUP_SIZE, "HALFxHALF"); + + IupSetFunction("cbRepaint", (Icallback)cbRepaint); + IupSetFunction("cbButton", (Icallback)cbButton); + IupSetFunction("cbClose", (Icallback)cbClose); + + IupMap(iup_dialog); + + cd_canvas = cdCreateCanvas(CD_IUP, iup_canvas); + IupSetAttribute(iup_dialog, "cdCanvas", (char*)cd_canvas); + + return iup_dialog; +} + +//#include "im_format_avi.h" + +int main(int argc, char* argv[]) +{ + Ihandle* dlg; + + //imFormatRegisterAVI(); + IupOpen(&argc, &argv); + + dlg = CreateDialog(); + + IupShow(dlg); + + /* Try to get a file name from the command line. */ + if (argc > 1) + { + ShowImage(argv[1], dlg); + } + else + { + char file_name[1024] = "*.*"; + if (IupGetFile(file_name) == 0) + { + ShowImage(file_name, dlg); + } + } + + IupMainLoop(); + IupDestroy(dlg); + IupClose(); + + return 1; +} diff --git a/im/test/im_view.mak b/im/test/im_view.mak new file mode 100644 index 0000000..45e4363 --- /dev/null +++ b/im/test/im_view.mak @@ -0,0 +1,14 @@ +APPNAME = im_view + +LINKER = g++ + +SRC = im_view.c + +USE_CD = Yes +USE_IUPCONTROLS = Yes +USE_IUP3 = Yes +USE_IM = Yes + +IM = .. + +USE_STATIC = Yes diff --git a/im/test/iupglview.c b/im/test/iupglview.c new file mode 100644 index 0000000..93e0054 --- /dev/null +++ b/im/test/iupglview.c @@ -0,0 +1,237 @@ + +#ifdef WIN32 +#include /* necessary because of the Microsoft OpenGL headers dependency */ +#endif + +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +int app_repaint_cb(Ihandle* self) +{ + unsigned char* gl_data = (unsigned char*)IupGetAttribute(self, "APP_GL_DATA"); + int width = IupGetInt(self, "APP_GL_WIDTH"); + int height = IupGetInt(self, "APP_GL_HEIGHT"); + IupGLMakeCurrent(self); /* activates this GL Canvas as the current drawing area. */ + glClear(GL_COLOR_BUFFER_BIT); /* clears the back buffer */ + + if (gl_data) + { + /* Draws the captured image at (0,0) */ + glRasterPos2f(0.f, 0.f); + glDrawPixels(width, height, GL_RGB, GL_UNSIGNED_BYTE, gl_data); + } + + IupGLSwapBuffers(self); /* swap data from back buffer to front buffer */ + return IUP_DEFAULT; +} + +void appGLInit(int width, int height) +{ + glClearColor(0., 0., 0., 1.0); /* window background */ + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); /* data alignment is 1 */ + + glViewport(0, 0, width, height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D (0.0, (GLdouble)width, 0.0, (GLdouble)height); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +} + +int app_resize_cb(Ihandle* self, int width, int height) +{ + IupGLMakeCurrent(self); + appGLInit(width, height); + return IUP_DEFAULT; +} + +/* OpenGL does not supports palette based images, so convert to RGB */ +/* this function can also be use for RGBA images */ +void ConvertMapToGLData(unsigned char* data, int count, int depth, long* palette, int palette_count) +{ + int c, i; + unsigned char r[256], g[256], b[256]; + + unsigned char* src_data = data + count-1; + unsigned char* dst_data = data + depth*(count-1); + + for (c = 0; c < palette_count; c++) + imColorDecode(&r[c], &g[c], &b[c], palette[c]); + + for (i = 0; i < count; i++) + { + int index = *src_data; + *dst_data = r[index]; + *(dst_data+1) = g[index]; + *(dst_data+2) = b[index]; + + dst_data -= depth; + src_data--; + } +} + +int app_open_cb(Ihandle* self) +{ + imFile* ifile; /* file input */ + int ret, error; + unsigned char* gl_data = (unsigned char*)IupGetAttribute(self, "APP_GL_DATA"); + char filename[1024] = ".\\*.*"; + + /* get a file name */ + ret = IupGetFile(filename); + if (ret == -1) + return IUP_DEFAULT; + + ifile = imFileOpen(filename, &error); + if (!ifile) + { + IupMessage("Error", "Error reading image file."); + return IUP_DEFAULT; + } + + { + int width = 0, height = 0, file_color_mode, color_space; + Ihandle* dialog = IupGetDialog(self); + imFileReadImageInfo(ifile, 0, &width, &height, &file_color_mode, NULL); + + /* alocates the buffers */ + if (gl_data) free(gl_data); + gl_data = malloc(width*height*3); + IupSetAttribute(dialog, "APP_GL_DATA", gl_data); + IupSetfAttribute(dialog, "APP_GL_WIDTH", "%d", width); + IupSetfAttribute(dialog, "APP_GL_HEIGHT", "%d", height); + + imFileReadImageData(ifile, gl_data, 1, IM_PACKED); + + color_space = imColorModeSpace(file_color_mode); + if (color_space == IM_MAP || color_space == IM_GRAY || color_space == IM_BINARY) + { + long palette[256]; + int palette_count; + imFileGetPalette(ifile, palette, &palette_count); + ConvertMapToGLData(gl_data, width*height, 3, palette, palette_count); + } + } + + imFileClose(ifile); + + return IUP_DEFAULT; +} + +int app_exit_cb(Ihandle *self) +{ + unsigned char* gl_data = (unsigned char*)IupGetAttribute(self, "APP_GL_DATA"); + + /* destroy buffers */ + if (gl_data) + free(gl_data); + + return IUP_CLOSE; +} + +int app_about_cb(Ihandle *self) +{ + IupMessagef("About", "IUPGLView 1.0\n" + "Tecgraf/PUC-Rio\n" + " ---------------- \n" + "IUP Version %s\n" + "IM Version %s\n" + " ---------------- \n" + "OpenGL:\n" + " Vendor: %s\n" + " Renderer: %s\n" + " Version: %s\n" + , IUP_RELEASE_VERSION, IM_VERSION, + glGetString(GL_VENDOR),glGetString(GL_RENDERER),glGetString(GL_VERSION)); + return IUP_DEFAULT; +} + +void mainMenuCreate(void) +{ + Ihandle* file_menu = IupMenu( + IupItem( "Open...", "app_open_cb"), + IupSeparator(), + IupItem( "Exit", "app_exit_cb"), + NULL + ); + + Ihandle* menu = IupMenu( + IupSubmenu("File", file_menu), + NULL + ); + + /* this will be used by the dialog */ + IupSetHandle("app_menu", menu); + + IupSetFunction("app_open_cb", (Icallback)app_open_cb); + IupSetFunction("app_exit_cb", (Icallback)app_exit_cb); +} + +void mainDialogCreate(void) +{ + Ihandle *dialog, *box, *canvas; + + /* initialize interface */ + + /* canvas for the image */ + + canvas = IupGLCanvas("app_repaint_cb"); + IupSetAttribute(canvas, "BORDER", "NO"); + IupSetAttribute(canvas, "BUFFER", "DOUBLE"); /* use double buffer */ + IupSetAttribute(canvas, "RESIZE_CB", "app_resize_cb"); /* configure the resize callback */ + + IupSetFunction("app_resize_cb", (Icallback)app_resize_cb); + IupSetFunction("app_repaint_cb", (Icallback)app_repaint_cb); + + /* this is the most external box that puts together + the toolbar, the two canvas and the status bar */ + box = IupSetAttributes(IupHbox( + canvas, + NULL), "MARGIN=10x10"); + + /* create the dialog and set its attributes */ + + mainMenuCreate(); + + dialog = IupDialog(box); + IupSetAttribute(dialog, "MENU", "app_menu"); /* configure the menu */ + IupSetAttribute(dialog, "CLOSE_CB", "app_exit_cb"); + IupSetAttribute(dialog, "TITLE", "IUPGLView"); + IupSetAttribute(dialog, "RASTERSIZE", "680x380"); /* initial size */ + IupSetAttribute(dialog, "SHRINK", "YES"); + IupSetHandle("app_dialog", dialog); + + IupShowXY(dialog, IUP_CENTER, IUP_CENTER); +} + +int main(int argc, char* argv[]) +{ + /* IUP initialization */ + IupOpen(); + IupGLCanvasOpen(); + + /* Create and show the main dialog */ + mainDialogCreate(); + + /* IUP event loop */ + IupMainLoop(); + + /* IUP closing */ + IupClose(); + + return 0; +} diff --git a/iup/COPYRIGHT b/iup/COPYRIGHT new file mode 100755 index 0000000..dd31d6c --- /dev/null +++ b/iup/COPYRIGHT @@ -0,0 +1,32 @@ +IUP License +----------- + +IUP is licensed under the terms of the MIT license reproduced below. +This means that IUP is free software and can be used for both academic +and commercial purposes at absolutely no cost. + +=============================================================================== + +Copyright (C) 1994-2009 Tecgraf, PUC-Rio. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without lIUPitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IUPPLIED, INCLUDING BUT NOT LIUPITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIUP, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +=============================================================================== + +(end of COPYRIGHT) diff --git a/iup/Makefile b/iup/Makefile new file mode 100755 index 0000000..1bcb9c7 --- /dev/null +++ b/iup/Makefile @@ -0,0 +1,29 @@ + +.PHONY: do_all iup iupgtk iupcd iupcontrols iupgl iup_pplot iupim iupimglib ledc iupview iuplua3 iuplua5 iupconsole +#do_all: iup iupgtk iupcd iupcontrols iupgl iup_pplot iupim iupimglib ledc iupview iuplua3 iuplua5 iupconsole +do_all: iup iupgtk iupcd iupcontrols iupgl iup_pplot iupim iupimglib ledc iupview iuplua5 iupconsole + +iup iupgtk: + @$(MAKE) --no-print-directory -C ./src/ $@ +iupcd: + @$(MAKE) --no-print-directory -C ./srccd/ +iupcontrols: + @$(MAKE) --no-print-directory -C ./srccontrols/ +iup_pplot: + @$(MAKE) --no-print-directory -C ./srcpplot/ +iupgl: + @$(MAKE) --no-print-directory -C ./srcgl/ +iupim: + @$(MAKE) --no-print-directory -C ./srcim/ +iupimglib: + @$(MAKE) --no-print-directory -C ./srcimglib/ +iuplua3: + @$(MAKE) --no-print-directory -C ./srclua3/ +iuplua5: + @$(MAKE) --no-print-directory -C ./srclua5/ +iupconsole: + @$(MAKE) --no-print-directory -C ./srcconsole/ +ledc: + @$(MAKE) --no-print-directory -C ./srcledc/ +iupview: iupcontrols iup + @$(MAKE) --no-print-directory -C ./srcview/ diff --git a/iup/README b/iup/README new file mode 100755 index 0000000..9e96928 --- /dev/null +++ b/iup/README @@ -0,0 +1,12 @@ +README for IUP + + IUP is a portable toolkit for building graphical user interfaces. It offers a configuration API in three basic languages: C, Lua and LED. IUP's purpose is to allow a program to be executed in different systems without any modification, therefore it is highly portable. Its main advantages are: + * high performance, due to the fact that it uses native interface elements. + * fast learning by the user, due to the simplicity of its API. + + Build instructions and usage are available in the IUP documentation. + + For complete information, visit IUP's web site at http://www.tecgraf.puc-rio.br/iup + or access its documentation in the HTML folder. + +(end of README) diff --git a/iup/dox/iup.dox b/iup/dox/iup.dox new file mode 100755 index 0000000..f20c7c3 --- /dev/null +++ b/iup/dox/iup.dox @@ -0,0 +1,264 @@ +# Doxyfile 1.5.7.1 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = IUP +PROJECT_NUMBER = 3.0 +OUTPUT_DIRECTORY = ../html +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = NO +REPEAT_BRIEF = NO +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = YES +SUBGROUPING = YES +TYPEDEF_HIDES_STRUCT = NO +SYMBOL_CACHE_SIZE = 0 +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = NO +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = NO +SORT_BRIEF_DOCS = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = NO +GENERATE_TESTLIST = NO +GENERATE_BUGLIST = NO +GENERATE_DEPRECATEDLIST= NO +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = NO +SHOW_DIRECTORIES = NO +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = YES +WARNINGS = YES +WARN_IF_UNDOCUMENTED = NO +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = ../src +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.h \ + iup.c +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = NO +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = NO +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = doxygen/ +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +HTML_DYNAMIC_SECTIONS = NO +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHG_LOCATION = +DISABLE_INDEX = YES +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = FRAME +TREEVIEW_WIDTH = 250 +FORMULA_FONTSIZE = 10 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = ../include/ +INCLUDE_FILE_PATTERNS = +PREDEFINED = IUP_ASSERT +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +DOT_FONTNAME = FreeSans +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/iup/etc/iup.manifest b/iup/etc/iup.manifest new file mode 100755 index 0000000..2988531 --- /dev/null +++ b/iup/etc/iup.manifest @@ -0,0 +1,22 @@ + + + +Iup Application + + + + + + diff --git a/iup/etc/iup.rc b/iup/etc/iup.rc new file mode 100755 index 0000000..eab8cf5 --- /dev/null +++ b/iup/etc/iup.rc @@ -0,0 +1,44 @@ +TECGRAF_ICON ICON "tecgraf.ico" + +1 VERSIONINFO + FILEVERSION 3,0,0,0 + PRODUCTVERSION 3,0,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "www.tecgraf.puc-rio.br/iup\0" + VALUE "CompanyName", "Tecgraf/PUC-Rio\0" + VALUE "FileDescription", "IUP - Portable User Interface\0" + VALUE "FileVersion", "3.0.0\0" + VALUE "LegalCopyright", "Copyright © 1994-2009 Tecgraf, PUC-Rio.\0" + VALUE "OriginalFilename", "iup.dll\0" + VALUE "ProductName", "IUP for Windows\0" + VALUE "ProductVersion", "3.0.0\0" + END + END +END + +CURSOR_PEN CURSOR "pen.cur" + +/* To avoid the inclusion of */ +#define WS_CHILD 0x40000000L +#define WS_VISIBLE 0x10000000L +#define WS_CLIPSIBLINGS 0x04000000L +#define DS_3DLOOK 0x0004L +#define DS_CONTROL 0x0400L +#define SS_OWNERDRAW 0x0000000DL +#define WS_EX_STATICEDGE 0x00020000L + +#define IUP_PREVIEWCANVAS 3000 + +iupPreviewDlg DIALOG DISCARDABLE 0, 0, 250, 95 +STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | DS_3DLOOK | DS_CONTROL +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IUP_PREVIEWCANVAS, "STATIC", SS_OWNERDRAW, 70, 0, 120, 90, WS_EX_STATICEDGE +END + +/* The following line will enable Windows XP Visual Styles */ +1 24 "iup.manifest" diff --git a/iup/etc/iup64.manifest b/iup/etc/iup64.manifest new file mode 100755 index 0000000..e399771 --- /dev/null +++ b/iup/etc/iup64.manifest @@ -0,0 +1,22 @@ + + + +Iup Application + + + + + + diff --git a/iup/etc/pen.cur b/iup/etc/pen.cur new file mode 100755 index 0000000..5912b15 Binary files /dev/null and b/iup/etc/pen.cur differ diff --git a/iup/etc/tecgraf.ico b/iup/etc/tecgraf.ico new file mode 100755 index 0000000..0db610e Binary files /dev/null and b/iup/etc/tecgraf.ico differ diff --git a/iup/fix_permission b/iup/fix_permission new file mode 100755 index 0000000..453aead --- /dev/null +++ b/iup/fix_permission @@ -0,0 +1 @@ +find . -name make_\* -type f -exec chmod ug+x {} \; diff --git a/iup/include/iup.h b/iup/include/iup.h new file mode 100755 index 0000000..9913329 --- /dev/null +++ b/iup/include/iup.h @@ -0,0 +1,363 @@ +/** \file + * \brief User API + * IUP - A Portable User Interface Toolkit + * Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil + * http://www.tecgraf.puc-rio.br/iup mailto:iup@tecgraf.puc-rio.br + * + * See Copyright Notice at the end of this file + */ + +#ifndef __IUP_H +#define __IUP_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +#define IUP_NAME "IUP - Portable User Interface" +#define IUP_COPYRIGHT "Copyright (C) 1994-2009 Tecgraf, PUC-Rio." +#define IUP_DESCRIPTION "Portable toolkit for building graphical user interfaces." +#define IUP_VERSION "3.0" /* bug fixes are reported only by IupVersion functions */ +#define IUP_VERSION_NUMBER 300000 +#define IUP_VERSION_DATE "2009/10/02" + +typedef struct Ihandle_ Ihandle; +typedef int (*Icallback)(Ihandle*); + +/************************************************************************/ +/* Main API */ +/************************************************************************/ + +int IupOpen (int *argc, char ***argv); +void IupClose (void); +void IupImageLibOpen (void); + +int IupMainLoop (void); +int IupLoopStep (void); +int IupMainLoopLevel (void); +void IupFlush (void); +void IupExitLoop (void); + +void IupUpdate (Ihandle* ih); +void IupUpdateChildren(Ihandle* ih); +void IupRedraw (Ihandle* ih, int children); +void IupRefresh (Ihandle* ih); + +char* IupMapFont (const char *iupfont); +char* IupUnMapFont (const char *driverfont); +int IupHelp (const char* url); +char* IupLoad (const char *filename); +char* IupLoadBuffer (const char *buffer); + +char* IupVersion (void); +char* IupVersionDate (void); +int IupVersionNumber (void); +void IupSetLanguage (const char *lng); +char* IupGetLanguage (void); + +void IupDestroy (Ihandle* ih); +void IupDetach (Ihandle* child); +Ihandle* IupAppend (Ihandle* ih, Ihandle* child); +Ihandle* IupInsert (Ihandle* ih, Ihandle* ref_child, Ihandle* child); +Ihandle* IupGetChild (Ihandle* ih, int pos); +int IupGetChildPos (Ihandle* ih, Ihandle* child); +int IupGetChildCount(Ihandle* ih); +Ihandle* IupGetNextChild (Ihandle* ih, Ihandle* child); +Ihandle* IupGetBrother (Ihandle* ih); +Ihandle* IupGetParent (Ihandle* ih); +Ihandle* IupGetDialog (Ihandle* ih); +Ihandle* IupGetDialogChild(Ihandle* ih, const char* name); +int IupReparent (Ihandle* ih, Ihandle* new_parent); + +int IupPopup (Ihandle* ih, int x, int y); +int IupShow (Ihandle* ih); +int IupShowXY (Ihandle* ih, int x, int y); +int IupHide (Ihandle* ih); +int IupMap (Ihandle* ih); +void IupUnmap (Ihandle *ih); + +void IupSetAttribute (Ihandle* ih, const char* name, const char* value); +void IupStoreAttribute(Ihandle* ih, const char* name, const char* value); +Ihandle* IupSetAttributes (Ihandle* ih, const char *str); +char* IupGetAttribute (Ihandle* ih, const char* name); +char* IupGetAttributes (Ihandle* ih); +int IupGetInt (Ihandle* ih, const char* name); +int IupGetInt2 (Ihandle* ih, const char* name); +int IupGetIntInt (Ihandle *ih, const char* name, int *i1, int *i2); +float IupGetFloat (Ihandle* ih, const char* name); +void IupSetfAttribute (Ihandle* ih, const char* name, const char* format, ...); +int IupGetAllAttributes(Ihandle* ih, char** names, int n); +Ihandle* IupSetAtt(const char* handle_name, Ihandle* ih, const char* name, ...); + +void IupSetGlobal (const char* name, const char* value); +void IupStoreGlobal (const char* name, const char* value); +char* IupGetGlobal (const char* name); + +Ihandle* IupSetFocus (Ihandle* ih); +Ihandle* IupGetFocus (void); +Ihandle* IupPreviousField (Ihandle* ih); +Ihandle* IupNextField (Ihandle* ih); + +Icallback IupGetCallback(Ihandle* ih, const char *name); +Icallback IupSetCallback(Ihandle* ih, const char *name, Icallback func); +Ihandle* IupSetCallbacks(Ihandle* ih, const char *name, Icallback func, ...); + +Icallback IupGetFunction (const char *name); +Icallback IupSetFunction (const char *name, Icallback func); +const char* IupGetActionName (void); + +Ihandle* IupGetHandle (const char *name); +Ihandle* IupSetHandle (const char *name, Ihandle* ih); +int IupGetAllNames (char** names, int n); +int IupGetAllDialogs (char** names, int n); +char* IupGetName (Ihandle* ih); + +void IupSetAttributeHandle(Ihandle* ih, const char* name, Ihandle* ih_named); +Ihandle* IupGetAttributeHandle(Ihandle* ih, const char* name); + +char* IupGetClassName(Ihandle* ih); +char* IupGetClassType(Ihandle* ih); +int IupGetClassAttributes(const char* classname, char** names, int n); +void IupSaveClassAttributes(Ihandle* ih); +void IupSetClassDefaultAttribute(const char* classname, const char *name, const char* value); + +Ihandle* IupCreate (const char *classname); +Ihandle* IupCreatev(const char *classname, void* *params); +Ihandle* IupCreatep(const char *classname, void *first, ...); + +/************************************************************************/ +/* Elements */ +/************************************************************************/ + +Ihandle* IupFill (void); +Ihandle* IupRadio (Ihandle* child); +Ihandle* IupVbox (Ihandle* child, ...); +Ihandle* IupVboxv (Ihandle* *children); +Ihandle* IupZbox (Ihandle* child, ...); +Ihandle* IupZboxv (Ihandle* *children); +Ihandle* IupHbox (Ihandle* child,...); +Ihandle* IupHboxv (Ihandle* *children); + +Ihandle* IupNormalizer (Ihandle* ih_first, ...); +Ihandle* IupNormalizerv(Ihandle* *ih_list); + +Ihandle* IupCbox (Ihandle* child, ...); +Ihandle* IupCboxv (Ihandle* *children); +Ihandle* IupSbox (Ihandle *child); + +Ihandle* IupFrame (Ihandle* child); + +Ihandle* IupImage (int width, int height, const unsigned char *pixmap); +Ihandle* IupImageRGB (int width, int height, const unsigned char *pixmap); +Ihandle* IupImageRGBA (int width, int height, const unsigned char *pixmap); + +Ihandle* IupItem (const char* title, const char* action); +Ihandle* IupSubmenu (const char* title, Ihandle* child); +Ihandle* IupSeparator (void); +Ihandle* IupMenu (Ihandle* child,...); +Ihandle* IupMenuv (Ihandle* *children); + +Ihandle* IupButton (const char* title, const char* action); +Ihandle* IupCanvas (const char* action); +Ihandle* IupDialog (Ihandle* child); +Ihandle* IupUser (void); +Ihandle* IupLabel (const char* title); +Ihandle* IupList (const char* action); +Ihandle* IupText (const char* action); +Ihandle* IupMultiLine (const char* action); +Ihandle* IupToggle (const char* title, const char* action); +Ihandle* IupTimer (void); +Ihandle* IupClipboard (void); +Ihandle* IupProgressBar(void); +Ihandle* IupVal (const char *type); +Ihandle* IupTabs (Ihandle* child, ...); +Ihandle* IupTabsv (Ihandle* *children); +Ihandle* IupTree (void); + +Ihandle* IupSpin (void); +Ihandle* IupSpinbox (Ihandle* child); + + +/* IupImage utility */ +int IupSaveImageAsText(Ihandle* ih, const char* file_name, const char* format, const char* name); + +/* IupText utilities */ +void IupTextConvertLinColToPos(Ihandle* ih, int lin, int col, int *pos); +void IupTextConvertPosToLinCol(Ihandle* ih, int pos, int *lin, int *col); + +/* IupText, IupList and IupTree utility */ +int IupConvertXYToPos(Ihandle* ih, int x, int y); + +/* IupTree utilities */ +int IupTreeSetUserId(Ihandle* ih, int id, void* userid); +void* IupTreeGetUserId(Ihandle* ih, int id); +int IupTreeGetId(Ihandle* ih, void *userid); + +void IupTreeSetAttribute (Ihandle* ih, const char* name, int id, char* value); +void IupTreeStoreAttribute(Ihandle* ih, const char* name, int id, char* value); +char* IupTreeGetAttribute (Ihandle* ih, const char* name, int id); +int IupTreeGetInt (Ihandle* ih, const char* name, int id); +float IupTreeGetFloat (Ihandle* ih, const char* name, int id); +void IupTreeSetfAttribute (Ihandle* ih, const char* name, int id, char* format, ...); + + +/************************************************************************/ +/* Pre-definided dialogs */ +/************************************************************************/ + +Ihandle* IupFileDlg(void); +Ihandle* IupMessageDlg(void); +Ihandle* IupColorDlg(void); +Ihandle* IupFontDlg(void); + +int IupGetFile(char *arq); +void IupMessage(const char *title, const char *msg); +void IupMessagef(const char *title, const char *format, ...); +int IupAlarm(const char *title, const char *msg, const char *b1, const char *b2, const char *b3); +int IupScanf(const char *format, ...); +int IupListDialog(int type, const char *title, int size, const char** list, + int op, int max_col, int max_lin, int* marks); +int IupGetText(const char* title, char* text); +int IupGetColor(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b); + +typedef int (*Iparamcb)(Ihandle* dialog, int param_index, void* user_data); +int IupGetParam(const char* title, Iparamcb action, void* user_data, const char* format,...); +int IupGetParamv(const char* title, Iparamcb action, void* user_data, const char* format, int param_count, int param_extra, void** param_data); + + + +#ifdef __cplusplus +} +#endif + +/************************************************************************/ +/* Common Return Values */ +/************************************************************************/ +#define IUP_ERROR 1 +#define IUP_NOERROR 0 +#define IUP_OPENED -1 +#define IUP_INVALID -1 + +/************************************************************************/ +/* Callback Return Values */ +/************************************************************************/ +#define IUP_IGNORE -1 +#define IUP_DEFAULT -2 +#define IUP_CLOSE -3 +#define IUP_CONTINUE -4 + +/************************************************************************/ +/* IupPopup and IupShowXY Parameter Values */ +/************************************************************************/ +#define IUP_CENTER 0xFFFF /* 65535 */ +#define IUP_LEFT 0xFFFE /* 65534 */ +#define IUP_RIGHT 0xFFFD /* 65533 */ +#define IUP_MOUSEPOS 0xFFFC /* 65532 */ +#define IUP_CURRENT 0xFFFB /* 65531 */ +#define IUP_CENTERPARENT 0xFFFA /* 65530 */ +#define IUP_TOP IUP_LEFT +#define IUP_BOTTOM IUP_RIGHT + +/************************************************************************/ +/* SHOW_CB Callback Values */ +/************************************************************************/ +enum{IUP_SHOW, IUP_RESTORE, IUP_MINIMIZE, IUP_MAXIMIZE, IUP_HIDE}; + +/************************************************************************/ +/* SCROLL_CB Callback Values */ +/************************************************************************/ +enum{IUP_SBUP, IUP_SBDN, IUP_SBPGUP, IUP_SBPGDN, IUP_SBPOSV, IUP_SBDRAGV, + IUP_SBLEFT, IUP_SBRIGHT, IUP_SBPGLEFT, IUP_SBPGRIGHT, IUP_SBPOSH, IUP_SBDRAGH}; + +/************************************************************************/ +/* Mouse Button Values and Macros */ +/************************************************************************/ +#define IUP_BUTTON1 '1' +#define IUP_BUTTON2 '2' +#define IUP_BUTTON3 '3' +#define IUP_BUTTON4 '4' +#define IUP_BUTTON5 '5' + +#define iup_isshift(_s) (_s[0]=='S') +#define iup_iscontrol(_s) (_s[1]=='C') +#define iup_isbutton1(_s) (_s[2]=='1') +#define iup_isbutton2(_s) (_s[3]=='2') +#define iup_isbutton3(_s) (_s[4]=='3') +#define iup_isdouble(_s) (_s[5]=='D') +#define iup_isalt(_s) (_s[6]=='A') +#define iup_issys(_s) (_s[7]=='Y') +#define iup_isbutton4(_s) (_s[8]=='4') +#define iup_isbutton5(_s) (_s[9]=='5') + +/* Old definitions for backward compatibility */ +#define isshift iup_isshift +#define iscontrol iup_iscontrol +#define isbutton1 iup_isbutton1 +#define isbutton2 iup_isbutton2 +#define isbutton3 iup_isbutton3 +#define isdouble iup_isdouble +#define isalt iup_isalt +#define issys iup_issys +#define isbutton4 iup_isbutton4 +#define isbutton5 iup_isbutton5 + + +/************************************************************************/ +/* Pre-Defined Masks */ +/************************************************************************/ +#define IUP_MASK_FLOAT "[+/-]?(/d+/.?/d*|/./d+)" +#define IUP_MASK_UFLOAT "(/d+/.?/d*|/./d+)" +#define IUP_MASK_EFLOAT "[+/-]?(/d+/.?/d*|/./d+)([eE][+/-]?/d+)?" +#define IUP_MASK_INT "[+/-]?/d+" +#define IUP_MASK_UINT "/d+" + +/* Old definitions for backward compatibility */ +#define IUPMASK_FLOAT IUP_MASK_FLOAT +#define IUPMASK_UFLOAT IUP_MASK_UFLOAT +#define IUPMASK_EFLOAT IUP_MASK_EFLOAT +#define IUPMASK_INT IUP_MASK_INT +#define IUPMASK_UINT IUP_MASK_UINT + + +/************************************************************************/ +/* Replacement for the WinMain in Windows, */ +/* this allows the application to start from "main". */ +/* Used only for Watcom. */ +/************************************************************************/ +#if defined (__WATCOMC__) +#ifdef __cplusplus +extern "C" { +int IupMain (int argc, char** argv); /* In C++ we have to declare the prototype */ +} +#endif +#define main IupMain /* this is the trick for Watcom and MetroWerks */ +#endif + +/****************************************************************************** +* Copyright (C) 1994-2009 Tecgraf, PUC-Rio. +* +* Permission is hereby granted, free of charge, to any person obtaining +* a copy of this software and associated documentation files (the +* "Software"), to deal in the Software without restriction, including +* without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to +* permit persons to whom the Software is furnished to do so, subject to +* the following conditions: +* +* The above copyright notice and this permission notice shall be +* included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#endif diff --git a/iup/include/iup_pplot.h b/iup/include/iup_pplot.h new file mode 100755 index 0000000..59c3453 --- /dev/null +++ b/iup/include/iup_pplot.h @@ -0,0 +1,40 @@ +/** \file + * \brief PPlot component for Iup. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPPPLOT_H +#define __IUPPPLOT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Initialize PPlot widget class */ +void IupPPlotOpen(void); + +/* Create an PPlot widget instance */ +Ihandle* IupPPlot(void); + +/* Add dataset to plot */ +void IupPPlotBegin(Ihandle *ih, int strXdata); +void IupPPlotAdd(Ihandle *ih, float x, float y); +void IupPPlotAddStr(Ihandle *ih, const char* x, float y); +int IupPPlotEnd(Ihandle *ih); + +void IupPPlotInsertStr(Ihandle *ih, int index, int sample_index, const char* x, float y); +void IupPPlotInsert(Ihandle *ih, int index, int sample_index, float x, float y); + +/* convert from plot coordinates to pixels */ +void IupPPlotTransform(Ihandle* ih, float x, float y, int *ix, int *iy); + +/* Plot on the given device. Uses a "cdCanvas*". */ +void IupPPlotPaintTo(Ihandle *ih, void *cnv); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iupcb.h b/iup/include/iupcb.h new file mode 100755 index 0000000..1285b04 --- /dev/null +++ b/iup/include/iupcb.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupcbox.h b/iup/include/iupcbox.h new file mode 100755 index 0000000..5ae1901 --- /dev/null +++ b/iup/include/iupcbox.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupcbs.h b/iup/include/iupcbs.h new file mode 100755 index 0000000..f33166b --- /dev/null +++ b/iup/include/iupcbs.h @@ -0,0 +1,43 @@ +/** \file + * \brief Contains all function pointer typedefs. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPCBS_H +#define __IUPCBS_H + +typedef int (*IFidle)(void); /* idle */ + +typedef int (*IFn)(Ihandle*); /* default definition, same as Icallback (ncols_cb, nlines_cb)*/ +typedef int (*IFni)(Ihandle*, int); /* k_any, show_cb, toggle_action, spin_cb, branchopen_cb, branchclose_cb, executeleaf_cb, showrename_cb, rightclick_cb, extended_cb, height_cb, width_cb */ +typedef int (*IFnii)(Ihandle*, int, int); /* resize_cb, caret_cb, matrix_mousemove_cb, enteritem_cb, leaveitem_cb, scrolltop_cb, dropcheck_cb, selection_cb, select_cb, switch_cb, scrolling_cb, vspan_cb, hspan_cb */ +typedef int (*IFniii)(Ihandle*, int, int, int); /* trayclick_cb, edition_cb */ +typedef int (*IFniiii)(Ihandle*, int, int, int, int); /* dragdrop_cb */ +typedef int (*IFniiiiii)(Ihandle*, int, int, int, int, int, int); /* draw_cb */ + +typedef int (*IFnff)(Ihandle*, float, float); /* canvas_action */ +typedef int (*IFniff)(Ihandle*,int,float,float); /* scroll_cb */ +typedef int (*IFnfiis)(Ihandle*,float,int,int,char*); /* wheel_cb */ + +typedef int (*IFnnii)(Ihandle*, Ihandle*, int, int); /* drop_cb */ +typedef int (*IFnnn)(Ihandle*, Ihandle*, Ihandle*); /* tabchange_cb */ +typedef int (*IFnss)(Ihandle*, char *, char *); /* file_cb */ +typedef int (*IFns)(Ihandle*, char *); /* multiselect_cb */ +typedef int (*IFnis)(Ihandle*, int, char *); /* text_action, multiline_action, edit_cb, renamenode_cb, rename_cb */ +typedef int (*IFnsii)(Ihandle*, char*, int, int); /* list_action */ +typedef int (*IFnsiii)(Ihandle*, char*, int, int, int); /* dropfiles_cb */ +typedef int (*IFniis)(Ihandle*, int, int, char*); /* motion_cb, click_cb, value_edit_cb */ +typedef int (*IFniiiis)(Ihandle*, int, int, int, int, char*); /* button_cb, matrix_action, mousemotion_cb */ +typedef int (*IFniiiiiis)(Ihandle*, int, int, int, int, int, int, char*); /* mouseclick_cb */ + +typedef int (*IFnIi)(Ihandle*, int*, int); /* multiselection_cb, multiselection_cb */ +typedef int (*IFnd)(Ihandle*, double); /* mousemove_cb, button_press_cb, button_release_cb */ +typedef int (*IFniiIII)(Ihandle*, int, int, int*, int*, int*); /* fgcolor_cb, bgcolor_cb */ +typedef int (*IFniinsii)(Ihandle*, int, int, Ihandle*, char*, int, int); /* dropselect_cb */ +typedef int (*IFnccc)(Ihandle*, unsigned char, unsigned char, unsigned char); /* drag_cb, change_cb */ + +typedef char* (*sIFnii)(Ihandle*, int, int); /* value_cb */ +typedef char* (*sIFni)(Ihandle*, int); /* cell_cb */ + +#endif diff --git a/iup/include/iupcells.h b/iup/include/iupcells.h new file mode 100755 index 0000000..1285b04 --- /dev/null +++ b/iup/include/iupcells.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupcolorbar.h b/iup/include/iupcolorbar.h new file mode 100755 index 0000000..1285b04 --- /dev/null +++ b/iup/include/iupcolorbar.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupcontrols.h b/iup/include/iupcontrols.h new file mode 100755 index 0000000..c7bc566 --- /dev/null +++ b/iup/include/iupcontrols.h @@ -0,0 +1,46 @@ +/** \file + * \brief initializes dial, gauge, colorbrowser, colorbar controls. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPCONTROLS_H +#define __IUPCONTROLS_H + +#ifdef __cplusplus +extern "C" { +#endif + + +int IupControlsOpen(void); +void IupControlsClose(void); /* for backward compatibility only, does nothing since IUP 3 */ + +void IupOldValOpen(void); +void IupOldTabsOpen(void); + +Ihandle* IupColorbar(void); +Ihandle* IupCells(void); +Ihandle *IupColorBrowser(void); +Ihandle *IupColorBrowser(void); +Ihandle *IupGauge(void); +Ihandle *IupDial(const char* type); +Ihandle* IupMatrix(const char *action); + +/* IupMatrix utilities */ +void IupMatSetAttribute (Ihandle* ih, const char* name, int lin, int col, char* value); +void IupMatStoreAttribute(Ihandle* ih, const char* name, int lin, int col, char* value); +char* IupMatGetAttribute (Ihandle* ih, const char* name, int lin, int col); +int IupMatGetInt (Ihandle* ih, const char* name, int lin, int col); +float IupMatGetFloat (Ihandle* ih, const char* name, int lin, int col); +void IupMatSetfAttribute (Ihandle* ih, const char* name, int lin, int col, char* format, ...); + +/* Used by IupColorbar */ +#define IUP_PRIMARY -1 +#define IUP_SECONDARY -2 + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iupdef.h b/iup/include/iupdef.h new file mode 100755 index 0000000..e8f436e --- /dev/null +++ b/iup/include/iupdef.h @@ -0,0 +1,725 @@ +/** \file + * \brief Callbacks, Attributes and Attribute Values definitions. + * Avoid using these definitions. Use the strings instead. + * + * See Copyright Notice in iup.h + */ + +#ifndef __IUPDEF_H +#define __IUPDEF_H + +/* OLD definitions */ +/* Avoid using these definitions. Use the strings instead. */ +/* Define __IUPDEF_H to avoid the inclusion of this header */ + +#define IUP_RUN "RUN" +#define IUP_ENGLISH "ENGLISH" +#define IUP_PORTUGUESE "PORTUGUESE" +#define IUP_SBH "SBH" +#define IUP_SBV "SBV" + +/************************************************************************/ +/* Callbacks */ +/************************************************************************/ + +#define IUP_DEFAULT_ACTION "DEFAULT_ACTION" +#define IUP_IDLE_ACTION "IDLE_ACTION" + +#define IUP_ACTION "ACTION" +#define IUP_GETFOCUS_CB "GETFOCUS_CB" +#define IUP_KILLFOCUS_CB "KILLFOCUS_CB" +#define IUP_K_ANY "K_ANY" +#define IUP_KEYPRESS_CB "KEYPRESS_CB" +#define IUP_HELP_CB "HELP_CB" + +#define IUP_SCROLL_CB "SCROLL_CB" +#define IUP_RESIZE_CB "RESIZE_CB" +#define IUP_MOTION_CB "MOTION_CB" +#define IUP_BUTTON_CB "BUTTON_CB" +#define IUP_ENTERWINDOW_CB "ENTERWINDOW_CB" +#define IUP_LEAVEWINDOW_CB "LEAVEWINDOW_CB" +#define IUP_WHEEL_CB "WHEEL_CB" + +#define IUP_MASK_CB "MASK_CB" +#define IUP_OPEN_CB "OPEN_CB" +#define IUP_HIGHLIGHT_CB "HIGHLIGHT_CB" +#define IUP_MENUCLOSE_CB "MENUCLOSE_CB" + +#define IUP_MAP_CB "MAP_CB" +#define IUP_CLOSE_CB "CLOSE_CB" +#define IUP_SHOW_CB "SHOW_CB" + +#define IUP_DROPFILES_CB "DROPFILES_CB" +#define IUP_WOM_CB "WOM_CB" + +/************************************************************************/ +/* Attributes */ +/************************************************************************/ + +#define IUP_DIRECTION "DIRECTION" +#define IUP_ACTIVE "ACTIVE" +#define IUP_BGCOLOR "BGCOLOR" +#define IUP_FRAMECOLOR "FRAMECOLOR" +#define IUP_FGCOLOR "FGCOLOR" +#define IUP_COLOR "COLOR" +#define IUP_WID "WID" +#define IUP_SIZE "SIZE" +#define IUP_RASTERSIZE "RASTERSIZE" +#define IUP_TITLE "TITLE" +#define IUP_VALUE "VALUE" +#define IUP_VISIBLE "VISIBLE" +#define IUP_FONT "FONT" +#define IUP_TIP "TIP" +#define IUP_EXPAND "EXPAND" +#define IUP_SEPARATOR "SEPARATOR" + +#define IUP_HOTSPOT "HOTSPOT" +#define IUP_HEIGHT "HEIGHT" +#define IUP_WIDTH "WIDTH" + +#define IUP_KEY "KEY" + +#define IUP_MULTIPLE "MULTIPLE" +#define IUP_DROPDOWN "DROPDOWN" +#define IUP_VISIBLE_ITEMS "VISIBLE_ITEMS" + +#define IUP_MARGIN "MARGIN" +#define IUP_GAP "GAP" +#define IUP_ALIGNMENT "ALIGNMENT" + +#define IUP_IMAGE "IMAGE" +#define IUP_IMINACTIVE "IMINACTIVE" +#define IUP_IMPRESS "IMPRESS" +#define IUP_WIN_SAVEBITS "WIN_SAVEBITS" + +#define IUP_NC "NC" +#define IUP_MASK "MASK" + +#define IUP_APPEND "APPEND" +#define IUP_BORDER "BORDER" + +#define IUP_CARET "CARET" +#define IUP_SELECTION "SELECTION" +#define IUP_SELECTEDTEXT "SELECTEDTEXT" +#define IUP_INSERT "INSERT" + +#define IUP_CONID "CONID" +#define IUP_CURSOR "CURSOR" + +#define IUP_ICON "ICON" +#define IUP_MENUBOX "MENUBOX" +#define IUP_MINBOX "MINBOX" +#define IUP_MAXBOX "MAXBOX" +#define IUP_RESIZE "RESIZE" +#define IUP_MENU "MENU" +#define IUP_STARTFOCUS "STARTFOCUS" +#define IUP_PARENTDIALOG "PARENTDIALOG" +#define IUP_SHRINK "SHRINK" +#define IUP_DEFAULTENTER "DEFAULTENTER" +#define IUP_DEFAULTESC "DEFAULTESC" +#define IUP_X "X" +#define IUP_Y "Y" +#define IUP_TOOLBOX "TOOLBOX" +#define IUP_CONTROL "CONTROL" +#define IUP_READONLY "READONLY" + +#define IUP_SCROLLBAR "SCROLLBAR" +#define IUP_POSY "POSY" +#define IUP_POSX "POSX" +#define IUP_DX "DX" +#define IUP_DY "DY" +#define IUP_XMAX "XMAX" +#define IUP_XMIN "XMIN" +#define IUP_YMAX "YMAX" +#define IUP_YMIN "YMIN" + +#define IUP_RED "255 0 0" +#define IUP_GREEN "0 255 0" +#define IUP_BLUE "0 0 255" + +#define IUP_MIN "MIN" +#define IUP_MAX "MAX" + +#define IUP_TIME "TIME" +#define IUP_DRAG "DRAG" +#define IUP_DROP "DROP" +#define IUP_REPAINT "REPAINT" +#define IUP_TOPMOST "TOPMOST" +#define IUP_CLIPCHILDREN "CLIPCHILDREN" + +#define IUP_DIALOGTYPE "DIALOGTYPE" +#define IUP_FILE "FILE" +#define IUP_MULTIPLEFILES "MULTIPLEFILES" +#define IUP_FILTER "FILTER" +#define IUP_FILTERUSED "FILTERUSED" +#define IUP_FILTERINFO "FILTERINFO" +#define IUP_EXTFILTER "EXTFILTER" +#define IUP_DIRECTORY "DIRECTORY" +#define IUP_ALLOWNEW "ALLOWNEW" +#define IUP_NOOVERWRITEPROMPT "NOOVERWRITEPROMPT" +#define IUP_NOCHANGEDIR "NOCHANGEDIR" +#define IUP_FILEEXIST "FILEEXIST" +#define IUP_STATUS "STATUS" + +#define IUP_LOCKLOOP "LOCKLOOP" +#define IUP_SYSTEM "SYSTEM" +#define IUP_DRIVER "DRIVER" +#define IUP_SCREENSIZE "SCREENSIZE" +#define IUP_SYSTEMLANGUAGE "SYSTEMLANGUAGE" +#define IUP_COMPUTERNAME "COMPUTERNAME" +#define IUP_USERNAME "USERNAME" + +#define IUP_OPEN "OPEN" +#define IUP_SAVE "SAVE" +#define IUP_DIR "DIR" + +#define IUP_HORIZONTAL "HORIZONTAL" +#define IUP_VERTICAL "VERTICAL" + +/************************************************************************/ +/* Attribute Values */ +/************************************************************************/ + +#define IUP_YES "YES" +#define IUP_NO "NO" +#define IUP_ON "ON" +#define IUP_OFF "OFF" + +#define IUP_ACENTER "ACENTER" +#define IUP_ALEFT "ALEFT" +#define IUP_ARIGHT "ARIGHT" +#define IUP_ATOP "ATOP" +#define IUP_ABOTTOM "ABOTTOM" + +#define IUP_NORTH "NORTH" +#define IUP_SOUTH "SOUTH" +#define IUP_WEST "WEST" +#define IUP_EAST "EAST" +#define IUP_NE "NE" +#define IUP_SE "SE" +#define IUP_NW "NW" +#define IUP_SW "SW" + +#define IUP_FULLSCREEN "FULLSCREEN" +#define IUP_FULL "FULL" +#define IUP_HALF "HALF" +#define IUP_THIRD "THIRD" +#define IUP_QUARTER "QUARTER" +#define IUP_EIGHTH "EIGHTH" + +#define IUP_ARROW "ARROW" +#define IUP_BUSY "BUSY" +#define IUP_RESIZE_N "RESIZE_N" +#define IUP_RESIZE_S "RESIZE_S" +#define IUP_RESIZE_E "RESIZE_E" +#define IUP_RESIZE_W "RESIZE_W" +#define IUP_RESIZE_NE "RESIZE_NE" +#define IUP_RESIZE_NW "RESIZE_NW" +#define IUP_RESIZE_SE "RESIZE_SE" +#define IUP_RESIZE_SW "RESIZE_SW" +#define IUP_MOVE "MOVE" +#define IUP_HAND "HAND" +#define IUP_NONE "NONE" +#define IUP_IUP "IUP" +#define IUP_CROSS "CROSS" +#define IUP_PEN "PEN" +#define IUP_TEXT "TEXT" +#define IUP_RESIZE_C "RESIZE_C" +#define IUP_OPENHAND "OPENHAND" + +/*****************/ +/* Fonts */ +/*****************/ + +#define IUP_HELVETICA_NORMAL_8 "HELVETICA_NORMAL_8" +#define IUP_HELVETICA_ITALIC_8 "HELVETICA_ITALIC_8" +#define IUP_HELVETICA_BOLD_8 "HELVETICA_BOLD_8" +#define IUP_HELVETICA_NORMAL_10 "HELVETICA_NORMAL_10" +#define IUP_HELVETICA_ITALIC_10 "HELVETICA_ITALIC_10" +#define IUP_HELVETICA_BOLD_10 "HELVETICA_BOLD_10" +#define IUP_HELVETICA_NORMAL_12 "HELVETICA_NORMAL_12" +#define IUP_HELVETICA_ITALIC_12 "HELVETICA_ITALIC_12" +#define IUP_HELVETICA_BOLD_12 "HELVETICA_BOLD_12" +#define IUP_HELVETICA_NORMAL_14 "HELVETICA_NORMAL_14" +#define IUP_HELVETICA_ITALIC_14 "HELVETICA_ITALIC_14" +#define IUP_HELVETICA_BOLD_14 "HELVETICA_BOLD_14" +#define IUP_COURIER_NORMAL_8 "COURIER_NORMAL_8" +#define IUP_COURIER_ITALIC_8 "COURIER_ITALIC_8" +#define IUP_COURIER_BOLD_8 "COURIER_BOLD_8" +#define IUP_COURIER_NORMAL_10 "COURIER_NORMAL_10" +#define IUP_COURIER_ITALIC_10 "COURIER_ITALIC_10" +#define IUP_COURIER_BOLD_10 "COURIER_BOLD_10" +#define IUP_COURIER_NORMAL_12 "COURIER_NORMAL_12" +#define IUP_COURIER_ITALIC_12 "COURIER_ITALIC_12" +#define IUP_COURIER_BOLD_12 "COURIER_BOLD_12" +#define IUP_COURIER_NORMAL_14 "COURIER_NORMAL_14" +#define IUP_COURIER_ITALIC_14 "COURIER_ITALIC_14" +#define IUP_COURIER_BOLD_14 "COURIER_BOLD_14" +#define IUP_TIMES_NORMAL_8 "TIMES_NORMAL_8" +#define IUP_TIMES_ITALIC_8 "TIMES_ITALIC_8" +#define IUP_TIMES_BOLD_8 "TIMES_BOLD_8" +#define IUP_TIMES_NORMAL_10 "TIMES_NORMAL_10" +#define IUP_TIMES_ITALIC_10 "TIMES_ITALIC_10" +#define IUP_TIMES_BOLD_10 "TIMES_BOLD_10" +#define IUP_TIMES_NORMAL_12 "TIMES_NORMAL_12" +#define IUP_TIMES_ITALIC_12 "TIMES_ITALIC_12" +#define IUP_TIMES_BOLD_12 "TIMES_BOLD_12" +#define IUP_TIMES_NORMAL_14 "TIMES_NORMAL_14" +#define IUP_TIMES_ITALIC_14 "TIMES_ITALIC_14" +#define IUP_TIMES_BOLD_14 "TIMES_BOLD_14" + +/************************************************************************/ +/* Keys */ +/************************************************************************/ + +#define IUP_K_exclam "K_exclam" +#define IUP_K_quotedbl "K_quotedbl" +#define IUP_K_numbersign "K_numbersign" +#define IUP_K_dollar "K_dollar" +#define IUP_K_percent "K_percent" +#define IUP_K_ampersand "K_ampersand" +#define IUP_K_quoteright "K_quoteright" +#define IUP_K_parentleft "K_parentleft" +#define IUP_K_parentright "K_parentright" +#define IUP_K_asterisk "K_asterisk" +#define IUP_K_plus "K_plus" +#define IUP_K_comma "K_comma" +#define IUP_K_minus "K_minus" +#define IUP_K_period "K_period" +#define IUP_K_slash "K_slash" +#define IUP_K_0 "K_0" +#define IUP_K_1 "K_1" +#define IUP_K_2 "K_2" +#define IUP_K_3 "K_3" +#define IUP_K_4 "K_4" +#define IUP_K_5 "K_5" +#define IUP_K_6 "K_6" +#define IUP_K_7 "K_7" +#define IUP_K_8 "K_8" +#define IUP_K_9 "K_9" +#define IUP_K_colon "K_colon" +#define IUP_K_semicolon "K_semicolon " +#define IUP_K_less "K_less" +#define IUP_K_equal "K_equal" +#define IUP_K_greater "K_greater" +#define IUP_K_question "K_question" +#define IUP_K_at "K_at" +#define IUP_K_A "K_A" +#define IUP_K_B "K_B" +#define IUP_K_C "K_C" +#define IUP_K_D "K_D" +#define IUP_K_E "K_E" +#define IUP_K_F "K_F" +#define IUP_K_G "K_G" +#define IUP_K_H "K_H" +#define IUP_K_I "K_I" +#define IUP_K_J "K_J" +#define IUP_K_K "K_K" +#define IUP_K_L "K_L" +#define IUP_K_M "K_M" +#define IUP_K_N "K_N" +#define IUP_K_O "K_O" +#define IUP_K_P "K_P" +#define IUP_K_Q "K_Q" +#define IUP_K_R "K_R" +#define IUP_K_S "K_S" +#define IUP_K_T "K_T" +#define IUP_K_U "K_U" +#define IUP_K_V "K_V" +#define IUP_K_W "K_W" +#define IUP_K_X "K_X" +#define IUP_K_Y "K_Y" +#define IUP_K_Z "K_Z" +#define IUP_K_bracketleft "K_bracketleft" +#define IUP_K_backslash "K_backslash" +#define IUP_K_bracketright "K_bracketright" +#define IUP_K_circum "K_circum" +#define IUP_K_underscore "K_underscore" +#define IUP_K_quoteleft "K_quoteleft" +#define IUP_K_a "K_a" +#define IUP_K_b "K_b" +#define IUP_K_c "K_c" +#define IUP_K_d "K_d" +#define IUP_K_e "K_e" +#define IUP_K_f "K_f" +#define IUP_K_g "K_g" +#define IUP_K_h "K_h" +#define IUP_K_i "K_i" +#define IUP_K_j "K_j" +#define IUP_K_k "K_k" +#define IUP_K_l "K_l" +#define IUP_K_m "K_m" +#define IUP_K_n "K_n" +#define IUP_K_o "K_o" +#define IUP_K_p "K_p" +#define IUP_K_q "K_q" +#define IUP_K_r "K_r" +#define IUP_K_s "K_s" +#define IUP_K_t "K_t" +#define IUP_K_u "K_u" +#define IUP_K_v "K_v" +#define IUP_K_w "K_w" +#define IUP_K_x "K_x" +#define IUP_K_y "K_y" +#define IUP_K_z "K_z" +#define IUP_K_braceleft "K_braceleft" +#define IUP_K_bar "K_bar" +#define IUP_K_braceright "K_braceright" +#define IUP_K_tilde "K_tilde" + +#define IUP_K_cA "K_cA" +#define IUP_K_cB "K_cB" +#define IUP_K_cC "K_cC" +#define IUP_K_cD "K_cD" +#define IUP_K_cE "K_cE" +#define IUP_K_cF "K_cF" +#define IUP_K_cG "K_cG" +#define IUP_K_cJ "K_cJ" +#define IUP_K_cK "K_cK" +#define IUP_K_cL "K_cL" +#define IUP_K_cN "K_cN" +#define IUP_K_cO "K_cO" +#define IUP_K_cP "K_cP" +#define IUP_K_cQ "K_cQ" +#define IUP_K_cR "K_cR" +#define IUP_K_cS "K_cS" +#define IUP_K_cT "K_cT" +#define IUP_K_cU "K_cU" +#define IUP_K_cV "K_cV" +#define IUP_K_cW "K_cW" +#define IUP_K_cX "K_cX" +#define IUP_K_cY "K_cY" +#define IUP_K_cZ "K_cZ" +#define IUP_K_mA "K_mA" +#define IUP_K_mB "K_mB" +#define IUP_K_mC "K_mC" +#define IUP_K_mD "K_mD" +#define IUP_K_mE "K_mE" +#define IUP_K_mF "K_mF" +#define IUP_K_mG "K_mG" +#define IUP_K_mH "K_mH" +#define IUP_K_mI "K_mI" +#define IUP_K_mJ "K_mJ" +#define IUP_K_mK "K_mK" +#define IUP_K_mL "K_mL" +#define IUP_K_mM "K_mM" +#define IUP_K_mN "K_mN" +#define IUP_K_mO "K_mO" +#define IUP_K_mP "K_mP" +#define IUP_K_mQ "K_mQ" +#define IUP_K_mR "K_mR" +#define IUP_K_mS "K_mS" +#define IUP_K_mT "K_mT" +#define IUP_K_mU "K_mU" +#define IUP_K_mV "K_mV" +#define IUP_K_mW "K_mW" +#define IUP_K_mX "K_mX" +#define IUP_K_mY "K_mY" +#define IUP_K_mZ "K_mZ" +#define IUP_K_BS "K_BS" +#define IUP_K_TAB "K_TAB" +#define IUP_K_CR "K_CR" +#define IUP_K_SP "K_SP" +#define IUP_K_ESC "K_ESC" +#define IUP_K_sCR "K_sCR" +#define IUP_K_sTAB "K_sTAB" +#define IUP_K_cTAB "K_cTAB" +#define IUP_K_mTAB "K_mTAB" +#define IUP_K_HOME "K_HOME" +#define IUP_K_UP "K_UP" +#define IUP_K_PGUP "K_PGUP" +#define IUP_K_LEFT "K_LEFT" +#define IUP_K_RIGHT "K_RIGHT" +#define IUP_K_END "K_END" +#define IUP_K_DOWN "K_DOWN" +#define IUP_K_PGDN "K_PGDN" +#define IUP_K_MIDDLE "K_MIDDLE" +#define IUP_K_INS "K_INS" +#define IUP_K_DEL "K_DEL" +#define IUP_K_sHOME "K_sHOME" +#define IUP_K_sUP "K_sUP" +#define IUP_K_sPGUP "K_sPGUP" +#define IUP_K_sLEFT "K_sLEFT" +#define IUP_K_sRIGHT "K_sRIGHT" +#define IUP_K_sEND "K_sEND" +#define IUP_K_sDOWN "K_sDOWN" +#define IUP_K_sPGDN "K_sPGDN" +#define IUP_K_cHOME "K_cHOME" +#define IUP_K_cPGUP "K_cPGUP" +#define IUP_K_cLEFT "K_cLEFT" +#define IUP_K_cRIGHT "K_cRIGHT" +#define IUP_K_cEND "K_cEND" +#define IUP_K_cPGDN "K_cPGDN" +#define IUP_K_cUP "K_cUP" +#define IUP_K_cDOWN "K_cDOWN" +#define IUP_K_cMIDDLE "K_cMIDDLE" +#define IUP_K_cINS "K_cINS" +#define IUP_K_cDEL "K_cDEL" +#define IUP_K_mHOME "K_mHOME" +#define IUP_K_mPGUP "K_mPGUP" +#define IUP_K_mLEFT "K_mLEFT" +#define IUP_K_mRIGHT "K_mRIGHT" +#define IUP_K_mEND "K_mEND" +#define IUP_K_mPGDN "K_mPGDN" +#define IUP_K_mUP "K_mUP" +#define IUP_K_mDOWN "K_mDOWN" +#define IUP_K_mINS "K_mINS" +#define IUP_K_mDEL "K_mDEL" +#define IUP_K_F1 "K_F1" +#define IUP_K_F2 "K_F2" +#define IUP_K_F3 "K_F3" +#define IUP_K_F4 "K_F4" +#define IUP_K_F5 "K_F5" +#define IUP_K_F6 "K_F6" +#define IUP_K_F7 "K_F7" +#define IUP_K_F8 "K_F8" +#define IUP_K_F9 "K_F9" +#define IUP_K_F10 "K_F10" +#define IUP_K_F11 "K_F11" +#define IUP_K_F12 "K_F12" +#define IUP_K_sF1 "K_sF1" +#define IUP_K_sF2 "K_sF2" +#define IUP_K_sF3 "K_sF3" +#define IUP_K_sF4 "K_sF4" +#define IUP_K_sF5 "K_sF5" +#define IUP_K_sF6 "K_sF6" +#define IUP_K_sF7 "K_sF7" +#define IUP_K_sF8 "K_sF8" +#define IUP_K_sF9 "K_sF9" +#define IUP_K_sF10 "K_sF10" +#define IUP_K_sF11 "K_sF11" +#define IUP_K_sF12 "K_sF12" +#define IUP_K_cF1 "K_cF1" +#define IUP_K_cF2 "K_cF2" +#define IUP_K_cF3 "K_cF3" +#define IUP_K_cF4 "K_cF4" +#define IUP_K_cF5 "K_cF5" +#define IUP_K_cF6 "K_cF6" +#define IUP_K_cF7 "K_cF7" +#define IUP_K_cF8 "K_cF8" +#define IUP_K_cF9 "K_cF9" +#define IUP_K_cF10 "K_cF10" +#define IUP_K_cF11 "K_cF11" +#define IUP_K_cF12 "K_cF12" +#define IUP_K_mF1 "K_mF1" +#define IUP_K_mF2 "K_mF2" +#define IUP_K_mF3 "K_mF3" +#define IUP_K_mF4 "K_mF4" +#define IUP_K_mF5 "K_mF5" +#define IUP_K_mF6 "K_mF6" +#define IUP_K_mF7 "K_mF7" +#define IUP_K_mF8 "K_mF8" +#define IUP_K_mF9 "K_mF9" +#define IUP_K_mF10 "K_mF10" +#define IUP_K_m1 "K_m1" +#define IUP_K_m2 "K_m2" +#define IUP_K_m3 "K_m3" +#define IUP_K_m4 "K_m4" +#define IUP_K_m5 "K_m5" +#define IUP_K_m6 "K_m6" +#define IUP_K_m7 "K_m7" +#define IUP_K_m8 "K_m8" +#define IUP_K_m9 "K_m9" +#define IUP_K_m0 "K_m0" + +/************/ +/* Colorbar */ +/************/ + +#define IUP_NUM_PARTS "NUM_PARTS" +#define IUP_NUM_CELLS "NUM_CELLS" +#define IUP_CELL "CELL" +#define IUP_PREVIEW_SIZE "PREVIEW_SIZE" +#define IUP_SHOW_PREVIEW "SHOW_PREVIEW" +#define IUP_SHOW_SECONDARY "SHOW_SECONDARY" +#define IUP_PRIMARY_CELL "PRIMARY_CELL" +#define IUP_SECONDARY_CELL "SECONDARY_CELL" +#define IUP_ORIENTATION "ORIENTATION" +#define IUP_SQUARED "SQUARED" +#define IUP_SHADOWED "SHADOWED" +#define IUP_BUFFERIZE "BUFFERIZE" +#define IUP_TRANSPARENCY "TRANSPARENCY" +#define IUP_CELL_CB "CELL_CB" +#define IUP_EXTENDED_CB "EXTENDED_CB" +#define IUP_SELECT_CB "SELECT_CB" +#define IUP_SWITCH_CB "SWITCH_CB" +#define IUP_VERTICAL "VERTICAL" +#define IUP_HORIZONTAL "HORIZONTAL" + +/************/ +/* Cells */ +/************/ + +#define IUP_ALL "ALL" +#define IUP_BOXED "BOXED" +#define IUP_CLIPPED "CLIPPED" +#define IUP_TRANSPARENT "TRANSPARENT" +#define IUP_NON_SCROLLABLE_LINES "NON_SCROLLABLE_LINES" +#define IUP_NON_SCROLLABLE_COLS "NON_SCROLLABLE_COLS" +#define IUP_ORIGIN "ORIGIN" +#define IUP_NO_COLOR "NO_COLOR" +#define IUP_FIRST_LINE "FIRST_LINE" +#define IUP_FIRST_COL "FIRST_COL" +#define IUP_DOUBLE_BUFFER "DOUBLE_BUFFER" +#define IUP_LIMITS "LIMITS" +#define IUP_CANVAS "CANVAS" +#define IUP_IMAGE_CANVAS "IMAGE_CANVAS" +#define IUP_FULL_VISIBLE "FULL_VISIBLE" +#define IUP_MOUSECLICK_CB "MOUSECLICK_CB" +#define IUP_MOUSEMOTION_CB "MOUSEMOTION_CB" +#define IUP_DRAW_CB "DRAW_CB" +#define IUP_WIDTH_CB "WIDTH_CB" +#define IUP_HEIGHT_CB "HEIGHT_CB" +#define IUP_NLINES_CB "NLINES_CB" +#define IUP_NCOLS_CB "NCOLS_CB" +#define IUP_HSPAN_CB "HSPAN_CB" +#define IUP_VSPAN_CB "VSPAN_CB" +#define IUP_SCROLLING_CB "SCROLLING_CB" + +/*****************/ +/* ColorBrowser */ +/*****************/ + +#define IUP_RGB "RGB" +#define IUP_CHANGE_CB "CHANGE_CB" +#define IUP_DRAG_CB "DRAG_CB" + +/*****************/ +/* Val */ +/*****************/ + +#define ICTL_MOUSEMOVE_CB "MOUSEMOVE_CB" +#define ICTL_BUTTON_PRESS_CB "BUTTON_PRESS_CB" +#define ICTL_BUTTON_RELEASE_CB "BUTTON_RELEASE_CB" +#define ICTL_HORIZONTAL "HORIZONTAL" +#define ICTL_VERTICAL "VERTICAL" +#define ICTL_SHOWTICKS "SHOWTICKS" + +/*****************/ +/* Tabs */ +/*****************/ + +#define ICTL_TOP "TOP" +#define ICTL_BOTTOM "BOTTOM" +#define ICTL_LEFT "LEFT" +#define ICTL_RIGHT "RIGHT" +#define ICTL_TABTYPE "TABTYPE" +#define ICTL_TABTITLE "TABTITLE" +#define ICTL_TABSIZE "TABSIZE" +#define ICTL_TABCHANGE_CB "TABCHANGE_CB" +#define ICTL_FONT "FONT" +#define ICTL_FONT_ACTIVE "FONT_ACTIVE" +#define ICTL_FONT_INACTIVE "FONT_INACTIVE" + +/*****************/ +/* Gauge */ +/*****************/ + +#define ICTL_SHOW_TEXT "SHOW_TEXT" +#define ICTL_DASHED "DASHED" +#define ICTL_MARGIN "MARGIN" +#define ICTL_TEXT "TEXT" + +/*****************/ +/* Dial */ +/*****************/ + +#define ICTL_DENSITY "DENSITY" +#define ICTL_HORIZONTAL "HORIZONTAL" +#define ICTL_VERTICAL "VERTICAL" +#define ICTL_CIRCULAR "CIRCULAR" +#define ICTL_UNIT "UNIT" + +/*****************/ +/* Matrix */ +/*****************/ + +#define IUP_ENTERITEM_CB "ENTERITEM_CB" +#define IUP_LEAVEITEM_CB "LEAVEITEM_CB" +#define IUP_EDITION_CB "EDITION_CB" +#define IUP_CLICK_CB "CLICK_CB" +#define IUP_DROP_CB "DROP_CB" +#define IUP_DROPSELECT_CB "DROPSELECT_CB" +#define IUP_DROPCHECK_CB "DROPCHECK_CB" +#define IUP_SCROLL_CB "SCROLL_CB" +#define IUP_VALUE_CB "VALUE_CB" +#define IUP_VALUE_EDIT_CB "VALUE_EDIT_CB" +#define IUP_FIELD_CB "FIELD_CB" +#define IUP_RESIZEMATRIX "RESIZEMATRIX" +#define IUP_ADDLIN "ADDLIN" +#define IUP_ADDCOL "ADDCOL" +#define IUP_DELLIN "DELLIN" +#define IUP_DELCOL "DELCOL" +#define IUP_NUMLIN "NUMLIN" +#define IUP_NUMCOL "NUMCOL" +#define IUP_NUMLIN_VISIBLE "NUMLIN_VISIBLE" +#define IUP_NUMCOL_VISIBLE "NUMCOL_VISIBLE" +#define IUP_MARKED "MARKED" +#define IUP_WIDTHDEF "WIDTHDEF" +#define IUP_HEIGHTDEF "HEIGHTDEF" +#define IUP_AREA "AREA" +#define IUP_MARK_MODE "MARK_MODE" +#define IUP_LIN "LIN" +#define IUP_COL "COL" +#define IUP_LINCOL "LINCOL" +#define IUP_CELL "CELL" +#define IUP_EDIT_MODE "EDIT_MODE" +#define IUP_FOCUS_CELL "FOCUS_CELL" +#define IUP_ORIGIN "ORIGIN" +#define IUP_REDRAW "REDRAW" +#define IUP_PREVIOUSVALUE "PREVIOUSVALUE" +#define IUP_MOUSEMOVE_CB "MOUSEMOVE_CB" + +/*****************/ +/* Tree */ +/*****************/ + +#define IUP_ADDLEAF "ADDLEAF" +#define IUP_ADDBRANCH "ADDBRANCH" +#define IUP_DELNODE "DELNODE" +#define IUP_IMAGELEAF "IMAGELEAF" +#define IUP_IMAGEBRANCHCOLLAPSED "IMAGEBRANCHCOLLAPSED" +#define IUP_IMAGEBRANCHEXPANDED "IMAGEBRANCHEXPANDED" +#define IUP_IMAGEEXPANDED "IMAGEEXPANDED" +#define IUP_KIND "KIND" +#define IUP_PARENT "PARENT" +#define IUP_DEPTH "DEPTH" +#define IUP_MARKED "MARKED" +#define IUP_ADDEXPANDED "ADDEXPANDED" +#define IUP_CTRL "CTRL" +#define IUP_SHIFT "SHIFT" +#define IUP_STATE "STATE" +#define IUP_STARTING "STARTING" +#define IUP_LEAF "LEAF" +#define IUP_BRANCH "BRANCH" +#define IUP_SELECTED "SELECTED" +#define IUP_CHILDREN "CHILDREN" +#define IUP_MARKED "MARKED" +#define IUP_ROOT "ROOT" +#define IUP_LAST "LAST" +#define IUP_PGUP "PGUP" +#define IUP_PGDN "PGDN" +#define IUP_NEXT "NEXT" +#define IUP_PREVIOUS "PREVIOUS" +#define IUP_INVERT "INVERT" +#define IUP_BLOCK "BLOCK" +#define IUP_CLEARALL "CLEARALL" +#define IUP_MARKALL "MARKALL" +#define IUP_INVERTALL "INVERTALL" +#define IUP_REDRAW "REDRAW" +#define IUP_COLLAPSED "COLLAPSED" +#define IUP_EXPANDED "EXPANDED" +#define IUP_SELECTION_CB "SELECTION_CB" +#define IUP_BRANCHOPEN_CB "BRANCHOPEN_CB" +#define IUP_BRANCHCLOSE_CB "BRANCHCLOSE_CB" +#define IUP_RIGHTCLICK_CB "RIGHTCLICK_CB" +#define IUP_EXECUTELEAF_CB "EXECUTELEAF_CB" +#define IUP_RENAMENODE_CB "RENAMENODE_CB" +#define IUP_IMGLEAF "IMGLEAF" +#define IUP_IMGCOLLAPSED "IMGCOLLAPSED" +#define IUP_IMGEXPANDED "IMGEXPANDED" +#define IUP_IMGBLANK "IMGBLANK" +#define IUP_IMGPAPER "IMGPAPER" + +#endif + diff --git a/iup/include/iupdial.h b/iup/include/iupdial.h new file mode 100755 index 0000000..1285b04 --- /dev/null +++ b/iup/include/iupdial.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupgauge.h b/iup/include/iupgauge.h new file mode 100755 index 0000000..1285b04 --- /dev/null +++ b/iup/include/iupgauge.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupgc.h b/iup/include/iupgc.h new file mode 100755 index 0000000..5ae1901 --- /dev/null +++ b/iup/include/iupgc.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupgetparam.h b/iup/include/iupgetparam.h new file mode 100755 index 0000000..5ae1901 --- /dev/null +++ b/iup/include/iupgetparam.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupgl.h b/iup/include/iupgl.h new file mode 100755 index 0000000..2f258c7 --- /dev/null +++ b/iup/include/iupgl.h @@ -0,0 +1,96 @@ +/** \file + * \brief OpenGL canvas for Iup. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPGL_H +#define __IUPGL_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Attributes +** To set the appropriate visual (pixel format) the following +** attributes may be specified. Their values should be set +** before the canvas is mapped to the scrren. +** After mapping, changing their values has no effect. +*/ +#ifndef IUP_BUFFER /* IUP_SINGLE (defaut) or IUP_DOUBLE */ +#define IUP_BUFFER "BUFFER" +#endif +#ifndef IUP_STEREO /* IUP_NO (defaut) or IUP_YES */ +#define IUP_STEREO "STEREO" +#endif +#ifndef IUP_BUFFER_SIZE /* Number of bits if index mode */ +#define IUP_BUFFER_SIZE "BUFFER_SIZE" +#endif +#ifndef IUP_RED_SIZE /* Number of red bits */ +#define IUP_RED_SIZE "RED_SIZE" +#endif +#ifndef IUP_GREEN_SIZE /* Number of green bits */ +#define IUP_GREEN_SIZE "GREEN_SIZE" +#endif +#ifndef IUP_BLUE_SIZE /* Number of blue bits */ +#define IUP_BLUE_SIZE "BLUE_SIZE" +#endif +#ifndef IUP_ALPHA_SIZE /* Number of alpha bits */ +#define IUP_ALPHA_SIZE "ALPHA_SIZE" +#endif +#ifndef IUP_DEPTH_SIZE /* Number of bits in depth buffer */ +#define IUP_DEPTH_SIZE "DEPTH_SIZE" +#endif +#ifndef IUP_STENCIL_SIZE /* Number of bits in stencil buffer */ +#define IUP_STENCIL_SIZE "STENCIL_SIZE" +#endif +#ifndef IUP_ACCUM_RED_SIZE /* Number of red bits in accum. buffer */ +#define IUP_ACCUM_RED_SIZE "ACCUM_RED_SIZE" +#endif +#ifndef IUP_ACCUM_GREEN_SIZE /* Number of green bits in accum. buffer */ +#define IUP_ACCUM_GREEN_SIZE "ACCUM_GREEN_SIZE" +#endif +#ifndef IUP_ACCUM_BLUE_SIZE /* Number of blue bits in accum. buffer */ +#define IUP_ACCUM_BLUE_SIZE "ACCUM_BLUE_SIZE" +#endif +#ifndef IUP_ACCUM_ALPHA_SIZE /* Number of alpha bits in accum. buffer */ +#define IUP_ACCUM_ALPHA_SIZE "ACCUM_ALPHA_SIZE" +#endif + + +/* Attribute values */ +#ifndef IUP_DOUBLE +#define IUP_DOUBLE "DOUBLE" +#endif +#ifndef IUP_SINGLE +#define IUP_SINGLE "SINGLE" +#endif +#ifndef IUP_INDEX +#define IUP_INDEX "INDEX" +#endif +#ifndef IUP_RGBA +#define IUP_RGBA "RGBA" +#endif +#ifndef IUP_YES +#define IUP_YES "YES" +#endif +#ifndef IUP_NO +#define IUP_NO "NO" +#endif + +void IupGLCanvasOpen(void); + +Ihandle *IupGLCanvas(const char *action); + +void IupGLMakeCurrent(Ihandle* ih); +int IupGLIsCurrent(Ihandle* ih); +void IupGLSwapBuffers(Ihandle* ih); +void IupGLPalette(Ihandle* ih, int index, float r, float g, float b); +void IupGLUseFont(Ihandle* ih, int first, int count, int list_base); +void IupGLWait(int gl); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iupim.h b/iup/include/iupim.h new file mode 100755 index 0000000..03b712c --- /dev/null +++ b/iup/include/iupim.h @@ -0,0 +1,27 @@ +/** \file + * \brief Utilities using IM + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPIM_H +#define __IUPIM_H + +#if defined(__cplusplus) +extern "C" { +#endif + +Ihandle* IupLoadImage(const char* file_name); +int IupSaveImage(Ihandle* ih, const char* file_name, const char* format); + +#ifdef __IM_IMAGE_H +imImage* IupGetNativeHandleImage(void* handle); +void* IupGetImageNativeHandle(imImage* image); +#endif + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/iup/include/iupkey.h b/iup/include/iupkey.h new file mode 100755 index 0000000..b80c47e --- /dev/null +++ b/iup/include/iupkey.h @@ -0,0 +1,457 @@ +/** \file + * \brief Keyboard Keys definitions. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPKEY_H +#define __IUPKEY_H + +/* from 32 to 126, all character sets are equal, + the key code i the same as the character code. */ + +#define K_SP ' ' /* 32 (0x20) */ +#define K_exclam '!' /* 33 */ +#define K_quotedbl '\"' /* 34 */ +#define K_numbersign '#' /* 35 */ +#define K_dollar '$' /* 36 */ +#define K_percent '%' /* 37 */ +#define K_ampersand '&' /* 38 */ +#define K_apostrophe '\'' /* 39 */ +#define K_parentleft '(' /* 40 */ +#define K_parentright ')' /* 41 */ +#define K_asterisk '*' /* 42 */ +#define K_plus '+' /* 43 */ +#define K_comma ',' /* 44 */ +#define K_minus '-' /* 45 */ +#define K_period '.' /* 46 */ +#define K_slash '/' /* 47 */ +#define K_0 '0' /* 48 (0x30) */ +#define K_1 '1' /* 49 */ +#define K_2 '2' /* 50 */ +#define K_3 '3' /* 51 */ +#define K_4 '4' /* 52 */ +#define K_5 '5' /* 53 */ +#define K_6 '6' /* 54 */ +#define K_7 '7' /* 55 */ +#define K_8 '8' /* 56 */ +#define K_9 '9' /* 57 */ +#define K_colon ':' /* 58 */ +#define K_semicolon ';' /* 59 */ +#define K_less '<' /* 60 */ +#define K_equal '=' /* 61 */ +#define K_greater '>' /* 62 */ +#define K_question '?' /* 63 */ +#define K_at '@' /* 64 */ +#define K_A 'A' /* 65 (0x41) */ +#define K_B 'B' /* 66 */ +#define K_C 'C' /* 67 */ +#define K_D 'D' /* 68 */ +#define K_E 'E' /* 69 */ +#define K_F 'F' /* 70 */ +#define K_G 'G' /* 71 */ +#define K_H 'H' /* 72 */ +#define K_I 'I' /* 73 */ +#define K_J 'J' /* 74 */ +#define K_K 'K' /* 75 */ +#define K_L 'L' /* 76 */ +#define K_M 'M' /* 77 */ +#define K_N 'N' /* 78 */ +#define K_O 'O' /* 79 */ +#define K_P 'P' /* 80 */ +#define K_Q 'Q' /* 81 */ +#define K_R 'R' /* 82 */ +#define K_S 'S' /* 83 */ +#define K_T 'T' /* 84 */ +#define K_U 'U' /* 85 */ +#define K_V 'V' /* 86 */ +#define K_W 'W' /* 87 */ +#define K_X 'X' /* 88 */ +#define K_Y 'Y' /* 89 */ +#define K_Z 'Z' /* 90 */ +#define K_bracketleft '[' /* 91 */ +#define K_backslash '\\' /* 92 */ +#define K_bracketright ']' /* 93 */ +#define K_circum '^' /* 94 */ +#define K_underscore '_' /* 95 */ +#define K_grave '`' /* 96 */ +#define K_a 'a' /* 97 (0x61) */ +#define K_b 'b' /* 98 */ +#define K_c 'c' /* 99 */ +#define K_d 'd' /* 100 */ +#define K_e 'e' /* 101 */ +#define K_f 'f' /* 102 */ +#define K_g 'g' /* 103 */ +#define K_h 'h' /* 104 */ +#define K_i 'i' /* 105 */ +#define K_j 'j' /* 106 */ +#define K_k 'k' /* 107 */ +#define K_l 'l' /* 108 */ +#define K_m 'm' /* 109 */ +#define K_n 'n' /* 110 */ +#define K_o 'o' /* 111 */ +#define K_p 'p' /* 112 */ +#define K_q 'q' /* 113 */ +#define K_r 'r' /* 114 */ +#define K_s 's' /* 115 */ +#define K_t 't' /* 116 */ +#define K_u 'u' /* 117 */ +#define K_v 'v' /* 118 */ +#define K_w 'w' /* 119 */ +#define K_x 'x' /* 120 */ +#define K_y 'y' /* 121 */ +#define K_z 'z' /* 122 */ +#define K_braceleft '{' /* 123 */ +#define K_bar '|' /* 124 */ +#define K_braceright '}' /* 125 */ +#define K_tilde '~' /* 126 */ + +#define iup_isprint(_c) ((_c) > 31 && (_c) < 127) + +/* also define the escape sequences that have keys associated */ + +#define K_BS '\b' /* 8 */ +#define K_TAB '\t' /* 9 */ +#define K_LF '\n' /* 10 (0x0A) not a real key, is a combination of CR with a modifier, just to document */ +#define K_CR '\r' /* 13 (0x0D) */ + +/* backward compatible definitions */ + +#define K_quoteleft K_grave +#define K_quoteright K_apostrophe +#define isxkey iup_isXkey + +/* IUP Extended Key Codes, range start at 128 */ +/* Modifiers use 256 interval */ +/* These key code definitions are specific to IUP */ + +#define iup_isXkey(_c) ((_c) > 128) +#define iup_isShiftXkey(_c) (((_c) > 256) && ((_c) < 512)) +#define iup_isCtrlXkey(_c) (((_c) > 512) && ((_c) < 768)) +#define iup_isAltXkey(_c) (((_c) > 768) && ((_c) < 1024)) +#define iup_isSysXkey(_c) (((_c) > 1024) && ((_c) < 1280)) + +#define IUPxCODE(_c) ((_c) + 128) /* Normal (must be above 128) */ +#define IUPsxCODE(_c) ((_c) + 256) /* Shift (must have range to include the standard keys and the normal extended keys, so must be above 256 */ +#define IUPcxCODE(_c) ((_c) + 512) /* Ctrl */ +#define IUPmxCODE(_c) ((_c) + 768) /* Alt */ +#define IUPyxCODE(_c) ((_c) + 1024) /* Sys (Win or Apple) */ + +#define IUP_NUMMAXCODES 1280 /* 5*256=1280 Normal+Shift+Ctrl+Alt+Sys */ + +#define K_HOME IUPxCODE(1) +#define K_UP IUPxCODE(2) +#define K_PGUP IUPxCODE(3) +#define K_LEFT IUPxCODE(4) +#define K_MIDDLE IUPxCODE(5) +#define K_RIGHT IUPxCODE(6) +#define K_END IUPxCODE(7) +#define K_DOWN IUPxCODE(8) +#define K_PGDN IUPxCODE(9) +#define K_INS IUPxCODE(10) +#define K_DEL IUPxCODE(11) +#define K_PAUSE IUPxCODE(12) +#define K_ESC IUPxCODE(13) +#define K_ccedilla IUPxCODE(14) +#define K_F1 IUPxCODE(15) +#define K_F2 IUPxCODE(16) +#define K_F3 IUPxCODE(17) +#define K_F4 IUPxCODE(18) +#define K_F5 IUPxCODE(19) +#define K_F6 IUPxCODE(20) +#define K_F7 IUPxCODE(21) +#define K_F8 IUPxCODE(22) +#define K_F9 IUPxCODE(23) +#define K_F10 IUPxCODE(24) +#define K_F11 IUPxCODE(25) +#define K_F12 IUPxCODE(26) +#define K_Print IUPxCODE(27) +#define K_Menu IUPxCODE(28) + +#define K_acute IUPxCODE(29) /* no Shift/Ctrl/Alt */ + +#define K_sHOME IUPsxCODE(K_HOME ) +#define K_sUP IUPsxCODE(K_UP ) +#define K_sPGUP IUPsxCODE(K_PGUP ) +#define K_sLEFT IUPsxCODE(K_LEFT ) +#define K_sMIDDLE IUPsxCODE(K_MIDDLE ) +#define K_sRIGHT IUPsxCODE(K_RIGHT ) +#define K_sEND IUPsxCODE(K_END ) +#define K_sDOWN IUPsxCODE(K_DOWN ) +#define K_sPGDN IUPsxCODE(K_PGDN ) +#define K_sINS IUPsxCODE(K_INS ) +#define K_sDEL IUPsxCODE(K_DEL ) +#define K_sSP IUPsxCODE(K_SP ) +#define K_sTAB IUPsxCODE(K_TAB ) +#define K_sCR IUPsxCODE(K_CR ) +#define K_sBS IUPsxCODE(K_BS ) +#define K_sPAUSE IUPsxCODE(K_PAUSE ) +#define K_sESC IUPsxCODE(K_ESC ) +#define K_Ccedilla IUPsxCODE(K_ccedilla) +#define K_sF1 IUPsxCODE(K_F1 ) +#define K_sF2 IUPsxCODE(K_F2 ) +#define K_sF3 IUPsxCODE(K_F3 ) +#define K_sF4 IUPsxCODE(K_F4 ) +#define K_sF5 IUPsxCODE(K_F5 ) +#define K_sF6 IUPsxCODE(K_F6 ) +#define K_sF7 IUPsxCODE(K_F7 ) +#define K_sF8 IUPsxCODE(K_F8 ) +#define K_sF9 IUPsxCODE(K_F9 ) +#define K_sF10 IUPsxCODE(K_F10 ) +#define K_sF11 IUPsxCODE(K_F11 ) +#define K_sF12 IUPsxCODE(K_F12 ) +#define K_sPrint IUPsxCODE(K_Print ) +#define K_sMenu IUPsxCODE(K_Menu ) + +#define K_cHOME IUPcxCODE(K_HOME ) +#define K_cUP IUPcxCODE(K_UP ) +#define K_cPGUP IUPcxCODE(K_PGUP ) +#define K_cLEFT IUPcxCODE(K_LEFT ) +#define K_cMIDDLE IUPcxCODE(K_MIDDLE ) +#define K_cRIGHT IUPcxCODE(K_RIGHT ) +#define K_cEND IUPcxCODE(K_END ) +#define K_cDOWN IUPcxCODE(K_DOWN ) +#define K_cPGDN IUPcxCODE(K_PGDN ) +#define K_cINS IUPcxCODE(K_INS ) +#define K_cDEL IUPcxCODE(K_DEL ) +#define K_cSP IUPcxCODE(K_SP ) +#define K_cTAB IUPcxCODE(K_TAB ) +#define K_cCR IUPcxCODE(K_CR ) +#define K_cBS IUPcxCODE(K_BS ) +#define K_cPAUSE IUPcxCODE(K_PAUSE ) +#define K_cESC IUPcxCODE(K_ESC ) +#define K_cCcedilla IUPcxCODE(K_ccedilla) +#define K_cF1 IUPcxCODE(K_F1 ) +#define K_cF2 IUPcxCODE(K_F2 ) +#define K_cF3 IUPcxCODE(K_F3 ) +#define K_cF4 IUPcxCODE(K_F4 ) +#define K_cF5 IUPcxCODE(K_F5 ) +#define K_cF6 IUPcxCODE(K_F6 ) +#define K_cF7 IUPcxCODE(K_F7 ) +#define K_cF8 IUPcxCODE(K_F8 ) +#define K_cF9 IUPcxCODE(K_F9 ) +#define K_cF10 IUPcxCODE(K_F10 ) +#define K_cF11 IUPcxCODE(K_F11 ) +#define K_cF12 IUPcxCODE(K_F12 ) +#define K_cPrint IUPcxCODE(K_Print ) +#define K_cMenu IUPcxCODE(K_Menu ) + +#define K_mHOME IUPmxCODE(K_HOME ) +#define K_mUP IUPmxCODE(K_UP ) +#define K_mPGUP IUPmxCODE(K_PGUP ) +#define K_mLEFT IUPmxCODE(K_LEFT ) +#define K_mMIDDLE IUPmxCODE(K_MIDDLE ) +#define K_mRIGHT IUPmxCODE(K_RIGHT ) +#define K_mEND IUPmxCODE(K_END ) +#define K_mDOWN IUPmxCODE(K_DOWN ) +#define K_mPGDN IUPmxCODE(K_PGDN ) +#define K_mINS IUPmxCODE(K_INS ) +#define K_mDEL IUPmxCODE(K_DEL ) +#define K_mSP IUPmxCODE(K_SP ) +#define K_mTAB IUPmxCODE(K_TAB ) +#define K_mCR IUPmxCODE(K_CR ) +#define K_mBS IUPmxCODE(K_BS ) +#define K_mPAUSE IUPmxCODE(K_PAUSE ) +#define K_mESC IUPmxCODE(K_ESC ) +#define K_mCcedilla IUPmxCODE(K_ccedilla) +#define K_mF1 IUPmxCODE(K_F1 ) +#define K_mF2 IUPmxCODE(K_F2 ) +#define K_mF3 IUPmxCODE(K_F3 ) +#define K_mF4 IUPmxCODE(K_F4 ) +#define K_mF5 IUPmxCODE(K_F5 ) +#define K_mF6 IUPmxCODE(K_F6 ) +#define K_mF7 IUPmxCODE(K_F7 ) +#define K_mF8 IUPmxCODE(K_F8 ) +#define K_mF9 IUPmxCODE(K_F9 ) +#define K_mF10 IUPmxCODE(K_F10 ) +#define K_mF11 IUPmxCODE(K_F11 ) +#define K_mF12 IUPmxCODE(K_F12 ) +#define K_mPrint IUPmxCODE(K_Print ) +#define K_mMenu IUPmxCODE(K_Menu ) + +#define K_yHOME IUPyxCODE(K_HOME ) +#define K_yUP IUPyxCODE(K_UP ) +#define K_yPGUP IUPyxCODE(K_PGUP ) +#define K_yLEFT IUPyxCODE(K_LEFT ) +#define K_yMIDDLE IUPyxCODE(K_MIDDLE ) +#define K_yRIGHT IUPyxCODE(K_RIGHT ) +#define K_yEND IUPyxCODE(K_END ) +#define K_yDOWN IUPyxCODE(K_DOWN ) +#define K_yPGDN IUPyxCODE(K_PGDN ) +#define K_yINS IUPyxCODE(K_INS ) +#define K_yDEL IUPyxCODE(K_DEL ) +#define K_ySP IUPyxCODE(K_SP ) +#define K_yTAB IUPyxCODE(K_TAB ) +#define K_yCR IUPyxCODE(K_CR ) +#define K_yBS IUPyxCODE(K_BS ) +#define K_yPAUSE IUPyxCODE(K_PAUSE ) +#define K_yESC IUPyxCODE(K_ESC ) +#define K_yCcedilla IUPyxCODE(K_ccedilla) +#define K_yF1 IUPyxCODE(K_F1 ) +#define K_yF2 IUPyxCODE(K_F2 ) +#define K_yF3 IUPyxCODE(K_F3 ) +#define K_yF4 IUPyxCODE(K_F4 ) +#define K_yF5 IUPyxCODE(K_F5 ) +#define K_yF6 IUPyxCODE(K_F6 ) +#define K_yF7 IUPyxCODE(K_F7 ) +#define K_yF8 IUPyxCODE(K_F8 ) +#define K_yF9 IUPyxCODE(K_F9 ) +#define K_yF10 IUPyxCODE(K_F10 ) +#define K_yF11 IUPyxCODE(K_F11 ) +#define K_yF12 IUPyxCODE(K_F12 ) +#define K_yPrint IUPyxCODE(K_Print ) +#define K_yMenu IUPyxCODE(K_Menu ) + +#define K_sPlus IUPsxCODE(K_plus ) +#define K_sComma IUPsxCODE(K_comma ) +#define K_sMinus IUPsxCODE(K_minus ) +#define K_sPeriod IUPsxCODE(K_period ) +#define K_sSlash IUPsxCODE(K_slash ) +#define K_sAsterisk IUPsxCODE(K_asterisk) + +#define K_cA IUPcxCODE(K_A) +#define K_cB IUPcxCODE(K_B) +#define K_cC IUPcxCODE(K_C) +#define K_cD IUPcxCODE(K_D) +#define K_cE IUPcxCODE(K_E) +#define K_cF IUPcxCODE(K_F) +#define K_cG IUPcxCODE(K_G) +#define K_cH IUPcxCODE(K_H) +#define K_cI IUPcxCODE(K_I) +#define K_cJ IUPcxCODE(K_J) +#define K_cK IUPcxCODE(K_K) +#define K_cL IUPcxCODE(K_L) +#define K_cM IUPcxCODE(K_M) +#define K_cN IUPcxCODE(K_N) +#define K_cO IUPcxCODE(K_O) +#define K_cP IUPcxCODE(K_P) +#define K_cQ IUPcxCODE(K_Q) +#define K_cR IUPcxCODE(K_R) +#define K_cS IUPcxCODE(K_S) +#define K_cT IUPcxCODE(K_T) +#define K_cU IUPcxCODE(K_U) +#define K_cV IUPcxCODE(K_V) +#define K_cW IUPcxCODE(K_W) +#define K_cX IUPcxCODE(K_X) +#define K_cY IUPcxCODE(K_Y) +#define K_cZ IUPcxCODE(K_Z) +#define K_c1 IUPcxCODE(K_1) +#define K_c2 IUPcxCODE(K_2) +#define K_c3 IUPcxCODE(K_3) +#define K_c4 IUPcxCODE(K_4) +#define K_c5 IUPcxCODE(K_5) +#define K_c6 IUPcxCODE(K_6) +#define K_c7 IUPcxCODE(K_7) +#define K_c8 IUPcxCODE(K_8) +#define K_c9 IUPcxCODE(K_9) +#define K_c0 IUPcxCODE(K_0) +#define K_cPlus IUPcxCODE(K_plus ) +#define K_cComma IUPcxCODE(K_comma ) +#define K_cMinus IUPcxCODE(K_minus ) +#define K_cPeriod IUPcxCODE(K_period ) +#define K_cSlash IUPcxCODE(K_slash ) +#define K_cSemicolon IUPcxCODE(K_semicolon ) +#define K_cEqual IUPcxCODE(K_equal ) +#define K_cBracketleft IUPcxCODE(K_bracketleft ) +#define K_cBracketright IUPcxCODE(K_bracketright) +#define K_cBackslash IUPcxCODE(K_backslash ) +#define K_cAsterisk IUPcxCODE(K_asterisk ) + +#define K_mA IUPmxCODE(K_A) +#define K_mB IUPmxCODE(K_B) +#define K_mC IUPmxCODE(K_C) +#define K_mD IUPmxCODE(K_D) +#define K_mE IUPmxCODE(K_E) +#define K_mF IUPmxCODE(K_F) +#define K_mG IUPmxCODE(K_G) +#define K_mH IUPmxCODE(K_H) +#define K_mI IUPmxCODE(K_I) +#define K_mJ IUPmxCODE(K_J) +#define K_mK IUPmxCODE(K_K) +#define K_mL IUPmxCODE(K_L) +#define K_mM IUPmxCODE(K_M) +#define K_mN IUPmxCODE(K_N) +#define K_mO IUPmxCODE(K_O) +#define K_mP IUPmxCODE(K_P) +#define K_mQ IUPmxCODE(K_Q) +#define K_mR IUPmxCODE(K_R) +#define K_mS IUPmxCODE(K_S) +#define K_mT IUPmxCODE(K_T) +#define K_mU IUPmxCODE(K_U) +#define K_mV IUPmxCODE(K_V) +#define K_mW IUPmxCODE(K_W) +#define K_mX IUPmxCODE(K_X) +#define K_mY IUPmxCODE(K_Y) +#define K_mZ IUPmxCODE(K_Z) +#define K_m1 IUPmxCODE(K_1) +#define K_m2 IUPmxCODE(K_2) +#define K_m3 IUPmxCODE(K_3) +#define K_m4 IUPmxCODE(K_4) +#define K_m5 IUPmxCODE(K_5) +#define K_m6 IUPmxCODE(K_6) +#define K_m7 IUPmxCODE(K_7) +#define K_m8 IUPmxCODE(K_8) +#define K_m9 IUPmxCODE(K_9) +#define K_m0 IUPmxCODE(K_0) +#define K_mPlus IUPmxCODE(K_plus ) +#define K_mComma IUPmxCODE(K_comma ) +#define K_mMinus IUPmxCODE(K_minus ) +#define K_mPeriod IUPmxCODE(K_period ) +#define K_mSlash IUPmxCODE(K_slash ) +#define K_mSemicolon IUPmxCODE(K_semicolon ) +#define K_mEqual IUPmxCODE(K_equal ) +#define K_mBracketleft IUPmxCODE(K_bracketleft ) +#define K_mBracketright IUPmxCODE(K_bracketright) +#define K_mBackslash IUPmxCODE(K_backslash ) +#define K_mAsterisk IUPmxCODE(K_asterisk ) + +#define K_yA IUPyxCODE(K_A) +#define K_yB IUPyxCODE(K_B) +#define K_yC IUPyxCODE(K_C) +#define K_yD IUPyxCODE(K_D) +#define K_yE IUPyxCODE(K_E) +#define K_yF IUPyxCODE(K_F) +#define K_yG IUPyxCODE(K_G) +#define K_yH IUPyxCODE(K_H) +#define K_yI IUPyxCODE(K_I) +#define K_yJ IUPyxCODE(K_J) +#define K_yK IUPyxCODE(K_K) +#define K_yL IUPyxCODE(K_L) +#define K_yM IUPyxCODE(K_M) +#define K_yN IUPyxCODE(K_N) +#define K_yO IUPyxCODE(K_O) +#define K_yP IUPyxCODE(K_P) +#define K_yQ IUPyxCODE(K_Q) +#define K_yR IUPyxCODE(K_R) +#define K_yS IUPyxCODE(K_S) +#define K_yT IUPyxCODE(K_T) +#define K_yU IUPyxCODE(K_U) +#define K_yV IUPyxCODE(K_V) +#define K_yW IUPyxCODE(K_W) +#define K_yX IUPyxCODE(K_X) +#define K_yY IUPyxCODE(K_Y) +#define K_yZ IUPyxCODE(K_Z) +#define K_y1 IUPyxCODE(K_1) +#define K_y2 IUPyxCODE(K_2) +#define K_y3 IUPyxCODE(K_3) +#define K_y4 IUPyxCODE(K_4) +#define K_y5 IUPyxCODE(K_5) +#define K_y6 IUPyxCODE(K_6) +#define K_y7 IUPyxCODE(K_7) +#define K_y8 IUPyxCODE(K_8) +#define K_y9 IUPyxCODE(K_9) +#define K_y0 IUPyxCODE(K_0) +#define K_yPlus IUPyxCODE(K_plus ) +#define K_yComma IUPyxCODE(K_comma ) +#define K_yMinus IUPyxCODE(K_minus ) +#define K_yPeriod IUPyxCODE(K_period ) +#define K_ySlash IUPyxCODE(K_slash ) +#define K_ySemicolon IUPyxCODE(K_semicolon ) +#define K_yEqual IUPyxCODE(K_equal ) +#define K_yBracketleft IUPyxCODE(K_bracketleft ) +#define K_yBracketright IUPyxCODE(K_bracketright) +#define K_yBackslash IUPyxCODE(K_backslash ) +#define K_yAsterisk IUPyxCODE(K_asterisk ) + + +#endif diff --git a/iup/include/iuplua.h b/iup/include/iuplua.h new file mode 100755 index 0000000..dc660b5 --- /dev/null +++ b/iup/include/iuplua.h @@ -0,0 +1,41 @@ +/** \file + * \brief IUP Binding for Lua. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPLUA_H +#define __IUPLUA_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LUA_NOOBJECT /* Lua 3 */ +int iuplua_open (void); +int iupkey_open (void); + +/* utilities */ +Ihandle* iuplua_checkihandle(int pos); +void iuplua_pushihandle(Ihandle *n); +int iuplua_dofile (char *filename); +#endif + +#ifdef LUA_TNONE /* Lua 5 */ +int iuplua_open(lua_State *L); +int iupkey_open(lua_State *L); +int iuplua_close(lua_State * L); + +/* utilities */ +Ihandle* iuplua_checkihandle(lua_State *L, int pos); +void iuplua_pushihandle(lua_State *L, Ihandle *n); +int iuplua_dofile(lua_State *L, const char *filename); +int iuplua_dostring(lua_State *L, const char *string, const char *chunk_name); + +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iuplua_pplot.h b/iup/include/iuplua_pplot.h new file mode 100755 index 0000000..522941b --- /dev/null +++ b/iup/include/iuplua_pplot.h @@ -0,0 +1,26 @@ +/** \file + * \brief iup_pplot Binding for Lua. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPLUA_PPLOT_H +#define __IUPLUA_PPLOT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LUA_NOOBJECT /* Lua 3 */ +int iup_pplotlua_open (void); +#endif + +#ifdef LUA_TNONE /* Lua 5 */ +int iup_pplotlua_open (lua_State * L); +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iupluacontrols.h b/iup/include/iupluacontrols.h new file mode 100755 index 0000000..174192e --- /dev/null +++ b/iup/include/iupluacontrols.h @@ -0,0 +1,27 @@ +/** \file + * \brief iupcontrols Binding for Lua. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPLUACONTROLS_H +#define __IUPLUACONTROLS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LUA_NOOBJECT /* Lua 3 */ +int iupcontrolslua_open (void); +#endif + +#ifdef LUA_TNONE /* Lua 5 */ +int iupcontrolslua_open (lua_State * L); +int iupcontrolslua_close(lua_State * L); +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iupluagl.h b/iup/include/iupluagl.h new file mode 100755 index 0000000..8b65f6b --- /dev/null +++ b/iup/include/iupluagl.h @@ -0,0 +1,26 @@ +/** \file + * \brief Binding of iupglcanvas to Lua. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPLUAGL_H +#define __IUPLUAGL_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LUA_NOOBJECT /* Lua 3 */ +int iupgllua_open(void); +#endif + +#ifdef LUA_TNONE /* Lua 5 */ +int iupgllua_open (lua_State * L); +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iupluaim.h b/iup/include/iupluaim.h new file mode 100755 index 0000000..2544057 --- /dev/null +++ b/iup/include/iupluaim.h @@ -0,0 +1,26 @@ +/** \file + * \brief Bindig of iupim functions to Lua. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPLUAIM_H +#define __IUPLUAIM_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LUA_NOOBJECT /* Lua 3 */ +void iupimlua_open(void); +#endif + +#ifdef LUA_TNONE /* Lua 5 */ +int iupimlua_open(lua_State * L); +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iupluaole.h b/iup/include/iupluaole.h new file mode 100755 index 0000000..9a0ad08 --- /dev/null +++ b/iup/include/iupluaole.h @@ -0,0 +1,26 @@ +/** \file + * \brief Binding of iupolecontrol to Lua. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPLUAOLE_H +#define __IUPLUAOLE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LUA_NOOBJECT /* Lua 3 */ +int iupolelua_open(void); +#endif + +#ifdef LUA_TNONE /* Lua 5 */ +int iupolelua_open (lua_State * L); +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iupmask.h b/iup/include/iupmask.h new file mode 100755 index 0000000..faf71d7 --- /dev/null +++ b/iup/include/iupmask.h @@ -0,0 +1,41 @@ +/** \file + * \brief iupmask functions. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_OLDMASK_H +#define __IUP_OLDMASK_H + +#ifdef __cplusplus +extern "C" { +#endif + +#pragma message("Warning: Using OLD iupMask definitions, use the MASK attribute in IupText or IupMatrix.") + +/* OLD definitions, use the MASK attribute in IupText or IupMatrix */ +int iupmaskSet (Ihandle *h, const char *mask, int autofill, int casei); +int iupmaskSetInt (Ihandle *h, int autofill, int min , int max); +int iupmaskSetFloat(Ihandle *h, int autofill, float min , float max); +void iupmaskRemove (Ihandle *h); +int iupmaskCheck (Ihandle *h); +int iupmaskGet (Ihandle *h, char **val); +int iupmaskGetFloat (Ihandle *h, float *fval); +int iupmaskGetDouble(Ihandle *h, double *dval); +int iupmaskGetInt (Ihandle *h, int *ival); +int iupmaskMatSet (Ihandle *h, const char *mask, int autofill, int casei, int lin, int col); +int iupmaskMatSetInt (Ihandle *h, int autofill, int min, int max, int lin, int col); +int iupmaskMatSetFloat(Ihandle *h, int autofill, float min, float max, int lin, int col); +void iupmaskMatRemove (Ihandle *h, int lin, int col); +int iupmaskMatCheck (Ihandle *h, int lin, int col); +int iupmaskMatGet (Ihandle *h, char **val, int lin, int col); +int iupmaskMatGetFloat (Ihandle *h, float *fval, int lin, int col); +int iupmaskMatGetDouble(Ihandle *h, double *dval, int lin, int col); +int iupmaskMatGetInt (Ihandle *h, int *ival, int lin, int col); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iupmatrix.h b/iup/include/iupmatrix.h new file mode 100755 index 0000000..1285b04 --- /dev/null +++ b/iup/include/iupmatrix.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupole.h b/iup/include/iupole.h new file mode 100755 index 0000000..8c7d4ba --- /dev/null +++ b/iup/include/iupole.h @@ -0,0 +1,24 @@ +/** \file + * \brief Ole control. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPOLE_H +#define __IUPOLE_H + +#ifdef __cplusplus +extern "C" { +#endif + + +Ihandle *IupOleControl(const char* progid); + +int IupOleControlOpen(void); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/include/iupsbox.h b/iup/include/iupsbox.h new file mode 100755 index 0000000..5ae1901 --- /dev/null +++ b/iup/include/iupsbox.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupspin.h b/iup/include/iupspin.h new file mode 100755 index 0000000..5ae1901 --- /dev/null +++ b/iup/include/iupspin.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iuptabs.h b/iup/include/iuptabs.h new file mode 100755 index 0000000..5ae1901 --- /dev/null +++ b/iup/include/iuptabs.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iuptree.h b/iup/include/iuptree.h new file mode 100755 index 0000000..1285b04 --- /dev/null +++ b/iup/include/iuptree.h @@ -0,0 +1 @@ +#include diff --git a/iup/include/iupval.h b/iup/include/iupval.h new file mode 100755 index 0000000..5ae1901 --- /dev/null +++ b/iup/include/iupval.h @@ -0,0 +1 @@ +#include diff --git a/iup/mak.vc8/iup.sln b/iup/mak.vc8/iup.sln new file mode 100755 index 0000000..c0fe994 --- /dev/null +++ b/iup/mak.vc8/iup.sln @@ -0,0 +1,347 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupcore", "iupcore.vcproj", "{2C7E83B9-7FE8-432A-97BA-FCF4D0728408}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupgtk", "iupgtk.vcproj", "{2C7E83B9-7FE8-5555-97BA-FCF4D0728408}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupmot", "iupmot.vcproj", "{2C7E83B9-1234-432A-97BA-FCF4D0728408}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuptest", "iuptest.vcproj", "{2F92EC58-D94C-40BF-8C82-77607C72E1E3}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5A42018B-95AC-A789-E4E4-59A692649DCA} = {5A42018B-95AC-A789-E4E4-59A692649DCA} + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} = {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuptestgtk", "iuptestgtk.vcproj", "{2F92EC58-1234-40BF-5678-77607C72E1E3}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5A42018B-95AC-A789-E4E4-59A692649DCA} = {5A42018B-95AC-A789-E4E4-59A692649DCA} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} = {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupwin", "iupwin.vcproj", "{2C7E83B9-123A-BCDF-97BA-FCF4D0728408}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupgl", "iupgl.vcproj", "{E251B4F4-0B0A-482B-BA18-2509ADC4B6AA}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupcontrols", "iupcontrols.vcproj", "{5EEFE977-C56D-462F-BDEE-12A5452EB8CC}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iup_pplot", "iup_pplot.vcproj", "{5A42018B-95AC-A789-E4E4-59A692649DCA}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupole", "iupole.vcproj", "{0C80BBEE-1B00-4567-1234-067292C84EDB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupimglib", "iupimglib.vcproj", "{E251B4F4-0B0A-482B-BB33-1234ADC4B6AA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupcd", "iupcd.vcproj", "{BE7472E1-E76E-4969-A35F-054614F5884E}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupim", "iupim.vcproj", "{E251B4F4-0B0A-482B-BA18-1234ADC4B6AA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua3", "iuplua3.vcproj", "{1EBC7A53-4677-4C3A-8DFF-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua3_exe", "iupluaexe3.vcproj", "{A60D658D-766C-40DB-BAFF-59AB884D86FB}" + ProjectSection(ProjectDependencies) = postProject + {1EBC7A53-4677-4C3A-8DFF-269001F17D85} = {1EBC7A53-4677-4C3A-8DFF-269001F17D85} + {1EBC7A53-4677-4C3A-8DFF-49D301F17D85} = {1EBC7A53-4677-4C3A-8DFF-49D301F17D85} + {1EBC7A53-4677-4C3A-8DFF-49DFF4417D85} = {1EBC7A53-4677-4C3A-8DFF-49DFF4417D85} + {1EBC7A53-33FF-4C3A-8DFF-49D301F17D85} = {1EBC7A53-33FF-4C3A-8DFF-49D301F17D85} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua5", "iuplua5.vcproj", "{1EBC7A53-4677-4C3A-8D4A-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua5_exe", "iupluaexe5.vcproj", "{A60D658D-766C-40DB-BAE4-59AB884D86FB}" + ProjectSection(ProjectDependencies) = postProject + {1EBC7A53-4677-4C3A-8D4A-49D301157985} = {1EBC7A53-4677-4C3A-8D4A-49D301157985} + {1EBC7A53-4677-4C3A-8D4A-49D301F17D85} = {1EBC7A53-4677-4C3A-8D4A-49D301F17D85} + {1EBC7A53-4677-AAAA-1234-49D301F17D85} = {1EBC7A53-4677-AAAA-1234-49D301F17D85} + {1EBC7A53-4677-75D7-8D4A-49D301F17D85} = {1EBC7A53-4677-75D7-8D4A-49D301F17D85} + {1EBC7A53-4677-ADF1-8D4A-49D301F17D85} = {1EBC7A53-4677-ADF1-8D4A-49D301F17D85} + {B4823266-DF8C-4EFB-91C0-C7688C234EAC} = {B4823266-DF8C-4EFB-91C0-C7688C234EAC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5A42018B-95AC-A789-E4E4-59A692649DCA} = {5A42018B-95AC-A789-E4E4-59A692649DCA} + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} = {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ledc", "ledc.vcproj", "{0F789DF8-22CC-4392-98DB-AC3960FAD4EA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupview", "iupview.vcproj", "{2F92EC58-D94C-40BF-4444-77607C72E1E3}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} = {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluaim5", "iupluaim5.vcproj", "{1EBC7A53-4677-ADF1-8D4A-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluaim3", "iupluaim3.vcproj", "{1EBC7A53-4677-4C3A-8DFF-269001F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluacontrols5", "iupluacontrols5.vcproj", "{1EBC7A53-4677-75D7-8D4A-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluacontrols3", "iupluacontrols3.vcproj", "{1EBC7A53-4677-4C3A-8DFF-49DFF4417D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluagl5", "iupluagl5.vcproj", "{1EBC7A53-4677-4C3A-8D4A-49D301157985}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluagl3", "iupluagl3.vcproj", "{1EBC7A53-33FF-4C3A-8DFF-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluaole3", "iupluaole3.vcproj", "{1EBC7A53-33FF-7890-7890-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluaole5", "iupluaole5.vcproj", "{1EBC7A53-4677-5555-2222-49D301157985}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua_pplot5", "iuplua_pplot5.vcproj", "{1EBC7A53-4677-AAAA-1234-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua_pplot3", "iuplua_pplot3.vcproj", "{1EBC7A53-4677-1234-DDDD-49DFF4417D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluacd3", "iupluacd3.vcproj", "{B4823266-DF8C-4EFB-91C0-C7E78C234EAC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluacd5", "iupluacd5.vcproj", "{B4823266-DF8C-4EFB-91C0-C7688C234EAC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua5", "Lua5", "{1CBEAA34-BA34-497D-A775-B9AF6F905696}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua3", "Lua3", "{11041D08-354A-4300-9624-41277E67DE34}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluaimglib5", "iupluaimglib5.vcproj", "{1EBC7A53-4677-FFFF-1234-49D301F17D85}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{B7B3CB79-CA94-4ED3-9DCA-EC12458C2EBD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{FC52B7B5-744E-45D6-815C-3502F9D965E7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupsample", "iupsample.vcproj", "{9462FDEA-3E53-4250-8710-DD50AF48607C}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} = {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupsamplegtk", "iupsamplegtk.vcproj", "{C684B76D-52EC-49CE-84F2-B031509419A5}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} = {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupviewgtk", "iupviewgtk.vcproj", "{E7D19356-B0AB-44AD-ACCB-5FFFCC4837BE}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} = {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua5gtk_exe", "iupluaexe5gtk.vcproj", "{389DF3C9-A628-4F6D-8C52-8924FA01DE66}" + ProjectSection(ProjectDependencies) = postProject + {1EBC7A53-4677-4C3A-8D4A-49D301157985} = {1EBC7A53-4677-4C3A-8D4A-49D301157985} + {1EBC7A53-4677-4C3A-8D4A-49D301F17D85} = {1EBC7A53-4677-4C3A-8D4A-49D301F17D85} + {1EBC7A53-4677-AAAA-1234-49D301F17D85} = {1EBC7A53-4677-AAAA-1234-49D301F17D85} + {1EBC7A53-4677-75D7-8D4A-49D301F17D85} = {1EBC7A53-4677-75D7-8D4A-49D301F17D85} + {1EBC7A53-4677-ADF1-8D4A-49D301F17D85} = {1EBC7A53-4677-ADF1-8D4A-49D301F17D85} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5A42018B-95AC-A789-E4E4-59A692649DCA} = {5A42018B-95AC-A789-E4E4-59A692649DCA} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} = {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408}.Debug|Win32.Build.0 = Debug|Win32 + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408}.Debug|Win32.Build.0 = Debug|Win32 + {2C7E83B9-1234-432A-97BA-FCF4D0728408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F92EC58-D94C-40BF-8C82-77607C72E1E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F92EC58-D94C-40BF-8C82-77607C72E1E3}.Debug|Win32.Build.0 = Debug|Win32 + {2F92EC58-1234-40BF-5678-77607C72E1E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F92EC58-1234-40BF-5678-77607C72E1E3}.Debug|Win32.Build.0 = Debug|Win32 + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408}.Debug|Win32.Build.0 = Debug|Win32 + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA}.Debug|Win32.Build.0 = Debug|Win32 + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC}.Debug|Win32.ActiveCfg = Debug|Win32 + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC}.Debug|Win32.Build.0 = Debug|Win32 + {5A42018B-95AC-A789-E4E4-59A692649DCA}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A42018B-95AC-A789-E4E4-59A692649DCA}.Debug|Win32.Build.0 = Debug|Win32 + {0C80BBEE-1B00-4567-1234-067292C84EDB}.Debug|Win32.ActiveCfg = Debug|Win32 + {0C80BBEE-1B00-4567-1234-067292C84EDB}.Debug|Win32.Build.0 = Debug|Win32 + {E251B4F4-0B0A-482B-BB33-1234ADC4B6AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {E251B4F4-0B0A-482B-BB33-1234ADC4B6AA}.Debug|Win32.Build.0 = Debug|Win32 + {BE7472E1-E76E-4969-A35F-054614F5884E}.Debug|Win32.ActiveCfg = Debug|Win32 + {BE7472E1-E76E-4969-A35F-054614F5884E}.Debug|Win32.Build.0 = Debug|Win32 + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {A60D658D-766C-40DB-BAFF-59AB884D86FB}.Debug|Win32.ActiveCfg = Debug|Win32 + {A60D658D-766C-40DB-BAFF-59AB884D86FB}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-4C3A-8D4A-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-4C3A-8D4A-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {A60D658D-766C-40DB-BAE4-59AB884D86FB}.Debug|Win32.ActiveCfg = Debug|Win32 + {A60D658D-766C-40DB-BAE4-59AB884D86FB}.Debug|Win32.Build.0 = Debug|Win32 + {0F789DF8-22CC-4392-98DB-AC3960FAD4EA}.Debug|Win32.ActiveCfg = Debug|Win32 + {0F789DF8-22CC-4392-98DB-AC3960FAD4EA}.Debug|Win32.Build.0 = Debug|Win32 + {2F92EC58-D94C-40BF-4444-77607C72E1E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F92EC58-D94C-40BF-4444-77607C72E1E3}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-ADF1-8D4A-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-ADF1-8D4A-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-269001F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-269001F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-75D7-8D4A-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-75D7-8D4A-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-49DFF4417D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-49DFF4417D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-4C3A-8D4A-49D301157985}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-4C3A-8D4A-49D301157985}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-33FF-4C3A-8DFF-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-33FF-4C3A-8DFF-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-33FF-7890-7890-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-33FF-7890-7890-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-5555-2222-49D301157985}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-5555-2222-49D301157985}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-AAAA-1234-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-AAAA-1234-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-1234-DDDD-49DFF4417D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-1234-DDDD-49DFF4417D85}.Debug|Win32.Build.0 = Debug|Win32 + {B4823266-DF8C-4EFB-91C0-C7E78C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-4EFB-91C0-C7E78C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {B4823266-DF8C-4EFB-91C0-C7688C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-4EFB-91C0-C7688C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-FFFF-1234-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-FFFF-1234-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {9462FDEA-3E53-4250-8710-DD50AF48607C}.Debug|Win32.ActiveCfg = Debug|Win32 + {9462FDEA-3E53-4250-8710-DD50AF48607C}.Debug|Win32.Build.0 = Debug|Win32 + {C684B76D-52EC-49CE-84F2-B031509419A5}.Debug|Win32.ActiveCfg = Debug|Win32 + {C684B76D-52EC-49CE-84F2-B031509419A5}.Debug|Win32.Build.0 = Debug|Win32 + {E7D19356-B0AB-44AD-ACCB-5FFFCC4837BE}.Debug|Win32.ActiveCfg = Debug|Win32 + {E7D19356-B0AB-44AD-ACCB-5FFFCC4837BE}.Debug|Win32.Build.0 = Debug|Win32 + {389DF3C9-A628-4F6D-8C52-8924FA01DE66}.Debug|Win32.ActiveCfg = Debug|Win32 + {389DF3C9-A628-4F6D-8C52-8924FA01DE66}.Debug|Win32.Build.0 = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} = {B7B3CB79-CA94-4ED3-9DCA-EC12458C2EBD} + {2C7E83B9-1234-432A-97BA-FCF4D0728408} = {B7B3CB79-CA94-4ED3-9DCA-EC12458C2EBD} + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} = {B7B3CB79-CA94-4ED3-9DCA-EC12458C2EBD} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {B7B3CB79-CA94-4ED3-9DCA-EC12458C2EBD} + {2F92EC58-1234-40BF-5678-77607C72E1E3} = {FC52B7B5-744E-45D6-815C-3502F9D965E7} + {2F92EC58-D94C-40BF-8C82-77607C72E1E3} = {FC52B7B5-744E-45D6-815C-3502F9D965E7} + {9462FDEA-3E53-4250-8710-DD50AF48607C} = {FC52B7B5-744E-45D6-815C-3502F9D965E7} + {C684B76D-52EC-49CE-84F2-B031509419A5} = {FC52B7B5-744E-45D6-815C-3502F9D965E7} + {A60D658D-766C-40DB-BAFF-59AB884D86FB} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-4677-4C3A-8DFF-269001F17D85} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-4677-4C3A-8DFF-49DFF4417D85} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-33FF-4C3A-8DFF-49D301F17D85} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-33FF-7890-7890-49D301F17D85} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-4677-1234-DDDD-49DFF4417D85} = {11041D08-354A-4300-9624-41277E67DE34} + {B4823266-DF8C-4EFB-91C0-C7E78C234EAC} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-4677-4C3A-8DFF-49D301F17D85} = {11041D08-354A-4300-9624-41277E67DE34} + {A60D658D-766C-40DB-BAE4-59AB884D86FB} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-ADF1-8D4A-49D301F17D85} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-75D7-8D4A-49D301F17D85} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-4C3A-8D4A-49D301157985} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-5555-2222-49D301157985} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-AAAA-1234-49D301F17D85} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {B4823266-DF8C-4EFB-91C0-C7688C234EAC} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-4C3A-8D4A-49D301F17D85} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-FFFF-1234-49D301F17D85} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {389DF3C9-A628-4F6D-8C52-8924FA01DE66} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection +EndGlobal diff --git a/iup/mak.vc8/iup_pplot.vcproj b/iup/mak.vc8/iup_pplot.vcproj new file mode 100755 index 0000000..0a4e7a2 --- /dev/null +++ b/iup/mak.vc8/iup_pplot.vcproj @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupcd.vcproj b/iup/mak.vc8/iupcd.vcproj new file mode 100755 index 0000000..8b4fcf2 --- /dev/null +++ b/iup/mak.vc8/iupcd.vcproj @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupcontrols.vcproj b/iup/mak.vc8/iupcontrols.vcproj new file mode 100755 index 0000000..a780f89 --- /dev/null +++ b/iup/mak.vc8/iupcontrols.vcproj @@ -0,0 +1,335 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupcore.vcproj b/iup/mak.vc8/iupcore.vcproj new file mode 100755 index 0000000..4b5b4a3 --- /dev/null +++ b/iup/mak.vc8/iupcore.vcproj @@ -0,0 +1,600 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupgl.vcproj b/iup/mak.vc8/iupgl.vcproj new file mode 100755 index 0000000..3cdeb89 --- /dev/null +++ b/iup/mak.vc8/iupgl.vcproj @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupgtk.vcproj b/iup/mak.vc8/iupgtk.vcproj new file mode 100755 index 0000000..5d0a8e2 --- /dev/null +++ b/iup/mak.vc8/iupgtk.vcproj @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupim.vcproj b/iup/mak.vc8/iupim.vcproj new file mode 100755 index 0000000..62a26b2 --- /dev/null +++ b/iup/mak.vc8/iupim.vcproj @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupimglib.vcproj b/iup/mak.vc8/iupimglib.vcproj new file mode 100755 index 0000000..17711a3 --- /dev/null +++ b/iup/mak.vc8/iupimglib.vcproj @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iuplua3.vcproj b/iup/mak.vc8/iuplua3.vcproj new file mode 100755 index 0000000..2e5e78f --- /dev/null +++ b/iup/mak.vc8/iuplua3.vcproj @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iuplua5.vcproj b/iup/mak.vc8/iuplua5.vcproj new file mode 100755 index 0000000..0c62f76 --- /dev/null +++ b/iup/mak.vc8/iuplua5.vcproj @@ -0,0 +1,462 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iuplua_pplot3.vcproj b/iup/mak.vc8/iuplua_pplot3.vcproj new file mode 100755 index 0000000..810f451 --- /dev/null +++ b/iup/mak.vc8/iuplua_pplot3.vcproj @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iuplua_pplot5.vcproj b/iup/mak.vc8/iuplua_pplot5.vcproj new file mode 100755 index 0000000..95b5d91 --- /dev/null +++ b/iup/mak.vc8/iuplua_pplot5.vcproj @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluacd3.vcproj b/iup/mak.vc8/iupluacd3.vcproj new file mode 100755 index 0000000..0ef35f5 --- /dev/null +++ b/iup/mak.vc8/iupluacd3.vcproj @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluacd5.vcproj b/iup/mak.vc8/iupluacd5.vcproj new file mode 100755 index 0000000..118f1a4 --- /dev/null +++ b/iup/mak.vc8/iupluacd5.vcproj @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluacontrols3.vcproj b/iup/mak.vc8/iupluacontrols3.vcproj new file mode 100755 index 0000000..d482502 --- /dev/null +++ b/iup/mak.vc8/iupluacontrols3.vcproj @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluacontrols5.vcproj b/iup/mak.vc8/iupluacontrols5.vcproj new file mode 100755 index 0000000..2458549 --- /dev/null +++ b/iup/mak.vc8/iupluacontrols5.vcproj @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluaexe3.vcproj b/iup/mak.vc8/iupluaexe3.vcproj new file mode 100755 index 0000000..d63e803 --- /dev/null +++ b/iup/mak.vc8/iupluaexe3.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluaexe5.vcproj b/iup/mak.vc8/iupluaexe5.vcproj new file mode 100755 index 0000000..854191e --- /dev/null +++ b/iup/mak.vc8/iupluaexe5.vcproj @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluaexe5gtk.vcproj b/iup/mak.vc8/iupluaexe5gtk.vcproj new file mode 100755 index 0000000..4d729fa --- /dev/null +++ b/iup/mak.vc8/iupluaexe5gtk.vcproj @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluagl3.vcproj b/iup/mak.vc8/iupluagl3.vcproj new file mode 100755 index 0000000..ccf7465 --- /dev/null +++ b/iup/mak.vc8/iupluagl3.vcproj @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluagl5.vcproj b/iup/mak.vc8/iupluagl5.vcproj new file mode 100755 index 0000000..12822d6 --- /dev/null +++ b/iup/mak.vc8/iupluagl5.vcproj @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluaim3.vcproj b/iup/mak.vc8/iupluaim3.vcproj new file mode 100755 index 0000000..f928818 --- /dev/null +++ b/iup/mak.vc8/iupluaim3.vcproj @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluaim5.vcproj b/iup/mak.vc8/iupluaim5.vcproj new file mode 100755 index 0000000..e596071 --- /dev/null +++ b/iup/mak.vc8/iupluaim5.vcproj @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluaimglib5.vcproj b/iup/mak.vc8/iupluaimglib5.vcproj new file mode 100755 index 0000000..1a09336 --- /dev/null +++ b/iup/mak.vc8/iupluaimglib5.vcproj @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluaole3.vcproj b/iup/mak.vc8/iupluaole3.vcproj new file mode 100755 index 0000000..f37e980 --- /dev/null +++ b/iup/mak.vc8/iupluaole3.vcproj @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupluaole5.vcproj b/iup/mak.vc8/iupluaole5.vcproj new file mode 100755 index 0000000..c8abb2f --- /dev/null +++ b/iup/mak.vc8/iupluaole5.vcproj @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupmot.vcproj b/iup/mak.vc8/iupmot.vcproj new file mode 100755 index 0000000..aedd67e --- /dev/null +++ b/iup/mak.vc8/iupmot.vcproj @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupole.vcproj b/iup/mak.vc8/iupole.vcproj new file mode 100755 index 0000000..f6afc87 --- /dev/null +++ b/iup/mak.vc8/iupole.vcproj @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupsample.vcproj b/iup/mak.vc8/iupsample.vcproj new file mode 100755 index 0000000..bddc4f6 --- /dev/null +++ b/iup/mak.vc8/iupsample.vcproj @@ -0,0 +1,1172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupsamplegtk.vcproj b/iup/mak.vc8/iupsamplegtk.vcproj new file mode 100755 index 0000000..b4792dd --- /dev/null +++ b/iup/mak.vc8/iupsamplegtk.vcproj @@ -0,0 +1,791 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iuptest.vcproj b/iup/mak.vc8/iuptest.vcproj new file mode 100755 index 0000000..375d83f --- /dev/null +++ b/iup/mak.vc8/iuptest.vcproj @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iuptestgtk.vcproj b/iup/mak.vc8/iuptestgtk.vcproj new file mode 100755 index 0000000..46d9e49 --- /dev/null +++ b/iup/mak.vc8/iuptestgtk.vcproj @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupview.vcproj b/iup/mak.vc8/iupview.vcproj new file mode 100755 index 0000000..9a61127 --- /dev/null +++ b/iup/mak.vc8/iupview.vcproj @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupviewgtk.vcproj b/iup/mak.vc8/iupviewgtk.vcproj new file mode 100755 index 0000000..9276b02 --- /dev/null +++ b/iup/mak.vc8/iupviewgtk.vcproj @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/iupwin.vcproj b/iup/mak.vc8/iupwin.vcproj new file mode 100755 index 0000000..c1e2434 --- /dev/null +++ b/iup/mak.vc8/iupwin.vcproj @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc8/ledc.vcproj b/iup/mak.vc8/ledc.vcproj new file mode 100755 index 0000000..766db48 --- /dev/null +++ b/iup/mak.vc8/ledc.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iup.sln b/iup/mak.vc9/iup.sln new file mode 100755 index 0000000..898c75f --- /dev/null +++ b/iup/mak.vc9/iup.sln @@ -0,0 +1,347 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupcore", "iupcore.vcproj", "{2C7E83B9-7FE8-432A-97BA-FCF4D0728408}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupgtk", "iupgtk.vcproj", "{2C7E83B9-7FE8-5555-97BA-FCF4D0728408}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupmot", "iupmot.vcproj", "{2C7E83B9-1234-432A-97BA-FCF4D0728408}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuptest", "iuptest.vcproj", "{2F92EC58-D94C-40BF-8C82-77607C72E1E3}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5A42018B-95AC-A789-E4E4-59A692649DCA} = {5A42018B-95AC-A789-E4E4-59A692649DCA} + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} = {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuptestgtk", "iuptestgtk.vcproj", "{2F92EC58-1234-40BF-5678-77607C72E1E3}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5A42018B-95AC-A789-E4E4-59A692649DCA} = {5A42018B-95AC-A789-E4E4-59A692649DCA} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} = {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupwin", "iupwin.vcproj", "{2C7E83B9-123A-BCDF-97BA-FCF4D0728408}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupgl", "iupgl.vcproj", "{E251B4F4-0B0A-482B-BA18-2509ADC4B6AA}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupcontrols", "iupcontrols.vcproj", "{5EEFE977-C56D-462F-BDEE-12A5452EB8CC}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iup_pplot", "iup_pplot.vcproj", "{5A42018B-95AC-A789-E4E4-59A692649DCA}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupole", "iupole.vcproj", "{0C80BBEE-1B00-4567-1234-067292C84EDB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupimglib", "iupimglib.vcproj", "{E251B4F4-0B0A-482B-BB33-1234ADC4B6AA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupcd", "iupcd.vcproj", "{BE7472E1-E76E-4969-A35F-054614F5884E}" + ProjectSection(ProjectDependencies) = postProject + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupim", "iupim.vcproj", "{E251B4F4-0B0A-482B-BA18-1234ADC4B6AA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua3", "iuplua3.vcproj", "{1EBC7A53-4677-4C3A-8DFF-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua3_exe", "iupluaexe3.vcproj", "{A60D658D-766C-40DB-BAFF-59AB884D86FB}" + ProjectSection(ProjectDependencies) = postProject + {1EBC7A53-4677-4C3A-8DFF-269001F17D85} = {1EBC7A53-4677-4C3A-8DFF-269001F17D85} + {1EBC7A53-4677-4C3A-8DFF-49D301F17D85} = {1EBC7A53-4677-4C3A-8DFF-49D301F17D85} + {1EBC7A53-4677-4C3A-8DFF-49DFF4417D85} = {1EBC7A53-4677-4C3A-8DFF-49DFF4417D85} + {1EBC7A53-33FF-4C3A-8DFF-49D301F17D85} = {1EBC7A53-33FF-4C3A-8DFF-49D301F17D85} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua5", "iuplua5.vcproj", "{1EBC7A53-4677-4C3A-8D4A-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua5_exe", "iupluaexe5.vcproj", "{A60D658D-766C-40DB-BAE4-59AB884D86FB}" + ProjectSection(ProjectDependencies) = postProject + {1EBC7A53-4677-4C3A-8D4A-49D301157985} = {1EBC7A53-4677-4C3A-8D4A-49D301157985} + {1EBC7A53-4677-4C3A-8D4A-49D301F17D85} = {1EBC7A53-4677-4C3A-8D4A-49D301F17D85} + {1EBC7A53-4677-AAAA-1234-49D301F17D85} = {1EBC7A53-4677-AAAA-1234-49D301F17D85} + {1EBC7A53-4677-75D7-8D4A-49D301F17D85} = {1EBC7A53-4677-75D7-8D4A-49D301F17D85} + {1EBC7A53-4677-ADF1-8D4A-49D301F17D85} = {1EBC7A53-4677-ADF1-8D4A-49D301F17D85} + {B4823266-DF8C-4EFB-91C0-C7688C234EAC} = {B4823266-DF8C-4EFB-91C0-C7688C234EAC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5A42018B-95AC-A789-E4E4-59A692649DCA} = {5A42018B-95AC-A789-E4E4-59A692649DCA} + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} = {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ledc", "ledc.vcproj", "{0F789DF8-22CC-4392-98DB-AC3960FAD4EA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupview", "iupview.vcproj", "{2F92EC58-D94C-40BF-4444-77607C72E1E3}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} = {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluaim5", "iupluaim5.vcproj", "{1EBC7A53-4677-ADF1-8D4A-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluaim3", "iupluaim3.vcproj", "{1EBC7A53-4677-4C3A-8DFF-269001F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluacontrols5", "iupluacontrols5.vcproj", "{1EBC7A53-4677-75D7-8D4A-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluacontrols3", "iupluacontrols3.vcproj", "{1EBC7A53-4677-4C3A-8DFF-49DFF4417D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluagl5", "iupluagl5.vcproj", "{1EBC7A53-4677-4C3A-8D4A-49D301157985}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluagl3", "iupluagl3.vcproj", "{1EBC7A53-33FF-4C3A-8DFF-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluaole3", "iupluaole3.vcproj", "{1EBC7A53-33FF-7890-7890-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluaole5", "iupluaole5.vcproj", "{1EBC7A53-4677-5555-2222-49D301157985}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua_pplot5", "iuplua_pplot5.vcproj", "{1EBC7A53-4677-AAAA-1234-49D301F17D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua_pplot3", "iuplua_pplot3.vcproj", "{1EBC7A53-4677-1234-DDDD-49DFF4417D85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluacd3", "iupluacd3.vcproj", "{B4823266-DF8C-4EFB-91C0-C7E78C234EAC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluacd5", "iupluacd5.vcproj", "{B4823266-DF8C-4EFB-91C0-C7688C234EAC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua5", "Lua5", "{1CBEAA34-BA34-497D-A775-B9AF6F905696}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua3", "Lua3", "{11041D08-354A-4300-9624-41277E67DE34}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupluaimglib5", "iupluaimglib5.vcproj", "{1EBC7A53-4677-FFFF-1234-49D301F17D85}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{B7B3CB79-CA94-4ED3-9DCA-EC12458C2EBD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{FC52B7B5-744E-45D6-815C-3502F9D965E7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupsample", "iupsample.vcproj", "{9462FDEA-3E53-4250-8710-DD50AF48607C}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} = {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupsamplegtk", "iupsamplegtk.vcproj", "{C684B76D-52EC-49CE-84F2-B031509419A5}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} = {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iupviewgtk", "iupviewgtk.vcproj", "{E7D19356-B0AB-44AD-ACCB-5FFFCC4837BE}" + ProjectSection(ProjectDependencies) = postProject + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} = {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iuplua5gtk_exe", "iupluaexe5gtk.vcproj", "{389DF3C9-A628-4F6D-8C52-8924FA01DE66}" + ProjectSection(ProjectDependencies) = postProject + {1EBC7A53-4677-4C3A-8D4A-49D301157985} = {1EBC7A53-4677-4C3A-8D4A-49D301157985} + {1EBC7A53-4677-4C3A-8D4A-49D301F17D85} = {1EBC7A53-4677-4C3A-8D4A-49D301F17D85} + {1EBC7A53-4677-AAAA-1234-49D301F17D85} = {1EBC7A53-4677-AAAA-1234-49D301F17D85} + {1EBC7A53-4677-75D7-8D4A-49D301F17D85} = {1EBC7A53-4677-75D7-8D4A-49D301F17D85} + {1EBC7A53-4677-ADF1-8D4A-49D301F17D85} = {1EBC7A53-4677-ADF1-8D4A-49D301F17D85} + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} = {5EEFE977-C56D-462F-BDEE-12A5452EB8CC} + {5A42018B-95AC-A789-E4E4-59A692649DCA} = {5A42018B-95AC-A789-E4E4-59A692649DCA} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} = {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} + {BE7472E1-E76E-4969-A35F-054614F5884E} = {BE7472E1-E76E-4969-A35F-054614F5884E} + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA} + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} = {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408}.Debug|Win32.Build.0 = Debug|Win32 + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408}.Debug|Win32.Build.0 = Debug|Win32 + {2C7E83B9-1234-432A-97BA-FCF4D0728408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F92EC58-D94C-40BF-8C82-77607C72E1E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F92EC58-D94C-40BF-8C82-77607C72E1E3}.Debug|Win32.Build.0 = Debug|Win32 + {2F92EC58-1234-40BF-5678-77607C72E1E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F92EC58-1234-40BF-5678-77607C72E1E3}.Debug|Win32.Build.0 = Debug|Win32 + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408}.Debug|Win32.Build.0 = Debug|Win32 + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {E251B4F4-0B0A-482B-BA18-2509ADC4B6AA}.Debug|Win32.Build.0 = Debug|Win32 + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC}.Debug|Win32.ActiveCfg = Debug|Win32 + {5EEFE977-C56D-462F-BDEE-12A5452EB8CC}.Debug|Win32.Build.0 = Debug|Win32 + {5A42018B-95AC-A789-E4E4-59A692649DCA}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A42018B-95AC-A789-E4E4-59A692649DCA}.Debug|Win32.Build.0 = Debug|Win32 + {0C80BBEE-1B00-4567-1234-067292C84EDB}.Debug|Win32.ActiveCfg = Debug|Win32 + {0C80BBEE-1B00-4567-1234-067292C84EDB}.Debug|Win32.Build.0 = Debug|Win32 + {E251B4F4-0B0A-482B-BB33-1234ADC4B6AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {E251B4F4-0B0A-482B-BB33-1234ADC4B6AA}.Debug|Win32.Build.0 = Debug|Win32 + {BE7472E1-E76E-4969-A35F-054614F5884E}.Debug|Win32.ActiveCfg = Debug|Win32 + {BE7472E1-E76E-4969-A35F-054614F5884E}.Debug|Win32.Build.0 = Debug|Win32 + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {E251B4F4-0B0A-482B-BA18-1234ADC4B6AA}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {A60D658D-766C-40DB-BAFF-59AB884D86FB}.Debug|Win32.ActiveCfg = Debug|Win32 + {A60D658D-766C-40DB-BAFF-59AB884D86FB}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-4C3A-8D4A-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-4C3A-8D4A-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {A60D658D-766C-40DB-BAE4-59AB884D86FB}.Debug|Win32.ActiveCfg = Debug|Win32 + {A60D658D-766C-40DB-BAE4-59AB884D86FB}.Debug|Win32.Build.0 = Debug|Win32 + {0F789DF8-22CC-4392-98DB-AC3960FAD4EA}.Debug|Win32.ActiveCfg = Debug|Win32 + {0F789DF8-22CC-4392-98DB-AC3960FAD4EA}.Debug|Win32.Build.0 = Debug|Win32 + {2F92EC58-D94C-40BF-4444-77607C72E1E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F92EC58-D94C-40BF-4444-77607C72E1E3}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-ADF1-8D4A-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-ADF1-8D4A-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-269001F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-269001F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-75D7-8D4A-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-75D7-8D4A-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-49DFF4417D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-4C3A-8DFF-49DFF4417D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-4C3A-8D4A-49D301157985}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-4C3A-8D4A-49D301157985}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-33FF-4C3A-8DFF-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-33FF-4C3A-8DFF-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-33FF-7890-7890-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-33FF-7890-7890-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-5555-2222-49D301157985}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-5555-2222-49D301157985}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-AAAA-1234-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-AAAA-1234-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-1234-DDDD-49DFF4417D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-1234-DDDD-49DFF4417D85}.Debug|Win32.Build.0 = Debug|Win32 + {B4823266-DF8C-4EFB-91C0-C7E78C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-4EFB-91C0-C7E78C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {B4823266-DF8C-4EFB-91C0-C7688C234EAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4823266-DF8C-4EFB-91C0-C7688C234EAC}.Debug|Win32.Build.0 = Debug|Win32 + {1EBC7A53-4677-FFFF-1234-49D301F17D85}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EBC7A53-4677-FFFF-1234-49D301F17D85}.Debug|Win32.Build.0 = Debug|Win32 + {9462FDEA-3E53-4250-8710-DD50AF48607C}.Debug|Win32.ActiveCfg = Debug|Win32 + {9462FDEA-3E53-4250-8710-DD50AF48607C}.Debug|Win32.Build.0 = Debug|Win32 + {C684B76D-52EC-49CE-84F2-B031509419A5}.Debug|Win32.ActiveCfg = Debug|Win32 + {C684B76D-52EC-49CE-84F2-B031509419A5}.Debug|Win32.Build.0 = Debug|Win32 + {E7D19356-B0AB-44AD-ACCB-5FFFCC4837BE}.Debug|Win32.ActiveCfg = Debug|Win32 + {E7D19356-B0AB-44AD-ACCB-5FFFCC4837BE}.Debug|Win32.Build.0 = Debug|Win32 + {389DF3C9-A628-4F6D-8C52-8924FA01DE66}.Debug|Win32.ActiveCfg = Debug|Win32 + {389DF3C9-A628-4F6D-8C52-8924FA01DE66}.Debug|Win32.Build.0 = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {2C7E83B9-7FE8-5555-97BA-FCF4D0728408} = {B7B3CB79-CA94-4ED3-9DCA-EC12458C2EBD} + {2C7E83B9-1234-432A-97BA-FCF4D0728408} = {B7B3CB79-CA94-4ED3-9DCA-EC12458C2EBD} + {2C7E83B9-123A-BCDF-97BA-FCF4D0728408} = {B7B3CB79-CA94-4ED3-9DCA-EC12458C2EBD} + {2C7E83B9-7FE8-432A-97BA-FCF4D0728408} = {B7B3CB79-CA94-4ED3-9DCA-EC12458C2EBD} + {2F92EC58-1234-40BF-5678-77607C72E1E3} = {FC52B7B5-744E-45D6-815C-3502F9D965E7} + {2F92EC58-D94C-40BF-8C82-77607C72E1E3} = {FC52B7B5-744E-45D6-815C-3502F9D965E7} + {9462FDEA-3E53-4250-8710-DD50AF48607C} = {FC52B7B5-744E-45D6-815C-3502F9D965E7} + {C684B76D-52EC-49CE-84F2-B031509419A5} = {FC52B7B5-744E-45D6-815C-3502F9D965E7} + {A60D658D-766C-40DB-BAFF-59AB884D86FB} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-4677-4C3A-8DFF-269001F17D85} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-4677-4C3A-8DFF-49DFF4417D85} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-33FF-4C3A-8DFF-49D301F17D85} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-33FF-7890-7890-49D301F17D85} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-4677-1234-DDDD-49DFF4417D85} = {11041D08-354A-4300-9624-41277E67DE34} + {B4823266-DF8C-4EFB-91C0-C7E78C234EAC} = {11041D08-354A-4300-9624-41277E67DE34} + {1EBC7A53-4677-4C3A-8DFF-49D301F17D85} = {11041D08-354A-4300-9624-41277E67DE34} + {A60D658D-766C-40DB-BAE4-59AB884D86FB} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-ADF1-8D4A-49D301F17D85} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-75D7-8D4A-49D301F17D85} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-4C3A-8D4A-49D301157985} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-5555-2222-49D301157985} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-AAAA-1234-49D301F17D85} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {B4823266-DF8C-4EFB-91C0-C7688C234EAC} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-4C3A-8D4A-49D301F17D85} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {1EBC7A53-4677-FFFF-1234-49D301F17D85} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + {389DF3C9-A628-4F6D-8C52-8924FA01DE66} = {1CBEAA34-BA34-497D-A775-B9AF6F905696} + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection + GlobalSection(DevPartner) = postSolution + EndGlobalSection +EndGlobal diff --git a/iup/mak.vc9/iup_pplot.vcproj b/iup/mak.vc9/iup_pplot.vcproj new file mode 100755 index 0000000..8887000 --- /dev/null +++ b/iup/mak.vc9/iup_pplot.vcproj @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupcd.vcproj b/iup/mak.vc9/iupcd.vcproj new file mode 100755 index 0000000..ddc990f --- /dev/null +++ b/iup/mak.vc9/iupcd.vcproj @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupcontrols.vcproj b/iup/mak.vc9/iupcontrols.vcproj new file mode 100755 index 0000000..6a452af --- /dev/null +++ b/iup/mak.vc9/iupcontrols.vcproj @@ -0,0 +1,335 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupcore.vcproj b/iup/mak.vc9/iupcore.vcproj new file mode 100755 index 0000000..fbe0017 --- /dev/null +++ b/iup/mak.vc9/iupcore.vcproj @@ -0,0 +1,600 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupgl.vcproj b/iup/mak.vc9/iupgl.vcproj new file mode 100755 index 0000000..e8d7b71 --- /dev/null +++ b/iup/mak.vc9/iupgl.vcproj @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupgtk.vcproj b/iup/mak.vc9/iupgtk.vcproj new file mode 100755 index 0000000..17281f1 --- /dev/null +++ b/iup/mak.vc9/iupgtk.vcproj @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupim.vcproj b/iup/mak.vc9/iupim.vcproj new file mode 100755 index 0000000..103a318 --- /dev/null +++ b/iup/mak.vc9/iupim.vcproj @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupimglib.vcproj b/iup/mak.vc9/iupimglib.vcproj new file mode 100755 index 0000000..0a21853 --- /dev/null +++ b/iup/mak.vc9/iupimglib.vcproj @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iuplua3.vcproj b/iup/mak.vc9/iuplua3.vcproj new file mode 100755 index 0000000..9993c1c --- /dev/null +++ b/iup/mak.vc9/iuplua3.vcproj @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iuplua5.vcproj b/iup/mak.vc9/iuplua5.vcproj new file mode 100755 index 0000000..17d9a55 --- /dev/null +++ b/iup/mak.vc9/iuplua5.vcproj @@ -0,0 +1,470 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iuplua_pplot3.vcproj b/iup/mak.vc9/iuplua_pplot3.vcproj new file mode 100755 index 0000000..9965d01 --- /dev/null +++ b/iup/mak.vc9/iuplua_pplot3.vcproj @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iuplua_pplot5.vcproj b/iup/mak.vc9/iuplua_pplot5.vcproj new file mode 100755 index 0000000..0666045 --- /dev/null +++ b/iup/mak.vc9/iuplua_pplot5.vcproj @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluacd3.vcproj b/iup/mak.vc9/iupluacd3.vcproj new file mode 100755 index 0000000..59a0d02 --- /dev/null +++ b/iup/mak.vc9/iupluacd3.vcproj @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluacd5.vcproj b/iup/mak.vc9/iupluacd5.vcproj new file mode 100755 index 0000000..83aeede --- /dev/null +++ b/iup/mak.vc9/iupluacd5.vcproj @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluacontrols3.vcproj b/iup/mak.vc9/iupluacontrols3.vcproj new file mode 100755 index 0000000..b2babd2 --- /dev/null +++ b/iup/mak.vc9/iupluacontrols3.vcproj @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluacontrols5.vcproj b/iup/mak.vc9/iupluacontrols5.vcproj new file mode 100755 index 0000000..bc1d6fe --- /dev/null +++ b/iup/mak.vc9/iupluacontrols5.vcproj @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluaexe3.vcproj b/iup/mak.vc9/iupluaexe3.vcproj new file mode 100755 index 0000000..3ed6105 --- /dev/null +++ b/iup/mak.vc9/iupluaexe3.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluaexe5.vcproj b/iup/mak.vc9/iupluaexe5.vcproj new file mode 100755 index 0000000..db6804a --- /dev/null +++ b/iup/mak.vc9/iupluaexe5.vcproj @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluaexe5gtk.vcproj b/iup/mak.vc9/iupluaexe5gtk.vcproj new file mode 100755 index 0000000..038790d --- /dev/null +++ b/iup/mak.vc9/iupluaexe5gtk.vcproj @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluagl3.vcproj b/iup/mak.vc9/iupluagl3.vcproj new file mode 100755 index 0000000..f920704 --- /dev/null +++ b/iup/mak.vc9/iupluagl3.vcproj @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluagl5.vcproj b/iup/mak.vc9/iupluagl5.vcproj new file mode 100755 index 0000000..d8d08e4 --- /dev/null +++ b/iup/mak.vc9/iupluagl5.vcproj @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluaim3.vcproj b/iup/mak.vc9/iupluaim3.vcproj new file mode 100755 index 0000000..ee5ce8e --- /dev/null +++ b/iup/mak.vc9/iupluaim3.vcproj @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluaim5.vcproj b/iup/mak.vc9/iupluaim5.vcproj new file mode 100755 index 0000000..f5c7a79 --- /dev/null +++ b/iup/mak.vc9/iupluaim5.vcproj @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluaimglib5.vcproj b/iup/mak.vc9/iupluaimglib5.vcproj new file mode 100755 index 0000000..8dc8a4d --- /dev/null +++ b/iup/mak.vc9/iupluaimglib5.vcproj @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluaole3.vcproj b/iup/mak.vc9/iupluaole3.vcproj new file mode 100755 index 0000000..dc60ae0 --- /dev/null +++ b/iup/mak.vc9/iupluaole3.vcproj @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupluaole5.vcproj b/iup/mak.vc9/iupluaole5.vcproj new file mode 100755 index 0000000..bd86330 --- /dev/null +++ b/iup/mak.vc9/iupluaole5.vcproj @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupmot.vcproj b/iup/mak.vc9/iupmot.vcproj new file mode 100755 index 0000000..9bbfa5c --- /dev/null +++ b/iup/mak.vc9/iupmot.vcproj @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupole.vcproj b/iup/mak.vc9/iupole.vcproj new file mode 100755 index 0000000..c1277a5 --- /dev/null +++ b/iup/mak.vc9/iupole.vcproj @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupsample.vcproj b/iup/mak.vc9/iupsample.vcproj new file mode 100755 index 0000000..144f3ba --- /dev/null +++ b/iup/mak.vc9/iupsample.vcproj @@ -0,0 +1,1179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupsamplegtk.vcproj b/iup/mak.vc9/iupsamplegtk.vcproj new file mode 100755 index 0000000..24da672 --- /dev/null +++ b/iup/mak.vc9/iupsamplegtk.vcproj @@ -0,0 +1,798 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iuptest.vcproj b/iup/mak.vc9/iuptest.vcproj new file mode 100755 index 0000000..213431c --- /dev/null +++ b/iup/mak.vc9/iuptest.vcproj @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iuptestgtk.vcproj b/iup/mak.vc9/iuptestgtk.vcproj new file mode 100755 index 0000000..4cbc9da --- /dev/null +++ b/iup/mak.vc9/iuptestgtk.vcproj @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupview.vcproj b/iup/mak.vc9/iupview.vcproj new file mode 100755 index 0000000..440fbde --- /dev/null +++ b/iup/mak.vc9/iupview.vcproj @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupviewgtk.vcproj b/iup/mak.vc9/iupviewgtk.vcproj new file mode 100755 index 0000000..e622956 --- /dev/null +++ b/iup/mak.vc9/iupviewgtk.vcproj @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/iupwin.vcproj b/iup/mak.vc9/iupwin.vcproj new file mode 100755 index 0000000..15578a9 --- /dev/null +++ b/iup/mak.vc9/iupwin.vcproj @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/mak.vc9/ledc.vcproj b/iup/mak.vc9/ledc.vcproj new file mode 100755 index 0000000..8925c10 --- /dev/null +++ b/iup/mak.vc9/ledc.vcproj @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iup/make_uname b/iup/make_uname new file mode 100755 index 0000000..2f0a48f --- /dev/null +++ b/iup/make_uname @@ -0,0 +1,49 @@ +#This builds all the libraries for 1 uname + +cd src +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. + +cd srccd +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. + +cd srccontrols +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. + +cd srcgl +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. + +cd srcpplot +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. + +cd srcim +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. + +cd srcimglib +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. + +cd srcledc +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. + +cd srcview +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. + +#cd srclua3 +#./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +#cd .. + +cd srclua5 +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. + +cd srcconsole +./make_uname $1 $2 $3 $4 $5 $6 $7 $8 +cd .. diff --git a/iup/make_uname.bat b/iup/make_uname.bat new file mode 100755 index 0000000..71d36d7 --- /dev/null +++ b/iup/make_uname.bat @@ -0,0 +1,5 @@ +@echo off +REM This builds all the libraries for 1 uname + +REM FOR %%u IN (src srccd srccontrols srcpplot srcgl srcim srcole srcledc srcview srclua3 srclua5 srcconsole) DO call make_uname_lib.bat %%u %1 %2 %3 %4 %5 %6 %7 %8 %9 +FOR %%u IN (src srccd srccontrols srcpplot srcgl srcim srcimglib srcole srcledc srcview srclua5 srcconsole) DO call make_uname_lib.bat %%u %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/iup/make_uname_lib.bat b/iup/make_uname_lib.bat new file mode 100755 index 0000000..f155f22 --- /dev/null +++ b/iup/make_uname_lib.bat @@ -0,0 +1,6 @@ +@echo off +REM This builds 1 library for 1 uname + +cd %1 +call make_uname %2 %3 %4 %5 %6 %7 +cd .. diff --git a/iup/src/Makefile b/iup/src/Makefile new file mode 100755 index 0000000..028047f --- /dev/null +++ b/iup/src/Makefile @@ -0,0 +1,9 @@ + +.PHONY: do_all iup iupgtk +do_all: iup iupgtk + +iup: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak + +iupgtk: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak USE_GTK=Yes diff --git a/iup/src/config.mak b/iup/src/config.mak new file mode 100755 index 0000000..e857643 --- /dev/null +++ b/iup/src/config.mak @@ -0,0 +1,118 @@ +PROJNAME = iup +LIBNAME = iup +OPT = YES + +#ifdef DBG + DEFINES += IUP_ASSERT +#endif + +INCLUDES = ../include . + +SRC = iup_array.c iup_callback.c iup_dlglist.c iup_attrib.c iup_focus.c iup_font.c \ + iup_globalattrib.c iup_object.c iup_key.c iup_layout.c iup_ledlex.c iup_names.c iup_open.c \ + iup_ledparse.c iup_predial.c iup_register.c iup_scanf.c iup_show.c iup_str.c iup_table.c \ + iup_func.c iup_childtree.c iup.c iup_classattrib.c iup_dialog.c iup_assert.c iup_canvas.c \ + iup_messagedlg.c iup_timer.c iup_image.c iup_label.c iup_fill.c iup_zbox.c \ + iup_colordlg.c iup_fontdlg.c iup_filedlg.c iup_strmessage.c iup_menu.c iup_frame.c \ + iup_user.c iup_button.c iup_radio.c iup_toggle.c iup_progressbar.c iup_text.c iup_val.c \ + iup_box.c iup_hbox.c iup_vbox.c iup_cbox.c iup_class.c iup_classbase.c iup_maskmatch.c \ + iup_mask.c iup_maskparse.c iup_tabs.c iup_spin.c iup_list.c iup_getparam.c \ + iup_sbox.c iup_normalizer.c iup_tree.c + +ifdef USE_GTK + ifndef GTK_DEFAULT + # Build GTK version in IRIX,SunOS,AIX,Win32 + LIBNAME := iupgtk + endif + + DEFINES += GTK_DISABLE_DEPRECATED + INCLUDES += gtk + SRC += gtk/iupgtk_common.c gtk/iupgtk_focus.c gtk/iupgtk_font.c gtk/iupgtk_clipboard.c \ + gtk/iupgtk_globalattrib.c gtk/iupgtk_key.c gtk/iupgtk_tips.c \ + gtk/iupgtk_loop.c gtk/iupgtk_open.c gtk/iupgtk_messagedlg.c \ + gtk/iupgtk_dialog.c gtk/iupgtk_timer.c gtk/iupgtk_image.c gtk/iupgtk_label.c \ + gtk/iupgtk_colordlg.c gtk/iupgtk_fontdlg.c gtk/iupgtk_filedlg.c \ + gtk/iupgtk_button.c gtk/iupgtk_toggle.c gtk/iupgtk_progressbar.c \ + gtk/iupgtk_text.c gtk/iupgtk_val.c gtk/iupgtk_frame.c gtk/iupgtk_canvas.c \ + gtk/iupgtk_tabs.c gtk/iupgtk_menu.c gtk/iupgtk_list.c gtk/iupgtk_tree.c + + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + DEFINES += _WIN32_WINNT=0x0500 _WIN32_IE=0x0500 WINVER=0x0500 NOTREEVIEW + SRC += win/iupwindows_main.c win/iupwindows_help.c win/iupwindows_info.c + else + SRC += gtk/iupgtk_help.c mot/iupunix_info.c + endif + + ifdef USE_HILDON + DEFINES += HILDON + INCLUDES += /usr/include/hildon-1 + LIBS += hildon-1 + endif +else + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + + SRC += win/iupwin_common.c win/iupwin_brush.c win/iupwin_focus.c win/iupwin_font.c \ + win/iupwin_globalattrib.c win/iupwin_handle.c win/iupwin_key.c \ + win/iupwin_loop.c win/iupwin_open.c win/iupwin_tips.c win/iupwin_info.c \ + win/iupwin_dialog.c win/iupwin_messagedlg.c win/iupwin_timer.c \ + win/iupwin_image.c win/iupwin_label.c win/iupwin_canvas.c win/iupwin_frame.c \ + win/iupwin_colordlg.c win/iupwin_fontdlg.c win/iupwin_filedlg.c \ + win/iupwin_button.c win/iupwin_draw.c win/iupwin_toggle.c win/iupwin_clipboard.c \ + win/iupwin_progressbar.c win/iupwin_text.c win/iupwin_val.c \ + win/iupwin_tabs.c win/iupwin_menu.c win/iupwin_list.c win/iupwin_tree.c + + SRC += win/iupwindows_main.c win/iupwindows_help.c win/iupwindows_info.c + + INCLUDES += win + DEFINES += _WIN32_WINNT=0x0500 _WIN32_IE=0x0500 WINVER=0x0500 NOTREEVIEW + else + ifdef GTK_DEFAULT + # Build Motif version in Linux,Darwin,FreeBSD + LIBNAME := iupmot + endif + + SRC += mot/iupmot_common.c mot/iupmot_color.c mot/iupmot_focus.c mot/iupmot_font.c \ + mot/iupmot_key.c mot/iupmot_loop.c mot/iupmot_open.c mot/iupmot_tips.c \ + mot/iupmot_globalattrib.c mot/iupmot_dialog.c mot/iupmot_messagedlg.c \ + mot/iupmot_timer.c mot/iupmot_image.c mot/iupmot_label.c mot/iupmot_canvas.c \ + mot/iupmot_colordlg.c mot/iupmot_fontdlg.c mot/iupmot_filedlg.c mot/iupmot_frame.c \ + mot/iupmot_button.c mot/iupmot_toggle.c mot/iupmot_progressbar.c mot/iupmot_clipboard.c \ + mot/iupmot_text.c mot/iupmot_val.c mot/iupmot_tabs.c mot/iupmot_menu.c \ + mot/iupmot_list.c mot/iupmot_tree.c + + SRC += mot/iupunix_help.c mot/iupunix_info.c + + INCLUDES += mot + USE_MOTIF=Yes + endif +endif + +ifeq "$(TEC_SYSNAME)" "SunOS" + # Necessary or the fileopen will not work in SunOS (needs to be retested) + #DEFINES += NO_PATH_MODE_RELATIVE +endif + +ifneq ($(findstring dll, $(TEC_UNAME)), ) + DEFINES += IUP_DLL + SRC += iup_dll.rc + DEF_FILE = iup.def +endif + +ifeq "$(TEC_UNAME)" "vc6" + # Necessary because VC6 has an old WinSDK + #WINSDK = d:/lng/vc7/PlatformSDK + #INCLUDES += $(WINSDK)/include + #LDIR = $(WINSDK)/lib +endif + +ifeq "$(TEC_UNAME)" "dll" + # Necessary because VC6 has an old WinSDK + #WINSDK = d:/lng/vc7/PlatformSDK + #INCLUDES += $(WINSDK)/include + #LDIR = $(WINSDK)/lib +endif + +ifeq "$(TEC_UNAME)" "owc1" + # Necessary or IUP will not work in Open Watcom + DBG=Yes +endif diff --git a/iup/src/gtk/iupgtk_button.c b/iup/src/gtk/iupgtk_button.c new file mode 100755 index 0000000..18be87c --- /dev/null +++ b/iup/src/gtk/iupgtk_button.c @@ -0,0 +1,477 @@ +/** \file + * \brief Button Control + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" +#include "iup_button.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_image.h" +#include "iup_key.h" + +#include "iupgtk_drv.h" + + +#if !GTK_CHECK_VERSION(2, 6, 0) +static void gtk_button_set_image(GtkButton *button, GtkWidget *image) +{ +} +static GtkWidget* gtk_button_get_image(GtkButton *button) +{ + return NULL; +} +#endif + +void iupdrvButtonAddBorders(int *x, int *y) +{ +#ifdef WIN32 + int border_size = 2*5; +#else +#ifdef HILDON + int border_size = 2*7+1; /* borders are not symetric */ +#else + int border_size = 2*5+1; /* borders are not symetric */ +#endif +#endif + (*x) += border_size; + (*y) += border_size; +} + +static void gtk_button_children_callback(GtkWidget *widget, gpointer client_data) +{ + if (GTK_IS_LABEL(widget)) + { + GtkLabel **label = (GtkLabel**) client_data; + *label = (GtkLabel*)widget; + } +} + +static GtkLabel* gtkButtonGetLabel(Ihandle* ih) +{ + if (ih->data->type == IUP_BUTTON_TEXT) /* text only */ + return (GtkLabel*)gtk_bin_get_child((GtkBin*)ih->handle); + else if (ih->data->type == IUP_BUTTON_BOTH) /* both */ + { + /* when both is set, button contains an GtkAlignment, + that contains a GtkBox, that contains a label and an image */ + GtkContainer *container = (GtkContainer*)gtk_bin_get_child((GtkBin*)gtk_bin_get_child((GtkBin*)ih->handle)); + GtkLabel* label = NULL; + gtk_container_foreach(container, gtk_button_children_callback, &label); + return label; + } + return NULL; +} + +static int gtkButtonSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type != IUP_BUTTON_IMAGE) /* text or both */ + { + GtkLabel* label = gtkButtonGetLabel(ih); + iupgtkSetMnemonicTitle(ih, label, value); + return 1; + } + + return 0; +} + +static int gtkButtonSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + GtkButton* button = (GtkButton*)ih->handle; + PangoAlignment alignment; + float xalign, yalign; + char value1[30]="", value2[30]=""; + + iupStrToStrStr(value, value1, value2, ':'); + + if (iupStrEqualNoCase(value1, "ARIGHT")) + { + xalign = 1.0f; + alignment = PANGO_ALIGN_RIGHT; + } + else if (iupStrEqualNoCase(value1, "ACENTER")) + { + xalign = 0.5f; + alignment = PANGO_ALIGN_CENTER; + } + else /* "ALEFT" */ + { + xalign = 0; + alignment = PANGO_ALIGN_LEFT; + } + + if (iupStrEqualNoCase(value2, "ABOTTOM")) + yalign = 1.0f; + else if (iupStrEqualNoCase(value2, "ATOP")) + yalign = 0; + else /* ACENTER (default) */ + yalign = 0.5f; + + gtk_button_set_alignment(button, xalign, yalign); + + if (ih->data->type == IUP_BUTTON_TEXT && !GTK_IS_COLOR_BUTTON(ih->handle)) /* text only */ + { + PangoLayout* layout = gtk_label_get_layout(gtkButtonGetLabel(ih)); + if (layout) pango_layout_set_alignment(layout, alignment); + } + + return 1; +} + +static int gtkButtonSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + if (ih->handle) + { + if (ih->data->type == IUP_BUTTON_TEXT) /* text only */ + { + GtkMisc* misc = (GtkMisc*)gtk_bin_get_child((GtkBin*)ih->handle); + gtk_misc_set_padding(misc, ih->data->horiz_padding, ih->data->vert_padding); + } + else + { + GtkAlignment* alignment = (GtkAlignment*)gtk_bin_get_child((GtkBin*)ih->handle); + gtk_alignment_set_padding(alignment, ih->data->vert_padding, ih->data->vert_padding, + ih->data->horiz_padding, ih->data->horiz_padding); + } + } + return 0; +} + +#ifdef WIN32 +static int gtkButtonSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_BUTTON_TEXT && GTK_IS_COLOR_BUTTON(ih->handle)) + { + GdkColor color; + unsigned char r, g, b; + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgdkColorSet(&color, r, g, b); + gtk_color_button_set_color((GtkColorButton*)ih->handle, &color); + return 1; + } + + return iupdrvBaseSetBgColorAttrib(ih, value); +} +#endif + +static int gtkButtonSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + GtkLabel* label = gtkButtonGetLabel(ih); + if (!label) return 0; + + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgtkBaseSetFgColor((GtkWidget*)label, r, g, b); + + return 1; +} + +static int gtkButtonSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + iupdrvSetStandardFontAttrib(ih, value); + + if (ih->handle) + { + GtkLabel* label = gtkButtonGetLabel(ih); + if (!label) return 1; + + gtk_widget_modify_font((GtkWidget*)label, (PangoFontDescription*)iupgtkGetPangoFontDescAttrib(ih)); + if (ih->data->type == IUP_BUTTON_TEXT && !GTK_IS_COLOR_BUTTON(ih->handle)) /* text only */ + iupgtkFontUpdatePangoLayout(ih, gtk_label_get_layout(label)); + } + return 1; +} + +static void gtkButtonSetPixbuf(Ihandle* ih, const char* name, int make_inactive) +{ + GtkButton* button = (GtkButton*)ih->handle; + GtkImage* image = (GtkImage*)gtk_button_get_image(button); + + if (name && image) + { + GdkPixbuf* pixbuf = iupImageGetImage(name, ih, make_inactive); + GdkPixbuf* old_pixbuf = gtk_image_get_pixbuf(image); + if (pixbuf != old_pixbuf) + gtk_image_set_from_pixbuf(image, pixbuf); + return; + } + + /* if not defined */ +#if GTK_CHECK_VERSION(2, 8, 0) + if (image) + gtk_image_clear(image); +#endif +} + +static int gtkButtonSetImageAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type != IUP_BUTTON_TEXT) /* image or both */ + { + if (iupdrvIsActive(ih)) + gtkButtonSetPixbuf(ih, value, 0); + else + { + if (!iupAttribGet(ih, "IMINACTIVE")) + { + /* if not active and IMINACTIVE is not defined + then automaticaly create one based on IMAGE */ + gtkButtonSetPixbuf(ih, value, 1); /* make_inactive */ + } + } + return 1; + } + else + return 0; +} + +static int gtkButtonSetImInactiveAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type != IUP_BUTTON_TEXT) /* image or both */ + { + if (!iupdrvIsActive(ih)) + { + if (value) + gtkButtonSetPixbuf(ih, value, 0); + else + { + /* if not defined then automaticaly create one based on IMAGE */ + char* name = iupAttribGet(ih, "IMAGE"); + gtkButtonSetPixbuf(ih, name, 1); /* make_inactive */ + } + } + return 1; + } + else + return 0; +} + +static int gtkButtonSetActiveAttrib(Ihandle* ih, const char* value) +{ + /* update the inactive image if necessary */ + if (ih->data->type != IUP_BUTTON_TEXT) /* image or both */ + { + if (!iupStrBoolean(value)) + { + char* name = iupAttribGet(ih, "IMINACTIVE"); + if (name) + gtkButtonSetPixbuf(ih, name, 0); + else + { + /* if not defined then automaticaly create one based on IMAGE */ + name = iupAttribGet(ih, "IMAGE"); + gtkButtonSetPixbuf(ih, name, 1); /* make_inactive */ + } + } + else + { + /* must restore the normal image */ + char* name = iupAttribGet(ih, "IMAGE"); + gtkButtonSetPixbuf(ih, name, 0); + } + } + + return iupBaseSetActiveAttrib(ih, value); +} + +static int gtkButtonSetFocusOnClickAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + gtk_button_set_focus_on_click((GtkButton*)ih->handle, TRUE); + else + gtk_button_set_focus_on_click((GtkButton*)ih->handle, FALSE); + return 1; +} + +static gboolean gtkButtonEnterLeaveEvent(GtkWidget *widget, GdkEventCrossing *evt, Ihandle *ih) +{ + iupgtkEnterLeaveEvent(widget, evt, ih); + (void)widget; + + if (evt->type == GDK_ENTER_NOTIFY) + gtk_button_set_relief((GtkButton*)ih->handle, GTK_RELIEF_NORMAL); + else if (evt->type == GDK_LEAVE_NOTIFY) + gtk_button_set_relief((GtkButton*)ih->handle, GTK_RELIEF_NONE); + + return FALSE; +} + +static gboolean gtkButtonEvent(GtkWidget *widget, GdkEventButton *evt, Ihandle *ih) +{ + if (iupgtkButtonEvent(widget, evt, ih)==TRUE) + return TRUE; + + if (ih->data->type != IUP_BUTTON_TEXT) /* image or both */ + { + char* name = iupAttribGet(ih, "IMPRESS"); + if (name) + { + if (evt->type == GDK_BUTTON_PRESS) + gtkButtonSetPixbuf(ih, name, 0); + else + { + name = iupAttribGet(ih, "IMAGE"); + gtkButtonSetPixbuf(ih, name, 0); + } + } + } + + return FALSE; +} + +static void gtkButtonClicked(GtkButton *widget, Ihandle* ih) +{ + Icallback cb = IupGetCallback(ih, "ACTION"); + if (cb) + { + if (cb(ih) == IUP_CLOSE) + IupExitLoop(); + } + (void)widget; +} + +static int gtkButtonMapMethod(Ihandle* ih) +{ + int impress; + char* value; + + ih->handle = gtk_button_new(); + if (!ih->handle) + return IUP_ERROR; + + value = iupAttribGet(ih, "IMAGE"); + if (value) + { + gtk_button_set_image((GtkButton*)ih->handle, gtk_image_new()); + ih->data->type = IUP_BUTTON_IMAGE; + + value = iupAttribGet(ih, "TITLE"); + if (value) + { + GtkSettings* settings = gtk_widget_get_settings(ih->handle); + g_object_set(settings, "gtk-button-images", (int)TRUE, NULL); + + gtk_button_set_label((GtkButton*)ih->handle, value); + ih->data->type |= IUP_BUTTON_TEXT; + +#if GTK_CHECK_VERSION(2, 10, 0) + gtk_button_set_image_position((GtkButton*)ih->handle, ih->data->img_position); /* IUP and GTK have the same Ids */ +#endif + } + } + else + { + char* title = iupAttribGet(ih, "TITLE"); + if (!title) + { +#ifdef WIN32 + if (iupAttribGet(ih, "BGCOLOR")) + { + gtk_widget_destroy(ih->handle); + ih->handle = gtk_color_button_new(); + } + else + gtk_button_set_label((GtkButton*)ih->handle, ""); +#else + gtk_button_set_label((GtkButton*)ih->handle, ""); +#endif + } + else + gtk_button_set_label((GtkButton*)ih->handle, title); + ih->data->type = IUP_BUTTON_TEXT; + } + + /* add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + if (!iupAttribGetBoolean(ih, "CANFOCUS")) + GTK_WIDGET_FLAGS(ih->handle) &= ~GTK_CAN_FOCUS; + + value = iupAttribGet(ih, "IMPRESS"); + impress = (ih->data->type & IUP_BUTTON_IMAGE && value)? 1: 0; + if (!impress && iupAttribGetBoolean(ih, "FLAT")) + { + gtk_button_set_relief((GtkButton*)ih->handle, GTK_RELIEF_NONE); + + g_signal_connect(G_OBJECT(ih->handle), "enter-notify-event", G_CALLBACK(gtkButtonEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "leave-notify-event", G_CALLBACK(gtkButtonEnterLeaveEvent), ih); + } + else + { + if (impress && !iupAttribGetStr(ih, "IMPRESSBORDER")) + gtk_button_set_relief((GtkButton*)ih->handle, GTK_RELIEF_NONE); + else + gtk_button_set_relief((GtkButton*)ih->handle, GTK_RELIEF_NORMAL); + + g_signal_connect(G_OBJECT(ih->handle), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + } + + g_signal_connect(G_OBJECT(ih->handle), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(iupgtkKeyPressEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + + g_signal_connect(G_OBJECT(ih->handle), "clicked", G_CALLBACK(gtkButtonClicked), ih); + g_signal_connect(G_OBJECT(ih->handle), "button-press-event", G_CALLBACK(gtkButtonEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "button-release-event",G_CALLBACK(gtkButtonEvent), ih); + + gtk_widget_realize(ih->handle); + + return IUP_NOERROR; +} + +void iupdrvButtonInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkButtonMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Overwrite Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, gtkButtonSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, gtkButtonSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + + /* Visual */ +#ifdef WIN32 + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, gtkButtonSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); +#else + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); +#endif + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, gtkButtonSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "TITLE", NULL, gtkButtonSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupButton only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", NULL, gtkButtonSetAlignmentAttrib, "ACENTER:ACENTER", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "IMAGE", NULL, gtkButtonSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMINACTIVE", NULL, gtkButtonSetImInactiveAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMPRESS", NULL, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FOCUSONCLICK", NULL, gtkButtonSetFocusOnClickAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "PADDING", iupButtonGetPaddingAttrib, gtkButtonSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "MARKUP", NULL, NULL, NULL, NULL, IUPAF_DEFAULT); +} diff --git a/iup/src/gtk/iupgtk_canvas.c b/iup/src/gtk/iupgtk_canvas.c new file mode 100755 index 0000000..daae4ad --- /dev/null +++ b/iup/src/gtk/iupgtk_canvas.c @@ -0,0 +1,624 @@ +/** \file + * \brief Canvas Control + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvinfo.h" +#include "iup_drvfont.h" +#include "iup_canvas.h" +#include "iup_key.h" + +#include "iupgtk_drv.h" + + +static int gtkCanvasScroll2Iup(GtkScrollType scroll, int vert) +{ + switch(scroll) + { + case GTK_SCROLL_STEP_UP: + return IUP_SBUP; + case GTK_SCROLL_STEP_DOWN: + return IUP_SBDN; + case GTK_SCROLL_PAGE_UP: + return IUP_SBPGUP; + case GTK_SCROLL_PAGE_DOWN: + return IUP_SBPGDN; + case GTK_SCROLL_STEP_LEFT: + return IUP_SBLEFT; + case GTK_SCROLL_STEP_RIGHT: + return IUP_SBRIGHT; + case GTK_SCROLL_PAGE_LEFT: + return IUP_SBPGLEFT; + case GTK_SCROLL_PAGE_RIGHT: + return IUP_SBPGRIGHT; + case GTK_SCROLL_STEP_BACKWARD: + return vert? IUP_SBUP: IUP_SBLEFT; + case GTK_SCROLL_STEP_FORWARD: + return vert? IUP_SBDN: IUP_SBRIGHT; + case GTK_SCROLL_PAGE_BACKWARD: + return vert? IUP_SBPGUP: IUP_SBPGLEFT; + case GTK_SCROLL_PAGE_FORWARD: + return vert? IUP_SBPGDN: IUP_SBPGRIGHT; + case GTK_SCROLL_JUMP: + case GTK_SCROLL_START: + case GTK_SCROLL_END: + return vert? IUP_SBPOSV: IUP_SBPOSH; + case GTK_SCROLL_NONE: + return -1; + } + + /* No IUP_SBDRAGV or IUP_SBDRAGH support in GTK */ + + return -1; +} + +static gboolean gtkCanvasHChangeValue(GtkRange *range, GtkScrollType scroll, double value, Ihandle *ih) +{ + double posx, posy; + IFniff cb; + + double xmin = iupAttribGetFloat(ih, "XMIN"); + double xmax = iupAttribGetFloat(ih, "XMAX"); + double dx = iupAttribGetFloat(ih, "DX"); + if (value < xmin) value = xmin; + if (value > xmax-dx) value = xmax-dx; + + posx = value; + ih->data->posx = (float)posx; + posy = ih->data->posy; + + cb = (IFniff)IupGetCallback(ih,"SCROLL_CB"); + if (cb) + { + int op = gtkCanvasScroll2Iup(scroll, 0); + if (op == -1) + return FALSE; + + cb(ih, op, (float)posx, (float)posy); + } + else + { + IFnff cb = (IFnff)IupGetCallback(ih,"ACTION"); + if (cb) + cb (ih, (float)posx, (float)posy); + } + + (void)range; + return FALSE; +} + +static gboolean gtkCanvasVChangeValue(GtkRange *range, GtkScrollType scroll, double value, Ihandle *ih) +{ + double posx, posy; + IFniff cb; + + double ymin = iupAttribGetFloat(ih, "YMIN"); + double ymax = iupAttribGetFloat(ih, "YMAX"); + double dy = iupAttribGetFloat(ih, "DY"); + if (value < ymin) value = ymin; + if (value > ymax-dy) value = ymax-dy; + + posy = value; + ih->data->posy = (float)posy; + posx = ih->data->posx; + + cb = (IFniff)IupGetCallback(ih,"SCROLL_CB"); + if (cb) + { + int op = gtkCanvasScroll2Iup(scroll, 1); + if (op == -1) + return FALSE; + + cb(ih, op, (float)posx, (float)posy); + } + else + { + IFnff cb = (IFnff)IupGetCallback(ih,"ACTION"); + if (cb) + cb (ih, (float)posx, (float)posy); + } + + (void)range; + return FALSE; +} + +static gboolean gtkCanvasScrollEvent(GtkWidget *widget, GdkEventScroll *evt, Ihandle *ih) +{ + IFnfiis wcb = (IFnfiis)IupGetCallback(ih, "WHEEL_CB"); + if (wcb) + { + int delta = evt->direction==GDK_SCROLL_UP||evt->direction==GDK_SCROLL_LEFT? 1: -1; + char status[IUPKEY_STATUS_SIZE] = IUPKEY_STATUS_INIT; + int button = evt->direction==GDK_SCROLL_UP||evt->direction==GDK_SCROLL_LEFT? 4: 5; + iupgtkButtonKeySetStatus(evt->state, button, status, 0); + + wcb(ih, (float)delta, (int)evt->x, (int)evt->y, status); + } + else + { + IFniff scb = (IFniff)IupGetCallback(ih,"SCROLL_CB"); + int delta = evt->direction==GDK_SCROLL_UP||evt->direction==GDK_SCROLL_LEFT? 1: -1; + + if (evt->direction==GDK_SCROLL_UP || evt->direction==GDK_SCROLL_DOWN) + { + float posy = ih->data->posy; + posy -= delta*iupAttribGetFloat(ih, "DY")/10.0f; + IupSetfAttribute(ih, "POSY", "%g", posy); + } + else + { + float posx = ih->data->posx; + posx -= delta*iupAttribGetFloat(ih, "DX")/10.0f; + IupSetfAttribute(ih, "POSX", "%g", posx); + } + + if (scb) + { + int scroll_gtk2iup[4] = {IUP_SBUP, IUP_SBDN, IUP_SBLEFT, IUP_SBRIGHT}; + int op = scroll_gtk2iup[evt->direction]; + scb(ih,op,ih->data->posx,ih->data->posy); + } + } + (void)widget; + return TRUE; +} + +static gboolean gtkCanvasButtonEvent(GtkWidget *widget, GdkEventButton *evt, Ihandle *ih) +{ + if (evt->type == GDK_BUTTON_PRESS) + { + /* Force focus on canvas click */ + if (iupAttribGetBoolean(ih, "CANFOCUS")) + gtk_widget_grab_focus(ih->handle); + } + + return iupgtkButtonEvent(widget, evt, ih); +} + +static int gtkCanvasSetBgColorAttrib(Ihandle* ih, const char* value); + +static gboolean gtkCanvasExposeEvent(GtkWidget *widget, GdkEventExpose *evt, Ihandle *ih) +{ + IFnff cb = (IFnff)IupGetCallback(ih,"ACTION"); + if (cb) + { + if (!iupAttribGet(ih, "_IUPGTK_NO_BGCOLOR")) + gtkCanvasSetBgColorAttrib(ih, iupAttribGetStr(ih, "BGCOLOR")); /* reset to update window attributes */ + + iupAttribSetStrf(ih, "CLIPRECT", "%d %d %d %d", evt->area.x, evt->area.y, evt->area.x+evt->area.width-1, evt->area.y+evt->area.height-1); + cb(ih,ih->data->posx,ih->data->posy); + iupAttribSetStr(ih, "CLIPRECT", NULL); + } + + (void)widget; + return TRUE; /* stop other handlers */ +} + +static gboolean gtkCanvasConfigureEvent(GtkWidget *widget, GdkEventConfigure *evt, Ihandle *ih) +{ + IFnii cb = (IFnii)IupGetCallback(ih,"RESIZE_CB"); + if (cb) + cb(ih,evt->width,evt->height); + + (void)widget; + return FALSE; +} + +static GtkScrolledWindow* gtkCanvasGetScrolledWindow(Ihandle* ih) +{ + return (GtkScrolledWindow*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); +} + +static int gtkCanvasSetXAutoHideAttrib(Ihandle* ih, const char *value) +{ + GtkPolicyType vscrollbar_policy; + gtk_scrolled_window_get_policy(gtkCanvasGetScrolledWindow(ih), NULL, &vscrollbar_policy); + + if (ih->data->sb & IUP_SB_HORIZ) + { + GtkPolicyType hscrollbar_policy; + + if (iupStrBoolean(value)) + hscrollbar_policy = GTK_POLICY_AUTOMATIC; + else + hscrollbar_policy = GTK_POLICY_ALWAYS; + + gtk_scrolled_window_set_policy(gtkCanvasGetScrolledWindow(ih), hscrollbar_policy, vscrollbar_policy); + } + else + gtk_scrolled_window_set_policy(gtkCanvasGetScrolledWindow(ih), GTK_POLICY_NEVER, vscrollbar_policy); + + return 1; +} + +static int gtkCanvasSetYAutoHideAttrib(Ihandle* ih, const char *value) +{ + GtkPolicyType hscrollbar_policy; + gtk_scrolled_window_get_policy(gtkCanvasGetScrolledWindow(ih), &hscrollbar_policy, NULL); + + if (ih->data->sb & IUP_SB_VERT) + { + GtkPolicyType vscrollbar_policy; + + if (iupStrBoolean(value)) + vscrollbar_policy = GTK_POLICY_AUTOMATIC; + else + vscrollbar_policy = GTK_POLICY_ALWAYS; + + gtk_scrolled_window_set_policy(gtkCanvasGetScrolledWindow(ih), hscrollbar_policy, vscrollbar_policy); + } + else + gtk_scrolled_window_set_policy(gtkCanvasGetScrolledWindow(ih), hscrollbar_policy, GTK_POLICY_NEVER); + + return 1; +} + +static int gtkCanvasCheckScroll(double min, double max, double *page, double *pos) +{ + double old_pos = *pos; + double range = max-min; + if (*page > range) *page = range; + if (*page <= 0) *page = range/10.; + + if (*pos < min) *pos = min; + if (*pos > (max - *page)) *pos = max - *page; + + if (old_pos == *pos) + return 0; + else + return 1; +} + +static int gtkCanvasSetDXAttrib(Ihandle* ih, const char *value) +{ + if (ih->data->sb & IUP_SB_HORIZ) + { + double xmin, xmax, linex; + float dx; + int value_changed; + GtkAdjustment* sb_horiz = gtk_scrolled_window_get_hadjustment(gtkCanvasGetScrolledWindow(ih)); + if (!sb_horiz) return 1; + + if (!iupStrToFloat(value, &dx)) + return 1; + + xmin = iupAttribGetFloat(ih, "XMIN"); + xmax = iupAttribGetFloat(ih, "XMAX"); + + if (!iupAttribGet(ih,"LINEX")) + { + linex = dx/10; + if (linex==0) + linex = 1; + } + else + linex = iupAttribGetFloat(ih,"LINEX"); + + sb_horiz->lower = xmin; + sb_horiz->upper = xmax; + sb_horiz->step_increment = linex; + sb_horiz->page_size = dx; + + value_changed = gtkCanvasCheckScroll(xmin, xmax, &sb_horiz->page_size, &sb_horiz->value); + sb_horiz->page_increment = sb_horiz->page_size; + + gtk_adjustment_changed(sb_horiz); + + if (value_changed) + gtk_adjustment_value_changed(sb_horiz); + } + return 1; +} + +static int gtkCanvasSetDYAttrib(Ihandle* ih, const char *value) +{ + if (ih->data->sb & IUP_SB_VERT) + { + double ymin, ymax, liney; + float dy; + int value_changed; + GtkAdjustment* sb_vert = gtk_scrolled_window_get_vadjustment(gtkCanvasGetScrolledWindow(ih)); + if (!sb_vert) return 1; + + if (!iupStrToFloat(value, &dy)) + return 1; + + ymin = iupAttribGetFloat(ih, "YMIN"); + ymax = iupAttribGetFloat(ih, "YMAX"); + + if (!iupAttribGet(ih,"LINEY")) + { + liney = dy/10; + if (liney==0) + liney = 1; + } + else + liney = iupAttribGetFloat(ih,"LINEY"); + + sb_vert->lower = ymin; + sb_vert->upper = ymax; + sb_vert->step_increment = liney; + sb_vert->page_size = dy; + + value_changed = gtkCanvasCheckScroll(ymin, ymax, &sb_vert->page_size, &sb_vert->value); + sb_vert->page_increment = sb_vert->page_size; + + gtk_adjustment_changed(sb_vert); + + if (value_changed) + gtk_adjustment_value_changed(sb_vert); + } + return 1; +} + +static int gtkCanvasSetPosXAttrib(Ihandle* ih, const char *value) +{ + if (ih->data->sb & IUP_SB_HORIZ) + { + float posx, xmin, xmax, dx; + GtkAdjustment* sb_horiz = gtk_scrolled_window_get_hadjustment(gtkCanvasGetScrolledWindow(ih)); + if (!sb_horiz) return 1; + + if (!iupStrToFloat(value, &posx)) + return 1; + + xmin = iupAttribGetFloat(ih, "XMIN"); + xmax = iupAttribGetFloat(ih, "XMAX"); + dx = iupAttribGetFloat(ih, "DX"); + + if (posx < xmin) posx = xmin; + if (posx > (xmax - dx)) posx = xmax - dx; + ih->data->posx = posx; + + gtk_adjustment_set_value(sb_horiz, posx); + } + return 1; +} + +static int gtkCanvasSetPosYAttrib(Ihandle* ih, const char *value) +{ + if (ih->data->sb & IUP_SB_VERT) + { + float posy, ymin, ymax, dy; + GtkAdjustment* sb_vert = gtk_scrolled_window_get_vadjustment(gtkCanvasGetScrolledWindow(ih)); + if (!sb_vert) return 1; + + if (!iupStrToFloat(value, &posy)) + return 1; + + ymin = iupAttribGetFloat(ih, "YMIN"); + ymax = iupAttribGetFloat(ih, "YMAX"); + dy = iupAttribGetFloat(ih, "DY"); + + if (posy < ymin) posy = ymin; + if (posy > (ymax - dy)) posy = ymax - dy; + ih->data->posy = posy; + + gtk_adjustment_set_value(sb_vert, posy); + } + return 1; +} + +static int gtkCanvasSetBgColorAttrib(Ihandle* ih, const char* value) +{ + GtkScrolledWindow* scrolled_window = gtkCanvasGetScrolledWindow(ih); + unsigned char r, g, b; + + /* ignore given value, must use only from parent for the scrollbars */ + char* parent_value = iupBaseNativeParentGetBgColor(ih); + + if (iupStrToRGB(parent_value, &r, &g, &b)) + { + GtkWidget* sb; + + iupgtkBaseSetBgColor((GtkWidget*)scrolled_window, r, g, b); + +#if GTK_CHECK_VERSION(2, 8, 0) + sb = gtk_scrolled_window_get_hscrollbar(scrolled_window); + if (sb) iupgtkBaseSetBgColor(sb, r, g, b); + sb = gtk_scrolled_window_get_vscrollbar(scrolled_window); + if (sb) iupgtkBaseSetBgColor(sb, r, g, b); +#endif + } + + if (!IupGetCallback(ih, "ACTION")) + { + /* enable automatic double buffering */ + gtk_widget_set_double_buffered(ih->handle, TRUE); + gtk_widget_set_double_buffered((GtkWidget*)scrolled_window, TRUE); + return iupdrvBaseSetBgColorAttrib(ih, value); + } + else + { + /* disable automatic double buffering */ + gtk_widget_set_double_buffered(ih->handle, FALSE); + gtk_widget_set_double_buffered((GtkWidget*)scrolled_window, FALSE); + gdk_window_set_back_pixmap(ih->handle->window, NULL, FALSE); + iupAttribSetStr(ih, "_IUPGTK_NO_BGCOLOR", "1"); + return 1; + } +} + +static char* gtkCanvasGetDrawableAttrib(Ihandle* ih) +{ + return (char*)ih->handle->window; +} + +static void gtkCanvasDummyLogFunc(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) +{ + /* does nothing */ + (void)log_domain; + (void)log_level; + (void)message; + (void)user_data; +} + +static int gtkCanvasMapMethod(Ihandle* ih) +{ + GtkScrolledWindow* scrolled_window; + void* visual; + + if (!ih->parent) + return IUP_ERROR; + + ih->data->sb = iupBaseGetScrollbar(ih); + + visual = (void*)IupGetAttribute(ih, "VISUAL"); /* defined by the OpenGL Canvas in X11 or NULL */ + if (visual) + iupgtkPushVisualAndColormap(visual, (void*)iupAttribGet(ih, "COLORMAP")); + + ih->handle = gtk_drawing_area_new(); + + if (visual) + gtk_widget_pop_colormap(); + + if (!ih->handle) + return IUP_ERROR; + + scrolled_window = (GtkScrolledWindow*)gtk_scrolled_window_new(NULL, NULL); + if (!scrolled_window) + return IUP_ERROR; + + { + /* to avoid the "cannot add non scrollable widget" warning */ +#if GTK_CHECK_VERSION(2, 6, 0) + GLogFunc def_func = g_log_set_default_handler(gtkCanvasDummyLogFunc, NULL); +#endif + gtk_container_add((GtkContainer*)scrolled_window, ih->handle); +#if GTK_CHECK_VERSION(2, 6, 0) + g_log_set_default_handler(def_func, NULL); +#endif + } + + gtk_widget_show((GtkWidget*)scrolled_window); + + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)scrolled_window); + + /* add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + g_signal_connect(G_OBJECT(ih->handle), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(iupgtkKeyPressEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-release-event", G_CALLBACK(iupgtkKeyReleaseEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + + g_signal_connect(G_OBJECT(ih->handle), "expose-event", G_CALLBACK(gtkCanvasExposeEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "button-press-event", G_CALLBACK(gtkCanvasButtonEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "button-release-event",G_CALLBACK(gtkCanvasButtonEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "motion-notify-event",G_CALLBACK(iupgtkMotionNotifyEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "scroll-event",G_CALLBACK(gtkCanvasScrollEvent), ih); + +#if GTK_CHECK_VERSION(2, 8, 0) + g_signal_connect(G_OBJECT(gtk_scrolled_window_get_hscrollbar(scrolled_window)), "change-value",G_CALLBACK(gtkCanvasHChangeValue), ih); + g_signal_connect(G_OBJECT(gtk_scrolled_window_get_vscrollbar(scrolled_window)), "change-value",G_CALLBACK(gtkCanvasVChangeValue), ih); +#endif + + /* To receive mouse events on a drawing area, you will need to enable them. */ + gtk_widget_add_events(ih->handle, GDK_EXPOSURE_MASK| + GDK_POINTER_MOTION_MASK|GDK_BUTTON_MOTION_MASK| + GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK| + GDK_KEY_PRESS_MASK|GDK_KEY_RELEASE_MASK| + GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK| + GDK_FOCUS_CHANGE_MASK|GDK_STRUCTURE_MASK); + + /* To receive keyboard events, you will need to set the GTK_CAN_FOCUS flag on the drawing area. */ + if (ih->iclass->is_interactive) + { + if (iupAttribGetBoolean(ih, "CANFOCUS")) + GTK_WIDGET_FLAGS(ih->handle) |= GTK_CAN_FOCUS; + } + + if (iupAttribGetBoolean(ih, "BORDER")) + gtk_scrolled_window_set_shadow_type(scrolled_window, GTK_SHADOW_IN); + else + gtk_scrolled_window_set_shadow_type(scrolled_window, GTK_SHADOW_NONE); + + gtk_widget_realize((GtkWidget*)scrolled_window); + gtk_widget_realize(ih->handle); + + /* must be connected after realize or a RESIZE_CB will happen before MAP_CB + works only for the GtkDrawingArea. */ + g_signal_connect(G_OBJECT(ih->handle), "configure-event", G_CALLBACK(gtkCanvasConfigureEvent), ih); + + /* configure for DRAG&DROP */ + if (IupGetCallback(ih, "DROPFILES_CB")) + iupAttribSetStr(ih, "DRAGDROP", "YES"); + + /* update a mnemonic in a label if necessary */ + iupgtkUpdateMnemonic(ih); + + /* configure scrollbar */ + if (ih->data->sb) + { + GtkPolicyType hscrollbar_policy = GTK_POLICY_NEVER, vscrollbar_policy = GTK_POLICY_NEVER; + if (ih->data->sb & IUP_SB_HORIZ) + hscrollbar_policy = GTK_POLICY_AUTOMATIC; + if (ih->data->sb & IUP_SB_VERT) + vscrollbar_policy = GTK_POLICY_AUTOMATIC; + gtk_scrolled_window_set_policy(scrolled_window, hscrollbar_policy, vscrollbar_policy); + } + else + gtk_scrolled_window_set_policy(scrolled_window, GTK_POLICY_NEVER, GTK_POLICY_NEVER); + + /* force the update of BGCOLOR here, to let derived classes ignore it if ACTION is defined */ + gtkCanvasSetBgColorAttrib(ih, iupAttribGetStr(ih, "BGCOLOR")); + + return IUP_NOERROR; +} + +void iupdrvCanvasInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkCanvasMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, gtkCanvasSetBgColorAttrib, "255 255 255", NULL, IUPAF_DEFAULT); /* force new default value */ + + /* IupCanvas only */ + iupClassRegisterAttribute(ic, "DRAGDROP", NULL, iupgtkSetDragDropAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CURSOR", NULL, iupdrvBaseSetCursorAttrib, IUPAF_SAMEASSYSTEM, "ARROW", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DRAWSIZE", iupdrvBaseGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "DX", NULL, gtkCanvasSetDXAttrib, "0.1", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "DY", NULL, gtkCanvasSetDYAttrib, "0.1", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "POSX", iupCanvasGetPosXAttrib, gtkCanvasSetPosXAttrib, "0.0", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "POSY", iupCanvasGetPosYAttrib, gtkCanvasSetPosYAttrib, "0.0", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "XAUTOHIDE", NULL, gtkCanvasSetXAutoHideAttrib, "YES", NULL, IUPAF_DEFAULT); /* force new default value */ + iupClassRegisterAttribute(ic, "YAUTOHIDE", NULL, gtkCanvasSetYAutoHideAttrib, "YES", NULL, IUPAF_DEFAULT); /* force new default value */ + + iupClassRegisterAttribute(ic, "DRAWABLE", gtkCanvasGetDrawableAttrib, NULL, NULL, NULL, IUPAF_NO_STRING); + //iupClassRegisterAttribute(ic, "CD_GDK", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + + /* IupCanvas Windows or X only */ +#ifdef WIN32 + iupClassRegisterAttribute(ic, "HWND", iupgtkGetNativeWindowHandle, NULL, NULL, NULL, IUPAF_NO_STRING|IUPAF_NO_INHERIT); +#else + iupClassRegisterAttribute(ic, "XWINDOW", iupgtkGetNativeWindowHandle, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "XDISPLAY", (IattribGetFunc)iupdrvGetDisplay, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); +#endif +} + diff --git a/iup/src/gtk/iupgtk_clipboard.c b/iup/src/gtk/iupgtk_clipboard.c new file mode 100755 index 0000000..f07a3e6 --- /dev/null +++ b/iup/src/gtk/iupgtk_clipboard.c @@ -0,0 +1,125 @@ +/** \file + * \brief Clipboard for the GTK Driver. + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" + +#include "iupgtk_drv.h" + + +static int gtkClipboardSetTextAttrib(Ihandle *ih, const char *value) +{ + GtkClipboard *clipboard = gtk_clipboard_get_for_display(gdk_display_get_default(), gdk_atom_intern("CLIPBOARD", FALSE)); + gtk_clipboard_set_text(clipboard, value, -1); + (void)ih; + return 0; +} + +static char* gtkClipboardGetTextAttrib(Ihandle *ih) +{ + GtkClipboard *clipboard = gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE)); + (void)ih; + return iupgtkStrConvertFromUTF8(gtk_clipboard_wait_for_text(clipboard)); +} + +static int gtkClipboardSetImageAttrib(Ihandle *ih, const char *value) +{ +#if GTK_CHECK_VERSION(2, 6, 0) + GtkClipboard *clipboard = gtk_clipboard_get (gdk_atom_intern("CLIPBOARD", FALSE)); + GdkPixbuf *pixbuf = (GdkPixbuf*)iupImageGetImage(value, ih, 0); + if (pixbuf) + gtk_clipboard_set_image (clipboard, pixbuf); +#endif + return 0; +} + +static int gtkClipboardSetNativeImageAttrib(Ihandle *ih, const char *value) +{ +#if GTK_CHECK_VERSION(2, 6, 0) + GtkClipboard *clipboard; + (void)ih; + + if (!value) + return 0; + + clipboard = gtk_clipboard_get (gdk_atom_intern("CLIPBOARD", FALSE)); + + gtk_clipboard_set_image (clipboard, (GdkPixbuf*)value); +#endif + return 0; +} + +static char* gtkClipboardGetNativeImageAttrib(Ihandle *ih) +{ +#if GTK_CHECK_VERSION(2, 6, 0) + GtkClipboard *clipboard = gtk_clipboard_get (gdk_atom_intern("CLIPBOARD", FALSE)); + (void)ih; + return (char*)gtk_clipboard_wait_for_image (clipboard); +#else + return NULL; +#endif +} + +static char* gtkClipboardGetTextAvailableAttrib(Ihandle *ih) +{ + GtkClipboard *clipboard = gtk_clipboard_get (gdk_atom_intern("CLIPBOARD", FALSE)); + (void)ih; + if (gtk_clipboard_wait_is_text_available(clipboard)) + return "YES"; + else + return "NO"; +} + +static char* gtkClipboardGetImageAvailableAttrib(Ihandle *ih) +{ +#if GTK_CHECK_VERSION(2, 6, 0) + GtkClipboard *clipboard = gtk_clipboard_get (gdk_atom_intern("CLIPBOARD", FALSE)); + (void)ih; + if (gtk_clipboard_wait_is_image_available(clipboard)) + return "YES"; + else + return "NO"; +#else + return NULL; +#endif +} + +/******************************************************************************/ + +Ihandle* IupClipboard(void) +{ + return IupCreate("clipboard"); +} + +Iclass* iupClipboardGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "clipboard"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Attribute functions */ + iupClassRegisterAttribute(ic, "TEXT", gtkClipboardGetTextAttrib, gtkClipboardSetTextAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NATIVEIMAGE", gtkClipboardGetNativeImageAttrib, gtkClipboardSetNativeImageAttrib, NULL, NULL, IUPAF_NO_STRING|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, gtkClipboardSetImageAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TEXTAVAILABLE", gtkClipboardGetTextAvailableAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGEAVAILABLE", gtkClipboardGetImageAvailableAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/src/gtk/iupgtk_colordlg.c b/iup/src/gtk/iupgtk_colordlg.c new file mode 100755 index 0000000..9177f91 --- /dev/null +++ b/iup/src/gtk/iupgtk_colordlg.c @@ -0,0 +1,211 @@ +/** \file + * \brief IupColorDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" + +#include "iupgtk_drv.h" + + +static char* gtkColorDlgPaletteToString(const char* palette) +{ + char iup_str[20], *gtk_str, *palette_p; + char* str = iupStrGetMemory(300); + int off = 0, inc; + GdkColor color; + + gtk_str = iupStrDup(palette); + iupStrReplace(gtk_str, ':', 0); + + while (palette && *palette) + { + if (!gdk_color_parse (gtk_str, &color)) + return NULL; + + inc = sprintf(iup_str, "%d %d %d;", (int)iupCOLOR16TO8(color.red), (int)iupCOLOR16TO8(color.green), (int)iupCOLOR16TO8(color.blue)); + memcpy(str+off, iup_str, inc); + off += inc; + palette_p = strchr(palette, ':'); + if (palette_p) + { + palette_p++; + gtk_str += palette_p-palette; + } + palette = palette_p; + } + str[off-1] = 0; /* remove last separator */ + return str; +} + +static void gtkColorDlgGetPalette(Ihandle* ih, GtkColorSelection* colorsel) +{ + char *palette, *str; + + GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(colorsel)); + g_object_get(settings, "gtk-color-palette", &palette, NULL); + + str = gtkColorDlgPaletteToString(palette); + if (str) iupAttribStoreStr(ih, "COLORTABLE", str); + g_free(palette); +} + +static char* gtkColorDlgStringToPalette(const char* str) +{ + char gtk_str[20]; + char* palette = iupStrGetMemory(200); + int off = 0; + unsigned char r, g, b; + + while (str && *str) + { + if (!iupStrToRGB(str, &r, &g, &b)) + return NULL; + + sprintf(gtk_str, "#%02X%02X%02X:", (int)r, (int)g, (int)b); + memcpy(palette+off, gtk_str, 8); + off += 8; + str = strchr(str, ';'); + if (str) str++; + } + palette[off-1] = 0; /* remove last separator */ + return palette; +} + +static void gtkColorDlgSetPalette(GtkColorSelection* colorsel, char* str) +{ + GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(colorsel)); + gchar* palette = gtkColorDlgStringToPalette(str); + if (palette) + gtk_settings_set_string_property(settings, + "gtk-color-palette", + palette, + "gtk_color_selection_palette_to_string"); +} + +static int gtkColorDlgPopup(Ihandle* ih, int x, int y) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + GtkColorSelectionDialog* dialog; + GtkColorSelection* colorsel; + GdkColor color; + char *value; + unsigned char r = 0, g = 0, b = 0, a = 255; + int response, ret; + + iupAttribSetInt(ih, "_IUPDLG_X", x); /* used in iupDialogUpdatePosition */ + iupAttribSetInt(ih, "_IUPDLG_Y", y); + + dialog = (GtkColorSelectionDialog*)gtk_color_selection_dialog_new(iupgtkStrConvertToUTF8(iupAttribGet(ih, "TITLE"))); + if (!dialog) + return IUP_ERROR; + + if (parent) + gtk_window_set_transient_for((GtkWindow*)dialog, (GtkWindow*)parent); + + ret = iupStrToRGBA(iupAttribGet(ih, "VALUE"), &r, &g, &b, &a); + + colorsel = (GtkColorSelection*)dialog->colorsel; + iupgdkColorSet(&color, r, g, b); + gtk_color_selection_set_current_color(colorsel, &color); + + value = iupAttribGetStr(ih, "ALPHA"); + if (value) + { + int alpha; + if (iupStrToInt(value, &alpha)) + { + if (alpha<0) alpha=0; + if (alpha>255) alpha=255; + gtk_color_selection_set_has_opacity_control(colorsel, TRUE); + gtk_color_selection_set_current_alpha(colorsel, iupCOLOR8TO16(alpha)); + } + } + else if (iupAttribGetBoolean(ih, "SHOWALPHA") || ret == 4) + { + gtk_color_selection_set_has_opacity_control(colorsel, TRUE); + gtk_color_selection_set_current_alpha(colorsel, iupCOLOR8TO16(a)); + } + else + gtk_color_selection_set_has_opacity_control(colorsel, FALSE); + + value = iupAttribGetStr(ih, "COLORTABLE"); + if (value) + { + gtk_color_selection_set_has_palette (colorsel, TRUE); + gtkColorDlgSetPalette(colorsel, value); + } + else if (iupAttribGetBoolean(ih, "SHOWCOLORTABLE")) + gtk_color_selection_set_has_palette (colorsel, TRUE); + else + gtk_color_selection_set_has_palette (colorsel, FALSE); + + if (IupGetCallback(ih, "HELP_CB")) + gtk_widget_show(dialog->help_button); + + /* initialize the widget */ + gtk_widget_realize(GTK_WIDGET(dialog)); + + ih->handle = GTK_WIDGET(dialog); + iupDialogUpdatePosition(ih); + ih->handle = NULL; + + do + { + response = gtk_dialog_run(GTK_DIALOG(dialog)); + + if (response == GTK_RESPONSE_HELP) + { + Icallback cb = IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + response = GTK_RESPONSE_CANCEL; + } + } while (response == GTK_RESPONSE_HELP); + + if (response == GTK_RESPONSE_OK) + { + GdkColor color; + gtk_color_selection_get_current_color(colorsel, &color); + IupSetAttribute(ih, "STATUS", "1"); + + if (gtk_color_selection_get_has_opacity_control(colorsel)) + { + int alpha = gtk_color_selection_get_current_alpha(colorsel); + iupAttribSetInt(ih, "ALPHA", (int)iupCOLOR16TO8(alpha)); + iupAttribSetStrf(ih, "VALUE", "%d %d %d %d", (int)iupCOLOR16TO8(color.red), (int)iupCOLOR16TO8(color.green), (int)iupCOLOR16TO8(color.blue), (int)iupCOLOR16TO8(alpha)); + } + else + iupAttribSetStrf(ih, "VALUE", "%d %d %d", (int)iupCOLOR16TO8(color.red), (int)iupCOLOR16TO8(color.green), (int)iupCOLOR16TO8(color.blue)); + + if (gtk_color_selection_get_has_palette(colorsel)) + gtkColorDlgGetPalette(ih, colorsel); + } + else + { + iupAttribSetStr(ih, "ALPHA", NULL); + iupAttribSetStr(ih, "VALUE", NULL); + iupAttribSetStr(ih, "COLORTABLE", NULL); + iupAttribSetStr(ih, "STATUS", NULL); + } + + gtk_widget_destroy(GTK_WIDGET(dialog)); + + return IUP_NOERROR; +} + +void iupdrvColorDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = gtkColorDlgPopup; +} diff --git a/iup/src/gtk/iupgtk_common.c b/iup/src/gtk/iupgtk_common.c new file mode 100755 index 0000000..40368f2 --- /dev/null +++ b/iup/src/gtk/iupgtk_common.c @@ -0,0 +1,830 @@ +/** \file + * \brief GTK Base Functions + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_key.h" +#include "iup_str.h" +#include "iup_class.h" +#include "iup_attrib.h" +#include "iup_focus.h" +#include "iup_key.h" +#include "iup_image.h" +#include "iup_drv.h" + +#include "iupgtk_drv.h" + + +/* WARNING: in GTK there are many controls that are not native windows, + so "->window" will NOT return a native window exclusive of that control, + in fact it can return a base native window shared by many controls. + IupCanvas is a special case that uses an exclusive native window. */ + +/* GTK only has abssolute positioning using a GtkFixed container, + so all elements returned by iupChildTreeGetNativeParentHandle should be a GtkFixed. + If not looks in the native parent. */ +static GtkFixed* gtkGetFixedParent(Ihandle* ih) +{ + GtkWidget* widget = iupChildTreeGetNativeParentHandle(ih); + while (widget && !GTK_IS_FIXED(widget)) + widget = gtk_widget_get_parent(widget); + return (GtkFixed*)widget; +} + +void iupgtkUpdateMnemonic(Ihandle* ih) +{ + GtkLabel* label = (GtkLabel*)iupAttribGet(ih, "_IUPGTK_LABELMNEMONIC"); + if (label) gtk_label_set_mnemonic_widget(label, ih->handle); +} + +void iupdrvActivate(Ihandle* ih) +{ + gtk_widget_activate(ih->handle); +} + +void iupdrvReparent(Ihandle* ih) +{ + GtkFixed* fixed = gtkGetFixedParent(ih); + GtkWidget* widget = (GtkWidget*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + gtk_widget_reparent(widget, (GtkWidget*)fixed); +} + +void iupgtkBaseAddToParent(Ihandle* ih) +{ + GtkFixed* fixed = gtkGetFixedParent(ih); + GtkWidget* widget = (GtkWidget*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + + gtk_fixed_put(fixed, widget, 0, 0); +} + +void iupdrvBaseLayoutUpdateMethod(Ihandle *ih) +{ + GtkFixed* fixed = gtkGetFixedParent(ih); + GtkWidget* widget = (GtkWidget*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + + gtk_fixed_move(fixed, widget, ih->x, ih->y); + gtk_widget_set_size_request(widget, ih->currentwidth, ih->currentheight); +} + +void iupdrvBaseUnMapMethod(Ihandle* ih) +{ + GtkWidget* widget = (GtkWidget*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + gtk_widget_unrealize(widget); + gtk_widget_destroy(widget); /* To match the call to gtk_*****_new */ +} + +void iupdrvDisplayUpdate(Ihandle *ih) +{ + /* Post a REDRAW */ + gtk_widget_queue_draw(ih->handle); +} + +void iupdrvDisplayRedraw(Ihandle *ih) +{ + GdkWindow* window = ih->handle->window; + /* Post a REDRAW */ + gtk_widget_queue_draw(ih->handle); + /* Force a REDRAW */ + if (window) + gdk_window_process_updates(window, FALSE); +} + +void iupdrvScreenToClient(Ihandle* ih, int *x, int *y) +{ + gint win_x = 0, win_y = 0; + GdkWindow* window = ih->handle->window; + if (window) + gdk_window_get_origin(window, &win_x, &win_y); + *x = *x - win_x; + *y = *y - win_y; +} + +gboolean iupgtkShowHelp(GtkWidget *widget, GtkWidgetHelpType *arg1, Ihandle *ih) +{ + Icallback cb; + (void)widget; + (void)arg1; + + cb = IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + IupExitLoop(); + + return FALSE; +} + +gboolean iupgtkEnterLeaveEvent(GtkWidget *widget, GdkEventCrossing *evt, Ihandle *ih) +{ + Icallback cb = NULL; + (void)widget; + + if (evt->type == GDK_ENTER_NOTIFY) + cb = IupGetCallback(ih, "ENTERWINDOW_CB"); + else if (evt->type == GDK_LEAVE_NOTIFY) + cb = IupGetCallback(ih, "LEAVEWINDOW_CB"); + + if (cb) + cb(ih); + + return FALSE; +} + +int iupgtkSetMnemonicTitle(Ihandle* ih, GtkLabel* label, const char* value) +{ + char c = '_'; + char* str; + + if (!value) + value = ""; + + str = iupStrProcessMnemonic(value, &c, 1); /* replace & by c, the returned value of c is ignored in GTK */ + if (str != value) + { + gtk_label_set_text_with_mnemonic(label, iupgtkStrConvertToUTF8(str)); + free(str); + return 1; + } + else + { + if (iupAttribGetBoolean(ih, "MARKUP")) + gtk_label_set_markup(label, iupgtkStrConvertToUTF8(str)); + else + gtk_label_set_text(label, iupgtkStrConvertToUTF8(str)); + } + return 0; +} + +int iupdrvBaseSetZorderAttrib(Ihandle* ih, const char* value) +{ + if (iupdrvIsVisible(ih)) + { + GdkWindow* window = ih->handle->window; + if (iupStrEqualNoCase(value, "TOP")) + gdk_window_raise(window); + else + gdk_window_lower(window); + } + + return 0; +} + +void iupdrvSetVisible(Ihandle* ih, int visible) +{ + GtkWidget* container = (GtkWidget*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (visible) + { + if (container) gtk_widget_show(container); + gtk_widget_show(ih->handle); + } + else + { + if (container) gtk_widget_hide(container); + gtk_widget_hide(ih->handle); + } +} + +int iupdrvIsVisible(Ihandle* ih) +{ + if (GTK_WIDGET_VISIBLE(ih->handle)) + { + /* if marked as visible, since we use gtk_widget_hide and NOT gtk_widget_hide_all + must check its parents. */ + Ihandle* parent = ih->parent; + while (parent) + { + if (parent->iclass->nativetype != IUP_TYPEVOID) + { + if (!GTK_WIDGET_VISIBLE(parent->handle)) + return 0; + } + + parent = parent->parent; + } + return 1; + } + else + return 0; +} + +int iupdrvIsActive(Ihandle *ih) +{ + return (GTK_WIDGET_IS_SENSITIVE(ih->handle)); +} + +void iupdrvSetActive(Ihandle* ih, int enable) +{ + GtkWidget* container = (GtkWidget*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (container) gtk_widget_set_sensitive(container, enable); + gtk_widget_set_sensitive(ih->handle, enable); +} + +char* iupdrvBaseGetXAttrib(Ihandle *ih) +{ + GdkWindow* window = ih->handle->window; + GtkWidget* container = (GtkWidget*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (container) window = container->window; + + if (window) + { + char* str = iupStrGetMemory(20); + int x, y; + gdk_window_get_origin(window, &x, &y); + x += ih->handle->allocation.x; + sprintf(str, "%d", x); + return str; + } + else + return NULL; +} + +char* iupdrvBaseGetYAttrib(Ihandle *ih) +{ + GdkWindow* window = ih->handle->window; + GtkWidget* container = (GtkWidget*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (container) window = container->window; + + if (window) + { + char* str = iupStrGetMemory(20); + int x, y; + gdk_window_get_origin(window, &x, &y); + y += ih->handle->allocation.y; + sprintf(str, "%d", y); + return str; + } + else + return NULL; +} + +char* iupdrvBaseGetClientSizeAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(20); + int w, h; + GdkWindow* window = ih->handle->window; + + if (window) + gdk_drawable_get_size(window, &w, &h); + else + return NULL; + + sprintf(str, "%dx%d", w, h); + return str; +} + +static GdkColor gtkDarkerColor(GdkColor *color) +{ + GdkColor dark_color = {0L,0,0,0}; + + dark_color.red = (color->red*9)/10; + dark_color.green = (color->green*9)/10; + dark_color.blue = (color->blue*9)/10; + + return dark_color; +} + +static guint16 gtkCROP16(int x) +{ + if (x > 65535) return 65535; + return (guint16)x; +} + +static GdkColor gtkLighterColor(GdkColor *color) +{ + GdkColor light_color = {0L,0,0,0}; + + light_color.red = gtkCROP16(((int)color->red*11)/10); + light_color.green = gtkCROP16(((int)color->green*11)/10); + light_color.blue = gtkCROP16(((int)color->blue*11)/10); + + return light_color; +} + +void iupgtkBaseSetBgColor(InativeHandle* handle, unsigned char r, unsigned char g, unsigned char b) +{ + GtkRcStyle *rc_style; + GdkColor color; + + iupgdkColorSet(&color, r, g, b); + + rc_style = gtk_widget_get_modifier_style(handle); + rc_style->base[GTK_STATE_NORMAL] = rc_style->bg[GTK_STATE_NORMAL] = rc_style->bg[GTK_STATE_INSENSITIVE] = color; + rc_style->bg[GTK_STATE_ACTIVE] = rc_style->base[GTK_STATE_ACTIVE] = gtkDarkerColor(&color); + rc_style->base[GTK_STATE_PRELIGHT] = rc_style->bg[GTK_STATE_PRELIGHT] = rc_style->base[GTK_STATE_INSENSITIVE] = gtkLighterColor(&color); + + rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_BASE | GTK_RC_BG; + rc_style->color_flags[GTK_STATE_ACTIVE] |= GTK_RC_BASE | GTK_RC_BG; + rc_style->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_BASE | GTK_RC_BG; + rc_style->color_flags[GTK_STATE_INSENSITIVE] |= GTK_RC_BASE | GTK_RC_BG; + + gtk_widget_modify_style(handle, rc_style); +} + +int iupdrvBaseSetBgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgtkBaseSetBgColor(ih->handle, r, g, b); + + /* DO NOT NEED TO UPDATE GTK IMAGES SINCE THEY DO NOT DEPEND ON BGCOLOR */ + + return 1; +} + +void iupgtkBaseSetFgGdkColor(InativeHandle* handle, GdkColor *color) +{ + GtkRcStyle *rc_style; + + rc_style = gtk_widget_get_modifier_style(handle); + rc_style->fg[GTK_STATE_ACTIVE] = rc_style->fg[GTK_STATE_NORMAL] = rc_style->fg[GTK_STATE_PRELIGHT] = *color; + rc_style->text[GTK_STATE_ACTIVE] = rc_style->text[GTK_STATE_NORMAL] = rc_style->text[GTK_STATE_PRELIGHT] = *color; + rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_TEXT | GTK_RC_FG; + rc_style->color_flags[GTK_STATE_ACTIVE] |= GTK_RC_TEXT | GTK_RC_FG; + rc_style->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_TEXT | GTK_RC_FG; + + /* do not set at CHILD_CONTAINER */ + gtk_widget_modify_style(handle, rc_style); +} + +void iupgtkBaseSetFgColor(InativeHandle* handle, unsigned char r, unsigned char g, unsigned char b) +{ + GdkColor color; + iupgdkColorSet(&color, r, g, b); + iupgtkBaseSetFgGdkColor(handle, &color); +} + +int iupdrvBaseSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgtkBaseSetFgColor(ih->handle, r, g, b); + + return 1; +} + +static GdkCursor* gtkEmptyCursor(Ihandle* ih) +{ + /* creates an empty cursor */ + GdkColor cursor_color = {0L,0,0,0}; + char bitsnull[1] = {0x00}; + + GdkWindow* window = ih->handle->window; + GdkPixmap* pixmapnull = gdk_bitmap_create_from_data( + (GdkDrawable*)window, + bitsnull, + 1,1); + GdkCursor* cur = gdk_cursor_new_from_pixmap( + pixmapnull, + pixmapnull, + &cursor_color, + &cursor_color, + 0,0); + + g_object_unref(pixmapnull); + + return cur; +} + +static GdkCursor* gtkGetCursor(Ihandle* ih, const char* name) +{ + static struct { + const char* iupname; + int sysname; + } table[] = { + { "NONE", 0}, + { "NULL", 0}, + { "ARROW", GDK_LEFT_PTR}, + { "BUSY", GDK_WATCH}, + { "CROSS", GDK_CROSSHAIR}, + { "HAND", GDK_HAND2}, + { "HELP", GDK_QUESTION_ARROW}, + { "IUP", GDK_QUESTION_ARROW}, + { "MOVE", GDK_FLEUR}, + { "PEN", GDK_PENCIL}, + { "RESIZE_N", GDK_TOP_SIDE}, + { "RESIZE_S", GDK_BOTTOM_SIDE}, + { "RESIZE_NS", GDK_SB_V_DOUBLE_ARROW}, + { "RESIZE_W", GDK_LEFT_SIDE}, + { "RESIZE_E", GDK_RIGHT_SIDE}, + { "RESIZE_WE", GDK_SB_H_DOUBLE_ARROW}, + { "RESIZE_NE", GDK_TOP_RIGHT_CORNER}, + { "RESIZE_SE", GDK_BOTTOM_RIGHT_CORNER}, + { "RESIZE_NW", GDK_TOP_LEFT_CORNER}, + { "RESIZE_SW", GDK_BOTTOM_LEFT_CORNER}, + { "TEXT", GDK_XTERM}, + { "UPARROW", GDK_CENTER_PTR} + }; + + GdkCursor* cur; + char str[50]; + int i, count = sizeof(table)/sizeof(table[0]); + + /* check the cursor cache first (per control)*/ + sprintf(str, "_IUPGTK_CURSOR_%s", name); + cur = (GdkCursor*)iupAttribGet(ih, str); + if (cur) + return cur; + + /* check the pre-defined IUP names first */ + for (i = 0; i < count; i++) + { + if (iupStrEqualNoCase(name, table[i].iupname)) + { + if (table[i].sysname) + cur = gdk_cursor_new(table[i].sysname); + else + cur = gtkEmptyCursor(ih); + + break; + } + } + + if (i == count) + { + /* check for a name defined cursor */ + cur = iupImageGetCursor(name); + } + + /* save the cursor in cache */ + iupAttribSetStr(ih, str, (char*)cur); + + return cur; +} + +int iupdrvBaseSetCursorAttrib(Ihandle* ih, const char* value) +{ + GdkCursor* cur = gtkGetCursor(ih, value); + if (cur) + { + GdkWindow* window = ih->handle->window; + if (window) + gdk_window_set_cursor(window, cur); + return 1; + } + return 0; +} + +void iupgdkColorSet(GdkColor* color, unsigned char r, unsigned char g, unsigned char b) +{ + color->red = iupCOLOR8TO16(r); + color->green = iupCOLOR8TO16(g); + color->blue = iupCOLOR8TO16(b); + color->pixel = 0; +} + +static void gtkDragDataReceived(GtkWidget* w, GdkDragContext* context, int x, int y, + GtkSelectionData* seldata, guint info, guint time, Ihandle* ih) +{ + gchar **uris = NULL; + int i, count; + + IFnsiii cb = (IFnsiii)IupGetCallback(ih, "DROPFILES_CB"); + if (!cb) return; + +#if GTK_CHECK_VERSION(2, 6, 0) + uris = g_uri_list_extract_uris((char*)seldata->data); +#endif + + if (!uris) + return; + + count = 0; + while (uris[count]) + count++; + + for (i=0; ihandle, GTK_DEST_DEFAULT_ALL, dragtypes, + sizeof(dragtypes) / sizeof(dragtypes[0]), GDK_ACTION_COPY); + g_signal_connect(G_OBJECT(ih->handle), "drag_data_received", G_CALLBACK(gtkDragDataReceived), ih); + } + else + { + gtk_drag_dest_unset(ih->handle); + } + return 1; +} + +int iupdrvGetScrollbarSize(void) +{ + static int size = 0; + + if (size == 0) + { + GtkRequisition requisition; + GtkWidget* win = gtk_window_new(GTK_WINDOW_TOPLEVEL); + GtkWidget* sb = gtk_vscrollbar_new(NULL); + gtk_container_add((GtkContainer*)win, sb); + gtk_widget_realize(win); + gtk_widget_size_request(sb, &requisition); + size = requisition.width; + gtk_widget_destroy(win); + } + + return size; +} + +void iupdrvDrawFocusRect(Ihandle* ih, void* _gc, int x, int y, int w, int h) +{ + GdkWindow* window = ih->handle->window; + GtkStyle *style = gtk_widget_get_style(ih->handle); + (void)_gc; + + gtk_paint_focus(style, window, GTK_WIDGET_STATE(ih->handle), NULL, ih->handle, NULL, x, y, w, h); +} + +void iupdrvBaseRegisterCommonAttrib(Iclass* ic) +{ +#ifdef WIN32 + iupClassRegisterAttribute(ic, "HFONT", iupgtkGetFontIdAttrib, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); +#else + iupClassRegisterAttribute(ic, "XFONTID", iupgtkGetFontIdAttrib, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); +#endif + iupClassRegisterAttribute(ic, "PANGOFONTDESC", iupgtkGetPangoFontDescAttrib, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); +} + +static int gtkStrIsAscii(const char* str) +{ + while(*str) + { + int c = *str; + if (c < 0) + return 0; + str++; + } + return 1; +} + +static char* gtkStrToUTF8(const char *str, const char* charset) +{ + return g_convert(str, -1, "UTF-8", charset, NULL, NULL, NULL); +} + +static char* gtkStrFromUTF8(const char *str, const char* charset) +{ + return g_convert(str, -1, charset, "UTF-8", NULL, NULL, NULL); +} + +static char* gktLastConvertUTF8 = NULL; + +void iupgtkReleaseConvertUTF8(void) +{ + if (gktLastConvertUTF8) + g_free(gktLastConvertUTF8); +} + +char* iupgtkStrConvertToUTF8(const char* str) /* From IUP to GTK */ +{ + if (!str || *str == 0) + return (char*)str; + + if (iupgtk_utf8autoconvert) /* this means str is in current locale */ + { + const char *charset = NULL; + if (g_get_charset(&charset)==TRUE) /* current locale is already UTF-8 */ + { + if (g_utf8_validate(str, -1, NULL)) + return (char*)str; + else + { + if (gktLastConvertUTF8) + g_free(gktLastConvertUTF8); + gktLastConvertUTF8 = gtkStrToUTF8(str, "ISO8859-1"); /* if string is not UTF-8, assume ISO8859-1 */ + if (!gktLastConvertUTF8) return (char*)str; + return gktLastConvertUTF8; + } + } + else + { + if (gtkStrIsAscii(str) || !charset) + return (char*)str; + else if (charset) + { + if (gktLastConvertUTF8) + g_free(gktLastConvertUTF8); + gktLastConvertUTF8 = gtkStrToUTF8(str, charset); + if (!gktLastConvertUTF8) return (char*)str; + return gktLastConvertUTF8; + } + } + } + return (char*)str; +} + +char* iupgtkStrConvertFromUTF8(const char* str) /* From GTK to IUP */ +{ + if (!str || *str == 0) + return (char*)str; + + if (iupgtk_utf8autoconvert) /* this means str is in current locale */ + { + const gchar *charset = NULL; + if (g_get_charset(&charset)==TRUE) /* current locale is already UTF-8 */ + { + if (g_utf8_validate(str, -1, NULL)) + return (char*)str; + else + { + if (gktLastConvertUTF8) + g_free(gktLastConvertUTF8); + gktLastConvertUTF8 = gtkStrFromUTF8(str, "ISO8859-1"); /* if string is not UTF-8, assume ISO8859-1 */ + if (!gktLastConvertUTF8) return (char*)str; + return gktLastConvertUTF8; + } + } + else + { + if (gtkStrIsAscii(str) || !charset) + return (char*)str; + else if (charset) + { + if (gktLastConvertUTF8) + g_free(gktLastConvertUTF8); + gktLastConvertUTF8 = gtkStrFromUTF8(str, charset); + if (!gktLastConvertUTF8) return (char*)str; + return gktLastConvertUTF8; + } + } + } + return (char*)str; +} + +static gboolean gtkGetFilenameCharset(const gchar **filename_charset) +{ + const gchar **charsets = NULL; + gboolean is_utf8 = FALSE; + +#if GTK_CHECK_VERSION(2, 6, 0) + is_utf8 = g_get_filename_charsets (&charsets); +#endif + + if (filename_charset && charsets) + *filename_charset = charsets[0]; + + return is_utf8; +} + +char* iupgtkStrConvertToFilename(const char* str) /* From IUP to Filename */ +{ + if (!str || *str == 0) + return (char*)str; + + if (iupgtk_utf8autoconvert) /* this means str is in current locale */ + return (char*)str; + else + { + const gchar *charset = NULL; + if (gtkGetFilenameCharset(&charset)==TRUE) /* current locale is already UTF-8 */ + { + if (g_utf8_validate(str, -1, NULL)) + return (char*)str; + else + { + if (gktLastConvertUTF8) + g_free(gktLastConvertUTF8); + gktLastConvertUTF8 = gtkStrFromUTF8(str, "ISO8859-1"); /* if string is not UTF-8, assume ISO8859-1 */ + if (!gktLastConvertUTF8) return (char*)str; + return gktLastConvertUTF8; + } + } + else + { + if (gtkStrIsAscii(str) || !charset) + return (char*)str; + else if (charset) + { + if (gktLastConvertUTF8) + g_free(gktLastConvertUTF8); + gktLastConvertUTF8 = gtkStrFromUTF8(str, charset); + if (!gktLastConvertUTF8) return (char*)str; + return gktLastConvertUTF8; + } + } + } + return (char*)str; +} + +char* iupgtkStrConvertFromFilename(const char* str) /* From Filename to IUP */ +{ + if (!str || *str == 0) + return (char*)str; + + if (iupgtk_utf8autoconvert) /* this means str is in current locale */ + return (char*)str; + else + { + const char *charset = NULL; + if (gtkGetFilenameCharset(&charset)==TRUE) /* current locale is already UTF-8 */ + { + if (g_utf8_validate(str, -1, NULL)) + return (char*)str; + else + { + if (gktLastConvertUTF8) + g_free(gktLastConvertUTF8); + gktLastConvertUTF8 = gtkStrToUTF8(str, "ISO8859-1"); /* if string is not UTF-8, assume ISO8859-1 */ + if (!gktLastConvertUTF8) return (char*)str; + return gktLastConvertUTF8; + } + } + else + { + if (gtkStrIsAscii(str) || !charset) + return (char*)str; + else if (charset) + { + if (gktLastConvertUTF8) + g_free(gktLastConvertUTF8); + gktLastConvertUTF8 = gtkStrToUTF8(str, charset); + if (!gktLastConvertUTF8) return (char*)str; + return gktLastConvertUTF8; + } + } + } + return (char*)str; +} + +gboolean iupgtkMotionNotifyEvent(GtkWidget *widget, GdkEventMotion *evt, Ihandle *ih) +{ + IFniis cb = (IFniis)IupGetCallback(ih,"MOTION_CB"); + if (cb) + { + char status[IUPKEY_STATUS_SIZE] = IUPKEY_STATUS_INIT; + iupgtkButtonKeySetStatus(evt->state, 0, status, 0); + cb(ih, (int)evt->x, (int)evt->y, status); + } + + (void)widget; + return FALSE; +} + +gboolean iupgtkButtonEvent(GtkWidget *widget, GdkEventButton *evt, Ihandle *ih) +{ + IFniiiis cb = (IFniiiis)IupGetCallback(ih,"BUTTON_CB"); + if (cb) + { + int doubleclick = 0, ret, press = 1; + int b = IUP_BUTTON1+(evt->button-1); + char status[IUPKEY_STATUS_SIZE] = IUPKEY_STATUS_INIT; + + if (evt->type == GDK_BUTTON_RELEASE) + press = 0; + + if (evt->type == GDK_2BUTTON_PRESS) + doubleclick = 1; + + iupgtkButtonKeySetStatus(evt->state, evt->button, status, doubleclick); + + ret = cb(ih, b, press, (int)evt->x, (int)evt->y, status); + if (ret==IUP_CLOSE) + IupExitLoop(); + else if (ret==IUP_IGNORE) + return TRUE; + } + + (void)widget; + return FALSE; +} diff --git a/iup/src/gtk/iupgtk_dialog.c b/iup/src/gtk/iupgtk_dialog.c new file mode 100755 index 0000000..46c0ce1 --- /dev/null +++ b/iup/src/gtk/iupgtk_dialog.c @@ -0,0 +1,1023 @@ +/** \file + * \brief IupDialog class + * + * See Copyright Notice in "iup.h" + */ + +#include + +#ifdef HILDON +#include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_class.h" +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_dlglist.h" +#include "iup_attrib.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_drvinfo.h" +#include "iup_focus.h" +#include "iup_str.h" +#define _IUPDLG_PRIVATE +#include "iup_dialog.h" +#include "iup_image.h" + +#include "iupgtk_drv.h" + + +static void gtkDialogSetMinMax(Ihandle* ih, int min_w, int min_h, int max_w, int max_h); + +/**************************************************************** + Utilities +****************************************************************/ + +int iupdrvDialogIsVisible(Ihandle* ih) +{ + return iupdrvIsVisible(ih); +} + +void iupdrvDialogUpdateSize(Ihandle* ih) +{ + int width, height; + gtk_window_get_size((GtkWindow*)ih->handle, &width, &height); + ih->currentwidth = width; + ih->currentheight = height; +} + +void iupdrvDialogGetSize(InativeHandle* handle, int *w, int *h) +{ + int width, height; + gtk_window_get_size((GtkWindow*)handle, &width, &height); + if (w) *w = width; + if (h) *h = height; +} + +void iupdrvDialogSetVisible(Ihandle* ih, int visible) +{ + if (visible) + gtk_widget_show(ih->handle); + else + gtk_widget_hide(ih->handle); +} + +void iupdrvDialogGetPosition(InativeHandle* handle, int *x, int *y) +{ + gtk_window_get_position((GtkWindow*)handle, x, y); +} + +void iupdrvDialogSetPosition(Ihandle *ih, int x, int y) +{ + gtk_window_move((GtkWindow*)ih->handle, x, y); +} + +static int gtkDialogGetMenuSize(Ihandle* ih) +{ +#ifdef HILDON + return 0; +#else + if (ih->data->menu) + return iupdrvMenuGetMenuBarSize(ih->data->menu); + else + return 0; +#endif +} + +static int gtkDialogGetWindowDecor(Ihandle* ih, int *win_border, int *win_caption) +{ + int x, y, frame_x, frame_y; + gdk_window_get_origin(ih->handle->window, &x, &y); + gdk_window_get_root_origin(ih->handle->window, &frame_x, &frame_y); + *win_border = x-frame_x; + *win_caption = y-frame_y-*win_border; + return 1; /* just for compatibility with iupdrvGetWindowDecor */ +} + +void iupdrvDialogGetDecoration(Ihandle* ih, int *border, int *caption, int *menu) +{ +#ifdef HILDON + /* In Hildon, borders have fixed dimensions, but are drawn as part + of the client area! */ + if (border) + *border = (iupAttribGetBoolean(ih, "HILDONWINDOW") && !iupAttribGetBoolean(ih, "FULLSCREEN")) ? 12 : 0; + if (caption) + *caption = 0; + if (menu) + *menu = 0; +#else + static int native_border = 0; + static int native_caption = 0; + + int has_caption = iupAttribGetBoolean(ih, "MAXBOX") || + iupAttribGetBoolean(ih, "MINBOX") || + iupAttribGetBoolean(ih, "MENUBOX") || + IupGetAttribute(ih, "TITLE"); /* must use IupGetAttribute to check from the native implementation */ + + int has_border = has_caption || + iupAttribGetBoolean(ih, "RESIZE") || + iupAttribGetBoolean(ih, "BORDER"); + + *menu = gtkDialogGetMenuSize(ih); + + if (ih->handle && iupdrvIsVisible(ih)) + { + int win_border, win_caption; + + if (gtkDialogGetWindowDecor(ih, &win_border, &win_caption)) + { +#ifdef WIN32 + if (*menu) + win_caption -= *menu; +#endif + + *border = 0; + if (has_border) + *border = win_border; + + *caption = 0; + if (has_caption) + *caption = win_caption; + + if (!native_border && *border) + native_border = win_border; + + if (!native_caption && *caption) + native_caption = win_caption; + } + } + + /* I could not set the size of the window including the decorations when the dialog is hidden */ + /* So we have to estimate the size of borders and caption when the dialog is hidden */ + + *border = 0; + if (has_border) + { + if (native_border) + *border = native_border; + else + *border = 5; + } + + *caption = 0; + if (has_caption) + { + if (native_caption) + *caption = native_caption; + else + *caption = 20; + } +#endif +} + +int iupdrvDialogSetPlacement(Ihandle* ih) +{ + char* placement; + int old_state = ih->data->show_state; + ih->data->show_state = IUP_SHOW; + + if (iupAttribGetBoolean(ih, "FULLSCREEN")) + { + gtk_window_fullscreen((GtkWindow*)ih->handle); + return 1; + } + + placement = iupAttribGet(ih, "PLACEMENT"); + if (!placement) + { + if (old_state == IUP_MAXIMIZE || old_state == IUP_MINIMIZE) + ih->data->show_state = IUP_RESTORE; + + gtk_window_unmaximize((GtkWindow*)ih->handle); + gtk_window_deiconify((GtkWindow*)ih->handle); + return 0; + } + + if (iupStrEqualNoCase(placement, "MINIMIZED")) + { + ih->data->show_state = IUP_MINIMIZE; + gtk_window_iconify((GtkWindow*)ih->handle); + } + else if (iupStrEqualNoCase(placement, "MAXIMIZED")) + { + ih->data->show_state = IUP_MAXIMIZE; + gtk_window_maximize((GtkWindow*)ih->handle); + } + else if (iupStrEqualNoCase(placement, "FULL")) + { + int width, height, x, y; + int border, caption, menu; + iupdrvDialogGetDecoration(ih, &border, &caption, &menu); + + /* position the decoration outside the screen */ + x = -(border); + y = -(border+caption+menu); + + /* the dialog client area will cover the task bar */ + iupdrvGetFullSize(&width, &height); + + height += menu; /* menu is inside the client area. */ + + /* set the new size and position */ + /* The resize evt will update the layout */ + gtk_window_move((GtkWindow*)ih->handle, x, y); + gtk_window_resize((GtkWindow*)ih->handle, width, height); + + if (old_state == IUP_MAXIMIZE || old_state == IUP_MINIMIZE) + ih->data->show_state = IUP_RESTORE; + } + + iupAttribSetStr(ih, "PLACEMENT", NULL); /* reset to NORMAL */ + + return 1; +} + + +/**************************************************************** + Callbacks and Events +****************************************************************/ + + +gboolean iupgtkDialogDeleteEvent(GtkWidget *widget, GdkEvent *evt, Ihandle *ih) +{ + Icallback cb; + (void)widget; + (void)evt; + + /* even when ACTIVE=NO the dialog gets this evt */ + if (!iupdrvIsActive(ih)) + return TRUE; + + cb = IupGetCallback(ih, "CLOSE_CB"); + if (cb) + { + int ret = cb(ih); + if (ret == IUP_IGNORE) + return TRUE; + if (ret == IUP_CLOSE) + IupExitLoop(); + } + + IupHide(ih); /* default: close the window */ + + return TRUE; /* do not propagate */ +} + +static gboolean gtkDialogConfigureEvent(GtkWidget *widget, GdkEventConfigure *evt, Ihandle *ih) +{ + int old_width, old_height, old_x, old_y; + gint x, y; + (void)widget; + +#ifndef HILDON + /* In hildon the menu is not a menubar */ + if (ih->data->menu && ih->data->menu->handle) + gtk_widget_set_size_request(ih->data->menu->handle, evt->width, -1); +#endif + + if (ih->data->ignore_resize) return FALSE; + + old_width = iupAttribGetInt(ih, "_IUPGTK_OLD_WIDTH"); + old_height = iupAttribGetInt(ih, "_IUPGTK_OLD_HEIGHT"); + + /* Check the size change, because configure is called also for position changes */ + if (evt->width != old_width || evt->height != old_height) + { + IFnii cb; + int border, caption, menu; + iupAttribSetInt(ih, "_IUPGTK_OLD_WIDTH", evt->width); + iupAttribSetInt(ih, "_IUPGTK_OLD_HEIGHT", evt->height); + + iupdrvDialogGetDecoration(ih, &border, &caption, &menu); + + /* update dialog size */ +#ifdef HILDON + /* In Hildon, the configure event contains the window size, not the client area size */ + ih->currentwidth = evt->width; + ih->currentheight = evt->height; +#else + ih->currentwidth = evt->width + 2*border; + ih->currentheight = evt->height + 2*border + caption; /* menu is inside the window client area */ +#endif + + cb = (IFnii)IupGetCallback(ih, "RESIZE_CB"); + if (!cb || cb(ih, evt->width, evt->height - menu)!=IUP_IGNORE) /* width and height here are for the client area */ + { + ih->data->ignore_resize = 1; + IupRefresh(ih); + ih->data->ignore_resize = 0; + } + } + + old_x = iupAttribGetInt(ih, "_IUPGTK_OLD_X"); + old_y = iupAttribGetInt(ih, "_IUPGTK_OLD_Y"); + gtk_window_get_position((GtkWindow*)ih->handle, &x, &y); /* ignore evt->x and evt->y because they are the clientpos and not X/Y */ + + /* Check the position change, because configure is called also for size changes */ + if (x != old_x || y != old_y) + { + IFnii cb; + iupAttribSetInt(ih, "_IUPGTK_OLD_X", x); + iupAttribSetInt(ih, "_IUPGTK_OLD_Y", y); + + cb = (IFnii)IupGetCallback(ih, "MOVE_CB"); + if (cb) + cb(ih, x, y); + } + + return FALSE; +} + +static gboolean gtkDialogWindowStateEvent(GtkWidget *widget, GdkEventWindowState *evt, Ihandle *ih) +{ + int state = -1; + (void)widget; + + if ((evt->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) && /* if flag changed and */ + (evt->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) && /* is now set */ + !(evt->new_window_state & GDK_WINDOW_STATE_WITHDRAWN)) /* is visible */ + state = IUP_MAXIMIZE; + else if ((evt->changed_mask & GDK_WINDOW_STATE_ICONIFIED) && + (evt->new_window_state & GDK_WINDOW_STATE_ICONIFIED) && + !(evt->new_window_state & GDK_WINDOW_STATE_WITHDRAWN)) + state = IUP_MINIMIZE; + else if ((evt->changed_mask & GDK_WINDOW_STATE_ICONIFIED) && + (evt->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) && + !(evt->new_window_state & GDK_WINDOW_STATE_WITHDRAWN)) + state = IUP_MAXIMIZE; + else if (((evt->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) && /* maximized changed */ + !(evt->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) && /* not maximized */ + !(evt->new_window_state & GDK_WINDOW_STATE_WITHDRAWN) && /* is visible */ + !(evt->new_window_state & GDK_WINDOW_STATE_ICONIFIED)) /* not minimized */ + || /* OR */ + ((evt->changed_mask & GDK_WINDOW_STATE_ICONIFIED) && /* minimized changed */ + !(evt->new_window_state & GDK_WINDOW_STATE_ICONIFIED) && /* not minimized */ + !(evt->new_window_state & GDK_WINDOW_STATE_WITHDRAWN) && /* is visible */ + !(evt->new_window_state & GDK_WINDOW_STATE_MAXIMIZED))) /* not maximized */ + state = IUP_RESTORE; + + if (state < 0) + return FALSE; + + if (ih->data->show_state != state) + { + IFni cb; + ih->data->show_state = state; + + cb = (IFni)IupGetCallback(ih, "SHOW_CB"); + if (cb && cb(ih, state) == IUP_CLOSE) + IupExitLoop(); + } + + return FALSE; +} + +static gboolean gtkDialogChildDestroyEvent(GtkWidget *widget, Ihandle *ih) +{ + /* It seems that the documentation for this callback is not correct */ + /* The second parameter must be the user_data or it will fail. */ + (void)widget; + + /* If the IUP dialog was not destroyed, destroy it here. */ + if (iupObjectCheck(ih)) + IupDestroy(ih); + + /* this callback is usefull to destroy children dialogs when the parent is destroyed. */ + /* The application is responsable for destroying the children before this happen. */ + + return FALSE; +} + + +/**************************************************************** + Idialog Methods +****************************************************************/ + + +/* replace the common dialog SetChildrenPosition method because of + the menu that it is inside the dialog. */ +static void gtkDialogSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + int menu_h = gtkDialogGetMenuSize(ih); + (void)x; + (void)y; + + /* Child coordinates are relative to client left-top corner. */ + iupBaseSetPosition(ih->firstchild, 0, menu_h); +} + +static void* gtkDialogGetInnerNativeContainerHandleMethod(Ihandle* ih, Ihandle* child) +{ + (void)child; + return (void*)gtk_bin_get_child((GtkBin*)ih->handle); +} + +static int gtkDialogMapMethod(Ihandle* ih) +{ + int decorations = 0; + int functions = 0; + InativeHandle* parent; + GtkWidget* fixed; + +#ifdef HILDON + if (iupAttribGetBoolean(ih, "HILDONWINDOW")) + { + HildonProgram *program = HILDON_PROGRAM(hildon_program_get_instance()); + ih->handle = hildon_window_new(); + if (ih->handle) + hildon_program_add_window(program, HILDON_WINDOW(ih->handle)); + } + else + { + iupAttribSetStr(ih, "DIALOGHINT", "YES"); /* otherwise not displayed correctly */ + ih->handle = gtk_window_new(GTK_WINDOW_TOPLEVEL); + } +#else + ih->handle = gtk_window_new(GTK_WINDOW_TOPLEVEL); +#endif + if (!ih->handle) + return IUP_ERROR; + + parent = iupDialogGetNativeParent(ih); + if (parent) + { + gtk_window_set_transient_for((GtkWindow*)ih->handle, (GtkWindow*)parent); + + /* manually remove child windows when parent is destroyed */ + g_signal_connect(G_OBJECT(parent), "destroy", G_CALLBACK(gtkDialogChildDestroyEvent), ih); + } + + g_signal_connect(G_OBJECT(ih->handle), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + + /* The iupgtkKeyPressEvent of the control with the focus will propagate the key up to the dialog. */ + /* Inside iupgtkKeyPressEvent we test this to avoid duplicate calls. */ + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(iupgtkKeyPressEvent), ih); + + g_signal_connect(G_OBJECT(ih->handle), "configure-event", G_CALLBACK(gtkDialogConfigureEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "window-state-event", G_CALLBACK(gtkDialogWindowStateEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "delete-event", G_CALLBACK(iupgtkDialogDeleteEvent), ih); + + gtk_window_set_default_size((GtkWindow*)ih->handle, 100, 100); /* set this to avoid size calculation problems */ + + if (iupAttribGetBoolean(ih, "DIALOGHINT")) + gtk_window_set_type_hint(GTK_WINDOW(ih->handle), GDK_WINDOW_TYPE_HINT_DIALOG); + + /* the container that will receive the child element. */ + fixed = gtk_fixed_new(); + gtk_container_add((GtkContainer*)ih->handle, fixed); + gtk_widget_show(fixed); + + /* initialize the widget */ + gtk_widget_realize(ih->handle); + + if (iupAttribGetBoolean(ih, "DIALOGFRAME")) { + iupAttribSetStr(ih, "RESIZE", "NO"); + } + + if (!iupAttribGetBoolean(ih, "RESIZE")) { + iupAttribSetStr(ih, "MAXBOX", "NO"); /* Must also remove these, so RESIZE=NO can work */ + iupAttribSetStr(ih, "MINBOX", "NO"); + } + + if (IupGetAttribute(ih, "TITLE")) { /* must use IupGetAttribute to check from the native implementation */ + functions |= GDK_FUNC_MOVE; + decorations |= GDK_DECOR_TITLE; + } + + if (iupAttribGetBoolean(ih, "MENUBOX")) { + functions |= GDK_FUNC_CLOSE; + decorations |= GDK_DECOR_MENU; + } + + if (iupAttribGetBoolean(ih, "MINBOX")) { + functions |= GDK_FUNC_MINIMIZE; + decorations |= GDK_DECOR_MINIMIZE; + } + + if (iupAttribGetBoolean(ih, "MAXBOX")) { + functions |= GDK_FUNC_MAXIMIZE; + decorations |= GDK_DECOR_MAXIMIZE; + } + + if (iupAttribGetBoolean(ih, "RESIZE")) { + functions |= GDK_FUNC_RESIZE; + decorations |= GDK_DECOR_RESIZEH; + } + + if (iupAttribGetBoolean(ih, "BORDER")) + decorations |= GDK_DECOR_BORDER; + + if (decorations == 0) + gtk_window_set_decorated((GtkWindow*)ih->handle, FALSE); + else + { + GdkWindow* window = ih->handle->window; + if (window) + { + gdk_window_set_decorations(window, (GdkWMDecoration)decorations); + gdk_window_set_functions(window, (GdkWMFunction)functions); + } + } + + /* configure for DRAG&DROP */ + if (IupGetCallback(ih, "DROPFILES_CB")) + iupAttribSetStr(ih, "DRAGDROP", "YES"); + + { + /* Reset the DLGBGCOLOR global attribute + if it is the first time a dialog is created. + The value returned by gtk_style_new is not accurate. */ + GtkStyle* style = gtk_widget_get_style(ih->handle); + if (style && IupGetGlobal("_IUP_RESET_GLOBALCOLORS")) + { + iupgtkUpdateGlobalColors(style); + IupSetGlobal("_IUP_RESET_GLOBALCOLORS", NULL); + } + } + + /* configure the size range */ + gtkDialogSetMinMax(ih, 1, 1, 65535, 65535); /* MINSIZE and MAXSIZE default values */ + + /* Ignore VISIBLE before mapping */ + iupAttribSetStr(ih, "VISIBLE", NULL); + + return IUP_NOERROR; +} + +static void gtkDialogUnMapMethod(Ihandle* ih) +{ + GtkWidget* fixed; +#if GTK_CHECK_VERSION(2, 10, 0) + GtkStatusIcon* status_icon; +#endif + + if (ih->data->menu) + { + ih->data->menu->handle = NULL; /* the dialog will destroy the native menu */ + IupDestroy(ih->data->menu); + } + +#if GTK_CHECK_VERSION(2, 10, 0) + status_icon = (GtkStatusIcon*)iupAttribGet(ih, "_IUPDLG_STATUSICON"); + if (status_icon) + g_object_unref(status_icon); +#endif + + fixed = gtk_bin_get_child((GtkBin*)ih->handle); + gtk_widget_unrealize(fixed); + gtk_widget_destroy(fixed); + + gtk_widget_unrealize(ih->handle); /* To match the call to gtk_widget_realize */ + gtk_widget_destroy(ih->handle); /* To match the call to gtk_window_new */ +} + +static void gtkDialogLayoutUpdateMethod(Ihandle *ih) +{ + int border, caption, menu; + int width, height; + + if (ih->data->ignore_resize || + iupAttribGet(ih, "_IUPGTK_FS_STYLE")) + return; + + /* for dialogs the position is not updated here */ + ih->data->ignore_resize = 1; + + iupdrvDialogGetDecoration(ih, &border, &caption, &menu); + + /* set size excluding the border */ + width = ih->currentwidth - 2*border; + height = ih->currentheight - 2*border - caption; /* menu is inside the client area. */ + gtk_window_resize((GtkWindow*)ih->handle, width, height); + + if (!iupAttribGetBoolean(ih, "RESIZE")) + { + GdkGeometry geometry; + geometry.min_width = width; + geometry.min_height = height; + geometry.max_width = width; + geometry.max_height = height; + gtk_window_set_geometry_hints((GtkWindow*)ih->handle, ih->handle, + &geometry, (GdkWindowHints)(GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE)); + } + + ih->data->ignore_resize = 0; +} + + +/**************************************************************************** + Attributes +****************************************************************************/ + +static void gtkDialogSetMinMax(Ihandle* ih, int min_w, int min_h, int max_w, int max_h) +{ + /* The minmax size restricts the client area */ + GdkGeometry geometry; + int decorwidth = 0, decorheight = 0; + iupDialogGetDecorSize(ih, &decorwidth, &decorheight); + + geometry.min_width = 1; + if (min_w > decorwidth) + geometry.min_width = min_w-decorwidth; + + geometry.min_height = 1; + if (min_h > decorheight) + geometry.min_height = min_h-decorheight; + + geometry.max_width = 65535; + if (max_w > decorwidth && max_w > geometry.min_width) + geometry.max_width = max_w-decorwidth; + + geometry.max_height = 65535; + if (max_h > decorheight && max_w > geometry.min_height) + geometry.max_height = max_h-decorheight; + + gtk_window_set_geometry_hints((GtkWindow*)ih->handle, ih->handle, + &geometry, (GdkWindowHints)(GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE)); +} + +static int gtkDialogSetMinSizeAttrib(Ihandle* ih, const char* value) +{ + int min_w = 1, min_h = 1; /* MINSIZE default value */ + int max_w = 65535, max_h = 65535; /* MAXSIZE default value */ + iupStrToIntInt(value, &min_w, &min_h, 'x'); + + /* if MAXSIZE also set, must be also updated here */ + iupStrToIntInt(iupAttribGet(ih, "MAXSIZE"), &max_w, &max_h, 'x'); + + gtkDialogSetMinMax(ih, min_w, min_h, max_w, max_h); + return 1; +} + +static int gtkDialogSetMaxSizeAttrib(Ihandle* ih, const char* value) +{ + int min_w = 1, min_h = 1; /* MINSIZE default value */ + int max_w = 65535, max_h = 65535; /* MAXSIZE default value */ + iupStrToIntInt(value, &max_w, &max_h, 'x'); + + /* if MINSIZE also set, must be also updated here */ + iupStrToIntInt(iupAttribGet(ih, "MINSIZE"), &min_w, &min_h, 'x'); + + gtkDialogSetMinMax(ih, min_w, min_h, max_w, max_h); + return 1; +} + +static char* gtkDialogGetXAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(20); + + gint x = 0; + gtk_window_get_position((GtkWindow*)ih->handle, &x, NULL); + + sprintf(str, "%d", x); + return str; +} + +static char* gtkDialogGetYAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(20); + + gint y = 0; + gtk_window_get_position((GtkWindow*)ih->handle, NULL, &y); + + sprintf(str, "%d", y); + return str; +} + +static int gtkDialogSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (!value) + value = ""; + gtk_window_set_title((GtkWindow*)ih->handle, iupgtkStrConvertToUTF8(value)); + return 0; +} + +static char* gtkDialogGetTitleAttrib(Ihandle* ih) +{ + const char* title = gtk_window_get_title((GtkWindow*)ih->handle); + + if (!title || title[0] == 0) + return NULL; + else + return iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(title)); +} + +static char* gtkDialogGetClientSizeAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(20); + + int width, height; + gtk_window_get_size((GtkWindow*)ih->handle, &width, &height); + height -= gtkDialogGetMenuSize(ih); + + sprintf(str, "%dx%d", width, height); + return str; +} + +static int gtkDialogSetFullScreenAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + { + if (!iupAttribGet(ih, "_IUPGTK_FS_STYLE")) + { + /* save the previous decoration attributes */ + /* during fullscreen these attributes can be consulted by the application */ + iupAttribStoreStr(ih, "_IUPGTK_FS_MAXBOX", iupAttribGet(ih, "MAXBOX")); + iupAttribStoreStr(ih, "_IUPGTK_FS_MINBOX", iupAttribGet(ih, "MINBOX")); + iupAttribStoreStr(ih, "_IUPGTK_FS_MENUBOX",iupAttribGet(ih, "MENUBOX")); + iupAttribStoreStr(ih, "_IUPGTK_FS_RESIZE", iupAttribGet(ih, "RESIZE")); + iupAttribStoreStr(ih, "_IUPGTK_FS_BORDER", iupAttribGet(ih, "BORDER")); + iupAttribStoreStr(ih, "_IUPGTK_FS_TITLE", IupGetAttribute(ih, "TITLE")); /* must use IupGetAttribute to check from the native implementation */ + + /* remove the decorations attributes */ + iupAttribSetStr(ih, "MAXBOX", "NO"); + iupAttribSetStr(ih, "MINBOX", "NO"); + iupAttribSetStr(ih, "MENUBOX", "NO"); + IupSetAttribute(ih, "TITLE", NULL); iupAttribSetStr(ih, "TITLE", NULL); /* remove from the hash table if we are during IupMap */ + iupAttribSetStr(ih, "RESIZE", "NO"); + iupAttribSetStr(ih, "BORDER", "NO"); + + if (iupdrvIsVisible(ih)) + gtk_window_fullscreen((GtkWindow*)ih->handle); + + iupAttribSetStr(ih, "_IUPGTK_FS_STYLE", "YES"); + } + } + else + { + char* fs_style = iupAttribGet(ih, "_IUPGTK_FS_STYLE"); + if (fs_style) + { + iupAttribSetStr(ih, "_IUPGTK_FS_STYLE", NULL); + + /* restore the decorations attributes */ + iupAttribStoreStr(ih, "MAXBOX", iupAttribGet(ih, "_IUPGTK_FS_MAXBOX")); + iupAttribStoreStr(ih, "MINBOX", iupAttribGet(ih, "_IUPGTK_FS_MINBOX")); + iupAttribStoreStr(ih, "MENUBOX",iupAttribGet(ih, "_IUPGTK_FS_MENUBOX")); + IupSetAttribute(ih, "TITLE", iupAttribGet(ih, "_IUPGTK_FS_TITLE")); /* must use IupSetAttribute to update the native implementation */ + iupAttribStoreStr(ih, "RESIZE", iupAttribGet(ih, "_IUPGTK_FS_RESIZE")); + iupAttribStoreStr(ih, "BORDER", iupAttribGet(ih, "_IUPGTK_FS_BORDER")); + + if (iupdrvIsVisible(ih)) + gtk_window_unfullscreen((GtkWindow*)ih->handle); + + /* remove auxiliar attributes */ + iupAttribSetStr(ih, "_IUPGTK_FS_MAXBOX", NULL); + iupAttribSetStr(ih, "_IUPGTK_FS_MINBOX", NULL); + iupAttribSetStr(ih, "_IUPGTK_FS_MENUBOX",NULL); + iupAttribSetStr(ih, "_IUPGTK_FS_RESIZE", NULL); + iupAttribSetStr(ih, "_IUPGTK_FS_BORDER", NULL); + iupAttribSetStr(ih, "_IUPGTK_FS_TITLE", NULL); + } + } + return 1; +} + +static int gtkDialogSetTopMostAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + gtk_window_set_keep_above((GtkWindow*)ih->handle, TRUE); + else + gtk_window_set_keep_above((GtkWindow*)ih->handle, FALSE); + return 1; +} + +#if GTK_CHECK_VERSION(2, 12, 0) +static int gtkDialogSetOpacityAttrib(Ihandle *ih, const char *value) +{ + int opacity; + if (!iupStrToInt(value, &opacity)) + return 0; + + gtk_window_set_opacity((GtkWindow*)ih->handle, (double)opacity/255.0); + return 1; +} +#endif + +static int gtkDialogSetIconAttrib(Ihandle* ih, const char *value) +{ + if (!value) + gtk_window_set_icon((GtkWindow*)ih->handle, NULL); + else + { + GdkPixbuf* icon = (GdkPixbuf*)iupImageGetIcon(value); + if (icon) + gtk_window_set_icon((GtkWindow*)ih->handle, icon); + } + return 1; +} + +static int gtkDialogSetBackgroundAttrib(Ihandle* ih, const char* value) +{ + if (iupdrvBaseSetBgColorAttrib(ih, value)) + { + GtkStyle *style = gtk_widget_get_style(ih->handle); + if (style->bg_pixmap[GTK_STATE_NORMAL]) + { + style = gtk_style_copy(style); + style->bg_pixmap[GTK_STATE_NORMAL] = NULL; + gtk_widget_set_style(ih->handle, style); + } + return 1; + } + else + { + GdkPixbuf* pixbuf = iupImageGetImage(value, ih, 0); + if (pixbuf) + { + GdkPixmap* pixmap; + GtkStyle *style; + + gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, NULL, 255); + + style = gtk_style_copy(gtk_widget_get_style(ih->handle)); + style->bg_pixmap[GTK_STATE_NORMAL] = pixmap; + gtk_widget_set_style(ih->handle, style); + + return 1; + } + } + + return 0; +} + +#if GTK_CHECK_VERSION(2, 10, 0) +static int gtkDialogTaskDoubleClick(int button) +{ + static int last_button = -1; + static GTimer* timer = NULL; + if (last_button == -1 || last_button != button) + { + last_button = button; + if (timer) + g_timer_destroy(timer); + timer = g_timer_new(); + return 0; + } + else + { + double seconds; + + if (!timer) /* just in case */ + return 0; + + seconds = g_timer_elapsed(timer, NULL); + if (seconds < 0.4) + { + /* reset state */ + g_timer_destroy(timer); + timer = NULL; + last_button = -1; + return 1; + } + else + { + g_timer_reset(timer); + return 0; + } + } +} + +static void gtkDialogTaskAction(GtkStatusIcon *status_icon, Ihandle *ih) +{ + /* from GTK source code it is called only when button==1 and pressed==1 */ + int button = 1; + int pressed = 1; + int dclick = gtkDialogTaskDoubleClick(button); + IFniii cb = (IFniii)IupGetCallback(ih, "TRAYCLICK_CB"); + if (cb && cb(ih, button, pressed, dclick) == IUP_CLOSE) + IupExitLoop(); + (void)status_icon; +} + +static void gtkDialogTaskPopupMenu(GtkStatusIcon *status_icon, guint gbutton, guint activate_time, Ihandle *ih) +{ + /* from GTK source code it is called only when button==3 and pressed==1 */ + int button = 3; + int pressed = 1; + int dclick = gtkDialogTaskDoubleClick(button); + IFniii cb = (IFniii)IupGetCallback(ih, "TRAYCLICK_CB"); + if (cb && cb(ih, button, pressed, dclick) == IUP_CLOSE) + IupExitLoop(); + (void)activate_time; + (void)gbutton; + (void)status_icon; +} + +static GtkStatusIcon* gtkDialogGetStatusIcon(Ihandle *ih) +{ + GtkStatusIcon* status_icon = (GtkStatusIcon*)iupAttribGet(ih, "_IUPDLG_STATUSICON"); + if (!status_icon) + { + status_icon = gtk_status_icon_new(); + + g_signal_connect(G_OBJECT(status_icon), "activate", G_CALLBACK(gtkDialogTaskAction), ih); + g_signal_connect(G_OBJECT(status_icon), "popup-menu", G_CALLBACK(gtkDialogTaskPopupMenu), ih); + + iupAttribSetStr(ih, "_IUPDLG_STATUSICON", (char*)status_icon); + } + return status_icon; +} + +static int gtkDialogSetTrayAttrib(Ihandle *ih, const char *value) +{ + GtkStatusIcon* status_icon = gtkDialogGetStatusIcon(ih); + gtk_status_icon_set_visible(status_icon, iupStrBoolean(value)); + return 1; +} + +static int gtkDialogSetTrayTipAttrib(Ihandle *ih, const char *value) +{ + GtkStatusIcon* status_icon = gtkDialogGetStatusIcon(ih); +#if GTK_CHECK_VERSION(2, 16, 0) + if (value) + { + gtk_status_icon_set_has_tooltip(status_icon, TRUE); + gtk_status_icon_set_tooltip_text(status_icon, value); + } + else + gtk_status_icon_set_has_tooltip(status_icon, FALSE); +#else + gtk_status_icon_set_tooltip(status_icon, value); +#endif + return 1; +} + +static int gtkDialogSetTrayImageAttrib(Ihandle *ih, const char *value) +{ + GtkStatusIcon* status_icon = gtkDialogGetStatusIcon(ih); + GdkPixbuf* icon = (GdkPixbuf*)iupImageGetIcon(value); + gtk_status_icon_set_from_pixbuf(status_icon, icon); + return 1; +} +#endif /* GTK_CHECK_VERSION(2, 10, 0) */ + +void iupdrvDialogInitClass(Iclass* ic) +{ + /* Driver Dependent Class methods */ + ic->Map = gtkDialogMapMethod; + ic->UnMap = gtkDialogUnMapMethod; + ic->LayoutUpdate = gtkDialogLayoutUpdateMethod; + ic->GetInnerNativeContainerHandle = gtkDialogGetInnerNativeContainerHandleMethod; + ic->SetChildrenPosition = gtkDialogSetChildrenPositionMethod; + + /* Callback Windows and GTK Only */ + iupClassRegisterCallback(ic, "TRAYCLICK_CB", "iii"); + + /* Driver Dependent Attribute functions */ + +#ifdef WIN32 + iupClassRegisterAttribute(ic, "HWND", iupgtkGetNativeWindowHandle, NULL, NULL, NULL, IUPAF_NO_STRING|IUPAF_NO_INHERIT); +#else + iupClassRegisterAttribute(ic, "XWINDOW", iupgtkGetNativeWindowHandle, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_NO_STRING); +#endif + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, "DLGBGCOLOR", NULL, IUPAF_DEFAULT); /* force new default value */ + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "X", gtkDialogGetXAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "Y", gtkDialogGetYAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NO_INHERIT); + + /* Base Container */ + iupClassRegisterAttribute(ic, "CLIENTSIZE", gtkDialogGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NO_INHERIT); + + /* Special */ + iupClassRegisterAttribute(ic, "TITLE", gtkDialogGetTitleAttrib, gtkDialogSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupDialog only */ + iupClassRegisterAttribute(ic, "BACKGROUND", NULL, gtkDialogSetBackgroundAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ICON", NULL, gtkDialogSetIconAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FULLSCREEN", NULL, gtkDialogSetFullScreenAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MINSIZE", NULL, gtkDialogSetMinSizeAttrib, IUPAF_SAMEASSYSTEM, "1x1", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MAXSIZE", NULL, gtkDialogSetMaxSizeAttrib, IUPAF_SAMEASSYSTEM, "65535x65535", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SAVEUNDER", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); /* saveunder not supported in GTK */ + + /* IupDialog Windows and GTK Only */ + iupClassRegisterAttribute(ic, "TOPMOST", NULL, gtkDialogSetTopMostAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DRAGDROP", NULL, iupgtkSetDragDropAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DIALOGHINT", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); +#if GTK_CHECK_VERSION(2, 12, 0) + iupClassRegisterAttribute(ic, "OPACITY", NULL, gtkDialogSetOpacityAttrib, NULL, NULL, IUPAF_NO_INHERIT); +#endif +#if GTK_CHECK_VERSION(2, 10, 0) + iupClassRegisterAttribute(ic, "TRAY", NULL, gtkDialogSetTrayAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TRAYIMAGE", NULL, gtkDialogSetTrayImageAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TRAYTIP", NULL, gtkDialogSetTrayTipAttrib, NULL, NULL, IUPAF_NO_INHERIT); +#endif +} diff --git a/iup/src/gtk/iupgtk_drv.h b/iup/src/gtk/iupgtk_drv.h new file mode 100755 index 0000000..ade2a4a --- /dev/null +++ b/iup/src/gtk/iupgtk_drv.h @@ -0,0 +1,82 @@ +/** \file + * \brief GTK Driver + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPGTK_DRV_H +#define __IUPGTK_DRV_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* global variables, declared in iupgtk_globalattrib.c */ +extern int iupgtk_utf8autoconvert; + + +/* common */ +gboolean iupgtkEnterLeaveEvent(GtkWidget *widget, GdkEventCrossing *evt, Ihandle* ih); +gboolean iupgtkShowHelp(GtkWidget *widget, GtkWidgetHelpType *arg1, Ihandle* ih); +GtkFixed* iupgtkBaseGetFixed(Ihandle* ih); +void iupgtkBaseAddToParent(Ihandle* ih); +void iupgdkColorSet(GdkColor* color, unsigned char r, unsigned char g, unsigned char b); +int iupgtkSetDragDropAttrib(Ihandle* ih, const char* value); +int iupgtkSetMnemonicTitle(Ihandle* ih, GtkLabel* label, const char* value); +char* iupgtkStrConvertToUTF8(const char* str); +char* iupgtkStrConvertFromUTF8(const char* str); +void iupgtkReleaseConvertUTF8(void); +char* iupgtkStrConvertFromFilename(const char* str); +char* iupgtkStrConvertToFilename(const char* str); +void iupgtkUpdateMnemonic(Ihandle* ih); +gboolean iupgtkMotionNotifyEvent(GtkWidget *widget, GdkEventMotion *evt, Ihandle *ih); +gboolean iupgtkButtonEvent(GtkWidget *widget, GdkEventButton *evt, Ihandle *ih); +void iupgtkBaseSetBgColor(InativeHandle* handle, unsigned char r, unsigned char g, unsigned char b); +void iupgtkBaseSetFgColor(InativeHandle* handle, unsigned char r, unsigned char g, unsigned char b); +void iupgtkBaseSetFgGdkColor(InativeHandle* handle, GdkColor *color); + + +/* focus */ +gboolean iupgtkFocusInOutEvent(GtkWidget *widget, GdkEventFocus *evt, Ihandle* ih); + + +/* key */ +gboolean iupgtkKeyPressEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle* ih); +gboolean iupgtkKeyReleaseEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle* ih); +void iupgtkButtonKeySetStatus(guint state, unsigned int but, char* status, int doubleclick); +void iupgtkKeyEncode(int key, guint *keyval, guint *state); + + +/* font */ +char* iupgtkGetPangoFontDescAttrib(Ihandle *ih); +char* iupgtkGetFontIdAttrib(Ihandle *ih); +PangoFontDescription* iupgtkGetPangoFontDesc(const char* value); +char* iupgtkFindPangoFontDesc(PangoFontDescription* fontdesc); +void iupgtkFontUpdatePangoLayout(Ihandle* ih, PangoLayout* layout); +void iupgtkFontUpdateObjectPangoLayout(Ihandle* ih, gpointer object); + +/* There are PANGO_SCALE Pango units in one device unit. + For an output backend where a device unit is a pixel, + a size value of 10 * PANGO_SCALE gives 10 pixels. */ +#define IUPGTK_PANGOUNITS2PIXELS(_x) (((_x) + PANGO_SCALE/2) / PANGO_SCALE) +#define IUPGTK_PIXELS2PANGOUNITS(_x) ((_x) * PANGO_SCALE) + + +/* open */ +char* iupgtkGetNativeWindowHandle(Ihandle* ih); +void iupgtkPushVisualAndColormap(void* visual, void* colormap); +void* iupgtkGetNativeGraphicsContext(GtkWidget* widget); +void iupgtkReleaseNativeGraphicsContext(GtkWidget* widget, void* gc); +void iupgtkUpdateGlobalColors(GtkStyle* style); + + +/* dialog */ +gboolean iupgtkDialogDeleteEvent(GtkWidget *widget, GdkEvent *evt, Ihandle *ih); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/gtk/iupgtk_filedlg.c b/iup/src/gtk/iupgtk_filedlg.c new file mode 100755 index 0000000..5426910 --- /dev/null +++ b/iup/src/gtk/iupgtk_filedlg.c @@ -0,0 +1,536 @@ +/** \file + * \brief IupFileDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drvinfo.h" +#include "iup_dialog.h" +#include "iup_strmessage.h" +#include "iup_array.h" +#include "iup_drvinfo.h" + +#include "iupgtk_drv.h" + + +static void iupStrRemoveChar(char* str, char c) +{ + char* p = str; + while (*str) + { + if (*str != c) + { + *p = *str; + p++; + } + + str++; + } + *p = 0; +} + +static void gtkFileDlgGetNextFilter(char** str, char** name, char** pattern) +{ + int len; + *name = *str; + + len = strlen(*name); + *pattern = (*name)+len+1; + + len = strlen(*pattern); + *str = (*pattern)+len+1; + + iupStrReplace(*pattern, ';', 0); /* remove other patterns */ +} + +static void gtkFileDlgGetMultipleFiles(Ihandle* ih, GSList* list) +{ + int len, cur_len, dir_len = -1; + char *filename, *all_names; + Iarray* names_array = iupArrayCreate(1024, 1); /* just set an initial size, but count is 0 */ + + while (list) + { + filename = (char*)list->data; + len = strlen(filename); + + if (dir_len == -1) + { + dir_len = len; + + while (dir_len && (filename[dir_len] != '/' && filename[dir_len] != '\\')) + dir_len--; + + cur_len = iupArrayCount(names_array); + all_names = iupArrayAdd(names_array, dir_len+1); + memcpy(all_names+cur_len, filename, dir_len); + all_names[cur_len+dir_len] = '|'; + + dir_len++; /* skip separator */ + } + len -= dir_len; /* remove directory */ + + cur_len = iupArrayCount(names_array); + all_names = iupArrayAdd(names_array, len+1); + memcpy(all_names+cur_len, filename+dir_len, len); + all_names[cur_len+len] = '|'; + + g_free(filename); + list = list->next; + } + + cur_len = iupArrayCount(names_array); + all_names = iupArrayInc(names_array); + all_names[cur_len+1] = 0; + + iupAttribStoreStr(ih, "VALUE", iupgtkStrConvertFromFilename(all_names)); + + iupArrayDestroy(names_array); +} + +#ifdef WIN32 +#include +#else +#include +#endif + +static void gtkFileDlgUpdatePreviewGLCanvas(Ihandle* ih) +{ + Ihandle* glcanvas = IupGetAttributeHandle(ih, "PREVIEWGLCANVAS"); + if (glcanvas) + { +#ifdef WIN32 + iupAttribSetStr(glcanvas, "HWND", iupAttribGet(ih, "HWND")); +#else + iupAttribSetStr(glcanvas, "XWINDOW", iupAttribGet(ih, "XWINDOW")); +#endif + glcanvas->iclass->Map(glcanvas); + } +} + +static void gtkFileDlgPreviewRealize(GtkWidget *widget, Ihandle *ih) +{ + iupAttribSetStr(ih, "PREVIEWDC", iupgtkGetNativeGraphicsContext(widget)); + iupAttribSetStr(ih, "WID", (char*)widget); + +#ifdef WIN32 + iupAttribSetStr(ih, "HWND", (char*)GDK_WINDOW_HWND(widget->window)); +#else + iupAttribSetStr(ih, "XWINDOW", (char*)GDK_WINDOW_XID(widget->window)); + iupAttribSetStr(ih, "XDISPLAY", (char*)iupdrvGetDisplay()); +#endif + gtkFileDlgUpdatePreviewGLCanvas(ih); +} + +static void gtkFileDlgRealize(GtkWidget *widget, Ihandle *ih) +{ + IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + cb(ih, NULL, "INIT"); + + (void)widget; +} + +static gboolean gtkFileDlgPreviewConfigureEvent(GtkWidget *widget, GdkEventConfigure *evt, Ihandle *ih) +{ + iupAttribSetInt(ih, "PREVIEWWIDTH", evt->width); + iupAttribSetInt(ih, "PREVIEWHEIGHT", evt->height); + + (void)widget; + return FALSE; +} + +static gboolean gtkFileDlgPreviewExposeEvent(GtkWidget *widget, GdkEventExpose *evt, Ihandle *ih) +{ + GtkFileChooser *file_chooser = (GtkFileChooser*)iupAttribGet(ih, "_IUPDLG_FILE_CHOOSER"); + char *filename = gtk_file_chooser_get_preview_filename(file_chooser); + + IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + if (iupdrvIsFile(filename)) + cb(ih, iupgtkStrConvertFromFilename(filename), "PAINT"); + else + cb(ih, NULL, "PAINT"); + + g_free (filename); + + (void)evt; + (void)widget; + return TRUE; /* stop other handlers */ +} + +static void gtkFileDlgUpdatePreview(GtkFileChooser *file_chooser, Ihandle* ih) +{ + char *filename = gtk_file_chooser_get_preview_filename(file_chooser); + + if (iupdrvIsFile(filename)) + { + IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + cb(ih, iupgtkStrConvertFromFilename(filename), "SELECT"); + } + + g_free (filename); + + gtk_file_chooser_set_preview_widget_active(file_chooser, TRUE); +} + +static int gtkFileDlgPopup(Ihandle* ih, int x, int y) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + GtkWidget* dialog; + GtkWidget* preview_canvas = NULL; + GtkFileChooserAction action; + IFnss file_cb; + char* value; + int response, filter_count = 0; + + iupAttribSetInt(ih, "_IUPDLG_X", x); /* used in iupDialogUpdatePosition */ + iupAttribSetInt(ih, "_IUPDLG_Y", y); + + value = iupAttribGetStr(ih, "DIALOGTYPE"); + if (iupStrEqualNoCase(value, "SAVE")) + action = GTK_FILE_CHOOSER_ACTION_SAVE; + else if (iupStrEqualNoCase(value, "DIR")) + action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; + else + action = GTK_FILE_CHOOSER_ACTION_OPEN; + + value = iupAttribGet(ih, "TITLE"); + if (!value) + { + GtkStockItem item; + + if (action == GTK_FILE_CHOOSER_ACTION_SAVE) + value = GTK_STOCK_SAVE_AS; + else + value = GTK_STOCK_OPEN; + + gtk_stock_lookup(value, &item); + value = item.label; + + iupAttribStoreStr(ih, "TITLE", iupgtkStrConvertFromUTF8(value)); + value = iupAttribGet(ih, "TITLE"); + iupStrRemoveChar(value, '_'); + } + + dialog = gtk_file_chooser_dialog_new(iupgtkStrConvertToUTF8(value), (GtkWindow*)parent, action, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + NULL); + if (!dialog) + return IUP_ERROR; + + if (action == GTK_FILE_CHOOSER_ACTION_SAVE) + gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_SAVE, GTK_RESPONSE_OK); + else if (action == GTK_FILE_CHOOSER_ACTION_OPEN) + gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_OPEN, GTK_RESPONSE_OK); + else + gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_OK, GTK_RESPONSE_OK); + + if (IupGetCallback(ih, "HELP_CB")) + gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_HELP, GTK_RESPONSE_HELP); + +#if GTK_CHECK_VERSION(2, 6, 0) + if (iupAttribGetBoolean(ih, "SHOWHIDDEN")) + gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dialog), TRUE); +#endif + + if (iupAttribGetBoolean(ih, "MULTIPLEFILES") && action == GTK_FILE_CHOOSER_ACTION_OPEN) + gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE); + +#if GTK_CHECK_VERSION(2, 8, 0) + if (!iupAttribGetBoolean(ih, "NOOVERWRITEPROMPT") && action == GTK_FILE_CHOOSER_ACTION_SAVE) + gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE); +#endif + + /* just check for the path inside FILE */ + value = iupAttribGet(ih, "FILE"); + if (value && (value[0] == '/' || value[1] == ':')) + { + char* dir = iupStrFileGetPath(value); + int len = strlen(dir); + iupAttribStoreStr(ih, "DIRECTORY", dir); + free(dir); + iupAttribStoreStr(ih, "FILE", value+len); + } + + value = iupAttribGet(ih, "DIRECTORY"); + if (value) + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), iupgtkStrConvertToFilename(value)); + + value = iupAttribGet(ih, "FILE"); + if (value) + { + if (action == GTK_FILE_CHOOSER_ACTION_SAVE) + gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), iupgtkStrConvertToFilename(value)); + else + { + if (iupdrvIsFile(value)) /* check if file exists */ + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), iupgtkStrConvertToFilename(value)); + } + } + + value = iupAttribGet(ih, "EXTFILTER"); + if (value) + { + char *name, *pattern, *filters = iupStrDup(value), *p; + char atrib[30]; + int i; + int filter_index = iupAttribGetInt(ih, "FILTERUSED"); + if (!filter_index) + filter_index = 1; + + filter_count = iupStrReplace(filters, '|', 0) / 2; + + p = filters; + for (i=0; ihandle = GTK_WIDGET(dialog); + iupDialogUpdatePosition(ih); + ih->handle = NULL; /* reset handle */ + + do + { + response = gtk_dialog_run(GTK_DIALOG(dialog)); + + if (response == GTK_RESPONSE_HELP) + { + Icallback cb = IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + response = GTK_RESPONSE_CANCEL; + } + else if (response == GTK_RESPONSE_OK) + { + char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); + int file_exist = iupdrvIsFile(filename); + int dir_exist = iupdrvIsDirectory(filename); + g_free(filename); + + if (action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) + { + if (!dir_exist) + { + iupStrMessageShowError(ih, "IUP_INVALIDDIR"); + response = GTK_RESPONSE_HELP; /* to leave the dialog open */ + continue; + } + } + else if (!iupAttribGetBoolean(ih, "MULTIPLEFILES")) + { + if (dir_exist) + { + iupStrMessageShowError(ih, "IUP_FILEISDIR"); + response = GTK_RESPONSE_HELP; /* to leave the dialog open */ + continue; + } + + if (!file_exist) /* if do not exist check ALLOWNEW */ + { + value = iupAttribGet(ih, "ALLOWNEW"); + if (!value) + { + if (action == GTK_FILE_CHOOSER_ACTION_SAVE) + value = "YES"; + else + value = "NO"; + } + + if (!iupStrBoolean(value)) + { + iupStrMessageShowError(ih, "IUP_FILENOTEXIST"); + response = GTK_RESPONSE_HELP; /* to leave the dialog open */ + continue; + } + } + + if (file_cb) + { + char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); + int ret = file_cb(ih, iupgtkStrConvertFromFilename(filename), "OK"); + g_free(filename); + + if (ret == IUP_IGNORE) + { + response = GTK_RESPONSE_HELP; /* to leave the dialog open */ + continue; + } + } + } + } + } while (response == GTK_RESPONSE_HELP); + + if (file_cb) + { + if (iupAttribGetBoolean(ih, "SHOWPREVIEW")) + iupgtkReleaseNativeGraphicsContext(preview_canvas, (void*)iupAttribGet(ih, "PREVIEWDC")); + + file_cb(ih, NULL, "FINISH"); + } + + if (response == GTK_RESPONSE_OK) + { + int file_exist, dir_exist; + + if (filter_count) + { + int i; + char atrib[30]; + GtkFileFilter* filter = gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(dialog)); + + for (i=0; inext) /* if more than one file */ + gtkFileDlgGetMultipleFiles(ih, file_list); + else + { + char* filename = (char*)file_list->data; + iupAttribStoreStr(ih, "VALUE", iupgtkStrConvertFromFilename(filename)); + g_free(filename); + } + + g_slist_free(file_list); + file_exist = 1; + dir_exist = 0; + } + else + { + char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); + iupAttribStoreStr(ih, "VALUE", iupgtkStrConvertFromFilename(filename)); + file_exist = iupdrvIsFile(filename); + dir_exist = iupdrvIsDirectory(filename); + g_free(filename); + } + + if (dir_exist) + { + iupAttribSetStr(ih, "FILEEXIST", NULL); + iupAttribSetStr(ih, "STATUS", "0"); + } + else + { + if (file_exist) /* check if file exists */ + { + iupAttribSetStr(ih, "FILEEXIST", "YES"); + iupAttribSetStr(ih, "STATUS", "0"); + } + else + { + iupAttribSetStr(ih, "FILEEXIST", "NO"); + iupAttribSetStr(ih, "STATUS", "1"); + } + } + + if (action != GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER && !iupAttribGetBoolean(ih, "NOCHANGEDIR")) /* do change the current directory */ + { + /* GtkFileChooser does not change the current directory */ + char* dir = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(dialog)); + if (dir) iupdrvSetCurrentDirectory(dir); + g_free(dir); + } + } + else + { + iupAttribSetStr(ih, "FILTERUSED", NULL); + iupAttribSetStr(ih, "VALUE", NULL); + iupAttribSetStr(ih, "FILEEXIST", NULL); + iupAttribSetStr(ih, "STATUS", "-1"); + } + + gtk_widget_destroy(GTK_WIDGET(dialog)); + + return IUP_NOERROR; +} + +void iupdrvFileDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = gtkFileDlgPopup; + + /* IupFileDialog Windows and GTK Only */ + iupClassRegisterAttribute(ic, "EXTFILTER", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FILTERINFO", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FILTERUSED", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MULTIPLEFILES", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/gtk/iupgtk_focus.c b/iup/src/gtk/iupgtk_focus.c new file mode 100755 index 0000000..fa596ba --- /dev/null +++ b/iup/src/gtk/iupgtk_focus.c @@ -0,0 +1,44 @@ +/** \file + * \brief GTK Focus + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_focus.h" +#include "iup_attrib.h" +#include "iup_drv.h" +#include "iup_assert.h" +#include "iup_drv.h" + +#include "iupgtk_drv.h" + + +void iupdrvSetFocus(Ihandle *ih) +{ + gtk_widget_grab_focus(ih->handle); +} + +gboolean iupgtkFocusInOutEvent(GtkWidget *widget, GdkEventFocus *evt, Ihandle *ih) +{ + (void)widget; + + if (evt->in) + { + /* even when ACTIVE=NO the dialog gets this evt */ + if (!iupdrvIsActive(ih)) + return TRUE; + + iupCallGetFocusCb(ih); + } + else + iupCallKillFocusCb(ih); + + return FALSE; +} diff --git a/iup/src/gtk/iupgtk_font.c b/iup/src/gtk/iupgtk_font.c new file mode 100755 index 0000000..f7ff348 --- /dev/null +++ b/iup/src/gtk/iupgtk_font.c @@ -0,0 +1,413 @@ +/** \file + * \brief GTK Font mapping + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_attrib.h" +#include "iup_array.h" +#include "iup_object.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_assert.h" + +#include "iupgtk_drv.h" + + +typedef struct _IgtkFont +{ + char standardfont[200]; + PangoFontDescription* fontdesc; + PangoAttribute* strikethrough; + PangoAttribute* underline; + PangoLayout* layout; + int charwidth, charheight; +} IgtkFont; + +static Iarray* gtk_fonts = NULL; +static PangoContext *gtk_fonts_context = NULL; + +static void gtkFontUpdate(IgtkFont* gtkfont) +{ + PangoAttrList *attrs; + + pango_layout_set_font_description(gtkfont->layout, gtkfont->fontdesc); + + attrs = pango_layout_get_attributes(gtkfont->layout); + if (!attrs) + { + attrs = pango_attr_list_new(); + pango_attr_list_insert(attrs, pango_attribute_copy(gtkfont->strikethrough)); + pango_attr_list_insert(attrs, pango_attribute_copy(gtkfont->underline)); + pango_layout_set_attributes(gtkfont->layout, attrs); + } + else + { + pango_attr_list_change(attrs, pango_attribute_copy(gtkfont->strikethrough)); + pango_attr_list_change(attrs, pango_attribute_copy(gtkfont->underline)); + } +} + +static IgtkFont* gtkFindFont(const char *standardfont) +{ + PangoFontMetrics* metrics; + PangoFontDescription* fontdesc; + int i, + is_underline = 0, + is_strikeout = 0, + count = iupArrayCount(gtk_fonts); + + IgtkFont* fonts = (IgtkFont*)iupArrayGetData(gtk_fonts); + + /* Check if the standardfont already exists in cache */ + for (i = 0; i < count; i++) + { + if (iupStrEqualNoCase(standardfont, fonts[i].standardfont)) + return &fonts[i]; + } + + /* not found, create a new one */ + { + int size = 0, is_pango = 0; + int is_bold = 0, + is_italic = 0; + char typeface[1024]; + const char* mapped_name; + + /* parse the old Windows format first */ + if (!iupFontParseWin(standardfont, typeface, &size, &is_bold, &is_italic, &is_underline, &is_strikeout)) + { + if (!iupFontParseX(standardfont, typeface, &size, &is_bold, &is_italic, &is_underline, &is_strikeout)) + { + if (!iupFontParsePango(standardfont, typeface, &size, &is_bold, &is_italic, &is_underline, &is_strikeout)) + return NULL; + else + is_pango = 1; + } + } + + mapped_name = iupFontGetPangoName(typeface); + if (mapped_name) + strcpy(typeface, mapped_name); + + if (is_pango && !is_underline && !is_strikeout && size>0) + fontdesc = pango_font_description_from_string(standardfont); + else + { + char new_standardfont[200]; + if (size<0) + { + double res = ((double)gdk_screen_get_width(gdk_screen_get_default()) / (double)gdk_screen_get_width_mm(gdk_screen_get_default())); /* pixels/mm */ + /* 1 point = 1/72 inch 1 inch = 25.4 mm */ + /* pixel = ((point/72)*25.4)*pixel/mm */ + size = (int)((-size/res)*2.83464567 + 0.5); /* from pixels to points */ + } + + sprintf(new_standardfont, "%s, %s%s%d", typeface, is_bold?"Bold ":"", is_italic?"Italic ":"", size); + + fontdesc = pango_font_description_from_string(new_standardfont); + } + } + + if (!fontdesc) + return NULL; + + /* create room in the array */ + fonts = (IgtkFont*)iupArrayInc(gtk_fonts); + + strcpy(fonts[i].standardfont, standardfont); + fonts[i].fontdesc = fontdesc; + fonts[i].strikethrough = pango_attr_strikethrough_new(is_strikeout? TRUE: FALSE); + fonts[i].underline = pango_attr_underline_new(is_underline? PANGO_UNDERLINE_SINGLE: PANGO_UNDERLINE_NONE); + fonts[i].layout = pango_layout_new(gtk_fonts_context); + + metrics = pango_context_get_metrics(gtk_fonts_context, fontdesc, pango_context_get_language(gtk_fonts_context)); + fonts[i].charheight = pango_font_metrics_get_ascent(metrics) + pango_font_metrics_get_descent(metrics); + fonts[i].charheight = IUPGTK_PANGOUNITS2PIXELS(fonts[i].charheight); + fonts[i].charwidth = pango_font_metrics_get_approximate_char_width(metrics); + fonts[i].charwidth = IUPGTK_PANGOUNITS2PIXELS(fonts[i].charwidth); + pango_font_metrics_unref(metrics); + + gtkFontUpdate(&(fonts[i])); + + return &fonts[i]; +} + +static PangoLayout* gtkFontGetWidgetPangoLayout(Ihandle *ih) +{ + int inherit; + char *def_value; + /* only check the native implementation */ + return (PangoLayout*)iupClassObjectGetAttribute(ih, "PANGOLAYOUT", &def_value, &inherit); +} + +static IgtkFont* gtkFontCreateNativeFont(Ihandle* ih, const char* value) +{ + IgtkFont *gtkfont = gtkFindFont(value); + if (!gtkfont) + { + iupERROR1("Failed to create Font: %s", value); + return NULL; + } + + iupAttribSetStr(ih, "_IUP_GTKFONT", (char*)gtkfont); + return gtkfont; +} + +static IgtkFont* gtkFontGet(Ihandle *ih) +{ + IgtkFont* gtkfont = (IgtkFont*)iupAttribGet(ih, "_IUP_GTKFONT"); + if (!gtkfont) + gtkfont = gtkFontCreateNativeFont(ih, iupGetFontAttrib(ih)); + return gtkfont; +} + +void iupgtkFontUpdatePangoLayout(Ihandle* ih, PangoLayout* layout) +{ + IgtkFont* gtkfont; + PangoAttrList *attrs; + + if (!layout) + return; + + gtkfont = gtkFontGet(ih); + if (!gtkfont) + return; + + attrs = pango_layout_get_attributes(layout); + if (!attrs) + { + attrs = pango_attr_list_new(); + pango_attr_list_insert(attrs, pango_attribute_copy(gtkfont->strikethrough)); + pango_attr_list_insert(attrs, pango_attribute_copy(gtkfont->underline)); + pango_layout_set_attributes(layout, attrs); + } + else + { + pango_attr_list_change(attrs, pango_attribute_copy(gtkfont->strikethrough)); + pango_attr_list_change(attrs, pango_attribute_copy(gtkfont->underline)); + } +} + +void iupgtkFontUpdateObjectPangoLayout(Ihandle* ih, gpointer object) +{ + PangoAttrList *attrs; + + IgtkFont* gtkfont = gtkFontGet(ih); + if (!gtkfont) + return; + + g_object_get(object, "attributes", &attrs, NULL); + if (!attrs) + { + attrs = pango_attr_list_new(); + pango_attr_list_insert(attrs, pango_attribute_copy(gtkfont->strikethrough)); + pango_attr_list_insert(attrs, pango_attribute_copy(gtkfont->underline)); + g_object_set(object, "attributes", attrs, NULL); + } + else + { + pango_attr_list_change(attrs, pango_attribute_copy(gtkfont->strikethrough)); + pango_attr_list_change(attrs, pango_attribute_copy(gtkfont->underline)); + } +} + +char* iupdrvGetSystemFont(void) +{ + static char systemfont[200] = ""; + GtkStyle* style; + GtkWidget* widget = gtk_invisible_new(); + gtk_widget_realize(widget); + style = gtk_widget_get_style(widget); + if (!style || !style->font_desc) + strcpy(systemfont, "Sans, 10"); + else + { + char* desc = pango_font_description_to_string(style->font_desc); + strcpy(systemfont, desc); + g_free(desc); + } + gtk_widget_unrealize(widget); + gtk_widget_destroy(widget); + return systemfont; +} + +char* iupgtkFindPangoFontDesc(PangoFontDescription* fontdesc) +{ + int i, count = iupArrayCount(gtk_fonts); + IgtkFont* fonts = (IgtkFont*)iupArrayGetData(gtk_fonts); + + /* Check if the standardfont already exists in cache */ + for (i = 0; i < count; i++) + { + if (pango_font_description_equal(fontdesc, fonts[i].fontdesc)) + return fonts[i].standardfont; + } + + return NULL; +} + +PangoFontDescription* iupgtkGetPangoFontDesc(const char* value) +{ + IgtkFont *gtkfont = gtkFindFont(value); + if (!gtkfont) + { + iupERROR1("Failed to create Font: %s", value); + return NULL; + } + return gtkfont->fontdesc; +} + +char* iupgtkGetPangoFontDescAttrib(Ihandle *ih) +{ + IgtkFont* gtkfont = gtkFontGet(ih); + if (!gtkfont) + return NULL; + else + return (char*)gtkfont->fontdesc; +} + +char* iupgtkGetFontIdAttrib(Ihandle *ih) +{ + IgtkFont* gtkfont = gtkFontGet(ih); + if (!gtkfont) + return NULL; + else + { + GdkFont* gdk_font = gdk_font_from_description(gtkfont->fontdesc); + return (char*)gdk_font_id(gdk_font); /* In UNIX will return an X Font ID, in Win32 will return an HFONT */ + } +} + +int iupdrvSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + IgtkFont* gtkfont = gtkFontCreateNativeFont(ih, value); + if (!gtkfont) + return 1; + + /* If FONT is changed, must update the SIZE attribute */ + iupBaseUpdateSizeFromFont(ih); + + /* FONT attribute must be able to be set before mapping, + so the font is enable for size calculation. */ + if (ih->handle && (ih->iclass->nativetype != IUP_TYPEVOID)) + { + gtk_widget_modify_font(ih->handle, gtkfont->fontdesc); + iupgtkFontUpdatePangoLayout(ih, gtkFontGetWidgetPangoLayout(ih)); + } + + return 1; +} + +void iupdrvFontGetMultiLineStringSize(Ihandle* ih, const char* str, int *w, int *h) +{ + int max_w; + + IgtkFont* gtkfont = gtkFontGet(ih); + if (!gtkfont) + { + if (w) *w = 0; + if (h) *h = 0; + return; + } + + if (!str) + { + if (w) *w = 0; + if (h) *h = gtkfont->charheight * 1; + return; + } + + max_w = 0; + if (str[0]) + { + int dummy_h; + + pango_layout_set_attributes(gtkfont->layout, NULL); + + if (iupAttribGetBoolean(ih, "MARKUP")) + pango_layout_set_markup(gtkfont->layout, iupgtkStrConvertToUTF8(str), -1); + else + pango_layout_set_text(gtkfont->layout, iupgtkStrConvertToUTF8(str), -1); + + pango_layout_get_pixel_size(gtkfont->layout, &max_w, &dummy_h); + } + + if (w) *w = max_w; + if (h) *h = gtkfont->charheight * iupStrLineCount(str); +} + +int iupdrvFontGetStringWidth(Ihandle* ih, const char* str) +{ + IgtkFont* gtkfont; + int len, w; + char* line_end; + + if (!str || str[0]==0) + return 0; + + gtkfont = gtkFontGet(ih); + if (!gtkfont) + return 0; + + line_end = strchr(str, '\n'); + if (line_end) + len = line_end-str; + else + len = strlen(str); + + if (iupAttribGetBoolean(ih, "MARKUP")) + pango_layout_set_markup(gtkfont->layout, iupgtkStrConvertToUTF8(str), len); + else + pango_layout_set_text(gtkfont->layout, iupgtkStrConvertToUTF8(str), len); + + pango_layout_get_pixel_size(gtkfont->layout, &w, NULL); + return w; +} + +void iupdrvFontGetCharSize(Ihandle* ih, int *charwidth, int *charheight) +{ + IgtkFont* gtkfont = gtkFontGet(ih); + if (!gtkfont) + { + if (charwidth) *charwidth = 0; + if (charheight) *charheight = 0; + return; + } + + if (charheight) + *charheight = gtkfont->charheight; + + if (charwidth) + *charwidth = gtkfont->charwidth; +} + +void iupdrvFontInit(void) +{ + gtk_fonts = iupArrayCreate(50, sizeof(IgtkFont)); + gtk_fonts_context = gdk_pango_context_get(); + pango_context_set_language(gtk_fonts_context, gtk_get_default_language()); +} + +void iupdrvFontFinish(void) +{ + int i, count = iupArrayCount(gtk_fonts); + IgtkFont* fonts = (IgtkFont*)iupArrayGetData(gtk_fonts); + for (i = 0; i < count; i++) + { + pango_font_description_free(fonts[i].fontdesc); + pango_attribute_destroy(fonts[i].strikethrough); + pango_attribute_destroy(fonts[i].underline); + } + iupArrayDestroy(gtk_fonts); + g_object_unref(gtk_fonts_context); +} diff --git a/iup/src/gtk/iupgtk_fontdlg.c b/iup/src/gtk/iupgtk_fontdlg.c new file mode 100755 index 0000000..5769cbc --- /dev/null +++ b/iup/src/gtk/iupgtk_fontdlg.c @@ -0,0 +1,91 @@ +/** \file + * \brief IupFontDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" + +#include "iupgtk_drv.h" + + +static int gtkFontDlgPopup(Ihandle* ih, int x, int y) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + GtkFontSelectionDialog* dialog; + int response; + char* preview_text; + + iupAttribSetInt(ih, "_IUPDLG_X", x); /* used in iupDialogUpdatePosition */ + iupAttribSetInt(ih, "_IUPDLG_Y", y); + + dialog = (GtkFontSelectionDialog*)gtk_font_selection_dialog_new(iupgtkStrConvertToUTF8(iupAttribGet(ih, "TITLE"))); + if (!dialog) + return IUP_ERROR; + + if (parent) + gtk_window_set_transient_for((GtkWindow*)dialog, (GtkWindow*)parent); + + gtk_font_selection_dialog_set_font_name(dialog, iupAttribGet(ih, "VALUE")); + + preview_text = iupAttribGet(ih, "PREVIEWTEXT"); + if (preview_text) + gtk_font_selection_dialog_set_preview_text(dialog, preview_text); + + if (IupGetCallback(ih, "HELP_CB")) + gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_HELP, GTK_RESPONSE_HELP); + + /* initialize the widget */ + gtk_widget_realize(GTK_WIDGET(dialog)); + + ih->handle = GTK_WIDGET(dialog); + iupDialogUpdatePosition(ih); + ih->handle = NULL; + + do + { + response = gtk_dialog_run(GTK_DIALOG(dialog)); + + if (response == GTK_RESPONSE_HELP) + { + Icallback cb = IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + response = GTK_RESPONSE_CANCEL; + } + } while (response == GTK_RESPONSE_HELP); + + if (response == GTK_RESPONSE_OK) + { + char* fontname = gtk_font_selection_dialog_get_font_name(dialog); + iupAttribStoreStr(ih, "VALUE", fontname); + g_free(fontname); + iupAttribSetStr(ih, "STATUS", "1"); + } + else + { + iupAttribSetStr(ih, "VALUE", NULL); + iupAttribSetStr(ih, "STATUS", NULL); + } + + gtk_widget_destroy(GTK_WIDGET(dialog)); + + return IUP_NOERROR; +} + +void iupdrvFontDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = gtkFontDlgPopup; + + /* IupFontDialog GTK Only */ + iupClassRegisterAttribute(ic, "PREVIEWTEXT", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/gtk/iupgtk_frame.c b/iup/src/gtk/iupgtk_frame.c new file mode 100755 index 0000000..022c6c7 --- /dev/null +++ b/iup/src/gtk/iupgtk_frame.c @@ -0,0 +1,155 @@ +/** \file + * \brief Frame Control + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" + +#include "iupgtk_drv.h" + + +void iupdrvFrameGetDecorOffset(Ihandle* ih, int *x, int *y) +{ + (void)ih; + *x = 0; + *y = 0; +} + +static char* gtkFrameGetTitleAttrib(Ihandle* ih) +{ + GtkFrame* frame = (GtkFrame*)ih->handle; + return iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(gtk_frame_get_label(frame))); +} + +static int gtkFrameSetTitleAttrib(Ihandle* ih, const char* value) +{ + GtkFrame* frame = (GtkFrame*)ih->handle; + gtk_frame_set_label(frame, iupgtkStrConvertToUTF8(value)); + return 0; +} + +static int gtkFrameSetBgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + GtkWidget* label = gtk_frame_get_label_widget((GtkFrame*)ih->handle); + + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + if (label) + iupgtkBaseSetBgColor(label, r, g, b); + + iupgtkBaseSetBgColor(ih->handle, r, g, b); + + return 1; +} + +static int gtkFrameSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + GtkWidget* label = gtk_frame_get_label_widget((GtkFrame*)ih->handle); + if (!label) return 0; + + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgtkBaseSetFgColor(label, r, g, b); + + return 1; +} + +static int gtkFrameSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + iupdrvSetStandardFontAttrib(ih, value); + + if (ih->handle) + { + GtkWidget* label = gtk_frame_get_label_widget((GtkFrame*)ih->handle); + if (!label) return 1; + + gtk_widget_modify_font(label, (PangoFontDescription*)iupgtkGetPangoFontDescAttrib(ih)); + iupgtkFontUpdatePangoLayout(ih, gtk_label_get_layout((GtkLabel*)label)); + } + return 1; +} + +static void* gtkFrameGetInnerNativeContainerHandleMethod(Ihandle* ih, Ihandle* child) +{ + (void)child; + return (void*)gtk_bin_get_child((GtkBin*)ih->handle); +} + +static int gtkFrameMapMethod(Ihandle* ih) +{ + char *value, *title; + GtkWidget *fixed; + + if (!ih->parent) + return IUP_ERROR; + + title = iupAttribGet(ih, "TITLE"); + + ih->handle = gtk_frame_new(NULL); + if (!ih->handle) + return IUP_ERROR; + + if (title) + iupAttribSetStr(ih, "_IUPFRAME_HAS_TITLE", "1"); + else + { + value = iupAttribGetStr(ih, "SUNKEN"); + if (iupStrBoolean(value)) + gtk_frame_set_shadow_type((GtkFrame*)ih->handle, GTK_SHADOW_IN); + else + gtk_frame_set_shadow_type((GtkFrame*)ih->handle, GTK_SHADOW_ETCHED_IN); + } + + /* the container that will receive the child element. */ + fixed = gtk_fixed_new(); + gtk_container_add((GtkContainer*)ih->handle, fixed); + gtk_widget_show(fixed); + + /* Add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + gtk_widget_realize(ih->handle); + + return IUP_NOERROR; +} + +void iupdrvFrameInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkFrameMapMethod; + ic->GetInnerNativeContainerHandle = gtkFrameGetInnerNativeContainerHandleMethod; + + /* Driver Dependent Attribute functions */ + + /* Overwrite Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, gtkFrameSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, gtkFrameSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, gtkFrameSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "TITLE", gtkFrameGetTitleAttrib, gtkFrameSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); +} diff --git a/iup/src/gtk/iupgtk_globalattrib.c b/iup/src/gtk/iupgtk_globalattrib.c new file mode 100755 index 0000000..eebe799 --- /dev/null +++ b/iup/src/gtk/iupgtk_globalattrib.c @@ -0,0 +1,211 @@ +/** \file + * \brief GTK Driver iupdrvSetGlobal + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvinfo.h" +#include "iup_strmessage.h" + +#include "iupgtk_drv.h" + + +int iupgtk_utf8autoconvert = 1; + +static void gtkGlobalSendKey(int key, int press) +{ + Ihandle* focus; + gint nkeys = 0; + GdkKeymapKey *keys; + GdkEventKey evt; + memset(&evt, 0, sizeof(GdkEventKey)); + evt.send_event = TRUE; + + focus = IupGetFocus(); + if (!focus) + return; + evt.window = focus->handle->window; + + iupgtkKeyEncode(key, &evt.keyval, &evt.state); + if (!evt.keyval) + return; + + if (!gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), evt.keyval, &keys, &nkeys)) + return; + evt.hardware_keycode = (guint16)keys[0].keycode; + evt.group = (guint8)keys[0].group; + + if (press & 0x01) + { + evt.type = GDK_KEY_PRESS; + gdk_display_put_event(gdk_display_get_default(), (GdkEvent*)&evt); + } + + if (press & 0x02) + { + evt.type = GDK_KEY_RELEASE; + gdk_display_put_event(gdk_display_get_default(), (GdkEvent*)&evt); + } +} + +int iupdrvSetGlobal(const char *name, const char *value) +{ + if (iupStrEqual(name, "LANGUAGE")) + { + iupStrMessageUpdateLanguage(value); + return 1; + } + if (iupStrEqual(name, "CURSORPOS")) + { +#if GTK_CHECK_VERSION(2, 8, 0) + int x, y; + if (iupStrToIntInt(value, &x, &y, 'x') == 2) + gdk_display_warp_pointer(gdk_display_get_default(), gdk_screen_get_default(), x, y); +#endif + return 0; + } + if (iupStrEqual(name, "UTF8AUTOCONVERT")) + { + if (!value || iupStrBoolean(value)) + iupgtk_utf8autoconvert = 1; + else + iupgtk_utf8autoconvert = 0; + return 0; + } + if (iupStrEqual(name, "KEYPRESS")) + { + int key; + if (iupStrToInt(value, &key)) + gtkGlobalSendKey(key, 0x01); + return 0; + } + if (iupStrEqual(name, "KEYRELEASE")) + { + int key; + if (iupStrToInt(value, &key)) + gtkGlobalSendKey(key, 0x02); + return 0; + } + if (iupStrEqual(name, "KEY")) + { + int key; + if (iupStrToInt(value, &key)) + gtkGlobalSendKey(key, 0x03); + return 0; + } + return 1; +} + +char *iupdrvGetGlobal(const char *name) +{ + if (iupStrEqual(name, "CURSORPOS")) + { + char *str = iupStrGetMemory(50); + int x, y; + iupdrvGetCursorPos(&x, &y); + sprintf(str, "%dx%d", (int)x, (int)y); + return str; + } + if (iupStrEqual(name, "SHIFTKEY")) + { + char key[5]; + iupdrvGetKeyState(key); + if (key[0] == 'S') + return "ON"; + else + return "OFF"; + } + if (iupStrEqual(name, "CONTROLKEY")) + { + char key[5]; + iupdrvGetKeyState(key); + if (key[1] == 'C') + return "ON"; + else + return "OFF"; + } + if (iupStrEqual(name, "MODKEYSTATE")) + { + char *str = iupStrGetMemory(5); + iupdrvGetKeyState(str); + return str; + } + if (iupStrEqual(name, "SCREENSIZE")) + { + char *str = iupStrGetMemory(50); + int w, h; + iupdrvGetScreenSize(&w, &h); + sprintf(str, "%dx%d", w, h); + return str; + } + if (iupStrEqual(name, "FULLSIZE")) + { + char *str = iupStrGetMemory(50); + int w, h; + iupdrvGetFullSize(&w, &h); + sprintf(str, "%dx%d", w, h); + return str; + } + if (iupStrEqual(name, "SCREENDEPTH")) + { + char *str = iupStrGetMemory(50); + int bpp = iupdrvGetScreenDepth(); + sprintf(str, "%d", bpp); + return str; + } + if (iupStrEqual(name, "VIRTUALSCREEN")) + { + char *str = iupStrGetMemory(50); + GdkScreen *screen = gdk_screen_get_default(); + GdkWindow *root = gdk_screen_get_root_window(gdk_screen_get_default()); + int x = 0; + int y = 0; + int w = gdk_screen_get_width(screen); + int h = gdk_screen_get_height(screen); + gdk_window_get_root_origin(root, &x, &y); + sprintf(str, "%d %d %d %d", x, y, w, h); + return str; + } + if (iupStrEqual(name, "MONITORSINFO")) + { + int i; + GdkScreen *screen = gdk_screen_get_default(); + int monitors_count = gdk_screen_get_n_monitors(screen); + char *str = iupStrGetMemory(monitors_count*50); + char* pstr = str; + GdkRectangle rect; + + for (i=0; i < monitors_count; i++) + { + gdk_screen_get_monitor_geometry(screen, i, &rect); + pstr += sprintf(pstr, "%d %d %d %d\n", rect.x, rect.y, rect.width, rect.height); + } + + return str; + } + if (iupStrEqual(name, "TRUECOLORCANVAS")) + { + if (gdk_visual_get_best_depth() > 8) + return "YES"; + else + return "NO"; + } + if (iupStrEqual(name, "UTF8AUTOCONVERT")) + { + if (iupgtk_utf8autoconvert) + return "YES"; + else + return "NO"; + } + return NULL; +} diff --git a/iup/src/gtk/iupgtk_help.c b/iup/src/gtk/iupgtk_help.c new file mode 100755 index 0000000..270677f --- /dev/null +++ b/iup/src/gtk/iupgtk_help.c @@ -0,0 +1,52 @@ +/** \file + * \brief GTK Driver IupHelp for non Windows systems + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include + +#include "iup.h" + +#include "iup_str.h" + +int IupHelp(const char *url) +{ + GError *error = NULL; + gchar *argv[3]; + int ret; + char *browser = getenv("IUP_HELPAPP"); + if (!browser) + browser = IupGetGlobal("HELPAPP"); + + if (!browser) + { + char* system = IupGetGlobal("SYSTEM"); + if (iupStrEqualNoCase(system, "Linux") || + iupStrEqualNoCase(system, "FreeBSD")) + browser = "firefox"; + else if (iupStrEqualNoCase(system, "Darwin")) + browser = "safari"; + else if (iupStrEqualPartial(system, "CYGWIN")) + browser = "iexplore"; + else + browser = "netscape"; + } + + argv[0] = browser; + argv[1] = (gchar*)url; + argv[2] = NULL; + + ret = g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error); + + if (error) + g_error_free(error); + + if (!ret) + return -1; + return 1; +} diff --git a/iup/src/gtk/iupgtk_image.c b/iup/src/gtk/iupgtk_image.c new file mode 100755 index 0000000..b261974 --- /dev/null +++ b/iup/src/gtk/iupgtk_image.c @@ -0,0 +1,430 @@ +/** \file + * \brief Image Resource. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" +#include "iup_drvinfo.h" + +#include "iupgtk_drv.h" + + +void iupdrvImageGetRawData(void* handle, unsigned char* imgdata) +{ + GdkPixbuf* pixbuf = (GdkPixbuf*)handle; + int w, h, y, x, bpp; + guchar *pixdata, *pixline_data; + int rowstride, channels, planesize; + unsigned char *r, *g, *b, *a; + + if (!iupdrvImageGetInfo(handle, &w, &h, &bpp)) + return; + + if (bpp==8) + return; + + pixdata = gdk_pixbuf_get_pixels(pixbuf); + rowstride = gdk_pixbuf_get_rowstride(pixbuf); + channels = gdk_pixbuf_get_n_channels(pixbuf); + + /* planes are separated in imgdata */ + planesize = w*h; + r = imgdata; + g = imgdata+planesize; + b = imgdata+2*planesize; + a = imgdata+3*planesize; + for (y=0; yr; + *g = c->g; + *b = c->b; + } + } + } + else /* bpp == 32 or bpp == 24 */ + { + /* planes are separated in imgdata */ + int planesize = width*height; + unsigned char *r = imgdata, + *g = imgdata+planesize, + *b = imgdata+2*planesize, + *a = imgdata+3*planesize; + for (y=0; ycurrentwidth, ih->currentheight); + if (!pixbuf) + return NULL; + + pixdata = gdk_pixbuf_get_pixels(pixbuf); + rowstride = gdk_pixbuf_get_rowstride(pixbuf); + channels = gdk_pixbuf_get_n_channels(pixbuf); + imgdata = (unsigned char*)iupAttribGetStr(ih, "WID"); + + if (make_inactive) + iupStrToRGB(bgcolor, &bg_r, &bg_g, &bg_b); + + if (bpp == 8) + { + if (make_inactive) + { + for (i=0;icurrentheight; y++) + { + pixline_data = pixdata + y * rowstride; + line_data = imgdata + y * ih->currentwidth; + + for (x=0; xcurrentwidth; x++) + { + unsigned char index = line_data[x]; + iupColor* c = &colors[index]; + guchar *r = &pixline_data[channels*x], + *g = r+1, + *b = g+1, + *a = b+1; + + *r = c->r; + *g = c->g; + *b = c->b; + + if (has_alpha) + *a = c->a; + } + } + } + else /* bpp == 32 or bpp == 24 */ + { + for (y=0; ycurrentheight; y++) + { + pixline_data = pixdata + y * rowstride; + line_data = imgdata + y * ih->currentwidth*channels; + + memcpy(pixline_data, line_data, ih->currentwidth*channels); + + if (make_inactive) + { + for (x=0; xcurrentwidth; x++) + { + guchar *r = &pixline_data[channels*x], + *g = r+1, + *b = g+1, + *a = b+1; + + if (has_alpha) + { + if (*a != 255) + { + *r = iupALPHABLEND(*r, bg_r, *a); + *g = iupALPHABLEND(*g, bg_g, *a); + *b = iupALPHABLEND(*b, bg_b, *a); + } + else + *a = 255; + } + + iupImageColorMakeInactive(r, g, b, + bg_r, bg_g, bg_b); + } + } + } + } + + return pixbuf; +} + +void* iupdrvImageCreateIcon(Ihandle *ih) +{ + return iupdrvImageCreateImage(ih, NULL, 0); +} + +void* iupdrvImageCreateCursor(Ihandle *ih) +{ + GdkCursor *cursor; + int hx, hy, bpp; + + hx=0; hy=0; + iupStrToIntInt(iupAttribGet(ih, "HOTSPOT"), &hx, &hy, ':'); + + bpp = iupAttribGetInt(ih, "BPP"); + + if (bpp == 8 && !iupAttribGet(ih, "3")) + { + GdkPixmap *source, *mask; + GdkColor fg, bg; + unsigned char r, g, b; + char *sbits, *mbits, *sb, *mb; + int y, x, line_size = (ih->currentwidth+7)/8; + int size_bytes = line_size*ih->currentheight; + unsigned char* imgdata = (unsigned char*)iupAttribGetStr(ih, "WID"); + + r = 255; g = 255; b = 255; + iupStrToRGB(iupAttribGet(ih, "1"), &r, &g, &b ); + iupgdkColorSet(&fg, r, g, b); + + r = 0; g = 0; b = 0; + iupStrToRGB(iupAttribGet(ih, "2"), &r, &g, &b ); + iupgdkColorSet(&bg, r, g, b); + + sbits = (char*)malloc(2*size_bytes); + if (!sbits) return NULL; + memset(sbits, 0, 2*size_bytes); + mbits = sbits + size_bytes; + + sb = sbits; + mb = mbits; + for (y=0; ycurrentheight; y++) + { + for (x=0; xcurrentwidth; x++) + { + int byte = x/8; + int bit = x%8; + int index = (int)imgdata[y*ih->currentwidth+x]; + /* index==0 is transparent */ + if (index == 1) + sb[byte] = (char)(sb[byte] | (1<currentwidth, ih->currentheight); + mask = gdk_bitmap_create_from_data(NULL, mbits, ih->currentwidth, ih->currentheight); + + cursor = gdk_cursor_new_from_pixmap(source, mask, &fg, &bg, hx, hy); + + gdk_pixmap_unref(source); + gdk_pixmap_unref(mask); + free(sbits); + } + else + { + GdkPixbuf* pixbuf = iupdrvImageCreateImage(ih, NULL, 0); + cursor = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf, hx, hy); + g_object_unref(pixbuf); + } + + return cursor; +} + +void* iupdrvImageCreateMask(Ihandle *ih) +{ + int bpp; + GdkPixmap *mask; + char *bits, *sb; + int y, x, line_size = (ih->currentwidth+7)/8; + int size_bytes = line_size*ih->currentheight; + unsigned char* imgdata = (unsigned char*)iupAttribGetStr(ih, "WID"); + unsigned char colors[256]; + + bpp = iupAttribGetInt(ih, "BPP"); + if (bpp > 8) + return NULL; + + bits = (char*)malloc(size_bytes); + if (!bits) return NULL; + memset(bits, 0, size_bytes); + + iupImageInitNonBgColors(ih, colors); + + sb = bits; + for (y=0; ycurrentheight; y++) + { + for (x=0; xcurrentwidth; x++) + { + int byte = x/8; + int bit = x%8; + int index = (int)imgdata[y*ih->currentwidth+x]; + if (colors[index]) + sb[byte] = (char)(sb[byte] | (1<currentwidth, ih->currentheight); + + free(bits); + + return mask; +} + +void* iupdrvImageLoad(const char* name, int type) +{ + if (type == IUPIMAGE_CURSOR) +#if GTK_CHECK_VERSION(2, 8, 0) + return gdk_cursor_new_from_name(gdk_display_get_default(), name); +#else + return NULL; +#endif + else + { + GtkIconTheme *icon_theme; + GdkPixbuf *pixbuf = NULL; + + icon_theme = gtk_icon_theme_get_default(); + if (gtk_icon_theme_has_icon(icon_theme, name)) + { + GError *error = NULL; + pixbuf = gtk_icon_theme_load_icon(icon_theme, name, + 24, /* size */ + 0, /* flags */ + &error); + if (error) + g_error_free(error); + } + + if (!pixbuf) + { + GError *error = NULL; + pixbuf = gdk_pixbuf_new_from_file(name, &error); + if (error) + g_error_free(error); + } + + return pixbuf; + } +} + +int iupdrvImageGetInfo(void* handle, int *w, int *h, int *bpp) +{ + GdkPixbuf* pixbuf = (GdkPixbuf*)handle; + if (!GDK_IS_PIXBUF(pixbuf)) + { + if (w) *w = 0; + if (h) *h = 0; + if (bpp) *bpp = 0; + return 0; + } + if (w) *w = gdk_pixbuf_get_width(pixbuf); + if (h) *h = gdk_pixbuf_get_height(pixbuf); + if (bpp) *bpp = iupImageNormBpp(gdk_pixbuf_get_bits_per_sample(pixbuf)*gdk_pixbuf_get_n_channels(pixbuf)); + return 1; +} + +int iupdrvImageGetRawInfo(void* handle, int *w, int *h, int *bpp, iupColor* colors, int *colors_count) +{ + /* GdkPixbuf are only 24 bpp or 32 bpp */ + (void)colors; + (void)colors_count; + return iupdrvImageGetInfo(handle, w, h, bpp); +} + +void iupdrvImageDestroy(void* handle, int type) +{ + if (type == IUPIMAGE_CURSOR) + gdk_cursor_unref((GdkCursor*)handle); + else + g_object_unref(handle); +} diff --git a/iup/src/gtk/iupgtk_key.c b/iup/src/gtk/iupgtk_key.c new file mode 100755 index 0000000..5aec919 --- /dev/null +++ b/iup/src/gtk/iupgtk_key.c @@ -0,0 +1,422 @@ +/** \file + * \brief GTK Driver keyboard mapping + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include "iup_object.h" +#include "iup_key.h" + +#include "iupgtk_drv.h" + + +typedef struct _Igtk2iupkey +{ + guint gtkcode; + int iupcode; + int s_iupcode; + int c_iupcode; + int m_iupcode; + int y_iupcode; +} Igtk2iupkey; + +static Igtk2iupkey gtkkey_map[] = { + +{ GDK_Escape, K_ESC, K_sESC, K_cESC, K_mESC ,K_yESC }, +{ GDK_Pause, K_PAUSE, K_sPAUSE, K_cPAUSE, K_mPAUSE ,K_yPAUSE }, +{ GDK_Print, K_Print, K_sPrint, K_cPrint, K_mPrint ,K_yPrint }, +{ GDK_Menu, K_Menu, K_sMenu, K_cMenu, K_mMenu ,K_yMenu }, + +{ GDK_Home, K_HOME, K_sHOME, K_cHOME, K_mHOME ,K_yHOME }, +{ GDK_Up, K_UP, K_sUP, K_cUP, K_mUP ,K_yUP }, +{ GDK_Prior, K_PGUP, K_sPGUP, K_cPGUP, K_mPGUP ,K_yPGUP }, +{ GDK_Left, K_LEFT, K_sLEFT, K_cLEFT, K_mLEFT ,K_yLEFT }, +{ GDK_Begin, K_MIDDLE,K_sMIDDLE, K_cMIDDLE,K_mMIDDLE,K_yMIDDLE}, +{ GDK_Right, K_RIGHT, K_sRIGHT, K_cRIGHT, K_mRIGHT ,K_yRIGHT }, +{ GDK_End, K_END, K_sEND, K_cEND, K_mEND ,K_yEND }, +{ GDK_Down, K_DOWN, K_sDOWN, K_cDOWN, K_mDOWN ,K_yDOWN }, +{ GDK_Next, K_PGDN, K_sPGDN, K_cPGDN, K_mPGDN ,K_yPGDN }, +{ GDK_Insert, K_INS, K_sINS, K_cINS, K_mINS ,K_yINS }, +{ GDK_Delete, K_DEL, K_sDEL, K_cDEL, K_mDEL ,K_yDEL }, +{ GDK_space, K_SP, K_sSP, K_cSP, K_mSP ,K_ySP }, +{ GDK_Tab, K_TAB, K_sTAB, K_cTAB, K_mTAB ,K_yTAB }, +{ GDK_Return, K_CR, K_sCR, K_cCR, K_mCR ,K_yCR }, +{ GDK_BackSpace, K_BS, K_sBS, K_cBS, K_mBS ,K_yBS }, + +{ GDK_1, K_1, K_exclam, K_c1, K_m1, K_y1 }, +{ GDK_2, K_2, K_at, K_c2, K_m2, K_y2 }, +{ GDK_3, K_3, K_numbersign, K_c3, K_m3, K_y3 }, +{ GDK_4, K_4, K_dollar, K_c4, K_m4, K_y4 }, +{ GDK_5, K_5, K_percent, K_c5, K_m5, K_y5 }, +{ GDK_6, K_6, K_circum, K_c6, K_m6, K_y6 }, +{ GDK_7, K_7, K_ampersand, K_c7, K_m7, K_y7 }, +{ GDK_8, K_8, K_asterisk, K_c8, K_m8, K_y8 }, +{ GDK_9, K_9, K_parentleft, K_c9, K_m9, K_y9 }, +{ GDK_0, K_0, K_parentright, K_c0, K_m0, K_y0 }, + +/* Shift will be flaged so s_iupcode will contain the right code */ +{ GDK_exclam, K_1, K_exclam, K_c1, K_m1, K_y1 }, +{ GDK_at, K_2, K_at, K_c2, K_m2, K_y2 }, +{ GDK_numbersign, K_3, K_numbersign, K_c3, K_m3, K_y3 }, +{ GDK_dollar, K_4, K_dollar, K_c4, K_m4, K_y4 }, +{ GDK_percent, K_5, K_percent, K_c5, K_m5, K_y5 }, +{ GDK_dead_diaeresis, K_6, K_circum, K_c6, K_m6, K_y6 }, +{ GDK_ampersand, K_7, K_ampersand, K_c7, K_m7, K_y7 }, +{ GDK_asterisk, K_8, K_asterisk, K_c8, K_m8, K_y8 }, +{ GDK_parenleft, K_9, K_parentleft, K_c9, K_m9, K_y9 }, +{ GDK_parenright, K_0, K_parentright, K_c0, K_m0, K_y0 }, + +{ GDK_a, K_a, K_A, K_cA, K_mA, K_yA }, +{ GDK_b, K_b, K_B, K_cB, K_mB, K_yB }, +{ GDK_c, K_c, K_C, K_cC, K_mC, K_yC }, +{ GDK_d, K_d, K_D, K_cD, K_mD, K_yD }, +{ GDK_e, K_e, K_E, K_cE, K_mE, K_yE }, +{ GDK_f, K_f, K_F, K_cF, K_mF, K_yF }, +{ GDK_g, K_g, K_G, K_cG, K_mG, K_yG }, +{ GDK_h, K_h, K_H, K_cH, K_mH, K_yH }, +{ GDK_i, K_i, K_I, K_cI, K_mI, K_yI }, +{ GDK_j, K_j, K_J, K_cJ, K_mJ, K_yJ }, +{ GDK_k, K_k, K_K, K_cK, K_mK, K_yK }, +{ GDK_l, K_l, K_L, K_cL, K_mL, K_yL }, +{ GDK_m, K_m, K_M, K_cM, K_mM, K_yM }, +{ GDK_n, K_n, K_N, K_cN, K_mN, K_yN }, +{ GDK_o, K_o, K_O, K_cO, K_mO, K_yO }, +{ GDK_p, K_p, K_P, K_cP, K_mP, K_yP }, +{ GDK_q, K_q, K_Q, K_cQ, K_mQ, K_yQ }, +{ GDK_r, K_r, K_R, K_cR, K_mR, K_yR }, +{ GDK_s, K_s, K_S, K_cS, K_mS, K_yS }, +{ GDK_t, K_t, K_T, K_cT, K_mT, K_yT }, +{ GDK_u, K_u, K_U, K_cU, K_mU, K_yU }, +{ GDK_v, K_v, K_V, K_cV, K_mV, K_yV }, +{ GDK_w, K_w, K_W, K_cW, K_mW, K_yW }, +{ GDK_x, K_x, K_X, K_cX, K_mX, K_yX }, +{ GDK_y, K_y, K_Y, K_cY, K_mY, K_yY }, +{ GDK_z, K_z, K_Z, K_cZ, K_mZ, K_yZ }, + +/* Shift will be flaged so s_iupcode will contain the right code */ +{ GDK_A, K_a, K_A, K_cA, K_mA, K_yA }, +{ GDK_B, K_b, K_B, K_cB, K_mB, K_yB }, +{ GDK_C, K_c, K_C, K_cC, K_mC, K_yC }, +{ GDK_D, K_d, K_D, K_cD, K_mD, K_yD }, +{ GDK_E, K_e, K_E, K_cE, K_mE, K_yE }, +{ GDK_F, K_f, K_F, K_cF, K_mF, K_yF }, +{ GDK_G, K_g, K_G, K_cG, K_mG, K_yG }, +{ GDK_H, K_h, K_H, K_cH, K_mH, K_yH }, +{ GDK_I, K_i, K_I, K_cI, K_mI, K_yI }, +{ GDK_J, K_j, K_J, K_cJ, K_mJ, K_yJ }, +{ GDK_K, K_k, K_K, K_cK, K_mK, K_yK }, +{ GDK_L, K_l, K_L, K_cL, K_mL, K_yL }, +{ GDK_M, K_m, K_M, K_cM, K_mM, K_yM }, +{ GDK_N, K_n, K_N, K_cN, K_mN, K_yN }, +{ GDK_O, K_o, K_O, K_cO, K_mO, K_yO }, +{ GDK_P, K_p, K_P, K_cP, K_mP, K_yP }, +{ GDK_Q, K_q, K_Q, K_cQ, K_mQ, K_yQ }, +{ GDK_R, K_r, K_R, K_cR, K_mR, K_yR }, +{ GDK_S, K_s, K_S, K_cS, K_mS, K_yS }, +{ GDK_T, K_t, K_T, K_cT, K_mT, K_yT }, +{ GDK_U, K_u, K_U, K_cU, K_mU, K_yU }, +{ GDK_V, K_v, K_V, K_cV, K_mV, K_yV }, +{ GDK_W, K_w, K_W, K_cW, K_mW, K_yW }, +{ GDK_X, K_x, K_X, K_cX, K_mX, K_yX }, +{ GDK_Y, K_y, K_Y, K_cY, K_mY, K_yY }, +{ GDK_Z, K_z, K_Z, K_cZ, K_mZ, K_yZ }, + +{ GDK_F1, K_F1, K_sF1, K_cF1, K_mF1, K_yF1 }, +{ GDK_F2, K_F2, K_sF2, K_cF2, K_mF2, K_yF2 }, +{ GDK_F3, K_F3, K_sF3, K_cF3, K_mF3, K_yF3 }, +{ GDK_F4, K_F4, K_sF4, K_cF4, K_mF4, K_yF4 }, +{ GDK_F5, K_F5, K_sF5, K_cF5, K_mF5, K_yF5 }, +{ GDK_F6, K_F6, K_sF6, K_cF6, K_mF6, K_yF6 }, +{ GDK_F7, K_F7, K_sF7, K_cF7, K_mF7, K_yF7 }, +{ GDK_F8, K_F8, K_sF8, K_cF8, K_mF8, K_yF8 }, +{ GDK_F9, K_F9, K_sF9, K_cF9, K_mF9, K_yF9 }, +{ GDK_F10, K_F10, K_sF10, K_cF10, K_mF10, K_yF10 }, +{ GDK_F11, K_F11, K_sF11, K_cF11, K_mF11, K_yF11 }, +{ GDK_F12, K_F12, K_sF12, K_cF12, K_mF12, K_yF12 }, + +{ GDK_semicolon, K_semicolon, K_colon, K_cSemicolon, K_mSemicolon, K_ySemicolon }, +{ GDK_equal, K_equal, K_plus, K_cEqual, K_mEqual, K_yEqual }, +{ GDK_comma, K_comma, K_less, K_cComma, K_mComma, K_yComma }, +{ GDK_minus, K_minus, K_underscore, K_cMinus, K_mMinus, K_yMinus }, +{ GDK_period, K_period, K_greater, K_cPeriod, K_mPeriod, K_yPeriod }, +{ GDK_slash, K_slash, K_question, K_cSlash, K_mSlash, K_ySlash }, +{ GDK_grave, K_grave, K_tilde, 0, 0, 0 }, +{ GDK_bracketleft, K_bracketleft, K_braceleft, K_cBracketleft, K_mBracketleft, K_yBracketleft }, +{ GDK_backslash, K_backslash, K_bar, K_cBackslash, K_mBackslash, K_yBackslash }, +{ GDK_bracketright,K_bracketright, K_braceright, K_cBracketright,K_mBracketright,K_yBracketright }, +{ GDK_apostrophe, K_apostrophe, K_quotedbl, 0, 0, 0 }, + +/* Shift will be flaged so s_iupcode will contain the right code */ +{ GDK_colon, K_semicolon, K_colon, K_cSemicolon, K_mSemicolon, K_ySemicolon }, +{ GDK_plus, K_equal, K_plus, K_cEqual, K_mEqual, K_yEqual }, +{ GDK_less, K_comma, K_less, K_cComma, K_mComma, K_yComma }, +{ GDK_underscore, K_minus, K_underscore, K_cMinus, K_mMinus, K_yMinus }, +{ GDK_greater, K_period, K_greater, K_cPeriod, K_mPeriod, K_yPeriod }, +{ GDK_question, K_slash, K_question, K_cSlash, K_mSlash, K_ySlash }, +{ GDK_braceleft, K_bracketleft, K_braceleft, K_cBracketleft, K_mBracketleft, K_yBracketleft }, +{ GDK_bar, K_backslash, K_bar, K_cBackslash, K_mBackslash, K_yBackslash }, +{ GDK_braceright, K_bracketright, K_braceright, K_cBracketright,K_mBracketright,K_yBracketright }, +{ GDK_quotedbl, K_apostrophe, K_quotedbl, 0, 0, 0 }, + +{ GDK_KP_0, K_0, K_0, K_c0, K_m0, K_y0 }, +{ GDK_KP_1, K_1, K_1, K_c1, K_m1, K_y1 }, +{ GDK_KP_2, K_2, K_2, K_c2, K_m2, K_y2 }, +{ GDK_KP_3, K_3, K_3, K_c3, K_m3, K_y3 }, +{ GDK_KP_4, K_4, K_4, K_c4, K_m4, K_y4 }, +{ GDK_KP_5, K_5, K_5, K_c5, K_m5, K_y5 }, +{ GDK_KP_6, K_6, K_6, K_c6, K_m6, K_y6 }, +{ GDK_KP_7, K_7, K_7, K_c7, K_m7, K_y7 }, +{ GDK_KP_8, K_8, K_8, K_c8, K_m8, K_y8 }, +{ GDK_KP_9, K_9, K_9, K_c9, K_m9, K_y9 }, +{ GDK_KP_Multiply, K_asterisk, K_sAsterisk, K_cAsterisk, K_mAsterisk, K_yAsterisk }, +{ GDK_KP_Add, K_plus, K_sPlus, K_cPlus, K_mPlus, K_yPlus }, +{ GDK_KP_Subtract, K_minus, K_sMinus, K_cMinus, K_mMinus, K_yMinus }, +{ GDK_KP_Decimal, K_period, K_sPeriod, K_cPeriod, K_mPeriod, K_yPeriod }, +{ GDK_KP_Divide, K_slash, K_sSlash, K_cSlash, K_mSlash, K_ySlash }, +{ GDK_KP_Separator, K_comma, K_sComma, K_cComma, K_mComma, K_yComma }, + +{ GDK_ccedilla, K_ccedilla, K_Ccedilla, K_cCcedilla, K_mCcedilla, K_yCcedilla }, +{ GDK_Ccedilla, K_ccedilla, K_Ccedilla, K_cCcedilla, K_mCcedilla, K_yCcedilla }, + +{ GDK_dead_tilde, K_tilde, K_circum, 0, 0, 0 }, +{ GDK_dead_acute, K_acute, K_grave, 0, 0, 0 }, +{ GDK_dead_grave, K_grave, K_tilde, 0, 0, 0 }, +{ GDK_dead_circumflex, K_tilde, K_circum, 0, 0, 0 }, + +{ GDK_KP_F1, K_F1, K_sF1, K_cF1, K_mF1, K_yF1 }, +{ GDK_KP_F2, K_F2, K_sF2, K_cF2, K_mF2, K_yF2 }, +{ GDK_KP_F3, K_F3, K_sF3, K_cF3, K_mF3, K_yF3 }, +{ GDK_KP_F4, K_F4, K_sF4, K_cF4, K_mF4, K_yF4 }, +{ GDK_KP_Space, K_SP, K_sSP, K_cSP, K_mSP ,K_ySP }, +{ GDK_KP_Tab, K_TAB, K_sTAB, K_cTAB, K_mTAB ,K_yTAB }, +{ GDK_KP_Equal, K_equal, 0, K_cEqual, K_mEqual, K_yEqual }, + +{ GDK_KP_Enter, K_CR, K_sCR, K_cCR, K_mCR, K_yCR }, +{ GDK_KP_Home, K_HOME, K_sHOME, K_cHOME, K_mHOME, K_yHOME }, +{ GDK_KP_Up, K_UP, K_sUP, K_cUP, K_mUP, K_yUP }, +{ GDK_KP_Page_Up, K_PGUP, K_sPGUP, K_cPGUP, K_mPGUP, K_yPGUP }, +{ GDK_KP_Left, K_LEFT, K_sLEFT, K_cLEFT, K_mLEFT, K_yLEFT }, +{ GDK_KP_Begin, K_MIDDLE,K_sMIDDLE, K_cMIDDLE,K_mMIDDLE,K_yMIDDLE}, +{ GDK_KP_Right, K_RIGHT, K_sRIGHT, K_cRIGHT, K_mRIGHT, K_yRIGHT }, +{ GDK_KP_End, K_END, K_sEND, K_cEND, K_mEND, K_yEND }, +{ GDK_KP_Down, K_DOWN, K_sDOWN, K_cDOWN, K_mDOWN, K_yDOWN }, +{ GDK_KP_Page_Down, K_PGDN, K_sPGDN, K_cPGDN, K_mPGDN, K_yPGDN }, +{ GDK_KP_Insert, K_INS, K_sINS, K_cINS, K_mINS, K_yINS }, +{ GDK_KP_Delete, K_DEL, K_sDEL, K_cDEL, K_mDEL, K_yDEL } + +}; + +void iupgtkKeyEncode(int key, guint *keyval, guint *state) +{ + int i, iupcode = key & 0xFF; /* 0-255 interval */ + int count = sizeof(gtkkey_map)/sizeof(gtkkey_map[0]); + for (i = 0; i < count; i++) + { + Igtk2iupkey* key_map = &(gtkkey_map[i]); + if (key_map->iupcode == iupcode) + { + *keyval = key_map->gtkcode; + *state = 0; + + if (iupcode != key) + { + if (key_map->c_iupcode == key) + *state = GDK_CONTROL_MASK; + else if (key_map->m_iupcode == key) + *state = GDK_MOD1_MASK; + else if (key_map->y_iupcode == key) + *state = GDK_MOD4_MASK; + else if (key_map->s_iupcode == key) + *state = GDK_SHIFT_MASK; + } + return; + } + else if (key_map->s_iupcode == key) /* There are Shift keys bellow 256 */ + { + *keyval = key_map->gtkcode; + *state = GDK_SHIFT_MASK; + + if ((*keyval >= GDK_a) && + (*keyval <= GDK_z)) + { + /* remap to upper case */ + *keyval -= GDK_a-GDK_A; + } + return; + } + } +} + +static int gtkKeyMap2Iup(int state, int i) +{ + int code = 0; + if (state & GDK_CONTROL_MASK) /* Ctrl */ + code = gtkkey_map[i].c_iupcode; + else if (state & GDK_MOD1_MASK || + state & GDK_MOD5_MASK) /* Alt */ + code = gtkkey_map[i].m_iupcode; + else if (state & GDK_MOD4_MASK) /* Apple/Win */ + code = gtkkey_map[i].y_iupcode; + else if (state & GDK_LOCK_MASK) /* CapsLock */ + { + if ((state & GDK_SHIFT_MASK) || !iupKeyCanCaps(gtkkey_map[i].iupcode)) + return gtkkey_map[i].iupcode; + else + code = gtkkey_map[i].s_iupcode; + } + else if (state & GDK_SHIFT_MASK) /* Shift */ + code = gtkkey_map[i].s_iupcode; + else + return gtkkey_map[i].iupcode; + + if (!code) + code = gtkkey_map[i].iupcode; + + return code; +} + +static int gtkKeyDecode(GdkEventKey *evt) +{ + int i; + int count = sizeof(gtkkey_map)/sizeof(gtkkey_map[0]); + guint keyval = evt->keyval; + + if ((evt->state & GDK_MOD2_MASK) && /* NumLock */ + (keyval >= GDK_KP_Home) && + (keyval <= GDK_KP_Delete)) + { + /* remap to numeric keys */ + guint remap_numkey[] = {GDK_KP_7, GDK_KP_4, GDK_KP_8, GDK_KP_6, GDK_KP_2, GDK_KP_9, GDK_KP_3, GDK_KP_1, GDK_KP_5, GDK_KP_0, GDK_KP_Decimal}; + keyval = remap_numkey[keyval-GDK_KP_Home]; + } + + for (i = 0; i < count; i++) + { + if (gtkkey_map[i].gtkcode == keyval) + return gtkKeyMap2Iup(evt->state, i); + } + + return 0; +} + +gboolean iupgtkKeyPressEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle *ih) +{ + int result; + int code = gtkKeyDecode(evt); + if (code == 0) + return FALSE; + + /* Avoid duplicate calls if a child of the dialog contains the focus. + GTK will call the callback for the child and for the dialog */ + if (ih->iclass->nativetype == IUP_TYPEDIALOG && ih != IupGetFocus()) + return FALSE; + + result = iupKeyCallKeyCb(ih, code); + if (result == IUP_CLOSE) + { + IupExitLoop(); + return FALSE; + } + if (result == IUP_IGNORE) + return TRUE; + + /* in the previous callback the dialog could be destroyed */ + if (iupObjectCheck(ih)) + { + /* this is called only for canvas */ + if (ih->iclass->nativetype == IUP_TYPECANVAS) + { + result = iupKeyCallKeyPressCb(ih, code, 1); + if (result == IUP_CLOSE) + { + IupExitLoop(); + return FALSE; + } + if (result == IUP_IGNORE) + return TRUE; + } + + if (!iupKeyProcessNavigation(ih, code, evt->state & GDK_SHIFT_MASK)) + return TRUE; + + /* compensate the show-help limitation. + * It is not called on F1, only on Shift+F1 and Ctrl+F1. */ + if (code == K_F1) + { + Icallback cb = IupGetCallback(ih, "HELP_CB"); + if (cb) + { + if (cb(ih) == IUP_CLOSE) + IupExitLoop(); + } + } + } + + (void)widget; + return FALSE; +} + +gboolean iupgtkKeyReleaseEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle *ih) +{ + /* this is called only for canvas */ + int result; + int code = gtkKeyDecode(evt); + if (code == 0) + return FALSE; + + result = iupKeyCallKeyPressCb(ih, code, 0); + if (result == IUP_CLOSE) + { + IupExitLoop(); + return FALSE; + } + if (result == IUP_IGNORE) + return TRUE; + + (void)widget; + return FALSE; +} + +void iupgtkButtonKeySetStatus(guint state, unsigned int but, char* status, int doubleclick) +{ + if (state & GDK_SHIFT_MASK) + iupKEYSETSHIFT(status); + + if (state & GDK_CONTROL_MASK) + iupKEYSETCONTROL(status); + + if ((state & GDK_BUTTON1_MASK) || but==1) + iupKEYSETBUTTON1(status); + + if ((state & GDK_BUTTON2_MASK) || but==2) + iupKEYSETBUTTON2(status); + + if ((state & GDK_BUTTON3_MASK) || but==3) + iupKEYSETBUTTON3(status); + + if ((state & GDK_BUTTON4_MASK) || but==4) + iupKEYSETBUTTON4(status); + + if ((state & GDK_BUTTON5_MASK) || but==5) + iupKEYSETBUTTON5(status); + + if (state & GDK_MOD1_MASK || state & GDK_MOD5_MASK) /* Alt */ + iupKEYSETALT(status); + + if (state & GDK_MOD4_MASK) /* Apple/Win */ + iupKEYSETSYS(status); + + if (doubleclick) + iupKEYSETDOUBLE(status); +} + diff --git a/iup/src/gtk/iupgtk_label.c b/iup/src/gtk/iupgtk_label.c new file mode 100755 index 0000000..49d5c6d --- /dev/null +++ b/iup/src/gtk/iupgtk_label.c @@ -0,0 +1,318 @@ +/** \file + * \brief Label Control + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" +#include "iup_label.h" +#include "iup_drv.h" +#include "iup_image.h" +#include "iup_focus.h" + +#include "iupgtk_drv.h" + + +static int gtkLabelSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_LABEL_TEXT) + { + GtkLabel* label = (GtkLabel*)ih->handle; + if (iupgtkSetMnemonicTitle(ih, label, value)) + { + Ihandle* next = iupFocusNextInteractive(ih); + if (next) + { + if (next->handle) + gtk_label_set_mnemonic_widget(label, next->handle); + else + iupAttribSetStr(next, "_IUPGTK_LABELMNEMONIC", (char*)label); /* used by iupgtkUpdateMnemonic */ + } + } + return 1; + } + + return 0; +} + +static int gtkLabelSetWordWrapAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_LABEL_TEXT) + { + GtkLabel* label = (GtkLabel*)ih->handle; + if (iupStrBoolean(value)) + gtk_label_set_line_wrap(label, TRUE); + else + gtk_label_set_line_wrap(label, FALSE); + return 1; + } + return 0; +} + +static int gtkLabelSetEllipsisAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_LABEL_TEXT) + { +#if GTK_CHECK_VERSION(2, 6, 0) + GtkLabel* label = (GtkLabel*)ih->handle; + if (iupStrBoolean(value)) + gtk_label_set_ellipsize(label, PANGO_ELLIPSIZE_END); + else + gtk_label_set_ellipsize(label, PANGO_ELLIPSIZE_NONE); +#endif + return 1; + } + return 0; +} + +static int gtkLabelSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type != IUP_LABEL_SEP_HORIZ && ih->data->type != IUP_LABEL_SEP_VERT) + { + GtkMisc* misc = (GtkMisc*)ih->handle; + PangoAlignment alignment; + float xalign, yalign; + char value1[30]="", value2[30]=""; + + iupStrToStrStr(value, value1, value2, ':'); + + if (iupStrEqualNoCase(value1, "ARIGHT")) + { + xalign = 1.0f; + alignment = PANGO_ALIGN_RIGHT; + } + else if (iupStrEqualNoCase(value1, "ACENTER")) + { + xalign = 0.5f; + alignment = PANGO_ALIGN_CENTER; + } + else /* "ALEFT" */ + { + xalign = 0; + alignment = PANGO_ALIGN_LEFT; + } + + if (iupStrEqualNoCase(value2, "ABOTTOM")) + yalign = 1.0f; + else if (iupStrEqualNoCase(value2, "ATOP")) + yalign = 0; + else /* ACENTER (default) */ + yalign = 0.5f; + + gtk_misc_set_alignment(misc, xalign, yalign); + + if (ih->data->type == IUP_LABEL_TEXT) + pango_layout_set_alignment(gtk_label_get_layout((GtkLabel*)ih->handle), alignment); + + return 1; + } + else + return 0; +} + +static int gtkLabelSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + + if (ih->handle && ih->data->type != IUP_LABEL_SEP_HORIZ && ih->data->type != IUP_LABEL_SEP_VERT) + { + GtkMisc* misc = (GtkMisc*)ih->handle; + gtk_misc_set_padding(misc, ih->data->horiz_padding, ih->data->vert_padding); + } + return 0; +} + +static char* gtkLabelGetPangoLayoutAttrib(Ihandle* ih) +{ + if (ih->data->type == IUP_LABEL_TEXT) + return (char*)gtk_label_get_layout((GtkLabel*)ih->handle); + else + return NULL; +} + +static void gtkLabelSetPixbuf(Ihandle* ih, const char* name, int make_inactive) +{ + GtkImage* image_label = (GtkImage*)ih->handle; + + if (name) + { + GdkPixbuf* pixbuf = iupImageGetImage(name, ih, make_inactive); + GdkPixbuf* old_pixbuf = gtk_image_get_pixbuf(image_label); + if (pixbuf != old_pixbuf) + gtk_image_set_from_pixbuf(image_label, pixbuf); + return; + } + + /* if not defined */ +#if GTK_CHECK_VERSION(2, 8, 0) + gtk_image_clear(image_label); +#endif +} + +static int gtkLabelSetImageAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_LABEL_IMAGE) + { + if (iupdrvIsActive(ih)) + gtkLabelSetPixbuf(ih, value, 0); + else + { + if (!iupAttribGet(ih, "IMINACTIVE")) + { + /* if not active and IMINACTIVE is not defined + then automaticaly create one based on IMAGE */ + gtkLabelSetPixbuf(ih, value, 1); /* make_inactive */ + } + } + return 1; + } + else + return 0; +} + +static int gtkLabelSetImInactiveAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_LABEL_IMAGE) + { + if (!iupdrvIsActive(ih)) + { + if (value) + gtkLabelSetPixbuf(ih, value, 0); + else + { + /* if not defined then automaticaly create one based on IMAGE */ + char* name = iupAttribGet(ih, "IMAGE"); + gtkLabelSetPixbuf(ih, name, 1); /* make_inactive */ + } + } + return 1; + } + else + return 0; +} + +static int gtkLabelSetActiveAttrib(Ihandle* ih, const char* value) +{ + /* update the inactive image if necessary */ + if (ih->data->type == IUP_LABEL_IMAGE) + { + if (!iupStrBoolean(value)) + { + char* name = iupAttribGet(ih, "IMINACTIVE"); + if (name) + gtkLabelSetPixbuf(ih, name, 0); + else + { + /* if not defined then automaticaly create one based on IMAGE */ + name = iupAttribGet(ih, "IMAGE"); + gtkLabelSetPixbuf(ih, name, 1); /* make_inactive */ + } + } + else + { + /* must restore the normal image */ + char* name = iupAttribGet(ih, "IMAGE"); + gtkLabelSetPixbuf(ih, name, 0); + } + } + + return iupBaseSetActiveAttrib(ih, value); +} + +static int gtkLabelMapMethod(Ihandle* ih) +{ + char* value; + GtkWidget *label; + + value = iupAttribGet(ih, "SEPARATOR"); + if (value) + { + if (iupStrEqualNoCase(value, "HORIZONTAL")) + { + ih->data->type = IUP_LABEL_SEP_HORIZ; + label = gtk_hseparator_new(); + } + else /* "VERTICAL" */ + { + ih->data->type = IUP_LABEL_SEP_VERT; + label = gtk_vseparator_new(); + } + } + else + { + value = iupAttribGet(ih, "IMAGE"); + if (value) + { + ih->data->type = IUP_LABEL_IMAGE; + label = gtk_image_new(); + } + else + { + ih->data->type = IUP_LABEL_TEXT; + label = gtk_label_new(NULL); + } + } + + if (!label) + return IUP_ERROR; + + ih->handle = label; + + /* add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + gtk_widget_realize(label); + + return IUP_NOERROR; +} + +void iupdrvLabelInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkLabelMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Common GTK only (when text is in a secondary element) */ + iupClassRegisterAttribute(ic, "PANGOLAYOUT", gtkLabelGetPangoLayoutAttrib, NULL, NULL, NULL, IUPAF_NO_INHERIT); + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, gtkLabelSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, iupdrvBaseSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "TITLE", NULL, gtkLabelSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupLabel only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", NULL, gtkLabelSetAlignmentAttrib, "ALEFT:ACENTER", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "IMAGE", NULL, gtkLabelSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PADDING", iupLabelGetPaddingAttrib, gtkLabelSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + + /* IupLabel GTK and Motif only */ + iupClassRegisterAttribute(ic, "IMINACTIVE", NULL, gtkLabelSetImInactiveAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupLabel Windows and GTK only */ + iupClassRegisterAttribute(ic, "WORDWRAP", NULL, gtkLabelSetWordWrapAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "ELLIPSIS", NULL, gtkLabelSetEllipsisAttrib, NULL, NULL, IUPAF_DEFAULT); + + /* IupLabel GTK only */ + iupClassRegisterAttribute(ic, "MARKUP", NULL, NULL, NULL, NULL, IUPAF_DEFAULT); +} diff --git a/iup/src/gtk/iupgtk_list.c b/iup/src/gtk/iupgtk_list.c new file mode 100755 index 0000000..80f6cce --- /dev/null +++ b/iup/src/gtk/iupgtk_list.c @@ -0,0 +1,1439 @@ +/** \file + * \brief List Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_mask.h" +#include "iup_key.h" +#include "iup_list.h" + +#include "iupgtk_drv.h" + + +static void gtkListSelectionChanged(GtkTreeSelection* selection, Ihandle* ih); +static void gtkListComboBoxChanged(GtkComboBox* widget, Ihandle* ih); + + +void iupdrvListAddItemSpace(Ihandle* ih, int *h) +{ + (void)ih; + *h += 3; +} + +void iupdrvListAddBorders(Ihandle* ih, int *x, int *y) +{ + int border_size = 2*5; + (*x) += border_size; + (*y) += border_size; + + if (ih->data->is_dropdown) + { +#ifdef HILDON + (*x) += 9; /* extra space for the dropdown button */ +#else + (*x) += 5; /* extra space for the dropdown button */ +#endif + + if (ih->data->has_editbox) + (*x) += 5; /* another extra space for the dropdown button */ + else + { + (*y) += 4; /* extra padding space */ + (*x) += 4; /* extra padding space */ + } + } + else + { + if (ih->data->has_editbox) + (*y) += 2*3; /* internal border between editbox and list */ + } +} + +static int gtkListConvertXYToPos(Ihandle* ih, int x, int y) +{ + if (!ih->data->is_dropdown) + { + GtkTreePath* path; + if (gtk_tree_view_get_dest_row_at_pos((GtkTreeView*)ih->handle, x, y, &path, NULL)) + { + int* indices = gtk_tree_path_get_indices(path); + int pos = indices[0]+1; /* IUP starts at 1 */ + gtk_tree_path_free (path); + return pos; + } + } + + return -1; +} + +static GtkTreeModel* gtkListGetModel(Ihandle* ih) +{ + if (ih->data->is_dropdown) + return gtk_combo_box_get_model((GtkComboBox*)ih->handle); + else + return gtk_tree_view_get_model((GtkTreeView*)ih->handle); +} + +int iupdrvListGetCount(Ihandle* ih) +{ + GtkTreeModel *model = gtkListGetModel(ih); + return gtk_tree_model_iter_n_children(model, NULL); +} + +void iupdrvListAppendItem(Ihandle* ih, const char* value) +{ + GtkTreeModel *model = gtkListGetModel(ih); + GtkTreeIter iter; + gtk_list_store_append(GTK_LIST_STORE(model), &iter); + gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, iupgtkStrConvertToUTF8(value), -1); +} + +void iupdrvListInsertItem(Ihandle* ih, int pos, const char* value) +{ + GtkTreeModel *model = gtkListGetModel(ih); + GtkTreeIter iter; + gtk_list_store_insert(GTK_LIST_STORE(model), &iter, pos); + gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, iupgtkStrConvertToUTF8(value), -1); +} + +void iupdrvListRemoveItem(Ihandle* ih, int pos) +{ + GtkTreeModel *model = gtkListGetModel(ih); + GtkTreeIter iter; + if (gtk_tree_model_iter_nth_child(model, &iter, NULL, pos)) + { + if (ih->data->is_dropdown && !ih->data->has_editbox) + { + /* must check if removing the current item */ + int curpos = gtk_combo_box_get_active((GtkComboBox*)ih->handle); + if (pos == curpos) + { + if (curpos > 0) curpos--; + else curpos++; + + gtk_combo_box_set_active((GtkComboBox*)ih->handle, curpos); + } + } + + gtk_list_store_remove(GTK_LIST_STORE(model), &iter); + } +} + +void iupdrvListRemoveAllItems(Ihandle* ih) +{ + GtkTreeModel *model = gtkListGetModel(ih); + gtk_list_store_clear(GTK_LIST_STORE(model)); +} + + +/*********************************************************************************/ + + +static int gtkListSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + iupdrvSetStandardFontAttrib(ih, value); + + if (ih->handle) + { + if (ih->data->is_dropdown) + { + GtkCellRenderer* renderer = (GtkCellRenderer*)iupAttribGet(ih, "_IUPGTK_RENDERER"); + if (renderer) + { + g_object_set(G_OBJECT(renderer), "font-desc", (PangoFontDescription*)iupgtkGetPangoFontDescAttrib(ih), NULL); + iupgtkFontUpdateObjectPangoLayout(ih, G_OBJECT(renderer)); + } + } + + if (ih->data->has_editbox) + { + GtkEntry* entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + gtk_widget_modify_font((GtkWidget*)entry, (PangoFontDescription*)iupgtkGetPangoFontDescAttrib(ih)); + iupgtkFontUpdatePangoLayout(ih, gtk_entry_get_layout(entry)); + } + } + return 1; +} + +static char* gtkListGetIdValueAttrib(Ihandle* ih, const char* name_id) +{ + int pos = iupListGetPos(ih, name_id); + if (pos != -1) + { + GtkTreeIter iter; + GtkTreeModel* model = gtkListGetModel(ih); + if (gtk_tree_model_iter_nth_child(model, &iter, NULL, pos)) + { + gchar *text = NULL; + gtk_tree_model_get(model, &iter, 0, &text, -1); + if (text) + { + char* ret_str = iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(text)); + g_free(text); + return ret_str; + } + } + } + return NULL; +} + +static int gtkListSetBgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + + GtkScrolledWindow* scrolled_window = (GtkScrolledWindow*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (scrolled_window && !ih->data->is_dropdown) + { + /* ignore given value, must use only from parent for the scrollbars */ + char* parent_value = iupBaseNativeParentGetBgColor(ih); + + if (iupStrToRGB(parent_value, &r, &g, &b)) + { + GtkWidget* sb; + + if (!GTK_IS_SCROLLED_WINDOW(scrolled_window)) + scrolled_window = (GtkScrolledWindow*)iupAttribGet(ih, "_IUPGTK_SCROLLED_WINDOW"); + + iupgtkBaseSetBgColor((GtkWidget*)scrolled_window, r, g, b); + +#if GTK_CHECK_VERSION(2, 8, 0) + sb = gtk_scrolled_window_get_hscrollbar(scrolled_window); + if (sb) iupgtkBaseSetBgColor(sb, r, g, b); + + sb = gtk_scrolled_window_get_vscrollbar(scrolled_window); + if (sb) iupgtkBaseSetBgColor(sb, r, g, b); +#endif + } + } + + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + if (ih->data->has_editbox) + { + GtkWidget* entry = (GtkWidget*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + iupgtkBaseSetBgColor(entry, r, g, b); + } + + { + GtkCellRenderer* renderer = (GtkCellRenderer*)iupAttribGet(ih, "_IUPGTK_RENDERER"); + if (renderer) + { + GdkColor color; + iupgdkColorSet(&color, r, g, b); + g_object_set(G_OBJECT(renderer), "cell-background-gdk", &color, NULL); + } + } + + return iupdrvBaseSetBgColorAttrib(ih, value); +} + +static int gtkListSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgtkBaseSetFgColor(ih->handle, r, g, b); + + if (ih->data->has_editbox) + { + GtkWidget* entry = (GtkWidget*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + iupgtkBaseSetFgColor(entry, r, g, b); + } + + { + GtkCellRenderer* renderer = (GtkCellRenderer*)iupAttribGet(ih, "_IUPGTK_RENDERER"); + if (renderer) + { + GdkColor color; + iupgdkColorSet(&color, r, g, b); + g_object_set(G_OBJECT(renderer), "foreground-gdk", &color, NULL); + } + } + + return 1; +} + +static char* gtkListGetValueAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + GtkEntry* entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + return iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(gtk_entry_get_text(entry))); + } + else + { + if (ih->data->is_dropdown) + { + int pos = gtk_combo_box_get_active((GtkComboBox*)ih->handle); + char* str = iupStrGetMemory(50); + sprintf(str, "%d", pos+1); /* IUP starts at 1 */ + return str; + } + else + { + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + if (!ih->data->is_multiple) + { + GtkTreeIter iter; + GtkTreeModel* tree_model; + if (gtk_tree_selection_get_selected(selection, &tree_model, &iter)) + { + char* str; + GtkTreePath *path = gtk_tree_model_get_path(tree_model, &iter); + int* indices = gtk_tree_path_get_indices(path); + str = iupStrGetMemory(50); + sprintf(str, "%d", indices[0]+1); /* IUP starts at 1 */ + gtk_tree_path_free (path); + return str; + } + } + else + { + GList *il, *list = gtk_tree_selection_get_selected_rows(selection, NULL); + int count = iupdrvListGetCount(ih); + char* str = iupStrGetMemory(count+1); + memset(str, '-', count); + str[count]=0; + for (il=list; il; il=il->next) + { + GtkTreePath* path = (GtkTreePath*)il->data; + int* indices = gtk_tree_path_get_indices(path); + str[indices[0]] = '+'; + gtk_tree_path_free(path); + } + g_list_free(list); + return str; + } + } + } + + return NULL; +} + +static int gtkListSetValueAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->has_editbox) + { + GtkEntry* entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + if (!value) value = ""; + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + gtk_entry_set_text(entry, iupgtkStrConvertToUTF8(value)); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + } + else + { + if (ih->data->is_dropdown) + { + int pos; + GtkTreeModel *model = gtkListGetModel(ih); + g_signal_handlers_block_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkListComboBoxChanged), ih); + if (iupStrToInt(value, &pos)==1 && + (pos>0 && poshandle, pos-1); /* IUP starts at 1 */ + iupAttribSetInt(ih, "_IUPLIST_OLDVALUE", pos); + } + else + { + gtk_combo_box_set_active((GtkComboBox*)ih->handle, -1); /* none */ + iupAttribSetStr(ih, "_IUPLIST_OLDVALUE", NULL); + } + g_signal_handlers_unblock_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkListComboBoxChanged), ih); + } + else + { + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + if (!ih->data->is_multiple) + { + int pos; + g_signal_handlers_block_by_func(G_OBJECT(selection), G_CALLBACK(gtkListSelectionChanged), ih); + if (iupStrToInt(value, &pos)==1) + { + GtkTreePath* path = gtk_tree_path_new_from_indices(pos-1, -1); /* IUP starts at 1 */ + gtk_tree_selection_select_path(selection, path); + gtk_tree_path_free(path); + iupAttribSetInt(ih, "_IUPLIST_OLDVALUE", pos); + } + else + { + gtk_tree_selection_unselect_all(selection); + iupAttribSetStr(ih, "_IUPLIST_OLDVALUE", NULL); + } + g_signal_handlers_unblock_by_func(G_OBJECT(selection), G_CALLBACK(gtkListSelectionChanged), ih); + } + else + { + /* User has changed a multiple selection on a simple list. */ + int i, len, count; + + g_signal_handlers_block_by_func(G_OBJECT(selection), G_CALLBACK(gtkListSelectionChanged), ih); + + /* Clear all selections */ + gtk_tree_selection_unselect_all(selection); + + if (!value) + { + iupAttribSetStr(ih, "_IUPLIST_OLDVALUE", NULL); + return 0; + } + + len = strlen(value); + count = iupdrvListGetCount(ih); + if (len < count) + count = len; + + /* update selection list */ + for (i = 0; idata->is_dropdown) + { + if (iupStrBoolean(value)) + gtk_combo_box_popup((GtkComboBox*)ih->handle); + else + gtk_combo_box_popdown((GtkComboBox*)ih->handle); + } + return 0; +} + +static int gtkListSetTopItemAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->is_dropdown) + { + int pos = 1; + if (iupStrToInt(value, &pos)) + { + GtkTreePath* path = gtk_tree_path_new_from_indices(pos-1, -1); /* IUP starts at 1 */ + gtk_tree_view_scroll_to_cell((GtkTreeView*)ih->handle, path, NULL, FALSE, 0, 0); + gtk_tree_path_free(path); + } + } + return 0; +} + +static int gtkListSetSpacingAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->is_dropdown) + return 0; + + if (!iupStrToInt(value, &ih->data->spacing)) + ih->data->spacing = 0; + + if (ih->handle) + { + GtkCellRenderer* renderer = (GtkCellRenderer*)iupAttribGet(ih, "_IUPGTK_RENDERER"); + if (renderer) + g_object_set(G_OBJECT(renderer), "xpad", ih->data->spacing, + "ypad", ih->data->spacing, + NULL); + return 0; + } + else + return 1; /* store until not mapped, when mapped will be set again */ +} + +static int gtkListSetPaddingAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_editbox) + return 0; + + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + if (ih->handle) + { +#if GTK_CHECK_VERSION(2, 10, 0) + GtkEntry* entry; + GtkBorder border; + border.bottom = border.top = ih->data->vert_padding; + border.left = border.right = ih->data->horiz_padding; + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + gtk_entry_set_inner_border(entry, &border); +#endif + return 0; + } + else + return 1; /* store until not mapped, when mapped will be set again */ +} + +static int gtkListSetSelectionAttrib(Ihandle* ih, const char* value) +{ + int start=1, end=1; + GtkEntry* entry; + if (!ih->data->has_editbox) + return 0; + if (!value) + return 0; + + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + if (!value || iupStrEqualNoCase(value, "NONE")) + { + gtk_editable_select_region(GTK_EDITABLE(entry), 0, 0); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + gtk_editable_select_region(GTK_EDITABLE(entry), 0, -1); + return 0; + } + + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<1 || end<1) + return 0; + + start--; /* IUP starts at 1 */ + end--; + + gtk_editable_select_region(GTK_EDITABLE(entry), start, end); + + return 0; +} + +static char* gtkListGetSelectionAttrib(Ihandle* ih) +{ + char *str; + int start, end; + GtkEntry* entry; + if (!ih->data->has_editbox) + return NULL; + + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + if (gtk_editable_get_selection_bounds(GTK_EDITABLE(entry), &start, &end)) + { + start++; /* IUP starts at 1 */ + end++; + str = iupStrGetMemory(100); + sprintf(str, "%d:%d", (int)start, (int)end); + return str; + } + + return NULL; +} + +static int gtkListSetSelectionPosAttrib(Ihandle* ih, const char* value) +{ + int start=0, end=0; + GtkEntry* entry; + if (!ih->data->has_editbox) + return 0; + if (!value) + return 0; + + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + if (!value || iupStrEqualNoCase(value, "NONE")) + { + gtk_editable_select_region(GTK_EDITABLE(entry), 0, 0); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + gtk_editable_select_region(GTK_EDITABLE(entry), 0, -1); + return 0; + } + + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<0 || end<0) + return 0; + + gtk_editable_select_region(GTK_EDITABLE(entry), start, end); + + return 0; +} + +static char* gtkListGetSelectionPosAttrib(Ihandle* ih) +{ + int start, end; + char *str; + GtkEntry* entry; + if (!ih->data->has_editbox) + return NULL; + + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + if (gtk_editable_get_selection_bounds(GTK_EDITABLE(entry), &start, &end)) + { + str = iupStrGetMemory(100); + sprintf(str, "%d:%d", (int)start, (int)end); + return str; + } + + return NULL; +} + +static int gtkListSetSelectedTextAttrib(Ihandle* ih, const char* value) +{ + int start, end; + GtkEntry* entry; + if (!ih->data->has_editbox) + return 0; + if (!value) + return 0; + + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + if (gtk_editable_get_selection_bounds(GTK_EDITABLE(entry), &start, &end)) + { + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + gtk_editable_delete_selection(GTK_EDITABLE(entry)); + gtk_editable_insert_text(GTK_EDITABLE(entry), iupgtkStrConvertToUTF8(value), -1, &start); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + } + + return 0; +} + +static char* gtkListGetSelectedTextAttrib(Ihandle* ih) +{ + int start, end; + GtkEntry* entry; + if (!ih->data->has_editbox) + return NULL; + + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + if (gtk_editable_get_selection_bounds(GTK_EDITABLE(entry), &start, &end)) + { + char* selectedtext = gtk_editable_get_chars(GTK_EDITABLE(entry), start, end); + char* str = iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(selectedtext)); + g_free(selectedtext); + return str; + } + + return NULL; +} + +static int gtkListSetCaretAttrib(Ihandle* ih, const char* value) +{ + int pos = 1; + GtkEntry* entry; + if (!ih->data->has_editbox) + return 0; + if (!value) + return 0; + + sscanf(value,"%i",&pos); + pos--; /* IUP starts at 1 */ + if (pos < 0) pos = 0; + + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + gtk_editable_set_position(GTK_EDITABLE(entry), pos); + + return 0; +} + +static char* gtkListGetCaretAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + char* str = iupStrGetMemory(50); + GtkEntry* entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + int pos = gtk_editable_get_position(GTK_EDITABLE(entry)); + pos++; /* IUP starts at 1 */ + sprintf(str, "%d", (int)pos); + return str; + } + else + return NULL; +} + +static int gtkListSetCaretPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + GtkEntry* entry; + if (!ih->data->has_editbox) + return 0; + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 0) pos = 0; + + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + gtk_editable_set_position(GTK_EDITABLE(entry), pos); + + return 0; +} + +static char* gtkListGetCaretPosAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + char* str = iupStrGetMemory(50); + GtkEntry* entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + int pos = gtk_editable_get_position(GTK_EDITABLE(entry)); + sprintf(str, "%d", (int)pos); + return str; + } + else + return NULL; +} + +static int gtkListSetScrollToAttrib(Ihandle* ih, const char* value) +{ + int pos = 1; + GtkEntry* entry; + if (!ih->data->has_editbox) + return 0; + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 1) pos = 1; + pos--; /* return to GTK referece */ + + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + gtk_editable_set_position(GTK_EDITABLE(entry), pos); + + return 0; +} + +static int gtkListSetScrollToPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + GtkEntry* entry; + if (!ih->data->has_editbox) + return 0; + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 0) pos = 0; + + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + gtk_editable_set_position(GTK_EDITABLE(entry), pos); + + return 0; +} + +static int gtkListSetInsertAttrib(Ihandle* ih, const char* value) +{ + gint pos; + GtkEntry* entry; + if (!ih->data->has_editbox) + return 0; + if (!value) + return 0; + + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); /* disable callbacks */ + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + pos = gtk_editable_get_position(GTK_EDITABLE(entry)); + gtk_editable_insert_text(GTK_EDITABLE(entry), iupgtkStrConvertToUTF8(value), -1, &pos); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + + return 0; +} + +static int gtkListSetAppendAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->has_editbox) + { + GtkEntry* entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + gint pos = strlen(gtk_entry_get_text(entry))+1; + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); /* disable callbacks */ + gtk_editable_insert_text(GTK_EDITABLE(entry), iupgtkStrConvertToUTF8(value), -1, &pos); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + } + return 0; +} + +static int gtkListSetNCAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_editbox) + return 0; + + if (!iupStrToInt(value, &ih->data->nc)) + ih->data->nc = INT_MAX; + + if (ih->handle) + { + GtkEntry* entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + gtk_entry_set_max_length(entry, ih->data->nc); + } + + return 0; +} + +static int gtkListSetClipboardAttrib(Ihandle *ih, const char *value) +{ + GtkEntry* entry; + if (!ih->data->has_editbox) + return 0; + + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + if (iupStrEqualNoCase(value, "COPY")) + gtk_editable_copy_clipboard(GTK_EDITABLE(entry)); + else if (iupStrEqualNoCase(value, "CUT")) + gtk_editable_cut_clipboard(GTK_EDITABLE(entry)); + else if (iupStrEqualNoCase(value, "PASTE")) + gtk_editable_paste_clipboard(GTK_EDITABLE(entry)); + else if (iupStrEqualNoCase(value, "CLEAR")) + gtk_editable_delete_selection(GTK_EDITABLE(entry)); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + return 0; +} + +static int gtkListSetReadOnlyAttrib(Ihandle* ih, const char* value) +{ + GtkEntry* entry; + if (!ih->data->has_editbox) + return 0; + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + gtk_editable_set_editable(GTK_EDITABLE(entry), !iupStrBoolean(value)); + return 0; +} + +static char* gtkListGetReadOnlyAttrib(Ihandle* ih) +{ + GtkEntry* entry; + if (!ih->data->has_editbox) + return NULL; + entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + if (!gtk_editable_get_editable(GTK_EDITABLE(entry))) + return "YES"; + else + return "NO"; +} + + +/*********************************************************************************/ + + +static void gtkListEditMoveCursor(GtkWidget* entry, GtkMovementStep step, gint count, gboolean extend_selection, Ihandle* ih) +{ + int pos; + + IFniii cb = (IFniii)IupGetCallback(ih, "CARET_CB"); + if (!cb) return; + + pos = gtk_editable_get_position(GTK_EDITABLE(entry)); + + if (pos != ih->data->last_caret_pos) + { + ih->data->last_caret_pos = pos; + + cb(ih, 1, pos+1, pos); + } + + (void)step; + (void)count; + (void)extend_selection; +} + +static gboolean gtkListEditKeyPressEvent(GtkWidget* entry, GdkEventKey *evt, Ihandle *ih) +{ + if (iupgtkKeyPressEvent(entry, evt, ih) == TRUE) + return TRUE; + + if ((evt->keyval == GDK_Up || evt->keyval == GDK_KP_Up) || + (evt->keyval == GDK_Prior || evt->keyval == GDK_KP_Page_Up) || + (evt->keyval == GDK_Down || evt->keyval == GDK_KP_Down) || + (evt->keyval == GDK_Next || evt->keyval == GDK_KP_Page_Down)) + { + int pos = -1; + GtkTreeIter iter; + GtkTreeModel* model = NULL; + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + if (gtk_tree_selection_get_selected(selection, &model, &iter)) + { + GtkTreePath *path = gtk_tree_model_get_path(model, &iter); + int* indices = gtk_tree_path_get_indices(path); + pos = indices[0]; + gtk_tree_path_free(path); + } + + if (pos == -1) + pos = 0; + else if (evt->keyval == GDK_Up || evt->keyval == GDK_KP_Up) + { + pos--; + if (pos < 0) pos = 0; + } + else if (evt->keyval == GDK_Prior || evt->keyval == GDK_KP_Page_Up) + { + pos -= 5; + if (pos < 0) pos = 0; + } + else if (evt->keyval == GDK_Down || evt->keyval == GDK_KP_Down) + { + int count = gtk_tree_model_iter_n_children(model, NULL); + pos++; + if (pos > count-1) pos = count-1; + } + else if (evt->keyval == GDK_Next || evt->keyval == GDK_KP_Page_Down) + { + int count = gtk_tree_model_iter_n_children(model, NULL); + pos += 5; + if (pos > count-1) pos = count-1; + } + + if (pos != -1) + { + GtkTreePath* path = gtk_tree_path_new_from_indices(pos, -1); + g_signal_handlers_block_by_func(G_OBJECT(selection), G_CALLBACK(gtkListSelectionChanged), ih); + gtk_tree_selection_select_path(selection, path); + g_signal_handlers_unblock_by_func(G_OBJECT(selection), G_CALLBACK(gtkListSelectionChanged), ih); + gtk_tree_path_free(path); + iupAttribSetInt(ih, "_IUPLIST_OLDVALUE", pos); + + if (!model) model = gtkListGetModel(ih); + + if (gtk_tree_model_iter_nth_child(model, &iter, NULL, pos)) + { + gchar *text = NULL; + gtk_tree_model_get(model, &iter, 0, &text, -1); + if (text) + { + gtk_entry_set_text((GtkEntry*)entry, text); + g_free(text); + } + } + + } + } + + return FALSE; +} + +static gboolean gtkListEditKeyReleaseEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle *ih) +{ + gtkListEditMoveCursor(widget, 0, 0, 0, ih); + (void)evt; + return FALSE; +} + +static gboolean gtkListEditButtonEvent(GtkWidget *widget, GdkEventButton *evt, Ihandle *ih) +{ + gtkListEditMoveCursor(widget, 0, 0, 0, ih); + (void)evt; + return FALSE; +} + +static int gtkListCallEditCb(Ihandle* ih, GtkEditable *editable, const char* insert_value, int len, int start, int end) +{ + char *new_value, *value; + int ret = -1, key = 0; + + IFnis cb = (IFnis)IupGetCallback(ih, "EDIT_CB"); + if (!cb && !ih->data->mask) + return -1; /* continue */ + + value = iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(gtk_entry_get_text(GTK_ENTRY(editable)))); + + if (!insert_value) + { + new_value = iupStrDup(value); + if (end<0) end = strlen(value)+1; + iupStrRemove(new_value, start, end, 1); + } + else + { + if (!value) + new_value = iupStrDup(insert_value); + else + { + if (len < end-start) + { + new_value = iupStrDup(value); + new_value = iupStrInsert(new_value, insert_value, start, end); + } + else + new_value = iupStrInsert(value, insert_value, start, end); + } + } + + if (insert_value && insert_value[0]!=0 && insert_value[1]==0) + key = insert_value[0]; + + if (!new_value) + return -1; /* continue */ + + if (ih->data->nc && (int)strlen(new_value) > ih->data->nc) + { + if (new_value != value) free(new_value); + return 0; /* abort */ + } + + if (ih->data->mask && iupMaskCheck(ih->data->mask, new_value)==0) + { + if (new_value != value) free(new_value); + return 0; /* abort */ + } + + if (cb) + { + int cb_ret = cb(ih, key, (char*)new_value); + if (cb_ret==IUP_IGNORE) + ret = 0; /* abort */ + else if (cb_ret==IUP_CLOSE) + { + IupExitLoop(); + ret = 0; /* abort */ + } + else if (cb_ret!=0 && key!=0 && + cb_ret != IUP_DEFAULT && cb_ret != IUP_CONTINUE) + ret = cb_ret; /* abort and replace */ + } + + if (new_value != value) free(new_value); + return ret; /* continue */ +} + +static void gtkListEditDeleteText(GtkEditable *editable, int start, int end, Ihandle* ih) +{ + if (iupAttribGet(ih, "_IUPGTK_DISABLE_TEXT_CB")) + return; + + if (gtkListCallEditCb(ih, editable, NULL, 0, start, end)==0) + g_signal_stop_emission_by_name(editable, "delete_text"); +} + +static void gtkListEditInsertText(GtkEditable *editable, char *insert_value, int len, int *pos, Ihandle* ih) +{ + int ret; + + if (iupAttribGet(ih, "_IUPGTK_DISABLE_TEXT_CB")) + return; + + ret = gtkListCallEditCb(ih, editable, iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(insert_value)), len, *pos, *pos); + if (ret == 0) + g_signal_stop_emission_by_name(editable, "insert_text"); + else if (ret != -1) + { + insert_value[0] = (char)ret; /* replace key */ + + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + gtk_editable_insert_text(editable, insert_value, 1, pos); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + + g_signal_stop_emission_by_name(editable, "insert_text"); + } +} + +static void gtkListEditChanged(void* dummy, Ihandle* ih) +{ + if (iupAttribGet(ih, "_IUPGTK_DISABLE_TEXT_CB")) + return; + + iupBaseCallValueChangedCb(ih); + (void)dummy; +} + +static void gtkListComboBoxPopupShownChanged(GtkComboBox* widget, GParamSpec *pspec, Ihandle* ih) +{ + IFni cb = (IFni)IupGetCallback(ih, "DROPDOWN_CB"); + if (cb) + { + gboolean popup_shown; + g_object_get(widget, "popup-shown", &popup_shown, NULL); + cb(ih, popup_shown); + } + (void)pspec; +} + +static void gtkListComboBoxChanged(GtkComboBox* widget, Ihandle* ih) +{ + IFnsii cb = (IFnsii)IupGetCallback(ih, "ACTION"); + if (cb) + { + int pos = gtk_combo_box_get_active((GtkComboBox*)ih->handle); + pos++; /* IUP starts at 1 */ + iupListSingleCallActionCallback(ih, cb, pos); + } + + if (!ih->data->has_editbox) + iupBaseCallValueChangedCb(ih); + + (void)widget; +} + +static gboolean gtkListSimpleKeyPressEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle *ih) +{ + if (iupgtkKeyPressEvent(widget, evt, ih) == TRUE) + return TRUE; + + if (evt->keyval == GDK_Return || evt->keyval == GDK_KP_Enter) + return TRUE; /* used to avoid the call to DBLCLICK_CB in the default processing */ + return FALSE; +} + +static void gtkListRowActivated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, Ihandle* ih) +{ + IFnis cb = (IFnis) IupGetCallback(ih, "DBLCLICK_CB"); + if (cb) + { + int* indices = gtk_tree_path_get_indices(path); + iupListSingleCallDblClickCallback(ih, cb, indices[0]+1); /* IUP starts at 1 */ + } + (void)column; + (void)tree_view; +} + +static void gtkListSelectionChanged(GtkTreeSelection* selection, Ihandle* ih) +{ + if (ih->data->has_editbox) + { + /* must manually update its contents */ + GtkTreeIter iter; + GtkTreeModel* tree_model; + if (gtk_tree_selection_get_selected(selection, &tree_model, &iter)) + { + GtkTreePath *path = gtk_tree_model_get_path(tree_model, &iter); + char* value = NULL; + gtk_tree_model_get(tree_model, &iter, 0, &value, -1); + if (value) + { + GtkEntry* entry = (GtkEntry*)iupAttribGet(ih, "_IUPGTK_ENTRY"); + gtk_entry_set_text(entry, value); + g_free(value); + } + gtk_tree_path_free(path); + } + } + + if (!ih->data->is_multiple) + { + IFnsii cb = (IFnsii)IupGetCallback(ih, "ACTION"); + if (cb) + { + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iter; + GtkTreeModel* tree_model; + if (gtk_tree_selection_get_selected(selection, &tree_model, &iter)) + { + GtkTreePath *path = gtk_tree_model_get_path(tree_model, &iter); + int* indices = gtk_tree_path_get_indices(path); + iupListSingleCallActionCallback(ih, cb, indices[0]+1); /* IUP starts at 1 */ + gtk_tree_path_free (path); + } + } + } + else + { + IFns multi_cb = (IFns)IupGetCallback(ih, "MULTISELECT_CB"); + IFnsii cb = (IFnsii) IupGetCallback(ih, "ACTION"); + if (multi_cb || cb) + { + GList *il, *list = gtk_tree_selection_get_selected_rows(selection, NULL); + int i, sel_count = g_list_length(list); + int* pos = malloc(sizeof(int)*sel_count); + for (il=list, i=0; il; il=il->next, i++) + { + GtkTreePath* path = (GtkTreePath*)il->data; + int* indices = gtk_tree_path_get_indices(path); + pos[i] = indices[0]; + gtk_tree_path_free(path); + } + g_list_free(list); + + iupListMultipleCallActionCallback(ih, cb, multi_cb, pos, sel_count); + free(pos); + } + } + + if (!ih->data->has_editbox) + iupBaseCallValueChangedCb(ih); +} + + +/*********************************************************************************/ + + +static int gtkListMapMethod(Ihandle* ih) +{ + GtkScrolledWindow* scrolled_window = NULL; + GtkListStore *store; + + store = gtk_list_store_new(1, G_TYPE_STRING); + + if (ih->data->is_dropdown) + { + GtkCellRenderer *renderer = NULL; + + if (ih->data->has_editbox) + ih->handle = gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(store), 0); + else + ih->handle = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store)); + g_object_unref(store); + + if (!ih->handle) + return IUP_ERROR; + + g_object_set(G_OBJECT(ih->handle), "has-frame", TRUE, NULL); + + if (ih->data->has_editbox) + { + GtkWidget *entry; +#if GTK_CHECK_VERSION(2, 12, 0) + GList* list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(ih->handle)); + renderer = list->data; + g_list_free(list); +#endif + + entry = gtk_bin_get_child(GTK_BIN(ih->handle)); + iupAttribSetStr(ih, "_IUPGTK_ENTRY", (char*)entry); + + g_signal_connect(G_OBJECT(entry), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(entry), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(entry), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(entry), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(entry), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + g_signal_connect(G_OBJECT(entry), "key-press-event", G_CALLBACK(iupgtkKeyPressEvent), ih); + + g_signal_connect(G_OBJECT(entry), "delete-text", G_CALLBACK(gtkListEditDeleteText), ih); + g_signal_connect(G_OBJECT(entry), "insert-text", G_CALLBACK(gtkListEditInsertText), ih); + /* g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(gtkListEditChanged), ih); */ + g_signal_connect_after(G_OBJECT(entry), "move-cursor", G_CALLBACK(gtkListEditMoveCursor), ih); /* only report some caret movements */ + g_signal_connect_after(G_OBJECT(entry), "key-release-event", G_CALLBACK(gtkListEditKeyReleaseEvent), ih); + g_signal_connect(G_OBJECT(entry), "button-press-event", G_CALLBACK(gtkListEditButtonEvent), ih); /* if connected "after" then it is ignored */ + g_signal_connect(G_OBJECT(entry), "button-release-event",G_CALLBACK(gtkListEditButtonEvent), ih); + + if (!iupAttribGetBoolean(ih, "CANFOCUS")) + GTK_WIDGET_FLAGS(ih->handle) &= ~GTK_CAN_FOCUS; + } + else + { + /* had to add an event box just to get get/killfocus,enter/leave events */ + GtkWidget *box = gtk_event_box_new(); + gtk_container_add((GtkContainer*)box, ih->handle); + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)box); + + renderer = gtk_cell_renderer_text_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(ih->handle), renderer, TRUE); + gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(ih->handle), renderer, "text", 0, NULL); + + g_signal_connect(G_OBJECT(box), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(box), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(box), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(box), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(iupgtkKeyPressEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + + if (!iupAttribGetBoolean(ih, "CANFOCUS")) + GTK_WIDGET_FLAGS(ih->handle) &= ~GTK_CAN_FOCUS; + else + GTK_WIDGET_FLAGS(box) |= GTK_CAN_FOCUS; + } + + g_signal_connect(ih->handle, "changed", G_CALLBACK(gtkListComboBoxChanged), ih); + g_signal_connect(ih->handle, "notify::popup-shown", G_CALLBACK(gtkListComboBoxPopupShownChanged), ih); + + if (renderer) + { + renderer->xpad = 0; + renderer->ypad = 0; + iupAttribSetStr(ih, "_IUPGTK_RENDERER", (char*)renderer); + } + } + else + { + GtkCellRenderer *renderer; + GtkTreeSelection* selection; + GtkTreeViewColumn *column; + GtkPolicyType scrollbar_policy; + + ih->handle = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); + g_object_unref(store); + + if (!ih->handle) + return IUP_ERROR; + + scrolled_window = (GtkScrolledWindow*)gtk_scrolled_window_new(NULL, NULL); + + if (ih->data->has_editbox) + { + GtkBox* vbox = (GtkBox*)gtk_vbox_new(FALSE, 0); + + GtkWidget *entry = gtk_entry_new(); + gtk_widget_show(entry); + gtk_box_pack_start(vbox, entry, FALSE, FALSE, 0); + iupAttribSetStr(ih, "_IUPGTK_ENTRY", (char*)entry); + + gtk_widget_show((GtkWidget*)vbox); + gtk_box_pack_end(vbox, (GtkWidget*)scrolled_window, TRUE, TRUE, 0); + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)vbox); + iupAttribSetStr(ih, "_IUPGTK_SCROLLED_WINDOW", (char*)scrolled_window); + + GTK_WIDGET_FLAGS(ih->handle) &= ~GTK_CAN_FOCUS; /* focus goes only to the edit box */ + if (!iupAttribGetBoolean(ih, "CANFOCUS")) + GTK_WIDGET_FLAGS(entry) &= ~GTK_CAN_FOCUS; + + g_signal_connect(G_OBJECT(entry), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(entry), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(entry), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(entry), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(entry), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + + g_signal_connect(G_OBJECT(entry), "delete-text", G_CALLBACK(gtkListEditDeleteText), ih); + g_signal_connect(G_OBJECT(entry), "insert-text", G_CALLBACK(gtkListEditInsertText), ih); + g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(gtkListEditChanged), ih); + g_signal_connect_after(G_OBJECT(entry), "move-cursor", G_CALLBACK(gtkListEditMoveCursor), ih); /* only report some caret movements */ + g_signal_connect(G_OBJECT(entry), "key-press-event", G_CALLBACK(gtkListEditKeyPressEvent), ih); + g_signal_connect_after(G_OBJECT(entry), "key-release-event", G_CALLBACK(gtkListEditKeyReleaseEvent), ih); + g_signal_connect(G_OBJECT(entry), "button-press-event", G_CALLBACK(gtkListEditButtonEvent), ih); /* if connected "after" then it is ignored */ + g_signal_connect(G_OBJECT(entry), "button-release-event",G_CALLBACK(gtkListEditButtonEvent), ih); + } + else + { + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)scrolled_window); + + if (!iupAttribGetBoolean(ih, "CANFOCUS")) + GTK_WIDGET_FLAGS(ih->handle) &= ~GTK_CAN_FOCUS; + + g_signal_connect(G_OBJECT(ih->handle), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(gtkListSimpleKeyPressEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + } + + column = gtk_tree_view_column_new(); + + renderer = gtk_cell_renderer_text_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(column), renderer, TRUE); + gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(column), renderer, "text", 0, NULL); + + iupAttribSetStr(ih, "_IUPGTK_RENDERER", (char*)renderer); + g_object_set(G_OBJECT(renderer), "xpad", 0, NULL); + g_object_set(G_OBJECT(renderer), "ypad", 0, NULL); + + gtk_tree_view_append_column(GTK_TREE_VIEW(ih->handle), column); + gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(ih->handle), FALSE); + gtk_tree_view_set_enable_search(GTK_TREE_VIEW(ih->handle), FALSE); /* TODO: check "start-interactive-search" signal */ + + gtk_container_add((GtkContainer*)scrolled_window, ih->handle); + gtk_widget_show((GtkWidget*)scrolled_window); + gtk_scrolled_window_set_shadow_type(scrolled_window, GTK_SHADOW_IN); + + if (ih->data->sb) + { + if (iupAttribGetBoolean(ih, "AUTOHIDE")) + scrollbar_policy = GTK_POLICY_AUTOMATIC; + else + scrollbar_policy = GTK_POLICY_ALWAYS; + } + else + scrollbar_policy = GTK_POLICY_NEVER; + + gtk_scrolled_window_set_policy(scrolled_window, scrollbar_policy, scrollbar_policy); + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + if (!ih->data->has_editbox && ih->data->is_multiple) + { + gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); +#if GTK_CHECK_VERSION(2, 10, 0) + gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(ih->handle), TRUE); +#endif + } + else + gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE); + + g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(gtkListSelectionChanged), ih); + g_signal_connect(G_OBJECT(ih->handle), "row-activated", G_CALLBACK(gtkListRowActivated), ih); + g_signal_connect(G_OBJECT(ih->handle), "motion-notify-event",G_CALLBACK(iupgtkMotionNotifyEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "button-press-event", G_CALLBACK(iupgtkButtonEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "button-release-event",G_CALLBACK(iupgtkButtonEvent), ih); + } + + if (iupAttribGetBoolean(ih, "SORT")) + gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), 0, GTK_SORT_ASCENDING); + + /* add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + if (scrolled_window) + gtk_widget_realize((GtkWidget*)scrolled_window); + gtk_widget_realize(ih->handle); + + /* configure for DRAG&DROP */ + if (IupGetCallback(ih, "DROPFILES_CB")) + iupAttribSetStr(ih, "DRAGDROP", "YES"); + + IupSetCallback(ih, "_IUP_XY2POS_CB", (Icallback)gtkListConvertXYToPos); + + iupListSetInitialItems(ih); + + return IUP_NOERROR; +} + +void iupdrvListInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkListMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Overwrite Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, gtkListSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, gtkListSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, gtkListSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTFGCOLOR", IUPAF_DEFAULT); + + /* IupList only */ + iupClassRegisterAttributeId(ic, "IDVALUE", gtkListGetIdValueAttrib, iupListSetIdValueAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE", gtkListGetValueAttrib, gtkListSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWDROPDOWN", NULL, gtkListSetShowDropdownAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TOPITEM", NULL, gtkListSetTopItemAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DRAGDROP", NULL, iupgtkSetDragDropAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPACING", iupListGetSpacingAttrib, gtkListSetSpacingAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + + iupClassRegisterAttribute(ic, "PADDING", iupListGetPaddingAttrib, gtkListSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "SELECTEDTEXT", gtkListGetSelectedTextAttrib, gtkListSetSelectedTextAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTION", gtkListGetSelectionAttrib, gtkListSetSelectionAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTIONPOS", gtkListGetSelectionPosAttrib, gtkListSetSelectionPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARET", gtkListGetCaretAttrib, gtkListSetCaretAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARETPOS", gtkListGetCaretPosAttrib, gtkListSetCaretPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "INSERT", NULL, gtkListSetInsertAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "APPEND", NULL, gtkListSetAppendAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "READONLY", gtkListGetReadOnlyAttrib, gtkListSetReadOnlyAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "NC", iupListGetNCAttrib, gtkListSetNCAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "CLIPBOARD", NULL, gtkListSetClipboardAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTO", NULL, gtkListSetScrollToAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTOPOS", NULL, gtkListSetScrollToPosAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); +} diff --git a/iup/src/gtk/iupgtk_loop.c b/iup/src/gtk/iupgtk_loop.c new file mode 100755 index 0000000..e349a45 --- /dev/null +++ b/iup/src/gtk/iupgtk_loop.c @@ -0,0 +1,93 @@ +/** \file + * \brief GTK Message Loop + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include + +#include "iup.h" +#include "iupcbs.h" + + +/* local variables */ +static IFidle gtk_idle_cb = NULL; +static guint gtk_idle_id; + +static gboolean gtkIdleFunc(gpointer data) +{ + (void)data; + if (gtk_idle_cb) + { + int ret = gtk_idle_cb(); + if (ret == IUP_CLOSE) + { + gtk_idle_cb = NULL; + IupExitLoop(); + return FALSE; /* removes the idle */ + } + if (ret == IUP_IGNORE) + { + gtk_idle_cb = NULL; + return FALSE; /* removes the idle */ + } + + return TRUE; /* keeps the idle */ + } + + return FALSE; /* removes the idle */ +} + +void iupdrvSetIdleFunction(Icallback f) +{ + if (gtk_idle_cb) + g_source_remove(gtk_idle_id); + + gtk_idle_cb = (IFidle)f; + + if (gtk_idle_cb) + gtk_idle_id = g_idle_add(gtkIdleFunc, NULL); +} + +void IupExitLoop(void) +{ + if (gtk_main_iteration_do(FALSE)==FALSE) + gtk_main_quit(); +} + +int IupMainLoopLevel(void) +{ + return gtk_main_level(); +} + +int IupMainLoop(void) +{ + gtk_main(); + return IUP_NOERROR; +} + +int IupLoopStep(void) +{ + if (gtk_main_iteration_do(FALSE)) + return IUP_CLOSE; + return IUP_DEFAULT; +} + +void IupFlush(void) +{ + IFidle old_gtk_idle_cb = NULL; + if (gtk_idle_cb) + { + old_gtk_idle_cb = gtk_idle_cb; + iupdrvSetIdleFunction(NULL); + } + + while (gtk_events_pending()) + gtk_main_iteration(); + + if (old_gtk_idle_cb) + iupdrvSetIdleFunction((Icallback)old_gtk_idle_cb); +} diff --git a/iup/src/gtk/iupgtk_menu.c b/iup/src/gtk/iupgtk_menu.c new file mode 100755 index 0000000..c12fbea --- /dev/null +++ b/iup/src/gtk/iupgtk_menu.c @@ -0,0 +1,525 @@ +/** \file + * \brief Menu Resources + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#ifdef HILDON +#include +#endif + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_label.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_image.h" +#include "iup_menu.h" + +#include "iupgtk_drv.h" + + +typedef struct _ImenuPos +{ + int x, y; +} ImenuPos; + +static void gtkMenuPositionFunc(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, ImenuPos *menupos) +{ + *x = menupos->x; + *y = menupos->y; + *push_in = FALSE; + (void)menu; +} + +int iupdrvMenuPopup(Ihandle* ih, int x, int y) +{ + ImenuPos menupos; + menupos.x = x; + menupos.y = y; + gtk_menu_popup((GtkMenu*)ih->handle, NULL, NULL, (GtkMenuPositionFunc)gtkMenuPositionFunc, + (gpointer)&menupos, 0, gtk_get_current_event_time()); + gtk_main(); + return IUP_NOERROR; +} + +int iupdrvMenuGetMenuBarSize(Ihandle* ih) +{ + int ch; + iupdrvFontGetCharSize(ih, NULL, &ch); +#ifdef WIN32 + return 3 + ch + 3; +#else + return 4 + ch + 4; +#endif +} + +static void gtkItemUpdateImage(Ihandle* ih, const char* value, const char* image, const char* impress) +{ + GdkPixbuf* pixbuf; + + if (!impress || !iupStrBoolean(value)) + pixbuf = iupImageGetImage(image, ih, 0); + else + pixbuf = iupImageGetImage(impress, ih, 0); + + if (pixbuf) + { + GtkWidget* image_label = gtk_image_menu_item_get_image((GtkImageMenuItem*)ih->handle); + if (!image_label) + { + image_label = gtk_image_new(); + gtk_image_menu_item_set_image((GtkImageMenuItem*)ih->handle, image_label); + } + + if (pixbuf != gtk_image_get_pixbuf((GtkImage*)image_label)) + gtk_image_set_from_pixbuf((GtkImage*)image_label, pixbuf); + } + else + gtk_image_menu_item_set_image((GtkImageMenuItem*)ih->handle, NULL); +} + + +/*******************************************************************************************/ + + +static void gtkMenuMap(GtkWidget *widget, Ihandle* ih) +{ + Icallback cb = IupGetCallback(ih, "OPEN_CB"); + if (!cb && ih->parent) cb = (Icallback)IupGetCallback(ih->parent, "OPEN_CB"); /* check also in the Submenu */ + if (cb) cb(ih); + + (void)widget; +} + +static void gtkMenuUnMap(GtkWidget *widget, Ihandle* ih) +{ + Icallback cb = IupGetCallback(ih, "MENUCLOSE_CB"); + if (!cb && ih->parent) cb = (Icallback)IupGetCallback(ih->parent, "MENUCLOSE_CB"); /* check also in the Submenu */ + if (cb) cb(ih); + + (void)widget; +} + +static void gtkPopupMenuUnMap(GtkWidget *widget, Ihandle* ih) +{ + gtkMenuUnMap(widget, ih); + + /* quit the popup loop */ + gtk_main_quit(); +} + +static void gtkItemSelect(GtkWidget *widget, Ihandle* ih) +{ + Icallback cb = IupGetCallback(ih, "HIGHLIGHT_CB"); + if (cb) + cb(ih); + + cb = IupGetCallback(ih, "HELP_CB"); + if (cb) + gtk_menu_set_active((GtkMenu*)ih->parent->handle, IupGetChildPos(ih->parent, ih)); + + (void)widget; +} + +static void gtkItemActivate(GtkWidget *widget, Ihandle* ih) +{ + Icallback cb; + + if (GTK_IS_CHECK_MENU_ITEM(ih->handle) && !iupAttribGetBoolean(ih, "AUTOTOGGLE") && !iupAttribGetBoolean(ih->parent, "RADIO")) + { + /* GTK by default will do autotoggle */ + g_signal_handlers_block_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkItemActivate), ih); + gtk_check_menu_item_set_active((GtkCheckMenuItem*)ih->handle, !gtk_check_menu_item_get_active((GtkCheckMenuItem*)ih->handle)); + g_signal_handlers_unblock_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkItemActivate), ih); + } + + if (GTK_IS_IMAGE_MENU_ITEM(ih->handle)) + { + if (iupAttribGetBoolean(ih, "AUTOTOGGLE")) + { + if (iupAttribGetBoolean(ih, "VALUE")) + iupAttribSetStr(ih, "VALUE", "OFF"); + else + iupAttribSetStr(ih, "VALUE", "ON"); + + gtkItemUpdateImage(ih, iupAttribGet(ih, "VALUE"), iupAttribGet(ih, "IMAGE"), iupAttribGet(ih, "IMPRESS")); + } + } + + cb = IupGetCallback(ih, "ACTION"); + if (cb && cb(ih)==IUP_CLOSE) + IupExitLoop(); + + (void)widget; +} + +static gboolean gtkMenuKeyPressEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle *ih) +{ + if (evt->keyval == GDK_F1) + { + Ihandle* child; + GtkWidget* active = gtk_menu_get_active((GtkMenu*)widget); + for (child=ih->firstchild; child; child=child->brother) + { + if (child->handle == active) + iupgtkShowHelp(NULL, NULL, child); + } + } + + (void)widget; + (void)evt; + return FALSE; +} + + +/*******************************************************************************************/ + + +static int gtkMenuMapMethod(Ihandle* ih) +{ + if (iupMenuIsMenuBar(ih)) + { + /* top level menu used for MENU attribute in IupDialog (a menu bar) */ +#ifdef HILDON + Ihandle *pih; + ih->handle = gtk_menu_new(); + if (!ih->handle) + return IUP_ERROR; + + pih = iupChildTreeGetNativeParent(ih); + hildon_window_set_menu(HILDON_WINDOW(pih->handle), GTK_MENU(ih->handle)); +#else + ih->handle = gtk_menu_bar_new(); + if (!ih->handle) + return IUP_ERROR; + + iupgtkBaseAddToParent(ih); +#endif + } + else + { + ih->handle = gtk_menu_new(); + if (!ih->handle) + return IUP_ERROR; + + if (ih->parent) + { + /* parent is a submenu */ + gtk_menu_item_set_submenu((GtkMenuItem*)ih->parent->handle, ih->handle); + + g_signal_connect(G_OBJECT(ih->handle), "map", G_CALLBACK(gtkMenuMap), ih); + g_signal_connect(G_OBJECT(ih->handle), "unmap", G_CALLBACK(gtkMenuUnMap), ih); + } + else + { + /* top level menu used for IupPopup */ + iupAttribSetStr(ih, "_IUPGTK_POPUP_MENU", "1"); + + g_signal_connect(G_OBJECT(ih->handle), "map", G_CALLBACK(gtkMenuMap), ih); + g_signal_connect(G_OBJECT(ih->handle), "unmap", G_CALLBACK(gtkPopupMenuUnMap), ih); + } + } + + gtk_widget_add_events(ih->handle, GDK_KEY_PRESS_MASK); + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(gtkMenuKeyPressEvent), ih); + + ih->serial = iupMenuGetChildId(ih); + gtk_widget_show(ih->handle); + + return IUP_NOERROR; +} + +void iupdrvMenuInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkMenuMapMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Used by iupdrvMenuGetMenuBarSize */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, NULL, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_DEFAULT); /* use inheritance to retrieve standard fonts */ + + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, NULL, NULL, IUPAF_DEFAULT); +} + + +/*******************************************************************************************/ + +static int gtkItemSetTitleImageAttrib(Ihandle* ih, const char* value) +{ + if (GTK_IS_IMAGE_MENU_ITEM(ih->handle)) + { + gtkItemUpdateImage(ih, NULL, value, NULL); + return 1; + } + else + return 0; +} + +static int gtkItemSetImageAttrib(Ihandle* ih, const char* value) +{ + if (GTK_IS_IMAGE_MENU_ITEM(ih->handle)) + { + gtkItemUpdateImage(ih, iupAttribGet(ih, "VALUE"), value, iupAttribGet(ih, "IMPRESS")); + return 1; + } + else + return 0; +} + +static int gtkItemSetImpressAttrib(Ihandle* ih, const char* value) +{ + if (GTK_IS_IMAGE_MENU_ITEM(ih->handle)) + { + gtkItemUpdateImage(ih, iupAttribGet(ih, "VALUE"), iupAttribGet(ih, "IMAGE"), value); + return 1; + } + else + return 0; +} + +static int gtkItemSetTitleAttrib(Ihandle* ih, const char* value) +{ + char *str; + GtkWidget* label; + + if (!value) + { + str = " "; + value = str; + } + else + str = iupMenuProcessTitle(ih, value); + + label = gtk_bin_get_child((GtkBin*)ih->handle); + + iupgtkSetMnemonicTitle(ih, (GtkLabel*)label, str); + + if (str != value) free(str); + return 1; +} + +static int gtkItemSetValueAttrib(Ihandle* ih, const char* value) +{ + if (GTK_IS_CHECK_MENU_ITEM(ih->handle)) + { + if (iupAttribGetBoolean(ih->parent, "RADIO")) + value = "ON"; + + g_signal_handlers_block_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkItemActivate), ih); + gtk_check_menu_item_set_active((GtkCheckMenuItem*)ih->handle, iupStrBoolean(value)); + g_signal_handlers_unblock_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkItemActivate), ih); + return 0; + } + else if (GTK_IS_IMAGE_MENU_ITEM(ih->handle)) + { + gtkItemUpdateImage(ih, value, iupAttribGet(ih, "IMAGE"), iupAttribGet(ih, "IMPRESS")); + return 1; + } + else + return 0; +} + +static char* gtkItemGetValueAttrib(Ihandle* ih) +{ + if (GTK_IS_CHECK_MENU_ITEM(ih->handle)) + { + if (gtk_check_menu_item_get_active((GtkCheckMenuItem*)ih->handle)) + return "ON"; + else + return "OFF"; + } + else + return NULL; +} + +static int gtkItemMapMethod(Ihandle* ih) +{ + int pos; + + if (!ih->parent) + return IUP_ERROR; + +#ifndef HILDON + if (iupMenuIsMenuBar(ih->parent)) + ih->handle = gtk_menu_item_new_with_label(""); + else +#endif + { + if (iupAttribGet(ih, "IMAGE")||iupAttribGet(ih, "TITLEIMAGE")) + ih->handle = gtk_image_menu_item_new_with_label(""); + else if (iupAttribGetBoolean(ih->parent, "RADIO")) + { + GtkRadioMenuItem* last_tg = (GtkRadioMenuItem*)iupAttribGet(ih->parent, "_IUPGTK_LASTRADIOITEM"); + if (last_tg) + ih->handle = gtk_radio_menu_item_new_with_label_from_widget(last_tg, ""); + else + ih->handle = gtk_radio_menu_item_new_with_label(NULL, ""); + iupAttribSetStr(ih->parent, "_IUPGTK_LASTRADIOITEM", (char*)ih->handle); + } + else + { + char* hidemark = iupAttribGetStr(ih, "HIDEMARK"); + if (!hidemark && gtk_check_version(2, 14, 0) == NULL) + { + /* force HIDEMARK if VALUE is defined before Map, after GTK 2.14 */ + if (!iupAttribGet(ih, "VALUE")) + hidemark = "YES"; + } + + if (iupStrBoolean(hidemark)) + ih->handle = gtk_menu_item_new_with_label(""); + else + ih->handle = gtk_check_menu_item_new_with_label(""); + } + } + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupMenuGetChildId(ih); + + g_signal_connect(G_OBJECT(ih->handle), "select", G_CALLBACK(gtkItemSelect), ih); + g_signal_connect(G_OBJECT(ih->handle), "activate", G_CALLBACK(gtkItemActivate), ih); + + pos = IupGetChildPos(ih->parent, ih); + gtk_menu_shell_insert((GtkMenuShell*)ih->parent->handle, ih->handle, pos); + gtk_widget_show(ih->handle); + + iupUpdateStandardFontAttrib(ih); + + return IUP_NOERROR; +} + +void iupdrvItemInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkItemMapMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, iupdrvSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); /* use inheritance to retrieve standard fonts */ + + /* Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iupBaseSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* IupItem only */ + iupClassRegisterAttribute(ic, "VALUE", gtkItemGetValueAttrib, gtkItemSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TITLE", NULL, gtkItemSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TITLEIMAGE", NULL, gtkItemSetTitleImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, gtkItemSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMPRESS", NULL, gtkItemSetImpressAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupItem GTK and Motif only */ + iupClassRegisterAttribute(ic, "HIDEMARK", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED); +} + + +/*******************************************************************************************/ + + +static int gtkSubmenuSetImageAttrib(Ihandle* ih, const char* value) +{ + if (GTK_IS_IMAGE_MENU_ITEM(ih->handle)) + { + gtkItemUpdateImage(ih, NULL, value, NULL); + return 1; + } + else + return 0; +} + +static int motSubmenuMapMethod(Ihandle* ih) +{ + int pos; + + if (!ih->parent) + return IUP_ERROR; + +#ifndef HILDON + if (iupMenuIsMenuBar(ih->parent)) + ih->handle = gtk_menu_item_new_with_label(""); + else +#endif + ih->handle = gtk_image_menu_item_new_with_label(""); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupMenuGetChildId(ih); + + pos = IupGetChildPos(ih->parent, ih); + gtk_menu_shell_insert((GtkMenuShell*)ih->parent->handle, ih->handle, pos); + gtk_widget_show(ih->handle); + + g_signal_connect(G_OBJECT(ih->handle), "select", G_CALLBACK(gtkItemSelect), ih); + + iupUpdateStandardFontAttrib(ih); + + return IUP_NOERROR; +} + +void iupdrvSubmenuInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motSubmenuMapMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, iupdrvSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); /* use inheritance to retrieve standard fonts */ + + /* Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iupBaseSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* IupSubmenu only */ + iupClassRegisterAttribute(ic, "TITLE", NULL, gtkItemSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, gtkSubmenuSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); +} + + +/*******************************************************************************************/ + + +static int gtkSeparatorMapMethod(Ihandle* ih) +{ + int pos; + + if (!ih->parent) + return IUP_ERROR; + + ih->handle = gtk_separator_menu_item_new(); + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupMenuGetChildId(ih); + + pos = IupGetChildPos(ih->parent, ih); + gtk_menu_shell_insert((GtkMenuShell*)ih->parent->handle, ih->handle, pos); + gtk_widget_show(ih->handle); + + return IUP_NOERROR; +} + +void iupdrvSeparatorInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkSeparatorMapMethod; + ic->UnMap = iupdrvBaseUnMapMethod; +} diff --git a/iup/src/gtk/iupgtk_messagedlg.c b/iup/src/gtk/iupgtk_messagedlg.c new file mode 100755 index 0000000..a036af6 --- /dev/null +++ b/iup/src/gtk/iupgtk_messagedlg.c @@ -0,0 +1,128 @@ +/** \file + * \brief GTK IupMessageDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" + +#include "iupgtk_drv.h" + +/* Sometimes GTK decides to invert the buttons position because of the GNOME Guidelines. + To avoid that we define different Ids for the buttons. */ +#define IUP_RESPONSE_1 -100 +#define IUP_RESPONSE_2 -200 +#define IUP_RESPONSE_HELP -300 + +#ifndef GTK_MESSAGE_OTHER +#define GTK_MESSAGE_OTHER GTK_MESSAGE_INFO +#endif + +static int gtkMessageDlgPopup(Ihandle* ih, int x, int y) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + GtkMessageType type = GTK_MESSAGE_OTHER; + GtkWidget* dialog; + char *icon, *buttons, *title; + int response, num_but = 2; + + iupAttribSetInt(ih, "_IUPDLG_X", x); /* used in iupDialogUpdatePosition */ + iupAttribSetInt(ih, "_IUPDLG_Y", y); + + icon = iupAttribGetStr(ih, "DIALOGTYPE"); + if (iupStrEqualNoCase(icon, "ERROR")) + type = GTK_MESSAGE_ERROR; + else if (iupStrEqualNoCase(icon, "WARNING")) + type = GTK_MESSAGE_WARNING; + else if (iupStrEqualNoCase(icon, "INFORMATION")) + type = GTK_MESSAGE_INFO; + else if (iupStrEqualNoCase(icon, "QUESTION")) + type = GTK_MESSAGE_QUESTION; + + dialog = gtk_message_dialog_new((GtkWindow*)parent, + 0, + type, + GTK_BUTTONS_NONE, + iupgtkStrConvertToUTF8(iupAttribGet(ih, "VALUE"))); + if (!dialog) + return IUP_ERROR; + + title = iupAttribGet(ih, "TITLE"); + if (title) + gtk_window_set_title(GTK_WINDOW(dialog), iupgtkStrConvertToUTF8(title)); + + buttons = iupAttribGetStr(ih, "BUTTONS"); + if (iupStrEqualNoCase(buttons, "OKCANCEL")) + { + gtk_dialog_add_button(GTK_DIALOG(dialog), + GTK_STOCK_OK, + IUP_RESPONSE_1); + gtk_dialog_add_button(GTK_DIALOG(dialog), + GTK_STOCK_CANCEL, + IUP_RESPONSE_2); + } + else if (iupStrEqualNoCase(buttons, "YESNO")) + { + gtk_dialog_add_button(GTK_DIALOG(dialog), + GTK_STOCK_YES, + IUP_RESPONSE_1); + gtk_dialog_add_button(GTK_DIALOG(dialog), + GTK_STOCK_NO, + IUP_RESPONSE_2); + } + else /* OK */ + { + gtk_dialog_add_button(GTK_DIALOG(dialog), + GTK_STOCK_OK, + IUP_RESPONSE_1); + num_but = 1; + } + + if (IupGetCallback(ih, "HELP_CB")) + gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_HELP, IUP_RESPONSE_HELP); + + if (num_but == 2 && iupAttribGetInt(ih, "BUTTONDEFAULT") == 2) + gtk_dialog_set_default_response(GTK_DIALOG(dialog), IUP_RESPONSE_2); + else + gtk_dialog_set_default_response(GTK_DIALOG(dialog), IUP_RESPONSE_1); + + /* initialize the widget */ + gtk_widget_realize(dialog); + + ih->handle = dialog; + iupDialogUpdatePosition(ih); + ih->handle = NULL; + + do + { + response = gtk_dialog_run(GTK_DIALOG(dialog)); + + if (response == IUP_RESPONSE_HELP) + { + Icallback cb = IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + response = (num_but == 2)? IUP_RESPONSE_2: IUP_RESPONSE_1; + } + } while (response == IUP_RESPONSE_HELP); + + if (response == IUP_RESPONSE_1) + IupSetAttribute(ih, "BUTTONRESPONSE", "1"); + else + IupSetAttribute(ih, "BUTTONRESPONSE", "2"); + + gtk_widget_destroy(dialog); + + return IUP_NOERROR; +} + +void iupdrvMessageDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = gtkMessageDlgPopup; +} diff --git a/iup/src/gtk/iupgtk_open.c b/iup/src/gtk/iupgtk_open.c new file mode 100755 index 0000000..66e46e8 --- /dev/null +++ b/iup/src/gtk/iupgtk_open.c @@ -0,0 +1,172 @@ +/** \file + * \brief GTK Driver Core + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvinfo.h" +#include "iup_object.h" +#include "iup_globalattrib.h" + +#include "iupgtk_drv.h" + + +#ifdef WIN32 /******************************** WIN32 ************************************/ +#include + +char* iupgtkGetNativeWindowHandle(Ihandle* ih) +{ + GdkWindow* window = ih->handle->window; + if (window) + return (char*)GDK_WINDOW_HWND(window); + else + return NULL; +} + +void* iupgtkGetNativeGraphicsContext(GtkWidget* widget) +{ + return GetDC(GDK_WINDOW_HWND(widget->window)); +} + +void iupgtkReleaseNativeGraphicsContext(GtkWidget* widget, void* gc) +{ + ReleaseDC(GDK_WINDOW_HWND(widget->window), (HDC)gc); +} + +void* iupdrvGetDisplay(void) +{ + return NULL; +} + +void iupgtkPushVisualAndColormap(void* visual, void* colormap) +{ + (void)visual; + (void)colormap; +} + +static void gtkSetDrvGlobalAttrib(void) +{ +} + +#else /******************************** X11 ************************************/ +#include + +char* iupgtkGetNativeWindowHandle(Ihandle* ih) +{ + GdkWindow* window = ih->handle->window; + if (window) + return (char*)GDK_WINDOW_XID(window); + else + return NULL; +} + +void* iupgtkGetNativeGraphicsContext(GtkWidget* widget) +{ + GdkDisplay* display = gdk_display_get_default(); + return (void*)XCreateGC(GDK_DISPLAY_XDISPLAY(display), GDK_WINDOW_XID(widget->window), 0, NULL); +} + +void iupgtkReleaseNativeGraphicsContext(GtkWidget* widget, void* gc) +{ + GdkDisplay* display = gdk_display_get_default(); + XFreeGC(GDK_DISPLAY_XDISPLAY(display), (GC)gc); + (void)widget; +} + +void* iupdrvGetDisplay(void) +{ + GdkDisplay* display = gdk_display_get_default(); + return GDK_DISPLAY_XDISPLAY(display); +} + +void iupgtkPushVisualAndColormap(void* visual, void* colormap) +{ + GdkColormap* gdk_colormap; + GdkVisual *gdk_visual = gdkx_visual_get(XVisualIDFromVisual((Visual*)visual)); + if (colormap) + gdk_colormap = gdk_x11_colormap_foreign_new(gdk_visual, (Colormap)colormap); + else + gdk_colormap = gdk_colormap_new(gdk_visual, FALSE); + + gtk_widget_push_colormap(gdk_colormap); + + /* gtk_widget_push_visual is now deprecated */ +} + +static void gtkSetDrvGlobalAttrib(void) +{ + GdkDisplay* display = gdk_display_get_default(); + Display* xdisplay = GDK_DISPLAY_XDISPLAY(display); + IupSetGlobal("XDISPLAY", (char*)xdisplay); + IupSetGlobal("XSCREEN", (char*)XDefaultScreen(xdisplay)); + IupSetGlobal("XSERVERVENDOR", ServerVendor(xdisplay)); + IupSetfAttribute(NULL, "XVENDORRELEASE", "%d", VendorRelease(xdisplay)); +} + +#endif + +static void gtkSetGlobalColorAttrib(const char* name, GdkColor *color) +{ + iupGlobalSetDefaultColorAttrib(name, (int)iupCOLOR16TO8(color->red), + (int)iupCOLOR16TO8(color->green), + (int)iupCOLOR16TO8(color->blue)); +} + +void iupgtkUpdateGlobalColors(GtkStyle* style) +{ + GdkColor color = style->bg[GTK_STATE_NORMAL]; + gtkSetGlobalColorAttrib("DLGBGCOLOR", &color); + + color = style->fg[GTK_STATE_NORMAL]; + gtkSetGlobalColorAttrib("DLGFGCOLOR", &color); + + color = style->base[GTK_STATE_NORMAL]; + gtkSetGlobalColorAttrib("TXTBGCOLOR", &color); + + color = style->text[GTK_STATE_NORMAL]; + gtkSetGlobalColorAttrib("TXTFGCOLOR", &color); +} + +int iupdrvOpen(int *argc, char ***argv) +{ + GtkStyle* style; + + if (!gtk_init_check(argc, argv)) + return IUP_ERROR; + + IupSetGlobal("DRIVER", "GTK"); + + IupStoreGlobal("SYSTEMLANGUAGE", pango_language_to_string(gtk_get_default_language())); + + /* driver system version */ + IupSetfAttribute(NULL, "GTKVERSION", "%d.%d.%d", gtk_major_version, + gtk_minor_version, + gtk_micro_version); + IupSetfAttribute(NULL, "GTKDEVVERSION", "%d.%d.%d", GTK_MAJOR_VERSION, + GTK_MINOR_VERSION, + GTK_MICRO_VERSION); + + gtkSetDrvGlobalAttrib(); + + style = gtk_style_new(); + iupgtkUpdateGlobalColors(style); + IupSetGlobal("_IUP_RESET_GLOBALCOLORS", "YES"); /* will update the global colors when the first dialog is mapped */ + g_object_unref(style); + + return IUP_NOERROR; +} + +void iupdrvClose(void) +{ + iupgtkReleaseConvertUTF8(); +} diff --git a/iup/src/gtk/iupgtk_progressbar.c b/iup/src/gtk/iupgtk_progressbar.c new file mode 100755 index 0000000..7bc6cbb --- /dev/null +++ b/iup/src/gtk/iupgtk_progressbar.c @@ -0,0 +1,131 @@ +/** \file +* \brief Progress bar Control +* +* See Copyright Notice in "iup.h" +*/ + +#undef GTK_DISABLE_DEPRECATED +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_progressbar.h" +#include "iup_drv.h" + +#include "iupgtk_drv.h" + + +static int gtkProgressBarSetMarqueeAttrib(Ihandle* ih, const char* value) +{ + GtkProgress* progress = (GtkProgress*)ih->handle; + + if (iupStrBoolean(value)) + { + ih->data->marquee = 1; + gtk_progress_set_activity_mode(progress, TRUE); + } + else + { + gtk_progress_set_activity_mode(progress, FALSE); + ih->data->marquee = 0; + } + + return 1; +} + +static int gtkProgressBarSetValueAttrib(Ihandle* ih, const char* value) +{ + GtkProgressBar* pbar = (GtkProgressBar*)ih->handle; + + if (!value) + ih->data->value = 0; + else + ih->data->value = atof(value); + iProgressBarCropValue(ih); + + if (ih->data->marquee) + gtk_progress_bar_pulse(pbar); + else + gtk_progress_bar_set_fraction(pbar, (ih->data->value - ih->data->vmin) / (ih->data->vmax - ih->data->vmin)); + + return 0; +} + +static int gtkProgressBarSetDashedAttrib(Ihandle* ih, const char* value) +{ + GtkProgressBar* pbar = (GtkProgressBar*)ih->handle; + + /* gtk_progress_bar_set_bar_style is deprecated */ + if (iupStrBoolean(value)) + { + ih->data->dashed = 1; + gtk_progress_bar_set_bar_style(pbar, GTK_PROGRESS_DISCRETE); + } + else /* Default */ + { + ih->data->dashed = 0; + gtk_progress_bar_set_bar_style(pbar, GTK_PROGRESS_CONTINUOUS); + } + + return 0; +} + +static int gtkProgressBarMapMethod(Ihandle* ih) +{ + ih->handle = gtk_progress_bar_new(); + if (!ih->handle) + return IUP_ERROR; + + /* add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + gtk_widget_realize(ih->handle); + + if (iupStrEqualNoCase(iupAttribGetStr(ih, "ORIENTATION"), "VERTICAL")) + { + gtk_progress_bar_set_orientation((GtkProgressBar*)ih->handle, GTK_PROGRESS_BOTTOM_TO_TOP); + + if (ih->currentheight < ih->currentwidth) + { + int tmp = ih->currentheight; + ih->currentheight = ih->currentwidth; + ih->currentwidth = tmp; + } + } + else + gtk_progress_bar_set_orientation((GtkProgressBar*)ih->handle, GTK_PROGRESS_LEFT_TO_RIGHT); + + return IUP_NOERROR; +} + +void iupdrvProgressBarInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkProgressBarMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, NULL, NULL, NULL, IUPAF_DEFAULT); + + /* IupProgressBar only */ + iupClassRegisterAttribute(ic, "VALUE", iProgressBarGetValueAttrib, gtkProgressBarSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DASHED", iProgressBarGetDashedAttrib, gtkProgressBarSetDashedAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ORIENTATION", NULL, NULL, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MARQUEE", NULL, gtkProgressBarSetMarqueeAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DASHED", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/gtk/iupgtk_tabs.c b/iup/src/gtk/iupgtk_tabs.c new file mode 100755 index 0000000..8029826 --- /dev/null +++ b/iup/src/gtk/iupgtk_tabs.c @@ -0,0 +1,444 @@ +/** \file +* \brief Tabs Control +* +* See Copyright Notice in "iup.h" +*/ + +#include + +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_image.h" +#include "iup_tabs.h" + +#include "iupgtk_drv.h" + + +int iupdrvTabsExtraDecor(Ihandle* ih) +{ + (void)ih; + return 0; +} + +int iupdrvTabsGetLineCountAttrib(Ihandle* ih) +{ + (void)ih; + return 1; +} + +void iupdrvTabsSetCurrentTab(Ihandle* ih, int pos) +{ + iupAttribSetStr(ih, "_IUPGTK_IGNORE_CHANGE", "1"); + gtk_notebook_set_current_page((GtkNotebook*)ih->handle, pos); + iupAttribSetStr(ih, "_IUPGTK_IGNORE_CHANGE", NULL); +} + +int iupdrvTabsGetCurrentTab(Ihandle* ih) +{ + return gtk_notebook_get_current_page((GtkNotebook*)ih->handle); +} + +static void gtkTabsUpdatePageFont(Ihandle* ih) +{ + Ihandle* child; + PangoFontDescription* fontdesc = (PangoFontDescription*)iupgtkGetPangoFontDescAttrib(ih); + + for (child = ih->firstchild; child; child = child->brother) + { + GtkWidget* tab_label = (GtkWidget*)iupAttribGet(child, "_IUPGTK_TABLABEL"); + if (tab_label) + { + gtk_widget_modify_font(tab_label, fontdesc); + iupgtkFontUpdatePangoLayout(ih, gtk_label_get_layout((GtkLabel*)tab_label)); + } + } +} + +static void gtkTabsUpdatePageBgColor(Ihandle* ih, unsigned char r, unsigned char g, unsigned char b) +{ + Ihandle* child; + + for (child = ih->firstchild; child; child = child->brother) + { + GtkWidget* tab_page = (GtkWidget*)iupAttribGet(child, "_IUPTAB_CONTAINER"); + if (tab_page) + { + GtkWidget* tab_label = (GtkWidget*)iupAttribGet(child, "_IUPGTK_TABLABEL"); + if (tab_label) + iupgtkBaseSetBgColor(tab_label, r, g, b); + iupgtkBaseSetBgColor(tab_page, r, g, b); + } + } +} + +static void gtkTabsUpdatePageFgColor(Ihandle* ih, unsigned char r, unsigned char g, unsigned char b) +{ + Ihandle* child; + + for (child = ih->firstchild; child; child = child->brother) + { + GtkWidget* tab_label = (GtkWidget*)iupAttribGet(child, "_IUPGTK_TABLABEL"); + if (tab_label) + iupgtkBaseSetFgColor(tab_label, r, g, b); + } +} + +static void gtkTabsUpdatePagePadding(Ihandle* ih) +{ + Ihandle* child; + + for (child = ih->firstchild; child; child = child->brother) + { + GtkWidget* tab_label = (GtkWidget*)iupAttribGet(child, "_IUPGTK_TABLABEL"); + if (tab_label) + gtk_misc_set_padding((GtkMisc*)tab_label, ih->data->horiz_padding, ih->data->vert_padding); + } +} + +/* ------------------------------------------------------------------------- */ +/* gtkTabs - Sets and Gets accessors */ +/* ------------------------------------------------------------------------- */ + + +static int gtkTabsSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + + if (ih->handle) + gtkTabsUpdatePagePadding(ih); + return 0; +} + +static void gtkTabsUpdateTabType(Ihandle* ih) +{ + GtkNotebook* tab_page = (GtkNotebook*)ih->handle; + int iup2gtk[4] = {GTK_POS_TOP, GTK_POS_BOTTOM, GTK_POS_LEFT, GTK_POS_RIGHT}; + gtk_notebook_set_tab_pos(tab_page, iup2gtk[ih->data->type]); +} + +static int gtkTabsSetTabTypeAttrib(Ihandle* ih, const char* value) +{ + if(iupStrEqualNoCase(value, "BOTTOM")) + ih->data->type = ITABS_BOTTOM; + else if(iupStrEqualNoCase(value, "LEFT")) + ih->data->type = ITABS_LEFT; + else if(iupStrEqualNoCase(value, "RIGHT")) + ih->data->type = ITABS_RIGHT; + else /* "TOP" */ + ih->data->type = ITABS_TOP; + + if (ih->handle) + gtkTabsUpdateTabType(ih); + + return 0; +} + +static int gtkTabsSetTabOrientationAttrib(Ihandle* ih, const char* value) +{ + if (ih->handle) /* allow to set only before mapping */ + return 0; + + if(iupStrEqualNoCase(value, "VERTICAL")) + ih->data->orientation = ITABS_VERTICAL; + else /* HORIZONTAL */ + ih->data->orientation = ITABS_HORIZONTAL; + + return 0; +} + +static int gtkTabsSetTabTitleAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int pos; + if (value && iupStrToInt(name_id, &pos)==1) + { + Ihandle* child = IupGetChild(ih, pos); + GtkWidget* tab_label = (GtkWidget*)iupAttribGet(child, "_IUPGTK_TABLABEL"); + if (tab_label) + { + GtkWidget* tab_page = (GtkWidget*)iupAttribGet(child, "_IUPTAB_CONTAINER"); + gtk_label_set_text((GtkLabel*)tab_label, iupgtkStrConvertToUTF8(value)); + gtk_notebook_set_menu_label_text((GtkNotebook*)ih->handle, tab_page, gtk_label_get_text((GtkLabel*)tab_label)); + } + } + return 1; +} + +static int gtkTabsSetTabImageAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int pos; + if (value && iupStrToInt(name_id, &pos)==1) + { + Ihandle* child = IupGetChild(ih, pos); + GtkWidget* tab_image = (GtkWidget*)iupAttribGet(child, "_IUPGTK_TABIMAGE"); + if (tab_image) + { + GdkPixbuf* pixbuf = iupImageGetImage(value, ih, 0); + if (pixbuf) + gtk_image_set_from_pixbuf((GtkImage*)tab_image, pixbuf); + } + } + return 1; +} + +static int gtkTabsSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + iupdrvSetStandardFontAttrib(ih, value); + if (ih->handle) + gtkTabsUpdatePageFont(ih); + return 1; +} + +static int gtkTabsSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgtkBaseSetFgColor(ih->handle, r, g, b); + gtkTabsUpdatePageFgColor(ih, r, g, b); + + return 1; +} + +static int gtkTabsSetBgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgtkBaseSetBgColor(ih->handle, r, g, b); + gtkTabsUpdatePageBgColor(ih, r, g, b); + + return 1; +} + + +/* ------------------------------------------------------------------------- */ +/* gtkTabs - Callbacks */ +/* ------------------------------------------------------------------------- */ + +void gtkTabSwitchPage(GtkNotebook* notebook, GtkNotebookPage *page, int pos, Ihandle* ih) +{ + IFnnn cb; + Ihandle* child = IupGetChild(ih, pos); + Ihandle* prev_child = IupGetChild(ih, iupdrvTabsGetCurrentTab(ih)); + IupSetAttribute(child, "VISIBLE", "YES"); + IupSetAttribute(prev_child, "VISIBLE", "NO"); + + if (iupAttribGet(ih, "_IUPGTK_IGNORE_CHANGE")) + return; + + cb = (IFnnn)IupGetCallback(ih, "TABCHANGE_CB"); + if (cb) + cb(ih, child, prev_child); + + (void)notebook; + (void)page; +} + +/* ------------------------------------------------------------------------- */ +/* gtkTabs - Methods and Init Class */ +/* ------------------------------------------------------------------------- */ + +static void gtkTabsChildAddedMethod(Ihandle* ih, Ihandle* child) +{ + if (IupGetName(child) == NULL) + iupAttribSetHandleName(child); + + if (ih->handle) + { + GtkWidget* tab_page; + GtkWidget *tab_label = NULL, *tab_image = NULL; + char *tabtitle, *tabimage; + int pos; + unsigned char r, g, b; + + pos = IupGetChildPos(ih, child); + + tab_page = gtk_fixed_new(); + gtk_widget_show(tab_page); + + tabtitle = iupAttribGet(child, "TABTITLE"); + if (!tabtitle) tabtitle = iupTabsAttribGetStrId(ih, "TABTITLE", pos); + tabimage = iupAttribGet(child, "TABIMAGE"); + if (!tabimage) tabimage = iupTabsAttribGetStrId(ih, "TABIMAGE", pos); + if (!tabtitle && !tabimage) + tabtitle = " "; + + if (tabtitle) + { + tab_label = gtk_label_new(iupgtkStrConvertToUTF8(tabtitle)); + +#if GTK_CHECK_VERSION(2, 6, 0) + if (ih->data->orientation == ITABS_VERTICAL) + gtk_label_set_angle((GtkLabel*)tab_label, 90); +#endif + } + + if (tabimage) + { + GdkPixbuf* pixbuf = iupImageGetImage(tabimage, ih, 0); + + tab_image = gtk_image_new(); + + if (pixbuf) + gtk_image_set_from_pixbuf((GtkImage*)tab_image, pixbuf); + } + + iupAttribSetStr(ih, "_IUPGTK_IGNORE_CHANGE", "1"); + + if (tabimage && tabtitle) + { + GtkWidget* box; + if (ih->data->orientation == ITABS_VERTICAL) + box = gtk_vbox_new(FALSE, 2); + else + box = gtk_hbox_new(FALSE, 2); + gtk_widget_show(box); + + gtk_container_add((GtkContainer*)box, tab_image); + gtk_container_add((GtkContainer*)box, tab_label); + + gtk_notebook_insert_page((GtkNotebook*)ih->handle, tab_page, box, pos); + gtk_notebook_set_menu_label_text((GtkNotebook*)ih->handle, tab_page, gtk_label_get_text((GtkLabel*)tab_label)); + } + else if (tabimage) + gtk_notebook_insert_page((GtkNotebook*)ih->handle, tab_page, tab_image, pos); + else + gtk_notebook_insert_page((GtkNotebook*)ih->handle, tab_page, tab_label, pos); + + gtk_widget_realize(tab_page); + + iupAttribSetStr(child, "_IUPGTK_TABIMAGE", (char*)tab_image); /* store it even if its NULL */ + iupAttribSetStr(child, "_IUPGTK_TABLABEL", (char*)tab_label); + iupAttribSetStr(child, "_IUPTAB_CONTAINER", (char*)tab_page); + iupStrToRGB(IupGetAttribute(ih, "BGCOLOR"), &r, &g, &b); + iupgtkBaseSetBgColor(tab_page, r, g, b); + + if (tabtitle) + { + PangoFontDescription* fontdesc = (PangoFontDescription*)iupgtkGetPangoFontDescAttrib(ih); + gtk_widget_modify_font(tab_label, fontdesc); + iupgtkFontUpdatePangoLayout(ih, gtk_label_get_layout((GtkLabel*)tab_label)); + + iupgtkBaseSetBgColor(tab_label, r, g, b); + + iupStrToRGB(IupGetAttribute(ih, "FGCOLOR"), &r, &g, &b); + iupgtkBaseSetFgColor(tab_label, r, g, b); + + gtk_widget_show(tab_label); + gtk_widget_realize(tab_label); + } + + if (tabimage) + { + gtk_widget_show(tab_image); + gtk_widget_realize(tab_image); + } + + iupAttribSetStr(ih, "_IUPGTK_IGNORE_CHANGE", NULL); + + if (pos == iupdrvTabsGetCurrentTab(ih)) + IupSetAttribute(child, "VISIBLE", "YES"); + else + IupSetAttribute(child, "VISIBLE", "NO"); + } +} + +static void gtkTabsChildRemovedMethod(Ihandle* ih, Ihandle* child) +{ + if (ih->handle) + { + GtkWidget* tab_page = (GtkWidget*)iupAttribGet(child, "_IUPTAB_CONTAINER"); + if (tab_page) + { + int pos = gtk_notebook_page_num((GtkNotebook*)ih->handle, tab_page); + + iupAttribSetStr(ih, "_IUPGTK_IGNORE_CHANGE", "1"); + gtk_notebook_remove_page((GtkNotebook*)ih->handle, pos); + iupAttribSetStr(ih, "_IUPGTK_IGNORE_CHANGE", NULL); + + iupAttribSetStr(child, "_IUPGTK_TABIMAGE", NULL); + iupAttribSetStr(child, "_IUPGTK_TABLABEL", NULL); + iupAttribSetStr(child, "_IUPTAB_CONTAINER", NULL); + } + } +} + +static int gtkTabsMapMethod(Ihandle* ih) +{ + ih->handle = gtk_notebook_new(); + if (!ih->handle) + return IUP_ERROR; + + gtk_notebook_set_scrollable((GtkNotebook*)ih->handle, TRUE); + gtk_notebook_popup_enable((GtkNotebook*)ih->handle); + + gtkTabsUpdateTabType(ih); + + /* add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + gtk_widget_add_events(ih->handle, GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK); + + g_signal_connect(G_OBJECT(ih->handle), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(iupgtkKeyPressEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + + g_signal_connect(G_OBJECT(ih->handle), "switch-page", G_CALLBACK(gtkTabSwitchPage), ih); + + gtk_widget_realize(ih->handle); + + /* Create pages and tabs */ + if (ih->firstchild) + { + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + gtkTabsChildAddedMethod(ih, child); + } + + return IUP_NOERROR; +} + +void iupdrvTabsInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkTabsMapMethod; + ic->ChildAdded = gtkTabsChildAddedMethod; + ic->ChildRemoved = gtkTabsChildRemovedMethod; + + /* Driver Dependent Attribute functions */ + + /* Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, gtkTabsSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, gtkTabsSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, gtkTabsSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + + /* IupTabs only */ + iupClassRegisterAttribute(ic, "TABTYPE", iupTabsGetTabTypeAttrib, gtkTabsSetTabTypeAttrib, IUPAF_SAMEASSYSTEM, "TOP", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TABORIENTATION", iupTabsGetTabOrientationAttrib, gtkTabsSetTabOrientationAttrib, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TABTITLE", NULL, gtkTabsSetTabTitleAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TABIMAGE", NULL, gtkTabsSetTabImageAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PADDING", iupTabsGetPaddingAttrib, gtkTabsSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); +} diff --git a/iup/src/gtk/iupgtk_text.c b/iup/src/gtk/iupgtk_text.c new file mode 100755 index 0000000..4c2906a --- /dev/null +++ b/iup/src/gtk/iupgtk_text.c @@ -0,0 +1,1716 @@ +/** \file + * \brief Text Control + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" +#include "iup_mask.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_image.h" +#include "iup_key.h" +#include "iup_array.h" +#include "iup_text.h" + +#include "iupgtk_drv.h" + +#ifndef PANGO_WEIGHT_SEMIBOLD +#define PANGO_WEIGHT_SEMIBOLD 600 +#endif + +void iupdrvTextAddSpin(int *w, int h) +{ + int spin_size = 16; + *w += spin_size; + (void)h; +} + +void iupdrvTextAddBorders(int *x, int *y) +{ + int border_size = 2*5; + (*x) += border_size; + (*y) += border_size; +} + +static void gtkTextParseParagraphFormat(Ihandle* formattag, GtkTextTag* tag) +{ + int val; + char* format; + + format = iupAttribGet(formattag, "INDENT"); + if (format && iupStrToInt(format, &val)) + g_object_set(G_OBJECT(tag), "indent", val, NULL); + + format = iupAttribGet(formattag, "ALIGNMENT"); + if (format) + { + if (iupStrEqualNoCase(format, "JUSTIFY")) + val = GTK_JUSTIFY_FILL; + else if (iupStrEqualNoCase(format, "RIGHT")) + val = GTK_JUSTIFY_RIGHT; + else if (iupStrEqualNoCase(format, "CENTER")) + val = GTK_JUSTIFY_CENTER; + else /* "LEFT" */ + val = GTK_JUSTIFY_LEFT; + + g_object_set(G_OBJECT(tag), "justification", val, NULL); + } + + format = iupAttribGet(formattag, "TABSARRAY"); + { + PangoTabArray *tabs; + int pos, i = 0; + PangoTabAlign align; + char* str; + + tabs = pango_tab_array_new(32, FALSE); + + while (format) + { + str = iupStrCopyUntil((char**)&format, ' '); + if (!str) break; + pos = atoi(str); + free(str); + + str = iupStrCopyUntil((char**)&format, ' '); + if (!str) break; + +/* if (iupStrEqualNoCase(str, "DECIMAL")) unsupported for now + align = PANGO_TAB_NUMERIC; + else if (iupStrEqualNoCase(str, "RIGHT")) + align = PANGO_TAB_RIGHT; + else if (iupStrEqualNoCase(str, "CENTER")) + align = PANGO_TAB_CENTER; + else */ /* "LEFT" */ + align = PANGO_TAB_LEFT; + free(str); + + pango_tab_array_set_tab(tabs, i, align, IUPGTK_PIXELS2PANGOUNITS(pos)); + i++; + if (i == 32) break; + } + + g_object_set(G_OBJECT(tag), "tabs", tabs, NULL); + pango_tab_array_free(tabs); + } + + format = iupAttribGet(formattag, "SPACEBEFORE"); + if (format && iupStrToInt(format, &val)) + g_object_set(G_OBJECT(tag), "pixels-above-lines", val, NULL); + + format = iupAttribGet(formattag, "SPACEAFTER"); + if (format && iupStrToInt(format, &val)) + g_object_set(G_OBJECT(tag), "pixels-below-lines", val, NULL); + + format = iupAttribGet(formattag, "LINESPACING"); + if (format && iupStrToInt(format, &val)) + g_object_set(G_OBJECT(tag), "pixels-inside-wrap", val, NULL); +} + +static void gtkTextParseCharacterFormat(Ihandle* formattag, GtkTextTag* tag) +{ + int val; + char* format; + + format = iupAttribGet(formattag, "LANGUAGE"); + if (format) + g_object_set(G_OBJECT(tag), "language", format, NULL); + + format = iupAttribGet(formattag, "STRETCH"); + if (format) + { + if (iupStrEqualNoCase(format, "EXTRA_CONDENSED")) + val = PANGO_STRETCH_EXTRA_CONDENSED; + else if (iupStrEqualNoCase(format, "CONDENSED")) + val = PANGO_STRETCH_CONDENSED; + else if (iupStrEqualNoCase(format, "SEMI_CONDENSED")) + val = PANGO_STRETCH_SEMI_CONDENSED; + else if (iupStrEqualNoCase(format, "SEMI_EXPANDED")) + val = PANGO_STRETCH_SEMI_EXPANDED; + else if (iupStrEqualNoCase(format, "EXPANDED")) + val = PANGO_STRETCH_EXPANDED; + else if (iupStrEqualNoCase(format, "EXTRA_EXPANDED")) + val = PANGO_STRETCH_EXTRA_EXPANDED; + else /* "NORMAL" */ + val = PANGO_STRETCH_NORMAL; + + g_object_set(G_OBJECT(tag), "stretch", val, NULL); + } + + format = iupAttribGet(formattag, "RISE"); + if (format) + { + val = 0; + + if (iupStrEqualNoCase(format, "SUPERSCRIPT")) + { + g_object_set(G_OBJECT(tag), "scale", PANGO_SCALE_X_SMALL, NULL); + val = 10; /* 10 pixels up */ + } + else if (iupStrEqualNoCase(format, "SUBSCRIPT")) + { + g_object_set(G_OBJECT(tag), "scale", PANGO_SCALE_X_SMALL, NULL); + val = -10; /* 10 pixels down */ + } + else + iupStrToInt(format, &val); + + val = IUPGTK_PIXELS2PANGOUNITS(val); + g_object_set(G_OBJECT(tag), "rise", val, NULL); + } + + format = iupAttribGet(formattag, "SMALLCAPS"); + if (format) + { + if (iupStrBoolean(format)) + val = PANGO_VARIANT_SMALL_CAPS; + else + val = PANGO_VARIANT_NORMAL; + g_object_set(G_OBJECT(tag), "variant", val, NULL); + } + + format = iupAttribGet(formattag, "ITALIC"); + if (format) + { + if (iupStrBoolean(format)) + val = PANGO_STYLE_ITALIC; + else + val = PANGO_STYLE_NORMAL; + g_object_set(G_OBJECT(tag), "style", val, NULL); + } + + format = iupAttribGet(formattag, "STRIKEOUT"); + if (format) + { + val = iupStrBoolean(format); + g_object_set(G_OBJECT(tag), "strikethrough", val, NULL); + } + + format = iupAttribGet(formattag, "PROTECTED"); + if (format) + { + val = iupStrBoolean(format); + g_object_set(G_OBJECT(tag), "editable", val, NULL); + } + + format = iupAttribGet(formattag, "FONTSIZE"); + if (format && iupStrToInt(format, &val)) + { + if (val < 0) /* in pixels */ + { + val = IUPGTK_PIXELS2PANGOUNITS(-val); + g_object_set(G_OBJECT(tag), "size", val, NULL); + } + else /* in points */ + g_object_set(G_OBJECT(tag), "size-points", (double)val, NULL); + } + + format = iupAttribGet(formattag, "FONTSCALE"); + if (format) + { + float fval = 0; + if (iupStrEqualNoCase(format, "XX-SMALL")) + fval = (float)PANGO_SCALE_XX_SMALL; + else if (iupStrEqualNoCase(format, "X-SMALL")) + fval = (float)PANGO_SCALE_X_SMALL; + else if (iupStrEqualNoCase(format, "SMALL")) + fval = (float)PANGO_SCALE_SMALL; + else if (iupStrEqualNoCase(format, "MEDIUM")) + fval = (float)PANGO_SCALE_MEDIUM; + else if (iupStrEqualNoCase(format, "LARGE")) + fval = (float)PANGO_SCALE_LARGE; + else if (iupStrEqualNoCase(format, "X-LARGE")) + fval = (float)PANGO_SCALE_X_LARGE; + else if (iupStrEqualNoCase(format, "XX-LARGE")) + fval = (float)PANGO_SCALE_XX_LARGE; + else + iupStrToFloat(format, &fval); + + if (fval > 0) + g_object_set(G_OBJECT(tag), "scale", (double)fval, NULL); + } + + format = iupAttribGet(formattag, "FONTFACE"); + if (format) + g_object_set(G_OBJECT(tag), "family", format, NULL); + + format = iupAttribGet(formattag, "FGCOLOR"); + if (format) + { + unsigned char r, g, b; + if (iupStrToRGB(format, &r, &g, &b)) + { + GdkColor color; + iupgdkColorSet(&color, r, g, b); + g_object_set(G_OBJECT(tag), "foreground-gdk", &color, NULL); + } + } + + format = iupAttribGet(formattag, "BGCOLOR"); + if (format) + { + unsigned char r, g, b; + if (iupStrToRGB(format, &r, &g, &b)) + { + GdkColor color; + iupgdkColorSet(&color, r, g, b); + g_object_set(G_OBJECT(tag), "background-gdk", &color, NULL); + } + } + + format = iupAttribGet(formattag, "UNDERLINE"); + if (format) + { + if (iupStrEqualNoCase(format, "SINGLE")) + val = PANGO_UNDERLINE_SINGLE; + else if (iupStrEqualNoCase(format, "DOUBLE")) + val = PANGO_UNDERLINE_DOUBLE; + else /* "NONE" */ + val = PANGO_UNDERLINE_NONE; + + g_object_set(G_OBJECT(tag), "underline", val, NULL); + } + + format = iupAttribGet(formattag, "WEIGHT"); + if (format) + { + if (iupStrEqualNoCase(format, "EXTRALIGHT")) + val = PANGO_WEIGHT_ULTRALIGHT; + else if (iupStrEqualNoCase(format, "LIGHT")) + val = PANGO_WEIGHT_LIGHT; + else if (iupStrEqualNoCase(format, "SEMIBOLD")) + val = PANGO_WEIGHT_SEMIBOLD; + else if (iupStrEqualNoCase(format, "BOLD")) + val = PANGO_WEIGHT_BOLD; + else if (iupStrEqualNoCase(format, "EXTRABOLD")) + val = PANGO_WEIGHT_ULTRABOLD; + else if (iupStrEqualNoCase(format, "HEAVY")) + val = PANGO_WEIGHT_HEAVY; + else /* "NORMAL" */ + val = PANGO_WEIGHT_NORMAL; + + g_object_set(G_OBJECT(tag), "weight", val, NULL); + } +} + +static void gtkTextMoveIterToLinCol(GtkTextBuffer *buffer, GtkTextIter *iter, int lin, int col) +{ + int line_count, line_length; + + lin--; /* IUP starts at 1 */ + col--; + + line_count = gtk_text_buffer_get_line_count(buffer); + if (lin < 0) lin = 0; + if (lin >= line_count) + lin = line_count-1; + + gtk_text_buffer_get_iter_at_line(buffer, iter, lin); + line_length = gtk_text_iter_get_chars_in_line(iter); + + if (col < 0) col = 0; + if (col > line_length) + col = line_length; /* after the last character */ + + gtk_text_iter_set_line_offset(iter, col); +} + +static void gtkTextGetLinColFromPosition(const GtkTextIter *iter, int *lin, int *col) +{ + *lin = gtk_text_iter_get_line(iter); + *col = gtk_text_iter_get_line_offset(iter); + + (*lin)++; /* IUP starts at 1 */ + (*col)++; +} + +static int gtkTextGetCharSize(Ihandle* ih) +{ + int charwidth; + PangoFontMetrics* metrics; + PangoContext* context; + PangoFontDescription* fontdesc = (PangoFontDescription*)iupgtkGetPangoFontDescAttrib(ih); + if (!fontdesc) + return 0; + + context = gdk_pango_context_get(); + metrics = pango_context_get_metrics(context, fontdesc, pango_context_get_language(context)); + charwidth = pango_font_metrics_get_approximate_char_width(metrics); + pango_font_metrics_unref(metrics); + return charwidth; +} + +void iupdrvTextConvertLinColToPos(Ihandle* ih, int lin, int col, int *pos) +{ + GtkTextIter iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtkTextMoveIterToLinCol(buffer, &iter, lin, col); + *pos = gtk_text_iter_get_offset(&iter); +} + +void iupdrvTextConvertPosToLinCol(Ihandle* ih, int pos, int *lin, int *col) +{ + GtkTextIter iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_iter_at_offset(buffer, &iter, pos); + gtkTextGetLinColFromPosition(&iter, lin, col); +} + +static int gtkTextConvertXYToPos(Ihandle* ih, int x, int y) +{ + if (ih->data->is_multiline) + { + GtkTextIter iter; + gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(ih->handle), GTK_TEXT_WINDOW_WIDGET, x, y, &x, &y); + gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(ih->handle), &iter, x, y); + return gtk_text_iter_get_offset(&iter); + } + else + { + int trailing, off_x, off_y, pos; + + /* transform to Layout coordinates */ + gtk_entry_get_layout_offsets(GTK_ENTRY(ih->handle), &off_x, &off_y); + x = IUPGTK_PIXELS2PANGOUNITS(x - off_x); + y = IUPGTK_PIXELS2PANGOUNITS(y - off_y); + + pango_layout_xy_to_index(gtk_entry_get_layout(GTK_ENTRY(ih->handle)), x, y, &pos, &trailing); + return pos; + } +} + +static void gtkTextScrollToVisible(Ihandle* ih) +{ + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + GtkTextMark* mark = gtk_text_buffer_get_insert(buffer); + gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(ih->handle), mark); +} + + +/*******************************************************************************************/ + + +static int gtkTextSetSelectionAttrib(Ihandle* ih, const char* value) +{ + if (!value) + return 0; + + if (!value || iupStrEqualNoCase(value, "NONE")) + { + if (ih->data->is_multiline) + { + GtkTextIter start_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_start_iter(buffer, &start_iter); + gtk_text_buffer_select_range(buffer, &start_iter, &start_iter); + } + else + gtk_editable_select_region(GTK_EDITABLE(ih->handle), 0, 0); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + if (ih->data->is_multiline) + { + GtkTextIter start_iter; + GtkTextIter end_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_start_iter(buffer, &start_iter); + gtk_text_buffer_get_end_iter(buffer, &end_iter); + gtk_text_buffer_select_range(buffer, &start_iter, &end_iter); + } + else + gtk_editable_select_region(GTK_EDITABLE(ih->handle), 0, -1); + return 0; + } + + if (ih->data->is_multiline) + { + int lin_start=1, col_start=1, lin_end=1, col_end=1; + GtkTextIter start_iter, end_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + + if (sscanf(value, "%d,%d:%d,%d", &lin_start, &col_start, &lin_end, &col_end)!=4) return 0; + if (lin_start<1 || col_start<1 || lin_end<1 || col_end<1) return 0; + + gtkTextMoveIterToLinCol(buffer, &start_iter, lin_start, col_start); + gtkTextMoveIterToLinCol(buffer, &end_iter, lin_end, col_end); + + gtk_text_buffer_select_range(buffer, &start_iter, &end_iter); + } + else + { + int start=1, end=1; + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<1 || end<1) + return 0; + + start--; /* IUP starts at 1 */ + end--; + + gtk_editable_select_region(GTK_EDITABLE(ih->handle), start, end); + } + + return 0; +} + +static char* gtkTextGetSelectionAttrib(Ihandle* ih) +{ + char *str; + + if (ih->data->is_multiline) + { + int start_col, start_lin, end_col, end_lin; + + GtkTextIter start_iter, end_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + if (gtk_text_buffer_get_selection_bounds(buffer, &start_iter, &end_iter)) + { + gtkTextGetLinColFromPosition(&start_iter, &start_lin, &start_col); + gtkTextGetLinColFromPosition(&end_iter, &end_lin, &end_col); + + str = iupStrGetMemory(100); + sprintf(str,"%d,%d:%d,%d", start_lin, start_col, end_lin, end_col); + return str; + } + } + else + { + int start, end; + if (gtk_editable_get_selection_bounds(GTK_EDITABLE(ih->handle), &start, &end)) + { + start++; /* IUP starts at 1 */ + end++; + str = iupStrGetMemory(100); + sprintf(str, "%d:%d", (int)start, (int)end); + return str; + } + } + + return NULL; +} + +static int gtkTextSetSelectionPosAttrib(Ihandle* ih, const char* value) +{ + int start=0, end=0; + + if (!value) + return 0; + + if (!value || iupStrEqualNoCase(value, "NONE")) + { + if (ih->data->is_multiline) + { + GtkTextIter start_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_start_iter(buffer, &start_iter); + gtk_text_buffer_select_range(buffer, &start_iter, &start_iter); + } + else + gtk_editable_select_region(GTK_EDITABLE(ih->handle), 0, 0); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + if (ih->data->is_multiline) + { + GtkTextIter start_iter; + GtkTextIter end_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_start_iter(buffer, &start_iter); + gtk_text_buffer_get_end_iter(buffer, &end_iter); + gtk_text_buffer_select_range(buffer, &start_iter, &end_iter); + } + else + gtk_editable_select_region(GTK_EDITABLE(ih->handle), 0, -1); + return 0; + } + + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<0 || end<0) + return 0; + + if (ih->data->is_multiline) + { + GtkTextIter start_iter, end_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + + gtk_text_buffer_get_iter_at_offset(buffer, &start_iter, start); + gtk_text_buffer_get_iter_at_offset(buffer, &end_iter, end); + + gtk_text_buffer_select_range(buffer, &start_iter, &end_iter); + } + else + gtk_editable_select_region(GTK_EDITABLE(ih->handle), start, end); + + return 0; +} + +static char* gtkTextGetSelectionPosAttrib(Ihandle* ih) +{ + int start, end; + char *str; + + if (ih->data->is_multiline) + { + GtkTextIter start_iter, end_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + if (gtk_text_buffer_get_selection_bounds(buffer, &start_iter, &end_iter)) + { + start = gtk_text_iter_get_offset(&start_iter); + end = gtk_text_iter_get_offset(&end_iter); + + str = iupStrGetMemory(100); + sprintf(str, "%d:%d", (int)start, (int)end); + return str; + } + } + else + { + if (gtk_editable_get_selection_bounds(GTK_EDITABLE(ih->handle), &start, &end)) + { + str = iupStrGetMemory(100); + sprintf(str, "%d:%d", (int)start, (int)end); + return str; + } + } + + return NULL; +} + +static int gtkTextSetSelectedTextAttrib(Ihandle* ih, const char* value) +{ + if (!value) + return 0; + + if (ih->data->is_multiline) + { + GtkTextIter start_iter, end_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + if (gtk_text_buffer_get_selection_bounds(buffer, &start_iter, &end_iter)) + { + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + gtk_text_buffer_delete(buffer, &start_iter, &end_iter); + gtk_text_buffer_insert(buffer, &start_iter, iupgtkStrConvertToUTF8(value), -1); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + } + } + else + { + int start, end; + if (gtk_editable_get_selection_bounds(GTK_EDITABLE(ih->handle), &start, &end)) + { + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + gtk_editable_delete_selection(GTK_EDITABLE(ih->handle)); + gtk_editable_insert_text(GTK_EDITABLE(ih->handle), iupgtkStrConvertToUTF8(value), -1, &start); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + } + } + + return 0; +} + +static char* gtkTextGetSelectedTextAttrib(Ihandle* ih) +{ + if (ih->data->is_multiline) + { + GtkTextIter start_iter, end_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + if (gtk_text_buffer_get_selection_bounds(buffer, &start_iter, &end_iter)) + return iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(gtk_text_buffer_get_text(buffer, &start_iter, &end_iter, TRUE))); + } + else + { + int start, end; + if (gtk_editable_get_selection_bounds(GTK_EDITABLE(ih->handle), &start, &end)) + { + char* selectedtext = gtk_editable_get_chars(GTK_EDITABLE(ih->handle), start, end); + char* str = iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(selectedtext)); + g_free(selectedtext); + return str; + } + } + + return NULL; +} + +static int gtkTextSetCaretAttrib(Ihandle* ih, const char* value) +{ + int pos = 1; + + if (!value) + return 0; + + if (ih->data->is_multiline) + { + int lin = 1, col = 1; + GtkTextIter iter; + + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + + iupStrToIntInt(value, &lin, &col, ','); + + gtkTextMoveIterToLinCol(buffer, &iter, lin, col); + + gtk_text_buffer_place_cursor(buffer, &iter); + gtkTextScrollToVisible(ih); + } + else + { + sscanf(value,"%i",&pos); + pos--; /* IUP starts at 1 */ + if (pos < 0) pos = 0; + + gtk_editable_set_position(GTK_EDITABLE(ih->handle), pos); + } + + return 0; +} + +static char* gtkTextGetCaretAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(50); + + if (ih->data->is_multiline) + { + int col, lin; + GtkTextIter iter; + + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_iter_at_mark(buffer, &iter, gtk_text_buffer_get_insert(buffer)); + gtkTextGetLinColFromPosition(&iter, &lin, &col); + + sprintf(str, "%d,%d", lin, col); + } + else + { + int pos = gtk_editable_get_position(GTK_EDITABLE(ih->handle)); + pos++; /* IUP starts at 1 */ + sprintf(str, "%d", (int)pos); + } + + return str; +} + +static int gtkTextSetCaretPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 0) pos = 0; + + if (ih->data->is_multiline) + { + GtkTextIter iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_iter_at_offset(buffer, &iter, pos); + gtk_text_buffer_place_cursor(buffer, &iter); + gtkTextScrollToVisible(ih); + } + else + gtk_editable_set_position(GTK_EDITABLE(ih->handle), pos); + + return 0; +} + +static char* gtkTextGetCaretPosAttrib(Ihandle* ih) +{ + int pos; + char* str = iupStrGetMemory(50); + + if (ih->data->is_multiline) + { + GtkTextIter iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_iter_at_mark(buffer, &iter, gtk_text_buffer_get_insert(buffer)); + pos = gtk_text_iter_get_offset(&iter); + } + else + pos = gtk_editable_get_position(GTK_EDITABLE(ih->handle)); + + sprintf(str, "%d", (int)pos); + return str; +} + +static int gtkTextSetScrollToAttrib(Ihandle* ih, const char* value) +{ + if (!value) + return 0; + + if (ih->data->is_multiline) + { + int lin = 1, col = 1; + GtkTextIter iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + + iupStrToIntInt(value, &lin, &col, ','); + if (lin < 1) lin = 1; + if (col < 1) col = 1; + + gtkTextMoveIterToLinCol(buffer, &iter, lin, col); + gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(ih->handle), &iter, 0, FALSE, 0, 0); + } + else + { + int pos = 1; + sscanf(value,"%i",&pos); + if (pos < 1) pos = 1; + pos--; /* return to GTK referece */ + gtk_editable_set_position(GTK_EDITABLE(ih->handle), pos); + } + + return 0; +} + +static int gtkTextSetScrollToPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 0) pos = 0; + + if (ih->data->is_multiline) + { + GtkTextIter iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_iter_at_offset(buffer, &iter, pos); + gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(ih->handle), &iter, 0, FALSE, 0, 0); + } + else + gtk_editable_set_position(GTK_EDITABLE(ih->handle), pos); + + return 0; +} + +static int gtkTextSetValueAttrib(Ihandle* ih, const char* value) +{ + if (!value) value = ""; + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + if (ih->data->is_multiline) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_set_text(buffer, iupgtkStrConvertToUTF8(value), -1); + } + else + gtk_entry_set_text(GTK_ENTRY(ih->handle), iupgtkStrConvertToUTF8(value)); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + return 0; +} + +static char* gtkTextGetValueAttrib(Ihandle* ih) +{ + char* value; + + if (ih->data->is_multiline) + { + GtkTextIter start_iter; + GtkTextIter end_iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_start_iter(buffer, &start_iter); + gtk_text_buffer_get_end_iter(buffer, &end_iter); + value = iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(gtk_text_buffer_get_text(buffer, &start_iter, &end_iter, TRUE))); + } + else + value = iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(gtk_entry_get_text(GTK_ENTRY(ih->handle)))); + + if (!value) value = ""; + + return value; +} + +static int gtkTextSetInsertAttrib(Ihandle* ih, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + if (!value) + return 0; + + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + if (ih->data->is_multiline) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_insert_at_cursor(buffer, iupgtkStrConvertToUTF8(value), -1); + } + else + { + gint pos = gtk_editable_get_position(GTK_EDITABLE(ih->handle)); + gtk_editable_insert_text(GTK_EDITABLE(ih->handle), iupgtkStrConvertToUTF8(value), -1, &pos); + } + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + + return 0; +} + +static int gtkTextSetAppendAttrib(Ihandle* ih, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + if (ih->data->is_multiline) + { + GtkTextIter iter; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_end_iter(buffer, &iter); + if (ih->data->append_newline) + gtk_text_buffer_insert(buffer, &iter, "\n", 1); + gtk_text_buffer_insert(buffer, &iter, iupgtkStrConvertToUTF8(value), -1); + } + else + { + gint pos = strlen(gtk_entry_get_text(GTK_ENTRY(ih->handle)))+1; + gtk_editable_insert_text(GTK_EDITABLE(ih->handle), iupgtkStrConvertToUTF8(value), -1, &pos); + } + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + return 0; +} + +static int gtkTextSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + float xalign; + GtkJustification justification; + + if (iupStrEqualNoCase(value, "ARIGHT")) + { + xalign = 1.0f; + justification = GTK_JUSTIFY_RIGHT; + } + else if (iupStrEqualNoCase(value, "ACENTER")) + { + xalign = 0.5f; + justification = GTK_JUSTIFY_CENTER; + } + else /* "ALEFT" */ + { + xalign = 0; + justification = GTK_JUSTIFY_LEFT; + } + + if (ih->data->is_multiline) + gtk_text_view_set_justification(GTK_TEXT_VIEW(ih->handle), justification); + else + gtk_entry_set_alignment(GTK_ENTRY(ih->handle), xalign); + + return 1; +} + +static int gtkTextSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + if (ih->handle) + { + if (ih->data->is_multiline) + { + gtk_text_view_set_left_margin(GTK_TEXT_VIEW(ih->handle), ih->data->horiz_padding); + gtk_text_view_set_right_margin(GTK_TEXT_VIEW(ih->handle), ih->data->horiz_padding); + ih->data->vert_padding = 0; + } + else + { +#if GTK_CHECK_VERSION(2, 10, 0) + GtkBorder border; + border.bottom = border.top = ih->data->vert_padding; + border.left = border.right = ih->data->horiz_padding; + gtk_entry_set_inner_border(GTK_ENTRY(ih->handle), &border); +#endif + } + } + return 0; +} + +static int gtkTextSetNCAttrib(Ihandle* ih, const char* value) +{ + if (!iupStrToInt(value, &ih->data->nc)) + ih->data->nc = INT_MAX; + + if (!ih->data->is_multiline && ih->handle) + gtk_entry_set_max_length(GTK_ENTRY(ih->handle), ih->data->nc); + + return 0; +} + +static int gtkTextSetClipboardAttrib(Ihandle *ih, const char *value) +{ + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + if (iupStrEqualNoCase(value, "COPY")) + { + if (ih->data->is_multiline) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + GtkClipboard *clipboard = gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE)); + gtk_text_buffer_copy_clipboard(buffer, clipboard); + } + else + gtk_editable_copy_clipboard(GTK_EDITABLE(ih->handle)); + } + else if (iupStrEqualNoCase(value, "CUT")) + { + if (ih->data->is_multiline) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + GtkClipboard *clipboard = gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE)); + gtk_text_buffer_cut_clipboard(buffer, clipboard, TRUE); + } + else + gtk_editable_cut_clipboard(GTK_EDITABLE(ih->handle)); + } + else if (iupStrEqualNoCase(value, "PASTE")) + { + if (ih->data->is_multiline) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + GtkClipboard *clipboard = gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE)); + gtk_text_buffer_paste_clipboard(buffer, clipboard, NULL, TRUE); + } + else + gtk_editable_paste_clipboard(GTK_EDITABLE(ih->handle)); + } + else if (iupStrEqualNoCase(value, "CLEAR")) + { + if (ih->data->is_multiline) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_delete_selection(buffer, FALSE, TRUE); + } + else + gtk_editable_delete_selection(GTK_EDITABLE(ih->handle)); + } + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + return 0; +} + +static int gtkTextSetReadOnlyAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->is_multiline) + gtk_text_view_set_editable(GTK_TEXT_VIEW(ih->handle), !iupStrBoolean(value)); + else + gtk_editable_set_editable(GTK_EDITABLE(ih->handle), !iupStrBoolean(value)); + return 0; +} + +static char* gtkTextGetReadOnlyAttrib(Ihandle* ih) +{ + int editable; + if (ih->data->is_multiline) + editable = gtk_text_view_get_editable(GTK_TEXT_VIEW(ih->handle)); + else + editable = gtk_editable_get_editable(GTK_EDITABLE(ih->handle)); + if (!editable) + return "YES"; + else + return "NO"; +} + +static char* gtkTextGetPangoLayoutAttrib(Ihandle* ih) +{ + if (ih->data->is_multiline) + return NULL; + else + return (char*)gtk_entry_get_layout(GTK_ENTRY(ih->handle)); +} + +static int gtkTextSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->is_multiline) + { + GtkScrolledWindow* scrolled_window = (GtkScrolledWindow*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + unsigned char r, g, b; + + /* ignore given value, must use only from parent for the scrollbars */ + char* parent_value = iupBaseNativeParentGetBgColor(ih); + + if (iupStrToRGB(parent_value, &r, &g, &b)) + { + GtkWidget* sb; + + iupgtkBaseSetBgColor((GtkWidget*)scrolled_window, r, g, b); + +#if GTK_CHECK_VERSION(2, 8, 0) + sb = gtk_scrolled_window_get_hscrollbar(scrolled_window); + if (sb) iupgtkBaseSetBgColor(sb, r, g, b); + + sb = gtk_scrolled_window_get_vscrollbar(scrolled_window); + if (sb) iupgtkBaseSetBgColor(sb, r, g, b); +#endif + } + } + + return iupdrvBaseSetBgColorAttrib(ih, value); +} + +static int gtkTextSetTabSizeAttrib(Ihandle* ih, const char* value) +{ + PangoTabArray *tabs; + int tabsize, charwidth; + if (!ih->data->is_multiline) + return 0; + + iupStrToInt(value, &tabsize); + charwidth = gtkTextGetCharSize(ih); + tabsize *= charwidth; + tabs = pango_tab_array_new_with_positions(1, FALSE, PANGO_TAB_LEFT, tabsize); + gtk_text_view_set_tabs(GTK_TEXT_VIEW(ih->handle), tabs); + pango_tab_array_free(tabs); + return 1; +} + +static int gtkTextSetOverwriteAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->is_multiline) + return 0; + gtk_text_view_set_overwrite(GTK_TEXT_VIEW(ih->handle), iupStrBoolean(value)); + return 0; +} + +static char* gtkTextGetOverwriteAttrib(Ihandle* ih) +{ + if (!ih->data->is_multiline) + return "NO"; + if (gtk_text_view_get_overwrite(GTK_TEXT_VIEW(ih->handle))) + return "YES"; + else + return "NO"; +} + +void iupdrvTextAddFormatTag(Ihandle* ih, Ihandle* formattag) +{ + GtkTextBuffer *buffer; + GtkTextIter start_iter, end_iter; + GtkTextTag* tag; + char *selection; + + if (!ih->data->is_multiline) + return; + + selection = iupAttribGet(formattag, "SELECTION"); + if (selection) + { + /* simulate Windows behavior and change the current selection */ + gtkTextSetSelectionAttrib(ih, selection); + iupAttribSetStr(ih, "SELECTION", NULL); + } + else + { + char* selectionpos = iupAttribGet(formattag, "SELECTIONPOS"); + if (selectionpos) + { + /* simulate Windows behavior and change the current selection */ + gtkTextSetSelectionPosAttrib(ih, selectionpos); + iupAttribSetStr(ih, "SELECTIONPOS", NULL); + } + } + + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + if (!gtk_text_buffer_get_selection_bounds(buffer, &start_iter, &end_iter)) + { + GtkTextMark* mark = gtk_text_buffer_get_insert(buffer); + gtk_text_buffer_get_iter_at_mark(buffer, &start_iter, mark); + gtk_text_buffer_get_iter_at_mark(buffer, &end_iter, mark); + } + + tag = gtk_text_buffer_create_tag(buffer, NULL, NULL); + gtkTextParseParagraphFormat(formattag, tag); + gtkTextParseCharacterFormat(formattag, tag); + gtk_text_buffer_apply_tag(buffer, tag, &start_iter, &end_iter); + + /* reset the selection */ + gtkTextSetSelectionAttrib(ih, NULL); +} + +static int gtkTextSetRemoveFormattingAttrib(Ihandle* ih, const char* value) +{ + GtkTextBuffer *buffer; + GtkTextIter start_iter, end_iter; + + if (!ih->data->is_multiline) + return 0; + + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + if (gtk_text_buffer_get_selection_bounds(buffer, &start_iter, &end_iter)) + gtk_text_buffer_remove_all_tags(buffer, &start_iter, &end_iter); + + (void)value; + return 0; +} + + +/************************************************************************************************/ + +static gboolean gtkTextSpinOutput(GtkSpinButton *spin, Ihandle* ih) +{ + if (iupAttribGet(ih, "_IUPGTK_SPIN_NOAUTO")) + { + iupAttribSetInt(ih, "_IUPGTK_SPIN_VALUE", (int)spin->adjustment->value); + return TRUE; /* disable output update */ + } + else + { + iupAttribSetStr(ih, "_IUPGTK_SPIN_OLDVALUE", gtk_entry_get_text(GTK_ENTRY(ih->handle))); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + return FALSE; + } +} + +static gint gtkTextSpinInput(GtkSpinButton *spin, gdouble *val, Ihandle* ih) +{ + (void)spin; + *val = (double)iupAttribGetInt(ih, "_IUPGTK_SPIN_VALUE"); + /* called only when SPINAUTO=NO */ + return TRUE; /* disable input update */ +} + +static void gtkTextSpinValueChanged(GtkSpinButton* spin, Ihandle* ih) +{ + IFni cb; + + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + + cb = (IFni)IupGetCallback(ih, "SPIN_CB"); + if (cb) + { + int pos, ret; + if (iupAttribGet(ih, "_IUPGTK_SPIN_NOAUTO")) + pos = iupAttribGetInt(ih, "_IUPGTK_SPIN_VALUE"); + else + pos = gtk_spin_button_get_value_as_int((GtkSpinButton*)ih->handle); + + ret = cb(ih, pos); + if (ret == IUP_IGNORE) + { + /* this is not working: g_signal_stop_emission_by_name(spin, "value_changed"); */ + } + } + + (void)spin; +} + +static int gtkTextSetSpinMinAttrib(Ihandle* ih, const char* value) +{ + if (GTK_IS_SPIN_BUTTON(ih->handle)) + { + int min; + if (iupStrToInt(value, &min)) + { + int max = iupAttribGetInt(ih, "SPINMAX"); + + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + g_signal_handlers_block_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkTextSpinValueChanged), ih); + + gtk_spin_button_set_range((GtkSpinButton*)ih->handle, (double)min, (double)max); + + g_signal_handlers_unblock_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkTextSpinValueChanged), ih); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + } + } + return 1; +} + +static int gtkTextSetSpinMaxAttrib(Ihandle* ih, const char* value) +{ + if (GTK_IS_SPIN_BUTTON(ih->handle)) + { + int max; + if (iupStrToInt(value, &max)) + { + int min = iupAttribGetInt(ih, "SPINMIN"); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + g_signal_handlers_block_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkTextSpinValueChanged), ih); + + gtk_spin_button_set_range((GtkSpinButton*)ih->handle, (double)min, (double)max); + + g_signal_handlers_unblock_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkTextSpinValueChanged), ih); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + } + } + return 1; +} + +static int gtkTextSetSpinIncAttrib(Ihandle* ih, const char* value) +{ + if (GTK_IS_SPIN_BUTTON(ih->handle)) + { + int inc; + if (iupStrToInt(value, &inc)) + gtk_spin_button_set_increments((GtkSpinButton*)ih->handle, (double)inc, (double)(inc*10)); + } + return 1; +} + +static int gtkTextSetSpinValueAttrib(Ihandle* ih, const char* value) +{ + if (GTK_IS_SPIN_BUTTON(ih->handle)) + { + int pos; + if (iupStrToInt(value, &pos)) + { + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + g_signal_handlers_block_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkTextSpinValueChanged), ih); + + gtk_spin_button_set_value((GtkSpinButton*)ih->handle, (double)pos); + + g_signal_handlers_unblock_by_func(G_OBJECT(ih->handle), G_CALLBACK(gtkTextSpinValueChanged), ih); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + + if (iupAttribGet(ih, "_IUPGTK_SPIN_NOAUTO")) + iupAttribSetInt(ih, "_IUPGTK_SPIN_VALUE", pos); + } + } + return 1; +} + +static char* gtkTextGetSpinValueAttrib(Ihandle* ih) +{ + if (GTK_IS_SPIN_BUTTON(ih->handle)) + { + int pos; + char *str = iupStrGetMemory(50); + + if (iupAttribGet(ih, "_IUPGTK_SPIN_NOAUTO")) + pos = iupAttribGetInt(ih, "_IUPGTK_SPIN_VALUE"); + else + pos = gtk_spin_button_get_value_as_int((GtkSpinButton*)ih->handle); + + sprintf(str, "%d", pos); + return str; + } + return NULL; +} + + +/**********************************************************************************************************/ + + +static void gtkTextMoveCursor(GtkWidget *w, GtkMovementStep step, gint count, gboolean extend_selection, Ihandle* ih) +{ + int col, lin, pos; + + IFniii cb = (IFniii)IupGetCallback(ih, "CARET_CB"); + if (!cb) return; + + if (ih->data->is_multiline) + { + GtkTextIter iter; + + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + gtk_text_buffer_get_iter_at_mark(buffer, &iter, gtk_text_buffer_get_insert(buffer)); + gtkTextGetLinColFromPosition(&iter, &lin, &col); + pos = gtk_text_iter_get_offset(&iter); + } + else + { + pos = gtk_editable_get_position(GTK_EDITABLE(ih->handle)); + col = pos; + col++; /* IUP starts at 1 */ + lin = 1; + } + + if (pos != ih->data->last_caret_pos) + { + ih->data->last_caret_pos = pos; + + cb(ih, lin, col, pos); + } + + (void)w; + (void)step; + (void)count; + (void)extend_selection; +} + +static gboolean gtkTextKeyReleaseEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle *ih) +{ + gtkTextMoveCursor(NULL, 0, 0, 0, ih); + (void)widget; + (void)evt; + return FALSE; +} + +static gboolean gtkTextButtonEvent(GtkWidget *widget, GdkEventButton *evt, Ihandle *ih) +{ + gtkTextMoveCursor(NULL, 0, 0, 0, ih); + return iupgtkButtonEvent(widget, evt, ih); +} + +static int gtkTextCallActionCb(Ihandle* ih, const char* insert_value, int len, int start, int end) +{ + char *new_value, *value; + int ret = -1, key = 0; + + IFnis cb = (IFnis)IupGetCallback(ih, "ACTION"); + if (!cb && !ih->data->mask) + return -1; /* continue */ + + value = gtkTextGetValueAttrib(ih); /* new_value is the internal buffer */ + + if (!insert_value) + { + new_value = iupStrDup(value); + if (end<0) end = strlen(value)+1; + iupStrRemove(new_value, start, end, 1); + } + else + { + if (value[0]==0) + new_value = iupStrDup(insert_value); + else + { + if (len < end-start) + { + new_value = iupStrDup(value); + new_value = iupStrInsert(new_value, insert_value, start, end); + } + else + new_value = iupStrInsert(value, insert_value, start, end); + } + } + + if (insert_value && insert_value[0]!=0 && insert_value[1]==0) + key = insert_value[0]; + + if (!new_value) + return -1; /* continue */ + + if (ih->data->nc && (int)strlen(new_value) > ih->data->nc) + { + if (new_value != value) free(new_value); + return 0; /* abort */ + } + + if (ih->data->mask && iupMaskCheck(ih->data->mask, new_value)==0) + { + if (new_value != value) free(new_value); + return 0; /* abort */ + } + + if (cb) + { + int cb_ret = cb(ih, key, (char*)new_value); + if (cb_ret==IUP_IGNORE) + ret = 0; /* abort */ + else if (cb_ret==IUP_CLOSE) + { + IupExitLoop(); + ret = 0; /* abort */ + } + else if (cb_ret!=0 && key!=0 && + cb_ret != IUP_DEFAULT && cb_ret != IUP_CONTINUE) + ret = cb_ret; /* abort and replace */ + } + + if (new_value != value) free(new_value); + return ret; /* continue */ +} + +static void gtkTextEntryDeleteText(GtkEditable *editable, int start, int end, Ihandle* ih) +{ + if (iupAttribGet(ih, "_IUPGTK_DISABLE_TEXT_CB")) + return; + + if (gtkTextCallActionCb(ih, NULL, 0, start, end)==0) + g_signal_stop_emission_by_name (editable, "delete_text"); +} + +static void gtkTextEntryInsertText(GtkEditable *editable, char *insert_value, int len, int *pos, Ihandle* ih) +{ + int ret; + + if (iupAttribGet(ih, "_IUPGTK_DISABLE_TEXT_CB")) + return; + + ret = gtkTextCallActionCb(ih, iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(insert_value)), len, *pos, *pos); + if (ret == 0) + g_signal_stop_emission_by_name(editable, "insert_text"); + else if (ret != -1) + { + insert_value[0] = (char)ret; /* replace key */ + + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + gtk_editable_insert_text(editable, insert_value, 1, pos); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + + g_signal_stop_emission_by_name(editable, "insert_text"); + } +} + +static void gtkTextBufferDeleteRange(GtkTextBuffer *textbuffer, GtkTextIter *start_iter, GtkTextIter *end_iter, Ihandle* ih) +{ + int start, end; + if (iupAttribGet(ih, "_IUPGTK_DISABLE_TEXT_CB")) + return; + + start = gtk_text_iter_get_offset(start_iter); + end = gtk_text_iter_get_offset(end_iter); + + if (gtkTextCallActionCb(ih, NULL, 0, start, end)==0) + g_signal_stop_emission_by_name (textbuffer, "delete_range"); +} + +static void gtkTextBufferInsertText(GtkTextBuffer *textbuffer, GtkTextIter *pos_iter, gchar *insert_value, gint len, Ihandle* ih) +{ + int ret, pos; + + if (iupAttribGet(ih, "_IUPGTK_DISABLE_TEXT_CB")) + return; + + pos = gtk_text_iter_get_offset(pos_iter); + + ret = gtkTextCallActionCb(ih, iupStrGetMemoryCopy(iupgtkStrConvertFromUTF8(insert_value)), len, pos, pos); + if (ret == 0) + g_signal_stop_emission_by_name(textbuffer, "insert_text"); + else if (ret != -1) + { + insert_value[0] = (char)ret; /* replace key */ + + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", "1"); + gtk_text_buffer_insert(textbuffer, pos_iter, insert_value, 1); + iupAttribSetStr(ih, "_IUPGTK_DISABLE_TEXT_CB", NULL); + + g_signal_stop_emission_by_name(textbuffer, "insert_text"); + } +} + +static void gtkTextChanged(void* dummy, Ihandle* ih) +{ + if (iupAttribGet(ih, "_IUPGTK_DISABLE_TEXT_CB")) + return; + + iupBaseCallValueChangedCb(ih); + (void)dummy; +} + +/**********************************************************************************************************/ + + +static int gtkTextMapMethod(Ihandle* ih) +{ + GtkScrolledWindow* scrolled_window = NULL; + + if (ih->data->is_multiline) + { + GtkPolicyType hscrollbar_policy, vscrollbar_policy; + int wordwrap = 0; + + ih->handle = gtk_text_view_new(); + if (!ih->handle) + return IUP_ERROR; + + scrolled_window = (GtkScrolledWindow*)gtk_scrolled_window_new(NULL, NULL); + if (!scrolled_window) + return IUP_ERROR; + + gtk_container_add((GtkContainer*)scrolled_window, ih->handle); + gtk_widget_show((GtkWidget*)scrolled_window); + + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)scrolled_window); + + /* formatting is always supported when MULTILINE=YES */ + ih->data->has_formatting = 1; + + if (iupAttribGetBoolean(ih, "WORDWRAP")) + { + wordwrap = 1; + ih->data->sb &= ~IUP_SB_HORIZ; /* must remove the horizontal scroolbar */ + } + + if (iupAttribGetBoolean(ih, "BORDER")) + gtk_scrolled_window_set_shadow_type(scrolled_window, GTK_SHADOW_IN); + else + gtk_scrolled_window_set_shadow_type(scrolled_window, GTK_SHADOW_NONE); + + if (ih->data->sb & IUP_SB_HORIZ) + { + if (iupAttribGetBoolean(ih, "AUTOHIDE")) + hscrollbar_policy = GTK_POLICY_AUTOMATIC; + else + hscrollbar_policy = GTK_POLICY_ALWAYS; + } + else + hscrollbar_policy = GTK_POLICY_NEVER; + + if (ih->data->sb & IUP_SB_VERT) + { + if (iupAttribGetBoolean(ih, "AUTOHIDE")) + vscrollbar_policy = GTK_POLICY_AUTOMATIC; + else + vscrollbar_policy = GTK_POLICY_ALWAYS; + } + else + vscrollbar_policy = GTK_POLICY_NEVER; + + gtk_scrolled_window_set_policy(scrolled_window, hscrollbar_policy, vscrollbar_policy); + + if (wordwrap) + gtk_text_view_set_wrap_mode((GtkTextView*)ih->handle, GTK_WRAP_WORD); + + gtk_widget_add_events(ih->handle, GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK); + } + else + { + if (iupAttribGetBoolean(ih, "SPIN")) + ih->handle = gtk_spin_button_new_with_range(0, 100, 1); + else + ih->handle = gtk_entry_new(); + + if (!ih->handle) + return IUP_ERROR; + + /* formatting is never supported when MULTILINE=NO */ + ih->data->has_formatting = 0; + + gtk_entry_set_has_frame((GtkEntry*)ih->handle, IupGetInt(ih, "BORDER")); + + if (iupAttribGetBoolean(ih, "PASSWORD")) + gtk_entry_set_visibility((GtkEntry*)ih->handle, FALSE); + + if (GTK_IS_SPIN_BUTTON(ih->handle)) + { + gtk_spin_button_set_numeric((GtkSpinButton*)ih->handle, FALSE); + gtk_spin_button_set_digits((GtkSpinButton*)ih->handle, 0); + + gtk_spin_button_set_wrap((GtkSpinButton*)ih->handle, iupAttribGetBoolean(ih, "SPINWRAP")); + + g_signal_connect(G_OBJECT(ih->handle), "value-changed", G_CALLBACK(gtkTextSpinValueChanged), ih); + g_signal_connect(G_OBJECT(ih->handle), "output", G_CALLBACK(gtkTextSpinOutput), ih); + + if (!iupAttribGetBoolean(ih, "SPINAUTO")) + { + g_signal_connect(G_OBJECT(ih->handle), "input", G_CALLBACK(gtkTextSpinInput), ih); + iupAttribSetStr(ih, "_IUPGTK_SPIN_NOAUTO", "1"); + } + } + } + + /* add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + if (!iupAttribGetBoolean(ih, "CANFOCUS")) + GTK_WIDGET_FLAGS(ih->handle) &= ~GTK_CAN_FOCUS; + + g_signal_connect(G_OBJECT(ih->handle), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(iupgtkKeyPressEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + + g_signal_connect_after(G_OBJECT(ih->handle), "move-cursor", G_CALLBACK(gtkTextMoveCursor), ih); /* only report some caret movements */ + g_signal_connect_after(G_OBJECT(ih->handle), "key-release-event", G_CALLBACK(gtkTextKeyReleaseEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "button-press-event", G_CALLBACK(gtkTextButtonEvent), ih); /* if connected "after" then it is ignored */ + g_signal_connect(G_OBJECT(ih->handle), "button-release-event",G_CALLBACK(gtkTextButtonEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "motion-notify-event",G_CALLBACK(iupgtkMotionNotifyEvent), ih); + + if (ih->data->is_multiline) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); + g_signal_connect(G_OBJECT(buffer), "delete-range", G_CALLBACK(gtkTextBufferDeleteRange), ih); + g_signal_connect(G_OBJECT(buffer), "insert-text", G_CALLBACK(gtkTextBufferInsertText), ih); + g_signal_connect(G_OBJECT(buffer), "changed", G_CALLBACK(gtkTextChanged), ih); + } + else + { + g_signal_connect(G_OBJECT(ih->handle), "delete-text", G_CALLBACK(gtkTextEntryDeleteText), ih); + g_signal_connect(G_OBJECT(ih->handle), "insert-text", G_CALLBACK(gtkTextEntryInsertText), ih); + g_signal_connect(G_OBJECT(ih->handle), "changed", G_CALLBACK(gtkTextChanged), ih); + } + + if (scrolled_window) + gtk_widget_realize((GtkWidget*)scrolled_window); + gtk_widget_realize(ih->handle); + + /* configure for DRAG&DROP */ + if (IupGetCallback(ih, "DROPFILES_CB")) + iupAttribSetStr(ih, "DRAGDROP", "YES"); + + /* update a mnemonic in a label if necessary */ + iupgtkUpdateMnemonic(ih); + + if (ih->data->formattags) + iupTextUpdateFormatTags(ih); + + IupSetCallback(ih, "_IUP_XY2POS_CB", (Icallback)gtkTextConvertXYToPos); + + return IUP_NOERROR; +} + +void iupdrvTextInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkTextMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Common GTK only (when text is in a secondary element) */ + iupClassRegisterAttribute(ic, "PANGOLAYOUT", gtkTextGetPangoLayoutAttrib, NULL, NULL, NULL, IUPAF_NO_INHERIT); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, gtkTextSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, iupdrvBaseSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTFGCOLOR", IUPAF_DEFAULT); + + /* IupText only */ + iupClassRegisterAttribute(ic, "PADDING", iupTextGetPaddingAttrib, gtkTextSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "VALUE", gtkTextGetValueAttrib, gtkTextSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTEDTEXT", gtkTextGetSelectedTextAttrib, gtkTextSetSelectedTextAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTION", gtkTextGetSelectionAttrib, gtkTextSetSelectionAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTIONPOS", gtkTextGetSelectionPosAttrib, gtkTextSetSelectionPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARET", gtkTextGetCaretAttrib, gtkTextSetCaretAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARETPOS", gtkTextGetCaretPosAttrib, gtkTextSetCaretPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "INSERT", NULL, gtkTextSetInsertAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "APPEND", NULL, gtkTextSetAppendAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "READONLY", gtkTextGetReadOnlyAttrib, gtkTextSetReadOnlyAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "NC", iupTextGetNCAttrib, gtkTextSetNCAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "CLIPBOARD", NULL, gtkTextSetClipboardAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTO", NULL, gtkTextSetScrollToAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTOPOS", NULL, gtkTextSetScrollToPosAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINMIN", NULL, gtkTextSetSpinMinAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINMAX", NULL, gtkTextSetSpinMaxAttrib, IUPAF_SAMEASSYSTEM, "100", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPININC", NULL, gtkTextSetSpinIncAttrib, IUPAF_SAMEASSYSTEM, "1", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINVALUE", gtkTextGetSpinValueAttrib, gtkTextSetSpinValueAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NO_INHERIT); + + /* IupText Windows and GTK only */ + iupClassRegisterAttribute(ic, "ADDFORMATTAG", NULL, iupTextSetAddFormatTagAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ADDFORMATTAG_HANDLE", NULL, iupTextSetAddFormatTagHandleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ALIGNMENT", NULL, gtkTextSetAlignmentAttrib, IUPAF_SAMEASSYSTEM, "ALEFT", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DRAGDROP", NULL, iupgtkSetDragDropAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FORMATTING", iupTextGetFormattingAttrib, iupTextSetFormattingAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "OVERWRITE", gtkTextGetOverwriteAttrib, gtkTextSetOverwriteAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "REMOVEFORMATTING", NULL, gtkTextSetRemoveFormattingAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TABSIZE", NULL, gtkTextSetTabSizeAttrib, "8", NULL, IUPAF_DEFAULT); /* force new default value */ + iupClassRegisterAttribute(ic, "PASSWORD", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/gtk/iupgtk_timer.c b/iup/src/gtk/iupgtk_timer.c new file mode 100755 index 0000000..ecbefa3 --- /dev/null +++ b/iup/src/gtk/iupgtk_timer.c @@ -0,0 +1,61 @@ +/** \file + * \brief Timer for the GTK Driver. + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_assert.h" +#include "iup_timer.h" + + +static gboolean gtkTimerProc(gpointer data) +{ + Ihandle *ih = (Ihandle*)data; + Icallback cb; + + if (!iupObjectCheck(ih)) /* control could be destroyed before timer callback */ + return FALSE; + + cb = IupGetCallback(ih, "ACTION_CB"); + if (cb && cb(ih)==IUP_CLOSE) + IupExitLoop(); + + return TRUE; +} + +void iupdrvTimerRun(Ihandle *ih) +{ + unsigned int time_ms; + + if (ih->serial > 0) /* timer already started */ + return; + + time_ms = iupAttribGetInt(ih, "TIME"); + if (time_ms > 0) + ih->serial = g_timeout_add(time_ms, gtkTimerProc, (gpointer)ih); +} + +void iupdrvTimerStop(Ihandle* ih) +{ + if (ih->serial > 0) + { + g_source_remove(ih->serial); + ih->serial = -1; + } +} + +void iupdrvTimerInitClass(Iclass* ic) +{ + (void)ic; +} diff --git a/iup/src/gtk/iupgtk_tips.c b/iup/src/gtk/iupgtk_tips.c new file mode 100755 index 0000000..6289d70 --- /dev/null +++ b/iup/src/gtk/iupgtk_tips.c @@ -0,0 +1,100 @@ +/** \file + * \brief Windows Driver TIPS management + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_str.h" +#include "iup_attrib.h" +#include "iup_image.h" + +#include "iupgtk_drv.h" + +#if GTK_CHECK_VERSION(2, 12, 0) +#else +static GtkTooltips* gtk_tips = NULL; /* old TIPS */ +#endif + +#if GTK_CHECK_VERSION(2, 12, 0) +static gboolean gtkQueryTooltip(GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, Ihandle* ih) +{ + char* value = iupAttribGet(ih, "TIPRECT"); + if (value && !keyboard_mode) + { + GdkRectangle rect; + int x1, x2, y1, y2; + sscanf(value, "%d %d %d %d", &x1, &y1, &x2, &y2); + rect.x = x1; + rect.y = y1; + rect.width = x2-x1+1; + rect.height = y2-y1+1; + gtk_tooltip_set_tip_area(tooltip, &rect); + } + else + gtk_tooltip_set_tip_area(tooltip, NULL); + + value = iupAttribGet(ih, "TIPICON"); + if (!value) + gtk_tooltip_set_icon(tooltip, NULL); + else + { + GdkPixbuf* icon = (GdkPixbuf*)iupImageGetIcon(value); + if (icon) + gtk_tooltip_set_icon(tooltip, icon); + } + + (void)y; + (void)x; + (void)widget; + return FALSE; +} +#endif + +int iupdrvBaseSetTipAttrib(Ihandle* ih, const char* value) +{ + GtkWidget* widget = (GtkWidget*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) + widget = ih->handle; + +#if GTK_CHECK_VERSION(2, 12, 0) + if (iupAttribGetBoolean(ih, "TIPMARKUP")) + gtk_widget_set_tooltip_markup(widget, iupgtkStrConvertToUTF8(value)); + else + gtk_widget_set_tooltip_text(widget, iupgtkStrConvertToUTF8(value)); + + g_signal_connect(widget, "query-tooltip", G_CALLBACK(gtkQueryTooltip), ih); +#else + if (gtk_tips == NULL) + gtk_tips = gtk_tooltips_new(); + + gtk_tooltips_set_tip(gtk_tips, widget, iupgtkStrConvertToUTF8(value), NULL); +#endif + + return 1; +} + +int iupdrvBaseSetTipVisibleAttrib(Ihandle* ih, const char* value) +{ + GtkWidget* widget = (GtkWidget*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) + widget = ih->handle; + (void)value; + + /* must use IupGetAttribute to use inheritance */ + if (!IupGetAttribute(ih, "TIP")) + return 0; + +#if GTK_CHECK_VERSION(2, 12, 0) + gtk_widget_trigger_tooltip_query(widget); +#endif + + return 0; +} + diff --git a/iup/src/gtk/iupgtk_toggle.c b/iup/src/gtk/iupgtk_toggle.c new file mode 100755 index 0000000..8ff7df5 --- /dev/null +++ b/iup/src/gtk/iupgtk_toggle.c @@ -0,0 +1,519 @@ +/** \file + * \brief Toggle Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_image.h" +#include "iup_key.h" +#include "iup_toggle.h" + +#include "iupgtk_drv.h" + + +#if !GTK_CHECK_VERSION(2, 6, 0) +static void gtk_button_set_image(GtkButton *button, GtkWidget *image) +{ +} +static GtkWidget* gtk_button_get_image(GtkButton *button) +{ + return NULL; +} +#endif + +void iupdrvToggleAddCheckBox(int *x, int *y) +{ +#ifdef HILDON + (*x) += 30+4; + if ((*y) < 30) (*y) = 30; /* minimum height */ +#else + (*x) += 16+4; + if ((*y) < 16) (*y) = 16; /* minimum height */ +#endif + (*y) += 4; +} + +static int gtkToggleGetCheck(Ihandle* ih) +{ + if (gtk_toggle_button_get_inconsistent((GtkToggleButton*)ih->handle)) + return -1; + if (gtk_toggle_button_get_active((GtkToggleButton*)ih->handle)) + return 1; + else + return 0; +} + +static void gtkToggleSetPixbuf(Ihandle* ih, const char* name, int make_inactive) +{ + GtkButton* button = (GtkButton*)ih->handle; + GtkImage* image = (GtkImage*)gtk_button_get_image(button); + + if (name) + { + GdkPixbuf* pixbuf = iupImageGetImage(name, ih, make_inactive); + GdkPixbuf* old_pixbuf = gtk_image_get_pixbuf(image); + if (pixbuf != old_pixbuf) + gtk_image_set_from_pixbuf(image, pixbuf); + return; + } + + /* if not defined */ +#if GTK_CHECK_VERSION(2, 8, 0) + gtk_image_clear(image); +#endif +} + +static void gtkToggleUpdateImage(Ihandle* ih, int active, int check) +{ + char* name; + + if (!active) + { + name = iupAttribGet(ih, "IMINACTIVE"); + if (name) + gtkToggleSetPixbuf(ih, name, 0); + else + { + /* if not defined then automaticaly create one based on IMAGE */ + name = iupAttribGet(ih, "IMAGE"); + gtkToggleSetPixbuf(ih, name, 1); /* make_inactive */ + } + } + else + { + /* must restore the normal image */ + if (check) + { + name = iupAttribGet(ih, "IMPRESS"); + if (name) + gtkToggleSetPixbuf(ih, name, 0); + else + { + /* if not defined then automaticaly create one based on IMAGE */ + name = iupAttribGet(ih, "IMAGE"); + gtkToggleSetPixbuf(ih, name, 0); + } + } + else + { + name = iupAttribGet(ih, "IMAGE"); + if (name) + gtkToggleSetPixbuf(ih, name, 0); + } + } +} + + +/*************************************************************************/ + + +static int gtkToggleSetValueAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value,"NOTDEF")) + gtk_toggle_button_set_inconsistent((GtkToggleButton*)ih->handle, TRUE); + else + { + gtk_toggle_button_set_inconsistent((GtkToggleButton*)ih->handle, FALSE); + + /* This action causes the toggled signal to be emitted. */ + iupAttribSetStr(ih, "_IUPGTK_IGNORE_TOGGLE", "1"); + + if (iupStrBoolean(value)) + gtk_toggle_button_set_active((GtkToggleButton*)ih->handle, TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)ih->handle, FALSE); + + if (ih->data->type == IUP_TOGGLE_IMAGE) + gtkToggleUpdateImage(ih, iupdrvIsActive(ih), gtkToggleGetCheck(ih)); + + iupAttribSetStr(ih, "_IUPGTK_IGNORE_TOGGLE", NULL); + } + + return 0; +} + +static char* gtkToggleGetValueAttrib(Ihandle* ih) +{ + int check = gtkToggleGetCheck(ih); + if (check == -1) + return "NOTDEF"; + else if (check == 1) + return "ON"; + else + return "OFF"; +} + +static int gtkToggleSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_TEXT) + { + GtkButton* button = (GtkButton*)ih->handle; + GtkLabel* label = (GtkLabel*)gtk_button_get_image(button); + iupgtkSetMnemonicTitle(ih, label, value); + return 1; + } + + return 0; +} + +static int gtkToggleSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + GtkButton* button = (GtkButton*)ih->handle; + float xalign, yalign; + char value1[30]="", value2[30]=""; + + if (ih->data->type == IUP_TOGGLE_TEXT) + return 0; + + iupStrToStrStr(value, value1, value2, ':'); + + if (iupStrEqualNoCase(value1, "ARIGHT")) + xalign = 1.0f; + else if (iupStrEqualNoCase(value1, "ACENTER")) + xalign = 0.5f; + else /* "ALEFT" */ + xalign = 0; + + if (iupStrEqualNoCase(value2, "ABOTTOM")) + yalign = 1.0f; + else if (iupStrEqualNoCase(value2, "ATOP")) + yalign = 0; + else /* ACENTER (default) */ + yalign = 0.5f; + + gtk_button_set_alignment(button, xalign, yalign); + + return 1; +} + +static int gtkToggleSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + if (ih->handle && ih->data->type == IUP_TOGGLE_IMAGE) + { + GtkButton* button = (GtkButton*)ih->handle; + GtkMisc* misc = (GtkMisc*)gtk_button_get_image(button); + gtk_misc_set_padding(misc, ih->data->horiz_padding, ih->data->vert_padding); + } + return 0; +} + +static int gtkToggleSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + GtkWidget* label = (GtkWidget*)gtk_button_get_image((GtkButton*)ih->handle); + if (!label) return 0; + + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgtkBaseSetFgColor(label, r, g, b); + + return 1; +} + +static int gtkToggleSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + iupdrvSetStandardFontAttrib(ih, value); + + if (ih->handle) + { + GtkWidget* label = gtk_button_get_image((GtkButton*)ih->handle); + if (!label) return 1; + + gtk_widget_modify_font(label, (PangoFontDescription*)iupgtkGetPangoFontDescAttrib(ih)); + + if (ih->data->type == IUP_TOGGLE_TEXT) + iupgtkFontUpdatePangoLayout(ih, gtk_label_get_layout((GtkLabel*)label)); + } + return 1; +} + +static int gtkToggleSetImageAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + if (value != iupAttribGet(ih, "IMAGE")) + iupAttribSetStr(ih, "IMAGE", (char*)value); + gtkToggleUpdateImage(ih, iupdrvIsActive(ih), gtkToggleGetCheck(ih)); + return 1; + } + else + return 0; +} + +static int gtkToggleSetImInactiveAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + if (value != iupAttribGet(ih, "IMINACTIVE")) + iupAttribSetStr(ih, "IMINACTIVE", (char*)value); + gtkToggleUpdateImage(ih, iupdrvIsActive(ih), gtkToggleGetCheck(ih)); + return 1; + } + else + return 0; +} + +static int gtkToggleSetImPressAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + if (value != iupAttribGet(ih, "IMPRESS")) + iupAttribSetStr(ih, "IMPRESS", (char*)value); + gtkToggleUpdateImage(ih, iupdrvIsActive(ih), gtkToggleGetCheck(ih)); + return 1; + } + else + return 0; +} + +static int gtkToggleSetActiveAttrib(Ihandle* ih, const char* value) +{ + /* update the inactive image if necessary */ + if (ih->data->type == IUP_TOGGLE_IMAGE) + gtkToggleUpdateImage(ih, iupStrBoolean(value), gtkToggleGetCheck(ih)); + + return iupBaseSetActiveAttrib(ih, value); +} + +/****************************************************************************************************/ + +static void gtkToggleToggled(GtkToggleButton *widget, Ihandle* ih) +{ + IFni cb; + int check; + + if (iupAttribGet(ih, "_IUPGTK_IGNORE_TOGGLE")) + return; + + check = gtkToggleGetCheck(ih); + + if (ih->data->type == IUP_TOGGLE_IMAGE) + gtkToggleUpdateImage(ih, iupdrvIsActive(ih), check); + + cb = (IFni)IupGetCallback(ih, "ACTION"); + if (cb && cb(ih, check) == IUP_CLOSE) + IupExitLoop(); + + iupBaseCallValueChangedCb(ih); + + (void)widget; +} + +static int gtkToggleUpdate3StateCheck(Ihandle *ih, int keyb) +{ + int check = gtkToggleGetCheck(ih); + if (check == 1) /* GOTO check == -1 */ + { + gtk_toggle_button_set_inconsistent((GtkToggleButton*)ih->handle, TRUE); + gtkToggleToggled((GtkToggleButton*)ih->handle, ih); + return TRUE; /* ignore message to avoid change toggle state */ + } + else if (check == -1) /* GOTO check == 0 */ + { + gtk_toggle_button_set_inconsistent((GtkToggleButton*)ih->handle, FALSE); + if (keyb) + { + gtk_toggle_button_set_active((GtkToggleButton*)ih->handle, FALSE); + return TRUE; /* ignore message to avoid change toggle state */ + } + } + else /* (check == 0) GOTO check == 1 */ + { + gtk_toggle_button_set_inconsistent((GtkToggleButton*)ih->handle, FALSE); + if (keyb) + { + gtk_toggle_button_set_active((GtkToggleButton*)ih->handle, TRUE); + return TRUE; /* ignore message to avoid change toggle state */ + } + } + + return FALSE; +} + +static gboolean gtkToggleButtonEvent(GtkWidget *widget, GdkEventButton *evt, Ihandle *ih) +{ + if (iupAttribGet(ih, "_IUPGTK_IGNORE_TOGGLE")) + return FALSE; + + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + char* name = iupAttribGet(ih, "IMPRESS"); + if (name) + { + if (evt->type == GDK_BUTTON_PRESS) + gtkToggleUpdateImage(ih, iupdrvIsActive(ih), 1); + else + gtkToggleUpdateImage(ih, iupdrvIsActive(ih), 0); + } + } + else + { + if (evt->type == GDK_BUTTON_RELEASE) + { + if (gtkToggleUpdate3StateCheck(ih, 0)) + return TRUE; /* ignore message to avoid change toggle state */ + } + } + + (void)widget; + return FALSE; +} + +static gboolean gtkToggleKeyEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle *ih) +{ + if (evt->type == GDK_KEY_PRESS) + { + if (evt->keyval == GDK_space || evt->keyval == GDK_Return) + return TRUE; /* ignore message to avoid change toggle state */ + } + else + { + if (evt->keyval == GDK_space || evt->keyval == GDK_Return) + { + if (gtkToggleUpdate3StateCheck(ih, 1)) + return TRUE; /* ignore message to avoid change toggle state */ + } + } + + (void)widget; + return FALSE; +} + +static int gtkToggleMapMethod(Ihandle* ih) +{ + Ihandle* radio = iupRadioFindToggleParent(ih); + char *value; + int is3state = 0; + + if (!ih->parent) + return IUP_ERROR; + + if (radio) + ih->data->radio = 1; + + value = iupAttribGet(ih, "IMAGE"); + if (value) + ih->data->type = IUP_TOGGLE_IMAGE; + else + ih->data->type = IUP_TOGGLE_TEXT; + + if (radio) + { + GtkRadioButton* last_tg = (GtkRadioButton*)iupAttribGet(radio, "_IUPGTK_LASTRADIOBUTTON"); + if (last_tg) + ih->handle = gtk_radio_button_new_from_widget(last_tg); + else + ih->handle = gtk_radio_button_new(NULL); + iupAttribSetStr(radio, "_IUPGTK_LASTRADIOBUTTON", (char*)ih->handle); + } + else + { + if (ih->data->type == IUP_TOGGLE_TEXT) + { + ih->handle = gtk_check_button_new(); + + if (iupAttribGetBoolean(ih, "3STATE")) + is3state = 1; + } + else + ih->handle = gtk_toggle_button_new(); + } + + if (!ih->handle) + return IUP_ERROR; + + if (ih->data->type == IUP_TOGGLE_TEXT) + { + gtk_button_set_image((GtkButton*)ih->handle, gtk_label_new(NULL)); + gtk_toggle_button_set_mode((GtkToggleButton*)ih->handle, TRUE); + } + else + { + gtk_button_set_image((GtkButton*)ih->handle, gtk_image_new()); + gtk_toggle_button_set_mode((GtkToggleButton*)ih->handle, FALSE); + } + + /* add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + if (!iupAttribGetBoolean(ih, "CANFOCUS")) + GTK_WIDGET_FLAGS(ih->handle) &= ~GTK_CAN_FOCUS; + + g_signal_connect(G_OBJECT(ih->handle), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + + g_signal_connect(G_OBJECT(ih->handle), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(iupgtkKeyPressEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + + g_signal_connect(G_OBJECT(ih->handle), "toggled", G_CALLBACK(gtkToggleToggled), ih); + + if (ih->data->type == IUP_TOGGLE_IMAGE || is3state) + { + g_signal_connect(G_OBJECT(ih->handle), "button-press-event", G_CALLBACK(gtkToggleButtonEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "button-release-event",G_CALLBACK(gtkToggleButtonEvent), ih); + } + + if (is3state) + { + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(gtkToggleKeyEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-release-event", G_CALLBACK(gtkToggleKeyEvent), ih); + } + + gtk_widget_realize(ih->handle); + + return IUP_NOERROR; +} + +void iupdrvToggleInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkToggleMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Overwrite Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, gtkToggleSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, gtkToggleSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, gtkToggleSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); /* black */ + iupClassRegisterAttribute(ic, "TITLE", NULL, gtkToggleSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupToggle only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", NULL, gtkToggleSetAlignmentAttrib, "ACENTER:ACENTER", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "IMAGE", NULL, gtkToggleSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMINACTIVE", NULL, gtkToggleSetImInactiveAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMPRESS", NULL, gtkToggleSetImPressAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE", gtkToggleGetValueAttrib, gtkToggleSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "PADDING", iupToggleGetPaddingAttrib, gtkToggleSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "MARKUP", NULL, NULL, NULL, NULL, IUPAF_DEFAULT); +} diff --git a/iup/src/gtk/iupgtk_tree.c b/iup/src/gtk/iupgtk_tree.c new file mode 100755 index 0000000..d408f27 --- /dev/null +++ b/iup/src/gtk/iupgtk_tree.c @@ -0,0 +1,2369 @@ +/** \file + * \brief Tree Control + * + * See Copyright Notice in iup.h + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_key.h" +#include "iup_image.h" +#include "iup_array.h" +#include "iup_tree.h" + +#include "iup_drvinfo.h" +#include "iupgtk_drv.h" + +enum +{ + IUPGTK_TREE_IMAGE, + IUPGTK_TREE_HAS_IMAGE, + IUPGTK_TREE_IMAGE_EXPANDED, + IUPGTK_TREE_HAS_IMAGE_EXPANDED, + IUPGTK_TREE_TITLE, + IUPGTK_TREE_KIND, + IUPGTK_TREE_COLOR, + IUPGTK_TREE_FONT, + IUPGTK_TREE_USERDATA +}; + +static GtkTreeIter gtkTreeInvalidIter = {0,0,0,0}; + +/*****************************************************************************/ +/* COPYING ITEMS (Branches and its children) */ +/*****************************************************************************/ +/* Insert the copied item in a new location. Returns the new item. */ +static void gtkTreeCopyItem(GtkTreeModel* model, GtkTreeIter* iterItem, GtkTreeIter* iterParent, int position, GtkTreeIter *iterNewItem, int full_copy) +{ + GtkTreeStore* store = GTK_TREE_STORE(model); + int kind; + char* title; + gboolean has_image, has_image_expanded; + PangoFontDescription* font; + void* userdata; + GdkColor *color; + GdkPixbuf* image, *image_expanded; + + gtk_tree_model_get(GTK_TREE_MODEL(store), iterItem, IUPGTK_TREE_IMAGE, &image, + IUPGTK_TREE_HAS_IMAGE, &has_image, + IUPGTK_TREE_IMAGE_EXPANDED, &image_expanded, + IUPGTK_TREE_HAS_IMAGE_EXPANDED, &has_image_expanded, + IUPGTK_TREE_TITLE, &title, + IUPGTK_TREE_KIND, &kind, + IUPGTK_TREE_COLOR, &color, + IUPGTK_TREE_FONT, &font, + IUPGTK_TREE_USERDATA, &userdata, + -1); + + if (position == 2) + gtk_tree_store_append(store, iterNewItem, iterParent); + else if (position == 1) /* copy as first child of expanded branch */ + gtk_tree_store_insert(store, iterNewItem, iterParent, 0); /* iterParent is parent of the new item (firstchild of it) */ + else /* copy as next brother of item or collapsed branch */ + gtk_tree_store_insert_after(store, iterNewItem, NULL, iterParent); /* iterParent is sibling of the new item */ + + if (full_copy) /* during a full copy the userdata reference is not copied */ + userdata = NULL; + + gtk_tree_store_set(store, iterNewItem, IUPGTK_TREE_IMAGE, image, + IUPGTK_TREE_HAS_IMAGE, has_image, + IUPGTK_TREE_IMAGE_EXPANDED, image_expanded, + IUPGTK_TREE_HAS_IMAGE_EXPANDED, has_image_expanded, + IUPGTK_TREE_TITLE, title, + IUPGTK_TREE_KIND, kind, + IUPGTK_TREE_COLOR, color, + IUPGTK_TREE_FONT, font, + IUPGTK_TREE_USERDATA, userdata, + -1); +} + +static void gtkTreeCopyChildren(Ihandle* ih, GtkTreeModel* model, GtkTreeIter *iterItemSrc, GtkTreeIter *iterItemDst, int full_copy) +{ + GtkTreeIter iterChildSrc; + int hasItem = gtk_tree_model_iter_children(model, &iterChildSrc, iterItemSrc); /* get the firstchild */ + while(hasItem) + { + GtkTreeIter iterNewItem; + gtkTreeCopyItem(model, &iterChildSrc, iterItemDst, 2, &iterNewItem, full_copy); /* append always */ + + /* Recursively transfer all the items */ + gtkTreeCopyChildren(ih, model, &iterChildSrc, &iterNewItem, full_copy); + + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, &iterChildSrc); + } +} + +/* Copies all items in a branch to a new location. Returns the new branch node. */ +static void gtkTreeCopyNode(Ihandle* ih, GtkTreeModel* model, GtkTreeIter *iterItemSrc, GtkTreeIter *iterItemDst, GtkTreeIter* iterNewItem, int full_copy) +{ + int kind, position = 0; /* insert after iterItemDst */ + gtk_tree_model_get(model, iterItemDst, IUPGTK_TREE_KIND, &kind, -1); + + if (kind == ITREE_BRANCH) + { + GtkTreePath* path = gtk_tree_model_get_path(model, iterItemDst); + if (gtk_tree_view_row_expanded(GTK_TREE_VIEW(ih->handle), path)) + position = 1; /* insert as first child of iterItemDst */ + gtk_tree_path_free(path); + } + + gtkTreeCopyItem(model, iterItemSrc, iterItemDst, position, iterNewItem, full_copy); + + gtkTreeCopyChildren(ih, model, iterItemSrc, iterNewItem, full_copy); +} + +/*****************************************************************************/ +/* FINDING ITEMS */ +/*****************************************************************************/ + +static void gtkTreeInvertAllNodeMarking(Ihandle* ih, GtkTreeModel* model, GtkTreeSelection* selection, GtkTreeIter* iterItem) +{ + GtkTreeIter iterChild; + int hasItem = TRUE; + + while(hasItem) + { + if(gtk_tree_selection_iter_is_selected(selection, iterItem)) + gtk_tree_selection_unselect_iter(selection, iterItem); + else + gtk_tree_selection_select_iter(selection, iterItem); + + /* Check whether we have child items */ + if(gtk_tree_model_iter_has_child(model, iterItem)) + { + gtk_tree_model_iter_children(model, &iterChild, iterItem); /* get the firstchild */ + gtkTreeInvertAllNodeMarking(ih, model, selection, &iterChild); + } + + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, iterItem); + } +} + +static GtkTreeIter gtkTreeFindVisibleNodeId(Ihandle* ih, GtkTreeModel* model, GtkTreeIter iterItem, GtkTreeIter iterNode) +{ + GtkTreeIter iterChild; + GtkTreePath* path; + int hasItem = TRUE; + + while(hasItem) + { + /* ID control to traverse items */ + ih->data->id_control++; /* not the real id since it counts only the visible ones */ + + /* StateID founded! */ + if(iterItem.user_data == iterNode.user_data) + return iterItem; + + path = gtk_tree_model_get_path(model, &iterItem); + + /* Check whether we have child items and it is expanded (visible) */ + if (gtk_tree_model_iter_has_child(model, &iterItem) && gtk_tree_view_row_expanded(GTK_TREE_VIEW(ih->handle), path)) + { + gtk_tree_model_iter_children(model, &iterChild, &iterItem); /* get the firstchild */ + iterChild = gtkTreeFindVisibleNodeId(ih, model, iterChild, iterNode); + + /* StateID founded! */ + if(iterChild.user_data) + { + gtk_tree_path_free(path); + return iterChild; + } + } + + gtk_tree_path_free(path); + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, &iterItem); + } + + return gtkTreeInvalidIter; /* invalid since gtk_tree_model_iter_next returned false */ +} + +static GtkTreeIter gtkTreeFindVisibleNodeFromId(Ihandle* ih, GtkTreeModel* model, GtkTreeIter iterItem) +{ + GtkTreeIter iterChild; + GtkTreePath* path; + int hasItem = TRUE; + + while(hasItem) + { + /* ID control to traverse items */ + ih->data->id_control--; /* not the real id since it counts only the visible ones */ + + /* StateID founded! */ + if(ih->data->id_control < 0) + return iterItem; + + path = gtk_tree_model_get_path(model, &iterItem); + + /* Check whether we have child items and it is expanded (visible) */ + if(gtk_tree_model_iter_has_child(model, &iterItem) && gtk_tree_view_row_expanded(GTK_TREE_VIEW(ih->handle), path)) + { + gtk_tree_model_iter_children(model, &iterChild, &iterItem); /* get the firstchild */ + iterChild = gtkTreeFindVisibleNodeFromId(ih, model, iterChild); + + /* StateID founded! */ + if(ih->data->id_control < 0) + { + gtk_tree_path_free(path); + return iterChild; + } + } + + gtk_tree_path_free(path); + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, &iterItem); + } + + return gtkTreeInvalidIter; /* invalid since gtk_tree_model_iter_next returned false */ +} + +static GtkTreeIter gtkTreeGetLastVisibleNode(Ihandle* ih, GtkTreeModel* model, GtkTreeIter iterItem) +{ + GtkTreeIter iterChild, iterPrev = gtkTreeInvalidIter; + GtkTreePath* path = gtk_tree_model_get_path(model, &iterItem); + + /* Check whether we have child items and it is expanded (visible) */ + if(gtk_tree_model_iter_has_child(model, &iterItem) && gtk_tree_view_row_expanded(GTK_TREE_VIEW(ih->handle), path)) + { + int hasItem = TRUE; + gtk_tree_model_iter_children(model, &iterChild, &iterItem); /* get the firstchild */ + + while(hasItem) + { + iterPrev = iterChild; + + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, &iterChild); + } + + iterItem = gtkTreeGetLastVisibleNode(ih, model, iterPrev); + } + gtk_tree_path_free(path); + + return iterItem; +} + +static GtkTreeIter gtkTreeFindNodeID(Ihandle* ih, GtkTreeModel* model, GtkTreeIter iterItem, GtkTreeIter iterNode) +{ + GtkTreeIter iterChild; + int hasItem = TRUE; + + while(hasItem) + { + /* ID control to traverse items */ + ih->data->id_control++; + + /* StateID founded! */ + if (iterItem.user_data == iterNode.user_data) + return iterItem; + + /* Check whether we have child items */ + if (gtk_tree_model_iter_has_child(model, &iterItem)) + { + gtk_tree_model_iter_children(model, &iterChild, &iterItem); /* get the firstchild */ + iterChild = gtkTreeFindNodeID(ih, model, iterChild, iterNode); + + /* StateID founded! */ + if(iterChild.user_data) + return iterChild; + } + + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, &iterItem); + } + + return gtkTreeInvalidIter; /* invalid since gtk_tree_model_iter_next returned false */ +} + +static int gtkTreeGetNodeId(Ihandle* ih, GtkTreeIter iterItem) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterRoot; + gtk_tree_model_get_iter_first(model, &iterRoot); + + ih->data->id_control = -1; + iterItem = gtkTreeFindNodeID(ih, model, iterRoot, iterItem); + if (iterItem.user_data) + return ih->data->id_control; + else + return -1; +} + +static GtkTreeIter gtkTreeFindUserData(Ihandle* ih, GtkTreeModel* model, GtkTreeIter iterItem, void* userdata) +{ + GtkTreeIter iterChild; + int hasItem = TRUE; + void* node_userdata; + + while(hasItem) + { + /* ID control to traverse items */ + ih->data->id_control++; + + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_USERDATA, &node_userdata, -1); + + /* userdata founded! */ + if (node_userdata == userdata) + return iterItem; + + /* Check whether we have child items */ + if (gtk_tree_model_iter_has_child(model, &iterItem)) + { + gtk_tree_model_iter_children(model, &iterChild, &iterItem); /* get the firstchild */ + iterChild = gtkTreeFindUserData(ih, model, iterChild, userdata); + + /* userdata founded! */ + if (iterChild.user_data) + return iterChild; + } + + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, &iterItem); + } + + return gtkTreeInvalidIter; /* invalid since gtk_tree_model_iter_next returned false */ +} + +static int gtkTreeGetUserDataId(Ihandle* ih, GtkTreeModel* model, void* userdata) +{ + GtkTreeIter iterRoot, iterItem; + gtk_tree_model_get_iter_first(model, &iterRoot); + + ih->data->id_control = -1; + iterItem = gtkTreeFindUserData(ih, model, iterRoot, userdata); + if (iterItem.user_data) + return ih->data->id_control; + else + return -1; +} + +static void gtkTreeCallNodeRemovedRec(Ihandle* ih, GtkTreeModel* model, GtkTreeIter iterItem, IFnis cb) +{ + GtkTreeIter iterChild; + int hasItem = TRUE; + void* node_userdata; + + while(hasItem) + { + /* ID control to traverse items */ + ih->data->id_control++; + + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_USERDATA, &node_userdata, -1); + + cb(ih, ih->data->id_control, (char*)node_userdata); + + /* Check whether we have child items */ + if (gtk_tree_model_iter_has_child(model, &iterItem)) + { + gtk_tree_model_iter_children(model, &iterChild, &iterItem); /* get the firstchild */ + gtkTreeCallNodeRemovedRec(ih, model, iterChild, cb); + } + + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, &iterItem); + } +} + +static void gtkTreeCallNodeRemoved(Ihandle* ih, GtkTreeModel* model, GtkTreeIter *iterItem) +{ + IFnis cb = (IFnis)IupGetCallback(ih, "NODEREMOVED_CB"); + if (cb) + { + ih->data->id_control = gtkTreeGetNodeId(ih, *iterItem)-1; + gtkTreeCallNodeRemovedRec(ih, model, *iterItem, cb); + } +} + +static gboolean gtkTreeFindNodeFromID(Ihandle* ih, GtkTreeModel* model, GtkTreeIter *iterItem, int *id) +{ + GtkTreeIter iterChild; + int hasItem = TRUE; + + while(hasItem) + { + /* ID control to traverse items */ + (*id)--; + + /* StateID founded! */ + if (*id < 0) + return TRUE; + + /* Check whether we have child items */ + if (gtk_tree_model_iter_has_child(model, iterItem)) + { + gtk_tree_model_iter_children(model, &iterChild, iterItem); /* get the firstchild */ + + if (gtkTreeFindNodeFromID(ih, model, &iterChild, id)) + { + *iterItem = iterChild; + return TRUE; + } + } + + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, iterItem); + } + + return FALSE; +} + +static gboolean gtkTreeFindNodeFromString(Ihandle* ih, GtkTreeModel* model, const char* name_id, GtkTreeIter *iterItem) +{ + if (name_id[0]) + { + int id; + if (iupStrToInt(name_id, &id)) + { + gtk_tree_model_get_iter_first(model, iterItem); + return gtkTreeFindNodeFromID(ih, model, iterItem, &id); + } + } + else + { + GtkTreePath* path = NULL; + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ih->handle), &path, NULL); + if (path) + { + gtk_tree_model_get_iter(model, iterItem, path); + gtk_tree_path_free(path); + return TRUE; + } + } + return FALSE; +} + +/*****************************************************************************/ +/* MANIPULATING IMAGES */ +/*****************************************************************************/ +static void gtkTreeUpdateImages(Ihandle* ih, GtkTreeModel* model, GtkTreeIter iterItem, int mode) +{ + GtkTreeIter iterChild; + int hasItem = TRUE; + int kind; + + while(hasItem) + { + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_KIND, &kind, -1); + + if (kind == ITREE_BRANCH) + { + if (mode == ITREE_UPDATEIMAGE_EXPANDED) + { + gboolean has_image_expanded = FALSE; + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_HAS_IMAGE_EXPANDED, &has_image_expanded, -1); + if (!has_image_expanded) + gtk_tree_store_set(GTK_TREE_STORE(model), &iterItem, IUPGTK_TREE_IMAGE_EXPANDED, ih->data->def_image_expanded, -1); + } + else if(mode == ITREE_UPDATEIMAGE_COLLAPSED) + { + gboolean has_image = FALSE; + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_HAS_IMAGE, &has_image, -1); + if (!has_image) + gtk_tree_store_set(GTK_TREE_STORE(model), &iterItem, IUPGTK_TREE_IMAGE, ih->data->def_image_collapsed, -1); + } + + if (gtk_tree_model_iter_has_child(model, &iterItem)) + { + + /* Recursively traverse child items */ + gtk_tree_model_iter_children(model, &iterChild, &iterItem); + gtkTreeUpdateImages(ih, model, iterChild, mode); + } + } + else + { + if (mode == ITREE_UPDATEIMAGE_LEAF) + { + gboolean has_image = FALSE; + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_HAS_IMAGE, &has_image, -1); + if (!has_image) + gtk_tree_store_set(GTK_TREE_STORE(model), &iterItem, IUPGTK_TREE_IMAGE, ih->data->def_image_leaf, -1); + } + } + + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, &iterItem); + } +} + +static void gtkTreeExpandItem(Ihandle* ih, GtkTreePath* path, int expand) +{ + if (expand == -1) + expand = !gtk_tree_view_row_expanded(GTK_TREE_VIEW(ih->handle), path); /* toggle */ + + if (expand) + gtk_tree_view_expand_row(GTK_TREE_VIEW(ih->handle), path, FALSE); + else + gtk_tree_view_collapse_row(GTK_TREE_VIEW(ih->handle), path); +} + +int iupgtkGetColor(const char* value, GdkColor *color) +{ + unsigned char r, g, b; + if (iupStrToRGB(value, &r, &g, &b)) + { + iupgdkColorSet(color, r, g, b); + return 1; + } + return 0; +} + +/*****************************************************************************/ +/* ADDING ITEMS */ +/*****************************************************************************/ +void iupdrvTreeAddNode(Ihandle* ih, const char* name_id, int kind, const char* title, int add) +{ + GtkTreeStore* store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle))); + GtkTreeIter iterPrev, iterNewItem, iterParent; + GtkTreePath* path; + GdkColor color = {0L,0,0,0}; + int kindPrev; + + if (!gtkTreeFindNodeFromString(ih, GTK_TREE_MODEL(store), name_id, &iterPrev)) + return; + + gtk_tree_model_get(GTK_TREE_MODEL(store), &iterPrev, IUPGTK_TREE_KIND, &kindPrev, -1); + + if (kindPrev == ITREE_BRANCH && add) + gtk_tree_store_insert(store, &iterNewItem, &iterPrev, 0); /* iterPrev is parent of the new item (firstchild of it) */ + else + gtk_tree_store_insert_after(store, &iterNewItem, NULL, &iterPrev); /* iterPrev is sibling of the new item */ + + iupgtkGetColor(iupAttribGetStr(ih, "FGCOLOR"), &color); + + /* set the attributes of the new node */ + gtk_tree_store_set(store, &iterNewItem, IUPGTK_TREE_HAS_IMAGE, FALSE, + IUPGTK_TREE_HAS_IMAGE_EXPANDED, FALSE, + IUPGTK_TREE_TITLE, iupgtkStrConvertToUTF8(title), + IUPGTK_TREE_KIND, kind, + IUPGTK_TREE_COLOR, &color, -1); + + if (kind == ITREE_LEAF) + gtk_tree_store_set(store, &iterNewItem, IUPGTK_TREE_IMAGE, ih->data->def_image_leaf, -1); + else + gtk_tree_store_set(store, &iterNewItem, IUPGTK_TREE_IMAGE, ih->data->def_image_collapsed, + IUPGTK_TREE_IMAGE_EXPANDED, ih->data->def_image_expanded, -1); + + if (kindPrev == ITREE_BRANCH && add) + iterParent = iterPrev; + else + gtk_tree_model_iter_parent(GTK_TREE_MODEL(store), &iterParent, &iterNewItem); + + /* If this is the first child of the parent, then handle the ADDEXPANDED attribute */ + if (gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), &iterParent) == 1) + { + int depth; + path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iterParent); + depth = gtk_tree_path_get_depth(path)-1; + if (ih->data->add_expanded || depth==0) /* if this is the first child of the root, expand always */ + { + iupAttribSetStr(ih, "_IUPTREE_IGNORE_BRANCHOPEN_CB", "1"); + gtk_tree_view_expand_row(GTK_TREE_VIEW(ih->handle), path, FALSE); + } + else + gtk_tree_view_collapse_row(GTK_TREE_VIEW(ih->handle), path); + gtk_tree_path_free(path); + } +} + +static void gtkTreeAddRootNode(Ihandle* ih) +{ + GtkTreeStore* store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle))); + GtkTreePath* path; + GtkTreeIter iterRoot; + GdkColor color = {0L,0,0,0}; + + iupgtkGetColor(iupAttribGetStr(ih, "FGCOLOR"), &color); + + gtk_tree_store_append(store, &iterRoot, NULL); /* root node */ + gtk_tree_store_set(store, &iterRoot, IUPGTK_TREE_IMAGE, ih->data->def_image_collapsed, + IUPGTK_TREE_HAS_IMAGE, FALSE, + IUPGTK_TREE_IMAGE_EXPANDED, ih->data->def_image_expanded, + IUPGTK_TREE_HAS_IMAGE_EXPANDED, FALSE, + IUPGTK_TREE_KIND, ITREE_BRANCH, + IUPGTK_TREE_COLOR, &color, -1); + + path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iterRoot); + /* MarkStart node */ + iupAttribSetStr(ih, "_IUPTREE_MARKSTART_NODE", (char*)path); + + /* Set the default VALUE */ + gtk_tree_view_set_cursor(GTK_TREE_VIEW(ih->handle), path, NULL, FALSE); +} + +/*****************************************************************************/ +/* AUXILIAR FUNCTIONS */ +/*****************************************************************************/ +static void gtkTreeOpenCloseEvent(Ihandle* ih) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + GtkTreePath* path; + int kind; + + if (!gtkTreeFindNodeFromString(ih, model, "", &iterItem)) + return; + + path = gtk_tree_model_get_path(model, &iterItem); + if (path) + { + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_KIND, &kind, -1); + + if (kind == ITREE_LEAF) /* leafs */ + gtk_tree_view_row_activated(GTK_TREE_VIEW(ih->handle), path, (GtkTreeViewColumn*)iupAttribGet(ih, "_IUPGTK_COLUMN")); + else /* branches */ + gtkTreeExpandItem(ih, path, -1); /* toggle */ + + gtk_tree_path_free(path); + } +} + +static gboolean gtkTreeSelected_Foreach_Func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, GList **rowref_list) +{ + GtkTreeRowReference *rowref; + + rowref = gtk_tree_row_reference_new(model, path); + *rowref_list = g_list_append(*rowref_list, rowref); + + (void)iter; + return FALSE; /* do not stop walking the store, call us with next row */ +} + +static gboolean gtkTreeSelected_Iter_Func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, GList **rowref_list) +{ + GtkTreeRowReference *rowref; + GtkTreeIter iterParent; + if (!gtk_tree_model_iter_parent(model, &iterParent, iter)) /* the root node can't be deleted */ + return FALSE; /* do not stop walking the store, call us with next row */ + + rowref = gtk_tree_row_reference_new(model, path); + *rowref_list = g_list_append(*rowref_list, rowref); + + return FALSE; /* do not stop walking the store, call us with next row */ +} + +/*****************************************************************************/ +/* CALLBACKS */ +/*****************************************************************************/ +static void gtkTreeCallMultiSelectionCb(Ihandle* ih) +{ + IFnIi cbMulti = (IFnIi)IupGetCallback(ih, "MULTISELECTION_CB"); + IFnii cbSelec = (IFnii)IupGetCallback(ih, "SELECTION_CB"); + if (cbMulti || cbSelec) + { + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterRoot; + GList *rr_list = NULL; + GList *node; + int* id_rowItem; + int count_selected_rows, i = 0; + + gtk_tree_model_get_iter_first(model, &iterRoot); + + gtk_tree_selection_selected_foreach(selection, (GtkTreeSelectionForeachFunc)gtkTreeSelected_Foreach_Func, &rr_list); + count_selected_rows = g_list_length(rr_list); + id_rowItem = malloc(sizeof(int) * count_selected_rows); + + for(node = rr_list; node != NULL; node = node->next) + { + GtkTreePath* path = gtk_tree_row_reference_get_path(node->data); + if (path) + { + GtkTreeIter iterItem; + gtk_tree_model_get_iter(model, &iterItem, path); + + id_rowItem[i] = gtkTreeGetNodeId(ih, iterItem); + i++; + + gtk_tree_path_free(path); + } + } + + g_list_foreach(rr_list, (GFunc) gtk_tree_row_reference_free, NULL); + g_list_free(rr_list); + + if (cbMulti) + cbMulti(ih, id_rowItem, count_selected_rows); + else + { + for (i=0; ihandle)); +#else + int indent = 0; +#endif + sprintf(str, "%d", indent); + return str; +} + +static int gtkTreeSetIndentationAttrib(Ihandle* ih, const char* value) +{ +#if GTK_CHECK_VERSION(2, 12, 0) + int indent; + if (iupStrToInt(value, &indent)) + gtk_tree_view_set_level_indentation(GTK_TREE_VIEW(ih->handle), indent); +#endif + return 0; +} + +static int gtkTreeSetTopItemAttrib(Ihandle* ih, const char* value) +{ + GtkTreeStore* store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle))); + GtkTreeIter iterItem; + GtkTreePath* path; + + if (!gtkTreeFindNodeFromString(ih, GTK_TREE_MODEL(store), value, &iterItem)) + return 0; + + path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iterItem); + + if (!gtk_tree_view_row_expanded(GTK_TREE_VIEW(ih->handle), path)) + gtk_tree_view_expand_to_path(GTK_TREE_VIEW(ih->handle), path); + + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(ih->handle), path, NULL, FALSE, 0, 0); /* scroll to visible */ + + gtk_tree_path_free(path); + + return 0; +} + +static int gtkTreeSetSpacingAttrib(Ihandle* ih, const char* value) +{ + if(!iupStrToInt(value, &ih->data->spacing)) + ih->data->spacing = 1; + + if(ih->data->spacing < 1) + ih->data->spacing = 1; + + if (ih->handle) + { + GtkCellRenderer *renderer_img = (GtkCellRenderer*)iupAttribGet(ih, "_IUPGTK_RENDERER_IMG"); + GtkCellRenderer *renderer_txt = (GtkCellRenderer*)iupAttribGet(ih, "_IUPGTK_RENDERER_TEXT"); + g_object_set(G_OBJECT(renderer_img), "ypad", ih->data->spacing, NULL); + g_object_set(G_OBJECT(renderer_txt), "ypad", ih->data->spacing, NULL); + return 0; + } + else + return 1; /* store until not mapped, when mapped will be set again */ +} + +static int gtkTreeSetExpandAllAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + gtk_tree_view_expand_all(GTK_TREE_VIEW(ih->handle)); + else + { + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterRoot; + GtkTreePath* pathRoot; + + gtk_tree_view_collapse_all(GTK_TREE_VIEW(ih->handle)); + + /* The root node is always expanded */ + gtk_tree_model_get_iter_first(model, &iterRoot); + pathRoot = gtk_tree_model_get_path(model, &iterRoot); + gtk_tree_view_expand_row(GTK_TREE_VIEW(ih->handle), pathRoot, FALSE); + gtk_tree_path_free(pathRoot); + } + + return 0; +} + +static char* gtkTreeGetDepthAttrib(Ihandle* ih, const char* name_id) +{ + char* depth; + GtkTreeStore* store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle))); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, GTK_TREE_MODEL(store), name_id, &iterItem)) + return NULL; + + depth = iupStrGetMemory(10); + sprintf(depth, "%d", gtk_tree_store_iter_depth(store, &iterItem)); + return depth; +} + +static int gtkTreeSetMoveNodeAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + GtkTreeModel* model; + GtkTreeIter iterItemSrc, iterItemDst, iterNewItem; + GtkTreeIter iterParent, iterNextParent; + + if (!ih->handle) /* do not store the action before map */ + return 0; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItemSrc)) + return 0; + + if (!gtkTreeFindNodeFromString(ih, model, value, &iterItemDst)) + return 0; + + /* If Drag item is an ancestor of Drop item then return */ + iterParent = iterItemDst; + while(gtk_tree_model_iter_parent(model, &iterNextParent, &iterParent)) + { + if (iterNextParent.user_data == iterItemSrc.user_data) + return 0; + iterParent = iterNextParent; + } + + /* Copying the node and its children to the new position */ + gtkTreeCopyNode(ih, model, &iterItemSrc, &iterItemDst, &iterNewItem, 0); /* not a full copy, preserve user data */ + + /* Deleting the node of its old position */ + /* do not delete the user data, we copy the references in CopyNode */ + gtk_tree_store_remove(GTK_TREE_STORE(model), &iterItemSrc); + + return 0; +} + +static int gtkTreeSetCopyNodeAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + GtkTreeModel* model; + GtkTreeIter iterItemSrc, iterItemDst, iterNewItem; + GtkTreeIter iterParent, iterNextParent; + + if (!ih->handle) /* do not store the action before map */ + return 0; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItemSrc)) + return 0; + + if (!gtkTreeFindNodeFromString(ih, model, value, &iterItemDst)) + return 0; + + /* If Drag item is an ancestor of Drop item then return */ + iterParent = iterItemDst; + while(gtk_tree_model_iter_parent(model, &iterNextParent, &iterParent)) + { + if (iterNextParent.user_data == iterItemSrc.user_data) + return 0; + iterParent = iterNextParent; + } + + /* Copying the node and its children to the new position */ + gtkTreeCopyNode(ih, model, &iterItemSrc, &iterItemDst, &iterNewItem, 1); + + return 0; +} + +static char* gtkTreeGetColorAttrib(Ihandle* ih, const char* name_id) +{ + char* str; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + GdkColor *color; + + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return NULL; + + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_COLOR, &color, -1); + if (!color) + return NULL; + + str = iupStrGetMemory(20); + sprintf(str, "%d %d %d", iupCOLOR16TO8(color->red), + iupCOLOR16TO8(color->green), + iupCOLOR16TO8(color->blue)); + return str; +} + +static int gtkTreeSetColorAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + GtkTreeStore* store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle))); + GtkTreeIter iterItem; + GdkColor color; + unsigned char r, g, b; + + if (!gtkTreeFindNodeFromString(ih, GTK_TREE_MODEL(store), name_id, &iterItem)) + return 0; + + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgdkColorSet(&color, r, g, b); + gtk_tree_store_set(store, &iterItem, IUPGTK_TREE_COLOR, &color, -1); + + return 0; +} + +static char* gtkTreeGetParentAttrib(Ihandle* ih, const char* name_id) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + GtkTreeIter iterParent; + char* str; + + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return NULL; + + if (!gtk_tree_model_iter_parent(model, &iterParent, &iterItem)) + return NULL; + + str = iupStrGetMemory(10); + sprintf(str, "%d", gtkTreeGetNodeId(ih, iterParent)); + return str; +} + +static char* gtkTreeGetChildCountAttrib(Ihandle* ih, const char* name_id) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + char* str; + + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return NULL; + + str = iupStrGetMemory(10); + sprintf(str, "%d", gtk_tree_model_iter_n_children(model, &iterItem)); + return str; +} + +static int gtkTreeCount(GtkTreeModel* model, GtkTreeIter iterBranch) +{ + GtkTreeIter iterChild; + int count = 0; + int hasItem = gtk_tree_model_iter_children(model, &iterChild, &iterBranch); /* get the firstchild */ + count++; + while(hasItem) + { + count += gtkTreeCount(model, iterChild); + + /* Go to next sibling item */ + hasItem = gtk_tree_model_iter_next(model, &iterChild); + } + + return count; +} + +static char* gtkTreeGetCountAttrib(Ihandle* ih) +{ + GtkTreeIter iterRoot; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + char* str = iupStrGetMemory(10); + gtk_tree_model_get_iter_first(model, &iterRoot); + sprintf(str, "%d", gtkTreeCount(model, iterRoot)); + return str; +} + +static char* gtkTreeGetKindAttrib(Ihandle* ih, const char* name_id) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + int kind; + + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return NULL; + + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_KIND, &kind, -1); + + if(!kind) + return "BRANCH"; + else + return "LEAF"; +} + +static char* gtkTreeGetStateAttrib(Ihandle* ih, const char* name_id) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return NULL; + + if (gtk_tree_model_iter_has_child(model, &iterItem)) + { + GtkTreePath* path = gtk_tree_model_get_path(model, &iterItem); + int expanded = gtk_tree_view_row_expanded(GTK_TREE_VIEW(ih->handle), path); + gtk_tree_path_free(path); + + if (expanded) + return "EXPANDED"; + else + return "COLLAPSED"; + } + + return NULL; +} + +static int gtkTreeSetStateAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + GtkTreePath* path; + + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return 0; + + path = gtk_tree_model_get_path(model, &iterItem); + gtkTreeExpandItem(ih, path, iupStrEqualNoCase(value, "EXPANDED")); + gtk_tree_path_free(path); + + return 0; +} + +static char* gtkTreeGetTitle(GtkTreeModel* model, GtkTreeIter iterItem) +{ + char* title; + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_TITLE, &title, -1); + return iupgtkStrConvertFromUTF8(title); +} + +static char* gtkTreeGetTitleAttrib(Ihandle* ih, const char* name_id) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return NULL; + return gtkTreeGetTitle(model, iterItem); +} + +static int gtkTreeSetTitleAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + GtkTreeStore* store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle))); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, GTK_TREE_MODEL(store), name_id, &iterItem)) + return 0; + gtk_tree_store_set(store, &iterItem, IUPGTK_TREE_TITLE, iupgtkStrConvertToUTF8(value), -1); + return 0; +} + +static int gtkTreeSetTitleFontAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + PangoFontDescription* fontdesc = NULL; + GtkTreeStore* store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle))); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, GTK_TREE_MODEL(store), name_id, &iterItem)) + return 0; + if (value) + fontdesc = iupgtkGetPangoFontDesc(value); + gtk_tree_store_set(store, &iterItem, IUPGTK_TREE_FONT, fontdesc, -1); + return 0; +} + +static char* gtkTreeGetTitleFontAttrib(Ihandle* ih, const char* name_id) +{ + PangoFontDescription* fontdesc; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return NULL; + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_FONT, &fontdesc, -1); + return pango_font_description_to_string(fontdesc); +} + +static char* gtkTreeGetFindUserDataAttrib(Ihandle* ih, const char* name_id) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + int id; + char* str = (char*)(name_id+1); /* skip ':' */ + void* userdata = NULL; + if (sscanf(str, "%p", &userdata)!=1) + return NULL; + id = gtkTreeGetUserDataId(ih, model, userdata); + if (id == -1) + return NULL; + str = iupStrGetMemory(16); + sprintf(str, "%d", id); + return str; +} + +static char* gtkTreeGetUserDataAttrib(Ihandle* ih, const char* name_id) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + char* userdata; + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return NULL; + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_USERDATA, &userdata, -1); + return userdata; +} + +static int gtkTreeSetUserDataAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + GtkTreeStore* store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle))); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, GTK_TREE_MODEL(store), name_id, &iterItem)) + return 0; + gtk_tree_store_set(store, &iterItem, IUPGTK_TREE_USERDATA, value, -1); + return 0; +} + +static char* gtkTreeGetValueAttrib(Ihandle* ih) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreePath* path = NULL; + char* str; + + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ih->handle), &path, NULL); + if (path) + { + GtkTreeIter iterItem; + gtk_tree_model_get_iter(model, &iterItem, path); + gtk_tree_path_free(path); + + str = iupStrGetMemory(16); + sprintf(str, "%d", gtkTreeGetNodeId(ih, iterItem)); + return str; + } + + return "0"; /* default VALUE is root */ +} + +static int gtkTreeSetMarkAttrib(Ihandle* ih, const char* value) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterRoot; + + if (ih->data->mark_mode==ITREE_MARK_SINGLE) + return 0; + + gtk_tree_model_get_iter_first(model, &iterRoot); + + if(iupStrEqualNoCase(value, "BLOCK")) + { + GtkTreePath* pathFocus; + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ih->handle), &pathFocus, NULL); + gtk_tree_selection_select_range(selection, (GtkTreePath*)iupAttribGet(ih, "_IUPTREE_MARKSTART_NODE"), pathFocus); + gtk_tree_path_free(pathFocus); + } + else if(iupStrEqualNoCase(value, "CLEARALL")) + gtk_tree_selection_unselect_all(selection); + else if(iupStrEqualNoCase(value, "MARKALL")) + gtk_tree_selection_select_all(selection); + else if(iupStrEqualNoCase(value, "INVERTALL")) /* INVERTALL *MUST* appear before INVERT, or else INVERTALL will never be called. */ + gtkTreeInvertAllNodeMarking(ih, model, selection, &iterRoot); + else if(iupStrEqualPartial(value, "INVERT")) + { + /* iupStrEqualPartial allows the use of "INVERTid" form */ + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, model, &value[strlen("INVERT")], &iterItem)) + return 0; + + if(gtk_tree_selection_iter_is_selected(selection, &iterItem)) + gtk_tree_selection_unselect_iter(selection, &iterItem); + else + gtk_tree_selection_select_iter(selection, &iterItem); + } + else + { + GtkTreePath *path1, *path2; + GtkTreeIter iterItem1, iterItem2; + char str1[50], str2[50]; + if (iupStrToStrStr(value, str1, str2, '-')!=2) + return 0; + + if (!gtkTreeFindNodeFromString(ih, model, str1, &iterItem1)) + return 0; + if (!gtkTreeFindNodeFromString(ih, model, str2, &iterItem2)) + return 0; + + path1 = gtk_tree_model_get_path(model, &iterItem1); + path2 = gtk_tree_model_get_path(model, &iterItem2); + gtk_tree_selection_select_range(selection, path1, path2); + gtk_tree_path_free(path1); + gtk_tree_path_free(path2); + } + + return 1; +} + +static int gtkTreeSetValueAttrib(Ihandle* ih, const char* value) +{ + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterRoot, iterItem; + GtkTreePath* path; + + if (gtkTreeSetMarkAttrib(ih, value)) + return 0; + + gtk_tree_model_get_iter_first(model, &iterRoot); + + if (iupStrEqualNoCase(value, "ROOT")) + iterItem = iterRoot; + else if(iupStrEqualNoCase(value, "LAST")) + iterItem = gtkTreeGetLastVisibleNode(ih, model, iterRoot); + else if(iupStrEqualNoCase(value, "PGUP")) + { + GtkTreeIter iterPrev; + + GtkTreePath* pathFocus; + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ih->handle), &pathFocus, NULL); + gtk_tree_model_get_iter(model, &iterPrev, pathFocus); + gtk_tree_path_free(pathFocus); + + ih->data->id_control = -1; + gtkTreeFindVisibleNodeId(ih, model, iterRoot, iterPrev); + ih->data->id_control -= 10; /* less 10 visible nodes */ + + if(ih->data->id_control < 0) + ih->data->id_control = 0; /* Begin of tree = Root id */ + + iterItem = gtkTreeFindVisibleNodeFromId(ih, model, iterRoot); + } + else if(iupStrEqualNoCase(value, "PGDN")) + { + GtkTreeIter iterNext; + + GtkTreePath* pathFocus; + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ih->handle), &pathFocus, NULL); + gtk_tree_model_get_iter(model, &iterNext, pathFocus); + gtk_tree_path_free(pathFocus); + + ih->data->id_control = -1; + gtkTreeFindVisibleNodeId(ih, model, iterRoot, iterNext); + ih->data->id_control += 10; /* more 10 visible nodes */ + + iterNext = gtkTreeFindVisibleNodeFromId(ih, model, iterRoot); + + if (ih->data->id_control >= 0) + iterNext = gtkTreeGetLastVisibleNode(ih, model, iterRoot); + + iterItem = iterNext; + } + else if(iupStrEqualNoCase(value, "NEXT")) + { + GtkTreeIter iterNext; + + GtkTreePath* pathFocus; + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ih->handle), &pathFocus, NULL); + gtk_tree_model_get_iter(model, &iterNext, pathFocus); + gtk_tree_path_free(pathFocus); + + ih->data->id_control = -1; + gtkTreeFindVisibleNodeId(ih, model, iterRoot, iterNext); + ih->data->id_control++; /* more 1 visible node */ + + iterNext = gtkTreeFindVisibleNodeFromId(ih, model, iterRoot); + + if (ih->data->id_control >= 0) + iterNext = gtkTreeGetLastVisibleNode(ih, model, iterRoot); + + iterItem = iterNext; + } + else if(iupStrEqualNoCase(value, "PREVIOUS")) + { + GtkTreeIter iterPrev; + + GtkTreePath* pathFocus; + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ih->handle), &pathFocus, NULL); + gtk_tree_model_get_iter(model, &iterPrev, pathFocus); + gtk_tree_path_free(pathFocus); + + ih->data->id_control = -1; + gtkTreeFindVisibleNodeId(ih, model, iterRoot, iterPrev); + ih->data->id_control--; /* less 1 visible node */ + + if (ih->data->id_control < 0) + ih->data->id_control = 0; + + iterItem = gtkTreeFindVisibleNodeFromId(ih, model, iterRoot); + if (!iterItem.user_data) + return 0; + } + else + { + if (!gtkTreeFindNodeFromString(ih, model, value, &iterItem)) + return 0; + } + + /* select */ + if (ih->data->mark_mode==ITREE_MARK_SINGLE) + { + iupAttribSetStr(ih, "_IUP_IGNORE_SELECTION", "1"); + gtk_tree_selection_select_iter(selection, &iterItem); + } + + path = gtk_tree_model_get_path(model, &iterItem); + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(ih->handle), path, NULL, FALSE, 0, 0); /* scroll to visible */ + gtk_tree_view_set_cursor(GTK_TREE_VIEW(ih->handle), path, NULL, FALSE); /* set focus */ + gtk_tree_path_free(path); + + iupAttribSetInt(ih, "_IUPTREE_OLDVALUE", gtkTreeGetNodeId(ih, iterItem)); + + return 0; +} + +static int gtkTreeSetMarkStartAttrib(Ihandle* ih, const char* name_id) +{ + GtkTreePath *pathMarkStart, *pathMarkStartPrev; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return 0; + + pathMarkStart = gtk_tree_model_get_path(model, &iterItem); + + pathMarkStartPrev = (GtkTreePath*)iupAttribGet(ih, "_IUPTREE_MARKSTART_NODE"); + if (pathMarkStartPrev) + gtk_tree_path_free(pathMarkStartPrev); + + iupAttribSetStr(ih, "_IUPTREE_MARKSTART_NODE", (char*)pathMarkStart); + + return 1; +} + +static char* gtkTreeGetMarkedAttrib(Ihandle* ih, const char* name_id) +{ + GtkTreeSelection* selection; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return 0; + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + if (gtk_tree_selection_iter_is_selected(selection, &iterItem)) + return "YES"; + else + return "NO"; +} + +static int gtkTreeSetMarkedAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + GtkTreeSelection* selection; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return 0; + + iupAttribSetStr(ih, "_IUP_IGNORE_SELECTION", "1"); + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + if (iupStrBoolean(value)) + gtk_tree_selection_select_iter(selection, &iterItem); + else + gtk_tree_selection_unselect_iter(selection, &iterItem); + + return 0; +} + +static int gtkTreeSetDelNodeAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + if (iupStrEqualNoCase(value, "SELECTED")) /* selected here means the specified one */ + { + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem; + GtkTreeIter iterParent; + + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return 0; + + if (!gtk_tree_model_iter_parent(model, &iterParent, &iterItem)) /* the root node can't be deleted */ + return 0; + + gtkTreeCallNodeRemoved(ih, model, &iterItem); + + /* deleting the specified node (and it's children) */ + gtk_tree_store_remove(GTK_TREE_STORE(model), &iterItem); + } + else if(iupStrEqualNoCase(value, "CHILDREN")) /* children of the specified one */ + { + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeIter iterItem, iterChild; + int hasChildren; + + if (!gtkTreeFindNodeFromString(ih, model, name_id, &iterItem)) + return 0; + + hasChildren = gtk_tree_model_iter_children(model, &iterChild, &iterItem); + + /* deleting the selected node's children */ + while(hasChildren) + { + gtkTreeCallNodeRemoved(ih, model, &iterChild); + hasChildren = gtk_tree_store_remove(GTK_TREE_STORE(model), &iterChild); + } + } + else if(iupStrEqualNoCase(value, "MARKED")) /* Delete the array of marked nodes */ + { + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + GList *rr_list = NULL; + GList *node; + + gtk_tree_selection_selected_foreach(selection, (GtkTreeSelectionForeachFunc)gtkTreeSelected_Iter_Func, &rr_list); + + for(node = rr_list; node != NULL; node = node->next) + { + GtkTreePath* path = gtk_tree_row_reference_get_path(node->data); + if (path) + { + GtkTreeIter iterItem; + if (gtk_tree_model_get_iter(model, &iterItem, path)) + { + gtkTreeCallNodeRemoved(ih, model, &iterItem); + gtk_tree_store_remove(GTK_TREE_STORE(model), &iterItem); + } + gtk_tree_path_free(path); + } + gtk_tree_row_reference_free(node->data); + } + g_list_free(rr_list); + } + + return 0; +} + +static int gtkTreeSetRenameAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->show_rename) + { + GtkTreePath* path; + IFni cbShowRename = (IFni)IupGetCallback(ih, "SHOWRENAME_CB"); + GtkTreeViewColumn *focus_column; + + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ih->handle), &path, &focus_column); + + if (cbShowRename) + { + GtkTreeIter iterItem; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + gtk_tree_model_get_iter(model, &iterItem, path); + cbShowRename(ih, gtkTreeGetNodeId(ih, iterItem)); + } + + gtk_tree_view_set_cursor(GTK_TREE_VIEW(ih->handle), path, focus_column, TRUE); + gtk_tree_path_free(path); + } + else + { + IFnis cbRenameNode = (IFnis)IupGetCallback(ih, "RENAMENODE_CB"); + if (cbRenameNode) + { + GtkTreePath* path; + GtkTreeIter iterItem; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ih->handle), &path, NULL); + gtk_tree_model_get_iter(model, &iterItem, path); + gtk_tree_path_free(path); + cbRenameNode(ih, gtkTreeGetNodeId(ih, iterItem), gtkTreeGetTitle(model, iterItem)); + } + } + + (void)value; + return 0; +} + +static int gtkTreeSetImageExpandedAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int kind; + GtkTreeStore* store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle))); + GdkPixbuf* pixExpand = iupImageGetImage(value, ih, 0); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, GTK_TREE_MODEL(store), name_id, &iterItem)) + return 0; + + gtk_tree_model_get(GTK_TREE_MODEL(store), &iterItem, IUPGTK_TREE_KIND, &kind, -1); + + if (kind == ITREE_BRANCH) + { + if (pixExpand) + gtk_tree_store_set(store, &iterItem, IUPGTK_TREE_IMAGE_EXPANDED, pixExpand, + IUPGTK_TREE_HAS_IMAGE_EXPANDED, TRUE, -1); + else + gtk_tree_store_set(store, &iterItem, IUPGTK_TREE_IMAGE_EXPANDED, ih->data->def_image_expanded, + IUPGTK_TREE_HAS_IMAGE_EXPANDED, FALSE, -1); + } + + return 1; +} + +static int gtkTreeSetImageAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + GtkTreeStore* store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle))); + GdkPixbuf* pixImage = iupImageGetImage(value, ih, 0); + GtkTreeIter iterItem; + if (!gtkTreeFindNodeFromString(ih, GTK_TREE_MODEL(store), name_id, &iterItem)) + return 0; + + if (pixImage) + { + gtk_tree_store_set(store, &iterItem, IUPGTK_TREE_IMAGE, pixImage, + IUPGTK_TREE_HAS_IMAGE, TRUE, -1); + } + else + { + int kind; + gtk_tree_model_get(GTK_TREE_MODEL(store), &iterItem, IUPGTK_TREE_KIND, &kind, -1); + if (kind == ITREE_BRANCH) + gtk_tree_store_set(store, &iterItem, IUPGTK_TREE_IMAGE, ih->data->def_image_collapsed, + IUPGTK_TREE_HAS_IMAGE, FALSE, -1); + else + gtk_tree_store_set(store, &iterItem, IUPGTK_TREE_IMAGE, ih->data->def_image_leaf, + IUPGTK_TREE_HAS_IMAGE, FALSE, -1); + } + + return 1; +} + +static int gtkTreeSetImageBranchExpandedAttrib(Ihandle* ih, const char* value) +{ + GtkTreeIter iterRoot; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + ih->data->def_image_expanded = iupImageGetImage(value, ih, 0); + + gtk_tree_model_get_iter_first(model, &iterRoot); + + /* Update all images, starting at root node */ + gtkTreeUpdateImages(ih, model, iterRoot, ITREE_UPDATEIMAGE_EXPANDED); + + return 1; +} + +static int gtkTreeSetImageBranchCollapsedAttrib(Ihandle* ih, const char* value) +{ + GtkTreeIter iterRoot; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + ih->data->def_image_collapsed = iupImageGetImage(value, ih, 0); + + gtk_tree_model_get_iter_first(model, &iterRoot); + + /* Update all images, starting at root node */ + gtkTreeUpdateImages(ih, model, iterRoot, ITREE_UPDATEIMAGE_COLLAPSED); + + return 1; +} + +static int gtkTreeSetImageLeafAttrib(Ihandle* ih, const char* value) +{ + GtkTreeIter iterRoot; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + ih->data->def_image_leaf = iupImageGetImage(value, ih, 0); + + gtk_tree_model_get_iter_first(model, &iterRoot); + + /* Update all images, starting at root node */ + gtkTreeUpdateImages(ih, model, iterRoot, ITREE_UPDATEIMAGE_LEAF); + + return 1; +} + +static int gtkTreeSetBgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + + GtkScrolledWindow* scrolled_window = (GtkScrolledWindow*)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (scrolled_window) + { + /* ignore given value, must use only from parent for the scrollbars */ + char* parent_value = iupBaseNativeParentGetBgColor(ih); + + if (iupStrToRGB(parent_value, &r, &g, &b)) + { + GtkWidget* sb; + + if (!GTK_IS_SCROLLED_WINDOW(scrolled_window)) + scrolled_window = (GtkScrolledWindow*)iupAttribGet(ih, "_IUPGTK_SCROLLED_WINDOW"); + + iupgtkBaseSetBgColor((GtkWidget*)scrolled_window, r, g, b); + +#if GTK_CHECK_VERSION(2, 8, 0) + sb = gtk_scrolled_window_get_hscrollbar(scrolled_window); + if (sb) iupgtkBaseSetBgColor(sb, r, g, b); + + sb = gtk_scrolled_window_get_vscrollbar(scrolled_window); + if (sb) iupgtkBaseSetBgColor(sb, r, g, b); +#endif + } + } + + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + { + GtkCellRenderer* renderer_txt = (GtkCellRenderer*)iupAttribGet(ih, "_IUPGTK_RENDERER_TEXT"); + GtkCellRenderer* renderer_img = (GtkCellRenderer*)iupAttribGet(ih, "_IUPGTK_RENDERER_IMG"); + GdkColor color; + iupgdkColorSet(&color, r, g, b); + g_object_set(G_OBJECT(renderer_txt), "cell-background-gdk", &color, NULL); + g_object_set(G_OBJECT(renderer_img), "cell-background-gdk", &color, NULL); + } + + iupdrvBaseSetBgColorAttrib(ih, value); /* use given value for contents */ + + /* no need to update internal image cache in GTK */ + + return 1; +} + +static int gtkTreeSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + iupgtkBaseSetFgColor(ih->handle, r, g, b); + + { + GtkCellRenderer* renderer_txt = (GtkCellRenderer*)iupAttribGet(ih, "_IUPGTK_RENDERER_TEXT"); + GdkColor color; + iupgdkColorSet(&color, r, g, b); + g_object_set(G_OBJECT(renderer_txt), "foreground-gdk", &color, NULL); + g_object_get(G_OBJECT(renderer_txt), "foreground-gdk", &color, NULL); + color.blue = 0; + } + + return 1; +} + +void iupdrvTreeUpdateMarkMode(Ihandle *ih) +{ + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + gtk_tree_selection_set_mode(selection, (ih->data->mark_mode==ITREE_MARK_SINGLE)? GTK_SELECTION_SINGLE: GTK_SELECTION_MULTIPLE); + + if (ih->data->mark_mode==ITREE_MARK_MULTIPLE && !ih->data->show_dragdrop) + { +#if GTK_CHECK_VERSION(2, 10, 0) + gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(ih->handle), TRUE); +#endif + } +} + + +/***********************************************************************************************/ + + +static void gtkTreeSetRenameCaretPos(GtkCellEditable *editable, const char* value) +{ + int pos = 1; + + if (iupStrToInt(value, &pos)) + { + if (pos < 1) pos = 1; + pos--; /* IUP starts at 1 */ + + gtk_editable_set_position(GTK_EDITABLE(editable), pos); + } +} + +static void gtkTreeSetRenameSelectionPos(GtkCellEditable *editable, const char* value) +{ + int start = 1, end = 1; + + if (iupStrToIntInt(value, &start, &end, ':') != 2) + return; + + if(start < 1 || end < 1) + return; + + start--; /* IUP starts at 1 */ + end--; + + gtk_editable_select_region(GTK_EDITABLE(editable), start, end); +} + +/*****************************************************************************/ +/* SIGNALS */ +/*****************************************************************************/ + +static void gtkTreeCellTextEditingStarted(GtkCellRenderer *cell, GtkCellEditable *editable, const gchar *path_string, Ihandle *ih) +{ + char* value; + GtkTreeIter iterItem; + PangoFontDescription* fontdesc = NULL; + GdkColor *color = NULL; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + + value = iupAttribGetStr(ih, "RENAMECARET"); + if (value) + gtkTreeSetRenameCaretPos(editable, value); + + value = iupAttribGetStr(ih, "RENAMESELECTION"); + if (value) + gtkTreeSetRenameSelectionPos(editable, value); + + gtk_tree_model_get_iter_from_string(model, &iterItem, path_string); + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_FONT, &fontdesc, -1); + if (fontdesc) + gtk_widget_modify_font(GTK_WIDGET(editable), fontdesc); + + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_COLOR, &color, -1); + if (color) + iupgtkBaseSetFgGdkColor(GTK_WIDGET(editable), color); + + (void)cell; +} + +static void gtkTreeCellTextEdited(GtkCellRendererText *cell, gchar *path_string, gchar *new_text, Ihandle* ih) +{ + GtkTreeModel* model; + GtkTreeIter iterItem; + IFnis cbRename; + + if (!new_text) + return; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + if (!gtk_tree_model_get_iter_from_string(model, &iterItem, path_string)) + return; + + cbRename = (IFnis)IupGetCallback(ih, "RENAME_CB"); + if (cbRename) + { + if (cbRename(ih, gtkTreeGetNodeId(ih, iterItem), iupgtkStrConvertFromUTF8(new_text)) == IUP_IGNORE) + return; + } + + /* It is the responsibility of the application to update the model and store new_text at the position indicated by path. */ + gtk_tree_store_set(GTK_TREE_STORE(model), &iterItem, IUPGTK_TREE_TITLE, new_text, -1); + + (void)cell; +} + +static int gtkTreeCallDragDropCb(Ihandle* ih, GtkTreeIter *iterDrag, GtkTreeIter *iterDrop, int *is_ctrl) +{ + IFniiii cbDragDrop = (IFniiii)IupGetCallback(ih, "DRAGDROP_CB"); + int is_shift = 0; + char key[5]; + iupdrvGetKeyState(key); + if (key[0] == 'S') + is_shift = 1; + if (key[1] == 'C') + *is_ctrl = 1; + else + *is_ctrl = 0; + + if (cbDragDrop) + { + int drag_id = gtkTreeGetNodeId(ih, *iterDrag); + int drop_id = gtkTreeGetNodeId(ih, *iterDrop); + return cbDragDrop(ih, drag_id, drop_id, is_shift, *is_ctrl); + } + + return IUP_CONTINUE; /* allow to move by default if callback not defined */ +} + +static void gtkTreeDragDataReceived(GtkWidget *widget, GdkDragContext *context, gint x, gint y, + GtkSelectionData *selection_data, guint info, guint time, Ihandle* ih) +{ + GtkTreePath* pathDrag = (GtkTreePath*)iupAttribGet(ih, "_IUPTREE_DRAGITEM"); + GtkTreePath* pathDrop = (GtkTreePath*)iupAttribGet(ih, "_IUPTREE_DROPITEM"); + int accepted = FALSE; + int is_ctrl; + + if (pathDrag && pathDrop) + { + GtkTreeIter iterDrag, iterDrop, iterParent, iterNextParent; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + + gtk_tree_model_get_iter(model, &iterDrag, pathDrag); + gtk_tree_model_get_iter(model, &iterDrop, pathDrop); + + iterParent = iterDrop; + while(gtk_tree_model_iter_parent(model, &iterNextParent, &iterParent)) + { + if (iterNextParent.user_data == iterDrag.user_data) + goto gtkTreeDragDataReceived_FINISH; + iterParent = iterNextParent; + } + + accepted = TRUE; + + if (gtkTreeCallDragDropCb(ih, &iterDrag, &iterDrop, &is_ctrl) == IUP_CONTINUE) + { + GtkTreeIter iterNewItem; + + /* Copy the dragged item to the new position. */ + gtkTreeCopyNode(ih, model, &iterDrag, &iterDrop, &iterNewItem, is_ctrl); + + if (!is_ctrl) + { + /* do not delete the user data, we copy the references in CopyNode */ + gtk_tree_store_remove(GTK_TREE_STORE(model), &iterDrag); + } + + /* set focus and selection */ + { + GtkTreePath *pathNew; + GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + + pathNew = gtk_tree_model_get_path(model, &iterNewItem); + gtk_tree_selection_select_path(selection, pathNew); + + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(ih->handle), pathNew, NULL, FALSE, 0, 0); + gtk_tree_view_set_cursor(GTK_TREE_VIEW(ih->handle), pathNew, NULL, FALSE); + + gtk_tree_path_free(pathNew); + } + } + } + +gtkTreeDragDataReceived_FINISH: + if (pathDrag) gtk_tree_path_free(pathDrag); + if (pathDrop) gtk_tree_path_free(pathDrop); + + iupAttribSetStr(ih, "_IUPTREE_DRAGITEM", NULL); + iupAttribSetStr(ih, "_IUPTREE_DROPITEM", NULL); + + gtk_drag_finish(context, accepted, (context->action == GDK_ACTION_MOVE), time); + + (void)widget; + (void)info; + (void)x; + (void)y; + (void)selection_data; +} + +static gboolean gtkTreeDragDrop(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, Ihandle* ih) +{ + GtkTreePath* path; + GtkTreeViewDropPosition pos; + GdkAtom target = GDK_NONE; + + /* unset any highlight row */ + gtk_tree_view_set_drag_dest_row (GTK_TREE_VIEW(widget), NULL, GTK_TREE_VIEW_DROP_BEFORE); + + if (gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(ih->handle), x, y, &path, &pos)) + { + if ((pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE || pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) && + (gtk_tree_path_compare(path, (GtkTreePath*)iupAttribGet(ih, "_IUPTREE_DRAGITEM")) != 0)) + { + target = gtk_drag_dest_find_target(widget, context, gtk_drag_dest_get_target_list(widget)); + if (target != GDK_NONE) + { + iupAttribSetStr(ih, "_IUPTREE_DROPITEM", (char*)path); + gtk_drag_get_data(widget, context, target, time); + return TRUE; + } + } + } + + (void)widget; + return FALSE; +} + +static void gtkTreeDragLeave(GtkWidget *widget, GdkDragContext *context, guint time) +{ + /* unset any highlight row */ + gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW(widget), NULL, GTK_TREE_VIEW_DROP_BEFORE); + (void)context; + (void)time; +} + +static gboolean gtkTreeDragMotion(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, Ihandle* ih) +{ + GtkTreePath* path; + GtkTreeViewDropPosition pos; + GtkTreePath* pathDrag = (GtkTreePath*)iupAttribGet(ih, "_IUPTREE_DRAGITEM"); + if (pathDrag && gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(ih->handle), x, y, &path, &pos)) + { + if ((pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE || pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) && + (gtk_tree_path_compare(path, pathDrag) != 0)) + { + gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW(widget), path, pos); + gdk_drag_status(context, context->actions, time); + return TRUE; + } + + gtk_tree_path_free(path); + } + + (void)widget; + return FALSE; +} + +static void gtkTreeDragBegin(GtkWidget *widget, GdkDragContext *context, Ihandle* ih) +{ + int x = iupAttribGetInt(ih, "_IUPTREE_DRAG_X"); + int y = iupAttribGetInt(ih, "_IUPTREE_DRAG_Y"); + GtkTreePath* path; + GtkTreeViewDropPosition pos; + if (gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(ih->handle), x, y, &path, &pos)) + { + if ((pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE || pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER)) + { + GdkPixmap* pixmap; + iupAttribSetStr(ih, "_IUPTREE_DRAGITEM", (char*)path); + + pixmap = gtk_tree_view_create_row_drag_icon(GTK_TREE_VIEW(ih->handle), path); + gtk_drag_source_set_icon(widget, gtk_widget_get_colormap(widget), pixmap, NULL); + g_object_unref(pixmap); + return; + } + } + + (void)context; + (void)widget; +} + +static void gtkTreeSelectionChanged(GtkTreeSelection* selection, Ihandle* ih) +{ + IFnii cbSelec; + int is_ctrl = 0; + + if (ih->data->mark_mode == ITREE_MARK_MULTIPLE) + { + char key[5]; + iupdrvGetKeyState(key); + if (key[0] == 'S') + return; + else if (key[1] == 'C') + is_ctrl = 1; + + if (iupAttribGetInt(ih, "_IUPTREE_EXTENDSELECT")==2 && !is_ctrl) + { + iupAttribSetStr(ih, "_IUPTREE_EXTENDSELECT", NULL); + gtkTreeCallMultiSelectionCb(ih); + return; + } + } + + cbSelec = (IFnii)IupGetCallback(ih, "SELECTION_CB"); + if (cbSelec) + { + int curpos = -1, is_selected = 0; + + if (iupAttribGet(ih, "_IUP_IGNORE_SELECTION")) + { + iupAttribSetStr(ih, "_IUP_IGNORE_SELECTION", NULL); + return; + } + + { + GtkTreeIter iterFocus; + GtkTreePath* pathFocus; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ih->handle), &pathFocus, NULL); + if (pathFocus) + { + gtk_tree_model_get_iter(model, &iterFocus, pathFocus); + gtk_tree_path_free(pathFocus); + curpos = gtkTreeGetNodeId(ih, iterFocus); + is_selected = gtk_tree_selection_iter_is_selected(selection, &iterFocus); + } + } + + if (curpos == -1) + return; + + if (is_ctrl) + cbSelec(ih, curpos, is_selected); + else + { + int oldpos = iupAttribGetInt(ih, "_IUPTREE_OLDVALUE"); + if(oldpos != curpos) + { + cbSelec(ih, oldpos, 0); /* unselected */ + cbSelec(ih, curpos, 1); /* selected */ + + iupAttribSetInt(ih, "_IUPTREE_OLDVALUE", curpos); + } + } + } +} + +static gboolean gtkTreeTestExpandRow(GtkTreeView* tree_view, GtkTreeIter *iterItem, GtkTreePath *path, Ihandle* ih) +{ + IFni cbBranchOpen = (IFni)IupGetCallback(ih, "BRANCHOPEN_CB"); + if (cbBranchOpen) + { + if (iupAttribGet(ih, "_IUPTREE_IGNORE_BRANCHOPEN_CB")) + { + iupAttribSetStr(ih, "_IUPTREE_IGNORE_BRANCHOPEN_CB", NULL); + return FALSE; + } + + if (cbBranchOpen(ih, gtkTreeGetNodeId(ih, *iterItem)) == IUP_IGNORE) + return TRUE; /* prevent the change */ + } + + (void)path; + (void)tree_view; + return FALSE; +} + +static gboolean gtkTreeTestCollapseRow(GtkTreeView* tree_view, GtkTreeIter *iterItem, GtkTreePath *path, Ihandle* ih) +{ + IFni cbBranchClose = (IFni)IupGetCallback(ih, "BRANCHCLOSE_CB"); + if (cbBranchClose) + { + if (cbBranchClose(ih, gtkTreeGetNodeId(ih, *iterItem)) == IUP_IGNORE) + return TRUE; + } + + (void)path; + (void)tree_view; + return FALSE; +} + +static void gtkTreeRowActived(GtkTreeView* tree_view, GtkTreePath *path, GtkTreeViewColumn *column, Ihandle* ih) +{ + GtkTreeIter iterItem; + GtkTreeModel* model; + int kind; /* used for nodes defined as branches, but do not have children */ + IFni cbExecuteLeaf = (IFni)IupGetCallback(ih, "EXECUTELEAF_CB"); + if (!cbExecuteLeaf) + return; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + gtk_tree_model_get_iter(model, &iterItem, path); + gtk_tree_model_get(model, &iterItem, IUPGTK_TREE_KIND, &kind, -1); + + /* just to leaf nodes */ + if(gtk_tree_model_iter_has_child(model, &iterItem) == 0 && kind == ITREE_LEAF) + cbExecuteLeaf(ih, gtkTreeGetNodeId(ih, iterItem)); + + (void)column; + (void)tree_view; +} + +static int gtkTreeConvertXYToPos(Ihandle* ih, int x, int y) +{ + GtkTreePath* path; + if (gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(ih->handle), x, y, &path, NULL)) + { + GtkTreeIter iterItem; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + gtk_tree_model_get_iter(model, &iterItem, path); + gtk_tree_path_free (path); + return gtkTreeGetNodeId(ih, iterItem); + } + return -1; +} + +static gboolean gtkTreeButtonEvent(GtkWidget *treeview, GdkEventButton *evt, Ihandle* ih) +{ + if (iupgtkButtonEvent(treeview, evt, ih) == TRUE) + return TRUE; + + if (evt->type == GDK_BUTTON_PRESS && evt->button == 3) /* right single click */ + { + IFni cbRightClick = (IFni)IupGetCallback(ih, "RIGHTCLICK_CB"); + if (cbRightClick) + { + int id = gtkTreeConvertXYToPos(ih, (int)evt->x, (int)evt->y); + if (id != -1) + cbRightClick(ih, id); + return TRUE; + } + } + else if (evt->type == GDK_2BUTTON_PRESS && evt->button == 1) /* left double click */ + { + GtkTreePath *path; + + if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), (gint) evt->x, (gint) evt->y, &path, NULL, NULL, NULL)) + { + GtkTreeIter iter; + GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(ih->handle)); + int kind; /* used for nodes defined as branches, but do not have children */ + + gtk_tree_model_get_iter(model, &iter, path); + gtk_tree_model_get(model, &iter, IUPGTK_TREE_KIND, &kind, -1); + + if (kind == ITREE_BRANCH) + gtkTreeExpandItem(ih, path, -1); /* toggle */ + + gtk_tree_path_free(path); + } + } + else if (evt->type == GDK_BUTTON_RELEASE && evt->button == 1) /* left single release */ + { + if (ih->data->mark_mode==ITREE_MARK_MULTIPLE && (evt->state & GDK_SHIFT_MASK)) + gtkTreeCallMultiSelectionCb(ih); /* Multi Selection Callback */ + + if (ih->data->mark_mode==ITREE_MARK_MULTIPLE && + !(evt->state & GDK_SHIFT_MASK) && !(evt->state & GDK_CONTROL_MASK)) + { + if (iupAttribGet(ih, "_IUPTREE_EXTENDSELECT")) + iupAttribSetStr(ih, "_IUPTREE_EXTENDSELECT", "2"); + } + } + else if (evt->type == GDK_BUTTON_PRESS && evt->button == 1) /* left single press */ + { + iupAttribSetInt(ih, "_IUPTREE_DRAG_X", (int)evt->x); + iupAttribSetInt(ih, "_IUPTREE_DRAG_Y", (int)evt->y); + + if (ih->data->mark_mode==ITREE_MARK_MULTIPLE && + !(evt->state & GDK_SHIFT_MASK) && !(evt->state & GDK_CONTROL_MASK)) + iupAttribSetStr(ih, "_IUPTREE_EXTENDSELECT", "1"); + } + + return FALSE; +} + +static gboolean gtkTreeKeyReleaseEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle *ih) +{ + if (ih->data->mark_mode==ITREE_MARK_MULTIPLE && (evt->state & GDK_SHIFT_MASK)) + { + if (evt->keyval == GDK_Up || evt->keyval == GDK_Down || evt->keyval == GDK_Home || evt->keyval == GDK_End) + gtkTreeCallMultiSelectionCb(ih); /* Multi Selection Callback */ + } + + (void)widget; + return TRUE; +} + +static gboolean gtkTreeKeyPressEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle *ih) +{ + if (iupgtkKeyPressEvent(widget, evt, ih) == TRUE) + return TRUE; + + if (evt->keyval == GDK_F2) + { + gtkTreeSetRenameAttrib(ih, NULL); + return TRUE; + } + else if (evt->keyval == GDK_Return || evt->keyval == GDK_KP_Enter) + { + gtkTreeOpenCloseEvent(ih); + return TRUE; + } + + return FALSE; +} + +static void gtkTreeEnableDragDrop(Ihandle* ih) +{ + const GtkTargetEntry row_targets[] = { + { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, 0 } + }; + + if (iupAttribGetBoolean(ih, "AUTODRAGDROP")) + { + gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW(ih->handle), + GDK_BUTTON1_MASK, + row_targets, + G_N_ELEMENTS(row_targets), + GDK_ACTION_MOVE|GDK_ACTION_COPY); + gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW(ih->handle), + row_targets, + G_N_ELEMENTS(row_targets), + GDK_ACTION_MOVE|GDK_ACTION_COPY); + } + else + { + gtk_drag_source_set(ih->handle, GDK_BUTTON1_MASK, row_targets, G_N_ELEMENTS(row_targets), GDK_ACTION_MOVE|GDK_ACTION_COPY); + gtk_drag_dest_set(ih->handle, GDK_BUTTON1_MASK, row_targets, G_N_ELEMENTS(row_targets), GDK_ACTION_MOVE|GDK_ACTION_COPY); + + g_signal_connect(G_OBJECT(ih->handle), "drag-begin", G_CALLBACK(gtkTreeDragBegin), ih); + g_signal_connect(G_OBJECT(ih->handle), "drag-motion", G_CALLBACK(gtkTreeDragMotion), ih); + g_signal_connect(G_OBJECT(ih->handle), "drag-leave", G_CALLBACK(gtkTreeDragLeave), NULL); + g_signal_connect(G_OBJECT(ih->handle), "drag-drop", G_CALLBACK(gtkTreeDragDrop), ih); + g_signal_connect(G_OBJECT(ih->handle), "drag-data-received", G_CALLBACK(gtkTreeDragDataReceived), ih); + } +} + +/*****************************************************************************/ + +static int gtkTreeMapMethod(Ihandle* ih) +{ + GtkScrolledWindow* scrolled_window = NULL; + GtkTreeStore *store; + GtkCellRenderer *renderer_img, *renderer_txt; + GtkTreeSelection* selection; + GtkTreeViewColumn *column; + + store = gtk_tree_store_new(9, GDK_TYPE_PIXBUF, G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, G_TYPE_BOOLEAN, + G_TYPE_STRING, G_TYPE_INT, GDK_TYPE_COLOR, PANGO_TYPE_FONT_DESCRIPTION, G_TYPE_POINTER); + + ih->handle = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); + + g_object_unref(store); + + if (!ih->handle) + return IUP_ERROR; + + scrolled_window = (GtkScrolledWindow*)gtk_scrolled_window_new(NULL, NULL); + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)scrolled_window); + + /* Column and renderers */ + column = gtk_tree_view_column_new(); + iupAttribSetStr(ih, "_IUPGTK_COLUMN", (char*)column); + + renderer_img = gtk_cell_renderer_pixbuf_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(column), renderer_img, FALSE); + gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(column), renderer_img, "pixbuf", IUPGTK_TREE_IMAGE, + "pixbuf-expander-open", IUPGTK_TREE_IMAGE_EXPANDED, + "pixbuf-expander-closed", IUPGTK_TREE_IMAGE, + NULL); + iupAttribSetStr(ih, "_IUPGTK_RENDERER_IMG", (char*)renderer_img); + + renderer_txt = gtk_cell_renderer_text_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(column), renderer_txt, TRUE); + gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(column), renderer_txt, "text", IUPGTK_TREE_TITLE, + "is-expander", IUPGTK_TREE_KIND, + "font-desc", IUPGTK_TREE_FONT, + "foreground-gdk", IUPGTK_TREE_COLOR, + NULL); + iupAttribSetStr(ih, "_IUPGTK_RENDERER_TEXT", (char*)renderer_txt); + + if (ih->data->show_rename) + g_object_set(G_OBJECT(renderer_txt), "editable", TRUE, NULL); + + g_object_set(G_OBJECT(renderer_txt), "xpad", 0, NULL); + g_object_set(G_OBJECT(renderer_txt), "ypad", 0, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(ih->handle), column); + + gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(ih->handle), FALSE); + gtk_tree_view_set_enable_search(GTK_TREE_VIEW(ih->handle), FALSE); + +#if GTK_CHECK_VERSION(2, 10, 0) + if (iupAttribGetBoolean(ih, "HIDELINES")) + gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(ih->handle), FALSE); + else + gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(ih->handle), TRUE); +#endif + +#if GTK_CHECK_VERSION(2, 12, 0) + if (iupAttribGetBoolean(ih, "HIDEBUTTONS")) + gtk_tree_view_set_show_expanders(GTK_TREE_VIEW(ih->handle), FALSE); + else + gtk_tree_view_set_show_expanders(GTK_TREE_VIEW(ih->handle), TRUE); +#endif + + if (ih->data->show_dragdrop) + gtkTreeEnableDragDrop(ih); + + gtk_container_add((GtkContainer*)scrolled_window, ih->handle); + gtk_widget_show((GtkWidget*)scrolled_window); + gtk_scrolled_window_set_shadow_type(scrolled_window, GTK_SHADOW_IN); + + gtk_scrolled_window_set_policy(scrolled_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(ih->handle)); + + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); + gtk_tree_view_set_reorderable(GTK_TREE_VIEW(ih->handle), FALSE); + + /* callbacks */ + g_signal_connect(selection, "changed", G_CALLBACK(gtkTreeSelectionChanged), ih); + + g_signal_connect(renderer_txt, "editing-started", G_CALLBACK(gtkTreeCellTextEditingStarted), ih); + g_signal_connect(renderer_txt, "edited", G_CALLBACK(gtkTreeCellTextEdited), ih); + + g_signal_connect(G_OBJECT(ih->handle), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + g_signal_connect(G_OBJECT(ih->handle), "motion-notify-event",G_CALLBACK(iupgtkMotionNotifyEvent), ih); + + g_signal_connect(G_OBJECT(ih->handle), "test-expand-row", G_CALLBACK(gtkTreeTestExpandRow), ih); + g_signal_connect(G_OBJECT(ih->handle), "test-collapse-row", G_CALLBACK(gtkTreeTestCollapseRow), ih); + g_signal_connect(G_OBJECT(ih->handle), "row-activated", G_CALLBACK(gtkTreeRowActived), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(gtkTreeKeyPressEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "key-release-event", G_CALLBACK(gtkTreeKeyReleaseEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "button-press-event", G_CALLBACK(gtkTreeButtonEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "button-release-event",G_CALLBACK(gtkTreeButtonEvent), ih); + + /* add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + if (!iupAttribGetBoolean(ih, "CANFOCUS")) + GTK_WIDGET_FLAGS(ih->handle) &= ~GTK_CAN_FOCUS; + + gtk_widget_realize((GtkWidget*)scrolled_window); + gtk_widget_realize(ih->handle); + + /* Initialize the default images */ + ih->data->def_image_leaf = iupImageGetImage("IMGLEAF", ih, 0); + ih->data->def_image_collapsed = iupImageGetImage("IMGCOLLAPSED", ih, 0); + ih->data->def_image_expanded = iupImageGetImage("IMGEXPANDED", ih, 0); + + gtkTreeAddRootNode(ih); + + /* configure for DRAG&DROP of files */ + if (IupGetCallback(ih, "DROPFILES_CB")) + iupAttribSetStr(ih, "DRAGDROP", "YES"); + + IupSetCallback(ih, "_IUP_XY2POS_CB", (Icallback)gtkTreeConvertXYToPos); + + return IUP_NOERROR; +} + +void iupdrvTreeInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkTreeMapMethod; + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, gtkTreeSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTBGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, gtkTreeSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTFGCOLOR", IUPAF_DEFAULT); + + /* IupTree Attributes - GENERAL */ + iupClassRegisterAttribute(ic, "EXPANDALL", NULL, gtkTreeSetExpandAllAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "INDENTATION", gtkTreeGetIndentationAttrib, gtkTreeSetIndentationAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "COUNT", gtkTreeGetCountAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DRAGDROP", NULL, iupgtkSetDragDropAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPACING", iupTreeGetSpacingAttrib, gtkTreeSetSpacingAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "TOPITEM", NULL, gtkTreeSetTopItemAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + + /* IupTree Attributes - IMAGES */ + iupClassRegisterAttributeId(ic, "IMAGE", NULL, gtkTreeSetImageAttrib, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "IMAGEEXPANDED", NULL, gtkTreeSetImageExpandedAttrib, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "IMAGELEAF", NULL, gtkTreeSetImageLeafAttrib, IUPAF_SAMEASSYSTEM, "IMGLEAF", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGEBRANCHCOLLAPSED", NULL, gtkTreeSetImageBranchCollapsedAttrib, IUPAF_SAMEASSYSTEM, "IMGCOLLAPSED", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGEBRANCHEXPANDED", NULL, gtkTreeSetImageBranchExpandedAttrib, IUPAF_SAMEASSYSTEM, "IMGEXPANDED", IUPAF_NO_INHERIT); + + /* IupTree Attributes - NODES */ + iupClassRegisterAttributeId(ic, "STATE", gtkTreeGetStateAttrib, gtkTreeSetStateAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "DEPTH", gtkTreeGetDepthAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "KIND", gtkTreeGetKindAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "PARENT", gtkTreeGetParentAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "COLOR", gtkTreeGetColorAttrib, gtkTreeSetColorAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "NAME", gtkTreeGetTitleAttrib, gtkTreeSetTitleAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TITLE", gtkTreeGetTitleAttrib, gtkTreeSetTitleAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "USERDATA", gtkTreeGetUserDataAttrib, gtkTreeSetUserDataAttrib, IUPAF_NO_STRING|IUPAF_NO_INHERIT); + + iupClassRegisterAttributeId(ic, "CHILDCOUNT", gtkTreeGetChildCountAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TITLEFONT", gtkTreeGetTitleFontAttrib, gtkTreeSetTitleFontAttrib, IUPAF_NO_INHERIT); + + /* IupTree Attributes - MARKS */ + iupClassRegisterAttributeId(ic, "MARKED", gtkTreeGetMarkedAttrib, gtkTreeSetMarkedAttrib, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute (ic, "MARK", NULL, gtkTreeSetMarkAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute (ic, "STARTING", NULL, gtkTreeSetMarkStartAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute (ic, "MARKSTART", NULL, gtkTreeSetMarkStartAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute (ic, "VALUE", gtkTreeGetValueAttrib, gtkTreeSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupTree Attributes - ACTION */ + iupClassRegisterAttributeId(ic, "DELNODE", NULL, gtkTreeSetDelNodeAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RENAME", NULL, gtkTreeSetRenameAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "MOVENODE", NULL, gtkTreeSetMoveNodeAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "COPYNODE", NULL, gtkTreeSetCopyNodeAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "FINDUSERDATA", gtkTreeGetFindUserDataAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute (ic, "AUTODRAGDROP", NULL, NULL, NULL, NULL, IUPAF_DEFAULT); +} diff --git a/iup/src/gtk/iupgtk_val.c b/iup/src/gtk/iupgtk_val.c new file mode 100755 index 0000000..018af83 --- /dev/null +++ b/iup/src/gtk/iupgtk_val.c @@ -0,0 +1,208 @@ +/** \file + * \brief Valuator Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_val.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_key.h" + +#include "iupgtk_drv.h" + + +void iupdrvValGetMinSize(Ihandle* ih, int *w, int *h) +{ + if (ih->data->type == IVAL_HORIZONTAL) + { + *w = 20; + *h = 35; + } + else + { + *w = 35; + *h = 20; + } +} + +static int gtkValSetStepAttrib(Ihandle* ih, const char* value) +{ + ih->data->step = atof(value); + gtk_range_set_increments(GTK_RANGE(ih->handle), ih->data->step, ih->data->pagestep); + return 0; /* do not store value in hash table */ +} + +static int gtkValSetPageStepAttrib(Ihandle* ih, const char* value) +{ + ih->data->pagestep = atof(value); + gtk_range_set_increments(GTK_RANGE(ih->handle), ih->data->step, ih->data->pagestep); + return 0; /* do not store value in hash table */ +} + +static int gtkValSetValueAttrib(Ihandle* ih, const char* value) +{ + double fval; + ih->data->val = atof(value); + fval = (ih->data->val-ih->data->vmin)/(ih->data->vmax - ih->data->vmin); + gtk_range_set_value(GTK_RANGE(ih->handle), fval); + return 0; /* do not store value in hash table */ +} + + +/*********************************************************************************************/ + + +static gboolean gtkValChangeValue(GtkRange *range, GtkScrollType scroll, double fval, Ihandle *ih) +{ + double old_val = ih->data->val; + IFn cb; + + if (fval < 0.0) + gtk_range_set_value(GTK_RANGE(ih->handle), 0.0); + if (fval > 1.0) + gtk_range_set_value(GTK_RANGE(ih->handle), 1.0); + + ih->data->val = fval*(ih->data->vmax - ih->data->vmin) + ih->data->vmin; + iupValCropValue(ih); + + cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (cb) + { + if (ih->data->val == old_val) + return FALSE; + + cb(ih); + } + else + { + IFnd cb_old; + if (scroll == GTK_SCROLL_JUMP) /* scroll == 1 */ + cb_old = (IFnd)IupGetCallback(ih, "MOUSEMOVE_CB"); + else if((scroll >= GTK_SCROLL_STEP_BACKWARD) && (scroll <= GTK_SCROLL_END)) + cb_old = (IFnd)IupGetCallback(ih, "BUTTON_PRESS_CB"); + else + cb_old = (IFnd)IupGetCallback(ih, "BUTTON_RELEASE_CB"); + if (cb_old) + cb_old(ih, ih->data->val); + } + + if (fval < 0.0 || fval > 1.0) + return TRUE; + + (void)range; + return FALSE; +} + +static gboolean gtkValKeyPressEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle *ih) +{ + if (iupgtkKeyPressEvent(widget, evt, ih) == TRUE) + return TRUE; + + /* change Home and End default behaviour */ + if (ih->data->inverted) + { + if (evt->keyval==GDK_Home || evt->keyval==GDK_KP_Home) + { + /* set to maximum */ + gtk_range_set_value(GTK_RANGE(ih->handle), 1.0); + gtkValChangeValue(GTK_RANGE(ih->handle), GTK_SCROLL_START, 1.0, ih); + return TRUE; + } + if (evt->keyval==GDK_End || evt->keyval==GDK_KP_End) + { + /* set to minimum */ + gtk_range_set_value(GTK_RANGE(ih->handle), 0.0); + gtkValChangeValue(GTK_RANGE(ih->handle), GTK_SCROLL_END, 0.0, ih); + return TRUE; + } + } + + return FALSE; +} + +/*********************************************************************************************/ + + +static int gtkValMapMethod(Ihandle* ih) +{ + GtkObject *adjustment; + + /* value, lower, upper, step_increment, page_increment, page_size */ + /* page_size value only makes a difference for scrollbar widgets */ + adjustment = gtk_adjustment_new (0, 0, 1.0, 0.01, 0.1, 0); + if (!adjustment) + return IUP_ERROR; + + if (ih->data->type == IVAL_HORIZONTAL) + ih->handle = gtk_hscale_new(GTK_ADJUSTMENT(adjustment)); + else + ih->handle = gtk_vscale_new(GTK_ADJUSTMENT(adjustment)); + + if (!ih->handle) + return IUP_ERROR; + + /* add to the parent, all GTK controls must call this. */ + iupgtkBaseAddToParent(ih); + + if (!iupAttribGetBoolean(ih, "CANFOCUS")) + GTK_WIDGET_FLAGS(ih->handle) &= ~GTK_CAN_FOCUS; + + g_signal_connect(G_OBJECT(ih->handle), "enter-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "leave-notify-event", G_CALLBACK(iupgtkEnterLeaveEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-in-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "focus-out-event", G_CALLBACK(iupgtkFocusInOutEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "show-help", G_CALLBACK(iupgtkShowHelp), ih); + + g_signal_connect(G_OBJECT(ih->handle), "key-press-event", G_CALLBACK(gtkValKeyPressEvent), ih); + g_signal_connect(G_OBJECT(ih->handle), "change-value", G_CALLBACK(gtkValChangeValue), ih); + + /* configure the scale */ + gtk_scale_set_draw_value(GTK_SCALE(ih->handle), FALSE); + gtk_range_set_range(GTK_RANGE(ih->handle), 0.0, 1.0); + + if (ih->data->inverted) + gtk_range_set_inverted(GTK_RANGE(ih->handle), TRUE); + + gtk_widget_realize(ih->handle); + + /* update a mnemonic in a label if necessary */ + iupgtkUpdateMnemonic(ih); + + return IUP_NOERROR; +} + +void iupdrvValInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = gtkValMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + + /* IupVal only */ + iupClassRegisterAttribute(ic, "VALUE", iupValGetValueAttrib, gtkValSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PAGESTEP", iupValGetPageStepAttrib, gtkValSetPageStepAttrib, IUPAF_SAMEASSYSTEM, "0.1", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "STEP", iupValGetStepAttrib, gtkValSetStepAttrib, IUPAF_SAMEASSYSTEM, "0.01", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWTICKS", NULL, NULL, NULL, NULL, IUPAF_WRITEONLY|IUPAF_READONLY); /* showticks is not supported in GTK */ +} diff --git a/iup/src/iup.c b/iup/src/iup.c new file mode 100755 index 0000000..df4bf34 --- /dev/null +++ b/iup/src/iup.c @@ -0,0 +1,86 @@ +/** \file + * \brief miscelaneous functions + * + * See Copyright Notice in "iup.h" + */ + +/*! \mainpage IUP + * + * \section intro Introduction + * + * Internal SDK documentation of the IUP library, automatically generated using Doxygen (http://www.doxygen.org/). + * + * \section codestd Code Standards + * + * \subsection func Function Names (prefix format) + * - IupFunc - User API, implemented in the core + * - iupFunc - Internal Core API, implemented in the core, used in the core or in driver + * - iupxxxFunc - Windows Internal API, implemented in driver xxx, used in driver xxx + * - iupdrvFunc - Driver API, implemented in driver, used in the core or driver + * - xxxFunc - Driver xxx local functions + * + * \subsection glob Globais Variables (lower case format) + * - iupxxx_var + * + * \subsection loc Local Variables (lower case format, using module name) + * - iyyy_var + * + * \subsection fil File Names + * - iupyyy.h - public headers + * - iup_yyy.h/c - core + * - iupxxx_yyy.h/c - driver + * + * \subsection strc Structures + * - Iyyy + * + * \subsection com File Comments (at start) + * - Check an existant file for example. + * + * \subsection inc Include Defines + * - __IUPXXX_H (same file name, upper case, "__" preffix and replace "." by "_") + * + * \subsection doc Documentation + * - In the header, using Doxygen commands. + * - Check an existant header for example. + * + */ + +/** \defgroup util Utilities + */ + +/** \defgroup cpi Control SDK + * \par + *

Control Creation Guide

+ */ + +#include + +#include "iup.h" + +/* This appears only here to avoid changing the iup.h header fo bug fixes */ +#define IUP_VERSION_FIX " RC3" +#define IUP_VERSION_FIX_NUMBER 0 + +const char iup_ident[] = + "$IUP: " IUP_VERSION IUP_VERSION_FIX " " IUP_COPYRIGHT " $\n" + "$URL: www.tecgraf.puc-rio.br/iup $\n"; + +/* Using this, if you look for the string TECVER, you will find also the library version. */ +const char *iup_tecver = "TECVERID.str:Iup:LIB:" IUP_VERSION IUP_VERSION_FIX; + +char* IupVersion(void) +{ + (void)iup_tecver; + (void)iup_ident; + return IUP_VERSION IUP_VERSION_FIX; +} + +char* IupVersionDate(void) +{ + return IUP_VERSION_DATE; +} + +int IupVersionNumber(void) +{ + return IUP_VERSION_NUMBER+IUP_VERSION_FIX_NUMBER; +} diff --git a/iup/src/iup.def b/iup/src/iup.def new file mode 100755 index 0000000..d0dcfbd --- /dev/null +++ b/iup/src/iup.def @@ -0,0 +1,353 @@ +EXPORTS +IupAlarm +IupAppend +IupButton +IupCanvas +IupClose +IupCreate +IupCreatep +IupCreatev +IupDestroy +IupDetach +IupDialog +IupFileDlg +IupFill +IupFlush +IupFrame +IupGetActionName +IupGetAllDialogs +IupGetAllNames +IupGetAttribute +IupGetAttributes +IupGetDialog +IupGetFile +IupGetFloat +IupGetFocus +IupGetFunction +IupGetGlobal +IupGetHandle +IupGetInt +IupGetLanguage +IupGetName +IupHbox +IupHelp +IupImage +IupHide +IupItem +IupLabel +IupList +IupListDialog +IupLoad +IupLoadBuffer +IupLoopStep +IupMainLoop +IupMap +IupMapFont +IupMenu +IupMessage +IupMessagef +IupMultiLine +IupNextField +IupOpen +IupPopup +IupPreviousField +IupRadio +IupScanf +IupSeparator +IupSetAttribute +IupSetAttributes +IupSetfAttribute +IupSetAtt +IupSetFocus +IupSetFunction +IupSetGlobal +IupSetHandle +IupSetLanguage +IupShow +IupShowXY +IupStoreAttribute +IupStoreGlobal +IupSubmenu +IupText +IupToggle +IupUnMapFont +IupUser +IupVbox +IupVersion +IupVersionDate +IupZbox +IupTimer +IupClipboard +IupGetNextChild +IupGetBrother +IupGetParent +IupVersionNumber +IupRefresh +IupGetText +IupVboxv +IupZboxv +IupHboxv +IupMenuv +IupSetCallback +IupGetCallback +IupGetChild +IupGetChildPos +IupGetChildCount +IupGetAllAttributes +IupSetAttributeHandle +IupGetAttributeHandle +IupExitLoop +IupUpdate +IupRedraw +IupImageRGB +IupImageRGBA +IupUnmap +IupReparent +IupMessageDlg +IupColorDlg +IupFontDlg +IupSbox +IupSpin +IupSpinbox +IupCboxv +IupCbox +IupVal +IupProgressBar +IupTabs +IupTabsv +IupGetClassAttributes +IupSetClassDefaultAttribute +IupSaveClassAttributes +IupGetColor +IupGetParam +IupGetParamv +iupGetParamType +iupGetParamCount +IupNormalizer +IupNormalizerv +IupGetClassType +IupGetClassName +IupInsert +IupMainLoopLevel +IupGetDialogChild +IupConvertXYToPos +IupTextConvertLinColToPos +IupTextConvertPosToLinCol +IupUpdateChildren +IupTreeSetAttribute +IupTreeStoreAttribute +IupTreeGetAttribute +IupTreeGetInt +IupTreeGetFloat +IupTreeSetfAttribute +IupTree +IupTreeGetId +IupTreeGetUserId +IupTreeSetUserId +IupSaveImageAsText + +iupdrvSetVisible +iupdrvSetStandardFontAttrib +iupdrvSetCurrentDirectory +iupdrvSetActive +iupdrvScreenToClient +iupdrvReparent +iupdrvMakeDirectory +iupdrvIsVisible +iupdrvIsFile +iupdrvIsDirectory +iupdrvIsActive +iupdrvGetWindowDecor +iupdrvGetUserName +iupdrvGetSystemVersion +iupdrvGetSystemName +iupdrvGetSystemFont +iupdrvGetScrollbarSize +iupdrvGetScreenSize +iupdrvGetScreenDepth +iupdrvGetKeyState +iupdrvGetFullSize +iupdrvGetDisplay +iupdrvGetCursorPos +iupdrvGetCurrentDirectory +iupdrvGetComputerName +iupdrvFontGetStringWidth +iupdrvFontGetMultiLineStringSize +iupdrvFontGetCharSize +iupdrvDrawFocusRect +iupdrvDisplayUpdate +iupdrvDisplayRedraw +iupdrvBaseUnMapMethod +iupdrvBaseSetZorderAttrib +iupdrvBaseSetTipVisibleAttrib +iupdrvBaseSetTipAttrib +iupdrvBaseSetCursorAttrib +iupdrvBaseLayoutUpdateMethod +iupdrvBaseGetYAttrib +iupdrvBaseGetXAttrib +iupdrvBaseGetClientSizeAttrib +iupdrvActivate +iupdrvImageCreateImageRaw +iupdrvImageGetRawInfo +iupdrvImageGetRawData +iupdrvImageDestroy +iupVersionDlg +iupTableSetFunc +iupTableSet +iupTableRemoveCurr +iupTableRemove +iupTableNext +iupTableGetTyped +iupTableGetFunc +iupTableGetCurr +iupTableGet +iupTableFirst +iupTableDestroy +iupTableCreateSized +iupTableCreate +iupTableCount +iupTableClear +iupStrToUnix +iupStrToStrStr +iupStrToRGB +iupStrToRGBA +iupStrToMac +iupStrToIntInt +iupStrToInt +iupStrToFloatFloat +iupStrToFloat +iupStrToDos +iupStrReplace +iupStrRemove +iupStrProcessMnemonic +iupStrNextLine +iupStrMessageShowError +iupStrMessageGet +iupStrLower +iupStrLineCount +iupStrInsert +iupStrGetMemoryCopy +iupStrGetMemory +iupStrFileMakeFileName +iupStrFileGetTitle +iupStrFileGetPath +iupStrFileGetExt +iupStrEqualPartial +iupStrEqualNoCase +iupStrEqual +iupStrDup +iupStrCountChar +iupStrCopyUntil +iupStrCopyN +iupStrBoolean +iupSetFontStyleAttrib +iupSetFontSizeAttrib +iupSetFontAttrib +iupRegisterFindClass +iupRegisterClass +iupObjectGetParamList +iupObjectCheck +iupMaskDestroy +iupMaskCreateInt +iupMaskCreateFloat +iupMaskCreate +iupMaskCheck +iupKeyNameToCode +iupKeyForEach +iupKeyCodeToName +iupKeyCanCaps +iupKeyCallKeyPressCb +iupKeyCallKeyCb +iupKeyProcessNavigation +iupImageStockSet +iupImageStockLoad +iupImageColorMakeInactive +iupGetFontStyleAttrib +iupGetFontSizeAttrib +iupGetFontFaceAttrib +iupGetFontAttrib +iupFontParseX +iupFontParseWin +iupFontParsePango +iupFocusCanAccept +iupError +iupGlobalIsPointer +iupDlgListVisibleInc +iupDlgListVisibleDec +iupDlgListVisibleCount +iupDlgListRemove +iupDlgListNext +iupDlgListFirst +iupDlgListAdd +iupDialogGetClass +iupDataEntry +iupClassRelease +iupClassRegisterCallback +iupClassRegisterAttributeId +iupClassRegisterAttribute +iupClassRegisterGetAttribute +iupClassObjectUnMap +iupClassObjectSetChildrenPosition +iupClassObjectSetChildrenCurrentSize +iupClassObjectSetAttribute +iupClassObjectMap +iupClassObjectLayoutUpdate +iupClassObjectGetInnerContainer +iupClassObjectGetAttribute +iupClassObjectGetAttributeInfo +iupClassObjectAttribIsNotString +iupClassObjectDlgPopup +iupClassObjectDestroy +iupClassObjectCreate +iupClassObjectComputeNaturalSize +iupClassObjectChildRemoved +iupClassObjectChildAdded +iupClassNew +iupClassCallbackGetFormat +iupChildTreeGetNativeParentHandle +iupChildTreeGetNativeParent +iupChildTreeAppend +iupCanvasGetClass +iupCallKillFocusCb +iupCallGetFocusCb +iupBaseSetVisibleAttrib +iupBaseSetSizeAttrib +iupBaseSetRasterSizeAttrib +iupBaseSetActiveAttrib +iupBaseRegisterVisualAttrib +iupBaseRegisterCommonAttrib +iupBaseGetWidAttrib +iupBaseGetVisibleAttrib +iupBaseGetSizeAttrib +iupBaseGetScrollbar +iupBaseGetRasterSizeAttrib +iupBaseGetActiveAttrib +iupBaseContainerUpdateExpand +iupBaseContainerGetExpandAttrib +iupBaseTypeVoidMapMethod +iupBaseSetPosition +iupBaseComputeNaturalSize +iupBaseSetCurrentSize +iupBaseCallValueChangedCb +iupAttribStoreStr +iupAttribSetStrf +iupAttribSetStr +iupAttribSetInt +iupAttribSetHandleName +iupAttribSetFloat +iupAttribIsPointer +iupAttribGet +iupAttribGetInherit +iupAttribGetInheritNativeParent +iupAttribGetStr +iupAttribGetInt +iupAttribGetBoolean +iupAttribGetFloat +iupAssert +iupArrayInc +iupArrayGetData +iupArrayDestroy +iupArrayCreate +iupArrayCount +iupArrayAdd +iupSaveImageAsText diff --git a/iup/src/iup.dep b/iup/src/iup.dep new file mode 100644 index 0000000..63394d5 --- /dev/null +++ b/iup/src/iup.dep @@ -0,0 +1,334 @@ +$(OBJDIR)/iup_array.o: iup_array.c iup_array.h iup_assert.h +$(OBJDIR)/iup_callback.o: iup_callback.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_assert.h +$(OBJDIR)/iup_dlglist.o: iup_dlglist.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_dlglist.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_assert.h +$(OBJDIR)/iup_attrib.o: iup_attrib.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_childtree.h iup_str.h iup_ledlex.h iup_attrib.h \ + iup_assert.h +$(OBJDIR)/iup_focus.o: iup_focus.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_focus.h iup_assert.h iup_attrib.h \ + iup_str.h iup_drv.h +$(OBJDIR)/iup_font.o: iup_font.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_drvfont.h iup_assert.h iup_attrib.h \ + iup_class.h iup_table.h iup_classbase.h +$(OBJDIR)/iup_globalattrib.o: iup_globalattrib.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h iup_table.h iup_globalattrib.h \ + iup_drv.h iup_drvfont.h iup_assert.h iup_str.h +$(OBJDIR)/iup_object.o: iup_object.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_assert.h iup_register.h iup_names.h +$(OBJDIR)/iup_key.o: iup_key.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_key.h iup_str.h \ + iup_object.h iup_class.h iup_table.h iup_classbase.h iup_drv.h \ + iup_focus.h +$(OBJDIR)/iup_layout.o: iup_layout.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_drv.h iup_attrib.h iup_str.h iup_layout.h \ + iup_assert.h +$(OBJDIR)/iup_ledlex.o: iup_ledlex.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_class.h iup_table.h iup_classbase.h \ + iup_ledlex.h iup_str.h iup_register.h +$(OBJDIR)/iup_names.o: iup_names.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_table.h iup_names.h iup_object.h \ + iup_class.h iup_classbase.h iup_assert.h +$(OBJDIR)/iup_open.o: iup_open.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_globalattrib.h iup_names.h iup_func.h \ + iup_drv.h iup_drvinfo.h iup_drvfont.h iup_predial.h iup_class.h \ + iup_table.h iup_classbase.h iup_register.h iup_key.h iup_image.h \ + iup_dlglist.h iup_assert.h iup_strmessage.h +$(OBJDIR)/iup_ledparse.o: iup_ledparse.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_ledlex.h iup_str.h iup_assert.h +$(OBJDIR)/iup_predial.o: iup_predial.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_predial.h iup_attrib.h iup_str.h \ + iup_strmessage.h +$(OBJDIR)/iup_register.o: iup_register.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_register.h iup_stdcontrols.h +$(OBJDIR)/iup_scanf.o: iup_scanf.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_predial.h iup_str.h iup_assert.h +$(OBJDIR)/iup_show.o: iup_show.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_layout.h iup_attrib.h iup_dialog.h iup_menu.h \ + iup_assert.h iup_str.h iup_drv.h iup_drvfont.h +$(OBJDIR)/iup_str.o: iup_str.c iup_str.h +$(OBJDIR)/iup_table.o: iup_table.c iup_table.h iup_str.h iup_assert.h +$(OBJDIR)/iup_func.o: iup_func.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_table.h iup_func.h iup_drv.h \ + iup_assert.h +$(OBJDIR)/iup_childtree.o: iup_childtree.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_dlglist.h iup_childtree.h iup_attrib.h iup_assert.h \ + iup_str.h iup_drv.h +$(OBJDIR)/iup.o: iup.c ../include/iup.h ../include/iupkey.h ../include/iupdef.h +$(OBJDIR)/iup_classattrib.o: iup_classattrib.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_drv.h iup_drvfont.h iup_str.h iup_attrib.h \ + iup_assert.h iup_register.h iup_globalattrib.h +$(OBJDIR)/iup_dialog.o: iup_dialog.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_class.h iup_table.h \ + iup_classbase.h iup_object.h iup_dlglist.h iup_layout.h iup_attrib.h \ + iup_drv.h iup_drvinfo.h iup_drvfont.h iup_focus.h iup_str.h \ + iup_dialog.h +$(OBJDIR)/iup_assert.o: iup_assert.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_assert.h iup_attrib.h iup_str.h \ + iup_strmessage.h +$(OBJDIR)/iup_canvas.o: iup_canvas.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_canvas.h +$(OBJDIR)/iup_messagedlg.o: iup_messagedlg.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_stdcontrols.h +$(OBJDIR)/iup_timer.o: iup_timer.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_str.h iup_stdcontrols.h iup_timer.h +$(OBJDIR)/iup_image.o: iup_image.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_image.h iup_assert.h \ + iup_stdcontrols.h +$(OBJDIR)/iup_label.o: iup_label.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_label.h iup_image.h +$(OBJDIR)/iup_fill.o: iup_fill.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h +$(OBJDIR)/iup_zbox.o: iup_zbox.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h +$(OBJDIR)/iup_colordlg.o: iup_colordlg.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_stdcontrols.h +$(OBJDIR)/iup_fontdlg.o: iup_fontdlg.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_stdcontrols.h +$(OBJDIR)/iup_filedlg.o: iup_filedlg.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_stdcontrols.h +$(OBJDIR)/iup_strmessage.o: iup_strmessage.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_attrib.h iup_str.h iup_strmessage.h iup_table.h +$(OBJDIR)/iup_menu.o: iup_menu.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_dialog.h iup_str.h iup_assert.h \ + iup_key.h iup_stdcontrols.h iup_drvinfo.h iup_menu.h +$(OBJDIR)/iup_frame.o: iup_frame.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_frame.h +$(OBJDIR)/iup_user.o: iup_user.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_stdcontrols.h +$(OBJDIR)/iup_button.o: iup_button.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_button.h iup_image.h +$(OBJDIR)/iup_radio.o: iup_radio.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h +$(OBJDIR)/iup_toggle.o: iup_toggle.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_toggle.h iup_image.h +$(OBJDIR)/iup_progressbar.o: iup_progressbar.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_progressbar.h +$(OBJDIR)/iup_text.o: iup_text.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_mask.h iup_array.h \ + iup_text.h iup_assert.h +$(OBJDIR)/iup_val.o: iup_val.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../include/iupcontrols.h \ + iup_object.h iup_class.h iup_table.h iup_classbase.h iup_attrib.h \ + iup_str.h iup_drv.h iup_stdcontrols.h iup_layout.h iup_val.h +$(OBJDIR)/iup_box.o: iup_box.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_box.h +$(OBJDIR)/iup_hbox.o: iup_hbox.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_box.h +$(OBJDIR)/iup_vbox.o: iup_vbox.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_box.h +$(OBJDIR)/iup_cbox.o: iup_cbox.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h +$(OBJDIR)/iup_class.o: iup_class.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_drv.h iup_drvfont.h iup_str.h iup_attrib.h \ + iup_assert.h +$(OBJDIR)/iup_classbase.o: iup_classbase.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_drv.h iup_drvfont.h iup_str.h \ + iup_attrib.h iup_assert.h +$(OBJDIR)/iup_maskmatch.o: iup_maskmatch.c iup_maskparse.h iup_maskmatch.h +$(OBJDIR)/iup_mask.o: iup_mask.c iup_maskparse.h iup_mask.h iup_str.h +$(OBJDIR)/iup_maskparse.o: iup_maskparse.c iup_maskparse.h iup_maskmatch.h +$(OBJDIR)/iup_tabs.o: iup_tabs.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_image.h iup_tabs.h +$(OBJDIR)/iup_spin.o: iup_spin.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_stdcontrols.h \ + iup_childtree.h +$(OBJDIR)/iup_list.o: iup_list.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_assert.h iup_object.h \ + iup_class.h iup_table.h iup_classbase.h iup_attrib.h iup_str.h \ + iup_drv.h iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_mask.h \ + iup_list.h +$(OBJDIR)/iup_getparam.o: iup_getparam.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_attrib.h iup_str.h iup_strmessage.h \ + iup_drvfont.h +$(OBJDIR)/iup_sbox.o: iup_sbox.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_stdcontrols.h iup_layout.h iup_childtree.h +$(OBJDIR)/iup_normalizer.o: iup_normalizer.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_array.h iup_stdcontrols.h +$(OBJDIR)/iup_tree.o: iup_tree.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_tree.h iup_assert.h +$(OBJDIR)/iupmot_common.o: mot/iupmot_common.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_key.h iup_str.h \ + iup_class.h iup_attrib.h iup_focus.h iup_drv.h iup_image.h \ + mot/iupmot_color.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_color.o: mot/iupmot_color.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_drvinfo.h mot/iupmot_drv.h \ + mot/iupmot_color.h +$(OBJDIR)/iupmot_focus.o: mot/iupmot_focus.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_focus.h iup_attrib.h iup_assert.h iup_drv.h \ + mot/iupmot_drv.h +$(OBJDIR)/iupmot_font.o: mot/iupmot_font.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_attrib.h iup_array.h iup_object.h \ + iup_class.h iup_table.h iup_classbase.h iup_drv.h iup_drvfont.h \ + iup_assert.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_key.o: mot/iupmot_key.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_key.h iup_str.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_loop.o: mot/iupmot_loop.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_open.o: mot/iupmot_open.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_str.h iup_drv.h iup_globalattrib.h mot/iupmot_drv.h \ + mot/iupmot_color.h +$(OBJDIR)/iupmot_tips.o: mot/iupmot_tips.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_attrib.h iup_str.h iup_drv.h iup_drvfont.h \ + mot/iupmot_drv.h mot/iupmot_color.h +$(OBJDIR)/iupmot_globalattrib.o: mot/iupmot_globalattrib.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h iup_str.h iup_drv.h \ + iup_drvinfo.h iup_strmessage.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_dialog.o: mot/iupmot_dialog.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_class.h iup_table.h \ + iup_classbase.h iup_object.h iup_class.h iup_childtree.h iup_dlglist.h \ + iup_attrib.h iup_drv.h iup_drvfont.h iup_drvinfo.h iup_focus.h \ + iup_str.h iup_dialog.h iup_image.h mot/iupmot_drv.h mot/iupmot_color.h +$(OBJDIR)/iupmot_messagedlg.o: mot/iupmot_messagedlg.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drvinfo.h \ + iup_dialog.h iup_strmessage.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_timer.o: mot/iupmot_timer.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_assert.h \ + iup_timer.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_image.o: mot/iupmot_image.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_image.h iup_drvinfo.h \ + mot/iupmot_drv.h mot/iupmot_color.h +$(OBJDIR)/iupmot_label.o: mot/iupmot_label.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_attrib.h iup_dialog.h \ + iup_str.h iup_label.h iup_drv.h iup_image.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_canvas.o: mot/iupmot_canvas.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_attrib.h iup_dialog.h \ + iup_str.h iup_drv.h iup_drvfont.h iup_canvas.h iup_key.h \ + mot/iupmot_drv.h mot/iupmot_color.h +$(OBJDIR)/iupmot_colordlg.o: mot/iupmot_colordlg.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drvinfo.h \ + iup_dialog.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_fontdlg.o: mot/iupmot_fontdlg.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drvinfo.h \ + iup_dialog.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_filedlg.o: mot/iupmot_filedlg.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + iup_object.h iup_class.h iup_table.h iup_classbase.h iup_attrib.h \ + iup_str.h iup_drvinfo.h iup_dialog.h iup_strmessage.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_frame.o: mot/iupmot_frame.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_childtree.h iup_attrib.h iup_str.h iup_dialog.h \ + iup_image.h iup_drv.h iup_drvfont.h iup_stdcontrols.h mot/iupmot_drv.h \ + mot/iupmot_color.h +$(OBJDIR)/iupmot_button.o: mot/iupmot_button.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_attrib.h iup_dialog.h \ + iup_str.h iup_button.h iup_drv.h iup_image.h iup_key.h mot/iupmot_drv.h +$(OBJDIR)/iupmot_toggle.o: mot/iupmot_toggle.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_attrib.h iup_dialog.h \ + iup_str.h iup_toggle.h iup_drv.h iup_image.h iup_key.h mot/iupmot_drv.h \ + mot/iupmot_color.h +$(OBJDIR)/iupmot_progressbar.o: mot/iupmot_progressbar.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + iup_object.h iup_class.h iup_table.h iup_classbase.h iup_childtree.h \ + iup_attrib.h iup_dialog.h iup_str.h iup_progressbar.h iup_drv.h \ + mot/iupmot_drv.h mot/iupmot_color.h +$(OBJDIR)/iupmot_clipboard.o: mot/iupmot_clipboard.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_image.h \ + mot/iupmot_drv.h +$(OBJDIR)/iupmot_text.o: mot/iupmot_text.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_attrib.h iup_dialog.h \ + iup_str.h iup_mask.h iup_drv.h iup_array.h iup_text.h mot/iupmot_drv.h \ + mot/iupmot_color.h +$(OBJDIR)/iupmot_val.o: mot/iupmot_val.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_attrib.h iup_dialog.h \ + iup_str.h iup_val.h iup_image.h iup_drv.h mot/iupmot_drv.h \ + mot/iupmot_color.h +$(OBJDIR)/iupmot_tabs.o: mot/iupmot_tabs.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_layout.h iup_childtree.h iup_attrib.h \ + iup_str.h iup_dialog.h iup_drv.h iup_drvfont.h iup_stdcontrols.h \ + iup_tabs.h iup_image.h mot/iupmot_drv.h mot/iupmot_color.h +$(OBJDIR)/iupmot_menu.o: mot/iupmot_menu.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_attrib.h iup_dialog.h \ + iup_str.h iup_label.h iup_drv.h iup_drvfont.h iup_image.h iup_menu.h \ + mot/iupmot_drv.h mot/iupmot_color.h +$(OBJDIR)/iupmot_list.o: mot/iupmot_list.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_attrib.h iup_dialog.h \ + iup_str.h iup_drv.h iup_mask.h iup_key.h iup_list.h mot/iupmot_drv.h \ + mot/iupmot_color.h +$(OBJDIR)/iupmot_tree.o: mot/iupmot_tree.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_dialog.h iup_layout.h \ + iup_attrib.h iup_str.h iup_drv.h iup_drvinfo.h iup_drvfont.h \ + iup_stdcontrols.h iup_key.h iup_image.h iup_array.h iup_tree.h \ + mot/iupmot_drv.h mot/iupmot_color.h +$(OBJDIR)/iupunix_help.o: mot/iupunix_help.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h +$(OBJDIR)/iupunix_info.o: mot/iupunix_info.c iup_str.h iup_drvinfo.h diff --git a/iup/src/iup_array.c b/iup/src/iup_array.c new file mode 100755 index 0000000..e7d4e12 --- /dev/null +++ b/iup/src/iup_array.c @@ -0,0 +1,108 @@ +/** \file + * \brief Simple expandable array + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup_array.h" +#include "iup_assert.h" + + +struct _Iarray +{ + void* data; + int count; + int max_count; + int elem_size; + int start_count; +}; + +Iarray* iupArrayCreate(int start_count, int elem_size) +{ + Iarray* iarray = (Iarray*)malloc(sizeof(Iarray)); + iarray->count = 0; + iarray->elem_size = elem_size; + iarray->max_count = start_count; + iarray->start_count = start_count; + iarray->data = malloc(elem_size*start_count); + iupASSERT(iarray->data!=NULL); + if (!iarray->data) + { + free(iarray); + return NULL; + } + memset(iarray->data, 0, elem_size*start_count); + return iarray; +} + +void iupArrayDestroy(Iarray* iarray) +{ + iupASSERT(iarray!=NULL); + if (!iarray) + return; + if (iarray->data) + { + memset(iarray->data, 0, iarray->elem_size*iarray->max_count); + free(iarray->data); + } + free(iarray); +} + +void* iupArrayGetData(Iarray* iarray) +{ + iupASSERT(iarray!=NULL); + if (!iarray) + return NULL; + return iarray->data; +} + +void* iupArrayInc(Iarray* iarray) +{ + iupASSERT(iarray!=NULL); + if (!iarray) + return NULL; + if (iarray->count >= iarray->max_count) + { + int old_count = iarray->max_count; + iarray->max_count += iarray->start_count; + iarray->data = realloc(iarray->data, iarray->elem_size*iarray->max_count); + iupASSERT(iarray->data!=NULL); + if (!iarray->data) + return NULL; + memset((unsigned char*)iarray->data + iarray->elem_size*old_count, 0, iarray->elem_size*(iarray->max_count-old_count)); + } + iarray->count++; + return iarray->data; +} + +void* iupArrayAdd(Iarray* iarray, int new_count) +{ + iupASSERT(iarray!=NULL); + if (!iarray) + return NULL; + if (iarray->count+new_count > iarray->max_count) + { + int old_count = iarray->max_count; + iarray->max_count += new_count; + iarray->data = realloc(iarray->data, iarray->elem_size*iarray->max_count); + iupASSERT(iarray->data!=NULL); + if (!iarray->data) + return NULL; + memset((unsigned char*)iarray->data + iarray->elem_size*old_count, 0, iarray->elem_size*(iarray->max_count-old_count)); + } + iarray->count += new_count; + return iarray->data; +} + +int iupArrayCount(Iarray* iarray) +{ + iupASSERT(iarray!=NULL); + if (!iarray) + return 0; + return iarray->count; +} diff --git a/iup/src/iup_array.h b/iup/src/iup_array.h new file mode 100755 index 0000000..b44e862 --- /dev/null +++ b/iup/src/iup_array.h @@ -0,0 +1,63 @@ +/** \file + * \brief Simple expandable array + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_ARRAY_H +#define __IUP_ARRAY_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/** \defgroup iarray Simple Array + * \par + * Expandable array using a simple pointer. + * \par + * See \ref iup_array.h + * \ingroup util */ + +typedef struct _Iarray Iarray; + +/** Creates an array with an initial room for elements, and the element size. + * The array count starts at 0. And the maximum number of elements starts at the given count. + * The maximum number of elements is increased by the start count, every time it needs more memory. + * Must call \ref iupArrayInc to proper allocates memory. + * \ingroup iarray */ +Iarray* iupArrayCreate(int start_count, int elem_size); + +/** Destroys the array. + * \ingroup iarray */ +void iupArrayDestroy(Iarray* iarray); + +/** Returns the pointer that contains the array. + * \ingroup iarray */ +void* iupArrayGetData(Iarray* iarray); + +/** Increments the number of elements in the array. + * The array count starts at 0. + * If the maximum number of elements is reached, the memory allocated is increased by the initial start count. + * Returns the pointer that contains the array. + * \ingroup iarray */ +void* iupArrayInc(Iarray* iarray); + +/** Increments the number of elements in the array by a given count. + * The array count starts at 0. + * If the maximum number of elements is reached, the memory allocated is increased by the given count. + * Returns the pointer that contains the array. + * \ingroup iarray */ +void* iupArrayAdd(Iarray* iarray, int new_count); + +/** Returns the actual number of elements in the array. + * \ingroup iarray */ +int iupArrayCount(Iarray* iarray); + + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_assert.c b/iup/src/iup_assert.c new file mode 100755 index 0000000..11de909 --- /dev/null +++ b/iup/src/iup_assert.c @@ -0,0 +1,54 @@ +/** \file + * \brief String Utilities + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_assert.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_strmessage.h" + +/* from iup_open, but it is not exported, used only here */ +int iupIsOpened(void); + +void iupError(const char* format, ...) +{ + static char msg[SHRT_MAX]; + va_list arglist; + va_start(arglist, format); + vsprintf(msg, format, arglist); + va_end(arglist); +#if IUP_ASSERT_CONSOLE + fprintf(stderr, msg); +#else + if (iupIsOpened()) + iupStrMessageShowError(NULL, msg); + else + fprintf(stderr, msg); +#endif +} + +void iupAssert(const char* expr, const char* file, int line, const char* func) +{ + if (func) + iupError("File: %s\n" + "Line: %d\n" + "Function: %s\n" + "Assertive: (%s)", + file, line, func, expr); + else + iupError("File: %s\n" + "Line: %d\n" + "Assertive: (%s)", + file, line, expr); +} diff --git a/iup/src/iup_assert.h b/iup/src/iup_assert.h new file mode 100755 index 0000000..03cec99 --- /dev/null +++ b/iup/src/iup_assert.h @@ -0,0 +1,68 @@ +/** \file + * \brief Assert Utilities + * + * See Copyright Notice in "iup.h" + */ + + +#ifndef __IUP_ASSERT_H +#define __IUP_ASSERT_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup assert Assert Utilities + * \par + * All functions of the main API (Iup***) calls iupASSERT to check the parameters. + * \par + * The IUP main library must be recompiled with the IUP_ASSERT define to enable these checks. + * iupASSERT is not called inside driver dependent functions nor in each control implementation, + * it is used only in the functions of the main API and in some utilities. + * \par + * See \ref iup_assert.h + * \ingroup util */ + +/* internal functions */ +void iupAssert(const char* expr, const char* file, int line, const char* func); +void iupError(const char* format, ...); + +/** \def iupASSERT + * \brief If the expression if false, + * displays a message with information of the source code where the assert happen. + * + * \param _expr The evaluated expression. + * \par + * It is a macro that calls a function only if IUP_ASSERT is defined. + * \ingroup assert */ + +/** \def iupERROR + * \brief Displays an error message. Also used by the iupASSERT. + * \par + * It is a macro that calls a function only if IUP_ASSERT is defined. + * \ingroup assert */ + +#ifndef IUP_ASSERT +#define iupASSERT(_expr) ((void)0) +#define iupERROR(_msg) ((void)0) +#define iupERROR1(_msg, _p1) ((void)0) +#define iupERROR2(_msg, _p1, _p2) ((void)0) +#else +#ifdef __FUNCTION__ +#define iupASSERT(_expr) ((_expr)? (void)0: iupAssert(#_expr, __FILE__, __LINE__, __FUNCTION__)) +#else +#define iupASSERT(_expr) ((_expr)? (void)0: iupAssert(#_expr, __FILE__, __LINE__, NULL)) +#endif /* __FUNCTION__ */ + +#define iupERROR(_msg) iupError(_msg) +#define iupERROR1(_msg, _p1) iupError(_msg, _p1) +#define iupERROR2(_msg, _p1, _p2) iupError(_msg, _p1, _p2) + +#endif /* IUP_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_attrib.c b/iup/src/iup_attrib.c new file mode 100755 index 0000000..2bbb80a --- /dev/null +++ b/iup/src/iup_attrib.c @@ -0,0 +1,673 @@ +/** \file + * \brief attributes enviroment management + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_str.h" +#include "iup_ledlex.h" +#include "iup_attrib.h" +#include "iup_assert.h" + + +int IupGetAllAttributes(Ihandle* ih, char** names, int n) +{ + char *name; + int i = 0; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return 0; + + if (!names || !n) + return iupTableCount(ih->attrib); + + name = iupTableFirst(ih->attrib); + while (name) + { + names[i] = name; + i++; + if (i == n) + break; + + name = iupTableNext(ih->attrib); + } + + return i; +} + +char* IupGetAttributes(Ihandle *ih) +{ + char *buffer; + char *name, *value; + char sb[128]; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + buffer = iupStrGetMemory(10240); + buffer[0] = 0; + + name = iupTableFirst(ih->attrib); + while (name) + { + if (!iupAttribIsInternal(name)) + { + if (buffer[0] != 0) + strcat(buffer,","); + + value = iupTableGetCurr(ih->attrib); + if (iupAttribIsPointer(ih, name)) + { + sprintf(sb, "%p", (void*) value); + value = sb; + } + strcat(buffer, name); + strcat(buffer,"=\""); + strcat(buffer, value); + strcat(buffer,"\""); + } + + name = iupTableNext(ih->attrib); + } + + return buffer; +} + +void iupAttribUpdateFromParent(Ihandle* ih) +{ + Iclass* ic = ih->iclass; + char *name = iupTableFirst(ic->attrib_func); + while (name) + { + /* if inheritable and NOT defined at the element */ + if (iupClassObjectCurAttribIsInherit(ic) && !iupAttribGet(ih, name)) + { + /* check in the parent tree if the attribute is defined */ + Ihandle* parent = ih->parent; + while (parent) + { + char* value = iupTableGet(parent->attrib, name); + if (value) + { + int inherit; + /* set on the class */ + iupClassObjectSetAttribute(ih, name, value, &inherit); + break; + } + parent = parent->parent; + } + } + + name = iupTableNext(ic->attrib_func); + } +} + +static void iAttribNotifyChildren(Ihandle *ih, const char* name, const char *value) +{ + int inherit; + Ihandle* child = ih->firstchild; + while (child) + { + if (!iupTableGet(child->attrib, name)) + { + /* set on the class */ + iupClassObjectSetAttribute(child, name, value, &inherit); + + if (inherit) /* inherit can be different for the child */ + iAttribNotifyChildren(child, name, value); + } + + child = child->brother; + } +} + +void iupAttribUpdate(Ihandle* ih) +{ + char** name_array; + char *name, *value; + int count, i = 0, inherit, store; + + count = iupTableCount(ih->attrib); + if (!count) + return; + + name_array = (char**)malloc(count * sizeof(char*)); + + /* store the names before updating so we can add or remove attributes during the update */ + name = iupTableFirst(ih->attrib); + while (name) + { + name_array[i] = name; + name = iupTableNext(ih->attrib); + i++; + } + + /* for all defined attributes updates the native system */ + for (i = 0; i < count; i++) + { + name = name_array[i]; + if (!iupAttribIsInternal(name)) + { + /* retrieve from the table */ + value = iupTableGet(ih->attrib, name); + + /* set on the class */ + store = iupClassObjectSetAttribute(ih, name, value, &inherit); + + if (inherit) + iAttribNotifyChildren(ih, name, value); + + if (store == 0) + iupTableRemove(ih->attrib, name); /* remove from the table acording to the class SetAttribute */ + } + } + + free(name_array); +} + +void IupSetAttribute(Ihandle *ih, const char* name, const char *value) +{ + int inherit; + + iupASSERT(name!=NULL); + if (!name) + return; + + if (!ih) + { + IupSetGlobal(name, value); + return; + } + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (iupAttribIsInternal(name)) + iupAttribSetStr(ih, name, value); + else + { + if (iupClassObjectSetAttribute(ih, name, value, &inherit)!=0) /* store strings and pointers */ + iupAttribSetStr(ih, name, value); + + if (inherit) + iAttribNotifyChildren(ih, name, value); + } +} + +void IupStoreAttribute(Ihandle *ih, const char* name, const char *value) +{ + int inherit; + + if (!name) + return; + + if (!ih) + { + IupStoreGlobal(name, value); + return; + } + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (iupAttribIsInternal(name)) + iupAttribStoreStr(ih, name, value); + else + { + if (iupClassObjectSetAttribute(ih, name, value, &inherit)==1) /* store only strings */ + iupAttribStoreStr(ih, name, value); + + if (inherit) + iAttribNotifyChildren(ih, name, value); + } +} + +char* IupGetAttribute(Ihandle *ih, const char* name) +{ + int inherit; + char *value, *def_value; + + iupASSERT(name!=NULL); + if (!name) + return NULL; + + if (!ih) + return IupGetGlobal(name); + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + value = iupClassObjectGetAttribute(ih, name, &def_value, &inherit); + if (!value) + value = iupAttribGet(ih, name); + + if (!value && !iupAttribIsInternal(name)) + { + if (inherit) + { + while (!value) + { + ih = ih->parent; + if (!ih) + break; + + value = iupAttribGet(ih, name); + } + } + + if (!value) + value = def_value; + } + + return value; +} + +float IupGetFloat(Ihandle *ih, const char* name) +{ + float f = 0; + char *value = IupGetAttribute(ih, name); + if (value) + iupStrToFloat(value, &f); + return f; +} + +int IupGetInt(Ihandle *ih, const char* name) +{ + int i = 0; + char *value = IupGetAttribute(ih, name); + if (value) + { + if (!iupStrToInt(value, &i)) + { + if (iupStrBoolean(value)) + i = 1; + } + } + return i; +} + +int IupGetInt2(Ihandle *ih, const char* name) +{ + int i1 = 0, i2 = 0; + char *value = IupGetAttribute(ih, name); + if (value) + { + if (!iupStrToIntInt(value, &i1, &i2, 'x')) + iupStrToIntInt(value, &i1, &i2, ':'); + } + return i2; +} + +int IupGetIntInt(Ihandle *ih, const char* name, int *i1, int *i2) +{ + int _i1 = 0, _i2 = 0; + char *value = IupGetAttribute(ih, name); + if (value) + { + int count = iupStrToIntInt(value, &_i1, &_i2, 'x'); + if (!count) count = iupStrToIntInt(value, &_i1, &_i2, ':'); + if (i1) *i1 = _i1; + if (i2) *i2 = _i2; + return count; + } + return 0; +} + +void IupSetfAttribute(Ihandle *ih, const char* name, const char* f, ...) +{ + static char value[SHRT_MAX]; + va_list arglist; + va_start(arglist, f); + vsprintf(value, f, arglist); + va_end(arglist); + IupStoreAttribute(ih, name, value); +} + +void iupAttribSetHandleName(Ihandle *ih) +{ + char str_name[100]; + sprintf(str_name, "_IUP_NAME(%p)", ih); + IupSetHandle(str_name, ih); +} + +void IupSetAttributeHandle(Ihandle *ih, const char* name, Ihandle *ih_named) +{ + int inherit; + char* handle_name; + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + iupASSERT(name!=NULL); + if (!name) + return; + + handle_name = IupGetName(ih_named); + if (!handle_name) + { + iupAttribSetHandleName(ih_named); + handle_name = IupGetName(ih_named); + } + + iupClassObjectSetAttribute(ih, name, handle_name, &inherit); + iupAttribStoreStr(ih, name, handle_name); +} + +Ihandle* IupGetAttributeHandle(Ihandle *ih, const char* name) +{ + char* handle_name = iupAttribGetInherit(ih, name); + if (handle_name) + return IupGetHandle(handle_name); + return NULL; +} + +Ihandle* IupSetAtt(const char* handle_name, Ihandle* ih, const char* name, ...) +{ + const char *attr, *val; + va_list arg; + va_start (arg, name); + attr = name; + while (attr) + { + val = va_arg(arg, const char*); + IupSetAttribute(ih, attr, val); + attr = va_arg(arg, const char*); + } + va_end(arg); + if (handle_name) IupSetHandle(handle_name, ih); + return ih; +} + +void iupAttribSetStr(Ihandle* ih, const char* name, const char* value) +{ + if (!value) + iupTableRemove(ih->attrib, name); + else + iupTableSet(ih->attrib, name, (void*)value, IUPTABLE_POINTER); +} + +void iupAttribStoreStr(Ihandle* ih, const char* name, const char* value) +{ + if (!value) + iupTableRemove(ih->attrib, name); + else + iupTableSet(ih->attrib, name, (void*)value, IUPTABLE_STRING); +} + +void iupAttribSetStrf(Ihandle *ih, const char* name, const char* f, ...) +{ + static char value[SHRT_MAX]; + va_list arglist; + va_start(arglist, f); + vsprintf(value, f, arglist); + va_end(arglist); + iupAttribStoreStr(ih, name, value); +} + +void iupAttribSetInt(Ihandle *ih, const char* name, int num) +{ + iupAttribSetStrf(ih, name, "%d", num); +} + +void iupAttribSetFloat(Ihandle *ih, const char* name, float num) +{ + iupAttribSetStrf(ih, name, "%f", (double)num); +} + +int iupAttribGetBoolean(Ihandle* ih, const char* name) +{ + char *value = iupAttribGetStr(ih, name); + if (value) + { + if (iupStrBoolean(value)) + return 1; + } + return 0; +} + +int iupAttribGetInt(Ihandle* ih, const char* name) +{ + int i = 0; + char *value = iupAttribGetStr(ih, name); + if (value) + { + if (!iupStrToInt(value, &i)) + { + if (iupStrBoolean(value)) + i = 1; + } + } + return i; +} + +float iupAttribGetFloat(Ihandle* ih, const char* name) +{ + float f = 0; + char *value = iupAttribGetStr(ih, name); + if (value) + iupStrToFloat(value, &f); + return f; +} + +char* iupAttribGet(Ihandle* ih, const char* name) +{ + if (!ih || !name) + return NULL; + return iupTableGet(ih->attrib, name); +} + +char* iupAttribGetStr(Ihandle* ih, const char* name) +{ + char* value; + if (!ih || !name) + return NULL; + + value = iupTableGet(ih->attrib, name); + + if (!value && !iupAttribIsInternal(name)) + { + int inherit; + char *def_value; + iupClassObjectGetAttributeInfo(ih, name, &def_value, &inherit); + + if (inherit) + { + while (!value) + { + ih = ih->parent; + if (!ih) + break; + + value = iupAttribGet(ih, name); + } + } + + if (!value) + value = def_value; + } + + return value; +} + +char* iupAttribGetInherit(Ihandle* ih, const char* name) +{ + char* value; + if (!ih || !name) + return NULL; + + value = iupAttribGet(ih, name); /* Check on the element first */ + while (!value) + { + ih = ih->parent; /* iheritance here independs on the attribute */ + if (!ih) + return NULL; + + value = iupAttribGet(ih, name); + } + return value; +} + +char* iupAttribGetInheritNativeParent(Ihandle* ih, const char* name) +{ + char* value; + if (!ih || !name) + return NULL; + + value = NULL; /* Do NOT check on the element first */ + while (!value) + { + ih = iupChildTreeGetNativeParent(ih); + if (!ih) + return NULL; + + value = iupAttribGet(ih, name); + } + + return value; +} + +static const char* env_str = NULL; +static void iAttribCapture(char* env_buffer, char* dlm) +{ + int i=0; + int c; + do + { + c = *env_str; ++env_str; + if (i < 256) + env_buffer[i++] = (char) c; + } while (c && !strchr(dlm,c)); + env_buffer[i-1]='\0'; /* discard delimiter */ +} + +static int iAttribToken(char* env_buffer) +{ + for (;;) + { + int c = *env_str; ++env_str; + switch (c) + { + case 0: + return IUPLEX_TK_END; + + case ' ': /* ignore whitespace */ + case '\t': + case '\n': + case '\r': + case '\f': + case '\v': + continue; + + case '=': /* attribuicao */ + return IUPLEX_TK_SET; + + case ',': + return IUPLEX_TK_COMMA; + + case '\"': /* string */ + iAttribCapture(env_buffer, "\""); + return IUPLEX_TK_NAME; + + default: + if (c > 32) /* identifier */ + { + --env_str; /* unget first character of env_buffer */ + iAttribCapture(env_buffer, "=, \t\n\r\f\v"); /* get env_buffer until delimiter */ + --env_str; /* unget delimiter */ + return IUPLEX_TK_NAME; + } + } + } +} + +static void iAttribParse(Ihandle *ih, const char* str) +{ + char env_buffer[256]; + char* name=NULL; + char* value=NULL; + char state = 'a'; /* get attribute */ + int end = 0; + + env_str = str; + + for (;;) + { + switch (iAttribToken(env_buffer)) + { + case IUPLEX_TK_END: /* procedimento igual ao IUPLEX_TK_COMMA */ + end = 1; + case IUPLEX_TK_COMMA: + if (name) + { + IupStoreAttribute(ih, name, value); + free(name); + } + if (end) + return; + name = value = NULL; + state = 'a'; + break; + + case IUPLEX_TK_SET: + state = 'v'; /* get value */ + break; + + case IUPLEX_TK_NAME: + if (state == 'a') + name = iupStrDup(env_buffer); + else + value = env_buffer; + break; + } + } +} + +Ihandle* IupSetAttributes(Ihandle *ih, const char* str) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return ih; + if (str) + iAttribParse(ih, str); + return ih; +} + +int iupAttribIsPointer(Ihandle* ih, const char* name) +{ + return iupClassObjectAttribIsNotString(ih, name); +} + +typedef int (*Iconvertxytopos)(Ihandle* ih, int x, int y); + +int IupConvertXYToPos(Ihandle* ih, int x, int y) +{ + Iconvertxytopos drvConvertXYToPos; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return -1; + + if (!ih->handle) + return -1; + + drvConvertXYToPos = (Iconvertxytopos)IupGetCallback(ih, "_IUP_XY2POS_CB"); + if (drvConvertXYToPos) + return drvConvertXYToPos(ih, x, y); + + return -1; +} diff --git a/iup/src/iup_attrib.h b/iup/src/iup_attrib.h new file mode 100755 index 0000000..993dd3c --- /dev/null +++ b/iup/src/iup_attrib.h @@ -0,0 +1,137 @@ +/** \file + * \brief Attributes Environment Management + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_ATTRIB_H +#define __IUP_ATTRIB_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** \defgroup attrib Attribute Environment + * \par + * When attributes are not stored at the control + * they are stored in a hash table (see \ref table). + * \par + * As a general rule use: + * - IupGetAttribute, IupSetAttribute, ... : when care about control implementation, hash table, inheritance and default value + * - iupAttribGetStr,Int,Float: when care about inheritance, hash table and default value + * - iupAttribGet,... : ONLY access the hash table + * These different functions have very different performances and results. So use them wiselly. + * \par + * See \ref iup_attrib.h + * \ingroup cpi */ + + +/** Returns true if the attribute name if in the internal format "_IUP...". + * \ingroup attrib */ +#define iupAttribIsInternal(_name) ((_name[0] == '_' && _name[1] == 'I' && _name[2] == 'U' && _name[3] == 'P')? 1: 0) + +/** Returns true if the attribute name is a known pointer. + * \ingroup attrib */ +int iupAttribIsPointer(Ihandle* ih, const char *name); + +/** Sets the attribute only in the hash table as a pointer. + * It ignores children. + * \ingroup attrib */ +void iupAttribSetStr(Ihandle* ih, const char* name, const char* value); + +/** Sets the attribute only in the hash table as a string. + * The string is internally duplicated. + * It ignores children. + * \ingroup attrib */ +void iupAttribStoreStr(Ihandle* ih, const char* name, const char* value); + +/** Sets the attribute only in the hash table as a string. + * The string is internally duplicated. Use same format as sprintf. + * It ignores children. + * \ingroup attrib */ +void iupAttribSetStrf(Ihandle *ih, const char* name, const char* format, ...); + +/** Sets an integer attribute only in the hash table. + * It will be stored as a string. + * It ignores children. + * \ingroup attrib */ +void iupAttribSetInt(Ihandle *ih, const char* name, int num); + +/** Sets an floating point attribute only in the hash table. + * It will be stored as a string. + * It ignores children. + * \ingroup attrib */ +void iupAttribSetFloat(Ihandle *ih, const char* name, float num); + +/** Returns the attribute from the hash table only. + * \ingroup attrib */ +char* iupAttribGet(Ihandle* ih, const char* name); + +/** Returns the attribute from the hash table only, + * but if not defined then checks in its parent tree. + * \ingroup attrib */ +char* iupAttribGetInherit(Ihandle* ih, const char* name); + +/** Returns the attribute from the hash table of a native parent. + * Don't check for default values. Don't check at the element. + * Used for BGCOLOR and BACKGROUND attributes. + * \ingroup attrib */ +char* iupAttribGetInheritNativeParent(Ihandle* ih, const char* name); + +/** Returns the attribute from the hash table as a string, + * but if not defined then checks in its parent tree if allowed by the control implementation, + * if still not defined then returns the registered default value if any. + * \ingroup attrib */ +char* iupAttribGetStr(Ihandle* ih, const char* name); + +/** Same as \ref iupAttribGetStr but returns an integer number. + * Checks also for boolean values. + * \ingroup attrib */ +int iupAttribGetInt(Ihandle* ih, const char* name); + +/** Same as \ref iupAttribGetStr but checks for boolean values. + * Use \ref iupStrBoolean. + * \ingroup attrib */ +int iupAttribGetBoolean(Ihandle* ih, const char* name); + +/** Same as \ref iupAttribGetStr but returns an floating point number. + * \ingroup attrib */ +float iupAttribGetFloat(Ihandle* ih, const char* name); + +/** Set an internal name to a handle. + * \ingroup attrib */ +void iupAttribSetHandleName(Ihandle *ih); + + +/* For all attributes in the evironment, call the class SetAttribute only. + * Called only after the element is mapped. */ +void iupAttribUpdate(Ihandle* ih); + +/* For all registered inherited attributes, checks the parent tree and + * call the class SetAttribute if the attribute is defined. + * Called only after the element is mapped. */ +void iupAttribUpdateFromParent(Ihandle* ih); + + + +/* Other functions declared in and implemented here. +IupGetAllAttributes +IupGetAttributes +IupSetAttributes +IupSetAttribute +IupStoreAttribute +IupGetAttribute +IupGetFloat +IupGetInt +IupGetInt2 +IupSetfAttribute +IupSetAttributeHandle +IupGetAttributeHandle +*/ + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_box.c b/iup/src/iup_box.c new file mode 100755 index 0000000..54e56d9 --- /dev/null +++ b/iup/src/iup_box.c @@ -0,0 +1,238 @@ +/** \file + * \brief Base for box Controls. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_box.h" + + +static int iBoxCreateMethod(Ihandle* ih, void** params) +{ + ih->data = iupALLOCCTRLDATA(); + + if (params) + { + Ihandle** iparams = (Ihandle**)params; + while (*iparams) + { + IupAppend(ih, *iparams); + iparams++; + } + } + + return IUP_NOERROR; +} + +static char* iBoxGetClientSizeAttrib(Ihandle* ih) +{ + char* str; + int width, height; + + if (ih->handle) + { + width = ih->currentwidth; + height = ih->currentheight; + } + else + { + width = ih->userwidth; + height = ih->userheight; + } + + if (!width && !height) + return NULL; + + str = iupStrGetMemory(50); + + width -= 2*ih->data->margin_x; + height -= 2*ih->data->margin_y; + + sprintf(str, "%dx%d", width, height); + return str; +} + +static int iBoxSetCGapAttrib(Ihandle* ih, const char* value) +{ + int cgap; + iupStrToInt(value, &cgap); + if (iupStrEqual(ih->iclass->name, "vbox")) + { + int charheight; + iupdrvFontGetCharSize(ih, NULL, &charheight); + ih->data->gap = iupHEIGHT2RASTER(cgap, charheight); + } + else + { + int charwidth; + iupdrvFontGetCharSize(ih, &charwidth, NULL); + ih->data->gap = iupWIDTH2RASTER(cgap, charwidth); + } + return 0; +} + +static char* iBoxGetCGapAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + if (iupStrEqual(ih->iclass->name, "vbox")) + { + int charheight; + iupdrvFontGetCharSize(ih, NULL, &charheight); + sprintf(str, "%d", iupRASTER2HEIGHT(ih->data->gap, charheight)); + } + else + { + int charwidth; + iupdrvFontGetCharSize(ih, &charwidth, NULL); + sprintf(str, "%d", iupRASTER2WIDTH(ih->data->gap, charwidth)); + } + return str; +} + +static int iBoxSetGapAttrib(Ihandle* ih, const char* value) +{ + iupStrToInt(value, &ih->data->gap); + return 0; +} + +static char* iBoxGetGapAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + sprintf(str, "%d", ih->data->gap); + return str; +} + +static int iBoxSetHomogeneousAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + ih->data->is_homogeneous = 1; + else + ih->data->is_homogeneous = 0; + return 0; +} + +static char* iBoxGetHomogeneousAttrib(Ihandle* ih) +{ + if (ih->data->is_homogeneous) + return "YES"; + else + return "NO"; +} + +static int iBoxSetExpandChildrenAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + { + if (iupStrEqual(ih->iclass->name, "vbox")) + ih->data->expand_children = IUP_EXPAND_WIDTH; /* in vert. box, expand horizontally */ + else + ih->data->expand_children = IUP_EXPAND_HEIGHT; /* in horiz. box, expand vertically */ + } + else + ih->data->expand_children = 0; + return 0; +} + +static char* iBoxGetExpandChildrenAttrib(Ihandle* ih) +{ + if (ih->data->expand_children) + return "YES"; + else + return "NO"; +} + +static int iBoxSetNormalizeSizeAttrib(Ihandle* ih, const char* value) +{ + ih->data->normalize_size = iupNormalizeGetNormalizeSize(value); + return 0; +} + +static char* iBoxGetNormalizeSizeAttrib(Ihandle* ih) +{ + return iupNormalizeGetNormalizeSizeStr(ih->data->normalize_size); +} + +static int iBoxSetCMarginAttrib(Ihandle* ih, const char* value) +{ + int cmargin_x=-1, cmargin_y=-1; + int charwidth, charheight; + iupdrvFontGetCharSize(ih, &charwidth, &charheight); + iupStrToIntInt(value, &cmargin_x, &cmargin_y, 'x'); + if (cmargin_x!=-1) + ih->data->margin_x = iupHEIGHT2RASTER(cmargin_x, charheight); + if (cmargin_y!=-1) + ih->data->margin_x = iupWIDTH2RASTER(cmargin_y, charwidth); + return 0; +} + +static char* iBoxGetCMarginAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + int charwidth, charheight; + iupdrvFontGetCharSize(ih, &charwidth, &charheight); + sprintf(str, "%dx%d", iupRASTER2WIDTH(ih->data->margin_x, charwidth), iupRASTER2HEIGHT(ih->data->margin_y, charheight)); + return str; +} + +static int iBoxSetMarginAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->margin_x, &ih->data->margin_y, 'x'); + return 0; +} + +static char* iBoxGetMarginAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + sprintf(str, "%dx%d", ih->data->margin_x, ih->data->margin_y); + return str; +} + + +/******************************************************************************/ + + +Iclass* iupBoxClassBase(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->format = "g"; /* array of Ihandle */ + ic->nativetype = IUP_TYPEVOID; + ic->childtype = IUP_CHILDMANY; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iBoxCreateMethod; + ic->Map = iupBaseTypeVoidMapMethod; + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Base Container */ + iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CLIENTSIZE", iBoxGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* boxes only */ + iupClassRegisterAttribute(ic, "GAP", iBoxGetGapAttrib, iBoxSetGapAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "CGAP", iBoxGetCGapAttrib, iBoxSetCGapAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "MARGIN", iBoxGetMarginAttrib, iBoxSetMarginAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "CMARGIN", iBoxGetCMarginAttrib, iBoxSetCMarginAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + + iupClassRegisterAttribute(ic, "EXPANDCHILDREN", iBoxGetExpandChildrenAttrib, iBoxSetExpandChildrenAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "HOMOGENEOUS", iBoxGetHomogeneousAttrib, iBoxSetHomogeneousAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NORMALIZESIZE", iBoxGetNormalizeSizeAttrib, iBoxSetNormalizeSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/src/iup_box.h b/iup/src/iup_box.h new file mode 100755 index 0000000..5d79263 --- /dev/null +++ b/iup/src/iup_box.h @@ -0,0 +1,40 @@ +/** \file + * \brief Base for box Controls. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_BOX_H +#define __IUP_BOX_H + +#ifdef __cplusplus +extern "C" { +#endif + + +struct _IcontrolData +{ + int alignment, + expand_children, + is_homogeneous, + normalize_size, + margin_x, + margin_y, + gap; + int children_naturalsize, /* calculated in ComputeNaturalSize, used in SetChildrenCurrentSize */ + homogeneous_size; /* calculated in SetChildrenCurrentSize, used in SetChildrenPosition */ +}; + +Iclass* iupBoxClassBase(void); + +/* Implemented in iup_normalizer.c */ +void iupNormalizeSizeBoxChild(Ihandle *ih, int normalize, int children_natural_maxwidth, int children_natural_maxheight); +int iupNormalizeGetNormalizeSize(const char* value); +char* iupNormalizeGetNormalizeSizeStr(int normalize); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_button.c b/iup/src/iup_button.c new file mode 100755 index 0000000..7719663 --- /dev/null +++ b/iup/src/iup_button.c @@ -0,0 +1,206 @@ +/** \file + * \brief Button Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_button.h" +#include "iup_image.h" + + +char* iupButtonGetPaddingAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + sprintf(str, "%dx%d", ih->data->horiz_padding, ih->data->vert_padding); + return str; +} + +static int iButtonSetImagePositionAttrib(Ihandle* ih, const char* value) +{ + if (!ih->handle) /* set only before map */ + { + if (iupStrEqualNoCase(value, "RIGHT")) + ih->data->img_position = IUP_IMGPOS_RIGHT; + else if (iupStrEqualNoCase(value, "BOTTOM")) + ih->data->img_position = IUP_IMGPOS_BOTTOM; + else if (iupStrEqualNoCase(value, "TOP")) + ih->data->img_position = IUP_IMGPOS_TOP; + else /* "LEFT" */ + ih->data->img_position = IUP_IMGPOS_LEFT; + } + return 0; +} + +static char* iButtonGetImagePositionAttrib(Ihandle *ih) +{ + char* img_pos2str[4] = {"LEFT", "RIGHT", "TOP", "BOTTOM"}; + char *str = iupStrGetMemory(50); + sprintf(str, "%s", img_pos2str[ih->data->img_position]); + return str; +} + +static int iButtonSetSpacingAttrib(Ihandle* ih, const char* value) +{ + if (!ih->handle) /* set only before map */ + iupStrToInt(value, &ih->data->spacing); + return 0; +} + +static char* iButtonGetSpacingAttrib(Ihandle *ih) +{ + char *str = iupStrGetMemory(50); + sprintf(str, "%d", ih->data->spacing); + return str; +} + + +/*****************************************************************************************/ + + +static int iButtonCreateMethod(Ihandle* ih, void** params) +{ + if (params) + { + if (params[0]) iupAttribStoreStr(ih, "TITLE", (char*)(params[0])); + if (params[1]) iupAttribStoreStr(ih, "ACTION", (char*)(params[1])); + } + ih->data = iupALLOCCTRLDATA(); + + ih->data->spacing = 2; + + /* used only by the Windows driver */ + ih->data->horiz_alignment = IUP_ALIGN_ACENTER; + ih->data->vert_alignment = IUP_ALIGN_ACENTER; + return IUP_NOERROR; +} + +static void iButtonComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int natural_w = 0, + natural_h = 0, + type = ih->data->type; + (void)expand; /* unset if not a container */ + + if (!ih->handle) + { + /* if not mapped must initialize the internal values */ + char* value = iupAttribGet(ih, "IMAGE"); + if (value) + { + type = IUP_BUTTON_IMAGE; + if (iupAttribGet(ih, "TITLE")) + type |= IUP_BUTTON_TEXT; + } + else + type = IUP_BUTTON_TEXT; + } + + if (type & IUP_BUTTON_IMAGE) + { + iupImageGetInfo(iupAttribGet(ih, "IMAGE"), &natural_w, &natural_h, NULL); + + if (type & IUP_BUTTON_TEXT) + { + int text_w, text_h; + /* must use IupGetAttribute to check from the native implementation */ + char* title = IupGetAttribute(ih, "TITLE"); + iupdrvFontGetMultiLineStringSize(ih, title, &text_w, &text_h); + + if (ih->data->img_position == IUP_IMGPOS_RIGHT || + ih->data->img_position == IUP_IMGPOS_LEFT) + { + natural_w += text_w + ih->data->spacing; + natural_h = iupMAX(natural_h, text_h); + } + else + { + natural_w = iupMAX(natural_w, text_w); + natural_h += text_h + ih->data->spacing; + } + } + } + else /* IUP_BUTTON_TEXT only */ + { + /* must use IupGetAttribute to check from the native implementation */ + char* title = IupGetAttribute(ih, "TITLE"); + char* str = iupStrProcessMnemonic(title, NULL, 0); /* remove & */ + iupdrvFontGetMultiLineStringSize(ih, str, &natural_w, &natural_h); + if (str && str!=title) free(str); + } + + /* even when IMPRESS is set, must compute the borders space */ + iupdrvButtonAddBorders(&natural_w, &natural_h); + + natural_w += 2*ih->data->horiz_padding; + natural_h += 2*ih->data->vert_padding; + + *w = natural_w; + *h = natural_h; +} + + +/******************************************************************************/ + + +Ihandle* IupButton(const char* title, const char* action) +{ + void *params[3]; + params[0] = (void*)title; + params[1] = (void*)action; + params[2] = NULL; + return IupCreatev("button", params); +} + +Iclass* iupButtonGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "button"; + ic->format = "SA"; /* one optional string, and one optional callback name */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iButtonCreateMethod; + ic->ComputeNaturalSize = iButtonComputeNaturalSizeMethod; + + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "BUTTON_CB", "iiiis"); + iupClassRegisterCallback(ic, "ACTION", ""); + + /* Common Callbacks */ + iupBaseRegisterCommonCallbacks(ic); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* IupButton only */ + iupClassRegisterAttribute(ic, "SPACING", iButtonGetSpacingAttrib, iButtonSetSpacingAttrib, IUPAF_SAMEASSYSTEM, "2", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGEPOSITION", iButtonGetImagePositionAttrib, iButtonSetImagePositionAttrib, IUPAF_SAMEASSYSTEM, "LEFT", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMPRESSBORDER", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FLAT", NULL, NULL, NULL, NULL, IUPAF_DEFAULT); + + iupdrvButtonInitClass(ic); + + return ic; +} diff --git a/iup/src/iup_button.h b/iup/src/iup_button.h new file mode 100755 index 0000000..f85720a --- /dev/null +++ b/iup/src/iup_button.h @@ -0,0 +1,39 @@ +/** \file + * \brief Button Controls Private Declarations + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_BUTTON_H +#define __IUP_BUTTON_H + +#ifdef __cplusplus +extern "C" { +#endif + + +void iupdrvButtonInitClass(Iclass* ic); +void iupdrvButtonAddBorders(int *x, int *y); + +char* iupButtonGetPaddingAttrib(Ihandle* ih); + +enum{IUP_BUTTON_IMAGE=0x01, IUP_BUTTON_TEXT=0x02, IUP_BUTTON_BOTH=0x03}; +enum{IUP_IMGPOS_LEFT, IUP_IMGPOS_RIGHT, IUP_IMGPOS_TOP, IUP_IMGPOS_BOTTOM}; + +struct _IcontrolData +{ + int type, /* the 2 buttons possibilities */ + horiz_padding, vert_padding; /* button margin */ + int spacing, img_position; /* used when both text and image are displayed */ + + /* used only by the Windows driver */ + int horiz_alignment, vert_alignment; + unsigned long fgcolor; +}; + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_callback.c b/iup/src/iup_callback.c new file mode 100755 index 0000000..e000287 --- /dev/null +++ b/iup/src/iup_callback.c @@ -0,0 +1,90 @@ +/** \file + * \brief get/set callback + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_assert.h" + + +Icallback IupGetCallback(Ihandle *ih, const char *name) +{ + Icallback func = NULL; + void* value; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + iupASSERT(name!=NULL); + if (!name) + return NULL; + + func = (Icallback)iupTableGetFunc(ih->attrib, name, &value); + + if (!func && value) + { + /* if not a IUPTABLE_FUNCPOINTER then it is an old fashion name */ + func = IupGetFunction((const char*)value); + } + + return func; +} + +Icallback IupSetCallback(Ihandle *ih, const char *name, Icallback func) +{ + Icallback old_func = NULL; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + iupASSERT(name!=NULL); + if (!name) + return NULL; + + if (!func) + iupTableRemove(ih->attrib, name); + else + { + void* value; + old_func = (Icallback)iupTableGetFunc(ih->attrib, name, &value); + if (!old_func && value) + old_func = IupGetFunction((const char*)value); + + iupTableSetFunc(ih->attrib, name, (Ifunc)func); + } + + return old_func; +} + +Ihandle* IupSetCallbacks(Ihandle* ih, const char *name, Icallback func, ...) +{ + va_list arglist; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + IupSetCallback(ih, name, func); + + va_start(arglist, func); + + name=va_arg(arglist, const char*); + while (name) + { + func=va_arg(arglist, Icallback); + IupSetCallback(ih, name, func); + + name=va_arg(arglist, const char*); + } + + va_end (arglist); + return ih; +} diff --git a/iup/src/iup_canvas.c b/iup/src/iup_canvas.c new file mode 100755 index 0000000..5eda988 --- /dev/null +++ b/iup/src/iup_canvas.c @@ -0,0 +1,169 @@ +/** \file + * \brief Canvas Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_canvas.h" + + +void iupCanvasCalcScrollIntPos(double min, double max, double page, double pos, + int imin, int imax, int *ipage, int *ipos) +{ + double range = max-min; + int irange = imax-imin; + double ratio = ((double)irange)/range; + + *ipage = (int)(page*ratio); + if (*ipage > irange) *ipage = irange; + if (*ipage < 1) *ipage = 1; + + if (ipos) + { + *ipos = (int)((pos-min)*ratio) + imin; + if (*ipos < imin) *ipos = imin; + if (*ipos > (imax - *ipage)) *ipos = imax - *ipage; + } +} + +void iupCanvasCalcScrollRealPos(double min, double max, double *pos, + int imin, int imax, int ipage, int *ipos) +{ + double range = max-min; + int irange = imax-imin; + double ratio = ((double)irange)/range; + + if (*ipos < imin) *ipos = imin; + if (*ipos > (imax - ipage)) *ipos = imax - ipage; + + *pos = min + ((double)(*ipos-imin))/ratio; +} + +char* iupCanvasGetPosXAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + sprintf(str, "%f", ih->data->posx); + return str; +} + +char* iupCanvasGetPosYAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + sprintf(str, "%f", ih->data->posy); + return str; +} + +static int iCanvasCreateMethod(Ihandle* ih, void** params) +{ + if (params && params[0]) + { + char* action = (char*)params[0]; + iupAttribStoreStr(ih, "ACTION", action); + } + + ih->data = iupALLOCCTRLDATA(); + + /* default EXPAND is YES */ + ih->expand = IUP_EXPAND_BOTH; + + return IUP_NOERROR; +} + +static void iCanvasComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int natural_w = 0, natural_h = 0; + (void)expand; /* unset if not a container */ + + /* canvas natural size is 1 character */ + iupdrvFontGetCharSize(ih, &natural_w, &natural_h); + + *w = natural_w; + *h = natural_h; +} + + +/******************************************************************************/ + + +Ihandle* IupCanvas(const char* action) +{ + void *params[2]; + params[0] = (void*)action; + params[1] = NULL; + return IupCreatev("canvas", params); +} + +Iclass* iupCanvasGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "canvas"; + ic->format = "A"; /* one optional callback name */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iCanvasCreateMethod; + ic->ComputeNaturalSize = iCanvasComputeNaturalSizeMethod; + + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "DROPFILES_CB", "siii"); + iupClassRegisterCallback(ic, "RESIZE_CB", "ii"); + iupClassRegisterCallback(ic, "FOCUS_CB", "i"); + iupClassRegisterCallback(ic, "WOM_CB", "i"); + iupClassRegisterCallback(ic, "BUTTON_CB", "iiiis"); + iupClassRegisterCallback(ic, "MOTION_CB", "iis"); + iupClassRegisterCallback(ic, "KEYPRESS_CB", "ii"); + iupClassRegisterCallback(ic, "ACTION", "ff"); + iupClassRegisterCallback(ic, "SCROLL_CB", "iff"); + iupClassRegisterCallback(ic, "WHEEL_CB", "fiis"); + + /* Common Callbacks */ + iupBaseRegisterCommonCallbacks(ic); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + { + /* Change the default to YES */ + IattribGetFunc _get; + IattribSetFunc _set; + iupClassRegisterGetAttribute(ic, "EXPAND", &_get, &_set, NULL, NULL, NULL); + iupClassRegisterAttribute(ic, "EXPAND", _get, _set, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + } + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* IupCanvas only */ + iupClassRegisterAttribute(ic, "CURSOR", NULL, iupdrvBaseSetCursorAttrib, IUPAF_SAMEASSYSTEM, "ARROW", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "XMIN", NULL, NULL, IUPAF_SAMEASSYSTEM, "0.0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "XMAX", NULL, NULL, IUPAF_SAMEASSYSTEM, "1.0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "YMIN", NULL, NULL, IUPAF_SAMEASSYSTEM, "0.0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "YMAX", NULL, NULL, IUPAF_SAMEASSYSTEM, "1.0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "LINEX", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "LINEY", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "BORDER", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "SCROLLBAR", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + + iupdrvCanvasInitClass(ic); + + return ic; +} diff --git a/iup/src/iup_canvas.h b/iup/src/iup_canvas.h new file mode 100755 index 0000000..29d644c --- /dev/null +++ b/iup/src/iup_canvas.h @@ -0,0 +1,37 @@ +/** \file + * \brief Canvas Controls Private Declarations + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_CANVAS_H +#define __IUP_CANVAS_H + +#ifdef __cplusplus +extern "C" { +#endif + + +void iupdrvCanvasInitClass(Iclass* ic); +void iupCanvasCalcScrollIntPos(double min, double max, double page, double pos, + int imin, int imax, int *ipage, int *ipos); +void iupCanvasCalcScrollRealPos(double min, double max, double *pos, + int imin, int imax, int ipage, int *ipos); +char* iupCanvasGetPosXAttrib(Ihandle* ih); +char* iupCanvasGetPosYAttrib(Ihandle* ih); + +#define IUP_SB_MIN 0 +#define IUP_SB_MAX INT_MAX-1 + +struct _IcontrolData +{ + int sb; /* scrollbar configuration, valid only after map, use iupBaseGetScrollbar before map */ + float posx, posy; +}; + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_cbox.c b/iup/src/iup_cbox.c new file mode 100755 index 0000000..5a1d409 --- /dev/null +++ b/iup/src/iup_cbox.c @@ -0,0 +1,143 @@ +/** \file + * \brief cbox control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" + + +static int iCboxCreateMethod(Ihandle* ih, void** params) +{ + if (params) + { + Ihandle** iparams = (Ihandle**)params; + while (*iparams) + { + IupAppend(ih, *iparams); + iparams++; + } + } + + return IUP_NOERROR; +} + +static void iCboxComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + Ihandle* child; + int children_expand, + children_naturalwidth, children_naturalheight; + int cx, cy; + + /* calculate total children natural size (even for hidden children) */ + children_expand = 0; + children_naturalwidth = 0; + children_naturalheight = 0; + + for (child = ih->firstchild; child; child = child->brother) + { + /* update child natural size first */ + iupBaseComputeNaturalSize(child); + + cx = iupAttribGetInt(child, "CX"); + cy = iupAttribGetInt(child, "CY"); + + children_expand |= child->expand; + children_naturalwidth = iupMAX(children_naturalwidth, cx+child->naturalwidth); + children_naturalheight = iupMAX(children_naturalheight, cy+child->naturalheight); + } + + *expand = children_expand; + *w = children_naturalwidth; + *h = children_naturalheight; +} + +static void iCboxSetChildrenCurrentSizeMethod(Ihandle* ih, int shrink) +{ + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + { + /* update children to their own natural size */ + iupBaseSetCurrentSize(child, child->naturalwidth, child->naturalheight, shrink); + } +} + +static void iCboxSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + int cx, cy; + Ihandle* child; + + for (child = ih->firstchild; child; child = child->brother) + { + cx = iupAttribGetInt(child, "CX"); + cy = iupAttribGetInt(child, "CY"); + + /* update child */ + iupBaseSetPosition(child, x+cx, y+cy); + } +} + + +/******************************************************************************/ + + +Ihandle *IupCboxv(Ihandle** children) +{ + return IupCreatev("cbox", (void**)children); +} + +Ihandle *IupCbox (Ihandle * child,...) +{ + Ihandle **children; + Ihandle *ih; + + va_list arglist; + va_start(arglist, child); + children = (Ihandle **)iupObjectGetParamList(child, arglist); + va_end(arglist); + + ih = IupCreatev("cbox", (void**)children); + free(children); + + return ih; +} + +Iclass* iupCboxGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "cbox"; + ic->format = "g"; /* array of Ihandle */ + ic->nativetype = IUP_TYPEVOID; + ic->childtype = IUP_CHILDMANY; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iCboxCreateMethod; + ic->Map = iupBaseTypeVoidMapMethod; + + ic->ComputeNaturalSize = iCboxComputeNaturalSizeMethod; + ic->SetChildrenCurrentSize = iCboxSetChildrenCurrentSizeMethod; + ic->SetChildrenPosition = iCboxSetChildrenPositionMethod; + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Base Container */ + iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CLIENTSIZE", iupBaseGetRasterSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/src/iup_childtree.c b/iup/src/iup_childtree.c new file mode 100755 index 0000000..1d4066e --- /dev/null +++ b/iup/src/iup_childtree.c @@ -0,0 +1,455 @@ +/** \file + * \brief Control tree hierarchy manager. + * implements also IupDestroy + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_dlglist.h" +#include "iup_childtree.h" +#include "iup_class.h" +#include "iup_attrib.h" +#include "iup_assert.h" +#include "iup_str.h" +#include "iup_drv.h" + + +Ihandle* IupGetDialog(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + for (ih = ih; ih->parent; ih = ih->parent) + ; /* empty*/ + + if (ih->iclass->nativetype == IUP_TYPEDIALOG) + return ih; + else if (ih->iclass->nativetype == IUP_TYPEMENU) + { + Ihandle *dlg; + /* if ih is a menu then */ + /* searches all the dialogs that may have been associated with the menu. */ + for (dlg = iupDlgListFirst(); dlg; dlg = iupDlgListNext()) + { + if (IupGetAttributeHandle(dlg, "MENU") == ih) + return dlg; + } + } + + return NULL; +} + +static void iChildDetach(Ihandle* parent, Ihandle* child) +{ + Ihandle *c, + *c_prev = NULL; + + /* Cleans the child entry inside the parent's child list */ + for (c = parent->firstchild; c; c = c->brother) + { + if (c == child) /* Found the right child */ + { + if (c_prev == NULL) + parent->firstchild = child->brother; + else + c_prev->brother = child->brother; + + child->brother = NULL; + child->parent = NULL; + return; + } + + c_prev = c; + } +} + +void IupDetach(Ihandle *child) +{ + Ihandle *parent, *top_parent; + + iupASSERT(iupObjectCheck(child)); + if (!iupObjectCheck(child)) + return; + + IupUnmap(child); + + /* Not valid if does NOT has a parent */ + if (!child->parent) + return; + + parent = child->parent; + top_parent = iupChildTreeGetNativeParent(child); + + iChildDetach(parent, child); + iupClassObjectChildRemoved(parent, child); + + while (parent && parent != top_parent) + { + parent = parent->parent; + if (parent) + iupClassObjectChildRemoved(parent, child); + } +} + +static int iChildFindRec(Ihandle* parent, Ihandle* child) +{ + Ihandle *c; + + /* Finds the reference child entry inside the parent's child list */ + for (c = parent->firstchild; c; c = c->brother) + { + if (c == child) /* Found the right child */ + return 1; + + if (iChildFindRec(c, child)) + return 1; + } + + return 0; +} + +static int iChildTreeCheckInside(Ihandle* parent, Ihandle* child) +{ + /* top parent */ + while (parent->parent) + parent = parent->parent; + + return iChildFindRec(parent, child); +} + +static int iChildFind(Ihandle* parent, Ihandle* child) +{ + Ihandle *c; + + /* Finds the reference child entry inside the parent's child list */ + for (c = parent->firstchild; c; c = c->brother) + { + if (c == child) /* Found the right child */ + return 1; + } + + return 0; +} + +static void iChildInsert(Ihandle* parent, Ihandle* ref_child, Ihandle* child) +{ + Ihandle *c, + *c_prev = NULL; + + if (!ref_child) + ref_child = parent->firstchild; + + /* Finds the reference child entry inside the parent's child list */ + for (c = parent->firstchild; c; c = c->brother) + { + if (c == ref_child) /* Found the right child */ + { + child->parent = parent; + child->brother = ref_child; + + if (c_prev == NULL) + parent->firstchild = child; + else + c_prev->brother = child; + return; + } + + c_prev = c; + } +} + +Ihandle* IupInsert(Ihandle* parent, Ihandle* ref_child, Ihandle* child) +{ + Ihandle* top_parent = parent; + + /* ref_child can be NULL */ + + iupASSERT(iupObjectCheck(parent)); + if (!iupObjectCheck(parent)) + return NULL; + + iupASSERT(iupObjectCheck(child)); + if (!iupObjectCheck(child)) + return NULL; + +#ifdef IUP_ASSERT + if (iChildTreeCheckInside(parent, child)) + { + iupError("Duplicate Child Found!\n(type(%s) - name(%s))", child->iclass->name, IupGetName(child)); + return NULL; + } +#endif + + + /* this will return the actual parent */ + parent = iupClassObjectGetInnerContainer(top_parent); + if (!parent) + return NULL; + + if (parent->iclass->childtype == IUP_CHILDNONE) + return NULL; + if (parent->iclass->childtype == IUP_CHILD_ONE && parent->firstchild) + return NULL; + + + /* if already at the parent box, allow to move even if mapped */ + if (parent->iclass->nativetype == IUP_TYPEVOID && + iChildFind(parent, child)) + { + iChildDetach(parent, child); + iChildInsert(parent, ref_child, child); + } + else + { + /* Not valid if it is mapped */ + if (child->handle) + return NULL; + + iChildInsert(parent, ref_child, child); + iupClassObjectChildAdded(parent, child); + if (top_parent != parent) + iupClassObjectChildAdded(top_parent, child); + } + + return parent; +} + +void iupChildTreeAppend(Ihandle* parent, Ihandle* child) +{ + child->parent = parent; + + if (parent->firstchild == NULL) + parent->firstchild = child; + else + { + Ihandle* c = parent->firstchild; + while (c->brother) + c = c->brother; + c->brother = child; + } +} + +Ihandle* IupAppend(Ihandle* parent, Ihandle* child) +{ + Ihandle* top_parent = parent; + + iupASSERT(iupObjectCheck(parent)); + if (!iupObjectCheck(parent)) + return NULL; + + iupASSERT(iupObjectCheck(child)); + if (!iupObjectCheck(child)) + return NULL; + +#ifdef IUP_ASSERT + if (iChildTreeCheckInside(parent, child)) + { + iupError("Duplicate Child Found!\n(type(%s) - name(%s))", child->iclass->name, IupGetName(child)); + return NULL; + } +#endif + + + /* this will return the actual parent */ + parent = iupClassObjectGetInnerContainer(top_parent); + if (!parent) + return NULL; + + if (parent->iclass->childtype == IUP_CHILDNONE) + return NULL; + if (parent->iclass->childtype == IUP_CHILD_ONE && parent->firstchild) + return NULL; + + + /* if already at the parent box, allow to move even if mapped */ + if (parent->iclass->nativetype == IUP_TYPEVOID && + iChildFind(parent, child)) + { + iChildDetach(parent, child); + iupChildTreeAppend(parent, child); + } + else + { + /* Not valid if it is mapped */ + if (child->handle) + return NULL; + + iupChildTreeAppend(parent, child); + iupClassObjectChildAdded(parent, child); + if (top_parent != parent) + iupClassObjectChildAdded(top_parent, child); + } + + return parent; +} + +static void iChildReparent(Ihandle* child, Ihandle* new_parent) +{ + Ihandle *c; + + /* Forward the reparent to all native children */ + + for (c = child->firstchild; c; c = c->brother) + { + if (c->iclass->nativetype != IUP_TYPEVOID) + iupdrvReparent(c); + else + iChildReparent(c, new_parent); + } +} + +int IupReparent(Ihandle* child, Ihandle* parent) +{ + Ihandle* top_parent = parent; + Ihandle* old_parent; + + iupASSERT(iupObjectCheck(parent)); + if (!iupObjectCheck(parent)) + return IUP_ERROR; + + iupASSERT(iupObjectCheck(child)); + if (!iupObjectCheck(child)) + return IUP_ERROR; + + + /* this will return the actual parent */ + parent = iupClassObjectGetInnerContainer(top_parent); + if (!parent) + return IUP_ERROR; + + if (parent->iclass->childtype == IUP_CHILDNONE) + return IUP_ERROR; + if (parent->iclass->childtype == IUP_CHILD_ONE && parent->firstchild) + return IUP_ERROR; + + + /* both must be already mapped or both unmapped */ + if ((!parent->handle && child->handle) || + ( parent->handle && !child->handle)) + return IUP_ERROR; + + + /* detach from old parent */ + old_parent = child->parent; + iChildDetach(old_parent, child); + iupClassObjectChildRemoved(old_parent, child); + + + /* attach to new parent */ + iupChildTreeAppend(parent, child); + iupClassObjectChildAdded(parent, child); + if (top_parent != parent) + iupClassObjectChildAdded(top_parent, child); + + + /* no need to remap, just notify the native system */ + if (child->handle && parent->handle) + { + if (child->iclass->nativetype != IUP_TYPEVOID) + iupdrvReparent(child); + else + iChildReparent(child, parent); + } + + return IUP_NOERROR; +} + +Ihandle* IupGetChild(Ihandle* ih, int pos) +{ + int p; + Ihandle* child; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + for (p = 0, child = ih->firstchild; child; child = child->brother, p++) + { + if (p == pos) + return child; + } + + return NULL; +} + +int IupGetChildPos(Ihandle* ih, Ihandle* child) +{ + int pos; + Ihandle* c; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return -1; + + for (pos = 0, c = ih->firstchild; c; c = c->brother, pos++) + { + if (c == child) + return pos; + } + return -1; +} + +int IupGetChildCount(Ihandle* ih) +{ + int count = 0; + Ihandle* child; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return -1; + + for (child = ih->firstchild; child; child = child->brother) + count++; + + return count; +} + +Ihandle* IupGetNextChild(Ihandle* ih, Ihandle* child) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + if (!child) + return ih->firstchild; + else + return child->brother; +} + +Ihandle* IupGetBrother(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + return ih->brother; +} + +Ihandle* IupGetParent(Ihandle *ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + return ih->parent; +} + +Ihandle* iupChildTreeGetNativeParent(Ihandle* ih) +{ + Ihandle* parent = ih->parent; + while (parent && parent->iclass->nativetype == IUP_TYPEVOID) + parent = parent->parent; + return parent; +} + +InativeHandle* iupChildTreeGetNativeParentHandle(Ihandle* ih) +{ + Ihandle* native_parent = iupChildTreeGetNativeParent(ih); + return (InativeHandle*)iupClassObjectGetInnerNativeContainerHandle(native_parent, ih); +} diff --git a/iup/src/iup_childtree.h b/iup/src/iup_childtree.h new file mode 100755 index 0000000..4376c0b --- /dev/null +++ b/iup/src/iup_childtree.h @@ -0,0 +1,54 @@ +/** \file + * \brief Control Hierarchy Tree management. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_CHILDTREE_H +#define __IUP_CHILDTREE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** \defgroup childtree Child Tree Utilities + * \par + * Some native containers have an internal native child that + * will be the actual container of the children. This native container is + * returned by \ref iupClassObjectGetInnerNativeContainerHandle. + * \par + * Some native elements need an extra parent, the ih->handle points to the main element itself, + * NOT to the extra parent. This extra parent is stored as "_IUP_EXTRAPARENT". + * \par + * See \ref iup_childtree.h + * \ingroup object */ + +/** Returns the native parent. It simply excludes containers that are from IUP_TYPEVOID classes. + * \ingroup childtree */ +Ihandle* iupChildTreeGetNativeParent(Ihandle* ih); + +/** Returns the native parent handle. Uses \ref iupChildTreeGetNativeParent and \ref iupClassObjectGetInnerNativeContainerHandle. + * \ingroup childtree */ +InativeHandle* iupChildTreeGetNativeParentHandle(Ihandle* ih); + +/** Adds the child directly to the parent tree. + * \ingroup childtree */ +void iupChildTreeAppend(Ihandle* parent, Ihandle* child); + + +/* Other functions declared in and implemented here. +IupGetDialog +IupDetach +IupAppend +IupGetChild +IupGetNextChild +IupGetBrother +IupGetParent +*/ + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_class.c b/iup/src/iup_class.c new file mode 100755 index 0000000..d2c4b02 --- /dev/null +++ b/iup/src/iup_class.c @@ -0,0 +1,314 @@ +/** \file + * \brief IUP Ihandle Class C Interface + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_str.h" +#include "iup_attrib.h" +#include "iup_assert.h" + + + +/***************************************************************** + Method Stubs +*****************************************************************/ + +static int iClassCreate(Iclass* ic, Ihandle* ih, void** params) +{ + int ret = IUP_NOERROR; + if (ic->parent) + ret = iClassCreate(ic->parent, ih, params); + + if (ret == IUP_NOERROR && ic->Create) + ret = ic->Create(ih, params); + + return ret; +} + +static int iClassMap(Iclass* ic, Ihandle* ih) +{ + int ret = IUP_NOERROR; + if (ic->parent) + ret = iClassMap(ic->parent, ih); + + if (ret == IUP_NOERROR && ic->Map) + ret = ic->Map(ih); + + return ret; +} + +static void iClassUnMap(Iclass* ic, Ihandle* ih) +{ + /* must be before the parent class */ + if (ic->UnMap) + ic->UnMap(ih); + + if (ic->parent) + iClassUnMap(ic->parent, ih); +} + +static void iClassDestroy(Iclass* ic, Ihandle* ih) +{ + /* must destroy child class before the parent class */ + if (ic->Destroy) + ic->Destroy(ih); + + if (ic->parent) + iClassDestroy(ic->parent, ih); +} + +static void iClassComputeNaturalSize(Iclass* ic, Ihandle* ih, int *w, int *h, int *expand) +{ + if (ic->parent) + iClassComputeNaturalSize(ic->parent, ih, w, h, expand); + + if (ic->ComputeNaturalSize) + ic->ComputeNaturalSize(ih, w, h, expand); +} + +static void iClassSetChildrenCurrentSize(Iclass* ic, Ihandle* ih, int shrink) +{ + if (ic->parent) + iClassSetChildrenCurrentSize(ic->parent, ih, shrink); + + if (ic->SetChildrenCurrentSize) + ic->SetChildrenCurrentSize(ih, shrink); +} + +static void iClassSetChildrenPosition(Iclass* ic, Ihandle* ih, int x, int y) +{ + if (ic->parent) + iClassSetChildrenPosition(ic->parent, ih, x, y); + + if (ic->SetChildrenPosition) + ic->SetChildrenPosition(ih, x, y); +} + +static Ihandle* iClassGetInnerContainer(Iclass* ic, Ihandle* ih) +{ + Ihandle* ih_container = ih; + + if (ic->parent) + ih_container = iClassGetInnerContainer(ic->parent, ih); + + /* if the class implements the function it will ignore the result of the parent class */ + + if (ic->GetInnerContainer) + ih_container = ic->GetInnerContainer(ih); + + return ih_container; +} + +static void* iClassGetInnerNativeContainerHandle(Iclass* ic, Ihandle* ih, Ihandle* child) +{ + void* container_handle = ih->handle; + + if (ic->parent) + container_handle = iClassGetInnerNativeContainerHandle(ic->parent, ih, child); + + /* if the class implements the function it will ignore the result of the parent class */ + + if (ic->GetInnerNativeContainerHandle) + container_handle = ic->GetInnerNativeContainerHandle(ih, child); + + return container_handle; +} + +static void iClassObjectChildAdded(Iclass* ic, Ihandle* ih, Ihandle* child) +{ + if (ic->parent) + iClassObjectChildAdded(ic->parent, ih, child); + + if (ic->ChildAdded) + ic->ChildAdded(ih, child); +} + +static void iClassObjectChildRemoved(Iclass* ic, Ihandle* ih, Ihandle* child) +{ + if (ic->parent) + iClassObjectChildRemoved(ic->parent, ih, child); + + if (ic->ChildRemoved) + ic->ChildRemoved(ih, child); +} + +static void iClassLayoutUpdate(Iclass* ic, Ihandle *ih) +{ + if (ic->parent) + iClassLayoutUpdate(ic->parent, ih); + + if (ic->LayoutUpdate) + ic->LayoutUpdate(ih); +} + +static int iClassDlgPopup(Iclass* ic, Ihandle* ih, int x, int y) +{ + int ret = IUP_INVALID; /* IUP_INVALID means it is not implemented */ + if (ic->parent) + ret = iClassDlgPopup(ic->parent, ih, x, y); + + if (ret != IUP_ERROR && ic->DlgPopup) + ret = ic->DlgPopup(ih, x, y); + + return ret; +} + +int iupClassObjectCreate(Ihandle* ih, void** params) +{ + return iClassCreate(ih->iclass, ih, params); +} + +int iupClassObjectMap(Ihandle* ih) +{ + return iClassMap(ih->iclass, ih); +} + +void iupClassObjectUnMap(Ihandle* ih) +{ + iClassUnMap(ih->iclass, ih); +} + +void iupClassObjectDestroy(Ihandle* ih) +{ + iClassDestroy(ih->iclass, ih); +} + +void iupClassObjectComputeNaturalSize(Ihandle* ih, int *w, int *h, int *expand) +{ + iClassComputeNaturalSize(ih->iclass, ih, w, h, expand); +} + +void iupClassObjectSetChildrenCurrentSize(Ihandle* ih, int shrink) +{ + iClassSetChildrenCurrentSize(ih->iclass, ih, shrink); +} + +void iupClassObjectSetChildrenPosition(Ihandle* ih, int x, int y) +{ + iClassSetChildrenPosition(ih->iclass, ih, x, y); +} + +Ihandle* iupClassObjectGetInnerContainer(Ihandle* ih) +{ + return iClassGetInnerContainer(ih->iclass, ih); +} + +void* iupClassObjectGetInnerNativeContainerHandle(Ihandle* ih, Ihandle* child) +{ + return iClassGetInnerNativeContainerHandle(ih->iclass, ih, child); +} + +void iupClassObjectChildAdded(Ihandle* ih, Ihandle* child) +{ + iClassObjectChildAdded(ih->iclass, ih, child); +} + +void iupClassObjectChildRemoved(Ihandle* ih, Ihandle* child) +{ + iClassObjectChildRemoved(ih->iclass, ih, child); +} + +void iupClassObjectLayoutUpdate(Ihandle *ih) +{ + iClassLayoutUpdate(ih->iclass, ih); +} + +int iupClassObjectDlgPopup(Ihandle* ih, int x, int y) +{ + return iClassDlgPopup(ih->iclass, ih, x, y); +} + + +/***************************************************************** + Class Definition +*****************************************************************/ + + +static void iClassReleaseAttribFuncTable(Iclass* ic) +{ + char* name = iupTableFirst(ic->attrib_func); + while (name) + { + void* afunc = iupTableGetCurr(ic->attrib_func); + free(afunc); + + name = iupTableNext(ic->attrib_func); + } + + iupTableDestroy(ic->attrib_func); +} + +Iclass* iupClassNew(Iclass* parent) +{ + Iclass* ic = malloc(sizeof(Iclass)); + memset(ic, 0, sizeof(Iclass)); + + if (parent) + ic->attrib_func = parent->attrib_func; + else + ic->attrib_func = iupTableCreate(IUPTABLE_STRINGINDEXED); + + ic->parent = parent; + + return ic; +} + +void iupClassRelease(Iclass* ic) +{ + Iclass* parent; + + /* must release only the actual class */ + if (ic->Release) + ic->Release(ic); + + /* must free all classes, since a new instance is created when we inherit */ + parent = ic->parent; + while (parent) + { + Iclass* tmp = parent; + parent = parent->parent; + free(tmp); + } + + /* attributes functions table is released only once */ + iClassReleaseAttribFuncTable(ic); + + free(ic); +} + + +/***************************************************************** + Main API +*****************************************************************/ + + +char* IupGetClassName(Ihandle *ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + return ih->iclass->name; +} + +char* IupGetClassType(Ihandle *ih) +{ + static char* type2str[] = {"void", "control", "canvas", "dialog", "image", "menu"}; + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + return type2str[ih->iclass->nativetype]; +} + diff --git a/iup/src/iup_class.h b/iup/src/iup_class.h new file mode 100755 index 0000000..a5318f3 --- /dev/null +++ b/iup/src/iup_class.h @@ -0,0 +1,414 @@ +/** \file + * \brief Ihandle Class Interface + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_CLASS_H +#define __IUP_CLASS_H + +#include "iup_table.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup iclass Ihandle Class + * \par + * See \ref iup_class.h + * \ingroup cpi */ + +/** Known native types. + * \ingroup iclass */ +typedef enum _InativeType { + IUP_TYPEVOID, /**< No native representation - HBOX, VBOX, ZBOX, FILL, RADIO (handle==(void*)-1 always) */ + IUP_TYPECONTROL, /**< Native controls - BUTTON, LABEL, TOGGLE, LIST, TEXT, MULTILINE, FRAME, others */ + IUP_TYPECANVAS, /**< Drawing canvas, also used as a base control for custom controls. */ + IUP_TYPEDIALOG, /**< DIALOG */ + IUP_TYPEIMAGE, /**< IMAGE */ + IUP_TYPEMENU /**< MENU, SUBMENU, ITEM, SEPARATOR */ +} InativeType; + +/** Possible number of children. + * \ingroup iclass */ +typedef enum _IchildType { + IUP_CHILDNONE, + IUP_CHILD_ONE, + IUP_CHILDMANY +} IchildType; + +typedef struct Iclass_ Iclass; + +/** Ihandle Class Structure + * \ingroup iclass */ +struct Iclass_ +{ + /* Class configuration parameters. */ + char* name; /**< class name. No default, must be initialized. */ + char* format; /**< Creation parameters format of the class when specified. \n + * It can have none, one or more of the following. + * - "b" = (unsigned char) - byte + * - "c" = (unsigned char*) - array of byte + * - "i" = (int) - integer + * - "j" = (int*) - array of integer + * - "f" = (float) - real + * - "s" = (char*) - string + * - "a" = (char*) - name of an action + * - "h" = (Ihandle*) - element handle + * - "g" = (Ihandle**) - array of element handle + * If upper case then it is optional. Default is no parameters. */ + InativeType nativetype; /**< native type. Default is IUP_TYPEVOID. */ + IchildType childtype; /**< children count enum: none, one, or many. Default is IUP_CHILDNONE. Used only by IupAppend and IupInsert to control the number of children. */ + int is_interactive; /**< keyboard interactive boolean, + * true if the class can have the keyboard input focus. Default is false. */ + int has_attrib_id; /**< boolean to indicate if any attribute is numbered. Default is false. */ + + Iclass* parent; /**< class parent to implement inheritance. + * Class name must be different. + * Creation parameters should be the same or repace the parents creation function. + * Native type should be the same. + * Child type should be a more restrictive or equal type (many->one->none). + * Attribute functions will have only one common table. + * All methods can be changed, set to NULL, switched, etc. */ + + Itable* attrib_func; /**< table of functions to handle attributes, only one per class tree */ + + /* Class methods. */ + + /** Method that release the memory allocated by the class. + * Called only once at \ref iupClassRelease. + */ + void (*Release)(Iclass* ic); + + + + /** Method that creates the element and process the creation parameters. \n + * Called only from IupCreate. \n + * The parameters can be NULL for all the controls. \n + * The control should also depend on attributes set before IupMap. \n + * Must return IUP_NOERROR or IUP_ERROR. \n + * Can be NULL, like all methods. + */ + int (*Create)(Ihandle* ih, void** params); + + /** Method that map (create) the control to the native system. \n + * Called only from IupMap. \n + * Must return IUP_NOERROR or IUP_ERROR. + */ + int (*Map)(Ihandle* ih); + + /** Method that unmap (destroy) the control from the native system. \n + * Called only from IupUnmap if the control is mapped. \n + * Must return IUP_NOERROR or IUP_ERROR. + */ + void (*UnMap)(Ihandle* ih); + + /** Method that destroys the element. \n + * Called only from IupDestroy. Always called even if the control is not mapped. + */ + void (*Destroy)(Ihandle* ih); + + + + /** Returns the actual parent to add a child. The default implementation returns itself. \n + * Called only from IupAppend or IupReparent. \n + * This allows IUP elements to be a combination of other IUP elements in a single IUP element. + */ + Ihandle* (*GetInnerContainer)(Ihandle* ih); + + /** Returns the internal native parent. The default implementation returns the handle of itself. \n + * Called from \ref iupChildTreeGetNativeParentHandle. \n + * This allows native elements to have an internal container + * that will be the actual native parent, or in other words allows native elements to be a combination of + * other native elements in a single IUP element. The actual native parent may depend on the child tree (IupTabs). + */ + void* (*GetInnerNativeContainerHandle)(Ihandle* ih, Ihandle* child); + + /** Notifies the element that a child was appended using IupAppend. \n + * Called only from IupAppend or IupReparent. The child is not mapped, but the parent can be mapped. + */ + void (*ChildAdded)(Ihandle* ih, Ihandle* child); + + /** Notifies the element that a child was removed using IupDetach. \n + * Called only from IupDetach or IupReparent. The child is not mapped, but the parent can be mapped. + */ + void (*ChildRemoved)(Ihandle* ih, Ihandle* child); + + + /** Method that update size and position of the native control. \n + * Called only from iupLayoutUpdate and if the element is mapped. + */ + void (*LayoutUpdate)(Ihandle* ih); + + + + /** Method that computes the natural size based on the user size and the actual natural size. \n + * Should update expand if a container, but does NOT depends on expand to compute the natural size. \n + * Must call the \ref iupBaseComputeNaturalSize for each children. + * First calculate the native size for the children, then for the element. \n + * Also called before the element is mapped, so it must be independent of the native control. + * First call done at iupLayoutCompute for the dialog. + */ + void (*ComputeNaturalSize)(Ihandle* ih, int *w, int *h, int *children_expand); + + /** Method that calculates and updates the current size of children based on the available size, + * the natural size and the expand configuration. \n + * Called only if there is any children.\n + * Must call \ref iupBaseSetCurrentSize for each children. + * shrink is the dialog attribute passed here for optimization. \n + * Also called before the element is mapped, so it must be independent of the native control. + * First call done at iupLayoutCompute for the dialog. + */ + void (*SetChildrenCurrentSize)(Ihandle* ih, int shrink); + + /** Method that calculates and updates the position relative to the parent. \n + * Called only if there is any children.\n + * Must call \ref iupBaseSetPosition for each children. + * Also called before the element is mapped, so it must be independent of the native control. + * First call done at iupLayoutCompute for the dialog. + */ + void (*SetChildrenPosition)(Ihandle* ih, int x, int y); + + + + /** Method that shows a popup dialog. Called only for native pre-defined dialogs. \n + * The element is not mapped. \n + * Must return IUP_ERROR or IUP_NOERROR. \n + * Called only from iupDialogPopup. + */ + int (*DlgPopup)(Ihandle* ih, int x, int y); +}; + + + +/** Allocates memory for the Iclass structure and + * initializes the attribute handling functions table. + * \ingroup iclass */ +Iclass* iupClassNew(Iclass* ic_parent); + +/** Release the memory allocated by the class. + * Calls the \ref Iclass::Release method. \n + * Called from iupRegisterFinish. + * \ingroup iclass */ +void iupClassRelease(Iclass* ic); + + + +/** GetAttribute called for a specific attribute. + * Used by \ref iupClassRegisterAttribute. + * \ingroup iclass */ +typedef char* (*IattribGetFunc)(Ihandle* ih); + +/** GetAttribute called for a specific attribute when has_attrib_id is true. \n + * Same as IattribGetFunc but handle attribute names with number ids at the end. \n + * When calling iupClassRegisterAttribute just use a typecast. \n + * Pure numbers are translated into IDVALUEid. + * Used by \ref iupClassRegisterAttribute. + * \ingroup iclass */ +typedef char* (*IattribGetIdFunc)(Ihandle* ih, const char* name_id); + +/** SetAttribute called for a specific attribute. \n + * If returns 0, the attribute will not be stored in the hash table + * (except inheritble attributes that are always stored in the hash table). \n + * When IupSetAttribute is called using value=NULL, the default_value is passed to this function. + * Used by \ref iupClassRegisterAttribute. + * \ingroup iclass */ +typedef int (*IattribSetFunc)(Ihandle* ih, const char* value); + +/** SetAttribute called for a specific attribute when has_attrib_id is true. \n + * Same as IattribSetFunc but handle attribute names with number ids at the end. \n + * When calling iupClassRegisterAttribute just use a typecast. \n + * Pure numbers are translated into IDVALUEid, ex: "1" = "IDVALUE1". + * Used by \ref iupClassRegisterAttribute. + * \ingroup iclass */ +typedef int (*IattribSetIdFunc)(Ihandle* ih, const char* name_id, const char* value); + +/** Attribute flags. + * Used by \ref iupClassRegisterAttribute. + * \ingroup iclass */ +typedef enum _IattribFlags{ + IUPAF_DEFAULT=0, /**< inheritable, can has a default value, is a string, can call the set/get functions only if mapped, no ID */ + IUPAF_NO_INHERIT=1, /**< is not inheritable */ + IUPAF_NO_DEFAULTVALUE=2, /**< can not has a default value */ + IUPAF_NO_STRING=4, /**< is not a string */ + IUPAF_NOT_MAPPED=8, /**< will call the set/get functions also when not mapped */ + IUPAF_HAS_ID=16, /**< can has an ID at the end of the name, automatically set by \ref iupClassRegisterAttributeId */ + IUPAF_READONLY=32, /**< is read-only, can not be changed */ + IUPAF_WRITEONLY=64 /**< is write-only, usually an action */ +} IattribFlags; + +#define IUPAF_SAMEASSYSTEM ((char*)-1) /**< means that the default value is the same as the system default value, used only in \ref iupClassRegisterAttribute */ + + +/** Register attribute handling functions. get, set and default_value can be NULL. + * default_value should point to a constant string, it will not be duplicated internally. \n + * Notice that when an attribute is not defined then default_value=NULL, + * is inheritable can has a default value and is a string. \n + * Since there is only one attribute function table per class tree, + * if you register the same attribute in a child class, then it will replace the parent registration. \n + * If an attribute is not inheritable or not a string then it MUST be registered. + * Internal attributes (starting with "_IUP") can never be registered. + * \ingroup iclass */ +void iupClassRegisterAttribute(Iclass* ic, const char* name, + IattribGetFunc get, + IattribSetFunc set, + const char* default_value, + const char* system_default, + int flags); + +/** Same as \ref iupClassRegisterAttribute for attributes with Ids. + * \ingroup iclass */ +void iupClassRegisterAttributeId(Iclass* ic, const char* name, + IattribGetIdFunc get, + IattribSetIdFunc set, + int flags); + +/** Returns the attribute handling functions. + * \ingroup iclass */ +void iupClassRegisterGetAttribute(Iclass* ic, const char* name, + IattribGetFunc *get, + IattribSetFunc *set, + const char* *default_value, + const char* *system_default, + int *flags); + +/** Register the parameters of a callback. + * Used by language bindings. + * format follows the format specification of the class creation parameters format, + * but it adds the "double" option and remove array options. + * It can have none, one or more of the following. \n + * - "b" = (unsigned char) - byte + * - "i" = (int) - integer + * - "f" = (float) - real + * - "d" = (double) - real + * - "s" = (char*) - string + * - "v" = (void*) - generic pointer + * - "h" = (Ihandle*) - element handle + * The default return value for all callbacks is "i" (int). + * But the return value can be specified using one of the above parameters, + * after all parameters using "=" to separate it from them. + * \ingroup iclass */ +void iupClassRegisterCallback(Iclass* ic, const char* name, const char* format); + +/** Returns the format of the parameters of a registered callback. + * If NULL then the default callback definition is assumed. + * \ingroup iclass */ +char* iupClassCallbackGetFormat(Iclass* ic, const char* name); + + + +/** \defgroup iclassobject Class Object Functions + * \par + * Stubs for the class methods. They implement inheritance and check if method is NULL. + * \par + * See \ref iup_class.h + * \ingroup iclass + */ + +/** Calls \ref Iclass::Create method. + * \ingroup iclassobject + */ +int iupClassObjectCreate(Ihandle* ih, void** params); + +/** Calls \ref Iclass::Map method. + * \ingroup iclassobject + */ +int iupClassObjectMap(Ihandle* ih); + +/** Calls \ref Iclass::UnMap method. + * \ingroup iclassobject + */ +void iupClassObjectUnMap(Ihandle* ih); + +/** Calls \ref Iclass::Destroy method. + * \ingroup iclassobject + */ +void iupClassObjectDestroy(Ihandle* ih); + +/** Calls \ref Iclass::GetInnerContainer method. + * The parent class is ignored. If necessary the child class must handle the parent class internally. + * \ingroup iclassobject + */ +Ihandle* iupClassObjectGetInnerContainer(Ihandle* ih); + +/** Calls \ref Iclass::GetInnerNativeContainerHandle method. Returns ih->handle if there is no inner parent. + * The parent class is ignored. If necessary the child class must handle the parent class internally. + * \ingroup iclassobject + */ +void* iupClassObjectGetInnerNativeContainerHandle(Ihandle* ih, Ihandle* child); + +/** Calls \ref Iclass::ChildAdded method. + * \ingroup iclassobject + */ +void iupClassObjectChildAdded(Ihandle* ih, Ihandle* child); + +/** Calls \ref Iclass::ChildRemoved method. + * \ingroup iclassobject + */ +void iupClassObjectChildRemoved(Ihandle* ih, Ihandle* child); + +/** Calls \ref Iclass::LayoutUpdate method. + * \ingroup iclassobject + */ +void iupClassObjectLayoutUpdate(Ihandle* ih); + +/** Calls \ref Iclass::ComputeNaturalSize method. + * \ingroup iclassobject + */ +void iupClassObjectComputeNaturalSize(Ihandle* ih, int *w, int *h, int *children_expand); + +/** Calls \ref Iclass::SetChildrenCurrentSize method. + * \ingroup iclassobject + */ +void iupClassObjectSetChildrenCurrentSize(Ihandle* ih, int shrink); + +/** Calls \ref Iclass::SetChildrenPosition method. + * \ingroup iclassobject + */ +void iupClassObjectSetChildrenPosition(Ihandle* ih, int x, int y); + +/** Calls \ref Iclass::DlgPopup method. + * \ingroup iclassobject + */ +int iupClassObjectDlgPopup(Ihandle* ih, int x, int y); + + + +/* Handle attributes, but since the attribute function table is shared by the class hierarchy, + * the attribute function is retrieved only from the current class. + * Set is called from iupAttribUpdate (IupMap), IupStoreAttribute and IupSetAttribute. + * Get is called only from IupGetAttribute. + */ +int iupClassObjectSetAttribute(Ihandle* ih, const char* name, const char* value, int *inherit); +char* iupClassObjectGetAttribute(Ihandle* ih, const char* name, char* *def_value, int *inherit); + +/* Used only in iupAttribGetStr */ +void iupClassObjectGetAttributeInfo(Ihandle* ih, const char* name, char* *def_value, int *inherit); + +/* Used only in iupAttribIsPointer */ +int iupClassObjectAttribIsNotString(Ihandle* ih, const char* name); + +/* Used only in iupAttribUpdateFromParent */ +int iupClassObjectCurAttribIsInherit(Iclass* ic); + +/* Used in iupObjectCreate and IupMap */ +void iupClassObjectEnsureDefaultAttributes(Ihandle* ih); + +/* Used in documentation tests. */ +char* iupClassGetDefaultAttribute(const char* classname, const char *attrib_name); + + +/* Other functions declared in and implemented here. +IupGetClassType +IupGetClassName +*/ + + +#ifdef __cplusplus +} +#endif + +#include "iup_classbase.h" + +#endif diff --git a/iup/src/iup_classattrib.c b/iup/src/iup_classattrib.c new file mode 100755 index 0000000..df8f873 --- /dev/null +++ b/iup/src/iup_classattrib.c @@ -0,0 +1,508 @@ +/** \file + * \brief Ihandle Class Attribute Management + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_str.h" +#include "iup_attrib.h" +#include "iup_assert.h" +#include "iup_register.h" +#include "iup_globalattrib.h" + + +typedef struct _IattribFunc +{ + IattribGetFunc get; + IattribSetFunc set; + const char* default_value; + const char* system_default; + int call_global_default; + int flags; +} IattribFunc; + + +static int iClassIsGlobalDefault(const char* name) +{ + if (iupStrEqual(name, "DEFAULTFONT")) + return 1; + if (iupStrEqual(name, "DLGBGCOLOR")) + return 1; + if (iupStrEqual(name, "DLGFGCOLOR")) + return 1; + if (iupStrEqual(name, "TXTBGCOLOR")) + return 1; + if (iupStrEqual(name, "TXTFGCOLOR")) + return 1; + if (iupStrEqual(name, "MENUBGCOLOR")) + return 1; + return 0; +} + +static const char* iClassFindId(const char* name) +{ + while(*name) + { + if (*name >= '0' && *name <= '9') + return name; + if (*name == '*' || *name == ':') + return name; + + name++; + } + return NULL; +} + +static const char* iClassCutNameId(const char* name, const char* name_id) +{ + char* str; + int len = name_id - name; + if (len == 0) + return NULL; + + str = iupStrGetMemory(len+1); + memcpy(str, name, len); + str[len] = 0; + return str; +} + + +static char* iClassGetDefaultValue(IattribFunc* afunc) +{ + if (afunc->call_global_default) + return IupGetGlobal(afunc->default_value); + else + return (char*)afunc->default_value; +} + +int iupClassObjectSetAttribute(Ihandle* ih, const char* name, const char * value, int *inherit) +{ + IattribFunc* afunc; + + if (ih->iclass->has_attrib_id) + { + const char* name_id = iClassFindId(name); + if (name_id) + { + IattribFunc* afunc; + const char* partial_name = iClassCutNameId(name, name_id); + if (!partial_name) + partial_name = "IDVALUE"; /* pure numbers are used as attributes in IupList and IupMatrix, + translate them into IDVALUE. */ + afunc = (IattribFunc*)iupTableGet(ih->iclass->attrib_func, partial_name); + if (afunc) + { + *inherit = 0; /* id numbered attributes are NON inheritable always */ + + if (afunc->flags & IUPAF_READONLY) + { + if (afunc->flags & IUPAF_NO_STRING) + return -1; /* value is NOT a string, can NOT call iupAttribStoreStr */ + return 0; + } + + if (afunc->set && (ih->handle || afunc->flags & IUPAF_NOT_MAPPED)) + { + /* id numbered attributes have default value NULL always */ + IattribSetIdFunc id_set = (IattribSetIdFunc)afunc->set; + return id_set(ih, name_id, value); + } + + if (afunc->flags & IUPAF_NO_STRING) + return -1; /* value is NOT a string, can NOT call iupAttribStoreStr */ + + return 1; /* if the function exists, then must return here */ + } + } + } + + /* if not has_attrib_id, or not found an ID, or not found the partial name, check using the full name */ + + afunc = (IattribFunc*)iupTableGet(ih->iclass->attrib_func, name); + *inherit = 1; /* default is inheritable */ + if (afunc) + { + *inherit = !(afunc->flags & IUPAF_NO_INHERIT) && !(afunc->flags & IUPAF_NO_STRING); + + if (afunc->flags & IUPAF_READONLY) + { + if (afunc->flags & IUPAF_NO_STRING) + return -1; /* value is NOT a string, can NOT call iupAttribStoreStr */ + return 0; + } + + if (afunc->set && (ih->handle || afunc->flags & IUPAF_NOT_MAPPED)) + { + int ret; + if (!value) + { + /* inheritable attributes when reset must check the parent value */ + if (*inherit && ih->parent) + value = iupAttribGetInherit(ih->parent, name); + + if (!value) + value = iClassGetDefaultValue(afunc); + } + + if (afunc->flags & IUPAF_HAS_ID) + { + IattribSetIdFunc id_set = (IattribSetIdFunc)afunc->set; + return id_set(ih, "", value); /* empty Id */ + } + else + ret = afunc->set(ih, value); + + if (ret == 1 && afunc->flags & IUPAF_NO_STRING) + return -1; /* value is NOT a string, can NOT call iupAttribStoreStr */ + + if (*inherit) + return 1; /* inheritable attributes are always stored in the hash table, */ + else /* to indicate that they are set at the control. */ + return ret; + } + } + + return 1; +} + +char* iupClassObjectGetAttribute(Ihandle* ih, const char* name, char* *def_value, int *inherit) +{ + IattribFunc* afunc; + + if (ih->iclass->has_attrib_id) + { + const char* name_id = iClassFindId(name); + if (name_id) + { + IattribFunc* afunc; + const char* partial_name = iClassCutNameId(name, name_id); + if (!partial_name) + partial_name = "IDVALUE"; /* pure numbers are used as attributes in IupList and IupMatrix, + translate them into IDVALUE. */ + afunc = (IattribFunc*)iupTableGet(ih->iclass->attrib_func, partial_name); + if (afunc) + { + *def_value = NULL; /* id numbered attributes have default value NULL always */ + *inherit = 0; /* id numbered attributes are NON inheritable always */ + + if (afunc->flags & IUPAF_WRITEONLY) + return NULL; + + if (afunc->get && (ih->handle || afunc->flags & IUPAF_NOT_MAPPED)) + { + IattribGetIdFunc id_get = (IattribGetIdFunc)afunc->get; + return id_get(ih, name_id); + } + else + return NULL; /* if the function exists, then must return here */ + } + } + } + + /* if not has_attrib_id, or not found an ID, or not found the partial name, check using the full name */ + + afunc = (IattribFunc*)iupTableGet(ih->iclass->attrib_func, name); + *def_value = NULL; + *inherit = 1; /* default is inheritable */ + if (afunc) + { + *def_value = iClassGetDefaultValue(afunc); + *inherit = !(afunc->flags & IUPAF_NO_INHERIT) && !(afunc->flags & IUPAF_NO_STRING); + + if (afunc->flags & IUPAF_WRITEONLY) + return NULL; + + if (afunc->get && (ih->handle || afunc->flags & IUPAF_NOT_MAPPED)) + { + if (afunc->flags & IUPAF_HAS_ID) + { + IattribGetIdFunc id_get = (IattribGetIdFunc)afunc->get; + return id_get(ih, ""); /* empty Id */ + } + else + return afunc->get(ih); + } + } + return NULL; +} + +void iupClassObjectGetAttributeInfo(Ihandle* ih, const char* name, char* *def_value, int *inherit) +{ + IattribFunc* afunc; + + if (ih->iclass->has_attrib_id) + { + const char* name_id = iClassFindId(name); + if (name_id) + { + IattribFunc* afunc; + const char* partial_name = iClassCutNameId(name, name_id); + if (!partial_name) + partial_name = "IDVALUE"; /* pure numbers are used as attributes in IupList and IupMatrix, + translate them into IDVALUE. */ + afunc = (IattribFunc*)iupTableGet(ih->iclass->attrib_func, partial_name); + if (afunc) + { + *def_value = NULL; /* id numbered attributes have default value NULL always */ + *inherit = 0; /* id numbered attributes are NON inheritable always */ + return; /* if the function exists, then must return here */ + } + } + } + + /* if not has_attrib_id, or not found an ID, or not found the partial name, check using the full name */ + + afunc = (IattribFunc*)iupTableGet(ih->iclass->attrib_func, name); + *def_value = NULL; + *inherit = 1; /* default is inheritable */ + if (afunc) + { + *def_value = iClassGetDefaultValue(afunc); + *inherit = !(afunc->flags & IUPAF_NO_INHERIT) && !(afunc->flags & IUPAF_NO_STRING); + } +} + +int iupClassObjectCurAttribIsInherit(Iclass* ic) +{ + IattribFunc* afunc = (IattribFunc*)iupTableGetCurr(ic->attrib_func); + if (afunc && !(afunc->flags & IUPAF_NO_INHERIT)) + return 1; + return 0; +} + +int iupClassObjectAttribIsNotString(Ihandle* ih, const char* name) +{ + IattribFunc* afunc = (IattribFunc*)iupTableGet(ih->iclass->attrib_func, name); + if (afunc && afunc->flags & IUPAF_NO_STRING) + return 1; + return 0; +} + +void iupClassRegisterAttribute(Iclass* ic, const char* name, + IattribGetFunc _get, IattribSetFunc _set, + const char* _default_value, const char* _system_default, int _flags) +{ + IattribFunc* afunc = (IattribFunc*)iupTableGet(ic->attrib_func, name); + if (afunc) + free(afunc); /* overwrite a previous registration */ + + afunc = (IattribFunc*)malloc(sizeof(IattribFunc)); + afunc->get = _get; + afunc->set = _set; + if (_default_value == IUPAF_SAMEASSYSTEM) + afunc->default_value = _system_default; + else + afunc->default_value = _default_value; + afunc->system_default = _system_default; + afunc->flags = _flags; + + if (iClassIsGlobalDefault(afunc->default_value)) + afunc->call_global_default = 1; + else + afunc->call_global_default = 0; + + iupTableSet(ic->attrib_func, name, (void*)afunc, IUPTABLE_POINTER); +} + +void iupClassRegisterAttributeId(Iclass* ic, const char* name, + IattribGetIdFunc _get, IattribSetIdFunc _set, + int _flags) +{ + IattribFunc* afunc = (IattribFunc*)iupTableGet(ic->attrib_func, name); + if (afunc) + free(afunc); /* overwrite a previous registration */ + + afunc = (IattribFunc*)malloc(sizeof(IattribFunc)); + afunc->get = (IattribGetFunc)_get; + afunc->set = (IattribSetFunc)_set; + afunc->default_value = NULL; + afunc->system_default = NULL; + afunc->flags = _flags|IUPAF_HAS_ID|IUPAF_NO_INHERIT|IUPAF_NO_DEFAULTVALUE; + afunc->call_global_default = 0; + + iupTableSet(ic->attrib_func, name, (void*)afunc, IUPTABLE_POINTER); +} + +void iupClassRegisterGetAttribute(Iclass* ic, const char* name, + IattribGetFunc *_get, IattribSetFunc *_set, + const char* *_default_value, const char* *_system_default, int *_flags) +{ + IattribFunc* afunc = (IattribFunc*)iupTableGet(ic->attrib_func, name); + if (afunc) + { + if (_get) *_get = afunc->get; + if (_set) *_set = afunc->set; + if (_default_value) *_default_value = afunc->default_value; + if (_system_default) *_system_default = afunc->system_default; + if (_flags) *_flags = afunc->flags; + } +} + +void iupClassRegisterCallback(Iclass* ic, const char* name, const char* format) +{ + /* Since attributes and callbacks do not conflict + we can use the same structure to store the callback format using the default_value. */ + iupClassRegisterAttribute(ic, name, NULL, NULL, format, NULL, IUPAF_NO_INHERIT); +} + +char* iupClassCallbackGetFormat(Iclass* ic, const char* name) +{ + IattribFunc* afunc = (IattribFunc*)iupTableGet(ic->attrib_func, name); + if (afunc) + return (char*)afunc->default_value; + return NULL; +} + +int IupGetClassAttributes(const char* classname, char** names, int n) +{ + Iclass* ic; + int i = 0; + char* name; + + iupASSERT(classname!=NULL); + if (!classname) + return 0; + + ic = iupRegisterFindClass(classname); + if (!ic) + return -1; + + if (!names || !n) + return iupTableCount(ic->attrib_func); + + name = iupTableFirst(ic->attrib_func); + while (name) + { + names[i] = name; + i++; + if (i == n) + break; + + name = iupTableNext(ic->attrib_func); + } + + return i; +} + +void IupSetClassDefaultAttribute(const char* classname, const char *name, const char* default_value) +{ + Iclass* ic; + IattribFunc* afunc; + + iupASSERT(classname!=NULL); + if (!classname) + return; + + iupASSERT(name!=NULL); + if (!name) + return; + + ic = iupRegisterFindClass(name); + if (!ic) + return; + + afunc = (IattribFunc*)iupTableGet(ic->attrib_func, name); + if (afunc && (!(afunc->flags & IUPAF_NO_DEFAULTVALUE) || !(afunc->flags & IUPAF_NO_STRING) || !(afunc->flags & IUPAF_HAS_ID))) + { + if (default_value == IUPAF_SAMEASSYSTEM) + afunc->default_value = afunc->system_default; + else + afunc->default_value = default_value; + + if (iClassIsGlobalDefault(afunc->default_value)) + afunc->call_global_default = 1; + else + afunc->call_global_default = 0; + } + else if (default_value) + iupClassRegisterAttribute(ic, name, NULL, NULL, default_value, NULL, IUPAF_DEFAULT); +} + +void IupSaveClassAttributes(Ihandle* ih) +{ + Iclass* ic; + char *name; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + ic = ih->iclass; + + name = iupTableFirst(ic->attrib_func); + while (name) + { + IattribFunc* afunc = (IattribFunc*)iupTableGet(ih->iclass->attrib_func, name); + if (afunc && !(afunc->flags & IUPAF_NO_STRING)) + { + int inherit; + char *def_value; + char *value = iupClassObjectGetAttribute(ih, name, &def_value, &inherit); + if (value && value != iupAttribGet(ih, name)) + iupAttribStoreStr(ih, name, value); + } + + name = iupTableNext(ic->attrib_func); + } +} + +void iupClassObjectEnsureDefaultAttributes(Ihandle* ih) +{ + Iclass* ic; + char *name; + + ic = ih->iclass; + + name = iupTableFirst(ic->attrib_func); + while (name) + { + IattribFunc* afunc = (IattribFunc*)iupTableGetCurr(ic->attrib_func); + if (afunc && afunc->set && (afunc->default_value || afunc->system_default) && + (!(afunc->flags & IUPAF_NO_DEFAULTVALUE) || !(afunc->flags & IUPAF_NO_STRING) || !(afunc->flags & IUPAF_HAS_ID))) + { + if ((!iupStrEqualNoCase(afunc->default_value, afunc->system_default)) || + (afunc->call_global_default && iupGlobalDefaultColorChanged(afunc->default_value))) + { + if ((!ih->handle && (afunc->flags & IUPAF_NOT_MAPPED)) || + (ih->handle && !(afunc->flags & IUPAF_NOT_MAPPED) && !iupAttribGet(ih, name))) + afunc->set(ih, iClassGetDefaultValue(afunc)); + } + } + + name = iupTableNext(ic->attrib_func); + } +} + +char* iupClassGetDefaultAttribute(const char* classname, const char *attrib_name) +{ + Iclass* ic; + IattribFunc* afunc; + + iupASSERT(classname!=NULL); + if (!classname) + return NULL; + + iupASSERT(attrib_name!=NULL); + if (!attrib_name) + return NULL; + + ic = iupRegisterFindClass(classname); + if (!ic) + return NULL; + + afunc = (IattribFunc*)iupTableGet(ic->attrib_func, attrib_name); + if (afunc) + return (char*)afunc->default_value; + else + return NULL; +} diff --git a/iup/src/iup_classbase.c b/iup/src/iup_classbase.c new file mode 100755 index 0000000..9cb9e63 --- /dev/null +++ b/iup/src/iup_classbase.c @@ -0,0 +1,466 @@ +/** \file + * \brief Ihandle Class Base Functions + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_str.h" +#include "iup_attrib.h" +#include "iup_assert.h" + + +void iupBaseCallValueChangedCb(Ihandle* ih) +{ + IFn vc_cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (vc_cb) + vc_cb(ih); +} + +int iupBaseTypeVoidMapMethod(Ihandle* ih) +{ + ih->handle = (InativeHandle*)-1; /* fake value just to indicate that it is already mapped */ + return IUP_NOERROR; +} + +char* iupBaseGetWidAttrib(Ihandle *ih) +{ + return (char*)ih->handle; +} + +void iupBaseUpdateSizeFromFont(Ihandle* ih) +{ + char* value = iupAttribGet(ih, "SIZE"); + if (!value) + return; + + iupBaseSetSizeAttrib(ih, value); +} + +int iupBaseSetSizeAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + ih->userwidth = 0; + ih->userheight = 0; + } + else + { + /* if not specified, the value is 0 */ + int w = 0, h = 0; + int charwidth, charheight; + iupdrvFontGetCharSize(ih, &charwidth, &charheight); + iupStrToIntInt(value, &w, &h, 'x'); + if (w < 0) w = 0; + if (h < 0) h = 0; + + ih->userwidth = iupWIDTH2RASTER(w, charwidth); + ih->userheight = iupHEIGHT2RASTER(h, charheight); + } + return 1; /* always save in the hash table, so when FONT is changed SIZE can be updated */ +} + +char* iupBaseGetSizeAttrib(Ihandle* ih) +{ + char* str; + int charwidth, charheight, width, height; + + if (ih->handle) + { + width = ih->currentwidth; + height = ih->currentheight; + } + else + { + width = ih->userwidth; + height = ih->userheight; + } + + iupdrvFontGetCharSize(ih, &charwidth, &charheight); + if (charwidth == 0 || charheight == 0) + return NULL; /* if font failed get from the hash table */ + + str = iupStrGetMemory(50); + sprintf(str, "%dx%d", iupRASTER2WIDTH(width, charwidth), + iupRASTER2HEIGHT(height, charheight)); + return str; +} + +int iupBaseSetRasterSizeAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + ih->userwidth = 0; + ih->userheight = 0; + } + else + { + /* if not specified, the value is 0 */ + int w = 0, h = 0; + iupStrToIntInt(value, &w, &h, 'x'); + if (w < 0) w = 0; + if (h < 0) h = 0; + ih->userwidth = w; + ih->userheight = h; + } + iupAttribSetStr(ih, "SIZE", NULL); /* clear SIZE in hash table */ + return 0; +} + +char* iupBaseGetRasterSizeAttrib(Ihandle* ih) +{ + char* str; + int width, height; + + if (ih->handle) + { + width = ih->currentwidth; + height = ih->currentheight; + } + else + { + width = ih->userwidth; + height = ih->userheight; + } + + if (!width && !height) + return NULL; + + str = iupStrGetMemory(50); + sprintf(str, "%dx%d", width, height); + return str; +} + +char* iupBaseGetCharSizeAttrib(Ihandle* ih) +{ + char* str; + int charwidth, charheight; + + iupdrvFontGetCharSize(ih, &charwidth, &charheight); + if (charwidth == 0 || charheight == 0) + return NULL; + + str = iupStrGetMemory(50); + sprintf(str, "%dx%d", charwidth, charheight); + return str; +} + +static char* iBaseGetPositionAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(50); + sprintf(str, "%d,%d", ih->x, ih->y); + return str; +} + +static int iBaseSetPositionAttrib(Ihandle* ih, const char* value) +{ + if (ih->is_floating) + iupStrToIntInt(value, &ih->x, &ih->y, ','); + return 0; +} + +char* iupBaseGetActiveAttrib(Ihandle *ih) +{ + if (iupdrvIsActive(ih)) + return "YES"; + else + return "NO"; +} + +static int iBaseNativeParentIsActive(Ihandle* ih) +{ + if (!ih->parent) + return 1; + + if (ih->parent->iclass->nativetype == IUP_TYPEVOID) + return iBaseNativeParentIsActive(ih->parent); + else + return iupdrvIsActive(ih->parent); +} + +int iupBaseSetActiveAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + { + if (iBaseNativeParentIsActive(ih)) + iupdrvSetActive(ih, 1); + } + else + iupdrvSetActive(ih, 0); + return 0; +} + +char* iupBaseGetVisibleAttrib(Ihandle* ih) +{ + if (iupdrvIsVisible(ih)) + return "YES"; + else + return "NO"; +} + +int iupBaseSetVisibleAttrib(Ihandle* ih, const char* value) +{ + iupdrvSetVisible(ih, iupStrBoolean(value)); + return 0; +} + +char* iupBaseNativeParentGetBgColorAttrib(Ihandle* ih) +{ + /* Used only by those who need a transparent background */ + char* color = iupAttribGetInheritNativeParent(ih, "BGCOLOR"); + if (!color) color = iupAttribGetInheritNativeParent(ih, "BACKGROUND"); + if (!color) color = IupGetGlobal("DLGBGCOLOR"); + return color; +} + +char* iupBaseNativeParentGetBgColor(Ihandle* ih) +{ + /* Used in SetBgColorAttrib */ + char* color = iupAttribGetInheritNativeParent(ih, "BGCOLOR"); + if (!color) color = IupGetGlobal("DLGBGCOLOR"); + return color; +} + +int iupBaseGetScrollbar(Ihandle* ih) +{ + int sb = IUP_SB_NONE; /* NO scrollbar by default */ + char* value = IupGetAttribute(ih, "SCROLLBAR"); + if (value) + { + if (iupStrEqualNoCase(value, "YES")) + sb = IUP_SB_HORIZ | IUP_SB_VERT; + else if (iupStrEqualNoCase(value, "HORIZONTAL")) + sb = IUP_SB_HORIZ; + else if (iupStrEqualNoCase(value, "VERTICAL")) + sb = IUP_SB_VERT; + } + return sb; +} + +static int iBaseSetNormalizerGroupAttrib(Ihandle* ih, const char* value) +{ + Ihandle* ih_normalizer = IupGetHandle(value); + if (!ih_normalizer) + { + ih_normalizer = IupNormalizer(NULL); + IupSetHandle(value, ih_normalizer); + } + + IupSetAttribute(ih_normalizer, "ADDCONTROL_HANDLE", (char*)ih); + return 1; +} + +static Ihandle* iBaseFindChild(Ihandle* ih, const char* name) +{ + Ihandle* child = ih->firstchild; + while (child) + { + char* child_name = iupAttribGet(child, "NAME"); + if (child_name && iupStrEqualNoCase(name, child_name)) + return child; + + if (child->firstchild) + { + Ihandle* c = iBaseFindChild(child, name); + if (c) return c; + } + + child = child->brother; + } + return NULL; +} + +Ihandle* IupGetDialogChild(Ihandle* ih, const char* name) +{ + Ihandle *child, *dialog; + char attrib[1024] = "_IUP_DIALOG_CHILD_"; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + if (!name) + return NULL; + + dialog = IupGetDialog(ih); + if (dialog) ih = dialog; + + strcat(attrib, name); + child = (Ihandle*)iupAttribGet(ih, attrib); + if (child) return child; + + if (ih->firstchild) + { + child = iBaseFindChild(ih, name); + if (child) return child; + } + return NULL; +} + +int iupBaseSetNameAttrib(Ihandle* ih, const char* value) +{ + Ihandle* dialog = IupGetDialog(ih); + if (dialog) + { + char attrib[1024] = "_IUP_DIALOG_CHILD_"; + strcat(attrib, value); + iupAttribSetStr(dialog, attrib, (char*)ih); + } + return 1; +} + +static int iBaseSetFloatingAttrib(Ihandle* ih, const char* value) +{ + ih->is_floating = iupStrBoolean(value); + return 0; +} + +static char* iBaseGetFloatingAttrib(Ihandle* ih) +{ + if (ih->is_floating) + return "YES"; + else + return "NO"; +} + +static int iBaseSetMaxSizeAttrib(Ihandle* ih, const char* value) +{ + if (value) + ih->has_maxsize = 1; + else + ih->has_maxsize = 0; + return 1; +} + +static int iBaseSetMinSizeAttrib(Ihandle* ih, const char* value) +{ + if (value) + ih->has_minsize = 1; + else + ih->has_minsize = 0; + return 1; +} + +static int iBaseSetExpandAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "YES")) + ih->expand = IUP_EXPAND_BOTH; + else if (iupStrEqualNoCase(value, "HORIZONTAL")) + ih->expand = IUP_EXPAND_WIDTH; + else if (iupStrEqualNoCase(value, "VERTICAL")) + ih->expand = IUP_EXPAND_HEIGHT; + else + ih->expand = IUP_EXPAND_NONE; + return 0; +} + +static char* iBaseGetExpandAttrib(Ihandle* ih) +{ + if (ih->expand & IUP_EXPAND_BOTH) + return "YES"; + else if (ih->expand & IUP_EXPAND_WIDTH) + return "HORIZONTAL"; + else if (ih->expand & IUP_EXPAND_HEIGHT) + return "VERTICAL"; + else + return "NO"; +} + +void iupBaseContainerUpdateExpand(Ihandle* ih) +{ + char *expand = iupAttribGetInherit(ih, "EXPAND"); + if (!expand) + ih->expand = IUP_EXPAND_BOTH; /* default for containers is YES */ + else + { + if (iupStrEqualNoCase(expand, "NO")) + ih->expand = IUP_EXPAND_NONE; + else if (iupStrEqualNoCase(expand, "HORIZONTAL")) + ih->expand = IUP_EXPAND_WIDTH; + else if (iupStrEqualNoCase(expand, "VERTICAL")) + ih->expand = IUP_EXPAND_HEIGHT; + else + ih->expand = IUP_EXPAND_BOTH; /* default for containers is YES */ + } +} + +/* EXPAND is registered with IUP_NO_INHERIT because it is not inheritable, + but it is inheritable for containers. + So if you set at a container it will not affect its children, + but children that are containers will get the same value. */ +char* iupBaseContainerGetExpandAttrib(Ihandle* ih) +{ + return iupAttribGetInherit(ih, "EXPAND"); +} + +void iupBaseRegisterCommonAttrib(Iclass* ic) +{ + iupClassRegisterAttribute(ic, "WID", iupBaseGetWidAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "NAME", NULL, iupBaseSetNameAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FLOATING", iBaseGetFloatingAttrib, iBaseSetFloatingAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "EXPAND", iBaseGetExpandAttrib, iBaseSetExpandAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NORMALIZERGROUP", NULL, iBaseSetNormalizerGroupAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* make sure everyone has the correct default value */ + iupClassRegisterAttribute(ic, "VISIBLE", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "ACTIVE", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + if (ic->is_interactive) + iupClassRegisterAttribute(ic, "CANFOCUS", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + else + iupClassRegisterAttribute(ic, "CANFOCUS", NULL, NULL, IUPAF_SAMEASSYSTEM, "NO", IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "SIZE", iupBaseGetSizeAttrib, iupBaseSetSizeAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RASTERSIZE", iupBaseGetRasterSizeAttrib, iupBaseSetRasterSizeAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CHARSIZE", iupBaseGetCharSizeAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "POSITION", iBaseGetPositionAttrib, iBaseSetPositionAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MAXSIZE", NULL, iBaseSetMaxSizeAttrib, IUPAF_SAMEASSYSTEM, "65535x65535", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MINSIZE", NULL, iBaseSetMinSizeAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, iupdrvSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); /* use inheritance to retrieve standard fonts */ + iupClassRegisterAttribute(ic, "FONT", iupGetFontAttrib, iupSetFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "FONTSTYLE", iupGetFontStyleAttrib, iupSetFontStyleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FONTSIZE", iupGetFontSizeAttrib, iupSetFontSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FONTFACE", iupGetFontFaceAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupdrvBaseRegisterCommonAttrib(ic); +} + +void iupBaseRegisterVisualAttrib(Iclass* ic) +{ + iupClassRegisterAttribute(ic, "VISIBLE", iupBaseGetVisibleAttrib, iupBaseSetVisibleAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); /* VISIBLE inheritance comes from the native system */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iupBaseSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + + iupClassRegisterAttribute(ic, "ZORDER", NULL, iupdrvBaseSetZorderAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "X", iupdrvBaseGetXAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "Y", iupdrvBaseGetYAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "TIP", NULL, iupdrvBaseSetTipAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TIPVISIBLE", NULL, iupdrvBaseSetTipVisibleAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TIPDELAY", NULL, NULL, IUPAF_SAMEASSYSTEM, "5000", IUPAF_NOT_MAPPED); /* 5 seconds */ + iupClassRegisterAttribute(ic, "TIPBGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "255 255 225", IUPAF_NOT_MAPPED); /* Light Yellow */ + iupClassRegisterAttribute(ic, "TIPFGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "0 0 0", IUPAF_NOT_MAPPED); /* black */ +} + +void iupBaseRegisterCommonCallbacks(Iclass* ic) +{ + iupClassRegisterAttribute(ic, "MAP_CB", NULL, NULL, "", NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "UNMAP_CB", NULL, NULL, "", NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "GETFOCUS_CB", NULL, NULL, "", NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "KILLFOCUS_CB", NULL, NULL, "", NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ENTERWINDOW_CB", NULL, NULL, "", NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "LEAVEWINDOW_CB", NULL, NULL, "", NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "HELP_CB", NULL, NULL, "", NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "K_ANY", NULL, NULL, "i", NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/iup_classbase.h b/iup/src/iup_classbase.h new file mode 100755 index 0000000..1ced9c6 --- /dev/null +++ b/iup/src/iup_classbase.h @@ -0,0 +1,175 @@ +/** \file + * \brief Base Class + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_CLASSBASE_H +#define __IUP_CLASSBASE_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup iclassbase Base Class + * \par + * See \ref iup_classbase.h + * \ingroup iclass + */ + + +/** Register all common base attributes: \n + * WID \n + * SIZE, RASTERSIZE, POSITION \n + * FONT (and derived) \n\n + * All controls that are positioned inside a dialog must register all common base attributes. + * \ingroup iclassbase */ +void iupBaseRegisterCommonAttrib(Iclass* ic); + +/** Register all visual base attributes: \n + * VISIBLE, ACTIVE \n + * ZORDER, X, Y \n + * TIP (and derived) \n\n + * All controls that are positioned inside a dialog must register all visual base attributes. + * \ingroup iclassbase */ +void iupBaseRegisterVisualAttrib(Iclass* ic); + +/** Register all common callbacks: \n +* MAP_CB, UNMAP_CB, GETFOCUS_CB, KILLFOCUS_CB, ENTERWINDOW_CB, LEAVEWINDOW_CB, K_ANY, HELP_CB. +* \ingroup iclassbase */ +void iupBaseRegisterCommonCallbacks(Iclass* ic); + +/* Register driver dependent common attributes. + Used only from iupBaseRegisterCommonAttrib */ +void iupdrvBaseRegisterCommonAttrib(Iclass* ic); + +/** Updates the expand member of the IUP object from the EXPAND attribute. + * Should be called in the beginning of the ComputeNaturalSize for a container. + * \ingroup iclassbase */ +void iupBaseContainerUpdateExpand(Ihandle* ih); + +/** Initializes the natural size using the user size, then + * if a container then update the "expand" member from the EXPAND attribute, then + * call \ref iupClassObjectComputeNaturalSize for containers if they have children or + * call \ref iupClassObjectComputeNaturalSize for non-containers if user size is not defined. + * Must be called for each children in the container. \n + * First call is in iupLayoutCompute. + * \ingroup iclassbase */ +void iupBaseComputeNaturalSize(Ihandle* ih); + +/** Update the current size from the available size, the natural size, expand and shrink. + * Call \ref iupClassObjectSetChildrenCurrentSize for containers if they have children. + * Must be called for each children in the container. \n + * First call is in iupLayoutCompute. + * \ingroup iclassbase */ +void iupBaseSetCurrentSize(Ihandle* ih, int w, int h, int shrink); + +/** Set the current position and update children position for containers. + * Call \ref iupClassObjectSetChildrenPosition for containers if they have children. + * Must be called for each children in the container. \n + * First call is in iupLayoutCompute. + * \ingroup iclassbase */ +void iupBaseSetPosition(Ihandle* ih, int x, int y); + +/* Updates the SIZE attribute if defined. + Called only from iupdrvSetStandardFontAttrib. */ +void iupBaseUpdateSizeFromFont(Ihandle* ih); + + +/** \defgroup iclassbasemethod Base Class Methods + * \par + * See \ref iup_classbase.h + * \ingroup iclassbase + */ + +/** Driver dependent \ref Iclass::LayoutUpdate method. + * \ingroup iclassbasemethod */ +void iupdrvBaseLayoutUpdateMethod(Ihandle *ih); + +/** Driver dependent \ref Iclass::UnMap method. + * \ingroup iclassbasemethod */ +void iupdrvBaseUnMapMethod(Ihandle* ih); + +/** Native type void \ref Iclass::Map method. + * \ingroup iclassbasemethod */ +int iupBaseTypeVoidMapMethod(Ihandle* ih); + + +/** \defgroup iclassbaseattribfunc Base Class Attribute Functions + * \par + * Used by the controls for iupClassRegisterAttribute. + * \par + * See \ref iup_classbase.h + * \ingroup iclassbase + * @{ + */ + +/* common */ +char* iupBaseGetWidAttrib(Ihandle* ih); +int iupBaseSetNameAttrib(Ihandle* ih, const char* value); +int iupBaseSetRasterSizeAttrib(Ihandle* ih, const char* value); +int iupBaseSetSizeAttrib(Ihandle* ih, const char* value); +char* iupBaseGetSizeAttrib(Ihandle* ih); +char* iupBaseGetRasterSizeAttrib(Ihandle* ih); + +/* visual */ +char* iupBaseGetVisibleAttrib(Ihandle* ih); +int iupBaseSetVisibleAttrib(Ihandle* ih, const char* value); +char* iupBaseGetActiveAttrib(Ihandle *ih); +int iupBaseSetActiveAttrib(Ihandle* ih, const char* value); +int iupdrvBaseSetZorderAttrib(Ihandle* ih, const char* value); +char *iupdrvBaseGetXAttrib(Ihandle *ih); +char *iupdrvBaseGetYAttrib(Ihandle *ih); +int iupdrvBaseSetTipAttrib(Ihandle* ih, const char* value); +int iupdrvBaseSetTipVisibleAttrib(Ihandle* ih, const char* value); +int iupdrvBaseSetBgColorAttrib(Ihandle* ih, const char* value); +int iupdrvBaseSetFgColorAttrib(Ihandle* ih, const char* value); +char* iupBaseNativeParentGetBgColorAttrib(Ihandle* ih); + +/* other */ +char* iupBaseContainerGetExpandAttrib(Ihandle* ih); +int iupdrvBaseSetCursorAttrib(Ihandle* ih, const char* value); +char* iupdrvBaseGetClientSizeAttrib(Ihandle* ih); + +/* Windows Only */ +char* iupdrvBaseGetTitleAttrib(Ihandle* ih); +int iupdrvBaseSetTitleAttrib(Ihandle* ih, const char* value); + +/** @} */ + + + +/** \defgroup iclassbaseutil Base Class Utilities + * \par + * See \ref iup_classbase.h + * \ingroup iclassbase + * @{ + */ + +#define iupMAX(_a,_b) ((_a)>(_b)?(_a):(_b)) +#define iupROUND(_x) ((int)((_x)>0? (_x)+0.5: (_x)-0.5)) + +#define iupCOLOR8TO16(_x) ((unsigned short)(_x*257)) /* 65535/255 = 257 */ +#define iupCOLOR16TO8(_x) ((unsigned char)(_x/257)) + +#define iupBYTECROP(_x) ((unsigned char)((_x)<0?0:((_x)>255)?255:(_x))) + +enum{IUP_ALIGN_ALEFT, IUP_ALIGN_ACENTER, IUP_ALIGN_ARIGHT}; +#define IUP_ALIGN_ABOTTOM IUP_ALIGN_ARIGHT +#define IUP_ALIGN_ATOP IUP_ALIGN_ALEFT + +enum{IUP_SB_NONE, IUP_SB_HORIZ, IUP_SB_VERT}; +int iupBaseGetScrollbar(Ihandle* ih); + +char* iupBaseNativeParentGetBgColor(Ihandle* ih); +void iupBaseCallValueChangedCb(Ihandle* ih); + +/** @} */ + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_colordlg.c b/iup/src/iup_colordlg.c new file mode 100755 index 0000000..d3835cd --- /dev/null +++ b/iup/src/iup_colordlg.c @@ -0,0 +1,44 @@ +/** \file + * \brief IupColorDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" + + +Ihandle* IupColorDlg(void) +{ + return IupCreate("colordlg"); +} + +Iclass* iupColorDlgGetClass(void) +{ + Iclass* ic = iupClassNew(iupDialogGetClass()); + + ic->name = "colordlg"; + ic->nativetype = IUP_TYPEDIALOG; + ic->is_interactive = 1; + + /* reset not used native dialog methods */ + ic->parent->LayoutUpdate = NULL; + ic->parent->SetChildrenPosition = NULL; + ic->parent->Map = NULL; + ic->parent->UnMap = NULL; + + iupdrvColorDlgInitClass(ic); + + return ic; +} diff --git a/iup/src/iup_dialog.c b/iup/src/iup_dialog.c new file mode 100755 index 0000000..d70e12c --- /dev/null +++ b/iup/src/iup_dialog.c @@ -0,0 +1,747 @@ +/** \file + * \brief IupDialog class + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_class.h" +#include "iup_object.h" +#include "iup_dlglist.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_drv.h" +#include "iup_drvinfo.h" +#include "iup_drvfont.h" +#include "iup_focus.h" +#include "iup_str.h" +#define _IUPDLG_PRIVATE +#include "iup_dialog.h" + + +static int dlg_popup_level = 1; + +InativeHandle* iupDialogGetNativeParent(Ihandle* ih) +{ + Ihandle* parent = IupGetAttributeHandle(ih, "PARENTDIALOG"); + if (parent && parent->handle) + return parent->handle; + else + return (InativeHandle*)iupAttribGet(ih, "NATIVEPARENT"); +} + +static void iupDialogAdjustPos(Ihandle *ih, int *x, int *y) +{ + int cursor_x = 0, cursor_y = 0; + int screen_width = 0, screen_height = 0; + int current_x = 0, current_y = 0; + int parent_x = 0, parent_y = 0; + + /* the dialog is already mapped here */ + + if (*x == IUP_CURRENT || *y == IUP_CURRENT) + { + /* if first time, there is no current position */ + if (!ih->data->first_show) + { + int center = IUP_CENTER; + InativeHandle* parent = iupDialogGetNativeParent(ih); + if (parent) + center = IUP_CENTERPARENT; + + if (*x == IUP_CURRENT) *x = center; + if (*y == IUP_CURRENT) *y = center; + } + else + iupdrvDialogGetPosition(ih->handle, ¤t_x, ¤t_y); + } + + if (*x == IUP_CENTER || *y == IUP_CENTER || + *x == IUP_RIGHT || *y == IUP_RIGHT || + *x == IUP_CENTERPARENT || *y == IUP_CENTERPARENT) + iupdrvGetScreenSize(&screen_width, &screen_height); + + if (*x == IUP_CENTERPARENT || *y == IUP_CENTERPARENT) + { + InativeHandle* parent = iupDialogGetNativeParent(ih); + if (parent) + { + iupdrvDialogGetPosition(parent, &parent_x, &parent_y); + + if (*x == IUP_CENTERPARENT && *y == IUP_CENTERPARENT) + iupdrvDialogGetSize(parent, &screen_width, &screen_height); + else if (*x == IUP_CENTERPARENT) + iupdrvDialogGetSize(parent, &screen_width, NULL); + else if (*y == IUP_CENTERPARENT) + iupdrvDialogGetSize(parent, NULL, &screen_height); + } + } + + if (*x == IUP_MOUSEPOS || *y == IUP_MOUSEPOS) + iupdrvGetCursorPos(&cursor_x, &cursor_y); + + if (iupAttribGetBoolean(ih, "MDICHILD")) + { + Ihandle* client = (Ihandle*)iupAttribGet(ih, "MDICLIENT_HANDLE"); + if (client) + { + /* position is relative to mdi client */ + parent_x = 0; + parent_y = 0; + + /* screen size is now the size of the mdi client */ + screen_width = client->currentwidth; + screen_height = client->currentheight; + + iupdrvScreenToClient(client, ¤t_x, ¤t_y); + iupdrvScreenToClient(client, &cursor_x, &cursor_y); + } + } + + switch (*x) + { + case IUP_CENTERPARENT: + *x = (screen_width - ih->currentwidth)/2 + parent_x; + break; + case IUP_CENTER: + *x = (screen_width - ih->currentwidth)/2; + break; + case IUP_LEFT: + *x = 0; + break; + case IUP_RIGHT: + *x = screen_width - ih->currentwidth; + break; + case IUP_MOUSEPOS: + *x = cursor_x; + break; + case IUP_CURRENT: + *x = current_x; + break; + } + + switch (*y) + { + case IUP_CENTERPARENT: + *y = (screen_height - ih->currentheight)/2 + parent_y; + break; + case IUP_CENTER: + *y = (screen_height - ih->currentheight)/2; + break; + case IUP_LEFT: + *y = 0; + break; + case IUP_RIGHT: + *y = screen_height - ih->currentheight; + break; + case IUP_MOUSEPOS: + *y = cursor_y; + break; + case IUP_CURRENT: + *y = current_y; + break; + } +} + +static void iDialogSetModal(Ihandle* ih_popup) +{ + Ihandle *ih; + iupAttribSetStr(ih_popup, "MODAL", "YES"); + + /* disable all visible dialogs, and mark popup level */ + for (ih = iupDlgListFirst(); ih; ih = iupDlgListNext()) + { + if (ih != ih_popup && + ih->handle && + iupdrvDialogIsVisible(ih) && + ih->data->popup_level == 0) + { + iupdrvSetActive(ih, 0); + ih->data->popup_level = dlg_popup_level; + } + } + + dlg_popup_level++; +} + +static void iDialogUnSetModal(Ihandle* ih_popup) +{ + Ihandle *ih; + if (!iupAttribGetBoolean(ih_popup, "MODAL")) + return; + + iupAttribSetStr(ih_popup, "MODAL", NULL); + + /* must enable all visible dialogs at the marked popup level */ + for (ih = iupDlgListFirst(); ih; ih = iupDlgListNext()) + { + if (ih->handle) + { + if (ih->data->popup_level == dlg_popup_level-1) + { + iupdrvSetActive(ih, 1); + ih->data->popup_level = 0; + } + } + } + + dlg_popup_level--; +} + +static int iDialogCreateMethod(Ihandle* ih, void** params) +{ + ih->data = iupALLOCCTRLDATA(); + + ih->data->child_id = 100; /* initial number */ + ih->data->show_state = IUP_HIDE; + + if (params) + { + Ihandle** iparams = (Ihandle**)params; + if (*iparams) + IupAppend(ih, *iparams); + } + + iupDlgListAdd(ih); + + return IUP_NOERROR; +} + +static void iDialogDestroyMethod(Ihandle* ih) +{ + iupDlgListRemove(ih); +} + +static void iDialogComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int decorwidth, decorheight; + Ihandle* child = ih->firstchild; + + iupDialogGetDecorSize(ih, &decorwidth, &decorheight); + *w = decorwidth; + *h = decorheight; + + if (child) + { + /* update child natural size first */ + iupBaseComputeNaturalSize(child); + + *expand = child->expand; + *w += child->naturalwidth; + *h += child->naturalheight; + } +} + +static void iDialogSetChildrenCurrentSizeMethod(Ihandle* ih, int shrink) +{ + int decorwidth, decorheight, client_width, client_height; + + if (shrink) + { + client_width = ih->currentwidth; + client_height = ih->currentheight; + } + else + { + client_width = iupMAX(ih->naturalwidth, ih->currentwidth); + client_height = iupMAX(ih->naturalheight, ih->currentheight); + } + + iupDialogGetDecorSize(ih, &decorwidth, &decorheight); + + client_width -= decorwidth; + client_height -= decorheight; + if (client_width < 0) client_width = 0; + if (client_height < 0) client_height = 0; + + iupBaseSetCurrentSize(ih->firstchild, client_width, client_height, shrink); +} + +static void iDialogSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + (void)x; + (void)y; + + /* Child coordinates are relative to client left-top corner. */ + iupBaseSetPosition(ih->firstchild, 0, 0); +} + +static void iDialogAfterShow(Ihandle* ih) +{ + Ihandle* old_focus; + IFni show_cb; + + /* process all pending messages */ + IupFlush(); + + old_focus = IupGetFocus(); + + show_cb = (IFni)IupGetCallback(ih, "SHOW_CB"); + if (show_cb && show_cb(ih, ih->data->show_state) == IUP_CLOSE) + { + IupExitLoop(); + return; + } + + if (ih->data->show_state == IUP_SHOW) + { + if (show_cb) + IupFlush(); /* again to update focus */ + + /* do it only if show_cb did NOT changed the current focus */ + if (old_focus == IupGetFocus()) + { + Ihandle *startfocus = IupGetAttributeHandle(ih, "STARTFOCUS"); + if (startfocus) + IupSetFocus(startfocus); + else + IupNextField(ih); + } + } +} + +int iupDialogGetChildId(Ihandle* ih) +{ + int id; + ih = IupGetDialog(ih); + if (!ih) return -1; + id = ih->data->child_id; + ih->data->child_id = id+1; + return id; +} + +char* iupDialogGetChildIdStr(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + Ihandle* dialog = IupGetDialog(ih); + sprintf(str, "iup-%s-%d", ih->iclass->name, dialog->data->child_id); + return str; +} + +int iupDialogPopup(Ihandle* ih, int x, int y) +{ + int was_visible; + + int ret = iupClassObjectDlgPopup(ih, x, y); + if (ret != IUP_INVALID) /* IUP_INVALID means it is not implemented */ + return ret; + + ih->data->show_state = IUP_SHOW; + + /* save visible state before iupdrvDialogSetPlacement */ + /* because it can also show the window when changing placement. */ + was_visible = iupdrvDialogIsVisible(ih); + + /* Update the position and placement */ + if (!iupdrvDialogSetPlacement(ih)) + { + iupDialogAdjustPos(ih, &x, &y); + iupdrvDialogSetPosition(ih, x, y); + } + + if (was_visible) /* already visible */ + { + /* only re-show to raise the window */ + iupdrvDialogSetVisible(ih, 1); + + /* flush, then process show_cb and startfocus */ + iDialogAfterShow(ih); + return IUP_NOERROR; + } + + if (iupAttribGetBoolean(ih, "MODAL")) /* already a popup */ + return IUP_NOERROR; + + iDialogSetModal(ih); + + ih->data->first_show = 1; + + /* actually show the window */ + /* test if placement turn the dialog visible */ + if (!iupdrvDialogIsVisible(ih)) + iupdrvDialogSetVisible(ih, 1); + + /* increment visible count */ + iupDlgListVisibleInc(); + + /* flush, then process show_cb and startfocus */ + iDialogAfterShow(ih); + + /* interrupt processing here */ + IupMainLoop(); + + /* if window is still valid (IupDestroy not called), + hide the dialog if still visible. */ + if (iupObjectCheck(ih)) + { + iDialogUnSetModal(ih); + IupHide(ih); + } + + return IUP_NOERROR; +} + +int iupDialogShowXY(Ihandle* ih, int x, int y) +{ + int was_visible; + + /* Calling IupShow for a visible dialog shown with IupPopup does nothing. */ + if (iupAttribGetBoolean(ih, "MODAL")) /* already a popup */ + return IUP_NOERROR; + + if (ih->data->popup_level != 0) + { + /* was disabled by a Popup, re-enable it */ + iupdrvSetActive(ih, 1); + ih->data->popup_level = 0; /* Now it is at the current popup level */ + } + + /* save visible state before iupdrvDialogSetPlacement */ + /* because it can also show the window when changing placement. */ + was_visible = iupdrvDialogIsVisible(ih); + + /* Update the position and placement */ + if (!iupdrvDialogSetPlacement(ih)) + { + iupDialogAdjustPos(ih, &x, &y); + iupdrvDialogSetPosition(ih, x, y); + } + + if (was_visible) /* already visible */ + { + /* only re-show to raise the window */ + iupdrvDialogSetVisible(ih, 1); + + /* flush, then process show_cb and startfocus */ + iDialogAfterShow(ih); + return IUP_NOERROR; + } + + ih->data->first_show = 1; + + /* actually show the window */ + /* test if placement turn the dialog visible */ + if (!iupdrvDialogIsVisible(ih)) + iupdrvDialogSetVisible(ih, 1); + + /* increment visible count */ + iupDlgListVisibleInc(); + + /* flush, then process show_cb and startfocus */ + iDialogAfterShow(ih); + + return IUP_NOERROR; +} + +void iupDialogHide(Ihandle* ih) +{ + /* hidden at the system and marked hidden in IUP */ + if (!iupdrvDialogIsVisible(ih) && ih->data->show_state == IUP_HIDE) + return; + + /* marked hidden in IUP */ + ih->data->show_state = IUP_HIDE; + + /* if called IupHide for a Popup window */ + if (iupAttribGetBoolean(ih, "MODAL")) + { + iDialogUnSetModal(ih); + IupExitLoop(); + } + + ih->data->ignore_resize = 1; + + /* actually hide the window */ + iupdrvDialogSetVisible(ih, 0); + + ih->data->ignore_resize = 0; + + /* decrement visible count */ + iupDlgListVisibleDec(); + + if (iupDlgListVisibleCount() <= 0) + { + /* if this is the last window visible, + exit message loop except when LOCKLOOP==YES */ + if (!iupStrBoolean(IupGetGlobal("LOCKLOOP"))) + IupExitLoop(); + } + + /* flush, then process show_cb and startfocus */ + iDialogAfterShow(ih); +} + + +/****************************************************************/ + + +static int iDialogSizeGetScale(const char* sz) +{ + if (!sz || sz[0] == 0) return 0; + if (iupStrEqualNoCase(sz, "FULL")) return 1; + if (iupStrEqualNoCase(sz, "HALF")) return 2; + if (iupStrEqualNoCase(sz, "THIRD")) return 3; + if (iupStrEqualNoCase(sz, "QUARTER")) return 4; + if (iupStrEqualNoCase(sz, "EIGHTH")) return 8; + return 0; +} + +static int iDialogSetSizeAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + ih->userwidth = 0; + ih->userheight = 0; + } + else + { + char *sh, sw[40]; + strcpy(sw, value); + sh = strchr(sw, 'x'); + if (!sh) + sh = ""; + else + { + *sh = '\0'; /* to mark the end of sw */ + ++sh; + } + + { + int charwidth, charheight; + int screen_width, screen_height; + int wscale = iDialogSizeGetScale(sw); + int hscale = iDialogSizeGetScale(sh); + + int width = 0, height = 0; + iupStrToIntInt(value, &width, &height, 'x'); + if (width < 0) width = 0; + if (height < 0) height = 0; + + iupdrvFontGetCharSize(ih, &charwidth, &charheight); + + /* desktop size, excluding task bars and menu bars */ + iupdrvGetScreenSize(&screen_width, &screen_height); + + if (wscale) + width = screen_width/wscale; + else + width = iupWIDTH2RASTER(width, charwidth); + + if (hscale) + height = screen_height/hscale; + else + height = iupHEIGHT2RASTER(height, charheight); + + ih->userwidth = width; + ih->userheight = height; + } + } + + /* must reset the current size, */ + /* so the user or the natural size will be used to resize the dialog */ + ih->currentwidth = 0; + ih->currentheight = 0; + + return 0; +} + +static int iDialogSetRasterSizeAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + ih->userwidth = 0; + ih->userheight = 0; + } + else + { + int w = 0, h = 0; + iupStrToIntInt(value, &w, &h, 'x'); + if (w < 0) w = 0; + if (h < 0) h = 0; + ih->userwidth = w; + ih->userheight = h; + } + + /* must reset the current size also, */ + /* so the user or the natural size will be used to resize the dialog */ + ih->currentwidth = 0; + ih->currentheight = 0; + + return 0; +} + +static int iDialogSetVisibleAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + IupShow(ih); + else + IupHide(ih); + return 0; +} + +void iupDialogUpdatePosition(Ihandle* ih) +{ + /* Used by pre-defined popup native dialogs */ + int x = iupAttribGetInt(ih, "_IUPDLG_X"); + int y = iupAttribGetInt(ih, "_IUPDLG_Y"); + iupdrvDialogUpdateSize(ih); + /* handle always as visible for the first time */ + ih->data->first_show = 0; + iupDialogAdjustPos(ih, &x, &y); + iupdrvDialogSetPosition(ih, x, y); +} + +void iupDialogGetDecorSize(Ihandle* ih, int *decorwidth, int *decorheight) +{ + int border, caption, menu; + iupdrvDialogGetDecoration(ih, &border, &caption, &menu); + + *decorwidth = 2*border; + *decorheight = 2*border + caption + menu; +} + +static int iDialogSetHideTaskbarAttrib(Ihandle *ih, const char *value) +{ + iupdrvDialogSetVisible(ih, !iupStrBoolean(value)); + return 0; +} + +static int iDialogSetMenuAttrib(Ihandle* ih, const char* value) +{ + if (!ih->handle) + { + Ihandle* menu = IupGetHandle(value); + ih->data->menu = menu; + return 1; + } + + if (!value) + { + if (ih->data->menu && ih->data->menu->handle) + { + ih->data->ignore_resize = 1; + IupUnmap(ih->data->menu); /* this will remove the menu from the dialog */ + ih->data->ignore_resize = 0; + + ih->data->menu = NULL; + } + } + else + { + Ihandle* menu = IupGetHandle(value); + if (!menu || menu->iclass->nativetype != IUP_TYPEMENU || menu->parent) + return 0; + + /* already the current menu and it is mapped */ + if (ih->data->menu && ih->data->menu==menu && menu->handle) + return 1; + + /* the current menu is mapped, so unmap it */ + if (ih->data->menu && ih->data->menu->handle && ih->data->menu!=menu) + { + ih->data->ignore_resize = 1; + IupUnmap(ih->data->menu); /* this will remove the menu from the dialog */ + ih->data->ignore_resize = 0; + } + + ih->data->menu = menu; + + menu->parent = ih; /* use this to create a menu bar instead of a popup menu */ + + ih->data->ignore_resize = 1; + IupMap(menu); /* this will automatically add the menu to the dialog */ + ih->data->ignore_resize = 0; + } + return 1; +} + + +/****************************************************************/ + + +Ihandle* IupDialog(Ihandle* child) +{ + void *params[2]; + params[0] = child; + params[1] = NULL; + return IupCreatev("dialog", params); +} + +Iclass* iupDialogGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "dialog"; + ic->format = "H"; /* one optional ihandle */ + ic->nativetype = IUP_TYPEDIALOG; + ic->childtype = IUP_CHILD_ONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iDialogCreateMethod; + ic->Destroy = iDialogDestroyMethod; + ic->ComputeNaturalSize = iDialogComputeNaturalSizeMethod; + ic->SetChildrenCurrentSize = iDialogSetChildrenCurrentSizeMethod; + ic->SetChildrenPosition = iDialogSetChildrenPositionMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "SHOW_CB", "i"); + iupClassRegisterCallback(ic, "DROPFILES_CB", "siii"); + iupClassRegisterCallback(ic, "RESIZE_CB", "ii"); + iupClassRegisterCallback(ic, "CLOSE_CB", ""); + + /* Common Callbacks */ + iupBaseRegisterCommonCallbacks(ic); + + /* Attribute functions */ + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Overwrite Common */ + iupClassRegisterAttribute(ic, "SIZE", iupBaseGetSizeAttrib, iDialogSetSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RASTERSIZE", iupBaseGetRasterSizeAttrib, iDialogSetRasterSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "POSITION", NULL, NULL, NULL, NULL, IUPAF_WRITEONLY|IUPAF_READONLY|IUPAF_NO_INHERIT); /* forbidden in dialog */ + + /* Base Container */ + iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "VISIBLE", iupBaseGetVisibleAttrib, iDialogSetVisibleAttrib, IUPAF_SAMEASSYSTEM, "NO", IUPAF_NO_INHERIT); /* the only case where VISIBLE default is NO */ + + /* IupDialog only */ + iupClassRegisterAttribute(ic, "MENU", NULL, iDialogSetMenuAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CURSOR", NULL, iupdrvBaseSetCursorAttrib, IUPAF_SAMEASSYSTEM, "ARROW", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "HIDETASKBAR", NULL, iDialogSetHideTaskbarAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MAXBOX", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MENUBOX", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MINBOX", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RESIZE", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "BORDER", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "DEFAULTENTER", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DEFAULTESC", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DIALOGFRAME", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PARENTDIALOG", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHRINK", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "STARTFOCUS", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MODAL", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PLACEMENT", NULL, NULL, "NORMAL", NULL, IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "NATIVEPARENT", NULL, NULL, NULL, NULL, IUPAF_NO_STRING); + + iupdrvDialogInitClass(ic); + + return ic; +} diff --git a/iup/src/iup_dialog.h b/iup/src/iup_dialog.h new file mode 100755 index 0000000..a127111 --- /dev/null +++ b/iup/src/iup_dialog.h @@ -0,0 +1,89 @@ +/** \file + * \brief Dialog Public and Private Declarations + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_DIALOG_H +#define __IUP_DIALOG_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* PUBLIC */ + +/* Shows the dialog in the given position and disable interaction with other dialogs. + * The element must be already mapped. + * Must return IUP_ERROR or IUP_NOERROR. + * Called only from IupPopup. */ +int iupDialogPopup(Ihandle* ih, int x, int y); + +/* Shows the dialog in the given position. + * The dialog must be already mapped. + * Must return IUP_ERROR or IUP_NOERROR. + * Called only from IupShow and IupShowXY. */ +int iupDialogShowXY(Ihandle* ih, int x, int y); + +/* Hides the dialog. + * Called only from IupHide. */ +void iupDialogHide(Ihandle* ih); + +/* Returns a unique number to be as child id. */ +int iupDialogGetChildId(Ihandle* ih); +char* iupDialogGetChildIdStr(Ihandle* ih); + +/* Returns the size of the decoration */ +void iupdrvDialogGetDecoration(Ihandle* ih, int *border, int *caption, int *menu); + +/* Returns the native parent. Can be PARENTDIALOG or NATIVEPARENT attributes. Parent must be mapped. */ +InativeHandle* iupDialogGetNativeParent(Ihandle* ih); + +/* Updates the dialog initial position from internal attributes. + Used mostly by the native pre-defined dialogs. */ +void iupDialogUpdatePosition(Ihandle* ih); + + +/*********************************************************************/ + /* PRIVATE */ +/*********************************************************************/ + +#ifdef _IUPDLG_PRIVATE + +/* retrieve the decorations size that offsets the window size of the client size. */ +void iupDialogGetDecorSize(Ihandle* ih, int *decorwidth, int *decorheight); + +struct _IcontrolData +{ + int show_state, /* save the state to be used used in SHOW_CB */ + first_show, /* boolean flag to indicate that the dialog was shown for the first time */ + ignore_resize, /* flag to ignore the next resize */ + popup_level, /* popup level of the dialog if IupPopup used */ + child_id, /* serial number used by child controls */ + cmd_show; /* parameters for ShowWindow in Windows driver */ + Ihandle* menu; +}; + + +/******************************/ +/* Driver dependent functions */ +/******************************/ + +void iupdrvDialogInitClass(Iclass* iclass); + +void iupdrvDialogGetPosition(InativeHandle* handle, int *x, int *y); +void iupdrvDialogSetVisible(Ihandle* ih, int visible); +int iupdrvDialogSetPlacement(Ihandle* ih); +void iupdrvDialogSetPosition(Ihandle *ih, int x, int y); +void iupdrvDialogUpdateSize(Ihandle* ih); +void iupdrvDialogGetSize(InativeHandle* handle, int *w, int *h); +int iupdrvDialogIsVisible(Ihandle* ih); + +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_dlglist.c b/iup/src/iup_dlglist.c new file mode 100755 index 0000000..c385b50 --- /dev/null +++ b/iup/src/iup_dlglist.c @@ -0,0 +1,130 @@ +/** \file + * \brief list of all created dialogs + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" + +#include "iup_dlglist.h" +#include "iup_object.h" +#include "iup_assert.h" + + +typedef struct Idiallst_ +{ + Ihandle *ih; + struct Idiallst_ *next; +} Idiallst; + +static Idiallst *idlglist = NULL; /* list of all created dialogs */ +static int idlg_count = 0; + +void iupDlgListAdd(Ihandle *ih) +{ + if (ih) + { + Idiallst *p=(Idiallst *)malloc(sizeof(Idiallst)); + if (!p) + return; + p->ih = ih; + p->next = idlglist; + idlglist = p; + idlg_count++; + } +} + +void iupDlgListRemove(Ihandle *ih) +{ + if (!idlglist || !ih) + return; + + if (idlglist->ih == ih) /* ih is header */ + { + Idiallst *p = idlglist->next; + free(idlglist); + idlglist = p; + idlg_count--; + } + else + { + Idiallst *p; /* current pointer */ + Idiallst *b; /* before pointer */ + for (b = idlglist, p = idlglist->next; p; b = p, p = p->next) + { + if (p->ih == ih) + { + b->next = p->next; + free (p); + idlg_count--; + return; + } + } + } +} + +static Idiallst *idlg_first = NULL; + +Ihandle *iupDlgListFirst (void) +{ + idlg_first = idlglist; + return iupDlgListNext(); +} + +Ihandle *iupDlgListNext (void) +{ + Ihandle *ih = NULL; + if (idlg_first) + { + ih = idlg_first->ih; + idlg_first = idlg_first->next; + } + return ih; +} + +static int idlg_nvisiblewin = 0; + +void iupDlgListVisibleInc(void) +{ + iupASSERT(idlg_nvisiblewin < idlg_count); + if (idlg_nvisiblewin == idlg_count) + return; + idlg_nvisiblewin++; +} + +void iupDlgListVisibleDec(void) +{ + iupASSERT(idlg_nvisiblewin > 0); + idlg_nvisiblewin--; +} + +int iupDlgListVisibleCount(void) +{ + return idlg_nvisiblewin; +} + +void iupDlgListDestroyAll(void) +{ + int i = 0, count; + Ihandle** ih_array = (Ihandle**)malloc(idlg_count * sizeof(Ihandle*)); + Idiallst *list; + for (list = idlglist; list; list = list->next) + { + if (iupObjectCheck(list->ih)) + { + ih_array[i] = list->ih; + i++; + } + } + + count = i; + for (i = 0; i < count; i++) + { + if (iupObjectCheck(ih_array[i])) + IupDestroy(ih_array[i]); /* this will also destroy the list */ + } + + free(ih_array); +} diff --git a/iup/src/iup_dlglist.h b/iup/src/iup_dlglist.h new file mode 100755 index 0000000..99d3184 --- /dev/null +++ b/iup/src/iup_dlglist.h @@ -0,0 +1,58 @@ +/** \file + * \brief list of all created dialogs + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_DLGLIST_H +#define __IUP_DLGLIST_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup dlglist List of Dialogs + * \par + * See \ref iup_dlglist.h + * \ingroup cpi */ + + +/** Adds a dialog to the list. Used only in IupDialog. + * \ingroup dlglist */ +void iupDlgListAdd(Ihandle *ih); + +/** Removes a dialog from the list. Used only in IupDestroy. + * \ingroup dlglist */ +void iupDlgListRemove(Ihandle *ih); + +/** Starts a loop for all the created dialogs. + * \ingroup dlglist */ +Ihandle* iupDlgListFirst(void); + +/** Retrieve the next dialog on the list. Must call iupDlgListFirst first. + * \ingroup dlglist */ +Ihandle* iupDlgListNext(void); + +/** Increments the number of visible dialogs. + * \ingroup dlglist */ +void iupDlgListVisibleInc(void); + +/** Decrements the number of visible dialogs. + * \ingroup dlglist */ +void iupDlgListVisibleDec(void); + +/** Returns the number of visible dialogs. + * \ingroup dlglist */ +int iupDlgListVisibleCount(void); + +/* Destroy all dialogs and the list. + Called only from IupClose. */ +void iupDlgListDestroyAll(void); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_dll.rc b/iup/src/iup_dll.rc new file mode 100755 index 0000000..a1c78d8 --- /dev/null +++ b/iup/src/iup_dll.rc @@ -0,0 +1,41 @@ +TECGRAF_ICON ICON "..\\etc\\tecgraf.ico" + +1 VERSIONINFO + FILEVERSION 3,0,0,0 + PRODUCTVERSION 3,0,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "www.tecgraf.puc-rio.br/iup\0" + VALUE "CompanyName", "Tecgraf/PUC-Rio\0" + VALUE "FileDescription", "IUP - Portable User Interface\0" + VALUE "FileVersion", "3.0.0\0" + VALUE "LegalCopyright", "Copyright © 1994-2009 Tecgraf, PUC-Rio.\0" + VALUE "OriginalFilename", "iup.dll\0" + VALUE "ProductName", "IUP for Windows\0" + VALUE "ProductVersion", "3.0.0\0" + END + END +END + +CURSOR_PEN CURSOR "..\\etc\\pen.cur" + +/* To avoid the inclusion of */ +#define WS_CHILD 0x40000000L +#define WS_VISIBLE 0x10000000L +#define WS_CLIPSIBLINGS 0x04000000L +#define DS_3DLOOK 0x0004L +#define DS_CONTROL 0x0400L +#define SS_OWNERDRAW 0x0000000DL +#define WS_EX_STATICEDGE 0x00020000L + +#define IUP_PREVIEWCANVAS 3000 + +iupPreviewDlg DIALOG DISCARDABLE 0, 0, 250, 95 +STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | DS_3DLOOK | DS_CONTROL +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IUP_PREVIEWCANVAS, "STATIC", SS_OWNERDRAW, 70, 0, 120, 90, WS_EX_STATICEDGE +END diff --git a/iup/src/iup_drv.h b/iup/src/iup_drv.h new file mode 100755 index 0000000..5cdb8e7 --- /dev/null +++ b/iup/src/iup_drv.h @@ -0,0 +1,99 @@ +/** \file + * \brief Driver Interface. Each driver must export the symbols defined here. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_DRV_H +#define __IUP_DRV_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup drv Driver Interface + * \par + * Each driver must export the symbols defined here. + * \par + * See \ref iup_drv.h + */ + + +/** Sets a global environment attribute. Called from IupSetGlobal and IupStoreGlobal. + * Must return 1 is process the atribute, or 0 is not. + * \ingroup drv */ +int iupdrvSetGlobal(const char* name, const char* value); + +/** Returns a global environment attribute. Called from IupGetGlobal. + * \ingroup drv */ +char* iupdrvGetGlobal(const char* name); + +/** Changes the idle callback. Called from IupSetFunction. + * \ingroup drv */ +void iupdrvSetIdleFunction(Icallback func); + +/** Convert the coordinates from screen relative to client area releative. + * \ingroup drv */ +void iupdrvScreenToClient(Ihandle* ih, int *x, int *y); + +/** Returns true if the element is visible. + * \ingroup drv */ +int iupdrvIsVisible(Ihandle* ih); + +/** Returns true if the element is active. + * \ingroup drv */ +int iupdrvIsActive(Ihandle* ih); + +/** Actually changes the focus to the given element. + * \ingroup drv */ +void iupdrvSetFocus(Ihandle* ih); + +/** Changes the visible state of an element. + * Not used for dialogs. + * \ingroup drv */ +void iupdrvSetVisible(Ihandle* ih, int enable); + +/** Changes the active state of an element. + * \ingroup drv */ +void iupdrvSetActive(Ihandle* ih, int enable); + +/** Post a redraw of a control. + * \ingroup drv */ +void iupdrvDisplayUpdate(Ihandle *ih); + +/** Force a redraw of a control. + * \ingroup drv */ +void iupdrvDisplayRedraw(Ihandle *ih); + +/** Reparent the native control. + * \ingroup drv */ +void iupdrvReparent(Ihandle* ih); + +/** Draws a focus rectangle + * \ingroup drv */ +void iupdrvDrawFocusRect(Ihandle* ih, void* gc, int x, int y, int w, int h); + +/** Size of the scroolbar. + * \ingroup drv */ +int iupdrvGetScrollbarSize(void); + +/** Activates a control. + * \ingroup drv */ +void iupdrvActivate(Ihandle* ih); + +/** Returns the height of a menu bar. + * \ingroup drv */ +int iupdrvMenuGetMenuBarSize(Ihandle* ih); + + +/* Called only from IupOpen/IupClose. */ +int iupdrvOpen(int *argc, char ***argv); +void iupdrvClose(void); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_drvfont.h b/iup/src/iup_drvfont.h new file mode 100755 index 0000000..d6fb137 --- /dev/null +++ b/iup/src/iup_drvfont.h @@ -0,0 +1,116 @@ +/** \file + * \brief Driver Font Management + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_DRVFONT_H +#define __IUP_DRVFONT_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup drvfont Driver Font Interface + * \par + * Each driver must export the symbols defined here. + * \par + * See \ref iup_drvfont.h + * \ingroup drv */ + +/* Called only from IupOpen/IupClose. */ +void iupdrvFontInit(void); +void iupdrvFontFinish(void); + +/** Retrieve the character size for the selected font. + * Should be used only to calculate the SIZE attribute. + * \ingroup drvfont */ +void iupdrvFontGetCharSize(Ihandle* ih, int *charwidth, int *charheight); + +/** Retrieve the string width for the selected font. + * \ingroup drvfont */ +int iupdrvFontGetStringWidth(Ihandle* ih, const char* str); + +/** Retrieve the multi-lined string size for the selected font. \n + * Width is the maximum line width. \n + * Height is charheight*number_of_lines (this will avoid line size variations). + * \ingroup drvfont */ +void iupdrvFontGetMultiLineStringSize(Ihandle* ih, const char* str, int *w, int *h); + +/** Returns the System default font. + * \ingroup drvfont */ +char* iupdrvGetSystemFont(void); + +/** STANDARDFONT attribute set function. + * \ingroup drvfont */ +int iupdrvSetStandardFontAttrib(Ihandle* ih, const char* value); + + + +/** FONT attribute get function. + * \ingroup drvfont */ +char* iupGetFontAttrib(Ihandle* ih); + +/** FONT attribute set function. + * \ingroup drvfont */ +int iupSetFontAttrib(Ihandle* ih, const char* value); + +/** Parse the common font format description. + * Returns a non zero value if successful. + * \ingroup drvfont */ +int iupFontParsePango(const char *value, char *typeface, int *size, int *bold, int *italic, int *underline, int *strikeout); + +/** Parse the old IUP Windows font format description. + * Returns a non zero value if successful. + * \ingroup drvfont */ +int iupFontParseWin(const char *value, char *fontname, int *height, int *bold, int *italic, int *underline, int *strikeout); + +/** Parse the X-Windows font format description. + * Returns a non zero value if successful. + * \ingroup drvfont */ +int iupFontParseX(const char *value, char *fontname, int *height, int *bold, int *italic, int *underline, int *strikeout); + + +/** Changes the FONT style only. + * \ingroup attribfunc */ +int iupSetFontStyleAttrib(Ihandle* ih, const char* value); + +/** Changes the FONT size only. + * \ingroup attribfunc */ +int iupSetFontSizeAttrib(Ihandle* ih, const char* value); + +/** Returns the FONT style. + * \ingroup attribfunc */ +char* iupGetFontStyleAttrib(Ihandle* ih); + +/** Returns the FONT size. + * \ingroup attribfunc */ +char* iupGetFontSizeAttrib(Ihandle* ih); + +/** Returns the FONT face. + * \ingroup attribfunc */ +char* iupGetFontFaceAttrib(Ihandle* ih); + +/* Used in GLobal Attributes */ +void iupSetDefaultFontSizeGlobalAttrib(const char* value); +char* iupGetDefaultFontSizeGlobalAttrib(void); + + +/* Updates the STANDARDFONT attrib. + * Called only from IupMap. + */ +void iupUpdateStandardFontAttrib(Ihandle* ih); + +/* Used to map foreign names into native names */ +const char* iupFontGetWinName(const char* name); +const char* iupFontGetXName(const char* name); +const char* iupFontGetPangoName(const char* name); + + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_drvinfo.h b/iup/src/iup_drvinfo.h new file mode 100755 index 0000000..7ff303f --- /dev/null +++ b/iup/src/iup_drvinfo.h @@ -0,0 +1,103 @@ +/** \file + * \brief Driver Information Functions + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_DRVINFO_H +#define __IUP_DRVINFO_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** \defgroup drvinfo Driver Information Interface + * \par + * Each driver must export the symbols defined here. + * But in this case the functions are shared by different drivers in the same system. + * \par + * For example, the GTK driver and the Windows driver share the same implementation + * of these functions when the GTK driver is compiled in Windows. + * The GTK driver and the Motif driver share the same implementation + * of these functions when the GTK driver is compiled in UNIX. + * \par + * See \ref iup_drvinfo.h + * \ingroup drv */ + + +/** Retrieve the main desktop full size. + * \ingroup drvinfo */ +void iupdrvGetFullSize(int *width, int *height); + +/** Retrieve the main desktop available size. + * \ingroup drvinfo */ +void iupdrvGetScreenSize(int *width, int *height); + +/** Retrieve the default desktop bits per pixel. + * \ingroup drvinfo */ +int iupdrvGetScreenDepth(void); + +/** Returns a string with the system version number. + * \ingroup drvinfo */ +char *iupdrvGetSystemVersion(void); + +/** Returns a string with the system name. + * \ingroup drvinfo */ +char* iupdrvGetSystemName(void); + +/** Returns a string with the computer name. + * \ingroup drvinfo */ +char* iupdrvGetComputerName(void); + +/** Returns a string with the user name. + * \ingroup drvinfo */ +char* iupdrvGetUserName(void); + +/** Returns the key state for Shift, Ctrl, Alt and sYs, in this order. + * Left and right keys are considered. + * Should declare "char key[5]". + * Values could be space (" ") or "SCAY". + * \ingroup drvinfo */ +void iupdrvGetKeyState(char* key); + +/** Returns the current position of the mouse cursor. + * \ingroup drvinfo */ +void iupdrvGetCursorPos(int *x, int *y); + +/** Returns the driver "Display" in UNIX and NULL in Windows. + * Must be implemented somewhere else. + * \ingroup drvinfo */ +void* iupdrvGetDisplay(void); + +/** Returns the decoration size of the native window. + * In Windows will also includes the menu if any. + * Used in DialogGetDecoration. + * \ingroup drvinfo */ +int iupdrvGetWindowDecor(void* wnd, int *border, int *caption); + +/** Returns the current directory. + * \ingroup drvinfo */ +char* iupdrvGetCurrentDirectory(void); + +/** Changes the current directory. + * \ingroup drvinfo */ +int iupdrvSetCurrentDirectory(const char* dir); + +/** Returns true if the given name is an existant file. + * \ingroup drvinfo */ +int iupdrvIsFile(const char* name); + +/** Returns true if the given name is an existant directory. + * \ingroup drvinfo */ +int iupdrvIsDirectory(const char* name); + +/** Creates a new direcotry. + * \ingroup drvinfo */ +int iupdrvMakeDirectory(const char* name); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_filedlg.c b/iup/src/iup_filedlg.c new file mode 100755 index 0000000..e764143 --- /dev/null +++ b/iup/src/iup_filedlg.c @@ -0,0 +1,67 @@ +/** \file + * \brief IupFileDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" + + +Ihandle* IupFileDlg(void) +{ + return IupCreate("filedlg"); +} + +Iclass* iupFileDlgGetClass(void) +{ + Iclass* ic = iupClassNew(iupDialogGetClass()); + + ic->name = "filedlg"; + ic->nativetype = IUP_TYPEDIALOG; + ic->is_interactive = 1; + + iupClassRegisterCallback(ic, "FILE_CB", "ss"); + + /* reset not used native dialog methods */ + ic->parent->LayoutUpdate = NULL; + ic->parent->SetChildrenPosition = NULL; + ic->parent->Map = NULL; + ic->parent->UnMap = NULL; + + iupdrvFileDlgInitClass(ic); + + /* only the default value */ + iupClassRegisterAttribute(ic, "NOCHANGEDIR", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DIALOGTYPE", NULL, NULL, IUPAF_SAMEASSYSTEM, "OPEN", IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "PREVIEWDC", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_READONLY|IUPAF_NO_STRING); + + iupClassRegisterAttribute(ic, "PREVIEWWIDTH", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_READONLY|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "PREVIEWHEIGHT", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_READONLY|IUPAF_NO_STRING); + + iupClassRegisterAttribute(ic, "ALLOWNEW", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DIRECTORY", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FILE", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FILTER", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NOOVERWRITEPROMPT", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWHIDDEN", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWPREVIEW", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "FILEEXIST", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_READONLY); + iupClassRegisterAttribute(ic, "STATUS", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_READONLY); + iupClassRegisterAttribute(ic, "VALUE", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_READONLY); + + return ic; +} diff --git a/iup/src/iup_fill.c b/iup/src/iup_fill.c new file mode 100755 index 0000000..4cad3c0 --- /dev/null +++ b/iup/src/iup_fill.c @@ -0,0 +1,242 @@ +/** \file + * \brief Fill Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" + + +enum {IUP_FILL_NONE, IUP_FILL_HORIZ, IUP_FILL_VERT}; + +struct _IcontrolData +{ + int dir; +}; + +static int iFillGetDir(Ihandle* ih) +{ + if (!ih->parent) + return IUP_FILL_NONE; + + if (ih->data->dir != IUP_FILL_NONE) + return ih->data->dir; + + /* Its parent must be an IupHbox or an IupVbox. */ + if (ih->parent->iclass->nativetype == IUP_TYPEVOID) + { + if (iupStrEqual(ih->parent->iclass->name, "hbox")) + ih->data->dir = IUP_FILL_HORIZ; + else if (iupStrEqual(ih->parent->iclass->name, "vbox")) + ih->data->dir = IUP_FILL_VERT; + } + + return ih->data->dir; +} + +static int iFillMapMethod(Ihandle* ih) +{ + iFillGetDir(ih); + return iupBaseTypeVoidMapMethod(ih); +} + +static void iFillUnMapMethod(Ihandle* ih) +{ + ih->data->dir = IUP_FILL_NONE; +} + +static int iFillSetRasterSizeAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + ih->userwidth = 0; + ih->userheight = 0; + } + else + { + int s = 0; + if (iFillGetDir(ih) == IUP_FILL_NONE) /* if Fill is not yet a child of a Vbox or Hbox */ + { + iupAttribSetStr(ih, "SIZE", NULL); + return 1; + } + + iupStrToInt(value, &s); + if (s > 0) + { + if (iFillGetDir(ih) == IUP_FILL_HORIZ) + { + ih->userwidth = s; /* inside HBOX */ + ih->userheight = 0; + } + else + { + ih->userheight = s; /* inside VBOX */ + ih->userwidth = 0; + } + } + } + iupAttribSetStr(ih, "SIZE", NULL); + return 0; +} + +static int iFillSetSizeAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + ih->userwidth = 0; + ih->userheight = 0; + } + else + { + int s = 0; + if (iFillGetDir(ih) == IUP_FILL_NONE) /* if Fill is not yet a child of a Vbox or Hbox */ + { + iupAttribSetStr(ih, "RASTERSIZE", NULL); + return 1; + } + + iupStrToInt(value, &s); + if (s > 0) + { + int charwidth, charheight; + iupdrvFontGetCharSize(ih, &charwidth, &charheight); + if (iFillGetDir(ih) == IUP_FILL_HORIZ) + { + ih->userwidth = iupWIDTH2RASTER(s, charwidth); /* inside HBOX */ + ih->userheight = 0; + } + else + { + ih->userheight = iupHEIGHT2RASTER(s, charheight); /* inside VBOX */ + ih->userwidth = 0; + } + } + } + iupAttribSetStr(ih, "RASTERSIZE", NULL); + return 1; +} + +static char* iFillGetExpandAttrib(Ihandle* ih) +{ + if (iFillGetDir(ih) == IUP_FILL_NONE) /* if Fill is not yet a child of a Vbox or Hbox */ + return "NO"; + + /* if size is not defined, then expansion on that direction is permited */ + if (iFillGetDir(ih) == IUP_FILL_HORIZ) + { + if (ih->userwidth <= 0) + return "HORIZONTAL"; + } + else + { + if (ih->userheight <= 0) + return "VERTICAL"; + } + + return "NO"; +} + +static void iFillUpdateSize(Ihandle* ih) +{ + char* value = iupAttribGet(ih, "SIZE"); + if (value) + { + iFillSetSizeAttrib(ih, value); + iupAttribSetStr(ih, "SIZE", NULL); + } + value = iupAttribGet(ih, "RASTERSIZE"); + if (value) + { + iFillSetRasterSizeAttrib(ih, value); + iupAttribSetStr(ih, "RASTERSIZE", NULL); + } +} + +static void iFillComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + (void)expand; /* unset if not a container */ + + /* EXPAND is initialized as none for FILL */ + ih->expand = IUP_EXPAND_NONE; + + iFillUpdateSize(ih); + + /* always initialize the natural size using the user size, + must do this again because of iFillUpdateSize */ + ih->naturalwidth = ih->userwidth; + ih->naturalheight = ih->userheight; + + if (iFillGetDir(ih) == IUP_FILL_NONE) /* if Fill is not a child of a Vbox or Hbox */ + return; + + /* if size is NOT defined, then expansion on that direction is permited */ + if (iFillGetDir(ih) == IUP_FILL_HORIZ) + { + if (ih->naturalwidth <= 0) + ih->expand = IUP_EXPAND_W0; + } + else + { + if (ih->naturalheight <= 0) + ih->expand = IUP_EXPAND_H0; + } + + *w = ih->naturalwidth; + *h = ih->naturalheight; +} + +static int iFillCreateMethod(Ihandle* ih, void** params) +{ + (void)params; + ih->data = iupALLOCCTRLDATA(); + return IUP_NOERROR; +} + +/******************************************************************************/ + +Ihandle* IupFill(void) +{ + return IupCreate("fill"); +} + +Iclass* iupFillGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "fill"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPEVOID; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iFillCreateMethod; + ic->Map = iFillMapMethod; + ic->UnMap = iFillUnMapMethod; + ic->ComputeNaturalSize = iFillComputeNaturalSizeMethod; + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Overwrite Common */ + iupClassRegisterAttribute(ic, "SIZE", iupBaseGetSizeAttrib, iFillSetSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RASTERSIZE", iupBaseGetRasterSizeAttrib, iFillSetRasterSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* Base */ + iupClassRegisterAttribute(ic, "EXPAND", iFillGetExpandAttrib, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/src/iup_focus.c b/iup/src/iup_focus.c new file mode 100755 index 0000000..be54b75 --- /dev/null +++ b/iup/src/iup_focus.c @@ -0,0 +1,281 @@ +/** \file + * \brief Keyboard Focus navigation + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_focus.h" +#include "iup_class.h" +#include "iup_assert.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" + + +Ihandle* iupFocusNextInteractive(Ihandle *ih) +{ + Ihandle *c; + + if (!ih) + return NULL; + + for (c = ih->brother; c; c = c->brother) + { + if (c->iclass->is_interactive) + return c; + } + + return NULL; +} + +int iupFocusCanAccept(Ihandle *ih) +{ + if (ih->iclass->is_interactive && /* interactive */ + iupAttribGetBoolean(ih, "CANFOCUS") && /* can receive focus */ + ih->handle && /* mapped */ + IupGetInt(ih, "ACTIVE") && /* active */ + IupGetInt(ih, "VISIBLE")) /* visible */ + return 1; + else + return 0; +} + +static int iFocusCheckActiveRadio(Ihandle *ih) +{ + if (iupStrEqual(ih->iclass->name, "toggle") && + IupGetInt(ih, "RADIO") && + !IupGetInt(ih, "VALUE")) + return 0; + else + return 1; +} + +static Ihandle* iFocusFindAtBrothers(Ihandle *start, int checkradio) +{ + Ihandle *c; + Ihandle *nf; + + for (c = start; c; c = c->brother) + { + /* check itself */ + if (iupFocusCanAccept(c) && (!checkradio || iFocusCheckActiveRadio(c))) + return c; + + /* then check its children */ + nf = iFocusFindAtBrothers(c->firstchild, checkradio); + if (nf) + return nf; + } + + return NULL; +} + +static Ihandle* iFocusFindNext(Ihandle *ih, int checkradio) +{ + Ihandle *nf, *p; + + if (!ih) + return NULL; + + /* look down in the child tree */ + if (ih->firstchild) + { + nf = iFocusFindAtBrothers(ih->firstchild, checkradio); + if (nf) return nf; + } + + /* look in the same level */ + if (ih->brother) + { + nf = iFocusFindAtBrothers(ih->brother, checkradio); + if (nf) return nf; + } + + /* look up in the brothers of the parent level */ + if (ih->parent) + { + for (p = ih->parent; p; p = p->parent) + { + if (p->brother) + { + nf = iFocusFindAtBrothers(p->brother, checkradio); + if (nf) return nf; + } + } + } + + return NULL; +} + +Ihandle* IupNextField(Ihandle *ih) +{ + Ihandle *ih_next; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + ih_next = iFocusFindNext(ih, 1); + if (!ih_next) + { + /* not found after the element, then start over from the begining, + at the dialog. */ + ih_next = iFocusFindNext(IupGetDialog(ih), 1); + if (ih_next == ih) + return NULL; + } + + if (ih_next) + { + iupdrvSetFocus(ih_next); + return ih_next; + } + + return NULL; +} + +void iupFocusNext(Ihandle *ih) +{ + Ihandle *ih_next = iFocusFindNext(ih, 0); + if (!ih_next) + { + /* not found after the element, then start over from the begining, + at the dialog. */ + ih_next = iFocusFindNext(IupGetDialog(ih), 0); + if (ih_next == ih) + return; + } + if (ih_next) + iupdrvSetFocus(ih_next); +} + +static int iFocusFindPrevious(Ihandle *parent, Ihandle **previous, Ihandle *ih, int checkradio) +{ + Ihandle *c; + + if (!parent) + return 0; + + for (c = parent->firstchild; c; c = c->brother) + { + if (c == ih) + { + /* if found child, returns the current previous. + but if previous is NULL, then keep searching until the last element. */ + if (*previous) + return 1; + } + else + { + /* save the possible previous */ + if (iupFocusCanAccept(c) && (!checkradio || iFocusCheckActiveRadio(c))) + *previous = c; + } + + /* then check its children */ + if (iFocusFindPrevious(c, previous, ih, checkradio)) + return 1; + } + + return 0; +} + +Ihandle* IupPreviousField(Ihandle *ih) +{ + Ihandle *previous = NULL; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + + /* search from the dialog down to the element */ + iFocusFindPrevious(IupGetDialog(ih), &previous, ih, 1); + + if (previous) + { + iupdrvSetFocus(previous); + return previous; + } + + return NULL; +} + +void iupFocusPrevious(Ihandle *ih) +{ + Ihandle *previous = NULL; + + /* search from the dialog down to the element */ + iFocusFindPrevious(IupGetDialog(ih), &previous, ih, 0); + + if (previous) + iupdrvSetFocus(previous); +} + +/* local variables */ +static Ihandle* iup_current_focus = NULL; + +Ihandle *IupSetFocus(Ihandle *ih) +{ + Ihandle* old_focus = iup_current_focus; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return old_focus; + + /* iup_current_focus is NOT set here, + only in the iupCallGetFocusCb */ + + if (iupFocusCanAccept(ih)) + iupdrvSetFocus(ih); + + return old_focus; +} + +Ihandle *IupGetFocus(void) +{ + return iup_current_focus; +} + +void iupCallGetFocusCb(Ihandle *ih) +{ + Icallback cb; + + if (ih == iup_current_focus) /* avoid duplicate messages */ + return; + + cb = (Icallback)IupGetCallback(ih, "GETFOCUS_CB"); + if (cb) cb(ih); + + if (ih->iclass->nativetype == IUP_TYPECANVAS) + { + IFni cb2 = (IFni)IupGetCallback(ih, "FOCUS_CB"); + if (cb2) cb2(ih, 1); + } + + iup_current_focus = ih; +} + +void iupCallKillFocusCb(Ihandle *ih) +{ + Icallback cb; + + if (ih != iup_current_focus) /* avoid duplicate messages */ + return; + + cb = IupGetCallback(ih, "KILLFOCUS_CB"); + if (cb) cb(ih); + + if (ih->iclass->nativetype == IUP_TYPECANVAS) + { + IFni cb2 = (IFni)IupGetCallback(ih, "FOCUS_CB"); + if (cb2) cb2(ih, 0); + } + + iup_current_focus = NULL; +} diff --git a/iup/src/iup_focus.h b/iup/src/iup_focus.h new file mode 100755 index 0000000..239e233 --- /dev/null +++ b/iup/src/iup_focus.h @@ -0,0 +1,53 @@ +/** \file + * \brief Keyboard Focus navigation + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_FOCUS_H +#define __IUP_FOCUS_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup focus Keyboard Focus + * \par + * See \ref iup_focus.h + * \ingroup cpi */ + + +/** Utility to check if a control can have the keyboard input focus. + * To receive the focus must be interactive, has CANFOCUS=YES, is mapped, is visible and is active. + * \ingroup focus */ +int iupFocusCanAccept(Ihandle *ih); + +/** Call GETFOCUS_CB and FOCUS_CB. + * \ingroup focus */ +void iupCallGetFocusCb(Ihandle *ih); + +/** Call KILLFOCUS_CB and FOCUS_CB. + * \ingroup focus */ +void iupCallKillFocusCb(Ihandle *ih); + +/** Returns the next interactive brother. Independs if it can receive the focus. + * \ingroup focus */ +Ihandle* iupFocusNextInteractive(Ihandle *ih); + +/* Used only in iupKeyProcessNavigation */ +void iupFocusNext(Ihandle *ih); +void iupFocusPrevious(Ihandle *ih); + + +/* Other functions declared in and implemented here. +IupPreviousField +IupNextField +*/ + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_font.c b/iup/src/iup_font.c new file mode 100755 index 0000000..869bd2a --- /dev/null +++ b/iup/src/iup_font.c @@ -0,0 +1,714 @@ +/** \file + * \brief Font mapping + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_drvfont.h" +#include "iup_assert.h" +#include "iup_attrib.h" +#include "iup_class.h" + +typedef struct _IfontNameMap { + const char* pango; + const char* x; + const char* win; +} IfontNameMap; + +#define IFONT_NAME_MAP_SIZE 7 + +static IfontNameMap ifont_name_map[IFONT_NAME_MAP_SIZE] = { + {"sans", "helvetica", "arial"}, + {NULL, "new century schoolbook", "century schoolbook"}, + {"monospace", "courier", "courier new"}, + {NULL, "lucida", "lucida sans unicode"}, + {NULL, "lucidabright", "lucida bright"}, + {NULL, "lucidatypewriter", "lucida console"}, + {"serif", "times", "times new roman"} +}; + +const char* iupFontGetPangoName(const char* name) +{ + int i; + if (!name) + return NULL; + for (i=0; i str && isspace(*(last - 1))) + last--; + + result = last; + while (result > str && !isspace(*(result - 1))) + result--; + + *wordlen = last - result; + + return result; +} + +int iupFontParsePango(const char *standardfont, char *typeface, int *size, int *bold, int *italic, int *underline, int *strikeout) +{ + const char *p, *last; + int len, wordlen, style = 0; + + if (standardfont[0] == '-') /* X font, abort */ + return 0; + + len = (int)strlen(standardfont); + last = standardfont + len; + p = iFontGetWord(standardfont, last, &wordlen); + + /* Look for a size at the end of the string */ + if (wordlen != 0) + { + int new_size = atoi(p); + if (new_size != 0) + { + *size = new_size; + last = p; + } + } + + /* Now parse style words */ + p = iFontGetWord(standardfont, last, &wordlen); + while (wordlen != 0) + { + int new_style = 0; + + if (!iFontFindStyleName(p, wordlen, &new_style)) + break; + else + { + style |= new_style; + + last = p; + p = iFontGetWord(standardfont, last, &wordlen); + } + } + + *bold = 0; + *italic = 0; + *underline = 0; + *strikeout = 0; + + if (style&FONT_BOLD) + *bold = 1; + if (style&FONT_ITALIC) + *italic = 1; + if (style&FONT_UNDERLINE) + *underline = 1; + if (style&FONT_STRIKEOUT) + *strikeout = 1; + + /* Remainder is font family list. */ + + /* Trim off trailing white space */ + while (last > standardfont && isspace(*(last - 1))) + last--; + + /* Trim off trailing commas */ + if (last > standardfont && *(last - 1) == ',') + last--; + + /* Again, trim off trailing white space */ + while (last > standardfont && isspace(*(last - 1))) + last--; + + /* Trim off leading white space */ + while (last > standardfont && isspace(*standardfont)) + standardfont++; + + if (standardfont != last) + { + len = (last - standardfont); + strncpy(typeface, standardfont, len); + typeface[len] = 0; + return 1; + } + else + return 0; +} + +int iupFontParseWin(const char *value, char *fontname, int *height, int *bold, int *italic, int *underline, int *strikeout) +{ + int c; + + if (value[0] == '-') /* X font, abort */ + return 0; + + if (strstr(value, ":") == NULL) + return 0; + + if (value[0] == ':') /* check if it has the typeface */ + value++; /* jump separator */ + else + { + c = (int)strcspn(value, ":"); /* extract typeface */ + if (c == 0) return 0; + strncpy(fontname, value, c); + fontname[c]='\0'; + value += c+1; /* jump typeface and separator */ + } + + *bold = 0; + *italic = 0; + *underline = 0; + *strikeout = 0; + + if (value[0] == ':') /* check if it has attributes */ + value++; /* jump separator */ + else + { + do /* extract style (bold/italic etc) */ + { + char style[30]; + + c = (int)strcspn(value, ":,"); + if (c == 0) + break; + + strncpy(style, value, c); + style[c] = '\0'; + + if(iupStrEqual(style, "BOLD")) + *bold = 1; + else if(iupStrEqual(style,"ITALIC")) + *italic = 1; + else if(iupStrEqual(style,"UNDERLINE")) + *underline = 1; + else if(iupStrEqual(style,"STRIKEOUT")) + *strikeout = 1; + + value += c; /* jump only the attribute */ + + if(value[0] == ':') /* end of attribute list */ + { + value++; + break; + } + + value++; /* jump separator */ + } while (value[0]); + } + + /* extract size in points */ + if (!iupStrToInt(value, height)) + return 0; + + if (height == 0) + return 0; + + return 1; +} + +int iupFontParseX(const char *standardfont, char *typeface, int *size, int *bold, int *italic, int *underline, int *strikeout) +{ + char style1[30], style2[30]; + char* token; + char font[1024]; + + if (standardfont[0] != '-') + return 0; + + strcpy(font, standardfont+1); /* skip first '-' */ + + *bold = 0; + *italic = 0; + *underline = 0; + *strikeout = 0; + + /* fndry */ + token = strtok(font, "-"); + if (!token) return 0; + + /* fmly */ + token = strtok(NULL, "-"); + if (!token) return 0; + strcpy(typeface, token); + + /* wght */ + token = strtok(NULL, "-"); + if (!token) return 0; + strcpy(style1, token); + if (strstr("bold", style1)) + *bold = 1; + + /* slant */ + token = strtok(NULL, "-"); + if (!token) return 0; + strcpy(style2, token); + if (*style2 == 'i' || *style2 == 'o') + *italic = 1; + + /* sWdth */ + token = strtok(NULL, "-"); + if (!token) return 0; + /* adstyl */ + token = strtok(NULL, "-"); + if (!token) return 0; + + /* pxlsz */ + token = strtok(NULL, "-"); + if (!token) return 0; + *size = -atoi(token); /* size in pixels */ + + if (*size < 0) + return 1; + + /* ptSz */ + token = strtok(NULL, "-"); + if (!token) return 0; + *size = atoi(token)/10; /* size in deci-points */ + + if (*size > 0) + return 1; + + return 0; +} + diff --git a/iup/src/iup_fontdlg.c b/iup/src/iup_fontdlg.c new file mode 100755 index 0000000..9e0f05c --- /dev/null +++ b/iup/src/iup_fontdlg.c @@ -0,0 +1,48 @@ +/** \file + * \brief IupFontDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" + + +Ihandle* IupFontDlg(void) +{ + return IupCreate("fontdlg"); +} + +Iclass* iupFontDlgGetClass(void) +{ + Iclass* ic = iupClassNew(iupDialogGetClass()); + + ic->name = "fontdlg"; + ic->nativetype = IUP_TYPEDIALOG; + ic->is_interactive = 1; + + /* reset not used native dialog methods */ + ic->parent->LayoutUpdate = NULL; + ic->parent->SetChildrenPosition = NULL; + ic->parent->Map = NULL; + ic->parent->UnMap = NULL; + + /* IupFontDialog only */ + iupClassRegisterAttribute(ic, "STATUS", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_READONLY); + iupClassRegisterAttribute(ic, "VALUE", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + + iupdrvFontDlgInitClass(ic); + + return ic; +} diff --git a/iup/src/iup_frame.c b/iup/src/iup_frame.c new file mode 100755 index 0000000..e1d0a13 --- /dev/null +++ b/iup/src/iup_frame.c @@ -0,0 +1,165 @@ +/** \file + * \brief Frame Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_frame.h" + + +int iupFrameGetTitleHeight(Ihandle* ih) +{ + int charheight; + iupdrvFontGetCharSize(ih, NULL, &charheight); + return charheight; +} + +static void iFrameGetDecorSize(Ihandle* ih, int *width, int *height) +{ + *width = 5; + *height = 5; + + if (iupAttribGet(ih, "_IUPFRAME_HAS_TITLE") || iupAttribGet(ih, "TITLE")) + { + (*height) += iupFrameGetTitleHeight(ih); + } +} + +static char* iFrameGetClientSizeAttrib(Ihandle* ih) +{ + int width, height, decorwidth, decorheight; + char* str = iupStrGetMemory(20); + width = ih->currentwidth; + height = ih->currentheight; + iFrameGetDecorSize(ih, &decorwidth, &decorheight); + width -= decorwidth; + height -= decorheight; + if (width < 0) width = 0; + if (height < 0) height = 0; + sprintf(str, "%dx%d", width, height); + return str; +} + +static int iFrameCreateMethod(Ihandle* ih, void** params) +{ + if (params) + { + Ihandle** iparams = (Ihandle**)params; + if (*iparams) + IupAppend(ih, *iparams); + } + + return IUP_NOERROR; +} + +static void iFrameComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int decorwidth, decorheight; + Ihandle* child = ih->firstchild; + + iFrameGetDecorSize(ih, &decorwidth, &decorheight); + *w = decorwidth; + *h = decorheight; + + if (child) + { + /* update child natural size first */ + iupBaseComputeNaturalSize(child); + + *expand = child->expand; + *w += child->naturalwidth; + *h += child->naturalheight; + } +} + +static void iFrameSetChildrenCurrentSizeMethod(Ihandle* ih, int shrink) +{ + int width, height, decorwidth, decorheight; + + iFrameGetDecorSize(ih, &decorwidth, &decorheight); + + width = ih->currentwidth-decorwidth; + height = ih->currentheight-decorheight; + if (width < 0) width = 0; + if (height < 0) height = 0; + + iupBaseSetCurrentSize(ih->firstchild, width, height, shrink); +} + +static void iFrameSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + /* IupFrame is the native parent of its children, + so the position is restarted at (0,0) */ + + iupdrvFrameGetDecorOffset(ih, &x, &y); + + /* Child coordinates are relative to client left-top corner. */ + iupBaseSetPosition(ih->firstchild, x, y); +} + + +/******************************************************************************/ + + +Ihandle* IupFrame(Ihandle* child) +{ + void *params[2]; + params[0] = (void*)child; + params[1] = NULL; + return IupCreatev("frame", params); +} + +Iclass* iupFrameGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "frame"; + ic->format = "H"; /* one optional ihandle */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILD_ONE; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iFrameCreateMethod; + + ic->ComputeNaturalSize = iFrameComputeNaturalSizeMethod; + ic->SetChildrenCurrentSize = iFrameSetChildrenCurrentSizeMethod; + ic->SetChildrenPosition = iFrameSetChildrenPositionMethod; + + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Common Callbacks */ + iupClassRegisterCallback(ic, "MAP_CB", ""); + iupClassRegisterCallback(ic, "UNMAP_CB", ""); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* Base Container */ + iupClassRegisterAttribute(ic, "CLIENTSIZE", iFrameGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* IupFrame only */ + iupClassRegisterAttribute(ic, "SUNKEN", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + + iupdrvFrameInitClass(ic); + + return ic; +} diff --git a/iup/src/iup_frame.h b/iup/src/iup_frame.h new file mode 100755 index 0000000..a7fd520 --- /dev/null +++ b/iup/src/iup_frame.h @@ -0,0 +1,22 @@ +/** \file + * \brief Frame Control Private Declarations + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_FRAME_H +#define __IUP_FRAME_H + +#ifdef __cplusplus +extern "C" { +#endif + +void iupdrvFrameInitClass(Iclass* ic); +void iupdrvFrameGetDecorOffset(Ihandle* ih, int *x, int *y); +int iupFrameGetTitleHeight(Ihandle* ih); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_func.c b/iup/src/iup_func.c new file mode 100755 index 0000000..76683c7 --- /dev/null +++ b/iup/src/iup_func.c @@ -0,0 +1,78 @@ +/** \file + * \brief function table manager + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_table.h" +#include "iup_func.h" +#include "iup_drv.h" +#include "iup_assert.h" + + +static Itable *ifunc_table = NULL; /* the function hast table indexed by the name string */ +static const char *ifunc_action_name = NULL; /* name of the action being retrieved in IupGetFunction */ + +void iupFuncInit(void) +{ + ifunc_table = iupTableCreate(IUPTABLE_STRINGINDEXED); +} + +void iupFuncFinish(void) +{ + iupTableDestroy(ifunc_table); + ifunc_table = NULL; +} + +const char *IupGetActionName(void) +{ + return ifunc_action_name; +} + +Icallback IupGetFunction(const char *name) +{ + void* value; + Icallback func; + + iupASSERT(name!=NULL); + if (!name) + return NULL; + + ifunc_action_name = name; /* store the retrieved name */ + + func = (Icallback)iupTableGetFunc(ifunc_table, name, &value); + + /* if not defined and not the idle, then check for the DEFAULT_ACTION */ + if (!func && !iupStrEqual(name, "IDLE_ACTION")) + func = (Icallback)iupTableGetFunc(ifunc_table, "DEFAULT_ACTION", &value); + + return func; +} + +Icallback IupSetFunction(const char *name, Icallback func) +{ + void* value; + Icallback old_func; + + iupASSERT(name!=NULL); + if (!name) + return NULL; + + old_func = (Icallback)iupTableGetFunc(ifunc_table, name, &value); + + if (!func) + iupTableRemove(ifunc_table, name); + else + iupTableSetFunc(ifunc_table, name, (Ifunc)func); + + /* notifies the driver if changing the Idle */ + if (iupStrEqual(name, "IDLE_ACTION")) + iupdrvSetIdleFunction(func); + + return old_func; +} diff --git a/iup/src/iup_func.h b/iup/src/iup_func.h new file mode 100755 index 0000000..8372163 --- /dev/null +++ b/iup/src/iup_func.h @@ -0,0 +1,28 @@ +/** \file + * \brief Global Function table. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_FUNC_H +#define __IUP_FUNC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* called only in IupOpen and IupClose */ +void iupFuncInit(void); +void iupFuncFinish(void); + +/* Other functions declared in and implemented here. +IupGetActionName +IupGetFunction +IupSetFunction +*/ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_getparam.c b/iup/src/iup_getparam.c new file mode 100755 index 0000000..1418aa5 --- /dev/null +++ b/iup/src/iup_getparam.c @@ -0,0 +1,1254 @@ +/** \file + * \brief IupGetParam + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_strmessage.h" +#include "iup_drvfont.h" + + +#define RAD2DEG 57.296f /* radians to degrees */ + + +/******************************************************************************************* + Internal Callbacks +*******************************************************************************************/ + +static int iParamButtonOK_CB(Ihandle* self) +{ + Ihandle* dlg = IupGetDialog(self); + Iparamcb cb = (Iparamcb)IupGetCallback(dlg, "PARAM_CB"); + iupAttribSetStr(dlg, "STATUS", "1"); + if (cb && !cb(dlg, -1, (void*)iupAttribGet(dlg, "USER_DATA"))) + return IUP_DEFAULT; + else + return IUP_CLOSE; +} + +static int iParamButtonCancel_CB(Ihandle* self) +{ + Ihandle* dlg = IupGetDialog(self); + Iparamcb cb = (Iparamcb)IupGetCallback(dlg, "PARAM_CB"); + iupAttribSetStr(dlg, "STATUS", "0"); + if (cb) cb(dlg, -3, (void*)iupAttribGet(dlg, "USER_DATA")); + return IUP_CLOSE; +} + +static int iParamToggleAction_CB(Ihandle *self, int v) +{ + Ihandle* param = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_PARAM"); + Ihandle* dlg = IupGetDialog(self); + Iparamcb cb = (Iparamcb)IupGetCallback(dlg, "PARAM_CB"); + int old_v = iupAttribGetInt(param, "VALUE"); + + if (v == 1) + iupAttribSetStr(param, "VALUE", "1"); + else + iupAttribSetStr(param, "VALUE", "0"); + + if (cb && !cb(dlg, iupAttribGetInt(param, "INDEX"), (void*)iupAttribGet(dlg, "USER_DATA"))) + { + /* Undo */ + if (old_v == 1) + { + iupAttribSetStr(param, "VALUE", "1"); + IupSetAttribute(self, "VALUE", "1"); + } + else + { + iupAttribSetStr(param, "VALUE", "0"); + IupSetAttribute(self, "VALUE", "0"); + } + + /* there is no IUP_IGNORE for IupToggle */ + return IUP_DEFAULT; + } + + /* update the interface */ + if (v == 1) + IupStoreAttribute(self, "TITLE", iupAttribGet(param, "_IUPGP_TRUE")); + else + IupStoreAttribute(self, "TITLE", iupAttribGet(param, "_IUPGP_FALSE")); + + return IUP_DEFAULT; +} + +static int iParamTextAction_CB(Ihandle *self, int c, char *after) +{ + Ihandle* param = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_PARAM"); + Ihandle* dlg = IupGetDialog(self); + Iparamcb cb = (Iparamcb)IupGetCallback(dlg, "PARAM_CB"); + Ihandle* aux = (Ihandle*)iupAttribGet(param, "AUXCONTROL"); + (void)c; + + iupAttribStoreStr(param, "VALUE", after); + + if (cb && !cb(dlg, iupAttribGetInt(param, "INDEX"), (void*)iupAttribGet(dlg, "USER_DATA"))) + { + /* Undo */ + iupAttribStoreStr(param, "VALUE", IupGetAttribute(self, "VALUE")); + return IUP_IGNORE; + } + + if (aux) + { + if (iupStrEqual(iupAttribGet(param, "TYPE"), "COLOR")) + IupStoreAttribute(aux, "BGCOLOR", after); + else + IupStoreAttribute(aux, "VALUE", after); + } + + if (IupGetInt(self, "SPIN")) + { + if (iupAttribGet(self, "_IUPGP_SPINREAL")) + { + float min = iupAttribGetFloat(param, "MIN"); + float step = iupAttribGetFloat(self, "_IUPGP_INCSTEP"); + float val; + if (iupStrToFloat(after, &val)) + IupSetfAttribute(self, "SPINVALUE", "%d", (int)((val-min)/step + 0.5)); + } + else + { + int val; + if (iupStrToInt(after, &val)) + IupSetfAttribute(self, "SPINVALUE", "%d", val); + } + } + + return IUP_DEFAULT; +} + +static int iParamValAction_CB(Ihandle *self) +{ + Ihandle* param = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_PARAM"); + Ihandle* text = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_TEXT"); + Ihandle* dlg = IupGetDialog(self); + Iparamcb cb = (Iparamcb)IupGetCallback(dlg, "PARAM_CB"); + float old_value = iupAttribGetFloat(param, "VALUE"); + float val = IupGetFloat(self, "VALUE"); + + char* type = iupAttribGet(param, "TYPE"); + if (iupStrEqual(type, "INTEGER")) + { + iupAttribSetStrf(param, "VALUE", "%d", (int)val); + } + else + { + if (iupAttribGetInt(param, "ANGLE")) + { + float old_angle; + + if (val == 0) + { + old_angle = iupAttribGetFloat(param, "VALUE"); + iupAttribSetStrf(param, "_IUPGP_OLD_ANGLE", "%g", old_angle); + } + else + old_angle = iupAttribGetFloat(param, "_IUPGP_OLD_ANGLE"); + + val = old_angle + val*RAD2DEG; + + if (iupAttribGetInt(param, "INTERVAL")) + { + float min = iupAttribGetFloat(param, "MIN"); + float max = iupAttribGetFloat(param, "MAX"); + if (val < min) + val = min; + if (val > max) + val = max; + } + else if (iupAttribGetInt(param, "PARTIAL")) + { + float min = iupAttribGetFloat(param, "MIN"); + if (val < min) + val = min; + } + } + + iupAttribSetStrf(param, "VALUE", "%g", val); + } + + if (cb && !cb(dlg, iupAttribGetInt(param, "INDEX"), (void*)iupAttribGet(dlg, "USER_DATA"))) + { + /* Undo */ + iupAttribSetStrf(param, "VALUE", "%g", old_value); + + if (!iupAttribGetInt(param, "ANGLE")) + IupSetfAttribute(self, "VALUE", "%g", old_value); + + /* there is no IUP_IGNORE for IupVal */ + return IUP_DEFAULT; + } + + type = iupAttribGet(param, "TYPE"); + if (iupStrEqual(type, "INTEGER")) + IupSetfAttribute(text, "VALUE", "%d", (int)val); + else + IupSetfAttribute(text, "VALUE", "%g", val); + + if (IupGetInt(text, "SPIN")) + { + if (iupAttribGet(text, "_IUPGP_SPINREAL")) + { + float min = iupAttribGetFloat(param, "MIN"); + float step = iupAttribGetFloat(text, "_IUPGP_INCSTEP"); + float val = IupGetFloat(text, "VALUE"); + IupSetfAttribute(text, "SPINVALUE", "%d", (int)((val-min)/step + 0.5)); + } + else + { + int val = IupGetInt(text, "VALUE"); + IupSetfAttribute(text, "SPINVALUE", "%d", val); + } + } + + return IUP_DEFAULT; +} + +static int iParamListAction_CB(Ihandle *self, char *t, int i, int v) +{ + (void)t; + if (v == 1) + { + Ihandle* param = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_PARAM"); + Ihandle* dlg = IupGetDialog(self); + Iparamcb cb = (Iparamcb)IupGetCallback(dlg, "PARAM_CB"); + int old_i = iupAttribGetInt(param, "VALUE"); + + iupAttribSetStrf(param, "VALUE", "%d", i-1); + + if (cb && !cb(dlg, iupAttribGetInt(param, "INDEX"), (void*)iupAttribGet(dlg, "USER_DATA"))) + { + /* Undo */ + iupAttribSetStrf(param, "VALUE", "%d", old_i); + IupSetfAttribute(self, "VALUE", "%d", old_i+1); + + /* there is no IUP_IGNORE for IupList */ + return IUP_DEFAULT; + } + } + + return IUP_DEFAULT; +} + +static int iParamFileButton_CB(Ihandle *self) +{ + Ihandle* param = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_PARAM"); + Ihandle* textbox = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_TEXT"); + + Ihandle* dlg = IupFileDlg(); + + IupSetAttributeHandle(dlg, "PARENTDIALOG", IupGetDialog(self)); + IupSetAttribute(dlg, "TITLE", iupAttribGet(param, "TITLE")); + IupSetAttribute(dlg, "VALUE", iupAttribGet(param, "VALUE")); + + IupSetAttribute(dlg, "DIALOGTYPE", iupAttribGet(param, "_IUPGP_DIALOGTYPE")); + IupSetAttribute(dlg, "FILTER", iupAttribGet(param, "_IUPGP_FILTER")); + IupSetAttribute(dlg, "DIRECTORY", iupAttribGet(param, "_IUPGP_DIRECTORY")); + IupSetAttribute(dlg, "NOCHANGEDIR", iupAttribGet(param, "_IUPGP_NOCHANGEDIR")); + IupSetAttribute(dlg, "NOOVERWRITEPROMPT", iupAttribGet(param, "_IUPGP_NOOVERWRITEPROMPT")); + + IupPopup(dlg, IUP_CENTER, IUP_CENTER); + + if (IupGetInt(dlg, "STATUS") != -1) + { + IupSetAttribute(textbox, "VALUE", iupAttribGet(dlg, "VALUE")); + iupAttribStoreStr(param, "VALUE", iupAttribGet(dlg, "VALUE")); + } + + IupDestroy(dlg); + + return IUP_DEFAULT; +} + +static int iParamColorButton_CB(Ihandle *self, int button, int pressed) +{ + if (button==IUP_BUTTON1 && pressed) + { + Ihandle* param = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_PARAM"); + Ihandle* textbox = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_TEXT"); + + Ihandle* dlg = IupColorDlg(); + + IupSetAttributeHandle(dlg, "PARENTDIALOG", IupGetDialog(self)); + IupSetAttribute(dlg, "TITLE", iupAttribGet(param, "TITLE")); + IupSetAttribute(dlg, "VALUE", iupAttribGet(param, "VALUE")); + + IupPopup(dlg, IUP_CENTER, IUP_CENTER); + + if (IupGetInt(dlg, "STATUS") != -1) + { + char* value = IupGetAttribute(dlg, "VALUE"); + IupSetAttribute(textbox, "VALUE", value); + iupAttribStoreStr(param, "VALUE", value); + IupStoreAttribute(self, "BGCOLOR", value); + } + + IupDestroy(dlg); + } + + return IUP_DEFAULT; +} + +static int iParamSpinReal_CB(Ihandle *self, int pos) +{ + Ihandle* param = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_PARAM"); + Ihandle* dlg = IupGetDialog(self); + Iparamcb cb = (Iparamcb)IupGetCallback(dlg, "PARAM_CB"); + Ihandle* text = (Ihandle*)iupAttribGet(param, "CONTROL"); + float min = iupAttribGetFloat(param, "MIN"); + float max = iupAttribGetFloat(param, "MAX"); + float val, step = iupAttribGetFloat(text, "_IUPGP_INCSTEP"); + + /* here spin is always [0-spinmax] converted to [min-max] */ + val = (float)pos*step + min; + if (val < min) + val = min; + if (val > max) + val = max; + + iupAttribSetStrf(param, "VALUE", "%g", (double)val); + + if (cb) + { + int ret; + iupAttribSetStr(dlg, "SPINNING", "1"); + ret = cb(dlg, iupAttribGetInt(param, "INDEX"), (void*)iupAttribGet(dlg, "USER_DATA")); + iupAttribSetStr(dlg, "SPINNING", NULL); + if (!ret) + return IUP_IGNORE; + } + + IupSetfAttribute(text, "VALUE", "%g", (double)val); + + { + Ihandle* aux = (Ihandle*)iupAttribGet(param, "AUXCONTROL"); + if (aux) + IupSetfAttribute(aux, "VALUE", "%g", (double)val); + } + + return IUP_DEFAULT; +} + +static int iParamSpinInt_CB(Ihandle *self, int pos) +{ + Ihandle* param = (Ihandle*)iupAttribGetInherit(self, "_IUPGP_PARAM"); + Ihandle* dlg = IupGetDialog(self); + Iparamcb cb = (Iparamcb)IupGetCallback(dlg, "PARAM_CB"); + Ihandle* text = (Ihandle*)iupAttribGet(param, "CONTROL"); + + /* here spin is always [min-max] */ + + iupAttribSetInt(param, "VALUE", pos); + + if (cb) + { + int ret; + iupAttribSetStr(dlg, "SPINNING", "1"); + ret = cb(dlg, iupAttribGetInt(param, "INDEX"), (void*)iupAttribGet(dlg, "USER_DATA")); + iupAttribSetStr(dlg, "SPINNING", NULL); + if (!ret) + return IUP_IGNORE; + } + + IupSetfAttribute(text, "VALUE", "%g", (double)pos); + + { + Ihandle* aux = (Ihandle*)iupAttribGet(param, "AUXCONTROL"); + if (aux) + IupSetfAttribute(aux, "VALUE", "%g", (double)pos); + } + + return IUP_DEFAULT; +} + +/******************************************************************************************* + Creates One Parameter Box +*******************************************************************************************/ + +static Ihandle* iParamCreateBox(Ihandle* param) +{ + Ihandle *box, *ctrl = NULL, *label; + char *type; + + label = IupLabel(iupAttribGet(param, "TITLE")); + + type = iupAttribGet(param, "TYPE"); + if (iupStrEqual(type, "SEPARATOR")) + { + box = IupHbox(label, NULL); + IupSetAttribute(box,"ALIGNMENT","ACENTER"); + } + else + { + if (iupStrEqual(type, "STRING") && iupAttribGetInt(param, "MULTILINE")) + { + Ihandle* hbox1 = IupHbox(IupSetAttributes(IupFill(), "SIZE=5"), label, NULL); + IupSetAttribute(hbox1,"ALIGNMENT","ACENTER"); + + box = IupVbox(hbox1, NULL); + IupSetAttribute(box,"ALIGNMENT","ALEFT"); + } + else + { + box = IupHbox(IupSetAttributes(IupFill(), "SIZE=5"), label, NULL); + IupSetAttribute(box,"ALIGNMENT","ACENTER"); + } + } + + IupSetAttribute(box,"MARGIN","0x0"); + + type = iupAttribGet(param, "TYPE"); + if (iupStrEqual(type, "BOOLEAN")) + { + int value = iupAttribGetInt(param, "VALUE"); + if (value) + { + ctrl = IupToggle(iupAttribGet(param, "_IUPGP_TRUE"), NULL); + IupSetAttribute(ctrl, "VALUE", "ON"); + } + else + { + ctrl = IupToggle(iupAttribGet(param, "_IUPGP_FALSE"), NULL); + IupSetAttribute(ctrl, "VALUE", "OFF"); + } + IupSetCallback(ctrl, "ACTION", (Icallback)iParamToggleAction_CB); + + IupAppend(box, ctrl); + iupAttribSetStr(param, "DATA_TYPE", "1"); + } + else if (iupStrEqual(type, "SEPARATOR")) + { + ctrl = IupLabel(""); + IupSetAttribute(ctrl, "SEPARATOR", "HORIZONTAL"); + + IupAppend(box, ctrl); + iupAttribSetStr(param, "DATA_TYPE", "-1"); + } + else if (iupStrEqual(type, "LIST")) + { + char str[20] = "1"; + int i = 1; + ctrl = IupList(NULL); + IupSetCallback(ctrl, "ACTION", (Icallback)iParamListAction_CB); + IupSetAttribute(ctrl, "DROPDOWN", "YES"); + IupSetfAttribute(ctrl, "VALUE", "%d", iupAttribGetInt(param, "VALUE")+1); + + while (*iupAttribGet(param, str) != 0) + { + IupStoreAttribute(ctrl, str, iupAttribGet(param, str)); + i++; + sprintf(str, "%d", i); + } + IupStoreAttribute(ctrl, str, NULL); + + IupAppend(box, ctrl); + iupAttribSetStr(param, "DATA_TYPE", "1"); + } + else if (iupStrEqual(type, "STRING")) + { + if (iupAttribGetInt(param, "MULTILINE")) + { + Ihandle* hbox; + + ctrl = IupMultiLine(NULL); + IupSetAttribute(ctrl, "SIZE", "100x50"); + IupSetAttribute(ctrl, "EXPAND", "YES"); + + hbox = IupHbox(IupSetAttributes(IupFill(), "SIZE=5"), ctrl, NULL); + IupSetAttribute(hbox,"ALIGNMENT","ACENTER"); + + IupAppend(box, hbox); + } + else + { + ctrl = IupText(NULL); + IupSetAttribute(ctrl, "SIZE", "100x"); + IupSetAttribute(ctrl, "EXPAND", "HORIZONTAL"); + IupAppend(box, ctrl); + } + IupSetCallback(ctrl, "ACTION", (Icallback)iParamTextAction_CB); + IupStoreAttribute(ctrl, "VALUE", iupAttribGet(param, "VALUE")); + + { + char* mask = iupAttribGet(param, "MASK"); + if (mask) + IupStoreAttribute(ctrl, "MASK", mask); + } + + iupAttribSetStr(param, "DATA_TYPE", "0"); + iupAttribSetStr(param, "EXPAND", "1"); + } + else if (iupStrEqual(type, "FILE")) + { + Ihandle* aux; + + ctrl = IupText(NULL); + IupSetAttribute(ctrl, "SIZE", "100x"); + IupSetAttribute(ctrl, "EXPAND", "HORIZONTAL"); + IupAppend(box, ctrl); + + IupSetCallback(ctrl, "ACTION", (Icallback)iParamTextAction_CB); + IupStoreAttribute(ctrl, "VALUE", iupAttribGet(param, "VALUE")); + + iupAttribSetStr(param, "DATA_TYPE", "0"); + iupAttribSetStr(param, "EXPAND", "1"); + + + aux = IupButton("...", ""); + IupSetAttribute(aux, "EXPAND", "NO"); + + IupSetCallback(aux, "ACTION", (Icallback)iParamFileButton_CB); + iupAttribSetStr(aux, "_IUPGP_PARAM", (char*)param); + iupAttribSetStr(aux, "_IUPGP_TEXT", (char*)ctrl); + IupSetAttribute(aux, "EXPAND", "NO"); + + IupAppend(box, aux); + } + else if (iupStrEqual(type, "COLOR")) + { + Ihandle* aux; + + ctrl = IupText(NULL); + IupSetAttribute(ctrl, "SIZE", "100x"); + IupSetAttribute(ctrl, "EXPAND", "HORIZONTAL"); + IupAppend(box, ctrl); + + IupSetCallback(ctrl, "ACTION", (Icallback)iParamTextAction_CB); + IupSetAttribute(ctrl, "MASK", "(/d|/d/d|1/d/d|2(0|1|2|3|4)/d|25(0|1|2|3|4|5)) (/d|/d/d|1/d/d|2(0|1|2|3|4)/d|25(0|1|2|3|4|5)) (/d|/d/d|1/d/d|2(0|1|2|3|4)/d|25(0|1|2|3|4|5)) (/d|/d/d|1/d/d|2(0|1|2|3|4)/d|25(0|1|2|3|4|5))"); + IupStoreAttribute(ctrl, "VALUE", iupAttribGet(param, "VALUE")); + + iupAttribSetStr(param, "DATA_TYPE", "0"); + iupAttribSetStr(param, "EXPAND", "1"); + + + aux = IupCanvas(NULL); + IupSetAttribute(aux, "SIZE", "20x10"); + IupSetAttribute(aux, "EXPAND", "NO"); + IupStoreAttribute(aux, "BGCOLOR", iupAttribGet(param, "VALUE")); + + IupSetCallback(aux, "BUTTON_CB", (Icallback)iParamColorButton_CB); + iupAttribSetStr(param, "AUXCONTROL", (char*)aux); + iupAttribSetStr(aux, "_IUPGP_PARAM", (char*)param); + iupAttribSetStr(aux, "_IUPGP_TEXT", (char*)ctrl); + IupSetAttribute(aux, "EXPAND", "NO"); + + IupAppend(box, aux); + } + else /* INTEGER, REAL */ + { + ctrl = IupText(NULL); + IupSetCallback(ctrl, "ACTION", (Icallback)iParamTextAction_CB); + IupStoreAttribute(ctrl, "VALUE", iupAttribGet(param, "VALUE")); + + type = iupAttribGet(param, "TYPE"); + if (iupStrEqual(type, "REAL")) + { + if (iupAttribGetInt(param, "INTERVAL")) + { + float min = iupAttribGetFloat(param, "MIN"); + float max = iupAttribGetFloat(param, "MAX"); + float step = iupAttribGetFloat(param, "STEP"); + float val = iupAttribGetFloat(param, "VALUE"); + if (step == 0) step = (max-min)/20.0f; + IupSetfAttribute(ctrl, "MASKFLOAT", "%f:%f", (double)min, (double)max); + + /* here spin is always [0-spinmax] converted to [min-max] */ + + IupSetAttribute(ctrl, "SPIN", "YES"); /* spin only for intervals */ + IupSetAttribute(ctrl, "SPINAUTO", "NO"); + IupAppend(box, ctrl); + IupSetCallback(ctrl, "SPIN_CB", (Icallback)iParamSpinReal_CB); + /* SPINMIN=0 and SPININC=1 */ + IupSetfAttribute(ctrl, "SPINMAX", "%d", (int)((max-min)/step + 0.5)); + IupSetfAttribute(ctrl, "SPINVALUE", "%d", (int)((val-min)/step + 0.5)); + + iupAttribSetStrf(ctrl, "_IUPGP_INCSTEP", "%g", step); + iupAttribSetStr(ctrl, "_IUPGP_SPINREAL", "1"); + } + else if (iupAttribGetInt(param, "PARTIAL")) + { + float min = iupAttribGetFloat(param, "MIN"); + if (min == 0) + IupSetAttribute(ctrl, "MASK", IUP_MASK_UFLOAT); + else + IupSetfAttribute(ctrl, "MASKFLOAT", "%f:%f", (double)min, (double)1.0e10); + IupAppend(box, ctrl); + } + else + { + IupSetAttribute(ctrl, "MASK", IUP_MASK_FLOAT); + IupAppend(box, ctrl); + } + + iupAttribSetStr(param, "DATA_TYPE", "2"); + IupSetAttribute(ctrl, "SIZE", "50x"); + } + else /* INTEGER*/ + { + int val = iupAttribGetInt(param, "VALUE"); + IupSetAttribute(ctrl, "SPIN", "YES"); /* spin always */ + IupSetAttribute(ctrl, "SPINAUTO", "NO"); /* manually update spin so the callback can also updated it */ + IupAppend(box, ctrl); + IupSetCallback(ctrl, "SPIN_CB", (Icallback)iParamSpinInt_CB); + iupAttribSetStr(ctrl, "_IUPGP_INCSTEP", "1"); + IupSetfAttribute(ctrl, "SPINVALUE", "%d", val); + + /* here spin is always [min-max] */ + + if (iupAttribGetInt(param, "INTERVAL")) + { + int min = iupAttribGetInt(param, "MIN"); + int max = iupAttribGetInt(param, "MAX"); + int step = iupAttribGetInt(param, "STEP"); + if (step) + { + iupAttribSetStrf(ctrl, "_IUPGP_INCSTEP", "%d", step); + IupSetfAttribute(ctrl, "SPININC", "%d", step); + } + IupSetfAttribute(ctrl, "SPINMAX", "%d", max); + IupSetfAttribute(ctrl, "SPINMIN", "%d", min); + } + else if (iupAttribGetInt(param, "PARTIAL")) + { + int min = iupAttribGetInt(param, "MIN"); + if (min == 0) + IupSetAttribute(ctrl, "MASK", IUP_MASK_UINT); + else + IupSetfAttribute(ctrl, "MASKINT", "%d:2147483647", min); + IupSetfAttribute(ctrl, "SPINMIN", "%d", min); + IupSetAttribute(ctrl, "SPINMAX", "2147483647"); + } + else + { + IupSetAttribute(ctrl, "SPINMIN", "-2147483647"); + IupSetAttribute(ctrl, "SPINMAX", "2147483647"); + IupSetAttribute(ctrl, "MASK", IUP_MASK_INT); + } + + iupAttribSetStr(param, "DATA_TYPE", "1"); + IupSetAttribute(ctrl, "SIZE", "50x"); + } + + if (iupAttribGetInt(param, "INTERVAL") || iupAttribGetInt(param, "ANGLE")) + { + Ihandle* aux; + + if (iupAttribGetInt(param, "ANGLE")) + { + aux = IupCreatep("dial", "HORIZONTAL", NULL); + if (aux) + { + IupSetfAttribute(aux, "VALUE", "%g", (double)(iupAttribGetFloat(param, "VALUE")/RAD2DEG)); + IupSetAttribute(aux, "SIZE", "50x10"); + } + } + else + { + char* step; + aux = IupVal("HORIZONTAL"); + IupStoreAttribute(aux, "MIN", iupAttribGet(param, "MIN")); + IupStoreAttribute(aux, "MAX", iupAttribGet(param, "MAX")); + IupStoreAttribute(aux, "VALUE", iupAttribGet(param, "VALUE")); + IupSetAttribute(aux, "EXPAND", "HORIZONTAL"); + iupAttribSetStr(param, "AUXCONTROL", (char*)aux); + iupAttribSetStr(param, "EXPAND", "1"); + step = iupAttribGet(param, "STEP"); + if (step) + IupSetfAttribute(aux, "STEP", "%g", iupAttribGetFloat(param, "STEP")/(iupAttribGetFloat(param, "MAX")-iupAttribGetFloat(param, "MIN"))); + else if (iupStrEqual(type, "INTEGER")) + IupSetfAttribute(aux, "STEP", "%g", 1.0/(iupAttribGetFloat(param, "MAX")-iupAttribGetFloat(param, "MIN"))); + } + + if (aux) + { + IupSetCallback(aux, "VALUECHANGED_CB", (Icallback)iParamValAction_CB); + iupAttribSetStr(aux, "_IUPGP_PARAM", (char*)param); + iupAttribSetStr(aux, "_IUPGP_TEXT", (char*)ctrl); + + IupAppend(box, aux); + } + } + } + + if (ctrl) IupStoreAttribute(ctrl, "TIP", iupAttribGet(param, "TIP")); + iupAttribSetStr(box, "_IUPGP_PARAM", (char*)param); + iupAttribSetStr(param, "CONTROL", (char*)ctrl); + iupAttribSetStr(param, "LABEL", (char*)label); + return box; +} + +/******************************************************************************************* + Creates the Dialog and Normalize Sizes +*******************************************************************************************/ + +static Ihandle* IupParamDlgP(Ihandle** params) +{ + Ihandle *dlg, *button_ok, *button_cancel, + *dlg_box, *button_box, *param_box; + int i, lbl_width, p, expand; + + button_ok = IupButton("OK", NULL); + IupSetAttribute(button_ok, "PADDING", "20x0"); + IupSetCallback(button_ok, "ACTION", (Icallback)iParamButtonOK_CB); + + button_cancel = IupButton(iupStrMessageGet("IUP_CANCEL"), NULL); + IupSetAttribute(button_cancel, "PADDING", "20x0"); + IupSetCallback(button_cancel, "ACTION", (Icallback)iParamButtonCancel_CB); + + param_box = IupVbox(NULL); + + i = 0; expand = 0; + while (params[i] != NULL) + { + IupAppend(param_box, iParamCreateBox(params[i])); + + if (IupGetInt(params[i], "EXPAND")) + expand = 1; + + i++; + } + + button_box = IupHbox( + IupFill(), + button_ok, + button_cancel, + NULL); + IupSetAttribute(button_box,"MARGIN","0x0"); + IupSetAttribute(button_box, "NORMALIZESIZE", "HORIZONTAL"); + + dlg_box = IupVbox( + IupFrame(param_box), + button_box, + NULL); + IupSetAttribute(dlg_box, "MARGIN", "10x10"); + IupSetAttribute(dlg_box, "GAP", "5"); + + dlg = IupDialog(dlg_box); + + IupSetAttribute(dlg, "MINBOX", "NO"); + IupSetAttribute(dlg, "MAXBOX", "NO"); + if (!expand) + { + IupSetAttribute(dlg, "RESIZE", "NO"); + IupSetAttribute(dlg, "DIALOGFRAME", "YES"); + IupSetAttribute(dlg,"DIALOGHINT","YES"); + } + IupSetAttributeHandle(dlg, "DEFAULTENTER", button_ok); + IupSetAttributeHandle(dlg, "DEFAULTESC", button_cancel); + IupSetAttribute(dlg, "TITLE", "ParamDlg"); + IupSetAttribute(dlg, "PARENTDIALOG", IupGetGlobal("PARENTDIALOG")); + IupSetAttribute(dlg, "ICON", IupGetGlobal("ICON")); + iupAttribSetStr(dlg, "OK", (char*)button_ok); + iupAttribSetStr(dlg, "CANCEL", (char*)button_cancel); + + IupMap(dlg); + + /* get the largest label size and set INDEX */ + i = 0; lbl_width = 0, p = 0; + while (params[i] != NULL) + { + int w; + + char* type = iupAttribGet(params[i], "TYPE"); + if (!iupStrEqual(type, "SEPARATOR")) + { + char str[20]; + sprintf(str, "PARAM%d", p); + IupSetAttribute(dlg, str, (char*)params[i]); + iupAttribSetStrf(params[i], "INDEX", "%d", p); + p++; + } + + w = IupGetInt((Ihandle*)iupAttribGet(params[i], "LABEL"), "SIZE"); + if (w > lbl_width) + lbl_width = w; + + i++; + } + + i = 0; + while (params[i] != NULL) + { + char* type = iupAttribGet(params[i], "TYPE"); + if (!iupStrEqual(type, "SEPARATOR")) + { + if (iupStrEqual(type, "LIST")) + { + /* set a minimum size for lists */ + Ihandle* ctrl = (Ihandle*)iupAttribGet(params[i], "CONTROL"); + if (IupGetInt(ctrl, "SIZE") < 50) + IupSetAttribute(ctrl, "SIZE", "50x"); + } + else if (iupStrEqual(type, "BOOLEAN")) + { + /* reserve enough space for boolean strings */ + Ihandle* ctrl = (Ihandle*)iupAttribGet(params[i], "CONTROL"); + int wf = iupdrvFontGetStringWidth(ctrl, iupAttribGet(params[i], "_IUPGP_FALSE")); + int wt = iupdrvFontGetStringWidth(ctrl, iupAttribGet(params[i], "_IUPGP_TRUE")); + int w = IupGetInt(ctrl, "SIZE"); + int v = IupGetInt(ctrl, "VALUE"); + if (v) /* True */ + { + int box = w - wt; + wf += box; + if (wf > w) + IupSetfAttribute(ctrl, "SIZE", "%dx", wf+8); + } + else + { + int box = w - wf; + wt += box; + if (wt > w) + IupSetfAttribute(ctrl, "SIZE", "%dx", wt+8); + } + } + + IupSetfAttribute((Ihandle*)iupAttribGet(params[i], "LABEL"), "SIZE", "%dx", lbl_width); + } + + i++; + } + + IupSetAttribute(dlg, "SIZE", NULL); + + return dlg; +} + +/******************************************************************************************* + Parameter String Parsing +*******************************************************************************************/ + +static char* iParamGetNextStrItem(char* line, char sep, int *count) +{ + int i = 0; + + while (line[i] != '\n' && line[i] != 0) + { + if (line[i] == sep) + { + line[i] = 0; + *count = i+1; + return line; + } + + i++; + } + + /* last item may not have the separator */ + line[i] = 0; + *count = i; + return line; +} + +static void iParamSetBoolNames(char* extra, Ihandle* param) +{ + char *falsestr = NULL, *truestr = NULL; + int count; + + if (extra) + { + falsestr = iParamGetNextStrItem(extra, ',', &count); extra += count; + truestr = iParamGetNextStrItem(extra, ',', &count); + } + + if (falsestr && truestr) + { + iupAttribStoreStr(param, "_IUPGP_TRUE", truestr); + iupAttribStoreStr(param, "_IUPGP_FALSE", falsestr); + } + else + { +/* iupAttribStoreStr(param, "_IUPGP_TRUE", iupStrMessageGet("IUP_TRUE")); */ +/* iupAttribStoreStr(param, "_IUPGP_FALSE", iupStrMessageGet("IUP_FALSE")); */ + iupAttribStoreStr(param, "_IUPGP_TRUE", ""); + iupAttribStoreStr(param, "_IUPGP_FALSE", ""); + } +} + +static void iParamSetInterval(char* extra, Ihandle* param) +{ + char *min, *max, *step; + int count; + + if (!extra) + return; + + min = iParamGetNextStrItem(extra, ',', &count); extra += count; + max = iParamGetNextStrItem(extra, ',', &count); extra += count; + step = iParamGetNextStrItem(extra, ',', &count); + + if (max[0]) + { + iupAttribSetStr(param, "INTERVAL", "1"); + iupAttribStoreStr(param, "MIN", min); + iupAttribStoreStr(param, "MAX", max); + if (step[0]) + iupAttribStoreStr(param, "STEP", step); + } + else + { + iupAttribSetStr(param, "PARTIAL", "1"); + iupAttribStoreStr(param, "MIN", min); + } +} + +static void iParamSetFileOptions(char* extra, Ihandle* param) +{ + char *type, *filter, *directory, *nochangedir, *nooverwriteprompt; + int count; + + if (!extra) + return; + + type = iParamGetNextStrItem(extra, '|', &count); extra += count; + filter = iParamGetNextStrItem(extra, '|', &count); extra += count; + directory = iParamGetNextStrItem(extra, '|', &count); extra += count; + nochangedir = iParamGetNextStrItem(extra, '|', &count); extra += count; + nooverwriteprompt = iParamGetNextStrItem(extra, '|', &count); extra += count; + + iupAttribStoreStr(param, "_IUPGP_DIALOGTYPE", type); + iupAttribStoreStr(param, "_IUPGP_FILTER", filter); + iupAttribStoreStr(param, "_IUPGP_DIRECTORY", directory); + iupAttribStoreStr(param, "_IUPGP_NOCHANGEDIR", nochangedir); + iupAttribStoreStr(param, "_IUPGP_NOOVERWRITEPROMPT", nooverwriteprompt); +} + +static void iParamSetListItems(char* extra, Ihandle* param) +{ + int d = 1, count; + char str[20], *item; + + if (!extra) + return; + + item = iParamGetNextStrItem(extra, '|', &count); extra += count; + while (*item) + { + sprintf(str, "%d", d); + iupAttribStoreStr(param, str, item); + + item = iParamGetNextStrItem(extra, '|', &count); extra += count; + d++; + } + + sprintf(str, "%d", d); + iupAttribSetStr(param, str, ""); +} + +static char* iParamGetStrExtra(char* line, char start, char end, int *count) +{ + int i = 0, end_pos = -1; + + if (*line != start) + { + *count = 0; + return NULL; + } + line++; /* skip start */ + + while (line[i] != '\n' && line[i] != 0) + { + if (line[i] == end) + end_pos = i; + + i++; + } + + if (end_pos != -1) + { + line[end_pos] = 0; + *count = 1+end_pos+1; + return line; + } + else + { + *count = 0; + return NULL; + } +} + +static int iParamCopyStrLine(char* line, const char* format) +{ + int i = 0; + while (format[i] != '\n' && format[i] != 0) + { + line[i] = format[i]; + i++; + if (i > 4094) /* to avoid being bigger than the local array */ + break; + } + line[i] = '\n'; + line[i+1] = 0; + return i+1; +} + +char iupGetParamType(const char* format, int *line_size) +{ + char* type = strchr(format, '%'); + char* line_end = strchr(format, '\n'); + if (line_end) + *line_size = line_end-format+1; + if (type) + return *(type+1); + else + return 0; +} + +static Ihandle *IupParamf(const char* format, int *line_size) +{ + Ihandle* param; + char line[4096]; + char* line_ptr = &line[0], *title, type, *tip, *extra, *mask; + int count; + + *line_size = iParamCopyStrLine(line, format); + + title = iParamGetNextStrItem(line_ptr, '%', &count); line_ptr += count; + param = IupUser(); + iupAttribStoreStr(param, "TITLE", title); + + type = *line_ptr; + line_ptr++; + + switch(type) + { + case 'b': + iupAttribSetStr(param, "TYPE", "BOOLEAN"); + iupAttribSetStr(param, "DATA_TYPE", "1"); /* integer */ + extra = iParamGetStrExtra(line_ptr, '[', ']', &count); line_ptr += count; + iParamSetBoolNames(extra, param); + break; + case 'l': + iupAttribSetStr(param, "TYPE", "LIST"); + iupAttribSetStr(param, "DATA_TYPE", "1"); /* integer */ + extra = iParamGetStrExtra(line_ptr, '|', '|', &count); line_ptr += count; + iParamSetListItems(extra, param); + break; + case 'a': + iupAttribSetStr(param, "TYPE", "REAL"); + iupAttribSetStr(param, "DATA_TYPE", "2"); /* real */ + iupAttribSetStr(param, "ANGLE", "1"); + extra = iParamGetStrExtra(line_ptr, '[', ']', &count); line_ptr += count; + iParamSetInterval(extra, param); + break; + case 'm': + iupAttribSetStr(param, "MULTILINE", "1"); + /* continue */ + case 's': + iupAttribSetStr(param, "TYPE", "STRING"); + iupAttribSetStr(param, "DATA_TYPE", "0"); /* string */ + mask = iParamGetNextStrItem(line_ptr, '{', &count); + if (*mask) + iupAttribStoreStr(param, "MASK", mask); + line_ptr += count-1; /* ignore the fake separator */ + line_ptr[0] = '{'; /* restore possible separator */ + break; + case 'i': + iupAttribSetStr(param, "TYPE", "INTEGER"); + iupAttribSetStr(param, "DATA_TYPE", "1"); /* integer */ + extra = iParamGetStrExtra(line_ptr, '[', ']', &count); line_ptr += count; + iParamSetInterval(extra, param); + break; + case 'r': + iupAttribSetStr(param, "TYPE", "REAL"); + iupAttribSetStr(param, "DATA_TYPE", "2"); /* real */ + extra = iParamGetStrExtra(line_ptr, '[', ']', &count); line_ptr += count; + iParamSetInterval(extra, param); + break; + case 'f': + iupAttribSetStr(param, "TYPE", "FILE"); + iupAttribSetStr(param, "DATA_TYPE", "0"); /* string */ + extra = iParamGetStrExtra(line_ptr, '[', ']', &count); line_ptr += count; + iParamSetFileOptions(extra, param); + break; + case 'c': + iupAttribSetStr(param, "TYPE", "COLOR"); + iupAttribSetStr(param, "DATA_TYPE", "0"); /* string */ + break; + case 't': + iupAttribSetStr(param, "TYPE", "SEPARATOR"); + iupAttribSetStr(param, "DATA_TYPE", "-1"); /* NONE */ + break; + default: + return NULL; + } + + tip = iParamGetStrExtra(line_ptr, '{', '}', &count); + if (tip) + iupAttribStoreStr(param, "TIP", tip); + + return param; +} + +/******************************************************************************************* + Exported Functions +*******************************************************************************************/ + +int iupGetParamCount(const char *format, int *param_extra) +{ + int param_count = 0, sep = 0; + const char* s = format; + + *param_extra = 0; + while(*s) + { + if (*s == '%' && *(s+1) == 't') /* do not count separator lines */ + { + sep = 1; + (*param_extra)++; + } + + if (*s == '\n') + { + if (sep) + sep = 0; + else + param_count++; + } + + s++; + } + + return param_count; +} + +static void iParamDestroyAll(Ihandle **params) +{ + int i = 0; + while (params[i] != NULL) + { + IupDestroy(params[i]); + i++; + } +} + +int IupGetParamv(const char* title, Iparamcb action, void* user_data, const char* format, int param_count, int param_extra, void** param_data) +{ + Ihandle *dlg, *params[50]; + int i, line_size, p; + + assert(title && format); + if (!title || !format) + return 0; + + for (i = 0, p = 0; i < param_count+param_extra; i++) + { + int data_type; + + params[i] = IupParamf(format, &line_size); + assert(params[i]); + if (!params[i]) + return 0; + + data_type = IupGetInt(params[i], "DATA_TYPE"); + if (data_type == 1) + { + int *data_int = (int*)(param_data[p]); + if (!data_int) return 0; + iupAttribSetStrf(params[i], "VALUE", "%d", *data_int); + p++; + } + else if (data_type == 2) + { + float *data_float = (float*)(param_data[p]); + if (!data_float) return 0; + iupAttribSetStrf(params[i], "VALUE", "%g", *data_float); + p++; + } + else if (data_type == 0) + { + char *data_str = (char*)(param_data[p]); + if (!data_str) return 0; + iupAttribStoreStr(params[i], "VALUE", data_str); + p++; + } + + format += line_size; + } + params[i] = NULL; + + dlg = IupParamDlgP(params); + IupSetAttribute(dlg, "TITLE", (char*)title); + IupSetCallback(dlg, "PARAM_CB", (Icallback)action); + iupAttribSetStr(dlg, "USER_DATA", (char*)user_data); + + if (action) + action(dlg, -2, user_data); + + IupPopup(dlg, IUP_CENTERPARENT, IUP_CENTERPARENT); + + if (!IupGetInt(dlg, "STATUS")) + { + iParamDestroyAll(params); + IupDestroy(dlg); + return 0; + } + else + { + for (i = 0, p = 0; i < param_count; i++) + { + Ihandle* param; + int data_type; + char str[20]; + + sprintf(str, "PARAM%d", i); + param = (Ihandle*)iupAttribGet(dlg, str); + + data_type = iupAttribGetInt(param, "DATA_TYPE"); + if (data_type == 1) + { + int *data_int = (int*)(param_data[i]); + *data_int = iupAttribGetInt(param, "VALUE"); + p++; + } + else if (data_type == 2) + { + float *data_float = (float*)(param_data[i]); + *data_float = iupAttribGetFloat(param, "VALUE"); + p++; + } + else + { + char *data_str = (char*)(param_data[i]); + strcpy(data_str, iupAttribGet(param, "VALUE")); + p++; + } + } + + iParamDestroyAll(params); + IupDestroy(dlg); + return 1; + } +} + +int IupGetParam(const char* title, Iparamcb action, void* user_data, const char* format,...) +{ + int param_count, param_extra, i; + void* param_data[50]; + va_list arg; + + param_count = iupGetParamCount(format, ¶m_extra); + + va_start(arg, format); + for (i = 0; i < param_count; i++) + { + param_data[i] = (void*)(va_arg(arg, void*)); + } + va_end(arg); + + return IupGetParamv(title, action, user_data, format, param_count, param_extra, param_data); +} + diff --git a/iup/src/iup_globalattrib.c b/iup/src/iup_globalattrib.c new file mode 100755 index 0000000..00586fb --- /dev/null +++ b/iup/src/iup_globalattrib.c @@ -0,0 +1,153 @@ +/** \file + * \brief global attributes enviroment + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" + +#include "iup_table.h" +#include "iup_globalattrib.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_assert.h" +#include "iup_str.h" + + +static Itable *iglobal_table = NULL; + +void iupGlobalAttribInit(void) +{ + iglobal_table = iupTableCreate(IUPTABLE_STRINGINDEXED); +} + +void iupGlobalAttribFinish(void) +{ + iupTableDestroy(iglobal_table); + iglobal_table = NULL; +} + +static int iGlobalChangingDefaultColor(const char *name) +{ + if (iupStrEqual(name, "DLGBGCOLOR") || + iupStrEqual(name, "DLGFGCOLOR") || + iupStrEqual(name, "MENUBGCOLOR") || + iupStrEqual(name, "MENUFGCOLOR") || + iupStrEqual(name, "TXTBGCOLOR") || + iupStrEqual(name, "TXTFGCOLOR")) + { + char str[50] = "_IUP_USER_DEFAULT_"; + strcat(str, name); + iupTableSet(iglobal_table, str, (void*)"1", IUPTABLE_POINTER); /* mark as changed by the User */ + return 1; + } + return 0; +} + +int iupGlobalDefaultColorChanged(const char *name) +{ + char str[50] = "_IUP_USER_DEFAULT_"; + strcat(str, name); + return iupTableGet(iglobal_table, str) != NULL; +} + +void iupGlobalSetDefaultColorAttrib(const char* name, int r, int g, int b) +{ + if (!iupGlobalDefaultColorChanged(name)) + { + char value[50]; + sprintf(value, "%3d %3d %3d", r, g, b); + iupTableSet(iglobal_table, name, (void*)value, IUPTABLE_STRING); + } +} + +void IupSetGlobal(const char *name, const char *value) +{ + iupASSERT(name!=NULL); + if (!name) return; + + if (iupStrEqual(name, "DEFAULTFONTSIZE")) + { + iupSetDefaultFontSizeGlobalAttrib(value); + return; + } + + if (iGlobalChangingDefaultColor(name) || iupdrvSetGlobal(name, value)) + { + if (!value) + iupTableRemove(iglobal_table, name); + else + iupTableSet(iglobal_table, name, (void*)value, IUPTABLE_POINTER); + } +} + +void IupStoreGlobal(const char *name, const char *value) +{ + iupASSERT(name!=NULL); + if (!name) return; + + if (iupStrEqual(name, "DEFAULTFONTSIZE")) + { + iupSetDefaultFontSizeGlobalAttrib(value); + return; + } + + if (iGlobalChangingDefaultColor(name) || iupdrvSetGlobal(name, value)) + { + if (!value) + iupTableRemove(iglobal_table, name); + else + iupTableSet(iglobal_table, name, (void*)value, IUPTABLE_STRING); + } +} + +char *IupGetGlobal(const char *name) +{ + char* value; + + iupASSERT(name!=NULL); + if (!name) + return NULL; + + if (iupStrEqual(name, "DEFAULTFONTSIZE")) + return iupGetDefaultFontSizeGlobalAttrib(); + + value = iupdrvGetGlobal(name); + + if (!value) + value = (char*)iupTableGet(iglobal_table, name); + + return value; +} + +int iupGlobalIsPointer(const char* name) +{ + static struct { + const char *name; + } ptr_table[] = { +#ifdef WIN32 + {"HINSTANCE"}, +#else + {"XDISPLAY"}, + {"XSCREEN"}, + {"APPSHELL"}, +#endif + }; +#define PTR_TABLE_SIZE ((sizeof ptr_table)/(sizeof ptr_table[0])) + + if (name) + { + int i; + for (i = 0; i < PTR_TABLE_SIZE; i++) + { + if (iupStrEqualNoCase(name, ptr_table[i].name)) + return 1; + } + } + + return 0; +} diff --git a/iup/src/iup_globalattrib.h b/iup/src/iup_globalattrib.h new file mode 100755 index 0000000..706a6ac --- /dev/null +++ b/iup/src/iup_globalattrib.h @@ -0,0 +1,33 @@ +/** \file + * \brief global attributes enviroment + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_GLOBALATTRIB_H +#define __IUP_GLOBALATTRIB_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* called only in IupOpen and IupClose */ +void iupGlobalAttribInit(void); +void iupGlobalAttribFinish(void); + +int iupGlobalIsPointer(const char* name); + +int iupGlobalDefaultColorChanged(const char *name); /* check if user changed */ +void iupGlobalSetDefaultColorAttrib(const char* name, int r, int g, int b); /* internal change method */ + +/* Other functions declared in and implemented here. +IupSetGlobal +IupStoreGlobal +IupGetGlobal +*/ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_hbox.c b/iup/src/iup_hbox.c new file mode 100755 index 0000000..e790636 --- /dev/null +++ b/iup/src/iup_hbox.c @@ -0,0 +1,309 @@ +/** \file + * \brief Hbox Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_box.h" + + +static int iHboxSetRasterSizeAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + ih->userwidth = 0; + ih->userheight = 0; + } + else + { + int s = 0; + iupStrToInt(value, &s); + if (s > 0) + { + ih->userheight = 0; + ih->userwidth = s; + } + } + iupAttribSetStr(ih, "SIZE", NULL); /* clear SIZE in hash table */ + return 0; +} + +static int iHboxSetSizeAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + ih->userwidth = 0; + ih->userheight = 0; + } + else + { + int s = 0; + iupStrToInt(value, &s); + if (s > 0) + { + int charwidth, charheight; + iupdrvFontGetCharSize(ih, &charwidth, &charheight); + ih->userheight = 0; + ih->userwidth = iupWIDTH2RASTER(s, charwidth); + } + } + return 1; +} + +static int iHboxSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "ABOTTOM")) + ih->data->alignment = IUP_ALIGN_ABOTTOM; + else if (iupStrEqualNoCase(value, "ACENTER")) + ih->data->alignment = IUP_ALIGN_ACENTER; + else if (iupStrEqualNoCase(value, "ATOP")) + ih->data->alignment = IUP_ALIGN_ATOP; + return 0; +} + +static char* iHboxGetAlignmentAttrib(Ihandle* ih) +{ + static char* align2str[3] = {"ATOP", "ACENTER", "ABOTTOM"}; + return align2str[ih->data->alignment]; +} + +static void iHboxComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + Ihandle* child; + int children_naturalwidth, children_naturalheight; + + /* calculate total children natural size */ + int children_expand = 0; + int children_count = 0; + int children_natural_totalwidth = 0; + int children_natural_maxwidth = 0; + int children_natural_maxheight = 0; + + for (child = ih->firstchild; child; child = child->brother) + { + /* update child natural size first */ + iupBaseComputeNaturalSize(child); + + if (!child->is_floating) + { + children_expand |= child->expand; + children_natural_maxwidth = iupMAX(children_natural_maxwidth, child->naturalwidth); + children_natural_maxheight = iupMAX(children_natural_maxheight, child->naturalheight); + children_count++; + } + } + + /* reset to max natural width and/or height if NORMALIZESIZE is defined */ + if (ih->data->normalize_size) + iupNormalizeSizeBoxChild(ih, ih->data->normalize_size, children_natural_maxwidth, children_natural_maxheight); + + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating) + children_natural_totalwidth += child->naturalwidth; + } + + /* leave room at the element for the maximum natural size of the children when is_homogeneous */ + if (ih->data->is_homogeneous) + children_natural_totalwidth = children_natural_maxwidth*children_count; + + /* compute the Hbox contents natural size */ + children_naturalwidth = children_natural_totalwidth + (children_count-1)*ih->data->gap + 2*ih->data->margin_x; + children_naturalheight = children_natural_maxheight + 2*ih->data->margin_y; + + /* Store to be used in iHboxCalcEmptyWidth */ + ih->data->children_naturalsize = children_naturalwidth; + + *expand = children_expand; + *w = children_naturalwidth; + *h = children_naturalheight; +} + +static int iHboxCalcHomogeneousWidth(Ihandle *ih) +{ + Ihandle* child; + int homogeneous_width; + + int children_count=0; + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating) + children_count++; + } + if (children_count == 0) + return 0; + + /* equal spaces for all elements */ + homogeneous_width = (ih->currentwidth - (children_count-1)*ih->data->gap - 2*ih->data->margin_x)/children_count; + if (homogeneous_width<0) homogeneous_width = 0; + return homogeneous_width; +} + +static int iHboxCalcEmptyWidth(Ihandle *ih, int expand) +{ + /* This is the space that the child can be expanded. */ + Ihandle* child; + int empty_width; + + int expand_count=0; + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating && child->expand & expand) + expand_count++; + } + if (expand_count == 0) + return 0; + + /* equal spaces for all expandable elements */ + empty_width = (ih->currentwidth - ih->data->children_naturalsize)/expand_count; + if (empty_width < 0) empty_width = 0; + return empty_width; +} + +static void iHboxSetChildrenCurrentSizeMethod(Ihandle* ih, int shrink) +{ + /* update children */ + Ihandle* child; + int empty_w0 = 0, empty_w1 = 0, client_height; + + if (ih->data->expand_children) + ih->expand |= ih->data->expand_children; + + if (ih->data->is_homogeneous) + ih->data->homogeneous_size = iHboxCalcHomogeneousWidth(ih); + else + { + ih->data->homogeneous_size = 0; + + /* must calculate the space left for each control to grow inside the container */ + /* W1 means there is an EXPAND enabled inside */ + if (ih->expand & IUP_EXPAND_W1) + empty_w1 = iHboxCalcEmptyWidth(ih, IUP_EXPAND_W1); + /* Not W1 and W0 means that EXPAND is not enabled but there are some IupFill inside */ + else if (ih->expand & IUP_EXPAND_W0) + empty_w0 = iHboxCalcEmptyWidth(ih, IUP_EXPAND_W0); + } + + client_height = ih->currentheight - 2*ih->data->margin_y; + if (client_height<0) client_height=0; + + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating) + { + int old_expand = child->expand; + if (ih->data->expand_children) + child->expand |= ih->data->expand_children; + + if (ih->data->homogeneous_size) + iupBaseSetCurrentSize(child, ih->data->homogeneous_size, client_height, shrink); + else + { + int empty = (child->expand & IUP_EXPAND_W1)? empty_w1: ((child->expand & IUP_EXPAND_W0)? empty_w0: 0); + iupBaseSetCurrentSize(child, child->naturalwidth+empty, client_height, shrink); + } + + if (ih->data->expand_children) + child->expand = old_expand; + } + else + { + /* update children to their own natural size */ + iupBaseSetCurrentSize(child, child->naturalwidth, child->naturalheight, shrink); + } + } +} + +static void iHboxSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + int dy, client_height; + Ihandle* child; + + x += ih->data->margin_x; + y += ih->data->margin_y; + + client_height = ih->currentheight - 2*ih->data->margin_y; + if (client_height<0) client_height=0; + + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating) + { + if (ih->data->alignment == IUP_ALIGN_ACENTER) + dy = (client_height - child->currentheight)/2; + else if (ih->data->alignment == IUP_ALIGN_ABOTTOM) + dy = client_height - child->currentheight; + else /* IUP_ALIGN_ATOP */ + dy = 0; + if (dy<0) dy = 0; + + /* update child */ + iupBaseSetPosition(child, x, y+dy); + + /* calculate next */ + if (ih->data->homogeneous_size) + x += ih->data->homogeneous_size + ih->data->gap; + else + x += child->currentwidth + ih->data->gap; + } + } +} + + +/******************************************************************************/ + + +Ihandle *IupHboxv(Ihandle **children) +{ + return IupCreatev("hbox", (void**)children); +} + +Ihandle *IupHbox(Ihandle* child, ...) +{ + Ihandle **children; + Ihandle *ih; + + va_list arglist; + va_start(arglist, child); + children = (Ihandle **)iupObjectGetParamList(child, arglist); + va_end(arglist); + + ih = IupCreatev("hbox", (void**)children); + free(children); + + return ih; +} + +Iclass* iupHboxGetClass(void) +{ + Iclass* ic = iupBoxClassBase(); + + ic->name = "hbox"; + + /* Class functions */ + ic->ComputeNaturalSize = iHboxComputeNaturalSizeMethod; + ic->SetChildrenCurrentSize = iHboxSetChildrenCurrentSizeMethod; + ic->SetChildrenPosition = iHboxSetChildrenPositionMethod; + + /* Overwrite Common */ + iupClassRegisterAttribute(ic, "SIZE", iupBaseGetSizeAttrib, iHboxSetSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RASTERSIZE", iupBaseGetRasterSizeAttrib, iHboxSetRasterSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* Hbox only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", iHboxGetAlignmentAttrib, iHboxSetAlignmentAttrib, IUPAF_SAMEASSYSTEM, "ATOP", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/src/iup_image.c b/iup/src/iup_image.c new file mode 100755 index 0000000..12b1169 --- /dev/null +++ b/iup/src/iup_image.c @@ -0,0 +1,1017 @@ +/** \file + * \brief Image Resource. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" +#include "iup_assert.h" +#include "iup_stdcontrols.h" + + +typedef struct _IimageStock +{ + iupImageStockCreateFunc func; + Ihandle* image; /* cache image */ + const char* native_name; /* used to map to GTK stock images */ +} IimageStock; + +static Itable *istock_table = NULL; /* the function hast table indexed by the name string */ + +void iupImageStockInit(void) +{ + istock_table = iupTableCreate(IUPTABLE_STRINGINDEXED); +} + +void iupImageStockFinish(void) +{ + char* name = iupTableFirst(istock_table); + while (name) + { + IimageStock* istock = (IimageStock*)iupTableGetCurr(istock_table); + if (iupObjectCheck(istock->image)) + IupDestroy(istock->image); + free(istock); + name = iupTableNext(istock_table); + } + + iupTableDestroy(istock_table); + istock_table = NULL; +} + +void iupImageStockSet(const char *name, iupImageStockCreateFunc func, const char* native_name) +{ + IimageStock* istock = (IimageStock*)iupTableGet(istock_table, name); + if (istock) + free(istock); /* overwrite a previous registration */ + + istock = (IimageStock*)malloc(sizeof(IimageStock)); + istock->func = func; + istock->image = NULL; + istock->native_name = native_name; + + iupTableSet(istock_table, name, (void*)istock, IUPTABLE_POINTER); +} + +static void iImageStockGet(const char* name, Ihandle* *ih, const char* *native_name) +{ + IimageStock* istock = (IimageStock*)iupTableGet(istock_table, name); + if (istock) + { + if (istock->image) + *ih = istock->image; + else if (istock->native_name) + *native_name = istock->native_name; + else if (istock->func) + { + istock->image = istock->func(); + *ih = istock->image; + } + } +} + +void iupImageStockLoad(const char *name) +{ + /* Used only in iupImageLibLoadAll */ + const char* native_name = NULL; + Ihandle* ih = NULL; + iImageStockGet(name, &ih, &native_name); + if (ih) + IupSetHandle(name, ih); + else if (native_name) + { + /* dummy image to save the GTK stock name */ + void* handle = iupdrvImageLoad(native_name, IUPIMAGE_IMAGE); + if (handle) + { + int w, h, bpp; + iupdrvImageGetInfo(handle, &w, &h, &bpp); + if (bpp == 32) + ih = IupImageRGBA(w,h,NULL); + else + ih = IupImageRGB(w,h,NULL); + IupSetHandle(native_name, ih); + } + } +} + + +/**************************************************************************************************/ +/**************************************************************************************************/ + + +int iupImageNormBpp(int bpp) +{ + if (bpp <= 8) return 8; + if (bpp <= 24) return 24; + return 32; +} + +static void iupColorSet(iupColor *c, unsigned char r, unsigned char g, unsigned char b, unsigned char a) +{ + c->r = r; + c->g = g; + c->b = b; + c->a = a; +} + +int iupImageInitColorTable(Ihandle *ih, iupColor* colors, int *colors_count) +{ + char attr[6], *value; + unsigned char red, green, blue; + int i, has_alpha = 0; + static iupColor default_colors[] = { + { 0,0,0,255 }, { 128,0,0,255 }, { 0,128,0,255 }, { 128,128,0,255 }, + { 0,0,128,255 }, { 128,0,128,255 }, { 0,128,128,255 }, { 192,192,192,255 }, + { 128,128,128,255 }, { 255,0,0,255 }, { 0,255,0,255 }, { 255,255,0,255 }, + { 0,0,255,255 }, { 255,0,255,255 }, { 0,255,255,255 }, { 255,255,255,255 } }; + + memset(colors, 0, sizeof(iupColor)*256); + + for (i=0;i<16;i++) + { + sprintf(attr, "%d", i); + value = iupAttribGet(ih, attr); + + if (value) + { + if (iupStrEqual(value, "BGCOLOR")) + { + iupColorSet(&colors[i], 0, 0, 0, 0); + has_alpha = 1; + } + else + { + if (!iupStrToRGB(value, &red, &green, &blue)) + iupColorSet(&colors[i], default_colors[i].r, default_colors[i].g, default_colors[i].b, 255); + else + iupColorSet(&colors[i], red, green, blue, 255); + } + } + else + { + iupColorSet(&colors[i], default_colors[i].r, default_colors[i].g, default_colors[i].b, 255); + } + } + + for (;i<256;i++) + { + sprintf(attr, "%d", i); + value = iupAttribGet(ih, attr); + if (!value) + break; + + if (iupStrEqual(value, "BGCOLOR")) + { + iupColorSet(&colors[i], 0, 0, 0, 0); + has_alpha = 1; + } + else + { + if (!iupStrToRGB(value, &red, &green, &blue)) + break; + + iupColorSet(&colors[i], red, green, blue, 255); + } + } + + if (colors_count) *colors_count = i; + + return has_alpha; +} + +void iupImageInitNonBgColors(Ihandle* ih, unsigned char *colors) +{ + char attr[6], *value; + int i; + + memset(colors, 0, 256); + + for (i=0;i<16;i++) + { + sprintf(attr, "%d", i); + value = iupAttribGet(ih, attr); + if (!iupStrEqual(value, "BGCOLOR")) + colors[i] = 1; + } + + for (;i<256;i++) + { + sprintf(attr, "%d", i); + value = iupAttribGet(ih, attr); + if (!value) + break; + + if (!iupStrEqual(value, "BGCOLOR")) + colors[i] = 1; + } +} + +void iupImageColorMakeInactive(unsigned char *r, unsigned char *g, unsigned char *b, unsigned char bg_r, unsigned char bg_g, unsigned char bg_b) +{ + if (*r==bg_r && *g==bg_g && *b==bg_b) /* preserve colors identical to the background color */ + { + *r = bg_r; + *g = bg_g; + *b = bg_b; + } + else + { + int ir = 0, ig = 0, ib = 0, + i = (*r+*g+*b)/3, + bg_i = (bg_r+bg_g+bg_b)/3; + + if (bg_i) + { + ir = (bg_r*i)/bg_i; + ig = (bg_g*i)/bg_i; + ib = (bg_b*i)/bg_i; + } + +#define LIGHTER(_c) ((255 + _c)/2) + ir = LIGHTER(ir); + ig = LIGHTER(ig); + ib = LIGHTER(ib); + + *r = iupBYTECROP(ir); + *g = iupBYTECROP(ig); + *b = iupBYTECROP(ib); + } +} + + +/**************************************************************************************************/ +/**************************************************************************************************/ + + +void* iupImageGetMask(const char* name) +{ + void* mask; + Ihandle *ih; + + if (!name) + return NULL; + + /* get handle from name */ + ih = IupGetHandle(name); + if (!ih) + return NULL; + + /* Check for an already created icon */ + mask = iupAttribGet(ih, "_IUPIMAGE_MASK"); + if (mask) + return mask; + + /* Not created, tries to create the mask */ + mask = iupdrvImageCreateMask(ih); + + /* save the pixbuf */ + iupAttribSetStr(ih, "_IUPIMAGE_MASK", (char*)mask); + + return mask; +} + +void* iupImageGetIcon(const char* name) +{ + void* icon; + Ihandle *ih; + + if (!name) + return NULL; + + /* Check first in the system resources. */ + icon = iupdrvImageLoad(name, IUPIMAGE_ICON); + if (icon) + return icon; + + /* get handle from name */ + ih = IupGetHandle(name); + if (!ih) + return NULL; + + /* Check for an already created icon */ + icon = iupAttribGet(ih, "_IUPIMAGE_ICON"); + if (icon) + return icon; + + /* Not created, tries to create the icon */ + icon = iupdrvImageCreateIcon(ih); + + /* save the pixbuf */ + iupAttribSetStr(ih, "_IUPIMAGE_ICON", (char*)icon); + + return icon; +} + +void* iupImageGetCursor(const char* name) +{ + void* cursor; + Ihandle *ih; + + if (!name) + return NULL; + + /* Check first in the system resources. */ + cursor = iupdrvImageLoad(name, IUPIMAGE_CURSOR); + if (cursor) + return cursor; + + /* get handle from name */ + ih = IupGetHandle(name); + if (!ih) + return NULL; + + /* Check for an already created cursor */ + cursor = iupAttribGet(ih, "_IUPIMAGE_CURSOR"); + if (cursor) + return cursor; + + /* Not created, tries to create the cursor */ + cursor = iupdrvImageCreateCursor(ih); + + /* save the pixbuf */ + iupAttribSetStr(ih, "_IUPIMAGE_CURSOR", (char*)cursor); + + return cursor; +} + +void iupImageGetInfo(const char* name, int *w, int *h, int *bpp) +{ + void* handle; + Ihandle *ih; + + if (!name) + return; + + /* Check first in the system resources. */ + handle = iupdrvImageLoad(name, IUPIMAGE_IMAGE); + if (handle) + { + iupdrvImageGetInfo(handle, w, h, bpp); + return; + } + + /* get handle from name */ + ih = IupGetHandle(name); + if (!ih) + { + /* Check in the stock images. */ + const char* native_name = NULL; + iImageStockGet(name, &ih, &native_name); + + if (native_name) + { + handle = iupdrvImageLoad(native_name, IUPIMAGE_IMAGE); + if (handle) + { + iupdrvImageGetInfo(handle, w, h, bpp); + return; + } + } + + if (!ih) + return; + } + + if (w) *w = ih->currentwidth; + if (h) *h = ih->currentheight; + if (bpp) *bpp = IupGetInt(ih, "BPP"); +} + +void* iupImageGetImage(const char* name, Ihandle* ih_parent, int make_inactive) +{ + char cache_name[100] = "_IUPIMAGE_IMAGE"; + char* bgcolor; + void* handle; + Ihandle *ih; + int bg_concat = 0; + + if (!name) + return NULL; + + /* Check first in the system resources. */ + handle = iupdrvImageLoad(name, IUPIMAGE_IMAGE); + if (handle) + return handle; + + /* get handle from name */ + ih = IupGetHandle(name); + if (!ih) + { + /* Check in the stock images. */ + const char* native_name = NULL; + iImageStockGet(name, &ih, &native_name); + + if (native_name) + { + handle = iupdrvImageLoad(native_name, IUPIMAGE_IMAGE); + if (handle) + return handle; + } + + if (!ih) + return NULL; + } + + bgcolor = iupAttribGet(ih, "BGCOLOR"); + if (ih_parent && !bgcolor) + bgcolor = IupGetAttribute(ih_parent, "BGCOLOR"); /* Use IupGetAttribute to use inheritance and native implementation */ + + if (make_inactive) + strcat(cache_name, "_INACTIVE"); + + if (iupAttribGet(ih, "_IUP_BGCOLOR_DEPEND") && bgcolor) + { + strcat(cache_name, "("); + strcat(cache_name, bgcolor); + strcat(cache_name, ")"); + bg_concat = 1; + } + + /* Check for an already created native image */ + handle = (void*)iupAttribGet(ih, cache_name); + if (handle) + return handle; + + if (ih_parent && iupAttribGetStr(ih_parent, "FLAT_ALPHA")) + iupAttribSetStr(ih, "FLAT_ALPHA", "1"); + + /* Creates the native image */ + handle = iupdrvImageCreateImage(ih, bgcolor, make_inactive); + + if (ih_parent && iupAttribGetStr(ih_parent, "FLAT_ALPHA")) + iupAttribSetStr(ih, "FLAT_ALPHA", NULL); + + if (iupAttribGet(ih, "_IUP_BGCOLOR_DEPEND") && bgcolor && !bg_concat) /* _IUP_BGCOLOR_DEPEND could be set during creation */ + { + strcat(cache_name, "("); + strcat(cache_name, bgcolor); + strcat(cache_name, ")"); + } + + /* save the native image in the cache */ + iupAttribSetStr(ih, cache_name, (char*)handle); + + return handle; +} + +void iupImageUpdateParent(Ihandle *ih) /* ih here is the element that contains images */ +{ + int inherit; + + /* Called when BGCOLOR is changed */ + /* it will re-create the image, if the case */ + + char* value = iupAttribGet(ih, "IMAGE"); + if (value) + iupClassObjectSetAttribute(ih, "IMAGE", value, &inherit); + + value = iupAttribGet(ih, "IMINACTIVE"); + if (value) + iupClassObjectSetAttribute(ih, "IMINACTIVE", value, &inherit); + + value = iupAttribGet(ih, "IMPRESS"); + if (value) + iupClassObjectSetAttribute(ih, "IMPRESS", value, &inherit); +} + +static char* iImageGetWidthAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(50); + sprintf(str, "%d", ih->currentwidth); + return str; +} + +static char* iImageGetHeightAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(50); + sprintf(str, "%d", ih->currentheight); + return str; +} + +void iupImageClearCache(Ihandle* ih, void* handle) +{ + char *name; + void* cur_handle; + + name = iupTableFirst(ih->attrib); + while (name) + { + if (iupStrEqualPartial(name, "_IUPIMAGE_")) + { + cur_handle = iupTableGetCurr(ih->attrib); + if (cur_handle == handle) + { + iupTableRemoveCurr(ih->attrib); + return; + } + } + + name = iupTableNext(ih->attrib); + } +} + +static void iImageUnMapMethod(Ihandle* ih) +{ + char *name; + void* handle; + + handle = iupAttribGet(ih, "_IUPIMAGE_ICON"); + if (handle) + { + iupdrvImageDestroy(handle, IUPIMAGE_ICON); + iupAttribSetStr(ih, "_IUPIMAGE_ICON", NULL); + } + + handle = iupAttribGet(ih, "_IUPIMAGE_CURSOR"); + if (handle) + { + iupdrvImageDestroy(handle, IUPIMAGE_CURSOR); + iupAttribSetStr(ih, "_IUPIMAGE_CURSOR", NULL); + } + + /* the remaining images are all IUPIMAGE_IMAGE */ + name = iupTableFirst(ih->attrib); + while (name) + { + if (iupStrEqualPartial(name, "_IUPIMAGE_")) + { + handle = iupTableGetCurr(ih->attrib); + if (handle) iupdrvImageDestroy(handle, IUPIMAGE_IMAGE); + } + + name = iupTableNext(ih->attrib); + } +} + +static int iImageCreate(Ihandle* ih, void** params, int bpp) +{ + int width, height, channels, count; + unsigned char *imgdata; + + iupASSERT(params!=NULL); + if (!params) + return IUP_ERROR; + + width = (int)(params[0]); + height = (int)(params[1]); + + iupASSERT(width>0); + iupASSERT(height>0); + + if (width <= 0 || height <= 0) + return IUP_ERROR; + + ih->currentwidth = width; + ih->currentheight = height; + + channels = 1; + if (bpp == 24) + channels = 3; + else if (bpp == 32) + channels = 4; + + count = width*height*channels; + imgdata = (unsigned char *)malloc(count); + + if (((int)(params[2])==-1) || ((int)(params[3])==-1)) /* compacted in one pointer */ + { + if ((int)(params[2])!=-1) + memcpy(imgdata, params[2], count); + } + else /* one param for each element */ + { + int i; + for(i=0; iname = name; + ic->format = "iiC"; /* (int,int,unsigned char*) */ + ic->nativetype = IUP_TYPEIMAGE; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = create_func; + ic->Destroy = iImageDestroyMethod; + ic->Map = iupBaseTypeVoidMapMethod; + ic->UnMap = iImageUnMapMethod; + + /* Attribute functions */ + iupClassRegisterAttribute(ic, "WID", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "WIDTH", iImageGetWidthAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "HEIGHT", iImageGetHeightAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RASTERSIZE", iupBaseGetRasterSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "BPP", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CHANNELS", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "HOTSPOT", NULL, NULL, "0:0", NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} + +Iclass* iupImageGetClass(void) +{ + return iImageGetClassBase("image", iImageCreateMethod); +} + +Iclass* iupImageRGBGetClass(void) +{ + return iImageGetClassBase("imagergb", iImageRGBCreateMethod); +} + +Iclass* iupImageRGBAGetClass(void) +{ + return iImageGetClassBase("imagergba", iImageRGBACreateMethod); +} + +static int SaveImageC(const char* file_name, Ihandle* ih, const char* name, FILE* packfile) +{ + int y, x, width, height, channels, linesize; + unsigned char* data; + FILE* file; + + if (packfile) + file = packfile; + else + file = fopen(file_name, "wb"); + + if (!file) + return 0; + + width = IupGetInt(ih, "WIDTH"); + height = IupGetInt(ih, "HEIGHT"); + channels = IupGetInt(ih, "CHANNELS"); + linesize = width*channels; + + data = (unsigned char*)IupGetAttribute(ih, "WID"); + + if (fprintf(file, "static Ihandle* load_image_%s(void)\n", name)<0) + { + if (!packfile) + fclose(file); + return 0; + } + + fprintf(file, "{\n"); + fprintf(file, " unsigned char imgdata[] = {\n"); + + for (y = 0; y < height; y++) + { + fprintf(file, " "); + + for (x = 0; x < linesize; x++) + { + if (x != 0) + fprintf(file, ", "); + + fprintf(file, "%d", (int)data[y*linesize+x]); + } + + if (y == height-1) + fprintf(file, "};\n\n"); + else + fprintf(file, ",\n"); + } + + if (channels == 1) + { + int c; + char str[20]; + char* color; + + fprintf(file, " Ihandle* image = IupImage(%d, %d, imgdata);\n\n", width, height); + + for (c = 0; c < 256; c++) + { + sprintf(str, "%d", c); + color = IupGetAttribute(ih, str); + if (!color) + break; + + fprintf(file, " IupSetAttribute(image, \"%d\", \"%s\");\n", c, color); + } + + fprintf(file, "\n"); + } + else if (channels == 3) + fprintf(file, " Ihandle* image = IupImageRGB(%d, %d, imgdata);\n", width, height); + else /* channels == 4 */ + fprintf(file, " Ihandle* image = IupImageRGBA(%d, %d, imgdata);\n", width, height); + + fprintf(file, " return image;\n"); + fprintf(file, "}\n\n"); + + if (!packfile) + fclose(file); + + return 1; +} + +static int SaveImageLua(const char* file_name, Ihandle* ih, const char* name, FILE* packfile) +{ + int y, x, width, height, channels, linesize; + unsigned char* data; + FILE* file; + + if (packfile) + file = packfile; + else + file = fopen(file_name, "wb"); + + if (!file) + return 0; + + width = IupGetInt(ih, "WIDTH"); + height = IupGetInt(ih, "HEIGHT"); + channels = IupGetInt(ih, "CHANNELS"); + linesize = width*channels; + + data = (unsigned char*)IupGetAttribute(ih, "WID"); + + if (fprintf(file, "function load_image_%s()\n", name)<0) + { + if (!packfile) + fclose(file); + return 0; + } + + if (channels == 1) + fprintf(file, " local %s = iup.image\n", name); + else if (channels == 3) + fprintf(file, " local %s = iup.imagergb\n", name); + else /* channels == 4 */ + fprintf(file, " local %s = iup.imagergba\n", name); + + fprintf(file, " {\n"); + + fprintf(file, " width = %d,\n", width); + fprintf(file, " height = %d,\n", height); + fprintf(file, " pixels = {\n"); + + for (y = 0; y < height; y++) + { + fprintf(file, " "); + for (x = 0; x < linesize; x++) + { + fprintf(file, "%d, ", (int)data[y*linesize+x]); + } + fprintf(file, "\n"); + } + + fprintf(file, " },\n"); + + if (channels == 1) + { + int c; + char* color; + unsigned int r, g, b; + char str[20]; + + fprintf(file, " colors = {\n"); + + for(c = 0; c < 256; c++) + { + sprintf(str, "%d", c); + color = IupGetAttribute(ih, str); + if (!color) + break; + + if (iupStrEqualNoCase(color, "BGCOLOR")) + fprintf(file, " \"BGCOLOR\",\n"); + else + { + sscanf(color, "%d %d %d", &r, &g, &b); + fprintf(file, " \"%d %d %d\",\n", r, g, b); + } + } + + fprintf(file, " }\n"); + } + + fprintf(file, " }\n"); + + fprintf(file, " return %s\n", name); + fprintf(file, "end\n\n"); + + if (!packfile) + fclose(file); + + return 1; +} + +static int SaveImageLED(const char* file_name, Ihandle* ih, const char* name, FILE* packfile) +{ + int y, x, width, height, channels, linesize; + unsigned char* data; + FILE* file; + + if (packfile) + file = packfile; + else + file = fopen(file_name, "wb"); + + if (!file) + return 0; + + width = IupGetInt(ih, "WIDTH"); + height = IupGetInt(ih, "HEIGHT"); + channels = IupGetInt(ih, "CHANNELS"); + linesize = width*channels; + + data = (unsigned char*)IupGetAttribute(ih, "WID"); + + if (channels == 1) + { + int c; + unsigned int r, g, b; + char str[20]; + char* color; + + if (fprintf(file, "%s = IMAGE\n", name)<0) + { + if (!packfile) + fclose(file); + return 0; + } + + fprintf(file, "[\n"); + for(c = 0; c < 256; c++) + { + sprintf(str, "%d", c); + color = IupGetAttribute(ih, str); + if (!color) + { + if (c < 16) + continue; + else + break; + } + + if (c != 0) + fprintf(file, ",\n"); + + if (iupStrEqualNoCase(color, "BGCOLOR")) + fprintf(file, " %d = \"BGCOLOR\"", c); + else + { + sscanf(color, "%d %d %d", &r, &g, &b); + fprintf(file, " %d = \"%d %d %d\"", c, r, g, b); + } + } + fprintf(file, "\n]\n"); + } + else if (channels == 3) + { + if (fprintf(file, "%s = IMAGERGB\n", name)<0) + { + if (!packfile) + fclose(file); + return 0; + } + } + else /* channels == 4 */ + { + if (fprintf(file, "%s = IMAGERGBA\n", name)<0) + { + if (!packfile) + fclose(file); + return 0; + } + } + + fprintf(file, "(%d, %d,\n", width, height); + + for (y = 0; y < height; y++) + { + fprintf(file, " "); + for (x = 0; x < linesize; x++) + { + if (y == height-1 && x==linesize-1) + fprintf(file, "%d", (int)data[y*linesize+x]); + else + fprintf(file, "%d, ", (int)data[y*linesize+x]); + } + fprintf(file, "\n"); + } + + fprintf(file, ")\n\n"); + + if (!packfile) + fclose(file); + + return 1; +} + +int iupSaveImageAsText(Ihandle* ih, FILE* packfile, const char* format, const char* name) +{ + int ret = 0; + if (iupStrEqualNoCase(format, "LED")) + ret = SaveImageLED(NULL, ih, name, packfile); + else if (iupStrEqualNoCase(format, "LUA")) + ret = SaveImageLua(NULL, ih, name, packfile); + else if (iupStrEqualNoCase(format, "C") || iupStrEqualNoCase(format, "H")) + ret = SaveImageC(NULL, ih, name, packfile); + return ret; +} + +int IupSaveImageAsText(Ihandle* ih, const char* file_name, const char* format, const char* name) +{ + int ret = 0; + if (!name) + { + name = IupGetName(ih); + if (!name) + name = "image"; + } + if (iupStrEqualNoCase(format, "LED")) + ret = SaveImageLED(file_name, ih, name, NULL); + else if (iupStrEqualNoCase(format, "LUA")) + ret = SaveImageLua(file_name, ih, name, NULL); + else if (iupStrEqualNoCase(format, "C") || iupStrEqualNoCase(format, "H")) + ret = SaveImageC(file_name, ih, name, NULL); + return ret; +} diff --git a/iup/src/iup_image.h b/iup/src/iup_image.h new file mode 100755 index 0000000..89e6795 --- /dev/null +++ b/iup/src/iup_image.h @@ -0,0 +1,61 @@ +/** \file + * \brief Image Resource Private Declarations + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_IMAGE_H +#define __IUP_IMAGE_H + +#ifdef __cplusplus +extern "C" { +#endif + +void* iupdrvImageCreateMask(Ihandle *ih); +void* iupdrvImageCreateIcon(Ihandle *ih); +void* iupdrvImageCreateCursor(Ihandle *ih); +void* iupdrvImageCreateImage(Ihandle *ih, const char* bgcolor, int make_inactive); + +enum {IUPIMAGE_IMAGE, IUPIMAGE_ICON, IUPIMAGE_CURSOR}; +void* iupdrvImageLoad(const char* name, int type); +void iupdrvImageDestroy(void* handle, int type); +int iupdrvImageGetInfo(void* handle, int *w, int *h, int *bpp); /* only for IUPIMAGE_IMAGE */ + +void* iupImageGetMask(const char* name); +void* iupImageGetIcon(const char* name); +void* iupImageGetCursor(const char* name); +void* iupImageGetImage(const char* name, Ihandle* parent, int make_inactive); +void iupImageGetInfo(const char* name, int *w, int *h, int *bpp); +void iupImageUpdateParent(Ihandle *parent); +void iupImageClearCache(Ihandle* ih, void* handle); + +typedef struct _iupColor { + unsigned char r, g, b, a; +} iupColor; + +int iupImageInitColorTable(Ihandle *ih, iupColor* colors, int *colors_count); +void iupImageInitNonBgColors(Ihandle* ih, unsigned char *colors); +void iupImageColorMakeInactive(unsigned char *r, unsigned char *g, unsigned char *b, + unsigned char bg_r, unsigned char bg_g, unsigned char bg_b); +int iupImageNormBpp(int bpp); + +#define iupALPHABLEND(_src,_dst,_alpha) (unsigned char)(((_src) * (_alpha) + (_dst) * (255 - (_alpha))) / 255) + +/* In Windows, RAW data is a DIB handle. + imgdata here is bottom-up arranged and has separated planes */ +void* iupdrvImageCreateImageRaw(int width, int height, int bpp, iupColor* colors, int colors_count, unsigned char *imgdata); +int iupdrvImageGetRawInfo(void* handle, int *w, int *h, int *bpp, iupColor* colors, int *colors_count); +void iupdrvImageGetRawData(void* handle, unsigned char* imgdata); + +void iupImageStockInit(void); +void iupImageStockFinish(void); +typedef Ihandle* (*iupImageStockCreateFunc)(void); +void iupImageStockSet(const char *name, iupImageStockCreateFunc func, const char* native_name); +void iupImageStockLoad(const char *name); /* Used only in iupImageLibLoadAll */ + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_key.c b/iup/src/iup_key.c new file mode 100755 index 0000000..6c57c60 --- /dev/null +++ b/iup/src/iup_key.c @@ -0,0 +1,269 @@ +/** \file + * \brief Manage keys encoding and decoding. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupkey.h" +#include "iupcbs.h" + +#include "iup_key.h" +#include "iup_str.h" +#include "iup_object.h" +#include "iup_drv.h" +#include "iup_focus.h" + + +static struct +{ + char *name; + int code; +} ikey_map_list[]= + { + {"K_exclam", K_exclam}, + {"K_grave", K_grave}, + {"K_quotedbl", K_quotedbl}, + {"K_numbersign", K_numbersign}, + {"K_dollar", K_dollar}, + {"K_percent", K_percent}, + {"K_ampersand", K_ampersand}, + {"K_apostrophe", K_apostrophe}, + {"K_parentleft", K_parentleft}, + {"K_parentright", K_parentright}, + {"K_asterisk", K_asterisk}, {"K_sAsterisk",K_sAsterisk},{"K_cAsterisk",K_cAsterisk},{"K_mAsterisk",K_mAsterisk},{"K_yAsterisk",K_yAsterisk}, + {"K_plus", K_plus}, {"K_sPlus", K_sPlus}, {"K_cPlus", K_cPlus}, {"K_mPlus", K_mPlus}, {"K_yPlus", K_yPlus}, + {"K_comma", K_comma}, {"K_sComma", K_sComma}, {"K_cComma", K_cComma}, {"K_mComma", K_mComma}, {"K_yComma", K_yComma}, + {"K_minus", K_minus}, {"K_sMinus", K_sMinus}, {"K_cMinus", K_cMinus}, {"K_mMinus", K_mMinus}, {"K_yMinus", K_yMinus}, + {"K_period", K_period}, {"K_sPeriod", K_sPeriod}, {"K_cPeriod", K_cPeriod}, {"K_mPeriod", K_mPeriod}, {"K_yPeriod", K_yPeriod}, + {"K_slash", K_slash}, {"K_sSlash", K_sSlash}, {"K_cSlash", K_cSlash}, {"K_mSlash", K_mSlash}, {"K_ySlash", K_ySlash}, + {"K_colon", K_colon}, + {"K_semicolon ", K_semicolon}, {"K_cSemicolon ", K_cSemicolon}, {"K_mSemicolon ", K_mSemicolon}, {"K_ySemicolon ", K_ySemicolon}, + {"K_less", K_less}, + {"K_equal", K_equal}, {"K_cEqual", K_cEqual}, {"K_mEqual", K_mEqual}, {"K_yEqual", K_yEqual}, + {"K_greater", K_greater}, + {"K_question", K_question}, + {"K_bracketleft", K_bracketleft}, {"K_cBracketleft", K_cBracketleft}, {"K_mBracketleft", K_mBracketleft}, {"K_yBracketleft", K_yBracketleft}, + {"K_backslash", K_backslash}, {"K_cBackslash", K_cBackslash}, {"K_mBackslash", K_mBackslash}, {"K_yBackslash", K_yBackslash}, + {"K_bracketright", K_bracketright}, {"K_cBracketright", K_cBracketright}, {"K_mBracketright", K_mBracketright}, {"K_yBracketright", K_yBracketright}, + {"K_circum", K_circum}, + {"K_underscore", K_underscore}, + {"K_at", K_at}, + {"K_braceleft", K_braceleft}, + {"K_bar", K_bar}, + {"K_braceright", K_braceright}, + {"K_tilde", K_tilde}, + {"K_acute", K_acute}, + {"K_ccedilla" ,K_ccedilla}, {"K_Ccedilla" ,K_Ccedilla}, {"K_cCcedilla" ,K_cCcedilla}, {"K_mCcedilla" ,K_mCcedilla}, {"K_yCcedilla" ,K_yCcedilla}, + {"K_ESC" ,K_ESC}, {"K_sESC" ,K_sESC}, {"K_cESC" ,K_cESC}, {"K_mESC" ,K_mESC}, {"K_yESC" ,K_yESC}, + {"K_PAUSE" ,K_PAUSE}, {"K_sPAUSE" ,K_sPAUSE}, {"K_cPAUSE" ,K_cPAUSE}, {"K_mPAUSE" ,K_mPAUSE}, {"K_yPAUSE" ,K_yPAUSE}, + {"K_HOME" ,K_HOME}, {"K_sHOME" ,K_sHOME}, {"K_cHOME" ,K_cHOME}, {"K_mHOME" ,K_mHOME}, {"K_yHOME" ,K_yHOME}, + {"K_UP" ,K_UP}, {"K_sUP" ,K_sUP}, {"K_cUP" ,K_cUP}, {"K_mUP" ,K_mUP}, {"K_yUP" ,K_yUP}, + {"K_PGUP" ,K_PGUP}, {"K_sPGUP" ,K_sPGUP}, {"K_cPGUP" ,K_cPGUP}, {"K_mPGUP" ,K_mPGUP}, {"K_yPGUP" ,K_yPGUP}, + {"K_LEFT" ,K_LEFT}, {"K_sLEFT" ,K_sLEFT}, {"K_cLEFT" ,K_cLEFT}, {"K_mLEFT" ,K_mLEFT}, {"K_yLEFT" ,K_yLEFT}, + {"K_MIDDLE",K_MIDDLE}, {"K_sMIDDLE",K_sMIDDLE},{"K_cMIDDLE",K_cMIDDLE},{"K_mMIDDLE",K_mMIDDLE}, {"K_yMIDDLE",K_yMIDDLE}, + {"K_RIGHT" ,K_RIGHT}, {"K_sRIGHT" ,K_sRIGHT}, {"K_cRIGHT" ,K_cRIGHT}, {"K_mRIGHT" ,K_mRIGHT}, {"K_yRIGHT" ,K_yRIGHT}, + {"K_END" ,K_END}, {"K_sEND" ,K_sEND}, {"K_cEND" ,K_cEND}, {"K_mEND" ,K_mEND}, {"K_yEND" ,K_yEND}, + {"K_DOWN" ,K_DOWN}, {"K_sDOWN" ,K_sDOWN}, {"K_cDOWN" ,K_cDOWN}, {"K_mDOWN" ,K_mDOWN}, {"K_yDOWN" ,K_yDOWN}, + {"K_PGDN" ,K_PGDN}, {"K_sPGDN" ,K_sPGDN}, {"K_cPGDN" ,K_cPGDN}, {"K_mPGDN" ,K_mPGDN}, {"K_yPGDN" ,K_yPGDN}, + {"K_INS" ,K_INS}, {"K_sINS" ,K_sINS}, {"K_cINS" ,K_cINS}, {"K_mINS" ,K_mINS}, {"K_yINS" ,K_yINS}, + {"K_DEL" ,K_DEL}, {"K_sDEL" ,K_sDEL}, {"K_cDEL" ,K_cDEL}, {"K_mDEL" ,K_mDEL}, {"K_yDEL" ,K_yDEL}, + {"K_SP" ,K_SP}, {"K_sSP" ,K_sSP}, {"K_cSP" ,K_cSP}, {"K_mSP" ,K_mSP}, {"K_ySP" ,K_ySP}, + {"K_TAB" ,K_TAB}, {"K_sTAB" ,K_sTAB}, {"K_cTAB" ,K_cTAB}, {"K_mTAB" ,K_mTAB}, {"K_yTAB" ,K_yTAB}, + {"K_CR" ,K_CR}, {"K_sCR" ,K_sCR}, {"K_cCR" ,K_cCR}, {"K_mCR" ,K_mCR}, {"K_yCR" ,K_yCR}, + {"K_BS" ,K_BS}, {"K_sBS" ,K_sBS}, {"K_cBS" ,K_cBS}, {"K_mBS" ,K_mBS}, {"K_yBS" ,K_yBS}, + {"K_Print" ,K_Print}, {"K_sPrint" ,K_sPrint}, {"K_cPrint" ,K_cPrint}, {"K_mPrint" ,K_mPrint}, {"K_yPrint" ,K_yPrint}, + {"K_Menu" ,K_Menu}, {"K_sMenu" ,K_sMenu}, {"K_cMenu" ,K_cMenu}, {"K_mMenu" ,K_mMenu}, {"K_yMenu" ,K_yMenu}, + {"K_0", K_0}, {"K_c0", K_c0}, {"K_m0", K_m0}, {"K_y0", K_y0}, + {"K_1", K_1}, {"K_c1", K_c1}, {"K_m1", K_m1}, {"K_y1", K_y1}, + {"K_2", K_2}, {"K_c2", K_c2}, {"K_m2", K_m2}, {"K_y2", K_y2}, + {"K_3", K_3}, {"K_c3", K_c3}, {"K_m3", K_m3}, {"K_y3", K_y3}, + {"K_4", K_4}, {"K_c4", K_c4}, {"K_m4", K_m4}, {"K_y4", K_y4}, + {"K_5", K_5}, {"K_c5", K_c5}, {"K_m5", K_m5}, {"K_y5", K_y5}, + {"K_6", K_6}, {"K_c6", K_c6}, {"K_m6", K_m6}, {"K_y6", K_y6}, + {"K_7", K_7}, {"K_c7", K_c7}, {"K_m7", K_m7}, {"K_y7", K_y7}, + {"K_8", K_8}, {"K_c8", K_c8}, {"K_m8", K_m8}, {"K_y8", K_y8}, + {"K_9", K_9}, {"K_c9", K_c9}, {"K_m9", K_m9}, {"K_y9", K_y9}, + {"K_a", K_a}, {"K_A", K_A}, {"K_cA" ,K_cA}, {"K_mA" ,K_mA}, {"K_yA" ,K_yA}, + {"K_b", K_b}, {"K_B", K_B}, {"K_cB" ,K_cB}, {"K_mB" ,K_mB}, {"K_yB" ,K_yB}, + {"K_c", K_c}, {"K_C", K_C}, {"K_cC" ,K_cC}, {"K_mC" ,K_mC}, {"K_yC" ,K_yC}, + {"K_d", K_d}, {"K_D", K_D}, {"K_cD" ,K_cD}, {"K_mD" ,K_mD}, {"K_yD" ,K_yD}, + {"K_e", K_e}, {"K_E", K_E}, {"K_cE" ,K_cE}, {"K_mE" ,K_mE}, {"K_yE" ,K_yE}, + {"K_f", K_f}, {"K_F", K_F}, {"K_cF" ,K_cF}, {"K_mF" ,K_mF}, {"K_yF" ,K_yF}, + {"K_g", K_g}, {"K_G", K_G}, {"K_cG" ,K_cG}, {"K_mG" ,K_mG}, {"K_yG" ,K_yG}, + {"K_h", K_h}, {"K_H", K_H}, {"K_cH" ,K_cH}, {"K_mH" ,K_mH}, {"K_yH" ,K_yH}, + {"K_i", K_i}, {"K_I", K_I}, {"K_cI" ,K_cI}, {"K_mI" ,K_mI}, {"K_yI" ,K_yI}, + {"K_j", K_j}, {"K_J", K_J}, {"K_cJ" ,K_cJ}, {"K_mJ" ,K_mJ}, {"K_yJ" ,K_yJ}, + {"K_k", K_k}, {"K_K", K_K}, {"K_cK" ,K_cK}, {"K_mK" ,K_mK}, {"K_yK" ,K_yK}, + {"K_l", K_l}, {"K_L", K_L}, {"K_cL" ,K_cL}, {"K_mL" ,K_mL}, {"K_yL" ,K_yL}, + {"K_m", K_m}, {"K_M", K_M}, {"K_cM" ,K_cM}, {"K_mM" ,K_mM}, {"K_yM" ,K_yM}, + {"K_n", K_n}, {"K_N", K_N}, {"K_cN" ,K_cN}, {"K_mN" ,K_mN}, {"K_yN" ,K_yN}, + {"K_o", K_o}, {"K_O", K_O}, {"K_cO" ,K_cO}, {"K_mO" ,K_mO}, {"K_yO" ,K_yO}, + {"K_p", K_p}, {"K_P", K_P}, {"K_cP" ,K_cP}, {"K_mP" ,K_mP}, {"K_yP" ,K_yP}, + {"K_q", K_q}, {"K_Q", K_Q}, {"K_cQ" ,K_cQ}, {"K_mQ" ,K_mQ}, {"K_yQ" ,K_yQ}, + {"K_r", K_r}, {"K_R", K_R}, {"K_cR" ,K_cR}, {"K_mR" ,K_mR}, {"K_yR" ,K_yR}, + {"K_s", K_s}, {"K_S", K_S}, {"K_cS" ,K_cS}, {"K_mS" ,K_mS}, {"K_yS" ,K_yS}, + {"K_t", K_t}, {"K_T", K_T}, {"K_cT" ,K_cT}, {"K_mT" ,K_mT}, {"K_yT" ,K_yT}, + {"K_u", K_u}, {"K_U", K_U}, {"K_cU" ,K_cU}, {"K_mU" ,K_mU}, {"K_yU" ,K_yU}, + {"K_v", K_v}, {"K_V", K_V}, {"K_cV" ,K_cV}, {"K_mV" ,K_mV}, {"K_yV" ,K_yV}, + {"K_w", K_w}, {"K_W", K_W}, {"K_cW" ,K_cW}, {"K_mW" ,K_mW}, {"K_yW" ,K_yW}, + {"K_x", K_x}, {"K_X", K_X}, {"K_cX" ,K_cX}, {"K_mX" ,K_mX}, {"K_yX" ,K_yX}, + {"K_y", K_y}, {"K_Y", K_Y}, {"K_cY" ,K_cY}, {"K_mY" ,K_mY}, {"K_yY" ,K_yY}, + {"K_z", K_z}, {"K_Z", K_Z}, {"K_cZ" ,K_cZ}, {"K_mZ" ,K_mZ}, {"K_yZ" ,K_yZ}, + {"K_F1" ,K_F1}, {"K_sF1" ,K_sF1}, {"K_cF1" ,K_cF1}, {"K_mF1" ,K_mF1}, {"K_yF1" ,K_yF1}, + {"K_F2" ,K_F2}, {"K_sF2" ,K_sF2}, {"K_cF2" ,K_cF2}, {"K_mF2" ,K_mF2}, {"K_yF2" ,K_yF2}, + {"K_F3" ,K_F3}, {"K_sF3" ,K_sF3}, {"K_cF3" ,K_cF3}, {"K_mF3" ,K_mF3}, {"K_yF3" ,K_yF3}, + {"K_F4" ,K_F4}, {"K_sF4" ,K_sF4}, {"K_cF4" ,K_cF4}, {"K_mF4" ,K_mF4}, {"K_yF4" ,K_yF4}, + {"K_F5" ,K_F5}, {"K_sF5" ,K_sF5}, {"K_cF5" ,K_cF5}, {"K_mF5" ,K_mF5}, {"K_yF5" ,K_yF5}, + {"K_F6" ,K_F6}, {"K_sF6" ,K_sF6}, {"K_cF6" ,K_cF6}, {"K_mF6" ,K_mF6}, {"K_yF6" ,K_yF6}, + {"K_F7" ,K_F7}, {"K_sF7" ,K_sF7}, {"K_cF7" ,K_cF7}, {"K_mF7" ,K_mF7}, {"K_yF7" ,K_yF7}, + {"K_F8" ,K_F8}, {"K_sF8" ,K_sF8}, {"K_cF8" ,K_cF8}, {"K_mF8" ,K_mF8}, {"K_yF8" ,K_yF8}, + {"K_F9" ,K_F9}, {"K_sF9" ,K_sF9}, {"K_cF9" ,K_cF9}, {"K_mF9" ,K_mF9}, {"K_yF9" ,K_yF9}, + {"K_F10" ,K_F10}, {"K_sF10" ,K_sF10}, {"K_cF10" ,K_cF10}, {"K_mF10" ,K_mF10}, {"K_yF10" ,K_yF10}, + {"K_F11" ,K_F11}, {"K_sF11" ,K_sF11}, {"K_cF11" ,K_cF11}, {"K_mF11" ,K_mF11}, {"K_yF11" ,K_yF11}, + {"K_F12" ,K_F12}, {"K_sF12" ,K_sF12}, {"K_cF12" ,K_cF12}, {"K_mF12" ,K_mF12}, {"K_yF12" ,K_yF12}, + {NULL ,0} + }; + +static char* ikey_map[IUP_NUMMAXCODES]; + +void iupKeyInit(void) +{ + int i; + memset(ikey_map, 0, IUP_NUMMAXCODES*sizeof(char*)); + for (i = 0; ikey_map_list[i].name; i++) + ikey_map[ikey_map_list[i].code] = ikey_map_list[i].name; +} + +int iupKeyCanCaps(int code) +{ + if (code >= K_a && code <= K_z) + return 1; + if (code == K_ccedilla) + return 1; + return 0; +} + +char* iupKeyCodeToName(int code) +{ + if (code < 0 || code > IUP_NUMMAXCODES) + return NULL; + return ikey_map[code]; +} + +int iupKeyNameToCode(const char *name) +{ + int i; + for (i = 0; ikey_map_list[i].name; i++) + if (iupStrEqual(name, ikey_map_list[i].name)) + return ikey_map_list[i].code; + + return 0; +} + +void iupKeyForEach(void (*func)(const char *name, int code, void* user_data), void* user_data) +{ + int i; + for (i = 0; ikey_map_list[i].name; ++i) + func(ikey_map_list[i].name, ikey_map_list[i].code, user_data); +} + +int iupKeyCallKeyCb(Ihandle *ih, int code) +{ + char* name = iupKeyCodeToName(code); + for (; ih; ih = ih->parent) + { + IFni cb = NULL; + if (name) + cb = (IFni)IupGetCallback(ih, name); + if (!cb) + cb = (IFni)IupGetCallback(ih, "K_ANY"); + + if (cb) + { + int ret = cb(ih, code); + if (ret != IUP_CONTINUE) + return ret; + } + } + return IUP_DEFAULT; +} + +int iupKeyCallKeyPressCb(Ihandle *ih, int code, int press) +{ + IFnii cb = (IFnii)IupGetCallback(ih, "KEYPRESS_CB"); + if (cb) return cb(ih, code, press); + return IUP_DEFAULT; +} + +int iupKeyProcessNavigation(Ihandle* ih, int key, int shift) +{ + /* this is called after K_ANY is processed, + so the user may change its behavior */ + + if (key == K_cTAB) + { + int is_multiline = (iupStrEqual(ih->iclass->name, "multiline") || + (iupStrEqual(ih->iclass->name, "text") && IupGetInt(ih, "MULTILINE"))); + if (is_multiline) + { + if (shift) + IupPreviousField(ih); + else + IupNextField(ih); + return 0; /* abort default processing */ + } + } + else if (key == K_TAB || key == K_sTAB) + { + int is_multiline = (iupStrEqual(ih->iclass->name, "multiline") || + (iupStrEqual(ih->iclass->name, "text") && IupGetInt(ih, "MULTILINE"))); + if (!is_multiline) + { + if (key == K_sTAB) + IupPreviousField(ih); + else + IupNextField(ih); + return 0; /* abort default processing */ + } + } + else if (key == K_UP || key == K_DOWN) + { + int is_button = (iupStrEqual(ih->iclass->name, "button") || + iupStrEqual(ih->iclass->name, "toggle")); + if (is_button) + { + if (key == K_UP) + iupFocusPrevious(ih); + else + iupFocusNext(ih); + return 0; /* abort default processing */ + } + } + else if (key==K_ESC) + { + Ihandle* bt = IupGetAttributeHandle(IupGetDialog(ih), "DEFAULTESC"); + if (iupObjectCheck(bt) && iupStrEqual(bt->iclass->name, "button")) + iupdrvActivate(bt); + return 0; /* abort default processing */ + } + else if (key==K_CR || key==K_cCR) + { + int is_multiline = (iupStrEqual(ih->iclass->name, "multiline") || + (iupStrEqual(ih->iclass->name, "text") && IupGetInt(ih, "MULTILINE"))); + + if ((key==K_CR && !is_multiline) || (key==K_cCR && is_multiline)) + { + Ihandle* bt = IupGetAttributeHandle(IupGetDialog(ih), "DEFAULTENTER"); + if (iupObjectCheck(bt) && iupStrEqual(bt->iclass->name, "button")) + iupdrvActivate(bt); + return 0; /* abort default processing */ + } + } + + return 1; +} + diff --git a/iup/src/iup_key.h b/iup/src/iup_key.h new file mode 100755 index 0000000..37d6c9d --- /dev/null +++ b/iup/src/iup_key.h @@ -0,0 +1,70 @@ +/** \file + * \brief Manage keys encoding and decoding. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_KEY_H +#define __IUP_KEY_H + + +/** \defgroup key Key Coding and Key Callbacks + * \par + * See \ref iup_key.h + * \ingroup cpi */ + + +/** Returns the key name from its code. + * Returns NULL if code not found. + * \ingroup key */ +char *iupKeyCodeToName(int code); + +/** Returns the key code from its name. + * Returns 0 if name not found. + * \ingroup key */ +int iupKeyNameToCode(const char *name); + +/** Returns true if the key code can be changed by CAPSLOCK. + * \ingroup key */ +int iupKeyCanCaps(int code); + +/** Calls a function for each defined key. + * \ingroup key */ +void iupKeyForEach(void (*func)(const char *name, int code, void* user_data), void* user_data); + +/** Calls the K_ANY or K_* callbacks. Should be called when a keyboard event occoured. + * \ingroup key */ +int iupKeyCallKeyCb(Ihandle *ih, int c); + +/** Calls the KEYPRESS_CB callback. Should be called when a keyboard event occoured. + * \ingroup key */ +int iupKeyCallKeyPressCb(Ihandle *ih, int code, int press); + +/** Process Tab, DEFAULTENTER and DEFAULTESC in key press events. + * \ingroup key */ +int iupKeyProcessNavigation(Ihandle* ih, int key, int shift); + + +/* Called only from IupOpen. */ +void iupKeyInit(void); + + +#define IUPKEY_STATUS_SIZE 11 /* 10 chars + null */ +#define IUPKEY_STATUS_INIT " " /* 10 spaces */ +#define iupKEYSETSHIFT(_s) (_s[0]='S') +#define iupKEYSETCONTROL(_s) (_s[1]='C') +#define iupKEYSETBUTTON1(_s) (_s[2]='1') +#define iupKEYSETBUTTON2(_s) (_s[3]='2') +#define iupKEYSETBUTTON3(_s) (_s[4]='3') +#define iupKEYSETDOUBLE(_s) (_s[5]='D') +#define iupKEYSETALT(_s) (_s[6]='A') +#define iupKEYSETSYS(_s) (_s[7]='Y') +#define iupKEYSETBUTTON4(_s) (_s[8]='4') +#define iupKEYSETBUTTON5(_s) (_s[9]='5') + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_label.c b/iup/src/iup_label.c new file mode 100755 index 0000000..33d96af --- /dev/null +++ b/iup/src/iup_label.c @@ -0,0 +1,183 @@ +/** \file + * \brief Label Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_label.h" +#include "iup_image.h" + + +static int iLabelSetSeparatorAttrib(Ihandle* ih, const char* value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + if (value) + { + if (iupStrEqualNoCase(value, "HORIZONTAL")) + ih->expand = IUP_EXPAND_WIDTH; + else if (iupStrEqualNoCase(value, "VERTICAL")) + ih->expand = IUP_EXPAND_HEIGHT; + else + return 0; + } + + return 1; +} + +static char* iLabelGetSeparatorAttrib(Ihandle* ih) +{ + if (ih->handle) + { + if (ih->data->type == IUP_LABEL_SEP_HORIZ) + return "HORIZONTAL"; + else if (ih->data->type == IUP_LABEL_SEP_VERT) + return "VERTICAL"; + } + return NULL; +} + +char* iupLabelGetPaddingAttrib(Ihandle* ih) +{ + if (ih->data->type != IUP_LABEL_SEP_HORIZ && ih->data->type != IUP_LABEL_SEP_VERT) + { + char *str = iupStrGetMemory(50); + sprintf(str, "%dx%d", ih->data->horiz_padding, ih->data->vert_padding); + return str; + } + else + return NULL; +} + + +/**************************************************************************************/ + + +static int iLabelCreateMethod(Ihandle* ih, void** params) +{ + if (params && params[0]) + iupAttribStoreStr(ih, "TITLE", (char*)(params[0])); + + ih->data = iupALLOCCTRLDATA(); + + /* used only by the Windows driver */ + ih->data->vert_alignment = IUP_ALIGN_ACENTER; + return IUP_NOERROR; +} + +static void iLabelComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int natural_w = 0, + natural_h = 0, + type = ih->data->type; + (void)expand; /* unset if not a container */ + + if (!ih->handle) + { + /* if not mapped must initialize the internal values */ + char* value = iupAttribGet(ih, "SEPARATOR"); + if (value) + { + if (iupStrEqualNoCase(value, "HORIZONTAL")) + type = IUP_LABEL_SEP_HORIZ; + else /* "VERTICAL" */ + type = IUP_LABEL_SEP_VERT; + } + else + { + value = iupAttribGet(ih, "IMAGE"); + if (value) + type = IUP_LABEL_IMAGE; + else + type = IUP_LABEL_TEXT; + } + } + + if (type == IUP_LABEL_SEP_HORIZ) + natural_h = 2; + else if (type == IUP_LABEL_SEP_VERT) + natural_w = 2; + else if (type == IUP_LABEL_IMAGE) + { + iupImageGetInfo(iupAttribGet(ih, "IMAGE"), &natural_w, &natural_h, NULL); + + natural_w += 2*ih->data->horiz_padding; + natural_h += 2*ih->data->vert_padding; + } + else /* IUP_LABEL_TEXT */ + { + /* must use IupGetAttribute to check from the native implementation */ + char* title = IupGetAttribute(ih, "TITLE"); + char* str = iupStrProcessMnemonic(title, NULL, 0); /* remove & */ + iupdrvFontGetMultiLineStringSize(ih, str, &natural_w, &natural_h); + if (str && str!=title) free(str); + + natural_w += 2*ih->data->horiz_padding; + natural_h += 2*ih->data->vert_padding; + } + + *w = natural_w; + *h = natural_h; +} + + +/******************************************************************************/ + + +Ihandle* IupLabel(const char* title) +{ + void *params[2]; + params[0] = (void*)title; + params[1] = NULL; + return IupCreatev("label", params); +} + +Iclass* iupLabelGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "label"; + ic->format = "S"; /* one optional string */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iLabelCreateMethod; + ic->ComputeNaturalSize = iLabelComputeNaturalSizeMethod; + + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Common Callbacks */ + iupClassRegisterCallback(ic, "MAP_CB", ""); + iupClassRegisterCallback(ic, "UNMAP_CB", ""); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* IupLabel only */ + iupClassRegisterAttribute(ic, "SEPARATOR", iLabelGetSeparatorAttrib, iLabelSetSeparatorAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupdrvLabelInitClass(ic); + + return ic; +} diff --git a/iup/src/iup_label.h b/iup/src/iup_label.h new file mode 100755 index 0000000..f50d26f --- /dev/null +++ b/iup/src/iup_label.h @@ -0,0 +1,37 @@ +/** \file + * \brief Label Controls Private Declarations + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_LABEL_H +#define __IUP_LABEL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +void iupdrvLabelInitClass(Iclass* ic); + +char* iupLabelGetPaddingAttrib(Ihandle* ih); + +enum{IUP_LABEL_SEP_HORIZ, IUP_LABEL_SEP_VERT, IUP_LABEL_IMAGE, IUP_LABEL_TEXT}; + +struct _IcontrolData +{ + int type, /* the 4 labels possibilities */ + horiz_padding, vert_padding; /* label margin */ + + /* used only by the Windows driver */ + int horiz_alignment, vert_alignment, + text_style; + unsigned long fgcolor; +}; + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_layout.c b/iup/src/iup_layout.c new file mode 100755 index 0000000..b96293c --- /dev/null +++ b/iup/src/iup_layout.c @@ -0,0 +1,273 @@ +/** \file + * \brief Abstract Layout Management + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_drv.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_layout.h" +#include "iup_assert.h" + + +void IupRefresh(Ihandle* ih) +{ + Ihandle* dialog; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + dialog = IupGetDialog(ih); + if (dialog) + { + iupLayoutCompute(dialog); + if (dialog->handle) + iupLayoutUpdate(dialog); + } +} + +static void iLayoutDisplayUpdateChildren(Ihandle *ih) +{ + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + { + iLayoutDisplayUpdateChildren(child); + + if (child->handle && child->iclass->nativetype != IUP_TYPEVOID) + iupdrvDisplayUpdate(child); + } +} + +void IupUpdate(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (ih->handle && ih->iclass->nativetype != IUP_TYPEVOID) + iupdrvDisplayUpdate(ih); +} + +void IupUpdateChildren(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + iLayoutDisplayUpdateChildren(ih); +} + +static void iLayoutDisplayRedrawChildren(Ihandle *ih) +{ + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + { + iLayoutDisplayRedrawChildren(child); + + if (child->handle && child->iclass->nativetype != IUP_TYPEVOID) + iupdrvDisplayRedraw(child); + } +} + +void IupRedraw(Ihandle* ih, int children) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (ih->handle && ih->iclass->nativetype != IUP_TYPEVOID) + iupdrvDisplayRedraw(ih); + + if (children) + iLayoutDisplayRedrawChildren(ih); +} + +void iupLayoutUpdate(Ihandle* ih) +{ + Ihandle* child; + + /* update size and position of the native control */ + iupClassObjectLayoutUpdate(ih); + + /* update its children */ + for (child = ih->firstchild; child; child = child->brother) + { + if (child->handle) + iupLayoutUpdate(child); + } +} + +void iupLayoutCompute(Ihandle* ih) +{ + int shrink = iupAttribGetBoolean(ih, "SHRINK"); + + /* Compute the natural size for all elements in the dialog, + using the minimum visible size and the defined user size. + The minimum visible size is the size where all the controls can display + all their contents. + The defined user size is used to increase the value of the minimum visible size for containers, + for standard controls will replace the minimum visible size. + So the native size will be the maximum value between + minimum visible size and defined user size. + Also calculates the expand configuration for each element, but expand is used only in SetChildrenCurrentSize. + SEQUENCE: will first calculate the native size for the children, then for the element. */ + iupBaseComputeNaturalSize(ih); + + /* Set the current size (not reflected in the native element yet) based on + the natural size and the expand configuration. + If shrink is 0 (default) the current size of containers can be only larger than the natural size, + the result will depend on the EXPAND attribute. + If shrink is 1 the containers can be resized to sizes smaller than the natural size. + SEQUENCE: will first calculate the current size of the element, then for the children. */ + iupBaseSetCurrentSize(ih, 0, 0, shrink); + + /* Now that the current size is known, set the position of the elements + relative to the parent. + SEQUENCE: will first set the position of the element, then for the children. */ + iupBaseSetPosition(ih, 0, 0); +} + +static void iLayoutSetMinMaxSize(Ihandle* ih, int *w, int *h) +{ + if (ih->has_minsize) + { + char* value = iupAttribGet(ih, "MINSIZE"); + int min_w = 0, min_h = 0; /* MINSIZE default value */ + iupStrToIntInt(value, &min_w, &min_h, 'x'); + if (*w < min_w) *w = min_w; + if (*h < min_h) *h = min_h; + } + + if (ih->has_maxsize) + { + char* value = iupAttribGet(ih, "MAXSIZE"); + int max_w = 65535, max_h = 65535; /* MAXSIZE default value */ + iupStrToIntInt(value, &max_w, &max_h, 'x'); + if (*w > max_w) *w = max_w; + if (*h > max_h) *h = max_h; + } +} + +void iupBaseComputeNaturalSize(Ihandle* ih) +{ + /* always initialize the natural size using the user size */ + ih->naturalwidth = ih->userwidth; + ih->naturalheight = ih->userheight; + + if (ih->iclass->childtype!=IUP_CHILDNONE || ih->iclass->nativetype == IUP_TYPEDIALOG) + { + int w=0, h=0, children_expand; + + /* if a container then update the "expand" member from the EXPAND attribute */ + iupBaseContainerUpdateExpand(ih); + children_expand = ih->expand; /* use it as default value */ + + iupClassObjectComputeNaturalSize(ih, &w, &h, &children_expand); + + if (ih->iclass->nativetype == IUP_TYPEDIALOG) + { + /* only update the natural size if user size is not defined. */ + /* IupDialog is the only container where this must be done */ + /* if the natural size is bigger than the actual dialog size then + the dialog will be resized, if smaller then the dialog remains with the same size. */ + ih->expand |= children_expand; + if (ih->naturalwidth <= 0) ih->naturalwidth = iupMAX(ih->currentwidth, w); + if (ih->naturalheight <= 0) ih->naturalheight = iupMAX(ih->currentheight, h); + } + else + { + ih->expand &= children_expand; /* combine but only expand where the element can expand */ + ih->naturalwidth = iupMAX(ih->naturalwidth, w); + ih->naturalheight = iupMAX(ih->naturalheight, h); + + /* crop the natural size */ + iLayoutSetMinMaxSize(ih, &(ih->naturalwidth), &(ih->naturalheight)); + } + } + else + { + /* for non-container only compute if user size is not defined */ + if (ih->naturalwidth <= 0 || ih->naturalheight <= 0) + { + int w=0, h=0; + iupClassObjectComputeNaturalSize(ih, &w, &h, NULL); + + if (ih->naturalwidth <= 0) ih->naturalwidth = w; + if (ih->naturalheight <= 0) ih->naturalheight = h; + } + + /* crop the natural size */ + iLayoutSetMinMaxSize(ih, &(ih->naturalwidth), &(ih->naturalheight)); + } +} + +void iupBaseSetCurrentSize(Ihandle* ih, int w, int h, int shrink) +{ + if (ih->iclass->nativetype == IUP_TYPEDIALOG) + { + /* w and h parameters here are ignored, because they are always 0 for the dialog. */ + + /* current size is zero before map and when reset by the application */ + /* after that the current size must follow the actual size of the dialog */ + if (!ih->currentwidth) ih->currentwidth = ih->naturalwidth; + if (!ih->currentheight) ih->currentheight = ih->naturalheight; + + if (ih->firstchild) + iupClassObjectSetChildrenCurrentSize(ih, shrink); + } + else + { + if (ih->iclass->childtype!=IUP_CHILDNONE) + { + if (shrink) + { + /* if expand then use the given size, else use the natural size */ + /* this expand is a combination of the expand defined for the element and its children */ + ih->currentwidth = (ih->expand & IUP_EXPAND_WIDTH)? w: ih->naturalwidth; + ih->currentheight = (ih->expand & IUP_EXPAND_HEIGHT)? h: ih->naturalheight; + } + else + { + /* if expand then use the given size (if greater than natural size), else use the natural size */ + /* this expand is a combination of the expand defined for the element and its children */ + ih->currentwidth = (ih->expand & IUP_EXPAND_WIDTH)? iupMAX(ih->naturalwidth, w): ih->naturalwidth; + ih->currentheight = (ih->expand & IUP_EXPAND_HEIGHT)? iupMAX(ih->naturalheight, h): ih->naturalheight; + } + + if (ih->firstchild) + iupClassObjectSetChildrenCurrentSize(ih, shrink); + } + else + { + /* shrink is only used by containers, usually is 0 */ + /* for non containers is always 1, so they always can be smaller than the natural size */ + + /* if expand use the given size, else use the natural size */ + /* this expand is the defined for the element */ + ih->currentwidth = (ih->expand & IUP_EXPAND_WIDTH)? w: ih->naturalwidth; + ih->currentheight = (ih->expand & IUP_EXPAND_HEIGHT)? h: ih->naturalheight; + } + + /* crop the current size if expanded */ + if (ih->expand & IUP_EXPAND_WIDTH || ih->expand & IUP_EXPAND_HEIGHT) + iLayoutSetMinMaxSize(ih, &(ih->currentwidth), &(ih->currentheight)); + } +} + +void iupBaseSetPosition(Ihandle* ih, int x, int y) +{ + ih->x = x; + ih->y = y; + + if (ih->firstchild) + iupClassObjectSetChildrenPosition(ih, x, y); +} diff --git a/iup/src/iup_layout.h b/iup/src/iup_layout.h new file mode 100755 index 0000000..a2a0c29 --- /dev/null +++ b/iup/src/iup_layout.h @@ -0,0 +1,28 @@ +/** \file + * \brief Abstract Layout Management + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_LAYOUT_H +#define __IUP_LAYOUT_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* called from IupMap and IupRefresh */ +void iupLayoutCompute(Ihandle* ih); /* can be called before map */ +void iupLayoutUpdate(Ihandle* ih); /* called only after map */ + +/* Other functions declared in and implemented here. +IupRefresh +*/ + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_ledlex.c b/iup/src/iup_ledlex.c new file mode 100755 index 0000000..3283a43 --- /dev/null +++ b/iup/src/iup_ledlex.c @@ -0,0 +1,366 @@ +/** \file + * \brief lexical analysis manager for LED + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_class.h" +#include "iup_ledlex.h" +#include "iup_str.h" +#include "iup_table.h" +#include "iup_register.h" + + +static struct /* lexical variables */ +{ + const char* filename; /* file name */ + const char* f; + FILE* file; /* file handle */ + int token; /* lookahead iLexToken */ + char name[40960]; /* lexical identifier value */ + float number; /* lexical number value */ + int line; /* line number */ + Iclass *ic; /* control class when func is CONTROL_ */ +} ilex = {NULL, NULL, NULL, 0, "", (float) 0.0, 0, NULL}; + +static int iLexGetChar (void); +static int iLexToken(int *erro); +static int iLexCapture (char* dlm); +static int iLexSkip (char* dlm); +static int iLexCaptureAttr (void); + +int iupLexStart(const char* filename, int is_file) /* initialize lexical analysis */ +{ + ilex.filename = filename; + if (is_file) + { + ilex.file = fopen (ilex.filename,"r"); + if (!ilex.file) + return iupLexError (IUPLEX_FILENOTOPENED, filename); + } + else + { + ilex.f = ilex.filename; + ilex.file = NULL; + } + ilex.line = 0; + ilex.line = 1; + return iupLexAdvance(); +} + +void iupLexClose(void) +{ + if (!ilex.file) + return; + fclose (ilex.file); + ilex.file = NULL; +} + +static void iLexUngetc(int c) +{ + if (ilex.file) + ungetc(c, ilex.file); + else + { + if (*ilex.f != 0) + *(char*)ilex.f = (char)c; /* write back to the string ???? */ + } +} + +static int iLexGetc(void) +{ + if (ilex.file) + return getc(ilex.file); + else + { + if (*ilex.f != 0) + ilex.f++; + if (*ilex.f == 0) + return EOF; + return *ilex.f; + } +} + +int iupLexLookAhead(void) +{ + return ilex.token; +} + +int iupLexAdvance(void) +{ + int erro = 0; + ilex.token = iLexToken(&erro); + return erro; +} + +int iupLexFollowedBy(int t) +{ + return (ilex.token==t); +} + +int iupLexMatch(int t) +{ + if (ilex.token==t) + return iupLexAdvance(); + else + return iupLexError (IUPLEX_NOTMATCH, ilex.token, t); +} + + +int iupLexSeenMatch(int t, int *erro) +{ + if (ilex.token==t) + { + *erro = iupLexAdvance(); + return 1; + } + else + return 0; +} + +unsigned char iupLexByte(void) +{ + unsigned int b; + sscanf(ilex.name,"%u", &b); /* read as integer to avoid reading number as characters */ + if (b>255) b = 255; + return (unsigned char)b; +} + +int iupLexInt(void) +{ + int i; + sscanf(ilex.name,"%d", &i); + return i; +} + +float iupLexFloat(void) +{ + float f; + sscanf(ilex.name,"%g", &f); + return f; +} + +char* iupLexGetName(void) +{ + if (ilex.name) + return iupStrDup(ilex.name); + else + return NULL; +} + +char* iupLexName(void) +{ + return ilex.name; +} + +float iupLexGetNumber(void) +{ + return ilex.number; +} + +Iclass *iupLexGetClass(void) +{ + return ilex.ic; +} + +static int iLexToken(int *erro) +{ + for (;;) + { + int c = iLexGetChar(); + switch (c) + { + case 26: + case EOF: + return IUPLEX_TK_END; + + case ']': + return IUPLEX_TK_ENDATTR; + + case '#': /* iLexSkip comment */ + case '%': /* iLexSkip comment */ + iLexSkip ("\n\r"); + continue; + + case ' ': /* ignore whitespace */ + case '\t': + case '\n': + case '\r': + case '\f': + case '\v': + continue; + + case '=': /* attribuicao */ + return IUPLEX_TK_SET; + + case ',': + return IUPLEX_TK_COMMA; + + case '(': /* begin parameters */ + return IUPLEX_TK_BEGP; + + case ')': /* end parameters */ + return IUPLEX_TK_ENDP; + + case '[': /* attributes */ + if (iLexCaptureAttr() == IUPLEX_TK_END) + { + *erro=iupLexError (IUPLEX_NOTENDATTR); + return 0; + } + return IUPLEX_TK_ATTR; + + case '\"': /* string */ + iLexCapture ("\""); + return IUPLEX_TK_STR; + + case '\'': /* string */ + iLexCapture ("\'"); + return IUPLEX_TK_STR; + + default: + if (c > 32) /* identifier */ + { + char class_name[50]; + iLexUngetc(c); + iLexUngetc(iLexCapture ("=[](), \t\n\r\f\v")); + iupStrLower(class_name, iupLexName()); + ilex.ic = iupRegisterFindClass(class_name); + if (ilex.ic) + return IUPLEX_TK_FUNC; + else + return IUPLEX_TK_NAME; + } + } + return c; + } +} + +static int iLexCapture (char* dlm) +{ + int i=0; + int c; + do + { + c = iLexGetChar (); + if (i < sizeof(ilex.name)) + ilex.name[i++] = (char) c; + } while ((c > 0) && !strchr (dlm,c)); + ilex.name[i-1]='\0'; /* discard delimiter */ + return c; /* return delimiter */ +} + +static int iLexCaptureAttr (void) +{ + int i=0; + int c; + int aspas=0; + do + { + c = iLexGetChar (); + if (i < sizeof(ilex.name)) + ilex.name[i++] = (char) c; + if (c == '"') + ++aspas; + } while ((c > 0) && ((aspas & 1) || c != ']')); + ilex.name[i-1]='\0'; /* discard delimiter */ + return c; /* return delimiter */ +} + +static int iLexSkip (char* dlm) +{ + int c; + do + { + c = iLexGetChar (); + } while ((c > 0) && !strchr (dlm,c)); + return c; /* return delimiter */ +} + +static int iLexGetChar (void) +{ + int c = iLexGetc(); if (c == '\n') ++ilex.line; + if (c == '\\') + { + c = iLexGetc(); + if (c == 'n') + return '\n'; + else if (c == '\\') + return '\\'; + } + return c; +} + +static char* iupTokenStr(int t) +{ + switch (t) + { + case IUPLEX_TK_END : return "end of file"; + case IUPLEX_TK_BEGP : return "("; + case IUPLEX_TK_ENDP : return ")"; + case IUPLEX_TK_ATTR : return "["; + case IUPLEX_TK_STR : return "string"; + case IUPLEX_TK_NAME : return "identifier"; + case IUPLEX_TK_NUMB : return "number"; + case IUPLEX_TK_SET : return "="; + case IUPLEX_TK_COMMA: return ","; + case IUPLEX_TK_FUNC : return "function"; + case IUPLEX_TK_ENDATTR : return "]"; + } + return ""; +} + +static char ilex_erromsg[10240]; + +char *iupLexGetError(void) +{ + return ilex_erromsg; +} + +int iupLexError (int n, ...) +{ + char msg[10240]; + va_list va; + va_start(va,n); + switch (n) + { + case IUPLEX_FILENOTOPENED: + { + char *fn=va_arg(va,char *); + sprintf (msg, "cannot open file %s", fn); + } + break; + case IUPLEX_NOTMATCH: + { + int tr=va_arg(va,int); /* iLexToken read */ + int te=va_arg(va,int); /* iLexToken expected */ + char *str=iupTokenStr(tr); + char *ste=iupTokenStr(te); + sprintf (msg, "expected %s but found %s", ste, str); + } + break; + case IUPLEX_NOTENDATTR: + { + sprintf (msg, "missing ']'"); + } + break; + case IUPLEX_PARSEERROR: + { + char* s=va_arg(va,char*); /* iLexToken expected */ + sprintf(msg,"%.*s",(int)(sizeof(msg)-1),s); + } + break; + } + va_end(va); + sprintf(ilex_erromsg, "led(%s): bad input at line %d - %s\n", ilex.filename, ilex.line, msg); + return n; +} diff --git a/iup/src/iup_ledlex.h b/iup/src/iup_ledlex.h new file mode 100755 index 0000000..ad79ee1 --- /dev/null +++ b/iup/src/iup_ledlex.h @@ -0,0 +1,54 @@ +/** \file + * \brief lexical analysis manager for LED. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_LEX_H +#define __IUP_LEX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* TOKENS */ +#define IUPLEX_TK_END -1 +#define IUPLEX_TK_BEGP 1 +#define IUPLEX_TK_ENDP 2 +#define IUPLEX_TK_ATTR 3 +#define IUPLEX_TK_STR 4 +#define IUPLEX_TK_NAME 5 +#define IUPLEX_TK_NUMB 6 +#define IUPLEX_TK_SET 7 +#define IUPLEX_TK_COMMA 8 +#define IUPLEX_TK_FUNC 9 +#define IUPLEX_TK_ENDATTR 10 + +/* ERRORS */ +#define IUPLEX_FILENOTOPENED 1 +#define IUPLEX_NOTMATCH 2 +#define IUPLEX_NOTENDATTR 3 +#define IUPLEX_PARSEERROR 4 + +char* iupLexGetError (void); +int iupLexStart (const char *filename, int is_file); +void iupLexClose (void); +int iupLexLookAhead (void); +int iupLexAdvance (void); +int iupLexFollowedBy (int t); +int iupLexMatch (int t); +int iupLexSeenMatch (int t, int *erro); +unsigned char iupLexByte (void); +int iupLexInt (void); +float iupLexFloat (void); +char* iupLexGetName (void); +char* iupLexName (void); +float iupLexGetNumber (void); +int iupLexError (int n, ...); +Iclass* iupLexGetClass (void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_ledparse.c b/iup/src/iup_ledparse.c new file mode 100755 index 0000000..2878e0b --- /dev/null +++ b/iup/src/iup_ledparse.c @@ -0,0 +1,288 @@ +/** \file + * \brief parser for LED. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_ledlex.h" +#include "iup_str.h" +#include "iup_assert.h" + + +#define IPARSE_SYMBEXIST 1 +#define IPARSE_SYMBNOTDEF 2 + +static Ihandle* iParseExp (void); +static Ihandle* iParseFunction (Iclass *ic); +static int iParseError (int err, char *s); + +static int iparse_error = 0; +#define IPARSE_RETURN_IF_ERRO(_e) {iparse_error=(_e); if (iparse_error) return NULL;} +#define IPARSE_RETURN_IF_ERRO2(_e, _x) {iparse_error=(_e); if (iparse_error) { if (_x) free(_x); return NULL;} } + + +char* IupLoad(const char *filename) +{ + iupASSERT(filename!=NULL); + if (!filename) + return "invalid file name"; + + iparse_error = iupLexStart(filename, 1); + if (iparse_error) + { + iupLexClose(); + return iupLexGetError(); + } + + while (iupLexLookAhead() != IUPLEX_TK_END) + { + iParseExp(); + if (iparse_error) + { + iupLexClose(); + return iupLexGetError(); + } + } + + iupLexClose(); + return NULL; +} + +char* IupLoadBuffer(const char *buffer) +{ + iupASSERT(buffer!=NULL); + if (!buffer) + return "invalid buffer"; + + iparse_error = iupLexStart(buffer, 0); + if (iparse_error) + { + iupLexClose(); + return iupLexGetError(); + } + + while (iupLexLookAhead() != IUPLEX_TK_END) + { + iParseExp(); + if (iparse_error) + { + iupLexClose(); + return iupLexGetError(); + } + } + + iupLexClose(); + return NULL; +} + +static Ihandle* iParseExp(void) +{ + char* nm = NULL; + Ihandle* ih = NULL; + + int match = iupLexSeenMatch(IUPLEX_TK_FUNC,&iparse_error); + IPARSE_RETURN_IF_ERRO(iparse_error); + + if (match) + return iParseFunction(iupLexGetClass()); + + if (iupLexLookAhead() == IUPLEX_TK_NAME) + { + nm = iupLexGetName(); + IPARSE_RETURN_IF_ERRO(iupLexAdvance()); + } + else + { + iparse_error = iupLexMatch(IUPLEX_TK_NAME); + return NULL; /* force iparse_error */ + } + + match = iupLexSeenMatch(IUPLEX_TK_SET,&iparse_error); + IPARSE_RETURN_IF_ERRO(iparse_error); + + if (match) + { + ih = iParseExp(); + IPARSE_RETURN_IF_ERRO(iparse_error); + IupSetHandle(nm, ih); + } + else + { + ih = IupGetHandle(nm); + if (!ih) + IPARSE_RETURN_IF_ERRO(iParseError(IPARSE_SYMBNOTDEF,nm)); + } + + if (nm) free(nm); + return ih; +} + +static void* iParseControlParam(char type) +{ + switch(type) + { + case 'a': + IPARSE_RETURN_IF_ERRO(iupLexMatch(IUPLEX_TK_NAME)); + return iupLexGetName(); + + case 's': + IPARSE_RETURN_IF_ERRO(iupLexMatch(IUPLEX_TK_STR)); + return iupLexGetName(); + + case 'b': + case 'c': + IPARSE_RETURN_IF_ERRO(iupLexMatch(IUPLEX_TK_NAME)); + return (void*)(unsigned long)iupLexByte(); + + case 'i': + case 'j': + IPARSE_RETURN_IF_ERRO(iupLexMatch(IUPLEX_TK_NAME)); + return (void*)(unsigned long)iupLexInt(); + + case 'f': + IPARSE_RETURN_IF_ERRO(iupLexMatch(IUPLEX_TK_NAME)); + { + float f = iupLexFloat(); + unsigned long* l = (unsigned long*)&f; + return (void*)*l; + } + + case 'g': + case 'h': + { + char *new_control = (char*)iParseExp(); + IPARSE_RETURN_IF_ERRO(iparse_error); + return new_control; + } + + default: + return 0; + } +} + +static Ihandle* iParseControl(Iclass *ic) +{ + const char *format = ic->format; + if (!format || format[0] == 0) + return iupObjectCreate(ic, NULL); + else + { + Ihandle *new_control; + void** params; + int i, alloc_arg, num_arg, + num_format = strlen(format); + + num_arg = num_format; + alloc_arg = num_arg+20; + params = (void**)malloc(sizeof(void*)*alloc_arg); + + for (i = 0; i < num_arg; ) + { + char p_format = (char)tolower(format[i]); /* there is no optional parameters in LED */ + + if (i > 0) + IPARSE_RETURN_IF_ERRO2(iupLexMatch (IUPLEX_TK_COMMA), params); + + if (p_format != 'j' && /* not array */ + p_format != 'g' && + p_format != 'c') + { + params[i] = iParseControlParam(p_format); + i++; + IPARSE_RETURN_IF_ERRO2(iparse_error, params); + } + else /* array */ + { + int match; + do + { + if (num_arg == i) + { + num_arg++; + if (num_arg >= alloc_arg) + { + alloc_arg = num_arg+20; + params = realloc(params, sizeof(void*)*alloc_arg); + } + } + params[i] = iParseControlParam(p_format); + i++; + IPARSE_RETURN_IF_ERRO2(iparse_error, params); + match = iupLexSeenMatch(IUPLEX_TK_COMMA,&iparse_error); + IPARSE_RETURN_IF_ERRO2(iparse_error, params); + } while (match); + + /* after an array of parameters there are no more parameters */ + break; + } + } + + params[i] = NULL; + new_control = iupObjectCreate(ic, params); + + for (i = 0; params[i] && i +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_assert.h" +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_mask.h" +#include "iup_list.h" + + +void iupListSingleCallDblClickCallback(Ihandle* ih, IFnis cb, int pos) +{ + char *text; + char str[30]; + + if (pos<=0) + return; + + sprintf(str, "%d", pos); + text = IupGetAttribute(ih, str); + + if (cb(ih, pos, text) == IUP_CLOSE) + IupExitLoop(); +} + +static void iListCallActionCallback(Ihandle* ih, IFnsii cb, int pos, int state) +{ + char *text; + char str[30]; + + if (pos<=0) + return; + + sprintf(str, "%d", pos); + text = IupGetAttribute(ih, str); + + if (cb(ih, text, pos, state) == IUP_CLOSE) + IupExitLoop(); +} + +void iupListSingleCallActionCallback(Ihandle* ih, IFnsii cb, int pos) +{ + char* old_str = iupAttribGet(ih, "_IUPLIST_OLDVALUE"); + if (old_str) + { + int oldpos = atoi(old_str); + if (oldpos != pos) + { + iListCallActionCallback(ih, cb, oldpos, 0); + iListCallActionCallback(ih, cb, pos, 1); + } + } + else + iListCallActionCallback(ih, cb, pos, 1); + iupAttribSetInt(ih, "_IUPLIST_OLDVALUE", pos); +} + +void iupListMultipleCallActionCallback(Ihandle* ih, IFnsii cb, IFns multi_cb, int* pos, int sel_count) +{ + int i, count = iupdrvListGetCount(ih); + + char* old_str = iupAttribGet(ih, "_IUPLIST_OLDVALUE"); + int old_count = old_str? strlen(old_str): 0; + + char* str = iupStrGetMemory(count+1); + memset(str, '-', count); + str[count]=0; + for (i=0; i= old_count) /* new items, if selected then call the callback */ + { + if (str[i] == '+') + iListCallActionCallback(ih, cb, i+1, 1); + } + else if (str[i] != old_str[i]) + { + if (str[i] == '+') + iListCallActionCallback(ih, cb, i+1, 1); + else + iListCallActionCallback(ih, cb, i+1, 0); + } + } + } + + iupAttribStoreStr(ih, "_IUPLIST_OLDVALUE", str); +} + +int iupListGetPos(Ihandle* ih, const char* name_id) +{ + int pos; + if (iupStrToInt(name_id, &pos)) + { + int count = iupdrvListGetCount(ih); + + pos--; /* IUP items start at 1 */ + + if (pos < 0) return -1; + if (pos > count-1) return -1; + + return pos; + } + return -1; +} + +void iupListSetInitialItems(Ihandle* ih) +{ + char str[20], *value; + int i = 1; + sprintf(str, "%d", i); + while ((value = iupAttribGet(ih, str))!=NULL) + { + iupdrvListAppendItem(ih, value); + iupAttribSetStr(ih, str, NULL); + + i++; + sprintf(str, "%d", i); + } +} + +char* iupListGetSpacingAttrib(Ihandle* ih) +{ + if (!ih->data->is_dropdown) + { + char *str = iupStrGetMemory(50); + sprintf(str, "%d", ih->data->spacing); + return str; + } + else + return NULL; +} + +char* iupListGetPaddingAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + char *str = iupStrGetMemory(50); + sprintf(str, "%dx%d", ih->data->horiz_padding, ih->data->vert_padding); + return str; + } + else + return NULL; +} + +char* iupListGetNCAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + char* str = iupStrGetMemory(100); + sprintf(str, "%d", ih->data->nc); + return str; + } + else + return NULL; +} + +int iupListSetIdValueAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int pos; + if (iupStrToInt(name_id, &pos)) + { + int count = iupdrvListGetCount(ih); + + pos--; /* IUP starts at 1 */ + + if (!value) + { + if (pos >= 0 && pos <= count-1) + { + if (pos == 0) + iupdrvListRemoveAllItems(ih); + else + { + int i = pos; + while (i < count) + { + iupdrvListRemoveItem(ih, pos); + i++; + } + } + } + } + else + { + if (pos >= 0 && pos <= count-1) + { + iupdrvListRemoveItem(ih, pos); + iupdrvListInsertItem(ih, pos, value); + } + else if (pos == count) + iupdrvListAppendItem(ih, value); + } + } + return 1; +} + +static int iListSetAppendItemAttrib(Ihandle* ih, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + if (value) + iupdrvListAppendItem(ih, value); + return 0; +} + +static int iListSetInsertItemAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + if (value) + { + int pos = iupListGetPos(ih, name_id); + if (pos!=-1) + iupdrvListInsertItem(ih, pos, value); + } + return 0; +} + +static int iListSetRemoveItemAttrib(Ihandle* ih, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + if (!value) + iupdrvListRemoveAllItems(ih); + else + { + int pos = iupListGetPos(ih, value); + if (pos!=-1) + iupdrvListRemoveItem(ih, pos); + } + return 0; +} + +static int iListGetCount(Ihandle* ih) +{ + int count; + if (ih->handle) + count = iupdrvListGetCount(ih); + else + { + char str[20]; + count = 0; + sprintf(str, "%d", count+1); + while (iupAttribGet(ih, str)) + { + count++; + sprintf(str, "%d", count+1); + } + } + return count; +} + +static char* iListGetCountAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(50); + sprintf(str, "%d", iListGetCount(ih)); + return str; +} + +static int iListSetDropdownAttrib(Ihandle* ih, const char* value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + if (iupStrBoolean(value)) + { + ih->data->is_dropdown = 1; + ih->data->is_multiple = 0; + } + else + ih->data->is_dropdown = 0; + + return 0; +} + +static char* iListGetDropdownAttrib(Ihandle* ih) +{ + if (ih->data->is_dropdown) + return "YES"; + else + return "NO"; +} + +static int iListSetMultipleAttrib(Ihandle* ih, const char* value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + if (iupStrBoolean(value)) + { + ih->data->is_multiple = 1; + ih->data->is_dropdown = 0; + ih->data->has_editbox = 0; + } + else + ih->data->is_multiple = 0; + + return 0; +} + +static char* iListGetMultipleAttrib(Ihandle* ih) +{ + if (ih->data->is_multiple) + return "YES"; + else + return "NO"; +} + +static int iListSetEditboxAttrib(Ihandle* ih, const char* value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + if (iupStrBoolean(value)) + { + ih->data->has_editbox = 1; + ih->data->is_multiple = 0; + } + else + ih->data->has_editbox = 0; + + return 0; +} + +static char* iListGetEditboxAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + return "YES"; + else + return "NO"; +} + +static int iListSetScrollbarAttrib(Ihandle* ih, const char* value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + else if (iupStrBoolean(value)) + ih->data->sb = 1; + else + ih->data->sb = 0; + + return 0; +} + +static char* iListGetScrollbarAttrib(Ihandle* ih) +{ + if (ih->data->sb) + return "YES"; + else + return "NO"; +} + +static char* iListGetMaskDataAttrib(Ihandle* ih) +{ + if (!ih->data->has_editbox) + return NULL; + + /* Used only by the OLD iupmask API */ + return (char*)ih->data->mask; +} + +static int iListSetMaskAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_editbox) + return 0; + + if (!value) + { + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); + } + else + { + int casei = iupAttribGetInt(ih, "MASKCASEI"); + Imask* mask = iupMaskCreate(value,casei); + if (mask) + { + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); + + ih->data->mask = mask; + return 1; + } + } + + return 0; +} + +static int iListSetMaskIntAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_editbox) + return 0; + + if (!value) + { + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); + + iupAttribSetStr(ih, "MASK", NULL); + } + else + { + Imask* mask; + int min, max; + + if (iupStrToIntInt(value, &min, &max, ':')!=2) + return 0; + + mask = iupMaskCreateInt(min,max); + + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); + + ih->data->mask = mask; + + if (min < 0) + iupAttribSetStr(ih, "MASK", IUP_MASK_INT); + else + iupAttribSetStr(ih, "MASK", IUP_MASK_UINT); + } + + return 0; +} + +static int iListSetMaskFloatAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_editbox) + return 0; + + if (!value) + { + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); + + iupAttribSetStr(ih, "MASK", NULL); + } + else + { + Imask* mask; + float min, max; + + if (iupStrToFloatFloat(value, &min, &max, ':')!=2) + return 0; + + mask = iupMaskCreateFloat(min,max); + + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); + + ih->data->mask = mask; + + if (min < 0) + iupAttribSetStr(ih, "MASK", IUP_MASK_FLOAT); + else + iupAttribSetStr(ih, "MASK", IUP_MASK_UFLOAT); + } + + return 0; +} + + +/*****************************************************************************************/ + + +static int iListCreateMethod(Ihandle* ih, void** params) +{ + if (params && params[0]) + iupAttribStoreStr(ih, "ACTION", (char*)(params[0])); + + ih->data = iupALLOCCTRLDATA(); + ih->data->sb = 1; + + return IUP_NOERROR; +} + +static void iListGetNaturalItemsSize(Ihandle *ih, int *w, int *h) +{ + char *value; + int visiblecolumns, + count = iListGetCount(ih); + + *w = 0; + *h = 0; + + iupdrvFontGetCharSize(ih, w, h); /* one line height, and one character width */ + + visiblecolumns = iupAttribGetInt(ih, "VISIBLECOLUMNS"); + if (visiblecolumns) + { + *w = iupdrvFontGetStringWidth(ih, "WWWWWWWWWW"); + *w = (visiblecolumns*(*w))/10; + } + else + { + int item_w, i; + char str[20]; + + for (i=1; i<=count; i++) + { + sprintf(str, "%d", i); + value = IupGetAttribute(ih, str); /* must use IupGetAttribute to check the native system */ + if (value) + { + item_w = iupdrvFontGetStringWidth(ih, value); + if (item_w > *w) + *w = item_w; + } + } + + if (*w == 0) /* default is 5 characters in 1 item */ + *w = iupdrvFontGetStringWidth(ih, "WWWWW"); + } + + /* compute height for multiple lines, drodown is just 1 line */ + if (!ih->data->is_dropdown) + { + int visiblelines, num_lines, line_size = *h; + + iupdrvListAddItemSpace(ih, h); /* this independs from spacing */ + + *h += 2*ih->data->spacing; /* this will be multiplied by the number of lines */ + *w += 2*ih->data->spacing; /* include also horizontal spacing */ + + num_lines = count; + if (num_lines == 0) num_lines = 1; + + visiblelines = iupAttribGetInt(ih, "VISIBLELINES"); + if (visiblelines) + num_lines = visiblelines; + + *h = *h * num_lines; + + if (ih->data->has_editbox) + *h += line_size; + } +} + +static void iListComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int natural_w, natural_h; + int sb_size = iupdrvGetScrollbarSize(); + (void)expand; /* unset if not a container */ + + iListGetNaturalItemsSize(ih, &natural_w, &natural_h); + + /* compute the borders space */ + iupdrvListAddBorders(ih, &natural_w, &natural_h); + + if (ih->data->is_dropdown) + { + /* add room for dropdown box */ + natural_w += sb_size; + + if (natural_h < sb_size) + natural_h = sb_size; + } + else + { + /* add room for scrollbar */ + if (ih->data->sb) + { + natural_h += sb_size; + natural_w += sb_size; + } + } + + if (ih->data->has_editbox) + { + natural_w += 2*ih->data->horiz_padding; + natural_h += 2*ih->data->vert_padding; + } + + *w = natural_w; + *h = natural_h; +} + +static void iListDestroyMethod(Ihandle* ih) +{ + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); +} + + +/******************************************************************************/ + + +Ihandle* IupList(const char* action) +{ + void *params[2]; + params[0] = (void*)action; + params[1] = NULL; + return IupCreatev("list", params); +} + +Iclass* iupListGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "list"; + ic->format = "A"; /* one optional callback name */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + ic->has_attrib_id = 1; + + /* Class functions */ + ic->Create = iListCreateMethod; + ic->Destroy = iListDestroyMethod; + ic->ComputeNaturalSize = iListComputeNaturalSizeMethod; + + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "ACTION", "sii"); + iupClassRegisterCallback(ic, "MULTISELECT_CB", "s"); + iupClassRegisterCallback(ic, "DROPFILES_CB", "siii"); + iupClassRegisterCallback(ic, "DROPDOWN_CB", "i"); + iupClassRegisterCallback(ic, "DBLCLICK_CB", "is"); + iupClassRegisterCallback(ic, "VALUECHANGED_CB", ""); + + iupClassRegisterCallback(ic, "EDIT_CB", "is"); + iupClassRegisterCallback(ic, "CARET_CB", "iii"); + + /* Common Callbacks */ + iupBaseRegisterCommonCallbacks(ic); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* IupList only */ + iupClassRegisterAttribute(ic, "SCROLLBAR", iListGetScrollbarAttrib, iListSetScrollbarAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MULTIPLE", iListGetMultipleAttrib, iListSetMultipleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DROPDOWN", iListGetDropdownAttrib, iListSetDropdownAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "EDITBOX", iListGetEditboxAttrib, iListSetEditboxAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "COUNT", iListGetCountAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "INSERTITEM", NULL, iListSetInsertItemAttrib, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "APPENDITEM", NULL, iListSetAppendItemAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "REMOVEITEM", NULL, iListSetRemoveItemAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AUTOHIDE", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "MASKCASEI", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MASK", NULL, iListSetMaskAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MASKINT", NULL, iListSetMaskIntAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MASKFLOAT", NULL, iListSetMaskFloatAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "OLD_MASK_DATA", iListGetMaskDataAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "VISIBLECOLUMNS", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VISIBLELINES", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupdrvListInitClass(ic); + + return ic; +} diff --git a/iup/src/iup_list.h b/iup/src/iup_list.h new file mode 100755 index 0000000..045116b --- /dev/null +++ b/iup/src/iup_list.h @@ -0,0 +1,53 @@ +/** \file + * \brief List Control + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_LIST_H +#define __IUP_LIST_H + +#ifdef __cplusplus +extern "C" { +#endif + + +void iupdrvListInitClass(Iclass* ic); +void iupdrvListAddBorders(Ihandle* ih, int *w, int *h); +void iupdrvListAddItemSpace(Ihandle* ih, int *h); +int iupdrvListGetCount(Ihandle* ih); +void iupdrvListAppendItem(Ihandle* ih, const char* value); +void iupdrvListInsertItem(Ihandle* ih, int pos, const char* value); +void iupdrvListRemoveItem(Ihandle* ih, int pos); +void iupdrvListRemoveAllItems(Ihandle* ih); + +int iupListGetPos(Ihandle* ih, const char* name_id); +int iupListSetIdValueAttrib(Ihandle* ih, const char* name_id, const char* value); +void iupListSetInitialItems(Ihandle* ih); +void iupListSingleCallActionCallback(Ihandle* ih, IFnsii cb, int pos); +void iupListMultipleCallActionCallback(Ihandle* ih, IFnsii cb, IFns multi_cb, int* pos, int sel_count); +char* iupListGetNCAttrib(Ihandle* ih); +char* iupListGetPaddingAttrib(Ihandle* ih); +char* iupListGetSpacingAttrib(Ihandle* ih); +void iupListSingleCallDblClickCallback(Ihandle* ih, IFnis cb, int pos); + +struct _IcontrolData +{ + int sb, /* scrollbar configuration, can be changed only before map */ + nc, + spacing, + horiz_padding, + vert_padding, + last_caret_pos, + is_multiple, + is_dropdown, + has_editbox; + Imask* mask; +}; + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_mask.c b/iup/src/iup_mask.c new file mode 100755 index 0000000..f241a22 --- /dev/null +++ b/iup/src/iup_mask.c @@ -0,0 +1,146 @@ +/** \file + * \brief mask pattern matching + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup_maskparse.h" +#include "iup_mask.h" +#include "iup_str.h" + + +#define IUP_MASK_FLOAT "[+/-]?(/d+/.?/d*|/./d+)" +#define IUP_MASK_UFLOAT "(/d+/.?/d*|/./d+)" +#define IUP_MASK_INT "[+/-]?/d+" +#define IUP_MASK_UINT "/d+" + +struct _Imask +{ + char* mask_str; + ImaskParsed* fsm; + int casei; + char type; + float fmin, + fmax; + int imin, + imax; +}; + + +int iupMaskCheck(Imask* mask, const char *val) +{ + int ret; + + /* empty text or no mask */ + if (!val || !(*val) || !mask) + return 1; + + ret = iupMaskMatch(val,mask->fsm,0,NULL,NULL,NULL,mask->casei); + if (ret == IMASK_PARTIALMATCH) + return -1; + if (ret != (int)strlen(val)) + return 0; + + switch(mask->type) + { + case 'I': + { + int ival = 0; + sscanf(val,"%d",&ival); + if(ival < mask->imin || ival > mask->imax) + return 0; + break; + } + case 'F': + { + float fval = 0; + sscanf(val,"%f",&fval); + if(fval < mask->fmin || fval > mask->fmax) + return 0; + break; + } + } + + return 1; +} + +Imask* iupMaskCreate(const char* mask_str, int casei) +{ + ImaskParsed* fsm; + Imask* mask; + char* copy_mask_str; + + if (!mask_str) + return NULL; + + /* Parse the mask first */ + copy_mask_str = iupStrDup(mask_str); + if (iupMaskParse(copy_mask_str, &fsm) != IMASK_PARSE_OK) + { + free(copy_mask_str); + return NULL; + } + + mask = (Imask*)malloc(sizeof(Imask)); + memset(mask, 0, sizeof(Imask)); + + mask->mask_str = copy_mask_str; + mask->casei = casei; + mask->fsm = fsm; + + return mask; +} + +Imask* iupMaskCreateInt(int min, int max) +{ + Imask* mask; + + if (min < 0) + mask = iupMaskCreate(IUP_MASK_INT, 0); + else + mask = iupMaskCreate(IUP_MASK_UINT, 0); + + if (mask) + { + mask->imin = min; + mask->imax = max; + mask->type = 'I'; + } + + return mask; +} + +Imask* iupMaskCreateFloat(float min, float max) +{ + Imask* mask; + + if (min < 0) + mask = iupMaskCreate(IUP_MASK_FLOAT, 0); + else + mask = iupMaskCreate(IUP_MASK_UFLOAT, 0); + + if (mask) + { + mask->fmin = min; + mask->fmax = max; + mask->type = 'F'; + } + + return mask; +} + +void iupMaskDestroy(Imask* mask) +{ + free(mask->mask_str); + free(mask->fsm); + free(mask); +} + +char* iupMaskGetStr(Imask* mask) +{ + return mask->mask_str; +} diff --git a/iup/src/iup_mask.h b/iup/src/iup_mask.h new file mode 100755 index 0000000..5e87f24 --- /dev/null +++ b/iup/src/iup_mask.h @@ -0,0 +1,55 @@ +/** \file + * \brief Mask functions + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_MASK_H +#define __IUP_MASK_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup mask Text Mask + * \par + * Used to filter text input in IupText. + * \par + * See \ref iup_mask.h + * \ingroup util */ + +typedef struct _Imask Imask; + +/** Creates a mask given a string. \n + * If casei is true, will turn the mask case insensitive. + * \ingroup mask */ +Imask* iupMaskCreate(const char* mask_str, int casei); + +/** Creates an integer mask with limits. + * \ingroup mask */ +Imask* iupMaskCreateInt(int min, int max); + +/** Creates a float mask with limits. + * \ingroup mask */ +Imask* iupMaskCreateFloat(float min, float max); + +/** Destroys the mask. + * \ingroup mask */ +void iupMaskDestroy(Imask* mask); + +/** Check if the value is valid using the mask to filter it. + * Returns 1 if full match, -1 if partial match, and 0 otherwise. + * \ingroup mask */ +int iupMaskCheck(Imask* mask, const char *value); + +/** Returns the mask string. + * \ingroup mask */ +char* iupMaskGetStr(Imask* mask); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_maskmatch.c b/iup/src/iup_maskmatch.c new file mode 100755 index 0000000..f0aa9fd --- /dev/null +++ b/iup/src/iup_maskmatch.c @@ -0,0 +1,582 @@ +/** \file + * \brief iupmask imask_match_functions + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup_maskparse.h" +#include "iup_maskmatch.h" + + +#define IMASK_MIN_STACK_ELEMENTS 1000 +enum {IMASK_CAPT_OPEN, IMASK_CAPT_CLOSE}; + +typedef struct _ImaskCapt +{ + struct _ImaskCapt* next_one; + int type; + short which_one; + long pos; +} ImaskCapt; + +typedef struct _ImaskMatchVars +{ + const char *text; + ImaskParsed *fsm; + iMaskMatchFunc function; + short *tested; + void *user; +} ImaskMatchVars; + + +typedef struct _ImaskStack +{ + short *stack; + short size; +} ImaskStack; + + +#define isalphanum(_x) (isalnum((int)(_x)) || ((_x) == '_')) + + +/* match functions corresponding to regular expressions */ + +static int match_blanks (const char *text, long j) +{ + return (((text[j] == '\t') || (text[j] == '\xff') || (text[j] == ' ') || + (text[j] == '\n'))) ? IMASK_NORMAL_MATCH : IMASK_NO_MATCH; +} + +static int match_non_blanks (const char *text, long j) +{ + return (!((text[j] == '\t') || (text[j] == '\xff') || + (text[j] == ' ') || (text[j] == '\n'))) + ? IMASK_NORMAL_MATCH : IMASK_NO_MATCH; +} + +static int match_alpha (const char *text, long j) +{ + return (isalpha((int)text[j])) ? IMASK_NORMAL_MATCH : IMASK_NO_MATCH; +} + +static int match_non_alpha (const char *text, long j) +{ + return (!isalpha((int)text[j]) && (text[j] != '\0')) + ? IMASK_NORMAL_MATCH : IMASK_NO_MATCH; +} + +static int match_digit (const char *text, long j) +{ + return (isdigit((int)text[j])) ? IMASK_NORMAL_MATCH : IMASK_NO_MATCH; +} + +static int match_non_digit (const char *text, long j) +{ + return (!isdigit((int)text[j]) && (text[j] != '\0')) + ? IMASK_NORMAL_MATCH : IMASK_NO_MATCH; +} + +static int match_alphanum (const char *text, long j) +{ + return isalphanum (text[j]) ? IMASK_NORMAL_MATCH : IMASK_NO_MATCH; +} + +static int match_non_alphanum (const char *text, long j) +{ + return (isalphanum (text[j]) || (text[j] == '\0')) + ? IMASK_NO_MATCH : IMASK_NORMAL_MATCH; +} + +static int match_word_boundary (const char *text, long j) +{ + if ((j == 0) && isalphanum (text[j])) + return IMASK_NO_CHAR_MATCH; + + else if (isalphanum (text[j - 1]) && !isalphanum (text[j])) + return IMASK_NO_CHAR_MATCH; + + else if (isalphanum (text[j]) && !isalphanum (text[j - 1])) + return IMASK_NO_CHAR_MATCH; + + return IMASK_NO_MATCH; + +} + +static ImaskMatchFunc imask_match_functions[] = +{ + {'w', &match_alphanum}, + {'W', &match_non_alphanum}, + {'d', &match_digit}, + {'D', &match_non_digit}, + {'S', &match_non_blanks}, + {'s', &match_blanks}, + {'b', &match_word_boundary}, + {'l', &match_alpha}, + {'L', &match_non_alpha}, + {'\0', NULL} +}; + +ImaskMatchFunc* iupMaskMatchGetFuncs(void) +{ + return imask_match_functions; +} + +static void iMaskMatchCaptureResult (ImaskMatchVars * vars, ImaskCapt * capture) +{ + ImaskCapt *next = NULL; + + while (capture != NULL) + { + ImaskCapt *cap = capture->next_one; + + capture->next_one = next; + next = capture; + capture = cap; + } + + capture = next; + next = NULL; + + while (capture != NULL) + { + if (capture->type == IMASK_CAPT_OPEN) + { + ImaskCapt *cap = capture->next_one; + + capture->next_one = next; + next = capture; + capture = cap; + } + else + { + if (capture->pos >= next->pos) + (*vars->function)((char)capture->which_one, next->pos, capture->pos, vars->text, vars->user); + + next = next->next_one; + capture = capture->next_one; + } + } +} + +static long iMaskMatchRecursive (ImaskMatchVars * vars, long j, int state, ImaskCapt * capture, int size) +{ + switch (vars->fsm[state].command) + { + case IMASK_NULL_CMD: + if (vars->fsm[state].next1 == 0) /*se chegou ao fim da maquina de estados */ + { + if (vars->function != NULL) + iMaskMatchCaptureResult (vars, capture); /* guarda capturas */ + + return j; + } + + /* verifica o estado atual ja foi avaliado antes */ + { + int count; + for (count = 0; count < size; count++) + if (vars->tested[count] == state) + return IMASK_NOMATCH; + } + + vars->tested[size++] = (short)state; /* indicada que o estado foi testado */ + + /* se houverem dois ramos, chama a funcao recursivamente, + retornando com o primeiro que completar a maquina */ + + if (vars->fsm[state].next1 != vars->fsm[state].next2) + { + long a; + + a = iMaskMatchRecursive (vars, j, vars->fsm[state].next2, capture, size); + + if (a != IMASK_NOMATCH) /* se deu match */ + return a; + + a = iMaskMatchRecursive (vars, j, vars->fsm[state].next1, capture, size); + + return a; + } + break; + + case IMASK_CAP_OPEN_CMD: + { + long a; + ImaskCapt new_cap; + + new_cap.next_one = capture; + new_cap.type = IMASK_CAPT_OPEN; + new_cap.pos = j; + new_cap.which_one = vars->fsm[state].ch; + + a = iMaskMatchRecursive (vars, j, vars->fsm[state].next1, &new_cap, size); + + return a; + } + break; + + case IMASK_CAP_CLOSE_CMD: + { + long a; + ImaskCapt new_cap; + + new_cap.next_one = capture; + new_cap.type = IMASK_CAPT_CLOSE; + new_cap.pos = j - 1; + new_cap.which_one = vars->fsm[state].ch; + + a = iMaskMatchRecursive (vars, j, vars->fsm[state].next1, &new_cap, size); + + return a; + } + + case IMASK_CLASS_CMD: + { + int temp, found = 0, negate; + + temp = vars->fsm[state].next1; + negate = vars->fsm[state].next2; + state++; + + while (vars->fsm[state].command != IMASK_NULL_CMD) + { + if (vars->fsm[state].command == IMASK_CLASS_CMD_RANGE) + { + if ((vars->text[j] >= vars->fsm[state].ch) && + (vars->text[j] <= vars->fsm[state].next1)) + { + found = 1; + break; + } + } + + else if ((vars->fsm[state].command == IMASK_CLASS_CMD_CHAR) && + (vars->text[j] == vars->fsm[state].ch)) + { + found = 1; + break; + }; + state++; + } + + if (found ^ negate) + { + if (vars->text[j] == '\0') + return IMASK_NOMATCH; + j++; + vars->tested = &vars->tested[size + 1]; + size = 0; + return iMaskMatchRecursive (vars, j, temp, capture, size); + } + else + return IMASK_NOMATCH; + } + + case IMASK_CHAR_CMD: + if (vars->text[j] != vars->fsm[state].ch) + return IMASK_NOMATCH; + j++; + vars->tested = &vars->tested[size + 1]; + size = 0; + break; + + case IMASK_ANY_CMD: + if ((vars->text[j] == '\0') || (vars->text[j] == '\n')) + return IMASK_NOMATCH; + j++; + vars->tested = &vars->tested[size + 1]; + size = 0; + break; + + case IMASK_SPC_CMD: + { + long a; + + a = (*imask_match_functions[(int) vars->fsm[state].ch].function) (vars->text, j); + + switch (a) + { + case IMASK_NO_MATCH: + return IMASK_NOMATCH; + + case IMASK_NORMAL_MATCH: + j++; + vars->tested = &vars->tested[size + 1]; + size = 0; + break; + + case IMASK_NO_CHAR_MATCH:; /* does nothing */ + } + } + break; + + case IMASK_BEGIN_CMD: + if (!((vars->text[j - 1] == '\n') || (j == 0))) + return IMASK_NOMATCH; + + break; + + case IMASK_END_CMD: + if (!((vars->text[j] == '\n') || (vars->text[j] == '\0'))) + return IMASK_NOMATCH; + + break; + } + + return iMaskMatchRecursive (vars, j, vars->fsm[state].next1, capture, size); +} + +static int iMaskInStack (ImaskStack * stack, int state) +{ + int a; + for (a = 0; a < stack->size; a++) + if (stack->stack[a] == state) + return 1; + + return 0; +} + +static void iMaskNewStack (ImaskStack * new_stack, short *stack) +{ + new_stack->size = 0; + new_stack->stack = stack; +} + +static void iMaskPushStack (ImaskStack * stack, int value) +{ + stack->stack[stack->size++] = (short)value; +} + +static void iMaskMoveStack (ImaskStack * dest, ImaskStack * source) +{ + short *temp = dest->stack; + dest->stack = source->stack; + source->stack = temp; + + dest->size = source->size; + source->size = 0; +} + +/* non recursive */ +static long iMaskMatchLocal (const char *text, ImaskParsed * fsm, long start, char *addchar, int casei) +{ + int finished = IMASK_NOMATCH; + ImaskStack now, next; + short a1[IMASK_MIN_STACK_ELEMENTS]; + short a2[IMASK_MIN_STACK_ELEMENTS]; + int state; + int j = 0; + int pos; + + if (addchar) addchar[0] = 0; + + j = start; + + iMaskNewStack(&now, a1); + iMaskNewStack(&next, a2); + + iMaskPushStack (&now, fsm[0].next1); + + for (;;) + { + for (pos = 0; pos < now.size; pos++) + { + state = now.stack[pos]; + + if (state == 0) + { + finished = j - start; + continue; + } + + if (fsm[state].command == IMASK_NULL_CMD) + { + if(!iMaskInStack (&now, fsm[state].next2)) + iMaskPushStack (&now, fsm[state].next2); + + if(fsm[state].next1 != fsm[state].next2) + { + if(!iMaskInStack (&now, fsm[state].next1)) + iMaskPushStack (&now, fsm[state].next1); + } + } + else if (text[j] == '\0'); /* ignore \0 */ + else if (((fsm[state].command == IMASK_CHAR_CMD) && + ((!casei && fsm[state].ch == text[j]) || + (casei && tolower(fsm[state].ch) == tolower(text[j])) + ) + ) || + ((fsm[state].command == IMASK_ANY_CMD) && + (text[j] != '\n') + ) + ) + iMaskPushStack (&next, fsm[state].next1); + else if (fsm[state].command == IMASK_SPC_CMD) + { + int ret; + + ret = (*(imask_match_functions[(int) fsm[state].ch].function))(text, j); + switch (ret) + { + case IMASK_NO_MATCH: + break; + + case IMASK_NORMAL_MATCH: + iMaskPushStack (&next, fsm[state].next1); + break; + + case IMASK_NO_CHAR_MATCH: + iMaskPushStack (&now, fsm[state].next1); + break; + } + } + else if (fsm[state].command == IMASK_CLASS_CMD) + { + int temp, found = 0, negate; + + temp = fsm[state].next1; + negate = fsm[state].next2; + state++; + + while (fsm[state].command != IMASK_NULL_CMD) + { + if (fsm[state].command == IMASK_CLASS_CMD_RANGE) + { + if((!casei && (text[j]>=fsm[state].ch) && + (text[j]<=fsm[state].next1) + ) || + (casei && (tolower(text[j])>=tolower(fsm[state].ch)) && + (tolower(text[j])<=tolower(fsm[state].next1)) + ) + ) + { + found = 1; + break; + } + } + else if ((fsm[state].command == IMASK_CLASS_CMD_CHAR) && + ((!casei && text[j] == fsm[state].ch) || + (casei && tolower(text[j]) == tolower(fsm[state].ch)) + ) + ) + { + found = 1; + break; + } + state++; + } + + if(found ^ negate) + { + iMaskPushStack (&next, temp); + state = temp; + } + } + else if (fsm[state].command == IMASK_BEGIN_CMD) + { + if (text[j - 1] == '\n' || j == 0) + iMaskPushStack (&now, fsm[state].next1); + } + else if (fsm[state].command == IMASK_END_CMD) + { + if (text[j] == '\n' || text[j] == '\0') + iMaskPushStack (&now, fsm[state].next1); + } + } + + if (text[j] == '\0') + { + if(next.size == 0 && finished == j) + { + return finished; + } + else if(addchar) + { + int pos; + + for (pos = 0; pos < now.size; pos++) + { + state = now.stack[pos]; + if (fsm[state].command == IMASK_CHAR_CMD) + { + iMaskPushStack (&next, state); + } + else if (fsm[state].command != IMASK_NULL_CMD) + { + next.size = 0; + break; + } + else + { + if (!iMaskInStack (&now, fsm[state].next2)) + iMaskPushStack (&now, fsm[state].next2); + + if (fsm[state].next1 != fsm[state].next2) + { + if (!iMaskInStack (&now, fsm[state].next1)) + iMaskPushStack (&now, fsm[state].next1); + } + } + } + + iMaskMoveStack (&now, &next); + + if (now.size == 1) + { + int inx=0; + state = now.stack[0]; + while(fsm[state].next1 == fsm[state].next2) + { + if(fsm[state].command == IMASK_CHAR_CMD) + addchar[inx++] = fsm[state].ch; + else if(fsm[state].command != IMASK_NULL_CMD) + break; + + state = fsm[state].next1; + } + addchar[inx]=0; + } + } + return IMASK_PARTIALMATCH; + } + + j++; + + if (next.size == 0) + { + if (finished > IMASK_NOMATCH) + return finished; + + return IMASK_NOMATCH; + } + + iMaskMoveStack (&now, &next); + } +} + +int iupMaskMatch (const char *text, ImaskParsed * fsm, long start, iMaskMatchFunc function, void *user, char *addchar, int icase) +{ + long ret; + short tested[10000]; /* to be eliminated */ + ImaskMatchVars vars; + + /* use recursive only for standard capture */ + + if (fsm[0].ch == IMASK_NOCAPTURE) + return iMaskMatchLocal (text, fsm, start, addchar, icase); + + vars.text = text; + vars.fsm = fsm; + vars.tested = tested; + vars.function = function; + vars.user = user; + + ret = iMaskMatchRecursive (&vars, start, fsm[0].next1, NULL, 0); + + return (int)((ret >= start) ? ret - start : ret); +} diff --git a/iup/src/iup_maskmatch.h b/iup/src/iup_maskmatch.h new file mode 100755 index 0000000..d0c7918 --- /dev/null +++ b/iup/src/iup_maskmatch.h @@ -0,0 +1,62 @@ +/** \file + * \brief Mask match private definitions + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_MASKMATCH_H +#define __IUP_MASKMATCH_H + +#ifdef __cplusplus +extern "C" { +#endif + + +enum +{ + IMASK_NULL_CMD=1, + IMASK_ANY_CMD=2, + IMASK_CHAR_CMD=3, + IMASK_SPC_CMD=4, + IMASK_CLASS_CMD=5, + IMASK_BEGIN_CMD=6, + IMASK_END_CMD=7, + IMASK_CAP_OPEN_CMD=71, + IMASK_CAP_CLOSE_CMD=72, + IMASK_NEG_OPEN_CMD=81, + IMASK_NEG_CLOSE_CMD=82 +}; + +enum +{ + IMASK_CLASS_CMD_RANGE=50, + IMASK_CLASS_CMD_CHAR=51 +}; + +enum +{ + IMASK_NORMAL_MATCH, + IMASK_NO_CHAR_MATCH, + IMASK_NO_MATCH +}; + +enum +{ + IMASK_CAPTURE=100, + IMASK_NOCAPTURE=101 +}; + +typedef struct _ImaskMatchFunc +{ + char ch; + int (*function) (const char *, long); +} ImaskMatchFunc; + +ImaskMatchFunc* iupMaskMatchGetFuncs(void); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_maskparse.c b/iup/src/iup_maskparse.c new file mode 100755 index 0000000..859d951 --- /dev/null +++ b/iup/src/iup_maskparse.c @@ -0,0 +1,547 @@ +/** \file + * \brief imask parser + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include + +#include "iup_maskparse.h" +#include "iup_maskmatch.h" + +/* + * Table of characters (customizaveis atraves de iupMaskSetChar) + */ + +static char *imask_parse_chars = "|*+()[]-^/.?^${}~"; +/* 01234567890123456 */ + +#define OR_CH imask_parse_chars[0] /* OR CHaracter */ +#define CL_CH imask_parse_chars[1] /* CLosure CHaracter */ +#define OOM_CH imask_parse_chars[2] /* One Or More CHaracter */ +#define OPGR_CH imask_parse_chars[3] /* OPen GRoup CHaracter */ +#define CLGR_CH imask_parse_chars[4] /* CLose GRoup CHaracter */ +#define OPCL_CH imask_parse_chars[5] /* OPen CLass CHaracter */ +#define CLCL_CH imask_parse_chars[6] /* CLose CLass CHaracter */ +#define SEPCL_CH imask_parse_chars[7] /* SEParate CLass CHaracter */ +#define NEGCL_CH imask_parse_chars[8] /* NEGation CLass CHaracter */ +#define SPC_CH imask_parse_chars[9] /* SPeCial function CHaracter */ +#define ANY_CH imask_parse_chars[10] /* ANY CHaracter */ +#define ONE_CH imask_parse_chars[11] /* ONE or no CHaracter */ +#define BEGIN_CH imask_parse_chars[12] /* BEGINning of a line CHaracter*/ +#define END_CH imask_parse_chars[13] /* END of a line CHaracter */ +#define CAP_OPEN_CH imask_parse_chars[14] /* CAPture OPEN CHaracter */ +#define CAP_CLOSE_CH imask_parse_chars[15] /* CAPture CLOSE CHaracter */ +#define NEG_CH imask_parse_chars[16] /* NEGation CHaracter */ + +#define SPC2_CH '\\' /* SPeCial 2 CHaracter */ + +#define isvalid(c) (c != 0 && c != OR_CH && c != OPGR_CH && c != CLGR_CH &&\ + c != CL_CH && c != OPCL_CH && c != CLCL_CH &&\ + c != CAP_OPEN_CH && c != CAP_CLOSE_CH && c != OOM_CH) + +#define STATE_BLOCK 30 + +typedef struct _ImaskParseVars +{ + const char *string; + int state, j, num_states; + ImaskParsed *fsm; + short capture[30]; + short size; + char nextcap; + jmp_buf env; +} ImaskParseVars; + +static int iMaskParseExpression (ImaskParseVars * vars); +static int iMaskParseTerm (ImaskParseVars * vars); +static int iMaskParseFactor (ImaskParseVars * vars); +static void iMaskParseError (ImaskParseVars *vars); +static void iMaskParseNewState (ImaskParseVars * vars); +static void iMaskParseSetState (ImaskParseVars * vars, int state, char ch, char command, int next1, int next2); + +int iupMaskSetChar (int char_number, char new_char) +{ + if ((char_number < 0) || (char_number > (int)strlen(imask_parse_chars))) + return 0; + + imask_parse_chars[char_number] = new_char; + + return 1; +} + + /* + * Funcao de interface, recebe padrao e retorna array contendo as finite + * state machines (fsm) construidas a partir do padrao + */ + +int iupMaskParse(const char *text, ImaskParsed ** fsm) +{ + int t; + ImaskParseVars vars; + + /* inicializacao das variaveis */ + + vars.state = 1; + vars.j = 0; + vars.num_states = 0; + vars.size = 0; + vars.nextcap = 0; + vars.string = text; + + if ((vars.fsm = (ImaskParsed *) malloc (STATE_BLOCK * sizeof (ImaskParsed))) == NULL) + return IMASK_MEM_ERROR; + + vars.num_states = STATE_BLOCK; + + /* a principio, nao ha captura. Se ocorrer uma, ele e setado + para IMASK_CAPTURE */ + + vars.fsm[0].ch = IMASK_NOCAPTURE; + + if (setjmp (vars.env) == 0) + t = iMaskParseExpression (&vars); + + else + { + free (vars.fsm); + return IMASK_PARSE_ERROR; + } + + /* seta os estados inicial e final, guardando no inicial + (fsm[0].next1) o tamanho da maquina */ + + iMaskParseSetState (&vars, 0, vars.fsm[0].ch, IMASK_NULL_CMD, t, vars.state + 1); + iMaskParseSetState (&vars, vars.state, 0, IMASK_NULL_CMD, 0, 0); + + *fsm = vars.fsm; + + return IMASK_PARSE_OK; +} + +static int iMaskParseExpression (ImaskParseVars * vars) +{ + int r, t1; + int last_state = vars->state - 1; + + t1 = iMaskParseTerm (vars); + r = t1; + + if (vars->string[vars->j] == OR_CH) + { + int t2 = vars->state; + int t3; + + r = t2; + + vars->j++; + iMaskParseNewState (vars); + + t3 = iMaskParseExpression (vars); /* pega o 2o ramo do OR */ + + /* faz o primeiro state antes do OR apontar para o state de entrada + * do OR */ + + if (vars->fsm[last_state].next1 == t1) + vars->fsm[last_state].next1 = t2; + + if (vars->fsm[last_state].next2 == t1) + vars->fsm[last_state].next2 = t2; + + /* faz o ultimo state do primeiro ramo do OR apontar para o + * state de saida do OR */ + + if (vars->fsm[t2 - 1].next1 == t2) + vars->fsm[t2 - 1].next1 = vars->state; + + if (vars->fsm[t2 - 1].next2 == t2) + vars->fsm[t2 - 1].next2 = vars->state; + + iMaskParseSetState (vars, t2, 0, IMASK_NULL_CMD, t1, t3); + iMaskParseSetState (vars, vars->state, 0, IMASK_NULL_CMD, vars->state + 1, + vars->state + 1); + + iMaskParseNewState (vars); + } + return r; +} + +static int iMaskParseTerm (ImaskParseVars * vars) +{ + int r; + + r = iMaskParseFactor (vars); + + if ((vars->string[vars->j] == OPGR_CH) || + (isvalid (vars->string[vars->j])) || + (vars->string[vars->j] == OPCL_CH) || + (vars->string[vars->j] == CAP_OPEN_CH) || + (vars->string[vars->j] == NEG_CH)) + iMaskParseTerm (vars); + + if (!((vars->string[vars->j] == OR_CH) || + (vars->string[vars->j] == CLGR_CH) || + (vars->string[vars->j] == '\0') || + (vars->string[vars->j] == CAP_CLOSE_CH))) + iMaskParseError (vars); + + return r; +} + +static int iMaskParseFactor (ImaskParseVars * vars) +{ + int r, t1, t2 = 0; + + t1 = vars->state; + + if (vars->string[vars->j] == OPGR_CH) + { + vars->j++; + t2 = iMaskParseExpression (vars); + + if (vars->string[vars->j] == CLGR_CH) + vars->j++; + else + iMaskParseError (vars); + } + + else if (vars->string[vars->j] == CAP_OPEN_CH) + { + vars->fsm[0].ch = IMASK_CAPTURE; + iMaskParseSetState (vars, vars->state, vars->nextcap, + IMASK_CAP_OPEN_CMD, vars->state + 1, vars->state + 1); + t2 = vars->state; + iMaskParseNewState (vars); + vars->capture[++vars->size] = vars->nextcap++; + vars->j++; + + iMaskParseExpression (vars); + + if (vars->string[vars->j] == CAP_CLOSE_CH) + { + iMaskParseSetState (vars, vars->state, (char)vars->capture[vars->size--], + IMASK_CAP_CLOSE_CMD, vars->state + 1, vars->state + 1); + + iMaskParseNewState (vars); + vars->j++; + } + else + iMaskParseError (vars); + + } + + else if (vars->string[vars->j] == ANY_CH) + { + iMaskParseSetState (vars, vars->state, 1, IMASK_ANY_CMD, vars->state + 1, vars->state + 1); + t2 = vars->state; + vars->j++; + iMaskParseNewState (vars); + } + + else if (vars->string[vars->j] == NEG_CH) + { + int t6; + t2 = vars->state; + vars->j++; + iMaskParseNewState (vars); + t6 = iMaskParseFactor (vars); + iMaskParseSetState (vars, t2, 1, IMASK_NEG_OPEN_CMD, t6, vars->state); + iMaskParseSetState (vars, vars->state, 1, IMASK_NEG_CLOSE_CMD, vars->state + 1, vars->state + 1); + iMaskParseNewState (vars); + } + + else if (vars->string[vars->j] == BEGIN_CH) + { + iMaskParseSetState (vars, vars->state, 1, IMASK_BEGIN_CMD, vars->state + 1, + vars->state + 1); + t2 = vars->state; + vars->j++; + iMaskParseNewState (vars); + } + else if (vars->string[vars->j] == END_CH) + { + iMaskParseSetState (vars, vars->state, 1, IMASK_END_CMD, vars->state + 1, + vars->state + 1); + t2 = vars->state; + vars->j++; + iMaskParseNewState (vars); + } + + else if (isvalid (vars->string[vars->j]) && (vars->string[vars->j] + != SPC_CH) && (vars->string[vars->j] != ANY_CH)) + { + iMaskParseSetState (vars, vars->state, vars->string[vars->j], + IMASK_CHAR_CMD, vars->state + 1, vars->state + 1); + t2 = vars->state; + vars->j++; + iMaskParseNewState (vars); + } + + else if (vars->string[vars->j] == OPCL_CH) + { + vars->j++; + iMaskParseSetState (vars, vars->state, 0, IMASK_CLASS_CMD, 0, 0); + + if (vars->string[vars->j] == NEGCL_CH) + { + vars->fsm[vars->state].next2 = 1; + vars->j++; + } + + t2 = vars->state; + iMaskParseNewState (vars); + + if (vars->string[vars->j] == SEPCL_CH) + iMaskParseError (vars); + + while ((vars->string[vars->j] != CLCL_CH) && (vars->string[vars->j] != '\n') + && (vars->string[vars->j] != '\0')) + { + if (vars->string[vars->j] == SPC_CH) + { + char temp; + + vars->j++; + switch (vars->string[vars->j]) + { + case 'n': + temp = '\n'; + break; + + case 't': + temp = '\t'; + break; + + case 'e': + temp = 27; + break; + + default: + temp = vars->string[vars->j]; + } + iMaskParseSetState (vars, vars->state, temp, IMASK_CLASS_CMD_CHAR, 0, 0); + vars->j++; + iMaskParseNewState (vars); + } + else if (vars->string[vars->j] == SEPCL_CH) + { + char temp = 0; + + vars->j++; + + if (vars->string[vars->j] == SPC_CH) + { + vars->j++; + switch (vars->string[vars->j]) + { + case 'n': + temp = '\n'; + break; + + case 't': + temp = '\t'; + break; + + case 'e': + temp = 27; + break; + + default: + temp = vars->string[vars->j]; + } + } + else if (vars->string[vars->j] != CLCL_CH) + temp = vars->string[vars->j]; + + else + iMaskParseError (vars); + + iMaskParseSetState (vars, vars->state - 1, vars->fsm[vars->state - 1].ch, + IMASK_CLASS_CMD_RANGE, temp, 0); + vars->j++; + } + else if (vars->string[vars->j] == BEGIN_CH) + { + iMaskParseSetState (vars, vars->state, 1, IMASK_BEGIN_CMD, vars->state + 1, vars->state + 1); + t2 = vars->state; + vars->j++; + iMaskParseNewState (vars); + } + else if (vars->string[vars->j] == END_CH) + { + iMaskParseSetState (vars, vars->state, 1, IMASK_END_CMD, vars->state + 1, vars->state + 1); + t2 = vars->state; + vars->j++; + iMaskParseNewState (vars); + } + + else + { + iMaskParseSetState (vars, vars->state, vars->string[vars->j], IMASK_CLASS_CMD_CHAR, 0, 0); + vars->j++; + iMaskParseNewState (vars); + } + + } + if (vars->string[vars->j] != CLCL_CH) + iMaskParseError (vars); + iMaskParseSetState (vars, vars->state, 0, IMASK_NULL_CMD, vars->state + 1, vars->state + 1); + vars->fsm[t2].next1 = vars->state; + vars->j++; + iMaskParseNewState (vars); + + } + + else if (vars->string[vars->j] == SPC_CH) + { + int loop1 = 0; + ImaskMatchFunc* match_functions = iupMaskMatchGetFuncs(); + + vars->j++; + + while (match_functions[loop1].ch != '\0' && + match_functions[loop1].ch != vars->string[vars->j]) + loop1++; + + if (match_functions[loop1].ch == '\0') + { + int temp; + + switch (vars->string[vars->j]) + { + case 'n': + temp = '\n'; + break; + + case 't': + temp = '\t'; + break; + + case 'e': + temp = 27; + break; + + case 'x': + vars->j++; + sscanf (&vars->string[vars->j], "%2x", &temp); + vars->j++; + break; + + case 'o': + vars->j++; + sscanf (&vars->string[vars->j], "%3o", &temp); + vars->j += 2; + break; + + default: + if (isdigit((int)vars->string[vars->j])) + { + sscanf (&vars->string[vars->j], "%3d", &temp); + if (temp > 255) + { + iMaskParseError (vars); + } + vars->j += 2; + } + else + temp = vars->string[vars->j]; + } + iMaskParseSetState (vars, vars->state, (char)temp, IMASK_CHAR_CMD, vars->state + 1, vars->state + 1); + } + + else + { + iMaskParseSetState (vars, vars->state, (char)loop1, IMASK_SPC_CMD, vars->state + 1, vars->state + 1); + } + + t2 = vars->state; + vars->j++; + iMaskParseNewState (vars); + } + else + iMaskParseError (vars); + + if (vars->string[vars->j] == CL_CH) + { + iMaskParseSetState (vars, vars->state, 0, IMASK_NULL_CMD, vars->state + 1, t2); + r = vars->state; + + if (vars->fsm[t1 - 1].next1 == t1) + vars->fsm[t1 - 1].next1 = vars->state; + + if (vars->fsm[t1 - 1].next2 == t1) + vars->fsm[t1 - 1].next2 = vars->state; + + vars->j++; + iMaskParseNewState (vars); + } + + else if (vars->string[vars->j] == ONE_CH) + { + iMaskParseSetState (vars, vars->state, 0, IMASK_NULL_CMD, vars->state + 1, t2); + r = vars->state; + + if (vars->fsm[t1 - 1].next1 == t1) + vars->fsm[t1 - 1].next1 = vars->state; + + if (vars->fsm[t1 - 1].next2 == t1) + vars->fsm[t1 - 1].next2 = vars->state; + + if (vars->fsm[vars->state - 1].next1 == vars->state) + vars->fsm[vars->state - 1].next1 = vars->state + 1; + + if (vars->fsm[vars->state - 1].next2 == vars->state) + vars->fsm[vars->state - 1].next2 = vars->state + 1; + + vars->j++; + iMaskParseNewState (vars); + + iMaskParseSetState (vars, vars->state, 0, IMASK_NULL_CMD, vars->state + 1, vars->state + 1); + + iMaskParseNewState (vars); + } + else if (vars->string[vars->j] == OOM_CH) + { + iMaskParseSetState (vars, vars->state, 0, IMASK_NULL_CMD, vars->state + 1, t2); + r = t2; + + vars->j++; + + iMaskParseNewState (vars); + + } + else + r = t2; + + return r; +} + +static void iMaskParseError (ImaskParseVars * vars) +{ + longjmp (vars->env, 1); +} + +static void iMaskParseNewState (ImaskParseVars * vars) +{ + + if (vars->state >= vars->num_states - 1) + { + ImaskParsed *new_fsm = (ImaskParsed*) realloc (vars->fsm, (vars->num_states + STATE_BLOCK) * sizeof (ImaskParsed)); + vars->fsm = new_fsm; + vars->num_states += STATE_BLOCK; + } + + vars->state++; +} + +static void iMaskParseSetState (ImaskParseVars * vars, int state, char ch, char command, int next1, int next2) +{ + vars->fsm[state].ch = ch; + vars->fsm[state].command = command; + vars->fsm[state].next1 = next1; + vars->fsm[state].next2 = next2; +} diff --git a/iup/src/iup_maskparse.h b/iup/src/iup_maskparse.h new file mode 100755 index 0000000..a12a7fa --- /dev/null +++ b/iup/src/iup_maskparse.h @@ -0,0 +1,46 @@ +/** \file + * \brief Mask internal functions + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_MASKPARSE_H +#define __IUP_MASKPARSE_H + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef struct _ImaskParsed +{ + char ch; + int command; + int next1; + int next2; +} ImaskParsed; + +typedef int (*iMaskMatchFunc) (char which_one, long next_pos, long capture_pos, const char *text, void* user_data); + +/* Parse the mask and if it is ok create and returns the internal structure. */ +int iupMaskParse(const char* mask, ImaskParsed** imk); + +/* Do the pattern matching on the given text. */ +int iupMaskMatch(const char* text, ImaskParsed* imk, long start, iMaskMatchFunc mask_func, void* user_data, char *addchar, int icase); + +/* Change a control character. */ +int iupMaskSetChar(int char_number, char new_char); + +/* iupMaskMatch return codes */ +#define IMASK_PARSE_OK 0 /* No error */ +#define IMASK_NOMATCH -1 /* no match */ +#define IMASK_MEM_ERROR -2 /* memory error */ +#define IMASK_PARSE_ERROR -3 /* parser error */ +#define IMASK_PARTIALMATCH -4 /* partial match */ + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_menu.c b/iup/src/iup_menu.c new file mode 100755 index 0000000..7e62744 --- /dev/null +++ b/iup/src/iup_menu.c @@ -0,0 +1,364 @@ +/** \file + * \brief Menu Resources. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_assert.h" +#include "iup_key.h" +#include "iup_stdcontrols.h" +#include "iup_drvinfo.h" +#include "iup_menu.h" + + +struct _IcontrolData +{ + int child_id; /* serial number used by child controls */ +}; + +static Ihandle* iMenuGetTopMenu(Ihandle* ih) +{ + for (; ih->parent; ih = ih->parent) + ; /* empty*/ + return ih; +} + +int iupMenuGetChildId(Ihandle* ih) +{ + Ihandle* dlg = IupGetDialog(ih); + if (dlg) + return iupDialogGetChildId(ih); + else + { + int id; + ih = iMenuGetTopMenu(ih); + if (!ih) return -1; + id = ih->data->child_id; + if (id == 0) id = 100; /* initial number */ + ih->data->child_id = id+1; + return id; + } +} + +char* iupMenuGetChildIdStr(Ihandle* ih) +{ + Ihandle* dlg = IupGetDialog(ih); + if (dlg) + return iupDialogGetChildIdStr(ih); + else + { + char *str = iupStrGetMemory(50); + Ihandle* dialog = iMenuGetTopMenu(ih); + sprintf(str, "iup-%s-%d", ih->iclass->name, dialog->data->child_id); + return str; + } +} + +int iupMenuIsMenuBar(Ihandle* ih) +{ + if (ih->parent && ih->parent->iclass->nativetype == IUP_TYPEDIALOG) + return 1; + else + return 0; +} + +static void iMenuAdjustPos(int *x, int *y) +{ + int cursor_x = 0, cursor_y = 0; + int screen_width = 0, screen_height = 0; + + if (*x == IUP_CENTER || *y == IUP_CENTER || + *x == IUP_RIGHT || *y == IUP_RIGHT || + *x == IUP_CENTERPARENT || *y == IUP_CENTERPARENT) + iupdrvGetScreenSize(&screen_width, &screen_height); + + if (*x == IUP_MOUSEPOS || *y == IUP_MOUSEPOS) + iupdrvGetCursorPos(&cursor_x, &cursor_y); + + switch (*x) + { + case IUP_CENTER: + *x = screen_width/2; + break; + case IUP_LEFT: + *x = 0; + break; + case IUP_RIGHT: + *x = screen_width; + break; + case IUP_MOUSEPOS: + *x = cursor_x; + break; + } + + switch (*y) + { + case IUP_CENTER: + *y = screen_height/2; + break; + case IUP_LEFT: + *y = 0; + break; + case IUP_RIGHT: + *y = screen_height; + break; + case IUP_MOUSEPOS: + *y = cursor_y; + break; + } +} + +char* iupMenuProcessTitle(Ihandle* ih, const char* title) +{ + int keychar; + char* str; + + char* key = iupAttribGet(ih, "KEY"); + if (!key) return (char*)title; + + keychar = iupKeyNameToCode(key); + if (!keychar) return (char*)title; + + str = strchr(title, keychar); + if (str) + { + int len = strlen(title); + char *new_title = malloc(len+1+1); + int pos = str-title; + memcpy(new_title, title, pos); + new_title[pos] = '&'; + memcpy(new_title+pos+1, title+pos, len-pos+1); + return new_title; + } + + return (char*)title; +} + +int iupMenuPopup(Ihandle* ih, int x, int y) +{ + iMenuAdjustPos(&x, &y); + return iupdrvMenuPopup(ih, x, y); +} + + +/******************************************************************/ + + +static int iItemCreateMethod(Ihandle* ih, void** params) +{ + if (params) + { + if (params[0]) iupAttribStoreStr(ih, "TITLE", (char*)(params[0])); + if (params[1]) iupAttribStoreStr(ih, "ACTION", (char*)(params[1])); + } + return IUP_NOERROR; +} + +static int iSubmenuCreateMethod(Ihandle* ih, void** params) +{ + if (params) + { + if (params[0]) iupAttribStoreStr(ih, "TITLE", (char*)(params[0])); + if (params[1]) + { + Ihandle* child = (Ihandle*)(params[1]); + if (child->iclass->nativetype == IUP_TYPEMENU) + IupAppend(ih, child); + } + } + return IUP_NOERROR; +} + +static int iMenuCreateMethod(Ihandle* ih, void** params) +{ + ih->data = iupALLOCCTRLDATA(); + + if (params) + { + Ihandle** iparams = (Ihandle**)params; + while (*iparams) + { + Ihandle* child = (Ihandle*)(*iparams); + if (child->iclass->nativetype == IUP_TYPEMENU) + IupAppend(ih, child); + iparams++; + } + } + + return IUP_NOERROR; +} + + +/******************************************************************************************/ + + +Iclass* iupSeparatorGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "separator"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPEMENU; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Common */ + iupClassRegisterAttribute(ic, "WID", iupBaseGetWidAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "NAME", NULL, iupBaseSetNameAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupdrvSeparatorInitClass(ic); + + return ic; +} + +Iclass* iupItemGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "item"; + ic->format = "SA"; /* one optional string and one optional callback name */ + ic->nativetype = IUP_TYPEMENU; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iItemCreateMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "HIGHLIGHT_CB", ""); + iupClassRegisterCallback(ic, "ACTION", ""); + + /* Common Callbacks */ + iupClassRegisterCallback(ic, "MAP_CB", ""); + iupClassRegisterCallback(ic, "UNMAP_CB", ""); + iupClassRegisterCallback(ic, "HELP_CB", ""); + + /* Common */ + iupClassRegisterAttribute(ic, "WID", iupBaseGetWidAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "NAME", NULL, iupBaseSetNameAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "AUTOTOGGLE", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "KEY", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupdrvItemInitClass(ic); + + return ic; +} + +Iclass* iupSubmenuGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "submenu"; + ic->format = "SH"; /* one string and one Ihandle (both optional) */ + ic->nativetype = IUP_TYPEMENU; + ic->childtype = IUP_CHILD_ONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iSubmenuCreateMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "HIGHLIGHT_CB", ""); + + /* Common Callbacks */ + iupClassRegisterCallback(ic, "MAP_CB", ""); + iupClassRegisterCallback(ic, "UNMAP_CB", ""); + + /* Common */ + iupClassRegisterAttribute(ic, "WID", iupBaseGetWidAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "NAME", NULL, iupBaseSetNameAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "KEY", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupdrvSubmenuInitClass(ic); + + return ic; +} + +Iclass* iupMenuGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "menu"; + ic->format = "g"; /* (Ihandle**) */ + ic->nativetype = IUP_TYPEMENU; + ic->childtype = IUP_CHILDMANY; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iMenuCreateMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "OPEN_CB", ""); + iupClassRegisterCallback(ic, "MENUCLOSE_CB", ""); + + /* Common Callbacks */ + iupClassRegisterCallback(ic, "MAP_CB", ""); + iupClassRegisterCallback(ic, "UNMAP_CB", ""); + + /* Common */ + iupClassRegisterAttribute(ic, "WID", iupBaseGetWidAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "NAME", NULL, iupBaseSetNameAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "RADIO", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupdrvMenuInitClass(ic); + + return ic; +} + +/************************************************************************/ + +Ihandle* IupItem(const char* title, const char* action) +{ + void *params[2]; + params[0] = (void*)title; + params[1] = (void*)action; + return IupCreatev("item", params); +} + +Ihandle* IupSubmenu(const char* title, Ihandle* child) +{ + void *params[2]; + params[0] = (void*)title; + params[1] = (void*)child; + return IupCreatev("submenu", params); +} + +Ihandle *IupMenuv(Ihandle **children) +{ + return IupCreatev("menu", (void**)children); +} + +Ihandle *IupMenu(Ihandle *child, ...) +{ + Ihandle **children; + Ihandle *ih; + + va_list arglist; + va_start(arglist, child); + children = (Ihandle **)iupObjectGetParamList(child, arglist); + va_end(arglist); + + ih = IupCreatev("menu", (void**)children); + free(children); + + return ih; +} + +Ihandle* IupSeparator(void) +{ + return IupCreate("separator"); +} diff --git a/iup/src/iup_menu.h b/iup/src/iup_menu.h new file mode 100755 index 0000000..f1eb164 --- /dev/null +++ b/iup/src/iup_menu.h @@ -0,0 +1,35 @@ +/** \file + * \brief IUP Menu Class + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_MENU_H +#define __IUP_MENU_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Shows a popup menu in the given position. +* Must return IUP_ERROR or IUP_NOERROR. +* Called only from IupPopup. +*/ +int iupMenuPopup(Ihandle* ih, int x, int y); + +int iupdrvMenuPopup(Ihandle* ih, int x, int y); +void iupdrvSeparatorInitClass(Iclass* ic); +void iupdrvItemInitClass(Iclass* ic); +void iupdrvMenuInitClass(Iclass* ic); +void iupdrvSubmenuInitClass(Iclass* ic); + +char* iupMenuProcessTitle(Ihandle* ih, const char* title); +int iupMenuGetChildId(Ihandle* ih); +char* iupMenuGetChildIdStr(Ihandle* ih); +int iupMenuIsMenuBar(Ihandle* ih); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_messagedlg.c b/iup/src/iup_messagedlg.c new file mode 100755 index 0000000..816e740 --- /dev/null +++ b/iup/src/iup_messagedlg.c @@ -0,0 +1,70 @@ +/** \file + * \brief IupMessageDlg class + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_stdcontrols.h" + + +Ihandle* IupMessageDlg(void) +{ + return IupCreate("messagedlg"); +} + +Iclass* iupMessageDlgGetClass(void) +{ + Iclass* ic = iupClassNew(iupDialogGetClass()); + + ic->name = "messagedlg"; + ic->nativetype = IUP_TYPEDIALOG; + ic->is_interactive = 1; + + /* reset not used native dialog methods */ + ic->parent->LayoutUpdate = NULL; + ic->parent->SetChildrenPosition = NULL; + ic->parent->Map = NULL; + ic->parent->UnMap = NULL; + + iupdrvMessageDlgInitClass(ic); + + /* only the default values */ + iupClassRegisterAttribute(ic, "DIALOGTYPE", NULL, NULL, IUPAF_SAMEASSYSTEM, "MESSAGE", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "BUTTONS", NULL, NULL, IUPAF_SAMEASSYSTEM, "OK", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "BUTTONDEFAULT", NULL, NULL, IUPAF_SAMEASSYSTEM, "1", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "BUTTONRESPONSE", NULL, NULL, IUPAF_SAMEASSYSTEM, "1", IUPAF_NO_INHERIT); + + return ic; +} + +void IupMessage(const char* title, const char* message) +{ + Ihandle* dlg = IupCreate("messagedlg"); + + IupSetAttribute(dlg, "TITLE", (char*)title); + IupSetAttribute(dlg, "VALUE", (char*)message); + IupSetAttribute(dlg, "PARENTDIALOG", IupGetGlobal("PARENTDIALOG")); + + IupPopup(dlg, IUP_CENTER, IUP_CENTER); + IupDestroy(dlg); +} + +void IupMessagef(const char *title, const char *format, ...) +{ + static char message[SHRT_MAX]; + va_list arglist; + va_start(arglist, format); + vsprintf(message, format, arglist); + va_end (arglist); + IupMessage(title, message); +} diff --git a/iup/src/iup_names.c b/iup/src/iup_names.c new file mode 100755 index 0000000..9ec01a6 --- /dev/null +++ b/iup/src/iup_names.c @@ -0,0 +1,193 @@ +/** \file + * \brief Ihandle <-> Name table manager. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_table.h" +#include "iup_names.h" +#include "iup_object.h" +#include "iup_class.h" +#include "iup_assert.h" +#include "iup_str.h" + + +static Itable *inames_strtable = NULL; /* table indexed by name containing Ihandle* address */ +static Itable *inames_ihtable = NULL; /* table indexed by Ihandle* address containing names */ + +void iupNamesDestroyHandles(void) +{ + char *name; + Ihandle** ih_array, *ih; + int count, i = 0; + + count = iupTableCount(inames_strtable); + if (!count) + return; + + ih_array = (Ihandle**)malloc(count * sizeof(Ihandle*)); + + /* store the names before updating so we can remove elements in the loop */ + name = iupTableFirst(inames_strtable); + while (name) + { + ih = (Ihandle*)iupTableGetCurr(inames_strtable); + if (iupObjectCheck(ih)) + { + ih_array[i] = ih; + i++; + } + name = iupTableNext(inames_strtable); + } + + count = i; + for (i = 0; i < count; i++) + { + if (iupObjectCheck(ih_array[i])) + IupDestroy(ih_array[i]); + } + + free(ih_array); +} + +void iupNamesInit(void) +{ + inames_strtable = iupTableCreate(IUPTABLE_STRINGINDEXED); + inames_ihtable = iupTableCreate(IUPTABLE_POINTERINDEXED); +} + +void iupNamesFinish(void) +{ + iupTableDestroy(inames_strtable); + inames_strtable = NULL; + + iupTableDestroy(inames_ihtable); + inames_ihtable = NULL; +} + +void iupRemoveAllNames(Ihandle* ih) +{ + char *name; + Ihandle *cur_ih; + + name = iupTableFirst(inames_strtable); + while (name) + { + cur_ih = (Ihandle*)iupTableGetCurr(inames_strtable); + if (iupObjectCheck(cur_ih) && cur_ih == ih) + iupTableRemoveCurr(inames_strtable); + + name = iupTableNext(inames_strtable); + } + + iupTableRemove(inames_ihtable, (char*)ih); +} + +Ihandle *IupGetHandle(const char *name) +{ + if (!name) /* no iupASSERT needed here */ + return NULL; + return (Ihandle*)iupTableGet (inames_strtable, name); +} + +Ihandle* IupSetHandle(const char *name, Ihandle *ih) +{ + Ihandle *old_ih; + + iupASSERT(name!=NULL); + if (!name) + return NULL; + + old_ih = iupTableGet(inames_strtable, name); + if (ih != NULL) + { + iupTableSet(inames_strtable, name, ih, IUPTABLE_POINTER); + iupTableSet(inames_ihtable, (char*)ih, (char*)name, IUPTABLE_STRING); /* keep only the last name set */ + } + else + { + ih = iupTableGet(inames_strtable, name); + iupTableRemove(inames_strtable, name); + if (ih) + { + char* cur_name = iupTableGet(inames_ihtable, (char*)ih); + if (iupStrEqualNoCase(cur_name, name)) + iupTableRemove(inames_ihtable, (char*)ih); + } + } + return old_ih; +} + +int IupGetAllNames(char** names, int n) +{ + int i = 0; + char* name; + + if (!names || !n) + return iupTableCount(inames_strtable); + + name = iupTableFirst(inames_strtable); + while (name) + { + names[i] = name; + i++; + if (i == n) + break; + + name = iupTableNext(inames_strtable); + } + return i; +} + +static int iNamesCountDialogs(void) +{ + int i = 0; + char* name = iupTableFirst(inames_strtable); + while (name) + { + Ihandle* dlg = (Ihandle*)iupTableGetCurr(inames_strtable); + if (iupObjectCheck(dlg) && dlg->iclass->nativetype == IUP_TYPEDIALOG) + i++; + + name = iupTableNext(inames_strtable); + } + return i; +} + +int IupGetAllDialogs(char** names, int n) +{ + int i = 0; + char* name; + + if (!names || !n) + return iNamesCountDialogs(); + + name = iupTableFirst(inames_strtable); + while (name) + { + Ihandle* dlg = (Ihandle*)iupTableGetCurr(inames_strtable); + if (iupObjectCheck(dlg) && dlg->iclass->nativetype == IUP_TYPEDIALOG) + { + names[i] = name; + i++; + if (i == n) + break; + } + + name = iupTableNext(inames_strtable); + } + return i; +} + +char* IupGetName(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return NULL; + return iupTableGet(inames_ihtable, (char*)ih); +} diff --git a/iup/src/iup_names.h b/iup/src/iup_names.h new file mode 100755 index 0000000..9d3adc7 --- /dev/null +++ b/iup/src/iup_names.h @@ -0,0 +1,34 @@ +/** \file + * \brief Ihandle <-> Name table manager. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_NAMES_H +#define __IUP_NAMES_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* called only in IupOpen and IupClose */ +void iupNamesInit(void); +void iupNamesFinish(void); +void iupNamesDestroyHandles(void); + +/* called from IupDestroy */ +void iupRemoveAllNames(Ihandle* ih); + +/* Other functions declared in and implemented here. +IupGetName +IupGetAllDialogs +IupGetAllNames +IupSetHandle +IupGetHandle +*/ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_normalizer.c b/iup/src/iup_normalizer.c new file mode 100755 index 0000000..7f7a5ff --- /dev/null +++ b/iup/src/iup_normalizer.c @@ -0,0 +1,188 @@ +/** \file + * \brief Normalizer Element. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_array.h" +#include "iup_stdcontrols.h" + + +enum {NORMALIZE_NONE, NORMALIZE_WIDTH, NORMALIZE_HEIGHT}; + +struct _IcontrolData +{ + Iarray* ih_array; +}; + +int iupNormalizeGetNormalizeSize(const char* value) +{ + if (!value) + return NORMALIZE_NONE; + if (iupStrEqualNoCase(value, "HORIZONTAL")) + return NORMALIZE_WIDTH; + if (iupStrEqualNoCase(value, "VERTICAL")) + return NORMALIZE_HEIGHT; + if (iupStrEqualNoCase(value, "BOTH")) + return NORMALIZE_WIDTH|NORMALIZE_HEIGHT; + return NORMALIZE_NONE; +} + +char* iupNormalizeGetNormalizeSizeStr(int normalize) +{ + char* int2str[] = {"NONE", "HORIZONTAL", "VERTICAL", "BOTH"}; + return int2str[normalize]; +} + +void iupNormalizeSizeBoxChild(Ihandle *ih, int normalize, int children_natural_maxwidth, int children_natural_maxheight) +{ + /* It is called from Vbox and Hbox ComputeNaturalSizeMethod after the natural size is calculated */ + /* reset the natural width and/or height */ + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating && (child->iclass->nativetype != IUP_TYPEVOID || !iupStrEqual(child->iclass->name, "fill"))) + { + if (normalize & NORMALIZE_WIDTH) + child->naturalwidth = children_natural_maxwidth; + if (normalize & NORMALIZE_HEIGHT) + child->naturalheight = children_natural_maxheight; + } + } +} + +static int iNormalizerSetNormalizeAttrib(Ihandle* ih, const char* value) +{ + int i, count; + Ihandle** ih_list; + Ihandle* ih_control; + int natural_maxwidth = 0, natural_maxheight = 0; + int normalize = iupNormalizeGetNormalizeSize(value); + if (!normalize) + return 1; + + count = iupArrayCount(ih->data->ih_array); + ih_list = (Ihandle**)iupArrayGetData(ih->data->ih_array); + + for (i = 0; i < count; i++) + { + ih_control = ih_list[i]; + iupBaseComputeNaturalSize(ih_control); + natural_maxwidth = iupMAX(natural_maxwidth, ih_control->naturalwidth); + natural_maxheight = iupMAX(natural_maxheight, ih_control->naturalheight); + } + + for (i = 0; i < count; i++) + { + ih_control = ih_list[i]; + if (!ih_control->is_floating && (ih_control->iclass->nativetype != IUP_TYPEVOID || !iupStrEqual(ih_control->iclass->name, "fill"))) + { + if (normalize & NORMALIZE_WIDTH) + ih_control->userwidth = natural_maxwidth; + if (normalize & NORMALIZE_HEIGHT) + ih_control->userheight = natural_maxheight; + } + } + return 1; +} + +static int iNormalizerSetAddControlHandleAttrib(Ihandle* ih, const char* value) +{ + Ihandle* ih_control = (Ihandle*)value; + Ihandle** ih_list = (Ihandle**)iupArrayInc(ih->data->ih_array); + int count = iupArrayCount(ih->data->ih_array); + ih_list[count-1] = ih_control; + return 0; +} + +static int iNormalizerSetAddControlAttrib(Ihandle* ih, const char* value) +{ + return iNormalizerSetAddControlHandleAttrib(ih, (char*)IupGetHandle(value)); +} + +static void iNormalizerComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + (void)w; + (void)h; + (void)expand; + iNormalizerSetNormalizeAttrib(ih, iupAttribGetStr(ih, "NORMALIZE")); +} + +static int iNormalizerCreateMethod(Ihandle* ih, void** params) +{ + ih->data = iupALLOCCTRLDATA(); + ih->data->ih_array = iupArrayCreate(10, sizeof(Ihandle*)); + + if (params) + { + Ihandle** iparams = (Ihandle**)params; + Ihandle** ih_list; + int i = 0; + while (*iparams) + { + ih_list = (Ihandle**)iupArrayInc(ih->data->ih_array); + ih_list[i] = *iparams; + i++; + iparams++; + } + } + + return IUP_NOERROR; +} + +static void iNormalizerDestroy(Ihandle* ih) +{ + iupArrayDestroy(ih->data->ih_array); +} + +Iclass* iupNormalizerGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "normalizer"; + ic->format = "g"; /* array of Ihandle */ + ic->nativetype = IUP_TYPEVOID; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iNormalizerCreateMethod; + ic->Map = iupBaseTypeVoidMapMethod; + ic->ComputeNaturalSize = iNormalizerComputeNaturalSizeMethod; + ic->Destroy = iNormalizerDestroy; + + iupClassRegisterAttribute(ic, "NORMALIZE", NULL, iNormalizerSetNormalizeAttrib, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ADDCONTROL_HANDLE", NULL, iNormalizerSetAddControlHandleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ADDCONTROL", NULL, iNormalizerSetAddControlAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} + +Ihandle *IupNormalizerv(Ihandle **ih_list) +{ + return IupCreatev("normalizer", (void**)ih_list); +} + +Ihandle *IupNormalizer(Ihandle* ih_first, ...) +{ + Ihandle **ih_list; + Ihandle *ih; + + va_list arglist; + va_start(arglist, ih_first); + ih_list = (Ihandle **)iupObjectGetParamList(ih_first, arglist); + va_end(arglist); + + ih = IupCreatev("normalizer", (void**)ih_list); + free(ih_list); + + return ih; +} diff --git a/iup/src/iup_object.c b/iup/src/iup_object.c new file mode 100755 index 0000000..7f4ce23 --- /dev/null +++ b/iup/src/iup_object.c @@ -0,0 +1,180 @@ +/** \file + * \brief Ihandle management + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_assert.h" +#include "iup_register.h" +#include "iup_names.h" + + +static Ihandle* iHandleCreate(void) +{ + Ihandle *ih = (Ihandle*)malloc(sizeof(Ihandle)); + memset(ih, 0, sizeof(Ihandle)); + + ih->sig[0] = 'I'; + ih->sig[1] = 'U'; + ih->sig[2] = 'P'; + ih->sig[3] = 0; + + ih->serial = -1; + + ih->attrib = iupTableCreate(IUPTABLE_STRINGINDEXED); + + return ih; +} + +static void iHandleDestroy(Ihandle* ih) +{ + iupTableDestroy(ih->attrib); + memset(ih, 0, sizeof(Ihandle)); + free(ih); +} + +int iupObjectCheck(Ihandle* ih) +{ + char* sig = (char*)ih; + + if (!ih) return 0; + + if (sig[0] != 'I' || + sig[1] != 'U' || + sig[2] != 'P' || + sig[3] != 0) + return 0; + + return 1; +} + +Ihandle* iupObjectCreate(Iclass* iclass, void** params) +{ + /* create the base handle structure */ + Ihandle* ih = iHandleCreate(); + + ih->iclass = iclass; + + /* create the element */ + if (iupClassObjectCreate(ih, params) == IUP_ERROR) + { + iupERROR1("IUP object creation failed (%s).", iclass->name); + iHandleDestroy(ih); + return NULL; + } + + /* ensure attributes default values, at this time only the ones that can be set before map */ + iupClassObjectEnsureDefaultAttributes(ih); + + return ih; +} + +void** iupObjectGetParamList(void* first, va_list arglist) +{ + const int INITIAL_NUMBER = 50; + void **params; + void *param; + int max_count = INITIAL_NUMBER, count = 0; + + params = (void **) malloc (sizeof (void *) * INITIAL_NUMBER); + + param = first; + + while (param != NULL) + { + params[count] = param; + count++; + + /* verifica se precisa realocar memoria */ + if (count >= max_count) + { + void **new_params = NULL; + + max_count += INITIAL_NUMBER; + + new_params = (void **) realloc (params, sizeof (void *) * max_count); + + params = new_params; + } + + param = va_arg (arglist, void*); + } + params[count] = NULL; + + return params; +} + +Ihandle* IupCreatev(const char *name, void **params) +{ + Iclass *ic; + iupASSERT(name!=NULL); + ic = iupRegisterFindClass(name); + if (ic) + return iupObjectCreate(ic, params); + else + return NULL; +} + +Ihandle *IupCreatep(const char *name, void* first, ...) +{ + va_list arglist; + void **params; + Ihandle *ih; + iupASSERT(name!=NULL); + + va_start(arglist, first); + params = iupObjectGetParamList(first, arglist); + va_end(arglist); + + ih = IupCreatev(name, params); + free(params); + + return ih; +} + +Ihandle* IupCreate(const char *name) +{ + iupASSERT(name!=NULL); + return IupCreatev(name, NULL); +} + +void IupDestroy(Ihandle *ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + /* Hide before destroy to avoid children redraw */ + if (ih->iclass->nativetype == IUP_TYPEDIALOG) + IupHide(ih); + + /* Destroy all its children. + Just need to remove the first child, + IupDetach will update firstchild. */ + while (ih->firstchild) + IupDestroy(ih->firstchild); + + /* unmap if mapped and remove from its parent child list */ + IupDetach(ih); + + /* destroy the element */ + iupClassObjectDestroy(ih); + + /* destroy the private data */ + if (ih->data) + free(ih->data); + + /* removes all the names associated with the element */ + iupRemoveAllNames(ih); + + /* destroy the base handle structure */ + iHandleDestroy(ih); +} diff --git a/iup/src/iup_object.h b/iup/src/iup_object.h new file mode 100755 index 0000000..6f6b668 --- /dev/null +++ b/iup/src/iup_object.h @@ -0,0 +1,132 @@ +/** \file + * \brief Ihandle Object Definition + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_OBJECT_H +#define __IUP_OBJECT_H + +#include +#include "iup_class.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \defgroup object Ihandle Object + * \par + * Object handle for all the elements. + * \par + * See \ref iup_object.h + * \ingroup cpi */ + + +/* SIZE to RASTERSIZE + * \ingroup object */ +#define iupWIDTH2RASTER(_w, _cw) ((int)((_w * _cw)/4.0 + 0.5)) +/* SIZE to RASTERSIZE + * \ingroup object */ +#define iupHEIGHT2RASTER(_h, _ch) ((int)((_h * _ch)/8.0 + 0.5)) + +/* RASTERSIZE to SIZE + * \ingroup object */ +#define iupRASTER2WIDTH(_w, _cw) ((int)((_w * 4.0)/_cw + 0.5)) +/* RASTERSIZE to SIZE + * \ingroup object */ +#define iupRASTER2HEIGHT(_h, _ch) ((int)((_h * 8.0)/_ch + 0.5)) + + +/** Expand configuration + * \ingroup object */ +enum Iexpand { + IUP_EXPAND_NONE = 0x00, + IUP_EXPAND_H0 = 0x01, /* only set by IupFill */ + IUP_EXPAND_H1 = 0x02, + IUP_EXPAND_W0 = 0x04, /* only set by IupFill */ + IUP_EXPAND_W1 = 0x08 +}; + +/** Expand configuration + * \ingroup object */ +#define IUP_EXPAND_WIDTH (IUP_EXPAND_W1 | IUP_EXPAND_W0) +/** Expand configuration + * \ingroup object */ +#define IUP_EXPAND_HEIGHT (IUP_EXPAND_H1 | IUP_EXPAND_H0) +/** Expand configuration + * \ingroup object */ +#define IUP_EXPAND_BOTH (IUP_EXPAND_WIDTH | IUP_EXPAND_HEIGHT) + + +/** A simple definition that do not depends on the native system, + but helps a lot when writing native code. See \ref iup_object.h for definitions. + * \ingroup object */ +#if defined(GTK_MAJOR_VERSION) +typedef struct _GtkWidget InativeHandle; +#elif defined(XmVERSION) +typedef struct _WidgetRec InativeHandle; +#elif defined(WINVER) +typedef struct HWND__ InativeHandle; +#else +typedef struct _InativeHandle InativeHandle; +#endif + +/** Each control may define its own structure in its private module. + * \ingroup object */ +typedef struct _IcontrolData IcontrolData; +/** IcontrolData allocation utility. + * \ingroup object */ +#define iupALLOCCTRLDATA() ((IcontrolData*)calloc(1, sizeof(IcontrolData))) + + +/** Structure used by all the elements. + * \ingroup object */ +struct Ihandle_ +{ + char sig[4]; /**< IUP Signature, initialized with "IUP", cleared on destroy */ + Iclass* iclass; /**< Ihandle Class */ + Itable* attrib; /**< attributes table */ + int serial; /**< serial number used for controls that need a numeric id, initialized with -1 */ + InativeHandle* handle; /**< native handle. initialized when mapped. InativeHandle definition is system dependent. */ + int expand; /**< expand configuration, a combination of \ref Iexpand, for containers is a combination of the children expand's */ + int is_floating; /**< floating attribute */ + int x, y; /**< upper-left corner relative to the native parent. always 0 for the dialog. */ + int userwidth, userheight; /**< user defined size for the control using SIZE or RASTERSIZE */ + int naturalwidth, naturalheight; /**< the calculated size based in the control contents and the user size */ + int currentwidth, currentheight; /**< actual size of the control in pixels (window size, including decorations and margins). */ + int has_maxsize, has_minsize; /**< indicates that the control has the attributes MAXSIZE and/or MINSIZE */ + Ihandle* parent; /**< previous control in the hierarchy tree */ + Ihandle* firstchild; /**< first child control in the hierarchy tree */ + Ihandle* brother; /**< next control inside parent */ + IcontrolData* data; /**< private control data. automatically freed if not NULL in destroy */ +}; + + +/* Creates an object. initializes iclass and nativetype. + * Called only from IupCreate and IupLoad. */ +Ihandle* iupObjectCreate(Iclass* ic, void** params); + + +/** Utility that returns an array of parameters. Must call free for the returned value after usage. + * Used by the creation functions of objects that receives a NULL terminated array of parameters. + * \ingroup object */ +void** iupObjectGetParamList(void* first, va_list arglist); + +/** Checks if the handle is still valid based on the signature. + * \ingroup object */ +int iupObjectCheck(Ihandle* ih); + + +/* Other functions declared in and implemented here. +IupCreate +IupCreatev +IupCreatep +IupDestroy +*/ + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_open.c b/iup/src/iup_open.c new file mode 100755 index 0000000..e02561e --- /dev/null +++ b/iup/src/iup_open.c @@ -0,0 +1,119 @@ +/** \file + * \brief Windows Driver Core + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_globalattrib.h" +#include "iup_names.h" +#include "iup_func.h" +#include "iup_drv.h" +#include "iup_drvinfo.h" +#include "iup_drvfont.h" +#include "iup_predial.h" +#include "iup_class.h" +#include "iup_register.h" +#include "iup_key.h" +#include "iup_image.h" +#include "iup_dlglist.h" +#include "iup_assert.h" +#include "iup_strmessage.h" + + +static int iup_opened = 0; +static int iup_dummy_argc = 0; +static char ** iup_dummy_argv = {0}; + +int iupIsOpened(void) +{ + return iup_opened; +} + +int IupOpen(int *argc, char ***argv) +{ + if (iup_opened) + return IUP_OPENED; + iup_opened = 1; + + if (!argc || !(*argc) || !argv) + { + argc = &iup_dummy_argc; + argv = &iup_dummy_argv; + } + + iupNamesInit(); + iupFuncInit(); + iupStrMessageInit(); + iupGlobalAttribInit(); + iupRegisterInit(); + iupKeyInit(); + iupImageStockInit(); + + IupSetLanguage("ENGLISH"); + IupSetGlobal("VERSION", IupVersion()); + IupSetGlobal("COPYRIGHT", IUP_COPYRIGHT); + + if (iupdrvOpen(argc, argv) == IUP_NOERROR) + { + char* value; + + iupdrvFontInit(); + + IupStoreGlobal("SYSTEM", iupdrvGetSystemName()); + IupStoreGlobal("SYSTEMVERSION", iupdrvGetSystemVersion()); + IupStoreGlobal("COMPUTERNAME", iupdrvGetComputerName()); + IupStoreGlobal("USERNAME", iupdrvGetUserName()); + IupSetGlobal("DEFAULTFONT", iupdrvGetSystemFont()); /* Use SetGlobal because iupdrvGetSystemFont returns a static string */ + + iupRegisterInternalClasses(); + + value = getenv("IUP_QUIET"); + if (value && !iupStrBoolean(value)) /* if not defined do NOT print */ + printf("IUP %s %s\n", IupVersion(), IUP_COPYRIGHT); + + value = getenv("IUP_VERSION"); + if (iupStrBoolean(value)) + iupVersionDlg(); + + return IUP_NOERROR; + } + else + { +#ifdef IUP_ASSERT + /* can not use pre-defined dialogs here, so only output to console. */ + fprintf(stderr, "IUP ERROR: IupOpen failed.\n"); +#endif + return IUP_ERROR; + } +} + +void IupClose(void) +{ + if (!iup_opened) + return; + iup_opened = 0; + + iupdrvSetIdleFunction(NULL); /* stop any idle */ + + iupDlgListDestroyAll(); /* destroy all dialogs */ + iupNamesDestroyHandles(); /* destroy everything else that have names */ + iupImageStockFinish(); /* release stock images hash table and the images */ + + iupRegisterFinish(); /* release native classes */ + + iupdrvFontFinish(); /* release font cache */ + iupdrvClose(); /* release native handles and allocated memory */ + + iupGlobalAttribFinish(); /* release global hash table */ + iupStrMessageFinish(); /* release messages hash table */ + iupFuncFinish(); /* release callbacks hash table */ + iupNamesFinish(); /* release names hash table */ + + iupStrGetMemory(-1); /* Frees internal buffer */ +} diff --git a/iup/src/iup_predial.c b/iup/src/iup_predial.c new file mode 100755 index 0000000..b48e246 --- /dev/null +++ b/iup/src/iup_predial.c @@ -0,0 +1,510 @@ +/** \file + * \brief pre-defined dialogs + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_predial.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_strmessage.h" + + +static int CB_button_OK (Ihandle* ih) +{ + iupAttribSetStr(IupGetDialog(ih), "STATUS", "1"); + return IUP_CLOSE; +} + +static int CB_button_CANCEL (Ihandle* ih) +{ + iupAttribSetStr(IupGetDialog(ih), "STATUS", "-1"); + return IUP_CLOSE; +} + +static int CB_lista (Ihandle *h, char *n, int o, int v) +{ + static clock_t oldtimesel = 0; + static int oldopc = 0; + (void)n; /* not used */ + if (v) + { + clock_t timesel = clock(); + + iupAttribSetStrf(IupGetDialog(h), "_IUP_LIST_NUMBER", "%d", o-1); + + if (((timesel-oldtimesel) < 500) && (o == oldopc)) + return IUP_CLOSE; + + oldtimesel = timesel; + oldopc = o; + } + return IUP_DEFAULT; +} + +int IupListDialog (int type, const char *title, int size, const char** list_str, + int op, int max_col, int max_lin, int* marks) +{ + Ihandle *lst, *ok, *dlg, *cancel, *dlg_box, *button_box; + int i, bt; + char attrib_str[20]; + char *m=NULL; + + if (size > 999) + size = 999; + + lst = IupList(NULL); + + for (i=0;isize) op=1; + iupAttribSetStrf(dlg, "_IUP_LIST_NUMBER", "%d", op-1); + IupSetfAttribute(lst,"VALUE","%d",op); + IupSetCallback(lst, "ACTION", (Icallback)CB_lista); + } + else if ((type == 2) && (marks != NULL)) + { + m=(char *)marks; + for (i=0;i len) + len = len2; + } + if (b3) + { + int len3 = strlen(b3); + if (len3 > len) + len = len3; + } + + if (len > 7) + padding = "12x2"; + else + padding = "18x5"; + + button_box = IupHbox(NULL); + IupSetAttribute(button_box, "NORMALIZESIZE", "HORIZONTAL"); + IupSetAttribute(button_box,"MARGIN","0x0"); + IupAppend(button_box, IupFill()); /* to center the buttons */ + + button = IupButton(b1, NULL); + iupAttribSetStrf(button, "_IUP_BUTTON_NUMBER", "1"); + IupSetAttribute(button, "PADDING", padding); + IupAppend(button_box, button); + IupSetCallback (button, "ACTION", (Icallback)iAlarmButtonAction_CB); + default_enter = button; + default_esc = button; + + if (b2 != NULL) + { + button = IupButton(b2, NULL); + iupAttribSetStr(button, "_IUP_BUTTON_NUMBER", "2"); + IupSetAttribute(button, "PADDING", padding); + IupAppend(button_box, button); + IupSetCallback (button, "ACTION", (Icallback)iAlarmButtonAction_CB); + default_esc = button; + } + + if (b3 != NULL) + { + button = IupButton(b3, NULL); + iupAttribSetStr(button, "_IUP_BUTTON_NUMBER", "3"); + IupSetAttribute(button, "PADDING", padding); + IupAppend(button_box, button); + IupSetCallback (button, "ACTION", (Icallback)iAlarmButtonAction_CB); + default_esc = button; + } + + IupAppend(button_box, IupFill()); /* to center the buttons */ + + dlg_box = IupVbox( + IupLabel(msg), + IupSetAttributes(IupLabel(NULL), "SEPARATOR=HORIZONTAL"), + button_box, + NULL); + + IupSetAttribute(dlg_box,"MARGIN","10x10"); + IupSetAttribute(dlg_box,"GAP","10"); + + dlg = IupDialog(dlg_box); + + IupSetAttribute(dlg,"TITLE", title); + IupSetAttribute(dlg,"DIALOGFRAME","YES"); + IupSetAttribute(dlg,"DIALOGHINT","YES"); + IupSetAttributeHandle(dlg,"DEFAULTENTER", default_enter); + IupSetAttributeHandle(dlg,"DEFAULTESC", default_esc); + IupSetAttribute(dlg,"PARENTDIALOG", IupGetGlobal("PARENTDIALOG")); + IupSetAttribute(dlg,"ICON", IupGetGlobal("ICON")); + + IupPopup(dlg,IUP_CENTERPARENT,IUP_CENTERPARENT); + + bt = iupAttribGetInt(dlg, "_IUP_BUTTON_NUMBER"); + + IupDestroy(dlg); + + return bt; +} + +int iupDataEntry(int maxlin, + int* maxcol, + int* maxscr, + char* title, + char** text, + char** data) +{ + int i, bt; + Ihandle *ok, *cancel, *dlg, *vb, *hb, **txt, **lbl, *button_box, *dlg_box; + + txt = (Ihandle **)calloc(maxlin, sizeof(Ihandle*)); + if (txt == NULL) return -2; + lbl = (Ihandle **)calloc(maxlin+1, sizeof(Ihandle*)); + + vb = IupVbox(NULL); + + for (i=0; i=0; i--) + { + if (filename[i] == '\\' || filename[i] == '/') + { + if (dir) + { + strncpy(dir, filename, i+1); + dir[i+1] = 0; + } + + if (filter) + { + strcpy(filter, filename+i+1); + filter[n-i] = 0; + } + + return; + } + } +} + +int IupGetFile(char* filename) +{ + Ihandle *dlg = 0; + int ret; + char filter[4096] = "*.*"; + static char dir[4096] = ""; /* static will make the dir persist from one call to another if not defined */ + + if (!filename) return -1; + + dlg = IupFileDlg(); + + iupStrSplitFileName(filename, dir, filter); + + IupSetAttribute(dlg, "FILTER", filter); + IupSetAttribute(dlg, "DIRECTORY", dir); + IupSetAttribute(dlg, "ALLOWNEW", "YES"); + IupSetAttribute(dlg, "NOCHANGEDIR", "YES"); + IupSetAttribute(dlg, "PARENTDIALOG", IupGetGlobal("PARENTDIALOG")); + IupSetAttribute(dlg, "ICON", IupGetGlobal("ICON")); + + IupPopup(dlg, IUP_CENTERPARENT, IUP_CENTERPARENT); + + ret = IupGetInt(dlg, "STATUS"); + if (ret != -1) + { + char* value = IupGetAttribute(dlg, "VALUE"); + if (value) + { + strcpy(filename, value); + iupStrSplitFileName(filename, dir, NULL); + } + } + + IupDestroy(dlg); + + return ret; +} + +int IupGetText(const char* title, char* text) +{ + Ihandle *ok, *cancel, *multi_text, *button_box, *dlg_box, *dlg; + int bt; + + multi_text = IupMultiLine(NULL); + IupSetAttribute(multi_text,"EXPAND", "YES"); + IupSetAttribute(multi_text,"VALUE", text); + IupSetAttribute(multi_text,"FONT", "Courier, 12"); + IupSetAttribute(multi_text, "VISIBLELINES", "10"); + IupSetAttribute(multi_text, "VISIBLECOLUMNS", "50"); + + ok = IupButton("OK", NULL); + IupSetAttribute(ok, "PADDING", "20x5"); + IupSetCallback(ok, "ACTION", (Icallback)CB_button_OK); + + cancel = IupButton(iupStrMessageGet("IUP_CANCEL"), NULL); + IupSetAttribute(cancel, "PADDING", "20x5"); + IupSetCallback(cancel, "ACTION", (Icallback)CB_button_CANCEL); + + button_box = IupHbox( + IupFill(), + ok, + cancel, + NULL); + IupSetAttribute(button_box,"MARGIN","0x0"); + IupSetAttribute(button_box, "NORMALIZESIZE", "HORIZONTAL"); + + dlg_box = IupVbox( + multi_text, + button_box, + NULL); + + IupSetAttribute(dlg_box,"MARGIN","10x10"); + IupSetAttribute(dlg_box,"GAP","10"); + + dlg = IupDialog (dlg_box); + + IupSetAttribute(dlg,"TITLE", title); + IupSetAttribute(dlg,"MINBOX","NO"); + IupSetAttribute(dlg,"MAXBOX","NO"); + IupSetAttributeHandle(dlg,"DEFAULTENTER", ok); + IupSetAttributeHandle(dlg,"DEFAULTESC", cancel); + IupSetAttribute(dlg,"PARENTDIALOG", IupGetGlobal("PARENTDIALOG")); + IupSetAttribute(dlg,"ICON", IupGetGlobal("ICON")); + + IupMap(dlg); + + IupSetAttribute(multi_text, "VISIBLELINES", NULL); + IupSetAttribute(multi_text, "VISIBLECOLUMNS", NULL); + + IupPopup(dlg, IUP_CENTERPARENT, IUP_CENTERPARENT); + + bt = IupGetInt(dlg, "STATUS"); + if (bt==1) + strcpy(text, IupGetAttribute(multi_text, "VALUE")); + else + bt = 0; /* return 0 instead of -1 */ + + IupDestroy(dlg); + return bt; +} + +int IupGetColor(int x, int y, unsigned char *r, unsigned char *g, unsigned char *b) +{ + int ret; + Ihandle* dlg = IupColorDlg(); + + IupSetAttribute(dlg, "TITLE", iupStrMessageGet("IUP_GETCOLOR")); + IupSetfAttribute(dlg, "VALUE", "%d %d %d", *r, *g, *b); + IupSetAttribute(dlg, "PARENTDIALOG", IupGetGlobal("PARENTDIALOG")); + IupSetAttribute(dlg, "ICON", IupGetGlobal("ICON")); + + IupPopup(dlg, x, y); + + ret = IupGetInt(dlg, "STATUS"); + if (ret) + iupStrToRGB(IupGetAttribute(dlg, "VALUE"), r, g, b); + + IupDestroy(dlg); + + return ret; +} + +void iupVersionDlg(void) +{ + Ihandle* dlg; + + dlg = IupDialog(IupVbox(IupFrame(IupVbox( + IupLabel(IupVersion()), + IupLabel(IUP_VERSION_DATE), + IupLabel(IUP_COPYRIGHT), + NULL)), + IupButton("OK", NULL), + NULL)); + + IupSetAttribute(dlg,"TITLE","IUP Version"); + IupSetAttribute(dlg,"DIALOGFRAME","YES"); + IupSetAttribute(dlg,"DIALOGHINT","YES"); + IupSetAttribute(dlg,"GAP","10"); + IupSetAttribute(dlg,"MARGIN","10x10"); + + IupPopup(dlg, IUP_CENTERPARENT, IUP_CENTERPARENT); + IupDestroy(dlg); +} diff --git a/iup/src/iup_predial.h b/iup/src/iup_predial.h new file mode 100755 index 0000000..e282e53 --- /dev/null +++ b/iup/src/iup_predial.h @@ -0,0 +1,32 @@ +/** \file + * \brief IUP Core pre-defined dialogs. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_PREDIAL_H +#define __IUP_PREDIAL_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Used by the IupScanf implementation */ +int iupDataEntry(int maxlin, int* maxcol, int* maxscr, char* title, char** text, char** data); + +/* Popups a dialog with IUP Version, used in IupOpen */ +void iupVersionDlg(void); + +/* Other functions declared in and implemented here. +IupListDialog +IupAlarm +IupMessagef +IupGetFile +IupGetText +*/ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_progressbar.c b/iup/src/iup_progressbar.c new file mode 100755 index 0000000..76fdefc --- /dev/null +++ b/iup/src/iup_progressbar.c @@ -0,0 +1,118 @@ +/** \file + * \brief ProgressBar control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_progressbar.h" + + +void iProgressBarCropValue(Ihandle* ih) +{ + if(ih->data->value > ih->data->vmax) + ih->data->value = ih->data->vmax; + else if(ih->data->value < ih->data->vmin) + ih->data->value = ih->data->vmin; +} + +char* iProgressBarGetValueAttrib(Ihandle* ih) +{ + char* value = iupStrGetMemory(30); + sprintf(value, "%g", ih->data->value); + return value; +} + +char* iProgressBarGetDashedAttrib(Ihandle* ih) +{ + if(ih->data->dashed) + return "YES"; + else + return "NO"; +} + +static int iProgressBarSetMinAttrib(Ihandle* ih, const char* value) +{ + ih->data->vmin = atof(value); + iProgressBarCropValue(ih); + return 1; +} + +static int iProgressBarSetMaxAttrib(Ihandle* ih, const char* value) +{ + ih->data->vmax = atof(value); + iProgressBarCropValue(ih); + return 1; +} + +static int iProgressBarCreateMethod(Ihandle* ih, void **params) +{ + (void)params; + + ih->data = iupALLOCCTRLDATA(); + + /* default values */ + ih->data->vmax = 1; + ih->data->dashed = 0; + + /* progress bar natural size is 200x30 */ + IupSetAttribute(ih, "RASTERSIZE", "200x30"); + + return IUP_NOERROR; +} + +Iclass* iupProgressBarGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "progressbar"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iProgressBarCreateMethod; + + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Common Callbacks */ + iupClassRegisterCallback(ic, "MAP_CB", ""); + iupClassRegisterCallback(ic, "UNMAP_CB", ""); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* IupProgressBar only */ + iupClassRegisterAttribute(ic, "MIN", NULL, iProgressBarSetMinAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MAX", NULL, iProgressBarSetMaxAttrib, IUPAF_SAMEASSYSTEM, "1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "ORIENTATION", NULL, NULL, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_NOT_MAPPED); + + iupdrvProgressBarInitClass(ic); + + return ic; +} + +Ihandle *IupProgressBar(void) +{ + return IupCreate("progressbar"); +} diff --git a/iup/src/iup_progressbar.h b/iup/src/iup_progressbar.h new file mode 100755 index 0000000..44ffb7f --- /dev/null +++ b/iup/src/iup_progressbar.h @@ -0,0 +1,35 @@ +/** \file + * \brief ProgressBar Control + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_PROGRESSBAR_H +#define __IUP_PROGRESSBAR_H + +#ifdef __cplusplus +extern "C" { +#endif + + +struct _IcontrolData +{ + int dashed, + marquee; + + double value, /* value is min < value < max */ + vmin, + vmax; +}; + +void iProgressBarCropValue(Ihandle* ih); +char* iProgressBarGetValueAttrib(Ihandle* ih); +char* iProgressBarGetDashedAttrib(Ihandle* ih); + +void iupdrvProgressBarInitClass(Iclass* ic); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_radio.c b/iup/src/iup_radio.c new file mode 100755 index 0000000..c6e7cdd --- /dev/null +++ b/iup/src/iup_radio.c @@ -0,0 +1,195 @@ +/** \file + * \brief Radio Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" + + +Ihandle *iupRadioFindToggleParent(Ihandle* ih_toggle) +{ + Ihandle *p; + for (p=ih_toggle; p->parent; p=p->parent) + { + if (p->iclass->nativetype == IUP_TYPEVOID && + iupStrEqual(p->iclass->name, "radio")) + return p; + } + + return NULL; +} + +static int iRadioFindToggleChild(Ihandle* ih, Ihandle* ih_toggle) +{ + Ihandle* child; + + if (ih == ih_toggle) /* found child that match the toggle */ + return 1; + + for (child = ih->firstchild; child; child = child->brother) + { + if (iRadioFindToggleChild(child, ih_toggle)) + return 1; + } + + return 0; +} + +static Ihandle* iRadioGetToggleChildOn(Ihandle* ih) +{ + Ihandle* child; + + if (iupStrEqual(ih->iclass->name, "toggle") && /* found child that is a toggle and it is ON */ + IupGetInt(ih, "VALUE")) + return ih; + + for (child = ih->firstchild; child; child = child->brother) + { + Ihandle* ih_toggle = iRadioGetToggleChildOn(child); + if (ih_toggle) + return ih_toggle; + } + + return NULL; +} + +/******************************************************************************/ + + +static int iRadioSetValueHandleAttrib(Ihandle* ih, const char* value) +{ + Ihandle* ih_toggle = (Ihandle*)value; + if (!iupObjectCheck(ih_toggle)) + return 0; + + if (!iupStrEqual(ih_toggle->iclass->name, "toggle")) + return 0; + + if (iRadioFindToggleChild(ih->firstchild, ih_toggle)) + IupSetAttribute(ih_toggle, "VALUE", "ON"); + + return 0; +} + +char* iRadioGetValueHandleAttrib(Ihandle* ih) +{ + return (char*)iRadioGetToggleChildOn(ih->firstchild); +} + +static int iRadioSetValueAttrib(Ihandle* ih, const char* value) +{ + Ihandle *ih_toggle; + + if (!value) + return 0; + + ih_toggle = IupGetHandle(value); + if (!ih_toggle) + return 0; + + iRadioSetValueHandleAttrib(ih, (char*)ih_toggle); + return 0; +} + +char* iRadioGetValueAttrib(Ihandle* ih) +{ + Ihandle *ih_toggle = (Ihandle*)iRadioGetValueHandleAttrib(ih); + if (!ih_toggle) + return NULL; + + return IupGetName(ih_toggle); +} + +/******************************************************************************/ + + +static int iRadioCreateMethod(Ihandle* ih, void** params) +{ + if (params) + { + Ihandle** iparams = (Ihandle**)params; + if (*iparams) + IupAppend(ih, *iparams); + } + return IUP_NOERROR; +} + +static void iRadioComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + Ihandle* child = ih->firstchild; + if (child) + { + /* update child natural size first */ + iupBaseComputeNaturalSize(child); + + *expand = child->expand; + *w = child->naturalwidth; + *h = child->naturalheight; + } +} + +static void iRadioSetChildrenCurrentSizeMethod(Ihandle* ih, int shrink) +{ + iupBaseSetCurrentSize(ih->firstchild, ih->currentwidth, ih->currentheight, shrink); +} + +static void iRadioSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + iupBaseSetPosition(ih->firstchild, x, y); +} + + +/******************************************************************************/ + + +Ihandle* IupRadio(Ihandle* child) +{ + void *params[2]; + params[0] = (void*)child; + params[1] = NULL; + return IupCreatev("radio", params); +} + +Iclass* iupRadioGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "radio"; + ic->format = "H"; /* one optional ihandle */ + ic->nativetype = IUP_TYPEVOID; + ic->childtype = IUP_CHILD_ONE; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iRadioCreateMethod; + ic->Map = iupBaseTypeVoidMapMethod; + ic->ComputeNaturalSize = iRadioComputeNaturalSizeMethod; + ic->SetChildrenCurrentSize = iRadioSetChildrenCurrentSizeMethod; + ic->SetChildrenPosition = iRadioSetChildrenPositionMethod; + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Base Container */ + iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CLIENTSIZE", iupBaseGetRasterSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* Radio only */ + iupClassRegisterAttribute(ic, "VALUE", iRadioGetValueAttrib, iRadioSetValueAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE_HANDLE", iRadioGetValueHandleAttrib, iRadioSetValueHandleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + + return ic; +} diff --git a/iup/src/iup_register.c b/iup/src/iup_register.c new file mode 100755 index 0000000..4c58038 --- /dev/null +++ b/iup/src/iup_register.c @@ -0,0 +1,123 @@ +/** \file +* \brief Register the Internal Controls +* +* See Copyright Notice in "iup.h" +*/ + +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_register.h" +#include "iup_stdcontrols.h" + + +static Itable *iregister_table = NULL; /* table indexed by name containing Iclass* address */ + +void iupRegisterInit(void) +{ + iregister_table = iupTableCreate(IUPTABLE_STRINGINDEXED); +} + +void iupRegisterFinish(void) +{ + char* name = iupTableFirst(iregister_table); + while (name) + { + Iclass* ic = (Iclass*)iupTableGetCurr(iregister_table); + iupClassRelease(ic); + name = iupTableNext(iregister_table); + } + + iupTableDestroy(iregister_table); + iregister_table = NULL; +} + +int iupRegisterGetClasses(char *list[], int n) +{ + int i = 0; + char* name = iupTableFirst(iregister_table); + + if (!list || !n) + return iupTableCount(iregister_table); + + while (name) + { + list[i] = name; + i++; + if (i == n) + break; + + name = iupTableNext(iregister_table); + } + + return i; +} + +Iclass* iupRegisterFindClass(const char* name) +{ + return (Iclass*)iupTableGet(iregister_table, name); +} + +void iupRegisterClass(Iclass* ic) +{ + Iclass* old_ic = (Iclass*)iupTableGet(iregister_table, ic->name); + if (old_ic) + iupClassRelease(old_ic); + + iupTableSet(iregister_table, ic->name, (void*)ic, IUPTABLE_POINTER); +} + + +/***************************************************************/ + +void iupRegisterInternalClasses(void) +{ + iupRegisterClass(iupDialogGetClass()); + iupRegisterClass(iupMessageDlgGetClass()); + iupRegisterClass(iupColorDlgGetClass()); + iupRegisterClass(iupFontDlgGetClass()); + iupRegisterClass(iupFileDlgGetClass()); + + iupRegisterClass(iupTimerGetClass()); + iupRegisterClass(iupImageGetClass()); + iupRegisterClass(iupImageRGBGetClass()); + iupRegisterClass(iupImageRGBAGetClass()); + iupRegisterClass(iupUserGetClass()); + iupRegisterClass(iupClipboardGetClass()); + + iupRegisterClass(iupRadioGetClass()); + iupRegisterClass(iupFillGetClass()); + iupRegisterClass(iupHboxGetClass()); + iupRegisterClass(iupVboxGetClass()); + iupRegisterClass(iupZboxGetClass()); + iupRegisterClass(iupCboxGetClass()); + iupRegisterClass(iupSboxGetClass()); + iupRegisterClass(iupNormalizerGetClass()); + + iupRegisterClass(iupMenuGetClass()); + iupRegisterClass(iupItemGetClass()); + iupRegisterClass(iupSeparatorGetClass()); + iupRegisterClass(iupSubmenuGetClass()); + + iupRegisterClass(iupLabelGetClass()); + iupRegisterClass(iupButtonGetClass()); + iupRegisterClass(iupToggleGetClass()); + iupRegisterClass(iupCanvasGetClass()); + iupRegisterClass(iupFrameGetClass()); + iupRegisterClass(iupTextGetClass()); + iupRegisterClass(iupMultilineGetClass()); + iupRegisterClass(iupListGetClass()); + + iupRegisterClass(iupProgressBarGetClass()); + iupRegisterClass(iupValGetClass()); + iupRegisterClass(iupTabsGetClass()); + iupRegisterClass(iupSpinGetClass()); + iupRegisterClass(iupSpinboxGetClass()); + iupRegisterClass(iupTreeGetClass()); +} diff --git a/iup/src/iup_register.h b/iup/src/iup_register.h new file mode 100755 index 0000000..b5e6907 --- /dev/null +++ b/iup/src/iup_register.h @@ -0,0 +1,47 @@ +/** \file + * \brief Register the Controls + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_REGISTER_H +#define __IUP_REGISTER_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup register Class Registration + * \par + * All controls are registered so the creation using IupCreate can work. + * \par + * See \ref iup_register.h + * \ingroup cpi */ + + +/** Returns a class instance from a class name. The class name must be previously registered using \ref iupRegisterClass. + * \ingroup register */ +Iclass* iupRegisterFindClass(const char* name); + +/** Register a class. + * \ingroup register */ +void iupRegisterClass(Iclass* ic); + + +/* Register the internal classes. Called only from IupOpen. */ +void iupRegisterInternalClasses(void); + +/* Initializes the class registry. Called only from IupOpen. */ +void iupRegisterInit(void); +void iupRegisterFinish(void); + +/* Get the registered classes. Used in documentation tests. */ +int iupRegisterGetClasses(char *list[], int n); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_sbox.c b/iup/src/iup_sbox.c new file mode 100755 index 0000000..5a71d33 --- /dev/null +++ b/iup/src/iup_sbox.c @@ -0,0 +1,413 @@ +/** \file + * \brief iupsbox control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_childtree.h" + + +#define ISBOX_THICK 5 + +enum { ISBOX_NORTH, ISBOX_SOUTH, ISBOX_WEST, ISBOX_EAST }; + +struct _IcontrolData +{ + int w, h; + int isholding; + int start_x, start_y; + int start_w, start_h; + + int direction; /* one of the types: ISBOX_NORTH, ISBOX_SOUTH, ISBOX_WEST, ISBOX_EAST */ +}; + + +static int iSboxGetYborder(Ihandle* ih) +{ + if (ih->data->direction == ISBOX_NORTH || ih->data->direction == ISBOX_SOUTH) + return ISBOX_THICK; + else + return 0; +} + +static int iSboxGetXborder(Ihandle* ih) +{ + if (ih->data->direction == ISBOX_EAST || ih->data->direction == ISBOX_WEST) + return ISBOX_THICK; + else + return 0; +} + +static void iSboxSaveDimension(Ihandle* ih, int w, int h) +{ + ih->data->w = w; + ih->data->h = h; +} + +static void iSboxAddDecorOffset(Ihandle* ih, int *x, int *y) +{ + /* skip north thumb if there is one */ + if (ih->data->direction == ISBOX_NORTH) + *y += ISBOX_THICK; + + /* skip west thumb if there is one */ + if (ih->data->direction == ISBOX_WEST) + *x += ISBOX_THICK; +} + +static void iSboxGetFinalSize(Ihandle* ih, int direction, int *w, int *h) +{ + int final_x, final_y; + int diff_x, diff_y; + + iupStrToIntInt(IupGetGlobal("CURSORPOS"), &final_x, &final_y, 'x'); + + diff_x = final_x - ih->data->start_x; + diff_y = final_y - ih->data->start_y; + + if(direction == ISBOX_WEST) + diff_x = -diff_x; + + if(direction == ISBOX_NORTH) + diff_y = -diff_y; + + *w = diff_x + ih->data->start_w; + *h = diff_y + ih->data->start_h; +} + +static void iSboxShakeControls(Ihandle* ih) +{ + int new_w, new_h; + + iSboxGetFinalSize(ih, ih->data->direction, &new_w, &new_h); + + if (ih->data->direction == ISBOX_WEST || ih->data->direction == ISBOX_EAST) + { + if (new_w != ih->data->w) + { + if (new_w > ih->naturalwidth) + iSboxSaveDimension(ih, new_w, ih->data->h); + else + iSboxSaveDimension(ih, new_w, ih->naturalwidth); + } + } + else if (ih->data->direction == ISBOX_SOUTH || ih->data->direction == ISBOX_NORTH) + { + if(new_h != ih->data->h) + { + if (new_h > ih->naturalheight) + iSboxSaveDimension(ih, ih->data->w, new_h); + else + iSboxSaveDimension(ih, ih->naturalheight, new_h); + } + } + + IupRefresh(ih); /* may affect all the elements in the dialog */ +} + + +/*****************************************************************************\ +|* Callbacks of canvas bar *| +\*****************************************************************************/ + + +static int iSboxMotion_CB(Ihandle* bar, int x, int y, char *r) +{ + Ihandle* ih = bar->parent; + + if (ih->data->isholding) + iSboxShakeControls(ih); + + (void)x; + (void)y; + (void)r; + return IUP_DEFAULT; +} + +static int iSboxButton_CB(Ihandle* bar, int button, int pressed, int x, int y, char* status) +{ + Ihandle* ih = bar->parent; + + if (button!=IUP_BUTTON1) + return IUP_DEFAULT; + + if (!ih->data->isholding && pressed) + { + ih->data->isholding = 1; + + /* Save the cursor position */ + iupStrToIntInt(IupGetGlobal("CURSORPOS"), &ih->data->start_x, &ih->data->start_y, 'x'); + + /* Save the initial size */ + ih->data->start_w = ih->data->w; + ih->data->start_h = ih->data->h; + } + else if (ih->data->isholding && !pressed) + ih->data->isholding = 0; + + (void)x; + (void)y; + (void)status; + return IUP_DEFAULT; +} + +static int iSboxFocus_CB(Ihandle* bar, int focus) +{ + Ihandle* ih = bar->parent; + + if (!ih || focus) /* use only kill focus */ + return IUP_DEFAULT; + + if (ih->data->isholding) + ih->data->isholding = 0; + + return IUP_DEFAULT; +} + + +/*****************************************************************************\ +|* Attributes *| +\*****************************************************************************/ + + +static char* iSboxGetClientSizeAttrib(Ihandle* ih) +{ + int width, height; + char* str = iupStrGetMemory(20); + width = ih->currentwidth; + height = ih->currentheight; + width -= iSboxGetXborder(ih); + height -= iSboxGetYborder(ih); + if (width < 0) width = 0; + if (height < 0) height = 0; + sprintf(str, "%dx%d", width, height); + return str; +} + +static int iSboxSetColorAttrib(Ihandle* ih, const char* value) +{ + IupSetAttribute(ih->firstchild, "BGCOLOR", value); + return 0; /* do not store value in hash table */ +} + +static int iSboxSetDirectionAttrib(Ihandle* ih, const char* value) +{ + if (ih->handle) /* only before map */ + return 0; + + if (iupStrEqual(value, "NORTH")) + ih->data->direction = ISBOX_NORTH; + else if(iupStrEqual(value, "SOUTH")) + ih->data->direction = ISBOX_SOUTH; + else if(iupStrEqual(value, "WEST")) + ih->data->direction = ISBOX_WEST; + else /* Default = EAST */ + ih->data->direction = ISBOX_EAST; + + if (ih->data->direction == ISBOX_EAST || ih->data->direction == ISBOX_WEST) + IupSetAttribute(ih->firstchild, "CURSOR", "RESIZE_WE"); + else + IupSetAttribute(ih->firstchild, "CURSOR", "RESIZE_NS"); + + return 0; /* do not store value in hash table */ +} + + +/*****************************************************************************\ +|* Methods *| +\*****************************************************************************/ + + +static void iSboxComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int natural_w = ih->naturalwidth, + natural_h = ih->naturalheight; + + /* only allow expand in the oposite direction, complement iupBaseContainerUpdateExpand */ + if (ih->data->direction == ISBOX_EAST || ih->data->direction == ISBOX_WEST) + ih->expand &= ~IUP_EXPAND_WIDTH; + else + ih->expand &= ~IUP_EXPAND_HEIGHT; + + /* always has at least one child, the bar */ + + /* This is an unusual element, the iupBaseComputeNaturalSize logic is done twice, one here and one back there. */ + + if (ih->firstchild->brother) + { + Ihandle* child = ih->firstchild->brother; + + /* update child natural size first */ + iupBaseComputeNaturalSize(child); + + *expand = child->expand; + + /* calculate as in iupBaseComputeNaturalSize */ + natural_w = iupMAX(natural_w, child->naturalwidth + iSboxGetXborder(ih)); + natural_h = iupMAX(natural_h, child->naturalheight + iSboxGetYborder(ih)); + } + + /* update control to fit its children according to direction */ + + /* bar */ + if (ih->data->direction == ISBOX_EAST || ih->data->direction == ISBOX_WEST) + { + ih->data->w = iupMAX(natural_w, ih->data->w); + ih->data->h = natural_h; + } + else /* ISBOX_NORTH || ISBOX_SOUTH */ + { + ih->data->w = natural_w; + ih->data->h = iupMAX(natural_h, ih->data->h); + } + + /* child */ + if (ih->firstchild->brother) + { + Ihandle* child = ih->firstchild->brother; + child->naturalwidth = ih->data->w - iSboxGetXborder(ih); + child->naturalheight = ih->data->h - iSboxGetYborder(ih); + } + + *w = ih->data->w; + *h = ih->data->h; +} + +static void iSboxSetChildrenCurrentSizeMethod(Ihandle* ih, int shrink) +{ + /* bar */ + if ((ih->data->direction == ISBOX_NORTH || ih->data->direction == ISBOX_SOUTH)) + { + ih->firstchild->currentwidth = ih->currentwidth; + ih->firstchild->currentheight = ISBOX_THICK; + } + else + { + ih->firstchild->currentwidth = ISBOX_THICK; + ih->firstchild->currentheight = ih->currentheight; + } + + /* child */ + if (ih->firstchild->brother) + { + int width = ih->currentwidth-iSboxGetXborder(ih); + int height = ih->currentheight-iSboxGetYborder(ih); + if (width < 0) width = 0; + if (height < 0) height = 0; + + iupBaseSetCurrentSize(ih->firstchild->brother, width, height, shrink); + } +} + +static void iSboxSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + int posx = 0, posy = 0; + + /* bar */ + if (ih->data->direction == ISBOX_EAST) + { + posx = ih->data->w - ISBOX_THICK; + if (posx<0) posx = 0; + } + if (ih->data->direction == ISBOX_SOUTH) + { + posy = ih->data->h - ISBOX_THICK; + if (posy<0) posy = 0; + } + + iupBaseSetPosition(ih->firstchild, x+posx, y+posy); + + /* child */ + if (ih->firstchild->brother) + { + iSboxAddDecorOffset(ih, &x, &y); + iupBaseSetPosition(ih->firstchild->brother, x, y); + } +} + +static int iSboxCreateMethod(Ihandle* ih, void** params) +{ + Ihandle* bar; + + ih->data = iupALLOCCTRLDATA(); + + ih->data->direction = ISBOX_EAST; + ih->data->h = -1; + ih->data->w = -1; + + bar = IupCanvas(NULL); + iupChildTreeAppend(ih, bar); /* bar will always be the firstchild */ + + IupSetAttribute(bar, "BORDER", "YES"); + IupSetAttribute(bar, "EXPAND", "NO"); + IupSetAttribute(bar, "BGCOLOR", "192 192 192"); + + /* Setting callbacks */ + IupSetCallback(bar, "BUTTON_CB", (Icallback) iSboxButton_CB); + IupSetCallback(bar, "FOCUS_CB", (Icallback) iSboxFocus_CB); + IupSetCallback(bar, "MOTION_CB", (Icallback) iSboxMotion_CB); + + if (params) + { + Ihandle** iparams = (Ihandle**)params; + if (*iparams) + IupAppend(ih, *iparams); + } + + return IUP_NOERROR; +} + +Iclass* iupSboxGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "sbox"; + ic->format = "H"; /* one optional ihandle */ + ic->nativetype = IUP_TYPEVOID; + ic->childtype = IUP_CHILDMANY; /* should be IUP_CHILDONE but has the bar (a IupCanvas) as firstchild */ + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iSboxCreateMethod; + ic->Map = iupBaseTypeVoidMapMethod; + + ic->ComputeNaturalSize = iSboxComputeNaturalSizeMethod; + ic->SetChildrenCurrentSize = iSboxSetChildrenCurrentSizeMethod; + ic->SetChildrenPosition = iSboxSetChildrenPositionMethod; + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Base Container */ + iupClassRegisterAttribute(ic, "CLIENTSIZE", iSboxGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* IupSbox only */ + iupClassRegisterAttribute(ic, "COLOR", NULL, iSboxSetColorAttrib, IUPAF_SAMEASSYSTEM, "192 192 192", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DIRECTION", NULL, iSboxSetDirectionAttrib, IUPAF_SAMEASSYSTEM, "EAST", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} + +Ihandle* IupSbox(Ihandle* child) +{ + void *params[2]; + params[0] = (void*)child; + params[1] = NULL; + return IupCreatev("sbox", params); +} diff --git a/iup/src/iup_scanf.c b/iup/src/iup_scanf.c new file mode 100755 index 0000000..f8ef97b --- /dev/null +++ b/iup/src/iup_scanf.c @@ -0,0 +1,200 @@ +/** \file + * \brief IupScanf implementation. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_predial.h" +#include "iup_str.h" +#include "iup_assert.h" + + +#define ALLOC(n,t) ((t *)calloc((n),sizeof(t))) +#define REQUIRE(b) {if (!(b)) goto cleanup;} + +int IupScanf (const char *format, ...) +{ + int i; + int fields_out_count=(-1); /* return code if not error (error < 0) */ + int error=(-1); /* return code if error (error >= 0) */ + int fields_in_count; + int *width=NULL; + int *scroll=NULL; + char **prompt=NULL; + char **text=NULL; + char *title=NULL; + char *s=NULL; + char *s1=NULL; + char *outf=NULL; + va_list va; + + iupASSERT(format!=NULL); + if (!format) + return 0; + + fields_in_count=iupStrCountChar(format,'\n')-1; + REQUIRE(fields_in_count>0); + width=ALLOC(fields_in_count, int); + REQUIRE(width!=NULL); + scroll=ALLOC(fields_in_count, int); + REQUIRE(scroll!=NULL); + prompt=ALLOC(fields_in_count, char *); + REQUIRE(prompt!=NULL); + text=ALLOC(fields_in_count, char *); + REQUIRE(text!=NULL); + + va_start(va,format); + REQUIRE ((s1=s=(char *)iupStrDup(format)) != NULL); + title=iupStrCopyUntil(&s,'\n'); + REQUIRE(title!=NULL); + for (i=0; i0); + + fields_out_count=0; + va_start(va,format); + s=strchr(format,'\n')+1; + for (i=0; i +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_class.h" +#include "iup_dialog.h" +#include "iup_menu.h" +#include "iup_assert.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" + + +void IupUnmap(Ihandle *ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + /* Invalid if it is NOT mapped. */ + if (!ih->handle) + return; + + /* unmap children */ + { + Ihandle* child = ih->firstchild; + while (child) + { + IupUnmap(child); + child = child->brother; + } + } + + /* only call UNMAP_CB for controls that have a native representation */ + if (ih->iclass->nativetype != IUP_TYPEVOID) + { + Icallback unmap_cb = IupGetCallback(ih, "UNMAP_CB"); + if (unmap_cb) unmap_cb(ih); + } + + /* unmap from the native system */ + iupClassObjectUnMap(ih); + ih->handle = NULL; +} + +static char* iShowGetVisible(Ihandle* ih) +{ + char* value = iupAttribGet(ih, "VISIBLE"); /* Check on the element first */ + while (!value) + { + ih = ih->parent; /* iheritance here independs on the attribute */ + if (!ih) + return NULL; + + value = iupAttribGet(ih, "VISIBLE"); + + /* only recursive up to the native parent */ + if (ih->iclass->nativetype != IUP_TYPEVOID) + return value; /* can be NULL */ + } + + return value; +} + +static void iShowUpdateVisible(Ihandle* ih) +{ + int inherit; + /* although default is VISIBLE=YES, + when mapped the element is still hidden. + So we must manually update the visible state. */ + char* value = iShowGetVisible(ih); + iupClassObjectSetAttribute(ih, "VISIBLE", value, &inherit); +} + +int IupMap(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return IUP_INVALID; + + /* calculate position and size for all children */ + if (ih->iclass->nativetype == IUP_TYPEDIALOG) + iupLayoutCompute(ih); + + /* already mapped */ + if (ih->handle) + { + if (ih->iclass->nativetype == IUP_TYPEDIALOG) + iupLayoutUpdate(ih); + + return IUP_NOERROR; + } + + /* map to the native system */ + if (iupClassObjectMap(ih) == IUP_ERROR) + { + iupERROR("Error during IupMap."); + return IUP_ERROR; + } + + /* update FONT, must be the before several others */ + if (ih->iclass->nativetype != IUP_TYPEVOID && + ih->iclass->nativetype != IUP_TYPEIMAGE && + ih->iclass->nativetype != IUP_TYPEMENU) + iupUpdateStandardFontAttrib(ih); + + /* ensure attributes default values, at this time only the ones that need to be set after map */ + iupClassObjectEnsureDefaultAttributes(ih); + + /* check visible state if not a dialog */ + if (ih->iclass->nativetype == IUP_TYPECANVAS || + ih->iclass->nativetype == IUP_TYPECONTROL) + iShowUpdateVisible(ih); + + /* updates the defined attributes in the native system. */ + iupAttribUpdate(ih); + + /* updates attributes defined in the parent tree */ + iupAttribUpdateFromParent(ih); + + /* map children */ + { + Ihandle* child = ih->firstchild; + while (child) + { + if (IupMap(child) == IUP_ERROR) + return IUP_ERROR; + + child = child->brother; + } + } + + /* moves and resizes the elements to reflect the layout computation */ + /* if the dialog is visible will be reflected in the user interface */ + if (ih->iclass->nativetype == IUP_TYPEDIALOG) + iupLayoutUpdate(ih); + + /* only call MAP_CB for controls that have a native representation */ + if (ih->iclass->nativetype != IUP_TYPEVOID) + { + Icallback map_cb = IupGetCallback(ih, "MAP_CB"); + if (map_cb) map_cb(ih); + } + + return IUP_NOERROR; +} + +int IupPopup(Ihandle *ih, int x, int y) +{ + int ret; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return IUP_INVALID; + + if (ih->iclass->nativetype != IUP_TYPEDIALOG && + ih->iclass->nativetype != IUP_TYPEMENU) + { + iupERROR("Must be a menu or dialog in IupPopup."); + return IUP_INVALID; + } + + ret = IupMap(ih); + if (ret == IUP_ERROR) + return ret; + + if (ih->iclass->nativetype == IUP_TYPEDIALOG) + ret = iupDialogPopup(ih, x, y); + else + ret = iupMenuPopup(ih, x, y); + + if (ret != IUP_NOERROR) + { + iupERROR("Error during IupPopup."); + return ret; + } + + return IUP_NOERROR; +} + +int IupShowXY(Ihandle *ih, int x, int y) +{ + int ret; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return IUP_INVALID; + + if (ih->iclass->nativetype != IUP_TYPEDIALOG) + { + iupERROR("Must be a dialog in IupShowXY."); + return IUP_INVALID; + } + + ret = IupMap(ih); + if (ret == IUP_ERROR) + return ret; + + ret = iupDialogShowXY(ih, x, y); + if (ret != IUP_NOERROR) + { + iupERROR("Error during IupShowXY."); + return ret; + } + + return IUP_NOERROR; +} + +int IupShow(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return IUP_INVALID; + + if (ih->iclass->nativetype != IUP_TYPEDIALOG) + IupSetAttribute(ih, "VISIBLE", "YES"); + else + { + int ret = IupMap(ih); + if (ret == IUP_ERROR) + return ret; + + ret = iupDialogShowXY(ih, IUP_CURRENT, IUP_CURRENT); + if (ret != IUP_NOERROR) + { + iupERROR("Error during IupShow."); + return ret; + } + } + + return IUP_NOERROR; +} + +int IupHide(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return IUP_INVALID; + + if (ih->iclass->nativetype != IUP_TYPEDIALOG) + IupSetAttribute(ih, "VISIBLE", "NO"); + else if (ih->handle) + iupDialogHide(ih); + + return IUP_NOERROR; +} diff --git a/iup/src/iup_spin.c b/iup/src/iup_spin.c new file mode 100755 index 0000000..6fadab4 --- /dev/null +++ b/iup/src/iup_spin.c @@ -0,0 +1,301 @@ +/** \file + * \brief Spin control + * + * See Copyright Notice in "iup.h" +*/ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" +#include "iup_childtree.h" + + +static Ihandle* spin_timer = NULL; + + +static int iSpinCallCB(Ihandle* ih, int dub, int ten, int sign) +{ + IFni cb; + + /* get the callback on the spin or on the spinbox */ + Ihandle* spinbox = (Ihandle*)iupAttribGet(ih->parent, "_IUPSPIN_BOX"); + if (spinbox) + ih = spinbox; + else + ih = ih->parent; + + cb = (IFni) IupGetCallback(ih, "SPIN_CB"); + if (cb) + { + return cb(ih, sign*(dub && ten ? 100 : + ten ? 10 : + dub ? 2 : 1)); + } + + return IUP_DEFAULT; +} + +static int iSpinTimerCB(Ihandle* ih) +{ + Ihandle* spin_button = (Ihandle*)iupAttribGet(ih, "_IUPSPIN_BUTTON"); + char* status = iupAttribGet(ih, "_IUPSPIN_STATUS"); + int spin_dir = iupAttribGetInt(ih, "_IUPSPIN_DIR"); + int count = iupAttribGetInt(ih, "_IUPSPIN_COUNT"); + char* reconfig = NULL; + + if(count == 0) /* first time */ + reconfig = "50"; + else if(count == 14) /* 300 + 14*50 = 1000 (1 second) */ + reconfig = "25"; + else if(count == 34) /* 300 + 14*50 + 20*50 = 2000 (2 seconds) */ + reconfig = "10"; + + if (reconfig) + { + IupSetAttribute(ih, "RUN", "NO"); + IupSetAttribute(ih, "TIME", reconfig); + IupSetAttribute(ih, "RUN", "YES"); + } + + iupAttribSetInt(ih, "_IUPSPIN_COUNT", count + 1); + + return iSpinCallCB(spin_button, iup_isshift(status), iup_iscontrol(status), spin_dir); +} + +static void iSpinPrepareTimer(Ihandle* ih, char* status, char* dir) +{ + (void)ih; + + iupAttribSetStr(spin_timer, "_IUPSPIN_BUTTON", (char*)ih); + + iupAttribStoreStr(spin_timer, "_IUPSPIN_STATUS", status); + + iupAttribSetStr(spin_timer, "_IUPSPIN_DIR", dir); + iupAttribSetStr(spin_timer, "_IUPSPIN_COUNT", "0"); + + IupSetAttribute(spin_timer, "TIME", "400"); + IupSetAttribute(spin_timer, "RUN", "YES"); +} + +static int iSpinK_SP(Ihandle* ih) +{ + int dir = iupAttribGetInt(ih, "_IUPSPIN_DIR"); + + return iSpinCallCB(ih, 0, 0, dir); +} + +static int iSpinK_sSP(Ihandle* ih) +{ + int dir = iupAttribGetInt(ih, "_IUPSPIN_DIR"); + + return iSpinCallCB(ih, 1, 0, dir); +} + +static int iSpinK_cSP(Ihandle* ih) +{ + int dir = iupAttribGetInt(ih, "_IUPSPIN_DIR"); + + return iSpinCallCB(ih, 0, 1, dir); +} + +static int iSpinButtonCB(Ihandle* ih, int but, int pressed, int x, int y, char* status) +{ + (void)x; + (void)y; + + if (pressed && but == IUP_BUTTON1) + { + int dir = iupAttribGetInt(ih, "_IUPSPIN_DIR"); + + iSpinPrepareTimer(ih, status, iupAttribGet(ih, "_IUPSPIN_DIR")); + + return iSpinCallCB(ih, iup_isshift(status), iup_iscontrol(status), dir); + } + else if (!pressed && but == IUP_BUTTON1) + { + IupSetAttribute(spin_timer, "RUN", "NO"); + } + + return IUP_DEFAULT; +} + +static int iSpinCreateMethod(Ihandle* ih, void** params) +{ + Ihandle* bt_up; + Ihandle* bt_down; + (void)params; + + /* Button UP */ + bt_up = IupButton(NULL, NULL); + + IupSetAttribute(bt_up, "EXPAND", "NO"); + IupSetAttribute(bt_up, "IMAGE", "IupSpinUpImage"); + IupSetAttribute(bt_up, "_IUPSPIN_DIR", "1"); + IupSetAttribute(bt_up, "CANFOCUS", "NO"); + + IupSetCallback(bt_up, "BUTTON_CB", (Icallback) iSpinButtonCB); + IupSetCallback(bt_up, "K_SP", (Icallback) iSpinK_SP); + IupSetCallback(bt_up, "K_sSP", (Icallback) iSpinK_sSP); + IupSetCallback(bt_up, "K_cSP", (Icallback) iSpinK_cSP); + + /* Button DOWN */ + bt_down = IupButton(NULL, NULL); + + IupSetAttribute(bt_down, "EXPAND", "NO"); + IupSetAttribute(bt_down, "IMAGE", "IupSpinDownImage"); + IupSetAttribute(bt_down, "_IUPSPIN_DIR", "-1"); + IupSetAttribute(bt_down, "CANFOCUS", "NO"); + + IupSetCallback(bt_down, "BUTTON_CB", (Icallback) iSpinButtonCB); + IupSetCallback(bt_down, "K_SP", (Icallback) iSpinK_SP); + IupSetCallback(bt_down, "K_sSP", (Icallback) iSpinK_sSP); + IupSetCallback(bt_down, "K_cSP", (Icallback) iSpinK_cSP); + + /* manually add the buttons as a children */ + ih->firstchild = bt_up; + bt_up->parent = ih; + bt_up->brother = bt_down; + bt_down->parent = ih; + + IupSetAttribute(ih, "GAP", "0"); + IupSetAttribute(ih, "MARGIN", "0x0"); + + return IUP_NOERROR; +} + +static int iSpinboxCreateMethod(Ihandle* ih, void** params) +{ + Ihandle *spin, *ctrl; + + if (!params || !(params[0])) + return IUP_ERROR; + + IupSetAttribute(ih, "GAP", "0"); + IupSetAttribute(ih, "MARGIN", "0x0"); + IupSetAttribute(ih, "ALIGNMENT", "ACENTER"); + + ctrl = (Ihandle*)(params[0]); + iupChildTreeAppend(ih, ctrl); + + spin = IupSpin(); + iupChildTreeAppend(ih, spin); + + iupAttribSetStr(spin, "_IUPSPIN_BOX", (char*)ih); + + return IUP_NOERROR; +} + +static void iSpinLoadImages(void) +{ + Ihandle* img; + + /* Spin UP image */ + unsigned char iupspin_up_img[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, 1, + 1, 1, 0, 0, 0, 0, 0, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + + /* Spin DOWN image */ + unsigned char iupspin_down_img[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, 1, + 1, 1, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1 + }; + + img = IupImage(9, 6, iupspin_up_img); + IupSetAttribute(img, "0", "0 0 0"); + IupSetAttribute(img, "1", "BGCOLOR"); + IupSetHandle("IupSpinUpImage", img); + + img = IupImage(9, 6, iupspin_down_img); + IupSetAttribute(img, "0", "0 0 0"); + IupSetAttribute(img, "1", "BGCOLOR"); + IupSetHandle("IupSpinDownImage", img); +} + +static void iSpinReleaseMethod(Iclass* ic) +{ + (void)ic; + + if (spin_timer) + { + /* no need to destroy the images, they will be destroyed by IupClose automatically */ + IupDestroy(spin_timer); + spin_timer = NULL; + } +} + +Iclass* iupSpinboxGetClass(void) +{ + Iclass* ic = iupClassNew(iupHboxGetClass()); + + ic->name = "spinbox"; + ic->format = "h"; /* one Ihandle */ + ic->nativetype = IUP_TYPEVOID; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + iupClassRegisterCallback(ic, "SPIN_CB", "i"); + + /* Class functions */ + ic->Create = iSpinboxCreateMethod; + + return ic; +} + +Iclass* iupSpinGetClass(void) +{ + Iclass* ic = iupClassNew(iupVboxGetClass()); + + ic->name = "spin"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPEVOID; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iSpinCreateMethod; + ic->Release = iSpinReleaseMethod; + + iupClassRegisterCallback(ic, "SPIN_CB", "i"); + + if (!spin_timer) + { + iSpinLoadImages(); + + spin_timer = IupTimer(); + IupSetCallback(spin_timer, "ACTION_CB", (Icallback) iSpinTimerCB); + } + + return ic; +} + +Ihandle* IupSpin(void) +{ + return IupCreate("spin"); +} + +Ihandle* IupSpinbox(Ihandle* ctrl) +{ + void *params[2]; + params[0] = (void*)ctrl; + params[1] = NULL; /* must add NULL because spinbox inherit from Hbox */ + return IupCreatev("spinbox", params); +} diff --git a/iup/src/iup_stdcontrols.h b/iup/src/iup_stdcontrols.h new file mode 100755 index 0000000..11499ae --- /dev/null +++ b/iup/src/iup_stdcontrols.h @@ -0,0 +1,76 @@ +/** \file + * \brief Standard Controls Class Initialization functions. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_STDCONTROLS_H +#define __IUP_STDCONTROLS_H + +#ifdef __cplusplus +extern "C" { +#endif + + +Iclass* iupDialogGetClass(void); +Iclass* iupMessageDlgGetClass(void); +Iclass* iupColorDlgGetClass(void); +Iclass* iupFontDlgGetClass(void); +Iclass* iupFileDlgGetClass(void); + +Iclass* iupLabelGetClass(void); +Iclass* iupButtonGetClass(void); +Iclass* iupToggleGetClass(void); +Iclass* iupRadioGetClass(void); +Iclass* iupCanvasGetClass(void); +Iclass* iupFrameGetClass(void); +Iclass* iupProgressBarGetClass(void); +Iclass* iupTextGetClass(void); +Iclass* iupMultilineGetClass(void); +Iclass* iupValGetClass(void); +Iclass* iupTabsGetClass(void); +Iclass* iupSpinGetClass(void); +Iclass* iupSpinboxGetClass(void); +Iclass* iupListGetClass(void); +Iclass* iupTreeGetClass(void); + +Iclass* iupMenuGetClass(void); +Iclass* iupItemGetClass(void); +Iclass* iupSeparatorGetClass(void); +Iclass* iupSubmenuGetClass(void); + +Iclass* iupFillGetClass(void); +Iclass* iupHboxGetClass(void); +Iclass* iupVboxGetClass(void); +Iclass* iupZboxGetClass(void); +Iclass* iupCboxGetClass(void); +Iclass* iupSboxGetClass(void); +Iclass* iupNormalizerGetClass(void); + +Iclass* iupTimerGetClass(void); +Iclass* iupImageGetClass(void); +Iclass* iupImageRGBGetClass(void); +Iclass* iupImageRGBAGetClass(void); +Iclass* iupUserGetClass(void); +Iclass* iupClipboardGetClass(void); + +/*************************************************/ + +void iupdrvMessageDlgInitClass(Iclass* ic); +void iupdrvColorDlgInitClass(Iclass* ic); +void iupdrvFontDlgInitClass(Iclass* ic); +void iupdrvFileDlgInitClass(Iclass* ic); + +/************************************************/ + +/* Common definition of the canvas class */ +typedef struct _iupCanvas { + int sb; /* scrollbar configuration, valid only after map, use iupBaseGetScrollbar before map */ + float posx, posy; +} iupCanvas; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_str.c b/iup/src/iup_str.c new file mode 100755 index 0000000..68976f1 --- /dev/null +++ b/iup/src/iup_str.c @@ -0,0 +1,716 @@ +/** \file + * \brief String Utilities + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include +#include +#include + +#include "iup_str.h" + + +/* Line breaks can be: +\n - UNIX +\r - Mac +\r\n - DOS/Windows +*/ + + +int iupStrEqual(const char* str1, const char* str2) +{ + if (str1 == str2) return 1; + if (!str1 || !str2 || *str1 != *str2) return 0; + return (strcmp(str1, str2)==0)? 1: 0; +} + +int iupStrEqualNoCase(const char* str1, const char* str2) +{ + int i = 0; + if (str1 == str2) return 1; + if (!str1 || !str2 || tolower(*str1) != tolower(*str2)) return 0; + + while (str1[i] && str2[i] && tolower(str1[i])==tolower(str2[i])) + i++; + if (str1[i] == str2[i]) return 1; + + return 0; +} + +int iupStrEqualPartial(const char* str1, const char* str2) +{ + if (str1 == str2) return 1; + if (!str1 || !str2 || *str1 != *str2) return 0; + return (strncmp(str1, str2, strlen(str2))==0)? 1: 0; +} + +int iupStrBoolean(const char* str) +{ + if (!str || str[0]==0) return 0; + if (iupStrEqualNoCase(str, "1")) return 1; + if (iupStrEqualNoCase(str, "YES")) return 1; + if (iupStrEqualNoCase(str, "ON")) return 1; + if (iupStrEqualNoCase(str, "TRUE")) return 1; + return 0; +} + +void iupStrLower(char* dstr, const char* sstr) +{ + for (; *sstr; sstr++, dstr++) + *dstr = (char)tolower(*sstr); + *dstr = 0; +} + +char *iupStrDup(const char *str) +{ + if (str) + { + int size = strlen(str)+1; + char *newstr = malloc(size); + if (newstr) memcpy(newstr, str, size); + return newstr; + } + return NULL; +} + +const char* iupStrNextLine(const char* str, int *len) +{ + *len = 0; + + while(*str!=0 && *str!='\n' && *str!='\r') + { + (*len)++; + str++; + } + + if (*str=='\r' && *(str+1)=='n') /* DOS line end */ + return str+2; + else if (*str=='\n' || *str=='\r') /* UNIX or MAC line end */ + return str+1; + else + return str; /* no next line */ +} + +int iupStrLineCount(const char* str) +{ + int num_lin = 1; + + if (!str) + return num_lin; + + while(*str != 0) + { + while(*str!=0 && *str!='\n' && *str!='\r') + str++; + + if (*str=='\r' && *(str+1)=='n') /* DOS line end */ + { + num_lin++; + str+=2; + } + else if (*str=='\n' || *str=='\r') /* UNIX or MAC line end */ + { + num_lin++; + str++; + } + } + + return num_lin; +} + +int iupStrCountChar(const char *str, int c) +{ + int n; + if (!str) return 0; + for (n=0; *str; str++) + { + if (*str==(char)c) + n++; + } + return n; +} + +void iupStrCopyN(char* dst_str, int dst_max_size, const char* src_str) +{ + int size = strlen(src_str)+1; + if (size > dst_max_size) size = dst_max_size; + memcpy(dst_str, src_str, size); +} + +char *iupStrCopyUntil(char **str, int c) +{ + char *p_str,*new_str; + if (!str || *str==NULL) + return NULL; + + p_str=strchr(*str,c); + if (!p_str) return NULL; + + { + int i; + int sl=(int)(p_str - (*str)); + + new_str = (char *) malloc (sl + 1); + if (!new_str) return NULL; + + for (i = 0; i < sl; ++i) + new_str[i] = (*str)[i]; + + new_str[sl] = 0; + } + + *str = p_str+1; + return new_str; +} + +char *iupStrCopyUntilNoCase(char **str, int c) +{ + char *p_str,*new_str; + if (!str || *str==NULL) + return NULL; + + p_str=strchr(*str,c); /* usually the lower case is enough */ + if (!p_str && isalpha(c)) + { + p_str=strchr(*str, toupper(c)); /* but check also for upper case */ + if (!p_str) return NULL; + } + + { + int i; + int sl=(int)(p_str - (*str)); + + new_str = (char *) malloc (sl + 1); + if (!new_str) return NULL; + + for (i = 0; i < sl; ++i) + new_str[i] = (*str)[i]; + + new_str[sl] = 0; + } + + *str = p_str+1; + return new_str; +} + +char *iupStrGetMemory(int size) +{ +#define MAX_BUFFERS 50 + static char* buffers[MAX_BUFFERS]; + static int buffers_sizes[MAX_BUFFERS]; + static int buffers_index = -1; + + int i; + + if (size == -1) /* Frees memory */ + { + buffers_index = -1; + for (i = 0; i < MAX_BUFFERS; i++) + { + if (buffers[i]) + { + free(buffers[i]); + buffers[i] = NULL; + } + buffers_sizes[i] = 0; + } + return NULL; + } + else + { + char* ret_str; + + if (buffers_index == -1) + { + memset(buffers, 0, sizeof(char*)*MAX_BUFFERS); + memset(buffers_sizes, 0, sizeof(int)*MAX_BUFFERS); + buffers_index = 0; + } + + if (!(buffers[buffers_index])) + { + buffers_sizes[buffers_index] = size+1; + buffers[buffers_index] = (char*)malloc(buffers_sizes[buffers_index]); + } + else if (buffers_sizes[buffers_index] < size+1) + { + buffers_sizes[buffers_index] = size+1; + buffers[buffers_index] = (char*)realloc(buffers[buffers_index], buffers_sizes[buffers_index]); + } + + memset(buffers[buffers_index], 0, buffers_sizes[buffers_index]); + ret_str = buffers[buffers_index]; + + buffers_index++; + if (buffers_index == MAX_BUFFERS) + buffers_index = 0; + + return ret_str; + } +} + +char *iupStrGetMemoryCopy(const char* str) +{ + if (str) + { + int size = strlen(str)+1; + char* ret_str = iupStrGetMemory(size); + memcpy(ret_str, str, size); + return ret_str; + } + else + return NULL; +} + +int iupStrToRGBA(const char *str, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a) +{ + unsigned int ri = 0, gi = 0, bi = 0, ai = 0, ret; + if (!str) return 0; + ret = sscanf(str, "%u %u %u %u", &ri, &gi, &bi, &ai); + if (ret < 3) return 0; + if (ri > 255 || gi > 255 || bi > 255 || ai > 255) return 0; + *r = (unsigned char)ri; + *g = (unsigned char)gi; + *b = (unsigned char)bi; + if (ret == 4) + { + *a = (unsigned char)ai; + return 4; + } + else + return 3; +} + +int iupStrToRGB(const char *str, unsigned char *r, unsigned char *g, unsigned char *b) +{ + unsigned int ri = 0, gi = 0, bi = 0; + if (!str) return 0; + if (sscanf(str, "%u %u %u", &ri, &gi, &bi) != 3) return 0; + if (ri > 255 || gi > 255 || bi > 255) return 0; + *r = (unsigned char)ri; + *g = (unsigned char)gi; + *b = (unsigned char)bi; + return 1; +} + +int iupStrToInt(const char *str, int *i) +{ + if (!str) return 0; + if (sscanf(str, "%d", i) != 1) return 0; + return 1; +} + +int iupStrToIntInt(const char *str, int *i1, int *i2, char sep) +{ + if (!str) return 0; + + if (*str == sep || (isalpha(sep) && *str == toupper(sep))) /* no first value */ + { + str++; /* skip separator */ + if (sscanf(str, "%d", i2) != 1) return 0; + return 1; + } + else + { + char* p_str = iupStrCopyUntilNoCase((char**)&str, sep); + + if (!p_str) /* no separator means no second value */ + { + if (sscanf(str, "%d", i1) != 1) return 0; + return 1; + } + else if (*str==0) /* separator exists, but second value empty, also means no second value */ + { + int ret = sscanf(p_str, "%d", i1); + free(p_str); + if (ret != 1) return 0; + return 1; + } + else + { + int ret = 0; + if (sscanf(p_str, "%d", i1) == 1) ret++; + if (sscanf(str, "%d", i2) == 1) ret++; + free(p_str); + return ret; + } + } +} + +int iupStrToFloat(const char *str, float *f) +{ + if (!str) return 0; + if (sscanf(str, "%f", f) != 1) return 0; + return 1; +} + +int iupStrToFloatFloat(const char *str, float *f1, float *f2, char sep) +{ + if (!str) return 0; + + if (*str == sep || (isalpha(sep) && *str == toupper(sep))) /* no first value */ + { + str++; /* skip separator */ + if (sscanf(str, "%f", f2) != 1) return 0; + return 1; + } + else + { + char* p_str = iupStrCopyUntilNoCase((char**)&str, sep); + + if (!p_str) /* no separator means no second value */ + { + if (sscanf(str, "%f", f1) != 1) return 0; + return 1; + } + else if (*str==0) /* separator exists, but second value empty, also means no second value */ + { + int ret = sscanf(p_str, "%f", f1); + free(p_str); + if (ret != 1) return 0; + return 1; + } + else + { + int ret = 0; + if (sscanf(p_str, "%f", f1) != 1) ret++; + if (sscanf(str, "%f", f2) != 1) ret++; + free(p_str); + return ret; + } + } +} + +int iupStrToStrStr(const char *str, char *str1, char *str2, char sep) +{ + if (!str) return 0; + + if (*str == sep || (isalpha(sep) && *str == toupper(sep))) /* no first value */ + { + str++; /* skip separator */ + strcpy(str2, str); + return 1; + } + else + { + char* p_str = iupStrCopyUntilNoCase((char**)&str, sep); + + if (!p_str) /* no separator means no second value */ + { + strcpy(str1, str); + return 1; + } + else if (*str==0) /* separator exists, but second value empty, also means no second value */ + { + strcpy(str1, p_str); + free(p_str); + return 1; + } + else + { + strcpy(str1, p_str); + strcpy(str2, str); + free(p_str); + return 2; + } + } +} + +char* iupStrFileGetPath(const char *file_name) +{ + /* Starts at the last character */ + int len = strlen(file_name) - 1; + while (len != 0) + { + if (file_name[len] == '\\' || file_name[len] == '/') + { + len++; + break; + } + + len--; + } + + if (len == 0) + return NULL; + + { + char* path = malloc(len+1); + memcpy(path, file_name, len); + path[len] = 0; + + return path; + } +} + +char* iupStrFileGetTitle(const char *file_name) +{ + /* Starts at the last character */ + int len = strlen(file_name); + int offset = len - 1; + while (offset != 0) + { + if (file_name[offset] == '\\' || file_name[offset] == '/') + { + offset++; + break; + } + + offset--; + } + + { + int title_size = len - offset + 1; + char* file_title = malloc(title_size); + memcpy(file_title, file_name + offset, title_size); + return file_title; + } +} + +char* iupStrFileGetExt(const char *file_name) +{ + /* Starts at the last character */ + int len = strlen(file_name); + int offset = len - 1; + while (offset != 0) + { + /* if found a path separator stop. */ + if (file_name[offset] == '\\' || file_name[offset] == '/') + return NULL; + + if (file_name[offset] == '.') + { + offset++; + break; + } + + offset--; + } + + if (offset == 0) + return NULL; + + { + int ext_size = len - offset + 1; + char* file_ext = (char*)malloc(ext_size); + memcpy(file_ext, file_name + offset, ext_size); + return file_ext; + } +} + +char* iupStrFileMakeFileName(const char* path, const char* title) +{ + int size_path = strlen(path); + int size_title = strlen(title); + char *filename = malloc(size_path + size_title + 2); + memcpy(filename, path, size_path); + + if (path[size_path-1] != '/') + { + filename[size_path] = '/'; + size_path++; + } + + memcpy(filename+size_path, title, size_title); + filename[size_path+size_title] = 0; + + return filename; +} + +int iupStrReplace(char* str, char src, char dst) +{ + int i = 0; + while (*str) + { + if (*str == src) + { + *str = dst; + i++; + } + str++; + } + return i; +} + +void iupStrToUnix(char* str) +{ + char* pstr = str; + + if (!str) return; + + while (*str) + { + if (*str == '\r') + { + if (*(str+1) != '\n') /* MAC line end */ + *pstr++ = '\n'; + str++; + } + else + *pstr++ = *str++; + } + + *pstr = *str; +} + +char* iupStrToMac(const char* str) +{ + int at_start = 1; + char* pstr, *new_str; + + if (!str) return NULL; + + if (iupStrLineCount(str) == 1) + return (char*)str; + + new_str = iupStrDup(str); + str = new_str; + pstr = new_str; + + while (*str) + { + if (*str == '\n') + { + if (!at_start && *(str-1) != '\r') /* UNIX line end */ + *pstr++ = '\r'; + str++; + } + else + *pstr++ = *str++; + at_start = 0; + } + + *pstr = *str; + + return new_str; +} + +char* iupStrToDos(const char* str) +{ + char *auxstr, *newstr; + int num_lin; + + if (!str) return NULL; + + num_lin = iupStrLineCount(str); + if (num_lin == 1) + return (char*)str; + + newstr = malloc(num_lin + strlen(str) + 1); + auxstr = newstr; + while(*str) + { + if (*str == '\r' && *(str+1)=='\n') /* DOS line end */ + { + *auxstr++ = *str++; + *auxstr++ = *str++; + } + else if (*str == '\r') /* MAC line end */ + { + *auxstr++ = *str++; + *auxstr++ = '\n'; + } + else if (*str == '\n') /* UNIX line end */ + { + *auxstr++ = '\r'; + *auxstr++ = *str++; + } + else + *auxstr++ = *str++; + } + *auxstr = 0; + + return newstr; +} + +void iupStrRemove(char* value, int start, int end, int dir) +{ + if (start == end) + { + if (dir==1) + end++; + else if (start == 0) /* there is nothing to remove before */ + return; + else + start--; + } + value += start; + end -= start; + while (*value) + { + *value = *(value+end); + value++; + } +} + +char* iupStrInsert(const char* value, const char* insert_value, int start, int end) +{ + char* new_value = (char*)value; + int insert_len = strlen(insert_value); + int len = strlen(value); + if (end==start || insert_len > end-start) + { + new_value = malloc(len - (end-start) + insert_len + 1); + memcpy(new_value, value, start); + memcpy(new_value+start, insert_value, insert_len); + memcpy(new_value+start+insert_len, value+end, len-end+1); + } + else + { + memcpy(new_value+start, insert_value, insert_len); + memcpy(new_value+start+insert_len, value+end, len-end+1); + } + return new_value; +} + +char* iupStrProcessMnemonic(const char* str, char *c, int action) +{ + int i = 0, found = 0; + char* new_str, *orig_str = (char*)str; + + if (!str) return NULL; + + if (!strchr(str, '&')) + return (char*)str; + + new_str = malloc(strlen(str)+1); + while (*str) + { + if (*str == '&') + { + if (*(str+1) == '&') /* remove & from the string, add next & to the string */ + { + str++; + new_str[i++] = *str; + } + else if (!found) /* mnemonic found */ + { + found = 1; + + if (action == 1) /* replace & by c */ + new_str[i++] = *c; + else if (action == -1) /* remove & and return in c */ + *c = *(str+1); /* next is mnemonic */ + /* else -- only remove & */ + } + } + else + { + new_str[i++] = *str; + } + + str++; + } + new_str[i] = 0; + + if (!found) + { + free(new_str); + return orig_str; + } + + return new_str; +} diff --git a/iup/src/iup_str.h b/iup/src/iup_str.h new file mode 100755 index 0000000..1c2e7a5 --- /dev/null +++ b/iup/src/iup_str.h @@ -0,0 +1,183 @@ +/** \file + * \brief String Utilities + * + * See Copyright Notice in "iup.h" + */ + + +#ifndef __IUP_STR_H +#define __IUP_STR_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup str String Utilities + * \par + * See \ref iup_str.h + * \ingroup util */ + +/** Returns a copy of the given string. + * If str is NULL it will return NULL. + * \ingroup str */ +char* iupStrDup(const char* str); + +/** Returns a non zero value if the two strings are equal. + * str1 or str2 can be NULL. + * \ingroup str */ +int iupStrEqual(const char* str1, const char* str2); + +/** Returns a non zero value if the two strings are equal but ignores case. + * str1 or str2 can be NULL. + * \ingroup str */ +int iupStrEqualNoCase(const char* str1, const char* str2); + +/** Returns a non zero value if the two strings are equal + * up to a number of characters defined by the strlen of the second string. + * str1 or str2 can be NULL. + * \ingroup str */ +int iupStrEqualPartial(const char* str1, const char* str2); + +/** Returns 1 if the string is "1", "YES", "ON" or "TRUE". \n + * Returns 0 if the string is "0", "NO", "OFF" or "FALSE", or the string is NULL or empty. + * \ingroup str */ +int iupStrBoolean(const char* str); + +/** Returns the number of lines in a string. + * It works for UNIX, DOS and MAC line ends. + * \ingroup str */ +int iupStrLineCount(const char* str); + +/** Returns the a pointer to the next line and the size of the current line. + * It works for UNIX, DOS and MAC line ends. The size does not includes the line end. + * If str is NULL it will return NULL. + * \ingroup str */ +const char* iupStrNextLine(const char* str, int *len); + +/** Returns the number of repetitions of the character occours in the string. + * \ingroup str */ +int iupStrCountChar(const char *str, int c); + +/** Returns a new string containing a copy of the string up to the character. + * The string is then incremented to after the position of the character. + * \ingroup str */ +char *iupStrCopyUntil(char **str, int c); + +/** Copy the string to the buffer, but limited to the max_size of the buffer. + * buffer is always porperly ended. + * \ingroup str */ +void iupStrCopyN(char* dst_str, int dst_max_size, const char* src_str); + +/** Returns a buffer with the specified size+1. \n + * The buffer is resused after 50 calls. It must NOT be freed. + * Use size=-1 to free all the internal buffers. + * \ingroup str */ +char *iupStrGetMemory(int size); + +/** Returns a buffer that contains a copy of the given buffer using \ref iupStrGetMemory. + * \ingroup str */ +char *iupStrGetMemoryCopy(const char* str); + +/** Converts a string into lower case. + * \ingroup str */ +void iupStrLower(char* dstr, const char* sstr); + +/** Extract a RGB triple from the string. Returns 0 or 1. + * \ingroup str */ +int iupStrToRGB(const char *str, unsigned char *r, unsigned char *g, unsigned char *b); + +/** Extract a RGBA quad from the string, alpha is optional. Returns 0, 3 or 4. + * \ingroup str */ +int iupStrToRGBA(const char *str, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a); + +/** Converts the string to an int. The string must contains only the integer value. + * Returns a a non zero value if sucessfull. + * \ingroup str */ +int iupStrToInt(const char *str, int *i); + +/** Converts the string to two int. The string must contains two integer values in sequence, + * separated by the given character (usually 'x' or ':'). + * Returns the number of converted values. + * Values not extracted are not changed. + * \ingroup str */ +int iupStrToIntInt(const char *str, int *i1, int *i2, char sep); + +/** Converts the string to an float. The string must contains only the real value. + * Returns a a non zero value if sucessfull. + * \ingroup str */ +int iupStrToFloat(const char *str, float *f); + +/** Converts the string to two float. The string must contains two real values in sequence, + * separated by the given character (usually 'x' or ':'). + * Returns the number of converted values. + * Values not extracted are not changed. + * \ingroup str */ +int iupStrToFloatFloat(const char *str, float *f1, float *f2, char sep); + +/** Extract two strings from the string. + * separated by the given character (usually 'x' or ':'). + * Returns the number of converted values. + * Values not extracted are not changed. + * \ingroup str */ +int iupStrToStrStr(const char *str, char *str1, char *str2, char sep); + +/** Returns the file extension of a file name. + * Supports UNIX and Windows directory separators. + * \ingroup str */ +char* iupStrFileGetExt(const char *file_name); + +/** Returns the file title of a file name. + * Supports UNIX and Windows directory separators. + * \ingroup str */ +char* iupStrFileGetTitle(const char *file_name); + +/** Returns the file path of a file name. + * Supports UNIX and Windows directory separators. + * \ingroup str */ +char* iupStrFileGetPath(const char *file_name); + +/** Concat path and title addind '/' between if path does not have it. + * \ingroup str */ +char* iupStrFileMakeFileName(const char* path, const char* title); + +/** Replace a character in a string. + * Returns the number of occurrences. + * \ingroup str */ +int iupStrReplace(char* str, char src, char dst); + +/** Convert line ends to UNIX format in place (one \n per line). + * \ingroup str */ +void iupStrToUnix(char* str); + +/** Convert line ends to MAC format (one \r per line). + * If returned pointer different than input it must be freed. + * \ingroup str */ +char* iupStrToMac(const char* str); + +/** Convert line ends to DOS/Windows format (the sequence \r\n per line). + * If returned pointer different than input it must be freed. + * \ingroup str */ +char* iupStrToDos(const char* str); + +/** Remove the interval from the string. Done in place. + * \ingroup str */ +void iupStrRemove(char* value, int start, int end, int dir); + +/** Remove the interval from the string and insert the new string at the start. + * \ingroup str */ +char* iupStrInsert(const char* value, const char* insert_value, int start, int end); + +/** Process the mnemonic in the string. If not found returns str. + * If found returns a new string. Action can be: +- 1: replace & by c +- -1: remove & and return in c +- 0: remove & + * \ingroup str */ +char* iupStrProcessMnemonic(const char* str, char *c, int action); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_strmessage.c b/iup/src/iup_strmessage.c new file mode 100755 index 0000000..5f23528 --- /dev/null +++ b/iup/src/iup_strmessage.c @@ -0,0 +1,137 @@ +/** \file + * \brief String Utilities + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_strmessage.h" +#include "iup_table.h" + + +static Itable *istrmessage_table = NULL; /* the function hast table indexed by the name string */ + +void iupStrMessageInit(void) +{ + istrmessage_table = iupTableCreate(IUPTABLE_STRINGINDEXED); +} + +void iupStrMessageFinish(void) +{ + iupTableDestroy(istrmessage_table); + istrmessage_table = NULL; +} + +char* iupStrMessageGet(const char* message) +{ + return (char*)iupTableGet(istrmessage_table, message); +} + +static void iStrMessageSet(const char* message, const char* str) +{ + iupTableSet(istrmessage_table, message, (char*)str, IUPTABLE_POINTER); +} + +void iupStrMessageShowError(Ihandle* parent, const char* message) +{ + Ihandle* dlg = IupMessageDlg(); + char* title = NULL, *str_message; + + if (parent) + { + IupSetAttributeHandle(dlg, "PARENTDIALOG", parent); + title = IupGetAttribute(parent, "TITLE"); + } + + if (!title) + title = iupStrMessageGet("IUP_ERROR"); + + IupSetAttribute(dlg, "TITLE", title); + IupSetAttribute(dlg, "DIALOGTYPE", "ERROR"); + IupSetAttribute(dlg, "BUTTONS", "OK"); + + str_message = iupStrMessageGet(message); + if (!str_message) + str_message = (char*)message; + IupSetAttribute(dlg, "VALUE", str_message); + + IupPopup(dlg, IUP_CURRENT, IUP_CURRENT); + + IupDestroy(dlg); +} + +typedef struct _IstdMessage +{ + const char* code; + const char* lng_msg[3]; /* 2+1 for expansion */ +} IstdMessage; + +/* Edit this table to add support for more languages */ + +static IstdMessage iStdMessages[] = +{ + {"IUP_ERROR", {"Error", "Erro", NULL}}, + {"IUP_YES", {"Yes", "Sim", NULL}}, + {"IUP_NO", {"No", "Não", NULL}}, + {"IUP_INVALIDDIR", {"Invalid directory.", "Diretório inválido.", NULL}}, + {"IUP_FILEISDIR", {"The selected name is a directory.", "O nome selecionado é um diretório.", NULL}}, + {"IUP_FILENOTEXIST", {"File does not exist.", "Arquivo inexistente.", NULL}}, + {"IUP_FILEOVERWRITE", {"Overwrite existing file?", "Sobrescrever arquivo?", NULL}}, + {"IUP_CREATEFOLDER", {"Create Folder", "Criar Diretório", NULL}}, + {"IUP_NAMENEWFOLDER", {"Name of the new folder:", "Nome do novo diretório:", NULL}}, + {"IUP_SAVEAS", {"Save As", "Salvar Como", NULL}}, + {"IUP_OPEN", {"Open", "Abrir", NULL}}, + {"IUP_SELECTDIR", {"Select Directory", "Selecionar Diretório", NULL}}, + {"IUP_CANCEL", {"Cancel", "Cancela", NULL}}, + {"IUP_GETCOLOR", {"Color Selection", "Seleção de Cor", NULL}}, + {"IUP_HELP", {"Help", "Ajuda", NULL}}, + {"IUP_RED", {"&Red:", "&Vermelho:", NULL}}, + {"IUP_GREEN", {"&Green:", "V&erde:", NULL}}, + {"IUP_BLUE", {"&Blue:", "&Azul:", NULL}}, + {"IUP_HUE", {"&Hue:", "&Matiz:", NULL}}, + {"IUP_SATURATION", {"&Saturation:", "&Saturação:", NULL}}, + {"IUP_INTENSITY", {"&Intensity:", "&Intensidade:", NULL}}, + {"IUP_OPACITY", {"&Opacity:", "&Opacidade:", NULL}}, + {"IUP_PALETTE", {"&Palette:", "&Paleta:", NULL}}, + {"IUP_TRUE", {"True", "Verdadeiro", NULL}}, + {"IUP_FALSE", {"False", "Falso", NULL}}, + {NULL, {NULL, NULL, NULL}} +}; + +static void iStrRegisterInternalMessages(int lng) +{ + IstdMessage* messages = iStdMessages; + while (messages->code) + { + iStrMessageSet(messages->code, messages->lng_msg[lng]); + messages++; + } +} + +void iupStrMessageUpdateLanguage(const char* language) +{ + int lng = 0; + if (iupStrEqualNoCase(language, "PORTUGUESE")) + lng = 1; + iStrRegisterInternalMessages(lng); +} + +void IupSetLanguage(const char *language) +{ + IupStoreGlobal("LANGUAGE", language); +} + +char *IupGetLanguage(void) +{ + return IupGetGlobal("LANGUAGE"); +} diff --git a/iup/src/iup_strmessage.h b/iup/src/iup_strmessage.h new file mode 100755 index 0000000..dbd0374 --- /dev/null +++ b/iup/src/iup_strmessage.h @@ -0,0 +1,45 @@ +/** \file + * \brief Language Dependent String Messages + * + * See Copyright Notice in "iup.h" + */ + + +#ifndef __IUP_STRMESSAGE_H +#define __IUP_STRMESSAGE_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup strmessage Language Dependent String Messages + * \par + * String database that is dependend of the selected language. + * \par + * See \ref iup_strmessage.h + * \ingroup util */ + +/** Pre-defined dialog to show an error message. Based in IupMessageDlg. + * Message can be a registered coded message or a commom string. + * \ingroup strmessage */ +void iupStrMessageShowError(Ihandle* parent, const char* message); + +/** Returns a common string from a registered coded message. + * The returned string depends on the global LANGUAGE attribute. + * \ingroup strmessage */ +char* iupStrMessageGet(const char* message); + +/* Called from iup_global */ +void iupStrMessageUpdateLanguage(const char* language); + +/* called only in IupOpen and IupClose */ +void iupStrMessageInit(void); +void iupStrMessageFinish(void); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_table.c b/iup/src/iup_table.c new file mode 100755 index 0000000..9e97ff5 --- /dev/null +++ b/iup/src/iup_table.c @@ -0,0 +1,736 @@ +/** \file + * \brief iupTable functions. + * Implementation by Danny Reinhold and Antonio Scuri. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup_table.h" +#include "iup_str.h" +#include "iup_assert.h" + +/* #define DEBUGTABLE 1 */ + +/* Adjust these parameters for optimal performance and memory usage */ +static const unsigned int itable_maxTableSizeIndex = 8; +static const unsigned int itable_hashTableSize[] = { 31, 101, 401, 1601, 4001, 8009, 16001, 32003, 64007 }; +static const float itable_resizeLimit = 2; +static const unsigned int itable_itemGrow = 5; + +/* Iteration context. + */ +typedef struct ItableContext +{ + unsigned int entryIndex; /* index at the Itable::entries array */ + unsigned int itemIndex; /* index at the ItableEntry::items array */ +} ItableContext; + +/* A key of an item. + * To avoid lots of string comparisions we store + * a keyindex as an integer. + * To find a key in an item list we only have to + * do integer comparisions. + * Additionally the key itself is stored in + * keyStr. In a string indexed hashtable this is + * a duplicated string, in a pointer indexed hash table + * this is simply the pointer (in this case keyIndex + * and keyStr are equal). +*/ +typedef struct ItableKey +{ + unsigned long keyIndex; /* the secondary hash number */ + const char *keyStr; +} +ItableKey; + +/* An item in the hash table. + * Such an item is stored in the item list of + * an entry. + */ +typedef struct ItableItem +{ + Itable_Types itemType; + ItableKey key; + void *value; +} +ItableItem; + +/* An entry in the hash table. + * An entry is chosen by an index in the hash table + * and contains a list of items. + * The number of items in this list is stored + * in nextItemIndex. + * size is the current size of the items array. + */ +typedef struct ItableEntry +{ + unsigned int nextItemIndex; + unsigned int size; + ItableItem *items; +} +ItableEntry; + + +/* A hash table. + * indexType is the type of the index. + * entries is an array of entries. Select an + * entry by its index. + * size is the number of entries in the hash table... + */ +struct Itable +{ + unsigned int size; + unsigned int numberOfEntries; + unsigned int tableSizeIndex; /* index into itable_hashTableSize array */ + Itable_IndexTypes indexType; + ItableEntry *entries; + ItableContext context; +}; + + +/* Prototypes of private functions */ + +static void iTableFreeItemArray(Itable_IndexTypes indexType, unsigned int nextFreeIndex, + ItableItem *items); +static unsigned int iTableGetEntryIndex(Itable *it, const char *key, unsigned long *keyIndex); +static unsigned int iTableFindItem(Itable *it, const char *key, ItableEntry **entry, + unsigned int *itemIndex, + unsigned long *keyIndex); +static unsigned int iTableResize(Itable *it); +static void iTableAdd(Itable *it, ItableKey *key, void *value, Itable_Types itemType); +static void iTableUpdateArraySize(ItableEntry *entry); + +#ifdef DEBUGTABLE +static void iTableShowStatistics(Itable *it); +static void iTableCheckDuplicated(ItableItem *item, unsigned int nextItemIndex, + const char *key, + unsigned long keyIndex); +#endif + + +Itable *iupTableCreate(Itable_IndexTypes indexType) +{ + return iupTableCreateSized(indexType, 1); /* 101 shows to be a better start for IUP */ +} + + +Itable *iupTableCreateSized(Itable_IndexTypes indexType, unsigned int initialSizeIndex) +{ + Itable *it = (Itable *)malloc(sizeof(struct Itable)); + + iupASSERT(it!=NULL); + if (!it) + return 0; + + if (initialSizeIndex > itable_maxTableSizeIndex) + initialSizeIndex = itable_maxTableSizeIndex; + + it->size = itable_hashTableSize[initialSizeIndex]; + it->tableSizeIndex = initialSizeIndex; + it->numberOfEntries = 0; + it->indexType = indexType; + + it->entries = (ItableEntry *)malloc(it->size * sizeof(ItableEntry)); + iupASSERT(it->entries!=NULL); + if (!it->entries) + { + free(it); + return 0; + } + + memset(it->entries, 0, it->size * sizeof(ItableEntry)); + + it->context.entryIndex = (unsigned int)-1; + it->context.itemIndex = (unsigned int)-1; + + return it; +} + +void iupTableClear(Itable *it) +{ + unsigned int i; + + if (!it) + return; + + for (i = 0; i < it->size; i++) + { + ItableEntry *entry = &(it->entries[i]); + if (entry->items) + iTableFreeItemArray(it->indexType, entry->nextItemIndex, entry->items); + } + + it->numberOfEntries = 0; + + memset(it->entries, 0, it->size * sizeof(ItableEntry)); + + it->context.entryIndex = (unsigned int)-1; + it->context.itemIndex = (unsigned int)-1; +} + +void iupTableDestroy(Itable *it) +{ + if (!it) + return; + +#ifdef DEBUGTABLE + iTableShowStatistics(it); +#endif + + iupTableClear(it); + + if (it->entries) + free(it->entries); + + free(it); +} + +int iupTableCount(Itable *it) +{ + iupASSERT(it!=NULL); + if (!it) + return 0; + return it->numberOfEntries; +} + +void iupTableSetFunc(Itable *it, const char *key, Ifunc func) +{ + iupTableSet(it, key, (void*)func, IUPTABLE_FUNCPOINTER); /* type cast from function pointer to void* */ +} + +void iupTableSet(Itable *it, const char *key, void *value, Itable_Types itemType) +{ + unsigned int itemIndex, + itemFound; + unsigned long keyIndex; + ItableEntry *entry; + ItableItem *item; + void *v; + + iupASSERT(it!=NULL); + iupASSERT(key!=NULL); + if (!it || !key || !value) + return; + + itemFound = iTableFindItem(it, key, &entry, &itemIndex, &keyIndex); + +#ifdef DEBUGTABLE + if (it->indexType == IUPTABLE_STRINGINDEXED) + iTableCheckDuplicated(&(entry->items[0]), entry->nextItemIndex, key, keyIndex); +#endif + + if (!itemFound) + { + /* create a new item */ + + /* first check if the hash table has to be reorganized */ + if (iTableResize(it)) + { + /* We have to search for the entry again, since it may + * have been moved by iTableResize. */ + iTableFindItem(it, key, &entry, &itemIndex, &keyIndex); + } + + iTableUpdateArraySize(entry); + + /* add the item at the end of the item array */ + if (itemType == IUPTABLE_STRING) + v = iupStrDup(value); + else + v = value; + + item = &(entry->items[entry->nextItemIndex]); + + item->itemType = itemType; + item->key.keyIndex = keyIndex; + item->key.keyStr = it->indexType == IUPTABLE_STRINGINDEXED? iupStrDup(key) : key; + item->value = v; + + entry->nextItemIndex++; + it->numberOfEntries++; + } + else + { + /* change an existing item */ + void *v; + item = &(entry->items[itemIndex]); + + if (itemType == IUPTABLE_STRING && item->itemType == IUPTABLE_STRING) + { + /* this will avoid to free + alloc of a new pointer */ + if (iupStrEqual((char*)item->value, (char*)value)) + return; + } + + if (itemType == IUPTABLE_STRING) + v = iupStrDup(value); + else + v = value; + + if (item->itemType == IUPTABLE_STRING) + free(item->value); + + item->value = v; + item->itemType = itemType; + } +} + +static void iTableRemoveItem(Itable *it, ItableEntry *entry, unsigned int itemIndex) +{ + ItableItem *item; + unsigned int i; + + item = &(entry->items[itemIndex]); + + if (it->indexType == IUPTABLE_STRINGINDEXED) + free((void *)item->key.keyStr); + + if (item->itemType == IUPTABLE_STRING) + free(item->value); + + /* order the remaining items */ + for (i = itemIndex; i < entry->nextItemIndex-1; i++) + entry->items[i] = entry->items[i+1]; + + /* clear the non used item */ + memset(entry->items + entry->nextItemIndex, 0, sizeof (ItableItem)); + + entry->nextItemIndex--; + it->numberOfEntries--; +} + +void iupTableRemove(Itable *it, const char *key) +{ + unsigned int itemFound, + itemIndex; + unsigned long keyIndex; + ItableEntry *entry; + + iupASSERT(it!=NULL); + iupASSERT(key!=NULL); + if (!it || !key) + return; + + itemFound = iTableFindItem(it, key, &entry, &itemIndex, &keyIndex); + if (itemFound) + iTableRemoveItem(it, entry, itemIndex); +} + +void *iupTableGet(Itable *it, const char *key) +{ + unsigned int itemFound, + itemIndex; + unsigned long keyIndex; + ItableEntry *entry; + void *value = 0; + + iupASSERT(it!=NULL); + iupASSERT(key!=NULL); + if (!it || !key) + return 0; + + itemFound = iTableFindItem(it, key, &entry, &itemIndex, &keyIndex); + if (itemFound) + value = entry->items[itemIndex].value; + + return value; +} + +Ifunc iupTableGetFunc(Itable *it, const char *key, void **value) +{ + Itable_Types itemType = IUPTABLE_POINTER; + *value = iupTableGetTyped(it, key, &itemType); + if (itemType == IUPTABLE_FUNCPOINTER) + return (Ifunc)(*value); /* type cast from void* to function pointer */ + else + return (Ifunc)0; +} + +void *iupTableGetTyped(Itable *it, const char *key, Itable_Types *itemType) +{ + unsigned int itemFound, + itemIndex; + unsigned long keyIndex; + ItableEntry *entry; + void *value = 0; + + iupASSERT(it!=NULL); + iupASSERT(key!=NULL); + if (!it || !key) + return 0; + + itemFound = iTableFindItem(it, key, &entry, &itemIndex, &keyIndex); + if (itemFound) + { + value = entry->items[itemIndex].value; + if (itemType) + *itemType = entry->items[itemIndex].itemType; + } + + return value; +} + +void *iupTableGetCurr(Itable *it) +{ + iupASSERT(it!=NULL); + if (!it || it->context.entryIndex == (unsigned int)-1 + || it->context.itemIndex == (unsigned int)-1) + return 0; + + return it->entries[it->context.entryIndex].items[it->context.itemIndex].value; +} + + +char *iupTableFirst(Itable *it) +{ + unsigned int entryIndex; + + iupASSERT(it!=NULL); + if (!it) + return 0; + + it->context.entryIndex = (unsigned int)-1; + it->context.itemIndex = (unsigned int)-1; + + /* find the first used entry */ + for (entryIndex = 0; entryIndex < it->size; entryIndex++) + { + if (it->entries[entryIndex].nextItemIndex > 0) + { + it->context.entryIndex = entryIndex; + it->context.itemIndex = 0; + return (char*)it->entries[entryIndex].items[0].key.keyStr; + } + } + + return 0; +} + + +char *iupTableNext(Itable *it) +{ + unsigned int entryIndex; + + iupASSERT(it!=NULL); + if (!it || it->context.entryIndex == (unsigned int)-1 + || it->context.itemIndex == (unsigned int)-1) + return 0; + + if (it->context.itemIndex + 1 < it->entries[it->context.entryIndex].nextItemIndex) + { + /* key in the current entry */ + it->context.itemIndex++; + return (char*)it->entries[it->context.entryIndex].items[it->context.itemIndex].key.keyStr; + } + else + { + /* find the next used entry */ + for (entryIndex = it->context.entryIndex+1; entryIndex < it->size; entryIndex++) + { + if (it->entries[entryIndex].nextItemIndex > 0) + { + it->context.entryIndex = entryIndex; + it->context.itemIndex = 0; + return (char*)it->entries[entryIndex].items[0].key.keyStr; + } + } + } + + return 0; +} + +char *iupTableRemoveCurr(Itable *it) +{ + char* key; + unsigned int entryIndex; + ItableEntry *entry; + unsigned int itemIndex; + + iupASSERT(it!=NULL); + if (!it || it->context.entryIndex == (unsigned int)-1 + || it->context.itemIndex == (unsigned int)-1) + return 0; + + entry = &it->entries[it->context.entryIndex]; + itemIndex = it->context.itemIndex; + + if (it->context.itemIndex + 1 < it->entries[it->context.entryIndex].nextItemIndex) + { + /* key in the current entry */ + it->context.itemIndex++; + key = (char*)it->entries[it->context.entryIndex].items[it->context.itemIndex].key.keyStr; + + iTableRemoveItem(it, entry, itemIndex); + return key; + } + else + { + /* find the next used entry */ + for (entryIndex = it->context.entryIndex+1; entryIndex < it->size; entryIndex++) + { + if (it->entries[entryIndex].nextItemIndex > 0) + { + it->context.entryIndex = entryIndex; + it->context.itemIndex = 0; + key = (char*)it->entries[entryIndex].items[0].key.keyStr; + + iTableRemoveItem(it, entry, itemIndex); + return key; + } + } + } + + return 0; +} + + +/********************************************/ +/* Private functions */ +/********************************************/ + + +static void iTableFreeItemArray(Itable_IndexTypes indexType, unsigned int nextFreeIndex, ItableItem *items) +{ + unsigned int i; + + iupASSERT(items!=NULL); + if (!items) + return; + + if (indexType == IUPTABLE_STRINGINDEXED) + { + for (i = 0; i < nextFreeIndex; i++) + free((void *)(items[i].key.keyStr)); + } + + for (i = 0; i < nextFreeIndex; i++) + { + if (items[i].itemType == IUPTABLE_STRING) + free(items[i].value); + } + + free(items); +} + + +static unsigned int iTableGetEntryIndex(Itable *it, const char *key, unsigned long *keyIndex) +{ + if (it->indexType == IUPTABLE_STRINGINDEXED) + { + register unsigned int checksum = 0; + +/* Orignal version + unsigned int i; + for (i = 0; key[i]; i++) + checksum = checksum*31 + key[i]; +*/ + + while (*key) + { + checksum *= 31; + checksum += *key; + key++; + } + + *keyIndex = checksum; /* this could NOT be dependent from table size */ + } + else + { + /* Pointer indexed */ + *keyIndex = (unsigned long)key; /* this could NOT be dependent from table size */ + } + + return (unsigned int)((*keyIndex) % it->size); +} + +#ifdef DEBUGTABLE +static void iTableCheckDuplicated(ItableItem *item, unsigned int nextItemIndex, const char *key, + unsigned long keyIndex) +{ + unsigned int i; + for (i = 0; i < nextItemIndex; i++, item++) + { + if (!iupStrEqual((char*)item->key.keyStr, (char*)key) && + item->key.keyIndex == keyIndex) + { + fprintf(stderr, "#ERROR# Duplicated key index (%ld): %s %s \n", keyIndex, + (char*)item->key.keyStr, + (char*)key); + } + } +} +#endif + +static unsigned int iTableFindItem(Itable *it, const char *key, ItableEntry **entry, + unsigned int *itemIndex, + unsigned long *keyIndex) +{ + unsigned int entryIndex, + itemFound, + i; + ItableItem *item; + + entryIndex = iTableGetEntryIndex(it, key, keyIndex); + + *entry = &(it->entries[entryIndex]); + + item = &((*entry)->items[0]); + for (i = 0; i < (*entry)->nextItemIndex; i++, item++) + { + if (it->indexType == IUPTABLE_STRINGINDEXED) + itemFound = item->key.keyIndex == *keyIndex; +/* itemFound = iupStrEqual(item->key.keyStr, key); This is the original safe version */ + else + itemFound = item->key.keyStr == key; + + if (itemFound) + { + *itemIndex = i; + return 1; + } + } + + /* if not found "entry", "itemIndex" and "keyIndex" will have the new insert position. */ + + *itemIndex = i; + return 0; +} + +static void iTableUpdateArraySize(ItableEntry *entry) +{ + if (entry->nextItemIndex >= entry->size) + { + /* we have to expand the item array */ + unsigned int newSize; + + newSize = entry->size + itable_itemGrow; + + entry->items = (ItableItem *)realloc(entry->items, newSize * sizeof(ItableItem)); + iupASSERT(entry->items!=NULL); + if (!entry->items) + return; + + memset(entry->items + entry->size, 0, itable_itemGrow * sizeof(ItableItem)); + + entry->size = newSize; + } +} + + +static void iTableAdd(Itable *it, ItableKey *key, void *value, Itable_Types itemType) +{ + unsigned int entryIndex; + unsigned long keyIndex; + ItableEntry *entry; + ItableItem* item; + + entryIndex = iTableGetEntryIndex(it, key->keyStr, &keyIndex); + + entry = &(it->entries[entryIndex]); + iTableUpdateArraySize(entry); + + /* add a new item at the end of the item array without duplicating memory. */ + item = &(entry->items[entry->nextItemIndex]); + item->itemType = itemType; + item->key.keyIndex = keyIndex; + item->key.keyStr = key->keyStr; + item->value = value; + + entry->nextItemIndex++; + it->numberOfEntries++; +} + +static unsigned int iTableResize(Itable *it) +{ + unsigned int newSizeIndex, + entryIndex, + i; + Itable *newTable; + ItableEntry *entry; + ItableItem *item; + + /* check if we do not need to resize the hash table */ + if (it->numberOfEntries == 0 || + it->tableSizeIndex >= itable_maxTableSizeIndex || + it->size / it->numberOfEntries >= itable_resizeLimit) + return 0; + + /* create a new hash table and copy the contents of + * the current table into the new one + */ + newSizeIndex = it->tableSizeIndex + 1; + newTable = iupTableCreateSized(it->indexType, newSizeIndex); + + for (entryIndex = 0; entryIndex < it->size; entryIndex++) + { + entry = &(it->entries[entryIndex]); + + if (entry->items) + { + item = &(entry->items[0]); + + for (i = 0; i < entry->nextItemIndex; i++, item++) + { + iTableAdd(newTable, &(item->key), item->value, item->itemType); + } + + free(entry->items); + } + } + + free(it->entries); + + it->size = newTable->size; + it->tableSizeIndex = newTable->tableSizeIndex; + it->numberOfEntries = newTable->numberOfEntries; + it->entries = newTable->entries; + + free(newTable); + + return 1; +} + +#ifdef DEBUGTABLE +static void iTableShowStatistics(Itable *it) +{ + unsigned int nofSlots = 0; + unsigned int nofKeys = 0; + double optimalNofKeysPerSlot = 0.0; + unsigned int nofSlotsWithMoreKeys = 0; + unsigned int nofSlotsWithLessKeys = 0; + + unsigned int entryIndex; + fprintf(stderr, "\n--- HASH TABLE STATISTICS ---\n"); + if (!it) + { + fprintf(stderr, "no hash table...\n"); + return; + } + + nofSlots = it->size; + nofKeys = it->numberOfEntries; + optimalNofKeysPerSlot = (double)nofKeys / (double)nofSlots; + + for (entryIndex = 0; entryIndex < it->size; entryIndex++) + { + ItableEntry *entry = &(it->entries[entryIndex]); + + if (entry->nextItemIndex > optimalNofKeysPerSlot + 3) + nofSlotsWithMoreKeys++; + else if (entry->nextItemIndex < optimalNofKeysPerSlot - 3) + nofSlotsWithLessKeys++; + } + + fprintf(stderr, "Number of slots: %d\n", nofSlots); + fprintf(stderr, "Number of keys: %d\n", nofKeys); + fprintf(stderr, "Optimal number of keys per slot: %f\n", optimalNofKeysPerSlot); + fprintf(stderr, "Number of slots with much more keys: %d\n", nofSlotsWithMoreKeys); + fprintf(stderr, "Number of slots with far less keys: %d\n", nofSlotsWithLessKeys); + fprintf(stderr, "\n"); +} +#endif diff --git a/iup/src/iup_table.h b/iup/src/iup_table.h new file mode 100755 index 0000000..5222160 --- /dev/null +++ b/iup/src/iup_table.h @@ -0,0 +1,143 @@ +/** \file + * \brief Simple hash table C API. + * Does not allow 0 values for items... + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_TABLE_H +#define __IUP_TABLE_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/** \defgroup table Hash Table + * \par + * The hash table can be indexed by strings or pointer address, + * and each value can contain strings, pointers or function pointers. + * \par + * See \ref iup_table.h + * \ingroup util */ + + +/** How the table key is interpreted. + * \ingroup table */ +typedef enum _Itable_IndexTypes +{ + IUPTABLE_POINTERINDEXED = 10, /**< a pointer address is used as key. */ + IUPTABLE_STRINGINDEXED /**< a string as key */ +} Itable_IndexTypes; + +/** How the value is interpreted. + * \ingroup table */ +typedef enum _Itable_Types +{ + IUPTABLE_POINTER, /**< regular pointer for strings and other pointers */ + IUPTABLE_STRING, /**< string duplicated internally */ + IUPTABLE_FUNCPOINTER /**< function pointer */ +} Itable_Types; + + +typedef void (*Ifunc)(void); + +struct Itable; +typedef struct Itable Itable; + + +/** Creates a hash table with an initial default size. + * This function is equivalent to iupTableCreateSized(0); + * \ingroup table */ +Itable *iupTableCreate(Itable_IndexTypes indexType); + +/** Creates a hash table with the specified initial size. + * Use this function if you expect the table to become very large. + * initialSizeIndex is an array into the (internal) list of + * possible hash table sizes. Currently only indexes from 0 to 8 + * are supported. If you specify a higher value here, the maximum + * allowed value will be used. + * \ingroup table */ +Itable *iupTableCreateSized(Itable_IndexTypes indexType, unsigned int initialSizeIndex); + +/** Destroys the Itable. + * Calls \ref iupTableClear. + * \ingroup table */ +void iupTableDestroy(Itable *n); + +/** Removes all items in the table. + * This function does also free the memory of strings contained in the table!!!! + * \ingroup table */ +void iupTableClear(Itable *it); + +/** Returns the number of keys stored in the table. + * \ingroup table */ +int iupTableCount(Itable *it); + +/** Store an element in the table. + * \ingroup table */ +void iupTableSet(Itable *n, const char *key, void *value, Itable_Types itemType); + +/** Store a function pointer in the table. + * Type is set to IUPTABLE_FUNCPOINTER. + * \ingroup table */ +void iupTableSetFunc(Itable *n, const char *key, Ifunc func); + +/** Retrieves an element from the table. + * Returns NULL if not found. + * \ingroup table */ +void *iupTableGet(Itable *n, const char *key); + +/** Retrieves a function pointer from the table. + * If not a function or not found returns NULL. + * value always contains the element pointer. + * \ingroup table */ +Ifunc iupTableGetFunc(Itable *n, const char *key, void **value); + +/** Retrieves an element from the table and its type. + * \ingroup table */ +void *iupTableGetTyped(Itable *n, const char *key, Itable_Types *itemType); + +/** Removes the entry at the specified key from the + * hash table and frees the memory used by it if + * it is a string... + * \ingroup table */ +void iupTableRemove(Itable *n, const char *key); + +/** Key iteration function. Returns a key. + * To iterate over all keys call iupTableFirst at the first + * and call iupTableNext in a loop + * until 0 is returned... + * Do NOT change the content of the hash table during iteration. + * During an iteration you can use context with + * iupTableGetCurr() to access the value of the key + * very fast. + * \ingroup table */ +char *iupTableFirst(Itable *it); + +/** Key iteration function. See \ref iupTableNext. + * \ingroup table */ +char *iupTableNext(Itable *it); + +/** Returns the value at the current position. + * The current context is an iterator + * that is filled by iupTableNext(). + * iupTableGetCur() is faster then iupTableGet(), + * so when you want to access an item stored + * at a key returned by iupTableNext(), + * use this function instead of iupTableGet(). + * \ingroup table */ +void *iupTableGetCurr(Itable *it); + +/** Removes the current element and returns the next key. + * Use this function to remove an element during an iteration. + * \ingroup table */ +char *iupTableRemoveCurr(Itable *it); + + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/iup/src/iup_tabs.c b/iup/src/iup_tabs.c new file mode 100755 index 0000000..77b2cf5 --- /dev/null +++ b/iup/src/iup_tabs.c @@ -0,0 +1,471 @@ +/** \file +* \brief iuptabs control +* +* See Copyright Notice in "iup.h" +*/ + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_image.h" +#include "iup_tabs.h" + + + +char* iupTabsGetPaddingAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + sprintf(str, "%dx%d", ih->data->horiz_padding, ih->data->vert_padding); + return str; +} + +char* iupTabsAttribGetStrId(Ihandle* ih, const char* name, int pos) +{ + char str[50]; + sprintf(str, "%s%d", name, pos); + return iupAttribGet(ih, str); +} + +static int iTabsGetMaxWidth(Ihandle* ih) +{ + int max_width = 0, width, pos; + char *tabtitle, *tabimage; + Ihandle* child; + + for (pos = 0, child = ih->firstchild; child; child = child->brother, pos++) + { + tabtitle = iupAttribGet(child, "TABTITLE"); + if (!tabtitle) tabtitle = iupTabsAttribGetStrId(ih, "TABTITLE", pos); + tabimage = iupAttribGet(child, "TABIMAGE"); + if (!tabimage) tabimage = iupTabsAttribGetStrId(ih, "TABIMAGE", pos); + if (!tabtitle && !tabimage) + tabtitle = " "; + + width = 0; + if (tabtitle) + width += iupdrvFontGetStringWidth(ih, tabtitle); + + if (tabimage) + { + void* img = iupImageGetImage(tabimage, ih, 0); + if (img) + { + int w; + iupdrvImageGetInfo(img, &w, NULL, NULL); + width += w; + } + } + + if (width > max_width) max_width = width; + } + + return max_width; +} + +static int iTabsGetMaxHeight(Ihandle* ih) +{ + int max_height = 0, h, pos; + char *tabimage; + Ihandle* child; + + for (pos = 0, child = ih->firstchild; child; child = child->brother, pos++) + { + tabimage = iupAttribGet(child, "TABIMAGE"); + if (!tabimage) tabimage = iupTabsAttribGetStrId(ih, "TABIMAGE", pos); + + if (tabimage) + { + void* img = iupImageGetImage(tabimage, ih, 0); + if (img) + { + iupdrvImageGetInfo(img, NULL, &h, NULL); + if (h > max_height) max_height = h; + } + } + } + + iupdrvFontGetCharSize(ih, NULL, &h); + if (h > max_height) max_height = h; + + return max_height; +} + +static void iTabsGetDecorSize(Ihandle* ih, int *width, int *height) +{ + if (ih->data->type == ITABS_LEFT || ih->data->type == ITABS_RIGHT) + { + if (ih->data->orientation == ITABS_HORIZONTAL) + { + int max_width = iTabsGetMaxWidth(ih); + *width = 4 + (3 + max_width + 3) + 2 + 4; + *height = 4 + 4; + + if (iupdrvTabsExtraDecor(ih)) + { + int h; + iupdrvFontGetCharSize(ih, NULL, &h); + *height += h + 4; + } + } + else + { + int max_height = iTabsGetMaxHeight(ih); + *width = 4 + (3 + max_height + 3) + 2 + 4; + *height = 4 + 4; + + if (ih->handle && ih->data->is_multiline) + { + int num_lin = iupdrvTabsGetLineCountAttrib(ih); + *width += (num_lin-1)*(3 + max_height + 3 + 1); + } + } + } + else /* "BOTTOM" or "TOP" */ + { + if (ih->data->orientation == ITABS_HORIZONTAL) + { + int max_height = iTabsGetMaxHeight(ih); + *width = 4 + 4; + *height = 4 + (3 + max_height + 3) + 2 + 4; + + if (ih->handle && ih->data->is_multiline) + { + int num_lin = iupdrvTabsGetLineCountAttrib(ih); + *height += (num_lin-1)*(3 + max_height + 3 + 1); + } + + if (iupdrvTabsExtraDecor(ih)) + { + int h; + iupdrvFontGetCharSize(ih, NULL, &h); + *width += h + 4; + } + } + else + { + int max_width = iTabsGetMaxWidth(ih); + *width = 4 + 4; + *height = 4 + (3 + max_width + 3) + 2 + 4; + } + } + + *width += ih->data->horiz_padding; + *height += ih->data->vert_padding; +} + + +/* ------------------------------------------------------------------------- */ +/* TABS - Sets and Gets - Accessors */ +/* ------------------------------------------------------------------------- */ + +static int iTabsSetValueHandleAttrib(Ihandle* ih, const char* value) +{ + int pos; + Ihandle *child; + + child = (Ihandle*)value; + if (!iupObjectCheck(child)) + return 0; + + pos = IupGetChildPos(ih, child); + if (pos != -1) /* found child */ + { + if (ih->handle) + iupdrvTabsSetCurrentTab(ih, pos); + else + iupAttribSetStr(ih, "_IUPTABS_VALUE_HANDLE", (char*)child); + } + + return 0; +} + +char* iupTabsGetTabTypeAttrib(Ihandle* ih) +{ + switch(ih->data->type) + { + case ITABS_BOTTOM: + return "BOTTOM"; + case ITABS_LEFT: + return "LEFT"; + case ITABS_RIGHT: + return "RIGHT"; + default: + return "TOP"; + } +} + +char* iupTabsGetTabOrientationAttrib(Ihandle* ih) +{ + if (ih->data->orientation == ITABS_HORIZONTAL) + return "HORIZONTAL"; + else + return "VERTICAL"; +} + +static char* iTabsGetValueHandleAttrib(Ihandle* ih) +{ + if (ih->handle) + { + int pos = iupdrvTabsGetCurrentTab(ih); + return (char*)IupGetChild(ih, pos); + } + else + return iupAttribGet(ih, "_IUPTABS_VALUE_HANDLE"); +} + +static int iTabsSetValuePosAttrib(Ihandle* ih, const char* value) +{ + Ihandle* child; + int pos; + + if (!iupStrToInt(value, &pos)) + return 0; + + child = IupGetChild(ih, pos); + if (child) /* found child */ + { + if (ih->handle) + iupdrvTabsSetCurrentTab(ih, pos); + else + iupAttribSetStr(ih, "_IUPTABS_VALUE_HANDLE", (char*)child); + } + + return 0; +} + +static char* iTabsGetValuePosAttrib(Ihandle* ih) +{ + if (ih->handle) + { + int pos = iupdrvTabsGetCurrentTab(ih); + char *str = iupStrGetMemory(50); + sprintf(str, "%d", pos); + return str; + } + else + { + Ihandle* child = (Ihandle*)iupAttribGet(ih, "_IUPTABS_VALUE_HANDLE"); + int pos = IupGetChildPos(ih, child); + if (pos != -1) /* found child */ + { + char *str = iupStrGetMemory(50); + sprintf(str, "%d", pos); + return str; + } + } + + return NULL; +} + +static int iTabsSetValueAttrib(Ihandle* ih, const char* value) +{ + Ihandle *child; + + if (!value) + return 0; + + child = IupGetHandle(value); + if (!child) + return 0; + + iTabsSetValueHandleAttrib(ih, (char*)child); + + return 0; +} + +static char* iTabsGetValueAttrib(Ihandle* ih) +{ + Ihandle* child = (Ihandle*)iTabsGetValueHandleAttrib(ih); + return IupGetName(child); +} + +static char* iTabsGetClientSizeAttrib(Ihandle* ih) +{ + int width, height, decorwidth, decorheight; + char* str = iupStrGetMemory(20); + width = ih->currentwidth; + height = ih->currentheight; + iTabsGetDecorSize(ih, &decorwidth, &decorheight); + width -= decorwidth; + height -= decorheight; + if (width < 0) width = 0; + if (height < 0) height = 0; + sprintf(str, "%dx%d", width, height); + return str; +} + + +/* ------------------------------------------------------------------------- */ +/* TABS - Methods */ +/* ------------------------------------------------------------------------- */ + +static void iTabsComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + Ihandle* child; + int children_expand, + children_naturalwidth, children_naturalheight; + int decorwidth, decorheight; + + /* calculate total children natural size (even for hidden children) */ + children_expand = 0; + children_naturalwidth = 0; + children_naturalheight = 0; + + for (child = ih->firstchild; child; child = child->brother) + { + /* update child natural size first */ + iupBaseComputeNaturalSize(child); + + children_expand |= child->expand; + children_naturalwidth = iupMAX(children_naturalwidth, child->naturalwidth); + children_naturalheight = iupMAX(children_naturalheight, child->naturalheight); + } + + iTabsGetDecorSize(ih, &decorwidth, &decorheight); + + *expand = children_expand; + *w = children_naturalwidth + decorwidth; + *h = children_naturalheight + decorheight; +} + +static void iTabsSetChildrenCurrentSizeMethod(Ihandle* ih, int shrink) +{ + Ihandle* child; + int width, height, decorwidth, decorheight; + + iTabsGetDecorSize(ih, &decorwidth, &decorheight); + + width = ih->currentwidth-decorwidth; + height = ih->currentheight-decorheight; + if (width < 0) width = 0; + if (height < 0) height = 0; + + for (child = ih->firstchild; child; child = child->brother) + { + iupBaseSetCurrentSize(child, width, height, shrink); + } +} + +static void iTabsSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + /* IupTabs is the native parent of its children, + so the position is restarted at (0,0). + In all systems, each tab is a native window covering the client area. + Child coordinates are relative to client left-top corner of the tab page. */ + Ihandle* child; + (void)x; + (void)y; + for (child = ih->firstchild; child; child = child->brother) + { + iupBaseSetPosition(child, 0, 0); + } +} + +static void* iTabsGetInnerNativeContainerHandleMethod(Ihandle* ih, Ihandle* child) +{ + while (child && child->parent != ih) + child = child->parent; + if (child) + return iupAttribGet(child, "_IUPTAB_CONTAINER"); + else + return NULL; +} + +static int iTabsCreateMethod(Ihandle* ih, void **params) +{ + ih->data = iupALLOCCTRLDATA(); + + /* add children */ + if(params) + { + Ihandle** iparams = (Ihandle**)params; + while (*iparams) + { + IupAppend(ih, *iparams); + iparams++; + } + } + return IUP_NOERROR; +} + +Iclass* iupTabsGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "tabs"; + ic->format = "g"; /* array of Ihandle */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDMANY; + ic->is_interactive = 1; + ic->has_attrib_id = 1; + + /* Class functions */ + ic->Create = iTabsCreateMethod; + ic->GetInnerNativeContainerHandle = iTabsGetInnerNativeContainerHandleMethod; + + ic->ComputeNaturalSize = iTabsComputeNaturalSizeMethod; + ic->SetChildrenCurrentSize = iTabsSetChildrenCurrentSizeMethod; + ic->SetChildrenPosition = iTabsSetChildrenPositionMethod; + + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* IupTabs Callbacks */ + iupClassRegisterCallback(ic, "TABCHANGE_CB", "nn"); + + /* Common Callbacks */ + iupBaseRegisterCommonCallbacks(ic); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* IupTabs only */ + iupClassRegisterAttribute(ic, "VALUE", iTabsGetValueAttrib, iTabsSetValueAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUEPOS", iTabsGetValuePosAttrib, iTabsSetValuePosAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE_HANDLE", iTabsGetValueHandleAttrib, iTabsSetValueHandleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + + /* Base Container */ + iupClassRegisterAttribute(ic, "CLIENTSIZE", iTabsGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupdrvTabsInitClass(ic); + + return ic; +} + +Ihandle* IupTabs(Ihandle* first,...) +{ + Ihandle **params; + Ihandle *ih; + + va_list arglist; + va_start(arglist, first); + params = (Ihandle**)iupObjectGetParamList(first, arglist); + va_end(arglist); + + ih = IupCreatev("tabs", (void**)params); + free(params); + + return ih; +} + +Ihandle* IupTabsv(Ihandle** params) +{ + return IupCreatev("tabs", (void**)params); +} diff --git a/iup/src/iup_tabs.h b/iup/src/iup_tabs.h new file mode 100755 index 0000000..7f5df2e --- /dev/null +++ b/iup/src/iup_tabs.h @@ -0,0 +1,50 @@ +/** \file + * \brief Tabs Control + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_TABS_H +#define __IUP_TABS_H + +#ifdef __cplusplus +extern "C" { +#endif + + +char* iupTabsGetTabOrientationAttrib(Ihandle* ih); +char* iupTabsGetTabTypeAttrib(Ihandle* ih); +char* iupTabsAttribGetStrId(Ihandle* ih, const char* name, int pos); +char* iupTabsGetPaddingAttrib(Ihandle* ih); + +int iupdrvTabsExtraDecor(Ihandle* ih); +int iupdrvTabsGetLineCountAttrib(Ihandle* ih); +void iupdrvTabsSetCurrentTab(Ihandle* ih, int pos); +int iupdrvTabsGetCurrentTab(Ihandle* ih); +void iupdrvTabsInitClass(Iclass* ic); + +typedef enum +{ + ITABS_TOP, ITABS_BOTTOM, ITABS_LEFT, ITABS_RIGHT +} ItabsType; + +typedef enum +{ + ITABS_HORIZONTAL, ITABS_VERTICAL +} ItabsOrientation; + +/* Control context */ +struct _IcontrolData +{ + ItabsType type; + ItabsOrientation orientation; + int horiz_padding, vert_padding; /* tab title margin */ + int is_multiline; /* used only in Windows */ +}; + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_text.c b/iup/src/iup_text.c new file mode 100755 index 0000000..6cd7235 --- /dev/null +++ b/iup/src/iup_text.c @@ -0,0 +1,513 @@ +/** \file + * \brief Text Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_mask.h" +#include "iup_array.h" +#include "iup_text.h" +#include "iup_assert.h" + + +char* iupTextGetFormattingAttrib(Ihandle* ih) +{ + if (ih->data->has_formatting) + return "YES"; + else + return "NO"; +} + +int iupTextSetFormattingAttrib(Ihandle* ih, const char* value) +{ + if (ih->handle) /* only before map */ + return 0; + + ih->data->has_formatting = iupStrBoolean(value); + + return 0; +} + +static void iTextDestroyFormatTags(Ihandle* ih) +{ + /* called if the element was destroyed before it was mapped */ + int i, count = iupArrayCount(ih->data->formattags); + Ihandle** tag_array = (Ihandle**)iupArrayGetData(ih->data->formattags); + for (i = 0; i < count; i++) + IupDestroy(tag_array[i]); + iupArrayDestroy(ih->data->formattags); + ih->data->formattags = NULL; +} + +static void iTextUpdateValueAttrib(Ihandle* ih) +{ + char* value = iupAttribGet(ih, "VALUE"); + if (value) + { + int inherit; + iupClassObjectSetAttribute(ih, "VALUE", value, &inherit); + + iupAttribSetStr(ih, "VALUE", NULL); /* clear hash table */ + } +} + +char* iupTextGetNCAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(100); + sprintf(str, "%d", ih->data->nc); + return str; +} + +void iupTextUpdateFormatTags(Ihandle* ih) +{ + /* called when the element is mapped */ + int i, count = iupArrayCount(ih->data->formattags); + Ihandle** tag_array = (Ihandle**)iupArrayGetData(ih->data->formattags); + + /* must update VALUE before updating the format */ + iTextUpdateValueAttrib(ih); + + for (i = 0; i < count; i++) + { + iupdrvTextAddFormatTag(ih, tag_array[i]); + IupDestroy(tag_array[i]); + } + iupArrayDestroy(ih->data->formattags); + ih->data->formattags = NULL; +} + +int iupTextSetAddFormatTagHandleAttrib(Ihandle* ih, const char* value) +{ + Ihandle* formattag = (Ihandle*)value; + if (!iupObjectCheck(formattag)) + return 0; + + if (ih->handle) + { + /* must update VALUE before updating the format */ + iTextUpdateValueAttrib(ih); + + iupdrvTextAddFormatTag(ih, formattag); + IupDestroy(formattag); + } + else + { + Ihandle** tag_array; + int i; + + if (!ih->data->formattags) + ih->data->formattags = iupArrayCreate(10, sizeof(Ihandle*)); + + i = iupArrayCount(ih->data->formattags); + tag_array = (Ihandle**)iupArrayInc(ih->data->formattags); + tag_array[i] = formattag; + } + return 0; +} + +int iupTextSetAddFormatTagAttrib(Ihandle* ih, const char* value) +{ + return iupTextSetAddFormatTagHandleAttrib(ih, (char*)IupGetHandle(value)); +} + +static char* iTextGetMaskDataAttrib(Ihandle* ih) +{ + /* Used only by the OLD iupmask API */ + return (char*)ih->data->mask; +} + +static char* iTextGetMaskAttrib(Ihandle* ih) +{ + if (ih->data->mask) + return iupMaskGetStr(ih->data->mask); + else + return NULL; +} + +static int iTextSetMaskAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + if (ih->data->mask) + { + iupMaskDestroy(ih->data->mask); + ih->data->mask = NULL; + } + } + else + { + int casei = iupAttribGetInt(ih, "MASKCASEI"); + Imask* mask = iupMaskCreate(value,casei); + if (mask) + { + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); + + ih->data->mask = mask; + return 0; + } + } + + return 0; +} + +static int iTextSetMaskIntAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + if (ih->data->mask) + { + iupMaskDestroy(ih->data->mask); + ih->data->mask = NULL; + } + } + else + { + Imask* mask; + int min, max; + + if (iupStrToIntInt(value, &min, &max, ':')!=2) + return 0; + + mask = iupMaskCreateInt(min,max); + + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); + + ih->data->mask = mask; + } + + return 0; +} + +static int iTextSetMaskFloatAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + if (ih->data->mask) + { + iupMaskDestroy(ih->data->mask); + ih->data->mask = NULL; + } + } + else + { + Imask* mask; + float min, max; + + if (iupStrToFloatFloat(value, &min, &max, ':')!=2) + return 0; + + mask = iupMaskCreateFloat(min,max); + + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); + + ih->data->mask = mask; + } + + return 0; +} + +static int iTextSetMultilineAttrib(Ihandle* ih, const char* value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + if (iupStrBoolean(value)) + { + ih->data->is_multiline = 1; + ih->data->sb = IUP_SB_HORIZ | IUP_SB_VERT; /* reset SCROLLBAR to YES */ + } + else + ih->data->is_multiline = 0; + + return 0; +} + +static char* iTextGetMultilineAttrib(Ihandle* ih) +{ + if (ih->data->is_multiline) + return "YES"; + else + return "NO"; +} + +static int iTextSetAppendNewlineAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + ih->data->append_newline = 1; + else + ih->data->append_newline = 0; + return 0; +} + +static char* iTextGetAppendNewlineAttrib(Ihandle* ih) +{ + if (ih->data->append_newline) + return "YES"; + else + return "NO"; +} + +static int iTextSetScrollbarAttrib(Ihandle* ih, const char* value) +{ + /* valid only before map */ + if (ih->handle || !ih->data->is_multiline) + return 0; + + if (!value) + value = "YES"; /* default, if multiline, is YES */ + + if (iupStrEqualNoCase(value, "YES")) + ih->data->sb = IUP_SB_HORIZ | IUP_SB_VERT; + else if (iupStrEqualNoCase(value, "HORIZONTAL")) + ih->data->sb = IUP_SB_HORIZ; + else if (iupStrEqualNoCase(value, "VERTICAL")) + ih->data->sb = IUP_SB_VERT; + else + ih->data->sb = IUP_SB_NONE; + + return 0; +} + +static char* iTextGetScrollbarAttrib(Ihandle* ih) +{ + if (ih->data->sb == (IUP_SB_HORIZ | IUP_SB_VERT)) + return "YES"; + if (ih->data->sb &= IUP_SB_HORIZ) + return "HORIZONTAL"; + if (ih->data->sb == IUP_SB_VERT) + return "VERTICAL"; + return "NO"; /* IUP_SB_NONE */ +} + +char* iupTextGetPaddingAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + sprintf(str, "%dx%d", ih->data->horiz_padding, ih->data->vert_padding); + return str; +} + + +/********************************************************************/ + + +static int iTextCreateMethod(Ihandle* ih, void** params) +{ + if (params) + { + if (params[0]) iupAttribStoreStr(ih, "ACTION", (char*)(params[0])); + } + ih->data = iupALLOCCTRLDATA(); + ih->data->append_newline = 1; + return IUP_NOERROR; +} + +static int iMultilineCreateMethod(Ihandle* ih, void** params) +{ + iTextCreateMethod(ih, params); + ih->data->is_multiline = 1; + ih->data->sb = IUP_SB_HORIZ | IUP_SB_VERT; + return IUP_NOERROR; +} + +static void iTextComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int natural_w = 0, + natural_h = 0, + visiblecolumns = iupAttribGetInt(ih, "VISIBLECOLUMNS"), + visiblelines = iupAttribGetInt(ih, "VISIBLELINES"); + (void)expand; /* unset if not a container */ + + /* Since the contents can be changed by the user, the size can not be dependent on it. */ + if (ih->data->is_multiline) + { + iupdrvFontGetCharSize(ih, NULL, &natural_h); /* one line height */ + natural_w = iupdrvFontGetStringWidth(ih, "WWWWWWWWWW"); + natural_w = (visiblecolumns*natural_w)/10; + natural_h = visiblelines*natural_h; + } + else + { + iupdrvFontGetCharSize(ih, NULL, &natural_h); /* one line height */ + natural_w = iupdrvFontGetStringWidth(ih, "WWWWWWWWWW"); + natural_w = (visiblecolumns*natural_w)/10; + } + + /* compute the borders space */ + if (iupAttribGetBoolean(ih, "BORDER")) + iupdrvTextAddBorders(&natural_w, &natural_h); + + if (iupAttribGetBoolean(ih, "SPIN")) + iupdrvTextAddSpin(&natural_w, natural_h); + + natural_w += 2*ih->data->horiz_padding; + natural_h += 2*ih->data->vert_padding; + + /* add scrollbar */ + if (ih->data->is_multiline && ih->data->sb) + { + int sb_size = iupdrvGetScrollbarSize(); + if (ih->data->sb & IUP_SB_HORIZ) + natural_w += sb_size; + if (ih->data->sb & IUP_SB_VERT) + natural_h += sb_size; + } + + *w = natural_w; + *h = natural_h; +} + +static void iTextDestroyMethod(Ihandle* ih) +{ + if (ih->data->formattags) + iTextDestroyFormatTags(ih); + if (ih->data->mask) + iupMaskDestroy(ih->data->mask); +} + + +/******************************************************************************/ + + +void IupTextConvertLinColToPos(Ihandle* ih, int lin, int col, int *pos) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (!ih->handle) + return; + + if (iupStrEqual(ih->iclass->name, "text") || + iupStrEqual(ih->iclass->name, "multiline")) + { + if (ih->data->is_multiline) + iupdrvTextConvertLinColToPos(ih, lin, col, pos); + else + *pos = col - 1; /* IUP starts at 1 */ + } +} + +void IupTextConvertPosToLinCol(Ihandle* ih, int pos, int *lin, int *col) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (!ih->handle) + return; + + if (iupStrEqual(ih->iclass->name, "text") || + iupStrEqual(ih->iclass->name, "multiline")) + { + if (ih->data->is_multiline) + iupdrvTextConvertPosToLinCol(ih, pos, lin, col); + else + { + *col = pos + 1; /* IUP starts at 1 */ + *lin = 1; + } + } +} + +Ihandle* IupText(const char* action) +{ + void *params[2]; + params[0] = (void*)action; + params[1] = NULL; + return IupCreatev("text", params); +} + +Ihandle* IupMultiLine(const char* action) +{ + void *params[2]; + params[0] = (void*)action; + params[1] = NULL; + return IupCreatev("multiline", params); +} + +Iclass* iupTextGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "text"; + ic->format = "A"; /* one optional callback name */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iTextCreateMethod; + ic->Destroy = iTextDestroyMethod; + ic->ComputeNaturalSize = iTextComputeNaturalSizeMethod; + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "CARET_CB", "iii"); + iupClassRegisterCallback(ic, "ACTION", "is"); + iupClassRegisterCallback(ic, "DROPFILES_CB", "siii"); + iupClassRegisterCallback(ic, "BUTTON_CB", "iiiis"); + iupClassRegisterCallback(ic, "MOTION_CB", "iis"); + iupClassRegisterCallback(ic, "SPIN_CB", "i"); + iupClassRegisterCallback(ic, "VALUECHANGED_CB", ""); + + + /* Common Callbacks */ + iupBaseRegisterCommonCallbacks(ic); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* IupText only */ + iupClassRegisterAttribute(ic, "SCROLLBAR", iTextGetScrollbarAttrib, iTextSetScrollbarAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MULTILINE", iTextGetMultilineAttrib, iTextSetMultilineAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "APPENDNEWLINE", iTextGetAppendNewlineAttrib, iTextSetAppendNewlineAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "MASKCASEI", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MASK", iTextGetMaskAttrib, iTextSetMaskAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MASKINT", NULL, iTextSetMaskIntAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MASKFLOAT", NULL, iTextSetMaskFloatAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "OLD_MASK_DATA", iTextGetMaskDataAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "BORDER", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPIN", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINALIGN", NULL, NULL, IUPAF_SAMEASSYSTEM, "RIGHT", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINAUTO", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINWRAP", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VISIBLECOLUMNS", NULL, NULL, IUPAF_SAMEASSYSTEM, "5", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VISIBLELINES", NULL, NULL, IUPAF_SAMEASSYSTEM, "1", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "WORDWRAP", NULL, NULL, NULL, NULL, IUPAF_DEFAULT); + + iupdrvTextInitClass(ic); + + return ic; +} + +Iclass* iupMultilineGetClass(void) +{ + Iclass* ic = iupTextGetClass(); + ic->Create = iMultilineCreateMethod; + ic->name = "multiline"; /* register the multiline name, so LED will work */ + return ic; +} diff --git a/iup/src/iup_text.h b/iup/src/iup_text.h new file mode 100755 index 0000000..e018961 --- /dev/null +++ b/iup/src/iup_text.h @@ -0,0 +1,48 @@ +/** \file + * \brief Text Controls Private Declarations + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_TEXT_H +#define __IUP_TEXT_H + +#ifdef __cplusplus +extern "C" { +#endif + + +void iupdrvTextInitClass(Iclass* ic); +void iupdrvTextAddBorders(int *w, int *h); +void iupdrvTextAddSpin(int *w, int h); +void iupdrvTextAddFormatTag(Ihandle* ih, Ihandle* formattag); +void iupdrvTextConvertLinColToPos(Ihandle* ih, int lin, int col, int *pos); +void iupdrvTextConvertPosToLinCol(Ihandle* ih, int pos, int *lin, int *col); + +void iupTextUpdateFormatTags(Ihandle* ih); +char* iupTextGetPaddingAttrib(Ihandle* ih); +char* iupTextGetNCAttrib(Ihandle* ih); +int iupTextSetFormattingAttrib(Ihandle* ih, const char* value); +char* iupTextGetFormattingAttrib(Ihandle* ih); +int iupTextSetAddFormatTagAttrib(Ihandle* ih, const char* value); +int iupTextSetAddFormatTagHandleAttrib(Ihandle* ih, const char* value); + +struct _IcontrolData +{ + int is_multiline, + has_formatting, + append_newline, + nc, + sb, /* scrollbar configuration, can be changed only before map */ + horiz_padding, vert_padding, /* button margin */ + last_caret_pos; + Iarray* formattags; + Imask* mask; +}; + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_timer.c b/iup/src/iup_timer.c new file mode 100755 index 0000000..9a003b4 --- /dev/null +++ b/iup/src/iup_timer.c @@ -0,0 +1,80 @@ +/** \file + * \brief Timer Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" +#include "iup_timer.h" + + +static int iTimerSetRunAttrib(Ihandle *ih, const char *value) +{ + if (iupStrBoolean(value)) + iupdrvTimerRun(ih); + else + iupdrvTimerStop(ih); + + return 0; +} + +static char* iTimerGetRunAttrib(Ihandle *ih) +{ + if (ih->serial > 0) + return "YES"; + else + return "NO"; +} + +static char* iTimerGetWidAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(50); + sprintf(str, "%d", ih->serial); + return str; +} + +static void iTimerDestroyMethod(Ihandle* ih) +{ + iupdrvTimerStop(ih); +} + +/******************************************************************************/ + +Ihandle* IupTimer(void) +{ + return IupCreate("timer"); +} + +Iclass* iupTimerGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "timer"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Class functions */ + ic->Destroy = iTimerDestroyMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "ACTION_CB", ""); + + /* Attribute functions */ + iupClassRegisterAttribute(ic, "WID", iTimerGetWidAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "RUN", iTimerGetRunAttrib, iTimerSetRunAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TIME", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupdrvTimerInitClass(ic); + + return ic; +} diff --git a/iup/src/iup_timer.h b/iup/src/iup_timer.h new file mode 100755 index 0000000..8a61f5f --- /dev/null +++ b/iup/src/iup_timer.h @@ -0,0 +1,24 @@ +/** \file + * \brief Timer Resource Private Declarations + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_TIMER_H +#define __IUP_TIMER_H + +#ifdef __cplusplus +extern "C" { +#endif + + +void iupdrvTimerStop(Ihandle* ih); +void iupdrvTimerRun(Ihandle* ih); +void iupdrvTimerInitClass(Iclass* ic); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_toggle.c b/iup/src/iup_toggle.c new file mode 100755 index 0000000..9a09f52 --- /dev/null +++ b/iup/src/iup_toggle.c @@ -0,0 +1,140 @@ +/** \file + * \brief Toggle Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_toggle.h" +#include "iup_image.h" + + +static char* iToggleGetRadioAttrib(Ihandle* ih) +{ + if (ih->data->radio) + return "YES"; + else + return "NO"; +} + +char* iupToggleGetPaddingAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + sprintf(str, "%dx%d", ih->data->horiz_padding, ih->data->vert_padding); + return str; +} + +static int iToggleCreateMethod(Ihandle* ih, void** params) +{ + if (params) + { + if (params[0]) iupAttribStoreStr(ih, "TITLE", (char*)(params[0])); + if (params[1]) iupAttribStoreStr(ih, "ACTION", (char*)(params[1])); + } + ih->data = iupALLOCCTRLDATA(); + return IUP_NOERROR; +} + +static void iToggleComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int natural_w = 0, + natural_h = 0, + type = ih->data->type; + (void)expand; /* unset if not a container */ + + if (!ih->handle) + { + /* if not mapped must initialize the internal values */ + char* value = iupAttribGet(ih, "IMAGE"); + if (value) + type = IUP_TOGGLE_IMAGE; + else + type = IUP_TOGGLE_TEXT; + } + + if (type == IUP_TOGGLE_IMAGE) + { + iupImageGetInfo(iupAttribGet(ih, "IMAGE"), &natural_w, &natural_h, NULL); + + /* even when IMPRESS is set, must compute the borders space */ + iupdrvButtonAddBorders(&natural_w, &natural_h); + + natural_w += 2*ih->data->horiz_padding; + natural_h += 2*ih->data->vert_padding; + } + else /* IUP_TOGGLE_TEXT */ + { + /* must use IupGetAttribute to check from the native implementation */ + char* title = IupGetAttribute(ih, "TITLE"); + char* str = iupStrProcessMnemonic(title, NULL, 0); /* remove & */ + iupdrvFontGetMultiLineStringSize(ih, str, &natural_w, &natural_h); + if (str && str!=title) free(str); + + iupdrvToggleAddCheckBox(&natural_w, &natural_h); + } + + *w = natural_w; + *h = natural_h; +} + + +/******************************************************************************/ + + +Ihandle* IupToggle(const char* title, const char* action) +{ + void *params[3]; + params[0] = (void*)title; + params[1] = (void*)action; + params[2] = NULL; + return IupCreatev("toggle", params); +} + +Iclass* iupToggleGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "toggle"; + ic->format = "SA"; /* one optional string and one optional callback name */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iToggleCreateMethod; + ic->ComputeNaturalSize = iToggleComputeNaturalSizeMethod; + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "ACTION", "i"); + iupClassRegisterCallback(ic, "VALUECHANGED_CB", ""); + + /* Common Callbacks */ + iupBaseRegisterCommonCallbacks(ic); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + iupClassRegisterAttribute(ic, "RADIO", iToggleGetRadioAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "3STATE", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + + iupdrvToggleInitClass(ic); + + return ic; +} diff --git a/iup/src/iup_toggle.h b/iup/src/iup_toggle.h new file mode 100755 index 0000000..08e14b0 --- /dev/null +++ b/iup/src/iup_toggle.h @@ -0,0 +1,37 @@ +/** \file + * \brief Toggle Controls Private Declarations + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_TOGGLE_H +#define __IUP_TOGGLE_H + +#ifdef __cplusplus +extern "C" { +#endif + + +void iupdrvButtonAddBorders(int *x, int *y); /* reuse button borders */ + +void iupdrvToggleInitClass(Iclass* ic); +void iupdrvToggleAddCheckBox(int *x, int *y); + +Ihandle *iupRadioFindToggleParent(Ihandle* ih_toggle); +char* iupToggleGetPaddingAttrib(Ihandle* ih); + +enum {IUP_TOGGLE_IMAGE, IUP_TOGGLE_TEXT}; + +struct _IcontrolData +{ + int type, /* the 2 toggle possibilities */ + radio, + horiz_padding, vert_padding; /* toggle margin for images */ +}; + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_tree.c b/iup/src/iup_tree.c new file mode 100755 index 0000000..c06e573 --- /dev/null +++ b/iup/src/iup_tree.c @@ -0,0 +1,499 @@ +/** \file + * \brief Tree control + * + * See Copyright Notice in iup.h + */ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_tree.h" +#include "iup_assert.h" + + +#define ITREE_IMG_WIDTH 16 +#define ITREE_IMG_HEIGHT 16 + +static void iTreeInitializeImages(void) +{ + Ihandle *image_leaf, *image_blank, *image_paper; + Ihandle *image_collapsed, *image_expanded; + + unsigned char img_leaf[ITREE_IMG_WIDTH*ITREE_IMG_HEIGHT] = + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 4, 5, 5, 5, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 5, 5, 1, 6, 1, 5, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 4, 4, 5, 5, 1, 6, 1, 5, 0, 0, 0, 0, + 0, 0, 0, 3, 4, 4, 4, 5, 5, 1, 1, 5, 0, 0, 0, 0, + 0, 0, 0, 2, 3, 4, 4, 4, 5, 5, 5, 4, 0, 0, 0, 0, + 0, 0, 0, 2, 3, 3, 4, 4, 4, 5, 4, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 3, 3, 4, 4, 4, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + + unsigned char img_collapsed[ITREE_IMG_WIDTH*ITREE_IMG_HEIGHT] = + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 6, 5, 5, 7, 7, 2, 3, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 0, 0, + 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 4, 3, 0, + 2, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 4, 3, 0, + 2, 5, 7, 7, 7, 7, 7, 7, 7, 1, 7, 1, 7, 4, 3, 0, + 2, 5, 7, 7, 7, 7, 7, 7, 7, 7, 1, 7, 1, 4, 3, 0, + 2, 5, 7, 7, 7, 7, 7, 1, 7, 1, 7, 1, 7, 4, 3, 0, + 2, 5, 7, 7, 7, 7, 7, 7, 1, 7, 1, 7, 1, 4, 3, 0, + 2, 5, 7, 7, 7, 1, 7, 1, 7, 1, 7, 1, 1, 4, 3, 0, + 2, 5, 1, 7, 1, 7, 1, 7, 1, 7, 1, 1, 1, 4, 3, 0, + 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 0, + 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + + unsigned char img_expanded[ITREE_IMG_WIDTH*ITREE_IMG_HEIGHT] = + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 1, 3, 3, 3, 3, 3, 1, 2, 2, 2, 2, 2, 2, 0, + 0, 2, 1, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 6, 4, + 0, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 4, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 3, 6, 4, + 2, 1, 3, 3, 3, 3, 3, 3, 5, 3, 5, 6, 4, 6, 6, 4, + 2, 1, 3, 3, 3, 3, 5, 3, 3, 5, 3, 6, 4, 6, 6, 4, + 0, 2, 0, 3, 3, 3, 3, 3, 5, 3, 5, 5, 2, 4, 2, 4, + 0, 2, 0, 3, 3, 5, 3, 5, 3, 5, 5, 5, 6, 4, 2, 4, + 0, 0, 2, 0, 5, 3, 5, 3, 5, 5, 5, 5, 6, 2, 4, 4, + 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, + 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + + unsigned char img_blank[ITREE_IMG_WIDTH*ITREE_IMG_HEIGHT] = + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 0, 0, 0, 0, + 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 0, 0, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 4, 0, 0, + 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 0, + 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0 + }; + + unsigned char img_paper[ITREE_IMG_WIDTH*ITREE_IMG_HEIGHT] = + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 0, 0, 0, 0, + 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 0, 0, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 4, 0, 0, + 0, 0, 3, 1, 4, 3, 4, 3, 4, 3, 4, 2, 2, 2, 2, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 3, 1, 3, 4, 3, 4, 3, 4, 3, 4, 1, 5, 2, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 3, 1, 4, 3, 4, 3, 4, 3, 4, 3, 1, 5, 2, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 3, 1, 3, 4, 3, 4, 3, 4, 3, 4, 1, 5, 2, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 3, 1, 4, 3, 4, 3, 4, 3, 4, 3, 1, 5, 2, 0, + 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 0, + 0, 0, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 0, + 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0 + }; + + image_leaf = IupImage(ITREE_IMG_WIDTH, ITREE_IMG_HEIGHT, img_leaf); + image_collapsed = IupImage(ITREE_IMG_WIDTH, ITREE_IMG_HEIGHT, img_collapsed); + image_expanded = IupImage(ITREE_IMG_WIDTH, ITREE_IMG_HEIGHT, img_expanded); + image_blank = IupImage(ITREE_IMG_WIDTH, ITREE_IMG_HEIGHT, img_blank); + image_paper = IupImage(ITREE_IMG_WIDTH, ITREE_IMG_HEIGHT, img_paper); + + IupSetAttribute(image_leaf, "0", "BGCOLOR"); + IupSetAttribute(image_leaf, "1", "192 192 192"); + IupSetAttribute(image_leaf, "2", "56 56 56"); + IupSetAttribute(image_leaf, "3", "99 99 99"); + IupSetAttribute(image_leaf, "4", "128 128 128"); + IupSetAttribute(image_leaf, "5", "161 161 161"); + IupSetAttribute(image_leaf, "6", "222 222 222"); + + IupSetAttribute(image_collapsed, "0", "BGCOLOR"); + IupSetAttribute(image_collapsed, "1", "255 206 156"); + IupSetAttribute(image_collapsed, "2", "156 156 0"); + IupSetAttribute(image_collapsed, "3", "0 0 0"); + IupSetAttribute(image_collapsed, "4", "206 206 99"); + IupSetAttribute(image_collapsed, "5", "255 255 206"); + IupSetAttribute(image_collapsed, "6", "247 247 247"); + IupSetAttribute(image_collapsed, "7", "255 255 156"); + + IupSetAttribute(image_expanded, "0", "BGCOLOR"); + IupSetAttribute(image_expanded, "1", "255 255 255"); + IupSetAttribute(image_expanded, "2", "156 156 0"); + IupSetAttribute(image_expanded, "3", "255 255 156"); + IupSetAttribute(image_expanded, "4", "0 0 0"); + IupSetAttribute(image_expanded, "5", "255 206 156"); + IupSetAttribute(image_expanded, "6", "206 206 99"); + + IupSetAttribute(image_blank, "0", "BGCOLOR"); + IupSetAttribute(image_blank, "1", "255 255 255"); + IupSetAttribute(image_blank, "2", "000 000 000"); + IupSetAttribute(image_blank, "3", "119 119 119"); + IupSetAttribute(image_blank, "4", "136 136 136"); + IupSetAttribute(image_blank, "5", "187 187 187"); + + IupSetAttribute(image_paper, "0", "BGCOLOR"); + IupSetAttribute(image_paper, "1", "255 255 255"); + IupSetAttribute(image_paper, "2", "000 000 000"); + IupSetAttribute(image_paper, "3", "119 119 119"); + IupSetAttribute(image_paper, "4", "136 136 136"); + IupSetAttribute(image_paper, "5", "187 187 187"); + + IupSetHandle("IMGLEAF", image_leaf); + IupSetHandle("IMGCOLLAPSED", image_collapsed); + IupSetHandle("IMGEXPANDED", image_expanded); + IupSetHandle("IMGBLANK", image_blank); + IupSetHandle("IMGPAPER", image_paper); +} + +void iupTreeUpdateImages(Ihandle *ih) +{ + int inherit; + + char* value = iupAttribGet(ih, "IMAGELEAF"); + if (!value) value = "IMGLEAF"; + iupClassObjectSetAttribute(ih, "IMAGELEAF", value, &inherit); + + value = iupAttribGet(ih, "IMAGEBRANCHCOLLAPSED"); + if (!value) value = "IMGCOLLAPSED"; + iupClassObjectSetAttribute(ih, "IMAGEBRANCHCOLLAPSED", value, &inherit); + + value = iupAttribGet(ih, "IMAGEBRANCHEXPANDED"); + if (!value) value = "IMGEXPANDED"; + iupClassObjectSetAttribute(ih, "IMAGEBRANCHEXPANDED", value, &inherit); +} + +char* iupTreeGetSpacingAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + sprintf(str, "%d", ih->data->spacing); + return str; +} + +static char* iTreeGetMarkModeAttrib(Ihandle* ih) +{ + if (ih->data->mark_mode==ITREE_MARK_SINGLE) + return "SINGLE"; + else + return "MULTIPLE"; +} + +static int iTreeSetMarkModeAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "MULTIPLE")) + ih->data->mark_mode = ITREE_MARK_MULTIPLE; + else + ih->data->mark_mode = ITREE_MARK_SINGLE; + if (ih->handle) + iupdrvTreeUpdateMarkMode(ih); + return 0; +} + +static int iTreeSetShiftAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value) && iupAttribGetBoolean(ih, "CTRL")) + iTreeSetMarkModeAttrib(ih, "MULTIPLE"); + else + iTreeSetMarkModeAttrib(ih, "SINGLE"); + return 1; +} + +static int iTreeSetCtrlAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value) && iupAttribGetBoolean(ih, "SHIFT")) + iTreeSetMarkModeAttrib(ih, "MULTIPLE"); + else + iTreeSetMarkModeAttrib(ih, "SINGLE"); + return 1; +} + +static char* iTreeGetShowRenameAttrib(Ihandle* ih) +{ + if (ih->data->show_rename) + return "YES"; + else + return "NO"; +} + +static int iTreeSetShowRenameAttrib(Ihandle* ih, const char* value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + if (iupStrBoolean(value)) + ih->data->show_rename = 1; + else + ih->data->show_rename = 0; + + return 0; +} + +static char* iTreeGetShowDragDropAttrib(Ihandle* ih) +{ + if (ih->data->show_dragdrop) + return "YES"; + else + return "NO"; +} + +static int iTreeSetShowDragDropAttrib(Ihandle* ih, const char* value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + if (iupStrBoolean(value)) + ih->data->show_dragdrop = 1; + else + ih->data->show_dragdrop = 0; + + return 0; +} + +static int iTreeSetAddLeafAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + iupdrvTreeAddNode(ih, name_id, ITREE_LEAF, value, 1); + return 0; +} + +static int iTreeSetAddBranchAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + iupdrvTreeAddNode(ih, name_id, ITREE_BRANCH, value, 1); + return 0; +} + +static int iTreeSetInsertLeafAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + iupdrvTreeAddNode(ih, name_id, ITREE_LEAF, value, 0); + return 0; +} + +static int iTreeSetInsertBranchAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + iupdrvTreeAddNode(ih, name_id, ITREE_BRANCH, value, 0); + return 0; +} + +static char* iTreeGetAddExpandedAttrib(Ihandle* ih) +{ + if (ih->data->add_expanded) + return "YES"; + else + return "NO"; +} + +static int iTreeSetAddExpandedAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + ih->data->add_expanded = 1; + else + ih->data->add_expanded = 0; + + return 0; +} + +static int iTreeCreateMethod(Ihandle* ih, void **params) +{ + (void)params; + + ih->data = iupALLOCCTRLDATA(); + + IupSetAttribute(ih, "RASTERSIZE", "400x200"); + IupSetAttribute(ih, "EXPAND", "YES"); + + ih->data->add_expanded = 1; + + return IUP_NOERROR; +} + +Ihandle* IupTree(void) +{ + return IupCreate("tree"); +} + +Iclass* iupTreeGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "tree"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + ic->has_attrib_id = 1; /* has attributes with IDs that must be parsed */ + + /* Class functions */ + ic->Create = iTreeCreateMethod; + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "SELECTION_CB", "ii"); + iupClassRegisterCallback(ic, "MULTISELECTION_CB", "Ii"); + iupClassRegisterCallback(ic, "BRANCHOPEN_CB", "i"); + iupClassRegisterCallback(ic, "BRANCHCLOSE_CB", "i"); + iupClassRegisterCallback(ic, "EXECUTELEAF_CB", "i"); + iupClassRegisterCallback(ic, "RENAMENODE_CB", "is"); + iupClassRegisterCallback(ic, "SHOWRENAME_CB", "i"); + iupClassRegisterCallback(ic, "RENAME_CB", "is"); + iupClassRegisterCallback(ic, "DRAGDROP_CB", "iiii"); + iupClassRegisterCallback(ic, "RIGHTCLICK_CB", "i"); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* IupTree Attributes - GENERAL */ + iupClassRegisterAttribute(ic, "SHOWDRAGDROP", iTreeGetShowDragDropAttrib, iTreeSetShowDragDropAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWRENAME", iTreeGetShowRenameAttrib, iTreeSetShowRenameAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ADDEXPANDED", iTreeGetAddExpandedAttrib, iTreeSetAddExpandedAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* IupTree Attributes - MARKS */ + iupClassRegisterAttribute(ic, "CTRL", NULL, iTreeSetCtrlAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "SHIFT", NULL, iTreeSetShiftAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "MARKMODE", iTreeGetMarkModeAttrib, iTreeSetMarkModeAttrib, IUPAF_SAMEASSYSTEM, "SINGLE", IUPAF_NOT_MAPPED); + + /* IupTree Attributes - ACTION */ + iupClassRegisterAttributeId(ic, "ADDLEAF", NULL, iTreeSetAddLeafAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "ADDBRANCH", NULL, iTreeSetAddBranchAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "INSERTLEAF", NULL, iTreeSetInsertLeafAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "INSERTBRANCH", NULL, iTreeSetInsertBranchAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + + /* Default node images */ + iTreeInitializeImages(); + + iupdrvTreeInitClass(ic); + + return ic; +} + + +/********************************************************************************************/ + + +void IupTreeSetAttribute(Ihandle* ih, const char* a, int id, char* v) +{ + char* attr = iupStrGetMemory(50); + sprintf(attr, "%s%d", a, id); + IupSetAttribute(ih, attr, v); +} + +void IupTreeStoreAttribute(Ihandle* ih, const char* a, int id, char* v) +{ + char* attr = iupStrGetMemory(50); + sprintf(attr, "%s%d", a, id); + IupStoreAttribute(ih, attr, v); +} + +char* IupTreeGetAttribute(Ihandle* ih, const char* a, int id) +{ + char* attr = iupStrGetMemory(50); + sprintf(attr, "%s%d", a, id); + return IupGetAttribute(ih, attr); +} + +int IupTreeGetInt(Ihandle* ih, const char* a, int id) +{ + char* attr = iupStrGetMemory(50); + sprintf(attr, "%s%d", a, id); + return IupGetInt(ih, attr); +} + +float IupTreeGetFloat(Ihandle* ih, const char* a, int id) +{ + char* attr = iupStrGetMemory(50); + sprintf(attr, "%s%d", a, id); + return IupGetFloat(ih, attr); +} + +void IupTreeSetfAttribute(Ihandle* ih, const char* a, int id, char* f, ...) +{ + static char v[SHRT_MAX]; + char* attr = iupStrGetMemory(50); + va_list arglist; + sprintf(attr, "%s%d", a, id); + va_start(arglist, f); + vsprintf(v, f, arglist); + va_end(arglist); + IupStoreAttribute(ih, attr, v); +} + + +/************************************************************************************/ + + +int IupTreeSetUserId(Ihandle* ih, int id, void* userdata) +{ + char attr[30]; + sprintf(attr,"USERDATA%d",id); + IupSetAttribute(ih, attr, userdata); + return IupGetAttribute(ih, attr)? 1: 0; +} + +int IupTreeGetId(Ihandle* ih, void *userdata) +{ + int id = -1; + char* value; + char attr[30]; + sprintf(attr,"FINDUSERDATA:%p",userdata); + value = IupGetAttribute(ih, attr); + if (!value) return -1; + + iupStrToInt(value, &id); + return id; +} + +void* IupTreeGetUserId(Ihandle* ih, int id) +{ + char attr[30]; + sprintf(attr,"USERDATA%d",id); + return IupGetAttribute(ih, attr); +} diff --git a/iup/src/iup_tree.h b/iup/src/iup_tree.h new file mode 100755 index 0000000..f96a698 --- /dev/null +++ b/iup/src/iup_tree.h @@ -0,0 +1,57 @@ +/** \file + * \brief iuptree control internal definitions. + * + * See Copyright Notice in iup.h + */ + +#ifndef __IUP_TREE_H +#define __IUP_TREE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Kinds of node */ +#define ITREE_BRANCH 0 +#define ITREE_LEAF 1 + +#define ITREE_MARK_SINGLE 0 +#define ITREE_MARK_MULTIPLE 1 + +#define ITREE_UPDATEIMAGE_LEAF 1 +#define ITREE_UPDATEIMAGE_COLLAPSED 2 +#define ITREE_UPDATEIMAGE_EXPANDED 3 + +void iupdrvTreeInitClass(Iclass* ic); +void iupTreeUpdateImages(Ihandle *ih); +void iupdrvTreeAddNode(Ihandle* ih, const char* id_string, int kind, const char* title, int add); +void iupdrvTreeUpdateMarkMode(Ihandle *ih); + +char* iupTreeGetSpacingAttrib(Ihandle* ih); + +/* Structure of the tree */ +struct _IcontrolData +{ + int mark_mode, + add_expanded, + show_dragdrop, + show_rename, + spacing; + + void* def_image_leaf; /* Default image leaf */ + void* def_image_collapsed; /* Default image collapsed */ + void* def_image_expanded; /* Default image expanded */ + + void* def_image_leaf_mask; /* Motif Only */ + void* def_image_collapsed_mask; + void* def_image_expanded_mask; + + int id_control; /* auxiliary variable for computing or finding the id of a node */ +}; + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_user.c b/iup/src/iup_user.c new file mode 100755 index 0000000..842f436 --- /dev/null +++ b/iup/src/iup_user.c @@ -0,0 +1,41 @@ +/** \file + * \brief User Element. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_stdcontrols.h" + + +static int iUserSetClearAttributesAttrib(Ihandle* ih, const char* value) +{ + (void)value; + iupTableClear(ih->attrib); + return 0; +} + +Ihandle* IupUser(void) +{ + return IupCreate("user"); +} + +Iclass* iupUserGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "user"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPEVOID; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + iupClassRegisterAttribute(ic, "CLEARATTRIBUTES", NULL, iUserSetClearAttributesAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/src/iup_val.c b/iup/src/iup_val.c new file mode 100755 index 0000000..521e35a --- /dev/null +++ b/iup/src/iup_val.c @@ -0,0 +1,209 @@ +/** \file + * \brief Valuator Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" +#include "iupcontrols.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_val.h" + + +void iupValCropValue(Ihandle* ih) +{ + if (ih->data->val > ih->data->vmax) + ih->data->val = ih->data->vmax; + else if (ih->data->val < ih->data->vmin) + ih->data->val = ih->data->vmin; +} + +char* iupValGetShowTicksAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(30); + sprintf(str, "%d", ih->data->show_ticks); + return str; +} + +char* iupValGetValueAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(30); + sprintf(str, "%g", ih->data->val); + return str; +} + +char* iupValGetStepAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(30); + sprintf(str, "%g", ih->data->step); + return str; +} + +char* iupValGetPageStepAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(30); + sprintf(str, "%g", ih->data->pagestep); + return str; +} + +static int iValSetMaxAttrib(Ihandle* ih, const char* value) +{ + ih->data->vmax = atof(value); + iupValCropValue(ih); + return 0; /* do not store value in hash table */ +} + +static char* iValGetMaxAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(30); + sprintf(str, "%g", ih->data->vmax); + return str; +} + +static int iValSetMinAttrib(Ihandle* ih, const char* value) +{ + ih->data->vmin = atof(value); + iupValCropValue(ih); + return 0; /* do not store value in hash table */ +} + +static char* iValGetMinAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(30); + sprintf(str, "%g", ih->data->vmin); + return str; +} + +static int iValSetTypeAttrib(Ihandle* ih, const char *value) +{ + int min_w, min_h; + + /* valid only before map */ + if (ih->handle) + return 0; + + iupdrvValGetMinSize(ih, &min_w, &min_h); + + if (iupStrEqualNoCase(value, "VERTICAL")) + { + /* val natural vertical size is MinWx100 */ + IupSetfAttribute(ih, "RASTERSIZE", "%dx%d", min_w, 100); + ih->data->type = IVAL_VERTICAL; + } + else /* "HORIZONTAL" */ + { + /* val natural horizontal size is 100xMinH */ + IupSetfAttribute(ih, "RASTERSIZE", "%dx%d", 100, min_h); + ih->data->type = IVAL_HORIZONTAL; + } + + return 0; /* do not store value in hash table */ +} + +static char* iValGetTypeAttrib(Ihandle* ih) +{ + if (ih->data->type == IVAL_HORIZONTAL) + return "HORIZONTAL"; + else /* (ih->data->type == IVAL_VERTICAL) */ + return "VERTICAL"; +} + +static int iValSetInvertedAttrib(Ihandle* ih, const char *value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + if (iupStrBoolean(value)) + ih->data->inverted = 1; + else + ih->data->inverted = 0; + + return 0; /* do not store value in hash table */ +} + +static char* iValGetInvertedAttrib(Ihandle* ih) +{ + if (ih->data->inverted) + return "YES"; + else + return "NO"; +} + +static int iValCreateMethod(Ihandle* ih, void **params) +{ + char* type = "HORIZONTAL"; + if (params && params[0]) + type = params[0]; + + ih->data = iupALLOCCTRLDATA(); + + iValSetTypeAttrib(ih, type); + if (ih->data->type == IVAL_VERTICAL) + ih->data->inverted = 1; /* default is YES when vertical */ + + ih->data->vmax = 1.00; + ih->data->step = 0.01; + ih->data->pagestep = 0.10; + + return IUP_NOERROR; +} + +Iclass* iupValGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "val"; + ic->format = "S"; /* one optional string */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iValCreateMethod; + ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Callbacks */ + iupClassRegisterCallback(ic, "VALUECHANGED_CB", ""); + + /* Common Callbacks */ + iupBaseRegisterCommonCallbacks(ic); + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Visual */ + iupBaseRegisterVisualAttrib(ic); + + /* IupVal only */ + iupClassRegisterAttribute(ic, "MAX", iValGetMaxAttrib, iValSetMaxAttrib, IUPAF_SAMEASSYSTEM, "1.0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "MIN", iValGetMinAttrib, iValSetMinAttrib, IUPAF_SAMEASSYSTEM, "0.0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "TYPE", iValGetTypeAttrib, iValSetTypeAttrib, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "INVERTED", iValGetInvertedAttrib, iValSetInvertedAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupdrvValInitClass(ic); + + return ic; +} + +Ihandle *IupVal(const char *type) +{ + void *params[2]; + params[0] = (void*)type; + params[1] = NULL; + return IupCreatev("val", params); +} diff --git a/iup/src/iup_val.h b/iup/src/iup_val.h new file mode 100755 index 0000000..dea8df4 --- /dev/null +++ b/iup/src/iup_val.h @@ -0,0 +1,42 @@ +/** \file + * \brief Valuator Control + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_VAL_H +#define __IUP_VAL_H + +#ifdef __cplusplus +extern "C" { +#endif + +enum {IVAL_VERTICAL, IVAL_HORIZONTAL}; + +struct _IcontrolData +{ + int type; + int show_ticks; /* Windows and Motif only - can be used only after map */ + int inverted; + double val; + double step; + double pagestep; + double vmin; + double vmax; +}; + +void iupValCropValue(Ihandle* ih); +char* iupValGetValueAttrib(Ihandle* ih); +char* iupValGetStepAttrib(Ihandle* ih); +char* iupValGetPageStepAttrib(Ihandle* ih); +char* iupValGetShowTicksAttrib(Ihandle* ih); + +void iupdrvValInitClass(Iclass* ic); +void iupdrvValGetMinSize(Ihandle* ih, int *w, int *h); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/iup_vbox.c b/iup/src/iup_vbox.c new file mode 100755 index 0000000..f71aa51 --- /dev/null +++ b/iup/src/iup_vbox.c @@ -0,0 +1,311 @@ +/** \file + * \brief Vbox Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" +#include "iup_box.h" + + +static int iVboxSetRasterSizeAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + ih->userwidth = 0; + ih->userheight = 0; + } + else + { + int s = 0; + iupStrToInt(value, &s); + if (s > 0) + { + ih->userheight = s; + ih->userwidth = 0; + } + } + iupAttribSetStr(ih, "SIZE", NULL); /* clear SIZE in hash table */ + return 0; +} + +static int iVboxSetSizeAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + ih->userwidth = 0; + ih->userheight = 0; + } + else + { + int s = 0; + iupStrToInt(value, &s); + if (s > 0) + { + int charwidth, charheight; + iupdrvFontGetCharSize(ih, &charwidth, &charheight); + ih->userheight = iupHEIGHT2RASTER(s, charheight); + ih->userwidth = 0; + } + } + return 1; +} + +static int iVboxSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "ARIGHT")) + ih->data->alignment = IUP_ALIGN_ARIGHT; + else if (iupStrEqualNoCase(value, "ACENTER")) + ih->data->alignment = IUP_ALIGN_ACENTER; + else if (iupStrEqualNoCase(value, "ALEFT")) + ih->data->alignment = IUP_ALIGN_ALEFT; + return 0; +} + +static char* iVboxGetAlignmentAttrib(Ihandle* ih) +{ + char* align2str[3] = {"ALEFT", "ACENTER", "ARIGHT"}; + char *str = iupStrGetMemory(50); + sprintf(str, "%s", align2str[ih->data->alignment]); + return str; +} + +static void iVboxComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + Ihandle* child; + int children_naturalwidth, children_naturalheight; + + /* calculate total children natural size */ + int children_expand = 0; + int children_count = 0; + int children_natural_maxwidth = 0; + int children_natural_maxheight = 0; + int children_natural_totalheight = 0; + + for (child = ih->firstchild; child; child = child->brother) + { + /* update child natural size first */ + iupBaseComputeNaturalSize(child); + + if (!child->is_floating) + { + children_expand |= child->expand; + children_natural_maxwidth = iupMAX(children_natural_maxwidth, child->naturalwidth); + children_natural_maxheight = iupMAX(children_natural_maxheight, child->naturalheight); + children_count++; + } + } + + /* reset to max natural width and/or height if NORMALIZESIZE is defined */ + if (ih->data->normalize_size) + iupNormalizeSizeBoxChild(ih, ih->data->normalize_size, children_natural_maxwidth, children_natural_maxheight); + + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating) + children_natural_totalheight += child->naturalheight; + } + + /* leave room at the element for the maximum natural size of the children when is_homogeneous */ + if (ih->data->is_homogeneous) + children_natural_totalheight = children_natural_maxheight*children_count; + + /* compute the Vbox contents natural size */ + children_naturalwidth = children_natural_maxwidth + 2*ih->data->margin_x; + children_naturalheight = children_natural_totalheight + (children_count-1)*ih->data->gap + 2*ih->data->margin_y; + + /* Store to be used in iVboxCalcEmptyHeight */ + ih->data->children_naturalsize = children_naturalheight; + + *expand = children_expand; + *w = children_naturalwidth; + *h = children_naturalheight; +} + +static int iHboxCalcHomogeneousHeight(Ihandle *ih) +{ + /* This is the space that the child can be expanded. */ + Ihandle* child; + int homogeneous_height; + + int children_count=0; + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating) + children_count++; + } + if (children_count == 0) + return 0; + + /* equal spaces for all elements */ + homogeneous_height = (ih->currentheight - (children_count-1)*ih->data->gap - 2*ih->data->margin_y)/children_count; + if (homogeneous_height < 0) homogeneous_height = 0; + return homogeneous_height; +} + +static int iVboxCalcEmptyHeight(Ihandle *ih, int expand) +{ + /* This is the space that the child can be expanded. */ + Ihandle* child; + int empty_height; + + int expand_count=0; + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating && child->expand & expand) + expand_count++; + } + if (expand_count == 0) + return 0; + + /* equal spaces for all expandable elements */ + empty_height = (ih->currentheight - ih->data->children_naturalsize)/expand_count; + if (empty_height < 0) empty_height = 0; + return empty_height; +} + +static void iVboxSetChildrenCurrentSizeMethod(Ihandle* ih, int shrink) +{ + Ihandle* child; + int empty_h0 = 0, empty_h1 = 0, client_width; + + if (ih->data->expand_children) + ih->expand |= ih->data->expand_children; + + if (ih->data->is_homogeneous) + ih->data->homogeneous_size = iHboxCalcHomogeneousHeight(ih); + else + { + ih->data->homogeneous_size = 0; + + /* must calculate the space left for each control to grow inside the container */ + /* H1 means there is an EXPAND enabled inside */ + if (ih->expand & IUP_EXPAND_H1) + empty_h1 = iVboxCalcEmptyHeight(ih, IUP_EXPAND_H1); + /* Not H1 and H0 means that EXPAND is not enabled, but there are some IupFill inside */ + else if (ih->expand & IUP_EXPAND_H0) + empty_h0 = iVboxCalcEmptyHeight(ih, IUP_EXPAND_H0); + } + + client_width = ih->currentwidth - 2*ih->data->margin_x; + if (client_width<0) client_width=0; + + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating) + { + int old_expand = child->expand; + if (ih->data->expand_children) + child->expand |= ih->data->expand_children; + + if (ih->data->homogeneous_size) + iupBaseSetCurrentSize(child, client_width, ih->data->homogeneous_size, shrink); + else + { + int empty = (child->expand & IUP_EXPAND_H1)? empty_h1: ((child->expand & IUP_EXPAND_H0)? empty_h0: 0); + iupBaseSetCurrentSize(child, client_width, child->naturalheight+empty, shrink); + } + + if (ih->data->expand_children) + child->expand = old_expand; + } + else + { + /* update children to their own natural size */ + iupBaseSetCurrentSize(child, child->naturalwidth, child->naturalheight, shrink); + } + } +} + +static void iVboxSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + int dx, client_width; + Ihandle* child; + + x += ih->data->margin_x; + y += ih->data->margin_y; + + client_width = ih->currentwidth - 2*ih->data->margin_x; + if (client_width<0) client_width=0; + + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating) + { + if (ih->data->alignment == IUP_ALIGN_ACENTER) + dx = (client_width - child->currentwidth)/2; + else if (ih->data->alignment == IUP_ALIGN_ARIGHT) + dx = client_width - child->currentwidth; + else /* IUP_ALIGN_ALEFT */ + dx = 0; + if (dx<0) dx = 0; + + /* update child */ + iupBaseSetPosition(child, x+dx, y); + + /* calculate next */ + if (ih->data->homogeneous_size) + y += ih->data->homogeneous_size + ih->data->gap; + else + y += child->currentheight + ih->data->gap; + } + } +} + + +/******************************************************************************/ + + +Ihandle *IupVboxv(Ihandle **children) +{ + return IupCreatev("vbox", (void**)children); +} + +Ihandle *IupVbox(Ihandle* child, ...) +{ + Ihandle **children; + Ihandle *ih; + + va_list arglist; + va_start(arglist, child); + children = (Ihandle **)iupObjectGetParamList(child, arglist); + va_end(arglist); + + ih = IupCreatev("vbox", (void**)children); + free(children); + + return ih; +} + +Iclass* iupVboxGetClass(void) +{ + Iclass* ic = iupBoxClassBase(); + + ic->name = "vbox"; + + /* Class functions */ + ic->ComputeNaturalSize = iVboxComputeNaturalSizeMethod; + ic->SetChildrenCurrentSize = iVboxSetChildrenCurrentSizeMethod; + ic->SetChildrenPosition = iVboxSetChildrenPositionMethod; + + /* Overwrite Common */ + iupClassRegisterAttribute(ic, "SIZE", iupBaseGetSizeAttrib, iVboxSetSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RASTERSIZE", iupBaseGetRasterSizeAttrib, iVboxSetRasterSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* Vbox only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", iVboxGetAlignmentAttrib, iVboxSetAlignmentAttrib, IUPAF_SAMEASSYSTEM, "ALEFT", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/src/iup_zbox.c b/iup/src/iup_zbox.c new file mode 100755 index 0000000..3f79892 --- /dev/null +++ b/iup/src/iup_zbox.c @@ -0,0 +1,375 @@ +/** \file + * \brief Zbox Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_layout.h" + + +enum{IZBOX_ALIGN_NORTH, IZBOX_ALIGN_SOUTH, IZBOX_ALIGN_WEST, IZBOX_ALIGN_EAST, + IZBOX_ALIGN_NE, IZBOX_ALIGN_SE, IZBOX_ALIGN_NW, IZBOX_ALIGN_SW, + IZBOX_ALIGN_ACENTER}; + +struct _IcontrolData +{ + int alignment; + Ihandle* value_handle; +}; + +static int iZboxCreateMethod(Ihandle* ih, void** params) +{ + ih->data = iupALLOCCTRLDATA(); + + ih->data->alignment = IZBOX_ALIGN_NW; + + if (params) + { + Ihandle** iparams = (Ihandle**)params; + while (*iparams) + { + IupAppend(ih, *iparams); + iparams++; + } + } + + return IUP_NOERROR; +} + +static void iZboxChildAddedMethod(Ihandle* ih, Ihandle* child) +{ + if (!ih->data->value_handle) + { + IupSetAttribute(child, "VISIBLE", "YES"); + ih->data->value_handle = child; + } + else + IupSetAttribute(child, "VISIBLE", "NO"); +} + +static void iZboxChildRemovedMethod(Ihandle* ih, Ihandle* child) +{ + if (child == ih->data->value_handle) + { + /* reset to the first child, even if it is NULL */ + if (ih->firstchild) + IupSetAttribute(ih->firstchild, "VISIBLE", "YES"); + ih->data->value_handle = ih->firstchild; + } +} + +static int iZboxSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "NORTH") || iupStrEqualNoCase(value, "ATOP")) + ih->data->alignment = IZBOX_ALIGN_NORTH; + else if (iupStrEqualNoCase(value, "SOUTH") || iupStrEqualNoCase(value, "ABOTTOM")) + ih->data->alignment = IZBOX_ALIGN_SOUTH; + else if (iupStrEqualNoCase(value, "WEST") || iupStrEqualNoCase(value, "ALEFT")) + ih->data->alignment = IZBOX_ALIGN_WEST; + else if (iupStrEqualNoCase(value, "EAST") || iupStrEqualNoCase(value, "ARIGHT")) + ih->data->alignment = IZBOX_ALIGN_EAST; + else if (iupStrEqualNoCase(value, "NE")) + ih->data->alignment = IZBOX_ALIGN_NE; + else if (iupStrEqualNoCase(value, "SE")) + ih->data->alignment = IZBOX_ALIGN_SE; + else if (iupStrEqualNoCase(value, "NW")) + ih->data->alignment = IZBOX_ALIGN_NW; + else if (iupStrEqualNoCase(value, "SW")) + ih->data->alignment = IZBOX_ALIGN_SW; + else if (iupStrEqualNoCase(value, "ACENTER")) + ih->data->alignment = IZBOX_ALIGN_ACENTER; + return 0; +} + +static char* iZboxGetAlignmentAttrib(Ihandle* ih) +{ + static char* align2str[9] = {"NORTH", "SOUTH", "WEST", "EAST", + "NE", "SE", "NW", "SW", + "ACENTER"}; + return align2str[ih->data->alignment]; +} + +static int iZboxSetValueHandleAttrib(Ihandle* ih, const char* value) +{ + Ihandle* old_handle, *new_handle, *child; + + new_handle = (Ihandle*)value; + if (!iupObjectCheck(new_handle)) + return 0; + + old_handle = ih->data->value_handle; + if (!iupObjectCheck(old_handle)) + old_handle = NULL; + + if (old_handle == new_handle) + return 0; + + for (child = ih->firstchild; child; child = child->brother) + { + if (child == new_handle) /* found child */ + { + if (old_handle && old_handle != new_handle) + IupSetAttribute(old_handle, "VISIBLE", "NO"); + + IupSetAttribute(new_handle, "VISIBLE", "YES"); + ih->data->value_handle = new_handle; + return 0; + } + } + + return 0; +} + +static int iZboxSetValuePosAttrib(Ihandle* ih, const char* value) +{ + Ihandle* child; + int pos, i; + + if (!iupStrToInt(value, &pos)) + return 0; + + for (i=0, child=ih->firstchild; child; child = child->brother, i++) + { + if (i == pos) /* found child */ + { + iZboxSetValueHandleAttrib(ih, (char*)child); + return 0; + } + } + + return 0; +} + +static char* iZboxGetValuePosAttrib(Ihandle* ih) +{ + Ihandle* child; + int pos; + + if (!iupObjectCheck(ih->data->value_handle)) + return NULL; + + for (pos=0, child = ih->firstchild; child; child = child->brother, pos++) + { + if (child == ih->data->value_handle) /* found child */ + { + char *str = iupStrGetMemory(50); + sprintf(str, "%d", pos); + return str; + } + } + + return NULL; +} + +static int iZboxSetValueAttrib(Ihandle* ih, const char* value) +{ + Ihandle *new_handle; + + if (!value) + return 0; + + new_handle = IupGetHandle(value); + if (!new_handle) + return 0; + + iZboxSetValueHandleAttrib(ih, (char*)new_handle); + + return 0; +} + +static char* iZboxGetValueAttrib(Ihandle* ih) +{ + Ihandle* child; + int pos; + + if (!iupObjectCheck(ih->data->value_handle)) + return NULL; + + for (pos=0, child = ih->firstchild; child; child = child->brother, pos++) + { + if (child == ih->data->value_handle) /* found child, just cheking */ + return IupGetName(ih->data->value_handle); + } + + return NULL; +} + +static int iZboxSetVisibleAttrib(Ihandle* ih, const char* value) +{ + if (iupObjectCheck(ih->data->value_handle)) + IupSetAttribute(ih->data->value_handle, "VISIBLE", (char*)value); + return 0; +} + +static void iZboxComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + Ihandle* child; + int children_expand, + children_naturalwidth, children_naturalheight; + + /* calculate total children natural size (even for hidden children) */ + children_expand = 0; + children_naturalwidth = 0; + children_naturalheight = 0; + + for (child = ih->firstchild; child; child = child->brother) + { + /* update child natural size first */ + iupBaseComputeNaturalSize(child); + + if (!child->is_floating) + { + children_expand |= child->expand; + children_naturalwidth = iupMAX(children_naturalwidth, child->naturalwidth); + children_naturalheight = iupMAX(children_naturalheight, child->naturalheight); + } + } + + *expand = children_expand; + *w = children_naturalwidth; + *h = children_naturalheight; +} + +static void iZboxSetChildrenCurrentSizeMethod(Ihandle* ih, int shrink) +{ + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating) + iupBaseSetCurrentSize(child, ih->currentwidth, ih->currentheight, shrink); + } +} + +static void iZboxSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + int dx = 0, dy = 0; + Ihandle* child; + + for (child = ih->firstchild; child; child = child->brother) + { + if (!child->is_floating) + { + switch (ih->data->alignment) + { + case IZBOX_ALIGN_ACENTER: + dx=(ih->currentwidth-child->currentwidth)/2; + dy=(ih->currentheight-child->currentheight)/2; + break; + case IZBOX_ALIGN_NORTH: + dx=(ih->currentwidth-child->currentwidth)/2; + dy=0; + break; + case IZBOX_ALIGN_SOUTH: + dx=(ih->currentwidth-child->currentwidth)/2; + dy=ih->currentheight-child->currentheight; + break; + case IZBOX_ALIGN_WEST: + dx=0; + dy=(ih->currentheight-child->currentheight)/2; + break; + case IZBOX_ALIGN_EAST: + dx=ih->currentwidth-child->currentwidth; + dy=(ih->currentheight-child->currentheight)/2; + break; + case IZBOX_ALIGN_NE: + dx=ih->currentwidth-child->currentwidth; + dy=0; + break; + case IZBOX_ALIGN_SE: + dx=ih->currentwidth-child->currentwidth; + dy=ih->currentheight-child->currentheight; + break; + case IZBOX_ALIGN_SW: + dx=0; + dy=ih->currentheight-child->currentheight; + break; + case IZBOX_ALIGN_NW: + default: + dx=0; + dy=0; + break; + } + if (dx<0) dx = 0; + if (dy<0) dy = 0; + + /* update child */ + iupBaseSetPosition(child, x+dx, y+dy); + } + } +} + + +/******************************************************************************/ + + +Ihandle *IupZboxv(Ihandle **children) +{ + return IupCreatev("zbox", (void**)children); +} + +Ihandle *IupZbox(Ihandle* child, ...) +{ + Ihandle **children; + Ihandle *ih; + + va_list arglist; + va_start(arglist, child); + children = (Ihandle **)iupObjectGetParamList(child, arglist); + va_end(arglist); + + ih = IupCreatev("zbox", (void**)children); + free(children); + + return ih; +} + +Iclass* iupZboxGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "zbox"; + ic->format = "g"; /* array of Ihandle */ + ic->nativetype = IUP_TYPEVOID; + ic->childtype = IUP_CHILDMANY; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iZboxCreateMethod; + ic->Map = iupBaseTypeVoidMapMethod; + ic->ChildAdded = iZboxChildAddedMethod; + ic->ChildRemoved = iZboxChildRemovedMethod; + + ic->ComputeNaturalSize = iZboxComputeNaturalSizeMethod; + ic->SetChildrenCurrentSize = iZboxSetChildrenCurrentSizeMethod; + ic->SetChildrenPosition = iZboxSetChildrenPositionMethod; + + /* Common */ + iupBaseRegisterCommonAttrib(ic); + + /* Base Container */ + iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CLIENTSIZE", iupBaseGetRasterSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* Zbox only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", iZboxGetAlignmentAttrib, iZboxSetAlignmentAttrib, IUPAF_SAMEASSYSTEM, "NW", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE", iZboxGetValueAttrib, iZboxSetValueAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUEPOS", iZboxGetValuePosAttrib, iZboxSetValuePosAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE_HANDLE", NULL, iZboxSetValueHandleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + + /* Intercept VISIBLE since ZBOX works showing and hidding its children */ + iupClassRegisterAttribute(ic, "VISIBLE", NULL, iZboxSetVisibleAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/src/iupgtk.dep b/iup/src/iupgtk.dep new file mode 100644 index 0000000..4e2bb45 --- /dev/null +++ b/iup/src/iupgtk.dep @@ -0,0 +1,259 @@ +$(OBJDIR)/iup_array.o: iup_array.c iup_array.h iup_assert.h +$(OBJDIR)/iup_callback.o: iup_callback.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_assert.h +$(OBJDIR)/iup_dlglist.o: iup_dlglist.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_dlglist.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_assert.h +$(OBJDIR)/iup_attrib.o: iup_attrib.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_childtree.h iup_str.h iup_ledlex.h iup_attrib.h \ + iup_assert.h +$(OBJDIR)/iup_focus.o: iup_focus.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_focus.h iup_assert.h iup_attrib.h \ + iup_str.h iup_drv.h +$(OBJDIR)/iup_font.o: iup_font.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_drvfont.h iup_assert.h iup_attrib.h \ + iup_class.h iup_table.h iup_classbase.h +$(OBJDIR)/iup_globalattrib.o: iup_globalattrib.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h iup_table.h iup_globalattrib.h \ + iup_drv.h iup_drvfont.h iup_assert.h iup_str.h +$(OBJDIR)/iup_object.o: iup_object.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_assert.h iup_register.h iup_names.h +$(OBJDIR)/iup_key.o: iup_key.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_key.h iup_str.h \ + iup_object.h iup_class.h iup_table.h iup_classbase.h iup_drv.h \ + iup_focus.h +$(OBJDIR)/iup_layout.o: iup_layout.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_drv.h iup_attrib.h iup_str.h iup_layout.h \ + iup_assert.h +$(OBJDIR)/iup_ledlex.o: iup_ledlex.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_class.h iup_table.h iup_classbase.h \ + iup_ledlex.h iup_str.h iup_register.h +$(OBJDIR)/iup_names.o: iup_names.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_table.h iup_names.h iup_object.h \ + iup_class.h iup_classbase.h iup_assert.h +$(OBJDIR)/iup_open.o: iup_open.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_globalattrib.h iup_names.h iup_func.h \ + iup_drv.h iup_drvinfo.h iup_drvfont.h iup_predial.h iup_class.h \ + iup_table.h iup_classbase.h iup_register.h iup_key.h iup_image.h \ + iup_dlglist.h iup_assert.h iup_strmessage.h +$(OBJDIR)/iup_ledparse.o: iup_ledparse.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_ledlex.h iup_str.h iup_assert.h +$(OBJDIR)/iup_predial.o: iup_predial.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_predial.h iup_attrib.h iup_str.h \ + iup_strmessage.h +$(OBJDIR)/iup_register.o: iup_register.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_register.h iup_stdcontrols.h +$(OBJDIR)/iup_scanf.o: iup_scanf.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_predial.h iup_str.h iup_assert.h +$(OBJDIR)/iup_show.o: iup_show.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_layout.h iup_attrib.h iup_dialog.h iup_menu.h \ + iup_assert.h iup_str.h iup_drv.h iup_drvfont.h +$(OBJDIR)/iup_str.o: iup_str.c iup_str.h +$(OBJDIR)/iup_table.o: iup_table.c iup_table.h iup_str.h iup_assert.h +$(OBJDIR)/iup_func.o: iup_func.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_table.h iup_func.h iup_drv.h \ + iup_assert.h +$(OBJDIR)/iup_childtree.o: iup_childtree.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_dlglist.h iup_childtree.h iup_attrib.h iup_assert.h \ + iup_str.h iup_drv.h +$(OBJDIR)/iup.o: iup.c ../include/iup.h ../include/iupkey.h ../include/iupdef.h +$(OBJDIR)/iup_classattrib.o: iup_classattrib.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_drv.h iup_drvfont.h iup_str.h iup_attrib.h \ + iup_assert.h iup_register.h iup_globalattrib.h +$(OBJDIR)/iup_dialog.o: iup_dialog.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_class.h iup_table.h \ + iup_classbase.h iup_object.h iup_dlglist.h iup_layout.h iup_attrib.h \ + iup_drv.h iup_drvinfo.h iup_drvfont.h iup_focus.h iup_str.h \ + iup_dialog.h +$(OBJDIR)/iup_assert.o: iup_assert.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_assert.h iup_attrib.h iup_str.h \ + iup_strmessage.h +$(OBJDIR)/iup_canvas.o: iup_canvas.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_canvas.h +$(OBJDIR)/iup_messagedlg.o: iup_messagedlg.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_stdcontrols.h +$(OBJDIR)/iup_timer.o: iup_timer.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_str.h iup_stdcontrols.h iup_timer.h +$(OBJDIR)/iup_image.o: iup_image.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_image.h iup_assert.h \ + iup_stdcontrols.h +$(OBJDIR)/iup_label.o: iup_label.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_label.h iup_image.h +$(OBJDIR)/iup_fill.o: iup_fill.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h +$(OBJDIR)/iup_zbox.o: iup_zbox.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h +$(OBJDIR)/iup_colordlg.o: iup_colordlg.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_stdcontrols.h +$(OBJDIR)/iup_fontdlg.o: iup_fontdlg.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_stdcontrols.h +$(OBJDIR)/iup_filedlg.o: iup_filedlg.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_stdcontrols.h +$(OBJDIR)/iup_strmessage.o: iup_strmessage.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_attrib.h iup_str.h iup_strmessage.h iup_table.h +$(OBJDIR)/iup_menu.o: iup_menu.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_dialog.h iup_str.h iup_assert.h \ + iup_key.h iup_stdcontrols.h iup_drvinfo.h iup_menu.h +$(OBJDIR)/iup_frame.o: iup_frame.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_frame.h +$(OBJDIR)/iup_user.o: iup_user.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_stdcontrols.h +$(OBJDIR)/iup_button.o: iup_button.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_button.h iup_image.h +$(OBJDIR)/iup_radio.o: iup_radio.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h +$(OBJDIR)/iup_toggle.o: iup_toggle.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_toggle.h iup_image.h +$(OBJDIR)/iup_progressbar.o: iup_progressbar.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_progressbar.h +$(OBJDIR)/iup_text.o: iup_text.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_mask.h iup_array.h \ + iup_text.h iup_assert.h +$(OBJDIR)/iup_val.o: iup_val.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../include/iupcontrols.h \ + iup_object.h iup_class.h iup_table.h iup_classbase.h iup_attrib.h \ + iup_str.h iup_drv.h iup_stdcontrols.h iup_layout.h iup_val.h +$(OBJDIR)/iup_box.o: iup_box.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_box.h +$(OBJDIR)/iup_hbox.o: iup_hbox.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_box.h +$(OBJDIR)/iup_vbox.o: iup_vbox.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_box.h +$(OBJDIR)/iup_cbox.o: iup_cbox.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h +$(OBJDIR)/iup_class.o: iup_class.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_drv.h iup_drvfont.h iup_str.h iup_attrib.h \ + iup_assert.h +$(OBJDIR)/iup_classbase.o: iup_classbase.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_drv.h iup_drvfont.h iup_str.h \ + iup_attrib.h iup_assert.h +$(OBJDIR)/iup_maskmatch.o: iup_maskmatch.c iup_maskparse.h iup_maskmatch.h +$(OBJDIR)/iup_mask.o: iup_mask.c iup_maskparse.h iup_mask.h iup_str.h +$(OBJDIR)/iup_maskparse.o: iup_maskparse.c iup_maskparse.h iup_maskmatch.h +$(OBJDIR)/iup_tabs.o: iup_tabs.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_image.h iup_tabs.h +$(OBJDIR)/iup_spin.o: iup_spin.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_stdcontrols.h \ + iup_childtree.h +$(OBJDIR)/iup_list.o: iup_list.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_assert.h iup_object.h \ + iup_class.h iup_table.h iup_classbase.h iup_attrib.h iup_str.h \ + iup_drv.h iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_mask.h \ + iup_list.h +$(OBJDIR)/iup_getparam.o: iup_getparam.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_attrib.h iup_str.h iup_strmessage.h \ + iup_drvfont.h +$(OBJDIR)/iup_sbox.o: iup_sbox.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_stdcontrols.h iup_layout.h iup_childtree.h +$(OBJDIR)/iup_normalizer.o: iup_normalizer.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_array.h iup_stdcontrols.h +$(OBJDIR)/iup_tree.o: iup_tree.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_drv.h \ + iup_drvfont.h iup_stdcontrols.h iup_layout.h iup_tree.h iup_assert.h +$(OBJDIR)/iupgtk_focus.o: gtk/iupgtk_focus.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_focus.h iup_attrib.h iup_drv.h iup_assert.h \ + gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_font.o: gtk/iupgtk_font.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_attrib.h iup_array.h iup_object.h \ + iup_class.h iup_table.h iup_classbase.h iup_drv.h iup_drvfont.h \ + iup_assert.h gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_key.o: gtk/iupgtk_key.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_key.h gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_loop.o: gtk/iupgtk_loop.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h +$(OBJDIR)/iupgtk_open.o: gtk/iupgtk_open.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h iup_drv.h iup_drvinfo.h iup_object.h \ + iup_class.h iup_table.h iup_classbase.h iup_globalattrib.h \ + gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_messagedlg.o: gtk/iupgtk_messagedlg.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_dialog.h \ + gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_timer.o: gtk/iupgtk_timer.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_attrib.h iup_str.h iup_assert.h iup_timer.h +$(OBJDIR)/iupgtk_colordlg.o: gtk/iupgtk_colordlg.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_dialog.h \ + gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_fontdlg.o: gtk/iupgtk_fontdlg.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_attrib.h iup_str.h iup_dialog.h \ + gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_progressbar.o: gtk/iupgtk_progressbar.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + iup_object.h iup_class.h iup_table.h iup_classbase.h iup_layout.h \ + iup_attrib.h iup_str.h iup_progressbar.h iup_drv.h gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_val.o: gtk/iupgtk_val.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_layout.h iup_attrib.h iup_str.h \ + iup_val.h iup_drv.h iup_drvfont.h iup_key.h gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_frame.o: gtk/iupgtk_frame.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_object.h iup_class.h iup_table.h \ + iup_classbase.h iup_layout.h iup_attrib.h iup_str.h iup_dialog.h \ + iup_drv.h iup_drvfont.h iup_stdcontrols.h gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_menu.o: gtk/iupgtk_menu.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h iup_object.h iup_class.h \ + iup_table.h iup_classbase.h iup_childtree.h iup_attrib.h iup_dialog.h \ + iup_str.h iup_label.h iup_drv.h iup_drvfont.h iup_image.h iup_menu.h \ + gtk/iupgtk_drv.h +$(OBJDIR)/iupgtk_help.o: gtk/iupgtk_help.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h iup_str.h +$(OBJDIR)/iupunix_info.o: mot/iupunix_info.c iup_str.h iup_drvinfo.h diff --git a/iup/src/iupstub.mak b/iup/src/iupstub.mak new file mode 100755 index 0000000..9ca920f --- /dev/null +++ b/iup/src/iupstub.mak @@ -0,0 +1,12 @@ +PROJNAME = iup +LIBNAME = iupstub +OPT = YES + +USE_DLL = Yes + +INCLUDES = ../include + +SRC = win/iupwindows_main.c + +iupstup-dll: + @move /y ..\lib\vc6\iupstub.lib ..\lib\dll diff --git a/iup/src/make_uname b/iup/src/make_uname new file mode 100755 index 0000000..7fec9f8 --- /dev/null +++ b/iup/src/make_uname @@ -0,0 +1,4 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake $1 $2 $3 $4 $5 $6 $7 +tecmake USE_GTK=Yes $1 $2 $3 $4 $5 $6 $7 diff --git a/iup/src/make_uname.bat b/iup/src/make_uname.bat new file mode 100755 index 0000000..1a79780 --- /dev/null +++ b/iup/src/make_uname.bat @@ -0,0 +1,55 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +call tecmake %1 %2 %3 %4 %5 %6 +call tecmake %1 "USE_GTK=Yes" %2 %3 %4 %5 %6 + +if "%1"=="dll" goto stub_dll +if "%1"=="dll7" goto stub_dll7 +if "%1"=="dll8" goto stub_dll8 +if "%1"=="dll8_64" goto stub_dll8_64 +if "%1"=="dll9" goto stub_dll9 +if "%1"=="dll9_64" goto stub_dll9_64 +if "%1"=="all" goto all_dll +goto fim + +:stub_dll +call tecmake vc6 "MF=iupstub" %2 %3 %4 %5 %6 %7 +move /y ..\lib\vc6\iupstub.lib ..\lib\dll +goto fim + +:stub_dll7 +call tecmake vc7 "MF=iupstub" %2 %3 %4 %5 %6 %7 +move /y ..\lib\vc7\iupstub.lib ..\lib\dll7 +goto fim + +:stub_dll8 +call tecmake vc8 "MF=iupstub" %2 %3 %4 %5 %6 %7 +move /y ..\lib\vc8\iupstub.lib ..\lib\dll8 +goto fim + +:stub_dll8_64 +call tecmake vc8_64 "MF=iupstub" %2 %3 %4 %5 %6 %7 +move /y ..\lib\vc8_64\iupstub.lib ..\lib\dll8_64 +goto fim + +:stub_dll9 +call tecmake vc9 "MF=iupstub" %2 %3 %4 %5 %6 %7 +move /y ..\lib\vc9\iupstub.lib ..\lib\dll9 +goto fim + +:stub_dll9_64 +call tecmake vc9_64 "MF=iupstub" %2 %3 %4 %5 %6 %7 +move /y ..\lib\vc9_64\iupstub.lib ..\lib\dll9_64 +goto fim + +:all_dll +call make_uname dll %2 %3 %4 %5 %6 +call make_uname dll7 %2 %3 %4 %5 %6 +call make_uname dll8 %2 %3 %4 %5 %6 +call make_uname dll8_64 %2 %3 %4 %5 %6 +call make_uname dll9 %2 %3 %4 %5 %6 +call make_uname dll9_64 %2 %3 %4 %5 %6 +goto fim + +:fim diff --git a/iup/src/mot/iupmot_button.c b/iup/src/mot/iupmot_button.c new file mode 100755 index 0000000..2d93588 --- /dev/null +++ b/iup/src/mot/iupmot_button.c @@ -0,0 +1,301 @@ +/** \file + * \brief Button Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_button.h" +#include "iup_drv.h" +#include "iup_image.h" +#include "iup_key.h" + +#include "iupmot_drv.h" + + +void iupdrvButtonAddBorders(int *x, int *y) +{ + int border_size = 2*5; + (*x) += border_size; + (*y) += border_size; +} + +static int motButtonSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_BUTTON_TEXT) + { + iupmotSetMnemonicTitle(ih, value); + return 1; + } + + return 0; +} + +static int motButtonSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + unsigned char align; + char value1[30]="", value2[30]=""; + + iupStrToStrStr(value, value1, value2, ':'); /* value2 is ignored, NOT supported in Motif */ + + if (iupStrEqualNoCase(value1, "ARIGHT")) + align = XmALIGNMENT_END; + else if (iupStrEqualNoCase(value1, "ACENTER")) + align = XmALIGNMENT_CENTER; + else /* "ALEFT" */ + align = XmALIGNMENT_BEGINNING; + + XtVaSetValues (ih->handle, XmNalignment, align, NULL); + return 1; +} + +static int motButtonSetImageAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_BUTTON_IMAGE) + { + iupmotSetPixmap(ih, value, XmNlabelPixmap, 0); + + if (!iupAttribGet(ih, "IMINACTIVE")) + { + /* if not active and IMINACTIVE is not defined + then automaticaly create one based on IMAGE */ + iupmotSetPixmap(ih, value, XmNlabelInsensitivePixmap, 1); /* make_inactive */ + } + return 1; + } + else + return 0; +} + +static int motButtonSetImInactiveAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_BUTTON_IMAGE) + { + iupmotSetPixmap(ih, value, XmNlabelInsensitivePixmap, 0); + return 1; + } + else + return 0; +} + +static int motButtonSetImPressAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_BUTTON_IMAGE) + { + iupmotSetPixmap(ih, value, XmNarmPixmap, 0); + return 1; + } + else + return 0; +} + +static int motButtonSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + if (ih->handle) + { + XtVaSetValues(ih->handle, XmNmarginHeight, ih->data->vert_padding, + XmNmarginWidth, ih->data->horiz_padding, NULL); + } + return 0; +} + +static int motButtonSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (iupAttribGet(ih, "IMPRESS") || iupAttribGetBoolean(ih, "FLAT")) + { + /* ignore given value, must use only from parent */ + value = iupBaseNativeParentGetBgColor(ih); + + if (iupdrvBaseSetBgColorAttrib(ih, value)) + return 1; + } + + return iupdrvBaseSetBgColorAttrib(ih, value); +} + +static int motButtonSetBackgroundAttrib(Ihandle* ih, const char* value) +{ + if (iupAttribGet(ih, "IMPRESS") || iupAttribGetBoolean(ih, "FLAT")) + { + /* ignore given value, must use only from parent */ + value = iupAttribGetInheritNativeParent(ih, "BACKGROUND"); + + if (iupdrvBaseSetBgColorAttrib(ih, value)) + return 1; + else + { + Pixmap pixmap = (Pixmap)iupImageGetImage(value, ih, 0); + if (pixmap) + { + XtVaSetValues(ih->handle, XmNbackgroundPixmap, pixmap, NULL); + return 1; + } + } + } + return 0; +} + +static void motButtonActivateCallback(Widget w, Ihandle* ih, XtPointer call_data) +{ + Icallback cb; + + /* Must manually hide the tip if the button is pressed. */ + iupmotTipLeaveNotify(); + + cb = IupGetCallback(ih, "ACTION"); + if (cb) + { + if (cb(ih) == IUP_CLOSE) + IupExitLoop(); + } + (void)w; + (void)call_data; +} + +static void motButtonEnterLeaveWindowEvent(Widget w, Ihandle* ih, XEvent *evt, Boolean *cont) +{ + iupmotEnterLeaveWindowEvent(w, ih, evt, cont); + + if (evt->type == EnterNotify) + XtVaSetValues(ih->handle, XmNshadowThickness, 2, NULL); + else if (evt->type == LeaveNotify) + XtVaSetValues(ih->handle, XmNshadowThickness, 0, NULL); +} + +static int motButtonMapMethod(Ihandle* ih) +{ + char* value; + int num_args = 0; + Arg args[30]; + + value = iupAttribGet(ih, "IMAGE"); + if (value) + { + ih->data->type = IUP_BUTTON_IMAGE; + iupmotSetArg(args, num_args, XmNlabelType, XmPIXMAP); + } + else + { + ih->data->type = IUP_BUTTON_TEXT; + iupmotSetArg(args, num_args, XmNlabelType, XmSTRING); + } + + /* Core */ + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + /* Label */ + iupmotSetArg(args, num_args, XmNrecomputeSize, False); /* no automatic resize from text */ + iupmotSetArg(args, num_args, XmNmarginHeight, 0); /* default padding */ + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + iupmotSetArg(args, num_args, XmNmarginTop, 0); /* no extra margins */ + iupmotSetArg(args, num_args, XmNmarginLeft, 0); + iupmotSetArg(args, num_args, XmNmarginBottom, 0); + iupmotSetArg(args, num_args, XmNmarginRight, 0); + /* PushButton */ + iupmotSetArg(args, num_args, XmNfillOnArm, False); + + /* Primitive */ + if (iupAttribGetBoolean(ih, "FOCUSONCLICK")) + { + if (iupAttribGetBoolean(ih, "CANFOCUS")) + iupmotSetArg(args, num_args, XmNtraversalOn, True); + else + iupmotSetArg(args, num_args, XmNtraversalOn, False); + } + else + iupmotSetArg(args, num_args, XmNtraversalOn, False); + iupmotSetArg(args, num_args, XmNhighlightThickness, 2); + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); + + ih->handle = XtCreateManagedWidget( + iupDialogGetChildIdStr(ih), /* child identifier */ + xmPushButtonWidgetClass, /* widget class */ + iupChildTreeGetNativeParentHandle(ih), /* widget parent */ + args, num_args); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + XtAddCallback(ih->handle, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + + value = iupAttribGet(ih, "IMPRESS"); + if (iupAttribGetBoolean(ih, "FLAT") && !value) + { + XtVaSetValues(ih->handle, XmNshadowThickness, 0, NULL); + XtAddEventHandler(ih->handle, EnterWindowMask, False, (XtEventHandler)motButtonEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, LeaveWindowMask, False, (XtEventHandler)motButtonEnterLeaveWindowEvent, (XtPointer)ih); + } + else + { + if (value && !iupAttribGetStr(ih, "IMPRESSBORDER")) + XtVaSetValues(ih->handle, XmNshadowThickness, 0, NULL); + else + XtVaSetValues(ih->handle, XmNshadowThickness, 2, NULL); + XtAddEventHandler(ih->handle, EnterWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, LeaveWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + } + + XtAddEventHandler(ih->handle, FocusChangeMask, False, (XtEventHandler)iupmotFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, KeyPressMask, False, (XtEventHandler)iupmotKeyPressEvent, (XtPointer)ih); + + XtAddCallback(ih->handle, XmNactivateCallback, (XtCallbackProc)motButtonActivateCallback, (XtPointer)ih); + XtAddEventHandler(ih->handle, ButtonPressMask|ButtonReleaseMask, False, (XtEventHandler)iupmotButtonPressReleaseEvent, (XtPointer)ih); + + /* Disable Drag Source */ + iupmotDisableDragSource(ih->handle); + + /* initialize the widget */ + XtRealizeWidget(ih->handle); + + if (ih->data->type == IUP_BUTTON_TEXT) + iupmotSetString(ih->handle, XmNlabelString, ""); + + return IUP_NOERROR; +} + +void iupdrvButtonInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motButtonMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", iupmotGetBgColorAttrib, motButtonSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BACKGROUND", NULL, motButtonSetBackgroundAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, iupdrvBaseSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "TITLE", NULL, motButtonSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupButton only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", NULL, motButtonSetAlignmentAttrib, "ACENTER:ACENTER", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "IMAGE", NULL, motButtonSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMINACTIVE", NULL, motButtonSetImInactiveAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMPRESS", NULL, motButtonSetImPressAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FOCUSONCLICK", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "PADDING", iupButtonGetPaddingAttrib, motButtonSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); +} diff --git a/iup/src/mot/iupmot_canvas.c b/iup/src/mot/iupmot_canvas.c new file mode 100755 index 0000000..7777cf3 --- /dev/null +++ b/iup/src/mot/iupmot_canvas.c @@ -0,0 +1,639 @@ +/** \file + * \brief Canvas Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_canvas.h" +#include "iup_key.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + + +static void motDialogScrollbarCallback(Widget w, XtPointer client_data, XtPointer call_data) +{ + int op = (int)client_data, ipage, ipos; + Ihandle *ih; + IFniff cb; + double posx, posy; + (void)call_data; + + XtVaGetValues(w, XmNuserData, &ih, NULL); + if (!ih) return; + + XtVaGetValues(w, + XmNvalue, &ipos, + XmNpageIncrement, &ipage, + NULL); + + if (op > IUP_SBDRAGV) + { + iupCanvasCalcScrollRealPos(iupAttribGetFloat(ih,"XMIN"), iupAttribGetFloat(ih,"XMAX"), &posx, + IUP_SB_MIN, IUP_SB_MAX, ipage, &ipos); + ih->data->posx = (float)posx; + posy = ih->data->posy; + } + else + { + iupCanvasCalcScrollRealPos(iupAttribGetFloat(ih,"YMIN"), iupAttribGetFloat(ih,"YMAX"), &posy, + IUP_SB_MIN, IUP_SB_MAX, ipage, &ipos); + ih->data->posy = (float)posy; + posx = ih->data->posx; + } + + cb = (IFniff)IupGetCallback(ih,"SCROLL_CB"); + if (cb) + cb(ih, op, (float)posx, (float)posy); + else + { + IFnff cb = (IFnff)IupGetCallback(ih,"ACTION"); + if (cb) + cb (ih, (float)posx, (float)posy); + } +} + +static void motCanvasResizeCallback(Widget w, Ihandle *ih, XtPointer call_data) +{ + Dimension width, height; + IFnii cb; + (void)call_data; + + if (!XtWindow(w) || !ih) return; + + /* client size */ + XtVaGetValues(w, XmNwidth, &width, + XmNheight, &height, + NULL); + + cb = (IFnii)IupGetCallback(ih,"RESIZE_CB"); + if (cb) + cb(ih,width,height); +} + +static int motCanvasSetBgColorAttrib(Ihandle* ih, const char* value); + +static void motCanvasExposeCallback(Widget w, Ihandle *ih, XtPointer call_data) +{ + IFnff cb; + (void)call_data; + + if (!XtWindow(w) || !ih) return; + + cb = (IFnff)IupGetCallback(ih,"ACTION"); + if (cb) + { + if (!iupAttribGet(ih, "_IUPMOT_NO_BGCOLOR")) + motCanvasSetBgColorAttrib(ih, iupAttribGetStr(ih, "BGCOLOR")); /* reset to update window attributes */ + + cb (ih, ih->data->posx, ih->data->posy); + } +} + +static void motCanvasInputCallback(Widget w, Ihandle *ih, XtPointer call_data) +{ + XEvent *evt = ((XmDrawingAreaCallbackStruct*)call_data)->event; + + if (!XtWindow(w) || !ih) return; + + switch (evt->type) + { + case ButtonPress: + /* Force focus on canvas click */ + if (iupAttribGetBoolean(ih, "CANFOCUS")) + XmProcessTraversal(w, XmTRAVERSE_CURRENT); + /* break missing on purpose... */ + case ButtonRelease: + { + XButtonEvent *but_evt = (XButtonEvent*)evt; + Boolean cont = True; + iupmotButtonPressReleaseEvent(w, ih, evt, &cont); + if (cont == False) + return; + + if ((evt->type==ButtonPress) && (but_evt->button==Button4 || but_evt->button==Button5)) + { + IFnfiis wcb = (IFnfiis)IupGetCallback(ih, "WHEEL_CB"); + if (wcb) + { + char status[IUPKEY_STATUS_SIZE] = IUPKEY_STATUS_INIT; + int delta = but_evt->button==Button4? 1: -1; + iupmotButtonKeySetStatus(but_evt->state, but_evt->button, status, 0); + + wcb(ih, (float)delta, but_evt->x, but_evt->y, status); + } + else + { + IFniff scb = (IFniff)IupGetCallback(ih,"SCROLL_CB"); + float posy = ih->data->posy; + int delta = but_evt->button==Button4? 1: -1; + int op = but_evt->button==Button4? IUP_SBUP: IUP_SBDN; + posy -= delta*iupAttribGetFloat(ih, "DY")/10.0f; + IupSetfAttribute(ih, "POSY", "%g", posy); + if (scb) + scb(ih,op,ih->data->posx,ih->data->posy); + } + } + } + break; + } +} + +static void motCanvasSetScrollInfo(Widget sb, int imin, int imax, int ipos, int ipage, int iline) +{ + XtVaSetValues(sb, + XmNminimum, imin, + XmNmaximum, imax, + XmNvalue, ipos, + XmNincrement, iline, + XmNpageIncrement, ipage, + XmNsliderSize, ipage, /* to make the thumb proportional */ + NULL); +} + +static int motCanvasSetDXAttrib(Ihandle* ih, const char *value) +{ + if (ih->data->sb & IUP_SB_HORIZ) + { + double posx, xmin, xmax, linex; + float dx; + int iposx, ipagex, ilinex; + Widget sb_horiz, sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + XtVaGetValues(sb_win, XmNhorizontalScrollBar, &sb_horiz, NULL); + if (!sb_horiz) return 1; + + if (!iupStrToFloat(value, &dx)) + return 1; + + xmin = iupAttribGetFloat(ih, "XMIN"); + xmax = iupAttribGetFloat(ih, "XMAX"); + posx = ih->data->posx; + + iupCanvasCalcScrollIntPos(xmin, xmax, dx, posx, + IUP_SB_MIN, IUP_SB_MAX, &ipagex, &iposx); + + if (!iupAttribGet(ih,"LINEX")) + { + ilinex = ipagex/10; + if (!ilinex) + ilinex = 1; + } + else + { + /* line and page convertions are the same */ + linex = iupAttribGetFloat(ih,"LINEX"); + iupCanvasCalcScrollIntPos(xmin, xmax, linex, 0, + IUP_SB_MIN, IUP_SB_MAX, &ilinex, NULL); + } + + if (dx >= (xmax-xmin)) + { + if (iupAttribGetBoolean(ih, "XAUTOHIDE")) + XtUnmanageChild(sb_horiz); + else + XtSetSensitive(sb_horiz, 0); + return 1; + } + else + { + if (!XtIsManaged(sb_horiz)) + XtManageChild(sb_horiz); + XtSetSensitive(sb_horiz, 1); + } + + motCanvasSetScrollInfo(sb_horiz, IUP_SB_MIN, IUP_SB_MAX, iposx, ipagex, ilinex); + + /* update position because it could be corrected */ + iupCanvasCalcScrollRealPos(xmin, xmax, &posx, + IUP_SB_MIN, IUP_SB_MAX, ipagex, &iposx); + + ih->data->posx = (float)posx; + } + return 1; +} + +static int motCanvasSetPosXAttrib(Ihandle* ih, const char *value) +{ + if (ih->data->sb & IUP_SB_HORIZ) + { + double xmin, xmax, dx; + float posx; + int iposx, ipagex; + Widget sb_horiz, sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + XtVaGetValues(sb_win, XmNhorizontalScrollBar, &sb_horiz, NULL); + if (!sb_horiz) return 1; + + if (!iupStrToFloat(value, &posx)) + return 1; + + xmin = iupAttribGetFloat(ih, "XMIN"); + xmax = iupAttribGetFloat(ih, "XMAX"); + dx = iupAttribGetFloat(ih, "DX"); + + if (posx < xmin) posx = (float)xmin; + if (posx > (xmax - dx)) posx = (float)(xmax - dx); + ih->data->posx = posx; + + iupCanvasCalcScrollIntPos(xmin, xmax, dx, posx, + IUP_SB_MIN, IUP_SB_MAX, &ipagex, &iposx); + + XtVaSetValues(sb_horiz, XmNvalue, iposx, NULL); + } + return 1; +} + +static int motCanvasSetDYAttrib(Ihandle* ih, const char *value) +{ + if (ih->data->sb & IUP_SB_VERT) + { + double posy, ymin, ymax, liney; + float dy; + int iposy, ipagey, iliney; + Widget sb_vert, sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + XtVaGetValues(sb_win, XmNverticalScrollBar, &sb_vert, NULL); + if (!sb_vert) return 1; + + if (!iupStrToFloat(value, &dy)) + return 1; + + ymin = iupAttribGetFloat(ih, "YMIN"); + ymax = iupAttribGetFloat(ih, "YMAX"); + posy = ih->data->posy; + + iupCanvasCalcScrollIntPos(ymin, ymax, dy, posy, + IUP_SB_MIN, IUP_SB_MAX, &ipagey, &iposy); + + if (!iupAttribGet(ih,"LINEY")) + { + iliney = ipagey/10; + if (!iliney) + iliney = 1; + } + else + { + /* line and page convertions are the same */ + liney = iupAttribGetFloat(ih,"LINEY"); + iupCanvasCalcScrollIntPos(ymin, ymax, liney, 0, + IUP_SB_MIN, IUP_SB_MAX, &iliney, NULL); + } + + if (dy >= (ymax-ymin)) + { + if (iupAttribGetBoolean(ih, "YAUTOHIDE")) + XtUnmanageChild(sb_vert); + else + XtSetSensitive(sb_vert, 0); + return 1; + } + else + { + if (!XtIsManaged(sb_vert)) + XtManageChild(sb_vert); + XtSetSensitive(sb_vert, 1); + } + + motCanvasSetScrollInfo(sb_vert, IUP_SB_MIN, IUP_SB_MAX, iposy, ipagey, iliney); + + /* update position because it could be corrected */ + iupCanvasCalcScrollRealPos(ymin, ymax, &posy, + IUP_SB_MIN, IUP_SB_MAX, ipagey, &iposy); + + ih->data->posy = (float)posy; + } + return 1; +} + +static int motCanvasSetPosYAttrib(Ihandle* ih, const char *value) +{ + if (ih->data->sb & IUP_SB_VERT) + { + double ymin, ymax, dy; + float posy; + int iposy, ipagey; + Widget sb_vert, sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + XtVaGetValues(sb_win, XmNverticalScrollBar, &sb_vert, NULL); + if (!sb_vert) return 1; + + if (!iupStrToFloat(value, &posy)) + return 1; + + ymin = iupAttribGetFloat(ih, "YMIN"); + ymax = iupAttribGetFloat(ih, "YMAX"); + dy = iupAttribGetFloat(ih, "DY"); + + if (posy < ymin) posy = (float)ymin; + if (posy > (ymax - dy)) posy = (float)(ymax - dy); + ih->data->posy = posy; + + iupCanvasCalcScrollIntPos(ymin, ymax, dy, posy, + IUP_SB_MIN, IUP_SB_MAX, &ipagey, &iposy); + + XtVaSetValues(sb_vert, XmNvalue, iposy, NULL); + } + return 1; +} + +static char* motCanvasGetXDisplayAttrib(Ihandle *ih) +{ + (void)ih; + return (char*)iupmot_display; +} + +static char* motCanvasGetXScreenAttrib(Ihandle *ih) +{ + (void)ih; + return (char*)iupmot_screen; +} + +static char* motCanvasGetXWindowAttrib(Ihandle *ih) +{ + return (char*)XtWindow(ih->handle); +} + +static char* motCanvasGetClientSizeAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(20); + + Dimension width, height; + XtVaGetValues(ih->handle, XmNwidth, &width, + XmNheight, &height, + NULL); + + sprintf(str, "%dx%d", (int)width, (int)height); + return str; +} + +static int motCanvasSetBgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color; + + /* ignore given value, must use only from parent for the scrollbars */ + char* parent_value = iupBaseNativeParentGetBgColor(ih); + + color = iupmotColorGetPixelStr(parent_value); + if (color != (Pixel)-1) + { + Widget sb; + Widget sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + + iupmotSetBgColor(sb_win, color); + + XtVaGetValues(sb_win, XmNverticalScrollBar, &sb, NULL); + if (sb) iupmotSetBgColor(sb, color); + + XtVaGetValues(sb_win, XmNhorizontalScrollBar, &sb, NULL); + if (sb) iupmotSetBgColor(sb, color); + } + + if (!IupGetCallback(ih, "ACTION")) + iupdrvBaseSetBgColorAttrib(ih, value); /* Use the given value only here */ + else + { + XSetWindowAttributes attrs; + attrs.background_pixmap = None; + XChangeWindowAttributes(iupmot_display, XtWindow(ih->handle), CWBackPixmap, &attrs); + iupAttribSetStr(ih, "_IUPMOT_NO_BGCOLOR", "1"); + } + + return 1; +} + +static void motCanvasLayoutUpdateMethod(Ihandle *ih) +{ + Widget sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + Dimension border; + + /* IMPORTANT: + The ScrolledWindow border, added by the Core, is NOT included in the Motif size. + So when setting the size, we must compensate the border, + so the actual size will be the size we expect. + */ + + XtVaGetValues(sb_win, XmNborderWidth, &border, NULL); + + XtVaSetValues(sb_win, + XmNx, (XtArgVal)ih->x, + XmNy, (XtArgVal)ih->y, + XmNwidth, (XtArgVal)(ih->currentwidth-2*border), + XmNheight, (XtArgVal)(ih->currentheight-2*border), + NULL); +} + +static int motCanvasMapMethod(Ihandle* ih) +{ + Widget sb_win; + char *visual; + int num_args = 0; + Arg args[20]; + + if (!ih->parent) + return IUP_ERROR; + + ih->data->sb = iupBaseGetScrollbar(ih); + + /******************************/ + /* Create the scrolled window */ + /******************************/ + + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNscrollingPolicy, XmAPPLICATION_DEFINED); + iupmotSetArg(args, num_args, XmNvisualPolicy, XmVARIABLE); + iupmotSetArg(args, num_args, XmNspacing, 0); /* no space between scrollbars and draw area */ + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + + if (iupAttribGetBoolean(ih, "BORDER")) + { + iupmotSetArg(args, num_args, XmNborderWidth, 1); + iupmotSetArg(args, num_args, XmNborderColor, iupmotColorGetPixelStr("0 0 0")); + } + else + iupmotSetArg(args, num_args, XmNborderWidth, 0); + + sb_win = XtCreateManagedWidget( + iupDialogGetChildIdStr(ih), /* child identifier */ + xmScrolledWindowWidgetClass, /* widget class */ + iupChildTreeGetNativeParentHandle(ih), /* widget parent */ + args, num_args); + + if (!sb_win) + return IUP_ERROR; + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + /****************************/ + /* Create the drawing area */ + /****************************/ + + num_args = 0; + iupmotSetArg(args, num_args, XmNmarginHeight, 0); /* no shadow margins */ + iupmotSetArg(args, num_args, XmNmarginWidth, 0); /* no shadow margins */ + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + iupmotSetArg(args, num_args, XmNresizePolicy, XmRESIZE_NONE); /* no automatic resize of children */ + if (ih->iclass->is_interactive) + { + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); /* include in navigation */ + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + iupmotSetArg(args, num_args, XmNtraversalOn, True); + else + iupmotSetArg(args, num_args, XmNtraversalOn, False); + } + else + { + iupmotSetArg(args, num_args, XmNnavigationType, XmNONE); + iupmotSetArg(args, num_args, XmNtraversalOn, False); + } + + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + + visual = IupGetAttribute(ih, "VISUAL"); /* defined by the OpenGL Canvas or NULL */ + if (visual) + { + Colormap colormap = (Colormap)iupAttribGet(ih, "COLORMAP"); + if (colormap) + iupmotSetArg(args, num_args, XmNcolormap,colormap); + + iupmotDialogSetVisual(ih, visual); + } + + ih->handle = XtCreateManagedWidget( + "draw_area", /* child identifier */ + xmDrawingAreaWidgetClass, /* widget class */ + sb_win, /* widget parent */ + args, num_args); + + if (!ih->handle) + { + XtDestroyWidget(sb_win); + return IUP_ERROR; + } + + if (visual) + iupmotDialogResetVisual(ih); + + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)sb_win); + XtVaSetValues(sb_win, XmNworkWindow, ih->handle, NULL); + + { + XSetWindowAttributes attrs; + attrs.bit_gravity = ForgetGravity; /* For the DrawingArea widget gets Expose events when you resize it to be smaller. */ + + if (iupAttribGetBoolean(ih, "BACKINGSTORE")) + attrs.backing_store = WhenMapped; + else + attrs.backing_store = NotUseful; + + XChangeWindowAttributes(iupmot_display, XtWindow(ih->handle), CWBitGravity|CWBackingStore, &attrs); + } + + if (ih->data->sb & IUP_SB_HORIZ) + { + Widget sb_horiz = XtVaCreateManagedWidget("sb_horiz", + xmScrollBarWidgetClass, sb_win, + XmNorientation, XmHORIZONTAL, + XmNsliderMark, XmTHUMB_MARK, + XmNuserData, ih, + NULL); + + XtAddCallback(sb_horiz, XmNvalueChangedCallback, motDialogScrollbarCallback, (void*)IUP_SBPOSH); + XtAddCallback(sb_horiz, XmNdragCallback, motDialogScrollbarCallback, (void*)IUP_SBDRAGH); + XtAddCallback(sb_horiz, XmNdecrementCallback, motDialogScrollbarCallback, (void*)IUP_SBLEFT); + XtAddCallback(sb_horiz, XmNincrementCallback, motDialogScrollbarCallback, (void*)IUP_SBRIGHT); + XtAddCallback(sb_horiz, XmNpageDecrementCallback, motDialogScrollbarCallback, (void*)IUP_SBPGLEFT); + XtAddCallback(sb_horiz, XmNpageIncrementCallback, motDialogScrollbarCallback, (void*)IUP_SBPGRIGHT); + + XtVaSetValues(sb_win, XmNhorizontalScrollBar, sb_horiz, NULL); + } + + if (ih->data->sb & IUP_SB_VERT) + { + Widget sb_vert = XtVaCreateManagedWidget("sb_vert", + xmScrollBarWidgetClass, sb_win, + XmNorientation, XmVERTICAL, + XmNsliderMark, XmTHUMB_MARK, + XmNuserData, ih, + NULL); + + XtAddCallback(sb_vert, XmNvalueChangedCallback, motDialogScrollbarCallback, (void*)IUP_SBPOSV); + XtAddCallback(sb_vert, XmNdragCallback, motDialogScrollbarCallback, (void*)IUP_SBDRAGV); + XtAddCallback(sb_vert, XmNdecrementCallback, motDialogScrollbarCallback, (void*)IUP_SBUP); + XtAddCallback(sb_vert, XmNincrementCallback, motDialogScrollbarCallback, (void*)IUP_SBDN); + XtAddCallback(sb_vert, XmNpageDecrementCallback, motDialogScrollbarCallback, (void*)IUP_SBPGUP); + XtAddCallback(sb_vert, XmNpageIncrementCallback, motDialogScrollbarCallback, (void*)IUP_SBPGDN); + + XtVaSetValues(sb_win, XmNverticalScrollBar, sb_vert, NULL); + } + + XtAddCallback(ih->handle, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNexposeCallback, (XtCallbackProc)motCanvasExposeCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNresizeCallback, (XtCallbackProc)motCanvasResizeCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNinputCallback, (XtCallbackProc)motCanvasInputCallback, (XtPointer)ih); + + XtAddEventHandler(ih->handle, EnterWindowMask, False,(XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, LeaveWindowMask, False,(XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + + XtAddEventHandler(ih->handle, FocusChangeMask, False,(XtEventHandler)iupmotFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, KeyPressMask, False, (XtEventHandler)iupmotKeyPressEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, KeyReleaseMask, False, (XtEventHandler)iupmotCanvasKeyReleaseEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, PointerMotionMask, False, (XtEventHandler)iupmotPointerMotionEvent, (XtPointer)ih); + + /* initialize the widget */ + XtRealizeWidget(sb_win); + + return IUP_NOERROR; +} + +void iupdrvCanvasInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motCanvasMapMethod; + ic->LayoutUpdate = motCanvasLayoutUpdateMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, motCanvasSetBgColorAttrib, "255 255 255", NULL, IUPAF_DEFAULT); /* force new default value */ + + /* IupCanvas only */ + iupClassRegisterAttribute(ic, "DRAWSIZE", motCanvasGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CURSOR", NULL, iupdrvBaseSetCursorAttrib, IUPAF_SAMEASSYSTEM, "ARROW", IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "DX", NULL, motCanvasSetDXAttrib, "0.1", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "DY", NULL, motCanvasSetDYAttrib, "0.1", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "POSX", iupCanvasGetPosXAttrib, motCanvasSetPosXAttrib, "0.0", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "POSY", iupCanvasGetPosYAttrib, motCanvasSetPosYAttrib, "0.0", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "YAUTOHIDE", NULL, NULL, "YES", NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "XAUTOHIDE", NULL, NULL, "YES", NULL, IUPAF_NOT_MAPPED); + + /* IupCanvas X only */ + iupClassRegisterAttribute(ic, "XWINDOW", motCanvasGetXWindowAttrib, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "XDISPLAY", motCanvasGetXDisplayAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "XSCREEN", motCanvasGetXScreenAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "BACKINGSTORE", NULL, NULL, "YES", NULL, IUPAF_NOT_MAPPED); +} diff --git a/iup/src/mot/iupmot_clipboard.c b/iup/src/mot/iupmot_clipboard.c new file mode 100755 index 0000000..43a0087 --- /dev/null +++ b/iup/src/mot/iupmot_clipboard.c @@ -0,0 +1,208 @@ +/** \file + * \brief Clipboard for the Motif Driver. + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include + +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" + +#include "iupmot_drv.h" + + +static Window motClipboardGetWindow(void) +{ + Ihandle* focus = IupGetFocus(); + Ihandle* dlg; + if (!focus) return (Window)NULL; + dlg = IupGetDialog(focus); + if (dlg) + return XtWindow(dlg->handle); + else + return (Window)NULL; +} + +static int motClipboardSetTextAttrib(Ihandle *ih, const char *value) +{ + long item_id = 0; + Window window = motClipboardGetWindow(); + XmString clip_label = XmStringCreateLocalized ("IupClipboard"); + (void)ih; + + if (XmClipboardStartCopy(iupmot_display, window, clip_label, CurrentTime, NULL, NULL, &item_id)!=ClipboardSuccess) + { + XmStringFree(clip_label); + return 0; + } + + XmStringFree(clip_label); + + XmClipboardCopy(iupmot_display, window, item_id, "STRING", (char*)value, (long)strlen(value)+1, 0, NULL); + XmClipboardEndCopy(iupmot_display, window, item_id); + return 0; +} + +static char* motClipboardGetTextAttrib(Ihandle *ih) +{ + unsigned long size; + char* str; + Window window = motClipboardGetWindow(); + (void)ih; + + if (XmClipboardInquireLength(iupmot_display, window, "STRING", &size)!=ClipboardSuccess) + return NULL; + + str = iupStrGetMemory(size+1); + + if (XmClipboardRetrieve(iupmot_display, window, "STRING", str, size+1, NULL, NULL)!=ClipboardSuccess) + return NULL; + + return str; +} + +static int motClipboardSetImageAttrib(Ihandle *ih, const char *value) +{ + Pixmap pixmap; + long item_id = 0; + Window window = motClipboardGetWindow(); + XmString clip_label = XmStringCreateLocalized ("IupClipboard"); + + if (XmClipboardStartCopy(iupmot_display, window, clip_label, CurrentTime, NULL, NULL, &item_id)!=ClipboardSuccess) + { + XmStringFree(clip_label); + return 0; + } + + XmStringFree(clip_label); + + pixmap = (Pixmap)iupImageGetImage(value, ih, 0); + + XmClipboardCopy(iupmot_display, window, item_id, "PIXMAP", (char*)&pixmap, sizeof(Pixmap), 0, NULL); + XmClipboardEndCopy(iupmot_display, window, item_id); + + (void)ih; + return 0; +} + +static int motClipboardSetNativeImageAttrib(Ihandle *ih, const char *value) +{ + long item_id = 0; + Window window = motClipboardGetWindow(); + XmString clip_label = XmStringCreateLocalized ("IupClipboard"); + Pixmap pixmap = (Pixmap)value; + + if (XmClipboardStartCopy(iupmot_display, window, clip_label, CurrentTime, NULL, NULL, &item_id)!=ClipboardSuccess) + { + XmStringFree(clip_label); + return 0; + } + + XmStringFree(clip_label); + + XmClipboardCopy(iupmot_display, window, item_id, "PIXMAP", (char*)&pixmap, sizeof(Pixmap), 0, NULL); + XmClipboardEndCopy(iupmot_display, window, item_id); + + (void)ih; + return 0; +} + +static char* motClipboardGetNativeImageAttrib(Ihandle *ih) +{ + unsigned long size; + void* data; + Pixmap pixmap; + Window window = motClipboardGetWindow(); + (void)ih; + + if (XmClipboardInquireLength(iupmot_display, window, "PIXMAP", &size)!=ClipboardSuccess) + return NULL; + + data = XtMalloc(size); + + if (XmClipboardRetrieve(iupmot_display, window, "PIXMAP", data, size, NULL, NULL)!=ClipboardSuccess) + return NULL; + + pixmap = *((Pixmap*)data); + XtFree(data); + return (char*)pixmap; +} + +static int motClipboardIsAvailable(const char* format_name) +{ + Window window = motClipboardGetWindow(); + int count, i; + unsigned long max_length, length; + char* str; + + if (XmClipboardInquireCount(iupmot_display, window, &count, &max_length) != ClipboardSuccess) + return 0; + + str = iupStrGetMemory(max_length+1); + + for (i = 1; i<=count; i++) + { + if (XmClipboardInquireFormat(iupmot_display, window, i, str, max_length+1, &length)==ClipboardSuccess) + { + if (iupStrEqualNoCase(str, format_name)) + return 1; + } + } + + return 0; +} + +static char* motClipboardGetTextAvailableAttrib(Ihandle *ih) +{ + (void)ih; + if (motClipboardIsAvailable("STRING")) + return "YES"; + else + return "NO"; +} + +static char* motClipboardGetImageAvailableAttrib(Ihandle *ih) +{ + (void)ih; + if (motClipboardIsAvailable("PIXMAP")) + return "YES"; + else + return "NO"; +} + +/******************************************************************************/ + +Ihandle* IupClipboard(void) +{ + return IupCreate("clipboard"); +} + +Iclass* iupClipboardGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "clipboard"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Attribute functions */ + iupClassRegisterAttribute(ic, "TEXT", motClipboardGetTextAttrib, motClipboardSetTextAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NATIVEIMAGE", motClipboardGetNativeImageAttrib, motClipboardSetNativeImageAttrib, NULL, NULL, IUPAF_NO_STRING|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, motClipboardSetImageAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TEXTAVAILABLE", motClipboardGetTextAvailableAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGEAVAILABLE", motClipboardGetImageAvailableAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/src/mot/iupmot_color.c b/iup/src/mot/iupmot_color.c new file mode 100755 index 0000000..276bccc --- /dev/null +++ b/iup/src/mot/iupmot_color.c @@ -0,0 +1,380 @@ +/** \file + * \brief Motif Driver color management + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drvinfo.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + + +/* local variables */ + +typedef struct _Icolor +{ + Colormap colormap; /* colormap for all canvas, dialogs and menus */ + XColor color_table[256]; /* colormap colors */ + int num_colors; /* number of colors in colormap */ + + int rshift; /* red shift for truecolor */ + int gshift; /* green shift for truecolor */ + int bshift; /* blue shift for truecolor */ + + int direct_conv[256]; /* used with directColor visuals */ +} Icolor; + +static Icolor mot_color; + + +/******************************************* + NOT TrueColor Functions +*******************************************/ + +static int motColor8BppErrorHandler(Display* dpy, XErrorEvent *err) +{ + char msg[80]; + + /* BadAcess in XFreeColors is OK */ + if (err->request_code==X_FreeColors && err->error_code==BadAccess) + return 0; + + XGetErrorText(dpy, err->error_code, msg, 80 ); + fprintf(stderr,"IUP Motif error handler: Xlib request %d: %s\n", err->request_code, msg); + + return 0; +} + +static unsigned long motColorNearestRGB(XColor* xc1) +{ + static int nearest_try = 0; + + int pos = 0, i; + unsigned long min_dist = ULONG_MAX, this_dist; + int dr, dg, db; + XColor* xc2; + + for (i=0; ired - xc2->red) / 850; /* 0.30 / 255 */ + dg = (xc1->green - xc2->green) / 432; /* 0.59 / 255 */ + db = (xc1->blue - xc2->blue) / 2318; /* 0.11 / 255 */ + + this_dist = dr*dr + dg*dg + db*db; + + if (this_dist < min_dist) + { + min_dist = this_dist; + pos = i; + } + } + + /* verifico se a cor ainda esta alocada */ + /* Try to allocate the closest match color. This should only + fail if the cell is read/write. Otherwise, we're incrementing + the cell's reference count. (comentario extraido da biblioteca Mesa) */ + if (!XAllocColor(iupmot_display, mot_color.colormap, + &(mot_color.color_table[pos]))) + { + /* nao esta, preciso atualizar a tabela e procurar novamente */ + /* isto acontece porque a cor encontrada pode ter sido de uma aplicacao que nao existe mais */ + /* uma vez atualizada, o problema nao ocorrera' na nova procura */ + /* ou a celula e' read write */ + + if (nearest_try == 1) + { + nearest_try = 0; + return mot_color.color_table[pos].pixel; + } + + XQueryColors(iupmot_display, mot_color.colormap, mot_color.color_table, mot_color.num_colors); + + nearest_try = 1; /* garante que so' vai tentar isso uma vez */ + return motColorNearestRGB(xc1); + } + + return mot_color.color_table[pos].pixel; +} + +static unsigned long motColorGetPixel_NotTrueColor(unsigned char cr, unsigned char cg, unsigned char cb) +{ + unsigned long pixel; + XColor xc; + xc.red = iupCOLOR8TO16(cr); + xc.green = iupCOLOR8TO16(cg); + xc.blue = iupCOLOR8TO16(cb); + xc.flags = DoRed | DoGreen | DoBlue; + + /* verificamos se a nova cor ja' esta' disponivel */ + if (!XAllocColor(iupmot_display, mot_color.colormap, &xc)) + { + /* nao estava disponivel, procuro pela mais proxima na tabela de cores */ + pixel = motColorNearestRGB(&xc); + } + else + { + /* ja' estava disponivel */ + /* atualizo a tabela de cores */ + mot_color.color_table[xc.pixel] = xc; + pixel = xc.pixel; + } + + return pixel; +} + +static void motColorGetRGB_NotTrueColor(unsigned long pixel, unsigned char* red, unsigned char* green, unsigned char* blue) +{ + XColor xc; + xc.pixel = pixel; + XQueryColor(iupmot_display, mot_color.colormap, &xc); + *red = (unsigned char)xc.red; + *green = (unsigned char)xc.green; + *blue = (unsigned char)xc.blue; +} + +static void motColorReserveColors(void) +{ + unsigned char r, g, b; + unsigned long background, foreground, shadow, highlight, selection; + XtVaGetValues(iupmot_appshell, XmNbackground, &background, NULL); + XmGetColors(DefaultScreenOfDisplay(iupmot_display), mot_color.colormap, + background, &foreground, &highlight, &shadow, &selection); + motColorGetRGB_NotTrueColor(background, &r, &g, &b); + motColorGetPixel_NotTrueColor(r, g, b); + motColorGetRGB_NotTrueColor(foreground, &r, &g, &b); + motColorGetPixel_NotTrueColor(r, g, b); + motColorGetRGB_NotTrueColor(shadow, &r, &g, &b); + motColorGetPixel_NotTrueColor(r, g, b); + motColorGetRGB_NotTrueColor(highlight, &r, &g, &b); + motColorGetPixel_NotTrueColor(r, g, b); + motColorGetRGB_NotTrueColor(selection, &r, &g, &b); + motColorGetPixel_NotTrueColor(r, g, b); +} + + +/******************************************* + TrueColor Functions +*******************************************/ + + +static void motColorGetRGB_TrueColor(unsigned long pixel, unsigned char* red, unsigned char* green, unsigned char* blue) +{ + unsigned long r = pixel & iupmot_visual->red_mask; + unsigned long g = pixel & iupmot_visual->green_mask; + unsigned long b = pixel & iupmot_visual->blue_mask; + if (mot_color.rshift<0) r = r >> (-mot_color.rshift); + else r = r << mot_color.rshift; + if (mot_color.gshift<0) g = g >> (-mot_color.gshift); + else g = g << mot_color.gshift; + if (mot_color.bshift<0) b = b >> (-mot_color.bshift); + else b = b << mot_color.bshift; + *red = iupCOLOR16TO8(r); + *green = iupCOLOR16TO8(g); + *blue = iupCOLOR16TO8(b); +} + +static unsigned long motColorGetPixel_TrueColor(unsigned char cr, unsigned char cg, unsigned char cb) +{ + unsigned long r = iupCOLOR8TO16(cr); + unsigned long g = iupCOLOR8TO16(cg); + unsigned long b = iupCOLOR8TO16(cb); + + if (mot_color.rshift<0) + r = r << (-mot_color.rshift); + else + r = r >> mot_color.rshift; + + if (mot_color.gshift<0) + g = g << (-mot_color.gshift); + else + g = g >> mot_color.gshift; + + if (mot_color.bshift<0) + b = b << (-mot_color.bshift); + else + b = b >> mot_color.bshift; + + r = r & iupmot_visual->red_mask; + g = g & iupmot_visual->green_mask; + b = b & iupmot_visual->blue_mask; + + return r | g | b; +} + +static int motColorHighBit(unsigned long ul) +{ +/* returns position of highest set bit in 'ul' as an integer (0-31), + or -1 if none */ + int i; unsigned long hb; + + hb = 0x80; hb = hb << 24; /* hb = 0x80000000UL */ + for (i=31; ((ul & hb) == 0) && i>=0; i--, ul<<=1); + return i; +} + +static void motColorMakeDirectCmap(Colormap cmap) +{ + int i, cmaplen, numgot; + unsigned char origgot[256]; + XColor c; + unsigned long rmask, gmask, bmask; + int rshift, gshift, bshift; + + rmask = iupmot_visual->red_mask; + gmask = iupmot_visual->green_mask; + bmask = iupmot_visual->blue_mask; + + rshift = motColorHighBit(rmask) - 15; + gshift = motColorHighBit(gmask) - 15; + bshift = motColorHighBit(bmask) - 15; + + if (rshift<0) rmask = rmask << (-rshift); + else rmask = rmask >> rshift; + + if (gshift<0) gmask = gmask << (-gshift); + else gmask = gmask >> gshift; + + if (bshift<0) bmask = bmask << (-bshift); + else bmask = bmask >> bshift; + + cmaplen = iupmot_visual->map_entries; + if (cmaplen>256) cmaplen=256; + + /* try to alloc a 'cmaplen' long grayscale colormap. May not get all + entries for whatever reason. Build table 'mot_color.direct_conv[]' that + maps range [0..(cmaplen-1)] into set of colors we did get */ + + for (i=0; i<256; i++) { origgot[i] = 0; mot_color.direct_conv[i] = i; } + + for (i=numgot=0; i= 0 && !origgot[i-numbak]) numbak++; + while ((i + numfwd) < cmaplen && !origgot[i+numfwd]) numfwd++; + + if (i-numbak<0 || !origgot[i-numbak]) numbak = 999; + if (i+numfwd>=cmaplen || !origgot[i+numfwd]) numfwd = 999; + + if (numbak 8) + { + iupmotColorGetRGB = motColorGetRGB_TrueColor; + iupmotColorGetPixel = motColorGetPixel_TrueColor; + + /* make linear colormap for DirectColor visual */ + if (iupmot_visual->class == DirectColor) + motColorMakeDirectCmap(DefaultColormap(iupmot_display, iupmot_screen)); + + mot_color.rshift = 15 - motColorHighBit(iupmot_visual->red_mask); + mot_color.gshift = 15 - motColorHighBit(iupmot_visual->green_mask); + mot_color.bshift = 15 - motColorHighBit(iupmot_visual->blue_mask); + + mot_color.num_colors = 0; + mot_color.colormap = 0; + } + else + { + int i; + iupmotColorGetRGB = motColorGetRGB_NotTrueColor; + iupmotColorGetPixel = motColorGetPixel_NotTrueColor; + + mot_color.colormap = DefaultColormap(iupmot_display, iupmot_screen); + mot_color.num_colors = 1L << depth; + + for (i=0; i + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drvinfo.h" +#include "iup_dialog.h" + +#include "iupmot_drv.h" + + +static int motColorDlgPopup(Ihandle* ih, int x, int y) +{ + (void)ih; + (void)x; + (void)y; + return IUP_ERROR; +} + +void iupdrvColorDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = motColorDlgPopup; +} diff --git a/iup/src/mot/iupmot_common.c b/iup/src/mot/iupmot_common.c new file mode 100755 index 0000000..7b3f8b7 --- /dev/null +++ b/iup/src/mot/iupmot_common.c @@ -0,0 +1,630 @@ +/** \file + * \brief Motif Base Functions + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "iup.h" +#include "iupkey.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_key.h" +#include "iup_str.h" +#include "iup_class.h" +#include "iup_attrib.h" +#include "iup_focus.h" +#include "iup_key.h" +#include "iup_drv.h" +#include "iup_image.h" +#include "iup_drv.h" + +#include "iupmot_color.h" +#include "iupmot_drv.h" + + + +void iupdrvActivate(Ihandle* ih) +{ + if (iupStrEqual(ih->iclass->name, "text") || iupStrEqual(ih->iclass->name, "multiline")) + XmProcessTraversal(ih->handle, XmTRAVERSE_CURRENT); + else + XtCallActionProc(ih->handle, "ArmAndActivate", 0, 0, 0 ); +} + +static int motActivateMnemonic(Ihandle *dialog, int c) +{ + Ihandle *ih; + char attrib[19] = "_IUPMOT_MNEMONIC_ "; + attrib[17] = (char)c; + ih = (Ihandle*)iupAttribGet(dialog, attrib); + if (iupObjectCheck(ih)) + { + iupdrvActivate(ih); + return IUP_IGNORE; + } + return IUP_CONTINUE; +} + +void iupmotSetMnemonicTitle(Ihandle *ih, const char* value) +{ + char c; + char* str; + + if (!value) + value = ""; + + str = iupStrProcessMnemonic(value, &c, -1); /* remove & and return in c */ + if (str != value) + { + KeySym keysym = iupmotKeyCharToKeySym(c); + XtVaSetValues(ih->handle, XmNmnemonic, keysym, NULL); /* works only for menus, but underlines the letter */ + + if (ih->iclass->nativetype != IUP_TYPEMENU) + { + Ihandle* dialog = IupGetDialog(ih); + char attrib[22] = "_IUPMOT_MNEMONIC_ \0CB"; + attrib[17] = (char)toupper(c); + + /* used by motActivateMnemonic */ + if (iupStrEqual(ih->iclass->name, "label")) + iupAttribSetStr(dialog, attrib, (char*)iupFocusNextInteractive(ih)); + else + iupAttribSetStr(dialog, attrib, (char*)ih); + + /* used by iupmotKeyPressEvent */ + attrib[18] = '_'; + IupSetCallback(dialog, attrib, (Icallback)motActivateMnemonic); + } + + iupmotSetString(ih->handle, XmNlabelString, str); + free(str); + } + else + { + XtVaSetValues (ih->handle, XmNmnemonic, NULL, NULL); + iupmotSetString(ih->handle, XmNlabelString, str); + } +} + +void iupmotSetString(Widget w, const char *resource, const char* value) +{ + XmString xm_str = XmStringCreateLocalized((String)value); + XtVaSetValues(w, resource, xm_str, NULL); + XmStringFree(xm_str); +} + +char* iupmotConvertString(XmString str) +{ + char* text = (char*)XmStringUnparse(str, NULL, XmCHARSET_TEXT, XmCHARSET_TEXT, NULL, 0, XmOUTPUT_ALL); + char* buf = iupStrGetMemoryCopy(text); + XtFree(text); + return buf; +} + +#ifdef OLD_CONVERT +char* iupmotConvertString(XmString str) +{ + XmStringContext context; + char *text, *p, *buf; + unsigned int length; + XmStringComponentType type; + + if (!XmStringInitContext (&context, str)) + return NULL; + + buf = iupStrGetMemory(XmStringLength(str)); /* always greatter than strlen */ + + /* p keeps a running pointer through buf as text is read */ + p = buf; + while ((type = XmStringGetNextTriple(context, &length, (XtPointer)&text)) != XmSTRING_COMPONENT_END) + { + switch (type) + { + case XmSTRING_COMPONENT_TEXT: + memcpy(p, text, length); + p += length; + *p = 0; + break; + case XmSTRING_COMPONENT_TAB: + *p++ = '\t'; + *p = 0; + break; + case XmSTRING_COMPONENT_SEPARATOR: + *p++ = '\n'; + *p = 0; + break; + } + XtFree(text); + } + + XmStringFreeContext(context); + + return buf; +} +#endif + +void iupdrvReparent(Ihandle* ih) +{ + Widget native_parent = iupChildTreeGetNativeParentHandle(ih); + Widget widget = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + XReparentWindow(iupmot_display, XtWindow(widget), XtWindow(native_parent), 0, 0); +} + +void iupdrvBaseLayoutUpdateMethod(Ihandle *ih) +{ + Widget widget = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + + XtVaSetValues(widget, + XmNx, (XtArgVal)ih->x, + XmNy, (XtArgVal)ih->y, + XmNwidth, (XtArgVal)ih->currentwidth, + XmNheight, (XtArgVal)ih->currentheight, + NULL); +} + +void iupdrvBaseUnMapMethod(Ihandle* ih) +{ + Widget widget = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + + XtUnrealizeWidget(widget); /* To match the call to XtRealizeWidget */ + XtDestroyWidget(widget); /* To match the call to XtCreateManagedWidget */ +} + +void iupdrvDisplayUpdate(Ihandle *ih) +{ + XExposeEvent evt; + Dimension w, h; + + XtVaGetValues(ih->handle, XmNwidth, &w, + XmNheight, &h, + NULL); + + evt.type = Expose; + evt.display = iupmot_display; + evt.send_event = True; + evt.window = XtWindow(ih->handle); + + evt.x = 0; + evt.y = 0; + evt.width = w; + evt.height = h; + + evt.count = 0; + + /* POST a Redraw */ + XSendEvent(iupmot_display, XtWindow(ih->handle), False, ExposureMask, (XEvent*)&evt); +} + +void iupdrvDisplayRedraw(Ihandle *ih) +{ + Widget w; + + /* POST a Redraw */ + iupdrvDisplayUpdate(ih); + + /* if this element has an inner native parent (like IupTabs), + then redraw that native parent if different from the element. */ + w = (Widget)iupClassObjectGetInnerNativeContainerHandle(ih, (Ihandle*)IupGetAttribute(ih, "VALUE_HANDLE")); + if (w && w != ih->handle) + { + Widget handle = ih->handle; + ih->handle = w; + iupdrvDisplayUpdate(ih); + ih->handle = handle; + } + + /* flush exposure events. */ + XmUpdateDisplay(ih->handle); +} + +void iupdrvScreenToClient(Ihandle* ih, int *x, int *y) +{ + Window child; + XTranslateCoordinates(iupmot_display, RootWindow(iupmot_display, iupmot_screen), + XtWindow(ih->handle), + *x, *y, x, y, &child); +} + +void iupmotHelpCallback(Widget w, Ihandle *ih, XtPointer call_data) +{ + Icallback cb = IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + IupExitLoop(); + + (void)call_data; + (void)w; +} + +void iupmotEnterLeaveWindowEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont) +{ + Icallback cb = NULL; + (void)cont; + (void)w; + + if (evt->type == EnterNotify) + { + iupmotTipEnterNotify(ih); + + cb = IupGetCallback(ih, "ENTERWINDOW_CB"); + } + else if (evt->type == LeaveNotify) + { + iupmotTipLeaveNotify(); + + cb = IupGetCallback(ih, "LEAVEWINDOW_CB"); + } + + if (cb) + cb(ih); +} + +int iupdrvBaseSetZorderAttrib(Ihandle* ih, const char* value) +{ + if (iupdrvIsVisible(ih)) + { + if (iupStrEqualNoCase(value, "TOP")) + XRaiseWindow(iupmot_display, XtWindow(ih->handle)); + else + XLowerWindow(iupmot_display, XtWindow(ih->handle)); + } + + return 0; +} + +void iupdrvSetVisible(Ihandle* ih, int visible) +{ + Widget widget = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + + if (visible) + XtMapWidget(widget); + else + XtUnmapWidget(widget); +} + +int iupdrvIsVisible(Ihandle* ih) +{ + XWindowAttributes wa; + XGetWindowAttributes(iupmot_display, XtWindow(ih->handle), &wa); + return (wa.map_state == IsViewable); +} + +int iupdrvIsActive(Ihandle* ih) +{ + return XtIsSensitive(ih->handle); +} + +void iupdrvSetActive(Ihandle* ih, int enable) +{ + Widget widget = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + + XtSetSensitive(widget, enable); +} + +char* iupmotGetXWindowAttrib(Ihandle *ih) +{ + return (char*)XtWindow(ih->handle); +} + +char* iupdrvBaseGetXAttrib(Ihandle *ih) +{ + int x, y; + Window child; + char* str = iupStrGetMemory(20); + Widget widget = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + + /* Translating to absolute screen coordinates */ + /* source destination */ + XTranslateCoordinates(iupmot_display, + XtWindow(widget), RootWindow(iupmot_display, iupmot_screen), + 0, 0, &x, &y, + &child); + + sprintf(str, "%d", x); + return str; +} + +char* iupdrvBaseGetYAttrib(Ihandle *ih) +{ + int x, y; + Window child; + char* str = iupStrGetMemory(20); + Widget widget = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (!widget) widget = ih->handle; + + /* Translating to absolute screen coordinates */ + /* source destination */ + XTranslateCoordinates(iupmot_display, + XtWindow(widget), RootWindow(iupmot_display, iupmot_screen), + 0, 0, &x, &y, + &child); + + sprintf(str, "%d", y); + return str; +} + +void iupmotSetBgColor(Widget w, Pixel color) +{ + Pixel fgcolor; + XtVaGetValues(w, XmNforeground, &fgcolor, NULL); + XmChangeColor(w, color); + /* XmChangeColor also sets the XmNforeground color, so we must reset to the previous one. */ + XtVaSetValues(w, XmNforeground, fgcolor, NULL); + XtVaSetValues(w, XmNbackgroundPixmap, XmUNSPECIFIED_PIXMAP, NULL); +} + +int iupdrvBaseSetBgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + iupmotSetBgColor(ih->handle, color); + + /* update internal image cache for controls that have the IMAGE attribute */ + iupImageUpdateParent(ih); + } + return 1; +} + +char* iupmotGetBgColorAttrib(Ihandle* ih) +{ + unsigned char r, g, b; + Pixel color; + char* str = iupStrGetMemory(20); + XtVaGetValues(ih->handle, XmNbackground, &color, NULL); + iupmotColorGetRGB(color, &r, &g, &b); + sprintf(str, "%d %d %d", (int)r, (int)g, (int)b); + return str; +} + +int iupdrvBaseSetFgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + XtVaSetValues(ih->handle, XmNforeground, color, NULL); + return 1; +} + +void iupmotGetWindowSize(Ihandle *ih, int *width, int *height) +{ + Dimension w, h; + XtVaGetValues(ih->handle, XmNwidth, &w, + XmNheight, &h, + NULL); + *width = w; + *height = h; +} + +static Cursor motEmptyCursor(Ihandle* ih) +{ + /* creates an empty cursor */ + XColor cursor_color = {0L,0,0,0,0,0}; + char bitsnull[1] = {0x00}; + Pixmap pixmapnull; + Cursor cur; + + pixmapnull = XCreateBitmapFromData(iupmot_display, + XtWindow(ih->handle), + bitsnull, + 1,1); + + cur = XCreatePixmapCursor(iupmot_display, + pixmapnull, + pixmapnull, + &cursor_color, + &cursor_color, + 0,0); + + XFreePixmap(iupmot_display, pixmapnull); + + return cur; +} + +static Cursor motGetCursor(Ihandle* ih, const char* name) +{ + static struct { + const char* iupname; + int sysname; + } table[] = { + { "NONE", 0}, + { "NULL", 0}, + { "ARROW", XC_left_ptr}, + { "BUSY", XC_watch}, + { "CROSS", XC_crosshair}, + { "HAND", XC_hand2}, + { "HELP", XC_question_arrow}, + { "IUP", XC_question_arrow}, + { "MOVE", XC_fleur}, + { "PEN", XC_pencil}, + { "RESIZE_N", XC_top_side}, + { "RESIZE_S", XC_bottom_side}, + { "RESIZE_NS", XC_sb_v_double_arrow}, + { "RESIZE_W", XC_left_side}, + { "RESIZE_E", XC_right_side}, + { "RESIZE_WE", XC_sb_h_double_arrow}, + { "RESIZE_NE", XC_top_right_corner}, + { "RESIZE_SE", XC_bottom_right_corner}, + { "RESIZE_NW", XC_top_left_corner}, + { "RESIZE_SW", XC_bottom_left_corner}, + { "TEXT", XC_xterm}, + { "UPARROW", XC_center_ptr} + }; + + Cursor cur; + char str[50]; + int i, count = sizeof(table)/sizeof(table[0]); + + /* check the cursor cache first (per control)*/ + sprintf(str, "_IUPMOT_CURSOR_%s", name); + cur = (Cursor)iupAttribGet(ih, str); + if (cur) + return cur; + + /* check the pre-defined IUP names first */ + for (i = 0; i < count; i++) + { + if (iupStrEqualNoCase(name, table[i].iupname)) + { + if (table[i].sysname) + cur = XCreateFontCursor(iupmot_display, table[i].sysname); + else + cur = motEmptyCursor(ih); + + break; + } + } + + if (i == count) + { + /* check for a name defined cursor */ + cur = (Cursor)iupImageGetCursor(name); + } + + iupAttribSetStr(ih, str, (char*)cur); + return cur; +} + +int iupdrvBaseSetCursorAttrib(Ihandle* ih, const char* value) +{ + Cursor cur = motGetCursor(ih, value); + if (cur) + { + XDefineCursor(iupmot_display, XtWindow(ih->handle), cur); + return 1; + } + return 0; +} + +#include +#include + +void iupdrvDrawFocusRect(Ihandle* ih, void* _gc, int x, int y, int w, int h) +{ + Drawable wnd = (Drawable)IupGetAttribute(ih, "XWINDOW"); /* Use IupGetAttribute to consult the native implemetation */ + GC gc = (GC)_gc; + XmeDrawHighlight(iupmot_display, wnd, gc, x, y, w, h, 1); +} + +void iupdrvBaseRegisterCommonAttrib(Iclass* ic) +{ + iupClassRegisterAttribute(ic, "XMFONTLIST", iupmotGetFontListAttrib, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "XFONTSTRUCT", iupmotGetFontStructAttrib, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "XFONTID", iupmotGetFontIdAttrib, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); +} + +static void motDoNothing(Widget w, XEvent* evt, String* params, Cardinal* num_params) +{ + (void)w; + (void)evt; + (void)params; + (void)num_params; +} + +void iupmotDisableDragSource(Widget w) +{ + char dragTranslations[] = "#override : iupDoNothing()"; + static int do_nothing_rec = 0; + if (!do_nothing_rec) + { + XtActionsRec rec = {"iupDoNothing", (XtActionProc)motDoNothing}; + XtAppAddActions(iupmot_appcontext, &rec, 1); + do_nothing_rec = 1; + } + XtOverrideTranslations(w, XtParseTranslationTable(dragTranslations)); +} + +int iupdrvGetScrollbarSize(void) +{ + return 15; +} + +void iupmotSetPixmap(Ihandle* ih, const char* name, const char* prop, int make_inactive) +{ + if (name) + { + Pixmap old_pixmap; + Pixmap pixmap = (Pixmap)iupImageGetImage(name, ih, make_inactive); + if (!pixmap) + pixmap = XmUNSPECIFIED_PIXMAP; + XtVaGetValues(ih->handle, prop, &old_pixmap, NULL); + if (pixmap != old_pixmap) + XtVaSetValues(ih->handle, prop, pixmap, NULL); + return; + } + + /* if not defined */ + XtVaSetValues(ih->handle, prop, XmUNSPECIFIED_PIXMAP, NULL); +} + +void iupmotButtonPressReleaseEvent(Widget w, Ihandle* ih, XEvent* evt, Boolean* cont) +{ + unsigned long elapsed; + static Time last = 0; + char status[IUPKEY_STATUS_SIZE] = IUPKEY_STATUS_INIT; + IFniiiis cb; + + XButtonEvent *but_evt = (XButtonEvent*)evt; + if (but_evt->button!=Button1 && + but_evt->button!=Button2 && + but_evt->button!=Button3 && + but_evt->button!=Button4 && + but_evt->button!=Button5) + return; + + cb = (IFniiiis) IupGetCallback(ih,"BUTTON_CB"); + if (cb) + { + int ret, doubleclick = 0; + int b = IUP_BUTTON1+(but_evt->button-1); + + /* Double/Single Click */ + if (but_evt->type==ButtonPress) + { + elapsed = but_evt->time - last; + last = but_evt->time; + if ((int)elapsed <= XtGetMultiClickTime(iupmot_display)) + doubleclick = 1; + } + + iupmotButtonKeySetStatus(but_evt->state, but_evt->button, status, doubleclick); + + ret = cb(ih, b, (but_evt->type==ButtonPress), but_evt->x, but_evt->y, status); + if (ret==IUP_CLOSE) + IupExitLoop(); + else if (ret==IUP_IGNORE) + *cont=False; + } + + (void)w; +} + +void iupmotPointerMotionEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont) +{ + IFniis cb = (IFniis)IupGetCallback(ih,"MOTION_CB"); + if (cb) + { + XMotionEvent *motion_evt = (XMotionEvent*)evt; + char status[IUPKEY_STATUS_SIZE] = IUPKEY_STATUS_INIT; + iupmotButtonKeySetStatus(motion_evt->state, 0, status, 0); + cb(ih, motion_evt->x, motion_evt->y, status); + } + + (void)w; + (void)cont; +} diff --git a/iup/src/mot/iupmot_dialog.c b/iup/src/mot/iupmot_dialog.c new file mode 100755 index 0000000..4eeb834 --- /dev/null +++ b/iup/src/mot/iupmot_dialog.c @@ -0,0 +1,1069 @@ +/** \file + * \brief IupDialog class + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_class.h" +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_dlglist.h" +#include "iup_attrib.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_drvinfo.h" +#include "iup_focus.h" +#include "iup_str.h" +#define _IUPDLG_PRIVATE +#include "iup_dialog.h" +#include "iup_image.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +Atom iupmot_wm_deletewindow = 0; /* used also by IupMessageDlg */ + +static int motDialogSetBgColorAttrib(Ihandle* ih, const char* value); + +/**************************************************************** + Utilities +****************************************************************/ + + +int iupdrvDialogIsVisible(Ihandle* ih) +{ + return iupdrvIsVisible(ih) || ih->data->show_state == IUP_MINIMIZE; +} + +void iupdrvDialogUpdateSize(Ihandle* ih) +{ + Dimension width, height; + XtVaGetValues(ih->handle, XmNwidth, &width, XmNheight, &height, NULL); + ih->currentwidth = width; + ih->currentheight = height; +} + +void iupdrvDialogGetSize(InativeHandle* handle, int *w, int *h) +{ + Dimension width, height; + XtVaGetValues(handle, XmNwidth, &width, XmNheight, &height, NULL); + if (w) *w = width; + if (h) *h = height; +} + +void iupmotDialogSetVisual(Ihandle* ih, void* visual) +{ + Ihandle *dialog = IupGetDialog(ih); + XtVaSetValues(dialog->handle, XmNvisual, visual, NULL); +} + +void iupmotDialogResetVisual(Ihandle* ih) +{ + Ihandle *dialog = IupGetDialog(ih); + XtVaSetValues(dialog->handle, XmNvisual, iupmot_visual, NULL); +} + +void iupdrvDialogSetVisible(Ihandle* ih, int visible) +{ + if (visible) + { + XtMapWidget(ih->handle); + XRaiseWindow(iupmot_display, XtWindow(ih->handle)); + while (!iupdrvDialogIsVisible(ih)); /* waits until window get mapped */ + } + else + { + /* if iupdrvIsVisible reports hidden, then it should be minimized */ + if (!iupdrvIsVisible(ih)) /* can NOT hide a minimized window, so map it first. */ + { + XtMapWidget(ih->handle); + XRaiseWindow(iupmot_display, XtWindow(ih->handle)); + while (!iupdrvDialogIsVisible(ih)); /* waits until window get mapped */ + } + + XtUnmapWidget(ih->handle); + while (iupdrvDialogIsVisible(ih)); /* waits until window gets unmapped */ + } +} + +void iupdrvDialogGetPosition(InativeHandle* handle, int *x, int *y) +{ + Dimension cur_x, cur_y; + XtVaGetValues(handle, XmNx, &cur_x, + XmNy, &cur_y, + NULL); + if (x) *x = cur_x; + if (y) *y = cur_y; +} + +void iupdrvDialogSetPosition(Ihandle *ih, int x, int y) +{ + XtVaSetValues(ih->handle, + XmNx, (XtArgVal)x, + XmNy, (XtArgVal)y, + NULL); +} + +static int motDialogGetMenuSize(Ihandle* ih) +{ + if (ih->data->menu) + return iupdrvMenuGetMenuBarSize(ih->data->menu); + else + return 0; +} + +void iupdrvDialogGetDecoration(Ihandle* ih, int *border, int *caption, int *menu) +{ + static int native_border = 0; + static int native_caption = 0; + + int has_caption = iupAttribGetBoolean(ih, "MAXBOX") || + iupAttribGetBoolean(ih, "MINBOX") || + iupAttribGetBoolean(ih, "MENUBOX") || + IupGetAttribute(ih, "TITLE"); /* must use IupGetAttribute to check from the native implementation */ + + int has_border = has_caption || + iupAttribGetBoolean(ih, "RESIZE") || + iupAttribGetBoolean(ih, "BORDER"); + + *menu = motDialogGetMenuSize(ih); + + if (ih->handle && iupdrvDialogIsVisible(ih)) + { + int win_border, win_caption; + if (iupdrvGetWindowDecor((void*)XtWindow(ih->handle), &win_border, &win_caption)) + { + *border = 0; + if (has_border) + *border = win_border; + + *caption = 0; + if (has_caption) + *caption = win_caption; + + if (!native_border && *border) + native_border = win_border; + + if (!native_caption && *caption) + native_caption = win_caption; + + return; + } + } + + /* I could not set the size of the window including the decorations when the dialog is hidden */ + /* So we have to estimate the size of borders and caption when the dialog is hidden */ + + *border = 0; + if (has_border) + { + if (native_border) + *border = native_border; + else + *border = 5; + } + + *caption = 0; + if (has_caption) + { + if (native_caption) + *caption = native_caption; + else + *caption = 20; + } +} + +static int motDialogQueryWMspecSupport(Atom feature) +{ + static Atom netsuppport = 0; + Atom type; + Atom *atoms; + int format; + unsigned long after, natoms, i; + + if (!netsuppport) + netsuppport = XmInternAtom(iupmot_display, "_NET_SUPPORTED", False); + + /* get all the features */ + XGetWindowProperty(iupmot_display, RootWindow(iupmot_display, iupmot_screen), + netsuppport, 0, LONG_MAX, False, XA_ATOM, &type, &format, &natoms, + &after, (unsigned char **)&atoms); + if (type != XA_ATOM || atoms == NULL) + { + if (atoms) XFree(atoms); + return 0; + } + + /* Lookup the feature we want */ + for (i = 0; i < natoms; i++) + { + if (atoms[i] == feature) + { + XFree(atoms); + return 1; + } + } + + XFree(atoms); + return 0; +} + +static void motDialogSetWindowManagerStyle(Ihandle* ih) +{ + MwmHints hints; + static Atom xwmhint = 0; + if (!xwmhint) + xwmhint = XmInternAtom(iupmot_display, "_MOTIF_WM_HINTS", False); + + hints.flags = (MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS); + hints.functions = 0; + hints.decorations = 0; + hints.input_mode = 0; + hints.status = 0; + + if (IupGetAttribute(ih, "TITLE")) { /* must use IupGetAttribute to check from the native implementation */ + hints.functions |= MWM_FUNC_MOVE; + hints.decorations |= MWM_DECOR_TITLE; + } + + if (iupAttribGetBoolean(ih, "MENUBOX")) { + hints.functions |= MWM_FUNC_CLOSE; + hints.decorations |= MWM_DECOR_MENU; + } + + if (iupAttribGetBoolean(ih, "MINBOX")) { + hints.functions |= MWM_FUNC_MINIMIZE; + hints.decorations |= MWM_DECOR_MINIMIZE; + } + + if (iupAttribGetBoolean(ih, "MAXBOX")) { + hints.functions |= MWM_FUNC_MAXIMIZE; + hints.decorations |= MWM_DECOR_MAXIMIZE; + } + + if (iupAttribGetBoolean(ih, "RESIZE")) { + hints.functions |= MWM_FUNC_RESIZE; + hints.decorations |= MWM_DECOR_RESIZEH; + } + + if (iupAttribGetBoolean(ih, "BORDER")) + hints.decorations |= MWM_DECOR_BORDER; + + XChangeProperty(iupmot_display, XtWindow(ih->handle), + xwmhint, xwmhint, + 32, PropModeReplace, + (const unsigned char *) &hints, + PROP_MOTIF_WM_HINTS_ELEMENTS); +} + +static void motDialogChangeWMState(Ihandle* ih, Atom state1, Atom state2, int operation) +{ + static Atom wmstate = 0; + if (!wmstate) + wmstate = XmInternAtom(iupmot_display, "_NET_WM_STATE", False); + + if (iupdrvDialogIsVisible(ih)) + { + XEvent evt; + evt.type = ClientMessage; + evt.xclient.type = ClientMessage; + evt.xclient.serial = 0; + evt.xclient.send_event = True; + evt.xclient.display = iupmot_display; + evt.xclient.window = XtWindow(ih->handle); + evt.xclient.message_type = wmstate; + evt.xclient.format = 32; + evt.xclient.data.l[0] = operation; + evt.xclient.data.l[1] = state1; + evt.xclient.data.l[2] = state2; + evt.xclient.data.l[3] = 0; + evt.xclient.data.l[4] = 0; + + XSendEvent(iupmot_display, RootWindow(iupmot_display, iupmot_screen), False, + SubstructureRedirectMask | SubstructureNotifyMask, &evt); + } + else + { + if (operation) + { + if (state1 && state2) + { + Atom atoms[2]; + atoms[0] = state1; + atoms[0] = state2; + + XChangeProperty(iupmot_display, XtWindow(ih->handle), + wmstate, XA_ATOM, + 32, PropModeReplace, + (const unsigned char *)&atoms, 2); + } + else + { + XChangeProperty(iupmot_display, XtWindow(ih->handle), + wmstate, XA_ATOM, + 32, PropModeReplace, + (const unsigned char *)&state1, 1); + } + } + else + { + /* TODO: This is not working. The property is not correctly removed. */ + /* XDeleteProperty(iupmot_display, XtWindow(ih->handle), wmstate); */ + + /* Maybe the right way to do it is to retrieve all the atoms */ + /* and change again with all atoms except the one to remove */ + } + } +} + +static int motDialogSetFullScreen(Ihandle* ih, int fullscreen) +{ + static int support_fullscreen = -1; /* WARNING: The WM can be changed dinamically */ + + static Atom xwmfs = 0; + if (!xwmfs) + xwmfs = XmInternAtom(iupmot_display, "_NET_WM_STATE_FULLSCREEN", False); + + if (support_fullscreen == -1) + support_fullscreen = motDialogQueryWMspecSupport(xwmfs); + + if (support_fullscreen) + { + motDialogChangeWMState(ih, xwmfs, 0, fullscreen); + return 1; + } + + return 0; +} + +int iupdrvDialogSetPlacement(Ihandle* ih) +{ + char* placement; + ih->data->show_state = IUP_SHOW; + + if (iupAttribGetBoolean(ih, "FULLSCREEN")) + return 1; + + placement = iupAttribGet(ih, "PLACEMENT"); + if (!placement) + return 0; + + if (iupStrEqualNoCase(placement, "MINIMIZED")) + { + if (iupdrvDialogIsVisible(ih)) + XIconifyWindow(iupmot_display, XtWindow(ih->handle), iupmot_screen); + else + { + /* TODO: This is not working, so force a minimize after visible. */ + /*XWMHints wm_hints; */ + /*wm_hints.flags = StateHint; */ + /*wm_hints.initial_state = IconicState; */ + /*XSetWMHints(iupmot_display, XtWindow(ih->handle), &wm_hints); */ + + XtMapWidget(ih->handle); + XIconifyWindow(iupmot_display, XtWindow(ih->handle), iupmot_screen); + } + } + else if (iupStrEqualNoCase(placement, "MAXIMIZED")) + { + static Atom maxatoms[2] = {0, 0}; + if (!(maxatoms[0])) + { + maxatoms[0] = XmInternAtom(iupmot_display, "_NET_WM_STATE_MAXIMIZED_VERT", False); + maxatoms[1] = XmInternAtom(iupmot_display, "_NET_WM_STATE_MAXIMIZED_HORZ", False); + } + + motDialogChangeWMState(ih, maxatoms[0], maxatoms[1], 1); + } + else if (iupStrEqualNoCase(placement, "FULL")) + { + int width, height, x, y; + int border, caption, menu; + iupdrvDialogGetDecoration(ih, &border, &caption, &menu); + + /* position the decoration outside the screen */ + x = -(border); + y = -(border+caption+menu); + + /* the dialog client area will cover the task bar */ + iupdrvGetFullSize(&width, &height); + + height += menu; /* the menu is included in the client area size in Motif. */ + + /* set the new size and position */ + /* The resize event will update the layout */ + XtVaSetValues(ih->handle, + XmNx, (XtArgVal)x, /* outside border */ + XmNy, (XtArgVal)y, + XmNwidth, (XtArgVal)width, /* client size */ + XmNheight, (XtArgVal)height, + NULL); + } + + iupAttribSetStr(ih, "PLACEMENT", NULL); /* reset to NORMAL */ + + return 1; +} + +/**************************************************************************** + Attributes +****************************************************************************/ + + +static int motDialogSetMinSizeAttrib(Ihandle* ih, const char* value) +{ + int decorwidth = 0, decorheight = 0; + int min_w = 1, min_h = 1; /* MINSIZE default value */ + iupStrToIntInt(value, &min_w, &min_h, 'x'); + + /* The minmax size restricts the client area */ + iupDialogGetDecorSize(ih, &decorwidth, &decorheight); + + if (min_w > decorwidth) + XtVaSetValues(ih->handle, XmNminWidth, min_w-decorwidth, NULL); + if (min_h > decorheight) + XtVaSetValues(ih->handle, XmNminHeight, min_h-decorheight, NULL); + + return 1; +} + +static int motDialogSetMaxSizeAttrib(Ihandle* ih, const char* value) +{ + int decorwidth = 0, decorheight = 0; + int max_w = 65535, max_h = 65535; /* MAXSIZE default value */ + iupStrToIntInt(value, &max_w, &max_h, 'x'); + + /* The minmax size restricts the client area */ + iupDialogGetDecorSize(ih, &decorwidth, &decorheight); + + if (max_w > decorwidth) + XtVaSetValues(ih->handle, XmNmaxWidth, max_w-decorwidth, NULL); + if (max_h > decorheight) + XtVaSetValues(ih->handle, XmNmaxHeight, max_h-decorheight, NULL); + + return 1; +} + +static char* motDialogGetXAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(20); + + int x; + iupdrvDialogGetPosition(ih->handle, &x, NULL); + + sprintf(str, "%d", x); + return str; +} + +static char* motDialogGetYAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(20); + + int y; + iupdrvDialogGetPosition(ih->handle, &y, NULL); + + sprintf(str, "%d", y); + return str; +} + +static int motDialogSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (!value) + value = ""; + + XtVaSetValues(ih->handle, XmNtitle, value, + XmNiconName, value, + NULL); + return 0; +} + +static char* motDialogGetTitleAttrib(Ihandle* ih) +{ + char* title; + XtVaGetValues(ih->handle, XmNtitle, &title, NULL); + + if (!title || title[0] == 0) + return NULL; + else + { + char* str = iupStrGetMemory(200); + strcpy(str, title); + return str; + } +} + +static char* motDialogGetClientSizeAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(20); + + Dimension manager_width, manager_height; + Widget dialog_manager = XtNameToWidget(ih->handle, "*dialog_manager"); + XtVaGetValues(dialog_manager, XmNwidth, &manager_width, + XmNheight, &manager_height, + NULL); + + sprintf(str, "%dx%d", (int)manager_width, (int)manager_height - motDialogGetMenuSize(ih)); + return str; +} + +static int motDialogSetBgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + Widget dialog_manager = XtNameToWidget(ih->handle, "*dialog_manager"); + XtVaSetValues(dialog_manager, XmNbackground, color, NULL); + XtVaSetValues(dialog_manager, XmNbackgroundPixmap, XmUNSPECIFIED_PIXMAP, NULL); + return 1; + } + return 0; +} + +static int motDialogSetBackgroundAttrib(Ihandle* ih, const char* value) +{ + if (motDialogSetBgColorAttrib(ih, value)) + return 1; + else + { + Pixmap pixmap = (Pixmap)iupImageGetImage(value, ih, 0); + if (pixmap) + { + Widget dialog_manager = XtNameToWidget(ih->handle, "*dialog_manager"); + XtVaSetValues(dialog_manager, XmNbackgroundPixmap, pixmap, NULL); + return 1; + } + } + return 0; +} + +static int motDialogSetFullScreenAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + { + if (!iupAttribGet(ih, "_IUPMOT_FS_STYLE")) + { + int visible = iupdrvDialogIsVisible(ih); + if (visible) + iupAttribSetStr(ih, "_IUPMOT_FS_STYLE", "VISIBLE"); + else + iupAttribSetStr(ih, "_IUPMOT_FS_STYLE", "HIDDEN"); + + /* save the previous decoration attributes */ + /* during fullscreen these attributes can be consulted by the application */ + iupAttribStoreStr(ih, "_IUPMOT_FS_MAXBOX", iupAttribGet(ih, "MAXBOX")); + iupAttribStoreStr(ih, "_IUPMOT_FS_MINBOX", iupAttribGet(ih, "MINBOX")); + iupAttribStoreStr(ih, "_IUPMOT_FS_MENUBOX",iupAttribGet(ih, "MENUBOX")); + iupAttribStoreStr(ih, "_IUPMOT_FS_RESIZE", iupAttribGet(ih, "RESIZE")); + iupAttribStoreStr(ih, "_IUPMOT_FS_BORDER", iupAttribGet(ih, "BORDER")); + iupAttribStoreStr(ih, "_IUPMOT_FS_TITLE", IupGetAttribute(ih, "TITLE")); /* must use IupGetAttribute to check from the native implementation */ + + /* remove the decorations attributes */ + iupAttribSetStr(ih, "MAXBOX", "NO"); + iupAttribSetStr(ih, "MINBOX", "NO"); + iupAttribSetStr(ih, "MENUBOX", "NO"); + IupSetAttribute(ih, "TITLE", NULL); iupAttribSetStr(ih, "TITLE", NULL); /* remove from the hash table if we are during IupMap */ + iupAttribSetStr(ih, "RESIZE", "NO"); + iupAttribSetStr(ih, "BORDER", "NO"); + + /* use WM fullscreen support */ + if (!motDialogSetFullScreen(ih, 1)) + { + /* or configure fullscreen manually */ + int decor; + int width, height; + + /* hide before changing decorations */ + if (visible) + { + iupAttribSetStr(ih, "_IUPMOT_SHOW_STATE", NULL); /* To avoid a SHOW_CB notification */ + XtUnmapWidget(ih->handle); + } + + /* save the previous position and size */ + iupAttribStoreStr(ih, "_IUPMOT_FS_X", IupGetAttribute(ih, "X")); /* must use IupGetAttribute to check from the native implementation */ + iupAttribStoreStr(ih, "_IUPMOT_FS_Y", IupGetAttribute(ih, "Y")); + iupAttribStoreStr(ih, "_IUPMOT_FS_SIZE", IupGetAttribute(ih, "RASTERSIZE")); + + /* save the previous decoration */ + XtVaGetValues(ih->handle, XmNmwmDecorations, &decor, NULL); + iupAttribSetStr(ih, "_IUPMOT_FS_DECOR", (char*)decor); + + /* remove the decorations */ + XtVaSetValues(ih->handle, XmNmwmDecorations, (XtArgVal)0, NULL); + motDialogSetWindowManagerStyle(ih); + + /* get full screen size */ + iupdrvGetFullSize(&width, &height); + + /* set position and size */ + XtVaSetValues(ih->handle, XmNwidth, (XtArgVal)width, + XmNheight, (XtArgVal)height, + XmNx, (XtArgVal)0, + XmNy, (XtArgVal)0, + NULL); + + /* layout will be updated in motDialogConfigureNotify */ + if (visible) + XtMapWidget(ih->handle); + } + } + } + else + { + char* fs_style = iupAttribGet(ih, "_IUPMOT_FS_STYLE"); + if (fs_style) + { + /* can only switch back from full screen if window was visible */ + /* when fullscreen was set */ + if (iupStrEqualNoCase(fs_style, "VISIBLE")) + { + iupAttribSetStr(ih, "_IUPMOT_FS_STYLE", NULL); + + /* restore the decorations attributes */ + iupAttribStoreStr(ih, "MAXBOX", iupAttribGet(ih, "_IUPMOT_FS_MAXBOX")); + iupAttribStoreStr(ih, "MINBOX", iupAttribGet(ih, "_IUPMOT_FS_MINBOX")); + iupAttribStoreStr(ih, "MENUBOX",iupAttribGet(ih, "_IUPMOT_FS_MENUBOX")); + IupSetAttribute(ih, "TITLE", iupAttribGet(ih, "_IUPMOT_FS_TITLE")); /* TITLE is not stored in the HashTable */ + iupAttribStoreStr(ih, "RESIZE", iupAttribGet(ih, "_IUPMOT_FS_RESIZE")); + iupAttribStoreStr(ih, "BORDER", iupAttribGet(ih, "_IUPMOT_FS_BORDER")); + + if (!motDialogSetFullScreen(ih, 0)) + { + int border, caption, menu, x, y; + int visible = iupdrvDialogIsVisible(ih); + if (visible) + XtUnmapWidget(ih->handle); + + /* restore the decorations */ + XtVaSetValues(ih->handle, XmNmwmDecorations, (XtArgVal)(int)iupAttribGet(ih, "_IUPMOT_FS_DECOR"), NULL); + motDialogSetWindowManagerStyle(ih); + + /* the dialog decoration will not be considered yet in the next XtVaSetValues */ + /* so compensate the decoration when restoring the position and size */ + iupdrvDialogGetDecoration(ih, &border, &caption, &menu); + x = iupAttribGetInt(ih, "_IUPMOT_FS_X") - (border); + y = iupAttribGetInt(ih, "_IUPMOT_FS_Y") - (border+caption+menu); + + /* restore position and size */ + XtVaSetValues(ih->handle, + XmNx, (XtArgVal)x, + XmNy, (XtArgVal)y, + XmNwidth, (XtArgVal)(IupGetInt(ih, "_IUPMOT_FS_SIZE") - (2*border)), + XmNheight, (XtArgVal)(IupGetInt2(ih, "_IUPMOT_FS_SIZE") - (2*border+caption)), + NULL); + + /* layout will be updated in motDialogConfigureNotify */ + if (visible) + XtMapWidget(ih->handle); + + /* remove auxiliar attributes */ + iupAttribSetStr(ih, "_IUPMOT_FS_X", NULL); + iupAttribSetStr(ih, "_IUPMOT_FS_Y", NULL); + iupAttribSetStr(ih, "_IUPMOT_FS_SIZE", NULL); + iupAttribSetStr(ih, "_IUPMOT_FS_DECOR", NULL); + } + + /* remove auxiliar attributes */ + iupAttribSetStr(ih, "_IUPMOT_FS_MAXBOX", NULL); + iupAttribSetStr(ih, "_IUPMOT_FS_MINBOX", NULL); + iupAttribSetStr(ih, "_IUPMOT_FS_MENUBOX",NULL); + iupAttribSetStr(ih, "_IUPMOT_FS_RESIZE", NULL); + iupAttribSetStr(ih, "_IUPMOT_FS_BORDER", NULL); + iupAttribSetStr(ih, "_IUPMOT_FS_TITLE", NULL); + } + } + } + return 1; +} + +static int motDialogSetIconAttrib(Ihandle* ih, const char *value) +{ + if (!value) + XtVaSetValues(ih->handle, XmNiconPixmap, NULL, NULL); + else + { + Pixmap icon = (Pixmap)iupImageGetIcon(value); + Pixmap icon_mask = (Pixmap)iupImageGetMask(value); + if (icon) + XtVaSetValues(ih->handle, XmNiconPixmap, icon, NULL); + if (icon_mask) + XtVaSetValues(ih->handle, XmNiconMask, icon, NULL); + } + return 1; +} + +/**************************************************************** + Callbacks and Events +****************************************************************/ + + +static void motDialogCBclose(Widget w, XtPointer client_data, XtPointer call_data) +{ + Icallback cb; + Ihandle *ih = (Ihandle*)client_data; + if (!ih) return; + (void)call_data; + (void)w; + + /* even when ACTIVE=NO the dialog gets this event */ + if (!iupdrvIsActive(ih)) + return; + + cb = IupGetCallback(ih, "CLOSE_CB"); + if (cb) + { + int ret = cb(ih); + if (ret == IUP_IGNORE) + return; + if (ret == IUP_CLOSE) + IupExitLoop(); + } + + IupHide(ih); /* default: close the window */ +} + +static void motDialogConfigureNotify(Widget w, XEvent *evt, String* s, Cardinal *card) +{ + IFnii cb; + int border, caption, menu; + XConfigureEvent *cevent = (XConfigureEvent *)evt; + Ihandle* ih; + (void)s; + (void)card; + + XtVaGetValues(w, XmNuserData, &ih, NULL); + if (!ih) return; + + if (ih->data->menu && ih->data->menu->handle) + { + XtVaSetValues(ih->data->menu->handle, + XmNwidth, (XtArgVal)(cevent->width), + NULL); + } + + if (ih->data->ignore_resize) return; + + iupdrvDialogGetDecoration(ih, &border, &caption, &menu); + + /* update dialog size */ + ih->currentwidth = cevent->width + 2*border; + ih->currentheight = cevent->height + 2*border + caption; /* menu is inside the dialog_manager */ + + cb = (IFnii)IupGetCallback(ih, "RESIZE_CB"); + if (!cb || cb(ih, cevent->width, cevent->height - menu)!=IUP_IGNORE) /* width and height here are for the client area */ + { + ih->data->ignore_resize = 1; + IupRefresh(ih); + ih->data->ignore_resize = 0; + } +} + +static void motDialogCBStructureNotifyEvent(Widget w, XtPointer data, XEvent *evt, Boolean *cont) +{ + Ihandle *ih = (Ihandle*)data; + int state = -1; + (void)cont; + (void)w; + + switch(evt->type) + { + case MapNotify: + { + if (ih->data->show_state == IUP_MINIMIZE) /* it is a RESTORE. */ + state = IUP_RESTORE; + break; + } + case UnmapNotify: + { + if (ih->data->show_state != IUP_HIDE) /* it is a MINIMIZE. */ + state = IUP_MINIMIZE; + break; + } + } + + if (state < 0) + return; + + if (ih->data->show_state != state) + { + IFni cb; + ih->data->show_state = state; + + cb = (IFni)IupGetCallback(ih, "SHOW_CB"); + if (cb && cb(ih, state) == IUP_CLOSE) + IupExitLoop(); + } +} + +static void motDialogDestroyCallback(Widget w, Ihandle *ih, XtPointer call_data) +{ + /* If the IUP dialog was not destroyed, destroy it here. */ + if (iupObjectCheck(ih)) + IupDestroy(ih); + + /* this callback is usefull to destroy children dialogs when the parent is destroyed. */ + /* The application is responsable for destroying the children before this happen. */ + (void)w; + (void)call_data; +} + + +/**************************************************************** + Idialog +****************************************************************/ + +/* replace the common dialog SetChildrenPosition method because of + the menu that it is inside the dialog. */ +static void motDialogSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + int menu_h = motDialogGetMenuSize(ih); + (void)x; + (void)y; + + /* Child coordinates are relative to client left-top corner. */ + iupBaseSetPosition(ih->firstchild, 0, menu_h); +} + +static void* motDialogGetInnerNativeContainerHandleMethod(Ihandle* ih, Ihandle* child) +{ + (void)child; + return XtNameToWidget(ih->handle, "*dialog_manager"); +} + +static int motDialogMapMethod(Ihandle* ih) +{ + Widget dialog_manager; + InativeHandle* parent; + int mwm_decor = 0; + int num_args = 0; + Arg args[20]; + + if (iupAttribGetBoolean(ih, "DIALOGFRAME")) + { + iupAttribSetStr(ih, "RESIZE", "NO"); + iupAttribSetStr(ih, "MAXBOX", "NO"); + iupAttribSetStr(ih, "MINBOX", "NO"); + } + + /****************************/ + /* Create the dialog shell */ + /****************************/ + + if (iupAttribGet(ih, "TITLE")) + mwm_decor |= MWM_DECOR_TITLE; + if (iupAttribGetBoolean(ih, "MENUBOX")) + mwm_decor |= MWM_DECOR_MENU; + if (iupAttribGetBoolean(ih, "MINBOX")) + mwm_decor |= MWM_DECOR_MINIMIZE; + if (iupAttribGetBoolean(ih, "MAXBOX")) + mwm_decor |= MWM_DECOR_MAXIMIZE; + if (iupAttribGetBoolean(ih, "RESIZE")) + mwm_decor |= MWM_DECOR_RESIZEH; + if (iupAttribGetBoolean(ih, "BORDER")) + mwm_decor |= MWM_DECOR_BORDER; + + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* so XtRealizeWidget will not show the dialog */ + iupmotSetArg(args, num_args, XmNdeleteResponse, XmDO_NOTHING); + iupmotSetArg(args, num_args, XmNallowShellResize, True); /* Used so the BulletinBoard can control the shell size */ + iupmotSetArg(args, num_args, XmNtitle, ""); + iupmotSetArg(args, num_args, XmNvisual, iupmot_visual); + + if (iupmotColorMap()) + iupmotSetArg(args, num_args, XmNcolormap, iupmotColorMap()); + + if (mwm_decor != 0x7E) + iupmotSetArg(args, num_args, XmNmwmDecorations, mwm_decor); + + if (iupAttribGetBoolean(ih, "SAVEUNDER")) + iupmotSetArg(args, num_args, XmNsaveUnder, True); + + parent = iupDialogGetNativeParent(ih); + if (parent) + ih->handle = XtCreatePopupShell(NULL, topLevelShellWidgetClass, (Widget)parent, args, num_args); + else + ih->handle = XtAppCreateShell(NULL, "dialog", topLevelShellWidgetClass, iupmot_display, args, num_args); + + if (!ih->handle) + return IUP_ERROR; + + XmAddWMProtocolCallback(ih->handle, iupmot_wm_deletewindow, motDialogCBclose, (XtPointer)ih); + + XtAddEventHandler(ih->handle, FocusChangeMask, False, (XtEventHandler)iupmotFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, EnterWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, LeaveWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, StructureNotifyMask, False, (XtEventHandler)motDialogCBStructureNotifyEvent, (XtPointer)ih); + + XtAddCallback(ih->handle, XmNdestroyCallback, (XtCallbackProc)motDialogDestroyCallback, (XtPointer)ih); + + /*****************************/ + /* Create the dialog manager */ + /*****************************/ + + dialog_manager = XtVaCreateManagedWidget( + "dialog_manager", + xmBulletinBoardWidgetClass, + ih->handle, + XmNmarginWidth, 0, + XmNmarginHeight, 0, + XmNwidth, 100, /* set this to avoid size calculation problems */ + XmNheight, 100, + XmNborderWidth, 0, + XmNshadowThickness, 0, + XmNnoResize, iupAttribGetBoolean(ih, "RESIZE")? False: True, + XmNresizePolicy, XmRESIZE_NONE, /* no automatic resize of children */ + XmNuserData, ih, /* used only in motDialogConfigureNotify */ + XmNnavigationType, XmTAB_GROUP, + NULL); + + XtOverrideTranslations(dialog_manager, XtParseTranslationTable(": iupDialogConfigure()")); + XtAddCallback(dialog_manager, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + XtAddEventHandler(dialog_manager, KeyPressMask, False,(XtEventHandler)iupmotKeyPressEvent, (XtPointer)ih); + + /* initialize the widget */ + XtRealizeWidget(ih->handle); + + /* child dialogs must be always on top of the parent */ + if (parent) + XSetTransientForHint(iupmot_display, XtWindow(ih->handle), XtWindow(parent)); + + if (mwm_decor != 0x7E) /* some decoration was changed */ + motDialogSetWindowManagerStyle(ih); + + /* Ignore VISIBLE before mapping */ + iupAttribSetStr(ih, "VISIBLE", NULL); + + if (IupGetGlobal("_IUP_RESET_DLGBGCOLOR")) + { + iupmotSetGlobalColorAttrib(dialog_manager, XmNbackground, "DLGBGCOLOR"); + iupmotSetGlobalColorAttrib(dialog_manager, XmNforeground, "DLGFGCOLOR"); + IupSetGlobal("_IUP_RESET_DLGBGCOLOR", NULL); + } + + return IUP_NOERROR; +} + +static void motDialogUnMapMethod(Ihandle* ih) +{ + Widget dialog_manager; + if (ih->data->menu) + { + ih->data->menu->handle = NULL; /* the dialog will destroy the native menu */ + IupDestroy(ih->data->menu); + } + + dialog_manager = XtNameToWidget(ih->handle, "*dialog_manager"); + XtVaSetValues(dialog_manager, XmNuserData, NULL, NULL); + + XtRemoveEventHandler(ih->handle, FocusChangeMask, False, (XtEventHandler)iupmotFocusChangeEvent, (XtPointer)ih); + XtRemoveEventHandler(ih->handle, KeyPressMask, False, (XtEventHandler)iupmotKeyPressEvent, (XtPointer)ih); + XtRemoveEventHandler(ih->handle, StructureNotifyMask, False, (XtEventHandler)motDialogCBStructureNotifyEvent, (XtPointer)ih); + XtRemoveCallback(ih->handle, XmNdestroyCallback, (XtCallbackProc)motDialogDestroyCallback, (XtPointer)ih); + + XtRemoveEventHandler(dialog_manager, KeyPressMask, False, (XtEventHandler)iupmotKeyPressEvent, (XtPointer)ih); + XtRemoveCallback(dialog_manager, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + + iupdrvBaseUnMapMethod(ih); +} + +static void motDialogLayoutUpdateMethod(Ihandle *ih) +{ + int border, caption, menu; + + if (ih->data->ignore_resize || + iupAttribGet(ih, "_IUPMOT_FS_STYLE")) + return; + + /* for dialogs the position is not updated here */ + ih->data->ignore_resize = 1; + + iupdrvDialogGetDecoration(ih, &border, &caption, &menu); + + if (!iupAttribGetBoolean(ih, "RESIZE")) + { + int width = ih->currentwidth - 2*border; + int height = ih->currentheight - 2*border - caption; + XtVaSetValues(ih->handle, + XmNwidth, width, + XmNheight, height, + XmNminWidth, width, + XmNminHeight, height, + XmNmaxWidth, width, + XmNmaxHeight, height, + NULL); + } + else + { + XtVaSetValues(ih->handle, + XmNwidth, (XtArgVal)(ih->currentwidth - 2*border), /* excluding the border */ + XmNheight, (XtArgVal)(ih->currentheight - 2*border - caption), + NULL); + } + + ih->data->ignore_resize = 0; +} + +/***************************************************************/ + +void iupdrvDialogInitClass(Iclass* ic) +{ + /* Driver Dependent Class methods */ + ic->Map = motDialogMapMethod; + ic->UnMap = motDialogUnMapMethod; + ic->LayoutUpdate = motDialogLayoutUpdateMethod; + ic->SetChildrenPosition = motDialogSetChildrenPositionMethod; + ic->GetInnerNativeContainerHandle = motDialogGetInnerNativeContainerHandleMethod; + + if (!iupmot_wm_deletewindow) + { + /* Set up a translation table that captures "Resize" events + (also called ConfigureNotify or Configure events). */ + XtActionsRec rec = {"iupDialogConfigure", motDialogConfigureNotify}; + XtAppAddActions(iupmot_appcontext, &rec, 1); + + /* register atom to intercept the close button in the window frame */ + iupmot_wm_deletewindow = XmInternAtom(iupmot_display, "WM_DELETE_WINDOW", False); + } + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, motDialogSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "X", motDialogGetXAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "Y", motDialogGetYAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NO_INHERIT); + + /* Base Container */ + iupClassRegisterAttribute(ic, "CLIENTSIZE", motDialogGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NO_INHERIT); + + /* Special */ + iupClassRegisterAttribute(ic, "TITLE", motDialogGetTitleAttrib, motDialogSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupDialog only */ + iupClassRegisterAttribute(ic, "BACKGROUND", NULL, motDialogSetBackgroundAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "ICON", NULL, motDialogSetIconAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FULLSCREEN", NULL, motDialogSetFullScreenAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MINSIZE", NULL, motDialogSetMinSizeAttrib, IUPAF_SAMEASSYSTEM, "1x1", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MAXSIZE", NULL, motDialogSetMaxSizeAttrib, IUPAF_SAMEASSYSTEM, "65535x65535", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SAVEUNDER", NULL, NULL, "YES", NULL, IUPAF_NO_INHERIT); + + /* IupDialog X Only */ + iupClassRegisterAttribute(ic, "XWINDOW", iupmotGetXWindowAttrib, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_NO_STRING); +} diff --git a/iup/src/mot/iupmot_drv.h b/iup/src/mot/iupmot_drv.h new file mode 100755 index 0000000..8a536ef --- /dev/null +++ b/iup/src/mot/iupmot_drv.h @@ -0,0 +1,75 @@ +/** \file + * \brief Motif Driver + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMOT_DRV_H +#define __IUPMOT_DRV_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* global variables, declared in iupmot_open.c */ +extern Widget iupmot_appshell; +extern Display* iupmot_display; +extern int iupmot_screen; +extern XtAppContext iupmot_appcontext; +extern Visual* iupmot_visual; +extern Atom iupmot_wm_deletewindow; + +/* dialog */ +void iupmotDialogSetVisual(Ihandle* ih, void* visual); +void iupmotDialogResetVisual(Ihandle* ih); + +/* focus */ +void iupmotFocusChangeEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont); + +/* key */ +void iupmotCanvasKeyReleaseEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont); +void iupmotKeyPressEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont); +KeySym iupmotKeyCharToKeySym(char c); +void iupmotButtonKeySetStatus(unsigned int state, unsigned int but, char* status, int doubleclick); +void iupmotKeyEncode(int key, unsigned int *keyval, unsigned int *state); + +/* font */ +char* iupmotGetFontListAttrib(Ihandle *ih); +XmFontList iupmotGetFontList(const char* foundry, const char* value); +char* iupmotFindFontList(XmFontList fontlist); +char* iupmotGetFontStructAttrib(Ihandle *ih); +char* iupmotGetFontIdAttrib(Ihandle *ih); + +/* tips */ +/* called from Enter/Leave events to check if a TIP is present. */ +void iupmotTipEnterNotify(Ihandle* ih); +void iupmotTipLeaveNotify(void); +void iupmotTipsFinish(void); + +/* common */ +void iupmotPointerMotionEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont); +void iupmotButtonPressReleaseEvent(Widget w, Ihandle* ih, XEvent* evt, Boolean* cont); +void iupmotEnterLeaveWindowEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont); +void iupmotHelpCallback(Widget w, Ihandle *ih, XtPointer call_data); +void iupmotSetString(Widget w, const char *resource, const char* value); +char* iupmotConvertString(XmString str); +void iupmotSetMnemonicTitle(Ihandle *ih, const char* value); +void iupmotDisableDragSource(Widget w); +void iupmotSetPixmap(Ihandle* ih, const char* name, const char* prop, int make_inactive); +void iupmotSetGlobalColorAttrib(Widget w, const char* xmname, const char* name); +void iupmotSetBgColor(Widget w, Pixel color); +char* iupmotGetBgColorAttrib(Ihandle* ih); + +void iupmotGetWindowSize(Ihandle *ih, int *width, int *height); + +char* iupmotGetXWindowAttrib(Ihandle *ih); + +#define iupmotSetArg(_a, _i, _n, _d) ((_a)[(_i)].name = (_n), (_a)[(_i)].value = (XtArgVal)(_d), (_i)++) + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/mot/iupmot_filedlg.c b/iup/src/mot/iupmot_filedlg.c new file mode 100755 index 0000000..768dd2b --- /dev/null +++ b/iup/src/mot/iupmot_filedlg.c @@ -0,0 +1,578 @@ +/** \file + * \brief Motif IupFileDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drvinfo.h" +#include "iup_dialog.h" +#include "iup_strmessage.h" +#include "iup_drvinfo.h" + +#include "iupmot_drv.h" + + +enum {IUP_DIALOGOPEN, IUP_DIALOGSAVE, IUP_DIALOGDIR}; + +static void motFileDlgAskUserCallback(Widget w, int* ret_code, XmSelectionBoxCallbackStruct* cbs) +{ + if (cbs->reason == XmCR_OK) + *ret_code = 1; + else + *ret_code = -1; + XtDestroyWidget(XtParent(w)); +} + +static int motFileDlgAskUser(Widget parent, const char* message) +{ + Widget questionbox; + Arg args[3]; + int ret_code = 0; + XmString title; + + XtSetArg(args[0], XmNautoUnmanage, False); + XtSetArg(args[1], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); + XtSetArg(args[2], XmNnoResize, True); + questionbox = XmCreateQuestionDialog(parent, "filedlg_question", args, 3); + iupmotSetString(questionbox, XmNmessageString, message); + XtVaGetValues(parent, XmNdialogTitle, &title, NULL); + XtVaSetValues(questionbox, XmNdialogTitle, title, NULL); + + XtAddCallback(questionbox, XmNokCallback, (XtCallbackProc)motFileDlgAskUserCallback, (XtPointer)&ret_code); + XtAddCallback(questionbox, XmNcancelCallback, (XtCallbackProc)motFileDlgAskUserCallback, (XtPointer)&ret_code); + XtUnmanageChild(XmMessageBoxGetChild(questionbox, XmDIALOG_HELP_BUTTON)); + XtManageChild(questionbox); + + while (ret_code == 0) + XtAppProcessEvent(iupmot_appcontext, XtIMAll); + + XtUnmanageChild(questionbox); + + if (ret_code == 1) + return 1; + else + return 0; +} + +static int motFileDlgCheckValue(Ihandle* ih, Widget w) +{ + char* value = iupAttribGet(ih, "VALUE"); + int dialogtype = iupAttribGetInt(ih, "_IUPDLG_DIALOGTYPE"); + + if (dialogtype == IUP_DIALOGDIR) + { + if (!iupdrvIsDirectory(value)) /* if does not exist or not a directory */ + { + iupStrMessageShowError(ih, "IUP_INVALIDDIR"); + return 0; + } + } + else + { + if (iupdrvIsDirectory(value)) /* selected a directory */ + { + iupStrMessageShowError(ih, "IUP_INVALIDDIR"); + return 0; + } + else if (!iupdrvIsFile(value)) /* new file */ + { + value = iupAttribGet(ih, "ALLOWNEW"); + if (!value) + { + if (dialogtype == IUP_DIALOGSAVE) + value = "YES"; + else + value = "NO"; + } + + if (!iupStrBoolean(value)) + { + iupStrMessageShowError(ih, "IUP_FILENOTEXIST"); + return 0; + } + } + else if (dialogtype == IUP_DIALOGSAVE && !iupAttribGetInt(ih, "NOOVERWRITEPROMPT")) + { + if (!motFileDlgAskUser(w, iupStrMessageGet("IUP_FILEOVERWRITE"))) + return 0; + } + } + + return 1; +} + +static void motFileDlgCBclose(Widget w, XtPointer client_data, XtPointer call_data) +{ + Ihandle *ih = (Ihandle*)client_data; + if (!ih) return; + (void)call_data; + (void)w; + iupAttribSetStr(ih, "VALUE", NULL); + iupAttribSetStr(ih, "STATUS", "-1"); + iupAttribSetStr(ih, "_IUP_WM_DELETE", "1"); +} + +static void motFileDlgCallback(Widget w, Ihandle* ih, XmFileSelectionBoxCallbackStruct* call_data) +{ + (void)w; + if (call_data->reason == XmCR_OK) + { + int dialogtype = iupAttribGetInt(ih, "_IUPDLG_DIALOGTYPE"); + char* filename; + XmStringGetLtoR(call_data->value, XmSTRING_DEFAULT_CHARSET, &filename); + iupAttribStoreStr(ih, "VALUE", filename); + XtFree(filename); + + if (!motFileDlgCheckValue(ih, w)) + return; + + if (dialogtype == IUP_DIALOGDIR) + { + iupAttribSetStr(ih, "STATUS", "0"); + iupAttribSetStr(ih, "FILEEXIST", NULL); + } + else + { + IFnss file_cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + if (file_cb && file_cb(ih, iupAttribGet(ih, "VALUE"), "OK") == IUP_IGNORE) + return; + + if (iupdrvIsFile(iupAttribGet(ih, "VALUE"))) /* check if file exists */ + { + iupAttribSetStr(ih, "FILEEXIST", "YES"); + iupAttribSetStr(ih, "STATUS", "0"); + } + else + { + iupAttribSetStr(ih, "FILEEXIST", "NO"); + iupAttribSetStr(ih, "STATUS", "1"); + } + } + + if (!iupAttribGetBoolean(ih, "NOCHANGEDIR")) /* do change the current directory */ + { + /* XmFileSelection does not change the current directory */ + XmString xm_dir; + char* dir; + XtVaGetValues(w, XmNdirectory, &xm_dir, NULL); + XmStringGetLtoR(xm_dir, XmSTRING_DEFAULT_CHARSET, &dir); + iupdrvSetCurrentDirectory(dir); + XtFree(dir); + } + } + else if (call_data->reason == XmCR_CANCEL) + { + iupAttribSetStr(ih, "VALUE", NULL); + iupAttribSetStr(ih, "FILEEXIST", NULL); + iupAttribSetStr(ih, "STATUS", "-1"); + } +} + +static void motFileDlgHelpCallback(Widget w, XtPointer client_data, XtPointer call_data) +{ + Ihandle *ih = (Ihandle*)client_data; + Icallback cb = IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + { + iupAttribSetStr(ih, "VALUE", NULL); + iupAttribSetStr(ih, "FILEEXIST", NULL); + iupAttribSetStr(ih, "STATUS", "-1"); + } + + (void)call_data; + (void)w; +} + +typedef struct _ImotPromt +{ + XmString xm_dir; + int ret_code; +} ImotPromt; + +static void motFileDlgPromptCallback(Widget w, ImotPromt* prompt, XmSelectionBoxCallbackStruct* cbs) +{ + if (cbs->reason == XmCR_OK) + prompt->xm_dir = XmStringCopy(cbs->value); + + prompt->ret_code = 1; + XtDestroyWidget(XtParent(w)); +} + +static XmString motFileDlgPrompt(Widget parent, const char* message) +{ + Widget promptbox; + Arg args[2]; + ImotPromt prompt; + XmString title; + + XtSetArg(args[0], XmNautoUnmanage, False); + XtSetArg(args[1], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); + promptbox = XmCreatePromptDialog(parent, "filedlg_prompt", args, 2); + iupmotSetString(promptbox, XmNselectionLabelString, message); + XtVaGetValues(parent, XmNdialogTitle, &title, NULL); + XtVaSetValues(promptbox, XmNdialogTitle, title, NULL); + + prompt.ret_code = 0; + prompt.xm_dir = NULL; + + XtAddCallback(promptbox, XmNokCallback, (XtCallbackProc)motFileDlgPromptCallback, (XtPointer)&prompt); + XtAddCallback(promptbox, XmNcancelCallback, (XtCallbackProc)motFileDlgPromptCallback, (XtPointer)&prompt); + XtUnmanageChild(XmSelectionBoxGetChild(promptbox, XmDIALOG_HELP_BUTTON)); + XtManageChild(promptbox); + + while (prompt.ret_code == 0) + XtAppProcessEvent(iupmot_appcontext, XtIMAll); + + XtUnmanageChild(promptbox); + + return prompt.xm_dir; +} + +static void motFileDlgNewFolderCallback(Widget w, Widget filebox, XtPointer call_data) +{ + XmString xm_new_dir = motFileDlgPrompt(filebox, iupStrMessageGet("IUP_NAMENEWFOLDER")); + if (xm_new_dir) + { + XmString xm_dir; + XtVaGetValues(filebox, XmNdirectory, &xm_dir, NULL); + xm_dir = XmStringConcat(xm_dir, xm_new_dir); + + { + char* dir; + XmStringGetLtoR(xm_dir, XmSTRING_DEFAULT_CHARSET, &dir); + iupdrvMakeDirectory(dir); + XtFree(dir); + } + + XtVaSetValues(filebox, XmNdirectory, xm_dir, NULL); + + XmStringFree(xm_dir); + XmStringFree(xm_new_dir); + } + + (void)call_data; + (void)w; +} + +static void motFileDlgPreviewCanvasResizeCallback(Widget w, Ihandle *ih, XtPointer call_data) +{ + Dimension width, height; + XtVaGetValues(w, XmNwidth, &width, + XmNheight, &height, + NULL); + + iupAttribSetInt(ih, "PREVIEWWIDTH", width); + iupAttribSetInt(ih, "PREVIEWHEIGHT", height); + + (void)call_data; +} + +static void motFileDlgUpdatePreviewGLCanvas(Ihandle* ih) +{ + Ihandle* glcanvas = IupGetAttributeHandle(ih, "PREVIEWGLCANVAS"); + if (glcanvas) + { + iupAttribSetStr(glcanvas, "XWINDOW", iupAttribGet(ih, "XWINDOW")); + glcanvas->iclass->Map(glcanvas); + } +} + +static void motFileDlgPreviewCanvasInit(Ihandle *ih, Widget w) +{ + XSetWindowAttributes attrs; + GC gc = XCreateGC(iupmot_display, XtWindow(w), 0, NULL); + iupAttribSetStr(ih, "PREVIEWDC", (char*)gc); + iupAttribSetStr(ih, "WID", (char*)w); + + iupAttribSetStr(ih, "XWINDOW", (char*)XtWindow(w)); + iupAttribSetStr(ih, "XDISPLAY", (char*)iupmot_display); + motFileDlgUpdatePreviewGLCanvas(ih); + + attrs.bit_gravity = ForgetGravity; /* For the DrawingArea widget gets Expose events when you resize it to be smaller. */ + attrs.background_pixmap = None; + XChangeWindowAttributes(iupmot_display, XtWindow(w), CWBitGravity|CWBackPixmap, &attrs); +} + +static void motFileDlgPreviewCanvasExposeCallback(Widget w, Ihandle *ih, XtPointer call_data) +{ + Widget filebox = (Widget)iupAttribGet(ih, "_IUPDLG_FILEBOX"); + char* filename; + XmString xm_file; + IFnss cb; + + if (!iupAttribGet(ih, "PREVIEWDC")) + motFileDlgPreviewCanvasInit(ih, w); + + XtVaGetValues(filebox, XmNdirSpec, &xm_file, NULL); + XmStringGetLtoR(xm_file, XmSTRING_DEFAULT_CHARSET, &filename); + + cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + if (iupdrvIsFile(filename)) + cb(ih, filename, "PAINT"); + else + cb(ih, NULL, "PAINT"); + + XtFree(filename); + (void)call_data; + (void)w; +} + +static void motFileDlgBrowseSelectionCallback(Widget w, Ihandle* ih, XmListCallbackStruct* list_data) +{ + char* filename; + + XmStringGetLtoR(list_data->item, XmSTRING_DEFAULT_CHARSET, &filename); + + if (iupdrvIsFile(filename)) + { + IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + cb(ih, filename, "SELECT"); + } + + XtFree(filename); + (void)w; +} + +static int motFileDlgPopup(Ihandle* ih, int x, int y) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + Widget filebox, dialog; + int dialogtype, style = XmDIALOG_FULL_APPLICATION_MODAL; + IFnss file_cb = NULL; + Widget preview_canvas = NULL; + char* value; + + iupAttribSetInt(ih, "_IUPDLG_X", x); /* used in iupDialogUpdatePosition */ + iupAttribSetInt(ih, "_IUPDLG_Y", y); + + value = iupAttribGetStr(ih, "DIALOGTYPE"); + if (iupStrEqualNoCase(value, "SAVE")) + dialogtype = IUP_DIALOGSAVE; + else if (iupStrEqualNoCase(value, "DIR")) + dialogtype = IUP_DIALOGDIR; + else + dialogtype = IUP_DIALOGOPEN; + iupAttribSetInt(ih, "_IUPDLG_DIALOGTYPE", dialogtype); + + if (parent) + { + filebox = XmCreateFileSelectionDialog(parent, "filedialog", NULL, 0); + dialog = XtParent(filebox); + } + else + { + dialog = XtAppCreateShell(NULL, "filedialog", topLevelShellWidgetClass, iupmot_display, NULL, 0); + filebox = XmCreateFileSelectionBox(dialog, "filebox", NULL, 0); + style = XmDIALOG_MODELESS; + XtVaSetValues(dialog, + XmNmwmInputMode, MWM_INPUT_FULL_APPLICATION_MODAL, + XmNmappedWhenManaged, False, + XmNsaveUnder, True, + NULL); + } + if (!filebox) + return IUP_NOERROR; + + if (!iupAttribGetBoolean(ih, "SHOWHIDDEN")) + XtVaSetValues(filebox, XmNfileFilterStyle, XmFILTER_HIDDEN_FILES, NULL); + + value = iupAttribGet(ih, "TITLE"); + if (!value) + { + if (dialogtype == IUP_DIALOGSAVE) + value = "IUP_SAVEAS"; + else if (dialogtype == IUP_DIALOGOPEN) + value = "IUP_OPEN"; + else + value = "IUP_SELECTDIR"; + iupAttribSetStr(ih, "TITLE", iupStrMessageGet(value)); + } + iupmotSetString(filebox, XmNdialogTitle, value); + + XtVaSetValues(filebox, + XmNdialogStyle, style, + XmNautoUnmanage, False, + NULL); + + if (dialogtype == IUP_DIALOGDIR) + XtVaSetValues(filebox, XmNfileTypeMask, XmFILE_DIRECTORY, NULL); + + /* just check for the path inside FILE */ + value = iupAttribGet(ih, "FILE"); + if (value && value[0] == '/') + { + char* dir = iupStrFileGetPath(value); + iupAttribStoreStr(ih, "DIRECTORY", dir); + free(dir); + } + + /* set XmNdirectory before XmNpattern and before XmNdirSpec */ + + value = iupAttribGet(ih, "DIRECTORY"); + if (value) + iupmotSetString(filebox, XmNdirectory, value); + + value = iupAttribGet(ih, "FILTER"); + if (value) + { + char *filter = value; + char *p = strchr(value, ';'); + if (p) + { + int size = p-value; + filter = (char*)malloc(size+1); + memcpy(filter, value, size); + filter[size] = 0; + } + + iupmotSetString(filebox, XmNpattern, filter); + + if (filter != value) + free(filter); + } + + value = iupAttribGet(ih, "FILE"); + if (value) + { + char* file = value; + + if (value[0] != '/') /* if does not contains a full path, then add the directory */ + { + char* cur_dir = NULL; + char* dir = iupAttribGet(ih, "DIRECTORY"); + if (!dir) + { + cur_dir = iupdrvGetCurrentDirectory(); + dir = cur_dir; + } + + file = iupStrFileMakeFileName(dir, value); + + if (cur_dir) + free(cur_dir); + } + + /* clear value before setting. Do not know why we have to do this, + but if not cleared it will fail to set the XmNdirSpec value. */ + iupmotSetString(filebox, XmNdirSpec, ""); + iupmotSetString(filebox, XmNdirSpec, file); + + if (file != value) + free(file); + } + + if (!IupGetCallback(ih, "HELP_CB")) + XtUnmanageChild(XmFileSelectionBoxGetChild(filebox, XmDIALOG_HELP_BUTTON)); + + XtAddCallback(filebox, XmNokCallback, (XtCallbackProc)motFileDlgCallback, (XtPointer)ih); + XtAddCallback(filebox, XmNcancelCallback, (XtCallbackProc)motFileDlgCallback, (XtPointer)ih); + XtAddCallback(filebox, XmNhelpCallback, (XtCallbackProc)motFileDlgHelpCallback, (XtPointer)ih); + + if (dialogtype == IUP_DIALOGDIR) + { + Widget new_folder = XtVaCreateManagedWidget("new_folder", xmPushButtonWidgetClass, filebox, + XmNlabelType, XmSTRING, + NULL); + iupmotSetString(new_folder, XmNlabelString, iupStrMessageGet("IUP_CREATEFOLDER")); + XtAddCallback(new_folder, XmNactivateCallback, (XtCallbackProc)motFileDlgNewFolderCallback, (XtPointer)filebox); + } + else + { + file_cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + if (file_cb) + { + Widget file_list = XmFileSelectionBoxGetChild(filebox, XmDIALOG_LIST); + XtAddCallback(file_list, XmNbrowseSelectionCallback, (XtCallbackProc)motFileDlgBrowseSelectionCallback, (XtPointer)ih); + + if (iupAttribGetBoolean(ih, "SHOWPREVIEW")) + { + Widget frame = XtVaCreateManagedWidget("preview_canvas", xmFrameWidgetClass, filebox, + XmNshadowType, XmSHADOW_ETCHED_IN, + NULL); + + preview_canvas = XtVaCreateManagedWidget("preview_canvas", xmDrawingAreaWidgetClass, frame, + XmNwidth, 180, + XmNheight, 150, + XmNresizePolicy, XmRESIZE_GROW, + NULL); + + XtAddCallback(preview_canvas, XmNexposeCallback, (XtCallbackProc)motFileDlgPreviewCanvasExposeCallback, (XtPointer)ih); + XtAddCallback(preview_canvas, XmNresizeCallback, (XtCallbackProc)motFileDlgPreviewCanvasResizeCallback, (XtPointer)ih); + + iupAttribSetStr(ih, "_IUPDLG_FILEBOX", (char*)filebox); + } + } + } + + XmAddWMProtocolCallback(dialog, iupmot_wm_deletewindow, motFileDlgCBclose, (XtPointer)ih); + XtManageChild(filebox); + + XtRealizeWidget(dialog); + ih->handle = dialog; + iupDialogUpdatePosition(ih); + ih->handle = NULL; /* reset handle */ + + if (file_cb) + { + if (preview_canvas) + motFileDlgPreviewCanvasInit(ih, preview_canvas); + + file_cb(ih, NULL, "INIT"); + } + + if (style == XmDIALOG_MODELESS) + XtPopup(dialog, XtGrabExclusive); + + /* while the user hasn't provided an answer, simulate main loop. + ** The answer changes as soon as the user selects one of the + ** buttons and the callback routine changes its value. */ + iupAttribSetStr(ih, "STATUS", NULL); + while (iupAttribGet(ih, "STATUS") == NULL) + XtAppProcessEvent(iupmot_appcontext, XtIMAll); + + if (file_cb) + { + if (preview_canvas) + XFreeGC(iupmot_display, (GC)iupAttribGet(ih, "PREVIEWDC")); + + file_cb(ih, NULL, "FINISH"); + } + + if (!iupAttribGet(ih, "_IUP_WM_DELETE")) + { + XtUnmanageChild(filebox); + + if (style == XmDIALOG_MODELESS) + { + XtPopdown(dialog); + XtDestroyWidget(dialog); + } + } + + return IUP_NOERROR; +} + +void iupdrvFileDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = motFileDlgPopup; +} diff --git a/iup/src/mot/iupmot_focus.c b/iup/src/mot/iupmot_focus.c new file mode 100755 index 0000000..5b09bd9 --- /dev/null +++ b/iup/src/mot/iupmot_focus.c @@ -0,0 +1,35 @@ +/** \file + * \brief Motif Focus + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_focus.h" +#include "iup_attrib.h" +#include "iup_assert.h" +#include "iup_drv.h" + +#include "iupmot_drv.h" + +void iupdrvSetFocus(Ihandle *ih) +{ + XmProcessTraversal(ih->handle, XmTRAVERSE_CURRENT); +} + +void iupmotFocusChangeEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont) +{ + (void)w; + (void)cont; + + if (evt->type == FocusIn) + iupCallGetFocusCb(ih); + else if (evt->type == FocusOut) + iupCallKillFocusCb(ih); +} diff --git a/iup/src/mot/iupmot_font.c b/iup/src/mot/iupmot_font.c new file mode 100755 index 0000000..8da06dd --- /dev/null +++ b/iup/src/mot/iupmot_font.c @@ -0,0 +1,443 @@ +/** \file + * \brief Motif Font mapping + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_attrib.h" +#include "iup_array.h" +#include "iup_object.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_assert.h" + +#include "iupmot_drv.h" + + +typedef struct _ImotFont +{ + char standardfont[1024]; + char xlfd[1024]; /* X-Windows Font Description */ + XmFontList fontlist; /* same as XmRenderTable */ + XFontStruct *fontstruct; + int charwidth, charheight; +} ImotFont; + +static Iarray* mot_fonts = NULL; + +static int motGetFontSize(char* font_name) +{ + int i = 0; + while (i < 8) + { + font_name = strchr(font_name, '-')+1; + i++; + } + + *(strchr(font_name, '-')) = 0; + return atoi(font_name); +} + +static XFontStruct* motLoadFont(const char* foundry, const char *typeface, int size, int bold, int italic, char *xlfd) +{ + XFontStruct* fontstruct; + char font_name[1024]; + char **font_names_list; + char *weight, *slant; + int i, num_fonts, font_size, near_size; + + /* no underline or strikeout support */ + + if (iupStrEqualNoCase(typeface, "System")) + typeface = "fixed"; + + if (!foundry) foundry = "*"; + + if (iupStrEqualNoCase(typeface, "fixed")) + foundry = "misc"; + + if (bold) + weight = "bold"; + else + weight = "medium"; + + if (italic) + slant = "i"; + else + slant = "r"; + + sprintf(font_name,"-%s-%s-%s-%s-*-*-*-*-*-*-*-*-*-*", foundry, typeface, weight, slant); + + font_names_list = XListFonts(iupmot_display, font_name, 32767, &num_fonts); + if (!num_fonts) + { + /* try changing 'i' to 'o', for italic */ + if (italic) + { + slant = "o"; + strstr(font_name, "-i-")[1] = 'o'; + font_names_list = XListFonts(iupmot_display, font_name, 32767, &num_fonts); + } + + if (!num_fonts) + return NULL; + } + + if (size < 0) /* if in pixels convert to points */ + { + double res = ((double)DisplayWidth(iupmot_display, iupmot_screen) / (double)DisplayWidthMM(iupmot_display, iupmot_screen)); /* pixels/mm */ + /* 1 point = 1/72 inch 1 inch = 25.4 mm */ + /* pixel = ((point/72)*25.4)*pixel/mm */ + size = (int)((-size/res)*2.83464567 + 0.5); /* from pixels to points */ + } + + size *= 10; /* convert to deci-points */ + + near_size = -1000; + for (i=0; iper_char) + { + int i, all=0; + int first = fontstruct->min_char_or_byte2; + int last = fontstruct->max_char_or_byte2; + if (first < 32) first = 32; /* space */ + if (last > 126) last = 126; /* tilde */ + for (i=first; i<=last; i++) + all += fontstruct->per_char[i].width; + return all/(last-first + 1); /* average character width */ + } + else + return fontstruct->max_bounds.width; +} + +static ImotFont* motFindFont(const char* foundry, const char *standardfont) +{ + char xlfd[1024]; + XFontStruct* fontstruct; + int i, count = iupArrayCount(mot_fonts); + int is_underline = 0, is_strikeout = 0; + + ImotFont* fonts = (ImotFont*)iupArrayGetData(mot_fonts); + + /* Check if the standardfont already exists in cache */ + for (i = 0; i < count; i++) + { + if (iupStrEqualNoCase(standardfont, fonts[i].standardfont)) + return &fonts[i]; + } + + /* not found, create a new one */ + if (standardfont[0] == '-') + { + fontstruct = XLoadQueryFont(iupmot_display, standardfont); + if (!fontstruct) return NULL; + strcpy(xlfd, standardfont); + } + else + { + int size = 0, + is_bold = 0, + is_italic = 0; + char typeface[1024]; + const char* mapped_name; + + if (!iupFontParsePango(standardfont, typeface, &size, &is_bold, &is_italic, &is_underline, &is_strikeout)) + return NULL; + + mapped_name = iupFontGetXName(typeface); + if (mapped_name) + strcpy(typeface, mapped_name); + + fontstruct = motLoadFont(foundry, typeface, size, is_bold, is_italic, xlfd); + if (!fontstruct) return NULL; + } + + /* create room in the array */ + fonts = (ImotFont*)iupArrayInc(mot_fonts); + + strcpy(fonts[i].standardfont, standardfont); + strcpy(fonts[i].xlfd, xlfd); + fonts[i].fontstruct = fontstruct; + fonts[i].fontlist = motFontCreateRenderTable(fontstruct, is_underline, is_strikeout); + fonts[i].charwidth = motFontCalcCharWidth(fontstruct); + fonts[i].charheight = fontstruct->ascent + fontstruct->descent; + + return &fonts[i]; +} + +char* iupdrvGetSystemFont(void) +{ + static char systemfont[200] = ""; + ImotFont* motfont = NULL; + char* font = XGetDefault(iupmot_display, "Iup", "fontList"); + if (font) + motfont = motFindFont(NULL, font); + + if (!motfont) + { + font = "Fixed, 11"; + motfont = motFindFont("misc", font); + } + + strcpy(systemfont, font); + return systemfont; +} + +char* iupmotFindFontList(XmFontList fontlist) +{ + int i, count = iupArrayCount(mot_fonts); + ImotFont* fonts = (ImotFont*)iupArrayGetData(mot_fonts); + + /* Check if the standardfont already exists in cache */ + for (i = 0; i < count; i++) + { + if (fontlist == fonts[i].fontlist) + return fonts[i].standardfont; + } + + return NULL; +} + +XmFontList iupmotGetFontList(const char* foundry, const char* value) +{ + ImotFont *motfont = motFindFont(foundry, value); + if (!motfont) + { + iupERROR1("Failed to create Font: %s", value); + return NULL; + } + + return motfont->fontlist; +} + +static ImotFont* motFontCreateNativeFont(Ihandle* ih, const char* value) +{ + ImotFont *motfont = motFindFont(iupAttribGet(ih, "FOUNDRY"), value); + if (!motfont) + { + iupERROR1("Failed to create Font: %s", value); + return NULL; + } + + iupAttribSetStr(ih, "_IUPMOT_FONT", (char*)motfont); + iupAttribSetStr(ih, "XLFD", motfont->xlfd); + return motfont; +} + +static ImotFont* motGetFont(Ihandle *ih) +{ + ImotFont* motfont = (ImotFont*)iupAttribGet(ih, "_IUPMOT_FONT"); + if (!motfont) + motfont = motFontCreateNativeFont(ih, iupGetFontAttrib(ih)); + return motfont; +} + +char* iupmotGetFontListAttrib(Ihandle *ih) +{ + ImotFont* motfont = motGetFont(ih); + if (!motfont) + return NULL; + else + return (char*)motfont->fontlist; +} + +char* iupmotGetFontStructAttrib(Ihandle *ih) +{ + ImotFont* motfont = motGetFont(ih); + if (!motfont) + return NULL; + else + return (char*)motfont->fontstruct; +} + +char* iupmotGetFontIdAttrib(Ihandle *ih) +{ + ImotFont* motfont = motGetFont(ih); + if (!motfont) + return NULL; + else + return (char*)motfont->fontstruct->fid; +} + +int iupdrvSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + ImotFont *motfont = motFontCreateNativeFont(ih, value); + if (!motfont) + return 1; + + /* If FONT is changed, must update the SIZE attribute */ + iupBaseUpdateSizeFromFont(ih); + + /* FONT attribute must be able to be set before mapping, + so the font is enable for size calculation. */ + if (ih->handle && (ih->iclass->nativetype != IUP_TYPEVOID)) + XtVaSetValues(ih->handle, XmNrenderTable, motfont->fontlist, NULL); + + return 1; +} + +int iupdrvFontGetStringWidth(Ihandle* ih, const char* str) +{ + XFontStruct* fontstruct; + int len; + char* line_end; + + if (!str || str[0]==0) + return 0; + + fontstruct = (XFontStruct*)iupmotGetFontStructAttrib(ih); + if (!fontstruct) + return 0; + + line_end = strchr(str, '\n'); + if (line_end) + len = line_end-str; + else + len = strlen(str); + + return XTextWidth(fontstruct, str, len); +} + +void iupdrvFontGetMultiLineStringSize(Ihandle* ih, const char* str, int *w, int *h) +{ + int num_lin, max_w; + + ImotFont* motfont = motGetFont(ih); + if (!motfont) + { + if (w) *w = 0; + if (h) *h = 0; + return; + } + + if (!str) + { + if (w) *w = 0; + if (h) *h = motfont->charheight * 1; + return; + } + + max_w = 0; + num_lin = 1; + if (str[0]) + { + int len, lw; + const char *nextstr; + const char *curstr = str; + do + { + nextstr = iupStrNextLine(curstr, &len); + lw = XTextWidth(motfont->fontstruct, curstr, len); + max_w = iupMAX(max_w, lw); + + curstr = nextstr; + if (*nextstr) + num_lin++; + } while(*nextstr); + } + + if (w) *w = max_w; + if (h) *h = motfont->charheight * num_lin; +} + + +void iupdrvFontGetCharSize(Ihandle* ih, int *charwidth, int *charheight) +{ + ImotFont* motfont = motGetFont(ih); + if (!motfont) + { + if (charwidth) *charwidth = 0; + if (charheight) *charheight = 0; + return; + } + + if (charheight) + *charheight = motfont->charheight; + + if (charwidth) + *charwidth = motfont->charwidth; +} + +void iupdrvFontInit(void) +{ + mot_fonts = iupArrayCreate(50, sizeof(ImotFont)); +} + +void iupdrvFontFinish(void) +{ + int i, count = iupArrayCount(mot_fonts); + ImotFont* fonts = (ImotFont*)iupArrayGetData(mot_fonts); + for (i = 0; i < count; i++) + { + XmFontListFree(fonts[i].fontlist); + fonts[i].fontlist = NULL; + XFreeFont(iupmot_display, fonts[i].fontstruct); + fonts[i].fontstruct = NULL; + } + iupArrayDestroy(mot_fonts); +} diff --git a/iup/src/mot/iupmot_fontdlg.c b/iup/src/mot/iupmot_fontdlg.c new file mode 100755 index 0000000..42767b2 --- /dev/null +++ b/iup/src/mot/iupmot_fontdlg.c @@ -0,0 +1,31 @@ +/** \file + * \brief IupFontDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drvinfo.h" +#include "iup_dialog.h" + +#include "iupmot_drv.h" + + +static int motFontDlgPopup(Ihandle* ih, int x, int y) +{ + (void)ih; + (void)x; + (void)y; + return IUP_ERROR; +} + +void iupdrvFontDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = motFontDlgPopup; +} diff --git a/iup/src/mot/iupmot_frame.c b/iup/src/mot/iupmot_frame.c new file mode 100755 index 0000000..39de5d8 --- /dev/null +++ b/iup/src/mot/iupmot_frame.c @@ -0,0 +1,257 @@ +/** \file + * \brief Frame Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" +#include "iup_image.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +void iupdrvFrameGetDecorOffset(Ihandle* ih, int *x, int *y) +{ + (void)ih; + *x = 0; + *y = 0; +} + +static int motFrameSetBgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color; + + /* ignore given value, must use only from parent */ + value = iupBaseNativeParentGetBgColor(ih); + + color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + Widget title_label, child_manager; + + iupmotSetBgColor(ih->handle, color); + + child_manager = XtNameToWidget(ih->handle, "*child_manager"); + iupmotSetBgColor(child_manager, color); + + title_label = XtNameToWidget(ih->handle, "*title_label"); + if (!title_label) return 1; + iupmotSetBgColor(title_label, color); + + return 1; + } + return 0; +} + +static int motFrameSetBackgroundAttrib(Ihandle* ih, const char* value) +{ + Pixel color; + + /* ignore given value, must use only from parent */ + value = iupAttribGetInheritNativeParent(ih, "BACKGROUND"); + + color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + Widget title_label, child_manager; + + iupmotSetBgColor(ih->handle, color); + + child_manager = XtNameToWidget(ih->handle, "*child_manager"); + iupmotSetBgColor(child_manager, color); + + title_label = XtNameToWidget(ih->handle, "*title_label"); + if (!title_label) return 1; + iupmotSetBgColor(title_label, color); + + return 1; + } + else + { + Pixmap pixmap = (Pixmap)iupImageGetImage(value, ih, 0); + if (pixmap) + { + Widget child_manager = XtNameToWidget(ih->handle, "*child_manager"); + Widget title_label = XtNameToWidget(ih->handle, "*title_label"); + + XtVaSetValues(child_manager, XmNbackgroundPixmap, pixmap, NULL); + if (title_label) + XtVaSetValues(title_label, XmNbackgroundPixmap, pixmap, NULL); + + return 1; + } + } + return 0; +} + +static int motFrameSetFgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + Widget title_label = XtNameToWidget(ih->handle, "*title_label"); + if (!title_label) return 0; + XtVaSetValues(title_label, XmNforeground, color, NULL); + return 1; + } + return 0; +} + +static int motFrameSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + iupdrvSetStandardFontAttrib(ih, value); + + if (ih->handle) + { + XmFontList fontlist; + Widget title_label = XtNameToWidget(ih->handle, "*title_label"); + if (!title_label) return 1; + + fontlist = (XmFontList)iupmotGetFontListAttrib(ih); + XtVaSetValues(title_label, XmNrenderTable, fontlist, NULL); + } + + return 1; +} + +static int motFrameSetTitleAttrib(Ihandle* ih, const char* value) +{ + Widget title_label = XtNameToWidget(ih->handle, "*title_label"); + if (title_label) + { + if (!value) value = ""; + iupmotSetString(title_label, XmNlabelString, value); + return 1; + } + return 0; +} + +static void* motFrameGetInnerNativeContainerHandleMethod(Ihandle* ih, Ihandle* child) +{ + (void)child; + return XtNameToWidget(ih->handle, "*child_manager"); +} + +static int motFrameMapMethod(Ihandle* ih) +{ + char *title; + int num_args = 0; + Arg args[20]; + Widget child_manager; + + if (!ih->parent) + return IUP_ERROR; + + title = iupAttribGet(ih, "TITLE"); + + if (title) + iupAttribSetStr(ih, "_IUPFRAME_HAS_TITLE", "1"); + else + { + char* value = iupAttribGetStr(ih, "SUNKEN"); + if (iupStrBoolean(value)) + iupmotSetArg(args, num_args, XmNshadowType, XmSHADOW_IN); + else + iupmotSetArg(args, num_args, XmNshadowType, XmSHADOW_ETCHED_IN); + } + + /* Core */ + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + /* Manager */ + iupmotSetArg(args, num_args, XmNshadowThickness, 2); + /* Frame */ + iupmotSetArg(args, num_args, XmNmarginHeight, 0); /* no shadow margins */ + iupmotSetArg(args, num_args, XmNmarginWidth, 0); /* no shadow margins */ + + ih->handle = XtCreateManagedWidget( + iupDialogGetChildIdStr(ih), /* child identifier */ + xmFrameWidgetClass, /* widget class */ + iupChildTreeGetNativeParentHandle(ih), /* widget parent */ + args, num_args); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + if (title) + { + Widget title_label; + num_args = 0; + /* Label */ + iupmotSetArg(args, num_args, XmNlabelType, XmSTRING); + iupmotSetArg(args, num_args, XmNmarginHeight, 0); /* default padding */ + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + /* Frame Constraint */ + iupmotSetArg(args, num_args, XmNchildType, XmFRAME_TITLE_CHILD); + title_label = XtCreateManagedWidget("title_label", xmLabelWidgetClass, ih->handle, args, num_args); + iupmotSetString(title_label, XmNlabelString, title); + } + + child_manager = XtVaCreateManagedWidget( + "child_manager", + xmBulletinBoardWidgetClass, + ih->handle, + /* Core */ + XmNborderWidth, 0, + /* Manager */ + XmNshadowThickness, 0, + XmNnavigationType, XmTAB_GROUP, + /* BulletinBoard */ + XmNmarginWidth, 0, + XmNmarginHeight, 0, + XmNresizePolicy, XmRESIZE_NONE, /* no automatic resize of children */ + /* Frame Constraint */ + XmNchildType, XmFRAME_WORKAREA_CHILD, + NULL); + + /* initialize the widget */ + XtRealizeWidget(ih->handle); + + return IUP_NOERROR; +} + +void iupdrvFrameInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motFrameMapMethod; + ic->GetInnerNativeContainerHandle = motFrameGetInnerNativeContainerHandleMethod; + + /* Driver Dependent Attribute functions */ + + /* Overwrite Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, motFrameSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, motFrameSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BACKGROUND", NULL, motFrameSetBackgroundAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, motFrameSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "TITLE", NULL, motFrameSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); +} diff --git a/iup/src/mot/iupmot_globalattrib.c b/iup/src/mot/iupmot_globalattrib.c new file mode 100755 index 0000000..9567cf5 --- /dev/null +++ b/iup/src/mot/iupmot_globalattrib.c @@ -0,0 +1,155 @@ +/** \file + * \brief Motif Driver implementation of iupdrvSetGlobal + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvinfo.h" +#include "iup_strmessage.h" + +#include "iupmot_drv.h" + + +static void motGlobalSendKey(int key, int press) +{ + Window focus; + int revert_to; + XKeyEvent evt; + memset(&evt, 0, sizeof(XKeyEvent)); + evt.display = iupmot_display; + evt.send_event = True; + evt.root = DefaultRootWindow(iupmot_display); + + XGetInputFocus(iupmot_display, &focus, &revert_to); + evt.window = focus; + + iupmotKeyEncode(key, &evt.keycode, &evt.state); + if (!evt.keycode) + return; + + if (press & 0x01) + { + evt.type = KeyPress; + XSendEvent(iupmot_display, (Window)InputFocus, False, KeyPressMask, (XEvent*)&evt); + } + + if (press & 0x02) + { + evt.type = KeyRelease; + XSendEvent(iupmot_display, (Window)InputFocus, False, KeyReleaseMask, (XEvent*)&evt); + } +} + +int iupdrvSetGlobal(const char *name, const char *value) +{ + if (iupStrEqual(name, "LANGUAGE")) + { + iupStrMessageUpdateLanguage(value); + return 1; + } + if (iupStrEqual(name, "AUTOREPEAT")) + { + XKeyboardControl values; + if (iupStrBoolean(value)) + values.auto_repeat_mode = 1; + else + values.auto_repeat_mode = 0; + XChangeKeyboardControl(iupmot_display, KBAutoRepeatMode, &values); + return 0; + } + if (iupStrEqual(name, "CURSORPOS")) + { + int x, y; + if (iupStrToIntInt(value, &x, &y, 'x') == 2) + XWarpPointer(iupmot_display,None,RootWindow(iupmot_display, iupmot_screen),0,0,0,0,x,y); + return 0; + } + if (iupStrEqual(name, "KEYPRESS")) + { + int key; + if (iupStrToInt(value, &key)) + motGlobalSendKey(key, 0x01); + return 0; + } + if (iupStrEqual(name, "KEYRELEASE")) + { + int key; + if (iupStrToInt(value, &key)) + motGlobalSendKey(key, 0x02); + return 0; + } + if (iupStrEqual(name, "KEY")) + { + int key; + if (iupStrToInt(value, &key)) + motGlobalSendKey(key, 0x03); + return 0; + } + return 1; +} + +char* iupdrvGetGlobal(const char *name) +{ + if (iupStrEqual(name, "CURSORPOS")) + { + int x, y; + char* str = iupStrGetMemory(50); + iupdrvGetCursorPos(&x, &y); + sprintf(str, "%dx%d", x, y); + return str; + } + if (iupStrEqual(name, "SHIFTKEY")) + { + char key[5]; + iupdrvGetKeyState(key); + if (key[0] == 'S') + return "ON"; + return "OFF"; + } + if (iupStrEqual(name, "CONTROLKEY")) + { + char key[5]; + iupdrvGetKeyState(key); + if (key[1] == 'C') + return "ON"; + return "OFF"; + } + if (iupStrEqual(name, "MODKEYSTATE")) + { + char *str = iupStrGetMemory(5); + iupdrvGetKeyState(str); + return str; + } + if (iupStrEqual(name, "SCREENSIZE")) + { + char *str = iupStrGetMemory(50); + int w, h; + iupdrvGetScreenSize(&w, &h); + sprintf(str, "%dx%d", w, h); + return str; + } + if (iupStrEqual(name, "FULLSIZE")) + { + char *str = iupStrGetMemory(50); + int w, h; + iupdrvGetFullSize(&w, &h); + sprintf(str, "%dx%d", w, h); + return str; + } + if (iupStrEqual(name, "SCREENDEPTH")) + { + char *str = iupStrGetMemory(50); + int bpp = iupdrvGetScreenDepth(); + sprintf(str, "%d", bpp); + return str; + } + return NULL; +} diff --git a/iup/src/mot/iupmot_image.c b/iup/src/mot/iupmot_image.c new file mode 100755 index 0000000..b0078d5 --- /dev/null +++ b/iup/src/mot/iupmot_image.c @@ -0,0 +1,397 @@ +/** \file + * \brief Image Resource. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" +#include "iup_drvinfo.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +void iupdrvImageGetRawData(void* handle, unsigned char* imgdata) +{ + Pixmap pixmap = (Pixmap)handle; + int w, h, y, x, bpp; + XImage *xi; + + if (!iupdrvImageGetInfo(handle, &w, &h, &bpp)) + return; + + if (bpp==8) + return; + + xi = XGetImage(iupmot_display, pixmap, 0, 0, w, h, ULONG_MAX, ZPixmap); + if (xi) + { + /* planes are separated in imgdata */ + int planesize = w*h; + unsigned char *r = imgdata, + *g = imgdata+planesize, + *b = imgdata+2*planesize; + for (y=0; ycurrentwidth, + height = ih->currentheight; + unsigned char *imgdata = (unsigned char*)iupAttribGetStr(ih, "WID"); + Pixmap pixmap; + unsigned char bg_r=0, bg_g=0, bg_b=0; + GC gc; + Pixel color2pixel[256]; + + bpp = iupAttribGetInt(ih, "BPP"); + + iupStrToRGB(bgcolor, &bg_r, &bg_g, &bg_b); + + if (bpp == 8) + { + int i, colors_count = 0; + iupColor colors[256]; + + iupImageInitColorTable(ih, colors, &colors_count); + + for (i=0;icurrentwidth, + height = ih->currentheight, + line_size = (width+7)/8, + size_bytes = line_size*height; + unsigned char *imgdata = (unsigned char*)iupAttribGetStr(ih, "WID"); + char *sbits, *mbits, *sb, *mb; + Pixmap source, mask; + XColor fg, bg; + unsigned char r, g, b; + Cursor cursor; + + bpp = iupAttribGetInt(ih, "BPP"); + if (bpp > 8) + return NULL; + + sbits = (char*)malloc(2*size_bytes); + if (!sbits) return NULL; + memset(sbits, 0, 2*size_bytes); + mbits = sbits + size_bytes; + + sb = sbits; + mb = mbits; + for (y=0; ycurrentwidth, + height = ih->currentheight, + line_size = (width+7)/8, + size_bytes = line_size*height; + unsigned char *imgdata = (unsigned char*)iupAttribGetStr(ih, "WID"); + char *bits, *sb; + Pixmap mask; + unsigned char colors[256]; + + bpp = iupAttribGetInt(ih, "BPP"); + if (bpp > 8) + return NULL; + + bits = (char*)malloc(size_bytes); + if (!bits) return NULL; + memset(bits, 0, size_bytes); + + iupImageInitNonBgColors(ih, colors); + + sb = bits; + for (y=0; y +#include + +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include "iup_object.h" +#include "iup_key.h" +#include "iup_str.h" + +#include "iupmot_drv.h" + +typedef struct Imot2iupkey +{ + KeySym motcode; + int iupcode; + int s_iupcode; + int c_iupcode; + int m_iupcode; + int y_iupcode; +} Imot2iupkey; + +static Imot2iupkey motkey_map[] = { + +{ XK_Escape, K_ESC, K_sESC, K_cESC, K_mESC ,K_yESC }, +{ XK_Pause, K_PAUSE, K_sPAUSE, K_cPAUSE, K_mPAUSE ,K_yPAUSE }, +{ XK_Print, K_Print, K_sPrint, K_cPrint, K_mPrint ,K_yPrint }, +{ XK_Menu, K_Menu, K_sMenu, K_cMenu, K_mMenu ,K_yMenu }, + +{ XK_Home, K_HOME, K_sHOME, K_cHOME, K_mHOME ,K_yHOME }, +{ XK_Up, K_UP, K_sUP, K_cUP, K_mUP ,K_yUP }, +{ XK_Prior, K_PGUP, K_sPGUP, K_cPGUP, K_mPGUP ,K_yPGUP }, +{ XK_Left, K_LEFT, K_sLEFT, K_cLEFT, K_mLEFT ,K_yLEFT }, +{ XK_Begin, K_MIDDLE,K_sMIDDLE, K_cMIDDLE,K_mMIDDLE,K_yMIDDLE}, +{ XK_Right, K_RIGHT, K_sRIGHT, K_cRIGHT, K_mRIGHT ,K_yRIGHT }, +{ XK_End, K_END, K_sEND, K_cEND, K_mEND ,K_yEND }, +{ XK_Down, K_DOWN, K_sDOWN, K_cDOWN, K_mDOWN ,K_yDOWN }, +{ XK_Next, K_PGDN, K_sPGDN, K_cPGDN, K_mPGDN ,K_yPGDN }, +{ XK_Insert, K_INS, K_sINS, K_cINS, K_mINS ,K_yINS }, +{ XK_Delete, K_DEL, K_sDEL, K_cDEL, K_mDEL ,K_yDEL }, +{ XK_space, K_SP, K_sSP, K_cSP, K_mSP ,K_ySP }, +{ XK_Tab, K_TAB, K_sTAB, K_cTAB, K_mTAB ,K_yTAB }, +{ XK_Return, K_CR, K_sCR, K_cCR, K_mCR ,K_yCR }, +{ XK_BackSpace, K_BS, K_sBS, K_cBS, K_mBS ,K_yBS }, + +{ XK_1, K_1, K_exclam, K_c1, K_m1, K_y1 }, +{ XK_2, K_2, K_at, K_c2, K_m2, K_y2 }, +{ XK_3, K_3, K_numbersign, K_c3, K_m3, K_y3 }, +{ XK_4, K_4, K_dollar, K_c4, K_m4, K_y4 }, +{ XK_5, K_5, K_percent, K_c5, K_m5, K_y5 }, +{ XK_6, K_6, K_circum, K_c6, K_m6, K_y6 }, +{ XK_7, K_7, K_ampersand, K_c7, K_m7, K_y7 }, +{ XK_8, K_8, K_asterisk, K_c8, K_m8, K_y8 }, +{ XK_9, K_9, K_parentleft, K_c9, K_m9, K_y9 }, +{ XK_0, K_0, K_parentright, K_c0, K_m0, K_y0 }, + +{ XK_a, K_a, K_A, K_cA, K_mA, K_yA }, +{ XK_b, K_b, K_B, K_cB, K_mB, K_yB }, +{ XK_c, K_c, K_C, K_cC, K_mC, K_yC }, +{ XK_d, K_d, K_D, K_cD, K_mD, K_yD }, +{ XK_e, K_e, K_E, K_cE, K_mE, K_yE }, +{ XK_f, K_f, K_F, K_cF, K_mF, K_yF }, +{ XK_g, K_g, K_G, K_cG, K_mG, K_yG }, +{ XK_h, K_h, K_H, K_cH, K_mH, K_yH }, +{ XK_i, K_i, K_I, K_cI, K_mI, K_yI }, +{ XK_j, K_j, K_J, K_cJ, K_mJ, K_yJ }, +{ XK_k, K_k, K_K, K_cK, K_mK, K_yK }, +{ XK_l, K_l, K_L, K_cL, K_mL, K_yL }, +{ XK_m, K_m, K_M, K_cM, K_mM, K_yM }, +{ XK_n, K_n, K_N, K_cN, K_mN, K_yN }, +{ XK_o, K_o, K_O, K_cO, K_mO, K_yO }, +{ XK_p, K_p, K_P, K_cP, K_mP, K_yP }, +{ XK_q, K_q, K_Q, K_cQ, K_mQ, K_yQ }, +{ XK_r, K_r, K_R, K_cR, K_mR, K_yR }, +{ XK_s, K_s, K_S, K_cS, K_mS, K_yS }, +{ XK_t, K_t, K_T, K_cT, K_mT, K_yT }, +{ XK_u, K_u, K_U, K_cU, K_mU, K_yU }, +{ XK_v, K_v, K_V, K_cV, K_mV, K_yV }, +{ XK_w, K_w, K_W, K_cW, K_mW, K_yW }, +{ XK_x, K_x, K_X, K_cX, K_mX, K_yX }, +{ XK_y, K_y, K_Y, K_cY, K_mY, K_yY }, +{ XK_z, K_z, K_Z, K_cZ, K_mZ, K_yZ }, + +{ XK_F1, K_F1, K_sF1, K_cF1, K_mF1, K_yF1 }, +{ XK_F2, K_F2, K_sF2, K_cF2, K_mF2, K_yF2 }, +{ XK_F3, K_F3, K_sF3, K_cF3, K_mF3, K_yF3 }, +{ XK_F4, K_F4, K_sF4, K_cF4, K_mF4, K_yF4 }, +{ XK_F5, K_F5, K_sF5, K_cF5, K_mF5, K_yF5 }, +{ XK_F6, K_F6, K_sF6, K_cF6, K_mF6, K_yF6 }, +{ XK_F7, K_F7, K_sF7, K_cF7, K_mF7, K_yF7 }, +{ XK_F8, K_F8, K_sF8, K_cF8, K_mF8, K_yF8 }, +{ XK_F9, K_F9, K_sF9, K_cF9, K_mF9, K_yF9 }, +{ XK_F10, K_F10, K_sF10, K_cF10, K_mF10, K_yF10 }, +{ XK_F11, K_F11, K_sF11, K_cF11, K_mF11, K_yF11 }, +{ XK_F12, K_F12, K_sF12, K_cF12, K_mF12, K_yF12 }, + +{ XK_semicolon, K_semicolon, K_colon, K_cSemicolon, K_mSemicolon, K_ySemicolon }, +{ XK_equal, K_equal, K_plus, K_cEqual, K_mEqual, K_yEqual }, +{ XK_comma, K_comma, K_less, K_cComma, K_mComma, K_yComma }, +{ XK_minus, K_minus, K_underscore, K_cMinus, K_mMinus, K_yMinus }, +{ XK_period, K_period, K_greater, K_cPeriod, K_mPeriod, K_yPeriod }, +{ XK_slash, K_slash, K_question, K_cSlash, K_mSlash, K_ySlash }, +{ XK_grave, K_grave, K_tilde, 0, 0, 0 }, +{ XK_bracketleft, K_bracketleft, K_braceleft, K_cBracketleft, K_mBracketleft, K_yBracketleft }, +{ XK_backslash, K_backslash, K_bar, K_cBackslash, K_mBackslash, K_yBackslash }, +{ XK_bracketright,K_bracketright, K_braceright, K_cBracketright,K_mBracketright,K_yBracketright }, +{ XK_apostrophe, K_apostrophe, K_quotedbl, 0, 0, 0 }, + +{ XK_KP_0, K_0, K_0, K_c0, K_m0, K_y0 }, +{ XK_KP_1, K_1, K_1, K_c1, K_m1, K_y1 }, +{ XK_KP_2, K_2, K_2, K_c2, K_m2, K_y2 }, +{ XK_KP_3, K_3, K_3, K_c3, K_m3, K_y3 }, +{ XK_KP_4, K_4, K_4, K_c4, K_m4, K_y4 }, +{ XK_KP_5, K_5, K_5, K_c5, K_m5, K_y5 }, +{ XK_KP_6, K_6, K_6, K_c6, K_m6, K_y6 }, +{ XK_KP_7, K_7, K_7, K_c7, K_m7, K_y7 }, +{ XK_KP_8, K_8, K_8, K_c8, K_m8, K_y8 }, +{ XK_KP_9, K_9, K_9, K_c9, K_m9, K_y9 }, +{ XK_KP_Multiply, K_asterisk, K_sAsterisk, K_cAsterisk, K_mAsterisk, K_yAsterisk }, +{ XK_KP_Add, K_plus, K_sPlus, K_cPlus, K_mPlus, K_yPlus }, +{ XK_KP_Subtract, K_minus, K_sMinus, K_cMinus, K_mMinus, K_yMinus }, +{ XK_KP_Decimal, K_period, K_sPeriod, K_cPeriod, K_mPeriod, K_yPeriod }, +{ XK_KP_Divide, K_slash, K_sSlash, K_cSlash, K_mSlash, K_ySlash }, +{ XK_KP_Separator, K_comma, K_sComma, K_cComma, K_mComma, K_yComma }, + +{ XK_ccedilla, K_ccedilla, K_Ccedilla, K_cCcedilla, K_mCcedilla, K_yCcedilla }, + +{ XK_dead_tilde, K_tilde, K_circum, 0, 0, 0 }, +{ XK_dead_acute, K_acute, K_grave, 0, 0, 0 }, +{ XK_dead_grave, K_grave, K_tilde, 0, 0, 0 }, + +{ XK_KP_F1, K_F1, K_sF1, K_cF1, K_mF1, K_yF1 }, +{ XK_KP_F2, K_F2, K_sF2, K_cF2, K_mF2, K_yF2 }, +{ XK_KP_F3, K_F3, K_sF3, K_cF3, K_mF3, K_yF3 }, +{ XK_KP_F4, K_F4, K_sF4, K_cF4, K_mF4, K_yF4 }, +{ XK_KP_Space, K_SP, K_sSP, K_cSP, K_mSP ,K_ySP }, +{ XK_KP_Tab, K_TAB, K_sTAB, K_cTAB, K_mTAB ,K_yTAB }, +{ XK_KP_Equal, K_equal, 0, K_cEqual, K_mEqual, K_yEqual }, + +{ XK_KP_Enter, K_CR, K_sCR, K_cCR, K_mCR, K_yCR }, +{ XK_KP_Home, K_HOME, K_sHOME, K_cHOME, K_mHOME, K_yHOME }, +{ XK_KP_Up, K_UP, K_sUP, K_cUP, K_mUP, K_yUP }, +{ XK_KP_Page_Up, K_PGUP, K_sPGUP, K_cPGUP, K_mPGUP, K_yPGUP }, +{ XK_KP_Left, K_LEFT, K_sLEFT, K_cLEFT, K_mLEFT, K_yLEFT }, +{ XK_KP_Begin, K_MIDDLE,K_sMIDDLE, K_cMIDDLE,K_mMIDDLE,K_yMIDDLE}, +{ XK_KP_Right, K_RIGHT, K_sRIGHT, K_cRIGHT, K_mRIGHT, K_yRIGHT }, +{ XK_KP_End, K_END, K_sEND, K_cEND, K_mEND, K_yEND }, +{ XK_KP_Down, K_DOWN, K_sDOWN, K_cDOWN, K_mDOWN, K_yDOWN }, +{ XK_KP_Page_Down, K_PGDN, K_sPGDN, K_cPGDN, K_mPGDN, K_yPGDN }, +{ XK_KP_Insert, K_INS, K_sINS, K_cINS, K_mINS, K_yINS }, +{ XK_KP_Delete, K_DEL, K_sDEL, K_cDEL, K_mDEL, K_yDEL } + +}; + +void iupmotKeyEncode(int key, unsigned int *keyval, unsigned int *state) +{ + int i, iupcode = key & 0xFF; /* 0-255 interval */ + int count = sizeof(motkey_map)/sizeof(motkey_map[0]); + for (i = 0; i < count; i++) + { + Imot2iupkey* key_map = &(motkey_map[i]); + if (key_map->iupcode == iupcode) + { + *keyval = XKeysymToKeycode(iupmot_display, key_map->motcode); + *state = 0; + + if (iupcode != key) + { + if (key_map->c_iupcode == key) + *state = ControlMask; + else if (key_map->m_iupcode == key) + *state = Mod1Mask; + else if (key_map->y_iupcode == key) + *state = Mod4Mask; + else if (key_map->s_iupcode == key) + *state = ShiftMask; + } + return; + } + else if (key_map->s_iupcode == key) /* There are Shift keys bellow 256 */ + { + *keyval = XKeysymToKeycode(iupmot_display, key_map->motcode); + *state = ShiftMask; + return; + } + } +} + +static int motKeyMap2Iup(unsigned int state, int i) +{ + int code = 0; + if (state & ControlMask) /* Ctrl */ + code = motkey_map[i].c_iupcode; + else if (state & Mod1Mask || + state & Mod5Mask) /* Alt */ + code = motkey_map[i].m_iupcode; + else if (state & Mod4Mask) /* Apple/Win */ + code = motkey_map[i].y_iupcode; + else if (state & LockMask) /* CapsLock */ + { + if ((state & ShiftMask) || !iupKeyCanCaps(motkey_map[i].iupcode)) + return motkey_map[i].iupcode; + else + code = motkey_map[i].s_iupcode; + } + else if (state & ShiftMask) /* Shift */ + code = motkey_map[i].s_iupcode; + else + return motkey_map[i].iupcode; + + if (!code) + code = motkey_map[i].iupcode; + + return code; +} + +static int motKeyDecode(XKeyEvent *evt) +{ + int i; + KeySym motcode = XKeycodeToKeysym(iupmot_display, evt->keycode, 0); + int count = sizeof(motkey_map)/sizeof(motkey_map[0]); + + if ((evt->state & Mod2Mask) && /* NumLock */ + (motcode >= XK_KP_Home) && + (motcode <= XK_KP_Delete)) + { + /* remap to numeric keys */ + KeySym remap_numkey[] = {XK_KP_7, XK_KP_4, XK_KP_8, XK_KP_6, XK_KP_2, XK_KP_9, XK_KP_3, XK_KP_1, XK_KP_5, XK_KP_0, XK_KP_Decimal}; + motcode = remap_numkey[motcode-XK_KP_Home]; + } + + for (i = 0; i < count; i++) + { + if (motkey_map[i].motcode == motcode) + return motKeyMap2Iup(evt->state, i); + } + + return 0; +} + +KeySym iupmotKeyCharToKeySym(char c) +{ + int i; + int count = sizeof(motkey_map)/sizeof(motkey_map[0]); + + for (i = 0; i < count; i++) + { + if (motkey_map[i].iupcode == c) + return motkey_map[i].motcode; + if (motkey_map[i].s_iupcode == c) + { + if (motkey_map[i].motcode >= XK_a && + motkey_map[i].motcode <= XK_z) + return motkey_map[i].motcode - (XK_a-XK_A); + } + } + + return 0; +} + +/* Discards keyrepeat by removing the keypress event from the queue. + * The pair keyrelease/keypress is always put together in the queue, + * by removing the keypress, we only worry about keyrelease. In case + * of a keyrelease, we ignore it if the next event is a keypress (which + * means repetition. Otherwise it is a real keyrelease. + * + * Returns 1 if the keypress is found in the queue and 0 otherwise. + */ +static int motKeyDiscardKeypressRepeat(XEvent *evt) +{ + XEvent ahead; + if (XEventsQueued(iupmot_display, QueuedAfterReading)) + { + XPeekEvent(iupmot_display, &ahead); + if (ahead.type == KeyPress && ahead.xkey.window == evt->xkey.window + && ahead.xkey.keycode == evt->xkey.keycode && ahead.xkey.time == evt->xkey.time) + { + /* Pop off the repeated KeyPress and ignore */ + XNextEvent(iupmot_display, evt); + /* Ignore the auto repeated KeyRelease/KeyPress pair */ + return 1; + } + } + /* No KeyPress found */ + return 0; +} + +/* this is called only for canvas */ +void iupmotCanvasKeyReleaseEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont) +{ + if (motKeyDiscardKeypressRepeat(evt)) + { + /* call key_press because it was removed from the queue */ + iupmotKeyPressEvent(w, ih, evt, cont); + } + else + { + int result; + int code = motKeyDecode((XKeyEvent*)evt); + if (code == 0) + return; + result = iupKeyCallKeyPressCb(ih, code, 0); + if (result == IUP_CLOSE) + { + IupExitLoop(); + return; + } + if (result == IUP_IGNORE) + { + *cont = False; + return; + } + } +} + +void iupmotKeyPressEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont) +{ + int result; + int code = motKeyDecode((XKeyEvent*)evt); + if (code == 0) + return; + + if ((((XKeyEvent*)evt)->state & Mod1Mask || ((XKeyEvent*)evt)->state & Mod5Mask)) /* Alt */ + { + KeySym motcode = XKeycodeToKeysym(iupmot_display, ((XKeyEvent*)evt)->keycode, 0); + if (motcode < 128) + { + IFni cb; + Ihandle* dialog = IupGetDialog(ih); + char attrib[22] = "_IUPMOT_MNEMONIC_ _CB"; + attrib[17] = (char)toupper(motcode); + cb = (IFni)IupGetCallback(dialog, attrib); + if (cb) + { + cb(dialog, attrib[17]); + return; + } + } + } + + result = iupKeyCallKeyCb(ih, code); + if (result == IUP_CLOSE) + { + IupExitLoop(); + return; + } + if (result == IUP_IGNORE) + { + *cont = False; + return; + } + + /* in the previous callback the dialog could be destroyed */ + if (iupObjectCheck(ih)) + { + /* this is called only for canvas */ + if (ih->iclass->nativetype==IUP_TYPECANVAS) + { + result = iupKeyCallKeyPressCb(ih, code, 1); + if (result == IUP_CLOSE) + { + IupExitLoop(); + return; + } + if (result == IUP_IGNORE) + { + *cont = False; + return; + } + } + + if (!iupKeyProcessNavigation(ih, code, ((XKeyEvent*)evt)->state & ShiftMask)) + { + *cont = False; + return; + } + } + + (void)w; +} + +void iupmotButtonKeySetStatus(unsigned int state, unsigned int but, char* status, int doubleclick) +{ + if (state & ShiftMask) + iupKEYSETSHIFT(status); + + if (state & ControlMask) + iupKEYSETCONTROL(status); + + if ((state & Button1Mask) || but==Button1) + iupKEYSETBUTTON1(status); + + if ((state & Button2Mask) || but==Button2) + iupKEYSETBUTTON2(status); + + if ((state & Button3Mask) || but==Button3) + iupKEYSETBUTTON3(status); + + if ((state & Button4Mask) || but==Button4) + iupKEYSETBUTTON4(status); + + if ((state & Button5Mask) || but==Button5) + iupKEYSETBUTTON5(status); + + if (state & Mod1Mask || state & Mod5Mask) /* Alt */ + iupKEYSETALT(status); + + if (state & Mod4Mask) /* Apple/Win */ + iupKEYSETSYS(status); + + if (doubleclick) + iupKEYSETDOUBLE(status); +} + diff --git a/iup/src/mot/iupmot_label.c b/iup/src/mot/iupmot_label.c new file mode 100755 index 0000000..52dfc9a --- /dev/null +++ b/iup/src/mot/iupmot_label.c @@ -0,0 +1,256 @@ +/** \file + * \brief Label Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_label.h" +#include "iup_drv.h" +#include "iup_image.h" + +#include "iupmot_drv.h" + + +static int motLabelSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_LABEL_TEXT) + { + iupmotSetMnemonicTitle(ih, value); + return 1; + } + + return 0; +} + +static int motLabelSetBgColorAttrib(Ihandle* ih, const char* value) +{ + /* ignore given value, must use only from parent */ + value = iupBaseNativeParentGetBgColor(ih); + + if (iupdrvBaseSetBgColorAttrib(ih, value)) + return 1; + return 0; +} + +static int motLabelSetBackgroundAttrib(Ihandle* ih, const char* value) +{ + /* ignore given value, must use only from parent */ + value = iupAttribGetInheritNativeParent(ih, "BACKGROUND"); + + if (iupdrvBaseSetBgColorAttrib(ih, value)) + return 1; + else + { + Pixmap pixmap = (Pixmap)iupImageGetImage(value, ih, 0); + if (pixmap) + { + XtVaSetValues(ih->handle, XmNbackgroundPixmap, pixmap, NULL); + return 1; + } + } + return 0; +} + +static int motLabelSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type != IUP_LABEL_SEP_HORIZ && ih->data->type != IUP_LABEL_SEP_VERT) + { + unsigned char align; + char value1[30]="", value2[30]=""; + + iupStrToStrStr(value, value1, value2, ':'); /* value2 is ignored, NOT supported in Motif */ + + if (iupStrEqualNoCase(value1, "ARIGHT")) + align = XmALIGNMENT_END; + else if (iupStrEqualNoCase(value1, "ACENTER")) + align = XmALIGNMENT_CENTER; + else /* "ALEFT" */ + align = XmALIGNMENT_BEGINNING; + + XtVaSetValues(ih->handle, XmNalignment, align, NULL); + return 1; + } + else + return 0; +} + +static int motLabelSetImageAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_LABEL_IMAGE) + { + iupmotSetPixmap(ih, value, XmNlabelPixmap, 0); + + if (!iupdrvIsActive(ih)) + { + if (!iupAttribGet(ih, "IMINACTIVE")) + { + /* if not active and IMINACTIVE is not defined + then automaticaly create one based on IMAGE */ + iupmotSetPixmap(ih, value, XmNlabelInsensitivePixmap, 1); /* make_inactive */ + } + } + return 1; + } + else + return 0; +} + +static int motLabelSetImInactiveAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_LABEL_IMAGE) + { + iupmotSetPixmap(ih, value, XmNlabelInsensitivePixmap, 0); + return 1; + } + else + return 0; +} + +static int motLabelSetActiveAttrib(Ihandle* ih, const char* value) +{ + /* update the inactive image if necessary */ + if (ih->data->type == IUP_LABEL_IMAGE && !iupStrBoolean(value)) + { + if (!iupAttribGet(ih, "IMINACTIVE")) + { + /* if not defined then automaticaly create one based on IMAGE */ + char* name = iupAttribGet(ih, "IMAGE"); + iupmotSetPixmap(ih, name, XmNlabelInsensitivePixmap, 1); /* make_inactive */ + } + } + + return iupBaseSetActiveAttrib(ih, value); +} + +static int motLabelSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + if (ih->handle && ih->data->type != IUP_LABEL_SEP_HORIZ && ih->data->type != IUP_LABEL_SEP_VERT) + { + XtVaSetValues(ih->handle, XmNmarginHeight, ih->data->vert_padding, + XmNmarginWidth, ih->data->horiz_padding, NULL); + } + return 0; +} + +static int motLabelMapMethod(Ihandle* ih) +{ + char* value; + int num_args = 0; + Arg args[20]; + WidgetClass widget_class; + + value = iupAttribGet(ih, "SEPARATOR"); + if (value) + { + widget_class = xmSeparatorWidgetClass; + if (iupStrEqualNoCase(value, "HORIZONTAL")) + { + ih->data->type = IUP_LABEL_SEP_HORIZ; + iupmotSetArg(args, num_args, XmNorientation, XmHORIZONTAL); + } + else /* "VERTICAL" */ + { + ih->data->type = IUP_LABEL_SEP_VERT; + iupmotSetArg(args, num_args, XmNorientation, XmVERTICAL); + } + } + else + { + value = iupAttribGet(ih, "IMAGE"); + widget_class = xmLabelWidgetClass; + if (value) + { + ih->data->type = IUP_LABEL_IMAGE; + iupmotSetArg(args, num_args, XmNlabelType, XmPIXMAP); + } + else + { + ih->data->type = IUP_LABEL_TEXT; + iupmotSetArg(args, num_args, XmNlabelType, XmSTRING); + } + } + + /* Core */ + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + /* Primitive */ + iupmotSetArg(args, num_args, XmNtraversalOn, False); + iupmotSetArg(args, num_args, XmNhighlightThickness, 0); + /* Label */ + iupmotSetArg(args, num_args, XmNrecomputeSize, False); /* no automatic resize from text */ + iupmotSetArg(args, num_args, XmNmarginHeight, 0); /* default padding */ + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + iupmotSetArg(args, num_args, XmNmarginTop, 0); /* no extra margins */ + iupmotSetArg(args, num_args, XmNmarginLeft, 0); + iupmotSetArg(args, num_args, XmNmarginBottom, 0); + iupmotSetArg(args, num_args, XmNmarginRight, 0); + + ih->handle = XtCreateManagedWidget( + iupDialogGetChildIdStr(ih), /* child identifier */ + widget_class, /* widget class */ + iupChildTreeGetNativeParentHandle(ih), /* widget parent */ + args, num_args); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + /* Drag Source is enabled by default in label */ + iupmotDisableDragSource(ih->handle); + + /* initialize the widget */ + XtRealizeWidget(ih->handle); + + if (ih->data->type == IUP_LABEL_TEXT) + iupmotSetString(ih->handle, XmNlabelString, ""); + + return IUP_NOERROR; +} + +void iupdrvLabelInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motLabelMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, motLabelSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", iupmotGetBgColorAttrib, motLabelSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BACKGROUND", NULL, motLabelSetBackgroundAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, iupdrvBaseSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "TITLE", NULL, motLabelSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupLabel only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", NULL, motLabelSetAlignmentAttrib, "ALEFT:ACENTER", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "IMAGE", NULL, motLabelSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PADDING", iupLabelGetPaddingAttrib, motLabelSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + + /* IupLabel GTK and Motif only */ + iupClassRegisterAttribute(ic, "IMINACTIVE", NULL, motLabelSetImInactiveAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); +} diff --git a/iup/src/mot/iupmot_list.c b/iup/src/mot/iupmot_list.c new file mode 100755 index 0000000..f8e73ed --- /dev/null +++ b/iup/src/mot/iupmot_list.c @@ -0,0 +1,1404 @@ +/** \file + * \brief List Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_mask.h" +#include "iup_key.h" +#include "iup_list.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +static void motListComboBoxSelectionCallback(Widget w, Ihandle* ih, XmComboBoxCallbackStruct* call_data); + + +void iupdrvListAddItemSpace(Ihandle* ih, int *h) +{ + if (ih->data->has_editbox) + *h += 1; + else + *h += 3; +} + +void iupdrvListAddBorders(Ihandle* ih, int *x, int *y) +{ + int border_size = 2*4; + (*x) += border_size; + (*y) += border_size; + + if (ih->data->is_dropdown) + { + if (ih->data->has_editbox) + { + /* extra border for the editbox */ + int internal_border_size = 2*2; + (*x) += internal_border_size; + (*y) += internal_border_size; + } + } + else + { + if (ih->data->has_editbox) + (*y) += 2*2; /* internal border between editbox and list */ + else + (*x) += 2; /* extra border for the simple list */ + } +} + +static int motListConvertXYToPos(Ihandle* ih, int x, int y) +{ + (void)x; + if (ih->data->has_editbox) + { + Widget cblist; + XtVaGetValues(ih->handle, XmNlist, &cblist, NULL); + return XmListYToPos(cblist, (Position)y); /* XmListYToPos returns start at 1 */ + } + else + return XmListYToPos(ih->handle, (Position)y); +} + +int iupdrvListGetCount(Ihandle* ih) +{ + int count; + XtVaGetValues(ih->handle, XmNitemCount, &count, NULL); + return count; +} + +static void motListAddItem(Ihandle* ih, int pos, const char* value) +{ + XmString str = XmStringCreateLocalized((String)value); + /* The utility functions use 0=last 1=first */ + if (ih->data->is_dropdown || ih->data->has_editbox) + XmComboBoxAddItem(ih->handle, str, pos+1, False); + else + XmListAddItem(ih->handle, str, pos+1); + XmStringFree(str); +} + +static void motListAddSortedItem(Ihandle* ih, const char *value) +{ + char *text; + XmString *strlist; + int u_bound, l_bound = 0; + + XtVaGetValues(ih->handle, XmNitemCount, &u_bound, XmNitems, &strlist, NULL); + + u_bound--; + /* perform binary search */ + while (u_bound >= l_bound) + { + int i = l_bound + (u_bound - l_bound)/2; + text = (char*)XmStringUnparse(strlist[i], NULL, XmCHARSET_TEXT, XmCHARSET_TEXT, NULL, 0, XmOUTPUT_ALL); + if (!text) + break; + if (strcmp (text, value) > 0) + u_bound = i-1; /* newtext comes before item */ + else + l_bound = i+1; /* newtext comes after item */ + XtFree(text); + } + + motListAddItem(ih, l_bound, value); +} + +void iupdrvListAppendItem(Ihandle* ih, const char* value) +{ + if (iupAttribGetBoolean(ih, "SORT")) + motListAddSortedItem(ih, value); + else + motListAddItem(ih, -1, value); +} + +void iupdrvListInsertItem(Ihandle* ih, int pos, const char* value) +{ + if (iupAttribGetBoolean(ih, "SORT")) + motListAddSortedItem(ih, value); + else + motListAddItem(ih, pos, value); +} + +void iupdrvListRemoveItem(Ihandle* ih, int pos) +{ + /* The utility functions use 0=last 1=first */ + if (ih->data->is_dropdown || ih->data->has_editbox) + XmComboBoxDeletePos(ih->handle, pos+1); + else + XmListDeletePos(ih->handle, pos+1); +} + +void iupdrvListRemoveAllItems(Ihandle* ih) +{ + if (ih->data->is_dropdown || ih->data->has_editbox) + { + Widget cblist; + XtVaGetValues(ih->handle, XmNlist, &cblist, NULL); + XmListDeleteAllItems(cblist); + XmComboBoxUpdate(ih->handle); + } + else + XmListDeleteAllItems(ih->handle); +} + + +/*********************************************************************************/ + + +static char* motListGetIdValueAttrib(Ihandle* ih, const char* name_id) +{ + int pos = iupListGetPos(ih, name_id); + if (pos != -1) + { + XmString* items; + XtVaGetValues(ih->handle, XmNitems, &items, NULL); + return iupmotConvertString(items[pos]); + } + return NULL; +} + +static int motListSetBgColorAttrib(Ihandle* ih, const char* value) +{ + Widget sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (sb_win) + { + Pixel color; + + /* ignore given value for the scrollbars, must use only from parent */ + char* parent_value = iupBaseNativeParentGetBgColor(ih); + + color = iupmotColorGetPixelStr(parent_value); + if (color != (Pixel)-1) + { + Widget sb = NULL; + + iupmotSetBgColor(sb_win, color); + + XtVaGetValues(sb_win, XmNverticalScrollBar, &sb, NULL); + if (sb) iupmotSetBgColor(sb, color); + + XtVaGetValues(sb_win, XmNhorizontalScrollBar, &sb, NULL); + if (sb) iupmotSetBgColor(sb, color); + } + + return iupdrvBaseSetBgColorAttrib(ih, value); /* use given value for contents */ + } + else + { + char* parent_value; + + /* use given value for Edit and List also */ + Pixel color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + Widget cbedit, cblist, sb; + + iupmotSetBgColor(ih->handle, color); + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + if (cbedit) iupmotSetBgColor(cbedit, color); + + XtVaGetValues(ih->handle, XmNlist, &cblist, NULL); + if (cblist) iupmotSetBgColor(cblist, color); + + XtVaGetValues(cblist, XmNverticalScrollBar, &sb, NULL); + if (sb) iupmotSetBgColor(sb, color); + + XtVaGetValues(cblist, XmNhorizontalScrollBar, &sb, NULL); + if (sb) iupmotSetBgColor(sb, color); + } + + /* but reset just the background, so the combobox will look like a button */ + parent_value = iupBaseNativeParentGetBgColor(ih); + + color = iupmotColorGetPixelStr(parent_value); + if (color != (Pixel)-1) + XtVaSetValues(ih->handle, XmNbackground, color, NULL); + + return 1; + } +} + +static int motListSetFgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + XtVaSetValues(ih->handle, XmNforeground, color, NULL); + + if (ih->data->is_dropdown || ih->data->has_editbox) + { + Widget w; + XtVaGetValues(ih->handle, XmNtextField, &w, NULL); + XtVaSetValues(w, XmNforeground, color, NULL); + + XtVaGetValues(ih->handle, XmNlist, &w, NULL); + XtVaSetValues(w, XmNforeground, color, NULL); + } + } + + return 1; +} + +static char* motListGetValueAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + char *str, *xstr; + Widget cbedit; + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + xstr = XmTextFieldGetString(cbedit); + str = iupStrGetMemoryCopy(xstr); + XtFree(xstr); + return str; + } + else + { + if (ih->data->is_dropdown) + { + char* str; + int pos; + XtVaGetValues(ih->handle, XmNselectedPosition, &pos, NULL); + str = iupStrGetMemory(50); + sprintf(str, "%d", pos+1); /* IUP starts at 1 */ + return str; + } + else + { + int *pos, sel_count; + if (XmListGetSelectedPos(ih->handle, &pos, &sel_count)) /* XmListGetSelectedPos starts at 1 */ + { + if (!ih->data->is_multiple) + { + char* str = iupStrGetMemory(50); + sprintf(str, "%d", pos[0]); + XtFree((char*)pos); + return str; + } + else + { + int i, count; + char* str; + XtVaGetValues(ih->handle, XmNitemCount, &count, NULL); + str = iupStrGetMemory(count+1); + memset(str, '-', count); + str[count]=0; + for (i=0; idata->has_editbox) + { + Widget cbedit; + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + if (!value) value = ""; + + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); /* disable callbacks */ + + XmTextFieldSetString(cbedit, (char*)value); + + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + else + { + if (ih->data->is_dropdown) + { + int pos; + if (iupStrToInt(value, &pos)==1) + { + XtRemoveCallback(ih->handle, XmNselectionCallback, (XtCallbackProc)motListComboBoxSelectionCallback, (XtPointer)ih); + + XtVaSetValues(ih->handle, XmNselectedPosition, pos-1, NULL); /* IUP starts at 1 */ + iupAttribSetInt(ih, "_IUPLIST_OLDVALUE", pos); + + XtAddCallback(ih->handle, XmNselectionCallback, (XtCallbackProc)motListComboBoxSelectionCallback, (XtPointer)ih); + } + } + else + { + if (!ih->data->is_multiple) + { + int pos; + if (iupStrToInt(value, &pos)==1) + { + XmListSelectPos(ih->handle, pos, FALSE); /* XmListSelectPos starts at 1 */ + iupAttribSetInt(ih, "_IUPLIST_OLDVALUE", pos); + } + else + { + XmListDeselectAllItems(ih->handle); + iupAttribSetStr(ih, "_IUPLIST_OLDVALUE", NULL); + } + } + else + { + /* User has changed a multiple selection on a simple list. */ + int i, count, len; + + /* Clear all selections */ + XmListDeselectAllItems(ih->handle); + + if (!value) + { + iupAttribSetStr(ih, "_IUPLIST_OLDVALUE", NULL); + return 0; + } + + XtVaGetValues(ih->handle, XmNitemCount, &count, NULL); + len = strlen(value); + if (len < count) + count = len; + + XtVaSetValues(ih->handle, XmNselectionPolicy, XmMULTIPLE_SELECT, NULL); + + /* update selection list */ + for (i = 0; ihandle, i+1, False); /* XmListSelectPos starts at 1 */ + } + + XtVaSetValues(ih->handle, XmNselectionPolicy, XmEXTENDED_SELECT, + XmNselectionMode, XmNORMAL_MODE, NULL); /* must also restore this */ + iupAttribStoreStr(ih, "_IUPLIST_OLDVALUE", value); + } + } + } + + return 0; +} + +static int motListSetVisibleItemsAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->is_dropdown) + { + int count; + if (iupStrToInt(value, &count)==1) + XtVaSetValues(ih->handle, XmNvisibleItemCount, count, NULL); + } + return 1; +} + +static int motListSetShowDropdownAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->is_dropdown) + { + if (iupStrBoolean(value)) + { + XButtonEvent ev; + memset(&ev, 0, sizeof(XButtonEvent)); + ev.type = ButtonPress; + ev.display = XtDisplay(ih->handle); + ev.send_event = True; + ev.root = RootWindow(iupmot_display, iupmot_screen); + ev.time = clock()*CLOCKS_PER_SEC; + ev.window = XtWindow(ih->handle); + ev.state = Button1Mask; + ev.button = Button1; + ev.same_screen = True; + XtCallActionProc(ih->handle, "CBDropDownList", (XEvent*)&ev, 0, 0 ); + } + else + XtCallActionProc(ih->handle, "CBDisarm", 0, 0, 0 ); + } + return 0; +} + +static int motListSetTopItemAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->is_dropdown) + { + int pos = 1; + if (iupStrToInt(value, &pos)) + { + if (ih->data->has_editbox) + { + Widget cblist; + XtVaGetValues(ih->handle, XmNlist, &cblist, NULL); + XtVaSetValues(cblist, XmNtopItemPosition, pos, NULL); + } + else + XtVaSetValues(ih->handle, XmNtopItemPosition, pos, NULL); + } + } + return 0; +} + +static int motListSetSpacingAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->is_dropdown) + return 0; + + if (!iupStrToInt(value, &ih->data->spacing)) + ih->data->spacing = 0; + + if (ih->handle) + { + if (ih->data->has_editbox) + { + Widget cblist; + XtVaGetValues(ih->handle, XmNlist, &cblist, NULL); + XtVaSetValues(cblist, XmNlistSpacing, ih->data->spacing*2, + XmNlistMarginWidth, ih->data->spacing, + XmNlistMarginHeight, ih->data->spacing, + NULL); + } + else + XtVaSetValues(ih->handle, XmNlistSpacing, ih->data->spacing*2, + XmNlistMarginWidth, ih->data->spacing, + XmNlistMarginHeight, ih->data->spacing, + NULL); + return 0; + } + else + return 1; /* store until not mapped, when mapped will be set again */ +} + +static int motListSetPaddingAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_editbox) + return 0; + + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + if (ih->handle) + { + Widget cbedit; + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XtVaSetValues(cbedit, XmNmarginHeight, ih->data->vert_padding, + XmNmarginWidth, ih->data->horiz_padding, NULL); + return 0; + } + else + return 1; /* store until not mapped, when mapped will be set again */ +} + +static int motListSetReadOnlyAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->has_editbox) + { + Widget cbedit; + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XtVaSetValues(cbedit, XmNeditable, iupStrBoolean(value)? False: True, NULL); + } + return 0; +} + +static char* motListGetReadOnlyAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + Boolean editable; + Widget cbedit; + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XtVaGetValues(cbedit, XmNeditable, &editable, NULL); + if (editable) + return "YES"; + else + return "NO"; + } + else + return NULL; +} + +static int motListSetInsertAttrib(Ihandle* ih, const char* value) +{ + if (!value) + return 0; + + if (ih->data->has_editbox) + { + Widget cbedit; + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); /* disable callbacks */ + XmTextFieldRemove(cbedit); + XmTextFieldInsert(cbedit, XmTextFieldGetInsertionPosition(cbedit), (char*)value); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + + return 0; +} + +static int motListSetSelectedTextAttrib(Ihandle* ih, const char* value) +{ + XmTextPosition start, end; + Widget cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value) + return 0; + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + if (XmTextFieldGetSelectionPosition(cbedit, &start, &end) && start!=end) + { + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); /* disable callbacks */ + XmTextFieldReplace(cbedit, start, end, (char*)value); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + + return 0; +} + +static char* motListGetSelectedTextAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + char* selectedtext, *str; + Widget cbedit; + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + selectedtext = XmTextFieldGetSelection(cbedit); + str = iupStrGetMemoryCopy(selectedtext); + XtFree(selectedtext); + return str; + } + else + return NULL; +} + +static int motListSetAppendAttrib(Ihandle* ih, const char* value) +{ + if (value && ih->data->has_editbox) + { + XmTextPosition pos; + Widget cbedit; + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + pos = XmTextFieldGetLastPosition(cbedit); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); /* disable callbacks */ + XmTextFieldInsert(cbedit, pos+1, (char*)value); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + return 0; +} + +static int motListSetSelectionAttrib(Ihandle* ih, const char* value) +{ + int start=1, end=1; + Widget cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value || iupStrEqualNoCase(value, "NONE")) + { + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XmTextFieldClearSelection(cbedit, CurrentTime); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XmTextFieldSetSelection(cbedit, (XmTextPosition)0, (XmTextPosition)XmTextFieldGetLastPosition(cbedit), CurrentTime); + return 0; + } + + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<1 || end<1) + return 0; + + start--; /* IUP starts at 1 */ + end--; + + /* end is inside the selection, in IUP is outside */ + end--; + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XmTextFieldSetSelection(cbedit, (XmTextPosition)start, (XmTextPosition)end, CurrentTime); + + return 0; +} + +static char* motListGetSelectionAttrib(Ihandle* ih) +{ + XmTextPosition start = 0, end = 0; + char* str; + Widget cbedit; + if (!ih->data->has_editbox) + return NULL; + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + if (!XmTextFieldGetSelectionPosition(cbedit, &start, &end) || start==end) + return NULL; + + str = iupStrGetMemory(100); + + /* end is inside the selection, in IUP is outside */ + end++; + + start++; /* IUP starts at 1 */ + end++; + sprintf(str, "%d:%d", (int)start, (int)end); + + return str; +} + +static int motListSetSelectionPosAttrib(Ihandle* ih, const char* value) +{ + int start=0, end=0; + Widget cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value || iupStrEqualNoCase(value, "NONE")) + { + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XmTextFieldClearSelection(cbedit, CurrentTime); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XmTextFieldSetSelection(cbedit, (XmTextPosition)0, (XmTextPosition)XmTextFieldGetLastPosition(cbedit), CurrentTime); + return 0; + } + + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<0 || end<0) + return 0; + + /* end is inside the selection, in IUP is outside */ + end--; + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XmTextFieldSetSelection(cbedit, (XmTextPosition)start, (XmTextPosition)end, CurrentTime); + + return 0; +} + +static char* motListGetSelectionPosAttrib(Ihandle* ih) +{ + XmTextPosition start = 0, end = 0; + char* str; + Widget cbedit; + if (!ih->data->has_editbox) + return NULL; + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + if (!XmTextFieldGetSelectionPosition(cbedit, &start, &end) || start==end) + return NULL; + + str = iupStrGetMemory(100); + + /* end is inside the selection, in IUP is outside */ + end++; + + sprintf(str, "%d:%d", (int)start, (int)end); + + return str; +} + +static int motListSetCaretAttrib(Ihandle* ih, const char* value) +{ + int pos = 1; + Widget cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + pos--; /* IUP starts at 1 */ + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XmTextFieldSetInsertionPosition(cbedit, (XmTextPosition)pos); + XmTextFieldShowPosition(cbedit, (XmTextPosition)pos); + + return 0; +} + +static char* motListGetCaretAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + XmTextPosition pos; + Widget cbedit; + char* str = iupStrGetMemory(50); + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + pos = XmTextFieldGetInsertionPosition(cbedit); + pos++; /* IUP starts at 1 */ + sprintf(str, "%d", (int)pos); + return str; + } + else + return NULL; +} + +static int motListSetCaretPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + Widget cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 0) pos = 0; + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XmTextFieldSetInsertionPosition(cbedit, (XmTextPosition)pos); + XmTextFieldShowPosition(cbedit, (XmTextPosition)pos); + + return 0; +} + +static char* motListGetCaretPosAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + XmTextPosition pos; + Widget cbedit; + char* str = iupStrGetMemory(50); + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + pos = XmTextFieldGetInsertionPosition(cbedit); + sprintf(str, "%d", (int)pos); + return str; + } + else + return NULL; +} + +static int motListSetScrollToAttrib(Ihandle* ih, const char* value) +{ + int pos = 1; + Widget cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 1) pos = 1; + pos--; /* return to Motif referece */ + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XmTextFieldShowPosition(cbedit, (XmTextPosition)pos); + + return 0; +} + +static int motListSetScrollToPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + Widget cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 0) pos = 0; + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XmTextFieldShowPosition(cbedit, (XmTextPosition)pos); + + return 0; +} + +static int motListSetNCAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_editbox) + return 0; + + if (!iupStrToInt(value, &ih->data->nc)) + ih->data->nc = INT_MAX; + + if (ih->handle) + { + Widget cbedit; + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XtVaSetValues(cbedit, XmNmaxLength, ih->data->nc, NULL); + } + return 0; +} + +static int motListSetClipboardAttrib(Ihandle *ih, const char *value) +{ + Widget cbedit; + if (!ih->data->has_editbox) + return 0; + + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + + if (iupStrEqualNoCase(value, "COPY")) + { + char *str = XmTextFieldGetSelection(cbedit); + + XmTextFieldCopy(cbedit, CurrentTime); + + /* do it also for the X clipboard */ + XStoreBytes(iupmot_display, str, strlen(str)+1); + XtFree(str); + } + else if (iupStrEqualNoCase(value, "CUT")) + { + char *str = XmTextFieldGetSelection(cbedit); + + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + + XmTextFieldCut(cbedit, CurrentTime); + + /* do it also for the X clipboard */ + XStoreBytes(iupmot_display, str, strlen(str)+1); + XtFree(str); + XmTextFieldRemove(cbedit); + + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + else if (iupStrEqualNoCase(value, "PASTE")) + { + int size; + char* str = XFetchBytes(iupmot_display, &size); + + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + + XmTextFieldPaste(cbedit); /* TODO: this could force 2 pastes, check in CDE */ + + /* do it also for the X clipboard */ + XmTextFieldRemove(cbedit); + XmTextFieldInsert(cbedit, XmTextFieldGetInsertionPosition(cbedit), str); + XFree(str); + + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + else if (iupStrEqualNoCase(value, "CLEAR")) + { + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + XmTextFieldRemove(cbedit); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + return 0; +} + + +/*********************************************************************************/ + + +static void motListEditModifyVerifyCallback(Widget cbedit, Ihandle *ih, XmTextVerifyPtr text) +{ + int start, end, key = 0; + char *value, *new_value, *insert_value; + KeySym motcode = 0; + IFnis cb; + + if (iupAttribGet(ih, "_IUPMOT_DISABLE_TEXT_CB")) + return; + + cb = (IFnis)IupGetCallback(ih, "EDIT_CB"); + if (!cb && !ih->data->mask) + return; + + if (text->event && text->event->type == KeyPress) + { + unsigned int state = ((XKeyEvent*)text->event)->state; + if (state & ControlMask || /* Ctrl */ + state & Mod1Mask || + state & Mod5Mask || /* Alt */ + state & Mod4Mask) /* Apple/Win */ + return; + + motcode = XKeycodeToKeysym(iupmot_display, ((XKeyEvent*)text->event)->keycode, 0); + } + + value = XmTextFieldGetString(cbedit); + start = text->startPos; + end = text->endPos; + insert_value = text->text->ptr; + + if (motcode == XK_Delete) + { + new_value = value; + iupStrRemove(value, start, end, 1); + } + else if (motcode == XK_BackSpace) + { + new_value = value; + iupStrRemove(value, start, end, -1); + } + else + { + if (!value) + new_value = iupStrDup(insert_value); + else if (insert_value) + new_value = iupStrInsert(value, insert_value, start, end); + else + new_value = value; + } + + if (insert_value && insert_value[0]!=0 && insert_value[1]==0) + key = insert_value[0]; + + if (ih->data->mask && iupMaskCheck(ih->data->mask, new_value)==0) + { + if (new_value != value) free(new_value); + XtFree(value); + text->doit = False; /* abort processing */ + return; + } + + if (cb) + { + int cb_ret = cb(ih, key, (char*)new_value); + if (cb_ret==IUP_IGNORE) + text->doit = False; /* abort processing */ + else if (cb_ret==IUP_CLOSE) + { + IupExitLoop(); + text->doit = False; /* abort processing */ + } + else if (cb_ret!=0 && key!=0 && + cb_ret != IUP_DEFAULT && cb_ret != IUP_CONTINUE) + { + insert_value[0] = (char)cb_ret; /* replace key */ + } + } + + if (new_value != value) free(new_value); + XtFree(value); +} + +static void motListEditMotionVerifyCallback(Widget w, Ihandle* ih, XmTextVerifyCallbackStruct* textverify) +{ + int pos; + + IFniii cb = (IFniii)IupGetCallback(ih, "CARET_CB"); + if (!cb) return; + + pos = textverify->newInsert; + + if (pos != ih->data->last_caret_pos) + { + ih->data->last_caret_pos = pos; + cb(ih, 1, pos+1, pos); + } + + (void)w; +} + +static void motListEditKeyPressEvent(Widget cbedit, Ihandle *ih, XKeyEvent *evt, Boolean *cont) +{ + *cont = True; + iupmotKeyPressEvent(cbedit, ih, (XEvent*)evt, cont); + if (*cont == False) + return; + + if (evt->state & ControlMask) /* Ctrl */ + { + KeySym motcode = XKeycodeToKeysym(iupmot_display, evt->keycode, 0); + if (motcode == XK_c) + { + motListSetClipboardAttrib(ih, "COPY"); + *cont = False; + return; + } + else if (motcode == XK_x) + { + motListSetClipboardAttrib(ih, "CUT"); + *cont = False; + return; + } + else if (motcode == XK_v) + { + motListSetClipboardAttrib(ih, "PASTE"); + *cont = False; + return; + } + else if (motcode == XK_a) + { + XmTextFieldSetSelection(cbedit, 0, XmTextFieldGetLastPosition(cbedit), CurrentTime); + *cont = False; + return; + } + } +} + +static void motListEditValueChangedCallback(Widget w, Ihandle* ih, XmAnyCallbackStruct* valuechanged) +{ + if (iupAttribGet(ih, "_IUPMOT_DISABLE_TEXT_CB")) + return; + + iupBaseCallValueChangedCb(ih); + + (void)valuechanged; + (void)w; +} + +static void motListDropDownPopupCallback(Widget w, Ihandle* ih, XtPointer call_data) +{ + IFni cb = (IFni)IupGetCallback(ih, "DROPDOWN_CB"); + if (cb) + cb(ih, 1); + (void)w; + (void)call_data; +} + +static void motListDropDownPopdownCallback(Widget w, Ihandle* ih, XtPointer call_data) +{ + IFni cb = (IFni)IupGetCallback(ih, "DROPDOWN_CB"); + if (cb) + cb(ih, 0); + (void)w; + (void)call_data; +} + +static void motListDefaultActionCallback(Widget w, Ihandle* ih, XmListCallbackStruct* call_data) +{ + if (call_data->event->type == ButtonPress || call_data->event->type == ButtonRelease) + { + IFnis cb = (IFnis) IupGetCallback(ih, "DBLCLICK_CB"); + if (cb) + { + int pos = call_data->item_position; /* Here Motif already starts at 1 */ + iupListSingleCallDblClickCallback(ih, cb, pos); + } + } + + (void)w; +} + +static void motListComboBoxSelectionCallback(Widget w, Ihandle* ih, XmComboBoxCallbackStruct* call_data) +{ + IFnsii cb = (IFnsii) IupGetCallback(ih, "ACTION"); + if (cb) + { + int pos = call_data->item_position; + if (pos==0) + { + /* must check if it is really checked or it is for the edit box */ + XmString* items; + XtVaGetValues(ih->handle, XmNitems, &items, NULL); + if (!XmStringCompare(call_data->item_or_text, items[0])) + return; + } + pos++; /* IUP starts at 1 */ + iupListSingleCallActionCallback(ih, cb, pos); + } + + if (!ih->data->has_editbox) + iupBaseCallValueChangedCb(ih); + + (void)w; +} + +static void motListBrowseSelectionCallback(Widget w, Ihandle* ih, XmListCallbackStruct* call_data) +{ + IFnsii cb = (IFnsii) IupGetCallback(ih, "ACTION"); + if (cb) + { + int pos = call_data->item_position; /* Here Motif already starts at 1 */ + iupListSingleCallActionCallback(ih, cb, pos); + } + + if (!ih->data->has_editbox) + iupBaseCallValueChangedCb(ih); + + (void)w; +} + +static void motListExtendedSelectionCallback(Widget w, Ihandle* ih, XmListCallbackStruct* call_data) +{ + IFns multi_cb = (IFns)IupGetCallback(ih, "MULTISELECT_CB"); + IFnsii cb = (IFnsii) IupGetCallback(ih, "ACTION"); + if (multi_cb || cb) + { + int* pos = call_data->selected_item_positions; + int sel_count = call_data->selected_item_count; + int i; + + /* In Motif, the position of item is "plus one". + "iupListMultipleCallActionCallback" works with the list of selected items from the zero position. + So, "minus one" here. */ + for (i = 0; i < sel_count; i++) + pos[i] -= 1; + + iupListMultipleCallActionCallback(ih, cb, multi_cb, pos, sel_count); + } + + if (!ih->data->has_editbox) + iupBaseCallValueChangedCb(ih); + + (void)w; +} + + +/*********************************************************************************/ + + +static int motListMapMethod(Ihandle* ih) +{ + int num_args = 0; + Arg args[30]; + Widget parent = iupChildTreeGetNativeParentHandle(ih); + char* child_id = iupDialogGetChildIdStr(ih); + + if (ih->data->is_dropdown || ih->data->has_editbox) + { + /* could not set XmNmappedWhenManaged to False because the list and the edit box where not displayed */ + /* iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); */ + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + iupmotSetArg(args, num_args, XmNmarginHeight, 0); + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + iupmotSetArg(args, num_args, XmNtraversalOn, True); + else + iupmotSetArg(args, num_args, XmNtraversalOn, False); + + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); + iupmotSetArg(args, num_args, XmNhighlightThickness, 2); + iupmotSetArg(args, num_args, XmNshadowThickness, 2); + + if (ih->data->has_editbox) + { + if (ih->data->is_dropdown) + iupmotSetArg(args, num_args, XmNcomboBoxType, XmDROP_DOWN_COMBO_BOX); /* hidden-list+edit */ + else + iupmotSetArg(args, num_args, XmNcomboBoxType, XmCOMBO_BOX); /* visible-list+edit */ + } + else + iupmotSetArg(args, num_args, XmNcomboBoxType, XmDROP_DOWN_LIST); /* hidden-list */ + + ih->handle = XtCreateManagedWidget( + child_id, /* child identifier */ + xmComboBoxWidgetClass, /* widget class */ + parent, /* widget parent */ + args, num_args); + } + else + { + Widget sb_win; + + /* Create the scrolled window */ + + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNscrollingPolicy, XmAPPLICATION_DEFINED); + iupmotSetArg(args, num_args, XmNvisualPolicy, XmVARIABLE); + iupmotSetArg(args, num_args, XmNscrollBarDisplayPolicy, XmSTATIC); /* can NOT be XmAS_NEEDED because XmAPPLICATION_DEFINED */ + iupmotSetArg(args, num_args, XmNspacing, 0); /* no space between scrollbars and text */ + iupmotSetArg(args, num_args, XmNborderWidth, 0); + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + + sb_win = XtCreateManagedWidget( + child_id, /* child identifier */ + xmScrolledWindowWidgetClass, /* widget class */ + parent, /* widget parent */ + args, num_args); + + if (!sb_win) + return IUP_ERROR; + + parent = sb_win; + child_id = "list"; + + /* Create the list */ + + num_args = 0; + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + iupmotSetArg(args, num_args, XmNtraversalOn, True); + else + iupmotSetArg(args, num_args, XmNtraversalOn, False); + + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); + iupmotSetArg(args, num_args, XmNhighlightThickness, 2); + iupmotSetArg(args, num_args, XmNshadowThickness, 2); + + iupmotSetArg(args, num_args, XmNlistMarginHeight, 0); /* default padding */ + iupmotSetArg(args, num_args, XmNlistMarginWidth, 0); + iupmotSetArg(args, num_args, XmNlistSpacing, 0); + iupmotSetArg(args, num_args, XmNlistSizePolicy, XmCONSTANT); /* don't grow to fit, add scrollbar */ + + if (ih->data->is_multiple) + iupmotSetArg(args, num_args, XmNselectionPolicy, XmEXTENDED_SELECT); + else + iupmotSetArg(args, num_args, XmNselectionPolicy, XmBROWSE_SELECT); + + if (iupAttribGetBoolean(ih, "AUTOHIDE")) + iupmotSetArg(args, num_args, XmNscrollBarDisplayPolicy, XmAS_NEEDED); + else + iupmotSetArg(args, num_args, XmNscrollBarDisplayPolicy, XmSTATIC); + + ih->handle = XtCreateManagedWidget( + child_id, /* child identifier */ + xmListWidgetClass, /* widget class */ + parent, /* widget parent */ + args, num_args); + } + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + if (ih->data->is_dropdown || ih->data->has_editbox) + { + Widget cbedit, cblist; + XtVaGetValues(ih->handle, XmNtextField, &cbedit, NULL); + XtVaGetValues(ih->handle, XmNlist, &cblist, NULL); + + XtAddEventHandler(cbedit, FocusChangeMask, False, (XtEventHandler)iupmotFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(cbedit, EnterWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(cbedit, LeaveWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddCallback(cbedit, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + + XtAddCallback(ih->handle, XmNselectionCallback, (XtCallbackProc)motListComboBoxSelectionCallback, (XtPointer)ih); + + if (ih->data->has_editbox) + { + XtAddEventHandler(cbedit, KeyPressMask, False, (XtEventHandler)motListEditKeyPressEvent, (XtPointer)ih); + XtAddCallback(cbedit, XmNmodifyVerifyCallback, (XtCallbackProc)motListEditModifyVerifyCallback, (XtPointer)ih); + XtAddCallback(cbedit, XmNmotionVerifyCallback, (XtCallbackProc)motListEditMotionVerifyCallback, (XtPointer)ih); + XtAddCallback(cbedit, XmNvalueChangedCallback, (XtCallbackProc)motListEditValueChangedCallback, (XtPointer)ih); + + /* Disable Drag Source */ + iupmotDisableDragSource(cbedit); + } + else + XtAddEventHandler(cbedit, KeyPressMask, False, (XtEventHandler)iupmotKeyPressEvent, (XtPointer)ih); + + if (ih->data->is_dropdown) + { + XtVaSetValues(ih->handle, XmNvisibleItemCount, 5, NULL); + XtAddCallback(XtParent(XtParent(cblist)), XmNpopupCallback, (XtCallbackProc)motListDropDownPopupCallback, (XtPointer)ih); + XtAddCallback(XtParent(XtParent(cblist)), XmNpopdownCallback, (XtCallbackProc)motListDropDownPopdownCallback, (XtPointer)ih); + } + else + { + XtAddCallback(cblist, XmNdefaultActionCallback, (XtCallbackProc)motListDefaultActionCallback, (XtPointer)ih); + XtAddEventHandler(cblist, PointerMotionMask, False, (XtEventHandler)iupmotPointerMotionEvent, (XtPointer)ih); + XtAddEventHandler(cblist, ButtonPressMask|ButtonReleaseMask, False, (XtEventHandler)iupmotButtonPressReleaseEvent, (XtPointer)ih); + + /* Disable Drag Source */ + iupmotDisableDragSource(cblist); + } + } + else + { + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)parent); + XtVaSetValues(parent, XmNworkWindow, ih->handle, NULL); + + XtAddEventHandler(ih->handle, FocusChangeMask, False, (XtEventHandler)iupmotFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, EnterWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, LeaveWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, KeyPressMask, False, (XtEventHandler)iupmotKeyPressEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, PointerMotionMask, False, (XtEventHandler)iupmotPointerMotionEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, ButtonPressMask|ButtonReleaseMask, False, (XtEventHandler)iupmotButtonPressReleaseEvent, (XtPointer)ih); + + XtAddCallback(ih->handle, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + XtAddCallback (ih->handle, XmNbrowseSelectionCallback, (XtCallbackProc)motListBrowseSelectionCallback, (XtPointer)ih); + XtAddCallback (ih->handle, XmNextendedSelectionCallback, (XtCallbackProc)motListExtendedSelectionCallback, (XtPointer)ih); + XtAddCallback (ih->handle, XmNdefaultActionCallback, (XtCallbackProc)motListDefaultActionCallback, (XtPointer)ih); + } + + /* Disable Drag Source */ + iupmotDisableDragSource(ih->handle); + + /* initialize the widget */ + if (ih->data->is_dropdown || ih->data->has_editbox) + XtRealizeWidget(ih->handle); + else + XtRealizeWidget(parent); + + if (IupGetGlobal("_IUP_RESET_TXTCOLORS")) + { + iupmotSetGlobalColorAttrib(ih->handle, XmNbackground, "TXTBGCOLOR"); + iupmotSetGlobalColorAttrib(ih->handle, XmNforeground, "TXTFGCOLOR"); + IupSetGlobal("_IUP_RESET_TXTCOLORS", NULL); + } + + IupSetCallback(ih, "_IUP_XY2POS_CB", (Icallback)motListConvertXYToPos); + + iupListSetInitialItems(ih); + + return IUP_NOERROR; +} + +void iupdrvListInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motListMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, motListSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, motListSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTFGCOLOR", IUPAF_DEFAULT); + + /* IupList only */ + iupClassRegisterAttributeId(ic, "IDVALUE", motListGetIdValueAttrib, iupListSetIdValueAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE", motListGetValueAttrib, motListSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VISIBLE_ITEMS", NULL, motListSetVisibleItemsAttrib, IUPAF_SAMEASSYSTEM, "5", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "TOPITEM", NULL, motListSetTopItemAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWDROPDOWN", NULL, motListSetShowDropdownAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPACING", iupListGetSpacingAttrib, motListSetSpacingAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + + iupClassRegisterAttribute(ic, "PADDING", iupListGetPaddingAttrib, motListSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "SELECTEDTEXT", motListGetSelectedTextAttrib, motListSetSelectedTextAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTION", motListGetSelectionAttrib, motListSetSelectionAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTIONPOS", motListGetSelectionPosAttrib, motListSetSelectionPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARET", motListGetCaretAttrib, motListSetCaretAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARETPOS", motListGetCaretPosAttrib, motListSetCaretPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "INSERT", NULL, motListSetInsertAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "APPEND", NULL, motListSetAppendAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "READONLY", motListGetReadOnlyAttrib, motListSetReadOnlyAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "NC", iupListGetNCAttrib, motListSetNCAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "CLIPBOARD", NULL, motListSetClipboardAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTO", NULL, motListSetScrollToAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTOPOS", NULL, motListSetScrollToPosAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); +} diff --git a/iup/src/mot/iupmot_loop.c b/iup/src/mot/iupmot_loop.c new file mode 100755 index 0000000..828ddcd --- /dev/null +++ b/iup/src/mot/iupmot_loop.c @@ -0,0 +1,108 @@ +/** \file + * \brief Motif Message Loop + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iupmot_drv.h" + + +/* local variables */ +static int mot_mainloop = 0; +static int mot_exitmainloop = 0; +static IFidle mot_idle_cb = NULL; +static XtWorkProcId mot_idle_id; + + +static Boolean motIdlecbWorkProc(XtPointer client_data) +{ + (void)client_data; + if (mot_idle_cb) + { + int ret = mot_idle_cb(); + if (ret == IUP_CLOSE) + { + mot_idle_cb = NULL; + IupExitLoop(); + return True; /* removes the working procedure */ + } + if (ret == IUP_IGNORE) + { + mot_idle_cb = NULL; + return True; /* removes the working procedure */ + } + + return False; /* keeps the working procedure */ + } + + return True; /* removes the working procedure */ +} + +void iupdrvSetIdleFunction(Icallback f) +{ + if (mot_idle_cb) + XtRemoveWorkProc(mot_idle_id); + + mot_idle_cb = (IFidle)f; + + if (mot_idle_cb) + mot_idle_id = XtAppAddWorkProc(iupmot_appcontext, motIdlecbWorkProc, NULL); +} + +static int motLoopStep(void) +{ + XtAppProcessEvent(iupmot_appcontext, XtIMAll); + return (mot_exitmainloop)? IUP_CLOSE : IUP_DEFAULT; +} + +void IupExitLoop(void) +{ + mot_exitmainloop = 1; +} + +int IupMainLoopLevel(void) +{ + return mot_mainloop; +} + +int IupMainLoop(void) +{ + mot_mainloop++; + mot_exitmainloop = 0; + + while (!mot_exitmainloop) + { + if (motLoopStep() == IUP_CLOSE) + break; + } + + mot_exitmainloop = 0; + mot_mainloop--; + return IUP_NOERROR; +} + +int IupLoopStep(void) +{ + if (!XtAppPending(iupmot_appcontext)) + return IUP_DEFAULT; + + return motLoopStep(); +} + +void IupFlush(void) +{ + while (XPending(iupmot_display) != 0) + { + if (motLoopStep() == IUP_CLOSE) + break; + } + + XFlush(iupmot_display); +} diff --git a/iup/src/mot/iupmot_menu.c b/iup/src/mot/iupmot_menu.c new file mode 100755 index 0000000..be9b953 --- /dev/null +++ b/iup/src/mot/iupmot_menu.c @@ -0,0 +1,457 @@ +/** \file + * \brief Menu Resources + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_label.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_image.h" +#include "iup_menu.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +static int mot_menu_exitloop = 0; + +int iupdrvMenuPopup(Ihandle* ih, int x, int y) +{ + XButtonEvent ev; + ev.x_root = x; + ev.y_root = y; + XmMenuPosition(ih->handle, &ev); + + XtManageChild(ih->handle); + + mot_menu_exitloop = 0; + while (!mot_menu_exitloop) + XtAppProcessEvent(iupmot_appcontext, XtIMAll); + mot_menu_exitloop = 0; + + return IUP_NOERROR; +} + +int iupdrvMenuGetMenuBarSize(Ihandle* ih) +{ + int ch; + iupdrvFontGetCharSize(ih, NULL, &ch); + return 5 + ch + 5; +} + + +/*******************************************************************************************/ + + +static void motItemActivateCallback(Widget w, Ihandle* ih, XtPointer call_data) +{ + Icallback cb; + + if (XmIsToggleButton(ih->handle) && !iupAttribGetBoolean(ih, "AUTOTOGGLE") && !iupAttribGetBoolean(ih->parent, "RADIO")) + { + /* Motif by default will do autotoggle */ + XmToggleButtonSetState(ih->handle, !XmToggleButtonGetState(ih->handle),0); + } + + cb = IupGetCallback(ih, "ACTION"); + if (cb && cb(ih)==IUP_CLOSE) + IupExitLoop(); + + (void)w; + (void)call_data; +} + +static void motItemArmCallback(Widget w, Ihandle* ih, XtPointer call_data) +{ + Icallback cb = IupGetCallback(ih, "HIGHLIGHT_CB"); + if (cb) + cb(ih); + + (void)w; + (void)call_data; +} + +static void motMenuMapCallback(Widget w, Ihandle* ih, XtPointer call_data) +{ + Icallback cb = IupGetCallback(ih, "OPEN_CB"); + if (!cb && ih->parent) cb = (Icallback)IupGetCallback(ih->parent, "OPEN_CB"); /* check also in the Submenu */ + if (cb) cb(ih); + + (void)w; + (void)call_data; +} + +static void motMenuUnmapCallback(Widget w, Ihandle* ih, XtPointer call_data) +{ + Icallback cb = IupGetCallback(ih, "MENUCLOSE_CB"); + if (!cb && ih->parent) cb = (Icallback)IupGetCallback(ih->parent, "MENUCLOSE_CB"); /* check also in the Submenu */ + if (cb) cb(ih); + + (void)w; + (void)call_data; +} + +static void motPopupMenuUnmapCallback(Widget w, Ihandle* ih, XtPointer call_data) +{ + motMenuUnmapCallback(w, ih, call_data); + mot_menu_exitloop = 1; +} + + +/*******************************************************************************************/ + + +static void motMenuUnMapMethod(Ihandle* ih) +{ + if (iupMenuIsMenuBar(ih)) + XtDestroyWidget(ih->handle); + else + XtDestroyWidget(XtParent(ih->handle)); /* in this case the RowColumn widget is a child of a MenuShell. */ +} + +static int motMenuMapMethod(Ihandle* ih) +{ + int num_args = 0; + Arg args[30]; + + if (iupMenuIsMenuBar(ih)) + { + /* top level menu used for MENU attribute in IupDialog (a menu bar) */ + + ih->handle = XtVaCreateManagedWidget( + iupMenuGetChildIdStr(ih), + xmRowColumnWidgetClass, + iupChildTreeGetNativeParentHandle(ih), + XmNrowColumnType, XmMENU_BAR, + XmNmarginHeight, 0, + XmNmarginWidth, 0, + XmNresizeWidth, False, + NULL); + if (!ih->handle) + return IUP_ERROR; + } + else + { + /* all XmCreate* functions here, also create RowColumn Widgets. */ + + if (ih->parent) + { + /* parent is a submenu */ + + if (iupAttribGetBoolean(ih, "RADIO")) + { + iupmotSetArg(args, num_args, XmNpacking, XmPACK_COLUMN); + iupmotSetArg(args, num_args, XmNradioBehavior, TRUE); + } + + ih->handle = XmCreatePulldownMenu( + ih->parent->handle, + iupMenuGetChildIdStr(ih), + args, + num_args); + if (!ih->handle) + return IUP_ERROR; + + /* update the CascadeButton */ + XtVaSetValues(ih->parent->handle, XmNsubMenuId, ih->handle, NULL); + + XtAddCallback(ih->handle, XmNmapCallback, (XtCallbackProc)motMenuMapCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNunmapCallback, (XtCallbackProc)motMenuUnmapCallback, (XtPointer)ih); + } + else + { + /* top level menu used for IupPopup */ + + iupmotSetArg(args, num_args, XmNpopupEnabled, XmPOPUP_AUTOMATIC); + + ih->handle = XmCreatePopupMenu( + iupmot_appshell, + iupMenuGetChildIdStr(ih), + args, + num_args); + if (!ih->handle) + return IUP_ERROR; + + XtAddCallback(ih->handle, XmNmapCallback, (XtCallbackProc)motMenuMapCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNunmapCallback, (XtCallbackProc)motPopupMenuUnmapCallback, (XtPointer)ih); + } + } + + ih->serial = iupMenuGetChildId(ih); /* must be after using the string */ + + return IUP_NOERROR; +} + +void iupdrvMenuInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motMenuMapMethod; + ic->UnMap = motMenuUnMapMethod; + + /* Used by iupdrvMenuGetMenuBarSize */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, NULL, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_DEFAULT); /* use inheritance to retrieve standard fonts */ + + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); +} + + +/*******************************************************************************************/ + + +static int motItemSetTitleImageAttrib(Ihandle* ih, const char* value) +{ + iupmotSetPixmap(ih, value, XmNlabelPixmap, 0); + return 1; +} + +static int motItemSetTitleAttrib(Ihandle* ih, const char* value) +{ + char *str; + + if (!value) + { + str = " "; + value = str; + } + else + str = iupMenuProcessTitle(ih, value); + + if (XmIsToggleButton(ih->handle)) + { + char *p = strchr(str, '\t'); + if (p) + { + int offset = (p-str); + char* new_value = iupStrDup(str); + char* acc_value = new_value + offset + 1; + new_value[offset] = 0; + iupmotSetMnemonicTitle(ih, new_value); + iupmotSetString(ih->handle, XmNacceleratorText, acc_value); + free(new_value); + + if (str != value) free(str); + return 1; + } + } + + iupmotSetMnemonicTitle(ih, str); + + if (str != value) free(str); + return 1; +} + +static int motItemSetValueAttrib(Ihandle* ih, const char* value) +{ + if (XmIsToggleButton(ih->handle)) + { + if (iupAttribGetBoolean(ih->parent, "RADIO")) + value = "ON"; + + XmToggleButtonSetState(ih->handle, iupStrBoolean(value),0); + } + return 0; +} + +static char* motItemGetValueAttrib(Ihandle* ih) +{ + if (XmIsToggleButton(ih->handle) && XmToggleButtonGetState(ih->handle)) + return "ON"; + else + return "OFF"; +} + +static int motItemMapMethod(Ihandle* ih) +{ + int pos; + + if (!ih->parent) + return IUP_ERROR; + + /* Menu bar can contain only CascadeButtons */ + if (iupMenuIsMenuBar(ih->parent)) + { + ih->handle = XtVaCreateManagedWidget( + iupMenuGetChildIdStr(ih), + xmCascadeButtonWidgetClass, + ih->parent->handle, + NULL); + + XtAddCallback(ih->handle, XmNactivateCallback, (XtCallbackProc)motItemActivateCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNcascadingCallback, (XtCallbackProc)motItemArmCallback, (XtPointer)ih); + } + else + { + int num_args = 0; + Arg args[10]; + + if (iupAttribGetBoolean(ih->parent, "RADIO")) + { + iupmotSetArg(args, num_args, XmNtoggleMode, XmTOGGLE_BOOLEAN); + iupmotSetArg(args, num_args, XmNindicatorType, XmONE_OF_MANY_ROUND); + iupmotSetArg(args, num_args, XmNindicatorOn, XmINDICATOR_CHECK_BOX); + iupmotSetArg(args, num_args, XmNindicatorSize, 13); + iupmotSetArg(args, num_args, XmNselectColor, iupmotColorGetPixel(0, 0, 0)); + } + else + { + if (iupAttribGetBoolean(ih, "HIDEMARK")) + iupmotSetArg(args, num_args, XmNindicatorOn, XmINDICATOR_NONE); + else + iupmotSetArg(args, num_args, XmNindicatorOn, XmINDICATOR_CHECK); + iupmotSetArg(args, num_args, XmNlabelType, iupAttribGet(ih, "TITLEIMAGE")? XmPIXMAP: XmSTRING); + } + + ih->handle = XtCreateManagedWidget( + iupMenuGetChildIdStr(ih), + xmToggleButtonWidgetClass, + ih->parent->handle, + args, + num_args); + + XtAddCallback(ih->handle, XmNvalueChangedCallback, (XtCallbackProc)motItemActivateCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNarmCallback, (XtCallbackProc)motItemArmCallback, (XtPointer)ih); + } + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupMenuGetChildId(ih); /* must be after using the string */ + + XtAddCallback (ih->handle, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + + pos = IupGetChildPos(ih->parent, ih); + XtVaSetValues(ih->handle, XmNpositionIndex, pos, NULL); /* RowColumn Constraint */ + + iupUpdateStandardFontAttrib(ih); + + return IUP_NOERROR; +} + +void iupdrvItemInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motItemMapMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, iupdrvSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); /* use inheritance to retrieve standard fonts */ + + /* Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iupBaseSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* IupItem only */ + iupClassRegisterAttribute(ic, "VALUE", motItemGetValueAttrib, motItemSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TITLE", NULL, motItemSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TITLEIMAGE", NULL, motItemSetTitleImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupItem Gtk and Motif only */ + iupClassRegisterAttribute(ic, "HIDEMARK", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED); +} + + +/*******************************************************************************************/ + + +static int motSubmenuMapMethod(Ihandle* ih) +{ + int pos; + + if (!ih->parent) + return IUP_ERROR; + + ih->handle = XtVaCreateManagedWidget( + iupMenuGetChildIdStr(ih), + xmCascadeButtonWidgetClass, + ih->parent->handle, + NULL); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupMenuGetChildId(ih); /* must be after using the string */ + + pos = IupGetChildPos(ih->parent, ih); + XtVaSetValues(ih->handle, XmNpositionIndex, pos, NULL); /* RowColumn Constraint */ + + XtAddCallback(ih->handle, XmNcascadingCallback, (XtCallbackProc)motItemArmCallback, (XtPointer)ih); + + iupUpdateStandardFontAttrib(ih); + + return IUP_NOERROR; +} + +void iupdrvSubmenuInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motSubmenuMapMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + /* Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, iupdrvSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); /* use inheritance to retrieve standard fonts */ + + /* Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iupBaseSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* IupSubmenu only */ + iupClassRegisterAttribute(ic, "TITLE", NULL, motItemSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); +} + + +/*******************************************************************************************/ + + +static int motSeparatorMapMethod(Ihandle* ih) +{ + int pos; + + if (!ih->parent) + return IUP_ERROR; + + ih->handle = XtVaCreateManagedWidget( + iupMenuGetChildIdStr(ih), + xmSeparatorWidgetClass, + ih->parent->handle, + NULL); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupMenuGetChildId(ih); /* must be after using the string */ + + pos = IupGetChildPos(ih->parent, ih); + XtVaSetValues(ih->handle, XmNpositionIndex, pos, NULL); /* RowColumn Constraint */ + + return IUP_NOERROR; +} + +void iupdrvSeparatorInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motSeparatorMapMethod; + ic->UnMap = iupdrvBaseUnMapMethod; + + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); +} diff --git a/iup/src/mot/iupmot_messagedlg.c b/iup/src/mot/iupmot_messagedlg.c new file mode 100755 index 0000000..6660503 --- /dev/null +++ b/iup/src/mot/iupmot_messagedlg.c @@ -0,0 +1,191 @@ +/** \file + * \brief Motif IupMessageDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drvinfo.h" +#include "iup_dialog.h" +#include "iup_strmessage.h" + +#include "iupmot_drv.h" + + +static void motMessageDlgDeleteWindowCallback(Widget w, XtPointer client_data, XtPointer call_data) +{ + Ihandle *ih = (Ihandle*)client_data; + if (!ih) return; + (void)call_data; + (void)w; + if (iupStrEqualNoCase(iupAttribGetStr(ih, "BUTTONS"), "OK")) + iupAttribSetStr(ih, "BUTTONRESPONSE", "1"); + else + iupAttribSetStr(ih, "BUTTONRESPONSE", "2"); + iupAttribSetStr(ih, "_IUP_WM_DELETE", "1"); +} + +static void motMessageDlgCallback(Widget w, Ihandle* ih, XmAnyCallbackStruct* call_data) +{ + (void)w; + if (call_data->reason == XmCR_OK) + iupAttribSetStr(ih, "BUTTONRESPONSE", "1"); + else if (call_data->reason == XmCR_CANCEL) + iupAttribSetStr(ih, "BUTTONRESPONSE", "2"); +} + +static void motMessageDlgHelpCallback(Widget w, XtPointer client_data, XtPointer call_data) +{ + Ihandle *ih = (Ihandle*)client_data; + Icallback cb = (Icallback)IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + { + if (iupStrEqualNoCase(iupAttribGetStr(ih, "BUTTONS"), "OK")) + iupAttribSetStr(ih, "BUTTONRESPONSE", "1"); + else + iupAttribSetStr(ih, "BUTTONRESPONSE", "2"); + } + + (void)call_data; + (void)w; +} + +static int motMessageDlgPopup(Ihandle* ih, int x, int y) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + Widget msgbox, dialog; + int style = XmDIALOG_FULL_APPLICATION_MODAL; + int type = XmDIALOG_MESSAGE; + int num_but = 2; + char *value; + + iupAttribSetInt(ih, "_IUPDLG_X", x); /* used in iupDialogUpdatePosition */ + iupAttribSetInt(ih, "_IUPDLG_Y", y); + + if (parent) + { + msgbox = XmCreateMessageDialog(parent, "messagedialog", NULL, 0); + dialog = XtParent(msgbox); + } + else + { + dialog = XtAppCreateShell(NULL, "messagedialog", topLevelShellWidgetClass, iupmot_display, NULL, 0); + msgbox = XmCreateMessageBox(dialog, "messagebox", NULL, 0); + style = XmDIALOG_MODELESS; + XtVaSetValues(dialog, + XmNmwmInputMode, MWM_INPUT_FULL_APPLICATION_MODAL, + XmNmappedWhenManaged, False, + XmNsaveUnder, True, + NULL); + } + if (!msgbox) + return IUP_NOERROR; + + value = iupAttribGetStr(ih, "DIALOGTYPE"); + if (iupStrEqualNoCase(value, "ERROR")) + type = XmDIALOG_ERROR; + else if (iupStrEqualNoCase(value, "WARNING")) + type = XmDIALOG_WARNING; + else if (iupStrEqualNoCase(value, "INFORMATION")) + type = XmDIALOG_INFORMATION; + else if (iupStrEqualNoCase(value, "QUESTION")) + type = XmDIALOG_QUESTION; + + + value = iupAttribGet(ih, "TITLE"); + if (value) + iupmotSetString(msgbox, XmNdialogTitle, value); + else + { + if (parent) + { + XmString title; + XtVaGetValues(parent, XmNdialogTitle, &title, NULL); + XtVaSetValues(msgbox, XmNdialogTitle, title, NULL); + } + } + + value = iupAttribGet(ih, "VALUE"); + if (value) + iupmotSetString(msgbox, XmNmessageString, value); + + XtVaSetValues(msgbox, + XmNdialogType, type, + XmNdialogStyle, style, + XmNautoUnmanage, False, + XmNnoResize, True, + NULL); + + value = iupAttribGetStr(ih, "BUTTONS"); + if (iupStrEqualNoCase(value, "OK")) + { + XtUnmanageChild(XmMessageBoxGetChild(msgbox, XmDIALOG_CANCEL_BUTTON)); + num_but = 1; + } + else if (iupStrEqualNoCase(value, "YESNO")) + { + iupmotSetString(msgbox, XmNokLabelString, iupStrMessageGet("IUP_YES")); + iupmotSetString(msgbox, XmNcancelLabelString, iupStrMessageGet("IUP_NO")); + } + + if (!IupGetCallback(ih, "HELP_CB")) + XtUnmanageChild(XmMessageBoxGetChild(msgbox, XmDIALOG_HELP_BUTTON)); + + if (num_but == 2 && iupAttribGetInt(ih, "BUTTONDEFAULT") == 2) + XtVaSetValues(msgbox, XmNdefaultButtonType, XmDIALOG_CANCEL_BUTTON, NULL); + else + XtVaSetValues(msgbox, XmNdefaultButtonType, XmDIALOG_OK_BUTTON, NULL); + + XtAddCallback(msgbox, XmNokCallback, (XtCallbackProc)motMessageDlgCallback, (XtPointer)ih); + XtAddCallback(msgbox, XmNcancelCallback, (XtCallbackProc)motMessageDlgCallback, (XtPointer)ih); + XtAddCallback(msgbox, XmNhelpCallback, (XtCallbackProc)motMessageDlgHelpCallback, (XtPointer)ih); + + XmAddWMProtocolCallback(dialog, iupmot_wm_deletewindow, motMessageDlgDeleteWindowCallback, (XtPointer)ih); + XtManageChild(msgbox); + + XtRealizeWidget(dialog); + ih->handle = dialog; + iupDialogUpdatePosition(ih); + ih->handle = NULL; /* reset handle */ + + if (style == XmDIALOG_MODELESS) + XtPopup(dialog, XtGrabExclusive); + + /* while the user hasn't provided an answer, simulate main loop. + ** The answer changes as soon as the user selects one of the + ** buttons and the callback routine changes its value. */ + iupAttribSetStr(ih, "BUTTONRESPONSE", NULL); + while (iupAttribGet(ih, "BUTTONRESPONSE") == NULL) + XtAppProcessEvent(iupmot_appcontext, XtIMAll); + + if (!iupAttribGet(ih, "_IUP_WM_DELETE")) + { + XtUnmanageChild(msgbox); + + if (style == XmDIALOG_MODELESS) + { + XtPopdown(dialog); + XtDestroyWidget(dialog); + } + } + + return IUP_NOERROR; +} + +void iupdrvMessageDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = motMessageDlgPopup; +} diff --git a/iup/src/mot/iupmot_open.c b/iup/src/mot/iupmot_open.c new file mode 100755 index 0000000..a59dbff --- /dev/null +++ b/iup/src/mot/iupmot_open.c @@ -0,0 +1,141 @@ +/** \file + * \brief Motif Open/Close + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_globalattrib.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +/* global variables */ +Widget iupmot_appshell = 0; +Display* iupmot_display = 0; +int iupmot_screen = 0; +Visual* iupmot_visual = 0; +XtAppContext iupmot_appcontext = 0; + +void* iupdrvGetDisplay(void) +{ + return iupmot_display; +} + +void iupmotSetGlobalColorAttrib(Widget w, const char* xmname, const char* name) +{ + unsigned char r, g, b; + Pixel color; + + XtVaGetValues(w, xmname, &color, NULL); + iupmotColorGetRGB(color, &r, &g, &b); + + iupGlobalSetDefaultColorAttrib(name, r, g, b); +} + +int iupdrvOpen(int *argc, char ***argv) +{ + IupSetGlobal("DRIVER", "Motif"); + + /* XtSetLanguageProc(NULL, NULL, NULL); + Removed to avoid invalid locale in modern Linux that set LANG=en_US.UTF-8 */ + + /* We do NOT use XtVaOpenApplication because it crashes when using internal dummy argc and argv. + iupmot_appshell = XtVaOpenApplication(&iupmot_appcontext, "Iup", NULL, 0, argc, *argv, NULL, + sessionShellWidgetClass, NULL); */ + + XtToolkitInitialize(); + + iupmot_appcontext = XtCreateApplicationContext(); + + iupmot_display = XtOpenDisplay(iupmot_appcontext, NULL, NULL, "Iup", NULL, 0, argc, *argv); + if (!iupmot_display) + { + fprintf (stderr, "IUP error: cannot open display.\n"); + return IUP_ERROR; + } + + iupmot_appshell = XtAppCreateShell(NULL, "Iup", sessionShellWidgetClass, iupmot_display, NULL, 0); + if (!iupmot_appshell) + { + fprintf(stderr, "IUP error: cannot create shell.\n"); + return IUP_ERROR; + } + IupSetGlobal("APPSHELL", (char*)iupmot_appshell); + + IupStoreGlobal("SYSTEMLANGUAGE", setlocale(LC_ALL, NULL)); + + iupmot_screen = XDefaultScreen(iupmot_display); + + IupSetGlobal("XDISPLAY", (char*)iupmot_display); + IupSetGlobal("XSCREEN", (char*)iupmot_screen); + + /* screen depth can be 8bpp, but canvas can be 24bpp */ + { + XVisualInfo vinfo; + if (XMatchVisualInfo(iupmot_display, iupmot_screen, 24, TrueColor, &vinfo) || + XMatchVisualInfo(iupmot_display, iupmot_screen, 16, TrueColor, &vinfo)) + { + iupmot_visual = vinfo.visual; + IupSetGlobal("TRUECOLORCANVAS", "YES"); + } + else + { + iupmot_visual = DefaultVisual(iupmot_display, iupmot_screen); + IupSetGlobal("TRUECOLORCANVAS", "NO"); + } + } + + /* driver system version */ + { + int major = xmUseVersion/1000; + int minor = xmUseVersion - major * 1000; + IupSetfAttribute(NULL, "MOTIFVERSION", "%d.%d", major, minor); + IupSetfAttribute(NULL, "MOTIFNUMBER", "%d", (XmVERSION * 1000 + XmREVISION * 100 + XmUPDATE_LEVEL)); + + IupSetGlobal("XSERVERVENDOR", ServerVendor(iupmot_display)); + IupSetfAttribute(NULL, "XVENDORRELEASE", "%d", VendorRelease(iupmot_display)); + } + + iupmotColorInit(); + + /* dialog background color */ + { + iupmotSetGlobalColorAttrib(iupmot_appshell, XmNbackground, "DLGBGCOLOR"); + iupGlobalSetDefaultColorAttrib("DLGFGCOLOR", 0, 0, 0); + IupSetGlobal("_IUP_RESET_DLGBGCOLOR", "YES"); /* will update the DLGFGCOLOR when the first dialog is mapped */ + + iupGlobalSetDefaultColorAttrib("TXTBGCOLOR", 255, 255, 255); + iupGlobalSetDefaultColorAttrib("TXTFGCOLOR", 0, 0, 0); + IupSetGlobal("_IUP_RESET_TXTCOLORS", "YES"); /* will update the TXTCOLORS when the first text or list is mapped */ + } + + if (getenv("IUP_DEBUG")) + XSynchronize(iupmot_display, 1); + + return IUP_NOERROR; +} + +void iupdrvClose(void) +{ + iupmotColorFinish(); + iupmotTipsFinish(); + + if (iupmot_appshell) + XtDestroyWidget(iupmot_appshell); + + if (iupmot_appcontext) + XtDestroyApplicationContext(iupmot_appcontext); +} diff --git a/iup/src/mot/iupmot_progressbar.c b/iup/src/mot/iupmot_progressbar.c new file mode 100755 index 0000000..7266d38 --- /dev/null +++ b/iup/src/mot/iupmot_progressbar.c @@ -0,0 +1,165 @@ +/** \file +* \brief Progress bar Control +* +* See Copyright Notice in "iup.h" +*/ + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_progressbar.h" +#include "iup_drv.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +static int motProgressBarSetValueAttrib(Ihandle* ih, const char* value) +{ + if (!value) + ih->data->value = 0; + else + ih->data->value = atof(value); + iProgressBarCropValue(ih); + + XtVaSetValues(ih->handle, XmNvalue, (int)(SHRT_MAX * (ih->data->value - ih->data->vmin) / (ih->data->vmax - ih->data->vmin)), NULL); + + return 0; +} + +static int motProgressBarSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (!iupAttribGetStr(ih, "FGCOLOR")) + { + Pixel color; + unsigned char r, g, b; + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + r = (r*8)/10; + g = (g*8)/10; + b = (b*8)/10; + + color = iupmotColorGetPixel(r, g, b); + if (color != (Pixel)-1) + { + Widget w = XtNameToWidget(ih->handle, "*Scrollbar"); + XtVaSetValues(w, XmNtroughColor, color, NULL); + } + } + + return iupdrvBaseSetBgColorAttrib(ih, value); +} + + +static int motProgressBarSetFgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + Widget w = XtNameToWidget(ih->handle, "*Scrollbar"); + XtVaSetValues(w, XmNtroughColor, color, NULL); + } + + return 1; +} + +static void motProgressBarLayoutUpdateMethod(Ihandle *ih) +{ + unsigned char orientation; + XtVaGetValues(ih->handle, XmNorientation, &orientation, NULL); + + if (orientation == XmVERTICAL) + XtVaSetValues(ih->handle, XmNscaleWidth, ih->currentwidth, NULL); + else + XtVaSetValues(ih->handle, XmNscaleHeight, ih->currentheight, NULL); + + iupdrvBaseLayoutUpdateMethod(ih); +} + +static int motProgressBarMapMethod(Ihandle* ih) +{ + int num_args = 0; + Arg args[30]; + + /* Core */ + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + /* Primitive */ + iupmotSetArg(args, num_args, XmNtraversalOn, False); + iupmotSetArg(args, num_args, XmNhighlightThickness, 0); + /* Scale */ + iupmotSetArg(args, num_args, XmNminimum, 0); + iupmotSetArg(args, num_args, XmNmaximum, SHRT_MAX); + iupmotSetArg(args, num_args, XmNslidingMode, XmTHERMOMETER); /* thermometer effect */ + iupmotSetArg(args, num_args, XmNsliderMark, XmNONE); + iupmotSetArg(args, num_args, XmNeditable, False); + iupmotSetArg(args, num_args, XmNshowValue, XmNONE); + + if (iupStrEqualNoCase(iupAttribGetStr(ih, "ORIENTATION"), "VERTICAL")) + { + iupmotSetArg(args, num_args, XmNorientation, XmVERTICAL); + + if (ih->currentheight < ih->currentwidth) + { + int tmp = ih->currentheight; + ih->currentheight = ih->currentwidth; + ih->currentwidth = tmp; + } + } + else + iupmotSetArg(args, num_args, XmNorientation, XmHORIZONTAL); + + ih->handle = XtCreateManagedWidget( + iupDialogGetChildIdStr(ih), /* child identifier */ + xmScaleWidgetClass, /* widget class */ + iupChildTreeGetNativeParentHandle(ih), /* widget parent */ + args, num_args); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + /* initialize the widget */ + XtRealizeWidget(ih->handle); + + return IUP_NOERROR; +} + +void iupdrvProgressBarInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motProgressBarMapMethod; + ic->LayoutUpdate = motProgressBarLayoutUpdateMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, motProgressBarSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, motProgressBarSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + + /* IupProgressBar only */ + iupClassRegisterAttribute(ic, "VALUE", iProgressBarGetValueAttrib, motProgressBarSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ORIENTATION", NULL, NULL, "HORIZONTAL", NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/mot/iupmot_tabs.c b/iup/src/mot/iupmot_tabs.c new file mode 100755 index 0000000..7c8a6b5 --- /dev/null +++ b/iup/src/mot/iupmot_tabs.c @@ -0,0 +1,593 @@ +/** \file +* \brief Tabs Control +* +* See Copyright Notice in "iup.h" +*/ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_tabs.h" +#include "iup_image.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +int iupdrvTabsExtraDecor(Ihandle* ih) +{ + (void)ih; + return 1; +} + +int iupdrvTabsGetLineCountAttrib(Ihandle* ih) +{ + (void)ih; + return 1; +} + +void iupdrvTabsSetCurrentTab(Ihandle* ih, int pos) +{ + Ihandle* child = IupGetChild(ih, pos); + Ihandle* prev_child = IupGetChild(ih, iupdrvTabsGetCurrentTab(ih)); + IupSetAttribute(child, "VISIBLE", "YES"); + IupSetAttribute(prev_child, "VISIBLE", "NO"); + + XtVaSetValues(ih->handle, XmNcurrentPageNumber, pos, NULL); +} + +int iupdrvTabsGetCurrentTab(Ihandle* ih) +{ + int pos; + XtVaGetValues(ih->handle, XmNcurrentPageNumber, &pos, NULL); + return pos; +} + +static void motTabsUpdatePageNumber(Ihandle* ih) +{ + int pos, old_pos; + Ihandle* child; + for (pos = 0, child = ih->firstchild; child; child = child->brother, pos++) + { + Widget child_manager = (Widget)iupAttribGet(child, "_IUPTAB_CONTAINER"); + if (child_manager) + { + old_pos = iupAttribGetInt(child, "_IUPMOT_TABNUMBER"); /* did not work when using XtVaGetValues(child_manager, XmNpageNumber) */ + if (pos != old_pos) + { + Widget tab_button = (Widget)iupAttribGet(child, "_IUPMOT_TABBUTTON"); + XtVaSetValues(child_manager, XmNpageNumber, pos, NULL); + XtVaSetValues(tab_button, XmNpageNumber, pos, NULL); + iupAttribSetInt(child, "_IUPMOT_TABNUMBER", pos); + } + } + } +} + +static void motTabsUpdatePageBgPixmap(Ihandle* ih, Pixmap pixmap) +{ + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + { + Widget child_manager = (Widget)iupAttribGet(child, "_IUPTAB_CONTAINER"); + if (child_manager) + XtVaSetValues(child_manager, XmNbackgroundPixmap, pixmap, NULL); + } +} + +static void motTabsUpdatePageBgColor(Ihandle* ih, Pixel color) +{ + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + { + Widget child_manager = (Widget)iupAttribGet(child, "_IUPTAB_CONTAINER"); + if (child_manager) + iupmotSetBgColor(child_manager, color); + } +} + +static void motTabsUpdateButtonsFgColor(Ihandle* ih, Pixel color) +{ + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + { + Widget tab_button = (Widget)iupAttribGet(child, "_IUPMOT_TABBUTTON"); + if (tab_button) + XtVaSetValues(tab_button, XmNforeground, color, NULL); + } +} + +static void motTabsUpdateButtonsBgColor(Ihandle* ih, Pixel color) +{ + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + { + Widget tab_button = (Widget)iupAttribGet(child, "_IUPMOT_TABBUTTON"); + if (tab_button) + iupmotSetBgColor(tab_button, color); + } +} + +static void motTabsUpdateButtonsPadding(Ihandle* ih) +{ + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + { + Widget tab_button = (Widget)iupAttribGet(child, "_IUPMOT_TABBUTTON"); + if (tab_button) + XtVaSetValues(tab_button, XmNmarginHeight, ih->data->vert_padding, + XmNmarginWidth, ih->data->horiz_padding, NULL); + } +} + +static void motTabsUpdatePageFont(Ihandle* ih) +{ + Ihandle* child; + XmFontList fontlist = (XmFontList)iupmotGetFontListAttrib(ih); + + for (child = ih->firstchild; child; child = child->brother) + { + Widget tab_button = (Widget)iupAttribGet(child, "_IUPMOT_TABBUTTON"); + if (tab_button) + XtVaSetValues(tab_button, XmNrenderTable, fontlist, NULL); + } +} + +/* ------------------------------------------------------------------------- */ +/* motTabs - Sets and Gets accessors */ +/* ------------------------------------------------------------------------- */ + +static int motTabsSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + + if (ih->handle) + motTabsUpdateButtonsPadding(ih); + return 0; +} + +static void motTabsUpdateTabType(Ihandle* ih) +{ + if (ih->data->type == ITABS_LEFT) + XtVaSetValues(ih->handle, XmNbackPagePlacement, XmBOTTOM_LEFT, + XmNorientation, XmHORIZONTAL, + NULL); + else if(ih->data->type == ITABS_RIGHT) + XtVaSetValues(ih->handle, XmNbackPagePlacement, XmBOTTOM_RIGHT, + XmNorientation, XmHORIZONTAL, + NULL); + else if(ih->data->type == ITABS_BOTTOM) + XtVaSetValues(ih->handle, XmNbackPagePlacement, XmBOTTOM_RIGHT, + XmNorientation, XmVERTICAL, + NULL); + else /* "TOP" */ + XtVaSetValues(ih->handle, XmNbackPagePlacement, XmTOP_RIGHT, + XmNorientation, XmVERTICAL, + NULL); +} + +static int motTabsSetTabTypeAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "LEFT")) + ih->data->type = ITABS_LEFT; + else if(iupStrEqualNoCase(value, "RIGHT")) + ih->data->type = ITABS_RIGHT; + else if(iupStrEqualNoCase(value, "BOTTOM")) + ih->data->type = ITABS_BOTTOM; + else /* "TOP" */ + ih->data->type = ITABS_TOP; + + if (ih->handle) + motTabsUpdateTabType(ih); + + return 0; +} + +static int motTabsSetBgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color; + + /* given value is used only for child, to the Tabs must use only from parent */ + char* parent_value = iupBaseNativeParentGetBgColor(ih); + + color = iupmotColorGetPixelStr(parent_value); + if (color != (Pixel)-1) + { + iupmotSetBgColor(ih->handle, color); + motTabsUpdatePageBgColor(ih, color); + } + + color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + motTabsUpdateButtonsBgColor(ih, color); + + return 1; +} + +static int motTabsSetBackgroundAttrib(Ihandle* ih, const char* value) +{ + /* given value is used only for child, to the Tabs must use only from parent */ + char* parent_value = iupAttribGetInheritNativeParent(ih, "BACKGROUND"); + + Pixel color = iupmotColorGetPixelStr(parent_value); + if (color != (Pixel)-1) + { + iupmotSetBgColor(ih->handle, color); + motTabsUpdatePageBgColor(ih, color); + } + else + { + Pixmap pixmap = (Pixmap)iupImageGetImage(parent_value, ih, 0); + if (pixmap) + { + XtVaSetValues(ih->handle, XmNbackgroundPixmap, pixmap, NULL); + motTabsUpdatePageBgPixmap(ih, pixmap); + } + } + + (void)value; + return 1; +} + +static int motTabsSetFgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + XtVaSetValues(ih->handle, XmNforeground, color, NULL); + motTabsUpdateButtonsFgColor(ih, color); + return 1; + } + return 0; +} + +static int motTabsSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + iupdrvSetStandardFontAttrib(ih, value); + if (ih->handle) + motTabsUpdatePageFont(ih); + return 1; +} + +static int motTabsSetTabTitleAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int pos; + if (value && iupStrToInt(name_id, &pos)==1) + { + Ihandle* child = IupGetChild(ih, pos); + Widget tab_button = (Widget)iupAttribGet(child, "_IUPMOT_TABBUTTON"); + if (tab_button) + iupmotSetString(tab_button, XmNlabelString, value); + } + return 1; +} + +static int motTabsSetTabImageAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int pos; + if (value && iupStrToInt(name_id, &pos)==1) + { + Ihandle* child = IupGetChild(ih, pos); + Widget tab_button = (Widget)iupAttribGet(child, "_IUPMOT_TABBUTTON"); + if (tab_button) + { + Pixmap pixmap = (Pixmap)iupImageGetImage(value, ih, 0); + if (pixmap) + XtVaSetValues(tab_button, XmNlabelPixmap, pixmap, NULL); + } + } + return 1; +} + + +/* ------------------------------------------------------------------------- */ +/* motTabs - Callback */ +/* ------------------------------------------------------------------------- */ + +void motTabsPageChangedCallback(Widget w, Ihandle* ih, XmNotebookCallbackStruct *nptr) +{ + if (nptr->reason == XmCR_MAJOR_TAB) + { + IFnnn cb; + Ihandle* child = IupGetChild(ih, nptr->page_number); + Ihandle* prev_child = IupGetChild(ih, nptr->prev_page_number); + IupSetAttribute(child, "VISIBLE", "YES"); + IupSetAttribute(prev_child, "VISIBLE", "NO"); + + cb = (IFnnn)IupGetCallback(ih, "TABCHANGE_CB"); + if (cb) + cb(ih, child, prev_child); + } + (void)w; +} + +static void motTabsConfigureNotify(Widget w, XEvent *evt, String* s, Cardinal *card) +{ + /* Motif does not process the changed of position and/or size of children outside the parent's client area. + Since Notebook pages are not resized until they are moved into the visible area, + we must update the children position and size when a tab page is resize. + Since tab pages are not hidden, they are moved outside the visible area, + a resize occours every time a tab is activated. + */ + Ihandle *child; + (void)s; + (void)card; + (void)evt; + + XtVaGetValues(w, XmNuserData, &child, NULL); + if (!child) return; + + iupLayoutUpdate(child); +} + +/* ------------------------------------------------------------------------- */ +/* motTabs - Methods and Init Class */ +/* ------------------------------------------------------------------------- */ + +static void motTabsChildAddedMethod(Ihandle* ih, Ihandle* child) +{ + if (IupGetName(child) == NULL) + iupAttribSetHandleName(child); + + if (ih->handle) + { + Widget child_manager; + Widget tab_button; + int num_args = 0, pos; + Arg args[30]; + char *tabtitle, *tabimage, *background; + Pixel color; + + /* open space for new tab number */ + motTabsUpdatePageNumber(ih); + + pos = IupGetChildPos(ih, child); + + /* Create pages */ + child_manager = XtVaCreateManagedWidget( + "child_manager", + xmBulletinBoardWidgetClass, + ih->handle, + /* Core */ + XmNborderWidth, 0, + /* Manager */ + XmNshadowThickness, 0, + XmNnavigationType, XmTAB_GROUP, + XmNuserData, child, /* used only in motTabsConfigureNotify */ + /* BulletinBoard */ + XmNmarginWidth, 0, + XmNmarginHeight, 0, + XmNresizePolicy, XmRESIZE_NONE, /* no automatic resize of children */ + /* Notebook Constraint */ + XmNnotebookChildType, XmPAGE, + XmNpageNumber, pos, + XmNresizable, True, + NULL); + + XtOverrideTranslations(child_manager, XtParseTranslationTable(": iupTabsConfigure()")); + + tabtitle = iupAttribGet(child, "TABTITLE"); + if (!tabtitle) tabtitle = iupTabsAttribGetStrId(ih, "TABTITLE", pos); + tabimage = iupAttribGet(child, "TABIMAGE"); + if (!tabimage) tabimage = iupTabsAttribGetStrId(ih, "TABIMAGE", pos); + if (!tabtitle && !tabimage) + tabtitle = " "; + + /* Create tabs */ + /* Label */ + iupmotSetArg(args, num_args, XmNlabelType, tabtitle? XmSTRING: XmPIXMAP); + iupmotSetArg(args, num_args, XmNmarginHeight, 0); + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + /* Notebook Constraint */ + iupmotSetArg(args, num_args, XmNnotebookChildType, XmMAJOR_TAB); + iupmotSetArg(args, num_args, XmNpageNumber, pos); + tab_button = XtCreateManagedWidget("tab_button", xmPushButtonWidgetClass, ih->handle, args, num_args); + + /* Disable Drag Source */ + iupmotDisableDragSource(tab_button); + + XtAddEventHandler(tab_button, EnterWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(tab_button, LeaveWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(tab_button, FocusChangeMask, False, (XtEventHandler)iupmotFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(tab_button, KeyPressMask, False, (XtEventHandler)iupmotKeyPressEvent, (XtPointer)ih); + + if (tabtitle) + iupmotSetString(tab_button, XmNlabelString, tabtitle); + else + { + Pixmap pixmap = (Pixmap)iupImageGetImage(tabimage, ih, 0); + if (pixmap) + XtVaSetValues(tab_button, XmNlabelPixmap, pixmap, NULL); + } + + background = iupBaseNativeParentGetBgColorAttrib(ih); + color = iupmotColorGetPixelStr(background); + if (color != -1) + iupmotSetBgColor(child_manager, color); + else + { + Pixmap pixmap = (Pixmap)iupImageGetImage(background, ih, 0); + if (pixmap) + { + XtVaSetValues(child_manager, XmNbackgroundPixmap, pixmap, NULL); + } + } + + background = iupAttribGetStr(ih, "BGCOLOR"); + color = iupmotColorGetPixelStr(background); + if (color != -1) + iupmotSetBgColor(tab_button, color); + + color = iupmotColorGetPixelStr(IupGetAttribute(ih, "FGCOLOR")); + XtVaSetValues(tab_button, XmNforeground, color, NULL); + + XtRealizeWidget(child_manager); + XtRealizeWidget(tab_button); + + iupAttribSetStr(child, "_IUPTAB_CONTAINER", (char*)child_manager); + iupAttribSetStr(child, "_IUPMOT_TABBUTTON", (char*)tab_button); + iupAttribSetInt(child, "_IUPMOT_TABNUMBER", pos); + + if (pos == iupdrvTabsGetCurrentTab(ih)) + IupSetAttribute(child, "VISIBLE", "YES"); + else + IupSetAttribute(child, "VISIBLE", "NO"); + } +} + +static void motTabsChildRemovedMethod(Ihandle* ih, Ihandle* child) +{ + if (ih->handle) + { + Widget child_manager = (Widget)iupAttribGet(child, "_IUPTAB_CONTAINER"); + if (child_manager) + { + int cur_pos, pos; + Widget tab_button = (Widget)iupAttribGet(child, "_IUPMOT_TABBUTTON"); + + cur_pos = iupdrvTabsGetCurrentTab(ih); + pos = iupAttribGetInt(child, "_IUPMOT_TABNUMBER"); /* did not work when using XtVaGetValues(child_manager, XmNpageNumber) */ + if (cur_pos == pos) + { + if (cur_pos == 0) + cur_pos = 1; + else + cur_pos--; + + iupdrvTabsSetCurrentTab(ih, cur_pos); + } + + XtDestroyWidget(tab_button); + XtDestroyWidget(child_manager); + + /* compact the tab number usage */ + motTabsUpdatePageNumber(ih); + + iupAttribSetStr(child, "_IUPTAB_CONTAINER", NULL); + iupAttribSetStr(child, "_IUPMOT_TABBUTTON", NULL); + iupAttribSetStr(child, "_IUPMOT_TABNUMBER", NULL); + } + } +} + +static int motTabsMapMethod(Ihandle* ih) +{ + int num_args = 0; + Arg args[30]; + + if (!ih->parent) + return IUP_ERROR; + + /* Core */ + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + /* Manager */ + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + iupmotSetArg(args, num_args, XmNtraversalOn, True); + iupmotSetArg(args, num_args, XmNhighlightThickness, 0); + /* Notebook */ + iupmotSetArg(args, num_args, XmNbindingType, XmNONE); + iupmotSetArg(args, num_args, XmNbindingWidth, 0); + iupmotSetArg(args, num_args, XmNfirstPageNumber, 0); /* IupTabs index always starts with zero */ + iupmotSetArg(args, num_args, XmNbackPageSize, 0); + iupmotSetArg(args, num_args, XmNbackPageNumber, 1); + iupmotSetArg(args, num_args, XmNframeShadowThickness, 2); + + ih->handle = XtCreateManagedWidget( + iupDialogGetChildIdStr(ih), /* child identifier */ + xmNotebookWidgetClass, /* widget class */ + iupChildTreeGetNativeParentHandle(ih), /* widget parent */ + args, num_args); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + /* Disable page scroller */ + { + Widget scroller; + scroller = XtNameToWidget(ih->handle, "*PageScroller"); + XtUnmanageChild(scroller); + } + + /* Callbacks */ + XtAddCallback(ih->handle, XmNpageChangedCallback, (XtCallbackProc)motTabsPageChangedCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + + /* update Tab position */ + motTabsUpdateTabType(ih); + + /* current value is now given by the native system */ + iupAttribSetStr(ih, "_IUPTABS_VALUE_HANDLE", NULL); + + /* initialize the widget */ + XtRealizeWidget(ih->handle); + + /* Create pages and tabs */ + if (ih->firstchild) + { + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + motTabsChildAddedMethod(ih, child); + } + + return IUP_NOERROR; +} + +void iupdrvTabsInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motTabsMapMethod; + ic->ChildAdded = motTabsChildAddedMethod; + ic->ChildRemoved = motTabsChildRemovedMethod; + + { + /* Set up a translation table that captures "Resize" events + (also called ConfigureNotify or Configure events). */ + XtActionsRec rec = {"iupTabsConfigure", motTabsConfigureNotify}; + XtAppAddActions(iupmot_appcontext, &rec, 1); + } + + /* Driver Dependent Attribute functions */ + + /* Common */ + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, motTabsSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, motTabsSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, motTabsSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BACKGROUND", NULL, motTabsSetBackgroundAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* IupTabs only */ + iupClassRegisterAttribute(ic, "TABTYPE", iupTabsGetTabTypeAttrib, motTabsSetTabTypeAttrib, IUPAF_SAMEASSYSTEM, "TOP", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TABORIENTATION", iupTabsGetTabOrientationAttrib, NULL, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); /* can not be set, always HORIZONTAL in Motif */ + iupClassRegisterAttributeId(ic, "TABTITLE", NULL, motTabsSetTabTitleAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TABIMAGE", NULL, motTabsSetTabImageAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PADDING", iupTabsGetPaddingAttrib, motTabsSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); +} diff --git a/iup/src/mot/iupmot_text.c b/iup/src/mot/iupmot_text.c new file mode 100755 index 0000000..4a8f936 --- /dev/null +++ b/iup/src/mot/iupmot_text.c @@ -0,0 +1,1165 @@ +/** \file + * \brief Text Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_mask.h" +#include "iup_drv.h" +#include "iup_array.h" +#include "iup_text.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +#ifndef XmIsSpinBox +#define XmIsSpinBox(w) XtIsSubclass(w, xmSpinBoxWidgetClass) +#endif + +#ifndef XmNwrap +#define XmNwrap "Nwrap" +#endif + +void iupdrvTextAddFormatTag(Ihandle* ih, Ihandle* formattag) +{ + (void)ih; + (void)formattag; +} + +void iupdrvTextAddSpin(int *w, int h) +{ + *w += h/2; +} + +void iupdrvTextAddBorders(int *w, int *h) +{ + int border_size = 2*5; + (*w) += border_size; + (*h) += border_size; +} + +static void motTextGetLinColFromPosition(const char *str, int pos, int *lin, int *col ) +{ + int i; + + *lin = 0; + *col = 0; + + for (i=0; ihandle); + *pos = motTextSetLinColToPosition(str, lin, col); + XtFree(str); +} + +void iupdrvTextConvertPosToLinCol(Ihandle* ih, int pos, int *lin, int *col) +{ + char *str = XmTextGetString(ih->handle); + motTextGetLinColFromPosition(str, pos, lin, col); + XtFree(str); +} + +static int motTextConvertXYToPos(Ihandle* ih, int x, int y) +{ + return XmTextXYToPos(ih->handle, x, y); +} + + +/*******************************************************************************************/ + + +static int motTextSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + if (ih->handle) + { + XtVaSetValues(ih->handle, XmNmarginHeight, ih->data->vert_padding, + XmNmarginWidth, ih->data->horiz_padding, NULL); + } + return 0; +} + +static int motTextSetReadOnlyAttrib(Ihandle* ih, const char* value) +{ + XtVaSetValues(ih->handle, XmNeditable, iupStrBoolean(value)? False: True, NULL); + return 0; +} + +static char* motTextGetReadOnlyAttrib(Ihandle* ih) +{ + Boolean editable; + XtVaGetValues(ih->handle, XmNeditable, &editable, NULL); + if (editable) + return "YES"; + else + return "NO"; +} + +static int motTextSetInsertAttrib(Ihandle* ih, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + if (!value) + return 0; + + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + XmTextRemove(ih->handle); + XmTextInsert(ih->handle, XmTextGetInsertionPosition(ih->handle), (char*)value); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + + return 0; +} + +static int motTextSetSelectedTextAttrib(Ihandle* ih, const char* value) +{ + XmTextPosition start, end; + + if (!value) + return 0; + + if (XmTextGetSelectionPosition(ih->handle, &start, &end) && start!=end) + { + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + XmTextReplace(ih->handle, start, end, (char*)value); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + + return 0; +} + +static char* motTextGetSelectedTextAttrib(Ihandle* ih) +{ + char* selectedtext = XmTextGetSelection(ih->handle); + char* str = iupStrGetMemoryCopy(selectedtext); + XtFree(selectedtext); + return str; +} + +static int motTextSetAppendAttrib(Ihandle* ih, const char* value) +{ + XmTextPosition pos; + if (!ih->handle) /* do not store the action before map */ + return 0; + pos = XmTextGetLastPosition(ih->handle); + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + if (ih->data->is_multiline && ih->data->append_newline) + XmTextInsert(ih->handle, pos, "\n"); + if (value) + XmTextInsert(ih->handle, pos+1, (char*)value); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + return 0; +} + +static int motTextSetSelectionAttrib(Ihandle* ih, const char* value) +{ + int start=1, end=1; + + if (!value || iupStrEqualNoCase(value, "NONE")) + { + XmTextClearSelection(ih->handle, CurrentTime); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + XmTextSetSelection(ih->handle, (XmTextPosition)0, (XmTextPosition)XmTextGetLastPosition(ih->handle), CurrentTime); + return 0; + } + + if (ih->data->is_multiline) + { + int lin_start=1, col_start=1, lin_end=1, col_end=1; + char *str; + + if (sscanf(value, "%d,%d:%d,%d", &lin_start, &col_start, &lin_end, &col_end)!=4) return 0; + if (lin_start<1 || col_start<1 || lin_end<1 || col_end<1) return 0; + + str = XmTextGetString(ih->handle); + start = motTextSetLinColToPosition(str, lin_start, col_start); + end = motTextSetLinColToPosition(str, lin_end, col_end); + XtFree(str); + } + else + { + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<1 || end<1) + return 0; + + start--; /* IUP starts at 1 */ + end--; + } + + /* end is inside the selection, in IUP is outside */ + end--; + + XmTextSetSelection(ih->handle, (XmTextPosition)start, (XmTextPosition)end, CurrentTime); + + return 0; +} + +static char* motTextGetSelectionAttrib(Ihandle* ih) +{ + XmTextPosition start = 0, end = 0; + char* str; + + if (!XmTextGetSelectionPosition(ih->handle, &start, &end) || start==end) + return NULL; + + str = iupStrGetMemory(100); + + /* end is inside the selection, in IUP is outside */ + end++; + + if (ih->data->is_multiline) + { + int start_col, start_lin, end_col, end_lin; + + char *value = XmTextGetString(ih->handle); + motTextGetLinColFromPosition(value, start, &start_lin, &start_col); + motTextGetLinColFromPosition(value, end, &end_lin, &end_col); + XtFree(value); + + sprintf(str,"%d,%d:%d,%d", start_lin, start_col, end_lin, end_col); + } + else + { + start++; /* IUP starts at 1 */ + end++; + sprintf(str, "%d:%d", (int)start, (int)end); + } + + return str; +} + +static int motTextSetSelectionPosAttrib(Ihandle* ih, const char* value) +{ + int start=0, end=0; + + if (!value || iupStrEqualNoCase(value, "NONE")) + { + XmTextClearSelection(ih->handle, CurrentTime); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + XmTextSetSelection(ih->handle, (XmTextPosition)0, (XmTextPosition)XmTextGetLastPosition(ih->handle), CurrentTime); + return 0; + } + + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<0 || end<0) + return 0; + + /* end is inside the selection, in IUP is outside */ + end--; + + XmTextSetSelection(ih->handle, (XmTextPosition)start, (XmTextPosition)end, CurrentTime); + + return 0; +} + +static char* motTextGetSelectionPosAttrib(Ihandle* ih) +{ + XmTextPosition start = 0, end = 0; + char* str; + + if (!XmTextGetSelectionPosition(ih->handle, &start, &end) || start==end) + return NULL; + + str = iupStrGetMemory(100); + + /* end is inside the selection, in IUP is outside */ + end++; + + sprintf(str, "%d:%d", (int)start, (int)end); + + return str; +} + +static int motTextSetCaretAttrib(Ihandle* ih, const char* value) +{ + int pos = 1; + + if (!value) + return 0; + + if (ih->data->is_multiline) + { + int lin = 1, col = 1; + char *str; + + iupStrToIntInt(value, &lin, &col, ','); + + str = XmTextGetString(ih->handle); + pos = motTextSetLinColToPosition(str, lin, col); + XtFree(str); + } + else + { + sscanf(value,"%i",&pos); + pos--; /* IUP starts at 1 */ + } + + XmTextSetInsertionPosition(ih->handle, (XmTextPosition)pos); + XmTextShowPosition(ih->handle, (XmTextPosition)pos); + + return 0; +} + +static char* motTextGetCaretAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(50); + + XmTextPosition pos = XmTextGetInsertionPosition(ih->handle); + + if (ih->data->is_multiline) + { + int col, lin; + + char *value = XmTextGetString(ih->handle); + motTextGetLinColFromPosition(value, pos, &lin, &col); + XtFree(value); + + sprintf(str, "%d,%d", lin, col); + } + else + { + pos++; /* IUP starts at 1 */ + sprintf(str, "%d", (int)pos); + } + + return str; +} + +static int motTextSetCaretPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 0) pos = 0; + + XmTextSetInsertionPosition(ih->handle, (XmTextPosition)pos); + XmTextShowPosition(ih->handle, (XmTextPosition)pos); + + return 0; +} + +static char* motTextGetCaretPosAttrib(Ihandle* ih) +{ + XmTextPosition pos = XmTextGetInsertionPosition(ih->handle); + char* str = iupStrGetMemory(50); + sprintf(str, "%d", (int)pos); + return str; +} + +static int motTextSetScrollToAttrib(Ihandle* ih, const char* value) +{ + int pos = 1; + + if (!value) + return 0; + + if (ih->data->is_multiline) + { + int lin = 1, col = 1, pos; + char* str; + + iupStrToIntInt(value, &lin, &col, ','); + if (lin < 1) lin = 1; + if (col < 1) col = 1; + + str = XmTextGetString(ih->handle); + pos = motTextSetLinColToPosition(str, lin, col); + XtFree(str); + } + else + { + sscanf(value,"%i",&pos); + if (pos < 1) pos = 1; + pos--; /* return to Motif referece */ + } + + XmTextShowPosition(ih->handle, (XmTextPosition)pos); + + return 0; +} + +static int motTextSetScrollToPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 0) pos = 0; + + XmTextShowPosition(ih->handle, (XmTextPosition)pos); + + return 0; +} + +static int motTextSetNCAttrib(Ihandle* ih, const char* value) +{ + if (!iupStrToInt(value, &ih->data->nc)) + ih->data->nc = INT_MAX; + if (ih->handle) + XtVaSetValues(ih->handle, XmNmaxLength, ih->data->nc, NULL); + return 0; +} + +static int motTextSetClipboardAttrib(Ihandle *ih, const char *value) +{ + if (iupStrEqualNoCase(value, "COPY")) + { + char *str = XmTextGetSelection(ih->handle); + if (!str) return 0; + + XmTextCopy(ih->handle, CurrentTime); + + /* do it also for the X clipboard */ + XStoreBytes(iupmot_display, str, strlen(str)+1); + XtFree(str); + } + else if (iupStrEqualNoCase(value, "CUT")) + { + char *str = XmTextGetSelection(ih->handle); + if (!str) return 0; + + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + + XmTextCut(ih->handle, CurrentTime); + + /* do it also for the X clipboard */ + XStoreBytes(iupmot_display, str, strlen(str)+1); + XtFree(str); + XmTextRemove(ih->handle); + + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + else if (iupStrEqualNoCase(value, "PASTE")) + { + int size; + char* str = XFetchBytes(iupmot_display, &size); + if (!str) return 0; + + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + + XmTextPaste(ih->handle); /* TODO: this could force 2 pastes, check in CDE */ + + /* do it also for the X clipboard */ + XmTextRemove(ih->handle); + XmTextInsert(ih->handle, XmTextGetInsertionPosition(ih->handle), str); + XFree(str); + + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + else if (iupStrEqualNoCase(value, "CLEAR")) + { + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + XmTextRemove(ih->handle); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + return 0; +} + +static int motTextSetBgColorAttrib(Ihandle* ih, const char* value) +{ + Widget sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (sb_win) + { + Pixel color; + + /* ignore given value for the scrollbars, must use only from parent */ + char* parent_value = iupBaseNativeParentGetBgColor(ih); + + color = iupmotColorGetPixelStr(parent_value); + if (color != (Pixel)-1) + { + Widget sb = NULL; + + iupmotSetBgColor(sb_win, color); + + XtVaGetValues(sb_win, XmNverticalScrollBar, &sb, NULL); + if (sb) iupmotSetBgColor(sb, color); + + XtVaGetValues(sb_win, XmNhorizontalScrollBar, &sb, NULL); + if (sb) iupmotSetBgColor(sb, color); + } + } + + return iupdrvBaseSetBgColorAttrib(ih, value); /* use given value for contents */ +} + +static int motTextSetSpinMinAttrib(Ihandle* ih, const char* value) +{ + Widget spinbox = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (spinbox && XmIsSpinBox(spinbox)) + { + int min; + if (iupStrToInt(value, &min)) + { + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + XtVaSetValues(ih->handle, XmNminimumValue, min, NULL); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + } + return 1; +} + +static int motTextSetSpinMaxAttrib(Ihandle* ih, const char* value) +{ + Widget spinbox = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (spinbox && XmIsSpinBox(spinbox)) + { + int max; + if (iupStrToInt(value, &max)) + { + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + XtVaSetValues(ih->handle, XmNmaximumValue, max, NULL); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + } + return 1; +} + +static int motTextSetSpinIncAttrib(Ihandle* ih, const char* value) +{ + Widget spinbox = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (spinbox && XmIsSpinBox(spinbox)) + { + int inc; + if (iupStrToInt(value, &inc)) + { + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + XtVaSetValues(ih->handle, XmNincrementValue, inc, NULL); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + } + } + return 1; +} + +static int motTextSetSpinValueAttrib(Ihandle* ih, const char* value) +{ + Widget spinbox = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (spinbox && XmIsSpinBox(spinbox)) + { + int pos; + if (iupStrToInt(value, &pos)) + { + char* value = NULL; + int min, max; + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + XtVaGetValues(ih->handle, XmNminimumValue, &min, + XmNmaximumValue, &max, NULL); + if (pos < min) pos = min; + if (pos > max) pos = max; + if (iupAttribGet(ih, "_IUPMOT_SPIN_NOAUTO")) + value = XmTextGetString(ih->handle); + + XtVaSetValues(ih->handle, XmNposition, pos, NULL); + + if (value) + { + XmTextSetString(ih->handle, (char*)value); + XtFree(value); + } + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + return 1; + } + } + return 0; +} + +static char* motTextGetSpinValueAttrib(Ihandle* ih) +{ + Widget spinbox = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (spinbox && XmIsSpinBox(spinbox)) + { + int pos; + char *str = iupStrGetMemory(50); + XtVaGetValues(ih->handle, XmNposition, &pos, NULL); + sprintf(str, "%d", pos); + return str; + } + return NULL; +} + +static int motTextSetValueAttrib(Ihandle* ih, const char* value) +{ + if (!value) value = ""; + motTextSetSpinValueAttrib(ih, value); + /* disable callbacks */ + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + XmTextSetString(ih->handle, (char*)value); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + return 0; +} + +static char* motTextGetValueAttrib(Ihandle* ih) +{ + char* value = XmTextGetString(ih->handle); + char* str = iupStrGetMemoryCopy(value); + XtFree(value); + return str; +} + + +/******************************************************************************/ + + +static void motTextSpinModifyVerifyCallback(Widget w, Ihandle* ih, XmSpinBoxCallbackStruct *cbs) +{ + IFni cb = (IFni) IupGetCallback(ih, "SPIN_CB"); + if (cb) + { + int ret = cb(ih, cbs->position); + if (ret == IUP_IGNORE) + { + cbs->doit = 1; + return; + } + } + (void)w; + + iupAttribSetStr(ih, "_IUPMOT_SPIN_DISABLE_TEXT_CB", "1"); +} + +static void motTextModifyVerifyCallback(Widget w, Ihandle *ih, XmTextVerifyPtr text) +{ + int start, end, key = 0; + char *value, *new_value, *insert_value; + KeySym motcode = 0; + IFnis cb; + + if (iupAttribGet(ih, "_IUPMOT_DISABLE_TEXT_CB")) + return; + + if (iupAttribGet(ih, "_IUPMOT_SPIN_DISABLE_TEXT_CB")) + { + if (iupAttribGet(ih, "_IUPMOT_SPIN_NOAUTO")) + text->doit = False; + + iupAttribSetStr(ih, "_IUPMOT_SPIN_DISABLE_TEXT_CB", NULL); + return; + } + + cb = (IFnis)IupGetCallback(ih, "ACTION"); + if (!cb && !ih->data->mask) + return; + + if (text->event && text->event->type == KeyPress) + { + unsigned int state = ((XKeyEvent*)text->event)->state; + if (state & ControlMask || /* Ctrl */ + state & Mod1Mask || + state & Mod5Mask || /* Alt */ + state & Mod4Mask) /* Apple/Win */ + return; + + motcode = XKeycodeToKeysym(iupmot_display, ((XKeyEvent*)text->event)->keycode, 0); + } + + value = XmTextGetString(ih->handle); + start = text->startPos; + end = text->endPos; + insert_value = text->text->ptr; + + if (motcode == XK_Delete) + { + new_value = value; + iupStrRemove(value, start, end, 1); + } + else if (motcode == XK_BackSpace) + { + new_value = value; + iupStrRemove(value, start, end, -1); + } + else + { + if (!value) + new_value = iupStrDup(insert_value); + else if (insert_value) + new_value = iupStrInsert(value, insert_value, start, end); + else + new_value = value; + } + + if (insert_value && insert_value[0]!=0 && insert_value[1]==0) + key = insert_value[0]; + + if (ih->data->mask && iupMaskCheck(ih->data->mask, new_value)==0) + { + if (new_value != value) free(new_value); + XtFree(value); + text->doit = False; /* abort processing */ + return; + } + + if (cb) + { + int cb_ret = cb(ih, key, (char*)new_value); + if (cb_ret==IUP_IGNORE) + text->doit = False; /* abort processing */ + else if (cb_ret==IUP_CLOSE) + { + IupExitLoop(); + text->doit = False; /* abort processing */ + } + else if (cb_ret!=0 && key!=0 && + cb_ret != IUP_DEFAULT && cb_ret != IUP_CONTINUE) + { + insert_value[0] = (char)cb_ret; /* replace key */ + } + } + + if (text->doit) + { + /* Spin is not automatically updated when you directly edit the text */ + Widget spinbox = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (spinbox && XmIsSpinBox(spinbox) && !iupAttribGet(ih, "_IUPMOT_SPIN_NOAUTO")) + { + int pos; + if (iupStrToInt(new_value, &pos)) + { + XmTextPosition caret_pos = text->currInsert; + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", "1"); + XtVaSetValues(ih->handle, XmNposition, pos, NULL); + iupAttribSetStr(ih, "_IUPMOT_DISABLE_TEXT_CB", NULL); + /* do not handle all situations, but handle the basic ones */ + if (text->startPos == text->endPos) /* insert */ + caret_pos++; + else if (text->startPos < text->endPos && text->startPos < text->currInsert) /* backspace */ + caret_pos--; + XmTextSetInsertionPosition(ih->handle, caret_pos); + text->doit = False; + } + } + } + + if (new_value != value) free(new_value); + XtFree(value); + (void)w; +} + +static void motTextMotionVerifyCallback(Widget w, Ihandle* ih, XmTextVerifyCallbackStruct* textverify) +{ + int col, lin, pos; + + IFniii cb = (IFniii)IupGetCallback(ih, "CARET_CB"); + if (!cb) return; + + pos = textverify->newInsert; + + if (ih->data->is_multiline) + { + char *value = XmTextGetString(ih->handle); + motTextGetLinColFromPosition(value, pos, &lin, &col); + XtFree(value); + } + else + { + col = pos; + col++; /* IUP starts at 1 */ + lin = 1; + } + + if (pos != ih->data->last_caret_pos) + { + ih->data->last_caret_pos = pos; + cb(ih, lin, col, pos); + } + + (void)w; +} + +static void motTextValueChangedCallback(Widget w, Ihandle* ih, XmAnyCallbackStruct* valuechanged) +{ + if (iupAttribGet(ih, "_IUPMOT_DISABLE_TEXT_CB")) + return; + + iupBaseCallValueChangedCb(ih); + + (void)valuechanged; + (void)w; +} + +static void motTextKeyPressEvent(Widget w, Ihandle *ih, XKeyEvent *evt, Boolean *cont) +{ + Widget spinbox; + + *cont = True; + iupmotKeyPressEvent(w, ih, (XEvent*)evt, cont); + if (*cont == False) + return; + + if (evt->state & ControlMask) /* Ctrl */ + { + KeySym motcode = XKeycodeToKeysym(iupmot_display, evt->keycode, 0); + if (motcode == XK_c) + motTextSetClipboardAttrib(ih, "COPY"); + else if (motcode == XK_x) + motTextSetClipboardAttrib(ih, "CUT"); + else if (motcode == XK_v) + motTextSetClipboardAttrib(ih, "PASTE"); + else if (motcode == XK_a) + XmTextSetSelection(ih->handle, 0, XmTextGetLastPosition(ih->handle), CurrentTime); + } + + spinbox = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (spinbox && XmIsSpinBox(spinbox)) + { + KeySym motcode = XKeycodeToKeysym(iupmot_display, evt->keycode, 0); + if (motcode == XK_Left || motcode == XK_Right) + { + /* avoid spin increment using Left/Right arrows, + but must manually handle the new cursor position */ + XmTextPosition caret_pos = XmTextGetInsertionPosition(ih->handle); + XmTextSetInsertionPosition(ih->handle, (motcode == XK_Left)? caret_pos-1: caret_pos+1); + *cont = False; + } + } +} + + +/******************************************************************************/ + + +static void motTextLayoutUpdateMethod(Ihandle* ih) +{ + Widget spinbox = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + if (spinbox && XmIsSpinBox(spinbox)) + { + XtVaSetValues(ih->handle, + XmNwidth, (XtArgVal)ih->currentwidth-ih->currentheight/2, + XmNheight, (XtArgVal)ih->currentheight, + NULL); + + XtVaSetValues(spinbox, + XmNx, (XtArgVal)ih->x, + XmNy, (XtArgVal)ih->y, + XmNwidth, (XtArgVal)ih->currentwidth, + XmNheight, (XtArgVal)ih->currentheight, + XmNarrowSize, ih->currentheight/2, + NULL); + } + else + iupdrvBaseLayoutUpdateMethod(ih); +} + +static int motTextMapMethod(Ihandle* ih) +{ + int num_args = 0; + Arg args[30]; + Widget parent = iupChildTreeGetNativeParentHandle(ih); + char* child_id = iupDialogGetChildIdStr(ih); + int spin = 0; + WidgetClass widget_class = xmTextWidgetClass; + + if (ih->data->is_multiline) + { + Widget sb_win; + int wordwrap = 0; + + if (iupAttribGetBoolean(ih, "WORDWRAP")) + { + wordwrap = 1; + ih->data->sb &= ~IUP_SB_HORIZ; /* must remove the horizontal scroolbar */ + } + + /******************************/ + /* Create the scrolled window */ + /******************************/ + + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNscrollingPolicy, XmAPPLICATION_DEFINED); + iupmotSetArg(args, num_args, XmNvisualPolicy, XmVARIABLE); + iupmotSetArg(args, num_args, XmNscrollBarDisplayPolicy, XmSTATIC); /* can NOT be XmAS_NEEDED because XmAPPLICATION_DEFINED */ + iupmotSetArg(args, num_args, XmNspacing, 0); /* no space between scrollbars and text */ + iupmotSetArg(args, num_args, XmNborderWidth, 0); + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + + sb_win = XtCreateManagedWidget( + child_id, /* child identifier */ + xmScrolledWindowWidgetClass, /* widget class */ + parent, /* widget parent */ + args, num_args); + + if (!sb_win) + return IUP_ERROR; + + parent = sb_win; + child_id = "text"; + + num_args = 0; + iupmotSetArg(args, num_args, XmNeditMode, XmMULTI_LINE_EDIT); + if (wordwrap) + iupmotSetArg(args, num_args, XmNwordWrap, True); + } + else + { + widget_class = xmTextFieldWidgetClass; + + if (iupAttribGetBoolean(ih, "SPIN")) + { + Widget spinbox; + + num_args = 0; + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNspacing, 0); /* no space between spin and text */ + iupmotSetArg(args, num_args, XmNborderWidth, 0); + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + iupmotSetArg(args, num_args, XmNmarginHeight, 0); + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + iupmotSetArg(args, num_args, XmNarrowSize, 8); + + if (iupStrEqualNoCase(iupAttribGetStr(ih, "SPINALIGN"), "LEFT")) + iupmotSetArg(args, num_args, XmNarrowLayout, XmARROWS_BEGINNING); + else + iupmotSetArg(args, num_args, XmNarrowLayout, XmARROWS_END); + + spinbox = XtCreateManagedWidget( + child_id, /* child identifier */ + xmSpinBoxWidgetClass, /* widget class */ + parent, /* widget parent */ + args, num_args); + + if (!spinbox) + return IUP_ERROR; + + XtAddCallback(spinbox, XmNmodifyVerifyCallback, (XtCallbackProc)motTextSpinModifyVerifyCallback, (XtPointer)ih); + + parent = spinbox; + child_id = "text"; + spin = 1; + + if (!iupAttribGetBoolean(ih, "SPINAUTO")) + iupAttribSetStr(ih, "_IUPMOT_SPIN_NOAUTO", "1"); + } + + num_args = 0; + iupmotSetArg(args, num_args, XmNeditMode, XmSINGLE_LINE_EDIT); + + if (spin) + { + /* Spin Constraints */ + iupmotSetArg(args, num_args, XmNspinBoxChildType, XmNUMERIC); + iupmotSetArg(args, num_args, XmNminimumValue, 0); + iupmotSetArg(args, num_args, XmNmaximumValue, 100); + iupmotSetArg(args, num_args, XmNposition, 0); + + if (iupAttribGetBoolean(ih, "SPINWRAP")) + iupmotSetArg(args, num_args, XmNwrap, TRUE); + else + iupmotSetArg(args, num_args, XmNwrap, FALSE); + } + else + { + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + } + } + + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + + iupmotSetArg(args, num_args, XmNmarginHeight, 0); /* default padding */ + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + iupmotSetArg(args, num_args, XmNtraversalOn, True); + else + iupmotSetArg(args, num_args, XmNtraversalOn, False); + + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); + iupmotSetArg(args, num_args, XmNhighlightThickness, 2); + iupmotSetArg(args, num_args, XmNverifyBell, False); + iupmotSetArg(args, num_args, XmNspacing, 0); + + if (iupAttribGetBoolean(ih, "BORDER")) + iupmotSetArg(args, num_args, XmNshadowThickness, 2); + else + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + + if (ih->data->is_multiline) + { + if (ih->data->sb & IUP_SB_HORIZ) + iupmotSetArg(args, num_args, XmNscrollHorizontal, True); + else + iupmotSetArg(args, num_args, XmNscrollHorizontal, False); + + if (ih->data->sb & IUP_SB_VERT) + iupmotSetArg(args, num_args, XmNscrollVertical, True); + else + iupmotSetArg(args, num_args, XmNscrollVertical, False); + } + + ih->handle = XtCreateManagedWidget( + child_id, /* child identifier */ + widget_class, /* widget class */ + parent, /* widget parent */ + args, num_args); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + if (ih->data->is_multiline) + { + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)parent); + XtVaSetValues(parent, XmNworkWindow, ih->handle, NULL); + } + else if (spin) + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)parent); + + XtAddCallback(ih->handle, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + XtAddEventHandler(ih->handle, EnterWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, LeaveWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, FocusChangeMask, False, (XtEventHandler)iupmotFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, KeyPressMask, False, (XtEventHandler)motTextKeyPressEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, PointerMotionMask, False, (XtEventHandler)iupmotPointerMotionEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, ButtonPressMask|ButtonReleaseMask, False, (XtEventHandler)iupmotButtonPressReleaseEvent, (XtPointer)ih); + + XtAddCallback(ih->handle, XmNmodifyVerifyCallback, (XtCallbackProc)motTextModifyVerifyCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNmotionVerifyCallback, (XtCallbackProc)motTextMotionVerifyCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNvalueChangedCallback, (XtCallbackProc)motTextValueChangedCallback, (XtPointer)ih); + + /* Disable Drag Source */ + iupmotDisableDragSource(ih->handle); + + /* initialize the widget */ + if (ih->data->is_multiline || spin) + XtRealizeWidget(parent); + else + XtRealizeWidget(ih->handle); + + if (IupGetGlobal("_IUP_RESET_TXTCOLORS")) + { + iupmotSetGlobalColorAttrib(ih->handle, XmNbackground, "TXTBGCOLOR"); + iupmotSetGlobalColorAttrib(ih->handle, XmNforeground, "TXTFGCOLOR"); + IupSetGlobal("_IUP_RESET_TXTCOLORS", NULL); + } + + IupSetCallback(ih, "_IUP_XY2POS_CB", (Icallback)motTextConvertXYToPos); + + return IUP_NOERROR; +} + +void iupdrvTextInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motTextMapMethod; + ic->LayoutUpdate = motTextLayoutUpdateMethod; + + /* Driver Dependent Attribute functions */ + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, motTextSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, iupdrvBaseSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTFGCOLOR", IUPAF_DEFAULT); + + /* IupText only */ + iupClassRegisterAttribute(ic, "PADDING", iupTextGetPaddingAttrib, motTextSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "VALUE", motTextGetValueAttrib, motTextSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTEDTEXT", motTextGetSelectedTextAttrib, motTextSetSelectedTextAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTION", motTextGetSelectionAttrib, motTextSetSelectionAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTIONPOS", motTextGetSelectionPosAttrib, motTextSetSelectionPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARET", motTextGetCaretAttrib, motTextSetCaretAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARETPOS", motTextGetCaretPosAttrib, motTextSetCaretPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "INSERT", NULL, motTextSetInsertAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "APPEND", NULL, motTextSetAppendAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "READONLY", motTextGetReadOnlyAttrib, motTextSetReadOnlyAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "NC", iupTextGetNCAttrib, motTextSetNCAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "CLIPBOARD", NULL, motTextSetClipboardAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FORMATTING", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); /* formatting not supported in Motif */ + iupClassRegisterAttribute(ic, "SCROLLTO", NULL, motTextSetScrollToAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTOPOS", NULL, motTextSetScrollToPosAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINMIN", NULL, motTextSetSpinMinAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINMAX", NULL, motTextSetSpinMaxAttrib, IUPAF_SAMEASSYSTEM, "100", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPININC", NULL, motTextSetSpinIncAttrib, IUPAF_SAMEASSYSTEM, "1", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINVALUE", motTextGetSpinValueAttrib, motTextSetSpinValueAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NO_INHERIT); +} diff --git a/iup/src/mot/iupmot_timer.c b/iup/src/mot/iupmot_timer.c new file mode 100755 index 0000000..d23867e --- /dev/null +++ b/iup/src/mot/iupmot_timer.c @@ -0,0 +1,70 @@ +/** \file + * \brief Timer for the Motif Driver. + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include + +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_assert.h" +#include "iup_timer.h" + +#include "iupmot_drv.h" + + +static void motTimerProc(XtPointer client_data, XtIntervalId *id) +{ + Ihandle *ih = (Ihandle*)client_data; + Icallback cb; + (void)id; + + if (!iupObjectCheck(ih)) /* control could be destroyed before timer callback */ + return; + + ih->serial = -1; + /* we have to restart the timer everytime */ + iupdrvTimerRun(ih); + + cb = IupGetCallback(ih, "ACTION_CB"); + if (cb) + { + if (cb(ih)==IUP_CLOSE) + IupExitLoop(); + } +} + +void iupdrvTimerRun(Ihandle *ih) +{ + unsigned int time_ms; + + if (ih->serial > 0) /* timer already started */ + return; + + time_ms = iupAttribGetInt(ih, "TIME"); + if (time_ms > 0) + ih->serial = XtAppAddTimeOut(iupmot_appcontext, time_ms, motTimerProc, (XtPointer)ih); +} + +void iupdrvTimerStop(Ihandle* ih) +{ + if (ih->serial > 0) + { + XtRemoveTimeOut(ih->serial); + ih->serial = -1; + } +} + +void iupdrvTimerInitClass(Iclass* ic) +{ + (void)ic; +} diff --git a/iup/src/mot/iupmot_tips.c b/iup/src/mot/iupmot_tips.c new file mode 100755 index 0000000..25bdbea --- /dev/null +++ b/iup/src/mot/iupmot_tips.c @@ -0,0 +1,226 @@ +/** \file + * \brief Motif Driver TIPS Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include + +#include "iup.h" + +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +/* Default offset from cursor */ +#define TIP_X_OFFSET 12 +#define TIP_Y_OFFSET 12 + +typedef struct _Imottips +{ + Widget Dialog; + Widget Label; + XtIntervalId ShowTimerId; /* Timer: from enterwin to show tip */ + XtIntervalId HideTimerId; /* Timer: from visible to hide tip */ + unsigned long ShowInterval; /* Time for tipPopupTimerId */ + unsigned long HideInterval; /* Time for tipActiveTimerId */ + int Visible; + Ihandle* ih; +} Imottips; + +static Imottips mot_tips = {0, 0, 0, 0, 0, 0}; + +static void motTipsShow(void) +{ + Window root, child; + int cx, cy, x, y; + unsigned int keys; + char* value; + + XQueryPointer(iupmot_display, RootWindow(iupmot_display, iupmot_screen), + &root, &child, &x, &y, &cx, &cy, &keys); + + value = iupAttribGet(mot_tips.ih, "TIPRECT"); + if (value) + { + int x1, x2, y1, y2, wx = x, wy = y; + sscanf(value, "%d %d %d %d", &x1, &y1, &x2, &y2); + iupdrvScreenToClient(mot_tips.ih, &wx, &wy); + if (wx < x1 || wx > x2 || wy < y1 || wy > y2) + { + iupmotTipLeaveNotify(); + return; + } + } + + XtVaSetValues(mot_tips.Dialog, + XmNx, (XtArgVal)(x+TIP_X_OFFSET), + XmNy, (XtArgVal)(y+TIP_Y_OFFSET), + NULL); + + if (mot_tips.Visible) + XRaiseWindow(iupmot_display, XtWindow(mot_tips.Dialog)); + else + XtMapWidget(mot_tips.Dialog); + + mot_tips.ShowTimerId = (XtIntervalId) NULL; + mot_tips.Visible = TRUE; +} + +static void motTipsHide(void) +{ + mot_tips.HideTimerId = (XtIntervalId) NULL; + iupmotTipLeaveNotify(); +} + +static int motTipsSet(Ihandle *ih) +{ + char* tipText = iupAttribGet(ih, "TIP"); + if (!tipText) + return FALSE; + + if (!mot_tips.Dialog) + { + mot_tips.Dialog = XtVaAppCreateShell(" ", "tip", + overrideShellWidgetClass, iupmot_display, + XmNmappedWhenManaged, False, + NULL); + + mot_tips.Label = XtVaCreateManagedWidget("label tip", + xmLabelWidgetClass, mot_tips.Dialog, /* must use IupGetAttribute to use inheritance */ + XmNforeground, iupmotColorGetPixelStr(IupGetAttribute(ih, "TIPFGCOLOR")), + XmNbackground, iupmotColorGetPixelStr(IupGetAttribute(ih, "TIPBGCOLOR")), + NULL); + + XtRealizeWidget(mot_tips.Dialog); + } + + /* set label font */ + { + XmFontList fontlist = (XmFontList)iupmotGetFontListAttrib(ih); + char* value = iupAttribGetStr(ih, "TIPFONT"); + if (value) + { + if (iupStrEqualNoCase(value, "SYSTEM")) + fontlist = NULL; + else + fontlist = iupmotGetFontList(iupAttribGet(ih, "TIPFOUNDRY"), value); + } + + if (fontlist) + XtVaSetValues(mot_tips.Label, XmNfontList, fontlist, NULL); + } + + /* set label contents */ + iupmotSetString(mot_tips.Label, XmNlabelString, tipText); + + /* set label size */ + { + int lw = 0, lh = 0; + iupdrvFontGetMultiLineStringSize(ih, tipText, &lw, &lh); + + /* add room for margin */ + lw += 2*(2); + lh += 2*(2); + + XtVaSetValues(mot_tips.Label, + XmNwidth, (XtArgVal)lw, + XmNheight, (XtArgVal)lh, + NULL); + XtVaSetValues(mot_tips.Dialog, + XmNwidth, (XtArgVal)lw, + XmNheight, (XtArgVal)lh, + NULL); + } + + mot_tips.ShowTimerId = (XtIntervalId) NULL; + mot_tips.HideTimerId = (XtIntervalId) NULL; + mot_tips.Visible = FALSE; + mot_tips.ShowInterval = 500; /* 1/2 second to show */ + + { + int delay = IupGetInt(ih, "TIPDELAY"); /* must use IupGetInt to use inheritance */ + mot_tips.HideInterval = delay + mot_tips.ShowInterval; + } + + return TRUE; +} + +int iupdrvBaseSetTipVisibleAttrib(Ihandle* ih, const char* value) +{ + /* must use IupGetAttribute to use inheritance */ + if (!IupGetAttribute(ih, "TIP")) + return 0; + + if (iupStrBoolean(value)) + iupmotTipEnterNotify(ih); + else + iupmotTipLeaveNotify(); + + return 0; +} + +void iupmotTipEnterNotify(Ihandle *ih) +{ + iupmotTipLeaveNotify(); + + if (motTipsSet(ih) == FALSE) + return; + + mot_tips.ih = ih; + + mot_tips.ShowTimerId = XtAppAddTimeOut( /* EnterWin to Show */ + iupmot_appcontext, + mot_tips.ShowInterval, + (XtTimerCallbackProc)motTipsShow, + NULL); + mot_tips.HideTimerId = XtAppAddTimeOut( /* Visible to Hide */ + iupmot_appcontext, + mot_tips.HideInterval, + (XtTimerCallbackProc)motTipsHide, + NULL); +} + +void iupmotTipLeaveNotify(void) +{ + if (mot_tips.ShowTimerId) + { + XtRemoveTimeOut(mot_tips.ShowTimerId); + mot_tips.ShowTimerId = (XtIntervalId) NULL; + } + if (mot_tips.HideTimerId) + { + XtRemoveTimeOut(mot_tips.HideTimerId); + mot_tips.HideTimerId = (XtIntervalId) NULL; + } + if (mot_tips.Visible) + { + XtUnmapWidget(mot_tips.Dialog); + mot_tips.Visible = FALSE; + } +} + +void iupmotTipsFinish(void) +{ + if (mot_tips.Dialog) + { + XtDestroyWidget(mot_tips.Dialog); + memset(&mot_tips, 0, sizeof(Imottips)); + } +} + +int iupdrvBaseSetTipAttrib(Ihandle* ih, const char* value) +{ + /* implement this stub here because of the other drivers. */ + (void)ih; + (void)value; + return 1; +} diff --git a/iup/src/mot/iupmot_toggle.c b/iup/src/mot/iupmot_toggle.c new file mode 100755 index 0000000..b18f24d --- /dev/null +++ b/iup/src/mot/iupmot_toggle.c @@ -0,0 +1,469 @@ +/** \file + * \brief Toggle Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_toggle.h" +#include "iup_drv.h" +#include "iup_image.h" +#include "iup_key.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +void iupdrvToggleAddCheckBox(int *x, int *y) +{ + (*x) += 15+6+3; + if ((*y) < 15+6) (*y) = 12+6; /* minimum height */ + (*y) += 6; +} + + +/*********************************************************************************/ + + +static int motToggleSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_TEXT) + { + char* parent_value = iupAttribGetInheritNativeParent(ih, "BGCOLOR"); + if (!parent_value) + { + /* if not defined at a native parent, + then change the toggle button color to the given color instead using the default */ + if (iupdrvBaseSetBgColorAttrib(ih, value)) /* let XmChangeColor do its job */ + { + parent_value = IupGetGlobal("DLGBGCOLOR"); + XtVaSetValues(ih->handle, XmNbackground, iupmotColorGetPixelStr(parent_value), NULL); /* reset just the background */ + + if (ih->data->radio) + XtVaSetValues(ih->handle, XmNselectColor, iupmotColorGetPixel(0, 0, 0), NULL); + XtVaSetValues(ih->handle, XmNunselectColor, iupmotColorGetPixelStr(value), NULL); + return 1; + } + } + else + { + /* ignore given value, must use only from parent */ + if (iupdrvBaseSetBgColorAttrib(ih, parent_value)) + { + if (ih->data->radio) + XtVaSetValues(ih->handle, XmNselectColor, iupmotColorGetPixel(0, 0, 0), NULL); + XtVaSetValues(ih->handle, XmNunselectColor, iupmotColorGetPixelStr(parent_value), NULL); + return 1; + } + } + return 0; + } + else + return iupdrvBaseSetBgColorAttrib(ih, value); +} + +static int motToggleSetBackgroundAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_TEXT) + { + Pixel color; + + /* ignore given value, must use only from parent */ + value = iupAttribGetInheritNativeParent(ih, "BACKGROUND"); + + color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + XtVaSetValues(ih->handle, XmNbackground, color, NULL); + return 1; + } + else + { + Pixmap pixmap = (Pixmap)iupImageGetImage(value, ih, 0); + if (pixmap) + { + XtVaSetValues(ih->handle, XmNbackgroundPixmap, pixmap, NULL); + return 1; + } + } + } + return 0; +} + +static int motToggleSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_TEXT) + { + iupmotSetMnemonicTitle(ih, value); + return 1; + } + + return 0; +} + +static int motToggleSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + unsigned char align; + char value1[30]="", value2[30]=""; + + if (ih->data->type == IUP_TOGGLE_TEXT) + return 0; + + iupStrToStrStr(value, value1, value2, ':'); /* value2 is ignored, NOT supported in Motif */ + + if (iupStrEqualNoCase(value1, "ARIGHT")) + align = XmALIGNMENT_END; + else if (iupStrEqualNoCase(value1, "ACENTER")) + align = XmALIGNMENT_CENTER; + else /* "ALEFT" */ + align = XmALIGNMENT_BEGINNING; + + XtVaSetValues (ih->handle, XmNalignment, align, NULL); + return 1; +} + +static int motToggleSetImageAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + iupmotSetPixmap(ih, value, XmNlabelPixmap, 0); + + if (!iupAttribGet(ih, "IMINACTIVE")) + { + /* if not active and IMINACTIVE is not defined + then automaticaly create one based on IMAGE */ + iupmotSetPixmap(ih, value, XmNlabelInsensitivePixmap, 1); /* make_inactive */ + } + return 1; + } + else + return 0; +} + +static int motToggleSetImInactiveAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + iupmotSetPixmap(ih, value, XmNlabelInsensitivePixmap, 0); + return 1; + } + else + return 0; +} + +static int motToggleSetImPressAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + iupmotSetPixmap(ih, value, XmNselectPixmap, 0); + return 1; + } + else + return 0; +} + +static int motToggleSetValueAttrib(Ihandle* ih, const char* value) +{ + Ihandle *radio; + unsigned char check; + + if (iupStrEqualNoCase(value,"NOTDEF")) + check = XmINDETERMINATE; + else if (iupStrBoolean(value)) + check = XmSET; + else + check = XmUNSET; + + /* This is necessary because Motif toggle does not have support for radio. + It is implemented using an external RadioBox that we do not use. */ + radio = iupRadioFindToggleParent(ih); + if (radio) + { + Ihandle* last_tg; + unsigned char oldcheck; + + XtVaGetValues(ih->handle, XmNset, &oldcheck, NULL); + + last_tg = (Ihandle*)iupAttribGet(radio, "_IUPMOT_LASTTOGGLE"); + if (check) + { + if (iupObjectCheck(last_tg) && last_tg != ih) + XtVaSetValues(last_tg->handle, XmNset, XmUNSET, NULL); + iupAttribSetStr(radio, "_IUPMOT_LASTTOGGLE", (char*)ih); + } + + if (last_tg != ih && oldcheck != check) + XtVaSetValues(ih->handle, XmNset, check, NULL); + } + else + XtVaSetValues(ih->handle, XmNset, check, NULL); + + return 0; +} + +static char* motToggleGetValueAttrib(Ihandle* ih) +{ + unsigned char check = 0; + XtVaGetValues (ih->handle, XmNset, &check, NULL); + if (check == XmINDETERMINATE) + return "NOTDEF"; + else if (check == XmSET) + return "ON"; + else + return "OFF"; +} + +static int motToggleSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + if (ih->handle && ih->data->type == IUP_TOGGLE_IMAGE) + { + XtVaSetValues(ih->handle, XmNmarginHeight, ih->data->vert_padding, + XmNmarginWidth, ih->data->horiz_padding, NULL); + } + return 0; +} + +static char* motToggleGetSelectColorAttrib(Ihandle* ih) +{ + unsigned char r, g, b; + Pixel color; + char* str = iupStrGetMemory(20); + XtVaGetValues(ih->handle, XmNselectColor, &color, NULL); + iupmotColorGetRGB(color, &r, &g, &b); + sprintf(str, "%d %d %d", (int)r, (int)g, (int)b); + return str; +} + +static int motToggleSetSelectColorAttrib(Ihandle* ih, const char *value) +{ + Pixel color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + XtVaSetValues(ih->handle, XmNselectColor, color, NULL); + return 1; +} + +static void motToggleValueChangedCallback(Widget w, Ihandle* ih, XmToggleButtonCallbackStruct* call_data) +{ + Ihandle *radio; + IFni cb; + int check = call_data->set; + + /* Must manually hide the tip if the toggle is pressed. */ + iupmotTipLeaveNotify(); + + /* This is necessary because Motif toggle does not have support for radio. + It is implemented using an external RadioBox that we do not use. */ + radio = iupRadioFindToggleParent(ih); + if (radio) + { + if (check) + { + Ihandle* last_tg = (Ihandle*)iupAttribGet(radio, "_IUPMOT_LASTTOGGLE"); + if (iupObjectCheck(last_tg) && last_tg != ih) + { + /* uncheck last toggle */ + XtVaSetValues(last_tg->handle, XmNset, XmUNSET, NULL); + + cb = (IFni) IupGetCallback(last_tg, "ACTION"); + if (cb && cb(last_tg, 0) == IUP_CLOSE) + IupExitLoop(); + + iupBaseCallValueChangedCb(last_tg); + } + iupAttribSetStr(radio, "_IUPMOT_LASTTOGGLE", (char*)ih); + + if (last_tg != ih) + { + cb = (IFni)IupGetCallback(ih, "ACTION"); + if (cb && cb (ih, 1) == IUP_CLOSE) + IupExitLoop(); + + iupBaseCallValueChangedCb(ih); + } + } + else + { + /* Force stay checked */ + XtVaSetValues(ih->handle, XmNset, XmSET, NULL); + } + } + else + { + if (check == XmINDETERMINATE) + check = -1; + + cb = (IFni)IupGetCallback(ih, "ACTION"); + if (cb) + { + if (cb(ih, check) == IUP_CLOSE) + IupExitLoop(); + } + + iupBaseCallValueChangedCb(ih); + } + + (void)w; +} + +static int motToggleMapMethod(Ihandle* ih) +{ + Ihandle* radio = iupRadioFindToggleParent(ih); + char* value; + int num_args = 0; + Arg args[40]; + + if (radio) + ih->data->radio = 1; + + value = iupAttribGet(ih, "IMAGE"); + if (value) + { + ih->data->type = IUP_TOGGLE_IMAGE; + iupmotSetArg(args, num_args, XmNlabelType, XmPIXMAP); + } + else + { + ih->data->type = IUP_TOGGLE_TEXT; + iupmotSetArg(args, num_args, XmNlabelType, XmSTRING); + } + + /* Core */ + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + /* Primitive */ + if (iupAttribGetBoolean(ih, "CANFOCUS")) + iupmotSetArg(args, num_args, XmNtraversalOn, True); + else + iupmotSetArg(args, num_args, XmNtraversalOn, False); + iupmotSetArg(args, num_args, XmNhighlightThickness, 2); + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); + /* Label */ + iupmotSetArg(args, num_args, XmNrecomputeSize, False); /* no automatic resize from text */ + iupmotSetArg(args, num_args, XmNmarginHeight, 0); /* default padding */ + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + iupmotSetArg(args, num_args, XmNmarginTop, 0); /* no extra margins */ + iupmotSetArg(args, num_args, XmNmarginLeft, 0); + iupmotSetArg(args, num_args, XmNmarginBottom, 0); + iupmotSetArg(args, num_args, XmNmarginRight, 0); + + if (radio) + { + iupmotSetArg(args, num_args, XmNtoggleMode, XmTOGGLE_BOOLEAN); + iupmotSetArg(args, num_args, XmNindicatorType, XmONE_OF_MANY_ROUND); + + if (!iupAttribGet(radio, "_IUPMOT_LASTTOGGLE")) + { + /* this is the first toggle in the radio, and the last toggle with VALUE=ON */ + iupAttribSetStr(ih, "VALUE","ON"); + } + } + else + { + if (ih->data->type == IUP_TOGGLE_TEXT && iupAttribGetBoolean(ih, "3STATE")) + iupmotSetArg(args, num_args, XmNtoggleMode, XmTOGGLE_INDETERMINATE); + else + iupmotSetArg(args, num_args, XmNtoggleMode, XmTOGGLE_BOOLEAN); + iupmotSetArg(args, num_args, XmNindicatorType, XmN_OF_MANY); + } + + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + iupmotSetArg(args, num_args, XmNindicatorOn, XmINDICATOR_NONE); + iupmotSetArg(args, num_args, XmNalignment, XmALIGNMENT_CENTER); + iupmotSetArg(args, num_args, XmNshadowThickness, 2); + } + else + { + iupmotSetArg(args, num_args, XmNspacing, 3); + iupmotSetArg(args, num_args, XmNindicatorOn, XmINDICATOR_CHECK_BOX); + iupmotSetArg(args, num_args, XmNalignment, XmALIGNMENT_BEGINNING); + if (radio) + { + iupmotSetArg(args, num_args, XmNindicatorSize, 13); + iupmotSetArg(args, num_args, XmNselectColor, iupmotColorGetPixel(0, 0, 0)); + } + else + iupmotSetArg(args, num_args, XmNindicatorSize, 15); + + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + iupmotSetArg(args, num_args, XmNdetailShadowThickness, 2); + } + + ih->handle = XtCreateManagedWidget( + iupDialogGetChildIdStr(ih), /* child identifier */ + xmToggleButtonWidgetClass, /* widget class */ + iupChildTreeGetNativeParentHandle(ih), /* widget parent */ + args, num_args); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + XtAddCallback(ih->handle, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + + XtAddEventHandler(ih->handle, EnterWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, LeaveWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + + XtAddEventHandler(ih->handle, FocusChangeMask, False, (XtEventHandler)iupmotFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, KeyPressMask, False, (XtEventHandler)iupmotKeyPressEvent, (XtPointer)ih); + + XtAddCallback(ih->handle, XmNvalueChangedCallback, (XtCallbackProc)motToggleValueChangedCallback, (XtPointer)ih); + + /* Disable Drag Source */ + iupmotDisableDragSource(ih->handle); + + /* initialize the widget */ + XtRealizeWidget(ih->handle); + + if (ih->data->type == IUP_TOGGLE_TEXT) + iupmotSetString(ih->handle, XmNlabelString, ""); + + return IUP_NOERROR; +} + +void iupdrvToggleInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motToggleMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", iupmotGetBgColorAttrib, motToggleSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BACKGROUND", NULL, motToggleSetBackgroundAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, iupdrvBaseSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "TITLE", NULL, motToggleSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupToggle only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", NULL, motToggleSetAlignmentAttrib, IUPAF_SAMEASSYSTEM, "ACENTER:ACENTER", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, motToggleSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMINACTIVE", NULL, motToggleSetImInactiveAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMPRESS", NULL, motToggleSetImPressAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE", motToggleGetValueAttrib, motToggleSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTCOLOR", motToggleGetSelectColorAttrib, motToggleSetSelectColorAttrib, NULL, NULL, IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "PADDING", iupToggleGetPaddingAttrib, motToggleSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); +} diff --git a/iup/src/mot/iupmot_tree.c b/iup/src/mot/iupmot_tree.c new file mode 100755 index 0000000..eb230af --- /dev/null +++ b/iup/src/mot/iupmot_tree.c @@ -0,0 +1,2848 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_dialog.h" +#include "iup_layout.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvinfo.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_key.h" +#include "iup_image.h" +#include "iup_array.h" +#include "iup_tree.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +typedef struct _motTreeItemData +{ + Pixmap image, image_mask; + Pixmap image_expanded, image_expanded_mask; + unsigned char kind; + void* userdata; +} motTreeItemData; + + +static void motTreeShowEditField(Ihandle* ih, Widget wItem); +static int motTreeGetNodeId(Ihandle* ih, Widget wItem); + +typedef int (*motTreeNodeFunc)(Ihandle* ih, Widget wItem, void* userdata); + +static int motTreeForEach(Ihandle* ih, Widget wItem, motTreeNodeFunc func, void* userdata) +{ + WidgetList wItemChildList = NULL; + int i, numChild; + + if (!wItem) + wItem = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + + if (!func(ih, wItem, userdata)) + return 0; + + numChild = XmContainerGetItemChildren(ih->handle, wItem, &wItemChildList); + for (i=0; idata->spacing); + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + iupmotSetArg(args, num_args, XmNviewType, XmSMALL_ICON); + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); + iupmotSetArg(args, num_args, XmNtraversalOn, True); + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + + /* Get values to copy */ + XtVaGetValues(wItem, XmNlabelString, &title, + XmNuserData, &itemData, + XmNforeground, &fgcolor, + XmNsmallIconPixmap, &image, + XmNsmallIconMask, &mask, + XmNoutlineState, &state, + NULL); + + if (full_copy) /* during a full copy the userdata reference is not copied */ + { + /* create a new one */ + motTreeItemData* itemDataNew = malloc(sizeof(motTreeItemData)); + memcpy(itemDataNew, itemData, sizeof(motTreeItemData)); + itemDataNew->userdata = NULL; + itemData = itemDataNew; + } + + iupmotSetArg(args, num_args, XmNlabelString, title); + iupmotSetArg(args, num_args, XmNuserData, itemData); + iupmotSetArg(args, num_args, XmNforeground, fgcolor); + iupmotSetArg(args, num_args, XmNsmallIconPixmap, image); + iupmotSetArg(args, num_args, XmNsmallIconMask, mask); + iupmotSetArg(args, num_args, XmNoutlineState, state); + + iupmotSetArg(args, num_args, XmNentryParent, wParent); + iupmotSetArg(args, num_args, XmNpositionIndex, pos); + + XtVaGetValues(ih->handle, XmNbackground, &bgcolor, NULL); + iupmotSetArg(args, num_args, XmNbackground, bgcolor); + + wNewItem = XtCreateManagedWidget("icon", xmIconGadgetClass, ih->handle, args, num_args); + + /* Root always expanded */ + XtVaSetValues((Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"), XmNoutlineState, XmEXPANDED, NULL); + + XtRealizeWidget(wNewItem); + + return wNewItem; +} + +static void motTreeCopyChildren(Ihandle* ih, Widget wItemSrc, Widget wItemDst, int full_copy) +{ + WidgetList wItemChildList = NULL; + int i = 0; + int numChild = XmContainerGetItemChildren(ih->handle, wItemSrc, &wItemChildList); + while(i != numChild) + { + Widget wNewItem = motTreeCopyItem(ih, wItemChildList[i], wItemDst, i, full_copy); /* Use the same order they where enumerated */ + + /* Recursively transfer all the items */ + motTreeCopyChildren(ih, wItemChildList[i], wNewItem, full_copy); + + /* Go to next sibling item */ + i++; + } + + if (wItemChildList) XtFree((char*)wItemChildList); +} + +/* Copies all items in a branch to a new location. Returns the new branch node. */ +static Widget motTreeCopyNode(Ihandle* ih, Widget wItemSrc, Widget wItemDst, int full_copy) +{ + Widget wNewItem, wParent; + motTreeItemData *itemDataDst; + unsigned char stateDst; + int pos; + + XtVaGetValues(wItemDst, XmNoutlineState, &stateDst, + XmNuserData, &itemDataDst, + NULL); + + if (itemDataDst->kind == ITREE_BRANCH && stateDst == XmEXPANDED) + { + /* copy as first child of expanded branch */ + wParent = wItemDst; + pos = 0; + } + else + { + /* copy as next brother of item or collapsed branch */ + XtVaGetValues(wItemDst, XmNentryParent, &wParent, NULL); + XtVaGetValues(wItemDst, XmNpositionIndex, &pos, NULL); + pos++; + } + + wNewItem = motTreeCopyItem(ih, wItemSrc, wParent, pos, full_copy); + + motTreeCopyChildren(ih, wItemSrc, wNewItem, full_copy); + + return wNewItem; +} + +static void motTreeContainerDeselectAll(Ihandle *ih) +{ + XKeyEvent ev; + + memset(&ev, 0, sizeof(XKeyEvent)); + ev.type = KeyPress; + ev.display = XtDisplay(ih->handle); + ev.send_event = True; + ev.root = RootWindow(iupmot_display, iupmot_screen); + ev.time = clock()*CLOCKS_PER_SEC; + ev.window = XtWindow(ih->handle); + ev.state = ControlMask; + ev.keycode = XK_backslash; + ev.same_screen = True; + + XtCallActionProc(ih->handle, "ContainerDeselectAll", (XEvent*)&ev, 0, 0); +} + +static void motTreeContainerSelectAll(Ihandle *ih) +{ + XKeyEvent ev; + + memset(&ev, 0, sizeof(XKeyEvent)); + ev.type = KeyPress; + ev.display = XtDisplay(ih->handle); + ev.send_event = True; + ev.root = RootWindow(iupmot_display, iupmot_screen); + ev.time = clock()*CLOCKS_PER_SEC; + ev.window = XtWindow(ih->handle); + ev.state = ControlMask; + ev.keycode = XK_slash; + ev.same_screen = True; + + XtCallActionProc(ih->handle, "ContainerSelectAll", (XEvent*)&ev, 0, 0); +} + +static Widget motTreeGetLastVisibleNode(Ihandle* ih, Widget wItem) +{ + unsigned char itemState; + + XtVaGetValues(wItem, XmNoutlineState, &itemState, NULL); + + if (itemState == XmEXPANDED) + { + WidgetList wChildrenTree = NULL; + int numChildren = XmContainerGetItemChildren(ih->handle, wItem, &wChildrenTree); + if(numChildren) + wItem = motTreeGetLastVisibleNode(ih, wChildrenTree[numChildren - 1]); + if (wChildrenTree) XtFree((char*)wChildrenTree); + } + + return wItem; +} + +static Widget motTreeFindVisibleNodeId(Ihandle* ih, WidgetList itemList, int numItems, Widget itemNode) +{ + Widget itemChild; + WidgetList itemChildList; + int i = 0; + int numChild; + unsigned char itemState; + + while(i != numItems) + { + /* ID control to traverse items */ + ih->data->id_control++; /* not the real id since it counts only the visible ones */ + + /* StateID founded! */ + if(itemList[i] == itemNode) + return itemList[i]; + + /* Check whether we have child items */ + itemChildList = NULL; + numChild = XmContainerGetItemChildren(ih->handle, itemList[i], &itemChildList); + XtVaGetValues(itemList[i], XmNoutlineState, &itemState, NULL); + + /* The itemWidget has child and it is expanded (visible) */ + if (numChild && itemState == XmEXPANDED) + { + /* pass the list of children of this item */ + itemChild = motTreeFindVisibleNodeId(ih, itemChildList, numChild, itemNode); + + /* StateID founded! */ + if(itemChild) + { + XtFree((char*)itemChildList); + return itemChild; + } + } + + if (itemChildList) XtFree((char*)itemChildList); + /* Go to next sibling item */ + i++; + } + + return NULL; +} + +static Widget motTreeFindVisibleNodeFromId(Ihandle* ih, WidgetList itemList, int numItems) +{ + Widget itemChild; + WidgetList itemChildList; + int i = 0; + int numChild; + unsigned char itemState; + + while(i != numItems) + { + /* ID control to traverse items */ + ih->data->id_control--; /* not the real id since it counts only the visible ones */ + + /* StateID founded! */ + if(ih->data->id_control < 0) + return itemList[i]; + + /* Check whether we have child items */ + itemChildList = NULL; + numChild = XmContainerGetItemChildren(ih->handle, itemList[i], &itemChildList); + XtVaGetValues(itemList[i], XmNoutlineState, &itemState, NULL); + + /* The itemWidget has child and it is expanded (visible) */ + if (numChild && itemState == XmEXPANDED) + { + /* pass the list of children of this item */ + itemChild = motTreeFindVisibleNodeFromId(ih, itemChildList, numChild); + + /* StateID founded! */ + if(ih->data->id_control < 0) + { + if (itemChildList) XtFree((char*)itemChildList); + return itemChild; + } + } + + if (itemChildList) XtFree((char*)itemChildList); + /* Go to next sibling item */ + i++; + } + + return NULL; +} + +static Widget motTreeGetNextVisibleNode(Ihandle* ih, Widget wRoot, Widget wItem) +{ + Widget wNext; + + ih->data->id_control = -1; + motTreeFindVisibleNodeId(ih, &wRoot, 1, wItem); + ih->data->id_control++; /* more 1 visible node */ + + wNext = motTreeFindVisibleNodeFromId(ih, &wRoot, 1); + + if (ih->data->id_control >= 0) + wNext = motTreeGetLastVisibleNode(ih, wRoot); + + return wNext; +} + +static Widget motTreeGetPreviousVisibleNode(Ihandle* ih, Widget wRoot, Widget wItem) +{ + ih->data->id_control = -1; + motTreeFindVisibleNodeId(ih, &wRoot, 1, wItem); + ih->data->id_control--; /* less 1 visible node */ + + if (ih->data->id_control < 0) + ih->data->id_control = 0; /* Begin of tree = Root id */ + + return motTreeFindVisibleNodeFromId(ih, &wRoot, 1); +} + +static void motTreeUpdateBgColor(Ihandle* ih, WidgetList itemList, int numItems, Pixel bgcolor) +{ + WidgetList itemChildList; + int i = 0; + int numChild; + + while(i != numItems) + { + XtVaSetValues(itemList[i], XmNbackground, bgcolor, NULL); + + /* Check whether we have child items */ + itemChildList = NULL; + numChild = XmContainerGetItemChildren(ih->handle, itemList[i], &itemChildList); + if(numChild) + motTreeUpdateBgColor(ih, itemChildList, numChild, bgcolor); + if (itemChildList) XtFree((char*)itemChildList); + + /* Go to next sibling item */ + i++; + } +} + +static void motTreeUpdateImages(Ihandle* ih, WidgetList itemList, int numItems, int mode) +{ + motTreeItemData *itemData; + int i = 0; + + /* called when one of the default images is changed */ + + while(i != numItems) + { + /* Get node attributes */ + XtVaGetValues(itemList[i], XmNuserData, &itemData, NULL); + + if (itemData->kind == ITREE_BRANCH) + { + unsigned char itemState; + XtVaGetValues(itemList[i], XmNoutlineState, &itemState, NULL); + + if (itemState == XmEXPANDED) + { + if (mode == ITREE_UPDATEIMAGE_EXPANDED) + { + XtVaSetValues(itemList[i], XmNsmallIconPixmap, (itemData->image_expanded!=XmUNSPECIFIED_PIXMAP)? itemData->image_expanded: (Pixmap)ih->data->def_image_expanded, NULL); + XtVaSetValues(itemList[i], XmNsmallIconMask, (itemData->image_expanded_mask!=XmUNSPECIFIED_PIXMAP)? itemData->image_expanded_mask: (Pixmap)ih->data->def_image_expanded_mask, NULL); + } + } + else + { + if (mode == ITREE_UPDATEIMAGE_COLLAPSED) + { + XtVaSetValues(itemList[i], XmNsmallIconPixmap, (itemData->image!=XmUNSPECIFIED_PIXMAP)? itemData->image: (Pixmap)ih->data->def_image_collapsed, NULL); + XtVaSetValues(itemList[i], XmNsmallIconMask, (itemData->image_mask!=XmUNSPECIFIED_PIXMAP)? itemData->image_mask: (Pixmap)ih->data->def_image_collapsed_mask, NULL); + } + } + + /* Recursively traverse child items */ + { + WidgetList itemChildList; + int numChild; + itemChildList = NULL; + numChild = XmContainerGetItemChildren(ih->handle, itemList[i], &itemChildList); + motTreeUpdateImages(ih, itemChildList, numChild, mode); + if (itemChildList) XtFree((char*)itemChildList); + } + } + else + { + if (mode == ITREE_UPDATEIMAGE_LEAF) + { + XtVaSetValues(itemList[i], XmNsmallIconPixmap, (itemData->image!=XmUNSPECIFIED_PIXMAP)? itemData->image: (Pixmap)ih->data->def_image_leaf, NULL); + XtVaSetValues(itemList[i], XmNsmallIconMask, (itemData->image_mask!=XmUNSPECIFIED_PIXMAP)? itemData->image_mask: (Pixmap)ih->data->def_image_leaf_mask, NULL); + } + } + + /* Go to next sibling node */ + i++; + } +} + +static int motTreeSelectFunc(Ihandle* ih, Widget wItem, int *select) +{ + int do_select = *select; + if (do_select == -1) + { + unsigned char isSelected; + XtVaGetValues(wItem, XmNvisualEmphasis, &isSelected, NULL); + do_select = (isSelected == XmSELECTED)? 0: 1; /* toggle */ + } + + if (do_select) + XtVaSetValues(wItem, XmNvisualEmphasis, XmSELECTED, NULL); + else + XtVaSetValues(wItem, XmNvisualEmphasis, XmNOT_SELECTED, NULL); + + (void)ih; + return 1; +} + +static void motTreeInvertAllNodeMarking(Ihandle* ih) +{ + int select = -1; + motTreeForEach(ih, NULL, (motTreeNodeFunc)motTreeSelectFunc, &select); +} + +typedef struct _motTreeRange{ + Widget wItem1, wItem2; + char inside, clear; +}motTreeRange; + +static int motTreeSelectRangeFunc(Ihandle* ih, Widget wItem, motTreeRange* range) +{ + int end_range = 0; + + if (range->inside == 0) /* detect the range start */ + { + if (range->wItem1 == wItem) range->inside=1; + else if (range->wItem2 == wItem) range->inside=1; + } + else if (range->inside == 1) /* detect the range end */ + { + if (range->wItem1 == wItem) end_range=1; + else if (range->wItem2 == wItem) end_range=1; + } + + if (range->inside == 1) /* if inside, select */ + XtVaSetValues(wItem, XmNvisualEmphasis, XmSELECTED, NULL); + else if (range->clear) /* if outside and clear, unselect */ + XtVaSetValues(wItem, XmNvisualEmphasis, XmNOT_SELECTED, NULL); + + if (end_range || (range->inside && range->wItem1==range->wItem2)) + range->inside=-1; /* update after selecting the node */ + + (void)ih; + return 1; +} + +static void motTreeSelectRange(Ihandle* ih, Widget wItem1, Widget wItem2, int clear) +{ + motTreeRange range; + range.wItem1 = wItem1; + range.wItem2 = wItem2; + range.inside = 0; + range.clear = (char)clear; + motTreeForEach(ih, NULL, (motTreeNodeFunc)motTreeSelectRangeFunc, &range); +} + +void motTreeExpandCollapseAllNodes(Ihandle* ih, WidgetList itemList, int numItems, unsigned char itemState) +{ + WidgetList itemChildList; + int numChild; + int i = 0; + + while(i != numItems) + { + /* Check whether we have child items */ + itemChildList = NULL; + numChild = XmContainerGetItemChildren(ih->handle, itemList[i], &itemChildList); + + if(numChild) + { + XtVaSetValues(itemList[i], XmNoutlineState, itemState, NULL); + motTreeExpandCollapseAllNodes(ih, itemChildList, numChild, itemState); + } + + if (itemChildList) XtFree((char*)itemChildList); + /* Go to next sibling item */ + i++; + } +} + +static void motTreeDestroyItemData(Ihandle* ih, Widget wItem) +{ + motTreeItemData *itemData = NULL; + XtVaGetValues(wItem, XmNuserData, &itemData, NULL); + if (itemData) + { + IFnis cb = (IFnis)IupGetCallback(ih, "NODEREMOVED_CB"); + if (cb) cb(ih, motTreeGetNodeId(ih, wItem), (char*)itemData->userdata); + free(itemData); + XtVaSetValues(wItem, XmNuserData, NULL, NULL); + } +} + +static void motTreeRemoveChildren(Ihandle* ih, WidgetList itemList, int numItems, int del_userdata) +{ + WidgetList itemChildList; + int numChild; + int i = 0; + + while(i != numItems) + { + /* Check whether we have child items */ + itemChildList = NULL; + numChild = XmContainerGetItemChildren(ih->handle, itemList[i], &itemChildList); + if (numChild) + motTreeRemoveChildren(ih, itemChildList, numChild, del_userdata); + + if (del_userdata) + motTreeDestroyItemData(ih, itemList[i]); + + XtDestroyWidget(itemList[i]); + + if (itemChildList) XtFree((char*)itemChildList); + /* Go to next sibling item */ + i++; + } +} + +static void motTreeRemoveNode(Ihandle* ih, Widget wItem, int del_userdata) +{ + WidgetList wChildList = NULL; + int numChild = XmContainerGetItemChildren(ih->handle, wItem, &wChildList); + if (numChild) + motTreeRemoveChildren(ih, wChildList, numChild, del_userdata); + if (del_userdata) + motTreeDestroyItemData(ih, wItem); + XtDestroyWidget(wItem); + if (wChildList) XtFree((char*)wChildList); +} + +static Widget motTreeFindNodeID(Ihandle* ih, WidgetList itemList, int numItems, Widget itemNode) +{ + Widget itemChild; + WidgetList itemChildList; + int i = 0; + int numChild; + + while(i != numItems) + { + /* ID control to traverse items */ + ih->data->id_control++; + + /* StateID founded! */ + if(itemList[i] == itemNode) + return itemList[i]; + + /* Check whether we have child items */ + itemChildList = NULL; + numChild = XmContainerGetItemChildren(ih->handle, itemList[i], &itemChildList); + if(numChild) + { + /* pass the list of children of this item */ + itemChild = motTreeFindNodeID(ih, itemChildList, numChild, itemNode); + + /* StateID founded! */ + if(itemChild) + { + if (itemChildList) XtFree((char*)itemChildList); + return itemChild; + } + } + + if (itemChildList) XtFree((char*)itemChildList); + /* Go to next sibling item */ + i++; + } + + return NULL; +} + +static Widget motTreeFindNodeFromID(Ihandle* ih, WidgetList itemList, int numItems) +{ + Widget itemChild; + WidgetList itemChildList; + int i = 0; + int numChild; + + while(i != numItems) + { + /* ID control to traverse items */ + ih->data->id_control--; + + /* StateID founded! */ + if(ih->data->id_control < 0) + return itemList[i]; + + /* Check whether we have child items */ + itemChildList = NULL; + numChild = XmContainerGetItemChildren(ih->handle, itemList[i], &itemChildList); + if(numChild) + { + /* pass the list of children of this item */ + itemChild = motTreeFindNodeFromID(ih, itemChildList, numChild); + + /* StateID founded! */ + if(ih->data->id_control < 0) + { + if (itemChildList) XtFree((char*)itemChildList); + return itemChild; + } + } + + if (itemChildList) XtFree((char*)itemChildList); + /* Go to next sibling item */ + i++; + } + + return NULL; +} + +static int motTreeGetNodeId(Ihandle* ih, Widget wItem) +{ + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + ih->data->id_control = -1; + if (motTreeFindNodeID(ih, &wRoot, 1, wItem)) + return ih->data->id_control; + else + return -1; +} + +static Widget motTreeFindUserDataID(Ihandle* ih, WidgetList itemList, int numItems, void* userdata) +{ + Widget itemChild; + WidgetList itemChildList; + motTreeItemData *itemData; + int i = 0; + int numChild; + + while(i != numItems) + { + /* ID control to traverse items */ + ih->data->id_control++; + + XtVaGetValues(itemList[i], XmNuserData, &itemData, NULL); + + /* StateID founded! */ + if(itemData->userdata == userdata) + return itemList[i]; + + /* Check whether we have child items */ + itemChildList = NULL; + numChild = XmContainerGetItemChildren(ih->handle, itemList[i], &itemChildList); + if(numChild) + { + /* pass the list of children of this item */ + itemChild = motTreeFindUserDataID(ih, itemChildList, numChild, userdata); + + /* StateID founded! */ + if (itemChild) + { + if (itemChildList) XtFree((char*)itemChildList); + return itemChild; + } + } + + if (itemChildList) XtFree((char*)itemChildList); + /* Go to next sibling item */ + i++; + } + + return NULL; +} + +static int motTreeGetUserDataId(Ihandle* ih, void* userdata) +{ + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + ih->data->id_control = -1; + if (motTreeFindUserDataID(ih, &wRoot, 1, userdata)) + return ih->data->id_control; + else + return -1; +} + +static void motTreeSetFocusNode(Ihandle* ih, Widget wItem) +{ + iupAttribSetStr(ih, "_IUPTREE_LAST_FOCUS", (char*)wItem); + XmProcessTraversal(wItem, XmTRAVERSE_CURRENT); +} + +static Widget motTreeGetFocusNode(Ihandle* ih) +{ + Widget wItem = XmGetFocusWidget(ih->handle); /* returns the focus in the dialog */ + if (wItem && XtParent(wItem) == ih->handle) /* is a node */ + return wItem; + + return (Widget)iupAttribGet(ih, "_IUPTREE_LAST_FOCUS"); +} + +static Widget motTreeFindNodeFromString(Ihandle* ih, const char* name_id) +{ + if (name_id[0]) + { + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + iupStrToInt(name_id, &ih->data->id_control); + return motTreeFindNodeFromID(ih, &wRoot, 1); + } + else + return motTreeGetFocusNode(ih); +} + +static void motTreeEnterLeaveWindowEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont) +{ + if (iupAttribGet(ih, "_IUPTREE_EDITFIELD")) + return; + + /* usually when one Gadget is selected different than the previous one, + leave/enter events are generated. But we could not find the exact condition, + so this is a workaround. Some leave events will be lost. */ + if (evt->type == EnterNotify) + { + if (iupAttribGet(ih, "_IUPTREE_IGNORE_ENTERLEAVE")) + { + iupAttribSetStr(ih, "_IUPTREE_IGNORE_ENTERLEAVE", NULL); + return; + } + } + else if (evt->type == LeaveNotify) + { + if (iupAttribGet(ih, "_IUPTREE_IGNORE_ENTERLEAVE")) + return; + } + + iupmotEnterLeaveWindowEvent(w, ih, evt, cont); +} + +static void motTreeFocusChangeEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont) +{ + unsigned char selpol; + Widget wItem = XmGetFocusWidget(w); /* returns the focus in the dialog */ + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + + if (XtParent(wItem) == w) /* is a node */ + iupAttribSetStr(ih, "_IUPTREE_LAST_FOCUS", (char*)wItem); + + if (wItem == NULL || wItem == wRoot) + { + iupmotFocusChangeEvent(w, ih, evt, cont); + return; + } + + XtVaGetValues(w, XmNselectionPolicy, &selpol, NULL); + if (selpol != XmSINGLE_SELECT) + return; + + if (evt->type == FocusIn && !iupStrBoolean(IupGetGlobal("CONTROLKEY"))) + { + XtVaSetValues(w, XmNselectedObjects, NULL, NULL); + XtVaSetValues(w, XmNselectedObjectCount, 0, NULL); + XtVaSetValues(wItem, XmNvisualEmphasis, XmSELECTED, NULL); + } +} + +void iupdrvTreeAddNode(Ihandle* ih, const char* name_id, int kind, const char* title, int add) +{ + Widget wItemPrev = motTreeFindNodeFromString(ih, name_id); + Widget wNewItem; + XmString itemTitle; + motTreeItemData *itemData, *itemDataPrev; + Pixel bgcolor, fgcolor; + int kindPrev, num_args = 0; + Arg args[30]; + + if (!wItemPrev) + return; + + itemData = calloc(1, sizeof(motTreeItemData)); + itemData->image = XmUNSPECIFIED_PIXMAP; + itemData->image_expanded = XmUNSPECIFIED_PIXMAP; + itemData->image_mask = XmUNSPECIFIED_PIXMAP; + itemData->image_expanded_mask = XmUNSPECIFIED_PIXMAP; + itemData->kind = (unsigned char)kind; + + itemTitle = XmStringCreateLocalized((String)title); + + /* Get default colors */ + XtVaGetValues(ih->handle, XmNforeground, &fgcolor, NULL); + XtVaGetValues(ih->handle, XmNbackground, &bgcolor, NULL); + + /* Get the kind of previous item */ + XtVaGetValues(wItemPrev, XmNuserData, &itemDataPrev, NULL); + kindPrev = itemDataPrev->kind; + + if (kindPrev == ITREE_BRANCH && add) + { + /* wItemPrev is parent of the new item (firstchild of it) */ + iupmotSetArg(args, num_args, XmNentryParent, wItemPrev); + iupmotSetArg(args, num_args, XmNpositionIndex, 0); + } + else + { + /* wItemPrev is sibling of the new item (set its parent to the new item) */ + Widget wItemParent; + int pos; + + XtVaGetValues(wItemPrev, XmNentryParent, &wItemParent, NULL); + XtVaGetValues(wItemPrev, XmNpositionIndex, &pos, NULL); + + iupmotSetArg(args, num_args, XmNentryParent, wItemParent); + iupmotSetArg(args, num_args, XmNpositionIndex, pos+1); + } + + iupmotSetArg(args, num_args, XmNuserData, itemData); + iupmotSetArg(args, num_args, XmNforeground, fgcolor); + iupmotSetArg(args, num_args, XmNbackground, bgcolor); + iupmotSetArg(args, num_args, XmNmarginHeight, ih->data->spacing); + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + iupmotSetArg(args, num_args, XmNviewType, XmSMALL_ICON); + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); + iupmotSetArg(args, num_args, XmNtraversalOn, True); + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + iupmotSetArg(args, num_args, XmNlabelString, itemTitle); + + if (kind == ITREE_BRANCH) + { + if (ih->data->add_expanded) + { + iupmotSetArg(args, num_args, XmNsmallIconPixmap, ih->data->def_image_expanded); + iupmotSetArg(args, num_args, XmNsmallIconMask, ih->data->def_image_expanded_mask); + } + else + { + iupmotSetArg(args, num_args, XmNsmallIconPixmap, ih->data->def_image_collapsed); + iupmotSetArg(args, num_args, XmNsmallIconMask, ih->data->def_image_collapsed_mask); + } + } + else + { + iupmotSetArg(args, num_args, XmNsmallIconPixmap, ih->data->def_image_leaf); + iupmotSetArg(args, num_args, XmNsmallIconMask, ih->data->def_image_leaf_mask); + } + + + wNewItem = XtCreateManagedWidget("icon", xmIconGadgetClass, ih->handle, args, num_args); + + if (kind == ITREE_BRANCH) + { + if (ih->data->add_expanded) + { + iupAttribSetStr(ih, "_IUP_IGNORE_BRANCHOPEN", "1"); + XtVaSetValues(wNewItem, XmNoutlineState, XmEXPANDED, NULL); + } + else + XtVaSetValues(wNewItem, XmNoutlineState, XmCOLLAPSED, NULL); + } + + /* Root always expanded */ + XtVaSetValues((Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"), XmNoutlineState, XmEXPANDED, NULL); + + XtRealizeWidget(wNewItem); + XmStringFree(itemTitle); +} + +static void motTreeAddRootNode(Ihandle* ih) +{ + Widget wRootItem; + motTreeItemData *itemData; + Pixel bgcolor, fgcolor; + int num_args = 0; + Arg args[30]; + + itemData = calloc(1, sizeof(motTreeItemData)); + itemData->image = XmUNSPECIFIED_PIXMAP; + itemData->image_expanded = XmUNSPECIFIED_PIXMAP; + itemData->image_mask = XmUNSPECIFIED_PIXMAP; + itemData->image_expanded_mask = XmUNSPECIFIED_PIXMAP; + itemData->kind = ITREE_BRANCH; + + /* Get default foreground color */ + XtVaGetValues(ih->handle, XmNforeground, &fgcolor, NULL); + XtVaGetValues(ih->handle, XmNbackground, &bgcolor, NULL); + + iupmotSetArg(args, num_args, XmNentryParent, NULL); + iupmotSetArg(args, num_args, XmNuserData, itemData); + iupmotSetArg(args, num_args, XmNforeground, fgcolor); + iupmotSetArg(args, num_args, XmNbackground, bgcolor); + iupmotSetArg(args, num_args, XmNoutlineState, XmEXPANDED); + iupmotSetArg(args, num_args, XmNmarginHeight, ih->data->spacing); + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + iupmotSetArg(args, num_args, XmNviewType, XmSMALL_ICON); + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); + iupmotSetArg(args, num_args, XmNtraversalOn, True); + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + iupmotSetArg(args, num_args, XmNsmallIconPixmap, ih->data->def_image_expanded); + iupmotSetArg(args, num_args, XmNsmallIconMask, ih->data->def_image_expanded_mask); + + wRootItem = XtCreateManagedWidget("icon", xmIconGadgetClass, ih->handle, args, num_args); + + /* Select the new item */ + XtVaSetValues(wRootItem, XmNvisualEmphasis, XmSELECTED, NULL); + + XtRealizeWidget(wRootItem); + + /* Save the root node for later use */ + iupAttribSetStr(ih, "_IUPTREE_ROOTITEM", (char*)wRootItem); + + /* MarkStart node */ + iupAttribSetStr(ih, "_IUPTREE_MARKSTART_NODE", (char*)wRootItem); + + /* Set the default VALUE */ + /* In Motif this will set also the current focus */ + motTreeSetFocusNode(ih, wRootItem); +} + +/*****************************************************************************/ + +static int motTreeSetImageExpandedAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + motTreeItemData *itemData; + unsigned char itemState; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return 0; + + XtVaGetValues(wItem, XmNuserData, &itemData, NULL); + XtVaGetValues(wItem, XmNoutlineState, &itemState, NULL); + itemData->image_expanded = (Pixmap)iupImageGetImage(value, ih, 0); + if (!itemData->image_expanded) + { + itemData->image_expanded = XmUNSPECIFIED_PIXMAP; + itemData->image_expanded_mask = XmUNSPECIFIED_PIXMAP; + } + else + { + itemData->image_expanded_mask = (Pixmap)iupImageGetMask(value); + if (!itemData->image_expanded_mask) itemData->image_expanded_mask = XmUNSPECIFIED_PIXMAP; + } + + if (itemData->kind == ITREE_BRANCH && itemState == XmEXPANDED) + { + if (itemData->image_expanded == XmUNSPECIFIED_PIXMAP) + XtVaSetValues(wItem, XmNsmallIconPixmap, (Pixmap)ih->data->def_image_expanded, + XmNsmallIconMask, (Pixmap)ih->data->def_image_expanded_mask, + NULL); + else + XtVaSetValues(wItem, XmNsmallIconPixmap, itemData->image_expanded, + XmNsmallIconMask, itemData->image_expanded_mask, + NULL); + } + + return 1; +} + +static int motTreeSetImageAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + motTreeItemData *itemData; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return 0; + + XtVaGetValues(wItem, XmNuserData, &itemData, NULL); + itemData->image = (Pixmap)iupImageGetImage(value, ih, 0); + if (!itemData->image) + { + itemData->image = XmUNSPECIFIED_PIXMAP; + itemData->image_mask = XmUNSPECIFIED_PIXMAP; + } + else + { + itemData->image_mask = (Pixmap)iupImageGetMask(value); + if (!itemData->image_mask) itemData->image_mask = XmUNSPECIFIED_PIXMAP; + } + + if (itemData->kind == ITREE_BRANCH) + { + unsigned char itemState; + XtVaGetValues(wItem, XmNoutlineState, &itemState, NULL); + if (itemState == XmCOLLAPSED) + { + if (itemData->image == XmUNSPECIFIED_PIXMAP) + XtVaSetValues(wItem, XmNsmallIconPixmap, (Pixmap)ih->data->def_image_collapsed, + XmNsmallIconMask, (Pixmap)ih->data->def_image_collapsed_mask, + NULL); + else + XtVaSetValues(wItem, XmNsmallIconPixmap, itemData->image, + XmNsmallIconMask, itemData->image_mask, + NULL); + } + } + else + { + if (itemData->image == XmUNSPECIFIED_PIXMAP) + XtVaSetValues(wItem, XmNsmallIconPixmap, (Pixmap)ih->data->def_image_leaf, + XmNsmallIconMask, (Pixmap)ih->data->def_image_leaf_mask, + NULL); + else + XtVaSetValues(wItem, XmNsmallIconPixmap, itemData->image, + XmNsmallIconMask, itemData->image_mask, + NULL); + } + + return 1; +} + +static int motTreeSetImageBranchExpandedAttrib(Ihandle* ih, const char* value) +{ + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + ih->data->def_image_expanded = iupImageGetImage(value, ih, 0); + if (!ih->data->def_image_expanded) + { + ih->data->def_image_expanded = (void*)XmUNSPECIFIED_PIXMAP; + ih->data->def_image_expanded_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + else + { + ih->data->def_image_expanded_mask = iupImageGetMask(value); + if (!ih->data->def_image_expanded_mask) ih->data->def_image_expanded_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + + /* Update all images, starting at root node */ + motTreeUpdateImages(ih, &wRoot, 1, ITREE_UPDATEIMAGE_EXPANDED); + + return 1; +} + +static int motTreeSetImageBranchCollapsedAttrib(Ihandle* ih, const char* value) +{ + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + ih->data->def_image_collapsed = iupImageGetImage(value, ih, 0); + if (!ih->data->def_image_collapsed) + { + ih->data->def_image_collapsed = (void*)XmUNSPECIFIED_PIXMAP; + ih->data->def_image_collapsed_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + else + { + ih->data->def_image_collapsed_mask = iupImageGetMask(value); + if (!ih->data->def_image_collapsed_mask) ih->data->def_image_collapsed_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + + /* Update all images, starting at root node */ + motTreeUpdateImages(ih, &wRoot, 1, ITREE_UPDATEIMAGE_COLLAPSED); + + return 1; +} + +static int motTreeSetImageLeafAttrib(Ihandle* ih, const char* value) +{ + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + ih->data->def_image_leaf = iupImageGetImage(value, ih, 0); + if (!ih->data->def_image_leaf) + { + ih->data->def_image_leaf = (void*)XmUNSPECIFIED_PIXMAP; + ih->data->def_image_leaf_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + else + { + ih->data->def_image_leaf_mask = iupImageGetMask(value); + if (!ih->data->def_image_leaf_mask) ih->data->def_image_leaf_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + + /* Update all images, starting at root node */ + motTreeUpdateImages(ih, &wRoot, 1, ITREE_UPDATEIMAGE_LEAF); + + return 1; +} + +static char* motTreeGetStateAttrib(Ihandle* ih, const char* name_id) +{ + int hasChildren; + unsigned char itemState; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return 0; + + XtVaGetValues(wItem, XmNnumChildren, &hasChildren, NULL); + XtVaGetValues(wItem, XmNoutlineState, &itemState, NULL); + + if (hasChildren) + { + if(itemState == XmEXPANDED) + return "EXPANDED"; + else + return "COLLAPSED"; + } + + return NULL; +} + +static int motTreeSetStateAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return 0; + + if (iupStrEqualNoCase(value, "EXPANDED")) + XtVaSetValues(wItem, XmNoutlineState, XmEXPANDED, NULL); + else + XtVaSetValues(wItem, XmNoutlineState, XmCOLLAPSED, NULL); + + return 0; +} + +static char* motTreeGetColorAttrib(Ihandle* ih, const char* name_id) +{ + unsigned char r, g, b; + Pixel color; + char* str; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return NULL; + + XtVaGetValues(wItem, XmNforeground, &color, NULL); + iupmotColorGetRGB(color, &r, &g, &b); + + str = iupStrGetMemory(20); + sprintf(str, "%d %d %d", (int)r, (int)g, (int)b); + return str; +} + +static int motTreeSetColorAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + Pixel color; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return 0; + + color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + XtVaSetValues(wItem, XmNforeground, color, NULL); + return 0; +} + +static char* motTreeGetDepthAttrib(Ihandle* ih, const char* name_id) +{ + Widget wRoot; + int dep = 0; + char* depth; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return NULL; + + wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + + while((wRoot != wItem) && (wItem != NULL)) + { + XtVaGetValues(wItem, XmNentryParent, &wItem, NULL); + dep++; + } + + depth = iupStrGetMemory(10); + sprintf(depth, "%d", dep); + return depth; +} + +static int motTreeSetMoveNodeAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + Widget wItemDst, wParent, wItemSrc; + + if (!ih->handle) /* do not store the action before map */ + return 0; + wItemSrc = motTreeFindNodeFromString(ih, name_id); + if (!wItemSrc) + return 0; + wItemDst = motTreeFindNodeFromString(ih, value); + if (!wItemDst) + return 0; + + /* If Drag item is an ancestor of Drop item then return */ + wParent = wItemDst; + while(wParent) + { + XtVaGetValues(wParent, XmNentryParent, &wParent, NULL); + if (wParent == wItemSrc) + return 0; + } + + /* Copying the node and its children to the new position */ + motTreeCopyNode(ih, wItemSrc, wItemDst, 0); /* not a full copy, preserve user data */ + + /* Deleting the node (and its children) inserted into the old position */ + motTreeRemoveNode(ih, wItemSrc, 0); /* do not delete the user data, we copy the references in CopyNode */ + + return 0; +} + +static int motTreeSetCopyNodeAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + Widget wItemDst, wParent, wItemSrc; + + if (!ih->handle) /* do not store the action before map */ + return 0; + wItemSrc = motTreeFindNodeFromString(ih, name_id); + if (!wItemSrc) + return 0; + wItemDst = motTreeFindNodeFromString(ih, value); + if (!wItemDst) + return 0; + + /* If Drag item is an ancestor of Drop item then return */ + wParent = wItemDst; + while(wParent) + { + XtVaGetValues(wParent, XmNentryParent, &wParent, NULL); + if (wParent == wItemSrc) + return 0; + } + + /* Copying the node and its children to the new position */ + motTreeCopyNode(ih, wItemSrc, wItemDst, 1); + + return 0; +} + +static char* motTreeGetParentAttrib(Ihandle* ih, const char* name_id) +{ + Widget wItemParent; + char* str; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return NULL; + + /* get the parent item */ + XtVaGetValues(wItem, XmNentryParent, &wItemParent, NULL); + if (!wItemParent) + return NULL; + + str = iupStrGetMemory(10); + sprintf(str, "%d", motTreeGetNodeId(ih, wItemParent)); + return str; +} + +static char* motTreeGetChildCountAttrib(Ihandle* ih, const char* name_id) +{ + char* str; + WidgetList wList = NULL; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return NULL; + + str = iupStrGetMemory(10); + sprintf(str, "%d", XmContainerGetItemChildren(ih->handle, wItem, &wList)); + if (wList) XtFree((char*)wList); + return str; +} + +static int motTreeCount(Ihandle* ih, Widget wItem) +{ + WidgetList wList = NULL; + int i, count = 0; + int childCount = XmContainerGetItemChildren(ih->handle, wItem, &wList); + count++; + for (i=0; ikind == ITREE_BRANCH) + return "BRANCH"; + else + return "LEAF"; +} + +static char* motTreeGetValueAttrib(Ihandle* ih) +{ + char* str; + Widget wItem = motTreeGetFocusNode(ih); + if (!wItem) + return "0"; /* default VALUE is root */ + + str = iupStrGetMemory(10); + sprintf(str, "%d", motTreeGetNodeId(ih, wItem)); + return str; +} + +static int motTreeSetMarkAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->mark_mode==ITREE_MARK_SINGLE) + return 0; + + if(iupStrEqualNoCase(value, "CLEARALL")) + motTreeContainerDeselectAll(ih); + else if(iupStrEqualNoCase(value, "MARKALL")) + motTreeContainerSelectAll(ih); + else if(iupStrEqualNoCase(value, "INVERTALL")) /* INVERTALL *MUST* appear before INVERT, or else INVERTALL will never be called. */ + motTreeInvertAllNodeMarking(ih); + else if(iupStrEqualPartial(value, "INVERT")) + { + unsigned char isSelected; + Widget wItem = motTreeFindNodeFromString(ih, &value[strlen("INVERT")]); + if (!wItem) + return 0; + + XtVaGetValues(wItem, XmNvisualEmphasis, &isSelected, NULL); + if (isSelected == XmSELECTED) + XtVaSetValues(wItem, XmNvisualEmphasis, XmNOT_SELECTED, NULL); + else + XtVaSetValues(wItem, XmNvisualEmphasis, XmSELECTED, NULL); + } + else if(iupStrEqualNoCase(value, "BLOCK")) + { + Widget wItem = (Widget)iupAttribGet(ih, "_IUPTREE_MARKSTART_NODE"); + Widget wFocusItem = motTreeGetFocusNode(ih); + if(!wFocusItem || !wItem) + return 0; + motTreeSelectRange(ih, wFocusItem, wItem, 0); + } + else + { + Widget wItem1, wItem2; + char str1[50], str2[50]; + if (iupStrToStrStr(value, str1, str2, '-')!=2) + return 0; + + wItem1 = motTreeFindNodeFromString(ih, str1); + if (!wItem1) + return 0; + wItem2 = motTreeFindNodeFromString(ih, str2); + if (!wItem2) + return 0; + + motTreeSelectRange(ih, wItem1, wItem2, 0); + } + + return 1; +} + +static int motTreeSetValueAttrib(Ihandle* ih, const char* value) +{ + Widget wRoot, wItem; + + if (motTreeSetMarkAttrib(ih, value)) + return 0; + + wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + + if (iupStrEqualNoCase(value, "ROOT")) + wItem = wRoot; + else if(iupStrEqualNoCase(value, "LAST")) + wItem = motTreeGetLastVisibleNode(ih, wRoot); + else if(iupStrEqualNoCase(value, "PGUP")) + { + Widget wItemFocus = motTreeGetFocusNode(ih); + if(!wItemFocus) + return 0; + + ih->data->id_control = -1; + motTreeFindVisibleNodeId(ih, &wRoot, 1, wItemFocus); + ih->data->id_control -= 10; /* less 10 visible nodes */ + + if(ih->data->id_control < 0) + ih->data->id_control = 0; /* Begin of tree = Root id */ + + wItem = motTreeFindVisibleNodeFromId(ih, &wRoot, 1); + } + else if(iupStrEqualNoCase(value, "PGDN")) + { + Widget wNext, wItemFocus; + + wItemFocus = motTreeGetFocusNode(ih); + if(!wItemFocus) + return 0; + + ih->data->id_control = -1; + motTreeFindVisibleNodeId(ih, &wRoot, 1, wItemFocus); + ih->data->id_control += 10; /* more 10 visible nodes */ + + wNext = motTreeFindVisibleNodeFromId(ih, &wRoot, 1); + + if (ih->data->id_control >= 0) + wNext = motTreeGetLastVisibleNode(ih, wRoot); + + wItem = wNext; + } + else if(iupStrEqualNoCase(value, "NEXT")) + { + Widget wItemFocus = motTreeGetFocusNode(ih); + if (!wItemFocus) + return 0; + + wItem = motTreeGetNextVisibleNode(ih, wRoot, wItemFocus); + } + else if(iupStrEqualNoCase(value, "PREVIOUS")) + { + Widget wItemFocus = motTreeGetFocusNode(ih); + if(!wItemFocus) + return 0; + + wItem = motTreeGetPreviousVisibleNode(ih, wRoot, wItemFocus); + } + else + wItem = motTreeFindNodeFromString(ih, value); + + if (!wItem) + return 0; + + /* select */ + if (ih->data->mark_mode==ITREE_MARK_SINGLE) + { + /* clear previous selection */ + XtVaSetValues(ih->handle, XmNselectedObjects, NULL, NULL); + XtVaSetValues(ih->handle, XmNselectedObjectCount, 0, NULL); + + XtVaSetValues(wItem, XmNvisualEmphasis, XmSELECTED, NULL); + } + + /* set focus (will scroll to visible) */ + motTreeSetFocusNode(ih, wItem); + + iupAttribSetInt(ih, "_IUPTREE_OLDVALUE", motTreeGetNodeId(ih, wItem)); + + return 0; +} + +static int motTreeSetMarkStartAttrib(Ihandle* ih, const char* name_id) +{ + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return 0; + + iupAttribSetStr(ih, "_IUPTREE_MARKSTART_NODE", (char*)wItem); + + return 1; +} + +static char* motTreeGetMarkedAttrib(Ihandle* ih, const char* name_id) +{ + unsigned char isSelected; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return NULL; + + XtVaGetValues(wItem, XmNvisualEmphasis, &isSelected, NULL); + + if(isSelected == XmSELECTED) + return "YES"; + else + return "NO"; +} + +static int motTreeSetMarkedAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return 0; + + if (iupStrBoolean(value)) + XtVaSetValues(wItem, XmNvisualEmphasis, XmSELECTED, NULL); + else + XtVaSetValues(wItem, XmNvisualEmphasis, XmNOT_SELECTED, NULL); + + return 0; +} + +static char* motTreeGetTitle(Widget wItem) +{ + char *title; + XmString itemTitle; + XtVaGetValues(wItem, XmNlabelString, &itemTitle, NULL); + title = iupmotConvertString(itemTitle); + XmStringFree(itemTitle); + return title; +} + +static char* motTreeGetTitleAttrib(Ihandle* ih, const char* name_id) +{ + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return NULL; + return motTreeGetTitle(wItem); +} + +static int motTreeSetTitleAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return 0; + + iupmotSetString(wItem, XmNlabelString, value); + + return 0; +} + +static int motTreeSetTitleFontAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + XmFontList fontlist = NULL; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return 0; + + if (value) + { + char attr[20]; + sprintf(attr, "TITLEFOUNDRY%s", name_id); + fontlist = iupmotGetFontList(iupAttribGet(ih, attr), value); + } + XtVaSetValues(wItem, XmNrenderTable, fontlist, NULL); + + return 0; +} + +static char* motTreeGetTitleFontAttrib(Ihandle* ih, const char* name_id) +{ + XmFontList fontlist; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return NULL; + + XtVaGetValues(wItem, XmNrenderTable, &fontlist, NULL); + return iupmotFindFontList(fontlist); +} + +static char* motTreeGetFindUserDataAttrib(Ihandle* ih, const char* name_id) +{ + int id; + char* str = (char*)(name_id+1); /* skip ':' */ + void* userdata = NULL; + if (sscanf(str, "%p", &userdata)!=1) + return NULL; + id = motTreeGetUserDataId(ih, userdata); + if (id == -1) + return NULL; + str = iupStrGetMemory(16); + sprintf(str, "%d", id); + return str; +} + +static char* motTreeGetUserDataAttrib(Ihandle* ih, const char* name_id) +{ + motTreeItemData *itemData; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return NULL; + + XtVaGetValues(wItem, XmNuserData, &itemData, NULL); + + return itemData->userdata; +} + +static int motTreeSetUserDataAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + motTreeItemData *itemData; + Widget wItem = motTreeFindNodeFromString(ih, name_id); + if (!wItem) + return 0; + + XtVaGetValues(wItem, XmNuserData, &itemData, NULL); + itemData->userdata = (void*)value; + + return 0; +} + +static int motTreeSetRenameAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->show_rename) + { + IFni cbShowRename = (IFni)IupGetCallback(ih, "SHOWRENAME_CB"); + Widget wItemFocus = motTreeGetFocusNode(ih); + if (cbShowRename) + cbShowRename(ih, motTreeGetNodeId(ih, wItemFocus)); + motTreeShowEditField(ih, wItemFocus); + } + else + { + IFnis cbRenameNode = (IFnis)IupGetCallback(ih, "RENAMENODE_CB"); + if (cbRenameNode) + { + Widget wItemFocus = motTreeGetFocusNode(ih); + cbRenameNode(ih, motTreeGetNodeId(ih, wItemFocus), motTreeGetTitle(wItemFocus)); + } + } + + (void)value; + return 0; +} + +static int motTreeSetDelNodeAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + if(iupStrEqualNoCase(value, "SELECTED")) /* selected here means the specified one */ + { + Widget wItem = motTreeFindNodeFromString(ih, name_id); + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + + /* the root node can't be deleted */ + if(!wItem || wItem == wRoot) /* root is the unique child */ + return 0; + + /* deleting the specified node (and it's children) */ + motTreeRemoveNode(ih, wItem, 1); + } + else if(iupStrEqualNoCase(value, "CHILDREN")) /* children of the specified one */ + { + Widget wItem = motTreeFindNodeFromString(ih, name_id); + + if(!wItem) + return 0; + + { + /* deleting the selected node's children only */ + WidgetList wItemList = NULL; + int numChild = XmContainerGetItemChildren(ih->handle, wItem, &wItemList); + if(numChild) + motTreeRemoveChildren(ih, wItemList, numChild, 1); + if (wItemList) XtFree((char*)wItemList); + } + } + else if(iupStrEqualNoCase(value, "MARKED")) /* Delete the array of marked nodes */ + { + WidgetList wSelectedItemList = NULL; + Widget wRoot; + int countItems, i; + + XtVaGetValues(ih->handle, XmNselectedObjects, &wSelectedItemList, + XmNselectedObjectCount, &countItems, NULL); + + wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + + for(i = 0; i < countItems; i++) + { + int ok = XmIsIconGadget(wSelectedItemList[i]); + if ((wSelectedItemList[i] != wRoot) && ok) /* the root node can't be deleted */ + motTreeRemoveNode(ih, wSelectedItemList[i], 1); + } + } + + return 0; +} + +static char* motTreeGetIndentationAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(255); + Dimension indent; + XtVaGetValues(ih->handle, XmNoutlineIndentation, &indent, NULL); + sprintf(str, "%d", (int)indent); + return str; +} + +static int motTreeSetIndentationAttrib(Ihandle* ih, const char* value) +{ + int indent; + if (iupStrToInt(value, &indent)) + XtVaSetValues(ih->handle, XmNoutlineIndentation, (Dimension)indent, NULL); + return 0; +} + +static int motTreeSetTopItemAttrib(Ihandle* ih, const char* value) +{ + Widget wItem = motTreeFindNodeFromString(ih, value); + Widget sb_win; + Widget wItemParent; + + if (!wItem) + return 0; + + /* expand all parents */ + XtVaGetValues(wItem, XmNentryParent, &wItemParent, NULL); + while(wItemParent) + { + XtVaSetValues(wItemParent, XmNoutlineState, XmEXPANDED, NULL); + XtVaGetValues(wItemParent, XmNentryParent, &wItemParent, NULL); + } + + sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + XmScrollVisible(sb_win, wItem, 0, 0); + + return 0; +} + +static int motTreeSpacingFunc(Ihandle* ih, Widget wItem, void *data) +{ + XtVaSetValues(wItem, XmNmarginHeight, ih->data->spacing, NULL); + (void)data; + return 1; +} + +static int motTreeSetSpacingAttrib(Ihandle* ih, const char* value) +{ + if (!iupStrToInt(value, &ih->data->spacing)) + ih->data->spacing = 1; + + if (ih->data->spacing < 1) + ih->data->spacing = 1; + + if (ih->handle) + { + motTreeForEach(ih, NULL, (motTreeNodeFunc)motTreeSpacingFunc, 0); + return 0; + } + else + return 1; /* store until not mapped, when mapped will be set again */ +} + +static int motTreeSetExpandAllAttrib(Ihandle* ih, const char* value) +{ + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + + if (iupStrBoolean(value)) + motTreeExpandCollapseAllNodes(ih, &wRoot, 1, XmEXPANDED); + else + { + motTreeExpandCollapseAllNodes(ih, &wRoot, 1, XmCOLLAPSED); + + /* The root node is always expanded */ + XtVaSetValues((Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"), XmNoutlineState, XmEXPANDED, NULL); + } + + return 0; +} + +static int motTreeSetBgColorAttrib(Ihandle* ih, const char* value) +{ + Widget sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + Pixel color; + + /* ignore given value for the scrollbars, must use only from parent */ + char* parent_value = iupBaseNativeParentGetBgColor(ih); + + color = iupmotColorGetPixelStr(parent_value); + if (color != (Pixel)-1) + { + Widget sb = NULL; + + iupmotSetBgColor(sb_win, color); + + XtVaGetValues(sb_win, XmNverticalScrollBar, &sb, NULL); + if (sb) iupmotSetBgColor(sb, color); + + XtVaGetValues(sb_win, XmNhorizontalScrollBar, &sb, NULL); + if (sb) iupmotSetBgColor(sb, color); + } + + color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + Widget wRoot; + Widget clipwin = NULL; + + XtVaGetValues(sb_win, XmNclipWindow, &clipwin, NULL); + if (clipwin) iupmotSetBgColor(clipwin, color); + + wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + + /* Update all children, starting at root node */ + motTreeUpdateBgColor(ih, &wRoot, 1, color); + } + + iupdrvBaseSetBgColorAttrib(ih, value); /* use given value for contents */ + + /* update internal image cache */ + iupTreeUpdateImages(ih); + + return 1; +} + +static int motTreeSetFgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + XtVaSetValues(ih->handle, XmNforeground, color, NULL); + + return 1; +} + +void iupdrvTreeUpdateMarkMode(Ihandle *ih) +{ + XtVaSetValues(ih->handle, XmNselectionPolicy, (ih->data->mark_mode==ITREE_MARK_SINGLE)? XmSINGLE_SELECT: XmEXTENDED_SELECT, NULL); +} + +/************************************************************************************************/ + + +static void motTreeSetRenameCaretPos(Widget cbEdit, const char* value) +{ + int pos = 1; + + if (iupStrToInt(value, &pos)) + { + if (pos < 1) pos = 1; + pos--; /* IUP starts at 1 */ + + XtVaSetValues(cbEdit, XmNcursorPosition, pos, NULL); + } +} + +static void motTreeSetRenameSelectionPos(Widget cbEdit, const char* value) +{ + int start = 1, end = 1; + + if (iupStrToIntInt(value, &start, &end, ':') != 2) + return; + + if(start < 1 || end < 1) + return; + + start--; /* IUP starts at 1 */ + end--; + + XmTextSetSelection(cbEdit, start, end, CurrentTime); +} + +/*****************************************************************************/ + +static int motTreeCallBranchCloseCb(Ihandle* ih, Widget wItem) +{ + IFni cbBranchClose = (IFni)IupGetCallback(ih, "BRANCHCLOSE_CB"); + + if(cbBranchClose) + return cbBranchClose(ih, motTreeGetNodeId(ih, wItem)); + + return IUP_DEFAULT; +} + +static int motTreeCallBranchOpenCb(Ihandle* ih, Widget wItem) +{ + IFni cbBranchOpen; + + if (iupAttribGet(ih, "_IUP_IGNORE_BRANCHOPEN")) + { + iupAttribSetStr(ih, "_IUP_IGNORE_BRANCHOPEN", NULL); + return IUP_DEFAULT; + } + + cbBranchOpen = (IFni)IupGetCallback(ih, "BRANCHOPEN_CB"); + if (cbBranchOpen) + return cbBranchOpen(ih, motTreeGetNodeId(ih, wItem)); + + return IUP_DEFAULT; +} + +static void motTreeCallMultiSelectionCb(Ihandle* ih) +{ + IFnIi cbMulti = (IFnIi)IupGetCallback(ih, "MULTISELECTION_CB"); + IFnii cbSelec = (IFnii)IupGetCallback(ih, "SELECTION_CB"); + WidgetList wSelectedItemList = NULL; + Widget wRoot; + int countItems; + + wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + + XtVaGetValues(ih->handle, XmNselectedObjects, &wSelectedItemList, + XmNselectedObjectCount, &countItems, NULL); + if (countItems == 0) + return; + + if (cbMulti || cbSelec) + { + int* id_rowItem = malloc(sizeof(int) * countItems); + int i = 0; + + for(i = 0; i < countItems; i++) + id_rowItem[i] = motTreeGetNodeId(ih, wSelectedItemList[i]); + + if (cbMulti) + cbMulti(ih, id_rowItem, countItems); + else + { + for (i=0; ihandle, (Position)x, (Position)y); + if (wItem) + return motTreeGetNodeId(ih, wItem); + return -1; +} + +static void motTreeCallRightClickCb(Ihandle* ih, int x, int y) +{ + IFni cbRightClick = (IFni)IupGetCallback(ih, "RIGHTCLICK_CB"); + if (cbRightClick) + { + int id = motTreeConvertXYToPos(ih, x, y); + if (id != -1) + cbRightClick(ih, id); + } +} + +static void motTreeCallRenameCb(Ihandle* ih) +{ + IFnis cbRename; + Widget wItem, wEdit; + int ignore = 0; + String title = NULL; + + wItem = (Widget)iupAttribGet(ih, "_IUPTREE_SELECTED"); + wEdit = (Widget)iupAttribGet(ih, "_IUPTREE_EDITFIELD"); + + XtVaGetValues((Widget)iupAttribGet(ih, "_IUPTREE_EDITFIELD"), XmNvalue, &title, NULL); + + cbRename = (IFnis)IupGetCallback(ih, "RENAME_CB"); + if (cbRename) + { + if (cbRename(ih, motTreeGetNodeId(ih, wItem), title) == IUP_IGNORE) + ignore = 1; + } + + if (!ignore) + iupmotSetString(wItem, XmNlabelString, title); + + XtDestroyWidget(wEdit); + + iupAttribSetStr(ih, "_IUPTREE_EDITFIELD", NULL); + iupAttribSetStr(ih, "_IUPTREE_SELECTED", NULL); +} + +static int motTreeCallDragDropCb(Ihandle* ih, Widget wItemDrag, Widget wItemDrop, int *is_ctrl) +{ + IFniiii cbDragDrop = (IFniiii)IupGetCallback(ih, "DRAGDROP_CB"); + int is_shift = 0; + char key[5]; + iupdrvGetKeyState(key); + if (key[0] == 'S') + is_shift = 1; + if (key[1] == 'C') + *is_ctrl = 1; + else + *is_ctrl = 0; + + if (cbDragDrop) + { + int drag_id = motTreeGetNodeId(ih, wItemDrag); + int drop_id = motTreeGetNodeId(ih, wItemDrop); + return cbDragDrop(ih, drag_id, drop_id, is_shift, *is_ctrl); + } + + return IUP_CONTINUE; /* allow to move by default if callback not defined */ +} + +static void motTreeEditFocusChangeEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont) +{ + if (evt->type == FocusOut) + motTreeCallRenameCb(ih); + + (void)cont; + (void)w; +} + +static void motTreeEditKeyPressEvent(Widget w, Ihandle *ih, XKeyEvent *evt, Boolean *cont) +{ + KeySym motcode = XKeycodeToKeysym(iupmot_display, evt->keycode, 0); + if (motcode == XK_Return) + { + Widget wItem = (Widget)iupAttribGet(ih, "_IUPTREE_SELECTED"); + motTreeCallRenameCb(ih); + motTreeSetFocusNode(ih, wItem); + } + else if (motcode == XK_Escape) + { + Widget wEdit = (Widget)iupAttribGet(ih, "_IUPTREE_EDITFIELD"); + Widget wItem = (Widget)iupAttribGet(ih, "_IUPTREE_SELECTED"); + + XtDestroyWidget(wEdit); + motTreeSetFocusNode(ih, wItem); + + iupAttribSetStr(ih, "_IUPTREE_EDITFIELD", NULL); + iupAttribSetStr(ih, "_IUPTREE_SELECTED", NULL); + } + + (void)cont; + (void)w; +} + +static void motTreeScrollbarOffset(Widget sb_win, Position *x, Position *y) +{ + Widget sb_horiz, sb_vert; + XtVaGetValues(sb_win, XmNhorizontalScrollBar, &sb_horiz, NULL); + if (sb_horiz) + { + int pos; + XtVaGetValues(sb_horiz, XmNvalue, &pos, NULL); + *x = *x - (Position)pos; + } + XtVaGetValues(sb_win, XmNverticalScrollBar, &sb_vert, NULL); + if (sb_vert) + { + int pos; + XtVaGetValues(sb_vert, XmNvalue, &pos, NULL); + *y = *y - (Position)pos; + } +} + +static void motTreeShowEditField(Ihandle* ih, Widget wItem) +{ + int num_args = 0, w_img = 0; + Arg args[30]; + Position x, y; + Dimension w, h; + char* child_id = iupDialogGetChildIdStr(ih); + Widget cbEdit; + XmString title; + char* value; + Pixel color; + Pixmap image = XmUNSPECIFIED_PIXMAP; + XmFontList fontlist; + Widget sb_win = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); + + XtVaGetValues(wItem, XmNx, &x, + XmNy, &y, + XmNwidth, &w, + XmNheight, &h, + XmNlabelString, &title, + XmNsmallIconPixmap, &image, + XmNforeground, &color, + XmNrenderTable, &fontlist, + NULL); + + motTreeScrollbarOffset(sb_win, &x, &y); + iupdrvImageGetInfo((void*)image, &w_img, NULL, NULL); + w_img += 3; /* add some room for borders */ + + iupmotSetArg(args, num_args, XmNx, x+w_img); /* x-position */ + iupmotSetArg(args, num_args, XmNy, y); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, w-w_img); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, h); /* default height to avoid 0 */ + iupmotSetArg(args, num_args, XmNmarginHeight, ih->data->spacing); /* default padding */ + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + iupmotSetArg(args, num_args, XmNforeground, color); + iupmotSetArg(args, num_args, XmNrenderTable, fontlist); + iupmotSetArg(args, num_args, XmNvalue, iupmotConvertString(title)); + iupmotSetArg(args, num_args, XmNtraversalOn, True); + + cbEdit = XtCreateManagedWidget( + child_id, /* child identifier */ + xmTextWidgetClass, /* widget class */ + sb_win, + args, num_args); + + /* Disable Drag Source */ + iupmotDisableDragSource(cbEdit); + + XtAddEventHandler(cbEdit, EnterWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(cbEdit, LeaveWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(cbEdit, FocusChangeMask, False, (XtEventHandler)motTreeEditFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(cbEdit, KeyPressMask, False, (XtEventHandler)motTreeEditKeyPressEvent, (XtPointer)ih); + + iupAttribSetStr(ih, "_IUPTREE_SELECTED", (char*)wItem); + iupAttribSetStr(ih, "_IUPTREE_EDITFIELD", (char*)cbEdit); + + XmProcessTraversal(cbEdit, XmTRAVERSE_CURRENT); + + XmTextSetSelection(cbEdit, (XmTextPosition)0, (XmTextPosition)XmTextGetLastPosition(cbEdit), CurrentTime); + + value = iupAttribGetStr(ih, "RENAMECARET"); + if (value) + motTreeSetRenameCaretPos(cbEdit, value); + + value = iupAttribGetStr(ih, "RENAMESELECTION"); + if (value) + motTreeSetRenameSelectionPos(cbEdit, value); + + /* the parents callbacks can be called while editing + so we must avoid their processing if _IUPTREE_EDITFIELD is defined. */ +} + +static void motTreeSelectionCallback(Widget w, Ihandle* ih, XmContainerSelectCallbackStruct *nptr) +{ + IFnii cbSelec; + int is_ctrl = 0; + (void)w; + (void)nptr; + +printf("SelectionCallback(%d)\n", nptr->selected_item_count); + + if (ih->data->mark_mode == ITREE_MARK_MULTIPLE) + { + char key[5]; + iupdrvGetKeyState(key); + if (key[0] == 'S') + return; + else if (key[1] == 'C') + is_ctrl = 1; + + if (nptr->selected_item_count>1 && !is_ctrl) + { + if (IupGetCallback(ih, "MULTISELECTION_CB")) + { + if (nptr->auto_selection_type==XmAUTO_NO_CHANGE) + motTreeCallMultiSelectionCb(ih); + } + else + { + if (nptr->auto_selection_type==XmAUTO_MOTION) + motTreeCallMultiSelectionCb(ih); + } + return; + } + } + + cbSelec = (IFnii)IupGetCallback(ih, "SELECTION_CB"); + if (cbSelec) + { + Widget wItemFocus = motTreeGetFocusNode(ih); + int curpos = motTreeGetNodeId(ih, wItemFocus); + if (is_ctrl) + { + unsigned char isSelected; + XtVaGetValues(wItemFocus, XmNvisualEmphasis, &isSelected, NULL); + cbSelec(ih, curpos, isSelected == XmSELECTED? 1: 0); + } + else + { + int oldpos = iupAttribGetInt(ih, "_IUPTREE_OLDVALUE"); + if (oldpos != curpos) + { + cbSelec(ih, oldpos, 0); /* unselected */ + cbSelec(ih, curpos, 1); /* selected */ + + iupAttribSetInt(ih, "_IUPTREE_OLDVALUE", curpos); + } + } + } +} + +static void motTreeDefaultActionCallback(Widget w, Ihandle* ih, XmContainerSelectCallbackStruct *nptr) +{ + unsigned char itemState; + WidgetList wSelectedItemList = NULL; + int countItems; + motTreeItemData *itemData; + Widget wItem; + (void)w; + + wSelectedItemList = nptr->selected_items; + countItems = nptr->selected_item_count; + + if (!countItems || (Widget)iupAttribGet(ih, "_IUPTREE_EDITFIELD")) + return; + + /* this works also when using multiple selection */ + wItem = wSelectedItemList[0]; + + XtVaGetValues(wItem, XmNoutlineState, &itemState, + XmNuserData, &itemData, NULL); + + if (itemData->kind == ITREE_BRANCH) + { + if (itemState == XmEXPANDED) + XtVaSetValues(wItem, XmNoutlineState, XmCOLLAPSED, NULL); + else + XtVaSetValues(wItem, XmNoutlineState, XmEXPANDED, NULL); + } + else + { + IFni cbExecuteLeaf = (IFni)IupGetCallback(ih, "EXECUTELEAF_CB"); + if (cbExecuteLeaf) + cbExecuteLeaf(ih, motTreeGetNodeId(ih, wItem)); + } +} + +static void motTreeOutlineChangedCallback(Widget w, Ihandle* ih, XmContainerOutlineCallbackStruct *nptr) +{ + motTreeItemData *itemData; + XtVaGetValues(nptr->item, XmNuserData, &itemData, NULL); + + if (nptr->reason == XmCR_EXPANDED) + { + if (motTreeCallBranchOpenCb(ih, nptr->item) == IUP_IGNORE) + nptr->new_outline_state = XmCOLLAPSED; /* prevent the change */ + else + { + XtVaSetValues(nptr->item, XmNsmallIconPixmap, (itemData->image_expanded!=XmUNSPECIFIED_PIXMAP)? itemData->image_expanded: (Pixmap)ih->data->def_image_expanded, NULL); + XtVaSetValues(nptr->item, XmNsmallIconMask, (itemData->image_expanded_mask!=XmUNSPECIFIED_PIXMAP)? itemData->image_expanded_mask: (Pixmap)ih->data->def_image_expanded_mask, NULL); + } + } + else if (nptr->reason == XmCR_COLLAPSED) + { + if (motTreeCallBranchCloseCb(ih, nptr->item) == IUP_IGNORE) + nptr->new_outline_state = XmEXPANDED; /* prevent the change */ + else + { + XtVaSetValues(nptr->item, XmNsmallIconPixmap, (itemData->image!=XmUNSPECIFIED_PIXMAP)? itemData->image: (Pixmap)ih->data->def_image_collapsed, NULL); + XtVaSetValues(nptr->item, XmNsmallIconMask, (itemData->image_mask!=XmUNSPECIFIED_PIXMAP)? itemData->image_mask: (Pixmap)ih->data->def_image_collapsed_mask, NULL); + } + } + + (void)w; +} + +static void motTreeTraverseObscuredCallback(Widget widget, Ihandle* ih, XmTraverseObscuredCallbackStruct *cbs) +{ + (void)ih; + /* allow to do automatic scroll when navigating in the tree */ + XmScrollVisible(widget, cbs->traversal_destination, 10, 10); +} + +static void motTreeKeyReleaseEvent(Widget w, Ihandle *ih, XKeyEvent *evt, Boolean *cont) +{ + KeySym motcode; + + if (iupAttribGet(ih, "_IUPTREE_EDITFIELD")) + return; + + motcode = XKeycodeToKeysym(iupmot_display, evt->keycode, 0); + if (motcode == XK_Down || motcode == XK_U || motcode == XK_Home || motcode == XK_End) + { + if (ih->data->mark_mode==ITREE_MARK_MULTIPLE && (evt->state & ShiftMask)) + motTreeCallMultiSelectionCb(ih); + } + + (void)w; + (void)cont; +} + +static void motTreeKeyPressEvent(Widget w, Ihandle *ih, XKeyEvent *evt, Boolean *cont) +{ + KeySym motcode; + + if (iupAttribGet(ih, "_IUPTREE_EDITFIELD")) + return; + + *cont = True; + iupmotKeyPressEvent(w, ih, (XEvent*)evt, cont); + if (*cont == False) + return; + + motcode = XKeycodeToKeysym(iupmot_display, evt->keycode, 0); + if (motcode == XK_F2) + motTreeSetRenameAttrib(ih, NULL); + else if (motcode == XK_F1) + iupmotHelpCallback(w, ih, NULL); + else if ((motcode == XK_Down || motcode == XK_Up) && (evt->state & ControlMask)) + { + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + Widget wItem; + Widget wItemFocus = motTreeGetFocusNode(ih); + + /* Ctrl+Arrows move only focus */ + if (motcode == XK_Down) + wItem = motTreeGetNextVisibleNode(ih, wRoot, wItemFocus); + else + wItem = motTreeGetPreviousVisibleNode(ih, wRoot, wItemFocus); + + motTreeSetFocusNode(ih, wItem); + *cont = False; + } + else if(motcode == XK_Home || motcode == XK_End) + { + Widget wRoot = (Widget)iupAttribGet(ih, "_IUPTREE_ROOTITEM"); + Widget wItem; + + /* Not processed by Motif */ + + if (motcode == XK_Home) + wItem = wRoot; + else + wItem = motTreeGetLastVisibleNode(ih, wRoot); + + /* Ctrl+Arrows move only focus */ + if (!(evt->state & ControlMask)) + { + /* Shift+Arrows select block */ + if (evt->state & ShiftMask) + { + Widget wItemFocus = motTreeGetFocusNode(ih); + if (!wItemFocus) + return; + motTreeSelectRange(ih, wItemFocus, wItem, 1); + } + else + { + /* clear previous selection */ + XtVaSetValues(ih->handle, XmNselectedObjects, NULL, NULL); + XtVaSetValues(ih->handle, XmNselectedObjectCount, 0, NULL); + + XtVaSetValues(wItem, XmNvisualEmphasis, XmSELECTED, NULL); + } + } + + motTreeSetFocusNode(ih, wItem); + *cont = False; + } + else if(motcode == XK_space && (evt->state & ControlMask)) + { + Widget wItemFocus = motTreeGetFocusNode(ih); + if (wItemFocus) + { + unsigned char isSelected; + XtVaGetValues(wItemFocus, XmNvisualEmphasis, &isSelected, NULL); + if (isSelected == XmSELECTED) + XtVaSetValues(wItemFocus, XmNvisualEmphasis, XmNOT_SELECTED, NULL); + else + XtVaSetValues(wItemFocus, XmNvisualEmphasis, XmSELECTED, NULL); + } + } +} + +static void motTreeButtonEvent(Widget w, Ihandle* ih, XButtonEvent* evt, Boolean* cont) +{ + (void)w; + (void)cont; + + if (iupAttribGet(ih, "_IUPTREE_EDITFIELD")) + return; + + *cont = True; + iupmotButtonPressReleaseEvent(w, ih, (XEvent*)evt, cont); + if (*cont == False) + return; + + if (evt->type==ButtonPress) + { + iupAttribSetStr(ih, "_IUPTREE_IGNORE_ENTERLEAVE", "1"); + + if (evt->button==Button1) + { + Widget wItemFocus = motTreeGetFocusNode(ih); + static Widget wLastItem = NULL; + static Time last = 0; + int clicktwice = 0, doubleclicktime = XtGetMultiClickTime(iupmot_display); + int elapsed = (int)(evt->time - last); + last = evt->time; + + /* stay away from double click and leave some room for clicks */ + if (elapsed > (3*doubleclicktime)/2 && elapsed <= 3*doubleclicktime) + clicktwice = 1; + + if (clicktwice && wLastItem && wLastItem==wItemFocus) + { + motTreeSetRenameAttrib(ih, NULL); + *cont = False; + } + wLastItem = wItemFocus; + } + else if (evt->button==Button3) + motTreeCallRightClickCb(ih, evt->x, evt->y); + } + else if (evt->type==ButtonRelease) + { + if (evt->button==Button1) + { + if (ih->data->mark_mode==ITREE_MARK_MULTIPLE && (evt->state & ShiftMask)) + motTreeCallMultiSelectionCb(ih); + } + } +} + +static void motTreeTransferProc(Widget drop_context, XtPointer client_data, Atom *seltype, Atom *type, XtPointer value, unsigned long *length, int format) +{ + Atom atomTreeItem = XInternAtom(iupmot_display, "TREE_ITEM", False); + Widget wItemDrop = (Widget)client_data; + Widget wItemDrag = (Widget)value; + + if (*type == atomTreeItem) + { + Widget wParent; + Ihandle* ih = NULL; + int is_ctrl; + + if (!wItemDrop || wItemDrag == wItemDrop) + return; + + wParent = wItemDrop; + while(wParent) + { + XtVaGetValues(wParent, XmNentryParent, &wParent, NULL); + if (wParent == wItemDrag) + return; + } + + XtVaGetValues(XtParent(wItemDrag), XmNuserData, &ih, NULL); + + if (motTreeCallDragDropCb(ih, wItemDrag, wItemDrop, &is_ctrl) == IUP_CONTINUE) + { + /* Copy the dragged item to the new position. */ + Widget wNewItem = motTreeCopyNode(ih, wItemDrag, wItemDrop, is_ctrl); + + if (!is_ctrl) + { + /* do not delete the user data, we copy the references in CopyNode */ + motTreeRemoveNode(ih, wItemDrag, 0); + } + + /* Select the dragged item */ + XtVaSetValues(ih->handle, XmNselectedObjects, NULL, NULL); + XtVaSetValues(ih->handle, XmNselectedObjectCount, 0, NULL); + XtVaSetValues(wNewItem, XmNvisualEmphasis, XmSELECTED, NULL); + + motTreeSetFocusNode(ih, wNewItem); + } + } + + (void)drop_context; + (void)seltype; + (void)format; + (void)length; +} + +static void motTreeDropProc(Widget w, XtPointer client_data, XmDropProcCallbackStruct* drop_data) +{ + Atom atomTreeItem = XInternAtom(iupmot_display, "TREE_ITEM", False); + XmDropTransferEntryRec transferList[2]; + Arg args[10]; + int i, num_args = 0; + Widget wItemDrop, drop_context; + Cardinal numExportTargets; + Atom *exportTargets; + Boolean found = False; + (void)client_data; + + drop_context = drop_data->dragContext; + + /* retrieve the data targets */ + iupmotSetArg(args, num_args, XmNexportTargets, &exportTargets); + iupmotSetArg(args, num_args, XmNnumExportTargets, &numExportTargets); + XtGetValues(drop_context, args, num_args); + + for (i = 0; i < (int)numExportTargets; i++) + { + if (exportTargets[i] == atomTreeItem) + { + found = True; + break; + } + } + + wItemDrop = XmObjectAtPoint(w, drop_data->x, drop_data->y); + if (!wItemDrop) + found = False; + + num_args = 0; + if ((!found) || (drop_data->dropAction != XmDROP) || (drop_data->operation != XmDROP_COPY && drop_data->operation != XmDROP_MOVE)) + { + iupmotSetArg(args, num_args, XmNtransferStatus, XmTRANSFER_FAILURE); + iupmotSetArg(args, num_args, XmNnumDropTransfers, 0); + } + else + { + /* set up transfer requests for drop site */ + transferList[0].target = atomTreeItem; + transferList[0].client_data = (XtPointer)wItemDrop; + iupmotSetArg(args, num_args, XmNdropTransfers, transferList); + iupmotSetArg(args, num_args, XmNnumDropTransfers, 1); + iupmotSetArg(args, num_args, XmNtransferProc, motTreeTransferProc); + } + + XmDropTransferStart(drop_context, args, num_args); +} + +static void motTreeDragDropFinishCallback(Widget drop_context, XtPointer client_data, XtPointer call_data) +{ + Widget source_icon = NULL; + XtVaGetValues(drop_context, XmNsourceCursorIcon, &source_icon, NULL); + if (source_icon) + XtDestroyWidget(source_icon); + (void)call_data; + (void)client_data; +} + +static void motTreeDragMotionCallback(Widget drop_context, Widget wItemDrag, XmDragMotionCallbackStruct* drag_motion) +{ + Ihandle* ih = NULL; + XtVaGetValues(XtParent(wItemDrag), XmNuserData, &ih, NULL); + if (!iupAttribGet(ih, "NODRAGFEEDBACK")) + { + Widget wItem; + int x = drag_motion->x; + int y = drag_motion->y; + iupdrvScreenToClient(ih, &x, &y); + wItem = XmObjectAtPoint(ih->handle, (Position)x, (Position)y); + if (wItem) + { + XtVaSetValues(ih->handle, XmNselectedObjects, NULL, NULL); + XtVaSetValues(ih->handle, XmNselectedObjectCount, 0, NULL); + XtVaSetValues(wItem, XmNvisualEmphasis, XmSELECTED, NULL); + } + } + (void)drop_context; +} + +static Boolean motTreeConvertProc(Widget drop_context, Atom *selection, Atom *target, Atom *type_return, + XtPointer *value_return, unsigned long *length_return, int *format_return) +{ + Atom atomMotifDrop = XInternAtom(iupmot_display, "_MOTIF_DROP", False); + Atom atomTreeItem = XInternAtom(iupmot_display, "TREE_ITEM", False); + Widget wItemDrag = NULL; + + /* check if we are dealing with a drop */ + if (*selection != atomMotifDrop || *target != atomTreeItem) + return False; + + XtVaGetValues(drop_context, XmNclientData, &wItemDrag, NULL); + if (!wItemDrag) + return False; + + /* format the value for transfer */ + *type_return = atomTreeItem; + *value_return = (XtPointer)wItemDrag; + *length_return = 1; + *format_return = 32; + return True; +} + +static void motTreeStartDrag(Widget w, XButtonEvent* evt, String* params, Cardinal* num_params) +{ + Atom atomTreeItem = XInternAtom(iupmot_display, "TREE_ITEM", False); + Atom exportList[1]; + Widget drag_icon, drop_context; + Pixmap pixmap = 0, mask = 0; + int num_args = 0; + Arg args[40]; + Pixel fg, bg; + Widget wItemDrag = XmObjectAtPoint(w, (Position)evt->x, (Position)evt->y); + if (!wItemDrag) + return; + + XtVaGetValues(wItemDrag, XmNsmallIconPixmap, &pixmap, + XmNsmallIconMask, &mask, + XmNbackground, &bg, + XmNforeground, &fg, + NULL); + + iupmotSetArg(args, num_args, XmNpixmap, pixmap); + iupmotSetArg(args, num_args, XmNmask, mask); + drag_icon = XmCreateDragIcon(w, "drag_icon", args, num_args); + + exportList[0] = atomTreeItem; + + /* specify resources for DragContext for the transfer */ + num_args = 0; + iupmotSetArg(args, num_args, XmNcursorBackground, bg); + iupmotSetArg(args, num_args, XmNcursorForeground, fg); + /* iupmotSetArg(args, num_args, XmNsourcePixmapIcon, drag_icon); works, but only outside the dialog, inside disapears */ + iupmotSetArg(args, num_args, XmNsourceCursorIcon, drag_icon); /* does not work, shows the default cursor */ + iupmotSetArg(args, num_args, XmNexportTargets, exportList); + iupmotSetArg(args, num_args, XmNnumExportTargets, 1); + iupmotSetArg(args, num_args, XmNdragOperations, XmDROP_MOVE|XmDROP_COPY); + iupmotSetArg(args, num_args, XmNconvertProc, motTreeConvertProc); + iupmotSetArg(args, num_args, XmNclientData, wItemDrag); + + /* start the drag and register a callback to clean up when done */ + drop_context = XmDragStart(w, (XEvent*)evt, args, num_args); + XtAddCallback(drop_context, XmNdragDropFinishCallback, (XtCallbackProc)motTreeDragDropFinishCallback, NULL); + XtAddCallback(drop_context, XmNdragMotionCallback, (XtCallbackProc)motTreeDragMotionCallback, (XtPointer)wItemDrag); + + (void)params; + (void)num_params; +} + +static void motTreeEnableDragDrop(Widget w) +{ + Atom atomTreeItem = XInternAtom(iupmot_display, "TREE_ITEM", False); + Atom importList[1]; + Arg args[40]; + int num_args = 0; + char dragTranslations[] = "#override : StartDrag()"; + static int do_rec = 0; + if (!do_rec) + { + XtActionsRec rec = {"StartDrag", (XtActionProc)motTreeStartDrag}; + XtAppAddActions(iupmot_appcontext, &rec, 1); + do_rec = 1; + } + XtOverrideTranslations(w, XtParseTranslationTable(dragTranslations)); + + importList[0] = atomTreeItem; + iupmotSetArg(args, num_args, XmNimportTargets, importList); + iupmotSetArg(args, num_args, XmNnumImportTargets, 1); + iupmotSetArg(args, num_args, XmNdropSiteOperations, XmDROP_MOVE|XmDROP_COPY); + iupmotSetArg(args, num_args, XmNdropProc, motTreeDropProc); + XmDropSiteUpdate(w, args, num_args); + + XtVaSetValues(XmGetXmDisplay(iupmot_display), XmNenableDragIcon, True, NULL); +} + +static int motTreeMapMethod(Ihandle* ih) +{ + int num_args = 0; + Arg args[40]; + Widget parent = iupChildTreeGetNativeParentHandle(ih); + char* child_id = iupDialogGetChildIdStr(ih); + Widget sb_win; + + /******************************/ + /* Create the scrolled window */ + /******************************/ + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNscrollingPolicy, XmAUTOMATIC); + iupmotSetArg(args, num_args, XmNvisualPolicy, XmVARIABLE); + iupmotSetArg(args, num_args, XmNscrollBarDisplayPolicy, XmAS_NEEDED); + iupmotSetArg(args, num_args, XmNspacing, 0); /* no space between scrollbars and text */ + iupmotSetArg(args, num_args, XmNborderWidth, 0); + iupmotSetArg(args, num_args, XmNshadowThickness, 2); + + sb_win = XtCreateManagedWidget( + child_id, /* child identifier */ + xmScrolledWindowWidgetClass, /* widget class */ + parent, /* widget parent */ + args, num_args); + + if (!sb_win) + return IUP_ERROR; + + XtAddCallback (sb_win, XmNtraverseObscuredCallback, (XtCallbackProc)motTreeTraverseObscuredCallback, (XtPointer)ih); + + parent = sb_win; + child_id = "container"; + + num_args = 0; + + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + + iupmotSetArg(args, num_args, XmNmarginHeight, 0); /* default padding */ + iupmotSetArg(args, num_args, XmNmarginWidth, 0); + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + iupmotSetArg(args, num_args, XmNtraversalOn, True); + else + iupmotSetArg(args, num_args, XmNtraversalOn, False); + + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); + iupmotSetArg(args, num_args, XmNhighlightThickness, 2); + iupmotSetArg(args, num_args, XmNshadowThickness, 0); + + iupmotSetArg(args, num_args, XmNlayoutType, XmOUTLINE); + iupmotSetArg(args, num_args, XmNentryViewType, XmSMALL_ICON); + iupmotSetArg(args, num_args, XmNselectionPolicy, XmSINGLE_SELECT); + iupmotSetArg(args, num_args, XmNoutlineIndentation, 20); + + if (iupAttribGetBoolean(ih, "HIDELINES")) + iupmotSetArg(args, num_args, XmNoutlineLineStyle, XmNO_LINE); + else + iupmotSetArg(args, num_args, XmNoutlineLineStyle, XmSINGLE); + + if (iupAttribGetBoolean(ih, "HIDEBUTTONS")) + iupmotSetArg(args, num_args, XmNoutlineButtonPolicy, XmOUTLINE_BUTTON_ABSENT); + else + iupmotSetArg(args, num_args, XmNoutlineButtonPolicy, XmOUTLINE_BUTTON_PRESENT); + + ih->handle = XtCreateManagedWidget( + child_id, /* child identifier */ + xmContainerWidgetClass, /* widget class */ + parent, /* widget parent */ + args, num_args); + + if (!ih->handle) + return IUP_ERROR; + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + iupAttribSetStr(ih, "_IUP_EXTRAPARENT", (char*)parent); + + XtAddEventHandler(ih->handle, EnterWindowMask, False, (XtEventHandler)motTreeEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, LeaveWindowMask, False, (XtEventHandler)motTreeEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, FocusChangeMask, False, (XtEventHandler)motTreeFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, KeyPressMask, False, (XtEventHandler)motTreeKeyPressEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, KeyReleaseMask, False, (XtEventHandler)motTreeKeyReleaseEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, ButtonPressMask|ButtonReleaseMask, False, (XtEventHandler)motTreeButtonEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, PointerMotionMask, False, (XtEventHandler)iupmotPointerMotionEvent, (XtPointer)ih); + + /* Callbacks */ + /* XtAddCallback(ih->handle, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); NOT WORKING */ + XtAddCallback(ih->handle, XmNoutlineChangedCallback, (XtCallbackProc)motTreeOutlineChangedCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNdefaultActionCallback, (XtCallbackProc)motTreeDefaultActionCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNselectionCallback, (XtCallbackProc)motTreeSelectionCallback, (XtPointer)ih); + + XtRealizeWidget(parent); + + if (ih->data->show_dragdrop) + { + motTreeEnableDragDrop(ih->handle); + XtVaSetValues(ih->handle, XmNuserData, ih, NULL); /* to be used in motTreeTransferProc */ + } + else + iupmotDisableDragSource(ih->handle); + + /* Force background update before setting the images */ + { + char* value = iupAttribGet(ih, "BGCOLOR"); + if (value) + { + motTreeSetBgColorAttrib(ih, value); + iupAttribSetStr(ih, "BGCOLOR", NULL); + } + } + + /* Initialize the default images */ + ih->data->def_image_leaf = iupImageGetImage("IMGLEAF", ih, 0); + if (!ih->data->def_image_leaf) + { + ih->data->def_image_leaf = (void*)XmUNSPECIFIED_PIXMAP; + ih->data->def_image_leaf_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + else + { + ih->data->def_image_leaf_mask = iupImageGetMask("IMGLEAF"); + if (!ih->data->def_image_leaf_mask) ih->data->def_image_leaf_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + + ih->data->def_image_collapsed = iupImageGetImage("IMGCOLLAPSED", ih, 0); + if (!ih->data->def_image_collapsed) + { + ih->data->def_image_collapsed = (void*)XmUNSPECIFIED_PIXMAP; + ih->data->def_image_collapsed_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + else + { + ih->data->def_image_collapsed_mask = iupImageGetMask("IMGCOLLAPSED"); + if (!ih->data->def_image_collapsed_mask) ih->data->def_image_collapsed_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + + ih->data->def_image_expanded = iupImageGetImage("IMGEXPANDED", ih, 0); + if (!ih->data->def_image_expanded) + { + ih->data->def_image_expanded = (void*)XmUNSPECIFIED_PIXMAP; + ih->data->def_image_expanded_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + else + { + ih->data->def_image_expanded_mask = iupImageGetMask("IMGEXPANDED"); + if (!ih->data->def_image_expanded_mask) ih->data->def_image_expanded_mask = (void*)XmUNSPECIFIED_PIXMAP; + } + + motTreeAddRootNode(ih); + + IupSetCallback(ih, "_IUP_XY2POS_CB", (Icallback)motTreeConvertXYToPos); + + return IUP_NOERROR; +} + +void iupdrvTreeInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motTreeMapMethod; + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, motTreeSetBgColorAttrib, "TXTBGCOLOR", NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, motTreeSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTFGCOLOR", IUPAF_DEFAULT); + + /* IupTree Attributes - GENERAL */ + iupClassRegisterAttribute(ic, "EXPANDALL", NULL, motTreeSetExpandAllAttrib, NULL, NULL, IUPAF_WRITEONLY||IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "INDENTATION", motTreeGetIndentationAttrib, motTreeSetIndentationAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "COUNT", motTreeGetCountAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPACING", iupTreeGetSpacingAttrib, motTreeSetSpacingAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "TOPITEM", NULL, motTreeSetTopItemAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + + /* IupTree Attributes - IMAGES */ + iupClassRegisterAttributeId(ic, "IMAGE", NULL, motTreeSetImageAttrib, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "IMAGEEXPANDED", NULL, motTreeSetImageExpandedAttrib, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "IMAGELEAF", NULL, motTreeSetImageLeafAttrib, IUPAF_SAMEASSYSTEM, "IMGLEAF", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGEBRANCHCOLLAPSED", NULL, motTreeSetImageBranchCollapsedAttrib, IUPAF_SAMEASSYSTEM, "IMGCOLLAPSED", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGEBRANCHEXPANDED", NULL, motTreeSetImageBranchExpandedAttrib, IUPAF_SAMEASSYSTEM, "IMGEXPANDED", IUPAF_NO_INHERIT); + + /* IupTree Attributes - NODES */ + iupClassRegisterAttributeId(ic, "STATE", motTreeGetStateAttrib, motTreeSetStateAttrib, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "DEPTH", motTreeGetDepthAttrib, NULL, IUPAF_READONLY|IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "KIND", motTreeGetKindAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "PARENT", motTreeGetParentAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "COLOR", motTreeGetColorAttrib, motTreeSetColorAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "NAME", motTreeGetTitleAttrib, motTreeSetTitleAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TITLE", motTreeGetTitleAttrib, motTreeSetTitleAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "USERDATA", motTreeGetUserDataAttrib, motTreeSetUserDataAttrib, IUPAF_NO_STRING|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "CHILDCOUNT", motTreeGetChildCountAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TITLEFONT", motTreeGetTitleFontAttrib, motTreeSetTitleFontAttrib, IUPAF_NO_INHERIT); + + /* IupTree Attributes - MARKS */ + iupClassRegisterAttributeId(ic, "MARKED", motTreeGetMarkedAttrib, motTreeSetMarkedAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttribute (ic, "MARK", NULL, motTreeSetMarkAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute (ic, "STARTING", NULL, motTreeSetMarkStartAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute (ic, "MARKSTART", NULL, motTreeSetMarkStartAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute (ic, "VALUE", motTreeGetValueAttrib, motTreeSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupTree Attributes - ACTION */ + iupClassRegisterAttributeId(ic, "DELNODE", NULL, motTreeSetDelNodeAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RENAME", NULL, motTreeSetRenameAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "MOVENODE", NULL, motTreeSetMoveNodeAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "COPYNODE", NULL, motTreeSetCopyNodeAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "FINDUSERDATA", motTreeGetFindUserDataAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); +} diff --git a/iup/src/mot/iupmot_val.c b/iup/src/mot/iupmot_val.c new file mode 100755 index 0000000..200d2b4 --- /dev/null +++ b/iup/src/mot/iupmot_val.c @@ -0,0 +1,488 @@ +/** \file + * \brief Valuator Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_val.h" +#include "iup_image.h" +#include "iup_drv.h" + +#include "iupmot_drv.h" +#include "iupmot_color.h" + + +void iupdrvValGetMinSize(Ihandle* ih, int *w, int *h) +{ + int ticks_size = 0; + if (iupAttribGetInt(ih, "SHOWTICKS")) + ticks_size = 8; + + if (ih->data->type == IVAL_HORIZONTAL) + { + *w = 30; + *h = 20+ticks_size; + } + else + { + *w = 20+ticks_size; + *h = 30; + } +} + +static void motValRemoveOldTicks(Widget scale) +{ + WidgetList children = (WidgetList)0; + Cardinal num_children = (Cardinal)0; + Cardinal i; + String name; + + XtVaGetValues(scale, XmNchildren, &children, + XmNnumChildren, &num_children, + NULL); + + for (i = 0; i < num_children; i++) + { + if (XmIsSeparatorGadget(children[i])) + { + if ((name = XtName(children[i])) != (String)0) + { + if ((strcmp(name, "BigTic") == 0) || + (strcmp(name, "MedTic") == 0) || + (strcmp(name, "SmallTic") == 0)) + { + XtDestroyWidget(children[i]); + } + } + } + } +} + +static int motValSetShowTicksAttrib(Ihandle* ih, const char* value) +{ + int tick_freq, show_ticks; + + if (!ih->data->show_ticks) /* can only set if already not zero */ + return 0; + + show_ticks = atoi(value); + if (show_ticks<2) show_ticks=2; + ih->data->show_ticks = show_ticks; + + motValRemoveOldTicks(ih->handle); + + /* Defines the interval frequency for tick marks */ + tick_freq = SHRT_MAX/(show_ticks-1); + XmScaleSetTicks(ih->handle, tick_freq, 0, 0, 8, 0, 0); + return 0; +} + +static int motValSetPageStepAttrib(Ihandle* ih, const char* value) +{ + int pagesize; + ih->data->pagestep = atof(value); + pagesize = (int)(ih->data->pagestep*SHRT_MAX); + XtVaSetValues(ih->handle, XmNscaleMultiple, pagesize, NULL); + return 0; /* do not store value in hash table */ +} + +static int motValSetStepAttrib(Ihandle* ih, const char* value) +{ + ih->data->step = atof(value); + return 0; /* do not store value in hash table */ +} + +static int motValSetValueAttrib(Ihandle* ih, const char* value) +{ + int ival; + + ih->data->val = atof(value); + iupValCropValue(ih); + + ival = (int)(((ih->data->val-ih->data->vmin)/(ih->data->vmax - ih->data->vmin))*SHRT_MAX); + XtVaSetValues(ih->handle, XmNvalue, ival, NULL); + + return 0; /* do not store value in hash table */ +} + +static int motValSetBgColorAttrib(Ihandle* ih, const char* value) +{ + Pixel color; + unsigned char r, g, b; + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + r = (r*8)/10; + g = (g*8)/10; + b = (b*8)/10; + + color = iupmotColorGetPixel(r, g, b); + if (color != (Pixel)-1) + { + Widget w = XtNameToWidget(ih->handle, "*Scrollbar"); + XtVaSetValues(w, XmNtroughColor, color, NULL); + } + + return iupdrvBaseSetBgColorAttrib(ih, value); +} + +static int motValSetBackgroundAttrib(Ihandle* ih, const char* value) +{ + Pixel color; + + /* ignore given value, must use only from parent */ + value = iupAttribGetInheritNativeParent(ih, "BACKGROUND"); + + color = iupmotColorGetPixelStr(value); + if (color != (Pixel)-1) + { + XtVaSetValues(ih->handle, XmNbackground, color, NULL); + return 1; + } + else + { + Pixmap pixmap = (Pixmap)iupImageGetImage(value, ih, 0); + if (pixmap) + { + XtVaSetValues(ih->handle, XmNbackgroundPixmap, pixmap, NULL); + return 1; + } + } + return 0; +} + + +/*********************************************************************************************/ + + +static void motValCallAction(Ihandle* ih, int ival, int cb_state) +{ + double old_val = ih->data->val; + IFn cb; + + ih->data->val = (((double)ival/(double)SHRT_MAX)*(ih->data->vmax - ih->data->vmin)) + ih->data->vmin; + iupValCropValue(ih); + + cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (cb) + { + if (ih->data->val == old_val) + return; + + cb(ih); + } + else + { + IFnd cb_old; + if (cb_state == 0) + cb_old = (IFnd) IupGetCallback(ih, "MOUSEMOVE_CB"); + else if (cb_state == -1) + cb_old = (IFnd) IupGetCallback(ih, "BUTTON_RELEASE_CB"); + else + cb_old = (IFnd) IupGetCallback(ih, "BUTTON_PRESS_CB"); + + if (cb_old) + cb_old(ih, ih->data->val); + } +} + +static void motValIncPageValue(Ihandle *ih, int dir) +{ + int pagesize, ival; + pagesize = (int)(ih->data->pagestep*SHRT_MAX); + + if (ih->data->inverted) + dir *= -1; + + XtVaGetValues(ih->handle, XmNvalue, &ival, NULL); + ival += dir*pagesize; + if (ival < 0) ival = 0; + if (ival > SHRT_MAX) ival = SHRT_MAX; + XtVaSetValues(ih->handle, XmNvalue, ival, NULL); + + motValCallAction(ih, ival, 1); +} + +static void motValIncLineValue(Ihandle *ih, int dir) +{ + int linesize, ival; + linesize = (int)(ih->data->step*SHRT_MAX); + + if (ih->data->inverted) + dir *= -1; + + XtVaGetValues(ih->handle, XmNvalue, &ival, NULL); + ival += dir*linesize; + if (ival < 0) ival = 0; + if (ival > SHRT_MAX) ival = SHRT_MAX; + XtVaSetValues(ih->handle, XmNvalue, ival, NULL); + + motValCallAction(ih, ival, 1); +} + +static void motValKeyPressEvent(Widget w, Ihandle *ih, XKeyEvent *evt, Boolean *cont) +{ + KeySym motcode; + + *cont = True; + iupmotKeyPressEvent(w, ih, (XEvent*)evt, cont); + if (*cont == False) + return; + + motcode = XKeycodeToKeysym(iupmot_display, evt->keycode, 0); + + /* add missing support for numeric keyboard */ + /* add missing support for left/right in vertical + and up/down in horizontal */ + if (motcode == XK_Left || motcode == XK_KP_Left || + motcode == XK_Up || motcode == XK_KP_Up) + { + motValIncLineValue(ih, -1); + *cont = False; + return; + } + if (motcode == XK_Right || motcode == XK_KP_Right || + motcode == XK_Down || motcode == XK_KP_Down) + { + motValIncLineValue(ih, 1); + *cont = False; + return; + } + if (motcode == XK_Prior || motcode == XK_KP_Page_Up) + { + motValIncPageValue(ih, -1); + *cont = False; + return; + } + if (motcode == XK_Next || motcode == XK_KP_Page_Down) + { + motValIncPageValue(ih, 1); + *cont = False; + return; + } + + /* change Home and End default behaviour */ + if (ih->data->inverted) + { + if (motcode==XK_Home || motcode==XK_KP_Home) + { + int ival = SHRT_MAX; /* set to maximum */ + XtVaSetValues(ih->handle, XmNvalue, ival, NULL); + motValCallAction(ih, ival, 1); + *cont = False; + return; + } + if (motcode==XK_End || motcode==XK_KP_End) + { + int ival = 0; /* set to minimum */ + XtVaSetValues(ih->handle, XmNvalue, ival, NULL); + motValCallAction(ih, ival, 1); + *cont = False; + return; + } + } + else + { + /* add missing support for numeric keyboard */ + if (motcode==XK_KP_Home) + { + int ival = 0; /* set to minimum */ + XtVaSetValues(ih->handle, XmNvalue, ival, NULL); + motValCallAction(ih, ival, 1); + *cont = False; + return; + } + if (motcode==XK_KP_End) + { + int ival = SHRT_MAX; /* set to maximum */ + XtVaSetValues(ih->handle, XmNvalue, ival, NULL); + motValCallAction(ih, ival, 1); + *cont = False; + return; + } + } +} + +static void motValValueChangedCallback(Widget w, Ihandle* ih, XmScaleCallbackStruct *cbs) +{ + int cb_state = 1; + + if(cbs->reason == XmCR_DRAG) + cb_state = 0; + else if (cbs->event && (cbs->event->type==ButtonRelease || cbs->event->type==KeyRelease)) + cb_state = -1; + + motValCallAction(ih, cbs->value, cb_state); + + (void)w; +} + +static void motValButtonPressReleaseEvent(Widget w, Ihandle* ih, XButtonEvent* evt, Boolean* cont) +{ + (void)w; + (void)cont; + + /* When Button1 is pressed, the Scrollbar loses its focus to the scale, + So we avoid calling GETFOCUS/KILLFOCUS. + */ + + if (evt->type==ButtonPress && evt->button==Button1) + { + iupAttribSetStr(ih, "_IUPVAL_IGNOREFOCUS", "1"); + } + if (evt->type==ButtonRelease && evt->button==Button1) + { + iupAttribSetStr(ih, "_IUPVAL_IGNOREFOCUS", NULL); + iupAttribSetStr(ih, "_IUPVAL_IGNOREKILLFOCUS", "1"); + } +} + +static void motValFocusChangeEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont) +{ + if (iupAttribGet(ih, "_IUPVAL_IGNOREFOCUS")) + return; + + if (evt->type == FocusOut && iupAttribGet(ih, "_IUPVAL_IGNOREKILLFOCUS")) + { + iupAttribSetStr(ih, "_IUPVAL_IGNOREKILLFOCUS", NULL); + return; + } + + iupmotFocusChangeEvent(w, ih, evt, cont); +} + + +/*********************************************************************************************/ + + +static int motValMapMethod(Ihandle* ih) +{ + int num_args = 0; + Arg args[30]; + int show_ticks; + + /* Core */ + iupmotSetArg(args, num_args, XmNmappedWhenManaged, False); /* not visible when managed */ + iupmotSetArg(args, num_args, XmNx, 0); /* x-position */ + iupmotSetArg(args, num_args, XmNy, 0); /* y-position */ + iupmotSetArg(args, num_args, XmNwidth, 10); /* default width to avoid 0 */ + iupmotSetArg(args, num_args, XmNheight, 10); /* default height to avoid 0 */ + /* Primitive */ + if (iupAttribGetBoolean(ih, "CANFOCUS")) + iupmotSetArg(args, num_args, XmNtraversalOn, True); + else + iupmotSetArg(args, num_args, XmNtraversalOn, False); + iupmotSetArg(args, num_args, XmNhighlightThickness, 2); + iupmotSetArg(args, num_args, XmNnavigationType, XmTAB_GROUP); + /* Scale */ + iupmotSetArg(args, num_args, XmNminimum, 0); + iupmotSetArg(args, num_args, XmNmaximum, SHRT_MAX); + iupmotSetArg(args, num_args, XmNslidingMode, XmSLIDER); + iupmotSetArg(args, num_args, XmNsliderMark, XmETCHED_LINE); + iupmotSetArg(args, num_args, XmNsliderSize, 16); + iupmotSetArg(args, num_args, XmNshowValue, XmNONE); + + if (ih->data->type == IVAL_HORIZONTAL) + { + iupmotSetArg(args, num_args, XmNorientation, XmHORIZONTAL); + if (ih->data->inverted) + iupmotSetArg(args, num_args, XmNprocessingDirection, XmMAX_ON_LEFT); + else + iupmotSetArg(args, num_args, XmNprocessingDirection, XmMAX_ON_RIGHT); + } + else + { + iupmotSetArg(args, num_args, XmNorientation, XmVERTICAL); + if (ih->data->inverted) + iupmotSetArg(args, num_args, XmNprocessingDirection, XmMAX_ON_TOP); + else + iupmotSetArg(args, num_args, XmNprocessingDirection, XmMAX_ON_BOTTOM); + } + + ih->handle = XtCreateManagedWidget( + iupDialogGetChildIdStr(ih), /* child identifier */ + xmScaleWidgetClass, /* widget class */ + iupChildTreeGetNativeParentHandle(ih), /* widget parent */ + args, num_args); + + if (!ih->handle) + return IUP_ERROR; + + /* callbacks */ + XtAddEventHandler(ih->handle, EnterWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + XtAddEventHandler(ih->handle, LeaveWindowMask, False, (XtEventHandler)iupmotEnterLeaveWindowEvent, (XtPointer)ih); + + /* XmScale changes the default behavior of these, must set directly into the scrollbar */ + /* XtAddEventHandler(ih->handle, FocusChangeMask, False, (XtEventHandler)iupmotFocusChangeEvent, (XtPointer)ih); */ + /* XtAddEventHandler(ih->handle, KeyPressMask, False, (XtEventHandler)iupmotKeyPressEvent, (XtPointer)ih); */ + + XtAddCallback(ih->handle, XmNdragCallback, (XtCallbackProc)motValValueChangedCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNvalueChangedCallback, (XtCallbackProc)motValValueChangedCallback, (XtPointer)ih); + XtAddCallback(ih->handle, XmNhelpCallback, (XtCallbackProc)iupmotHelpCallback, (XtPointer)ih); + + { + Widget sb = XtNameToWidget(ih->handle, "Scrollbar"); /* TODO: Test this in other Motifs */ + if (sb) + { + XtAddEventHandler(sb, FocusChangeMask, False, (XtEventHandler)motValFocusChangeEvent, (XtPointer)ih); + XtAddEventHandler(sb, KeyPressMask, False, (XtEventHandler)motValKeyPressEvent, (XtPointer)ih); + XtAddEventHandler(sb, ButtonPressMask|ButtonReleaseMask, False, (XtEventHandler)motValButtonPressReleaseEvent, (XtPointer)ih); + } + } + + /* Ticks can only be created before XtRealizeWidget */ + show_ticks = iupAttribGetInt(ih, "SHOWTICKS"); + if (show_ticks) + { + if (show_ticks<2) show_ticks=2; + ih->data->show_ticks = show_ticks; /* non zero value, can be changed later, but not to zero */ + } + + ih->serial = iupDialogGetChildId(ih); /* must be after using the string */ + + /* initialize the widget */ + XtRealizeWidget(ih->handle); + + return IUP_NOERROR; +} + +void iupdrvValInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = motValMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, motValSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BACKGROUND", NULL, motValSetBackgroundAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + + /* IupVal only */ + iupClassRegisterAttribute(ic, "VALUE", iupValGetValueAttrib, motValSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PAGESTEP", iupValGetPageStepAttrib, motValSetPageStepAttrib, IUPAF_SAMEASSYSTEM, "0.1", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWTICKS", iupValGetShowTicksAttrib, motValSetShowTicksAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "STEP", iupValGetStepAttrib, motValSetStepAttrib, IUPAF_SAMEASSYSTEM, "0.01", IUPAF_NO_INHERIT); +} diff --git a/iup/src/mot/iupunix_help.c b/iup/src/mot/iupunix_help.c new file mode 100755 index 0000000..02be1da --- /dev/null +++ b/iup/src/mot/iupunix_help.c @@ -0,0 +1,44 @@ +/** \file + * \brief Motif Driver IupHelp + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" + +#include "iup_str.h" + +int IupHelp(const char *url) +{ + char *cmd; + int ret; + char *browser = getenv("IUP_HELPAPP"); + if (!browser) + browser = IupGetGlobal("HELPAPP"); + + if (!browser) + { + char* system = IupGetGlobal("SYSTEM"); + if (iupStrEqualNoCase(system, "Linux") || + iupStrEqualNoCase(system, "FreeBSD")) + browser = "firefox"; + else if (iupStrEqualNoCase(system, "Darwin")) + browser = "safari"; + else if (iupStrEqualPartial(system, "CYGWIN")) + browser = "iexplore"; + else + browser = "netscape"; + } + + cmd = (char*)malloc(sizeof(char)*(strlen(url)+strlen(browser)+3)); + sprintf(cmd, "%s %s &", browser, url); + ret = system(cmd); + free(cmd); + if (ret == -1) + return -1; + return 1; +} diff --git a/iup/src/mot/iupunix_info.c b/iup/src/mot/iupunix_info.c new file mode 100755 index 0000000..b522638 --- /dev/null +++ b/iup/src/mot/iupunix_info.c @@ -0,0 +1,305 @@ +/** \file + * \brief UNIX System Information + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include + +/* This module should depend only on IUP core headers + and UNIX system headers. NO Motif headers allowed. */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "iup_str.h" +#include "iup_drvinfo.h" + + +int iupdrvMakeDirectory(const char* name) +{ + mode_t oldmask = umask((mode_t)0); + int fail = mkdir(name, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | + S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH); + umask (oldmask); + if (fail) + return 0; + return 1; +} + +int iupdrvIsFile(const char* name) +{ + struct stat status; + if (stat(name, &status) != 0) + return 0; + if (S_ISDIR(status.st_mode)) + return 0; + return 1; +} + +int iupdrvIsDirectory(const char* name) +{ + struct stat status; + if (stat(name, &status) != 0) + return 0; + if (S_ISDIR(status.st_mode)) + return 1; + return 0; +} + +char* iupdrvGetCurrentDirectory(void) +{ + size_t size = 256; + char *buffer = (char *)malloc(size); + + for (;;) + { + if (getcwd(buffer, size) != NULL) + return buffer; + + if (errno != ERANGE) + { + free(buffer); + return NULL; + } + + size += size; + buffer = (char *)realloc(buffer, size); + } + + return NULL; +} + +int iupdrvSetCurrentDirectory(const char* dir) +{ + return chdir(dir) == 0? 1: 0; +} + +int iupdrvGetWindowDecor(void* wnd, int *border, int *caption) +{ + XWindowAttributes wa; + wa.x = 0; wa.y = 0; + XGetWindowAttributes((Display*)iupdrvGetDisplay(), (Window)wnd, &wa); + if (wa.x > 0 && wa.y > 0 && wa.y >= wa.x) + { + *border = wa.x; + *caption = wa.y - *border; + return 1; + } + + *border = 0; + *caption = 0; + + return 0; +} + +static int xGetWorkAreaSize(Display* display, int screen, int *width, int *height) +{ + /* _NET_WORKAREA, x, y, width, height CARDINAL[][4]/32 */ + static Atom workarea = 0; + Atom type; + long *data; + int format; + unsigned long after, ndata; + + if (!workarea) + workarea = XInternAtom(display, "_NET_WORKAREA", False); + + XGetWindowProperty(display, RootWindow(display, screen), + workarea, 0, LONG_MAX, False, XA_CARDINAL, &type, &format, &ndata, + &after, (unsigned char **)&data); + if (type != XA_CARDINAL || data == NULL) + { + if (data) XFree(data); + return 0; + } + + *width = data[2]; /* get only for the first desktop */ + *height = data[3]; + + XFree(data); + return 1; +} + +void iupdrvGetScreenSize(int *width, int *height) +{ + Display* display = (Display*)iupdrvGetDisplay(); + int screen = XDefaultScreen(display); + if (!xGetWorkAreaSize(display, screen, width, height)) + { + *width = DisplayWidth(display, screen); + *height = DisplayHeight(display, screen); + } +} + +void iupdrvGetFullSize(int *width, int *height) +{ + Display* display = (Display*)iupdrvGetDisplay(); + int screen = XDefaultScreen(display); + Window root = RootWindow(display, screen); + XWindowAttributes wa; + XGetWindowAttributes(display, root, &wa); + *width = wa.width; + *height = wa.height; +} + +static int xCheckVisualInfo(Display* drv_display, int bpp) +{ + int nitems; + XVisualInfo info, *ret_info; + + info.depth = bpp; + ret_info = XGetVisualInfo(drv_display, VisualDepthMask, &info, &nitems); + if (ret_info != NULL) + { + XFree(ret_info); + return 1; + } + return 0; +} + +int iupdrvGetScreenDepth(void) +{ + static int first = 1; + static int bpp; + + if (first) + { + Display* drv_display = (Display*)iupdrvGetDisplay(); + + if (xCheckVisualInfo(drv_display, 24)) + { + bpp = 24; + return bpp; + } + + if (xCheckVisualInfo(drv_display, 16)) + { + bpp = 16; + return bpp; + } + + if (xCheckVisualInfo(drv_display, 8)) + { + bpp = 8; + return bpp; + } + + if (xCheckVisualInfo(drv_display, 4)) + { + bpp = 4; + return bpp; + } + + bpp = 2; + + first = 0; + } + + return bpp; +} + +void iupdrvGetCursorPos(int *x, int *y) +{ + Window root, child; + int cx, cy; + unsigned int keys; + Display* display = (Display*)iupdrvGetDisplay(); + int screen = XDefaultScreen(display); + + XQueryPointer(display, RootWindow(display, screen), + &root, &child, x, y, &cx, &cy, &keys); +} + +static int xCheckModifier(KeyCode* modifiermap, int max_keypermod, int index, const char* keys) +{ + int i; + for (i = 0; i < max_keypermod; i++) + { + KeyCode key = modifiermap[max_keypermod * index + i]; + if (key) + { + int KeyIndex = key / 8; + int KeyMask = 1 << (key % 8); + if (keys[KeyIndex] & KeyMask) + return 1; + } + } + return 0; +} + +void iupdrvGetKeyState(char* key) +{ + char keys[32]; + Display* display = (Display*)iupdrvGetDisplay(); + XModifierKeymap *modMap = XGetModifierMapping(display); + XQueryKeymap(display, keys); + + if (xCheckModifier(modMap->modifiermap, modMap->max_keypermod, ShiftMapIndex, keys)) + key[0] = 'S'; + else + key[0] = ' '; + if (xCheckModifier(modMap->modifiermap, modMap->max_keypermod, ControlMapIndex, keys)) + key[1] = 'C'; + else + key[1] = ' '; + if (xCheckModifier(modMap->modifiermap, modMap->max_keypermod, Mod1MapIndex, keys) || + xCheckModifier(modMap->modifiermap, modMap->max_keypermod, Mod5MapIndex, keys)) + key[2] = 'A'; + else + key[2] = ' '; + if (xCheckModifier(modMap->modifiermap, modMap->max_keypermod, Mod4MapIndex, keys)) + key[3] = 'Y'; + else + key[3] = ' '; + + key[4] = 0; + + XFreeModifiermap(modMap); +} + +char *iupdrvGetSystemName(void) +{ + struct utsname un; + char *str = iupStrGetMemory(50); + + uname(&un); + strcpy(str, un.sysname); + + return str; +} + +char *iupdrvGetSystemVersion(void) +{ + struct utsname un; + char *str = iupStrGetMemory(60); + + uname(&un); + strcpy(str, un.release); + strcat(str, "."); + strcat(str, un.version); + + return str; +} + +char *iupdrvGetComputerName(void) +{ + char* str = iupStrGetMemory(50); + gethostname(str, 50); + return str; +} + +char *iupdrvGetUserName(void) +{ + return (char*)getlogin(); +} diff --git a/iup/src/win/iupwin_brush.c b/iup/src/win/iupwin_brush.c new file mode 100755 index 0000000..228e6d4 --- /dev/null +++ b/iup/src/win/iupwin_brush.c @@ -0,0 +1,62 @@ +/** \file + * \brief Windows Brush Cache + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include + +#include "iup.h" +#include "iup_array.h" + +#include "iupwin_brush.h" + + +typedef struct _IwinBrush +{ + HBRUSH hbrush; + COLORREF color; +} IwinBrush; + +static Iarray* win_brushes = NULL; + +HBRUSH iupwinBrushGet(COLORREF color) +{ + int i, count = iupArrayCount(win_brushes); + + /* If a brush with the desired color already exists... */ + IwinBrush* brushes = (IwinBrush*)iupArrayGetData(win_brushes); + for (i = 0; i < count; i++) + { + if (brushes[i].color == color) + return brushes[i].hbrush; + } + + /* If it doesn't exist, it should be created... */ + brushes = (IwinBrush*)iupArrayInc(win_brushes); + + brushes[i].color = color; + brushes[i].hbrush = CreateSolidBrush(color); + + return brushes[i].hbrush; +} + +void iupwinBrushInit(void) +{ + win_brushes = iupArrayCreate(50, sizeof(IwinBrush)); +} + +void iupwinBrushFinish(void) +{ + int i, count = iupArrayCount(win_brushes); + IwinBrush* brushes = (IwinBrush*)iupArrayGetData(win_brushes); + for (i = 0; i < count; i++) + { + DeleteObject(brushes[i].hbrush); + brushes[i].hbrush = NULL; + } + iupArrayDestroy(win_brushes); +} diff --git a/iup/src/win/iupwin_brush.h b/iup/src/win/iupwin_brush.h new file mode 100755 index 0000000..463f323 --- /dev/null +++ b/iup/src/win/iupwin_brush.h @@ -0,0 +1,26 @@ +/** \file + * \brief Windows Brush Cache + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPWIN_BRUSH_H +#define __IUPWIN_BRUSH_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* returns a brush from the brush cache. */ +HBRUSH iupwinBrushGet(COLORREF c); + +/* initializes the brush cache */ +void iupwinBrushInit(void); +void iupwinBrushFinish(void); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/win/iupwin_button.c b/iup/src/win/iupwin_button.c new file mode 100755 index 0000000..7f780e3 --- /dev/null +++ b/iup/src/win/iupwin_button.c @@ -0,0 +1,715 @@ +/** \file + * \brief Button Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_button.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_image.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_draw.h" + + +#ifndef CDIS_SHOWKEYBOARDCUES +#define CDIS_SHOWKEYBOARDCUES 0x0200 /* it is defined only when _WIN32_WINNT >= 0x0501 */ +#endif + + +static int winButtonGetBorder(void) +{ + return 4; +} + +void iupdrvButtonAddBorders(int *x, int *y) +{ + int border_size = winButtonGetBorder()*2; + (*x) += border_size; + (*y) += border_size; +} + +/****************************************************************/ + +static int winButtonCalcAlignPosX(int horiz_alignment, int rect_width, int width, int xpad, int shift) +{ + int x; + + if (horiz_alignment == IUP_ALIGN_ARIGHT) + x = rect_width - (width + 2*xpad); + else if (horiz_alignment == IUP_ALIGN_ACENTER) + x = (rect_width - (width + 2*xpad))/2; + else /* ALEFT */ + x = 0; + + x += xpad; + + if (shift) + x++; + + return x; +} + +static int winButtonCalcAlignPosY(int vert_alignment, int rect_height, int height, int ypad, int shift) +{ + int y; + + if (vert_alignment == IUP_ALIGN_ABOTTOM) + y = rect_height - (height + 2*ypad); + else if (vert_alignment == IUP_ALIGN_ATOP) + y = 0; + else /* ACENTER */ + y = (rect_height - (height + 2*ypad))/2; + + y += ypad; + + if (shift) + y++; + + return y; +} + +static HBITMAP winButtonGetBitmap(Ihandle* ih, UINT itemState, int *shift, int *w, int *h, int *bpp, HBITMAP *hMask) +{ + char *name; + int make_inactive = 0; + HBITMAP hBitmap; + *hMask = NULL; + + if (itemState & ODS_DISABLED) + { + name = iupAttribGet(ih, "IMINACTIVE"); + if (!name) + { + name = iupAttribGet(ih, "IMAGE"); + make_inactive = 1; + } + } + else + { + name = iupAttribGet(ih, "IMPRESS"); + if (itemState & ODS_SELECTED && name) + { + if (shift && !iupAttribGetStr(ih, "IMPRESSBORDER")) + *shift = 0; + } + else + name = iupAttribGet(ih, "IMAGE"); + } + + hBitmap = iupImageGetImage(name, ih, make_inactive); + + /* must use this info, since image can be a driver image loaded from resources */ + iupdrvImageGetInfo(hBitmap, w, h, bpp); + + if (*bpp == 8) + *hMask = iupdrvImageCreateMask(IupGetHandle(name)); + + return hBitmap; +} + +static void winButtonDrawImageText(Ihandle* ih, HDC hDC, int rect_width, int rect_height, int border, UINT itemState) +{ + int xpad = ih->data->horiz_padding + border, + ypad = ih->data->vert_padding + border; + int x, y, width, height, + txt_x, txt_y, txt_width, txt_height, + img_x, img_y, img_width, img_height, + bpp, shift = 0; + HFONT hFont = (HFONT)iupwinGetHFontAttrib(ih); + HBITMAP hBitmap, hMask; + COLORREF fgcolor; + + char* title = iupdrvBaseGetTitleAttrib(ih); + char* str = iupStrProcessMnemonic(title, NULL, 0); /* remove & */ + iupdrvFontGetMultiLineStringSize(ih, str, &txt_width, &txt_height); + if (str && str!=title) free(str); + + if (itemState & ODS_DISABLED) + fgcolor = GetSysColor(COLOR_GRAYTEXT); + else + fgcolor = ih->data->fgcolor; + + hBitmap = winButtonGetBitmap(ih, itemState, NULL, &img_width, &img_height, &bpp, &hMask); + if (!hBitmap) + return; + + if (ih->data->img_position == IUP_IMGPOS_RIGHT || + ih->data->img_position == IUP_IMGPOS_LEFT) + { + width = img_width + txt_width + ih->data->spacing; + height = iupMAX(img_height, txt_height); + } + else + { + width = iupMAX(img_width, txt_width); + height = img_height + txt_height + ih->data->spacing; + } + + if (itemState & ODS_SELECTED && !iupwin_comctl32ver6) + shift = 1; + + x = winButtonCalcAlignPosX(ih->data->horiz_alignment, rect_width, width, xpad, shift); + y = winButtonCalcAlignPosY(ih->data->vert_alignment, rect_height, height, ypad, shift); + + switch(ih->data->img_position) + { + case IUP_IMGPOS_TOP: + img_y = y; + txt_y = y + img_height + ih->data->spacing; + if (img_width > txt_width) + { + img_x = x; + txt_x = x + (img_width-txt_width)/2; + } + else + { + img_x = x + (txt_width-img_width)/2; + txt_x = x; + } + break; + case IUP_IMGPOS_BOTTOM: + img_y = y + txt_height + ih->data->spacing; + txt_y = y; + if (img_width > txt_width) + { + img_x = x; + txt_x = x + (img_width-txt_width)/2; + } + else + { + img_x = x + (txt_width-img_width)/2; + txt_x = x; + } + break; + case IUP_IMGPOS_RIGHT: + img_x = x + txt_width + ih->data->spacing; + txt_x = x; + if (img_height > txt_height) + { + img_y = y; + txt_y = y + (img_height-txt_height)/2; + } + else + { + img_y = y + (txt_height-img_height)/2; + txt_y = y; + } + break; + default: /* IUP_IMGPOS_LEFT */ + img_x = x; + txt_x = x + img_width + ih->data->spacing; + if (img_height > txt_height) + { + img_y = y; + txt_y = y + (img_height-txt_height)/2; + } + else + { + img_y = y + (txt_height-img_height)/2; + txt_y = y; + } + break; + } + + iupwinDrawBitmap(hDC, hBitmap, hMask, img_x, img_y, img_width, img_height, bpp); + iupwinDrawText(hDC, title, txt_x, txt_y, txt_width, txt_height, hFont, fgcolor, 0); + + if (hMask) + DeleteObject(hMask); +} + +static void winButtonDrawImage(Ihandle* ih, HDC hDC, int rect_width, int rect_height, int border, UINT itemState) +{ + int xpad = ih->data->horiz_padding + border, + ypad = ih->data->vert_padding + border; + int x, y, width, height, bpp, shift = 0; + HBITMAP hBitmap, hMask; + + if (itemState & ODS_SELECTED && !iupwin_comctl32ver6) + shift = 1; + + hBitmap = winButtonGetBitmap(ih, itemState, &shift, &width, &height, &bpp, &hMask); + if (!hBitmap) + return; + + x = winButtonCalcAlignPosX(ih->data->horiz_alignment, rect_width, width, xpad, shift); + y = winButtonCalcAlignPosY(ih->data->vert_alignment, rect_height, height, ypad, shift); + + iupwinDrawBitmap(hDC, hBitmap, hMask, x, y, width, height, bpp); + + if (hMask) + DeleteObject(hMask); +} + +static void winButtonDrawText(Ihandle* ih, HDC hDC, int rect_width, int rect_height, int border, UINT itemState) +{ + int xpad = ih->data->horiz_padding + border, + ypad = ih->data->vert_padding + border; + int x, y, width, height, shift = 0; + COLORREF fgcolor; + + char* title = iupdrvBaseGetTitleAttrib(ih); + if (title) + { + HFONT hFont = (HFONT)iupwinGetHFontAttrib(ih); + char* str = iupStrProcessMnemonic(title, NULL, 0); /* remove & */ + iupdrvFontGetMultiLineStringSize(ih, str, &width, &height); + if (str && str!=title) free(str); + + if (itemState & ODS_DISABLED) + fgcolor = GetSysColor(COLOR_GRAYTEXT); + else + fgcolor = ih->data->fgcolor; + + if (itemState & ODS_SELECTED && !iupwin_comctl32ver6) + shift = 1; + + x = winButtonCalcAlignPosX(ih->data->horiz_alignment, rect_width, width, xpad, shift); + y = winButtonCalcAlignPosY(ih->data->vert_alignment, rect_height, height, ypad, shift); + + iupwinDrawText(hDC, title, x, y, width, height, hFont, fgcolor, 0); + } + else + { + /* fill with the background color if defined at the element */ + char* bgcolor = iupAttribGet(ih, "BGCOLOR"); + if (bgcolor) + { + RECT rect; + unsigned char r=0, g=0, b=0; + iupStrToRGB(bgcolor, &r, &g, &b); + SetDCBrushColor(hDC, RGB(r,g,b)); + rect.left = xpad; + rect.top = ypad; + rect.right = rect_width - xpad; + rect.bottom = rect_height - ypad; + FillRect(hDC, &rect, (HBRUSH)GetStockObject(DC_BRUSH)); + } + } +} + +static void winButtonDrawItem(Ihandle* ih, DRAWITEMSTRUCT *drawitem) +{ + iupwinBitmapDC bmpDC; + int border, draw_border; + int width = drawitem->rcItem.right - drawitem->rcItem.left; + int height = drawitem->rcItem.bottom - drawitem->rcItem.top; + + HDC hDC = iupwinDrawCreateBitmapDC(&bmpDC, drawitem->hDC, width, height); + + iupwinDrawParentBackground(ih, hDC, &drawitem->rcItem); + + if ((drawitem->itemState & ODS_FOCUS) && !(drawitem->itemState & ODS_HOTLIGHT)) + drawitem->itemState |= ODS_DEFAULT; + + border = winButtonGetBorder(); + + if (ih->data->type & IUP_BUTTON_IMAGE && iupAttribGet(ih, "IMPRESS") && !iupAttribGetStr(ih, "IMPRESSBORDER")) + draw_border = 0; + else + { + if (iupAttribGetBoolean(ih, "FLAT")) + { + if (drawitem->itemState & ODS_HOTLIGHT || iupAttribGet(ih, "_IUPWINBUT_ENTERWIN")) + draw_border = 1; + else + draw_border = 0; + } + else + draw_border = 1; + } + + if (draw_border) + iupwinDrawButtonBorder(ih->handle, hDC, &drawitem->rcItem, drawitem->itemState); + + if (ih->data->type == IUP_BUTTON_IMAGE) + winButtonDrawImage(ih, hDC, width, height, border, drawitem->itemState); + else if (ih->data->type == IUP_BUTTON_TEXT) + winButtonDrawText(ih, hDC, width, height, border, drawitem->itemState); + else /* both */ + winButtonDrawImageText(ih, hDC, width, height, border, drawitem->itemState); + + if (drawitem->itemState & ODS_FOCUS) + { + border--; + iupdrvDrawFocusRect(ih, hDC, border, border, width-2*border, height-2*border); + } + + iupwinDrawDestroyBitmapDC(&bmpDC); +} + + +/***********************************************************************************************/ + + +static int winButtonSetImageAttrib(Ihandle* ih, const char* value) +{ + (void)value; + if (ih->data->type != IUP_BUTTON_TEXT) + { + iupdrvDisplayUpdate(ih); + return 1; + } + else + return 0; +} + +static int winButtonSetImInactiveAttrib(Ihandle* ih, const char* value) +{ + (void)value; + if (ih->data->type != IUP_BUTTON_TEXT) + { + iupdrvDisplayUpdate(ih); + return 1; + } + else + return 0; +} + +static int winButtonSetImPressAttrib(Ihandle* ih, const char* value) +{ + (void)value; + if (ih->data->type != IUP_BUTTON_TEXT) + { + iupdrvDisplayUpdate(ih); + return 1; + } + else + return 0; +} + +static int winButtonSetActiveAttrib(Ihandle* ih, const char* value) +{ + /* redraw IMINACTIVE image if any */ + if (ih->data->type != IUP_BUTTON_TEXT) + iupdrvDisplayUpdate(ih); + + return iupBaseSetActiveAttrib(ih, value); +} + +static int winButtonSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + char value1[30]="", value2[30]=""; + + iupStrToStrStr(value, value1, value2, ':'); + + if (iupStrEqualNoCase(value1, "ARIGHT")) + ih->data->horiz_alignment = IUP_ALIGN_ARIGHT; + else if (iupStrEqualNoCase(value1, "ALEFT")) + ih->data->horiz_alignment = IUP_ALIGN_ALEFT; + else /* "ACENTER" */ + ih->data->horiz_alignment = IUP_ALIGN_ACENTER; + + if (iupStrEqualNoCase(value2, "ABOTTOM")) + ih->data->vert_alignment = IUP_ALIGN_ABOTTOM; + else if (iupStrEqualNoCase(value2, "ATOP")) + ih->data->vert_alignment = IUP_ALIGN_ATOP; + else /* "ACENTER" */ + ih->data->vert_alignment = IUP_ALIGN_ACENTER; + + iupdrvDisplayRedraw(ih); + + return 1; +} + +static char* winButtonGetAlignmentAttrib(Ihandle *ih) +{ + char* horiz_align2str[3] = {"ALEFT", "ACENTER", "ARIGHT"}; + char* vert_align2str[3] = {"ATOP", "ACENTER", "ABOTTOM"}; + char *str = iupStrGetMemory(50); + sprintf(str, "%s:%s", horiz_align2str[ih->data->horiz_alignment], vert_align2str[ih->data->vert_alignment]); + return str; +} + +static int winButtonSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + if (ih->handle) + iupdrvDisplayRedraw(ih); + return 0; +} + +static int winButtonSetBgColorAttrib(Ihandle* ih, const char* value) +{ + /* update internal image cache for controls that have the IMAGE attribute */ + if (ih->data->type != IUP_BUTTON_TEXT) + { + iupAttribSetStr(ih, "BGCOLOR", value); + iupImageUpdateParent(ih); + iupdrvDisplayRedraw(ih); + } + return 1; +} + +static char* winButtonGetBgColorAttrib(Ihandle* ih) +{ + /* the most important use of this is to provide + the correct background for images */ + if (iupwin_comctl32ver6 && !iupAttribGet(ih, "IMPRESS")) + { + COLORREF cr; + if (iupwinDrawGetThemeButtonBgColor(ih->handle, &cr)) + { + char* str = iupStrGetMemory(20); + sprintf(str, "%d %d %d", (int)GetRValue(cr), (int)GetGValue(cr), (int)GetBValue(cr)); + return str; + } + } + + if (iupAttribGet(ih, "IMPRESS")) + return iupBaseNativeParentGetBgColorAttrib(ih); + else + return NULL; +} + +static int winButtonSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + if (iupStrToRGB(value, &r, &g, &b)) + { + ih->data->fgcolor = RGB(r,g,b); + iupdrvDisplayRedraw(ih); + } + return 1; +} + +/****************************************************************************************/ + +static int winButtonProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + if (ih->data->type != IUP_BUTTON_TEXT) + { + /* redraw IMPRESS image if any */ + if ((msg == WM_LBUTTONDOWN || msg == WM_LBUTTONUP) && iupAttribGet(ih, "IMPRESS")) + iupdrvDisplayRedraw(ih); + } + + switch (msg) + { + case WM_XBUTTONDBLCLK: + case WM_LBUTTONDBLCLK: + case WM_MBUTTONDBLCLK: + case WM_RBUTTONDBLCLK: + case WM_XBUTTONDOWN: + case WM_LBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + { + iupwinButtonDown(ih, msg, wp, lp); + break; + } + case WM_XBUTTONUP: + case WM_LBUTTONUP: + case WM_MBUTTONUP: + case WM_RBUTTONUP: + { + iupwinButtonUp(ih, msg, wp, lp); + + /* BN_CLICKED will NOT be notified when not receiving the focus */ + if (msg==WM_LBUTTONUP && !iupAttribGetBoolean(ih, "FOCUSONCLICK")) + { + Icallback cb = IupGetCallback(ih, "ACTION"); + if (cb && cb(ih) == IUP_CLOSE) + IupExitLoop(); + } + + break; + } + case WM_KEYDOWN: + case WM_SYSKEYDOWN: + if (wp==VK_RETURN) + { + /* enter activates the button */ + iupdrvActivate(ih); + + *result = 0; + return 1; /* abort default processing, or the default button will be activated, + in this case even if there is a default button, this button must be activated instead. */ + } + break; + case WM_MOUSELEAVE: + if (!iupwin_comctl32ver6) + { + iupAttribSetStr(ih, "_IUPWINBUT_ENTERWIN", NULL); + iupdrvDisplayRedraw(ih); + } + break; + case WM_MOUSEMOVE: + if (!iupwin_comctl32ver6) + { + if (!iupAttribGet(ih, "_IUPWINBUT_ENTERWIN")) + { + iupAttribSetStr(ih, "_IUPWINBUT_ENTERWIN", "1"); + iupdrvDisplayRedraw(ih); + } + } + break; + case WM_SETFOCUS: + { + HWND previous = (HWND)wp; + if (!iupAttribGetBoolean(ih, "FOCUSONCLICK") && wp && iupAttribGet(ih, "_IUPWIN_ENTERWIN")) + { + SetFocus(previous); + *result = 0; + return 1; + } + } + break; + } + + return iupwinBaseProc(ih, msg, wp, lp, result); +} + +static int winButtonWmNotify(Ihandle* ih, NMHDR* msg_info, int *result) +{ + if (msg_info->code == NM_CUSTOMDRAW) + { + NMCUSTOMDRAW *customdraw = (NMCUSTOMDRAW*)msg_info; + + if (customdraw->dwDrawStage==CDDS_PREERASE) + { + DRAWITEMSTRUCT drawitem; + drawitem.itemState = 0; + + if (customdraw->uItemState & CDIS_DISABLED) + drawitem.itemState |= ODS_DISABLED; + else if (customdraw->uItemState & CDIS_SELECTED) + drawitem.itemState |= ODS_SELECTED; + else if (customdraw->uItemState & CDIS_HOT) + drawitem.itemState |= ODS_HOTLIGHT; + else if (customdraw->uItemState & CDIS_DEFAULT) + drawitem.itemState |= ODS_DEFAULT; + + if (customdraw->uItemState & CDIS_FOCUS && (customdraw->uItemState & CDIS_SHOWKEYBOARDCUES)) + drawitem.itemState |= ODS_FOCUS; + + drawitem.hDC = customdraw->hdc; + drawitem.rcItem = customdraw->rc; + + winButtonDrawItem(ih, (void*)&drawitem); /* Simulate a WM_DRAWITEM */ + + *result = CDRF_SKIPDEFAULT; + return 1; + } + } + + return 0; /* result not used */ +} + +static int winButtonWmCommand(Ihandle* ih, WPARAM wp, LPARAM lp) +{ + int cmd = HIWORD(wp); + switch (cmd) + { + case BN_DOUBLECLICKED: + case BN_CLICKED: + { + Icallback cb = IupGetCallback(ih, "ACTION"); + if (cb && cb(ih) == IUP_CLOSE) + IupExitLoop(); + } + } + + (void)lp; + return 0; /* not used */ +} + +static int winButtonMapMethod(Ihandle* ih) +{ + char* value; + DWORD dwStyle = WS_CHILD | + BS_NOTIFY; /* necessary because of the base messages */ + + if (!ih->parent) + return IUP_ERROR; + + /* Buttons with the BS_PUSHBUTTON style do NOT use the returned brush in WM_CTLCOLORBTN. + Buttons with these styles are always drawn with the default system colors. + So FGCOLOR and BGCOLOR do NOT work. + The BS_FLAT style does NOT completely remove the borders. With XP styles is ignored. So FLAT do NOT work. + BCM_SETTEXTMARGIN is not working. + Buttons with images and with XP styles do NOT draw the focus feedback. + Can NOT remove the borders when using IMPRESS. + So IUP will draw its own button, + but uses the Windows functions to draw text and images in native format. */ + if (iupwin_comctl32ver6) + dwStyle |= BS_PUSHBUTTON; /* it will be an ownerdraw because we use NM_CUSTOMDRAW */ + else + dwStyle |= BS_OWNERDRAW; + + value = iupAttribGet(ih, "IMAGE"); + if (value) + { + ih->data->type = IUP_BUTTON_IMAGE; + + value = iupAttribGet(ih, "TITLE"); + if (value) + ih->data->type |= IUP_BUTTON_TEXT; + } + else + ih->data->type = IUP_BUTTON_TEXT; + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + dwStyle |= WS_TABSTOP; + + if (!iupwinCreateWindowEx(ih, "BUTTON", 0, dwStyle)) + return IUP_ERROR; + + /* Process WM_COMMAND */ + IupSetCallback(ih, "_IUPWIN_COMMAND_CB", (Icallback)winButtonWmCommand); + + /* Process BUTTON_CB */ + IupSetCallback(ih, "_IUPWIN_CTRLPROC_CB", (Icallback)winButtonProc); + + if (iupwin_comctl32ver6) + IupSetCallback(ih, "_IUPWIN_NOTIFY_CB", (Icallback)winButtonWmNotify); /* Process WM_NOTIFY */ + else + IupSetCallback(ih, "_IUPWIN_DRAWITEM_CB", (Icallback)winButtonDrawItem); /* Process WM_DRAWITEM */ + + return IUP_NOERROR; +} + +void iupdrvButtonInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winButtonMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, winButtonSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", winButtonGetBgColorAttrib, winButtonSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, winButtonSetFgColorAttrib, "DLGFGCOLOR", NULL, IUPAF_NOT_MAPPED); /* force the new default value */ + iupClassRegisterAttribute(ic, "TITLE", iupdrvBaseGetTitleAttrib, iupdrvBaseSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupButton only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", winButtonGetAlignmentAttrib, winButtonSetAlignmentAttrib, "ACENTER:ACENTER", NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, winButtonSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMINACTIVE", NULL, winButtonSetImInactiveAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMPRESS", NULL, winButtonSetImPressAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FOCUSONCLICK", NULL, NULL, "YES", NULL, IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "PADDING", iupButtonGetPaddingAttrib, winButtonSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); +} diff --git a/iup/src/win/iupwin_canvas.c b/iup/src/win/iupwin_canvas.c new file mode 100755 index 0000000..bb88b8a --- /dev/null +++ b/iup/src/win/iupwin_canvas.c @@ -0,0 +1,724 @@ +/** \file + * \brief Canvas Control + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_canvas.h" +#include "iup_key.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_brush.h" + + +static void winCanvasSetScrollInfo(HWND hWnd, int imin, int imax, int ipos, int ipage, int flag) +{ + SCROLLINFO scrollinfo; + scrollinfo.cbSize = sizeof(SCROLLINFO); + scrollinfo.fMask = SIF_RANGE | SIF_PAGE | SIF_POS; + scrollinfo.nPage = ipage; + scrollinfo.nPos = ipos; + scrollinfo.nMax = imax; + scrollinfo.nMin = imin; + SetScrollInfo(hWnd, flag, &scrollinfo, TRUE); +} + +static int winCanvasSetBgColorAttrib(Ihandle *ih, const char *value) +{ + (void)value; + iupdrvDisplayUpdate(ih); + return 1; +} + +static int winCanvasSetDXAttrib(Ihandle *ih, const char *value) +{ + if (ih->data->sb & IUP_SB_HORIZ) + { + double posx, xmin, xmax; + float dx; + int iposx, ipagex; + + if (!iupStrToFloat(value, &dx)) + return 1; + + xmin = iupAttribGetFloat(ih, "XMIN"); + xmax = iupAttribGetFloat(ih, "XMAX"); + posx = ih->data->posx; + + iupCanvasCalcScrollIntPos(xmin, xmax, dx, posx, + IUP_SB_MIN, IUP_SB_MAX, &ipagex, &iposx); + + if (dx >= (xmax-xmin)) + { + if (iupAttribGetBoolean(ih, "XAUTOHIDE")) + ShowScrollBar(ih->handle, SB_HORZ, FALSE); + else + EnableScrollBar(ih->handle, SB_HORZ, ESB_DISABLE_BOTH); + return 1; + } + else + { + ShowScrollBar(ih->handle, SB_HORZ, TRUE); + EnableScrollBar(ih->handle, SB_HORZ, ESB_ENABLE_BOTH); + } + + winCanvasSetScrollInfo(ih->handle, IUP_SB_MIN, IUP_SB_MAX, iposx, ipagex, SB_HORZ); + + /* update position because it could be corrected */ + iupCanvasCalcScrollRealPos(xmin, xmax, &posx, + IUP_SB_MIN, IUP_SB_MAX, ipagex, &iposx); + + ih->data->posx = (float)posx; + } + return 1; +} + +static int winCanvasSetPosXAttrib(Ihandle *ih, const char *value) +{ + if (ih->data->sb & IUP_SB_HORIZ) + { + double xmin, xmax, dx; + float posx; + int iposx, ipagex; + + if (!iupStrToFloat(value, &posx)) + return 1; + + xmin = iupAttribGetFloat(ih, "XMIN"); + xmax = iupAttribGetFloat(ih, "XMAX"); + dx = iupAttribGetFloat(ih, "DX"); + + if (posx < xmin) posx = (float)xmin; + if (posx > (xmax - dx)) posx = (float)(xmax - dx); + ih->data->posx = posx; + + iupCanvasCalcScrollIntPos(xmin, xmax, dx, posx, + IUP_SB_MIN, IUP_SB_MAX, &ipagex, &iposx); + + SetScrollPos(ih->handle,SB_HORZ,iposx,TRUE); + } + return 1; +} + +static int winCanvasSetDYAttrib(Ihandle *ih, const char *value) +{ + if (ih->data->sb & IUP_SB_VERT) + { + double posy, ymin, ymax; + float dy; + int iposy, ipagey; + + if (!iupStrToFloat(value, &dy)) + return 1; + + ymin = iupAttribGetFloat(ih, "YMIN"); + ymax = iupAttribGetFloat(ih, "YMAX"); + posy = ih->data->posy; + + iupCanvasCalcScrollIntPos(ymin, ymax, dy, posy, + IUP_SB_MIN, IUP_SB_MAX, &ipagey, &iposy); + + if (dy >= (ymax-ymin)) + { + if (iupAttribGetBoolean(ih, "YAUTOHIDE")) + ShowScrollBar(ih->handle, SB_VERT, FALSE); + else + EnableScrollBar(ih->handle, SB_VERT, ESB_DISABLE_BOTH); + return 1; + } + else + { + ShowScrollBar(ih->handle, SB_VERT, TRUE); + EnableScrollBar(ih->handle, SB_VERT, ESB_ENABLE_BOTH); + } + + winCanvasSetScrollInfo(ih->handle, IUP_SB_MIN, IUP_SB_MAX, iposy, ipagey, SB_VERT); + + /* update position because it could be corrected */ + iupCanvasCalcScrollRealPos(ymin, ymax, &posy, + IUP_SB_MIN, IUP_SB_MAX, ipagey, &iposy); + + ih->data->posy = (float)posy; + } + return 1; +} + +static int winCanvasSetPosYAttrib(Ihandle *ih, const char *value) +{ + if (ih->data->sb & IUP_SB_VERT) + { + double ymin, ymax, dy; + float posy; + int iposy, ipagey; + + if (!iupStrToFloat(value, &posy)) + return 1; + + ymin = iupAttribGetFloat(ih, "YMIN"); + ymax = iupAttribGetFloat(ih, "YMAX"); + dy = iupAttribGetFloat(ih, "DY"); + + if (posy < ymin) posy = (float)ymin; + if (posy > (ymax - dy)) posy = (float)(ymax - dy); + ih->data->posy = posy; + + iupCanvasCalcScrollIntPos(ymin, ymax, dy, posy, + IUP_SB_MIN, IUP_SB_MAX, &ipagey, &iposy); + + SetScrollPos(ih->handle,SB_VERT,iposy,TRUE); + } + return 1; +} + +static void winCanvasGetScrollInfo(HWND hWnd, int *ipos, int *ipage, int flag, int track) +{ + SCROLLINFO scrollinfo; + scrollinfo.cbSize = sizeof(SCROLLINFO); + if (track) + scrollinfo.fMask = SIF_PAGE | SIF_TRACKPOS; + else + scrollinfo.fMask = SIF_PAGE | SIF_POS; + GetScrollInfo(hWnd, flag, &scrollinfo); + *ipage = scrollinfo.nPage; + if (track) + *ipos = scrollinfo.nTrackPos; + else + *ipos = scrollinfo.nPos; +} + +static void winCanvasUpdateHorScroll(Ihandle* ih, WORD winop) +{ + IFniff cb; + double xmin, xmax, posx, linex; + int ipagex, iposx, ilinex, op; + + /* unused */ + if (winop == SB_TOP || + winop == SB_BOTTOM || + winop == SB_ENDSCROLL) + return; + + xmax = iupAttribGetFloat(ih,"XMAX"); + xmin = iupAttribGetFloat(ih,"XMIN"); + + winCanvasGetScrollInfo(ih->handle, &iposx, &ipagex, SB_HORZ, winop==SB_THUMBTRACK? 1: 0); + + if (!iupAttribGet(ih,"LINEX")) + { + ilinex = ipagex/10; + if (!ilinex) + ilinex = 1; + } + else + { + /* line and page convertions are the same */ + linex = iupAttribGetFloat(ih,"LINEX"); + iupCanvasCalcScrollIntPos(xmin, xmax, linex, 0, + IUP_SB_MIN, IUP_SB_MAX, &ilinex, NULL); + } + + switch (winop) + { + case SB_LINEDOWN: + iposx = iposx + ilinex; + op = IUP_SBRIGHT; + break; + case SB_LINEUP: + iposx = iposx - ilinex; + op = IUP_SBLEFT; + break; + case SB_PAGEDOWN: + iposx = iposx + ipagex; + op = IUP_SBPGRIGHT; + break; + case SB_PAGEUP: + iposx = iposx - ipagex; + op = IUP_SBPGLEFT; + break; + case SB_THUMBTRACK: + op = IUP_SBDRAGH; + break; + case SB_THUMBPOSITION: + op = IUP_SBPOSH; + break; + default: + return; + } + + iupCanvasCalcScrollRealPos(xmin, xmax, &posx, + IUP_SB_MIN, IUP_SB_MAX, ipagex, &iposx); + + SetScrollPos(ih->handle,SB_HORZ,iposx,TRUE); + ih->data->posx = (float)posx; + + cb = (IFniff)IupGetCallback(ih,"SCROLL_CB"); + if (cb) + cb(ih,op,(float)posx,ih->data->posy); + else + { + IFnff cb = (IFnff)IupGetCallback(ih,"ACTION"); + if (cb) + cb (ih, (float)posx, ih->data->posy); + } +} + +static void winCanvasUpdateVerScroll(Ihandle* ih, WORD winop) +{ + IFniff cb; + double ymin, ymax, posy, liney; + int ipagey, iposy, iliney, op; + + /* unused */ + if (winop == SB_TOP || + winop == SB_BOTTOM || + winop == SB_ENDSCROLL) + return; + + ymax = iupAttribGetFloat(ih,"YMAX"); + ymin = iupAttribGetFloat(ih,"YMIN"); + + winCanvasGetScrollInfo(ih->handle, &iposy, &ipagey, SB_VERT, winop==SB_THUMBTRACK? 1: 0); + + if (!iupAttribGet(ih, "LINEY")) + { + iliney = ipagey/10; + if (!iliney) + iliney = 1; + } + else + { + /* line and page convertions are the same */ + liney = iupAttribGetFloat(ih,"LINEY"); + iupCanvasCalcScrollIntPos(ymin, ymax, liney, 0, + IUP_SB_MIN, IUP_SB_MAX, &iliney, NULL); + } + + switch (winop) + { + case SB_LINEDOWN: + iposy = iposy + iliney; + op = IUP_SBDN; + break; + case SB_LINEUP: + iposy = iposy - iliney; + op = IUP_SBUP; + break; + case SB_PAGEDOWN: + iposy = iposy + ipagey; + op = IUP_SBPGDN; + break; + case SB_PAGEUP: + iposy = iposy - ipagey; + op = IUP_SBPGUP; + break; + case SB_THUMBTRACK: + op = IUP_SBDRAGV; + break; + case SB_THUMBPOSITION: + op = IUP_SBPOSV; + break; + default: + return; + } + + iupCanvasCalcScrollRealPos(ymin, ymax, &posy, + IUP_SB_MIN, IUP_SB_MAX, ipagey, &iposy); + + SetScrollPos(ih->handle,SB_VERT,iposy,TRUE); + ih->data->posy = (float)posy; + + cb = (IFniff)IupGetCallback(ih,"SCROLL_CB"); + if (cb) + cb(ih, op, ih->data->posx,(float)posy); + else + { + IFnff cb = (IFnff)IupGetCallback(ih,"ACTION"); + if (cb) + cb (ih, ih->data->posx, (float)posy); + } +} + +static int winCanvasProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + switch (msg) + { + case WM_ERASEBKGND: + /* only paint background if ACTION is not defined */ + if (!IupGetCallback(ih, "ACTION")) + { + RECT rect; + HDC hdc = (HDC)wp; + COLORREF color; + iupwinGetColorRef(ih, "BGCOLOR", &color); + GetClientRect(ih->handle, &rect); + FillRect(hdc, &rect, iupwinBrushGet(color)); + } + /* always return non zero value */ + *result = 1; + return 1; + case WM_PAINT: + { + IFnff cb = (IFnff)IupGetCallback(ih, "ACTION"); + if (cb) + { + PAINTSTRUCT ps; + HDC hdc = BeginPaint(ih->handle, &ps); + iupAttribSetStr(ih, "HDC_WMPAINT", (char*)&hdc); + iupAttribSetStrf(ih, "CLIPRECT", "%d %d %d %d", ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right-ps.rcPaint.left, ps.rcPaint.bottom-ps.rcPaint.top); + + cb(ih, ih->data->posx, ih->data->posy); + + iupAttribSetStr(ih, "CLIPRECT", NULL); + iupAttribSetStr(ih, "HDC_WMPAINT", NULL); + EndPaint(ih->handle, &ps); + } + break; + } + case WM_SIZE: + { + IFnii cb = (IFnii)IupGetCallback(ih, "RESIZE_CB"); + if (cb) + { + RECT rect; + GetClientRect(ih->handle, &rect); + cb(ih, rect.right-rect.left, rect.bottom-rect.top); + /* w=LOWORD (lp), h=HIWORD(lp) can not be used because and invalid size + at the first time of WM_SIZE with scroolbars. */ + } + *result = 0; + return 1; + } + case WM_GETDLGCODE: + /* avoid beeps when keys are pressed */ + *result = DLGC_WANTCHARS|DLGC_WANTARROWS; + return 1; + case WM_MOUSEWHEEL: + { + IFnfiis cb = (IFnfiis)IupGetCallback(ih, "WHEEL_CB"); + short delta = (short)HIWORD(wp); + if (cb) + { + char status[IUPKEY_STATUS_SIZE] = IUPKEY_STATUS_INIT; + POINT p; + p.x = LOWORD(lp); p.y = HIWORD(lp); + ScreenToClient(ih->handle, &p); + + iupwinButtonKeySetStatus(LOWORD(wp), status, 0); + + cb(ih, (float)delta/120.0f, p.x, p.y, status); + } + else + { + if (ih->data->sb & IUP_SB_VERT) + { + int i, winop = delta>0? SB_LINEUP: SB_LINEDOWN; + delta = (short)abs(delta/120); + for (i=0; i < delta; i++) + SendMessage(ih->handle, WM_VSCROLL, MAKELONG(winop, 0), 0); + } + } + + *result = 0; + return 1; + } + case WM_XBUTTONDBLCLK: + case WM_LBUTTONDBLCLK: + case WM_MBUTTONDBLCLK: + case WM_RBUTTONDBLCLK: + case WM_XBUTTONDOWN: + case WM_LBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + { + /* Force focus on canvas click */ + if (iupAttribGetBoolean(ih, "CANFOCUS")) + SetFocus(ih->handle); + + SetCapture(ih->handle); + + if (iupwinButtonDown(ih, msg, wp, lp)) + { + /* refresh the cursor, it could have been changed in BUTTON_CB */ + SendMessage(ih->handle, WM_SETCURSOR, (WPARAM)ih->handle, MAKELPARAM(1,WM_MOUSEMOVE)); + } + + if (msg==WM_XBUTTONDOWN || msg==WM_XBUTTONDBLCLK) + *result = 1; + else + *result = 0; + return 1; + } + case WM_MOUSEMOVE: + { + if (iupwinMouseMove(ih, msg, wp, lp)) + { + /* refresh the cursor, it could have been changed in MOTION_CB */ + SendMessage(ih->handle, WM_SETCURSOR, (WPARAM)ih->handle, MAKELPARAM(1,WM_MOUSEMOVE)); + } + + break; /* let iupwinBaseProc process enter/leavewin */ + } + case WM_XBUTTONUP: + case WM_LBUTTONUP: + case WM_MBUTTONUP: + case WM_RBUTTONUP: + { + ReleaseCapture(); + + if (iupwinButtonUp(ih, msg, wp, lp)) + { + /* refresh the cursor, it could have been changed in BUTTON_CB */ + SendMessage(ih->handle, WM_SETCURSOR, (WPARAM)ih->handle, MAKELPARAM(1,WM_MOUSEMOVE)); + } + + *result = 0; + if (msg==WM_XBUTTONUP) + *result = 1; + return 1; + } + case WM_KILLFOCUS: + { + if (GetCapture() == ih->handle) + ReleaseCapture(); + break; + } + case WM_SETCURSOR: + { + if (ih->handle == (HWND)wp && LOWORD(lp)==HTCLIENT) + { + HCURSOR hCur = (HCURSOR)iupAttribGet(ih, "_IUPWIN_HCURSOR"); + if (hCur) + { + SetCursor(hCur); + *result = 1; + return 1; + } + else if (iupAttribGet(ih, "CURSOR")) + { + SetCursor(NULL); + *result = 1; + return 1; + } + } + break; + } + case WM_INITMENU: + /* abort capture if a menu is opened */ + ReleaseCapture(); + break; + case WM_VSCROLL: + winCanvasUpdateVerScroll(ih, LOWORD(wp)); + *result = 0; + return 1; + case WM_HSCROLL: + winCanvasUpdateHorScroll(ih, LOWORD(wp)); + *result = 0; + return 1; + } + + /* can be a container */ + if (ih->firstchild) + return iupwinBaseContainerProc(ih, msg, wp, lp, result); + else + return iupwinBaseProc(ih, msg, wp, lp, result); +} + +static void winCanvasRegisterClass(void) +{ + WNDCLASS wndclass; + ZeroMemory(&wndclass, sizeof(WNDCLASS)); + + wndclass.hInstance = iupwin_hinstance; + wndclass.lpszClassName = "IupCanvas"; + wndclass.lpfnWndProc = (WNDPROC)iupwinBaseWinProc; + wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); + wndclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW; /* using CS_OWNDC will minimize the work of cdActivate in the CD library */ + wndclass.hbrBackground = NULL; /* remove the background to optimize redraw */ + + RegisterClass(&wndclass); +} + +static int winCanvasMapMethod(Ihandle* ih) +{ + CLIENTCREATESTRUCT clientstruct; + void *clientdata = NULL; + char *classname; + DWORD dwStyle = WS_CHILD, dwExStyle = 0; + + if (!ih->parent) + return IUP_ERROR; + + if (ih->iclass->is_interactive) + { + if (iupAttribGetBoolean(ih, "CANFOCUS")) + dwStyle |= WS_TABSTOP; + } + + if (ih->firstchild) /* can be a container */ + { + dwStyle |= WS_CLIPSIBLINGS; + + if (iupAttribGetBoolean(IupGetDialog(ih), "COMPOSITED")) + dwExStyle |= WS_EX_COMPOSITED; + else + dwStyle |= WS_CLIPCHILDREN; + } + + if (iupAttribGetBoolean(ih, "MDICLIENT")) + { + /* creating a MDI Client that will be inside the MDI Frame, + it will work as parent of all MDI children */ + Ihandle *winmenu = IupGetAttributeHandle(ih, "MDIMENU"); + + classname = "mdiclient"; + + iupAttribSetStr(ih, "BORDER", "NO"); + + iupAttribSetStr(IupGetDialog(ih), "MDICLIENT_HANDLE", (char*)ih); + + clientdata = &clientstruct; + clientstruct.hWindowMenu = winmenu? winmenu->handle: NULL; + + /* The system increments the identifier + for each additional MDI child window the application creates, + and reassigns identifiers when the application + destroys a window to keep the range of identifiers contiguous. */ + clientstruct.idFirstChild = IUP_MDICHILD_START; + } + else + classname = "IupCanvas"; + + if (iupAttribGetBoolean(ih, "BORDER")) + dwStyle |= WS_BORDER; + + ih->data->sb = iupBaseGetScrollbar(ih); + if (ih->data->sb & IUP_SB_HORIZ) + dwStyle |= WS_HSCROLL; + if (ih->data->sb & IUP_SB_VERT) + dwStyle |= WS_VSCROLL; + + ih->serial = iupDialogGetChildId(ih); + + ih->handle = CreateWindowEx(dwExStyle,/* extended style */ + classname, /* window class */ + NULL, /* title */ + dwStyle, /* window style */ + 0, /* x-position */ + 0, /* y-position */ + 10, /* default width to avoid 0 */ + 10, /* default height to avoid 0 */ + iupChildTreeGetNativeParentHandle(ih), /* window parent */ + (HMENU)ih->serial, /* child identifier */ + iupwin_hinstance, /* instance of app. */ + clientdata); + + if (!ih->handle) + return IUP_ERROR; + + /* associate HWND with Ihandle*, all Win32 controls must call this. */ + iupwinHandleSet(ih); + + IupSetCallback(ih, "_IUPWIN_OLDPROC_CB", (Icallback)DefWindowProc); + IupSetCallback(ih, "_IUPWIN_CTRLPROC_CB", (Icallback)winCanvasProc); + + /* configure for DRAG&DROP */ + if (IupGetCallback(ih, "DROPFILES_CB")) + iupAttribSetStr(ih, "DRAGDROP", "YES"); + + return IUP_NOERROR; +} + +static void winCanvasMDICloseChildren(Ihandle* client) +{ + HWND hWndChild = (HWND)SendMessage(client->handle, WM_MDIGETACTIVE, 0, 0); + + /* As long as the MDI client has a child, close it */ + while (hWndChild) + { + Ihandle* child = iupwinHandleGet(hWndChild); + if (iupObjectCheck(child) && iupAttribGetBoolean(child, "MDICHILD")) + IupDestroy(child); + + hWndChild = (HWND)SendMessage(client->handle, WM_MDIGETACTIVE, 0, 0); + } +} + +static void winCanvasUnMapMethod(Ihandle* ih) +{ + if (iupAttribGetBoolean(ih, "MDICLIENT")) + { + /* hide the MDI client window to avoid multiple re-paints */ + ShowWindow(ih->handle, SW_HIDE); + + /* must destroy all MDI Children */ + winCanvasMDICloseChildren(ih); + + DestroyWindow(ih->handle); + + /* mdiclient class is not a IUP class, must return here */ + return; + } + + /* remove the association before destroying */ + iupwinHandleRemove(ih); + + /* remove from parent and destroys window */ + SetParent(ih->handle, NULL); + DestroyWindow(ih->handle); +} + +static void winCanvasReleaseMethod(Iclass* ic) +{ + (void)ic; + if (iupwinClassExist("IupCanvas")) + UnregisterClass("IupCanvas", iupwin_hinstance); +} + +void iupdrvCanvasInitClass(Iclass* ic) +{ + if (!iupwinClassExist("IupCanvas")) + winCanvasRegisterClass(); + + /* Driver Dependent Class functions */ + ic->Map = winCanvasMapMethod; + ic->UnMap = winCanvasUnMapMethod; + ic->Release = winCanvasReleaseMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, winCanvasSetBgColorAttrib, "255 255 255", NULL, IUPAF_DEFAULT); /* force new default value */ + + /* IupCanvas only */ + iupClassRegisterAttribute(ic, "DRAWSIZE", iupdrvBaseGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "DX", NULL, winCanvasSetDXAttrib, "0.1", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "DY", NULL, winCanvasSetDYAttrib, "0.1", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "POSX", iupCanvasGetPosXAttrib, winCanvasSetPosXAttrib, "0.0", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "POSY", iupCanvasGetPosYAttrib, winCanvasSetPosYAttrib, "0.0", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "XAUTOHIDE", NULL, NULL, "YES", NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "YAUTOHIDE", NULL, NULL, "YES", NULL, IUPAF_NOT_MAPPED); + + /* IupCanvas Windows only */ + iupClassRegisterAttribute(ic, "DRAGDROP", NULL, iupwinSetDragDropAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "HWND", iupBaseGetWidAttrib, NULL, NULL, NULL, IUPAF_NO_STRING|IUPAF_NO_INHERIT); +} diff --git a/iup/src/win/iupwin_clipboard.c b/iup/src/win/iupwin_clipboard.c new file mode 100755 index 0000000..1e0fab4 --- /dev/null +++ b/iup/src/win/iupwin_clipboard.c @@ -0,0 +1,190 @@ +/** \file + * \brief Clipboard for the Windows Driver. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" + +#include "iupwin_drv.h" + + +static int winClipboardSetTextAttrib(Ihandle *ih, const char *value) +{ + HANDLE hHandle; + void* clip_str; + int size = strlen(value)+1; + (void)ih; + + if (!OpenClipboard(NULL)) + return 0; + + hHandle = GlobalAlloc(GMEM_MOVEABLE, size); + if (!hHandle) + return 0; + + clip_str = GlobalLock(hHandle); + CopyMemory(clip_str, value, size); + GlobalUnlock(hHandle); + + EmptyClipboard(); + SetClipboardData(CF_TEXT, hHandle); + CloseClipboard(); + + return 0; +} + +static char* winClipboardGetTextAttrib(Ihandle *ih) +{ + HANDLE hHandle; + char* str; + (void)ih; + + if (!OpenClipboard(NULL)) + return NULL; + + hHandle = GetClipboardData(CF_TEXT); + if (!hHandle) + { + CloseClipboard(); + return NULL; + } + + str = iupStrGetMemoryCopy((char*)GlobalLock(hHandle)); + + GlobalUnlock(hHandle); + CloseClipboard(); + return str; +} + +static int winClipboardSetImageAttrib(Ihandle *ih, const char *value) +{ + HBITMAP hBitmap; + + if (!OpenClipboard(NULL)) + return 0; + + hBitmap = (HBITMAP)iupImageGetImage(value, ih, 0); + iupImageClearCache(ih, hBitmap); + + EmptyClipboard(); + SetClipboardData(CF_BITMAP, (HANDLE)hBitmap); + CloseClipboard(); + + return 0; +} + +static int winClipboardSetNativeImageAttrib(Ihandle *ih, const char *value) +{ + if (!OpenClipboard(NULL)) + return 0; + + EmptyClipboard(); + SetClipboardData(CF_DIB, (HANDLE)value); + CloseClipboard(); + + (void)ih; + return 0; +} + +static HANDLE winCopyHandle(HANDLE hHandle) +{ + void *src_data, *dst_data; + SIZE_T size = GlobalSize(hHandle); + HANDLE hNewHandle = GlobalAlloc(GMEM_MOVEABLE, size); + if (!hNewHandle) + return NULL; + + src_data = GlobalLock(hHandle); + dst_data = GlobalLock(hNewHandle); + CopyMemory(dst_data, src_data, size); + GlobalUnlock(hHandle); + GlobalUnlock(hNewHandle); + + return hNewHandle; +} + +static char* winClipboardGetNativeImageAttrib(Ihandle *ih) +{ + HANDLE hHandle; + + if (!OpenClipboard(NULL)) + return 0; + + hHandle = GetClipboardData(CF_DIB); + if (!hHandle) + { + CloseClipboard(); + return NULL; + } + + hHandle = winCopyHandle(hHandle); /* must duplicate because CloseClipboard will invalidate the handle */ + CloseClipboard(); + + (void)ih; + return (char*)hHandle; +} + +static char* winClipboardGetTextAvailableAttrib(Ihandle *ih) +{ + int check; + (void)ih; + OpenClipboard(NULL); + check = IsClipboardFormatAvailable(CF_TEXT); + CloseClipboard(); + if (check) + return "YES"; + else + return "NO"; +} + +static char* winClipboardGetImageAvailableAttrib(Ihandle *ih) +{ + int check; + (void)ih; + OpenClipboard(NULL); + check = IsClipboardFormatAvailable(CF_DIB); + CloseClipboard(); + if (check) + return "YES"; + else + return "NO"; +} + +/******************************************************************************/ + +Ihandle* IupClipboard(void) +{ + return IupCreate("clipboard"); +} + +Iclass* iupClipboardGetClass(void) +{ + Iclass* ic = iupClassNew(NULL); + + ic->name = "clipboard"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPECONTROL; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Attribute functions */ + iupClassRegisterAttribute(ic, "TEXT", winClipboardGetTextAttrib, winClipboardSetTextAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NATIVEIMAGE", winClipboardGetNativeImageAttrib, winClipboardSetNativeImageAttrib, NULL, NULL, IUPAF_NO_STRING|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, winClipboardSetImageAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TEXTAVAILABLE", winClipboardGetTextAvailableAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGEAVAILABLE", winClipboardGetImageAvailableAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/src/win/iupwin_colordlg.c b/iup/src/win/iupwin_colordlg.c new file mode 100755 index 0000000..f0baa79 --- /dev/null +++ b/iup/src/win/iupwin_colordlg.c @@ -0,0 +1,133 @@ +/** \file + * \brief IupColorDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" + + +#define IUP_COLOR_RED 706 + +static UINT_PTR winColorDlgHookProc(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam) +{ + (void)wParam; + if (uiMsg == WM_INITDIALOG) + { + HWND hWndItem; + CHOOSECOLOR* choosecolor = (CHOOSECOLOR*)lParam; + Ihandle* ih = (Ihandle*)choosecolor->lCustData; + + char* value = iupAttribGet(ih, "TITLE"); + if (value) + SetWindowText(hWnd, value); + + ih->handle = hWnd; + iupDialogUpdatePosition(ih); + ih->handle = NULL; /* reset handle */ + iupAttribSetStr(ih, "HWND", (char*)hWnd); /* used by HELP_CB in winDialogBaseProc */ + + hWndItem = GetDlgItem(hWnd, IUP_COLOR_RED); + SetFocus(hWndItem); + } + return 0; +} + +static char* winColorDlgColorsToString(COLORREF* lpCustColors) +{ + int i, inc, off = 0; + char iup_str[20]; + char* str = iupStrGetMemory(300); + for (i=0; i < 16; i++) + { + inc = sprintf(iup_str, "%d %d %d;", (int)GetRValue(*lpCustColors), (int)GetGValue(*lpCustColors), (int)GetBValue(*lpCustColors)); + memcpy(str+off, iup_str, inc); + off += inc; + lpCustColors++; + } + str[off-1] = 0; /* remove last separator */ + return str; +} + +static void winColorDlgStringToColors(char* str, COLORREF* lpCustColors) +{ + int i = 0; + unsigned char r, g, b; + + while (str && *str && i < 16) + { + if (iupStrToRGB(str, &r, &g, &b)) + *lpCustColors = RGB(r,g,b); + + str = strchr(str, ';'); + if (str) str++; + i++; + lpCustColors++; + } +} + +static int winColorDlgPopup(Ihandle* ih, int x, int y) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + CHOOSECOLOR choosecolor; + unsigned char r, g, b; + COLORREF lpCustColors[16]; + char* value; + + iupAttribSetInt(ih, "_IUPDLG_X", x); /* used in iupDialogUpdatePosition */ + iupAttribSetInt(ih, "_IUPDLG_Y", y); + + if (!parent) + parent = GetActiveWindow(); + + iupStrToRGB(iupAttribGet(ih, "VALUE"), &r, &g, &b); + + ZeroMemory(lpCustColors, 16*sizeof(COLORREF)); + + value = iupAttribGetStr(ih, "COLORTABLE"); + if (value) + winColorDlgStringToColors(value, lpCustColors); + + ZeroMemory(&choosecolor, sizeof(CHOOSECOLOR)); + choosecolor.lStructSize = sizeof(CHOOSECOLOR); + choosecolor.hwndOwner = parent; + choosecolor.rgbResult = RGB(r, g, b); + choosecolor.lpCustColors = lpCustColors; + choosecolor.lCustData = (LPARAM)ih; + + choosecolor.Flags = CC_RGBINIT|CC_FULLOPEN; + if (IupGetCallback(ih, "HELP_CB")) + choosecolor.Flags |= CC_SHOWHELP; + + choosecolor.Flags |= CC_ENABLEHOOK; + choosecolor.lpfnHook = (LPCCHOOKPROC)winColorDlgHookProc; + + if (!ChooseColor(&choosecolor)) + { + iupAttribSetStr(ih, "VALUE", NULL); + iupAttribSetStr(ih, "COLORTABLE", NULL); + iupAttribSetStr(ih, "STATUS", NULL); + return IUP_NOERROR; + } + + iupAttribSetStrf(ih, "VALUE", "%d %d %d", GetRValue(choosecolor.rgbResult), + GetGValue(choosecolor.rgbResult), + GetBValue(choosecolor.rgbResult)); + iupAttribSetStr(ih, "COLORTABLE", winColorDlgColorsToString(lpCustColors)); + iupAttribSetStr(ih, "STATUS", "1"); + + return IUP_NOERROR; +} + +void iupdrvColorDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = winColorDlgPopup; +} diff --git a/iup/src/win/iupwin_common.c b/iup/src/win/iupwin_common.c new file mode 100755 index 0000000..a1a7c0f --- /dev/null +++ b/iup/src/win/iupwin_common.c @@ -0,0 +1,865 @@ +/** \file + * \brief Windows Base Procedure + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_key.h" +#include "iup_str.h" +#include "iup_class.h" +#include "iup_attrib.h" +#include "iup_focus.h" +#include "iup_image.h" +#include "iup_dialog.h" +#include "iup_drvinfo.h" +#include "iup_drv.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_brush.h" + + +#ifndef XBUTTON1 +#define XBUTTON1 0x0001 /* not defined in MingW3 */ +#endif + +int iupwinClassExist(const char* name) +{ + WNDCLASS WndClass; + if (GetClassInfo(iupwin_hinstance, name, &WndClass)) + return 1; + return 0; +} + +int iupwinGetScreenRes(void) +{ + int res; + HDC ScreenDC = GetDC(NULL); + res = GetDeviceCaps(ScreenDC, LOGPIXELSY); + ReleaseDC(NULL, ScreenDC); + return res; +} + +void iupdrvActivate(Ihandle* ih) +{ + /* do not use BM_CLICK because it changes the focus + and does not animates the button press */ + SendMessage(ih->handle, BM_SETSTATE, TRUE, 0); + IupFlush(); + Sleep(150); + SendMessage(GetParent(ih->handle), WM_COMMAND, MAKEWPARAM(0, BN_CLICKED), (LPARAM)ih->handle); + SendMessage(ih->handle, BM_SETSTATE, FALSE, 0); +} + +WCHAR* iupwinStrChar2Wide(const char* str) +{ + if (str) + { + int len = strlen(str)+1; + WCHAR* wstr = malloc(len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, str, -1, wstr, len); + return wstr; + } + + return NULL; +} + +int iupdrvGetScrollbarSize(void) +{ + int xv = GetSystemMetrics(SM_CXVSCROLL); + int yh = GetSystemMetrics(SM_CYHSCROLL); + return xv > yh ? xv : yh; +} + +void iupdrvReparent(Ihandle* ih) +{ + SetParent(ih->handle, iupChildTreeGetNativeParentHandle(ih)); +} + +void iupdrvBaseLayoutUpdateMethod(Ihandle *ih) +{ + SetWindowPos(ih->handle, NULL, ih->x, ih->y, ih->currentwidth, ih->currentheight, + SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOOWNERZORDER); +} + +void iupdrvDisplayRedraw(Ihandle *ih) +{ + /* REDRAW Now */ + RedrawWindow(ih->handle,NULL,NULL,RDW_ERASE|RDW_INVALIDATE|RDW_INTERNALPAINT|RDW_NOCHILDREN|RDW_UPDATENOW); +} + +void iupdrvDisplayUpdate(Ihandle *ih) +{ + /* Post a REDRAW */ + RedrawWindow(ih->handle,NULL,NULL,RDW_ERASE|RDW_INVALIDATE|RDW_INTERNALPAINT|RDW_NOCHILDREN); +} + +void iupdrvScreenToClient(Ihandle* ih, int *x, int *y) +{ + POINT p; + p.x = *x; + p.y = *y; + ScreenToClient(ih->handle, &p); + *x = p.x; + *y = p.y; +} + +static void winTrackMouse(HWND hwnd, int enter) +{ + TRACKMOUSEEVENT mouse; + mouse.cbSize = sizeof(TRACKMOUSEEVENT); + + if (enter) + mouse.dwFlags = TME_HOVER; + else + mouse.dwFlags = TME_LEAVE; + + mouse.hwndTrack = hwnd; + mouse.dwHoverTime = 1; + TrackMouseEvent(&mouse); +} + +static void winCallEnterLeaveWindow(Ihandle *ih, int enter) +{ + Icallback cb = NULL; + + if (!ih->iclass->is_interactive) + return; + + if (enter) + { + winTrackMouse(ih->handle, 0); + + if (!iupAttribGetInt(ih, "_IUPWIN_ENTERWIN")) + { + cb = IupGetCallback(ih,"ENTERWINDOW_CB"); + iupAttribSetStr(ih, "_IUPWIN_ENTERWIN", "1"); + } + } + else + { + cb = IupGetCallback(ih,"LEAVEWINDOW_CB"); + iupAttribSetStr(ih, "_IUPWIN_ENTERWIN", NULL); + } + + if (cb) + cb(ih); +} + +void iupwinMergeStyle(Ihandle* ih, DWORD old_mask, DWORD value) +{ + DWORD dwStyle = GetWindowLong(ih->handle, GWL_STYLE); + dwStyle &= ~(old_mask); /* clear old bits */ + dwStyle |= value; + SetWindowLong(ih->handle, GWL_STYLE, dwStyle); +} + +void iupwinSetStyle(Ihandle* ih, DWORD value, int set) +{ + DWORD dwStyle = GetWindowLong(ih->handle, GWL_STYLE); + if (set) + dwStyle |= value; + else + dwStyle &= ~(value); + SetWindowLong(ih->handle, GWL_STYLE, dwStyle); +} + +int iupwinBaseProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + (void)lp; + + switch (msg) + { + case WM_GETDLGCODE: + { + *result = DLGC_WANTALLKEYS; + return 1; + } + case WM_NOTIFY: /* usually sent only to parent, + but TIPs are configured to be handled here */ + { + NMHDR* msg_info = (NMHDR*)lp; + if (msg_info->code == TTN_GETDISPINFO) + iupwinTipsGetDispInfo(lp); + break; + } + case WM_DROPFILES: + iupwinDropFiles((HDROP)wp, ih); + break; + case WM_HELP: + { + Ihandle* child; + HELPINFO* help_info = (HELPINFO*)lp; + + if (help_info->iContextType == HELPINFO_MENUITEM) + child = iupwinMenuGetItemHandle((HMENU)help_info->hItemHandle, (int)help_info->iCtrlId); + else + child = iupwinHandleGet(help_info->hItemHandle); + + if (child) + { + Icallback cb = (Icallback) IupGetCallback(child, "HELP_CB"); + if (cb) + { + if (cb(child) == IUP_CLOSE) + IupExitLoop(); + + *result = 0; + return 1; /* abort default processing */ + } + } + break; + } + case WM_MOUSELEAVE: + winCallEnterLeaveWindow(ih, 0); + break; + case WM_MOUSEMOVE: + winCallEnterLeaveWindow(ih, 1); + break; + case WM_KEYDOWN: + case WM_SYSKEYDOWN: + if (!iupwinKeyEvent(ih, (int)wp, 1)) + { + *result = 0; + return 1; /* abort default processing */ + } + break; + case WM_SYSKEYUP: + case WM_KEYUP: + { + int ret; + if (wp == VK_SNAPSHOT) /* called only on key up */ + { + ret = iupwinKeyEvent(ih, (int)wp, 1); + if (ret && iupObjectCheck(ih)) + ret = iupwinKeyEvent(ih, (int)wp, 0); + } + else + ret = iupwinKeyEvent(ih, (int)wp, 0); + + if (!ret) + { + *result = 0; + return 1; /* abort default processing */ + } + + break; + } + case WM_SETFOCUS: + iupwinWmSetFocus(ih); + break; + case WM_KILLFOCUS: + iupCallKillFocusCb(ih); + break; + case WOM_CLOSE: + case WOM_DONE: + case WOM_OPEN: + { + IFni cb = (IFni)IupGetCallback(ih, "WOM_CB"); + if (cb) + { + int v = -2; /* Error */ + switch(msg) + { + case WOM_OPEN: v = 1; break; + case WOM_DONE: v = 0; break; + case WOM_CLOSE: v = -1; break; + } + cb(ih, v); + } + break; + } + } + + return 0; +} + +LRESULT CALLBACK iupwinBaseWinProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +{ + int ret = 0; + LRESULT result = 0; + IwinProc winProc; + WNDPROC oldProc; + Ihandle *ih; + + ih = iupwinHandleGet(hwnd); + if (!ih) + return DefWindowProc(hwnd, msg, wp, lp); /* should never happen */ + + /* retrieve the control previous procedure for subclassing */ + oldProc = (WNDPROC)IupGetCallback(ih, "_IUPWIN_OLDPROC_CB"); + + /* check if the element defines a custom procedure */ + winProc = (IwinProc)IupGetCallback(ih, "_IUPWIN_CTRLPROC_CB"); + if (winProc) + ret = winProc(ih, msg, wp, lp, &result); + else + ret = iupwinBaseProc(ih, msg, wp, lp, &result); + + if (ret) + return result; + else + return CallWindowProc(oldProc, hwnd, msg, wp, lp); +} + +static Ihandle* winContainerWmCommandGetIhandle(Ihandle *ih, WPARAM wp, LPARAM lp) +{ + /* WPARAM - if HIWORD is 0 if the message is from a menu. + or HIWORD is 1 if the message is from an accelerator. + or HIWORD is the notification code if the message is from a control. + LOWORD is the identifier. + LPARAM - the control sending the message or 0. */ + + Ihandle *child = NULL; + + if (HIWORD(wp)==0 && lp==0 && LOWORD(wp)>10) + { + Ihandle* dlg_menu = IupGetAttributeHandle(ih, "MENU"); + if (dlg_menu) + child = iupwinMenuGetItemHandle((HMENU)dlg_menu->handle, LOWORD(wp)); /* menu */ + } + else + { + if (lp==0) + child = ih; /* native parent */ + else + { + child = iupwinHandleGet((void*)lp); /* control */ + if (!child) + child = iupwinHandleGet((void*)GetParent((HWND)lp)); /* control */ + } + } + + return child; +} + +int iupwinBaseContainerProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + /* All messages here are sent to the parent Window, + but they are usefull for child controls. */ + + switch (msg) + { + case WM_COMMAND: + { + Ihandle* child = winContainerWmCommandGetIhandle(ih, wp, lp); + if (child) + { + IFnii cb = (IFnii)IupGetCallback(child, "_IUPWIN_COMMAND_CB"); + if (cb) + cb(child, wp, lp); + } + + break; + } + case WM_CTLCOLOREDIT: + case WM_CTLCOLORLISTBOX: + case WM_CTLCOLORBTN: + case WM_CTLCOLORSCROLLBAR: + case WM_CTLCOLORSTATIC: + { + Ihandle* child = iupwinHandleGet((void*)lp); + if (child) + { + IFctlColor cb = (IFctlColor)IupGetCallback(child, "_IUPWIN_CTLCOLOR_CB"); + if (cb) + return cb(child, (HDC)wp, result); + } + break; + } + case WM_DRAWITEM: /* for OWNERDRAW controls */ + { + Ihandle *child = NULL; + DRAWITEMSTRUCT *drawitem = (LPDRAWITEMSTRUCT)lp; + if (!drawitem) + break; + + if (wp == 0) /* a menu */ + child = iupwinMenuGetItemHandle((HMENU)drawitem->hwndItem, drawitem->itemID); + else + child = iupwinHandleGet(drawitem->hwndItem); + + if (child) + { + IFdrawItem cb = (IFdrawItem)IupGetCallback(child, "_IUPWIN_DRAWITEM_CB"); + if (cb) + { + cb(child, (void*)drawitem); + *result = TRUE; + return 1; + } + } + break; + } + case WM_HSCROLL: + case WM_VSCROLL: + { + Ihandle *child = iupwinHandleGet((void*)lp); + if (child) + { + IFni cb = (IFni)IupGetCallback(child, "_IUPWIN_CUSTOMSCROLL_CB"); + if (cb) + cb(child, LOWORD(wp)); + } + break; + } + case WM_NOTIFY: /* Currently, the following controls support custom draw functionality: + Header, List-view, Rebar, Toolbar, ToolTip, Trackbar, Tree-view. + And for Button if using Windows XP Style. */ + { + Ihandle *child; + NMHDR* msg_info = (NMHDR*)lp; + if (!msg_info) + break; + + child = iupwinHandleGet(msg_info->hwndFrom); + if (child) + { + IFnotify cb = (IFnotify)IupGetCallback(child, "_IUPWIN_NOTIFY_CB"); + if (cb) + { + if (cb(child, (void*)msg_info, result)) + return 1; + } + } + break; + } + } + + return iupwinBaseProc(ih, msg, wp, lp, result); +} + +void iupwinChangeProc(Ihandle *ih, WNDPROC new_proc) +{ + IupSetCallback(ih, "_IUPWIN_OLDPROC_CB", (Icallback)GetWindowLongPtr(ih->handle, GWLP_WNDPROC)); + SetWindowLongPtr(ih->handle, GWLP_WNDPROC, (LONG_PTR)new_proc); +} + +void iupdrvBaseUnMapMethod(Ihandle* ih) +{ + WNDPROC oldProc = (WNDPROC)IupGetCallback(ih, "_IUPWIN_OLDPROC_CB"); + if (oldProc) + { + SetWindowLongPtr(ih->handle, GWLP_WNDPROC, (LONG_PTR)oldProc); + IupSetCallback(ih, "_IUPWIN_OLDPROC_CB", NULL); + } + + /* remove the association before destroying */ + iupwinHandleRemove(ih); + + /* destroys window (it will remove from parent) */ + DestroyWindow(ih->handle); +} + +void iupwinDropFiles(HDROP hDrop, Ihandle *ih) +{ + char *filename; + int i, numFiles, numchar, ret; + POINT point; + + IFnsiii cb = (IFnsiii)IupGetCallback(ih, "DROPFILES_CB"); + if (!cb) return; + + numFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0); + DragQueryPoint(hDrop, &point); + for (i = 0; i < numFiles; i++) + { + numchar = DragQueryFile(hDrop, i, NULL, 0); + filename = malloc(numchar+1); + if (!filename) + break; + + DragQueryFile(hDrop, i, filename, numchar+1); + + ret = cb(ih, filename, numFiles-i-1, (int) point.x, (int) point.y); + + free(filename); + + if (ret == IUP_IGNORE) + break; + } + DragFinish(hDrop); +} + +int iupwinGetColorRef(Ihandle *ih, char *name, COLORREF *color) +{ + unsigned char r, g, b; + /* must use IupGetAttribute to use inheritance */ + if (iupStrToRGB(IupGetAttribute(ih, name), &r, &g, &b)) + { + *color = RGB(r,g,b); + return 1; + } + return 0; +} + +int iupwinGetParentBgColor(Ihandle* ih, COLORREF* cr) +{ + unsigned char r, g, b; + char* color = iupBaseNativeParentGetBgColorAttrib(ih); + if (iupStrToRGB(color, &r, &g, &b)) + { + *cr = RGB(r,g,b); + return 1; + } + return 0; +} + +int iupdrvBaseSetZorderAttrib(Ihandle* ih, const char* value) +{ + if (IsWindowVisible(ih->handle)) + { + if (iupStrEqualNoCase(value, "TOP")) + SetWindowPos(ih->handle, HWND_TOP, 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW | SWP_NOACTIVATE); + else + SetWindowPos(ih->handle, HWND_BOTTOM, 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW | SWP_NOACTIVATE); + } + + return 0; +} + +void iupdrvSetVisible(Ihandle* ih, int visible) +{ + ShowWindow(ih->handle, visible? SW_SHOWNORMAL: SW_HIDE); +} + +int iupdrvIsVisible(Ihandle* ih) +{ + return IsWindowVisible(ih->handle); +} + +int iupdrvIsActive(Ihandle* ih) +{ + return IsWindowEnabled(ih->handle); +} + +void iupdrvSetActive(Ihandle* ih, int enable) +{ + EnableWindow(ih->handle, enable); +} + +int iupdrvBaseSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (!value) value = ""; + SetWindowText(ih->handle, value); + return 0; +} + +char* iupdrvBaseGetTitleAttrib(Ihandle* ih) +{ + int nc = GetWindowTextLength(ih->handle); + if (nc) + { + char* str = iupStrGetMemory(nc+1); + GetWindowText(ih->handle, str, nc+1); + return str; + } + else + return NULL; +} + +int iupwinSetDragDropAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + DragAcceptFiles(ih->handle, TRUE); + else + DragAcceptFiles(ih->handle, FALSE); + return 1; +} + +char *iupdrvBaseGetXAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(20); + RECT rect; + GetWindowRect(ih->handle, &rect); + sprintf(str, "%d", (int)rect.left); + return str; +} + +char *iupdrvBaseGetYAttrib(Ihandle *ih) +{ + char* str = iupStrGetMemory(20); + RECT rect; + GetWindowRect(ih->handle, &rect); + sprintf(str, "%d", (int)rect.top); + return str; +} + +char* iupdrvBaseGetClientSizeAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + RECT rect; + GetClientRect(ih->handle, &rect); + sprintf(str, "%dx%d", (int)(rect.right-rect.left), (int)(rect.bottom-rect.top)); + return str; +} + +#ifndef IDC_HAND +#define IDC_HAND MAKEINTRESOURCE(32649) +#endif +#ifndef IDC_APPSTARTING +#define IDC_APPSTARTING MAKEINTRESOURCE(32650) +#endif +#ifndef IDC_HELP +#define IDC_HELP MAKEINTRESOURCE(32651) +#endif + +static HCURSOR winGetCursor(Ihandle* ih, const char* name) +{ + static struct { + const char* iupname; + const char* sysname; + } table[] = { + {"NONE", NULL}, + {"NULL", NULL}, + {"ARROW", IDC_ARROW}, + {"BUSY", IDC_WAIT}, + {"CROSS", IDC_CROSS}, + {"HAND", IDC_HAND}, + {"MOVE", IDC_SIZEALL}, + {"RESIZE_N", IDC_SIZENS}, + {"RESIZE_S", IDC_SIZENS}, + {"RESIZE_NS", IDC_SIZENS}, + {"RESIZE_W", IDC_SIZEWE}, + {"RESIZE_E", IDC_SIZEWE}, + {"RESIZE_WE", IDC_SIZEWE}, + {"RESIZE_NE", IDC_SIZENESW}, + {"RESIZE_SE", IDC_SIZENWSE}, + {"RESIZE_NW", IDC_SIZENWSE}, + {"RESIZE_SW", IDC_SIZENESW}, + {"TEXT", IDC_IBEAM}, + {"HELP", IDC_HELP}, + {"IUP", IDC_HELP}, + {"NO", IDC_NO}, + {"UPARROW", IDC_UPARROW}, + {"APPSTARTING", IDC_APPSTARTING} + }; + + HCURSOR cur; + char str[50]; + int i, count = sizeof(table)/sizeof(table[0]); + + /* check the cursor cache first (per control)*/ + sprintf(str, "_IUPWIN_CURSOR_%s", name); + cur = (HCURSOR)iupAttribGet(ih, str); + if (cur) + return cur; + + /* check the pre-defined IUP names first */ + for (i = 0; i < count; i++) + { + if (iupStrEqualNoCase(name, table[i].iupname)) + { + if (table[i].sysname) + cur = LoadCursor(NULL, table[i].sysname); + else + cur = NULL; + + break; + } + } + + if (i == count) + { + /* check other system cursors */ + /* cursor PEN is handled here */ + if (iupStrEqualNoCase(name, "PEN")) + name = "CURSOR_PEN"; + + /* check for an name defined cursor */ + cur = iupImageGetCursor(name); + } + + iupAttribSetStr(ih, str, (char*)cur); + return cur; +} + +int iupdrvBaseSetCursorAttrib(Ihandle* ih, const char* value) +{ + /* Cursor can be NULL in Windows. */ + HCURSOR hCur = winGetCursor(ih, value); + iupAttribSetStr(ih, "_IUPWIN_HCURSOR", (char*)hCur); /* To be used in WM_SETCURSOR */ + /* refresh the cursor */ + SendMessage(ih->handle, WM_SETCURSOR, (WPARAM)ih->handle, MAKELPARAM(1,WM_MOUSEMOVE)); + return 1; +} + +void iupdrvBaseRegisterCommonAttrib(Iclass* ic) +{ + iupClassRegisterAttribute(ic, "HFONT", iupwinGetHFontAttrib, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); +} + +int iupwinButtonDown(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp) +{ + char status[IUPKEY_STATUS_SIZE] = IUPKEY_STATUS_INIT; + int ret, doubleclick = 0; + int b = 0; + + IFniiiis cb = (IFniiiis) IupGetCallback(ih, "BUTTON_CB"); + if (!cb) + return 0; + + if (msg==WM_XBUTTONDBLCLK || + msg==WM_LBUTTONDBLCLK || + msg==WM_MBUTTONDBLCLK || + msg==WM_RBUTTONDBLCLK) + doubleclick = 1; + + iupwinButtonKeySetStatus(LOWORD(wp), status, doubleclick); + + if (msg==WM_LBUTTONDOWN || msg==WM_LBUTTONDBLCLK) + b = IUP_BUTTON1; + else if (msg==WM_MBUTTONDOWN || msg==WM_MBUTTONDBLCLK) + b = IUP_BUTTON2; + else if (msg==WM_RBUTTONDOWN || msg==WM_RBUTTONDBLCLK) + b = IUP_BUTTON3; + else if (msg==WM_XBUTTONDOWN || msg==WM_XBUTTONDBLCLK) + { + if (HIWORD(wp) == XBUTTON1) + b = IUP_BUTTON4; + else + b = IUP_BUTTON5; + } + + ret = cb(ih, b, 1, (int)(short)LOWORD(lp), (int)(short)HIWORD(lp), status); + if (ret == IUP_CLOSE) + IupExitLoop(); + else if (ret == IUP_IGNORE) + return -1; + + return 1; +} + +int iupwinButtonUp(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp) +{ + char status[IUPKEY_STATUS_SIZE] = IUPKEY_STATUS_INIT; + int ret, b=0; + IFniiiis cb = (IFniiiis) IupGetCallback(ih, "BUTTON_CB"); + if (!cb) + return 0; + + iupwinButtonKeySetStatus(LOWORD(wp), status, 0); + + /* also updates the button status, since wp could not have the flag */ + if (msg==WM_LBUTTONUP) + { + b = IUP_BUTTON1; + iupKEYSETBUTTON1(status); + } + else if (msg==WM_MBUTTONUP) + { + b = IUP_BUTTON2; + iupKEYSETBUTTON2(status); + } + else if (msg==WM_RBUTTONUP) + { + b = IUP_BUTTON3; + iupKEYSETBUTTON3(status); + } + else if (msg==WM_XBUTTONUP) + { + if (HIWORD(wp) == XBUTTON1) + { + b = IUP_BUTTON4; + iupKEYSETBUTTON4(status); + } + else + { + b = IUP_BUTTON5; + iupKEYSETBUTTON5(status); + } + } + + ret = cb(ih, b, 0, (int)(short)LOWORD(lp), (int)(short)HIWORD(lp), status); + if (ret == IUP_CLOSE) + IupExitLoop(); + else if (ret == IUP_IGNORE) + return -1; + + return 1; +} + +int iupwinMouseMove(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp) +{ + IFniis cb = (IFniis)IupGetCallback(ih, "MOTION_CB"); + if (cb) + { + char status[IUPKEY_STATUS_SIZE] = IUPKEY_STATUS_INIT; + iupwinButtonKeySetStatus(LOWORD(wp), status, 0); + cb(ih, (int)(short)LOWORD(lp), (int)(short)HIWORD(lp), status); + return 1; + } + (void)msg; + return 0; +} + +int iupwinCreateWindowEx(Ihandle* ih, LPCSTR lpClassName, DWORD dwExStyle, DWORD dwStyle) +{ + ih->serial = iupDialogGetChildId(ih); + + ih->handle = CreateWindowEx(dwExStyle, /* extended window style */ + lpClassName, /* window class */ + NULL, /* title */ + dwStyle, /* window style */ + 0, /* x-position */ + 0, /* y-position */ + 10, /* default width to avoid 0 */ + 10, /* default height to avoid 0 */ + iupChildTreeGetNativeParentHandle(ih), /* window parent */ + (HMENU)ih->serial, /* child identifier */ + iupwin_hinstance, /* instance of app. */ + NULL); + + if (!ih->handle) + return 0; + + /* associate HWND with Ihandle*, all Win32 controls must call this. */ + iupwinHandleSet(ih); + + /* replace the WinProc to handle base callbacks */ + iupwinChangeProc(ih, iupwinBaseWinProc); + + return 1; +} + +char* iupwinGetClipboardText(Ihandle* ih) +{ + HANDLE Handle; + char* str; + + if (!IsClipboardFormatAvailable(CF_TEXT)) + return NULL; + + if (!OpenClipboard(ih->handle)) + return NULL; + + Handle = GetClipboardData(CF_TEXT); + if (!Handle) + { + CloseClipboard(); + return NULL; + } + + str = (char*)GlobalLock(Handle); + str = iupStrDup(str); + + GlobalUnlock(Handle); + + CloseClipboard(); + + return str; +} diff --git a/iup/src/win/iupwin_dialog.c b/iup/src/win/iupwin_dialog.c new file mode 100755 index 0000000..39fdc0c --- /dev/null +++ b/iup/src/win/iupwin_dialog.c @@ -0,0 +1,1439 @@ +/** \file + * \brief IupDialog class + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_layout.h" +#include "iup_dlglist.h" +#include "iup_attrib.h" +#include "iup_drv.h" +#include "iup_drvinfo.h" +#include "iup_drvfont.h" +#include "iup_focus.h" +#include "iup_str.h" +#define _IUPDLG_PRIVATE +#include "iup_dialog.h" +#include "iup_image.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_brush.h" +#include "iupwin_info.h" + + +#define IWIN_TRAY_NOTIFICATION 102 + +static int WM_HELPMSG; + +static int winDialogSetBgColorAttrib(Ihandle* ih, const char* value); +static int winDialogSetTrayAttrib(Ihandle *ih, const char *value); + +/**************************************************************** + Utilities +****************************************************************/ + +int iupdrvDialogIsVisible(Ihandle* ih) +{ + return iupdrvIsVisible(ih); +} + +void iupdrvDialogUpdateSize(Ihandle* ih) +{ + RECT rect; + GetWindowRect(ih->handle, &rect); + ih->currentwidth = rect.right-rect.left; + ih->currentheight = rect.bottom-rect.top; +} + +void iupdrvDialogGetSize(InativeHandle* handle, int *w, int *h) +{ + RECT rect; + GetWindowRect(handle, &rect); + if (w) *w = rect.right-rect.left; + if (h) *h = rect.bottom-rect.top; +} + +void iupdrvDialogSetVisible(Ihandle* ih, int visible) +{ + ShowWindow(ih->handle, visible? ih->data->cmd_show: SW_HIDE); +} + +void iupdrvDialogGetPosition(InativeHandle* handle, int *x, int *y) +{ + RECT rect; + GetWindowRect(handle, &rect); + if (x) *x = rect.left; + if (y) *y = rect.top; +} + +void iupdrvDialogSetPosition(Ihandle *ih, int x, int y) +{ + /* Only moves the window and places it at the top of the Z order. */ + SetWindowPos(ih->handle, HWND_TOP, x, y, 0, 0, SWP_NOSIZE); +} + +void iupdrvDialogGetDecoration(Ihandle* ih, int *border, int *caption, int *menu) +{ + if (ih->data->menu) + *menu = iupdrvMenuGetMenuBarSize(ih->data->menu); + else + *menu = 0; + + if (ih->handle) + { + iupdrvGetWindowDecor(ih->handle, border, caption); + + if (*menu) + *caption -= *menu; + } + else + { + int has_titlebar = iupAttribGetBoolean(ih, "MAXBOX") || + iupAttribGetBoolean(ih, "MINBOX") || + iupAttribGetBoolean(ih, "MENUBOX") || + IupGetAttribute(ih, "TITLE"); /* must use IupGetAttribute to check from the native implementation */ + + *caption = 0; + if (has_titlebar) + { + if (iupAttribGetBoolean(ih, "TOOLBOX") && iupAttribGet(ih, "PARENTDIALOG")) + *caption = GetSystemMetrics(SM_CYSMCAPTION); /* tool window */ + else + *caption = GetSystemMetrics(SM_CYCAPTION); /* normal window */ + } + + *border = 0; + if (iupAttribGetBoolean(ih, "RESIZE")) + { + *border = GetSystemMetrics(SM_CXFRAME); /* Thickness of the sizing border around the perimeter of a window */ + } /* that can be resized, in pixels. */ + else if (has_titlebar) + { + *border = GetSystemMetrics(SM_CXFIXEDFRAME); /* Thickness of the frame around the perimeter of a window */ + } /* that has a caption but is not sizable, in pixels. */ + else if (iupAttribGetBoolean(ih, "BORDER")) + { + *border = GetSystemMetrics(SM_CXBORDER); + } + } +} + +int iupdrvDialogSetPlacement(Ihandle* ih) +{ + char* placement; + + ih->data->cmd_show = SW_SHOWNORMAL; + ih->data->show_state = IUP_SHOW; + + if (iupAttribGetBoolean(ih, "FULLSCREEN")) + return 1; + + placement = iupAttribGet(ih, "PLACEMENT"); + if (!placement) + { + if (IsIconic(ih->handle) || IsZoomed(ih->handle)) + ih->data->show_state = IUP_RESTORE; + return 0; + } + + if (iupStrEqualNoCase(placement, "MAXIMIZED")) + { + ih->data->cmd_show = SW_SHOWMAXIMIZED; + ih->data->show_state = IUP_MAXIMIZE; + } + else if (iupStrEqualNoCase(placement, "MINIMIZED")) + { + ih->data->cmd_show = SW_SHOWMINIMIZED; + ih->data->show_state = IUP_MINIMIZE; + } + else if (iupStrEqualNoCase(placement, "FULL")) + { + int width, height, x, y; + int caption, border, menu; + iupdrvDialogGetDecoration(ih, &border, &caption, &menu); + + /* the dialog will cover the task bar */ + iupdrvGetFullSize(&width, &height); + + /* position the decoration and menu outside the screen */ + x = -(border); + y = -(border+caption+menu); + + width += 2*border; + height += 2*border + caption + menu; + + /* set the new size and position */ + /* WM_SIZE will update the layout */ + SetWindowPos(ih->handle, HWND_TOP, x, y, width, height, 0); + + if (IsIconic(ih->handle) || IsZoomed(ih->handle)) + ih->data->show_state = IUP_RESTORE; + } + + iupAttribSetStr(ih, "PLACEMENT", NULL); /* reset to NORMAL */ + + return 1; +} + +static int winDialogMDICloseChildren(Ihandle* ih) +{ + Ihandle* client = (Ihandle*)iupAttribGet(ih, "MDICLIENT_HANDLE"); + if (iupObjectCheck(client)) + { + HWND hWndChild = (HWND)SendMessage(client->handle, WM_MDIGETACTIVE, 0, 0); + + /* As long as the MDI client has a child, close it */ + while (hWndChild) + { + Ihandle* child = iupwinHandleGet(hWndChild); + if (iupObjectCheck(child) && iupAttribGetBoolean(child, "MDICHILD")) + { + Icallback cb = IupGetCallback(child, "CLOSE_CB"); + if (cb) + { + int ret = cb(child); + if (ret == IUP_IGNORE) + return 0; + if (ret == IUP_CLOSE) + IupExitLoop(); + } + + IupDestroy(child); + } + + hWndChild = (HWND)SendMessage(client->handle, WM_MDIGETACTIVE, 0, 0); + } + } + return 1; +} + + +/**************************************************************************** + WindowProc +****************************************************************************/ + + +static Ihandle* winMinMaxHandle = NULL; + +static int winDialogCheckMinMaxInfo(Ihandle* ih, MINMAXINFO* minmax) +{ + int min_w = 1, min_h = 1; /* MINSIZE default value */ + int max_w = 65535, max_h = 65535; /* MAXSIZE default value */ + + iupStrToIntInt(iupAttribGet(ih, "MINSIZE"), &min_w, &min_h, 'x'); + iupStrToIntInt(iupAttribGet(ih, "MAXSIZE"), &max_w, &max_h, 'x'); + + minmax->ptMinTrackSize.x = min_w; + minmax->ptMinTrackSize.y = min_h; + minmax->ptMaxTrackSize.x = max_w; + minmax->ptMaxTrackSize.y = max_h; + + if (winMinMaxHandle == ih) + winMinMaxHandle = NULL; + + return 1; +} + +static void winDialogResize(Ihandle* ih, int width, int height) +{ + IFnii cb; + + iupdrvDialogUpdateSize(ih); + + cb = (IFnii)IupGetCallback(ih, "RESIZE_CB"); + if (!cb || cb(ih, width, height)!=IUP_IGNORE) /* width and height here are for the client area */ + { + ih->data->ignore_resize = 1; + IupRefresh(ih); + ih->data->ignore_resize = 0; + } +} + +static int winDialogBaseProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + if (iupwinBaseContainerProc(ih, msg, wp, lp, result)) + return 1; + + iupwinMenuDialogProc(ih, msg, wp, lp); + + switch (msg) + { + case WM_GETMINMAXINFO: + { + if (winDialogCheckMinMaxInfo(ih, (MINMAXINFO*)lp)) + { + *result = 0; + return 1; + } + break; + } + case WM_MOVE: + { + IFnii cb = (IFnii)IupGetCallback(ih, "MOVE_CB"); + RECT rect; + GetWindowRect(ih->handle, &rect); /* ignore LPARAM because they are the clientpos and not X/Y */ + if (cb) cb(ih, rect.left, rect.top); + break; + } + case WM_SIZE: + { + if (ih->data->ignore_resize) + break; + + switch(wp) + { + case SIZE_MINIMIZED: + { + if (ih->data->show_state != IUP_MINIMIZE) + { + IFni show_cb = (IFni)IupGetCallback(ih, "SHOW_CB"); + if (show_cb && show_cb(ih, IUP_MINIMIZE) == IUP_CLOSE) + IupExitLoop(); + ih->data->show_state = IUP_MINIMIZE; + } + break; + } + case SIZE_MAXIMIZED: + { + if (ih->data->show_state != IUP_MAXIMIZE) + { + IFni show_cb = (IFni)IupGetCallback(ih, "SHOW_CB"); + if (show_cb && show_cb(ih, IUP_MAXIMIZE) == IUP_CLOSE) + IupExitLoop(); + ih->data->show_state = IUP_MAXIMIZE; + } + + winDialogResize(ih, LOWORD(lp), HIWORD(lp)); + break; + } + case SIZE_RESTORED: + { + if (ih->data->show_state == IUP_MAXIMIZE || ih->data->show_state == IUP_MINIMIZE) + { + IFni show_cb = (IFni)IupGetCallback(ih, "SHOW_CB"); + if (show_cb && show_cb(ih, IUP_RESTORE) == IUP_CLOSE) + IupExitLoop(); + ih->data->show_state = IUP_RESTORE; + } + + winDialogResize(ih, LOWORD(lp), HIWORD(lp)); + break; + } + } + + break; + } + case WM_USER+IWIN_TRAY_NOTIFICATION: + { + int dclick = 0; + int button = 0; + int pressed = 0; + + switch (lp) + { + case WM_LBUTTONDOWN: + pressed = 1; + button = 1; + break; + case WM_MBUTTONDOWN: + pressed = 1; + button = 2; + break; + case WM_RBUTTONDOWN: + pressed = 1; + button = 3; + break; + case WM_LBUTTONDBLCLK: + dclick = 1; + button = 1; + break; + case WM_MBUTTONDBLCLK: + dclick = 1; + button = 2; + break; + case WM_RBUTTONDBLCLK: + dclick = 1; + button = 3; + break; + case WM_LBUTTONUP: + button = 1; + break; + case WM_MBUTTONUP: + button = 2; + break; + case WM_RBUTTONUP: + button = 3; + break; + } + + if (button != 0) + { + IFniii cb = (IFniii)IupGetCallback(ih, "TRAYCLICK_CB"); + if (cb && cb(ih, button, pressed, dclick) == IUP_CLOSE) + IupExitLoop(); + } + + break; + } + case WM_CLOSE: + { + Icallback cb = IupGetCallback(ih, "CLOSE_CB"); + if (cb) + { + int ret = cb(ih); + if (ret == IUP_IGNORE) + { + *result = 0; + return 1; + } + if (ret == IUP_CLOSE) + IupExitLoop(); + } + + /* child mdi is automatically destroyed */ + if (iupAttribGetBoolean(ih, "MDICHILD")) + IupDestroy(ih); + else + { + if (!winDialogMDICloseChildren(ih)) + { + *result = 0; + return 1; + } + + IupHide(ih); /* IUP default processing */ + } + + *result = 0; + return 1; + } + case WM_SETCURSOR: + { + if (ih->handle == (HWND)wp && LOWORD(lp)==HTCLIENT) + { + HCURSOR hCur = (HCURSOR)iupAttribGet(ih, "_IUPWIN_HCURSOR"); + if (hCur) + { + SetCursor(hCur); + *result = 1; + return 1; + } + else if (iupAttribGet(ih, "CURSOR")) + { + SetCursor(NULL); + *result = 1; + return 1; + } + } + break; + } + case WM_ERASEBKGND: + { + HBITMAP hBitmap = (HBITMAP)iupAttribGet(ih, "_IUPWIN_BACKGROUND_BITMAP"); + if (hBitmap) + { + RECT rect; + HDC hdc = (HDC)wp; + + HBRUSH hBrush = CreatePatternBrush(hBitmap); + GetClientRect(ih->handle, &rect); + FillRect(hdc, &rect, hBrush); + DeleteObject(hBrush); + + /* return non zero value */ + *result = 1; + return 1; + } + else + { + unsigned char r, g, b; + char* color = iupAttribGet(ih, "_IUPWIN_BACKGROUND_COLOR"); + if (iupStrToRGB(color, &r, &g, &b)) + { + RECT rect; + HDC hdc = (HDC)wp; + + SetDCBrushColor(hdc, RGB(r,g,b)); + GetClientRect(ih->handle, &rect); + FillRect(hdc, &rect, (HBRUSH)GetStockObject(DC_BRUSH)); + + /* return non zero value */ + *result = 1; + return 1; + } + } + break; + } + case WM_DESTROY: + { + /* Since WM_CLOSE changed the Windows default processing */ + /* WM_DESTROY is NOT received by IupDialogs */ + /* Except when they are children of other IupDialogs and the parent is destroyed. */ + /* So we have to destroy the child dialog. */ + /* The application is responsable for destroying the children before this happen. */ + IupDestroy(ih); + break; + } + } + + if (msg == (UINT)WM_HELPMSG) + { + Ihandle* child = NULL; + DWORD* struct_ptr = (DWORD*)lp; + if (*struct_ptr == sizeof(CHOOSECOLOR)) + { + CHOOSECOLOR* choosecolor = (CHOOSECOLOR*)lp; + child = (Ihandle*)choosecolor->lCustData; + } + if (*struct_ptr == sizeof(CHOOSEFONT)) + { + CHOOSEFONT* choosefont = (CHOOSEFONT*)lp; + child = (Ihandle*)choosefont->lCustData; + } + + if (child) + { + Icallback cb = IupGetCallback(child, "HELP_CB"); + if (cb && cb(child) == IUP_CLOSE) + EndDialog((HWND)iupAttribGet(child, "HWND"), IDCANCEL); + } + } + + return 0; +} + +static LRESULT CALLBACK winDialogProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +{ + LRESULT result; + Ihandle *ih = iupwinHandleGet(hwnd); + if (!ih) + { + /* the first time WM_GETMINMAXINFO is called, Ihandle is not associated yet */ + if (msg == WM_GETMINMAXINFO && winMinMaxHandle) + { + if (winDialogCheckMinMaxInfo(winMinMaxHandle, (MINMAXINFO*)lp)) + return 0; + } + + return DefWindowProc(hwnd, msg, wp, lp); + } + + if (winDialogBaseProc(ih, msg, wp, lp, &result)) + return result; + + return DefWindowProc(hwnd, msg, wp, lp); +} + +static LRESULT CALLBACK winDialogMDIChildProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +{ + LRESULT result; + Ihandle *ih = iupwinHandleGet(hwnd); + if (!ih) + { + /* the first time WM_GETMINMAXINFO is called, Ihandle is not associated yet */ + if (msg == WM_GETMINMAXINFO && winMinMaxHandle) + { + if (winDialogCheckMinMaxInfo(winMinMaxHandle, (MINMAXINFO*)lp)) + return 0; + } + + return DefMDIChildProc(hwnd, msg, wp, lp); + } + + switch (msg) + { + case WM_MDIACTIVATE: + { + HWND hNewActive = (HWND)lp; + if (hNewActive == ih->handle) + { + Icallback cb = (Icallback)IupGetCallback(ih, "MDIACTIVATE_CB"); + if (cb) cb(ih); + } + break; + } + } + + if (winDialogBaseProc(ih, msg, wp, lp, &result)) + return result; + + return DefMDIChildProc(hwnd, msg, wp, lp); +} + +static Ihandle* winDialogGetMdiChildId(Ihandle* ih, int mdi_child_id) +{ + int id, max_child_id, real_id = -1; + char name[50]; + Ihandle* child; + + max_child_id = iupAttribGetInt(ih, "_IUPWIN_MAX_MDI_ID"); + + for (id = 0; id < max_child_id; id++) + { + sprintf(name, "_IUPWIN_MDI_ID_[%d]", id); + child = (Ihandle*)iupAttribGet(ih, name); + if (iupObjectCheck(child)) + { + real_id++; + if (real_id == mdi_child_id) + return child; + } + } + + return NULL; +} + +static LRESULT CALLBACK winDialogMDIFrameProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +{ + LRESULT result; + HWND hWndClient = NULL; + Ihandle *ih = iupwinHandleGet(hwnd); + if (!ih) + { + /* the first time WM_GETMINMAXINFO is called, Ihandle is not associated yet */ + if (msg == WM_GETMINMAXINFO && winMinMaxHandle) + { + if (winDialogCheckMinMaxInfo(winMinMaxHandle, (MINMAXINFO*)lp)) + return 0; + } + + return DefFrameProc(hwnd, hWndClient, msg, wp, lp); + } + + { + Ihandle* client = (Ihandle*)iupAttribGet(ih, "MDICLIENT_HANDLE"); + if (client) hWndClient = client->handle; + } + + if (winDialogBaseProc(ih, msg, wp, lp, &result)) + return result; + + switch (msg) + { + case WM_MENUCOMMAND: + { + int menuId = GetMenuItemID((HMENU)lp, (int)wp); + if (menuId >= IUP_MDICHILD_START && hWndClient) + { + Ihandle* child = winDialogGetMdiChildId(ih, menuId-IUP_MDICHILD_START); + if (child) + SendMessage(hWndClient, WM_MDIACTIVATE, (WPARAM)child->handle, 0); + break; + } + } + } + + + return DefFrameProc(hwnd, hWndClient, msg, wp, lp); +} + +static void winDialogRegisterClass(int mdi) +{ + char* name; + WNDCLASS wndclass; + WNDPROC winproc; + ZeroMemory(&wndclass, sizeof(WNDCLASS)); + + if (mdi == 2) + { + name = "IupDialogMDIChild"; + winproc = (WNDPROC)winDialogMDIChildProc; + } + else if (mdi == 1) + { + name = "IupDialogMDIFrame"; + winproc = (WNDPROC)winDialogMDIFrameProc; + } + else + { + if (mdi == -1) + name = "IupDialogControl"; + else + name = "IupDialog"; + winproc = (WNDPROC)winDialogProc; + } + + wndclass.hInstance = iupwin_hinstance; + wndclass.lpszClassName = name; + wndclass.lpfnWndProc = (WNDPROC)winproc; + wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); + + /* To use a standard system color, must increase the background-color value by one */ + if (mdi == 1) + wndclass.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE+1); + else + wndclass.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1); + + if (mdi == 0) + wndclass.style |= CS_SAVEBITS; + + if (mdi == -1) + wndclass.style |= CS_HREDRAW | CS_VREDRAW; + + RegisterClass(&wndclass); +} + + +/**************************************************************** + dialog class functions +****************************************************************/ + + +static int winDialogMapMethod(Ihandle* ih) +{ + InativeHandle* native_parent; + DWORD dwStyle = WS_CLIPSIBLINGS, + dwExStyle = 0; + int has_titlebar = 0, + has_border = 0; + char* classname = "IupDialog"; + + char* title = iupAttribGet(ih, "TITLE"); + if (title) + has_titlebar = 1; + + if (iupAttribGetBoolean(ih, "DIALOGFRAME")) + { + iupAttribSetStr(ih, "RESIZE", "NO"); + iupAttribSetStr(ih, "MINBOX", "NO"); + } + + if (iupAttribGetBoolean(ih, "RESIZE")) + dwStyle |= WS_THICKFRAME; + else + iupAttribSetStr(ih, "MAXBOX", "NO"); /* Must also remove this to RESIZE=NO work */ + + if (iupAttribGetBoolean(ih, "MAXBOX")) + { + dwStyle |= WS_MAXIMIZEBOX; + has_titlebar = 1; + } + + if (iupAttribGetBoolean(ih, "MINBOX")) + { + dwStyle |= WS_MINIMIZEBOX; + has_titlebar = 1; + } + + if (iupAttribGetBoolean(ih, "MENUBOX")) + { + dwStyle |= WS_SYSMENU; + has_titlebar = 1; + } + + if (iupAttribGetBoolean(ih, "BORDER") || has_titlebar) + has_border = 1; + + if (iupAttribGetBoolean(ih, "MDICHILD")) + { + static int mdi_child_id = 0; + Ihandle *client; + char name[50]; + + /* must have a parent dialog (the mdi frame) */ + Ihandle* parent = IupGetAttributeHandle(ih, "PARENTDIALOG"); + if (!parent || !parent->handle) + return IUP_ERROR; + + /* set when the mdi client is mapped */ + client = (Ihandle*)iupAttribGet(parent, "MDICLIENT_HANDLE"); + if (!client) + return IUP_ERROR; + + /* store the mdi client handle in each mdi child also */ + iupAttribSetStr(ih, "MDICLIENT_HANDLE", (char*)client); + + sprintf(name, "_IUPWIN_MDI_ID_[%d]", mdi_child_id); + iupAttribSetStr(parent, name, (char*)ih); + mdi_child_id++; + iupAttribSetInt(parent, "_IUPWIN_MAX_MDI_ID", mdi_child_id); + + classname = "IupDialogMDIChild"; + + /* The actual parent is the mdi client */ + native_parent = client->handle; + + dwStyle |= WS_CHILD; + if (has_titlebar) + dwStyle |= WS_CAPTION; + else if (has_border) + dwStyle |= WS_BORDER; + + if (!IupGetName(ih)) + iupAttribSetHandleName(ih); + } + else + { + native_parent = iupDialogGetNativeParent(ih); + + if (native_parent) + { + dwStyle |= WS_POPUP; + + if (has_titlebar) + dwStyle |= WS_CAPTION; + else if (has_border) + dwStyle |= WS_BORDER; + } + else + { + if (has_titlebar) + { + dwStyle |= WS_OVERLAPPED; + } + else + { + if (has_border) + dwStyle |= WS_POPUP | WS_BORDER; + else + dwStyle |= WS_POPUP; + + dwExStyle |= WS_EX_NOACTIVATE; /* this will hide it from the taskbar */ + } + } + + if (iupAttribGet(ih, "MDIFRAME")) + classname = "IupDialogMDIFrame"; + } + + if (iupAttribGetBoolean(ih, "TOOLBOX") && native_parent) + dwExStyle |= WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE; + + if (iupAttribGetBoolean(ih, "DIALOGFRAME") && native_parent) + dwExStyle |= WS_EX_DLGMODALFRAME; /* this will hide the MENUBOX but not the close button */ + + if (iupAttribGetBoolean(ih, "COMPOSITED")) + dwExStyle |= WS_EX_COMPOSITED; + else + dwStyle |= WS_CLIPCHILDREN; + + if (iupAttribGetBoolean(ih, "HELPBUTTON")) + dwExStyle |= WS_EX_CONTEXTHELP; + + if (iupAttribGetBoolean(ih, "CONTROL") && native_parent) + { + /* TODO: this were used by LuaCom to create embeded controls, + don't know if it is still working */ + dwStyle = WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN; + classname = "IupDialogControl"; + } + + /* CreateWindowEx will send WM_GETMINMAXINFO before Ihandle is associated with HWND */ + if (iupAttribGet(ih, "MINSIZE") || iupAttribGet(ih, "MAXSIZE")) + winMinMaxHandle = ih; + + /* size will be updated in IupRefresh -> winDialogLayoutUpdate */ + /* position will be updated in iupDialogShowXY */ + + if (iupAttribGetBoolean(ih, "MDICHILD")) + ih->handle = CreateMDIWindow(classname, + title, /* title */ + dwStyle, /* style */ + 0, /* x-position */ + 0, /* y-position */ + 100, /* horizontal size - set this to avoid size calculation problems */ + 100, /* vertical size */ + native_parent, /* owner window */ + iupwin_hinstance, /* instance of app. */ + 0); /* no creation parameters */ + else + ih->handle = CreateWindowEx(dwExStyle, /* extended styles */ + classname, /* class */ + title, /* title */ + dwStyle, /* style */ + 0, /* x-position */ + 0, /* y-position */ + 100, /* horizontal size - set this to avoid size calculation problems */ + 100, /* vertical size */ + native_parent, /* owner window */ + (HMENU)0, /* Menu or child-window identifier */ + iupwin_hinstance, /* instance of app. */ + NULL); /* no creation parameters */ + if (!ih->handle) + return IUP_ERROR; + + /* associate HWND with Ihandle*, all Win32 controls must call this. */ + iupwinHandleSet(ih); + + if (iupStrEqual(classname, "IupDialogMDIChild")) /* hides the mdi child */ + ShowWindow(ih->handle, SW_HIDE); + + /* configure for DRAG&DROP */ + if (IupGetCallback(ih, "DROPFILES_CB")) + iupAttribSetStr(ih, "DRAGDROP", "YES"); + + /* Reset attributes handled during creation that */ + /* also can be changed later, and can be consulted from the native system. */ + iupAttribSetStr(ih, "TITLE", NULL); + iupAttribSetStr(ih, "BORDER", NULL); + + /* Ignore VISIBLE before mapping */ + iupAttribSetStr(ih, "VISIBLE", NULL); + + /* Set the default CmdShow for ShowWindow */ + ih->data->cmd_show = SW_SHOWNORMAL; + + return IUP_NOERROR; +} + +static void winDialogUnMapMethod(Ihandle* ih) +{ + if (ih->data->menu) + { + ih->data->menu->handle = NULL; /* the dialog will destroy the native menu */ + IupDestroy(ih->data->menu); + } + + if (iupAttribGet(ih, "_IUPDLG_HASTRAY")) + winDialogSetTrayAttrib(ih, NULL); + + /* remove the association before destroying */ + iupwinHandleRemove(ih); + + /* Destroys the window, so we can destroy the class */ + if (iupAttribGetBoolean(ih, "MDICHILD")) + { + /* for MDICHILDs must send WM_MDIDESTROY, instead of calling DestroyWindow */ + Ihandle* client = (Ihandle*)iupAttribGet(ih, "MDICLIENT_HANDLE"); + SendMessage(client->handle, WM_MDIDESTROY, (WPARAM)ih->handle, 0); + } + else + DestroyWindow(ih->handle); /* this will destroy the Windows children also. */ + /* but IupDestroy already destroyed the IUP children */ + /* so it is safe to call DestroyWindow */ +} + +static void winDialogLayoutUpdateMethod(Ihandle *ih) +{ + if (ih->data->ignore_resize) + return; + + ih->data->ignore_resize = 1; + + /* for dialogs the position is not updated here */ + SetWindowPos(ih->handle, 0, 0, 0, ih->currentwidth, ih->currentheight, + SWP_NOMOVE|SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSENDCHANGING); + + ih->data->ignore_resize = 0; +} + +static void winDialogReleaseMethod(Iclass* ic) +{ + (void)ic; + if (iupwinClassExist("IupDialog")) + { + UnregisterClass("IupDialog", iupwin_hinstance); + UnregisterClass("IupDialogControl", iupwin_hinstance); + UnregisterClass("IupDialogMDIChild", iupwin_hinstance); + UnregisterClass("IupDialogMDIFrame", iupwin_hinstance); + } +} + + + +/**************************************************************************** + Attributes +****************************************************************************/ + + +static int winDialogSetBgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + if (iupStrToRGB(value, &r, &g, &b)) + { + iupAttribStoreStr(ih, "_IUPWIN_BACKGROUND_COLOR", value); + iupAttribSetStr(ih, "_IUPWIN_BACKGROUND_BITMAP", NULL); + RedrawWindow(ih->handle, NULL, NULL, RDW_ERASE|RDW_ERASENOW); /* force a WM_ERASEBKGND now */ + return 1; + } + return 0; +} + +static int winDialogSetBackgroundAttrib(Ihandle* ih, const char* value) +{ + if (winDialogSetBgColorAttrib(ih, value)) + return 1; + else + { + HBITMAP hBitmap = iupImageGetImage(value, ih, 0); + if (hBitmap) + { + iupAttribSetStr(ih, "_IUPWIN_BACKGROUND_COLOR", NULL); + iupAttribSetStr(ih, "_IUPWIN_BACKGROUND_BITMAP", (char*)hBitmap); + RedrawWindow(ih->handle, NULL, NULL, RDW_ERASE|RDW_ERASENOW); /* force a WM_ERASEBKGND now */ + return 1; + } + } + + return 0; +} + +static HWND iupwin_mdifirst = NULL; +static HWND iupwin_mdinext = NULL; + +static char* winDialogGetMdiActiveAttrib(Ihandle *ih) +{ + Ihandle* client = (Ihandle*)iupAttribGet(ih, "MDICLIENT_HANDLE"); + if (client) + { + HWND hchild = (HWND)SendMessage(client->handle, WM_MDIGETACTIVE, 0, 0); + Ihandle* child = iupwinHandleGet(hchild); + if (child) + { + iupwin_mdinext = NULL; + iupwin_mdifirst = hchild; + return IupGetName(child); + } + } + + iupwin_mdifirst = NULL; + iupwin_mdinext = NULL; + return NULL; +} + +static char* winDialogGetMdiNextAttrib(Ihandle *ih) +{ + Ihandle* client = (Ihandle*)iupAttribGet(ih, "MDICLIENT_HANDLE"); + if (client) + { + Ihandle* child; + HWND hchild = iupwin_mdinext? iupwin_mdinext: iupwin_mdifirst; + + /* Skip the icon title windows */ + while (hchild && GetWindow (hchild, GW_OWNER)) + hchild = GetWindow(hchild, GW_HWNDNEXT); + + if (!hchild || hchild == iupwin_mdifirst) + { + iupwin_mdinext = NULL; + return NULL; + } + + child = iupwinHandleGet(hchild); + if (child) + { + iupwin_mdinext = hchild; + return IupGetName(child); + } + } + + iupwin_mdinext = NULL; + return NULL; +} + +/* define this here, so we do not need to define _WIN32_WINNT=0x0500 */ +#ifndef WS_EX_LAYERED +#define WS_EX_LAYERED 0x00080000 +#endif + +#ifndef LWA_ALPHA +#define LWA_ALPHA 0x00000002 +#endif + +typedef BOOL (WINAPI*winSetLayeredWindowAttributes)( + HWND hwnd, + COLORREF crKey, + BYTE bAlpha, + DWORD dwFlags); + +static int winDialogSetOpacityAttrib(Ihandle *ih, const char *value) +{ + DWORD dwExStyle = GetWindowLong(ih->handle, GWL_EXSTYLE); + if (!value) + { + if (dwExStyle & WS_EX_LAYERED) + { + dwExStyle &= ~WS_EX_LAYERED; /* remove the style */ + SetWindowLong(ih->handle, GWL_EXSTYLE, dwExStyle); + RedrawWindow(ih->handle, NULL, NULL, RDW_ERASE|RDW_INVALIDATE|RDW_FRAME|RDW_ALLCHILDREN); /* invalidate everything and all children */ + } + return 0; + } + + if (!(dwExStyle & WS_EX_LAYERED)) + { + dwExStyle |= WS_EX_LAYERED; /* add the style */ + SetWindowLong(ih->handle, GWL_EXSTYLE, dwExStyle); + } + + { + static winSetLayeredWindowAttributes mySetLayeredWindowAttributes = NULL; + + int opacity; + if (!iupStrToInt(value, &opacity)) + return 0; + + if (!mySetLayeredWindowAttributes) + { + HMODULE hinstDll = LoadLibrary("user32.dll"); + if (hinstDll) + mySetLayeredWindowAttributes = (winSetLayeredWindowAttributes)GetProcAddress(hinstDll, "SetLayeredWindowAttributes"); + } + + if (mySetLayeredWindowAttributes) + mySetLayeredWindowAttributes(ih->handle, 0, (BYTE)opacity, LWA_ALPHA); + } + + RedrawWindow(ih->handle, NULL, NULL, RDW_ERASE|RDW_INVALIDATE|RDW_FRAME|RDW_ALLCHILDREN); /* invalidate everything and all children */ + return 1; +} + +static int winDialogSetMdiArrangeAttrib(Ihandle *ih, const char *value) +{ + Ihandle* client = (Ihandle*)iupAttribGet(ih, "MDICLIENT_HANDLE"); + if (client) + { + UINT msg = 0; + WPARAM wp = 0; + + if (iupStrEqualNoCase(value, "TILEHORIZONTAL")) + { + msg = WM_MDITILE; + wp = MDITILE_HORIZONTAL; + } + else if (iupStrEqualNoCase(value, "TILEVERTICAL")) + { + msg = WM_MDITILE; + wp = MDITILE_VERTICAL; + } + else if (iupStrEqualNoCase(value, "CASCADE")) + msg = WM_MDICASCADE; + else if (iupStrEqualNoCase(value, "ICON")) + msg = WM_MDIICONARRANGE; + + if (msg) + SendMessage(client->handle, msg, wp, 0); + } + return 0; +} + +static int winDialogSetMdiActivateAttrib(Ihandle *ih, const char *value) +{ + Ihandle* client = (Ihandle*)iupAttribGet(ih, "MDICLIENT_HANDLE"); + if (client) + { + Ihandle* child = IupGetHandle(value); + if (child) + SendMessage(client->handle, WM_MDIACTIVATE, (WPARAM)child->handle, 0); + else + { + HWND hchild = (HWND)SendMessage(client->handle, WM_MDIGETACTIVE, 0, 0); + if (iupStrEqualNoCase(value, "NEXT")) + SendMessage(client->handle, WM_MDINEXT, (WPARAM)hchild, TRUE); + else if (iupStrEqualNoCase(value, "PREVIOUS")) + SendMessage(client->handle, WM_MDINEXT, (WPARAM)hchild, FALSE); + } + } + return 0; +} + +static int winDialogSetMdiCloseAllAttrib(Ihandle *ih, const char *value) +{ + (void)value; + winDialogMDICloseChildren(ih); + return 0; +} + +static void winDialogTrayMessage(HWND hWnd, DWORD dwMessage, HICON hIcon, PSTR pszTip) +{ + NOTIFYICONDATA tnd; + memset(&tnd, 0, sizeof(NOTIFYICONDATA)); + + tnd.cbSize = sizeof(NOTIFYICONDATA); + tnd.hWnd = hWnd; + tnd.uID = 1000; + + if (dwMessage == NIM_ADD) + { + tnd.uFlags = NIF_MESSAGE; + tnd.uCallbackMessage = WM_USER+IWIN_TRAY_NOTIFICATION; + } + else if (dwMessage == NIM_MODIFY) + { + if (hIcon) + { + tnd.uFlags |= NIF_ICON; + tnd.hIcon = hIcon; + } + + if (pszTip) + { + tnd.uFlags |= NIF_TIP; + lstrcpyn(tnd.szTip, pszTip, sizeof(tnd.szTip)); + } + } + + Shell_NotifyIcon(dwMessage, &tnd); +} + +static int winDialogCheckTray(Ihandle *ih) +{ + if (iupAttribGet(ih, "_IUPDLG_HASTRAY")) + return 1; + + if (iupAttribGetBoolean(ih, "TRAY")) + { + winDialogTrayMessage(ih->handle, NIM_ADD, NULL, NULL); + iupAttribSetStr(ih, "_IUPDLG_HASTRAY", "YES"); + return 1; + } + + return 0; +} + +static int winDialogSetTrayAttrib(Ihandle *ih, const char *value) +{ + int tray = iupStrBoolean(value); + if (iupAttribGet(ih, "_IUPDLG_HASTRAY")) + { + if (!tray) + { + winDialogTrayMessage(ih->handle, NIM_DELETE, NULL, NULL); + iupAttribSetStr(ih, "_IUPDLG_HASTRAY", NULL); + } + } + else + { + if (tray) + { + winDialogTrayMessage(ih->handle, NIM_ADD, NULL, NULL); + iupAttribSetStr(ih, "_IUPDLG_HASTRAY", "YES"); + } + } + return 1; +} + +static int winDialogSetTrayTipAttrib(Ihandle *ih, const char *value) +{ + if (winDialogCheckTray(ih)) + winDialogTrayMessage(ih->handle, NIM_MODIFY, NULL, (PSTR)value); + return 1; +} + +static int winDialogSetTrayImageAttrib(Ihandle *ih, const char *value) +{ + if (winDialogCheckTray(ih)) + { + HICON hIcon = (HICON)iupImageGetIcon(value); + if (hIcon) + winDialogTrayMessage(ih->handle, NIM_MODIFY, hIcon, NULL); + } + return 1; +} + +static int winDialogSetBringFrontAttrib(Ihandle *ih, const char *value) +{ + if (iupStrBoolean(value)) + SetForegroundWindow(ih->handle); + return 0; +} + +static int winDialogSetTopMostAttrib(Ihandle *ih, const char *value) +{ + if (iupStrBoolean(value)) + SetWindowPos(ih->handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); + else + SetWindowPos(ih->handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); + return 1; +} + +static int winDialogSetIconAttrib(Ihandle* ih, const char *value) +{ + if (!value) + SendMessage(ih->handle, WM_SETICON, (WPARAM)ICON_BIG, (LPARAM)NULL); + else + { + HICON icon = iupImageGetIcon(value); + if (icon) + SendMessage(ih->handle, WM_SETICON, (WPARAM) ICON_BIG, (LPARAM)icon); + } + + if (IsIconic(ih->handle)) + RedrawWindow(ih->handle, NULL, NULL, RDW_INVALIDATE|RDW_ERASE|RDW_UPDATENOW); /* redraw the icon */ + else + RedrawWindow(ih->handle, NULL, NULL, RDW_FRAME|RDW_UPDATENOW); /* only the frame needs to be redrawn */ + + return 1; +} + +static int winDialogSetFullScreenAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + { + if (!iupAttribGet(ih, "_IUPWIN_FS_STYLE")) + { + int width, height; + LONG off_style, new_style; + + BOOL visible = ShowWindow (ih->handle, SW_HIDE); + + /* remove the decorations */ + off_style = WS_BORDER | WS_THICKFRAME | WS_CAPTION | + WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU; + new_style = GetWindowLong(ih->handle, GWL_STYLE); + iupAttribSetStr(ih, "_IUPWIN_FS_STYLE", (char*)new_style); + new_style &= (~off_style); + SetWindowLong(ih->handle, GWL_STYLE, new_style); + + /* save the previous decoration attributes */ + iupAttribStoreStr(ih, "_IUPWIN_FS_MAXBOX", iupAttribGet(ih, "MAXBOX")); + iupAttribStoreStr(ih, "_IUPWIN_FS_MINBOX", iupAttribGet(ih, "MINBOX")); + iupAttribStoreStr(ih, "_IUPWIN_FS_MENUBOX",iupAttribGet(ih, "MENUBOX")); + iupAttribStoreStr(ih, "_IUPWIN_FS_RESIZE", iupAttribGet(ih, "RESIZE")); + iupAttribStoreStr(ih, "_IUPWIN_FS_BORDER", iupAttribGet(ih, "BORDER")); + iupAttribStoreStr(ih, "_IUPWIN_FS_TITLE", IupGetAttribute(ih, "TITLE")); /* must use IupGetAttribute to check from the native implementation */ + + /* save the previous position and size */ + iupAttribStoreStr(ih, "_IUPWIN_FS_X", IupGetAttribute(ih, "X")); /* must use IupGetAttribute to check from the native implementation */ + iupAttribStoreStr(ih, "_IUPWIN_FS_Y", IupGetAttribute(ih, "Y")); + iupAttribStoreStr(ih, "_IUPWIN_FS_SIZE", IupGetAttribute(ih, "RASTERSIZE")); + + /* remove the decorations attributes */ + iupAttribSetStr(ih, "MAXBOX", "NO"); + iupAttribSetStr(ih, "MINBOX", "NO"); + iupAttribSetStr(ih, "MENUBOX", "NO"); + IupSetAttribute(ih, "TITLE", NULL); + iupAttribSetStr(ih, "RESIZE", "NO"); + iupAttribSetStr(ih, "BORDER", "NO"); + + /* full screen size */ + iupdrvGetFullSize(&width, &height); + + SetWindowPos(ih->handle, HWND_TOP, 0, 0, width, height, SWP_FRAMECHANGED); + + /* layout will be updated in WM_SIZE */ + if (visible) + ShowWindow(ih->handle, SW_SHOW); + } + } + else + { + LONG style = (LONG)iupAttribGet(ih, "_IUPWIN_FS_STYLE"); + if (style) + { + BOOL visible = ShowWindow(ih->handle, SW_HIDE); + + /* restore the decorations attributes */ + iupAttribStoreStr(ih, "MAXBOX", iupAttribGet(ih, "_IUPWIN_FS_MAXBOX")); + iupAttribStoreStr(ih, "MINBOX", iupAttribGet(ih, "_IUPWIN_FS_MINBOX")); + iupAttribStoreStr(ih, "MENUBOX",iupAttribGet(ih, "_IUPWIN_FS_MENUBOX")); + IupSetAttribute(ih, "TITLE", iupAttribGet(ih, "_IUPWIN_FS_TITLE")); /* TITLE is not stored in the HashTable */ + iupAttribStoreStr(ih, "RESIZE", iupAttribGet(ih, "_IUPWIN_FS_RESIZE")); + iupAttribStoreStr(ih, "BORDER", iupAttribGet(ih, "_IUPWIN_FS_BORDER")); + + /* restore the decorations */ + SetWindowLong(ih->handle, GWL_STYLE, style); + + /* restore position and size */ + SetWindowPos(ih->handle, HWND_TOP, + iupAttribGetInt(ih, "_IUPWIN_FS_X"), + iupAttribGetInt(ih, "_IUPWIN_FS_Y"), + IupGetInt(ih, "_IUPWIN_FS_SIZE"), + IupGetInt2(ih, "_IUPWIN_FS_SIZE"), 0); + + /* layout will be updated in WM_SIZE */ + if (visible) + ShowWindow(ih->handle, SW_SHOW); + + /* remove auxiliar attributes */ + iupAttribSetStr(ih, "_IUPWIN_FS_MAXBOX", NULL); + iupAttribSetStr(ih, "_IUPWIN_FS_MINBOX", NULL); + iupAttribSetStr(ih, "_IUPWIN_FS_MENUBOX",NULL); + iupAttribSetStr(ih, "_IUPWIN_FS_TITLE", NULL); + iupAttribSetStr(ih, "_IUPWIN_FS_RESIZE", NULL); + iupAttribSetStr(ih, "_IUPWIN_FS_BORDER", NULL); + + iupAttribSetStr(ih, "_IUPWIN_FS_X", NULL); + iupAttribSetStr(ih, "_IUPWIN_FS_Y", NULL); + iupAttribSetStr(ih, "_IUPWIN_FS_SIZE", NULL); + + iupAttribSetStr(ih, "_IUPWIN_FS_STYLE", NULL); + } + } + return 1; +} + + +void iupdrvDialogInitClass(Iclass* ic) +{ + if (!iupwinClassExist("IupDialog")) + { + winDialogRegisterClass(0); + winDialogRegisterClass(1); + winDialogRegisterClass(2); + winDialogRegisterClass(-1); + + WM_HELPMSG = RegisterWindowMessage(HELPMSGSTRING); + } + + /* Driver Dependent Class functions */ + ic->Map = winDialogMapMethod; + ic->UnMap = winDialogUnMapMethod; + ic->LayoutUpdate = winDialogLayoutUpdateMethod; + ic->Release = winDialogReleaseMethod; + + /* Callback Windows Only*/ + iupClassRegisterCallback(ic, "MDIACTIVATE_CB", ""); + + /* Callback Windows and GTK Only */ + iupClassRegisterCallback(ic, "TRAYCLICK_CB", "iii"); + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, winDialogSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "TITLE", iupdrvBaseGetTitleAttrib, iupdrvBaseSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* Base Container */ + iupClassRegisterAttribute(ic, "CLIENTSIZE", iupdrvBaseGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NO_INHERIT); + + /* IupDialog only */ + iupClassRegisterAttribute(ic, "BACKGROUND", NULL, winDialogSetBackgroundAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ICON", NULL, winDialogSetIconAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FULLSCREEN", NULL, winDialogSetFullScreenAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SAVEUNDER", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MINSIZE", NULL, NULL, IUPAF_SAMEASSYSTEM, "1x1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MAXSIZE", NULL, NULL, IUPAF_SAMEASSYSTEM, "65535x65535", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* IupDialog Windows Only */ + iupClassRegisterAttribute(ic, "HWND", iupBaseGetWidAttrib, NULL, NULL, NULL, IUPAF_NO_STRING|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MDIARRANGE", NULL, winDialogSetMdiArrangeAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MDIACTIVATE", NULL, winDialogSetMdiActivateAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MDICLOSEALL", NULL, winDialogSetMdiCloseAllAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MDIACTIVE", winDialogGetMdiActiveAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MDINEXT", winDialogGetMdiNextAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "OPACITY", NULL, winDialogSetOpacityAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "LAYERALPHA", NULL, winDialogSetOpacityAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "BRINGFRONT", NULL, winDialogSetBringFrontAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "COMPOSITED", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED); + + iupClassRegisterAttribute(ic, "CONTROL", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "HELPBUTTON", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TOOLBOX", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MDIFRAME", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MDICLIENT", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MDIMENU", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MDICHILD", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + + /* IupDialog Windows and GTK Only */ + iupClassRegisterAttribute(ic, "TOPMOST", NULL, winDialogSetTopMostAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DRAGDROP", NULL, iupwinSetDragDropAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TRAY", NULL, winDialogSetTrayAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TRAYIMAGE", NULL, winDialogSetTrayImageAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TRAYTIP", NULL, winDialogSetTrayTipAttrib, NULL, NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/win/iupwin_draw.c b/iup/src/win/iupwin_draw.c new file mode 100755 index 0000000..4a810e6 --- /dev/null +++ b/iup/src/win/iupwin_draw.c @@ -0,0 +1,328 @@ +/** \file + * \brief Draw Functions + * + * See Copyright Notice in "iup.h" + */ + +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0501 +#include +#include +#include + +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_attrib.h" +#include "iup_class.h" +#include "iup_str.h" + +#include "iupwin_drv.h" +#include "iupwin_info.h" +#include "iupwin_draw.h" + + +#ifndef TABP_AEROWIZARDBODY +#define TABP_AEROWIZARDBODY 11 /* manually added definition */ +#endif + +#ifndef TMT_FILLCOLORHINT +#define TMT_FILLCOLORHINT 3821 +#endif +#ifndef TMT_TEXTCOLOR +#define TMT_TEXTCOLOR 3823 +#endif + + +typedef HTHEME (STDAPICALLTYPE *_winThemeOpenData)(HWND hwnd, LPCWSTR pszClassList); +typedef HRESULT (STDAPICALLTYPE *_winThemeCloseData)(HTHEME hTheme); +typedef HRESULT (STDAPICALLTYPE *_winThemeDrawBackground)(HTHEME hTheme, HDC hDC, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect); +typedef HRESULT (STDAPICALLTYPE *_winThemeGetColor)(HTHEME hTheme, int iPartId, int iStateId, int iPropId, COLORREF *pColor); + +static _winThemeOpenData winThemeOpenData = NULL; +static _winThemeCloseData winThemeCloseData = NULL; +static _winThemeDrawBackground winThemeDrawBackground = NULL; +static _winThemeGetColor winThemeGetColor = NULL; + +typedef BOOL (CALLBACK* _winAlphaBlendFunc)( HDC hdcDest, + int xoriginDest, int yoriginDest, + int wDest, int hDest, HDC hdcSrc, + int xoriginSrc, int yoriginSrc, + int wSrc, int hSrc, + BLENDFUNCTION ftn); +static _winAlphaBlendFunc winAlphaBlend = NULL; + +static int winDrawThemeEnabled(void) +{ + return winThemeOpenData? 1: 0; +} + +void iupwinDrawText(HDC hDC, const char* text, int x, int y, int width, int height, HFONT hFont, COLORREF fgcolor, int style) +{ + COLORREF oldcolor; + RECT rect; + HFONT hOldFont = SelectObject(hDC, hFont); + + rect.left = x; + rect.top = y; + rect.right = x+width; + rect.bottom = y+height; + + SetTextAlign(hDC, TA_TOP|TA_LEFT); + SetBkMode(hDC, TRANSPARENT); + oldcolor = SetTextColor(hDC, fgcolor); + + DrawText(hDC, text, -1, &rect, style|DT_NOCLIP); + + SelectObject(hDC, hOldFont); + SetTextColor(hDC, oldcolor); + SetBkMode(hDC, OPAQUE); +} + +void iupwinDrawBitmap(HDC hDC, HBITMAP hBitmap, HBITMAP hMask, int x, int y, int width, int height, int bpp) +{ + HDC hMemDC = CreateCompatibleDC(hDC); + SelectObject(hMemDC, hBitmap); + + if (bpp == 32 && winAlphaBlend) + { + BLENDFUNCTION blendfunc; + blendfunc.BlendOp = AC_SRC_OVER; + blendfunc.BlendFlags = 0; + blendfunc.SourceConstantAlpha = 0xFF; + blendfunc.AlphaFormat = AC_SRC_ALPHA; + + winAlphaBlend(hDC, x, y, width, height, + hMemDC, 0, 0, width, height, + blendfunc); + } + else if (bpp == 8 && hMask) + MaskBlt(hDC, x, y, width, height, + hMemDC, 0, 0, + hMask, 0, 0, MAKEROP4(SRCCOPY, 0xAA0000)); + else + BitBlt(hDC, x, y, width, height, + hMemDC, 0, 0, + SRCCOPY); + + + DeleteDC(hMemDC); +} + +void iupwinDrawInit(void) +{ + if (!winAlphaBlend) + { + HINSTANCE lib = LoadLibrary("Msimg32"); + if (lib) + winAlphaBlend = (_winAlphaBlendFunc)GetProcAddress(lib, "AlphaBlend"); + } + + if (!winThemeOpenData && iupwin_comctl32ver6) + { + HMODULE hinstDll = LoadLibrary("uxtheme.dll"); + if (hinstDll) + { + winThemeOpenData = (_winThemeOpenData)GetProcAddress(hinstDll, "OpenThemeData"); + winThemeCloseData = (_winThemeCloseData)GetProcAddress(hinstDll, "CloseThemeData"); + winThemeDrawBackground = (_winThemeDrawBackground)GetProcAddress(hinstDll, "DrawThemeBackground"); + winThemeGetColor = (_winThemeGetColor)GetProcAddress(hinstDll, "GetThemeColor"); + } + } +} + +static int winDrawGetThemeStateId(int itemState) +{ + if (itemState & ODS_DISABLED) + return PBS_DISABLED; + else if (itemState & ODS_SELECTED) + return PBS_PRESSED; + else if (itemState & ODS_HOTLIGHT) + return PBS_HOT; + else if (itemState & ODS_DEFAULT) + return PBS_DEFAULTED; + else + return PBS_NORMAL; +} + +static int winDrawThemeButtonBorder(HWND hWnd, HDC hDC, RECT *rect, UINT itemState) +{ + int iStateId; + HTHEME hTheme; + + if (!winDrawThemeEnabled()) + return 0; + + hTheme = winThemeOpenData(hWnd, L"BUTTON"); + if (!hTheme) + return 0; + + iStateId = winDrawGetThemeStateId(itemState); + + winThemeDrawBackground(hTheme, hDC, BP_PUSHBUTTON, iStateId, rect, NULL); + + winThemeCloseData(hTheme); + return 1; +} + +void iupwinDrawThemeFrameBorder(HWND hWnd, HDC hDC, RECT *rect, UINT itemState) +{ + int iStateId = GBS_NORMAL; + HTHEME hTheme; + + if (!winDrawThemeEnabled()) + return; + + hTheme = winThemeOpenData(hWnd, L"BUTTON"); + if (!hTheme) + return; + + if (itemState & ODS_DISABLED) + iStateId = GBS_DISABLED; + + winThemeDrawBackground(hTheme, hDC, BP_GROUPBOX, iStateId, rect, NULL); + + winThemeCloseData(hTheme); +} + +int iupwinDrawGetThemeTabsBgColor(HWND hWnd, COLORREF *color) +{ + HTHEME hTheme; + HRESULT ret; + + if (!winDrawThemeEnabled()) + return 0; + + hTheme = winThemeOpenData(hWnd, L"TAB"); + if (!hTheme) + return 0; + + if (iupwinIsVista()) + ret = winThemeGetColor(hTheme, TABP_AEROWIZARDBODY, TIS_NORMAL, TMT_FILLCOLORHINT, color); + else + ret = winThemeGetColor(hTheme, TABP_BODY, TIS_NORMAL, TMT_FILLCOLORHINT, color); + + winThemeCloseData(hTheme); + return (ret == S_OK)? 1: 0; +} + +int iupwinDrawGetThemeButtonBgColor(HWND hWnd, COLORREF *color) +{ + HTHEME hTheme; + HRESULT ret; + + if (!winDrawThemeEnabled()) + return 0; + + hTheme = winThemeOpenData(hWnd, L"BUTTON"); + if (!hTheme) + return 0; + + ret = winThemeGetColor(hTheme, BP_PUSHBUTTON, PBS_NORMAL, TMT_FILLCOLORHINT, color); + + winThemeCloseData(hTheme); + return (ret == S_OK)? 1: 0; +} + +int iupwinDrawGetThemeFrameFgColor(HWND hWnd, COLORREF *color) +{ + HTHEME hTheme; + HRESULT ret; + + if (!winDrawThemeEnabled()) + return 0; + + hTheme = winThemeOpenData(hWnd, L"BUTTON"); + if (!hTheme) + return 0; + + ret = winThemeGetColor(hTheme, BP_GROUPBOX, GBS_NORMAL, TMT_TEXTCOLOR, color); + + winThemeCloseData(hTheme); + return (ret == S_OK)? 1: 0; +} + +static int winDrawGetStateId(int itemState) +{ + if (itemState & ODS_DISABLED) + return DFCS_INACTIVE; + else if (itemState & ODS_SELECTED) + return DFCS_PUSHED; + else if (itemState & ODS_HOTLIGHT) + return DFCS_HOT; + else + return 0; +} + +void iupwinDrawButtonBorder(HWND hWnd, HDC hDC, RECT *rect, UINT itemState) +{ + if (!winDrawThemeButtonBorder(hWnd, hDC, rect, itemState)) + { + DrawFrameControl(hDC, rect, DFC_BUTTON, DFCS_BUTTONPUSH | winDrawGetStateId(itemState)); + if (itemState & ODS_DEFAULT) /* if a button has the focus, must draw the default button frame */ + FrameRect(hDC, rect, (HBRUSH)GetStockObject(BLACK_BRUSH)); + } +} + +void iupdrvDrawFocusRect(Ihandle* ih, void* gc, int x, int y, int w, int h) +{ + HDC hDC = (HDC)gc; + RECT rect; + (void)ih; + + rect.left = x; + rect.top = y; + rect.right = x+w; + rect.bottom = y+h; + + DrawFocusRect(hDC, &rect); +} + +void iupwinDrawRemoveTheme(HWND hwnd) +{ + typedef HRESULT (STDAPICALLTYPE *winSetWindowTheme)(HWND hwnd, LPCWSTR pszSubAppName, LPCWSTR pszSubIdList); + static winSetWindowTheme mySetWindowTheme = NULL; + if (!mySetWindowTheme) + { + HMODULE hinstDll = LoadLibrary("uxtheme.dll"); + if (hinstDll) + mySetWindowTheme = (winSetWindowTheme)GetProcAddress(hinstDll, "SetWindowTheme"); + } + + if (mySetWindowTheme) + mySetWindowTheme(hwnd, L"", L""); +} + +void iupwinDrawParentBackground(Ihandle* ih, HDC hDC, RECT* rect) +{ + unsigned char r=0, g=0, b=0; + char* color = iupBaseNativeParentGetBgColorAttrib(ih); + iupStrToRGB(color, &r, &g, &b); + SetDCBrushColor(hDC, RGB(r,g,b)); + FillRect(hDC, rect, (HBRUSH)GetStockObject(DC_BRUSH)); +} + +HDC iupwinDrawCreateBitmapDC(iupwinBitmapDC *bmpDC, HDC hDC, int w, int h) +{ + bmpDC->w = w; + bmpDC->h = h; + bmpDC->hDC = hDC; + + bmpDC->hBitmap = CreateCompatibleBitmap(bmpDC->hDC, w, h); + bmpDC->hBitmapDC = CreateCompatibleDC(bmpDC->hDC); + bmpDC->hOldBitmap = SelectObject(bmpDC->hBitmapDC, bmpDC->hBitmap); + return bmpDC->hBitmapDC; +} + +void iupwinDrawDestroyBitmapDC(iupwinBitmapDC *bmpDC) +{ + BitBlt(bmpDC->hDC, 0, 0, bmpDC->w, bmpDC->h, bmpDC->hBitmapDC, 0, 0, SRCCOPY); + SelectObject(bmpDC->hBitmapDC, bmpDC->hOldBitmap); + DeleteObject(bmpDC->hBitmap); + DeleteDC(bmpDC->hBitmapDC); +} + diff --git a/iup/src/win/iupwin_draw.h b/iup/src/win/iupwin_draw.h new file mode 100755 index 0000000..c9a57e6 --- /dev/null +++ b/iup/src/win/iupwin_draw.h @@ -0,0 +1,47 @@ +/** \file + * \brief Draw Functions + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPWIN_DRAW_H +#define __IUPWIN_DRAW_H + +#ifdef __cplusplus +extern "C" { +#endif + + +void iupwinDrawInit(void); + +void iupwinDrawBitmap(HDC hDC, HBITMAP hBitmap, HBITMAP hMask, int x, int y, int width, int height, int bpp); +void iupwinDrawText(HDC hDC, const char* text, int x, int y, int width, int height, HFONT hFont, COLORREF fgcolor, int style); + +void iupwinDrawParentBackground(Ihandle* ih, HDC hDC, RECT* rect); +void iupwinDrawButtonBorder(HWND hWnd, HDC hDC, RECT *rect, UINT itemState); + +void iupwinDrawThemeFrameBorder(HWND hWnd, HDC hDC, RECT *rect, UINT itemState); +int iupwinDrawGetThemeTabsBgColor(HWND hWnd, COLORREF *color); +int iupwinDrawGetThemeButtonBgColor(HWND hWnd, COLORREF *color); +int iupwinDrawGetThemeFrameFgColor(HWND hWnd, COLORREF *color); +void iupwinDrawRemoveTheme(HWND hWnd); + +typedef struct _iupwinBitmapDC +{ + HBITMAP hBitmap, hOldBitmap; + HDC hBitmapDC, hDC; + int w, h; +} iupwinBitmapDC; + +HDC iupwinDrawCreateBitmapDC(iupwinBitmapDC *bmpDC, HDC hDC, int w, int h); +void iupwinDrawDestroyBitmapDC(iupwinBitmapDC *bmpDC); + +#ifndef ODS_HOTLIGHT /* Only defined if WINVER >= 0x0500 */ +#define ODS_HOTLIGHT 0x0040 +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/win/iupwin_drv.h b/iup/src/win/iupwin_drv.h new file mode 100755 index 0000000..3372c1a --- /dev/null +++ b/iup/src/win/iupwin_drv.h @@ -0,0 +1,113 @@ +/** \file + * \brief Windows Driver + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPWIN_DRV_H +#define __IUPWIN_DRV_H + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifndef WS_EX_COMPOSITED +#define WS_EX_COMPOSITED 0x02000000L /* it is defined only when _WIN32_WINNT >= 0x0501 */ +#endif + + +/* global variables */ +/* declared where they are initialized */ +extern HINSTANCE iupwin_hinstance; /* winopen.c */ +extern HINSTANCE iupwin_dll_hinstance; /* winmain.c */ +extern int iupwin_comctl32ver6; /* winopen.c */ + +void iupwinShowLastError(void); + +/* focus */ +void iupwinWmSetFocus(Ihandle *ih); + +/* key */ +int iupwinKeyEvent(Ihandle* ih, int wincode, int press); +void iupwinButtonKeySetStatus(WORD keys, char* status, int doubleclick); +void iupwinKeyEncode(int key, unsigned int *keyval, unsigned int *state); + +/* tips */ +void iupwinTipsGetDispInfo(LPARAM lp); + +/* font */ +char* iupwinGetHFontAttrib(Ihandle *ih); +HFONT iupwinGetHFont(const char* value); +char* iupwinFindHFont(HFONT hFont); + +/* menu */ +void iupwinMenuDialogProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp); + +/* common */ + +/* Definition of a callback used to return the background brush of controls called "_IUPWIN_CTLCOLOR_CB". */ +typedef int (*IFctlColor)(Ihandle* ih, HDC hdc, LRESULT *result); + +/* Definition of a callback used to draw custom controls called "_IUPWIN_DRAWITEM_CB". + drawitem is a pointer to a DRAWITEMSTRUCT struct. */ +typedef void (*IFdrawItem)(Ihandle* ih, void* drawitem); + +/* Definition of a callback used to notify custom controls called "_IUPWIN_NOTIFY_CB". + msg_info is a pointer to a NMHDR struct. */ +typedef int (*IFnotify)(Ihandle* ih, void* msg_info, HRESULT *result); + +/* Definition of callback used for custom WinProc. Can return 0 or 1. + 0 = do default processing. + 1 = ABORT default processing and the result value should be returned. +*/ +typedef int (*IwinProc)(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result); + +/* Base WinProc used by all native elements. Configure base message handling + and custom IwinProc using "_IUPWIN_CTRLPROC_CB" callback. */ +LRESULT CALLBACK iupwinBaseWinProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); + +/* Base IwinProc callback used by native controls. */ +int iupwinBaseProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result); + +/* Base IwinProc callback used by native containers. + Handle messages that are sent to the parent Window. */ +int iupwinBaseContainerProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result); + +/* Creates the Window with native parent and child ID, associate HWND with Ihandle*, + and replace the WinProc by iupwinBaseWinProc */ +int iupwinCreateWindowEx(Ihandle* ih, LPCSTR lpClassName, DWORD dwExStyle, DWORD dwStyle); + +int iupwinClassExist(const char* name); +int iupwinGetColorRef(Ihandle *ih, char *name, COLORREF *color); +int iupwinGetParentBgColor(Ihandle* ih, COLORREF* cr); +void iupwinDropFiles(HDROP hDrop, Ihandle *ih); +Ihandle* iupwinMenuGetItemHandle(HMENU hmenu, int menuId); +Ihandle* iupwinMenuGetHandle(HMENU hMenu); +int iupwinSetDragDropAttrib(Ihandle* ih, const char* value); +void iupwinChangeProc(Ihandle *ih, WNDPROC new_proc); +void iupwinMergeStyle(Ihandle* ih, DWORD old_mask, DWORD value); +void iupwinSetStyle(Ihandle* ih, DWORD value, int set); +WCHAR* iupwinStrChar2Wide(const char* str); +int iupwinButtonUp(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp); +int iupwinButtonDown(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp); +int iupwinMouseMove(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp); +char* iupwinGetClipboardText(Ihandle* ih); + +int iupwinGetScreenRes(void); +/* 1 point = 1/72 inch */ +/* pixel = (point/72)*(pixel/inch) */ +#define IUPWIN_PT2PIXEL(_pt, _res) MulDiv(_pt, _res, 72) /* (((_pt)*(_res))/72) */ +#define IUPWIN_PIXEL2PT(_pixel, _res) MulDiv(_pixel, 72, _res) /* (((_pixel)*72)/(_res)) */ + + +/* child window identifier of the first MDI child window created, + should not conflict with any other command identifiers. */ +#define IUP_MDICHILD_START 100000000 + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/win/iupwin_filedlg.c b/iup/src/win/iupwin_filedlg.c new file mode 100755 index 0000000..da66b4b --- /dev/null +++ b/iup/src/win/iupwin_filedlg.c @@ -0,0 +1,580 @@ +/** \file + * \brief IupFileDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" +#include "iup_drvinfo.h" + +#include "iupwin_drv.h" + + +#ifndef OFN_FORCESHOWHIDDEN +#define OFN_FORCESHOWHIDDEN 0x10000000 /* Show All files including System and hidden files */ +#endif + +#define MAX_FILENAME_SIZE 65000 +#define IUP_PREVIEWCANVAS 3000 + +enum {IUP_DIALOGOPEN, IUP_DIALOGSAVE, IUP_DIALOGDIR}; + + +static void winFileDlgStrReplacePathSlash(char* name) +{ + /* check for "/" */ + int i, len = strlen(name); + for (i = 0; i < len; i++) + { + if (name[i] == '/') + name[i] = '\\'; + } +} + +static INT CALLBACK winFileDlgBrowseCallback(HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpData) +{ + (void)lParam; + if (uMsg == BFFM_INITIALIZED) + { + char* value; + Ihandle* ih = (Ihandle*)lpData; + ih->handle = hWnd; + iupDialogUpdatePosition(ih); + ih->handle = NULL; /* reset handle */ + value = iupStrDup(iupAttribGet(ih, "DIRECTORY")); + if (value) + { + winFileDlgStrReplacePathSlash(value); + SendMessage(hWnd, BFFM_SETSELECTION, TRUE, (LPARAM)value); + free(value); + } + } + else if (uMsg == BFFM_SELCHANGED) + { + char* buffer = iupStrGetMemory(MAX_FILENAME_SIZE); + ITEMIDLIST* selecteditem = (ITEMIDLIST*)lParam; + buffer[0] = 0; + SHGetPathFromIDList(selecteditem, buffer); + if (buffer[0] == 0) + SendMessage(hWnd, BFFM_ENABLEOK, 0, (LPARAM)FALSE); + else + SendMessage(hWnd, BFFM_ENABLEOK, 0, (LPARAM)TRUE); + } + return 0; +} + +static void winFileDlgGetFolder(Ihandle *ih) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + BROWSEINFO browseinfo; + char buffer[MAX_PATH]; + ITEMIDLIST *selecteditem; + + if (!parent) + parent = GetActiveWindow(); + + ZeroMemory(&browseinfo, sizeof(BROWSEINFO)); + browseinfo.lpszTitle = iupAttribGet(ih, "TITLE"); + browseinfo.pszDisplayName = buffer; + browseinfo.lpfn = winFileDlgBrowseCallback; + browseinfo.lParam = (LPARAM)ih; + browseinfo.ulFlags = BIF_NEWDIALOGSTYLE; + browseinfo.hwndOwner = parent; + + selecteditem = SHBrowseForFolder(&browseinfo); + if (!selecteditem) + { + iupAttribSetStr(ih, "VALUE", NULL); + iupAttribSetStr(ih, "STATUS", "-1"); + } + else + { + SHGetPathFromIDList(selecteditem, buffer); + iupAttribStoreStr(ih, "VALUE", buffer); + iupAttribSetStr(ih, "STATUS", "0"); + } + + iupAttribSetStr(ih, "FILEEXIST", NULL); + iupAttribSetStr(ih, "FILTERUSED", NULL); +} + +/************************************************************************************************/ + +static UINT_PTR CALLBACK winFileDlgSimpleHook(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam) +{ + (void)wParam; + switch(uiMsg) + { + case WM_INITDIALOG: + { + OPENFILENAME* openfilename = (OPENFILENAME*)lParam; + Ihandle* ih = (Ihandle*)openfilename->lCustData; + ih->handle = GetParent(hWnd); + iupDialogUpdatePosition(ih); + ih->handle = NULL; /* reset handle */ + SetWindowLongPtr(hWnd, DWLP_USER, (LONG_PTR)ih); + break; + } + case WM_DESTROY: + { + Ihandle* ih = (Ihandle*)GetWindowLongPtr(hWnd, DWLP_USER); + IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + if (cb) cb(ih, NULL, "FINISH"); + break; + } + case WM_NOTIFY: + { + LPOFNOTIFY pofn = (LPOFNOTIFY)lParam; + Ihandle* ih = (Ihandle*)pofn->lpOFN->lCustData; + switch (pofn->hdr.code) + { + case CDN_INITDONE: + { + IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + if (cb) cb(ih, NULL, "INIT"); + break; + } + case CDN_FILEOK: + case CDN_SELCHANGE: + { + IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + if (cb) + { + char* filename = iupStrGetMemory(MAX_FILENAME_SIZE); + if (CommDlg_OpenSave_GetFilePath(GetParent(hWnd), filename, MAX_FILENAME_SIZE) <= MAX_FILENAME_SIZE) + { + int ret; + char* file_msg; + + if (!iupdrvIsFile(filename)) + break; + + if (pofn->hdr.code == CDN_FILEOK) + file_msg = "OK"; + else + file_msg = "SELECT"; + + ret = cb(ih, filename, file_msg); + if (pofn->hdr.code == CDN_FILEOK && ret == IUP_IGNORE) + { + SetWindowLongPtr(hWnd, DWLP_MSGRESULT, 1L); + return 1; /* will refuse the file */ + } + } + } + break; + } + case CDN_HELP: + { + Icallback cb = (Icallback) IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + EndDialog(GetParent(hWnd), IDCANCEL); + break; + } + } + break; + } + } + return 0; +} + +static void winFileDlgSetPreviewCanvasPos(HWND hWnd, HWND hWndPreview) +{ + int height, width, ypos, xpos; + RECT rect, dlgrect; + HWND hWndFileList = GetDlgItem(GetParent(hWnd), 0x0471); + HWND hWndFileCombo = GetDlgItem(GetParent(hWnd), 0x047C); + + /* GetWindowRect return screen coordinates, must convert to parent's client coordinates */ + GetWindowRect(hWnd, &dlgrect); + + GetWindowRect(hWndPreview, &rect); + ypos = rect.top - dlgrect.top; /* keep the same vertical position, at first time this is 0 */ + height = rect.bottom-rect.top; /* keep the same height */ + + GetWindowRect(hWndFileList, &rect); + xpos = rect.left - dlgrect.left; /* horizontally align with file list at left */ + + GetWindowRect(hWndFileCombo, &rect); + width = (rect.right - dlgrect.left) - xpos; /* set size to align with file combo at right */ + + /* also position the child window that contains the template, must have room for the preview canvas */ + if (ypos) /* first time does nothing */ + SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, (rect.right - dlgrect.left), (dlgrect.bottom - dlgrect.top), SWP_NOMOVE|SWP_NOZORDER); + + SetWindowPos(hWndPreview, HWND_TOP, xpos, ypos, width, height, SWP_NOZORDER); +} + +static void winFileDlgUpdatePreviewGLCanvas(Ihandle* ih) +{ + Ihandle* glcanvas = IupGetAttributeHandle(ih, "PREVIEWGLCANVAS"); + if (glcanvas) + { + iupAttribSetStr(glcanvas, "HWND", iupAttribGet(ih, "HWND")); + glcanvas->iclass->Map(glcanvas); + } +} + +static UINT_PTR CALLBACK winFileDlgPreviewHook(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam) +{ + /* hWnd here is a handle to the child window that contains the template, + NOT the file dialog. Only the preview canvas is a child of this window. */ + + switch(uiMsg) + { + case WM_INITDIALOG: + { + OPENFILENAME* openfilename = (OPENFILENAME*)lParam; + Ihandle* ih = (Ihandle*)openfilename->lCustData; + HWND hWndPreview = GetDlgItem(hWnd, IUP_PREVIEWCANVAS); + + ih->handle = GetParent(hWnd); + iupDialogUpdatePosition(ih); + ih->handle = NULL; /* reset handle */ + + if (hWndPreview) + { + RECT rect; + + winFileDlgSetPreviewCanvasPos(hWnd, hWndPreview); + + GetClientRect(hWndPreview, &rect); + iupAttribSetInt(ih, "PREVIEWWIDTH", rect.right - rect.left); + iupAttribSetInt(ih, "PREVIEWHEIGHT", rect.bottom - rect.top); + } + SetWindowLongPtr(hWnd, DWLP_USER, (LONG_PTR)ih); + iupAttribSetStr(ih, "WID", (char*)hWndPreview); + iupAttribSetStr(ih, "HWND", (char*)hWndPreview); + winFileDlgUpdatePreviewGLCanvas(ih); + break; + } + case WM_DRAWITEM: + { + if (wParam == IUP_PREVIEWCANVAS) + { + LPDRAWITEMSTRUCT lpDrawItem = (LPDRAWITEMSTRUCT)lParam; + Ihandle* ih = (Ihandle*)GetWindowLongPtr(hWnd, DWLP_USER); + IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + char* filename = iupStrGetMemory(MAX_FILENAME_SIZE); + iupAttribSetStr(ih, "PREVIEWDC", (char*)lpDrawItem->hDC); + if (CommDlg_OpenSave_GetFilePath(GetParent(hWnd), filename, MAX_FILENAME_SIZE) <= MAX_FILENAME_SIZE) + { + if (iupdrvIsFile(filename)) + cb(ih, filename, "PAINT"); + else + cb(ih, NULL, "PAINT"); + } + else + cb(ih, NULL, "PAINT"); + iupAttribSetStr(ih, "PREVIEWDC", NULL); + } + break; + } + case WM_SIZE: + { + HWND hWndPreview = GetDlgItem(hWnd, IUP_PREVIEWCANVAS); + if (hWndPreview) + { + Ihandle* ih = (Ihandle*)GetWindowLongPtr(hWnd, DWLP_USER); + RECT rect; + + winFileDlgSetPreviewCanvasPos(hWnd, hWndPreview); + + GetClientRect(hWndPreview, &rect); + iupAttribSetInt(ih, "PREVIEWWIDTH", rect.right-rect.left); + + RedrawWindow(hWndPreview, NULL, NULL, RDW_INVALIDATE|RDW_UPDATENOW); + } + break; + } + case WM_DESTROY: + { + Ihandle* ih = (Ihandle*)GetWindowLongPtr(hWnd, DWLP_USER); + IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + cb(ih, NULL, "FINISH"); + break; + } + case WM_NOTIFY: + { + LPOFNOTIFY pofn = (LPOFNOTIFY)lParam; + Ihandle* ih = (Ihandle*)pofn->lpOFN->lCustData; + IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB"); + switch (pofn->hdr.code) + { + case CDN_INITDONE: + { + HWND hWndPreview = GetDlgItem(hWnd, IUP_PREVIEWCANVAS); + cb(ih, NULL, "INIT"); + if (hWndPreview) RedrawWindow(hWndPreview, NULL, NULL, RDW_INVALIDATE|RDW_UPDATENOW); + break; + } + case CDN_FILEOK: + case CDN_SELCHANGE: + { + HWND hWndPreview = GetDlgItem(hWnd, IUP_PREVIEWCANVAS); + char* filename = iupStrGetMemory(MAX_FILENAME_SIZE); + if (CommDlg_OpenSave_GetFilePath(GetParent(hWnd), filename, MAX_FILENAME_SIZE) <= MAX_FILENAME_SIZE) + { + int ret; + char* file_msg; + + if (!iupdrvIsFile(filename)) + break; + + if (pofn->hdr.code == CDN_FILEOK) + file_msg = "OK"; + else + file_msg = "SELECT"; + + ret = cb(ih, filename, file_msg); + if (pofn->hdr.code == CDN_FILEOK && ret == IUP_IGNORE) + { + SetWindowLongPtr(hWnd, DWLP_MSGRESULT, 1L); + return 1; /* will refuse the file */ + } + } + if (pofn->hdr.code == CDN_SELCHANGE && hWndPreview) + RedrawWindow(hWndPreview, NULL, NULL, RDW_INVALIDATE|RDW_UPDATENOW); + break; + } + case CDN_HELP: + { + Icallback cb = (Icallback) IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + EndDialog(GetParent(hWnd), IDCANCEL); + break; + } + } + break; + } + } + return 0; +} + +static char* winFileDlgStrReplaceSeparator(const char* name) +{ + int i=0; + char* buffer = (char*)malloc(strlen(name)+2); + + /* replace symbols "|" by terminator "\0" */ + + while (*name) + { + buffer[i] = *name; + + if (buffer[i] == '|') + buffer[i] = 0; + + i++; + name++; + } + + buffer[i] = 0; + buffer[i+1] = 0; /* additional 0 at the end */ + return buffer; +} + +static int winFileDlgPopup(Ihandle *ih, int x, int y) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + OPENFILENAME openfilename; + int result, dialogtype; + char *value; + + iupAttribSetInt(ih, "_IUPDLG_X", x); /* used in iupDialogUpdatePosition */ + iupAttribSetInt(ih, "_IUPDLG_Y", y); + + value = iupAttribGetStr(ih, "DIALOGTYPE"); + if (iupStrEqualNoCase(value, "SAVE")) + dialogtype = IUP_DIALOGSAVE; + else if (iupStrEqualNoCase(value, "DIR")) + dialogtype = IUP_DIALOGDIR; + else + dialogtype = IUP_DIALOGOPEN; + + if (dialogtype == IUP_DIALOGDIR) + { + winFileDlgGetFolder(ih); + return IUP_NOERROR; + } + + if (!parent) + parent = GetActiveWindow(); + + ZeroMemory(&openfilename, sizeof(OPENFILENAME)); + openfilename.lStructSize = sizeof(OPENFILENAME); + openfilename.hwndOwner = parent; + + value = iupAttribGet(ih, "EXTFILTER"); + if (value) + { + int index; + openfilename.lpstrFilter = winFileDlgStrReplaceSeparator(value); + + value = iupAttribGet(ih, "FILTERUSED"); + if (iupStrToInt(value, &index)) + openfilename.nFilterIndex = index; + else + openfilename.nFilterIndex = 1; + } + else + { + value = iupAttribGet(ih, "FILTER"); + if (value) + { + int sz1, sz2; + char* info = iupAttribGet(ih, "FILTERINFO"); + if (!info) + info = value; + + /* concat FILTERINFO+FILTER */ + sz1 = strlen(info)+1; + sz2 = strlen(value)+1; + openfilename.lpstrFilter = (char*)malloc(sz1+sz2+1); + + memcpy((char*)openfilename.lpstrFilter, info, sz1); + memcpy((char*)openfilename.lpstrFilter+sz1, value, sz2); + ((char*)openfilename.lpstrFilter)[sz1+sz2] = 0; /* additional 0 at the end */ + openfilename.nFilterIndex = 1; + } + } + + openfilename.lpstrFile = (char*)malloc(MAX_FILENAME_SIZE+1); + value = iupAttribGet(ih, "FILE"); + if (value) + { + strncpy(openfilename.lpstrFile, value, MAX_FILENAME_SIZE); + winFileDlgStrReplacePathSlash(openfilename.lpstrFile); + } + else + openfilename.lpstrFile[0] = 0; + + openfilename.nMaxFile = MAX_FILENAME_SIZE; + + openfilename.lpstrInitialDir = iupStrDup(iupAttribGet(ih, "DIRECTORY")); + if (openfilename.lpstrInitialDir) + winFileDlgStrReplacePathSlash((char*)openfilename.lpstrInitialDir); + + openfilename.lpstrTitle = iupAttribGet(ih, "TITLE"); + openfilename.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY; + + if (!iupAttribGetBoolean(ih, "NOOVERWRITEPROMPT")) + openfilename.Flags |= OFN_OVERWRITEPROMPT; + + if (iupAttribGetBoolean(ih, "SHOWHIDDEN")) + openfilename.Flags |= OFN_FORCESHOWHIDDEN; + + value = iupAttribGet(ih, "ALLOWNEW"); + if (!value) + { + if (dialogtype == IUP_DIALOGSAVE) + value = "YES"; + else + value = "NO"; + } + if (iupStrBoolean(value)) + openfilename.Flags |= OFN_CREATEPROMPT; + else + openfilename.Flags |= OFN_FILEMUSTEXIST; + + if (iupAttribGetBoolean(ih, "NOCHANGEDIR")) + openfilename.Flags |= OFN_NOCHANGEDIR; + + if (iupAttribGetBoolean(ih, "MULTIPLEFILES")) + openfilename.Flags |= OFN_ALLOWMULTISELECT; + + openfilename.lpfnHook = winFileDlgSimpleHook; + openfilename.Flags |= OFN_ENABLEHOOK | OFN_EXPLORER | OFN_ENABLESIZING; + openfilename.lCustData = (LPARAM)ih; + + if (iupAttribGetBoolean(ih, "SHOWPREVIEW") && IupGetCallback(ih, "FILE_CB")) + { + openfilename.Flags |= OFN_ENABLETEMPLATE; + openfilename.hInstance = iupwin_dll_hinstance? iupwin_dll_hinstance: iupwin_hinstance; + openfilename.lpTemplateName = "iupPreviewDlg"; + openfilename.lpfnHook = winFileDlgPreviewHook; + } + + if (IupGetCallback(ih, "HELP_CB")) + openfilename.Flags |= OFN_SHOWHELP; + + if (dialogtype == IUP_DIALOGOPEN) + result = GetOpenFileName(&openfilename); + else + result = GetSaveFileName(&openfilename); + + if (result) + { + if (iupAttribGetBoolean(ih, "MULTIPLEFILES")) + { + int i = 0; + + /* If there is more than one file, replace terminator by the separator */ + if (openfilename.lpstrFile && openfilename.lpstrFile[openfilename.nFileOffset-1] == 0 && openfilename.nFileOffset>0) + { + while (openfilename.lpstrFile[i] != 0 || openfilename.lpstrFile[i+1] != 0) + { + if (openfilename.lpstrFile[i]==0) + openfilename.lpstrFile[i] = '|'; + i++; + } + openfilename.lpstrFile[i] = '|'; + } + + iupAttribSetStr(ih, "STATUS", "0"); + iupAttribSetStr(ih, "FILEEXIST", NULL); + } + else + { + if (iupdrvIsFile(openfilename.lpstrFile)) /* check if file exists */ + { + iupAttribSetStr(ih, "FILEEXIST", "YES"); + iupAttribSetStr(ih, "STATUS", "0"); + } + else + { + iupAttribSetStr(ih, "FILEEXIST", "NO"); + iupAttribSetStr(ih, "STATUS", "1"); + } + } + + iupAttribStoreStr(ih, "VALUE", openfilename.lpstrFile); + iupAttribSetInt(ih, "FILTERUSED", (int)openfilename.nFilterIndex); + } + else + { + iupAttribSetStr(ih, "FILTERUSED", NULL); + iupAttribSetStr(ih, "VALUE", NULL); + iupAttribSetStr(ih, "FILEEXIST", NULL); + iupAttribSetStr(ih, "STATUS", "-1"); + } + + if (openfilename.lpstrFilter) free((char*)openfilename.lpstrFilter); + if (openfilename.lpstrInitialDir) free((char*)openfilename.lpstrInitialDir); + if (openfilename.lpstrFile) free(openfilename.lpstrFile); + + return IUP_NOERROR; +} + +void iupdrvFileDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = winFileDlgPopup; + + /* IupFileDialog Windows and GTK Only */ + iupClassRegisterAttribute(ic, "EXTFILTER", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FILTERINFO", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FILTERUSED", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MULTIPLEFILES", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/win/iupwin_focus.c b/iup/src/win/iupwin_focus.c new file mode 100755 index 0000000..63da02d --- /dev/null +++ b/iup/src/win/iupwin_focus.c @@ -0,0 +1,62 @@ +/** \file + * \brief Windows Focus + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include + +#include "iup.h" +#include "iup_object.h" +#include "iup_focus.h" +#include "iup_assert.h" +#include "iup_drv.h" +#include "iup_attrib.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" + +/* not defined for gcc */ +#ifndef WM_CHANGEUISTATE +#define WM_CHANGEUISTATE 0x0127 +#endif +#ifndef UIS_CLEAR +#define UIS_CLEAR 2 +#endif +#ifndef UISF_HIDEFOCUS +#define UISF_HIDEFOCUS 0x1 +#endif + +/* Since Windows XP, the focus feedback only appears after the user press a key. + Except for the IupText where the feedback is the caret. + Before that if you click in a control the focus feedback will be hidden. + + We manually send WM_CHANGEUISTATE because we do not use IsDialogMessage anymore, + and the focus feedback was not shown even after the used press a key. + + TODO: I would like a form to always show the feedback, but could not understand how WM_CHANGEUISTATE works. + Neither SystemParametersInfo(SPI_SETKEYBOARDCUES, TRUE) or SystemParametersInfo(SPI_SETKEYBOARDPREF, TRUE) worked. +*/ +void iupdrvSetFocus(Ihandle *ih) +{ + SetFocus(ih->handle); + SendMessage(ih->handle, WM_CHANGEUISTATE, UIS_CLEAR|UISF_HIDEFOCUS, 0); +} + +void iupwinWmSetFocus(Ihandle *ih) +{ + Ihandle* dialog = IupGetDialog(ih); + if (ih != dialog) + iupAttribSetStr(dialog, "_IUPWIN_LASTFOCUS", (char*)ih); /* used by IupMenu */ + else + { + /* if a control inside that dialog had the focus, then reset to it when the dialog gets the focus */ + Ihandle* lastfocus = (Ihandle*)iupAttribGet(dialog, "_IUPWIN_LASTFOCUS"); + if (lastfocus) IupSetFocus(lastfocus); + } + + iupCallGetFocusCb(ih); +} diff --git a/iup/src/win/iupwin_font.c b/iup/src/win/iupwin_font.c new file mode 100755 index 0000000..659e2d9 --- /dev/null +++ b/iup/src/win/iupwin_font.c @@ -0,0 +1,342 @@ +/** \file + * \brief Windows Font mapping + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include + +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_array.h" +#include "iup_attrib.h" +#include "iup_object.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_assert.h" + +#include "iupwin_drv.h" +#include "iupwin_info.h" + + +typedef struct IwinFont_ +{ + char standardfont[200]; + HFONT hFont; + int charwidth, charheight; +} IwinFont; + +static Iarray* win_fonts = NULL; + +static IwinFont* winFindFont(const char *standardfont) +{ + HFONT hFont; + int height_pixels; + char typeface[50] = ""; + int height = 8; + int is_bold = 0, + is_italic = 0, + is_underline = 0, + is_strikeout = 0; + int res = iupwinGetScreenRes(); + int i, count = iupArrayCount(win_fonts); + const char* mapped_name; + + /* Check if the standardfont already exists in cache */ + IwinFont* fonts = (IwinFont*)iupArrayGetData(win_fonts); + for (i = 0; i < count; i++) + { + if (iupStrEqualNoCase(standardfont, fonts[i].standardfont)) + return &fonts[i]; + } + + /* parse the old format first */ + if (!iupFontParseWin(standardfont, typeface, &height, &is_bold, &is_italic, &is_underline, &is_strikeout)) + { + if (!iupFontParsePango(standardfont, typeface, &height, &is_bold, &is_italic, &is_underline, &is_strikeout)) + return NULL; + } + + mapped_name = iupFontGetWinName(typeface); + if (mapped_name) + strcpy(typeface, mapped_name); + + /* get in pixels */ + if (height < 0) + height_pixels = height; /* already in pixels */ + else + height_pixels = -IUPWIN_PT2PIXEL(height, res); + + if (height_pixels == 0) + return NULL; + + hFont = CreateFont(height_pixels, + 0,0,0, + (is_bold) ? FW_BOLD : FW_NORMAL, + is_italic, + is_underline, + is_strikeout, + DEFAULT_CHARSET,OUT_TT_PRECIS, + CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY, + FF_DONTCARE|DEFAULT_PITCH, + typeface); + if (!hFont) + return NULL; + + /* create room in the array */ + fonts = (IwinFont*)iupArrayInc(win_fonts); + + strcpy(fonts[i].standardfont, standardfont); + fonts[i].hFont = hFont; + + { + TEXTMETRIC tm; + HDC hdc = GetDC(NULL); + HFONT oldfont = SelectObject(hdc, hFont); + + GetTextMetrics(hdc, &tm); + + SelectObject(hdc, oldfont); + ReleaseDC(NULL, hdc); + + fonts[i].charwidth = tm.tmAveCharWidth; + fonts[i].charheight = tm.tmHeight; + } + + return &fonts[i]; +} + +static void winFontFromLogFont(LOGFONT* logfont, char * font) +{ + int is_bold = (logfont->lfWeight == FW_NORMAL)? 0: 1; + int is_italic = logfont->lfItalic; + int is_underline = logfont->lfUnderline; + int is_strikeout = logfont->lfStrikeOut; + int height_pixels = logfont->lfHeight; /* negative value */ + int res = iupwinGetScreenRes(); + int height = IUPWIN_PIXEL2PT(-height_pixels, res); /* return in points */ + + sprintf(font, "%s, %s%s%s%s %d", logfont->lfFaceName, + is_bold?"Bold ":"", + is_italic?"Italic ":"", + is_underline?"Underline ":"", + is_strikeout?"Strikeout ":"", + height); +} + +char* iupdrvGetSystemFont(void) +{ + static char systemfont[200] = ""; + NONCLIENTMETRICS ncm; + ncm.cbSize = sizeof(NONCLIENTMETRICS); + if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, FALSE)) + winFontFromLogFont(&ncm.lfMessageFont, systemfont); + else + strcpy(systemfont, "Tahoma, 10"); + return systemfont; +} + +char* iupwinFindHFont(HFONT hFont) +{ + int i, count = iupArrayCount(win_fonts); + + /* Check if the standardfont already exists in cache */ + IwinFont* fonts = (IwinFont*)iupArrayGetData(win_fonts); + for (i = 0; i < count; i++) + { + if (hFont == fonts[i].hFont) + return fonts[i].standardfont; + } + + return NULL; +} + +HFONT iupwinGetHFont(const char* value) +{ + IwinFont* winfont = winFindFont(value); + if (!winfont) + return NULL; + else + return winfont->hFont; +} + +static IwinFont* winFontCreateNativeFont(Ihandle *ih, const char* value) +{ + IwinFont* winfont = winFindFont(value); + if (!winfont) + { + iupERROR1("Failed to create Font: %s", value); + return NULL; + } + + iupAttribSetStr(ih, "_IUP_WINFONT", (char*)winfont); + return winfont; +} + +static IwinFont* winFontGet(Ihandle *ih) +{ + IwinFont* winfont = (IwinFont*)iupAttribGet(ih, "_IUP_WINFONT"); + if (!winfont) + winfont = winFontCreateNativeFont(ih, iupGetFontAttrib(ih)); + return winfont; +} + +char* iupwinGetHFontAttrib(Ihandle *ih) +{ + IwinFont* winfont = winFontGet(ih); + if (!winfont) + return NULL; + else + return (char*)winfont->hFont; +} + +int iupdrvSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + IwinFont* winfont = winFontCreateNativeFont(ih, value); + if (!winfont) + return 1; + + /* If FONT is changed, must update the SIZE attribute */ + iupBaseUpdateSizeFromFont(ih); + + /* FONT attribute must be able to be set before mapping, + so the font is enable for size calculation. */ + if (ih->handle && (ih->iclass->nativetype != IUP_TYPEVOID)) + SendMessage(ih->handle, WM_SETFONT, (WPARAM)winfont->hFont, MAKELPARAM(TRUE,0)); + + return 1; +} + +static HDC winFontGetDC(Ihandle* ih) +{ + if (ih->iclass->nativetype == IUP_TYPEVOID) + return GetDC(NULL); + else + return GetDC(ih->handle); /* handle can be NULL here */ +} + +static void winFontReleaseDC(Ihandle* ih, HDC hdc) +{ + if (ih->iclass->nativetype == IUP_TYPEVOID) + ReleaseDC(NULL, hdc); + else + ReleaseDC(ih->handle, hdc); /* handle can be NULL here */ +} + +void iupdrvFontGetMultiLineStringSize(Ihandle* ih, const char* str, int *w, int *h) +{ + int num_lin, max_w; + + IwinFont* winfont = winFontGet(ih); + if (!winfont) + { + if (w) *w = 0; + if (h) *h = 0; + return; + } + + if (!str) + { + if (w) *w = 0; + if (h) *h = winfont->charheight * 1; + return; + } + + max_w = 0; + num_lin = 1; + if (str[0]) + { + SIZE size; + int len; + const char *nextstr; + const char *curstr = str; + + HDC hdc = winFontGetDC(ih); + HFONT oldhfont = SelectObject(hdc, winfont->hFont); + + do + { + nextstr = iupStrNextLine(curstr, &len); + GetTextExtentPoint32(hdc, curstr, len, &size); + max_w = iupMAX(max_w, size.cx); + + curstr = nextstr; + if (*nextstr) + num_lin++; + } while(*nextstr); + + SelectObject(hdc, oldhfont); + winFontReleaseDC(ih, hdc); + } + + if (w) *w = max_w; + if (h) *h = winfont->charheight*num_lin; +} + +int iupdrvFontGetStringWidth(Ihandle* ih, const char* str) +{ + HDC hdc; + HFONT oldhfont, hFont; + SIZE size; + int len; + char* line_end; + + if (!str || str[0]==0) + return 0; + + hFont = (HFONT)iupwinGetHFontAttrib(ih); + if (!hFont) + return 0; + + hdc = winFontGetDC(ih); + oldhfont = SelectObject(hdc, hFont); + + line_end = strchr(str, '\n'); + if (line_end) + len = line_end-str; + else + len = strlen(str); + + GetTextExtentPoint32(hdc, str, len, &size); + + SelectObject(hdc, oldhfont); + winFontReleaseDC(ih, hdc); + + return size.cx; +} + +void iupdrvFontGetCharSize(Ihandle* ih, int *charwidth, int *charheight) +{ + IwinFont* winfont = winFontGet(ih); + if (!winfont) + { + if (charwidth) *charwidth = 0; + if (charheight) *charheight = 0; + return; + } + + if (charwidth) *charwidth = winfont->charwidth; + if (charheight) *charheight = winfont->charheight; +} + +void iupdrvFontInit(void) +{ + win_fonts = iupArrayCreate(50, sizeof(IwinFont)); +} + +void iupdrvFontFinish(void) +{ + int i, count = iupArrayCount(win_fonts); + IwinFont* fonts = (IwinFont*)iupArrayGetData(win_fonts); + for (i = 0; i < count; i++) + { + DeleteObject(fonts[i].hFont); + fonts[i].hFont = NULL; + } + iupArrayDestroy(win_fonts); +} diff --git a/iup/src/win/iupwin_fontdlg.c b/iup/src/win/iupwin_fontdlg.c new file mode 100755 index 0000000..0602441 --- /dev/null +++ b/iup/src/win/iupwin_fontdlg.c @@ -0,0 +1,160 @@ +/** \file + * \brief IupFontDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" +#include "iup_drvfont.h" + +#include "iupwin_drv.h" + + +#define IUP_FONTFAMILYCOMBOBOX 0x0470 + +static UINT_PTR winFontDlgHookProc(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam) +{ + (void)wParam; + if (uiMsg == WM_INITDIALOG) + { + HWND hWndItem; + CHOOSEFONT* choosefont = (CHOOSEFONT*)lParam; + Ihandle* ih = (Ihandle*)choosefont->lCustData; + + char* value = iupAttribGet(ih, "TITLE"); + if (value) + SetWindowText(hWnd, value); + + ih->handle = hWnd; + iupDialogUpdatePosition(ih); + ih->handle = NULL; /* reset handle */ + iupAttribSetStr(ih, "HWND", (char*)hWnd); /* used by HELP_CB in winDialogBaseProc */ + + hWndItem = GetDlgItem(hWnd, IUP_FONTFAMILYCOMBOBOX); + SetFocus(hWndItem); + } + return 0; +} + +static int winFontDlgPopup(Ihandle* ih, int x, int y) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + unsigned char r, g, b; + CHOOSEFONT choosefont; + LOGFONT logfont; + char* standardfont; + int height_pixels; + char typeface[50] = ""; + int height = 8; + int is_bold = 0, + is_italic = 0, + is_underline = 0, + is_strikeout = 0; + int res = iupwinGetScreenRes(); + + iupAttribSetInt(ih, "_IUPDLG_X", x); /* used in iupDialogUpdatePosition */ + iupAttribSetInt(ih, "_IUPDLG_Y", y); + + if (!parent) + parent = GetActiveWindow(); + + standardfont = iupAttribGet(ih, "VALUE"); + if (!standardfont) + return IUP_ERROR; + + /* parse the old format first */ + if (!iupFontParseWin(standardfont, typeface, &height, &is_bold, &is_italic, &is_underline, &is_strikeout)) + { + if (!iupFontParsePango(standardfont, typeface, &height, &is_bold, &is_italic, &is_underline, &is_strikeout)) + return IUP_ERROR; + } + + /* get size in pixels */ + if (height < 0) + height_pixels = height; /* already in pixels */ + else + height_pixels = -IUPWIN_PT2PIXEL(height, res); + + if (height_pixels == 0) + return IUP_ERROR; + + ZeroMemory(&choosefont, sizeof(CHOOSEFONT)); + choosefont.lStructSize = sizeof(CHOOSEFONT); + + if (iupStrToRGB(iupAttribGet(ih, "COLOR"), &r, &g, &b)) + choosefont.rgbColors = RGB(r, g, b); + + choosefont.hwndOwner = parent; + choosefont.lpLogFont = &logfont; + choosefont.Flags = CF_SCREENFONTS | CF_EFFECTS | CF_INITTOLOGFONTSTRUCT | CF_ENABLEHOOK; + choosefont.lCustData = (LPARAM)ih; + choosefont.lpfnHook = (LPCFHOOKPROC)winFontDlgHookProc; + + if (IupGetCallback(ih, "HELP_CB")) + choosefont.Flags |= CF_SHOWHELP; + + strcpy(logfont.lfFaceName, typeface); + logfont.lfHeight = height_pixels; + logfont.lfWeight = (is_bold)? FW_BOLD: FW_NORMAL; + logfont.lfItalic = (BYTE)is_italic; + logfont.lfUnderline = (BYTE)is_underline; + logfont.lfStrikeOut = (BYTE)is_strikeout; + + logfont.lfCharSet = DEFAULT_CHARSET; + logfont.lfEscapement = 0; + logfont.lfOrientation = 0; + logfont.lfWidth = 0; + logfont.lfOutPrecision = OUT_TT_PRECIS; + logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS; + logfont.lfQuality = DEFAULT_QUALITY; + logfont.lfPitchAndFamily = FF_DONTCARE|DEFAULT_PITCH; + + if (!ChooseFont(&choosefont)) + { + iupAttribSetStr(ih, "VALUE", NULL); + iupAttribSetStr(ih, "COLOR", NULL); + iupAttribSetStr(ih, "STATUS", NULL); + return IUP_NOERROR; + } + + is_bold = (logfont.lfWeight == FW_NORMAL)? 0: 1; + is_italic = logfont.lfItalic; + is_underline = logfont.lfUnderline; + is_strikeout = logfont.lfStrikeOut; + height_pixels = logfont.lfHeight; + + if (height < 0) /* not an error, use old value as a reference for the units */ + height = height_pixels; /* return in pixels */ + else + height = IUPWIN_PIXEL2PT(-height_pixels, res); /* return in points */ + + iupAttribSetStrf(ih, "VALUE", "%s, %s%s%s%s %d", logfont.lfFaceName, + is_bold?"Bold ":"", + is_italic?"Italic ":"", + is_underline?"Underline ":"", + is_strikeout?"Strikeout ":"", + height); + + iupAttribSetStrf(ih, "COLOR", "%d %d %d", GetRValue(choosefont.rgbColors), + GetGValue(choosefont.rgbColors), + GetBValue(choosefont.rgbColors)); + iupAttribSetStr(ih, "STATUS", "1"); + + return IUP_NOERROR; +} + +void iupdrvFontDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = winFontDlgPopup; + + /* IupFontDialog Windows Only */ + iupClassRegisterAttribute(ic, "COLOR", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/win/iupwin_frame.c b/iup/src/win/iupwin_frame.c new file mode 100755 index 0000000..0949b5d --- /dev/null +++ b/iup/src/win/iupwin_frame.c @@ -0,0 +1,203 @@ +/** \file + * \brief Frame Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_frame.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_draw.h" +#include "iupwin_info.h" + + +void iupdrvFrameGetDecorOffset(Ihandle* ih, int *x, int *y) +{ + if (iupwin_comctl32ver6) + { + *x = 3; + *y = 3; + } + else + { + *x = 2; + *y = 2; + } + + if (iupAttribGet(ih, "_IUPFRAME_HAS_TITLE") || iupAttribGet(ih, "TITLE")) + { + (*y) += iupFrameGetTitleHeight(ih); + } +} + +static void winFrameDrawText(HDC hDC, const char* text, int x, int y, COLORREF fgcolor) +{ + COLORREF oldcolor; + + SetTextAlign(hDC, TA_TOP|TA_LEFT); + SetBkMode(hDC, TRANSPARENT); + oldcolor = SetTextColor(hDC, fgcolor); + + TextOut(hDC, x, y, text, strlen(text)); + + SetTextColor(hDC, oldcolor); + SetBkMode(hDC, OPAQUE); +} + +static void winFrameDrawItem(Ihandle* ih, DRAWITEMSTRUCT *drawitem) +{ + iupwinBitmapDC bmpDC; + HDC hDC = iupwinDrawCreateBitmapDC(&bmpDC, drawitem->hDC, drawitem->rcItem.right-drawitem->rcItem.left, + drawitem->rcItem.bottom-drawitem->rcItem.top); + + iupwinDrawParentBackground(ih, hDC, &drawitem->rcItem); + + if (iupAttribGet(ih, "_IUPFRAME_HAS_TITLE")) + { + int x, y; + HFONT hOldFont, hFont = (HFONT)iupwinGetHFontAttrib(ih); + int txt_height = iupFrameGetTitleHeight(ih); + COLORREF fgcolor; + SIZE size; + + char* title = iupdrvBaseGetTitleAttrib(ih); + if (!title) title = ""; + + x = drawitem->rcItem.left+7; + y = drawitem->rcItem.top; + + hOldFont = SelectObject(hDC, hFont); + GetTextExtentPoint32(hDC, title, strlen(title), &size); + ExcludeClipRect(hDC, x-2, y, x+size.cx+2, y+size.cy); + + drawitem->rcItem.top += txt_height/2; + if (iupwin_comctl32ver6) + iupwinDrawThemeFrameBorder(ih->handle, hDC, &drawitem->rcItem, drawitem->itemState); + else + DrawEdge(hDC, &drawitem->rcItem, EDGE_ETCHED, BF_RECT); + + SelectClipRgn(hDC, NULL); + + if (drawitem->itemState & ODS_DISABLED) + fgcolor = GetSysColor(COLOR_GRAYTEXT); + else + { + unsigned char r, g, b; + char* color = iupAttribGetInherit(ih, "FGCOLOR"); + if (!color) + { + if (!iupwinDrawGetThemeFrameFgColor(ih->handle, &fgcolor)) + fgcolor = 0; /* black */ + } + else + { + if (iupStrToRGB(color, &r, &g, &b)) + fgcolor = RGB(r,g,b); + else + fgcolor = 0; /* black */ + } + } + + winFrameDrawText(hDC, title, x, y, fgcolor); + + SelectObject(hDC, hOldFont); + } + else + { + char* value = iupAttribGetStr(ih, "SUNKEN"); + if (iupStrBoolean(value)) + DrawEdge(hDC, &drawitem->rcItem, EDGE_SUNKEN, BF_RECT); + else + DrawEdge(hDC, &drawitem->rcItem, EDGE_ETCHED, BF_RECT); + } + + iupwinDrawDestroyBitmapDC(&bmpDC); +} + +static int winFrameProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + switch (msg) + { + case WM_GETDLGCODE: + { + *result = DLGC_STATIC; /* same return as GROUPBOX */ + return 1; + } + case WM_NCHITTEST: + { + *result = HTTRANSPARENT; /* same return as GROUPBOX */ + return 1; + } + case WM_ERASEBKGND: + { + /* just to ignore the internal processing */ + *result = 1; + return 1; + } + } + + return iupwinBaseContainerProc(ih, msg, wp, lp, result); +} + +static int winFrameMapMethod(Ihandle* ih) +{ + char *title; + DWORD dwStyle = WS_CHILD|WS_CLIPSIBLINGS| + BS_OWNERDRAW, /* owner draw necessary because BS_GROUPBOX does not work ok */ + dwExStyle = 0; + + if (!ih->parent) + return IUP_ERROR; + + title = iupAttribGet(ih, "TITLE"); + if (title) + iupAttribSetStr(ih, "_IUPFRAME_HAS_TITLE", "1"); + + if (iupAttribGetBoolean(IupGetDialog(ih), "COMPOSITED")) + dwExStyle |= WS_EX_COMPOSITED; + else + dwStyle |= WS_CLIPCHILDREN; + + if (!iupwinCreateWindowEx(ih, "BUTTON", dwExStyle, dwStyle)) + return IUP_ERROR; + + /* replace the WinProc to handle other messages */ + IupSetCallback(ih, "_IUPWIN_CTRLPROC_CB", (Icallback)winFrameProc); + + /* Process WM_DRAWITEM */ + IupSetCallback(ih, "_IUPWIN_DRAWITEM_CB", (Icallback)winFrameDrawItem); + + return IUP_NOERROR; +} + +void iupdrvFrameInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winFrameMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", iupBaseNativeParentGetBgColorAttrib, NULL, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "TITLE", iupdrvBaseGetTitleAttrib, iupdrvBaseSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); +} diff --git a/iup/src/win/iupwin_globalattrib.c b/iup/src/win/iupwin_globalattrib.c new file mode 100755 index 0000000..a176925 --- /dev/null +++ b/iup/src/win/iupwin_globalattrib.c @@ -0,0 +1,243 @@ +/** \file + * \brief Windows Driver iupdrvSetGlobal + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvinfo.h" +#include "iup_strmessage.h" + +#include "iupwin_drv.h" + +static int win_monitor_index = 0; + +/* Not defined in compilers older than VC9 */ +#ifndef MAPVK_VK_TO_VSC +#define MAPVK_VK_TO_VSC (0) +#endif + +static void winGlobalSendKey(int key, int press) +{ + unsigned int keyval, state; + INPUT input[2]; + LPARAM extra_info; + WORD state_scan = 0, key_scan; + ZeroMemory(input, 2*sizeof(INPUT)); + + iupwinKeyEncode(key, &keyval, &state); + if (!keyval) + return; + + extra_info = GetMessageExtraInfo(); + if (state) + state_scan = (WORD)MapVirtualKey(state, MAPVK_VK_TO_VSC); + key_scan = (WORD)MapVirtualKey(keyval, MAPVK_VK_TO_VSC); + + if (press & 0x01) + { + if (state) + { + /* modifier first */ + input[0].type = INPUT_KEYBOARD; + input[0].ki.wVk = (WORD)state; + input[0].ki.wScan = state_scan; + input[0].ki.dwExtraInfo = extra_info; + + /* key second */ + input[1].type = INPUT_KEYBOARD; + input[1].ki.wVk = (WORD)keyval; + input[1].ki.wScan = key_scan; + input[1].ki.dwExtraInfo = extra_info; + + SendInput(2, input, sizeof(INPUT)); + } + else + { + input[0].type = INPUT_KEYBOARD; + input[0].ki.wVk = (WORD)keyval; + input[0].ki.wScan = key_scan; + input[0].ki.dwExtraInfo = extra_info; + + SendInput(1, input, sizeof(INPUT)); + } + } + + if (press & 0x02) + { + if (state) + { + /* key first */ + input[0].type = INPUT_KEYBOARD; + input[0].ki.dwFlags = KEYEVENTF_KEYUP; + input[0].ki.wVk = (WORD)keyval; + input[0].ki.wScan = key_scan; + input[0].ki.dwExtraInfo = extra_info; + + /* modifier second */ + input[1].type = INPUT_KEYBOARD; + input[1].ki.dwFlags = KEYEVENTF_KEYUP; + input[1].ki.wVk = (WORD)state; + input[1].ki.wScan = state_scan; + input[1].ki.dwExtraInfo = extra_info; + + SendInput(2, input, sizeof(INPUT)); + } + else + { + input[0].type = INPUT_KEYBOARD; + input[0].ki.dwFlags = KEYEVENTF_KEYUP; + input[0].ki.wVk = (WORD)keyval; + input[0].ki.wScan = key_scan; + input[0].ki.dwExtraInfo = extra_info; + + SendInput(1, input, sizeof(INPUT)); + } + } +} + +static BOOL CALLBACK winMonitorInfoEnum(HMONITOR handle, HDC handle_dc, LPRECT rect, LPARAM data) +{ + RECT* monitors_rect = (RECT*)data; + monitors_rect[win_monitor_index] = *rect; + win_monitor_index++; + (void)handle_dc; + (void)handle; + return TRUE; +} + +int iupdrvSetGlobal(const char *name, const char *value) +{ + if (iupStrEqual(name, "LANGUAGE")) + { + iupStrMessageUpdateLanguage(value); + return 1; + } + if (iupStrEqual(name, "CURSORPOS")) + { + int x, y; + if (iupStrToIntInt(value, &x, &y, 'x') == 2) + SetCursorPos(x, y); + return 0; + } + if (iupStrEqual(name, "KEYPRESS")) + { + int key; + if (iupStrToInt(value, &key)) + winGlobalSendKey(key, 0x01); + return 0; + } + if (iupStrEqual(name, "KEYRELEASE")) + { + int key; + if (iupStrToInt(value, &key)) + winGlobalSendKey(key, 0x02); + return 0; + } + if (iupStrEqual(name, "KEY")) + { + int key; + if (iupStrToInt(value, &key)) + winGlobalSendKey(key, 0x03); + return 0; + } + return 1; +} + +char *iupdrvGetGlobal(const char *name) +{ + if (iupStrEqual(name, "CURSORPOS")) + { + int x, y; + char* str = iupStrGetMemory(50); + iupdrvGetCursorPos(&x, &y); + sprintf(str, "%dx%d", x, y); + return str; + } + if (iupStrEqual(name, "SHIFTKEY")) + { + char key[5]; + iupdrvGetKeyState(key); + if (key[0] == 'S') + return "ON"; + return "OFF"; + } + if (iupStrEqual(name, "CONTROLKEY")) + { + char key[5]; + iupdrvGetKeyState(key); + if (key[1] == 'C') + return "ON"; + return "OFF"; + } + if (iupStrEqual(name, "MODKEYSTATE")) + { + char *str = iupStrGetMemory(5); + iupdrvGetKeyState(str); + return str; + } + if (iupStrEqual(name, "SCREENSIZE")) + { + char *str = iupStrGetMemory(50); + int w, h; + iupdrvGetScreenSize(&w, &h); + sprintf(str, "%dx%d", w, h); + return str; + } + if (iupStrEqual(name, "FULLSIZE")) + { + char *str = iupStrGetMemory(50); + int w, h; + iupdrvGetFullSize(&w, &h); + sprintf(str, "%dx%d", w, h); + return str; + } + if (iupStrEqual(name, "SCREENDEPTH")) + { + char *str = iupStrGetMemory(50); + int bpp = iupdrvGetScreenDepth(); + sprintf(str, "%d", bpp); + return str; + } + if (iupStrEqual(name, "VIRTUALSCREEN")) + { + char *str = iupStrGetMemory(50); + int x = GetSystemMetrics(SM_XVIRTUALSCREEN); + int y = GetSystemMetrics(SM_YVIRTUALSCREEN); + int w = GetSystemMetrics(SM_CXVIRTUALSCREEN); + int h = GetSystemMetrics(SM_CYVIRTUALSCREEN); + sprintf(str, "%d %d %d %d", x, y, w, h); + return str; + } + if (iupStrEqual(name, "MONITORSINFO")) + { + int i; + int monitors_count = GetSystemMetrics(SM_CMONITORS); + RECT* monitors_rect = malloc(monitors_count*sizeof(RECT)); + char *str = iupStrGetMemory(monitors_count*50); + char* pstr = str; + + win_monitor_index = 0; + EnumDisplayMonitors(NULL, NULL, winMonitorInfoEnum, (LPARAM)monitors_rect); + + for (i=0; i < monitors_count; i++) + pstr += sprintf(pstr, "%d %d %d %d\n", (int)monitors_rect[i].left, (int)monitors_rect[i].top, (int)(monitors_rect[i].right-monitors_rect[i].left), (int)(monitors_rect[i].bottom-monitors_rect[i].top)); + + free(monitors_rect); + return str; + } + if (iupStrEqual(name, "TRUECOLORCANVAS")) + { + if (iupdrvGetScreenDepth() > 8) + return "YES"; + return "NO"; + } + return NULL; +} diff --git a/iup/src/win/iupwin_handle.c b/iup/src/win/iupwin_handle.c new file mode 100755 index 0000000..d5a7f77 --- /dev/null +++ b/iup/src/win/iupwin_handle.c @@ -0,0 +1,56 @@ +/** \file + * \brief HWND to ihandle table + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_table.h" + +#include "iupwin_handle.h" + + +static Itable* winhandle_table; /* table indexed by HWND containing Ihandle* address */ + +Ihandle* iupwinHandleGet(void* handle) +{ + Ihandle* ih; + if (!handle) + return NULL; + ih = (Ihandle*)iupTableGet(winhandle_table, (char*)handle); + if (ih && !iupObjectCheck(ih)) + return NULL; + return ih; +} + +void iupwinHandleSet(Ihandle *ih) +{ + iupTableSet(winhandle_table, (char*)ih->handle, ih, IUPTABLE_POINTER); +} + +void iupwinHandleAdd(Ihandle *ih, InativeHandle* hWnd) +{ + iupTableSet(winhandle_table, (char*)hWnd, ih, IUPTABLE_POINTER); +} + +void iupwinHandleRemove(Ihandle *ih) +{ + iupTableRemove(winhandle_table, (char*)ih->handle); +} + +void iupwinHandleInit(void) +{ + winhandle_table = iupTableCreate(IUPTABLE_POINTERINDEXED); +} + +void iupwinHandleFinish(void) +{ + iupTableDestroy(winhandle_table); + winhandle_table = NULL; +} diff --git a/iup/src/win/iupwin_handle.h b/iup/src/win/iupwin_handle.h new file mode 100755 index 0000000..4a8643d --- /dev/null +++ b/iup/src/win/iupwin_handle.h @@ -0,0 +1,28 @@ +/** \file + * \brief HWND to ihandle table + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPWIN_HANDLE_H +#define __IUPWIN_HANDLE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Returns the IUP handle given the Windows handle. */ + +Ihandle* iupwinHandleGet(void* handle); +void iupwinHandleSet(Ihandle *ih); +void iupwinHandleAdd(Ihandle *ih, InativeHandle* hWnd); +void iupwinHandleRemove(Ihandle *ih); +void iupwinHandleInit(void); +void iupwinHandleFinish(void); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/win/iupwin_image.c b/iup/src/win/iupwin_image.c new file mode 100755 index 0000000..2db9800 --- /dev/null +++ b/iup/src/win/iupwin_image.c @@ -0,0 +1,668 @@ +/** \file + * \brief Image Resource. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_image.h" + +#include "iupwin_drv.h" + +/* RGB in RGBA DIBs are pre-multiplied by alpha to AlphaBlend usage. */ +#define iupALPHAPRE(_src, _alpha) (((_src)*(_alpha))/255) + +static int winDibNumColors(BITMAPINFOHEADER* bmih) +{ + if (bmih->biBitCount > 8) + { + if (bmih->biCompression == BI_BITFIELDS) + return 3; + else + return 0; + } + else + { + if (bmih->biClrUsed != 0) + return bmih->biClrUsed; + else + return 1 << bmih->biBitCount; + } +} + +void iupdrvImageGetRawData(void* handle, unsigned char* imgdata) +{ + int x, y, w, h, bpp, bmp_line_size, bits_size; + BYTE* bits; + HANDLE hHandle = (HANDLE)handle; + void* dib = GlobalLock(hHandle); + BITMAPINFOHEADER* bmih = (BITMAPINFOHEADER*)dib; + + w = bmih->biWidth; + h = abs(bmih->biHeight); + bpp = iupImageNormBpp(bmih->biBitCount); + bmp_line_size = ((w * bmih->biBitCount + 31) / 32) * 4; /* DWORD aligned, 4 bytes boundary in a N bpp image */ + bits_size = bmp_line_size*h; + + bits = ((BYTE*)dib) + sizeof(BITMAPINFOHEADER) + winDibNumColors(bmih)*sizeof(RGBQUAD); + + /* windows bitmaps are bottom up */ + /* imgdata is bottom up */ + + if (bmih->biHeight < 0) + bits = bits + (bits_size - bmp_line_size); /* start of last line */ + + if (bpp == 8) + { + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + switch (bmih->biBitCount) + { + case 1: + *imgdata++ = (unsigned char)((bits[x / 8] >> (7 - x % 8)) & 0x01); + break; + case 4: + *imgdata++ = (unsigned char)((bits[x / 2] >> ((1 - x % 2) * 4)) & 0x0F); + break; + case 8: + *imgdata++ = bits[x]; + break; + } + } + + if (bmih->biHeight < 0) + bits -= bmp_line_size; + else + bits += bmp_line_size; + } + } + else + { + int offset, planesize; + unsigned short color; + unsigned int rmask = 0, gmask = 0, bmask = 0, + roff = 0, goff = 0, boff = 0; /* pixel bit mask control when reading 16 and 32 bpp images */ + unsigned char *red, *green, *blue, *alpha; + + planesize = w*h; + red = imgdata; + green = imgdata+planesize; + blue = imgdata+2*planesize; + alpha = imgdata+3*planesize; + + if (bmih->biBitCount == 16) + offset = bmp_line_size; /* do not increment for each pixel, jump line */ + else + offset = bmp_line_size - (w*bmih->biBitCount)/8; /* increment for each pixel, jump pad */ + + if (bmih->biCompression == BI_BITFIELDS) + { + unsigned int Mask; + unsigned int* palette = (unsigned int*)(((BYTE*)bmih) + sizeof(BITMAPINFOHEADER)); + + rmask = Mask = palette[0]; + while (!(Mask & 0x01)) + {Mask >>= 1; roff++;} + + gmask = Mask = palette[1]; + while (!(Mask & 0x01)) + {Mask >>= 1; goff++;} + + bmask = Mask = palette[2]; + while (!(Mask & 0x01)) + {Mask >>= 1; boff++;} + } + else if (bmih->biBitCount == 16) + { + bmask = 0x001F; + gmask = 0x03E0; + rmask = 0x7C00; + boff = 0; + goff = 5; + roff = 10; + } + + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + if (bmih->biBitCount == 16) + { + color = ((unsigned short*)bits)[x]; + *red++ = (unsigned char)((((rmask & color) >> roff) * 255) / (rmask >> roff)); + *green++ = (unsigned char)((((gmask & color) >> goff) * 255) / (gmask >> goff)); + *blue++ = (unsigned char)((((bmask & color) >> boff) * 255) / (bmask >> boff)); + } + else + { + *blue++ = *bits++; + *green++ = *bits++; + *red++ = *bits++; + + if (bmih->biBitCount == 32) + { + if (alpha) + *alpha++ = *bits++; + else + bits++; + } + } + } + + bits += offset; + + if (bmih->biHeight < 0) + bits -= 2*bmp_line_size; + } + } + + GlobalUnlock(hHandle); +} + +void* iupdrvImageCreateImageRaw(int width, int height, int bpp, iupColor* colors, int colors_count, unsigned char *imgdata) +{ + int y,x,bmp_line_size,channels,bits_size,header_size; + HANDLE hHandle; + BYTE* bits; /* DIB bitmap bits, created in CreateDIBSection and filled here */ + void* dib; + BITMAPINFOHEADER* bmih; + + bmp_line_size = ((width * bpp + 31) / 32) * 4; /* DWORD aligned, 4 bytes boundary in a N bpp image */ + bits_size = bmp_line_size*height; + header_size = sizeof(BITMAPINFOHEADER) + colors_count*sizeof(RGBQUAD); + + hHandle = GlobalAlloc(GMEM_MOVEABLE, header_size+bits_size); + if (!hHandle) + return NULL; + + dib = GlobalLock(hHandle); + bits = ((BYTE*)dib) + header_size; + + bmih = (BITMAPINFOHEADER*)dib; + + memset(bmih, 0, sizeof(BITMAPINFOHEADER)); + bmih->biSize = sizeof(BITMAPINFOHEADER); + bmih->biWidth = width; + bmih->biHeight = height; + bmih->biPlanes = 1; /* not the same as PLANES */ + bmih->biBitCount = (WORD)bpp; + bmih->biCompression = BI_RGB; + bmih->biClrUsed = colors_count; + + if (colors_count) + { + RGBQUAD* bitmap_colors = (RGBQUAD*)(((BYTE*)dib) + sizeof(BITMAPINFOHEADER)); + int i; + for (i=0;ibiWidth; + if (h) *h = abs(bmih->biHeight); + if (bpp) *bpp = iupImageNormBpp(bmih->biBitCount); + + if (bmih->biBitCount <= 8) + { + RGBQUAD* bitmap_colors = (RGBQUAD*)(((BYTE*)bmih) + sizeof(BITMAPINFOHEADER)); + int i; + + if (bmih->biClrUsed != 0) + *colors_count = bmih->biClrUsed; + else + *colors_count = 1 << bmih->biBitCount; + + for (i=0;i<*colors_count;i++) + { + colors[i].r = bitmap_colors[i].rgbRed; + colors[i].g = bitmap_colors[i].rgbGreen; + colors[i].b = bitmap_colors[i].rgbBlue; + } + } + + GlobalUnlock(hHandle); + return 1; +} + +static int winImageInitDibColors(iupColor* colors, RGBQUAD* bmpcolors, int colors_count, + unsigned char bg_r, unsigned char bg_g, unsigned char bg_b, int make_inactive) +{ + int i, ret = 0; + for (i=0;ibiSize = sizeof(BITMAPINFOHEADER); + bmih->biWidth = width; + bmih->biHeight = height; + bmih->biPlanes = 1; /* not the same as PLANES */ + bmih->biBitCount = (WORD)bpp; + bmih->biCompression = BI_RGB; + bmih->biClrUsed = colors_count; + + if (colors_count) + { + /* since colors are only passed to the CreateDIBSection here, must update BGCOLOR and inactive here */ + RGBQUAD* bitmap_colors = (RGBQUAD*)(((BYTE*)bmih) + sizeof(BITMAPINFOHEADER)); + if (winImageInitDibColors(colors, bitmap_colors, colors_count, bg_r, bg_g, bg_b, make_inactive)) + iupAttribSetStr(ih, "_IUP_BGCOLOR_DEPEND", "1"); + } + + hDC = GetDC(NULL); + hBitmap = CreateDIBSection(hDC, (BITMAPINFO*)bmih, DIB_RGB_COLORS, (void**)bits, NULL, 0x0); + ReleaseDC(NULL, hDC); + free(bmih); + + return hBitmap; +} + +void* iupdrvImageCreateImage(Ihandle *ih, const char* bgcolor, int make_inactive) +{ + unsigned char bg_r = 0, bg_g = 0, bg_b = 0; + int y,x,bmp_line_size,data_line_size, + width = ih->currentwidth, + height = ih->currentheight, + channels = iupAttribGetInt(ih, "CHANNELS"), + flat_alpha = iupAttribGetBoolean(ih, "FLAT_ALPHA"), + bpp = iupAttribGetInt(ih, "BPP"); + unsigned char *imgdata = (unsigned char*)iupAttribGetStr(ih, "WID"); + HBITMAP hBitmap; + BYTE* bits; /* DIB bitmap bits, created in CreateDIBSection and filled here */ + + iupStrToRGB(bgcolor, &bg_r, &bg_g, &bg_b); + + hBitmap = winImageCreateBitmap(ih, width, height, bpp, &bits, bg_r, bg_g, bg_b, make_inactive); + if (!hBitmap) + return NULL; + + bmp_line_size = ((width * bpp + 31) / 32) * 4; /* DWORD aligned, 4 bytes boundary in a N bpp image */ + data_line_size = width*channels; + + /* windows bitmaps are bottom up */ + imgdata += (height-1)*data_line_size; /* iupimage is top down */ + + for (y=0; ycurrentwidth, + height = ih->currentheight, + channels = iupAttribGetInt(ih, "CHANNELS"), + bpp = iupAttribGetInt(ih, "BPP"); + unsigned char *imgdata = (unsigned char*)iupAttribGetStr(ih, "WID"); + HBITMAP hBitmap; + BYTE* bitmask, *bitmask_ptr; + iupColor colors[256]; + + if (bpp == 8) + iupImageInitColorTable(ih, colors, &colors_count); + + mask_line_size = ((width + 15) / 16) * 2; /* WORD aligned, 2 bytes boundary in a 1 bpp image */ + data_line_size = width*channels; + + bitmask = malloc(height * mask_line_size); + memset(bitmask, 0, height * mask_line_size); /* opaque */ + + /* mask and iupimage are top down */ + + bitmask_ptr = bitmask; + for (y=0; y +#include + +#include +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_drv.h" + +#include "iupwin_info.h" + + +int iupwinIsVista(void) +{ + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&osvi); + + if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && osvi.dwMajorVersion >= 6) + return 1; + + return 0; +} + +int iupwinGetSystemMajorVersion(void) +{ + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&osvi); + return osvi.dwMajorVersion; +} + +char *iupwinGetSystemLanguage(void) +{ + LANGID id = GetSystemDefaultUILanguage(); + char *lang = NULL; + switch(id) + { + case 0x0000: lang = "Language Neutral"; break; + case 0x007f: lang = "Locale Invariant"; break; + case 0x0400: lang = "User Default Language"; break; + case 0x0800: lang = "System Default Language"; break; + case 0x0436: lang = "Afrikaans"; break; + case 0x041c: lang = "Albanian"; break; + case 0x0401: lang = "Arabic (Saudi Arabia)"; break; + case 0x0801: lang = "Arabic (Iraq)"; break; + case 0x0c01: lang = "Arabic (Egypt)"; break; + case 0x1001: lang = "Arabic (Libya)"; break; + case 0x1401: lang = "Arabic (Algeria)"; break; + case 0x1801: lang = "Arabic (Morocco)"; break; + case 0x1c01: lang = "Arabic (Tunisia)"; break; + case 0x2001: lang = "Arabic (Oman)"; break; + case 0x2401: lang = "Arabic (Yemen)"; break; + case 0x2801: lang = "Arabic (Syria)"; break; + case 0x2c01: lang = "Arabic (Jordan)"; break; + case 0x3001: lang = "Arabic (Lebanon)"; break; + case 0x3401: lang = "Arabic (Kuwait)"; break; + case 0x3801: lang = "Arabic (U.A.E.)"; break; + case 0x3c01: lang = "Arabic (Bahrain)"; break; + case 0x4001: lang = "Arabic (Qatar)"; break; + case 0x042b: lang = "Armenian"; break; + case 0x042c: lang = "Azeri (Latin)"; break; + case 0x082c: lang = "Azeri (Cyrillic)"; break; + case 0x042d: lang = "Basque"; break; + case 0x0423: lang = "Belarusian"; break; + case 0x0402: lang = "Bulgarian"; break; + case 0x0455: lang = "Burmese"; break; + case 0x0403: lang = "Catalan"; break; + case 0x0404: lang = "Chinese (Taiwan)"; break; + case 0x0804: lang = "Chinese"; break; + case 0x0c04: lang = "Chinese (Hong Kong)"; break; + case 0x1004: lang = "Chinese (Singapore)"; break; + case 0x1404: lang = "Chinese (Macau)"; break; + case 0x041a: lang = "Croatian"; break; + case 0x0405: lang = "Czech"; break; + case 0x0406: lang = "Danish"; break; + case 0x0465: lang = "Divehi"; break; + case 0x0413: lang = "Dutch (Netherlands)"; break; + case 0x0813: lang = "Dutch (Belgium)"; break; + case 0x0409: lang = "English (United States)"; break; + case 0x0809: lang = "English (United Kingdom)"; break; + case 0x0c09: lang = "English (Australian)"; break; + case 0x1009: lang = "English (Canadian)"; break; + case 0x1409: lang = "English (New Zealand)"; break; + case 0x1809: lang = "English (Ireland)"; break; + case 0x1c09: lang = "English (South Africa)"; break; + case 0x2009: lang = "English (Jamaica)"; break; + case 0x2409: lang = "English (Caribbean)"; break; + case 0x2809: lang = "English (Belize)"; break; + case 0x2c09: lang = "English (Trinidad)"; break; + case 0x3009: lang = "English (Zimbabwe)"; break; + case 0x3409: lang = "English (Philippines)"; break; + case 0x0425: lang = "Estonian"; break; + case 0x0438: lang = "Faeroese"; break; + case 0x0429: lang = "Farsi"; break; + case 0x040b: lang = "Finnish"; break; + case 0x040c: lang = "French (Standard)"; break; + case 0x080c: lang = "French (Belgian)"; break; + case 0x0c0c: lang = "French (Canadian)"; break; + case 0x100c: lang = "French (Switzerland)"; break; + case 0x140c: lang = "French (Luxembourg)"; break; + case 0x180c: lang = "French (Monaco)"; break; + case 0x0456: lang = "Galician"; break; + case 0x0437: lang = "Georgian"; break; + case 0x0407: lang = "German (Standard)"; break; + case 0x0807: lang = "German (Switzerland)"; break; + case 0x0c07: lang = "German (Austria)"; break; + case 0x1007: lang = "German (Luxembourg)"; break; + case 0x1407: lang = "German (Liechtenstein)"; break; + case 0x0408: lang = "Greek"; break; + case 0x0447: lang = "Gujarati"; break; + case 0x040d: lang = "Hebrew"; break; + case 0x0439: lang = "Hindi"; break; + case 0x040e: lang = "Hungarian"; break; + case 0x040f: lang = "Icelandic"; break; + case 0x0421: lang = "Indonesian"; break; + case 0x0410: lang = "Italian (Standard)"; break; + case 0x0810: lang = "Italian (Switzerland)"; break; + case 0x0411: lang = "Japanese"; break; + case 0x044b: lang = "Kannada"; break; + case 0x0457: lang = "Konkani"; break; + case 0x0412: lang = "Korean"; break; + case 0x0812: lang = "Korean (Johab)"; break; + case 0x0440: lang = "Kyrgyz"; break; + case 0x0426: lang = "Latvian"; break; + case 0x0427: lang = "Lithuanian"; break; + case 0x0827: lang = "Lithuanian (Classic)"; break; + case 0x042f: lang = "Macedonian"; break; + case 0x043e: lang = "Malay (Malaysian)"; break; + case 0x083e: lang = "Malay (Brunei Darussalam)"; break; + case 0x044e: lang = "Marathi"; break; + case 0x0450: lang = "Mongolian"; break; + case 0x0414: lang = "Norwegian (Bokmal)"; break; + case 0x0814: lang = "Norwegian (Nynorsk)"; break; + case 0x0415: lang = "Polish"; break; + case 0x0416: lang = "Portuguese (Brazil)"; break; + case 0x0816: lang = "Portuguese (Portugal)"; break; + case 0x0446: lang = "Punjabi"; break; + case 0x0418: lang = "Romanian"; break; + case 0x0419: lang = "Russian"; break; + case 0x044f: lang = "Sanskrit"; break; + case 0x0c1a: lang = "Serbian (Cyrillic)"; break; + case 0x081a: lang = "Serbian (Latin)"; break; + case 0x041b: lang = "Slovak"; break; + case 0x0424: lang = "Slovenian"; break; + case 0x040a: lang = "Spanish (Spain, Traditional Sort)"; break; + case 0x080a: lang = "Spanish (Mexican)"; break; + case 0x0c0a: lang = "Spanish (Spain, International Sort)"; break; + case 0x100a: lang = "Spanish (Guatemala)"; break; + case 0x140a: lang = "Spanish (Costa Rica)"; break; + case 0x180a: lang = "Spanish (Panama)"; break; + case 0x1c0a: lang = "Spanish (Dominican Republic)"; break; + case 0x200a: lang = "Spanish (Venezuela)"; break; + case 0x240a: lang = "Spanish (Colombia)"; break; + case 0x280a: lang = "Spanish (Peru)"; break; + case 0x2c0a: lang = "Spanish (Argentina)"; break; + case 0x300a: lang = "Spanish (Ecuador)"; break; + case 0x340a: lang = "Spanish (Chile)"; break; + case 0x380a: lang = "Spanish (Uruguay)"; break; + case 0x3c0a: lang = "Spanish (Paraguay)"; break; + case 0x400a: lang = "Spanish (Bolivia)"; break; + case 0x440a: lang = "Spanish (El Salvador)"; break; + case 0x480a: lang = "Spanish (Honduras)"; break; + case 0x4c0a: lang = "Spanish (Nicaragua)"; break; + case 0x500a: lang = "Spanish (Puerto Rico)"; break; + case 0x0430: lang = "Sutu"; break; + case 0x0441: lang = "Swahili (Kenya)"; break; + case 0x041d: lang = "Swedish"; break; + case 0x081d: lang = "Swedish (Finland)"; break; + case 0x045a: lang = "Syriac"; break; + case 0x0449: lang = "Tamil"; break; + case 0x0444: lang = "Tatar (Tatarstan)"; break; + case 0x044a: lang = "Telugu"; break; + case 0x041e: lang = "Thai"; break; + case 0x041f: lang = "Turkish"; break; + case 0x0422: lang = "Ukrainian"; break; + case 0x0420: lang = "Urdu (Pakistan)"; break; + case 0x0820: lang = "Urdu (India)"; break; + case 0x0443: lang = "Uzbek (Latin)"; break; + case 0x0843: lang = "Uzbek (Cyrillic)"; break; + case 0x042a: lang = "Vietnamese"; break; + } + return lang; +} + +#define PACKVERSION(major,minor) MAKELONG(minor,major) +typedef struct _DLLVERSIONINFO +{ + DWORD cbSize; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + DWORD dwBuildNumber; + DWORD dwPlatformID; +} DLLVERSIONINFO; +typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *); + +static DWORD winGetDllVersion(LPCTSTR lpszDllName) +{ + HINSTANCE hinstDll; + DWORD dwVersion = 0; + + /* For security purposes, LoadLibrary should be provided with a + fully-qualified path to the DLL. The lpszDllName variable should be + tested to ensure that it is a fully qualified path before it is used. */ + hinstDll = LoadLibrary(lpszDllName); + + if (hinstDll) + { + DLLGETVERSIONPROC pDllGetVersion; + pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hinstDll, "DllGetVersion"); + + /* Because some DLLs might not implement this function, you + must test for it explicitly. Depending on the particular + DLL, the lack of a DllGetVersion function can be a useful + indicator of the version. */ + + if (pDllGetVersion) + { + DLLVERSIONINFO dvi; + HRESULT hr; + + ZeroMemory(&dvi, sizeof(dvi)); + dvi.cbSize = sizeof(dvi); + + hr = pDllGetVersion(&dvi); + if (SUCCEEDED(hr)) + dwVersion = PACKVERSION(dvi.dwMajorVersion, dvi.dwMinorVersion); + } + + FreeLibrary(hinstDll); + } + + return dwVersion; +} + +int iupwinGetComCtl32Version(void) +{ + return winGetDllVersion(TEXT("comctl32.dll")); +} + +void iupwinGetSysColor(char* color, int wincolor) +{ + COLORREF syscolor = GetSysColor(wincolor); + sprintf(color, "%d %d %d", (int)GetRValue(syscolor), (int)GetGValue(syscolor), (int)GetBValue(syscolor)); +} + +char* iupwinGetSystemFgColor(void) +{ + static char def_fgcolor[50]; + iupwinGetSysColor(def_fgcolor, COLOR_WINDOWTEXT); + return def_fgcolor; +} + +int iupwinIsAppThemed(void) +{ + typedef BOOL (STDAPICALLTYPE *winIsAppThemed)(void); + static winIsAppThemed myIsAppThemed = NULL; + if (!myIsAppThemed) + { + HMODULE hinstDll = LoadLibrary("uxtheme.dll"); + if (hinstDll) + myIsAppThemed = (winIsAppThemed)GetProcAddress(hinstDll, "IsAppThemed"); + } + + if (myIsAppThemed) + return myIsAppThemed(); + else + return 0; +} diff --git a/iup/src/win/iupwin_info.h b/iup/src/win/iupwin_info.h new file mode 100755 index 0000000..d39bae0 --- /dev/null +++ b/iup/src/win/iupwin_info.h @@ -0,0 +1,29 @@ +/** \file + * \brief Windows System Information + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPWIN_INFO_H +#define __IUPWIN_INFO_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* system */ +int iupwinGetSystemMajorVersion(void); +int iupwinGetComCtl32Version(void); +char* iupwinGetSystemLanguage(void); +int iupwinIsAppThemed(void); +int iupwinIsVista(void); + +/* color */ +void iupwinGetSysColor(char* color, int wincolor); +char* iupwinGetSystemFgColor(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/src/win/iupwin_key.c b/iup/src/win/iupwin_key.c new file mode 100755 index 0000000..921ed94 --- /dev/null +++ b/iup/src/win/iupwin_key.c @@ -0,0 +1,348 @@ +/** \file + * \brief Windows Driver keyboard mapping + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include + +#include "iup.h" +#include "iupkey.h" + +#include "iup_object.h" +#include "iup_key.h" + +#include "iupwin_drv.h" + + +#ifndef VK_OEM_PLUS +#define VK_OEM_PLUS 0xBB /* '+' any country */ +#define VK_OEM_COMMA 0xBC /* ',' any country */ +#define VK_OEM_MINUS 0xBD /* '-' any country */ +#define VK_OEM_PERIOD 0xBE /* '.' any country */ +#define VK_OEM_102 0xE2 /* "<>" or "\|" on RT 102-key kbd. */ +#endif + +typedef struct _Iwin2iupkey +{ + int wincode; + int iupcode; + int s_iupcode; + int c_iupcode; + int m_iupcode; + int y_iupcode; +} Iwin2iupkey; + +static Iwin2iupkey winkey_map[] = { + +{ VK_ESCAPE, K_ESC, K_sESC, K_cESC, K_mESC, K_yESC }, +{ VK_PAUSE, K_PAUSE, K_sPAUSE, K_cPAUSE, K_mPAUSE, K_yPAUSE }, +{ VK_SNAPSHOT, K_Print, K_sPrint, K_cPrint, K_mPrint, K_yPrint }, +{ VK_APPS, K_Menu, K_sMenu, K_cMenu, K_mMenu, K_yMenu }, + +{ VK_HOME, K_HOME, K_sHOME, K_cHOME, K_mHOME, K_yHOME }, +{ VK_UP, K_UP, K_sUP, K_cUP, K_mUP, K_yUP }, +{ VK_PRIOR, K_PGUP, K_sPGUP, K_cPGUP, K_mPGUP, K_yPGUP }, +{ VK_LEFT, K_LEFT, K_sLEFT, K_cLEFT, K_mLEFT, K_yLEFT }, +{ VK_CLEAR, K_MIDDLE,K_sMIDDLE, K_cMIDDLE,K_mMIDDLE,K_yMIDDLE}, +{ VK_RIGHT, K_RIGHT, K_sRIGHT, K_cRIGHT, K_mRIGHT, K_yRIGHT }, +{ VK_END, K_END, K_sEND, K_cEND, K_mEND, K_yEND }, +{ VK_DOWN, K_DOWN, K_sDOWN, K_cDOWN, K_mDOWN, K_yDOWN }, +{ VK_NEXT, K_PGDN, K_sPGDN, K_cPGDN, K_mPGDN, K_yPGDN }, +{ VK_INSERT, K_INS, K_sINS, K_cINS, K_mINS, K_yINS }, +{ VK_DELETE, K_DEL, K_sDEL, K_cDEL, K_mDEL, K_yDEL }, +{ VK_SPACE, K_SP, K_sSP, K_cSP, K_mSP, K_ySP }, +{ VK_TAB, K_TAB, K_sTAB, K_cTAB, K_mTAB, K_yTAB }, +{ VK_RETURN, K_CR, K_sCR, K_cCR, K_mCR, K_yCR }, +{ VK_BACK, K_BS, K_sBS, K_cBS, K_mBS, K_yBS }, + +/* VK_0 - VK_9 are the same as ASCII '0' - '9' (0x30 - 0x39) */ +{ '1', K_1, K_exclam, K_c1, K_m1, K_y1 }, +{ '2', K_2, K_at, K_c2, K_m2, K_y2 }, +{ '3', K_3, K_numbersign, K_c3, K_m3, K_y3 }, +{ '4', K_4, K_dollar, K_c4, K_m4, K_y4 }, +{ '5', K_5, K_percent, K_c5, K_m5, K_y5 }, +{ '6', K_6, K_circum, K_c6, K_m6, K_y6 }, +{ '7', K_7, K_ampersand, K_c7, K_m7, K_y7 }, +{ '8', K_8, K_asterisk, K_c8, K_m8, K_y8 }, +{ '9', K_9, K_parentleft, K_c9, K_m9, K_y9 }, +{ '0', K_0, K_parentright, K_c0, K_m0, K_y0 }, + +/* VK_A - VK_Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A) */ +{ 'A', K_a, K_A, K_cA, K_mA, K_yA}, +{ 'B', K_b, K_B, K_cB, K_mB, K_yB}, +{ 'C', K_c, K_C, K_cC, K_mC, K_yC}, +{ 'D', K_d, K_D, K_cD, K_mD, K_yD}, +{ 'E', K_e, K_E, K_cE, K_mE, K_yE}, +{ 'F', K_f, K_F, K_cF, K_mF, K_yF}, +{ 'G', K_g, K_G, K_cG, K_mG, K_yG}, +{ 'H', K_h, K_H, K_cH, K_mH, K_yH}, +{ 'I', K_i, K_I, K_cI, K_mI, K_yI}, +{ 'J', K_j, K_J, K_cJ, K_mJ, K_yJ}, +{ 'K', K_k, K_K, K_cK, K_mK, K_yK}, +{ 'L', K_l, K_L, K_cL, K_mL, K_yL}, +{ 'M', K_m, K_M, K_cM, K_mM, K_yM}, +{ 'N', K_n, K_N, K_cN, K_mN, K_yN}, +{ 'O', K_o, K_O, K_cO, K_mO, K_yO}, +{ 'P', K_p, K_P, K_cP, K_mP, K_yP}, +{ 'Q', K_q, K_Q, K_cQ, K_mQ, K_yQ}, +{ 'R', K_r, K_R, K_cR, K_mR, K_yR}, +{ 'S', K_s, K_S, K_cS, K_mS, K_yS}, +{ 'T', K_t, K_T, K_cT, K_mT, K_yT}, +{ 'U', K_u, K_U, K_cU, K_mU, K_yU}, +{ 'V', K_v, K_V, K_cV, K_mV, K_yV}, +{ 'W', K_w, K_W, K_cW, K_mW, K_yW}, +{ 'X', K_x, K_X, K_cX, K_mX, K_yX}, +{ 'Y', K_y, K_Y, K_cY, K_mY, K_yY}, +{ 'Z', K_z, K_Z, K_cZ, K_mZ, K_yZ}, + +{ VK_F1, K_F1, K_sF1, K_cF1, K_mF1, K_yF1 }, +{ VK_F2, K_F2, K_sF2, K_cF2, K_mF2, K_yF2 }, +{ VK_F3, K_F3, K_sF3, K_cF3, K_mF3, K_yF3 }, +{ VK_F4, K_F4, K_sF4, K_cF4, K_mF4, K_yF4 }, +{ VK_F5, K_F5, K_sF5, K_cF5, K_mF5, K_yF5 }, +{ VK_F6, K_F6, K_sF6, K_cF6, K_mF6, K_yF6 }, +{ VK_F7, K_F7, K_sF7, K_cF7, K_mF7, K_yF7 }, +{ VK_F8, K_F8, K_sF8, K_cF8, K_mF8, K_yF8 }, +{ VK_F9, K_F9, K_sF9, K_cF9, K_mF9, K_yF9 }, +{ VK_F10, K_F10, K_sF10, K_cF10, K_mF10, K_yF10 }, +{ VK_F11, K_F11, K_sF11, K_cF11, K_mF11, K_yF11 }, +{ VK_F12, K_F12, K_sF12, K_cF12, K_mF12, K_yF12 }, + +{ VK_OEM_1, K_semicolon, K_colon, K_cSemicolon, K_mSemicolon, K_ySemicolon }, +{ VK_OEM_PLUS, K_equal, K_plus, K_cEqual, K_mEqual, K_yEqual }, +{ VK_OEM_COMMA, K_comma, K_less, K_cComma, K_mComma, K_yComma }, +{ VK_OEM_MINUS, K_minus, K_underscore, K_cMinus, K_mMinus, K_yMinus }, +{ VK_OEM_PERIOD, K_period, K_greater, K_cPeriod, K_mPeriod, K_yPeriod }, +{ VK_OEM_2, K_slash, K_question, K_cSlash, K_mSlash, K_ySlash }, +{ VK_OEM_3, K_grave, K_tilde, 0, 0, 0 }, +{ VK_OEM_4, K_bracketleft, K_braceleft, K_cBracketleft, K_mBracketleft, K_yBracketleft }, +{ VK_OEM_5, K_backslash, K_bar, K_cBackslash, K_mBackslash, K_yBackslash }, +{ VK_OEM_6, K_bracketright, K_braceright, K_cBracketright,K_mBracketright,K_yBracketright }, +{ VK_OEM_7, K_apostrophe, K_quotedbl, 0, 0, 0 }, +{ VK_OEM_102, K_backslash, K_bar, K_cBackslash, K_mBackslash, K_yBackslash }, + +{ VK_NUMPAD0, K_0, K_0, K_c0, K_m0, K_y0 }, +{ VK_NUMPAD1, K_1, K_1, K_c1, K_m1, K_y1 }, +{ VK_NUMPAD2, K_2, K_2, K_c2, K_m2, K_y2 }, +{ VK_NUMPAD3, K_3, K_3, K_c3, K_m3, K_y3 }, +{ VK_NUMPAD4, K_4, K_4, K_c4, K_m4, K_y4 }, +{ VK_NUMPAD5, K_5, K_5, K_c5, K_m5, K_y5 }, +{ VK_NUMPAD6, K_6, K_6, K_c6, K_m6, K_y6 }, +{ VK_NUMPAD7, K_7, K_7, K_c7, K_m7, K_y7 }, +{ VK_NUMPAD8, K_8, K_8, K_c8, K_m8, K_y8 }, +{ VK_NUMPAD9, K_9, K_9, K_c9, K_m9, K_y9 }, +{ VK_MULTIPLY, K_asterisk, K_sAsterisk, K_cAsterisk, K_mAsterisk, K_yAsterisk }, +{ VK_ADD, K_plus, K_sPlus, K_cPlus, K_mPlus, K_yPlus }, +{ VK_SUBTRACT, K_minus, K_sMinus, K_cMinus, K_mMinus, K_yMinus }, +{ VK_DECIMAL, K_period, K_sPeriod, K_cPeriod, K_mPeriod, K_yPeriod }, +{ VK_DIVIDE, K_slash, K_sSlash, K_cSlash, K_mSlash, K_ySlash }, +{ VK_SEPARATOR, K_comma, K_sComma, K_cComma, K_mComma, K_yComma } +}; + +static Iwin2iupkey keytable_abnt[] = { +{ '1', K_1, K_exclam, K_c1, K_m1, K_y1 }, +{ '2', K_2, K_at, K_c2, K_m2, K_y2 }, +{ '3', K_3, K_numbersign, K_c3, K_m3, K_y3 }, +{ '4', K_4, K_dollar, K_c4, K_m4, K_y4 }, +{ '5', K_5, K_percent, K_c5, K_m5, K_y5 }, +{ '6', K_6, K_circum, K_c6, K_m6, K_y6 }, + +{ VK_OEM_1, K_ccedilla, K_Ccedilla, K_cCcedilla, K_mCcedilla, K_yCcedilla }, +{ VK_OEM_2, K_semicolon, K_colon, K_cSemicolon, K_mSemicolon, K_ySemicolon }, +{ VK_OEM_3, K_apostrophe, K_quotedbl, 0, 0, 0 }, +{ VK_OEM_4, K_acute, K_grave, 0, 0, 0 }, +{ VK_OEM_5, K_bracketright, K_braceright, K_cBracketleft, K_mBracketleft, K_yBracketleft }, +{ VK_OEM_6, K_bracketleft, K_braceleft, K_cBracketright, K_mBracketright, K_yBracketright }, +{ VK_OEM_7, K_tilde, K_circum, 0, 0, 0 }, +{ VK_OEM_102, K_backslash, K_bar, K_cBackslash, K_mBackslash, K_yBackslash }, +{ VK_OEM_PLUS, K_equal, K_plus, K_cEqual, K_mEqual, K_yEqual }, +{ 0xC1, K_slash, K_question, K_cSlash, K_mSlash, K_ySlash }, +{ 0xC2, K_period, K_sPeriod, K_cPeriod, K_mPeriod, K_yPeriod }, +{ VK_SEPARATOR,K_period, K_sPeriod, K_cPeriod, K_mPeriod, K_yPeriod }, +{ VK_DECIMAL, K_comma, K_sComma, K_cComma, K_mComma, K_yComma } +}; + + +void iupwinKeyEncode(int key, unsigned int *keyval, unsigned int *state) +{ + int i, iupcode = key & 0xFF; /* 0-255 interval */ + int count = sizeof(winkey_map)/sizeof(winkey_map[0]); + for (i = 0; i < count; i++) + { + Iwin2iupkey* key_map = &(winkey_map[i]); + if (key_map->iupcode == iupcode) + { + *keyval = key_map->wincode; + *state = 0; + + if (iupcode != key) + { + if (key_map->c_iupcode == key) + *state = VK_CONTROL; + else if (key_map->m_iupcode == key) + *state = VK_MENU; + else if (key_map->y_iupcode == key) + *state = VK_LWIN; + else if (key_map->s_iupcode == key) + *state = VK_SHIFT; + } + return; + } + else if (key_map->s_iupcode == key) /* There are Shift keys bellow 256 */ + { + *keyval = key_map->wincode; + *state = VK_SHIFT; + return; + } + } +} + +static int winKeyMap2Iup(Iwin2iupkey* table, int i) +{ + int code = 0; + if (GetKeyState(VK_CONTROL) & 0x8000) + code = table[i].c_iupcode; + else if (GetKeyState(VK_MENU) & 0x8000) + code = table[i].m_iupcode; + else if ((GetKeyState(VK_LWIN) & 0x8000) || (GetKeyState(VK_RWIN) & 0x8000)) + code = table[i].y_iupcode; + else if (GetKeyState(VK_CAPITAL) & 0x01) /* if it's on */ + { + if ((GetKeyState(VK_SHIFT) & 0x8000) || !iupKeyCanCaps(table[i].iupcode)) + return table[i].iupcode; + else + code = table[i].s_iupcode; + } + else if (GetKeyState(VK_SHIFT) & 0x8000) + code = table[i].s_iupcode; + else + return table[i].iupcode; + + if (!code) + code = table[i].iupcode; + + return code; +} + +static int winKeyDecode(int wincode) +{ + HKL k; + int i, count; + + k = GetKeyboardLayout(0); + if ((int)HIWORD(k) == 0x0416) /* ABNT */ + { + int abnt_count = sizeof(keytable_abnt)/sizeof(keytable_abnt[0]); + for (i = 0; i < abnt_count; i++) + { + if (keytable_abnt[i].wincode == wincode) + return winKeyMap2Iup(keytable_abnt, i); + } + } + + count = sizeof(winkey_map)/sizeof(winkey_map[0]); + for (i = 0; i < count; i++) + { + if (winkey_map[i].wincode == wincode) + return winKeyMap2Iup(winkey_map, i); + } + + return 0; +} + +int iupwinKeyEvent(Ihandle* ih, int wincode, int press) +{ + int result, code; + + if (!ih->iclass->is_interactive) + return 1; + + code = winKeyDecode(wincode); + if (code == 0) + return 1; + + if (press) + { + result = iupKeyCallKeyCb(ih, code); + if (result == IUP_CLOSE) + { + IupExitLoop(); + return 1; + } + else if (result == IUP_IGNORE) + return 0; + + /* in the previous callback the dialog could be destroyed */ + if (iupObjectCheck(ih)) + { + /* this is called only for canvas */ + if (ih->iclass->nativetype == IUP_TYPECANVAS) + { + result = iupKeyCallKeyPressCb(ih, code, 1); + if (result == IUP_CLOSE) + { + IupExitLoop(); + return 1; + } + else if (result == IUP_IGNORE) + return 0; + } + } + + if (!iupKeyProcessNavigation(ih, code, (GetKeyState(VK_SHIFT) & 0x8000))) + return 0; + } + else + { + /* this is called only for canvas */ + if (ih->iclass->nativetype == IUP_TYPECANVAS) + { + result = iupKeyCallKeyPressCb(ih, code, 0); + if (result == IUP_CLOSE) + { + IupExitLoop(); + return 1; + } + else if (result == IUP_IGNORE) + return 0; + } + } + + return 1; +} + +void iupwinButtonKeySetStatus(WORD keys, char* status, int doubleclick) +{ + if (keys & MK_SHIFT) + iupKEYSETSHIFT(status); + + if (keys & MK_CONTROL) + iupKEYSETCONTROL(status); + + if (keys & MK_LBUTTON) + iupKEYSETBUTTON1(status); + + if (keys & MK_MBUTTON) + iupKEYSETBUTTON2(status); + + if (keys & MK_RBUTTON) + iupKEYSETBUTTON3(status); + + if (doubleclick) + iupKEYSETDOUBLE(status); + + if (GetKeyState(VK_MENU) & 0x8000) + iupKEYSETALT(status); + + if ((GetKeyState(VK_LWIN) & 0x8000) || (GetKeyState(VK_RWIN) & 0x8000)) + iupKEYSETSYS(status); + + if (keys & MK_XBUTTON1) + iupKEYSETBUTTON4(status); + + if (keys & MK_XBUTTON2) + iupKEYSETBUTTON5(status); +} diff --git a/iup/src/win/iupwin_label.c b/iup/src/win/iupwin_label.c new file mode 100755 index 0000000..d5a1f53 --- /dev/null +++ b/iup/src/win/iupwin_label.c @@ -0,0 +1,339 @@ +/** \file + * \brief Label Control + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_label.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_image.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_draw.h" + + +static void winLabelDrawImage(Ihandle* ih, HDC hDC, int rect_width, int rect_height) +{ + int xpad = ih->data->horiz_padding, + ypad = ih->data->vert_padding; + int x, y, width, height, bpp; + HBITMAP hBitmap, hMask = NULL; + char *name; + int make_inactive = 0; + + if (iupdrvIsActive(ih)) + name = iupAttribGet(ih, "IMAGE"); + else + { + name = iupAttribGet(ih, "IMINACTIVE"); + if (!name) + { + name = iupAttribGet(ih, "IMAGE"); + make_inactive = 1; + } + } + + hBitmap = iupImageGetImage(name, ih, make_inactive); + if (!hBitmap) + return; + + /* must use this info, since image can be a driver image loaded from resources */ + iupdrvImageGetInfo(hBitmap, &width, &height, &bpp); + + if (ih->data->horiz_alignment == IUP_ALIGN_ARIGHT) + x = rect_width - (width + 2*xpad); + else if (ih->data->horiz_alignment == IUP_ALIGN_ACENTER) + x = (rect_width - (width + 2*xpad))/2; + else /* ALEFT */ + x = 0; + + if (ih->data->vert_alignment == IUP_ALIGN_ABOTTOM) + y = rect_height - (height + 2*ypad); + else if (ih->data->vert_alignment == IUP_ALIGN_ATOP) + y = 0; + else /* ACENTER */ + y = (rect_height - (height + 2*ypad))/2; + + x += xpad; + y += ypad; + + if (bpp == 8) + hMask = iupdrvImageCreateMask(IupGetHandle(name)); + + iupwinDrawBitmap(hDC, hBitmap, hMask, x, y, width, height, bpp); + + if (hMask) + DeleteObject(hMask); +} + +static void winLabelDrawText(Ihandle* ih, HDC hDC, int rect_width, int rect_height) +{ + int xpad = ih->data->horiz_padding, + ypad = ih->data->vert_padding; + int x, y, width, height, style; + HFONT hFont = (HFONT)iupwinGetHFontAttrib(ih); + COLORREF fgcolor; + + char* title = iupdrvBaseGetTitleAttrib(ih); + char* str = iupStrProcessMnemonic(title, NULL, 0); /* remove & */ + iupdrvFontGetMultiLineStringSize(ih, str, &width, &height); + if (str && str!=title) free(str); + + if (ih->data->horiz_alignment == IUP_ALIGN_ARIGHT) + style = DT_RIGHT; + else if (ih->data->horiz_alignment == IUP_ALIGN_ACENTER) + style = DT_CENTER; + else /* ALEFT */ + style = DT_LEFT; + + if (ih->data->vert_alignment == IUP_ALIGN_ABOTTOM) + y = rect_height - (height + 2*ypad); + else if (ih->data->vert_alignment == IUP_ALIGN_ATOP) + y = 0; + else /* ACENTER */ + y = (rect_height - (height + 2*ypad))/2; + + /* let DrawText do the horizontal alignment */ + x = xpad; + width = rect_width - 2*xpad; + y += ypad; + + if (iupdrvIsActive(ih)) + fgcolor = ih->data->fgcolor; + else + fgcolor = GetSysColor(COLOR_GRAYTEXT); + + /* WORDWRAP and ELLIPSIS */ + style |= ih->data->text_style; + + iupwinDrawText(hDC, title, x, y, width, height, hFont, fgcolor, style); +} + +static void winLabelDrawItem(Ihandle* ih, DRAWITEMSTRUCT *drawitem) +{ + HDC hDC; + iupwinBitmapDC bmpDC; + int width, height; + + if (!(drawitem->itemAction & ODA_DRAWENTIRE)) + return; + + width = drawitem->rcItem.right - drawitem->rcItem.left; + height = drawitem->rcItem.bottom - drawitem->rcItem.top; + + hDC = iupwinDrawCreateBitmapDC(&bmpDC, drawitem->hDC, width, height); + + iupwinDrawParentBackground(ih, hDC, &drawitem->rcItem); + + if (ih->data->type == IUP_LABEL_IMAGE) + winLabelDrawImage(ih, hDC, width, height); + else + winLabelDrawText(ih, hDC, width, height); + + iupwinDrawDestroyBitmapDC(&bmpDC); +} + +/************************************************************************************************/ + +static int winLabelSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type != IUP_LABEL_SEP_HORIZ && ih->data->type != IUP_LABEL_SEP_VERT) + { + char value1[30] = "", value2[30] = ""; + + iupStrToStrStr(value, value1, value2, ':'); + + if (iupStrEqualNoCase(value1, "ARIGHT")) + ih->data->horiz_alignment = IUP_ALIGN_ARIGHT; + else if (iupStrEqualNoCase(value1, "ACENTER")) + ih->data->horiz_alignment = IUP_ALIGN_ACENTER; + else /* "ALEFT" */ + ih->data->horiz_alignment = IUP_ALIGN_ALEFT; + + if (iupStrEqualNoCase(value2, "ABOTTOM")) + ih->data->vert_alignment = IUP_ALIGN_ABOTTOM; + else if (iupStrEqualNoCase(value2, "ACENTER")) + ih->data->vert_alignment = IUP_ALIGN_ACENTER; + else /* "ATOP" */ + ih->data->vert_alignment = IUP_ALIGN_ATOP; + + iupdrvDisplayRedraw(ih); + } + return 0; +} + +static char* winLabelGetAlignmentAttrib(Ihandle *ih) +{ + if (ih->data->type != IUP_LABEL_SEP_HORIZ && ih->data->type != IUP_LABEL_SEP_VERT) + { + char* horiz_align2str[3] = {"ALEFT", "ACENTER", "ARIGHT"}; + char* vert_align2str[3] = {"ATOP", "ACENTER", "ABOTTOM"}; + char *str = iupStrGetMemory(50); + sprintf(str, "%s:%s", horiz_align2str[ih->data->horiz_alignment], vert_align2str[ih->data->vert_alignment]); + return str; + } + else + return NULL; +} + +static int winLabelSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + + if (ih->handle && ih->data->type != IUP_LABEL_SEP_HORIZ && ih->data->type != IUP_LABEL_SEP_VERT) + iupdrvDisplayRedraw(ih); + + return 0; +} + +static int winLabelSetWordWrapAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_LABEL_TEXT) + { + if (iupStrBoolean(value)) + ih->data->text_style |= DT_WORDBREAK; + else + ih->data->text_style &= ~DT_WORDBREAK; + + iupdrvDisplayRedraw(ih); + } + + return 1; +} + +static int winLabelSetEllipsisAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_LABEL_TEXT) + { + if (iupStrBoolean(value)) + ih->data->text_style |= DT_END_ELLIPSIS; + else + ih->data->text_style &= ~DT_END_ELLIPSIS; + + iupdrvDisplayRedraw(ih); + } + + return 1; +} + +static int winLabelSetFgColorAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type != IUP_LABEL_SEP_HORIZ && ih->data->type != IUP_LABEL_SEP_VERT) + { + unsigned char r, g, b; + if (iupStrToRGB(value, &r, &g, &b)) + { + ih->data->fgcolor = RGB(r,g,b); + iupdrvDisplayRedraw(ih); + } + } + return 1; +} + +static int winLabelProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + switch (msg) + { + case WM_NCCALCSIZE: + { + if (wp == TRUE) + { + *result = WVR_HREDRAW|WVR_VREDRAW; + return 1; + } + } + } + + return iupwinBaseProc(ih, msg, wp, lp, result); +} + +static int winLabelMapMethod(Ihandle* ih) +{ + char* value; + DWORD dwStyle = WS_CHILD | + SS_NOTIFY; /* SS_NOTIFY is necessary because of the base messages */ + + if (!ih->parent) + return IUP_ERROR; + + value = iupAttribGet(ih, "SEPARATOR"); + if (value) + { + if (iupStrEqualNoCase(value, "HORIZONTAL")) + { + ih->data->type = IUP_LABEL_SEP_HORIZ; + dwStyle |= SS_ETCHEDHORZ; + } + else /* "VERTICAL" */ + { + ih->data->type = IUP_LABEL_SEP_VERT; + dwStyle |= SS_ETCHEDVERT; + } + } + else + { + /* The lack for good alignment support in STATIC control forces IUP to draw its own label, + but uses the Windows functions to draw text and images in native format. */ + dwStyle |= SS_OWNERDRAW; + + value = iupAttribGet(ih, "IMAGE"); + if (value) + ih->data->type = IUP_LABEL_IMAGE; + else + ih->data->type = IUP_LABEL_TEXT; + } + + if (!iupwinCreateWindowEx(ih, "STATIC", 0, dwStyle)) + return IUP_ERROR; + + if (ih->data->type != IUP_LABEL_SEP_HORIZ && ih->data->type != IUP_LABEL_SEP_VERT) + { + /* replace the WinProc to handle other messages */ + IupSetCallback(ih, "_IUPWIN_CTRLPROC_CB", (Icallback)winLabelProc); + + IupSetCallback(ih, "_IUPWIN_DRAWITEM_CB", (Icallback)winLabelDrawItem); + } + + return IUP_NOERROR; +} + +void iupdrvLabelInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winLabelMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + /* the most important use of this is to provide the correct background for images */ + iupClassRegisterAttribute(ic, "BGCOLOR", iupBaseNativeParentGetBgColorAttrib, NULL, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, winLabelSetFgColorAttrib, "DLGFGCOLOR", NULL, IUPAF_NOT_MAPPED); /* force new default value */ + iupClassRegisterAttribute(ic, "TITLE", iupdrvBaseGetTitleAttrib, iupdrvBaseSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupLabel only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", winLabelGetAlignmentAttrib, winLabelSetAlignmentAttrib, IUPAF_SAMEASSYSTEM, "ALEFT:ACENTER", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PADDING", iupLabelGetPaddingAttrib, winLabelSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + + /* IupLabel Windows and GTK only */ + iupClassRegisterAttribute(ic, "WORDWRAP", NULL, winLabelSetWordWrapAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "ELLIPSIS", NULL, winLabelSetEllipsisAttrib, NULL, NULL, IUPAF_DEFAULT); +} diff --git a/iup/src/win/iupwin_list.c b/iup/src/win/iupwin_list.c new file mode 100755 index 0000000..8fdadb6 --- /dev/null +++ b/iup/src/win/iupwin_list.c @@ -0,0 +1,1460 @@ +/** \file + * \brief List Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_mask.h" +#include "iup_focus.h" +#include "iup_list.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_draw.h" + + +#ifndef EM_SETCUEBANNER /* defined only if _WIN32_WINNT >= 0x501 */ +#define ECM_FIRST 0x1500 /* Edit control messages */ +#define EM_SETCUEBANNER (ECM_FIRST + 1) +#endif + +#define WM_CARET WM_APP+1 /* Custom IUP message */ + +#define WIN_GETCOUNT(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_GETCOUNT: LB_GETCOUNT) +#define WIN_GETTEXTLEN(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_GETLBTEXTLEN: LB_GETTEXTLEN) +#define WIN_GETTEXT(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_GETLBTEXT: LB_GETTEXT) +#define WIN_ADDSTRING(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_ADDSTRING: LB_ADDSTRING) +#define WIN_DELETESTRING(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_DELETESTRING: LB_DELETESTRING) +#define WIN_INSERTSTRING(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_INSERTSTRING: LB_INSERTSTRING) +#define WIN_RESETCONTENT(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_RESETCONTENT: LB_RESETCONTENT) +#define WIN_SETCURSEL(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_SETCURSEL: LB_SETCURSEL) +#define WIN_GETCURSEL(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_GETCURSEL: LB_GETCURSEL) +#define WIN_SETHORIZONTALEXTENT(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_SETHORIZONTALEXTENT: LB_SETHORIZONTALEXTENT) +#define WIN_SETITEMDATA(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_SETITEMDATA: LB_SETITEMDATA) +#define WIN_GETITEMDATA(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_GETITEMDATA: LB_GETITEMDATA) +#define WIN_SETTOPINDEX(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_SETTOPINDEX: LB_SETTOPINDEX) +#define WIN_SETITEMHEIGHT(_ih) ((_ih->data->is_dropdown || _ih->data->has_editbox)? CB_SETITEMHEIGHT: LB_SETITEMHEIGHT) + + +void iupdrvListAddItemSpace(Ihandle* ih, int *h) +{ + (void)ih; + (void)h; +} + +void iupdrvListAddBorders(Ihandle* ih, int *x, int *y) +{ + int border_size = 2*4; + (*x) += border_size; + (*y) += border_size; + + if (ih->data->is_dropdown) + { + (*x) += 3; /* extra space for the dropdown button */ + + if (ih->data->has_editbox) + { + /* extra border for the editbox */ + int internal_border_size = 2*6; + (*x) += internal_border_size; + (*y) += internal_border_size; + } + } + else + { + if (ih->data->has_editbox) + (*y) += 2*3; /* internal border between editbox and list */ + } +} + +int iupdrvListGetCount(Ihandle* ih) +{ + return SendMessage(ih->handle, WIN_GETCOUNT(ih), 0, 0); +} + +static int winListConvertXYToPos(Ihandle* ih, int x, int y) +{ + int pos; + + if (ih->data->has_editbox) + { + HWND cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + + pos = SendMessage(cbedit, EM_CHARFROMPOS, 0, MAKELPARAM(x, y)); + pos = LOWORD(pos); + } + + if (ih->data->has_editbox) + { + HWND cblist = (HWND)iupAttribGet(ih, "_IUPWIN_LISTBOX"); + pos = SendMessage(cblist, LB_ITEMFROMPOINT, 0, MAKELPARAM(x, y))+1; /* IUP Starts at 1 */ + pos = LOWORD(pos); + } + else + { + pos = SendMessage(ih->handle, LB_ITEMFROMPOINT, 0, MAKELPARAM(x, y))+1; + pos = LOWORD(pos); + } + + return pos; +} + +static int winListGetMaxWidth(Ihandle* ih) +{ + int i, item_w, max_w = 0, + count = SendMessage(ih->handle, WIN_GETCOUNT(ih), 0, 0); + + for (i=0; ihandle, WIN_GETITEMDATA(ih), i, 0); + if (item_w > max_w) + max_w = item_w; + } + + return max_w; +} + +static void winListUpdateScrollWidth(Ihandle* ih) +{ + if (ih->data->is_dropdown && iupAttribGetBoolean(ih, "DROPEXPAND")) + { + int w = 3+winListGetMaxWidth(ih)+iupdrvGetScrollbarSize()+3; + SendMessage(ih->handle, CB_SETDROPPEDWIDTH, w, 0); + } + else + SendMessage(ih->handle, WIN_SETHORIZONTALEXTENT(ih), winListGetMaxWidth(ih), 0); +} + +void iupdrvListAppendItem(Ihandle* ih, const char* value) +{ + int pos = SendMessage(ih->handle, WIN_ADDSTRING(ih), 0, (LPARAM)value); + SendMessage(ih->handle, WIN_SETITEMDATA(ih), pos, (LPARAM)iupdrvFontGetStringWidth(ih, value)); + winListUpdateScrollWidth(ih); +} + +void iupdrvListInsertItem(Ihandle* ih, int pos, const char* value) +{ + SendMessage(ih->handle, WIN_INSERTSTRING(ih), pos, (LPARAM)value); + SendMessage(ih->handle, WIN_SETITEMDATA(ih), pos, (LPARAM)iupdrvFontGetStringWidth(ih, value)); + winListUpdateScrollWidth(ih); +} + +void iupdrvListRemoveItem(Ihandle* ih, int pos) +{ + if (ih->data->is_dropdown && !ih->data->has_editbox) + { + /* must check if removing the current item */ + int curpos = SendMessage(ih->handle, WIN_GETCURSEL(ih), 0, 0); + if (pos == curpos) + { + if (curpos > 0) curpos--; + else curpos++; + + SendMessage(ih->handle, WIN_SETCURSEL(ih), curpos, 0); + } + } + + SendMessage(ih->handle, WIN_DELETESTRING(ih), pos, 0L); + winListUpdateScrollWidth(ih); +} + +void iupdrvListRemoveAllItems(Ihandle* ih) +{ + SendMessage(ih->handle, WIN_RESETCONTENT(ih), 0, 0L); + if (ih->data->is_dropdown && iupAttribGetBoolean(ih, "DROPEXPAND")) + SendMessage(ih->handle, CB_SETDROPPEDWIDTH, 0, 0); + else + SendMessage(ih->handle, WIN_SETHORIZONTALEXTENT(ih), 0, 0); +} + +static int winListGetCaretPos(HWND cbedit) +{ + int pos = 0; + POINT point; + + if (GetFocus() != cbedit || !GetCaretPos(&point)) + { + /* if does not have the focus, or could not get caret position, + then use the selection start position */ + SendMessage(cbedit, EM_GETSEL, (WPARAM)&pos, 0); + } + else + { + pos = SendMessage(cbedit, EM_CHARFROMPOS, 0, MAKELPARAM(point.x, point.y)); + pos = LOWORD(pos); + } + + return pos; +} + + +/*********************************************************************************/ + + +static void winListUpdateItemWidth(Ihandle* ih) +{ + int i, count = SendMessage(ih->handle, WIN_GETCOUNT(ih), 0, 0); + for (i=0; ihandle, WIN_GETTEXTLEN(ih), (WPARAM)i, 0); + char* str = iupStrGetMemory(len+1); + SendMessage(ih->handle, WIN_GETTEXT(ih), (WPARAM)i, (LPARAM)str); + SendMessage(ih->handle, WIN_SETITEMDATA(ih), i, (LPARAM)iupdrvFontGetStringWidth(ih, str)); + } +} + +static int winListSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + iupdrvSetStandardFontAttrib(ih, value); + winListUpdateItemWidth(ih); + winListUpdateScrollWidth(ih); + return 1; +} + +static char* winListGetIdValueAttrib(Ihandle* ih, const char* name_id) +{ + int pos = iupListGetPos(ih, name_id); + if (pos != -1) + { + int len = SendMessage(ih->handle, WIN_GETTEXTLEN(ih), (WPARAM)pos, 0); + char* str = iupStrGetMemory(len+1); + SendMessage(ih->handle, WIN_GETTEXT(ih), (WPARAM)pos, (LPARAM)str); + return str; + } + return NULL; +} + +static char* winListGetValueAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + int nc = GetWindowTextLength(ih->handle); + if (nc) + { + char* str = iupStrGetMemory(nc+1); + GetWindowText(ih->handle, str, nc+1); + return str; + } + } + else + { + if (ih->data->is_dropdown || !ih->data->is_multiple) + { + int pos = SendMessage(ih->handle, WIN_GETCURSEL(ih), 0, 0); + char* str = iupStrGetMemory(50); + sprintf(str, "%d", pos+1); /* IUP starts at 1 */ + return str; + } + else + { + int i, count = SendMessage(ih->handle, LB_GETCOUNT, 0, 0); + int* pos = malloc(sizeof(int)*count); + int sel_count = SendMessage(ih->handle, LB_GETSELITEMS, count, (LPARAM)pos); + char* str = iupStrGetMemory(count+1); + memset(str, '-', count); + str[count]=0; + for (i=0; idata->has_editbox) + { + if (!value) value = ""; + SetWindowText(ih->handle, value); + } + else + { + if (ih->data->is_dropdown || !ih->data->is_multiple) + { + int pos; + if (iupStrToInt(value, &pos)==1) + { + SendMessage(ih->handle, WIN_SETCURSEL(ih), pos-1, 0); /* IUP starts at 1 */ + iupAttribSetInt(ih, "_IUPLIST_OLDVALUE", pos); + } + else + { + SendMessage(ih->handle, WIN_SETCURSEL(ih), (WPARAM)-1, 0); /* no selection */ + iupAttribSetStr(ih, "_IUPLIST_OLDVALUE", NULL); + } + } + else + { + /* User has changed a multiple selection on a simple list. */ + int i, len, count; + + /* Clear all selections */ + SendMessage(ih->handle, LB_SETSEL, FALSE, -1); + + if (!value) + { + iupAttribSetStr(ih, "_IUPLIST_OLDVALUE", NULL); + return 0; + } + + count = SendMessage(ih->handle, LB_GETCOUNT, 0, 0L); + len = strlen(value); + if (len < count) + count = len; + + /* update selection list */ + for (i = 0; ihandle, LB_SETSEL, TRUE, i); + } + + iupAttribStoreStr(ih, "_IUPLIST_OLDVALUE", value); + } + } + + return 0; +} + +static int winListSetShowDropdownAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->is_dropdown) + SendMessage(ih->handle, CB_SHOWDROPDOWN, iupStrBoolean(value), 0); + return 0; +} + +static int winListSetTopItemAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->is_dropdown) + { + int pos = 1; + if (iupStrToInt(value, &pos)) + SendMessage(ih->handle, WIN_SETTOPINDEX(ih), pos-1, 0); /* IUP starts at 1 */ + } + return 0; +} + +static int winListSetSpacingAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->is_dropdown) + return 0; + + if (!iupStrToInt(value, &ih->data->spacing)) + ih->data->spacing = 0; + + if (ih->handle) + { + int height; + iupdrvFontGetCharSize(ih, NULL, &height); + height += 2*ih->data->spacing; + SendMessage(ih->handle, WIN_SETITEMHEIGHT(ih), 0, height); + return 0; + } + else + return 1; /* store until not mapped, when mapped will be set again */ +} + +static int winListSetPaddingAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_editbox) + return 0; + + iupStrToIntInt(value, &(ih->data->horiz_padding), &(ih->data->vert_padding), 'x'); + ih->data->vert_padding = 0; + if (ih->handle) + { + HWND cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETMARGINS, EC_LEFTMARGIN|EC_RIGHTMARGIN, MAKELPARAM(ih->data->horiz_padding, ih->data->horiz_padding)); + return 0; + } + else + return 1; /* store until not mapped, when mapped will be set again */ +} + +static int winListSetFilterAttrib(Ihandle *ih, const char *value) +{ + int style = 0; + + if (!ih->data->has_editbox) + return 0; + + if (iupStrEqualNoCase(value, "LOWERCASE")) + style = ES_LOWERCASE; + else if (iupStrEqualNoCase(value, "NUMBER")) + style = ES_NUMBER; + else if (iupStrEqualNoCase(value, "UPPERCASE")) + style = ES_UPPERCASE; + + if (style) + { + HWND old_handle = ih->handle; + ih->handle = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + iupwinMergeStyle(ih, ES_LOWERCASE|ES_NUMBER|ES_UPPERCASE, style); + ih->handle = old_handle; + } + + return 1; +} + +static int winListSetCueBannerAttrib(Ihandle *ih, const char *value) +{ + if (ih->data->has_editbox && iupwin_comctl32ver6) + { + WCHAR* wstr = iupwinStrChar2Wide(value); + HWND cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETCUEBANNER, (WPARAM)FALSE, (LPARAM)wstr); + free(wstr); + return 1; + } + return 0; +} + +static int winListSetClipboardAttrib(Ihandle *ih, const char *value) +{ + UINT msg = 0; + + if (!ih->data->has_editbox) + return 0; + + if (iupStrEqualNoCase(value, "COPY")) + msg = WM_COPY; + else if (iupStrEqualNoCase(value, "CUT")) + msg = WM_CUT; + else if (iupStrEqualNoCase(value, "PASTE")) + msg = WM_PASTE; + else if (iupStrEqualNoCase(value, "CLEAR")) + msg = WM_CLEAR; + else if (iupStrEqualNoCase(value, "UNDO")) + msg = WM_UNDO; + + if (msg) + { + HWND cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, msg, 0, 0); + } + + return 0; +} + +static int winListSetSelectedTextAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_editbox) + return 0; + + if (value) + { + int start = 0, end = 0; + HWND cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_GETSEL, (WPARAM)&start, (LPARAM)&end); + if (start == end) + return 0; + SendMessage(cbedit, EM_REPLACESEL, (WPARAM)TRUE, (LPARAM)value); + } + return 0; +} + +static char* winListGetSelectedTextAttrib(Ihandle* ih) +{ + int nc; + HWND cbedit; + if (!ih->data->has_editbox) + return 0; + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + nc = GetWindowTextLength(cbedit); + if (nc) + { + int start = 0, end = 0; + char* str; + + SendMessage(cbedit, EM_GETSEL, (WPARAM)&start, (LPARAM)&end); + if (start == end) + return NULL; + + str = iupStrGetMemory(nc+1); + GetWindowText(cbedit, str, nc+1); + str[end] = 0; /* returns only the selected text */ + str += start; + + return str; + } + else + return NULL; +} + +static int winListSetNCAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_editbox) + return 0; + + if (!iupStrToInt(value, &ih->data->nc)) + ih->data->nc = 0; + + if (ih->handle) + { + HWND cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_LIMITTEXT, ih->data->nc, 0L); + } + return 0; +} + +static int winListSetSelectionAttrib(Ihandle* ih, const char* value) +{ + HWND cbedit; + int start=1, end=1; + if (!ih->data->has_editbox) + return 0; + + if (!value || iupStrEqualNoCase(value, "NONE")) + { + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETSEL, (WPARAM)-1, (LPARAM)0); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETSEL, (WPARAM)0, (LPARAM)-1); + return 0; + } + + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<1 || end<1) + return 0; + + start--; /* IUP starts at 1 */ + end--; + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETSEL, (WPARAM)start, (LPARAM)end); + + return 0; +} + +static char* winListGetSelectionAttrib(Ihandle* ih) +{ + int start = 0, end = 0; + char* str; + HWND cbedit; + if (!ih->data->has_editbox) + return NULL; + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_GETSEL, (WPARAM)&start, (LPARAM)&end); + if (start == end) + return NULL; + + str = iupStrGetMemory(100); + + start++; /* IUP starts at 1 */ + end++; + sprintf(str, "%d:%d", start, end); + + return str; +} + +static int winListSetSelectionPosAttrib(Ihandle* ih, const char* value) +{ + int start=0, end=0; + HWND cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value || iupStrEqualNoCase(value, "NONE")) + { + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETSEL, (WPARAM)-1, (LPARAM)0); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETSEL, (WPARAM)0, (LPARAM)-1); + return 0; + } + + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<0 || end<0) + return 0; + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETSEL, (WPARAM)start, (LPARAM)end); + + return 0; +} + +static char* winListGetSelectionPosAttrib(Ihandle* ih) +{ + int start = 0, end = 0; + char* str; + HWND cbedit; + if (!ih->data->has_editbox) + return NULL; + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_GETSEL, (WPARAM)&start, (LPARAM)&end); + if (start == end) + return NULL; + + str = iupStrGetMemory(100); + sprintf(str, "%d:%d", start, end); + return str; +} + +static int winListSetInsertAttrib(Ihandle* ih, const char* value) +{ + if (value && ih->data->has_editbox) + { + HWND cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_REPLACESEL, (WPARAM)TRUE, (LPARAM)value); + } + return 0; +} + +static int winListSetAppendAttrib(Ihandle* ih, const char* value) +{ + int len; + HWND cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value) value = ""; + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + len = GetWindowTextLength(cbedit)+1; + SendMessage(cbedit, EM_SETSEL, (WPARAM)len, (LPARAM)len); + SendMessage(cbedit, EM_REPLACESEL, (WPARAM)TRUE, (LPARAM)value); + + return 0; +} + +static int winListSetReadOnlyAttrib(Ihandle* ih, const char* value) +{ + HWND cbedit; + if (!ih->data->has_editbox) + return 0; + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETREADONLY, (WPARAM)iupStrBoolean(value), 0); + return 0; +} + +static char* winListGetReadOnlyAttrib(Ihandle* ih) +{ + DWORD style; + HWND cbedit; + if (!ih->data->has_editbox) + return NULL; + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + style = GetWindowLong(cbedit, GWL_STYLE); + if (style & ES_READONLY) + return "YES"; + else + return "NO"; +} + +static int winListSetCaretAttrib(Ihandle* ih, const char* value) +{ + int pos = 1; + HWND cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 1) pos = 1; + pos--; /* IUP starts at 1 */ + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETSEL, (WPARAM)pos, (LPARAM)pos); + SendMessage(cbedit, EM_SCROLLCARET, 0L, 0L); + + return 0; +} + +static char* winListGetCaretAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + char* str = iupStrGetMemory(100); + HWND cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + sprintf(str, "%d", winListGetCaretPos(cbedit)+1); + return str; + } + else + return NULL; +} + +static int winListSetCaretPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + HWND cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); /* be permissive in SetCaret, do not abort if invalid */ + if (pos < 0) pos = 0; + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_SETSEL, (WPARAM)pos, (LPARAM)pos); + SendMessage(cbedit, EM_SCROLLCARET, 0L, 0L); + + return 0; +} + +static char* winListGetCaretPosAttrib(Ihandle* ih) +{ + if (ih->data->has_editbox) + { + char* str = iupStrGetMemory(100); + HWND cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + sprintf(str, "%d", winListGetCaretPos(cbedit)); + return str; + } + else + return NULL; +} + +static int winListSetScrollToAttrib(Ihandle* ih, const char* value) +{ + int pos = 1; + HWND cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 1) pos = 1; + + pos--; /* return to Windows referece */ + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_LINESCROLL, (WPARAM)pos, (LPARAM)0); + + return 0; +} + +static int winListSetScrollToPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + HWND cbedit; + if (!ih->data->has_editbox) + return 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 0) pos = 0; + + cbedit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + SendMessage(cbedit, EM_LINESCROLL, (WPARAM)pos, (LPARAM)0); + + return 0; +} + + +/*********************************************************************************/ + + +static int winListCtlColor(Ihandle* ih, HDC hdc, LRESULT *result) +{ + COLORREF cr; + + if (iupwinGetColorRef(ih, "FGCOLOR", &cr)) + SetTextColor(hdc, cr); + + if (iupwinGetColorRef(ih, "BGCOLOR", &cr)) + { + SetBkColor(hdc, cr); + SetDCBrushColor(hdc, cr); + *result = (LRESULT)GetStockObject(DC_BRUSH); + return 1; + } + return 0; +} + +static int winListWmCommand(Ihandle* ih, WPARAM wp, LPARAM lp) +{ + (void)lp; + + if (ih->data->is_dropdown || ih->data->has_editbox) + { + switch (HIWORD(wp)) + { + case CBN_EDITCHANGE: + { + iupBaseCallValueChangedCb(ih); + break; + } + case CBN_SETFOCUS: + iupwinWmSetFocus(ih); + break; + case CBN_KILLFOCUS: + iupCallKillFocusCb(ih); + break; + case CBN_CLOSEUP: + case CBN_DROPDOWN: + { + IFni cb = (IFni)IupGetCallback(ih, "DROPDOWN_CB"); + if (cb) + cb(ih, HIWORD(wp)==CBN_DROPDOWN? 1: 0); + break; + } + case CBN_DBLCLK: + { + IFnis cb = (IFnis) IupGetCallback(ih, "DBLCLICK_CB"); + if (cb) + { + int pos = SendMessage(ih->handle, CB_GETCURSEL, 0, 0); + pos++; /* IUP starts at 1 */ + iupListSingleCallDblClickCallback(ih, cb, pos); + } + break; + } + case CBN_SELCHANGE: + { + IFnsii cb = (IFnsii) IupGetCallback(ih, "ACTION"); + if (cb) + { + int pos = SendMessage(ih->handle, CB_GETCURSEL, 0, 0); + pos++; /* IUP starts at 1 */ + iupListSingleCallActionCallback(ih, cb, pos); + } + + iupBaseCallValueChangedCb(ih); + break; + } + } + } + else + { + switch (HIWORD(wp)) + { + case LBN_DBLCLK: + { + IFnis cb = (IFnis) IupGetCallback(ih, "DBLCLICK_CB"); + if (cb) + { + int pos = SendMessage(ih->handle, LB_GETCURSEL, 0, 0); + pos++; /* IUP starts at 1 */ + iupListSingleCallDblClickCallback(ih, cb, pos); + } + break; + } + case LBN_SELCHANGE: + { + if (!ih->data->is_multiple) + { + IFnsii cb = (IFnsii) IupGetCallback(ih, "ACTION"); + if (cb) + { + int pos = SendMessage(ih->handle, LB_GETCURSEL, 0, 0); + pos++; /* IUP starts at 1 */ + iupListSingleCallActionCallback(ih, cb, pos); + } + } + else + { + IFns multi_cb = (IFns)IupGetCallback(ih, "MULTISELECT_CB"); + IFnsii cb = (IFnsii) IupGetCallback(ih, "ACTION"); + if (multi_cb || cb) + { + int sel_count = SendMessage(ih->handle, LB_GETSELCOUNT, 0, 0); + int* pos = malloc(sizeof(int)*sel_count); + SendMessage(ih->handle, LB_GETSELITEMS, sel_count, (LPARAM)pos); + iupListMultipleCallActionCallback(ih, cb, multi_cb, pos, sel_count); + free(pos); + } + } + + iupBaseCallValueChangedCb(ih); + break; + } + } + } + + return 0; /* not used */ +} + +static void winListCallCaretCb(Ihandle* ih, HWND cbedit) +{ + int pos; + + IFniii cb = (IFniii)IupGetCallback(ih, "CARET_CB"); + if (!cb) return; + + pos = winListGetCaretPos(cbedit); + + if (pos != ih->data->last_caret_pos) + { + ih->data->last_caret_pos = pos; + cb(ih, 1, pos+1, pos); + } +} + +static int winListCallEditCb(Ihandle* ih, HWND cbedit, const char* insert_value, int key, int dir) +{ + int start, end, ret = 1; + char *value, *new_value; + + IFnis cb = (IFnis)IupGetCallback(ih, "EDIT_CB"); + if (!cb && !ih->data->mask) + return 1; + + SendMessage(cbedit, EM_GETSEL, (WPARAM)&start, (LPARAM)&end); + + value = winListGetValueAttrib(ih); + + if (!value) + new_value = iupStrDup(insert_value); + else if (insert_value) + new_value = iupStrInsert(value, insert_value, start, end); + else + { + new_value = value; + iupStrRemove(value, start, end, dir); + } + + if (!new_value) + return 0; /* abort */ + + if (ih->data->nc && (int)strlen(new_value) > ih->data->nc) + { + if (new_value != value) free(new_value); + return 0; /* abort */ + } + + if (ih->data->mask && iupMaskCheck(ih->data->mask, new_value)==0) + { + if (new_value != value) free(new_value); + return 0; /* abort */ + } + + if (cb) + { + int cb_ret = cb(ih, key, (char*)new_value); + if (cb_ret==IUP_IGNORE) + ret = 0; /* abort processing */ + else if (cb_ret==IUP_CLOSE) + { + IupExitLoop(); + ret = 0; /* abort processing */ + } + else if (cb_ret!=0 && key!=0 && + cb_ret != IUP_DEFAULT && cb_ret != IUP_CONTINUE) + { + WNDPROC oldProc = (WNDPROC)IupGetCallback(ih, "_IUPWIN_EDITOLDPROC_CB"); + CallWindowProc(oldProc, cbedit, WM_CHAR, cb_ret, 0); /* replace key */ + ret = 0; /* abort processing */ + } + } + + if (new_value != value) free(new_value); + return ret; +} + +static int winListEditProc(Ihandle* ih, HWND cbedit, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + int ret = 0; + + if (msg==WM_KEYDOWN) /* process K_ANY before text callbacks */ + { + ret = iupwinBaseProc(ih, msg, wp, lp, result); + if (ret) return 1; + } + + switch (msg) + { + case WM_CHAR: + { + if ((char)wp == '\b') + { + if (!winListCallEditCb(ih, cbedit, NULL, 0, -1)) + ret = 1; + } + else if ((char)wp == '\n' || (char)wp == '\r') + { + ret = 1; + } + else if (!(GetKeyState(VK_CONTROL) & 0x8000 || + GetKeyState(VK_MENU) & 0x8000 || + GetKeyState(VK_LWIN) & 0x8000 || + GetKeyState(VK_RWIN) & 0x8000)) + { + char insert_value[2]; + insert_value[0] = (char)wp; + insert_value[1] = 0; + + if (!winListCallEditCb(ih, cbedit, insert_value, wp, 1)) + ret = 1; + } + + PostMessage(cbedit, WM_CARET, 0, 0L); + + if (wp==VK_TAB) /* the keys have the same definitions as the chars */ + ret = 1; /* abort default processing to avoid beep */ + + break; + } + case WM_KEYDOWN: + { + if (wp == VK_DELETE) /* Del does not generates a WM_CHAR */ + { + if (!winListCallEditCb(ih, cbedit, NULL, 0, 1)) + ret = 1; + } + else if (wp == 'A' && GetKeyState(VK_CONTROL) & 0x8000) /* Ctrl+A = Select All */ + { + SendMessage(cbedit, EM_SETSEL, (WPARAM)0, (LPARAM)-1); + } + + PostMessage(cbedit, WM_CARET, 0, 0L); + break; + } + case WM_CLEAR: + { + if (!winListCallEditCb(ih, cbedit, NULL, 0, 1)) + ret = 1; + + PostMessage(cbedit, WM_CARET, 0, 0L); + break; + } + case WM_CUT: + { + if (!winListCallEditCb(ih, cbedit, NULL, 0, 1)) + ret = 1; + + PostMessage(cbedit, WM_CARET, 0, 0L); + break; + } + case WM_PASTE: + { + if (IupGetCallback(ih, "EDIT_CB") || ih->data->mask) /* test before to avoid alocate clipboard text memory */ + { + char* insert_value = iupwinGetClipboardText(ih); + if (insert_value) + { + if (!winListCallEditCb(ih, cbedit, insert_value, 0, 1)) + ret = 1; + free(insert_value); + } + } + + PostMessage(cbedit, WM_CARET, 0, 0L); + break; + } + case WM_UNDO: + { + IFnis cb = (IFnis)IupGetCallback(ih, "EDIT_CB"); + if (cb) + { + char* value; + WNDPROC oldProc = (WNDPROC)IupGetCallback(ih, "_IUPWIN_EDITOLDPROC_CB"); + CallWindowProc(oldProc, cbedit, WM_UNDO, 0, 0); + + value = winListGetValueAttrib(ih); + cb(ih, 0, (char*)value); + + ret = 1; + } + + PostMessage(cbedit, WM_CARET, 0, 0L); + break; + } + case WM_KEYUP: + case WM_LBUTTONDBLCLK: + case WM_MBUTTONDBLCLK: + case WM_RBUTTONDBLCLK: + case WM_LBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + case WM_MBUTTONUP: + case WM_RBUTTONUP: + case WM_LBUTTONUP: + PostMessage(cbedit, WM_CARET, 0, 0L); + break; + case WM_CARET: + winListCallCaretCb(ih, cbedit); + break; + } + + if (ret) /* if abort processing, then the result is 0 */ + { + *result = 0; + return 1; + } + else + { + if (msg==WM_KEYDOWN) + return 0; + else + return iupwinBaseProc(ih, msg, wp, lp, result); + } +} + +static LRESULT CALLBACK winListEditWinProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +{ + int ret = 0; + LRESULT result = 0; + WNDPROC oldProc; + Ihandle *ih; + + ih = iupwinHandleGet(hwnd); + if (!ih) + return DefWindowProc(hwnd, msg, wp, lp); /* should never happen */ + + /* retrieve the control previous procedure for subclassing */ + oldProc = (WNDPROC)IupGetCallback(ih, "_IUPWIN_EDITOLDPROC_CB"); + + ret = winListEditProc(ih, hwnd, msg, wp, lp, &result); + + if (ret) + return result; + else + return CallWindowProc(oldProc, hwnd, msg, wp, lp); +} + +static int winListComboListProc(Ihandle* ih, HWND cblist, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + (void)cblist; + + switch (msg) + { + case WM_LBUTTONDBLCLK: + case WM_MBUTTONDBLCLK: + case WM_RBUTTONDBLCLK: + case WM_LBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + if (iupwinButtonDown(ih, msg, wp, lp)==-1) + { + *result = 0; + return 1; + } + break; + case WM_MBUTTONUP: + case WM_RBUTTONUP: + case WM_LBUTTONUP: + if (iupwinButtonUp(ih, msg, wp, lp)==-1) + { + *result = 0; + return 1; + } + break; + case WM_MOUSEMOVE: + iupwinMouseMove(ih, msg, wp, lp); + iupwinBaseProc(ih, msg, wp, lp, result); /* to process ENTER/LEAVE */ + break; + case WM_MOUSELEAVE: + iupwinBaseProc(ih, msg, wp, lp, result); /* to process ENTER/LEAVE */ + break; + } + + return 0; +} + +static LRESULT CALLBACK winListComboListWinProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +{ + int ret = 0; + LRESULT result = 0; + WNDPROC oldProc; + Ihandle *ih; + + ih = iupwinHandleGet(hwnd); + if (!ih) + return DefWindowProc(hwnd, msg, wp, lp); /* should never happen */ + + /* retrieve the control previous procedure for subclassing */ + oldProc = (WNDPROC)IupGetCallback(ih, "_IUPWIN_LISTOLDPROC_CB"); + + ret = winListComboListProc(ih, hwnd, msg, wp, lp, &result); + + if (ret) + return result; + else + return CallWindowProc(oldProc, hwnd, msg, wp, lp); +} + +static int winListProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + if (!ih->data->is_dropdown && !ih->data->has_editbox) + { + switch (msg) + { + case WM_LBUTTONDBLCLK: + case WM_MBUTTONDBLCLK: + case WM_RBUTTONDBLCLK: + case WM_LBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + if (iupwinButtonDown(ih, msg, wp, lp)==-1) + { + *result = 0; + return 1; + } + break; + case WM_MBUTTONUP: + case WM_RBUTTONUP: + case WM_LBUTTONUP: + if (iupwinButtonUp(ih, msg, wp, lp)==-1) + { + *result = 0; + return 1; + } + break; + case WM_MOUSEMOVE: + iupwinMouseMove(ih, msg, wp, lp); + break; + } + } + + switch (msg) + { + case WM_CHAR: + if (GetKeyState(VK_CONTROL) & 0x8000) + { + /* avoid item search when Ctrl is pressed */ + *result = 0; + return 1; + } + case WM_SETFOCUS: + case WM_KILLFOCUS: + case WM_MOUSELEAVE: + case WM_MOUSEMOVE: + if (ih->data->has_editbox) + return 0; /* do not call base procedure to avoid duplicate messages */ + break; + } + + return iupwinBaseProc(ih, msg, wp, lp, result); +} + + +/*********************************************************************************/ + + +static void winListLayoutUpdateMethod(Ihandle *ih) +{ + if (ih->data->is_dropdown) + { + /* Must add the dropdown area, or it will not be visible */ + RECT rect; + int charheight, calc_h, win_h, win_w, voptions; + + voptions = iupAttribGetInt(ih, "VISIBLE_ITEMS"); + if (voptions <= 0) + voptions = 1; + + iupdrvFontGetCharSize(ih, NULL, &charheight); + calc_h = ih->currentheight + voptions*charheight; + + SendMessage(ih->handle, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&rect); + win_h = rect.bottom-rect.top; + win_w = rect.right-rect.left; + + if (ih->currentwidth != win_w || calc_h != win_h) + SetWindowPos(ih->handle, HWND_TOP, ih->x, ih->y, ih->currentwidth, calc_h, + SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOOWNERZORDER); + else + SetWindowPos(ih->handle, HWND_TOP, ih->x, ih->y, 0, 0, + SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOOWNERZORDER); + } + else + iupdrvBaseLayoutUpdateMethod(ih); +} + +static int winListMapMethod(Ihandle* ih) +{ + char* class_name; + DWORD dwStyle = WS_CHILD, + dwExStyle = WS_EX_CLIENTEDGE; + + if (!ih->parent) + return IUP_ERROR; + + if (ih->data->is_dropdown || ih->data->has_editbox) + { + class_name = "COMBOBOX"; + + dwStyle |= CBS_NOINTEGRALHEIGHT; + + if (ih->data->is_dropdown) + dwStyle |= WS_VSCROLL|WS_HSCROLL; + else if (ih->data->sb) + { + dwStyle |= WS_VSCROLL|WS_HSCROLL; + + if (!iupAttribGetBoolean(ih, "AUTOHIDE")) + dwStyle |= CBS_DISABLENOSCROLL; + } + + if (ih->data->has_editbox) + { + dwStyle |= CBS_AUTOHSCROLL; + + if (ih->data->is_dropdown) + dwStyle |= CBS_DROPDOWN; /* hidden-list+edit */ + else + dwStyle |= CBS_SIMPLE; /* visible-list+edit */ + } + else + dwStyle |= CBS_DROPDOWNLIST; /* hidden-list */ + + if (iupAttribGetBoolean(ih, "SORT")) + dwStyle |= CBS_SORT; + } + else + { + class_name = "LISTBOX"; + + dwStyle |= LBS_NOINTEGRALHEIGHT|LBS_NOTIFY; + + if (ih->data->is_multiple) + dwStyle |= LBS_EXTENDEDSEL; + + if (ih->data->sb) + { + dwStyle |= WS_VSCROLL|WS_HSCROLL; + + if (!iupAttribGetBoolean(ih, "AUTOHIDE")) + dwStyle |= LBS_DISABLENOSCROLL; + } + + if (iupAttribGetBoolean(ih, "SORT")) + dwStyle |= LBS_SORT; + } + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + dwStyle |= WS_TABSTOP; + + if (!iupwinCreateWindowEx(ih, class_name, dwExStyle, dwStyle)) + return IUP_ERROR; + + /* Custom Procedure */ + IupSetCallback(ih, "_IUPWIN_CTRLPROC_CB", (Icallback)winListProc); + + /* Process background color */ + IupSetCallback(ih, "_IUPWIN_CTLCOLOR_CB", (Icallback)winListCtlColor); + + /* Process WM_COMMAND */ + IupSetCallback(ih, "_IUPWIN_COMMAND_CB", (Icallback)winListWmCommand); + + if (ih->data->is_dropdown || ih->data->has_editbox) + { + COMBOBOXINFO boxinfo; + + ZeroMemory(&boxinfo, sizeof(COMBOBOXINFO)); + boxinfo.cbSize = sizeof(COMBOBOXINFO); + + GetComboBoxInfo(ih->handle, &boxinfo); + + iupwinHandleAdd(ih, boxinfo.hwndList); + iupAttribSetStr(ih, "_IUPWIN_LISTBOX", (char*)boxinfo.hwndList); + + /* subclass the list box. */ + IupSetCallback(ih, "_IUPWIN_LISTOLDPROC_CB", (Icallback)GetWindowLongPtr(boxinfo.hwndList, GWLP_WNDPROC)); + SetWindowLongPtr(boxinfo.hwndList, GWLP_WNDPROC, (LONG_PTR)winListComboListWinProc); + + if (ih->data->has_editbox) + { + iupwinHandleAdd(ih, boxinfo.hwndItem); + iupAttribSetStr(ih, "_IUPWIN_EDITBOX", (char*)boxinfo.hwndItem); + + /* subclass the edit box. */ + IupSetCallback(ih, "_IUPWIN_EDITOLDPROC_CB", (Icallback)GetWindowLongPtr(boxinfo.hwndItem, GWLP_WNDPROC)); + SetWindowLongPtr(boxinfo.hwndItem, GWLP_WNDPROC, (LONG_PTR)winListEditWinProc); + + /* set defaults */ + SendMessage(ih->handle, CB_LIMITTEXT, 0, 0L); + } + } + + /* configure for DRAG&DROP */ + if (IupGetCallback(ih, "DROPFILES_CB")) + iupAttribSetStr(ih, "DRAGDROP", "YES"); + + IupSetCallback(ih, "_IUP_XY2POS_CB", (Icallback)winListConvertXYToPos); + + iupListSetInitialItems(ih); + + return IUP_NOERROR; +} + +void iupdrvListInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winListMapMethod; + ic->LayoutUpdate = winListLayoutUpdateMethod; + + /* Driver Dependent Attribute functions */ + + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, winListSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "TXTBGCOLOR", IUPAF_NOT_MAPPED); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "TXTFGCOLOR", IUPAF_NOT_MAPPED); + + /* IupList only */ + iupClassRegisterAttributeId(ic, "IDVALUE", winListGetIdValueAttrib, iupListSetIdValueAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE", winListGetValueAttrib, winListSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWDROPDOWN", NULL, winListSetShowDropdownAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TOPITEM", NULL, winListSetTopItemAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VISIBLE_ITEMS", NULL, NULL, IUPAF_SAMEASSYSTEM, "5", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "DROPEXPAND", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DRAGDROP", NULL, iupwinSetDragDropAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPACING", iupListGetSpacingAttrib, winListSetSpacingAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + + iupClassRegisterAttribute(ic, "PADDING", iupListGetPaddingAttrib, winListSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "SELECTEDTEXT", winListGetSelectedTextAttrib, winListSetSelectedTextAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTION", winListGetSelectionAttrib, winListSetSelectionAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTIONPOS", winListGetSelectionPosAttrib, winListSetSelectionPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARET", winListGetCaretAttrib, winListSetCaretAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARETPOS", winListGetCaretPosAttrib, winListSetCaretPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "INSERT", NULL, winListSetInsertAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "APPEND", NULL, winListSetAppendAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "READONLY", winListGetReadOnlyAttrib, winListSetReadOnlyAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "NC", iupListGetNCAttrib, winListSetNCAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "CLIPBOARD", NULL, winListSetClipboardAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTO", NULL, winListSetScrollToAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTOPOS", NULL, winListSetScrollToPosAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "CUEBANNER", NULL, winListSetCueBannerAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FILTER", NULL, winListSetFilterAttrib, NULL, NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/win/iupwin_loop.c b/iup/src/win/iupwin_loop.c new file mode 100755 index 0000000..7c5dbe7 --- /dev/null +++ b/iup/src/win/iupwin_loop.c @@ -0,0 +1,135 @@ +/** \file + * \brief Windows Message Loop + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" + + +static IFidle win_idle_cb = NULL; +static int win_main_loop = 0; + + +void iupdrvSetIdleFunction(Icallback f) +{ + win_idle_cb = (IFidle)f; +} + +void IupExitLoop(void) +{ + PostQuitMessage(0); +} + +static int winLoopProcessMessage(MSG* msg) +{ + if (msg->message == WM_QUIT) /* IUP_CLOSE returned in a callback or IupHide in a popup dialog or all dialogs closed */ + return IUP_CLOSE; + else + { + TranslateMessage(msg); + DispatchMessage(msg); + return IUP_DEFAULT; + } +} + +int IupMainLoopLevel(void) +{ + return win_main_loop; +} + +int IupMainLoop(void) +{ + MSG msg; + int ret; + + win_main_loop++; + + do + { + if (win_idle_cb) + { + ret = 1; + if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) + { + if (winLoopProcessMessage(&msg) == IUP_CLOSE) + { + win_main_loop--; + return IUP_CLOSE; + } + } + else + { + int ret = win_idle_cb(); + if (ret == IUP_CLOSE) + { + win_idle_cb = NULL; + win_main_loop--; + return IUP_CLOSE; + } + if (ret == IUP_IGNORE) + win_idle_cb = NULL; + } + } + else + { + ret = GetMessage(&msg, NULL, 0, 0); + if (ret == -1) /* error */ + { + win_main_loop--; + return IUP_ERROR; + } + if (ret == 0 || /* WM_QUIT */ + winLoopProcessMessage(&msg) == IUP_CLOSE) /* ret != 0 */ + { + win_main_loop--; + return IUP_NOERROR; + } + } + } while (ret); + + win_main_loop--; + return IUP_NOERROR; +} + +int IupLoopStep(void) +{ + MSG msg; + if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) + return winLoopProcessMessage(&msg); + + return IUP_DEFAULT; +} + +void IupFlush(void) +{ + int post_quit = 0; + MSG msg; + + while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) + { + if (winLoopProcessMessage(&msg) == IUP_CLOSE) + { + post_quit = 1; + break; + } + } + + /* re post the quit message if still inside MainLoop */ + if (post_quit && win_main_loop>0) + PostQuitMessage(0); +} diff --git a/iup/src/win/iupwin_menu.c b/iup/src/win/iupwin_menu.c new file mode 100755 index 0000000..74a8b52 --- /dev/null +++ b/iup/src/win/iupwin_menu.c @@ -0,0 +1,667 @@ +/** \file + * \brief Menu Resources + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_dialog.h" +#include "iup_str.h" +#include "iup_image.h" +#include "iup_dlglist.h" +#include "iup_focus.h" +#include "iup_menu.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_brush.h" + + +Ihandle* iupwinMenuGetHandle(HMENU hMenu) +{ + MENUINFO menuinfo; + menuinfo.cbSize = sizeof(MENUINFO); + menuinfo.fMask = MIM_MENUDATA; + if (GetMenuInfo(hMenu, &menuinfo)) + return (Ihandle*)menuinfo.dwMenuData; + else + return NULL; +} + +Ihandle* iupwinMenuGetItemHandle(HMENU hMenu, int menuId) +{ + MENUITEMINFO menuiteminfo; + menuiteminfo.cbSize = sizeof(MENUITEMINFO); + menuiteminfo.fMask = MIIM_DATA; + + if (GetMenuItemInfo(hMenu, menuId, FALSE, &menuiteminfo)) + return (Ihandle*)menuiteminfo.dwItemData; + else + return NULL; +} + +int iupdrvMenuGetMenuBarSize(Ihandle* ih) +{ + (void)ih; + return GetSystemMetrics(SM_CYMENU); +} + +static void winMenuUpdateBar(Ihandle* ih) +{ + if (iupMenuIsMenuBar(ih) && ih->parent->handle) + DrawMenuBar(ih->parent->handle); + else if (ih->parent) + { + ih = ih->parent; /* check also for children of a menu bar */ + if (iupMenuIsMenuBar(ih) && ih->parent->handle) + DrawMenuBar(ih->parent->handle); + } +} + +static void winMenuGetLastPos(Ihandle* ih, int *last_pos, int *pos) +{ + Ihandle* child; + *last_pos=0; + *pos=0; + for (child=ih->parent->firstchild; child; child=child->brother) + { + if (child == ih) + *pos = *last_pos; + (*last_pos)++; + } +} + +static void winItemCheckToggle(Ihandle* ih) +{ + if (iupAttribGetBoolean(ih->parent, "RADIO")) + { + int last_pos, pos; + winMenuGetLastPos(ih, &last_pos, &pos); + CheckMenuRadioItem((HMENU)ih->handle, 0, last_pos, pos, MF_BYPOSITION); + + winMenuUpdateBar(ih); + } + else if (iupAttribGetBoolean(ih, "AUTOTOGGLE")) + { + if (GetMenuState((HMENU)ih->handle, (UINT)ih->serial, MF_BYCOMMAND) & MF_CHECKED) + CheckMenuItem((HMENU)ih->handle, (UINT)ih->serial, MF_UNCHECKED|MF_BYCOMMAND); + else + CheckMenuItem((HMENU)ih->handle, (UINT)ih->serial, MF_CHECKED|MF_BYCOMMAND); + + winMenuUpdateBar(ih); + } +} + +typedef struct _IchildId +{ + int id, menuid; + Ihandle* child; +} IchildId; + +void iupwinMenuDialogProc(Ihandle* ih_dialog, UINT msg, WPARAM wp, LPARAM lp) +{ + /* called only from winDialogBaseProc */ + + switch (msg) + { + case WM_INITMENUPOPUP: + { + HMENU hMenu = (HMENU)wp; + Ihandle *ih = iupwinMenuGetHandle(hMenu); + if (ih) + { + Icallback cb = (Icallback)IupGetCallback(ih, "OPEN_CB"); + if (!cb && ih->parent) cb = (Icallback)IupGetCallback(ih->parent, "OPEN_CB"); /* check also in the Submenu */ + if (cb) cb(ih); + } + break; + } + case WM_UNINITMENUPOPUP: + { + HMENU hMenu = (HMENU)wp; + Ihandle *ih = iupwinMenuGetHandle(hMenu); + if (ih) + { + Icallback cb = (Icallback)IupGetCallback(ih, "MENUCLOSE_CB"); + if (!cb && ih->parent) cb = (Icallback)IupGetCallback(ih->parent, "MENUCLOSE_CB"); /* check also in the Submenu */ + if (cb) cb(ih); + } + break; + } + case WM_MENUSELECT: + { + HMENU hMenu = (HMENU)lp; + Ihandle *ih; + + if (!lp) + break; + + if ((HIWORD(wp) & MF_POPUP) || (HIWORD(wp) & MF_SYSMENU)) /* drop-down ih or submenu. */ + { + UINT menuindex = LOWORD(wp); + HMENU hsubmenu = GetSubMenu(hMenu, menuindex); + ih = iupwinMenuGetHandle(hsubmenu); /* returns the handle of a IupMenu */ + if (ih) ih = ih->parent; /* gets the submenu */ + } + else /* ih item */ + { + UINT menuID = LOWORD(wp); + ih = iupwinMenuGetItemHandle(hMenu, menuID); + } + + if (ih) + { + Icallback cb = IupGetCallback(ih, "HIGHLIGHT_CB"); + if (cb) cb(ih); + } + break; + } + case WM_MENUCOMMAND: + { + int menuId = GetMenuItemID((HMENU)lp, (int)wp); + Icallback cb; + Ihandle* ih; + + if (menuId >= IUP_MDICHILD_START) + break; + + ih = iupwinMenuGetItemHandle((HMENU)lp, menuId); + if (!ih) + break; + + winItemCheckToggle(ih); + + cb = IupGetCallback(ih, "ACTION"); + if (cb && cb(ih) == IUP_CLOSE) + IupExitLoop(); + + break; + } + case WM_ENTERMENULOOP: + { + /* Simulate WM_KILLFOCUS when the menu interaction is started */ + Ihandle* lastfocus = (Ihandle*)iupAttribGet(ih_dialog, "_IUPWIN_LASTFOCUS"); + if (lastfocus) iupCallKillFocusCb(lastfocus); + break; + } + case WM_EXITMENULOOP: + { + /* Simulate WM_GETFOCUS when the menu interaction is stopped */ + Ihandle* lastfocus = (Ihandle*)iupAttribGet(ih_dialog, "_IUPWIN_LASTFOCUS"); + if (lastfocus) iupCallGetFocusCb(lastfocus); + break; + } + } +} + +int iupdrvMenuPopup(Ihandle* ih, int x, int y) +{ + HWND hWndActive = GetActiveWindow(); + int tray_menu = 0; + int menuId; + + if (!hWndActive) + { + /* search for a valid handle */ + Ihandle* dlg = iupDlgListFirst(); + do + { + if (dlg->handle) + { + hWndActive = dlg->handle; /* found a valid handle */ + + /* if not a "TRAY" dialog, keep searching, because TRAY is a special case */ + if (iupAttribGetBoolean(dlg, "TRAY")) + break; + } + dlg = iupDlgListNext(); + } while (dlg); + } + + /* Necessary to avoid tray dialogs to lock popup menus (they get sticky after the 1st time) */ + if (hWndActive) + { + Ihandle* dlg = iupwinHandleGet(hWndActive); + if (dlg && iupAttribGetBoolean(dlg, "TRAY")) + { + /* To display a context menu for a notification icon, + the current window must be the foreground window. */ + SetForegroundWindow(hWndActive); + tray_menu = 1; + } + } + + /* stop processing here. messages will not go to the message loop */ + menuId = TrackPopupMenu((HMENU)ih->handle, TPM_LEFTALIGN|TPM_RIGHTBUTTON|TPM_RETURNCMD, x, y, 0, hWndActive, NULL); + + if (tray_menu) + { + /* You must force a task switch to the application that + called TrackPopupMenu at some time in the near future. + This is done by posting a benign message to the window. */ + PostMessage(hWndActive, WM_NULL, 0, 0); + } + + if (menuId) + { + Icallback cb; + Ihandle* ih_item = iupwinMenuGetItemHandle((HMENU)ih->handle, menuId); + if (!ih_item) return IUP_NOERROR; + + winItemCheckToggle(ih_item); + + cb = IupGetCallback(ih_item, "ACTION"); + if (cb && cb(ih_item) == IUP_CLOSE) + IupExitLoop(); + } + + return IUP_NOERROR; +} + + +/*******************************************************************************************/ + + +static int winMenuSetBgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + /* must use IupGetAttribute to use inheritance */ + if (iupStrToRGB(value, &r, &g, &b)) + { + MENUINFO menuinfo; + menuinfo.cbSize = sizeof(MENUINFO); + menuinfo.fMask = MIM_BACKGROUND; + menuinfo.hbrBack = iupwinBrushGet(RGB(r,g,b)); + SetMenuInfo((HMENU)ih->handle, &menuinfo); + winMenuUpdateBar(ih); + } + return 1; +} + +static void winMenuChildUnMapMethod(Ihandle* ih) +{ + RemoveMenu((HMENU)ih->handle, (UINT)ih->serial, MF_BYCOMMAND); +} + +static int winMenuAddParentSubmenu(Ihandle* ih) +{ + int pos; + MENUITEMINFO menuiteminfo; + + pos = IupGetChildPos(ih->parent, ih); + ih->serial = iupMenuGetChildId(ih); + + menuiteminfo.cbSize = sizeof(MENUITEMINFO); + menuiteminfo.fMask = MIIM_ID|MIIM_DATA|MIIM_SUBMENU|MIIM_STRING; + menuiteminfo.dwTypeData = ""; /* must set or it will be not possible to update */ + menuiteminfo.cch = 0; + menuiteminfo.wID = (UINT)ih->serial; + menuiteminfo.dwItemData = (ULONG_PTR)ih; + menuiteminfo.hSubMenu = (HMENU)ih->firstchild->handle; + + if (!InsertMenuItem((HMENU)ih->parent->handle, pos, TRUE, &menuiteminfo)) + return IUP_ERROR; + + ih->handle = ih->parent->handle; /* gets the HMENU of the parent */ + + /* must update attributes since submenu is actually created after it is mapped */ + iupAttribUpdate(ih); + iupAttribUpdateFromParent(ih); + + winMenuUpdateBar(ih); + + return IUP_NOERROR; +} + +static int winMenuMapMethod(Ihandle* ih) +{ + MENUINFO menuinfo; + + if (iupMenuIsMenuBar(ih)) + { + /* top level menu used for MENU attribute in IupDialog (a menu bar) */ + + ih->handle = (InativeHandle*)CreateMenu(); + if (!ih->handle) + return IUP_ERROR; + + SetMenu(ih->parent->handle, (HMENU)ih->handle); + } + else + { + if (ih->parent) + { + /* parent is a submenu */ + + ih->handle = (InativeHandle*)CreatePopupMenu(); + if (!ih->handle) + return IUP_ERROR; + + if (winMenuAddParentSubmenu(ih->parent) == IUP_ERROR) + { + DestroyMenu((HMENU)ih->handle); + return IUP_ERROR; + } + } + else + { + /* top level menu used for IupPopup */ + + ih->handle = (InativeHandle*)CreatePopupMenu(); + if (!ih->handle) + return IUP_ERROR; + + iupAttribSetStr(ih, "_IUPWIN_POPUP_MENU", "1"); + } + } + + menuinfo.cbSize = sizeof(MENUINFO); + menuinfo.fMask = MIM_MENUDATA; + menuinfo.dwMenuData = (ULONG_PTR)ih; + + if (!iupAttribGetInherit(ih, "_IUPWIN_POPUP_MENU")) /* check in the top level menu using inheritance */ + { + menuinfo.fMask |= MIM_STYLE; + menuinfo.dwStyle = MNS_NOTIFYBYPOS; + } + + SetMenuInfo((HMENU)ih->handle, &menuinfo); + + winMenuUpdateBar(ih); + + return IUP_NOERROR; +} + +static void winMenuUnMapMethod(Ihandle* ih) +{ + if (iupMenuIsMenuBar(ih)) + SetMenu(ih->parent->handle, NULL); + + DestroyMenu((HMENU)ih->handle); /* DestroyMenu is recursive */ +} + +void iupdrvMenuInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winMenuMapMethod; + ic->UnMap = winMenuUnMapMethod; + + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, winMenuSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "MENUBGCOLOR", IUPAF_DEFAULT); +} + + +/*******************************************************************************************/ + + +static int winItemSetImageAttrib(Ihandle* ih, const char* value) +{ + HBITMAP hBitmapUnchecked, hBitmapChecked; + char* impress; + + if (ih->handle == (InativeHandle*)-1) /* check if submenu is actually created */ + return 1; + + hBitmapUnchecked = iupImageGetImage(value, ih, 0); + + impress = iupAttribGet(ih, "IMPRESS"); + if (impress) + hBitmapChecked = iupImageGetImage(impress, ih, 0); + else + hBitmapChecked = hBitmapUnchecked; + + SetMenuItemBitmaps((HMENU)ih->handle, (UINT)ih->serial, MF_BYCOMMAND, hBitmapUnchecked, hBitmapChecked); + + winMenuUpdateBar(ih); + + return 1; +} + +static int winItemSetImpressAttrib(Ihandle* ih, const char* value) +{ + HBITMAP hBitmapUnchecked, hBitmapChecked; + + char *image = iupAttribGet(ih, "IMPRESS"); + hBitmapUnchecked = iupImageGetImage(image, ih, 0); + + if (value) + hBitmapChecked = iupImageGetImage(value, ih, 0); + else + hBitmapChecked = hBitmapUnchecked; + + SetMenuItemBitmaps((HMENU)ih->handle, (UINT)ih->serial, MF_BYCOMMAND, hBitmapUnchecked, hBitmapChecked); + + winMenuUpdateBar(ih); + + return 1; +} + +static int winItemSetTitleAttrib(Ihandle* ih, const char* value) +{ + char *str; + MENUITEMINFO menuiteminfo; + + if (ih->handle == (InativeHandle*)-1) /* check if submenu is actually created */ + return 1; + + if (!value) + { + str = " "; + value = str; + } + else + str = iupMenuProcessTitle(ih, value); + + menuiteminfo.cbSize = sizeof(MENUITEMINFO); + menuiteminfo.fMask = MIIM_TYPE; + menuiteminfo.fType = MFT_STRING; + menuiteminfo.dwTypeData = str; + menuiteminfo.cch = strlen(str); + + SetMenuItemInfo((HMENU)ih->handle, (UINT)ih->serial, FALSE, &menuiteminfo); + + if (str != value) free(str); + + winMenuUpdateBar(ih); + + return 1; +} + +static int winItemSetTitleImageAttrib(Ihandle* ih, const char* value) +{ + HBITMAP hBitmap; + MENUITEMINFO menuiteminfo; + + if (ih->handle == (InativeHandle*)-1) /* check if submenu is actually created */ + return 1; + + hBitmap = iupImageGetImage(value, ih, 0); + + menuiteminfo.cbSize = sizeof(MENUITEMINFO); + menuiteminfo.fMask = MIIM_BITMAP; + menuiteminfo.hbmpItem = hBitmap; + + SetMenuItemInfo((HMENU)ih->handle, (UINT)ih->serial, FALSE, &menuiteminfo); + + winMenuUpdateBar(ih); + + return 1; +} + +static int winItemSetActiveAttrib(Ihandle* ih, const char* value) +{ + if (ih->handle == (InativeHandle*)-1) /* check if submenu is actually created */ + return 1; + + if (iupStrBoolean(value)) + EnableMenuItem((HMENU)ih->handle, (UINT)ih->serial, MF_ENABLED|MF_BYCOMMAND); + else + EnableMenuItem((HMENU)ih->handle, (UINT)ih->serial, MF_GRAYED|MF_BYCOMMAND); + + winMenuUpdateBar(ih); + + return 0; +} + +static char* winItemGetActiveAttrib(Ihandle* ih) +{ + if (ih->handle == (InativeHandle*)-1) /* check if submenu is actually created */ + return NULL; + + if (GetMenuState((HMENU)ih->handle, (UINT)ih->serial, MF_BYCOMMAND) & MF_GRAYED) + return "NO"; + else + return "YES"; +} + +static int winItemSetValueAttrib(Ihandle* ih, const char* value) +{ + if (iupAttribGetBoolean(ih->parent, "RADIO")) + { + int last_pos, pos; + winMenuGetLastPos(ih, &last_pos, &pos); + CheckMenuRadioItem((HMENU)ih->handle, 0, last_pos, pos, MF_BYPOSITION); + } + else + { + if (iupStrBoolean(value)) + CheckMenuItem((HMENU)ih->handle, (UINT)ih->serial, MF_CHECKED|MF_BYCOMMAND); + else + CheckMenuItem((HMENU)ih->handle, (UINT)ih->serial, MF_UNCHECKED|MF_BYCOMMAND); + } + + winMenuUpdateBar(ih); + + return 0; +} + +static char* winItemGetValueAttrib(Ihandle* ih) +{ + if (GetMenuState((HMENU)ih->handle, (UINT)ih->serial, MF_BYCOMMAND) & MF_CHECKED) + return "ON"; + else + return "OFF"; +} + +static int winItemMapMethod(Ihandle* ih) +{ + int pos; + MENUITEMINFO menuiteminfo; + + if (!ih->parent || !IsMenu((HMENU)ih->parent->handle)) + return IUP_ERROR; + + pos = IupGetChildPos(ih->parent, ih); + ih->serial = iupMenuGetChildId(ih); + + menuiteminfo.cbSize = sizeof(MENUITEMINFO); + menuiteminfo.fMask = MIIM_ID|MIIM_DATA|MIIM_STRING; + menuiteminfo.dwTypeData = ""; /* must set or it will be not possible to update */ + menuiteminfo.cch = 0; + menuiteminfo.wID = (UINT)ih->serial; + menuiteminfo.dwItemData = (ULONG_PTR)ih; + + if (!InsertMenuItem((HMENU)ih->parent->handle, pos, TRUE, &menuiteminfo)) + return IUP_ERROR; + + ih->handle = ih->parent->handle; /* gets the HMENU of the parent */ + winMenuUpdateBar(ih); + + return IUP_NOERROR; +} + +void iupdrvItemInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winItemMapMethod; + ic->UnMap = winMenuChildUnMapMethod; + + /* Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", winItemGetActiveAttrib, winItemSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "MENUBGCOLOR", IUPAF_DEFAULT); /* used by IupImage */ + + /* IupItem only */ + iupClassRegisterAttribute(ic, "VALUE", winItemGetValueAttrib, winItemSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TITLE", NULL, winItemSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TITLEIMAGE", NULL, winItemSetTitleImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, winItemSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMPRESS", NULL, winItemSetImpressAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* Used by iupdrvImageCreateImage */ + /* necessary because it uses an old HBITMAP solution */ + iupClassRegisterAttribute(ic, "FLAT_ALPHA", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); +} + + +/*******************************************************************************************/ + + +static int winSubmenuMapMethod(Ihandle* ih) +{ + if (!ih->parent || !IsMenu((HMENU)ih->parent->handle)) + return IUP_ERROR; + + return iupBaseTypeVoidMapMethod(ih); +} + +void iupdrvSubmenuInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winSubmenuMapMethod; + + /* IupSubmenu only */ + iupClassRegisterAttribute(ic, "ACTIVE", winItemGetActiveAttrib, winItemSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "TITLE", NULL, winItemSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, winItemSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "MENUBGCOLOR", IUPAF_DEFAULT); /* used by IupImage */ + + /* Used by iupdrvImageCreateImage */ + /* necessary because it uses an old HBITMAP solution */ + iupClassRegisterAttribute(ic, "FLAT_ALPHA", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); +} + + +/*******************************************************************************************/ + + +static int winSeparatorMapMethod(Ihandle* ih) +{ + int pos; + MENUITEMINFO menuiteminfo; + + if (!ih->parent || !IsMenu((HMENU)ih->parent->handle)) + return IUP_ERROR; + + pos = IupGetChildPos(ih->parent, ih); + ih->serial = iupMenuGetChildId(ih); + + menuiteminfo.cbSize = sizeof(MENUITEMINFO); + menuiteminfo.fMask = MIIM_FTYPE|MIIM_ID|MIIM_DATA; + menuiteminfo.fType = MFT_SEPARATOR; + menuiteminfo.wID = (UINT)ih->serial; + menuiteminfo.dwItemData = (ULONG_PTR)ih; + + if (!InsertMenuItem((HMENU)ih->parent->handle, pos, TRUE, &menuiteminfo)) + return IUP_ERROR; + + ih->handle = ih->parent->handle; /* gets the HMENU of the parent */ + winMenuUpdateBar(ih); + + return IUP_NOERROR; +} + +void iupdrvSeparatorInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winSeparatorMapMethod; + ic->UnMap = winMenuChildUnMapMethod; +} diff --git a/iup/src/win/iupwin_messagedlg.c b/iup/src/win/iupwin_messagedlg.c new file mode 100755 index 0000000..63159aa --- /dev/null +++ b/iup/src/win/iupwin_messagedlg.c @@ -0,0 +1,105 @@ +/** \file + * \brief Windows IupMessageDlg pre-defined dialog + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_dialog.h" + + +static void winMessageDlgHelpCallback(HELPINFO* HelpInfo) +{ + Ihandle* ih = (Ihandle*)HelpInfo->dwContextId; + Icallback cb = (Icallback)IupGetCallback(ih, "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + { + if (iupStrEqualNoCase(iupAttribGetStr(ih, "BUTTONS"), "OK")) /* only one button */ + EndDialog((HWND)HelpInfo->hItemHandle, IDOK); + else + EndDialog((HWND)HelpInfo->hItemHandle, IDCANCEL); + } +} + +static int winMessageDlgPopup(Ihandle* ih, int x, int y) +{ + InativeHandle* parent = iupDialogGetNativeParent(ih); + MSGBOXPARAMS MsgBoxParams; + int result, num_but = 2; + DWORD dwStyle = MB_TASKMODAL; + char *icon, *buttons; + (void)x; + (void)y; + + if (!parent) + parent = GetActiveWindow(); + + icon = iupAttribGetStr(ih, "DIALOGTYPE"); + if (iupStrEqualNoCase(icon, "ERROR")) + dwStyle |= MB_ICONERROR; + else if (iupStrEqualNoCase(icon, "WARNING")) + dwStyle |= MB_ICONWARNING; + else if (iupStrEqualNoCase(icon, "INFORMATION")) + dwStyle |= MB_ICONINFORMATION; + else if (iupStrEqualNoCase(icon, "QUESTION")) + dwStyle |= MB_ICONQUESTION; + + buttons = iupAttribGetStr(ih, "BUTTONS"); + if (iupStrEqualNoCase(buttons, "OKCANCEL")) + dwStyle |= MB_OKCANCEL; + else if (iupStrEqualNoCase(buttons, "YESNO")) + dwStyle |= MB_YESNO; + else + { + dwStyle |= MB_OK; + num_but = 1; + } + + if (IupGetCallback(ih, "HELP_CB")) + dwStyle |= MB_HELP; + + if (num_but == 2 && iupAttribGetInt(ih, "BUTTONDEFAULT") == 2) + dwStyle |= MB_DEFBUTTON2; + else + dwStyle |= MB_DEFBUTTON1; + + MsgBoxParams.cbSize = sizeof(MSGBOXPARAMS); + MsgBoxParams.hwndOwner = parent; + MsgBoxParams.hInstance = NULL; + MsgBoxParams.lpszText = iupAttribGet(ih, "VALUE"); + MsgBoxParams.lpszCaption = iupAttribGet(ih, "TITLE"); + MsgBoxParams.dwStyle = dwStyle; + MsgBoxParams.lpszIcon = NULL; + MsgBoxParams.dwContextHelpId = (DWORD_PTR)ih; + MsgBoxParams.lpfnMsgBoxCallback = (MSGBOXCALLBACK)winMessageDlgHelpCallback; + MsgBoxParams.dwLanguageId = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT); + + result = MessageBoxIndirect(&MsgBoxParams); + if (result == 0) + { + iupAttribSetStr(ih, "BUTTONRESPONSE", NULL); + return IUP_ERROR; + } + + if (result == IDNO || result == IDCANCEL) + iupAttribSetStr(ih, "BUTTONRESPONSE", "2"); + else + iupAttribSetStr(ih, "BUTTONRESPONSE", "1"); + + return IUP_NOERROR; +} + +void iupdrvMessageDlgInitClass(Iclass* ic) +{ + ic->DlgPopup = winMessageDlgPopup; +} + +/* +In Windows it will always sound a beep. The beep is different for each dialog type. +*/ diff --git a/iup/src/win/iupwin_open.c b/iup/src/win/iupwin_open.c new file mode 100755 index 0000000..7357cde --- /dev/null +++ b/iup/src/win/iupwin_open.c @@ -0,0 +1,124 @@ +/** \file + * \brief Windows Driver Core + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_globalattrib.h" + +#include "iupwin_drv.h" +#include "iupwin_info.h" +#include "iupwin_handle.h" +#include "iupwin_brush.h" +#include "iupwin_draw.h" + + +HINSTANCE iupwin_hinstance = 0; +int iupwin_comctl32ver6 = 0; + +void* iupdrvGetDisplay(void) +{ + return NULL; +} + +void iupwinShowLastError(void) +{ + int error = GetLastError(); + if (error) + { + LPVOID lpMsgBuf; + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, error, 0, (LPTSTR)&lpMsgBuf, 0, NULL); + MessageBox(NULL, (LPCTSTR)lpMsgBuf, "GetLastError:", MB_OK|MB_ICONERROR); + LocalFree(lpMsgBuf); + } +} + +static void winSetGlobalColor(int index, const char* name) +{ + COLORREF color = GetSysColor(index); + iupGlobalSetDefaultColorAttrib(name, (int)GetRValue(color), + (int)GetGValue(color), + (int)GetBValue(color)); +} + +int iupdrvOpen(int *argc, char ***argv) +{ + (void)argc; /* unused in the Windows driver */ + (void)argv; + + if (iupwinGetSystemMajorVersion() < 5) /* older than Windows 2000 */ + return IUP_ERROR; + + IupSetGlobal("DRIVER", "Win32"); + + { +#ifdef __MINGW32__ + /* MingW fails to create windows if using a console and HINSTANCE is not from the console */ + HWND win = GetConsoleWindow(); + if (win) + iupwin_hinstance = (HINSTANCE)GetWindowLongPtr(win, GWLP_HINSTANCE); + else +#endif + iupwin_hinstance = GetModuleHandle(NULL); + IupSetGlobal("HINSTANCE", (char*)iupwin_hinstance); + } + + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + { + INITCOMMONCONTROLSEX InitCtrls; + InitCtrls.dwSize = sizeof(INITCOMMONCONTROLSEX); + InitCtrls.dwICC = ICC_WIN95_CLASSES; /* trackbar, tooltips, updown, tab, progress */ + InitCommonControlsEx(&InitCtrls); + } + + iupwin_comctl32ver6 = (iupwinGetComCtl32Version() >= 0x060000)? 1: 0; + if (iupwin_comctl32ver6 && !iupwinIsAppThemed()) /* When the user seleted the Windows Classic theme */ + iupwin_comctl32ver6 = 0; + + IupSetGlobal("SYSTEMLANGUAGE", iupwinGetSystemLanguage()); + + /* default colors */ + winSetGlobalColor(COLOR_BTNFACE, "DLGBGCOLOR"); + winSetGlobalColor(COLOR_BTNTEXT, "DLGFGCOLOR"); + winSetGlobalColor(COLOR_WINDOW, "TXTBGCOLOR"); + winSetGlobalColor(COLOR_WINDOWTEXT, "TXTFGCOLOR"); + winSetGlobalColor(COLOR_MENU, "MENUBGCOLOR"); + winSetGlobalColor(COLOR_MENUTEXT, "MENUFGCOLOR"); + + iupwinHandleInit(); + iupwinBrushInit(); + iupwinDrawInit(); + +#ifdef __WATCOMC__ + { + /* this is used to force Watcom to link the winmain.c module. */ + void iupwinMainDummy(void); + iupwinMainDummy(); + } +#endif + + return IUP_NOERROR; +} + +void iupdrvClose(void) +{ + iupwinHandleFinish(); + iupwinBrushFinish(); + + CoUninitialize(); +} diff --git a/iup/src/win/iupwin_progressbar.c b/iup/src/win/iupwin_progressbar.c new file mode 100755 index 0000000..9038d79 --- /dev/null +++ b/iup/src/win/iupwin_progressbar.c @@ -0,0 +1,164 @@ +/** \file + * \brief Progress bar Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_progressbar.h" +#include "iup_drv.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" + + +#ifndef PBS_MARQUEE /* it is defined only when _WIN32_WINNT >= 0x0501 */ +#define PBS_MARQUEE 0x08 +#define PBM_SETMARQUEE (WM_USER+10) +#endif + +#define IUP_PB_MAX 32000 + + +static int winProgressBarSetMarqueeAttrib(Ihandle* ih, const char* value) +{ + /* MARQUEE only works when using XP Styles */ + if (!iupwin_comctl32ver6) + return 0; + + if (iupStrBoolean(value)) + SendMessage(ih->handle, PBM_SETMARQUEE, TRUE, 100); + else + SendMessage(ih->handle, PBM_SETMARQUEE, FALSE, 0); + + return 1; +} + +static int winProgressBarSetValueAttrib(Ihandle* ih, const char* value) +{ + if (!value) + ih->data->value = 0; + else + ih->data->value = atof(value); + + iProgressBarCropValue(ih); + + /* Shows when the marquee style is not set */ + if (!ih->data->marquee) + { + double factor = (ih->data->value - ih->data->vmin) / (ih->data->vmax - ih->data->vmin); + int val = (int)(IUP_PB_MAX * factor); + SendMessage(ih->handle, PBM_SETPOS, (WPARAM)val, 0); + } + + return 0; +} + +static int winProgressBarSetBgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + + /* Only works when using Classic style */ + if (iupwin_comctl32ver6) + return 0; + + if (iupStrToRGB(value, &r, &g, &b)) + { + COLORREF color = RGB(r,g,b); + SendMessage(ih->handle, PBM_SETBKCOLOR, 0, (LPARAM)color); + } + else + SendMessage(ih->handle, PBM_SETBKCOLOR, 0, (LPARAM)CLR_DEFAULT); + return 1; +} + +static int winProgressBarSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + + /* Only works when using Classic style */ + if (iupwin_comctl32ver6) + return 0; + + if (iupStrToRGB(value, &r, &g, &b)) + { + COLORREF color = RGB(r,g,b); + SendMessage(ih->handle, PBM_SETBARCOLOR, 0, (LPARAM)color); + } + else + SendMessage(ih->handle, PBM_SETBARCOLOR, 0, (LPARAM)CLR_DEFAULT); + return 1; +} + +static int winProgressBarMapMethod(Ihandle* ih) +{ + DWORD dwStyle = WS_CHILD; + + if (!ih->parent) + return IUP_ERROR; + + if (iupStrEqualNoCase(iupAttribGetStr(ih, "ORIENTATION"), "VERTICAL")) + { + dwStyle |= PBS_VERTICAL; + + if (ih->currentheight < ih->currentwidth) + { + int tmp = ih->currentheight; + ih->currentheight = ih->currentwidth; + ih->currentwidth = tmp; + } + } + + if (!iupwin_comctl32ver6 && !iupAttribGetBoolean(ih, "DASHED")) + dwStyle |= PBS_SMOOTH; + + if (iupwin_comctl32ver6 && iupAttribGetBoolean(ih, "MARQUEE")) + { + dwStyle |= PBS_MARQUEE; + ih->data->marquee = 1; + } + + if (!iupwinCreateWindowEx(ih, PROGRESS_CLASS, 0, dwStyle)) + return IUP_ERROR; + + /* configure the native range */ + SendMessage(ih->handle, PBM_SETRANGE, 0, MAKELPARAM(0, IUP_PB_MAX)); + + return IUP_NOERROR; +} + +void iupdrvProgressBarInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winProgressBarMapMethod; + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, winProgressBarSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + /* Only works when using Classic style */ + if (iupwin_comctl32ver6) + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, winProgressBarSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_DEFAULT); + else + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED); + + /* IupProgressBar only */ + iupClassRegisterAttribute(ic, "VALUE", iProgressBarGetValueAttrib, winProgressBarSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ORIENTATION", NULL, NULL, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MARQUEE", NULL, winProgressBarSetMarqueeAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DASHED", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/win/iupwin_tabs.c b/iup/src/win/iupwin_tabs.c new file mode 100755 index 0000000..682f451 --- /dev/null +++ b/iup/src/win/iupwin_tabs.c @@ -0,0 +1,680 @@ +/** \file +* \brief Tabs Control +* +* See Copyright Notice in "iup.h" +*/ + +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0501 +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_tabs.h" +#include "iup_image.h" +#include "iup_array.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_draw.h" +#include "iupwin_info.h" + + +int iupdrvTabsExtraDecor(Ihandle* ih) +{ + (void)ih; + return 0; +} + +int iupdrvTabsGetLineCountAttrib(Ihandle* ih) +{ + return (int)SendMessage(ih->handle, TCM_GETROWCOUNT, 0, 0); +} + +static HWND winTabsGetPageWindow(Ihandle* ih, int pos) +{ + TCITEM tie; + tie.mask = TCIF_PARAM; + SendMessage(ih->handle, TCM_GETITEM, pos, (LPARAM)&tie); + return (HWND)tie.lParam; +} + +void iupdrvTabsSetCurrentTab(Ihandle* ih, int pos) +{ + int prev_pos = SendMessage(ih->handle, TCM_GETCURSEL, 0, 0); + HWND tab_page = winTabsGetPageWindow(ih, prev_pos); + ShowWindow(tab_page, SW_HIDE); + + SendMessage(ih->handle, TCM_SETCURSEL, pos, 0); + + tab_page = winTabsGetPageWindow(ih, pos); + ShowWindow(tab_page, SW_SHOW); +} + +int iupdrvTabsGetCurrentTab(Ihandle* ih) +{ + return (int)SendMessage(ih->handle, TCM_GETCURSEL, 0, 0); +} + +static int winTabsGetImageIndex(Ihandle* ih, const char* name) +{ + HIMAGELIST image_list; + int count, i, bpp, ret; + Iarray* bmp_array; + HBITMAP *bmp_array_data, hMask=NULL; + HBITMAP bmp = iupImageGetImage(name, ih, 0); + if (!bmp) + return -1; + + /* the array is used to avoi adding the same bitmap twice */ + bmp_array = (Iarray*)iupAttribGet(ih, "_IUPWIN_BMPARRAY"); + if (!bmp_array) + { + /* create the array if does not exist */ + bmp_array = iupArrayCreate(50, sizeof(HBITMAP)); + iupAttribSetStr(ih, "_IUPWIN_BMPARRAY", (char*)bmp_array); + } + + bmp_array_data = iupArrayGetData(bmp_array); + + image_list = (HIMAGELIST)SendMessage(ih->handle, TCM_GETIMAGELIST, 0, 0); + if (!image_list) + { + int width, height; + UINT flags = ILC_COLOR32|ILC_MASK; + + /* must use this info, since image can be a driver image loaded from resources */ + iupdrvImageGetInfo(bmp, &width, &height, &bpp); + + /* create the image list if does not exist */ + image_list = ImageList_Create(width, height, flags, 0, 50); + SendMessage(ih->handle, TCM_SETIMAGELIST, 0, (LPARAM)image_list); + } + else + iupdrvImageGetInfo(bmp, NULL, NULL, &bpp); + + /* check if that bitmap is already added to the list, + but we can not compare with the actual bitmap at the list since it is a copy */ + count = ImageList_GetImageCount(image_list); + for (i=0; ihandle, TCM_GETITEMCOUNT, 0, 0); + tie.mask = TCIF_PARAM; + + for (pos=0; poshandle, TCM_GETITEM, pos, (LPARAM)&tie); + if (tab_page == (HWND)tie.lParam) + return pos; + } + + return -1; +} + +static void winTabsPlacePageWindows(Ihandle* ih, int w, int h) +{ + TCITEM tie; + int pos, num_tabs; + RECT rect; + + num_tabs = (int)SendMessage(ih->handle, TCM_GETITEMCOUNT, 0, 0); + tie.mask = TCIF_PARAM; + + /* Calculate the display rectangle, assuming the + tab control is the size of the client area. */ + SetRect(&rect, 0, 0, w, h); + SendMessage(ih->handle, TCM_ADJUSTRECT, FALSE, (LPARAM)&rect); + + for (pos=0; poshandle, TCM_GETITEM, pos, (LPARAM)&tie); + + SetWindowPos((HWND)tie.lParam, NULL, + rect.left, rect.top, + rect.right - rect.left, rect.bottom - rect.top, + SWP_NOACTIVATE|SWP_NOZORDER); + } +} + +static int winTabsUsingXPStyles(Ihandle* ih) +{ + return iupwin_comctl32ver6 && ih->data->type == ITABS_TOP; +} + +static void winTabsDrawPageBackground(Ihandle* ih, HDC hDC, RECT* rect) +{ + unsigned char r=0, g=0, b=0; + char* color = iupAttribGetInheritNativeParent(ih, "BGCOLOR"); + if (!color) color = iupAttribGetInheritNativeParent(ih, "BACKGROUND"); + if (!color) color = iupAttribGet(ih, "BACKGROUND"); + if (!color) color = IupGetGlobal("DLGBGCOLOR"); + iupStrToRGB(color, &r, &g, &b); + SetDCBrushColor(hDC, RGB(r,g,b)); + FillRect(hDC, rect, (HBRUSH)GetStockObject(DC_BRUSH)); +} + +static LRESULT CALLBACK winTabsPageWinProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) +{ + switch (msg) + { + case WM_ERASEBKGND: + { + RECT rect; + HDC hDC = (HDC)wp; + Ihandle* ih = iupwinHandleGet(hWnd); + GetClientRect(ih->handle, &rect); + winTabsDrawPageBackground(ih, hDC, &rect); + + /* return non zero value */ + return 1; + } + case WM_COMMAND: + case WM_CTLCOLORSCROLLBAR: + case WM_CTLCOLORBTN: + case WM_CTLCOLOREDIT: + case WM_CTLCOLORLISTBOX: + case WM_CTLCOLORSTATIC: + case WM_DRAWITEM: + case WM_HSCROLL: + case WM_NOTIFY: + case WM_VSCROLL: + /* Forward the container messages to its parent. */ + return SendMessage(GetParent(hWnd), msg, wp, lp); + } + + return DefWindowProc(hWnd, msg, wp, lp); +} + +static HWND winTabCreatePageWindow(Ihandle* ih) +{ + HWND hWnd; + DWORD dwStyle = WS_CHILD|WS_CLIPSIBLINGS, + dwExStyle = 0; + + if (iupAttribGetBoolean(IupGetDialog(ih), "COMPOSITED")) + dwExStyle |= WS_EX_COMPOSITED; + else + dwStyle |= WS_CLIPCHILDREN; + + hWnd = CreateWindowEx(dwExStyle, "IupTabsPage", NULL, dwStyle, + 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, + ih->handle, NULL, iupwin_hinstance, NULL); + + iupwinHandleAdd(ih, hWnd); + + return hWnd; +} + +/* ------------------------------------------------------------------------- */ +/* winTabs - Sets and Gets accessors */ +/* ------------------------------------------------------------------------- */ + +static int winTabsSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + + if (ih->handle) + SendMessage(ih->handle, TCM_SETPADDING, 0, MAKELPARAM(ih->data->horiz_padding, ih->data->vert_padding)); + + return 0; +} + +static int winTabsSetMultilineAttrib(Ihandle* ih, const char* value) +{ + if (ih->handle) /* allow to set only before mapping */ + return 0; + + if (iupStrBoolean(value)) + ih->data->is_multiline = 1; + else + { + if (ih->data->type == ITABS_BOTTOM || ih->data->type == ITABS_TOP) + ih->data->is_multiline = 0; + else + ih->data->is_multiline = 1; /* always true if left/right */ + } + + return 0; +} + +static char* winTabsGetMultilineAttrib(Ihandle* ih) +{ + if (ih->data->is_multiline) + return "YES"; + else + return "NO"; +} + +static int winTabsSetTabTypeAttrib(Ihandle* ih, const char* value) +{ + if (ih->handle) /* allow to set only before mapping */ + return 0; + + if(iupStrEqualNoCase(value, "BOTTOM")) + { + ih->data->is_multiline = 0; + ih->data->type = ITABS_BOTTOM; + ih->data->orientation = ITABS_HORIZONTAL; + } + else if(iupStrEqualNoCase(value, "LEFT")) + { + ih->data->type = ITABS_LEFT; + ih->data->orientation = ITABS_VERTICAL; + ih->data->is_multiline = 1; /* VERTICAL works only with MULTILINE */ + } + else if(iupStrEqualNoCase(value, "RIGHT")) + { + ih->data->is_multiline = 1; /* VERTICAL works only with MULTILINE */ + ih->data->type = ITABS_RIGHT; + ih->data->orientation = ITABS_VERTICAL; + } + else /* "TOP" */ + { + ih->data->is_multiline = 0; + ih->data->type = ITABS_TOP; + ih->data->orientation = ITABS_HORIZONTAL; + } + + return 0; +} + +static int winTabsSetTabTitleAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int pos; + if (value && iupStrToInt(name_id, &pos)==1) + { + TCITEM tie; + + tie.mask = TCIF_TEXT; + tie.pszText = (char*)value; + tie.cchTextMax = strlen(value); + + SendMessage(ih->handle, TCM_SETITEM, pos, (LPARAM)&tie); + } + return 1; +} + +static int winTabsSetTabImageAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int pos; + if (value && iupStrToInt(name_id, &pos)==1) + { + TCITEM tie; + + tie.mask = TCIF_IMAGE; + tie.iImage = winTabsGetImageIndex(ih, value); + + SendMessage(ih->handle, TCM_SETITEM, pos, (LPARAM)&tie); + } + return 1; +} + +static char* winTabsGetBgColorAttrib(Ihandle* ih) +{ + /* the most important use of this is to provide + the correct background for images */ + if (iupwin_comctl32ver6) + { + COLORREF cr; + if (iupwinDrawGetThemeTabsBgColor(ih->handle, &cr)) + { + char* str = iupStrGetMemory(20); + sprintf(str, "%d %d %d", (int)GetRValue(cr), (int)GetGValue(cr), (int)GetBValue(cr)); + return str; + } + } + + return IupGetGlobal("DLGBGCOLOR"); +} + + +/* ------------------------------------------------------------------------- */ +/* winTabs - Calls the user callback to change of tab */ +/* ------------------------------------------------------------------------- */ + +static int winTabsCtlColor(Ihandle* ih, HDC hdc, LRESULT *result) +{ + /* works only when NOT winTabsUsingXPStyles */ + unsigned char r, g, b; + char* color = iupBaseNativeParentGetBgColorAttrib(ih); + if (iupStrToRGB(color, &r, &g, &b)) + { + SetDCBrushColor(hdc, RGB(r,g,b)); + *result = (LRESULT)GetStockObject(DC_BRUSH); + return 1; + } + return 0; +} + +static int winTabsWmNotify(Ihandle* ih, NMHDR* msg_info, int *result) +{ + (void)result; + + if (msg_info->code == TCN_SELCHANGING) + { + IFnnn cb = (IFnnn)IupGetCallback(ih, "TABCHANGE_CB"); + int prev_pos = SendMessage(ih->handle, TCM_GETCURSEL, 0, 0); + iupAttribSetInt(ih, "_IUPTABS_PREV_CHILD_POS", prev_pos); + + if (cb) + { + Ihandle* prev_child = IupGetChild(ih, prev_pos); + iupAttribSetStr(ih, "_IUPTABS_PREV_CHILD", (char*)prev_child); + } + } + + if (msg_info->code == TCN_SELCHANGE) + { + IFnnn cb = (IFnnn)IupGetCallback(ih, "TABCHANGE_CB"); + int pos = SendMessage(ih->handle, TCM_GETCURSEL, 0, 0); + int prev_pos = iupAttribGetInt(ih, "_IUPTABS_PREV_CHILD_POS"); + HWND tab_page = winTabsGetPageWindow(ih, pos); + ShowWindow(tab_page, SW_SHOW); + tab_page = winTabsGetPageWindow(ih, prev_pos); + ShowWindow(tab_page, SW_HIDE); + + if (cb) + { + Ihandle* child = IupGetChild(ih, pos); + Ihandle* prev_child = (Ihandle*)iupAttribGet(ih, "_IUPTABS_PREV_CHILD"); + iupAttribSetStr(ih, "_IUPTABS_PREV_CHILD", NULL); + + cb(ih, child, prev_child); + } + } + + return 0; /* result not used */ +} + +static int winTabsProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + switch(msg) + { + case WM_SIZE: + { + WNDPROC oldProc = (WNDPROC)IupGetCallback(ih, "_IUPWIN_OLDPROC_CB"); + CallWindowProc(oldProc, ih->handle, msg, wp, lp); + + winTabsPlacePageWindows(ih, LOWORD(lp), HIWORD(lp)); + + *result = 0; + return 1; + } + } + + return iupwinBaseContainerProc(ih, msg, wp, lp, result); +} + +/* ------------------------------------------------------------------------- */ +/* winTabs - Methods and Init Class */ +/* ------------------------------------------------------------------------- */ + +static void winTabsChildAddedMethod(Ihandle* ih, Ihandle* child) +{ + if (IupGetName(child) == NULL) + iupAttribSetHandleName(child); + + if (ih->handle) + { + TCITEM tie; + HWND tab_page; + char *tabtitle, *tabimage; + int pos, old_rowcount; + RECT rect; + + pos = IupGetChildPos(ih, child); + + tab_page = winTabCreatePageWindow(ih); + + if (pos == 0) + ShowWindow(tab_page, SW_SHOW); + + tabtitle = iupAttribGet(child, "TABTITLE"); + if (!tabtitle) tabtitle = iupTabsAttribGetStrId(ih, "TABTITLE", pos); + tabimage = iupAttribGet(child, "TABIMAGE"); + if (!tabimage) tabimage = iupTabsAttribGetStrId(ih, "TABIMAGE", pos); + if (!tabtitle && !tabimage) + tabtitle = " "; + + old_rowcount = (int)SendMessage(ih->handle, TCM_GETROWCOUNT, 0, 0); + + tie.mask = TCIF_PARAM; + + if (tabtitle) + { + tie.mask |= TCIF_TEXT; + tie.pszText = tabtitle; + tie.cchTextMax = strlen(tabtitle); + } + + if (tabimage) + { + tie.mask |= TCIF_IMAGE; + tie.iImage = winTabsGetImageIndex(ih, tabimage); + } + + /* create tabs and label them */ + tie.lParam = (LPARAM)tab_page; + SendMessage(ih->handle, TCM_INSERTITEM, pos, (LPARAM)&tie); + + /* Calculate the display rectangle, assuming the + tab control is the size of the client area. */ + GetClientRect(ih->handle, &rect); + SendMessage(ih->handle, TCM_ADJUSTRECT, FALSE, (LPARAM)&rect); + + SetWindowPos(tab_page, NULL, + rect.left, rect.top, + rect.right - rect.left, rect.bottom - rect.top, + SWP_NOACTIVATE|SWP_NOZORDER); + + iupAttribSetStr(child, "_IUPTAB_CONTAINER", (char*)tab_page); + + if (ih->data->is_multiline) + { + if (ih->data->type == ITABS_LEFT || ih->data->type == ITABS_RIGHT) + { + int rowcount = (int)SendMessage(ih->handle, TCM_GETROWCOUNT, 0, 0); + if (rowcount != old_rowcount) + { + GetClientRect(ih->handle, &rect); + winTabsPlacePageWindows(ih, rect.right - rect.left, rect.bottom - rect.top); + } + } + + iupdrvDisplayRedraw(ih); + } + } +} + +static void winTabsChildRemovedMethod(Ihandle* ih, Ihandle* child) +{ + if (ih->handle) + { + HWND tab_page = (HWND)iupAttribGet(child, "_IUPTAB_CONTAINER"); + if (tab_page) + { + int pos = winTabsGetPageWindowPos(ih, tab_page); + SendMessage(ih->handle, TCM_DELETEITEM, pos, 0); + DestroyWindow(tab_page); + + if (pos==0) pos++; + iupdrvTabsSetCurrentTab(ih, pos-1); + + iupAttribSetStr(child, "_IUPTAB_CONTAINER", NULL); + } + } +} + +static int winTabsMapMethod(Ihandle* ih) +{ + DWORD dwStyle = WS_CHILD | WS_CLIPSIBLINGS | TCS_HOTTRACK | WS_TABSTOP, + dwExStyle = 0; + + if (!ih->parent) + return IUP_ERROR; + + if (ih->data->type == ITABS_BOTTOM) + dwStyle |= TCS_BOTTOM; + else if (ih->data->type == ITABS_RIGHT) + dwStyle |= TCS_VERTICAL|TCS_RIGHT; + else if (ih->data->type == ITABS_LEFT) + dwStyle |= TCS_VERTICAL; + + if (ih->data->is_multiline) + dwStyle |= TCS_MULTILINE; + + if (iupAttribGetBoolean(IupGetDialog(ih), "COMPOSITED")) + { + dwExStyle |= WS_EX_COMPOSITED; + + if (!ih->data->is_multiline && iupwinIsVista()) + { + /* workaround for composite bug in Vista */ + ih->data->is_multiline = 1; + dwStyle |= TCS_MULTILINE; + } + } + else + dwStyle |= WS_CLIPCHILDREN; + + if (!iupwinCreateWindowEx(ih, WC_TABCONTROL, dwExStyle, dwStyle)) + return IUP_ERROR; + + /* replace the WinProc to handle other messages */ + IupSetCallback(ih, "_IUPWIN_CTRLPROC_CB", (Icallback)winTabsProc); + + /* Process WM_NOTIFY */ + IupSetCallback(ih, "_IUPWIN_NOTIFY_CB", (Icallback)winTabsWmNotify); + + /* Process background color */ + IupSetCallback(ih, "_IUPWIN_CTLCOLOR_CB", (Icallback)winTabsCtlColor); + + if (iupwin_comctl32ver6 && ih->data->type != ITABS_TOP) + { + /* XP Styles support only TABTYPE=TOP */ + iupwinDrawRemoveTheme(ih->handle); + } + + /* Change children background */ + if (winTabsUsingXPStyles(ih)) + { + char* color = iupAttribGetInheritNativeParent(ih, "BGCOLOR"); + if (!color) + color = iupAttribGetInheritNativeParent(ih, "BACKGROUND"); + if (!color) + { + COLORREF cr; + if (iupwinDrawGetThemeTabsBgColor(ih->handle, &cr)) + iupAttribSetStrf(ih, "BACKGROUND", "%d %d %d", (int)GetRValue(cr), (int)GetGValue(cr), (int)GetBValue(cr)); + } + } + + /* Create pages and tabs */ + if (ih->firstchild) + { + Ihandle* child; + for (child = ih->firstchild; child; child = child->brother) + winTabsChildAddedMethod(ih, child); + } + + return IUP_NOERROR; +} + +static void winTabsUnMapMethod(Ihandle* ih) +{ + Iarray* bmp_array; + + HIMAGELIST image_list = (HIMAGELIST)SendMessage(ih->handle, TCM_GETIMAGELIST, 0, 0); + if (image_list) + ImageList_Destroy(image_list); + + bmp_array = (Iarray*)iupAttribGet(ih, "_IUPWIN_BMPARRAY"); + if (bmp_array) + iupArrayDestroy(bmp_array); + + iupdrvBaseUnMapMethod(ih); +} + +static void winTabsRegisterClass(void) +{ + WNDCLASS wndclass; + ZeroMemory(&wndclass, sizeof(WNDCLASS)); + + wndclass.hInstance = iupwin_hinstance; + wndclass.lpszClassName = "IupTabsPage"; + wndclass.lpfnWndProc = (WNDPROC)winTabsPageWinProc; + wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); + wndclass.style = CS_PARENTDC; + wndclass.hbrBackground = NULL; /* remove the background to optimize redraw */ + + RegisterClass(&wndclass); +} + +void iupdrvTabsInitClass(Iclass* ic) +{ + if (!iupwinClassExist("IupTabsPage")) + winTabsRegisterClass(); + + /* Driver Dependent Class functions */ + ic->Map = winTabsMapMethod; + ic->UnMap = winTabsUnMapMethod; + ic->ChildAdded = winTabsChildAddedMethod; + ic->ChildRemoved = winTabsChildRemovedMethod; + + /* Driver Dependent Attribute functions */ + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", winTabsGetBgColorAttrib, NULL, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "DLGFGCOLOR", IUPAF_NOT_MAPPED); + + /* IupTabs only */ + iupClassRegisterAttribute(ic, "TABTYPE", iupTabsGetTabTypeAttrib, winTabsSetTabTypeAttrib, IUPAF_SAMEASSYSTEM, "TOP", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TABORIENTATION", iupTabsGetTabOrientationAttrib, NULL, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); /* can not be set, depends on TABTYPE in Windows */ + iupClassRegisterAttribute(ic, "MULTILINE", winTabsGetMultilineAttrib, winTabsSetMultilineAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TABTITLE", NULL, winTabsSetTabTitleAttrib, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TABIMAGE", NULL, winTabsSetTabImageAttrib, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PADDING", iupTabsGetPaddingAttrib, winTabsSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); +} diff --git a/iup/src/win/iupwin_text.c b/iup/src/win/iupwin_text.c new file mode 100755 index 0000000..dfe489a --- /dev/null +++ b/iup/src/win/iupwin_text.c @@ -0,0 +1,1993 @@ +/** \file + * \brief Text Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_mask.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_array.h" +#include "iup_text.h" +#include "iup_key.h" +#include "iup_dialog.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" + +/* Cygwin and MingW Win32api does not define these */ + +#ifndef PFN_ARABIC +#define PFN_ARABIC 2 +#define PFN_LCLETTER 3 +#define PFN_UCLETTER 4 +#define PFN_LCROMAN 5 +#define PFN_UCROMAN 6 +#endif + +#ifndef PFNS_PAREN +#define PFNS_PAREN 0x000 +#define PFNS_PARENS 0x100 +#define PFNS_PERIOD 0x200 +#define PFNS_PLAIN 0x300 +#define PFNS_NONUMBER 0x400 +#endif + +#ifndef CFM_BACKCOLOR +#define CFM_BACKCOLOR 0x04000000 +#define CFM_UNDERLINETYPE 0x00800000 +#define CFM_WEIGHT 0x00400000 +#define CFM_DISABLED 0x2000 +#define CFE_DISABLED CFM_DISABLED +#endif + +#ifndef CFU_UNDERLINEDOTTED +#define CFU_UNDERLINEDOTTED 4 +#define CFU_UNDERLINEDOUBLE 3 +#define CFU_UNDERLINE 1 +#define CFU_UNDERLINENONE 0 +#endif + +#ifndef SES_UPPERCASE +#define SES_UPPERCASE 512 +#define SES_LOWERCASE 1024 +#endif +/* End Cygwin/MingW */ + +#ifndef EM_SETCUEBANNER /* defined only if _WIN32_WINNT >= 0x501 */ +#define ECM_FIRST 0x1500 /* Edit control messages */ +#define EM_SETCUEBANNER (ECM_FIRST + 1) +#endif + +#define WM_CARET WM_APP+1 /* Custom IUP message */ + + +void iupdrvTextAddSpin(int *w, int h) +{ + *w += h; +} + +void iupdrvTextAddBorders(int *w, int *h) +{ + int border_size = 2*3; + (*w) += border_size; + (*h) += border_size; +} + +static void winTextParseParagraphFormat(Ihandle* formattag, PARAFORMAT2 *paraformat, int convert2twips) +{ + int val; + char* format; + + ZeroMemory(paraformat, sizeof(PARAFORMAT2)); + paraformat->cbSize = sizeof(PARAFORMAT2); + + format = iupAttribGet(formattag, "NUMBERING"); + if (format) + { + paraformat->dwMask |= PFM_NUMBERING; + + if (iupStrEqualNoCase(format, "BULLET")) + paraformat->wNumbering = PFN_BULLET; + else if (iupStrEqualNoCase(format, "ARABIC")) + paraformat->wNumbering = PFN_ARABIC; + else if (iupStrEqualNoCase(format, "LCLETTER")) + paraformat->wNumbering = PFN_LCLETTER; + else if (iupStrEqualNoCase(format, "UCLETTER")) + paraformat->wNumbering = PFN_UCLETTER; + else if (iupStrEqualNoCase(format, "LCROMAN")) + paraformat->wNumbering = PFN_LCROMAN; + else if (iupStrEqualNoCase(format, "UCROMAN")) + paraformat->wNumbering = PFN_UCROMAN; + else + paraformat->wNumbering = 0; /* "NONE" */ + + format = iupAttribGet(formattag, "NUMBERINGSTYLE"); + if (format) + { + paraformat->dwMask |= PFM_NUMBERINGSTYLE; + + if (iupStrEqualNoCase(format, "RIGHTPARENTESES")) + paraformat->wNumberingStyle = PFNS_PAREN; + else if (iupStrEqualNoCase(format, "PARENTESES")) + paraformat->wNumberingStyle = PFNS_PARENS; + else if (iupStrEqualNoCase(format, "PERIOD")) + paraformat->wNumberingStyle = PFNS_PERIOD; + else if (iupStrEqualNoCase(format, "NONUMBER")) + paraformat->wNumberingStyle = PFNS_NONUMBER; + else + paraformat->wNumberingStyle = PFNS_PLAIN; /* "NONE" */ + } + + format = iupAttribGet(formattag, "NUMBERINGTAB"); + if (format && iupStrToInt(format, &val)) + { + paraformat->dwMask |= PFM_NUMBERINGTAB; + paraformat->wNumberingTab = (WORD)(val*convert2twips); + } + } + + format = iupAttribGet(formattag, "INDENT"); + if (format && iupStrToInt(format, &val)) + { + paraformat->dwMask |= PFM_STARTINDENT|PFM_RIGHTINDENT|PFM_OFFSET; + paraformat->dxStartIndent = val*convert2twips; + + format = iupAttribGet(formattag, "INDENTRIGHT"); + if (format && iupStrToInt(format, &val)) + paraformat->dxRightIndent = val*convert2twips; + else + paraformat->dxRightIndent = paraformat->dxStartIndent; + + format = iupAttribGet(formattag, "INDENTOFFSET"); + if (format && iupStrToInt(format, &val)) + paraformat->dxOffset = val*convert2twips; + else + paraformat->dxOffset = 0; + } + + format = iupAttribGet(formattag, "ALIGNMENT"); + if (format) + { + paraformat->dwMask |= PFM_ALIGNMENT; + + if (iupStrEqualNoCase(format, "JUSTIFY")) + paraformat->wAlignment = PFA_JUSTIFY; + else if (iupStrEqualNoCase(format, "RIGHT")) + paraformat->wAlignment = PFA_RIGHT; + else if (iupStrEqualNoCase(format, "CENTER")) + paraformat->wAlignment = PFA_CENTER; + else + paraformat->wAlignment = PFA_LEFT; /* "LEFT" */ + } + + format = iupAttribGet(formattag, "TABSARRAY"); + if (format) + { + int pos, align, i = 0; + LONG tab; + char* str; + + paraformat->dwMask |= PFM_TABSTOPS; + + while (format) + { + str = iupStrCopyUntil((char**)&format, ' '); + if (!str) break; + pos = atoi(str)*convert2twips; + free(str); + + str = iupStrCopyUntil((char**)&format, ' '); + if (!str) break; + + if (iupStrEqualNoCase(str, "DECIMAL")) + align = 3; + else if (iupStrEqualNoCase(str, "RIGHT")) + align = 2; + else if (iupStrEqualNoCase(str, "CENTER")) + align = 1; + else /* "LEFT" */ + align = 0; + free(str); + + tab = (pos&0xFFF)|(align<<24); + paraformat->rgxTabs[i] = tab; + i++; + if (i == 32) break; + } + paraformat->cTabCount = (SHORT)i; + } + + format = iupAttribGet(formattag, "SPACEBEFORE"); + if (format && iupStrToInt(format, &val)) + { + paraformat->dwMask |= PFM_SPACEBEFORE; + paraformat->dySpaceBefore = val*convert2twips; + } + + format = iupAttribGet(formattag, "SPACEAFTER"); + if (format && iupStrToInt(format, &val)) + { + paraformat->dwMask |= PFM_SPACEAFTER; + paraformat->dySpaceAfter = val*convert2twips; + } + + format = iupAttribGet(formattag, "LINESPACING"); + if (format) + { + paraformat->dwMask |= PFM_LINESPACING; + + if (iupStrEqualNoCase(format, "SINGLE")) + paraformat->bLineSpacingRule = 0; + else if (iupStrEqualNoCase(format, "ONEHALF")) + paraformat->bLineSpacingRule = 1; + else if (iupStrEqualNoCase(format, "DOUBLE")) + paraformat->bLineSpacingRule = 2; + else if (iupStrToInt(format, &val)) + { + paraformat->bLineSpacingRule = 3; + paraformat->dyLineSpacing = val*convert2twips; + } + } +} + +static void winTextParseCharacterFormat(Ihandle* formattag, CHARFORMAT2 *charformat, int pixel2twips) +{ + int val; + char* format; + + ZeroMemory(charformat, sizeof(CHARFORMAT2)); + charformat->cbSize = sizeof(CHARFORMAT2); + + format = iupAttribGet(formattag, "DISABLED"); + if (format) + { + charformat->dwMask |= CFM_DISABLED; + if (iupStrBoolean(format)) + charformat->dwEffects |= CFE_DISABLED; + } + + format = iupAttribGet(formattag, "RISE"); + if (format) + { + if (iupStrEqualNoCase(format, "SUPERSCRIPT")) + { + charformat->dwMask |= CFM_SUPERSCRIPT; + charformat->dwEffects |= CFE_SUPERSCRIPT; + } + else if (iupStrEqualNoCase(format, "SUBSCRIPT")) + { + charformat->dwMask |= CFM_SUBSCRIPT; + charformat->dwEffects |= CFE_SUBSCRIPT; + } + else if (iupStrToInt(format, &val)) + { + charformat->dwMask |= CFM_OFFSET; + charformat->yOffset = val; + } + } + + format = iupAttribGet(formattag, "ITALIC"); + if (format) + { + charformat->dwMask |= CFM_ITALIC; + if (iupStrBoolean(format)) + charformat->dwEffects |= CFE_ITALIC; + } + + format = iupAttribGet(formattag, "STRIKEOUT"); + if (format) + { + charformat->dwMask |= CFM_STRIKEOUT; + if (iupStrBoolean(format)) + charformat->dwEffects |= CFE_STRIKEOUT; + } + + format = iupAttribGet(formattag, "PROTECTED"); + if (format) + { + charformat->dwMask |= CFM_PROTECTED; + if (iupStrBoolean(format)) + charformat->dwEffects |= CFE_PROTECTED; + } + + format = iupAttribGet(formattag, "FONTSIZE"); + if (format && iupStrToInt(format, &val)) + { + /* (1/1440 of an inch, or 1/20 of a printer's point) */ + charformat->dwMask |= CFM_SIZE; + if (val < 0) /* in pixels */ + charformat->yHeight = (-val)*pixel2twips; + else + charformat->yHeight = val*20; + } + + format = iupAttribGet(formattag, "FONTSCALE"); + if (format && charformat->yHeight != 0) + { + float fval = 0; + if (iupStrEqualNoCase(format, "XX-SMALL")) + fval = 0.5787037037037f; + else if (iupStrEqualNoCase(format, "X-SMALL")) + fval = 0.6444444444444f; + else if (iupStrEqualNoCase(format, "SMALL")) + fval = 0.8333333333333f; + else if (iupStrEqualNoCase(format, "MEDIUM")) + fval = 1.0f; + else if (iupStrEqualNoCase(format, "LARGE")) + fval = 1.2f; + else if (iupStrEqualNoCase(format, "X-LARGE")) + fval = 1.4399999999999f; + else if (iupStrEqualNoCase(format, "XX-LARGE")) + fval = 1.728f; + else + iupStrToFloat(format, &fval); + + if (fval > 0) + { + fval = ((float)charformat->yHeight)*fval; + charformat->yHeight = iupROUND(fval); + } + } + + format = iupAttribGet(formattag, "FONTFACE"); + if (format) + { + charformat->dwMask |= CFM_FACE; + strcpy(charformat->szFaceName, format); + } + + format = iupAttribGet(formattag, "FGCOLOR"); + if (format) + { + unsigned char r, g, b; + if (iupStrToRGB(format, &r, &g, &b)) + { + charformat->dwMask |= CFM_COLOR; + charformat->crTextColor = RGB(r, g, b); + } + } + + format = iupAttribGet(formattag, "BGCOLOR"); + if (format) + { + unsigned char r, g, b; + if (iupStrToRGB(format, &r, &g, &b)) + { + charformat->dwMask |= CFM_BACKCOLOR; + charformat->crBackColor = RGB(r, g, b); + } + } + + format = iupAttribGet(formattag, "UNDERLINE"); + if (format) + { + charformat->dwMask |= CFM_UNDERLINETYPE; + + if (iupStrEqualNoCase(format, "SINGLE")) + charformat->bUnderlineType = CFU_UNDERLINE; + else if (iupStrEqualNoCase(format, "DOUBLE")) + charformat->bUnderlineType = CFU_UNDERLINEDOUBLE; + else if (iupStrEqualNoCase(format, "DOTTED")) + charformat->bUnderlineType = CFU_UNDERLINEDOTTED; + else /* "NONE" */ + charformat->bUnderlineType = CFU_UNDERLINENONE; + + if (charformat->bUnderlineType != CFU_UNDERLINENONE) + { + charformat->dwMask |= CFM_UNDERLINE; + charformat->dwEffects |= CFE_UNDERLINE; + } + } + + format = iupAttribGet(formattag, "WEIGHT"); + if (format) + { + charformat->dwMask |= CFM_WEIGHT; + + if (iupStrEqualNoCase(format, "EXTRALIGHT")) + charformat->wWeight = FW_EXTRALIGHT; + else if (iupStrEqualNoCase(format, "LIGHT")) + charformat->wWeight = FW_LIGHT; + else if (iupStrEqualNoCase(format, "SEMIBOLD")) + charformat->wWeight = FW_SEMIBOLD; + else if (iupStrEqualNoCase(format, "BOLD")) + charformat->wWeight = FW_BOLD; + else if (iupStrEqualNoCase(format, "EXTRABOLD")) + charformat->wWeight = FW_EXTRABOLD; + else if (iupStrEqualNoCase(format, "HEAVY")) + charformat->wWeight = FW_HEAVY; + else /* "NORMAL" */ + charformat->wWeight = FW_NORMAL; + + if (charformat->wWeight != FW_NORMAL) + { + charformat->dwMask |= CFM_BOLD; + charformat->dwEffects |= CFE_BOLD; + } + } +} + +static int winTextSetLinColToPosition(Ihandle *ih, int lin, int col) +{ + int linmax, colmax, lineindex; + + lin--; /* IUP starts at 1 */ + col--; + + linmax = SendMessage(ih->handle, EM_GETLINECOUNT, 0, 0L); + if (lin > linmax) + lin = linmax; + + lineindex = SendMessage(ih->handle, EM_LINEINDEX, (WPARAM)lin, 0L); + + colmax = SendMessage(ih->handle, EM_LINELENGTH, (WPARAM)lineindex, 0L); + if (col > colmax) + col = colmax; /* after the last character */ + + return lineindex + col; +} + +static void winTextGetLinColFromPosition(Ihandle* ih, int pos, int* lin, int* col) +{ + /* here "pos" must contains the extra chars if the case */ + int lineindex; + + if (ih->data->has_formatting) + *lin = SendMessage(ih->handle, EM_EXLINEFROMCHAR, (WPARAM)0, (LPARAM)pos); + else + *lin = SendMessage(ih->handle, EM_LINEFROMCHAR, (WPARAM)pos, (LPARAM)0L); + + lineindex = SendMessage(ih->handle, EM_LINEINDEX, (WPARAM)(*lin), (LPARAM)0L); + *col = pos - lineindex; /* lineindex is at the first character of the line */ + + (*lin)++; /* IUP starts at 1 */ + (*col)++; +} + +static int winTextRemoveExtraChars(Ihandle* ih, int pos) +{ + /* called only if not single line and not formatting */ + int lin = SendMessage(ih->handle, EM_LINEFROMCHAR, (WPARAM)pos, (LPARAM)0L); + pos -= lin; /* remove \r characters from count */ + return pos; +} + +static int winTextAddExtraChars(Ihandle* ih, int pos) +{ + /* called only if not single line and not formatting */ + int lin, clin; + + clin = SendMessage(ih->handle, EM_LINEFROMCHAR, (WPARAM)pos, (LPARAM)0L); + + /* pos is smaller than the actual pos (missing the \r count), + so we must calculate the line until the returned value is the same as the expected. */ + do + { + lin = clin; + clin = SendMessage(ih->handle, EM_LINEFROMCHAR, (WPARAM)(pos+lin+1), (LPARAM)0L); /* add one because we can be at the last character */ + } while (clin != lin); /* and it will not change to the next line by 1 */ + + pos += lin; /* add \r characters from count */ + return pos; +} + +static int winTextGetCaretPos(Ihandle* ih) +{ + int pos = 0; + POINT point; + + if (GetFocus() != ih->handle || !GetCaretPos(&point)) + { + /* if does not have the focus, or could not get caret position, + then use the selection start position */ + SendMessage(ih->handle, EM_GETSEL, (WPARAM)&pos, 0); + } + else + { + if (ih->data->has_formatting) + pos = SendMessage(ih->handle, EM_CHARFROMPOS, 0, (LPARAM)&point); + else + { + LRESULT ret; + + /* Workaround for weird behavior because of the return value in GetCaretPos */ + if (ih->data->is_multiline && point.y < 5) + point.y += 5; + + ret = SendMessage(ih->handle, EM_CHARFROMPOS, 0, MAKELPARAM(point.x, point.y)); + pos = LOWORD(ret); + } + } + + return pos; +} + +static int winTextGetCaret(Ihandle* ih, int *lin, int *col) +{ + int pos = winTextGetCaretPos(ih); + + if (ih->data->is_multiline) + { + winTextGetLinColFromPosition(ih, pos, lin, col); + + if (!ih->data->has_formatting) /* when formatting or single line text uses only one char per line end */ + pos = winTextRemoveExtraChars(ih, pos); + } + else + { + *col = pos; + (*col)++; /* IUP starts at 1 */ + *lin = 1; + } + + return pos; +} + +static void winTextGetSelection(Ihandle* ih, int *start, int *end) +{ + *start = 0; + *end = 0; + + SendMessage(ih->handle, EM_GETSEL, (WPARAM)start, (LPARAM)end); + + if (ih->data->is_multiline && !ih->data->has_formatting) /* when formatting or single line text uses only one char per line end */ + { + (*start) = winTextRemoveExtraChars(ih, *start); + (*end) = winTextRemoveExtraChars(ih, *end); + } +} + +void iupdrvTextConvertLinColToPos(Ihandle* ih, int lin, int col, int *pos) +{ + *pos = winTextSetLinColToPosition(ih, lin, col); + + if (!ih->data->has_formatting) /* when formatting or single line text uses only one char per line end */ + *pos = winTextRemoveExtraChars(ih, *pos); +} + +void iupdrvTextConvertPosToLinCol(Ihandle* ih, int pos, int *lin, int *col) +{ + if (!ih->data->has_formatting) /* when formatting or single line text uses only one char per line end */ + pos = winTextAddExtraChars(ih, pos); + + winTextGetLinColFromPosition(ih, pos, lin, col); +} + +static int winTextConvertXYToPos(Ihandle* ih, int x, int y) +{ + int pos; + + if (ih->data->has_formatting) + { + POINT point; + point.x = x; + point.y = y; + pos = (int)SendMessage(ih->handle, EM_CHARFROMPOS, 0, (LPARAM)&point); + } + else + { + LRESULT ret = SendMessage(ih->handle, EM_CHARFROMPOS, 0, MAKELPARAM(x, y)); + pos = LOWORD(ret); + } + + if (ih->data->is_multiline) + { + if (!ih->data->has_formatting) /* when formatting or single line text uses only one char per line end */ + pos = winTextRemoveExtraChars(ih, pos); + } + + return pos; +} + + +/***********************************************************************************************/ + + +static int winTextSetValueAttrib(Ihandle* ih, const char* value) +{ + char* str; + if (!value) value = ""; + str = (char*)value; + if (ih->data->is_multiline) + { + if (ih->data->has_formatting) + str = iupStrToMac(str); + else + str = iupStrToDos(str); + } + iupAttribSetStr(ih, "IUPWIN_IGNORECHANGE", "1"); + SetWindowText(ih->handle, str); + iupAttribSetStr(ih, "IUPWIN_IGNORECHANGE", NULL); + if (str != value) free(str); + return 0; +} + +static char* winTextGetValueAttrib(Ihandle* ih) +{ + int nc = GetWindowTextLength(ih->handle); + if (nc) + { + char* str = iupStrGetMemory(nc+1); + GetWindowText(ih->handle, str, nc+1); /* notice that this function always returns in DOS format */ + if (ih->data->is_multiline) + iupStrToUnix(str); + return str; + } + else + return ""; +} + +static int winTextSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &(ih->data->horiz_padding), &(ih->data->vert_padding), 'x'); + ih->data->vert_padding = 0; + if (ih->handle) + SendMessage(ih->handle, EM_SETMARGINS, EC_LEFTMARGIN|EC_RIGHTMARGIN, MAKELPARAM(ih->data->horiz_padding, ih->data->horiz_padding)); + return 0; +} + +static int winTextSetSelectedTextAttrib(Ihandle* ih, const char* value) +{ + if (value) + { + int start = 0, end = 0; + char* str; + + SendMessage(ih->handle, EM_GETSEL, (WPARAM)&start, (LPARAM)&end); + if (start == end) + return 0; + + str = (char*)value; + if (ih->data->is_multiline) + { + if (ih->data->has_formatting) + str = iupStrToMac(str); + else + str = iupStrToDos(str); + } + SendMessage(ih->handle, EM_REPLACESEL, (WPARAM)TRUE, (LPARAM)str); + if (str != value) free(str); + } + return 0; +} + +static char* winTextGetSelectedTextAttrib(Ihandle* ih) +{ + int nc = GetWindowTextLength(ih->handle); + if (nc) + { + int start = 0, end = 0; + char* str; + + SendMessage(ih->handle, EM_GETSEL, (WPARAM)&start, (LPARAM)&end); + if (start == end) + return NULL; + + if (ih->data->has_formatting) + { + str = iupStrGetMemory(end-start+1); + SendMessage(ih->handle, EM_GETSELTEXT, 0, (LPARAM)str); + } + else + { + str = iupStrGetMemory(nc+1); + GetWindowText(ih->handle, str, nc+1); /* notice that this function always returns in DOS format */ + /* returns only the selected text */ + str[end] = 0; + str += start; + } + + if (ih->data->is_multiline) + iupStrToUnix(str); + return str; + } + else + return NULL; +} + +static int winTextSetNCAttrib(Ihandle* ih, const char* value) +{ + if (!iupStrToInt(value, &ih->data->nc)) + ih->data->nc = 0; + + if (ih->handle) + { + if (ih->data->has_formatting) + SendMessage(ih->handle, EM_EXLIMITTEXT, 0, ih->data->nc); /* so it can be larger than 64k */ + else + SendMessage(ih->handle, EM_LIMITTEXT, ih->data->nc, 0L); + } + return 0; +} + +static int winTextSetSelectionAttrib(Ihandle* ih, const char* value) +{ + int start=1, end=1; + + if (!value || iupStrEqualNoCase(value, "NONE")) + { + SendMessage(ih->handle, EM_SETSEL, (WPARAM)-1, (LPARAM)0); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + SendMessage(ih->handle, EM_SETSEL, (WPARAM)0, (LPARAM)-1); + return 0; + } + + if (ih->data->is_multiline) + { + int lin_start=1, col_start=1, lin_end=1, col_end=1; + + if (sscanf(value, "%d,%d:%d,%d", &lin_start, &col_start, &lin_end, &col_end)!=4) return 0; + if (lin_start<1 || col_start<1 || lin_end<1 || col_end<1) return 0; + + start = winTextSetLinColToPosition(ih, lin_start, col_start); + end = winTextSetLinColToPosition(ih, lin_end, col_end); + } + else + { + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<1 || end<1) + return 0; + + start--; /* IUP starts at 1 */ + end--; + } + + SendMessage(ih->handle, EM_SETSEL, (WPARAM)start, (LPARAM)end); + + return 0; +} + +static char* winTextGetSelectionAttrib(Ihandle* ih) +{ + int start = 0, end = 0; + char* str; + + SendMessage(ih->handle, EM_GETSEL, (WPARAM)&start, (LPARAM)&end); + if (start == end) + return NULL; + + str = iupStrGetMemory(100); + + if (ih->data->is_multiline) + { + int start_col, start_lin, end_col, end_lin; + winTextGetLinColFromPosition(ih, start, &start_lin, &start_col); + winTextGetLinColFromPosition(ih, end, &end_lin, &end_col); + sprintf(str,"%d,%d:%d,%d", start_lin, start_col, end_lin, end_col); + } + else + { + start++; /* IUP starts at 1 */ + end++; + sprintf(str, "%d:%d", start, end); + } + + return str; +} + +static int winTextSetSelectionPosAttrib(Ihandle* ih, const char* value) +{ + int start=0, end=0; + + if (!value || iupStrEqualNoCase(value, "NONE")) + { + SendMessage(ih->handle, EM_SETSEL, (WPARAM)-1, (LPARAM)0); + return 0; + } + + if (iupStrEqualNoCase(value, "ALL")) + { + SendMessage(ih->handle, EM_SETSEL, (WPARAM)0, (LPARAM)-1); + return 0; + } + + if (iupStrToIntInt(value, &start, &end, ':')!=2) + return 0; + + if(start<0 || end<0) + return 0; + + if (ih->data->is_multiline && !ih->data->has_formatting) /* when formatting or single line text uses only one char per line end */ + { + start = winTextAddExtraChars(ih, start); + end = winTextAddExtraChars(ih, end); + } + + SendMessage(ih->handle, EM_SETSEL, (WPARAM)start, (LPARAM)end); + + return 0; +} + +static char* winTextGetSelectionPosAttrib(Ihandle* ih) +{ + int start = 0, end = 0; + char* str; + + SendMessage(ih->handle, EM_GETSEL, (WPARAM)&start, (LPARAM)&end); + if (start == end) + return NULL; + + if (ih->data->is_multiline && !ih->data->has_formatting) /* when formatting or single line text uses only one char per line end */ + { + start = winTextRemoveExtraChars(ih, start); + end = winTextRemoveExtraChars(ih, end); + } + + str = iupStrGetMemory(100); + + sprintf(str, "%d:%d", start, end); + + return str; +} + +static int winTextSetInsertAttrib(Ihandle* ih, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + if (value) + { + char* str = (char*)value; + if (ih->data->is_multiline) + { + if (ih->data->has_formatting) + str = iupStrToMac(str); + else + str = iupStrToDos(str); + } + + SendMessage(ih->handle, EM_REPLACESEL, (WPARAM)TRUE, (LPARAM)str); + + if (str != value) free(str); + } + return 0; +} + +static int winTextSetAppendAttrib(Ihandle* ih, const char* value) +{ + int len; + char* str; + if (!ih->handle) /* do not store the action before map */ + return 0; + if (!value) value = ""; + str = (char*)value; + if (ih->data->is_multiline) + { + if (ih->data->has_formatting) + str = iupStrToMac(str); + else + str = iupStrToDos(str); + } + + len = GetWindowTextLength(ih->handle)+1; + SendMessage(ih->handle, EM_SETSEL, (WPARAM)len, (LPARAM)len); + if (ih->data->is_multiline && ih->data->append_newline) + { + if (ih->data->has_formatting) + SendMessage(ih->handle, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)"\r"); + else + SendMessage(ih->handle, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)"\r\n"); + } + SendMessage(ih->handle, EM_REPLACESEL, (WPARAM)TRUE, (LPARAM)str); + + if (str != value) free(str); + return 0; +} + +static int winTextSetReadOnlyAttrib(Ihandle* ih, const char* value) +{ + SendMessage(ih->handle, EM_SETREADONLY, (WPARAM)iupStrBoolean(value), 0); + return 0; +} + +static char* winTextGetReadOnlyAttrib(Ihandle* ih) +{ + DWORD style = GetWindowLong(ih->handle, GWL_STYLE); + if (style & ES_READONLY) + return "YES"; + else + return "NO"; +} + +static int winTextSetTabSizeAttrib(Ihandle* ih, const char* value) +{ + int tabsize; + if (!ih->data->is_multiline) + return 0; + + iupStrToInt(value, &tabsize); + tabsize *= 4; + SendMessage(ih->handle, EM_SETTABSTOPS, (WPARAM)1L, (LPARAM)&tabsize); + iupdrvDisplayRedraw(ih); + return 1; +} + +static int winTextSetCaretAttrib(Ihandle* ih, const char* value) +{ + int pos = 1; + + if (!value) + return 0; + + if (ih->data->is_multiline) + { + int lin = 1, col = 1; + iupStrToIntInt(value, &lin, &col, ','); /* be permissive in SetCaret, do not abort if invalid */ + if (lin < 1) lin = 1; + if (col < 1) col = 1; + + pos = winTextSetLinColToPosition(ih, lin, col); + } + else + { + sscanf(value,"%i",&pos); + if (pos < 1) pos = 1; + pos--; /* IUP starts at 1 */ + } + + SendMessage(ih->handle, EM_SETSEL, (WPARAM)pos, (LPARAM)pos); + SendMessage(ih->handle, EM_SCROLLCARET, 0L, 0L); + + return 0; +} + +static char* winTextGetCaretAttrib(Ihandle* ih) +{ + int col, lin; + char* str; + + str = iupStrGetMemory(100); + + winTextGetCaret(ih, &lin, &col); + + if (ih->data->is_multiline) + sprintf(str, "%d,%d", lin, col); + else + sprintf(str, "%d", col); + + return str; +} + +static int winTextSetCaretPosAttrib(Ihandle* ih, const char* value) +{ + int pos = 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); /* be permissive in SetCaret, do not abort if invalid */ + if (pos < 0) pos = 0; + + if (ih->data->is_multiline && !ih->data->has_formatting) /* when formatting or single line text uses only one char per line end */ + pos = winTextAddExtraChars(ih, pos); + + SendMessage(ih->handle, EM_SETSEL, (WPARAM)pos, (LPARAM)pos); + SendMessage(ih->handle, EM_SCROLLCARET, 0L, 0L); + + return 0; +} + +static char* winTextGetCaretPosAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(100); + int pos = winTextGetCaretPos(ih); + if (ih->data->is_multiline && !ih->data->has_formatting) /* when formatting or single line text uses only one char per line end */ + pos = winTextRemoveExtraChars(ih, pos); + sprintf(str, "%d", pos); + return str; +} + +static int winTextSetScrollToAttrib(Ihandle* ih, const char* value) +{ + int lin = 1, col = 1; + + if (!value) + return 0; + + if (ih->data->is_multiline) + { + iupStrToIntInt(value, &lin, &col, ','); + if (lin < 1) lin = 1; + if (col < 1) col = 1; + } + else + { + sscanf(value,"%i",&col); + if (col < 1) col = 1; + } + + lin--; /* return to Windows referece */ + col--; + + if (ih->data->has_formatting) + SendMessage(ih->handle, EM_LINESCROLL, (WPARAM)0, (LPARAM)lin); + else + SendMessage(ih->handle, EM_LINESCROLL, (WPARAM)col, (LPARAM)lin); + + return 0; +} + +static int winTextSetScrollToPosAttrib(Ihandle* ih, const char* value) +{ + int lin, col, pos = 0; + + if (!value) + return 0; + + sscanf(value,"%i",&pos); + if (pos < 0) pos = 0; + + if (ih->data->is_multiline && !ih->data->has_formatting) /* when formatting or single line text uses only one char per line end */ + pos = winTextAddExtraChars(ih, pos); + + winTextGetLinColFromPosition(ih, pos, &lin, &col); + lin--; /* return to Windows referece */ + col--; + + if (ih->data->has_formatting) + SendMessage(ih->handle, EM_LINESCROLL, (WPARAM)0, (LPARAM)lin); + else + SendMessage(ih->handle, EM_LINESCROLL, (WPARAM)col, (LPARAM)lin); + + return 0; +} + +static int winTextSetFilterAttrib(Ihandle *ih, const char *value) +{ + int style = 0; + + if (iupStrEqualNoCase(value, "LOWERCASE")) + { + if (ih->data->has_formatting) + { + SendMessage(ih->handle, EM_SETEDITSTYLE, SES_LOWERCASE, SES_LOWERCASE); + return 1; + } + style = ES_LOWERCASE; + } + else if (iupStrEqualNoCase(value, "NUMBER")) + style = ES_NUMBER; + else if (iupStrEqualNoCase(value, "UPPERCASE")) + { + if (ih->data->has_formatting) + { + SendMessage(ih->handle, EM_SETEDITSTYLE, SES_UPPERCASE, SES_UPPERCASE); + return 1; + } + style = ES_UPPERCASE; + } + + if (style) + iupwinMergeStyle(ih, ES_LOWERCASE|ES_NUMBER|ES_UPPERCASE, style); + + return 1; +} + +static int winTextSetClipboardAttrib(Ihandle *ih, const char *value) +{ + UINT msg = 0; + + if (iupStrEqualNoCase(value, "COPY")) + msg = WM_COPY; + else if (iupStrEqualNoCase(value, "CUT")) + msg = WM_CUT; + else if (iupStrEqualNoCase(value, "PASTE")) + msg = WM_PASTE; + else if (iupStrEqualNoCase(value, "CLEAR")) + msg = WM_CLEAR; + else if (iupStrEqualNoCase(value, "UNDO")) + msg = WM_UNDO; + else if (ih->data->has_formatting && iupStrEqualNoCase(value, "REDO")) + msg = EM_REDO; + + if (msg) + SendMessage(ih->handle, msg, 0, 0); + + return 0; +} + +static int winTextSetBgColorAttrib(Ihandle *ih, const char *value) +{ + if (ih->data->has_formatting) + { + unsigned char r, g, b; + if (iupStrToRGB(value, &r, &g, &b)) + { + COLORREF color; + color = RGB(r,g,b); + SendMessage(ih->handle, EM_SETBKGNDCOLOR, 0, (LPARAM)color); + } + } + return 1; +} + +static int winTextSetCueBannerAttrib(Ihandle *ih, const char *value) +{ + if (!ih->data->is_multiline && iupwin_comctl32ver6) + { + WCHAR* wstr = iupwinStrChar2Wide(value); + SendMessage(ih->handle, EM_SETCUEBANNER, (WPARAM)FALSE, (LPARAM)wstr); + free(wstr); + return 1; + } + return 0; +} + +static int winTextSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + int new_style; + + if (iupStrEqualNoCase(value, "ARIGHT")) + new_style = ES_RIGHT; + else if (iupStrEqualNoCase(value, "ACENTER")) + new_style = ES_CENTER; + else /* "ALEFT" */ + new_style = ES_LEFT; + + iupwinMergeStyle(ih, ES_LEFT|ES_CENTER|ES_RIGHT, new_style); + + return 1; +} + +static int winTextSetStandardFontAttrib(Ihandle* ih, const char* value) +{ + /* ignore the first call that is done in IupMap, + it is already done before calling iupTextUpdateFormatTags. */ + if (ih->data->has_formatting && iupAttribGet(ih, "_IUPWIN_IGNORE_FONT")) + { + iupAttribSetStr(ih, "_IUPWIN_IGNORE_FONT", NULL); + return 0; + } + return iupdrvSetStandardFontAttrib(ih, value); +} + +void iupdrvTextAddFormatTag(Ihandle* ih, Ihandle* formattag) +{ + int convert2twips, pixel2twips; + char *selection, *units; + PARAFORMAT2 paraformat; + CHARFORMAT2 charformat; + + /* one twip is 1/1440 inch */ + /* twip = (pixel*1440)/(pixel/inch) */ + pixel2twips = 1440/iupwinGetScreenRes(); + + /* default is PIXELS */ + convert2twips = pixel2twips; + units = iupAttribGet(formattag, "UNITS"); + if (units) + { + int val; + if (iupStrEqualNoCase(units, "TWIPS")) + convert2twips = 1; + else if (iupStrToInt(units, &val)) + convert2twips = val; + } + + selection = iupAttribGet(formattag, "SELECTION"); + if (selection) + { + /* In Windows, the format message use the current selection */ + winTextSetSelectionAttrib(ih, selection); + iupAttribSetStr(ih, "SELECTION", NULL); + } + else + { + char* selectionpos = iupAttribGet(formattag, "SELECTIONPOS"); + if (selectionpos) + { + /* In Windows, the format message use the current selection */ + winTextSetSelectionPosAttrib(ih, selectionpos); + iupAttribSetStr(ih, "SELECTIONPOS", NULL); + } + } + + if (iupAttribGet(formattag, "FONTSCALE") && !iupAttribGet(formattag, "FONTSIZE")) + iupAttribSetStr(formattag, "FONTSIZE", iupGetFontSizeAttrib(ih)); + + winTextParseParagraphFormat(formattag, ¶format, convert2twips); + if (paraformat.dwMask != 0) + SendMessage(ih->handle, EM_SETPARAFORMAT, 0, (LPARAM)¶format); + + winTextParseCharacterFormat(formattag, &charformat, pixel2twips); + if (charformat.dwMask != 0) + SendMessage(ih->handle, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&charformat); + + /* reset the selection, if changed here */ + if (selection) + winTextSetSelectionAttrib(ih, NULL); +} + +static int winTextSetRemoveFormattingAttrib(Ihandle* ih, const char* value) +{ + PARAFORMAT2 paraformat; + CHARFORMAT2 charformat; + COLORREF colorref; + int val; + + if (!ih->data->has_formatting) + return 0; + + ZeroMemory(¶format, sizeof(PARAFORMAT2)); + paraformat.cbSize = sizeof(PARAFORMAT2); + paraformat.dwMask = PFM_NUMBERING|PFM_STARTINDENT|PFM_RIGHTINDENT|PFM_OFFSET| + PFM_ALIGNMENT|PFM_SPACEBEFORE|PFM_SPACEAFTER|PFM_LINESPACING; + paraformat.wAlignment = PFA_LEFT; + + ZeroMemory(&charformat, sizeof(CHARFORMAT2)); + charformat.cbSize = sizeof(CHARFORMAT2); + charformat.dwMask = CFM_DISABLED|CFM_OFFSET|CFM_ITALIC|CFM_STRIKEOUT|CFM_PROTECTED| + CFM_UNDERLINETYPE|CFM_UNDERLINE|CFM_WEIGHT|CFM_FACE; + charformat.wWeight = FW_NORMAL; + strcpy(charformat.szFaceName, iupGetFontFaceAttrib(ih)); + + if (iupwinGetColorRef(ih, "FGCOLOR", &colorref)) + { + charformat.dwMask |= CFM_COLOR; + charformat.crTextColor = colorref; + } + + if (iupwinGetColorRef(ih, "BGCOLOR", &colorref)) + { + charformat.dwMask |= CFM_BACKCOLOR; + charformat.crBackColor = colorref; + } + + if (iupStrToInt(iupGetFontSizeAttrib(ih), &val)) + { + /* (1/1440 of an inch, or 1/20 of a printer's point) */ + charformat.dwMask |= CFM_SIZE; + if (val < 0) /* in pixels */ + { + int pixel2twips = 1440/iupwinGetScreenRes(); + charformat.yHeight = (-val)*pixel2twips; + } + else + charformat.yHeight = val*20; + } + + SendMessage(ih->handle, EM_SETPARAFORMAT, 0, (LPARAM)¶format); + SendMessage(ih->handle, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&charformat); + + (void)value; + return 0; +} + +static int winTextSetOverwriteAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->has_formatting) + return 0; + + if (iupAttribGetBoolean(ih, "OVERWRITE")) + { + if (!iupStrBoolean(value)) + SendMessage(ih->handle, WM_KEYDOWN, VK_INSERT, 0); /* toggle from ON to OFF */ + } + else + { + if (iupStrBoolean(value)) + SendMessage(ih->handle, WM_KEYDOWN, VK_INSERT, 0); /* toggle from OFF to ON */ + } + return 1; +} + + +static int winTextSetVisibleAttrib(Ihandle* ih, const char* value) +{ + HWND hSpin = (HWND)iupAttribGet(ih, "_IUPWIN_SPIN"); + if (hSpin) + ShowWindow(hSpin, iupStrBoolean(value)? SW_SHOWNORMAL: SW_HIDE); + + return iupBaseSetVisibleAttrib(ih, value); +} + +static void winTextCropSpinValue(HWND hSpin, int min, int max) +{ + /* refresh if internally cropped, but text still shows an invalid value */ + int pos = SendMessage(hSpin, UDM_GETPOS32, 0, 0); + if (pos <= min) + SendMessage(hSpin, UDM_SETPOS32, 0, min); + if (pos >= max) + SendMessage(hSpin, UDM_SETPOS32, 0, max); +} + +static int winTextSetSpinMinAttrib(Ihandle* ih, const char* value) +{ + HWND hSpin = (HWND)iupAttribGet(ih, "_IUPWIN_SPIN"); + if (hSpin) + { + int min; + if (iupStrToInt(value, &min)) + { + int max = iupAttribGetInt(ih, "SPINMAX"); + SendMessage(hSpin, UDM_SETRANGE32, min, max); + + winTextCropSpinValue(hSpin, min, max); + } + } + return 1; +} + +static int winTextSetSpinMaxAttrib(Ihandle* ih, const char* value) +{ + HWND hSpin = (HWND)iupAttribGet(ih, "_IUPWIN_SPIN"); + if (hSpin) + { + int max; + if (iupStrToInt(value, &max)) + { + int min = iupAttribGetInt(ih, "SPINMIN"); + SendMessage(hSpin, UDM_SETRANGE32, min, max); + + winTextCropSpinValue(hSpin, min, max); + } + } + return 1; +} + +static int winTextSetSpinIncAttrib(Ihandle* ih, const char* value) +{ + HWND hSpin = (HWND)iupAttribGet(ih, "_IUPWIN_SPIN"); + if (hSpin) + { + int inc; + if (iupStrToInt(value, &inc)) + { + UDACCEL paAccels[3]; + paAccels[0].nInc = inc; + paAccels[0].nSec = 0; + paAccels[1].nInc = inc*5; + paAccels[1].nSec = 2; + paAccels[2].nInc = inc*20; + paAccels[2].nSec = 5; + SendMessage(hSpin, UDM_SETACCEL, 3, (LPARAM)paAccels); + } + } + return 1; +} + +static int winTextSetSpinValueAttrib(Ihandle* ih, const char* value) +{ + HWND hSpin = (HWND)iupAttribGet(ih, "_IUPWIN_SPIN"); + if (hSpin) + { + int pos; + if (iupStrToInt(value, &pos)) + SendMessage(hSpin, UDM_SETPOS32, 0, pos); + } + return 1; +} + +static char* winTextGetSpinValueAttrib(Ihandle* ih) +{ + HWND hSpin = (HWND)iupAttribGet(ih, "_IUPWIN_SPIN"); + if (hSpin) + { + int pos = SendMessage(hSpin, UDM_GETPOS32, 0, 0); + char *str = iupStrGetMemory(50); + sprintf(str, "%d", pos); + return str; + } + return NULL; +} + + +/****************************************************************************************/ + + +static int winTextCtlColor(Ihandle* ih, HDC hdc, LRESULT *result) +{ + COLORREF cr; + + if (iupwinGetColorRef(ih, "FGCOLOR", &cr)) + SetTextColor(hdc, cr); + + if (iupwinGetColorRef(ih, "BGCOLOR", &cr)) + { + SetBkColor(hdc, cr); + SetDCBrushColor(hdc, cr); + *result = (LRESULT)GetStockObject(DC_BRUSH); + return 1; + } + return 0; +} + +static void winTextCallCaretCb(Ihandle* ih) +{ + int col, lin, pos; + + IFniii cb = (IFniii)IupGetCallback(ih, "CARET_CB"); + if (!cb) return; + + pos = winTextGetCaret(ih, &lin, &col); + + if (pos != ih->data->last_caret_pos) + { + ih->data->last_caret_pos = pos; + + cb(ih, lin, col, pos); + } +} + +static int winTextCallActionCb(Ihandle* ih, const char* insert_value, int key, int dir) +{ + int start, end, ret = 1; + char *value, *new_value; + + IFnis cb = (IFnis)IupGetCallback(ih, "ACTION"); + if (!cb && !ih->data->mask) + return 1; + + winTextGetSelection(ih, &start, &end); + + value = winTextGetValueAttrib(ih); + + if (value[0]==0) + new_value = iupStrDup(insert_value); + else if (insert_value) + new_value = iupStrInsert(value, insert_value, start, end); + else + { + new_value = value; + iupStrRemove(value, start, end, dir); + } + + if (!new_value) + return 0; /* abort */ + + if (ih->data->nc && (int)strlen(new_value) > ih->data->nc) + { + if (new_value != value) free(new_value); + return 0; /* abort */ + } + + if (ih->data->mask && iupMaskCheck(ih->data->mask, new_value)==0) + { + if (new_value != value) free(new_value); + return 0; /* abort */ + } + + if (cb) + { + int cb_ret = cb(ih, key, (char*)new_value); + if (cb_ret==IUP_IGNORE) + ret = 0; /* abort processing */ + else if (cb_ret==IUP_CLOSE) + { + IupExitLoop(); + ret = 0; /* abort processing */ + } + else if (cb_ret!=0 && key!=0 && + cb_ret != IUP_DEFAULT && cb_ret != IUP_CONTINUE) + { + WNDPROC oldProc = (WNDPROC)IupGetCallback(ih, "_IUPWIN_OLDPROC_CB"); + CallWindowProc(oldProc, ih->handle, WM_CHAR, cb_ret, 0); /* replace key */ + ret = 0; /* abort processing */ + } + } + + if (new_value != value) free(new_value); + return ret; +} + +static int winTextSpinWmNotify(Ihandle* ih, NMHDR* msg_info, int *result) +{ + if (msg_info->code == UDN_DELTAPOS) + { + NMUPDOWN *updown = (NMUPDOWN*)msg_info; + HWND hSpin = (HWND)iupAttribGet(ih, "_IUPWIN_SPIN"); + int pos = updown->iPos+updown->iDelta; + int min, max; + SendMessage(hSpin, UDM_GETRANGE32, (WPARAM)&min, (LPARAM)&max); + if (pos>=min && pos<=max) + { + IFni cb = (IFni) IupGetCallback(ih, "SPIN_CB"); + if (cb) + { + int ret = cb(ih, pos); + if (ret == IUP_IGNORE) + { + *result = 1; + return 1; + } + } + } + } + + (void)result; + return 0; /* result not used */ +} + +static int winTextProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + int ret = 0; + + if (msg==WM_KEYDOWN) /* process K_ANY before text callbacks */ + { + ret = iupwinBaseProc(ih, msg, wp, lp, result); + if (ret) + { + *result = 0; + return 1; + } + } + + switch (msg) + { + case WM_CHAR: + { + if ((char)wp == '\b') + { + if (!winTextCallActionCb(ih, NULL, 0, -1)) + ret = 1; + } + else if ((char)wp == '\n' || (char)wp == '\r') + { + if (!ih->data->has_formatting && !(GetKeyState(VK_CONTROL) & 0x8000)) /* when formatting is processed in WM_KEYDOWN */ + { + char insert_value[2]; + insert_value[0] = '\n'; + insert_value[1] = 0; + + if (!winTextCallActionCb(ih, insert_value, wp, 1)) + ret = 1; + } + } + else if (!(GetKeyState(VK_CONTROL) & 0x8000 || + GetKeyState(VK_MENU) & 0x8000 || + GetKeyState(VK_LWIN) & 0x8000 || + GetKeyState(VK_RWIN) & 0x8000)) + { + char insert_value[2]; + insert_value[0] = (char)wp; + insert_value[1] = 0; + + if (!winTextCallActionCb(ih, insert_value, wp, 1)) + ret = 1; + } + + PostMessage(ih->handle, WM_CARET, 0, 0L); + + if (!ih->data->is_multiline && + (wp==VK_RETURN || wp==VK_ESCAPE || wp==VK_TAB)) /* the keys have the same definitions as the chars */ + ret = 1; /* abort default processing to avoid beep */ + + if (ih->data->is_multiline && + (wp=='\n' && (GetKeyState(VK_CONTROL) & 0x8000))) + ret = 1; /* abort default processing to avoid inserting a new line */ + + break; + } + case WM_KEYDOWN: + { + if (wp == VK_DELETE) /* Del does not generates a WM_CHAR */ + { + if (!winTextCallActionCb(ih, NULL, 0, 1)) + ret = 1; + } + else if (wp == VK_INSERT && ih->data->has_formatting) + { + if (iupAttribGetBoolean(ih, "OVERWRITE")) + iupAttribSetStr(ih, "OVERWRITE", "OFF"); /* toggle from ON to OFF */ + else + iupAttribSetStr(ih, "OVERWRITE", "ON"); /* toggle from OFF to ON */ + } + else if (wp == 'A' && GetKeyState(VK_CONTROL) & 0x8000) /* Ctrl+A = Select All */ + { + SendMessage(ih->handle, EM_SETSEL, (WPARAM)0, (LPARAM)-1); + } + else if (wp == VK_RETURN && ih->data->has_formatting && !(GetKeyState(VK_CONTROL) & 0x8000)) + { + char insert_value[2]; + insert_value[0] = '\n'; + insert_value[1] = 0; + + if (!winTextCallActionCb(ih, insert_value, '\n', 1)) + ret = 1; + } + + PostMessage(ih->handle, WM_CARET, 0, 0L); + + if (ret) /* if abort processing, then the result is 0 */ + { + *result = 0; + return 1; + } + else + return 0; /* already processed at the begining of this function */ + } + case WM_KEYUP: + { + PostMessage(ih->handle, WM_CARET, 0, 0L); + break; + } + case WM_CLEAR: + { + if (!winTextCallActionCb(ih, NULL, 0, 1)) + ret = 1; + + PostMessage(ih->handle, WM_CARET, 0, 0L); + break; + } + case WM_CUT: + { + if (!winTextCallActionCb(ih, NULL, 0, 1)) + ret = 1; + + PostMessage(ih->handle, WM_CARET, 0, 0L); + break; + } + case WM_PASTE: + { + if (IupGetCallback(ih,"ACTION") || ih->data->mask) /* test before to avoid alocate clipboard text memory */ + { + char* insert_value = iupwinGetClipboardText(ih); + if (insert_value) + { + if (!winTextCallActionCb(ih, insert_value, 0, 1)) + ret = 1; + free(insert_value); + } + } + + PostMessage(ih->handle, WM_CARET, 0, 0L); + break; + } + case WM_UNDO: + { + IFnis cb = (IFnis)IupGetCallback(ih, "ACTION"); + if (cb) + { + char* value; + WNDPROC oldProc = (WNDPROC)IupGetCallback(ih, "_IUPWIN_OLDPROC_CB"); + CallWindowProc(oldProc, ih->handle, WM_UNDO, 0, 0); + + value = winTextGetValueAttrib(ih); + cb(ih, 0, (char*)value); + + ret = 1; + } + + PostMessage(ih->handle, WM_CARET, 0, 0L); + break; + } + case WM_LBUTTONDBLCLK: + case WM_MBUTTONDBLCLK: + case WM_RBUTTONDBLCLK: + case WM_LBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + { + if (iupwinButtonDown(ih, msg, wp, lp)==-1) + { + *result = 0; + return 1; + } + PostMessage(ih->handle, WM_CARET, 0, 0L); + break; + } + case WM_MBUTTONUP: + case WM_RBUTTONUP: + case WM_LBUTTONUP: + { + if (iupwinButtonUp(ih, msg, wp, lp)==-1) + { + *result = 0; + return 1; + } + PostMessage(ih->handle, WM_CARET, 0, 0L); + break; + } + case WM_CARET: + { + winTextCallCaretCb(ih); + break; + } + case WM_MOUSEMOVE: + { + iupwinMouseMove(ih, msg, wp, lp); + break; + } + case WM_VSCROLL: + case WM_HSCROLL: + { + if (ih->data->has_formatting) + { + /* fix weird behavior when dialog has COMPOSITE=YES, + scrollbars are not updated when dragging */ + if (LOWORD(wp) == SB_THUMBTRACK) + SendMessage(ih->handle, EM_SHOWSCROLLBAR, msg==WM_VSCROLL? SB_VERT: SB_HORZ, TRUE); + } + break; + } + } + + if (ret) /* if abort processing, then the result is 0 */ + { + *result = 0; + return 1; + } + else + return iupwinBaseProc(ih, msg, wp, lp, result); +} + +static void winTextCreateSpin(Ihandle* ih) +{ + HWND hSpin; + DWORD dwStyle = WS_CHILD|UDS_ARROWKEYS|UDS_HOTTRACK|UDS_NOTHOUSANDS; + int serial = iupDialogGetChildId(ih); + + if (iupStrEqualNoCase(iupAttribGetStr(ih, "SPINALIGN"), "LEFT")) + dwStyle |= UDS_ALIGNLEFT; + else + dwStyle |= UDS_ALIGNRIGHT; + + if (iupAttribGetBoolean(ih, "SPINWRAP")) + dwStyle |= UDS_WRAP; + + if (iupAttribGetBoolean(ih, "SPINAUTO")) + dwStyle |= UDS_SETBUDDYINT; + + hSpin = CreateWindowEx(0, /* extended window style */ + UPDOWN_CLASS, /* window class */ + NULL, /* title */ + dwStyle, /* window style */ + 0, /* x-position */ + 0, /* y-position */ + 10, /* default width to avoid 0 */ + 10, /* default height to avoid 0 */ + GetParent(ih->handle), /* window parent */ + (HMENU)serial, /* child identifier */ + iupwin_hinstance, /* instance of app. */ + NULL); + + if (!hSpin) + return; + + iupwinHandleAdd(ih, hSpin); + + /* Process WM_NOTIFY */ + IupSetCallback(ih, "_IUPWIN_NOTIFY_CB", (Icallback)winTextSpinWmNotify); + + SendMessage(hSpin, UDM_SETBUDDY, (WPARAM)ih->handle, 0); + iupAttribSetStr(ih, "_IUPWIN_SPIN", (char*)hSpin); + + /* default values */ + SendMessage(hSpin, UDM_SETRANGE32, 0, 100); + SendMessage(hSpin, UDM_SETPOS32, 0, 0); +} + +static int winTextWmCommand(Ihandle* ih, WPARAM wp, LPARAM lp) +{ + int cmd = HIWORD(wp); + switch (cmd) + { + case EN_CHANGE: + { + if (iupAttribGetStr(ih, "IUPWIN_IGNORECHANGE")) + return 0; + + iupBaseCallValueChangedCb(ih); + break; + } + } + + (void)lp; + return 0; /* not used */ +} + +static void winTextLayoutUpdateMethod(Ihandle* ih) +{ + HWND hSpin = (HWND)iupAttribGet(ih, "_IUPWIN_SPIN"); + if (hSpin) + { + if (iupStrEqualNoCase(iupAttribGetStr(ih, "SPINALIGN"), "LEFT")) + { + SetWindowPos(ih->handle, NULL, ih->x+ih->currentheight-1, ih->y, ih->currentwidth-ih->currentheight, ih->currentheight, + SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOOWNERZORDER); + + SetWindowPos(hSpin, NULL, ih->x, ih->y, ih->currentheight, ih->currentheight, + SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOOWNERZORDER); + } + else + { + SetWindowPos(ih->handle, NULL, ih->x, ih->y, ih->currentwidth-ih->currentheight, ih->currentheight, + SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOOWNERZORDER); + + SetWindowPos(hSpin, NULL, ih->x+ih->currentwidth-ih->currentheight-1, ih->y, ih->currentheight, ih->currentheight, + SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOOWNERZORDER); + } + } + else + iupdrvBaseLayoutUpdateMethod(ih); +} + +static int winTextMapMethod(Ihandle* ih) +{ + DWORD dwStyle = WS_CHILD, + dwExStyle = 0; + char* winclass = "EDIT", *value; + + if (!ih->parent) + return IUP_ERROR; + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + dwStyle |= WS_TABSTOP; + + if (ih->data->has_formatting) + { + /* enable richedit 3.0 */ + static HMODULE richedit = NULL; + if (!richedit) + richedit = LoadLibrary("Riched20.dll"); + if (!richedit) + return IUP_ERROR; + + winclass = RICHEDIT_CLASS; + } + + if (ih->data->is_multiline) + { + dwStyle |= ES_AUTOVSCROLL|ES_MULTILINE|ES_WANTRETURN; + + if (iupAttribGetBoolean(ih, "WORDWRAP")) + { + ih->data->sb &= ~IUP_SB_HORIZ; /* must remove the horizontal scroolbar */ + /* and do not specify ES_AUTOHSCROLL, the control automatically wraps words */ + } + else + dwStyle |= ES_AUTOHSCROLL; + + if (ih->data->sb & IUP_SB_HORIZ) + dwStyle |= WS_HSCROLL; + if (ih->data->sb & IUP_SB_VERT) + dwStyle |= WS_VSCROLL; + + if (ih->data->has_formatting && ih->data->sb != IUP_SB_NONE) + { + if (!iupAttribGetBoolean(ih, "AUTOHIDE")) + dwStyle |= ES_DISABLENOSCROLL; + } + } + else + { + dwStyle |= ES_AUTOHSCROLL|ES_NOHIDESEL; + + if (iupAttribGetBoolean(ih, "PASSWORD")) + dwStyle |= ES_PASSWORD; + } + + value = iupAttribGet(ih, "ALIGNMENT"); + if (value) + { + if (iupStrEqualNoCase(value, "ARIGHT")) + dwStyle |= ES_RIGHT; + else if (iupStrEqualNoCase(value, "ACENTER")) + dwStyle |= ES_CENTER; + else /* default "ALEFT" */ + dwStyle |= ES_LEFT; + } + + if (iupAttribGetBoolean(ih, "BORDER")) + dwExStyle |= WS_EX_CLIENTEDGE; + + if (!iupwinCreateWindowEx(ih, winclass, dwExStyle, dwStyle)) + return IUP_ERROR; + + /* Process ACTION_CB and CARET_CB */ + IupSetCallback(ih, "_IUPWIN_CTRLPROC_CB", (Icallback)winTextProc); + + /* Process background color */ + IupSetCallback(ih, "_IUPWIN_CTLCOLOR_CB", (Icallback)winTextCtlColor); + + /* Process WM_COMMAND */ + IupSetCallback(ih, "_IUPWIN_COMMAND_CB", (Icallback)winTextWmCommand); + + /* set defaults */ + SendMessage(ih->handle, EM_LIMITTEXT, 0, 0L); + { + int tabsize = 8*4; + SendMessage(ih->handle, EM_SETTABSTOPS, (WPARAM)1L, (LPARAM)&tabsize); + } + + if (!ih->data->is_multiline && iupAttribGetBoolean(ih, "SPIN")) + winTextCreateSpin(ih); + + /* configure for DRAG&DROP */ + if (IupGetCallback(ih, "DROPFILES_CB")) + iupAttribSetStr(ih, "DRAGDROP", "YES"); + + if (ih->data->has_formatting) + { + SendMessage(ih->handle, EM_SETTEXTMODE, (WPARAM)(TM_RICHTEXT|TM_MULTILEVELUNDO|TM_SINGLECODEPAGE), 0); + SendMessage(ih->handle, EM_SETEVENTMASK, 0, ENM_CHANGE); + } + + if (ih->data->formattags) + { + /* must update FONT before updating the format during map */ + iupUpdateStandardFontAttrib(ih); + iupAttribSetStr(ih, "_IUPWIN_IGNORE_FONT", "1"); + + iupTextUpdateFormatTags(ih); + } + + IupSetCallback(ih, "_IUP_XY2POS_CB", (Icallback)winTextConvertXYToPos); + + return IUP_NOERROR; +} + +void iupdrvTextInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winTextMapMethod; + ic->LayoutUpdate = winTextLayoutUpdateMethod; + + /* Driver Dependent Attribute functions */ + + iupClassRegisterAttribute(ic, "STANDARDFONT", NULL, winTextSetStandardFontAttrib, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, winTextSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTBGCOLOR", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "VISIBLE", iupBaseGetVisibleAttrib, winTextSetVisibleAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "TXTFGCOLOR", IUPAF_NOT_MAPPED); /* usually black */ + + /* IupText only */ + iupClassRegisterAttribute(ic, "PADDING", iupTextGetPaddingAttrib, winTextSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "VALUE", winTextGetValueAttrib, winTextSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTEDTEXT", winTextGetSelectedTextAttrib, winTextSetSelectedTextAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTION", winTextGetSelectionAttrib, winTextSetSelectionAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTIONPOS", winTextGetSelectionPosAttrib, winTextSetSelectionPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARET", winTextGetCaretAttrib, winTextSetCaretAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CARETPOS", winTextGetCaretPosAttrib, winTextSetCaretPosAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "INSERT", NULL, winTextSetInsertAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "APPEND", NULL, winTextSetAppendAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "READONLY", winTextGetReadOnlyAttrib, winTextSetReadOnlyAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "NC", iupTextGetNCAttrib, winTextSetNCAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "CLIPBOARD", NULL, winTextSetClipboardAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTO", NULL, winTextSetScrollToAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SCROLLTOPOS", NULL, winTextSetScrollToPosAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINMIN", NULL, winTextSetSpinMinAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINMAX", NULL, winTextSetSpinMaxAttrib, IUPAF_SAMEASSYSTEM, "100", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPININC", NULL, winTextSetSpinIncAttrib, IUPAF_SAMEASSYSTEM, "1", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPINVALUE", winTextGetSpinValueAttrib, winTextSetSpinValueAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NO_INHERIT); + + /* IupText Windows and GTK only */ + iupClassRegisterAttribute(ic, "ADDFORMATTAG", NULL, iupTextSetAddFormatTagAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ADDFORMATTAG_HANDLE", NULL, iupTextSetAddFormatTagHandleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ALIGNMENT", NULL, winTextSetAlignmentAttrib, IUPAF_SAMEASSYSTEM, "ALEFT", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DRAGDROP", NULL, iupwinSetDragDropAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FORMATTING", iupTextGetFormattingAttrib, iupTextSetFormattingAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "OVERWRITE", NULL, winTextSetOverwriteAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "REMOVEFORMATTING", NULL, winTextSetRemoveFormattingAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TABSIZE", NULL, winTextSetTabSizeAttrib, IUPAF_SAMEASSYSTEM, "8", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "PASSWORD", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + + /* IupText Windows only */ + iupClassRegisterAttribute(ic, "CUEBANNER", NULL, winTextSetCueBannerAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FILTER", NULL, winTextSetFilterAttrib, NULL, NULL, IUPAF_NO_INHERIT); +} diff --git a/iup/src/win/iupwin_timer.c b/iup/src/win/iupwin_timer.c new file mode 100755 index 0000000..f2bb9c5 --- /dev/null +++ b/iup/src/win/iupwin_timer.c @@ -0,0 +1,88 @@ +/** \file + * \brief Timer for the Windows Driver. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_assert.h" +#include "iup_timer.h" + + +static Itable* wintimer_id_table = NULL; /* table indexed by ID containing Ihandle* address */ + +static void CALLBACK winTimerProc(HWND hwnd, UINT msg, UINT_PTR wid, DWORD time) +{ + Icallback cb; + Ihandle *ih; + + (void)time; + (void)msg; + (void)hwnd; + + ih = (Ihandle*)iupTableGet(wintimer_id_table, (char*)wid); + + if (!iupObjectCheck(ih)) /* control could be destroyed before timer callback */ + return; + + cb = IupGetCallback(ih, "ACTION_CB"); + if(cb) + { + if (cb(ih) == IUP_CLOSE) + IupExitLoop(); + } +} + +void iupdrvTimerRun(Ihandle *ih) +{ + unsigned int time_ms; + + if (ih->serial > 0) /* timer already started */ + return; + + time_ms = iupAttribGetInt(ih, "TIME"); + if (time_ms > 0) + { + ih->serial = SetTimer(NULL, 0, time_ms, (TIMERPROC)winTimerProc); + iupTableSet(wintimer_id_table, (const char*)ih->serial, ih, IUPTABLE_POINTER); + } +} + +void iupdrvTimerStop(Ihandle* ih) +{ + if (ih->serial > 0) + { + KillTimer(NULL, ih->serial); + iupTableRemove(wintimer_id_table, (const char*)ih->serial); + ih->serial = -1; + } +} + +static void winTimerRelease(Iclass* ic) +{ + (void)ic; + + if (wintimer_id_table) + { + iupTableDestroy(wintimer_id_table); + wintimer_id_table = NULL; + } +} + +void iupdrvTimerInitClass(Iclass* ic) +{ + ic->Release = winTimerRelease; + + if (!wintimer_id_table) + wintimer_id_table = iupTableCreate(IUPTABLE_POINTERINDEXED); +} diff --git a/iup/src/win/iupwin_tips.c b/iup/src/win/iupwin_tips.c new file mode 100755 index 0000000..f717ace --- /dev/null +++ b/iup/src/win/iupwin_tips.c @@ -0,0 +1,191 @@ +/** \file + * \brief Windows Driver TIPS management + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include + +#include "iup.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" + + +#ifndef TTM_POPUP /* it is defined only when _WIN32_WINNT >= 0x0501 */ +#define TTM_POPUP (WM_USER + 34) +#endif + +static HWND winTipsCreate(HWND hParent) +{ + RECT rect = {1,1,1,1}; + HWND tips_hwnd = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, (LPSTR) NULL, TTS_ALWAYSTIP, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + hParent, (HMENU)NULL, iupwin_hinstance, NULL); + SendMessage(tips_hwnd, TTM_SETMAXTIPWIDTH, 0, (LPARAM)(INT)3000); + SendMessage(tips_hwnd, TTM_SETMARGIN, (WPARAM)0, (LPARAM)&rect); + return tips_hwnd; +} + +static int winTipsSendMessage(Ihandle* ih, HWND tips_hwnd, UINT msg) +{ + TOOLINFO ti; + ZeroMemory(&ti, sizeof(TOOLINFO)); + ti.cbSize = sizeof(TOOLINFO); + ti.uFlags = TTF_SUBCLASS; + ti.hinst = iupwin_hinstance; + ti.uId = 0; + ti.hwnd = ih->handle; + ti.lpszText = LPSTR_TEXTCALLBACK; + ti.rect.right = 3000; + ti.rect.bottom = 3000; + + return SendMessage(tips_hwnd, msg, 0, (LPARAM)&ti); +} + +int iupdrvBaseSetTipAttrib(Ihandle* ih, const char* value) +{ + HWND tips_hwnd = (HWND)iupAttribGet(ih, "_IUPWIN_TIPSWIN"); + if (!tips_hwnd) + { + tips_hwnd = winTipsCreate(ih->handle); + iupAttribSetStr(ih, "_IUPWIN_TIPSWIN", (char*)tips_hwnd); + iupwinHandleAdd(ih, tips_hwnd); + } + + if (value) + winTipsSendMessage(ih, tips_hwnd, TTM_ADDTOOL); + else + winTipsSendMessage(ih, tips_hwnd, TTM_DELTOOL); + + return 1; +} + +int iupdrvBaseSetTipVisibleAttrib(Ihandle* ih, const char* value) +{ + HWND tips_hwnd = (HWND)iupAttribGet(ih, "_IUPWIN_TIPSWIN"); + if (!tips_hwnd) + return 0; + + /* must use IupGetAttribute to use inheritance */ + if (!IupGetAttribute(ih, "TIP")) + return 0; + + if (iupStrBoolean(value)) + SendMessage(tips_hwnd, TTM_POPUP, 0, 0); /* XP Only */ + else + SendMessage(tips_hwnd, TTM_POP, 0, 0); + + return 0; +} + +void iupwinTipsGetDispInfo(LPARAM lp) +{ + COLORREF color, tip_color; + NMTTDISPINFO* tips_info; + Ihandle* ih; + HWND tips_hwnd; + char* value; + + if (!lp) return; + + tips_info = (NMTTDISPINFO*)lp; + ih = iupwinHandleGet(tips_info->hdr.hwndFrom); /* hwndFrom is the tooltip window */ + if (!ih) return; + + tips_hwnd = (HWND)iupAttribGet(ih, "_IUPWIN_TIPSWIN"); + if (tips_hwnd != tips_info->hdr.hwndFrom) return; + + tips_info->hinst = NULL; + tips_info->lpszText = IupGetAttribute(ih, "TIP"); /* must use IupGetAttribute to use inheritance */ + + { + HFONT hfont; + value = iupAttribGetStr(ih, "TIPFONT"); + if (value) + { + if (iupStrEqualNoCase(value, "SYSTEM")) + hfont = NULL; + else + hfont = iupwinGetHFont(value); + } + else + hfont = (HFONT)iupwinGetHFontAttrib(ih); + + if (hfont) + { + HFONT tip_hfont = (HFONT)SendMessage(tips_hwnd, WM_GETFONT, 0, 0); + if (tip_hfont != hfont) + SendMessage(tips_hwnd, WM_SETFONT, (WPARAM)hfont, MAKELPARAM(TRUE,0)); + } + } + + iupwinGetColorRef(ih, "TIPBGCOLOR", &color); + tip_color = (COLORREF)SendMessage(tips_hwnd, TTM_GETTIPBKCOLOR, 0, 0); + if (color != tip_color) + SendMessage(tips_hwnd, TTM_SETTIPBKCOLOR, (WPARAM)color, 0); + + iupwinGetColorRef(ih, "TIPFGCOLOR", &color); + tip_color = (COLORREF)SendMessage(tips_hwnd, TTM_GETTIPTEXTCOLOR, 0, 0); + if (color != tip_color) + SendMessage(tips_hwnd, TTM_SETTIPTEXTCOLOR, (WPARAM)color, 0); + + { + int ballon = IupGetInt(ih, "TIPBALLON"); /* must use IupGetInt to use inheritance */ + DWORD style = GetWindowLong(tips_hwnd, GWL_STYLE); + int tip_ballon = style & TTS_BALLOON? 1: 0; + if (tip_ballon != ballon) + { + if (ballon) + style |= TTS_BALLOON; + else + style &= ~TTS_BALLOON; + SetWindowLong(tips_hwnd, GWL_STYLE, style); + } + + if (ballon) + { + char* ballon_title = IupGetAttribute(ih, "TIPBALLONTITLE"); /* must use IupGetAttribute to use inheritance */ + int ballon_icon = IupGetInt(ih, "TIPBALLONTITLEICON"); /* must use IupGetInt to use inheritance */ + SendMessage(tips_hwnd, TTM_SETTITLEA, ballon_icon, (LPARAM)ballon_title); + } + else + SendMessage(tips_hwnd, TTM_SETTITLEA, 0, 0); + } + + { + int delay = IupGetInt(ih, "TIPDELAY"); /* must use IupGetInt to use inheritance */ + int tip_delay = SendMessage(tips_hwnd, TTM_GETDELAYTIME, TTDT_AUTOPOP, 0); + if (delay != tip_delay) + SendMessage(tips_hwnd, TTM_SETDELAYTIME, TTDT_AUTOPOP, (LPARAM)MAKELONG(delay, 0)); + } + + { + TOOLINFO ti; + + ZeroMemory(&ti, sizeof(TOOLINFO)); + ti.cbSize = sizeof(TOOLINFO); + ti.uId = 0; + ti.hwnd = ih->handle; + + value = iupAttribGet(ih, "TIPRECT"); + if (value) + { + int x1, x2, y1, y2; + sscanf(value, "%d %d %d %d", &x1, &y1, &x2, &y2); + ti.rect.left = x1; ti.rect.right = x2; + ti.rect.top = y1; ti.rect.bottom = y2; + } + else + GetClientRect(ih->handle, &ti.rect); + + SendMessage(tips_hwnd, TTM_NEWTOOLRECT, 0, (LPARAM)&ti); + } +} diff --git a/iup/src/win/iupwin_toggle.c b/iup/src/win/iupwin_toggle.c new file mode 100755 index 0000000..fcaa438 --- /dev/null +++ b/iup/src/win/iupwin_toggle.c @@ -0,0 +1,693 @@ +/** \file + * \brief Toggle Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_toggle.h" +#include "iup_drv.h" +#include "iup_image.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_draw.h" + + +#ifndef CDIS_SHOWKEYBOARDCUES +#define CDIS_SHOWKEYBOARDCUES 0x0200 /* it is defined only when _WIN32_WINNT >= 0x0501 */ +#endif + + +void iupdrvToggleAddCheckBox(int *x, int *y) +{ + (*x) += 16+6; + if ((*y) < 16) (*y) = 16; /* minimum height */ +} + +static int winToggleIsActive(Ihandle* ih) +{ + return iupAttribGetInt(ih, "_IUPWIN_ACTIVE"); +} + +static void winToggleSetBitmap(Ihandle* ih, const char* name, int make_inactive) +{ + if (name) + { + HBITMAP bitmap = iupImageGetImage(name, ih, make_inactive); + SendMessage(ih->handle, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)bitmap); + } + else + SendMessage(ih->handle, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)NULL); /* if not defined */ +} + +static void winToggleUpdateImage(Ihandle* ih, int active, int check) +{ + /* called only when (ih->data->type == IUP_TOGGLE_IMAGE && !iupwin_comctl32ver6) */ + char* name; + + if (!active) + { + name = iupAttribGet(ih, "IMINACTIVE"); + if (name) + winToggleSetBitmap(ih, name, 0); + else + { + /* if not defined then automaticaly create one based on IMAGE */ + name = iupAttribGet(ih, "IMAGE"); + winToggleSetBitmap(ih, name, 1); /* make_inactive */ + } + } + else + { + /* must restore the normal image */ + if (check) + { + name = iupAttribGet(ih, "IMPRESS"); + if (name) + winToggleSetBitmap(ih, name, 0); + else + { + /* if not defined then automaticaly create one based on IMAGE */ + name = iupAttribGet(ih, "IMAGE"); + winToggleSetBitmap(ih, name, 0); + } + } + else + { + name = iupAttribGet(ih, "IMAGE"); + if (name) + winToggleSetBitmap(ih, name, 0); + } + } +} + +static void winToggleGetAlignment(Ihandle* ih, int *horiz_alignment, int *vert_alignment) +{ + char value1[30]="", value2[30]=""; + + iupStrToStrStr(iupAttribGetStr(ih, "ALIGNMENT"), value1, value2, ':'); + + if (iupStrEqualNoCase(value1, "ARIGHT")) + *horiz_alignment = IUP_ALIGN_ARIGHT; + else if (iupStrEqualNoCase(value1, "ALEFT")) + *horiz_alignment = IUP_ALIGN_ALEFT; + else /* "ACENTER" */ + *horiz_alignment = IUP_ALIGN_ACENTER; + + if (iupStrEqualNoCase(value2, "ABOTTOM")) + *vert_alignment = IUP_ALIGN_ABOTTOM; + else if (iupStrEqualNoCase(value2, "ATOP")) + *vert_alignment = IUP_ALIGN_ATOP; + else /* "ACENTER" */ + *vert_alignment = IUP_ALIGN_ACENTER; +} + +static void winToggleDrawImage(Ihandle* ih, HDC hDC, int rect_width, int rect_height, int border, UINT itemState) +{ + int xpad = ih->data->horiz_padding + border, + ypad = ih->data->vert_padding + border; + int horiz_alignment, vert_alignment; + int x, y, width, height, bpp, shift = 1; + HBITMAP hBitmap, hMask = NULL; + char *name; + int make_inactive = 0; + + if (itemState & ODS_DISABLED) + { + name = iupAttribGet(ih, "IMINACTIVE"); + if (!name) + { + name = iupAttribGet(ih, "IMAGE"); + make_inactive = 1; + } + } + else + { + name = iupAttribGet(ih, "IMPRESS"); + if (itemState & ODS_SELECTED && name) + shift = 0; + else + name = iupAttribGet(ih, "IMAGE"); + } + + hBitmap = iupImageGetImage(name, ih, make_inactive); + if (!hBitmap) + return; + + /* must use this info, since image can be a driver image loaded from resources */ + iupdrvImageGetInfo(hBitmap, &width, &height, &bpp); + + winToggleGetAlignment(ih, &horiz_alignment, &vert_alignment); + if (horiz_alignment == IUP_ALIGN_ARIGHT) + x = rect_width - (width + 2*xpad); + else if (horiz_alignment == IUP_ALIGN_ACENTER) + x = (rect_width - (width + 2*xpad))/2; + else /* ALEFT */ + x = 0; + + if (vert_alignment == IUP_ALIGN_ABOTTOM) + y = rect_height - (height + 2*ypad); + else if (vert_alignment == IUP_ALIGN_ATOP) + y = 0; + else /* ACENTER */ + y = (rect_height - (height + 2*ypad))/2; + + x += xpad; + y += ypad; + + if (itemState & ODS_SELECTED && !iupwin_comctl32ver6 && shift) + { + x++; + y++; + } + + if (bpp == 8) + hMask = iupdrvImageCreateMask(IupGetHandle(name)); + + iupwinDrawBitmap(hDC, hBitmap, hMask, x, y, width, height, bpp); + + if (hMask) + DeleteObject(hMask); +} + +static void winToggleDrawItem(Ihandle* ih, DRAWITEMSTRUCT *drawitem) +{ + int width, height, border = 4, check; + HDC hDC; + iupwinBitmapDC bmpDC; + + width = drawitem->rcItem.right - drawitem->rcItem.left; + height = drawitem->rcItem.bottom - drawitem->rcItem.top; + + hDC = iupwinDrawCreateBitmapDC(&bmpDC, drawitem->hDC, width, height); + + iupwinDrawParentBackground(ih, hDC, &drawitem->rcItem); + + check = SendMessage(ih->handle, BM_GETCHECK, 0, 0L); + if (check) + drawitem->itemState |= ODS_SELECTED; + else + drawitem->itemState |= ODS_DEFAULT; /* use default mark for NOT checked */ + + iupwinDrawButtonBorder(ih->handle, hDC, &drawitem->rcItem, drawitem->itemState); + + winToggleDrawImage(ih, hDC, width, height, border, drawitem->itemState); + + if (drawitem->itemState & ODS_FOCUS) + { + border--; + iupdrvDrawFocusRect(ih, hDC, border, border, width-2*border, height-2*border); + } + + iupwinDrawDestroyBitmapDC(&bmpDC); +} + + +/***********************************************************************************************/ + + +static int winToggleSetImageAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + if (value != iupAttribGet(ih, "IMAGE")) + iupAttribSetStr(ih, "IMAGE", (char*)value); + + if (iupwin_comctl32ver6) + iupdrvDisplayRedraw(ih); + else + { + int check = SendMessage(ih->handle, BM_GETCHECK, 0L, 0L); + winToggleUpdateImage(ih, winToggleIsActive(ih), check); + } + return 1; + } + else + return 0; +} + +static int winToggleSetImInactiveAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + if (value != iupAttribGet(ih, "IMINACTIVE")) + iupAttribSetStr(ih, "IMINACTIVE", (char*)value); + + if (iupwin_comctl32ver6) + iupdrvDisplayRedraw(ih); + else + { + int check = SendMessage(ih->handle, BM_GETCHECK, 0L, 0L); + winToggleUpdateImage(ih, winToggleIsActive(ih), check); + } + return 1; + } + else + return 0; +} + +static int winToggleSetImPressAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + if (value != iupAttribGet(ih, "IMPRESS")) + iupAttribSetStr(ih, "IMPRESS", (char*)value); + + if (iupwin_comctl32ver6) + iupdrvDisplayRedraw(ih); + else + { + int check = SendMessage(ih->handle, BM_GETCHECK, 0L, 0L); + winToggleUpdateImage(ih, winToggleIsActive(ih), check); + } + return 1; + } + else + return 0; +} + +static int winToggleSetValueAttrib(Ihandle* ih, const char* value) +{ + Ihandle *radio; + int check; + + if (iupStrEqualNoCase(value,"NOTDEF")) + check = BST_INDETERMINATE; + else if (iupStrBoolean(value)) + check = BST_CHECKED; + else + check = BST_UNCHECKED; + + /* This is necessary because Windows does not handle the radio state + when a toggle is programatically changed. */ + radio = iupRadioFindToggleParent(ih); + if (radio) + { + int oldcheck = (int)SendMessage(ih->handle, BM_GETCHECK, 0, 0L); + + Ihandle* last_tg = (Ihandle*)iupAttribGet(radio, "_IUPWIN_LASTTOGGLE"); + if (check) + { + if (iupObjectCheck(last_tg) && last_tg != ih) + SendMessage(last_tg->handle, BM_SETCHECK, BST_UNCHECKED, 0L); + iupAttribSetStr(radio, "_IUPWIN_LASTTOGGLE", (char*)ih); + } + + if (last_tg != ih && oldcheck != check) + SendMessage(ih->handle, BM_SETCHECK, check, 0L); + } + else + SendMessage(ih->handle, BM_SETCHECK, check, 0L); + + if (ih->data->type == IUP_TOGGLE_IMAGE && !iupwin_comctl32ver6) + winToggleUpdateImage(ih, winToggleIsActive(ih), check); + + return 0; +} + +static char* winToggleGetValueAttrib(Ihandle* ih) +{ + int check = (int)SendMessage(ih->handle, BM_GETCHECK, 0, 0L); + if (check == BST_INDETERMINATE) + return "NOTDEF"; + else if (check == BST_CHECKED) + return "ON"; + else + return "OFF"; +} + +static int winToggleSetActiveAttrib(Ihandle* ih, const char* value) +{ + /* update the inactive image if necessary */ + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + if (iupwin_comctl32ver6) + { + iupBaseSetActiveAttrib(ih, value); + iupdrvDisplayRedraw(ih); + return 0; + } + else + { + int active = iupStrBoolean(value); + int check = SendMessage(ih->handle, BM_GETCHECK, 0, 0L); + if (active) + iupAttribSetStr(ih, "_IUPWIN_ACTIVE", "YES"); + else + iupAttribSetStr(ih, "_IUPWIN_ACTIVE", "NO"); + winToggleUpdateImage(ih, active, check); + return 0; + } + } + + return iupBaseSetActiveAttrib(ih, value); +} + +static char* winToggleGetActiveAttrib(Ihandle* ih) +{ + if (ih->data->type == IUP_TOGGLE_IMAGE && !iupwin_comctl32ver6) + return iupAttribGet(ih, "_IUPWIN_ACTIVE"); + else + return iupBaseGetActiveAttrib(ih); +} + +static int winToggleSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->type == IUP_TOGGLE_TEXT) + { + if (!value) + value = ""; + SetWindowText(ih->handle, value); + } + return 0; +} + +static int winToggleSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + + if (ih->handle && iupwin_comctl32ver6 && ih->data->type == IUP_TOGGLE_IMAGE) + iupdrvDisplayRedraw(ih); + + return 0; +} + +static int winToggleSetBgColorAttrib(Ihandle* ih, const char* value) +{ + (void)value; + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + /* update internal image cache for controls that have the IMAGE attribute */ + iupAttribSetStr(ih, "BGCOLOR", value); + iupImageUpdateParent(ih); + iupdrvDisplayRedraw(ih); + } + return 1; +} + +static char* winToggleGetBgColorAttrib(Ihandle* ih) +{ + /* the most important use of this is to provide + the correct background for images */ + if (iupwin_comctl32ver6 && ih->data->type == IUP_TOGGLE_IMAGE) + { + COLORREF cr; + if (iupwinDrawGetThemeButtonBgColor(ih->handle, &cr)) + { + char* str = iupStrGetMemory(20); + sprintf(str, "%d %d %d", (int)GetRValue(cr), (int)GetGValue(cr), (int)GetBValue(cr)); + return str; + } + } + + if (ih->data->type == IUP_TOGGLE_TEXT) + return iupBaseNativeParentGetBgColorAttrib(ih); + else + return IupGetGlobal("DLGBGCOLOR"); +} + + +/****************************************************************************************/ + + +static int winToggleCtlColor(Ihandle* ih, HDC hdc, LRESULT *result) +{ + COLORREF cr; + + SetBkMode(hdc, TRANSPARENT); + + if (iupwinGetColorRef(ih, "FGCOLOR", &cr)) + SetTextColor(hdc, cr); + + if (iupwinGetParentBgColor(ih, &cr)) + { + SetDCBrushColor(hdc, cr); + *result = (LRESULT)GetStockObject(DC_BRUSH); + return 1; + } + return 0; +} + +static int winToggleWmNotify(Ihandle* ih, NMHDR* msg_info, int *result) +{ + if (msg_info->code == NM_CUSTOMDRAW) + { + /* called only when iupwin_comctl32ver6 AND (ih->data->type==IUP_TOGGLE_IMAGE) */ + NMCUSTOMDRAW *customdraw = (NMCUSTOMDRAW*)msg_info; + + if (customdraw->dwDrawStage==CDDS_PREERASE) + { + DRAWITEMSTRUCT drawitem; + drawitem.itemState = 0; + + if (customdraw->uItemState & CDIS_DISABLED) + drawitem.itemState |= ODS_DISABLED; + else if (customdraw->uItemState & CDIS_SELECTED) + drawitem.itemState |= ODS_SELECTED; + else if (customdraw->uItemState & CDIS_HOT) + drawitem.itemState |= ODS_HOTLIGHT; + else if (customdraw->uItemState & CDIS_DEFAULT) + drawitem.itemState |= ODS_DEFAULT; + + if (customdraw->uItemState & CDIS_FOCUS && (customdraw->uItemState & CDIS_SHOWKEYBOARDCUES)) + drawitem.itemState |= ODS_FOCUS; + + drawitem.hDC = customdraw->hdc; + drawitem.rcItem = customdraw->rc; + + winToggleDrawItem(ih, (void*)&drawitem); /* Simulate a WM_DRAWITEM */ + + *result = CDRF_SKIPDEFAULT; + return 1; + } + } + + return 0; /* result not used */ +} + +static int winToggleProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + (void)lp; + (void)wp; + + switch (msg) + { + case WM_MOUSEACTIVATE: + if (!winToggleIsActive(ih)) + { + *result = MA_NOACTIVATEANDEAT; + return 1; + } + break; + case WM_LBUTTONDOWN: + case WM_LBUTTONUP: + case WM_ACTIVATE: + case WM_SETFOCUS: + if (!winToggleIsActive(ih)) + { + *result = 0; + return 1; + } + break; + } + + if (msg == WM_LBUTTONDOWN) + winToggleUpdateImage(ih, 1, 1); + else if (msg == WM_LBUTTONUP) + winToggleUpdateImage(ih, 1, 0); + + return iupwinBaseProc(ih, msg, wp, lp, result); +} + +static int winToggleWmCommand(Ihandle* ih, WPARAM wp, LPARAM lp) +{ + (void)lp; + + switch (HIWORD(wp)) + { + case BN_DOUBLECLICKED: + case BN_CLICKED: + { + Ihandle *radio; + IFni cb; + int check = SendMessage(ih->handle, BM_GETCHECK, 0, 0L); + + if (ih->data->type == IUP_TOGGLE_IMAGE && !iupwin_comctl32ver6) + { + int active = winToggleIsActive(ih); + winToggleUpdateImage(ih, active, check); + if (!active) + return 0; + } + + radio = iupRadioFindToggleParent(ih); + if (radio) + { + /* This is necessary because Windows does not send a message + when a toggle is unchecked in a Radio. + Also if the toggle is already checked in a radio, + a click will call the callback again. */ + + Ihandle* last_tg = (Ihandle*)iupAttribGet(radio, "_IUPWIN_LASTTOGGLE"); + if (iupObjectCheck(last_tg) && last_tg != ih) + { + /* uncheck last toggle */ + SendMessage(last_tg->handle, BM_SETCHECK, BST_UNCHECKED, 0L); + + cb = (IFni) IupGetCallback(last_tg, "ACTION"); + if (cb && cb(last_tg, 0) == IUP_CLOSE) + IupExitLoop(); + + iupBaseCallValueChangedCb(last_tg); + } + iupAttribSetStr(radio, "_IUPWIN_LASTTOGGLE", (char*)ih); + + if (last_tg != ih) + { + /* check new toggle */ + SendMessage(ih->handle, BM_SETCHECK, BST_CHECKED, 0L); + + cb = (IFni)IupGetCallback(ih, "ACTION"); + if (cb && cb (ih, 1) == IUP_CLOSE) + IupExitLoop(); + + iupBaseCallValueChangedCb(ih); + } + } + else + { + if (check == BST_INDETERMINATE) + check = -1; + + cb = (IFni)IupGetCallback(ih, "ACTION"); + if (cb && cb (ih, check) == IUP_CLOSE) + IupExitLoop(); + + iupBaseCallValueChangedCb(ih); + } + } + } + + + return 0; /* not used */ +} + +static int winToggleMapMethod(Ihandle* ih) +{ + Ihandle* radio = iupRadioFindToggleParent(ih); + char* value; + DWORD dwStyle = WS_CHILD | + BS_NOTIFY; /* necessary because of the base messages */ + + if (!ih->parent) + return IUP_ERROR; + + if (radio) + ih->data->radio = 1; + + value = iupAttribGet(ih, "IMAGE"); + if (value) + { + ih->data->type = IUP_TOGGLE_IMAGE; + dwStyle |= BS_BITMAP|BS_PUSHLIKE; + } + else + { + ih->data->type = IUP_TOGGLE_TEXT; + dwStyle |= BS_TEXT|BS_MULTILINE; + + if (iupAttribGetBoolean(ih, "RIGHTBUTTON")) + dwStyle |= BS_RIGHTBUTTON; + } + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + dwStyle |= WS_TABSTOP; + + if (radio) + { + dwStyle |= BS_RADIOBUTTON; + + if (!iupAttribGet(radio, "_IUPWIN_LASTTOGGLE")) + { + /* this is the first toggle in the radio, and the last toggle with VALUE=ON */ + iupAttribSetStr(ih, "VALUE","ON"); + } + } + else + { + if (ih->data->type == IUP_TOGGLE_TEXT && iupAttribGetBoolean(ih, "3STATE")) + dwStyle |= BS_AUTO3STATE; + else + dwStyle |= BS_AUTOCHECKBOX; + } + + if (!iupwinCreateWindowEx(ih, "BUTTON", 0, dwStyle)) + return IUP_ERROR; + + /* Process WM_COMMAND */ + IupSetCallback(ih, "_IUPWIN_COMMAND_CB", (Icallback)winToggleWmCommand); + + /* Process background color */ + IupSetCallback(ih, "_IUPWIN_CTLCOLOR_CB", (Icallback)winToggleCtlColor); + + if (ih->data->type == IUP_TOGGLE_IMAGE) + { + if (iupwin_comctl32ver6) + IupSetCallback(ih, "_IUPWIN_NOTIFY_CB", (Icallback)winToggleWmNotify); /* Process WM_NOTIFY */ + else + { + IupSetCallback(ih, "_IUPWIN_CTRLPROC_CB", (Icallback)winToggleProc); + iupAttribSetStr(ih, "_IUPWIN_ACTIVE", "YES"); + } + } + + return IUP_NOERROR; +} + +void iupdrvToggleInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winToggleMapMethod; + + /* Driver Dependent Attribute functions */ + + /* Overwrite Visual */ + iupClassRegisterAttribute(ic, "ACTIVE", winToggleGetActiveAttrib, winToggleSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", winToggleGetBgColorAttrib, winToggleSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "DLGBGCOLOR", IUPAF_DEFAULT); + + /* Special */ + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, NULL, "DLGFGCOLOR", NULL, IUPAF_NOT_MAPPED); /* force the new default value */ + iupClassRegisterAttribute(ic, "TITLE", iupdrvBaseGetTitleAttrib, winToggleSetTitleAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupToggle only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", NULL, NULL, IUPAF_SAMEASSYSTEM, "ACENTER:ACENTER", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE", NULL, winToggleSetImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMINACTIVE", NULL, winToggleSetImInactiveAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMPRESS", NULL, winToggleSetImPressAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE", winToggleGetValueAttrib, winToggleSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PADDING", iupToggleGetPaddingAttrib, winToggleSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + + /* IupToggle Windows only */ + iupClassRegisterAttribute(ic, "RIGHTBUTTON", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT); + + /* necessary because it uses an old HBITMAP solution when NOT using styles */ + if (!iupwin_comctl32ver6) /* Used by iupdrvImageCreateImage */ + iupClassRegisterAttribute(ic, "FLAT_ALPHA", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); +} diff --git a/iup/src/win/iupwin_tree.c b/iup/src/win/iupwin_tree.c new file mode 100755 index 0000000..e6877dc --- /dev/null +++ b/iup/src/win/iupwin_tree.c @@ -0,0 +1,2542 @@ +/** \file + * \brief Tree Control + * + * See Copyright Notice in iup.h + */ + +#undef NOTREEVIEW +#include +#include + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_tree.h" +#include "iup_image.h" +#include "iup_array.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_draw.h" +#include "iupwin_info.h" + +typedef struct _winTreeItemData +{ + COLORREF color; + unsigned char kind; + void* userdata; + HFONT hFont; + short image; + short image_expanded; +} winTreeItemData; + +#ifndef TVN_ITEMCHANGING /* Vista Only */ +typedef struct tagNMTVITEMCHANGE { + NMHDR hdr; + UINT uChanged; + HTREEITEM hItem; + UINT uStateNew; + UINT uStateOld; + LPARAM lParam; +} NMTVITEMCHANGE; +#define TVN_ITEMCHANGINGA (TVN_FIRST-16) +#define TVN_ITEMCHANGINGW (TVN_FIRST-17) +#endif + +static void winTreeSetFocusNode(Ihandle* ih, HTREEITEM hItem); +typedef int (*winTreeNodeFunc)(Ihandle* ih, HTREEITEM hItem, void* userdata); + +static int winTreeForEach(Ihandle* ih, HTREEITEM hItem, winTreeNodeFunc func, void* userdata) +{ + HTREEITEM hItemChild; + + if (!hItem) + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + + while(hItem != NULL) + { + if (!func(ih, hItem, userdata)) + return 0; + + hItemChild = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); + if (hItemChild) + { + /* Recursively traverse child items */ + if (!winTreeForEach(ih, hItemChild, func, userdata)) + return 0; + } + + /* Go to next sibling item */ + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hItem); + } + + return 1; +} + +/*****************************************************************************/ +/* FINDING ITEMS */ +/*****************************************************************************/ +static HTREEITEM winTreeFindNodeID(Ihandle* ih, HTREEITEM hItem, HTREEITEM hNode) +{ + TVITEM item; + winTreeItemData* itemData; + + while(hItem != NULL) + { + /* ID control to traverse items */ + ih->data->id_control++; + + /* StateID founded! */ + if(hItem == hNode) + return hItem; + + /* Get hItem attributes */ + item.hItem = hItem; + item.mask = TVIF_HANDLE|TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + /* Check whether we have child items */ + if (itemData->kind == ITREE_BRANCH) + { + /* Recursively traverse child items */ + HTREEITEM hItemChild = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); + hItemChild = winTreeFindNodeID(ih, hItemChild, hNode); + + /* StateID founded! */ + if(hItemChild) + return hItemChild; + } + /* Go to next sibling item */ + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hItem); + } + + return NULL; +} + +static int winTreeGetNodeId(Ihandle* ih, HTREEITEM hItem) +{ + HTREEITEM hItemRoot = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + ih->data->id_control = -1; + if (winTreeFindNodeID(ih, hItemRoot, hItem)) + return ih->data->id_control; + else + return -1; +} + +static HTREEITEM winTreeFindUserDataID(Ihandle* ih, HTREEITEM hItem, void* userdata) +{ + TVITEM item; + winTreeItemData* itemData; + + while(hItem != NULL) + { + /* ID control to traverse items */ + ih->data->id_control++; + + /* Get hItem attributes */ + item.hItem = hItem; + item.mask = TVIF_HANDLE|TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + /* userdata founded! */ + if(itemData->userdata == userdata) + return hItem; + + /* Check whether we have child items */ + if (itemData->kind == ITREE_BRANCH) + { + /* Recursively traverse child items */ + HTREEITEM hItemChild = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); + hItemChild = winTreeFindUserDataID(ih, hItemChild, userdata); + + /* userdata founded! */ + if (hItemChild) + return hItemChild; + } + + /* Go to next sibling item */ + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hItem); + } + + return NULL; +} + +static int winTreeGetUserDataId(Ihandle* ih, void* userdata) +{ + HTREEITEM hItemRoot = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + ih->data->id_control = -1; + if (winTreeFindUserDataID(ih, hItemRoot, userdata)) + return ih->data->id_control; + else + return -1; +} + +static HTREEITEM winTreeFindNodeFromID(Ihandle* ih, HTREEITEM hItem) +{ + TVITEM item; + winTreeItemData* itemData; + + while(hItem != NULL) + { + /* ID control to traverse items */ + ih->data->id_control--; + + /* StateID founded! */ + if(ih->data->id_control < 0) + return hItem; + + /* Get hItem attributes */ + item.hItem = hItem; + item.mask = TVIF_HANDLE|TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + /* Check whether we have child items */ + if (itemData->kind == ITREE_BRANCH) + { + /* Recursively traverse child items */ + HTREEITEM hItemChild = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); + hItemChild = winTreeFindNodeFromID(ih, hItemChild); + + /* StateID founded! */ + if(ih->data->id_control < 0) + return hItemChild; + } + + /* Go to next sibling item */ + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hItem); + } + + return hItem; +} + +static HTREEITEM winTreeFindNodeFromString(Ihandle* ih, const char* name_id) +{ + if (name_id[0]) + { + HTREEITEM hRoot = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + iupStrToInt(name_id, &ih->data->id_control); + return winTreeFindNodeFromID(ih, hRoot); + } + else + return (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CARET, 0); +} + +/* Recursively, find a new brother for the item + that will have its depth changed. Returns the new brother. */ +static HTREEITEM winTreeFindNewBrother(Ihandle* ih, HTREEITEM hBrotherItem) +{ + TVITEM item; + winTreeItemData* itemData; + + while(hBrotherItem != NULL) + { + if(ih->data->id_control < 0) + return hBrotherItem; + + item.hItem = hBrotherItem; + item.mask = TVIF_HANDLE|TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + if (itemData->kind == ITREE_BRANCH) + { + HTREEITEM hItemChild; + + ih->data->id_control--; + hItemChild = winTreeFindNewBrother(ih, (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hBrotherItem)); + + if(ih->data->id_control < 0) + return hItemChild; + } + + hBrotherItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hBrotherItem); + } + + return hBrotherItem; +} + +static HTREEITEM winTreeFindNodePointed(Ihandle* ih) +{ + TVHITTESTINFO info; + DWORD pos = GetMessagePos(); + info.pt.x = LOWORD(pos); + info.pt.y = HIWORD(pos); + + ScreenToClient(ih->handle, &info.pt); + + return (HTREEITEM)SendMessage(ih->handle, TVM_HITTEST, 0, (LPARAM)(LPTVHITTESTINFO)&info); +} + +int iupwinGetColor(const char* value, COLORREF *color) +{ + unsigned char r, g, b; + if (iupStrToRGB(value, &r, &g, &b)) + { + *color = RGB(r,g,b); + return 1; + } + return 0; +} + +/*****************************************************************************/ +/* ADDING ITEMS */ +/*****************************************************************************/ +void iupdrvTreeAddNode(Ihandle* ih, const char* name_id, int kind, const char* title, int add) +{ + TVITEM item, tviPrevItem; + TVINSERTSTRUCT tvins; + HTREEITEM hPrevItem = winTreeFindNodeFromString(ih, name_id); + int kindPrev; + winTreeItemData* itemData; + + if (!hPrevItem) + return; + + itemData = calloc(1, sizeof(winTreeItemData)); + itemData->image = -1; + itemData->image_expanded = -1; + itemData->kind = (unsigned char)kind; + + item.mask = TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT; + item.pszText = (char*)title; + item.lParam = (LPARAM)itemData; + + iupwinGetColor(iupAttribGetStr(ih, "FGCOLOR"), &itemData->color); + + if (kind == ITREE_BRANCH) + { + item.iSelectedImage = item.iImage = (int)ih->data->def_image_collapsed; + + if (ih->data->add_expanded) + { + item.mask |= TVIF_STATE; + item.state = item.stateMask = TVIS_EXPANDED; + item.iSelectedImage = item.iImage = (int)ih->data->def_image_expanded; + } + } + else + item.iSelectedImage = item.iImage = (int)ih->data->def_image_leaf; + + /* Save the heading level in the node's application-defined data area */ + tvins.item = item; + + /* get the KIND attribute of node selected */ + tviPrevItem.hItem = hPrevItem; + tviPrevItem.mask = TVIF_PARAM|TVIF_CHILDREN; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&tviPrevItem); + kindPrev = ((winTreeItemData*)tviPrevItem.lParam)->kind; + + /* Define the parent and the position to the new node inside + the list, using the KIND attribute of node selected */ + if (kindPrev == ITREE_BRANCH && add) + { + tvins.hParent = hPrevItem; + tvins.hInsertAfter = TVI_FIRST; /* insert the new node after item selected, as first child */ + } + else + { + tvins.hParent = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)hPrevItem); + tvins.hInsertAfter = hPrevItem; /* insert the new node after item selected */ + } + + /* Add the node to the tree-view control */ + SendMessage(ih->handle, TVM_INSERTITEM, 0, (LPARAM)(LPTVINSERTSTRUCT)&tvins); + + if (kindPrev == ITREE_BRANCH && tviPrevItem.cChildren==0) + { + /* this is the first child, redraw to update the '+'/'-' buttons */ + iupdrvDisplayRedraw(ih); + } +} + +static void winTreeAddRootNode(Ihandle* ih) +{ + TVITEM item; + TVINSERTSTRUCT tvins; + HTREEITEM hNewItem; + winTreeItemData* itemData; + + itemData = calloc(1, sizeof(winTreeItemData)); + itemData->image = -1; + itemData->image_expanded = -1; + itemData->kind = ITREE_BRANCH; + + item.mask = TVIF_PARAM | TVIF_STATE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + item.state = item.stateMask = TVIS_EXPANDED; + item.iSelectedImage = item.iImage = (int)ih->data->def_image_expanded; + item.lParam = (LPARAM)itemData; + + iupwinGetColor(iupAttribGetStr(ih, "FGCOLOR"), &itemData->color); + + /* Save the heading level in the node's application-defined data area */ + tvins.item = item; + tvins.hInsertAfter = TVI_FIRST; + tvins.hParent = TVI_ROOT; + + /* Add the node to the tree-view control */ + hNewItem = (HTREEITEM)SendMessage(ih->handle, TVM_INSERTITEM, 0, (LPARAM)(LPTVINSERTSTRUCT)&tvins); + + /* MarkStart node */ + iupAttribSetStr(ih, "_IUPTREE_MARKSTART_NODE", (char*)hNewItem); + + /* Set the default VALUE */ + winTreeSetFocusNode(ih, hNewItem); +} + +static int winTreeIsItemExpanded(Ihandle* ih, HTREEITEM hItem) +{ + TVITEM item; + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_STATE; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + return (item.state & TVIS_EXPANDED) != 0; +} + +static void winTreeExpandItem(Ihandle* ih, HTREEITEM hItem, int expand) +{ + if (expand == -1) + expand = !winTreeIsItemExpanded(ih, hItem); /* toggle */ + + if (expand) + SendMessage(ih->handle, TVM_EXPAND, TVE_EXPAND, (LPARAM)hItem); + else + SendMessage(ih->handle, TVM_EXPAND, TVE_COLLAPSE, (LPARAM)hItem); +} + +/*****************************************************************************/ +/* EXPANDING AND STORING ITEMS */ +/*****************************************************************************/ +static void winTreeExpandTree(Ihandle* ih, HTREEITEM hItem, int expand) +{ + HTREEITEM hItemChild; + while(hItem != NULL) + { + hItemChild = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); + + /* Check whether we have child items */ + if (hItemChild) + { + winTreeExpandItem(ih, hItem, expand); + + /* Recursively traverse child items */ + winTreeExpandTree(ih, hItemChild, expand); + } + + /* Go to next sibling item */ + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hItem); + } +} + +/*****************************************************************************/ +/* SELECTING ITEMS */ +/*****************************************************************************/ + +static int winTreeIsItemSelected(Ihandle* ih, HTREEITEM hItem) +{ + return ((SendMessage(ih->handle, TVM_GETITEMSTATE, (WPARAM)hItem, TVIS_SELECTED)) & TVIS_SELECTED)!=0; +} + +static void winTreeSelectItem(Ihandle* ih, HTREEITEM hItem, int select) +{ + TV_ITEM item; + item.mask = TVIF_STATE | TVIF_HANDLE; + item.stateMask = TVIS_SELECTED; + item.hItem = hItem; + + if (select == -1) + select = !winTreeIsItemSelected(ih, hItem); + + item.state = select ? TVIS_SELECTED : 0; + + SendMessage(ih->handle, TVM_SETITEM, 0, (LPARAM)&item); +} + +static HTREEITEM winTreeGetFocusNode(Ihandle* ih) +{ + return (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CARET, 0); +} + +/* ------------Comment from wxWidgets-------------------- + Helper function which tricks the standard control into changing the focused + item without changing anything else. */ +static void winTreeSetFocusNode(Ihandle* ih, HTREEITEM hItem) +{ + HTREEITEM hItemFocus = winTreeGetFocusNode(ih); + if (hItem != hItemFocus) + { + /* remember the selection state of the item */ + int wasSelected = winTreeIsItemSelected(ih, hItem); + int wasFocusSelected = 0; + + if (iupwinIsVista()) + iupAttribSetStr(ih, "_IUPTREE_ALLOW_CHANGE", (char*)hItem); /* Vista Only */ + else + wasFocusSelected = hItemFocus && winTreeIsItemSelected(ih, hItemFocus); + + iupAttribSetStr(ih, "_IUPTREE_IGNORE_SELECTION_CB", "1"); + + if (wasFocusSelected) + { + /* prevent the tree from unselecting the old focus which it would do by default */ + SendMessage(ih->handle, TVM_SELECTITEM, TVGN_CARET, (LPARAM)NULL); /* remove the focus */ + winTreeSelectItem(ih, hItemFocus, 1); /* select again */ + } + + SendMessage(ih->handle, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hItem); /* set focus, selection, and unselect the previous focus */ + + if (!wasSelected) + winTreeSelectItem(ih, hItem, 0); /* need to clear the selection if was not selected */ + + iupAttribSetStr(ih, "_IUPTREE_IGNORE_SELECTION_CB", NULL); + iupAttribSetStr(ih, "_IUPTREE_ALLOW_CHANGE", NULL); + } +} + +typedef struct _winTreeRange{ + HTREEITEM hItem1, hItem2; + char inside, clear; +}winTreeRange; + +static int winTreeSelectRangeFunc(Ihandle* ih, HTREEITEM hItem, winTreeRange* range) +{ + int end_range = 0; + + if (range->inside == 0) /* detect the range start */ + { + if (range->hItem1 == hItem) range->inside=1; + else if (range->hItem2 == hItem) range->inside=1; + } + else if (range->inside == 1) /* detect the range end */ + { + if (range->hItem1 == hItem) end_range=1; + else if (range->hItem2 == hItem) end_range=1; + } + + if (range->inside == 1) /* if inside, select */ + winTreeSelectItem(ih, hItem, 1); + else if (range->clear) /* if outside and clear, unselect */ + winTreeSelectItem(ih, hItem, 0); + + if (end_range || (range->inside && range->hItem1==range->hItem2)) + range->inside=-1; /* update after selecting the node */ + + return 1; +} + +static void winTreeSelectRange(Ihandle* ih, HTREEITEM hItemFrom, HTREEITEM hItemTo, int clear) +{ + winTreeRange range; + range.hItem1 = hItemFrom; + range.hItem2 = hItemTo; + range.inside = 0; + range.clear = (char)clear; + winTreeForEach(ih, NULL, (winTreeNodeFunc)winTreeSelectRangeFunc, &range); +} + +static void winTreeSelectAll(Ihandle* ih) +{ + HTREEITEM hItemRoot = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + winTreeSelectRange(ih, hItemRoot, NULL, 0); +} + +static void winTreeClearSelection(Ihandle* ih, HTREEITEM hItemExcept) +{ + winTreeSelectRange(ih, hItemExcept, hItemExcept, 1); +} + +static int winTreeInvertSelectFunc(Ihandle* ih, HTREEITEM hItem, void* userdata) +{ + winTreeSelectItem(ih, hItem, -1); + (void)userdata; + return 1; +} + +typedef struct _winTreeSelArray{ + Iarray* markedArray; + char is_handle; + int id_control; +}winTreeSelArray; + +static int winTreeSelectedArrayFunc(Ihandle* ih, HTREEITEM hItem, winTreeSelArray* selarray) +{ + selarray->id_control++; + + if (winTreeIsItemSelected(ih, hItem)) + { + if (selarray->is_handle) + { + HTREEITEM* hItemArrayData = (HTREEITEM*)iupArrayInc(selarray->markedArray); + int i = iupArrayCount(selarray->markedArray); + hItemArrayData[i-1] = hItem; + } + else + { + int* intArrayData = (int*)iupArrayInc(selarray->markedArray); + int i = iupArrayCount(selarray->markedArray); + intArrayData[i-1] = selarray->id_control; + } + } + + return 1; +} + +static Iarray* winTreeGetSelectedArray(Ihandle* ih) +{ + Iarray* markedArray = iupArrayCreate(1, sizeof(HTREEITEM)); + winTreeSelArray selarray; + selarray.markedArray = markedArray; + selarray.id_control = -1; + selarray.is_handle = 1; + + winTreeForEach(ih, NULL, (winTreeNodeFunc)winTreeSelectedArrayFunc, &selarray); + + return markedArray; +} + +static Iarray* winTreeGetSelectedArrayId(Ihandle* ih) +{ + Iarray* markedArray = iupArrayCreate(1, sizeof(int)); + winTreeSelArray selarray; + selarray.markedArray = markedArray; + selarray.id_control = -1; + selarray.is_handle = 0; + + winTreeForEach(ih, NULL, (winTreeNodeFunc)winTreeSelectedArrayFunc, &selarray); + + return markedArray; +} + + +/*****************************************************************************/ +/* COPYING ITEMS (Branches and its children) */ +/*****************************************************************************/ +/* Insert the copied item in a new location. Returns the new item. */ +static HTREEITEM winTreeCopyItem(Ihandle* ih, HTREEITEM hItem, HTREEITEM hParent, HTREEITEM hPosition, int full_copy) +{ + TVITEM item; + TVINSERTSTRUCT tvins; + char* title = iupStrGetMemory(255); + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT | TVIF_STATE | TVIF_PARAM; + item.pszText = title; + item.cchTextMax = 255; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + + if (full_copy) /* during a full copy the userdata reference is not copied */ + { + /* create a new one */ + winTreeItemData* itemDataNew = malloc(sizeof(winTreeItemData)); + memcpy(itemDataNew, (void*)item.lParam, sizeof(winTreeItemData)); + itemDataNew->userdata = NULL; + item.lParam = (LPARAM)itemDataNew; + } + + /* Copy everything including user data reference */ + tvins.item = item; + tvins.hInsertAfter = hPosition; + tvins.hParent = hParent; + + /* Add the node to the tree-view control */ + return (HTREEITEM)SendMessage(ih->handle, TVM_INSERTITEM, 0, (LPARAM)(LPTVINSERTSTRUCT)&tvins); +} + +static void winTreeCopyChildren(Ihandle* ih, HTREEITEM hItemSrc, HTREEITEM hItemDst, int full_copy) +{ + HTREEITEM hChildSrc = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItemSrc); + HTREEITEM hNewItem = TVI_FIRST; + while (hChildSrc != NULL) + { + hNewItem = winTreeCopyItem(ih, hChildSrc, hItemDst, hNewItem, full_copy); /* Use the same order they where enumerated */ + + /* Recursively transfer all the items */ + winTreeCopyChildren(ih, hChildSrc, hNewItem, full_copy); + + /* Go to next sibling item */ + hChildSrc = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hChildSrc); + } +} + +/* Copies all items in a branch to a new location. Returns the new branch node. */ +static HTREEITEM winTreeCopyNode(Ihandle* ih, HTREEITEM hItemSrc, HTREEITEM hItemDst, int full_copy) +{ + HTREEITEM hNewItem, hParent; + TVITEM item; + winTreeItemData* itemDataDst; + + /* Get DST node attributes */ + item.hItem = hItemDst; + item.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_STATE; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemDataDst = (winTreeItemData*)item.lParam; + + if (itemDataDst->kind == ITREE_BRANCH && (item.state & TVIS_EXPANDED)) + { + /* copy as first child of expanded branch */ + hParent = hItemDst; + hItemDst = TVI_FIRST; + } + else + { + /* copy as next brother of item or collapsed branch */ + hParent = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)hItemDst); + } + + hNewItem = winTreeCopyItem(ih, hItemSrc, hParent, hItemDst, full_copy); + + winTreeCopyChildren(ih, hItemSrc, hNewItem, full_copy); + + return hNewItem; +} + +/*****************************************************************************/ +/* MANIPULATING IMAGES */ +/*****************************************************************************/ +static void winTreeUpdateImages(Ihandle* ih, HTREEITEM hItem, int mode) +{ + HTREEITEM hItemChild; + TVITEM item; + winTreeItemData* itemData; + + /* called when one of the default images is changed */ + + while(hItem != NULL) + { + /* Get node attributes */ + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + if (itemData->kind == ITREE_BRANCH) + { + if (item.state & TVIS_EXPANDED) + { + if (mode == ITREE_UPDATEIMAGE_EXPANDED) + { + item.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + item.iSelectedImage = item.iImage = (itemData->image_expanded!=-1)? itemData->image_expanded: (int)ih->data->def_image_expanded; + SendMessage(ih->handle, TVM_SETITEM, 0, (LPARAM)(LPTVITEM)&item); + } + } + else + { + if (mode == ITREE_UPDATEIMAGE_COLLAPSED) + { + item.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + item.iSelectedImage = item.iImage = (itemData->image!=-1)? itemData->image: (int)ih->data->def_image_collapsed; + SendMessage(ih->handle, TVM_SETITEM, 0, (LPARAM)(LPTVITEM)&item); + } + } + + /* Recursively traverse child items */ + hItemChild = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); + winTreeUpdateImages(ih, hItemChild, mode); + } + else + { + if (mode == ITREE_UPDATEIMAGE_LEAF) + { + item.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + item.iSelectedImage = item.iImage = (itemData->image!=-1)? itemData->image: (int)ih->data->def_image_leaf; + SendMessage(ih->handle, TVM_SETITEM, 0, (LPARAM)(LPTVITEM)&item); + } + } + + /* Go to next sibling node */ + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hItem); + } +} + +static int winTreeGetImageIndex(Ihandle* ih, const char* name) +{ + HIMAGELIST image_list; + int count, i; + Iarray* bmpArray; + HBITMAP *bmpArrayData; + HBITMAP bmp = iupImageGetImage(name, ih, 0); + if (!bmp) + return -1; + + /* the array is used to avoi adding the same bitmap twice */ + bmpArray = (Iarray*)iupAttribGet(ih, "_IUPWIN_BMPARRAY"); + if (!bmpArray) + { + /* create the array if does not exist */ + bmpArray = iupArrayCreate(50, sizeof(HBITMAP)); + iupAttribSetStr(ih, "_IUPWIN_BMPARRAY", (char*)bmpArray); + } + + bmpArrayData = iupArrayGetData(bmpArray); + + image_list = (HIMAGELIST)SendMessage(ih->handle, TVM_GETIMAGELIST, TVSIL_NORMAL, 0); + if (!image_list) + { + int width, height; + + /* must use this info, since image can be a driver image loaded from resources */ + iupdrvImageGetInfo(bmp, &width, &height, NULL); + + /* create the image list if does not exist */ + image_list = ImageList_Create(width, height, ILC_COLOR32, 0, 50); + SendMessage(ih->handle, TVM_SETIMAGELIST, 0, (LPARAM)image_list); + } + + /* check if that bitmap is already added to the list, + but we can not compare with the actual bitmap at the list since it is a copy */ + count = ImageList_GetImageCount(image_list); + for (i = 0; i < count; i++) + { + if (bmpArrayData[i] == bmp) + return i; + } + + bmpArrayData = iupArrayInc(bmpArray); + bmpArrayData[i] = bmp; + return ImageList_Add(image_list, bmp, NULL); /* the bmp is duplicated at the list */ +} + + +/*****************************************************************************/ +/* CALLBACKS */ +/*****************************************************************************/ + +static int winTreeCallBranchLeafCb(Ihandle* ih, HTREEITEM hItem) +{ + TVITEM item; + winTreeItemData* itemData; + + /* Get Children: branch or leaf */ + item.mask = TVIF_HANDLE|TVIF_PARAM|TVIF_STATE; + item.hItem = hItem; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + if (itemData->kind == ITREE_BRANCH) + { + if (item.state & TVIS_EXPANDED) + { + IFni cbBranchClose = (IFni)IupGetCallback(ih, "BRANCHCLOSE_CB"); + if (cbBranchClose) + return cbBranchClose(ih, winTreeGetNodeId(ih, hItem)); + } + else + { + IFni cbBranchOpen = (IFni)IupGetCallback(ih, "BRANCHOPEN_CB"); + if (cbBranchOpen) + return cbBranchOpen(ih, winTreeGetNodeId(ih, hItem)); + } + } + else + { + IFni cbExecuteLeaf = (IFni)IupGetCallback(ih, "EXECUTELEAF_CB"); + if (cbExecuteLeaf) + return cbExecuteLeaf(ih, winTreeGetNodeId(ih, hItem)); + } + + return IUP_DEFAULT; +} + +static void winTreeCallMultiSelectionCb(Ihandle* ih) +{ + IFnIi cbMulti = (IFnIi)IupGetCallback(ih, "MULTISELECTION_CB"); + if(cbMulti) + { + Iarray* markedArray = winTreeGetSelectedArrayId(ih); + int* id_hitem = (int*)iupArrayGetData(markedArray); + + cbMulti(ih, id_hitem, iupArrayCount(markedArray)); + + iupArrayDestroy(markedArray); + } + else + { + IFnii cbSelec = (IFnii)IupGetCallback(ih, "SELECTION_CB"); + if (cbSelec) + { + Iarray* markedArray = winTreeGetSelectedArrayId(ih); + int* id_hitem = (int*)iupArrayGetData(markedArray); + int i, count = iupArrayCount(markedArray); + + for (i=0; idata->mark_mode == ITREE_MARK_MULTIPLE && IupGetCallback(ih,"MULTISELECTION_CB")) + { + if ((GetKeyState(VK_SHIFT) & 0x8000)) + return; + } + + if (iupAttribGet(ih, "_IUPTREE_IGNORE_SELECTION_CB")) + return; + + cbSelec(ih, winTreeGetNodeId(ih, hItem), status); + } +} + +static int winTreeCallDragDropCb(Ihandle* ih, HTREEITEM hItemDrag, HTREEITEM hItemDrop, int *is_ctrl) +{ + IFniiii cbDragDrop = (IFniiii)IupGetCallback(ih, "DRAGDROP_CB"); + int is_shift = 0; + if ((GetKeyState(VK_SHIFT) & 0x8000)) + is_shift = 1; + if ((GetKeyState(VK_CONTROL) & 0x8000)) + *is_ctrl = 1; + else + *is_ctrl = 0; + + if (cbDragDrop) + { + int drag_id = winTreeGetNodeId(ih, hItemDrag); + int drop_id = winTreeGetNodeId(ih, hItemDrop); + return cbDragDrop(ih, drag_id, drop_id, is_shift, *is_ctrl); + } + + return IUP_CONTINUE; /* allow to move by default if callback not defined */ +} + + +/*****************************************************************************/ +/* GET AND SET ATTRIBUTES */ +/*****************************************************************************/ + + +static int winTreeSetImageBranchExpandedAttrib(Ihandle* ih, const char* value) +{ + ih->data->def_image_expanded = (void*)winTreeGetImageIndex(ih, value); + + /* Update all images, starting at root node */ + winTreeUpdateImages(ih, (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0), ITREE_UPDATEIMAGE_EXPANDED); + + return 1; +} + +static int winTreeSetImageBranchCollapsedAttrib(Ihandle* ih, const char* value) +{ + ih->data->def_image_collapsed = (void*)winTreeGetImageIndex(ih, value); + + /* Update all images, starting at root node */ + winTreeUpdateImages(ih, (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0), ITREE_UPDATEIMAGE_COLLAPSED); + + return 1; +} + +static int winTreeSetImageLeafAttrib(Ihandle* ih, const char* value) +{ + ih->data->def_image_leaf = (void*)winTreeGetImageIndex(ih, value); + + /* Update all images, starting at root node */ + winTreeUpdateImages(ih, (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0), ITREE_UPDATEIMAGE_LEAF); + + return 1; +} + +static int winTreeSetImageExpandedAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return 0; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + itemData->image_expanded = (short)winTreeGetImageIndex(ih, value); + + if (itemData->kind == ITREE_BRANCH && item.state & TVIS_EXPANDED) + { + if (itemData->image_expanded == -1) + item.iSelectedImage = item.iImage = (int)ih->data->def_image_expanded; + else + item.iSelectedImage = item.iImage = itemData->image_expanded; + item.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + SendMessage(ih->handle, TVM_SETITEM, 0, (LPARAM)(const LPTVITEM)&item); + } + + return 1; +} + +static int winTreeSetImageAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return 0; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + itemData->image = (short)winTreeGetImageIndex(ih, value); + + if (itemData->kind == ITREE_BRANCH) + { + if (!(item.state & TVIS_EXPANDED)) + { + if (itemData->image == -1) + item.iSelectedImage = item.iImage = (int)ih->data->def_image_collapsed; + else + item.iSelectedImage = item.iImage = itemData->image; + + item.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + SendMessage(ih->handle, TVM_SETITEM, 0, (LPARAM)(const LPTVITEM)&item); + } + } + else + { + if (itemData->image == -1) + item.iSelectedImage = item.iImage = (int)ih->data->def_image_leaf; + else + item.iSelectedImage = item.iImage = itemData->image; + + item.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + SendMessage(ih->handle, TVM_SETITEM, 0, (LPARAM)(const LPTVITEM)&item); + } + + return 1; +} + +static int winTreeSetTopItemAttrib(Ihandle* ih, const char* value) +{ + HTREEITEM hItem = winTreeFindNodeFromString(ih, value); + if (hItem) + SendMessage(ih->handle, TVM_ENSUREVISIBLE, 0, (LPARAM)hItem); + return 0; +} + +static int winTreeSetSpacingAttrib(Ihandle* ih, const char* value) +{ + if (!iupStrToInt(value, &ih->data->spacing)) + ih->data->spacing = 1; + + if(ih->data->spacing < 1) + ih->data->spacing = 1; + + if (ih->handle) + { + int old_spacing = iupAttribGetInt(ih, "_IUPWIN_OLDSPACING"); + int height = SendMessage(ih->handle, TVM_GETITEMHEIGHT, 0, 0); + height -= 2*old_spacing; + height += 2*ih->data->spacing; + SendMessage(ih->handle, TVM_SETITEMHEIGHT, height, 0); + iupAttribSetInt(ih, "_IUPWIN_OLDSPACING", ih->data->spacing); + return 0; + } + else + return 1; /* store until not mapped, when mapped will be set again */ +} + +static int winTreeSetExpandAllAttrib(Ihandle* ih, const char* value) +{ + HTREEITEM hItemRoot = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + HTREEITEM hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItemRoot); /* skip the root node that is always expanded */ + int expand = iupStrBoolean(value); + winTreeExpandTree(ih, hItem, expand); + return 0; +} + +static int winTreeSetBgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + if (iupStrToRGB(value, &r, &g, &b)) + { + COLORREF cr = RGB(r,g,b); + SendMessage(ih->handle, TVM_SETBKCOLOR, 0, (LPARAM)cr); + + /* update internal image cache */ + iupTreeUpdateImages(ih); + } + return 0; +} + +static char* winTreeGetBgColorAttrib(Ihandle* ih) +{ + COLORREF cr = (COLORREF)SendMessage(ih->handle, TVM_GETBKCOLOR, 0, 0); + if (cr == (COLORREF)-1) + return IupGetGlobal("TXTBGCOLOR"); + else + { + char* str = iupStrGetMemory(20); + sprintf(str, "%d %d %d", (int)GetRValue(cr), (int)GetGValue(cr), (int)GetBValue(cr)); + return str; + } +} + +static void winTreeSetRenameCaretPos(HWND hEdit, const char* value) +{ + int pos = 1; + + if (iupStrToInt(value, &pos)) + { + if (pos < 1) pos = 1; + pos--; /* IUP starts at 1 */ + + SendMessage(hEdit, EM_SETSEL, (WPARAM)pos, (LPARAM)pos); + } +} + +static void winTreeSetRenameSelectionPos(HWND hEdit, const char* value) +{ + int start = 1, end = 1; + + if (iupStrToIntInt(value, &start, &end, ':') != 2) + return; + + if(start < 1 || end < 1) + return; + + start--; /* IUP starts at 1 */ + end--; + + SendMessage(hEdit, EM_SETSEL, (WPARAM)start, (LPARAM)end); +} + +static char* winTreeGetTitle(Ihandle* ih, HTREEITEM hItem) +{ + TVITEM item; + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_TEXT; + item.pszText = iupStrGetMemory(255); + item.cchTextMax = 255; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + return item.pszText; +} + +static char* winTreeGetTitleAttrib(Ihandle* ih, const char* name_id) +{ + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return NULL; + return winTreeGetTitle(ih, hItem); +} + +static int winTreeSetTitleAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + TVITEM item; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return 0; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_TEXT; + item.pszText = (char*)value; + SendMessage(ih->handle, TVM_SETITEM, 0, (LPARAM)(const LPTVITEM)&item); + return 0; +} + +static char* winTreeGetFindUserDataAttrib(Ihandle* ih, const char* name_id) +{ + int id; + char* str = (char*)(name_id+1); /* skip ':' */ + void* userdata = NULL; + if (sscanf(str, "%p", &userdata)!=1) + return NULL; + id = winTreeGetUserDataId(ih, userdata); + if (id == -1) + return NULL; + str = iupStrGetMemory(16); + sprintf(str, "%d", id); + return str; +} + +static char* winTreeGetUserDataAttrib(Ihandle* ih, const char* name_id) +{ + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return NULL; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + return itemData->userdata; +} + +static int winTreeSetUserDataAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return 0; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + itemData->userdata = (void*)value; + + return 0; +} + +static char* winTreeGetTitleFontAttrib(Ihandle* ih, const char* name_id) +{ + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return NULL; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + return iupwinFindHFont(itemData->hFont); +} + +static int winTreeSetTitleFontAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return 0; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + if (value) + itemData->hFont = iupwinGetHFont(value); + else + itemData->hFont = NULL; + + iupdrvDisplayUpdate(ih); + + return 0; +} + +static char* winTreeGetIndentationAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(255); + int indent = (int)SendMessage(ih->handle, TVM_GETINDENT, 0, 0); + sprintf(str, "%d", indent); + return str; +} + +static int winTreeSetIndentationAttrib(Ihandle* ih, const char* value) +{ + int indent; + if (iupStrToInt(value, &indent)) + SendMessage(ih->handle, TVM_SETINDENT, (WPARAM)indent, 0); + return 0; +} + +static char* winTreeGetStateAttrib(Ihandle* ih, const char* name_id) +{ + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return NULL; + + item.hItem = hItem; + item.mask = TVIF_HANDLE|TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + if (itemData->kind == ITREE_BRANCH) + { + if (winTreeIsItemExpanded(ih, hItem)) + return "EXPANDED"; + else + return "COLLAPSED"; + } + + return NULL; +} + +static int winTreeSetStateAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return 0; + + winTreeExpandItem(ih, hItem, iupStrEqualNoCase(value, "EXPANDED")); + return 0; +} + +static char* winTreeGetDepthAttrib(Ihandle* ih, const char* name_id) +{ + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + HTREEITEM hItemRoot = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + int depth = 0; + char* str; + + if (!hItem) + return NULL; + + while((hItemRoot != hItem) && (hItem != NULL)) + { + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)hItem); + depth++; + } + + str = iupStrGetMemory(10); + sprintf(str, "%d", depth); + return str; +} + +static int winTreeSetMoveNodeAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + HTREEITEM hItemDst, hParent, hItemSrc; + + if (!ih->handle) /* do not store the action before map */ + return 0; + hItemSrc = winTreeFindNodeFromString(ih, name_id); + if (!hItemSrc) + return 0; + hItemDst = winTreeFindNodeFromString(ih, value); + if (!hItemDst) + return 0; + + /* If Drag item is an ancestor of Drop item then return */ + hParent = hItemDst; + while(hParent) + { + hParent = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)hParent); + if (hParent == hItemSrc) + return 0; + } + + /* Copying the node and its children to the new position */ + winTreeCopyNode(ih, hItemSrc, hItemDst, 0); /* not a full copy, preserve user data */ + + /* do not delete the user data, we copy the references in CopyNode */ + SendMessage(ih->handle, TVM_DELETEITEM, 0, (LPARAM)hItemSrc); + + return 0; +} + +static int winTreeSetCopyNodeAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + HTREEITEM hItemDst, hParent, hItemSrc; + + if (!ih->handle) /* do not store the action before map */ + return 0; + hItemSrc = winTreeFindNodeFromString(ih, name_id); + if (!hItemSrc) + return 0; + hItemDst = winTreeFindNodeFromString(ih, value); + if (!hItemDst) + return 0; + + /* If Drag item is an ancestor of Drop item then return */ + hParent = hItemDst; + while(hParent) + { + hParent = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)hParent); + if (hParent == hItemSrc) + return 0; + } + + /* Copying the node and its children to the new position */ + winTreeCopyNode(ih, hItemSrc, hItemDst, 1); + + return 0; +} + +static char* winTreeGetColorAttrib(Ihandle* ih, const char* name_id) +{ + unsigned char r, g, b; + char* str; + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return NULL; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + r = GetRValue(itemData->color); + g = GetGValue(itemData->color); + b = GetBValue(itemData->color); + + str = iupStrGetMemory(12); + sprintf(str, "%d %d %d", r, g, b); + return str; +} + +static int winTreeSetColorAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + unsigned char r, g, b; + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return 0; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + if (iupStrToRGB(value, &r, &g, &b)) + { + itemData->color = RGB(r,g,b); + iupdrvDisplayUpdate(ih); + } + + return 0; +} + +static int winTreeSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + + if (iupStrToRGB(value, &r, &g, &b)) + { + COLORREF color = RGB(r,g,b); + SendMessage(ih->handle, TVM_SETTEXTCOLOR, 0, (LPARAM)color); + } + else + SendMessage(ih->handle, TVM_SETTEXTCOLOR, 0, (LPARAM)CLR_DEFAULT); + + return 0; +} + +static char* winTreeGetChildCountAttrib(Ihandle* ih, const char* name_id) +{ + int count; + char* str; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return NULL; + + count = 0; + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); + while(hItem != NULL) + { + count++; + + /* Go to next sibling item */ + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hItem); + } + + str = iupStrGetMemory(10); + sprintf(str, "%d", count); + return str; +} + +static char* winTreeGetCountAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(10); + sprintf(str, "%d", (int)SendMessage(ih->handle, TVM_GETCOUNT, 0, 0)); + return str; +} + +static char* winTreeGetKindAttrib(Ihandle* ih, const char* name_id) +{ + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return NULL; + + item.hItem = hItem; + item.mask = TVIF_HANDLE|TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + if(itemData->kind == ITREE_BRANCH) + return "BRANCH"; + else + return "LEAF"; +} + +static char* winTreeGetParentAttrib(Ihandle* ih, const char* name_id) +{ + char* str; + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return NULL; + + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)hItem); + if (!hItem) + return NULL; + + str = iupStrGetMemory(10); + sprintf(str, "%d", winTreeGetNodeId(ih, hItem)); + return str; +} + +static void winTreeDelNodeData(Ihandle* ih, HTREEITEM hItem) +{ + TVITEM item; + HTREEITEM hChildItem; + + item.hItem = hItem; + item.mask = TVIF_HANDLE|TVIF_PARAM; + if (SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item)) + { + winTreeItemData* itemData = (winTreeItemData*)item.lParam; + if (itemData) + { + IFnis cb = (IFnis)IupGetCallback(ih, "NODEREMOVED_CB"); + if (cb) cb(ih, winTreeGetNodeId(ih, hItem), (char*)itemData->userdata); + free(itemData); + item.lParam = (LPARAM)NULL; + SendMessage(ih->handle, TVM_SETITEM, 0, (LPARAM)(LPTVITEM)&item); + } + } + + hChildItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); + while (hChildItem) + { + winTreeDelNodeData(ih, hChildItem); + hChildItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hChildItem); + } +} + +static int winTreeSetDelNodeAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + if (!ih->handle) /* do not store the action before map */ + return 0; + if(iupStrEqualNoCase(value, "SELECTED")) /* selected here means the specified one */ + { + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + HTREEITEM hItemRoot = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + + /* the root node can't be deleted */ + if(!hItem || hItem == hItemRoot) + return 0; + + /* deleting the specified node (and it's children) */ + winTreeDelNodeData(ih, hItem); + SendMessage(ih->handle, TVM_DELETEITEM, 0, (LPARAM)hItem); + + return 0; + } + else if(iupStrEqualNoCase(value, "CHILDREN")) /* children of the specified one */ + { + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + HTREEITEM hChildItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); + + if(!hItem) + return 0; + + /* deleting the selected node's children */ + while (hChildItem) + { + winTreeDelNodeData(ih, hChildItem); + SendMessage(ih->handle, TVM_DELETEITEM, 0, (LPARAM)hChildItem); + hChildItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); + } + + return 0; + } + else if(iupStrEqualNoCase(value, "MARKED")) + { + int i, count; + Iarray* markedArray; + HTREEITEM* hItemArrayData; + HTREEITEM hItemRoot = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + + /* Delete the array of marked nodes */ + markedArray = winTreeGetSelectedArray(ih); + hItemArrayData = (HTREEITEM*)iupArrayGetData(markedArray); + count = iupArrayCount(markedArray); + + for(i = 0; i < count; i++) + { + if (hItemArrayData[i] != hItemRoot) /* the root node can't be deleted */ + { + winTreeDelNodeData(ih, hItemArrayData[i]); + SendMessage(ih->handle, TVM_DELETEITEM, 0, (LPARAM)hItemArrayData[i]); + } + } + + iupArrayDestroy(markedArray); + + return 0; + } + + return 0; +} + +static int winTreeSetRenameAttrib(Ihandle* ih, const char* value) +{ + HTREEITEM hItemFocus = winTreeGetFocusNode(ih); + if (ih->data->show_rename) + { + IFni cbShowRename = (IFni)IupGetCallback(ih, "SHOWRENAME_CB"); + if (cbShowRename) + cbShowRename(ih, winTreeGetNodeId(ih, hItemFocus)); + + SetFocus(ih->handle); /* the tree must have focus to activate the edit */ + SendMessage(ih->handle, TVM_EDITLABEL, 0, (LPARAM)hItemFocus); + } + else + { + IFnis cbRenameNode = (IFnis)IupGetCallback(ih, "RENAMENODE_CB"); + if (cbRenameNode) + cbRenameNode(ih, winTreeGetNodeId(ih, hItemFocus), winTreeGetTitle(ih, hItemFocus)); + } + + (void)value; + return 0; +} + +static char* winTreeGetMarkedAttrib(Ihandle* ih, const char* name_id) +{ + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return NULL; + + if (winTreeIsItemSelected(ih, hItem)) + return "YES"; + else + return "NO"; +} + +static int winTreeSetMarkedAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return 0; + + winTreeSelectItem(ih, hItem, iupStrBoolean(value)); + return 0; +} + +static int winTreeSetMarkStartAttrib(Ihandle* ih, const char* name_id) +{ + HTREEITEM hItem = winTreeFindNodeFromString(ih, name_id); + if (!hItem) + return 0; + + iupAttribSetStr(ih, "_IUPTREE_MARKSTART_NODE", (char*)hItem); + + return 1; +} + +static char* winTreeGetValueAttrib(Ihandle* ih) +{ + char* str; + HTREEITEM hItemFocus = winTreeGetFocusNode(ih); + if (!hItemFocus) + return "0"; /* default VALUE is root */ + + str = iupStrGetMemory(16); + sprintf(str, "%d", winTreeGetNodeId(ih, hItemFocus)); + return str; +} + +static int winTreeSetMarkAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->mark_mode==ITREE_MARK_SINGLE) + return 0; + + if(iupStrEqualNoCase(value, "BLOCK")) + { + HTREEITEM hItemFocus = winTreeGetFocusNode(ih); + winTreeSelectRange(ih, (HTREEITEM)iupAttribGet(ih, "_IUPTREE_MARKSTART_NODE"), hItemFocus, 0); + } + else if(iupStrEqualNoCase(value, "CLEARALL")) + winTreeClearSelection(ih, NULL); + else if(iupStrEqualNoCase(value, "MARKALL")) + winTreeSelectAll(ih); + else if(iupStrEqualNoCase(value, "INVERTALL")) /* INVERTALL *MUST* appear before INVERT, or else INVERTALL will never be called. */ + winTreeForEach(ih, NULL, (winTreeNodeFunc)winTreeInvertSelectFunc, NULL); + else if(iupStrEqualPartial(value, "INVERT")) /* iupStrEqualPartial allows the use of "INVERTid" form */ + { + HTREEITEM hItem = winTreeFindNodeFromString(ih, &value[strlen("INVERT")]); + if (!hItem) + return 0; + + winTreeSelectItem(ih, hItem, -1); /* toggle */ + } + else + { + HTREEITEM hItem1, hItem2; + + char str1[50], str2[50]; + if (iupStrToStrStr(value, str1, str2, '-')!=2) + return 0; + + hItem1 = winTreeFindNodeFromString(ih, str1); + if (!hItem1) + return 0; + hItem2 = winTreeFindNodeFromString(ih, str2); + if (!hItem2) + return 0; + + winTreeSelectRange(ih, hItem1, hItem2, 0); + } + + return 1; +} + +static int winTreeSetValueAttrib(Ihandle* ih, const char* value) +{ + HTREEITEM hItem = NULL; + HTREEITEM hItemFocus; + + if (winTreeSetMarkAttrib(ih, value)) + return 0; + + hItemFocus = winTreeGetFocusNode(ih); + + if(iupStrEqualNoCase(value, "ROOT")) + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + else if(iupStrEqualNoCase(value, "LAST")) + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_LASTVISIBLE, 0); + else if(iupStrEqualNoCase(value, "PGUP")) + { + int i; + HTREEITEM hItemPrev = hItemFocus; + HTREEITEM hItemNext = hItemFocus; + for(i = 0; i < 10; i++) + { + hItemNext = hItemPrev; + hItemPrev = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_PREVIOUSVISIBLE, (LPARAM)hItemPrev); + if(hItemPrev == NULL) + { + hItemPrev = hItemNext; + break; + } + } + + hItem = hItemPrev; + } + else if(iupStrEqualNoCase(value, "PGDN")) + { + int i; + HTREEITEM hItemPrev = hItemFocus; + HTREEITEM hItemNext = hItemFocus; + + for(i = 0; i < 10; i++) + { + hItemPrev = hItemNext; + hItemNext = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXTVISIBLE, (LPARAM)hItemNext); + if(hItemNext == NULL) + { + hItemNext = hItemPrev; + break; + } + } + + hItem = hItemNext; + } + else if(iupStrEqualNoCase(value, "NEXT")) + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXTVISIBLE, (LPARAM)hItemFocus); + else if(iupStrEqualNoCase(value, "PREVIOUS")) + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_PREVIOUSVISIBLE, (LPARAM)hItemFocus); + else + hItem = winTreeFindNodeFromString(ih, value); + + if (hItem) + { + if (ih->data->mark_mode==ITREE_MARK_SINGLE) + { + iupAttribSetStr(ih, "_IUPTREE_IGNORE_SELECTION_CB", "1"); + winTreeSelectItem(ih, hItem, 1); + iupAttribSetStr(ih, "_IUPTREE_IGNORE_SELECTION_CB", NULL); + } + winTreeSetFocusNode(ih, hItem); + } + + return 0; +} + +void iupdrvTreeUpdateMarkMode(Ihandle *ih) +{ + /* does nothing, must handle single and multiple selection manually in Windows */ + (void)ih; +} + +/*********************************************************************************************************/ + + +static int winTreeEditProc(Ihandle* ih, HWND cbedit, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + switch (msg) + { + case WM_GETDLGCODE: + { + MSG* pMsg = (MSG*)lp; + + if (pMsg && (pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN)) + { + if (pMsg->wParam == VK_ESCAPE || pMsg->wParam == VK_RETURN) + { + /* these keys are not processed if the return code is not this */ + *result = DLGC_WANTALLKEYS; + return 1; + } + } + } + } + + (void)wp; + (void)cbedit; + (void)ih; + return 0; +} + +static LRESULT CALLBACK winTreeEditWinProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +{ + int ret = 0; + LRESULT result = 0; + WNDPROC oldProc; + Ihandle *ih; + + ih = iupwinHandleGet(hwnd); + if (!ih) + return DefWindowProc(hwnd, msg, wp, lp); /* should never happen */ + + /* retrieve the control previous procedure for subclassing */ + oldProc = (WNDPROC)IupGetCallback(ih, "_IUPWIN_EDITOLDPROC_CB"); + + ret = winTreeEditProc(ih, hwnd, msg, wp, lp, &result); + + if (ret) + return result; + else + return CallWindowProc(oldProc, hwnd, msg, wp, lp); +} + +static void winTreeDrag(Ihandle* ih, int x, int y) +{ + HTREEITEM hItemDrop; + + HIMAGELIST dragImageList = (HIMAGELIST)iupAttribGet(ih, "_IUPTREE_DRAGIMAGELIST"); + if (dragImageList) + { + POINT pnt; + pnt.x = x; + pnt.y = y; + GetCursorPos(&pnt); + ClientToScreen(GetDesktopWindow(), &pnt) ; + ImageList_DragMove(pnt.x, pnt.y); + } + + if ((hItemDrop = winTreeFindNodePointed(ih)) != NULL) + { + if(dragImageList) + ImageList_DragShowNolock(FALSE); + + SendMessage(ih->handle, TVM_SELECTITEM, TVGN_DROPHILITE, (LPARAM)hItemDrop); + + /* store the drop item to be executed */ + iupAttribSetStr(ih, "_IUPTREE_DROPITEM", (char*)hItemDrop); + + if(dragImageList) + ImageList_DragShowNolock(TRUE); + } +} + +static void winTreeDrop(Ihandle* ih) +{ + HTREEITEM hItemDrag = (HTREEITEM)iupAttribGet(ih, "_IUPTREE_DRAGITEM"); + HTREEITEM hItemDrop = (HTREEITEM)iupAttribGet(ih, "_IUPTREE_DROPITEM"); + HIMAGELIST dragImageList = (HIMAGELIST)iupAttribGet(ih, "_IUPTREE_DRAGIMAGELIST"); + HTREEITEM hParent; + int is_ctrl; + + if (dragImageList) + { + ImageList_DragLeave(ih->handle); + ImageList_EndDrag(); + ImageList_Destroy(dragImageList); + iupAttribSetStr(ih, "_IUPTREE_DRAGIMAGELIST", NULL); + } + + ReleaseCapture(); + ShowCursor(TRUE); + + /* Remove drop target highlighting */ + SendMessage(ih->handle, TVM_SELECTITEM, TVGN_DROPHILITE, (LPARAM)NULL); + + iupAttribSetStr(ih, "_IUPTREE_DRAGITEM", NULL); + iupAttribSetStr(ih, "_IUPTREE_DROPITEM", NULL); + + if (!hItemDrop || hItemDrag == hItemDrop) + return; + + /* If Drag item is an ancestor of Drop item then return */ + hParent = hItemDrop; + while(hParent) + { + hParent = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)hParent); + if (hParent == hItemDrag) + return; + } + + if (winTreeCallDragDropCb(ih, hItemDrag, hItemDrop, &is_ctrl) == IUP_CONTINUE) + { + /* Copy the dragged item to the new position. */ + HTREEITEM hItemNew = winTreeCopyNode(ih, hItemDrag, hItemDrop, is_ctrl); + + if (!is_ctrl) + { + /* do not delete the user data, we copy the references in CopyNode */ + SendMessage(ih->handle, TVM_DELETEITEM, 0, (LPARAM)hItemDrag); + } + + SendMessage(ih->handle, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hItemNew); /* set focus and selection */ + } +} + +static void winTreeExtendSelect(Ihandle* ih, int x, int y) +{ + HTREEITEM hItemFirstSel; + TVHITTESTINFO info; + HTREEITEM hItem; + info.pt.x = x; + info.pt.y = y; + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_HITTEST, 0, (LPARAM)&info); + + if (!(info.flags & TVHT_ONITEM) || !hItem) + return; + + hItemFirstSel = (HTREEITEM)iupAttribGet(ih, "_IUPTREE_FIRSTSELITEM"); + if (hItemFirstSel) + { + iupAttribSetStr(ih, "_IUPTREE_IGNORE_SELECTION_CB", "1"); + winTreeSelectRange(ih, hItemFirstSel, hItem, 1); + iupAttribSetStr(ih, "_IUPTREE_IGNORE_SELECTION_CB", NULL); + + iupAttribSetStr(ih, "_IUPTREE_LASTSELITEM", (char*)hItem); + winTreeSetFocusNode(ih, hItem); + } +} + +static int winTreeMouseMultiSelect(Ihandle* ih, int x, int y) +{ + TVHITTESTINFO info; + HTREEITEM hItem; + info.pt.x = x; + info.pt.y = y; + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_HITTEST, 0, (LPARAM)&info); + + if (!(info.flags & TVHT_ONITEM) || !hItem) + return 0; + + if (GetKeyState(VK_CONTROL) & 0x8000) /* Control key is down */ + { + /* Toggle selection state */ + winTreeSelectItem(ih, hItem, -1); + iupAttribSetStr(ih, "_IUPTREE_FIRSTSELITEM", (char*)hItem); + + winTreeCallSelectionCb(ih, winTreeIsItemSelected(ih, hItem), hItem); + winTreeSetFocusNode(ih, hItem); + + return 1; + } + else if (GetKeyState(VK_SHIFT) & 0x8000) /* Shift key is down */ + { + HTREEITEM hItemFirstSel = (HTREEITEM)iupAttribGet(ih, "_IUPTREE_FIRSTSELITEM"); + if (hItemFirstSel) + { + iupAttribSetStr(ih, "_IUPTREE_IGNORE_SELECTION_CB", "1"); + winTreeSelectRange(ih, hItemFirstSel, hItem, 1); + iupAttribSetStr(ih, "_IUPTREE_IGNORE_SELECTION_CB", NULL); + + winTreeCallMultiSelectionCb(ih); + winTreeSetFocusNode(ih, hItem); + return 1; + } + } + + /* simple click */ + winTreeClearSelection(ih, hItem); + iupAttribSetStr(ih, "_IUPTREE_FIRSTSELITEM", (char*)hItem); + iupAttribSetStr(ih, "_IUPTREE_EXTENDSELECT", "1"); + + return 0; +} + +static int winTreeProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + switch (msg) + { + case WM_CTLCOLOREDIT: + { + HWND hEdit = (HWND)iupAttribGet(ih, "_IUPWIN_EDITBOX"); + if (hEdit) + { + winTreeItemData* itemData = (winTreeItemData*)iupAttribGet(ih, "_IUPWIN_EDIT_DATA"); + HDC hDC = (HDC)wp; + COLORREF cr; + + SetTextColor(hDC, itemData->color); + + cr = (COLORREF)SendMessage(ih->handle, TVM_GETBKCOLOR, 0, 0); + SetBkColor(hDC, cr); + SetDCBrushColor(hDC, cr); + *result = (LRESULT)GetStockObject(DC_BRUSH); + return 1; + } + + break; + } + case WM_SETFOCUS: + case WM_KILLFOCUS: + { + /* ------------Comment from wxWidgets-------------------- + the tree control greys out the selected item when it loses focus and + paints it as selected again when it regains it, but it won't do it + for the other items itself - help it */ + if (ih->data->mark_mode == ITREE_MARK_MULTIPLE) + { + HTREEITEM hItemChild = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_FIRSTVISIBLE, 0); + RECT rect; + + while(hItemChild != NULL) + { + *(HTREEITEM*)&rect = hItemChild; + if (SendMessage(ih->handle, TVM_GETITEMRECT, TRUE, (LPARAM)&rect)) + InvalidateRect(ih->handle, &rect, FALSE); + + /* Go to next visible item */ + hItemChild = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXTVISIBLE, (LPARAM)hItemChild); + } + } + break; + } + case WM_KEYDOWN: + case WM_SYSKEYDOWN: + { + if (iupwinBaseProc(ih, msg, wp, lp, result)==1) + return 1; + + if (wp == VK_RETURN) + { + HTREEITEM hItemFocus = winTreeGetFocusNode(ih); + if (winTreeCallBranchLeafCb(ih, hItemFocus) != IUP_IGNORE) + winTreeExpandItem(ih, hItemFocus, -1); + + *result = 0; + return 1; + } + else if (wp == VK_F2) + { + winTreeSetRenameAttrib(ih, NULL); + *result = 0; + return 1; + } + else if (wp == VK_SPACE) + { + if (GetKeyState(VK_CONTROL) & 0x8000) + { + HTREEITEM hItemFocus = winTreeGetFocusNode(ih); + /* Toggle selection state */ + winTreeSelectItem(ih, hItemFocus, -1); + } + } + else if (wp == VK_UP || wp == VK_DOWN) + { + HTREEITEM hItemFocus = winTreeGetFocusNode(ih); + if (wp == VK_UP) + hItemFocus = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_PREVIOUSVISIBLE, (LPARAM)hItemFocus); + else + hItemFocus = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_NEXTVISIBLE, (LPARAM)hItemFocus); + if (!hItemFocus) + return 0; + + if (GetKeyState(VK_CONTROL) & 0x8000) + { + /* Only move focus */ + winTreeSetFocusNode(ih, hItemFocus); + + *result = 0; + return 1; + } + else if (GetKeyState(VK_SHIFT) & 0x8000) + { + HTREEITEM hItemFirstSel = (HTREEITEM)iupAttribGet(ih, "_IUPTREE_FIRSTSELITEM"); + if (hItemFirstSel) + { + iupAttribSetStr(ih, "_IUPTREE_IGNORE_SELECTION_CB", "1"); + winTreeSelectRange(ih, hItemFirstSel, hItemFocus, 1); + iupAttribSetStr(ih, "_IUPTREE_IGNORE_SELECTION_CB", NULL); + + winTreeCallMultiSelectionCb(ih); + winTreeSetFocusNode(ih, hItemFocus); + + *result = 0; + return 1; + } + } + + if (ih->data->mark_mode==ITREE_MARK_MULTIPLE) + { + iupAttribSetStr(ih, "_IUPTREE_FIRSTSELITEM", (char*)hItemFocus); + winTreeClearSelection(ih, NULL); + /* normal processing will select the focus item */ + } + } + + return 0; + } + case WM_LBUTTONDOWN: + if (iupwinButtonDown(ih, msg, wp, lp)==-1) + { + *result = 0; + return 1; + } + + if (ih->data->mark_mode==ITREE_MARK_MULTIPLE) + { + /* must set focus on left button down or the tree won't show its focus */ + if (iupAttribGetBoolean(ih, "CANFOCUS")) + SetFocus(ih->handle); + + if (winTreeMouseMultiSelect(ih, (int)(short)LOWORD(lp), (int)(short)HIWORD(lp))) + { + *result = 0; /* abort the normal processing if we process multiple selection */ + return 1; + } + } + break; + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + case WM_LBUTTONDBLCLK: + case WM_MBUTTONDBLCLK: + case WM_RBUTTONDBLCLK: + if (iupwinButtonDown(ih, msg, wp, lp)==-1) + { + *result = 0; + return 1; + } + break; + case WM_MOUSEMOVE: + if (ih->data->show_dragdrop && (HTREEITEM)iupAttribGet(ih, "_IUPTREE_DRAGITEM") != NULL) + winTreeDrag(ih, (int)(short)LOWORD(lp), (int)(short)HIWORD(lp)); + else if (iupAttribGet(ih, "_IUPTREE_EXTENDSELECT")) + winTreeExtendSelect(ih, (int)(short)LOWORD(lp), (int)(short)HIWORD(lp)); + + iupwinMouseMove(ih, msg, wp, lp); + break; + case WM_LBUTTONUP: + case WM_MBUTTONUP: + case WM_RBUTTONUP: + if (iupwinButtonUp(ih, msg, wp, lp)==-1) + { + *result = 0; + return 1; + } + + if (iupAttribGet(ih, "_IUPTREE_EXTENDSELECT")) + { + iupAttribSetStr(ih, "_IUPTREE_EXTENDSELECT", NULL); + if (iupAttribGet(ih, "_IUPTREE_LASTSELITEM")) + { + winTreeCallMultiSelectionCb(ih); + iupAttribSetStr(ih, "_IUPTREE_LASTSELITEM", NULL); + } + } + + if (ih->data->show_dragdrop && (HTREEITEM)iupAttribGet(ih, "_IUPTREE_DRAGITEM") != NULL) + winTreeDrop(ih); + + break; + case WM_CHAR: + { + if (wp==VK_TAB) /* the keys have the same definitions as the chars */ + { + *result = 0; + return 1; /* abort default processing to avoid beep */ + } + break; + } + } + + return iupwinBaseProc(ih, msg, wp, lp, result); +} + +static COLORREF winTreeInvertColor(COLORREF color) +{ + return RGB(~GetRValue(color), ~GetGValue(color), ~GetBValue(color)); +} + +static int winTreeWmNotify(Ihandle* ih, NMHDR* msg_info, int *result) +{ + if (msg_info->code == TVN_ITEMCHANGINGA || msg_info->code == TVN_ITEMCHANGINGW) /* Vista Only */ + { + if (ih->data->mark_mode==ITREE_MARK_MULTIPLE) + { + NMTVITEMCHANGE* info = (NMTVITEMCHANGE*)msg_info; + HTREEITEM hItem = (HTREEITEM)iupAttribGet(ih, "_IUPTREE_ALLOW_CHANGE"); + if (hItem && hItem != info->hItem) /* Workaround for Vista SetFocus */ + { + *result = TRUE; /* prevent the change */ + return 1; + } + } + } + else if (msg_info->code == TVN_SELCHANGED) + { + NMTREEVIEW* info = (NMTREEVIEW*)msg_info; + winTreeCallSelectionCb(ih, 0, info->itemOld.hItem); /* node unselected */ + winTreeCallSelectionCb(ih, 1, info->itemNew.hItem); /* node selected */ + } + else if(msg_info->code == TVN_BEGINLABELEDIT) + { + char* value; + HWND hEdit; + NMTVDISPINFO* info = (NMTVDISPINFO*)msg_info; + + if (iupAttribGet(ih, "_IUPTREE_EXTENDSELECT")) + { + *result = TRUE; /* prevent the change */ + return 1; + } + + hEdit = (HWND)SendMessage(ih->handle, TVM_GETEDITCONTROL, 0, 0); + + /* save the edit box. */ + iupwinHandleAdd(ih, hEdit); + iupAttribSetStr(ih, "_IUPWIN_EDITBOX", (char*)hEdit); + + /* subclass the edit box. */ + IupSetCallback(ih, "_IUPWIN_EDITOLDPROC_CB", (Icallback)GetWindowLongPtr(hEdit, GWLP_WNDPROC)); + SetWindowLongPtr(hEdit, GWLP_WNDPROC, (LONG_PTR)winTreeEditWinProc); + + value = iupAttribGetStr(ih, "RENAMECARET"); + if (value) + winTreeSetRenameCaretPos(hEdit, value); + + value = iupAttribGetStr(ih, "RENAMESELECTION"); + if (value) + winTreeSetRenameSelectionPos(hEdit, value); + + { + winTreeItemData* itemData; + TVITEM item; + item.hItem = info->item.hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + iupAttribSetStr(ih, "_IUPWIN_EDIT_DATA", (char*)itemData); + + if (itemData->hFont) + SendMessage(hEdit, WM_SETFONT, (WPARAM)itemData->hFont, MAKELPARAM(TRUE,0)); + } + } + else if(msg_info->code == TVN_ENDLABELEDIT) + { + NMTVDISPINFO* info = (NMTVDISPINFO*)msg_info; + + iupAttribSetStr(ih, "_IUPWIN_EDITBOX", NULL); + + if (info->item.pszText) + { + IFnis cbRename = (IFnis)IupGetCallback(ih, "RENAME_CB"); + if (cbRename) + { + if (cbRename(ih, winTreeGetNodeId(ih, info->item.hItem), info->item.pszText) == IUP_IGNORE) + { + *result = FALSE; + return 1; + } + } + + *result = TRUE; + return 1; + } + } + else if(msg_info->code == TVN_BEGINDRAG) + { + if (ih->data->show_dragdrop) + { + NMTREEVIEW* pNMTreeView = (NMTREEVIEW*)msg_info; + HTREEITEM hItemDrag = pNMTreeView->itemNew.hItem; + HIMAGELIST dragImageList; + + /* store the drag-and-drop item */ + iupAttribSetStr(ih, "_IUPTREE_DRAGITEM", (char*)hItemDrag); + + /* get the image list for dragging */ + dragImageList = (HIMAGELIST)SendMessage(ih->handle, TVM_CREATEDRAGIMAGE, 0, (LPARAM)hItemDrag); + if (dragImageList) + { + POINT pt = pNMTreeView->ptDrag; + ImageList_BeginDrag(dragImageList, 0, 0, 0); + + ClientToScreen(ih->handle, &pt); + ImageList_DragEnter(NULL, pt.x, pt.y); + + iupAttribSetStr(ih, "_IUPTREE_DRAGIMAGELIST", (char*)dragImageList); + } + + ShowCursor(FALSE); + SetCapture(ih->handle); /* drag only inside the tree */ + } + } + else if(msg_info->code == NM_DBLCLK) + { + HTREEITEM hItemFocus = winTreeGetFocusNode(ih); + TVITEM item; + winTreeItemData* itemData; + + /* Get Children: branch or leaf */ + item.mask = TVIF_HANDLE|TVIF_PARAM; + item.hItem = hItemFocus; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + if (itemData->kind == ITREE_LEAF) + { + IFni cbExecuteLeaf = (IFni)IupGetCallback(ih, "EXECUTELEAF_CB"); + if(cbExecuteLeaf) + cbExecuteLeaf(ih, winTreeGetNodeId(ih, hItemFocus)); + } + } + else if(msg_info->code == TVN_ITEMEXPANDING) + { + /* mouse click by user: click on the "+" sign or double click on the selected node */ + NMTREEVIEW* tree_info = (NMTREEVIEW*)msg_info; + HTREEITEM hItem = tree_info->itemNew.hItem; + + if (winTreeCallBranchLeafCb(ih, hItem) != IUP_IGNORE) + { + TVITEM item; + winTreeItemData* itemData = (winTreeItemData*)tree_info->itemNew.lParam; + + if (tree_info->action == TVE_EXPAND) + item.iSelectedImage = item.iImage = (itemData->image_expanded!=-1)? itemData->image_expanded: (int)ih->data->def_image_expanded; + else + item.iSelectedImage = item.iImage = (itemData->image!=-1)? itemData->image: (int)ih->data->def_image_collapsed; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + SendMessage(ih->handle, TVM_SETITEM, 0, (LPARAM)(LPTVITEM)&item); + } + else + { + *result = TRUE; /* prevent the change */ + return 1; + } + } + else if(msg_info->code == NM_RCLICK) + { + HTREEITEM hItem = winTreeFindNodePointed(ih); + IFni cbRightClick = (IFni)IupGetCallback(ih, "RIGHTCLICK_CB"); + if (cbRightClick) + cbRightClick(ih, winTreeGetNodeId(ih, hItem)); + } + else if (msg_info->code == NM_CUSTOMDRAW) + { + NMTVCUSTOMDRAW *customdraw = (NMTVCUSTOMDRAW*)msg_info; + + if (customdraw->nmcd.dwDrawStage == CDDS_PREPAINT) + { + *result = CDRF_NOTIFYPOSTPAINT|CDRF_NOTIFYITEMDRAW; + return 1; + } + + if (customdraw->nmcd.dwDrawStage == CDDS_ITEMPREPAINT) + { + TVITEM item; + winTreeItemData* itemData; + HTREEITEM hItem = (HTREEITEM)customdraw->nmcd.dwItemSpec; + + item.hItem = hItem; + item.mask = TVIF_HANDLE | TVIF_PARAM; + SendMessage(ih->handle, TVM_GETITEM, 0, (LPARAM)(LPTVITEM)&item); + itemData = (winTreeItemData*)item.lParam; + + if (winTreeIsItemSelected(ih, hItem)) + customdraw->clrText = winTreeInvertColor(itemData->color); + else + customdraw->clrText = itemData->color; + + *result = CDRF_NOTIFYSUBITEMDRAW|CDRF_NOTIFYPOSTPAINT; + + if (itemData->hFont) + { + SelectObject(customdraw->nmcd.hdc, itemData->hFont); + *result |= CDRF_NEWFONT; + } + + return 1; + } + } + + return 0; /* allow the default processsing */ +} + +static int winTreeConvertXYToPos(Ihandle* ih, int x, int y) +{ + TVHITTESTINFO info; + HTREEITEM hItem; + info.pt.x = x; + info.pt.y = y; + hItem = (HTREEITEM)SendMessage(ih->handle, TVM_HITTEST, 0, (LPARAM)&info); + if (hItem) + return winTreeGetNodeId(ih, hItem); + return -1; +} + + +/*******************************************************************************************/ + +static void winTreeUnMapMethod(Ihandle* ih) +{ + Iarray* bmp_array; + HIMAGELIST image_list; + + HTREEITEM itemRoot = (HTREEITEM)SendMessage(ih->handle, TVM_GETNEXTITEM, TVGN_ROOT, 0); + winTreeDelNodeData(ih, itemRoot); + + image_list = (HIMAGELIST)SendMessage(ih->handle, TVM_GETIMAGELIST, TVSIL_NORMAL, 0); + if (image_list) + ImageList_Destroy(image_list); + + bmp_array = (Iarray*)iupAttribGet(ih, "_IUPWIN_BMPARRAY"); + if (bmp_array) + iupArrayDestroy(bmp_array); + + iupdrvBaseUnMapMethod(ih); +} + +static int winTreeMapMethod(Ihandle* ih) +{ + DWORD dwStyle = WS_CHILD | WS_BORDER | TVS_SHOWSELALWAYS; + + /* can be set only on the Tree View creation */ + + if (!ih->data->show_dragdrop) + dwStyle |= TVS_DISABLEDRAGDROP; + + if (ih->data->show_rename) + dwStyle |= TVS_EDITLABELS; + + if (!iupAttribGetBoolean(ih, "HIDELINES")) + dwStyle |= TVS_HASLINES; + + if (!iupAttribGetBoolean(ih, "HIDEBUTTONS")) + dwStyle |= TVS_HASBUTTONS; + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + dwStyle |= WS_TABSTOP; + + if (!ih->parent) + return IUP_ERROR; + + if (!iupwinCreateWindowEx(ih, WC_TREEVIEW, 0, dwStyle)) + return IUP_ERROR; + + IupSetCallback(ih, "_IUPWIN_CTRLPROC_CB", (Icallback)winTreeProc); + IupSetCallback(ih, "_IUPWIN_NOTIFY_CB", (Icallback)winTreeWmNotify); + + /* Force background update before setting the images */ + { + char* value = iupAttribGet(ih, "BGCOLOR"); + if (value) + { + winTreeSetBgColorAttrib(ih, value); + iupAttribSetStr(ih, "BGCOLOR", NULL); + } + else if (iupwinGetSystemMajorVersion()<6) /* force background in XP because of the editbox background */ + winTreeSetBgColorAttrib(ih, IupGetGlobal("TXTBGCOLOR")); + } + + /* Initialize the default images */ + ih->data->def_image_leaf = (void*)winTreeGetImageIndex(ih, "IMGLEAF"); + ih->data->def_image_collapsed = (void*)winTreeGetImageIndex(ih, "IMGCOLLAPSED"); + ih->data->def_image_expanded = (void*)winTreeGetImageIndex(ih, "IMGEXPANDED"); + + /* Add the Root Node */ + winTreeAddRootNode(ih); + + /* configure for DRAG&DROP of files */ + if (IupGetCallback(ih, "DROPFILES_CB")) + iupAttribSetStr(ih, "DRAGDROP", "YES"); + + IupSetCallback(ih, "_IUP_XY2POS_CB", (Icallback)winTreeConvertXYToPos); + + return IUP_NOERROR; +} + +void iupdrvTreeInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winTreeMapMethod; + ic->UnMap = winTreeUnMapMethod; + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", winTreeGetBgColorAttrib, winTreeSetBgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTBGCOLOR", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, winTreeSetFgColorAttrib, IUPAF_SAMEASSYSTEM, "TXTFGCOLOR", IUPAF_DEFAULT); + + /* IupTree Attributes - GENERAL */ + iupClassRegisterAttribute(ic, "EXPANDALL", NULL, winTreeSetExpandAllAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "INDENTATION", winTreeGetIndentationAttrib, winTreeSetIndentationAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "COUNT", winTreeGetCountAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DRAGDROP", NULL, iupwinSetDragDropAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SPACING", iupTreeGetSpacingAttrib, winTreeSetSpacingAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "TOPITEM", NULL, winTreeSetTopItemAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + + /* IupTree Attributes - IMAGES */ + iupClassRegisterAttributeId(ic, "IMAGE", NULL, winTreeSetImageAttrib, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "IMAGEEXPANDED", NULL, winTreeSetImageExpandedAttrib, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "IMAGELEAF", NULL, winTreeSetImageLeafAttrib, IUPAF_SAMEASSYSTEM, "IMGLEAF", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGEBRANCHCOLLAPSED", NULL, winTreeSetImageBranchCollapsedAttrib, IUPAF_SAMEASSYSTEM, "IMGCOLLAPSED", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGEBRANCHEXPANDED", NULL, winTreeSetImageBranchExpandedAttrib, IUPAF_SAMEASSYSTEM, "IMGEXPANDED", IUPAF_NO_INHERIT); + + /* IupTree Attributes - NODES */ + iupClassRegisterAttributeId(ic, "STATE", winTreeGetStateAttrib, winTreeSetStateAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "DEPTH", winTreeGetDepthAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "KIND", winTreeGetKindAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "PARENT", winTreeGetParentAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "NAME", winTreeGetTitleAttrib, winTreeSetTitleAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TITLE", winTreeGetTitleAttrib, winTreeSetTitleAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "CHILDCOUNT", winTreeGetChildCountAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "USERDATA", winTreeGetUserDataAttrib, winTreeSetUserDataAttrib, IUPAF_NO_STRING|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "COLOR", winTreeGetColorAttrib, winTreeSetColorAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "TITLEFONT", winTreeGetTitleFontAttrib, winTreeSetTitleFontAttrib, IUPAF_NO_INHERIT); + + /* IupTree Attributes - MARKS */ + iupClassRegisterAttributeId(ic, "MARKED", winTreeGetMarkedAttrib, winTreeSetMarkedAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttribute (ic, "MARK", NULL, winTreeSetMarkAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute (ic, "STARTING", NULL, winTreeSetMarkStartAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute (ic, "MARKSTART", NULL, winTreeSetMarkStartAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute (ic, "VALUE", winTreeGetValueAttrib, winTreeSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + + /* IupTree Attributes - ACTION */ + iupClassRegisterAttributeId(ic, "DELNODE", NULL, winTreeSetDelNodeAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RENAME", NULL, winTreeSetRenameAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "MOVENODE", NULL, winTreeSetMoveNodeAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "COPYNODE", NULL, winTreeSetCopyNodeAttrib, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "FINDUSERDATA", winTreeGetFindUserDataAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); +} diff --git a/iup/src/win/iupwin_val.c b/iup/src/win/iupwin_val.c new file mode 100755 index 0000000..706c612 --- /dev/null +++ b/iup/src/win/iupwin_val.c @@ -0,0 +1,315 @@ +/** \file + * \brief Valuator Control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_val.h" +#include "iup_drv.h" + +#include "iupwin_drv.h" +#include "iupwin_handle.h" +#include "iupwin_draw.h" + + +#ifndef SHRT_MAX +#define SHRT_MAX 32767 +#endif + +void iupdrvValGetMinSize(Ihandle* ih, int *w, int *h) +{ + int ticks_size = 0; + if (iupAttribGetInt(ih, "SHOWTICKS")) + { + char* tickspos = iupAttribGetStr(ih, "TICKSPOS"); + if(iupStrEqualNoCase(tickspos, "BOTH")) + ticks_size = 2*8; + else + ticks_size = 8; + } + + if (ih->data->type == IVAL_HORIZONTAL) + { + *w = 35; + *h = 30+ticks_size; + } + else + { + *w = 30+ticks_size; + *h = 35; + } +} + +static int winValSetStepAttrib(Ihandle* ih, const char* value) +{ + int linesize; + ih->data->step = atof(value); + linesize = (int)(ih->data->step*SHRT_MAX); + SendMessage(ih->handle, TBM_SETLINESIZE, 0, linesize); + return 0; /* do not store value in hash table */ +} + +static int winValSetPageStepAttrib(Ihandle* ih, const char* value) +{ + int pagesize; + ih->data->pagestep = atof(value); + pagesize = (int)(ih->data->pagestep*SHRT_MAX); + SendMessage(ih->handle, TBM_SETPAGESIZE, 0, pagesize); + return 0; /* do not store value in hash table */ +} + +static int winValSetShowTicksAttrib(Ihandle* ih, const char* value) +{ + int tick_freq, show_ticks; + + if (!ih->data->show_ticks) /* can only set if already not zero */ + return 0; + + show_ticks = atoi(value); + if (show_ticks<2) show_ticks=2; + ih->data->show_ticks = show_ticks; + + /* Defines the interval frequency for tick marks */ + tick_freq = SHRT_MAX/(show_ticks-1); + SendMessage(ih->handle, TBM_SETTICFREQ, tick_freq, 0); + return 0; +} + +static int winValSetValueAttrib(Ihandle* ih, const char* value) +{ + int ival; + + ih->data->val = atof(value); + iupValCropValue(ih); + + ival = (int)(((ih->data->val-ih->data->vmin)/(ih->data->vmax - ih->data->vmin))*SHRT_MAX); + if (ih->data->inverted) + ival = SHRT_MAX-ival; + + SendMessage(ih->handle, TBM_SETPOS, TRUE, ival); + return 0; /* do not store value in hash table */ +} + + +/*********************************************************************************************/ + + +static int winValCtlColor(Ihandle* ih, HDC hdc, LRESULT *result) +{ + COLORREF cr; + if (iupwinGetParentBgColor(ih, &cr)) + { + SetDCBrushColor(hdc, cr); + *result = (LRESULT)GetStockObject(DC_BRUSH); + return 1; + } + return 0; +} + +static int winValCustomScroll(Ihandle* ih, int msg) +{ + double old_val = ih->data->val; + int ival; + IFn cb; + + ival = (int)SendMessage(ih->handle, TBM_GETPOS, 0, 0); + if (ih->data->inverted) + ival = SHRT_MAX-ival; + + ih->data->val = (((double)ival/(double)SHRT_MAX)*(ih->data->vmax - ih->data->vmin)) + ih->data->vmin; + iupValCropValue(ih); + + cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (cb) + { + if (ih->data->val == old_val) + return 0; + + cb(ih); + } + else + { + IFnd cb_old = NULL; + switch (msg) + { + case TB_BOTTOM: + case TB_TOP: + case TB_LINEDOWN: + case TB_LINEUP: + case TB_PAGEDOWN: + case TB_PAGEUP: + { + cb_old = (IFnd) IupGetCallback(ih, "BUTTON_PRESS_CB"); + break; + } + case TB_THUMBPOSITION: + { + cb_old = (IFnd) IupGetCallback(ih, "BUTTON_RELEASE_CB"); + break; + } + case TB_THUMBTRACK: + { + cb_old = (IFnd) IupGetCallback(ih, "MOUSEMOVE_CB"); + break; + } + } + if (cb_old) + cb_old(ih, ih->data->val); + } + + return 0; /* not used */ +} + +static void winValIncPageValue(Ihandle *ih, int dir) +{ + int pagesize, ival; + pagesize = (int)(ih->data->pagestep*SHRT_MAX); + + ival = (int)SendMessage(ih->handle, TBM_GETPOS, 0, 0); + ival += dir*pagesize; + if (ival < 0) ival = 0; + if (ival > SHRT_MAX) ival = SHRT_MAX; + SendMessage(ih->handle, TBM_SETPOS, TRUE, ival); + + winValCustomScroll(ih, 0); +} + +static int winValProc(Ihandle* ih, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result) +{ + (void)lp; + + switch (msg) + { + case WM_ERASEBKGND: + { + RECT rect; + HDC hDC = (HDC)wp; + GetClientRect(ih->handle, &rect); + iupwinDrawParentBackground(ih, hDC, &rect); + /* return non zero value */ + *result = 1; + return 1; + } + case WM_KEYDOWN: + case WM_SYSKEYDOWN: + { + if (iupwinBaseProc(ih, msg, wp, lp, result)==1) + return 1; + + if (GetKeyState(VK_CONTROL) & 0x8000) /* handle Ctrl+Arrows */ + { + if (wp == VK_UP || wp == VK_LEFT) + { + winValIncPageValue(ih, -1); + *result = 0; + return 1; + } + if (wp == VK_RIGHT || wp == VK_DOWN) + { + winValIncPageValue(ih, 1); + *result = 0; + return 1; + } + } + return 0; + } + } + + return iupwinBaseProc(ih, msg, wp, lp, result); +} + + +/*********************************************************************************************/ + + +static int winValMapMethod(Ihandle* ih) +{ + DWORD dwStyle = WS_CHILD | TBS_AUTOTICKS; + int show_ticks; + + if (!ih->parent) + return IUP_ERROR; + + /* Track bar Orientation */ + if (ih->data->type == IVAL_HORIZONTAL) + dwStyle |= TBS_HORZ; + else + dwStyle |= TBS_VERT; + + if (iupAttribGetBoolean(ih, "CANFOCUS")) + dwStyle |= WS_TABSTOP; + + /* Track bar Ticks */ + show_ticks = iupAttribGetInt(ih, "SHOWTICKS"); + if (!show_ticks) + { + dwStyle |= TBS_NOTICKS; /* No show_ticks */ + } + else + { + char* tickspos; + + if (show_ticks<2) show_ticks=2; + ih->data->show_ticks = show_ticks; /* non zero value, can be changed later, but not to zero */ + + /* Defines the position of tick marks */ + tickspos = iupAttribGetStr(ih, "TICKSPOS"); + if(iupStrEqualNoCase(tickspos, "BOTH")) + dwStyle |= TBS_BOTH; + else if(iupStrEqualNoCase(tickspos, "REVERSE")) + dwStyle |= TBS_BOTTOM; /* same as TBS_RIGHT */ + else /* NORMAL */ + dwStyle |= TBS_TOP; /* same as TBS_LEFT */ + } + + if (!iupwinCreateWindowEx(ih, TRACKBAR_CLASS, 0, dwStyle)) + return IUP_ERROR; + + /* Process Keyboard */ + IupSetCallback(ih, "_IUPWIN_CTRLPROC_CB", (Icallback)winValProc); + + /* Process Val Scroll commands */ + IupSetCallback(ih, "_IUPWIN_CUSTOMSCROLL_CB", (Icallback)winValCustomScroll); + + /* Process background color */ + IupSetCallback(ih, "_IUPWIN_CTLCOLOR_CB", (Icallback)winValCtlColor); + + /* configure the native range */ + SendMessage(ih->handle, TBM_SETRANGEMIN, FALSE, 0); + SendMessage(ih->handle, TBM_SETRANGEMAX, FALSE, SHRT_MAX); + + if (ih->data->inverted) + SendMessage(ih->handle, TBM_SETPOS, FALSE, SHRT_MAX); /* default initial position is at MIN */ + + return IUP_NOERROR; +} + +void iupdrvValInitClass(Iclass* ic) +{ + /* Driver Dependent Class functions */ + ic->Map = winValMapMethod; + + /* IupVal only */ + iupClassRegisterAttribute(ic, "VALUE", iupValGetValueAttrib, winValSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWTICKS", iupValGetShowTicksAttrib, winValSetShowTicksAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "PAGESTEP", iupValGetPageStepAttrib, winValSetPageStepAttrib, "0.1", NULL, IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "STEP", iupValGetStepAttrib, winValSetStepAttrib, "0.01", NULL, IUPAF_NO_INHERIT); /* force new default value */ + + iupClassRegisterAttribute(ic, "TICKSPOS", NULL, NULL, "NORMAL", NULL, IUPAF_NOT_MAPPED); +} diff --git a/iup/src/win/iupwindows_help.c b/iup/src/win/iupwindows_help.c new file mode 100755 index 0000000..f3a06b6 --- /dev/null +++ b/iup/src/win/iupwindows_help.c @@ -0,0 +1,32 @@ +/** \file + * \brief Windows Driver IupHelp + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include + +#include "iup.h" + +int IupHelp(const char* url) +{ + int err = (int)ShellExecute(GetDesktopWindow(), "open", url, NULL, NULL, SW_SHOWNORMAL); + if (err <= 32) + { + switch (err) + { + case ERROR_FILE_NOT_FOUND: + case ERROR_PATH_NOT_FOUND: + return -2; /* File not found */ + break; + default: + return -1; /* Generic error */ + break; + } + } + return 1; +} diff --git a/iup/src/win/iupwindows_info.c b/iup/src/win/iupwindows_info.c new file mode 100755 index 0000000..982c980 --- /dev/null +++ b/iup/src/win/iupwindows_info.c @@ -0,0 +1,212 @@ +/** \file + * \brief Windows System Information + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +/* This module should depend only on IUP core headers + and Windows system headers. */ + +#include + +#include "iup_str.h" +#include "iup_drvinfo.h" + + +int iupdrvMakeDirectory(const char* name) +{ + if (CreateDirectory(name, NULL)) + return 1; + else + return 0; +} + +int iupdrvIsFile(const char* name) +{ + DWORD attrib = GetFileAttributes(name); + if (attrib == INVALID_FILE_ATTRIBUTES) + return 0; + if (attrib & FILE_ATTRIBUTE_DIRECTORY) + return 0; + return 1; +} + +int iupdrvIsDirectory(const char* name) +{ + DWORD attrib = GetFileAttributes(name); + if (attrib == INVALID_FILE_ATTRIBUTES) + return 0; + if (attrib & FILE_ATTRIBUTE_DIRECTORY) + return 1; + return 0; +} + +char* iupdrvGetCurrentDirectory(void) +{ + char* cur_dir; + int len = GetCurrentDirectory(0, NULL); + if (len == 0) return NULL; + + cur_dir = malloc(len+2); + GetCurrentDirectory(len+1, cur_dir); + cur_dir[len] = '\\'; + cur_dir[len+1] = 0; + return cur_dir; +} + +int iupdrvSetCurrentDirectory(const char* dir) +{ + return SetCurrentDirectory(dir); +} + +int iupdrvGetWindowDecor(void* wnd, int *border, int *caption) +{ + WINDOWINFO wi; + wi.cbSize = sizeof(WINDOWINFO); + GetWindowInfo((HWND)wnd, &wi); + + *border = wi.cxWindowBorders; + + if (wi.rcClient.bottom == wi.rcClient.top) + *caption = wi.rcClient.bottom - wi.cyWindowBorders; + else + { + /* caption = window height - top border - client height */ + *caption = (wi.rcWindow.bottom-wi.rcWindow.top) - 2*wi.cyWindowBorders - (wi.rcClient.bottom-wi.rcClient.top); + } + + return 1; +} + +void iupdrvGetScreenSize(int *width, int *height) +{ + RECT area; + SystemParametersInfo(SPI_GETWORKAREA, 0, &area, 0); + *width = (int)(area.right - area.left); + *height = (int)(area.bottom - area.top); +} + +void iupdrvGetFullSize(int *width, int *height) +{ + RECT rect; + GetWindowRect(GetDesktopWindow(), &rect); + *width = rect.right - rect.left; + *height = rect.bottom - rect.top; +} + +int iupdrvGetScreenDepth(void) +{ + int bpp; + HDC hDCDisplay = GetDC(NULL); + bpp = GetDeviceCaps(hDCDisplay, BITSPIXEL); + ReleaseDC(NULL, hDCDisplay); + return bpp; +} + +void iupdrvGetCursorPos(int *x, int *y) +{ + POINT CursorPoint; + GetCursorPos(&CursorPoint); + *x = (int)CursorPoint.x; + *y = (int)CursorPoint.y; +} + +void iupdrvGetKeyState(char* key) +{ + if (GetAsyncKeyState(VK_SHIFT) & 0x8000) + key[0] = 'S'; + else + key[0] = ' '; + if (GetAsyncKeyState(VK_CONTROL) & 0x8000) + key[1] = 'C'; + else + key[1] = ' '; + if (GetAsyncKeyState(VK_MENU) & 0x8000) + key[2] = 'A'; + else + key[2] = ' '; + if ((GetAsyncKeyState(VK_LWIN) & 0x8000) || (GetAsyncKeyState(VK_RWIN) & 0x8000)) + key[3] = 'Y'; + else + key[3] = ' '; + + key[4] = 0; +} + +char *iupdrvGetSystemName(void) +{ + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&osvi); + + if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) + { + if (osvi.dwMajorVersion <= 4) + return "WinNT"; + + if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) + return "Win2K"; + + if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion > 0) + return "WinXP"; + + if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0) + return "Vista"; + + if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0) + return "Win7"; + } + + return "Windows"; +} + +char *iupdrvGetSystemVersion(void) +{ + char *str = iupStrGetMemory(256); + OSVERSIONINFOEX osvi; + SYSTEM_INFO si; + + ZeroMemory(&si, sizeof(SYSTEM_INFO)); + GetSystemInfo(&si); + + ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + GetVersionEx((OSVERSIONINFO*)&osvi); + + sprintf(str, "%d.%d.%d", (int)osvi.dwMajorVersion, (int)osvi.dwMinorVersion, (int)osvi.dwBuildNumber); + + /* Display service pack (if any). */ + if (osvi.szCSDVersion && osvi.szCSDVersion[0]!=0) + { + strcat(str, " "); + strcat(str, osvi.szCSDVersion); + } + + if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) + strcat(str, " (IA64)"); + else if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) + strcat(str, " (x64)"); + else + strcat(str, " (x86)"); + + return str; +} + +char *iupdrvGetComputerName(void) +{ + DWORD size = MAX_COMPUTERNAME_LENGTH + 1; + char* str = iupStrGetMemory(size); + GetComputerName((LPTSTR)str, &size); + return str; +} + +char *iupdrvGetUserName(void) +{ + DWORD size = 256; + char* str = iupStrGetMemory(size); + GetUserName((LPTSTR)str, &size); + return (char*)str; +} diff --git a/iup/src/win/iupwindows_main.c b/iup/src/win/iupwindows_main.c new file mode 100755 index 0000000..ea7e2ae --- /dev/null +++ b/iup/src/win/iupwindows_main.c @@ -0,0 +1,66 @@ +/** \file + * \brief Windows Driver WinMain + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include /* declaration of __argc and __argv */ + +#include "iup.h" + + +#ifdef __WATCOMC__ /* force Watcom to link this module, called from IupOpen */ +void iupwinMainDummy(void) +{ + return; +} +#else +extern int main(int, char **); +#endif + +/* save this handle in DllMain only, use to load resources from the DLL. */ +HINSTANCE iupwin_dll_hinstance = 0; + +#ifdef IUP_DLL +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + (void)fdwReason; + (void)lpvReserved; + + iupwin_dll_hinstance = hinstDLL; + + return TRUE; +} +#else +/* this module is always linked in the makefile, + But it must not define WinMain if building the DLL */ +int PASCAL WinMain (HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int ncmdshow) +{ + (void)hinst; /* NOT used */ + (void)hprev; + (void)cmdline; + (void)ncmdshow; + + /* WinMain is NOT called for Console applications */ + +#ifdef __WATCOMC__ + { + extern int _argc; + extern char** _argv; + return IupMain(_argc, _argv); + } +#else + { + /* this seems to work for all the compilers we tested, except Watcom compilers */ + /* These are declared in , except for Cygwin. */ +#ifdef __GNUC__ + extern int __argc; + extern char** __argv; +#endif + return main(__argc, __argv); + } +#endif +} +#endif diff --git a/iup/srccd/Makefile b/iup/srccd/Makefile new file mode 100755 index 0000000..43a3f09 --- /dev/null +++ b/iup/srccd/Makefile @@ -0,0 +1,6 @@ + +.PHONY: do_all iupcd +do_all: iupcd + +iupcd: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak diff --git a/iup/srccd/config.mak b/iup/srccd/config.mak new file mode 100755 index 0000000..3e5a9fe --- /dev/null +++ b/iup/srccd/config.mak @@ -0,0 +1,14 @@ +PROJNAME = iup +LIBNAME = iupcd +OPT = YES + +DEFINES = CD_NO_OLD_INTERFACE +SRC = iup_cd.c +DEF_FILE = iupcd.def + +USE_CD=YES +# Can not use USE_IUP because Tecmake will include "iupcd" in linker + +INCLUDES = ../include +LIBS = iup +LDIR = ../lib/$(TEC_UNAME) diff --git a/iup/srccd/iup_cd.c b/iup/srccd/iup_cd.c new file mode 100755 index 0000000..5998775 --- /dev/null +++ b/iup/srccd/iup_cd.c @@ -0,0 +1,70 @@ +/** \file + * \brief IUP Driver + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" + +#include +#include +#include +#include + + +static void (*cdcreatecanvasNATIVE)(cdCanvas* canvas, void* data) = NULL; + +static void cdcreatecanvasIUP(cdCanvas* canvas, Ihandle *ih_canvas) +{ +#ifndef WIN32 + char str[50] = ""; +#endif + char* data; + + if (IupGetInt(ih_canvas, "CD_GDK")) + data = IupGetAttribute(ih_canvas, "DRAWABLE"); /* new IUP 3 attribute, works for GTK only */ + else + { +#ifdef WIN32 + data = IupGetAttribute(ih_canvas, "HWND"); /* new IUP 3 attribute, works for Windows and GTK */ + if (!data) + data = IupGetAttribute(ih_canvas, "WID"); /* OLD IUP 2 attribute */ + if (!data) + return; +#else + void *dpy = IupGetAttribute(ih_canvas, "XDISPLAY"); /* works for Motif and GTK */ + unsigned long wnd = (unsigned long)IupGetAttribute(ih_canvas, "XWINDOW"); + if (!wnd || !dpy) + return; + data = str; +#ifdef SunOS_OLD + sprintf(str, "%d %lu", (int)dpy, wnd); +#else + sprintf(str, "%p %lu", dpy, wnd); +#endif +#endif + } + + /* Inicializa driver NativeWindow */ + cdcreatecanvasNATIVE(canvas, data); + + IupSetAttribute(ih_canvas, "_CD_CANVAS", (char*)canvas); +} + +static cdContext cdIupContext; + +cdContext* cdContextIup(void) +{ + /* call cdContextNativeWindow every time, because of ContextPlus */ + cdContext* ctx = cdContextNativeWindow(); + + cdcreatecanvasNATIVE = ctx->cxCreateCanvas; + + cdIupContext = *ctx; + cdIupContext.cxCreateCanvas = cdcreatecanvasIUP; + + return &cdIupContext; +} diff --git a/iup/srccd/iupcd.def b/iup/srccd/iupcd.def new file mode 100755 index 0000000..67a21f9 --- /dev/null +++ b/iup/srccd/iupcd.def @@ -0,0 +1,2 @@ +EXPORTS + cdContextIup diff --git a/iup/srccd/iupcd.dep b/iup/srccd/iupcd.dep new file mode 100644 index 0000000..4612393 --- /dev/null +++ b/iup/srccd/iupcd.dep @@ -0,0 +1,3 @@ +$(OBJDIR)/iup_cd.o: iup_cd.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../../cd/include/cd.h ../../cd/include/cd_private.h \ + ../../cd/include/cdiup.h ../../cd/include/cdnative.h diff --git a/iup/srccd/make_uname b/iup/srccd/make_uname new file mode 100755 index 0000000..cc4b881 --- /dev/null +++ b/iup/srccd/make_uname @@ -0,0 +1,3 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake $1 $2 $3 $4 $5 $6 $7 diff --git a/iup/srccd/make_uname.bat b/iup/srccd/make_uname.bat new file mode 100755 index 0000000..f0a0722 --- /dev/null +++ b/iup/srccd/make_uname.bat @@ -0,0 +1,4 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +call tecmake %1 %2 %3 %4 %5 %6 diff --git a/iup/srcconsole/Makefile b/iup/srcconsole/Makefile new file mode 100755 index 0000000..876ca8d --- /dev/null +++ b/iup/srcconsole/Makefile @@ -0,0 +1,12 @@ + +.PHONY: do_all iuplua5 iuplua5gtk iuplua3 +do_all: iuplua5 + +iuplua5: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak + +iuplua5gtk: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak USE_GTK=Yes + +iuplua3: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iuplua3 diff --git a/iup/srcconsole/config.mak b/iup/srcconsole/config.mak new file mode 100755 index 0000000..612a3ab --- /dev/null +++ b/iup/srcconsole/config.mak @@ -0,0 +1,138 @@ +PROJNAME = iup +APPNAME = iuplua51 +APPTYPE = console + +LOHDIR = loh +SRCLUA = console5.lua +SRC = iup_lua51.c + + +# Disable strip +STRIP = +# Optimize +OPT = YES + +# IM and IupPPlot uses C++ +LINKER = $(CPPC) + +USE_MOTIF = Yes + +ifdef USE_GTK + APPNAME = iuplua51gtk +endif + +ifdef USE_MOTIF + APPNAME = iuplua51mot +endif + +DBG = Yes + +ifdef DBG + # Statically link everything only when debugging + IUP := .. + USE_IUPLUA = Yes + USE_IUP3 = Yes + USE_STATIC = Yes + USE_LUA51 = Yes + + DEFINES = USE_STATIC + + USE_CDLUA = Yes + USE_IUPCONTROLS = Yes + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + LIBS += iuplua_pplot$(LIBLUASUFX) iup_pplot + else + IUPLIB = $(IUP)/lib/$(TEC_UNAME) + SLIB += $(IUPLIB)/libiuplua_pplot$(LIBLUASUFX).a $(IUPLIB)/libiup_pplot.a + endif + + ifndef IUPLUA_NO_IM + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + LIBS += cdluaim$(LIBLUASUFX) + else + CDLIB = $(CD)/lib/$(TEC_UNAME) + SLIB += $(CDLIB)/libcdluaim$(LIBLUASUFX).a + endif + endif + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + USE_GDIPLUS=Yes + else + # USE_XRENDER=Yes + endif + + USE_IMLUA = Yes + + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + LIBS += imlua_process$(LIBLUASUFX) iupluaim$(LIBLUASUFX) im_process iupim + else + IUPLIB = $(IUP)/lib/$(TEC_UNAME) + IMLIB = $(IM)/lib/$(TEC_UNAME) + SLIB += $(IMLIB)/libimlua_process$(LIBLUASUFX).a $(IUPLIB)/libiupluaim$(LIBLUASUFX).a $(IMLIB)/libim_process.a $(IUPLIB)/libiupim.a + endif + + + IUPLUA_IMGLIB = Yes + ifdef IUPLUA_IMGLIB + DEFINES += IUPLUA_IMGLIB + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + LIBS += iupluaimglib$(LIBLUASUFX) iupimglib + else + IUPLIB = $(IUP)/lib/$(TEC_UNAME) + SLIB += $(IUPLIB)/libiupluaimglib$(LIBLUASUFX).a $(IUPLIB)/libiupimglib.a + endif + endif +else + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + # Dinamically link in Windows, when not debugging + # Must call "tecmake dll8" + USE_LUA51 = Yes + USE_DLL = Yes + GEN_MANIFEST = No + else + # In UNIX Lua is always statically linked, late binding is used. + USE_STATIC = Yes + USE_LUA51 = Yes + endif +endif + + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + SLIB += setargv.obj + SRC += iuplua5.rc +endif + +ifneq ($(findstring cygw, $(TEC_UNAME)), ) + LDFLAGS = -s + LIBS += readline history +endif + +ifneq ($(findstring Linux, $(TEC_UNAME)), ) + LIBS += dl + #To allow late binding + LFLAGS = -Wl,-E + LIBS += readline history curses ncurses +endif + +ifneq ($(findstring BSD, $(TEC_UNAME)), ) + #To allow late binding + LFLAGS = -Wl,-E + LIBS += readline history curses ncurses +endif + +ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + LIBS += dl +endif + +ifneq ($(findstring AIX, $(TEC_UNAME)), ) + FLAGS += -mminimal-toc + OPTFLAGS = -mminimal-toc -ansi -pedantic + LFLAGS = -Xlinker "-bbigtoc" +endif + +ifeq ($(TEC_UNAME), vc8) + ifdef DBG + #debug info not working for vc8 linker + define DBG + endef + endif +endif diff --git a/iup/srcconsole/console3.lua b/iup/srcconsole/console3.lua new file mode 100755 index 0000000..2e35abd --- /dev/null +++ b/iup/srcconsole/console3.lua @@ -0,0 +1,181 @@ +-- Utilities + +-- Dummy require +function require() +end + +function printvars() + local n,v = nextvar(nil) + print("--printvars Start--") + while n ~= nil do + print(tostring(n).."="..tostring(v)) + n,v = nextvar(n) + end + print("--printvars End--") +end + +function printtable(t) + local n,v = next(t, nil) + print("--printtable Start--") + while n ~= nil do + print(tostring(n).."="..tostring(v)) + n,v = next(t, n) + end + print("--printtable End--") +end + +function print_version_info() + print(_VERSION .. " " .. iup._LUA_COPYRIGHT) + if (im) then print(im._VERSION .. " " .. im._COPYRIGHT) end + if (cd and cd._VERSION) then print(cd._VERSION .. " " .. cd._COPYRIGHT) end + print(iup._VERSION .. " " .. iup._COPYRIGHT) + print("") + print("IUP Info") + print(" System: " .. iup.GetGlobal("SYSTEM")) + print(" System Version: " .. iup.GetGlobal("SYSTEMVERSION")) + local mot = iup.GetGlobal("MOTIFVERSION") + if (mot) then print(" Motif Version: ", mot) end + print(" Screen Size: " .. iup.GetGlobal("SCREENSIZE")) + print(" Screen Depth: " .. iup.GetGlobal("SCREENDEPTH")) + if (iup.GL_VENDOR) then print(" OpenGL Vendor: " .. iup.GL_VENDOR) end + if (iup.GL_RENDERER) then print(" OpenGL Renderer: " .. iup.GL_RENDERER) end + if (iup.GL_VERSION) then print(" OpenGL Version: " .. iup.GL_VERSION) end +end + +-- IUPLUA Full Application + +lastfile = nil -- Last file open + +mulCommands = iupmultiline{expand=IUP_YES, size="200x120", font="COURIER_NORMAL_10"} +poslabel = iuplabel{title="0:0", size="50x"} +filelabel = iuplabel{title="", size="50x", expand="HORIZONTAL"} + +mulCommands.caretcb = function(self, lin, col) + poslabel.title = lin..":"..col +end + +butExecute = iupbutton{size="50x15", title = "Execute", action="dostring(mulCommands.value)"} +butClearCommands = iupbutton{size="50x15", title = "Clear", action = "mulCommands.value = '' filelabel.title = '' lastfile = nil"} +butLoadFile = iupbutton{size="50x15", title = "Load..."} +butSaveasFile = iupbutton{size="50x15", title = "Save As..."} +butSaveFile = iupbutton{size="50x15", title = "Save"} + +function butSaveFile:action() + if (lastfile == nil) then + butSaveasFile:action() + else + novoarq = openfile (lastfile, "w+") + if (novoarq ~= nil) then + write (novoarq,mulCommands.value) + closefile (novoarq) + else + error ("Cannot Save file "..filename) + end + end +end + +function butSaveasFile:action() + local filedlg = iupfiledlg{dialogtype = "SAVE", title = "Save File", filter = "*.wlua", filterinfo = "Lua files",allownew=yes} + IupPopup(filedlg,IUP_LEFT, IUP_LEFT) + local status = filedlg.status + lastfile = filedlg.value + filelabel.title = lastfile + IupDestroy(filedlg) + if status ~= "-1" then + if (lastfile == nil) then + error ("Cannot Save file "..lastfile) + end + local novoarq = openfile (lastfile, "w+") + if (novoarq ~= nil) then + write (novoarq,mulCommands.value) + closefile (novoarq) + else + error ("Cannot Save file") + end + end +end + +function butLoadFile:action() + local filedlg = iupfiledlg{dialogtype="OPEN", title="Load File", filter="*.wlua", filterinfo="Lua Files", allownew="NO"} + filedlg:popup(IUP_CENTER, IUP_CENTER) + local status = filedlg.status + local newfile = filedlg.value + IupDestroy(filedlg) + if (status == "-1") or (status == "1") then + if (status == "1") then + error ("Cannot load file "..newfile) + end + else + local fp = openfile (newfile, "r") + if (fp == nil) then + error ("Cannot load file "..newfile) + else + mulCommands.value = read (fp,"*a") + closefile (fp) + lastfile = newfile + filelabel.title = lastfile + end + end +end + +vbxConsole = iupvbox +{ + iupframe{iuphbox{iupvbox{butLoadFile, butSaveFile, butSaveasFile, butClearCommands, butExecute; margin="0x0", gap="10"}, iupvbox{filelabel, mulCommands, poslabel; alignment="ARIGHT"}; alignment="ATOP"}; title="Commands"} + ;alignment="ACENTER", margin="5x5", gap="5" +} + +-- Main Menu Definition. + +mnuMain = iupmenu +{ + iupsubmenu + { + iupmenu + { + iupitem{title="Exit", action="return IUP_CLOSE"} + }; title="File" + }, + iupsubmenu{iupmenu + { + iup.item{title="Print Version Info...", action=print_version_info}, + iupitem{title="About...", action="dlgAbout:popup(IUP_CENTER, IUP_CENTER)"} + };title="Help"} +} + +-- Main Dialog Definition. + +dlgMain = iupdialog{vbxConsole; title="Complete IupLua3 Interpreter", menu=mnuMain, close_cb = "return IUP_CLOSE"} + +-- About Dialog Definition. + +dlgAbout = iupdialog +{ + iupvbox + { + iuplabel{title="Complete IupLua3 Interpreter"}, + iupfill{size="5"}, + iupfill{size="5"}, + iupframe + { + iupvbox + { + iuplabel{title="Tecgraf/PUC-Rio"}, + iuplabel{title="Mark/Ovídio/Scuri"}, + iuplabel{title="iup@tecgraf.puc-rio.br"} + } + }, + iupfill{size="5"}, + iupbutton{title="OK", action="return IUP_CLOSE", size="50X20"} + ;margin="10x10", alignment="ACENTER" + } + ;maxbox=IUP_NO, minbox=IUP_NO, resize=IUP_NO, title="About" +} + +-- Displays the Main Dialog + +dlgMain:show() + +IupMainLoop() + +IupDestroy(dlgMain) +IupDestroy(dlgAbout) diff --git a/iup/srcconsole/console5.lua b/iup/srcconsole/console5.lua new file mode 100755 index 0000000..20f74b2 --- /dev/null +++ b/iup/srcconsole/console5.lua @@ -0,0 +1,204 @@ +require"iuplua" + +iup.console = {} + +-- Utilities + +function iup.console.printtable(t) + local n,v = next(t, nil) + print("--printtable Start--") + while n do + print(tostring(n).."="..tostring(v)) + n,v = next(t, n) + end + print("--printtable End--") +end + +function iup.console.print_version_info() + if (im) then print("IM " .. im._VERSION .. " " .. im._COPYRIGHT) end + + if (cd) then print("CD " .. cd._VERSION .. " " .. cd._COPYRIGHT) end + + print("IUP " .. iup._VERSION .. " " .. iup._COPYRIGHT) + print("") + print("IUP Info") + print(" System: " .. iup.GetGlobal("SYSTEM")) + print(" System Version: " .. iup.GetGlobal("SYSTEMVERSION")) + + local mot = iup.GetGlobal("MOTIFVERSION") + if (mot) then print(" Motif Version: ", mot) end + + print(" Screen Size: " .. iup.GetGlobal("SCREENSIZE")) + print(" Screen Depth: " .. iup.GetGlobal("SCREENDEPTH")) + + if (iup.GL_VENDOR) then print(" OpenGL Vendor: " .. iup.GL_VENDOR) end + if (iup.GL_RENDERER) then print(" OpenGL Renderer: " .. iup.GL_RENDERER) end + if (iup.GL_VERSION) then print(" OpenGL Version: " .. iup.GL_VERSION) end +end + +-- Console Dialog + +iup.console.lastfilename = nil -- Last file open +iup.console.mlCode = iup.multiline{expand="YES", size="200x120", font="COURIER_NORMAL_10"} +iup.console.lblPosition = iup.label{title="0:0", size="50x"} +iup.console.lblFileName = iup.label{title="", size="50x", expand="HORIZONTAL"} + +function iup.console.mlCode:caret_cb(lin, col) + iup.console.lblPosition.title = lin..":"..col +end + +iup.console.butExecute = iup.button{size="50x15", title="Execute", + action="iup.dostring(iup.console.mlCode.value)"} +iup.console.butClearCommands = iup.button{size="50x15", title="Clear", + action="iup.console.mlCode.value='' iup.console.lblFileName.title = '' iup.console.lastfilename = nil"} +iup.console.butLoadFile = iup.button{size="50x15", title="Load..."} +iup.console.butSaveasFile = iup.button{size="50x15", title="Save As..."} +iup.console.butSaveFile = iup.button{size="50x15", title="Save"} + +function iup.console.butSaveFile:action() + if (iup.console.lastfilename == nil) then + iup.console.butSaveasFile:action() + else + newfile = io.open(iup.console.lastfilename, "w+") + if (newfile) then + newfile:write(iup.console.mlCode.value) + newfile:close() + else + error ("Cannot Save file "..filename) + end + end +end + +function iup.console.butSaveasFile:action() + local fd = iup.filedlg{dialogtype="SAVE", title="Save File", + filter="*.*", filterinfo="All files",allownew=yes} + fd:popup(iup.LEFT, iup.LEFT) + local status = fd.status + iup.console.lastfilename = fd.value + iup.console.lblFileName.title = iup.console.lastfilename + fd:destroy() + if status ~= "-1" then + if (iup.console.lastfilename == nil) then + error ("Cannot Save file "..filename) + end + local newfile=io.open(iup.console.lastfilename, "w+") + if (newfile) then + newfile:write(iup.console.mlCode.value) + newfile:close(newfile) + else + error ("Cannot Save file") + end + end +end + +function iup.console.LoadFile(filename) + local newfile = io.open (filename, "r") + if (newfile == nil) then + error ("Cannot load file "..filename) + else + iup.console.mlCode.value=newfile:read("*a") + newfile:close (newfile) + iup.console.lastfilename = filename + iup.console.lblFileName.title = iup.console.lastfilename + end +end + +function iup.console.butLoadFile:action() + local fd=iup.filedlg{dialogtype="OPEN", title="Load File", + filter="*.*", filterinfo="All Files", allownew="NO"} + fd:popup(iup.CENTER, iup.CENTER) + local status = fd.status + local filename = fd.value + fd:destroy() + + if (status == "-1") or (status == "1") then + if (status == "1") then + error ("Cannot load file "..filename) + end + else + iup.console.LoadFile(filename) + end +end + +iup.console.vbxConsole = iup.vbox +{ + iup.frame{iup.hbox{iup.vbox{iup.console.butLoadFile, + iup.console.butSaveFile, + iup.console.butSaveasFile, + iup.console.butClearCommands, + iup.console.butExecute; + margin="0x0", gap="10"}, + iup.vbox{iup.console.lblFileName, + iup.console.mlCode, + iup.console.lblPosition; + alignment = "ARIGHT"}; + alignment="ATOP"}; title="Commands"} + ;alignment="ACENTER", margin="5x5", gap="5" +} + +-- Main Menu Definition. + +iup.console.mnuMain = iup.menu +{ + iup.submenu + { + iup.menu + { + iup.item{title="Exit", action="return iup.CLOSE"} + }; title="File" + }, + iup.submenu{iup.menu + { + iup.item{title="Print Version Info...", action=iup.console.print_version_info}, + iup.item{title="About...", action="iup.console.dlgAbout:popup(iup.CENTER, iup.CENTER)"} + };title="Help"} +} + +-- Main Dialog Definition. + +iup.console.dlgMain = iup.dialog{iup.console.vbxConsole; + title="IupLua Console", + menu=iup.console.mnuMain, + dragdrop = "YES", + defaultenter=iup.console.butExecute, + close_cb = "return iup.CLOSE"} + +function iup.console.dlgMain:dropfiles_cb(filename, num, x, y) + if (num == 0) then + iup.console.LoadFile(filename) + end +end + +-- About Dialog Definition. + +iup.console.dlgAbout = iup.dialog +{ + iup.vbox + { + iup.label{title="IupLua Console"}, + iup.fill{size="5"}, + iup.fill{size="5"}, + iup.frame + { + iup.vbox + { + iup.label{title="Tecgraf/PUC-Rio"}, + iup.label{title="iup@tecgraf.puc-rio.br"} + } + }, + iup.fill{size="5"}, + iup.button{title="OK", action="return iup.CLOSE", size="50X20"} + ;margin="10x10", alignment="ACENTER" + } + ;maxbox="NO", minbox="NO", resize="NO", title="About" +} + +-- Displays the Main Dialog + +iup.console.dlgMain:show() +iup.SetFocus(iup.console.mlCode) + +iup.MainLoop() + +iup.console.dlgMain:destroy() +iup.console.dlgAbout:destroy() diff --git a/iup/srcconsole/copy_all_so b/iup/srcconsole/copy_all_so new file mode 100755 index 0000000..52f1fea --- /dev/null +++ b/iup/srcconsole/copy_all_so @@ -0,0 +1,11 @@ +#!/bin/tcsh + +foreach plat ( Linux24 Linux24g3 Linux24g3_64 Linux26 Linux26_64 Linux26g4 Linux26g4_64 Linux26_ia64 SunOS57 SunOS510 SunOS510x86 AIX43 IRIX65 IRIX6465 ) + echo $plat + cp -f ../lib/$plat/*.so ../bin/$plat + cp -f ../../cd/lib/$plat/*.so ../bin/$plat + cp -f ../../im/lib/$plat/*.so ../bin/$plat + cp -f ../../luagl/lib/$plat/*.so ../bin/$plat + cp -f ../../lfs/lib/$plat/*.so ../bin/$plat + rm -f ../bin/$plat/*3.so +end diff --git a/iup/srcconsole/copy_dll.bat b/iup/srcconsole/copy_dll.bat new file mode 100755 index 0000000..5830805 --- /dev/null +++ b/iup/srcconsole/copy_dll.bat @@ -0,0 +1,10 @@ +@echo off +copy /y ..\lib\dll8\*.dll ..\bin\Win32 +copy /y ..\..\cd\lib\dll8\*.dll ..\bin\Win32 +copy /y ..\..\im\lib\dll8\*.dll ..\bin\Win32 +copy /y ..\..\lua5.1\lib\dll8\*.dll ..\bin\Win32 +copy /y ..\..\luagl\lib\dll8\*.dll ..\bin\Win32 +copy /y ..\..\lfs\lib\dll8\*.dll ..\bin\Win32 +mkdir ..\bin\Win32\Microsoft.VC80.CRT +copy /y ..\..\lua5.1\bin\Win32\Microsoft.VC80.CRT ..\bin\Win32\Microsoft.VC80.CRT\ +del ..\bin\Win32\*3.dll diff --git a/iup/srcconsole/copy_dll_64.bat b/iup/srcconsole/copy_dll_64.bat new file mode 100755 index 0000000..159117f --- /dev/null +++ b/iup/srcconsole/copy_dll_64.bat @@ -0,0 +1,10 @@ +@echo off +copy /y ..\lib\dll8_64\*.dll ..\bin\Win64 +copy /y ..\..\cd\lib\dll8_64\*.dll ..\bin\Win64 +copy /y ..\..\im\lib\dll8_64\*.dll ..\bin\Win64 +copy /y ..\..\lua5.1\lib\dll8_64\*.dll ..\bin\Win64 +copy /y ..\..\luagl\lib\dll8_64\*.dll ..\bin\Win64 +copy /y ..\..\lfs\lib\dll8_64\*.dll ..\bin\Win64 +mkdir ..\bin\Win64\Microsoft.VC80.CRT +copy /y ..\..\lua5.1\bin\Win64\Microsoft.VC80.CRT ..\bin\Win64\Microsoft.VC80.CRT\ +del ..\bin\Win64\*3.dll diff --git a/iup/srcconsole/copy_so b/iup/srcconsole/copy_so new file mode 100755 index 0000000..2535766 --- /dev/null +++ b/iup/srcconsole/copy_so @@ -0,0 +1,4 @@ +cp -f ../lib/${TEC_UNAME}/*.so ../bin/$TEC_UNAME +cp -f ../../cd/lib/${TEC_UNAME}/*.so ../bin/$TEC_UNAME +cp -f ../../im/lib/${TEC_UNAME}/*.so ../bin/$TEC_UNAME +rm -f ../bin/${TEC_UNAME}/*3.so diff --git a/iup/srcconsole/iup_lua3.c b/iup/srcconsole/iup_lua3.c new file mode 100755 index 0000000..aef041b --- /dev/null +++ b/iup/srcconsole/iup_lua3.c @@ -0,0 +1,128 @@ +/** \file + * \brief Creates a Lua executable linked to all standard IUP libraries + * If user does not provide arguments environment variable + * "console3.lua" will be searched. And if fails + * internal Lua code will be executed to provide a basic interface + * for the user. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "lua.h" +#include "lualib.h" +#include "luadebug.h" + +#include "iup.h" +#include "iupkey.h" +#include "iuplua.h" + +#ifndef IUPLUA_NO_GL +#include "iupgl.h" +#include "iupluagl.h" +#endif + +#ifndef IUPLUA_NO_CD +#include "iupcontrols.h" +#include "iupluacontrols.h" +#include "iup_pplot.h" +#include "iuplua_pplot.h" +#include +#include +#include +#endif + +#ifndef IUPLUA_NO_IM +#include "iupluaim.h" +#include +#endif + +int main ( int argc, char **argv ) +{ + IupOpen(&argc, &argv); +#ifndef IUPLUA_NO_GL + IupGLCanvasOpen(); +#endif +#ifndef IUPLUA_NO_CD + IupControlsOpen(); + IupPPlotOpen(); +#endif + + lua_open(); + + lua_setdebug(1); + + lua_iolibopen( ); + lua_strlibopen( ); + lua_mathlibopen( ); + + iuplua_open( ); + iupkey_open( ); +#ifndef IUPLUA_NO_GL + iupgllua_open(); +#endif +#ifndef IUPLUA_NO_CD + iupcontrolslua_open(); + iup_pplotlua_open(); + cdlua_open(); + cdluaiup_open(); +#endif +#ifndef IUPLUA_NO_IM + iupimlua_open(); + imlua_open(); +#endif + + if (argc <= 1) + { + if(!iuplua_dofile("console3.lua")) + { +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/console3_be64.loh" +#else +#include "loh/console3_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/console3_le64w.loh" +#else +#include "loh/console3_le64.loh" +#endif +#else +#include "loh/console3.loh" +#endif +#endif + } + } + else + { + int ok = 1, + i = 1; + + /* Running all .lua given as arguments */ + while(ok & (i < argc)) + { + ok = iuplua_dofile(argv[i]); + i++; + } + + if(!ok) + { + return EXIT_FAILURE; + } + } + +#ifndef IUPLUA_NO_CD + cdlua_close(); + IupControlsClose(); +#endif + IupClose(); + + lua_close(); + + return EXIT_SUCCESS; +} diff --git a/iup/srcconsole/iup_lua51.c b/iup/srcconsole/iup_lua51.c new file mode 100755 index 0000000..ed73ac0 --- /dev/null +++ b/iup/srcconsole/iup_lua51.c @@ -0,0 +1,493 @@ +/* +** Lua stand-alone interpreter +** See Copyright Notice in lua.h +*/ + + +#include +#include +#include +#include + +#define lua_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + + +/******************* IUP *********************/ +#ifdef USE_STATIC +#include "iup.h" +#include "iuplua.h" + +#ifndef IUPLUA_NO_GL +#include "iupgl.h" +#include "iupluagl.h" +/* #include "luagl.h" */ +#endif + +#ifndef IUPLUA_NO_CD +#include "iupcontrols.h" +#include "iupluacontrols.h" +#include "iup_pplot.h" +#include "iuplua_pplot.h" +#include +#include +#include +#include +#endif + +#ifndef IUPLUA_NO_IM +#include "iupluaim.h" +#include +#include +#include +#endif + +#ifndef IUPLUA_NO_IM +#ifndef IUPLUA_NO_CD +#include +#endif +#endif +#endif +/******************* IUP *********************/ + + +static lua_State *globalL = NULL; + +static const char *progname = LUA_PROGNAME; + + + +static void lstop (lua_State *L, lua_Debug *ar) { + (void)ar; /* unused arg. */ + lua_sethook(L, NULL, 0, 0); + luaL_error(L, "interrupted!"); +} + + +static void laction (int i) { + signal(i, SIG_DFL); /* if another SIGINT happens before lstop, + terminate process (default action) */ + lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1); +} + + +static void print_usage (void) { + fprintf(stderr, + "usage: %s [options] [script [args]].\n" + "Available options are:\n" + " -e stat execute string " LUA_QL("stat") "\n" + " -l name require library " LUA_QL("name") "\n" + " -i enter interactive mode after executing " LUA_QL("script") "\n" + " -v show version information\n" + " -- stop handling options\n" + " - execute stdin and stop handling options\n" + , + progname); + fflush(stderr); +} + + +static void l_message (const char *pname, const char *msg) { + if (pname) fprintf(stderr, "%s: ", pname); + fprintf(stderr, "%s\n", msg); + fflush(stderr); +} + + +static int report (lua_State *L, int status) { + if (status && !lua_isnil(L, -1)) { + const char *msg = lua_tostring(L, -1); + if (msg == NULL) msg = "(error object is not a string)"; + l_message(progname, msg); + lua_pop(L, 1); + } + return status; +} + + +static int traceback (lua_State *L) { + if (!lua_isstring(L, 1)) /* 'message' not a string? */ + return 1; /* keep it intact */ + lua_getfield(L, LUA_GLOBALSINDEX, "debug"); + if (!lua_istable(L, -1)) { + lua_pop(L, 1); + return 1; + } + lua_getfield(L, -1, "traceback"); + if (!lua_isfunction(L, -1)) { + lua_pop(L, 2); + return 1; + } + lua_pushvalue(L, 1); /* pass error message */ + lua_pushinteger(L, 2); /* skip this function and traceback */ + lua_call(L, 2, 1); /* call debug.traceback */ + return 1; +} + + +static int docall (lua_State *L, int narg, int clear) { + int status; + int base = lua_gettop(L) - narg; /* function index */ + lua_pushcfunction(L, traceback); /* push traceback function */ + lua_insert(L, base); /* put it under chunk and args */ + signal(SIGINT, laction); + status = lua_pcall(L, narg, (clear ? 0 : LUA_MULTRET), base); + signal(SIGINT, SIG_DFL); + lua_remove(L, base); /* remove traceback function */ + /* force a complete garbage collection in case of errors */ + if (status != 0) lua_gc(L, LUA_GCCOLLECT, 0); + return status; +} + + +static void print_version (void) { + l_message(NULL, LUA_RELEASE " " LUA_COPYRIGHT); +} + + +static int getargs (lua_State *L, char **argv, int n) { + int narg; + int i; + int argc = 0; + while (argv[argc]) argc++; /* count total number of arguments */ + narg = argc - (n + 1); /* number of arguments to the script */ + luaL_checkstack(L, narg + 3, "too many arguments to script"); + for (i=n+1; i < argc; i++) + lua_pushstring(L, argv[i]); + lua_createtable(L, narg, n + 1); + for (i=0; i < argc; i++) { + lua_pushstring(L, argv[i]); + lua_rawseti(L, -2, i - n); + } + return narg; +} + + +static int dofile (lua_State *L, const char *name) { + int status = luaL_loadfile(L, name) || docall(L, 0, 1); + return report(L, status); +} + + +static int dostring (lua_State *L, const char *s, const char *name) { + int status = luaL_loadbuffer(L, s, strlen(s), name) || docall(L, 0, 1); + return report(L, status); +} + + +static int dolibrary (lua_State *L, const char *name) { + lua_getglobal(L, "require"); + lua_pushstring(L, name); + return report(L, docall(L, 1, 1)); +} + + +static const char *get_prompt (lua_State *L, int firstline) { + const char *p; + lua_getfield(L, LUA_GLOBALSINDEX, firstline ? "_PROMPT" : "_PROMPT2"); + p = lua_tostring(L, -1); + if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2); + lua_pop(L, 1); /* remove global */ + return p; +} + + +static int incomplete (lua_State *L, int status) { + if (status == LUA_ERRSYNTAX) { + size_t lmsg; + const char *msg = lua_tolstring(L, -1, &lmsg); + const char *tp = msg + lmsg - (sizeof(LUA_QL("")) - 1); + if (strstr(msg, LUA_QL("")) == tp) { + lua_pop(L, 1); + return 1; + } + } + return 0; /* else... */ +} + + +static int pushline (lua_State *L, int firstline) { + char buffer[LUA_MAXINPUT]; + char *b = buffer; + size_t l; + const char *prmt = get_prompt(L, firstline); + if (lua_readline(L, b, prmt) == 0) + return 0; /* no input */ + l = strlen(b); + if (l > 0 && b[l-1] == '\n') /* line ends with newline? */ + b[l-1] = '\0'; /* remove it */ + if (firstline && b[0] == '=') /* first line starts with `=' ? */ + lua_pushfstring(L, "return %s", b+1); /* change it to `return' */ + else + lua_pushstring(L, b); + lua_freeline(L, b); + return 1; +} + + +static int loadline (lua_State *L) { + int status; + lua_settop(L, 0); + if (!pushline(L, 1)) + return -1; /* no input */ + for (;;) { /* repeat until gets a complete line */ + status = luaL_loadbuffer(L, lua_tostring(L, 1), lua_strlen(L, 1), "=stdin"); + if (!incomplete(L, status)) break; /* cannot try to add lines? */ + if (!pushline(L, 0)) /* no more input? */ + return -1; + lua_pushliteral(L, "\n"); /* add a new line... */ + lua_insert(L, -2); /* ...between the two lines */ + lua_concat(L, 3); /* join them */ + } + lua_saveline(L, 1); + lua_remove(L, 1); /* remove line */ + return status; +} + + +static void dotty (lua_State *L) { + int status; + const char *oldprogname = progname; + progname = NULL; + while ((status = loadline(L)) != -1) { + if (status == 0) status = docall(L, 0, 0); + report(L, status); + if (status == 0 && lua_gettop(L) > 0) { /* any result to print? */ + lua_getglobal(L, "print"); + lua_insert(L, 1); + if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != 0) + l_message(progname, lua_pushfstring(L, + "error calling " LUA_QL("print") " (%s)", + lua_tostring(L, -1))); + } + } + lua_settop(L, 0); /* clear stack */ + fputs("\n", stdout); + fflush(stdout); + progname = oldprogname; +} + +static int handle_script (lua_State *L, char **argv, int n) { + int status; + const char *fname; + int narg = getargs(L, argv, n); /* collect arguments */ + lua_setglobal(L, "arg"); + fname = argv[n]; + if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0) + fname = NULL; /* stdin */ + status = luaL_loadfile(L, fname); + lua_insert(L, -(narg+1)); + if (status == 0) + status = docall(L, narg, 0); + else + lua_pop(L, narg); + return report(L, status); +} + + +/* check that argument has no extra characters at the end */ +#define notail(x) {if ((x)[2] != '\0') return -1;} + + +static int collectargs (char **argv, int *pi, int *pv, int *pe) { + int i; + for (i = 1; argv[i] != NULL; i++) { + if (argv[i][0] != '-') /* not an option? */ + return i; + switch (argv[i][1]) { /* option */ + case '-': + notail(argv[i]); + return (argv[i+1] != NULL ? i+1 : 0); + case '\0': + return i; + case 'i': + notail(argv[i]); + *pi = 1; /* go through */ + case 'v': + notail(argv[i]); + *pv = 1; + break; + case 'e': + *pe = 1; /* go through */ + case 'l': + if (argv[i][2] == '\0') { + i++; + if (argv[i] == NULL) return -1; + } + break; + default: return -1; /* invalid option */ + } + } + return 0; +} + + +static int runargs (lua_State *L, char **argv, int n) { + int i; + for (i = 1; i < n; i++) { + if (argv[i] == NULL) continue; + lua_assert(argv[i][0] == '-'); + switch (argv[i][1]) { /* option */ + case 'e': { + const char *chunk = argv[i] + 2; + if (*chunk == '\0') chunk = argv[++i]; + lua_assert(chunk != NULL); + if (dostring(L, chunk, "=(command line)") != 0) + return 1; + break; + } + case 'l': { + const char *filename = argv[i] + 2; + if (*filename == '\0') filename = argv[++i]; + lua_assert(filename != NULL); + if (dolibrary(L, filename)) + return 1; /* stop if file fails */ + break; + } + default: break; + } + } + return 0; +} + +static int handle_luainit (lua_State *L) { + const char *init = getenv(LUA_INIT); + if (init == NULL) return 0; /* status OK */ + else if (init[0] == '@') + return dofile(L, init+1); + else + return dostring(L, init, "=" LUA_INIT); +} + + +struct Smain { + int argc; + char **argv; + int status; +}; + + +/******************* IUP *********************/ +#ifdef USE_STATIC +#ifdef IUPLUA_IMGLIB +int luaopen_iupluaimglib(lua_State* L); +#endif +#endif + +static void iuplua_openlibs (lua_State *L) { + lua_pushliteral(L, LUA_COPYRIGHT); + lua_setglobal(L, "_COPYRIGHT"); /* set global _COPYRIGHT */ + +#ifdef USE_STATIC + /* iuplua initialization */ + iuplua_open(L); + iupkey_open(L); +#ifdef IUPLUA_IMGLIB + luaopen_iupluaimglib(L); +#endif + +#ifndef IUPLUA_NO_CD + iupcontrolslua_open(L); + iup_pplotlua_open(L); + cdlua_open(L); + cdluaiup_open(L); +#endif +#ifndef IUPLUA_NO_IM + iupimlua_open(L); + imlua_open(L); + imlua_open_process(L); +#endif +#ifndef IUPLUA_NO_IM +#ifndef IUPLUA_NO_CD + cdluaim_open(L); +#endif +#endif +#endif +} + +static void iuplua_input (lua_State *L) { +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/console5_be64.loh" +#else +#include "loh/console5_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/console5_le64w.loh" +#else +#include "loh/console5_le64.loh" +#endif +#else +#include "loh/console5.loh" +#endif +#endif +} +/******************* IUP *********************/ + + +static int pmain (lua_State *L) { + struct Smain *s = (struct Smain *)lua_touserdata(L, 1); + char **argv = s->argv; + int script; + int has_i = 0, has_v = 0, has_e = 0; + globalL = L; + if (argv[0] && argv[0][0]) progname = argv[0]; + lua_gc(L, LUA_GCSTOP, 0); /* stop collector during initialization */ + luaL_openlibs(L); /* open libraries */ + lua_gc(L, LUA_GCRESTART, 0); +/******************* IUP *********************/ + iuplua_openlibs(L); +/******************* IUP *********************/ + + s->status = handle_luainit(L); + if (s->status != 0) return 0; + script = collectargs(argv, &has_i, &has_v, &has_e); + if (script < 0) { /* invalid args? */ + print_usage(); + s->status = 1; + return 0; + } + if (has_v) print_version(); + s->status = runargs(L, argv, (script > 0) ? script : s->argc); + if (s->status != 0) return 0; + if (script) + s->status = handle_script(L, argv, script); + if (s->status != 0) return 0; + if (has_i) + dotty(L); + else if (script == 0 && !has_e && !has_v) { + if (lua_stdin_is_tty()) { + print_version(); +/******************* IUP *********************/ +/* dotty(L); */ + iuplua_input(L); +/******************* IUP *********************/ + } + else dofile(L, NULL); /* executes stdin as a file */ + } + return 0; +} + + +int main (int argc, char **argv) { + int status; + struct Smain s; + lua_State *L = lua_open(); /* create state */ + if (L == NULL) { + l_message(argv[0], "cannot create state: not enough memory"); + return EXIT_FAILURE; + } + s.argc = argc; + s.argv = argv; + status = lua_cpcall(L, &pmain, &s); + report(L, status); + lua_close(L); + return (status || s.status) ? EXIT_FAILURE : EXIT_SUCCESS; +} diff --git a/iup/srcconsole/iuplua3.bat b/iup/srcconsole/iuplua3.bat new file mode 100644 index 0000000..e58a12b --- /dev/null +++ b/iup/srcconsole/iuplua3.bat @@ -0,0 +1,3 @@ +@echo off +REM Script generated automatically by tecmake v3.20 +..\bin\Win64\iuplua3.exe %* diff --git a/iup/srcconsole/iuplua3.mak b/iup/srcconsole/iuplua3.mak new file mode 100755 index 0000000..e892496 --- /dev/null +++ b/iup/srcconsole/iuplua3.mak @@ -0,0 +1,90 @@ +PROJNAME = iup +APPNAME = iuplua3 +APPTYPE = console +OPT = YES + +IUP := .. + +# IM is a C++ library with a C API +LINKER = $(CPPC) + +SRC = iup_lua3.c +SRCLUA = console3.lua +LOHDIR = loh + +USE_LUA = Yes +USE_IUPLUA = Yes +USE_IUP3 = Yes + +USE_STATIC = Yes + +ifdef BUILD_64 + ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + LINKER = cc + IUPLUA_NO_IM = Yes + endif + ifneq ($(findstring AIX, $(TEC_UNAME)), ) + LINKER = cc + IUPLUA_NO_IM = Yes + endif +endif + +ifeq "$(TEC_UNAME)" "SunOS510x86" + IUPLUA_NO_GL = Yes +endif + +#IUPLUA_NO_GL = Yes +ifndef IUPLUA_NO_GL + USE_OPENGL = Yes +else + DEFINES = IUPLUA_NO_GL +endif + +#IUPLUA_NO_CD = Yes +ifndef IUPLUA_NO_CD + USE_CD = Yes + USE_CDLUA = Yes + USE_IUPCONTROLS = Yes + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + LIBS += iup_pplot iuplua_pplot3 + else + IUPLIB = $(IUP)/lib/$(TEC_UNAME) + SLIB += $(IUPLIB)/libiuplua_pplot3.a $(IUPLIB)/libiup_pplot.a + endif +else + DEFINES += IUPLUA_NO_CD +endif + +#IUPLUA_NO_IM = Yes +ifndef IUPLUA_NO_IM + USE_IM = Yes + USE_IMLUA = Yes + + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + LIBS += iupim iupluaim3 + else + IUPLIB = $(IUP)/lib/$(TEC_UNAME) + SLIB += $(IUPLIB)/libiupluaim3.a $(IUPLIB)/libiupim.a + endif +else + DEFINES += IUPLUA_NO_IM +endif + +ifneq ($(findstring AIX, $(TEC_UNAME)), ) + FLAGS += -mminimal-toc + OPTFLAGS = -mminimal-toc -ansi -pedantic + LFLAGS = -Xlinker "-bbigtoc" +endif + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + SRC += iuplua3.rc +endif + +ifeq ($(TEC_UNAME), vc8) + ifdef DBG + #debug info not working for vc8 linker + define DBG + endef + endif +endif + diff --git a/iup/srcconsole/iuplua3.rc b/iup/srcconsole/iuplua3.rc new file mode 100755 index 0000000..e741199 --- /dev/null +++ b/iup/srcconsole/iuplua3.rc @@ -0,0 +1,45 @@ +0 ICON "lua.ico" +TECGRAF_ICON ICON "..\\etc\\tecgraf.ico" + +1 VERSIONINFO + FILEVERSION 3,0,0,0 + PRODUCTVERSION 3,0,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "www.tecgraf.puc-rio.br/iup\0" + VALUE "CompanyName", "Tecgraf/PUC-Rio\0" + VALUE "FileDescription", "Lua Windows Standalone Interpreter with IUP\0" + VALUE "FileVersion", "3.0.0\0" + VALUE "LegalCopyright", "Copyright © 1994-2009 Tecgraf, PUC-Rio.\0" + VALUE "OriginalFilename", "iuplua51.exe\0" + VALUE "ProductName", "IUP for Windows\0" + VALUE "ProductVersion", "3.0.0\0" + END + END +END + +CURSOR_PEN CURSOR "..\\etc\\pen.cur" + +/* To avoid the inclusion of */ +#define WS_CHILD 0x40000000L +#define WS_VISIBLE 0x10000000L +#define WS_CLIPSIBLINGS 0x04000000L +#define DS_3DLOOK 0x0004L +#define DS_CONTROL 0x0400L +#define SS_OWNERDRAW 0x0000000DL +#define WS_EX_STATICEDGE 0x00020000L + +#define IUP_PREVIEWCANVAS 3000 + +iupPreviewDlg DIALOG DISCARDABLE 0, 0, 195, 95 +STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | DS_3DLOOK | DS_CONTROL +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IUP_PREVIEWCANVAS, "STATIC", SS_OWNERDRAW, 70, 0, 120, 90, WS_EX_STATICEDGE +END + +/* The following line enable Windows XP Visual Styles */ +1 24 "..\\etc\\iup.manifest" diff --git a/iup/srcconsole/iuplua5.rc b/iup/srcconsole/iuplua5.rc new file mode 100755 index 0000000..bc02e07 --- /dev/null +++ b/iup/srcconsole/iuplua5.rc @@ -0,0 +1,59 @@ +0 ICON "lua.ico" +TECGRAF_ICON ICON "..\\etc\\tecgraf.ico" + +1 VERSIONINFO + FILEVERSION 3,0,0,0 + PRODUCTVERSION 3,0,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "www.tecgraf.puc-rio.br/iup\0" + VALUE "CompanyName", "Tecgraf/PUC-Rio\0" + VALUE "FileDescription", "Lua Windows Standalone Interpreter with IUP\0" + VALUE "FileVersion", "3.0.0\0" + VALUE "LegalCopyright", "Copyright © 1994-2009 Tecgraf, PUC-Rio.\0" + VALUE "OriginalFilename", "iuplua51.exe\0" + VALUE "ProductName", "IUP for Windows\0" + VALUE "ProductVersion", "3.0.0\0" + END + END +END + +CURSOR_PEN CURSOR "..\\etc\\pen.cur" + +/* To avoid the inclusion of */ +#define WS_CHILD 0x40000000L +#define WS_VISIBLE 0x10000000L +#define WS_CLIPSIBLINGS 0x04000000L +#define DS_3DLOOK 0x0004L +#define DS_CONTROL 0x0400L +#define SS_OWNERDRAW 0x0000000DL +#define WS_EX_STATICEDGE 0x00020000L + +#define IUP_PREVIEWCANVAS 3000 + +iupPreviewDlg DIALOG DISCARDABLE 0, 0, 195, 95 +STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | DS_3DLOOK | DS_CONTROL +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IUP_PREVIEWCANVAS, "STATIC", SS_OWNERDRAW, 70, 0, 120, 90, WS_EX_STATICEDGE +END + +/* The following line enable Windows XP Visual Styles */ +#ifdef MSVC8 +#ifdef TEC_64 +1 24 "wlua_dll8_x64.manifest" +#else +1 24 "wlua_dll8_x86.manifest" +#endif +#elif MSVC9 +#ifdef TEC_64 +1 24 "wlua_dll9_x64.manifest" +#else +1 24 "wlua_dll9_x86.manifest" +#endif +#else +1 24 "..\\etc\\iup.manifest" +#endif diff --git a/iup/srcconsole/iuplua51 b/iup/srcconsole/iuplua51 new file mode 100755 index 0000000..a4f9a27 --- /dev/null +++ b/iup/srcconsole/iuplua51 @@ -0,0 +1,6 @@ +#!/bin/csh +# Script generated automatically by tecmake v3.19 +# Remove the comment bellow to set the LD_LIBRARY_PATH if needed. +#setenv LD_LIBRARY_PATH /lib/${TEC_UNAME}:/lib/${TEC_UNAME}:$LD_LIBRARY_PATH +if ( -r app.env ) source app.env +exec ../bin/$TEC_UNAME/iuplua51 $* diff --git a/iup/srcconsole/iuplua51.bat b/iup/srcconsole/iuplua51.bat new file mode 100644 index 0000000..85331fe --- /dev/null +++ b/iup/srcconsole/iuplua51.bat @@ -0,0 +1,3 @@ +@echo off +REM Script generated automatically by tecmake v3.20 +..\bin\Win64\iuplua51.exe %* diff --git a/iup/srcconsole/iuplua51.dep b/iup/srcconsole/iuplua51.dep new file mode 100644 index 0000000..994ed5e --- /dev/null +++ b/iup/srcconsole/iuplua51.dep @@ -0,0 +1,4 @@ +$(OBJDIR)/iup_lua51.o: iup_lua51.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/lualib.h \ + loh/console5_le64.loh diff --git a/iup/srcconsole/iuplua51mot b/iup/srcconsole/iuplua51mot new file mode 100755 index 0000000..3b9a955 --- /dev/null +++ b/iup/srcconsole/iuplua51mot @@ -0,0 +1,6 @@ +#!/bin/csh +# Script generated automatically by tecmake v3.19 +# Remove the comment bellow to set the LD_LIBRARY_PATH if needed. +#setenv LD_LIBRARY_PATH /lib/${TEC_UNAME}:/lib/${TEC_UNAME}:$LD_LIBRARY_PATH +if ( -r app.env ) source app.env +exec ../bin/$TEC_UNAME/iuplua51mot $* diff --git a/iup/srcconsole/iuplua51mot.dep b/iup/srcconsole/iuplua51mot.dep new file mode 100644 index 0000000..b174381 --- /dev/null +++ b/iup/srcconsole/iuplua51mot.dep @@ -0,0 +1,12 @@ +$(OBJDIR)/iup_lua51.o: iup_lua51.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/lualib.h \ + ../include/iup.h ../include/iupkey.h ../include/iupdef.h \ + ../include/iuplua.h ../include/iupgl.h ../include/iupluagl.h \ + ../include/iupcontrols.h ../include/iupluacontrols.h \ + ../include/iup_pplot.h ../include/iuplua_pplot.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../../cd/include/cdgdiplus.h \ + ../../cd/include/cdlua.h ../../cd/include/cdluaiup.h \ + ../include/iupluaim.h ../../im/include/im.h ../../im/include/old_im.h \ + ../../im/include/im_image.h ../../im/include/imlua.h \ + ../../cd/include/cdluaim.h loh/console5_le64.loh diff --git a/iup/srcconsole/loh/console3.loh b/iup/srcconsole/loh/console3.loh new file mode 100755 index 0000000..5cfd348 --- /dev/null +++ b/iup/srcconsole/loh/console3.loh @@ -0,0 +1,254 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/console3.lo"); +*/ +/* ../obj/iuplua3/console3.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64, 99,111,110,115,111, +108,101, 51, 46,108,117, 97, 0, 0, 0, 2,170, 17, 0, 11, 1, 25, 0, 11, 3, + 25, 2, 11, 5, 25, 4, 11, 7, 25, 6, 4, 0, 25, 8, 15, 10, 22, 3, 11, 11, + 15, 12, 11, 13, 11, 14, 11, 15, 11, 16, 30, 2, 2, 1, 1, 25, 9, 15, 18, 22, + 2, 11, 19, 11, 20, 11, 13, 11, 21, 30, 1, 2, 1, 1, 25, 17, 15, 18, 22, 3, + 11, 19, 11, 23, 11, 13, 11, 21, 11, 11, 11, 24, 30, 2, 2, 1, 1, 25, 22, 15, + 9, 11, 25, 11, 26, 26, 15, 28, 22, 3, 11, 13, 11, 29, 11, 30, 11, 31, 11, 32, + 11, 33, 30, 2, 2, 1, 1, 25, 27, 15, 28, 22, 3, 11, 13, 11, 29, 11, 30, 11, + 35, 11, 32, 11, 36, 30, 2, 2, 1, 1, 25, 34, 15, 28, 22, 2, 11, 13, 11, 29, + 11, 30, 11, 38, 30, 1, 2, 1, 1, 25, 37, 15, 28, 22, 2, 11, 13, 11, 29, 11, + 30, 11, 40, 30, 1, 2, 1, 1, 25, 39, 15, 28, 22, 2, 11, 13, 11, 29, 11, 30, + 11, 42, 30, 1, 2, 1, 1, 25, 41, 15, 41, 11, 32, 11, 43, 26, 15, 44, 11, 45, + 11, 46, 26, 15, 37, 11, 45, 11, 47, 26, 15, 49, 22, 4, 15, 50, 22, 2, 15, 51, + 22, 3, 15, 49, 22, 7, 15, 37, 15, 41, 15, 44, 15, 34, 15, 27, 29, 0, 5, 11, + 52, 11, 53, 11, 54, 11, 55, 30, 1, 2, 1, 1, 15, 49, 22, 4, 15, 56, 15, 57, + 15, 58, 29, 0, 3, 11, 59, 11, 60, 30, 0, 2, 1, 1, 29, 0, 2, 11, 59, 11, + 61, 30, 0, 2, 1, 1, 29, 0, 1, 11, 62, 11, 63, 30, 0, 2, 1, 1, 29, 0, + 1, 11, 59, 11, 64, 11, 52, 11, 65, 11, 54, 11, 66, 30, 2, 2, 1, 1, 25, 48, + 15, 68, 22, 2, 15, 69, 22, 2, 15, 68, 22, 1, 15, 70, 22, 2, 11, 62, 11, 71, + 11, 45, 11, 72, 30, 1, 2, 1, 1, 29, 0, 1, 2, 1, 1, 29, 0, 1, 11, 62, + 11, 73, 30, 0, 2, 1, 1, 15, 69, 22, 2, 15, 68, 22, 2, 15, 74, 18, 75, 22, + 2, 11, 62, 11, 76, 11, 45, 15, 6, 30, 1, 2, 1, 1, 15, 70, 22, 2, 11, 62, + 11, 77, 11, 45, 11, 78, 30, 1, 2, 1, 1, 29, 0, 2, 2, 1, 1, 29, 0, 1, + 11, 62, 11, 79, 30, 0, 2, 1, 1, 29, 0, 2, 2, 1, 1, 25, 67, 15, 81, 22, + 4, 15, 48, 29, 0, 1, 11, 62, 11, 82, 11, 83, 15, 67, 11, 84, 11, 72, 30, 2, + 2, 1, 1, 25, 80, 15, 81, 22, 5, 15, 49, 22, 8, 15, 18, 22, 1, 11, 62, 11, + 82, 30, 0, 2, 1, 1, 15, 86, 22, 1, 11, 13, 11, 66, 30, 0, 2, 1, 1, 15, + 86, 22, 1, 11, 13, 11, 66, 30, 0, 2, 1, 1, 15, 50, 22, 1, 15, 49, 22, 3, + 15, 18, 22, 1, 11, 62, 11, 87, 30, 0, 2, 1, 1, 15, 18, 22, 1, 11, 62, 11, + 88, 30, 0, 2, 1, 1, 15, 18, 22, 1, 11, 62, 11, 89, 30, 0, 2, 1, 1, 29, + 0, 3, 2, 1, 1, 29, 0, 1, 2, 1, 1, 15, 86, 22, 1, 11, 13, 11, 66, 30, + 0, 2, 1, 1, 15, 28, 22, 3, 11, 62, 11, 90, 11, 45, 11, 72, 11, 13, 11, 91, + 30, 2, 2, 1, 1, 29, 0, 6, 11, 52, 11, 92, 11, 59, 11, 64, 30, 1, 2, 1, + 1, 29, 0, 1, 11, 93, 15, 94, 11, 95, 15, 94, 11, 96, 15, 94, 11, 62, 11, 97, + 30, 3, 2, 1, 1, 25, 85, 15, 80, 20, 98, 2, 0, 1, 15, 99, 2, 0, 0, 15, +100, 15, 80, 2, 0, 1, 15,100, 15, 85, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0,101, 2, 0, 0, 0, 8,114,101,113,117,105,114,101, 0, 4, 0, 0, 0, 4, + 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 10,112,114, +105,110,116,118, 97,114,115, 0, 4, 0, 0, 0, 7, 0, 0, 0, 14, 64, 99,111, +110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 67, 6, 0, 15, 2, 4, + 0, 2, 2, 1, 15, 3, 11, 4, 2, 0, 1, 50, 34, 15, 3, 15, 5, 13, 0, 2, + 1, 1, 11, 6, 42, 15, 5, 13, 1, 2, 1, 1, 42, 2, 0, 1, 15, 2, 13, 0, + 2, 2, 1, 23, 1, 23, 0, 13, 0, 4, 0, 31, 54, 41, 15, 3, 11, 7, 2, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, + 0, 2,118, 0, 2, 0, 0, 0, 8,110,101,120,116,118, 97,114, 0, 2, 0, 0, + 0, 6,112,114,105,110,116, 0, 2, 0, 0, 0, 20, 45, 45,112,114,105,110,116, +118, 97,114,115, 32, 83,116, 97,114,116, 45, 45, 0, 2, 0, 0, 0, 9,116,111, +115,116,114,105,110,103, 0, 2, 0, 0, 0, 2, 61, 0, 2, 0, 0, 0, 18, 45, + 45,112,114,105,110,116,118, 97,114,115, 32, 69,110,100, 45, 45, 0, 2, 0, 0, + 0, 11,112,114,105,110,116,116, 97, 98,108,101, 0, 4, 0, 0, 0, 17, 0, 0, + 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 71, + 7, 1, 15, 3, 13, 0, 4, 0, 2, 2, 2, 15, 4, 11, 5, 2, 0, 1, 50, 36, + 15, 4, 15, 6, 13, 1, 2, 1, 1, 11, 7, 42, 15, 6, 13, 2, 2, 1, 1, 42, + 2, 0, 1, 15, 3, 13, 0, 13, 1, 2, 2, 2, 23, 2, 23, 1, 13, 1, 4, 0, + 31, 54, 43, 15, 4, 11, 8, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, + 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, 0, 2,118, 0, + 2, 0, 0, 0, 5,110,101,120,116, 0, 2, 0, 0, 0, 6,112,114,105,110,116, + 0, 2, 0, 0, 0, 21, 45, 45,112,114,105,110,116,116, 97, 98,108,101, 32, 83, +116, 97,114,116, 45, 45, 0, 2, 0, 0, 0, 9,116,111,115,116,114,105,110,103, + 0, 2, 0, 0, 0, 2, 61, 0, 2, 0, 0, 0, 19, 45, 45,112,114,105,110,116, +116, 97, 98,108,101, 32, 69,110,100, 45, 45, 0, 2, 0, 0, 0, 19,112,114,105, +110,116, 95,118,101,114,115,105,111,110, 95,105,110,102,111, 0, 4, 0, 0, 0, + 27, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, + 0, 0,241, 5, 0, 15, 0, 15, 1, 11, 2, 42, 15, 3, 18, 4, 42, 2, 0, 1, + 15, 5, 52, 17, 15, 0, 15, 5, 18, 1, 11, 2, 42, 15, 5, 18, 6, 42, 2, 0, + 1, 15, 7, 48, 4, 15, 7, 18, 1, 52, 17, 15, 0, 15, 7, 18, 1, 11, 2, 42, + 15, 7, 18, 6, 42, 2, 0, 1, 15, 0, 15, 3, 18, 1, 11, 2, 42, 15, 3, 18, + 6, 42, 2, 0, 1, 15, 0, 11, 8, 2, 0, 1, 15, 0, 11, 9, 2, 0, 1, 15, + 0, 11, 10, 15, 3, 18, 11, 11, 12, 2, 1, 1, 42, 2, 0, 1, 15, 0, 11, 13, + 15, 3, 18, 11, 11, 14, 2, 1, 1, 42, 2, 0, 1, 15, 3, 18, 11, 11, 16, 2, + 1, 1, 13, 0, 52, 9, 15, 0, 11, 17, 13, 0, 2, 0, 2, 15, 0, 11, 18, 15, + 3, 18, 11, 11, 19, 2, 1, 1, 42, 2, 0, 1, 15, 0, 11, 20, 15, 3, 18, 11, + 11, 21, 2, 1, 1, 42, 2, 0, 1, 15, 3, 18, 22, 52, 12, 15, 0, 11, 23, 15, + 3, 18, 22, 42, 2, 0, 1, 15, 3, 18, 24, 52, 12, 15, 0, 11, 25, 15, 3, 18, + 24, 42, 2, 0, 1, 15, 3, 18, 26, 52, 12, 15, 0, 11, 27, 15, 3, 18, 26, 42, + 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 28, 2, 0, 0, 0, 6,112,114,105, +110,116, 0, 2, 0, 0, 0, 9, 95, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, + 0, 2, 32, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 15, 95, 76, + 85, 65, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 3,105,109, + 0, 2, 0, 0, 0, 11, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 0, 2, 0, 0, + 0, 3, 99,100, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, 9, 73, 85, 80, 32, + 73,110,102,111, 0, 2, 0, 0, 0, 11, 32, 32, 83,121,115,116,101,109, 58, 32, + 0, 2, 0, 0, 0, 10, 71,101,116, 71,108,111, 98, 97,108, 0, 2, 0, 0, 0, + 7, 83, 89, 83, 84, 69, 77, 0, 2, 0, 0, 0, 19, 32, 32, 83,121,115,116,101, +109, 32, 86,101,114,115,105,111,110, 58, 32, 0, 2, 0, 0, 0, 14, 83, 89, 83, + 84, 69, 77, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, 0, 4,109,111,116, 0, + 2, 0, 0, 0, 13, 77, 79, 84, 73, 70, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, + 0, 0, 18, 32, 32, 77,111,116,105,102, 32, 86,101,114,115,105,111,110, 58, 32, + 0, 2, 0, 0, 0, 16, 32, 32, 83, 99,114,101,101,110, 32, 83,105,122,101, 58, + 32, 0, 2, 0, 0, 0, 11, 83, 67, 82, 69, 69, 78, 83, 73, 90, 69, 0, 2, 0, + 0, 0, 17, 32, 32, 83, 99,114,101,101,110, 32, 68,101,112,116,104, 58, 32, 0, + 2, 0, 0, 0, 12, 83, 67, 82, 69, 69, 78, 68, 69, 80, 84, 72, 0, 2, 0, 0, + 0, 10, 71, 76, 95, 86, 69, 78, 68, 79, 82, 0, 2, 0, 0, 0, 18, 32, 32, 79, +112,101,110, 71, 76, 32, 86,101,110,100,111,114, 58, 32, 0, 2, 0, 0, 0, 12, + 71, 76, 95, 82, 69, 78, 68, 69, 82, 69, 82, 0, 2, 0, 0, 0, 20, 32, 32, 79, +112,101,110, 71, 76, 32, 82,101,110,100,101,114,101,114, 58, 32, 0, 2, 0, 0, + 0, 11, 71, 76, 95, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, 0, 19, 32, 32, + 79,112,101,110, 71, 76, 32, 86,101,114,115,105,111,110, 58, 32, 0, 2, 0, 0, + 0, 9,108, 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, 12,109,117,108, 67, +111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 13,105,117,112,109,117,108,116, +105,108,105,110,101, 0, 2, 0, 0, 0, 7,101,120,112, 97,110,100, 0, 2, 0, + 0, 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 5,115,105,122,101, + 0, 2, 0, 0, 0, 8, 50, 48, 48,120, 49, 50, 48, 0, 2, 0, 0, 0, 5,102, +111,110,116, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, + 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 9,112,111,115,108, 97, 98,101,108, + 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 4, 48, 58, 48, 0, 2, 0, 0, 0, 4, + 53, 48,120, 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, 98,101,108, 0, 2, + 0, 0, 0, 1, 0, 2, 0, 0, 0, 11, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, + 0, 2, 0, 0, 0, 8, 99, 97,114,101,116, 99, 98, 0, 4, 0, 0, 0, 53, 0, + 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, + 16, 7, 3, 15, 3, 11, 4, 13, 1, 11, 5, 42, 13, 2, 42, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 4, +108,105,110, 0, 2, 0, 0, 0, 4, 99,111,108, 0, 2, 0, 0, 0, 9,112,111, +115,108, 97, 98,101,108, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, + 0, 0, 2, 58, 0, 2, 0, 0, 0, 11, 98,117,116, 69,120,101, 99,117,116,101, + 0, 2, 0, 0, 0, 10,105,117,112, 98,117,116,116,111,110, 0, 2, 0, 0, 0, + 6, 53, 48,120, 49, 53, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, + 0, 0, 8, 69,120,101, 99,117,116,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105, +111,110, 0, 2, 0, 0, 0, 28,100,111,115,116,114,105,110,103, 40,109,117,108, + 67,111,109,109, 97,110,100,115, 46,118, 97,108,117,101, 41, 0, 2, 0, 0, 0, + 17, 98,117,116, 67,108,101, 97,114, 67,111,109,109, 97,110,100,115, 0, 2, 0, + 0, 0, 6, 67,108,101, 97,114, 0, 2, 0, 0, 0, 61,109,117,108, 67,111,109, +109, 97,110,100,115, 46,118, 97,108,117,101, 32, 61, 32, 39, 39, 32, 32,102,105, +108,101,108, 97, 98,101,108, 46,116,105,116,108,101, 32, 61, 32, 39, 39, 32, 32, +108, 97,115,116,102,105,108,101, 32, 61, 32,110,105,108, 0, 2, 0, 0, 0, 12, + 98,117,116, 76,111, 97,100, 70,105,108,101, 0, 2, 0, 0, 0, 8, 76,111, 97, +100, 46, 46, 46, 0, 2, 0, 0, 0, 14, 98,117,116, 83, 97,118,101, 97,115, 70, +105,108,101, 0, 2, 0, 0, 0, 11, 83, 97,118,101, 32, 65,115, 46, 46, 46, 0, + 2, 0, 0, 0, 12, 98,117,116, 83, 97,118,101, 70,105,108,101, 0, 2, 0, 0, + 0, 5, 83, 97,118,101, 0, 4, 0, 0, 0, 63, 0, 0, 0, 14, 64, 99,111,110, +115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 67, 4, 1, 15, 0, 4, 0, + 32, 52, 9, 15, 1, 20, 2, 2, 0, 1, 50, 48, 15, 4, 15, 0, 11, 5, 2, 1, + 2, 25, 3, 15, 3, 4, 0, 31, 52, 20, 15, 6, 15, 3, 15, 7, 18, 8, 2, 0, + 2, 15, 9, 15, 3, 2, 0, 1, 50, 10, 15, 10, 11, 11, 15, 12, 42, 2, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 9,108, 97,115,116,102,105, +108,101, 0, 2, 0, 0, 0, 14, 98,117,116, 83, 97,118,101, 97,115, 70,105,108, +101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 8,110, +111,118,111, 97,114,113, 0, 2, 0, 0, 0, 9,111,112,101,110,102,105,108,101, + 0, 2, 0, 0, 0, 3,119, 43, 0, 2, 0, 0, 0, 6,119,114,105,116,101, 0, + 2, 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, + 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 10, 99,108,111,115,101,102,105, +108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 18, 67, + 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105,108,101, 32, 0, 2, 0, 0, + 0, 9,102,105,108,101,110, 97,109,101, 0, 2, 0, 0, 0, 14, 98,117,116, 83, + 97,118,101, 97,115, 70,105,108,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111, +110, 0, 4, 0, 0, 0, 77, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, + 46,108,117, 97, 0, 0, 0, 0,136, 13, 1, 15, 1, 22, 5, 11, 2, 11, 3, 11, + 4, 11, 5, 11, 6, 11, 7, 11, 8, 11, 9, 11, 10, 15, 11, 30, 4, 2, 1, 1, + 15, 12, 13, 1, 15, 13, 15, 13, 2, 0, 3, 13, 1, 18, 14, 13, 1, 18, 16, 25, + 15, 15, 17, 11, 4, 15, 15, 26, 15, 18, 13, 1, 2, 0, 1, 13, 2, 11, 19, 31, + 52, 62, 15, 15, 4, 0, 32, 52, 10, 15, 20, 11, 21, 15, 15, 42, 2, 0, 1, 15, + 23, 15, 15, 11, 24, 2, 1, 2, 13, 3, 4, 0, 31, 52, 20, 15, 25, 13, 3, 15, + 26, 18, 16, 2, 0, 2, 15, 27, 13, 3, 2, 0, 1, 50, 7, 15, 20, 11, 28, 2, + 0, 1, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 8,102,105, +108,101,100,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105,108,101,100,108, +103, 0, 2, 0, 0, 0, 11,100,105, 97,108,111,103,116,121,112,101, 0, 2, 0, + 0, 0, 5, 83, 65, 86, 69, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, + 0, 0, 0, 10, 83, 97,118,101, 32, 70,105,108,101, 0, 2, 0, 0, 0, 7,102, +105,108,116,101,114, 0, 2, 0, 0, 0, 6, 42, 46,108,117, 97, 0, 2, 0, 0, + 0, 11,102,105,108,116,101,114,105,110,102,111, 0, 2, 0, 0, 0, 10, 76,117, + 97, 32,102,105,108,101,115, 0, 2, 0, 0, 0, 9, 97,108,108,111,119,110,101, +119, 0, 2, 0, 0, 0, 4,121,101,115, 0, 2, 0, 0, 0, 9, 73,117,112, 80, +111,112,117,112, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 76, 69, 70, 84, 0, 2, + 0, 0, 0, 7,115,116, 97,116,117,115, 0, 2, 0, 0, 0, 9,108, 97,115,116, +102,105,108,101, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, + 10,102,105,108,101,108, 97, 98,101,108, 0, 2, 0, 0, 0, 11, 73,117,112, 68, +101,115,116,114,111,121, 0, 2, 0, 0, 0, 3, 45, 49, 0, 2, 0, 0, 0, 6, +101,114,114,111,114, 0, 2, 0, 0, 0, 18, 67, 97,110,110,111,116, 32, 83, 97, +118,101, 32,102,105,108,101, 32, 0, 2, 0, 0, 0, 8,110,111,118,111, 97,114, +113, 0, 2, 0, 0, 0, 9,111,112,101,110,102,105,108,101, 0, 2, 0, 0, 0, + 3,119, 43, 0, 2, 0, 0, 0, 6,119,114,105,116,101, 0, 2, 0, 0, 0, 12, +109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 10, 99,108,111, +115,101,102,105,108,101, 0, 2, 0, 0, 0, 17, 67, 97,110,110,111,116, 32, 83, + 97,118,101, 32,102,105,108,101, 0, 4, 0, 0, 0, 98, 0, 0, 0, 14, 64, 99, +111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0,153, 13, 1, 15, 1, + 22, 5, 11, 2, 11, 3, 11, 4, 11, 5, 11, 6, 11, 7, 11, 8, 11, 9, 11, 10, + 11, 11, 30, 4, 2, 1, 1, 13, 1, 20, 12, 15, 13, 15, 13, 2, 0, 3, 13, 1, + 18, 14, 13, 1, 18, 16, 15, 17, 13, 1, 2, 0, 1, 13, 2, 11, 18, 32, 46, 5, + 13, 2, 11, 19, 32, 52, 19, 13, 2, 11, 19, 32, 52, 10, 15, 20, 11, 21, 13, 3, + 42, 2, 0, 1, 50, 62, 15, 23, 13, 3, 11, 24, 2, 1, 2, 13, 4, 4, 0, 32, + 52, 12, 15, 20, 11, 21, 13, 3, 42, 2, 0, 1, 50, 32, 15, 25, 11, 16, 15, 26, + 13, 4, 11, 27, 2, 1, 2, 26, 15, 28, 13, 4, 2, 0, 1, 13, 3, 25, 29, 15, + 30, 11, 4, 15, 29, 26, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 31, 2, 0, 0, + 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105, +108,101,100,108,103, 0, 2, 0, 0, 0, 11,100,105, 97,108,111,103,116,121,112, +101, 0, 2, 0, 0, 0, 5, 79, 80, 69, 78, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 10, 76,111, 97,100, 32, 70,105,108,101, 0, 2, 0, + 0, 0, 7,102,105,108,116,101,114, 0, 2, 0, 0, 0, 6, 42, 46,108,117, 97, + 0, 2, 0, 0, 0, 11,102,105,108,116,101,114,105,110,102,111, 0, 2, 0, 0, + 0, 10, 76,117, 97, 32, 70,105,108,101,115, 0, 2, 0, 0, 0, 9, 97,108,108, +111,119,110,101,119, 0, 2, 0, 0, 0, 3, 78, 79, 0, 2, 0, 0, 0, 6,112, +111,112,117,112, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 67, 69, 78, 84, 69, 82, + 0, 2, 0, 0, 0, 7,115,116, 97,116,117,115, 0, 2, 0, 0, 0, 8,110,101, +119,102,105,108,101, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, + 0, 11, 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, 0, 0, 3, 45, 49, + 0, 2, 0, 0, 0, 2, 49, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, + 0, 0, 0, 18, 67, 97,110,110,111,116, 32,108,111, 97,100, 32,102,105,108,101, + 32, 0, 2, 0, 0, 0, 3,102,112, 0, 2, 0, 0, 0, 9,111,112,101,110,102, +105,108,101, 0, 2, 0, 0, 0, 2,114, 0, 2, 0, 0, 0, 12,109,117,108, 67, +111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 5,114,101, 97,100, 0, 2, 0, + 0, 0, 3, 42, 97, 0, 2, 0, 0, 0, 10, 99,108,111,115,101,102,105,108,101, + 0, 2, 0, 0, 0, 9,108, 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, 10, +102,105,108,101,108, 97, 98,101,108, 0, 2, 0, 0, 0, 11,118, 98,120, 67,111, +110,115,111,108,101, 0, 2, 0, 0, 0, 8,105,117,112,118, 98,111,120, 0, 2, + 0, 0, 0, 9,105,117,112,102,114, 97,109,101, 0, 2, 0, 0, 0, 8,105,117, +112,104, 98,111,120, 0, 2, 0, 0, 0, 7,109, 97,114,103,105,110, 0, 2, 0, + 0, 0, 4, 48,120, 48, 0, 2, 0, 0, 0, 4,103, 97,112, 0, 2, 0, 0, 0, + 3, 49, 48, 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, 98,101,108, 0, 2, + 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, + 9,112,111,115,108, 97, 98,101,108, 0, 2, 0, 0, 0, 10, 97,108,105,103,110, +109,101,110,116, 0, 2, 0, 0, 0, 7, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, + 0, 5, 65, 84, 79, 80, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, + 0, 0, 9, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 8, 65, 67, 69, + 78, 84, 69, 82, 0, 2, 0, 0, 0, 4, 53,120, 53, 0, 2, 0, 0, 0, 2, 53, + 0, 2, 0, 0, 0, 8,109,110,117, 77, 97,105,110, 0, 2, 0, 0, 0, 8,105, +117,112,109,101,110,117, 0, 2, 0, 0, 0, 11,105,117,112,115,117, 98,109,101, +110,117, 0, 2, 0, 0, 0, 8,105,117,112,105,116,101,109, 0, 2, 0, 0, 0, + 5, 69,120,105,116, 0, 2, 0, 0, 0, 17,114,101,116,117,114,110, 32, 73, 85, + 80, 95, 67, 76, 79, 83, 69, 0, 2, 0, 0, 0, 5, 70,105,108,101, 0, 2, 0, + 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,105,116,101,109, 0, 2, 0, 0, + 0, 22, 80,114,105,110,116, 32, 86,101,114,115,105,111,110, 32, 73,110,102,111, + 46, 46, 46, 0, 2, 0, 0, 0, 9, 65, 98,111,117,116, 46, 46, 46, 0, 2, 0, + 0, 0, 39,100,108,103, 65, 98,111,117,116, 58,112,111,112,117,112, 40, 73, 85, + 80, 95, 67, 69, 78, 84, 69, 82, 44, 32, 73, 85, 80, 95, 67, 69, 78, 84, 69, 82, + 41, 0, 2, 0, 0, 0, 5, 72,101,108,112, 0, 2, 0, 0, 0, 8,100,108,103, + 77, 97,105,110, 0, 2, 0, 0, 0, 10,105,117,112,100,105, 97,108,111,103, 0, + 2, 0, 0, 0, 29, 67,111,109,112,108,101,116,101, 32, 73,117,112, 76,117, 97, + 51, 32, 73,110,116,101,114,112,114,101,116,101,114, 0, 2, 0, 0, 0, 5,109, +101,110,117, 0, 2, 0, 0, 0, 9, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, + 0, 0, 9,100,108,103, 65, 98,111,117,116, 0, 2, 0, 0, 0, 8,105,117,112, +102,105,108,108, 0, 2, 0, 0, 0, 16, 84,101, 99,103,114, 97,102, 47, 80, 85, + 67, 45, 82,105,111, 0, 2, 0, 0, 0, 18, 77, 97,114,107, 47, 79,118,237,100, +105,111, 47, 83, 99,117,114,105, 0, 2, 0, 0, 0, 23,105,117,112, 64,116,101, + 99,103,114, 97,102, 46,112,117, 99, 45,114,105,111, 46, 98,114, 0, 2, 0, 0, + 0, 3, 79, 75, 0, 2, 0, 0, 0, 6, 53, 48, 88, 50, 48, 0, 2, 0, 0, 0, + 6, 49, 48,120, 49, 48, 0, 2, 0, 0, 0, 7,109, 97,120, 98,111,120, 0, 2, + 0, 0, 0, 7, 73, 85, 80, 95, 78, 79, 0, 2, 0, 0, 0, 7,109,105,110, 98, +111,120, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, 2, 0, 0, 0, 6, + 65, 98,111,117,116, 0, 2, 0, 0, 0, 5,115,104,111,119, 0, 2, 0, 0, 0, + 12, 73,117,112, 77, 97,105,110, 76,111,111,112, 0, 2, 0, 0, 0, 11, 73,117, +112, 68,101,115,116,114,111,121, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/console3.lo"); +} diff --git a/iup/srcconsole/loh/console3_be32.loh b/iup/srcconsole/loh/console3_be32.loh new file mode 100755 index 0000000..8cae3eb --- /dev/null +++ b/iup/srcconsole/loh/console3_be32.loh @@ -0,0 +1,254 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/console3_be32.lo"); +*/ +/* ../obj/iuplua3/console3_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64, 99,111,110,115,111, +108,101, 51, 46,108,117, 97, 0, 0, 0, 2,170, 17, 0, 11, 1, 25, 0, 11, 3, + 25, 2, 11, 5, 25, 4, 11, 7, 25, 6, 4, 0, 25, 8, 15, 10, 22, 3, 11, 11, + 15, 12, 11, 13, 11, 14, 11, 15, 11, 16, 30, 2, 2, 1, 1, 25, 9, 15, 18, 22, + 2, 11, 19, 11, 20, 11, 13, 11, 21, 30, 1, 2, 1, 1, 25, 17, 15, 18, 22, 3, + 11, 19, 11, 23, 11, 13, 11, 21, 11, 11, 11, 24, 30, 2, 2, 1, 1, 25, 22, 15, + 9, 11, 25, 11, 26, 26, 15, 28, 22, 3, 11, 13, 11, 29, 11, 30, 11, 31, 11, 32, + 11, 33, 30, 2, 2, 1, 1, 25, 27, 15, 28, 22, 3, 11, 13, 11, 29, 11, 30, 11, + 35, 11, 32, 11, 36, 30, 2, 2, 1, 1, 25, 34, 15, 28, 22, 2, 11, 13, 11, 29, + 11, 30, 11, 38, 30, 1, 2, 1, 1, 25, 37, 15, 28, 22, 2, 11, 13, 11, 29, 11, + 30, 11, 40, 30, 1, 2, 1, 1, 25, 39, 15, 28, 22, 2, 11, 13, 11, 29, 11, 30, + 11, 42, 30, 1, 2, 1, 1, 25, 41, 15, 41, 11, 32, 11, 43, 26, 15, 44, 11, 45, + 11, 46, 26, 15, 37, 11, 45, 11, 47, 26, 15, 49, 22, 4, 15, 50, 22, 2, 15, 51, + 22, 3, 15, 49, 22, 7, 15, 37, 15, 41, 15, 44, 15, 34, 15, 27, 29, 0, 5, 11, + 52, 11, 53, 11, 54, 11, 55, 30, 1, 2, 1, 1, 15, 49, 22, 4, 15, 56, 15, 57, + 15, 58, 29, 0, 3, 11, 59, 11, 60, 30, 0, 2, 1, 1, 29, 0, 2, 11, 59, 11, + 61, 30, 0, 2, 1, 1, 29, 0, 1, 11, 62, 11, 63, 30, 0, 2, 1, 1, 29, 0, + 1, 11, 59, 11, 64, 11, 52, 11, 65, 11, 54, 11, 66, 30, 2, 2, 1, 1, 25, 48, + 15, 68, 22, 2, 15, 69, 22, 2, 15, 68, 22, 1, 15, 70, 22, 2, 11, 62, 11, 71, + 11, 45, 11, 72, 30, 1, 2, 1, 1, 29, 0, 1, 2, 1, 1, 29, 0, 1, 11, 62, + 11, 73, 30, 0, 2, 1, 1, 15, 69, 22, 2, 15, 68, 22, 2, 15, 74, 18, 75, 22, + 2, 11, 62, 11, 76, 11, 45, 15, 6, 30, 1, 2, 1, 1, 15, 70, 22, 2, 11, 62, + 11, 77, 11, 45, 11, 78, 30, 1, 2, 1, 1, 29, 0, 2, 2, 1, 1, 29, 0, 1, + 11, 62, 11, 79, 30, 0, 2, 1, 1, 29, 0, 2, 2, 1, 1, 25, 67, 15, 81, 22, + 4, 15, 48, 29, 0, 1, 11, 62, 11, 82, 11, 83, 15, 67, 11, 84, 11, 72, 30, 2, + 2, 1, 1, 25, 80, 15, 81, 22, 5, 15, 49, 22, 8, 15, 18, 22, 1, 11, 62, 11, + 82, 30, 0, 2, 1, 1, 15, 86, 22, 1, 11, 13, 11, 66, 30, 0, 2, 1, 1, 15, + 86, 22, 1, 11, 13, 11, 66, 30, 0, 2, 1, 1, 15, 50, 22, 1, 15, 49, 22, 3, + 15, 18, 22, 1, 11, 62, 11, 87, 30, 0, 2, 1, 1, 15, 18, 22, 1, 11, 62, 11, + 88, 30, 0, 2, 1, 1, 15, 18, 22, 1, 11, 62, 11, 89, 30, 0, 2, 1, 1, 29, + 0, 3, 2, 1, 1, 29, 0, 1, 2, 1, 1, 15, 86, 22, 1, 11, 13, 11, 66, 30, + 0, 2, 1, 1, 15, 28, 22, 3, 11, 62, 11, 90, 11, 45, 11, 72, 11, 13, 11, 91, + 30, 2, 2, 1, 1, 29, 0, 6, 11, 52, 11, 92, 11, 59, 11, 64, 30, 1, 2, 1, + 1, 29, 0, 1, 11, 93, 15, 94, 11, 95, 15, 94, 11, 96, 15, 94, 11, 62, 11, 97, + 30, 3, 2, 1, 1, 25, 85, 15, 80, 20, 98, 2, 0, 1, 15, 99, 2, 0, 0, 15, +100, 15, 80, 2, 0, 1, 15,100, 15, 85, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0,101, 2, 0, 0, 0, 8,114,101,113,117,105,114,101, 0, 4, 0, 0, 0, 4, + 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 10,112,114, +105,110,116,118, 97,114,115, 0, 4, 0, 0, 0, 7, 0, 0, 0, 14, 64, 99,111, +110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 67, 6, 0, 15, 2, 4, + 0, 2, 2, 1, 15, 3, 11, 4, 2, 0, 1, 50, 34, 15, 3, 15, 5, 13, 0, 2, + 1, 1, 11, 6, 42, 15, 5, 13, 1, 2, 1, 1, 42, 2, 0, 1, 15, 2, 13, 0, + 2, 2, 1, 23, 1, 23, 0, 13, 0, 4, 0, 31, 54, 41, 15, 3, 11, 7, 2, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, + 0, 2,118, 0, 2, 0, 0, 0, 8,110,101,120,116,118, 97,114, 0, 2, 0, 0, + 0, 6,112,114,105,110,116, 0, 2, 0, 0, 0, 20, 45, 45,112,114,105,110,116, +118, 97,114,115, 32, 83,116, 97,114,116, 45, 45, 0, 2, 0, 0, 0, 9,116,111, +115,116,114,105,110,103, 0, 2, 0, 0, 0, 2, 61, 0, 2, 0, 0, 0, 18, 45, + 45,112,114,105,110,116,118, 97,114,115, 32, 69,110,100, 45, 45, 0, 2, 0, 0, + 0, 11,112,114,105,110,116,116, 97, 98,108,101, 0, 4, 0, 0, 0, 17, 0, 0, + 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 71, + 7, 1, 15, 3, 13, 0, 4, 0, 2, 2, 2, 15, 4, 11, 5, 2, 0, 1, 50, 36, + 15, 4, 15, 6, 13, 1, 2, 1, 1, 11, 7, 42, 15, 6, 13, 2, 2, 1, 1, 42, + 2, 0, 1, 15, 3, 13, 0, 13, 1, 2, 2, 2, 23, 2, 23, 1, 13, 1, 4, 0, + 31, 54, 43, 15, 4, 11, 8, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, + 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, 0, 2,118, 0, + 2, 0, 0, 0, 5,110,101,120,116, 0, 2, 0, 0, 0, 6,112,114,105,110,116, + 0, 2, 0, 0, 0, 21, 45, 45,112,114,105,110,116,116, 97, 98,108,101, 32, 83, +116, 97,114,116, 45, 45, 0, 2, 0, 0, 0, 9,116,111,115,116,114,105,110,103, + 0, 2, 0, 0, 0, 2, 61, 0, 2, 0, 0, 0, 19, 45, 45,112,114,105,110,116, +116, 97, 98,108,101, 32, 69,110,100, 45, 45, 0, 2, 0, 0, 0, 19,112,114,105, +110,116, 95,118,101,114,115,105,111,110, 95,105,110,102,111, 0, 4, 0, 0, 0, + 27, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, + 0, 0,241, 5, 0, 15, 0, 15, 1, 11, 2, 42, 15, 3, 18, 4, 42, 2, 0, 1, + 15, 5, 52, 17, 15, 0, 15, 5, 18, 1, 11, 2, 42, 15, 5, 18, 6, 42, 2, 0, + 1, 15, 7, 48, 4, 15, 7, 18, 1, 52, 17, 15, 0, 15, 7, 18, 1, 11, 2, 42, + 15, 7, 18, 6, 42, 2, 0, 1, 15, 0, 15, 3, 18, 1, 11, 2, 42, 15, 3, 18, + 6, 42, 2, 0, 1, 15, 0, 11, 8, 2, 0, 1, 15, 0, 11, 9, 2, 0, 1, 15, + 0, 11, 10, 15, 3, 18, 11, 11, 12, 2, 1, 1, 42, 2, 0, 1, 15, 0, 11, 13, + 15, 3, 18, 11, 11, 14, 2, 1, 1, 42, 2, 0, 1, 15, 3, 18, 11, 11, 16, 2, + 1, 1, 13, 0, 52, 9, 15, 0, 11, 17, 13, 0, 2, 0, 2, 15, 0, 11, 18, 15, + 3, 18, 11, 11, 19, 2, 1, 1, 42, 2, 0, 1, 15, 0, 11, 20, 15, 3, 18, 11, + 11, 21, 2, 1, 1, 42, 2, 0, 1, 15, 3, 18, 22, 52, 12, 15, 0, 11, 23, 15, + 3, 18, 22, 42, 2, 0, 1, 15, 3, 18, 24, 52, 12, 15, 0, 11, 25, 15, 3, 18, + 24, 42, 2, 0, 1, 15, 3, 18, 26, 52, 12, 15, 0, 11, 27, 15, 3, 18, 26, 42, + 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 28, 2, 0, 0, 0, 6,112,114,105, +110,116, 0, 2, 0, 0, 0, 9, 95, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, + 0, 2, 32, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 15, 95, 76, + 85, 65, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 3,105,109, + 0, 2, 0, 0, 0, 11, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 0, 2, 0, 0, + 0, 3, 99,100, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, 9, 73, 85, 80, 32, + 73,110,102,111, 0, 2, 0, 0, 0, 11, 32, 32, 83,121,115,116,101,109, 58, 32, + 0, 2, 0, 0, 0, 10, 71,101,116, 71,108,111, 98, 97,108, 0, 2, 0, 0, 0, + 7, 83, 89, 83, 84, 69, 77, 0, 2, 0, 0, 0, 19, 32, 32, 83,121,115,116,101, +109, 32, 86,101,114,115,105,111,110, 58, 32, 0, 2, 0, 0, 0, 14, 83, 89, 83, + 84, 69, 77, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, 0, 4,109,111,116, 0, + 2, 0, 0, 0, 13, 77, 79, 84, 73, 70, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, + 0, 0, 18, 32, 32, 77,111,116,105,102, 32, 86,101,114,115,105,111,110, 58, 32, + 0, 2, 0, 0, 0, 16, 32, 32, 83, 99,114,101,101,110, 32, 83,105,122,101, 58, + 32, 0, 2, 0, 0, 0, 11, 83, 67, 82, 69, 69, 78, 83, 73, 90, 69, 0, 2, 0, + 0, 0, 17, 32, 32, 83, 99,114,101,101,110, 32, 68,101,112,116,104, 58, 32, 0, + 2, 0, 0, 0, 12, 83, 67, 82, 69, 69, 78, 68, 69, 80, 84, 72, 0, 2, 0, 0, + 0, 10, 71, 76, 95, 86, 69, 78, 68, 79, 82, 0, 2, 0, 0, 0, 18, 32, 32, 79, +112,101,110, 71, 76, 32, 86,101,110,100,111,114, 58, 32, 0, 2, 0, 0, 0, 12, + 71, 76, 95, 82, 69, 78, 68, 69, 82, 69, 82, 0, 2, 0, 0, 0, 20, 32, 32, 79, +112,101,110, 71, 76, 32, 82,101,110,100,101,114,101,114, 58, 32, 0, 2, 0, 0, + 0, 11, 71, 76, 95, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, 0, 19, 32, 32, + 79,112,101,110, 71, 76, 32, 86,101,114,115,105,111,110, 58, 32, 0, 2, 0, 0, + 0, 9,108, 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, 12,109,117,108, 67, +111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 13,105,117,112,109,117,108,116, +105,108,105,110,101, 0, 2, 0, 0, 0, 7,101,120,112, 97,110,100, 0, 2, 0, + 0, 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 5,115,105,122,101, + 0, 2, 0, 0, 0, 8, 50, 48, 48,120, 49, 50, 48, 0, 2, 0, 0, 0, 5,102, +111,110,116, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, + 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 9,112,111,115,108, 97, 98,101,108, + 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 4, 48, 58, 48, 0, 2, 0, 0, 0, 4, + 53, 48,120, 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, 98,101,108, 0, 2, + 0, 0, 0, 1, 0, 2, 0, 0, 0, 11, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, + 0, 2, 0, 0, 0, 8, 99, 97,114,101,116, 99, 98, 0, 4, 0, 0, 0, 53, 0, + 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, + 16, 7, 3, 15, 3, 11, 4, 13, 1, 11, 5, 42, 13, 2, 42, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 4, +108,105,110, 0, 2, 0, 0, 0, 4, 99,111,108, 0, 2, 0, 0, 0, 9,112,111, +115,108, 97, 98,101,108, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, + 0, 0, 2, 58, 0, 2, 0, 0, 0, 11, 98,117,116, 69,120,101, 99,117,116,101, + 0, 2, 0, 0, 0, 10,105,117,112, 98,117,116,116,111,110, 0, 2, 0, 0, 0, + 6, 53, 48,120, 49, 53, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, + 0, 0, 8, 69,120,101, 99,117,116,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105, +111,110, 0, 2, 0, 0, 0, 28,100,111,115,116,114,105,110,103, 40,109,117,108, + 67,111,109,109, 97,110,100,115, 46,118, 97,108,117,101, 41, 0, 2, 0, 0, 0, + 17, 98,117,116, 67,108,101, 97,114, 67,111,109,109, 97,110,100,115, 0, 2, 0, + 0, 0, 6, 67,108,101, 97,114, 0, 2, 0, 0, 0, 61,109,117,108, 67,111,109, +109, 97,110,100,115, 46,118, 97,108,117,101, 32, 61, 32, 39, 39, 32, 32,102,105, +108,101,108, 97, 98,101,108, 46,116,105,116,108,101, 32, 61, 32, 39, 39, 32, 32, +108, 97,115,116,102,105,108,101, 32, 61, 32,110,105,108, 0, 2, 0, 0, 0, 12, + 98,117,116, 76,111, 97,100, 70,105,108,101, 0, 2, 0, 0, 0, 8, 76,111, 97, +100, 46, 46, 46, 0, 2, 0, 0, 0, 14, 98,117,116, 83, 97,118,101, 97,115, 70, +105,108,101, 0, 2, 0, 0, 0, 11, 83, 97,118,101, 32, 65,115, 46, 46, 46, 0, + 2, 0, 0, 0, 12, 98,117,116, 83, 97,118,101, 70,105,108,101, 0, 2, 0, 0, + 0, 5, 83, 97,118,101, 0, 4, 0, 0, 0, 63, 0, 0, 0, 14, 64, 99,111,110, +115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 67, 4, 1, 15, 0, 4, 0, + 32, 52, 9, 15, 1, 20, 2, 2, 0, 1, 50, 48, 15, 4, 15, 0, 11, 5, 2, 1, + 2, 25, 3, 15, 3, 4, 0, 31, 52, 20, 15, 6, 15, 3, 15, 7, 18, 8, 2, 0, + 2, 15, 9, 15, 3, 2, 0, 1, 50, 10, 15, 10, 11, 11, 15, 12, 42, 2, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 9,108, 97,115,116,102,105, +108,101, 0, 2, 0, 0, 0, 14, 98,117,116, 83, 97,118,101, 97,115, 70,105,108, +101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 8,110, +111,118,111, 97,114,113, 0, 2, 0, 0, 0, 9,111,112,101,110,102,105,108,101, + 0, 2, 0, 0, 0, 3,119, 43, 0, 2, 0, 0, 0, 6,119,114,105,116,101, 0, + 2, 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, + 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 10, 99,108,111,115,101,102,105, +108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 18, 67, + 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105,108,101, 32, 0, 2, 0, 0, + 0, 9,102,105,108,101,110, 97,109,101, 0, 2, 0, 0, 0, 14, 98,117,116, 83, + 97,118,101, 97,115, 70,105,108,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111, +110, 0, 4, 0, 0, 0, 77, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, + 46,108,117, 97, 0, 0, 0, 0,136, 13, 1, 15, 1, 22, 5, 11, 2, 11, 3, 11, + 4, 11, 5, 11, 6, 11, 7, 11, 8, 11, 9, 11, 10, 15, 11, 30, 4, 2, 1, 1, + 15, 12, 13, 1, 15, 13, 15, 13, 2, 0, 3, 13, 1, 18, 14, 13, 1, 18, 16, 25, + 15, 15, 17, 11, 4, 15, 15, 26, 15, 18, 13, 1, 2, 0, 1, 13, 2, 11, 19, 31, + 52, 62, 15, 15, 4, 0, 32, 52, 10, 15, 20, 11, 21, 15, 15, 42, 2, 0, 1, 15, + 23, 15, 15, 11, 24, 2, 1, 2, 13, 3, 4, 0, 31, 52, 20, 15, 25, 13, 3, 15, + 26, 18, 16, 2, 0, 2, 15, 27, 13, 3, 2, 0, 1, 50, 7, 15, 20, 11, 28, 2, + 0, 1, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 8,102,105, +108,101,100,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105,108,101,100,108, +103, 0, 2, 0, 0, 0, 11,100,105, 97,108,111,103,116,121,112,101, 0, 2, 0, + 0, 0, 5, 83, 65, 86, 69, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, + 0, 0, 0, 10, 83, 97,118,101, 32, 70,105,108,101, 0, 2, 0, 0, 0, 7,102, +105,108,116,101,114, 0, 2, 0, 0, 0, 6, 42, 46,108,117, 97, 0, 2, 0, 0, + 0, 11,102,105,108,116,101,114,105,110,102,111, 0, 2, 0, 0, 0, 10, 76,117, + 97, 32,102,105,108,101,115, 0, 2, 0, 0, 0, 9, 97,108,108,111,119,110,101, +119, 0, 2, 0, 0, 0, 4,121,101,115, 0, 2, 0, 0, 0, 9, 73,117,112, 80, +111,112,117,112, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 76, 69, 70, 84, 0, 2, + 0, 0, 0, 7,115,116, 97,116,117,115, 0, 2, 0, 0, 0, 9,108, 97,115,116, +102,105,108,101, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, + 10,102,105,108,101,108, 97, 98,101,108, 0, 2, 0, 0, 0, 11, 73,117,112, 68, +101,115,116,114,111,121, 0, 2, 0, 0, 0, 3, 45, 49, 0, 2, 0, 0, 0, 6, +101,114,114,111,114, 0, 2, 0, 0, 0, 18, 67, 97,110,110,111,116, 32, 83, 97, +118,101, 32,102,105,108,101, 32, 0, 2, 0, 0, 0, 8,110,111,118,111, 97,114, +113, 0, 2, 0, 0, 0, 9,111,112,101,110,102,105,108,101, 0, 2, 0, 0, 0, + 3,119, 43, 0, 2, 0, 0, 0, 6,119,114,105,116,101, 0, 2, 0, 0, 0, 12, +109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 10, 99,108,111, +115,101,102,105,108,101, 0, 2, 0, 0, 0, 17, 67, 97,110,110,111,116, 32, 83, + 97,118,101, 32,102,105,108,101, 0, 4, 0, 0, 0, 98, 0, 0, 0, 14, 64, 99, +111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0,153, 13, 1, 15, 1, + 22, 5, 11, 2, 11, 3, 11, 4, 11, 5, 11, 6, 11, 7, 11, 8, 11, 9, 11, 10, + 11, 11, 30, 4, 2, 1, 1, 13, 1, 20, 12, 15, 13, 15, 13, 2, 0, 3, 13, 1, + 18, 14, 13, 1, 18, 16, 15, 17, 13, 1, 2, 0, 1, 13, 2, 11, 18, 32, 46, 5, + 13, 2, 11, 19, 32, 52, 19, 13, 2, 11, 19, 32, 52, 10, 15, 20, 11, 21, 13, 3, + 42, 2, 0, 1, 50, 62, 15, 23, 13, 3, 11, 24, 2, 1, 2, 13, 4, 4, 0, 32, + 52, 12, 15, 20, 11, 21, 13, 3, 42, 2, 0, 1, 50, 32, 15, 25, 11, 16, 15, 26, + 13, 4, 11, 27, 2, 1, 2, 26, 15, 28, 13, 4, 2, 0, 1, 13, 3, 25, 29, 15, + 30, 11, 4, 15, 29, 26, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 31, 2, 0, 0, + 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105, +108,101,100,108,103, 0, 2, 0, 0, 0, 11,100,105, 97,108,111,103,116,121,112, +101, 0, 2, 0, 0, 0, 5, 79, 80, 69, 78, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 10, 76,111, 97,100, 32, 70,105,108,101, 0, 2, 0, + 0, 0, 7,102,105,108,116,101,114, 0, 2, 0, 0, 0, 6, 42, 46,108,117, 97, + 0, 2, 0, 0, 0, 11,102,105,108,116,101,114,105,110,102,111, 0, 2, 0, 0, + 0, 10, 76,117, 97, 32, 70,105,108,101,115, 0, 2, 0, 0, 0, 9, 97,108,108, +111,119,110,101,119, 0, 2, 0, 0, 0, 3, 78, 79, 0, 2, 0, 0, 0, 6,112, +111,112,117,112, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 67, 69, 78, 84, 69, 82, + 0, 2, 0, 0, 0, 7,115,116, 97,116,117,115, 0, 2, 0, 0, 0, 8,110,101, +119,102,105,108,101, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, + 0, 11, 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, 0, 0, 3, 45, 49, + 0, 2, 0, 0, 0, 2, 49, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, + 0, 0, 0, 18, 67, 97,110,110,111,116, 32,108,111, 97,100, 32,102,105,108,101, + 32, 0, 2, 0, 0, 0, 3,102,112, 0, 2, 0, 0, 0, 9,111,112,101,110,102, +105,108,101, 0, 2, 0, 0, 0, 2,114, 0, 2, 0, 0, 0, 12,109,117,108, 67, +111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 5,114,101, 97,100, 0, 2, 0, + 0, 0, 3, 42, 97, 0, 2, 0, 0, 0, 10, 99,108,111,115,101,102,105,108,101, + 0, 2, 0, 0, 0, 9,108, 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, 10, +102,105,108,101,108, 97, 98,101,108, 0, 2, 0, 0, 0, 11,118, 98,120, 67,111, +110,115,111,108,101, 0, 2, 0, 0, 0, 8,105,117,112,118, 98,111,120, 0, 2, + 0, 0, 0, 9,105,117,112,102,114, 97,109,101, 0, 2, 0, 0, 0, 8,105,117, +112,104, 98,111,120, 0, 2, 0, 0, 0, 7,109, 97,114,103,105,110, 0, 2, 0, + 0, 0, 4, 48,120, 48, 0, 2, 0, 0, 0, 4,103, 97,112, 0, 2, 0, 0, 0, + 3, 49, 48, 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, 98,101,108, 0, 2, + 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, + 9,112,111,115,108, 97, 98,101,108, 0, 2, 0, 0, 0, 10, 97,108,105,103,110, +109,101,110,116, 0, 2, 0, 0, 0, 7, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, + 0, 5, 65, 84, 79, 80, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, + 0, 0, 9, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 8, 65, 67, 69, + 78, 84, 69, 82, 0, 2, 0, 0, 0, 4, 53,120, 53, 0, 2, 0, 0, 0, 2, 53, + 0, 2, 0, 0, 0, 8,109,110,117, 77, 97,105,110, 0, 2, 0, 0, 0, 8,105, +117,112,109,101,110,117, 0, 2, 0, 0, 0, 11,105,117,112,115,117, 98,109,101, +110,117, 0, 2, 0, 0, 0, 8,105,117,112,105,116,101,109, 0, 2, 0, 0, 0, + 5, 69,120,105,116, 0, 2, 0, 0, 0, 17,114,101,116,117,114,110, 32, 73, 85, + 80, 95, 67, 76, 79, 83, 69, 0, 2, 0, 0, 0, 5, 70,105,108,101, 0, 2, 0, + 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,105,116,101,109, 0, 2, 0, 0, + 0, 22, 80,114,105,110,116, 32, 86,101,114,115,105,111,110, 32, 73,110,102,111, + 46, 46, 46, 0, 2, 0, 0, 0, 9, 65, 98,111,117,116, 46, 46, 46, 0, 2, 0, + 0, 0, 39,100,108,103, 65, 98,111,117,116, 58,112,111,112,117,112, 40, 73, 85, + 80, 95, 67, 69, 78, 84, 69, 82, 44, 32, 73, 85, 80, 95, 67, 69, 78, 84, 69, 82, + 41, 0, 2, 0, 0, 0, 5, 72,101,108,112, 0, 2, 0, 0, 0, 8,100,108,103, + 77, 97,105,110, 0, 2, 0, 0, 0, 10,105,117,112,100,105, 97,108,111,103, 0, + 2, 0, 0, 0, 29, 67,111,109,112,108,101,116,101, 32, 73,117,112, 76,117, 97, + 51, 32, 73,110,116,101,114,112,114,101,116,101,114, 0, 2, 0, 0, 0, 5,109, +101,110,117, 0, 2, 0, 0, 0, 9, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, + 0, 0, 9,100,108,103, 65, 98,111,117,116, 0, 2, 0, 0, 0, 8,105,117,112, +102,105,108,108, 0, 2, 0, 0, 0, 16, 84,101, 99,103,114, 97,102, 47, 80, 85, + 67, 45, 82,105,111, 0, 2, 0, 0, 0, 18, 77, 97,114,107, 47, 79,118,237,100, +105,111, 47, 83, 99,117,114,105, 0, 2, 0, 0, 0, 23,105,117,112, 64,116,101, + 99,103,114, 97,102, 46,112,117, 99, 45,114,105,111, 46, 98,114, 0, 2, 0, 0, + 0, 3, 79, 75, 0, 2, 0, 0, 0, 6, 53, 48, 88, 50, 48, 0, 2, 0, 0, 0, + 6, 49, 48,120, 49, 48, 0, 2, 0, 0, 0, 7,109, 97,120, 98,111,120, 0, 2, + 0, 0, 0, 7, 73, 85, 80, 95, 78, 79, 0, 2, 0, 0, 0, 7,109,105,110, 98, +111,120, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, 2, 0, 0, 0, 6, + 65, 98,111,117,116, 0, 2, 0, 0, 0, 5,115,104,111,119, 0, 2, 0, 0, 0, + 12, 73,117,112, 77, 97,105,110, 76,111,111,112, 0, 2, 0, 0, 0, 11, 73,117, +112, 68,101,115,116,114,111,121, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/console3_be32.lo"); +} diff --git a/iup/srcconsole/loh/console3_be64.loh b/iup/srcconsole/loh/console3_be64.loh new file mode 100755 index 0000000..879d789 --- /dev/null +++ b/iup/srcconsole/loh/console3_be64.loh @@ -0,0 +1,254 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/console3_be64.lo"); +*/ +/* ../obj/iuplua3/console3_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64, 99,111,110,115,111, +108,101, 51, 46,108,117, 97, 0, 0, 0, 2,170, 17, 0, 11, 1, 25, 0, 11, 3, + 25, 2, 11, 5, 25, 4, 11, 7, 25, 6, 4, 0, 25, 8, 15, 10, 22, 3, 11, 11, + 15, 12, 11, 13, 11, 14, 11, 15, 11, 16, 30, 2, 2, 1, 1, 25, 9, 15, 18, 22, + 2, 11, 19, 11, 20, 11, 13, 11, 21, 30, 1, 2, 1, 1, 25, 17, 15, 18, 22, 3, + 11, 19, 11, 23, 11, 13, 11, 21, 11, 11, 11, 24, 30, 2, 2, 1, 1, 25, 22, 15, + 9, 11, 25, 11, 26, 26, 15, 28, 22, 3, 11, 13, 11, 29, 11, 30, 11, 31, 11, 32, + 11, 33, 30, 2, 2, 1, 1, 25, 27, 15, 28, 22, 3, 11, 13, 11, 29, 11, 30, 11, + 35, 11, 32, 11, 36, 30, 2, 2, 1, 1, 25, 34, 15, 28, 22, 2, 11, 13, 11, 29, + 11, 30, 11, 38, 30, 1, 2, 1, 1, 25, 37, 15, 28, 22, 2, 11, 13, 11, 29, 11, + 30, 11, 40, 30, 1, 2, 1, 1, 25, 39, 15, 28, 22, 2, 11, 13, 11, 29, 11, 30, + 11, 42, 30, 1, 2, 1, 1, 25, 41, 15, 41, 11, 32, 11, 43, 26, 15, 44, 11, 45, + 11, 46, 26, 15, 37, 11, 45, 11, 47, 26, 15, 49, 22, 4, 15, 50, 22, 2, 15, 51, + 22, 3, 15, 49, 22, 7, 15, 37, 15, 41, 15, 44, 15, 34, 15, 27, 29, 0, 5, 11, + 52, 11, 53, 11, 54, 11, 55, 30, 1, 2, 1, 1, 15, 49, 22, 4, 15, 56, 15, 57, + 15, 58, 29, 0, 3, 11, 59, 11, 60, 30, 0, 2, 1, 1, 29, 0, 2, 11, 59, 11, + 61, 30, 0, 2, 1, 1, 29, 0, 1, 11, 62, 11, 63, 30, 0, 2, 1, 1, 29, 0, + 1, 11, 59, 11, 64, 11, 52, 11, 65, 11, 54, 11, 66, 30, 2, 2, 1, 1, 25, 48, + 15, 68, 22, 2, 15, 69, 22, 2, 15, 68, 22, 1, 15, 70, 22, 2, 11, 62, 11, 71, + 11, 45, 11, 72, 30, 1, 2, 1, 1, 29, 0, 1, 2, 1, 1, 29, 0, 1, 11, 62, + 11, 73, 30, 0, 2, 1, 1, 15, 69, 22, 2, 15, 68, 22, 2, 15, 74, 18, 75, 22, + 2, 11, 62, 11, 76, 11, 45, 15, 6, 30, 1, 2, 1, 1, 15, 70, 22, 2, 11, 62, + 11, 77, 11, 45, 11, 78, 30, 1, 2, 1, 1, 29, 0, 2, 2, 1, 1, 29, 0, 1, + 11, 62, 11, 79, 30, 0, 2, 1, 1, 29, 0, 2, 2, 1, 1, 25, 67, 15, 81, 22, + 4, 15, 48, 29, 0, 1, 11, 62, 11, 82, 11, 83, 15, 67, 11, 84, 11, 72, 30, 2, + 2, 1, 1, 25, 80, 15, 81, 22, 5, 15, 49, 22, 8, 15, 18, 22, 1, 11, 62, 11, + 82, 30, 0, 2, 1, 1, 15, 86, 22, 1, 11, 13, 11, 66, 30, 0, 2, 1, 1, 15, + 86, 22, 1, 11, 13, 11, 66, 30, 0, 2, 1, 1, 15, 50, 22, 1, 15, 49, 22, 3, + 15, 18, 22, 1, 11, 62, 11, 87, 30, 0, 2, 1, 1, 15, 18, 22, 1, 11, 62, 11, + 88, 30, 0, 2, 1, 1, 15, 18, 22, 1, 11, 62, 11, 89, 30, 0, 2, 1, 1, 29, + 0, 3, 2, 1, 1, 29, 0, 1, 2, 1, 1, 15, 86, 22, 1, 11, 13, 11, 66, 30, + 0, 2, 1, 1, 15, 28, 22, 3, 11, 62, 11, 90, 11, 45, 11, 72, 11, 13, 11, 91, + 30, 2, 2, 1, 1, 29, 0, 6, 11, 52, 11, 92, 11, 59, 11, 64, 30, 1, 2, 1, + 1, 29, 0, 1, 11, 93, 15, 94, 11, 95, 15, 94, 11, 96, 15, 94, 11, 62, 11, 97, + 30, 3, 2, 1, 1, 25, 85, 15, 80, 20, 98, 2, 0, 1, 15, 99, 2, 0, 0, 15, +100, 15, 80, 2, 0, 1, 15,100, 15, 85, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0,101, 2, 0, 0, 0, 8,114,101,113,117,105,114,101, 0, 4, 0, 0, 0, 4, + 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 10,112,114, +105,110,116,118, 97,114,115, 0, 4, 0, 0, 0, 7, 0, 0, 0, 14, 64, 99,111, +110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 67, 6, 0, 15, 2, 4, + 0, 2, 2, 1, 15, 3, 11, 4, 2, 0, 1, 50, 34, 15, 3, 15, 5, 13, 0, 2, + 1, 1, 11, 6, 42, 15, 5, 13, 1, 2, 1, 1, 42, 2, 0, 1, 15, 2, 13, 0, + 2, 2, 1, 23, 1, 23, 0, 13, 0, 4, 0, 31, 54, 41, 15, 3, 11, 7, 2, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, + 0, 2,118, 0, 2, 0, 0, 0, 8,110,101,120,116,118, 97,114, 0, 2, 0, 0, + 0, 6,112,114,105,110,116, 0, 2, 0, 0, 0, 20, 45, 45,112,114,105,110,116, +118, 97,114,115, 32, 83,116, 97,114,116, 45, 45, 0, 2, 0, 0, 0, 9,116,111, +115,116,114,105,110,103, 0, 2, 0, 0, 0, 2, 61, 0, 2, 0, 0, 0, 18, 45, + 45,112,114,105,110,116,118, 97,114,115, 32, 69,110,100, 45, 45, 0, 2, 0, 0, + 0, 11,112,114,105,110,116,116, 97, 98,108,101, 0, 4, 0, 0, 0, 17, 0, 0, + 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 71, + 7, 1, 15, 3, 13, 0, 4, 0, 2, 2, 2, 15, 4, 11, 5, 2, 0, 1, 50, 36, + 15, 4, 15, 6, 13, 1, 2, 1, 1, 11, 7, 42, 15, 6, 13, 2, 2, 1, 1, 42, + 2, 0, 1, 15, 3, 13, 0, 13, 1, 2, 2, 2, 23, 2, 23, 1, 13, 1, 4, 0, + 31, 54, 43, 15, 4, 11, 8, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, + 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, 0, 2,118, 0, + 2, 0, 0, 0, 5,110,101,120,116, 0, 2, 0, 0, 0, 6,112,114,105,110,116, + 0, 2, 0, 0, 0, 21, 45, 45,112,114,105,110,116,116, 97, 98,108,101, 32, 83, +116, 97,114,116, 45, 45, 0, 2, 0, 0, 0, 9,116,111,115,116,114,105,110,103, + 0, 2, 0, 0, 0, 2, 61, 0, 2, 0, 0, 0, 19, 45, 45,112,114,105,110,116, +116, 97, 98,108,101, 32, 69,110,100, 45, 45, 0, 2, 0, 0, 0, 19,112,114,105, +110,116, 95,118,101,114,115,105,111,110, 95,105,110,102,111, 0, 4, 0, 0, 0, + 27, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, + 0, 0,241, 5, 0, 15, 0, 15, 1, 11, 2, 42, 15, 3, 18, 4, 42, 2, 0, 1, + 15, 5, 52, 17, 15, 0, 15, 5, 18, 1, 11, 2, 42, 15, 5, 18, 6, 42, 2, 0, + 1, 15, 7, 48, 4, 15, 7, 18, 1, 52, 17, 15, 0, 15, 7, 18, 1, 11, 2, 42, + 15, 7, 18, 6, 42, 2, 0, 1, 15, 0, 15, 3, 18, 1, 11, 2, 42, 15, 3, 18, + 6, 42, 2, 0, 1, 15, 0, 11, 8, 2, 0, 1, 15, 0, 11, 9, 2, 0, 1, 15, + 0, 11, 10, 15, 3, 18, 11, 11, 12, 2, 1, 1, 42, 2, 0, 1, 15, 0, 11, 13, + 15, 3, 18, 11, 11, 14, 2, 1, 1, 42, 2, 0, 1, 15, 3, 18, 11, 11, 16, 2, + 1, 1, 13, 0, 52, 9, 15, 0, 11, 17, 13, 0, 2, 0, 2, 15, 0, 11, 18, 15, + 3, 18, 11, 11, 19, 2, 1, 1, 42, 2, 0, 1, 15, 0, 11, 20, 15, 3, 18, 11, + 11, 21, 2, 1, 1, 42, 2, 0, 1, 15, 3, 18, 22, 52, 12, 15, 0, 11, 23, 15, + 3, 18, 22, 42, 2, 0, 1, 15, 3, 18, 24, 52, 12, 15, 0, 11, 25, 15, 3, 18, + 24, 42, 2, 0, 1, 15, 3, 18, 26, 52, 12, 15, 0, 11, 27, 15, 3, 18, 26, 42, + 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 28, 2, 0, 0, 0, 6,112,114,105, +110,116, 0, 2, 0, 0, 0, 9, 95, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, + 0, 2, 32, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 15, 95, 76, + 85, 65, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 3,105,109, + 0, 2, 0, 0, 0, 11, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 0, 2, 0, 0, + 0, 3, 99,100, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, 9, 73, 85, 80, 32, + 73,110,102,111, 0, 2, 0, 0, 0, 11, 32, 32, 83,121,115,116,101,109, 58, 32, + 0, 2, 0, 0, 0, 10, 71,101,116, 71,108,111, 98, 97,108, 0, 2, 0, 0, 0, + 7, 83, 89, 83, 84, 69, 77, 0, 2, 0, 0, 0, 19, 32, 32, 83,121,115,116,101, +109, 32, 86,101,114,115,105,111,110, 58, 32, 0, 2, 0, 0, 0, 14, 83, 89, 83, + 84, 69, 77, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, 0, 4,109,111,116, 0, + 2, 0, 0, 0, 13, 77, 79, 84, 73, 70, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, + 0, 0, 18, 32, 32, 77,111,116,105,102, 32, 86,101,114,115,105,111,110, 58, 32, + 0, 2, 0, 0, 0, 16, 32, 32, 83, 99,114,101,101,110, 32, 83,105,122,101, 58, + 32, 0, 2, 0, 0, 0, 11, 83, 67, 82, 69, 69, 78, 83, 73, 90, 69, 0, 2, 0, + 0, 0, 17, 32, 32, 83, 99,114,101,101,110, 32, 68,101,112,116,104, 58, 32, 0, + 2, 0, 0, 0, 12, 83, 67, 82, 69, 69, 78, 68, 69, 80, 84, 72, 0, 2, 0, 0, + 0, 10, 71, 76, 95, 86, 69, 78, 68, 79, 82, 0, 2, 0, 0, 0, 18, 32, 32, 79, +112,101,110, 71, 76, 32, 86,101,110,100,111,114, 58, 32, 0, 2, 0, 0, 0, 12, + 71, 76, 95, 82, 69, 78, 68, 69, 82, 69, 82, 0, 2, 0, 0, 0, 20, 32, 32, 79, +112,101,110, 71, 76, 32, 82,101,110,100,101,114,101,114, 58, 32, 0, 2, 0, 0, + 0, 11, 71, 76, 95, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, 0, 19, 32, 32, + 79,112,101,110, 71, 76, 32, 86,101,114,115,105,111,110, 58, 32, 0, 2, 0, 0, + 0, 9,108, 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, 12,109,117,108, 67, +111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 13,105,117,112,109,117,108,116, +105,108,105,110,101, 0, 2, 0, 0, 0, 7,101,120,112, 97,110,100, 0, 2, 0, + 0, 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 5,115,105,122,101, + 0, 2, 0, 0, 0, 8, 50, 48, 48,120, 49, 50, 48, 0, 2, 0, 0, 0, 5,102, +111,110,116, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, + 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 9,112,111,115,108, 97, 98,101,108, + 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 4, 48, 58, 48, 0, 2, 0, 0, 0, 4, + 53, 48,120, 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, 98,101,108, 0, 2, + 0, 0, 0, 1, 0, 2, 0, 0, 0, 11, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, + 0, 2, 0, 0, 0, 8, 99, 97,114,101,116, 99, 98, 0, 4, 0, 0, 0, 53, 0, + 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, + 16, 7, 3, 15, 3, 11, 4, 13, 1, 11, 5, 42, 13, 2, 42, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 4, +108,105,110, 0, 2, 0, 0, 0, 4, 99,111,108, 0, 2, 0, 0, 0, 9,112,111, +115,108, 97, 98,101,108, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, + 0, 0, 2, 58, 0, 2, 0, 0, 0, 11, 98,117,116, 69,120,101, 99,117,116,101, + 0, 2, 0, 0, 0, 10,105,117,112, 98,117,116,116,111,110, 0, 2, 0, 0, 0, + 6, 53, 48,120, 49, 53, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, + 0, 0, 8, 69,120,101, 99,117,116,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105, +111,110, 0, 2, 0, 0, 0, 28,100,111,115,116,114,105,110,103, 40,109,117,108, + 67,111,109,109, 97,110,100,115, 46,118, 97,108,117,101, 41, 0, 2, 0, 0, 0, + 17, 98,117,116, 67,108,101, 97,114, 67,111,109,109, 97,110,100,115, 0, 2, 0, + 0, 0, 6, 67,108,101, 97,114, 0, 2, 0, 0, 0, 61,109,117,108, 67,111,109, +109, 97,110,100,115, 46,118, 97,108,117,101, 32, 61, 32, 39, 39, 32, 32,102,105, +108,101,108, 97, 98,101,108, 46,116,105,116,108,101, 32, 61, 32, 39, 39, 32, 32, +108, 97,115,116,102,105,108,101, 32, 61, 32,110,105,108, 0, 2, 0, 0, 0, 12, + 98,117,116, 76,111, 97,100, 70,105,108,101, 0, 2, 0, 0, 0, 8, 76,111, 97, +100, 46, 46, 46, 0, 2, 0, 0, 0, 14, 98,117,116, 83, 97,118,101, 97,115, 70, +105,108,101, 0, 2, 0, 0, 0, 11, 83, 97,118,101, 32, 65,115, 46, 46, 46, 0, + 2, 0, 0, 0, 12, 98,117,116, 83, 97,118,101, 70,105,108,101, 0, 2, 0, 0, + 0, 5, 83, 97,118,101, 0, 4, 0, 0, 0, 63, 0, 0, 0, 14, 64, 99,111,110, +115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 67, 4, 1, 15, 0, 4, 0, + 32, 52, 9, 15, 1, 20, 2, 2, 0, 1, 50, 48, 15, 4, 15, 0, 11, 5, 2, 1, + 2, 25, 3, 15, 3, 4, 0, 31, 52, 20, 15, 6, 15, 3, 15, 7, 18, 8, 2, 0, + 2, 15, 9, 15, 3, 2, 0, 1, 50, 10, 15, 10, 11, 11, 15, 12, 42, 2, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 9,108, 97,115,116,102,105, +108,101, 0, 2, 0, 0, 0, 14, 98,117,116, 83, 97,118,101, 97,115, 70,105,108, +101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 8,110, +111,118,111, 97,114,113, 0, 2, 0, 0, 0, 9,111,112,101,110,102,105,108,101, + 0, 2, 0, 0, 0, 3,119, 43, 0, 2, 0, 0, 0, 6,119,114,105,116,101, 0, + 2, 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, + 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 10, 99,108,111,115,101,102,105, +108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 18, 67, + 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105,108,101, 32, 0, 2, 0, 0, + 0, 9,102,105,108,101,110, 97,109,101, 0, 2, 0, 0, 0, 14, 98,117,116, 83, + 97,118,101, 97,115, 70,105,108,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111, +110, 0, 4, 0, 0, 0, 77, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, + 46,108,117, 97, 0, 0, 0, 0,136, 13, 1, 15, 1, 22, 5, 11, 2, 11, 3, 11, + 4, 11, 5, 11, 6, 11, 7, 11, 8, 11, 9, 11, 10, 15, 11, 30, 4, 2, 1, 1, + 15, 12, 13, 1, 15, 13, 15, 13, 2, 0, 3, 13, 1, 18, 14, 13, 1, 18, 16, 25, + 15, 15, 17, 11, 4, 15, 15, 26, 15, 18, 13, 1, 2, 0, 1, 13, 2, 11, 19, 31, + 52, 62, 15, 15, 4, 0, 32, 52, 10, 15, 20, 11, 21, 15, 15, 42, 2, 0, 1, 15, + 23, 15, 15, 11, 24, 2, 1, 2, 13, 3, 4, 0, 31, 52, 20, 15, 25, 13, 3, 15, + 26, 18, 16, 2, 0, 2, 15, 27, 13, 3, 2, 0, 1, 50, 7, 15, 20, 11, 28, 2, + 0, 1, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 8,102,105, +108,101,100,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105,108,101,100,108, +103, 0, 2, 0, 0, 0, 11,100,105, 97,108,111,103,116,121,112,101, 0, 2, 0, + 0, 0, 5, 83, 65, 86, 69, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, + 0, 0, 0, 10, 83, 97,118,101, 32, 70,105,108,101, 0, 2, 0, 0, 0, 7,102, +105,108,116,101,114, 0, 2, 0, 0, 0, 6, 42, 46,108,117, 97, 0, 2, 0, 0, + 0, 11,102,105,108,116,101,114,105,110,102,111, 0, 2, 0, 0, 0, 10, 76,117, + 97, 32,102,105,108,101,115, 0, 2, 0, 0, 0, 9, 97,108,108,111,119,110,101, +119, 0, 2, 0, 0, 0, 4,121,101,115, 0, 2, 0, 0, 0, 9, 73,117,112, 80, +111,112,117,112, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 76, 69, 70, 84, 0, 2, + 0, 0, 0, 7,115,116, 97,116,117,115, 0, 2, 0, 0, 0, 9,108, 97,115,116, +102,105,108,101, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, + 10,102,105,108,101,108, 97, 98,101,108, 0, 2, 0, 0, 0, 11, 73,117,112, 68, +101,115,116,114,111,121, 0, 2, 0, 0, 0, 3, 45, 49, 0, 2, 0, 0, 0, 6, +101,114,114,111,114, 0, 2, 0, 0, 0, 18, 67, 97,110,110,111,116, 32, 83, 97, +118,101, 32,102,105,108,101, 32, 0, 2, 0, 0, 0, 8,110,111,118,111, 97,114, +113, 0, 2, 0, 0, 0, 9,111,112,101,110,102,105,108,101, 0, 2, 0, 0, 0, + 3,119, 43, 0, 2, 0, 0, 0, 6,119,114,105,116,101, 0, 2, 0, 0, 0, 12, +109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 10, 99,108,111, +115,101,102,105,108,101, 0, 2, 0, 0, 0, 17, 67, 97,110,110,111,116, 32, 83, + 97,118,101, 32,102,105,108,101, 0, 4, 0, 0, 0, 98, 0, 0, 0, 14, 64, 99, +111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0,153, 13, 1, 15, 1, + 22, 5, 11, 2, 11, 3, 11, 4, 11, 5, 11, 6, 11, 7, 11, 8, 11, 9, 11, 10, + 11, 11, 30, 4, 2, 1, 1, 13, 1, 20, 12, 15, 13, 15, 13, 2, 0, 3, 13, 1, + 18, 14, 13, 1, 18, 16, 15, 17, 13, 1, 2, 0, 1, 13, 2, 11, 18, 32, 46, 5, + 13, 2, 11, 19, 32, 52, 19, 13, 2, 11, 19, 32, 52, 10, 15, 20, 11, 21, 13, 3, + 42, 2, 0, 1, 50, 62, 15, 23, 13, 3, 11, 24, 2, 1, 2, 13, 4, 4, 0, 32, + 52, 12, 15, 20, 11, 21, 13, 3, 42, 2, 0, 1, 50, 32, 15, 25, 11, 16, 15, 26, + 13, 4, 11, 27, 2, 1, 2, 26, 15, 28, 13, 4, 2, 0, 1, 13, 3, 25, 29, 15, + 30, 11, 4, 15, 29, 26, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 31, 2, 0, 0, + 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105, +108,101,100,108,103, 0, 2, 0, 0, 0, 11,100,105, 97,108,111,103,116,121,112, +101, 0, 2, 0, 0, 0, 5, 79, 80, 69, 78, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 10, 76,111, 97,100, 32, 70,105,108,101, 0, 2, 0, + 0, 0, 7,102,105,108,116,101,114, 0, 2, 0, 0, 0, 6, 42, 46,108,117, 97, + 0, 2, 0, 0, 0, 11,102,105,108,116,101,114,105,110,102,111, 0, 2, 0, 0, + 0, 10, 76,117, 97, 32, 70,105,108,101,115, 0, 2, 0, 0, 0, 9, 97,108,108, +111,119,110,101,119, 0, 2, 0, 0, 0, 3, 78, 79, 0, 2, 0, 0, 0, 6,112, +111,112,117,112, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 67, 69, 78, 84, 69, 82, + 0, 2, 0, 0, 0, 7,115,116, 97,116,117,115, 0, 2, 0, 0, 0, 8,110,101, +119,102,105,108,101, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, + 0, 11, 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, 0, 0, 3, 45, 49, + 0, 2, 0, 0, 0, 2, 49, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, + 0, 0, 0, 18, 67, 97,110,110,111,116, 32,108,111, 97,100, 32,102,105,108,101, + 32, 0, 2, 0, 0, 0, 3,102,112, 0, 2, 0, 0, 0, 9,111,112,101,110,102, +105,108,101, 0, 2, 0, 0, 0, 2,114, 0, 2, 0, 0, 0, 12,109,117,108, 67, +111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 5,114,101, 97,100, 0, 2, 0, + 0, 0, 3, 42, 97, 0, 2, 0, 0, 0, 10, 99,108,111,115,101,102,105,108,101, + 0, 2, 0, 0, 0, 9,108, 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, 10, +102,105,108,101,108, 97, 98,101,108, 0, 2, 0, 0, 0, 11,118, 98,120, 67,111, +110,115,111,108,101, 0, 2, 0, 0, 0, 8,105,117,112,118, 98,111,120, 0, 2, + 0, 0, 0, 9,105,117,112,102,114, 97,109,101, 0, 2, 0, 0, 0, 8,105,117, +112,104, 98,111,120, 0, 2, 0, 0, 0, 7,109, 97,114,103,105,110, 0, 2, 0, + 0, 0, 4, 48,120, 48, 0, 2, 0, 0, 0, 4,103, 97,112, 0, 2, 0, 0, 0, + 3, 49, 48, 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, 98,101,108, 0, 2, + 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, + 9,112,111,115,108, 97, 98,101,108, 0, 2, 0, 0, 0, 10, 97,108,105,103,110, +109,101,110,116, 0, 2, 0, 0, 0, 7, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, + 0, 5, 65, 84, 79, 80, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, + 0, 0, 9, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 8, 65, 67, 69, + 78, 84, 69, 82, 0, 2, 0, 0, 0, 4, 53,120, 53, 0, 2, 0, 0, 0, 2, 53, + 0, 2, 0, 0, 0, 8,109,110,117, 77, 97,105,110, 0, 2, 0, 0, 0, 8,105, +117,112,109,101,110,117, 0, 2, 0, 0, 0, 11,105,117,112,115,117, 98,109,101, +110,117, 0, 2, 0, 0, 0, 8,105,117,112,105,116,101,109, 0, 2, 0, 0, 0, + 5, 69,120,105,116, 0, 2, 0, 0, 0, 17,114,101,116,117,114,110, 32, 73, 85, + 80, 95, 67, 76, 79, 83, 69, 0, 2, 0, 0, 0, 5, 70,105,108,101, 0, 2, 0, + 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,105,116,101,109, 0, 2, 0, 0, + 0, 22, 80,114,105,110,116, 32, 86,101,114,115,105,111,110, 32, 73,110,102,111, + 46, 46, 46, 0, 2, 0, 0, 0, 9, 65, 98,111,117,116, 46, 46, 46, 0, 2, 0, + 0, 0, 39,100,108,103, 65, 98,111,117,116, 58,112,111,112,117,112, 40, 73, 85, + 80, 95, 67, 69, 78, 84, 69, 82, 44, 32, 73, 85, 80, 95, 67, 69, 78, 84, 69, 82, + 41, 0, 2, 0, 0, 0, 5, 72,101,108,112, 0, 2, 0, 0, 0, 8,100,108,103, + 77, 97,105,110, 0, 2, 0, 0, 0, 10,105,117,112,100,105, 97,108,111,103, 0, + 2, 0, 0, 0, 29, 67,111,109,112,108,101,116,101, 32, 73,117,112, 76,117, 97, + 51, 32, 73,110,116,101,114,112,114,101,116,101,114, 0, 2, 0, 0, 0, 5,109, +101,110,117, 0, 2, 0, 0, 0, 9, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, + 0, 0, 9,100,108,103, 65, 98,111,117,116, 0, 2, 0, 0, 0, 8,105,117,112, +102,105,108,108, 0, 2, 0, 0, 0, 16, 84,101, 99,103,114, 97,102, 47, 80, 85, + 67, 45, 82,105,111, 0, 2, 0, 0, 0, 18, 77, 97,114,107, 47, 79,118,237,100, +105,111, 47, 83, 99,117,114,105, 0, 2, 0, 0, 0, 23,105,117,112, 64,116,101, + 99,103,114, 97,102, 46,112,117, 99, 45,114,105,111, 46, 98,114, 0, 2, 0, 0, + 0, 3, 79, 75, 0, 2, 0, 0, 0, 6, 53, 48, 88, 50, 48, 0, 2, 0, 0, 0, + 6, 49, 48,120, 49, 48, 0, 2, 0, 0, 0, 7,109, 97,120, 98,111,120, 0, 2, + 0, 0, 0, 7, 73, 85, 80, 95, 78, 79, 0, 2, 0, 0, 0, 7,109,105,110, 98, +111,120, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, 2, 0, 0, 0, 6, + 65, 98,111,117,116, 0, 2, 0, 0, 0, 5,115,104,111,119, 0, 2, 0, 0, 0, + 12, 73,117,112, 77, 97,105,110, 76,111,111,112, 0, 2, 0, 0, 0, 11, 73,117, +112, 68,101,115,116,114,111,121, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/console3_be64.lo"); +} diff --git a/iup/srcconsole/loh/console3_le64.loh b/iup/srcconsole/loh/console3_le64.loh new file mode 100755 index 0000000..7d64917 --- /dev/null +++ b/iup/srcconsole/loh/console3_le64.loh @@ -0,0 +1,251 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/console3_le64.lo"); +*/ +/* ../obj/iuplua3/console3_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64, 99,111,110,115,111, +108,101, 51, 46,108,117, 97, 0, 0, 0, 2,166, 17, 0, 11, 1, 25, 0, 11, 3, + 25, 2, 11, 5, 25, 4, 4, 0, 25, 6, 15, 8, 22, 3, 11, 9, 15, 10, 11, 11, + 11, 12, 11, 13, 11, 14, 30, 2, 2, 1, 1, 25, 7, 15, 16, 22, 2, 11, 17, 11, + 18, 11, 11, 11, 19, 30, 1, 2, 1, 1, 25, 15, 15, 16, 22, 3, 11, 17, 11, 21, + 11, 11, 11, 19, 11, 9, 11, 22, 30, 2, 2, 1, 1, 25, 20, 15, 7, 11, 23, 11, + 24, 26, 15, 26, 22, 3, 11, 11, 11, 27, 11, 28, 11, 29, 11, 30, 11, 31, 30, 2, + 2, 1, 1, 25, 25, 15, 26, 22, 3, 11, 11, 11, 27, 11, 28, 11, 33, 11, 30, 11, + 34, 30, 2, 2, 1, 1, 25, 32, 15, 26, 22, 2, 11, 11, 11, 27, 11, 28, 11, 36, + 30, 1, 2, 1, 1, 25, 35, 15, 26, 22, 2, 11, 11, 11, 27, 11, 28, 11, 38, 30, + 1, 2, 1, 1, 25, 37, 15, 26, 22, 2, 11, 11, 11, 27, 11, 28, 11, 40, 30, 1, + 2, 1, 1, 25, 39, 15, 39, 11, 30, 11, 41, 26, 15, 42, 11, 43, 11, 44, 26, 15, + 35, 11, 43, 11, 45, 26, 15, 47, 22, 4, 15, 48, 22, 2, 15, 49, 22, 3, 15, 47, + 22, 7, 15, 35, 15, 39, 15, 42, 15, 32, 15, 25, 29, 0, 5, 11, 50, 11, 51, 11, + 52, 11, 53, 30, 1, 2, 1, 1, 15, 47, 22, 4, 15, 54, 15, 55, 15, 56, 29, 0, + 3, 11, 57, 11, 58, 30, 0, 2, 1, 1, 29, 0, 2, 11, 57, 11, 59, 30, 0, 2, + 1, 1, 29, 0, 1, 11, 60, 11, 61, 30, 0, 2, 1, 1, 29, 0, 1, 11, 57, 11, + 62, 11, 50, 11, 63, 11, 52, 11, 64, 30, 2, 2, 1, 1, 25, 46, 15, 66, 22, 2, + 15, 67, 22, 2, 15, 66, 22, 1, 15, 68, 22, 2, 11, 60, 11, 69, 11, 43, 11, 70, + 30, 1, 2, 1, 1, 29, 0, 1, 2, 1, 1, 29, 0, 1, 11, 60, 11, 71, 30, 0, + 2, 1, 1, 15, 67, 22, 2, 15, 66, 22, 2, 15, 72, 18, 73, 22, 2, 11, 60, 11, + 74, 11, 43, 15, 4, 30, 1, 2, 1, 1, 15, 68, 22, 2, 11, 60, 11, 75, 11, 43, + 11, 76, 30, 1, 2, 1, 1, 29, 0, 2, 2, 1, 1, 29, 0, 1, 11, 60, 11, 77, + 30, 0, 2, 1, 1, 29, 0, 2, 2, 1, 1, 25, 65, 15, 79, 22, 4, 15, 46, 29, + 0, 1, 11, 60, 11, 80, 11, 81, 15, 65, 11, 82, 11, 70, 30, 2, 2, 1, 1, 25, + 78, 15, 79, 22, 5, 15, 47, 22, 8, 15, 16, 22, 1, 11, 60, 11, 80, 30, 0, 2, + 1, 1, 15, 84, 22, 1, 11, 11, 11, 64, 30, 0, 2, 1, 1, 15, 84, 22, 1, 11, + 11, 11, 64, 30, 0, 2, 1, 1, 15, 48, 22, 1, 15, 47, 22, 3, 15, 16, 22, 1, + 11, 60, 11, 85, 30, 0, 2, 1, 1, 15, 16, 22, 1, 11, 60, 11, 86, 30, 0, 2, + 1, 1, 15, 16, 22, 1, 11, 60, 11, 87, 30, 0, 2, 1, 1, 29, 0, 3, 2, 1, + 1, 29, 0, 1, 2, 1, 1, 15, 84, 22, 1, 11, 11, 11, 64, 30, 0, 2, 1, 1, + 15, 26, 22, 3, 11, 60, 11, 88, 11, 43, 11, 70, 11, 11, 11, 89, 30, 2, 2, 1, + 1, 29, 0, 6, 11, 50, 11, 90, 11, 57, 11, 62, 30, 1, 2, 1, 1, 29, 0, 1, + 11, 91, 15, 92, 11, 93, 15, 92, 11, 94, 15, 92, 11, 60, 11, 95, 30, 3, 2, 1, + 1, 25, 83, 15, 78, 20, 96, 2, 0, 1, 15, 97, 2, 0, 0, 15, 98, 15, 78, 2, + 0, 1, 15, 98, 15, 83, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 99, 2, 0, + 0, 0, 10,112,114,105,110,116,118, 97,114,115, 0, 4, 0, 0, 0, 3, 0, 0, + 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 67, + 6, 0, 15, 2, 4, 0, 2, 2, 1, 15, 3, 11, 4, 2, 0, 1, 50, 34, 15, 3, + 15, 5, 13, 0, 2, 1, 1, 11, 6, 42, 15, 5, 13, 1, 2, 1, 1, 42, 2, 0, + 1, 15, 2, 13, 0, 2, 2, 1, 23, 1, 23, 0, 13, 0, 4, 0, 31, 54, 41, 15, + 3, 11, 7, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 2, +110, 0, 2, 0, 0, 0, 2,118, 0, 2, 0, 0, 0, 8,110,101,120,116,118, 97, +114, 0, 2, 0, 0, 0, 6,112,114,105,110,116, 0, 2, 0, 0, 0, 20, 45, 45, +112,114,105,110,116,118, 97,114,115, 32, 83,116, 97,114,116, 45, 45, 0, 2, 0, + 0, 0, 9,116,111,115,116,114,105,110,103, 0, 2, 0, 0, 0, 2, 61, 0, 2, + 0, 0, 0, 18, 45, 45,112,114,105,110,116,118, 97,114,115, 32, 69,110,100, 45, + 45, 0, 2, 0, 0, 0, 11,112,114,105,110,116,116, 97, 98,108,101, 0, 4, 0, + 0, 0, 13, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, + 0, 0, 0, 0, 71, 7, 1, 15, 3, 13, 0, 4, 0, 2, 2, 2, 15, 4, 11, 5, + 2, 0, 1, 50, 36, 15, 4, 15, 6, 13, 1, 2, 1, 1, 11, 7, 42, 15, 6, 13, + 2, 2, 1, 1, 42, 2, 0, 1, 15, 3, 13, 0, 13, 1, 2, 2, 2, 23, 2, 23, + 1, 13, 1, 4, 0, 31, 54, 43, 15, 4, 11, 8, 2, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 2,110, 0, 2, 0, + 0, 0, 2,118, 0, 2, 0, 0, 0, 5,110,101,120,116, 0, 2, 0, 0, 0, 6, +112,114,105,110,116, 0, 2, 0, 0, 0, 21, 45, 45,112,114,105,110,116,116, 97, + 98,108,101, 32, 83,116, 97,114,116, 45, 45, 0, 2, 0, 0, 0, 9,116,111,115, +116,114,105,110,103, 0, 2, 0, 0, 0, 2, 61, 0, 2, 0, 0, 0, 19, 45, 45, +112,114,105,110,116,116, 97, 98,108,101, 32, 69,110,100, 45, 45, 0, 2, 0, 0, + 0, 19,112,114,105,110,116, 95,118,101,114,115,105,111,110, 95,105,110,102,111, + 0, 4, 0, 0, 0, 23, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46, +108,117, 97, 0, 0, 0, 0,241, 5, 0, 15, 0, 15, 1, 11, 2, 42, 15, 3, 18, + 4, 42, 2, 0, 1, 15, 5, 52, 17, 15, 0, 15, 5, 18, 1, 11, 2, 42, 15, 5, + 18, 6, 42, 2, 0, 1, 15, 7, 48, 4, 15, 7, 18, 1, 52, 17, 15, 0, 15, 7, + 18, 1, 11, 2, 42, 15, 7, 18, 6, 42, 2, 0, 1, 15, 0, 15, 3, 18, 1, 11, + 2, 42, 15, 3, 18, 6, 42, 2, 0, 1, 15, 0, 11, 8, 2, 0, 1, 15, 0, 11, + 9, 2, 0, 1, 15, 0, 11, 10, 15, 3, 18, 11, 11, 12, 2, 1, 1, 42, 2, 0, + 1, 15, 0, 11, 13, 15, 3, 18, 11, 11, 14, 2, 1, 1, 42, 2, 0, 1, 15, 3, + 18, 11, 11, 16, 2, 1, 1, 13, 0, 52, 9, 15, 0, 11, 17, 13, 0, 2, 0, 2, + 15, 0, 11, 18, 15, 3, 18, 11, 11, 19, 2, 1, 1, 42, 2, 0, 1, 15, 0, 11, + 20, 15, 3, 18, 11, 11, 21, 2, 1, 1, 42, 2, 0, 1, 15, 3, 18, 22, 52, 12, + 15, 0, 11, 23, 15, 3, 18, 22, 42, 2, 0, 1, 15, 3, 18, 24, 52, 12, 15, 0, + 11, 25, 15, 3, 18, 24, 42, 2, 0, 1, 15, 3, 18, 26, 52, 12, 15, 0, 11, 27, + 15, 3, 18, 26, 42, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 28, 2, 0, 0, + 0, 6,112,114,105,110,116, 0, 2, 0, 0, 0, 9, 95, 86, 69, 82, 83, 73, 79, + 78, 0, 2, 0, 0, 0, 2, 32, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 15, 95, 76, 85, 65, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 0, 2, 0, + 0, 0, 3,105,109, 0, 2, 0, 0, 0, 11, 95, 67, 79, 80, 89, 82, 73, 71, 72, + 84, 0, 2, 0, 0, 0, 3, 99,100, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 32, 73,110,102,111, 0, 2, 0, 0, 0, 11, 32, 32, 83,121,115, +116,101,109, 58, 32, 0, 2, 0, 0, 0, 10, 71,101,116, 71,108,111, 98, 97,108, + 0, 2, 0, 0, 0, 7, 83, 89, 83, 84, 69, 77, 0, 2, 0, 0, 0, 19, 32, 32, + 83,121,115,116,101,109, 32, 86,101,114,115,105,111,110, 58, 32, 0, 2, 0, 0, + 0, 14, 83, 89, 83, 84, 69, 77, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, 0, + 4,109,111,116, 0, 2, 0, 0, 0, 13, 77, 79, 84, 73, 70, 86, 69, 82, 83, 73, + 79, 78, 0, 2, 0, 0, 0, 18, 32, 32, 77,111,116,105,102, 32, 86,101,114,115, +105,111,110, 58, 32, 0, 2, 0, 0, 0, 16, 32, 32, 83, 99,114,101,101,110, 32, + 83,105,122,101, 58, 32, 0, 2, 0, 0, 0, 11, 83, 67, 82, 69, 69, 78, 83, 73, + 90, 69, 0, 2, 0, 0, 0, 17, 32, 32, 83, 99,114,101,101,110, 32, 68,101,112, +116,104, 58, 32, 0, 2, 0, 0, 0, 12, 83, 67, 82, 69, 69, 78, 68, 69, 80, 84, + 72, 0, 2, 0, 0, 0, 10, 71, 76, 95, 86, 69, 78, 68, 79, 82, 0, 2, 0, 0, + 0, 18, 32, 32, 79,112,101,110, 71, 76, 32, 86,101,110,100,111,114, 58, 32, 0, + 2, 0, 0, 0, 12, 71, 76, 95, 82, 69, 78, 68, 69, 82, 69, 82, 0, 2, 0, 0, + 0, 20, 32, 32, 79,112,101,110, 71, 76, 32, 82,101,110,100,101,114,101,114, 58, + 32, 0, 2, 0, 0, 0, 11, 71, 76, 95, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, + 0, 0, 19, 32, 32, 79,112,101,110, 71, 76, 32, 86,101,114,115,105,111,110, 58, + 32, 0, 2, 0, 0, 0, 9,108, 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, + 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 13,105,117, +112,109,117,108,116,105,108,105,110,101, 0, 2, 0, 0, 0, 7,101,120,112, 97, +110,100, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, + 5,115,105,122,101, 0, 2, 0, 0, 0, 8, 50, 48, 48,120, 49, 50, 48, 0, 2, + 0, 0, 0, 5,102,111,110,116, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, + 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 9,112,111,115, +108, 97, 98,101,108, 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, + 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, 0, 0, 4, 48, 58, 48, 0, + 2, 0, 0, 0, 4, 53, 48,120, 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, + 98,101,108, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, 11, 72, 79, 82, 73, 90, + 79, 78, 84, 65, 76, 0, 2, 0, 0, 0, 8, 99, 97,114,101,116, 99, 98, 0, 4, + 0, 0, 0, 49, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, + 97, 0, 0, 0, 0, 16, 7, 3, 15, 3, 11, 4, 13, 1, 11, 5, 42, 13, 2, 42, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 4,108,105,110, 0, 2, 0, 0, 0, 4, 99,111,108, 0, 2, 0, + 0, 0, 9,112,111,115,108, 97, 98,101,108, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 2, 58, 0, 2, 0, 0, 0, 11, 98,117,116, 69,120, +101, 99,117,116,101, 0, 2, 0, 0, 0, 10,105,117,112, 98,117,116,116,111,110, + 0, 2, 0, 0, 0, 6, 53, 48,120, 49, 53, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 8, 69,120,101, 99,117,116,101, 0, 2, 0, 0, 0, + 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 28,100,111,115,116,114,105,110, +103, 40,109,117,108, 67,111,109,109, 97,110,100,115, 46,118, 97,108,117,101, 41, + 0, 2, 0, 0, 0, 17, 98,117,116, 67,108,101, 97,114, 67,111,109,109, 97,110, +100,115, 0, 2, 0, 0, 0, 6, 67,108,101, 97,114, 0, 2, 0, 0, 0, 61,109, +117,108, 67,111,109,109, 97,110,100,115, 46,118, 97,108,117,101, 32, 61, 32, 39, + 39, 32, 32,102,105,108,101,108, 97, 98,101,108, 46,116,105,116,108,101, 32, 61, + 32, 39, 39, 32, 32,108, 97,115,116,102,105,108,101, 32, 61, 32,110,105,108, 0, + 2, 0, 0, 0, 12, 98,117,116, 76,111, 97,100, 70,105,108,101, 0, 2, 0, 0, + 0, 8, 76,111, 97,100, 46, 46, 46, 0, 2, 0, 0, 0, 14, 98,117,116, 83, 97, +118,101, 97,115, 70,105,108,101, 0, 2, 0, 0, 0, 11, 83, 97,118,101, 32, 65, +115, 46, 46, 46, 0, 2, 0, 0, 0, 12, 98,117,116, 83, 97,118,101, 70,105,108, +101, 0, 2, 0, 0, 0, 5, 83, 97,118,101, 0, 4, 0, 0, 0, 59, 0, 0, 0, + 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 67, 4, + 1, 15, 0, 4, 0, 32, 52, 9, 15, 1, 20, 2, 2, 0, 1, 50, 48, 15, 4, 15, + 0, 11, 5, 2, 1, 2, 25, 3, 15, 3, 4, 0, 31, 52, 20, 15, 6, 15, 3, 15, + 7, 18, 8, 2, 0, 2, 15, 9, 15, 3, 2, 0, 1, 50, 10, 15, 10, 11, 11, 15, + 12, 42, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 9,108, + 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, 14, 98,117,116, 83, 97,118,101, + 97,115, 70,105,108,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, + 0, 0, 0, 8,110,111,118,111, 97,114,113, 0, 2, 0, 0, 0, 9,111,112,101, +110,102,105,108,101, 0, 2, 0, 0, 0, 3,119, 43, 0, 2, 0, 0, 0, 6,119, +114,105,116,101, 0, 2, 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100, +115, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 10, 99,108, +111,115,101,102,105,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, + 0, 0, 0, 18, 67, 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105,108,101, + 32, 0, 2, 0, 0, 0, 9,102,105,108,101,110, 97,109,101, 0, 2, 0, 0, 0, + 14, 98,117,116, 83, 97,118,101, 97,115, 70,105,108,101, 0, 2, 0, 0, 0, 7, + 97, 99,116,105,111,110, 0, 4, 0, 0, 0, 73, 0, 0, 0, 14, 64, 99,111,110, +115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0,136, 13, 1, 15, 1, 22, 5, + 11, 2, 11, 3, 11, 4, 11, 5, 11, 6, 11, 7, 11, 8, 11, 9, 11, 10, 15, 11, + 30, 4, 2, 1, 1, 15, 12, 13, 1, 15, 13, 15, 13, 2, 0, 3, 13, 1, 18, 14, + 13, 1, 18, 16, 25, 15, 15, 17, 11, 4, 15, 15, 26, 15, 18, 13, 1, 2, 0, 1, + 13, 2, 11, 19, 31, 52, 62, 15, 15, 4, 0, 32, 52, 10, 15, 20, 11, 21, 15, 15, + 42, 2, 0, 1, 15, 23, 15, 15, 11, 24, 2, 1, 2, 13, 3, 4, 0, 31, 52, 20, + 15, 25, 13, 3, 15, 26, 18, 16, 2, 0, 2, 15, 27, 13, 3, 2, 0, 1, 50, 7, + 15, 20, 11, 28, 2, 0, 1, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, + 0, 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102, +105,108,101,100,108,103, 0, 2, 0, 0, 0, 11,100,105, 97,108,111,103,116,121, +112,101, 0, 2, 0, 0, 0, 5, 83, 65, 86, 69, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 10, 83, 97,118,101, 32, 70,105,108,101, 0, 2, + 0, 0, 0, 7,102,105,108,116,101,114, 0, 2, 0, 0, 0, 6, 42, 46,108,117, + 97, 0, 2, 0, 0, 0, 11,102,105,108,116,101,114,105,110,102,111, 0, 2, 0, + 0, 0, 10, 76,117, 97, 32,102,105,108,101,115, 0, 2, 0, 0, 0, 9, 97,108, +108,111,119,110,101,119, 0, 2, 0, 0, 0, 4,121,101,115, 0, 2, 0, 0, 0, + 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 76, + 69, 70, 84, 0, 2, 0, 0, 0, 7,115,116, 97,116,117,115, 0, 2, 0, 0, 0, + 9,108, 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, + 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, 98,101,108, 0, 2, 0, 0, 0, + 11, 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, 0, 0, 3, 45, 49, 0, + 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 18, 67, 97,110,110, +111,116, 32, 83, 97,118,101, 32,102,105,108,101, 32, 0, 2, 0, 0, 0, 8,110, +111,118,111, 97,114,113, 0, 2, 0, 0, 0, 9,111,112,101,110,102,105,108,101, + 0, 2, 0, 0, 0, 3,119, 43, 0, 2, 0, 0, 0, 6,119,114,105,116,101, 0, + 2, 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, + 0, 10, 99,108,111,115,101,102,105,108,101, 0, 2, 0, 0, 0, 17, 67, 97,110, +110,111,116, 32, 83, 97,118,101, 32,102,105,108,101, 0, 4, 0, 0, 0, 94, 0, + 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, +153, 13, 1, 15, 1, 22, 5, 11, 2, 11, 3, 11, 4, 11, 5, 11, 6, 11, 7, 11, + 8, 11, 9, 11, 10, 11, 11, 30, 4, 2, 1, 1, 13, 1, 20, 12, 15, 13, 15, 13, + 2, 0, 3, 13, 1, 18, 14, 13, 1, 18, 16, 15, 17, 13, 1, 2, 0, 1, 13, 2, + 11, 18, 32, 46, 5, 13, 2, 11, 19, 32, 52, 19, 13, 2, 11, 19, 32, 52, 10, 15, + 20, 11, 21, 13, 3, 42, 2, 0, 1, 50, 62, 15, 23, 13, 3, 11, 24, 2, 1, 2, + 13, 4, 4, 0, 32, 52, 12, 15, 20, 11, 21, 13, 3, 42, 2, 0, 1, 50, 32, 15, + 25, 11, 16, 15, 26, 13, 4, 11, 27, 2, 1, 2, 26, 15, 28, 13, 4, 2, 0, 1, + 13, 3, 25, 29, 15, 30, 11, 4, 15, 29, 26, 5, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 31, 2, 0, 0, 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 11, +105,117,112,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 11,100,105, 97,108, +111,103,116,121,112,101, 0, 2, 0, 0, 0, 5, 79, 80, 69, 78, 0, 2, 0, 0, + 0, 6,116,105,116,108,101, 0, 2, 0, 0, 0, 10, 76,111, 97,100, 32, 70,105, +108,101, 0, 2, 0, 0, 0, 7,102,105,108,116,101,114, 0, 2, 0, 0, 0, 6, + 42, 46,108,117, 97, 0, 2, 0, 0, 0, 11,102,105,108,116,101,114,105,110,102, +111, 0, 2, 0, 0, 0, 10, 76,117, 97, 32, 70,105,108,101,115, 0, 2, 0, 0, + 0, 9, 97,108,108,111,119,110,101,119, 0, 2, 0, 0, 0, 3, 78, 79, 0, 2, + 0, 0, 0, 6,112,111,112,117,112, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 67, + 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 7,115,116, 97,116,117,115, 0, 2, 0, + 0, 0, 8,110,101,119,102,105,108,101, 0, 2, 0, 0, 0, 6,118, 97,108,117, +101, 0, 2, 0, 0, 0, 11, 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, + 0, 0, 3, 45, 49, 0, 2, 0, 0, 0, 2, 49, 0, 2, 0, 0, 0, 6,101,114, +114,111,114, 0, 2, 0, 0, 0, 18, 67, 97,110,110,111,116, 32,108,111, 97,100, + 32,102,105,108,101, 32, 0, 2, 0, 0, 0, 3,102,112, 0, 2, 0, 0, 0, 9, +111,112,101,110,102,105,108,101, 0, 2, 0, 0, 0, 2,114, 0, 2, 0, 0, 0, + 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 5,114,101, + 97,100, 0, 2, 0, 0, 0, 3, 42, 97, 0, 2, 0, 0, 0, 10, 99,108,111,115, +101,102,105,108,101, 0, 2, 0, 0, 0, 9,108, 97,115,116,102,105,108,101, 0, + 2, 0, 0, 0, 10,102,105,108,101,108, 97, 98,101,108, 0, 2, 0, 0, 0, 11, +118, 98,120, 67,111,110,115,111,108,101, 0, 2, 0, 0, 0, 8,105,117,112,118, + 98,111,120, 0, 2, 0, 0, 0, 9,105,117,112,102,114, 97,109,101, 0, 2, 0, + 0, 0, 8,105,117,112,104, 98,111,120, 0, 2, 0, 0, 0, 7,109, 97,114,103, +105,110, 0, 2, 0, 0, 0, 4, 48,120, 48, 0, 2, 0, 0, 0, 4,103, 97,112, + 0, 2, 0, 0, 0, 3, 49, 48, 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, + 98,101,108, 0, 2, 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100,115, + 0, 2, 0, 0, 0, 9,112,111,115,108, 97, 98,101,108, 0, 2, 0, 0, 0, 10, + 97,108,105,103,110,109,101,110,116, 0, 2, 0, 0, 0, 7, 65, 82, 73, 71, 72, + 84, 0, 2, 0, 0, 0, 5, 65, 84, 79, 80, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 9, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, + 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 4, 53,120, 53, 0, 2, + 0, 0, 0, 2, 53, 0, 2, 0, 0, 0, 8,109,110,117, 77, 97,105,110, 0, 2, + 0, 0, 0, 8,105,117,112,109,101,110,117, 0, 2, 0, 0, 0, 11,105,117,112, +115,117, 98,109,101,110,117, 0, 2, 0, 0, 0, 8,105,117,112,105,116,101,109, + 0, 2, 0, 0, 0, 5, 69,120,105,116, 0, 2, 0, 0, 0, 17,114,101,116,117, +114,110, 32, 73, 85, 80, 95, 67, 76, 79, 83, 69, 0, 2, 0, 0, 0, 5, 70,105, +108,101, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,105,116,101, +109, 0, 2, 0, 0, 0, 22, 80,114,105,110,116, 32, 86,101,114,115,105,111,110, + 32, 73,110,102,111, 46, 46, 46, 0, 2, 0, 0, 0, 9, 65, 98,111,117,116, 46, + 46, 46, 0, 2, 0, 0, 0, 39,100,108,103, 65, 98,111,117,116, 58,112,111,112, +117,112, 40, 73, 85, 80, 95, 67, 69, 78, 84, 69, 82, 44, 32, 73, 85, 80, 95, 67, + 69, 78, 84, 69, 82, 41, 0, 2, 0, 0, 0, 5, 72,101,108,112, 0, 2, 0, 0, + 0, 8,100,108,103, 77, 97,105,110, 0, 2, 0, 0, 0, 10,105,117,112,100,105, + 97,108,111,103, 0, 2, 0, 0, 0, 29, 67,111,109,112,108,101,116,101, 32, 73, +117,112, 76,117, 97, 51, 32, 73,110,116,101,114,112,114,101,116,101,114, 0, 2, + 0, 0, 0, 5,109,101,110,117, 0, 2, 0, 0, 0, 9, 99,108,111,115,101, 95, + 99, 98, 0, 2, 0, 0, 0, 9,100,108,103, 65, 98,111,117,116, 0, 2, 0, 0, + 0, 8,105,117,112,102,105,108,108, 0, 2, 0, 0, 0, 16, 84,101, 99,103,114, + 97,102, 47, 80, 85, 67, 45, 82,105,111, 0, 2, 0, 0, 0, 18, 77, 97,114,107, + 47, 79,118,237,100,105,111, 47, 83, 99,117,114,105, 0, 2, 0, 0, 0, 23,105, +117,112, 64,116,101, 99,103,114, 97,102, 46,112,117, 99, 45,114,105,111, 46, 98, +114, 0, 2, 0, 0, 0, 3, 79, 75, 0, 2, 0, 0, 0, 6, 53, 48, 88, 50, 48, + 0, 2, 0, 0, 0, 6, 49, 48,120, 49, 48, 0, 2, 0, 0, 0, 7,109, 97,120, + 98,111,120, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 79, 0, 2, 0, 0, 0, + 7,109,105,110, 98,111,120, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, + 2, 0, 0, 0, 6, 65, 98,111,117,116, 0, 2, 0, 0, 0, 5,115,104,111,119, + 0, 2, 0, 0, 0, 12, 73,117,112, 77, 97,105,110, 76,111,111,112, 0, 2, 0, + 0, 0, 11, 73,117,112, 68,101,115,116,114,111,121, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/console3_le64.lo"); +} diff --git a/iup/srcconsole/loh/console3_le64w.loh b/iup/srcconsole/loh/console3_le64w.loh new file mode 100755 index 0000000..57e9b6d --- /dev/null +++ b/iup/srcconsole/loh/console3_le64w.loh @@ -0,0 +1,251 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/console3_le64w.lo"); +*/ +/* ../obj/iuplua3/console3_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64, 99,111,110,115,111, +108,101, 51, 46,108,117, 97, 0, 0, 0, 2,166, 17, 0, 11, 1, 25, 0, 11, 3, + 25, 2, 11, 5, 25, 4, 4, 0, 25, 6, 15, 8, 22, 3, 11, 9, 15, 10, 11, 11, + 11, 12, 11, 13, 11, 14, 30, 2, 2, 1, 1, 25, 7, 15, 16, 22, 2, 11, 17, 11, + 18, 11, 11, 11, 19, 30, 1, 2, 1, 1, 25, 15, 15, 16, 22, 3, 11, 17, 11, 21, + 11, 11, 11, 19, 11, 9, 11, 22, 30, 2, 2, 1, 1, 25, 20, 15, 7, 11, 23, 11, + 24, 26, 15, 26, 22, 3, 11, 11, 11, 27, 11, 28, 11, 29, 11, 30, 11, 31, 30, 2, + 2, 1, 1, 25, 25, 15, 26, 22, 3, 11, 11, 11, 27, 11, 28, 11, 33, 11, 30, 11, + 34, 30, 2, 2, 1, 1, 25, 32, 15, 26, 22, 2, 11, 11, 11, 27, 11, 28, 11, 36, + 30, 1, 2, 1, 1, 25, 35, 15, 26, 22, 2, 11, 11, 11, 27, 11, 28, 11, 38, 30, + 1, 2, 1, 1, 25, 37, 15, 26, 22, 2, 11, 11, 11, 27, 11, 28, 11, 40, 30, 1, + 2, 1, 1, 25, 39, 15, 39, 11, 30, 11, 41, 26, 15, 42, 11, 43, 11, 44, 26, 15, + 35, 11, 43, 11, 45, 26, 15, 47, 22, 4, 15, 48, 22, 2, 15, 49, 22, 3, 15, 47, + 22, 7, 15, 35, 15, 39, 15, 42, 15, 32, 15, 25, 29, 0, 5, 11, 50, 11, 51, 11, + 52, 11, 53, 30, 1, 2, 1, 1, 15, 47, 22, 4, 15, 54, 15, 55, 15, 56, 29, 0, + 3, 11, 57, 11, 58, 30, 0, 2, 1, 1, 29, 0, 2, 11, 57, 11, 59, 30, 0, 2, + 1, 1, 29, 0, 1, 11, 60, 11, 61, 30, 0, 2, 1, 1, 29, 0, 1, 11, 57, 11, + 62, 11, 50, 11, 63, 11, 52, 11, 64, 30, 2, 2, 1, 1, 25, 46, 15, 66, 22, 2, + 15, 67, 22, 2, 15, 66, 22, 1, 15, 68, 22, 2, 11, 60, 11, 69, 11, 43, 11, 70, + 30, 1, 2, 1, 1, 29, 0, 1, 2, 1, 1, 29, 0, 1, 11, 60, 11, 71, 30, 0, + 2, 1, 1, 15, 67, 22, 2, 15, 66, 22, 2, 15, 72, 18, 73, 22, 2, 11, 60, 11, + 74, 11, 43, 15, 4, 30, 1, 2, 1, 1, 15, 68, 22, 2, 11, 60, 11, 75, 11, 43, + 11, 76, 30, 1, 2, 1, 1, 29, 0, 2, 2, 1, 1, 29, 0, 1, 11, 60, 11, 77, + 30, 0, 2, 1, 1, 29, 0, 2, 2, 1, 1, 25, 65, 15, 79, 22, 4, 15, 46, 29, + 0, 1, 11, 60, 11, 80, 11, 81, 15, 65, 11, 82, 11, 70, 30, 2, 2, 1, 1, 25, + 78, 15, 79, 22, 5, 15, 47, 22, 8, 15, 16, 22, 1, 11, 60, 11, 80, 30, 0, 2, + 1, 1, 15, 84, 22, 1, 11, 11, 11, 64, 30, 0, 2, 1, 1, 15, 84, 22, 1, 11, + 11, 11, 64, 30, 0, 2, 1, 1, 15, 48, 22, 1, 15, 47, 22, 3, 15, 16, 22, 1, + 11, 60, 11, 85, 30, 0, 2, 1, 1, 15, 16, 22, 1, 11, 60, 11, 86, 30, 0, 2, + 1, 1, 15, 16, 22, 1, 11, 60, 11, 87, 30, 0, 2, 1, 1, 29, 0, 3, 2, 1, + 1, 29, 0, 1, 2, 1, 1, 15, 84, 22, 1, 11, 11, 11, 64, 30, 0, 2, 1, 1, + 15, 26, 22, 3, 11, 60, 11, 88, 11, 43, 11, 70, 11, 11, 11, 89, 30, 2, 2, 1, + 1, 29, 0, 6, 11, 50, 11, 90, 11, 57, 11, 62, 30, 1, 2, 1, 1, 29, 0, 1, + 11, 91, 15, 92, 11, 93, 15, 92, 11, 94, 15, 92, 11, 60, 11, 95, 30, 3, 2, 1, + 1, 25, 83, 15, 78, 20, 96, 2, 0, 1, 15, 97, 2, 0, 0, 15, 98, 15, 78, 2, + 0, 1, 15, 98, 15, 83, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 99, 2, 0, + 0, 0, 10,112,114,105,110,116,118, 97,114,115, 0, 4, 0, 0, 0, 3, 0, 0, + 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 67, + 6, 0, 15, 2, 4, 0, 2, 2, 1, 15, 3, 11, 4, 2, 0, 1, 50, 34, 15, 3, + 15, 5, 13, 0, 2, 1, 1, 11, 6, 42, 15, 5, 13, 1, 2, 1, 1, 42, 2, 0, + 1, 15, 2, 13, 0, 2, 2, 1, 23, 1, 23, 0, 13, 0, 4, 0, 31, 54, 41, 15, + 3, 11, 7, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 2, +110, 0, 2, 0, 0, 0, 2,118, 0, 2, 0, 0, 0, 8,110,101,120,116,118, 97, +114, 0, 2, 0, 0, 0, 6,112,114,105,110,116, 0, 2, 0, 0, 0, 20, 45, 45, +112,114,105,110,116,118, 97,114,115, 32, 83,116, 97,114,116, 45, 45, 0, 2, 0, + 0, 0, 9,116,111,115,116,114,105,110,103, 0, 2, 0, 0, 0, 2, 61, 0, 2, + 0, 0, 0, 18, 45, 45,112,114,105,110,116,118, 97,114,115, 32, 69,110,100, 45, + 45, 0, 2, 0, 0, 0, 11,112,114,105,110,116,116, 97, 98,108,101, 0, 4, 0, + 0, 0, 13, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, + 0, 0, 0, 0, 71, 7, 1, 15, 3, 13, 0, 4, 0, 2, 2, 2, 15, 4, 11, 5, + 2, 0, 1, 50, 36, 15, 4, 15, 6, 13, 1, 2, 1, 1, 11, 7, 42, 15, 6, 13, + 2, 2, 1, 1, 42, 2, 0, 1, 15, 3, 13, 0, 13, 1, 2, 2, 2, 23, 2, 23, + 1, 13, 1, 4, 0, 31, 54, 43, 15, 4, 11, 8, 2, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 2,110, 0, 2, 0, + 0, 0, 2,118, 0, 2, 0, 0, 0, 5,110,101,120,116, 0, 2, 0, 0, 0, 6, +112,114,105,110,116, 0, 2, 0, 0, 0, 21, 45, 45,112,114,105,110,116,116, 97, + 98,108,101, 32, 83,116, 97,114,116, 45, 45, 0, 2, 0, 0, 0, 9,116,111,115, +116,114,105,110,103, 0, 2, 0, 0, 0, 2, 61, 0, 2, 0, 0, 0, 19, 45, 45, +112,114,105,110,116,116, 97, 98,108,101, 32, 69,110,100, 45, 45, 0, 2, 0, 0, + 0, 19,112,114,105,110,116, 95,118,101,114,115,105,111,110, 95,105,110,102,111, + 0, 4, 0, 0, 0, 23, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46, +108,117, 97, 0, 0, 0, 0,241, 5, 0, 15, 0, 15, 1, 11, 2, 42, 15, 3, 18, + 4, 42, 2, 0, 1, 15, 5, 52, 17, 15, 0, 15, 5, 18, 1, 11, 2, 42, 15, 5, + 18, 6, 42, 2, 0, 1, 15, 7, 48, 4, 15, 7, 18, 1, 52, 17, 15, 0, 15, 7, + 18, 1, 11, 2, 42, 15, 7, 18, 6, 42, 2, 0, 1, 15, 0, 15, 3, 18, 1, 11, + 2, 42, 15, 3, 18, 6, 42, 2, 0, 1, 15, 0, 11, 8, 2, 0, 1, 15, 0, 11, + 9, 2, 0, 1, 15, 0, 11, 10, 15, 3, 18, 11, 11, 12, 2, 1, 1, 42, 2, 0, + 1, 15, 0, 11, 13, 15, 3, 18, 11, 11, 14, 2, 1, 1, 42, 2, 0, 1, 15, 3, + 18, 11, 11, 16, 2, 1, 1, 13, 0, 52, 9, 15, 0, 11, 17, 13, 0, 2, 0, 2, + 15, 0, 11, 18, 15, 3, 18, 11, 11, 19, 2, 1, 1, 42, 2, 0, 1, 15, 0, 11, + 20, 15, 3, 18, 11, 11, 21, 2, 1, 1, 42, 2, 0, 1, 15, 3, 18, 22, 52, 12, + 15, 0, 11, 23, 15, 3, 18, 22, 42, 2, 0, 1, 15, 3, 18, 24, 52, 12, 15, 0, + 11, 25, 15, 3, 18, 24, 42, 2, 0, 1, 15, 3, 18, 26, 52, 12, 15, 0, 11, 27, + 15, 3, 18, 26, 42, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 28, 2, 0, 0, + 0, 6,112,114,105,110,116, 0, 2, 0, 0, 0, 9, 95, 86, 69, 82, 83, 73, 79, + 78, 0, 2, 0, 0, 0, 2, 32, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 15, 95, 76, 85, 65, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 0, 2, 0, + 0, 0, 3,105,109, 0, 2, 0, 0, 0, 11, 95, 67, 79, 80, 89, 82, 73, 71, 72, + 84, 0, 2, 0, 0, 0, 3, 99,100, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 32, 73,110,102,111, 0, 2, 0, 0, 0, 11, 32, 32, 83,121,115, +116,101,109, 58, 32, 0, 2, 0, 0, 0, 10, 71,101,116, 71,108,111, 98, 97,108, + 0, 2, 0, 0, 0, 7, 83, 89, 83, 84, 69, 77, 0, 2, 0, 0, 0, 19, 32, 32, + 83,121,115,116,101,109, 32, 86,101,114,115,105,111,110, 58, 32, 0, 2, 0, 0, + 0, 14, 83, 89, 83, 84, 69, 77, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, 0, 0, + 4,109,111,116, 0, 2, 0, 0, 0, 13, 77, 79, 84, 73, 70, 86, 69, 82, 83, 73, + 79, 78, 0, 2, 0, 0, 0, 18, 32, 32, 77,111,116,105,102, 32, 86,101,114,115, +105,111,110, 58, 32, 0, 2, 0, 0, 0, 16, 32, 32, 83, 99,114,101,101,110, 32, + 83,105,122,101, 58, 32, 0, 2, 0, 0, 0, 11, 83, 67, 82, 69, 69, 78, 83, 73, + 90, 69, 0, 2, 0, 0, 0, 17, 32, 32, 83, 99,114,101,101,110, 32, 68,101,112, +116,104, 58, 32, 0, 2, 0, 0, 0, 12, 83, 67, 82, 69, 69, 78, 68, 69, 80, 84, + 72, 0, 2, 0, 0, 0, 10, 71, 76, 95, 86, 69, 78, 68, 79, 82, 0, 2, 0, 0, + 0, 18, 32, 32, 79,112,101,110, 71, 76, 32, 86,101,110,100,111,114, 58, 32, 0, + 2, 0, 0, 0, 12, 71, 76, 95, 82, 69, 78, 68, 69, 82, 69, 82, 0, 2, 0, 0, + 0, 20, 32, 32, 79,112,101,110, 71, 76, 32, 82,101,110,100,101,114,101,114, 58, + 32, 0, 2, 0, 0, 0, 11, 71, 76, 95, 86, 69, 82, 83, 73, 79, 78, 0, 2, 0, + 0, 0, 19, 32, 32, 79,112,101,110, 71, 76, 32, 86,101,114,115,105,111,110, 58, + 32, 0, 2, 0, 0, 0, 9,108, 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, + 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 13,105,117, +112,109,117,108,116,105,108,105,110,101, 0, 2, 0, 0, 0, 7,101,120,112, 97, +110,100, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, + 5,115,105,122,101, 0, 2, 0, 0, 0, 8, 50, 48, 48,120, 49, 50, 48, 0, 2, + 0, 0, 0, 5,102,111,110,116, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, + 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 9,112,111,115, +108, 97, 98,101,108, 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, + 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, 0, 0, 4, 48, 58, 48, 0, + 2, 0, 0, 0, 4, 53, 48,120, 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, + 98,101,108, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, 11, 72, 79, 82, 73, 90, + 79, 78, 84, 65, 76, 0, 2, 0, 0, 0, 8, 99, 97,114,101,116, 99, 98, 0, 4, + 0, 0, 0, 49, 0, 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, + 97, 0, 0, 0, 0, 16, 7, 3, 15, 3, 11, 4, 13, 1, 11, 5, 42, 13, 2, 42, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 4,108,105,110, 0, 2, 0, 0, 0, 4, 99,111,108, 0, 2, 0, + 0, 0, 9,112,111,115,108, 97, 98,101,108, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 2, 58, 0, 2, 0, 0, 0, 11, 98,117,116, 69,120, +101, 99,117,116,101, 0, 2, 0, 0, 0, 10,105,117,112, 98,117,116,116,111,110, + 0, 2, 0, 0, 0, 6, 53, 48,120, 49, 53, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 8, 69,120,101, 99,117,116,101, 0, 2, 0, 0, 0, + 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 28,100,111,115,116,114,105,110, +103, 40,109,117,108, 67,111,109,109, 97,110,100,115, 46,118, 97,108,117,101, 41, + 0, 2, 0, 0, 0, 17, 98,117,116, 67,108,101, 97,114, 67,111,109,109, 97,110, +100,115, 0, 2, 0, 0, 0, 6, 67,108,101, 97,114, 0, 2, 0, 0, 0, 61,109, +117,108, 67,111,109,109, 97,110,100,115, 46,118, 97,108,117,101, 32, 61, 32, 39, + 39, 32, 32,102,105,108,101,108, 97, 98,101,108, 46,116,105,116,108,101, 32, 61, + 32, 39, 39, 32, 32,108, 97,115,116,102,105,108,101, 32, 61, 32,110,105,108, 0, + 2, 0, 0, 0, 12, 98,117,116, 76,111, 97,100, 70,105,108,101, 0, 2, 0, 0, + 0, 8, 76,111, 97,100, 46, 46, 46, 0, 2, 0, 0, 0, 14, 98,117,116, 83, 97, +118,101, 97,115, 70,105,108,101, 0, 2, 0, 0, 0, 11, 83, 97,118,101, 32, 65, +115, 46, 46, 46, 0, 2, 0, 0, 0, 12, 98,117,116, 83, 97,118,101, 70,105,108, +101, 0, 2, 0, 0, 0, 5, 83, 97,118,101, 0, 4, 0, 0, 0, 59, 0, 0, 0, + 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, 67, 4, + 1, 15, 0, 4, 0, 32, 52, 9, 15, 1, 20, 2, 2, 0, 1, 50, 48, 15, 4, 15, + 0, 11, 5, 2, 1, 2, 25, 3, 15, 3, 4, 0, 31, 52, 20, 15, 6, 15, 3, 15, + 7, 18, 8, 2, 0, 2, 15, 9, 15, 3, 2, 0, 1, 50, 10, 15, 10, 11, 11, 15, + 12, 42, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 9,108, + 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, 14, 98,117,116, 83, 97,118,101, + 97,115, 70,105,108,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, + 0, 0, 0, 8,110,111,118,111, 97,114,113, 0, 2, 0, 0, 0, 9,111,112,101, +110,102,105,108,101, 0, 2, 0, 0, 0, 3,119, 43, 0, 2, 0, 0, 0, 6,119, +114,105,116,101, 0, 2, 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100, +115, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 10, 99,108, +111,115,101,102,105,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, + 0, 0, 0, 18, 67, 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105,108,101, + 32, 0, 2, 0, 0, 0, 9,102,105,108,101,110, 97,109,101, 0, 2, 0, 0, 0, + 14, 98,117,116, 83, 97,118,101, 97,115, 70,105,108,101, 0, 2, 0, 0, 0, 7, + 97, 99,116,105,111,110, 0, 4, 0, 0, 0, 73, 0, 0, 0, 14, 64, 99,111,110, +115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0,136, 13, 1, 15, 1, 22, 5, + 11, 2, 11, 3, 11, 4, 11, 5, 11, 6, 11, 7, 11, 8, 11, 9, 11, 10, 15, 11, + 30, 4, 2, 1, 1, 15, 12, 13, 1, 15, 13, 15, 13, 2, 0, 3, 13, 1, 18, 14, + 13, 1, 18, 16, 25, 15, 15, 17, 11, 4, 15, 15, 26, 15, 18, 13, 1, 2, 0, 1, + 13, 2, 11, 19, 31, 52, 62, 15, 15, 4, 0, 32, 52, 10, 15, 20, 11, 21, 15, 15, + 42, 2, 0, 1, 15, 23, 15, 15, 11, 24, 2, 1, 2, 13, 3, 4, 0, 31, 52, 20, + 15, 25, 13, 3, 15, 26, 18, 16, 2, 0, 2, 15, 27, 13, 3, 2, 0, 1, 50, 7, + 15, 20, 11, 28, 2, 0, 1, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, + 0, 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102, +105,108,101,100,108,103, 0, 2, 0, 0, 0, 11,100,105, 97,108,111,103,116,121, +112,101, 0, 2, 0, 0, 0, 5, 83, 65, 86, 69, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 10, 83, 97,118,101, 32, 70,105,108,101, 0, 2, + 0, 0, 0, 7,102,105,108,116,101,114, 0, 2, 0, 0, 0, 6, 42, 46,108,117, + 97, 0, 2, 0, 0, 0, 11,102,105,108,116,101,114,105,110,102,111, 0, 2, 0, + 0, 0, 10, 76,117, 97, 32,102,105,108,101,115, 0, 2, 0, 0, 0, 9, 97,108, +108,111,119,110,101,119, 0, 2, 0, 0, 0, 4,121,101,115, 0, 2, 0, 0, 0, + 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 76, + 69, 70, 84, 0, 2, 0, 0, 0, 7,115,116, 97,116,117,115, 0, 2, 0, 0, 0, + 9,108, 97,115,116,102,105,108,101, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, + 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, 98,101,108, 0, 2, 0, 0, 0, + 11, 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, 0, 0, 3, 45, 49, 0, + 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 18, 67, 97,110,110, +111,116, 32, 83, 97,118,101, 32,102,105,108,101, 32, 0, 2, 0, 0, 0, 8,110, +111,118,111, 97,114,113, 0, 2, 0, 0, 0, 9,111,112,101,110,102,105,108,101, + 0, 2, 0, 0, 0, 3,119, 43, 0, 2, 0, 0, 0, 6,119,114,105,116,101, 0, + 2, 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, + 0, 10, 99,108,111,115,101,102,105,108,101, 0, 2, 0, 0, 0, 17, 67, 97,110, +110,111,116, 32, 83, 97,118,101, 32,102,105,108,101, 0, 4, 0, 0, 0, 94, 0, + 0, 0, 14, 64, 99,111,110,115,111,108,101, 51, 46,108,117, 97, 0, 0, 0, 0, +153, 13, 1, 15, 1, 22, 5, 11, 2, 11, 3, 11, 4, 11, 5, 11, 6, 11, 7, 11, + 8, 11, 9, 11, 10, 11, 11, 30, 4, 2, 1, 1, 13, 1, 20, 12, 15, 13, 15, 13, + 2, 0, 3, 13, 1, 18, 14, 13, 1, 18, 16, 15, 17, 13, 1, 2, 0, 1, 13, 2, + 11, 18, 32, 46, 5, 13, 2, 11, 19, 32, 52, 19, 13, 2, 11, 19, 32, 52, 10, 15, + 20, 11, 21, 13, 3, 42, 2, 0, 1, 50, 62, 15, 23, 13, 3, 11, 24, 2, 1, 2, + 13, 4, 4, 0, 32, 52, 12, 15, 20, 11, 21, 13, 3, 42, 2, 0, 1, 50, 32, 15, + 25, 11, 16, 15, 26, 13, 4, 11, 27, 2, 1, 2, 26, 15, 28, 13, 4, 2, 0, 1, + 13, 3, 25, 29, 15, 30, 11, 4, 15, 29, 26, 5, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 31, 2, 0, 0, 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 11, +105,117,112,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 11,100,105, 97,108, +111,103,116,121,112,101, 0, 2, 0, 0, 0, 5, 79, 80, 69, 78, 0, 2, 0, 0, + 0, 6,116,105,116,108,101, 0, 2, 0, 0, 0, 10, 76,111, 97,100, 32, 70,105, +108,101, 0, 2, 0, 0, 0, 7,102,105,108,116,101,114, 0, 2, 0, 0, 0, 6, + 42, 46,108,117, 97, 0, 2, 0, 0, 0, 11,102,105,108,116,101,114,105,110,102, +111, 0, 2, 0, 0, 0, 10, 76,117, 97, 32, 70,105,108,101,115, 0, 2, 0, 0, + 0, 9, 97,108,108,111,119,110,101,119, 0, 2, 0, 0, 0, 3, 78, 79, 0, 2, + 0, 0, 0, 6,112,111,112,117,112, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 67, + 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 7,115,116, 97,116,117,115, 0, 2, 0, + 0, 0, 8,110,101,119,102,105,108,101, 0, 2, 0, 0, 0, 6,118, 97,108,117, +101, 0, 2, 0, 0, 0, 11, 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, + 0, 0, 3, 45, 49, 0, 2, 0, 0, 0, 2, 49, 0, 2, 0, 0, 0, 6,101,114, +114,111,114, 0, 2, 0, 0, 0, 18, 67, 97,110,110,111,116, 32,108,111, 97,100, + 32,102,105,108,101, 32, 0, 2, 0, 0, 0, 3,102,112, 0, 2, 0, 0, 0, 9, +111,112,101,110,102,105,108,101, 0, 2, 0, 0, 0, 2,114, 0, 2, 0, 0, 0, + 12,109,117,108, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, 0, 5,114,101, + 97,100, 0, 2, 0, 0, 0, 3, 42, 97, 0, 2, 0, 0, 0, 10, 99,108,111,115, +101,102,105,108,101, 0, 2, 0, 0, 0, 9,108, 97,115,116,102,105,108,101, 0, + 2, 0, 0, 0, 10,102,105,108,101,108, 97, 98,101,108, 0, 2, 0, 0, 0, 11, +118, 98,120, 67,111,110,115,111,108,101, 0, 2, 0, 0, 0, 8,105,117,112,118, + 98,111,120, 0, 2, 0, 0, 0, 9,105,117,112,102,114, 97,109,101, 0, 2, 0, + 0, 0, 8,105,117,112,104, 98,111,120, 0, 2, 0, 0, 0, 7,109, 97,114,103, +105,110, 0, 2, 0, 0, 0, 4, 48,120, 48, 0, 2, 0, 0, 0, 4,103, 97,112, + 0, 2, 0, 0, 0, 3, 49, 48, 0, 2, 0, 0, 0, 10,102,105,108,101,108, 97, + 98,101,108, 0, 2, 0, 0, 0, 12,109,117,108, 67,111,109,109, 97,110,100,115, + 0, 2, 0, 0, 0, 9,112,111,115,108, 97, 98,101,108, 0, 2, 0, 0, 0, 10, + 97,108,105,103,110,109,101,110,116, 0, 2, 0, 0, 0, 7, 65, 82, 73, 71, 72, + 84, 0, 2, 0, 0, 0, 5, 65, 84, 79, 80, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 9, 67,111,109,109, 97,110,100,115, 0, 2, 0, 0, + 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 4, 53,120, 53, 0, 2, + 0, 0, 0, 2, 53, 0, 2, 0, 0, 0, 8,109,110,117, 77, 97,105,110, 0, 2, + 0, 0, 0, 8,105,117,112,109,101,110,117, 0, 2, 0, 0, 0, 11,105,117,112, +115,117, 98,109,101,110,117, 0, 2, 0, 0, 0, 8,105,117,112,105,116,101,109, + 0, 2, 0, 0, 0, 5, 69,120,105,116, 0, 2, 0, 0, 0, 17,114,101,116,117, +114,110, 32, 73, 85, 80, 95, 67, 76, 79, 83, 69, 0, 2, 0, 0, 0, 5, 70,105, +108,101, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,105,116,101, +109, 0, 2, 0, 0, 0, 22, 80,114,105,110,116, 32, 86,101,114,115,105,111,110, + 32, 73,110,102,111, 46, 46, 46, 0, 2, 0, 0, 0, 9, 65, 98,111,117,116, 46, + 46, 46, 0, 2, 0, 0, 0, 39,100,108,103, 65, 98,111,117,116, 58,112,111,112, +117,112, 40, 73, 85, 80, 95, 67, 69, 78, 84, 69, 82, 44, 32, 73, 85, 80, 95, 67, + 69, 78, 84, 69, 82, 41, 0, 2, 0, 0, 0, 5, 72,101,108,112, 0, 2, 0, 0, + 0, 8,100,108,103, 77, 97,105,110, 0, 2, 0, 0, 0, 10,105,117,112,100,105, + 97,108,111,103, 0, 2, 0, 0, 0, 29, 67,111,109,112,108,101,116,101, 32, 73, +117,112, 76,117, 97, 51, 32, 73,110,116,101,114,112,114,101,116,101,114, 0, 2, + 0, 0, 0, 5,109,101,110,117, 0, 2, 0, 0, 0, 9, 99,108,111,115,101, 95, + 99, 98, 0, 2, 0, 0, 0, 9,100,108,103, 65, 98,111,117,116, 0, 2, 0, 0, + 0, 8,105,117,112,102,105,108,108, 0, 2, 0, 0, 0, 16, 84,101, 99,103,114, + 97,102, 47, 80, 85, 67, 45, 82,105,111, 0, 2, 0, 0, 0, 18, 77, 97,114,107, + 47, 79,118,237,100,105,111, 47, 83, 99,117,114,105, 0, 2, 0, 0, 0, 23,105, +117,112, 64,116,101, 99,103,114, 97,102, 46,112,117, 99, 45,114,105,111, 46, 98, +114, 0, 2, 0, 0, 0, 3, 79, 75, 0, 2, 0, 0, 0, 6, 53, 48, 88, 50, 48, + 0, 2, 0, 0, 0, 6, 49, 48,120, 49, 48, 0, 2, 0, 0, 0, 7,109, 97,120, + 98,111,120, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 79, 0, 2, 0, 0, 0, + 7,109,105,110, 98,111,120, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, + 2, 0, 0, 0, 6, 65, 98,111,117,116, 0, 2, 0, 0, 0, 5,115,104,111,119, + 0, 2, 0, 0, 0, 12, 73,117,112, 77, 97,105,110, 76,111,111,112, 0, 2, 0, + 0, 0, 11, 73,117,112, 68,101,115,116,114,111,121, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/console3_le64w.lo"); +} diff --git a/iup/srcconsole/loh/console5.loh b/iup/srcconsole/loh/console5.loh new file mode 100755 index 0000000..9bec168 --- /dev/null +++ b/iup/srcconsole/loh/console5.loh @@ -0,0 +1,475 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/console5.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/console5.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 14, 0, 0, 0, 64, 99,111,110, +115,111,108,101, 53, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 15, 90, 1, 0, 0, 5, 0, 0, 0, 65, 64, 0, 0, 28, 64, 0, 1, 5,128, + 0, 0, 74, 0, 0, 0, 9, 64,128,129, 5,128, 0, 0, 6,192, 64, 0,100, 0, + 0, 0, 9, 64, 0,130, 5,128, 0, 0, 6,192, 64, 0,100, 64, 0, 0, 9, 64, +128,130, 5,128, 0, 0, 6,192, 64, 0, 9,192, 65,131, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70, 64,194, 0,138,192, 0, 0,137,192, 66,133,137, 64, + 67,134,137,192, 67,135, 92,128, 0, 1, 9, 64, 0,132, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70, 64,196, 0,138,128, 0, 0,137,192, 68,137,137, 0, + 69,134, 92,128, 0, 1, 9, 64, 0,136, 5,128, 0, 0, 6,192, 64, 0, 69,128, + 0, 0, 70, 64,196, 0,138,192, 0, 0,137,128, 69,137,137, 0, 69,134,137,192, + 69,133, 92,128, 0, 1, 9, 64,128,138, 5,128, 0, 0, 6,192, 64, 0, 6, 0, + 66, 0,100,128, 0, 0, 9, 64, 0,140, 5,128, 0, 0, 6,192, 64, 0, 69,128, + 0, 0, 70,128,198, 0,138,192, 0, 0,137,192, 70,134,137, 0, 71,137,137,128, +199,142, 92,128, 0, 1, 9, 64,128,140, 5,128, 0, 0, 6,192, 64, 0, 69,128, + 0, 0, 70,128,198, 0,138,192, 0, 0,137,192, 70,134,137, 0, 72,137,137, 64, +200,142, 92,128, 0, 1, 9, 64,128,143, 5,128, 0, 0, 6,192, 64, 0, 69,128, + 0, 0, 70,128,198, 0,138,128, 0, 0,137,192, 70,134,137,192, 72,137, 92,128, + 0, 1, 9, 64, 0,145, 5,128, 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70,128, +198, 0,138,128, 0, 0,137,192, 70,134,137, 64, 73,137, 92,128, 0, 1, 9, 64, + 0,146, 5,128, 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70,128,198, 0,138,128, + 0, 0,137,192, 70,134,137,192, 73,137, 92,128, 0, 1, 9, 64, 0,147, 5,128, + 0, 0, 6,192, 64, 0, 6,128, 73, 0,100,192, 0, 0, 9, 64,128,142, 5,128, + 0, 0, 6,192, 64, 0, 6, 0, 73, 0,100, 0, 1, 0, 9, 64,128,142, 5,128, + 0, 0, 6,192, 64, 0,100, 64, 1, 0, 9, 64, 0,148, 5,128, 0, 0, 6,192, + 64, 0, 6,128, 72, 0,100,128, 1, 0, 9, 64,128,142, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70,128,202, 0,138,192,128, 0,197,128, 0, 0,198,192, +202, 1, 10, 65,128, 0, 69,129, 0, 0, 70, 1,203, 2,138, 65, 0, 1,197,129, + 0, 0,198,129,202, 3, 10,130,128, 2, 69,130, 0, 0, 70,194,192, 4, 70,130, +200, 4,133,130, 0, 0,134,194, 64, 5,134,130, 73, 5,197,130, 0, 0,198,194, +192, 5,198, 2,201, 5, 5,131, 0, 0, 6,195, 64, 6, 6,195, 71, 6, 69,131, + 0, 0, 70,195,192, 6, 70, 67,198, 6, 9,130,203,150, 9, 2,204,151, 34, 66, +128, 2,220,129, 0, 1, 5,130, 0, 0, 6,130, 74, 4, 74, 66,128, 1,133,130, + 0, 0,134,194, 64, 5,134, 66, 69, 5,197,130, 0, 0,198,194,192, 5,198, 2, +194, 5, 5,131, 0, 0, 6,195, 64, 6, 6, 3, 68, 6, 73,130,204,152, 98, 66, +128, 1, 28,130, 0, 1,137,193,204,152,162, 65, 0, 1, 92,129, 0, 1, 9, 1, + 77,137, 34, 65,128, 0,220,128, 0, 1,137, 64,205,152,137,128,205,150,137,192, +205,151,162, 64,128, 0, 92,128, 0, 1, 9, 64,128,148, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70, 64,206, 0,138, 0,128, 0,197,128, 0, 0,198,128, +206, 1, 10, 65,128, 0, 69,129, 0, 0, 70, 65,206, 2,138, 1, 0, 0,197,129, + 0, 0,198,193,206, 3, 10,130, 0, 0, 9, 2, 79,137, 9, 66,207,142,220, 1, + 0, 1,162, 65, 0, 0, 92,129, 0, 1, 9,129, 79,137, 34, 65,128, 0,220,128, + 0, 1, 5,129, 0, 0, 6,129, 78, 2, 74, 65,128, 0,133,129, 0, 0,134, 65, + 78, 3,202, 1,128, 0, 5,130, 0, 0, 6,194, 78, 4, 74,130, 0, 0, 73,194, + 79,137,133,130, 0, 0,134,194, 64, 5,134, 66, 65, 5, 73,130,130,142, 28,130, + 0, 1, 69,130, 0, 0, 70,194,206, 4,138,130, 0, 0,137, 2, 80,137,137, 66, +208,142, 92, 2, 0, 1,226, 65, 0, 0,156,129, 0, 1, 73,129, 80,137, 98, 65, +128, 0, 28, 1, 0, 1,162, 64, 0, 0, 92,128, 0, 1, 9, 64, 0,156, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 0,209, 0,138, 64,129, 0,197,128, + 0, 0,198,192,192, 1,198, 64,202, 1,137, 64, 81,137, 5,129, 0, 0, 6,193, + 64, 2, 6, 1, 78, 2,137, 0,129,156,137,192, 66,163, 5,129, 0, 0, 6,193, + 64, 2, 6, 65, 70, 2,137, 0,129,163,137, 64, 79,164,162, 64,128, 0, 92,128, + 0, 1, 9, 64,128,161, 5,128, 0, 0, 6,192, 64, 0, 6,192, 80, 0,100,192, + 1, 0, 9, 64,128,164, 5,128, 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 0, +209, 0,138, 0,129, 0,197,128, 0, 0,198,128,202, 1, 10,129, 0, 3, 69,129, + 0, 0, 70, 65,196, 2,138, 65, 0, 0,137, 65, 81,137, 92,129, 0, 1,133,129, + 0, 0,134,193, 82, 3,202, 65, 0, 0,201,193, 77,134,156,129, 0, 1,197,129, + 0, 0,198,193,210, 3, 10, 66, 0, 0, 9,194, 77,134,220,129, 0, 1, 5,130, + 0, 0, 6,194, 74, 4, 74, 2, 0, 0,133,130, 0, 0,134,130, 74, 5,202, 2, +128, 0, 5,131, 0, 0, 6, 67, 68, 6, 74, 67, 0, 0, 73, 3, 83,137, 28,131, + 0, 1, 69,131, 0, 0, 70, 67,196, 6,138, 67, 0, 0,137, 67, 83,137, 92, 3, + 0, 1,226, 66, 0, 0,156, 2, 0, 1, 98, 66, 0, 0, 28,130, 0, 1, 69,130, + 0, 0, 70,194,210, 4,138, 66, 0, 0,137,194, 77,134, 92,130, 0, 1,133,130, + 0, 0,134,130, 70, 5,202,194, 0, 0,201,130, 83,137,201, 66,207,142,201,194, + 83,134,156,130, 0, 1, 9, 1,212,150, 9, 65,205,152, 34, 65, 0, 3,220,128, + 0, 1,137,128,212,168,137,128,212,169,137,128, 84,170,137, 64, 85,137,162, 64, +128, 0, 92,128, 0, 1, 9, 64, 0,165, 5,128, 0, 0, 6,192, 64, 0, 6,192, + 80, 0, 11,128, 85, 0, 28, 64, 0, 1, 5,128, 0, 0, 6,192, 85, 0, 69,128, + 0, 0, 70,192,192, 0, 70, 0,194, 0, 28, 64, 0, 1, 5,128, 0, 0, 6, 0, + 86, 0, 28, 64,128, 0, 5,128, 0, 0, 6,192, 64, 0, 6,192, 80, 0, 11, 64, + 86, 0, 28, 64, 0, 1, 5,128, 0, 0, 6,192, 64, 0, 6,128, 82, 0, 11, 64, + 86, 0, 28, 64, 0, 1, 30, 0,128, 0, 90, 0, 0, 0, 4, 8, 0, 0, 0,114, +101,113,117,105,114,101, 0, 4, 7, 0, 0, 0,105,117,112,108,117, 97, 0, 4, + 4, 0, 0, 0,105,117,112, 0, 4, 8, 0, 0, 0, 99,111,110,115,111,108,101, + 0, 4, 11, 0, 0, 0,112,114,105,110,116,116, 97, 98,108,101, 0, 4, 19, 0, + 0, 0,112,114,105,110,116, 95,118,101,114,115,105,111,110, 95,105,110,102,111, + 0, 4, 13, 0, 0, 0,108, 97,115,116,102,105,108,101,110, 97,109,101, 0, 0, + 4, 7, 0, 0, 0,109,108, 67,111,100,101, 0, 4, 10, 0, 0, 0,109,117,108, +116,105,108,105,110,101, 0, 4, 7, 0, 0, 0,101,120,112, 97,110,100, 0, 4, + 4, 0, 0, 0, 89, 69, 83, 0, 4, 5, 0, 0, 0,115,105,122,101, 0, 4, 8, + 0, 0, 0, 50, 48, 48,120, 49, 50, 48, 0, 4, 5, 0, 0, 0,102,111,110,116, + 0, 4, 18, 0, 0, 0, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, + 95, 49, 48, 0, 4, 12, 0, 0, 0,108, 98,108, 80,111,115,105,116,105,111,110, + 0, 4, 6, 0, 0, 0,108, 97, 98,101,108, 0, 4, 6, 0, 0, 0,116,105,116, +108,101, 0, 4, 4, 0, 0, 0, 48, 58, 48, 0, 4, 4, 0, 0, 0, 53, 48,120, + 0, 4, 12, 0, 0, 0,108, 98,108, 70,105,108,101, 78, 97,109,101, 0, 4, 1, + 0, 0, 0, 0, 4, 11, 0, 0, 0, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 0, + 4, 9, 0, 0, 0, 99, 97,114,101,116, 95, 99, 98, 0, 4, 11, 0, 0, 0, 98, +117,116, 69,120,101, 99,117,116,101, 0, 4, 7, 0, 0, 0, 98,117,116,116,111, +110, 0, 4, 6, 0, 0, 0, 53, 48,120, 49, 53, 0, 4, 8, 0, 0, 0, 69,120, +101, 99,117,116,101, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 39, + 0, 0, 0,105,117,112, 46,100,111,115,116,114,105,110,103, 40,105,117,112, 46, + 99,111,110,115,111,108,101, 46,109,108, 67,111,100,101, 46,118, 97,108,117,101, + 41, 0, 4, 17, 0, 0, 0, 98,117,116, 67,108,101, 97,114, 67,111,109,109, 97, +110,100,115, 0, 4, 6, 0, 0, 0, 67,108,101, 97,114, 0, 4, 96, 0, 0, 0, +105,117,112, 46, 99,111,110,115,111,108,101, 46,109,108, 67,111,100,101, 46,118, + 97,108,117,101, 61, 39, 39, 32, 32,105,117,112, 46, 99,111,110,115,111,108,101, + 46,108, 98,108, 70,105,108,101, 78, 97,109,101, 46,116,105,116,108,101, 32, 61, + 32, 39, 39, 32, 32,105,117,112, 46, 99,111,110,115,111,108,101, 46,108, 97,115, +116,102,105,108,101,110, 97,109,101, 32, 61, 32,110,105,108, 0, 4, 12, 0, 0, + 0, 98,117,116, 76,111, 97,100, 70,105,108,101, 0, 4, 8, 0, 0, 0, 76,111, + 97,100, 46, 46, 46, 0, 4, 14, 0, 0, 0, 98,117,116, 83, 97,118,101, 97,115, + 70,105,108,101, 0, 4, 11, 0, 0, 0, 83, 97,118,101, 32, 65,115, 46, 46, 46, + 0, 4, 12, 0, 0, 0, 98,117,116, 83, 97,118,101, 70,105,108,101, 0, 4, 5, + 0, 0, 0, 83, 97,118,101, 0, 4, 9, 0, 0, 0, 76,111, 97,100, 70,105,108, +101, 0, 4, 11, 0, 0, 0,118, 98,120, 67,111,110,115,111,108,101, 0, 4, 5, + 0, 0, 0,118, 98,111,120, 0, 4, 6, 0, 0, 0,102,114, 97,109,101, 0, 4, + 5, 0, 0, 0,104, 98,111,120, 0, 4, 7, 0, 0, 0,109, 97,114,103,105,110, + 0, 4, 4, 0, 0, 0, 48,120, 48, 0, 4, 4, 0, 0, 0,103, 97,112, 0, 4, + 3, 0, 0, 0, 49, 48, 0, 4, 10, 0, 0, 0, 97,108,105,103,110,109,101,110, +116, 0, 4, 7, 0, 0, 0, 65, 82, 73, 71, 72, 84, 0, 4, 5, 0, 0, 0, 65, + 84, 79, 80, 0, 4, 9, 0, 0, 0, 67,111,109,109, 97,110,100,115, 0, 4, 8, + 0, 0, 0, 65, 67, 69, 78, 84, 69, 82, 0, 4, 4, 0, 0, 0, 53,120, 53, 0, + 4, 2, 0, 0, 0, 53, 0, 4, 8, 0, 0, 0,109,110,117, 77, 97,105,110, 0, + 4, 5, 0, 0, 0,109,101,110,117, 0, 4, 8, 0, 0, 0,115,117, 98,109,101, +110,117, 0, 4, 5, 0, 0, 0,105,116,101,109, 0, 4, 5, 0, 0, 0, 69,120, +105,116, 0, 4, 17, 0, 0, 0,114,101,116,117,114,110, 32,105,117,112, 46, 67, + 76, 79, 83, 69, 0, 4, 5, 0, 0, 0, 70,105,108,101, 0, 4, 22, 0, 0, 0, + 80,114,105,110,116, 32, 86,101,114,115,105,111,110, 32, 73,110,102,111, 46, 46, + 46, 0, 4, 9, 0, 0, 0, 65, 98,111,117,116, 46, 46, 46, 0, 4, 51, 0, 0, + 0,105,117,112, 46, 99,111,110,115,111,108,101, 46,100,108,103, 65, 98,111,117, +116, 58,112,111,112,117,112, 40,105,117,112, 46, 67, 69, 78, 84, 69, 82, 44, 32, +105,117,112, 46, 67, 69, 78, 84, 69, 82, 41, 0, 4, 5, 0, 0, 0, 72,101,108, +112, 0, 4, 8, 0, 0, 0,100,108,103, 77, 97,105,110, 0, 4, 7, 0, 0, 0, +100,105, 97,108,111,103, 0, 4, 15, 0, 0, 0, 73,117,112, 76,117, 97, 32, 67, +111,110,115,111,108,101, 0, 4, 9, 0, 0, 0,100,114, 97,103,100,114,111,112, + 0, 4, 13, 0, 0, 0,100,101,102, 97,117,108,116,101,110,116,101,114, 0, 4, + 9, 0, 0, 0, 99,108,111,115,101, 95, 99, 98, 0, 4, 13, 0, 0, 0,100,114, +111,112,102,105,108,101,115, 95, 99, 98, 0, 4, 9, 0, 0, 0,100,108,103, 65, + 98,111,117,116, 0, 4, 5, 0, 0, 0,102,105,108,108, 0, 4, 16, 0, 0, 0, + 84,101, 99,103,114, 97,102, 47, 80, 85, 67, 45, 82,105,111, 0, 4, 23, 0, 0, + 0,105,117,112, 64,116,101, 99,103,114, 97,102, 46,112,117, 99, 45,114,105,111, + 46, 98,114, 0, 4, 3, 0, 0, 0, 79, 75, 0, 4, 6, 0, 0, 0, 53, 48, 88, + 50, 48, 0, 4, 6, 0, 0, 0, 49, 48,120, 49, 48, 0, 4, 7, 0, 0, 0,109, + 97,120, 98,111,120, 0, 4, 3, 0, 0, 0, 78, 79, 0, 4, 7, 0, 0, 0,109, +105,110, 98,111,120, 0, 4, 7, 0, 0, 0,114,101,115,105,122,101, 0, 4, 6, + 0, 0, 0, 65, 98,111,117,116, 0, 4, 5, 0, 0, 0,115,104,111,119, 0, 4, + 9, 0, 0, 0, 83,101,116, 70,111, 99,117,115, 0, 4, 9, 0, 0, 0, 77, 97, +105,110, 76,111,111,112, 0, 4, 8, 0, 0, 0,100,101,115,116,114,111,121, 0, + 8, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 15, 0, 0, 0, 0, 1, 0, 8, + 30, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0,195, 0,128, 1, 92,192,128, 1, +197, 64, 0, 0, 1,129, 0, 0,220, 64, 0, 1, 90, 0, 0, 0, 22, 0, 4,128, +197, 64, 0, 0, 5,193, 0, 0, 64, 1,128, 0, 28,129, 0, 1, 65, 1, 1, 0, +133,193, 0, 0,192, 1, 0, 1,156,129, 0, 1, 21,129, 1, 2,220, 64, 0, 1, +197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,220,192,128, 1,128, 0, 0, 2, + 64, 0,128, 1, 22, 0,251,127,197, 64, 0, 0, 1, 65, 1, 0,220, 64, 0, 1, + 30, 0,128, 0, 6, 0, 0, 0, 4, 5, 0, 0, 0,110,101,120,116, 0, 4, 6, + 0, 0, 0,112,114,105,110,116, 0, 4, 21, 0, 0, 0, 45, 45,112,114,105,110, +116,116, 97, 98,108,101, 32, 83,116, 97,114,116, 45, 45, 0, 4, 9, 0, 0, 0, +116,111,115,116,114,105,110,103, 0, 4, 2, 0, 0, 0, 61, 0, 4, 19, 0, 0, + 0, 45, 45,112,114,105,110,116,116, 97, 98,108,101, 32, 69,110,100, 45, 45, 0, + 0, 0, 0, 0, 30, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, + 10, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, + 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, + 11, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, + 14, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0,116, 0, 0, 0, + 0, 0, 29, 0, 0, 0, 2, 0, 0, 0,110, 0, 4, 0, 0, 0, 29, 0, 0, 0, + 2, 0, 0, 0,118, 0, 4, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 5,112, 0, 0, 0, 5, 0, + 0, 0, 26, 0, 0, 0, 22, 0, 2,128, 5, 64, 0, 0, 65,128, 0, 0,133, 0, + 0, 0,134,192, 64, 1,193, 0, 1, 0, 5, 1, 0, 0, 6, 65, 65, 2, 85, 0, +129, 0, 28, 64, 0, 1, 5,128, 1, 0, 26, 0, 0, 0, 22, 0, 2,128, 5, 64, + 0, 0, 65,192, 1, 0,133,128, 1, 0,134,192, 64, 1,193, 0, 1, 0, 5,129, + 1, 0, 6, 65, 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65, 0, + 2, 0,133, 64, 2, 0,134,192, 64, 1,193, 0, 1, 0, 5, 65, 2, 0, 6, 65, + 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65,128, 2, 0, 28, 64, + 0, 1, 5, 64, 0, 0, 65,192, 2, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65, 0, + 3, 0,133, 64, 2, 0,134, 64, 67, 1,193,128, 3, 0,156,128, 0, 1, 85,128, +128, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65,192, 3, 0,133, 64, 2, 0,134, 64, + 67, 1,193, 0, 4, 0,156,128, 0, 1, 85,128,128, 0, 28, 64, 0, 1, 5, 64, + 2, 0, 6, 64, 67, 0, 65, 64, 4, 0, 28,128, 0, 1, 26, 0, 0, 0, 22,192, + 0,128, 69, 64, 0, 0,129,128, 4, 0,192, 0, 0, 0, 92, 64,128, 1, 69, 64, + 0, 0,129,192, 4, 0,197, 64, 2, 0,198, 64,195, 1, 1, 1, 5, 0,220,128, + 0, 1,149,192, 0, 1, 92, 64, 0, 1, 69, 64, 0, 0,129, 64, 5, 0,197, 64, + 2, 0,198, 64,195, 1, 1,129, 5, 0,220,128, 0, 1,149,192, 0, 1, 92, 64, + 0, 1, 69, 64, 2, 0, 70,192,197, 0, 90, 0, 0, 0, 22, 64, 1,128, 69, 64, + 0, 0,129, 0, 6, 0,197, 64, 2, 0,198,192,197, 1,149,192, 0, 1, 92, 64, + 0, 1, 69, 64, 2, 0, 70, 64,198, 0, 90, 0, 0, 0, 22, 64, 1,128, 69, 64, + 0, 0,129,128, 6, 0,197, 64, 2, 0,198, 64,198, 1,149,192, 0, 1, 92, 64, + 0, 1, 69, 64, 2, 0, 70,192,198, 0, 90, 0, 0, 0, 22, 64, 1,128, 69, 64, + 0, 0,129, 0, 7, 0,197, 64, 2, 0,198,192,198, 1,149,192, 0, 1, 92, 64, + 0, 1, 30, 0,128, 0, 29, 0, 0, 0, 4, 3, 0, 0, 0,105,109, 0, 4, 6, + 0, 0, 0,112,114,105,110,116, 0, 4, 4, 0, 0, 0, 73, 77, 32, 0, 4, 9, + 0, 0, 0, 95, 86, 69, 82, 83, 73, 79, 78, 0, 4, 3, 0, 0, 0, 32, 32, 0, + 4, 11, 0, 0, 0, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 0, 4, 3, 0, 0, + 0, 99,100, 0, 4, 4, 0, 0, 0, 67, 68, 32, 0, 4, 5, 0, 0, 0, 73, 85, + 80, 32, 0, 4, 4, 0, 0, 0,105,117,112, 0, 4, 1, 0, 0, 0, 0, 4, 9, + 0, 0, 0, 73, 85, 80, 32, 73,110,102,111, 0, 4, 11, 0, 0, 0, 32, 32, 83, +121,115,116,101,109, 58, 32, 0, 4, 10, 0, 0, 0, 71,101,116, 71,108,111, 98, + 97,108, 0, 4, 7, 0, 0, 0, 83, 89, 83, 84, 69, 77, 0, 4, 19, 0, 0, 0, + 32, 32, 83,121,115,116,101,109, 32, 86,101,114,115,105,111,110, 58, 32, 0, 4, + 14, 0, 0, 0, 83, 89, 83, 84, 69, 77, 86, 69, 82, 83, 73, 79, 78, 0, 4, 13, + 0, 0, 0, 77, 79, 84, 73, 70, 86, 69, 82, 83, 73, 79, 78, 0, 4, 18, 0, 0, + 0, 32, 32, 77,111,116,105,102, 32, 86,101,114,115,105,111,110, 58, 32, 0, 4, + 16, 0, 0, 0, 32, 32, 83, 99,114,101,101,110, 32, 83,105,122,101, 58, 32, 0, + 4, 11, 0, 0, 0, 83, 67, 82, 69, 69, 78, 83, 73, 90, 69, 0, 4, 17, 0, 0, + 0, 32, 32, 83, 99,114,101,101,110, 32, 68,101,112,116,104, 58, 32, 0, 4, 12, + 0, 0, 0, 83, 67, 82, 69, 69, 78, 68, 69, 80, 84, 72, 0, 4, 10, 0, 0, 0, + 71, 76, 95, 86, 69, 78, 68, 79, 82, 0, 4, 18, 0, 0, 0, 32, 32, 79,112,101, +110, 71, 76, 32, 86,101,110,100,111,114, 58, 32, 0, 4, 12, 0, 0, 0, 71, 76, + 95, 82, 69, 78, 68, 69, 82, 69, 82, 0, 4, 20, 0, 0, 0, 32, 32, 79,112,101, +110, 71, 76, 32, 82,101,110,100,101,114,101,114, 58, 32, 0, 4, 11, 0, 0, 0, + 71, 76, 95, 86, 69, 82, 83, 73, 79, 78, 0, 4, 19, 0, 0, 0, 32, 32, 79,112, +101,110, 71, 76, 32, 86,101,114,115,105,111,110, 58, 32, 0, 0, 0, 0, 0,112, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, + 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, + 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, + 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, + 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, + 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, + 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, + 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, + 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, + 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, + 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0,109, +111,116, 0, 59, 0, 0, 0,111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, + 0, 0, 0, 48, 0, 0, 0, 0, 3, 0, 7, 9, 0, 0, 0,197, 0, 0, 0,198, + 64,192, 1,198,128,192, 1, 0, 1,128, 0, 65, 1, 1, 0,128, 1, 0, 1, 21, +129, 1, 2,201, 0,129,129, 30, 0,128, 0, 5, 0, 0, 0, 4, 4, 0, 0, 0, +105,117,112, 0, 4, 8, 0, 0, 0, 99,111,110,115,111,108,101, 0, 4, 12, 0, + 0, 0,108, 98,108, 80,111,115,105,116,105,111,110, 0, 4, 6, 0, 0, 0,116, +105,116,108,101, 0, 4, 2, 0, 0, 0, 58, 0, 0, 0, 0, 0, 9, 0, 0, 0, + 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, + 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 3, 0, 0, 0, + 5, 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, + 0,108,105,110, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0, 99,111,108, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, + 0, 70, 0, 0, 0, 0, 1, 0, 4, 39, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, + 0, 70,128,192, 0, 23,192,192, 0, 22, 64, 1,128, 69, 0, 0, 0, 70, 64,192, + 0, 70, 0,193, 0, 75, 64,193, 0, 92, 64, 0, 1, 22,128, 6,128, 69,192, 1, + 0, 70, 0,194, 0,133, 0, 0, 0,134, 64, 64, 1,134,128, 64, 1,193, 64, 2, + 0, 92,128,128, 1, 71,128, 1, 0, 69,128, 1, 0, 90, 0, 0, 0, 22,128, 2, +128, 69,128, 1, 0, 75,128,194, 0,197, 0, 0, 0,198, 64,192, 1,198,192,194, + 1,198, 0,195, 1, 92, 64,128, 1, 69,128, 1, 0, 75, 64,195, 0, 92, 64, 0, + 1, 22, 0, 1,128, 69,128, 3, 0,129,192, 3, 0,197, 0, 4, 0,149,192, 0, + 1, 92, 64, 0, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 4, 0, 0, 0,105,117, +112, 0, 4, 8, 0, 0, 0, 99,111,110,115,111,108,101, 0, 4, 13, 0, 0, 0, +108, 97,115,116,102,105,108,101,110, 97,109,101, 0, 0, 4, 14, 0, 0, 0, 98, +117,116, 83, 97,118,101, 97,115, 70,105,108,101, 0, 4, 7, 0, 0, 0, 97, 99, +116,105,111,110, 0, 4, 8, 0, 0, 0,110,101,119,102,105,108,101, 0, 4, 3, + 0, 0, 0,105,111, 0, 4, 5, 0, 0, 0,111,112,101,110, 0, 4, 3, 0, 0, + 0,119, 43, 0, 4, 6, 0, 0, 0,119,114,105,116,101, 0, 4, 7, 0, 0, 0, +109,108, 67,111,100,101, 0, 4, 6, 0, 0, 0,118, 97,108,117,101, 0, 4, 6, + 0, 0, 0, 99,108,111,115,101, 0, 4, 6, 0, 0, 0,101,114,114,111,114, 0, + 4, 18, 0, 0, 0, 67, 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105,108, +101, 32, 0, 4, 9, 0, 0, 0,102,105,108,101,110, 97,109,101, 0, 0, 0, 0, + 0, 39, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, + 0, 59, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, + 0, 60, 0, 0, 0, 60, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, + 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, + 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, + 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, + 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 67, 0, 0, + 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 70, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 38, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 92, 0, 0, 0, 0, 1, + 0, 7, 65, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,138, 64, 1, 0,137,192, + 64,129,137, 64, 65,130,137,192, 65,131,137, 64, 66,132,197,192, 2, 0,137,192, + 0,133, 92,128, 0, 1,139, 0,195, 0, 5, 1, 0, 0, 6, 65, 67, 2, 69, 1, + 0, 0, 70, 65,195, 2,156, 64, 0, 2,134,128,195, 0,197, 0, 0, 0,198,192, +195, 1, 6, 65,196, 0,201, 0, 1,136,197, 0, 0, 0,198,192,195, 1,198,128, +196, 1, 5, 1, 0, 0, 6,193, 67, 2, 6, 1, 68, 2,201, 0, 1,130,203,192, +196, 0,220, 64, 0, 1, 87, 0, 69, 1, 22,192, 7,128,197, 0, 0, 0,198,192, +195, 1,198, 0,196, 1, 23, 64,197, 1, 22, 0, 1,128,197,128, 5, 0, 1,193, + 5, 0, 69, 1, 6, 0, 21, 65, 1, 2,220, 64, 0, 1,197, 64, 6, 0,198,128, +198, 1, 5, 1, 0, 0, 6,193, 67, 2, 6, 1, 68, 2, 65,193, 6, 0,220,128, +128, 1,218, 0, 0, 0, 22, 64, 2,128, 11, 1,199, 1,133, 1, 0, 0,134,193, + 67, 3,134, 65, 71, 3,134, 65, 68, 3, 28, 65,128, 1, 11,129,199, 1,128, 1, +128, 1, 28, 65,128, 1, 22,128, 0,128, 5,129, 5, 0, 65,193, 7, 0, 28, 65, + 0, 1, 30, 0,128, 0, 32, 0, 0, 0, 4, 4, 0, 0, 0,105,117,112, 0, 4, + 8, 0, 0, 0,102,105,108,101,100,108,103, 0, 4, 11, 0, 0, 0,100,105, 97, +108,111,103,116,121,112,101, 0, 4, 5, 0, 0, 0, 83, 65, 86, 69, 0, 4, 6, + 0, 0, 0,116,105,116,108,101, 0, 4, 10, 0, 0, 0, 83, 97,118,101, 32, 70, +105,108,101, 0, 4, 7, 0, 0, 0,102,105,108,116,101,114, 0, 4, 4, 0, 0, + 0, 42, 46, 42, 0, 4, 11, 0, 0, 0,102,105,108,116,101,114,105,110,102,111, + 0, 4, 10, 0, 0, 0, 65,108,108, 32,102,105,108,101,115, 0, 4, 9, 0, 0, + 0, 97,108,108,111,119,110,101,119, 0, 4, 4, 0, 0, 0,121,101,115, 0, 4, + 6, 0, 0, 0,112,111,112,117,112, 0, 4, 5, 0, 0, 0, 76, 69, 70, 84, 0, + 4, 7, 0, 0, 0,115,116, 97,116,117,115, 0, 4, 8, 0, 0, 0, 99,111,110, +115,111,108,101, 0, 4, 13, 0, 0, 0,108, 97,115,116,102,105,108,101,110, 97, +109,101, 0, 4, 6, 0, 0, 0,118, 97,108,117,101, 0, 4, 12, 0, 0, 0,108, + 98,108, 70,105,108,101, 78, 97,109,101, 0, 4, 8, 0, 0, 0,100,101,115,116, +114,111,121, 0, 4, 3, 0, 0, 0, 45, 49, 0, 0, 4, 6, 0, 0, 0,101,114, +114,111,114, 0, 4, 18, 0, 0, 0, 67, 97,110,110,111,116, 32, 83, 97,118,101, + 32,102,105,108,101, 32, 0, 4, 9, 0, 0, 0,102,105,108,101,110, 97,109,101, + 0, 4, 3, 0, 0, 0,105,111, 0, 4, 5, 0, 0, 0,111,112,101,110, 0, 4, + 3, 0, 0, 0,119, 43, 0, 4, 6, 0, 0, 0,119,114,105,116,101, 0, 4, 7, + 0, 0, 0,109,108, 67,111,100,101, 0, 4, 6, 0, 0, 0, 99,108,111,115,101, + 0, 4, 17, 0, 0, 0, 67, 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105, +108,101, 0, 0, 0, 0, 0, 65, 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 73, + 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 74, 0, 0, 0, 74, + 0, 0, 0, 74, 0, 0, 0, 73, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 75, + 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 76, 0, 0, 0, 77, + 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 78, 0, 0, 0, 78, + 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, + 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 80, 0, 0, 0, 80, 0, 0, 0, 81, + 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 82, + 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 86, 0, 0, 0, 86, + 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 87, + 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 89, 0, 0, 0, 89, + 0, 0, 0, 89, 0, 0, 0, 92, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0,115, +101,108,102, 0, 0, 0, 0, 0, 64, 0, 0, 0, 3, 0, 0, 0,102,100, 0, 10, + 0, 0, 0, 64, 0, 0, 0, 7, 0, 0, 0,115,116, 97,116,117,115, 0, 17, 0, + 0, 0, 64, 0, 0, 0, 8, 0, 0, 0,110,101,119,102,105,108,101, 0, 49, 0, + 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, 0, 0,104, 0, + 0, 0, 0, 1, 0, 6, 34, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,128, 0, + 0, 0,193,128, 0, 0, 92,128,128, 1, 23,192,192, 0, 22, 64, 1,128,133, 0, + 1, 0,193, 64, 1, 0, 0, 1, 0, 0,213, 0,129, 1,156, 64, 0, 1, 22,192, + 4,128,133,128, 1, 0,134,192, 65, 1,134, 0, 66, 1,203,128,194, 0, 65,193, + 2, 0,220,128,128, 1,137,192,128,132,139, 0,195, 0, 0, 1,128, 0,156, 64, +128, 1,133,128, 1, 0,134,192, 65, 1,137, 0,128,134,133,128, 1, 0,134,192, + 65, 1,134,128, 67, 1,197,128, 1, 0,198,192,193, 1,198, 64,195, 1,137,192, +128,135, 30, 0,128, 0, 16, 0, 0, 0, 4, 3, 0, 0, 0,105,111, 0, 4, 5, + 0, 0, 0,111,112,101,110, 0, 4, 2, 0, 0, 0,114, 0, 0, 4, 6, 0, 0, + 0,101,114,114,111,114, 0, 4, 18, 0, 0, 0, 67, 97,110,110,111,116, 32,108, +111, 97,100, 32,102,105,108,101, 32, 0, 4, 4, 0, 0, 0,105,117,112, 0, 4, + 8, 0, 0, 0, 99,111,110,115,111,108,101, 0, 4, 7, 0, 0, 0,109,108, 67, +111,100,101, 0, 4, 6, 0, 0, 0,118, 97,108,117,101, 0, 4, 5, 0, 0, 0, +114,101, 97,100, 0, 4, 3, 0, 0, 0, 42, 97, 0, 4, 6, 0, 0, 0, 99,108, +111,115,101, 0, 4, 13, 0, 0, 0,108, 97,115,116,102,105,108,101,110, 97,109, +101, 0, 4, 12, 0, 0, 0,108, 98,108, 70,105,108,101, 78, 97,109,101, 0, 4, + 6, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 34, 0, 0, 0, 95, 0, + 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 96, 0, + 0, 0, 96, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, + 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, + 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0,100, 0, + 0, 0,100, 0, 0, 0,100, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, + 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, + 0, 0,102, 0, 0, 0,102, 0, 0, 0,104, 0, 0, 0, 2, 0, 0, 0, 9, 0, + 0, 0,102,105,108,101,110, 97,109,101, 0, 0, 0, 0, 0, 33, 0, 0, 0, 8, + 0, 0, 0,110,101,119,102,105,108,101, 0, 5, 0, 0, 0, 33, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,106, 0, 0, 0,121, 0, 0, 0, 0, 1, 0, 7, 37, + 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,138, 64, 1, 0,137,192, 64,129,137, + 64, 65,130,137,192, 65,131,137, 64, 66,132,137,192, 66,133, 92,128, 0, 1,139, + 0,195, 0, 5, 1, 0, 0, 6, 65, 67, 2, 69, 1, 0, 0, 70, 65,195, 2,156, + 64, 0, 2,134,128,195, 0,198,192,195, 0, 11, 1,196, 0, 28, 65, 0, 1, 87, + 64, 68, 1, 22, 64, 0,128, 23,128, 68, 1, 22,192, 1,128, 23,128, 68, 1, 22, +128, 2,128, 5,193, 4, 0, 65, 1, 5, 0,128, 1,128, 1, 85,129,129, 2, 28, + 65, 0, 1, 22, 0, 1,128, 5, 1, 0, 0, 6, 65, 69, 2, 6,129, 69, 2, 64, + 1,128, 1, 28, 65, 0, 1, 30, 0,128, 0, 23, 0, 0, 0, 4, 4, 0, 0, 0, +105,117,112, 0, 4, 8, 0, 0, 0,102,105,108,101,100,108,103, 0, 4, 11, 0, + 0, 0,100,105, 97,108,111,103,116,121,112,101, 0, 4, 5, 0, 0, 0, 79, 80, + 69, 78, 0, 4, 6, 0, 0, 0,116,105,116,108,101, 0, 4, 10, 0, 0, 0, 76, +111, 97,100, 32, 70,105,108,101, 0, 4, 7, 0, 0, 0,102,105,108,116,101,114, + 0, 4, 4, 0, 0, 0, 42, 46, 42, 0, 4, 11, 0, 0, 0,102,105,108,116,101, +114,105,110,102,111, 0, 4, 10, 0, 0, 0, 65,108,108, 32, 70,105,108,101,115, + 0, 4, 9, 0, 0, 0, 97,108,108,111,119,110,101,119, 0, 4, 3, 0, 0, 0, + 78, 79, 0, 4, 6, 0, 0, 0,112,111,112,117,112, 0, 4, 7, 0, 0, 0, 67, + 69, 78, 84, 69, 82, 0, 4, 7, 0, 0, 0,115,116, 97,116,117,115, 0, 4, 6, + 0, 0, 0,118, 97,108,117,101, 0, 4, 8, 0, 0, 0,100,101,115,116,114,111, +121, 0, 4, 3, 0, 0, 0, 45, 49, 0, 4, 2, 0, 0, 0, 49, 0, 4, 6, 0, + 0, 0,101,114,114,111,114, 0, 4, 18, 0, 0, 0, 67, 97,110,110,111,116, 32, +108,111, 97,100, 32,102,105,108,101, 32, 0, 4, 8, 0, 0, 0, 99,111,110,115, +111,108,101, 0, 4, 9, 0, 0, 0, 76,111, 97,100, 70,105,108,101, 0, 0, 0, + 0, 0, 37, 0, 0, 0,107, 0, 0, 0,107, 0, 0, 0,107, 0, 0, 0,107, 0, + 0, 0,107, 0, 0, 0,108, 0, 0, 0,108, 0, 0, 0,108, 0, 0, 0,107, 0, + 0, 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, + 0, 0,109, 0, 0, 0,110, 0, 0, 0,111, 0, 0, 0,112, 0, 0, 0,112, 0, + 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,115, 0, + 0, 0,115, 0, 0, 0,116, 0, 0, 0,116, 0, 0, 0,116, 0, 0, 0,116, 0, + 0, 0,116, 0, 0, 0,117, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, + 0, 0,119, 0, 0, 0,119, 0, 0, 0,121, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 36, 0, 0, 0, 3, 0, 0, 0,102, +100, 0, 9, 0, 0, 0, 36, 0, 0, 0, 7, 0, 0, 0,115,116, 97,116,117,115, + 0, 16, 0, 0, 0, 36, 0, 0, 0, 9, 0, 0, 0,102,105,108,101,110, 97,109, +101, 0, 17, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,166, 0, + 0, 0,170, 0, 0, 0, 0, 5, 0, 7, 8, 0, 0, 0, 23, 0, 64, 1, 22, 0, + 1,128, 69, 65, 0, 0, 70,129,192, 2, 70,193,192, 2,128, 1,128, 0, 92, 65, + 0, 1, 30, 0,128, 0, 4, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 4, 0, 0, 0,105,117,112, 0, 4, 8, 0, 0, 0, 99,111,110,115,111,108,101, + 0, 4, 9, 0, 0, 0, 76,111, 97,100, 70,105,108,101, 0, 0, 0, 0, 0, 8, + 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, + 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,170, 0, 0, 0, 5, 0, 0, 0, 5, + 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 7, 0, 0, 0, 9, 0, 0, 0, +102,105,108,101,110, 97,109,101, 0, 0, 0, 0, 0, 7, 0, 0, 0, 4, 0, 0, + 0,110,117,109, 0, 0, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0,120, 0, 0, + 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0,121, 0, 0, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0, 90, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, + 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, + 0, 15, 0, 0, 0, 7, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 37, 0, 0, + 0, 17, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 42, 0, 0, + 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, + 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, 0, + 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, + 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, + 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, + 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, + 0, 46, 0, 0, 0, 48, 0, 0, 0, 46, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, + 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, + 0, 51, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, + 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, + 0, 53, 0, 0, 0, 52, 0, 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, + 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, + 0, 54, 0, 0, 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, + 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, + 0, 58, 0, 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 70, 0, 0, 0, 58, 0, 0, + 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 92, 0, 0, 0, 72, 0, 0, + 0, 94, 0, 0, 0, 94, 0, 0, 0,104, 0, 0, 0, 94, 0, 0, 0,106, 0, 0, + 0,106, 0, 0, 0,106, 0, 0, 0,121, 0, 0, 0,106, 0, 0, 0,123, 0, 0, + 0,123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,125, 0, 0, + 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,125, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,127, 0, 0, + 0,127, 0, 0, 0,127, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, + 0,129, 0, 0, 0,129, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0,130, 0, 0, + 0,130, 0, 0, 0,125, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0,131, 0, 0, + 0,131, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0,132, 0, 0, 0,132, 0, 0, + 0,132, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,134, 0, 0, + 0,134, 0, 0, 0,131, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,125, 0, 0, + 0,135, 0, 0, 0,135, 0, 0, 0,125, 0, 0, 0,136, 0, 0, 0,136, 0, 0, + 0,136, 0, 0, 0,137, 0, 0, 0,124, 0, 0, 0,137, 0, 0, 0,141, 0, 0, + 0,141, 0, 0, 0,141, 0, 0, 0,141, 0, 0, 0,141, 0, 0, 0,143, 0, 0, + 0,143, 0, 0, 0,143, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, + 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, + 0,147, 0, 0, 0,148, 0, 0, 0,146, 0, 0, 0,148, 0, 0, 0,149, 0, 0, + 0,144, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, + 0,150, 0, 0, 0,150, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, + 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, + 0,152, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, + 0,153, 0, 0, 0,153, 0, 0, 0,154, 0, 0, 0,151, 0, 0, 0,154, 0, 0, + 0,154, 0, 0, 0,150, 0, 0, 0,155, 0, 0, 0,142, 0, 0, 0,155, 0, 0, + 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, + 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,160, 0, 0, 0,161, 0, 0, + 0,161, 0, 0, 0,161, 0, 0, 0,161, 0, 0, 0,162, 0, 0, 0,163, 0, 0, + 0,163, 0, 0, 0,163, 0, 0, 0,163, 0, 0, 0,164, 0, 0, 0,164, 0, 0, + 0,159, 0, 0, 0,164, 0, 0, 0,166, 0, 0, 0,166, 0, 0, 0,166, 0, 0, + 0,170, 0, 0, 0,166, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, + 0,174, 0, 0, 0,174, 0, 0, 0,176, 0, 0, 0,176, 0, 0, 0,176, 0, 0, + 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, + 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, + 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, + 0,181, 0, 0, 0,181, 0, 0, 0,181, 0, 0, 0,183, 0, 0, 0,183, 0, 0, + 0,183, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, + 0,185, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, + 0,186, 0, 0, 0,187, 0, 0, 0,184, 0, 0, 0,188, 0, 0, 0,182, 0, 0, + 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, + 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, + 0,190, 0, 0, 0,190, 0, 0, 0,191, 0, 0, 0,191, 0, 0, 0,192, 0, 0, + 0,177, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, + 0,194, 0, 0, 0,175, 0, 0, 0,194, 0, 0, 0,198, 0, 0, 0,198, 0, 0, + 0,198, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,199, 0, 0, 0,199, 0, 0, + 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,201, 0, 0, + 0,201, 0, 0, 0,201, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,203, 0, 0, + 0,203, 0, 0, 0,203, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, + 0,204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/console5.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srcconsole/loh/console5_be32.loh b/iup/srcconsole/loh/console5_be32.loh new file mode 100755 index 0000000..493cae4 --- /dev/null +++ b/iup/srcconsole/loh/console5_be32.loh @@ -0,0 +1,475 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/console5_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/console5_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 14, 64, 99,111,110, +115,111,108,101, 53, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 15, 0, 0, 1, 90, 0, 0, 0, 5, 0, 0, 64, 65, 1, 0, 64, 28, 0, 0, +128, 5, 0, 0, 0, 74,129,128, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 0, + 0,100,130, 0, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 0, 64,100,130,128, + 64, 9, 0, 0,128, 5, 0, 64,192, 6,131, 65,192, 9, 0, 0,128, 5, 0, 64, +192, 6, 0, 0,128, 69, 0,194, 64, 70, 0, 0,192,138,133, 66,192,137,134, 67, + 64,137,135, 67,192,137, 1, 0,128, 92,132, 0, 64, 9, 0, 0,128, 5, 0, 64, +192, 6, 0, 0,128, 69, 0,196, 64, 70, 0, 0,128,138,137, 68,192,137,134, 69, + 0,137, 1, 0,128, 92,136, 0, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 0, +128, 69, 0,196, 64, 70, 0, 0,192,138,137, 69,128,137,134, 69, 0,137,133, 69, +192,137, 1, 0,128, 92,138,128, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 66, + 0, 6, 0, 0,128,100,140, 0, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 0, +128, 69, 0,198,128, 70, 0, 0,192,138,134, 70,192,137,137, 71, 0,137,142,199, +128,137, 1, 0,128, 92,140,128, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 0, +128, 69, 0,198,128, 70, 0, 0,192,138,134, 70,192,137,137, 72, 0,137,142,200, + 64,137, 1, 0,128, 92,143,128, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 0, +128, 69, 0,198,128, 70, 0, 0,128,138,134, 70,192,137,137, 72,192,137, 1, 0, +128, 92,145, 0, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 0,128, 69, 0,198, +128, 70, 0, 0,128,138,134, 70,192,137,137, 73, 64,137, 1, 0,128, 92,146, 0, + 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 0,128, 69, 0,198,128, 70, 0, 0, +128,138,134, 70,192,137,137, 73,192,137, 1, 0,128, 92,147, 0, 64, 9, 0, 0, +128, 5, 0, 64,192, 6, 0, 73,128, 6, 0, 0,192,100,142,128, 64, 9, 0, 0, +128, 5, 0, 64,192, 6, 0, 73, 0, 6, 0, 1, 0,100,142,128, 64, 9, 0, 0, +128, 5, 0, 64,192, 6, 0, 1, 64,100,148, 0, 64, 9, 0, 0,128, 5, 0, 64, +192, 6, 0, 72,128, 6, 0, 1,128,100,142,128, 64, 9, 0, 0,128, 5, 0, 64, +192, 6, 0, 0,128, 69, 0,202,128, 70, 0,128,192,138, 0, 0,128,197, 1,202, +192,198, 0,128, 65, 10, 0, 0,129, 69, 2,203, 1, 70, 1, 0, 65,138, 0, 0, +129,197, 3,202,129,198, 2,128,130, 10, 0, 0,130, 69, 4,192,194, 70, 4,200, +130, 70, 0, 0,130,133, 5, 64,194,134, 5, 73,130,134, 0, 0,130,197, 5,192, +194,198, 5,201, 2,198, 0, 0,131, 5, 6, 64,195, 6, 6, 71,195, 6, 0, 0, +131, 69, 6,192,195, 70, 6,198, 67, 70,150,203,130, 9,151,204, 2, 9, 2,128, + 66, 34, 1, 0,129,220, 0, 0,130, 5, 4, 74,130, 6, 1,128, 66, 74, 0, 0, +130,133, 5, 64,194,134, 5, 69, 66,134, 0, 0,130,197, 5,192,194,198, 5,194, + 2,198, 0, 0,131, 5, 6, 64,195, 6, 6, 68, 3, 6,152,204,130, 73, 1,128, + 66, 98, 1, 0,130, 28,152,204,193,137, 1, 0, 65,162, 1, 0,129, 92,137, 77, + 1, 9, 0,128, 65, 34, 1, 0,128,220,152,205, 64,137,150,205,128,137,151,205, +192,137, 0,128, 64,162, 1, 0,128, 92,148,128, 64, 9, 0, 0,128, 5, 0, 64, +192, 6, 0, 0,128, 69, 0,206, 64, 70, 0,128, 0,138, 0, 0,128,197, 1,206, +128,198, 0,128, 65, 10, 0, 0,129, 69, 2,206, 65, 70, 0, 0, 1,138, 0, 0, +129,197, 3,206,193,198, 0, 0,130, 10,137, 79, 2, 9,142,207, 66, 9, 1, 0, + 1,220, 0, 0, 65,162, 1, 0,129, 92,137, 79,129, 9, 0,128, 65, 34, 1, 0, +128,220, 0, 0,129, 5, 2, 78,129, 6, 0,128, 65, 74, 0, 0,129,133, 3, 78, + 65,134, 0,128, 1,202, 0, 0,130, 5, 4, 78,194, 6, 0, 0,130, 74,137, 79, +194, 73, 0, 0,130,133, 5, 64,194,134, 5, 65, 66,134,142,130,130, 73, 1, 0, +130, 28, 0, 0,130, 69, 4,206,194, 70, 0, 0,130,138,137, 80, 2,137,142,208, + 66,137, 1, 0, 2, 92, 0, 0, 65,226, 1, 0,129,156,137, 80,129, 73, 0,128, + 65, 98, 1, 0, 1, 28, 0, 0, 64,162, 1, 0,128, 92,156, 0, 64, 9, 0, 0, +128, 5, 0, 64,192, 6, 0, 0,128, 69, 0,209, 0, 70, 0,129, 64,138, 0, 0, +128,197, 1,192,192,198, 1,202, 64,198,137, 81, 64,137, 0, 0,129, 5, 2, 64, +193, 6, 2, 78, 1, 6,156,129, 0,137,163, 66,192,137, 0, 0,129, 5, 2, 64, +193, 6, 2, 70, 65, 6,163,129, 0,137,164, 79, 64,137, 0,128, 64,162, 1, 0, +128, 92,161,128, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 80,192, 6, 0, 1, +192,100,164,128, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 0,128, 69, 0,209, + 0, 70, 0,129, 0,138, 0, 0,128,197, 1,202,128,198, 3, 0,129, 10, 0, 0, +129, 69, 2,196, 65, 70, 0, 0, 65,138,137, 81, 65,137, 1, 0,129, 92, 0, 0, +129,133, 3, 82,193,134, 0, 0, 65,202,134, 77,193,201, 1, 0,129,156, 0, 0, +129,197, 3,210,193,198, 0, 0, 66, 10,134, 77,194, 9, 1, 0,129,220, 0, 0, +130, 5, 4, 74,194, 6, 0, 0, 2, 74, 0, 0,130,133, 5, 74,130,134, 0,128, + 2,202, 0, 0,131, 5, 6, 68, 67, 6, 0, 0, 67, 74,137, 83, 3, 73, 1, 0, +131, 28, 0, 0,131, 69, 6,196, 67, 70, 0, 0, 67,138,137, 83, 67,137, 1, 0, + 3, 92, 0, 0, 66,226, 1, 0, 2,156, 0, 0, 66, 98, 1, 0,130, 28, 0, 0, +130, 69, 4,210,194, 70, 0, 0, 66,138,134, 77,194,137, 1, 0,130, 92, 0, 0, +130,133, 5, 70,130,134, 0, 0,194,202,137, 83,130,201,142,207, 66,201,134, 83, +194,201, 1, 0,130,156,150,212, 1, 9,152,205, 65, 9, 3, 0, 65, 34, 1, 0, +128,220,168,212,128,137,169,212,128,137,170, 84,128,137,137, 85, 64,137, 0,128, + 64,162, 1, 0,128, 92,165, 0, 64, 9, 0, 0,128, 5, 0, 64,192, 6, 0, 80, +192, 6, 0, 85,128, 11, 1, 0, 64, 28, 0, 0,128, 5, 0, 85,192, 6, 0, 0, +128, 69, 0,192,192, 70, 0,194, 0, 70, 1, 0, 64, 28, 0, 0,128, 5, 0, 86, + 0, 6, 0,128, 64, 28, 0, 0,128, 5, 0, 64,192, 6, 0, 80,192, 6, 0, 86, + 64, 11, 1, 0, 64, 28, 0, 0,128, 5, 0, 64,192, 6, 0, 82,128, 6, 0, 86, + 64, 11, 1, 0, 64, 28, 0,128, 0, 30, 0, 0, 0, 90, 4, 0, 0, 0, 8,114, +101,113,117,105,114,101, 0, 4, 0, 0, 0, 7,105,117,112,108,117, 97, 0, 4, + 0, 0, 0, 4,105,117,112, 0, 4, 0, 0, 0, 8, 99,111,110,115,111,108,101, + 0, 4, 0, 0, 0, 11,112,114,105,110,116,116, 97, 98,108,101, 0, 4, 0, 0, + 0, 19,112,114,105,110,116, 95,118,101,114,115,105,111,110, 95,105,110,102,111, + 0, 4, 0, 0, 0, 13,108, 97,115,116,102,105,108,101,110, 97,109,101, 0, 0, + 4, 0, 0, 0, 7,109,108, 67,111,100,101, 0, 4, 0, 0, 0, 10,109,117,108, +116,105,108,105,110,101, 0, 4, 0, 0, 0, 7,101,120,112, 97,110,100, 0, 4, + 0, 0, 0, 4, 89, 69, 83, 0, 4, 0, 0, 0, 5,115,105,122,101, 0, 4, 0, + 0, 0, 8, 50, 48, 48,120, 49, 50, 48, 0, 4, 0, 0, 0, 5,102,111,110,116, + 0, 4, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, + 95, 49, 48, 0, 4, 0, 0, 0, 12,108, 98,108, 80,111,115,105,116,105,111,110, + 0, 4, 0, 0, 0, 6,108, 97, 98,101,108, 0, 4, 0, 0, 0, 6,116,105,116, +108,101, 0, 4, 0, 0, 0, 4, 48, 58, 48, 0, 4, 0, 0, 0, 4, 53, 48,120, + 0, 4, 0, 0, 0, 12,108, 98,108, 70,105,108,101, 78, 97,109,101, 0, 4, 0, + 0, 0, 1, 0, 4, 0, 0, 0, 11, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 0, + 4, 0, 0, 0, 9, 99, 97,114,101,116, 95, 99, 98, 0, 4, 0, 0, 0, 11, 98, +117,116, 69,120,101, 99,117,116,101, 0, 4, 0, 0, 0, 7, 98,117,116,116,111, +110, 0, 4, 0, 0, 0, 6, 53, 48,120, 49, 53, 0, 4, 0, 0, 0, 8, 69,120, +101, 99,117,116,101, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 4, 0, + 0, 0, 39,105,117,112, 46,100,111,115,116,114,105,110,103, 40,105,117,112, 46, + 99,111,110,115,111,108,101, 46,109,108, 67,111,100,101, 46,118, 97,108,117,101, + 41, 0, 4, 0, 0, 0, 17, 98,117,116, 67,108,101, 97,114, 67,111,109,109, 97, +110,100,115, 0, 4, 0, 0, 0, 6, 67,108,101, 97,114, 0, 4, 0, 0, 0, 96, +105,117,112, 46, 99,111,110,115,111,108,101, 46,109,108, 67,111,100,101, 46,118, + 97,108,117,101, 61, 39, 39, 32, 32,105,117,112, 46, 99,111,110,115,111,108,101, + 46,108, 98,108, 70,105,108,101, 78, 97,109,101, 46,116,105,116,108,101, 32, 61, + 32, 39, 39, 32, 32,105,117,112, 46, 99,111,110,115,111,108,101, 46,108, 97,115, +116,102,105,108,101,110, 97,109,101, 32, 61, 32,110,105,108, 0, 4, 0, 0, 0, + 12, 98,117,116, 76,111, 97,100, 70,105,108,101, 0, 4, 0, 0, 0, 8, 76,111, + 97,100, 46, 46, 46, 0, 4, 0, 0, 0, 14, 98,117,116, 83, 97,118,101, 97,115, + 70,105,108,101, 0, 4, 0, 0, 0, 11, 83, 97,118,101, 32, 65,115, 46, 46, 46, + 0, 4, 0, 0, 0, 12, 98,117,116, 83, 97,118,101, 70,105,108,101, 0, 4, 0, + 0, 0, 5, 83, 97,118,101, 0, 4, 0, 0, 0, 9, 76,111, 97,100, 70,105,108, +101, 0, 4, 0, 0, 0, 11,118, 98,120, 67,111,110,115,111,108,101, 0, 4, 0, + 0, 0, 5,118, 98,111,120, 0, 4, 0, 0, 0, 6,102,114, 97,109,101, 0, 4, + 0, 0, 0, 5,104, 98,111,120, 0, 4, 0, 0, 0, 7,109, 97,114,103,105,110, + 0, 4, 0, 0, 0, 4, 48,120, 48, 0, 4, 0, 0, 0, 4,103, 97,112, 0, 4, + 0, 0, 0, 3, 49, 48, 0, 4, 0, 0, 0, 10, 97,108,105,103,110,109,101,110, +116, 0, 4, 0, 0, 0, 7, 65, 82, 73, 71, 72, 84, 0, 4, 0, 0, 0, 5, 65, + 84, 79, 80, 0, 4, 0, 0, 0, 9, 67,111,109,109, 97,110,100,115, 0, 4, 0, + 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 4, 0, 0, 0, 4, 53,120, 53, 0, + 4, 0, 0, 0, 2, 53, 0, 4, 0, 0, 0, 8,109,110,117, 77, 97,105,110, 0, + 4, 0, 0, 0, 5,109,101,110,117, 0, 4, 0, 0, 0, 8,115,117, 98,109,101, +110,117, 0, 4, 0, 0, 0, 5,105,116,101,109, 0, 4, 0, 0, 0, 5, 69,120, +105,116, 0, 4, 0, 0, 0, 17,114,101,116,117,114,110, 32,105,117,112, 46, 67, + 76, 79, 83, 69, 0, 4, 0, 0, 0, 5, 70,105,108,101, 0, 4, 0, 0, 0, 22, + 80,114,105,110,116, 32, 86,101,114,115,105,111,110, 32, 73,110,102,111, 46, 46, + 46, 0, 4, 0, 0, 0, 9, 65, 98,111,117,116, 46, 46, 46, 0, 4, 0, 0, 0, + 51,105,117,112, 46, 99,111,110,115,111,108,101, 46,100,108,103, 65, 98,111,117, +116, 58,112,111,112,117,112, 40,105,117,112, 46, 67, 69, 78, 84, 69, 82, 44, 32, +105,117,112, 46, 67, 69, 78, 84, 69, 82, 41, 0, 4, 0, 0, 0, 5, 72,101,108, +112, 0, 4, 0, 0, 0, 8,100,108,103, 77, 97,105,110, 0, 4, 0, 0, 0, 7, +100,105, 97,108,111,103, 0, 4, 0, 0, 0, 15, 73,117,112, 76,117, 97, 32, 67, +111,110,115,111,108,101, 0, 4, 0, 0, 0, 9,100,114, 97,103,100,114,111,112, + 0, 4, 0, 0, 0, 13,100,101,102, 97,117,108,116,101,110,116,101,114, 0, 4, + 0, 0, 0, 9, 99,108,111,115,101, 95, 99, 98, 0, 4, 0, 0, 0, 13,100,114, +111,112,102,105,108,101,115, 95, 99, 98, 0, 4, 0, 0, 0, 9,100,108,103, 65, + 98,111,117,116, 0, 4, 0, 0, 0, 5,102,105,108,108, 0, 4, 0, 0, 0, 16, + 84,101, 99,103,114, 97,102, 47, 80, 85, 67, 45, 82,105,111, 0, 4, 0, 0, 0, + 23,105,117,112, 64,116,101, 99,103,114, 97,102, 46,112,117, 99, 45,114,105,111, + 46, 98,114, 0, 4, 0, 0, 0, 3, 79, 75, 0, 4, 0, 0, 0, 6, 53, 48, 88, + 50, 48, 0, 4, 0, 0, 0, 6, 49, 48,120, 49, 48, 0, 4, 0, 0, 0, 7,109, + 97,120, 98,111,120, 0, 4, 0, 0, 0, 3, 78, 79, 0, 4, 0, 0, 0, 7,109, +105,110, 98,111,120, 0, 4, 0, 0, 0, 7,114,101,115,105,122,101, 0, 4, 0, + 0, 0, 6, 65, 98,111,117,116, 0, 4, 0, 0, 0, 5,115,104,111,119, 0, 4, + 0, 0, 0, 9, 83,101,116, 70,111, 99,117,115, 0, 4, 0, 0, 0, 9, 77, 97, +105,110, 76,111,111,112, 0, 4, 0, 0, 0, 8,100,101,115,116,114,111,121, 0, + 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 15, 0, 1, 0, 8, + 0, 0, 0, 30, 0, 0, 0, 69, 0, 0, 0,128, 1,128, 0,195, 1,128,192, 92, + 0, 0, 64,197, 0, 0,129, 1, 1, 0, 64,220, 0, 0, 0, 90,128, 4, 0, 22, + 0, 0, 64,197, 0, 0,193, 5, 0,128, 1, 64, 1, 0,129, 28, 0, 1, 1, 65, + 0, 0,193,133, 1, 0, 1,192, 1, 0,129,156, 2, 1,129, 21, 1, 0, 64,220, + 0, 0, 0,197, 0, 0, 1, 0, 0,128, 1, 64, 1,128,192,220, 2, 0, 0,128, + 1,128, 0, 64,127,251, 0, 22, 0, 0, 64,197, 0, 1, 65, 1, 1, 0, 64,220, + 0,128, 0, 30, 0, 0, 0, 6, 4, 0, 0, 0, 5,110,101,120,116, 0, 4, 0, + 0, 0, 6,112,114,105,110,116, 0, 4, 0, 0, 0, 21, 45, 45,112,114,105,110, +116,116, 97, 98,108,101, 32, 83,116, 97,114,116, 45, 45, 0, 4, 0, 0, 0, 9, +116,111,115,116,114,105,110,103, 0, 4, 0, 0, 0, 2, 61, 0, 4, 0, 0, 0, + 19, 45, 45,112,114,105,110,116,116, 97, 98,108,101, 32, 69,110,100, 45, 45, 0, + 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, + 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 10, + 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, + 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, + 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, + 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 0, 2,116, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 0, 0, 0, 2,110, 0, 0, 0, 0, 4, 0, 0, 0, 29, + 0, 0, 0, 2,118, 0, 0, 0, 0, 4, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 37, 0, 0, 0, 5, 0, 0, 0,112, 0, 0, + 0, 5, 0, 0, 0, 26,128, 2, 0, 22, 0, 0, 64, 5, 0, 0,128, 65, 0, 0, + 0,133, 1, 64,192,134, 0, 1, 0,193, 0, 0, 1, 5, 2, 65, 65, 6, 0,129, + 0, 85, 1, 0, 64, 28, 0, 1,128, 5, 0, 0, 0, 26,128, 2, 0, 22, 0, 0, + 64, 5, 0, 1,192, 65, 0, 1,128,133, 1, 64,192,134, 0, 1, 0,193, 0, 1, +129, 5, 2, 65, 65, 6, 0,129, 0, 85, 1, 0, 64, 28, 0, 0, 64, 5, 0, 2, + 0, 65, 0, 2, 64,133, 1, 64,192,134, 0, 1, 0,193, 0, 2, 65, 5, 2, 65, + 65, 6, 0,129, 0, 85, 1, 0, 64, 28, 0, 0, 64, 5, 0, 2,128, 65, 1, 0, + 64, 28, 0, 0, 64, 5, 0, 2,192, 65, 1, 0, 64, 28, 0, 0, 64, 5, 0, 3, + 0, 65, 0, 2, 64,133, 1, 67, 64,134, 0, 3,128,193, 1, 0,128,156, 0,128, +128, 85, 1, 0, 64, 28, 0, 0, 64, 5, 0, 3,192, 65, 0, 2, 64,133, 1, 67, + 64,134, 0, 4, 0,193, 1, 0,128,156, 0,128,128, 85, 1, 0, 64, 28, 0, 2, + 64, 5, 0, 67, 64, 6, 0, 4, 64, 65, 1, 0,128, 28, 0, 0, 0, 26,128, 0, +192, 22, 0, 0, 64, 69, 0, 4,128,129, 0, 0, 0,192, 1,128, 64, 92, 0, 0, + 64, 69, 0, 4,192,129, 0, 2, 64,197, 1,195, 64,198, 0, 5, 1, 1, 1, 0, +128,220, 1, 0,192,149, 1, 0, 64, 92, 0, 0, 64, 69, 0, 5, 64,129, 0, 2, + 64,197, 1,195, 64,198, 0, 5,129, 1, 1, 0,128,220, 1, 0,192,149, 1, 0, + 64, 92, 0, 2, 64, 69, 0,197,192, 70, 0, 0, 0, 90,128, 1, 64, 22, 0, 0, + 64, 69, 0, 6, 0,129, 0, 2, 64,197, 1,197,192,198, 1, 0,192,149, 1, 0, + 64, 92, 0, 2, 64, 69, 0,198, 64, 70, 0, 0, 0, 90,128, 1, 64, 22, 0, 0, + 64, 69, 0, 6,128,129, 0, 2, 64,197, 1,198, 64,198, 1, 0,192,149, 1, 0, + 64, 92, 0, 2, 64, 69, 0,198,192, 70, 0, 0, 0, 90,128, 1, 64, 22, 0, 0, + 64, 69, 0, 7, 0,129, 0, 2, 64,197, 1,198,192,198, 1, 0,192,149, 1, 0, + 64, 92, 0,128, 0, 30, 0, 0, 0, 29, 4, 0, 0, 0, 3,105,109, 0, 4, 0, + 0, 0, 6,112,114,105,110,116, 0, 4, 0, 0, 0, 4, 73, 77, 32, 0, 4, 0, + 0, 0, 9, 95, 86, 69, 82, 83, 73, 79, 78, 0, 4, 0, 0, 0, 3, 32, 32, 0, + 4, 0, 0, 0, 11, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 0, 4, 0, 0, 0, + 3, 99,100, 0, 4, 0, 0, 0, 4, 67, 68, 32, 0, 4, 0, 0, 0, 5, 73, 85, + 80, 32, 0, 4, 0, 0, 0, 4,105,117,112, 0, 4, 0, 0, 0, 1, 0, 4, 0, + 0, 0, 9, 73, 85, 80, 32, 73,110,102,111, 0, 4, 0, 0, 0, 11, 32, 32, 83, +121,115,116,101,109, 58, 32, 0, 4, 0, 0, 0, 10, 71,101,116, 71,108,111, 98, + 97,108, 0, 4, 0, 0, 0, 7, 83, 89, 83, 84, 69, 77, 0, 4, 0, 0, 0, 19, + 32, 32, 83,121,115,116,101,109, 32, 86,101,114,115,105,111,110, 58, 32, 0, 4, + 0, 0, 0, 14, 83, 89, 83, 84, 69, 77, 86, 69, 82, 83, 73, 79, 78, 0, 4, 0, + 0, 0, 13, 77, 79, 84, 73, 70, 86, 69, 82, 83, 73, 79, 78, 0, 4, 0, 0, 0, + 18, 32, 32, 77,111,116,105,102, 32, 86,101,114,115,105,111,110, 58, 32, 0, 4, + 0, 0, 0, 16, 32, 32, 83, 99,114,101,101,110, 32, 83,105,122,101, 58, 32, 0, + 4, 0, 0, 0, 11, 83, 67, 82, 69, 69, 78, 83, 73, 90, 69, 0, 4, 0, 0, 0, + 17, 32, 32, 83, 99,114,101,101,110, 32, 68,101,112,116,104, 58, 32, 0, 4, 0, + 0, 0, 12, 83, 67, 82, 69, 69, 78, 68, 69, 80, 84, 72, 0, 4, 0, 0, 0, 10, + 71, 76, 95, 86, 69, 78, 68, 79, 82, 0, 4, 0, 0, 0, 18, 32, 32, 79,112,101, +110, 71, 76, 32, 86,101,110,100,111,114, 58, 32, 0, 4, 0, 0, 0, 12, 71, 76, + 95, 82, 69, 78, 68, 69, 82, 69, 82, 0, 4, 0, 0, 0, 20, 32, 32, 79,112,101, +110, 71, 76, 32, 82,101,110,100,101,114,101,114, 58, 32, 0, 4, 0, 0, 0, 11, + 71, 76, 95, 86, 69, 82, 83, 73, 79, 78, 0, 4, 0, 0, 0, 19, 32, 32, 79,112, +101,110, 71, 76, 32, 86,101,114,115,105,111,110, 58, 32, 0, 0, 0, 0, 0, 0, + 0, 0,112, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, + 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, + 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, + 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, + 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, + 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, + 0, 0, 29, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, 0, + 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, + 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, + 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, + 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, + 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, + 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, + 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, + 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 1, 0, 0, 0, 4,109, +111,116, 0, 0, 0, 0, 59, 0, 0, 0,111, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 46, 0, 0, 0, 48, 0, 3, 0, 7, 0, 0, 0, 9, 0, 0, 0,197, 1, +192, 64,198, 1,192,128,198, 0,128, 1, 0, 0, 1, 1, 65, 1, 0, 1,128, 2, + 1,129, 21,129,129, 0,201, 0,128, 0, 30, 0, 0, 0, 5, 4, 0, 0, 0, 4, +105,117,112, 0, 4, 0, 0, 0, 8, 99,111,110,115,111,108,101, 0, 4, 0, 0, + 0, 12,108, 98,108, 80,111,115,105,116,105,111,110, 0, 4, 0, 0, 0, 6,116, +105,116,108,101, 0, 4, 0, 0, 0, 2, 58, 0, 0, 0, 0, 0, 0, 0, 0, 9, + 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, + 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 3, + 0, 0, 0, 5,115,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, + 4,108,105,110, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 99,111,108, + 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 58, 0, 0, 0, 70, 0, 1, 0, 4, 0, 0, 0, 39, 0, 0, 0, 69, 0,192, 64, + 70, 0,192,128, 70, 0,192,192, 23,128, 1, 64, 22, 0, 0, 0, 69, 0,192, 64, + 70, 0,193, 0, 70, 0,193, 64, 75, 1, 0, 64, 92,128, 6,128, 22, 0, 1,192, + 69, 0,194, 0, 70, 0, 0, 0,133, 1, 64, 64,134, 1, 64,128,134, 0, 2, 64, +193, 1,128,128, 92, 0, 1,128, 71, 0, 1,128, 69, 0, 0, 0, 90,128, 2,128, + 22, 0, 1,128, 69, 0,194,128, 75, 0, 0, 0,197, 1,192, 64,198, 1,194,192, +198, 1,195, 0,198, 1,128, 64, 92, 0, 1,128, 69, 0,195, 64, 75, 1, 0, 64, + 92,128, 1, 0, 22, 0, 3,128, 69, 0, 3,192,129, 0, 4, 0,197, 1, 0,192, +149, 1, 0, 64, 92, 0,128, 0, 30, 0, 0, 0, 17, 4, 0, 0, 0, 4,105,117, +112, 0, 4, 0, 0, 0, 8, 99,111,110,115,111,108,101, 0, 4, 0, 0, 0, 13, +108, 97,115,116,102,105,108,101,110, 97,109,101, 0, 0, 4, 0, 0, 0, 14, 98, +117,116, 83, 97,118,101, 97,115, 70,105,108,101, 0, 4, 0, 0, 0, 7, 97, 99, +116,105,111,110, 0, 4, 0, 0, 0, 8,110,101,119,102,105,108,101, 0, 4, 0, + 0, 0, 3,105,111, 0, 4, 0, 0, 0, 5,111,112,101,110, 0, 4, 0, 0, 0, + 3,119, 43, 0, 4, 0, 0, 0, 6,119,114,105,116,101, 0, 4, 0, 0, 0, 7, +109,108, 67,111,100,101, 0, 4, 0, 0, 0, 6,118, 97,108,117,101, 0, 4, 0, + 0, 0, 6, 99,108,111,115,101, 0, 4, 0, 0, 0, 6,101,114,114,111,114, 0, + 4, 0, 0, 0, 18, 67, 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105,108, +101, 32, 0, 4, 0, 0, 0, 9,102,105,108,101,110, 97,109,101, 0, 0, 0, 0, + 0, 0, 0, 0, 39, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, + 59, 0, 0, 0, 59, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, + 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, + 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, + 62, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, + 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, + 64, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, + 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, + 70, 0, 0, 0, 1, 0, 0, 0, 5,115,101,108,102, 0, 0, 0, 0, 0, 0, 0, + 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 92, 0, 1, + 0, 7, 0, 0, 0, 65, 0, 0, 0, 69, 0,192, 64, 70, 0, 1, 64,138,129, 64, +192,137,130, 65, 64,137,131, 65,192,137,132, 66, 64,137, 0, 2,192,197,133, 0, +192,137, 1, 0,128, 92, 0,195, 0,139, 0, 0, 1, 5, 2, 67, 65, 6, 0, 0, + 1, 69, 2,195, 65, 70, 2, 0, 64,156, 0,195,128,134, 0, 0, 0,197, 1,195, +192,198, 0,196, 65, 6,136, 1, 0,201, 0, 0, 0,197, 1,195,192,198, 1,196, +128,198, 0, 0, 1, 5, 2, 67,193, 6, 2, 68, 1, 6,130, 1, 0,201, 0,196, +192,203, 1, 0, 64,220, 1, 69, 0, 87,128, 7,192, 22, 0, 0, 0,197, 1,195, +192,198, 1,196, 0,198, 1,197, 64, 23,128, 1, 0, 22, 0, 5,128,197, 0, 5, +193, 1, 0, 6, 1, 69, 2, 1, 65, 21, 1, 0, 64,220, 0, 6, 64,197, 1,198, +128,198, 0, 0, 1, 5, 2, 67,193, 6, 2, 68, 1, 6, 0, 6,193, 65, 1,128, +128,220, 0, 0, 0,218,128, 2, 64, 22, 1,199, 1, 11, 0, 0, 1,133, 3, 67, +193,134, 3, 71, 65,134, 3, 68, 65,134, 1,128, 65, 28, 1,199,129, 11, 1,128, + 1,128, 1,128, 65, 28,128, 0,128, 22, 0, 5,129, 5, 0, 7,193, 65, 1, 0, + 65, 28, 0,128, 0, 30, 0, 0, 0, 32, 4, 0, 0, 0, 4,105,117,112, 0, 4, + 0, 0, 0, 8,102,105,108,101,100,108,103, 0, 4, 0, 0, 0, 11,100,105, 97, +108,111,103,116,121,112,101, 0, 4, 0, 0, 0, 5, 83, 65, 86, 69, 0, 4, 0, + 0, 0, 6,116,105,116,108,101, 0, 4, 0, 0, 0, 10, 83, 97,118,101, 32, 70, +105,108,101, 0, 4, 0, 0, 0, 7,102,105,108,116,101,114, 0, 4, 0, 0, 0, + 4, 42, 46, 42, 0, 4, 0, 0, 0, 11,102,105,108,116,101,114,105,110,102,111, + 0, 4, 0, 0, 0, 10, 65,108,108, 32,102,105,108,101,115, 0, 4, 0, 0, 0, + 9, 97,108,108,111,119,110,101,119, 0, 4, 0, 0, 0, 4,121,101,115, 0, 4, + 0, 0, 0, 6,112,111,112,117,112, 0, 4, 0, 0, 0, 5, 76, 69, 70, 84, 0, + 4, 0, 0, 0, 7,115,116, 97,116,117,115, 0, 4, 0, 0, 0, 8, 99,111,110, +115,111,108,101, 0, 4, 0, 0, 0, 13,108, 97,115,116,102,105,108,101,110, 97, +109,101, 0, 4, 0, 0, 0, 6,118, 97,108,117,101, 0, 4, 0, 0, 0, 12,108, + 98,108, 70,105,108,101, 78, 97,109,101, 0, 4, 0, 0, 0, 8,100,101,115,116, +114,111,121, 0, 4, 0, 0, 0, 3, 45, 49, 0, 0, 4, 0, 0, 0, 6,101,114, +114,111,114, 0, 4, 0, 0, 0, 18, 67, 97,110,110,111,116, 32, 83, 97,118,101, + 32,102,105,108,101, 32, 0, 4, 0, 0, 0, 9,102,105,108,101,110, 97,109,101, + 0, 4, 0, 0, 0, 3,105,111, 0, 4, 0, 0, 0, 5,111,112,101,110, 0, 4, + 0, 0, 0, 3,119, 43, 0, 4, 0, 0, 0, 6,119,114,105,116,101, 0, 4, 0, + 0, 0, 7,109,108, 67,111,100,101, 0, 4, 0, 0, 0, 6, 99,108,111,115,101, + 0, 4, 0, 0, 0, 17, 67, 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105, +108,101, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 73, 0, 0, 0, 73, 0, + 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 74, 0, + 0, 0, 74, 0, 0, 0, 74, 0, 0, 0, 73, 0, 0, 0, 75, 0, 0, 0, 75, 0, + 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 76, 0, + 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 78, 0, + 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, + 0, 0, 78, 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 80, 0, 0, 0, 80, 0, + 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, + 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, + 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, + 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 86, 0, + 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, + 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 89, 0, + 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 92, 0, 0, 0, 4, 0, 0, 0, 5,115, +101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 3,102,100, 0, 0, + 0, 0, 10, 0, 0, 0, 64, 0, 0, 0, 7,115,116, 97,116,117,115, 0, 0, 0, + 0, 17, 0, 0, 0, 64, 0, 0, 0, 8,110,101,119,102,105,108,101, 0, 0, 0, + 0, 49, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, 0, + 0,104, 0, 1, 0, 6, 0, 0, 0, 34, 0, 0, 0, 69, 0,192, 64, 70, 0, 0, + 0,128, 0, 0,128,193, 1,128,128, 92, 0,192,192, 23,128, 1, 64, 22, 0, 1, + 0,133, 0, 1, 64,193, 0, 0, 1, 0, 1,129, 0,213, 1, 0, 64,156,128, 4, +192, 22, 0, 1,128,133, 1, 65,192,134, 1, 66, 0,134, 0,194,128,203, 0, 2, +193, 65, 1,128,128,220,132,128,192,137, 0,195, 0,139, 0,128, 1, 0, 1,128, + 64,156, 0, 1,128,133, 1, 65,192,134,134,128, 0,137, 0, 1,128,133, 1, 65, +192,134, 1, 67,128,134, 0, 1,128,197, 1,193,192,198, 1,195, 64,198,135,128, +192,137, 0,128, 0, 30, 0, 0, 0, 16, 4, 0, 0, 0, 3,105,111, 0, 4, 0, + 0, 0, 5,111,112,101,110, 0, 4, 0, 0, 0, 2,114, 0, 0, 4, 0, 0, 0, + 6,101,114,114,111,114, 0, 4, 0, 0, 0, 18, 67, 97,110,110,111,116, 32,108, +111, 97,100, 32,102,105,108,101, 32, 0, 4, 0, 0, 0, 4,105,117,112, 0, 4, + 0, 0, 0, 8, 99,111,110,115,111,108,101, 0, 4, 0, 0, 0, 7,109,108, 67, +111,100,101, 0, 4, 0, 0, 0, 6,118, 97,108,117,101, 0, 4, 0, 0, 0, 5, +114,101, 97,100, 0, 4, 0, 0, 0, 3, 42, 97, 0, 4, 0, 0, 0, 6, 99,108, +111,115,101, 0, 4, 0, 0, 0, 13,108, 97,115,116,102,105,108,101,110, 97,109, +101, 0, 4, 0, 0, 0, 12,108, 98,108, 70,105,108,101, 78, 97,109,101, 0, 4, + 0, 0, 0, 6,116,105,116,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, + 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, + 0, 96, 0, 0, 0, 96, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, + 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, + 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, + 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,101, 0, 0, 0,101, 0, 0, + 0,101, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, + 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,104, 0, 0, 0, 2, 0, 0, + 0, 9,102,105,108,101,110, 97,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, + 0, 0, 8,110,101,119,102,105,108,101, 0, 0, 0, 0, 5, 0, 0, 0, 33, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106, 0, 0, 0,121, 0, 1, 0, 7, 0, + 0, 0, 37, 0, 0, 0, 69, 0,192, 64, 70, 0, 1, 64,138,129, 64,192,137,130, + 65, 64,137,131, 65,192,137,132, 66, 64,137,133, 66,192,137, 1, 0,128, 92, 0, +195, 0,139, 0, 0, 1, 5, 2, 67, 65, 6, 0, 0, 1, 69, 2,195, 65, 70, 2, + 0, 64,156, 0,195,128,134, 0,195,192,198, 0,196, 1, 11, 1, 0, 65, 28, 1, + 68, 64, 87,128, 0, 64, 22, 1, 68,128, 23,128, 1,192, 22, 1, 68,128, 23,128, + 2,128, 22, 0, 4,193, 5, 0, 5, 1, 65, 1,128, 1,128, 2,129,129, 85, 1, + 0, 65, 28,128, 1, 0, 22, 0, 0, 1, 5, 2, 69, 65, 6, 2, 69,129, 6, 1, +128, 1, 64, 1, 0, 65, 28, 0,128, 0, 30, 0, 0, 0, 23, 4, 0, 0, 0, 4, +105,117,112, 0, 4, 0, 0, 0, 8,102,105,108,101,100,108,103, 0, 4, 0, 0, + 0, 11,100,105, 97,108,111,103,116,121,112,101, 0, 4, 0, 0, 0, 5, 79, 80, + 69, 78, 0, 4, 0, 0, 0, 6,116,105,116,108,101, 0, 4, 0, 0, 0, 10, 76, +111, 97,100, 32, 70,105,108,101, 0, 4, 0, 0, 0, 7,102,105,108,116,101,114, + 0, 4, 0, 0, 0, 4, 42, 46, 42, 0, 4, 0, 0, 0, 11,102,105,108,116,101, +114,105,110,102,111, 0, 4, 0, 0, 0, 10, 65,108,108, 32, 70,105,108,101,115, + 0, 4, 0, 0, 0, 9, 97,108,108,111,119,110,101,119, 0, 4, 0, 0, 0, 3, + 78, 79, 0, 4, 0, 0, 0, 6,112,111,112,117,112, 0, 4, 0, 0, 0, 7, 67, + 69, 78, 84, 69, 82, 0, 4, 0, 0, 0, 7,115,116, 97,116,117,115, 0, 4, 0, + 0, 0, 6,118, 97,108,117,101, 0, 4, 0, 0, 0, 8,100,101,115,116,114,111, +121, 0, 4, 0, 0, 0, 3, 45, 49, 0, 4, 0, 0, 0, 2, 49, 0, 4, 0, 0, + 0, 6,101,114,114,111,114, 0, 4, 0, 0, 0, 18, 67, 97,110,110,111,116, 32, +108,111, 97,100, 32,102,105,108,101, 32, 0, 4, 0, 0, 0, 8, 99,111,110,115, +111,108,101, 0, 4, 0, 0, 0, 9, 76,111, 97,100, 70,105,108,101, 0, 0, 0, + 0, 0, 0, 0, 0, 37, 0, 0, 0,107, 0, 0, 0,107, 0, 0, 0,107, 0, 0, + 0,107, 0, 0, 0,107, 0, 0, 0,108, 0, 0, 0,108, 0, 0, 0,108, 0, 0, + 0,107, 0, 0, 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, 0, + 0,109, 0, 0, 0,109, 0, 0, 0,110, 0, 0, 0,111, 0, 0, 0,112, 0, 0, + 0,112, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, + 0,115, 0, 0, 0,115, 0, 0, 0,116, 0, 0, 0,116, 0, 0, 0,116, 0, 0, + 0,116, 0, 0, 0,116, 0, 0, 0,117, 0, 0, 0,119, 0, 0, 0,119, 0, 0, + 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,121, 0, 0, 0, 4, 0, 0, + 0, 5,115,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 3,102, +100, 0, 0, 0, 0, 9, 0, 0, 0, 36, 0, 0, 0, 7,115,116, 97,116,117,115, + 0, 0, 0, 0, 16, 0, 0, 0, 36, 0, 0, 0, 9,102,105,108,101,110, 97,109, +101, 0, 0, 0, 0, 17, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,166, 0, 0, 0,170, 0, 5, 0, 7, 0, 0, 0, 8, 1, 64, 0, 23,128, 1, + 0, 22, 0, 0, 65, 69, 2,192,129, 70, 2,192,193, 70, 0,128, 1,128, 1, 0, + 65, 92, 0,128, 0, 30, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 4,105,117,112, 0, 4, 0, 0, 0, 8, 99,111,110,115,111,108,101, + 0, 4, 0, 0, 0, 9, 76,111, 97,100, 70,105,108,101, 0, 0, 0, 0, 0, 0, + 0, 0, 8, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,168, 0, 0, 0,168, 0, + 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,170, 0, 0, 0, 5, 0, + 0, 0, 5,115,101,108,102, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 9, +102,105,108,101,110, 97,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, + 4,110,117,109, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 2,120, 0, 0, + 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 2,121, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 1, 90, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, + 1, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, + 7, 0, 0, 0, 15, 0, 0, 0, 7, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 37, 0, 0, 0, 17, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, + 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, + 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, + 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, + 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 46, 0, 0, 0, + 46, 0, 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 46, 0, 0, 0, 50, 0, 0, 0, + 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, + 50, 0, 0, 0, 51, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, + 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, + 52, 0, 0, 0, 53, 0, 0, 0, 52, 0, 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, + 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, + 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, + 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, + 55, 0, 0, 0, 55, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, + 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, + 56, 0, 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 70, 0, 0, 0, + 58, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 92, 0, 0, 0, + 72, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0,104, 0, 0, 0, 94, 0, 0, 0, +106, 0, 0, 0,106, 0, 0, 0,106, 0, 0, 0,121, 0, 0, 0,106, 0, 0, 0, +123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0, +125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0, +125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0, +125, 0, 0, 0,125, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0, +127, 0, 0, 0,127, 0, 0, 0,127, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0, +128, 0, 0, 0,129, 0, 0, 0,129, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0, +130, 0, 0, 0,130, 0, 0, 0,125, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0, +131, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0,132, 0, 0, 0, +132, 0, 0, 0,132, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0, +134, 0, 0, 0,134, 0, 0, 0,131, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0, +125, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,125, 0, 0, 0,136, 0, 0, 0, +136, 0, 0, 0,136, 0, 0, 0,137, 0, 0, 0,124, 0, 0, 0,137, 0, 0, 0, +141, 0, 0, 0,141, 0, 0, 0,141, 0, 0, 0,141, 0, 0, 0,141, 0, 0, 0, +143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0, +145, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0, +147, 0, 0, 0,147, 0, 0, 0,148, 0, 0, 0,146, 0, 0, 0,148, 0, 0, 0, +149, 0, 0, 0,144, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0, +150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0, +152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0, +152, 0, 0, 0,152, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0, +153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0,154, 0, 0, 0,151, 0, 0, 0, +154, 0, 0, 0,154, 0, 0, 0,150, 0, 0, 0,155, 0, 0, 0,142, 0, 0, 0, +155, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0, +159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,160, 0, 0, 0, +161, 0, 0, 0,161, 0, 0, 0,161, 0, 0, 0,161, 0, 0, 0,162, 0, 0, 0, +163, 0, 0, 0,163, 0, 0, 0,163, 0, 0, 0,163, 0, 0, 0,164, 0, 0, 0, +164, 0, 0, 0,159, 0, 0, 0,164, 0, 0, 0,166, 0, 0, 0,166, 0, 0, 0, +166, 0, 0, 0,170, 0, 0, 0,166, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0, +174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,176, 0, 0, 0,176, 0, 0, 0, +176, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0, +178, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0, +179, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0, +180, 0, 0, 0,181, 0, 0, 0,181, 0, 0, 0,181, 0, 0, 0,183, 0, 0, 0, +183, 0, 0, 0,183, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0, +185, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0, +186, 0, 0, 0,186, 0, 0, 0,187, 0, 0, 0,184, 0, 0, 0,188, 0, 0, 0, +182, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0, +189, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0, +190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,191, 0, 0, 0,191, 0, 0, 0, +192, 0, 0, 0,177, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0, +193, 0, 0, 0,194, 0, 0, 0,175, 0, 0, 0,194, 0, 0, 0,198, 0, 0, 0, +198, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,199, 0, 0, 0, +199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0, +201, 0, 0, 0,201, 0, 0, 0,201, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0, +203, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0, +204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/console5_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srcconsole/loh/console5_be64.loh b/iup/srcconsole/loh/console5_be64.loh new file mode 100755 index 0000000..4e08445 --- /dev/null +++ b/iup/srcconsole/loh/console5_be64.loh @@ -0,0 +1,524 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/console5_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/console5_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,110,115,111,108,101, 53, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 15, 90, 1, 0, 0, 5, 0, 0, 0, 65, 64, 0, 0, 28, 64, + 0, 1, 5,128, 0, 0, 74, 0, 0, 0, 9, 64,128,129, 5,128, 0, 0, 6,192, + 64, 0,100, 0, 0, 0, 9, 64, 0,130, 5,128, 0, 0, 6,192, 64, 0,100, 64, + 0, 0, 9, 64,128,130, 5,128, 0, 0, 6,192, 64, 0, 9,192, 65,131, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 64,194, 0,138,192, 0, 0,137,192, + 66,133,137, 64, 67,134,137,192, 67,135, 92,128, 0, 1, 9, 64, 0,132, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 64,196, 0,138,128, 0, 0,137,192, + 68,137,137, 0, 69,134, 92,128, 0, 1, 9, 64, 0,136, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70, 64,196, 0,138,192, 0, 0,137,128, 69,137,137, 0, + 69,134,137,192, 69,133, 92,128, 0, 1, 9, 64,128,138, 5,128, 0, 0, 6,192, + 64, 0, 6, 0, 66, 0,100,128, 0, 0, 9, 64, 0,140, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70,128,198, 0,138,192, 0, 0,137,192, 70,134,137, 0, + 71,137,137,128,199,142, 92,128, 0, 1, 9, 64,128,140, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70,128,198, 0,138,192, 0, 0,137,192, 70,134,137, 0, + 72,137,137, 64,200,142, 92,128, 0, 1, 9, 64,128,143, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70,128,198, 0,138,128, 0, 0,137,192, 70,134,137,192, + 72,137, 92,128, 0, 1, 9, 64, 0,145, 5,128, 0, 0, 6,192, 64, 0, 69,128, + 0, 0, 70,128,198, 0,138,128, 0, 0,137,192, 70,134,137, 64, 73,137, 92,128, + 0, 1, 9, 64, 0,146, 5,128, 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70,128, +198, 0,138,128, 0, 0,137,192, 70,134,137,192, 73,137, 92,128, 0, 1, 9, 64, + 0,147, 5,128, 0, 0, 6,192, 64, 0, 6,128, 73, 0,100,192, 0, 0, 9, 64, +128,142, 5,128, 0, 0, 6,192, 64, 0, 6, 0, 73, 0,100, 0, 1, 0, 9, 64, +128,142, 5,128, 0, 0, 6,192, 64, 0,100, 64, 1, 0, 9, 64, 0,148, 5,128, + 0, 0, 6,192, 64, 0, 6,128, 72, 0,100,128, 1, 0, 9, 64,128,142, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70,128,202, 0,138,192,128, 0,197,128, + 0, 0,198,192,202, 1, 10, 65,128, 0, 69,129, 0, 0, 70, 1,203, 2,138, 65, + 0, 1,197,129, 0, 0,198,129,202, 3, 10,130,128, 2, 69,130, 0, 0, 70,194, +192, 4, 70,130,200, 4,133,130, 0, 0,134,194, 64, 5,134,130, 73, 5,197,130, + 0, 0,198,194,192, 5,198, 2,201, 5, 5,131, 0, 0, 6,195, 64, 6, 6,195, + 71, 6, 69,131, 0, 0, 70,195,192, 6, 70, 67,198, 6, 9,130,203,150, 9, 2, +204,151, 34, 66,128, 2,220,129, 0, 1, 5,130, 0, 0, 6,130, 74, 4, 74, 66, +128, 1,133,130, 0, 0,134,194, 64, 5,134, 66, 69, 5,197,130, 0, 0,198,194, +192, 5,198, 2,194, 5, 5,131, 0, 0, 6,195, 64, 6, 6, 3, 68, 6, 73,130, +204,152, 98, 66,128, 1, 28,130, 0, 1,137,193,204,152,162, 65, 0, 1, 92,129, + 0, 1, 9, 1, 77,137, 34, 65,128, 0,220,128, 0, 1,137, 64,205,152,137,128, +205,150,137,192,205,151,162, 64,128, 0, 92,128, 0, 1, 9, 64,128,148, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 64,206, 0,138, 0,128, 0,197,128, + 0, 0,198,128,206, 1, 10, 65,128, 0, 69,129, 0, 0, 70, 65,206, 2,138, 1, + 0, 0,197,129, 0, 0,198,193,206, 3, 10,130, 0, 0, 9, 2, 79,137, 9, 66, +207,142,220, 1, 0, 1,162, 65, 0, 0, 92,129, 0, 1, 9,129, 79,137, 34, 65, +128, 0,220,128, 0, 1, 5,129, 0, 0, 6,129, 78, 2, 74, 65,128, 0,133,129, + 0, 0,134, 65, 78, 3,202, 1,128, 0, 5,130, 0, 0, 6,194, 78, 4, 74,130, + 0, 0, 73,194, 79,137,133,130, 0, 0,134,194, 64, 5,134, 66, 65, 5, 73,130, +130,142, 28,130, 0, 1, 69,130, 0, 0, 70,194,206, 4,138,130, 0, 0,137, 2, + 80,137,137, 66,208,142, 92, 2, 0, 1,226, 65, 0, 0,156,129, 0, 1, 73,129, + 80,137, 98, 65,128, 0, 28, 1, 0, 1,162, 64, 0, 0, 92,128, 0, 1, 9, 64, + 0,156, 5,128, 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 0,209, 0,138, 64, +129, 0,197,128, 0, 0,198,192,192, 1,198, 64,202, 1,137, 64, 81,137, 5,129, + 0, 0, 6,193, 64, 2, 6, 1, 78, 2,137, 0,129,156,137,192, 66,163, 5,129, + 0, 0, 6,193, 64, 2, 6, 65, 70, 2,137, 0,129,163,137, 64, 79,164,162, 64, +128, 0, 92,128, 0, 1, 9, 64,128,161, 5,128, 0, 0, 6,192, 64, 0, 6,192, + 80, 0,100,192, 1, 0, 9, 64,128,164, 5,128, 0, 0, 6,192, 64, 0, 69,128, + 0, 0, 70, 0,209, 0,138, 0,129, 0,197,128, 0, 0,198,128,202, 1, 10,129, + 0, 3, 69,129, 0, 0, 70, 65,196, 2,138, 65, 0, 0,137, 65, 81,137, 92,129, + 0, 1,133,129, 0, 0,134,193, 82, 3,202, 65, 0, 0,201,193, 77,134,156,129, + 0, 1,197,129, 0, 0,198,193,210, 3, 10, 66, 0, 0, 9,194, 77,134,220,129, + 0, 1, 5,130, 0, 0, 6,194, 74, 4, 74, 2, 0, 0,133,130, 0, 0,134,130, + 74, 5,202, 2,128, 0, 5,131, 0, 0, 6, 67, 68, 6, 74, 67, 0, 0, 73, 3, + 83,137, 28,131, 0, 1, 69,131, 0, 0, 70, 67,196, 6,138, 67, 0, 0,137, 67, + 83,137, 92, 3, 0, 1,226, 66, 0, 0,156, 2, 0, 1, 98, 66, 0, 0, 28,130, + 0, 1, 69,130, 0, 0, 70,194,210, 4,138, 66, 0, 0,137,194, 77,134, 92,130, + 0, 1,133,130, 0, 0,134,130, 70, 5,202,194, 0, 0,201,130, 83,137,201, 66, +207,142,201,194, 83,134,156,130, 0, 1, 9, 1,212,150, 9, 65,205,152, 34, 65, + 0, 3,220,128, 0, 1,137,128,212,168,137,128,212,169,137,128, 84,170,137, 64, + 85,137,162, 64,128, 0, 92,128, 0, 1, 9, 64, 0,165, 5,128, 0, 0, 6,192, + 64, 0, 6,192, 80, 0, 11,128, 85, 0, 28, 64, 0, 1, 5,128, 0, 0, 6,192, + 85, 0, 69,128, 0, 0, 70,192,192, 0, 70, 0,194, 0, 28, 64, 0, 1, 5,128, + 0, 0, 6, 0, 86, 0, 28, 64,128, 0, 5,128, 0, 0, 6,192, 64, 0, 6,192, + 80, 0, 11, 64, 86, 0, 28, 64, 0, 1, 5,128, 0, 0, 6,192, 64, 0, 6,128, + 82, 0, 11, 64, 86, 0, 28, 64, 0, 1, 30, 0,128, 0, 90, 0, 0, 0, 4, 8, + 0, 0, 0, 0, 0, 0, 0,114,101,113,117,105,114,101, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,105,117,112,108,117, 97, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116,116, 97, 98,108,101, + 0, 4, 19, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116, 95,118,101,114,115, +105,111,110, 95,105,110,102,111, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,108, 97, +115,116,102,105,108,101,110, 97,109,101, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,109,108, 67,111,100,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,109,117,108, +116,105,108,105,110,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,101,120,112, 97, +110,100, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 89, 69, 83, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0,115,105,122,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 50, + 48, 48,120, 49, 50, 48, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,102,111,110,116, + 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, + 82, 77, 65, 76, 95, 49, 48, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,108, 98,108, + 80,111,115,105,116,105,111,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,108, 97, + 98,101,108, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0, 48, 58, 48, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 53, 48,120, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,108, 98,108, 70,105,108, +101, 78, 97,109,101, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,114,101,116, 95, 99, 98, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0, 98,117,116, 69,120,101, 99,117,116,101, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 98,117,116,116,111,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 53, + 48,120, 49, 53, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 69,120,101, 99,117,116, +101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 39, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 46,100,111,115,116,114,105,110,103, 40, +105,117,112, 46, 99,111,110,115,111,108,101, 46,109,108, 67,111,100,101, 46,118, + 97,108,117,101, 41, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 98,117,116, 67,108, +101, 97,114, 67,111,109,109, 97,110,100,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, + 0, 67,108,101, 97,114, 0, 4, 96, 0, 0, 0, 0, 0, 0, 0,105,117,112, 46, + 99,111,110,115,111,108,101, 46,109,108, 67,111,100,101, 46,118, 97,108,117,101, + 61, 39, 39, 32, 32,105,117,112, 46, 99,111,110,115,111,108,101, 46,108, 98,108, + 70,105,108,101, 78, 97,109,101, 46,116,105,116,108,101, 32, 61, 32, 39, 39, 32, + 32,105,117,112, 46, 99,111,110,115,111,108,101, 46,108, 97,115,116,102,105,108, +101,110, 97,109,101, 32, 61, 32,110,105,108, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0, 98,117,116, 76,111, 97,100, 70,105,108,101, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0, 76,111, 97,100, 46, 46, 46, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 98, +117,116, 83, 97,118,101, 97,115, 70,105,108,101, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0, 83, 97,118,101, 32, 65,115, 46, 46, 46, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0, 98,117,116, 83, 97,118,101, 70,105,108,101, 0, 4, 5, 0, 0, 0, 0, + 0, 0, 0, 83, 97,118,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 76,111, 97, +100, 70,105,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,118, 98,120, 67,111, +110,115,111,108,101, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,118, 98,111,120, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,102,114, 97,109,101, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,104, 98,111,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97, +114,103,105,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 48,120, 48, 0, 4, 4, + 0, 0, 0, 0, 0, 0, 0,103, 97,112, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, + 49, 48, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 97,108,105,103,110,109,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65, 82, 73, 71, 72, 84, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 65, 84, 79, 80, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 67,111,109,109, 97,110,100,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 65, + 67, 69, 78, 84, 69, 82, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 53,120, 53, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0, 53, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, +109,110,117, 77, 97,105,110, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,109,101,110, +117, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115,117, 98,109,101,110,117, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,105,116,101,109, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 69,120,105,116, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0,114,101,116,117, +114,110, 32,105,117,112, 46, 67, 76, 79, 83, 69, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 70,105,108,101, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,105,110, +116, 32, 86,101,114,115,105,111,110, 32, 73,110,102,111, 46, 46, 46, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 65, 98,111,117,116, 46, 46, 46, 0, 4, 51, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 46, 99,111,110,115,111,108,101, 46,100,108,103, + 65, 98,111,117,116, 58,112,111,112,117,112, 40,105,117,112, 46, 67, 69, 78, 84, + 69, 82, 44, 32,105,117,112, 46, 67, 69, 78, 84, 69, 82, 41, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0, 72,101,108,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100, +108,103, 77, 97,105,110, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108, +111,103, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, 73,117,112, 76,117, 97, 32, 67, +111,110,115,111,108,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,100,114, 97,103, +100,114,111,112, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,100,101,102, 97,117,108, +116,101,110,116,101,114, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,108,111,115, +101, 95, 99, 98, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,100,114,111,112,102,105, +108,101,115, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,100,108,103, 65, + 98,111,117,116, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,102,105,108,108, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0, 84,101, 99,103,114, 97,102, 47, 80, 85, 67, 45, + 82,105,111, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0,105,117,112, 64,116,101, 99, +103,114, 97,102, 46,112,117, 99, 45,114,105,111, 46, 98,114, 0, 4, 3, 0, 0, + 0, 0, 0, 0, 0, 79, 75, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 53, 48, 88, + 50, 48, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 49, 48,120, 49, 48, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,109, 97,120, 98,111,120, 0, 4, 3, 0, 0, 0, 0, + 0, 0, 0, 78, 79, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109,105,110, 98,111, +120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114,101,115,105,122,101, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0, 65, 98,111,117,116, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0,115,104,111,119, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 70, +111, 99,117,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 97,105,110, 76,111, +111,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, + 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 15, 0, 0, 0, + 0, 1, 0, 8, 30, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0,195, 0,128, 1, + 92,192,128, 1,197, 64, 0, 0, 1,129, 0, 0,220, 64, 0, 1, 90, 0, 0, 0, + 22, 0, 4,128,197, 64, 0, 0, 5,193, 0, 0, 64, 1,128, 0, 28,129, 0, 1, + 65, 1, 1, 0,133,193, 0, 0,192, 1, 0, 1,156,129, 0, 1, 21,129, 1, 2, +220, 64, 0, 1,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,220,192,128, 1, +128, 0, 0, 2, 64, 0,128, 1, 22, 0,251,127,197, 64, 0, 0, 1, 65, 1, 0, +220, 64, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,101,120,116, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116, + 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 45, 45,112,114,105,110,116,116, 97, 98, +108,101, 32, 83,116, 97,114,116, 45, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +116,111,115,116,114,105,110,103, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 61, 0, + 4, 19, 0, 0, 0, 0, 0, 0, 0, 45, 45,112,114,105,110,116,116, 97, 98,108, +101, 32, 69,110,100, 45, 45, 0, 0, 0, 0, 0, 30, 0, 0, 0, 8, 0, 0, 0, + 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, + 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, + 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0, 0, 29, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0,110, 0, 4, 0, 0, 0, 29, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,118, 0, 4, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 5,112, 0, + 0, 0, 5, 0, 0, 0, 26, 0, 0, 0, 22, 0, 2,128, 5, 64, 0, 0, 65,128, + 0, 0,133, 0, 0, 0,134,192, 64, 1,193, 0, 1, 0, 5, 1, 0, 0, 6, 65, + 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5,128, 1, 0, 26, 0, 0, 0, 22, 0, + 2,128, 5, 64, 0, 0, 65,192, 1, 0,133,128, 1, 0,134,192, 64, 1,193, 0, + 1, 0, 5,129, 1, 0, 6, 65, 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5, 64, + 0, 0, 65, 0, 2, 0,133, 64, 2, 0,134,192, 64, 1,193, 0, 1, 0, 5, 65, + 2, 0, 6, 65, 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65,128, + 2, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65,192, 2, 0, 28, 64, 0, 1, 5, 64, + 0, 0, 65, 0, 3, 0,133, 64, 2, 0,134, 64, 67, 1,193,128, 3, 0,156,128, + 0, 1, 85,128,128, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65,192, 3, 0,133, 64, + 2, 0,134, 64, 67, 1,193, 0, 4, 0,156,128, 0, 1, 85,128,128, 0, 28, 64, + 0, 1, 5, 64, 2, 0, 6, 64, 67, 0, 65, 64, 4, 0, 28,128, 0, 1, 26, 0, + 0, 0, 22,192, 0,128, 69, 64, 0, 0,129,128, 4, 0,192, 0, 0, 0, 92, 64, +128, 1, 69, 64, 0, 0,129,192, 4, 0,197, 64, 2, 0,198, 64,195, 1, 1, 1, + 5, 0,220,128, 0, 1,149,192, 0, 1, 92, 64, 0, 1, 69, 64, 0, 0,129, 64, + 5, 0,197, 64, 2, 0,198, 64,195, 1, 1,129, 5, 0,220,128, 0, 1,149,192, + 0, 1, 92, 64, 0, 1, 69, 64, 2, 0, 70,192,197, 0, 90, 0, 0, 0, 22, 64, + 1,128, 69, 64, 0, 0,129, 0, 6, 0,197, 64, 2, 0,198,192,197, 1,149,192, + 0, 1, 92, 64, 0, 1, 69, 64, 2, 0, 70, 64,198, 0, 90, 0, 0, 0, 22, 64, + 1,128, 69, 64, 0, 0,129,128, 6, 0,197, 64, 2, 0,198, 64,198, 1,149,192, + 0, 1, 92, 64, 0, 1, 69, 64, 2, 0, 70,192,198, 0, 90, 0, 0, 0, 22, 64, + 1,128, 69, 64, 0, 0,129, 0, 7, 0,197, 64, 2, 0,198,192,198, 1,149,192, + 0, 1, 92, 64, 0, 1, 30, 0,128, 0, 29, 0, 0, 0, 4, 3, 0, 0, 0, 0, + 0, 0, 0,105,109, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116, + 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 73, 77, 32, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 95, 86, 69, 82, 83, 73, 79, 78, 0, 4, 3, 0, 0, 0, 0, 0, 0, + 0, 32, 32, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 95, 67, 79, 80, 89, 82, 73, + 71, 72, 84, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 99,100, 0, 4, 4, 0, 0, + 0, 0, 0, 0, 0, 67, 68, 32, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 73, 85, + 80, 32, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 73, 85, 80, 32, 73, +110,102,111, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83,121,115,116,101, +109, 58, 32, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 71,101,116, 71,108,111, 98, + 97,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 89, 83, 84, 69, 77, 0, 4, + 19, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83,121,115,116,101,109, 32, 86,101,114, +115,105,111,110, 58, 32, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 83, 89, 83, 84, + 69, 77, 86, 69, 82, 83, 73, 79, 78, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 77, + 79, 84, 73, 70, 86, 69, 82, 83, 73, 79, 78, 0, 4, 18, 0, 0, 0, 0, 0, 0, + 0, 32, 32, 77,111,116,105,102, 32, 86,101,114,115,105,111,110, 58, 32, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83, 99,114,101,101,110, 32, 83,105,122, +101, 58, 32, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 83, 67, 82, 69, 69, 78, 83, + 73, 90, 69, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83, 99,114,101,101, +110, 32, 68,101,112,116,104, 58, 32, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 83, + 67, 82, 69, 69, 78, 68, 69, 80, 84, 72, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, + 71, 76, 95, 86, 69, 78, 68, 79, 82, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 32, + 32, 79,112,101,110, 71, 76, 32, 86,101,110,100,111,114, 58, 32, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0, 71, 76, 95, 82, 69, 78, 68, 69, 82, 69, 82, 0, 4, 20, + 0, 0, 0, 0, 0, 0, 0, 32, 32, 79,112,101,110, 71, 76, 32, 82,101,110,100, +101,114,101,114, 58, 32, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 71, 76, 95, 86, + 69, 82, 83, 73, 79, 78, 0, 4, 19, 0, 0, 0, 0, 0, 0, 0, 32, 32, 79,112, +101,110, 71, 76, 32, 86,101,114,115,105,111,110, 58, 32, 0, 0, 0, 0, 0,112, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, + 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, + 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, + 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, + 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, + 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, + 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, + 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, + 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, + 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, + 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0,109,111,116, 0, 59, 0, 0, 0,111, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 0, 3, 0, 7, 9, + 0, 0, 0,197, 0, 0, 0,198, 64,192, 1,198,128,192, 1, 0, 1,128, 0, 65, + 1, 1, 0,128, 1, 0, 1, 21,129, 1, 2,201, 0,129,129, 30, 0,128, 0, 5, + 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 8, 0, 0, + 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0,108, 98,108, 80,111,115,105,116,105,111,110, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,116,105,116,108,101, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 58, 0, + 0, 0, 0, 0, 9, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, + 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, + 48, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,115,101,108,102, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,108,105,110, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 99,111,108, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 58, 0, 0, 0, 70, 0, 0, 0, 0, 1, 0, 4, 39, 0, 0, 0, 69, 0, 0, + 0, 70, 64,192, 0, 70,128,192, 0, 23,192,192, 0, 22, 64, 1,128, 69, 0, 0, + 0, 70, 64,192, 0, 70, 0,193, 0, 75, 64,193, 0, 92, 64, 0, 1, 22,128, 6, +128, 69,192, 1, 0, 70, 0,194, 0,133, 0, 0, 0,134, 64, 64, 1,134,128, 64, + 1,193, 64, 2, 0, 92,128,128, 1, 71,128, 1, 0, 69,128, 1, 0, 90, 0, 0, + 0, 22,128, 2,128, 69,128, 1, 0, 75,128,194, 0,197, 0, 0, 0,198, 64,192, + 1,198,192,194, 1,198, 0,195, 1, 92, 64,128, 1, 69,128, 1, 0, 75, 64,195, + 0, 92, 64, 0, 1, 22, 0, 1,128, 69,128, 3, 0,129,192, 3, 0,197, 0, 4, + 0,149,192, 0, 1, 92, 64, 0, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 4, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99, +111,110,115,111,108,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,108, 97,115,116, +102,105,108,101,110, 97,109,101, 0, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 98, +117,116, 83, 97,118,101, 97,115, 70,105,108,101, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 97, 99,116,105,111,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,110,101, +119,102,105,108,101, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,111, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, + 0,119, 43, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,119,114,105,116,101, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,109,108, 67,111,100,101, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,118, 97,108,117,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108,111,115,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, 0, + 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110,110,111,116, 32, 83, 97,118,101, + 32,102,105,108,101, 32, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,105,108,101, +110, 97,109,101, 0, 0, 0, 0, 0, 39, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, + 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, + 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 62, 0, 0, + 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, + 0, 62, 0, 0, 0, 62, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, + 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, + 0, 64, 0, 0, 0, 64, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, + 0, 65, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, + 0, 67, 0, 0, 0, 70, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0,115,101,108,102, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 92, 0, 0, 0, 0, 1, 0, 7, 65, 0, + 0, 0, 69, 0, 0, 0, 70, 64,192, 0,138, 64, 1, 0,137,192, 64,129,137, 64, + 65,130,137,192, 65,131,137, 64, 66,132,197,192, 2, 0,137,192, 0,133, 92,128, + 0, 1,139, 0,195, 0, 5, 1, 0, 0, 6, 65, 67, 2, 69, 1, 0, 0, 70, 65, +195, 2,156, 64, 0, 2,134,128,195, 0,197, 0, 0, 0,198,192,195, 1, 6, 65, +196, 0,201, 0, 1,136,197, 0, 0, 0,198,192,195, 1,198,128,196, 1, 5, 1, + 0, 0, 6,193, 67, 2, 6, 1, 68, 2,201, 0, 1,130,203,192,196, 0,220, 64, + 0, 1, 87, 0, 69, 1, 22,192, 7,128,197, 0, 0, 0,198,192,195, 1,198, 0, +196, 1, 23, 64,197, 1, 22, 0, 1,128,197,128, 5, 0, 1,193, 5, 0, 69, 1, + 6, 0, 21, 65, 1, 2,220, 64, 0, 1,197, 64, 6, 0,198,128,198, 1, 5, 1, + 0, 0, 6,193, 67, 2, 6, 1, 68, 2, 65,193, 6, 0,220,128,128, 1,218, 0, + 0, 0, 22, 64, 2,128, 11, 1,199, 1,133, 1, 0, 0,134,193, 67, 3,134, 65, + 71, 3,134, 65, 68, 3, 28, 65,128, 1, 11,129,199, 1,128, 1,128, 1, 28, 65, +128, 1, 22,128, 0,128, 5,129, 5, 0, 65,193, 7, 0, 28, 65, 0, 1, 30, 0, +128, 0, 32, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,100,108,103, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0,100,105, 97,108,111,103,116,121,112,101, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0, 83, 65, 86, 69, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116, +105,116,108,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 83, 97,118,101, 32, 70, +105,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,105,108,116,101,114, 0, + 4, 4, 0, 0, 0, 0, 0, 0, 0, 42, 46, 42, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0,102,105,108,116,101,114,105,110,102,111, 0, 4, 10, 0, 0, 0, 0, 0, + 0, 0, 65,108,108, 32,102,105,108,101,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 97,108,108,111,119,110,101,119, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,121, +101,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 76, 69, 70, 84, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,115,116, 97,116,117,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110, +115,111,108,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,108, 97,115,116,102,105, +108,101,110, 97,109,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117, +101, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,108, 98,108, 70,105,108,101, 78, 97, +109,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, + 4, 3, 0, 0, 0, 0, 0, 0, 0, 45, 49, 0, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0,101,114,114,111,114, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110, +110,111,116, 32, 83, 97,118,101, 32,102,105,108,101, 32, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0,102,105,108,101,110, 97,109,101, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,105,111, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,119, 43, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +119,114,105,116,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109,108, 67,111,100, +101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99,108,111,115,101, 0, 4, 17, 0, + 0, 0, 0, 0, 0, 0, 67, 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105, +108,101, 0, 0, 0, 0, 0, 65, 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 73, + 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 74, 0, 0, 0, 74, + 0, 0, 0, 74, 0, 0, 0, 73, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 75, + 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 76, 0, 0, 0, 77, + 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 78, 0, 0, 0, 78, + 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, + 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 80, 0, 0, 0, 80, 0, 0, 0, 81, + 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 82, + 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 86, 0, 0, 0, 86, + 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 87, + 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 89, 0, 0, 0, 89, + 0, 0, 0, 89, 0, 0, 0, 92, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 64, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0,102,100, 0, 10, 0, 0, 0, 64, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,115,116, 97,116,117,115, 0, 17, 0, 0, 0, 64, 0, 0, 0, 8, 0, + 0, 0, 0, 0, 0, 0,110,101,119,102,105,108,101, 0, 49, 0, 0, 0, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, 0, 0,104, 0, + 0, 0, 0, 1, 0, 6, 34, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,128, 0, + 0, 0,193,128, 0, 0, 92,128,128, 1, 23,192,192, 0, 22, 64, 1,128,133, 0, + 1, 0,193, 64, 1, 0, 0, 1, 0, 0,213, 0,129, 1,156, 64, 0, 1, 22,192, + 4,128,133,128, 1, 0,134,192, 65, 1,134, 0, 66, 1,203,128,194, 0, 65,193, + 2, 0,220,128,128, 1,137,192,128,132,139, 0,195, 0, 0, 1,128, 0,156, 64, +128, 1,133,128, 1, 0,134,192, 65, 1,137, 0,128,134,133,128, 1, 0,134,192, + 65, 1,134,128, 67, 1,197,128, 1, 0,198,192,193, 1,198, 64,195, 1,137,192, +128,135, 30, 0,128, 0, 16, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105, +111, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,114, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,101,114,114, +111,114, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110,110,111,116, 32,108, +111, 97,100, 32,102,105,108,101, 32, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,109,108, 67,111,100,101, 0, 4, 6, 0, 0, + 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +114,101, 97,100, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 42, 97, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0, 99,108,111,115,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, + 0,108, 97,115,116,102,105,108,101,110, 97,109,101, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,108, 98,108, 70,105,108,101, 78, 97,109,101, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 34, 0, 0, 0, 95, 0, + 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 96, 0, + 0, 0, 96, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, + 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, + 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0,100, 0, + 0, 0,100, 0, 0, 0,100, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, + 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, + 0, 0,102, 0, 0, 0,102, 0, 0, 0,104, 0, 0, 0, 2, 0, 0, 0, 9, 0, + 0, 0, 0, 0, 0, 0,102,105,108,101,110, 97,109,101, 0, 0, 0, 0, 0, 33, + 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,110,101,119,102,105,108,101, 0, 5, + 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106, + 0, 0, 0,121, 0, 0, 0, 0, 1, 0, 7, 37, 0, 0, 0, 69, 0, 0, 0, 70, + 64,192, 0,138, 64, 1, 0,137,192, 64,129,137, 64, 65,130,137,192, 65,131,137, + 64, 66,132,137,192, 66,133, 92,128, 0, 1,139, 0,195, 0, 5, 1, 0, 0, 6, + 65, 67, 2, 69, 1, 0, 0, 70, 65,195, 2,156, 64, 0, 2,134,128,195, 0,198, +192,195, 0, 11, 1,196, 0, 28, 65, 0, 1, 87, 64, 68, 1, 22, 64, 0,128, 23, +128, 68, 1, 22,192, 1,128, 23,128, 68, 1, 22,128, 2,128, 5,193, 4, 0, 65, + 1, 5, 0,128, 1,128, 1, 85,129,129, 2, 28, 65, 0, 1, 22, 0, 1,128, 5, + 1, 0, 0, 6, 65, 69, 2, 6,129, 69, 2, 64, 1,128, 1, 28, 65, 0, 1, 30, + 0,128, 0, 23, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,100,108,103, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,100,105, 97,108,111,103,116,121,112,101, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0, 79, 80, 69, 78, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +116,105,116,108,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 76,111, 97,100, 32, + 70,105,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,105,108,116,101,114, + 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 42, 46, 42, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,102,105,108,116,101,114,105,110,102,111, 0, 4, 10, 0, 0, 0, 0, + 0, 0, 0, 65,108,108, 32, 70,105,108,101,115, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 97,108,108,111,119,110,101,119, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, + 78, 79, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 67, 69, 78, 84, 69, 82, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,115,116, 97,116,117,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,118, + 97,108,117,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111, +121, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 45, 49, 0, 4, 2, 0, 0, 0, 0, + 0, 0, 0, 49, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, 0, + 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110,110,111,116, 32,108,111, 97,100, + 32,102,105,108,101, 32, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110,115, +111,108,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 76,111, 97,100, 70,105,108, +101, 0, 0, 0, 0, 0, 37, 0, 0, 0,107, 0, 0, 0,107, 0, 0, 0,107, 0, + 0, 0,107, 0, 0, 0,107, 0, 0, 0,108, 0, 0, 0,108, 0, 0, 0,108, 0, + 0, 0,107, 0, 0, 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, + 0, 0,109, 0, 0, 0,109, 0, 0, 0,110, 0, 0, 0,111, 0, 0, 0,112, 0, + 0, 0,112, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, + 0, 0,115, 0, 0, 0,115, 0, 0, 0,116, 0, 0, 0,116, 0, 0, 0,116, 0, + 0, 0,116, 0, 0, 0,116, 0, 0, 0,117, 0, 0, 0,119, 0, 0, 0,119, 0, + 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,121, 0, 0, 0, 4, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 36, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,102,100, 0, 9, 0, 0, 0, 36, 0, + 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,117,115, 0, 16, 0, 0, + 0, 36, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,110, 97,109, +101, 0, 17, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,166, 0, 0, 0,170, 0, 0, 0, 0, 5, 0, 7, 8, 0, 0, 0, 23, 0, + 64, 1, 22, 0, 1,128, 69, 65, 0, 0, 70,129,192, 2, 70,193,192, 2,128, 1, +128, 0, 92, 65, 0, 1, 30, 0,128, 0, 4, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 8, 0, 0, + 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 76,111, 97,100, 70,105,108,101, 0, 0, 0, 0, 0, 8, 0, 0, 0,167, + 0, 0, 0,167, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, + 0, 0, 0,168, 0, 0, 0,170, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 7, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0,102,105,108,101,110, 97,109,101, 0, 0, 0, 0, 0, 7, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0,110,117,109, 0, 0, 0, 0, 0, 7, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 7, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0, 90, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, + 0, 3, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 15, 0, 0, + 0, 7, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 37, 0, 0, 0, 17, 0, 0, + 0, 41, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, + 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, + 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, + 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, + 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, + 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, + 0, 44, 0, 0, 0, 44, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, + 0, 48, 0, 0, 0, 46, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, + 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, + 0, 50, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, + 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 53, 0, 0, + 0, 52, 0, 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, + 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, + 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, + 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 58, 0, 0, + 0, 58, 0, 0, 0, 58, 0, 0, 0, 70, 0, 0, 0, 58, 0, 0, 0, 72, 0, 0, + 0, 72, 0, 0, 0, 72, 0, 0, 0, 92, 0, 0, 0, 72, 0, 0, 0, 94, 0, 0, + 0, 94, 0, 0, 0,104, 0, 0, 0, 94, 0, 0, 0,106, 0, 0, 0,106, 0, 0, + 0,106, 0, 0, 0,121, 0, 0, 0,106, 0, 0, 0,123, 0, 0, 0,123, 0, 0, + 0,123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,127, 0, 0, 0,127, 0, 0, + 0,127, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,129, 0, 0, + 0,129, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0,130, 0, 0, 0,130, 0, 0, + 0,125, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0,131, 0, 0, + 0,131, 0, 0, 0,131, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, + 0,133, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,134, 0, 0, 0,134, 0, 0, + 0,131, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,125, 0, 0, 0,135, 0, 0, + 0,135, 0, 0, 0,125, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, + 0,137, 0, 0, 0,124, 0, 0, 0,137, 0, 0, 0,141, 0, 0, 0,141, 0, 0, + 0,141, 0, 0, 0,141, 0, 0, 0,141, 0, 0, 0,143, 0, 0, 0,143, 0, 0, + 0,143, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,147, 0, 0, + 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, + 0,148, 0, 0, 0,146, 0, 0, 0,148, 0, 0, 0,149, 0, 0, 0,144, 0, 0, + 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, + 0,150, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, + 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, + 0,153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, + 0,153, 0, 0, 0,154, 0, 0, 0,151, 0, 0, 0,154, 0, 0, 0,154, 0, 0, + 0,150, 0, 0, 0,155, 0, 0, 0,142, 0, 0, 0,155, 0, 0, 0,159, 0, 0, + 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, + 0,159, 0, 0, 0,159, 0, 0, 0,160, 0, 0, 0,161, 0, 0, 0,161, 0, 0, + 0,161, 0, 0, 0,161, 0, 0, 0,162, 0, 0, 0,163, 0, 0, 0,163, 0, 0, + 0,163, 0, 0, 0,163, 0, 0, 0,164, 0, 0, 0,164, 0, 0, 0,159, 0, 0, + 0,164, 0, 0, 0,166, 0, 0, 0,166, 0, 0, 0,166, 0, 0, 0,170, 0, 0, + 0,166, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, + 0,174, 0, 0, 0,176, 0, 0, 0,176, 0, 0, 0,176, 0, 0, 0,178, 0, 0, + 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,179, 0, 0, + 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,180, 0, 0, + 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,181, 0, 0, + 0,181, 0, 0, 0,181, 0, 0, 0,183, 0, 0, 0,183, 0, 0, 0,183, 0, 0, + 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, + 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, + 0,187, 0, 0, 0,184, 0, 0, 0,188, 0, 0, 0,182, 0, 0, 0,189, 0, 0, + 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,190, 0, 0, + 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, + 0,190, 0, 0, 0,191, 0, 0, 0,191, 0, 0, 0,192, 0, 0, 0,177, 0, 0, + 0,193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,194, 0, 0, + 0,175, 0, 0, 0,194, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,198, 0, 0, + 0,198, 0, 0, 0,198, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, + 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,201, 0, 0, 0,201, 0, 0, + 0,201, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,203, 0, 0, + 0,203, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, + 0,204, 0, 0, 0,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/console5_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srcconsole/loh/console5_le64.loh b/iup/srcconsole/loh/console5_le64.loh new file mode 100755 index 0000000..083405d --- /dev/null +++ b/iup/srcconsole/loh/console5_le64.loh @@ -0,0 +1,524 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/console5_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/console5_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,110,115,111,108,101, 53, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 15, 90, 1, 0, 0, 5, 0, 0, 0, 65, 64, 0, 0, 28, 64, + 0, 1, 5,128, 0, 0, 74, 0, 0, 0, 9, 64,128,129, 5,128, 0, 0, 6,192, + 64, 0,100, 0, 0, 0, 9, 64, 0,130, 5,128, 0, 0, 6,192, 64, 0,100, 64, + 0, 0, 9, 64,128,130, 5,128, 0, 0, 6,192, 64, 0, 9,192, 65,131, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 64,194, 0,138,192, 0, 0,137,192, + 66,133,137, 64, 67,134,137,192, 67,135, 92,128, 0, 1, 9, 64, 0,132, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 64,196, 0,138,128, 0, 0,137,192, + 68,137,137, 0, 69,134, 92,128, 0, 1, 9, 64, 0,136, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70, 64,196, 0,138,192, 0, 0,137,128, 69,137,137, 0, + 69,134,137,192, 69,133, 92,128, 0, 1, 9, 64,128,138, 5,128, 0, 0, 6,192, + 64, 0, 6, 0, 66, 0,100,128, 0, 0, 9, 64, 0,140, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70,128,198, 0,138,192, 0, 0,137,192, 70,134,137, 0, + 71,137,137,128,199,142, 92,128, 0, 1, 9, 64,128,140, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70,128,198, 0,138,192, 0, 0,137,192, 70,134,137, 0, + 72,137,137, 64,200,142, 92,128, 0, 1, 9, 64,128,143, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70,128,198, 0,138,128, 0, 0,137,192, 70,134,137,192, + 72,137, 92,128, 0, 1, 9, 64, 0,145, 5,128, 0, 0, 6,192, 64, 0, 69,128, + 0, 0, 70,128,198, 0,138,128, 0, 0,137,192, 70,134,137, 64, 73,137, 92,128, + 0, 1, 9, 64, 0,146, 5,128, 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70,128, +198, 0,138,128, 0, 0,137,192, 70,134,137,192, 73,137, 92,128, 0, 1, 9, 64, + 0,147, 5,128, 0, 0, 6,192, 64, 0, 6,128, 73, 0,100,192, 0, 0, 9, 64, +128,142, 5,128, 0, 0, 6,192, 64, 0, 6, 0, 73, 0,100, 0, 1, 0, 9, 64, +128,142, 5,128, 0, 0, 6,192, 64, 0,100, 64, 1, 0, 9, 64, 0,148, 5,128, + 0, 0, 6,192, 64, 0, 6,128, 72, 0,100,128, 1, 0, 9, 64,128,142, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70,128,202, 0,138,192,128, 0,197,128, + 0, 0,198,192,202, 1, 10, 65,128, 0, 69,129, 0, 0, 70, 1,203, 2,138, 65, + 0, 1,197,129, 0, 0,198,129,202, 3, 10,130,128, 2, 69,130, 0, 0, 70,194, +192, 4, 70,130,200, 4,133,130, 0, 0,134,194, 64, 5,134,130, 73, 5,197,130, + 0, 0,198,194,192, 5,198, 2,201, 5, 5,131, 0, 0, 6,195, 64, 6, 6,195, + 71, 6, 69,131, 0, 0, 70,195,192, 6, 70, 67,198, 6, 9,130,203,150, 9, 2, +204,151, 34, 66,128, 2,220,129, 0, 1, 5,130, 0, 0, 6,130, 74, 4, 74, 66, +128, 1,133,130, 0, 0,134,194, 64, 5,134, 66, 69, 5,197,130, 0, 0,198,194, +192, 5,198, 2,194, 5, 5,131, 0, 0, 6,195, 64, 6, 6, 3, 68, 6, 73,130, +204,152, 98, 66,128, 1, 28,130, 0, 1,137,193,204,152,162, 65, 0, 1, 92,129, + 0, 1, 9, 1, 77,137, 34, 65,128, 0,220,128, 0, 1,137, 64,205,152,137,128, +205,150,137,192,205,151,162, 64,128, 0, 92,128, 0, 1, 9, 64,128,148, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 64,206, 0,138, 0,128, 0,197,128, + 0, 0,198,128,206, 1, 10, 65,128, 0, 69,129, 0, 0, 70, 65,206, 2,138, 1, + 0, 0,197,129, 0, 0,198,193,206, 3, 10,130, 0, 0, 9, 2, 79,137, 9, 66, +207,142,220, 1, 0, 1,162, 65, 0, 0, 92,129, 0, 1, 9,129, 79,137, 34, 65, +128, 0,220,128, 0, 1, 5,129, 0, 0, 6,129, 78, 2, 74, 65,128, 0,133,129, + 0, 0,134, 65, 78, 3,202, 1,128, 0, 5,130, 0, 0, 6,194, 78, 4, 74,130, + 0, 0, 73,194, 79,137,133,130, 0, 0,134,194, 64, 5,134, 66, 65, 5, 73,130, +130,142, 28,130, 0, 1, 69,130, 0, 0, 70,194,206, 4,138,130, 0, 0,137, 2, + 80,137,137, 66,208,142, 92, 2, 0, 1,226, 65, 0, 0,156,129, 0, 1, 73,129, + 80,137, 98, 65,128, 0, 28, 1, 0, 1,162, 64, 0, 0, 92,128, 0, 1, 9, 64, + 0,156, 5,128, 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 0,209, 0,138, 64, +129, 0,197,128, 0, 0,198,192,192, 1,198, 64,202, 1,137, 64, 81,137, 5,129, + 0, 0, 6,193, 64, 2, 6, 1, 78, 2,137, 0,129,156,137,192, 66,163, 5,129, + 0, 0, 6,193, 64, 2, 6, 65, 70, 2,137, 0,129,163,137, 64, 79,164,162, 64, +128, 0, 92,128, 0, 1, 9, 64,128,161, 5,128, 0, 0, 6,192, 64, 0, 6,192, + 80, 0,100,192, 1, 0, 9, 64,128,164, 5,128, 0, 0, 6,192, 64, 0, 69,128, + 0, 0, 70, 0,209, 0,138, 0,129, 0,197,128, 0, 0,198,128,202, 1, 10,129, + 0, 3, 69,129, 0, 0, 70, 65,196, 2,138, 65, 0, 0,137, 65, 81,137, 92,129, + 0, 1,133,129, 0, 0,134,193, 82, 3,202, 65, 0, 0,201,193, 77,134,156,129, + 0, 1,197,129, 0, 0,198,193,210, 3, 10, 66, 0, 0, 9,194, 77,134,220,129, + 0, 1, 5,130, 0, 0, 6,194, 74, 4, 74, 2, 0, 0,133,130, 0, 0,134,130, + 74, 5,202, 2,128, 0, 5,131, 0, 0, 6, 67, 68, 6, 74, 67, 0, 0, 73, 3, + 83,137, 28,131, 0, 1, 69,131, 0, 0, 70, 67,196, 6,138, 67, 0, 0,137, 67, + 83,137, 92, 3, 0, 1,226, 66, 0, 0,156, 2, 0, 1, 98, 66, 0, 0, 28,130, + 0, 1, 69,130, 0, 0, 70,194,210, 4,138, 66, 0, 0,137,194, 77,134, 92,130, + 0, 1,133,130, 0, 0,134,130, 70, 5,202,194, 0, 0,201,130, 83,137,201, 66, +207,142,201,194, 83,134,156,130, 0, 1, 9, 1,212,150, 9, 65,205,152, 34, 65, + 0, 3,220,128, 0, 1,137,128,212,168,137,128,212,169,137,128, 84,170,137, 64, + 85,137,162, 64,128, 0, 92,128, 0, 1, 9, 64, 0,165, 5,128, 0, 0, 6,192, + 64, 0, 6,192, 80, 0, 11,128, 85, 0, 28, 64, 0, 1, 5,128, 0, 0, 6,192, + 85, 0, 69,128, 0, 0, 70,192,192, 0, 70, 0,194, 0, 28, 64, 0, 1, 5,128, + 0, 0, 6, 0, 86, 0, 28, 64,128, 0, 5,128, 0, 0, 6,192, 64, 0, 6,192, + 80, 0, 11, 64, 86, 0, 28, 64, 0, 1, 5,128, 0, 0, 6,192, 64, 0, 6,128, + 82, 0, 11, 64, 86, 0, 28, 64, 0, 1, 30, 0,128, 0, 90, 0, 0, 0, 4, 8, + 0, 0, 0, 0, 0, 0, 0,114,101,113,117,105,114,101, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,105,117,112,108,117, 97, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116,116, 97, 98,108,101, + 0, 4, 19, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116, 95,118,101,114,115, +105,111,110, 95,105,110,102,111, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,108, 97, +115,116,102,105,108,101,110, 97,109,101, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,109,108, 67,111,100,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,109,117,108, +116,105,108,105,110,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,101,120,112, 97, +110,100, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 89, 69, 83, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0,115,105,122,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 50, + 48, 48,120, 49, 50, 48, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,102,111,110,116, + 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, + 82, 77, 65, 76, 95, 49, 48, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,108, 98,108, + 80,111,115,105,116,105,111,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,108, 97, + 98,101,108, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0, 48, 58, 48, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 53, 48,120, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,108, 98,108, 70,105,108, +101, 78, 97,109,101, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,114,101,116, 95, 99, 98, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0, 98,117,116, 69,120,101, 99,117,116,101, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 98,117,116,116,111,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 53, + 48,120, 49, 53, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 69,120,101, 99,117,116, +101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 39, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 46,100,111,115,116,114,105,110,103, 40, +105,117,112, 46, 99,111,110,115,111,108,101, 46,109,108, 67,111,100,101, 46,118, + 97,108,117,101, 41, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 98,117,116, 67,108, +101, 97,114, 67,111,109,109, 97,110,100,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, + 0, 67,108,101, 97,114, 0, 4, 96, 0, 0, 0, 0, 0, 0, 0,105,117,112, 46, + 99,111,110,115,111,108,101, 46,109,108, 67,111,100,101, 46,118, 97,108,117,101, + 61, 39, 39, 32, 32,105,117,112, 46, 99,111,110,115,111,108,101, 46,108, 98,108, + 70,105,108,101, 78, 97,109,101, 46,116,105,116,108,101, 32, 61, 32, 39, 39, 32, + 32,105,117,112, 46, 99,111,110,115,111,108,101, 46,108, 97,115,116,102,105,108, +101,110, 97,109,101, 32, 61, 32,110,105,108, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0, 98,117,116, 76,111, 97,100, 70,105,108,101, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0, 76,111, 97,100, 46, 46, 46, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 98, +117,116, 83, 97,118,101, 97,115, 70,105,108,101, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0, 83, 97,118,101, 32, 65,115, 46, 46, 46, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0, 98,117,116, 83, 97,118,101, 70,105,108,101, 0, 4, 5, 0, 0, 0, 0, + 0, 0, 0, 83, 97,118,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 76,111, 97, +100, 70,105,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,118, 98,120, 67,111, +110,115,111,108,101, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,118, 98,111,120, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,102,114, 97,109,101, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,104, 98,111,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97, +114,103,105,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 48,120, 48, 0, 4, 4, + 0, 0, 0, 0, 0, 0, 0,103, 97,112, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, + 49, 48, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 97,108,105,103,110,109,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65, 82, 73, 71, 72, 84, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 65, 84, 79, 80, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 67,111,109,109, 97,110,100,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 65, + 67, 69, 78, 84, 69, 82, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 53,120, 53, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0, 53, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, +109,110,117, 77, 97,105,110, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,109,101,110, +117, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115,117, 98,109,101,110,117, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,105,116,101,109, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 69,120,105,116, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0,114,101,116,117, +114,110, 32,105,117,112, 46, 67, 76, 79, 83, 69, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 70,105,108,101, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,105,110, +116, 32, 86,101,114,115,105,111,110, 32, 73,110,102,111, 46, 46, 46, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 65, 98,111,117,116, 46, 46, 46, 0, 4, 51, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 46, 99,111,110,115,111,108,101, 46,100,108,103, + 65, 98,111,117,116, 58,112,111,112,117,112, 40,105,117,112, 46, 67, 69, 78, 84, + 69, 82, 44, 32,105,117,112, 46, 67, 69, 78, 84, 69, 82, 41, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0, 72,101,108,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100, +108,103, 77, 97,105,110, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108, +111,103, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, 73,117,112, 76,117, 97, 32, 67, +111,110,115,111,108,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,100,114, 97,103, +100,114,111,112, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,100,101,102, 97,117,108, +116,101,110,116,101,114, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,108,111,115, +101, 95, 99, 98, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,100,114,111,112,102,105, +108,101,115, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,100,108,103, 65, + 98,111,117,116, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,102,105,108,108, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0, 84,101, 99,103,114, 97,102, 47, 80, 85, 67, 45, + 82,105,111, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0,105,117,112, 64,116,101, 99, +103,114, 97,102, 46,112,117, 99, 45,114,105,111, 46, 98,114, 0, 4, 3, 0, 0, + 0, 0, 0, 0, 0, 79, 75, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 53, 48, 88, + 50, 48, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 49, 48,120, 49, 48, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,109, 97,120, 98,111,120, 0, 4, 3, 0, 0, 0, 0, + 0, 0, 0, 78, 79, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109,105,110, 98,111, +120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114,101,115,105,122,101, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0, 65, 98,111,117,116, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0,115,104,111,119, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 70, +111, 99,117,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 97,105,110, 76,111, +111,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, + 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 15, 0, 0, 0, + 0, 1, 0, 8, 30, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0,195, 0,128, 1, + 92,192,128, 1,197, 64, 0, 0, 1,129, 0, 0,220, 64, 0, 1, 90, 0, 0, 0, + 22, 0, 4,128,197, 64, 0, 0, 5,193, 0, 0, 64, 1,128, 0, 28,129, 0, 1, + 65, 1, 1, 0,133,193, 0, 0,192, 1, 0, 1,156,129, 0, 1, 21,129, 1, 2, +220, 64, 0, 1,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,220,192,128, 1, +128, 0, 0, 2, 64, 0,128, 1, 22, 0,251,127,197, 64, 0, 0, 1, 65, 1, 0, +220, 64, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,101,120,116, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116, + 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 45, 45,112,114,105,110,116,116, 97, 98, +108,101, 32, 83,116, 97,114,116, 45, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +116,111,115,116,114,105,110,103, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 61, 0, + 4, 19, 0, 0, 0, 0, 0, 0, 0, 45, 45,112,114,105,110,116,116, 97, 98,108, +101, 32, 69,110,100, 45, 45, 0, 0, 0, 0, 0, 30, 0, 0, 0, 8, 0, 0, 0, + 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, + 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, + 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0, 0, 29, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0,110, 0, 4, 0, 0, 0, 29, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,118, 0, 4, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 5,112, 0, + 0, 0, 5, 0, 0, 0, 26, 0, 0, 0, 22, 0, 2,128, 5, 64, 0, 0, 65,128, + 0, 0,133, 0, 0, 0,134,192, 64, 1,193, 0, 1, 0, 5, 1, 0, 0, 6, 65, + 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5,128, 1, 0, 26, 0, 0, 0, 22, 0, + 2,128, 5, 64, 0, 0, 65,192, 1, 0,133,128, 1, 0,134,192, 64, 1,193, 0, + 1, 0, 5,129, 1, 0, 6, 65, 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5, 64, + 0, 0, 65, 0, 2, 0,133, 64, 2, 0,134,192, 64, 1,193, 0, 1, 0, 5, 65, + 2, 0, 6, 65, 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65,128, + 2, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65,192, 2, 0, 28, 64, 0, 1, 5, 64, + 0, 0, 65, 0, 3, 0,133, 64, 2, 0,134, 64, 67, 1,193,128, 3, 0,156,128, + 0, 1, 85,128,128, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65,192, 3, 0,133, 64, + 2, 0,134, 64, 67, 1,193, 0, 4, 0,156,128, 0, 1, 85,128,128, 0, 28, 64, + 0, 1, 5, 64, 2, 0, 6, 64, 67, 0, 65, 64, 4, 0, 28,128, 0, 1, 26, 0, + 0, 0, 22,192, 0,128, 69, 64, 0, 0,129,128, 4, 0,192, 0, 0, 0, 92, 64, +128, 1, 69, 64, 0, 0,129,192, 4, 0,197, 64, 2, 0,198, 64,195, 1, 1, 1, + 5, 0,220,128, 0, 1,149,192, 0, 1, 92, 64, 0, 1, 69, 64, 0, 0,129, 64, + 5, 0,197, 64, 2, 0,198, 64,195, 1, 1,129, 5, 0,220,128, 0, 1,149,192, + 0, 1, 92, 64, 0, 1, 69, 64, 2, 0, 70,192,197, 0, 90, 0, 0, 0, 22, 64, + 1,128, 69, 64, 0, 0,129, 0, 6, 0,197, 64, 2, 0,198,192,197, 1,149,192, + 0, 1, 92, 64, 0, 1, 69, 64, 2, 0, 70, 64,198, 0, 90, 0, 0, 0, 22, 64, + 1,128, 69, 64, 0, 0,129,128, 6, 0,197, 64, 2, 0,198, 64,198, 1,149,192, + 0, 1, 92, 64, 0, 1, 69, 64, 2, 0, 70,192,198, 0, 90, 0, 0, 0, 22, 64, + 1,128, 69, 64, 0, 0,129, 0, 7, 0,197, 64, 2, 0,198,192,198, 1,149,192, + 0, 1, 92, 64, 0, 1, 30, 0,128, 0, 29, 0, 0, 0, 4, 3, 0, 0, 0, 0, + 0, 0, 0,105,109, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116, + 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 73, 77, 32, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 95, 86, 69, 82, 83, 73, 79, 78, 0, 4, 3, 0, 0, 0, 0, 0, 0, + 0, 32, 32, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 95, 67, 79, 80, 89, 82, 73, + 71, 72, 84, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 99,100, 0, 4, 4, 0, 0, + 0, 0, 0, 0, 0, 67, 68, 32, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 73, 85, + 80, 32, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 73, 85, 80, 32, 73, +110,102,111, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83,121,115,116,101, +109, 58, 32, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 71,101,116, 71,108,111, 98, + 97,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 89, 83, 84, 69, 77, 0, 4, + 19, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83,121,115,116,101,109, 32, 86,101,114, +115,105,111,110, 58, 32, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 83, 89, 83, 84, + 69, 77, 86, 69, 82, 83, 73, 79, 78, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 77, + 79, 84, 73, 70, 86, 69, 82, 83, 73, 79, 78, 0, 4, 18, 0, 0, 0, 0, 0, 0, + 0, 32, 32, 77,111,116,105,102, 32, 86,101,114,115,105,111,110, 58, 32, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83, 99,114,101,101,110, 32, 83,105,122, +101, 58, 32, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 83, 67, 82, 69, 69, 78, 83, + 73, 90, 69, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83, 99,114,101,101, +110, 32, 68,101,112,116,104, 58, 32, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 83, + 67, 82, 69, 69, 78, 68, 69, 80, 84, 72, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, + 71, 76, 95, 86, 69, 78, 68, 79, 82, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 32, + 32, 79,112,101,110, 71, 76, 32, 86,101,110,100,111,114, 58, 32, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0, 71, 76, 95, 82, 69, 78, 68, 69, 82, 69, 82, 0, 4, 20, + 0, 0, 0, 0, 0, 0, 0, 32, 32, 79,112,101,110, 71, 76, 32, 82,101,110,100, +101,114,101,114, 58, 32, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 71, 76, 95, 86, + 69, 82, 83, 73, 79, 78, 0, 4, 19, 0, 0, 0, 0, 0, 0, 0, 32, 32, 79,112, +101,110, 71, 76, 32, 86,101,114,115,105,111,110, 58, 32, 0, 0, 0, 0, 0,112, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, + 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, + 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, + 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, + 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, + 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, + 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, + 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, + 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, + 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, + 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0,109,111,116, 0, 59, 0, 0, 0,111, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 0, 3, 0, 7, 9, + 0, 0, 0,197, 0, 0, 0,198, 64,192, 1,198,128,192, 1, 0, 1,128, 0, 65, + 1, 1, 0,128, 1, 0, 1, 21,129, 1, 2,201, 0,129,129, 30, 0,128, 0, 5, + 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 8, 0, 0, + 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0,108, 98,108, 80,111,115,105,116,105,111,110, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,116,105,116,108,101, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 58, 0, + 0, 0, 0, 0, 9, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, + 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, + 48, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,115,101,108,102, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,108,105,110, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 99,111,108, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 58, 0, 0, 0, 70, 0, 0, 0, 0, 1, 0, 4, 39, 0, 0, 0, 69, 0, 0, + 0, 70, 64,192, 0, 70,128,192, 0, 23,192,192, 0, 22, 64, 1,128, 69, 0, 0, + 0, 70, 64,192, 0, 70, 0,193, 0, 75, 64,193, 0, 92, 64, 0, 1, 22,128, 6, +128, 69,192, 1, 0, 70, 0,194, 0,133, 0, 0, 0,134, 64, 64, 1,134,128, 64, + 1,193, 64, 2, 0, 92,128,128, 1, 71,128, 1, 0, 69,128, 1, 0, 90, 0, 0, + 0, 22,128, 2,128, 69,128, 1, 0, 75,128,194, 0,197, 0, 0, 0,198, 64,192, + 1,198,192,194, 1,198, 0,195, 1, 92, 64,128, 1, 69,128, 1, 0, 75, 64,195, + 0, 92, 64, 0, 1, 22, 0, 1,128, 69,128, 3, 0,129,192, 3, 0,197, 0, 4, + 0,149,192, 0, 1, 92, 64, 0, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 4, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99, +111,110,115,111,108,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,108, 97,115,116, +102,105,108,101,110, 97,109,101, 0, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 98, +117,116, 83, 97,118,101, 97,115, 70,105,108,101, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 97, 99,116,105,111,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,110,101, +119,102,105,108,101, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,111, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, + 0,119, 43, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,119,114,105,116,101, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,109,108, 67,111,100,101, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,118, 97,108,117,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108,111,115,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, 0, + 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110,110,111,116, 32, 83, 97,118,101, + 32,102,105,108,101, 32, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,105,108,101, +110, 97,109,101, 0, 0, 0, 0, 0, 39, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, + 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, + 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 62, 0, 0, + 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, + 0, 62, 0, 0, 0, 62, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, + 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, + 0, 64, 0, 0, 0, 64, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, + 0, 65, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, + 0, 67, 0, 0, 0, 70, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0,115,101,108,102, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 92, 0, 0, 0, 0, 1, 0, 7, 65, 0, + 0, 0, 69, 0, 0, 0, 70, 64,192, 0,138, 64, 1, 0,137,192, 64,129,137, 64, + 65,130,137,192, 65,131,137, 64, 66,132,197,192, 2, 0,137,192, 0,133, 92,128, + 0, 1,139, 0,195, 0, 5, 1, 0, 0, 6, 65, 67, 2, 69, 1, 0, 0, 70, 65, +195, 2,156, 64, 0, 2,134,128,195, 0,197, 0, 0, 0,198,192,195, 1, 6, 65, +196, 0,201, 0, 1,136,197, 0, 0, 0,198,192,195, 1,198,128,196, 1, 5, 1, + 0, 0, 6,193, 67, 2, 6, 1, 68, 2,201, 0, 1,130,203,192,196, 0,220, 64, + 0, 1, 87, 0, 69, 1, 22,192, 7,128,197, 0, 0, 0,198,192,195, 1,198, 0, +196, 1, 23, 64,197, 1, 22, 0, 1,128,197,128, 5, 0, 1,193, 5, 0, 69, 1, + 6, 0, 21, 65, 1, 2,220, 64, 0, 1,197, 64, 6, 0,198,128,198, 1, 5, 1, + 0, 0, 6,193, 67, 2, 6, 1, 68, 2, 65,193, 6, 0,220,128,128, 1,218, 0, + 0, 0, 22, 64, 2,128, 11, 1,199, 1,133, 1, 0, 0,134,193, 67, 3,134, 65, + 71, 3,134, 65, 68, 3, 28, 65,128, 1, 11,129,199, 1,128, 1,128, 1, 28, 65, +128, 1, 22,128, 0,128, 5,129, 5, 0, 65,193, 7, 0, 28, 65, 0, 1, 30, 0, +128, 0, 32, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,100,108,103, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0,100,105, 97,108,111,103,116,121,112,101, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0, 83, 65, 86, 69, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116, +105,116,108,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 83, 97,118,101, 32, 70, +105,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,105,108,116,101,114, 0, + 4, 4, 0, 0, 0, 0, 0, 0, 0, 42, 46, 42, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0,102,105,108,116,101,114,105,110,102,111, 0, 4, 10, 0, 0, 0, 0, 0, + 0, 0, 65,108,108, 32,102,105,108,101,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 97,108,108,111,119,110,101,119, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,121, +101,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 76, 69, 70, 84, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,115,116, 97,116,117,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110, +115,111,108,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,108, 97,115,116,102,105, +108,101,110, 97,109,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117, +101, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,108, 98,108, 70,105,108,101, 78, 97, +109,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, + 4, 3, 0, 0, 0, 0, 0, 0, 0, 45, 49, 0, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0,101,114,114,111,114, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110, +110,111,116, 32, 83, 97,118,101, 32,102,105,108,101, 32, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0,102,105,108,101,110, 97,109,101, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,105,111, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,119, 43, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +119,114,105,116,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109,108, 67,111,100, +101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99,108,111,115,101, 0, 4, 17, 0, + 0, 0, 0, 0, 0, 0, 67, 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105, +108,101, 0, 0, 0, 0, 0, 65, 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 73, + 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 74, 0, 0, 0, 74, + 0, 0, 0, 74, 0, 0, 0, 73, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 75, + 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 76, 0, 0, 0, 77, + 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 78, 0, 0, 0, 78, + 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, + 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 80, 0, 0, 0, 80, 0, 0, 0, 81, + 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 82, + 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 86, 0, 0, 0, 86, + 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 87, + 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 89, 0, 0, 0, 89, + 0, 0, 0, 89, 0, 0, 0, 92, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 64, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0,102,100, 0, 10, 0, 0, 0, 64, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,115,116, 97,116,117,115, 0, 17, 0, 0, 0, 64, 0, 0, 0, 8, 0, + 0, 0, 0, 0, 0, 0,110,101,119,102,105,108,101, 0, 49, 0, 0, 0, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, 0, 0,104, 0, + 0, 0, 0, 1, 0, 6, 34, 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,128, 0, + 0, 0,193,128, 0, 0, 92,128,128, 1, 23,192,192, 0, 22, 64, 1,128,133, 0, + 1, 0,193, 64, 1, 0, 0, 1, 0, 0,213, 0,129, 1,156, 64, 0, 1, 22,192, + 4,128,133,128, 1, 0,134,192, 65, 1,134, 0, 66, 1,203,128,194, 0, 65,193, + 2, 0,220,128,128, 1,137,192,128,132,139, 0,195, 0, 0, 1,128, 0,156, 64, +128, 1,133,128, 1, 0,134,192, 65, 1,137, 0,128,134,133,128, 1, 0,134,192, + 65, 1,134,128, 67, 1,197,128, 1, 0,198,192,193, 1,198, 64,195, 1,137,192, +128,135, 30, 0,128, 0, 16, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105, +111, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,114, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,101,114,114, +111,114, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110,110,111,116, 32,108, +111, 97,100, 32,102,105,108,101, 32, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,109,108, 67,111,100,101, 0, 4, 6, 0, 0, + 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +114,101, 97,100, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 42, 97, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0, 99,108,111,115,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, + 0,108, 97,115,116,102,105,108,101,110, 97,109,101, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,108, 98,108, 70,105,108,101, 78, 97,109,101, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 34, 0, 0, 0, 95, 0, + 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 96, 0, + 0, 0, 96, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, + 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, + 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0,100, 0, + 0, 0,100, 0, 0, 0,100, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, + 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, + 0, 0,102, 0, 0, 0,102, 0, 0, 0,104, 0, 0, 0, 2, 0, 0, 0, 9, 0, + 0, 0, 0, 0, 0, 0,102,105,108,101,110, 97,109,101, 0, 0, 0, 0, 0, 33, + 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,110,101,119,102,105,108,101, 0, 5, + 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106, + 0, 0, 0,121, 0, 0, 0, 0, 1, 0, 7, 37, 0, 0, 0, 69, 0, 0, 0, 70, + 64,192, 0,138, 64, 1, 0,137,192, 64,129,137, 64, 65,130,137,192, 65,131,137, + 64, 66,132,137,192, 66,133, 92,128, 0, 1,139, 0,195, 0, 5, 1, 0, 0, 6, + 65, 67, 2, 69, 1, 0, 0, 70, 65,195, 2,156, 64, 0, 2,134,128,195, 0,198, +192,195, 0, 11, 1,196, 0, 28, 65, 0, 1, 87, 64, 68, 1, 22, 64, 0,128, 23, +128, 68, 1, 22,192, 1,128, 23,128, 68, 1, 22,128, 2,128, 5,193, 4, 0, 65, + 1, 5, 0,128, 1,128, 1, 85,129,129, 2, 28, 65, 0, 1, 22, 0, 1,128, 5, + 1, 0, 0, 6, 65, 69, 2, 6,129, 69, 2, 64, 1,128, 1, 28, 65, 0, 1, 30, + 0,128, 0, 23, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,100,108,103, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,100,105, 97,108,111,103,116,121,112,101, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0, 79, 80, 69, 78, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +116,105,116,108,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 76,111, 97,100, 32, + 70,105,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,105,108,116,101,114, + 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 42, 46, 42, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,102,105,108,116,101,114,105,110,102,111, 0, 4, 10, 0, 0, 0, 0, + 0, 0, 0, 65,108,108, 32, 70,105,108,101,115, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 97,108,108,111,119,110,101,119, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, + 78, 79, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 67, 69, 78, 84, 69, 82, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,115,116, 97,116,117,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,118, + 97,108,117,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111, +121, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 45, 49, 0, 4, 2, 0, 0, 0, 0, + 0, 0, 0, 49, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, 0, + 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110,110,111,116, 32,108,111, 97,100, + 32,102,105,108,101, 32, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110,115, +111,108,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 76,111, 97,100, 70,105,108, +101, 0, 0, 0, 0, 0, 37, 0, 0, 0,107, 0, 0, 0,107, 0, 0, 0,107, 0, + 0, 0,107, 0, 0, 0,107, 0, 0, 0,108, 0, 0, 0,108, 0, 0, 0,108, 0, + 0, 0,107, 0, 0, 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, + 0, 0,109, 0, 0, 0,109, 0, 0, 0,110, 0, 0, 0,111, 0, 0, 0,112, 0, + 0, 0,112, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, + 0, 0,115, 0, 0, 0,115, 0, 0, 0,116, 0, 0, 0,116, 0, 0, 0,116, 0, + 0, 0,116, 0, 0, 0,116, 0, 0, 0,117, 0, 0, 0,119, 0, 0, 0,119, 0, + 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,121, 0, 0, 0, 4, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 36, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,102,100, 0, 9, 0, 0, 0, 36, 0, + 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,117,115, 0, 16, 0, 0, + 0, 36, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,110, 97,109, +101, 0, 17, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,166, 0, 0, 0,170, 0, 0, 0, 0, 5, 0, 7, 8, 0, 0, 0, 23, 0, + 64, 1, 22, 0, 1,128, 69, 65, 0, 0, 70,129,192, 2, 70,193,192, 2,128, 1, +128, 0, 92, 65, 0, 1, 30, 0,128, 0, 4, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 8, 0, 0, + 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 76,111, 97,100, 70,105,108,101, 0, 0, 0, 0, 0, 8, 0, 0, 0,167, + 0, 0, 0,167, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, + 0, 0, 0,168, 0, 0, 0,170, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 7, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0,102,105,108,101,110, 97,109,101, 0, 0, 0, 0, 0, 7, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0,110,117,109, 0, 0, 0, 0, 0, 7, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 7, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0, 90, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, + 0, 3, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 15, 0, 0, + 0, 7, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 37, 0, 0, 0, 17, 0, 0, + 0, 41, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, + 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, + 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, + 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, + 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, + 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, + 0, 44, 0, 0, 0, 44, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, + 0, 48, 0, 0, 0, 46, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, + 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, + 0, 50, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, + 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 53, 0, 0, + 0, 52, 0, 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, + 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, + 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, + 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 58, 0, 0, + 0, 58, 0, 0, 0, 58, 0, 0, 0, 70, 0, 0, 0, 58, 0, 0, 0, 72, 0, 0, + 0, 72, 0, 0, 0, 72, 0, 0, 0, 92, 0, 0, 0, 72, 0, 0, 0, 94, 0, 0, + 0, 94, 0, 0, 0,104, 0, 0, 0, 94, 0, 0, 0,106, 0, 0, 0,106, 0, 0, + 0,106, 0, 0, 0,121, 0, 0, 0,106, 0, 0, 0,123, 0, 0, 0,123, 0, 0, + 0,123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,127, 0, 0, 0,127, 0, 0, + 0,127, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,129, 0, 0, + 0,129, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0,130, 0, 0, 0,130, 0, 0, + 0,125, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0,131, 0, 0, + 0,131, 0, 0, 0,131, 0, 0, 0,132, 0, 0, 0,132, 0, 0, 0,132, 0, 0, + 0,133, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,134, 0, 0, 0,134, 0, 0, + 0,131, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,125, 0, 0, 0,135, 0, 0, + 0,135, 0, 0, 0,125, 0, 0, 0,136, 0, 0, 0,136, 0, 0, 0,136, 0, 0, + 0,137, 0, 0, 0,124, 0, 0, 0,137, 0, 0, 0,141, 0, 0, 0,141, 0, 0, + 0,141, 0, 0, 0,141, 0, 0, 0,141, 0, 0, 0,143, 0, 0, 0,143, 0, 0, + 0,143, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,147, 0, 0, + 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, + 0,148, 0, 0, 0,146, 0, 0, 0,148, 0, 0, 0,149, 0, 0, 0,144, 0, 0, + 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, + 0,150, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, + 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, + 0,153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, + 0,153, 0, 0, 0,154, 0, 0, 0,151, 0, 0, 0,154, 0, 0, 0,154, 0, 0, + 0,150, 0, 0, 0,155, 0, 0, 0,142, 0, 0, 0,155, 0, 0, 0,159, 0, 0, + 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, + 0,159, 0, 0, 0,159, 0, 0, 0,160, 0, 0, 0,161, 0, 0, 0,161, 0, 0, + 0,161, 0, 0, 0,161, 0, 0, 0,162, 0, 0, 0,163, 0, 0, 0,163, 0, 0, + 0,163, 0, 0, 0,163, 0, 0, 0,164, 0, 0, 0,164, 0, 0, 0,159, 0, 0, + 0,164, 0, 0, 0,166, 0, 0, 0,166, 0, 0, 0,166, 0, 0, 0,170, 0, 0, + 0,166, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, + 0,174, 0, 0, 0,176, 0, 0, 0,176, 0, 0, 0,176, 0, 0, 0,178, 0, 0, + 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,179, 0, 0, + 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,180, 0, 0, + 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,181, 0, 0, + 0,181, 0, 0, 0,181, 0, 0, 0,183, 0, 0, 0,183, 0, 0, 0,183, 0, 0, + 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, + 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, + 0,187, 0, 0, 0,184, 0, 0, 0,188, 0, 0, 0,182, 0, 0, 0,189, 0, 0, + 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,190, 0, 0, + 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, + 0,190, 0, 0, 0,191, 0, 0, 0,191, 0, 0, 0,192, 0, 0, 0,177, 0, 0, + 0,193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,194, 0, 0, + 0,175, 0, 0, 0,194, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,198, 0, 0, + 0,198, 0, 0, 0,198, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, + 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,201, 0, 0, 0,201, 0, 0, + 0,201, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,203, 0, 0, + 0,203, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, + 0,204, 0, 0, 0,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/console5_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srcconsole/loh/console5_le64w.loh b/iup/srcconsole/loh/console5_le64w.loh new file mode 100755 index 0000000..ff23f43 --- /dev/null +++ b/iup/srcconsole/loh/console5_le64w.loh @@ -0,0 +1,525 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/console5_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/console5_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,110,115,111,108,101, 53, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 15, 90, 1, 0, 0, 5, 0, 0, 0, 65, 64, 0, 0, 28, 64, + 0, 1, 5,128, 0, 0, 74, 0, 0, 0, 9, 64,128,129, 5,128, 0, 0, 6,192, + 64, 0,100, 0, 0, 0, 9, 64, 0,130, 5,128, 0, 0, 6,192, 64, 0,100, 64, + 0, 0, 9, 64,128,130, 5,128, 0, 0, 6,192, 64, 0, 9,192, 65,131, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 64,194, 0,138,192, 0, 0,137,192, + 66,133,137, 64, 67,134,137,192, 67,135, 92,128, 0, 1, 9, 64, 0,132, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 64,196, 0,138,128, 0, 0,137,192, + 68,137,137, 0, 69,134, 92,128, 0, 1, 9, 64, 0,136, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70, 64,196, 0,138,192, 0, 0,137,128, 69,137,137, 0, + 69,134,137,192, 69,133, 92,128, 0, 1, 9, 64,128,138, 5,128, 0, 0, 6,192, + 64, 0, 6, 0, 66, 0,100,128, 0, 0, 9, 64, 0,140, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70,128,198, 0,138,192, 0, 0,137,192, 70,134,137, 0, + 71,137,137,128,199,142, 92,128, 0, 1, 9, 64,128,140, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70,128,198, 0,138,192, 0, 0,137,192, 70,134,137, 0, + 72,137,137, 64,200,142, 92,128, 0, 1, 9, 64,128,143, 5,128, 0, 0, 6,192, + 64, 0, 69,128, 0, 0, 70,128,198, 0,138,128, 0, 0,137,192, 70,134,137,192, + 72,137, 92,128, 0, 1, 9, 64, 0,145, 5,128, 0, 0, 6,192, 64, 0, 69,128, + 0, 0, 70,128,198, 0,138,128, 0, 0,137,192, 70,134,137, 64, 73,137, 92,128, + 0, 1, 9, 64, 0,146, 5,128, 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70,128, +198, 0,138,128, 0, 0,137,192, 70,134,137,192, 73,137, 92,128, 0, 1, 9, 64, + 0,147, 5,128, 0, 0, 6,192, 64, 0, 6,128, 73, 0,100,192, 0, 0, 9, 64, +128,142, 5,128, 0, 0, 6,192, 64, 0, 6, 0, 73, 0,100, 0, 1, 0, 9, 64, +128,142, 5,128, 0, 0, 6,192, 64, 0,100, 64, 1, 0, 9, 64, 0,148, 5,128, + 0, 0, 6,192, 64, 0, 6,128, 72, 0,100,128, 1, 0, 9, 64,128,142, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70,128,202, 0,138,192,128, 0,197,128, + 0, 0,198,192,202, 1, 10, 65,128, 0, 69,129, 0, 0, 70, 1,203, 2,138, 65, + 0, 1,197,129, 0, 0,198,129,202, 3, 10,130,128, 2, 69,130, 0, 0, 70,194, +192, 4, 70,130,200, 4,133,130, 0, 0,134,194, 64, 5,134,130, 73, 5,197,130, + 0, 0,198,194,192, 5,198, 2,201, 5, 5,131, 0, 0, 6,195, 64, 6, 6,195, + 71, 6, 69,131, 0, 0, 70,195,192, 6, 70, 67,198, 6, 9,130,203,150, 9, 2, +204,151, 34, 66,128, 2,220,129, 0, 1, 5,130, 0, 0, 6,130, 74, 4, 74, 66, +128, 1,133,130, 0, 0,134,194, 64, 5,134, 66, 69, 5,197,130, 0, 0,198,194, +192, 5,198, 2,194, 5, 5,131, 0, 0, 6,195, 64, 6, 6, 3, 68, 6, 73,130, +204,152, 98, 66,128, 1, 28,130, 0, 1,137,193,204,152,162, 65, 0, 1, 92,129, + 0, 1, 9, 1, 77,137, 34, 65,128, 0,220,128, 0, 1,137, 64,205,152,137,128, +205,150,137,192,205,151,162, 64,128, 0, 92,128, 0, 1, 9, 64,128,148, 5,128, + 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 64,206, 0,138, 0,128, 0,197,128, + 0, 0,198,128,206, 1, 10, 65,128, 0, 69,129, 0, 0, 70, 65,206, 2,138, 1, + 0, 0,197,129, 0, 0,198,193,206, 3, 10,130, 0, 0, 9, 2, 79,137, 9, 66, +207,142,220, 1, 0, 1,162, 65, 0, 0, 92,129, 0, 1, 9,129, 79,137, 34, 65, +128, 0,220,128, 0, 1, 5,129, 0, 0, 6,129, 78, 2, 74, 65,128, 0,133,129, + 0, 0,134, 65, 78, 3,202, 1,128, 0, 5,130, 0, 0, 6,194, 78, 4, 74,130, + 0, 0, 73,194, 79,137,133,130, 0, 0,134,194, 64, 5,134, 66, 65, 5, 73,130, +130,142, 28,130, 0, 1, 69,130, 0, 0, 70,194,206, 4,138,130, 0, 0,137, 2, + 80,137,137, 66,208,142, 92, 2, 0, 1,226, 65, 0, 0,156,129, 0, 1, 73,129, + 80,137, 98, 65,128, 0, 28, 1, 0, 1,162, 64, 0, 0, 92,128, 0, 1, 9, 64, + 0,156, 5,128, 0, 0, 6,192, 64, 0, 69,128, 0, 0, 70, 0,209, 0,138, 64, +129, 0,197,128, 0, 0,198,192,192, 1,198, 64,202, 1,137, 64, 81,137, 5,129, + 0, 0, 6,193, 64, 2, 6, 1, 78, 2,137, 0,129,156,137,192, 66,163, 5,129, + 0, 0, 6,193, 64, 2, 6, 65, 70, 2,137, 0,129,163,137, 64, 79,164,162, 64, +128, 0, 92,128, 0, 1, 9, 64,128,161, 5,128, 0, 0, 6,192, 64, 0, 6,192, + 80, 0,100,192, 1, 0, 9, 64,128,164, 5,128, 0, 0, 6,192, 64, 0, 69,128, + 0, 0, 70, 0,209, 0,138, 0,129, 0,197,128, 0, 0,198,128,202, 1, 10,129, + 0, 3, 69,129, 0, 0, 70, 65,196, 2,138, 65, 0, 0,137, 65, 81,137, 92,129, + 0, 1,133,129, 0, 0,134,193, 82, 3,202, 65, 0, 0,201,193, 77,134,156,129, + 0, 1,197,129, 0, 0,198,193,210, 3, 10, 66, 0, 0, 9,194, 77,134,220,129, + 0, 1, 5,130, 0, 0, 6,194, 74, 4, 74, 2, 0, 0,133,130, 0, 0,134,130, + 74, 5,202, 2,128, 0, 5,131, 0, 0, 6, 67, 68, 6, 74, 67, 0, 0, 73, 3, + 83,137, 28,131, 0, 1, 69,131, 0, 0, 70, 67,196, 6,138, 67, 0, 0,137, 67, + 83,137, 92, 3, 0, 1,226, 66, 0, 0,156, 2, 0, 1, 98, 66, 0, 0, 28,130, + 0, 1, 69,130, 0, 0, 70,194,210, 4,138, 66, 0, 0,137,194, 77,134, 92,130, + 0, 1,133,130, 0, 0,134,130, 70, 5,202,194, 0, 0,201,130, 83,137,201, 66, +207,142,201,194, 83,134,156,130, 0, 1, 9, 1,212,150, 9, 65,205,152, 34, 65, + 0, 3,220,128, 0, 1,137,128,212,168,137,128,212,169,137,128, 84,170,137, 64, + 85,137,162, 64,128, 0, 92,128, 0, 1, 9, 64, 0,165, 5,128, 0, 0, 6,192, + 64, 0, 6,192, 80, 0, 11,128, 85, 0, 28, 64, 0, 1, 5,128, 0, 0, 6,192, + 85, 0, 69,128, 0, 0, 70,192,192, 0, 70, 0,194, 0, 28, 64, 0, 1, 5,128, + 0, 0, 6, 0, 86, 0, 28, 64,128, 0, 5,128, 0, 0, 6,192, 64, 0, 6,192, + 80, 0, 11, 64, 86, 0, 28, 64, 0, 1, 5,128, 0, 0, 6,192, 64, 0, 6,128, + 82, 0, 11, 64, 86, 0, 28, 64, 0, 1, 30, 0,128, 0, 90, 0, 0, 0, 4, 8, + 0, 0, 0, 0, 0, 0, 0,114,101,113,117,105,114,101, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,105,117,112,108,117, 97, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116,116, 97, 98,108,101, + 0, 4, 19, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116, 95,118,101,114,115, +105,111,110, 95,105,110,102,111, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,108, 97, +115,116,102,105,108,101,110, 97,109,101, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,109,108, 67,111,100,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,109,117,108, +116,105,108,105,110,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,101,120,112, 97, +110,100, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 89, 69, 83, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0,115,105,122,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 50, + 48, 48,120, 49, 50, 48, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,102,111,110,116, + 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, + 82, 77, 65, 76, 95, 49, 48, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,108, 98,108, + 80,111,115,105,116,105,111,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,108, 97, + 98,101,108, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0, 48, 58, 48, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 53, 48,120, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,108, 98,108, 70,105,108, +101, 78, 97,109,101, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,114,101,116, 95, 99, 98, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0, 98,117,116, 69,120,101, 99,117,116,101, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 98,117,116,116,111,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 53, + 48,120, 49, 53, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 69,120,101, 99,117,116, +101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 39, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 46,100,111,115,116,114,105,110,103, 40, +105,117,112, 46, 99,111,110,115,111,108,101, 46,109,108, 67,111,100,101, 46,118, + 97,108,117,101, 41, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 98,117,116, 67,108, +101, 97,114, 67,111,109,109, 97,110,100,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, + 0, 67,108,101, 97,114, 0, 4, 96, 0, 0, 0, 0, 0, 0, 0,105,117,112, 46, + 99,111,110,115,111,108,101, 46,109,108, 67,111,100,101, 46,118, 97,108,117,101, + 61, 39, 39, 32, 32,105,117,112, 46, 99,111,110,115,111,108,101, 46,108, 98,108, + 70,105,108,101, 78, 97,109,101, 46,116,105,116,108,101, 32, 61, 32, 39, 39, 32, + 32,105,117,112, 46, 99,111,110,115,111,108,101, 46,108, 97,115,116,102,105,108, +101,110, 97,109,101, 32, 61, 32,110,105,108, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0, 98,117,116, 76,111, 97,100, 70,105,108,101, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0, 76,111, 97,100, 46, 46, 46, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 98, +117,116, 83, 97,118,101, 97,115, 70,105,108,101, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0, 83, 97,118,101, 32, 65,115, 46, 46, 46, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0, 98,117,116, 83, 97,118,101, 70,105,108,101, 0, 4, 5, 0, 0, 0, 0, + 0, 0, 0, 83, 97,118,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 76,111, 97, +100, 70,105,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,118, 98,120, 67,111, +110,115,111,108,101, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,118, 98,111,120, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,102,114, 97,109,101, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,104, 98,111,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97, +114,103,105,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 48,120, 48, 0, 4, 4, + 0, 0, 0, 0, 0, 0, 0,103, 97,112, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, + 49, 48, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 97,108,105,103,110,109,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65, 82, 73, 71, 72, 84, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 65, 84, 79, 80, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 67,111,109,109, 97,110,100,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 65, + 67, 69, 78, 84, 69, 82, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 53,120, 53, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0, 53, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, +109,110,117, 77, 97,105,110, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,109,101,110, +117, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115,117, 98,109,101,110,117, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,105,116,101,109, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 69,120,105,116, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0,114,101,116,117, +114,110, 32,105,117,112, 46, 67, 76, 79, 83, 69, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 70,105,108,101, 0, 4, 22, 0, 0, 0, 0, 0, 0, 0, 80,114,105,110, +116, 32, 86,101,114,115,105,111,110, 32, 73,110,102,111, 46, 46, 46, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 65, 98,111,117,116, 46, 46, 46, 0, 4, 51, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 46, 99,111,110,115,111,108,101, 46,100,108,103, + 65, 98,111,117,116, 58,112,111,112,117,112, 40,105,117,112, 46, 67, 69, 78, 84, + 69, 82, 44, 32,105,117,112, 46, 67, 69, 78, 84, 69, 82, 41, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0, 72,101,108,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100, +108,103, 77, 97,105,110, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108, +111,103, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, 73,117,112, 76,117, 97, 32, 67, +111,110,115,111,108,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,100,114, 97,103, +100,114,111,112, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,100,101,102, 97,117,108, +116,101,110,116,101,114, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,108,111,115, +101, 95, 99, 98, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,100,114,111,112,102,105, +108,101,115, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,100,108,103, 65, + 98,111,117,116, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,102,105,108,108, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0, 84,101, 99,103,114, 97,102, 47, 80, 85, 67, 45, + 82,105,111, 0, 4, 23, 0, 0, 0, 0, 0, 0, 0,105,117,112, 64,116,101, 99, +103,114, 97,102, 46,112,117, 99, 45,114,105,111, 46, 98,114, 0, 4, 3, 0, 0, + 0, 0, 0, 0, 0, 79, 75, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 53, 48, 88, + 50, 48, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 49, 48,120, 49, 48, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,109, 97,120, 98,111,120, 0, 4, 3, 0, 0, 0, 0, + 0, 0, 0, 78, 79, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109,105,110, 98,111, +120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114,101,115,105,122,101, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0, 65, 98,111,117,116, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0,115,104,111,119, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 70, +111, 99,117,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 97,105,110, 76,111, +111,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, + 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 15, 0, 0, 0, + 0, 1, 0, 8, 30, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0,195, 0,128, 1, + 92,192,128, 1,197, 64, 0, 0, 1,129, 0, 0,220, 64, 0, 1, 87,192,192, 0, + 22, 0, 4,128,197, 64, 0, 0, 5, 1, 1, 0, 64, 1,128, 0, 28,129, 0, 1, + 65, 65, 1, 0,133, 1, 1, 0,192, 1, 0, 1,156,129, 0, 1, 21,129, 1, 2, +220, 64, 0, 1,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,220,192,128, 1, +128, 0, 0, 2, 64, 0,128, 1, 22, 0,251,127,197, 64, 0, 0, 1,129, 1, 0, +220, 64, 0, 1, 30, 0,128, 0, 7, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,101,120,116, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,114,105,110,116, + 0, 4, 21, 0, 0, 0, 0, 0, 0, 0, 45, 45,112,114,105,110,116,116, 97, 98, +108,101, 32, 83,116, 97,114,116, 45, 45, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0,116,111,115,116,114,105,110,103, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 61, + 0, 4, 19, 0, 0, 0, 0, 0, 0, 0, 45, 45,112,114,105,110,116,116, 97, 98, +108,101, 32, 69,110,100, 45, 45, 0, 0, 0, 0, 0, 30, 0, 0, 0, 8, 0, 0, + 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, + 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, + 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0, 0, 29, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 0, 0, 0, 29, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0,118, 0, 4, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 5,112, + 0, 0, 0, 5, 0, 0, 0, 26, 0, 0, 0, 22, 0, 2,128, 5, 64, 0, 0, 65, +128, 0, 0,133, 0, 0, 0,134,192, 64, 1,193, 0, 1, 0, 5, 1, 0, 0, 6, + 65, 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5,128, 1, 0, 26, 0, 0, 0, 22, + 0, 2,128, 5, 64, 0, 0, 65,192, 1, 0,133,128, 1, 0,134,192, 64, 1,193, + 0, 1, 0, 5,129, 1, 0, 6, 65, 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5, + 64, 0, 0, 65, 0, 2, 0,133, 64, 2, 0,134,192, 64, 1,193, 0, 1, 0, 5, + 65, 2, 0, 6, 65, 65, 2, 85, 0,129, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65, +128, 2, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65,192, 2, 0, 28, 64, 0, 1, 5, + 64, 0, 0, 65, 0, 3, 0,133, 64, 2, 0,134, 64, 67, 1,193,128, 3, 0,156, +128, 0, 1, 85,128,128, 0, 28, 64, 0, 1, 5, 64, 0, 0, 65,192, 3, 0,133, + 64, 2, 0,134, 64, 67, 1,193, 0, 4, 0,156,128, 0, 1, 85,128,128, 0, 28, + 64, 0, 1, 5, 64, 2, 0, 6, 64, 67, 0, 65, 64, 4, 0, 28,128, 0, 1, 26, + 0, 0, 0, 22,192, 0,128, 69, 64, 0, 0,129,128, 4, 0,192, 0, 0, 0, 92, + 64,128, 1, 69, 64, 0, 0,129,192, 4, 0,197, 64, 2, 0,198, 64,195, 1, 1, + 1, 5, 0,220,128, 0, 1,149,192, 0, 1, 92, 64, 0, 1, 69, 64, 0, 0,129, + 64, 5, 0,197, 64, 2, 0,198, 64,195, 1, 1,129, 5, 0,220,128, 0, 1,149, +192, 0, 1, 92, 64, 0, 1, 69, 64, 2, 0, 70,192,197, 0, 90, 0, 0, 0, 22, + 64, 1,128, 69, 64, 0, 0,129, 0, 6, 0,197, 64, 2, 0,198,192,197, 1,149, +192, 0, 1, 92, 64, 0, 1, 69, 64, 2, 0, 70, 64,198, 0, 90, 0, 0, 0, 22, + 64, 1,128, 69, 64, 0, 0,129,128, 6, 0,197, 64, 2, 0,198, 64,198, 1,149, +192, 0, 1, 92, 64, 0, 1, 69, 64, 2, 0, 70,192,198, 0, 90, 0, 0, 0, 22, + 64, 1,128, 69, 64, 0, 0,129, 0, 7, 0,197, 64, 2, 0,198,192,198, 1,149, +192, 0, 1, 92, 64, 0, 1, 30, 0,128, 0, 29, 0, 0, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,105,109, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,114,105,110, +116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 73, 77, 32, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 95, 86, 69, 82, 83, 73, 79, 78, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0, 32, 32, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 95, 67, 79, 80, 89, 82, + 73, 71, 72, 84, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 99,100, 0, 4, 4, 0, + 0, 0, 0, 0, 0, 0, 67, 68, 32, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 73, + 85, 80, 32, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 73, 85, 80, 32, + 73,110,102,111, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83,121,115,116, +101,109, 58, 32, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 71,101,116, 71,108,111, + 98, 97,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 89, 83, 84, 69, 77, 0, + 4, 19, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83,121,115,116,101,109, 32, 86,101, +114,115,105,111,110, 58, 32, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 83, 89, 83, + 84, 69, 77, 86, 69, 82, 83, 73, 79, 78, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, + 77, 79, 84, 73, 70, 86, 69, 82, 83, 73, 79, 78, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0, 32, 32, 77,111,116,105,102, 32, 86,101,114,115,105,111,110, 58, 32, 0, + 4, 16, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83, 99,114,101,101,110, 32, 83,105, +122,101, 58, 32, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 83, 67, 82, 69, 69, 78, + 83, 73, 90, 69, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 32, 32, 83, 99,114,101, +101,110, 32, 68,101,112,116,104, 58, 32, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, + 83, 67, 82, 69, 69, 78, 68, 69, 80, 84, 72, 0, 4, 10, 0, 0, 0, 0, 0, 0, + 0, 71, 76, 95, 86, 69, 78, 68, 79, 82, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, + 32, 32, 79,112,101,110, 71, 76, 32, 86,101,110,100,111,114, 58, 32, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0, 71, 76, 95, 82, 69, 78, 68, 69, 82, 69, 82, 0, 4, + 20, 0, 0, 0, 0, 0, 0, 0, 32, 32, 79,112,101,110, 71, 76, 32, 82,101,110, +100,101,114,101,114, 58, 32, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 71, 76, 95, + 86, 69, 82, 83, 73, 79, 78, 0, 4, 19, 0, 0, 0, 0, 0, 0, 0, 32, 32, 79, +112,101,110, 71, 76, 32, 86,101,114,115,105,111,110, 58, 32, 0, 0, 0, 0, 0, +112, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, + 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, + 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, + 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, + 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, + 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, + 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, + 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, + 26, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, + 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, + 29, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, 0, 0, 0, + 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, + 32, 0, 0, 0, 32, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, + 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, + 34, 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, + 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, + 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0,109,111,116, 0, 59, 0, 0, 0,111, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 0, 3, 0, 7, + 9, 0, 0, 0,197, 0, 0, 0,198, 64,192, 1,198,128,192, 1, 0, 1,128, 0, + 65, 1, 1, 0,128, 1, 0, 1, 21,129, 1, 2,201, 0,129,129, 30, 0,128, 0, + 5, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 8, 0, + 0, 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,108, 98,108, 80,111,115,105,116,105,111,110, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,116,105,116,108,101, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 58, + 0, 0, 0, 0, 0, 9, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, + 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, + 0, 48, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,115,101,108, +102, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,108,105, +110, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 99,111, +108, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 58, 0, 0, 0, 70, 0, 0, 0, 0, 1, 0, 4, 39, 0, 0, 0, 69, 0, + 0, 0, 70, 64,192, 0, 70,128,192, 0, 23,192,192, 0, 22, 64, 1,128, 69, 0, + 0, 0, 70, 64,192, 0, 70, 0,193, 0, 75, 64,193, 0, 92, 64, 0, 1, 22,128, + 6,128, 69,192, 1, 0, 70, 0,194, 0,133, 0, 0, 0,134, 64, 64, 1,134,128, + 64, 1,193, 64, 2, 0, 92,128,128, 1, 71,128, 1, 0, 69,128, 1, 0, 87,192, +192, 0, 22,128, 2,128, 69,128, 1, 0, 75,128,194, 0,197, 0, 0, 0,198, 64, +192, 1,198,192,194, 1,198, 0,195, 1, 92, 64,128, 1, 69,128, 1, 0, 75, 64, +195, 0, 92, 64, 0, 1, 22, 0, 1,128, 69,128, 3, 0,129,192, 3, 0,197, 0, + 4, 0,149,192, 0, 1, 92, 64, 0, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 4, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, + 99,111,110,115,111,108,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,108, 97,115, +116,102,105,108,101,110, 97,109,101, 0, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 98,117,116, 83, 97,118,101, 97,115, 70,105,108,101, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,110, +101,119,102,105,108,101, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,105,111, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,119, 43, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,119,114,105,116,101, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,109,108, 67,111,100,101, 0, 4, 6, 0, 0, + 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108,111,115,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, + 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110,110,111,116, 32, 83, 97,118, +101, 32,102,105,108,101, 32, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,105,108, +101,110, 97,109,101, 0, 0, 0, 0, 0, 39, 0, 0, 0, 59, 0, 0, 0, 59, 0, + 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 60, 0, 0, 0, 60, 0, + 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 62, 0, + 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, + 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, + 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, + 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, + 0, 0, 65, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, + 0, 0, 67, 0, 0, 0, 70, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 92, 0, 0, 0, 0, 1, 0, 7, 65, + 0, 0, 0, 69, 0, 0, 0, 70, 64,192, 0,138, 64, 1, 0,137,192, 64,129,137, + 64, 65,130,137,192, 65,131,137, 64, 66,132,197,192, 2, 0,137,192, 0,133, 92, +128, 0, 1,139, 0,195, 0, 5, 1, 0, 0, 6, 65, 67, 2, 69, 1, 0, 0, 70, + 65,195, 2,156, 64, 0, 2,134,128,195, 0,197, 0, 0, 0,198,192,195, 1, 6, + 65,196, 0,201, 0, 1,136,197, 0, 0, 0,198,192,195, 1,198,128,196, 1, 5, + 1, 0, 0, 6,193, 67, 2, 6, 1, 68, 2,201, 0, 1,130,203,192,196, 0,220, + 64, 0, 1, 87, 0, 69, 1, 22,192, 7,128,197, 0, 0, 0,198,192,195, 1,198, + 0,196, 1, 23, 64,197, 1, 22, 0, 1,128,197,128, 5, 0, 1,193, 5, 0, 69, + 1, 6, 0, 21, 65, 1, 2,220, 64, 0, 1,197, 64, 6, 0,198,128,198, 1, 5, + 1, 0, 0, 6,193, 67, 2, 6, 1, 68, 2, 65,193, 6, 0,220,128,128, 1, 87, + 64,197, 1, 22, 64, 2,128, 11, 1,199, 1,133, 1, 0, 0,134,193, 67, 3,134, + 65, 71, 3,134, 65, 68, 3, 28, 65,128, 1, 11,129,199, 1,128, 1,128, 1, 28, + 65,128, 1, 22,128, 0,128, 5,129, 5, 0, 65,193, 7, 0, 28, 65, 0, 1, 30, + 0,128, 0, 32, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,100,108,103, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,100,105, 97,108,111,103,116,121,112,101, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0, 83, 65, 86, 69, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +116,105,116,108,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 83, 97,118,101, 32, + 70,105,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,105,108,116,101,114, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 42, 46,119,108,117, 97, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,102,105,108,116,101,114,105,110,102,111, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0, 76,117, 97, 32,102,105,108,101,115, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 97,108,108,111,119,110,101,119, 0, 4, 4, 0, 0, 0, 0, + 0, 0, 0,121,101,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117, +112, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 76, 69, 70, 84, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,115,116, 97,116,117,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, + 0, 99,111,110,115,111,108,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,108, 97, +115,116,102,105,108,101,110, 97,109,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +118, 97,108,117,101, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,108, 98,108, 70,105, +108,101, 78, 97,109,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116, +114,111,121, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 45, 49, 0, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,101,114,114,111,114, 0, 4, 18, 0, 0, 0, 0, 0, 0, + 0, 67, 97,110,110,111,116, 32, 83, 97,118,101, 32,102,105,108,101, 32, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,110, 97,109,101, 0, 4, 3, 0, + 0, 0, 0, 0, 0, 0,105,111, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,111,112, +101,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,119, 43, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,119,114,105,116,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, +108, 67,111,100,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99,108,111,115,101, + 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 67, 97,110,110,111,116, 32, 83, 97,118, +101, 32,102,105,108,101, 0, 0, 0, 0, 0, 65, 0, 0, 0, 73, 0, 0, 0, 73, + 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 74, + 0, 0, 0, 74, 0, 0, 0, 74, 0, 0, 0, 73, 0, 0, 0, 75, 0, 0, 0, 75, + 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 76, + 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 77, 0, 0, 0, 78, + 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, 0, 0, 0, 78, + 0, 0, 0, 78, 0, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 80, 0, 0, 0, 80, + 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, 0, 0, 0, 81, + 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, + 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 86, + 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, + 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 89, + 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 92, 0, 0, 0, 4, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 64, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0,102,100, 0, 10, 0, 0, 0, 64, 0, 0, 0, 7, + 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,117,115, 0, 17, 0, 0, 0, 64, 0, + 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,110,101,119,102,105,108,101, 0, 49, 0, + 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, + 0, 0,104, 0, 0, 0, 0, 1, 0, 6, 34, 0, 0, 0, 69, 0, 0, 0, 70, 64, +192, 0,128, 0, 0, 0,193,128, 0, 0, 92,128,128, 1, 23,192,192, 0, 22, 64, + 1,128,133, 0, 1, 0,193, 64, 1, 0, 0, 1, 0, 0,213, 0,129, 1,156, 64, + 0, 1, 22,192, 4,128,133,128, 1, 0,134,192, 65, 1,134, 0, 66, 1,203,128, +194, 0, 65,193, 2, 0,220,128,128, 1,137,192,128,132,139, 0,195, 0, 0, 1, +128, 0,156, 64,128, 1,133,128, 1, 0,134,192, 65, 1,137, 0,128,134,133,128, + 1, 0,134,192, 65, 1,134,128, 67, 1,197,128, 1, 0,198,192,193, 1,198, 64, +195, 1,137,192,128,135, 30, 0,128, 0, 16, 0, 0, 0, 4, 3, 0, 0, 0, 0, + 0, 0, 0,105,111, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0,114, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, + 0,101,114,114,111,114, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110,110, +111,116, 32,108,111, 97,100, 32,102,105,108,101, 32, 0, 4, 4, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110,115, +111,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109,108, 67,111,100,101, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,114,101, 97,100, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 42, 97, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99,108,111,115,101, 0, 4, 13, 0, 0, + 0, 0, 0, 0, 0,108, 97,115,116,102,105,108,101,110, 97,109,101, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,108, 98,108, 70,105,108,101, 78, 97,109,101, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 34, 0, + 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, + 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, + 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 99, 0, 0, 0, 99, 0, + 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, 99, 0, + 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,101, 0, 0, 0,101, 0, + 0, 0,101, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, + 0, 0,102, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,104, 0, 0, 0, 2, 0, + 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,110, 97,109,101, 0, 0, + 0, 0, 0, 33, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,110,101,119,102,105, +108,101, 0, 5, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,106, 0, 0, 0,121, 0, 0, 0, 0, 1, 0, 7, 37, 0, 0, 0, 69, + 0, 0, 0, 70, 64,192, 0,138, 64, 1, 0,137,192, 64,129,137, 64, 65,130,137, +192, 65,131,137, 64, 66,132,137,192, 66,133, 92,128, 0, 1,139, 0,195, 0, 5, + 1, 0, 0, 6, 65, 67, 2, 69, 1, 0, 0, 70, 65,195, 2,156, 64, 0, 2,134, +128,195, 0,198,192,195, 0, 11, 1,196, 0, 28, 65, 0, 1, 87, 64, 68, 1, 22, + 64, 0,128, 23,128, 68, 1, 22,192, 1,128, 23,128, 68, 1, 22,128, 2,128, 5, +193, 4, 0, 65, 1, 5, 0,128, 1,128, 1, 85,129,129, 2, 28, 65, 0, 1, 22, + 0, 1,128, 5, 1, 0, 0, 6, 65, 69, 2, 6,129, 69, 2, 64, 1,128, 1, 28, + 65, 0, 1, 30, 0,128, 0, 23, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,100,108,103, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108,111,103,116,121,112,101, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 79, 80, 69, 78, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,116,105,116,108,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 76, +111, 97,100, 32, 70,105,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,105, +108,116,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 42, 46,119,108,117, 97, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,102,105,108,116,101,114,105,110,102,111, + 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 76,117, 97, 32, 70,105,108,101,115, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0, 97,108,108,111,119,110,101,119, 0, 4, 3, + 0, 0, 0, 0, 0, 0, 0, 78, 79, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112, +111,112,117,112, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 67, 69, 78, 84, 69, 82, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,117,115, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, + 0,100,101,115,116,114,111,121, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 45, 49, + 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 49, 0, 4, 6, 0, 0, 0, 0, 0, 0, + 0,101,114,114,111,114, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 67, 97,110,110, +111,116, 32,108,111, 97,100, 32,102,105,108,101, 32, 0, 4, 8, 0, 0, 0, 0, + 0, 0, 0, 99,111,110,115,111,108,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, + 76,111, 97,100, 70,105,108,101, 0, 0, 0, 0, 0, 37, 0, 0, 0,107, 0, 0, + 0,107, 0, 0, 0,107, 0, 0, 0,107, 0, 0, 0,107, 0, 0, 0,108, 0, 0, + 0,108, 0, 0, 0,108, 0, 0, 0,107, 0, 0, 0,109, 0, 0, 0,109, 0, 0, + 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, 0, 0,109, 0, 0, 0,110, 0, 0, + 0,111, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,114, 0, 0, 0,114, 0, 0, + 0,114, 0, 0, 0,114, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,116, 0, 0, + 0,116, 0, 0, 0,116, 0, 0, 0,116, 0, 0, 0,116, 0, 0, 0,117, 0, 0, + 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, 0, 0,119, 0, 0, + 0,121, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,115,101,108, +102, 0, 0, 0, 0, 0, 36, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,102,100, + 0, 9, 0, 0, 0, 36, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,115,116, 97, +116,117,115, 0, 16, 0, 0, 0, 36, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, +102,105,108,101,110, 97,109,101, 0, 17, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,166, 0, 0, 0,170, 0, 0, 0, 0, 5, 0, + 7, 8, 0, 0, 0, 23, 0, 64, 1, 22, 0, 1,128, 69, 65, 0, 0, 70,129,192, + 2, 70,193,192, 2,128, 1,128, 0, 92, 65, 0, 1, 30, 0,128, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,111,110,115,111,108,101, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0, 76,111, 97,100, 70,105,108,101, 0, 0, 0, + 0, 0, 8, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,168, 0, 0, 0,168, 0, + 0, 0,168, 0, 0, 0,168, 0, 0, 0,168, 0, 0, 0,170, 0, 0, 0, 5, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,115,101,108,102, 0, 0, 0, 0, 0, 7, + 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,110, 97,109,101, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,110,117,109, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, + 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0, 90, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, + 1, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, + 7, 0, 0, 0, 15, 0, 0, 0, 7, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 37, 0, 0, 0, 17, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, + 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, + 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, + 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, + 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, + 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 46, 0, 0, 0, + 46, 0, 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 46, 0, 0, 0, 50, 0, 0, 0, + 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, + 50, 0, 0, 0, 51, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, + 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, + 52, 0, 0, 0, 53, 0, 0, 0, 52, 0, 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, + 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, + 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, + 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, + 55, 0, 0, 0, 55, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, + 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, + 56, 0, 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 70, 0, 0, 0, + 58, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 92, 0, 0, 0, + 72, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0,104, 0, 0, 0, 94, 0, 0, 0, +106, 0, 0, 0,106, 0, 0, 0,106, 0, 0, 0,121, 0, 0, 0,106, 0, 0, 0, +123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0, +125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0, +125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0, +125, 0, 0, 0,125, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0, +127, 0, 0, 0,127, 0, 0, 0,127, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0, +128, 0, 0, 0,129, 0, 0, 0,129, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0, +130, 0, 0, 0,130, 0, 0, 0,125, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0, +131, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0,131, 0, 0, 0,132, 0, 0, 0, +132, 0, 0, 0,132, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0, +134, 0, 0, 0,134, 0, 0, 0,131, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0, +125, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,125, 0, 0, 0,136, 0, 0, 0, +136, 0, 0, 0,136, 0, 0, 0,137, 0, 0, 0,124, 0, 0, 0,137, 0, 0, 0, +141, 0, 0, 0,141, 0, 0, 0,141, 0, 0, 0,141, 0, 0, 0,141, 0, 0, 0, +143, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0, +145, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0,147, 0, 0, 0, +147, 0, 0, 0,147, 0, 0, 0,148, 0, 0, 0,146, 0, 0, 0,148, 0, 0, 0, +149, 0, 0, 0,144, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0, +150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0, +152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0, +152, 0, 0, 0,152, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0, +153, 0, 0, 0,153, 0, 0, 0,153, 0, 0, 0,154, 0, 0, 0,151, 0, 0, 0, +154, 0, 0, 0,154, 0, 0, 0,150, 0, 0, 0,155, 0, 0, 0,142, 0, 0, 0, +155, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0, +159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,159, 0, 0, 0,160, 0, 0, 0, +161, 0, 0, 0,161, 0, 0, 0,161, 0, 0, 0,161, 0, 0, 0,162, 0, 0, 0, +163, 0, 0, 0,163, 0, 0, 0,163, 0, 0, 0,163, 0, 0, 0,164, 0, 0, 0, +164, 0, 0, 0,159, 0, 0, 0,164, 0, 0, 0,166, 0, 0, 0,166, 0, 0, 0, +166, 0, 0, 0,170, 0, 0, 0,166, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0, +174, 0, 0, 0,174, 0, 0, 0,174, 0, 0, 0,176, 0, 0, 0,176, 0, 0, 0, +176, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0,178, 0, 0, 0, +178, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0, +179, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0,180, 0, 0, 0, +180, 0, 0, 0,181, 0, 0, 0,181, 0, 0, 0,181, 0, 0, 0,183, 0, 0, 0, +183, 0, 0, 0,183, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0, +185, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0, +186, 0, 0, 0,186, 0, 0, 0,187, 0, 0, 0,184, 0, 0, 0,188, 0, 0, 0, +182, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0,189, 0, 0, 0, +189, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0, +190, 0, 0, 0,190, 0, 0, 0,190, 0, 0, 0,191, 0, 0, 0,191, 0, 0, 0, +192, 0, 0, 0,177, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0, +193, 0, 0, 0,194, 0, 0, 0,175, 0, 0, 0,194, 0, 0, 0,198, 0, 0, 0, +198, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,198, 0, 0, 0,199, 0, 0, 0, +199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0,199, 0, 0, 0, +201, 0, 0, 0,201, 0, 0, 0,201, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0, +203, 0, 0, 0,203, 0, 0, 0,203, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0, +204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0,204, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/console5_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srcconsole/lua.ico b/iup/srcconsole/lua.ico new file mode 100755 index 0000000..56dc4fe Binary files /dev/null and b/iup/srcconsole/lua.ico differ diff --git a/iup/srcconsole/make_uname b/iup/srcconsole/make_uname new file mode 100755 index 0000000..6263490 --- /dev/null +++ b/iup/srcconsole/make_uname @@ -0,0 +1,6 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake relink $1 $2 $3 $4 $5 $6 $7 $8 +#tecmake USE_GTK=Yes relink $1 $2 $3 $4 $5 $6 $7 $8 +#tecmake USE_MOTIF=Yes relink $1 $2 $3 $4 $5 $6 $7 $8 +#tecmake MF=iuplua3 relink $1 $2 $3 $4 $5 $6 $7 $8 diff --git a/iup/srcconsole/make_uname.bat b/iup/srcconsole/make_uname.bat new file mode 100755 index 0000000..a5b1d9a --- /dev/null +++ b/iup/srcconsole/make_uname.bat @@ -0,0 +1,30 @@ +@echo off + +if "%1"=="" goto iupexe32 +if "%1"=="vc8" goto iupexe32 +if "%1"=="vc8_64" goto iupexe64 +if "%1"=="all" goto iupexe +goto end + +:iupexe32 +call tecmake dll8 relink %2 %3 %4 %5 %6 %7 +REM call tecmake dll8 USE_GTK=Yes relink %2 %3 %4 %5 %6 %7 +REM call tecmake vc8 "MF=iuplua3" relink %2 %3 %4 %5 %6 %7 +goto end + +:iupexe64 +call tecmake dll8_64 relink %2 %3 %4 %5 %6 %7 +REM call tecmake dll8_64 USE_GTK=Yes relink %2 %3 %4 %5 %6 %7 +REM call tecmake vc8_64 "MF=iuplua3" relink %2 %3 %4 %5 %6 %7 +goto end + +:iupexe +call tecmake dll8 relink %2 %3 %4 %5 %6 %7 +REM call tecmake dll8 USE_GTK=Yes relink %2 %3 %4 %5 %6 %7 +REM call tecmake vc8 "MF=iuplua3" relink %2 %3 %4 %5 %6 %7 +call tecmake dll8_64 relink %2 %3 %4 %5 %6 %7 +REM call tecmake dll8_64 USE_GTK=Yes relink %2 %3 %4 %5 %6 %7 +REM call tecmake vc8_64 "MF=iuplua3" relink %2 %3 %4 %5 %6 %7 +goto end + +:end diff --git a/iup/srcconsole/wlua_dll8_x64.manifest b/iup/srcconsole/wlua_dll8_x64.manifest new file mode 100755 index 0000000..9525d5a --- /dev/null +++ b/iup/srcconsole/wlua_dll8_x64.manifest @@ -0,0 +1,33 @@ + + + +Lua Console + + + + + + + + + + + diff --git a/iup/srcconsole/wlua_dll8_x86.manifest b/iup/srcconsole/wlua_dll8_x86.manifest new file mode 100755 index 0000000..70966e7 --- /dev/null +++ b/iup/srcconsole/wlua_dll8_x86.manifest @@ -0,0 +1,33 @@ + + + +Lua Console + + + + + + + + + + + diff --git a/iup/srcconsole/wlua_dll9_x64.manifest b/iup/srcconsole/wlua_dll9_x64.manifest new file mode 100755 index 0000000..f454d48 --- /dev/null +++ b/iup/srcconsole/wlua_dll9_x64.manifest @@ -0,0 +1,33 @@ + + + +Lua Console + + + + + + + + + + + diff --git a/iup/srcconsole/wlua_dll9_x86.manifest b/iup/srcconsole/wlua_dll9_x86.manifest new file mode 100755 index 0000000..3a59548 --- /dev/null +++ b/iup/srcconsole/wlua_dll9_x86.manifest @@ -0,0 +1,33 @@ + + + +Lua Console + + + + + + + + + + + diff --git a/iup/srccontrols/Makefile b/iup/srccontrols/Makefile new file mode 100755 index 0000000..d02bbc3 --- /dev/null +++ b/iup/srccontrols/Makefile @@ -0,0 +1,6 @@ + +.PHONY: do_all iupcontrols +do_all: iupcontrols + +iupcontrols: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak diff --git a/iup/srccontrols/color/iup_colorbrowser.c b/iup/srccontrols/color/iup_colorbrowser.c new file mode 100755 index 0000000..82b4a88 --- /dev/null +++ b/iup/srccontrols/color/iup_colorbrowser.c @@ -0,0 +1,849 @@ +/** \file +* \brief ColorBrowser Control. +* +* See Copyright Notice in "iup.h" +*/ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include +#include +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_controls.h" +#include "iup_cdutil.h" + +#include "iup_colorhsi.h" + + +#ifndef min +#define min(a, b) ( (a < b) ? (a) : (b) ) +#endif + +#define ICB_DEG2RAD 0.01745329252f /* degrees to radians (rad = ICB_DEG2RAD * deg) */ +#define ICB_DEFAULTSIZE 181 /* default size */ +#define ICB_SPACE 4 /* size of the spacing */ +#define ICB_HUEWIDTH 18 /* width of the hue ring */ +#define ICB_MARKSIZE 6 /* size of the cursor mark */ +enum {ICB_INSIDE_NONE, ICB_INSIDE_HUE, ICB_INSIDE_SI}; + + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + + /* mouse interaction state */ + int h_down, + si_down; + + /* cursor positioning */ + int h_x, h_y, + si_x, si_y; + + /* HSI-XY coordinate convertion */ + int xc, yc, /* center */ + R, /* maximum radius available inside the size of the control */ + Ix, /* x coordinate where S is 0 */ + Iy1, /* y coordinate where I is 0 */ + Iy2, /* y coordinate where I is 1 */ + SxMax; /* x coordinate where S is 1 and I = 0.5 */ + + /* visual appearance control */ + int w, h; + int has_focus; + long bgcolor; + + /* attributes */ + float hue, /* 0<=H<=359 */ + saturation, /* 0<=S<=1 */ + intensity; /* 0<=I<=1 */ + unsigned char red, green, blue; /* 0<=x<=255 */ + + cdCanvas *cddbuffer; + cdCanvas *cdcanvas; +}; + + +static float iColorBrowserSXmax(Ihandle* ih, int y) +{ + if (y == ih->data->yc) + return (float)(ih->data->SxMax - ih->data->Ix); + else if (y < ih->data->yc) + { + float D2 = (ih->data->Iy2 - ih->data->Iy1)/2.0f; + return ((float)(ih->data->SxMax - ih->data->Ix)*(y-ih->data->yc + D2))/D2; + } + else + { + float D2 = (ih->data->Iy2 - ih->data->Iy1)/2.0f; + return -((float)(ih->data->SxMax - ih->data->Ix)*(y-ih->data->yc - D2))/D2; + } +} + +static float iColorBrowserCalcIntensity(Ihandle* ih, int y) +{ + return (float)(y - ih->data->Iy1)/(float)(ih->data->Iy2 - ih->data->Iy1); +} + +static float iColorBrowserCalcSaturation(Ihandle* ih, int x, float sx_max) +{ + if (sx_max == 0) + return 0; + else + return (float)(x - ih->data->Ix)/sx_max; +} + +/* Rotate points of 60 degrees */ +static void iColorBrowserRotatePoints(float *x1, float *y1, float *x2, float *y2, int xc, int yc) +{ + float xt, yt; + float nxt, nyt; + static const float s60 = 0.8660254f; + static const float c60 = 0.5f; + + xt = *x1 - xc; + yt = *y1 - yc; + nxt = xt * c60 - yt * s60; + nyt = xt * s60 + yt * c60; + *x1 = nxt + xc; + *y1 = nyt + yc; + + xt = *x2 - xc; + yt = *y2 - yc; + nxt = xt * c60 - yt * s60; + nyt = xt * s60 + yt * c60; + *x2 = nxt + xc; + *y2 = nyt + yc; +} + +static void iColorBrowserRenderImageHue(Ihandle* ih) +{ + int x, y, active = 1; + unsigned char *red, *green, *blue; + unsigned char bg_red, bg_green, bg_blue; + if (!ih->data->cddbuffer) + return; + + cdCanvasBackground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasClear(ih->data->cddbuffer); + + if (!iupdrvIsActive(ih)) + active = 0; + + if (ih->data->has_focus) + cdDrawFocusRect(ih->data->cddbuffer, 0, 0, ih->data->w-1, ih->data->h-1); + + red = cdRedImage(ih->data->cddbuffer); + green = cdGreenImage(ih->data->cddbuffer); + blue = cdBlueImage(ih->data->cddbuffer); + + cdDecodeColor(ih->data->bgcolor, &bg_red, &bg_green, &bg_blue); + + for (y = 0; y < ih->data->h; y++) + { + float sx_max = iColorBrowserSXmax(ih, y); + + for (x = 0; x < ih->data->w; x++) + { + int xl, yl; + float radius, diff1, diff2; + + if (y > ih->data->Iy1 && + y < ih->data->Iy2 && + x > ih->data->Ix && + x < ih->data->Ix+(int)sx_max) + continue; + + xl = x - ih->data->xc; + yl = y - ih->data->yc; + radius = sqrtf(xl*xl + yl*yl); + + diff1 = radius - (ih->data->R-ICB_SPACE-ICB_HUEWIDTH); + diff2 = (ih->data->R-ICB_SPACE) - radius; + + if (diff1>0 && diff2>0) + { + float h, s, i; + int offset = y*ih->data->w + x; + unsigned char* r = red + offset; + unsigned char* g = green + offset; + unsigned char* b = blue + offset; + + h = atan2f(yl, xl); + h = (float)(h * CD_RAD2DEG); + s = 1.0f; /* maximum saturation */ + i = 0.5f; /* choose I where S is maximum */ + + iupColorHSI2RGB(h, s, i, r, g, b); + + if (diff1<1 || diff2<1) /* anti-aliasing */ + { + float diff = (float)(diff1<1? diff1: diff2); + *r = (unsigned char)((*r)*diff + bg_red*(1.0f-diff)); + *g = (unsigned char)((*g)*diff + bg_green*(1.0f-diff)); + *b = (unsigned char)((*b)*diff + bg_blue*(1.0f-diff)); + } + + if (!active) + { + *r = cdIupLIGTHER(*r); + *g = cdIupLIGTHER(*g); + *b = cdIupLIGTHER(*b); + } + } + } + } + + if (active) + { + float x1, x2, y1, y2; + unsigned char shade_lr, shade_lg, shade_lb, + shade_dr, shade_dg, shade_db; + shade_dr = (unsigned char)((2 * bg_red) / 3); + shade_dg = (unsigned char)((2 * bg_green) / 3); + shade_db = (unsigned char)((2 * bg_blue) / 3); + shade_lr = (unsigned char)((255 + bg_red) / 2); + shade_lg = (unsigned char)((255 + bg_green) / 2); + shade_lb = (unsigned char)((255 + bg_blue) / 2); + cdCanvasForeground(ih->data->cddbuffer, cdEncodeColor(shade_dr, shade_dg, shade_db)); + x1 = (float)(ih->data->xc-ih->data->R+ICB_SPACE); y1 = (float)ih->data->yc; x2 = (float)(x1+ICB_HUEWIDTH/2); y2 = (float)ih->data->yc; + cdCanvasLine(ih->data->cddbuffer, (int) x1, (int) y1, (int) x2, (int) y2); + iColorBrowserRotatePoints(&x1, &y1, &x2, &y2, ih->data->xc, ih->data->yc); + cdCanvasForeground(ih->data->cddbuffer, cdEncodeColor(shade_lr, shade_lg, shade_lb)); + cdCanvasLine(ih->data->cddbuffer, (int) x1, (int) y1, (int) x2, (int) y2); + iColorBrowserRotatePoints(&x1, &y1, &x2, &y2, ih->data->xc, ih->data->yc); + cdCanvasForeground(ih->data->cddbuffer, cdEncodeColor(shade_dr, shade_dg, shade_db)); + cdCanvasLine(ih->data->cddbuffer, (int) x1, (int) y1, (int) x2, (int) y2); + iColorBrowserRotatePoints(&x1, &y1, &x2, &y2, ih->data->xc, ih->data->yc); + cdCanvasForeground(ih->data->cddbuffer, cdEncodeColor(shade_lr, shade_lg, shade_lb)); + cdCanvasLine(ih->data->cddbuffer, (int) x1, (int) y1, (int) x2, (int) y2); + iColorBrowserRotatePoints(&x1, &y1, &x2, &y2, ih->data->xc, ih->data->yc); + cdCanvasForeground(ih->data->cddbuffer, cdEncodeColor(shade_dr, shade_dg, shade_db)); + cdCanvasLine(ih->data->cddbuffer, (int) x1, (int) y1, (int) x2, (int) y2); + iColorBrowserRotatePoints(&x1, &y1, &x2, &y2, ih->data->xc, ih->data->yc); + cdCanvasLine(ih->data->cddbuffer, (int) x1, (int) y1, (int) x2, (int) y2); + } +} + +static void iColorBrowserRenderImageSI(Ihandle* ih) +{ + int x, y, active = 1; + unsigned char *red, *green, *blue; + unsigned char bg_red, bg_green, bg_blue; + float angle, cos_angle, sin_angle; + if (!ih->data->cddbuffer) + return; + + if (!iupdrvIsActive(ih)) + active = 0; + + red = cdRedImage(ih->data->cddbuffer); + green = cdGreenImage(ih->data->cddbuffer); + blue = cdBlueImage(ih->data->cddbuffer); + + cdDecodeColor(ih->data->bgcolor, &bg_red, &bg_green, &bg_blue); + + angle = ih->data->hue * ICB_DEG2RAD; + cos_angle = cosf(angle); + sin_angle = sinf(angle); + + for (y = 0; y < ih->data->h; y++) + { + float sx_max, i; + + if (y < ih->data->Iy1) + continue; + else if (y > ih->data->Iy2) + continue; + + sx_max = iColorBrowserSXmax(ih, y); + i = iColorBrowserCalcIntensity(ih, y); + + for (x = 0; x < ih->data->w; x++) + { + if (x < ih->data->Ix) + continue; + else if (x > ih->data->Ix+(int)sx_max) + continue; + + { + int offset = y*ih->data->w + x; + unsigned char* r = red + offset; + unsigned char* g = green + offset; + unsigned char* b = blue + offset; + float s, diff; + + s = iColorBrowserCalcSaturation(ih, x, sx_max); + + iupColorHSI2RGB(ih->data->hue, s, i, r, g, b); + + diff = sx_max - (float)(x - ih->data->Ix); + if (diff<1.0f) /* anti-aliasing */ + { + *r = (unsigned char)((*r)*diff + bg_red*(1.0f-diff)); + *g = (unsigned char)((*g)*diff + bg_green*(1.0f-diff)); + *b = (unsigned char)((*b)*diff + bg_blue*(1.0f-diff)); + } + + if (!active) + { + *r = cdIupLIGTHER(*r); + *g = cdIupLIGTHER(*g); + *b = cdIupLIGTHER(*b); + } + } + } + } +} + +static void iColorBrowserUpdateCursorSI(Ihandle* ih) +{ + int x; + int y = (int)(ih->data->intensity*(ih->data->Iy2 - ih->data->Iy1)) + ih->data->Iy1; + ih->data->si_y = iupROUND(y); + x = (int)(ih->data->saturation*iColorBrowserSXmax(ih, ih->data->si_y)) + ih->data->Ix; + ih->data->si_x = iupROUND(x); +} + +static void iColorBrowserSetCursorSI(Ihandle* ih, int x, int y) +{ + float sx_max; + + if (y < ih->data->Iy1) + ih->data->si_y = ih->data->Iy1; + else if (y > ih->data->Iy2) + ih->data->si_y = ih->data->Iy2; + else + ih->data->si_y = y; + + sx_max = iColorBrowserSXmax(ih, ih->data->si_y); + + if (x < ih->data->Ix) + ih->data->si_x = ih->data->Ix; + else if (x > ih->data->Ix+sx_max) + ih->data->si_x = ih->data->Ix+(int)sx_max; + else + ih->data->si_x = x; + + ih->data->intensity = iColorBrowserCalcIntensity(ih, ih->data->si_y); + ih->data->saturation = iColorBrowserCalcSaturation(ih, ih->data->si_x, sx_max); + + if (ih->data->saturation == -0.0f) + ih->data->saturation = 0; + if (ih->data->intensity == -0.0f) + ih->data->intensity = 0; +} + +static void iColorBrowserUpdateCursorHue(Ihandle* ih) +{ + int rc = ih->data->R-ICB_SPACE-ICB_HUEWIDTH/2; + float angle = ih->data->hue * ICB_DEG2RAD; + float cos_angle = cosf(angle); + float sin_angle = sinf(angle); + float x = rc*cos_angle + ih->data->xc; + float y = rc*sin_angle + ih->data->yc; + ih->data->h_x = iupROUND(x); + ih->data->h_y = iupROUND(y); +} + +static void iColorBrowserSetCursorHue(Ihandle* ih, int x, int y) +{ + int xl = x - ih->data->xc; + int yl = y - ih->data->yc; + ih->data->hue = (float)(atan2f(yl, xl) * CD_RAD2DEG); + ih->data->hue = fmodf(ih->data->hue, 360.0f); + if (ih->data->hue < 0.0f) + ih->data->hue += 360.0f; + + iColorBrowserUpdateCursorHue(ih); +} + +static int iColorBrowserCheckInside(Ihandle* ih, int x, int y) +{ + int xl = x - ih->data->xc; + int yl = y - ih->data->yc; + float radius = sqrtf(xl*xl + yl*yl); + + if (radius < ih->data->R-ICB_SPACE-ICB_HUEWIDTH-ICB_SPACE) + return ICB_INSIDE_SI; + + if (radius > ih->data->R-ICB_SPACE-ICB_HUEWIDTH && + radius < ih->data->R-ICB_SPACE) + return ICB_INSIDE_HUE; + + return ICB_INSIDE_NONE; +} + +static void iColorBrowserHSI2RGB(Ihandle* ih) +{ + iupColorHSI2RGB(ih->data->hue, ih->data->saturation, ih->data->intensity, + &(ih->data->red), &(ih->data->green), &(ih->data->blue)); +} + +static void iColorBrowserRGB2HSI(Ihandle* ih) +{ + iupColorRGB2HSI(ih->data->red, ih->data->green, ih->data->blue, + &(ih->data->hue), &(ih->data->saturation), &(ih->data->intensity)); +} + +static void iColorBrowserUpdateDisplay(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + return; + + cdCanvasFlush(ih->data->cddbuffer); /* swap the RGB to the display canvas */ + + if (iupdrvIsActive(ih)) + { + cdCanvasForeground(ih->data->cdcanvas, CD_GRAY); + cdCanvasArc(ih->data->cdcanvas, ih->data->h_x+1, ih->data->h_y, ICB_MARKSIZE, ICB_MARKSIZE, 0, 360); + cdCanvasArc(ih->data->cdcanvas, ih->data->si_x+1, ih->data->si_y, ICB_MARKSIZE, ICB_MARKSIZE, 0, 360); + cdCanvasForeground(ih->data->cdcanvas, CD_WHITE); + cdCanvasArc(ih->data->cdcanvas, ih->data->h_x, ih->data->h_y, ICB_MARKSIZE, ICB_MARKSIZE, 0, 360); + cdCanvasArc(ih->data->cdcanvas, ih->data->si_x, ih->data->si_y, ICB_MARKSIZE, ICB_MARKSIZE, 0, 360); + } + else + { + cdCanvasForeground(ih->data->cdcanvas, CD_DARK_GRAY); + cdCanvasSector(ih->data->cdcanvas, ih->data->h_x, ih->data->h_y, ICB_MARKSIZE+1, ICB_MARKSIZE+1, 0, 360); + cdCanvasSector(ih->data->cdcanvas, ih->data->si_x, ih->data->si_y, ICB_MARKSIZE+1, ICB_MARKSIZE+1, 0, 360); + } +} + +static void iColorBrowserCallChangeCb(Ihandle* ih) +{ + IFnccc change_cb = (IFnccc) IupGetCallback(ih, "CHANGE_CB"); + if (change_cb) + change_cb(ih, ih->data->red, ih->data->green, ih->data->blue); + + iupBaseCallValueChangedCb(ih); +} + +static void iColorBrowserCallDragCb(Ihandle* ih) +{ + IFnccc drag_cb = (IFnccc) IupGetCallback(ih, "DRAG_CB"); + if (drag_cb) + drag_cb(ih, ih->data->red, ih->data->green, ih->data->blue); + + iupBaseCallValueChangedCb(ih); +} + +static int iColorBrowserHmouse(Ihandle* ih, int x, int y, int drag) +{ + iColorBrowserSetCursorHue(ih, x, y); + iColorBrowserHSI2RGB(ih); + /* must update the Si area */ + iColorBrowserRenderImageSI(ih); + iColorBrowserUpdateDisplay(ih); + + if (drag) + iColorBrowserCallDragCb(ih); + else + iColorBrowserCallChangeCb(ih); + + return IUP_DEFAULT; +} + +static int iColorBrowserSImouse(Ihandle* ih, int x, int y, int drag) +{ + iColorBrowserSetCursorSI(ih, x, y); + iColorBrowserHSI2RGB(ih); + iColorBrowserUpdateDisplay(ih); + + if (drag) + iColorBrowserCallDragCb(ih); + else + iColorBrowserCallChangeCb(ih); + + return IUP_DEFAULT; +} + + +/******************************************************************/ + + +static int iColorBrowserButton_CB(Ihandle* ih, int b, int press, int x, int y) +{ + if (b != IUP_BUTTON1) + return IUP_DEFAULT; + + cdCanvasUpdateYAxis(ih->data->cdcanvas, &y); + + if (press) + { + int inside = iColorBrowserCheckInside(ih, x, y); + + if (!ih->data->h_down && inside==ICB_INSIDE_HUE) + { + iColorBrowserHmouse(ih, x, y, 1); + ih->data->h_down = 1; + } + + if (!ih->data->si_down && inside==ICB_INSIDE_SI) + { + iColorBrowserSImouse(ih, x, y, 1); + ih->data->si_down = 1; + } + } + else + { + if (ih->data->h_down) + { + iColorBrowserHmouse(ih, x, y, 0); + ih->data->h_down = 0; + } + + if (ih->data->si_down) + { + iColorBrowserSImouse(ih, x, y, 0); + ih->data->si_down = 0; + } + } + + return IUP_DEFAULT; +} + +/* Callback for the mouse motion in the canvas */ +static int iColorBrowserMotion_CB(Ihandle* ih, int x, int y, char *status) +{ + if (!iup_isbutton1(status)) + { + ih->data->h_down = 0; + ih->data->si_down = 0; + return IUP_DEFAULT; + } + + if (ih->data->h_down) + { + cdCanvasUpdateYAxis(ih->data->cdcanvas, &y); + iColorBrowserHmouse(ih, x, y, 1); + } + else if (ih->data->si_down) + { + cdCanvasUpdateYAxis(ih->data->cdcanvas, &y); + iColorBrowserSImouse(ih, x, y, 1); + } + + return IUP_DEFAULT; +} + +static int iColorBrowserFocus_CB(Ihandle* ih, int focus) +{ + ih->data->has_focus = focus; + iColorBrowserRenderImageHue(ih); + iColorBrowserRenderImageSI(ih); + iColorBrowserUpdateDisplay(ih); + return IUP_DEFAULT; +} + +static void iColorBrowserUpdateSize(Ihandle* ih) +{ + int T, D; + + /* update canvas size */ + cdCanvasActivate(ih->data->cddbuffer); + cdCanvasGetSize(ih->data->cddbuffer, &ih->data->w, &ih->data->h, NULL, NULL); + + ih->data->R = min(ih->data->w, ih->data->h)/2; + ih->data->xc = ih->data->w/2; + ih->data->yc = ih->data->h/2; + T = ih->data->R-ICB_SPACE-ICB_HUEWIDTH-ICB_SPACE; + ih->data->Ix = ih->data->xc - T/2; /* cos(60)=0.5 */ + D = (int)(2*T*0.866); /* sin(60)=0.866 */ + ih->data->Iy1 = ih->data->yc - D/2; + ih->data->Iy2 = ih->data->Iy1 + D; + ih->data->SxMax = ih->data->xc + T; +} + +static int iColorBrowserResize_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + { + /* update canvas size */ + cdCanvasActivate(ih->data->cdcanvas); + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFERRGB, ih->data->cdcanvas); + } + + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update size */ + iColorBrowserUpdateSize(ih); + + iColorBrowserUpdateCursorHue(ih); + iColorBrowserUpdateCursorSI(ih); + + /* update render */ + iColorBrowserRenderImageHue(ih); + iColorBrowserRenderImageSI(ih); + + return IUP_DEFAULT; +} + +static int iColorBrowserRedraw_CB(Ihandle* ih) +{ + iColorBrowserUpdateDisplay(ih); + return IUP_DEFAULT; +} + +static int iColorBrowserWheel_CB(Ihandle* ih, float delta) +{ + ih->data->hue += delta; + + iColorBrowserUpdateCursorHue(ih); + iColorBrowserHSI2RGB(ih); + /* must update the Si area */ + iColorBrowserRenderImageSI(ih); + iColorBrowserUpdateDisplay(ih); + iColorBrowserCallChangeCb(ih); + + return IUP_DEFAULT; +} + +static int iColorBrowserKeypress_CB(Ihandle* ih, int c, int press) +{ + int x, y, changing_hue = 0; + + if (!press) + return IUP_DEFAULT; + + x = ih->data->si_x; + y = ih->data->si_y; + + switch (c) + { + case K_UP: + y++; + break; + case K_DOWN: + y--; + break; + case K_RIGHT: + x++; + break; + case K_LEFT: + x--; + break; + case K_PGUP: + ih->data->hue += 1.0f; + changing_hue = 1; + break; + case K_PGDN: + ih->data->hue -= 1.0f; + changing_hue = 1; break; + case K_HOME: + ih->data->hue = 0.0f; + changing_hue = 1; + break; + case K_END: + ih->data->hue = 180.0f; + changing_hue = 1; + break; + default: + return IUP_DEFAULT; + } + + if (changing_hue) + { + iColorBrowserUpdateCursorHue(ih); + /* must update the Si area */ + iColorBrowserRenderImageSI(ih); + } + else + iColorBrowserSetCursorSI(ih, x, y); + + iColorBrowserHSI2RGB(ih); + + iColorBrowserUpdateDisplay(ih); + iColorBrowserCallChangeCb(ih); + + return IUP_IGNORE; /* to avoid arrow keys being processed by the system */ +} + + +/*********************************************************************************/ + + +static char* iColorBrowserGetHSIAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(100); + sprintf(buffer, "%f %f %f", (double)ih->data->hue, (double)ih->data->saturation, (double)ih->data->intensity); + return buffer; +} + +static int iColorBrowserSetHSIAttrib(Ihandle* ih, const char* value) +{ + float old_hue = ih->data->hue, + old_saturation = ih->data->saturation, + old_intensity = ih->data->intensity; + + if (!iupStrToHSI(value, &ih->data->hue, &ih->data->saturation, &ih->data->intensity)) + return 0; + + if (ih->data->cddbuffer) + { + if (old_hue != ih->data->hue) + iColorBrowserUpdateCursorHue(ih); + if (old_saturation != ih->data->saturation || old_intensity != ih->data->intensity) + iColorBrowserUpdateCursorSI(ih); + iColorBrowserHSI2RGB(ih); + iColorBrowserRenderImageSI(ih); + iColorBrowserUpdateDisplay(ih); + } + + return 0; +} + +static char* iColorBrowserGetRGBAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(20); + sprintf(buffer, "%d %d %d", (int) ih->data->red, (int) ih->data->green, (int) ih->data->blue); + return buffer; +} + +static int iColorBrowserSetRGBAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + + ih->data->red = r; + ih->data->green = g; + ih->data->blue = b; + iColorBrowserRGB2HSI(ih); + + if (ih->data->cddbuffer) + { + iColorBrowserUpdateCursorHue(ih); + iColorBrowserUpdateCursorSI(ih); + iColorBrowserRenderImageSI(ih); + iColorBrowserUpdateDisplay(ih); + } + + return 0; +} + +static int iColorBrowserSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (!value) + value = iupControlBaseGetParentBgColor(ih); + ih->data->bgcolor = cdIupConvertColor(value); + + if (ih->data->cddbuffer) + { + iColorBrowserRenderImageHue(ih); + iColorBrowserRenderImageSI(ih); + iColorBrowserUpdateDisplay(ih); + } + return 1; +} + +static int iColorBrowserSetActiveAttrib(Ihandle* ih, const char* value) +{ + iupBaseSetActiveAttrib(ih, value); + iColorBrowserUpdateDisplay(ih); + return 0; /* do not store value in hash table */ +} + + +/****************************************************************************/ + + +static int iColorBrowserMapMethod(Ihandle* ih) +{ + ih->data->cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!ih->data->cdcanvas) + return IUP_ERROR; + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFERRGB, ih->data->cdcanvas); + + if (ih->data->cddbuffer) + iColorBrowserUpdateSize(ih); + + return IUP_NOERROR; +} + +static void iColorBrowserUnMapMethod(Ihandle* ih) +{ + if (ih->data->cddbuffer) + cdKillCanvas(ih->data->cddbuffer); + + if (ih->data->cdcanvas) + cdKillCanvas(ih->data->cdcanvas); +} + +static int iColorBrowserCreateMethod(Ihandle* ih, void **params) +{ + (void)params; + + /* free the data allocated by IupCanvas */ + if (ih->data) free(ih->data); + ih->data = iupALLOCCTRLDATA(); + + /* change the IupCanvas default values */ + IupSetfAttribute(ih, "RASTERSIZE", "%dx%d", ICB_DEFAULTSIZE, ICB_DEFAULTSIZE); + iupAttribSetStr(ih, "BORDER", "NO"); + ih->expand = IUP_EXPAND_NONE; + + /* IupCanvas callbacks */ + IupSetCallback(ih, "ACTION", (Icallback)iColorBrowserRedraw_CB); + IupSetCallback(ih, "RESIZE_CB", (Icallback)iColorBrowserResize_CB); + IupSetCallback(ih, "BUTTON_CB", (Icallback)iColorBrowserButton_CB); + IupSetCallback(ih, "MOTION_CB", (Icallback)iColorBrowserMotion_CB); + IupSetCallback(ih, "FOCUS_CB", (Icallback)iColorBrowserFocus_CB); + IupSetCallback(ih, "KEYPRESS_CB", (Icallback)iColorBrowserKeypress_CB); + IupSetCallback(ih, "WHEEL_CB", (Icallback)iColorBrowserWheel_CB); + + return IUP_NOERROR; +} + +Iclass* iupColorBrowserGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "colorbrowser"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iColorBrowserCreateMethod; + ic->Map = iColorBrowserMapMethod; + ic->UnMap = iColorBrowserUnMapMethod; + + /* IupColorBrowser Callbacks */ + iupClassRegisterCallback(ic, "DRAG_CB", "ccc"); + iupClassRegisterCallback(ic, "CHANGE_CB", "ccc"); + iupClassRegisterCallback(ic, "VALUECHANGED_CB", ""); + + /* IupColorBrowser only */ + iupClassRegisterAttribute(ic, "RGB", iColorBrowserGetRGBAttrib, iColorBrowserSetRGBAttrib, "255 0 0", NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); /* force new default value */ + iupClassRegisterAttribute(ic, "HSI", iColorBrowserGetHSIAttrib, iColorBrowserSetHSIAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* Overwrite IupCanvas Attributes */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iColorBrowserSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", iupControlBaseGetBgColorAttrib, iColorBrowserSetBgColorAttrib, NULL, "255 255 255", IUPAF_NO_INHERIT); /* overwrite canvas implementation, set a system default to force a new default */ + + return ic; +} + +Ihandle *IupColorBrowser(void) +{ + return IupCreate("colorbrowser"); +} diff --git a/iup/srccontrols/color/iup_colorbrowserdlg.c b/iup/srccontrols/color/iup_colorbrowserdlg.c new file mode 100755 index 0000000..65e4d37 --- /dev/null +++ b/iup/srccontrols/color/iup_colorbrowserdlg.c @@ -0,0 +1,1120 @@ +/** \file + * \brief IupColorDlg pre-defined dialog control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" +#include "iupcontrols.h" + +#include +#include +#include +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_strmessage.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_controls.h" +#include "iup_cdutil.h" +#include "iup_register.h" +#include "iup_register.h" +#include "iup_image.h" +#include "iup_colorhsi.h" +#include "iup_childtree.h" + + +const char* default_colortable_cells[20] = +{ + "0 0 0", "64 64 64", "128 128 128", "144 144 144", "0 128 128", "128 0 128", "128 128 0", "128 0 0", "0 128 0", "0 0 128", + "255 255 255", "240 240 240", "224 224 224", "192 192 192", "0 255 255", "255 0 255", "255 255 0", "255 0 0", "0 255 0", "0 0 255" +}; + +typedef struct _IcolorDlgData +{ + int status; + + long previous_color, color; + + float hue, saturation, intensity; + unsigned char red, green, blue, alpha; + + Ihandle *red_txt, *green_txt, *blue_txt, *alpha_txt; + Ihandle *hue_txt, *intensity_txt, *saturation_txt; + Ihandle *color_browser, *color_cnv, *colorhex_txt; + Ihandle *colortable_cbar, *alpha_val; + Ihandle *help_bt; + + cdCanvas* color_cdcanvas, *color_cddbuffer; +} IcolorDlgData; + + +static void iColorBrowserDlgColorCnvRepaint(IcolorDlgData* colordlg_data) +{ + int x, y, w, h, width, height, box_size = 10; + + if (!colordlg_data->color_cddbuffer) + return; + + cdCanvasGetSize(colordlg_data->color_cddbuffer, &width, &height, NULL, NULL); + + cdCanvasBackground(colordlg_data->color_cddbuffer, CD_WHITE); + cdCanvasClear(colordlg_data->color_cddbuffer); + + w = (width+box_size-1)/box_size; + h = (height+box_size-1)/box_size; + + cdCanvasForeground(colordlg_data->color_cddbuffer, CD_GRAY); + + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + if (((x%2) && (y%2)) || (((x+1)%2) && ((y+1)%2))) + { + int xmin, xmax, ymin, ymax; + + xmin = x*box_size; + xmax = xmin+box_size; + ymin = y*box_size; + ymax = ymin+box_size; + + cdCanvasBox(colordlg_data->color_cddbuffer, xmin, xmax, ymin, ymax); + } + } + } + + cdCanvasForeground(colordlg_data->color_cddbuffer, colordlg_data->previous_color); + cdCanvasBox(colordlg_data->color_cddbuffer, 0, width/2, 0, height); + + cdCanvasForeground(colordlg_data->color_cddbuffer, colordlg_data->color); + cdCanvasBox(colordlg_data->color_cddbuffer, width/2+1, width, 0, height); + + cdCanvasFlush(colordlg_data->color_cddbuffer); +} + +static void iColorBrowserDlgHSI2RGB(IcolorDlgData* colordlg_data) +{ + iupColorHSI2RGB(colordlg_data->hue, colordlg_data->saturation, colordlg_data->intensity, + &colordlg_data->red, &colordlg_data->green, &colordlg_data->blue); +} + +static void iColorBrowserDlgRGB2HSI(IcolorDlgData* colordlg_data) +{ + iupColorRGB2HSI(colordlg_data->red, colordlg_data->green, colordlg_data->blue, + &(colordlg_data->hue), &(colordlg_data->saturation), &(colordlg_data->intensity)); +} + +static void iColorBrowserDlgHex_TXT_Update(IcolorDlgData* colordlg_data) +{ + IupSetfAttribute(colordlg_data->colorhex_txt, "VALUE", "#%02X%02X%02X", (int)colordlg_data->red, (int)colordlg_data->green, (int)colordlg_data->blue); +} + +static int iupStrHexToRGB(const char *str, unsigned char *r, unsigned char *g, unsigned char *b) +{ + unsigned int ri = 0, gi = 0, bi = 0; + if (!str) return 0; + if (sscanf(str, "#%2X%2X%2X", &ri, &gi, &bi) != 3) return 0; + if (ri > 255 || gi > 255 || bi > 255) return 0; + *r = (unsigned char)ri; + *g = (unsigned char)gi; + *b = (unsigned char)bi; + return 1; +} + +/*************************************************\ +* Updates text fields with the current HSI values * +\*************************************************/ +static void iColorBrowserDlgHSI_TXT_Update(IcolorDlgData* colordlg_data) +{ + IupSetfAttribute(colordlg_data->hue_txt, "VALUE", "%d", iupROUND(colordlg_data->hue)); + IupSetfAttribute(colordlg_data->saturation_txt, "VALUE", "%d", iupROUND(colordlg_data->saturation * 100)); + IupSetfAttribute(colordlg_data->intensity_txt, "VALUE", "%d", iupROUND(colordlg_data->intensity * 100)); +} + +/*************************************************\ +* Updates text fields with the current RGB values * +\*************************************************/ +static void iColorBrowserDlgRGB_TXT_Update(IcolorDlgData* colordlg_data) +{ + IupSetfAttribute(colordlg_data->red_txt, "VALUE", "%d", (int) colordlg_data->red); + IupSetfAttribute(colordlg_data->green_txt, "VALUE", "%d", (int) colordlg_data->green); + IupSetfAttribute(colordlg_data->blue_txt, "VALUE", "%d", (int) colordlg_data->blue); +} + +static void iColorBrowserDlgBrowserRGB_Update(IcolorDlgData* colordlg_data) +{ + IupSetfAttribute(colordlg_data->color_browser, "RGB", "%d %d %d", colordlg_data->red, colordlg_data->green, colordlg_data->blue); +} + +static void iColorBrowserDlgBrowserHSI_Update(IcolorDlgData* colordlg_data) +{ + IupSetfAttribute(colordlg_data->color_browser, "HSI", "%f %f %f", (double)colordlg_data->hue, (double)colordlg_data->saturation, (double)colordlg_data->intensity); +} + +/*****************************************\ +* Sets the RGB color in the Color Canvas * +\*****************************************/ +static void iColorBrowserDlgColor_Update(IcolorDlgData* colordlg_data) +{ + colordlg_data->color = cdEncodeColor(colordlg_data->red, colordlg_data->green, colordlg_data->blue); + colordlg_data->color = cdEncodeAlpha(colordlg_data->color, colordlg_data->alpha); + iColorBrowserDlgColorCnvRepaint(colordlg_data); +} + +static void iColorBrowserDlgHSIChanged(IcolorDlgData* colordlg_data) +{ + iColorBrowserDlgHSI2RGB(colordlg_data); + iColorBrowserDlgBrowserHSI_Update(colordlg_data); + iColorBrowserDlgHex_TXT_Update(colordlg_data); + iColorBrowserDlgRGB_TXT_Update(colordlg_data); + iColorBrowserDlgColor_Update(colordlg_data); +} + +static void iColorBrowserDlgRGBChanged(IcolorDlgData* colordlg_data) +{ + iColorBrowserDlgRGB2HSI(colordlg_data); + iColorBrowserDlgBrowserRGB_Update(colordlg_data); + iColorBrowserDlgHex_TXT_Update(colordlg_data); + iColorBrowserDlgHSI_TXT_Update(colordlg_data); + iColorBrowserDlgColor_Update(colordlg_data); +} + +/***********************************************\ +* Initializes the default values to the element * +\***********************************************/ +static void iColorBrowserDlgInit_Defaults(IcolorDlgData* colordlg_data) +{ + char* str = iupStrGetMemory(100); + Ihandle* box; + int i; + + IupSetAttribute(colordlg_data->color_browser, "RGB", "0 0 0"); + + IupSetAttribute(colordlg_data->red_txt, "VALUE", "0"); + IupSetAttribute(colordlg_data->green_txt, "VALUE", "0"); + IupSetAttribute(colordlg_data->blue_txt, "VALUE", "0"); + + IupSetAttribute(colordlg_data->hue_txt, "VALUE", "0"); + IupSetAttribute(colordlg_data->saturation_txt, "VALUE", "0"); + IupSetAttribute(colordlg_data->intensity_txt, "VALUE", "0"); + + IupSetAttribute(colordlg_data->colorhex_txt, "VALUE", "#000000"); + + colordlg_data->alpha = 255; + IupSetAttribute(colordlg_data->alpha_val, "VALUE", "255"); + IupSetAttribute(colordlg_data->alpha_txt, "VALUE", "255"); + + box = IupGetParent(colordlg_data->alpha_val); + IupSetAttribute(box, "FLOATING", "YES"); + IupSetAttribute(box, "VISIBLE", "NO"); + + box = IupGetParent(colordlg_data->colortable_cbar); + IupSetAttribute(box, "FLOATING", "YES"); + IupSetAttribute(box, "VISIBLE", "NO"); + + box = IupGetParent(colordlg_data->colorhex_txt); + IupSetAttribute(box, "FLOATING", "YES"); + IupSetAttribute(box, "VISIBLE", "NO"); + + for(i = 0; i < 20; i++) + { + sprintf(str, "CELL%d", i); + IupSetAttribute(colordlg_data->colortable_cbar, str, default_colortable_cells[i]); + } +} + + +/**************************************************************************************************************/ +/* Internal Callbacks */ +/**************************************************************************************************************/ + + +static int iColorBrowserDlgButtonOK_CB(Ihandle* ih) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + colordlg_data->status = 1; + return IUP_CLOSE; +} + +static int iColorBrowserDlgButtonCancel_CB(Ihandle* ih) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + colordlg_data->status = 0; + return IUP_CLOSE; +} + +static int iColorBrowserDlgButtonHelp_CB(Ihandle* ih) +{ + Icallback cb = IupGetCallback(IupGetDialog(ih), "HELP_CB"); + if (cb && cb(ih) == IUP_CLOSE) + { + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + colordlg_data->status = 0; + return IUP_CLOSE; + } + return IUP_DEFAULT; +} + +static int iColorBrowserDlgColorCnvRedraw_CB(Ihandle* ih) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + if (!colordlg_data->color_cddbuffer) + return IUP_DEFAULT; + + cdCanvasActivate(colordlg_data->color_cddbuffer); + + iColorBrowserDlgColorCnvRepaint(colordlg_data); + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgRedAction_CB(Ihandle* ih, int c, char *value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int vi; + + if (iupStrToInt(value, &vi)) + { + colordlg_data->red = (unsigned char)vi; + iColorBrowserDlgRGBChanged(colordlg_data); + } + + (void)c; + return IUP_DEFAULT; +} + +static int iColorBrowserDlgRedSpin_CB(Ihandle* ih, int vi) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + colordlg_data->red = (unsigned char)vi; + iColorBrowserDlgRGBChanged(colordlg_data); + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgGreenAction_CB(Ihandle* ih, int c, char *value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int vi; + + if (iupStrToInt(value, &vi)) + { + colordlg_data->green = (unsigned char)vi; + iColorBrowserDlgRGBChanged(colordlg_data); + } + + (void)c; + return IUP_DEFAULT; +} + +static int iColorBrowserDlgGreenSpin_CB(Ihandle* ih, int vi) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + colordlg_data->green = (unsigned char)vi; + iColorBrowserDlgRGBChanged(colordlg_data); + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgBlueAction_CB(Ihandle* ih, int c, char *value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int vi; + + if (iupStrToInt(value, &vi)) + { + colordlg_data->blue = (unsigned char)vi; + iColorBrowserDlgRGBChanged(colordlg_data); + } + + (void)c; + return IUP_DEFAULT; +} + +static int iColorBrowserDlgBlueSpin_CB(Ihandle* ih, int vi) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + colordlg_data->blue = (unsigned char)vi; + iColorBrowserDlgRGBChanged(colordlg_data); + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgHueAction_CB(Ihandle* ih, int c, char *value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int vi; + + if (iupStrToInt(value, &vi)) + { + colordlg_data->hue = (float)vi; + iColorBrowserDlgHSIChanged(colordlg_data); + } + + (void)c; + return IUP_DEFAULT; +} + +static int iColorBrowserDlgHueSpin_CB(Ihandle* ih, int vi) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + colordlg_data->hue = (float)vi; + iColorBrowserDlgHSIChanged(colordlg_data); + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgSaturationAction_CB(Ihandle* ih, int c, char *value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int vi; + + if (iupStrToInt(value, &vi)) + { + colordlg_data->saturation = (float)vi/100.0f; + iColorBrowserDlgHSIChanged(colordlg_data); + } + + (void)c; + return IUP_DEFAULT; +} + +static int iColorBrowserDlgSaturationSpin_CB(Ihandle* ih, int vi) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + colordlg_data->saturation = (float)vi/100.0f; + iColorBrowserDlgHSIChanged(colordlg_data); + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgIntensityAction_CB(Ihandle* ih, int c, char *value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int vi; + + if (iupStrToInt(value, &vi)) + { + colordlg_data->intensity = (float)vi/100.0f; + iColorBrowserDlgHSIChanged(colordlg_data); + } + + (void)c; + return IUP_DEFAULT; +} + +static int iColorBrowserDlgIntensitySpin_CB(Ihandle* ih, int vi) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + colordlg_data->intensity = (float)vi/100.0f; + iColorBrowserDlgHSIChanged(colordlg_data); + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgHexAction_CB(Ihandle* ih, int c, char* value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + if (iupStrHexToRGB(value, &colordlg_data->red, &colordlg_data->green, &colordlg_data->blue)) + { + iColorBrowserDlgRGB2HSI(colordlg_data); + iColorBrowserDlgBrowserRGB_Update(colordlg_data); + iColorBrowserDlgHSI_TXT_Update(colordlg_data); + iColorBrowserDlgRGB_TXT_Update(colordlg_data); + iColorBrowserDlgColor_Update(colordlg_data); + } + + (void)c; + return IUP_DEFAULT; +} + +static int iColorBrowserDlgColorSelDrag_CB(Ihandle* ih, unsigned char r, unsigned char g, unsigned char b) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + colordlg_data->red = r; + colordlg_data->green = g; + colordlg_data->blue = b; + + iColorBrowserDlgRGB2HSI(colordlg_data); + iColorBrowserDlgHex_TXT_Update(colordlg_data); + iColorBrowserDlgHSI_TXT_Update(colordlg_data); + iColorBrowserDlgRGB_TXT_Update(colordlg_data); + + colordlg_data->color = cdEncodeColor(colordlg_data->red,colordlg_data->green,colordlg_data->blue); + colordlg_data->color = cdEncodeAlpha(colordlg_data->color, colordlg_data->alpha); + iColorBrowserDlgColorCnvRepaint(colordlg_data); + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgAlphaVal_CB(Ihandle* ih, double val) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + colordlg_data->alpha = (unsigned char)val; + IupSetfAttribute(colordlg_data->alpha_txt, "VALUE", "%d", (int)colordlg_data->alpha); + + colordlg_data->color = cdEncodeAlpha(colordlg_data->color, colordlg_data->alpha); + iColorBrowserDlgColorCnvRepaint(colordlg_data); + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgAlphaAction_CB(Ihandle* ih, int c, char* value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int vi; + + if (iupStrToInt(value, &vi)) + { + colordlg_data->alpha = (unsigned char)vi; + IupSetfAttribute(colordlg_data->alpha_val, "VALUE", "%d", (int)colordlg_data->alpha); + + colordlg_data->color = cdEncodeAlpha(colordlg_data->color, colordlg_data->alpha); + iColorBrowserDlgColorCnvRepaint(colordlg_data); + } + + (void)c; + return IUP_DEFAULT; +} + +static int iColorBrowserDlgAlphaSpin_CB(Ihandle* ih, int vi) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + colordlg_data->alpha = (unsigned char)vi; + IupSetfAttribute(colordlg_data->alpha_val, "VALUE", "%d", (int)colordlg_data->alpha); + + colordlg_data->color = cdEncodeAlpha(colordlg_data->color, colordlg_data->alpha); + iColorBrowserDlgColorCnvRepaint(colordlg_data); + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgColorTableSelect_CB(Ihandle* ih, int cell, int type) +{ + char* str = iupStrGetMemory(30); + + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + sprintf(str, "CELL%d", cell); + iupStrToRGB(IupGetAttribute(ih, str), &colordlg_data->red, &colordlg_data->green, &colordlg_data->blue); + + iColorBrowserDlgRGB_TXT_Update(colordlg_data); + iColorBrowserDlgRGBChanged(colordlg_data); + + (void)type; + return IUP_DEFAULT; +} + +static int iColorBrowserDlgColorCnvButton_CB(Ihandle* ih, int b, int press, int x, int y) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int width; + (void)y; + + if (b != IUP_BUTTON1 || !press || !colordlg_data->color_cddbuffer) + return IUP_DEFAULT; + + cdCanvasGetSize(colordlg_data->color_cddbuffer, &width, NULL, NULL, NULL); + + if (x < width/2) + { + /* reset color to previous */ + colordlg_data->red = cdRed(colordlg_data->previous_color); + colordlg_data->green = cdGreen(colordlg_data->previous_color); + colordlg_data->blue = cdBlue(colordlg_data->previous_color); + colordlg_data->alpha = cdAlpha(colordlg_data->previous_color); + + IupSetfAttribute(colordlg_data->alpha_txt, "VALUE", "%d", (int)colordlg_data->alpha); + IupSetfAttribute(colordlg_data->alpha_val, "VALUE", "%d", (int)colordlg_data->alpha); + + iColorBrowserDlgRGB_TXT_Update(colordlg_data); + iColorBrowserDlgRGBChanged(colordlg_data); + } + + return IUP_DEFAULT; +} + +static int iColorBrowserDlgColorCnvMap_CB(Ihandle* ih) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + /* Create Canvas */ + colordlg_data->color_cdcanvas = cdCreateCanvas(CD_IUP, colordlg_data->color_cnv); + + if (!colordlg_data->color_cdcanvas) + return IUP_DEFAULT; + + /* this can fail if canvas size is zero */ + colordlg_data->color_cddbuffer = cdCreateCanvas(CD_DBUFFERRGB, colordlg_data->color_cdcanvas); + return IUP_DEFAULT; +} + +static int iColorBrowserDlgColorCnvUnMap_CB(Ihandle* ih) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + if (colordlg_data->color_cddbuffer) + cdKillCanvas(colordlg_data->color_cddbuffer); + + if (colordlg_data->color_cdcanvas) + cdKillCanvas(colordlg_data->color_cdcanvas); + + return IUP_DEFAULT; +} + + +/**************************************************************************************************************/ +/* Attributes */ +/**************************************************************************************************************/ + + +static char* iColorBrowserDlgGetStatusAttrib(Ihandle* ih) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + if (colordlg_data->status) + return "1"; + else + return NULL; +} + +static int iColorBrowserDlgSetShowHelpAttrib(Ihandle* ih, const char* value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + IupSetAttribute(colordlg_data->help_bt, "VISIBLE", iupStrBoolean(value)? "YES": "NO"); + return 1; +} + +static int iColorBrowserDlgSetShowHexAttrib(Ihandle* ih, const char* value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + /* valid only before map */ + if (ih->handle) + return 1; + + if (iupStrBoolean(value)) + { + Ihandle* box = IupGetParent(colordlg_data->colorhex_txt); + IupSetAttribute(box, "FLOATING", NULL); + IupSetAttribute(box, "VISIBLE", "YES"); + } + + return 1; +} + +static int iColorBrowserDlgSetShowColorTableAttrib(Ihandle* ih, const char* value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + /* valid only before map */ + if (ih->handle) + return 1; + + if (iupStrBoolean(value)) + { + Ihandle* box = IupGetParent(colordlg_data->colortable_cbar); + IupSetAttribute(box, "FLOATING", NULL); + IupSetAttribute(box, "VISIBLE", "YES"); + } + + return 1; +} + +static int iColorBrowserDlgSetShowAlphaAttrib(Ihandle* ih, const char* value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + /* valid only before map */ + if (ih->handle) + return 1; + + if (iupStrBoolean(value)) + { + Ihandle* box = IupGetParent(colordlg_data->alpha_val); + IupSetAttribute(box, "FLOATING", NULL); + IupSetAttribute(box, "VISIBLE", "YES"); + } + + return 1; +} + +static int iColorBrowserDlgSetAlphaAttrib(Ihandle* ih, const char* value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int alpha; + if (iupStrToInt(value, &alpha)) + { + colordlg_data->alpha = (unsigned char)alpha; + IupSetfAttribute(colordlg_data->alpha_txt, "VALUE", "%d", (int)colordlg_data->alpha); + IupSetfAttribute(colordlg_data->alpha_val, "VALUE", "%d", (int)colordlg_data->alpha); + + colordlg_data->color = cdEncodeAlpha(colordlg_data->color, colordlg_data->alpha); + colordlg_data->previous_color = cdEncodeAlpha(colordlg_data->previous_color, colordlg_data->alpha); + iColorBrowserDlgColorCnvRepaint(colordlg_data); + + if (!ih->handle) /* do it only before map */ + IupSetAttribute(ih, "SHOWALPHA", "YES"); + } + + return 1; +} + +static char* iColorBrowserDlgGetAlphaAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(100); + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + sprintf(buffer, "%d", (int)colordlg_data->alpha); + return buffer; +} + +static int iColorBrowserDlgSetValueAttrib(Ihandle* ih, const char* value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int ret = iupStrToRGBA(value, &colordlg_data->red, &colordlg_data->green, &colordlg_data->blue, &colordlg_data->alpha); + if (!ret) + return 0; + + colordlg_data->previous_color = cdEncodeColor(colordlg_data->red, colordlg_data->green, colordlg_data->blue); + colordlg_data->previous_color = cdEncodeAlpha(colordlg_data->previous_color, colordlg_data->alpha); + + if (ret == 4) + { + IupSetfAttribute(colordlg_data->alpha_txt, "VALUE", "%d", (int)colordlg_data->alpha); + IupSetfAttribute(colordlg_data->alpha_val, "VALUE", "%d", (int)colordlg_data->alpha); + + if (!ih->handle) /* do it only before map */ + IupSetAttribute(ih, "SHOWALPHA", "YES"); + } + + iColorBrowserDlgRGB_TXT_Update(colordlg_data); + iColorBrowserDlgRGBChanged(colordlg_data); + + return 0; +} + +static char* iColorBrowserDlgGetValueAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(100); + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + if (iupAttribGetBoolean(ih, "SHOWALPHA")) + sprintf(buffer, "%d %d %d %d", (int)colordlg_data->red, (int)colordlg_data->green, (int)colordlg_data->blue, (int)colordlg_data->alpha); + else + sprintf(buffer, "%d %d %d", (int)colordlg_data->red, (int)colordlg_data->green, (int)colordlg_data->blue); + return buffer; +} + +static int iupStrToHSI_Int(const char *str, int *h, int *s, int *i) +{ + int fh, fs, fi; + if (!str) return 0; + if (sscanf(str, "%d %d %d", &fh, &fs, &fi) != 3) return 0; + if (fh > 359 || fs > 100 || fi > 100) return 0; + if (fh < 0 || fs < 0 || fi < 0) return 0; + *h = fh; + *s = fs; + *i = fi; + return 1; +} + +static int iColorBrowserDlgSetValueHSIAttrib(Ihandle* ih, const char* value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + int hue, saturation, intensity; + + if (!iupStrToHSI_Int(value, &hue, &saturation, &intensity)) + return 0; + + colordlg_data->hue = (float)hue; + colordlg_data->saturation = (float)saturation/100.0f; + colordlg_data->intensity = (float)intensity/100.0f; + + iColorBrowserDlgHSI2RGB(colordlg_data); + colordlg_data->previous_color = cdEncodeColor(colordlg_data->red, colordlg_data->green, colordlg_data->blue); + colordlg_data->previous_color = cdEncodeAlpha(colordlg_data->previous_color, colordlg_data->alpha); + + iColorBrowserDlgHSIChanged(colordlg_data); + return 0; +} + +static char* iColorBrowserDlgGetValueHSIAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(100); + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + sprintf(buffer, "%d %d %d", (int)colordlg_data->hue, (int)(colordlg_data->saturation*100), (int)(colordlg_data->intensity*100)); + return buffer; +} + +static int iColorBrowserDlgSetValueHexAttrib(Ihandle* ih, const char* value) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + if (!iupStrHexToRGB(value, &colordlg_data->red, &colordlg_data->green, &colordlg_data->blue)) + return 0; + + colordlg_data->previous_color = cdEncodeColor(colordlg_data->red, colordlg_data->green, colordlg_data->blue); + colordlg_data->previous_color = cdEncodeAlpha(colordlg_data->previous_color, colordlg_data->alpha); + + iColorBrowserDlgRGB2HSI(colordlg_data); + iColorBrowserDlgBrowserRGB_Update(colordlg_data); + iColorBrowserDlgHSI_TXT_Update(colordlg_data); + iColorBrowserDlgRGB_TXT_Update(colordlg_data); + iColorBrowserDlgColor_Update(colordlg_data); + return 0; +} + +static char* iColorBrowserDlgGetValueHexAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(100); + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + sprintf(buffer, "#%02X%02X%02X", (int)colordlg_data->red, (int)colordlg_data->green, (int)colordlg_data->blue); + return buffer; +} + +static char* iColorBrowserDlgGetColorTableAttrib(Ihandle* ih) +{ + int i, inc, off = 0; + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + char* color_str, attrib_str[30]; + char* str = iupStrGetMemory(300); + for (i=0; i < 20; i++) + { + sprintf(attrib_str, "CELL%d", i); + color_str = IupGetAttribute(colordlg_data->colortable_cbar, attrib_str); + inc = strlen(color_str); + memcpy(str+off, color_str, inc); + memcpy(str+off+inc, ";", 1); + off += inc+1; + } + str[off-1] = 0; /* remove last separator */ + return str; +} + +static int iColorBrowserDlgSetColorTableAttrib(Ihandle* ih, const char* value) +{ + int i = 0; + unsigned char r, g, b; + char str[30]; + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + + if (!ih->handle) /* do it only before map */ + iColorBrowserDlgSetShowColorTableAttrib(ih, "YES"); + + while (value && *value && i < 20) + { + if (iupStrToRGB(value, &r, &g, &b)) + { + sprintf(str, "CELL%d", i); + IupSetfAttribute(colordlg_data->colortable_cbar, str, "%d %d %d", (int)r, (int)g, (int)b); + } + + value = strchr(value, ';'); + if (value) value++; + i++; + } + + return 1; +} + + +/**************************************************************************************************************/ +/* Methods */ +/**************************************************************************************************************/ + +static int iColorBrowserDlgMapMethod(Ihandle* ih) +{ + if (!IupGetCallback(ih, "HELP_CB")) + { + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + IupSetAttribute(colordlg_data->help_bt, "VISIBLE", "NO"); + } + + return IUP_NOERROR; +} + +static void iColorBrowserDlgDestroyMethod(Ihandle* ih) +{ + IcolorDlgData* colordlg_data = (IcolorDlgData*)iupAttribGetInherit(ih, "_IUP_GC_DATA"); + free(colordlg_data); +} + +static int iColorBrowserDlgCreateMethod(Ihandle* ih, void** params) +{ + Ihandle *ok_bt, *cancel_bt; + Ihandle *rgb_vb, *hsi_vb, *clr_vb; + Ihandle *lin1, *lin2, *col1, *col2; + + IcolorDlgData* colordlg_data = (IcolorDlgData*)malloc(sizeof(IcolorDlgData)); + memset(colordlg_data, 0, sizeof(IcolorDlgData)); + iupAttribSetStr(ih, "_IUP_GC_DATA", (char*)colordlg_data); + + /* ======================================================================= */ + /* BUTTONS ============================================================= */ + /* ======================================================================= */ + ok_bt = IupButton("OK", NULL); /* Ok Button */ + IupSetAttribute(ok_bt, "PADDING", "20x0"); + IupSetCallback (ok_bt, "ACTION", (Icallback)iColorBrowserDlgButtonOK_CB); + IupSetAttributeHandle(ih, "DEFAULTENTER", ok_bt); + + cancel_bt = IupButton(iupStrMessageGet("IUP_CANCEL"), NULL); /* Cancel Button */ + IupSetAttribute(cancel_bt, "PADDING", "20x0"); + IupSetCallback (cancel_bt, "ACTION", (Icallback)iColorBrowserDlgButtonCancel_CB); + IupSetAttributeHandle(ih, "DEFAULTESC", cancel_bt); + + colordlg_data->help_bt = IupButton(iupStrMessageGet("IUP_HELP"), NULL); /* Help Button */ + IupSetAttribute(colordlg_data->help_bt, "PADDING", "20x0"); + IupSetCallback (colordlg_data->help_bt, "ACTION", (Icallback)iColorBrowserDlgButtonHelp_CB); + + /* ======================================================================= */ + /* COLOR =============================================================== */ + /* ======================================================================= */ + colordlg_data->color_browser = IupColorBrowser(); + IupSetAttribute(colordlg_data->color_browser, "EXPAND", "YES"); + IupSetCallback(colordlg_data->color_browser, "DRAG_CB", (Icallback)iColorBrowserDlgColorSelDrag_CB); + IupSetCallback(colordlg_data->color_browser, "CHANGE_CB", (Icallback)iColorBrowserDlgColorSelDrag_CB); + + colordlg_data->color_cnv = IupCanvas(NULL); /* Canvas of the color */ + IupSetAttribute(colordlg_data->color_cnv, "SIZE", "x12"); + IupSetAttribute(colordlg_data->color_cnv, "CANFOCUS", "NO"); + IupSetAttribute(colordlg_data->color_cnv, "EXPAND", "HORIZONTAL"); + IupSetCallback (colordlg_data->color_cnv, "ACTION", (Icallback)iColorBrowserDlgColorCnvRedraw_CB); + IupSetCallback (colordlg_data->color_cnv, "MAP_CB", (Icallback)iColorBrowserDlgColorCnvMap_CB); + IupSetCallback (colordlg_data->color_cnv, "UNMAP_CB", (Icallback)iColorBrowserDlgColorCnvUnMap_CB); + IupSetCallback (colordlg_data->color_cnv, "BUTTON_CB", (Icallback)iColorBrowserDlgColorCnvButton_CB); + + colordlg_data->colorhex_txt = IupText(NULL); /* Hex of the color */ + IupSetAttribute(colordlg_data->colorhex_txt, "VISIBLECOLUMNS", "7"); + IupSetCallback (colordlg_data->colorhex_txt, "ACTION", (Icallback)iColorBrowserDlgHexAction_CB); + IupSetAttribute(colordlg_data->colorhex_txt, "MASK", "#[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"); + + /* ======================================================================= */ + /* ALPHA TRANSPARENCY ================================================== */ + /* ======================================================================= */ + colordlg_data->alpha_val = IupVal("HORIZONTAL"); + IupSetAttribute(colordlg_data->alpha_val, "EXPAND", "HORIZONTAL"); + IupSetAttribute(colordlg_data->alpha_val, "MIN", "0"); + IupSetAttribute(colordlg_data->alpha_val, "MAX", "255"); + IupSetAttribute(colordlg_data->alpha_val, "VALUE", "255"); + IupSetAttribute(colordlg_data->alpha_val, "SIZE", "80x12"); + IupSetCallback (colordlg_data->alpha_val, "MOUSEMOVE_CB", (Icallback)iColorBrowserDlgAlphaVal_CB); + IupSetCallback (colordlg_data->alpha_val, "BUTTON_PRESS_CB", (Icallback)iColorBrowserDlgAlphaVal_CB); + IupSetCallback (colordlg_data->alpha_val, "BUTTON_RELEASE_CB", (Icallback)iColorBrowserDlgAlphaVal_CB); + + colordlg_data->alpha_txt = IupText(NULL); /* Alpha value */ + IupSetAttribute(colordlg_data->alpha_txt, "VISIBLECOLUMNS", "3"); + IupSetAttribute(colordlg_data->alpha_txt, "SPIN", "YES"); + IupSetAttribute(colordlg_data->alpha_txt, "SPINMIN", "0"); + IupSetAttribute(colordlg_data->alpha_txt, "SPINMAX", "255"); + IupSetAttribute(colordlg_data->alpha_txt, "SPININC", "1"); + IupSetCallback (colordlg_data->alpha_txt, "ACTION", (Icallback)iColorBrowserDlgAlphaAction_CB); + IupSetCallback (colordlg_data->alpha_txt, "SPIN_CB", (Icallback)iColorBrowserDlgAlphaSpin_CB); + IupSetAttribute(colordlg_data->alpha_txt, "MASKINT", "0:255"); + + /* ======================================================================= */ + /* COLOR TABLE ========================================================= */ + /* ======================================================================= */ + colordlg_data->colortable_cbar = IupColorbar(); + IupSetAttribute(colordlg_data->colortable_cbar, "ORIENTATION", "HORIZONTAL"); + IupSetAttribute(colordlg_data->colortable_cbar, "NUM_PARTS", "2"); + IupSetAttribute(colordlg_data->colortable_cbar, "NUM_CELLS", "20"); + IupSetAttribute(colordlg_data->colortable_cbar, "SHOW_PREVIEW", "NO"); + IupSetAttribute(colordlg_data->colortable_cbar, "SIZE", "138x22"); + IupSetAttribute(colordlg_data->colortable_cbar, "SQUARED", "NO"); + IupSetCallback (colordlg_data->colortable_cbar, "SELECT_CB", (Icallback)iColorBrowserDlgColorTableSelect_CB); + + /* ======================================================================= */ + /* RGB TEXT FIELDS ===================================================== */ + /* ======================================================================= */ + colordlg_data->red_txt = IupText(NULL); /* Red value */ + IupSetAttribute(colordlg_data->red_txt, "VISIBLECOLUMNS", "3"); + IupSetAttribute(colordlg_data->red_txt, "SPIN", "YES"); + IupSetAttribute(colordlg_data->red_txt, "SPINMIN", "0"); + IupSetAttribute(colordlg_data->red_txt, "SPINMAX", "255"); + IupSetAttribute(colordlg_data->red_txt, "SPININC", "1"); + IupSetCallback (colordlg_data->red_txt, "ACTION", (Icallback)iColorBrowserDlgRedAction_CB); + IupSetCallback (colordlg_data->red_txt, "SPIN_CB", (Icallback)iColorBrowserDlgRedSpin_CB); + IupSetAttribute(colordlg_data->red_txt, "MASKINT", "0:255"); + + colordlg_data->green_txt = IupText(NULL); /* Green value */ + IupSetAttribute(colordlg_data->green_txt, "VISIBLECOLUMNS", "3"); + IupSetAttribute(colordlg_data->green_txt, "SPIN", "YES"); + IupSetAttribute(colordlg_data->green_txt, "SPINMIN", "0"); + IupSetAttribute(colordlg_data->green_txt, "SPINMAX", "255"); + IupSetAttribute(colordlg_data->green_txt, "SPININC", "1"); + IupSetCallback (colordlg_data->green_txt, "ACTION", (Icallback)iColorBrowserDlgGreenAction_CB); + IupSetCallback (colordlg_data->green_txt, "SPIN_CB", (Icallback)iColorBrowserDlgGreenSpin_CB); + IupSetAttribute(colordlg_data->green_txt, "MASKINT", "0:255"); + + colordlg_data->blue_txt = IupText(NULL); /* Blue value */ + IupSetAttribute(colordlg_data->blue_txt, "VISIBLECOLUMNS", "3"); + IupSetAttribute(colordlg_data->blue_txt, "SPIN", "YES"); + IupSetAttribute(colordlg_data->blue_txt, "SPINMIN", "0"); + IupSetAttribute(colordlg_data->blue_txt, "SPINMAX", "255"); + IupSetAttribute(colordlg_data->blue_txt, "SPININC", "1"); + IupSetCallback (colordlg_data->blue_txt, "ACTION", (Icallback)iColorBrowserDlgBlueAction_CB); + IupSetCallback (colordlg_data->blue_txt, "SPIN_CB", (Icallback)iColorBrowserDlgBlueSpin_CB); + IupSetAttribute(colordlg_data->blue_txt, "MASKINT", "0:255"); + + /* ======================================================================= */ + /* HSI TEXT FIELDS ===================================================== */ + /* ======================================================================= */ + colordlg_data->hue_txt = IupText(NULL); /* Hue value */ + IupSetAttribute(colordlg_data->hue_txt, "VISIBLECOLUMNS", "3"); + IupSetAttribute(colordlg_data->hue_txt, "SPIN", "YES"); + IupSetAttribute(colordlg_data->hue_txt, "SPINMIN", "0"); + IupSetAttribute(colordlg_data->hue_txt, "SPINMAX", "359"); + IupSetAttribute(colordlg_data->hue_txt, "SPINWRAP", "YES"); + IupSetAttribute(colordlg_data->hue_txt, "SPININC", "1"); + IupSetCallback(colordlg_data->hue_txt, "ACTION", (Icallback)iColorBrowserDlgHueAction_CB); + IupSetCallback(colordlg_data->hue_txt, "SPIN_CB", (Icallback)iColorBrowserDlgHueSpin_CB); + IupSetAttribute(colordlg_data->hue_txt, "MASKINT", "0:359"); + + colordlg_data->saturation_txt = IupText(NULL); /* Saturation value */ + IupSetAttribute(colordlg_data->saturation_txt, "VISIBLECOLUMNS", "3"); + IupSetAttribute(colordlg_data->saturation_txt, "SPIN", "YES"); + IupSetAttribute(colordlg_data->saturation_txt, "SPINMIN", "0"); + IupSetAttribute(colordlg_data->saturation_txt, "SPINMAX", "100"); + IupSetAttribute(colordlg_data->saturation_txt, "SPININC", "1"); + IupSetCallback(colordlg_data->saturation_txt, "ACTION", (Icallback)iColorBrowserDlgSaturationAction_CB); + IupSetCallback(colordlg_data->saturation_txt, "SPIN_CB", (Icallback)iColorBrowserDlgSaturationSpin_CB); + IupSetAttribute(colordlg_data->saturation_txt, "MASKINT", "0:100"); + + colordlg_data->intensity_txt = IupText(NULL); /* Intensity value */ + IupSetAttribute(colordlg_data->intensity_txt, "VISIBLECOLUMNS", "3"); + IupSetAttribute(colordlg_data->intensity_txt, "SPIN", "YES"); + IupSetAttribute(colordlg_data->intensity_txt, "SPINMIN", "0"); + IupSetAttribute(colordlg_data->intensity_txt, "SPINMAX", "100"); + IupSetAttribute(colordlg_data->intensity_txt, "SPININC", "1"); + IupSetCallback(colordlg_data->intensity_txt, "ACTION", (Icallback)iColorBrowserDlgIntensityAction_CB); + IupSetCallback(colordlg_data->intensity_txt, "SPIN_CB", (Icallback)iColorBrowserDlgIntensitySpin_CB); + IupSetAttribute(colordlg_data->intensity_txt, "MASKINT", "0:100"); + + /* =================== */ + /* 1st line = Controls */ + /* =================== */ + + col1 = IupVbox(colordlg_data->color_browser, IupSetAttributes(IupHbox(colordlg_data->color_cnv, NULL), "MARGIN=30x0"),NULL); + + hsi_vb = IupVbox(IupSetAttributes(IupHbox(IupLabel(iupStrMessageGet("IUP_HUE")), + colordlg_data->hue_txt, + NULL), "ALIGNMENT=ACENTER"), + IupSetAttributes(IupHbox(IupLabel(iupStrMessageGet("IUP_SATURATION")), + colordlg_data->saturation_txt, + NULL), "ALIGNMENT=ACENTER"), + IupSetAttributes(IupHbox(IupLabel(iupStrMessageGet("IUP_INTENSITY")), + colordlg_data->intensity_txt, + NULL), "ALIGNMENT=ACENTER"), + NULL); + IupSetAttribute(hsi_vb, "GAP", "5"); + + rgb_vb = IupVbox(IupSetAttributes(IupHbox(IupLabel(iupStrMessageGet("IUP_RED")), + colordlg_data->red_txt, + NULL), "ALIGNMENT=ACENTER"), + IupSetAttributes(IupHbox(IupLabel(iupStrMessageGet("IUP_GREEN")), + colordlg_data->green_txt, + NULL), "ALIGNMENT=ACENTER"), + IupSetAttributes(IupHbox(IupLabel(iupStrMessageGet("IUP_BLUE")), + colordlg_data->blue_txt, + NULL), "ALIGNMENT=ACENTER"), + NULL); + IupSetAttribute(rgb_vb, "GAP", "5"); + + clr_vb = IupVbox(IupSetAttributes(IupHbox(IupLabel(iupStrMessageGet("IUP_OPACITY")), + colordlg_data->alpha_txt, colordlg_data->alpha_val, + NULL), "ALIGNMENT=ACENTER"), + IupSetAttributes(IupHbox(IupLabel("He&xa:"), + colordlg_data->colorhex_txt, + NULL), "ALIGNMENT=ACENTER"), + IupSetAttributes(IupVbox(IupLabel(iupStrMessageGet("IUP_PALETTE")), + colordlg_data->colortable_cbar, + NULL), "GAP=3"), + NULL); + IupSetAttribute(clr_vb, "GAP", "5"); + IupSetAttribute(clr_vb, "EXPAND", "YES"); + + IupDestroy(IupSetAttributes(IupNormalizer(IupGetChild(IupGetChild(hsi_vb, 0), 0), /* Hue Label */ + IupGetChild(IupGetChild(hsi_vb, 1), 0), /* Saturation Label */ + IupGetChild(IupGetChild(hsi_vb, 2), 0), /* Intensity Label */ + IupGetChild(IupGetChild(clr_vb, 0), 0), /* Opacity Label */ + IupGetChild(IupGetChild(clr_vb, 1), 0), /* Hexa Label */ + NULL), "NORMALIZE=HORIZONTAL")); + + IupDestroy(IupSetAttributes(IupNormalizer(IupGetChild(IupGetChild(rgb_vb, 0), 0), /* Red Label */ + IupGetChild(IupGetChild(rgb_vb, 1), 0), /* Green Label */ + IupGetChild(IupGetChild(rgb_vb, 2), 0), /* Blue Label */ + NULL), "NORMALIZE=HORIZONTAL")); + + col2 = IupVbox(IupSetAttributes(IupHbox(hsi_vb, IupFill(), rgb_vb, NULL), "EXPAND=YES"), + IupSetAttributes(IupLabel(NULL), "SEPARATOR=HORIZONTAL"), + clr_vb, + NULL); + IupSetAttributes(col2, "EXPAND=NO, GAP=10"); + + lin1 = IupHbox(col1, col2, NULL); + IupSetAttribute(lin1, "GAP", "10"); + IupSetAttribute(lin1, "MARGIN", "0x0"); + + /* ================== */ + /* 2nd line = Buttons */ + /* ================== */ + + lin2 = IupHbox(IupFill(), ok_bt, cancel_bt, colordlg_data->help_bt, NULL); + IupSetAttribute(lin2, "GAP", "5"); + IupSetAttribute(lin2, "MARGIN", "0x0"); + IupSetAttribute(lin2, "NORMALIZESIZE", "HORIZONTAL"); + + /* Do not use IupAppend because we set childtype=IUP_CHILDNONE */ + iupChildTreeAppend(ih, IupSetAttributes(IupVbox(lin1, IupSetAttributes(IupLabel(NULL), "SEPARATOR=HORIZONTAL"), lin2, NULL), "MARGIN=10x10, GAP=10")); + + iColorBrowserDlgInit_Defaults(colordlg_data); + + (void)params; + return IUP_NOERROR; +} + +Iclass* iupColorBrowserDlgGetClass(void) +{ + Iclass* ic = iupClassNew(iupDialogGetClass()); + + ic->Create = iColorBrowserDlgCreateMethod; + ic->Destroy = iColorBrowserDlgDestroyMethod; + ic->Map = iColorBrowserDlgMapMethod; + + ic->name = "colordlg"; /* this will hide the GTK and Windows implementations */ + ic->nativetype = IUP_TYPEDIALOG; + ic->is_interactive = 1; + ic->childtype = IUP_CHILDNONE; + + iupClassRegisterAttribute(ic, "COLORTABLE", iColorBrowserDlgGetColorTableAttrib, iColorBrowserDlgSetColorTableAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "STATUS", iColorBrowserDlgGetStatusAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE", iColorBrowserDlgGetValueAttrib, iColorBrowserDlgSetValueAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ALPHA", iColorBrowserDlgGetAlphaAttrib, iColorBrowserDlgSetAlphaAttrib, IUPAF_SAMEASSYSTEM, "255", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUEHSI", iColorBrowserDlgGetValueHSIAttrib, iColorBrowserDlgSetValueHSIAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUEHEX", iColorBrowserDlgGetValueHexAttrib, iColorBrowserDlgSetValueHexAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWALPHA", NULL, iColorBrowserDlgSetShowAlphaAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWCOLORTABLE", NULL, iColorBrowserDlgSetShowColorTableAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWHEX", NULL, iColorBrowserDlgSetShowHexAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOWHELP", NULL, iColorBrowserDlgSetShowHelpAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} diff --git a/iup/srccontrols/color/iup_colorhsi.c b/iup/srccontrols/color/iup_colorhsi.c new file mode 100755 index 0000000..ce5e71f --- /dev/null +++ b/iup/srccontrols/color/iup_colorhsi.c @@ -0,0 +1,358 @@ +/** \file + * \brief HSI Color Manipulation + * Copied and adapted from IM + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include +#include "iup_colorhsi.h" + +static const float rad60 = 1.0471975f; +static const float rad120 = 2.0943951f; +static const float rad180 = 3.1415926f; +static const float rad240 = 4.1887902f; +static const float rad300 = 5.2359877f; +static const float rad360 = 6.2831853f; +static const float sqrt3 = 1.7320508f; +static const float rad2deg = 57.2957795131f; + +static float costab[361]; +static float sintab[361]; +static int init_tab = 0; + +static void iColorBuildTables(void) +{ + int theta; + for (theta=0; theta<=360; theta++) + { + float th = ((float)theta)/rad2deg; + costab[theta] = cosf(th); + sintab[theta] = sinf(th); + } + init_tab = 1; +} + +static void iColorSinCos(float H, float *sinH, float *cosH) +{ + int theta; + + H *= rad2deg; + theta = (int)(H + 0.5f); /* Round */ + + if (!init_tab) + iColorBuildTables(); + + if (theta<0) theta = 0; + if (theta>360) theta = 360; + + *cosH = costab[theta]; + *sinH = sintab[theta]; +} + +static float iColorNormHue(float H) +{ + while (H < 0.0f) + H += rad360; + + if (H > rad360) + H = fmodf(H, rad360); + + return H; +} + +static unsigned char iColorQuantize(float value) +{ + if (value >= 1.0f) return 255; + if (value <= 0.0f) return 0; + return (unsigned char)(value*256); +} + +static float iColorReconstruct(unsigned char value) +{ + if (value <= 0) return 0.0f; + if (value >= 255) return 1.0f; + return (((float)value + 0.5f)/256.0f); +} + +static void iColorSmax01(float h, float hr, float hb, float hg, float *h0, float *h1) +{ + if (h < rad60) + { + *h0 = hb; + *h1 = hr; + } + else if (h < rad120) + { + *h0 = hb; + *h1 = hg; + } + else if (h < rad180) + { + *h0 = hr; + *h1 = hg; + } + else if (h < rad240) + { + *h0 = hr; + *h1 = hb; + } + else if (h < rad300) + { + *h0 = hg; + *h1 = hb; + } + else + { + *h0 = hg; + *h1 = hr; + } +} + +/* Given H and I, returns S max, but s is in u,v space. */ +static float iColorHSI_Smax(float h, float cosH, float sinH, float i) +{ + float hr, hb, hg, imax, h0, h1; + + /* i here is normalized between 0-1 */ + + if (i == 0.0f || i == 1.0f) + return 0.0f; + + /* Making r=0, g=0, b=0, r=1, g=1 or b=1 in the parametric equations and + writting s in function of H and I. */ + + /* at bottom */ + if (i <= 1.0f/3.0f) + { + /* face B=0 */ + if (h < rad120) + { + hb = (cosH + sinH*sqrt3)/3.0f; + return i/hb; + } + + /* face R=0 */ + if (h < rad240) + { + hr = -cosH/1.5f; + return i/hr; + } + + /* face G=0 (h < rad360) */ + { + hg = (cosH - sinH*sqrt3)/3.0f; + return i/hg; + } + } + + /* at top */ + if (i >= 2.0f/3.0f) + { + /* face R=1 */ + if (h < rad60 || h > rad300) + { + hr = cosH/1.5f; + return (1.0f-i)/hr; + } + + /* face G=1 */ + if (h < rad180) + { + hg = (-cosH + sinH*sqrt3)/3.0f; + return (1.0f-i)/hg; + } + + /* face B=1 (h > rad180 && h < rad300) */ + { + hb = (-cosH - sinH*sqrt3)/3.0f; + return (1.0f-i)/hb; + } + } + + /* in the middle */ + hr = cosH/1.5f; + hg = (-cosH + sinH*sqrt3)/3.0f; + hb = (-cosH - sinH*sqrt3)/3.0f; + + iColorSmax01(h, hr, hb, hg, &h0, &h1); + + if (h == 0.0f || h == rad120 || h == rad240) + imax = 1.0f/3.0f; + else if (h == rad60 || h == rad180 || h == rad300) + imax = 2.0f/3.0f; + else + imax = h0/(h0 - h1); + + if (i < imax) + return -i/h0; + else + return (1.0f-i)/h1; +} + +/* Given H, returns I where S is max, + BUT the maximum S here is 1 at the corners of the cube. */ +static float iColorHSI_ImaxS(float h, float cosH, float sinH) +{ + float i, h0, h1; + float hr, hb, hg; + + /* i here is normalized between 0-1 */ + + if (h == 0.0f || h == rad120 || h == rad240) + return 1.0f/3.0f; + + if (h == rad60 || h == rad180 || h == rad300) + return 2.0f/3.0f; + + hr = cosH/1.5f; + hg = (-cosH + sinH*sqrt3)/3.0f; + hb = (-cosH - sinH*sqrt3)/3.0f; + + iColorSmax01(h, hr, hb, hg, &h0, &h1); + + i = h0/(h0 - h1); + + return i; +} + +static void iColorRGB2HSI(float r, float g, float b, float *h, float *s, float *i) +{ + float v, u, ImaxS; + + /* Parametric equations */ + v = r - (g + b)/2.0f; + u = (g - b) * (sqrt3/2.0f); + + *i = (r + g + b)/3; /* already normalized to 0-1 */ + + *s = sqrtf(v*v + u*u); /* s is between 0-1, BUT it is linear in the cube and it is in u,v space. */ + + if (*s == 0.0f) + { + /* *h = (left unchanged) */ + ImaxS = 1.0f/3.0f; + } + else + { + float Smax; + float H, cosH, sinH; + + H = atan2f(u, v); + H = iColorNormHue(H); + *h = H * rad2deg; + + iColorSinCos(H, &sinH, &cosH); + + /* must scale S from 0-Smax to 0-1 */ + Smax = iColorHSI_Smax(H, cosH, sinH, *i); + if (Smax == 0.0f) + *s = 0.0f; + else + { + if (*s > Smax) /* because of round problems when calculating s and Smax */ + *s = Smax; + *s /= Smax; + } + + ImaxS = iColorHSI_ImaxS((float)H, cosH, sinH); + } + + /* must convert I from linear scale to non-linear scale. USED ONLY FOR THE COLORBROWSER */ + if (*i < 0.5f) /* half I is I=ImaxS, not I=0.5 */ + *i = ((*i)*0.5f)/ImaxS; + else + *i = (((*i) - ImaxS)*0.5f)/(1.0f - ImaxS) + 0.5f; +} + +static void iColorHSI2RGB(float h, float s, float i, float *r, float *g, float *b) +{ + float cosH, sinH, H, v, u; + float Smax, ImaxS; + + if (i < 0) i = 0; + else if (i > 1) i = 1; + + if (s < 0) s = 0; + else if (s > 1) s = 1; + + if (s == 0.0f || i == 1.0f || i == 0.0f || (int)h == 360) + { + *r = i; + *g = i; + *b = i; + return; + } + + H = h/rad2deg; + H = iColorNormHue(H); + + iColorSinCos(H, &sinH, &cosH); + + /* must convert I from non-linear scale to linear scale. USED ONLY FOR THE COLORBROWSER */ + ImaxS = iColorHSI_ImaxS(H, cosH, sinH); + if (i < 0.5f) /* half I is I=ImaxS, not I=0.5 */ + i = ImaxS * (i / 0.5f); + else + i = (1.0f - ImaxS) * (i - 0.5f)/0.5f + ImaxS; + + /* must scale S from 0-1 to 0-Smax */ + Smax = iColorHSI_Smax(H, cosH, sinH, i); + s *= Smax; + if (s > 1.0f) /* because of round problems when calculating s and Smax */ + s = 1.0f; + + v = s * cosH; + u = s * sinH; + + /* Inverse of the Parametric equations, using i normalized to 0-1 */ + *r = i + v/1.5f; + *g = i - (v - u*sqrt3)/3.0f; + *b = i - (v + u*sqrt3)/3.0f; + + /* fix round errors */ + if (*r < 0.0f) *r = 0; + if (*g < 0.0f) *g = 0; + if (*b < 0.0f) *b = 0; + + if (*r > 1.0f) *r = 1.0f; + if (*g > 1.0f) *g = 1.0f; + if (*b > 1.0f) *b = 1.0f; +} + +/*********************************************************************************************/ + +void iupColorRGB2HSI(unsigned char r, unsigned char g, unsigned char b, float *h, float *s, float *i) +{ + float fr = iColorReconstruct(r); + float fg = iColorReconstruct(g); + float fb = iColorReconstruct(b); + + iColorRGB2HSI(fr, fg, fb, h, s, i); +} + +void iupColorHSI2RGB(float h, float s, float i, unsigned char *r, unsigned char *g, unsigned char *b) +{ + float fr, fg, fb; + + iColorHSI2RGB(h, s, i, &fr, &fg, &fb); + + *r = iColorQuantize(fr); + *g = iColorQuantize(fg); + *b = iColorQuantize(fb); +} + +int iupStrToHSI(const char *str, float *h, float *s, float *i) +{ + float fh, fs, fi; + if (!str) return 0; + if (sscanf(str, "%f %f %f", &fh, &fs, &fi) != 3) return 0; + if (fh > 359 || fs > 1 || fi > 1) return 0; + if (fh < 0 || fs < 0 || fi < 0) return 0; + *h = fh; + *s = fs; + *i = fi; + return 1; +} diff --git a/iup/srccontrols/color/iup_colorhsi.h b/iup/srccontrols/color/iup_colorhsi.h new file mode 100755 index 0000000..b29ea48 --- /dev/null +++ b/iup/srccontrols/color/iup_colorhsi.h @@ -0,0 +1,44 @@ +/** \file + * \brief HSI Color Manipulation + * Copied and adapted from IM + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_COLORHSI_H +#define __IUP_COLORHSI_H + +#if defined(__cplusplus) +extern "C" { +#endif + +/* 0<=H<=359 */ +/* 0<=S<=1 */ +/* 0<=I<=1 */ + + +/* Converts from RGB to HSI. + */ +void iupColorRGB2HSI(unsigned char r, unsigned char g, unsigned char b, float *h, float *s, float *i); + +/* Converts from HSI to RGB. + */ +void iupColorHSI2RGB(float h, float s, float i, unsigned char *r, unsigned char *g, unsigned char *b); + +int iupStrToHSI(const char *str, float *h, float *s, float *i); + +#ifdef IUP_DEFMATHFLOAT +#define atan2f(_X, _Y) ((float)atan2((double)_X, (double)_Y)) +#define cosf(_X) ((float)cos((double)_X)) +#define fmodf(_X, _Y) ((float)fmod((double)_X, (double)_Y)) +#define sinf(_X) ((float)sin((double)_X)) +#define sqrtf(_X) ((float)sqrt((double)_X)) +#endif + + + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/iup/srccontrols/config.mak b/iup/srccontrols/config.mak new file mode 100755 index 0000000..394d607 --- /dev/null +++ b/iup/srccontrols/config.mak @@ -0,0 +1,48 @@ +PROJNAME = iup +LIBNAME = iupcontrols +OPT = YES + +INCLUDES = ../include ../src . + +SRCCOLOR = iup_colorbrowser.c iup_colorhsi.c iup_colorbrowserdlg.c +SRCCOLOR := $(addprefix color/, $(SRCCOLOR)) + +SRCMATRIX = iupmat_key.c iupmat_mark.c iupmat_aux.c iupmat_mem.c iupmat_mouse.c iupmat_numlc.c \ + iupmat_colres.c iupmat_draw.c iupmat_focus.c iupmat_getset.c iupmatrix.c \ + iupmat_scroll.c iupmat_edit.c +SRCMATRIX := $(addprefix matrix/, $(SRCMATRIX)) + +SRC = iup_cdutil.c iup_gauge.c iup_cells.c iup_colorbar.c iup_controls.c \ + iup_dial.c iup_oldtabs.c iup_oldval.c iup_oldmask.c \ + $(SRCCOLOR) $(SRCMATRIX) + +LIBS = iup iupcd +LDIR = ../lib/$(TEC_UNAME) +USE_CD = Yes + +# force the definition of math functions using float +# Some compilers do not define them +ifeq ($(TEC_UNAME), dll) + DEFINES += IUP_DEFMATHFLOAT +endif +ifeq ($(TEC_UNAME), vc6) + DEFINES += IUP_DEFMATHFLOAT +endif +ifeq ($(TEC_UNAME), dll7) + DEFINES += IUP_DEFMATHFLOAT +endif +ifeq ($(TEC_UNAME), vc7) + DEFINES += IUP_DEFMATHFLOAT +endif +ifneq ($(findstring ow, $(TEC_UNAME)), ) + DEFINES += IUP_DEFMATHFLOAT +endif +ifneq ($(findstring bc, $(TEC_UNAME)), ) + DEFINES += IUP_DEFMATHFLOAT +endif +ifneq ($(findstring AIX, $(TEC_UNAME)), ) + DEFINES += IUP_DEFMATHFLOAT +endif +ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + DEFINES += IUP_DEFMATHFLOAT +endif diff --git a/iup/srccontrols/iup_cdutil.c b/iup/srccontrols/iup_cdutil.c new file mode 100755 index 0000000..3ffb15b --- /dev/null +++ b/iup/srccontrols/iup_cdutil.c @@ -0,0 +1,153 @@ +/** \file + * \brief cdiuputil. CD and IUP utilities for the IupControls + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include + +#include + +#include "iup.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_cdutil.h" + + +long cdIupConvertColor(const char *color) +{ + unsigned char r, g, b; + if (iupStrToRGB(color, &r, &g, &b)) + return cdEncodeColor(r, g, b); + else + return 0; +} + +void cdIupCalcShadows(long bgcolor, long *light_shadow, long *mid_shadow, long *dark_shadow) +{ + int r, bg_r = cdRed(bgcolor); + int g, bg_g = cdGreen(bgcolor); + int b, bg_b = cdBlue(bgcolor); + + /* light_shadow */ + + int max = bg_r; + if (bg_g > max) max = bg_g; + if (bg_b > max) max = bg_b; + + if (255-max < 64) + { + r = 255; + g = 255; + b = 255; + } + else + { + /* preserve some color information */ + if (bg_r == max) r = 255; + else r = bg_r + (255-max); + if (bg_g == max) g = 255; + else g = bg_g + (255-max); + if (bg_b == max) b = 255; + else b = bg_b + (255-max); + } + + if (light_shadow) *light_shadow = cdEncodeColor((unsigned char)r, (unsigned char)g, (unsigned char)b); + + /* dark_shadow */ + r = bg_r - 128; + g = bg_g - 128; + b = bg_b - 128; + if (r < 0) r = 0; + if (g < 0) g = 0; + if (b < 0) b = 0; + + if (dark_shadow) *dark_shadow = cdEncodeColor((unsigned char)r, (unsigned char)g, (unsigned char)b); + + /* mid_shadow = (dark_shadow+bgcolor)/2 */ + if (mid_shadow) *mid_shadow = cdEncodeColor((unsigned char)((bg_r+r)/2), (unsigned char)((bg_g+g)/2), (unsigned char)((bg_b+b)/2)); +} + +void cdIupDrawSunkenRect(cdCanvas *canvas, int x1, int y1, int x2, int y2, long light_shadow, long mid_shadow, long dark_shadow) +{ + cdCanvasForeground(canvas, mid_shadow); + cdCanvasLine(canvas, x1, y1+1, x1, y2); + cdCanvasLine(canvas, x1, y2, x2-1, y2); + + cdCanvasForeground(canvas, dark_shadow); + cdCanvasLine(canvas, x1+1, y1+2, x1+1, y2-1); + cdCanvasLine(canvas, x1+1, y2-1, x2-2, y2-1); + + cdCanvasForeground(canvas, light_shadow); + cdCanvasLine(canvas, x1, y1, x2, y1); + cdCanvasLine(canvas, x2, y1, x2, y2); +} + +void cdIupDrawRaisenRect(cdCanvas *canvas, int x1, int y1, int x2, int y2, long light_shadow, long mid_shadow, long dark_shadow) +{ + cdCanvasForeground(canvas, light_shadow); + cdCanvasLine(canvas, x1, y1+1, x1, y2); + cdCanvasLine(canvas, x1, y2, x2-1, y2); + + cdCanvasForeground(canvas, dark_shadow); + cdCanvasLine(canvas, x1, y1, x2, y1); + cdCanvasLine(canvas, x2, y1, x2, y2); + + cdCanvasForeground(canvas, mid_shadow); + cdCanvasLine(canvas, x1+1, y1+1, x2-1, y1+1); + cdCanvasLine(canvas, x2-1, y1+2, x2-1, y2-1); +} + +void cdIupDrawVertSunkenMark(cdCanvas *canvas, int x, int y1, int y2, long light_shadow, long dark_shadow) +{ + cdCanvasForeground(canvas, dark_shadow); + cdCanvasLine(canvas, x-1, y1, x-1, y2); + cdCanvasForeground(canvas, light_shadow); + cdCanvasLine(canvas, x, y1, x, y2); +} + +void cdIupDrawHorizSunkenMark(cdCanvas *canvas, int x1, int x2, int y, long light_shadow, long dark_shadow) +{ + cdCanvasForeground(canvas, dark_shadow); + cdCanvasLine(canvas, x1, y+1, x2, y+1); + cdCanvasForeground(canvas, light_shadow); + cdCanvasLine(canvas, x1, y, x2, y); +} + +void cdIupDrawFocusRect(Ihandle* ih, cdCanvas *canvas, int x1, int y1, int x2, int y2) +{ + int y, x, w, h; +#ifdef WIN32 + void* gc = cdCanvasGetAttribute(canvas, "HDC"); +#else + void* gc = cdCanvasGetAttribute(canvas, "GC"); +#endif + + cdCanvasUpdateYAxis(canvas, &y1); + cdCanvasUpdateYAxis(canvas, &y2); + y = y1; + if (y2 +#include +#include + +#undef CD_NO_OLD_INTERFACE + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include +#include +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_controls.h" +#include "iup_cdutil.h" + + +#define ICELLS_OUT -999 + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + + cdCanvas* cdcanvas; /* cd canvas for drawing */ + cdCanvas* cddbuffer; /* image canvas for double buffering */ + int w; /* control width (pixels) */ + int h; /* control height (pixels) */ + int clipped; /* cells bounding box clipping activated */ + int boxed; /* draw cells bounding box activated */ + int bufferize; /* bufferize on */ + int non_scrollable_lins; /* number of non-scrollable lines */ + int non_scrollable_cols; /* number of non-scrollable columns */ + long int bgcolor; /* Empty area color and bgcolor */ +}; + + +/* Function to inquire application cell data (line height) */ +static int iCellsGetHeight(Ihandle* ih, int i) +{ + int size; + + IFni cb = (IFni)IupGetCallback(ih, "HEIGHT_CB"); + if (!cb) + return 30; /* default value */ + + size = cb(ih, i); + if (size < 0) + size = 0; + + return size; +} + +/* Function to inquire application cell data (column width) */ +static int iCellsGetWidth(Ihandle* ih, int j) +{ + int size; + + IFni cb = (IFni)IupGetCallback(ih, "WIDTH_CB"); + if (!cb) + return 60; /* default value */ + + size = cb(ih, j); + if (size < 0) + size = 0; + + return size; +} + +/* Function used to calculate a cell limits */ +static int iCellsGetLimits(Ihandle* ih, int i, int j, int* xmin, int* xmax, int* ymin, int* ymax) +{ + int result = 1; + int xmin_sum = 0; + int ymin_sum = 0; + int w = ih->data->w; + int h = ih->data->h; + int _xmin, _xmax, _ymin, _ymax; + + /* Adjusting the inital position according to the cell's type. If it + * is non-scrollable, the origin is always zero, otherwise the origin + * is the scrollbar position */ + int posx = (j <= ih->data->non_scrollable_cols)? 0: IupGetInt(ih, "POSX"); + int posy = (i <= ih->data->non_scrollable_lins)? 0: IupGetInt(ih, "POSY"); + int idx; + + /* Adding to the origin, the cells' width and height */ + for (idx = 1; idx < j; idx++) + xmin_sum += iCellsGetWidth(ih, idx); + + for (idx = 1; idx < i; idx++) + ymin_sum += iCellsGetHeight(ih, idx); + + /* Finding the cell origin */ + _xmin = xmin_sum - posx; + _ymax = h - (ymin_sum - posy) - 1; + + /* Computing the cell limit, based on its origin and size */ + _xmax = _xmin + iCellsGetWidth(ih, j); + _ymin = _ymax - iCellsGetHeight(ih, i); + + /* Checking if the cell is visible */ + if (_xmax < 0 || _xmin > w || _ymin > h || _ymax < 0) + result = 0; + + if (xmin != NULL) + *xmin = _xmin; + + if (xmax != NULL) + *xmax = _xmax; + + if (ymin != NULL) + *ymin = _ymin; + + if (ymax != NULL) + *ymax = _ymax; + + return result; +} + +/* Function to inquire application cell data (vertical span) */ +static int iCellsGetVspan(Ihandle* ih, int i, int j) +{ + int result = 1; /* default value */ + + IFnii cb = (IFnii)IupGetCallback(ih, "VSPAN_CB"); + if (cb) + result = cb(ih, i, j); + + if (result < 0) + result = 1; + + return result; +} + +/* Function to inquire application cell data (horizontal span) */ +static int iCellsGetHspan(Ihandle* ih, int i, int j) +{ + int result = 1; /* default value */ + + IFnii cb = (IFnii)IupGetCallback(ih, "HSPAN_CB"); + if (cb) + result = cb(ih, i, j); + + if (result < 0) + result = 1; + + return result; +} + +/* Function to inquire application cell data (#columns) */ +static int iCellsGetNCols(Ihandle* ih) +{ + int result = 10; /* default value */ + + Icallback cb = IupGetCallback(ih, "NCOLS_CB"); + if (cb) + result = cb(ih); + + if (result < 0) + result = 0; + + return result; +} + +/* Function to inquire application cell data (# lines) */ +static int iCellsGetNLines(Ihandle* ih) +{ + int result = 10; /* default value */ + + Icallback cb = IupGetCallback(ih, "NLINES_CB"); + if (cb) + result = cb(ih); + + if (result < 0) + result = 0; + + return result; +} + +/* Recalculation of first visible line */ +static int iCellsGetFirstLine(Ihandle* ih) +{ + int i, j; + int nlines = iCellsGetNLines(ih); + int ncols = iCellsGetNCols(ih); + + if (ih->data->non_scrollable_lins >= nlines) + return 1; + + /* Looping the lines until a visible one is found */ + for (i = 1; i <= nlines; i++) { + for (j = 1; j <= ncols; j++) { + if (iCellsGetLimits(ih, i, j, NULL, NULL, NULL, NULL)) + return i; + } + } + return ICELLS_OUT; +} + +/* Recalculation of first visible column */ +static int iCellsGetFirstCol(Ihandle* ih) +{ + int i, j; + int ncols = iCellsGetNCols(ih); + int nlines = iCellsGetNLines(ih); + + if (ih->data->non_scrollable_cols >= ncols) + return 1; + + /* Looping the columns until a visible one is found */ + for (j = 1; j <= ncols; j++) { + for (i = 1; i <= nlines; i++) { + if (iCellsGetLimits(ih, i, j, NULL, NULL, NULL, NULL)) + return j; + } + } + return ICELLS_OUT; +} + +/* Function used to get the cells groups virtual size */ +static void iCellsGetVirtualSize(Ihandle* ih, int* wi, int* he) +{ + int i, j; + *wi = 0; *he = 0; + + /* Looping through all lines and columns, adding its width and heights + * to the return values. So, the cells virtual size is computed */ + for (i = 1; i <= iCellsGetNLines(ih); i++) + *he = *he + iCellsGetHeight(ih, i); + for (j = 1; j <= iCellsGetNCols(ih); j++) + *wi = *wi + iCellsGetWidth(ih, j); +} + +/* Function used to calculate a group of columns height */ +static int iCellsGetRangedHeight(Ihandle* ih, int from, int to) +{ + int i; + int result = 0; + + /* Looping through a column adding the line height */ + for (i = from; i <= to; i++) + result += iCellsGetHeight(ih, i); + + return result; +} + +/* Function used to calculate a group of lines width */ +static int iCellsGetRangedWidth(Ihandle* ih, int from, int to) +{ + int j; + int result = 0; + + /* Looping through a column adding the column width */ + for (j = from; j <= to; j++) + result += iCellsGetWidth(ih, j); + + return result; +} + +/* Function used to turn a cell visible */ +static void iCellsSetFullVisible(Ihandle* ih, int i, int j) +{ + int xmin, xmax, ymin, ymax; + int posx = IupGetInt(ih, "POSX"); + int posy = IupGetInt(ih, "POSY"); + int dx = 0; + int dy = 0; + + /* Getting the frontiers positions for the visible cell */ + int min_x = iCellsGetRangedWidth(ih, 1, ih->data->non_scrollable_cols); + int max_y = ih->data->h - iCellsGetRangedHeight(ih, 1, ih->data->non_scrollable_lins); + + /* Getting the cell's area limit */ + iCellsGetLimits(ih, i, j, &xmin, &xmax, &ymin, &ymax); + + /* Adjusting the diference of the scrollbars' position (horizontal) */ + if (xmax > ih->data->w) + dx = xmax - ih->data->w; + + /* Giving priority to xmin position. This can be seen by the usage + * of dx at the left part of the expression (using the last dx). + * This is the case wher the cell cannot be fitted. */ + if (xmin - dx < min_x) + dx = - (min_x - xmin); + + /* Adjusting the diference of the scrollbars' position (horizontal) */ + if (ymax > max_y) + dy = - (ymax - max_y); + if (ymin < 0) + dy = -ymin; + + /* Adding the diference to scrollbars' position */ + posx += dx; + posy += dy; + + /* Setting iup scrollbars' attributes */ + IupSetfAttribute(ih, "POSX", "%d", posx); + IupSetfAttribute(ih, "POSY", "%d", posy); +} + +/* Function used to make a cell the first visible one */ +static void iCellsAdjustOrigin(Ihandle* ih, int lin, int col) +{ + int xmin_sum, ymin_sum; + + /* If the origin line is a non-scrollable one, the scrollbar position is + * set to zero. Otherwise, the sum of the previous widths will be + * set to the scrollbar position. This algorithm is applied to both + * scrollbars */ + if (lin <= ih->data->non_scrollable_lins) + { + IupSetAttribute(ih, "POSY", "0"); + } + else if (lin <= iCellsGetNLines(ih)) + { + ymin_sum = iCellsGetRangedHeight(ih, ih->data->non_scrollable_lins+1, lin-1); + IupSetfAttribute(ih, "POSY", "%d", ymin_sum); + } + + /* As said before... */ + if (col <= ih->data->non_scrollable_cols) + { + IupSetAttribute(ih, "POSX", "0"); + } + else if (col <= iCellsGetNCols(ih)) + { + xmin_sum = iCellsGetRangedWidth(ih, ih->data->non_scrollable_cols+1, col-1); + IupSetfAttribute(ih, "POSX", "%d", xmin_sum); + } +} + +/* Function used for the scrollbar's update; usually needed when the + * object has modified its size or the cells sizes has changed. */ +static void iCellsAdjustScrolls(Ihandle* ih) +{ + int virtual_height, virtual_width; + + /* Getting the virtual size */ + iCellsGetVirtualSize(ih, &virtual_width, &virtual_height); + + IupSetfAttribute(ih, "YMAX", "%d", virtual_height-1); + IupSetfAttribute(ih, "XMAX", "%d", virtual_width-1); + + /* Setting the object scrollbar position */ + IupSetfAttribute(ih, "DY", "%d", ih->data->h); + IupSetfAttribute(ih, "DX", "%d", ih->data->w); +} + +/* Function used to call the client; is used when a cell must be repainted. */ +static void iCellsCallDrawCb(Ihandle* ih, int xmin, int xmax, int ymin, int ymax, int i, int j) +{ + int cxmin, cxmax, cymin, cymax; + int oldxmin, oldxmax, oldymin, oldymax, oldclip; + int w = ih->data->w; + int h = ih->data->h; + IFniiiiii draw_cb; + cdCanvas* old_cnv = cdActiveCanvas(); + + /* Getting clipping area for post restore */ + oldclip = cdCanvasClip(ih->data->cddbuffer, CD_QUERY); + cdCanvasGetClipArea(ih->data->cddbuffer, &oldxmin, &oldxmax, &oldymin, &oldymax); + + if (ih->data->clipped) /* Clipping the cell area */ + { + cdCanvasClip(ih->data->cddbuffer, CD_CLIPAREA); + cxmin = xmin < 0 ? 0 : xmin; + cymin = ymin < 0 ? 0 : ymin; + cxmax = xmax > w ? w : xmax; + cymax = ymax > h ? h : ymax; + cdCanvasClipArea(ih->data->cddbuffer, xmin, xmax, ymin, ymax); + } + + draw_cb = (IFniiiiii)IupGetCallback(ih, "DRAW_CB"); + if (draw_cb) + { + if (old_cnv != ih->data->cddbuffer) /* backward compatibility code */ + cdActivate(ih->data->cddbuffer); + + draw_cb(ih, i, j, xmin, xmax, ymin, ymax); + + if (old_cnv && old_cnv != ih->data->cddbuffer) + { + cdActivate(old_cnv); + cdCanvasActivate(ih->data->cddbuffer); + } + } + + cdCanvasClip(ih->data->cddbuffer, oldclip); + cdCanvasClipArea(ih->data->cddbuffer, oldxmin, oldxmax, oldymin, oldymax); +} + +/* Render function for one cell in a given coordinate. */ +static void iCellsRenderCellIn(Ihandle* ih, int i, int j, int xmin, int xmax, int ymin, int ymax) +{ + int k; + int w = ih->data->w; + int h = ih->data->h; + int hspan = 1; + int vspan = 1; + + /* Checking if the cells is out of range. (no span will affect it!) */ + if (xmin > w || ymax < 0) + return; + + /* Calculating cell spans */ + hspan = iCellsGetHspan(ih, i, j); + vspan = iCellsGetVspan(ih, i, j); + + /* if any span is set to zero, then another cell invaded its space and + * the cell does not need to draw itself */ + if (hspan == 0 || vspan == 0) + return; + + /* Increasing cell's width and height according to its spans */ + for(k = 1; k < hspan; k++) + xmax += iCellsGetWidth(ih, j+k); + for(k = 1; k < vspan; k++) + ymin -= iCellsGetHeight(ih, i+k); + + /* Checking if the cell expanded enough to appear inside the canvas */ + if (xmax < 0 || ymin > h) + return; + + /* Calling application's draw callback */ + iCellsCallDrawCb(ih, xmin, xmax, ymin, ymax, i, j); + + /* Drawing a box in cell's area */ + if (ih->data->boxed) + { + cdCanvasForeground(ih->data->cddbuffer, CD_BLACK); + cdCanvasRect(ih->data->cddbuffer, xmin, xmax, ymin, ymax); + } +} + +/* Repaint function for all cells in a given range */ +static void iCellsRenderRangedCells(Ihandle* ih, int linfrom, int linto, int colfrom, int colto) +{ + int i, j; + int xmin, xmax, ymin, ymax; + int refxmin, refxmax; + + /* Getting first cell limits: this function is slow to be called everytime */ + iCellsGetLimits(ih, linfrom, colfrom, &xmin, &xmax, &ymin, &ymax); + + /* Initializing current reference position */ + refxmin = xmin; + refxmax = xmax; + + /* Looping through the cells adding next cell width and height */ + for (i = linfrom; i <= linto; i++) + { + xmin = refxmin; + xmax = refxmax; + for (j = colfrom; j <= colto; j++) + { + iCellsRenderCellIn(ih, i, j, xmin, xmax, ymin, ymax); + xmin = xmax; + xmax = xmin + (j == colto ? 0 : iCellsGetWidth(ih, j+1)); + } + ymax = ymin; + ymin = ymax - (i == linto ? 0 : iCellsGetHeight(ih, i+1)); + } +} + +/* Repaint function for all cells */ +static void iCellsRenderCells(Ihandle* ih) +{ + int sline = ih->data->non_scrollable_lins; + int scol = ih->data->non_scrollable_cols; + int nlines = iCellsGetNLines(ih); + int ncols = iCellsGetNCols(ih); + + cdCanvasBackground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasClear(ih->data->cddbuffer); + + /* Repainting the four parts of the cells: common cells, non-scrollable + * columns, non-scrollable lines, and non-scrollable margin + * (line and column) */ + iCellsRenderRangedCells(ih, sline+1, nlines, scol+1, ncols); + iCellsRenderRangedCells(ih, sline+1, nlines, 1, scol); + iCellsRenderRangedCells(ih, 1, sline, scol+1, ncols); + iCellsRenderRangedCells(ih, 1, sline, 1, scol); +} + +static void iCellsRepaint(Ihandle* ih) +{ + if (ih->data->cddbuffer == NULL) + return; + + /* If object is buffering, it will not be drawn */ + if (ih->data->bufferize == 1) + return; + + /* update render */ + iCellsRenderCells(ih); + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); +} + +static int iCellsRedraw_CB(Ihandle* ih) +{ + if (ih->data->cddbuffer == NULL) + return IUP_DEFAULT; + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); + return IUP_DEFAULT; +} + +/* Function used to calculate the cell coordinates limited by a hint */ +static int iCellsGetRangedCoord(Ihandle* ih, int x, int y, int* lin, int* col, int linfrom, int linto, int colfrom, int colto) +{ + int i, j, k; + int hspan, vspan; + int rxmax, rymin; + int xmin, xmax, ymin, ymax; + int refxmin, refxmax; + int w = ih->data->w; + + /* Getting the first cell's limit -- based on the range */ + iCellsGetLimits(ih, linfrom, colfrom, &xmin, &xmax, &ymin, &ymax); + + /* Initializing reference position */ + refxmin = xmin; + refxmax = xmax; + + /* Looping through the cells adding next cell width and height */ + for (i = linfrom; i <= linto; i++) + { + xmin = refxmin; + xmax = refxmax; + if (!(ymax < 0)) + { + for (j = colfrom; j <= colto; j++) + { + hspan = 1; + vspan = 1; + if (!(xmin > w)) + { + hspan = iCellsGetHspan(ih, i, j); + vspan = iCellsGetVspan(ih, i, j); + if (hspan != 0 && vspan != 0) + { + rxmax = xmax; + rymin = ymin; + for(k = 1; k < hspan; k++) + rxmax += iCellsGetWidth(ih, j+k); + for(k = 1; k < vspan; k++) + rymin -= iCellsGetHeight(ih, i+k); + + /* A cell was found */ + if (x >= xmin && x <= rxmax && y >= rymin && y <= ymax) + { + *lin = i; + *col = j; + return 1; + } + } + xmin = xmax; + xmax = xmin + (j == colto ? 0 : iCellsGetWidth(ih, j+1)); + } + } + } + ymax = ymin; + ymin = ymax - (i == linto ? 0 : iCellsGetHeight(ih, i+1)); + } + + /* No cell selected... */ + *lin = ICELLS_OUT; + *col = ICELLS_OUT; + return 0; +} + +/* Function used to calculate the cell coordinates */ +static int iCellsGetCoord(Ihandle* ih, int x, int y, int* lin, int* col) +{ + int pck = 0; + int sline = ih->data->non_scrollable_lins; + int scol = ih->data->non_scrollable_cols; + int nlines = iCellsGetNLines(ih); + int ncols = iCellsGetNCols(ih); + + /* Trying to pick a cell (raster coordinates) at the four + * parts of the cells (reverse order of the repainting): + * non-scrollable margin (line and column), non-scrollable + * columns, non-scrollable lines, and common cells. */ + pck = iCellsGetRangedCoord(ih, x, y, lin, col, 1, sline, 1, scol); + if (pck) + return 1; + + pck = iCellsGetRangedCoord(ih, x, y, lin, col, 1, sline, scol+1, ncols); + if (pck) + return 1; + + pck = iCellsGetRangedCoord(ih, x, y, lin, col, sline+1, nlines, 1, scol); + if (pck) + return 1; + + pck = iCellsGetRangedCoord(ih, x, y, lin, col, 1, nlines, 1, ncols); + return pck; +} + +static int iCellsScroll_CB(Ihandle* ih) +{ + IFnii cb; + int ret = IUP_DEFAULT; + int fline = -999; + int fcol = -999; + + fline = iCellsGetFirstLine(ih); + fcol = iCellsGetFirstCol(ih); + + /* Checking the existence of a scroll bar callback. If the application + * has set one, it will be called now. If the application returns + * IUP_DEFAULT, the cells will be repainted. */ + cb = (IFnii)IupGetCallback(ih, "SCROLLING_CB"); + if (cb) + ret = cb(ih, fline, fcol); + + if (ret == IUP_DEFAULT) + iCellsRepaint(ih); + + return IUP_DEFAULT; +} + +static int iCellsMotion_CB(Ihandle* ih, int x, int y, char* r) +{ + int i, j; + + /* Checking the existence of a motion bar callback. If the application + * has set one, it will be called now. However, before calling the + * callback, we need to find out which cell is under the mouse + * position. */ + IFniiiis cb = (IFniiiis)IupGetCallback(ih, "MOUSEMOTION_CB"); + if (!cb) + return IUP_DEFAULT; + + iCellsGetCoord(ih, x, y, &i, &j); + return cb(ih, i, j, x, y, r); +} + +static int iCellsResize_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + { + /* update canvas size */ + cdCanvasActivate(ih->data->cdcanvas); + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + } + + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update canvas size */ + cdCanvasActivate(ih->data->cddbuffer); + cdCanvasGetSize(ih->data->cddbuffer, &ih->data->w, &ih->data->h, NULL, NULL); + + /* recalculate scrollbars positions and size */ + iCellsAdjustScrolls(ih); + + /* update render */ + iCellsRenderCells(ih); + + return IUP_DEFAULT; +} + +static int iCellsButton_CB(Ihandle* ih, int b, int m, int x, int y, char* r) +{ + int i, j; + IFniiiiiis cb; + + y = cdIupInvertYAxis(y, ih->data->h); + + /* Treating the button event. The application will receive + * a button press callback. */ + cb = (IFniiiiiis)IupGetCallback(ih, "MOUSECLICK_CB"); + if (!cb) + return IUP_DEFAULT; + + iCellsGetCoord(ih, x, y, &i, &j); + return cb(ih, b, m, i, j, x, y, r); +} + +static char* iCellsGetImageCanvasAttrib(Ihandle* ih) +{ + return (char*)ih->data->cddbuffer; +} + +static char* iCellsGetCanvasAttrib(Ihandle* ih) +{ + return (char*)ih->data->cdcanvas; +} + +static char* iCellsGetFirstLineAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(80); + sprintf( buffer, "%d", iCellsGetFirstLine(ih) ); + return buffer; +} + +static char* iCellsGetFirstColAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(80); + sprintf(buffer, "%d", iCellsGetFirstCol(ih) ); + return buffer; +} + +static char* iCellsGetLimitsAttrib(Ihandle* ih, const char* name_id) +{ + char* buffer = iupStrGetMemory(80); + int xmin, xmax, ymin, ymax; + int i, j; + + if (iupStrToIntInt(name_id, &i, &j, ':') != 2) + return NULL; + + iCellsGetLimits(ih, i, j, &xmin, &xmax, &ymin, &ymax); + sprintf(buffer, "%d:%d:%d:%d", xmin, xmax, ymin, ymax); + return buffer; +} + +static int iCellsSetBufferizeAttrib(Ihandle* ih, const char* value) +{ + if (value == NULL || iupStrEqualNoCase(value, "NO")) + { + ih->data->bufferize = 0; + iCellsAdjustScrolls(ih); + iCellsRepaint(ih); + } + else + ih->data->bufferize = 1; + + return 0; +} + +static char* iCellsGetBufferizeAttrib(Ihandle* ih) +{ + if (ih->data->bufferize) + return "YES"; + else + return "NO"; +} + +static int iCellsSetRepaintAttrib(Ihandle* ih, const char* value) +{ + (void)value; /* not used */ + ih->data->bufferize = 0; + iCellsAdjustScrolls(ih); + iCellsRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static int iCellsSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (!value) + value = iupControlBaseGetParentBgColor(ih); + + ih->data->bgcolor = cdIupConvertColor(value); + + iCellsRepaint(ih); + return 1; +} + +static int iCellsSetOriginAttrib(Ihandle* ih, const char* value) +{ + int lin = -9; + int col = -9; + iupStrToIntInt(value, &lin, &col, ':'); + iCellsAdjustOrigin(ih, lin, col); + iCellsRepaint(ih); + return 1; +} + +static int iCellsSetNonScrollableColsAttrib(Ihandle* ih, const char* value) +{ + if (iupStrToInt(value, &ih->data->non_scrollable_cols)) + iCellsRepaint(ih); + return 0; +} + +static char* iCellsGetNonScrollableColsAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(80); + sprintf(buffer, "%d", ih->data->non_scrollable_cols); + return buffer; +} + +static int iCellsSetNonScrollableLinesAttrib(Ihandle* ih, const char* value) +{ + if (iupStrToInt(value, &ih->data->non_scrollable_lins)) + iCellsRepaint(ih); + return 0; +} + +static char* iCellsGetNonScrollableLinesAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(80); + sprintf(buffer, "%d", ih->data->non_scrollable_lins); + return buffer; +} + +static int iCellsSetBoxedAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "NO")) + ih->data->boxed = 0; + else + ih->data->boxed = 1; + + iCellsRepaint(ih); + return 0; +} + +static char* iCellsGetBoxedAttrib(Ihandle* ih) +{ + if (ih->data->boxed) + return "YES"; + else + return "NO"; +} + +static int iCellsSetClippedAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "NO")) + ih->data->clipped = 0; + else + ih->data->clipped = 1; + + iCellsRepaint(ih); + return 0; +} + +static char* iCellsGetClippedAttrib(Ihandle* ih) +{ + if (ih->data->clipped) + return "YES"; + else + return "NO"; +} + +static int iCellsSetFullVisibleAttrib(Ihandle* ih, const char* value) +{ + int i, j; + if (iupStrToIntInt(value, &i, &j, ':') != 2) + return 0; + + iCellsSetFullVisible(ih, i, j); + iCellsRepaint(ih); + return 0; /* do not store value in hash table */ +} + + +/****************************************************************************/ + + +static int iCellsMapMethod(Ihandle* ih) +{ + ih->data->cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!ih->data->cdcanvas) + return IUP_ERROR; + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + + return IUP_NOERROR; +} + +static void iCellsUnMapMethod(Ihandle* ih) +{ + if (ih->data->cddbuffer) + cdKillCanvas(ih->data->cddbuffer); + + if (ih->data->cdcanvas) + cdKillCanvas(ih->data->cdcanvas); +} + +static int iCellsCreateMethod(Ihandle* ih, void **params) +{ + (void)params; + + /* free the data allocated by IupCanvas */ + if (ih->data) free(ih->data); + ih->data = iupALLOCCTRLDATA(); + + /* change the IupCanvas default values */ + iupAttribSetStr(ih, "SCROLLBAR", "YES"); + iupAttribSetStr(ih, "BORDER", "NO"); + + /* default values */ + ih->data->boxed = 1; + ih->data->clipped = 1; + + /* IupCanvas callbacks */ + IupSetCallback(ih, "RESIZE_CB", (Icallback)iCellsResize_CB); + IupSetCallback(ih, "ACTION", (Icallback)iCellsRedraw_CB); + IupSetCallback(ih, "BUTTON_CB", (Icallback)iCellsButton_CB); + IupSetCallback(ih, "MOTION_CB", (Icallback)iCellsMotion_CB); + IupSetCallback(ih, "SCROLL_CB", (Icallback)iCellsScroll_CB); + + return IUP_NOERROR; +} + +Iclass* iupCellsGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "cells"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + ic->has_attrib_id = 1; /* has attributes with IDs that must be parsed */ + + /* Class functions */ + ic->Create = iCellsCreateMethod; + ic->Map = iCellsMapMethod; + ic->UnMap = iCellsUnMapMethod; + + /* Do not need to set base attributes because they are inherited from IupCanvas */ + + /* IupCells Callbacks */ + iupClassRegisterCallback(ic, "SCROLLING_CB", "ii"); + iupClassRegisterCallback(ic, "MOUSEMOTION_CB", "iiiis"); + iupClassRegisterCallback(ic, "MOUSECLICK_CB", "iiiiiis"); + iupClassRegisterCallback(ic, "DRAW_CB", "iiiiiiv"); + iupClassRegisterCallback(ic, "VSPAN_CB", "ii"); + iupClassRegisterCallback(ic, "HSPAN_CB", "ii"); + iupClassRegisterCallback(ic, "NCOLS_CB", ""); + iupClassRegisterCallback(ic, "NLINES_CB", ""); + iupClassRegisterCallback(ic, "HEIGHT_CB", "i"); + iupClassRegisterCallback(ic, "WIDTH_CB", "i"); + + /* IupCells only */ + iupClassRegisterAttribute(ic, "BOXED", iCellsGetBoxedAttrib, iCellsSetBoxedAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "CLIPPED", iCellsGetClippedAttrib, iCellsSetClippedAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "NON_SCROLLABLE_LINES", iCellsGetNonScrollableLinesAttrib, iCellsSetNonScrollableLinesAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "NON_SCROLLABLE_COLS", iCellsGetNonScrollableColsAttrib, iCellsSetNonScrollableColsAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "NO_COLOR", iupControlBaseGetBgColorAttrib, iCellsSetBgColorAttrib, NULL, NULL, IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "BUFFERIZE", iCellsGetBufferizeAttrib, iCellsSetBufferizeAttrib, NULL, NULL, IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "ORIGIN", NULL, iCellsSetOriginAttrib, NULL, NULL, IUPAF_DEFAULT); + + iupClassRegisterAttribute(ic, "FULL_VISIBLE", NULL, iCellsSetFullVisibleAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "REPAINT", NULL, iCellsSetRepaintAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "LIMITS", iCellsGetLimitsAttrib, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FIRST_COL", iCellsGetFirstColAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FIRST_LINE", iCellsGetFirstLineAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IMAGE_CANVAS", iCellsGetImageCanvasAttrib, NULL, NULL, NULL, IUPAF_NO_STRING|IUPAF_READONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CANVAS", iCellsGetCanvasAttrib, NULL, NULL, NULL, IUPAF_NO_STRING|IUPAF_READONLY|IUPAF_NO_INHERIT); + + /* Overwrite IupCanvas Attributes */ + iupClassRegisterAttribute(ic, "BGCOLOR", iupControlBaseGetBgColorAttrib, iCellsSetBgColorAttrib, NULL, "255 255 255", IUPAF_NO_INHERIT); /* overwrite canvas implementation, set a system default to force a new default */ + + return ic; +} + +Ihandle* IupCells(void) +{ + return IupCreate("cells"); +} diff --git a/iup/srccontrols/iup_colorbar.c b/iup/srccontrols/iup_colorbar.c new file mode 100755 index 0000000..72e717c --- /dev/null +++ b/iup/srccontrols/iup_colorbar.c @@ -0,0 +1,1082 @@ +/** \file + * \brief Colorbar Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" +#include "iupcontrols.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include +#include +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_controls.h" +#include "iup_image.h" +#include "iup_cdutil.h" + + +#define ICOLORBAR_DEFAULT_NUM_CELLS 16 /* default number of cells */ +#define ICOLORBAR_NO_COLOR 0xff000000 /* no color */ +#define ICOLORBAR_DELTA 5 /* preview margin */ +#define ICOLORBAR_RENDER_ALL -1 +#define ICOLORBAR_RENDER_NONE -2 + + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + + int w; /* size of the canvas - width */ + int h; /* size of the canvas - height */ + cdCanvas* cdcanvas; /* cd canvas for drawing */ + cdCanvas* cddbuffer; /* image canvas for double buffering */ + long int colors[256]; /* CD color vector */ + int num_cells; /* number of cells at the widgets */ + int num_parts; /* number of sections used to split the colors cells area */ + int vertical; /* vertical orientation flag */ + int squared; /* square cells attribute flag */ + int shadowed; /* 3D shadowed attribute flag */ + long bgcolor; /* control background color */ + long light_shadow; /* } */ + long mid_shadow; /* } 3D shadowed color */ + long dark_shadow; /* } */ + int bufferize; /* bufferation flag */ + long int transparency; /* transparency color */ + int show_secondary; /* secondary color selction flag */ + int preview_size; /* preview size (pixels) 0=disabled, -1=automatic */ + int fgcolor_idx; /* current primary index selected */ + int bgcolor_idx; /* current secondary index selected */ + int focus_cell; /* cell with focus */ + int has_focus; /* 1 if the control has the focus, else 0 */ +}; + +/* Default colors used for a widget */ +static struct { + unsigned int r; + unsigned int g; + unsigned int b; +} default_colors[ICOLORBAR_DEFAULT_NUM_CELLS] = { + { 0, 0, 0 }, { 128, 0, 0 }, { 0, 128, 0 }, { 128, 128, 0 }, + { 0, 0, 128 }, { 128, 0, 128 }, { 0, 128, 128 }, { 192, 192, 192 }, + { 128, 128, 128 }, { 255, 0, 0 }, { 0, 255, 0 }, { 255, 255, 0 }, + { 0, 0, 255 }, { 255, 0, 255 }, { 0, 255, 255 }, { 255, 255, 255 } +}; + + +/* This function draw the 3D cell effect. */ +static void iColorbarDrawSunken(Ihandle* ih, int xmin, int xmax, int ymin, int ymax) +{ + if (!ih->data->shadowed) return; + cdIupDrawSunkenRect(ih->data->cddbuffer, xmin, ymin, xmax, ymax, ih->data->light_shadow, ih->data->mid_shadow, ih->data->dark_shadow); +} + +/* This function is used to draw a box for a cell. */ +static void iColorbarDrawBox(Ihandle* ih, int xmin, int xmax, int ymin, int ymax, int idx) +{ + long int color = ih->data->colors[idx]; + cdCanvasInteriorStyle(ih->data->cddbuffer, CD_SOLID); + + if (color == ih->data->transparency) + { + int xm = (xmin+xmax)/2; + int ym = (ymin+ymax)/2; + cdCanvasForeground(ih->data->cddbuffer,0xeeeeee); + cdCanvasBox(ih->data->cddbuffer,xmin, xm, ymin, ym); + cdCanvasBox(ih->data->cddbuffer,xm, xmax, ym, ymax); + cdCanvasForeground(ih->data->cddbuffer,0xcccccc); + cdCanvasBox(ih->data->cddbuffer,xmin, xm, ym, ymax); + cdCanvasBox(ih->data->cddbuffer,xm, xmax, ymin, ym); + } + else + { + if (!iupdrvIsActive(ih)) + { + unsigned char r, g, b, bg_r, bg_g, bg_b; + cdDecodeColor(color, &r, &g, &b); + cdDecodeColor(ih->data->bgcolor, &bg_r, &bg_g, &bg_b); + iupImageColorMakeInactive(&r, &g, &b, bg_r, bg_g, bg_b); + color = cdEncodeColor(r, g, b); + } + cdCanvasForeground(ih->data->cddbuffer,color); + cdCanvasBegin(ih->data->cddbuffer,CD_FILL); + cdCanvasVertex(ih->data->cddbuffer,xmin, ymin); cdCanvasVertex(ih->data->cddbuffer,xmin, ymax); + cdCanvasVertex(ih->data->cddbuffer,xmax, ymax); cdCanvasVertex(ih->data->cddbuffer,xmax, ymin); + cdCanvasEnd(ih->data->cddbuffer); + } + + cdCanvasForeground(ih->data->cddbuffer,CD_BLACK); + cdCanvasBegin(ih->data->cddbuffer,CD_CLOSED_LINES); + cdCanvasVertex(ih->data->cddbuffer,xmin, ymin); cdCanvasVertex(ih->data->cddbuffer,xmin, ymax); + cdCanvasVertex(ih->data->cddbuffer,xmax, ymax); cdCanvasVertex(ih->data->cddbuffer,xmax, ymin); + cdCanvasEnd(ih->data->cddbuffer); +} + +/* This function is used to get the largest square of a cell bounding box. */ +static void iColorbarFitSquare(int* xmin, int* xmax, int* ymin, int* ymax) +{ + int mx = (*xmax + *xmin) / 2; + int my = (*ymax + *ymin) / 2; + int dx = (*xmax - *xmin) / 2; + int dy = (*ymax - *ymin) / 2; + + if (dx < dy) + { + *ymin = my - dx; + *ymax = my + dx; + } + else + { + *xmin = mx - dy; + *xmax = mx + dy; + } +} + +/* This function is used to get the preview area bounding box. */ +static void iColorbarGetPreviewLimit(Ihandle* ih, int* xmin, int* xmax, int* ymin, int* ymax) +{ + int num_itens = ih->data->num_cells / ih->data->num_parts + 1; /* include space for preview area */ + + *xmin = 0; *ymin = 0; + if (ih->data->vertical) + { + *xmax = ih->data->w; + if (ih->data->preview_size > 0) + *ymax = *ymin + ih->data->preview_size; + else + *ymax = ih->data->h / num_itens; + } + else + { + *ymax = ih->data->h; + if (ih->data->preview_size > 0) + *xmax = *xmin + ih->data->preview_size; + else + *xmax = ih->data->w / num_itens; + } + if (ih->data->squared) + iColorbarFitSquare(xmin, xmax, ymin, ymax); +} + +/* This function is used to get a cell bounding box. */ +static void iColorbarGetCellLimit(Ihandle* ih, int idx, int* xmin, int* xmax, int* ymin, int* ymax) +{ + int delta, dummy; + int wcell, hcell; + int px = 0, py = 0; + int posx, posy; + int num_itens = ih->data->num_cells / ih->data->num_parts; + + if (ih->data->preview_size != 0) + iColorbarGetPreviewLimit(ih, &dummy, &px, &dummy, &py); + + if (ih->data->vertical) /* Vertical orientation */ + { + wcell = ih->data->w / ih->data->num_parts; + hcell = (ih->data->h - py) / num_itens; + posx = idx / num_itens; + posy = idx % num_itens; + if (ih->data->squared) + { + wcell = wcell < hcell ? wcell : hcell; + hcell = wcell; + } + delta = (ih->data->w - (ih->data->num_parts*wcell)) / 2; + *xmin = delta + (posx+0)*wcell; + *xmax = delta + (posx+1)*wcell; + *ymin = py + (posy+0)*hcell; + *ymax = py + (posy+1)*hcell; + } + else /* Horizontal orientation */ + { + hcell = ih->data->h / ih->data->num_parts; + wcell = (ih->data->w - px) / num_itens; + posx = idx % num_itens; + posy = idx / num_itens; + if (ih->data->squared) + { + wcell = wcell < hcell ? wcell : hcell; + hcell = wcell; + } + delta = (ih->data->h - (ih->data->num_parts * hcell)) / 2; + *xmin = px + (posx + 0) * wcell; + *xmax = px + (posx + 1) * wcell; + *ymin = delta + (posy + 0) * hcell; + *ymax = delta + (posy + 1) * hcell; + } +} + +/* This function is used to get the index color of a canvas coordinate. */ +static int iColorbarGetIndexColor(Ihandle* ih, int x, int y) +{ + int i; + int xmin, ymin; + int xmax, ymax; + int result = -9; + + for (i = 0; i < ih->data->num_cells; i++) + { + iColorbarGetCellLimit(ih, i, &xmin, &xmax, &ymin, &ymax); + if (x > xmin && x < xmax && y > ymin && y < ymax) + { + result = i; + break; + } + } + return result; +} + +/* This function is used to repaint the preview area. */ +static void iColorbarRenderPreview(Ihandle* ih) +{ + int delta = ICOLORBAR_DELTA; + int xmin, ymin; + int xmax, ymax; + int xhalf, yhalf; + int bg = ih->data->bgcolor_idx; + int fg = ih->data->fgcolor_idx; + + if (ih->data->preview_size == 0) + return; + + iColorbarGetPreviewLimit(ih, &xmin, &xmax, &ymin, &ymax); + + if (xmax-xmin < delta || ymax-ymin < delta) + delta = 0; + + if (ih->data->show_secondary) + { + xhalf = 2 * (xmax - xmin - 2 * delta) / 3 + delta; + yhalf = 2 * (ymax - ymin - 2 * delta) / 3 + delta; + + iColorbarDrawBox(ih, xmax - xhalf, xmax - delta, ymin + delta, ymin + yhalf, bg); + iColorbarDrawBox(ih, xmin + delta, xmin + xhalf, ymax - yhalf, ymax - delta, fg); + } + else + { + iColorbarDrawBox(ih, xmin + delta, xmax - delta, ymin + delta, ymax - delta, fg); + } +} + +static void iColorbarDrawFocusCell(Ihandle* ih) +{ + int delta = 4; + int xmin, ymin; + int xmax, ymax; + + iColorbarGetCellLimit(ih, ih->data->focus_cell, &xmin, &xmax, &ymin, &ymax); + xmin += delta; + xmax -= delta; + ymin += delta; + ymax -= delta; + + cdIupDrawFocusRect(ih, ih->data->cdcanvas, xmin, ymin, xmax, ymax); +} + +/* This function is used to repaint a cell. */ +static void iColorbarRenderCell(Ihandle* ih, int idx) +{ + int delta = 2; + int xmin, ymin; + int xmax, ymax; + + iColorbarGetCellLimit(ih, idx, &xmin, &xmax, &ymin, &ymax); + xmin += delta; + xmax -= delta; + ymin += delta; + ymax -= delta; + + iColorbarDrawBox(ih, xmin, xmax, ymin, ymax, idx); + iColorbarDrawSunken(ih, xmin, xmax, ymin, ymax); +} + +/* This function loops all cells, repainting them. */ +static void iColorbarRenderCells(Ihandle* ih) +{ + int i; + for (i = 0; i < ih->data->num_cells; i++) + iColorbarRenderCell(ih, i); +} + +static void iColorbarRepaint(Ihandle* ih) +{ + /* Checking errors or not initialized conditions */ + if (ih->data->cddbuffer == NULL) + return; + + /* If object is buffering, it will be not drawn */ + if (ih->data->bufferize == 1) + return; + + /* update render */ + cdCanvasBackground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasClear(ih->data->cddbuffer); + iColorbarRenderPreview(ih); + iColorbarRenderCells(ih); + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); + if (ih->data->has_focus) + iColorbarDrawFocusCell(ih); +} + +static int iColorbarCheckPreview(Ihandle* ih, int x, int y) +{ + int xmin, ymin; + int xmax, ymax; + int xhalf, yhalf; + int delta = ICOLORBAR_DELTA; + + iColorbarGetPreviewLimit(ih, &xmin, &xmax, &ymin, &ymax); + + if (ih->data->show_secondary) + { + xhalf = 2 * (xmax - xmin - 2 * delta) / 3 + delta; + yhalf = 2 * (ymax - ymin - 2 * delta) / 3 + delta; + + if (x > xmin+delta && x < xmin+xhalf && y > ymax-yhalf && y < ymax-delta) + return IUP_PRIMARY; + if (x > xmax-xhalf && x < xmax-delta && y > ymin+delta && y < ymin+yhalf) + return IUP_SECONDARY; + if (x > xmin && x < xmax && y > ymin && y < ymax) + return 1; /* switch */ + } + else + { + if (x > xmin+delta && x < xmax-delta && y > ymin+delta && y < ymax-delta) + return IUP_PRIMARY; + } + + return 0; +} + +static int iColorbarSetNumPartsAttrib(Ihandle* ih, const char* value) +{ + if (iupStrToInt(value, &ih->data->num_parts)) + iColorbarRepaint(ih); + return 0; +} + +static char* iColorbarGetNumPartsAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(100); + sprintf(buffer, "%d", ih->data->num_parts); + return buffer; +} + +static int iColorbarSetPrimaryCellAttrib(Ihandle* ih, const char* value) +{ + int new_val; + if (iupStrToInt(value, &new_val)) + { + if (new_val > 0 && new_val < ih->data->num_cells) + { + ih->data->fgcolor_idx = new_val; + iColorbarRepaint(ih); + } + } + return 0; +} + +static char* iColorbarGetPrimaryCellAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(100); + sprintf(buffer, "%d", ih->data->fgcolor_idx); + return buffer; +} + +static int iColorbarSetSecondaryCellAttrib(Ihandle* ih, const char* value) +{ + int new_val; + if (iupStrToInt(value, &new_val)) + { + if (new_val > 0 && new_val < ih->data->num_cells) + { + ih->data->bgcolor_idx = new_val; + iColorbarRepaint(ih); + } + } + + return 0; +} + +static char* iColorbarGetSecondaryCellAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(100); + sprintf(buffer, "%d", ih->data->bgcolor_idx); + return buffer; +} + +static int iColorbarSetBufferizeAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "NO")) + { + ih->data->bufferize = 0; + iColorbarRepaint(ih); + } + else + ih->data->bufferize = 1; + + return 0; +} + +static char* iColorbarGetBufferizeAttrib(Ihandle* ih) +{ + if (ih->data->bufferize) + return "YES"; + else + return "NO"; +} + +static int iColorbarSetNumCellsAttrib(Ihandle* ih, const char* value) +{ + int new_val; + if (iupStrToInt(value, &new_val)) + { + if (new_val > 0 && new_val <= 256) + { + ih->data->num_cells = new_val; + + if (ih->data->fgcolor_idx >= ih->data->num_cells) + ih->data->fgcolor_idx = ih->data->num_cells - 1; + + if (ih->data->bgcolor_idx >= ih->data->num_cells) + ih->data->bgcolor_idx = ih->data->num_cells - 1; + + iColorbarRepaint(ih); + } + } + return 0; +} + +static char* iColorbarGetNumCellsAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(100); + sprintf(buffer, "%d", ih->data->num_cells); + return buffer; +} + +static int iColorbarSetOrientationAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "HORIZONTAL")) + ih->data->vertical = 0; + else + ih->data->vertical = 1; + + iColorbarRepaint(ih); + return 0; +} + +static char* iColorbarGetOrientationAttrib(Ihandle* ih) +{ + if (ih->data->vertical) + return "VERTICAL"; + else + return "HORIZONTAL"; +} + +static int iColorbarSetSquaredAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "NO")) + ih->data->squared = 0; + else + ih->data->squared = 1; + + iColorbarRepaint(ih); + return 0; +} + +static char* iColorbarGetSquaredAttrib(Ihandle* ih) +{ + if (ih->data->squared) + return "YES"; + else + return "NO"; +} + +static int iColorbarSetShadowedAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "NO")) + ih->data->shadowed = 0; + else + ih->data->shadowed = 1; + + iColorbarRepaint(ih); + return 0; +} + +static char* iColorbarGetShadowedAttrib(Ihandle* ih) +{ + if (ih->data->shadowed) + return "YES"; + else + return "NO"; +} + +static int iColorbarSetShowSecondaryAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "NO")) + ih->data->show_secondary = 0; + else + ih->data->show_secondary = 1; + + iColorbarRepaint(ih); + return 0; +} + +static char* iColorbarGetShowSecondaryAttrib(Ihandle* ih) +{ + if (ih->data->show_secondary) + return "YES"; + else + return "NO"; +} + +static int iColorbarSetShowPreviewAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "NO")) + ih->data->preview_size = 0; + else + ih->data->preview_size = -1; /* reset to automatic */ + + iColorbarRepaint(ih); + return 1; +} + +static int iColorbarSetPreviewSizeAttrib(Ihandle* ih, const char* value) +{ + if (iupStrToInt(value, &ih->data->preview_size)) + iColorbarRepaint(ih); + return 0; +} + +static char* iColorbarGetPreviewSizeAttrib(Ihandle* ih) +{ + if (ih->data->preview_size == -1) /* automatic */ + return NULL; + else + { + char* buffer = iupStrGetMemory(100); + sprintf(buffer, "%d", ih->data->preview_size); + return buffer; + } +} + +static int iColorbarSetCellAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int idx = -1; + iupStrToInt(name_id, &idx); + if (idx >= 0 || idx < ih->data->num_cells) + { + ih->data->colors[idx] = cdIupConvertColor(value); + iColorbarRepaint(ih); + } + + return 0; +} + +static char* iColorbarGetCellAttrib(Ihandle* ih, const char* name_id) +{ + char* buffer = iupStrGetMemory(100); + int idx = -1; + long color; + + iupStrToInt(name_id, &idx); + if (idx < 0 || idx >= ih->data->num_cells) + return NULL; + + color = ih->data->colors[idx]; + sprintf(buffer, "%d %d %d", cdRed(color), cdGreen(color), cdBlue(color)); + return buffer; +} + +static int iColorbarSetTransparencyAttrib(Ihandle* ih, const char* value) +{ + if (value == NULL) + ih->data->transparency = ICOLORBAR_NO_COLOR; + else + ih->data->transparency = cdIupConvertColor(value); + + iColorbarRepaint(ih); + return 0; +} + +static char* iColorbarGetTransparencyAttrib(Ihandle* ih) +{ + if (ih->data->transparency == ICOLORBAR_NO_COLOR) + return NULL; + else + { + char* buffer = iupStrGetMemory(100); + sprintf(buffer, "%d %d %d", cdRed(ih->data->transparency), cdGreen(ih->data->transparency), cdBlue(ih->data->transparency)); + return buffer; + } +} + +static int iColorbarSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (!value) + value = iupControlBaseGetParentBgColor(ih); + + ih->data->bgcolor = cdIupConvertColor(value); + + cdIupCalcShadows(ih->data->bgcolor, &ih->data->light_shadow, &ih->data->mid_shadow, &ih->data->dark_shadow); + if (!iupdrvIsActive(ih)) + ih->data->light_shadow = ih->data->mid_shadow; + + iColorbarRepaint(ih); + return 1; +} + +static int iColorbarSetActiveAttrib(Ihandle* ih, const char* value) +{ + iupBaseSetActiveAttrib(ih, value); + + cdIupCalcShadows(ih->data->bgcolor, &ih->data->light_shadow, &ih->data->mid_shadow, &ih->data->dark_shadow); + if (!iupdrvIsActive(ih)) + ih->data->light_shadow = ih->data->mid_shadow; + + iColorbarRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static int iColorbarRedraw_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); + if (ih->data->has_focus) + iColorbarDrawFocusCell(ih); + + return IUP_DEFAULT; +} + +static int iColorbarResize_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + { + /* update canvas size */ + cdCanvasActivate(ih->data->cdcanvas); + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + } + + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update size */ + cdCanvasActivate(ih->data->cddbuffer); + cdCanvasGetSize(ih->data->cddbuffer, &ih->data->w, &ih->data->h, NULL, NULL); + + /* update render */ + cdCanvasBackground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasClear(ih->data->cddbuffer); + iColorbarRenderPreview(ih); + iColorbarRenderCells(ih); + + return IUP_DEFAULT; +} + +static void iColorbarRenderPartsRepaint(Ihandle* ih, int preview, int idx) +{ + /* update render */ + if (preview) + iColorbarRenderPreview(ih); + + if (idx != ICOLORBAR_RENDER_NONE) + { + if (idx == ICOLORBAR_RENDER_ALL) + iColorbarRenderCells(ih); + else + iColorbarRenderCell(ih, idx); + } + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); + if (ih->data->has_focus) + iColorbarDrawFocusCell(ih); +} + +static int iColorbarFocus_CB(Ihandle* ih, int focus) +{ + ih->data->has_focus = focus; + + if (ih->data->cddbuffer) + { + cdCanvasFlush(ih->data->cddbuffer); + if (ih->data->has_focus) + iColorbarDrawFocusCell(ih); + } + + return IUP_DEFAULT; +} + +static void iColorbarCallExtentedCb(Ihandle* ih, int idx) +{ + IFni extended_cb = (IFni)IupGetCallback(ih, "EXTENDED_CB"); + if (!extended_cb) + return; + + if (extended_cb(ih, idx) == IUP_IGNORE) + return; + + iColorbarRenderPartsRepaint(ih, 1, ICOLORBAR_RENDER_ALL); /* the preview and all the cells are rendered */ +} + +static void iColorbarCallSelectCb(Ihandle* ih, int idx, int type) +{ + IFnii select_cb; + + if (type == IUP_SECONDARY && !ih->data->show_secondary) + return; + + select_cb = (IFnii)IupGetCallback(ih, "SELECT_CB"); + if (!select_cb) + return; + + if (select_cb(ih, idx, type) == IUP_IGNORE) + return; + + if (type == IUP_PRIMARY) + ih->data->fgcolor_idx = idx; + else + ih->data->bgcolor_idx = idx; + + iColorbarRenderPartsRepaint(ih, 1, ICOLORBAR_RENDER_NONE); /* only the preview area is rendered */ +} + +static void iColorbarCallCellCb(Ihandle* ih, int idx) +{ + char* returned; + sIFni cell_cb = (sIFni)IupGetCallback(ih, "CELL_CB"); + if (!cell_cb) + return; + + returned = cell_cb(ih, idx); /* the application can change the color */ + if (returned) + { + int preview = 0; + /* check if the preview area should be rendered */ + if (idx == ih->data->fgcolor_idx || idx == ih->data->bgcolor_idx) + preview = 1; + + ih->data->colors[idx] = cdIupConvertColor(returned); + iColorbarRenderPartsRepaint(ih, preview, idx); /* the preview and the cell are rendered */ + } +} + +static int iColorbarKeyPress_CB(Ihandle* ih, int c, int press) +{ + if (c != K_LEFT && c != K_UP && c != K_RIGHT && c != K_DOWN && + c != K_HOME && c != K_END && + c != K_SP && c != K_sCR && c != K_sSP && c != K_cSP) + return IUP_DEFAULT; + + if (!press || !ih->data->has_focus) + return IUP_DEFAULT; + + switch(c) + { + case K_LEFT: + if (ih->data->vertical) + { + int cells_per_line = ih->data->num_cells / ih->data->num_parts; + if (ih->data->focus_cell > cells_per_line) + ih->data->focus_cell -= cells_per_line; + } + else + { + if (ih->data->focus_cell > 0) + ih->data->focus_cell--; + } + break; + case K_DOWN: + if (ih->data->vertical) + { + if (ih->data->focus_cell > 0) + ih->data->focus_cell--; + } + else + { + int cells_per_line = ih->data->num_cells / ih->data->num_parts; + if (ih->data->focus_cell > cells_per_line) + ih->data->focus_cell -= cells_per_line; + } + break; + case K_RIGHT: + if (ih->data->vertical) + { + int cells_per_line = ih->data->num_cells / ih->data->num_parts; + if (ih->data->focus_cell+cells_per_line < ih->data->num_cells-1) + ih->data->focus_cell += cells_per_line; + } + else + { + if (ih->data->focus_cell < ih->data->num_cells-1) + ih->data->focus_cell++; + } + break; + case K_UP: + if (ih->data->vertical) + { + if (ih->data->focus_cell < ih->data->num_cells-1) + ih->data->focus_cell++; + } + else + { + int cells_per_line = ih->data->num_cells / ih->data->num_parts; + if (ih->data->focus_cell+cells_per_line < ih->data->num_cells-1) + ih->data->focus_cell += cells_per_line; + } + break; + case K_HOME: + ih->data->focus_cell = 0; + break; + case K_END: + ih->data->focus_cell = ih->data->num_cells-1; + break; + case K_sCR: + iColorbarCallCellCb(ih, ih->data->focus_cell); + return IUP_DEFAULT; + case K_SP: + iColorbarCallSelectCb(ih, ih->data->focus_cell, IUP_PRIMARY); + return IUP_DEFAULT; + case K_cSP: + iColorbarCallSelectCb(ih, ih->data->focus_cell, IUP_SECONDARY); + return IUP_DEFAULT; + case K_sSP: + iColorbarCallExtentedCb(ih, ih->data->focus_cell); + return IUP_DEFAULT; + } + + if (ih->data->cddbuffer) + { + cdCanvasFlush(ih->data->cddbuffer); + if (ih->data->has_focus) + iColorbarDrawFocusCell(ih); + } + + return IUP_IGNORE; /* to avoid arrow keys being processed by the system */ +} + +static int iColorbarButton_CB(Ihandle* ih, int b, int m, int x, int y, char* r) +{ + int idx; + + if (m == 0) + return IUP_DEFAULT; + + y = cdIupInvertYAxis(y, ih->data->h); + + if (b == IUP_BUTTON1 && iup_isdouble(r)) + { + idx = iColorbarGetIndexColor(ih, x, y); + if (idx < 0 || idx >= ih->data->num_cells) + { + int ret = iColorbarCheckPreview(ih, x, y); + if (ret) + { + if (ret == 1) + { + IFnii switch_cb = (IFnii)IupGetCallback(ih, "SWITCH_CB"); + + if (!ih->data->show_secondary) + return IUP_DEFAULT; + + if (switch_cb && switch_cb(ih, ih->data->fgcolor_idx, ih->data->bgcolor_idx) == IUP_IGNORE) + return IUP_DEFAULT; + + /* the application allow to switch the indices */ + idx = ih->data->fgcolor_idx; + ih->data->fgcolor_idx = ih->data->bgcolor_idx; + ih->data->bgcolor_idx = idx; + + iColorbarRenderPartsRepaint(ih, 1, ICOLORBAR_RENDER_NONE); /* only the preview area is rendered */ + } + else + { + if (ret == IUP_PRIMARY) + idx = ih->data->fgcolor_idx; + else + idx = ih->data->bgcolor_idx; + + iColorbarCallCellCb(ih, idx); + } + } + + return IUP_DEFAULT; + } + + ih->data->focus_cell = idx; + + iColorbarCallCellCb(ih, idx); + } + else if (b == IUP_BUTTON1) + { + idx = iColorbarGetIndexColor(ih, x, y); + if (idx < 0 || idx >= ih->data->num_cells) + return IUP_DEFAULT; + + ih->data->focus_cell = idx; + + iColorbarCallSelectCb(ih, idx, IUP_PRIMARY); + } + else if (b == IUP_BUTTON3 && iup_isshift(r)) + { + idx = iColorbarGetIndexColor(ih, x, y); + if (idx < 0 || idx >= ih->data->num_cells) + return IUP_DEFAULT; + + ih->data->focus_cell = idx; + + iColorbarCallExtentedCb(ih, idx); + } + else if (b == IUP_BUTTON3) + { + idx = iColorbarGetIndexColor(ih, x, y); + if (idx < 0 || idx >= ih->data->num_cells) + return IUP_DEFAULT; + + ih->data->focus_cell = idx; + + iColorbarCallSelectCb(ih, idx, IUP_SECONDARY); + } + + return IUP_DEFAULT; +} + + +/****************************************************************************/ + + +static int iColorbarMapMethod(Ihandle* ih) +{ + ih->data->cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!ih->data->cdcanvas) + return IUP_ERROR; + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + + return IUP_NOERROR; +} + +static void iColorbarUnMapMethod(Ihandle* ih) +{ + if (ih->data->cddbuffer) + cdKillCanvas(ih->data->cddbuffer); + + if (ih->data->cdcanvas) + cdKillCanvas(ih->data->cdcanvas); +} + +static int iColorbarCreateMethod(Ihandle* ih, void **params) +{ + int i; + (void)params; + + /* free the data allocated by IupCanvas */ + if (ih->data) free(ih->data); + ih->data = iupALLOCCTRLDATA(); + + /* change the IupCanvas default values */ + iupAttribSetStr(ih, "BORDER", "NO"); + + /* default values */ + ih->data->num_cells = 16; + ih->data->num_parts = 1; + ih->data->vertical = 1; + ih->data->squared = 1; + ih->data->shadowed = 1; + ih->data->focus_cell = 0; + ih->data->preview_size = -1; /* automatic */ + ih->data->fgcolor_idx = 0; /* black */ + ih->data->bgcolor_idx = 15; /* white */ + ih->data->transparency = ICOLORBAR_NO_COLOR; + ih->data->light_shadow = CD_WHITE; + ih->data->mid_shadow = CD_GRAY; + ih->data->dark_shadow = CD_DARK_GRAY; + + /* Initialization of the color vector */ + for (i = 0; i < ICOLORBAR_DEFAULT_NUM_CELLS; i++) + { + ih->data->colors[i] = cdEncodeColor((unsigned char)default_colors[i].r, + (unsigned char)default_colors[i].g, + (unsigned char)default_colors[i].b); + } + + /* IupCanvas callbacks */ + IupSetCallback(ih, "RESIZE_CB", (Icallback)iColorbarResize_CB); + IupSetCallback(ih, "ACTION", (Icallback)iColorbarRedraw_CB); + IupSetCallback(ih, "BUTTON_CB", (Icallback)iColorbarButton_CB); + IupSetCallback(ih, "FOCUS_CB", (Icallback)iColorbarFocus_CB); + IupSetCallback(ih, "KEYPRESS_CB", (Icallback)iColorbarKeyPress_CB); + + return IUP_NOERROR; +} + +Iclass* iupColorbarGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "colorbar"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + ic->has_attrib_id = 1; /* has attributes with IDs that must be parsed */ + + /* Class functions */ + ic->Create = iColorbarCreateMethod; + ic->Map = iColorbarMapMethod; + ic->UnMap = iColorbarUnMapMethod; + + /* Do not need to set base attributes because they are inherited from IupCanvas */ + + /* IupColorbar Callbacks */ + iupClassRegisterCallback(ic, "CELL_CB", "i=s"); + iupClassRegisterCallback(ic, "SWITCH_CB", "ii"); + iupClassRegisterCallback(ic, "SELECT_CB", "ii"); + iupClassRegisterCallback(ic, "EXTENDED_CB", "i"); + + /* IupColorbar only */ + iupClassRegisterAttributeId(ic, "CELL", iColorbarGetCellAttrib, iColorbarSetCellAttrib, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NUM_CELLS", iColorbarGetNumCellsAttrib, iColorbarSetNumCellsAttrib, IUPAF_SAMEASSYSTEM, "16", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NUM_PARTS", iColorbarGetNumPartsAttrib, iColorbarSetNumPartsAttrib, IUPAF_SAMEASSYSTEM, "1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PREVIEW_SIZE", iColorbarGetPreviewSizeAttrib, iColorbarSetPreviewSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "PRIMARY_CELL", iColorbarGetPrimaryCellAttrib, iColorbarSetPrimaryCellAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SECONDARY_CELL", iColorbarGetSecondaryCellAttrib, iColorbarSetSecondaryCellAttrib, IUPAF_SAMEASSYSTEM, "15", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "BUFFERIZE", iColorbarGetBufferizeAttrib, iColorbarSetBufferizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "ORIENTATION", iColorbarGetOrientationAttrib, iColorbarSetOrientationAttrib, IUPAF_SAMEASSYSTEM, "VERTICAL", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "TRANSPARENCY", iColorbarGetTransparencyAttrib, iColorbarSetTransparencyAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "SHOW_PREVIEW", NULL, iColorbarSetShowPreviewAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "SHOW_SECONDARY", iColorbarGetShowSecondaryAttrib, iColorbarSetShowSecondaryAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "SQUARED", iColorbarGetSquaredAttrib, iColorbarSetSquaredAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "SHADOWED", iColorbarGetShadowedAttrib, iColorbarSetShadowedAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED); + + /* Overwrite IupCanvas Attributes */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iColorbarSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", iupControlBaseGetBgColorAttrib, iColorbarSetBgColorAttrib, NULL, "255 255 255", IUPAF_NO_INHERIT); /* overwrite canvas implementation, set a system default to force a new default */ + + return ic; +} + +Ihandle *IupColorbar(void) +{ + return IupCreate("colorbar"); +} diff --git a/iup/srccontrols/iup_controls.c b/iup/srccontrols/iup_controls.c new file mode 100755 index 0000000..e60bd91 --- /dev/null +++ b/iup/srccontrols/iup_controls.c @@ -0,0 +1,56 @@ +/** \file + * \brief initializes the additional controls. + * + * See Copyright Notice in "iup.h" + */ + + +#include "iup.h" +#include "iupcontrols.h" + +#include "iup_object.h" +#include "iup_childtree.h" +#include "iup_register.h" +#include "iup_controls.h" +#include "iup_attrib.h" + + +int IupControlsOpen(void) +{ + if (IupGetGlobal("_IUP_CONTROLS_OPEN")) + return IUP_OPENED; + + iupRegisterClass(iupDialGetClass()); + iupRegisterClass(iupCellsGetClass()); + iupRegisterClass(iupColorbarGetClass()); + iupRegisterClass(iupColorBrowserGetClass()); + iupRegisterClass(iupMatrixGetClass()); + iupRegisterClass(iupGaugeGetClass()); + iupRegisterClass(iupColorBrowserDlgGetClass()); + + IupSetGlobal("_IUP_CONTROLS_OPEN", "1"); + + return IUP_NOERROR; +} + +void IupControlsClose(void) /* for backward compatibility */ +{ +} + +char *iupControlBaseGetParentBgColor(Ihandle* ih) +{ + return IupGetAttribute(iupChildTreeGetNativeParent(ih), "BGCOLOR"); +} + +char *iupControlBaseGetBgColorAttrib(Ihandle* ih) +{ + /* check the hash table */ + char *color = iupAttribGet(ih, "BGCOLOR"); + + /* If not defined check native definition from parent */ + if (!color) + color = iupControlBaseGetParentBgColor(ih); + + return color; +} + diff --git a/iup/srccontrols/iup_controls.h b/iup/srccontrols/iup_controls.h new file mode 100755 index 0000000..bb26963 --- /dev/null +++ b/iup/srccontrols/iup_controls.h @@ -0,0 +1,33 @@ +/** \file + * \brief Additional Controls Class Initialization functions. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUP_CONTROLS_H +#define __IUP_CONTROLS_H + + +#ifdef __cplusplus +extern "C" { +#endif + + +Iclass* iupDialGetClass(void); +Iclass* iupCellsGetClass(void); +Iclass* iupColorbarGetClass(void); +Iclass* iupColorBrowserGetClass(void); +Iclass* iupMatrixGetClass(void); +Iclass* iupGaugeGetClass(void); +Iclass* iupTabsGetClass(void); +Iclass* iupColorBrowserDlgGetClass(void); + +char *iupControlBaseGetParentBgColor (Ihandle* ih); +char *iupControlBaseGetBgColorAttrib(Ihandle* ih); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/iup_dial.c b/iup/srccontrols/iup_dial.c new file mode 100755 index 0000000..1dd2d0f --- /dev/null +++ b/iup/srccontrols/iup_dial.c @@ -0,0 +1,864 @@ +/** \file + * \brief Dial Control. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include +#include +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_controls.h" +#include "iup_cdutil.h" + + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +#define IDIAL_SPACE 3 +#define IDIAL_NCOLORS 10 +#define IDIAL_DEFAULT_DENSITY 0.2 +#define IDIAL_DEFAULT_DENSITY_STR "0.2" +#define IDIAL_DEFAULT_FGCOLOR "64 64 64" +#define IDIAL_DEFAULT_FGCOLOR_COMP 64 + +enum{IDIAL_VERTICAL, IDIAL_HORIZONTAL, IDIAL_CIRCULAR}; + +#define dialmin(a,b) ((a)<(b)?(a):(b)) + + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + + /* attributes */ + double angle; + int type; + double unit; + double density; + + /* mouse interaction control */ + int px; + int py; + int pressing; + + /* visual appearance control */ + void (*Draw)(Ihandle* ih); + int w, h; + int has_focus; + int num_div; /* number of sections in the dial wheel */ + double radius; /* radius size of the dial wheel */ + long fgcolor[IDIAL_NCOLORS+1]; + long bgcolor, + light_shadow, + mid_shadow, + dark_shadow; + + /* drawing canvas */ + cdCanvas *cddbuffer; + cdCanvas *cdcanvas; +}; + + +static long int iDialGetFgColor(Ihandle* ih, double a, double amin) +{ + double nu = fabs(a - 0.5 * M_PI); + double de = fabs(0.5 * M_PI - amin); + double fr = nu / de; + int i = (int)(IDIAL_NCOLORS * fr); + return ih->data->fgcolor[IDIAL_NCOLORS - i]; +} + +static void iDialDrawVerticalBackground(Ihandle* ih, double amin, double amax, int *ymin, int *ymax) +{ + double delta = (0.5 * M_PI - amin) / IDIAL_NCOLORS; + double a, yc = ih->data->h / 2.0; + *ymin = *ymax = ih->data->h / 2; + for (a = amin; a < 0.5 * M_PI; a += delta) /* shading */ + { + int y0 = (int)(yc - ih->data->radius * cos(a)); + int y1 = (int)(yc - ih->data->radius * cos(a+delta)); + cdCanvasForeground(ih->data->cddbuffer, iDialGetFgColor(ih, a, amin)); + cdCanvasBox(ih->data->cddbuffer, IDIAL_SPACE+1, ih->data->w-1-IDIAL_SPACE-2, y0, y1); + + if (y0 < *ymin) *ymin = y0; + + if (abs(y1-y0) < 2) + continue; + } + for (a = 0.5 * M_PI; a < amax; a += delta) + { + int y0 = (int)(yc + ih->data->radius * fabs(cos(a))); + int y1 = (int)(yc + ih->data->radius * fabs(cos(a+delta))); + cdCanvasForeground(ih->data->cddbuffer, iDialGetFgColor(ih, a, amin)); + cdCanvasBox(ih->data->cddbuffer, IDIAL_SPACE+1, ih->data->w-1-IDIAL_SPACE-2, y0, y1); + + if (y1 > *ymax) *ymax = y1; + + if (abs(y1-y0) < 2) + continue; + } +} + +static void iDialDrawVertical(Ihandle* ih) +{ + double delta = 2 * M_PI / ih->data->num_div; + double a, amin, amax; + int ymin, ymax; + + ih->data->radius = (ih->data->h - 2 * IDIAL_SPACE - 2) / 2.0; + + amin = 0.0; + amax = M_PI; + if(ih->data->angle < amin) + { + for (a = ih->data->angle; a < amin; a += delta) + ; + } + else + { + for (a = ih->data->angle; a > amin; a -= delta) + ; + a += delta; + } + + iDialDrawVerticalBackground(ih, amin, amax, &ymin, &ymax); + + cdIupDrawRaisenRect(ih->data->cddbuffer, IDIAL_SPACE, ymin, ih->data->w-1-IDIAL_SPACE, ymax, + ih->data->light_shadow, ih->data->mid_shadow, ih->data->dark_shadow); + + for ( ; a < amax; a += delta) /* graduation */ + { + int y; + if (a < 0.5 * M_PI) y = (int)(ih->data->h / 2.0 - ih->data->radius * cos(a)); + else y = (int)(ih->data->h / 2.0 + ih->data->radius * fabs(cos(a))); + + if (abs(y-ymin) < 3 || abs(ymax-y) < 3) + continue; + + cdIupDrawHorizSunkenMark(ih->data->cddbuffer, IDIAL_SPACE+1, ih->data->w-1-IDIAL_SPACE-2, y, ih->data->light_shadow, ih->data->dark_shadow); + } +} + +static void iDialDrawHorizontalBackground(Ihandle* ih,double amin,double amax, int *xmin, int *xmax) +{ + double delta = (0.5 * M_PI - amin) / IDIAL_NCOLORS; + double a, xc = ih->data->w / 2.0; + *xmin = *xmax = ih->data->w / 2; + for (a = amin; a < 0.5 * M_PI; a += delta) + { + int x0=(int)(xc - ih->data->radius * cos(a)); + int x1=(int)(xc - ih->data->radius * cos(a + delta)); + cdCanvasForeground(ih->data->cddbuffer,iDialGetFgColor(ih, a, amin)); + cdCanvasBox(ih->data->cddbuffer, x0, x1, IDIAL_SPACE+2, ih->data->h-1-IDIAL_SPACE-1); + + if (x0 < *xmin) *xmin = x0; + + if (abs(x1 - x0) < 2) + continue; + } + for (a = 0.5 * M_PI; a < amax; a += delta) + { + int x0 =(int)(xc + ih->data->radius * fabs(cos(a))); + int x1 =(int)(xc + ih->data->radius * fabs(cos(a + delta))); + cdCanvasForeground(ih->data->cddbuffer, iDialGetFgColor(ih, a, amin)); + cdCanvasBox(ih->data->cddbuffer, x0, x1, IDIAL_SPACE+2, ih->data->h-1-IDIAL_SPACE-1); + + if (x1 > *xmax) *xmax = x1; + + if (abs(x1-x0) < 2) + continue; + } +} + +static void iDialDrawHorizontal(Ihandle* ih) +{ + double delta = 2 * M_PI / ih->data->num_div; + int x; + double a, amin, amax; + int xmin, xmax; + ih->data->radius = (ih->data->w - 2 * IDIAL_SPACE - 2) / 2.0; + amin = 0.0; + amax = M_PI; + if(ih->data->angle < amin) + { + for (a = ih->data->angle; a < amin; a += delta) ; + } + else + { + for (a = ih->data->angle; a > amin; a-= delta) ; + a += delta; + } + + iDialDrawHorizontalBackground(ih, amin, amax, &xmin, &xmax); + + cdIupDrawRaisenRect(ih->data->cddbuffer, xmin, IDIAL_SPACE, xmax, ih->data->h-1-IDIAL_SPACE, + ih->data->light_shadow, ih->data->mid_shadow, ih->data->dark_shadow); + + for ( ; a < amax; a += delta) + { + if (a < 0.5 * M_PI) x = (int)(ih->data->w / 2.0 - ih->data->radius * cos(a)); + else x = (int)(ih->data->w / 2.0 + ih->data->radius * fabs(cos(a))); + + if (abs(x - xmin) < 3 || abs(xmax - x) < 3) + continue; + + cdIupDrawVertSunkenMark(ih->data->cddbuffer, x, IDIAL_SPACE+2, ih->data->h-1-IDIAL_SPACE-1, ih->data->light_shadow, ih->data->dark_shadow); + } +} + +static void iDialDrawCircularMark(Ihandle* ih, int x1, int y1) +{ + cdCanvasForeground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasBox(ih->data->cddbuffer,x1, x1+4, y1, y1+4); + + cdCanvasForeground(ih->data->cddbuffer, ih->data->light_shadow); + cdCanvasLine(ih->data->cddbuffer, x1, y1+1, x1, y1+3); + cdCanvasLine(ih->data->cddbuffer, x1+1, y1+4, x1+3, y1+4); + + cdCanvasForeground(ih->data->cddbuffer, ih->data->mid_shadow); + cdCanvasLine(ih->data->cddbuffer, x1+1, y1, x1+4, y1); + cdCanvasLine(ih->data->cddbuffer, x1+4, y1, x1+4, y1+3); + + cdCanvasForeground(ih->data->cddbuffer, ih->data->dark_shadow); + cdCanvasLine(ih->data->cddbuffer, x1+2, y1, x1+3, y1); + cdCanvasLine(ih->data->cddbuffer, x1+4, y1+1, x1+4, y1+2); +} + +static void iDialDrawCircular(Ihandle* ih) +{ + double delta = 2 * M_PI / ih->data->num_div, a = ih->data->angle; + int i, xc = ih->data->w / 2, yc = ih->data->h / 2, wide; + ih->data->radius = dialmin(ih->data->w, ih->data->h) / 2 - 2 * IDIAL_SPACE; + + wide = (int)(2 * ih->data->radius); + cdCanvasForeground(ih->data->cddbuffer, ih->data->mid_shadow); + cdCanvasLineWidth(ih->data->cddbuffer, 2); + cdCanvasArc(ih->data->cddbuffer, xc, yc, wide-1, wide-1, -135, 45.0); + cdCanvasLineWidth(ih->data->cddbuffer, 1); + cdCanvasForeground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasSector(ih->data->cddbuffer, xc, yc, wide-2, wide-2, 0.0, 360.0); + cdCanvasForeground(ih->data->cddbuffer, ih->data->light_shadow); + cdCanvasArc(ih->data->cddbuffer, xc, yc, wide, wide, 45, 225); + cdCanvasForeground(ih->data->cddbuffer, ih->data->dark_shadow); + cdCanvasArc(ih->data->cddbuffer, xc, yc, wide, wide, -135, 45); + + for (i = 0; i < ih->data->num_div; ++i) + { + int x2 = (int)(xc + (ih->data->radius - 6) * cos(a)); + int y2 = (int)(yc + (ih->data->radius - 6) * sin(a)); + + if (i == 0) + { + cdCanvasForeground(ih->data->cddbuffer, CD_BLACK); + cdCanvasLine(ih->data->cddbuffer, xc, yc, x2, y2); + } + + iDialDrawCircularMark(ih, x2-2, y2-2); + a += delta; + } + + iDialDrawCircularMark(ih, xc-2, yc-2); +} + +static void iDialRepaint(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + return; + + /* update render */ + cdCanvasBackground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasClear(ih->data->cddbuffer); + ih->data->Draw(ih); + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); + if (ih->data->has_focus) + cdIupDrawFocusRect(ih, ih->data->cdcanvas, 0, 0, ih->data->w-1, ih->data->h-1); +} + +static void iDialUpdateFgColors(Ihandle* ih, unsigned char r, unsigned char g, unsigned char b) +{ + int i, max, deltar, deltag, deltab; + + /* this function is also called before mapping */ + max = (ih->handle && iupdrvIsActive(ih))? 255 : 192; + deltar = (max-r) / IDIAL_NCOLORS; + deltag = (max-g) / IDIAL_NCOLORS; + deltab = (max-b) / IDIAL_NCOLORS; + + for (i=0; i<=IDIAL_NCOLORS; i++) + { + ih->data->fgcolor[i] = cdEncodeColor(r, g, b); + r = (unsigned char)(r + deltar); + g = (unsigned char)(g + deltag); + b = (unsigned char)(b + deltab); + } +} + +static int iDialButtonPress(Ihandle* ih, int button, int x, int y) +{ + IFn cb; + + if (button!=IUP_BUTTON1) + return IUP_DEFAULT; + + y = cdIupInvertYAxis(y, ih->data->h); + ih->data->px = x; + ih->data->py = y; + + if (ih->data->type != IDIAL_CIRCULAR) + ih->data->angle=0; + + cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (cb) + cb(ih); + else + { + IFnd cb_old = (IFnd) IupGetCallback(ih, "BUTTON_PRESS_CB"); + if (cb_old) + cb_old(ih, ih->data->angle * ih->data->unit); + } + + return IUP_DEFAULT; +} + +static int iDialButtonRelease(Ihandle* ih, int button) +{ + IFn cb; + + if (button!=IUP_BUTTON1) + return IUP_DEFAULT; + + iDialRepaint(ih); + + cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (cb) + cb(ih); + else + { + IFnd cb_old = (IFnd) IupGetCallback(ih, "BUTTON_RELEASE_CB"); + if (cb_old) + cb_old(ih, ih->data->angle * ih->data->unit); + } + + return IUP_DEFAULT; +} + + +/******************************************************************/ + + +static int iDialMotionVertical_CB(Ihandle* ih, int x, int y, char *status) +{ + IFn cb; + (void)x; /* not used */ + + if (!iup_isbutton1(status)) + return IUP_DEFAULT; + + y = cdIupInvertYAxis(y, ih->data->h); + ih->data->angle += (double)(y-ih->data->py) / ih->data->radius; + ih->data->py = y; + + iDialRepaint(ih); + + cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (cb) + cb(ih); + else + { + IFnd cb_old = (IFnd) IupGetCallback(ih, "MOUSEMOVE_CB"); + if (cb_old) + cb_old(ih, ih->data->angle * ih->data->unit); + } + + return IUP_DEFAULT; +} + +static int iDialMotionHorizontal_CB(Ihandle* ih, int x, int y, char *status) +{ + IFn cb; + + if (!iup_isbutton1(status)) + return IUP_DEFAULT; + + y = cdIupInvertYAxis(y, ih->data->h); + ih->data->angle += (double)(x-ih->data->px) / ih->data->radius; + ih->data->px = x; + + iDialRepaint(ih); + + cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (cb) + cb(ih); + else + { + IFnd cb_old = (IFnd) IupGetCallback(ih, "MOUSEMOVE_CB"); + if (cb_old) + cb_old(ih, ih->data->angle * ih->data->unit); + } + + return IUP_DEFAULT; +} + +static int iDialMotionCircular_CB(Ihandle* ih, int x, int y, char *status) +{ + int cx = ih->data->w / 2; + int cy = ih->data->h / 2; + double vet, xa, ya, xb, yb, ma, mb, ab; + IFn cb; + + if (!iup_isbutton1(status)) + return IUP_DEFAULT; + + y = cdIupInvertYAxis(y, ih->data->h); + + xa = ih->data->px-cx; + ya = ih->data->py-cy; + ma = sqrt(xa * xa + ya * ya); + + xb = x - cx; + yb = y - cy; + mb = sqrt(xb * xb + yb * yb); + + ab = xa * xb + ya * yb; + vet = xa * yb - xb * ya; + + ab = ab / (ma * mb); + + /* if the mouse is in the center of the dial, ignore it */ + if (ma == 0 || mb == 0 || ab < -1 || ab > 1) + return IUP_DEFAULT; + + if (vet>0) ih->data->angle += acos(ab); + else ih->data->angle -= acos(ab); + + iDialRepaint(ih); + ih->data->px = x; + ih->data->py = y; + + cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (cb) + cb(ih); + else + { + IFnd cb_old = (IFnd) IupGetCallback(ih, "MOUSEMOVE_CB"); + if (cb_old) + cb_old(ih, ih->data->angle * ih->data->unit); + } + + return IUP_DEFAULT; +} + +static int iDialButton_CB(Ihandle* ih, int button, int pressed, int x, int y) +{ + if (pressed) + return iDialButtonPress(ih, button, x, y); + else + return iDialButtonRelease(ih, button); +} + +static int iDialResize_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + { + /* update canvas size */ + cdCanvasActivate(ih->data->cdcanvas); + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + } + + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update size */ + cdCanvasActivate(ih->data->cddbuffer); + cdCanvasGetSize(ih->data->cddbuffer, &ih->data->w, &ih->data->h, NULL, NULL); + + /* update number of divisions */ + switch(ih->data->type) + { + case IDIAL_VERTICAL: + ih->data->num_div = (int)((ih->data->h-2 * IDIAL_SPACE-2) * ih->data->density); + break; + + case IDIAL_HORIZONTAL: + ih->data->num_div = (int)((ih->data->w-2 * IDIAL_SPACE-2) * ih->data->density); + break; + + case IDIAL_CIRCULAR: + ih->data->num_div = (int)((dialmin(ih->data->w, ih->data->h)-2 * IDIAL_SPACE-2) * ih->data->density); + break; + } + + /* update render */ + cdCanvasBackground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasClear(ih->data->cddbuffer); + ih->data->Draw(ih); + + return IUP_DEFAULT; +} + +static int iDialRedraw_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); + if (ih->data->has_focus) + cdIupDrawFocusRect(ih, ih->data->cdcanvas, 0, 0, ih->data->w-1, ih->data->h-1); + + return IUP_DEFAULT; +} + +static int iDialFocus_CB(Ihandle* ih, int focus) +{ + ih->data->has_focus = focus; + iDialRepaint(ih); + return IUP_DEFAULT; +} + +static int iDialKeyPress_CB(Ihandle* ih, int c, int press) +{ + IFn cb; + char* cb_name; + + if (c != K_LEFT && c != K_UP && + c != K_sLEFT && c != K_sUP && + c != K_RIGHT && c != K_DOWN && + c != K_sRIGHT && c != K_sDOWN && + c != K_HOME) + return IUP_DEFAULT; + + if (press && ih->data->pressing) + { + switch(c) + { + case K_sLEFT: + case K_sDOWN: + ih->data->angle -= M_PI / 100.0; + break; + case K_LEFT: + case K_DOWN: + ih->data->angle -= M_PI / 10.0; + break; + case K_sRIGHT: + case K_sUP: + ih->data->angle += M_PI / 100.0; + break; + case K_RIGHT: + case K_UP: + ih->data->angle += M_PI / 10.0; + break; + } + } + + if (c == K_HOME) + ih->data->angle = 0; + + if (press) + { + if (ih->data->pressing) + { + cb_name = "MOUSEMOVE_CB"; + } + else + { + ih->data->pressing = 1; + if (ih->data->type != IDIAL_CIRCULAR) + ih->data->angle = 0; + cb_name = "BUTTON_PRESS_CB"; + } + } + else + { + ih->data->pressing = 0; + cb_name = "RELEASE_CB"; + } + + iDialRepaint(ih); + + cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (cb) + cb(ih); + else + { + IFnd cb_old = (IFnd) IupGetCallback(ih, cb_name); + if (cb_old) + cb_old(ih, ih->data->angle * ih->data->unit); + } + + return IUP_IGNORE; /* to avoid arrow keys being processed by the system */ +} + +static int iDialWheel_CB(Ihandle* ih, float delta) +{ + IFn cb; + + ih->data->angle += ((double)delta) * (M_PI / 10.0); + + if (fabs(ih->data->angle) < M_PI / 10.1) + ih->data->angle = 0; + + iDialRepaint(ih); + + cb = (IFn)IupGetCallback(ih, "VALUECHANGED_CB"); + if (cb) + cb(ih); + else + { + IFnd cb_old = (IFnd) IupGetCallback(ih, "MOUSEMOVE_CB"); + if (cb_old) + cb_old(ih, ih->data->angle * ih->data->unit); + } + + return IUP_DEFAULT; +} + + +/*********************************************************************************/ + + +static char* iDialGetValueAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + sprintf(str, "%f", ih->data->angle); + return str; +} + +static int iDialSetValueAttrib(Ihandle* ih, const char* value) +{ + if (!value) /* reset to default */ + ih->data->angle = 0; + else + ih->data->angle = atof(value); + + iDialRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static int iDialSetDensityAttrib(Ihandle* ih, const char* value) +{ + ih->data->density = atof(value); + iDialRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iDialGetDensityAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + sprintf(str, "%f", ih->data->density); + return str; +} + +static int iDialSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (!value) + value = iupControlBaseGetParentBgColor(ih); + + ih->data->bgcolor = cdIupConvertColor(value); + + cdIupCalcShadows(ih->data->bgcolor, &ih->data->light_shadow, &ih->data->mid_shadow, &ih->data->dark_shadow); + if (!iupdrvIsActive(ih)) + ih->data->light_shadow = ih->data->mid_shadow; + + iDialRepaint(ih); + return 1; +} + +static int iDialSetFgColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + iDialUpdateFgColors(ih, r, g, b); + + iDialRepaint(ih); + return 1; +} + +static int iDialSetActiveAttrib(Ihandle* ih, const char* value) +{ + unsigned char r, g, b; + + iupBaseSetActiveAttrib(ih, value); + + value = iupAttribGetStr(ih, "FGCOLOR"); + if (!iupStrToRGB(value, &r, &g, &b)) + return 0; + iDialUpdateFgColors(ih, r, g, b); + + cdIupCalcShadows(ih->data->bgcolor, &ih->data->light_shadow, &ih->data->mid_shadow, &ih->data->dark_shadow); + if (!iupdrvIsActive(ih)) + ih->data->light_shadow = ih->data->mid_shadow; + + iDialRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static int iDialSetUnitAttrib(Ihandle* ih, const char* value) +{ + ih->data->unit = iupStrEqualNoCase(value, "DEGREES")? CD_RAD2DEG : 1.0; + return 1; +} + +static int iDialSetTypeAttrib(Ihandle* ih, const char* value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + if (iupStrEqualNoCase(value, "VERTICAL")) + { + ih->data->Draw = iDialDrawVertical; + ih->data->type = IDIAL_VERTICAL; + IupSetCallback(ih, "MOTION_CB", (Icallback)iDialMotionVertical_CB); + IupSetAttribute(ih, "SIZE", "16x80"); + } + else if (iupStrEqualNoCase(value, "CIRCULAR")) + { + ih->data->Draw = iDialDrawCircular; + ih->data->type = IDIAL_CIRCULAR; + IupSetCallback(ih, "MOTION_CB", (Icallback)iDialMotionCircular_CB); + IupSetAttribute(ih, "SIZE", "40x36"); + } + else /* "HORIZONTAL" */ + { + ih->data->Draw = iDialDrawHorizontal; + ih->data->type = IDIAL_HORIZONTAL; + IupSetCallback(ih, "MOTION_CB", (Icallback)iDialMotionHorizontal_CB); + IupSetAttribute(ih, "SIZE", "80x16"); + } + return 0; /* do not store value in hash table */ +} + +static char* iDialGetTypeAttrib(Ihandle* ih) +{ + if (ih->data->type == IDIAL_HORIZONTAL) + return "HORIZONTAL"; + else if (ih->data->type == IDIAL_VERTICAL) + return "VERTICAL"; + else /* (ih->data->type == IDIAL_CIRCULAR) */ + return "CIRCULAR"; +} + + +/****************************************************************************/ + + +static int iDialMapMethod(Ihandle* ih) +{ + ih->data->cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!ih->data->cdcanvas) + return IUP_ERROR; + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + + return IUP_NOERROR; +} + +static void iDialUnMapMethod(Ihandle* ih) +{ + if (ih->data->cddbuffer) + cdKillCanvas(ih->data->cddbuffer); + + if (ih->data->cdcanvas) + cdKillCanvas(ih->data->cdcanvas); +} + +static int iDialCreateMethod(Ihandle* ih, void **params) +{ + char* type = "HORIZONTAL"; + if (params && params[0]) + type = params[0]; + + /* free the data allocated by IupCanvas */ + if (ih->data) free(ih->data); + ih->data = iupALLOCCTRLDATA(); + + /* change the IupCanvas default values */ + iupAttribSetStr(ih, "BORDER", "NO"); + ih->expand = IUP_EXPAND_NONE; + + /* default values */ + iDialSetTypeAttrib(ih, type); + ih->data->density = IDIAL_DEFAULT_DENSITY; + ih->data->unit = 1.0; /* RADIANS */ + iDialUpdateFgColors(ih, IDIAL_DEFAULT_FGCOLOR_COMP, IDIAL_DEFAULT_FGCOLOR_COMP, IDIAL_DEFAULT_FGCOLOR_COMP); + + /* IupCanvas callbacks */ + IupSetCallback(ih, "ACTION", (Icallback)iDialRedraw_CB); + IupSetCallback(ih, "RESIZE_CB", (Icallback)iDialResize_CB); + IupSetCallback(ih, "BUTTON_CB", (Icallback)iDialButton_CB); + IupSetCallback(ih, "FOCUS_CB", (Icallback)iDialFocus_CB); + IupSetCallback(ih, "KEYPRESS_CB", (Icallback)iDialKeyPress_CB); + IupSetCallback(ih, "WHEEL_CB", (Icallback)iDialWheel_CB); + + return IUP_NOERROR; +} + +Iclass* iupDialGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "dial"; + ic->format = "S"; /* one optional string */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iDialCreateMethod; + ic->Map = iDialMapMethod; + ic->UnMap = iDialUnMapMethod; + + /* Do not need to set base attributes because they are inherited from IupCanvas */ + + /* IupDial Callbacks */ + iupClassRegisterCallback(ic, "MOUSEMOVE_CB", "d"); + iupClassRegisterCallback(ic, "BUTTON_PRESS_CB", "d"); + iupClassRegisterCallback(ic, "BUTTON_RELEASE_CB", "d"); + iupClassRegisterCallback(ic, "VALUECHANGED_CB", ""); + + /* IupDial only */ + iupClassRegisterAttribute(ic, "VALUE", iDialGetValueAttrib, iDialSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TYPE", iDialGetTypeAttrib, iDialSetTypeAttrib, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "DENSITY", iDialGetDensityAttrib, iDialSetDensityAttrib, IDIAL_DEFAULT_DENSITY_STR, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, iDialSetFgColorAttrib, IDIAL_DEFAULT_FGCOLOR, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "UNIT", NULL, iDialSetUnitAttrib, IUPAF_SAMEASSYSTEM, "RADIANS", IUPAF_NOT_MAPPED); + + /* Overwrite IupCanvas Attributes */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iDialSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", iupControlBaseGetBgColorAttrib, iDialSetBgColorAttrib, NULL, "255 255 255", IUPAF_NO_INHERIT); /* overwrite canvas implementation, set a system default to force a new default */ + + return ic; +} + +Ihandle* IupDial(const char* type) +{ + void *params[2]; + params[0] = (void*)type; + params[1] = NULL; + return IupCreatev("dial", params); +} diff --git a/iup/srccontrols/iup_gauge.c b/iup/srccontrols/iup_gauge.c new file mode 100755 index 0000000..8732eee --- /dev/null +++ b/iup/srccontrols/iup_gauge.c @@ -0,0 +1,435 @@ +/** \file + * \brief Gauge control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include +#include +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_controls.h" +#include "iup_cdutil.h" + +#define IGAUGE_DEFAULTCOLOR "64 96 192" +#define IGAUGE_DEFAULTSIZE "120x14" + +#define IGAUGE_GAP 3 +#define IGAUGE_BLOCKS 20 + +#define gaugeround(_) ((int)((_)+.5)) + + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + + int w; + int h; + + int show_text; + int dashed; + int horiz_padding, vert_padding; /* internal margin */ + + long bgcolor; + long fgcolor; + long light_shadow; + long mid_shadow; + long dark_shadow; + + double value; /* min<=valuedata->text; + + cdCanvasNativeFont(ih->data->cddbuffer, IupGetAttribute(ih, "FONT")); + cdCanvasTextAlignment(ih->data->cddbuffer, CD_CENTER); + cdCanvasBackOpacity(ih->data->cddbuffer, CD_TRANSPARENT); + + x = (int)(0.5 * ih->data->w); + y = (int)(0.5 * ih->data->h); + + if(text == NULL) + { + char* m = iupStrGetMemory(30); + sprintf(m, "%.1f%%", 100 * (ih->data->value - ih->data->vmin) / (ih->data->vmax - ih->data->vmin)); + text = m; + } + + cdCanvasGetTextBox(ih->data->cddbuffer, x, y, text, &xmin, &xmax, &ymin, &ymax); + + if(xmid < xmin) + { + cdCanvasForeground(ih->data->cddbuffer, ih->data->fgcolor); + cdCanvasText(ih->data->cddbuffer, x, y, text); + } + else if(xmid > xmax) + { + cdCanvasForeground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasText(ih->data->cddbuffer, x, y, text); + } + else + { + cdCanvasClip(ih->data->cddbuffer, CD_CLIPAREA); + cdCanvasClipArea(ih->data->cddbuffer, xmin, xmid, ymin, ymax); + cdCanvasForeground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasText(ih->data->cddbuffer, x, y, text); + + cdCanvasClipArea(ih->data->cddbuffer, xmid, xmax, ymin, ymax); + cdCanvasForeground(ih->data->cddbuffer, ih->data->fgcolor); + cdCanvasText(ih->data->cddbuffer, x, y, text); + cdCanvasClip(ih->data->cddbuffer, CD_CLIPOFF); + } +} + +static void iGaugeDrawGauge(Ihandle* ih) +{ + int border = 3; /* includes the pixel used to draw the 3D border */ + int xstart = ih->data->horiz_padding+border; + int ystart = ih->data->vert_padding+border; + int xend = ih->data->w-1 - (ih->data->horiz_padding+border); + int yend = ih->data->h-1 - (ih->data->vert_padding+border); + + cdCanvasBackground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasClear(ih->data->cddbuffer); + + cdIupDrawSunkenRect(ih->data->cddbuffer, 0, 0, ih->data->w-1, ih->data->h-1, + ih->data->light_shadow, ih->data->mid_shadow, ih->data->dark_shadow); + + cdCanvasForeground(ih->data->cddbuffer, ih->data->fgcolor); + + if (ih->data->dashed) + { + float step = (xend - xstart + 1) / (float)IGAUGE_BLOCKS; + float boxw = step - IGAUGE_GAP; + float vx = (float)((xend-xstart + 1) * (ih->data->value - ih->data->vmin) / (ih->data->vmax - ih->data->vmin)); + int intvx = (int)(100 * vx); + float i = 0; + + if(ih->data->value == ih->data->vmin) + return; + + while(gaugeround(100*(i + boxw)) <= intvx) + { + cdCanvasBox(ih->data->cddbuffer, xstart + gaugeround(i), + xstart + gaugeround(i + boxw) - 1, ystart, yend); + i += step; + } + } + else + { + int xmid = xstart + gaugeround((xend-xstart + 1) * (ih->data->value - ih->data->vmin) / (ih->data->vmax - ih->data->vmin)); + + if(ih->data->value != ih->data->vmin) + cdCanvasBox(ih->data->cddbuffer, xstart, xmid, ystart, yend ); + + if(ih->data->show_text) + iGaugeDrawText(ih, xmid); + } +} + +static int iGaugeResize_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + { + /* update canvas size */ + cdCanvasActivate(ih->data->cdcanvas); + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + } + + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update size */ + cdCanvasActivate(ih->data->cddbuffer); + cdCanvasGetSize(ih->data->cddbuffer,&ih->data->w,&ih->data->h,NULL,NULL); + + /* update render */ + iGaugeDrawGauge(ih); + + return IUP_DEFAULT; +} + +static void iGaugeRepaint(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + return; + + /* update render */ + iGaugeDrawGauge(ih); + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); +} + +static int iGaugeRedraw_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); + return IUP_DEFAULT; +} + +static void iGaugeCropValue(Ihandle* ih) +{ + if(ih->data->value>ih->data->vmax) + ih->data->value = ih->data->vmax; + else if(ih->data->valuedata->vmin) + ih->data->value = ih->data->vmin; +} + +static int iGaugeSetFgColorAttrib(Ihandle* ih, const char* value) +{ + ih->data->fgcolor = cdIupConvertColor(value); + iGaugeRepaint(ih); + return 1; +} + +static int iGaugeSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (!value) + value = iupControlBaseGetParentBgColor(ih); + + ih->data->bgcolor = cdIupConvertColor(value); + cdIupCalcShadows(ih->data->bgcolor, &ih->data->light_shadow, &ih->data->mid_shadow, &ih->data->dark_shadow); + + iGaugeRepaint(ih); + return 1; +} + +static int iGaugeSetValueAttrib(Ihandle* ih, const char* value) +{ + if(value == NULL) + ih->data->value = 0; + else + ih->data->value = atof(value); + iGaugeCropValue(ih); + + iGaugeRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iGaugeGetValueAttrib(Ihandle* ih) +{ + char* value = iupStrGetMemory(30); + sprintf(value, "%g", ih->data->value); + return value; +} + +static int iGaugeSetMinAttrib(Ihandle* ih, const char* value) +{ + ih->data->vmin = atof(value); + iGaugeCropValue(ih); + + iGaugeRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iGaugeGetMinAttrib(Ihandle* ih) +{ + char* value = iupStrGetMemory(30); + sprintf(value, "%g", ih->data->vmin); + return value; +} + +static int iGaugeSetMaxAttrib(Ihandle* ih, const char* value) +{ + ih->data->vmax = atof(value); + iGaugeCropValue(ih); + iGaugeRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iGaugeGetMaxAttrib(Ihandle* ih) +{ + char* value = iupStrGetMemory(30); + sprintf(value, "%g", ih->data->vmax); + return value; +} + +static int iGaugeSetShowTextAttrib(Ihandle* ih, const char* value) +{ + if(iupStrEqualNoCase(value, "YES")) + ih->data->show_text = 1; + else if(iupStrEqualNoCase(value, "NO")) + ih->data->show_text = 0; + + iGaugeRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iGaugeGetShowTextAttrib(Ihandle* ih) +{ + if(ih->data->show_text) + return "YES"; + else + return "NO"; +} + +static int iGaugeSetPaddingAttrib(Ihandle* ih, const char* value) +{ + iupStrToIntInt(value, &ih->data->horiz_padding, &ih->data->vert_padding, 'x'); + iGaugeRepaint(ih); + return 0; +} + +static char* iGaugeGetPaddingAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + sprintf(str, "%dx%d", ih->data->horiz_padding, ih->data->vert_padding); + return str; +} + +static int iGaugeSetDashedAttrib(Ihandle* ih, const char* value) +{ + if(iupStrEqualNoCase(value, "YES")) + ih->data->dashed = 1; + else if(iupStrEqualNoCase(value, "NO")) + ih->data->dashed = 0; + + iGaugeRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iGaugeGetDashedAttrib(Ihandle* ih) +{ + if(ih->data->dashed) + return "YES"; + else + return "NO"; +} + +static int iGaugeSetTextAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->text) + free(ih->data->text); + + ih->data->text = iupStrDup(value); + + iGaugeRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iGaugeGetTextAttrib(Ihandle* ih) +{ + return ih->data->text; +} + +static void iGaugeUnMapMethod(Ihandle* ih) +{ + if (ih->data->cddbuffer) + cdKillCanvas(ih->data->cddbuffer); + + if (ih->data->cdcanvas) + cdKillCanvas(ih->data->cdcanvas); +} + +static int iGaugeMapMethod(Ihandle* ih) +{ + ih->data->cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!ih->data->cdcanvas) + return IUP_ERROR; + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + + return IUP_NOERROR; +} + +static int iGaugeCreateMethod(Ihandle* ih, void **params) +{ + (void)params; + + /* free the data allocated by IupCanvas */ + if (ih->data) + free(ih->data); + ih->data = iupALLOCCTRLDATA(); + + /* change the IupCanvas default values */ + iupAttribSetStr(ih, "BORDER", "NO"); + IupSetAttribute(ih, "SIZE", IGAUGE_DEFAULTSIZE); + ih->expand = IUP_EXPAND_NONE; + + /* default values */ + iupAttribSetStr(ih, "FGCOLOR", IGAUGE_DEFAULTCOLOR); + ih->data->fgcolor = cdIupConvertColor(IGAUGE_DEFAULTCOLOR); + ih->data->vmax = 1; + ih->data->bgcolor = CD_GRAY; + ih->data->light_shadow = CD_WHITE; + ih->data->mid_shadow = CD_GRAY; + ih->data->dark_shadow = CD_DARK_GRAY; + ih->data->show_text = 1; + + /* IupCanvas callbacks */ + IupSetCallback(ih, "RESIZE_CB", (Icallback)iGaugeResize_CB); + IupSetCallback(ih, "ACTION", (Icallback)iGaugeRedraw_CB); + + return IUP_NOERROR; +} + +Iclass* iupGaugeGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "gauge"; + ic->format = NULL; /* no parameters */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 0; + + /* Class functions */ + ic->Create = iGaugeCreateMethod; + ic->Map = iGaugeMapMethod; + ic->UnMap = iGaugeUnMapMethod; + + /* Do not need to set base attributes because they are inherited from IupCanvas */ + + /* IupGauge only */ + iupClassRegisterAttribute(ic, "MIN", iGaugeGetMinAttrib, iGaugeSetMinAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MAX", iGaugeGetMaxAttrib, iGaugeSetMaxAttrib, IUPAF_SAMEASSYSTEM, "1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE", iGaugeGetValueAttrib, iGaugeSetValueAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DASHED", iGaugeGetDashedAttrib, iGaugeSetDashedAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "PADDING", iGaugeGetPaddingAttrib, iGaugeSetPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "TEXT", iGaugeGetTextAttrib, iGaugeSetTextAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOW_TEXT", iGaugeGetShowTextAttrib, iGaugeSetShowTextAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, iGaugeSetFgColorAttrib, IGAUGE_DEFAULTCOLOR, NULL, IUPAF_NOT_MAPPED); + + /* Overwrite IupCanvas Attributes */ + iupClassRegisterAttribute(ic, "BGCOLOR", iupControlBaseGetBgColorAttrib, iGaugeSetBgColorAttrib, NULL, "255 255 255", IUPAF_NO_INHERIT); /* overwrite canvas implementation, set a system default to force a new default */ + + return ic; +} + +Ihandle *IupGauge(void) +{ + return IupCreate("gauge"); +} diff --git a/iup/srccontrols/iup_oldmask.c b/iup/srccontrols/iup_oldmask.c new file mode 100755 index 0000000..fec10f3 --- /dev/null +++ b/iup/srccontrols/iup_oldmask.c @@ -0,0 +1,208 @@ +/** \file + * \brief OLD mask pattern matching + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcontrols.h" +#include "iupmask.h" + +#include "iup_mask.h" +#include "iup_str.h" + + +void iupmaskRemove(Ihandle *ih) +{ + IupSetAttribute(ih,"MASK", NULL); +} + +void iupmaskMatRemove(Ihandle *ih, int lin, int col) +{ + IupMatSetAttribute(ih,"MASK", lin, col, NULL); +} + +int iupmaskSetInt(Ihandle *ih, int autofill, int min, int max) +{ + (void)autofill; + IupSetfAttribute(ih,"MASKINT", "%d:%d", min, max); + return 1; +} + +int iupmaskMatSetInt(Ihandle *ih, int autofill, int min, int max, int lin, int col) +{ + (void)autofill; + IupMatSetfAttribute(ih,"MASKINT", lin, col, "%d:%d", min, max); + return 1; +} + +int iupmaskSetFloat(Ihandle* ih, int autofill, float min, float max) +{ + (void)autofill; + IupSetfAttribute(ih,"MASKFLOAT", "%f:%f", min, max); + return 1; +} + +int iupmaskMatSetFloat(Ihandle* ih, int autofill, float min, float max, int lin, int col) +{ + (void)autofill; + IupMatSetfAttribute(ih,"MASKFLOAT", lin, col, "%f:%f", min, max); + return 0; +} + +int iupmaskSet(Ihandle* ih, const char* mask_str, int autofill, int casei) +{ + (void)autofill; + IupSetAttribute(ih,"MASKCASEI", casei?"YES":"NO"); + IupStoreAttribute(ih,"MASK", mask_str); + if (iupStrEqual(mask_str, IupGetAttribute(ih,"MASK"))) + return 1; + else + return 0; +} + +int iupmaskMatSet(Ihandle* ih, const char* mask_str, int autofill, int casei, int lin, int col) +{ + (void)autofill; + IupMatSetAttribute(ih,"MASKCASEI", lin, col, casei?"YES":"NO"); + IupMatSetAttribute(ih,"MASK", lin, col, (char*)mask_str); + if (iupStrEqual(mask_str, IupMatGetAttribute(ih,"MASK", lin, col))) + return 1; + else + return 0; +} + +int iupmaskCheck(Ihandle* ih) +{ + char *val = IupGetAttribute(ih,"VALUE"); + Imask* mask = (Imask*)IupGetAttribute(ih,"OLD_MASK_DATA"); + return iupMaskCheck(mask,val)==1; +} + +int iupmaskMatCheck(Ihandle *ih, int lin, int col) +{ + char *val = IupMatGetAttribute(ih,"",lin,col); + Imask* mask = (Imask*)IupGetAttribute(ih,"OLD_MASK_DATA"); + return iupMaskCheck(mask,val)==1; +} + +int iupmaskGet(Ihandle *ih, char **sval) +{ + char *val = IupGetAttribute(ih,"VALUE"); + Imask* mask = (Imask*)IupGetAttribute(ih,"OLD_MASK_DATA"); + + if (iupMaskCheck(mask,val)==1) + { + *sval = val; + return 1; + } + else + return 0; +} + +int iupmaskMatGet(Ihandle *ih, char **sval, int lin, int col) +{ + char *val = IupMatGetAttribute(ih,"",lin,col); + Imask* mask = (Imask*)IupGetAttribute(ih,"OLD_MASK_DATA"); + + if (iupMaskCheck(mask,val)==1) + { + *sval = val; + return 1; + } + else + return 0; +} + +int iupmaskGetDouble(Ihandle *ih, double *dval) +{ + char *val = IupGetAttribute(ih,"VALUE"); + Imask* mask = (Imask*)IupGetAttribute(ih,"OLD_MASK_DATA"); + + if(iupMaskCheck(mask,val)==1) + { + *dval = 0.0; + sscanf(val,"%lf",dval); + return 1; + } + else + return 0; +} + +int iupmaskMatGetDouble(Ihandle *ih, double *dval, int lin, int col) +{ + char *val = IupMatGetAttribute(ih,"",lin,col); + Imask* mask = (Imask*)IupGetAttribute(ih,"OLD_MASK_DATA"); + + if(iupMaskCheck(mask,val)==1) + { + *dval = 0.0; + sscanf(val,"%lf",dval); + return 1; + } + else + return 0; +} + +int iupmaskGetFloat(Ihandle *ih, float *fval) +{ + char *val = IupGetAttribute(ih,"VALUE"); + Imask* mask = (Imask*)IupGetAttribute(ih,"OLD_MASK_DATA"); + + if(iupMaskCheck(mask,val)==1) + { + *fval = 0.0F; + sscanf(val,"%f",fval); + return 1; + } + else + return 0; +} + +int iupmaskMatGetFloat(Ihandle *ih, float *fval, int lin, int col) +{ + char *val = IupMatGetAttribute(ih,"",lin,col); + Imask* mask = (Imask*)IupGetAttribute(ih,"OLD_MASK_DATA"); + + if (iupMaskCheck(mask,val)==1) + { + *fval = 0.0F; + sscanf(val,"%f",fval); + return 1; + } + else + return 0; +} + +int iupmaskGetInt(Ihandle *ih, int *ival) +{ + char *val = IupGetAttribute(ih,"VALUE"); + Imask* mask = (Imask*)IupGetAttribute(ih,"OLD_MASK_DATA"); + + if (iupMaskCheck(mask,val)==1) + { + *ival = 0; + sscanf(val,"%d",ival); + return 1; + } + else + return 0; +} + +int iupmaskMatGetInt(Ihandle *ih, int *ival, int lin, int col) +{ + char *val = IupMatGetAttribute(ih,"",lin,col); + Imask* mask = (Imask*)IupGetAttribute(ih,"OLD_MASK_DATA"); + + if(iupMaskCheck(mask,val)==1) + { + *ival = 0; + sscanf(val,"%d",ival); + return 1; + } + else + return 0; +} diff --git a/iup/srccontrols/iup_oldtabs.c b/iup/srccontrols/iup_oldtabs.c new file mode 100755 index 0000000..43b0c57 --- /dev/null +++ b/iup/srccontrols/iup_oldtabs.c @@ -0,0 +1,2616 @@ +/** \file + * \brief iuptabs control + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include +#include +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_register.h" +#include "iup_layout.h" +#include "iup_controls.h" +#include "iup_cdutil.h" + + +/* Constants */ +static const int ITABS_BORDER = 1; +static const int ITABS_MARGIN = 10; +static const int ITABS_SPACING = 2; +static const int ITABS_SCROLL_LENGTH = 51; /* the length of the scroll control in any direction */ +static const int ITABS_SCROLL_THICK = 17; +static const int ITABS_SCROLL_SPACING = 7; +static const int ITABS_BROKEN_TAB = 8; +static const int ITABS_CURRENT_EXTRA_PIXELS = 1; + +/* Enum's */ +typedef enum +{ + ITABS_TOP, ITABS_BOTTOM, ITABS_LEFT, ITABS_RIGHT +} ItabsType; + +typedef enum +{ + ITABS_FALSE, ITABS_TRUE +} ItabsBool; + +typedef enum +{ + ITABS_BROKEN_NONE, + ITABS_BROKEN_START, + ITABS_BROKEN_END, + ITABS_BROKEN_CENTER +} ItabsBrokenType; + +typedef enum +{ + ITABS_HORIZONTAL, ITABS_VERTICAL +} ItabsOrientation; + +typedef enum +{ + ITABS_BUTTON_NONE, + ITABS_BUTTONPRESS_FORWARD, ITABS_BUTTONPRESS_MENU, ITABS_BUTTONPRESS_BACKWARD, /* can not change order because of "+= 3" */ + ITABS_BUTTONRELEASE_FORWARD, ITABS_BUTTONRELEASE_MENU, ITABS_BUTTONRELEASE_BACKWARD +} ItabsButtonState; + +typedef enum +{ + ITABS_RENDER_PLANE_ALIGN, ITABS_RENDER_PLANE_NORMAL +} ItabsTextRender; + +/* Info about how to draw each tab */ +typedef struct _tagTabsDrawInfo +{ + Ihandle* ihandle; /* child handle */ + int text_w, /* width of the text of this Tab */ + tab_len; /* len */ +} ItabsDrawInfo; + +typedef struct _tagTabsLine +{ + /* Visible tabs (start and end interval) */ + int start_tab, end_tab; + + /* Shows if any button is pressed */ + ItabsButtonState button; + + /* Info about how to draw each tab */ + ItabsDrawInfo* tabs_info; + + /* Shows if all the tabs are visible */ + ItabsBool scroll_visible, + broken_start_visible, + broken_end_visible; + + /* Shows if the current tab is visible, when + there are other tabs to the left or right */ + ItabsBool broken_center_visible; + + /* Available space to the broken tabs */ + int broken_tab_space, + broken_space_start, + broken_space_end; + + /* Tabs line size */ + int line_thick, + line_length; + + /* Point to thick and length according to render */ + int* line_w; + int* line_h; + + /* Tabs scroll size */ + int scroll_len, /* the scroll space in the tabs line length direction */ + scroll_thick, + scroll_x, + scroll_y, + scroll_w, + scroll_h; + + int text_h; /* height of the text (all texts have the same height) */ +} ItabsLine; + +/* Control context */ +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + + /* tabs type */ + ItabsType tabs_type; + ItabsOrientation tabs_orientation; + ItabsTextRender tabs_render; /* tabs line render (depends on + tabs type and orientation) */ + + cdCanvas* cdcanvas; /* CD canvas for drawing */ + cdCanvas* cddbuffer; /* image canvas for double buffering */ + Ihandle* zbox; /* Handle "zbox" is a child of Tabs */ + + int number_of_tabs; /* number of tabs */ + int current_tab; /* current tab */ + ItabsLine tabs_line; /* data from a queue of tabs */ + + /* data from width and weight */ + int w, h; + int* max_line_length; /* pointer to w or h */ + + /* Used colors */ + long bgcolor; + long fgcolor; + long light_shadow; + long mid_shadow; + long dark_shadow; + + int has_focus, + focus_x1, + focus_x2, + focus_y1, + focus_y2; + + char* font_active; + char* font_inactive; +}; + +static void iTabsUpdateRender(Ihandle* ih) +{ + if (ih->data->tabs_orientation == ITABS_VERTICAL) + { + if (ih->data->tabs_type == ITABS_LEFT || ih->data->tabs_type == ITABS_RIGHT) + ih->data->tabs_render = ITABS_RENDER_PLANE_ALIGN; + else + ih->data->tabs_render = ITABS_RENDER_PLANE_NORMAL; + } + else + { + if (ih->data->tabs_type == ITABS_LEFT || ih->data->tabs_type == ITABS_RIGHT) + ih->data->tabs_render = ITABS_RENDER_PLANE_NORMAL; + else + ih->data->tabs_render = ITABS_RENDER_PLANE_ALIGN; + } + + if (ih->data->tabs_type == ITABS_LEFT || ih->data->tabs_type == ITABS_RIGHT) + { + ih->data->tabs_line.line_w = &ih->data->tabs_line.line_thick; + ih->data->tabs_line.line_h = &ih->data->tabs_line.line_length; + ih->data->max_line_length = &ih->data->h; + } + else + { + ih->data->tabs_line.line_w = &ih->data->tabs_line.line_length; + ih->data->tabs_line.line_h = &ih->data->tabs_line.line_thick; + ih->data->max_line_length = &ih->data->w; + } + + if (ih->data->tabs_render == ITABS_RENDER_PLANE_NORMAL) + { + ih->data->tabs_line.scroll_len = ITABS_SCROLL_THICK; + ih->data->tabs_line.scroll_thick = ITABS_SCROLL_LENGTH; + } + else + { + ih->data->tabs_line.scroll_len = ITABS_SCROLL_LENGTH; + ih->data->tabs_line.scroll_thick = ITABS_SCROLL_THICK; + } + + if (ih->data->tabs_orientation == ITABS_HORIZONTAL) + { + ih->data->tabs_line.scroll_w = ITABS_SCROLL_LENGTH; + ih->data->tabs_line.scroll_h = ITABS_SCROLL_THICK; + } + else + { + ih->data->tabs_line.scroll_w = ITABS_SCROLL_THICK; + ih->data->tabs_line.scroll_h = ITABS_SCROLL_LENGTH; + } +} + +static void iTabsSetCDFont(Ihandle* ih, char* tab_font, int bold) +{ + if (tab_font) + cdCanvasNativeFont(ih->data->cddbuffer, tab_font); + else + cdCanvasNativeFont(ih->data->cddbuffer, IupGetAttribute(ih, "FONT")); + + if (bold) + cdCanvasFont(ih->data->cddbuffer, NULL, CD_BOLD, 0); +} + +/* Gets the associated name of the tab */ +static Ihandle* iTabsGetTabIhandle(Ihandle* ih, int number) +{ + return ih->data->tabs_line.tabs_info[number].ihandle; +} + +/* ========================================================================= */ +/* Drawing functions */ +/* ========================================================================= */ + +/* Fills the draw area */ +static void iTabsFillArea(cdCanvas* canvas, int x1, int y1, int x2, int y2, + int x3, int y3, int x4, int y4) +{ + cdCanvasBegin(canvas, CD_FILL); + cdCanvasVertex(canvas, x1, y1); + cdCanvasVertex(canvas, x2, y2); + cdCanvasVertex(canvas, x3, y3); + cdCanvasVertex(canvas, x4, y4); + cdCanvasEnd(canvas); + + cdCanvasBegin(canvas, CD_CLOSED_LINES); + cdCanvasVertex(canvas, x1, y1); + cdCanvasVertex(canvas, x2, y2); + cdCanvasVertex(canvas, x3, y3); + cdCanvasVertex(canvas, x4, y4); + cdCanvasEnd(canvas); +} + +/* Draws the broken borders */ +static void iTabsDrawBrokenBorder(Ihandle* ih, ItabsType type, int x1, int y1, int x2, int y2) +{ + cdCanvas* canvas = ih->data->cddbuffer; + double step_x = (x2 - x1) / 5; + double step_y = (y2 - y1) / 5; + int old_color = cdCanvasForeground(canvas, CD_QUERY); + + switch(type) + { + case ITABS_TOP: + cdCanvasForeground(canvas, ih->data->mid_shadow); + cdCanvasLine(canvas, (int)(x1 + step_x * 3.), y1, (int)(x1 + 4. * step_x), y2); + cdCanvasLine(canvas, (int)(x1 + step_x), y1, (int)(x1 + 2. * step_x), y2); + + cdCanvasForeground(canvas, ih->data->dark_shadow); + cdCanvasLine(canvas, x1, y1, (int)(x1 + step_x), y2); + cdCanvasLine(canvas, (int)(x1 + step_x), y1 - 1, (int)(x1 + 2. * step_x), y2 - 1); + cdCanvasLine(canvas, (int)(x1 + step_x * 2.), y1, (int)(x1 + 3. * step_x), y2); + cdCanvasLine(canvas, (int)(x1 + step_x * 3.), y1 + 1, (int)(x1 + 4. * step_x), y2 + 1); + cdCanvasLine(canvas, (int)(x1 + step_x * 4.), y1, x2, y2); + break; + + case ITABS_BOTTOM: + cdCanvasForeground(canvas, ih->data->mid_shadow); + cdCanvasLine(canvas, (int)(x1 + step_x * 3.), y1, (int)(x1 + 4. * step_x), y2); + cdCanvasLine(canvas, (int)(x1 + step_x), y1, (int)(x1 + 2. * step_x), y2); + + cdCanvasForeground(canvas, ih->data->dark_shadow); + cdCanvasLine(canvas, x1, y1, (int)(x1 + step_x), y2); + cdCanvasLine(canvas, (int)(x1 + step_x), y1 - 1, (int)(x1 + 2. * step_x), y2 - 1); + cdCanvasLine(canvas, (int)(x1 + step_x * 2.), y1, (int)(x1 + 3. * step_x), y2); + cdCanvasLine(canvas, (int)(x1 + step_x * 3.), y1 + 1, (int)(x1 + 4. * step_x), y2 + 1); + cdCanvasLine (canvas, (int)(x1 + step_x * 4.), y1, x2, y2); + break; + + case ITABS_LEFT: + cdCanvasForeground(canvas, ih->data->mid_shadow); + cdCanvasLine(canvas, x1, (int)(y1 + 3. * step_y), x2, (int)(y1 + step_y * 4.)); + cdCanvasLine(canvas, x1, (int)(y1 + step_y), x2, (int)(y1 + step_y * 2.)); + + cdCanvasForeground(canvas, ih->data->dark_shadow); + cdCanvasLine(canvas, x1, y1, x2, (int)(y1 + step_y)); + cdCanvasLine(canvas, x1 - 1, (int)(y1 + step_y), x2 - 1, (int)(y1 + step_y * 2.)); + cdCanvasLine(canvas, x1, (int)(y1 + step_y * 2.), x2, (int)(y1 + step_y * 3.)); + cdCanvasLine(canvas, x1 + 1, (int)(y1 + 3. * step_y), x2 + 1, (int)(y1 + step_y * 4.)); + cdCanvasLine(canvas, x1, (int)(y1 + 4. * step_y), x2, y2); + break; + + case ITABS_RIGHT: + cdCanvasForeground(canvas, ih->data->mid_shadow); + cdCanvasLine(canvas, x1, (int)(y1 + 3. * step_y), x2, (int)(y1 + step_y * 4.)); + cdCanvasLine(canvas, x1, (int)(y1 + step_y), x2, (int)(y1 + step_y * 2.)); + + cdCanvasForeground(canvas, ih->data->dark_shadow); + cdCanvasLine(canvas, x1, y1, x2, (int)(y1 + step_y)); + cdCanvasLine(canvas, x1 - 1, (int)(y1 + step_y), x2 - 1, (int)(y1 + step_y * 2.)); + cdCanvasLine(canvas, x1, (int)(y1 + step_y * 2.), x2, (int)(y1 + step_y * 3.)); + cdCanvasLine(canvas, x1 + 1, (int)(y1 + 3. * step_y), x2 + 1, (int)(y1 + step_y * 4.)); + cdCanvasLine(canvas, x1, (int)(y1 + 4. * step_y), x2, y2); + break; + } + + cdCanvasForeground (canvas, old_color); +} + +/* Draws the borders */ +static void iTabsDrawBorder(Ihandle* ih, ItabsType type, int x1, int y1, int x2, int y2) +{ + cdCanvas* canvas = ih->data->cddbuffer; + + switch(type) + { + case ITABS_TOP: + cdCanvasForeground(canvas, ih->data->light_shadow); + cdCanvasLine(canvas, x1, y1, x2, y2); + break; + + case ITABS_LEFT: + cdCanvasForeground(canvas, ih->data->light_shadow); + cdCanvasLine(canvas, x1, y1, x2, y2); + break; + + case ITABS_BOTTOM: + cdCanvasForeground(canvas, ih->data->dark_shadow); + cdCanvasLine(canvas, x1, y1, x2, y2); + cdCanvasForeground(canvas, ih->data->mid_shadow); + if (x1 > x2) + cdCanvasLine(canvas, x2+1, y1+1, x1-1, y2+1); + else + cdCanvasLine(canvas, x1+1, y1+1, x2-1, y2+1); + break; + + case ITABS_RIGHT: + cdCanvasForeground(canvas, ih->data->dark_shadow); + cdCanvasLine(canvas, x1, y1, x2, y2); + cdCanvasForeground(canvas, ih->data->mid_shadow); + if (y1 > y2) + cdCanvasLine(canvas, x1-1, y2+1, x2-1, y1-1); + else + cdCanvasLine(canvas, x1-1, y1+1, x2-1, y2-1); + break; + } +} + +/* Draws a tab corner */ +static void iTabsDrawCorner(Ihandle* ih, int color, int x1, int y1, int x2, int y2) +{ + cdCanvas* canvas = ih->data->cddbuffer; + + cdCanvasForeground(canvas, ih->data->bgcolor); + cdCanvasLine(canvas, x1, y1, x2, y1); + cdCanvasLine(canvas, x1, y1, x1, y2); + cdCanvasForeground(canvas,color); + cdCanvasLine(canvas, x1, y2, x2, y1); +} + +/* Draws a tab */ +static void iTabsDrawTab(Ihandle* ih, int tab_index, int offset) +{ + cdCanvas* canvas = ih->data->cddbuffer; + int x1, y1, x2, y2, x3, y3, x4, y4, x1a, y1a, x4a, y4a; + int tab_w, tab_h; + int x_text = 0, y_text = 0; + int line_thick, tab_len, full_tab_len; + ItabsType types[3]; + ItabsBool beforeCurrent, afterCurrent; + int extraHeight = (tab_index == ih->data->current_tab) ? 0 : 1; + ItabsBrokenType type; + + /* there is an error in visible tabs that happen when you change the tab configuration dynamically */ + if (tab_index < 0 || tab_index > ih->data->number_of_tabs-1) + return; + + /* Defines what type of tab that will be drawn and sets the length */ + full_tab_len = ih->data->tabs_line.tabs_info[tab_index].tab_len; + + if (tab_index == (ih->data->tabs_line.end_tab + 1)) + { + type = ITABS_BROKEN_END; + tab_len = ih->data->tabs_line.broken_space_end; + } + else if (tab_index == (ih->data->tabs_line.start_tab - 1)) + { + type = ITABS_BROKEN_START; + tab_len = ih->data->tabs_line.broken_space_start; + } + else if (ih->data->tabs_line.broken_center_visible == ITABS_TRUE) + { + type = ITABS_BROKEN_CENTER; + tab_len = ih->data->tabs_line.broken_tab_space; + } + else + { + type = ITABS_BROKEN_NONE; + tab_len = full_tab_len; + } + + if (tab_len > full_tab_len) + tab_len = full_tab_len; + + /* If the selected tab is not the first, and this tab is visible, + * subtracts one pixel from him and advances the tab on one pixel, + * to prevent the side of tab is confused with the border control. */ + if (ih->data->current_tab != 0 && + ((ih->data->tabs_line.start_tab == 0 && tab_index == 0) || + (ih->data->tabs_line.start_tab > 0 && tab_index == (ih->data->tabs_line.start_tab - 1)))) + { + offset += 1; + tab_len--; + full_tab_len--; + } + + line_thick = ih->data->tabs_line.line_thick; + + if (tab_index != ih->data->current_tab) + line_thick -= ITABS_CURRENT_EXTRA_PIXELS; + + if (ih->data->tabs_type == ITABS_LEFT || ih->data->tabs_type == ITABS_RIGHT) + { + tab_w = line_thick; + tab_h = tab_len; + } + else + { + tab_w = tab_len; + tab_h = line_thick; + } + + /* Calculates the border of tabs, text position and the sides will be drawn */ + switch(ih->data->tabs_type) + { + case ITABS_TOP: + x1 = x1a = offset; + y1 = ih->data->h - *(ih->data->tabs_line.line_h) - 1; + y1a = y1 + extraHeight; + x2 = x1; + y2 = y1 + tab_h - 1; + x3 = x2 + tab_w - 1; + y3 = y2; + x4 = x3; + y4 = y1; + x4a = x3; + y4a = y1; + + /* defines the order to draw */ + types[0] = ITABS_LEFT; + types[1] = ITABS_TOP; + types[2] = ITABS_RIGHT; + + break; + + case ITABS_BOTTOM: + x1 = x1a = offset; + y1 = *(ih->data->tabs_line.line_h) - 1; + y1a = y1 - extraHeight; + x2 = x1; + y2 = y1 - tab_h + 1; + x3 = x2 + tab_w - 1; + y3 = y2; + x4 = x3; + y4 = y1; + x4a = x3; + y4a = y1; + + types[0] = ITABS_LEFT; + types[1] = ITABS_BOTTOM; + types[2] = ITABS_RIGHT; + + break; + + case ITABS_LEFT: + x1 = *(ih->data->tabs_line.line_w) - 1; + x1a = x1 - extraHeight; + y1 = y1a = ih->data->h - offset - 1; + x2 = x1 - tab_w + 1; + y2 = y1; + x3 = x2; + y3 = y1 - tab_h + 1; + x4 = x1; + y4 = y3; + x4a = x1a; + y4a = y3; + + types[0] = ITABS_TOP; + types[1] = ITABS_LEFT; + types[2] = ITABS_BOTTOM; + + break; + + case ITABS_RIGHT: + x1 = ih->data->w - ih->data->tabs_line.line_thick - 1; + x1a = x1 + extraHeight; + y1 = y1a = ih->data->h - offset - 1; + x2 = x1 + tab_w - 1; + y2 = y1; + x3 = x2; + y3 = y1 - tab_h + 1; + x4 = x1; + y4 = y3; + x4a = x1a; + y4a = y3; + + types[0] = ITABS_TOP; + types[1] = ITABS_RIGHT; + types[2] = ITABS_BOTTOM; + + break; + + default: + return; + } + + if (tab_index == (ih->data->current_tab - 1)) + { + beforeCurrent = ITABS_TRUE; + afterCurrent = ITABS_FALSE; + } + else if (tab_index == (ih->data->current_tab + 1)) + { + beforeCurrent = ITABS_FALSE; + afterCurrent = ITABS_TRUE; + } + else + { + beforeCurrent = ITABS_FALSE; + afterCurrent = ITABS_FALSE; + } + + /* Draws the square of tab*/ + cdCanvasForeground(canvas, ih->data->bgcolor); + + /* Fills the square of tab */ + iTabsFillArea(canvas, x1, y1, x2, y2, x3, y3, x4, y4); + + /* Draws the border on the top */ + iTabsDrawBorder(ih, types[1], x2, y2, x3, y3); + + switch(type) + { + case ITABS_BROKEN_END: + switch(ih->data->tabs_type) + { + case ITABS_TOP: + cdCanvasClipArea(canvas, x1, x3 - ITABS_BORDER - 1, y1, y3); + break; + case ITABS_BOTTOM: + cdCanvasClipArea(canvas, x2, x4 - ITABS_BORDER - 1, y2, y4); + break; + case ITABS_LEFT: + cdCanvasClipArea(canvas, x3, x1, y3 + ITABS_BORDER + 1, y1); + break; + case ITABS_RIGHT: + cdCanvasClipArea(canvas, x4, x2, y4 + ITABS_BORDER + 1, y2); + break; + } + + if (beforeCurrent == ITABS_TRUE) + iTabsDrawBrokenBorder(ih, types[0], x1a, y1a, x2, y2); + else if (afterCurrent == ITABS_TRUE) + iTabsDrawBrokenBorder(ih, types[2], x3, y3, x4a, y4a); + else + { + iTabsDrawBorder(ih, types[0], x1a, y1a, x2, y2); + iTabsDrawBrokenBorder(ih, types[2], x3, y3, x4a, y4a); + } + + if (types[1] == ITABS_TOP) + iTabsDrawCorner(ih, ih->data->light_shadow, x1 + ITABS_BORDER - 1, y3 + ITABS_BORDER - 1, + x1 + ITABS_BORDER + 1, y3 + ITABS_BORDER - 3); + + if (types[1] == ITABS_BOTTOM) + iTabsDrawCorner(ih, ih->data->dark_shadow, x2 + ITABS_BORDER - 1, y2 + ITABS_BORDER - 1, + x2 + ITABS_BORDER + 1, y2 + ITABS_BORDER + 1); + break; + + case ITABS_BROKEN_START: + switch(ih->data->tabs_type) + { + case ITABS_TOP: + cdCanvasClipArea(canvas, x1 + ITABS_BORDER + 1, x3, y1, y3); + break; + case ITABS_BOTTOM: + cdCanvasClipArea(canvas, x2 + ITABS_BORDER + 1, x4, y2, y4); + break; + case ITABS_LEFT: + cdCanvasClipArea(canvas, x3, x1, y3, y1 - ITABS_BORDER - 1); + break; + case ITABS_RIGHT: + cdCanvasClipArea(canvas, x4, x2, y4, y2 - ITABS_BORDER - 1); + break; + } + + if (beforeCurrent == ITABS_TRUE) + iTabsDrawBrokenBorder(ih, types[0], x1a, y1a, x2, y2); + else if (afterCurrent == ITABS_TRUE) + iTabsDrawBrokenBorder(ih, types[2], x3, y3, x4a, y4a); + else + { + iTabsDrawBrokenBorder(ih, types[0], x1a, y1a, x2, y2); + iTabsDrawBorder(ih, types[2], x3, y3, x4a, y4a); + } + + if (types[1] == ITABS_TOP) + iTabsDrawCorner(ih, ih->data->dark_shadow, x3 + ITABS_BORDER - 1, y3 + ITABS_BORDER - 1, + x3 + ITABS_BORDER - 3, y3 + ITABS_BORDER - 3); + + if (types[1] == ITABS_BOTTOM) + iTabsDrawCorner(ih, ih->data->dark_shadow, x4 + ITABS_BORDER - 1, y2 + ITABS_BORDER - 1, + x4 + ITABS_BORDER - 3, y2 + ITABS_BORDER + 1); + break; + + case ITABS_BROKEN_CENTER: + switch(ih->data->tabs_type) + { + case ITABS_TOP: + cdCanvasClipArea (canvas, x1 + ITABS_BORDER + 1, x3 - ITABS_BORDER - 1, + y1 + ITABS_BORDER + 1, y3 - ITABS_BORDER - 1); + break; + case ITABS_BOTTOM: + cdCanvasClipArea (canvas, x2 + ITABS_BORDER + 1, x4 - ITABS_BORDER - 1, + y2 + ITABS_BORDER + 1, y4 - ITABS_BORDER - 1); + break; + case ITABS_LEFT: + cdCanvasClipArea (canvas, x3 + ITABS_BORDER + 1, x1 - ITABS_BORDER - 1, + y3 + ITABS_BORDER + 1, y1 - ITABS_BORDER - 1); + break; + case ITABS_RIGHT: + cdCanvasClipArea (canvas, x4 + ITABS_BORDER + 1, x2 - ITABS_BORDER - 1, + y4 + ITABS_BORDER + 1, y2 - ITABS_BORDER - 1); + break; + } + + iTabsDrawBrokenBorder(ih, types[0], x1, y1, x2, y2); + iTabsDrawBrokenBorder(ih, types[2], x3, y3, x4, y4); + break; + + case ITABS_BROKEN_NONE: + switch(ih->data->tabs_type) + { + case ITABS_TOP: + cdCanvasClipArea (canvas, x1 + ITABS_BORDER + 1, x3 - ITABS_BORDER - 1, + y1 + ITABS_BORDER + 1, y3 - ITABS_BORDER - 1); + break; + case ITABS_BOTTOM: + cdCanvasClipArea (canvas, x2 + ITABS_BORDER + 1, x4 - ITABS_BORDER - 1, + y2 + ITABS_BORDER + 1, y4 - ITABS_BORDER - 1); + break; + case ITABS_LEFT: + cdCanvasClipArea (canvas, x3 + ITABS_BORDER + 1, x1 - ITABS_BORDER - 1, + y3 + ITABS_BORDER + 1, y1 - ITABS_BORDER - 1); + break; + case ITABS_RIGHT: + cdCanvasClipArea (canvas, x4 + ITABS_BORDER + 1, x2 - ITABS_BORDER - 1, + y4 + ITABS_BORDER + 1, y2 - ITABS_BORDER - 1); + break; + } + + if (beforeCurrent == ITABS_TRUE) + iTabsDrawBorder(ih, types[0], x1a, y1a, x2, y2); + else if (afterCurrent == ITABS_TRUE) + iTabsDrawBorder(ih, types[2], x3, y3, x4a, y4a); + else + { + iTabsDrawBorder(ih, types[0], x1a, y1a, x2, y2); + iTabsDrawBorder(ih, types[2], x3, y3, x4a, y4a); + } + + if (types[1] == ITABS_TOP) + { + iTabsDrawCorner(ih, ih->data->light_shadow, x1 + ITABS_BORDER - 1, y3 + ITABS_BORDER - 1, + x1 + ITABS_BORDER + 1, y3 + ITABS_BORDER - 3); + + iTabsDrawCorner(ih, ih->data->dark_shadow, x3 + ITABS_BORDER - 1, y3 + ITABS_BORDER - 1, + x3 + ITABS_BORDER - 3, y3 + ITABS_BORDER - 3); + } + + if (types[1] == ITABS_BOTTOM) + { + iTabsDrawCorner(ih, ih->data->dark_shadow, x2 + ITABS_BORDER - 1, y2 + ITABS_BORDER - 1, + x2 + ITABS_BORDER + 1, y2 + ITABS_BORDER + 1); + + iTabsDrawCorner(ih, ih->data->dark_shadow, x4 + ITABS_BORDER - 1, y2 + ITABS_BORDER - 1, + x4 + ITABS_BORDER - 3, y2 + ITABS_BORDER + 1); + } + + if (types[1] == ITABS_LEFT) + { + iTabsDrawCorner(ih, ih->data->light_shadow, x3 + ITABS_BORDER - 1, y1 + ITABS_BORDER - 1, + x3 + ITABS_BORDER + 1, y1 + ITABS_BORDER - 3); + + iTabsDrawCorner(ih, ih->data->dark_shadow, x3 + ITABS_BORDER - 1, y3 + ITABS_BORDER - 1, + x3 + ITABS_BORDER + 1, y3 + ITABS_BORDER + 1); + } + + if (types[1] == ITABS_RIGHT) + { + iTabsDrawCorner(ih, ih->data->dark_shadow, x2 + ITABS_BORDER - 1, y2 + ITABS_BORDER - 1, + x2 + ITABS_BORDER - 3, y2 + ITABS_BORDER - 3); + + iTabsDrawCorner(ih, ih->data->dark_shadow, x2 + ITABS_BORDER - 1, y4 + ITABS_BORDER - 1, + x2 + ITABS_BORDER - 3, y4 + ITABS_BORDER + 1); + } + + break; + } + + if (ih->data->tabs_type == ITABS_LEFT || ih->data->tabs_type == ITABS_RIGHT) + tab_h = full_tab_len; + else + tab_w = full_tab_len; + + switch(ih->data->tabs_type) + { + case ITABS_TOP: + x_text = x1 + tab_w / 2; + y_text = y1 + tab_h / 2; + break; + case ITABS_BOTTOM: + x_text = x2 + tab_w / 2; + y_text = y2 + tab_h / 2; + break; + case ITABS_LEFT: + x_text = x1 - tab_w / 2; + y_text = y1 - tab_h / 2; + break; + case ITABS_RIGHT: + x_text = x2 - tab_w / 2; + y_text = y2 - tab_h / 2; + break; + } + cdCanvasTextAlignment (canvas, CD_CENTER); + + /* Draws the text */ + cdCanvasForeground (canvas, ih->data->fgcolor); + + if (ih->data->tabs_orientation == ITABS_VERTICAL) + cdCanvasTextOrientation(canvas, 90); + else + cdCanvasTextOrientation(canvas, 0); + + { + char* tab_font = NULL; + int bold = 0; + + if (iupdrvIsActive(ih) && IupGetInt(ih->data->tabs_line.tabs_info[tab_index].ihandle, "ACTIVE")) + { + if (tab_index == ih->data->current_tab) + { + tab_font = ih->data->font_active; + bold = 1; + } + } + else + { + cdCanvasForeground(canvas, CD_DARK_GRAY); + tab_font = ih->data->font_inactive; + } + + iTabsSetCDFont(ih, tab_font, bold); + } + + cdCanvasClip(canvas, CD_CLIPAREA); + + { + char* text = iupAttribGet(ih->data->tabs_line.tabs_info[tab_index].ihandle, "TABTITLE"); + if (!text) text = " "; + + if (ih->data->has_focus && (tab_index == ih->data->current_tab)) + { + int x1, y1, x2, y2; + cdCanvasGetTextBox(canvas, x_text, y_text, text, &x1, &x2, &y1, &y2); + if (ih->data->tabs_orientation == ITABS_VERTICAL) + {y1-=2; y2+=2;} + else + {x1-=2; x2+=2;} + ih->data->focus_x1 = x1; + ih->data->focus_x2 = x2; + ih->data->focus_y1 = y1; + ih->data->focus_y2 = y2; + } + + cdCanvasText(canvas, x_text, y_text, text); + } + + cdCanvasClip (canvas, CD_CLIPOFF); +} + +/* Draws the lower border of the tab labels */ +static void iTabsDrawLabelLowerBorder(Ihandle* ih, int start, int end) +{ + switch(ih->data->tabs_type) + { + case ITABS_TOP: + iTabsDrawBorder(ih, ITABS_TOP, start, ih->data->h - *(ih->data->tabs_line.line_h) - 1 - 1, + end, ih->data->h - *(ih->data->tabs_line.line_h) - 1 - 1); + break; + + case ITABS_LEFT: + if (!start) + iTabsDrawBorder(ih, ITABS_LEFT, *(ih->data->tabs_line.line_w) - 1 + 1, ih->data->h - 1 - start, + *(ih->data->tabs_line.line_w) - 1 + 1, ih->data->h - 1 - end); + else + iTabsDrawBorder(ih, ITABS_LEFT, *(ih->data->tabs_line.line_w) - 1 + 1, ih->data->h - 1 - start, + *(ih->data->tabs_line.line_w) - 1 + 1, 0); + break; + + case ITABS_BOTTOM: + iTabsDrawBorder(ih, ITABS_BOTTOM, start, *(ih->data->tabs_line.line_h) - 1 + 1, + end, *(ih->data->tabs_line.line_h) - 1 + 1); + break; + + case ITABS_RIGHT: + if (!start) + iTabsDrawBorder(ih, ITABS_RIGHT, ih->data->w - *(ih->data->tabs_line.line_w) - 1 - 1, ih->data->h - 1 - start, + ih->data->w - *(ih->data->tabs_line.line_w) - 1 - 1, ih->data->h - 1 - end); + else + iTabsDrawBorder(ih, ITABS_RIGHT, ih->data->w - *(ih->data->tabs_line.line_w) - 1 - 1, ih->data->h - 1 - start, + ih->data->w - *(ih->data->tabs_line.line_w) - 1 - 1, 0); + break; + } +} + +/* Draws a normal button */ +static void iTabsDrawButton(Ihandle* ih, int x, int y, int width, int height) +{ + cdCanvas* canvas = ih->data->cddbuffer; + int old_color = cdCanvasForeground(canvas, ih->data->bgcolor); + + cdCanvasBegin(canvas, CD_FILL); + cdCanvasVertex(canvas, x, y); + cdCanvasVertex(canvas, x + width - 1, y); + cdCanvasVertex(canvas, x + width - 1, y + height - 1); + cdCanvasVertex(canvas, x, y + height - 1); + cdCanvasEnd(canvas); + + cdCanvasForeground (canvas, old_color); + + iTabsDrawBorder(ih, ITABS_TOP, x + width - 1, y + height - 1, x, y + height - 1); + iTabsDrawBorder(ih, ITABS_LEFT, x, y + height - 1, x, y); + iTabsDrawBorder(ih, ITABS_BOTTOM, x, y, x + width - 1, y); + iTabsDrawBorder(ih, ITABS_RIGHT, x + width - 1, y, x + width - 1, y + height - 1); +} + +/* Draws arrows +* +* x, y ..........: lower border of the bounding box +* width, height .: dimensions of the bounding box +* type ..........: ITABS_LEFT, ITABS_RIGHT, ITABS_TOP, ITABS_BOTTOM +*/ +static void iTabsDrawArrow(Ihandle* ih, int x, int y, int width, int height, int type) +{ + cdCanvas* canvas = ih->data->cddbuffer; + long old_color; + + if (iupdrvIsActive(ih)) + old_color = cdCanvasForeground(canvas, CD_BLACK); + else + old_color = cdCanvasForeground(canvas, CD_DARK_GRAY); + + cdCanvasBegin(canvas, CD_CLOSED_LINES); + switch(type) + { + case ITABS_LEFT: + cdCanvasVertex(canvas, x + 4, y + height / 2); + cdCanvasVertex(canvas, x + width - 1 - 4, y + height - 1 - 4); + cdCanvasVertex(canvas, x + width - 1 - 4, y + 4); + break; + + case ITABS_RIGHT: + cdCanvasVertex(canvas, x + width - 1 - 4, y + height / 2); + cdCanvasVertex(canvas, x + 4, y + height - 1 - 4); + cdCanvasVertex(canvas, x + 4, y + 4); + break; + + case ITABS_TOP: + cdCanvasVertex(canvas, x + 4, y + 4); + cdCanvasVertex(canvas, x + width / 2, y + height - 1 - 4); + cdCanvasVertex(canvas, x + width - 1 - 4, y + 4); + break; + + case ITABS_BOTTOM: + cdCanvasVertex(canvas, x + 4, y + height - 1 - 4); + cdCanvasVertex(canvas, x + width / 2, y + 4); + cdCanvasVertex(canvas, x + width - 1 - 4, y + height - 1 - 4); + break; + } + cdCanvasEnd(canvas); + + cdCanvasBegin(canvas, CD_FILL); + switch(type) + { + case ITABS_LEFT: + cdCanvasVertex(canvas, x + 4, y + height / 2); + cdCanvasVertex(canvas, x + width - 1 - 4, y + height - 1 - 4); + cdCanvasVertex(canvas, x + width - 1 - 4, y + 4); + break; + + case ITABS_RIGHT: + cdCanvasVertex(canvas, x + width - 1 - 4, y + height / 2); + cdCanvasVertex(canvas, x + 4, y + height - 1 - 4); + cdCanvasVertex(canvas, x + 4, y + 4); + break; + + case ITABS_TOP: + cdCanvasVertex(canvas, x + 4, y + 4); + cdCanvasVertex(canvas, x + width / 2, y + height - 1 - 4); + cdCanvasVertex(canvas, x + width - 1 - 4, y + 4); + break; + + case ITABS_BOTTOM: + cdCanvasVertex(canvas, x + 4, y + height - 1 - 4); + cdCanvasVertex(canvas, x + width / 2, y + 4); + cdCanvasVertex(canvas, x + width - 1 - 4, y + height - 1 - 4); + break; + } + cdCanvasEnd(canvas); + + cdCanvasForeground(canvas, old_color); +} + +/* Draws dots "..." */ +static void iTabsDrawDots(Ihandle* ih, int x, int y, int width, int height) +{ + x -= 1; + y += height / 3 - 1; + cdCanvasRect(ih->data->cddbuffer, x + 3, x + 4, y + 3, y + 4); + cdCanvasRect(ih->data->cddbuffer, x + width / 2, x+ width / 2 + 1 , y + 3, y + 4); + cdCanvasRect(ih->data->cddbuffer, x + width - 1 - 3, x + width - 1 - 2, y + 3, y + 4); +} + +/* Draws the scroll_visible with the dots button "..." */ +static void iTabsDrawScroll(Ihandle* ih) +{ + int x = ih->data->tabs_line.scroll_x, + y = ih->data->tabs_line.scroll_y, + w = ih->data->tabs_line.scroll_w, + h = ih->data->tabs_line.scroll_h; + int scroll_updown; + + if (ih->data->tabs_type == ITABS_TOP || + ih->data->tabs_type == ITABS_BOTTOM) + scroll_updown = 0; + else + scroll_updown = 1; + + if (ih->data->tabs_orientation == ITABS_HORIZONTAL) + { + int x3 = w / 3; + + iTabsDrawButton(ih, x, y, x3, h); + iTabsDrawArrow (ih, x, y, x3, h, scroll_updown ? ITABS_TOP : ITABS_LEFT); + + iTabsDrawButton(ih, x + x3, y, x3, h); + iTabsDrawDots (ih, x + x3, y, x3, h); + + iTabsDrawButton(ih, x + 2 * x3, y, x3, h ); + iTabsDrawArrow (ih, x + 2 * x3, y, x3, h, scroll_updown ? ITABS_BOTTOM : ITABS_RIGHT); + } + else + { + int y3 = h / 3; + + iTabsDrawButton(ih, x, y, w, y3); + iTabsDrawArrow (ih, x, y, w, y3, scroll_updown ? ITABS_BOTTOM : ITABS_RIGHT); + + iTabsDrawButton(ih, x, y + y3, w, y3); + iTabsDrawDots (ih, x, y + y3, w, y3); + + iTabsDrawButton(ih, x, y + 2 * y3, w, y3); + iTabsDrawArrow (ih, x, y + 2 * y3, w, y3, scroll_updown ? ITABS_TOP : ITABS_LEFT); + } + + iTabsDrawCorner(ih, ih->data->dark_shadow, x + w - 1, y + h - 1, x + w - 3, y + h - 3); + iTabsDrawCorner(ih, ih->data->dark_shadow, x + w - 1, y, x + w - 3, y + 2); + iTabsDrawCorner(ih, ih->data->light_shadow, x, y + h - 1, x + 2, y + h - 3); + iTabsDrawCorner(ih, ih->data->dark_shadow, x, y, x + 2, y + 2); +} + +/* Clear tab background */ +static void iTabsDrawBackground(Ihandle* ih) +{ + int x1, y1, x2, y2, x3, y3, x4, y4; + cdCanvas* canvas = ih->data->cddbuffer; + + cdCanvasBackground(canvas, cdIupConvertColor(iupControlBaseGetParentBgColor(ih))); + cdCanvasClear(canvas); + + switch(ih->data->tabs_type) + { + case ITABS_TOP: + x1 = 0; + y1 = ih->data->h - *(ih->data->tabs_line.line_h) - 1 - 1; + x2 = x1; + y2 = 0; + x3 = ih->data->w - 1; + y3 = y2; + x4 = x3; + y4 = y1; + break; + + case ITABS_BOTTOM: + x1 = 0; + y1 = *(ih->data->tabs_line.line_h) - 1 + 1; + x2 = x1; + y2 = ih->data->h - 1; + x3 = ih->data->w - 1; + y3 = y2; + x4 = x3; + y4 = y1; + break; + + case ITABS_LEFT: + x1 = *(ih->data->tabs_line.line_w) - 1 + 1; + y1 = ih->data->h - 1; + x2 = ih->data->w - 1; + y2 = y1; + x3 = x2; + y3 = 0; + x4 = x1; + y4 = y3; + break; + + case ITABS_RIGHT: + x1 = ih->data->w - *(ih->data->tabs_line.line_w) - 1 - 1; + y1 = ih->data->h - 1; + x2 = 0; + y2 = y1; + x3 = x2; + y3 = 0; + x4 = x1; + y4 = y3; + break; + + default: + return; + } + + /* Foreground color */ + cdCanvasForeground(canvas, ih->data->bgcolor); + + cdCanvasBegin(canvas, CD_FILL); + cdCanvasVertex(canvas, x1, y1); + cdCanvasVertex(canvas, x2, y2); + cdCanvasVertex(canvas, x3, y3); + cdCanvasVertex(canvas, x4, y4); + cdCanvasEnd(canvas); + + cdCanvasBegin(canvas, CD_CLOSED_LINES); + cdCanvasVertex(canvas, x1, y1); + cdCanvasVertex(canvas, x2, y2); + cdCanvasVertex(canvas, x3, y3); + cdCanvasVertex(canvas, x4, y4); + cdCanvasEnd(canvas); +} + +/* Draws tab borders */ +static void iTabsDrawTabsBorders(Ihandle* ih) +{ + int x1, y1, x2, y2, x3, y3, x4, y4; + ItabsType types[3]; + + switch(ih->data->tabs_type) + { + case ITABS_TOP: + x1 = 0; + y1 = ih->data->h - *(ih->data->tabs_line.line_h) - 1 - 1; + x2 = x1; + y2 = 0; + x3 = ih->data->w - 1; + y3 = y2; + x4 = x3; + y4 = y1; + + /* defines the order to draw */ + types[0] = ITABS_LEFT; + types[1] = ITABS_BOTTOM; + types[2] = ITABS_RIGHT; + break; + + case ITABS_BOTTOM: + x1 = 0; + y1 = *(ih->data->tabs_line.line_h) - 1 + 1; + x2 = x1; + y2 = ih->data->h - 1; + x3 = ih->data->w - 1; + y3 = y2; + x4 = x3; + y4 = y1; + + /* defines the order to draw */ + types[0] = ITABS_LEFT; + types[1] = ITABS_TOP; + types[2] = ITABS_RIGHT; + break; + + case ITABS_LEFT: + x1 = *(ih->data->tabs_line.line_w) - 1 + 1; + y1 = ih->data->h - 1; + x2 = ih->data->w - 1; + y2 = y1; + x3 = x2; + y3 = 0; + x4 = x1; + y4 = y3; + + /* defines the order to draw */ + types[0] = ITABS_TOP; + types[1] = ITABS_RIGHT; + types[2] = ITABS_BOTTOM; + break; + + case ITABS_RIGHT: + x1 = ih->data->w - *(ih->data->tabs_line.line_w) - 1 - 1; + y1 = ih->data->h - 1; + x2 = 0; + y2 = y1; + x3 = x2; + y3 = 0; + x4 = x1; + y4 = y3; + + /* defines the order to draw */ + types[0] = ITABS_TOP; + types[1] = ITABS_LEFT; + types[2] = ITABS_BOTTOM; + break; + + default: + return; + } + + iTabsDrawBorder(ih, types[0], x1, y1, x2, y2); + iTabsDrawBorder(ih, types[1], x2, y2, x3, y3); + iTabsDrawBorder(ih, types[2], x3, y3, x4, y4); +} + +/* Draws all the tabs and the scroll_visible, if it exists */ +static void iTabsDrawLineOfTabs(Ihandle* ih) +{ + int offset = 0; + int c = 0; + + /* draws decorations, when necessary */ + if (ih->data->tabs_line.broken_start_visible == ITABS_TRUE) + { + iTabsDrawTab(ih, ih->data->tabs_line.start_tab - 1, offset); + offset += ih->data->tabs_line.broken_space_start; + } + + if (ih->data->tabs_line.broken_center_visible == ITABS_FALSE) + { + for(c = ih->data->tabs_line.start_tab; c <= ih->data->tabs_line.end_tab; c++) + { + if (c != ih->data->current_tab) + { + iTabsDrawTab(ih, c, offset); + offset += ih->data->tabs_line.tabs_info[c].tab_len; + } + else + { + if (ih->data->current_tab != 0) + iTabsDrawLabelLowerBorder(ih, 0, offset); + + iTabsDrawTab(ih, c, offset); + offset += ih->data->tabs_line.tabs_info[c].tab_len; + iTabsDrawLabelLowerBorder(ih, offset - 1, ih->data->w); + } + } + } + else + { + if (ih->data->current_tab != 0) + iTabsDrawLabelLowerBorder(ih, 0, offset); + + iTabsDrawTab(ih, ih->data->current_tab, offset); + offset += ih->data->tabs_line.broken_tab_space; + iTabsDrawLabelLowerBorder(ih, offset, ih->data->w); + } + + if (ih->data->tabs_line.broken_end_visible) + { + iTabsDrawTab(ih, ih->data->tabs_line.end_tab + 1, offset); + offset += ih->data->tabs_line.broken_space_end; + } + + if (ih->data->tabs_line.scroll_visible == ITABS_TRUE) + iTabsDrawScroll(ih); +} + +/* Calls the user callback to change of tab */ +static int iTabsCallTabChangeCb(Ihandle* ih, Ihandle* new_tab, Ihandle* old_tab) +{ + IFnnn cb = NULL; + + if (!IupGetInt(new_tab, "ACTIVE")) + return IUP_IGNORE; + + cb = (IFnnn)IupGetCallback(ih, "TABCHANGE_CB"); + if (!cb) + return IUP_DEFAULT; + + return cb(ih, new_tab, old_tab); +} + +/* ========================================================================= */ +/* Functions to calculate the tab sizes and the tab visibilities */ +/* ========================================================================= */ + +/* Calculates the box size that involves the text of the tabs */ +static void iTabsCalcTextSize(Ihandle* ih) +{ + char* title; + int t, text_w, size, tabsize; + int text_width, text_height; + + iupdrvFontGetCharSize(ih, NULL, &text_height); + ih->data->tabs_line.text_h = text_height; + + /* Get the global size of tab */ + size = iupAttribGetInt(ih, "TABSIZE"); + + for(t = 0; t < ih->data->number_of_tabs; t++) + { + Ihandle* tab_child = ih->data->tabs_line.tabs_info[t].ihandle; + + title = iupAttribGet(tab_child, "TABTITLE"); + if (!title) title = " "; + + /* Get the size of an specific tab */ + tabsize = iupAttribGetInt(tab_child, "TABSIZE"); + text_width = iupdrvFontGetStringWidth(ih, title); + + /* Uses the specific size if the value is larger than the minimum size */ + if (tabsize > text_width) + text_w = tabsize; + else + { + /* Else, uses the tab size if the value is larger than the minimum size */ + if (size > text_width) + text_w = size; + else /* otherwise, uses the minimum size */ + text_w = text_width; + } + + ih->data->tabs_line.tabs_info[t].text_w = text_w; + } +} + +static void iTabsCalcTabSize(Ihandle* ih) +{ + int t, tab_len, tab_thick; + + iTabsCalcTextSize(ih); + + ih->data->tabs_line.line_thick = 0; + ih->data->tabs_line.line_length = 0; + + for(t = 0; t < ih->data->number_of_tabs; t++) + { + /* initialize with the text size */ + if (ih->data->tabs_render == ITABS_RENDER_PLANE_ALIGN) + { + tab_len = ih->data->tabs_line.tabs_info[t].text_w; + tab_thick = ih->data->tabs_line.text_h; + } + else + { + tab_len = ih->data->tabs_line.text_h; + tab_thick = ih->data->tabs_line.tabs_info[t].text_w; + } + + /* add the borders */ + if (abs(ih->data->current_tab - t) == 1) /* if neighbor of the current tab */ + tab_len += ITABS_BORDER; + else if (t == ih->data->current_tab) /* if tab is the current tab */ + { + if (ih->data->current_tab == 0 || ih->data->current_tab == (ih->data->number_of_tabs - 1)) + tab_len += 2 * ITABS_BORDER; + else + tab_len += 3 * ITABS_BORDER; + } + else + tab_len += 2 * ITABS_BORDER; + + /* add margins */ + if (ih->data->tabs_render == ITABS_RENDER_PLANE_ALIGN) + tab_len += 2 * ITABS_MARGIN; + else + tab_len += 2 * ITABS_SPACING; + + ih->data->tabs_line.tabs_info[t].tab_len = tab_len; + + ih->data->tabs_line.line_length += tab_len; /* is always the sum on the lengths */ + + if (tab_thick > ih->data->tabs_line.line_thick) /* is always the maximum thickness */ + ih->data->tabs_line.line_thick = tab_thick; + } + + if (ih->data->tabs_render == ITABS_RENDER_PLANE_ALIGN) + ih->data->tabs_line.line_thick += 2 * ITABS_SPACING + 2 * ITABS_BORDER; + else + ih->data->tabs_line.line_thick += 2 * ITABS_MARGIN + 2 * ITABS_BORDER; + + if (ih->data->tabs_line.line_thick < ih->data->tabs_line.scroll_thick) + ih->data->tabs_line.line_thick = ih->data->tabs_line.scroll_thick; + + /* extra pixels of the selected tab */ + ih->data->tabs_line.line_thick += ITABS_CURRENT_EXTRA_PIXELS; +} + +static void iTabsCalcScrollPos(Ihandle* ih) +{ + int x1=0, y1=0, x2=0, y2=0; + + switch(ih->data->tabs_type) + { + case ITABS_TOP: + ih->data->tabs_line.scroll_x = ih->data->w - ih->data->tabs_line.scroll_w - 2; + ih->data->tabs_line.scroll_y = ih->data->h - *(ih->data->tabs_line.line_h); + y1=0; y2=*(ih->data->tabs_line.line_h); + x1=0; x2=ih->data->w-1; + break; + case ITABS_BOTTOM: + ih->data->tabs_line.scroll_x = ih->data->w - ih->data->tabs_line.scroll_w - 2; + ih->data->tabs_line.scroll_y = *(ih->data->tabs_line.line_h) - 2 - ih->data->tabs_line.scroll_h + 1; + y1=ih->data->h - *(ih->data->tabs_line.line_h); y2=ih->data->h-1; + x1=0; x2=ih->data->w-1; + break; + case ITABS_LEFT: + ih->data->tabs_line.scroll_x = *(ih->data->tabs_line.line_w) - 2 - ih->data->tabs_line.scroll_w + 1; + ih->data->tabs_line.scroll_y = 0; + x1=0; x2=*(ih->data->tabs_line.line_w); + y1=0; y2=ih->data->h-1; + break; + case ITABS_RIGHT: + ih->data->tabs_line.scroll_x = ih->data->w - *(ih->data->tabs_line.line_w); + ih->data->tabs_line.scroll_y = 0; + x1=ih->data->w-*(ih->data->tabs_line.line_w); x2=ih->data->w-1; + y1=0; y2=ih->data->h-1; + break; + } + + iupAttribSetStrf(ih, "TIPRECT", "%d %d %d %d", x1, y1, x2, y2); +} + +/* Calculates the visibility of tabs */ +static void iTabsCalcVisibleTabs(Ihandle* ih) +{ + int line_length = *ih->data->max_line_length; + int old_line_length; + int t, t_aux = 0; + + /* Verifies if all the tabs are visible */ + if (*ih->data->max_line_length > ih->data->tabs_line.line_length) + { + /* All the tabs are visible */ + ih->data->tabs_line.scroll_visible = ITABS_FALSE; + ih->data->tabs_line.broken_start_visible = ITABS_FALSE; + ih->data->tabs_line.broken_end_visible = ITABS_FALSE; + ih->data->tabs_line.broken_center_visible = ITABS_FALSE; + + ih->data->tabs_line.start_tab = 0; + ih->data->tabs_line.end_tab = ih->data->number_of_tabs - 1; + + return; + } + + /* Subtracts space of scroll */ + line_length -= ih->data->tabs_line.scroll_len + ITABS_SCROLL_SPACING; + + ih->data->tabs_line.scroll_visible = ITABS_TRUE; + + /* Verifies if current tab is smaller than start tab, adjusting if necessary */ + if (ih->data->current_tab < ih->data->tabs_line.start_tab) + ih->data->tabs_line.start_tab = ih->data->current_tab; + + /* Processes tabs in sequence, until the total length overcome the virtual length */ + t = ih->data->tabs_line.start_tab; + old_line_length = line_length; + + while(1) + { + do + { + while (ih->data->tabs_line.start_tab < ih->data->current_tab) + { + if (ih->data->tabs_line.tabs_info[ih->data->tabs_line.start_tab].tab_len <= line_length) + break; + ih->data->tabs_line.start_tab++; + } + + for(t = ih->data->tabs_line.start_tab, t_aux = 0; + t < ih->data->number_of_tabs; t++, t_aux++) + { + if (ih->data->tabs_line.tabs_info[t].tab_len > line_length) + { + if ((t - 1) < ih->data->current_tab) + { + while (t_aux > 0) + { + line_length += + ih->data->tabs_line.tabs_info[t - t_aux].tab_len; + + if (ih->data->tabs_line.start_tab == 0) + { + line_length -= ITABS_BROKEN_TAB; + ih->data->tabs_line.broken_start_visible = ITABS_TRUE; + } + + ih->data->tabs_line.start_tab++; + + if (ih->data->tabs_line.tabs_info[t].tab_len <= line_length) + break; + + t_aux--; + } + + if (ih->data->tabs_line.tabs_info[t].tab_len > line_length) + { + /* no success */ + ih->data->tabs_line.broken_center_visible = ITABS_TRUE; + break; /* break two loops */ + } + } + else + { + t--; + break; /* break two loops */ + } + } + + line_length -= ih->data->tabs_line.tabs_info[t].tab_len; + ih->data->tabs_line.broken_center_visible = ITABS_FALSE; + } + + if (t == ih->data->number_of_tabs) + t--; + } + while (t < ih->data->current_tab); + + if (ih->data->tabs_line.start_tab > 0 && + ih->data->tabs_line.broken_center_visible != ITABS_TRUE) + { + if (ih->data->tabs_line.tabs_info[ih->data->tabs_line.start_tab - 1].tab_len < + (line_length - ITABS_BROKEN_TAB)) + { + ih->data->tabs_line.start_tab--; + line_length = old_line_length; + continue; + } + } + + break; + } + + if (ih->data->tabs_line.start_tab > 0) + { + t = ih->data->tabs_line.start_tab; + line_length = old_line_length; + line_length -= ITABS_BROKEN_TAB; + ih->data->tabs_line.broken_start_visible = ITABS_TRUE; + + while(1) + { + do + { + while (ih->data->tabs_line.start_tab < ih->data->current_tab) + { + if (ih->data->tabs_line.tabs_info[ih->data->tabs_line.start_tab].tab_len <= line_length) + break; + ih->data->tabs_line.start_tab++; + } + + for(t = ih->data->tabs_line.start_tab, t_aux = 0; + t < ih->data->number_of_tabs; t++, t_aux++) + { + if (ih->data->tabs_line.tabs_info[t].tab_len > line_length) + { + if ((t - 1) < ih->data->current_tab) + { + while (t_aux > 0) + { + line_length += + ih->data->tabs_line.tabs_info[t - t_aux].tab_len; + + if (ih->data->tabs_line.start_tab == 0) + { + line_length -= ITABS_BROKEN_TAB; + ih->data->tabs_line.broken_start_visible = ITABS_TRUE; + } + + ih->data->tabs_line.start_tab++; + + if (ih->data->tabs_line.tabs_info[t].tab_len <= line_length) + break; + + t_aux--; + } + + if (ih->data->tabs_line.tabs_info[t].tab_len > line_length) + { + /* no success */ + ih->data->tabs_line.broken_center_visible = ITABS_TRUE; + break; /* break two loops */ + } + } + else + { + t--; + break; /* break two loops */ + } + } + + line_length -= ih->data->tabs_line.tabs_info[t].tab_len; + ih->data->tabs_line.broken_center_visible = ITABS_FALSE; + } + + if (t == ih->data->number_of_tabs) + t--; + } + while (t < ih->data->current_tab); + + if (ih->data->tabs_line.start_tab > 0 && + ih->data->tabs_line.broken_center_visible != ITABS_TRUE) + { + if (ih->data->tabs_line.tabs_info[ih->data->tabs_line.start_tab - 1].tab_len < + (line_length - ITABS_BROKEN_TAB)) + { + ih->data->tabs_line.start_tab--; + line_length = old_line_length; + continue; + } + } + + break; + } + } + else + ih->data->tabs_line.broken_start_visible = ITABS_FALSE; + + /* space not occupied by tabs is destined for the broken tabs */ + ih->data->tabs_line.broken_tab_space = line_length; + + if (ih->data->tabs_line.broken_start_visible == ITABS_TRUE) + ih->data->tabs_line.broken_tab_space += ITABS_BROKEN_TAB; + + if (ih->data->tabs_line.broken_center_visible == ITABS_TRUE && + ih->data->tabs_line.start_tab == t) + { + /* If there is one visible tab and more tabs to the right, + it must be clipped */ + ih->data->tabs_line.end_tab = ih->data->tabs_line.start_tab; + ih->data->tabs_line.broken_end_visible = ITABS_FALSE; + ih->data->tabs_line.broken_start_visible = ITABS_FALSE; + } + else + { + ih->data->tabs_line.end_tab = t; + ih->data->tabs_line.broken_center_visible = ITABS_FALSE; + + /* If the last tab is not visible, it must be included the + right broken tab, and delete one of tabs, when necessary */ + if (ih->data->tabs_line.end_tab < (ih->data->number_of_tabs - 1)) + { + ih->data->tabs_line.broken_end_visible = ITABS_TRUE; + + if (line_length < ITABS_BROKEN_TAB) + { + if (ih->data->tabs_line.start_tab == ih->data->tabs_line.end_tab) + { + /* no space to broken tabs */ + ih->data->tabs_line.broken_center_visible = ITABS_TRUE; + ih->data->tabs_line.broken_end_visible = ITABS_FALSE; + ih->data->tabs_line.broken_start_visible = ITABS_FALSE; + + ih->data->tabs_line.broken_tab_space += + ih->data->tabs_line.tabs_info[ih->data->tabs_line.start_tab].tab_len; + } + else if (ih->data->current_tab == ih->data->tabs_line.end_tab) + { + ih->data->tabs_line.broken_tab_space += + ih->data->tabs_line.tabs_info[ih->data->tabs_line.start_tab].tab_len; + ih->data->tabs_line.start_tab++; + ih->data->tabs_line.broken_start_visible = ITABS_TRUE; + } + else + { + ih->data->tabs_line.broken_tab_space += + ih->data->tabs_line.tabs_info[ih->data->tabs_line.end_tab].tab_len; + ih->data->tabs_line.end_tab--; + } + } + } + else + ih->data->tabs_line.broken_end_visible = ITABS_FALSE; + } + + if (ih->data->tabs_line.broken_start_visible == ITABS_TRUE && + ih->data->tabs_line.broken_end_visible == ITABS_TRUE) + { + ih->data->tabs_line.broken_space_start = (int) + ceil((double) ih->data->tabs_line.broken_tab_space / 2); + ih->data->tabs_line.broken_space_end = (int) + floor((double) ih->data->tabs_line.broken_tab_space / 2); + } + else if (ih->data->tabs_line.broken_start_visible == ITABS_TRUE) + { + ih->data->tabs_line.broken_space_start = ih->data->tabs_line.broken_tab_space; + ih->data->tabs_line.broken_space_end = 0; + } + else if (ih->data->tabs_line.broken_end_visible == ITABS_TRUE) + { + ih->data->tabs_line.broken_space_end = ih->data->tabs_line.broken_tab_space; + ih->data->tabs_line.broken_space_start = 0; + } + else + { + ih->data->tabs_line.broken_space_end = 0; + ih->data->tabs_line.broken_space_start = 0; + } + + if (ih->data->tabs_line.start_tab == 0) + ih->data->tabs_line.broken_start_visible = ITABS_FALSE; +} + +static void iTabsGetDecorOffset(Ihandle* ih, int *x, int *y) +{ + switch(ih->data->tabs_type) + { + case ITABS_TOP: + *x = ITABS_MARGIN; + *y = *(ih->data->tabs_line.line_h) + ITABS_MARGIN; + break; + + case ITABS_LEFT: + *x = *(ih->data->tabs_line.line_w) + ITABS_MARGIN; + *y = ITABS_MARGIN; + break; + + case ITABS_RIGHT: + case ITABS_BOTTOM: + default: + *x = ITABS_MARGIN; + *y = ITABS_MARGIN; + break; + } +} + +static void iTabsGetDecorSize(Ihandle* ih, int *w, int *h) +{ + switch(ih->data->tabs_type) + { + case ITABS_TOP: + *w = 2 * ITABS_MARGIN; + *h = *(ih->data->tabs_line.line_h) + 2 * ITABS_MARGIN; + break; + + case ITABS_BOTTOM: + *w = 2 * ITABS_MARGIN; + *h = *(ih->data->tabs_line.line_h) + 2 * ITABS_MARGIN; + break; + + case ITABS_LEFT: + *w = *(ih->data->tabs_line.line_w) + 2 * ITABS_MARGIN; + *h = 2 * ITABS_MARGIN; + break; + + case ITABS_RIGHT: + *w = *(ih->data->tabs_line.line_w) + 2 * ITABS_MARGIN; + *h = 2 * ITABS_MARGIN; + break; + } +} + +/* Changes the zbox value and redraws the tabs */ +static void iTabsSetNewCurrentTab(Ihandle* ih, int tab) +{ + char* next_tab_name = IupGetName(iTabsGetTabIhandle(ih, tab)); + if (next_tab_name == NULL) + return; + + ih->data->current_tab = tab; + IupSetAttribute(ih->data->zbox, "VALUE", next_tab_name); + + iTabsCalcVisibleTabs(ih); /* calculates the visibility of tabs (depends on the sizes calculated and on the current tab) */ + + IupUpdate(ih); +} + + +/* ========================================================================= */ +/* IupCanvas Callbacks */ +/* ========================================================================= */ + + +static int iTabsFocus_CB(Ihandle* ih, int focus) +{ + ih->data->has_focus = focus; + IupUpdate(ih); + return IUP_DEFAULT; +} + +static int iTabsResize_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + { + /* update canvas size */ + cdCanvasActivate(ih->data->cdcanvas); + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + } + + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update canvas size */ + cdCanvasActivate(ih->data->cddbuffer); + cdCanvasGetSize(ih->data->cddbuffer, &ih->data->w, &ih->data->h, NULL, NULL); + + iTabsCalcTabSize(ih); /* calculates sizes of Tab line (depends on the TABTITLE of all children and on FONT) */ + iTabsCalcScrollPos(ih); /* calculates the position of the scroll (depends on the sizes calculated) */ + iTabsCalcVisibleTabs(ih); /* calculates the visibility of tabs (depends on the sizes calculated and on the current tab) */ + + return IUP_DEFAULT; +} + +static int iTabsRedraw_CB(Ihandle* ih) +{ + char* clip_rect; + + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* Paints the background and draws the border */ + iTabsDrawBackground(ih); + iTabsDrawTabsBorders(ih); + + /* Draws tabs and decorations */ + iTabsDrawLineOfTabs(ih); + + clip_rect = iupAttribGet(ih, "CLIPRECT"); + if (clip_rect) + { + int x1, x2, y1, y2; + sscanf(clip_rect, "%d %d %d %d", &x1, &y1, &x2, &y2); + y1 = cdIupInvertYAxis(y1, ih->data->h); + y2 = cdIupInvertYAxis(y2, ih->data->h); + cdCanvasClipArea(ih->data->cdcanvas, x1, x2, y1, y2); + cdCanvasClip(ih->data->cdcanvas, CD_CLIPAREA); + } + + /* Ends the draw process */ + cdCanvasFlush(ih->data->cddbuffer); + if (ih->data->has_focus) + cdIupDrawFocusRect(ih, ih->data->cdcanvas, ih->data->focus_x1, ih->data->focus_y1, ih->data->focus_x2, ih->data->focus_y2); + + if (clip_rect) + cdCanvasClip(ih->data->cdcanvas, CD_CLIPOFF); + + return IUP_DEFAULT; +} + +/* Callback to popup menu, with the tabs list */ +static int iTabsMenu_CB(Ihandle* ih) +{ + char* number = iupAttribGet(ih, "_IUPTABS_ID"); + int tab_number = 0; + int result; + + sscanf (number, "%d", &tab_number); + + if (ih->data->current_tab != tab_number) + { + result = iTabsCallTabChangeCb(ih, iTabsGetTabIhandle(ih, tab_number), + iTabsGetTabIhandle(ih, ih->data->current_tab)); + if (result != IUP_IGNORE) + iTabsSetNewCurrentTab(ih, tab_number); + } + + return IUP_DEFAULT; +} + +/* Creates a menu with all the tab labels */ +static Ihandle* iTabsMakeMenuFromTabs(Ihandle* ih) +{ + int c = 0; + Ihandle* menu = IupMenu(NULL); + Ihandle* item = NULL; + + for(c = 0; c < ih->data->number_of_tabs; c++) + { + char* title = iupAttribGet(ih->data->tabs_line.tabs_info[c].ihandle, "TABTITLE"); + if (!title) title = " "; + + item = IupItem(title, NULL); + IupSetCallback(item, "ACTION", (Icallback) iTabsMenu_CB); + + iupAttribSetStrf(item, "_IUPTABS_ID", "%4d", c); + + if (c == ih->data->current_tab) + IupSetAttribute(item, "VALUE", "ON"); + + IupAppend(menu, item); + } + + return menu; +} + +static int iTabsGetNextTab(Ihandle* ih) +{ + int next_tab; + + if (ih->data->current_tab < (ih->data->number_of_tabs - 1)) + next_tab = ih->data->current_tab + 1; + else + next_tab = 0; + + /* find the next active tab */ + while(next_tab != ih->data->current_tab && + !IupGetInt(iTabsGetTabIhandle(ih, next_tab), "ACTIVE")) + { + if (next_tab < (ih->data->number_of_tabs - 1)) + next_tab = next_tab + 1; + else + next_tab = 0; + } + + if (next_tab == ih->data->current_tab) + return -1; + + return next_tab; +} + +static int iTabsGetPreviousTab(Ihandle* ih) +{ + int previous_tab; + if (ih->data->current_tab > 0) + previous_tab = ih->data->current_tab - 1; + else + previous_tab = ih->data->number_of_tabs - 1; + + /* find the previous active tab */ + while(previous_tab != ih->data->current_tab && + !IupGetInt(iTabsGetTabIhandle(ih, previous_tab), "ACTIVE")) + { + if (previous_tab > 0) + previous_tab = previous_tab - 1; + else + previous_tab = ih->data->number_of_tabs - 1; + } + + if (previous_tab == ih->data->current_tab) + return -1; + + return previous_tab; +} + +/* Key press Callback */ +static int iTabsKeyPress_CB(Ihandle* ih, int c, int press) +{ + if (press == 0) + return IUP_DEFAULT; + + if (((c == K_RIGHT || c == K_sRIGHT) && (ih->data->tabs_type == ITABS_TOP || ih->data->tabs_type == ITABS_BOTTOM)) || + ((c == K_DOWN || c == K_sDOWN) && (ih->data->tabs_type == ITABS_LEFT || ih->data->tabs_type == ITABS_RIGHT))) + { + int result; + int next_tab = iTabsGetNextTab(ih); + if (next_tab == -1) + return IUP_IGNORE; /* to avoid arrow keys being processed by the system */ + + result = iTabsCallTabChangeCb(ih, iTabsGetTabIhandle(ih, next_tab), + iTabsGetTabIhandle(ih, ih->data->current_tab)); + if (result != IUP_IGNORE) + iTabsSetNewCurrentTab(ih, next_tab); + + return IUP_IGNORE; /* to avoid arrow keys being processed by the system */ + } + else if (((c == K_LEFT || c == K_sLEFT) && (ih->data->tabs_type == ITABS_TOP || ih->data->tabs_type == ITABS_BOTTOM)) || + ((c == K_UP || c == K_sUP) && (ih->data->tabs_type == ITABS_LEFT || ih->data->tabs_type == ITABS_RIGHT))) + { + int result; + int previous_tab = iTabsGetPreviousTab(ih); + if (previous_tab == -1) + return IUP_IGNORE; /* to avoid arrow keys being processed by the system */ + + result = iTabsCallTabChangeCb(ih, iTabsGetTabIhandle(ih, previous_tab), + iTabsGetTabIhandle(ih, ih->data->current_tab)); + if (result != IUP_IGNORE) + iTabsSetNewCurrentTab(ih, previous_tab); + + return IUP_IGNORE; /* to avoid arrow keys being processed by the system */ + } + + return IUP_DEFAULT; +} + +/* Button press Callback of IUP Canvas */ +static int iTabsButton_CB (Ihandle* ih, int b, int press, int mx, int my) +{ + static int last_tab_press = -1; + int* virtual_width = NULL; + int* virtual_height = NULL; + int width = 0, height = 0, offset = 0; + int* virtual_mx = NULL; + int* virtual_my = NULL; + int click_x = mx, click_y = ih->data->h-1 - my; + int count = 0; + + /* Only events of the left button are handled */ + if (b != IUP_BUTTON1) + return IUP_DEFAULT; + + /* Calculates the bounding box size of the tabs queue */ + switch(ih->data->tabs_type) + { + case ITABS_TOP: + width = ih->data->w; + height = ih->data->tabs_line.line_thick; + virtual_width = &width; + virtual_height = &height; + virtual_mx = &mx; + virtual_my = &my; + *virtual_my = -(*virtual_my - (ih->data->tabs_line.line_thick - 1)); + break; + + case ITABS_BOTTOM: + width = ih->data->w; + height = ih->data->tabs_line.line_thick; + virtual_width = &width; + virtual_height = &height; + virtual_mx = &mx; + virtual_my = &my; + *virtual_my = *virtual_my - ih->data->h + ih->data->tabs_line.line_thick; + break; + + case ITABS_LEFT: + width = ih->data->tabs_line.line_thick; + height = ih->data->h; + virtual_width = &height; + virtual_height = &width; + virtual_mx = &my; + virtual_my = &mx; + *virtual_my = -(*virtual_my - (ih->data->tabs_line.line_thick - 1)); + break; + + case ITABS_RIGHT: + width = ih->data->tabs_line.line_thick; + height = ih->data->h; + virtual_width = &height; + virtual_height = &width; + virtual_mx = &my; + virtual_my = &mx; + *virtual_my = *virtual_my - ih->data->w + ih->data->tabs_line.line_thick; + break; + } + + /* Adjusts the offset when the first tab is not selected */ + if (ih->data->current_tab != 0) + offset = 1; + + /* Checks if the mouse is on the tabs area */ + if ((*virtual_mx > (*virtual_width - 1)) || + (*virtual_my > (*virtual_height - 1)) || + (*virtual_mx < 0) || (*virtual_my < 0)) + { + /* If a button release or any scroll_visible button are pressed, they'll are released */ + if (!press && ih->data->tabs_line.button != ITABS_BUTTON_NONE) + ih->data->tabs_line.button = ITABS_BUTTON_NONE; + + return IUP_DEFAULT; + } + + if (!press && ih->data->tabs_line.button != ITABS_BUTTON_NONE) + ih->data->tabs_line.button += 3; /* increment from BUTPRESS_* to BUTRELEASE_* */ + + /* If there is a scroll_visible, verifies if the click was on one of buttons */ + if (ih->data->tabs_line.scroll_visible == ITABS_TRUE) + { + int scroll_pos, scroll_space; + + if (ih->data->tabs_orientation == ITABS_HORIZONTAL) + { + scroll_space = ih->data->tabs_line.scroll_w; + scroll_pos = click_x - ih->data->tabs_line.scroll_x; + } + else + { + scroll_space = ih->data->tabs_line.scroll_h; + scroll_pos = click_y - ih->data->tabs_line.scroll_y; + + /* the controls are inverted when text is vertical */ + scroll_pos = scroll_space - scroll_pos; + } + + if (click_y > ih->data->tabs_line.scroll_y && click_x > ih->data->tabs_line.scroll_x && + click_y < ih->data->tabs_line.scroll_y+ih->data->tabs_line.scroll_h && click_x < ih->data->tabs_line.scroll_x+ih->data->tabs_line.scroll_w) + { + /* Verifies which button was pressed by user */ + if (scroll_pos > 2 * scroll_space / 3) /* forward button*/ + { + /* If press, to draw it pressed */ + if (press) + { + ih->data->tabs_line.button = ITABS_BUTTONPRESS_FORWARD ; + } + else if (ih->data->tabs_line.button == ITABS_BUTTONRELEASE_FORWARD) + /* else, change the tab */ + { + int result; + int next_tab = iTabsGetNextTab(ih); + if (next_tab == -1) + return IUP_DEFAULT; + + result = iTabsCallTabChangeCb(ih, iTabsGetTabIhandle(ih, next_tab), iTabsGetTabIhandle(ih, ih->data->current_tab)); + if (result != IUP_IGNORE) + iTabsSetNewCurrentTab(ih, next_tab); + } + } + else if (scroll_pos > scroll_space / 3) /* menu button*/ + { + /* If press, to draw it pressed */ + if (press) + { + ih->data->tabs_line.button = ITABS_BUTTONPRESS_MENU ; + } + else if (ih->data->tabs_line.button == ITABS_BUTTONRELEASE_MENU) + /* else, change the tab */ + { + Ihandle* menu = iTabsMakeMenuFromTabs (ih); + IupPopup(menu, IUP_MOUSEPOS, IUP_MOUSEPOS); + IupDestroy(menu); + } + } + else /* backward button*/ + { + /* If press, to draw it pressed */ + if (press) + { + ih->data->tabs_line.button = ITABS_BUTTONPRESS_BACKWARD ; + } + else if (ih->data->tabs_line.button == ITABS_BUTTONRELEASE_BACKWARD) + /* else, change the tab */ + { + int result; + int previous_tab = iTabsGetPreviousTab(ih); + if (previous_tab == -1) + return IUP_DEFAULT; + + result = iTabsCallTabChangeCb(ih, iTabsGetTabIhandle(ih, previous_tab), + iTabsGetTabIhandle(ih, ih->data->current_tab)); + if (result != IUP_IGNORE) + iTabsSetNewCurrentTab(ih, previous_tab); + } + } + + return IUP_DEFAULT; + } + } + + /* If there is any scroll_visible button pressed, it will be released */ + if (!press && ih->data->tabs_line.button != ITABS_BUTTON_NONE) + { + ih->data->tabs_line.button = ITABS_BUTTON_NONE; + IupUpdate(ih); + return IUP_DEFAULT; + } + + /* Checks when the click was on the left broken tab */ + if (ih->data->tabs_line.broken_start_visible == ITABS_TRUE) + { + if (*virtual_mx >= offset && + *virtual_mx <= (offset + ih->data->tabs_line.broken_space_start - 1) && + *virtual_my <= (ih->data->tabs_line.line_thick - ITABS_CURRENT_EXTRA_PIXELS - 1)) + { + if (press) + last_tab_press = ih->data->tabs_line.start_tab-1; + else if (last_tab_press == ih->data->tabs_line.start_tab-1) + { + int result = iTabsCallTabChangeCb(ih, iTabsGetTabIhandle(ih, last_tab_press), + iTabsGetTabIhandle(ih, ih->data->current_tab)); + if (result != IUP_IGNORE) + iTabsSetNewCurrentTab(ih, last_tab_press); + } + + return IUP_DEFAULT; + } + else + offset += ih->data->tabs_line.broken_space_start; + } + + /* Checks when the click was on one of tabs */ + for(count = ih->data->tabs_line.start_tab; count <= ih->data->tabs_line.end_tab; count++) + { + if (*virtual_mx >= offset && + *virtual_mx <= (offset + ih->data->tabs_line.tabs_info[count].tab_len - 1)) + { + if (count != ih->data->current_tab) + { + if (*virtual_my <= (ih->data->tabs_line.line_thick - ITABS_CURRENT_EXTRA_PIXELS - 1)) + { + if (press) + last_tab_press = count; + else if (last_tab_press == count) + { + int result = iTabsCallTabChangeCb(ih, iTabsGetTabIhandle(ih, last_tab_press), + iTabsGetTabIhandle(ih, ih->data->current_tab)); + if (result != IUP_IGNORE) + iTabsSetNewCurrentTab(ih, last_tab_press); + } + + return IUP_DEFAULT; + } + } + } + + offset += ih->data->tabs_line.tabs_info[count].tab_len; + } + + /* Checks when the click was on the right broken tab */ + if (ih->data->tabs_line.broken_end_visible == ITABS_TRUE) + { + if (*virtual_mx >= offset && + *virtual_mx <= (offset + ih->data->tabs_line.broken_space_end - 1) && + *virtual_my <= (ih->data->tabs_line.line_thick - ITABS_CURRENT_EXTRA_PIXELS - 1)) + { + if (press) + last_tab_press = ih->data->tabs_line.end_tab + 1; + else if (last_tab_press == ih->data->tabs_line.end_tab + 1) + { + int result = iTabsCallTabChangeCb(ih, iTabsGetTabIhandle(ih, last_tab_press), + iTabsGetTabIhandle(ih, ih->data->current_tab)); + if (result != IUP_IGNORE) + iTabsSetNewCurrentTab(ih, last_tab_press); + } + + return IUP_DEFAULT; + } + else + offset += ih->data->tabs_line.broken_space_end; + } + + return IUP_DEFAULT; +} + +static void iTabsRefreshTabs(Ihandle* ih) +{ + int t, old_number_of_tabs = ih->data->number_of_tabs; + Ihandle* child, *old_current_tab_handle = NULL; + + if (ih->data->tabs_line.tabs_info) + old_current_tab_handle = ih->data->tabs_line.tabs_info[ih->data->current_tab].ihandle; + + ih->data->number_of_tabs = 0; + child = ih->data->zbox->firstchild; + while(child) + { + if (IupGetName(child) == NULL) + iupAttribSetHandleName(child); + + ih->data->number_of_tabs++; + child = child->brother; + } + + if (old_number_of_tabs < ih->data->number_of_tabs) + ih->data->tabs_line.tabs_info = (ItabsDrawInfo*)realloc(ih->data->tabs_line.tabs_info, ih->data->number_of_tabs * sizeof (ItabsDrawInfo)); + + t = 0; + child = ih->data->zbox->firstchild; + while (child) + { + ih->data->tabs_line.tabs_info[t].ihandle = child; + + if (child == old_current_tab_handle) + ih->data->current_tab = t; /* current tab was moved */ + + child = child->brother; + t++; + } + + if (old_current_tab_handle && + old_current_tab_handle != ih->data->tabs_line.tabs_info[ih->data->current_tab].ihandle) + { + /* current tab was removed, reset to first child */ + ih->data->current_tab = 0; + } +} + + +/* ========================================================================= */ +/* Attributes */ +/* ========================================================================= */ + + +static int iTabsSetAlignmentAttrib(Ihandle* ih, const char* value) +{ + int inherit; + return iupClassObjectSetAttribute(ih->data->zbox, "ALIGNMENT", value, &inherit); +} + +static char* iTabsGetAlignmentAttrib(Ihandle* ih) +{ + int inherit; + char *def_value; + return iupClassObjectGetAttribute(ih->data->zbox, "ALIGNMENT", &def_value, &inherit); +} + +static int iTabsSetTabOrientationAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "VERTICAL")) + ih->data->tabs_orientation = ITABS_VERTICAL; + else + ih->data->tabs_orientation = ITABS_HORIZONTAL; + + iTabsUpdateRender(ih); + + return 0; /* do not store value in hash table */ +} + +static char* iTabsGetTabOrientationAttrib(Ihandle* ih) +{ + if (ih->data->tabs_orientation == ITABS_VERTICAL) + return "VERTICAL"; + else + return "HORIZONTAL"; +} + +static int iTabsSetTabTypeAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "BOTTOM")) + ih->data->tabs_type = ITABS_BOTTOM; + else if (iupStrEqualNoCase(value, "LEFT")) + ih->data->tabs_type = ITABS_LEFT; + else if (iupStrEqualNoCase(value, "RIGHT")) + ih->data->tabs_type = ITABS_RIGHT; + else /* "TOP" */ + ih->data->tabs_type = ITABS_TOP; + + iTabsUpdateRender(ih); + + return 0; /* do not store value in hash table */ +} + +static char* iTabsGetTabTypeAttrib(Ihandle* ih) +{ + if (ih->data->tabs_type == ITABS_BOTTOM) + return "BOTTOM"; + else if (ih->data->tabs_type == ITABS_LEFT) + return "LEFT"; + else if (ih->data->tabs_type == ITABS_RIGHT) + return "RIGHT"; + else /* ITABS_TOP */ + return "TOP"; +} + +static int iTabsSetRepaintAttrib(Ihandle* ih, const char* value) +{ + (void)value; + + iTabsCalcTabSize(ih); /* calculate sizes of Tab line (depends on the TABTITLE of all children) */ + iTabsCalcScrollPos(ih); /* calculates the position of the scroll (depends on the sizes calculated) */ + iTabsCalcVisibleTabs(ih); /* calculates the visibility of tabs (depends on the sizes calculated and on the current tab) */ + + IupUpdate(ih); + + return 0; /* do not store value in hash table */ +} + +static int iTabsSetFontActiveAttrib(Ihandle* ih, const char* value) +{ + char* native = IupMapFont(value); + if (!native) native = (char*)value; + + if (native) + { + if (ih->data->font_active) + free(ih->data->font_active); + + ih->data->font_active = iupStrDup(native); + IupUpdate(ih); + } + return 1; +} + +static int iTabsSetFontInactiveAttrib(Ihandle* ih, const char* value) +{ + char* native = IupMapFont(value); + if (!native) native = (char*)value; + + if (native) + { + if (ih->data->font_inactive) + free(ih->data->font_inactive); + + ih->data->font_inactive = iupStrDup(native); + IupUpdate(ih); + } + return 1; +} + +static int iTabsSetFgColorAttrib(Ihandle* ih, const char* value) +{ + ih->data->fgcolor = cdIupConvertColor(value); + IupUpdate(ih); + return 1; +} + +static int iTabsSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (!value) + value = iupControlBaseGetParentBgColor(ih); + + ih->data->bgcolor = cdIupConvertColor(value); + cdIupCalcShadows(ih->data->bgcolor, &ih->data->light_shadow, &ih->data->mid_shadow, &ih->data->dark_shadow); + + IupUpdate(ih); + return 1; +} + +static int iTabsSetActiveAttrib(Ihandle* ih, const char* value) +{ + iupBaseSetActiveAttrib(ih, value); + IupUpdate(ih); /* post repaint so children is activated/deactivated */ + return 0; /* do not store value in hash table */ +} + +static int iTabsSetValueAttrib(Ihandle* ih, const char* value) +{ + int c; + Ihandle* new_tab = IupGetHandle(value); + + if (new_tab == NULL) + return 0; + + for(c = 0; c < ih->data->number_of_tabs; c++) + { + if (ih->data->tabs_line.tabs_info[c].ihandle == new_tab) + { + iTabsSetNewCurrentTab(ih, c); + break; + } + } + return 0; /* do not store value in hash table */ +} + +static char* iTabsGetValueAttrib(Ihandle* ih) +{ + return IupGetAttribute(ih->data->zbox, "VALUE"); +} + +static int iTabsSetValuePosAttrib(Ihandle* ih, const char* value) +{ + int pos; + + if (!iupStrToInt(value, &pos)) + return 0; + + if (pos<0) pos=0; + if (pos>ih->data->number_of_tabs-1) pos=ih->data->number_of_tabs-1; + + iTabsSetNewCurrentTab(ih, pos); + return 0; /* do not store value in hash table */ +} + +static char* iTabsGetValuePosAttrib(Ihandle* ih) +{ + char *str = iupStrGetMemory(50); + sprintf(str, "%d", ih->data->current_tab); + return str; +} + +static char* iTabsGetClientSizeAttrib(Ihandle* ih) +{ + int width, height, decorwidth, decorheight; + char* str = iupStrGetMemory(20); + width = ih->currentwidth; + height = ih->currentheight; + iTabsGetDecorSize(ih, &decorwidth, &decorheight); + width -= decorwidth; + height -= decorheight; + if (width < 0) width = 0; + if (height < 0) height = 0; + sprintf(str, "%dx%d", width, height); + return str; +} + + +/* ========================================================================= */ +/* Methods */ +/* ========================================================================= */ + + +static Ihandle* iTabsGetInnerContainerMethod(Ihandle* ih) +{ + return ih->data->zbox; +} + +static void iTabsComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int decorwidth, decorheight; + Ihandle* child = ih->data->zbox; /* zbox is always non NULL */ + + iTabsCalcTabSize(ih); /* make sure that decoration is updated, even if UPDATE has not been set after other changes */ + iTabsGetDecorSize(ih, &decorwidth, &decorheight); + + /* update child natural size first */ + iupBaseComputeNaturalSize(child); + + *expand = child->expand; + *w = child->naturalwidth + decorwidth; + *h = child->naturalheight + decorheight; +} + +static void iTabsSetChildrenCurrentSizeMethod(Ihandle* ih, int shrink) +{ + int width, height, decorwidth, decorheight; + + iTabsGetDecorSize(ih, &decorwidth, &decorheight); + + width = ih->currentwidth-decorwidth; + height = ih->currentheight-decorheight; + if (width < 0) width = 0; + if (height < 0) height = 0; + + iupBaseSetCurrentSize(ih->data->zbox, width, height, shrink); +} + +static void iTabsSetChildrenPositionMethod(Ihandle* ih, int x, int y) +{ + /* IupTabs is the native parent of its children, + so the position is restarted at (0,0) */ + iTabsGetDecorOffset(ih, &x, &y); + + /* Child coordinates are relative to client left-top corner. */ + iupBaseSetPosition(ih->data->zbox, x, y); +} + +static void iTabsChildAddedMethod(Ihandle* ih, Ihandle* child) +{ + (void)child; + iTabsRefreshTabs(ih); /* update the list of tabs */ +} + +static void iTabsChildRemovedMethod(Ihandle* ih, Ihandle* child) +{ + (void)child; + iTabsRefreshTabs(ih); /* update the list of tabs */ +} + +static int iTabsMapMethod(Ihandle* ih) +{ + ih->data->cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!ih->data->cdcanvas) + return IUP_ERROR; + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + + return IUP_NOERROR; +} + +static void iTabsUnMapMethod(Ihandle* ih) +{ + if (ih->data->cddbuffer) + cdKillCanvas(ih->data->cddbuffer); + + if (ih->data->cdcanvas) + cdKillCanvas(ih->data->cdcanvas); +} + +static void iTabsDestroyMethod(Ihandle* ih) +{ + if (ih->data->font_inactive) + free(ih->data->font_inactive); + + if (ih->data->font_inactive) + free(ih->data->font_inactive); + + free(ih->data->tabs_line.tabs_info); +} + +static int iTabsCreateMethod(Ihandle* ih, void **params) +{ + /* free the data allocated by IupCanvas */ + if (ih->data) + free(ih->data); + ih->data = iupALLOCCTRLDATA(); + + /* change the IupCanvas default values */ + iupAttribSetStr(ih, "BORDER", "NO"); + + ih->data->zbox = IupZbox(NULL); + ih->firstchild = ih->data->zbox; /* zbox is actually the only child of Tabs */ + ih->data->zbox->parent = ih; + + /* add children */ + if (params) + { + Ihandle** iparams = (Ihandle**)params; + while (*iparams) + { + IupAppend(ih, *iparams); /* this in fact will add the child to the zbox */ + iparams++; + } + } + + /* IupCanvas callbacks */ + IupSetCallback(ih, "RESIZE_CB", (Icallback)iTabsResize_CB); + IupSetCallback(ih, "ACTION", (Icallback)iTabsRedraw_CB); + IupSetCallback(ih, "BUTTON_CB", (Icallback)iTabsButton_CB); + IupSetCallback(ih, "KEYPRESS_CB", (Icallback)iTabsKeyPress_CB); + IupSetCallback(ih, "FOCUS_CB", (Icallback)iTabsFocus_CB); + + /* initialize colors */ + ih->data->bgcolor = -1; + ih->data->fgcolor = CD_BLACK; + ih->data->light_shadow = CD_WHITE; + ih->data->mid_shadow = CD_GRAY; + ih->data->dark_shadow = CD_DARK_GRAY; + + /* Context initialize with values related to type of tabs */ + ih->data->tabs_type = ITABS_TOP; + ih->data->tabs_orientation = ITABS_HORIZONTAL; + + /* No button is pressed */ + ih->data->tabs_line.button = ITABS_BUTTON_NONE ; + + iTabsUpdateRender(ih); + + return IUP_NOERROR; +} + +static Iclass* iTabsGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "tabs"; + ic->format = "g"; /* array of Ihandle */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILD_ONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iTabsCreateMethod; + ic->Destroy = iTabsDestroyMethod; + ic->Map = iTabsMapMethod; + ic->UnMap = iTabsUnMapMethod; + + ic->ComputeNaturalSize = iTabsComputeNaturalSizeMethod; + ic->SetChildrenCurrentSize = iTabsSetChildrenCurrentSizeMethod; + ic->SetChildrenPosition = iTabsSetChildrenPositionMethod; + + ic->GetInnerContainer = iTabsGetInnerContainerMethod; + ic->ChildAdded = iTabsChildAddedMethod; + ic->ChildRemoved = iTabsChildRemovedMethod; + + /* Do not need to set base attributes because they are inherited from IupCanvas */ + + /* IupTabs Callbacks */ + iupClassRegisterCallback(ic, "TABCHANGE_CB", "nn"); + + /* IupTabs only */ + iupClassRegisterAttribute(ic, "ALIGNMENT", iTabsGetAlignmentAttrib, iTabsSetAlignmentAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TABTYPE", iTabsGetTabTypeAttrib, iTabsSetTabTypeAttrib, IUPAF_SAMEASSYSTEM, "TOP", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TABORIENTATION", iTabsGetTabOrientationAttrib, iTabsSetTabOrientationAttrib, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "REPAINT", NULL, iTabsSetRepaintAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FONT_ACTIVE", NULL, iTabsSetFontActiveAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FONT_INACTIVE", NULL, iTabsSetFontInactiveAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUE", iTabsGetValueAttrib, iTabsSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "VALUEPOS", iTabsGetValuePosAttrib, iTabsSetValuePosAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "TABTITLE", NULL, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TABSIZE", NULL, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "FGCOLOR", NULL, iTabsSetFgColorAttrib, NULL, NULL, IUPAF_NOT_MAPPED); + + /* Overwrite IupCanvas Attributes */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iTabsSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", iupControlBaseGetBgColorAttrib, iTabsSetBgColorAttrib, NULL, "255 255 255", IUPAF_DEFAULT); /* overwrite canvas implementation, set a system default to force a new default */ + + /* Base Container */ + iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CLIENTSIZE", iTabsGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); /* overwrite canvas default */ + + return ic; +} + +void IupOldTabsOpen(void) +{ + iupRegisterClass(iTabsGetClass()); +} diff --git a/iup/srccontrols/iup_oldval.c b/iup/srccontrols/iup_oldval.c new file mode 100755 index 0000000..50dae8a --- /dev/null +++ b/iup/srccontrols/iup_oldval.c @@ -0,0 +1,809 @@ +/** \file + * \brief Valuator Control. + * + * See Copyright Notice in "iup.h" + */ + + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupcontrols.h" +#include "iupkey.h" + +#include +#include +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_controls.h" +#include "iup_cdutil.h" +#include "iup_register.h" + + + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + + /* mouse interaction control */ + int moving; + + /* visual appearance control */ + int w,h; + long bgcolor, + light_shadow, + mid_shadow, + dark_shadow; + int has_focus; + + /* attributes */ + int type; + int show_ticks; + double val, + step, + pagestep, + vmin, + vmax; + + unsigned char* himage; + int himage_w; + int himage_h; + long int* himage_colors; + int himage_numcolors; + + unsigned char* himageinactive; + int himageinactive_w; + int himageinactive_h; + long int* himageinactive_colors; + int himageinactive_numcolors; + + /* drawing canvas */ + cdCanvas *cddbuffer; + cdCanvas *cdcanvas; + + /* Internal methods */ + void (*Draw)(Ihandle* ih); + void (*CalcPosition)(Ihandle*,int,int); +}; + +#define IVAL_HANDLER_LONG 22 /* handler long side */ +#define IVAL_HANDLER_SHORT 16 /* handler short side */ +#define IVAL_TRAIL 4 /* with of the trail */ +#define IVAL_TICK 3 /* size of the tick mark */ +#define IVAL_TRAIL_START (IVAL_HANDLER_LONG/2+1) +#define IVAL_TRAIL_END(_s) (_s-1-IVAL_HANDLER_LONG/2-1) +#define IVAL_TRAIL_LONG(_s) (_s-1-IVAL_HANDLER_LONG-1) + +enum {IVAL_VERTICAL, IVAL_HORIZONTAL}; + +static void iValUpdateImageBgColor(long int* colors, int num_colors, long bgcolor) +{ + int c; + for (c = 0; c < num_colors; c++) + { + if (*colors == -1) + *colors = bgcolor; + colors++; + } + +} + +static void iValSetImage(const char* name, unsigned char** image_out, long int** color_out, + int* w_out, int* h_out, int* numcolors_out) +{ + int x, y, c, width, height, max_color = 0; + unsigned char* image_data; + Ihandle *img = IupGetHandle(name); + + *w_out = width = img->currentwidth; + *h_out = height = img->currentheight; + image_data = (unsigned char*)IupGetAttribute(img, "WID"); + + *image_out = (unsigned char*) realloc(*image_out, width*height*sizeof(unsigned char)); + *color_out = (long int*) realloc(*color_out, 256*sizeof(long int)); + + for(y = height-1 ; y >=0 ; y--) + { + for(x = 0 ; x < width ; x++) + { + (*image_out)[x+width*y] = *image_data; + if (*image_data > max_color) + max_color = *image_data; + image_data++; + } + } + + max_color++; + *numcolors_out = max_color; + + for(c = 0 ; c < max_color; c++) + { + char colorstr[30]; + char *value; + sprintf(colorstr, "%d", c); + value = iupAttribGet(img, colorstr); + if (iupStrEqualNoCase(value, "BGCOLOR")) + (*color_out)[c] = -1; + else + (*color_out)[c] = cdIupConvertColor(value); + } +} + +static void iValRepaint(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + return; + + /* update render */ + cdCanvasBackground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasClear(ih->data->cddbuffer); + ih->data->Draw(ih); + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); + if (ih->data->has_focus) + cdIupDrawFocusRect(ih, ih->data->cdcanvas, 0, 0, ih->data->w-1, ih->data->h-1); +} + +static void iValDrawVerticalTick(Ihandle* ih, int y) +{ + cdIupDrawHorizSunkenMark(ih->data->cddbuffer, 1, 1+IVAL_TICK, y, ih->data->light_shadow, ih->data->dark_shadow); + cdIupDrawHorizSunkenMark(ih->data->cddbuffer, ih->data->w-2-IVAL_TICK, ih->data->w-2, y, ih->data->light_shadow, ih->data->dark_shadow); +} + +static void iValDrawHorizontalTick(Ihandle* ih, int x) +{ + + cdIupDrawVertSunkenMark(ih->data->cddbuffer, x, 1, 1+IVAL_TICK, ih->data->light_shadow, ih->data->dark_shadow); + cdIupDrawVertSunkenMark(ih->data->cddbuffer, x, ih->data->h-2-IVAL_TICK, ih->data->h-2, ih->data->light_shadow, ih->data->dark_shadow); +} + +static void iValDrawVerticalTicks(Ihandle* ih) +{ + int i; + for (i = 0; i < ih->data->show_ticks-1; i++) + { + iValDrawVerticalTick(ih, (i*(IVAL_TRAIL_LONG(ih->data->h)-2))/(ih->data->show_ticks-1) + IVAL_TRAIL_START+1); + } + + iValDrawVerticalTick(ih, IVAL_TRAIL_END(ih->data->h)); +} + +static void iValDrawHorizontalTicks(Ihandle* ih) +{ + int i; + for (i = 0; i < ih->data->show_ticks-1; i++) + { + iValDrawHorizontalTick(ih, (i*(IVAL_TRAIL_LONG(ih->data->w)-2))/(ih->data->show_ticks-1) + IVAL_TRAIL_START+1); + } + + iValDrawHorizontalTick(ih, IVAL_TRAIL_END(ih->data->w)); +} + +static void iValDrawVertical(Ihandle* ih) +{ + int y, x = (ih->data->w-IVAL_TRAIL)/2; + double vn = (ih->data->val-ih->data->vmin)/(ih->data->vmax-ih->data->vmin); + + /* trail */ + cdIupDrawSunkenRect(ih->data->cddbuffer, x, IVAL_TRAIL_START, x+IVAL_TRAIL-1, IVAL_TRAIL_END(ih->data->h)+1, + ih->data->light_shadow, ih->data->mid_shadow, ih->data->dark_shadow); + + if (ih->data->show_ticks > 2) + iValDrawVerticalTicks(ih); + + if (iupdrvIsActive(ih) && ih->data->himage) + { + x = (ih->data->w - ih->data->himage_w)/2; + y = (int)(vn*(IVAL_TRAIL_LONG(ih->data->h)-2) + IVAL_TRAIL_START+1); + cdCanvasPutImageRectMap(ih->data->cddbuffer,ih->data->himage_w, ih->data->himage_h, ih->data->himage, ih->data->himage_colors, + x, y-ih->data->himage_h/2, 0,0,0,0,0,0); + } + else if (!iupdrvIsActive(ih) && ih->data->himageinactive) + { + x = (ih->data->w - ih->data->himageinactive_w)/2; + y = (int)(vn*(IVAL_TRAIL_LONG(ih->data->h)-2) + IVAL_TRAIL_START+1); + cdCanvasPutImageRectMap(ih->data->cddbuffer,ih->data->himageinactive_w, ih->data->himageinactive_h, ih->data->himageinactive, + ih->data->himageinactive_colors, x, y-ih->data->himageinactive_h/2, 0,0,0,0,0,0); + } + else + { + /* handler border */ + x = (ih->data->w-IVAL_HANDLER_SHORT)/2; + y = (int)(vn*(IVAL_TRAIL_LONG(ih->data->h)-2) + IVAL_TRAIL_START+1); + cdIupDrawRaisenRect(ih->data->cddbuffer, x, y-IVAL_HANDLER_LONG/2-1, x+IVAL_HANDLER_SHORT-1, y+IVAL_HANDLER_LONG/2, + ih->data->light_shadow, ih->data->mid_shadow, ih->data->dark_shadow); + + /* handler background */ + cdCanvasForeground(ih->data->cddbuffer, ih->data->bgcolor ); + cdCanvasBox(ih->data->cddbuffer,x+1, x+IVAL_HANDLER_SHORT-1-2, y-IVAL_HANDLER_LONG/2+1, y+IVAL_HANDLER_LONG/2-1); + + /* handler sunken mark */ + cdIupDrawHorizSunkenMark(ih->data->cddbuffer, x+2, x+IVAL_HANDLER_SHORT-4, y, ih->data->light_shadow, ih->data->dark_shadow); + } +} + +static void iValDrawHorizontal(Ihandle* ih) +{ + int x, y = (ih->data->h-IVAL_TRAIL)/2; + double vn = (ih->data->val-ih->data->vmin)/(ih->data->vmax-ih->data->vmin); + + /* trail */ + cdIupDrawSunkenRect(ih->data->cddbuffer, IVAL_TRAIL_START, y, IVAL_TRAIL_END(ih->data->w)+1, y+IVAL_TRAIL-1, + ih->data->light_shadow, ih->data->mid_shadow, ih->data->dark_shadow); + + if (ih->data->show_ticks > 2) + iValDrawHorizontalTicks(ih); + + if (iupdrvIsActive(ih) && ih->data->himage) + { + y = (ih->data->h - ih->data->himage_h)/2+1; + x = (int)(vn*(IVAL_TRAIL_LONG(ih->data->w)-2) + IVAL_TRAIL_START+1); + cdCanvasPutImageRectMap(ih->data->cddbuffer,ih->data->himage_w, ih->data->himage_h, ih->data->himage, ih->data->himage_colors, + x-ih->data->himage_w/2, y, 0,0,0,0,0,0); + } + else if (!iupdrvIsActive(ih) && ih->data->himageinactive) + { + y = (ih->data->h - ih->data->himageinactive_h)/2+1; + x = (int)(vn*(IVAL_TRAIL_LONG(ih->data->w)-2) + IVAL_TRAIL_START+1); + cdCanvasPutImageRectMap(ih->data->cddbuffer,ih->data->himageinactive_w, ih->data->himageinactive_h, ih->data->himageinactive, ih->data->himageinactive_colors, + x-ih->data->himageinactive_w/2, y, 0,0,0,0,0,0); + } + else + { + /* handler border */ + y = (ih->data->h-IVAL_HANDLER_SHORT)/2; + x = (int)(vn*(IVAL_TRAIL_LONG(ih->data->w)-2) + IVAL_TRAIL_START+1); + cdIupDrawRaisenRect(ih->data->cddbuffer, x-IVAL_HANDLER_LONG/2-1, y, x+IVAL_HANDLER_LONG/2, y+IVAL_HANDLER_SHORT-1, + ih->data->light_shadow, ih->data->mid_shadow, ih->data->dark_shadow); + + /* handler background */ + cdCanvasForeground(ih->data->cddbuffer, ih->data->bgcolor ); + cdCanvasBox(ih->data->cddbuffer,x-IVAL_HANDLER_LONG/2, x+IVAL_HANDLER_LONG/2-2, y+1, y+IVAL_HANDLER_SHORT-1-2); + + /* handler sunken mark */ + cdIupDrawVertSunkenMark(ih->data->cddbuffer, x, y+3, y+IVAL_HANDLER_SHORT-3, ih->data->light_shadow, ih->data->dark_shadow); + } +} + +static void iValCropValue(Ihandle* ih) +{ + if (ih->data->val > ih->data->vmax) + ih->data->val = ih->data->vmax; + else if (ih->data->val < ih->data->vmin) + ih->data->val = ih->data->vmin; +} + +static void iValSetVerticalPosition(Ihandle* ih, int x, int y) +{ + double vn; + (void)x; + y = cdIupInvertYAxis(y, ih->data->h); + vn = ((double)(y-IVAL_TRAIL_START))/((double)IVAL_TRAIL_LONG(ih->data->h)); + ih->data->val = vn*(ih->data->vmax-ih->data->vmin) + ih->data->vmin; + iValCropValue(ih); + iValRepaint(ih); +} + +static void iValSetHorizontalPosition(Ihandle* ih, int x, int y) +{ + double vn; + (void)y; + vn = ((double)(x-IVAL_TRAIL_START))/((double)IVAL_TRAIL_LONG(ih->data->w)); + ih->data->val = vn*(ih->data->vmax-ih->data->vmin) + ih->data->vmin; + iValCropValue(ih); + iValRepaint(ih); +} + +static int iValMotion_CB(Ihandle *ih,int x,int y,char *r) +{ + IFnd cb; + + if (!iup_isbutton1(r)) return IUP_DEFAULT; + if (!ih->data->moving) return IUP_DEFAULT; + + ih->data->CalcPosition(ih,x,y); + + cb = (IFnd) IupGetCallback(ih, "MOUSEMOVE_CB"); + if (cb) cb(ih,ih->data->val); + + return IUP_DEFAULT; +} + +static int iValButton_CB(Ihandle *ih,int b,int m,int x,int y) +{ + char* cb_name; + IFnd cb; + if (b!=IUP_BUTTON1) return IUP_DEFAULT; + + if (m) + { + ih->data->CalcPosition(ih, x, y); + ih->data->moving = 1; + cb_name = "BUTTON_PRESS_CB"; + } + else + { + if (!ih->data->moving) return IUP_DEFAULT; + + iValRepaint(ih); + ih->data->moving = 0; + + cb_name = "BUTTON_RELEASE_CB"; + } + + cb = (IFnd) IupGetCallback(ih, cb_name); + if (cb) cb(ih,ih->data->val); + + return IUP_DEFAULT; +} + +static int iValResize_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + { + /* update canvas size */ + cdCanvasActivate(ih->data->cdcanvas); + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + } + + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update size */ + cdCanvasActivate(ih->data->cddbuffer); + cdCanvasGetSize(ih->data->cddbuffer, &ih->data->w, &ih->data->h, NULL, NULL); + + /* update render */ + cdCanvasBackground(ih->data->cddbuffer, ih->data->bgcolor); + cdCanvasClear(ih->data->cddbuffer); + ih->data->Draw(ih); + + return IUP_DEFAULT; +} + +static int iValRedraw_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update display */ + cdCanvasFlush(ih->data->cddbuffer); + if (ih->data->has_focus) + cdIupDrawFocusRect(ih, ih->data->cdcanvas, 0, 0, ih->data->w-1, ih->data->h-1); + + return IUP_DEFAULT; +} + +static int iValFocus_CB (Ihandle* ih, int focus) +{ + ih->data->has_focus = focus; + iValRepaint(ih); + return IUP_DEFAULT; +} + +static int iValKeypress_CB(Ihandle *ih, int c, int press) +{ + char* cb_name; + IFnd cb; + + if (c != K_LEFT && c != K_UP && + c != K_PGDN && c != K_PGUP && + c != K_RIGHT && c != K_DOWN && + c != K_END && c != K_HOME && + c != K_sLEFT && c != K_sUP && + c != K_sPGDN && c != K_sPGUP && + c != K_sRIGHT && c != K_sDOWN && + c != K_sEND && c != K_sHOME) + return IUP_DEFAULT; + + if (press) + { + switch(c) + { + case K_sHOME: + case K_HOME: + ih->data->val = ih->data->vmax; + break; + case K_sEND: + case K_END: + ih->data->val = ih->data->vmin; + break; + case K_sLEFT: + case K_sDOWN: + case K_LEFT: + case K_DOWN: + ih->data->val -= ih->data->step*(ih->data->vmax-ih->data->vmin); + iValCropValue(ih); + break; + case K_sRIGHT: + case K_sUP: + case K_RIGHT: + case K_UP: + ih->data->val += ih->data->step*(ih->data->vmax-ih->data->vmin); + iValCropValue(ih); + break; + case K_sPGDN: + case K_PGDN: + ih->data->val -= ih->data->pagestep*(ih->data->vmax-ih->data->vmin); + iValCropValue(ih); + break; + case K_sPGUP: + case K_PGUP: + ih->data->val += ih->data->pagestep*(ih->data->vmax-ih->data->vmin); + iValCropValue(ih); + break; + } + + if (fabs(ih->data->val-ih->data->vmin) < 0.9*ih->data->step*(ih->data->vmax-ih->data->vmin)) + ih->data->val = ih->data->vmin; + + if (ih->data->moving) + cb_name = "MOUSEMOVE_CB"; + else + { + ih->data->moving = 1; + cb_name = "BUTTON_PRESS_CB"; + } + } + else + { + ih->data->moving = 0; + cb_name = "BUTTON_RELEASE_CB"; + } + + iValRepaint(ih); + + cb = (IFnd) IupGetCallback(ih, cb_name); + if (cb) cb(ih,ih->data->val); + + return IUP_IGNORE; /* to avoid arrow keys being processed by the system */ +} + +static int iValWheel_CB(Ihandle *ih, float delta) +{ + IFnd cb; + + ih->data->val += ((double)delta)*ih->data->step*(ih->data->vmax-ih->data->vmin); + iValCropValue(ih); + + if (fabs(ih->data->val-ih->data->vmin) < 0.9*ih->data->step*(ih->data->vmax-ih->data->vmin)) + ih->data->val = ih->data->vmin; + + iValRepaint(ih); + + cb = (IFnd) IupGetCallback(ih, "BUTTON_PRESS_CB"); + if (cb) cb(ih,ih->data->val); + + cb = (IFnd) IupGetCallback(ih, "BUTTON_RELEASE_CB"); + if (cb) cb(ih,ih->data->val); + + return IUP_DEFAULT; +} + + +/*******************************************************************************/ + + +static int iValSetTypeAttrib(Ihandle* ih, const char *value) +{ + /* valid only before map */ + if (ih->handle) + return 0; + + if (iupStrEqualNoCase(value, "VERTICAL")) + { + IupSetAttribute(ih, "RASTERSIZE", "28x124"); + + ih->data->Draw = iValDrawVertical; + ih->data->CalcPosition = iValSetVerticalPosition; + ih->data->type = IVAL_VERTICAL; + } + else /* "HORIZONTAL" */ + { + IupSetAttribute(ih, "RASTERSIZE", "124x28"); + + ih->data->Draw = iValDrawHorizontal; + ih->data->CalcPosition = iValSetHorizontalPosition; + ih->data->type = IVAL_HORIZONTAL; + } + + return 0; /* do not store value in hash table */ +} + +static char* iValGetTypeAttrib(Ihandle* ih) +{ + if (ih->data->type == IVAL_HORIZONTAL) + return "HORIZONTAL"; + else /* (ih->data->type == IVAL_VERTICAL) */ + return "VERTICAL"; +} + +static char* iValGetValueAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + sprintf(str, "%f", ih->data->val); + return str; +} + +static int iValSetValueAttrib(Ihandle* ih, const char* value) +{ + if (!value) + ih->data->val = 0; + else + ih->data->val = atof(value); + iValCropValue(ih); + iValRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static int iValSetShowTicksAttrib(Ihandle* ih, const char* showticks) +{ + int i; + if (iupStrToInt(showticks, &i)) + { + ih->data->show_ticks = i; + iValRepaint(ih); + } + return 0; /* do not store value in hash table */ +} + +static char* iValGetShowTicksAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + sprintf(str, "%d", ih->data->show_ticks); + return str; +} + +static int iValSetStepAttrib(Ihandle* ih, const char* step) +{ + ih->data->step = atof(step); + iValRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iValGetStepAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + sprintf(str, "%f", ih->data->step); + return str; +} + +static int iValSetPageStepAttrib(Ihandle* ih, const char* pagestep) +{ + ih->data->step = atof(pagestep); + iValRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iValGetPageStepAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + sprintf(str, "%f", ih->data->pagestep); + return str; +} + +static int iValSetMaxAttrib(Ihandle* ih, const char* max) +{ + ih->data->vmax = atof(max); + iValCropValue(ih); + iValRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iValGetMaxAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + sprintf(str, "%f", ih->data->vmax); + return str; +} + +static int iValSetMinAttrib(Ihandle* ih, const char* min) +{ + ih->data->vmin = atof(min); + iValCropValue(ih); + iValRepaint(ih); + return 0; /* do not store value in hash table */ +} + +static char* iValGetMinAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(20); + sprintf(str, "%f", ih->data->vmin); + return str; +} + +static int iValSetHandlerImageAttrib(Ihandle* ih, const char* value) +{ + if (!value) + { + if (ih->data->himage) + { + free(ih->data->himage); + free(ih->data->himage_colors); + ih->data->himage = NULL; + ih->data->himage_colors = NULL; + } + } + else + { + iValSetImage(value, &(ih->data->himage), &(ih->data->himage_colors), + &(ih->data->himage_w), &(ih->data->himage_h), &(ih->data->himage_numcolors)); + } + + iValRepaint(ih); + return 1; +} + +static int iValSetHandlerImageInactiveAttrib(Ihandle* ih, const char* value) +{ + if (value==NULL) + { + if (ih->data->himageinactive) + { + free(ih->data->himageinactive); + free(ih->data->himageinactive_colors); + ih->data->himageinactive = NULL; + ih->data->himageinactive_colors = NULL; + } + } + else + { + iValSetImage(value, &(ih->data->himageinactive), &(ih->data->himageinactive_colors), + &(ih->data->himageinactive_w), &(ih->data->himageinactive_h), &(ih->data->himageinactive_numcolors)); + } + + iValRepaint(ih); + return 1; +} + +static int iValSetBgColorAttrib(Ihandle* ih, const char* value) +{ + if (!value) + value = iupControlBaseGetParentBgColor(ih); + + ih->data->bgcolor = cdIupConvertColor(value); + + cdIupCalcShadows(ih->data->bgcolor, &ih->data->light_shadow, &ih->data->mid_shadow, &ih->data->dark_shadow); + if (!iupdrvIsActive(ih) && !ih->data->himage) + ih->data->light_shadow = ih->data->mid_shadow; + + if (ih->data->himage) + iValUpdateImageBgColor(ih->data->himage_colors, ih->data->himage_numcolors, ih->data->bgcolor); + if (ih->data->himageinactive) + iValUpdateImageBgColor(ih->data->himageinactive_colors, ih->data->himageinactive_numcolors, ih->data->bgcolor); + + iValRepaint(ih); + return 1; +} + +static int iValSetActiveAttrib(Ihandle* ih, const char* value) +{ + iupBaseSetActiveAttrib(ih, value); + + cdIupCalcShadows(ih->data->bgcolor, &ih->data->light_shadow, &ih->data->mid_shadow, &ih->data->dark_shadow); + if (!iupdrvIsActive(ih) && !ih->data->himage) + ih->data->light_shadow = ih->data->mid_shadow; + + iValRepaint(ih); + return 0; /* do not store value in hash table */ +} + + +/************************************************************************************/ + + +static int iValMapMethod(Ihandle* ih) +{ + ih->data->cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!ih->data->cdcanvas) + return IUP_ERROR; + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + + return IUP_NOERROR; +} + +static void iValUnMapMethod(Ihandle* ih) +{ + if (ih->data->cddbuffer) + cdKillCanvas(ih->data->cddbuffer); + + if (ih->data->cdcanvas) + cdKillCanvas(ih->data->cdcanvas); +} + +static void iValDestroyMethod(Ihandle* ih) +{ + if (ih->data->himage) free(ih->data->himage); + if (ih->data->himage_colors) free(ih->data->himage_colors); + if (ih->data->himageinactive) free(ih->data->himageinactive); + if (ih->data->himageinactive_colors) free(ih->data->himageinactive_colors); +} + +static int iValCreateMethod(Ihandle* ih, void **params) +{ + if (params && params[0]) + iupAttribStoreStr(ih, "TYPE", params[0]); + + /* free the data alocated by IupCanvas */ + if (ih->data) free(ih->data); + ih->data = iupALLOCCTRLDATA(); + + /* change the IupCanvas default values */ + iupAttribSetStr(ih, "BORDER", "NO"); + ih->expand = IUP_EXPAND_NONE; + + /* default values */ + iValSetTypeAttrib(ih, "HORIZONTAL"); + ih->data->vmax = 1; + ih->data->step = 0.01; + ih->data->pagestep = 0.1; + + IupSetCallback(ih,"RESIZE_CB",(Icallback)iValResize_CB); + IupSetCallback(ih,"ACTION",(Icallback)iValRedraw_CB); + IupSetCallback(ih,"BUTTON_CB",(Icallback)iValButton_CB); + IupSetCallback(ih,"MOTION_CB",(Icallback)iValMotion_CB); + IupSetCallback(ih,"FOCUS_CB",(Icallback)iValFocus_CB); + IupSetCallback(ih,"WHEEL_CB",(Icallback)iValWheel_CB); + IupSetCallback(ih,"KEYPRESS_CB",(Icallback)iValKeypress_CB); + + return IUP_NOERROR; +} + +static Iclass* iValGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "val"; + ic->format = "S"; /* one optional string */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iValCreateMethod; + ic->Destroy = iValDestroyMethod; + ic->Map = iValMapMethod; + ic->UnMap = iValUnMapMethod; + + /* IupVal Callbacks */ + iupClassRegisterCallback(ic, "MOUSEMOVE_CB", "d"); + iupClassRegisterCallback(ic, "BUTTON_PRESS_CB", "d"); + iupClassRegisterCallback(ic, "BUTTON_RELEASE_CB", "d"); + + /* IupVal only */ + iupClassRegisterAttribute(ic, "VALUE", iValGetValueAttrib, iValSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TYPE", iValGetTypeAttrib, iValSetTypeAttrib, IUPAF_SAMEASSYSTEM, "HORIZONTAL", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "SHOWTICKS", iValGetShowTicksAttrib, iValSetShowTicksAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "STEP", iValGetStepAttrib, iValSetStepAttrib, IUPAF_SAMEASSYSTEM, "0.01", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "PAGESTEP", iValGetPageStepAttrib, iValSetPageStepAttrib, IUPAF_SAMEASSYSTEM, "0.1", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "MAX", iValGetMaxAttrib, iValSetMaxAttrib, IUPAF_SAMEASSYSTEM, "1.0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "MIN", iValGetMinAttrib, iValSetMinAttrib, IUPAF_SAMEASSYSTEM, "0.0", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "HANDLER_IMAGE", NULL, iValSetHandlerImageAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "HANDLER_IMAGE_INACTIVE", NULL, iValSetHandlerImageInactiveAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED); + + /* Overwrite IupCanvas Attributes */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iValSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "BGCOLOR", iupControlBaseGetBgColorAttrib, iValSetBgColorAttrib, NULL, "255 255 255", IUPAF_NO_INHERIT); /* overwrite canvas implementation, set a system default to force a new default */ + + return ic; +} + +void IupOldValOpen(void) +{ + iupRegisterClass(iValGetClass()); +} diff --git a/iup/srccontrols/iupcontrols.def b/iup/srccontrols/iupcontrols.def new file mode 100755 index 0000000..06c8f6f --- /dev/null +++ b/iup/srccontrols/iupcontrols.def @@ -0,0 +1,35 @@ +EXPORTS +IupColorbar +IupColorBrowser +IupDial +IupGauge +IupCells +IupMatrix +IupMatSetAttribute +IupMatStoreAttribute +IupMatGetAttribute +IupMatGetInt +IupMatGetFloat +IupMatSetfAttribute + +IupControlsOpen +IupControlsClose + +iupmaskSet +iupmaskSetInt +iupmaskSetFloat +iupmaskCheck +iupmaskGet +iupmaskGetFloat +iupmaskGetDouble +iupmaskGetInt +iupmaskMatSet +iupmaskMatSetInt +iupmaskMatSetFloat +iupmaskMatCheck +iupmaskMatGet +iupmaskMatGetFloat +iupmaskMatGetDouble +iupmaskMatGetInt +iupmaskRemove +iupmaskMatRemove diff --git a/iup/srccontrols/iupcontrols.dep b/iup/srccontrols/iupcontrols.dep new file mode 100644 index 0000000..773616a --- /dev/null +++ b/iup/srccontrols/iupcontrols.dep @@ -0,0 +1,173 @@ +$(OBJDIR)/iup_cdutil.o: iup_cdutil.c ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../src/iup_attrib.h ../src/iup_str.h \ + ../src/iup_drv.h iup_cdutil.h +$(OBJDIR)/iup_gauge.o: iup_gauge.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../../cd/include/cdiup.h \ + ../../cd/include/cddbuf.h ../src/iup_object.h ../src/iup_class.h \ + ../src/iup_table.h ../src/iup_classbase.h ../src/iup_attrib.h \ + ../src/iup_str.h ../src/iup_drv.h ../src/iup_stdcontrols.h \ + iup_controls.h iup_cdutil.h +$(OBJDIR)/iup_cells.o: iup_cells.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../../cd/include/cdiup.h \ + ../../cd/include/cddbuf.h ../src/iup_object.h ../src/iup_class.h \ + ../src/iup_table.h ../src/iup_classbase.h ../src/iup_attrib.h \ + ../src/iup_str.h ../src/iup_drv.h ../src/iup_stdcontrols.h \ + iup_controls.h iup_cdutil.h +$(OBJDIR)/iup_colorbar.o: iup_colorbar.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcontrols.h ../include/iupcbs.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h \ + ../../cd/include/cdiup.h ../../cd/include/cddbuf.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_str.h ../src/iup_drv.h \ + ../src/iup_stdcontrols.h iup_controls.h ../src/iup_image.h iup_cdutil.h +$(OBJDIR)/iup_controls.o: iup_controls.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcontrols.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_childtree.h ../src/iup_register.h iup_controls.h \ + ../src/iup_attrib.h +$(OBJDIR)/iup_dial.o: iup_dial.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../../cd/include/cdiup.h \ + ../../cd/include/cddbuf.h ../src/iup_object.h ../src/iup_class.h \ + ../src/iup_table.h ../src/iup_classbase.h ../src/iup_attrib.h \ + ../src/iup_str.h ../src/iup_drv.h ../src/iup_stdcontrols.h \ + iup_controls.h iup_cdutil.h +$(OBJDIR)/iup_oldtabs.o: iup_oldtabs.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../../cd/include/cdiup.h \ + ../../cd/include/cddbuf.h ../src/iup_object.h ../src/iup_class.h \ + ../src/iup_table.h ../src/iup_classbase.h ../src/iup_attrib.h \ + ../src/iup_str.h ../src/iup_drv.h ../src/iup_drvfont.h \ + ../src/iup_stdcontrols.h ../src/iup_register.h ../src/iup_layout.h \ + iup_controls.h iup_cdutil.h +$(OBJDIR)/iup_oldval.o: iup_oldval.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../include/iupcontrols.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h \ + ../../cd/include/cdiup.h ../../cd/include/cddbuf.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_str.h ../src/iup_drv.h \ + ../src/iup_stdcontrols.h iup_controls.h iup_cdutil.h \ + ../src/iup_register.h +$(OBJDIR)/iup_oldmask.o: iup_oldmask.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcontrols.h ../include/iupmask.h \ + ../src/iup_mask.h ../src/iup_str.h +$(OBJDIR)/iup_colorbrowser.o: color/iup_colorbrowser.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h \ + ../../cd/include/cdiup.h ../../cd/include/cdirgb.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_str.h ../src/iup_drv.h \ + ../src/iup_stdcontrols.h iup_controls.h iup_cdutil.h \ + color/iup_colorhsi.h +$(OBJDIR)/iup_colorhsi.o: color/iup_colorhsi.c color/iup_colorhsi.h +$(OBJDIR)/iup_colorbrowserdlg.o: color/iup_colorbrowserdlg.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + ../include/iupcontrols.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../../cd/include/cdiup.h \ + ../../cd/include/cddbuf.h ../../cd/include/cdirgb.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_str.h ../src/iup_strmessage.h \ + ../src/iup_drv.h ../src/iup_stdcontrols.h iup_controls.h iup_cdutil.h \ + ../src/iup_register.h ../src/iup_image.h color/iup_colorhsi.h \ + ../src/iup_childtree.h +$(OBJDIR)/iupmat_key.o: matrix/iupmat_key.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../src/iup_object.h ../src/iup_class.h \ + ../src/iup_table.h ../src/iup_classbase.h ../src/iup_attrib.h \ + ../src/iup_stdcontrols.h matrix/iupmat_def.h matrix/iupmat_scroll.h \ + matrix/iupmat_focus.h matrix/iupmat_aux.h matrix/iupmat_getset.h \ + matrix/iupmat_key.h matrix/iupmat_mark.h matrix/iupmat_edit.h \ + matrix/iupmat_draw.h +$(OBJDIR)/iupmat_mark.o: matrix/iupmat_mark.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../src/iup_object.h ../src/iup_class.h \ + ../src/iup_table.h ../src/iup_classbase.h ../src/iup_attrib.h \ + ../src/iup_str.h ../src/iup_stdcontrols.h matrix/iupmat_def.h \ + matrix/iupmat_mark.h matrix/iupmat_getset.h matrix/iupmat_draw.h +$(OBJDIR)/iupmat_aux.o: matrix/iupmat_aux.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../src/iup_object.h ../src/iup_class.h \ + ../src/iup_table.h ../src/iup_classbase.h ../src/iup_attrib.h \ + ../src/iup_str.h ../src/iup_drvfont.h ../src/iup_stdcontrols.h \ + matrix/iupmat_def.h matrix/iupmat_aux.h matrix/iupmat_getset.h +$(OBJDIR)/iupmat_mem.o: matrix/iupmat_mem.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../src/iup_object.h ../src/iup_class.h \ + ../src/iup_table.h ../src/iup_classbase.h ../src/iup_attrib.h \ + ../src/iup_str.h ../src/iup_stdcontrols.h matrix/iupmat_def.h \ + matrix/iupmat_mem.h +$(OBJDIR)/iupmat_mouse.o: matrix/iupmat_mouse.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_str.h ../src/iup_stdcontrols.h \ + matrix/iupmat_def.h matrix/iupmat_colres.h matrix/iupmat_aux.h \ + matrix/iupmat_focus.h matrix/iupmat_mouse.h matrix/iupmat_key.h \ + matrix/iupmat_mark.h matrix/iupmat_edit.h matrix/iupmat_draw.h \ + matrix/iupmat_scroll.h +$(OBJDIR)/iupmat_numlc.o: matrix/iupmat_numlc.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_str.h ../src/iup_stdcontrols.h \ + matrix/iupmat_def.h matrix/iupmat_edit.h matrix/iupmat_mem.h \ + matrix/iupmat_numlc.h matrix/iupmat_draw.h +$(OBJDIR)/iupmat_colres.o: matrix/iupmat_colres.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_str.h ../src/iup_stdcontrols.h \ + matrix/iupmat_def.h matrix/iupmat_colres.h matrix/iupmat_draw.h +$(OBJDIR)/iupmat_draw.o: matrix/iupmat_draw.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../src/iup_object.h ../src/iup_class.h \ + ../src/iup_table.h ../src/iup_classbase.h ../src/iup_attrib.h \ + ../src/iup_str.h ../src/iup_drv.h ../src/iup_drvfont.h \ + ../src/iup_stdcontrols.h iup_controls.h iup_cdutil.h ../src/iup_image.h \ + matrix/iupmat_def.h matrix/iupmat_cd.h matrix/iupmat_draw.h \ + matrix/iupmat_aux.h matrix/iupmat_getset.h matrix/iupmat_mark.h +$(OBJDIR)/iupmat_focus.o: matrix/iupmat_focus.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_str.h ../src/iup_stdcontrols.h \ + matrix/iupmat_def.h matrix/iupmat_aux.h matrix/iupmat_focus.h \ + matrix/iupmat_draw.h +$(OBJDIR)/iupmat_getset.o: matrix/iupmat_getset.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_drvfont.h ../src/iup_str.h \ + ../src/iup_stdcontrols.h iup_controls.h ../src/iup_childtree.h \ + matrix/iupmat_def.h matrix/iupmat_getset.h matrix/iupmat_edit.h \ + matrix/iupmat_draw.h matrix/iupmat_aux.h +$(OBJDIR)/iupmatrix.o: matrix/iupmatrix.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../include/iupcontrols.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h \ + ../../cd/include/cdiup.h ../../cd/include/cddbuf.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_str.h ../src/iup_drv.h \ + ../src/iup_drvfont.h ../src/iup_stdcontrols.h iup_controls.h \ + ../src/iup_register.h matrix/iupmat_def.h matrix/iupmat_getset.h \ + matrix/iupmat_scroll.h matrix/iupmat_aux.h matrix/iupmat_mem.h \ + matrix/iupmat_mouse.h matrix/iupmat_focus.h matrix/iupmat_key.h \ + matrix/iupmat_numlc.h matrix/iupmat_colres.h matrix/iupmat_mark.h \ + matrix/iupmat_edit.h matrix/iupmat_draw.h +$(OBJDIR)/iupmat_scroll.o: matrix/iupmat_scroll.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../include/iupcbs.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_stdcontrols.h matrix/iupmat_def.h matrix/iupmat_scroll.h \ + matrix/iupmat_focus.h matrix/iupmat_aux.h matrix/iupmat_edit.h \ + matrix/iupmat_draw.h +$(OBJDIR)/iupmat_edit.o: matrix/iupmat_edit.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../include/iupcontrols.h \ + ../../cd/include/cd.h ../../cd/include/cd_old.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_attrib.h ../src/iup_str.h ../src/iup_stdcontrols.h \ + ../src/iup_childtree.h matrix/iupmat_def.h matrix/iupmat_scroll.h \ + matrix/iupmat_aux.h matrix/iupmat_edit.h matrix/iupmat_key.h \ + matrix/iupmat_getset.h matrix/iupmat_draw.h diff --git a/iup/srccontrols/make_uname b/iup/srccontrols/make_uname new file mode 100755 index 0000000..cc4b881 --- /dev/null +++ b/iup/srccontrols/make_uname @@ -0,0 +1,3 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake $1 $2 $3 $4 $5 $6 $7 diff --git a/iup/srccontrols/make_uname.bat b/iup/srccontrols/make_uname.bat new file mode 100755 index 0000000..f0a0722 --- /dev/null +++ b/iup/srccontrols/make_uname.bat @@ -0,0 +1,4 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +call tecmake %1 %2 %3 %4 %5 %6 diff --git a/iup/srccontrols/matrix/iupmat_aux.c b/iup/srccontrols/matrix/iupmat_aux.c new file mode 100755 index 0000000..f8b85bb --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_aux.c @@ -0,0 +1,480 @@ +/** \file + * \brief iupmatrix control + * auxiliary functions + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" + +#include "iupmat_def.h" +#include "iupmat_aux.h" +#include "iupmat_getset.h" + + +static int iMatrixAuxIsFullVisibleLast(Ihandle* ih, int m) +{ + int i, sum = 0; + ImatLinColData *p; + + if (m == IMAT_PROCESS_LIN) + p = &(ih->data->lines); + else + p = &(ih->data->columns); + + for(i = p->first; i <= p->last; i++) + sum += p->sizes[i]; + + if (sum > p->visible_size) + return 0; + else + return 1; +} + +int iupMatrixAuxIsCellFullVisible(Ihandle* ih, int lin, int col) +{ + if(((lin >= ih->data->lines.first) && + (lin <= ih->data->lines.last) && + (col >= ih->data->columns.first) && + (col <= ih->data->columns.last))) + { + if (col == ih->data->columns.last && !iMatrixAuxIsFullVisibleLast(ih, IMAT_PROCESS_COL)) + return 0; + if (lin == ih->data->lines.last && !iMatrixAuxIsFullVisibleLast(ih, IMAT_PROCESS_LIN)) + return 0; + + return 1; + } + + return 0; +} + +int iupMatrixAuxIsCellVisible(Ihandle* ih, int lin, int col) +{ + if(((lin >= ih->data->lines.first) && + (lin <= ih->data->lines.last) && + (col >= ih->data->columns.first) && + (col <= ih->data->columns.last))) + { + return 1; + } + + return 0; +} + +void iupMatrixAuxGetVisibleCellDim(Ihandle* ih, int lin, int col, int* x, int* y, int* w, int* h) +{ + int i; + + /* find the position where the column starts */ + *x = ih->data->columns.sizes[0]; + for(i = ih->data->columns.first; i < col; i++) + *x += ih->data->columns.sizes[i]; + + /* find the column size */ + *w = ih->data->columns.sizes[col] - 1; + + /* find the position where the line starts */ + *y = ih->data->lines.sizes[0]; + for(i = ih->data->lines.first; i < lin; i++) + *y += ih->data->lines.sizes[i]; + + /* find the line size */ + *h = ih->data->lines.sizes[lin] - 1; +} + +/* Calculate the size, in pixels, of the invisible columns/lines, + the left/above of the first column/line. + In fact the start position of the visible area. + Depends on the first visible column/line. + -> m : choose will operate on lines or columns [IMAT_PROCESS_LIN|IMAT_PROCESS_COL] +*/ +void iupMatrixAuxUpdateVisiblePos(Ihandle* ih, int m) +{ + char* POS; + int i, sb, visible_pos; + ImatLinColData *p; + + if (m == IMAT_PROCESS_LIN) + { + p = &(ih->data->lines); + sb = IUP_SB_VERT; + POS = "POSY"; + } + else + { + p = &(ih->data->columns); + sb = IUP_SB_HORIZ; + POS = "POSX"; + } + + visible_pos = 0; + for(i = 1; i < p->first; i++) + visible_pos += p->sizes[i]; + + if (ih->data->canvas.sb & sb) + { + float pos; + + if (p->total_size) + { + while ((visible_pos + p->visible_size > p->total_size) && p->first>1) + { + /* invalid position, must recalculate first */ + p->first--; + visible_pos -= p->sizes[p->first]; + } + + pos = (float)visible_pos/(float)p->total_size; + } + else + pos = 0; + + iupMatrixAuxUpdateLast(p); + IupSetfAttribute(ih, POS, "%.5f", (double)pos); + } + else + iupMatrixAuxUpdateLast(p); +} + +/* Calculate which is the last visible column/line of the matrix. + Depends on the first visible column/line. */ +void iupMatrixAuxUpdateLast(ImatLinColData *p) +{ + int i, sum = 0; + + if (p->visible_size > 0) + { + /* Find which is the last column/line + Start in the first visible and continue adding the widths + up to the visible size */ + for(i = p->first; i < p->num; i++) + { + sum += p->sizes[i]; + if(sum >= p->visible_size) + break; + } + + if (i == p->num) + p->last = i-1; + else + p->last = i; + } + else + { + /* There is no space for any column, set the last column as 0 */ + p->last = 0; + } +} + +int iupMatrixAuxGetColumnWidth(Ihandle* ih, int col) +{ + int width = 0, pixels = 0; + char* str = iupStrGetMemory(100); + char* value; + + /* can only be called for valid columns */ + + sprintf(str, "WIDTH%d", col); + value = iupAttribGet(ih, str); + if (!value) + { + sprintf(str, "RASTERWIDTH%d", col); + value = iupAttribGet(ih, str); + if (value) + pixels = 1; + } + + if (!value) + { + /* Use the titles to define the size */ + if (col == 0) + { + if (!ih->data->callback_mode || ih->data->use_title_size) + { + /* find the largest title */ + int lin, max_width = 0; + for(lin = 0; lin < ih->data->lines.num; lin++) + { + char* title_value = iupMatrixCellGetValue(ih, lin, 0); + if (title_value) + { + iupdrvFontGetMultiLineStringSize(ih, title_value, &width, NULL); + if (width > max_width) + max_width = width; + } + } + width = max_width; + } + } + else if (ih->data->use_title_size) + { + char* title_value = iupMatrixCellGetValue(ih, 0, col); + if (title_value) + iupdrvFontGetMultiLineStringSize(ih, title_value, &width, NULL); + } + if (width) + return width + IMAT_PADDING_W + IMAT_FRAME_W; + + if (col != 0) + value = iupAttribGetStr(ih, "WIDTHDEF"); + } + + if (iupStrToInt(value, &width)) + { + if (width <= 0) + return 0; + else + { + if (pixels) + return width + IMAT_PADDING_W + IMAT_FRAME_W; + else + { + int charwidth; + iupdrvFontGetCharSize(ih, &charwidth, NULL); + return iupWIDTH2RASTER(width, charwidth) + IMAT_PADDING_W + IMAT_FRAME_W; + } + } + } + return 0; +} + +int iupMatrixAuxGetLineHeight(Ihandle* ih, int lin) +{ + int height = 0, pixels = 0; + char* str = iupStrGetMemory(100); + char* value; + + /* can only be called for valid lines */ + + sprintf(str, "HEIGHT%d", lin); + value = iupAttribGet(ih, str); + if(!value) + { + sprintf(str, "RASTERHEIGHT%d", lin); + value = iupAttribGet(ih, str); + if(value) + pixels = 1; + } + + if (!value) + { + /* Use the titles to define the size */ + if (lin == 0) + { + if (!ih->data->callback_mode || ih->data->use_title_size) + { + /* find the highest title */ + int col, max_height = 0; + for(col = 0; col < ih->data->columns.num; col++) + { + char* title_value = iupMatrixCellGetValue(ih, 0, col); + if (title_value && title_value[0]) + { + iupdrvFontGetMultiLineStringSize(ih, title_value, NULL, &height); + if (height > max_height) + max_height = height; + } + } + height = max_height; + } + } + else if (ih->data->use_title_size) + { + char* title_value = iupMatrixCellGetValue(ih, lin, 0); + if (title_value && title_value[0]) + iupdrvFontGetMultiLineStringSize(ih, title_value, NULL, &height); + } + if (height) + return height + IMAT_PADDING_H + IMAT_FRAME_H; + + if (lin != 0) + value = iupAttribGetStr(ih, "HEIGHTDEF"); + } + + if (iupStrToInt(value, &height)) + { + if (height <= 0) + return 0; + else + { + if (pixels) + return height + IMAT_PADDING_H + IMAT_FRAME_H; + else + { + int charheight; + iupdrvFontGetCharSize(ih, NULL, &charheight); + return iupHEIGHT2RASTER(height, charheight) + IMAT_PADDING_H + IMAT_FRAME_H; + } + } + } + return 0; +} + +/* Fill the sizes vector with the width/heigh of all the columns/lines. + Calculate the value of total_size */ +static void iMatrixAuxFillSizeVec(Ihandle* ih, int m) +{ + int i; + ImatLinColData *p; + + if (m == IMAT_PROCESS_LIN) + p = &(ih->data->lines); + else + p = &(ih->data->columns); + + /* Calculate total width/height of the matrix and the width/height of each column */ + p->total_size = 0; + for(i = 0; i < p->num; i++) + { + if (m == IMAT_PROCESS_LIN) + p->sizes[i] = iupMatrixAuxGetLineHeight(ih, i); + else + p->sizes[i] = iupMatrixAuxGetColumnWidth(ih, i); + + if (i > 0) + p->total_size += p->sizes[i]; + } +} + +static void iMatrixAuxUpdateVisibleSize(Ihandle* ih, int m) +{ + char* D; + ImatLinColData *p; + int canvas_size; + + if (m == IMAT_PROCESS_LIN) + { + D = "DY"; + p = &(ih->data->lines); + canvas_size = ih->data->h; + } + else + { + D = "DX"; + p = &(ih->data->columns); + canvas_size = ih->data->w; + } + + /* Matrix useful area is the current size minus the title area */ + p->visible_size = canvas_size - p->sizes[0]; + if (p->visible_size > p->total_size) + p->visible_size = p->total_size; + + if (p->total_size) + IupSetfAttribute(ih, D, "%f", (double)p->visible_size/(double)p->total_size); + else + IupSetAttribute(ih, D, "1.0"); +} + +void iupMatrixAuxCalcSizes(Ihandle* ih) +{ + iMatrixAuxFillSizeVec(ih, IMAT_PROCESS_COL); + iMatrixAuxFillSizeVec(ih, IMAT_PROCESS_LIN); + + iMatrixAuxUpdateVisibleSize(ih, IMAT_PROCESS_COL); + iMatrixAuxUpdateVisibleSize(ih, IMAT_PROCESS_LIN); + + /* when removing lines the first can be positioned after the last line */ + if (ih->data->lines.first > ih->data->lines.num-1) + { + if (ih->data->lines.num==1) + ih->data->lines.first = 1; + else + ih->data->lines.first = ih->data->lines.num-1; + } + if (ih->data->columns.first > ih->data->columns.num-1) + { + if (ih->data->columns.num == 1) + ih->data->columns.first = 1; + else + ih->data->columns.first = ih->data->columns.num-1; + } + + iupMatrixAuxUpdateVisiblePos(ih, IMAT_PROCESS_COL); + iupMatrixAuxUpdateVisiblePos(ih, IMAT_PROCESS_LIN); + + ih->data->need_calcsize = 0; +} + +int iupMatrixAuxGetLinColFromXY(Ihandle* ih, int x, int y, int* l, int* c) +{ + int size, lin, col; + + size = ih->data->columns.sizes[0]; /* always visible when non zero */ + if (x < size) + col = 0; /* It is in the column of titles */ + else + { + for(col = ih->data->columns.first; col <= ih->data->columns.last; col++) /* for all visible columns */ + { + size += ih->data->columns.sizes[col]; + if (x < size) + break; + } + if (col > ih->data->columns.last) + col = -1; + } + + size = ih->data->lines.sizes[0]; /* always visible when non zero */ + if (y < size) + lin = 0; /* It is in the line of titles */ + else + { + for(lin = ih->data->lines.first; lin <= ih->data->lines.last; lin++) /* for all visible lines */ + { + size += ih->data->lines.sizes[lin]; + if (y < size) + break; + } + if(lin > ih->data->lines.last) + lin = -1; + } + + if (col == -1 || lin == -1) + return 0; + + *l = lin; + *c = col; + return 1; +} + +int iupMatrixAuxCallLeaveCellCb(Ihandle* ih) +{ + IFnii cb = (IFnii)IupGetCallback(ih, "LEAVEITEM_CB"); + if(cb) + return cb(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell); + return IUP_DEFAULT; +} + +void iupMatrixAuxCallEnterCellCb(Ihandle* ih) +{ + IFnii cb = (IFnii)IupGetCallback(ih, "ENTERITEM_CB"); + if (cb) + cb(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell); +} + +int iupMatrixAuxCallEditionCbLinCol(Ihandle* ih, int lin, int col, int mode, int update) +{ + IFniiii cb; + + if (iupAttribGetBoolean(ih, "READONLY")) + return IUP_IGNORE; + + cb = (IFniiii)IupGetCallback(ih, "EDITION_CB"); + if(cb) + return cb(ih, lin, col, mode, update); + return IUP_DEFAULT; +} diff --git a/iup/srccontrols/matrix/iupmat_aux.h b/iup/srccontrols/matrix/iupmat_aux.h new file mode 100755 index 0000000..296c1f5 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_aux.h @@ -0,0 +1,37 @@ +/** \file + * \brief iupmatrix control + * auxiliary functions. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_AUX_H +#define __IUPMAT_AUX_H + +#ifdef __cplusplus +extern "C" { +#endif + +int iupMatrixAuxIsCellFullVisible(Ihandle* ih, int lin, int col); +int iupMatrixAuxIsCellVisible(Ihandle* ih, int lin, int col); +void iupMatrixAuxGetVisibleCellDim (Ihandle* ih, int lin, int col, int* x, int* y, int* w, int* h); + +void iupMatrixAuxCalcSizes(Ihandle* ih); + +void iupMatrixAuxUpdateVisiblePos(Ihandle* ih, int m); +void iupMatrixAuxUpdateLast(ImatLinColData *p); + +int iupMatrixAuxGetColumnWidth(Ihandle* ih, int col); +int iupMatrixAuxGetLineHeight (Ihandle* ih, int lin); + +int iupMatrixAuxGetLinColFromXY (Ihandle* ih, int x, int y, int* l, int* c); + +int iupMatrixAuxCallLeaveCellCb (Ihandle* ih); +void iupMatrixAuxCallEnterCellCb (Ihandle* ih); +int iupMatrixAuxCallEditionCbLinCol(Ihandle* ih, int lin, int col, int mode, int update); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_cd.h b/iup/srccontrols/matrix/iupmat_cd.h new file mode 100755 index 0000000..1a10f2b --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_cd.h @@ -0,0 +1,25 @@ +/** \file + * \brief iupmatrix. CD help macros. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_CD_H +#define __IUPMAT_CD_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define IUPMAT_LINE(_ih,_x1,_y1,_x2,_y2) cdCanvasLine((_ih)->data->cddbuffer, (_x1), iupMatrixInvertYAxis(_ih, _y1), (_x2), iupMatrixInvertYAxis(_ih, _y2)) +#define IUPMAT_VERTEX(_ih,_x,_y) cdCanvasVertex((_ih)->data->cddbuffer, (_x), iupMatrixInvertYAxis(_ih, _y)) +#define IUPMAT_BOX(_ih,_xmin,_xmax,_ymin,_ymax) cdCanvasBox((_ih)->data->cddbuffer, (_xmin), (_xmax), iupMatrixInvertYAxis(_ih, _ymin), iupMatrixInvertYAxis(_ih, _ymax)) +#define IUPMAT_RECT(_ih,_xmin,_xmax,_ymin,_ymax) cdCanvasRect((_ih)->data->cddbuffer, (_xmin), (_xmax), iupMatrixInvertYAxis(_ih, _ymin), iupMatrixInvertYAxis(_ih, _ymax)) +#define IUPMAT_CLIPAREA(_ih,_xmin,_xmax,_ymin,_ymax) cdCanvasClipArea((_ih)->data->cddbuffer, (_xmin), (_xmax), iupMatrixInvertYAxis(_ih, _ymin), iupMatrixInvertYAxis(_ih, _ymax)) +#define IUPMAT_TEXT(_ih,_x,_y,_text) cdCanvasText((_ih)->data->cddbuffer, (_x), iupMatrixInvertYAxis(_ih, _y), (_text)) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_colres.c b/iup/srccontrols/matrix/iupmat_colres.c new file mode 100755 index 0000000..d44b7df --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_colres.c @@ -0,0 +1,182 @@ +/** \file + * \brief iupmatrix column resize + * + * See Copyright Notice in "iup.h" + */ + +/**************************************************************************/ +/* Interactive Column Resize Functions and WIDTH/HEIGHT change */ +/**************************************************************************/ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" + +#include "iupmat_def.h" +#include "iupmat_colres.h" +#include "iupmat_draw.h" + + +#define IMAT_COLRES_TOL 3 +#define IMAT_RESIZE_COLOR 0x666666L + + +/* Verify if the mouse is in the intersection between two of column titles, + if so the resize is started */ +int iupMatrixColResStart(Ihandle* ih, int x, int y) +{ + if (ih->data->lines.sizes[0] && y < ih->data->lines.sizes[0] && iupAttribGetBoolean(ih, "RESIZEMATRIX")) + { + int size, col; + + /* Check if is the column of titles */ + size = ih->data->columns.sizes[0]; + if (abs(size-x) < IMAT_COLRES_TOL) + { + ih->data->colres_drag_col_start_x = 0; + ih->data->colres_dragging = 1; + ih->data->colres_drag_col_last_x = -1; + ih->data->colres_drag_col = 0; + return 1; + } + else + { + /* find the column */ + for(col = ih->data->columns.first; col <= ih->data->columns.last; col++) + { + ih->data->colres_drag_col_start_x = size; + size += ih->data->columns.sizes[col]; + if (abs(size-x) < IMAT_COLRES_TOL) + { + ih->data->colres_dragging = 1; + ih->data->colres_drag_col_last_x = -1; + ih->data->colres_drag_col = col; + return 1; + } + } + } + } + return 0; +} + +void iupMatrixColResFinish(Ihandle* ih, int x) +{ + char str[100]; + int width = x - ih->data->colres_drag_col_start_x; + if (width < 0) + width = 0; + + /* delete feedback */ + if (ih->data->colres_drag_col_last_x != -1) + { + int y1 = ih->data->lines.sizes[0]; /* from the bottom of the line of titles */ + int y2 = ih->data->h-1; /* to the bottom of the matrix */ + + cdCanvasWriteMode(ih->data->cdcanvas, CD_XOR); + cdCanvasForeground(ih->data->cdcanvas, IMAT_RESIZE_COLOR); + cdCanvasLine(ih->data->cdcanvas, ih->data->colres_drag_col_last_x, iupMatrixInvertYAxis(ih, y1), + ih->data->colres_drag_col_last_x, iupMatrixInvertYAxis(ih, y2)); + cdCanvasWriteMode(ih->data->cdcanvas, CD_REPLACE); + } + + ih->data->colres_dragging = 0; + + sprintf(str, "RASTERWIDTH%d", ih->data->colres_drag_col); + iupAttribSetInt(ih, str, width-IMAT_PADDING_W-IMAT_FRAME_W); + sprintf(str, "WIDTH%d", ih->data->colres_drag_col); + iupAttribSetStr(ih, str, NULL); + + ih->data->need_calcsize = 1; + iupMatrixDraw(ih, 0); +} + +/* Change the column width interactively, just change the line in the screen. + When the user finishes the drag, the iupMatrixColResFinish function is called + to truly change the column width. */ +void iupMatrixColResMove(Ihandle* ih, int x) +{ + int y1, y2; + + int width = x - ih->data->colres_drag_col_start_x; + if (width < 0) + return; + + y1 = ih->data->lines.sizes[0]; /* from the bottom of the line of titles */ + y2 = ih->data->h-1; /* to the bottom of the matrix */ + + cdCanvasWriteMode(ih->data->cdcanvas, CD_XOR); + cdCanvasForeground(ih->data->cdcanvas, IMAT_RESIZE_COLOR); + + /* If it is not the first time, move old line */ + if (ih->data->colres_drag_col_last_x != -1) + { + cdCanvasLine(ih->data->cdcanvas, ih->data->colres_drag_col_last_x, iupMatrixInvertYAxis(ih, y1), + ih->data->colres_drag_col_last_x, iupMatrixInvertYAxis(ih, y2)); + } + + cdCanvasLine(ih->data->cdcanvas, x, iupMatrixInvertYAxis(ih, y1), + x, iupMatrixInvertYAxis(ih, y2)); + + ih->data->colres_drag_col_last_x = x; + cdCanvasWriteMode(ih->data->cdcanvas, CD_REPLACE); +} + + +static void iMatrixColResResetMatrixCursor(Ihandle* ih) +{ + char *cursor = iupAttribGet(ih, "_IUPMAT_CURSOR"); + if (cursor) + { + IupStoreAttribute(ih, "CURSOR", cursor); + iupAttribSetStr(ih, "_IUPMAT_CURSOR", NULL); + } +} + +/* Change the cursor when it passes over a group of the column titles. */ +void iupMatrixColResCheckChangeCursor(Ihandle* ih, int x, int y) +{ + if(ih->data->lines.sizes[0] && y < ih->data->lines.sizes[0] && iupAttribGetBoolean(ih, "RESIZEMATRIX")) + { + /* It is in the column titles area and the resize mode is on */ + int found = 0, size, col; + + size = ih->data->columns.sizes[0]; + if (abs(size - x) < IMAT_COLRES_TOL) + found = 1; /* line titles */ + else + { + for(col = ih->data->columns.first; col <= ih->data->columns.last && !found; col++) + { + size += ih->data->columns.sizes[col]; + if(abs(size - x) < IMAT_COLRES_TOL) + found = 1; + } + } + + if (found) + { + if (!iupAttribGet(ih, "_IUPMAT_CURSOR")) + iupAttribStoreStr(ih, "_IUPMAT_CURSOR", IupGetAttribute(ih, "CURSOR")); + IupSetAttribute(ih, "CURSOR", "RESIZE_W"); + } + else /* It is in the empty area after the last column */ + iMatrixColResResetMatrixCursor(ih); + } + else + iMatrixColResResetMatrixCursor(ih); +} + +int iupMatrixColResIsResizing(Ihandle* ih) +{ + return ih->data->colres_dragging; +} + diff --git a/iup/srccontrols/matrix/iupmat_colres.h b/iup/srccontrols/matrix/iupmat_colres.h new file mode 100755 index 0000000..ba7f23d --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_colres.h @@ -0,0 +1,24 @@ +/** \file + * \brief iupmatrix column resize. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_COLRES_H +#define __IUPMAT_COLRES_H + +#ifdef __cplusplus +extern "C" { +#endif + +int iupMatrixColResStart (Ihandle* ih, int x, int y); +void iupMatrixColResFinish (Ihandle* ih, int x); +void iupMatrixColResMove (Ihandle* ih, int x); +void iupMatrixColResCheckChangeCursor(Ihandle* ih, int x, int y); +int iupMatrixColResIsResizing (Ihandle* ih); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_def.h b/iup/srccontrols/matrix/iupmat_def.h new file mode 100755 index 0000000..d45acde --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_def.h @@ -0,0 +1,122 @@ +/** \file + * \brief iupmatrix. definitions. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_DEF_H +#define __IUPMAT_DEF_H + +#ifdef __cplusplus +extern "C" { +#endif + + +#define IMAT_PROCESS_COL 1 /* Process the columns */ +#define IMAT_PROCESS_LIN 2 /* Process the lines */ + +/***************************************************************************/ +/* Decoration size in pixels */ +/***************************************************************************/ +#define IMAT_PADDING_W 6 +#define IMAT_PADDING_H 6 +#define IMAT_FRAME_W 2 +#define IMAT_FRAME_H 2 + +/* Cell flags */ +#define IUPMAT_FONT 1 /* Has FONTL:C attribute */ +#define IUPMAT_FGCOLOR 2 /* Has FGCOLORL:C attribute */ +#define IUPMAT_BGCOLOR 4 /* Has BGCOLORL:C attribute */ +#define IUPMAT_MARK 8 /* Is marked */ +#define IUPMAT_FRAMEHCOLOR 16 /* Has FRAMEHORIZCOLORL:C */ +#define IUPMAT_FRAMEVCOLOR 32 /* Has FRAMEVERTCOLORL:C */ + +/***************************************************************************/ +/* Structures stored in each matrix */ +/***************************************************************************/ +typedef struct _ImatCell +{ + char *value; /* Cell value */ + unsigned char flags; +} ImatCell; + + +typedef struct _ImatLinColData +{ + int* sizes; /* Width/height of the columns/lines (allocated after map) */ + unsigned char* flags; /* Attribute flags for the columns/lines (allocated after map) */ + + int num; /* Number of columns/lines in the matrix, default/minimum=1, always includes the title */ + int num_alloc; /* Number of columns/lines allocated, default=5 */ + + int first; /* First visible column/line */ + int last; /* Last visible column/line */ + + /* used to configure the scrollbar */ + int total_size; /* Sum of the widths/heights of the columns/lines, not including the title */ + int visible_size; /* Width/height of the visible window, not including the title */ + + int focus_cell; /* index of the current cell */ +} ImatLinColData; + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + + ImatCell** cells; /* Cell value, this will be NULL if in callback mode (allocated after map) */ + + Ihandle* texth; /* Text handle */ + Ihandle* droph; /* Dropdown handle */ + Ihandle* datah; /* Current active edition element, may be equal to texth or droph */ + + cdCanvas* cddbuffer; + cdCanvas* cdcanvas; + + ImatLinColData lines; + ImatLinColData columns; + + int has_focus; + int w, h; /* canvas size */ + int callback_mode; + int use_title_size; /* use title contents when calculating cell size */ + int need_calcsize; + int first_redraw; + + /* attributes */ + int mark_continuous, mark_mode, mark_multiple; + int checkframecolor; + + /* Mouse and Keyboard AUX */ + int leftpressed; /* left mouse button is pressed */ + int homekeycount, endkeycount; /* numbers of times that key was pressed */ + + /* ColRes AUX */ + int colres_dragging, /* indicates if it is being made a column resize */ + colres_drag_col, /* column being resized */ + colres_drag_col_start_x, /* position of the start of the column being resized */ + colres_drag_col_last_x; /* previous position */ + + /* Mark AUX */ + int mark_lin1, mark_col1, /* used to store the start cell when a block is being marked */ + mark_lin2, mark_col2, /* used to store the end cell when a block was marked */ + mark_full1, /* indicate if full lines or columns is being selected */ + mark_full2; + + /* Draw AUX, valid only after iupMatrixPrepareDrawData */ + sIFnii font_cb; + IFniiIII fgcolor_cb; + IFniiIII bgcolor_cb; + char *bgcolor, *bgcolor_parent, *fgcolor, *font; /* not need to free */ +}; + + +int iupMatrixIsValid(Ihandle* ih, int check_cells); + +#define iupMatrixInvertYAxis(_ih, _y) ((_ih)->data->h-1 - (_y)) + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_draw.c b/iup/srccontrols/matrix/iupmat_draw.c new file mode 100755 index 0000000..7c53fb5 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_draw.c @@ -0,0 +1,866 @@ +/** \file + * \brief iupmatrix control + * draw functions + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#undef CD_NO_OLD_INTERFACE + +#include "iup.h" +#include "iupcbs.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_controls.h" +#include "iup_cdutil.h" +#include "iup_image.h" + +#include "iupmat_def.h" +#include "iupmat_cd.h" +#include "iupmat_draw.h" +#include "iupmat_aux.h" +#include "iupmat_getset.h" +#include "iupmat_mark.h" + + +/* Color attenuation factor in a marked cell, 20% darker */ +#define IMAT_ATENUATION(_x) ((unsigned char)(((_x)*8)/10)) + +/* Text alignment that will be draw. Used by iMatrixDrawCellValue */ +#define IMAT_T_CENTER 1 +#define IMAT_T_LEFT 2 +#define IMAT_T_RIGHT 3 + +#define IMAT_CD_INACTIVE_FGCOLOR 0x666666L + +#define IMAT_COMBOBOX_W 16 + + +typedef int (*IFniiiiiiC)(Ihandle *h, int lin, int col,int x1, int x2, int y1, int y2, cdCanvas* cnv); + + +/**************************************************************************/ +/* Private functions */ +/**************************************************************************/ + + +static int iMatrixDrawGetColAlignment(Ihandle* ih, int col, char* str) +{ + char* align; + sprintf(str, "ALIGNMENT%d", col); + align = iupAttribGet(ih, str); + if (!align) + { + if (col == 0) + return IMAT_T_LEFT; + else + return IMAT_T_CENTER; + } + else if (iupStrEqualNoCase(align, "ARIGHT")) + return IMAT_T_RIGHT; + else if(iupStrEqualNoCase(align, "ACENTER")) + return IMAT_T_CENTER; + else + return IMAT_T_LEFT; +} + +static int iMatrixDrawCallDrawCB(Ihandle* ih, int lin, int col, int x1, int x2, int y1, int y2, IFniiiiiiC draw_cb) +{ + int ret; + cdCanvas* old_cnv; + + IUPMAT_CLIPAREA(ih, x1, x2, y1, y2); + cdCanvasClip(ih->data->cddbuffer, CD_CLIPAREA); + + old_cnv = cdActiveCanvas(); + if (old_cnv != ih->data->cddbuffer) /* backward compatibility code */ + cdActivate(ih->data->cddbuffer); + + ret = draw_cb(ih, lin, col, x1, x2, iupMatrixInvertYAxis(ih, y1), iupMatrixInvertYAxis(ih, y2), ih->data->cddbuffer); + + cdCanvasClip(ih->data->cddbuffer, CD_CLIPOFF); + + if (old_cnv && old_cnv != ih->data->cddbuffer) /* backward compatibility code */ + { + cdActivate(old_cnv); + cdCanvasActivate(ih->data->cddbuffer); + } + + if (ret == IUP_DEFAULT) + return 0; + + return 1; +} + +/* Change the CD foreground color, for the selected color to draw a cell with + its FOREGROUND COLOR. This involves checking if there is a color attribute + that cell. If no, uses a color attribute for the line, else if no for the + column, else if no for the entire matrix. Finally, if not find any of + these, use the default color. + -> lin, col - cell coordinates, in IUP format - i.e., l,l represents the left + top cell of the matrix; lin and col values = 0 represents the + title lines and columns. + -> mark - indicate if a cell is marked. If yes, its color is attenuated. +*/ +static unsigned long iMatrixDrawSetFgColor(Ihandle* ih, int lin, int col, int mark) +{ + unsigned char r = 0, g = 0, b = 0; + iupMatrixGetFgRGB(ih, lin, col, &r, &g, &b); + + if (mark) + { + r = IMAT_ATENUATION(r); + g = IMAT_ATENUATION(g); + b = IMAT_ATENUATION(b); + } + + return cdCanvasForeground(ih->data->cddbuffer, cdEncodeColor(r, g, b)); +} + +/* Change the CD foreground color, for the selected color to draw a cell with + its BACKGROUND COLOR. This involves checking if there is a color attribute + that cell. If no, uses a color attribute for the line, else if no for the + column, else if no for the entire matrix. Finally, if not find any of + these, use the default color. + -> lin, col - cell coordinates, in IUP format - i.e., l,l represents the left + top cell of the matrix; lin and col values = 0 represents the + title lines and columns. + -> mark - indicate if a cell is marked. If yes, its color is attenuated. +*/ +static unsigned long iMatrixDrawSetBgColor(Ihandle* ih, int lin, int col, int mark, int active) +{ + unsigned char r = 255, g = 255, b = 255; + + iupMatrixGetBgRGB(ih, lin, col, &r, &g, &b); + + if (mark) + { + r = IMAT_ATENUATION(r); + g = IMAT_ATENUATION(g); + b = IMAT_ATENUATION(b); + } + + if (!active) + { + r = cdIupLIGTHER(r); + g = cdIupLIGTHER(g); + b = cdIupLIGTHER(b); + } + + return cdCanvasForeground(ih->data->cddbuffer, cdEncodeColor(r, g, b)); +} + +static void iMatrixDrawFrameHorizLineCell(Ihandle* ih, int lin, int col, int x1, int x2, int y, long framecolor, char* str) +{ + if (ih->data->checkframecolor && (ih->data->callback_mode || ih->data->cells[lin][col].flags & IUPMAT_FRAMEHCOLOR)) + { + unsigned char r,g,b; + sprintf(str, "FRAMEHORIZCOLOR%d:%d", lin, col); + if (iupStrToRGB(iupAttribGet(ih, str), &r, &g, &b)) + framecolor = cdEncodeColor(r, g, b); + } + + cdCanvasForeground(ih->data->cddbuffer, framecolor); + IUPMAT_LINE(ih, x1, y, x2, y); /* bottom horizontal line */ +} + +static void iMatrixDrawFrameVertLineCell(Ihandle* ih, int lin, int col, int x, int y1, int y2, long framecolor, char* str) +{ + if (ih->data->checkframecolor && (ih->data->callback_mode || ih->data->cells[lin][col].flags & IUPMAT_FRAMEVCOLOR)) + { + unsigned char r,g,b; + sprintf(str, "FRAMEVERTCOLOR%d:%d", lin, col); + if (iupStrToRGB(iupAttribGet(ih, str), &r, &g, &b)) + framecolor = cdEncodeColor(r, g, b); + } + + cdCanvasForeground(ih->data->cddbuffer, framecolor); + IUPMAT_LINE(ih, x, y1, x, y2); /* right vertical line */ +} + +static void iMatrixDrawFrameRectTitle(Ihandle* ih, int lin, int col, int x1, int x2, int y1, int y2, long framecolor, char* str) +{ + /* avoid drawing over the frame of the next cell */ + x2 -= IMAT_FRAME_W/2; + y2 -= IMAT_FRAME_H/2; + + iMatrixDrawFrameVertLineCell(ih, lin, col, x2, y1, y2, framecolor, str); /* right vertical line */ + if (col==0) + { + IUPMAT_LINE(ih, x1, y1, x1, y2); /* left vertical line, reuse Foreground */ + x1++; + } + else if (col==1 && ih->data->columns.sizes[0] == 0) + { + /* If does not have line titles then draw the left line of the cell frame */ + IUPMAT_LINE(ih, x1, y1, x1, y2-1); + x1++; + } + + cdCanvasForeground(ih->data->cddbuffer, CD_WHITE); /* Titles have a white line near the frame */ + IUPMAT_LINE(ih, x1, y1+1, x1, y2-1); + + iMatrixDrawFrameHorizLineCell(ih, lin, col, x1, x2, y2, framecolor, str); /* bottom horizontal line */ + if (lin==0) + { + IUPMAT_LINE(ih, x1, y1, x2, y1); /* top horizontal line, reuse Foreground */ + y1++; + } + else if (lin==1 && ih->data->lines.sizes[0] == 0) + { + /* If does not have column titles then draw the top line of the cell frame */ + IUPMAT_LINE(ih, x1, y1, x2-1, y1); + y1++; + } + + cdCanvasForeground(ih->data->cddbuffer, CD_WHITE); /* Titles have a white line near the frame */ + IUPMAT_LINE(ih, x1, y1, x2-1, y1); +} + +static void iMatrixDrawFrameRectCell(Ihandle* ih, int lin, int col, int x1, int x2, int y1, int y2, long framecolor, char* str) +{ + if (col==1 && ih->data->columns.sizes[0] == 0) + { + /* If does not have line titles then draw the left line of the cell frame */ + iMatrixDrawFrameVertLineCell(ih, lin, col, x1, y1, y2-1-1, framecolor, str); + } + + if (lin==1 && ih->data->lines.sizes[0] == 0) + { + /* If does not have column titles then draw the top line of the cell frame */ + iMatrixDrawFrameHorizLineCell(ih, lin, col, x1, x2-1-1, y1, framecolor, str); + } + + /* bottom line */ + iMatrixDrawFrameHorizLineCell(ih, lin, col, x1, x2-1, y2-1, framecolor, str); + + /* rigth line */ + iMatrixDrawFrameVertLineCell(ih, lin, col, x2-1, y1, y2-1, framecolor, str); +} + +static int iMatrixDrawSortSign(Ihandle* ih, int x2, int y1, int y2, int col, int active, char* str) +{ + int yc; + char* sort; + + sprintf(str, "SORTSIGN%d", col); + sort = iupAttribGet(ih, str); + if (!sort || iupStrEqualNoCase(sort, "NO")) + return 0; + + /* Remove the space between text and cell frame */ + x2 -= IMAT_PADDING_W/2 + IMAT_FRAME_W/2; + + /* Set the color used to draw the text */ + if (active) + cdCanvasForeground(ih->data->cddbuffer, IMAT_CD_INACTIVE_FGCOLOR); + else + iMatrixDrawSetFgColor(ih, 0, col, 0); + + yc = (int)( (y1 + y2 ) / 2.0 - .5); + + cdCanvasBegin(ih->data->cddbuffer, CD_FILL); + + if (iupStrEqualNoCase(sort, "DOWN")) + { + IUPMAT_VERTEX(ih, x2 - 5, yc + 2); + IUPMAT_VERTEX(ih, x2 - 1, yc - 2); + IUPMAT_VERTEX(ih, x2 - 9, yc - 2); + } + else + { + IUPMAT_VERTEX(ih, x2 - 1, yc + 2); + IUPMAT_VERTEX(ih, x2 - 9, yc + 2); + IUPMAT_VERTEX(ih, x2 - 5, yc - 2); + } + + cdCanvasEnd(ih->data->cddbuffer); + return 1; +} + +static void iMatrixDrawComboFeedback(Ihandle* ih, int x2, int y1, int y2, int active, long framecolor) +{ + int xh2, yh2, x1; + + /* feedback area */ + x2 -= IMAT_PADDING_W/2 + IMAT_FRAME_W/2; + x1 = x2 - IMAT_COMBOBOX_W; + y1 += IMAT_PADDING_H/2 + IMAT_FRAME_H/2; + y2 -= IMAT_PADDING_H/2 + IMAT_FRAME_H/2; + + /* feedback background */ + iMatrixDrawSetBgColor(ih, 0, 0, 0, active); + IUPMAT_BOX(ih, x1, x2, y1, y2); + + /* feedback frame */ + cdCanvasForeground(ih->data->cddbuffer, framecolor); + IUPMAT_RECT(ih, x1, x2, y1, y2); + + /* feedback arrow */ + xh2 = x2 - IMAT_COMBOBOX_W / 2; + yh2 = y2 - (y2 - y1) / 2; + + cdCanvasBegin(ih->data->cddbuffer, CD_FILL); + IUPMAT_VERTEX(ih, xh2, yh2 + 3); + IUPMAT_VERTEX(ih, xh2 + 4, yh2 - 1); + IUPMAT_VERTEX(ih, xh2 - 4, yh2 - 1); + cdCanvasEnd(ih->data->cddbuffer); +} + +static void iMatrixDrawBackground(Ihandle* ih, int x1, int x2, int y1, int y2, int marked, int active, int lin, int col) +{ + /* avoid drawing over the frame of the next cell */ + x2 -= IMAT_FRAME_W/2; + y2 -= IMAT_FRAME_H/2; + + iMatrixDrawSetBgColor(ih, lin, col, marked, active); + IUPMAT_BOX(ih, x1, x2, y1, y2); +} + +/* Put the cell contents in the screen, using the specified color and alignment. + -> y1, y2 : vertical limits of the cell + -> x1, x2 : horizontal limits of the complete cell + -> alignment : alignment type (horizontal) assigned to the text. The options are: + [IMAT_T_CENTER,IMAT_T_LEFT,IMAT_T_RIGHT] + -> marked : mark state + -> lin, col - cell coordinates */ +static void iMatrixDrawCellValue(Ihandle* ih, int x1, int x2, int y1, int y2, int alignment, int marked, int active, int lin, int col, IFniiiiiiC draw_cb) +{ + char *text; + + /* avoid drawing over the frame of the next cell */ + x2 -= IMAT_FRAME_W/2; + y2 -= IMAT_FRAME_H/2; + + /* avoid drawing over the frame of the cell */ + x2 -= IMAT_FRAME_W/2; + y2 -= IMAT_FRAME_H/2; + + if (lin==0 || col==0) + { + /* avoid drawing over the frame of the cell */ + x1 += IMAT_FRAME_W/2; + y1 += IMAT_FRAME_H/2; + + if (col==0) x1 += IMAT_FRAME_W/2; + if (lin==0) y1 += IMAT_FRAME_H/2; + } + else if ((col==1 && ih->data->columns.sizes[0] == 0) || (lin==1 && ih->data->lines.sizes[0] == 0)) + { + /* avoid drawing over the frame of the cell */ + x1 += IMAT_FRAME_W/2; + y1 += IMAT_FRAME_H/2; + } + + if (draw_cb && !iMatrixDrawCallDrawCB(ih, lin, col, x1, x2, y1, y2, draw_cb)) + return; + + text = iupMatrixCellGetValue(ih, lin, col); + + /* Put the text */ + if (text && *text) + { + int num_line, line_height, total_height; + int charheight, ypos; + + num_line = iupStrLineCount(text); + iupdrvFontGetCharSize(ih, NULL, &charheight); + + line_height = charheight; + total_height = (line_height + IMAT_PADDING_H/2) * num_line - IMAT_PADDING_H/2 - IMAT_FRAME_H/2; + + if (lin==0) + { + int text_w; + iupdrvFontGetMultiLineStringSize(ih, text, &text_w, NULL); + if (text_w > x2 - x1 + 1 - IMAT_PADDING_W - IMAT_FRAME_W) + alignment = IMAT_T_LEFT; + } + + /* Set the color used to draw the text */ + if (!active) + cdCanvasForeground(ih->data->cddbuffer, IMAT_CD_INACTIVE_FGCOLOR); + else + iMatrixDrawSetFgColor(ih, lin, col, marked); + + /* Set the clip area to the cell region informed, the text maybe greatter than the cell */ + IUPMAT_CLIPAREA(ih, x1, x2, y1, y2); + cdCanvasClip(ih->data->cddbuffer, CD_CLIPAREA); + + cdCanvasNativeFont(ih->data->cddbuffer, iupMatrixGetFont(ih, lin, col)); + + /* Create an space between text and cell frame */ + x1 += IMAT_PADDING_W/2; x2 -= IMAT_PADDING_W/2; + y1 += IMAT_PADDING_H/2; y2 -= IMAT_PADDING_H/2; + + if (alignment == IMAT_T_CENTER) + cdCanvasTextAlignment(ih->data->cddbuffer, CD_CENTER); + else if(alignment == IMAT_T_LEFT) + cdCanvasTextAlignment(ih->data->cddbuffer, CD_WEST); + else + cdCanvasTextAlignment(ih->data->cddbuffer, CD_EAST); + + if (num_line == 1) + { + ypos = (int)((y1 + y2) / 2.0 - 0.5); + + /* Put the text */ + if (alignment == IMAT_T_CENTER) + IUPMAT_TEXT(ih, (x1 + x2) / 2, ypos, text); + else if(alignment == IMAT_T_LEFT) + IUPMAT_TEXT(ih, x1, ypos, text); + else + IUPMAT_TEXT(ih, x2, ypos, text); + } + else + { + int i; + char *p, *q, *newtext; + + newtext = iupStrDup(text); + p = newtext; + + /* Get the position of the first text to be put in the screen */ + ypos = (int)( (y1 + y2) / 2.0 - 0.5) - total_height/2 + line_height/2; + + for(i = 0; i < num_line; i++) + { + q = strchr(p, '\n'); + if (q) *q = 0; /* Cut the string to contain only one line */ + + /* Draw the text */ + if(alignment == IMAT_T_CENTER) + IUPMAT_TEXT(ih, (x1 + x2) / 2, ypos, p); + else if(alignment == IMAT_T_LEFT) + IUPMAT_TEXT(ih, x1, ypos, p); + else + IUPMAT_TEXT(ih, x2, ypos, p); + + /* Advance the string */ + if (q) p = q + 1; + + /* Advance a line */ + ypos += line_height + IMAT_PADDING_H/2; + } + + free(newtext); + } + + cdCanvasClip(ih->data->cddbuffer, CD_CLIPOFF); + } +} + +static void iMatrixDrawTitleCorner(Ihandle* ih) +{ + char str[100]; + long framecolor = cdIupConvertColor(iupAttribGetStr(ih, "FRAMECOLOR")); + int active = iupdrvIsActive(ih); + IFniiiiiiC draw_cb = (IFniiiiiiC)IupGetCallback(ih, "DRAW_CB"); + + iMatrixDrawBackground(ih, 0, ih->data->columns.sizes[0], 0, ih->data->lines.sizes[0], 0, active, 0, 0); + + iMatrixDrawFrameRectTitle(ih, 0, 0, 0, ih->data->columns.sizes[0], 0, ih->data->lines.sizes[0], framecolor, str); + + iMatrixDrawCellValue(ih, 0, ih->data->columns.sizes[0], 0, ih->data->lines.sizes[0], IMAT_T_CENTER, 0, active, 0, 0, draw_cb); +} + +static void iMatrixDrawMatrix(Ihandle* ih) +{ + iupMatrixPrepareDrawData(ih); + + /* fill the background because there will be empty cells */ + if ((ih->data->lines.num == 1) || (ih->data->columns.num == 1)) + { + cdCanvasBackground(ih->data->cddbuffer, cdIupConvertColor(ih->data->bgcolor_parent)); + cdCanvasClear(ih->data->cddbuffer); + } + + /* Draw the corner between line and column titles, if necessary */ + if (ih->data->lines.sizes[0] && ih->data->columns.sizes[0]) + iMatrixDrawTitleCorner(ih); + + /* If there are columns, then draw their titles */ + iupMatrixDrawColumnTitle(ih, ih->data->columns.first, ih->data->columns.last); + + /* If there are lines, then draw their titles */ + iupMatrixDrawLineTitle(ih, ih->data->lines.first, ih->data->lines.last); + + /* If there are cells in the matrix, then draw them */ + if ((ih->data->lines.num > 1) && (ih->data->columns.num > 1)) + iupMatrixDrawCells(ih, ih->data->lines.first, ih->data->columns.first, + ih->data->lines.last, ih->data->columns.last); +} + +static void iMatrixDrawFocus(Ihandle* ih) +{ + int x1, y1, x2, y2, dx, dy; + + if (iupAttribGetBoolean(ih, "HIDEFOCUS")) + return; + + if (!iupMatrixAuxIsCellVisible(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell)) + return; + + iupMatrixAuxGetVisibleCellDim(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell, &x1, &y1, &dx, &dy); + + x2 = x1 + dx - 1; + y2 = y1 + dy - 1; + + if (ih->data->columns.focus_cell == 1 && ih->data->columns.sizes[0] == 0) + x1++; + if (ih->data->lines.focus_cell == 1 && ih->data->lines.sizes[0] == 0) + y1++; + + cdIupDrawFocusRect(ih, ih->data->cdcanvas, x1, iupMatrixInvertYAxis(ih, y1), x2, iupMatrixInvertYAxis(ih, y2)); +} + + +/**************************************************************************/ +/* Exported functions */ +/**************************************************************************/ + + +/* Draw the line titles, visible, between lin and lastlin, include it. + Line titles marked will be draw with the appropriate feedback. + -> lin1 - First line to have its title drawn + -> lin2 - Last line to have its title drawn */ +void iupMatrixDrawLineTitle(Ihandle* ih, int lin1, int lin2) +{ + int x1, y1, x2, y2; + int lin, alignment, active; + char str[100]; + long framecolor; + IFniiiiiiC draw_cb; + + if (!ih->data->columns.sizes[0]) + return; + + if (lin1 > ih->data->lines.last || + lin2 < ih->data->lines.first) + return; + + if (lin1 < ih->data->lines.first) + lin1 = ih->data->lines.first; + if (lin2 > ih->data->lines.last) + lin2 = ih->data->lines.last; + + /* Start the position of the line title */ + x1 = 0; + x2 = ih->data->columns.sizes[0]; + + y1 = ih->data->lines.sizes[0]; + for(lin = ih->data->lines.first; lin < lin1; lin++) + y1 += ih->data->lines.sizes[lin]; + + framecolor = cdIupConvertColor(iupAttribGetStr(ih, "FRAMECOLOR")); + active = iupdrvIsActive(ih); + draw_cb = (IFniiiiiiC)IupGetCallback(ih, "DRAW_CB"); + + alignment = iMatrixDrawGetColAlignment(ih, 0, str); + + /* Draw the titles */ + for(lin = lin1; lin <= lin2; lin++) + { + /* If it is a hidden line (size = 0), don't draw the title */ + if(ih->data->lines.sizes[lin] == 0) + continue; + + y2 = y1 + ih->data->lines.sizes[lin]; + + /* If it doesn't have title, the loop just calculate the final position */ + if (ih->data->columns.sizes[0]) + { + int marked = iupMatrixLineIsMarked(ih, lin); + + iMatrixDrawBackground(ih, x1, x2, y1, y2, marked, active, lin, 0); + + iMatrixDrawFrameRectTitle(ih, lin, 0, x1, x2, y1, y2, framecolor, str); + + iMatrixDrawCellValue(ih, x1, x2, y1, y2, alignment, marked, active, lin, 0, draw_cb); + } + + y1 = y2; + } +} + +/* Draw the column titles, visible, between col and lastcol, include it. + Column titles marked will be draw with the appropriate feedback. + -> col1 - First column to have its title drawn + -> col2 - Last column to have its title drawn */ +void iupMatrixDrawColumnTitle(Ihandle* ih, int col1, int col2) +{ + int x1, y1, x2, y2; + int col, active; + char str[100]; + long framecolor; + IFniiiiiiC draw_cb; + + if (!ih->data->lines.sizes[0]) + return; + + if (col1 > ih->data->columns.last || + col2 < ih->data->columns.first) + return; + + if (col1 < ih->data->columns.first) + col1 = ih->data->columns.first; + if (col2 > ih->data->columns.last) + col2 = ih->data->columns.last; + + /* Start the position of the first column title */ + y1 = 0; + y2 = ih->data->lines.sizes[0]; + + x1 = ih->data->columns.sizes[0]; + for(col = ih->data->columns.first; col < col1; col++) + x1 += ih->data->columns.sizes[col]; + + framecolor = cdIupConvertColor(iupAttribGetStr(ih, "FRAMECOLOR")); + active = iupdrvIsActive(ih); + draw_cb = (IFniiiiiiC)IupGetCallback(ih, "DRAW_CB"); + + /* Draw the titles */ + for(col = col1; col <= col2; col++) + { + /* If it is an hide column (size = 0), no draw the title */ + if(ih->data->columns.sizes[col] == 0) + continue; + + x2 = x1 + ih->data->columns.sizes[col]; + + /* If it doesn't have title, the loop just calculate the final position */ + if (ih->data->lines.sizes[0]) + { + int sort = 0; + int marked = iupMatrixColumnIsMarked(ih, col); + + iMatrixDrawBackground(ih, x1, x2, y1, y2, marked, active, 0, col); + + iMatrixDrawFrameRectTitle(ih, 0, col, x1, x2, y1, y2, framecolor, str); + + if (iMatrixDrawSortSign(ih, x2, y1, y2, col, active, str)) + sort = IMAT_COMBOBOX_W; /* same space is used by the sort sign */ + + iMatrixDrawCellValue(ih, x1, x2-sort, y1, y2, IMAT_T_CENTER, marked, active, 0, col, draw_cb); + } + + x1 = x2; + } +} + +/* Redraw a block of cells of the matrix. Handle marked cells, change + automatically the background color of them. + - lin1, col1 : cell coordinates that mark the left top corner of the area to be redrawn + - lin2, col2 : cell coordinates that mark the right bottom corner of the area to be redrawn */ +void iupMatrixDrawCells(Ihandle* ih, int lin1, int col1, int lin2, int col2) +{ + int x1, y1, x2, y2, old_x2, old_y1, old_y2; + int alignment, lin, col, active; + long framecolor, emptyarea_color = -1; + char str[100]; + IFnii mark_cb; + IFnii dropcheck_cb; + IFniiiiiiC draw_cb; + + x1 = 0; + x2 = ih->data->w-1; + y1 = 0; + y2 = ih->data->h-1; + + old_x2 = x2; + old_y1 = y1; + old_y2 = y2; + + if (col1 > ih->data->columns.last || + col2 < ih->data->columns.first || + lin1 > ih->data->lines.last || + lin2 < ih->data->lines.first) + return; + + if (col1 < ih->data->columns.first) + col1 = ih->data->columns.first; + if (col2 > ih->data->columns.last) + col2 = ih->data->columns.last; + if (lin1 < ih->data->lines.first) + lin1 = ih->data->lines.first; + if (lin2 > ih->data->lines.last) + lin2 = ih->data->lines.last; + + /* Find the initial position of the first column */ + x1 += ih->data->columns.sizes[0]; + for(col = ih->data->columns.first; col < col1; col++) + x1 += ih->data->columns.sizes[col]; + + /* Find the final position of the last column */ + x2 = x1; + for( ; col <= col2; col++) + x2 += ih->data->columns.sizes[col]; + + /* Find the initial position of the first line */ + y1 += ih->data->lines.sizes[0]; + for(lin = ih->data->lines.first; lin < lin1; lin++) + y1 += ih->data->lines.sizes[lin]; + + /* Find the final position of the last line */ + y2 = y1; + for( ; lin <= lin2; lin++) + y2 += ih->data->lines.sizes[lin]; + + if ((col2 == ih->data->columns.num-1) && (old_x2 > x2)) + { + emptyarea_color = cdIupConvertColor(ih->data->bgcolor_parent); + cdCanvasForeground(ih->data->cddbuffer, emptyarea_color); + + /* If it was drawn until the last column and remains space in the right of it, + then delete this area with the the background color. */ + IUPMAT_BOX(ih, x2, old_x2, old_y1, old_y2); + } + + if ((lin2 == ih->data->lines.num-1) && (old_y2 > y2)) + { + if (emptyarea_color == -1) + emptyarea_color = cdIupConvertColor(ih->data->bgcolor_parent); + cdCanvasForeground(ih->data->cddbuffer, emptyarea_color); + + /* If it was drawn until the last line visible and remains space below it, + then delete this area with the the background color. */ + IUPMAT_BOX(ih, 0, old_x2, y2, old_y2); + } + + /***** Draw the cell values and frame */ + old_y1 = y1; + framecolor = cdIupConvertColor(iupAttribGetStr(ih, "FRAMECOLOR")); + active = iupdrvIsActive(ih); + + mark_cb = (IFnii)IupGetCallback(ih, "MARK_CB"); + dropcheck_cb = (IFnii)IupGetCallback(ih, "DROPCHECK_CB"); + draw_cb = (IFniiiiiiC)IupGetCallback(ih, "DRAW_CB"); + + for(col = col1; col <= col2; col++) /* For all the columns in the region */ + { + if (ih->data->columns.sizes[col] == 0) + continue; + + alignment = iMatrixDrawGetColAlignment(ih, col, str); + + x2 = x1 + ih->data->columns.sizes[col]; + + for(lin = lin1; lin <= lin2; lin++) /* For all lines in the region */ + { + int drop = 0; + int marked = 0; + + if (ih->data->lines.sizes[lin] == 0) + continue; + + y2 = y1 + ih->data->lines.sizes[lin]; + + /* If the cell is marked, then draw it with attenuation color */ + marked = iupMatrixMarkCellGet(ih, lin, col, mark_cb, str); + + iMatrixDrawBackground(ih, x1, x2, y1, y2, marked, active, lin, col); + + iMatrixDrawFrameRectCell(ih, lin, col, x1, x2, y1, y2, framecolor, str); + + if (dropcheck_cb && dropcheck_cb(ih, lin, col) == IUP_DEFAULT) + { + drop = IMAT_COMBOBOX_W; + iMatrixDrawComboFeedback(ih, x2, y1, y2, active, framecolor); + } + + /* draw the cell contents */ + iMatrixDrawCellValue(ih, x1, x2-drop, y1, y2, alignment, marked, active, lin, col, draw_cb); + + y1 = y2; + } + + x1 = x2; + y1 = old_y1; /* must reset also y */ + } +} + +void iupMatrixDraw(Ihandle* ih, int update) +{ + if (!ih->data->first_redraw) + return; + + if (ih->data->need_calcsize) + iupMatrixAuxCalcSizes(ih); + + iMatrixDrawMatrix(ih); + + if (update) + iupMatrixDrawUpdate(ih); +} + +void iupMatrixDrawUpdate(Ihandle* ih) +{ + cdCanvasFlush(ih->data->cddbuffer); + + if (ih->data->has_focus) + iMatrixDrawFocus(ih); +} + +int iupMatrixDrawSetRedrawAttrib(Ihandle* ih, const char* value) +{ + int type; + + if (value == NULL) + type = 0; + else if(value[0] == 'L' || value[0] == 'l') + type = IMAT_PROCESS_LIN; + else if(value[0] == 'C' || value[0] == 'c') + type = IMAT_PROCESS_COL; + else + type = 0; + + if (type) + { + int min = 0, max = 0; + value++; + + if(iupStrToIntInt(value, &min, &max, ':') != 2) + max = min; + + if (min > max) + return 0; + + iupMatrixPrepareDrawData(ih); + + if (ih->data->need_calcsize) + iupMatrixAuxCalcSizes(ih); + + if (ih->data->lines.sizes[0] && ih->data->columns.sizes[0]) + iMatrixDrawTitleCorner(ih); + + if (type == IMAT_PROCESS_LIN) + { + iupMatrixDrawLineTitle(ih, min, max); + iupMatrixDrawCells(ih, min, ih->data->columns.first, max, ih->data->columns.last); + } + else + { + iupMatrixDrawColumnTitle(ih, min, max); + iupMatrixDrawCells(ih, ih->data->lines.first, min, ih->data->lines.last, max); + } + } + else + { + iupMatrixAuxCalcSizes(ih); + iMatrixDrawMatrix(ih); + } + + iupMatrixDrawUpdate(ih); + return 0; +} diff --git a/iup/srccontrols/matrix/iupmat_draw.h b/iup/srccontrols/matrix/iupmat_draw.h new file mode 100755 index 0000000..03337e7 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_draw.h @@ -0,0 +1,31 @@ +/** \file + * \brief iupmatrix control + * draw functions. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_DRAW_H +#define __IUPMAT_DRAW_H + +#ifdef __cplusplus +extern "C" { +#endif + +void iupMatrixDrawCells(Ihandle* ih, int lin1, int col1, int lin2, int col2); +void iupMatrixDrawColumnTitle(Ihandle* ih, int col1, int col2); +void iupMatrixDrawLineTitle(Ihandle* ih, int lin1, int lin2); + +/* Render the visible cells and update display */ +void iupMatrixDraw(Ihandle* ih, int update); + +/* Update the display only */ +void iupMatrixDrawUpdate(Ihandle* ih); + +int iupMatrixDrawSetRedrawAttrib(Ihandle* ih, const char* value); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_edit.c b/iup/srccontrols/matrix/iupmat_edit.c new file mode 100755 index 0000000..a7e0a74 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_edit.c @@ -0,0 +1,450 @@ +/** \file +* \brief iupmatrix edit +* Functions used to edit a node name in place. +* +* See Copyright Notice in "iup.h" +*/ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupcontrols.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" +#include "iup_childtree.h" + +#include "iupmat_def.h" +#include "iupmat_scroll.h" +#include "iupmat_aux.h" +#include "iupmat_edit.h" +#include "iupmat_key.h" +#include "iupmat_getset.h" +#include "iupmat_draw.h" + + +static int iMatrixEditCallDropdownCb(Ihandle* ih, int lin, int col) +{ + IFnnii cb = (IFnnii)IupGetCallback(ih, "DROP_CB"); + if(cb) + { + int ret; + char* value = iupMatrixCellGetValue(ih, lin, col); + if (!value) value = ""; + + iupAttribSetStr(ih->data->droph, "PREVIOUSVALUE", value); + IupSetAttribute(ih->data->droph, "VALUE", "1"); + + ret = cb(ih, ih->data->droph, lin, col); + + /* check if the user set an invalid value */ + if (IupGetInt(ih->data->droph, "VALUE") == 0) + IupSetAttribute(ih->data->droph, "VALUE", "1"); + + if(ret == IUP_DEFAULT) + return 1; + } + + return 0; +} + +static int iMatrixEditDropDownAction_CB(Ihandle* ih, char* t, int i, int v) +{ + Ihandle* ih_matrix = ih->parent; + IFniinsii cb = (IFniinsii)IupGetCallback(ih_matrix, "DROPSELECT_CB"); + if(cb) + { + int ret = cb(ih_matrix, ih_matrix->data->lines.focus_cell, ih_matrix->data->columns.focus_cell, ih, t, i, v); + + /* If the user returns IUP_CONTINUE in a dropselect_cb + the value is accepted and the matrix leaves edition mode. */ + if (ret == IUP_CONTINUE) + { + iupMatrixEditHide(ih_matrix); + iupMatrixDrawUpdate(ih); + } + } + + return IUP_DEFAULT; +} + +static void iMatrixEditChooseElement(Ihandle* ih, int lin, int col) +{ + int drop = iMatrixEditCallDropdownCb(ih, lin, col); + if(drop) + ih->data->datah = ih->data->droph; + else + { + char* value; + + ih->data->datah = ih->data->texth; + + /* dropdown values are set by the user in DROP_CB. + text value is set here from cell contents. */ + value = iupMatrixCellGetValue(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell); + if (!value) value = ""; + IupSetAttribute(ih->data->texth, "VALUE", value); + } +} + +static int iMatrixEditCallEditionCb(Ihandle* ih, int mode, int update) +{ + int ret = iupMatrixAuxCallEditionCbLinCol(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell, mode, update); + + if (update && ret == IUP_DEFAULT && mode == 0) /* leaving edition mode */ + iupMatrixCellUpdateValue(ih); + + return ret; +} + +static int iMatrixEditCancel(Ihandle* ih, int focus, int update, int ignore) +{ + if (IupGetInt(ih->data->datah, "VISIBLE")) + { + int ret; + + /* Avoid calling EDITION_CB twice. Usually because a killfocus. */ + if (iupAttribGet(ih, "_IUPMAT_CALL_EDITION")) + return IUP_DEFAULT; + + iupAttribSetStr(ih, "_IUPMAT_CALL_EDITION", "1"); + ret = iMatrixEditCallEditionCb(ih, 0, update); + iupAttribSetStr(ih, "_IUPMAT_CALL_EDITION", NULL); + + if (ret == IUP_IGNORE && ignore) + return IUP_IGNORE; + + IupSetAttribute(ih->data->datah, "VISIBLE", "NO"); + IupSetAttribute(ih->data->datah, "ACTIVE", "NO"); + + if (focus) + { + IupSetFocus(ih); + ih->data->has_focus = 1; /* set this so even if getfocus_cb is not called the focus is drawn */ + } +#ifdef SunOS + /* Usually when the edit control is hidden the matrix is automatically repainted by the system, except in SunOS. */ + iupMatrixDrawUpdate(ih); +#endif + } + + return IUP_DEFAULT; +} + +static int iMatrixEditKillFocus_CB(Ihandle* ih) +{ + Ihandle* ih_matrix = ih->parent; + if (iupStrEqualNoCase(IupGetGlobal("DRIVER"), "Motif")) + { + if (iupAttribGet(ih_matrix, "_IUPMAT_DOUBLE_CLICK")) + return IUP_DEFAULT; + } + + iupMatrixEditForceHidden(ih_matrix); + return IUP_DEFAULT; +} + +int iupMatrixEditHide(Ihandle* ih) +{ + return iMatrixEditCancel(ih, 1, 1, 1); /* set focus + update + use ignore */ +} + +void iupMatrixEditForceHidden(Ihandle* ih) +{ + iMatrixEditCancel(ih, 0, 1, 0); /* no focus + update + no ignore */ +} + +int iupMatrixEditIsVisible(Ihandle* ih) +{ + if (!IupGetInt(ih, "ACTIVE")) + return 0; + + if (!IupGetInt(ih->data->datah, "VISIBLE")) + return 0; + + return 1; +} + +int iupMatrixEditShow(Ihandle* ih) +{ + char* mask; + int w, h, x, y; + + /* work around for Windows when using Multiline */ + if (iupAttribGet(ih, "_IUPMAT_IGNORE_SHOW")) + { + iupAttribSetStr(ih, "_IUPMAT_IGNORE_SHOW", NULL); + return 0; + } + + /* not active */ + if(!IupGetInt(ih, "ACTIVE")) + return 0; + + /* already visible */ + if(IupGetInt(ih->data->datah, "VISIBLE")) + return 0; + + /* notify application */ + if (iMatrixEditCallEditionCb(ih, 1, 0) == IUP_IGNORE) + return 0; + + /* select edit control */ + iMatrixEditChooseElement(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell); + + /* position the cell to make it visible */ + /* If the focus is not visible, a scroll is done for that the focus to be visible */ + if (!iupMatrixAuxIsCellFullVisible(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell)) + iupMatrixScrollToVisible(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell); + + /* set attributes */ + iupMatrixPrepareDrawData(ih); + IupStoreAttribute(ih->data->datah, "BGCOLOR", iupMatrixGetBgColor(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell)); + IupStoreAttribute(ih->data->datah, "FGCOLOR", iupMatrixGetFgColor(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell)); + IupSetAttribute(ih->data->datah, "FONT", iupMatrixGetFont(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell)); + + mask = IupMatGetAttribute(ih,"MASK", ih->data->lines.focus_cell, ih->data->columns.focus_cell); + if (mask) + { + IupSetAttribute(ih->data->datah, "MASKCASEI", IupMatGetAttribute(ih,"MASKCASEI", ih->data->lines.focus_cell, ih->data->columns.focus_cell)); + IupSetAttribute(ih->data->datah, "MASK", mask); + } + else + { + mask = IupMatGetAttribute(ih,"MASKINT", ih->data->lines.focus_cell, ih->data->columns.focus_cell); + if (mask) + IupSetAttribute(ih->data->datah, "MASKINT", mask); + else + { + mask = IupMatGetAttribute(ih,"MASKFLOAT", ih->data->lines.focus_cell, ih->data->columns.focus_cell); + if (mask) + IupSetAttribute(ih->data->datah, "MASKFLOAT", mask); + } + } + + /* calc size */ + iupMatrixAuxGetVisibleCellDim(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell, &x, &y, &w, &h); + + ih->data->datah->x = x; + ih->data->datah->y = y; + if (IupGetGlobal("GTKVERSION")) + { + /* In GTK, IupCanvas is not the actual container of the IupText/IupList */ + ih->data->datah->x += ih->x; + ih->data->datah->y += ih->y; + } + + ih->data->datah->currentwidth = w; + ih->data->datah->currentheight = h; + iupClassObjectLayoutUpdate(ih->data->datah); + + /* activate and show */ + IupSetAttribute(ih->data->datah, "ACTIVE", "YES"); + IupSetAttribute(ih->data->datah, "VISIBLE", "YES"); + IupSetFocus(ih->data->datah); + + return 1; +} + +static int iMatrixEditTextAction_CB(Ihandle* ih, int c, char* after) +{ + Ihandle* ih_matrix = ih->parent; + IFniiiis cb = (IFniiiis) IupGetCallback(ih_matrix, "ACTION_CB"); + if (cb && c!=0) /* only for valid characters */ + { + int oldc = c; + c = cb(ih_matrix, c, ih_matrix->data->lines.focus_cell, ih_matrix->data->columns.focus_cell, 1, after); + if (c == IUP_IGNORE || c == IUP_CLOSE || c == IUP_CONTINUE) + return c; + else if(c == IUP_DEFAULT) + c = oldc; + return c; + } + + return IUP_DEFAULT; +} + +static int iMatrixEditTextKeyAny_CB(Ihandle* ih, int c) +{ + Ihandle* ih_matrix = ih->parent; + IFniiiis cb = (IFniiiis) IupGetCallback(ih_matrix, "ACTION_CB"); + if (cb && c==0) /* only for other characters */ + { + int oldc = c; + c = cb(ih_matrix, c, ih_matrix->data->lines.focus_cell, ih_matrix->data->columns.focus_cell, 1, IupGetAttribute(ih, "VALUE")); + if(c == IUP_IGNORE || c == IUP_CLOSE || c == IUP_CONTINUE) + return c; + else if(c == IUP_DEFAULT) + c = oldc; + } + + switch (c) + { + case K_cUP: + case K_cDOWN: + case K_cLEFT: + case K_cRIGHT: + if (iupMatrixEditHide(ih_matrix) == IUP_DEFAULT) + { + iupMatrixProcessKeyPress(ih_matrix, c); + return IUP_IGNORE; + } + break; + case K_UP: + if (IupGetInt(ih, "CARET") == 1) + { + /* if at the first line of the text */ + if (iupMatrixEditHide(ih_matrix) == IUP_DEFAULT) + { + iupMatrixProcessKeyPress(ih_matrix, c); + return IUP_IGNORE; + } + } + break; + case K_DOWN: + { + char* value = IupGetAttribute(ih, "VALUE"); + if (value) + { + /* if at the last line of the text */ + if (iupStrLineCount(value) == IupGetInt(ih, "CARET")) + { + if (iupMatrixEditHide(ih_matrix) == IUP_DEFAULT) + { + iupMatrixProcessKeyPress(ih_matrix, c); + return IUP_IGNORE; + } + } + } + } + break; + case K_LEFT: + if (IupGetInt(ih, "CARETPOS") == 0) + { + /* if at the first character */ + if (iupMatrixEditHide(ih_matrix) == IUP_DEFAULT) + { + iupMatrixProcessKeyPress(ih_matrix, c); + return IUP_IGNORE; + } + } + break; + case K_RIGHT: + { + char* value = IupGetAttribute(ih, "VALUE"); + if (value) + { + /* if at the last character */ + if ((int)strlen(value) == IupGetInt(ih, "CARETPOS")) + { + if (iupMatrixEditHide(ih_matrix) == IUP_DEFAULT) + { + iupMatrixProcessKeyPress(ih_matrix, c); + return IUP_IGNORE; + } + } + } + } + break; + case K_ESC: + iMatrixEditCancel(ih_matrix, 1, 0, 0); /* set focus + NO update + NO ignore */ + return IUP_IGNORE; + case K_CR: + if (iupMatrixEditHide(ih_matrix) == IUP_DEFAULT) + { + if (iupStrEqualNoCase(IupGetGlobal("DRIVER"), "Win32") && IupGetInt(ih, "MULTILINE")) + { + /* work around for Windows when using Multiline */ + iupAttribSetStr(ih_matrix, "_IUPMAT_IGNORE_SHOW", "1"); + } + + if (iupMatrixAuxCallLeaveCellCb(ih_matrix) != IUP_IGNORE) + { + iupMatrixScrollKeyCr(ih_matrix); + iupMatrixAuxCallEnterCellCb(ih_matrix); + } + iupMatrixDrawUpdate(ih_matrix); + return IUP_IGNORE; + } + break; + } + + return IUP_CONTINUE; +} + +static int iMatrixEditDropDownKeyAny_CB(Ihandle* ih, int c) +{ + Ihandle* ih_matrix = ih->parent; + IFniiiis cb = (IFniiiis)IupGetCallback(ih_matrix, "ACTION_CB"); + if (cb) + { + int oldc = c; + c = cb(ih_matrix, c, ih_matrix->data->lines.focus_cell, ih_matrix->data->columns.focus_cell, 1, ""); + if (c == IUP_IGNORE || c == IUP_CLOSE || c == IUP_CONTINUE) + return c; + else if(c == IUP_DEFAULT) + c = oldc; + } + + switch (c) + { + case K_CR: + if (iupMatrixEditHide(ih_matrix) == IUP_DEFAULT) + { + if (iupMatrixAuxCallLeaveCellCb(ih_matrix) != IUP_IGNORE) + { + iupMatrixScrollKeyCr(ih_matrix); + iupMatrixAuxCallEnterCellCb(ih_matrix); + } + iupMatrixDrawUpdate(ih_matrix); + return IUP_IGNORE; + } + break; + case K_ESC: + iMatrixEditCancel(ih_matrix, 1, 0, 0); /* set focus + NO update + NO ignore */ + return IUP_IGNORE; + } + + return IUP_CONTINUE; +} + +char* iupMatrixEditGetValue(Ihandle* ih) +{ + if (ih->data->datah == ih->data->droph) + return IupGetAttribute(ih->data->droph, IupGetAttribute(ih->data->droph, "VALUE")); + else + return IupGetAttribute(ih->data->texth, "VALUE"); +} + +void iupMatrixEditCreate(Ihandle* ih) +{ + /******** EDIT *************/ + ih->data->texth = IupText(NULL); + iupChildTreeAppend(ih, ih->data->texth); + + IupSetCallback(ih->data->texth, "ACTION", (Icallback)iMatrixEditTextAction_CB); + IupSetCallback(ih->data->texth, "K_ANY", (Icallback)iMatrixEditTextKeyAny_CB); + IupSetCallback(ih->data->texth, "KILLFOCUS_CB", (Icallback)iMatrixEditKillFocus_CB); + IupSetAttribute(ih->data->texth, "VALUE", ""); + IupSetAttribute(ih->data->texth, "VISIBLE", "NO"); + IupSetAttribute(ih->data->texth, "ACTIVE", "NO"); + + + /******** DROPDOWN *************/ + ih->data->droph = IupList(NULL); + iupChildTreeAppend(ih, ih->data->droph); + + IupSetCallback(ih->data->droph, "ACTION", (Icallback)iMatrixEditDropDownAction_CB); + IupSetCallback(ih->data->droph, "KILLFOCUS_CB", (Icallback)iMatrixEditKillFocus_CB); + IupSetCallback(ih->data->droph, "K_ANY", (Icallback)iMatrixEditDropDownKeyAny_CB); + IupSetAttribute(ih->data->droph, "DROPDOWN", "YES"); + IupSetAttribute(ih->data->droph, "MULTIPLE", "NO"); + IupSetAttribute(ih->data->droph, "VISIBLE", "NO"); + IupSetAttribute(ih->data->droph, "ACTIVE", "NO"); +} diff --git a/iup/srccontrols/matrix/iupmat_edit.h b/iup/srccontrols/matrix/iupmat_edit.h new file mode 100755 index 0000000..9a7815f --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_edit.h @@ -0,0 +1,26 @@ +/** \file + * \brief iupmatrix. + * Functions used to edit a cell in place. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_EDIT_H +#define __IUPMAT_EDIT_H + +#ifdef __cplusplus +extern "C" { +#endif + +int iupMatrixEditIsVisible (Ihandle *ih); +int iupMatrixEditShow (Ihandle* ih); +int iupMatrixEditHide (Ihandle* ih); +void iupMatrixEditForceHidden(Ihandle* ih); +char* iupMatrixEditGetValue (Ihandle* ih); +void iupMatrixEditCreate (Ihandle* ih); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_focus.c b/iup/srccontrols/matrix/iupmat_focus.c new file mode 100755 index 0000000..3c000f8 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_focus.c @@ -0,0 +1,58 @@ +/** \file + * \brief iupmatrix focus control + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iupcbs.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" + +#include "iupmat_def.h" +#include "iupmat_aux.h" +#include "iupmat_focus.h" +#include "iupmat_draw.h" + + +void iupMatrixFocusSet(Ihandle* ih, int lin, int col) +{ + ih->data->lines.focus_cell = lin; + ih->data->columns.focus_cell = col; +} + +int iupMatrixFocus_CB(Ihandle* ih, int focus) +{ + int rc = IUP_DEFAULT; + + if (!iupMatrixIsValid(ih, 1)) + return IUP_DEFAULT; + + if (iupStrEqualNoCase(IupGetGlobal("DRIVER"), "Motif")) + { + if (focus && iupAttribGet(ih, "_IUPMAT_DOUBLE_CLICK")) + { + iupAttribSetStr(ih, "_IUPMAT_DOUBLE_CLICK", NULL); + return IUP_DEFAULT; + } + } + + ih->data->has_focus = focus; + iupMatrixDrawUpdate(ih); + + if (focus) + iupMatrixAuxCallEnterCellCb(ih); + else + iupMatrixAuxCallLeaveCellCb(ih); + + return rc; +} + + diff --git a/iup/srccontrols/matrix/iupmat_focus.h b/iup/srccontrols/matrix/iupmat_focus.h new file mode 100755 index 0000000..75f5894 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_focus.h @@ -0,0 +1,21 @@ +/** \file + * \brief iupmatrix focus control. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_FOCUS_H +#define __IUPMAT_FOCUS_H + +#ifdef __cplusplus +extern "C" { +#endif + +int iupMatrixFocus_CB(Ihandle* ih, int focus); +void iupMatrixFocusSet(Ihandle* ih, int lin, int col); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_getset.c b/iup/srccontrols/matrix/iupmat_getset.c new file mode 100755 index 0000000..34947b6 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_getset.c @@ -0,0 +1,358 @@ +/** \file + * \brief iupmatrix setget control + * attributes set and get + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_drvfont.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" +#include "iup_controls.h" +#include "iup_childtree.h" + +#include "iupmat_def.h" +#include "iupmat_getset.h" +#include "iupmat_edit.h" +#include "iupmat_draw.h" +#include "iupmat_aux.h" + + +int iupMatrixCheckCellPos(Ihandle* ih, int lin, int col) +{ + /* Check if the cell exists */ + if ((lin < 0) || (col < 0) || (lin > ih->data->lines.num-1) || (col > ih->data->columns.num-1)) + return 0; + + return 1; +} + +void iupMatrixCellSetValue(Ihandle* ih, int lin, int col, const char* value) +{ + if (ih->data->callback_mode) + return; + + if (ih->data->cells[lin][col].value) + free(ih->data->cells[lin][col].value); + + ih->data->cells[lin][col].value = iupStrDup(value); + + if (lin==0 || col==0) + ih->data->need_calcsize = 1; +} + +char* iupMatrixCellGetValue (Ihandle* ih, int lin, int col) +{ + if (!ih->handle) + { + char str[100]; + sprintf(str, "%d:%d", lin, col); + return iupAttribGet(ih, str); + } + else + { + if (ih->data->callback_mode) + { + sIFnii value_cb = (sIFnii)IupGetCallback(ih, "VALUE_CB"); + return value_cb(ih, lin, col); + } + else + return ih->data->cells[lin][col].value; + } +} + +void iupMatrixCellSetFlag(Ihandle* ih, int lin, int col, unsigned char attr, int set) +{ + if (!ih->handle) + return; + + if (lin==-1) + { + if ((col < 0) || (col > ih->data->columns.num-1)) + return; + + if (set) + ih->data->columns.flags[col] |= attr; + else + ih->data->columns.flags[col] &= ~attr; + } + else if (col == -1) + { + if ((lin < 0) || (lin > ih->data->lines.num-1)) + return; + + if (set) + ih->data->lines.flags[lin] |= attr; + else + ih->data->lines.flags[lin] &= ~attr; + } + else + { + if (!ih->data->callback_mode) + { + if ((lin < 0) || (col < 0) || (lin > ih->data->lines.num-1) || (col > ih->data->columns.num-1)) + return; + + if (set) + ih->data->cells[lin][col].flags |= attr; + else + ih->data->cells[lin][col].flags &= ~attr; + } + } +} + +void iupMatrixCellUpdateValue(Ihandle* ih) +{ + IFniis value_edit_cb; + char *value = iupMatrixEditGetValue(ih); + + iupMatrixCellSetValue(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell, value); + + value_edit_cb = (IFniis)IupGetCallback(ih, "VALUE_EDIT_CB"); + if (value_edit_cb) + value_edit_cb(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell, value); + + iupMatrixPrepareDrawData(ih); + iupMatrixDrawCells(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell, ih->data->lines.focus_cell, ih->data->columns.focus_cell); +} + +void iupMatrixPrepareDrawData(Ihandle* ih) +{ + /* FGCOLOR, BGCOLOR and FONT */ + iupAttribStoreStr(ih, "_IUPMAT_BGCOLOR_PARENT", iupControlBaseGetParentBgColor(ih)); + iupAttribStoreStr(ih, "_IUPMAT_BGCOLOR", IupGetAttribute(ih, "BGCOLOR")); + iupAttribStoreStr(ih, "_IUPMAT_FGCOLOR", IupGetAttribute(ih, "FGCOLOR")); + iupAttribStoreStr(ih, "_IUPMAT_FONT", IupGetAttribute(ih, "FONT")); + + ih->data->bgcolor_parent = iupAttribGet(ih, "_IUPMAT_BGCOLOR_PARENT"); + ih->data->bgcolor = iupAttribGet(ih, "_IUPMAT_BGCOLOR"); + ih->data->fgcolor = iupAttribGet(ih, "_IUPMAT_FGCOLOR"); + ih->data->font = iupAttribGet(ih, "_IUPMAT_FONT"); + + ih->data->font_cb = (sIFnii)IupGetCallback(ih, "FONT_CB"); + ih->data->fgcolor_cb = (IFniiIII)IupGetCallback(ih, "FGCOLOR_CB"); + ih->data->bgcolor_cb = (IFniiIII)IupGetCallback(ih, "BGCOLOR_CB"); +} + +static char* iMatrixGetCellAttrib(Ihandle* ih, unsigned char attr, int lin, int col, int native_parent) +{ + char* value = NULL; + char attrib_id[100]; + const char* attrib = NULL; + char* attrib_global = NULL; + + if (attr == IUPMAT_FONT) + { + attrib = "FONT"; + attrib_global = ih->data->font; + } + else if (attr == IUPMAT_BGCOLOR) + { + attrib = "BGCOLOR"; + attrib_global = ih->data->bgcolor; + } + else if (attr == IUPMAT_FGCOLOR) + { + attrib = "FGCOLOR"; + attrib_global = ih->data->fgcolor; + } + + /* 1 - check for this cell */ + if (ih->data->callback_mode || ih->data->cells[lin][col].flags & attr) + { + sprintf(attrib_id, "%s%d:%d", attrib, lin, col); + value = iupAttribGet(ih, attrib_id); + } + if (!value) + { + /* 2 - check for this line, if not title col */ + if (col != 0) + { + if (ih->data->lines.flags[lin] & attr) + { + sprintf(attrib_id, "%s%d:*", attrib, lin); + value = iupAttribGet(ih, attrib_id); + } + } + + if (!value) + { + /* 3 - check for this column, if not title line */ + if (lin != 0) + { + if (ih->data->columns.flags[col] & attr) + { + sprintf(attrib_id,"%s*:%d", attrib, col); + value = iupAttribGet(ih, attrib_id); + } + } + + if (!value) + { + /* 4 - check for the matrix or native parent */ + if (native_parent) + value = ih->data->bgcolor_parent; + else + value = attrib_global; + } + } + } + + return value; +} + +static int iMatrixCallColorCB(Ihandle* ih, IFniiIII cb, int lin, int col, unsigned char *r, unsigned char *g, unsigned char *b) +{ + int ir, ig, ib, ret; + ret = cb(ih, lin, col, &ir, &ig, &ib); + *r = iupBYTECROP(ir); + *g = iupBYTECROP(ig); + *b = iupBYTECROP(ib); + return ret; +} + +char* iupMatrixGetFgColor(Ihandle* ih, int lin, int col) +{ + unsigned char r = 0, g = 0, b = 0; + /* called from Edit only */ + if (!ih->data->fgcolor_cb || (iMatrixCallColorCB(ih, ih->data->fgcolor_cb, lin, col, &r, &g, &b) == IUP_IGNORE)) + { + char* fgcolor = iMatrixGetCellAttrib(ih, IUPMAT_FGCOLOR, lin, col, 0); + if (!fgcolor) + { + if (lin ==0 || col == 0) + fgcolor = IupGetGlobal("DLGFGCOLOR"); + else + fgcolor = IupGetGlobal("TXTFGCOLOR"); + } + return fgcolor; + } + else + { + char* buffer = iupStrGetMemory(30); + sprintf(buffer, "%d %d %d", r, g, b); + return buffer; + } +} + +void iupMatrixGetFgRGB(Ihandle* ih, int lin, int col, unsigned char *r, unsigned char *g, unsigned char *b) +{ + /* called from Draw only */ + if (!ih->data->fgcolor_cb || (iMatrixCallColorCB(ih, ih->data->fgcolor_cb, lin, col, r, g, b) == IUP_IGNORE)) + { + char* fgcolor = iMatrixGetCellAttrib(ih, IUPMAT_FGCOLOR, lin, col, 0); + if (!fgcolor) + { + if (lin ==0 || col == 0) + fgcolor = IupGetGlobal("DLGFGCOLOR"); + else + fgcolor = IupGetGlobal("TXTFGCOLOR"); + } + iupStrToRGB(fgcolor, r, g, b); + } +} + +char* iupMatrixGetBgColor(Ihandle* ih, int lin, int col) +{ + unsigned char r = 0, g = 0, b = 0; + /* called from Edit only */ + if (!ih->data->bgcolor_cb || (iMatrixCallColorCB(ih, ih->data->bgcolor_cb, lin, col, &r, &g, &b) == IUP_IGNORE)) + { + int native_parent = 0; + if (lin == 0 || col == 0) + native_parent = 1; + return iMatrixGetCellAttrib(ih, IUPMAT_BGCOLOR, lin, col, native_parent); + } + else + { + char* buffer = iupStrGetMemory(30); + sprintf(buffer, "%d %d %d", r, g, b); + return buffer; + } +} + +#define IMAT_DARKER(_x) (((_x)*9)/10) + +void iupMatrixGetBgRGB(Ihandle* ih, int lin, int col, unsigned char *r, unsigned char *g, unsigned char *b) +{ + /* called from Draw only */ + if (!ih->data->bgcolor_cb || (iMatrixCallColorCB(ih, ih->data->bgcolor_cb, lin, col, r, g, b) == IUP_IGNORE)) + { + int native_parent = 0; + if (lin == 0 || col == 0) + native_parent = 1; + iupStrToRGB(iMatrixGetCellAttrib(ih, IUPMAT_BGCOLOR, lin, col, native_parent), r, g, b); + if (native_parent) + { + int ir = IMAT_DARKER(*r), ig=IMAT_DARKER(*g), ib=IMAT_DARKER(*b); /* use a darker version of the background by 10% */ + *r = iupBYTECROP(ir); + *g = iupBYTECROP(ig); + *b = iupBYTECROP(ib); + } + } +} + +char* iupMatrixGetFont(Ihandle* ih, int lin, int col) +{ + char* font = NULL; + /* called from Draw and Edit only */ + if (ih->data->font_cb) + font = ih->data->font_cb(ih, lin, col); + if (!font) + font = iMatrixGetCellAttrib(ih, IUPMAT_FONT, lin, col, 0); + return font; +} + +char *iupMatrixGetSize(Ihandle* ih, int index, int m, int pixels) +{ + char* str; + int size; + ImatLinColData *lincol_data; + + if(m == IMAT_PROCESS_LIN) + lincol_data = &(ih->data->lines); + else + lincol_data = &(ih->data->columns); + + if (index < 0 || index > lincol_data->num-1) + return NULL; + + if (m == IMAT_PROCESS_LIN) + size = iupMatrixAuxGetLineHeight(ih, index); + else + size = iupMatrixAuxGetColumnWidth(ih, index); + + str = iupStrGetMemory(100); + + if (size) + { + /* remove the decoration added in iupMatrixAuxGet */ + if (m == IMAT_PROCESS_COL) + size -= IMAT_PADDING_W + IMAT_FRAME_W; + else + size -= IMAT_PADDING_H + IMAT_FRAME_H; + + if (!pixels) + { + int charwidth, charheight; + iupdrvFontGetCharSize(ih, &charwidth, &charheight); + if (m == IMAT_PROCESS_COL) + size = iupRASTER2WIDTH(size, charwidth); + else + size = iupRASTER2HEIGHT(size, charheight); + } + } + + sprintf(str, "%d", size); + return str; +} diff --git a/iup/srccontrols/matrix/iupmat_getset.h b/iup/srccontrols/matrix/iupmat_getset.h new file mode 100755 index 0000000..9ae3d07 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_getset.h @@ -0,0 +1,37 @@ +/** \file + * \brief iupmatrix control + * attributes set and get. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_GETSET_H +#define __IUPMAT_GETSET_H + +#ifdef __cplusplus +extern "C" { +#endif + +void iupMatrixCellSetValue(Ihandle* ih, int lin, int col, const char* value); +char* iupMatrixCellGetValue(Ihandle* ih, int lin, int col); + +void iupMatrixCellSetFlag(Ihandle* ih, int lin, int col, unsigned char attr, int set); + +void iupMatrixPrepareDrawData(Ihandle* ih); +char* iupMatrixGetFgColor(Ihandle* ih, int lin, int col); +char* iupMatrixGetBgColor(Ihandle* ih, int lin, int col); +char* iupMatrixGetFont (Ihandle* ih, int lin, int col); +void iupMatrixGetBgRGB(Ihandle* ih, int lin, int col, unsigned char *r, unsigned char *g, unsigned char *b); +void iupMatrixGetFgRGB(Ihandle* ih, int lin, int col, unsigned char *r, unsigned char *g, unsigned char *b); + +void iupMatrixCellUpdateValue(Ihandle* ih); + +char* iupMatrixGetSize(Ihandle* ih, int index, int m, int pixels); + +int iupMatrixCheckCellPos(Ihandle* ih, int lin, int col); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_key.c b/iup/srccontrols/matrix/iupmat_key.c new file mode 100755 index 0000000..ae9ed55 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_key.c @@ -0,0 +1,229 @@ +/** \file + * \brief iupmatrix control + * keyboard control + * + * See Copyright Notice in "iup.h" + */ + +/**************************************************************************/ +/* Functions to control keys in the matrix and in the text edition */ +/**************************************************************************/ + +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupkey.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_stdcontrols.h" + +#include "iupmat_def.h" +#include "iupmat_scroll.h" +#include "iupmat_focus.h" +#include "iupmat_aux.h" +#include "iupmat_getset.h" +#include "iupmat_key.h" +#include "iupmat_mark.h" +#include "iupmat_edit.h" +#include "iupmat_draw.h" + + +int iupMatrixProcessKeyPress(Ihandle* ih, int c) +{ + int ret = IUP_IGNORE; /* default for processed keys */ + + /* If the focus is not visible, a scroll is done for that the focus to be visible */ + if (!iupMatrixAuxIsCellFullVisible(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell)) + iupMatrixScrollToVisible(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell); + + switch (c) + { + case K_cHOME: + case K_sHOME: + case K_HOME: + if(iupMatrixAuxCallLeaveCellCb(ih) == IUP_IGNORE) + break; + iupMatrixScrollKeyHome(ih); + ih->data->homekeycount++; + iupMatrixAuxCallEnterCellCb(ih); + break; + + case K_cEND: + case K_sEND: + case K_END: + if(iupMatrixAuxCallLeaveCellCb(ih) == IUP_IGNORE) + break; + iupMatrixScrollKeyEnd(ih); + ih->data->endkeycount++; + iupMatrixAuxCallEnterCellCb(ih); + break; + + case K_sTAB: + case K_TAB: + return IUP_CONTINUE; /* do not redraw */ + + case K_cLEFT: + case K_sLEFT: + case K_LEFT: + if (iupMatrixAuxCallLeaveCellCb(ih) == IUP_IGNORE) + break; + iupMatrixScrollKeyLeft(ih); + iupMatrixAuxCallEnterCellCb(ih); + break; + + case K_cRIGHT: + case K_sRIGHT: + case K_RIGHT: + if(iupMatrixAuxCallLeaveCellCb(ih) == IUP_IGNORE) + break; + iupMatrixScrollKeyRight(ih); + iupMatrixAuxCallEnterCellCb(ih); + break; + + case K_cUP: + case K_sUP: + case K_UP: + if(iupMatrixAuxCallLeaveCellCb(ih) == IUP_IGNORE) + break; + iupMatrixScrollKeyUp(ih); + iupMatrixAuxCallEnterCellCb(ih); + break ; + + case K_cDOWN: + case K_sDOWN: + case K_DOWN: + if(iupMatrixAuxCallLeaveCellCb(ih) == IUP_IGNORE) + break; + iupMatrixScrollKeyDown(ih); + iupMatrixAuxCallEnterCellCb(ih); + break; + + case K_sPGUP: + case K_PGUP: + if(iupMatrixAuxCallLeaveCellCb(ih) == IUP_IGNORE) + break; + iupMatrixScrollKeyPgUp(ih); + iupMatrixAuxCallEnterCellCb(ih); + break; + + case K_sPGDN: + case K_PGDN: + if(iupMatrixAuxCallLeaveCellCb(ih) == IUP_IGNORE) + break; + iupMatrixScrollKeyPgDown(ih); + iupMatrixAuxCallEnterCellCb(ih); + break; + + case K_F2: + case K_SP: + case K_CR: + case K_sCR: + if (iupMatrixEditShow(ih)) + return IUP_IGNORE; /* do not redraw */ + break; + + case K_sDEL: + case K_DEL: + { + int lin, col; + char str[100]; + IFnii mark_cb = (IFnii)IupGetCallback(ih, "MARK_CB"); + + iupMatrixPrepareDrawData(ih); + + for(lin = 1; lin < ih->data->lines.num; lin++) + { + for(col = 1; col < ih->data->columns.num; col++) + { + if (iupMatrixMarkCellGet(ih, lin, col, mark_cb, str)) + { + if (iupMatrixAuxCallEditionCbLinCol(ih, lin, col, 1, 1) != IUP_IGNORE) + { + IFniis value_edit_cb; + + iupMatrixCellSetValue(ih, lin, col, NULL); + + value_edit_cb = (IFniis)IupGetCallback(ih, "VALUE_EDIT_CB"); + if (value_edit_cb) + value_edit_cb(ih, lin, col, NULL); + + iupMatrixDrawCells(ih, lin, col, lin, col); + } + } + } + } + break; + } + default: + /* if a valid character is pressed enter edition mode */ + if (iup_isprint(c)) + { + if (iupMatrixEditShow(ih)) + { + if (ih->data->datah == ih->data->texth) + { + char value[2] = {0,0}; + value[0] = (char)c; + IupStoreAttribute(ih->data->datah, "VALUE", value); + IupSetAttribute(ih->data->datah, "CARET", "2"); + } + return IUP_IGNORE; /* do not redraw */ + } + } + ret = IUP_DEFAULT; /* unprocessed keys */ + break; + } + + iupMatrixDrawUpdate(ih); + return ret; +} + +void iupMatrixKeyResetHomeEndCount(Ihandle* ih) +{ + ih->data->homekeycount = 0; + ih->data->endkeycount = 0; +} + +int iupMatrixKeyPress_CB(Ihandle* ih, int c, int press) +{ + int oldc = c; + IFniiiis cb; + + if (!iupMatrixIsValid(ih, 1)) + return IUP_DEFAULT; + + if (!press) + return IUP_DEFAULT; + + cb = (IFniiiis)IupGetCallback(ih, "ACTION_CB"); + if (cb) + { + if (iup_isprint(c)) + { + char value[2]={0,0}; + value[0] = (char)c; + c = cb(ih, c, ih->data->lines.focus_cell, ih->data->columns.focus_cell, 0, value); + } + else + { + c = cb(ih, c, ih->data->lines.focus_cell, ih->data->columns.focus_cell, 0, + iupMatrixCellGetValue(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell)); + } + + if (c == IUP_IGNORE || c == IUP_CLOSE || c == IUP_CONTINUE) + return c; + else if (c == IUP_DEFAULT) + c = oldc; + } + + if (c != K_HOME && c != K_sHOME) + ih->data->homekeycount = 0; + if (c != K_END && c != K_sEND) + ih->data->endkeycount = 0; + + return iupMatrixProcessKeyPress(ih, c); +} diff --git a/iup/srccontrols/matrix/iupmat_key.h b/iup/srccontrols/matrix/iupmat_key.h new file mode 100755 index 0000000..1062dd0 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_key.h @@ -0,0 +1,23 @@ +/** \file + * \brief iupmatrix. keyboard control. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_KEY_H +#define __IUPMAT_KEY_H + +#ifdef __cplusplus +extern "C" { +#endif + +int iupMatrixKeyPress_CB(Ihandle* ih, int c, int press); +int iupMatrixProcessKeyPress(Ihandle* ih, int c); + +void iupMatrixKeyResetHomeEndCount(Ihandle* ih); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_mark.c b/iup/srccontrols/matrix/iupmat_mark.c new file mode 100755 index 0000000..99aad32 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_mark.c @@ -0,0 +1,720 @@ +/** \file + * \brief iupmatrix control + * cell selection + * + * See Copyright Notice in "iup.h" + */ + +/**************************************************************************/ +/* Functions to cell selection (mark) */ +/**************************************************************************/ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" + +#include "iupmat_def.h" +#include "iupmat_mark.h" +#include "iupmat_getset.h" +#include "iupmat_draw.h" + + +static void iMatrixMarkLinSet(Ihandle* ih, int lin, int mark) +{ + /* called when MARKMODE=LIN */ + if (mark==-1) + mark = !(ih->data->lines.flags[lin] & IUPMAT_MARK); + + if (mark) + ih->data->lines.flags[lin] |= IUPMAT_MARK; + else + ih->data->lines.flags[lin] &= ~IUPMAT_MARK; +} + +static void iMatrixMarkColSet(Ihandle* ih, int col, int mark) +{ + /* called when MARKMODE=COL */ + if (mark==-1) + mark = !(ih->data->columns.flags[col] & IUPMAT_MARK); + + if (mark) + ih->data->columns.flags[col] |= IUPMAT_MARK; + else + ih->data->columns.flags[col] &= ~IUPMAT_MARK; +} + +static void iMatrixMarkCellSet(Ihandle* ih, int lin, int col, int mark, IFniii markedit_cb, IFnii mark_cb, char* str) +{ + /* called only when MARKMODE=CELL */ + if (mark == -1) + mark = !iupMatrixMarkCellGet(ih, lin, col, mark_cb, str); + + if (ih->data->callback_mode) + { + if (markedit_cb) + markedit_cb(ih, lin, col, mark); + else + { + sprintf(str, "MARK%d:%d", lin, col); + if (mark) + iupAttribSetStr(ih, str, "1"); + else + iupAttribSetStr(ih, str, NULL); + } + } + else + { + if (mark) + ih->data->cells[lin][col].flags |= IUPMAT_MARK; + else + ih->data->cells[lin][col].flags &= ~IUPMAT_MARK; + } +} + +int iupMatrixMarkCellGet(Ihandle* ih, int lin, int col, IFnii mark_cb, char* str) +{ + /* called independent from MARKMODE */ + + if (ih->data->mark_mode == IMAT_MARK_NO) + return 0; + + if (ih->data->mark_mode == IMAT_MARK_CELL) + { + if (ih->data->callback_mode) + { + if (mark_cb) + return mark_cb(ih, lin, col); + else + { + int mark = 0; + char* value; + sprintf(str, "MARK%d:%d", lin, col); + value = iupAttribGet(ih, str); + iupStrToInt(value, &mark); + return mark; + } + } + else + return ih->data->cells[lin][col].flags & IUPMAT_MARK; + } + else + { + if (ih->data->lines.flags[lin] & IUPMAT_MARK || ih->data->columns.flags[col] & IUPMAT_MARK) + return 1; + else + return 0; + } +} + +static void iMatrixMarkItem(Ihandle* ih, int lin1, int col1, int mark, IFniii markedit_cb, IFnii mark_cb, char* str) +{ + int lin, col; + + if (ih->data->mark_full1 == IMAT_PROCESS_LIN) + { + if (ih->data->mark_mode == IMAT_MARK_CELL) + { + for (col = 1; col < ih->data->columns.num; col++) + iMatrixMarkCellSet(ih, lin1, col, mark, markedit_cb, mark_cb, str); + } + else + { + iMatrixMarkLinSet(ih, lin1, mark); + iupMatrixDrawLineTitle(ih, lin1, lin1); + } + + iupMatrixDrawCells(ih, lin1, 1, lin1, ih->data->columns.num-1); + } + else if (ih->data->mark_full1 == IMAT_PROCESS_COL) + { + if (ih->data->mark_mode == IMAT_MARK_CELL) + { + for(lin = 1; lin < ih->data->lines.num; lin++) + iMatrixMarkCellSet(ih, lin, col1, mark, markedit_cb, mark_cb, str); + } + else + { + iMatrixMarkColSet(ih, col1, mark); + iupMatrixDrawColumnTitle(ih, col1, col1); + } + + iupMatrixDrawCells(ih, 1, col1, ih->data->lines.num-1, col1); + } + else if (ih->data->mark_mode == IMAT_MARK_CELL) + { + iMatrixMarkCellSet(ih, lin1, col1, mark, markedit_cb, mark_cb, str); + iupMatrixDrawCells(ih, lin1, col1, lin1, col1); + } +} + +static void iMatrixMarkBlock(Ihandle* ih, int lin1, int col1, int lin2, int col2, int mark, IFniii markedit_cb, IFnii mark_cb, char* str) +{ + int lin, col; + + if (lin1 > lin2) {int t = lin1; lin1 = lin2; lin2 = t;} + if (col1 > col2) {int t = col1; col1 = col2; col2 = t;} + + if (ih->data->mark_full1 == IMAT_PROCESS_LIN) + { + for(lin=lin1; lin<=lin2; lin++) + iMatrixMarkItem(ih, lin, 0, mark, markedit_cb, mark_cb, str); + } + else if(ih->data->mark_full1 == IMAT_PROCESS_COL) + { + for(col=col1; col<=col2; col++) + iMatrixMarkItem(ih, 0, col, mark, markedit_cb, mark_cb, str); + } + else if (ih->data->mark_mode == IMAT_MARK_CELL) + { + for(lin=lin1; lin<=lin2; lin++) + { + for(col=col1; col<=col2; col++) + iMatrixMarkItem(ih, lin, col, mark, markedit_cb, mark_cb, str); + } + } +} + +void iupMatrixMarkMouseBlock(Ihandle* ih, int lin2, int col2) +{ + /* called only when "shift" is pressed and MARKMULTIPLE=YES */ + IFniii markedit_cb = NULL; + IFnii mark_cb = NULL; + char str[100]; + + iupMatrixPrepareDrawData(ih); + + ih->data->mark_full2 = 0; + + if (lin2 == 0 && col2 == 0) + return; + /* If it was pointing for a column title... */ + else if (lin2 == 0) + { + if ((ih->data->mark_mode == IMAT_MARK_CELL && ih->data->mark_multiple) || + ih->data->mark_mode & IMAT_MARK_COL) + ih->data->mark_full2 = IMAT_PROCESS_COL; + } + /* If it was pointing for a line title... */ + else if (col2 == 0) + { + if ((ih->data->mark_mode == IMAT_MARK_CELL && ih->data->mark_multiple) || + ih->data->mark_mode & IMAT_MARK_LIN) + ih->data->mark_full2 = IMAT_PROCESS_LIN; + } + + /* if new block is not the same, does nothing */ + if (ih->data->mark_full1 != ih->data->mark_full2) + return; + + if (ih->data->mark_mode == IMAT_MARK_CELL && ih->data->callback_mode) + { + markedit_cb = (IFniii)IupGetCallback(ih, "MARKEDIT_CB"); + mark_cb = (IFnii)IupGetCallback(ih, "MARK_CB"); + } + + /* Unmark previous block */ + if (ih->data->mark_lin1 != -1 && ih->data->mark_lin2 != -1 && + ih->data->mark_col1 != -1 && ih->data->mark_col2 != -1) + iMatrixMarkBlock(ih, ih->data->mark_lin1, ih->data->mark_col1, ih->data->mark_lin2, ih->data->mark_col2, 0, markedit_cb, mark_cb, str); + + ih->data->mark_lin2 = lin2; + ih->data->mark_col2 = col2; + + /* Unmark new block */ + iMatrixMarkBlock(ih, ih->data->mark_lin1, ih->data->mark_col1, ih->data->mark_lin2, ih->data->mark_col2, 1, markedit_cb, mark_cb, str); +} + +void iupMatrixMarkMouseReset(Ihandle* ih) +{ + ih->data->mark_lin1 = -1; + ih->data->mark_col1 = -1; + ih->data->mark_lin2 = -1; + ih->data->mark_col2 = -1; + + ih->data->mark_full1 = 0; + ih->data->mark_full2 = 0; +} + +void iupMatrixMarkMouseItem(Ihandle* ih, int ctrl, int lin1, int col1) +{ + int mark = 1, mark_full_all, lin, col; + IFniii markedit_cb = NULL; + IFnii mark_cb = NULL; + char str[100]; + + iupMatrixMarkMouseReset(ih); + iupMatrixPrepareDrawData(ih); + + if (!ih->data->mark_multiple || ih->data->mark_continuous || !ctrl) + { + iupMatrixMarkClearAll(ih, 1); + iupMatrixDraw(ih, 0); + } + else + mark = -1; /* toggle mark state */ + + ih->data->mark_full1 = 0; + mark_full_all = 0; + + if (lin1 == 0 && col1 == 0) + { + if ((ih->data->mark_mode == IMAT_MARK_CELL && ih->data->mark_multiple) || + ih->data->mark_mode == IMAT_MARK_COL || + ih->data->mark_mode == IMAT_MARK_LIN) + mark_full_all = 1; + } + /* If it was pointing for a column title... */ + else if (lin1 == 0) + { + if ((ih->data->mark_mode == IMAT_MARK_CELL && ih->data->mark_multiple) || + ih->data->mark_mode & IMAT_MARK_COL) + ih->data->mark_full1 = IMAT_PROCESS_COL; + } + /* If it was pointing for a line title... */ + else if (col1 == 0) + { + if ((ih->data->mark_mode == IMAT_MARK_CELL && ih->data->mark_multiple) || + ih->data->mark_mode & IMAT_MARK_LIN) + ih->data->mark_full1 = IMAT_PROCESS_LIN; + } + + if (ih->data->mark_mode == IMAT_MARK_CELL && ih->data->callback_mode) + { + markedit_cb = (IFniii)IupGetCallback(ih, "MARKEDIT_CB"); + mark_cb = (IFnii)IupGetCallback(ih, "MARK_CB"); + } + + if (mark_full_all) + { + if (ih->data->mark_mode == IMAT_MARK_CELL) + { + char str[100]; + for (col = 1; col < ih->data->columns.num; col++) + { + for(lin = 1; lin < ih->data->lines.num; lin++) + iMatrixMarkCellSet(ih, lin, col, mark, markedit_cb, mark_cb, str); + } + } + else if (ih->data->mark_mode == IMAT_MARK_LIN) + { + for(lin = 1; lin < ih->data->lines.num; lin++) + iMatrixMarkLinSet(ih, lin, mark); + + iupMatrixDrawLineTitle(ih, 1, ih->data->lines.num-1); + } + else if (ih->data->mark_mode == IMAT_MARK_COL) + { + for (col = 1; col < ih->data->columns.num; col++) + iMatrixMarkColSet(ih, col, mark); + + iupMatrixDrawColumnTitle(ih, 1, ih->data->columns.num-1); + } + + iupMatrixDrawCells(ih, 1, 1, ih->data->lines.num-1, ih->data->columns.num-1); + } + else + iMatrixMarkItem(ih, lin1, col1, mark, markedit_cb, mark_cb, str); + + ih->data->mark_lin1 = lin1; + ih->data->mark_col1 = col1; +} + +static void iMatrixMarkAllLinCol(ImatLinColData *p, int mark) +{ + int i; + for(i = 1; i < p->num; i++) + { + if (mark) + p->flags[i] |= IUPMAT_MARK; + else + p->flags[i] &= ~IUPMAT_MARK; + } +} + +void iupMatrixMarkClearAll(Ihandle* ih, int check) +{ + /* "!check" is used to clear all marks independent from MARKMODE */ + + if (ih->data->mark_mode == IMAT_MARK_CELL || !check) + { + int lin, col; + IFniii markedit_cb = NULL; + char str[100]; + + if (check) + markedit_cb = (IFniii)IupGetCallback(ih, "MARKEDIT_CB"); + + for(lin = 1; lin < ih->data->lines.num; lin++) + { + for(col = 1; col < ih->data->columns.num; col++) + iMatrixMarkCellSet(ih, lin, col, 0, markedit_cb, NULL, str); + } + } + + if (ih->data->mark_mode & IMAT_MARK_LIN || !check) + iMatrixMarkAllLinCol(&(ih->data->lines), 0); + + if (ih->data->mark_mode & IMAT_MARK_COL || !check) + iMatrixMarkAllLinCol(&(ih->data->columns), 0); +} + +int iupMatrixColumnIsMarked(Ihandle* ih, int col) +{ + if (col == 0 || /* Line titles are never marked... */ + !(ih->data->mark_mode & IMAT_MARK_COL)) + return 0; + + return ih->data->columns.flags[col] & IUPMAT_MARK; +} + +int iupMatrixLineIsMarked(Ihandle* ih, int lin) +{ + if (lin == 0 || /* Column titles are never marked... */ + !(ih->data->mark_mode & IMAT_MARK_LIN)) + return 0; + + return ih->data->lines.flags[lin] & IUPMAT_MARK; +} + +int iupMatrixSetMarkedAttrib(Ihandle* ih, const char* value) +{ + int lin, col, mark; + char str[100]; + IFniii markedit_cb; + + if (ih->data->mark_mode == IMAT_MARK_NO) + return 0; + + if (!value) + iupMatrixMarkClearAll(ih, 1); + else if (*value == 'C' || *value == 'c') /* columns */ + { + if (ih->data->mark_mode == IMAT_MARK_LIN) + return 0; + + value++; /* skip C mark */ + if ((int)strlen(value) != ih->data->columns.num-1) + return 0; + + markedit_cb = (IFniii)IupGetCallback(ih, "MARKEDIT_CB"); + + for(col = 1; col < ih->data->columns.num; col++) + { + if (*value++ == '1') + mark = 1; + else + mark = 0; + + /* mark all the cells for that column */ + if (ih->data->mark_mode == IMAT_MARK_CELL) + { + for(lin = 1; lin < ih->data->lines.num; lin++) + iMatrixMarkCellSet(ih, lin, col, mark, markedit_cb, NULL, str); + } + else + iMatrixMarkColSet(ih, col, mark); + } + + if (ih->data->mark_mode & IMAT_MARK_LIN) + iMatrixMarkAllLinCol(&(ih->data->lines), 0); + } + else if (*value == 'L' || *value == 'l') /* lines */ + { + if (ih->data->mark_mode == IMAT_MARK_COL) + return 0; + + value++; /* skip L mark */ + if ((int)strlen(value) != ih->data->lines.num-1) + return 0; + + markedit_cb = (IFniii)IupGetCallback(ih, "MARKEDIT_CB"); + + for(lin = 1; lin < ih->data->lines.num; lin++) + { + if (*value++ == '1') + mark = 1; + else + mark = 0; + + /* Mark all the cells for that line */ + if (ih->data->mark_mode == IMAT_MARK_CELL) + { + for(col = 1; col < ih->data->columns.num; col++) + iMatrixMarkCellSet(ih, lin, col, mark, markedit_cb, NULL, str); + } + else + iMatrixMarkLinSet(ih, lin, mark); + } + + if (ih->data->mark_mode & IMAT_MARK_COL) + iMatrixMarkAllLinCol(&(ih->data->columns), 0); + } + else if (ih->data->mark_mode == IMAT_MARK_CELL) /* cells */ + { + if ((int)strlen(value) != (ih->data->lines.num-1)*(ih->data->columns.num-1)) + return 0; + + markedit_cb = (IFniii)IupGetCallback(ih, "MARKEDIT_CB"); + + for(lin = 1; lin < ih->data->lines.num; lin++) + { + for(col = 1; col < ih->data->columns.num; col++) + { + if (*value++ == '1') + mark = 1; + else + mark = 0; + + iMatrixMarkCellSet(ih, lin, col, mark, markedit_cb, NULL, str); + } + } + } + + if (ih->handle) + iupMatrixDraw(ih, 1); + + return 0; +} + +char* iupMatrixGetMarkedAttrib(Ihandle* ih) +{ + int lin, col, size; + IFnii mark_cb; + char str[100]; + char* p, *value = NULL; + int exist_mark = 0; /* Show if there is someone marked */ + + if (ih->data->mark_mode == IMAT_MARK_NO) + return NULL; + + mark_cb = (IFnii)IupGetCallback(ih, "MARK_CB"); + + if (ih->data->mark_mode == IMAT_MARK_CELL) + { + size = (ih->data->lines.num-1) * (ih->data->columns.num-1) + 1; + value = iupStrGetMemory(size); + p = value; + + for(lin = 1; lin < ih->data->lines.num; lin++) + { + for(col = 1; col < ih->data->columns.num; col++) + { + if (iupMatrixMarkCellGet(ih, lin, col, mark_cb, str)) + { + exist_mark = 1; + *p++ = '1'; + } + else + *p++ = '0'; + } + } + *p = 0; + } + else + { + int marked_lines = 0, marked_cols = 0; + + if (ih->data->mark_mode == IMAT_MARK_LINCOL) /* must find which format to return */ + { + /* look for a marked column */ + for(col = 1; col < ih->data->columns.num; col++) + { + if (ih->data->columns.flags[col] & IUPMAT_MARK) + { + marked_cols = 1; /* at least one column is marked */ + break; + } + } + + if (!marked_cols) + marked_lines = 1; + } + else if (ih->data->mark_mode == IMAT_MARK_LIN) + marked_lines = 1; + else if (ih->data->mark_mode == IMAT_MARK_COL) + marked_cols = 1; + + if (marked_lines) + { + size = 1 + (ih->data->lines.num-1) + 1; + value = iupStrGetMemory(size); + p = value; + + *p++ = 'L'; + + for(lin = 1; lin < ih->data->lines.num; lin++) + { + if (ih->data->lines.flags[lin] & IUPMAT_MARK) + { + exist_mark = 1; + *p++ = '1'; + } + else + *p++ = '0'; + } + *p = 0; + } + else if (marked_cols) + { + size = 1 + (ih->data->columns.num-1) + 1; + value = iupStrGetMemory(size); + p = value; + + *p++ = 'C'; + + for(col = 1; col < ih->data->columns.num; col++) + { + if (ih->data->columns.flags[col] & IUPMAT_MARK) + { + exist_mark = 1; + *p++ = '1'; + } + else + *p++ = '0'; + } + *p = 0; + } + } + + return exist_mark? value: NULL; +} + +int iupMatrixSetMarkAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int lin = 0, col = 0; + + if (ih->data->mark_mode == IMAT_MARK_NO) + return 0; + + if (iupStrToIntInt(name_id, &lin, &col, ':') == 2) + { + if (!iupMatrixCheckCellPos(ih, lin, col)) + return 0; + + if (ih->data->mark_mode == IMAT_MARK_CELL) + { + int mark; + + if (lin == 0 || col == 0) /* title can NOT have a mark */ + return 0; + + mark = iupStrBoolean(value); + + if (ih->data->callback_mode) + { + IFniii markedit_cb = (IFniii)IupGetCallback(ih, "MARKEDIT_CB"); + if (markedit_cb) + markedit_cb(ih, lin, col, mark); + else if (mark) + return 1; /* store the attribute */ + } + else + { + if (mark) + ih->data->cells[lin][col].flags |= IUPMAT_MARK; + else + ih->data->cells[lin][col].flags &= ~IUPMAT_MARK; + } + + if (ih->handle) + { + /* This assumes that the matrix has been draw completely previously */ + iupMatrixPrepareDrawData(ih); + iupMatrixDrawCells(ih, lin, col, lin, col); + } + } + else + { + int mark = iupStrBoolean(value); + + if (ih->data->mark_mode & IMAT_MARK_LIN && lin!=0) + { + if (mark) + ih->data->lines.flags[lin] |= IUPMAT_MARK; + else + ih->data->lines.flags[lin] &= ~IUPMAT_MARK; + } + + if (ih->data->mark_mode & IMAT_MARK_COL && col!=0) + { + if (mark) + ih->data->columns.flags[col] |= IUPMAT_MARK; + else + ih->data->columns.flags[col] &= ~IUPMAT_MARK; + } + + if (ih->handle) + { + /* This assumes that the matrix has been draw completely previously */ + iupMatrixPrepareDrawData(ih); + iupMatrixDrawCells(ih, lin, col, lin, col); + } + } + } + + return 0; +} + +char* iupMatrixGetMarkAttrib(Ihandle* ih, const char* name_id) +{ + int lin = 0, col = 0; + + if (ih->data->mark_mode == IMAT_MARK_NO) + return "0"; + + if (iupStrToIntInt(name_id, &lin, &col, ':') == 2) + { + if (!iupMatrixCheckCellPos(ih, lin, col)) + return NULL; + + if (ih->data->mark_mode == IMAT_MARK_CELL) + { + if (lin == 0 || col == 0) /* title can NOT have a mark */ + return NULL; + + if (ih->data->callback_mode) + { + IFnii mark_cb = (IFnii)IupGetCallback(ih, "MARK_CB"); + if (mark_cb) + { + if (mark_cb(ih, lin, col)) + return "1"; + else + return "0"; + } + else + return NULL; /* let check the hash table */ + } + else + { + if (ih->data->cells[lin][col].flags & IUPMAT_MARK) + return "1"; + else + return "0"; + } + } + else + { + if (ih->data->mark_mode & IMAT_MARK_LIN && lin!=0 && ih->data->lines.flags[lin] & IUPMAT_MARK) + return "1"; + + if (ih->data->mark_mode & IMAT_MARK_COL && col!=0 && ih->data->columns.flags[col] & IUPMAT_MARK) + return "1"; + + return "0"; + } + } + + return NULL; +} diff --git a/iup/srccontrols/matrix/iupmat_mark.h b/iup/srccontrols/matrix/iupmat_mark.h new file mode 100755 index 0000000..819916e --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_mark.h @@ -0,0 +1,42 @@ +/** \file + * \brief iupmatrix. cell selection. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_MARK_H +#define __IUPMAT_MARK_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Used to mark (or not mark) cells */ +#define IMAT_MARK_NO 0 +#define IMAT_MARK_LIN 1 +#define IMAT_MARK_COL 2 +#define IMAT_MARK_LINCOL 3 +#define IMAT_MARK_CELL 4 + +int iupMatrixSetMarkedAttrib(Ihandle* ih, const char* value); +char* iupMatrixGetMarkedAttrib(Ihandle* ih); +char* iupMatrixGetMarkAttrib(Ihandle* ih, const char* name_id); +int iupMatrixSetMarkAttrib(Ihandle* ih, const char* name_id, const char* value); + +void iupMatrixMarkClearAll(Ihandle* ih, int check); + +int iupMatrixMarkCellGet(Ihandle* ih, int lin, int col, IFnii mark_cb, char* str); + +int iupMatrixColumnIsMarked(Ihandle* ih, int col); +int iupMatrixLineIsMarked (Ihandle* ih, int lin); + +void iupMatrixMarkMouseBlock(Ihandle* ih, int lin2, int col2); +void iupMatrixMarkMouseItem(Ihandle* ih, int ctrl, int lin1, int col1); +void iupMatrixMarkMouseReset(Ihandle* ih); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_mem.c b/iup/srccontrols/matrix/iupmat_mem.c new file mode 100755 index 0000000..eebea7a --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_mem.c @@ -0,0 +1,319 @@ +/** \file + * \brief iupmatrix control memory allocation + * + * See Copyright Notice in "iup.h" + */ + +/**************************************************************************/ +/* Functions to allocate memory */ +/**************************************************************************/ + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" + +#include "iupmat_def.h" +#include "iupmat_mem.h" + + +static void iMatrixGetInitialValues(Ihandle* ih) +{ + int lin, col; + char* value; + char attr[100]; + + for (lin=0; lindata->lines.num; lin++) + { + for (col=0; coldata->columns.num; col++) + { + sprintf(attr, "%d:%d", lin, col); + value = iupAttribGet(ih, attr); + if (value) + { + /* get the initial value and remove it from the hash table */ + + if (*value) + ih->data->cells[lin][col].value = iupStrDup(value); + + iupAttribSetStr(ih, attr, NULL); + } + } + } +} + +void iupMatrixMemAlloc(Ihandle* ih) +{ + ih->data->lines.num_alloc = ih->data->lines.num; + if (ih->data->lines.num_alloc == 1) + ih->data->lines.num_alloc = 5; + + ih->data->columns.num_alloc = ih->data->columns.num; + if (ih->data->columns.num_alloc == 1) + ih->data->columns.num_alloc = 5; + + if (!ih->data->callback_mode) + { + int lin; + + ih->data->cells = (ImatCell**)calloc(ih->data->lines.num_alloc, sizeof(ImatCell*)); + for (lin = 0; lin < ih->data->lines.num_alloc; lin++) + ih->data->cells[lin] = (ImatCell*)calloc(ih->data->columns.num_alloc, sizeof(ImatCell)); + + iMatrixGetInitialValues(ih); + } + + ih->data->lines.flags = (unsigned char*)calloc(ih->data->lines.num_alloc, sizeof(unsigned char)); + ih->data->columns.flags = (unsigned char*)calloc(ih->data->columns.num_alloc, sizeof(unsigned char)); + ih->data->lines.sizes = (int*)calloc(ih->data->lines.num_alloc, sizeof(int)); + ih->data->columns.sizes = (int*)calloc(ih->data->columns.num_alloc, sizeof(int)); +} + +void iupMatrixMemRelease(Ihandle* ih) +{ + if (ih->data->cells) + { + int lin, col; + for (lin = 0; lin < ih->data->lines.num_alloc; lin++) + { + for (col = 0; col < ih->data->columns.num_alloc; col++) + { + ImatCell* cell = &(ih->data->cells[lin][col]); + if (cell->value) + { + free(cell->value); + cell->value = NULL; + } + } + free(ih->data->cells[lin]); + ih->data->cells[lin] = NULL; + } + free(ih->data->cells); + ih->data->cells = NULL; + } + + if (ih->data->columns.flags) + { + free(ih->data->columns.flags); + ih->data->columns.flags = NULL; + } + + if (ih->data->lines.flags) + { + free(ih->data->lines.flags); + ih->data->lines.flags = NULL; + } + + if (ih->data->columns.sizes) + { + free(ih->data->columns.sizes); + ih->data->columns.sizes = NULL; + } + + if (ih->data->lines.sizes) + { + free(ih->data->lines.sizes); + ih->data->lines.sizes = NULL; + } +} + +void iupMatrixMemReAllocLines(Ihandle* ih, int old_num, int num, int base) +{ + int lin, col, end, diff_num, shift_num; + + /* base is the first line where the change started */ + + /* If it doesn't have enough lines allocated, then allocate more space */ + if (num > ih->data->lines.num_alloc) /* this also implicates that num>old_num */ + { + int old_alloc = ih->data->lines.num_alloc; + ih->data->lines.num_alloc = num; + + if (!ih->data->callback_mode) + { + ih->data->cells = (ImatCell**)realloc(ih->data->cells, ih->data->lines.num_alloc*sizeof(ImatCell*)); + + /* new space are allocated at the end, later we need to move the old data and clear the available space */ + for(lin = old_alloc; lin < num; lin++) + ih->data->cells[lin] = (ImatCell*)calloc(ih->data->columns.num_alloc, sizeof(ImatCell)); + } + + ih->data->lines.sizes = (int*)realloc(ih->data->lines.sizes, ih->data->lines.num_alloc*sizeof(int)); + ih->data->lines.flags = (unsigned char*)realloc(ih->data->lines.flags, ih->data->lines.num_alloc*sizeof(unsigned char)); + } + + if (old_num==num) + return; + + if (num>old_num) /* ADD */ + { + diff_num = num-old_num; /* size of the openned space */ + shift_num = old_num-base; /* size of the data to be moved (base maximum is old_num) */ + end = base+diff_num; + + /* shift the old data, opening space for new data, from base to end */ + /* do it in reverse order to avoid overlapping */ + if (shift_num) + { + if (!ih->data->callback_mode) + for (lin = shift_num-1; lin >= 0; lin--) /* all columns, shift_num lines */ + memmove(ih->data->cells[lin+end], ih->data->cells[lin+base], ih->data->columns.num_alloc*sizeof(ImatCell)); + memmove(ih->data->lines.sizes+end, ih->data->lines.sizes+base, shift_num*sizeof(int)); + memmove(ih->data->lines.flags+end, ih->data->lines.flags+base, shift_num*sizeof(unsigned char)); + } + + /* then clear the new space starting at base */ + if (!ih->data->callback_mode) + for (lin = 0; lin < diff_num; lin++) /* all columns, diff_num lines */ + memset(ih->data->cells[lin+base], 0, ih->data->columns.num_alloc*sizeof(ImatCell)); + memset(ih->data->lines.sizes+base, 0, diff_num*sizeof(int)); + memset(ih->data->lines.flags+base, 0, diff_num*sizeof(unsigned char)); + } + else /* DEL */ + { + diff_num = old_num-num; /* size of the openned space */ + shift_num = num-base; /* size of the data to be moved */ + end = base+diff_num; + + /* release memory from the opened space */ + if (!ih->data->callback_mode) + { + for(lin = base; lin < end; lin++) /* all columns, base-end lines */ + { + for (col = 0; col < ih->data->columns.num_alloc; col++) + { + ImatCell* cell = &(ih->data->cells[lin][col]); + if (cell->value) + { + free(cell->value); + cell->value = NULL; + } + cell->flags = 0; + } + } + } + + /* move the old data to opened space from end to base */ + if (shift_num) + { + if (!ih->data->callback_mode) + for (lin = 0; lin < shift_num; lin++) /* all columns, shift_num lines */ + memmove(ih->data->cells[lin+base], ih->data->cells[lin+end], ih->data->columns.num_alloc*sizeof(ImatCell)); + memmove(ih->data->lines.sizes+base, ih->data->lines.sizes+end, shift_num*sizeof(int)); + memmove(ih->data->lines.flags+base, ih->data->lines.flags+end, shift_num*sizeof(unsigned char)); + } + + /* then clear the remaining space starting at num */ + if (!ih->data->callback_mode) + for (lin = 0; lin < diff_num; lin++) /* all columns, diff_num lines */ + memset(ih->data->cells[lin+num], 0, ih->data->columns.num_alloc*sizeof(ImatCell)); + memset(ih->data->lines.sizes+num, 0, diff_num*sizeof(int)); + memset(ih->data->lines.flags+num, 0, diff_num*sizeof(unsigned char)); + } +} + +void iupMatrixMemReAllocColumns(Ihandle* ih, int old_num, int num, int base) +{ + int lin, col, end, diff_num, shift_num; + + /* base is the first column where the change started */ + + /* If it doesn't have enough columns allocated, then allocate more space */ + if (num > ih->data->columns.num_alloc) /* this also implicates that also num>old_num */ + { + ih->data->columns.num_alloc = num; + + /* new space are allocated at the end, later we need to move the old data and clear the available space */ + + if (!ih->data->callback_mode) + { + for(lin = 0; lin < ih->data->lines.num_alloc; lin++) + ih->data->cells[lin] = (ImatCell*)realloc(ih->data->cells[lin], ih->data->columns.num_alloc*sizeof(ImatCell)); + } + + ih->data->columns.sizes = (int*)realloc(ih->data->columns.sizes, ih->data->columns.num_alloc*sizeof(int)); + ih->data->columns.flags = (unsigned char*)realloc(ih->data->columns.flags, ih->data->columns.num_alloc*sizeof(unsigned char)); + } + + if (old_num==num) + return; + + if (num>old_num) /* ADD */ + { + /* even if (old_num-base)>(num-old_num) memmove will correctly copy the memory */ + /* then clear the openned space starting at base */ + + diff_num = num-old_num; /* size of the openned space */ + shift_num = old_num-base; /* size of the data to be moved (base maximum is old_num) */ + end = base+diff_num; + + /* shift the old data, opening space for new data, from base to end */ + if (shift_num) + { + if (!ih->data->callback_mode) + for (lin = 0; lin < ih->data->lines.num_alloc; lin++) /* all lines, shift_num columns */ + memmove(ih->data->cells[lin]+end, ih->data->cells[lin]+base, shift_num*sizeof(ImatCell)); + memmove(ih->data->columns.sizes+end, ih->data->columns.sizes+base, shift_num*sizeof(int)); + memmove(ih->data->columns.flags+end, ih->data->columns.flags+base, shift_num*sizeof(unsigned char)); + } + + /* then clear the openned space starting at base */ + if (!ih->data->callback_mode) + for (lin = 0; lin < ih->data->lines.num_alloc; lin++) /* all lines, diff_num columns */ + memset(ih->data->cells[lin]+base, 0, diff_num*sizeof(ImatCell)); + memset(ih->data->columns.sizes+base, 0, diff_num*sizeof(int)); + memset(ih->data->columns.flags+base, 0, diff_num*sizeof(unsigned char)); + } + else /* DEL */ + { + diff_num = old_num-num; /* size of the openned space */ + shift_num = num-base; /* size of the data to be moved */ + end = base+diff_num; + + /* release memory from the opened space */ + if (!ih->data->callback_mode) + { + for (lin = 0; lin < ih->data->lines.num_alloc; lin++) /* all lines, base-end columns */ + { + for(col = base; col < end; col++) + { + ImatCell* cell = &(ih->data->cells[lin][col]); + if (cell->value) + { + free(cell->value); + cell->value = NULL; + } + cell->flags = 0; + } + } + } + + /* move the old data to opened space from end to base */ + /* even if (num-base)>(old_num-num) memmove will correctly copy the memory */ + if (shift_num) + { + if (!ih->data->callback_mode) + for (lin = 0; lin < ih->data->lines.num_alloc; lin++) /* all lines, shift_num columns */ + memmove(ih->data->cells[lin]+base, ih->data->cells[lin]+end, shift_num*sizeof(ImatCell)); + memmove(ih->data->columns.sizes+base, ih->data->columns.sizes+end, shift_num*sizeof(int)); + memmove(ih->data->columns.flags+base, ih->data->columns.flags+end, shift_num*sizeof(unsigned char)); + } + + /* then clear the remaining space starting at num */ + if (!ih->data->callback_mode) + for (lin = 0; lin < ih->data->lines.num_alloc; lin++) /* all lines, diff_num columns */ + memset(ih->data->cells[lin]+num, 0, diff_num*sizeof(ImatCell)); + memset(ih->data->columns.sizes+num, 0, diff_num*sizeof(int)); + memset(ih->data->columns.flags+num, 0, diff_num*sizeof(unsigned char)); + } +} diff --git a/iup/srccontrols/matrix/iupmat_mem.h b/iup/srccontrols/matrix/iupmat_mem.h new file mode 100755 index 0000000..05a047b --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_mem.h @@ -0,0 +1,24 @@ +/** \file + * \brief iupmatrix control + * memory allocation. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_MEM_H +#define __IUPMAT_MEM_H + +#ifdef __cplusplus +extern "C" { +#endif + +void iupMatrixMemAlloc(Ihandle* ih); +void iupMatrixMemRelease(Ihandle* ih); +void iupMatrixMemReAllocLines (Ihandle* ih, int old_num, int num, int base); +void iupMatrixMemReAllocColumns(Ihandle* ih, int old_num, int num, int base); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_mouse.c b/iup/srccontrols/matrix/iupmat_mouse.c new file mode 100755 index 0000000..33b5fe7 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_mouse.c @@ -0,0 +1,212 @@ +/** \file + * \brief iupmatrix control + * mouse events + * + * See Copyright Notice in "iup.h" + */ + +/**************************************************************************/ +/* Functions to handle mouse events */ +/**************************************************************************/ + +#include + +#include "iup.h" +#include "iupcbs.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" + +#include "iupmat_def.h" +#include "iupmat_colres.h" +#include "iupmat_aux.h" +#include "iupmat_focus.h" +#include "iupmat_mouse.h" +#include "iupmat_key.h" +#include "iupmat_mark.h" +#include "iupmat_edit.h" +#include "iupmat_draw.h" +#include "iupmat_scroll.h" + + +#define IMAT_DRAG_SCROLL_DELTA 5 + +static void iMatrixMouseCallMoveCb(Ihandle* ih, int lin, int col) +{ + IFnii cb = (IFnii)IupGetCallback(ih, "MOUSEMOVE_CB"); + if (cb) + cb(ih, lin, col); +} + +static int iMatrixMouseCallClickCb(Ihandle* ih, int press, int lin, int col, char* r) +{ + IFniis cb; + + if (press) + cb = (IFniis)IupGetCallback(ih, "CLICK_CB"); + else + cb = (IFniis)IupGetCallback(ih, "RELEASE_CB"); + + if (cb) + return cb(ih, lin, col, r); + + return IUP_DEFAULT; +} + +static void iMatrixMouseLeftPress(Ihandle* ih, int lin, int col, int shift, int ctrl, int dclick) +{ + if (dclick) + { + iupMatrixMarkMouseReset(ih); + + if (lin==0 || col==0) + return; + + /* if a double click NOT in the current cell */ + if (lin != ih->data->lines.focus_cell || col != ih->data->columns.focus_cell) + { + /* leave the previous cell if the matrix previously had the focus */ + if (ih->data->has_focus && iupMatrixAuxCallLeaveCellCb(ih) == IUP_IGNORE) + return; + + iupMatrixFocusSet(ih, lin, col); + + iupMatrixAuxCallEnterCellCb(ih); + } + + if (iupMatrixEditShow(ih)) + { + if(ih->data->datah == ih->data->droph) + IupSetAttribute(ih->data->datah, "SHOWDROPDOWN", "YES"); + + if (iupStrEqualNoCase(IupGetGlobal("DRIVER"), "Motif")) + if(atoi(IupGetGlobal("MOTIFNUMBER")) < 2203) /* since OpenMotif version 2.2.3 this is not necessary */ + iupAttribSetStr(ih, "_IUPMAT_DOUBLE_CLICK", "1"); + } + } + else /* single click */ + { + if (shift && ih->data->mark_multiple && ih->data->mark_mode != IMAT_MARK_NO) + { + iupMatrixMarkMouseBlock(ih, lin, col); + } + else + { + ih->data->leftpressed = 1; + + if (lin>0 && col>0) + { + if (iupMatrixAuxCallLeaveCellCb(ih) == IUP_IGNORE) + return; + + iupMatrixFocusSet(ih, lin, col); + + /* process mark before EnterCell */ + if (ih->data->mark_mode != IMAT_MARK_NO) + iupMatrixMarkMouseItem(ih, ctrl, lin, col); + + iupMatrixAuxCallEnterCellCb(ih); + } + else + { + /* only process marks if at titles */ + if (ih->data->mark_mode != IMAT_MARK_NO) + iupMatrixMarkMouseItem(ih, ctrl, lin, col); + } + } + } +} + +int iupMatrixMouseButton_CB(Ihandle* ih, int b, int press, int x, int y, char* r) +{ + int lin=-1, col=-1; + + if (!iupMatrixIsValid(ih, 0)) + return IUP_DEFAULT; + + /* reset press state */ + ih->data->leftpressed = 0; + + if (press) + { + /* The edit Focus callback is not called when the user clicks in the parent canvas. + so we have to compensate that. */ + iupMatrixEditForceHidden(ih); + ih->data->has_focus = 1; + } + + iupMatrixAuxGetLinColFromXY(ih, x, y, &lin, &col); + + if (b == IUP_BUTTON1) + { + if (press) + { + iupMatrixKeyResetHomeEndCount(ih); + + if (iupMatrixColResStart(ih, x, y)) + return IUP_DEFAULT; /* Resize of the width a of a column was started */ + + if (lin!=-1 && col!=-1) + iMatrixMouseLeftPress(ih, lin, col, isshift(r), iscontrol(r), isdouble(r)); + } + else + { + if (iupMatrixColResIsResizing(ih)) /* If it was made a column resize, finish it */ + iupMatrixColResFinish(ih, x); + } + } + else + iupMatrixMarkMouseReset(ih); + + if (lin!=-1 && col!=-1) + { + if (iMatrixMouseCallClickCb(ih, press, lin, col, r) == IUP_IGNORE) + return IUP_DEFAULT; + } + + iupMatrixDrawUpdate(ih); + return IUP_DEFAULT; +} + +int iupMatrixMouseMove_CB(Ihandle* ih, int x, int y) +{ + int lin, col; + + if (!iupMatrixIsValid(ih, 0)) + return IUP_DEFAULT; + + if (ih->data->leftpressed && ih->data->mark_multiple && ih->data->mark_mode != IMAT_MARK_NO) + { + if ((x < ih->data->columns.sizes[0] || x < IMAT_DRAG_SCROLL_DELTA) && (ih->data->columns.first > 1)) + iupMatrixScrollLeft(ih); + else if ((x > ih->data->w - IMAT_DRAG_SCROLL_DELTA) && (ih->data->columns.last < ih->data->columns.num-1)) + iupMatrixScrollRight(ih); + + if ((y < ih->data->lines.sizes[0] || y < IMAT_DRAG_SCROLL_DELTA) && (ih->data->lines.first > 1)) + iupMatrixScrollUp(ih); + else if ((y > ih->data->h - IMAT_DRAG_SCROLL_DELTA) && (ih->data->lines.last < ih->data->lines.num-1)) + iupMatrixScrollDown(ih); + + if (iupMatrixAuxGetLinColFromXY(ih, x, y, &lin, &col)) + { + iupMatrixMarkMouseBlock(ih, lin, col); + iupMatrixDrawUpdate(ih); + + iMatrixMouseCallMoveCb(ih, lin, col); + } + return IUP_DEFAULT; + } + else if(iupMatrixColResIsResizing(ih)) /* Make a resize in a column size */ + iupMatrixColResMove(ih, x); + else /* Change cursor when it is passed on a join involving column titles */ + iupMatrixColResCheckChangeCursor(ih, x, y); + + if (iupMatrixAuxGetLinColFromXY(ih, x, y, &lin, &col)) + iMatrixMouseCallMoveCb(ih, lin, col); + + return IUP_DEFAULT; +} diff --git a/iup/srccontrols/matrix/iupmat_mouse.h b/iup/srccontrols/matrix/iupmat_mouse.h new file mode 100755 index 0000000..17a09ec --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_mouse.h @@ -0,0 +1,22 @@ +/** \file + * \brief iMatrixrix control + * mouse events. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_MOUSE_H +#define __IUPMAT_MOUSE_H + +#ifdef __cplusplus +extern "C" { +#endif + +int iupMatrixMouseButton_CB (Ihandle* ih, int b, int press, int x, int y, char* r); +int iupMatrixMouseMove_CB (Ihandle* ih, int x, int y); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_numlc.c b/iup/srccontrols/matrix/iupmat_numlc.c new file mode 100755 index 0000000..e48720a --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_numlc.c @@ -0,0 +1,495 @@ +/** \file + * \brief iupmatrix control + * change number of columns or lines + * + * See Copyright Notice in "iup.h" + */ + +/**************************************************************************/ +/* Functions to change the number of lines and columns of the matrix, */ +/* after it has been created. */ +/**************************************************************************/ + +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" + +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" + +#include "iupmat_def.h" +#include "iupmat_edit.h" +#include "iupmat_mem.h" +#include "iupmat_numlc.h" +#include "iupmat_draw.h" + + +static void iMatrixUpdateLineAttributes(Ihandle* ih, int base, int count, int add) +{ +#define IMAT_NUM_ATTRIB_LINE 6 +#define IMAT_ATTRIB_LINE_ONLY 3 + char* attrib_format[IMAT_NUM_ATTRIB_LINE] = { + "BGCOLOR%d:*", + "FGCOLOR%d:*", + "FONT%d:*", + "BGCOLOR%d:%d", + "FGCOLOR%d:%d", + "FONT%d:%d"}; + char* attrib = iupStrGetMemory(100); + int a, lin, col; + char* value; + + if (add) /* ADD */ + { + /* copy the attributes of the moved cells, from base+count to num */ + /* do it in reverse order to avoid overlapping */ + /* then clear the new space starting from base to base+count */ + + for(a = 0; a < IMAT_NUM_ATTRIB_LINE; a++) + { + for(lin = ih->data->lines.num-1; lin >= base+count; lin--) + { + /* Update the line attributes */ + if (a < IMAT_ATTRIB_LINE_ONLY) + { + sprintf(attrib, attrib_format[a], lin-count); + value = iupAttribGet(ih, attrib); + sprintf(attrib, attrib_format[a], lin); + iupAttribStoreStr(ih, attrib, value); + } + /* Update the cell attribute */ + else for(col = 0; col < ih->data->columns.num; col++) + { + sprintf(attrib, attrib_format[a], lin-count, col); + value = iupAttribGet(ih, attrib); + sprintf(attrib, attrib_format[a], lin, col); + iupAttribStoreStr(ih, attrib, value); + } + } + + for(lin = base; lin < base+count; lin++) + { + if (a < IMAT_ATTRIB_LINE_ONLY) + { + sprintf(attrib, attrib_format[a], lin); + iupAttribSetStr(ih, attrib, NULL); + } + else for(col = 0; col < ih->data->columns.num; col++) + { + sprintf(attrib, attrib_format[a], lin, col); + iupAttribSetStr(ih, attrib, NULL); + } + } + } + } + else /* DEL */ + { + /* copy the attributes of the moved cells from base+count to base */ + /* then clear the remaining space starting at num */ + + for(a = 0; a < IMAT_NUM_ATTRIB_LINE; a++) + { + for(lin = base; lin < ih->data->lines.num; lin++) + { + /* Update the line attributes */ + if (a < IMAT_ATTRIB_LINE_ONLY) + { + sprintf(attrib, attrib_format[a], lin+count); + value = iupAttribGet(ih, attrib); + sprintf(attrib, attrib_format[a], lin); + iupAttribStoreStr(ih, attrib, value); + } + /* Update each cell attribute */ + else for(col = 0; col < ih->data->columns.num; col++) + { + sprintf(attrib, attrib_format[a], lin+count, col); + value = iupAttribGet(ih, attrib); + sprintf(attrib, attrib_format[a], lin, col); + iupAttribStoreStr(ih, attrib, value); + } + } + + for(lin = ih->data->lines.num; lin < ih->data->lines.num+count; lin++) + { + if (a < IMAT_ATTRIB_LINE_ONLY) + { + sprintf(attrib, attrib_format[a], lin); + iupAttribSetStr(ih, attrib, NULL); + } + else for(col = 0; col < ih->data->columns.num; col++) + { + sprintf(attrib, attrib_format[a], lin, col); + iupAttribSetStr(ih, attrib, NULL); + } + } + } + } +} + +static void iMatrixUpdateColumnAttributes(Ihandle* ih, int base, int count, int add) +{ +#define IMAT_NUM_ATTRIB_COL 7 +#define IMAT_ATTRIB_COL_ONLY 4 + char* attrib_format[IMAT_NUM_ATTRIB_COL] = { + "ALIGNMENT%d", + "BGCOLOR*:%d", + "FGCOLOR*:%d", + "FONT*:%d", + "BGCOLOR%d:%d", + "FGCOLOR%d:%d", + "FONT%d:%d"}; + char* attrib = iupStrGetMemory(100); + int a, col, lin; + char* value; + + if (add) /* ADD */ + { + /* update the attributes of the moved cells, from base+count to num */ + /* do it in reverse order to avoid overlapping */ + /* then clear the new space starting from base to base+count */ + + for(a = 0; a < IMAT_NUM_ATTRIB_COL; a++) + { + for(col = ih->data->columns.num-1; col >= base+count; col--) + { + /* Update the column attributes */ + if (a < IMAT_ATTRIB_COL_ONLY) + { + sprintf(attrib, attrib_format[a], col-count); + value = iupAttribGet(ih, attrib); + sprintf(attrib,attrib_format[a],col); + iupAttribStoreStr(ih, attrib, value); + } + /* Update the cell attributes */ + else for(lin = 0; lin < ih->data->lines.num; lin++) + { + sprintf(attrib, attrib_format[a], lin, col-count); + value = iupAttribGet(ih, attrib); + sprintf(attrib, attrib_format[a], lin, col); + iupAttribStoreStr(ih, attrib, value); + } + } + + for(col = base; col < base+count; col++) + { + if (a < IMAT_ATTRIB_COL_ONLY) + { + sprintf(attrib, attrib_format[a], col); + iupAttribSetStr(ih, attrib, NULL); + } + else for(lin = 0; lin < ih->data->lines.num; lin++) + { + sprintf(attrib, attrib_format[a], lin, col); + iupAttribSetStr(ih, attrib, NULL); + } + } + } + } + else /* DEL */ + { + /* copy the attributes of the moved cells from base+count to base */ + /* then clear the remaining space starting at num */ + + for(a = 0; a < IMAT_NUM_ATTRIB_COL; a++) + { + for(col = base; col < ih->data->columns.num; col++) + { + /* Update the column attributes */ + if (a < IMAT_ATTRIB_COL_ONLY) + { + sprintf(attrib, attrib_format[a], col+count); + value = iupAttribGet(ih, attrib); + sprintf(attrib, attrib_format[a], col); + iupAttribStoreStr(ih, attrib, value); + } + /* Update the cell attributes */ + else for(lin = 0; lin < ih->data->lines.num; lin++) + { + sprintf(attrib, attrib_format[a], lin, col+count); + value = iupAttribGet(ih, attrib); + sprintf(attrib, attrib_format[a], lin, col); + iupAttribStoreStr(ih, attrib, value); + } + } + + for(col = ih->data->columns.num; col < ih->data->columns.num+count; col++) + { + if (a < IMAT_ATTRIB_COL_ONLY) + { + sprintf(attrib, attrib_format[a], col); + iupAttribSetStr(ih, attrib, NULL); + } + else for(lin = 0; lin < ih->data->lines.num; lin++) + { + sprintf(attrib, attrib_format[a], lin, col); + iupAttribSetStr(ih, attrib, NULL); + } + } + } + } +} + +static int iMatrixGetStartEnd(const char* value, int *base, int *count, int max, int del) +{ + int ret; + + if (!value) + return 0; + + *base = 0; + *count = 1; + + ret = sscanf(value, "%d-%d", base, count); + if (ret <= 0 || ret > 2) + return 0; + if (ret == 1) + *count = 1; + + if (*count <= 0) + return 0; + + if (del) + { + if (*base <= 0) /* the first valid element is always 1 */ + *base = 1; + + /* when del, base can be at the last element */ + if (*base > max-1) + *base = max-1; + + /* when del, count must be inside the existant range */ + if (*base + *count > max) + *count = max - *base; + } + else + { + (*base)++; /* add after the given index, so increment to position the base */ + + if (*base <= 0) /* the first valid element is always 1 */ + *base = 1; + + /* when add, base can be just after the last element but not more */ + if (*base > max) + *base = max; + + /* when add, count can be any positive value */ + } + + return 1; +} + + +/**************************************************************************/ +/* Exported functions */ +/**************************************************************************/ + +int iupMatrixSetAddLinAttrib(Ihandle* ih, const char* value) +{ + int base, count, lines_num = ih->data->lines.num; + + if (!ih->handle) /* do not store the action before map */ + return 0; + + if (!iMatrixGetStartEnd(value, &base, &count, lines_num, 0)) + return 0; + + /* if the focus cell is after the inserted area */ + if (ih->data->lines.focus_cell >= base) + { + /* leave of the edition mode */ + iupMatrixEditForceHidden(ih); + + /* move it to the same cell */ + ih->data->lines.focus_cell += count; + } + + iupMatrixMemReAllocLines(ih, lines_num, lines_num+count, base); + + ih->data->lines.num += count; + ih->data->need_calcsize = 1; + + if (base < lines_num) /* If before the last line. */ + iMatrixUpdateLineAttributes(ih, base, count, 1); + + iupMatrixDraw(ih, 1); + return 0; +} + +int iupMatrixSetDelLinAttrib(Ihandle* ih, const char* value) +{ + int base, count, lines_num = ih->data->lines.num; + + if (!ih->handle) /* do not store the action before map */ + return 0; + + if (!iMatrixGetStartEnd(value, &base, &count, lines_num, 1)) + return 0; + + /* if the focus cell is after the removed area */ + if (ih->data->lines.focus_cell >= base) + { + /* leave of the edition mode */ + iupMatrixEditForceHidden(ih); + + /* if the focus cell is inside the removed area */ + if (ih->data->lines.focus_cell <= base+count-1) + ih->data->lines.focus_cell = base; /* move it to the first existant cell */ + else + ih->data->lines.focus_cell -= count; /* move it to the same cell */ + } + + iupMatrixMemReAllocLines(ih, lines_num, lines_num-count, base); + + ih->data->lines.num -= count; + ih->data->need_calcsize = 1; + + if (ih->data->lines.focus_cell >= ih->data->lines.num) + ih->data->lines.focus_cell = ih->data->lines.num-1; + if (ih->data->lines.focus_cell <= 0) + ih->data->lines.focus_cell = 1; + + if (base < lines_num) /* If before the last line. (always true when deleting) */ + iMatrixUpdateLineAttributes(ih, base, count, 0); + + iupMatrixDraw(ih, 1); + return 0; +} + +int iupMatrixSetAddColAttrib(Ihandle* ih, const char* value) +{ + int base, count, columns_num = ih->data->columns.num; + + if (!ih->handle) /* do not store the action before map */ + return 0; + + if (!iMatrixGetStartEnd(value, &base, &count, columns_num, 0)) + return 0; + + /* if the focus cell is after the inserted area */ + if (ih->data->columns.focus_cell >= base) + { + /* leave the edition mode */ + iupMatrixEditForceHidden(ih); + + /* move it to the same cell */ + ih->data->columns.focus_cell += count; + } + + iupMatrixMemReAllocColumns(ih, columns_num, columns_num+count, base); + + ih->data->columns.num += count; + ih->data->need_calcsize = 1; + + if (base < columns_num) /* If before the last column. */ + iMatrixUpdateColumnAttributes(ih, base, count, 1); + + iupMatrixDraw(ih, 1); + return 0; +} + +int iupMatrixSetDelColAttrib(Ihandle* ih, const char* value) +{ + int base, count, columns_num = ih->data->columns.num; + + if (!ih->handle) /* do not store the action before map */ + return 0; + + if (!iMatrixGetStartEnd(value, &base, &count, columns_num, 1)) + return 0; + + /* if the focus cell is after the removed area */ + if (ih->data->columns.focus_cell >= base) + { + /* leave the edition mode */ + iupMatrixEditForceHidden(ih); + + /* if the focus cell is inside the removed area */ + if (ih->data->columns.focus_cell <= base+count-1) + ih->data->columns.focus_cell = base; /* move it to the first existant cell */ + else + ih->data->columns.focus_cell -= count; /* move it to the same cell */ + } + + iupMatrixMemReAllocColumns(ih, columns_num, columns_num-count, base); + + ih->data->columns.num -= count; + ih->data->need_calcsize = 1; + + if (ih->data->columns.focus_cell >= ih->data->columns.num) + ih->data->columns.focus_cell = ih->data->columns.num-1; + if (ih->data->columns.focus_cell <= 0) + ih->data->columns.focus_cell = 1; + + if (base < columns_num) /* If before the last column. (always true when deleting) */ + iMatrixUpdateColumnAttributes(ih, base, count, 0); + + iupMatrixDraw(ih, 1); + return 0; +} + +int iupMatrixSetNumLinAttrib(Ihandle* ih, const char* value) +{ + int num = 0; + if (iupStrToInt(value, &num)) + { + if (num < 0) num = 0; + + num++; /* add room for title line */ + + /* can be set before map */ + if (ih->handle) + { + int base; /* base is after the end */ + if (num >= ih->data->lines.num) /* add or alloc */ + base = ih->data->lines.num; + else + base = num; + iupMatrixMemReAllocLines(ih, ih->data->lines.num, num, base); + } + + ih->data->lines.num = num; + ih->data->need_calcsize = 1; + + if (ih->handle) + iupMatrixDraw(ih, 1); + } + + return 0; +} + +int iupMatrixSetNumColAttrib(Ihandle* ih, const char* value) +{ + int num = 0; + if (iupStrToInt(value, &num)) + { + if (num < 0) num = 0; + + num++; /* add room for title column */ + + /* can be set before map */ + if (ih->handle) + { + int base; /* base is after the end */ + if (num >= ih->data->columns.num) /* add or alloc */ + base = ih->data->columns.num; + else + base = num; + iupMatrixMemReAllocColumns(ih, ih->data->columns.num, num, base); + } + + ih->data->columns.num = num; + ih->data->need_calcsize = 1; + + if (ih->handle) + iupMatrixDraw(ih, 1); + } + + return 0; +} diff --git a/iup/srccontrols/matrix/iupmat_numlc.h b/iup/srccontrols/matrix/iupmat_numlc.h new file mode 100755 index 0000000..df5e16f --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_numlc.h @@ -0,0 +1,27 @@ +/** \file + * \brief iupmatrix. change number of collumns or lines. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_NUMLC_H +#define __IUPMAT_NUMLC_H + +#ifdef __cplusplus +extern "C" { +#endif + +int iupMatrixSetAddLinAttrib(Ihandle* ih, const char* value); +int iupMatrixSetDelLinAttrib(Ihandle* ih, const char* value); +int iupMatrixSetAddColAttrib(Ihandle* ih, const char* value); +int iupMatrixSetDelColAttrib(Ihandle* ih, const char* value); + +int iupMatrixSetNumLinAttrib(Ihandle* ih, const char* value); +int iupMatrixSetNumColAttrib(Ihandle* ih, const char* value); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmat_scroll.c b/iup/srccontrols/matrix/iupmat_scroll.c new file mode 100755 index 0000000..24bbef2 --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_scroll.c @@ -0,0 +1,495 @@ +/** \file + * \brief iupmatrix control + * scrolling + * + * See Copyright Notice in "iup.h" + */ + +#include "iup.h" +#include "iupcbs.h" + +#include + +#include "iup_object.h" +#include "iup_stdcontrols.h" + +#include "iupmat_def.h" +#include "iupmat_scroll.h" +#include "iupmat_focus.h" +#include "iupmat_aux.h" +#include "iupmat_edit.h" +#include "iupmat_draw.h" + + +/* Macros used by "dir" parameter of the iMatrixScrollLine and iMatrixScrollColumn functions */ +#define IMAT_SCROLL_LEFT 0 +#define IMAT_SCROLL_RIGHT 1 +#define IMAT_SCROLL_UP 2 +#define IMAT_SCROLL_DOWN 3 + + +/**************************************************************************/ +/* Private functions */ +/**************************************************************************/ + + +static int iMatrixScrollIsFullVisibleLast(ImatLinColData *p) +{ + int i, sum = 0; + + for(i = p->first; i <= p->last; i++) + sum += p->sizes[i]; + + if (sum > p->visible_size) + return 0; + else + return 1; +} + +/* Scroll columns/lines in the left/top side of the matriz until the last column/line is FULLY visible. + -> m : Define the mode of operation: lines or columns [IMAT_PROCESS_LIN|IMAT_PROCESS_COL] */ +static void iMatrixScrollToVisible(Ihandle* ih, int m, int index) +{ + ImatLinColData* p; + + if (m == IMAT_PROCESS_LIN) + p = &(ih->data->lines); + else + p = &(ih->data->columns); + + if (index < p->first) + { + p->first = index; + return; + } + else if (index > p->last) + { + /* Increment the first column/line until the index is visible */ + while(index > p->last && p->last != (p->num - 1)) + { + p->first++; + iupMatrixAuxUpdateLast(p); + } + } + + if (index == p->last) + { + /* must increment util the last is fully visible */ + while(index == p->last && p->last != (p->num - 1) && !iMatrixScrollIsFullVisibleLast(p)) + { + p->first++; + iupMatrixAuxUpdateLast(p); + } + } +} + +/* Callback to report to the user which visualization area of + the matrix changed. */ +static void iMatrixScrollCallScrollTopCb(Ihandle* ih) +{ + IFnii cb = (IFnii)IupGetCallback(ih, "SCROLLTOP_CB"); + if (cb) + cb(ih, ih->data->lines.first, ih->data->columns.first); +} + +static int iMatrixScrollGetNextNonEmpty(Ihandle* ih, int m, int index) +{ + ImatLinColData* p; + + if (m == IMAT_PROCESS_LIN) + p = &(ih->data->lines); + else + p = &(ih->data->columns); + + while(index < p->num && p->sizes[index] == 0) + index++; + + if (index > p->num-1) + { + if (p->num == 1) + return 1; + else + return p->num-1; + } + else + return index; +} + +static int iMatrixScrollGetPrevNonEmpty(Ihandle* ih, int m, int index) +{ + ImatLinColData* p; + + if (m == IMAT_PROCESS_LIN) + p = &(ih->data->lines); + else + p = &(ih->data->columns); + + while(index > 0 && p->sizes[index] == 0) + index--; + + if (index < 1) + return 1; + else + return index; +} + +static void iMatrixScrollSetFocusScrollToVisible(Ihandle* ih, int m, int index) +{ + if (m == IMAT_PROCESS_COL) + iupMatrixFocusSet(ih, ih->data->lines.focus_cell, index); + else + iupMatrixFocusSet(ih, index, ih->data->columns.focus_cell); + + /* set for both because current focus maybe hidden */ + iMatrixScrollToVisible(ih, IMAT_PROCESS_COL, ih->data->columns.focus_cell); + iMatrixScrollToVisible(ih, IMAT_PROCESS_LIN, ih->data->lines.focus_cell); +} + +/**************************************************************************/ +/* Exported functions */ +/**************************************************************************/ + + +/* Move using the cells of matrix. + Receive as a parameter a pointer to a function that will make the work, + in fact. This is done to avoid a test to each of the manipulation cursor + functions, verifying if it is necessary to call or not the scroll + callback. This is only done here. + -> func - pointer to the function that will make the movement + -> mode - parameter passed to func, specify if the movement request is of + the scrollbar or the keyboard + -> pos - parameter passed to func, that will be the handle position function + of the scrollbar, returning the scrollbar thumb position... + if func is other function, this parameter will be ignored + -> m - parameter passed to func, specify which is the mode of operation: + lines or columns [IMAT_PROCESS_LIN|IMAT_PROCESS_COL] +*/ +void iupMatrixScrollMoveCursor(iupMatrixScrollMoveF func, Ihandle* ih, int mode, float pos, int m) +{ + int old_lines_first = ih->data->lines.first; + int old_columns_first = ih->data->columns.first; + + iupMatrixEditForceHidden(ih); + + func(ih, mode, pos, m); + + if (ih->data->lines.first != old_lines_first || ih->data->columns.first != old_columns_first) + { + if (ih->data->columns.first != old_columns_first) + iupMatrixAuxUpdateVisiblePos(ih, IMAT_PROCESS_COL); + + if (ih->data->lines.first != old_lines_first) + iupMatrixAuxUpdateVisiblePos(ih, IMAT_PROCESS_LIN); + + iMatrixScrollCallScrollTopCb(ih); + + iupMatrixDraw(ih, 0); + } +} + +void iupMatrixScrollToVisible(Ihandle* ih, int lin, int col) +{ + int old_lines_first = ih->data->lines.first; + int old_columns_first = ih->data->columns.first; + + iMatrixScrollToVisible(ih, IMAT_PROCESS_COL, col); + iMatrixScrollToVisible(ih, IMAT_PROCESS_LIN, lin); + + if (ih->data->lines.first != old_lines_first || ih->data->columns.first != old_columns_first) + { + if (ih->data->columns.first != old_columns_first) + iupMatrixAuxUpdateVisiblePos(ih, IMAT_PROCESS_COL); + + if (ih->data->lines.first != old_lines_first) + iupMatrixAuxUpdateVisiblePos(ih, IMAT_PROCESS_LIN); + + iMatrixScrollCallScrollTopCb(ih); + + iupMatrixDraw(ih, 1); + } +} + +/* This function is called when the "home" key is pressed. + In the first time, go to the beginning of the line. + In the second time, go to the beginning of the page. + In the third time, go to the beginning of the matrix. + -> mode and pos : DO NOT USED. +*/ +void iupMatrixScrollHome(Ihandle* ih, int unused_mode, float unused_pos, int unused_m) +{ + (void)unused_m; + (void)unused_mode; + (void)unused_pos; + + /* called only for mode==IMAT_SCROLLKEY */ + + if(ih->data->homekeycount == 0) /* go to the beginning of the line */ + { + ih->data->columns.first = iMatrixScrollGetNextNonEmpty(ih, IMAT_PROCESS_COL, 1); + iMatrixScrollSetFocusScrollToVisible(ih, IMAT_PROCESS_COL, ih->data->columns.first); + } + else if(ih->data->homekeycount == 1) /* go to the beginning of the visible page */ + { + iupMatrixFocusSet(ih, ih->data->lines.first, ih->data->columns.first); + + /* set for both because current focus maybe hidden */ + iMatrixScrollToVisible(ih, IMAT_PROCESS_COL, ih->data->columns.focus_cell); + iMatrixScrollToVisible(ih, IMAT_PROCESS_LIN, ih->data->lines.focus_cell); + } + else if(ih->data->homekeycount == 2) /* go to the beginning of the matrix 1:1 */ + { + ih->data->columns.first = iMatrixScrollGetNextNonEmpty(ih, IMAT_PROCESS_COL, 1); + ih->data->lines.first = iMatrixScrollGetNextNonEmpty(ih, IMAT_PROCESS_LIN, 1); + + iupMatrixFocusSet(ih, ih->data->lines.first, ih->data->columns.first); + + /* set for both because current focus maybe hidden */ + iMatrixScrollToVisible(ih, IMAT_PROCESS_COL, ih->data->columns.focus_cell); + iMatrixScrollToVisible(ih, IMAT_PROCESS_LIN, ih->data->lines.focus_cell); + } +} + +/* This function is called when the "end" key is pressed. + In the first time, go to the end of the line. + In the second time, go to the end of the page. + In the third time, go to the end of the matrix. + -> mode and pos : DO NOT USED. +*/ +void iupMatrixScrollEnd(Ihandle* ih, int unused_mode, float unused_pos, int unused_m) +{ + (void)unused_m; + (void)unused_mode; + (void)unused_pos; + + /* called only for mode==IMAT_SCROLLKEY */ + + if(ih->data->endkeycount == 0) /* go to the end of the line */ + { + int last_col = iMatrixScrollGetPrevNonEmpty(ih, IMAT_PROCESS_COL, ih->data->columns.num-1); + iMatrixScrollSetFocusScrollToVisible(ih, IMAT_PROCESS_COL, last_col); + } + else if(ih->data->endkeycount == 1) /* go to the end of the visible page */ + { + iupMatrixFocusSet(ih, ih->data->lines.last, ih->data->columns.last); + + /* set for both because current focus maybe hidden */ + iMatrixScrollToVisible(ih, IMAT_PROCESS_COL, ih->data->columns.focus_cell); + iMatrixScrollToVisible(ih, IMAT_PROCESS_LIN, ih->data->lines.focus_cell); + } + else if(ih->data->endkeycount == 2) /* go to the end of the matrix */ + { + int last_col = iMatrixScrollGetPrevNonEmpty(ih, IMAT_PROCESS_COL, ih->data->columns.num-1); + int last_lin = iMatrixScrollGetPrevNonEmpty(ih, IMAT_PROCESS_LIN, ih->data->lines.num-1); + + iupMatrixFocusSet(ih, last_lin, last_col); + + /* set for both because current focus maybe hidden */ + iMatrixScrollToVisible(ih, IMAT_PROCESS_COL, ih->data->columns.focus_cell); + iMatrixScrollToVisible(ih, IMAT_PROCESS_LIN, ih->data->lines.focus_cell); + } +} + +/* This function is called to move a cell to the left or up. + -> mode : indicate if the command was from the keyboard or the scrollbar. If scrollbar, + do not change the focus. + -> pos : DO NOT USED + -> m : define the mode of operation: lines or columns [IMAT_PROCESS_LIN|IMAT_PROCESS_COL] +*/ +void iupMatrixScrollLeftUp(Ihandle* ih, int mode, float pos, int m) +{ + ImatLinColData* p; + (void)pos; + + if(m == IMAT_PROCESS_LIN) + p = &(ih->data->lines); + else + p = &(ih->data->columns); + + if (mode == IMAT_SCROLLKEY) + { + int next = iMatrixScrollGetPrevNonEmpty(ih, m, p->focus_cell-1); + iMatrixScrollSetFocusScrollToVisible(ih, m, next); + } + else /* IMAT_SCROLLBAR */ + { + p->first = iMatrixScrollGetPrevNonEmpty(ih, m, p->first-1); + } +} + +/* This function is called to move a cell to the right or down. + -> mode : indicate if the command from the keyboard or the scrollbar. If scrollbar, + do not change the focus. + -> pos : DO NOT USED + -> m : define the mode of operation: lines or columns [IMAT_PROCESS_LIN|IMAT_PROCESS_COL] +*/ +void iupMatrixScrollRightDown(Ihandle* ih, int mode, float pos, int m) +{ + ImatLinColData* p; + (void)pos; + + if(m == IMAT_PROCESS_LIN) + p = &(ih->data->lines); + else + p = &(ih->data->columns); + + if (mode == IMAT_SCROLLKEY) + { + int next = iMatrixScrollGetNextNonEmpty(ih, m, p->focus_cell+1); + iMatrixScrollSetFocusScrollToVisible(ih, m, next); + } + else /* IMAT_SCROLLBAR */ + { + p->first = iMatrixScrollGetNextNonEmpty(ih, m, p->first+1); + } +} + +/* This function is called to move a page to the left or up. + -> mode : indicate if the command was from the keyboard or the scrollbar. If scrollbar, + do not change the focus. + -> pos : DO NOT USED + -> m : define the mode of operation: lines (PgLeft) or columns (PgUp) [IMAT_PROCESS_LIN|IMAT_PROCESS_COL] +*/ +void iupMatrixScrollPgLeftUp(Ihandle* ih, int mode, float pos, int m) +{ + ImatLinColData* p; + (void)pos; + + if(m == IMAT_PROCESS_LIN) + p = &(ih->data->lines); + else + p = &(ih->data->columns); + + if (mode == IMAT_SCROLLKEY) + { + int next = iMatrixScrollGetPrevNonEmpty(ih, m, p->focus_cell - (p->last - p->first)); + iMatrixScrollSetFocusScrollToVisible(ih, m, next); + } + else /* IMAT_SCROLLBAR */ + { + p->first = iMatrixScrollGetPrevNonEmpty(ih, m, p->first - (p->last - p->first)); + } +} + +/* This function is called to move a page to the right or down. + -> mode : indicate if the command was from the keyboard or the scrollbar. If scrollbar, + do not change the focus. + -> pos : DO NOT USED + -> m : define the mode of operation: lines (PgDown) or columns (PgRight) [IMAT_PROCESS_LIN|IMAT_PROCESS_COL] +*/ +void iupMatrixScrollPgRightDown(Ihandle* ih, int mode, float pos, int m) +{ + ImatLinColData* p; + (void)pos; + + if(m == IMAT_PROCESS_LIN) + p = &(ih->data->lines); + else + p = &(ih->data->columns); + + if (mode == IMAT_SCROLLKEY) + { + int next = iMatrixScrollGetNextNonEmpty(ih, IMAT_PROCESS_COL, p->focus_cell + (p->last - p->first)); + iMatrixScrollSetFocusScrollToVisible(ih, m, next); + } + else /* IMAT_SCROLLBAR */ + { + p->first = iMatrixScrollGetPrevNonEmpty(ih, m, p->first + (p->last - p->first)); + } +} + +void iupMatrixScrollCr(Ihandle* ih, int unused_mode, float unused_pos, int unused_m) +{ + int oldlin = ih->data->lines.focus_cell; + int oldcol = ih->data->columns.focus_cell; + (void)unused_m; + (void)unused_mode; + (void)unused_pos; + + /* called only for mode==IMAT_SCROLLKEY */ + + /* try the normal processing of next cell down */ + iupMatrixScrollRightDown(ih, IMAT_SCROLLKEY, 0, IMAT_PROCESS_LIN); + + if(ih->data->lines.focus_cell == oldlin && ih->data->columns.focus_cell == oldcol) + { + /* If focus was not changed, it was because it is in the last line of the column. + Go to the next column of the same line. */ + iupMatrixScrollRightDown(ih, IMAT_SCROLLKEY, 0, IMAT_PROCESS_COL); + } +} + +/* This function is called when a drag is performed in the scrollbar. + -> x : scrollbar thumb position, value between 0 and 1 + -> mode : DO NOT USED + -> m : define the mode of operation: lines or columns [IMAT_PROCESS_LIN|IMAT_PROCESS_COL] +*/ +void iupMatrixScrollPos(Ihandle* ih, int mode, float pos, int m) +{ + int scroll_pos, index, vp; + float d; + ImatLinColData* p; + (void)mode; + + if (m == IMAT_PROCESS_LIN) + { + p = &(ih->data->lines); + d = IupGetFloat(ih, "DY"); + } + else + { + p = &(ih->data->columns); + d = IupGetFloat(ih, "DX"); + } + + if (p->num == 1) + { + p->first = 1; + return; + } + + scroll_pos = (int)(pos * p->total_size + 0.5); + + vp = 0; + for(index = 1; index < p->num; index++) + { + vp += p->sizes[index]; + if (vp > scroll_pos) + break; + } + + if (index == p->num) + { + if (p->num == 1) + index = 1; + else + index = p->num-1; + } + + p->first = index; +} + +int iupMatrixScroll_CB(Ihandle* ih, int action, float x, float y) +{ + if (!iupMatrixIsValid(ih, 0)) + return IUP_DEFAULT; + + switch(action) + { + case IUP_SBUP : iupMatrixScrollUp(ih); break; + case IUP_SBDN : iupMatrixScrollDown(ih); break; + case IUP_SBPGUP : iupMatrixScrollPgUp(ih); break; + case IUP_SBPGDN : iupMatrixScrollPgDown(ih); break; + case IUP_SBRIGHT : iupMatrixScrollRight(ih); break; + case IUP_SBLEFT : iupMatrixScrollLeft(ih); break; + case IUP_SBPGRIGHT : iupMatrixScrollPgRight(ih); break; + case IUP_SBPGLEFT : iupMatrixScrollPgLeft(ih); break; + case IUP_SBPOSV : iupMatrixScrollPosVer(ih,y); break; + case IUP_SBPOSH : iupMatrixScrollPosHor(ih,x); break; + case IUP_SBDRAGV : iupMatrixScrollPosVer(ih,y); break; + case IUP_SBDRAGH : iupMatrixScrollPosHor(ih,x); break; + } + + iupMatrixDrawUpdate(ih); + + return IUP_DEFAULT; +} diff --git a/iup/srccontrols/matrix/iupmat_scroll.h b/iup/srccontrols/matrix/iupmat_scroll.h new file mode 100755 index 0000000..582442b --- /dev/null +++ b/iup/srccontrols/matrix/iupmat_scroll.h @@ -0,0 +1,69 @@ +/** \file + * \brief iupmatrix control + * scrolling. + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IUPMAT_SCROLL_H +#define __IUPMAT_SCROLL_H + +#ifdef __cplusplus +extern "C" { +#endif + +int iupMatrixScroll_CB(Ihandle* ih, int action, float x, float y); + +void iupMatrixScrollToVisible(Ihandle* ih, int lin, int col); + +typedef void (*iupMatrixScrollMoveF)(Ihandle* ih, int mode, float pos, int m); +void iupMatrixScrollMoveCursor(iupMatrixScrollMoveF func, Ihandle* ih, int mode, float pos, int m); + +/* Used only by the macros bellow */ +void iupMatrixScrollHome (Ihandle* ih, int, float, int); +void iupMatrixScrollEnd (Ihandle* ih, int, float, int); +void iupMatrixScrollLeftUp (Ihandle* ih, int, float, int); +void iupMatrixScrollRightDown (Ihandle* ih, int, float, int); +void iupMatrixScrollPgLeftUp (Ihandle* ih, int, float, int); +void iupMatrixScrollPgRightDown(Ihandle* ih, int, float, int); +void iupMatrixScrollPos (Ihandle* ih, int, float, int); +void iupMatrixScrollCr (Ihandle* ih, int, float, int); + +/* Mode used to "walk" inside the matrix. + It shows if the movement request was from the scrollbar or from a key. + Possible values for the "mode" parameter of the iupMatrixScrollMoveCursor function. + */ +#define IMAT_SCROLLBAR 0 +#define IMAT_SCROLLKEY 1 + +/* Macros to help during the call of iupMatrixScrollMoveCursor function */ + +/* used in the keyboard processing module */ +#define iupMatrixScrollKeyHome(ih) iupMatrixScrollMoveCursor(iupMatrixScrollHome , ih, IMAT_SCROLLKEY, 0, 0) +#define iupMatrixScrollKeyEnd(ih) iupMatrixScrollMoveCursor(iupMatrixScrollEnd , ih, IMAT_SCROLLKEY, 0, 0) +#define iupMatrixScrollKeyPgUp(ih) iupMatrixScrollMoveCursor(iupMatrixScrollPgLeftUp , ih, IMAT_SCROLLKEY, 0, IMAT_PROCESS_LIN) +#define iupMatrixScrollKeyPgDown(ih) iupMatrixScrollMoveCursor(iupMatrixScrollPgRightDown, ih, IMAT_SCROLLKEY, 0, IMAT_PROCESS_LIN) +#define iupMatrixScrollKeyDown(ih) iupMatrixScrollMoveCursor(iupMatrixScrollRightDown , ih, IMAT_SCROLLKEY, 0, IMAT_PROCESS_LIN) +#define iupMatrixScrollKeyRight(ih) iupMatrixScrollMoveCursor(iupMatrixScrollRightDown , ih, IMAT_SCROLLKEY, 0, IMAT_PROCESS_COL) +#define iupMatrixScrollKeyUp(ih) iupMatrixScrollMoveCursor(iupMatrixScrollLeftUp , ih, IMAT_SCROLLKEY, 0, IMAT_PROCESS_LIN) +#define iupMatrixScrollKeyLeft(ih) iupMatrixScrollMoveCursor(iupMatrixScrollLeftUp , ih, IMAT_SCROLLKEY, 0, IMAT_PROCESS_COL) +#define iupMatrixScrollKeyCr(ih) iupMatrixScrollMoveCursor(iupMatrixScrollCr , ih, IMAT_SCROLLKEY, 0, 0) + +/* Used by the scrollbar callback only */ +#define iupMatrixScrollUp(ih) iupMatrixScrollMoveCursor(iupMatrixScrollLeftUp , ih, IMAT_SCROLLBAR, 0, IMAT_PROCESS_LIN) +#define iupMatrixScrollLeft(ih) iupMatrixScrollMoveCursor(iupMatrixScrollLeftUp , ih, IMAT_SCROLLBAR, 0, IMAT_PROCESS_COL) +#define iupMatrixScrollDown(ih) iupMatrixScrollMoveCursor(iupMatrixScrollRightDown , ih, IMAT_SCROLLBAR, 0, IMAT_PROCESS_LIN) +#define iupMatrixScrollRight(ih) iupMatrixScrollMoveCursor(iupMatrixScrollRightDown , ih, IMAT_SCROLLBAR, 0, IMAT_PROCESS_COL) +#define iupMatrixScrollPgUp(ih) iupMatrixScrollMoveCursor(iupMatrixScrollPgLeftUp , ih, IMAT_SCROLLBAR, 0, IMAT_PROCESS_LIN) +#define iupMatrixScrollPgLeft(ih) iupMatrixScrollMoveCursor(iupMatrixScrollPgLeftUp , ih, IMAT_SCROLLBAR, 0, IMAT_PROCESS_COL) +#define iupMatrixScrollPgDown(ih) iupMatrixScrollMoveCursor(iupMatrixScrollPgRightDown, ih, IMAT_SCROLLBAR, 0, IMAT_PROCESS_LIN) +#define iupMatrixScrollPgRight(ih) iupMatrixScrollMoveCursor(iupMatrixScrollPgRightDown, ih, IMAT_SCROLLBAR, 0, IMAT_PROCESS_COL) +#define iupMatrixScrollPosVer(ih, y) iupMatrixScrollMoveCursor(iupMatrixScrollPos , ih, IMAT_SCROLLBAR, y, IMAT_PROCESS_LIN) +#define iupMatrixScrollPosHor(ih, x) iupMatrixScrollMoveCursor(iupMatrixScrollPos , ih, IMAT_SCROLLBAR, x, IMAT_PROCESS_COL) + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srccontrols/matrix/iupmatrix.c b/iup/srccontrols/matrix/iupmatrix.c new file mode 100755 index 0000000..20d618d --- /dev/null +++ b/iup/srccontrols/matrix/iupmatrix.c @@ -0,0 +1,980 @@ +/** \file + * \brief IupMatrix control core + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupcontrols.h" + +#include +#include +#include + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_drvfont.h" +#include "iup_stdcontrols.h" +#include "iup_controls.h" +#include "iup_register.h" + +#include "iupmat_def.h" +#include "iupmat_getset.h" +#include "iupmat_scroll.h" +#include "iupmat_aux.h" +#include "iupmat_mem.h" +#include "iupmat_mouse.h" +#include "iupmat_focus.h" +#include "iupmat_key.h" +#include "iupmat_numlc.h" +#include "iupmat_colres.h" +#include "iupmat_mark.h" +#include "iupmat_edit.h" +#include "iupmat_draw.h" + + +int iupMatrixIsValid(Ihandle* ih, int check_cells) +{ + if (!ih->data->cddbuffer) + return 0; + if (check_cells && ((ih->data->columns.num == 0) || (ih->data->lines.num == 0))) + return 0; + return 1; +} + +static int iMatrixSetOriginAttrib(Ihandle* ih, const char* value) +{ + int lin = -1, col = -1; + + /* Get the parameters. The '*' indicates that want to keep the table in + the same line or column */ + if (iupStrToIntInt(value, &lin, &col, ':') != 2) + { + if (lin != -1) + col = ih->data->columns.first; + else if (col != -1) + lin = ih->data->lines.first; + else + return 0; + } + + /* Check if the cell exists */ + if (!iupMatrixCheckCellPos(ih, lin, col)) + return 0; + + /* Can not be a title */ + if((lin < 1) || (col < 1)) + return 0; + + ih->data->columns.first = col; + ih->data->lines.first = lin; + + iupMatrixAuxUpdateVisiblePos(ih, IMAT_PROCESS_COL); + iupMatrixAuxUpdateVisiblePos(ih, IMAT_PROCESS_LIN); + + iupMatrixDraw(ih, 1); + return 0; +} + +static int iMatrixSetShowAttrib(Ihandle* ih, const char* value) +{ + int lin = -1, col = -1; + + /* Get the parameters. The '*' indicates that want to keep the table in + the same line or column */ + if (iupStrToIntInt(value, &lin, &col, ':') != 2) + { + if (lin != -1) + col = ih->data->columns.first; + else if (col != -1) + lin = ih->data->lines.first; + else + return 0; + } + + /* Check if the cell exists */ + if (!iupMatrixCheckCellPos(ih, lin, col)) + return 0; + + /* Can not be a title */ + if((lin < 1) || (col < 1)) + return 0; + + if (!iupMatrixAuxIsCellFullVisible(ih, lin, col)) + iupMatrixScrollToVisible(ih, lin, col); + + return 0; +} + +static char* iMatrixGetOriginAttrib(Ihandle* ih) +{ + char* val = iupStrGetMemory(100); + sprintf(val, "%d:%d", ih->data->lines.first, ih->data->columns.first); + return val; +} + +static int iMatrixSetFocusCellAttrib(Ihandle* ih, const char* value) +{ + int lin = 0, col = 0; + if (iupStrToIntInt(value, &lin, &col, ':') == 2) + { + if (!iupMatrixCheckCellPos(ih, lin, col)) + return 0; + + if (lin <= 0 || col <= 0) /* title can NOT have the focus */ + return 0; + if (lin >= ih->data->lines.num || col >= ih->data->columns.num) + return 0; + + iupMatrixFocusSet(ih, lin, col); + + if (ih->data->cddbuffer) + iupMatrixDrawUpdate(ih); + } + + return 0; +} + +static char* iMatrixGetFocusCellAttrib(Ihandle* ih) +{ + char* str = iupStrGetMemory(100); + sprintf(str, "%d:%d", ih->data->lines.focus_cell, ih->data->columns.focus_cell); + return str; +} + +static int iMatrixSetUseTitleSizeAttrib(Ihandle* ih, const char* value) +{ + /* can be set only before map */ + if (ih->handle) + return 0; + + if (iupStrBoolean(value)) + ih->data->use_title_size = 1; + else + ih->data->use_title_size = 0; + + return 0; +} + +static char* iMatrixGetUseTitleSizeAttrib(Ihandle* ih) +{ + if (ih->data->use_title_size) + return "YES"; + else + return "NO"; +} + +static int iMatrixSetValueAttrib(Ihandle* ih, const char* value) +{ + if (IupGetInt(ih->data->datah, "VISIBLE")) + IupStoreAttribute(ih->data->datah, "VALUE", value); + else + iupMatrixCellSetValue(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell, value); + return 0; +} + +static char* iMatrixGetValueAttrib(Ihandle* ih) +{ + if (IupGetInt(ih->data->datah, "VISIBLE")) + return iupMatrixEditGetValue(ih); + else + return iupMatrixCellGetValue(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell); +} + +static int iMatrixSetCaretAttrib(Ihandle* ih, const char* value) +{ + IupStoreAttribute(ih->data->texth, "CARET", value); + return 1; +} + +static char* iMatrixGetCaretAttrib(Ihandle* ih) +{ + return IupGetAttribute(ih->data->texth, "CARET"); +} + +static int iMatrixSetSelectionAttrib(Ihandle* ih, const char* value) +{ + IupStoreAttribute(ih->data->texth, "SELECTION", value); + return 1; +} + +static char* iMatrixGetSelectionAttrib(Ihandle* ih) +{ + return IupGetAttribute(ih->data->texth, "SELECTION"); +} + +static int iMatrixSetMultilineAttrib(Ihandle* ih, const char* value) +{ + IupStoreAttribute(ih->data->texth, "MULTILINE", value); + if (iupStrBoolean(value)) + IupSetAttribute(ih->data->texth, "SCROLLBAR", "NO"); + return 1; +} + +static char* iMatrixGetMultilineAttrib(Ihandle* ih) +{ + return IupGetAttribute(ih->data->texth, "MULTILINE"); +} + +static char* iMatrixGetNumLinAttrib(Ihandle* ih) +{ + char* num = iupStrGetMemory(100); + sprintf(num, "%d", ih->data->lines.num-1); + return num; +} + +static char* iMatrixGetNumColAttrib(Ihandle* ih) +{ + char* num = iupStrGetMemory(100); + sprintf(num, "%d", ih->data->columns.num-1); + return num; +} + +static int iMatrixSetMarkModeAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "CELL")) + ih->data->mark_mode = IMAT_MARK_CELL; + else if (iupStrEqualNoCase(value, "LIN")) + ih->data->mark_mode = IMAT_MARK_LIN; + else if (iupStrEqualNoCase(value, "COL")) + ih->data->mark_mode = IMAT_MARK_COL; + else if(iupStrEqualNoCase(value, "LINCOL")) + ih->data->mark_mode = IMAT_MARK_LINCOL; + else + ih->data->mark_mode = IMAT_MARK_NO; + + if (ih->handle) + { + iupMatrixMarkClearAll(ih, 0); + iupMatrixDraw(ih, 1); + } + return 0; +} + +static char* iMatrixGetMarkModeAttrib(Ihandle* ih) +{ + char* mark2str[] = {"NO", "LIN", "COL", "LINCOL", "CELL"}; + return mark2str[ih->data->mark_mode]; +} + +static int iMatrixSetMarkAreaAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "NOT_CONTINUOUS")) + ih->data->mark_continuous = 0; + else + ih->data->mark_continuous = 1; + + if (ih->handle) + { + iupMatrixMarkClearAll(ih, 0); + iupMatrixDraw(ih, 1); + } + return 0; +} + +static char* iMatrixGetMarkAreaAttrib(Ihandle* ih) +{ + if (ih->data->mark_continuous) + return "CONTINUOUS"; + else + return "NOT_CONTINUOUS"; +} + +static int iMatrixSetMarkMultipleAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + ih->data->mark_multiple = 1; + else + ih->data->mark_multiple = 0; + + if (ih->handle) + { + iupMatrixMarkClearAll(ih, 0); + iupMatrixDraw(ih, 1); + } + return 0; +} + +static char* iMatrixGetMarkMultipleAttrib(Ihandle* ih) +{ + if (ih->data->mark_multiple) + return "YES"; + else + return "NO"; +} + +static int iMatrixSetEditModeAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + iupMatrixEditShow(ih); + else + { + iupMatrixEditHide(ih); + iupMatrixDrawUpdate(ih); + } + return 1; +} + +static char* iMatrixGetEditModeAttrib(Ihandle* ih) +{ + if (iupMatrixEditIsVisible(ih)) + return "YES"; + else + return "NO"; +} + +static int iMatrixSetActiveAttrib(Ihandle* ih, const char* value) +{ + iupBaseSetActiveAttrib(ih, value); + iupMatrixDraw(ih, 1); + return 0; +} + +static int iMatrixSetWidthAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int col = 0; + if (iupStrToInt(name_id, &col)) + { + (void)value; + ih->data->need_calcsize = 1; + IupUpdate(ih); + } + return 1; +} + +static char* iMatrixGetWidthAttrib(Ihandle* ih, const char* name_id) +{ + int col; + if (iupStrToInt(name_id, &col)) + return iupMatrixGetSize(ih, col, IMAT_PROCESS_COL, 0); + return NULL; +} + +static int iMatrixSetHeightAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int lin = 0; + if (iupStrToInt(name_id, &lin)) + { + (void)value; + ih->data->need_calcsize = 1; + IupUpdate(ih); + } + return 1; +} + +static char* iMatrixGetHeightAttrib(Ihandle* ih, const char* name_id) +{ + int lin; + if (iupStrToInt(name_id, &lin)) + return iupMatrixGetSize(ih, lin, IMAT_PROCESS_LIN, 0); + return NULL; +} + +static int iMatrixSetRasterWidthAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int col = 0; + if (iupStrToInt(name_id, &col)) + { + (void)value; + ih->data->need_calcsize = 1; + IupUpdate(ih); + } + return 1; +} + +static char* iMatrixGetRasterWidthAttrib(Ihandle* ih, const char* name_id) +{ + int col; + if (iupStrToInt(name_id, &col)) + return iupMatrixGetSize(ih, col, IMAT_PROCESS_COL, 1); + return NULL; +} + +static int iMatrixSetRasterHeightAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int lin = 0; + if (iupStrToInt(name_id, &lin)) + { + (void)value; + ih->data->need_calcsize = 1; + IupUpdate(ih); + } + return 1; +} + +static char* iMatrixGetRasterHeightAttrib(Ihandle* ih, const char* name_id) +{ + int lin; + if (iupStrToInt(name_id, &lin)) + return iupMatrixGetSize(ih, lin, IMAT_PROCESS_LIN, 1); + return NULL; +} + +static char* iMatrixGetAlignmentAttrib(Ihandle* ih, const char* name_id) +{ + char* align; + char str[50]; + sprintf(str, "ALIGNMENT%s", name_id); + align = iupAttribGet(ih, str); + if (!align) + { + int col; + if (iupStrToInt(name_id, &col)) + { + if (col == 0) + return "ALEFT"; + else + return "ACENTER"; + } + } + + return NULL; +} + +static int iMatrixSetIdValueAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + int lin = 0, col = 0; + if (iupStrToIntInt(name_id, &lin, &col, ':') == 2) + { + if (iupMatrixCheckCellPos(ih, lin, col)) + iupMatrixCellSetValue(ih, lin, col, value); + } + return 0; +} + +static char* iMatrixGetIdValueAttrib(Ihandle* ih, const char* name_id) +{ + int lin, col; + if (iupStrToIntInt(name_id, &lin, &col, ':') == 2) + { + if (iupMatrixCheckCellPos(ih, lin, col)) + return iupMatrixCellGetValue(ih, lin, col); + } + return NULL; +} + +static int iMatrixSetFlagsAttrib(Ihandle* ih, const char* name_id, const char* value, unsigned char attr) +{ + if (name_id[0]==0) + return 1; + if (name_id[0]=='*' && name_id[1]==':') + { + int col; + name_id += 2; /* skip '*' and ':' */ + if (iupStrToInt(name_id, &col)) + iupMatrixCellSetFlag(ih, -1, col, attr, value!=NULL); + } + else if (name_id[strlen(name_id)-1]=='*') + { + int lin; + if (iupStrToInt(name_id, &lin)) + iupMatrixCellSetFlag(ih, lin, -1, attr, value!=NULL); + } + else + { + int lin, col; + if (iupStrToIntInt(name_id, &lin, &col, ':') == 2) + iupMatrixCellSetFlag(ih, lin, col, attr, value!=NULL); + } + return 1; +} + +static int iMatrixSetBgColorAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + return iMatrixSetFlagsAttrib(ih, name_id, value, IUPMAT_BGCOLOR); +} + +static int iMatrixSetFgColorAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + return iMatrixSetFlagsAttrib(ih, name_id, value, IUPMAT_FGCOLOR); +} + +static int iMatrixSetFontAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + return iMatrixSetFlagsAttrib(ih, name_id, value, IUPMAT_FONT); +} + +static int iMatrixSetFrameHorizColorAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + ih->data->checkframecolor = value!=NULL; + return iMatrixSetFlagsAttrib(ih, name_id, value, IUPMAT_FRAMEHCOLOR); +} + +static int iMatrixSetFrameVertColorAttrib(Ihandle* ih, const char* name_id, const char* value) +{ + ih->data->checkframecolor = value!=NULL; + return iMatrixSetFlagsAttrib(ih, name_id, value, IUPMAT_FRAMEVCOLOR); +} + +static char* iMatrixGetFontAttrib(Ihandle* ih, const char* name_id) +{ + if (name_id[0]==0) + return iupGetFontAttrib(ih); + return NULL; +} + +static char* iMatrixGetBgColorAttrib(Ihandle* ih, const char* name_id) +{ + if (name_id[0]==0) + { + /* check the hash table */ + char *color = iupAttribGet(ih, "BGCOLOR"); + + /* If not defined return the default for normal cells */ + if (!color) + color = IupGetGlobal("TXTBGCOLOR"); + + return color; + } + return NULL; +} + +static char* iMatrixGetNumColVisibleAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(50); + sprintf(buffer, "%d", ih->data->columns.last - ih->data->columns.first); + return buffer; +} + +static char* iMatrixGetNumLinVisibleAttrib(Ihandle* ih) +{ + char* buffer = iupStrGetMemory(50); + sprintf(buffer, "%d", ih->data->lines.last - ih->data->lines.first); + return buffer; +} + +static char* iMatrixGetMaskDataAttrib(Ihandle* ih) +{ + /* Used only by the OLD iupmask API */ + if (IupGetInt(ih->data->datah, "VISIBLE")) + return IupGetAttribute(ih->data->datah,"OLD_MASK_DATA"); + else + return NULL; +} + + +/*****************************************************************************/ +/* Callbacks registered to the Canvas */ +/*****************************************************************************/ + + +static int iMatrixResize_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + { + /* update canvas size */ + cdCanvasActivate(ih->data->cdcanvas); + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + } + + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + /* update size */ + cdCanvasActivate(ih->data->cddbuffer); + cdCanvasGetSize(ih->data->cddbuffer, &ih->data->w, &ih->data->h, NULL, NULL); + + iupMatrixEditForceHidden(ih); + + ih->data->need_calcsize = 1; + iupMatrixDraw(ih, 0); + + return IUP_DEFAULT; +} + +static int iMatrixRedraw_CB(Ihandle* ih) +{ + if (!ih->data->cddbuffer) + return IUP_DEFAULT; + + if (!ih->data->first_redraw) + { + ih->data->first_redraw = 1; + iupMatrixDraw(ih, 0); + } + + iupMatrixDrawUpdate(ih); + + return IUP_DEFAULT; +} + + +/***************************************************************************/ + + +static int iMatrixCreateMethod(Ihandle* ih, void **params) +{ + if (params && params[0]) + { + char* action_cb = (char*)params[0]; + iupAttribStoreStr(ih, "ACTION_CB", action_cb); + } + + /* free the data allocated by IupCanvas */ + if (ih->data) free(ih->data); + ih->data = iupALLOCCTRLDATA(); + + /* change the IupCanvas default values */ + iupAttribSetStr(ih, "SCROLLBAR", "YES"); + iupAttribSetStr(ih, "BORDER", "NO"); + iupAttribSetStr(ih, "CURSOR", "IupMatrixCrossCursor"); + + /* IupCanvas callbacks */ + IupSetCallback(ih, "ACTION", (Icallback)iMatrixRedraw_CB); + IupSetCallback(ih, "RESIZE_CB", (Icallback)iMatrixResize_CB); + IupSetCallback(ih, "BUTTON_CB", (Icallback)iupMatrixMouseButton_CB); + IupSetCallback(ih, "MOTION_CB", (Icallback)iupMatrixMouseMove_CB); + IupSetCallback(ih, "KEYPRESS_CB", (Icallback)iupMatrixKeyPress_CB); + IupSetCallback(ih, "FOCUS_CB", (Icallback)iupMatrixFocus_CB); + IupSetCallback(ih, "SCROLL_CB", (Icallback)iupMatrixScroll_CB); + + /* Create the edit fields */ + iupMatrixEditCreate(ih); + + /* defaults */ + ih->data->datah = ih->data->texth; + ih->data->mark_continuous = 1; + ih->data->columns.num = 1; + ih->data->lines.num = 1; + ih->data->need_calcsize = 1; + ih->data->lines.first = 1; + ih->data->columns.first = 1; + ih->data->lines.focus_cell = 1; + ih->data->columns.focus_cell = 1; + ih->data->mark_lin1 = -1; + ih->data->mark_col1 = -1; + ih->data->mark_lin2 = -1; + ih->data->mark_col2 = -1; + ih->data->use_title_size = 0; + + return IUP_NOERROR; +} + +static int iMatrixMapMethod(Ihandle* ih) +{ + ih->data->cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!ih->data->cdcanvas) + return IUP_ERROR; + + /* this can fail if canvas size is zero */ + ih->data->cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->cdcanvas); + + if (IupGetCallback(ih, "VALUE_CB")) + { + ih->data->callback_mode = 1; + + if (!IupGetCallback(ih, "VALUE_EDIT_CB")) + iupAttribSetStr(ih, "READONLY", "YES"); + } + + iupMatrixMemAlloc(ih); + + return IUP_NOERROR; +} + +static void iMatrixUnMapMethod(Ihandle* ih) +{ + if(ih->data->cddbuffer) + { + cdKillCanvas(ih->data->cddbuffer); + ih->data->cddbuffer = NULL; + } + + if(ih->data->cdcanvas) + { + cdKillCanvas(ih->data->cdcanvas); + ih->data->cdcanvas = NULL; + } + + iupMatrixMemRelease(ih); +} + +static int iMatrixGetNaturalWidth(Ihandle* ih) +{ + int width = 0, num, col; + + num = iupAttribGetInt(ih, "NUMCOL_VISIBLE")+1; /* include the title column */ + + if (iupAttribGetInt(ih, "NUMCOL_VISIBLE_LAST")) + { + int start = ih->data->columns.num - (num-1); /* title is computed apart */ + if (start<1) start=1; + width += iupMatrixAuxGetColumnWidth(ih, 0); /* compute title */ + for(col = start; col < ih->data->columns.num; col++) + width += iupMatrixAuxGetColumnWidth(ih, col); + } + else + { + if (num > ih->data->columns.num) + num = ih->data->columns.num; + for(col = 0; col < num; col++) + width += iupMatrixAuxGetColumnWidth(ih, col); + } + + return width; +} + +static int iMatrixGetNaturalHeight(Ihandle* ih) +{ + int height = 0, num, lin; + + num = iupAttribGetInt(ih, "NUMLIN_VISIBLE")+1; /* include the title line */ + + if (iupAttribGetInt(ih, "NUMLIN_VISIBLE_LAST")) + { + int start = ih->data->lines.num - (num-1); /* title is computed apart */ + if (start<1) start=1; + height += iupMatrixAuxGetLineHeight(ih, 0); /* compute title */ + for(lin = start; lin < ih->data->lines.num; lin++) + height += iupMatrixAuxGetLineHeight(ih, lin); + } + else + { + if (num > ih->data->lines.num) + num = ih->data->lines.num; + for(lin = 0; lin < num; lin++) + height += iupMatrixAuxGetLineHeight(ih, lin); + } + + return height; +} + +static void iMatrixComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + int natural_w = 0, natural_h = 0; + (void)expand; /* unset if not a container */ + + if (!ih->handle) + ih->data->canvas.sb = iupBaseGetScrollbar(ih); + + /* add scrollbar */ + if (ih->data->canvas.sb) + { + int sb_size = iupdrvGetScrollbarSize(); + if (ih->data->canvas.sb & IUP_SB_HORIZ) + natural_w += sb_size; + if (ih->data->canvas.sb & IUP_SB_VERT) + natural_h += sb_size; + } + + *w = natural_w + iMatrixGetNaturalWidth(ih); + *h = natural_h + iMatrixGetNaturalHeight(ih); +} + +static void iMatrixCreateCursor(void) +{ + Ihandle *imgcursor; + unsigned char matrx_img_cur_excel[15*15] = + { + 0,0,0,0,1,1,1,1,1,1,0,0,0,0,0, + 0,0,0,0,1,2,2,2,2,1,1,0,0,0,0, + 0,0,0,0,1,2,2,2,2,1,1,0,0,0,0, + 0,0,0,0,1,2,2,2,2,1,1,0,0,0,0, + 1,1,1,1,1,2,2,2,2,1,1,1,1,1,0, + 1,2,2,2,2,2,2,2,2,2,2,2,2,1,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,1,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,1,1, + 1,1,1,1,1,2,2,2,2,1,1,1,1,1,1, + 0,1,1,1,1,2,2,2,2,1,1,1,1,1,1, + 0,0,0,0,1,2,2,2,2,1,1,0,0,0,0, + 0,0,0,0,1,2,2,2,2,1,1,0,0,0,0, + 0,0,0,0,1,1,1,1,1,1,1,0,0,0,0, + 0,0,0,0,0,1,1,1,1,1,1,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }; + + imgcursor = IupImage(15, 15, matrx_img_cur_excel); + IupSetAttribute(imgcursor, "0", "BGCOLOR"); + IupSetAttribute(imgcursor, "1", "0 0 0"); + IupSetAttribute(imgcursor, "2", "255 255 255"); + IupSetAttribute(imgcursor, "HOTSPOT", "7:7"); /* Centered Hotspot */ + IupSetHandle("IupMatrixCrossCursor", imgcursor); + IupSetHandle("matrx_img_cur_excel", imgcursor); /* for backward compatibility */ +} + +Iclass* iupMatrixGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "matrix"; + ic->format = "A"; /* one optional callback name */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + ic->has_attrib_id = 1; /* has attributes with IDs that must be parsed */ + + /* Class functions */ + ic->Create = iMatrixCreateMethod; + ic->Map = iMatrixMapMethod; + ic->UnMap = iMatrixUnMapMethod; + ic->ComputeNaturalSize = iMatrixComputeNaturalSizeMethod; + + /* Do not need to set base attributes because they are inherited from IupCanvas */ + + /* IupMatrix Callbacks */ + /* --- Interaction --- */ + iupClassRegisterCallback(ic, "ACTION_CB", "iiiis"); + iupClassRegisterCallback(ic, "CLICK_CB", "iis"); + iupClassRegisterCallback(ic, "RELEASE_CB", "iis"); + iupClassRegisterCallback(ic, "MOUSEMOVE_CB", "ii"); + iupClassRegisterCallback(ic, "ENTERITEM_CB", "ii"); + iupClassRegisterCallback(ic, "LEAVEITEM_CB", "ii"); + iupClassRegisterCallback(ic, "SCROLLTOP_CB", "ii"); + /* --- Drawing --- */ + iupClassRegisterCallback(ic, "BGCOLOR_CB", "iiIII"); + iupClassRegisterCallback(ic, "FGCOLOR_CB", "iiIII"); + iupClassRegisterCallback(ic, "FONT_CB", "ii=s"); + iupClassRegisterCallback(ic, "DRAW_CB", "iiiiii"); + iupClassRegisterCallback(ic, "DROPCHECK_CB", "ii"); + /* --- Editing --- */ + iupClassRegisterCallback(ic, "DROP_CB", "nii"); + iupClassRegisterCallback(ic, "DROPSELECT_CB", "iinsii"); + iupClassRegisterCallback(ic, "EDITION_CB", "iii"); + /* --- Callback Mode --- */ + iupClassRegisterCallback(ic, "VALUE_CB", "ii=s"); + iupClassRegisterCallback(ic, "VALUE_EDIT_CB", "iis"); + iupClassRegisterCallback(ic, "MARK_CB", "ii"); + iupClassRegisterCallback(ic, "MARKEDIT_CB", "iii"); + + /* IupMatrix Attributes - CELL */ + iupClassRegisterAttributeId(ic, "IDVALUE", iMatrixGetIdValueAttrib, iMatrixSetIdValueAttrib, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FOCUS_CELL", iMatrixGetFocusCellAttrib, iMatrixSetFocusCellAttrib, IUPAF_SAMEASSYSTEM, "1:1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); /* can be NOT mapped */ + iupClassRegisterAttribute(ic, "VALUE", iMatrixGetValueAttrib, iMatrixSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "FGCOLOR", NULL, iMatrixSetFgColorAttrib, IUPAF_NOT_MAPPED); + iupClassRegisterAttributeId(ic, "FONT", iMatrixGetFontAttrib, iMatrixSetFontAttrib, IUPAF_NOT_MAPPED); + iupClassRegisterAttributeId(ic, "FRAMEHORIZCOLOR", NULL, iMatrixSetFrameHorizColorAttrib, IUPAF_NOT_MAPPED); + iupClassRegisterAttributeId(ic, "FRAMEVERTCOLOR", NULL, iMatrixSetFrameVertColorAttrib, IUPAF_NOT_MAPPED); + + /* IupMatrix Attributes - COLUMN */ + iupClassRegisterAttributeId(ic, "ALIGNMENT", iMatrixGetAlignmentAttrib, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "SORTSIGN", NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* IupMatrix Attributes - SIZE */ + iupClassRegisterAttribute(ic, "NUMLIN", iMatrixGetNumLinAttrib, iupMatrixSetNumLinAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NUMCOL", iMatrixGetNumColAttrib, iupMatrixSetNumColAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NUMLIN_VISIBLE", iMatrixGetNumLinVisibleAttrib, NULL, IUPAF_SAMEASSYSTEM, "3", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NUMCOL_VISIBLE", iMatrixGetNumColVisibleAttrib, NULL, IUPAF_SAMEASSYSTEM, "4", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NUMLIN_VISIBLE_LAST", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "NUMCOL_VISIBLE_LAST", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "WIDTHDEF", NULL, NULL, IUPAF_SAMEASSYSTEM, "80", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "HEIGHTDEF", NULL, NULL, IUPAF_SAMEASSYSTEM, "8", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "WIDTH", iMatrixGetWidthAttrib, iMatrixSetWidthAttrib, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "HEIGHT", iMatrixGetHeightAttrib, iMatrixSetHeightAttrib, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "RASTERWIDTH", iMatrixGetRasterWidthAttrib, iMatrixSetRasterWidthAttrib, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "RASTERHEIGHT", iMatrixGetRasterHeightAttrib, iMatrixSetRasterHeightAttrib, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* IupMatrix Attributes - MARK */ + iupClassRegisterAttribute(ic, "MARKED", iupMatrixGetMarkedAttrib, iupMatrixSetMarkedAttrib, NULL, NULL, IUPAF_NO_INHERIT); /* noticed that MARKED must be mapped */ + iupClassRegisterAttributeId(ic, "MARK", iupMatrixGetMarkAttrib, iupMatrixSetMarkAttrib, IUPAF_NO_INHERIT); /* noticed that for MARK the matrix must be mapped */ + iupClassRegisterAttribute(ic, "MARK_MODE", iMatrixGetMarkModeAttrib, iMatrixSetMarkModeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MARKMODE", iMatrixGetMarkModeAttrib, iMatrixSetMarkModeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AREA", iMatrixGetMarkAreaAttrib, iMatrixSetMarkAreaAttrib, IUPAF_SAMEASSYSTEM, "CONTINUOUS", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MARKAREA", iMatrixGetMarkAreaAttrib, iMatrixSetMarkAreaAttrib, IUPAF_SAMEASSYSTEM, "CONTINUOUS", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MULTIPLE", iMatrixGetMarkMultipleAttrib, iMatrixSetMarkMultipleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MARKMULTIPLE", iMatrixGetMarkMultipleAttrib, iMatrixSetMarkMultipleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* IupMatrix Attributes - ACTION (only mapped) */ + iupClassRegisterAttribute(ic, "ADDLIN", NULL, iupMatrixSetAddLinAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DELLIN", NULL, iupMatrixSetDelLinAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ADDCOL", NULL, iupMatrixSetAddColAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DELCOL", NULL, iupMatrixSetDelColAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "ORIGIN", iMatrixGetOriginAttrib, iMatrixSetOriginAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SHOW", NULL, iMatrixSetShowAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "EDIT_MODE", iMatrixGetEditModeAttrib, iMatrixSetEditModeAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "REDRAW", NULL, iupMatrixDrawSetRedrawAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + + /* IupMatrix Attributes - EDITION */ + iupClassRegisterAttribute(ic, "CARET", iMatrixGetCaretAttrib, iMatrixSetCaretAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "SELECTION", iMatrixGetSelectionAttrib, iMatrixSetSelectionAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MULTILINE", iMatrixGetMultilineAttrib, iMatrixSetMultilineAttrib, NULL, NULL, IUPAF_NO_INHERIT); + iupClassRegisterAttributeId(ic, "MASK", NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* IupMatrix Attributes - GENERAL */ + iupClassRegisterAttribute(ic, "USETITLESIZE", iMatrixGetUseTitleSizeAttrib, iMatrixSetUseTitleSizeAttrib, IUPAF_SAMEASSYSTEM, "NO", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "FRAMECOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "100 100 100", IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "READONLY", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "RESIZEMATRIX", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "HIDEFOCUS", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + /* Overwrite IupCanvas Attributes */ + iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iMatrixSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); + iupClassRegisterAttributeId(ic, "BGCOLOR", iMatrixGetBgColorAttrib, iMatrixSetBgColorAttrib, IUPAF_NOT_MAPPED); + + /* IupMatrix Attributes - MASK */ + iupClassRegisterAttribute(ic, "OLD_MASK_DATA", iMatrixGetMaskDataAttrib, NULL, NULL, NULL, IUPAF_NO_STRING|IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + if (!IupGetHandle("IupMatrixCrossCursor")) + iMatrixCreateCursor(); + + return ic; +} + + +/*****************************************************************************************************/ + + +Ihandle* IupMatrix(const char* action) +{ + void *params[2]; + params[0] = (void*)action; + params[1] = NULL; + return IupCreatev("matrix", params); +} + +void IupMatSetAttribute(Ihandle* ih, const char* a, int l, int c, char* v) +{ + char* attr = iupStrGetMemory(100); + sprintf(attr, "%s%d:%d", a, l, c); + IupSetAttribute(ih, attr, v); +} + +void IupMatStoreAttribute(Ihandle* ih, const char* a, int l, int c, char* v) +{ + char* attr = iupStrGetMemory(100); + sprintf(attr, "%s%d:%d", a, l, c); + IupStoreAttribute(ih, attr, v); +} + +char* IupMatGetAttribute(Ihandle* ih, const char* a, int l, int c) +{ + char* attr = iupStrGetMemory(100); + sprintf(attr, "%s%d:%d", a, l, c); + return IupGetAttribute(ih, attr); +} + +int IupMatGetInt(Ihandle* ih, const char* a, int l, int c) +{ + char* attr = iupStrGetMemory(100); + sprintf(attr, "%s%d:%d", a, l, c); + return IupGetInt(ih, attr); +} + +float IupMatGetFloat(Ihandle* ih, const char* a, int l, int c) +{ + char* attr = iupStrGetMemory(100); + sprintf(attr, "%s%d:%d", a, l, c); + return IupGetFloat(ih, attr); +} + +void IupMatSetfAttribute(Ihandle* ih, const char* a, int l, int c, char* f, ...) +{ + static char v[SHRT_MAX]; + char* attr = iupStrGetMemory(100); + va_list arglist; + sprintf(attr, "%s%d:%d", a, l, c); + va_start(arglist, f); + vsprintf(v, f, arglist); + va_end(arglist); + IupStoreAttribute(ih, attr, v); +} diff --git a/iup/srcgl/Makefile b/iup/srcgl/Makefile new file mode 100755 index 0000000..882d0d2 --- /dev/null +++ b/iup/srcgl/Makefile @@ -0,0 +1,6 @@ + +.PHONY: do_all iupgl +do_all: iupgl + +iupgl: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak diff --git a/iup/srcgl/config.mak b/iup/srcgl/config.mak new file mode 100755 index 0000000..49599a5 --- /dev/null +++ b/iup/srcgl/config.mak @@ -0,0 +1,20 @@ +PROJNAME = iup +LIBNAME = iupgl +OPT = YES + +ifdef DBG + DEFINES += IUP_ASSERT +endif + +INCLUDES = ../include ../src +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup + +USE_OPENGL = Yes + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + SRC = iup_glcanvas_win.c +else + SRC = iup_glcanvas_x.c + USE_X11 = Yes +endif diff --git a/iup/srcgl/iup_glcanvas_win.c b/iup/srcgl/iup_glcanvas_win.c new file mode 100755 index 0000000..06cb66b --- /dev/null +++ b/iup/srcgl/iup_glcanvas_win.c @@ -0,0 +1,411 @@ +/** \file + * \brief iupgl control for Windows + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupgl.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" +#include "iup_assert.h" +#include "iup_register.h" + + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + HWND window; + HDC device; + HGLRC context; + HPALETTE palette; + int is_owned_dc; +}; + +static int wGLCanvasDefaultResize_CB(Ihandle *ih, int width, int height) +{ + IupGLMakeCurrent(ih); + glViewport(0,0,width,height); + return IUP_DEFAULT; +} + +static int wGLCanvasCreateMethod(Ihandle* ih, void** params) +{ + (void)params; + free(ih->data); /* allocated by the iCanvasCreateMethod of IupCanvas */ + ih->data = iupALLOCCTRLDATA(); + IupSetCallback(ih, "RESIZE_CB", (Icallback)wGLCanvasDefaultResize_CB); + return IUP_NOERROR; +} + +static int wGLCreateContext(Ihandle* ih) +{ + Ihandle* ih_shared; + int number; + int isIndex = 0; + int pixelFormat; + PIXELFORMATDESCRIPTOR test_pfd; + PIXELFORMATDESCRIPTOR pfd = { + sizeof(PIXELFORMATDESCRIPTOR), /* size of this pfd */ + 1, /* version number */ + PFD_DRAW_TO_WINDOW | /* support window */ + PFD_SUPPORT_OPENGL, /* support OpenGL */ + PFD_TYPE_RGBA, /* RGBA type */ + 24, /* 24-bit color depth */ + 0, 0, 0, 0, 0, 0, /* color bits ignored */ + 0, /* no alpha buffer */ + 0, /* shift bit ignored */ + 0, /* no accumulation buffer */ + 0, 0, 0, 0, /* accum bits ignored */ + 16, /* 32-bit z-buffer */ + 0, /* no stencil buffer */ + 0, /* no auxiliary buffer */ + PFD_MAIN_PLANE, /* main layer */ + 0, /* reserved */ + 0, 0, 0 /* layer masks ignored */ + }; + + /* the IupCanvas is already mapped, just initialize the OpenGL context */ + + /* double or single buffer */ + if (iupStrEqualNoCase(iupAttribGetStr(ih,"BUFFER"), "DOUBLE")) + pfd.dwFlags |= PFD_DOUBLEBUFFER; + + /* stereo */ + if (iupAttribGetBoolean(ih,"STEREO")) + pfd.dwFlags |= PFD_STEREO; + + /* rgba or index */ + if (iupStrEqualNoCase(iupAttribGetStr(ih,"COLOR"), "INDEX")) + { + isIndex = 1; + pfd.iPixelType = PFD_TYPE_COLORINDEX; + pfd.cColorBits = 8; /* assume 8 bits when indexed */ + number = iupAttribGetInt(ih,"BUFFER_SIZE"); + if (number > 0) pfd.cColorBits = (BYTE)number; + } + + /* red, green, blue bits */ + number = iupAttribGetInt(ih,"RED_SIZE"); + if (number > 0) pfd.cRedBits = (BYTE)number; + pfd.cRedShift = 0; + + number = iupAttribGetInt(ih,"GREEN_SIZE"); + if (number > 0) pfd.cGreenBits = (BYTE)number; + pfd.cGreenShift = pfd.cRedBits; + + number = iupAttribGetInt(ih,"BLUE_SIZE"); + if (number > 0) pfd.cBlueBits = (BYTE)number; + pfd.cBlueShift = pfd.cRedBits + pfd.cGreenBits; + + number = iupAttribGetInt(ih,"ALPHA_SIZE"); + if (number > 0) pfd.cAlphaBits = (BYTE)number; + pfd.cAlphaShift = pfd.cRedBits + pfd.cGreenBits + pfd.cBlueBits; + + /* depth and stencil size */ + number = iupAttribGetInt(ih,"DEPTH_SIZE"); + if (number > 0) pfd.cDepthBits = (BYTE)number; + + /* stencil */ + number = iupAttribGetInt(ih,"STENCIL_SIZE"); + if (number > 0) pfd.cStencilBits = (BYTE)number; + + /* red, green, blue accumulation bits */ + number = iupAttribGetInt(ih,"ACCUM_RED_SIZE"); + if (number > 0) pfd.cAccumRedBits = (BYTE)number; + + number = iupAttribGetInt(ih,"ACCUM_GREEN_SIZE"); + if (number > 0) pfd.cAccumGreenBits = (BYTE)number; + + number = iupAttribGetInt(ih,"ACCUM_BLUE_SIZE"); + if (number > 0) pfd.cAccumBlueBits = (BYTE)number; + + number = iupAttribGetInt(ih,"ACCUM_ALPHA_SIZE"); + if (number > 0) pfd.cAccumAlphaBits = (BYTE)number; + + pfd.cAccumBits = pfd.cAccumRedBits + pfd.cAccumGreenBits + pfd.cAccumBlueBits + pfd.cAccumAlphaBits; + + /* get a device context */ + { + LONG style = GetClassLong(ih->data->window, GCL_STYLE); + ih->data->is_owned_dc = (int) ((style & CS_OWNDC) || (style & CS_CLASSDC)); + } + + ih->data->device = GetDC(ih->data->window); + iupAttribSetStr(ih, "VISUAL", (char*)ih->data->device); + + /* choose pixel format */ + pixelFormat = ChoosePixelFormat(ih->data->device, &pfd); + if (pixelFormat == 0) + { + iupAttribSetStr(ih, "ERROR", "No appropriate pixel format."); + return IUP_NOERROR; + } + SetPixelFormat(ih->data->device,pixelFormat,&pfd); + + /* create rendering context */ + ih->data->context = wglCreateContext(ih->data->device); + if (!ih->data->context) + { + iupAttribSetStr(ih, "ERROR", "Could not create a rendering context."); + return IUP_NOERROR; + } + iupAttribSetStr(ih, "CONTEXT", (char*)ih->data->context); + + ih_shared = IupGetAttributeHandle(ih, "SHAREDCONTEXT"); + if (ih_shared && iupStrEqual(ih_shared->iclass->name, "glcanvas")) /* must be an IupGLCanvas */ + wglShareLists(ih_shared->data->context, ih->data->context); + + DescribePixelFormat(ih->data->device, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &test_pfd); + if ((pfd.dwFlags & PFD_STEREO) && !(test_pfd.dwFlags & PFD_STEREO)) + { + iupAttribSetStr(ih, "ERROR", "Stereo not available."); + return IUP_NOERROR; + } + + /* create colormap for index mode */ + if (isIndex) + { + if (!ih->data->palette) + { + LOGPALETTE lp = {0x300,1,{255,255,255,PC_NOCOLLAPSE}}; /* set first color as white */ + ih->data->palette = CreatePalette(&lp); + ResizePalette(ih->data->palette,1<data->palette); + } + + SelectPalette(ih->data->device,ih->data->palette,FALSE); + RealizePalette(ih->data->device); + } + + return IUP_NOERROR; +} + +static int wGLCanvasMapMethod(Ihandle* ih) +{ + /* get a device context */ + ih->data->window = (HWND)iupAttribGet(ih, "HWND"); /* check first in the hash table, can be defined by the IupFileDlg */ + if (!ih->data->window) + ih->data->window = (HWND)IupGetAttribute(ih, "HWND"); /* works for Win32 and GTK, only after mapping the IupCanvas */ + if (!ih->data->window) + return IUP_NOERROR; + + { + LONG style = GetClassLong(ih->data->window, GCL_STYLE); + ih->data->is_owned_dc = (int) ((style & CS_OWNDC) || (style & CS_CLASSDC)); + } + + return wGLCreateContext(ih); +} + +static void wGLCanvasUnMapMethod(Ihandle* ih) +{ + if (ih->data->context) + { + if (ih->data->context == wglGetCurrentContext()) + wglMakeCurrent(NULL, NULL); + + wglDeleteContext(ih->data->context); + } + + if (ih->data->palette) + DeleteObject((HGDIOBJ)ih->data->palette); + + if (ih->data->device) + ReleaseDC(ih->data->window, ih->data->device); +} + +static int wGLCanvasSetRefreshContextAttrib(Ihandle* ih, const char* value) +{ + if (!ih->data->is_owned_dc) + { + if (ih->data->context) + { + if (ih->data->context == wglGetCurrentContext()) + wglMakeCurrent(NULL, NULL); + + wglDeleteContext(ih->data->context); + } + + if (ih->data->device) + ReleaseDC(ih->data->window, ih->data->device); + + wGLCreateContext(ih); + } + + (void)value; + return 0; +} + +static Iclass* wGlCanvasGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "glcanvas"; + ic->format = "A"; /* one optional callback name */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + ic->Create = wGLCanvasCreateMethod; + ic->Map = wGLCanvasMapMethod; + ic->UnMap = wGLCanvasUnMapMethod; + + iupClassRegisterAttribute(ic, "BUFFER", NULL, NULL, IUPAF_SAMEASSYSTEM, "SINGLE", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "COLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "RGBA", IUPAF_DEFAULT); + + iupClassRegisterAttribute(ic, "CONTEXT", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "VISUAL", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "COLORMAP", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_STRING); + + iupClassRegisterAttribute(ic, "REFRESHCONTEXT", NULL, wGLCanvasSetRefreshContextAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + + return ic; +} + +/******************************************* Exported functions */ + +void IupGLCanvasOpen(void) +{ + if (!IupGetGlobal("_IUP_GLCANVAS_OPEN")) + { + iupRegisterClass(wGlCanvasGetClass()); + IupSetGlobal("_IUP_GLCANVAS_OPEN", "1"); + } +} + +Ihandle* IupGLCanvas(const char *action) +{ + void *params[2]; + params[0] = (void*)action; + params[1] = NULL; + return IupCreatev("glcanvas", params); +} + +int IupGLIsCurrent(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return 0; + + /* must be an IupGLCanvas */ + if (!iupStrEqual(ih->iclass->name, "glcanvas")) + return 0; + + /* must be mapped */ + if (!ih->data->window) + return 0; + + if (ih->data->context == wglGetCurrentContext()) + return 1; + + return 0; +} + +void IupGLMakeCurrent(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + /* must be an IupGLCanvas */ + if (!iupStrEqual(ih->iclass->name, "glcanvas")) + return; + + /* must be mapped */ + if (!ih->data->window) + return; + + wglMakeCurrent(ih->data->device, ih->data->context); +} + +void IupGLSwapBuffers(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + /* must be an IupGLCanvas */ + if (!iupStrEqual(ih->iclass->name, "glcanvas")) + return; + + /* must be mapped */ + if (!ih->data->window) + return; + + SwapBuffers(ih->data->device); +} + +void IupGLPalette(Ihandle* ih, int index, float r, float g, float b) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + /* must be an IupGLCanvas */ + if (!iupStrEqual(ih->iclass->name, "glcanvas")) + return; + + /* must be mapped */ + if (!ih->data->window) + return; + + /* must have a palette */ + if (ih->data->palette) + { + PALETTEENTRY entry; + entry.peRed = (BYTE)(r*255); + entry.peGreen = (BYTE)(g*255); + entry.peBlue = (BYTE)(b*255); + entry.peFlags = PC_NOCOLLAPSE; + SetPaletteEntries(ih->data->palette,index,1,&entry); + UnrealizeObject(ih->data->device); + SelectPalette(ih->data->device,ih->data->palette,FALSE); + RealizePalette(ih->data->device); + } +} + +void IupGLUseFont(Ihandle* ih, int first, int count, int list_base) +{ + HFONT old_font, font; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + /* must be an IupGLCanvas */ + if (!iupStrEqual(ih->iclass->name, "glcanvas")) + return; + + /* must be mapped */ + if (!ih->data->window) + return; + + font = (HFONT)IupGetAttribute(ih, "HFONT"); + if (font) + { + old_font = SelectObject(ih->data->device, font); + wglUseFontBitmaps(ih->data->device, first, count, list_base); + SelectObject(ih->data->device, old_font); + } +} + +void IupGLWait(int gl) +{ + if (gl) + glFinish(); + else + GdiFlush(); +} diff --git a/iup/srcgl/iup_glcanvas_x.c b/iup/srcgl/iup_glcanvas_x.c new file mode 100755 index 0000000..adddeb1 --- /dev/null +++ b/iup/srcgl/iup_glcanvas_x.c @@ -0,0 +1,448 @@ +/** \file + * \brief iupgl control for X11 + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iupgl.h" + +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_stdcontrols.h" +#include "iup_assert.h" +#include "iup_register.h" + + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + + Display* display; + Drawable window; + + Colormap colormap; + XVisualInfo *vinfo; + GLXContext context; +}; + +static int xGLCanvasDefaultResize(Ihandle *ih, int width, int height) +{ + IupGLMakeCurrent(ih); + glViewport(0,0,width,height); + return IUP_DEFAULT; +} + +static int xGLCanvasCreateMethod(Ihandle* ih, void** params) +{ + (void)params; + free(ih->data); /* allocated by the iCanvasCreateMethod of IupCanvas */ + ih->data = iupALLOCCTRLDATA(); + IupSetCallback(ih, "RESIZE_CB", (Icallback)xGLCanvasDefaultResize); + return IUP_NOERROR; +} + +static void xGLCanvasGetVisual(Ihandle* ih) +{ + int erb, evb, number; + int n = 0; + int alist[40]; + + if (!ih->data->display) + ih->data->display = (Display*)IupGetGlobal("XDISPLAY"); /* works for Motif and GTK, can be called before mapped */ + if (!ih->data->display) + return; + + /* double or single buffer */ + if (iupStrEqualNoCase(iupAttribGetStr(ih,"BUFFER"), "DOUBLE")) + { + alist[n++] = GLX_DOUBLEBUFFER; + } + + /* stereo */ + if (iupAttribGetBoolean(ih,"STEREO")) + { + alist[n++] = GLX_STEREO; + } + + /* rgba or index */ + if (iupStrEqualNoCase(iupAttribGetStr(ih,"COLOR"), "INDEX")) + { + /* buffer size (for index mode) */ + number = iupAttribGetInt(ih,"BUFFER_SIZE"); + if (number > 0) + { + alist[n++] = GLX_BUFFER_SIZE; + alist[n++] = number; + } + } + else + { + alist[n++] = GLX_RGBA; /* assume rgba as default */ + } + + /* red, green, blue bits */ + number = iupAttribGetInt(ih,"RED_SIZE"); + if (number > 0) + { + alist[n++] = GLX_RED_SIZE; + alist[n++] = number; + } + + number = iupAttribGetInt(ih,"GREEN_SIZE"); + if (number > 0) + { + alist[n++] = GLX_GREEN_SIZE; + alist[n++] = number; + } + + number = iupAttribGetInt(ih,"BLUE_SIZE"); + if (number > 0) + { + alist[n++] = GLX_BLUE_SIZE; + alist[n++] = number; + } + + number = iupAttribGetInt(ih,"ALPHA_SIZE"); + if (number > 0) + { + alist[n++] = GLX_ALPHA_SIZE; + alist[n++] = number; + } + + /* depth and stencil size */ + number = iupAttribGetInt(ih,"DEPTH_SIZE"); + if (number > 0) + { + alist[n++] = GLX_DEPTH_SIZE; + alist[n++] = number; + } + + number = iupAttribGetInt(ih,"STENCIL_SIZE"); + if (number > 0) + { + alist[n++] = GLX_STENCIL_SIZE; + alist[n++] = number; + } + + /* red, green, blue accumulation bits */ + number = iupAttribGetInt(ih,"ACCUM_RED_SIZE"); + if (number > 0) + { + alist[n++] = GLX_ACCUM_RED_SIZE; + alist[n++] = number; + } + + number = iupAttribGetInt(ih,"ACCUM_GREEN_SIZE"); + if (number > 0) + { + alist[n++] = GLX_ACCUM_GREEN_SIZE; + alist[n++] = number; + } + + number = iupAttribGetInt(ih,"ACCUM_BLUE_SIZE"); + if (number > 0) + { + alist[n++] = GLX_ACCUM_BLUE_SIZE; + alist[n++] = number; + } + + number = iupAttribGetInt(ih,"ACCUM_ALPHA_SIZE"); + if (number > 0) + { + alist[n++] = GLX_ACCUM_ALPHA_SIZE; + alist[n++] = number; + } + alist[n++] = None; + + /* check out X extension */ + if (!glXQueryExtension(ih->data->display, &erb, &evb)) + { + iupAttribSetStr(ih, "ERROR", "X server has no OpenGL GLX extension"); + return; + } + + /* choose visual */ + ih->data->vinfo = glXChooseVisual(ih->data->display, DefaultScreen(ih->data->display), alist); + if (!ih->data->vinfo) + iupAttribSetStr(ih, "ERROR", "No appropriate visual"); +} + +static char* xGLCanvasGetVisualAttrib(Ihandle *ih) +{ + /* This must be available before mapping, because IupCanvas uses it during map in GTK and Motif. */ + if (ih->data->vinfo) + return (char*)ih->data->vinfo->visual; + + xGLCanvasGetVisual(ih); + + if (ih->data->vinfo) + return (char*)ih->data->vinfo->visual; + + return NULL; +} + +static int xGLCanvasMapMethod(Ihandle* ih) +{ + GLXContext shared_context = NULL; + Ihandle* ih_shared; + + /* the IupCanvas is already mapped, just initialize the OpenGL context */ + + if (!xGLCanvasGetVisualAttrib(ih)) + return IUP_NOERROR; /* do not abort mapping */ + + ih->data->window = (XID)iupAttribGet(ih, "XWINDOW"); /* check first in the hash table, can be defined by the IupFileDlg */ + if (!ih->data->window) + ih->data->window = (XID)IupGetAttribute(ih, "XWINDOW"); /* works for Motif and GTK, only after mapping the IupCanvas */ + if (!ih->data->window) + return IUP_NOERROR; + + ih_shared = IupGetAttributeHandle(ih, "SHAREDCONTEXT"); + if (ih_shared && iupStrEqual(ih_shared->iclass->name, "glcanvas")) /* must be an IupGLCanvas */ + shared_context = ih_shared->data->context; + + /* create rendering context */ + ih->data->context = glXCreateContext(ih->data->display, ih->data->vinfo, shared_context, GL_TRUE); + if (!ih->data->context) + { + iupAttribSetStr(ih, "ERROR", "Could not create a rendering context"); + return IUP_NOERROR; + } + iupAttribSetStr(ih, "CONTEXT", (char*)ih->data->context); + + /* create colormap for index mode */ + if (iupStrEqualNoCase(iupAttribGetStr(ih,"COLOR"), "INDEX") && + ih->data->vinfo->class != StaticColor && ih->data->vinfo->class != StaticGray) + { + ih->data->colormap = XCreateColormap(ih->data->display, RootWindow(ih->data->display, DefaultScreen(ih->data->display)), ih->data->vinfo->visual, AllocAll); + iupAttribSetStr(ih, "COLORMAP", (char*)ih->data->colormap); + } + + if (ih->data->colormap != None) + IupGLPalette(ih,0,1,1,1); /* set first color as white */ + + return IUP_NOERROR; +} + +static void xGLCanvasUnMapMethod(Ihandle* ih) +{ + if (ih->data->context) + { + if (ih->data->context == glXGetCurrentContext()) + glXMakeCurrent(ih->data->display, None, NULL); + + glXDestroyContext(ih->data->display, ih->data->context); + } + + if (ih->data->colormap != None) + XFreeColormap(ih->data->display, ih->data->colormap); + + if (ih->data->vinfo) + XFree(ih->data->vinfo); +} + +static Iclass* xGlCanvasGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "glcanvas"; + ic->format = "A"; /* one optional callback name */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + ic->Create = xGLCanvasCreateMethod; + ic->Map = xGLCanvasMapMethod; + ic->UnMap = xGLCanvasUnMapMethod; + + iupClassRegisterAttribute(ic, "BUFFER", NULL, NULL, IUPAF_SAMEASSYSTEM, "SINGLE", IUPAF_DEFAULT); + iupClassRegisterAttribute(ic, "COLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "RGBA", IUPAF_DEFAULT); + + iupClassRegisterAttribute(ic, "CONTEXT", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_STRING); + iupClassRegisterAttribute(ic, "VISUAL", xGLCanvasGetVisualAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_STRING|IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "COLORMAP", NULL, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_STRING); + + return ic; +} + + +/******************************************* Exported functions */ + +void IupGLCanvasOpen(void) +{ + if (!IupGetGlobal("_IUP_GLCANVAS_OPEN")) + { + iupRegisterClass(xGlCanvasGetClass()); + IupSetGlobal("_IUP_GLCANVAS_OPEN", "1"); + } +} + +Ihandle* IupGLCanvas(const char *action) +{ + void *params[2]; + params[0] = (void*)action; + params[1] = NULL; + return IupCreatev("glcanvas", params); +} + +int IupGLIsCurrent(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return 0; + + /* must be an IupGLCanvas */ + if (!iupStrEqual(ih->iclass->name, "glcanvas")) + return 0; + + /* must be mapped */ + if (!ih->data->window) + return 0; + + if (ih->data->context == glXGetCurrentContext()) + return 1; + + return 0; +} + +void IupGLMakeCurrent(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + /* must be an IupGLCanvas */ + if (!iupStrEqual(ih->iclass->name, "glcanvas")) + return; + + /* must be mapped */ + if (!ih->data->window) + return; + + glXMakeCurrent(ih->data->display, ih->data->window, ih->data->context); + glXWaitX(); +} + +void IupGLSwapBuffers(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + /* must be an IupGLCanvas */ + if (!iupStrEqual(ih->iclass->name, "glcanvas")) + return; + + /* must be mapped */ + if (!ih->data->window) + return; + + glXSwapBuffers(ih->data->display, ih->data->window); +} + +static int xGLCanvasIgnoreError(Display *param1, XErrorEvent *param2) +{ + (void)param1; + (void)param2; + return 0; +} + +void IupGLPalette(Ihandle* ih, int index, float r, float g, float b) +{ + XColor color; + int rShift, gShift, bShift; + XVisualInfo *vinfo; + XErrorHandler old_handler; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + /* must be an IupGLCanvas */ + if (!iupStrEqual(ih->iclass->name, "glcanvas")) + return; + + /* must be mapped */ + if (!ih->data->window) + return; + + /* must have a colormap */ + if (ih->data->colormap == None) + return; + + /* code fragment based on the toolkit library provided with OpenGL */ + old_handler = XSetErrorHandler(xGLCanvasIgnoreError); + + vinfo = ih->data->vinfo; + switch (vinfo->class) + { + case DirectColor: + rShift = ffs((unsigned int)vinfo->red_mask) - 1; + gShift = ffs((unsigned int)vinfo->green_mask) - 1; + bShift = ffs((unsigned int)vinfo->blue_mask) - 1; + color.pixel = ((index << rShift) & vinfo->red_mask) | + ((index << gShift) & vinfo->green_mask) | + ((index << bShift) & vinfo->blue_mask); + color.red = (unsigned short)(r * 65535.0 + 0.5); + color.green = (unsigned short)(g * 65535.0 + 0.5); + color.blue = (unsigned short)(b * 65535.0 + 0.5); + color.flags = DoRed | DoGreen | DoBlue; + XStoreColor(ih->data->display, ih->data->colormap, &color); + break; + case GrayScale: + case PseudoColor: + if (index < vinfo->colormap_size) + { + color.pixel = index; + color.red = (unsigned short)(r * 65535.0 + 0.5); + color.green = (unsigned short)(g * 65535.0 + 0.5); + color.blue = (unsigned short)(b * 65535.0 + 0.5); + color.flags = DoRed | DoGreen | DoBlue; + XStoreColor(ih->data->display, ih->data->colormap, &color); + } + break; + } + + XSync(ih->data->display, 0); + XSetErrorHandler(old_handler); +} + +void IupGLUseFont(Ihandle* ih, int first, int count, int list_base) +{ + Font font; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + /* must be an IupGLCanvas */ + if (!iupStrEqual(ih->iclass->name, "glcanvas")) + return; + + /* must be mapped */ + if (!ih->data->window) + return; + + font = (Font)IupGetAttribute(ih, "XFONTID"); + if (font) + glXUseXFont(font, first, count, list_base); +} + +void IupGLWait(int gl) +{ + if (gl) + glXWaitGL(); + else + glXWaitX(); +} diff --git a/iup/srcgl/iupgl.def b/iup/srcgl/iupgl.def new file mode 100755 index 0000000..d82a1b1 --- /dev/null +++ b/iup/srcgl/iupgl.def @@ -0,0 +1,9 @@ +EXPORTS +IupGLCanvasOpen +IupGLCanvas +IupGLMakeCurrent +IupGLSwapBuffers +IupGLPalette +IupGLIsCurrent +IupGLUseFont +IupGLWait diff --git a/iup/srcgl/iupgl.dep b/iup/srcgl/iupgl.dep new file mode 100644 index 0000000..52fbcfa --- /dev/null +++ b/iup/srcgl/iupgl.dep @@ -0,0 +1,5 @@ +$(OBJDIR)/iup_glcanvas_x.o: iup_glcanvas_x.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../include/iupgl.h \ + ../src/iup_object.h ../src/iup_class.h ../src/iup_table.h \ + ../src/iup_classbase.h ../src/iup_attrib.h ../src/iup_str.h \ + ../src/iup_stdcontrols.h ../src/iup_assert.h ../src/iup_register.h diff --git a/iup/srcgl/make_uname b/iup/srcgl/make_uname new file mode 100755 index 0000000..cc4b881 --- /dev/null +++ b/iup/srcgl/make_uname @@ -0,0 +1,3 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake $1 $2 $3 $4 $5 $6 $7 diff --git a/iup/srcgl/make_uname.bat b/iup/srcgl/make_uname.bat new file mode 100755 index 0000000..f0a0722 --- /dev/null +++ b/iup/srcgl/make_uname.bat @@ -0,0 +1,4 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +call tecmake %1 %2 %3 %4 %5 %6 diff --git a/iup/srcim/Makefile b/iup/srcim/Makefile new file mode 100755 index 0000000..933ded1 --- /dev/null +++ b/iup/srcim/Makefile @@ -0,0 +1,6 @@ + +.PHONY: do_all iupim +do_all: iupim + +iupim: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak diff --git a/iup/srcim/config.mak b/iup/srcim/config.mak new file mode 100755 index 0000000..8feb290 --- /dev/null +++ b/iup/srcim/config.mak @@ -0,0 +1,15 @@ +PROJNAME = iup +LIBNAME = iupim +OPT = YES + +USE_IM = Yes + +ifdef DBG + DEFINES += IUP_ASSERT +endif + +INCLUDES = ../include ../src +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup + +SRC = iup_im.c diff --git a/iup/srcim/iup_im.c b/iup/srcim/iup_im.c new file mode 100755 index 0000000..c26a3ff --- /dev/null +++ b/iup/srcim/iup_im.c @@ -0,0 +1,306 @@ +/** \file + * \brief iupim utilities + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupim.h" + +#include +#include +#include + +#include "iup_object.h" +#include "iup_assert.h" +#include "iup_str.h" +#include "iup_image.h" + + +static void PrintError(int error) +{ + char* lang = IupGetLanguage(); + char* msg; + if (iupStrEqualNoCase(lang, "ENGLISH")) + { + switch (error) + { + case IM_ERR_OPEN: + msg = "Error Opening File.\n"; + break; + case IM_ERR_MEM: + msg = "Insuficient memory.\n"; + break; + case IM_ERR_ACCESS: + msg = "Error Accessing File.\n"; + break; + case IM_ERR_DATA: + msg = "Image type not Suported.\n"; + break; + case IM_ERR_FORMAT: + msg = "Invalid Format.\n"; + break; + case IM_ERR_COMPRESS: + msg = "Invalid or unsupported compression.\n"; + break; + default: + msg = "Unknown Error.\n"; + } + } + else + { + switch (error) + { + case IM_ERR_OPEN: + msg = "Erro Abrindo Arquivo.\n"; + break; + case IM_ERR_MEM: + msg = "Memória Insuficiente.\n"; + break; + case IM_ERR_ACCESS: + msg = "Erro Acessando Arquivo.\n"; + break; + case IM_ERR_DATA: + msg = "Tipo de Imagem não Suportado.\n"; + break; + case IM_ERR_FORMAT: + msg = "Formato Inválido.\n"; + break; + case IM_ERR_COMPRESS: + msg = "Compressão Inválida ou não Suportada.\n"; + break; + default: + msg = "Erro Desconhecido.\n"; + } + } + + IupMessage("Error", msg); +} + +Ihandle* IupLoadImage(const char* file_name) +{ + long palette[256]; + int i, error, width, height, color_mode, flags, + data_type, palette_count, has_alpha = 0; + Ihandle* iup_image = NULL; + const unsigned char* transp_index; + void* image_data = NULL; + imCounterCallback old_callback; + imFile* ifile; + + iupASSERT(file_name); + if (!file_name) + return NULL; + + old_callback = imCounterSetCallback(NULL, NULL); + + ifile = imFileOpen(file_name, &error); + if (error) + goto load_finish; + + error = imFileReadImageInfo(ifile, 0, &width, &height, &color_mode, &data_type); + if (error) + goto load_finish; + + flags = IM_TOPDOWN; + flags |= IM_PACKED; + if (imColorModeHasAlpha(color_mode)) + { + has_alpha = 1; + flags |= IM_ALPHA; + } + + color_mode = imColorModeToBitmap(color_mode); + data_type = IM_BYTE; + + image_data = malloc(imImageDataSize(width, height, flags|color_mode, data_type)); + if (!image_data) + goto load_finish; + + error = imFileReadImageData(ifile, image_data, 1, flags); + if (error) + goto load_finish; + + if (color_mode == IM_RGB) + { + if (has_alpha) + iup_image = IupImageRGBA(width, height, (unsigned char*)image_data); + else + iup_image = IupImageRGB(width, height, (unsigned char*)image_data); + palette_count = 0; + } + else + { + imFileGetPalette(ifile, palette, &palette_count); + iup_image = IupImage(width, height, (unsigned char*)image_data); + } + + for (i = 0; i < palette_count; i++) + { + char attr[6], color[30]; + unsigned char r, g, b; + + sprintf(attr, "%d", i); + imColorDecode(&r, &g, &b, palette[i]); + sprintf(color, "%d %d %d", (int)r, (int)g, (int)b); + + IupStoreAttribute(iup_image, attr, color); + } + + transp_index = imFileGetAttribute(ifile, "TransparencyIndex", NULL, NULL); + if (transp_index) + { + char attr[6]; + sprintf(attr, "%d", (int)(*transp_index)); + IupSetAttribute(iup_image, attr, "BGCOLOR"); + } + +load_finish: + imCounterSetCallback(NULL, old_callback); + if (ifile) imFileClose(ifile); + if (image_data) free(image_data); + if (error) PrintError(error); + return iup_image; +} + +int IupSaveImage(Ihandle* ih, const char* file_name, const char* format) +{ + int width, height, i, bpp; + unsigned char* data; + int error; + long palette[256]; + imFile* ifile; + + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return 0; + + iupASSERT(file_name); + if (!file_name) + return 0; + + ifile = imFileNew(file_name, format, &error); + if (!ifile) + { + PrintError(error); + return 0; + } + + data = (unsigned char*)IupGetAttribute(ih, "WID"); + + width = IupGetInt(ih, "WIDTH"); + height = IupGetInt(ih, "HEIGHT"); + bpp = IupGetInt(ih, "BPP"); + + if (bpp == 24) + error = imFileWriteImageInfo(ifile, width, height, IM_RGB|IM_TOPDOWN|IM_PACKED, IM_BYTE); + else if (bpp == 32) + error = imFileWriteImageInfo(ifile, width, height, IM_RGB|IM_TOPDOWN|IM_PACKED|IM_ALPHA, IM_BYTE); + else /* bpp == 8 */ + { + for(i = 0; i < 256; i++) + { + unsigned int r, g, b; + char str[20]; + char* color; + + sprintf(str, "%d", i); + color = IupGetAttribute(ih, str); + if (!color) + break; + + if (strcmp(color, "BGCOLOR") == 0) + { + unsigned char transp_index = (unsigned char)i; + imFileSetAttribute(ifile, "TransparencyIndex", IM_BYTE, 1, &transp_index); + palette[i] = imColorEncode(0, 0, 0); + } + else + { + sscanf(color, "%d %d %d", &r, &g, &b); + palette[i] = imColorEncode((unsigned char)r, (unsigned char)g, (unsigned char)b); + } + } + + imFileSetPalette(ifile, palette, i); + + error = imFileWriteImageInfo(ifile, width, height, IM_MAP|IM_TOPDOWN, IM_BYTE); + } + + if (error == IM_ERR_NONE) + error = imFileWriteImageData(ifile, data); + + imFileClose(ifile); + + if (error) + PrintError(error); + + return error == IM_ERR_NONE? 1: 0; +} + +/******************************************************************************/ + +static void iInitColors(iupColor* colors, int count, long* palette) +{ + int i; + for (i=0; i< count; i++) + { + imColorDecode(&(colors[i].r), &(colors[i].g), &(colors[i].b), palette[i]); + colors[i].a = 0; + } +} + +static void iInitPalette(long* palette, int count, iupColor* colors) +{ + int i; + for (i=0; i< count; i++) + { + palette[i] = imColorEncode(colors[i].r, colors[i].g, colors[i].b); + } +} + +void* IupGetImageNativeHandle(imImage* image) +{ + int bpp = image->depth*8; + iupColor colors[256]; + iInitColors(colors, image->palette_count, image->palette); + if (image->has_alpha && bpp == 24) + bpp = 32; + return iupdrvImageCreateImageRaw(image->width, image->height, bpp, colors, image->palette_count, image->data[0]); +} + +imImage* IupGetNativeHandleImage(void* handle) +{ + int width, height, bpp; + iupColor colors[256]; + int colors_count = 0; + if (iupdrvImageGetRawInfo(handle, &width, &height, &bpp, colors, &colors_count)) + { + imImage* image = imImageCreate(width, height, bpp>8? IM_RGB: IM_MAP, IM_BYTE); + if (image) + { + if (bpp==32) + imImageAddAlpha(image); + + if (bpp<=8 && colors_count) + { + long* palette = (long*)malloc(256*sizeof(long)); + iInitPalette(palette, colors_count, colors); + imImageSetPalette(image, palette, colors_count); + } + + iupdrvImageGetRawData(handle, image->data[0]); + + return image; + } + + iupdrvImageDestroy(handle, IUPIMAGE_IMAGE); + } + return NULL; +} diff --git a/iup/srcim/iupim.def b/iup/srcim/iupim.def new file mode 100755 index 0000000..1014c9b --- /dev/null +++ b/iup/srcim/iupim.def @@ -0,0 +1,3 @@ +EXPORTS +IupLoadImage +IupSaveImage diff --git a/iup/srcim/iupim.dep b/iup/srcim/iupim.dep new file mode 100644 index 0000000..c19b469 --- /dev/null +++ b/iup/srcim/iupim.dep @@ -0,0 +1,7 @@ +$(OBJDIR)/iup_im.o: iup_im.c ../../im/include/im.h ../../im/include/old_im.h \ + ../../im/include/im_convert.h ../../im/include/im_image.h \ + ../../im/include/im_counter.h ../../im/include/im_util.h \ + ../../im/include/im_image.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupim.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_table.h ../src/iup_classbase.h \ + ../src/iup_assert.h ../src/iup_str.h ../src/iup_image.h diff --git a/iup/srcim/make_uname b/iup/srcim/make_uname new file mode 100755 index 0000000..cc4b881 --- /dev/null +++ b/iup/srcim/make_uname @@ -0,0 +1,3 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake $1 $2 $3 $4 $5 $6 $7 diff --git a/iup/srcim/make_uname.bat b/iup/srcim/make_uname.bat new file mode 100755 index 0000000..f0a0722 --- /dev/null +++ b/iup/srcim/make_uname.bat @@ -0,0 +1,4 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +call tecmake %1 %2 %3 %4 %5 %6 diff --git a/iup/srcimglib/Makefile b/iup/srcimglib/Makefile new file mode 100755 index 0000000..261537a --- /dev/null +++ b/iup/srcimglib/Makefile @@ -0,0 +1,6 @@ + +.PHONY: do_all iupimglib +do_all: iupimglib + +iupimglib: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak diff --git a/iup/srcimglib/config.mak b/iup/srcimglib/config.mak new file mode 100755 index 0000000..01cfefb --- /dev/null +++ b/iup/srcimglib/config.mak @@ -0,0 +1,14 @@ +PROJNAME = iup +LIBNAME = iupimglib +#OPT = YES + +INCLUDES = ../include ../src + +SRC = iup_image_library.c + +LIBS = iup +LDIR = ../lib/$(TEC_UNAME) + +ifneq ($(findstring AIX, $(TEC_UNAME)), ) + DEFINES += IUP_IMGLIB_DUMMY +endif diff --git a/iup/srcimglib/iup_image_library.c b/iup/srcimglib/iup_image_library.c new file mode 100755 index 0000000..0202b13 --- /dev/null +++ b/iup/srcimglib/iup_image_library.c @@ -0,0 +1,403 @@ +/** \file + * \brief initializes iupdial, iupgauge, iuptabs, iupcb, iupgc and iupval controls. + * + * See Copyright Notice in iup.h + */ + +#include + +#include "iup.h" + +#include "iup_str.h" +#include "iup_image.h" + +/* GTK and Win32 share the same library in Windows */ +/* GTK and Motif share the same library in UNIX */ + +#ifndef IUP_IMGLIB_DUMMY +#ifdef WIN32 +#include "iup_imglib_bitmaps.h" /* Used only by the Win32 driver in Windows */ +#endif +#ifndef WIN32 +#include "iup_imglib_bitmaps8.h" /* Used only by the Motif driver in UNIX */ +#endif +#include "iup_imglib_bitmapsgtk.h" /* Used only by the GTK driver in UNIX or Windows */ +#ifndef WIN32 +#include "iup_imglib_icons8.h" /* Used only by the Motif driver in UNIX */ +#include "iup_imglib_logos8.h" /* Used only by the Motif driver in UNIX */ +#endif +#include "iup_imglib_icons.h" +#include "iup_imglib_logos.h" +#endif + +void IupImageLibOpen(void) +{ +#ifndef IUP_IMGLIB_DUMMY + int motif=0, win32=0, gtk=0; + char* driver; + + if (IupGetGlobal("_IUP_IMAGELIB_OPEN")) + return; + + driver = IupGetGlobal("DRIVER"); + if (iupStrEqualNoCase(driver, "GTK")) + gtk = 1; + else if (iupStrEqualNoCase(driver, "Motif")) + motif = 1; + else if (iupStrEqualNoCase(driver, "Win32")) + win32 = 1; + + IupSetGlobal("_IUP_IMAGELIB_OPEN", "1"); + + /**************** Bitmaps *****************/ + +#ifndef WIN32 + if (motif) + { + iupImageStockSet("IUP_ActionCancel", load_image_ActionCancel8, 0); + iupImageStockSet("IUP_ActionOk", load_image_ActionOk8, 0); + iupImageStockSet("IUP_ArrowDown", load_image_ArrowDown8, 0); + iupImageStockSet("IUP_ArrowLeft", load_image_ArrowLeft8, 0); + iupImageStockSet("IUP_ArrowRight", load_image_ArrowRight8, 0); + iupImageStockSet("IUP_ArrowUp", load_image_ArrowUp8, 0); + iupImageStockSet("IUP_EditCopy", load_image_EditCopy8, 0); + iupImageStockSet("IUP_EditCut", load_image_EditCut8, 0); + iupImageStockSet("IUP_EditErase", load_image_EditErase8, 0); + iupImageStockSet("IUP_EditFind", load_image_EditFind8, 0); + iupImageStockSet("IUP_EditPaste", load_image_EditPaste8, 0); + iupImageStockSet("IUP_EditRedo", load_image_EditRedo8, 0); + iupImageStockSet("IUP_EditUndo", load_image_EditUndo8, 0); + iupImageStockSet("IUP_FileClose", load_image_FileClose8, 0); + iupImageStockSet("IUP_FileCloseAll", load_image_FileCloseAll8, 0); + iupImageStockSet("IUP_FileNew", load_image_FileNew8, 0); + iupImageStockSet("IUP_FileOpen", load_image_FileOpen8, 0); + iupImageStockSet("IUP_FileProperties", load_image_FileProperties8, 0); + iupImageStockSet("IUP_FileSave", load_image_FileSave8, 0); + iupImageStockSet("IUP_FileSaveAll", load_image_FileSaveAll8, 0); + iupImageStockSet("IUP_FileText", load_image_FileText8, 0); + iupImageStockSet("IUP_FontBold", load_image_FontBold8, 0); + iupImageStockSet("IUP_FontDialog", load_image_FontDialog8, 0); + iupImageStockSet("IUP_FontItalic", load_image_FontItalic8, 0); + iupImageStockSet("IUP_MediaForward", load_image_MediaForward8, 0); + iupImageStockSet("IUP_MediaGotoBegin", load_image_MediaGoToBegin8, 0); + iupImageStockSet("IUP_MediaGoToEnd", load_image_MediaGoToEnd8, 0); + iupImageStockSet("IUP_MediaPause", load_image_MediaPause8, 0); + iupImageStockSet("IUP_MediaPlay", load_image_MediaPlay8, 0); + iupImageStockSet("IUP_MediaRecord", load_image_MediaRecord8, 0); + iupImageStockSet("IUP_MediaReverse", load_image_MediaReverse8, 0); + iupImageStockSet("IUP_MediaRewind", load_image_MediaRewind8, 0); + iupImageStockSet("IUP_MediaStop", load_image_MediaStop8, 0); + iupImageStockSet("IUP_MessageError", load_image_MessageError8, 0); + iupImageStockSet("IUP_MessageHelp", load_image_MessageHelp8, 0); + iupImageStockSet("IUP_MessageInfo", load_image_MessageInfo8, 0); + iupImageStockSet("IUP_NavigateHome", load_image_NavigateHome8, 0); + iupImageStockSet("IUP_NavigateRefresh", load_image_NavigateRefresh8, 0); + iupImageStockSet("IUP_Print", load_image_Print8, 0); + iupImageStockSet("IUP_PrintPreview", load_image_PrintPreview8, 0); + iupImageStockSet("IUP_ToolsColor", load_image_ToolsColor8, 0); + iupImageStockSet("IUP_ToolsSettings", load_image_ToolsSettings8, 0); + iupImageStockSet("IUP_ToolsSortAscend", load_image_ToolsSortAscend8, 0); + iupImageStockSet("IUP_ToolsSortDescend", load_image_ToolsSortDescend8, 0); + iupImageStockSet("IUP_ViewFullScreen", load_image_ViewFullScreen8, 0); + iupImageStockSet("IUP_WindowsCascade", load_image_WindowsCascade8, 0); + iupImageStockSet("IUP_WindowsTile", load_image_WindowsTile8, 0); + iupImageStockSet("IUP_Zoom", load_image_Zoom8, 0); + iupImageStockSet("IUP_ZoomActualSize", load_image_ZoomActualSize8, 0); + iupImageStockSet("IUP_ZoomIn", load_image_ZoomIn8, 0); + iupImageStockSet("IUP_ZoomOut", load_image_ZoomOut8, 0); + iupImageStockSet("IUP_ZoomSelection", load_image_ZoomSelection8, 0); + } +#endif + +#ifdef WIN32 + if (win32) + { + iupImageStockSet("IUP_ActionCancel", load_image_ActionCancel, 0); + iupImageStockSet("IUP_ActionOk", load_image_ActionOk, 0); + iupImageStockSet("IUP_ArrowDown", load_image_ArrowDown, 0); + iupImageStockSet("IUP_ArrowLeft", load_image_ArrowLeft, 0); + iupImageStockSet("IUP_ArrowRight", load_image_ArrowRight, 0); + iupImageStockSet("IUP_ArrowUp", load_image_ArrowUp, 0); + iupImageStockSet("IUP_EditCopy", load_image_EditCopy, 0); + iupImageStockSet("IUP_EditCut", load_image_EditCut, 0); + iupImageStockSet("IUP_EditErase", load_image_EditErase, 0); + iupImageStockSet("IUP_EditFind", load_image_EditFind, 0); + iupImageStockSet("IUP_EditPaste", load_image_EditPaste, 0); + iupImageStockSet("IUP_EditRedo", load_image_EditRedo, 0); + iupImageStockSet("IUP_EditUndo", load_image_EditUndo, 0); + iupImageStockSet("IUP_FileClose", load_image_FileClose, 0); + iupImageStockSet("IUP_FileCloseAll", load_image_FileCloseAll, 0); + iupImageStockSet("IUP_FileNew", load_image_FileNew, 0); + iupImageStockSet("IUP_FileOpen", load_image_FileOpen, 0); + iupImageStockSet("IUP_FileProperties", load_image_FileProperties, 0); + iupImageStockSet("IUP_FileSave", load_image_FileSave, 0); + iupImageStockSet("IUP_FileSaveAll", load_image_FileSaveAll, 0); + iupImageStockSet("IUP_FileText", load_image_FileText, 0); + iupImageStockSet("IUP_FontBold", load_image_FontBold, 0); + iupImageStockSet("IUP_FontDialog", load_image_FontDialog, 0); + iupImageStockSet("IUP_FontItalic", load_image_FontItalic, 0); + iupImageStockSet("IUP_MediaForward", load_image_MediaForward, 0); + iupImageStockSet("IUP_MediaGotoBegin", load_image_MediaGoToBegin, 0); + iupImageStockSet("IUP_MediaGoToEnd", load_image_MediaGoToEnd, 0); + iupImageStockSet("IUP_MediaPause", load_image_MediaPause, 0); + iupImageStockSet("IUP_MediaPlay", load_image_MediaPlay, 0); + iupImageStockSet("IUP_MediaRecord", load_image_MediaRecord, 0); + iupImageStockSet("IUP_MediaReverse", load_image_MediaReverse, 0); + iupImageStockSet("IUP_MediaRewind", load_image_MediaRewind, 0); + iupImageStockSet("IUP_MediaStop", load_image_MediaStop, 0); + iupImageStockSet("IUP_MessageError", load_image_MessageError, 0); + iupImageStockSet("IUP_MessageHelp", load_image_MessageHelp, 0); + iupImageStockSet("IUP_MessageInfo", load_image_MessageInfo, 0); + iupImageStockSet("IUP_NavigateHome", load_image_NavigateHome, 0); + iupImageStockSet("IUP_NavigateRefresh", load_image_NavigateRefresh, 0); + iupImageStockSet("IUP_Print", load_image_Print, 0); + iupImageStockSet("IUP_PrintPreview", load_image_PrintPreview, 0); + iupImageStockSet("IUP_ToolsColor", load_image_ToolsColor, 0); + iupImageStockSet("IUP_ToolsSettings", load_image_ToolsSettings, 0); + iupImageStockSet("IUP_ToolsSortAscend", load_image_ToolsSortAscend, 0); + iupImageStockSet("IUP_ToolsSortDescend", load_image_ToolsSortDescend, 0); + iupImageStockSet("IUP_ViewFullScreen", load_image_ViewFullScreen, 0); + iupImageStockSet("IUP_WindowsCascade", load_image_WindowsCascade, 0); + iupImageStockSet("IUP_WindowsTile", load_image_WindowsTile, 0); + iupImageStockSet("IUP_Zoom", load_image_Zoom, 0); + iupImageStockSet("IUP_ZoomActualSize", load_image_ZoomActualSize, 0); + iupImageStockSet("IUP_ZoomIn", load_image_ZoomIn, 0); + iupImageStockSet("IUP_ZoomOut", load_image_ZoomOut, 0); + iupImageStockSet("IUP_ZoomSelection", load_image_ZoomSelection, 0); + } +#endif + + if (gtk) + { + iupImageStockSet("IUP_ActionCancel", 0, "gtk-cancel"); + iupImageStockSet("IUP_ActionOk", 0, "gtk-apply"); + iupImageStockSet("IUP_ArrowDown", 0, "gtk-go-down"); + iupImageStockSet("IUP_ArrowLeft", 0, "gtk-go-back-ltr"); + iupImageStockSet("IUP_ArrowRight", 0, "gtk-go-forward-ltr"); + iupImageStockSet("IUP_ArrowUp", 0, "gtk-go-up"); + iupImageStockSet("IUP_EditCopy", 0, "gtk-copy"); + iupImageStockSet("IUP_EditCut", 0, "gtk-cut"); + iupImageStockSet("IUP_EditErase", 0, "gtk-close"); + iupImageStockSet("IUP_EditFind", 0, "gtk-find"); + iupImageStockSet("IUP_EditPaste", 0, "gtk-paste"); + iupImageStockSet("IUP_EditRedo", 0, "gtk-redo-ltr"); + iupImageStockSet("IUP_EditUndo", 0, "gtk-undo-ltr"); + iupImageStockSet("IUP_FileClose", load_image_iupgtk_close, 0); + iupImageStockSet("IUP_FileCloseAll", load_image_iupgtk_close_all, 0); + iupImageStockSet("IUP_FileNew", 0, "gtk-new"); + iupImageStockSet("IUP_FileOpen", 0, "gtk-open"); + iupImageStockSet("IUP_FileProperties", 0, "gtk-properties"); + iupImageStockSet("IUP_FileSave", 0, "gtk-save"); + iupImageStockSet("IUP_FileSaveAll", load_image_iupgtk_save_all, 0); + iupImageStockSet("IUP_FileText", load_image_iupgtk_text, 0); + iupImageStockSet("IUP_FontBold", 0, "gtk-bold"); + iupImageStockSet("IUP_FontDialog", 0, "gtk-font"); + iupImageStockSet("IUP_FontItalic", 0, "gtk-italic"); + iupImageStockSet("IUP_MediaForward", 0, "gtk-media-forward-ltr"); + iupImageStockSet("IUP_MediaGotoBegin", 0, "gtk-media-previous-ltr"); + iupImageStockSet("IUP_MediaGoToEnd", 0, "gtk-media-next-ltr"); + iupImageStockSet("IUP_MediaPause", 0, "gtk-media-pause"); + iupImageStockSet("IUP_MediaPlay", 0, "gtk-media-play-ltr"); + iupImageStockSet("IUP_MediaRecord", 0, "gtk-media-record"); + iupImageStockSet("IUP_MediaReverse", 0, "gtk-media-play-rtl"); + iupImageStockSet("IUP_MediaRewind", 0, "gtk-media-rewind-ltr"); + iupImageStockSet("IUP_MediaStop", 0, "gtk-media-stop"); + iupImageStockSet("IUP_MessageError", 0, "gtk-stop"); + iupImageStockSet("IUP_MessageHelp", 0, "gtk-help"); + iupImageStockSet("IUP_MessageInfo", 0, "gtk-info"); + iupImageStockSet("IUP_NavigateHome", 0, "gtk-home"); + iupImageStockSet("IUP_NavigateRefresh", 0, "gtk-refresh"); + iupImageStockSet("IUP_Print", 0, "gtk-print"); + iupImageStockSet("IUP_PrintPreview", 0, "gtk-print-preview"); + iupImageStockSet("IUP_ToolsColor", 0, "gtk-select-color"); + iupImageStockSet("IUP_ToolsSettings", 0, "gtk-preferences"); + iupImageStockSet("IUP_ToolsSortAscend", 0, "gtk-sort-ascending"); + iupImageStockSet("IUP_ToolsSortDescend", 0, "gtk-sort-descending"); + iupImageStockSet("IUP_ViewFullScreen", 0, "gtk-fullscreen"); + iupImageStockSet("IUP_WindowsCascade", load_image_iupgtk_cascade, 0); + iupImageStockSet("IUP_WindowsTile", load_image_iupgtk_tile, 0); + iupImageStockSet("IUP_Zoom", load_image_iupgtk_zoom, 0); + iupImageStockSet("IUP_ZoomActualSize", 0, "gtk-zoom-100"); + iupImageStockSet("IUP_ZoomIn", 0, "gtk-zoom-in"); + iupImageStockSet("IUP_ZoomOut", 0, "gtk-zoom-out"); + iupImageStockSet("IUP_ZoomSelection", 0, "gtk-zoom-fit"); + } + + /***************** Icons *****************/ + +#ifndef WIN32 + if (motif) + { + iupImageStockSet("IUP_Tecgraf", load_image_Tecgraf8, 0); + iupImageStockSet("IUP_PUC-Rio", load_image_PUC_Rio8, 0); + iupImageStockSet("IUP_BR", load_image_BR8, 0); + iupImageStockSet("IUP_Lua", load_image_Lua8, 0); + iupImageStockSet("IUP_TecgrafPUC-Rio", load_image_TecgrafPUC_Rio8, 0); + iupImageStockSet("IUP_Petrobras", load_image_Petrobras8, 0); + } + else +#endif + { + iupImageStockSet("IUP_Tecgraf", load_image_Tecgraf, 0); + iupImageStockSet("IUP_PUC-Rio", load_image_PUC_Rio, 0); + iupImageStockSet("IUP_BR", load_image_BR, 0); + iupImageStockSet("IUP_Lua", load_image_Lua, 0); + iupImageStockSet("IUP_TecgrafPUC-Rio", load_image_TecgrafPUC_Rio, 0); + iupImageStockSet("IUP_Petrobras", load_image_Petrobras, 0); + } + + /***************** Logos *****************/ + +#ifndef WIN32 + if (motif) + { + iupImageStockSet("IUP_LogoTecgraf", load_image_LogoTecgraf8, 0); + iupImageStockSet("IUP_LogoPUC-Rio", load_image_LogoPUC_Rio8, 0); + iupImageStockSet("IUP_LogoBR", load_image_LogoBR8, 0); + iupImageStockSet("IUP_LogoLua", load_image_LogoLua8, 0); + iupImageStockSet("IUP_LogoTecgrafPUC-Rio", load_image_LogoTecgrafPUC_Rio8, 0); + iupImageStockSet("IUP_LogoPetrobras", load_image_LogoPetrobras8, 0); + } + else +#endif + { + iupImageStockSet("IUP_LogoTecgraf", load_image_LogoTecgraf, 0); + iupImageStockSet("IUP_LogoPUC-Rio", load_image_LogoPUC_Rio, 0); + iupImageStockSet("IUP_LogoBR", load_image_LogoBR, 0); + iupImageStockSet("IUP_LogoLua", load_image_LogoLua, 0); + iupImageStockSet("IUP_LogoTecgrafPUC-Rio", load_image_LogoTecgrafPUC_Rio, 0); + iupImageStockSet("IUP_LogoPetrobras", load_image_LogoPetrobras, 0); + } + +#ifdef WIN32 + if (win32) + { + iupImageStockSet("IUP_DeviceCamera", load_image_DeviceCamera, 0); + iupImageStockSet("IUP_DeviceCD", load_image_DeviceCD, 0); + iupImageStockSet("IUP_DeviceCellPhone", load_image_DeviceCellPhone, 0); + iupImageStockSet("IUP_DeviceComputer", load_image_DeviceComputer, 0); + iupImageStockSet("IUP_DeviceFax", load_image_DeviceFax, 0); + iupImageStockSet("IUP_DeviceMP3", load_image_DeviceMP3, 0); + iupImageStockSet("IUP_DeviceNetwork", load_image_DeviceNetwork, 0); + iupImageStockSet("IUP_DevicePDA", load_image_DevicePDA, 0); + iupImageStockSet("IUP_DevicePrinter", load_image_DevicePrinter, 0); + iupImageStockSet("IUP_DeviceScanner", load_image_DeviceScanner, 0); + iupImageStockSet("IUP_DeviceSound", load_image_DeviceSound, 0); + iupImageStockSet("IUP_DeviceVideo", load_image_DeviceVideo, 0); + + iupImageStockSet("IUP_LogoMessageError", load_image_LogoMessageError, 0); + iupImageStockSet("IUP_LogoMessageHelp", load_image_LogoMessageHelp, 0); + iupImageStockSet("IUP_LogoMessageInfo", load_image_LogoMessageInfo, 0); + iupImageStockSet("IUP_LogoMessageSecurity", load_image_LogoMessageSecurity, 0); + iupImageStockSet("IUP_LogoMessageWarning", load_image_LogoMessageWarning, 0); + } +#endif + + if (gtk) + { + iupImageStockSet("IUP_LogoMessageError", 0, "gtk-dialog-error"); + iupImageStockSet("IUP_LogoMessageHelp", 0, "gtk-dialog-question"); + iupImageStockSet("IUP_LogoMessageInfo", 0, "gtk-dialog-info"); + iupImageStockSet("IUP_LogoMessageSecurity", 0, "gtk-dialog-authentication"); + iupImageStockSet("IUP_LogoMessageWarning", 0, "gtk-dialog-warning"); + } +#endif +} + +void iupImageLibLoadAll(void) +{ +#ifndef IUP_IMGLIB_DUMMY + /* Bitmaps */ + iupImageStockLoad("IUP_ActionCancel"); + iupImageStockLoad("IUP_ActionOk"); + iupImageStockLoad("IUP_ArrowDown"); + iupImageStockLoad("IUP_ArrowLeft"); + iupImageStockLoad("IUP_ArrowRight"); + iupImageStockLoad("IUP_ArrowUp"); + iupImageStockLoad("IUP_EditCopy"); + iupImageStockLoad("IUP_EditCut"); + iupImageStockLoad("IUP_EditErase"); + iupImageStockLoad("IUP_EditFind"); + iupImageStockLoad("IUP_EditPaste"); + iupImageStockLoad("IUP_EditRedo"); + iupImageStockLoad("IUP_EditUndo"); + iupImageStockLoad("IUP_FileClose"); + iupImageStockLoad("IUP_FileCloseAll"); + iupImageStockLoad("IUP_FileNew"); + iupImageStockLoad("IUP_FileOpen"); + iupImageStockLoad("IUP_FileProperties"); + iupImageStockLoad("IUP_FileSave"); + iupImageStockLoad("IUP_FileSaveAll"); + iupImageStockLoad("IUP_FileText"); + iupImageStockLoad("IUP_FontBold"); + iupImageStockLoad("IUP_FontDialog"); + iupImageStockLoad("IUP_FontItalic"); + iupImageStockLoad("IUP_MediaForward"); + iupImageStockLoad("IUP_MediaGotoBegin"); + iupImageStockLoad("IUP_MediaGoToEnd"); + iupImageStockLoad("IUP_MediaPause"); + iupImageStockLoad("IUP_MediaPlay"); + iupImageStockLoad("IUP_MediaRecord"); + iupImageStockLoad("IUP_MediaReverse"); + iupImageStockLoad("IUP_MediaRewind"); + iupImageStockLoad("IUP_MediaStop"); + iupImageStockLoad("IUP_MessageError"); + iupImageStockLoad("IUP_MessageHelp"); + iupImageStockLoad("IUP_MessageInfo"); + iupImageStockLoad("IUP_NavigateHome"); + iupImageStockLoad("IUP_NavigateRefresh"); + iupImageStockLoad("IUP_Print"); + iupImageStockLoad("IUP_PrintPreview"); + iupImageStockLoad("IUP_ToolsColor"); + iupImageStockLoad("IUP_ToolsSettings"); + iupImageStockLoad("IUP_ToolsSortAscend"); + iupImageStockLoad("IUP_ToolsSortDescend"); + iupImageStockLoad("IUP_ViewFullScreen"); + iupImageStockLoad("IUP_WindowsCascade"); + iupImageStockLoad("IUP_WindowsTile"); + iupImageStockLoad("IUP_Zoom"); + iupImageStockLoad("IUP_ZoomActualSize"); + iupImageStockLoad("IUP_ZoomIn"); + iupImageStockLoad("IUP_ZoomOut"); + iupImageStockLoad("IUP_ZoomSelection"); + + /* Icons */ + iupImageStockLoad("IUP_Tecgraf"); + iupImageStockLoad("IUP_PUC-Rio"); + iupImageStockLoad("IUP_BR"); + iupImageStockLoad("IUP_Lua"); + iupImageStockLoad("IUP_TecgrafPUC-Rio"); + iupImageStockLoad("IUP_Petrobras"); + + /* Logos */ + iupImageStockLoad("IUP_LogoTecgraf"); + iupImageStockLoad("IUP_LogoPUC-Rio"); + iupImageStockLoad("IUP_LogoBR"); + iupImageStockLoad("IUP_LogoLua"); + iupImageStockLoad("IUP_LogoTecgrafPUC-Rio"); + iupImageStockLoad("IUP_LogoPetrobras"); + +#ifdef WIN32 + /* Logos - Win32 Only */ + iupImageStockLoad("IUP_DeviceCamera"); + iupImageStockLoad("IUP_DeviceCD"); + iupImageStockLoad("IUP_DeviceCellPhone"); + iupImageStockLoad("IUP_DeviceComputer"); + iupImageStockLoad("IUP_DeviceFax"); + iupImageStockLoad("IUP_DeviceMP3"); + iupImageStockLoad("IUP_DeviceNetwork"); + iupImageStockLoad("IUP_DevicePDA"); + iupImageStockLoad("IUP_DevicePrinter"); + iupImageStockLoad("IUP_DeviceScanner"); + iupImageStockLoad("IUP_DeviceSound"); + iupImageStockLoad("IUP_DeviceVideo"); +#endif + + /* Logos - GTK and Win32 Only */ + iupImageStockLoad("IUP_LogoMessageError"); + iupImageStockLoad("IUP_LogoMessageHelp"); + iupImageStockLoad("IUP_LogoMessageInfo"); + iupImageStockLoad("IUP_LogoMessageSecurity"); + iupImageStockLoad("IUP_LogoMessageWarning"); +#endif +} diff --git a/iup/srcimglib/iup_imglib_bitmaps.h b/iup/srcimglib/iup_imglib_bitmaps.h new file mode 100755 index 0000000..41577d6 --- /dev/null +++ b/iup/srcimglib/iup_imglib_bitmaps.h @@ -0,0 +1,1248 @@ +static Ihandle* load_image_FileSave(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 183, 182, 245, 255, 183, 182, 245, 255, 179, 178, 243, 255, 174, 173, 241, 255, 168, 167, 238, 255, 162, 161, 234, 255, 155, 154, 231, 255, 148, 147, 228, 255, 143, 142, 224, 255, 136, 135, 221, 255, 129, 128, 218, 255, 123, 122, 214, 255, 117, 116, 211, 255, 112, 111, 209, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 179, 178, 243, 255, 190, 189, 255, 255, 147, 146, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 75, 88, 190, 255, 89, 88, 176, 255, 89, 88, 176, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 173, 172, 240, 255, 190, 189, 255, 255, 138, 137, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 63, 82, 184, 255, 51, 51, 103, 255, 86, 85, 170, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 167, 166, 237, 255, 190, 189, 255, 255, 129, 128, 230, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 52, 77, 179, 255, 122, 121, 223, 255, 83, 82, 164, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 159, 158, 233, 255, 190, 189, 255, 255, 119, 118, 220, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 210, 219, 234, 255, 40, 71, 173, 255, 114, 113, 215, 255, 80, 79, 159, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 152, 151, 229, 255, 190, 189, 255, 255, 110, 109, 211, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 210, 219, 234, 255, 198, 209, 229, 255, 28, 65, 167, 255, 103, 103, 204, 255, 77, 77, 154, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 146, 145, 226, 255, 190, 189, 255, 255, 103, 102, 204, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 210, 219, 234, 255, 198, 209, 229, 255, 189, 202, 225, 255, 17, 59, 161, 255, 92, 93, 194, 255, 74, 74, 148, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 139, 138, 223, 255, 188, 187, 255, 255, 183, 182, 255, 255, 96, 99, 201, 255, 86, 94, 196, 255, 75, 88, 190, 255, 63, 82, 184, 255, 52, 77, 179, 255, 40, 71, 173, 255, 28, 65, 167, 255, 17, 59, 161, 255, 92, 93, 193, 255, 84, 86, 186, 255, 71, 71, 143, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 132, 131, 219, 255, 180, 179, 255, 255, 174, 173, 255, 255, 164, 163, 252, 255, 143, 142, 244, 255, 135, 134, 236, 255, 129, 128, 230, 255, 122, 121, 223, 255, 114, 113, 215, 255, 108, 107, 209, 255, 92, 93, 193, 255, 84, 86, 186, 255, 76, 80, 178, 255, 68, 68, 137, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 124, 123, 215, 255, 170, 169, 255, 255, 160, 159, 251, 255, 148, 147, 245, 255, 75, 91, 113, 255, 75, 91, 113, 255, 75, 91, 113, 255, 75, 91, 113, 255, 82, 98, 118, 255, 91, 106, 125, 255, 84, 86, 186, 255, 76, 79, 178, 255, 68, 73, 170, 255, 65, 65, 131, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 118, 117, 212, 255, 160, 159, 255, 255, 145, 144, 245, 255, 135, 134, 236, 255, 75, 91, 113, 255, 0, 0, 0, 255, 52, 60, 71, 255, 206, 217, 233, 255, 212, 221, 236, 255, 103, 116, 133, 255, 67, 75, 174, 255, 68, 73, 170, 255, 60, 66, 163, 255, 62, 62, 125, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 112, 111, 209, 255, 154, 153, 255, 255, 135, 134, 236, 255, 129, 128, 230, 255, 75, 91, 113, 255, 52, 60, 71, 255, 104, 120, 141, 255, 216, 224, 237, 255, 224, 231, 241, 255, 115, 127, 143, 255, 53, 65, 163, 255, 60, 66, 162, 255, 53, 61, 156, 255, 60, 59, 120, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 108, 107, 207, 255, 143, 142, 243, 255, 129, 128, 230, 255, 36, 68, 170, 255, 33, 50, 71, 255, 171, 180, 195, 255, 179, 187, 198, 255, 188, 193, 202, 255, 196, 200, 206, 255, 72, 77, 86, 255, 51, 62, 158, 255, 54, 61, 156, 255, 49, 57, 152, 255, 57, 57, 114, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 108, 107, 207, 84, 101, 100, 195, 255, 86, 85, 170, 255, 83, 82, 164, 255, 80, 79, 159, 255, 77, 77, 154, 255, 74, 74, 148, 255, 71, 71, 143, 255, 68, 68, 137, 255, 65, 65, 131, 255, 60, 59, 120, 255, 60, 59, 120, 255, 57, 57, 114, 255, 55, 54, 110, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_NavigateHome(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 100, 95, 83, 57, 100, 95, 83, 255, 84, 77, 68, 255, 84, 77, 68, 95, 255, 255, 255, 0, 121, 55, 44, 255, 121, 55, 44, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 100, 95, 83, 57, 100, 95, 83, 255, 223, 175, 44, 255, 218, 167, 33, 255, 84, 77, 68, 255, 84, 77, 68, 57, 121, 55, 44, 255, 89, 40, 32, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 100, 95, 83, 57, 100, 95, 83, 255, 239, 179, 18, 255, 111, 94, 78, 255, 107, 91, 75, 255, 224, 167, 20, 255, 84, 77, 68, 255, 108, 49, 39, 255, 74, 33, 26, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 100, 95, 83, 57, 100, 95, 83, 255, 239, 179, 18, 255, 111, 94, 78, 255, 184, 185, 188, 255, 167, 171, 178, 255, 96, 81, 68, 255, 217, 157, 10, 255, 84, 77, 68, 255, 59, 26, 20, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 100, 95, 83, 57, 100, 95, 83, 255, 239, 179, 18, 255, 111, 94, 78, 255, 189, 189, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 185, 187, 192, 255, 83, 70, 58, 255, 208, 148, 7, 255, 84, 77, 68, 255, 84, 77, 68, 60, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 100, 95, 83, 57, 100, 95, 83, 255, 239, 179, 18, 255, 111, 94, 78, 255, 189, 189, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 184, 186, 192, 255, 72, 60, 51, 255, 204, 144, 5, 255, 84, 77, 68, 255, 84, 77, 68, 60, 255, 255, 255, 0, + 255, 255, 255, 0, 100, 95, 83, 255, 239, 179, 18, 255, 111, 94, 78, 255, 189, 189, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 253, 255, 241, 244, 250, 255, 181, 184, 192, 255, 68, 57, 48, 255, 205, 143, 0, 255, 84, 77, 68, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 100, 95, 83, 63, 64, 55, 45, 255, 192, 192, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 253, 255, 241, 244, 250, 255, 231, 236, 246, 255, 220, 228, 242, 255, 162, 166, 175, 255, 39, 33, 28, 255, 84, 77, 68, 96, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 82, 93, 108, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 172, 164, 143, 255, 168, 159, 138, 255, 163, 153, 130, 255, 157, 145, 122, 255, 220, 228, 242, 255, 209, 219, 238, 255, 173, 183, 199, 255, 31, 42, 57, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 77, 87, 101, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 168, 159, 138, 255, 240, 179, 14, 255, 236, 175, 12, 255, 111, 94, 78, 255, 209, 219, 238, 255, 198, 209, 233, 255, 166, 178, 198, 255, 31, 42, 57, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 73, 84, 98, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 253, 255, 163, 153, 130, 255, 234, 172, 11, 255, 227, 166, 9, 255, 100, 84, 70, 255, 198, 209, 233, 255, 187, 201, 229, 255, 160, 174, 198, 255, 31, 42, 57, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 71, 81, 95, 255, 255, 255, 255, 255, 249, 250, 253, 255, 241, 244, 250, 255, 157, 145, 122, 255, 224, 163, 8, 255, 138, 120, 85, 255, 81, 68, 56, 255, 187, 201, 229, 255, 177, 193, 225, 255, 154, 170, 197, 255, 31, 42, 57, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 68, 78, 93, 255, 249, 250, 253, 255, 191, 195, 202, 255, 186, 191, 201, 255, 151, 137, 113, 255, 214, 153, 4, 255, 209, 147, 2, 255, 67, 57, 46, 255, 158, 173, 198, 255, 153, 170, 197, 255, 150, 167, 196, 255, 31, 42, 57, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 67, 77, 91, 255, 31, 42, 57, 255, 31, 42, 57, 255, 31, 42, 57, 255, 31, 42, 57, 255, 31, 42, 57, 255, 31, 42, 57, 255, 31, 42, 57, 255, 31, 42, 57, 255, 31, 42, 57, 255, 31, 42, 57, 255, 31, 42, 57, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MessageHelp(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 207, 218, 240, 182, 209, 220, 241, 255, 208, 219, 239, 255, 209, 219, 239, 255, 209, 220, 239, 255, 208, 219, 241, 255, 194, 205, 226, 158, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 208, 219, 241, 92, 211, 220, 241, 255, 228, 232, 245, 255, 253, 252, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 251, 252, 255, 224, 230, 243, 255, 210, 221, 241, 255, 110, 117, 129, 67, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 204, 218, 240, 93, 214, 223, 240, 255, 255, 255, 255, 255, 251, 255, 255, 255, 198, 243, 255, 255, 168, 221, 254, 255, 152, 207, 252, 255, 145, 201, 255, 255, 169, 212, 255, 255, 248, 254, 255, 255, 255, 255, 252, 255, 212, 223, 241, 255, 69, 73, 82, 79, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 0, 212, 222, 241, 255, 255, 255, 255, 255, 206, 233, 255, 255, 112, 178, 255, 255, 135, 175, 236, 255, 223, 226, 236, 255, 244, 240, 235, 255, 224, 228, 241, 255, 120, 164, 246, 255, 77, 140, 254, 255, 202, 222, 255, 255, 255, 255, 253, 255, 210, 221, 240, 255, 0, 0, 0, 54, 0, 0, 0, 2, + 207, 218, 240, 193, 239, 241, 246, 255, 219, 234, 255, 255, 73, 138, 255, 255, 92, 135, 222, 255, 255, 255, 238, 255, 253, 252, 254, 255, 161, 185, 231, 255, 255, 255, 250, 255, 254, 249, 243, 255, 60, 114, 224, 255, 53, 112, 230, 255, 238, 243, 255, 255, 224, 231, 244, 255, 110, 117, 129, 182, 0, 0, 0, 31, + 212, 222, 241, 255, 255, 255, 255, 255, 106, 152, 245, 255, 42, 102, 226, 255, 109, 139, 200, 255, 227, 234, 240, 255, 81, 126, 215, 255, 0, 48, 189, 255, 126, 156, 215, 255, 255, 255, 255, 255, 101, 140, 218, 255, 20, 83, 209, 255, 118, 154, 226, 255, 254, 253, 254, 255, 188, 198, 217, 241, 0, 0, 0, 84, + 215, 224, 241, 255, 230, 237, 251, 255, 50, 106, 219, 255, 51, 104, 211, 255, 40, 94, 202, 255, 33, 88, 201, 255, 25, 84, 201, 255, 16, 75, 193, 255, 198, 208, 226, 255, 255, 255, 255, 255, 63, 112, 208, 255, 32, 90, 205, 255, 56, 106, 206, 255, 251, 251, 252, 255, 211, 222, 239, 254, 0, 0, 0, 105, + 217, 225, 242, 255, 202, 216, 243, 255, 34, 91, 205, 255, 50, 102, 207, 255, 47, 100, 204, 255, 43, 96, 204, 255, 31, 85, 196, 255, 168, 181, 207, 255, 255, 255, 255, 255, 122, 156, 224, 255, 26, 83, 199, 255, 43, 96, 205, 255, 41, 94, 198, 255, 237, 241, 245, 255, 213, 223, 240, 254, 0, 0, 0, 173, + 216, 225, 243, 255, 214, 222, 242, 255, 30, 86, 197, 255, 50, 102, 206, 255, 49, 101, 204, 255, 33, 90, 204, 255, 105, 134, 194, 255, 255, 255, 255, 255, 145, 173, 232, 255, 15, 74, 196, 255, 45, 98, 204, 255, 40, 95, 203, 255, 43, 94, 195, 255, 241, 242, 243, 255, 214, 224, 242, 254, 0, 0, 0, 177, + 215, 224, 243, 255, 251, 250, 248, 255, 50, 98, 197, 255, 38, 92, 202, 255, 51, 103, 206, 255, 35, 91, 203, 255, 105, 137, 202, 255, 223, 231, 247, 255, 56, 107, 208, 255, 35, 90, 202, 255, 49, 101, 205, 255, 27, 83, 195, 255, 80, 120, 199, 255, 253, 252, 248, 255, 196, 205, 224, 248, 0, 0, 0, 175, + 207, 217, 238, 225, 249, 250, 250, 255, 144, 168, 216, 255, 13, 72, 189, 255, 46, 98, 205, 255, 41, 96, 205, 255, 58, 107, 203, 255, 104, 142, 216, 255, 41, 94, 202, 255, 45, 98, 204, 255, 41, 93, 201, 255, 16, 71, 185, 255, 189, 201, 224, 255, 232, 237, 246, 255, 128, 135, 149, 218, 0, 0, 0, 157, + 134, 143, 159, 50, 215, 225, 242, 255, 255, 255, 248, 255, 88, 125, 199, 255, 12, 69, 187, 255, 19, 78, 198, 255, 149, 164, 194, 255, 255, 255, 255, 255, 111, 146, 217, 255, 15, 74, 193, 255, 11, 69, 184, 255, 128, 154, 206, 255, 255, 255, 248, 255, 214, 224, 242, 255, 0, 0, 0, 168, 0, 0, 0, 102, + 0, 0, 0, 3, 179, 189, 208, 169, 226, 234, 245, 255, 255, 255, 244, 255, 128, 154, 207, 255, 21, 76, 183, 255, 60, 100, 185, 255, 154, 175, 217, 255, 35, 88, 192, 255, 36, 86, 185, 255, 159, 175, 213, 255, 255, 255, 247, 255, 217, 226, 244, 255, 70, 75, 83, 200, 0, 0, 0, 140, 0, 0, 0, 34, + 0, 0, 0, 0, 0, 0, 0, 15, 160, 169, 188, 186, 216, 227, 244, 255, 251, 250, 248, 255, 226, 226, 228, 255, 162, 177, 207, 255, 150, 171, 212, 255, 187, 198, 221, 255, 240, 241, 236, 255, 242, 243, 246, 255, 214, 225, 242, 255, 93, 98, 108, 206, 0, 0, 0, 148, 0, 0, 0, 69, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 78, 83, 92, 124, 196, 205, 225, 242, 215, 225, 243, 255, 217, 227, 244, 255, 218, 227, 244, 255, 216, 226, 243, 255, 215, 225, 243, 255, 171, 181, 198, 237, 16, 17, 19, 178, 0, 0, 0, 144, 0, 0, 0, 77, 0, 0, 0, 14, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 62, 0, 0, 0, 105, 0, 0, 0, 176, 0, 0, 0, 179, 0, 0, 0, 179, 0, 0, 0, 179, 0, 0, 0, 105, 0, 0, 0, 105, 0, 0, 0, 46, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MediaStop(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 141, 179, 253, 255, 138, 176, 250, 255, 134, 173, 246, 255, 129, 168, 243, 255, 125, 163, 239, 255, 120, 158, 234, 255, 116, 155, 231, 255, 112, 151, 227, 255, 110, 149, 226, 242, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 138, 176, 250, 255, 213, 225, 252, 255, 212, 226, 251, 255, 198, 216, 250, 255, 185, 205, 249, 255, 179, 202, 249, 255, 172, 198, 249, 255, 157, 187, 245, 255, 45, 85, 170, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 134, 173, 246, 255, 218, 229, 251, 255, 202, 218, 251, 255, 179, 202, 249, 255, 168, 194, 248, 255, 152, 182, 246, 255, 145, 179, 243, 255, 135, 163, 220, 255, 37, 78, 162, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 129, 168, 243, 255, 211, 225, 251, 255, 186, 206, 249, 255, 165, 191, 248, 255, 148, 179, 243, 255, 133, 168, 242, 255, 122, 159, 235, 255, 108, 141, 208, 255, 30, 70, 154, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 125, 163, 239, 255, 200, 215, 251, 255, 173, 199, 248, 255, 152, 183, 247, 255, 136, 171, 242, 255, 122, 159, 237, 255, 109, 148, 230, 255, 85, 119, 190, 255, 22, 62, 146, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 120, 158, 234, 255, 187, 208, 249, 255, 161, 189, 248, 255, 144, 176, 244, 255, 121, 159, 239, 255, 104, 146, 230, 255, 89, 132, 220, 255, 72, 107, 180, 255, 15, 54, 139, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 116, 155, 231, 255, 175, 201, 249, 255, 148, 181, 245, 255, 126, 163, 237, 255, 108, 149, 230, 255, 89, 133, 218, 255, 78, 121, 206, 255, 67, 101, 172, 255, 9, 48, 133, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 112, 151, 227, 255, 160, 188, 243, 255, 131, 161, 215, 255, 109, 141, 206, 255, 89, 124, 193, 255, 72, 107, 175, 255, 64, 98, 167, 255, 55, 88, 155, 255, 5, 44, 129, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 110, 149, 226, 242, 57, 98, 182, 255, 51, 92, 176, 255, 42, 83, 167, 255, 32, 72, 157, 255, 22, 62, 146, 255, 13, 52, 137, 255, 6, 45, 130, 255, 5, 44, 129, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_FontItalic(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 32, 0, 0, 0, 255, 0, 0, 0, 255, 5, 4, 5, 34, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 84, 0, 0, 0, 255, 5, 4, 5, 84, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 0, 0, 0, 255, 5, 4, 5, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 84, 0, 0, 0, 255, 5, 4, 5, 96, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 0, 0, 0, 255, 5, 4, 5, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 81, 0, 0, 0, 255, 5, 4, 5, 105, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 34, 0, 0, 0, 255, 0, 0, 0, 255, 5, 4, 5, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_FontDialog(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 85, 115, 179, 70, 80, 113, 178, 191, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 104, 133, 190, 255, 81, 113, 177, 255, 134, 161, 214, 84, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 78, 111, 175, 21, 77, 109, 172, 255, 77, 108, 174, 255, 61, 94, 157, 237, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 70, 104, 170, 155, 65, 99, 167, 155, 56, 92, 161, 255, 51, 80, 143, 255, 51, 80, 142, 79, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 65, 98, 166, 244, 58, 93, 161, 21, 54, 86, 150, 203, 50, 79, 142, 255, 48, 78, 139, 216, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 69, 102, 165, 97, 62, 93, 161, 200, 255, 255, 255, 0, 53, 87, 154, 70, 52, 85, 149, 255, 46, 76, 137, 254, 46, 76, 136, 68, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 65, 97, 161, 213, 57, 90, 155, 42, 255, 255, 255, 0, 255, 255, 255, 0, 51, 85, 147, 234, 46, 76, 137, 255, 45, 73, 133, 186, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 64, 94, 157, 35, 58, 91, 154, 255, 49, 80, 143, 208, 46, 75, 135, 213, 48, 79, 142, 213, 46, 78, 141, 244, 44, 73, 133, 255, 34, 59, 108, 253, 33, 58, 106, 36, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 61, 92, 155, 177, 54, 86, 150, 190, 39, 63, 114, 52, 36, 60, 109, 58, 41, 66, 120, 58, 41, 70, 129, 42, 41, 69, 128, 255, 36, 60, 112, 255, 34, 59, 108, 177, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 62, 92, 152, 11, 51, 84, 150, 244, 41, 67, 120, 21, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 39, 65, 120, 148, 33, 58, 106, 255, 32, 56, 104, 237, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 56, 87, 150, 26, 50, 82, 146, 183, 41, 69, 124, 245, 64, 84, 117, 233, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 35, 62, 116, 88, 31, 54, 98, 255, 35, 60, 112, 255, 36, 61, 112, 255, 33, 56, 103, 240, 32, 54, 102, 11, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 47, 78, 139, 21, 41, 69, 124, 42, 34, 58, 105, 42, 31, 52, 96, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 34, 60, 112, 21, 29, 52, 96, 42, 25, 43, 81, 42, 23, 41, 77, 42, 25, 44, 82, 42, 29, 51, 96, 11, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_FileText(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 174, 190, 212, 255, 169, 185, 207, 255, 164, 179, 201, 255, 164, 179, 201, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 178, 194, 216, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 156, 171, 192, 255, 53, 73, 99, 255, 122, 139, 162, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 175, 191, 213, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 255, 255, 251, 252, 254, 255, 149, 164, 185, 255, 186, 197, 212, 255, 53, 73, 99, 255, 122, 139, 162, 169, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 171, 187, 209, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 254, 255, 255, 251, 251, 254, 255, 248, 249, 253, 255, 147, 162, 183, 255, 54, 74, 100, 255, 54, 74, 100, 255, 54, 74, 100, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 167, 182, 204, 255, 255, 255, 255, 255, 50, 106, 216, 255, 48, 102, 208, 255, 45, 96, 196, 255, 42, 89, 183, 255, 40, 82, 168, 255, 243, 246, 252, 255, 239, 244, 251, 255, 147, 162, 183, 255, 147, 162, 183, 255, 54, 74, 100, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 163, 178, 200, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 255, 255, 249, 251, 253, 255, 246, 249, 253, 255, 242, 245, 252, 255, 238, 242, 251, 255, 234, 239, 251, 255, 230, 236, 249, 255, 147, 162, 183, 255, 53, 73, 99, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 158, 174, 195, 255, 254, 254, 254, 255, 50, 106, 216, 255, 48, 102, 208, 255, 46, 96, 196, 255, 43, 89, 183, 255, 39, 82, 167, 255, 37, 75, 153, 255, 34, 69, 142, 255, 223, 232, 248, 255, 147, 162, 183, 255, 53, 73, 99, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 169, 190, 255, 251, 252, 254, 255, 248, 249, 253, 255, 244, 247, 253, 255, 240, 244, 252, 255, 237, 241, 251, 255, 232, 238, 250, 255, 228, 234, 248, 255, 223, 231, 247, 255, 218, 226, 246, 255, 147, 162, 183, 255, 53, 73, 99, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 150, 165, 186, 255, 246, 249, 253, 255, 50, 106, 216, 255, 48, 102, 208, 255, 45, 96, 196, 255, 43, 89, 183, 255, 40, 82, 168, 255, 36, 75, 154, 255, 34, 69, 142, 255, 211, 223, 245, 255, 147, 162, 183, 255, 53, 73, 99, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 147, 162, 183, 255, 243, 246, 252, 255, 238, 242, 251, 255, 234, 239, 251, 255, 230, 235, 249, 255, 225, 232, 249, 255, 219, 229, 247, 255, 215, 225, 246, 255, 211, 222, 244, 255, 205, 218, 243, 255, 147, 162, 183, 255, 53, 73, 99, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 147, 162, 183, 255, 237, 242, 251, 255, 50, 106, 216, 255, 49, 101, 208, 255, 45, 96, 196, 255, 43, 89, 183, 255, 40, 81, 167, 255, 37, 75, 154, 255, 34, 69, 142, 255, 199, 213, 243, 255, 147, 162, 183, 255, 53, 73, 99, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 147, 162, 183, 255, 232, 238, 249, 255, 227, 234, 248, 255, 222, 230, 248, 255, 217, 227, 247, 255, 213, 223, 245, 255, 208, 219, 245, 255, 203, 216, 243, 255, 198, 213, 242, 255, 194, 209, 241, 255, 147, 162, 183, 255, 53, 73, 99, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 147, 162, 183, 255, 226, 233, 249, 255, 221, 230, 248, 255, 216, 226, 247, 255, 211, 222, 245, 255, 206, 219, 244, 255, 202, 215, 243, 255, 197, 212, 242, 255, 193, 208, 241, 255, 188, 205, 240, 255, 147, 162, 183, 255, 53, 73, 99, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 147, 162, 183, 255, 220, 229, 247, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 53, 73, 99, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 147, 162, 183, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_PrintPreview(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 174, 190, 212, 255, 169, 185, 207, 255, 164, 179, 201, 255, 164, 179, 201, 139, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 178, 194, 216, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 156, 171, 192, 255, 54, 74, 100, 255, 164, 179, 201, 139, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 175, 191, 213, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 149, 164, 185, 255, 186, 197, 212, 255, 54, 74, 100, 255, 164, 179, 201, 140, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 171, 187, 209, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 147, 162, 183, 255, 54, 74, 100, 255, 54, 74, 100, 255, 54, 74, 100, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 167, 182, 204, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 250, 246, 255, 193, 197, 193, 255, 151, 159, 161, 255, 132, 141, 145, 255, 136, 145, 149, 255, 60, 77, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 163, 178, 200, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 248, 246, 255, 178, 184, 184, 255, 188, 194, 196, 255, 231, 235, 236, 255, 226, 232, 235, 255, 164, 174, 178, 255, 99, 108, 117, 255, 93, 108, 122, 16, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 158, 174, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 191, 196, 195, 255, 185, 191, 194, 255, 255, 255, 255, 255, 251, 252, 255, 255, 243, 247, 253, 255, 230, 238, 252, 255, 147, 158, 170, 255, 89, 97, 103, 135, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 154, 169, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 150, 158, 161, 255, 229, 233, 235, 255, 251, 252, 255, 255, 243, 247, 253, 255, 232, 240, 251, 255, 217, 229, 250, 255, 179, 195, 216, 255, 88, 92, 92, 221, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 150, 165, 186, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 143, 151, 154, 255, 228, 233, 237, 255, 243, 247, 253, 255, 232, 239, 252, 255, 217, 229, 249, 255, 200, 217, 247, 255, 153, 173, 200, 255, 83, 86, 86, 221, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 174, 178, 179, 255, 178, 185, 191, 255, 231, 239, 251, 255, 217, 230, 250, 255, 199, 218, 247, 255, 181, 205, 244, 255, 109, 119, 127, 255, 88, 90, 90, 151, 145, 133, 117, 132, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 222, 223, 223, 255, 139, 143, 147, 255, 157, 168, 180, 255, 176, 195, 215, 255, 152, 174, 200, 255, 109, 118, 127, 255, 87, 89, 85, 255, 168, 144, 93, 255, 178, 152, 111, 254, 145, 133, 117, 132, 255, 255, 255, 0, + 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 252, 255, 238, 241, 247, 255, 212, 215, 215, 255, 146, 151, 151, 255, 103, 106, 108, 255, 98, 100, 102, 255, 91, 87, 81, 255, 147, 115, 67, 255, 231, 160, 71, 255, 253, 198, 97, 255, 161, 142, 114, 254, 145, 133, 117, 78, + 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 133, 134, 140, 255, 104, 77, 52, 255, 208, 127, 53, 255, 228, 152, 65, 255, 237, 179, 87, 255, 118, 103, 79, 255, + 255, 255, 255, 0, 147, 162, 183, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 70, 74, 84, 255, 103, 76, 51, 255, 189, 119, 56, 255, 102, 72, 45, 255, 89, 76, 55, 81, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 104, 77, 52, 84, 60, 49, 39, 255, 72, 58, 37, 84, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_Zoom(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 146, 158, 176, 4, 217, 222, 227, 75, 182, 192, 203, 154, 151, 164, 182, 195, 136, 151, 170, 217, 116, 132, 154, 229, 124, 141, 163, 190, 160, 178, 213, 78, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 186, 194, 207, 128, 149, 161, 178, 208, 177, 189, 200, 247, 187, 203, 214, 255, 187, 212, 222, 255, 152, 178, 195, 255, 118, 144, 165, 255, 82, 104, 132, 236, 86, 109, 135, 92, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 84, 104, 134, 26, 146, 158, 176, 201, 189, 198, 209, 253, 234, 244, 246, 255, 230, 246, 249, 255, 222, 242, 246, 255, 206, 234, 244, 255, 178, 212, 229, 255, 128, 158, 181, 255, 70, 91, 119, 250, 69, 88, 115, 36, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 189, 196, 207, 158, 164, 176, 190, 243, 227, 235, 240, 255, 244, 250, 251, 255, 241, 249, 251, 255, 234, 245, 250, 255, 215, 237, 245, 255, 191, 223, 241, 255, 164, 203, 230, 255, 104, 133, 158, 255, 61, 82, 111, 130, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 148, 160, 178, 213, 182, 196, 207, 255, 234, 245, 249, 255, 243, 250, 252, 255, 244, 251, 252, 255, 238, 246, 251, 255, 218, 237, 246, 255, 193, 222, 240, 255, 169, 207, 236, 255, 125, 162, 192, 255, 60, 81, 112, 239, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 113, 129, 151, 255, 196, 218, 227, 255, 222, 241, 247, 255, 235, 246, 250, 255, 238, 248, 251, 255, 230, 243, 249, 255, 211, 233, 244, 255, 190, 220, 239, 255, 165, 202, 231, 255, 130, 166, 204, 255, 63, 84, 114, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 128, 143, 165, 221, 164, 188, 205, 255, 204, 232, 244, 255, 215, 238, 246, 255, 218, 239, 247, 255, 210, 234, 244, 255, 197, 226, 242, 255, 179, 213, 236, 255, 157, 195, 227, 255, 114, 148, 181, 255, 56, 76, 108, 206, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 127, 142, 163, 162, 125, 150, 173, 247, 186, 223, 242, 255, 193, 225, 243, 255, 193, 225, 242, 255, 187, 222, 240, 255, 178, 216, 237, 255, 163, 203, 231, 255, 135, 173, 211, 255, 87, 115, 146, 255, 86, 95, 102, 244, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 105, 122, 149, 20, 83, 102, 130, 241, 139, 171, 193, 255, 170, 209, 236, 255, 174, 210, 238, 255, 167, 207, 236, 255, 158, 199, 231, 255, 138, 178, 216, 255, 98, 129, 161, 255, 66, 86, 114, 255, 165, 147, 100, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 84, 104, 134, 70, 77, 98, 129, 245, 101, 129, 157, 255, 126, 162, 191, 255, 135, 173, 208, 255, 115, 149, 180, 255, 89, 117, 147, 255, 64, 84, 110, 255, 145, 128, 79, 255, 239, 216, 135, 255, 165, 147, 100, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 84, 104, 134, 49, 120, 141, 173, 155, 66, 88, 117, 200, 59, 80, 112, 243, 67, 88, 119, 255, 87, 108, 143, 225, 75, 77, 73, 117, 66, 52, 45, 255, 198, 151, 43, 255, 239, 216, 135, 255, 165, 147, 100, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 87, 76, 43, 1, 255, 255, 255, 0, 79, 80, 77, 82, 79, 80, 77, 255, 198, 151, 43, 255, 239, 216, 135, 255, 165, 147, 100, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 79, 80, 77, 82, 79, 80, 77, 255, 198, 151, 43, 255, 239, 216, 135, 255, 165, 147, 100, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 87, 76, 43, 2, 255, 255, 255, 0, 79, 80, 77, 82, 79, 80, 77, 255, 179, 141, 50, 255, 116, 102, 67, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 79, 80, 77, 58, 79, 80, 77, 202, 79, 80, 77, 81, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ZoomSelection(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 158, 203, 28, 194, 201, 211, 127, 150, 163, 181, 195, 129, 144, 164, 221, 120, 137, 159, 203, 160, 176, 212, 78, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 29, 36, 45, 9, 169, 178, 194, 176, 184, 195, 206, 241, 201, 217, 226, 255, 189, 214, 224, 255, 149, 177, 195, 255, 97, 121, 148, 242, 179, 185, 194, 255, 8, 9, 13, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 154, 165, 183, 114, 176, 187, 199, 237, 232, 239, 243, 255, 237, 248, 250, 255, 224, 241, 247, 255, 195, 225, 240, 255, 152, 188, 214, 255, 65, 84, 106, 255, 21, 28, 38, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 148, 160, 178, 213, 199, 212, 221, 255, 240, 248, 251, 255, 244, 251, 252, 255, 231, 243, 249, 255, 201, 227, 242, 255, 169, 207, 236, 255, 100, 132, 161, 255, 20, 27, 38, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 118, 134, 155, 244, 196, 218, 228, 255, 224, 242, 248, 255, 231, 245, 250, 255, 218, 237, 246, 255, 193, 222, 240, 255, 162, 200, 230, 255, 105, 136, 169, 255, 20, 27, 38, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 255, 255, 255, 255, 163, 174, 189, 255, 153, 180, 199, 255, 198, 228, 244, 255, 201, 230, 244, 255, 191, 224, 240, 255, 174, 211, 235, 255, 142, 180, 216, 255, 94, 118, 143, 255, 25, 30, 35, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 127, 153, 21, 101, 124, 151, 246, 160, 196, 222, 255, 174, 210, 238, 255, 164, 204, 234, 255, 145, 185, 221, 255, 98, 129, 161, 255, 99, 106, 109, 255, 55, 49, 34, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 80, 103, 91, 98, 122, 152, 208, 106, 137, 166, 237, 106, 137, 171, 252, 92, 119, 150, 248, 67, 81, 97, 209, 154, 133, 80, 255, 202, 178, 109, 255, 55, 49, 34, 85, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 12, 15, 5, 36, 43, 54, 40, 22, 29, 39, 67, 20, 28, 38, 83, 27, 34, 45, 79, 25, 26, 24, 39, 88, 82, 66, 178, 181, 150, 71, 255, 214, 193, 123, 255, 73, 65, 44, 113, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 27, 26, 28, 79, 80, 77, 197, 198, 151, 43, 255, 214, 193, 123, 255, 55, 49, 33, 85, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 0, 1, 34, 35, 34, 36, 79, 80, 78, 189, 132, 112, 63, 224, 35, 32, 23, 66, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 19, 26, 26, 26, 54, 9, 9, 8, 9}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ZoomOut(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 127, 127, 191, 4, 217, 220, 227, 75, 182, 192, 203, 154, 150, 163, 181, 195, 136, 150, 170, 217, 115, 132, 153, 229, 123, 140, 162, 190, 160, 176, 212, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 185, 193, 207, 128, 149, 160, 177, 208, 176, 188, 200, 247, 187, 203, 214, 255, 187, 212, 222, 255, 152, 178, 195, 255, 118, 144, 165, 255, 82, 103, 131, 236, 85, 108, 135, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 88, 107, 137, 26, 145, 158, 176, 201, 189, 197, 208, 253, 234, 244, 246, 255, 230, 246, 249, 255, 222, 242, 246, 255, 206, 234, 244, 255, 178, 212, 229, 255, 128, 158, 181, 255, 70, 90, 119, 250, 70, 84, 113, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 188, 195, 206, 158, 163, 176, 189, 243, 227, 235, 240, 255, 244, 250, 251, 255, 241, 249, 251, 255, 234, 245, 250, 255, 215, 237, 245, 255, 191, 223, 241, 255, 164, 203, 230, 255, 104, 133, 158, 255, 60, 82, 111, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 148, 160, 178, 213, 182, 196, 207, 255, 234, 245, 249, 255, 243, 250, 252, 255, 244, 251, 252, 255, 238, 246, 251, 255, 218, 237, 246, 255, 193, 222, 240, 255, 169, 207, 236, 255, 125, 162, 192, 255, 59, 81, 112, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 113, 129, 151, 255, 196, 218, 227, 255, 222, 241, 247, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 165, 202, 231, 255, 130, 166, 204, 255, 63, 84, 114, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 128, 143, 164, 221, 164, 188, 205, 255, 204, 232, 244, 255, 215, 238, 246, 255, 218, 239, 247, 255, 210, 234, 244, 255, 197, 226, 242, 255, 179, 213, 236, 255, 157, 195, 227, 255, 114, 148, 181, 255, 55, 75, 107, 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 127, 141, 163, 162, 124, 149, 173, 247, 186, 223, 242, 255, 193, 225, 243, 255, 193, 225, 242, 255, 187, 222, 240, 255, 178, 216, 237, 255, 163, 203, 231, 255, 135, 173, 211, 255, 87, 115, 146, 255, 85, 95, 102, 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 102, 127, 153, 20, 82, 101, 130, 241, 139, 171, 193, 255, 170, 209, 236, 255, 174, 210, 238, 255, 167, 207, 236, 255, 158, 199, 231, 255, 138, 178, 216, 255, 98, 129, 161, 255, 66, 86, 114, 255, 165, 147, 100, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 83, 105, 134, 70, 77, 97, 129, 245, 101, 129, 157, 255, 126, 162, 191, 255, 135, 173, 208, 255, 115, 149, 180, 255, 89, 117, 147, 255, 64, 84, 110, 255, 145, 128, 79, 255, 239, 216, 135, 255, 165, 147, 100, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 104, 135, 49, 120, 141, 172, 155, 66, 87, 117, 200, 58, 79, 112, 243, 67, 88, 119, 255, 87, 107, 142, 225, 74, 76, 71, 117, 66, 52, 45, 255, 198, 151, 43, 255, 239, 216, 135, 255, 165, 147, 100, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 77, 80, 77, 82, 79, 80, 77, 255, 198, 151, 43, 255, 239, 216, 135, 255, 165, 147, 100, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 80, 77, 82, 79, 80, 77, 255, 198, 151, 43, 255, 239, 216, 135, 255, 165, 147, 100, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 0, 2, 0, 0, 0, 0, 77, 80, 77, 82, 79, 80, 77, 255, 179, 141, 50, 255, 116, 102, 67, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 79, 79, 58, 79, 79, 77, 202, 78, 78, 75, 81, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_EditCut(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 169, 178, 191, 139, 155, 166, 178, 228, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 47, 220, 224, 229, 238, 123, 133, 148, 176, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 157, 172, 52, 140, 150, 163, 254, 122, 133, 153, 25, 255, 255, 255, 0, 246, 247, 248, 133, 171, 178, 188, 254, 100, 108, 122, 92, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 146, 155, 169, 250, 147, 156, 171, 163, 255, 255, 255, 15, 230, 232, 236, 233, 102, 111, 124, 254, 22, 18, 14, 33, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 169, 177, 190, 242, 138, 147, 161, 249, 200, 204, 209, 128, 193, 198, 206, 251, 86, 95, 107, 253, 22, 18, 14, 27, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 161, 170, 184, 179, 139, 148, 162, 254, 141, 150, 161, 191, 119, 129, 142, 254, 76, 82, 91, 234, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 137, 145, 161, 65, 116, 128, 142, 254, 99, 110, 126, 254, 85, 93, 105, 253, 70, 75, 82, 170, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 110, 132, 238, 86, 96, 113, 255, 84, 102, 134, 252, 79, 96, 132, 88, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 91, 136, 238, 45, 88, 137, 235, 179, 84, 131, 224, 249, 75, 118, 202, 173, 76, 119, 205, 251, 78, 122, 211, 247, 76, 117, 203, 159, 70, 107, 185, 74, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 88, 135, 234, 49, 89, 140, 238, 243, 83, 128, 220, 247, 59, 91, 158, 244, 53, 82, 142, 221, 70, 110, 190, 236, 79, 123, 213, 255, 69, 107, 185, 255, 58, 92, 159, 144, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 86, 135, 231, 176, 86, 134, 229, 255, 65, 102, 176, 255, 53, 82, 142, 248, 53, 82, 141, 180, 75, 116, 202, 250, 79, 121, 213, 24, 66, 104, 178, 96, 52, 83, 143, 250, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 85, 132, 226, 250, 82, 129, 222, 49, 66, 101, 178, 48, 51, 80, 139, 250, 53, 82, 141, 18, 80, 123, 213, 250, 77, 120, 205, 48, 56, 88, 150, 107, 43, 64, 106, 251, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 83, 130, 222, 250, 79, 118, 210, 48, 62, 99, 172, 98, 49, 76, 132, 250, 255, 255, 255, 0, 75, 116, 199, 205, 62, 98, 170, 255, 41, 60, 99, 255, 28, 31, 41, 244, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 78, 121, 209, 206, 63, 98, 171, 255, 51, 80, 138, 255, 39, 54, 87, 227, 22, 18, 14, 3, 63, 100, 172, 89, 42, 59, 96, 238, 39, 55, 88, 239, 51, 79, 135, 104, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 67, 104, 180, 88, 54, 84, 146, 227, 40, 58, 93, 238, 49, 74, 124, 110, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_FileProperties(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 172, 164, 143, 57, 172, 164, 143, 255, 169, 161, 140, 255, 165, 156, 136, 255, 160, 150, 131, 255, 154, 144, 126, 255, 150, 139, 122, 255, 150, 139, 122, 122, 156, 184, 153, 255, 166, 193, 174, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 172, 164, 143, 57, 172, 164, 143, 255, 246, 225, 131, 255, 246, 225, 131, 255, 246, 225, 131, 255, 244, 219, 119, 255, 242, 210, 101, 255, 207, 178, 95, 255, 150, 139, 122, 255, 166, 193, 174, 255, 154, 211, 147, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 172, 164, 143, 57, 172, 164, 143, 255, 246, 225, 131, 255, 114, 91, 64, 255, 246, 225, 131, 255, 244, 219, 119, 255, 242, 210, 101, 255, 239, 201, 80, 255, 235, 191, 59, 255, 233, 182, 41, 255, 131, 165, 118, 255, 120, 192, 93, 255, + 167, 182, 204, 255, 167, 182, 204, 255, 166, 181, 202, 255, 166, 176, 189, 255, 172, 164, 143, 255, 246, 225, 131, 255, 112, 97, 75, 255, 246, 225, 131, 255, 115, 89, 60, 255, 242, 210, 101, 255, 239, 201, 80, 255, 235, 191, 59, 255, 228, 178, 39, 255, 214, 163, 28, 255, 110, 149, 100, 255, 108, 180, 83, 255, + 166, 181, 203, 255, 254, 254, 254, 255, 234, 234, 228, 255, 172, 164, 143, 255, 246, 225, 131, 255, 112, 97, 75, 255, 226, 205, 122, 255, 111, 97, 76, 255, 242, 210, 101, 255, 113, 93, 69, 255, 223, 178, 50, 255, 200, 153, 29, 255, 179, 136, 26, 255, 109, 83, 31, 255, 88, 132, 79, 255, 100, 172, 76, 255, + 165, 179, 201, 255, 254, 254, 254, 255, 172, 164, 143, 255, 229, 211, 134, 255, 112, 97, 75, 255, 189, 184, 175, 255, 112, 97, 74, 255, 222, 193, 97, 255, 111, 97, 76, 255, 233, 182, 41, 255, 51, 39, 21, 255, 58, 44, 16, 255, 53, 41, 23, 255, 44, 34, 20, 145, 67, 116, 61, 255, 97, 167, 75, 255, + 162, 177, 199, 255, 252, 253, 254, 255, 233, 233, 226, 255, 132, 117, 94, 255, 227, 227, 223, 255, 246, 255, 255, 255, 201, 200, 194, 255, 112, 97, 74, 255, 214, 169, 46, 255, 71, 53, 35, 255, 153, 163, 175, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 67, 116, 61, 114, 76, 130, 65, 255, + 160, 176, 197, 255, 246, 255, 255, 255, 246, 255, 255, 255, 246, 255, 255, 255, 246, 255, 255, 255, 246, 255, 255, 255, 239, 250, 253, 255, 197, 196, 193, 255, 114, 92, 65, 255, 205, 222, 242, 255, 192, 211, 238, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 67, 116, 61, 15, + 158, 174, 195, 255, 246, 255, 255, 255, 246, 255, 255, 255, 246, 255, 255, 255, 246, 255, 255, 255, 239, 249, 253, 255, 229, 242, 250, 255, 217, 232, 246, 255, 205, 222, 243, 255, 192, 211, 238, 255, 178, 200, 234, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 156, 170, 192, 255, 246, 255, 255, 255, 156, 166, 183, 255, 152, 163, 182, 255, 239, 249, 253, 255, 144, 156, 179, 255, 141, 153, 178, 255, 139, 152, 177, 255, 139, 152, 177, 255, 139, 152, 177, 255, 165, 190, 230, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 153, 168, 190, 255, 246, 255, 255, 255, 246, 255, 255, 255, 239, 250, 253, 255, 229, 242, 250, 255, 218, 232, 246, 255, 205, 222, 242, 255, 192, 211, 238, 255, 178, 200, 234, 255, 166, 190, 230, 255, 154, 180, 227, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 152, 166, 188, 255, 246, 255, 255, 255, 156, 165, 184, 255, 152, 162, 182, 255, 218, 232, 246, 255, 144, 157, 179, 255, 141, 154, 178, 255, 139, 152, 177, 255, 139, 152, 177, 255, 139, 152, 177, 255, 144, 173, 223, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 150, 165, 186, 255, 239, 250, 252, 255, 230, 242, 250, 255, 218, 233, 246, 255, 205, 222, 242, 255, 191, 211, 238, 255, 178, 200, 234, 255, 165, 190, 230, 255, 154, 180, 226, 255, 144, 173, 223, 255, 137, 167, 221, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 149, 163, 185, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ArrowUp(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 192, 152, 72, 159, 184, 146, 255, 69, 85, 68, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 192, 152, 72, 180, 206, 166, 255, 213, 241, 198, 255, 86, 104, 82, 255, 73, 90, 71, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 192, 152, 72, 174, 200, 160, 255, 215, 244, 199, 255, 197, 238, 175, 255, 129, 166, 111, 255, 80, 97, 77, 255, 73, 90, 71, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 192, 152, 72, 174, 200, 160, 255, 215, 244, 199, 255, 191, 235, 168, 255, 173, 225, 146, 255, 165, 218, 139, 255, 117, 154, 101, 255, 100, 117, 95, 255, 44, 54, 43, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 166, 192, 152, 72, 166, 192, 152, 255, 208, 240, 190, 255, 191, 235, 168, 255, 171, 224, 145, 255, 163, 216, 137, 255, 141, 189, 118, 255, 123, 171, 104, 255, 92, 128, 79, 255, 53, 64, 51, 255, 44, 54, 43, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 167, 193, 153, 255, 90, 108, 86, 255, 75, 91, 72, 255, 71, 87, 69, 255, 185, 224, 166, 255, 149, 202, 126, 255, 121, 168, 102, 255, 60, 73, 58, 255, 53, 64, 51, 255, 50, 61, 49, 255, 44, 54, 43, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 169, 136, 255, 174, 213, 157, 255, 134, 187, 112, 255, 107, 155, 90, 255, 53, 64, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 162, 131, 255, 162, 202, 147, 255, 118, 172, 99, 255, 93, 142, 78, 255, 44, 54, 43, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 156, 127, 255, 151, 192, 137, 255, 91, 139, 75, 255, 80, 129, 67, 255, 35, 43, 34, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 151, 123, 255, 60, 73, 58, 255, 53, 64, 51, 255, 44, 54, 43, 255, 28, 34, 27, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ArrowDown(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 162, 188, 149, 255, 156, 180, 144, 255, 147, 170, 137, 255, 140, 161, 130, 255, 132, 152, 124, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 156, 180, 144, 255, 201, 241, 180, 255, 198, 239, 177, 255, 190, 233, 169, 255, 35, 43, 34, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 170, 137, 255, 196, 238, 174, 255, 173, 226, 147, 255, 134, 179, 115, 255, 44, 54, 43, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 140, 161, 130, 255, 191, 234, 170, 255, 163, 216, 139, 255, 125, 170, 106, 255, 53, 64, 51, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 156, 180, 144, 255, 147, 170, 137, 255, 140, 161, 130, 255, 132, 152, 124, 255, 185, 228, 164, 255, 152, 205, 129, 255, 116, 160, 98, 255, 60, 73, 58, 255, 127, 146, 120, 255, 127, 146, 120, 255, 127, 146, 120, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 166, 192, 152, 72, 132, 151, 123, 255, 184, 225, 165, 255, 187, 229, 168, 255, 182, 224, 163, 255, 140, 193, 118, 255, 106, 151, 90, 255, 96, 141, 81, 255, 78, 119, 67, 255, 28, 34, 27, 255, 44, 54, 43, 51, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 153, 176, 141, 100, 132, 151, 123, 255, 150, 199, 128, 255, 140, 193, 118, 255, 128, 181, 108, 255, 116, 170, 98, 255, 78, 119, 67, 255, 28, 34, 27, 255, 37, 45, 36, 77, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 153, 176, 141, 100, 132, 151, 123, 255, 128, 178, 109, 255, 116, 170, 98, 255, 78, 119, 67, 255, 28, 34, 27, 255, 54, 66, 53, 77, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 153, 176, 141, 100, 132, 151, 123, 255, 100, 146, 86, 255, 28, 34, 27, 255, 54, 66, 53, 77, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 153, 177, 141, 99, 103, 118, 96, 255, 53, 65, 52, 82, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ViewFullScreen(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 166, 181, 203, 255, 165, 180, 202, 255, 164, 179, 201, 255, 163, 178, 200, 255, 162, 177, 199, 255, 161, 176, 197, 255, 159, 174, 196, 255, 158, 173, 195, 255, 157, 172, 193, 255, 155, 170, 192, 255, 154, 169, 190, 255, 153, 168, 189, 255, 152, 167, 188, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 166, 181, 203, 255, 254, 255, 253, 255, 253, 254, 253, 255, 251, 253, 253, 255, 249, 252, 253, 255, 247, 251, 253, 255, 245, 249, 253, 255, 243, 247, 253, 255, 240, 246, 254, 255, 238, 244, 254, 255, 235, 242, 254, 255, 232, 240, 254, 255, 230, 239, 254, 255, 227, 237, 254, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 165, 180, 202, 255, 253, 254, 253, 255, 135, 159, 206, 255, 120, 147, 200, 255, 111, 140, 199, 255, 109, 139, 200, 255, 102, 134, 200, 255, 90, 126, 198, 255, 79, 119, 196, 255, 71, 113, 195, 255, 63, 107, 195, 255, 57, 103, 196, 255, 69, 116, 204, 255, 224, 235, 254, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 164, 179, 201, 255, 251, 253, 253, 255, 116, 143, 199, 255, 206, 223, 255, 255, 200, 219, 255, 255, 192, 214, 255, 255, 183, 209, 254, 255, 174, 202, 253, 255, 165, 195, 253, 255, 155, 189, 252, 255, 145, 182, 251, 255, 135, 175, 250, 255, 64, 120, 228, 255, 221, 233, 254, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 163, 178, 200, 255, 249, 252, 253, 255, 114, 142, 198, 255, 201, 220, 255, 255, 232, 240, 255, 255, 229, 238, 255, 255, 224, 236, 255, 255, 165, 195, 253, 255, 155, 189, 252, 255, 145, 182, 251, 255, 136, 175, 250, 255, 114, 156, 240, 255, 58, 116, 227, 255, 219, 231, 254, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 162, 177, 199, 255, 247, 251, 253, 255, 114, 142, 198, 255, 194, 215, 255, 255, 184, 209, 254, 255, 175, 203, 253, 255, 166, 196, 253, 255, 156, 189, 252, 255, 145, 181, 251, 255, 132, 171, 247, 255, 119, 160, 242, 255, 106, 148, 236, 255, 57, 115, 227, 255, 216, 230, 255, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 161, 176, 197, 255, 245, 249, 253, 255, 114, 142, 198, 255, 185, 210, 254, 255, 225, 236, 255, 255, 221, 233, 255, 255, 217, 231, 255, 255, 213, 228, 255, 255, 209, 225, 255, 255, 204, 221, 255, 255, 200, 219, 255, 255, 98, 140, 229, 255, 57, 115, 227, 255, 214, 228, 255, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 159, 174, 196, 255, 243, 247, 253, 255, 114, 142, 198, 255, 177, 204, 253, 255, 167, 197, 253, 255, 157, 190, 252, 255, 143, 179, 249, 255, 131, 170, 246, 255, 120, 161, 243, 255, 111, 152, 237, 255, 102, 142, 230, 255, 90, 130, 222, 255, 57, 114, 226, 255, 212, 226, 255, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 158, 173, 195, 255, 240, 246, 254, 255, 114, 142, 198, 255, 168, 197, 253, 255, 217, 231, 255, 255, 214, 228, 255, 255, 209, 225, 255, 255, 204, 221, 255, 255, 200, 219, 255, 255, 194, 213, 255, 255, 188, 208, 255, 255, 83, 121, 214, 255, 57, 114, 226, 255, 210, 225, 255, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 157, 172, 193, 255, 238, 244, 254, 255, 116, 144, 199, 255, 158, 191, 252, 255, 136, 173, 243, 255, 127, 167, 243, 255, 115, 157, 240, 255, 106, 149, 236, 255, 98, 140, 229, 255, 90, 130, 222, 255, 83, 121, 214, 255, 75, 112, 205, 255, 58, 115, 226, 255, 208, 224, 255, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 155, 170, 192, 255, 235, 242, 254, 255, 125, 151, 203, 255, 127, 157, 219, 255, 128, 163, 234, 255, 119, 157, 233, 255, 109, 151, 232, 255, 99, 144, 231, 255, 89, 136, 230, 255, 79, 130, 229, 255, 70, 124, 228, 255, 63, 120, 228, 255, 74, 126, 229, 255, 206, 223, 255, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 154, 169, 190, 255, 232, 240, 254, 255, 230, 239, 254, 255, 227, 237, 254, 255, 224, 235, 254, 255, 221, 233, 254, 255, 219, 231, 254, 255, 216, 230, 255, 255, 214, 228, 255, 255, 212, 226, 255, 255, 210, 225, 255, 255, 208, 224, 255, 255, 206, 223, 255, 255, 205, 222, 255, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MediaGoToEnd(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 6, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 53, 96, 140, 228, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 113, 154, 231, 255, 95, 147, 237, 63, 96, 140, 228, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 113, 154, 231, 255, 128, 158, 231, 250, 93, 136, 225, 236, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 109, 153, 230, 255, 96, 139, 222, 255, 94, 144, 235, 74, 96, 140, 228, 6, 255, 255, 255, 0, 255, 255, 255, 0, 109, 153, 230, 255, 170, 196, 239, 255, 87, 135, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 104, 148, 229, 255, 158, 191, 251, 255, 82, 128, 217, 253, 96, 140, 228, 107, 96, 140, 228, 6, 255, 255, 255, 0, 104, 148, 229, 255, 161, 190, 240, 255, 83, 128, 214, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 255, 155, 190, 250, 255, 137, 181, 253, 255, 70, 117, 211, 255, 96, 140, 228, 110, 96, 140, 228, 6, 96, 140, 228, 255, 150, 180, 239, 255, 79, 123, 208, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 89, 138, 226, 255, 148, 182, 250, 255, 116, 165, 253, 255, 96, 151, 253, 255, 60, 109, 205, 255, 96, 140, 228, 110, 89, 138, 226, 255, 141, 171, 240, 255, 74, 117, 200, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 81, 131, 225, 255, 133, 173, 239, 255, 96, 151, 253, 255, 51, 116, 244, 255, 27, 91, 214, 255, 51, 89, 166, 255, 81, 131, 225, 255, 126, 159, 238, 255, 68, 111, 192, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 72, 122, 223, 255, 116, 157, 238, 255, 51, 116, 244, 255, 27, 91, 214, 255, 33, 68, 140, 255, 27, 76, 171, 136, 72, 122, 223, 255, 111, 150, 236, 255, 63, 104, 183, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 63, 117, 221, 255, 81, 132, 230, 255, 27, 91, 214, 255, 33, 68, 140, 255, 27, 76, 169, 127, 255, 255, 255, 0, 63, 117, 221, 255, 107, 147, 235, 255, 56, 96, 175, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 56, 110, 220, 255, 60, 112, 212, 255, 33, 68, 140, 255, 27, 76, 169, 106, 255, 255, 255, 0, 255, 255, 255, 0, 56, 110, 220, 255, 101, 143, 235, 255, 51, 89, 166, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 49, 106, 219, 255, 33, 68, 140, 255, 26, 74, 167, 119, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 49, 106, 219, 255, 86, 132, 233, 255, 45, 83, 158, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 44, 102, 216, 255, 27, 76, 172, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 44, 102, 216, 255, 78, 123, 225, 255, 40, 77, 150, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 26, 75, 173, 132, 27, 75, 168, 6, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 62, 106, 211, 250, 36, 72, 144, 255, 36, 72, 144, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ArrowLeft(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 192, 152, 72, 167, 193, 153, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 192, 152, 72, 166, 192, 152, 255, 90, 108, 86, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 192, 152, 72, 174, 200, 160, 255, 208, 240, 190, 255, 75, 91, 72, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 192, 152, 72, 174, 200, 160, 255, 215, 244, 199, 255, 191, 235, 168, 255, 71, 87, 69, 255, 147, 169, 136, 255, 141, 162, 131, 255, 137, 156, 127, 255, 132, 151, 123, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 192, 152, 72, 180, 206, 166, 255, 215, 244, 199, 255, 191, 235, 168, 255, 171, 224, 145, 255, 185, 224, 166, 255, 174, 213, 157, 255, 162, 202, 147, 255, 151, 192, 137, 255, 60, 73, 58, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159, 184, 146, 255, 213, 241, 198, 255, 197, 238, 175, 255, 173, 225, 146, 255, 163, 216, 137, 255, 149, 202, 126, 255, 134, 187, 112, 255, 118, 172, 99, 255, 91, 139, 75, 255, 53, 64, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 85, 68, 57, 86, 104, 82, 255, 129, 166, 111, 255, 165, 218, 139, 255, 141, 189, 118, 255, 121, 168, 102, 255, 107, 155, 90, 255, 93, 142, 78, 255, 80, 129, 67, 255, 44, 54, 43, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 90, 71, 51, 80, 97, 77, 255, 117, 154, 101, 255, 123, 171, 104, 255, 60, 73, 58, 255, 53, 64, 51, 255, 44, 54, 43, 255, 35, 43, 34, 255, 28, 34, 27, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 90, 71, 51, 100, 117, 95, 255, 92, 128, 79, 255, 53, 64, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 54, 43, 51, 53, 64, 51, 255, 50, 61, 49, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 54, 43, 51, 44, 54, 43, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ActionCancel(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 236, 206, 209, 109, 238, 209, 210, 255, 222, 157, 161, 255, 217, 135, 138, 255, 215, 132, 136, 255, 209, 122, 128, 255, 210, 140, 146, 255, 231, 196, 199, 255, 236, 206, 209, 109, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 236, 206, 209, 0, 229, 181, 183, 255, 224, 139, 141, 255, 239, 163, 161, 255, 241, 161, 159, 255, 239, 143, 145, 255, 226, 120, 124, 255, 205, 97, 103, 255, 192, 92, 100, 255, 218, 163, 167, 255, 236, 206, 209, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 236, 206, 209, 0, 222, 153, 156, 255, 235, 156, 155, 255, 254, 213, 201, 255, 255, 214, 203, 255, 255, 181, 177, 255, 251, 148, 151, 255, 236, 122, 127, 255, 224, 110, 115, 255, 213, 100, 105, 255, 194, 86, 93, 255, 202, 125, 131, 255, 236, 206, 209, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 227, 173, 175, 255, 237, 159, 157, 255, 255, 230, 215, 255, 248, 211, 196, 255, 245, 173, 167, 255, 250, 159, 157, 255, 240, 131, 134, 255, 228, 115, 119, 255, 214, 99, 104, 255, 201, 85, 90, 255, 205, 94, 98, 255, 192, 83, 89, 255, 202, 128, 134, 255, 236, 206, 209, 109, 255, 255, 255, 0, + 236, 206, 209, 109, 222, 134, 135, 255, 255, 223, 209, 255, 243, 203, 192, 255, 209, 134, 135, 255, 206, 115, 119, 255, 224, 119, 119, 255, 228, 116, 119, 255, 211, 92, 96, 255, 198, 96, 101, 255, 208, 138, 144, 255, 196, 97, 102, 255, 197, 87, 92, 255, 185, 77, 84, 255, 223, 175, 179, 255, 255, 255, 255, 0, + 217, 154, 158, 255, 238, 173, 167, 255, 253, 217, 200, 255, 223, 151, 149, 255, 235, 211, 215, 255, 241, 223, 224, 255, 203, 109, 114, 255, 196, 74, 80, 255, 195, 88, 94, 255, 231, 193, 196, 255, 255, 255, 255, 255, 217, 160, 164, 255, 193, 80, 85, 255, 192, 82, 88, 255, 190, 100, 106, 255, 236, 206, 209, 109, + 201, 114, 120, 255, 247, 178, 171, 255, 255, 186, 175, 255, 242, 157, 153, 255, 247, 202, 203, 255, 255, 254, 254, 255, 242, 219, 220, 255, 200, 118, 123, 255, 232, 194, 197, 255, 255, 255, 255, 255, 241, 205, 206, 255, 209, 106, 110, 255, 197, 84, 88, 255, 192, 83, 89, 255, 184, 80, 88, 255, 231, 196, 199, 255, + 200, 103, 108, 255, 252, 159, 157, 255, 253, 158, 154, 255, 239, 131, 130, 255, 225, 113, 115, 255, 232, 173, 177, 255, 252, 249, 249, 255, 254, 252, 253, 255, 254, 255, 255, 255, 235, 192, 194, 255, 207, 94, 100, 255, 201, 80, 85, 255, 198, 87, 92, 255, 192, 83, 89, 255, 184, 82, 89, 255, 222, 175, 179, 255, + 198, 95, 103, 255, 241, 130, 134, 255, 240, 130, 131, 255, 228, 117, 119, 255, 208, 83, 90, 255, 198, 91, 97, 255, 240, 218, 218, 255, 255, 255, 255, 255, 252, 251, 251, 255, 205, 121, 126, 255, 192, 67, 73, 255, 202, 86, 91, 255, 197, 86, 91, 255, 190, 83, 89, 255, 184, 82, 89, 255, 221, 173, 177, 255, + 197, 105, 112, 255, 219, 107, 113, 255, 227, 114, 118, 255, 211, 93, 98, 255, 197, 90, 97, 255, 223, 181, 183, 255, 251, 243, 244, 255, 242, 213, 215, 255, 252, 244, 244, 255, 242, 224, 226, 255, 204, 124, 128, 255, 192, 73, 80, 255, 195, 84, 89, 255, 188, 82, 88, 255, 183, 79, 87, 255, 222, 177, 181, 255, + 216, 158, 163, 255, 198, 87, 94, 255, 216, 101, 106, 255, 210, 112, 118, 255, 231, 199, 201, 255, 255, 255, 255, 255, 235, 188, 190, 255, 206, 92, 97, 255, 221, 142, 146, 255, 253, 245, 244, 255, 247, 238, 239, 255, 218, 156, 160, 255, 192, 82, 87, 255, 185, 78, 84, 255, 184, 84, 91, 255, 237, 212, 214, 255, + 236, 206, 209, 109, 191, 93, 101, 255, 202, 87, 94, 255, 217, 131, 135, 255, 251, 241, 241, 255, 236, 191, 193, 255, 204, 92, 96, 255, 200, 75, 80, 255, 200, 74, 79, 255, 215, 129, 133, 255, 251, 241, 240, 255, 233, 196, 197, 255, 187, 79, 83, 255, 180, 72, 78, 255, 202, 124, 131, 255, 236, 206, 209, 109, + 255, 255, 255, 0, 227, 185, 189, 255, 186, 76, 82, 255, 203, 97, 100, 255, 211, 120, 124, 255, 203, 99, 104, 255, 197, 79, 85, 255, 200, 88, 93, 255, 198, 83, 88, 255, 194, 78, 83, 255, 204, 116, 119, 255, 197, 102, 107, 255, 182, 76, 81, 255, 183, 83, 91, 255, 236, 206, 209, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 236, 206, 209, 0, 218, 165, 169, 255, 182, 73, 79, 255, 190, 78, 83, 255, 194, 83, 88, 255, 195, 87, 90, 255, 194, 85, 89, 255, 193, 84, 88, 255, 191, 83, 87, 255, 185, 75, 80, 255, 181, 73, 78, 255, 179, 76, 83, 255, 226, 182, 186, 255, 236, 206, 209, 109, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 236, 206, 209, 0, 229, 191, 194, 255, 192, 101, 108, 255, 180, 72, 80, 255, 185, 77, 82, 255, 186, 79, 85, 255, 185, 78, 83, 255, 181, 75, 81, 255, 177, 70, 77, 255, 191, 101, 107, 255, 230, 192, 195, 255, 236, 206, 209, 0, 236, 206, 209, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 236, 206, 209, 0, 236, 206, 209, 109, 228, 187, 191, 255, 205, 136, 141, 255, 195, 113, 120, 255, 196, 114, 121, 255, 204, 133, 138, 255, 225, 181, 185, 255, 236, 206, 209, 109, 255, 255, 255, 151, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_Print(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 169, 185, 207, 4, 171, 187, 209, 115, 174, 190, 212, 255, 174, 190, 212, 255, 174, 190, 212, 255, 174, 190, 212, 255, 174, 190, 212, 255, 174, 190, 212, 255, 174, 190, 212, 255, 173, 189, 211, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 169, 185, 207, 114, 206, 211, 227, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 252, 255, 225, 230, 239, 255, 171, 183, 200, 255, 76, 95, 121, 254, 75, 94, 120, 38, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 169, 185, 207, 27, 169, 185, 207, 255, 253, 253, 254, 255, 235, 238, 242, 255, 194, 203, 215, 255, 194, 203, 215, 255, 176, 187, 202, 255, 168, 179, 198, 255, 203, 212, 226, 255, 92, 110, 134, 255, 76, 95, 121, 239, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 163, 180, 203, 156, 223, 229, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 252, 255, 241, 243, 248, 255, 213, 220, 232, 255, 173, 185, 202, 255, 75, 94, 120, 254, 75, 94, 120, 107, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 155, 173, 198, 48, 155, 173, 198, 255, 252, 253, 254, 255, 226, 231, 236, 255, 194, 203, 215, 255, 194, 203, 215, 255, 176, 187, 202, 255, 183, 194, 210, 255, 202, 211, 225, 255, 89, 106, 132, 255, 79, 97, 123, 248, 140, 155, 177, 255, 147, 162, 183, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 125, 142, 167, 90, 155, 173, 198, 255, 189, 202, 217, 255, 255, 255, 255, 255, 249, 250, 252, 255, 249, 250, 252, 255, 241, 243, 248, 255, 231, 236, 244, 255, 217, 224, 236, 255, 154, 168, 187, 255, 77, 96, 122, 255, 127, 143, 165, 255, 157, 173, 197, 255, 77, 97, 123, 255, 255, 255, 255, 0, + 118, 137, 163, 79, 134, 151, 176, 229, 161, 179, 204, 255, 153, 169, 194, 255, 163, 178, 201, 255, 146, 161, 185, 255, 129, 145, 169, 255, 113, 130, 155, 255, 96, 114, 139, 255, 81, 99, 125, 255, 74, 93, 119, 255, 90, 108, 133, 255, 144, 159, 180, 255, 116, 132, 155, 255, 74, 94, 120, 255, 255, 255, 255, 0, + 141, 160, 186, 255, 242, 244, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 252, 253, 255, 246, 248, 251, 255, 241, 243, 248, 255, 234, 238, 246, 255, 228, 233, 243, 255, 123, 138, 161, 255, 102, 119, 143, 255, 77, 97, 122, 255, 255, 255, 255, 0, + 132, 150, 174, 255, 179, 192, 208, 255, 175, 187, 203, 255, 161, 174, 191, 255, 148, 162, 181, 255, 134, 149, 170, 255, 122, 138, 159, 255, 110, 126, 149, 255, 98, 115, 139, 255, 88, 106, 130, 255, 80, 98, 123, 255, 72, 91, 116, 255, 109, 126, 149, 255, 89, 107, 131, 255, 64, 84, 110, 255, 255, 255, 255, 0, + 127, 144, 170, 255, 227, 230, 235, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 242, 245, 249, 255, 225, 231, 241, 255, 10, 255, 0, 255, 10, 255, 0, 255, 2, 161, 0, 255, 96, 113, 137, 255, 76, 94, 119, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 126, 142, 168, 239, 210, 216, 224, 255, 250, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 252, 255, 255, 237, 243, 251, 255, 216, 227, 245, 255, 197, 213, 238, 255, 10, 255, 0, 255, 180, 255, 0, 255, 2, 161, 0, 255, 83, 101, 125, 255, 62, 82, 107, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 127, 140, 161, 133, 140, 154, 173, 246, 226, 235, 248, 255, 238, 244, 254, 255, 230, 240, 254, 255, 220, 232, 253, 255, 200, 219, 247, 255, 181, 205, 243, 255, 165, 194, 239, 255, 2, 161, 0, 255, 2, 161, 0, 255, 2, 161, 0, 255, 69, 88, 113, 255, 53, 73, 99, 255, 53, 73, 99, 176, 255, 255, 255, 0, + 104, 116, 135, 60, 122, 136, 159, 237, 190, 205, 227, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 53, 73, 99, 255, 53, 73, 99, 26, 255, 255, 255, 0, + 255, 255, 255, 0, 116, 132, 156, 63, 82, 102, 127, 255, 78, 98, 124, 255, 75, 95, 121, 255, 72, 92, 118, 255, 68, 88, 114, 255, 65, 85, 111, 255, 61, 81, 107, 255, 58, 78, 104, 255, 55, 75, 101, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 105, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MediaPause(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 141, 179, 253, 255, 138, 176, 250, 255, 110, 149, 226, 242, 255, 255, 255, 0, 141, 179, 253, 255, 138, 176, 250, 255, 110, 149, 226, 242, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 138, 176, 250, 255, 213, 225, 252, 255, 45, 85, 170, 255, 255, 255, 255, 0, 138, 176, 250, 255, 213, 225, 252, 255, 45, 85, 170, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 134, 173, 246, 255, 218, 229, 251, 255, 37, 78, 162, 255, 255, 255, 255, 0, 134, 173, 246, 255, 218, 229, 251, 255, 37, 78, 162, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 129, 168, 243, 255, 211, 225, 251, 255, 30, 70, 154, 255, 255, 255, 255, 0, 129, 168, 243, 255, 211, 225, 251, 255, 30, 70, 154, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 125, 163, 239, 255, 200, 215, 251, 255, 22, 62, 146, 255, 255, 255, 255, 0, 125, 163, 239, 255, 200, 215, 251, 255, 22, 62, 146, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 120, 158, 234, 255, 187, 208, 249, 255, 15, 54, 139, 255, 255, 255, 255, 0, 120, 158, 234, 255, 187, 208, 249, 255, 15, 54, 139, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 116, 155, 231, 255, 175, 201, 249, 255, 9, 48, 133, 255, 255, 255, 255, 0, 116, 155, 231, 255, 175, 201, 249, 255, 9, 48, 133, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 112, 151, 227, 255, 160, 188, 243, 255, 5, 44, 129, 255, 255, 255, 255, 0, 112, 151, 227, 255, 160, 188, 243, 255, 5, 44, 129, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 110, 149, 226, 242, 6, 45, 130, 255, 5, 44, 129, 255, 255, 255, 255, 0, 110, 149, 226, 242, 6, 45, 130, 255, 5, 44, 129, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_FileClose(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 103, 147, 255, 133, 148, 164, 67, 129, 145, 166, 255, 120, 137, 161, 255, 135, 149, 170, 255, 123, 140, 160, 124, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 103, 147, 255, 96, 116, 149, 255, 83, 105, 141, 92, 0, 0, 0, 0, 109, 121, 158, 21, 130, 145, 166, 255, 117, 132, 159, 85, 0, 0, 0, 0, + 182, 169, 136, 143, 172, 164, 143, 255, 172, 164, 143, 255, 172, 164, 143, 255, 172, 164, 143, 255, 172, 164, 143, 255, 182, 169, 136, 143, 0, 0, 0, 0, 76, 103, 147, 255, 76, 103, 147, 255, 76, 103, 147, 255, 0, 0, 0, 0, 0, 0, 0, 0, 106, 123, 152, 77, 84, 107, 141, 255, 0, 0, 0, 0, + 172, 164, 143, 255, 236, 228, 178, 255, 248, 237, 182, 255, 248, 237, 182, 255, 246, 236, 169, 255, 243, 225, 146, 255, 170, 161, 141, 255, 176, 164, 132, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 170, 161, 141, 255, 170, 161, 141, 255, 170, 161, 141, 255, 170, 161, 141, 255, 170, 161, 141, 255, 168, 159, 139, 255, 166, 156, 137, 255, 166, 155, 137, 255, 164, 154, 135, 255, 163, 153, 134, 255, 160, 150, 132, 255, 160, 150, 132, 255, 160, 149, 131, 255, 160, 149, 131, 255, 143, 132, 117, 255, 0, 0, 0, 0, + 168, 160, 139, 255, 249, 240, 190, 255, 249, 240, 190, 255, 249, 240, 190, 255, 249, 240, 190, 255, 248, 242, 180, 255, 251, 236, 170, 255, 251, 233, 160, 255, 252, 229, 149, 255, 252, 223, 138, 255, 251, 216, 127, 255, 248, 210, 116, 255, 244, 202, 104, 255, 241, 192, 93, 255, 122, 112, 99, 255, 0, 0, 0, 0, + 166, 156, 137, 255, 249, 240, 190, 255, 248, 237, 182, 255, 248, 237, 182, 255, 247, 240, 171, 255, 250, 236, 162, 255, 251, 230, 149, 255, 252, 225, 137, 255, 252, 220, 125, 255, 250, 211, 111, 255, 247, 204, 99, 255, 243, 195, 85, 255, 239, 185, 73, 255, 207, 153, 25, 255, 122, 112, 99, 255, 0, 0, 0, 0, + 163, 153, 134, 255, 249, 240, 190, 255, 248, 237, 182, 255, 250, 238, 176, 255, 250, 235, 164, 255, 251, 230, 149, 255, 252, 225, 137, 255, 252, 220, 125, 255, 249, 213, 113, 255, 247, 205, 101, 255, 243, 196, 88, 255, 239, 185, 73, 255, 231, 169, 53, 255, 199, 143, 12, 255, 107, 99, 87, 255, 0, 0, 0, 0, + 159, 149, 131, 255, 249, 240, 190, 255, 247, 240, 171, 255, 251, 236, 165, 255, 251, 231, 152, 255, 252, 225, 137, 255, 251, 221, 127, 255, 249, 213, 113, 255, 247, 205, 101, 255, 243, 196, 88, 255, 240, 187, 75, 255, 236, 178, 61, 255, 227, 164, 44, 255, 191, 138, 12, 255, 92, 83, 73, 255, 0, 0, 0, 0, + 156, 145, 128, 255, 248, 237, 182, 255, 251, 236, 170, 255, 251, 232, 155, 255, 252, 227, 143, 255, 251, 221, 129, 255, 249, 213, 113, 255, 247, 206, 104, 255, 244, 197, 91, 255, 240, 188, 77, 255, 236, 178, 61, 255, 232, 169, 50, 255, 226, 158, 36, 255, 180, 130, 16, 255, 75, 67, 59, 255, 0, 0, 0, 0, + 152, 142, 125, 255, 246, 234, 176, 255, 251, 233, 159, 255, 252, 228, 146, 255, 251, 221, 129, 255, 250, 214, 117, 255, 247, 206, 104, 255, 244, 198, 93, 255, 240, 188, 77, 255, 236, 180, 65, 255, 232, 170, 53, 255, 230, 163, 42, 255, 220, 150, 29, 255, 169, 124, 21, 255, 59, 52, 45, 255, 0, 0, 0, 0, + 149, 138, 122, 255, 246, 232, 170, 255, 252, 229, 149, 255, 251, 223, 132, 255, 250, 214, 117, 255, 247, 208, 106, 255, 244, 198, 93, 255, 240, 190, 80, 255, 236, 180, 65, 255, 232, 170, 53, 255, 230, 164, 43, 255, 223, 154, 32, 255, 215, 144, 22, 255, 159, 119, 27, 255, 45, 39, 32, 255, 0, 0, 0, 0, + 146, 135, 119, 255, 240, 223, 162, 255, 234, 205, 112, 255, 226, 184, 73, 255, 219, 174, 55, 255, 217, 169, 45, 255, 210, 161, 38, 255, 199, 152, 33, 255, 188, 142, 32, 255, 174, 131, 30, 255, 171, 127, 25, 255, 169, 124, 21, 255, 159, 119, 27, 255, 150, 114, 31, 255, 33, 28, 22, 255, 0, 0, 0, 0, + 143, 132, 117, 255, 133, 122, 108, 255, 119, 109, 96, 255, 102, 93, 81, 255, 84, 76, 66, 255, 65, 58, 49, 255, 48, 42, 35, 255, 33, 28, 22, 255, 24, 19, 14, 255, 24, 19, 14, 255, 24, 19, 14, 255, 24, 19, 14, 255, 24, 19, 14, 255, 24, 19, 14, 255, 24, 19, 14, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ToolsSortAscend(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 79, 123, 202, 24, 72, 112, 191, 245, 58, 96, 163, 22, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 73, 114, 193, 170, 69, 107, 183, 255, 58, 88, 151, 117, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 70, 109, 185, 222, 67, 102, 175, 225, 51, 83, 140, 233, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 71, 112, 192, 66, 69, 107, 183, 247, 60, 93, 157, 40, 51, 80, 137, 255, 58, 89, 152, 80, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 69, 107, 183, 203, 66, 101, 174, 218, 54, 86, 146, 150, 52, 82, 139, 244, 55, 86, 147, 193, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 69, 107, 183, 3, 69, 106, 183, 241, 69, 107, 183, 24, 255, 255, 255, 0, 57, 90, 153, 77, 51, 79, 136, 255, 55, 90, 150, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 68, 106, 182, 198, 55, 85, 145, 248, 57, 87, 147, 100, 58, 86, 152, 10, 51, 79, 137, 239, 51, 79, 136, 255, 51, 79, 135, 209, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 149, 88, 111, 173, 149, 85, 105, 185, 151, 91, 114, 157, 149, 90, 112, 186, 145, 71, 77, 209, 140, 51, 41, 100, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 147, 73, 81, 182, 255, 255, 255, 0, 155, 89, 100, 23, 149, 73, 76, 232, 125, 46, 37, 222, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 151, 70, 70, 22, 255, 255, 255, 0, 153, 82, 95, 153, 126, 47, 37, 255, 128, 47, 39, 86, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 129, 0, 0, 0, 75, 0, 0, 0, 255, 0, 0, 0, 69, 0, 0, 0, 138, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 156, 88, 107, 67, 146, 71, 77, 255, 126, 47, 38, 170, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 51, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 66, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 149, 91, 114, 224, 138, 52, 41, 232, 133, 55, 44, 23, 255, 255, 255, 0, 148, 65, 65, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 180, 0, 0, 0, 255, 0, 0, 0, 198, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 152, 87, 107, 141, 143, 63, 62, 255, 136, 50, 40, 101, 255, 255, 255, 0, 146, 73, 61, 21, 138, 51, 40, 165, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 51, 0, 0, 0, 255, 0, 0, 0, 66, 255, 255, 255, 0, 255, 255, 255, 0, + 148, 71, 77, 43, 136, 51, 41, 244, 119, 44, 34, 245, 125, 46, 38, 155, 131, 49, 38, 168, 121, 45, 36, 234, 123, 45, 36, 157, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 123, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MediaReverse(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 2, 95, 147, 237, 36, 87, 135, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 3, 94, 144, 235, 40, 95, 139, 224, 255, 83, 128, 214, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 3, 96, 140, 228, 61, 92, 138, 224, 250, 165, 191, 255, 255, 79, 123, 208, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 3, 96, 140, 228, 63, 88, 135, 223, 255, 165, 191, 255, 255, 105, 154, 255, 255, 74, 117, 200, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 3, 96, 140, 228, 63, 85, 133, 222, 255, 165, 191, 255, 255, 133, 174, 255, 255, 79, 137, 253, 255, 68, 111, 192, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 64, 114, 205, 66, 83, 132, 221, 255, 162, 189, 255, 255, 136, 174, 255, 255, 104, 156, 249, 255, 62, 126, 249, 255, 63, 104, 183, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 27, 76, 171, 81, 62, 115, 219, 255, 103, 156, 251, 255, 79, 138, 246, 255, 44, 113, 238, 255, 56, 96, 175, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 27, 76, 169, 74, 47, 100, 207, 255, 52, 114, 232, 255, 36, 106, 242, 255, 51, 89, 166, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 27, 76, 169, 60, 48, 98, 200, 255, 29, 102, 245, 255, 45, 83, 158, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 26, 74, 167, 69, 47, 101, 211, 255, 40, 77, 150, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 106, 58, 2, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 27, 76, 172, 77, 36, 72, 144, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 27, 75, 168, 3, 26, 75, 173, 78, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_EditUndo(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 180, 246, 92, 147, 179, 245, 184, 158, 187, 245, 226, 167, 193, 245, 196, 169, 193, 245, 148, 170, 194, 245, 26, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 142, 176, 245, 184, 142, 176, 245, 252, 139, 174, 245, 231, 129, 168, 244, 227, 127, 164, 244, 220, 157, 185, 245, 227, 170, 194, 245, 242, 170, 194, 245, 26, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 139, 170, 234, 255, 166, 200, 245, 48, 255, 255, 255, 0, 139, 174, 245, 166, 143, 177, 246, 251, 101, 146, 238, 236, 68, 112, 200, 251, 59, 101, 183, 252, 55, 96, 180, 247, 71, 120, 221, 241, 153, 183, 245, 236, 170, 194, 245, 217, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 170, 194, 245, 9, 129, 164, 233, 255, 158, 192, 245, 213, 127, 168, 245, 128, 144, 178, 246, 252, 94, 140, 231, 254, 69, 112, 199, 255, 62, 104, 187, 250, 53, 93, 172, 199, 68, 111, 181, 225, 57, 95, 167, 252, 86, 136, 238, 249, 165, 192, 245, 223, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 115, 153, 231, 255, 106, 154, 243, 255, 113, 156, 244, 255, 89, 140, 241, 232, 58, 99, 180, 253, 56, 97, 176, 248, 53, 93, 169, 111, 255, 255, 255, 0, 80, 125, 183, 36, 49, 88, 163, 232, 69, 119, 219, 239, 128, 165, 244, 188, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 98, 142, 230, 255, 75, 130, 236, 255, 91, 141, 243, 255, 118, 156, 236, 255, 40, 75, 146, 171, 52, 92, 168, 65, 255, 255, 255, 0, 255, 255, 255, 0, 32, 64, 126, 3, 62, 106, 194, 251, 69, 118, 220, 235, 128, 169, 244, 194, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 82, 131, 229, 255, 54, 115, 223, 255, 73, 130, 234, 255, 106, 154, 243, 255, 97, 140, 226, 255, 126, 163, 237, 57, 255, 255, 255, 0, 255, 255, 255, 0, 32, 64, 126, 5, 62, 105, 194, 253, 74, 126, 230, 246, 131, 169, 244, 180, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 66, 120, 227, 255, 64, 114, 214, 255, 58, 105, 199, 255, 52, 95, 182, 255, 49, 90, 173, 255, 40, 76, 149, 255, 255, 255, 255, 0, 255, 255, 255, 0, 54, 94, 175, 34, 61, 105, 193, 254, 80, 132, 235, 253, 112, 151, 227, 117, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 170, 194, 245, 9, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 39, 74, 146, 71, 69, 118, 219, 252, 102, 147, 239, 254, 141, 176, 245, 6, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 56, 100, 190, 209, 84, 136, 240, 254, 86, 126, 207, 109, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 94, 142, 239, 34, 64, 111, 208, 92, 79, 132, 240, 254, 78, 121, 212, 246, 42, 80, 155, 1, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 72, 123, 227, 67, 79, 132, 242, 250, 72, 116, 209, 249, 51, 90, 170, 74, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 90, 141, 243, 89, 67, 116, 214, 129, 53, 92, 174, 21, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ToolsSettings(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 132, 191, 48, 0, 0, 0, 4, 132, 132, 191, 128, 132, 132, 191, 255, 119, 119, 171, 125, 0, 0, 0, 10, 132, 132, 191, 48, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 132, 132, 191, 16, 132, 132, 191, 207, 132, 132, 191, 255, 97, 97, 141, 109, 129, 129, 187, 197, 132, 132, 191, 255, 113, 113, 162, 227, 86, 86, 124, 148, 132, 132, 191, 255, 129, 129, 185, 215, 55, 55, 80, 38, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 132, 132, 191, 226, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 123, 123, 175, 242, 0, 0, 0, 124, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 0, + 132, 132, 191, 16, 132, 132, 191, 207, 125, 125, 182, 166, 131, 131, 187, 228, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 121, 121, 173, 247, 97, 97, 141, 215, 129, 129, 187, 214, 62, 62, 90, 34, 0, 0, 0, 1, + 132, 132, 189, 113, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 85, 85, 121, 226, 10, 10, 15, 186, 0, 0, 0, 169, 23, 23, 33, 178, 86, 86, 125, 218, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 83, 83, 119, 178, 0, 0, 0, 37, + 85, 85, 121, 25, 113, 113, 164, 185, 132, 132, 191, 255, 132, 132, 191, 255, 77, 77, 109, 222, 0, 0, 0, 169, 0, 0, 0, 103, 0, 0, 0, 43, 0, 0, 0, 28, 0, 0, 0, 49, 94, 94, 135, 180, 132, 132, 191, 255, 132, 132, 191, 255, 93, 93, 133, 228, 10, 10, 15, 170, 0, 0, 0, 79, + 132, 132, 191, 128, 127, 127, 182, 202, 132, 132, 191, 255, 125, 125, 182, 250, 0, 0, 0, 178, 0, 0, 0, 96, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 54, 54, 78, 39, 132, 132, 191, 255, 132, 132, 191, 255, 107, 107, 155, 237, 89, 89, 128, 191, 0, 0, 0, 45, + 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 107, 107, 155, 237, 0, 0, 0, 155, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 127, 127, 182, 202, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 0, 0, 0, 103, + 125, 125, 182, 183, 116, 116, 169, 235, 132, 132, 191, 255, 127, 127, 182, 251, 0, 0, 0, 140, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 132, 191, 240, 132, 132, 191, 255, 113, 113, 162, 242, 99, 99, 144, 232, 0, 0, 0, 172, + 0, 0, 0, 16, 99, 99, 144, 191, 132, 132, 191, 255, 132, 132, 191, 255, 75, 75, 108, 199, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 132, 191, 112, 132, 132, 191, 255, 132, 132, 191, 255, 77, 77, 109, 220, 0, 0, 0, 154, 0, 0, 0, 125, + 132, 132, 191, 96, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 93, 93, 133, 162, 0, 0, 0, 21, 0, 0, 0, 0, 132, 132, 191, 16, 132, 132, 191, 128, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 77, 77, 109, 168, 0, 0, 0, 37, + 89, 89, 128, 24, 132, 132, 189, 243, 115, 115, 166, 238, 113, 113, 162, 242, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 125, 125, 182, 200, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 129, 129, 185, 249, 111, 111, 162, 243, 127, 127, 182, 251, 10, 10, 15, 169, 0, 0, 0, 70, + 0, 0, 0, 1, 0, 0, 0, 37, 0, 0, 0, 134, 119, 119, 171, 234, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 132, 132, 191, 255, 111, 111, 162, 243, 0, 0, 0, 176, 0, 0, 0, 146, 0, 0, 0, 134, 0, 0, 0, 39, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 22, 131, 131, 187, 228, 132, 132, 191, 255, 77, 77, 109, 221, 113, 113, 164, 241, 132, 132, 191, 255, 113, 113, 162, 242, 85, 85, 121, 225, 132, 132, 191, 255, 121, 121, 173, 246, 0, 0, 0, 145, 0, 0, 0, 39, 0, 0, 0, 22, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 63, 63, 92, 167, 0, 0, 0, 160, 105, 105, 150, 202, 132, 132, 191, 255, 85, 85, 121, 223, 0, 0, 0, 152, 64, 64, 92, 163, 0, 0, 0, 161, 0, 0, 0, 127, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 61, 0, 0, 0, 34, 0, 0, 0, 118, 0, 0, 0, 172, 0, 0, 0, 110, 0, 0, 0, 34, 0, 0, 0, 61, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_FileSaveAll(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 165, 164, 221, 255, 161, 161, 218, 255, 154, 153, 216, 255, 148, 147, 212, 255, 140, 139, 208, 255, 131, 130, 204, 255, 123, 122, 199, 255, 115, 115, 196, 255, 108, 106, 192, 255, 94, 92, 175, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 161, 161, 218, 255, 190, 189, 255, 255, 147, 146, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 247, 251, 255, 135, 138, 214, 255, 116, 116, 162, 255, 87, 86, 169, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 165, 164, 221, 255, 161, 161, 218, 255, 154, 153, 216, 255, 148, 147, 212, 255, 140, 139, 208, 255, 131, 130, 204, 255, 123, 122, 199, 255, 117, 117, 197, 255, 113, 111, 194, 255, 101, 99, 178, 255, 116, 117, 178, 255, 86, 85, 168, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 161, 161, 218, 255, 190, 189, 255, 255, 147, 146, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 247, 250, 255, 157, 159, 222, 255, 114, 114, 160, 255, 80, 79, 158, 255, 108, 110, 194, 255, 82, 81, 163, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 165, 164, 221, 255, 161, 161, 218, 255, 154, 153, 216, 255, 148, 147, 212, 255, 140, 139, 208, 255, 131, 130, 204, 255, 123, 122, 199, 255, 115, 115, 196, 255, 110, 108, 191, 255, 97, 95, 180, 255, 95, 96, 168, 255, 80, 79, 158, 255, 97, 101, 186, 255, 79, 78, 156, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 161, 161, 218, 255, 190, 189, 255, 255, 147, 146, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 242, 244, 249, 255, 96, 99, 201, 255, 65, 65, 127, 255, 85, 84, 168, 255, 109, 112, 196, 255, 78, 77, 155, 255, 86, 92, 178, 255, 74, 73, 148, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 155, 153, 216, 255, 185, 184, 251, 255, 134, 133, 235, 255, 255, 255, 255, 255, 255, 255, 255, 255, 242, 244, 249, 255, 222, 229, 240, 255, 80, 91, 193, 255, 92, 93, 166, 255, 81, 80, 159, 255, 98, 102, 188, 255, 75, 74, 150, 255, 77, 83, 171, 255, 70, 69, 139, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 148, 146, 212, 255, 178, 178, 247, 255, 116, 115, 217, 255, 255, 255, 255, 255, 242, 244, 249, 255, 222, 228, 240, 255, 203, 212, 231, 255, 57, 79, 181, 255, 108, 110, 194, 255, 78, 77, 155, 255, 87, 93, 180, 255, 72, 71, 143, 255, 68, 75, 166, 255, 66, 65, 131, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 140, 139, 208, 255, 170, 171, 240, 255, 115, 117, 210, 255, 96, 99, 201, 255, 80, 90, 193, 255, 56, 79, 181, 255, 33, 67, 169, 255, 42, 72, 172, 255, 97, 101, 186, 255, 75, 74, 150, 255, 78, 84, 173, 255, 68, 67, 136, 255, 61, 68, 160, 255, 61, 60, 122, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 132, 131, 204, 255, 161, 162, 234, 255, 152, 153, 227, 255, 141, 143, 219, 255, 130, 133, 212, 255, 120, 123, 203, 255, 108, 113, 196, 255, 98, 103, 188, 255, 86, 92, 178, 255, 72, 71, 143, 255, 68, 75, 167, 255, 65, 64, 129, 255, 58, 57, 116, 255, 58, 57, 116, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 123, 122, 199, 255, 152, 153, 227, 255, 142, 143, 220, 255, 64, 77, 96, 255, 64, 77, 96, 255, 64, 77, 96, 255, 70, 83, 100, 255, 70, 83, 100, 255, 77, 83, 171, 255, 68, 67, 136, 255, 61, 68, 161, 255, 61, 60, 122, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 115, 115, 196, 255, 142, 143, 219, 255, 130, 133, 212, 255, 64, 77, 96, 255, 92, 99, 106, 255, 165, 174, 182, 255, 199, 207, 209, 255, 72, 85, 103, 255, 68, 75, 166, 255, 65, 64, 128, 255, 58, 57, 116, 255, 58, 57, 116, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 107, 107, 192, 255, 131, 134, 211, 255, 76, 95, 187, 255, 60, 71, 82, 255, 120, 126, 134, 255, 207, 212, 219, 255, 175, 182, 183, 255, 61, 66, 73, 255, 61, 68, 160, 255, 61, 60, 121, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 102, 101, 189, 101, 89, 88, 176, 239, 89, 88, 176, 255, 85, 85, 169, 255, 80, 80, 160, 255, 76, 74, 149, 255, 69, 68, 137, 255, 63, 63, 126, 255, 58, 57, 116, 255, 58, 57, 116, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MessageInfo(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 153, 222, 50, 123, 163, 226, 126, 127, 167, 234, 151, 118, 160, 234, 145, 100, 144, 218, 134, 106, 139, 198, 109, 121, 143, 185, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 107, 149, 217, 1, 114, 159, 223, 109, 141, 179, 231, 204, 196, 220, 246, 254, 218, 231, 249, 255, 224, 234, 252, 255, 222, 231, 246, 255, 192, 205, 226, 255, 138, 159, 196, 203, 83, 111, 160, 129, 98, 124, 168, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 102, 144, 213, 3, 114, 156, 222, 129, 169, 199, 236, 253, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 240, 245, 252, 255, 239, 245, 251, 255, 255, 255, 255, 255, 241, 244, 248, 255, 167, 182, 205, 255, 80, 108, 154, 189, 90, 116, 160, 22, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 105, 147, 212, 89, 146, 179, 226, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 231, 237, 246, 255, 57, 109, 199, 255, 52, 102, 187, 255, 235, 238, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 157, 172, 195, 255, 74, 102, 149, 172, 88, 114, 157, 12, 0, 0, 0, 0, + 100, 138, 202, 16, 119, 154, 208, 190, 222, 231, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 251, 253, 255, 133, 162, 213, 255, 133, 160, 209, 255, 248, 249, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 255, 100, 123, 161, 251, 75, 104, 149, 87, 0, 0, 0, 0, + 99, 134, 194, 87, 139, 162, 203, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 230, 234, 246, 255, 208, 219, 235, 255, 228, 235, 242, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 249, 249, 255, 255, 255, 247, 255, 185, 191, 203, 255, 74, 102, 148, 194, 0, 0, 0, 0, + 88, 121, 177, 121, 148, 169, 203, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 175, 193, 223, 255, 47, 93, 185, 255, 79, 116, 188, 255, 233, 237, 243, 255, 255, 255, 255, 255, 252, 251, 252, 255, 252, 248, 243, 255, 216, 214, 217, 255, 82, 107, 150, 229, 0, 0, 0, 0, + 87, 121, 181, 105, 151, 171, 206, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 203, 216, 232, 255, 55, 90, 194, 255, 63, 98, 183, 255, 227, 235, 238, 255, 255, 255, 255, 255, 253, 253, 252, 255, 247, 245, 241, 255, 228, 224, 222, 255, 85, 111, 152, 228, 0, 0, 0, 0, + 91, 125, 184, 91, 141, 164, 203, 254, 253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 208, 220, 234, 255, 60, 91, 188, 255, 72, 103, 181, 255, 232, 239, 241, 255, 255, 255, 255, 255, 251, 252, 252, 255, 243, 241, 236, 255, 216, 216, 215, 255, 82, 108, 151, 233, 0, 0, 0, 0, + 110, 138, 184, 63, 128, 150, 190, 243, 250, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 214, 225, 237, 255, 59, 82, 185, 255, 76, 100, 181, 255, 243, 249, 246, 255, 255, 255, 255, 255, 242, 243, 243, 255, 246, 242, 233, 255, 184, 188, 196, 255, 71, 100, 147, 214, 0, 0, 0, 0, + 138, 159, 195, 10, 116, 140, 181, 189, 185, 196, 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 198, 212, 234, 255, 23, 50, 170, 255, 38, 66, 165, 255, 227, 237, 242, 255, 255, 255, 255, 255, 237, 235, 233, 255, 246, 241, 228, 255, 105, 126, 159, 255, 71, 100, 147, 137, 0, 0, 0, 0, + 0, 0, 0, 0, 114, 139, 181, 63, 122, 144, 182, 243, 241, 245, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 165, 183, 216, 255, 41, 79, 165, 255, 44, 80, 162, 255, 173, 188, 215, 255, 255, 252, 241, 255, 255, 247, 232, 255, 167, 174, 186, 255, 66, 95, 143, 217, 85, 111, 155, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 109, 133, 174, 96, 136, 153, 183, 250, 228, 232, 232, 255, 255, 255, 250, 255, 253, 249, 243, 255, 244, 249, 238, 255, 244, 244, 236, 255, 243, 237, 232, 255, 249, 242, 228, 255, 177, 181, 190, 255, 72, 100, 145, 239, 73, 101, 148, 69, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 115, 158, 74, 94, 120, 159, 210, 126, 144, 172, 255, 201, 205, 209, 255, 247, 243, 229, 255, 240, 236, 224, 255, 191, 194, 198, 255, 117, 134, 164, 254, 72, 99, 145, 198, 75, 103, 148, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 104, 151, 30, 74, 101, 148, 123, 59, 90, 140, 195, 45, 78, 131, 200, 47, 80, 133, 198, 65, 94, 142, 175, 75, 102, 147, 92, 70, 98, 145, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ZoomActualSize(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 174, 190, 212, 255, 169, 185, 207, 255, 164, 179, 201, 255, 164, 179, 201, 139, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 178, 194, 216, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 156, 171, 192, 255, 54, 74, 100, 255, 164, 179, 201, 139, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 175, 191, 213, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 149, 164, 185, 255, 186, 197, 212, 255, 54, 74, 100, 255, 164, 179, 201, 140, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 171, 187, 209, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 147, 162, 183, 255, 54, 74, 100, 255, 54, 74, 100, 255, 54, 74, 100, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 167, 182, 204, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 250, 246, 255, 193, 197, 193, 255, 151, 159, 161, 255, 132, 141, 145, 255, 136, 145, 149, 255, 60, 77, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 163, 178, 200, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 248, 246, 255, 178, 184, 184, 255, 188, 194, 196, 255, 231, 235, 236, 255, 226, 232, 235, 255, 164, 174, 178, 255, 99, 108, 117, 255, 93, 108, 122, 16, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 158, 174, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 191, 196, 195, 255, 185, 191, 194, 255, 255, 255, 255, 255, 251, 252, 255, 255, 243, 247, 253, 255, 230, 238, 252, 255, 147, 158, 170, 255, 89, 97, 103, 135, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 154, 169, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 150, 158, 161, 255, 229, 233, 235, 255, 251, 252, 255, 255, 243, 247, 253, 255, 232, 240, 251, 255, 217, 229, 250, 255, 179, 195, 216, 255, 88, 92, 92, 221, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 150, 165, 186, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 143, 151, 154, 255, 228, 233, 237, 255, 243, 247, 253, 255, 232, 239, 252, 255, 217, 229, 249, 255, 200, 217, 247, 255, 153, 173, 200, 255, 83, 86, 86, 221, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 174, 178, 179, 255, 178, 185, 191, 255, 231, 239, 251, 255, 217, 230, 250, 255, 199, 218, 247, 255, 181, 205, 244, 255, 109, 119, 127, 255, 88, 90, 90, 151, 145, 133, 117, 132, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 222, 223, 223, 255, 139, 143, 147, 255, 157, 168, 180, 255, 176, 195, 215, 255, 152, 174, 200, 255, 109, 118, 127, 255, 87, 89, 85, 255, 168, 144, 93, 255, 178, 152, 111, 254, 145, 133, 117, 132, 255, 255, 255, 0, + 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 252, 255, 238, 241, 247, 255, 212, 215, 215, 255, 146, 151, 151, 255, 103, 106, 108, 255, 98, 100, 102, 255, 91, 87, 81, 255, 147, 115, 67, 255, 231, 160, 71, 255, 253, 198, 97, 255, 161, 142, 114, 254, 145, 133, 117, 78, + 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 133, 134, 140, 255, 104, 77, 52, 255, 208, 127, 53, 255, 228, 152, 65, 255, 237, 179, 87, 255, 118, 103, 79, 255, + 255, 255, 255, 0, 147, 162, 183, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 70, 74, 84, 255, 103, 76, 51, 255, 189, 119, 56, 255, 102, 72, 45, 255, 89, 76, 55, 81, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 104, 77, 52, 84, 60, 49, 39, 255, 72, 58, 37, 84, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_WindowsCascade(void) +{ + unsigned char imgdata[] = { + 148, 159, 197, 255, 140, 155, 170, 255, 121, 144, 177, 255, 90, 121, 193, 255, 79, 112, 174, 255, 71, 99, 170, 255, 62, 88, 153, 255, 59, 88, 152, 255, 60, 90, 154, 255, 59, 78, 122, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 143, 153, 170, 255, 133, 172, 251, 255, 101, 145, 237, 255, 86, 130, 226, 255, 79, 125, 223, 255, 70, 116, 219, 255, 64, 110, 217, 255, 56, 105, 212, 255, 54, 105, 217, 255, 65, 75, 87, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 142, 155, 171, 255, 254, 254, 254, 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 249, 254, 255, 255, 240, 249, 252, 255, 241, 253, 254, 255, 65, 75, 87, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 140, 153, 171, 255, 255, 254, 255, 255, 255, 255, 255, 255, 253, 254, 255, 255, 248, 249, 255, 255, 240, 243, 252, 255, 230, 237, 252, 255, 221, 232, 253, 255, 223, 237, 255, 255, 65, 75, 87, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 141, 154, 170, 255, 255, 255, 255, 255, 255, 255, 255, 255, 148, 159, 197, 255, 140, 155, 170, 255, 121, 144, 177, 255, 90, 121, 193, 255, 79, 112, 174, 255, 71, 99, 170, 255, 62, 88, 153, 255, 59, 88, 152, 255, 60, 90, 154, 255, 59, 78, 122, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 144, 152, 172, 255, 254, 255, 255, 255, 255, 255, 255, 255, 143, 153, 170, 255, 133, 172, 251, 255, 101, 145, 237, 255, 86, 130, 226, 255, 79, 125, 223, 255, 70, 116, 219, 255, 64, 110, 217, 255, 56, 105, 212, 255, 54, 105, 217, 255, 65, 75, 87, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 141, 154, 172, 255, 255, 255, 255, 255, 255, 255, 253, 255, 142, 155, 171, 255, 254, 254, 254, 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 249, 254, 255, 255, 240, 249, 252, 255, 241, 253, 254, 255, 65, 75, 87, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 125, 135, 145, 255, 80, 80, 82, 255, 81, 84, 89, 255, 140, 153, 171, 255, 255, 254, 255, 255, 255, 255, 255, 255, 253, 254, 255, 255, 248, 249, 255, 255, 240, 243, 252, 255, 230, 237, 252, 255, 221, 232, 253, 255, 223, 237, 255, 255, 65, 75, 87, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 141, 154, 170, 255, 255, 255, 255, 255, 255, 255, 255, 255, 148, 159, 197, 255, 140, 155, 170, 255, 121, 144, 177, 255, 90, 121, 193, 255, 79, 112, 174, 255, 71, 99, 170, 255, 62, 88, 153, 255, 59, 88, 152, 255, 60, 90, 154, 255, 59, 78, 122, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 144, 152, 172, 255, 254, 255, 255, 255, 255, 255, 255, 255, 143, 153, 170, 255, 133, 172, 251, 255, 101, 145, 237, 255, 86, 130, 226, 255, 79, 125, 223, 255, 70, 116, 219, 255, 64, 110, 217, 255, 56, 105, 212, 255, 54, 105, 217, 255, 65, 75, 87, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 141, 154, 172, 255, 255, 255, 255, 255, 255, 255, 253, 255, 142, 155, 171, 255, 254, 254, 254, 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 249, 254, 255, 255, 240, 249, 252, 255, 241, 253, 254, 255, 65, 75, 87, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 125, 135, 145, 255, 80, 80, 82, 255, 81, 84, 89, 255, 140, 153, 171, 255, 255, 254, 255, 255, 255, 255, 255, 255, 253, 254, 255, 255, 248, 249, 255, 255, 240, 243, 252, 255, 230, 237, 252, 255, 221, 232, 253, 255, 223, 237, 255, 255, 65, 75, 87, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 141, 154, 170, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 251, 255, 255, 242, 246, 254, 255, 236, 241, 252, 255, 226, 236, 252, 255, 214, 227, 249, 255, 213, 231, 254, 255, 65, 75, 87, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 144, 152, 172, 255, 254, 255, 255, 255, 255, 255, 255, 255, 244, 248, 254, 255, 237, 242, 255, 255, 227, 235, 252, 255, 217, 230, 252, 255, 206, 224, 252, 255, 207, 226, 255, 255, 65, 75, 87, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 141, 154, 172, 255, 255, 255, 255, 255, 255, 255, 253, 255, 247, 253, 255, 255, 237, 248, 255, 255, 224, 241, 254, 255, 213, 234, 253, 255, 204, 229, 252, 255, 207, 234, 255, 255, 65, 75, 87, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 125, 135, 145, 255, 80, 80, 82, 255, 81, 84, 89, 255, 77, 82, 88, 255, 73, 80, 88, 255, 71, 78, 88, 255, 68, 76, 87, 255, 64, 74, 86, 255, 66, 76, 88, 255, 58, 65, 75, 255}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_EditCopy(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 178, 194, 216, 255, 178, 194, 216, 255, 174, 191, 212, 255, 174, 191, 212, 255, 169, 184, 206, 255, 163, 178, 200, 255, 139, 155, 178, 73, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 178, 194, 216, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 162, 177, 199, 255, 102, 130, 165, 255, 54, 74, 100, 48, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 175, 190, 212, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 254, 255, 150, 166, 187, 255, 186, 197, 212, 255, 91, 114, 143, 255, 54, 74, 100, 48, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 169, 185, 207, 255, 255, 255, 255, 255, 186, 218, 255, 255, 174, 208, 255, 255, 210, 222, 240, 255, 147, 162, 183, 255, 174, 196, 240, 255, 171, 194, 239, 255, 170, 193, 239, 255, 160, 185, 239, 255, 146, 176, 237, 255, 146, 176, 237, 255, 95, 141, 230, 60, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 163, 178, 199, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 252, 255, 240, 242, 248, 255, 230, 234, 243, 255, 174, 196, 240, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 133, 167, 235, 255, 53, 101, 197, 255, 53, 101, 197, 60, 255, 255, 255, 0, 255, 255, 255, 0, + 156, 171, 193, 255, 255, 255, 255, 255, 159, 197, 250, 255, 142, 184, 240, 255, 129, 174, 229, 255, 115, 161, 222, 255, 166, 189, 236, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 114, 154, 234, 255, 178, 201, 240, 255, 43, 87, 177, 255, 43, 87, 177, 60, 255, 255, 255, 0, + 151, 166, 187, 255, 252, 253, 254, 255, 245, 246, 251, 255, 235, 239, 246, 255, 224, 230, 241, 255, 214, 222, 236, 255, 156, 181, 231, 255, 255, 255, 255, 255, 138, 174, 252, 255, 138, 174, 252, 255, 210, 219, 241, 255, 96, 142, 231, 255, 42, 87, 179, 255, 41, 84, 172, 255, 39, 80, 164, 255, 255, 255, 255, 0, + 147, 162, 183, 255, 247, 248, 251, 255, 129, 174, 229, 255, 115, 161, 222, 255, 110, 156, 218, 255, 104, 151, 213, 255, 144, 170, 224, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 240, 244, 251, 255, 219, 228, 247, 255, 197, 211, 242, 255, 154, 174, 204, 255, 37, 77, 157, 255, 255, 255, 255, 0, + 147, 162, 183, 255, 240, 243, 248, 255, 215, 223, 234, 255, 207, 217, 230, 255, 199, 210, 225, 255, 191, 203, 221, 255, 130, 159, 216, 255, 255, 255, 255, 255, 127, 167, 243, 255, 110, 151, 231, 255, 92, 140, 218, 255, 81, 131, 209, 255, 81, 131, 209, 255, 154, 174, 202, 255, 37, 74, 152, 255, 255, 255, 255, 0, + 147, 162, 183, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 115, 146, 209, 255, 255, 255, 255, 255, 251, 253, 254, 255, 234, 239, 251, 255, 211, 222, 245, 255, 190, 206, 240, 255, 175, 195, 237, 255, 153, 172, 199, 255, 35, 71, 146, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 100, 133, 201, 255, 255, 255, 255, 255, 92, 140, 218, 255, 81, 131, 209, 255, 81, 131, 209, 255, 81, 131, 209, 255, 81, 131, 209, 255, 152, 171, 198, 255, 34, 69, 142, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 85, 121, 193, 255, 246, 249, 253, 255, 156, 176, 206, 255, 155, 175, 204, 255, 154, 173, 202, 255, 153, 172, 199, 255, 152, 171, 198, 255, 151, 169, 196, 255, 33, 67, 137, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 71, 110, 186, 255, 41, 84, 170, 255, 41, 84, 170, 255, 39, 80, 162, 255, 37, 76, 155, 255, 35, 72, 150, 255, 34, 70, 143, 255, 33, 67, 138, 255, 32, 65, 134, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_FileOpen(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 133, 148, 164, 67, 129, 145, 166, 255, 120, 137, 161, 255, 135, 149, 170, 255, 123, 140, 160, 124, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 116, 149, 255, 83, 105, 141, 92, 255, 255, 255, 0, 109, 121, 158, 21, 130, 145, 166, 255, 117, 132, 159, 85, 95, 116, 148, 255, + 172, 164, 143, 87, 172, 164, 143, 255, 172, 164, 143, 255, 172, 164, 143, 255, 172, 164, 143, 255, 172, 164, 143, 255, 182, 169, 136, 141, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 106, 123, 152, 77, 84, 107, 141, 255, 79, 105, 144, 255, + 172, 164, 143, 255, 218, 210, 160, 255, 247, 240, 171, 255, 247, 240, 171, 255, 249, 238, 166, 255, 251, 235, 159, 255, 170, 161, 141, 255, 176, 164, 132, 130, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 83, 106, 142, 255, 79, 104, 145, 255, 76, 103, 147, 255, + 171, 162, 142, 255, 246, 238, 167, 255, 247, 240, 171, 255, 249, 238, 166, 255, 251, 235, 159, 255, 253, 232, 152, 255, 251, 212, 113, 255, 167, 158, 137, 255, 163, 153, 134, 255, 159, 148, 130, 255, 154, 144, 126, 255, 151, 140, 122, 255, 147, 136, 119, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 168, 160, 139, 255, 246, 234, 160, 255, 249, 238, 166, 255, 251, 235, 159, 255, 254, 232, 152, 255, 255, 218, 122, 255, 255, 212, 103, 255, 255, 212, 103, 255, 255, 212, 103, 255, 255, 212, 103, 255, 255, 212, 103, 255, 255, 212, 103, 255, 147, 136, 119, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 165, 156, 136, 255, 243, 230, 154, 255, 251, 235, 159, 255, 254, 232, 152, 255, 185, 172, 139, 255, 185, 172, 139, 255, 183, 170, 138, 255, 179, 166, 136, 255, 175, 163, 134, 255, 170, 159, 131, 255, 166, 154, 129, 255, 161, 149, 127, 255, 157, 145, 124, 255, 153, 142, 122, 255, 149, 139, 121, 255, 147, 136, 119, 255, + 163, 154, 134, 255, 242, 225, 146, 255, 253, 232, 152, 255, 222, 196, 128, 255, 176, 167, 142, 255, 253, 222, 129, 255, 255, 224, 132, 255, 255, 224, 132, 255, 255, 224, 132, 255, 255, 224, 132, 255, 255, 223, 129, 255, 255, 221, 123, 255, 255, 216, 116, 255, 255, 214, 107, 255, 209, 169, 86, 255, 111, 98, 78, 162, + 159, 149, 131, 255, 241, 220, 137, 255, 255, 226, 140, 255, 177, 168, 141, 255, 199, 186, 140, 255, 255, 216, 116, 255, 255, 212, 103, 255, 255, 212, 103, 255, 255, 212, 103, 255, 255, 208, 95, 255, 255, 205, 84, 255, 252, 197, 75, 255, 247, 187, 65, 255, 219, 162, 46, 255, 108, 94, 71, 241, 111, 98, 78, 43, + 156, 145, 128, 255, 239, 215, 129, 255, 224, 197, 125, 255, 176, 166, 140, 255, 254, 221, 128, 255, 255, 211, 104, 255, 255, 212, 103, 255, 255, 209, 98, 255, 255, 205, 88, 255, 252, 199, 78, 255, 247, 190, 70, 255, 242, 182, 59, 255, 236, 172, 49, 255, 129, 105, 37, 255, 89, 68, 20, 144, 255, 255, 255, 0, + 152, 142, 125, 255, 236, 210, 121, 255, 173, 164, 139, 255, 206, 194, 137, 255, 255, 216, 113, 255, 255, 211, 101, 255, 255, 206, 92, 255, 254, 201, 81, 255, 250, 193, 73, 255, 245, 185, 63, 255, 238, 176, 52, 255, 233, 168, 41, 255, 205, 133, 16, 255, 91, 75, 34, 255, 52, 39, 14, 39, 255, 255, 255, 0, + 149, 138, 122, 255, 211, 190, 126, 255, 174, 164, 138, 255, 255, 220, 126, 255, 255, 207, 95, 255, 255, 203, 85, 255, 250, 196, 76, 255, 245, 188, 65, 255, 240, 179, 55, 255, 235, 170, 46, 255, 229, 160, 36, 255, 212, 140, 19, 255, 128, 103, 35, 255, 48, 42, 27, 180, 255, 255, 255, 0, 255, 255, 255, 0, + 146, 135, 119, 255, 171, 161, 137, 255, 212, 178, 106, 255, 205, 143, 0, 255, 205, 143, 0, 255, 205, 143, 0, 255, 199, 140, 4, 255, 190, 136, 8, 255, 180, 130, 15, 255, 169, 124, 21, 255, 159, 119, 27, 255, 150, 114, 31, 255, 91, 74, 33, 254, 55, 48, 30, 74, 255, 255, 255, 0, 255, 255, 255, 0, + 143, 132, 117, 255, 143, 128, 102, 255, 135, 121, 96, 255, 123, 110, 87, 255, 111, 98, 78, 255, 97, 86, 68, 255, 82, 72, 57, 255, 67, 58, 46, 255, 53, 46, 37, 255, 41, 34, 27, 255, 30, 25, 20, 255, 22, 18, 14, 255, 24, 19, 14, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_FileNew(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 103, 248, 255, 255, 84, 216, 255, 155, 0, 255, 255, 211, 0, 255, 255, 254, 79, 223, 255, 255, 88, 250, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 216, 13, 178, 250, 121, 0, 255, 255, 255, 149, 255, 255, 180, 0, 255, 255, 214, 0, 255, 255, 255, 149, 255, 250, 121, 0, 255, 255, 245, 61, 170, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 219, 11, 205, 255, 255, 149, 255, 250, 121, 0, 255, 255, 160, 0, 255, 255, 177, 0, 255, 250, 121, 0, 255, 255, 255, 149, 255, 240, 217, 59, 255, 174, 190, 212, 255, 169, 185, 207, 255, 164, 179, 201, 255, 164, 179, 201, 139, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 250, 140, 0, 255, 255, 149, 0, 255, 255, 145, 0, 255, 255, 255, 255, 255, 255, 255, 168, 255, 255, 180, 0, 255, 255, 154, 0, 255, 255, 168, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 156, 171, 192, 255, 54, 74, 100, 255, 164, 179, 201, 139, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 214, 0, 251, 255, 231, 19, 254, 255, 146, 0, 255, 255, 211, 0, 255, 255, 222, 5, 255, 255, 191, 0, 255, 255, 248, 49, 255, 255, 227, 28, 255, 255, 255, 255, 255, 255, 255, 255, 255, 149, 164, 185, 255, 186, 197, 212, 255, 54, 74, 100, 255, 164, 179, 201, 140, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 252, 76, 203, 255, 255, 149, 255, 250, 121, 0, 255, 255, 168, 0, 255, 255, 180, 0, 255, 250, 121, 0, 255, 255, 255, 149, 255, 255, 255, 127, 255, 255, 255, 255, 255, 255, 255, 255, 255, 147, 162, 183, 255, 54, 74, 100, 255, 54, 74, 100, 255, 54, 74, 100, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 244, 62, 193, 250, 121, 0, 255, 255, 255, 149, 255, 255, 157, 0, 255, 255, 220, 2, 255, 255, 255, 149, 255, 250, 121, 0, 255, 255, 255, 153, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 252, 253, 255, 147, 162, 183, 255, 147, 162, 183, 255, 54, 74, 100, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 237, 44, 124, 255, 219, 14, 150, 255, 174, 0, 255, 255, 228, 31, 255, 255, 237, 121, 255, 255, 244, 155, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 245, 247, 250, 255, 233, 237, 245, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 158, 174, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 252, 255, 238, 241, 247, 255, 225, 231, 241, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 154, 169, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 254, 255, 242, 245, 249, 255, 230, 235, 244, 255, 218, 225, 238, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 150, 165, 186, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 248, 251, 255, 235, 239, 246, 255, 223, 229, 240, 255, 211, 219, 235, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 252, 253, 255, 240, 243, 248, 255, 227, 233, 242, 255, 216, 223, 237, 255, 203, 213, 231, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 245, 247, 250, 255, 233, 237, 245, 255, 220, 227, 239, 255, 209, 217, 234, 255, 196, 207, 228, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 252, 255, 238, 241, 247, 255, 225, 231, 241, 255, 213, 221, 236, 255, 201, 211, 230, 255, 189, 202, 225, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MediaRecord(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 199, 99, 68, 64, 199, 99, 68, 153, 199, 99, 68, 224, 197, 98, 67, 224, 194, 96, 66, 153, 191, 94, 65, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 199, 99, 68, 64, 207, 109, 79, 210, 229, 144, 116, 255, 241, 159, 133, 255, 233, 135, 105, 255, 205, 99, 65, 255, 181, 83, 56, 209, 175, 84, 59, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 199, 99, 68, 153, 229, 144, 116, 255, 255, 197, 178, 255, 250, 180, 157, 255, 242, 151, 122, 255, 230, 115, 77, 255, 188, 76, 43, 255, 156, 72, 52, 153, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 199, 99, 68, 224, 241, 159, 133, 255, 250, 180, 157, 255, 247, 169, 144, 255, 240, 143, 112, 255, 228, 109, 69, 255, 202, 72, 31, 255, 135, 59, 45, 224, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 197, 98, 67, 224, 233, 135, 105, 255, 242, 151, 122, 255, 240, 143, 112, 255, 232, 122, 85, 255, 222, 92, 50, 255, 196, 64, 22, 255, 114, 46, 37, 224, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 194, 96, 66, 153, 205, 99, 65, 255, 230, 115, 77, 255, 228, 109, 69, 255, 222, 92, 50, 255, 214, 71, 24, 255, 153, 48, 20, 255, 95, 34, 30, 153, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 191, 94, 65, 64, 181, 83, 56, 209, 188, 76, 43, 255, 202, 72, 31, 255, 196, 64, 22, 255, 153, 48, 20, 255, 100, 31, 23, 209, 78, 24, 24, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 175, 84, 59, 64, 156, 72, 52, 153, 135, 59, 45, 224, 114, 46, 37, 224, 95, 34, 30, 153, 78, 24, 24, 64, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ActionOk(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 220, 233, 218, 174, 146, 193, 139, 255, 107, 173, 96, 255, 107, 179, 96, 255, 114, 186, 102, 255, 114, 185, 103, 255, 104, 175, 92, 255, 99, 164, 89, 255, 148, 192, 142, 255, 220, 233, 218, 174, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 197, 222, 193, 255, 111, 175, 99, 255, 158, 211, 147, 255, 200, 249, 188, 255, 189, 254, 177, 255, 173, 243, 162, 255, 159, 228, 147, 255, 149, 219, 137, 255, 137, 207, 127, 255, 110, 180, 98, 255, 78, 149, 67, 255, 178, 208, 173, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 199, 223, 195, 255, 117, 182, 106, 255, 198, 242, 186, 255, 212, 255, 200, 255, 186, 253, 174, 255, 167, 237, 154, 255, 152, 223, 140, 255, 142, 213, 132, 255, 137, 207, 125, 255, 132, 201, 121, 255, 130, 201, 119, 255, 119, 187, 106, 255, 69, 142, 58, 255, 170, 202, 165, 255, 255, 255, 255, 0, + 220, 233, 218, 174, 121, 182, 111, 255, 201, 245, 189, 255, 209, 255, 197, 255, 180, 250, 169, 255, 161, 232, 149, 255, 145, 215, 134, 255, 136, 207, 124, 255, 130, 201, 118, 255, 128, 199, 116, 255, 123, 194, 112, 255, 102, 175, 90, 255, 111, 183, 98, 255, 107, 178, 96, 255, 64, 135, 53, 255, 220, 233, 218, 174, + 181, 213, 176, 255, 149, 208, 137, 255, 210, 255, 198, 255, 182, 251, 170, 255, 159, 230, 148, 255, 142, 212, 130, 255, 131, 201, 119, 255, 126, 196, 114, 255, 123, 193, 110, 255, 120, 192, 109, 255, 85, 160, 72, 255, 142, 186, 134, 255, 178, 216, 172, 255, 112, 179, 100, 255, 84, 155, 73, 255, 116, 168, 109, 255, + 114, 178, 105, 255, 190, 247, 178, 255, 187, 254, 175, 255, 162, 232, 150, 255, 144, 214, 132, 255, 130, 201, 118, 255, 123, 194, 111, 255, 119, 191, 109, 255, 118, 189, 106, 255, 81, 157, 70, 255, 129, 178, 121, 255, 252, 253, 252, 255, 249, 252, 248, 255, 123, 183, 114, 255, 91, 162, 80, 255, 76, 144, 66, 255, + 112, 185, 101, 255, 183, 252, 171, 255, 168, 238, 156, 255, 145, 216, 134, 255, 117, 190, 104, 255, 122, 193, 110, 255, 119, 190, 108, 255, 117, 189, 107, 255, 84, 158, 72, 255, 124, 175, 116, 255, 244, 248, 243, 255, 250, 252, 250, 255, 153, 200, 145, 255, 93, 165, 81, 255, 91, 162, 81, 255, 64, 138, 53, 255, + 118, 189, 107, 255, 176, 245, 165, 255, 152, 223, 140, 255, 149, 214, 138, 255, 145, 192, 137, 255, 90, 162, 78, 255, 120, 191, 108, 255, 85, 160, 73, 255, 121, 173, 112, 255, 248, 251, 247, 255, 255, 255, 255, 255, 155, 200, 147, 255, 86, 163, 74, 255, 90, 162, 79, 255, 90, 160, 79, 255, 67, 140, 56, 255, + 111, 181, 100, 255, 162, 232, 150, 255, 136, 209, 124, 255, 205, 236, 200, 255, 251, 252, 251, 255, 130, 177, 122, 255, 71, 148, 59, 255, 120, 172, 111, 255, 246, 249, 246, 255, 254, 254, 254, 255, 155, 202, 150, 255, 86, 162, 73, 255, 90, 162, 79, 255, 87, 158, 77, 255, 85, 156, 75, 255, 65, 138, 55, 255, + 100, 172, 88, 255, 145, 215, 133, 255, 132, 203, 121, 255, 143, 203, 134, 255, 242, 249, 240, 255, 246, 249, 245, 255, 131, 177, 123, 255, 246, 250, 245, 255, 255, 255, 255, 255, 156, 201, 149, 255, 83, 160, 71, 255, 90, 163, 78, 255, 87, 158, 75, 255, 83, 154, 72, 255, 80, 151, 70, 255, 61, 134, 50, 255, + 126, 180, 118, 255, 130, 200, 118, 255, 131, 200, 119, 255, 112, 186, 99, 255, 146, 200, 137, 255, 248, 251, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 157, 201, 150, 255, 82, 160, 70, 255, 89, 162, 78, 255, 87, 159, 77, 255, 83, 154, 72, 255, 79, 150, 69, 255, 76, 146, 65, 255, 73, 140, 63, 255, + 187, 214, 182, 255, 102, 174, 91, 255, 125, 194, 113, 255, 116, 185, 104, 255, 98, 175, 86, 255, 159, 205, 152, 255, 229, 240, 227, 255, 135, 189, 126, 255, 83, 159, 71, 255, 90, 161, 77, 255, 87, 158, 75, 255, 84, 154, 72, 255, 79, 150, 68, 255, 78, 147, 66, 255, 64, 135, 53, 255, 146, 186, 140, 255, + 220, 233, 218, 174, 87, 151, 77, 255, 100, 171, 88, 255, 111, 181, 99, 255, 105, 175, 93, 255, 93, 168, 81, 255, 100, 169, 90, 255, 84, 158, 72, 255, 88, 160, 77, 255, 85, 156, 73, 255, 81, 153, 71, 255, 78, 149, 68, 255, 76, 147, 66, 255, 71, 141, 60, 255, 55, 128, 45, 255, 220, 233, 218, 174, + 255, 255, 255, 0, 182, 210, 178, 255, 65, 137, 54, 255, 93, 163, 82, 255, 102, 171, 90, 255, 96, 166, 85, 255, 90, 160, 77, 255, 88, 159, 77, 255, 84, 155, 73, 255, 81, 152, 71, 255, 78, 148, 67, 255, 76, 146, 66, 255, 70, 140, 60, 255, 50, 124, 39, 255, 144, 184, 138, 255, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 186, 212, 182, 255, 78, 144, 69, 255, 69, 142, 58, 255, 78, 149, 66, 255, 82, 152, 71, 255, 85, 155, 75, 255, 82, 152, 71, 255, 77, 147, 66, 255, 71, 141, 61, 255, 58, 131, 47, 255, 53, 126, 43, 255, 147, 186, 142, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 220, 233, 218, 174, 172, 203, 167, 255, 102, 159, 94, 255, 56, 129, 45, 255, 58, 130, 47, 255, 59, 133, 49, 255, 58, 130, 47, 255, 61, 132, 51, 255, 107, 161, 99, 255, 220, 233, 218, 174, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MessageError(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 11, 11, 13, 248, 25, 24, 72, 250, 52, 51, 148, 254, 82, 82, 188, 251, 56, 56, 163, 252, 22, 22, 93, 201, 7, 6, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 9, 8, 36, 252, 45, 45, 177, 254, 99, 99, 246, 255, 135, 135, 255, 255, 146, 146, 255, 255, 118, 118, 255, 255, 83, 83, 255, 240, 44, 44, 210, 118, 9, 9, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 245, 13, 12, 64, 253, 53, 53, 230, 255, 110, 110, 255, 255, 145, 145, 255, 255, 147, 147, 255, 255, 132, 132, 255, 255, 118, 118, 255, 255, 103, 103, 255, 255, 81, 81, 255, 251, 47, 47, 253, 115, 10, 10, 136, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 242, 5, 5, 41, 251, 42, 42, 231, 255, 83, 83, 255, 239, 104, 104, 255, 249, 87, 87, 255, 255, 56, 56, 255, 253, 37, 37, 255, 255, 41, 41, 255, 252, 56, 56, 255, 235, 66, 66, 255, 255, 50, 50, 255, 233, 31, 31, 255, 86, 6, 6, 132, 0, 0, 0, 0, 0, 0, 0, 0, + 233, 4, 4, 12, 236, 21, 21, 175, 255, 50, 50, 255, 237, 82, 82, 255, 194, 179, 179, 255, 202, 119, 119, 255, 234, 0, 0, 255, 236, 0, 0, 255, 232, 0, 0, 255, 180, 82, 82, 255, 176, 173, 173, 255, 225, 77, 77, 255, 237, 24, 24, 255, 174, 15, 15, 245, 13, 0, 0, 73, 0, 0, 0, 0, + 227, 6, 6, 69, 228, 26, 26, 242, 251, 34, 34, 255, 233, 63, 63, 255, 229, 220, 220, 255, 238, 253, 253, 255, 197, 115, 115, 255, 215, 3, 3, 255, 176, 81, 81, 255, 214, 227, 227, 255, 254, 255, 255, 255, 229, 97, 97, 255, 219, 8, 8, 255, 202, 15, 15, 255, 81, 4, 4, 178, 0, 0, 0, 0, + 212, 11, 11, 147, 216, 20, 20, 255, 234, 23, 23, 255, 241, 11, 11, 255, 219, 67, 67, 255, 234, 228, 228, 255, 245, 253, 253, 255, 212, 186, 186, 255, 232, 234, 234, 255, 255, 254, 254, 255, 229, 99, 99, 255, 215, 3, 3, 255, 207, 10, 10, 255, 195, 10, 10, 255, 111, 5, 5, 226, 0, 0, 0, 0, + 195, 11, 11, 188, 201, 12, 12, 255, 216, 13, 13, 255, 220, 11, 11, 255, 214, 0, 0, 255, 206, 61, 60, 255, 237, 239, 238, 255, 255, 255, 255, 255, 253, 255, 255, 255, 219, 88, 88, 255, 202, 0, 0, 255, 203, 3, 3, 255, 197, 6, 6, 255, 184, 6, 6, 255, 113, 4, 4, 241, 0, 0, 0, 0, + 186, 8, 7, 171, 187, 8, 8, 255, 200, 7, 7, 255, 209, 5, 5, 255, 200, 0, 0, 255, 182, 83, 83, 255, 237, 242, 242, 255, 255, 255, 255, 255, 252, 255, 255, 255, 201, 117, 117, 255, 190, 0, 0, 255, 195, 1, 1, 255, 184, 3, 3, 255, 172, 3, 3, 255, 103, 3, 3, 242, 0, 0, 0, 0, + 194, 3, 3, 105, 176, 5, 5, 253, 185, 3, 3, 255, 194, 0, 0, 255, 167, 76, 76, 255, 217, 230, 230, 255, 255, 252, 252, 255, 230, 158, 158, 255, 244, 233, 232, 255, 241, 255, 255, 255, 185, 117, 117, 255, 177, 6, 6, 255, 171, 1, 1, 255, 160, 2, 2, 255, 81, 2, 1, 237, 0, 0, 0, 0, + 140, 1, 1, 34, 157, 3, 3, 217, 171, 0, 0, 255, 163, 40, 40, 255, 210, 222, 222, 255, 255, 254, 254, 255, 212, 100, 100, 255, 179, 0, 0, 255, 192, 70, 70, 255, 236, 231, 231, 255, 247, 255, 255, 255, 183, 94, 94, 255, 154, 0, 0, 255, 135, 2, 2, 255, 29, 1, 0, 209, 0, 0, 0, 0, + 0, 0, 0, 0, 93, 1, 1, 112, 163, 1, 1, 255, 158, 8, 8, 255, 212, 153, 153, 255, 208, 104, 104, 255, 172, 0, 0, 255, 174, 0, 0, 255, 169, 0, 0, 255, 184, 72, 72, 255, 227, 183, 183, 255, 165, 39, 39, 255, 140, 0, 0, 255, 82, 1, 1, 255, 0, 0, 0, 142, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 2, 99, 1, 1, 165, 150, 0, 0, 255, 151, 0, 0, 255, 155, 0, 0, 255, 159, 0, 0, 255, 160, 0, 0, 255, 157, 0, 0, 255, 151, 0, 0, 255, 143, 0, 0, 255, 136, 0, 0, 255, 98, 0, 0, 255, 11, 0, 0, 201, 0, 0, 0, 41, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 11, 78, 1, 1, 159, 132, 0, 0, 255, 142, 0, 0, 255, 142, 0, 0, 255, 143, 0, 0, 255, 140, 0, 0, 255, 136, 0, 0, 255, 129, 0, 0, 255, 84, 1, 1, 255, 11, 0, 0, 203, 0, 0, 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 33, 0, 0, 110, 78, 1, 1, 212, 96, 0, 0, 250, 101, 0, 0, 255, 96, 0, 0, 255, 79, 0, 0, 255, 43, 0, 0, 233, 1, 0, 0, 157, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 77, 0, 0, 0, 109, 0, 0, 0, 114, 0, 0, 0, 100, 0, 0, 0, 56, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_EditPaste(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 195, 179, 134, 255, 189, 173, 130, 255, 176, 159, 121, 255, 111, 96, 75, 51, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 172, 164, 143, 115, 172, 164, 143, 255, 172, 164, 143, 255, 172, 164, 143, 255, 159, 141, 91, 255, 239, 232, 165, 255, 244, 232, 155, 255, 226, 213, 140, 255, 118, 102, 70, 255, 143, 133, 115, 255, 149, 138, 122, 255, 145, 133, 117, 255, 145, 133, 117, 69, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 172, 164, 143, 255, 247, 240, 171, 255, 249, 241, 170, 255, 247, 239, 166, 255, 162, 151, 115, 255, 245, 236, 161, 255, 118, 103, 79, 212, 214, 197, 120, 255, 124, 108, 76, 255, 120, 97, 52, 255, 232, 195, 95, 255, 236, 182, 34, 255, 111, 94, 78, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 172, 164, 143, 255, 249, 241, 170, 255, 249, 241, 168, 255, 150, 134, 93, 255, 207, 198, 140, 255, 240, 228, 147, 255, 231, 213, 122, 255, 222, 198, 98, 255, 178, 154, 79, 255, 103, 90, 62, 255, 165, 125, 28, 255, 205, 143, 0, 255, 105, 89, 75, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 170, 161, 141, 255, 249, 241, 170, 255, 249, 240, 167, 255, 138, 125, 94, 255, 127, 115, 88, 255, 122, 109, 86, 255, 119, 105, 82, 255, 115, 102, 79, 255, 112, 97, 76, 255, 104, 90, 68, 255, 144, 111, 35, 255, 205, 143, 0, 255, 88, 74, 62, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 166, 158, 138, 255, 248, 240, 169, 255, 248, 234, 153, 255, 245, 227, 136, 255, 234, 209, 109, 255, 212, 161, 19, 255, 212, 161, 19, 255, 211, 160, 18, 255, 207, 151, 13, 255, 202, 145, 7, 255, 205, 143, 0, 255, 205, 143, 0, 255, 68, 57, 48, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 162, 153, 134, 255, 246, 234, 159, 255, 246, 225, 131, 255, 245, 216, 107, 255, 244, 206, 83, 255, 240, 179, 14, 255, 142, 160, 182, 255, 136, 153, 176, 255, 128, 146, 169, 255, 120, 138, 162, 255, 112, 130, 154, 255, 103, 121, 145, 255, 94, 113, 137, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 158, 148, 130, 255, 243, 226, 145, 255, 244, 213, 102, 255, 243, 203, 76, 255, 242, 194, 50, 255, 233, 175, 21, 255, 136, 153, 176, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 251, 252, 255, 239, 241, 247, 255, 225, 231, 239, 255, 86, 104, 129, 255, 77, 96, 122, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 154, 142, 126, 255, 240, 217, 131, 255, 242, 201, 70, 255, 242, 191, 45, 255, 241, 183, 22, 255, 226, 160, 0, 255, 128, 146, 169, 255, 255, 255, 255, 255, 158, 174, 195, 255, 158, 174, 195, 255, 153, 168, 189, 255, 211, 220, 232, 255, 77, 96, 122, 255, 186, 197, 212, 255, 71, 82, 97, 255, 255, 255, 255, 0, + 148, 137, 121, 255, 237, 208, 116, 255, 241, 189, 40, 255, 240, 181, 17, 255, 234, 171, 7, 255, 220, 157, 0, 255, 120, 138, 162, 255, 250, 251, 253, 255, 238, 242, 247, 255, 225, 230, 239, 255, 211, 219, 232, 255, 198, 208, 224, 255, 74, 90, 112, 255, 70, 82, 97, 255, 66, 72, 80, 255, 62, 61, 63, 255, + 144, 132, 117, 255, 234, 200, 104, 255, 240, 181, 16, 255, 235, 172, 8, 255, 227, 164, 3, 255, 212, 150, 0, 255, 111, 130, 154, 255, 239, 241, 247, 255, 158, 174, 195, 255, 158, 174, 195, 255, 152, 168, 189, 255, 147, 162, 183, 255, 178, 191, 212, 255, 147, 162, 183, 255, 147, 162, 183, 255, 56, 47, 38, 255, + 139, 127, 113, 255, 236, 182, 34, 255, 205, 143, 0, 255, 205, 143, 0, 255, 205, 143, 0, 255, 205, 143, 0, 255, 102, 121, 145, 255, 225, 230, 239, 255, 211, 219, 232, 255, 198, 208, 224, 255, 188, 198, 218, 255, 178, 191, 212, 255, 171, 185, 207, 255, 168, 182, 204, 255, 147, 162, 183, 255, 56, 47, 38, 255, + 139, 127, 113, 69, 142, 126, 100, 255, 111, 94, 79, 255, 97, 82, 69, 255, 77, 65, 55, 255, 56, 47, 38, 255, 94, 113, 137, 255, 211, 220, 232, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 56, 47, 38, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 85, 104, 129, 255, 56, 47, 38, 255, 56, 47, 38, 255, 56, 47, 38, 255, 56, 47, 38, 255, 56, 47, 38, 255, 56, 47, 38, 255, 56, 47, 38, 255, 56, 47, 38, 255, 56, 47, 38, 255, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_FileCloseAll(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 76, 103, 147, 255, 133, 148, 164, 67, 129, 145, 166, 255, 120, 137, 161, 255, 135, 149, 170, 255, 123, 140, 160, 124, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 76, 103, 147, 255, 96, 116, 149, 255, 83, 105, 141, 92, 0, 0, 0, 0, 109, 121, 158, 21, 130, 145, 166, 255, 117, 132, 159, 85, 0, 0, 0, 0, + 0, 0, 0, 0, 171, 162, 142, 255, 171, 162, 142, 255, 171, 162, 142, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 103, 147, 255, 76, 103, 147, 255, 76, 103, 147, 255, 0, 0, 0, 0, 0, 0, 0, 0, 106, 123, 152, 77, 130, 145, 166, 255, 0, 0, 0, 0, + 171, 162, 142, 255, 236, 228, 178, 255, 248, 238, 182, 255, 243, 225, 146, 255, 171, 162, 142, 255, 171, 162, 141, 100, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 84, 107, 141, 255, 255, 255, 255, 0, + 171, 162, 142, 255, 170, 161, 141, 255, 169, 160, 140, 255, 168, 159, 139, 255, 168, 158, 139, 255, 170, 160, 141, 255, 164, 154, 135, 255, 163, 152, 134, 255, 162, 151, 133, 255, 161, 150, 132, 255, 146, 135, 118, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 107, 141, 255, 0, 0, 0, 0, + 171, 162, 142, 255, 255, 247, 194, 255, 250, 241, 189, 255, 250, 242, 187, 255, 251, 242, 175, 255, 253, 235, 162, 255, 254, 230, 146, 255, 254, 222, 132, 255, 253, 215, 119, 255, 250, 199, 87, 255, 141, 123, 93, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 168, 159, 140, 255, 255, 246, 192, 255, 248, 238, 180, 255, 248, 238, 168, 255, 251, 232, 152, 255, 171, 162, 142, 255, 171, 162, 142, 255, 171, 162, 142, 255, 247, 200, 92, 255, 207, 153, 25, 255, 128, 111, 76, 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 164, 155, 136, 255, 255, 247, 188, 255, 250, 238, 169, 255, 251, 232, 156, 255, 171, 162, 142, 255, 236, 228, 178, 255, 248, 238, 182, 255, 243, 225, 146, 255, 171, 162, 142, 255, 187, 153, 71, 255, 109, 93, 62, 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 159, 150, 132, 255, 255, 244, 182, 255, 251, 233, 159, 255, 252, 227, 143, 255, 171, 162, 142, 255, 170, 161, 141, 255, 169, 160, 140, 255, 168, 159, 139, 255, 168, 158, 139, 255, 170, 160, 141, 255, 164, 154, 135, 255, 163, 152, 134, 255, 162, 151, 133, 255, 161, 150, 132, 255, 146, 135, 118, 73, 0, 0, 0, 0, + 155, 144, 127, 255, 255, 242, 173, 255, 254, 231, 150, 255, 253, 223, 132, 255, 171, 162, 142, 255, 255, 247, 194, 255, 250, 241, 189, 255, 250, 242, 187, 255, 251, 242, 175, 255, 253, 235, 162, 255, 254, 230, 146, 255, 254, 222, 132, 255, 253, 215, 119, 255, 250, 199, 87, 255, 141, 123, 93, 255, 0, 0, 0, 0, + 150, 139, 123, 255, 255, 238, 159, 255, 234, 205, 112, 255, 226, 196, 104, 255, 168, 159, 140, 255, 255, 246, 192, 255, 248, 238, 180, 255, 248, 238, 168, 255, 251, 232, 152, 255, 252, 225, 136, 255, 251, 218, 119, 255, 249, 208, 105, 255, 247, 200, 92, 255, 207, 153, 25, 255, 128, 111, 76, 251, 0, 0, 0, 0, + 146, 135, 119, 255, 147, 134, 110, 251, 126, 111, 82, 251, 105, 90, 60, 251, 164, 155, 136, 255, 255, 247, 188, 255, 250, 238, 169, 255, 251, 232, 156, 255, 252, 226, 139, 255, 251, 218, 122, 255, 248, 209, 106, 255, 244, 198, 91, 255, 243, 189, 77, 255, 198, 147, 26, 255, 109, 93, 62, 251, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159, 150, 132, 255, 255, 244, 182, 255, 251, 233, 159, 255, 252, 227, 143, 255, 251, 219, 125, 255, 249, 210, 110, 255, 245, 199, 93, 255, 240, 188, 76, 255, 240, 179, 60, 255, 186, 138, 27, 255, 89, 75, 50, 251, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 144, 127, 255, 255, 242, 173, 255, 254, 231, 150, 255, 253, 223, 132, 255, 251, 214, 116, 255, 248, 203, 99, 255, 244, 191, 80, 255, 240, 180, 62, 255, 241, 171, 47, 255, 171, 129, 29, 255, 69, 58, 37, 251, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 139, 123, 255, 255, 238, 159, 255, 234, 205, 112, 255, 226, 196, 104, 255, 214, 183, 92, 255, 199, 168, 79, 255, 185, 151, 64, 255, 170, 136, 51, 255, 158, 123, 39, 255, 159, 120, 30, 255, 55, 46, 26, 251, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 146, 135, 119, 255, 147, 134, 110, 251, 126, 111, 82, 251, 105, 90, 60, 251, 85, 72, 42, 251, 66, 53, 27, 251, 50, 39, 15, 251, 46, 35, 15, 251, 45, 35, 14, 251, 46, 36, 16, 251, 28, 22, 15, 247, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MediaRewind(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 3, 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 2, 95, 147, 237, 36, 87, 135, 224, 255, 96, 140, 228, 2, 95, 147, 237, 36, 87, 135, 224, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 3, 94, 144, 235, 40, 95, 139, 224, 255, 83, 128, 214, 255, 94, 144, 235, 40, 95, 139, 224, 255, 83, 128, 214, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 3, 96, 140, 228, 61, 92, 138, 224, 250, 164, 190, 254, 255, 83, 127, 212, 255, 92, 138, 224, 250, 165, 191, 255, 255, 79, 123, 208, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 3, 96, 140, 228, 63, 88, 135, 223, 255, 164, 190, 254, 255, 102, 150, 248, 255, 88, 135, 223, 255, 165, 191, 255, 255, 105, 154, 255, 255, 74, 117, 200, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 3, 96, 140, 228, 63, 85, 133, 222, 255, 164, 190, 254, 255, 123, 165, 248, 255, 85, 133, 222, 255, 165, 191, 255, 255, 133, 174, 255, 255, 79, 137, 253, 255, 68, 111, 192, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 114, 205, 66, 83, 132, 221, 255, 162, 189, 255, 255, 117, 158, 242, 255, 83, 132, 221, 255, 162, 189, 255, 255, 136, 174, 255, 255, 104, 156, 249, 255, 62, 126, 249, 255, 63, 104, 183, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 76, 171, 81, 62, 115, 219, 255, 103, 156, 251, 255, 62, 118, 222, 255, 62, 115, 219, 255, 103, 156, 251, 255, 79, 138, 246, 255, 44, 113, 238, 255, 56, 96, 175, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 76, 169, 74, 47, 100, 207, 255, 52, 114, 232, 255, 33, 97, 220, 255, 47, 100, 207, 255, 52, 114, 232, 255, 36, 106, 242, 255, 51, 89, 166, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 76, 169, 60, 48, 98, 200, 255, 29, 102, 245, 255, 40, 81, 160, 255, 48, 98, 200, 255, 29, 102, 245, 255, 45, 83, 158, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 74, 167, 69, 47, 101, 211, 255, 40, 77, 150, 255, 26, 74, 167, 69, 47, 101, 211, 255, 40, 77, 150, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 255, 106, 58, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 76, 172, 77, 36, 72, 144, 255, 0, 0, 0, 0, 27, 76, 172, 77, 36, 72, 144, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 75, 168, 3, 26, 75, 173, 78, 0, 0, 0, 0, 27, 75, 168, 3, 26, 75, 173, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ZoomIn(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 127, 127, 191, 4, 217, 220, 227, 75, 182, 192, 203, 154, 150, 163, 181, 195, 136, 150, 170, 217, 115, 132, 153, 229, 123, 140, 162, 190, 160, 176, 212, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 185, 193, 207, 128, 149, 160, 177, 208, 176, 188, 200, 247, 187, 203, 214, 255, 187, 212, 222, 255, 152, 178, 195, 255, 118, 144, 165, 255, 82, 103, 131, 236, 85, 108, 135, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 88, 107, 137, 26, 145, 158, 176, 201, 189, 197, 208, 253, 234, 244, 246, 255, 230, 246, 249, 255, 222, 242, 246, 255, 206, 234, 244, 255, 178, 212, 229, 255, 128, 158, 181, 255, 70, 90, 119, 250, 70, 84, 113, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 188, 195, 206, 158, 163, 176, 189, 243, 227, 235, 240, 255, 244, 250, 251, 255, 241, 249, 251, 255, 0, 0, 0, 255, 215, 237, 245, 255, 191, 223, 241, 255, 164, 203, 230, 255, 104, 133, 158, 255, 60, 82, 111, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 148, 160, 178, 213, 182, 196, 207, 255, 234, 245, 249, 255, 243, 250, 252, 255, 244, 251, 252, 255, 0, 0, 0, 255, 218, 237, 246, 255, 193, 222, 240, 255, 169, 207, 236, 255, 125, 162, 192, 255, 59, 81, 112, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 113, 129, 151, 255, 196, 218, 227, 255, 222, 241, 247, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 165, 202, 231, 255, 130, 166, 204, 255, 63, 84, 114, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 128, 143, 164, 221, 164, 188, 205, 255, 204, 232, 244, 255, 215, 238, 246, 255, 218, 239, 247, 255, 0, 0, 0, 255, 197, 226, 242, 255, 179, 213, 236, 255, 157, 195, 227, 255, 114, 148, 181, 255, 55, 75, 107, 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 127, 141, 163, 162, 124, 149, 173, 247, 186, 223, 242, 255, 193, 225, 243, 255, 193, 225, 242, 255, 0, 0, 0, 255, 178, 216, 237, 255, 163, 203, 231, 255, 135, 173, 211, 255, 87, 115, 146, 255, 85, 95, 102, 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 102, 127, 153, 20, 82, 101, 130, 241, 139, 171, 193, 255, 170, 209, 236, 255, 174, 210, 238, 255, 167, 207, 236, 255, 158, 199, 231, 255, 138, 178, 216, 255, 98, 129, 161, 255, 66, 86, 114, 255, 165, 147, 100, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 83, 105, 134, 70, 77, 97, 129, 245, 101, 129, 157, 255, 126, 162, 191, 255, 135, 173, 208, 255, 115, 149, 180, 255, 89, 117, 147, 255, 64, 84, 110, 255, 145, 128, 79, 255, 239, 216, 135, 255, 165, 147, 100, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 104, 135, 49, 120, 141, 172, 155, 66, 87, 117, 200, 58, 79, 112, 243, 67, 88, 119, 255, 87, 107, 142, 225, 74, 76, 71, 117, 66, 52, 45, 255, 198, 151, 43, 255, 239, 216, 135, 255, 165, 147, 100, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 77, 80, 77, 82, 79, 80, 77, 255, 198, 151, 43, 255, 239, 216, 135, 255, 165, 147, 100, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 80, 77, 82, 79, 80, 77, 255, 198, 151, 43, 255, 239, 216, 135, 255, 165, 147, 100, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 0, 2, 0, 0, 0, 0, 77, 80, 77, 82, 79, 80, 77, 255, 179, 141, 50, 255, 116, 102, 67, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 79, 79, 58, 79, 79, 77, 202, 78, 78, 75, 81, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ArrowRight(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 156, 180, 144, 255, 166, 192, 152, 72, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 170, 137, 255, 132, 151, 123, 255, 153, 176, 141, 100, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 140, 161, 130, 255, 184, 225, 165, 255, 132, 151, 123, 255, 153, 176, 141, 100, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 162, 188, 149, 255, 156, 180, 144, 255, 147, 170, 137, 255, 140, 161, 130, 255, 132, 152, 124, 255, 187, 229, 168, 255, 150, 199, 128, 255, 132, 151, 123, 255, 153, 176, 141, 100, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 156, 180, 144, 255, 201, 241, 180, 255, 196, 238, 174, 255, 191, 234, 170, 255, 185, 228, 164, 255, 182, 224, 163, 255, 140, 193, 118, 255, 128, 178, 109, 255, 132, 151, 123, 255, 153, 177, 141, 99, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 170, 137, 255, 198, 239, 177, 255, 173, 226, 147, 255, 163, 216, 139, 255, 152, 205, 129, 255, 140, 193, 118, 255, 128, 181, 108, 255, 116, 170, 98, 255, 100, 146, 86, 255, 103, 118, 96, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 140, 161, 130, 255, 190, 233, 169, 255, 134, 179, 115, 255, 125, 170, 106, 255, 116, 160, 98, 255, 106, 151, 90, 255, 116, 170, 98, 255, 78, 119, 67, 255, 28, 34, 27, 255, 53, 65, 52, 82, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 132, 152, 124, 255, 35, 43, 34, 255, 44, 54, 43, 255, 53, 64, 51, 255, 60, 73, 58, 255, 96, 141, 81, 255, 78, 119, 67, 255, 28, 34, 27, 255, 54, 66, 53, 77, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 127, 146, 120, 255, 78, 119, 67, 255, 28, 34, 27, 255, 54, 66, 53, 77, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 127, 146, 120, 255, 28, 34, 27, 255, 37, 45, 36, 77, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 127, 146, 120, 255, 44, 54, 43, 51, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_EditFind(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 138, 159, 193, 223, 113, 137, 178, 234, 54, 85, 142, 221, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 138, 159, 193, 191, 113, 137, 178, 234, 54, 85, 142, 221, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 59, 90, 147, 171, 241, 244, 249, 255, 12, 49, 117, 226, 21, 57, 124, 2, 255, 255, 255, 0, 21, 57, 124, 2, 59, 90, 147, 171, 241, 244, 249, 255, 12, 49, 117, 226, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 138, 159, 193, 191, 122, 145, 183, 255, 79, 107, 157, 255, 48, 79, 139, 255, 42, 74, 134, 235, 255, 255, 255, 0, 145, 165, 196, 255, 122, 145, 183, 255, 79, 107, 157, 255, 48, 79, 139, 255, 42, 74, 134, 235, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 127, 150, 186, 255, 248, 249, 251, 255, 177, 195, 222, 255, 117, 145, 195, 255, 33, 68, 133, 255, 8, 46, 118, 1, 127, 150, 186, 255, 248, 249, 251, 255, 178, 196, 223, 255, 135, 162, 208, 255, 36, 70, 134, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 120, 143, 181, 18, 127, 149, 185, 255, 99, 126, 172, 255, 73, 102, 155, 255, 45, 79, 140, 255, 59, 90, 148, 255, 54, 88, 150, 218, 99, 123, 168, 255, 112, 137, 178, 255, 87, 114, 163, 255, 40, 74, 135, 255, 33, 68, 132, 255, 99, 125, 170, 18, 255, 255, 255, 0, 255, 255, 255, 0, + 138, 159, 193, 5, 124, 146, 185, 255, 234, 240, 247, 255, 240, 246, 253, 255, 196, 213, 240, 255, 95, 127, 181, 255, 38, 72, 135, 255, 16, 53, 123, 202, 118, 141, 178, 255, 255, 255, 255, 255, 243, 246, 251, 255, 193, 210, 238, 255, 86, 118, 173, 255, 36, 71, 135, 255, 255, 255, 255, 0, 255, 255, 255, 0, + 138, 159, 193, 123, 114, 137, 176, 255, 255, 255, 255, 255, 199, 210, 231, 255, 139, 162, 203, 255, 77, 108, 166, 255, 23, 60, 126, 255, 118, 141, 178, 120, 118, 141, 178, 255, 210, 217, 230, 255, 205, 216, 236, 255, 137, 160, 202, 255, 85, 118, 172, 255, 24, 59, 124, 255, 116, 140, 181, 126, 255, 255, 255, 0, + 139, 158, 189, 239, 108, 133, 176, 255, 78, 107, 159, 255, 49, 83, 145, 255, 41, 73, 135, 255, 38, 70, 132, 255, 23, 57, 124, 255, 16, 53, 123, 223, 112, 135, 174, 255, 78, 107, 159, 255, 49, 84, 145, 255, 41, 75, 138, 255, 28, 61, 124, 255, 20, 55, 119, 255, 55, 87, 144, 249, 255, 255, 255, 0, + 134, 154, 189, 255, 253, 253, 254, 255, 225, 232, 245, 255, 184, 200, 228, 255, 132, 158, 205, 255, 32, 64, 126, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 98, 126, 171, 255, 229, 232, 241, 255, 223, 226, 235, 255, 175, 191, 221, 255, 108, 137, 188, 255, 41, 74, 134, 255, 255, 255, 255, 0, + 123, 145, 182, 255, 250, 250, 252, 255, 184, 200, 227, 255, 140, 163, 205, 255, 95, 128, 185, 255, 32, 64, 126, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 98, 126, 171, 255, 229, 232, 241, 255, 223, 226, 235, 255, 175, 191, 221, 255, 108, 137, 188, 255, 41, 74, 134, 255, 255, 255, 255, 0, + 123, 145, 182, 255, 250, 250, 252, 255, 184, 200, 227, 255, 140, 163, 205, 255, 95, 128, 185, 255, 32, 64, 126, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 98, 126, 171, 255, 229, 232, 241, 255, 223, 226, 235, 255, 175, 191, 221, 255, 108, 137, 188, 255, 41, 74, 134, 255, 255, 255, 255, 0, + 123, 145, 182, 255, 250, 250, 252, 255, 184, 200, 227, 255, 140, 163, 205, 255, 95, 128, 185, 255, 32, 64, 126, 255, 255, 255, 255, 0, 255, 255, 255, 0, 98, 126, 171, 9, 98, 126, 171, 255, 226, 230, 239, 255, 186, 198, 224, 255, 147, 169, 208, 255, 83, 117, 175, 255, 39, 73, 135, 255, 255, 255, 255, 0, + 97, 121, 160, 214, 90, 119, 164, 255, 63, 95, 149, 255, 57, 88, 143, 255, 57, 87, 142, 255, 31, 63, 126, 232, 32, 64, 126, 12, 255, 255, 255, 0, 98, 126, 171, 6, 98, 126, 171, 235, 74, 102, 151, 225, 78, 108, 158, 255, 60, 91, 146, 255, 49, 81, 138, 255, 13, 48, 113, 238, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 2, 255, 255, 255, 0, 147, 162, 183, 5, 87, 112, 160, 7, 87, 112, 160, 13, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MediaForward(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 3, 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 28, 96, 140, 228, 2, 0, 0, 0, 0, 96, 140, 228, 28, 96, 140, 228, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 154, 231, 255, 95, 147, 237, 34, 96, 140, 228, 2, 113, 154, 231, 255, 95, 147, 237, 34, 96, 140, 228, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 153, 230, 255, 96, 139, 222, 255, 94, 144, 235, 40, 108, 152, 229, 255, 96, 139, 222, 255, 94, 144, 235, 40, 96, 140, 228, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 148, 229, 255, 158, 191, 251, 255, 82, 128, 217, 235, 102, 146, 228, 255, 157, 190, 250, 255, 82, 128, 217, 235, 96, 140, 228, 61, 96, 140, 228, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 140, 228, 255, 155, 190, 250, 255, 137, 181, 253, 255, 70, 117, 211, 255, 140, 177, 244, 255, 136, 180, 252, 255, 70, 117, 211, 255, 96, 140, 228, 63, 96, 140, 228, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 138, 226, 255, 148, 182, 250, 255, 116, 165, 253, 255, 96, 151, 253, 255, 60, 109, 205, 255, 111, 158, 246, 255, 96, 150, 252, 255, 60, 109, 205, 255, 96, 140, 228, 63, 96, 140, 228, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 131, 225, 255, 133, 173, 239, 255, 96, 151, 253, 255, 51, 116, 244, 255, 27, 91, 214, 255, 51, 89, 166, 255, 55, 115, 229, 255, 27, 91, 214, 255, 51, 89, 166, 255, 64, 114, 205, 95, 96, 140, 228, 3, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 122, 223, 255, 116, 157, 238, 255, 51, 116, 244, 255, 27, 91, 214, 255, 33, 68, 140, 255, 43, 103, 220, 255, 27, 91, 214, 255, 33, 68, 140, 255, 27, 76, 171, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 117, 221, 255, 81, 132, 230, 255, 27, 91, 214, 255, 33, 68, 140, 255, 65, 115, 212, 255, 27, 91, 214, 255, 33, 68, 140, 255, 27, 76, 169, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 110, 220, 255, 60, 112, 212, 255, 33, 68, 140, 255, 49, 102, 208, 255, 60, 112, 212, 255, 33, 68, 140, 255, 27, 76, 169, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 106, 219, 255, 33, 68, 140, 255, 26, 74, 167, 69, 49, 106, 219, 255, 33, 68, 140, 255, 26, 74, 167, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 102, 216, 255, 27, 76, 172, 77, 0, 0, 0, 0, 44, 102, 216, 255, 27, 76, 172, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 75, 173, 78, 27, 75, 168, 3, 0, 0, 0, 0, 26, 75, 173, 78, 27, 75, 168, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_WindowsTile(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 139, 170, 234, 255, 139, 170, 234, 255, 127, 161, 233, 255, 108, 148, 231, 255, 88, 135, 229, 255, 70, 123, 228, 255, 57, 114, 226, 255, 139, 170, 234, 255, 139, 170, 234, 255, 127, 161, 233, 255, 108, 148, 231, 255, 88, 135, 229, 255, 70, 123, 228, 255, 57, 114, 226, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 139, 170, 234, 255, 254, 255, 255, 255, 144, 181, 251, 255, 132, 171, 249, 255, 119, 162, 246, 255, 106, 153, 245, 255, 57, 114, 226, 255, 139, 170, 234, 255, 254, 255, 255, 255, 144, 181, 251, 255, 132, 171, 249, 255, 119, 162, 246, 255, 106, 153, 245, 255, 57, 114, 226, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 139, 170, 234, 255, 139, 170, 234, 255, 110, 151, 231, 255, 86, 134, 229, 255, 64, 118, 227, 255, 57, 114, 226, 255, 57, 114, 226, 255, 139, 170, 234, 255, 139, 170, 234, 255, 110, 151, 231, 255, 86, 134, 229, 255, 64, 118, 227, 255, 57, 114, 226, 255, 57, 114, 226, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 147, 160, 186, 255, 254, 255, 255, 255, 244, 246, 252, 255, 234, 239, 250, 255, 223, 231, 247, 255, 211, 222, 245, 255, 53, 73, 99, 255, 147, 160, 186, 255, 254, 255, 255, 255, 244, 246, 252, 255, 234, 239, 250, 255, 223, 231, 247, 255, 211, 222, 245, 255, 53, 73, 99, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 138, 153, 180, 255, 252, 253, 254, 255, 241, 244, 252, 255, 230, 236, 249, 255, 219, 228, 246, 255, 208, 219, 245, 255, 53, 73, 99, 255, 138, 153, 180, 255, 252, 253, 254, 255, 241, 244, 252, 255, 230, 236, 249, 255, 219, 228, 246, 255, 208, 219, 245, 255, 53, 73, 99, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 131, 147, 173, 255, 250, 251, 254, 255, 237, 242, 251, 255, 226, 233, 249, 255, 215, 225, 246, 255, 203, 216, 243, 255, 53, 73, 99, 255, 131, 147, 173, 255, 250, 251, 254, 255, 237, 242, 251, 255, 226, 233, 249, 255, 215, 225, 246, 255, 203, 216, 243, 255, 53, 73, 99, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 119, 136, 163, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 119, 136, 163, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 139, 170, 234, 255, 139, 170, 234, 255, 127, 161, 233, 255, 108, 148, 231, 255, 88, 135, 229, 255, 70, 123, 228, 255, 57, 114, 226, 255, 139, 170, 234, 255, 139, 170, 234, 255, 127, 161, 233, 255, 108, 148, 231, 255, 88, 135, 229, 255, 70, 123, 228, 255, 57, 114, 226, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 139, 170, 234, 255, 254, 255, 255, 255, 144, 181, 251, 255, 132, 171, 249, 255, 119, 162, 246, 255, 106, 153, 245, 255, 57, 114, 226, 255, 139, 170, 234, 255, 254, 255, 255, 255, 144, 181, 251, 255, 132, 171, 249, 255, 119, 162, 246, 255, 106, 153, 245, 255, 57, 114, 226, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 139, 170, 234, 255, 139, 170, 234, 255, 110, 151, 231, 255, 86, 134, 229, 255, 64, 118, 227, 255, 57, 114, 226, 255, 57, 114, 226, 255, 139, 170, 234, 255, 139, 170, 234, 255, 110, 151, 231, 255, 86, 134, 229, 255, 64, 118, 227, 255, 57, 114, 226, 255, 57, 114, 226, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 147, 160, 186, 255, 254, 255, 255, 255, 244, 246, 252, 255, 234, 239, 250, 255, 223, 231, 247, 255, 211, 222, 245, 255, 53, 73, 99, 255, 147, 160, 186, 255, 254, 255, 255, 255, 244, 246, 252, 255, 234, 239, 250, 255, 223, 231, 247, 255, 211, 222, 245, 255, 53, 73, 99, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 138, 153, 180, 255, 252, 253, 254, 255, 241, 244, 252, 255, 230, 236, 249, 255, 219, 228, 246, 255, 208, 219, 245, 255, 53, 73, 99, 255, 138, 153, 180, 255, 252, 253, 254, 255, 241, 244, 252, 255, 230, 236, 249, 255, 219, 228, 246, 255, 208, 219, 245, 255, 53, 73, 99, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 131, 147, 173, 255, 250, 251, 254, 255, 237, 242, 251, 255, 226, 233, 249, 255, 215, 225, 246, 255, 203, 216, 243, 255, 53, 73, 99, 255, 131, 147, 173, 255, 250, 251, 254, 255, 237, 242, 251, 255, 226, 233, 249, 255, 215, 225, 246, 255, 203, 216, 243, 255, 53, 73, 99, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 119, 136, 163, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 119, 136, 163, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_FontBold(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 240, 0, 0, 0, 100, 0, 0, 0, 12, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 51, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 255, 255, 255, 0, 5, 4, 5, 71, 5, 4, 5, 255, 0, 0, 0, 255, 0, 0, 0, 100, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 255, 255, 255, 0, 5, 4, 5, 3, 5, 4, 5, 255, 0, 0, 0, 255, 0, 0, 0, 226, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 255, 255, 255, 0, 5, 4, 5, 71, 5, 4, 5, 255, 0, 0, 0, 255, 0, 0, 0, 100, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 254, 0, 0, 0, 161, 0, 0, 0, 23, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 255, 255, 255, 0, 5, 4, 5, 71, 5, 4, 5, 255, 0, 0, 0, 255, 0, 0, 0, 100, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 255, 255, 255, 0, 5, 4, 5, 3, 5, 4, 5, 255, 0, 0, 0, 255, 0, 0, 0, 226, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 57, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 255, 255, 255, 0, 5, 4, 5, 71, 5, 4, 5, 255, 0, 0, 0, 255, 0, 0, 0, 100, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 255, 5, 4, 5, 240, 0, 0, 0, 100, 0, 0, 0, 12, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_EditErase(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 74, 73, 73, 48, 72, 74, 73, 188, 72, 73, 73, 66, 74, 74, 73, 2, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 65, 65, 68, 3, 67, 68, 69, 103, 65, 65, 68, 255, 66, 67, 67, 246, 75, 74, 75, 81, 75, 76, 75, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 58, 61, 64, 4, 82, 81, 80, 34, 71, 71, 70, 110, 255, 255, 255, 0, 255, 255, 255, 0, + 65, 65, 68, 4, 65, 65, 68, 98, 62, 63, 66, 182, 55, 57, 61, 255, 63, 64, 68, 252, 72, 72, 73, 122, 77, 75, 75, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 36, 41, 49, 8, 59, 63, 66, 66, 75, 74, 74, 247, 64, 64, 66, 156, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 65, 65, 68, 25, 65, 65, 68, 56, 64, 65, 68, 182, 58, 60, 63, 255, 62, 63, 64, 255, 79, 77, 75, 177, 77, 77, 76, 11, 255, 255, 255, 0, 53, 56, 61, 9, 71, 73, 73, 168, 61, 63, 66, 251, 53, 53, 55, 139, 42, 46, 52, 12, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 65, 65, 68, 6, 65, 65, 68, 112, 63, 64, 67, 251, 62, 62, 66, 255, 76, 77, 77, 166, 57, 58, 63, 46, 58, 58, 62, 147, 61, 60, 60, 255, 46, 49, 52, 147, 38, 42, 48, 15, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 59, 61, 61, 1, 63, 63, 66, 41, 62, 63, 66, 207, 54, 55, 59, 255, 50, 51, 54, 247, 49, 51, 50, 239, 38, 42, 45, 174, 35, 39, 45, 9, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 47, 48, 52, 64, 46, 47, 52, 249, 57, 58, 61, 255, 46, 47, 50, 222, 32, 35, 41, 18, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 51, 52, 52, 32, 38, 39, 44, 210, 45, 46, 49, 254, 47, 48, 52, 255, 52, 53, 56, 255, 42, 43, 45, 218, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 49, 50, 53, 31, 38, 40, 43, 213, 38, 39, 44, 252, 40, 41, 43, 172, 20, 22, 25, 52, 30, 31, 36, 182, 48, 49, 51, 255, 37, 39, 43, 105, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 40, 43, 45, 24, 29, 32, 35, 202, 30, 33, 37, 255, 45, 46, 49, 194, 25, 24, 26, 18, 12, 14, 14, 11, 15, 18, 20, 11, 31, 34, 38, 151, 48, 48, 51, 244, 37, 42, 48, 29, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 40, 48, 56, 8, 30, 33, 38, 162, 24, 27, 33, 241, 44, 45, 49, 228, 43, 45, 47, 42, 255, 255, 255, 0, 255, 255, 255, 0, 12, 16, 16, 8, 9, 9, 11, 14, 45, 47, 49, 205, 25, 28, 32, 146, 28, 33, 38, 3, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 26, 29, 32, 75, 22, 24, 32, 255, 37, 38, 43, 255, 36, 38, 40, 133, 9, 11, 13, 11, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 4, 4, 3, 2, 36, 38, 40, 36, 36, 36, 37, 223, 13, 16, 17, 31, 39, 45, 52, 2, 255, 255, 255, 0, + 255, 255, 255, 0, 16, 16, 18, 6, 20, 20, 22, 133, 18, 19, 23, 255, 31, 32, 35, 186, 8, 10, 12, 38, 12, 14, 16, 2, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 16, 16, 17, 3, 54, 54, 57, 147, 11, 13, 10, 53, 39, 46, 55, 2, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 28, 31, 37, 50, 5, 6, 7, 145, 0, 1, 2, 62, 3, 4, 4, 13, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 4, 2, 2, 2, 10, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ToolsColor(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 247, 239, 169, 115, 246, 217, 124, 244, 245, 214, 118, 250, 245, 212, 114, 253, 245, 214, 117, 251, 244, 207, 94, 241, 245, 230, 144, 147, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 247, 239, 170, 143, 243, 207, 90, 249, 246, 232, 152, 224, 248, 241, 182, 255, 248, 241, 182, 255, 248, 241, 182, 255, 246, 231, 146, 228, 244, 212, 108, 250, 244, 210, 101, 233, 232, 212, 132, 116, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 247, 239, 169, 120, 244, 212, 107, 251, 246, 234, 157, 238, 247, 241, 175, 244, 248, 241, 182, 255, 248, 241, 182, 255, 248, 241, 182, 255, 246, 238, 166, 249, 246, 234, 160, 239, 237, 210, 112, 227, 237, 198, 84, 248, 245, 231, 149, 88, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 245, 216, 122, 248, 246, 234, 158, 230, 248, 241, 182, 255, 255, 175, 109, 255, 255, 144, 85, 255, 255, 176, 109, 255, 248, 241, 182, 255, 247, 236, 165, 254, 247, 236, 167, 254, 245, 231, 152, 241, 217, 176, 77, 245, 221, 187, 93, 171, 244, 223, 132, 64, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 245, 212, 112, 255, 247, 240, 172, 235, 248, 241, 182, 255, 255, 144, 84, 255, 217, 34, 0, 255, 88, 0, 0, 255, 248, 240, 178, 255, 151, 182, 180, 255, 100, 141, 179, 255, 140, 171, 182, 255, 236, 211, 120, 232, 201, 154, 53, 236, 219, 182, 81, 143, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 245, 212, 112, 255, 246, 237, 164, 230, 248, 241, 182, 255, 243, 89, 41, 255, 122, 0, 0, 255, 219, 31, 0, 255, 246, 233, 147, 255, 100, 140, 176, 255, 0, 58, 176, 255, 0, 0, 97, 255, 244, 222, 115, 244, 227, 195, 92, 222, 174, 129, 39, 239, 242, 211, 100, 62, 255, 255, 255, 0, + 255, 255, 255, 0, 243, 203, 84, 249, 245, 227, 142, 207, 248, 241, 182, 255, 248, 241, 182, 255, 246, 234, 158, 254, 246, 233, 147, 255, 246, 232, 148, 255, 35, 89, 179, 255, 0, 15, 179, 255, 0, 43, 171, 255, 244, 222, 115, 251, 239, 215, 99, 238, 180, 132, 29, 248, 206, 157, 39, 148, 255, 255, 255, 0, + 255, 255, 255, 0, 244, 220, 118, 105, 220, 180, 59, 247, 244, 226, 139, 181, 247, 231, 154, 232, 246, 230, 149, 254, 246, 232, 149, 254, 245, 227, 140, 255, 244, 227, 133, 255, 244, 222, 112, 255, 244, 220, 104, 255, 244, 219, 106, 255, 239, 212, 92, 244, 185, 139, 32, 247, 201, 151, 34, 171, 255, 255, 255, 0, + 255, 255, 255, 0, 244, 226, 137, 32, 244, 223, 132, 66, 194, 153, 29, 253, 201, 164, 55, 255, 235, 194, 70, 255, 240, 212, 101, 251, 243, 218, 102, 254, 140, 219, 62, 255, 80, 186, 0, 255, 103, 171, 0, 255, 243, 217, 99, 255, 235, 203, 81, 244, 185, 139, 30, 248, 200, 149, 29, 167, 255, 255, 255, 0, + 244, 223, 130, 2, 244, 220, 124, 7, 255, 255, 255, 0, 255, 255, 255, 0, 243, 212, 106, 108, 178, 129, 17, 253, 232, 202, 82, 254, 243, 218, 98, 255, 113, 217, 35, 255, 43, 145, 0, 255, 0, 96, 0, 255, 243, 217, 98, 255, 229, 195, 73, 239, 176, 128, 18, 254, 206, 155, 27, 115, 255, 255, 255, 0, + 255, 255, 255, 0, 243, 216, 112, 2, 255, 255, 255, 0, 255, 255, 255, 0, 231, 179, 34, 254, 201, 151, 28, 231, 233, 202, 81, 255, 242, 215, 95, 255, 103, 179, 10, 255, 0, 111, 0, 255, 37, 136, 0, 255, 238, 209, 83, 250, 204, 159, 46, 238, 172, 125, 24, 254, 189, 135, 11, 2, 255, 255, 255, 0, + 255, 255, 255, 0, 242, 210, 99, 1, 255, 255, 255, 0, 255, 255, 255, 0, 233, 181, 32, 255, 219, 176, 52, 206, 240, 210, 89, 255, 240, 212, 92, 255, 242, 215, 92, 255, 242, 214, 90, 253, 236, 207, 81, 251, 215, 174, 55, 244, 169, 123, 24, 253, 201, 148, 26, 143, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 226, 182, 58, 71, 193, 140, 34, 241, 234, 194, 67, 255, 231, 195, 72, 255, 236, 201, 78, 255, 226, 193, 68, 245, 199, 163, 56, 251, 171, 124, 26, 249, 209, 155, 25, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 240, 198, 69, 1, 255, 255, 255, 0, 255, 255, 255, 0, 214, 165, 45, 84, 172, 126, 36, 229, 184, 137, 31, 253, 168, 125, 31, 252, 175, 133, 35, 250, 210, 157, 32, 160, 223, 169, 29, 83, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_ToolsSortDescend(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 149, 88, 111, 173, 149, 85, 105, 185, 151, 91, 114, 157, 149, 90, 112, 186, 145, 71, 77, 209, 140, 51, 41, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 147, 73, 81, 182, 0, 0, 0, 0, 155, 89, 100, 23, 149, 73, 76, 232, 125, 46, 37, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 151, 70, 70, 22, 0, 0, 0, 0, 153, 82, 95, 153, 126, 47, 37, 255, 128, 47, 39, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 156, 88, 107, 67, 146, 71, 77, 255, 126, 47, 38, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 149, 91, 114, 224, 138, 52, 41, 232, 133, 55, 44, 23, 0, 0, 0, 0, 148, 65, 65, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 152, 87, 107, 141, 143, 63, 62, 255, 136, 50, 40, 101, 0, 0, 0, 0, 146, 73, 61, 21, 138, 51, 40, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 148, 71, 77, 43, 136, 51, 41, 244, 119, 44, 34, 245, 125, 46, 38, 155, 131, 49, 38, 168, 121, 45, 36, 234, 123, 45, 36, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79, 123, 202, 24, 72, 112, 191, 245, 58, 96, 163, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 73, 114, 193, 170, 69, 107, 183, 255, 58, 88, 151, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 0, 0, 0, 75, 0, 0, 0, 255, 0, 0, 0, 69, 0, 0, 0, 138, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 70, 109, 185, 222, 67, 102, 175, 225, 51, 83, 140, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 66, 0, 0, 0, 0, + 0, 0, 0, 0, 71, 112, 192, 66, 69, 107, 183, 247, 60, 93, 157, 40, 51, 80, 137, 255, 58, 89, 152, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 0, 0, 0, 255, 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 69, 107, 183, 203, 66, 101, 174, 218, 54, 86, 146, 150, 52, 82, 139, 244, 55, 86, 147, 193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 255, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, + 69, 107, 183, 3, 69, 106, 183, 241, 69, 107, 183, 24, 0, 0, 0, 0, 57, 90, 153, 77, 51, 79, 136, 255, 55, 90, 150, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 106, 182, 198, 55, 85, 145, 248, 57, 87, 147, 100, 58, 86, 152, 10, 51, 79, 137, 239, 51, 79, 136, 255, 51, 79, 135, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MediaPlay(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 28, 96, 140, 228, 2, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 113, 154, 231, 255, 95, 147, 237, 34, 96, 140, 228, 2, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 109, 153, 230, 255, 96, 139, 222, 255, 94, 144, 235, 40, 96, 140, 228, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 104, 148, 229, 255, 158, 191, 251, 255, 82, 128, 217, 235, 96, 140, 228, 61, 96, 140, 228, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 255, 155, 190, 250, 255, 137, 181, 253, 255, 70, 117, 211, 255, 96, 140, 228, 63, 96, 140, 228, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 89, 138, 226, 255, 148, 182, 250, 255, 116, 165, 253, 255, 96, 151, 253, 255, 60, 109, 205, 255, 96, 140, 228, 63, 96, 140, 228, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 81, 131, 225, 255, 133, 173, 239, 255, 96, 151, 253, 255, 51, 116, 244, 255, 27, 91, 214, 255, 51, 89, 166, 255, 64, 114, 205, 95, 96, 140, 228, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 72, 122, 223, 255, 116, 157, 238, 255, 51, 116, 244, 255, 27, 91, 214, 255, 33, 68, 140, 255, 27, 76, 171, 81, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 63, 117, 221, 255, 81, 132, 230, 255, 27, 91, 214, 255, 33, 68, 140, 255, 27, 76, 169, 74, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 56, 110, 220, 255, 60, 112, 212, 255, 33, 68, 140, 255, 27, 76, 169, 60, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 49, 106, 219, 255, 33, 68, 140, 255, 26, 74, 167, 69, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 44, 102, 216, 255, 27, 76, 172, 77, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 26, 75, 173, 78, 27, 75, 168, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_NavigateRefresh(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 178, 194, 216, 255, 174, 190, 212, 255, 169, 185, 207, 255, 164, 179, 201, 255, 164, 179, 201, 139, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 178, 194, 216, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 156, 171, 192, 255, 54, 74, 100, 255, 164, 179, 201, 139, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 175, 191, 213, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 173, 185, 201, 255, 186, 197, 212, 255, 54, 74, 100, 255, 164, 179, 201, 140, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 171, 187, 209, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 112, 153, 35, 255, 206, 214, 204, 255, 127, 143, 164, 255, 58, 78, 103, 255, 54, 74, 100, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 167, 182, 204, 255, 255, 255, 255, 255, 255, 255, 255, 255, 225, 233, 206, 255, 112, 153, 35, 255, 112, 153, 35, 255, 112, 153, 35, 255, 87, 123, 16, 255, 174, 185, 202, 255, 147, 162, 183, 255, 54, 74, 100, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 163, 178, 200, 255, 255, 255, 255, 255, 255, 255, 255, 255, 112, 153, 35, 255, 198, 213, 170, 255, 255, 255, 255, 255, 82, 118, 17, 255, 219, 226, 208, 255, 233, 237, 245, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 158, 174, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 112, 153, 35, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 252, 255, 238, 241, 247, 255, 225, 231, 241, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 154, 169, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 254, 255, 242, 245, 249, 255, 112, 153, 35, 255, 218, 225, 238, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 150, 165, 186, 255, 255, 255, 255, 255, 255, 255, 255, 255, 236, 241, 222, 255, 112, 153, 35, 255, 247, 248, 251, 255, 213, 225, 196, 255, 112, 153, 35, 255, 211, 219, 235, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 112, 153, 35, 255, 112, 153, 35, 255, 112, 153, 35, 255, 112, 153, 35, 255, 188, 203, 188, 255, 203, 213, 231, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 229, 237, 215, 255, 79, 106, 16, 255, 233, 237, 245, 255, 220, 227, 239, 255, 209, 217, 234, 255, 196, 207, 228, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 250, 252, 255, 238, 241, 247, 255, 225, 231, 241, 255, 213, 221, 236, 255, 201, 211, 230, 255, 189, 202, 225, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 255, 255, 255, 255, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 147, 162, 183, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 147, 162, 183, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 53, 73, 99, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_EditRedo(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 170, 194, 245, 26, 169, 193, 245, 148, 167, 193, 245, 196, 158, 187, 245, 226, 140, 175, 244, 100, 121, 161, 244, 9, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 170, 194, 245, 26, 170, 194, 245, 242, 157, 185, 245, 227, 127, 164, 244, 220, 129, 168, 244, 227, 133, 170, 244, 220, 120, 162, 244, 243, 121, 162, 244, 101, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 170, 194, 245, 217, 153, 183, 245, 236, 71, 121, 224, 239, 55, 96, 180, 247, 58, 100, 182, 252, 64, 109, 199, 245, 100, 147, 243, 232, 113, 156, 244, 232, 113, 157, 244, 86, 255, 255, 255, 0, 166, 200, 245, 48, 64, 114, 214, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 165, 192, 245, 223, 86, 136, 238, 249, 54, 91, 159, 251, 68, 110, 175, 217, 53, 93, 172, 198, 53, 93, 172, 244, 54, 95, 179, 251, 99, 147, 243, 253, 103, 153, 243, 230, 107, 157, 244, 89, 158, 192, 245, 213, 59, 105, 199, 255, 170, 194, 245, 9, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 128, 165, 244, 188, 69, 119, 220, 239, 39, 74, 140, 218, 80, 125, 183, 36, 255, 255, 255, 0, 53, 93, 169, 111, 51, 91, 167, 245, 44, 80, 155, 250, 85, 137, 241, 231, 113, 156, 244, 255, 106, 154, 243, 255, 52, 95, 181, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 128, 169, 244, 194, 69, 119, 222, 234, 38, 73, 142, 195, 32, 64, 126, 3, 255, 255, 255, 0, 255, 255, 255, 0, 52, 92, 168, 65, 40, 75, 146, 171, 118, 156, 236, 255, 91, 141, 243, 255, 75, 130, 236, 255, 46, 85, 163, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 131, 169, 244, 180, 75, 127, 232, 245, 40, 75, 147, 217, 32, 64, 126, 5, 255, 255, 255, 0, 255, 255, 255, 0, 148, 181, 245, 45, 148, 181, 245, 255, 106, 154, 243, 255, 73, 130, 234, 255, 54, 115, 223, 255, 40, 76, 149, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 112, 151, 227, 117, 81, 133, 236, 253, 50, 89, 172, 250, 32, 64, 126, 11, 255, 255, 255, 0, 255, 255, 255, 0, 64, 114, 214, 255, 58, 105, 199, 255, 52, 95, 182, 255, 46, 84, 164, 255, 40, 76, 149, 255, 37, 70, 138, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 141, 176, 245, 6, 102, 147, 239, 254, 69, 118, 219, 252, 39, 74, 146, 71, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 170, 194, 245, 9, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 86, 126, 207, 109, 84, 136, 240, 254, 56, 100, 190, 209, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 42, 80, 155, 1, 79, 123, 214, 233, 79, 132, 240, 253, 64, 111, 208, 92, 94, 142, 239, 34, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 42, 80, 155, 14, 76, 121, 217, 202, 80, 133, 243, 245, 72, 123, 227, 67, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 75, 128, 234, 85, 90, 141, 243, 89, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_MediaGoToBegin(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 2, 96, 140, 228, 28, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 113, 154, 231, 255, 128, 158, 231, 250, 93, 136, 225, 236, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 2, 95, 147, 237, 34, 87, 135, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 109, 153, 230, 255, 170, 196, 239, 255, 87, 135, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 3, 94, 144, 235, 40, 95, 139, 224, 255, 83, 128, 214, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 104, 148, 229, 255, 161, 190, 240, 255, 83, 128, 214, 255, 255, 255, 255, 0, 96, 140, 228, 3, 96, 140, 228, 61, 92, 138, 224, 250, 165, 191, 255, 255, 79, 123, 208, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 96, 140, 228, 255, 150, 180, 239, 255, 79, 123, 208, 255, 96, 140, 228, 3, 96, 140, 228, 63, 88, 135, 223, 255, 165, 191, 255, 255, 105, 154, 255, 255, 74, 117, 200, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 89, 138, 226, 255, 141, 171, 240, 255, 74, 117, 200, 255, 96, 140, 228, 63, 85, 133, 222, 255, 165, 191, 255, 255, 133, 174, 255, 255, 79, 137, 253, 255, 68, 111, 192, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 81, 131, 225, 255, 126, 159, 238, 255, 68, 111, 192, 255, 83, 132, 221, 255, 162, 189, 255, 255, 136, 174, 255, 255, 104, 156, 249, 255, 62, 126, 249, 255, 63, 104, 183, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 72, 122, 223, 255, 111, 150, 236, 255, 63, 104, 183, 255, 27, 76, 171, 81, 62, 115, 219, 255, 103, 156, 251, 255, 79, 138, 246, 255, 44, 113, 238, 255, 56, 96, 175, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 63, 117, 221, 255, 107, 147, 235, 255, 56, 96, 175, 255, 255, 255, 255, 0, 27, 76, 169, 74, 47, 100, 207, 255, 52, 114, 232, 255, 36, 106, 242, 255, 51, 89, 166, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 56, 110, 220, 255, 101, 143, 235, 255, 51, 89, 166, 255, 255, 255, 255, 0, 255, 255, 255, 0, 27, 76, 169, 60, 48, 98, 200, 255, 29, 102, 245, 255, 45, 83, 158, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 49, 106, 219, 255, 86, 132, 233, 255, 45, 83, 158, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 26, 74, 167, 69, 47, 101, 211, 255, 40, 77, 150, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 44, 102, 216, 255, 78, 123, 225, 255, 40, 77, 150, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 27, 76, 172, 77, 36, 72, 144, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 62, 106, 211, 250, 36, 72, 144, 255, 36, 72, 144, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 27, 75, 168, 3, 26, 75, 173, 78, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + diff --git a/iup/srcimglib/iup_imglib_bitmaps8.h b/iup/srcimglib/iup_imglib_bitmaps8.h new file mode 100755 index 0000000..cf6b142 --- /dev/null +++ b/iup/srcimglib/iup_imglib_bitmaps8.h @@ -0,0 +1,14421 @@ +static Ihandle* load_image_Zoom8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 1, 0, 0, 0, 0, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 0, 1, 2, 2, 2, 255, 255, 255, 1, 0, 255, 255, 255, 255, + 255, 1, 0, 2, 2, 255, 255, 255, 255, 255, 255, 0, 1, 255, 255, 255, + 255, 0, 255, 2, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 2, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 1, 255, 0, 255, 255, 255, + 255, 1, 0, 255, 255, 255, 255, 255, 255, 1, 255, 0, 1, 255, 255, 255, + 255, 255, 0, 1, 255, 255, 255, 1, 1, 255, 1, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 1, 0, 0, 0, 0, 1, 255, 0, 0, 0, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 128 128"); + IupSetAttribute(image, "2", "255 255 255"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_EditCut8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 0, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 255, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 1, 0, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 1, 255, 1, 1, 1, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 1, 1, 1, 255, 1, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 255, 1, 255, 255, 1, 255, 1, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 255, 1, 255, 255, 1, 255, 1, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 255, 1, 255, 255, 1, 255, 255, 1, 1, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 1, 1, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 128"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_EditErase8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 0, 1, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 1, 255, + 255, 0, 0, 0, 0, 1, 255, 255, 255, 255, 255, 0, 0, 1, 255, 255, + 255, 255, 0, 0, 0, 0, 1, 255, 255, 255, 0, 0, 1, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 1, 255, 0, 1, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 1, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 0, 0, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 1, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 1, 255, 0, 0, 1, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 1, 255, 255, 255, 0, 0, 1, 255, 255, 255, + 255, 255, 0, 0, 0, 1, 255, 255, 255, 255, 255, 0, 1, 255, 255, 255, + 255, 255, 0, 0, 0, 1, 255, 255, 255, 255, 255, 255, 0, 1, 255, 255, + 255, 255, 255, 0, 1, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 1, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "255 255 255"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ArrowUp8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "76 178 127"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MediaGoToBegin8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, + 255, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, + 255, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, + 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MessageError8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 1, 1, 1, 1, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 1, 1, 2, 2, 2, 2, 2, 1, 1, 255, 255, 255, 255, + 255, 255, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 255, 255, 255, + 255, 1, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2, 1, 255, 255, + 255, 1, 2, 4, 4, 4, 2, 2, 2, 4, 4, 4, 2, 1, 3, 255, + 1, 2, 2, 2, 4, 4, 4, 2, 4, 4, 4, 2, 2, 2, 1, 255, + 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 2, 2, 2, 2, 1, 3, + 1, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 1, 3, + 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 2, 2, 2, 2, 1, 3, + 1, 2, 2, 2, 4, 4, 4, 2, 4, 4, 4, 2, 2, 2, 1, 3, + 255, 1, 2, 4, 4, 4, 2, 2, 2, 4, 4, 4, 2, 1, 3, 3, + 255, 1, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2, 1, 3, 255, + 255, 255, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 3, 255, + 255, 255, 255, 1, 1, 2, 2, 2, 2, 2, 1, 1, 3, 3, 255, 255, + 255, 255, 255, 255, 3, 1, 1, 1, 1, 1, 3, 3, 3, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 3, 3, 3, 3, 3, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 0 0"); + IupSetAttribute(image, "2", "255 0 0"); + IupSetAttribute(image, "3", "128 128 128"); + IupSetAttribute(image, "4", "255 255 255"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ZoomIn8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 1, 0, 0, 0, 0, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 0, 1, 2, 2, 2, 255, 255, 255, 1, 0, 255, 255, 255, 255, + 255, 1, 0, 2, 2, 255, 0, 0, 255, 255, 255, 0, 1, 255, 255, 255, + 255, 0, 255, 2, 255, 255, 0, 0, 255, 255, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 2, 0, 0, 0, 0, 0, 0, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 255, 255, 255, 0, 0, 255, 255, 1, 255, 0, 255, 255, 255, + 255, 1, 0, 255, 255, 255, 0, 0, 255, 1, 255, 0, 1, 255, 255, 255, + 255, 255, 0, 1, 255, 255, 255, 1, 1, 255, 1, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 1, 0, 0, 0, 0, 1, 255, 0, 0, 0, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 128 128"); + IupSetAttribute(image, "2", "255 255 255"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FontItalic8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FileNew8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 1, 255, 255, 2, 1, 255, 255, 2, 255, 255, 255, 255, 255, 255, 255, 255, + 2, 1, 255, 2, 3, 255, 2, 1, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 2, 1, 2, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 255, 1, 2, 1, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 0, 255, + 2, 2, 2, 3, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, + 255, 255, 3, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 0, 255, + 2, 255, 255, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, + 255, 255, 255, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, + 255, 255, 255, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, + 255, 255, 255, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, + 255, 255, 255, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, + 255, 255, 255, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, + 255, 255, 255, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, + 255, 255, 255, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "255 255 0"); + IupSetAttribute(image, "2", "128 128 128"); + IupSetAttribute(image, "3", "255 255 255"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FileCloseAll8(void) +{ + unsigned char imgdata[] = { + 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 3, 3, 3, 0, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 255, 255, 0, 0, 255, 255, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, 0, 255, 0, 255, + 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 255, 255, 255, 255, 255, 0, + 0, 1, 1, 0, 3, 3, 3, 0, 1, 1, 0, 255, 255, 255, 255, 255, 0, + 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 255, 255, 255, 0, + 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, 0, 255, + 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 255, 255, 255, 255, + 255, 255, 0, 1, 1, 1, 0, 3, 3, 3, 0, 1, 0, 255, 255, 255, 255, + 255, 255, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 255, + 255, 255, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 255, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255}; + + Ihandle* image = IupImage(17, 17, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 128 0"); + IupSetAttribute(image, "2", "128 128 128"); + IupSetAttribute(image, "3", "255 255 255"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_EditFind8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 0, 1, 0, 255, 255, 255, 0, 1, 0, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 255, 255, + 255, 255, 255, 0, 1, 0, 0, 0, 255, 0, 1, 0, 0, 0, 255, 255, + 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 255, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, + 255, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, + 255, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 255, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, + 255, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 0, 1, 0, 0, 0, + 255, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 0, 1, 0, 0, 0, + 255, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "255 255 255"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ToolsSettings8(void) +{ + unsigned char imgdata[] = { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 2, 6, 6, 6, 3, 0, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 4, 4, 2, 2, 2, 2, 2, 0, 4, 4, 2, 2, 4, 4, 4, + 4, 4, 1, 5, 6, 0, 0, 2, 6, 3, 2, 2, 0, 0, 0, 5, 6, 0, 4, 4, + 4, 4, 1, 6, 5, 6, 1, 2, 6, 3, 2, 2, 0, 1, 5, 6, 5, 0, 4, 4, + 4, 4, 0, 1, 6, 5, 6, 2, 6, 3, 2, 2, 0, 5, 6, 5, 1, 0, 4, 4, + 4, 4, 0, 1, 6, 6, 0, 2, 6, 3, 2, 2, 0, 0, 5, 6, 1, 0, 4, 4, + 1, 1, 1, 5, 6, 0, 6, 2, 6, 3, 2, 2, 0, 6, 0, 5, 6, 0, 0, 4, + 1, 6, 5, 6, 5, 6, 0, 2, 6, 3, 2, 2, 0, 0, 5, 6, 5, 6, 5, 0, + 0, 1, 1, 1, 6, 5, 6, 0, 0, 0, 0, 0, 0, 5, 6, 5, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 1, 0, 1, 1, 0, + 0, 1, 0, 5, 6, 5, 0, 0, 1, 5, 6, 1, 0, 0, 6, 5, 6, 0, 1, 0, + 4, 0, 1, 1, 5, 0, 1, 1, 1, 6, 5, 0, 1, 1, 1, 6, 1, 0, 0, 4, + 4, 4, 1, 5, 0, 1, 1, 1, 1, 5, 6, 0, 1, 1, 1, 1, 1, 0, 0, 4, + 4, 4, 1, 5, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 4, 4, + 4, 4, 1, 5, 0, 0, 4, 4, 1, 1, 1, 0, 4, 4, 0, 1, 1, 0, 4, 4, + 4, 4, 4, 0, 0, 4, 4, 4, 0, 1, 1, 0, 4, 4, 4, 0, 0, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}; + + Ihandle* image = IupImage(20, 20, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 128 0"); + IupSetAttribute(image, "2", "128 128 128"); + IupSetAttribute(image, "3", "192 192 192"); + IupSetAttribute(image, "4", "BGCOLOR"); + IupSetAttribute(image, "5", "255 255 0"); + IupSetAttribute(image, "6", "255 255 255"); + IupSetAttribute(image, "7", "7 7 7"); + + return image; +} + +static Ihandle* load_image_ToolsSortAscend8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 2, 255, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 4, 2, 4, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 2, 2, 2, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 4, 2, 255, 2, 4, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 2, 2, 2, 2, 2, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 4, 2, 255, 255, 255, 2, 4, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 2, 2, 2, 255, 2, 2, 2, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 3, 3, 3, 3, 3, 3, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 3, 255, 255, 255, 3, 3, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 255, 3, 3, 255, 255, 255, 255, 1, 1, 1, 1, 1, 255, + 255, 255, 255, 3, 3, 255, 255, 255, 255, 255, 4, 1, 1, 1, 4, 255, + 255, 255, 3, 3, 255, 255, 255, 255, 255, 255, 255, 1, 1, 1, 255, 255, + 255, 3, 3, 255, 255, 255, 3, 255, 255, 255, 255, 4, 1, 4, 255, 255, + 255, 3, 3, 3, 3, 3, 3, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "4 2 4"); + IupSetAttribute(image, "2", "4 2 132"); + IupSetAttribute(image, "3", "132 2 4"); + IupSetAttribute(image, "4", "132 130 132"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_EditUndo8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 0, 255, 255, 255, + 255, 255, 0, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, + 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, + 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, + 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 255, 0, 255, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ZoomSelection8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 2, 0, 0, 0, 0, 2, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 0, 2, 255, 255, 255, 255, 255, 255, 2, 0, 255, 255, 255, 255, + 255, 2, 0, 255, 1, 1, 3, 255, 1, 1, 255, 0, 2, 255, 255, 255, + 255, 0, 255, 255, 1, 255, 255, 255, 255, 1, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 255, 3, 255, 255, 255, 255, 3, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 255, 1, 255, 255, 255, 255, 1, 255, 255, 0, 255, 255, 255, + 255, 2, 0, 255, 1, 1, 3, 255, 1, 1, 255, 0, 2, 255, 255, 255, + 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 2, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 2, 0, 0, 0, 0, 2, 255, 0, 0, 0, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "86 86 86"); + IupSetAttribute(image, "2", "128 128 128"); + IupSetAttribute(image, "3", "134 134 134"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MediaRecord8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 1, 1, 1, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, 255, + 255, 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, 255, + 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, + 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, + 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, + 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, + 255, 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, 255, + 255, 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 1, 1, 1, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_EditCopy8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 2, 2, 2, 2, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 2, 2, 2, 2, 0, 2, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 2, 0, 0, 2, 0, 1, 1, 1, 1, 1, 1, 255, 255, 255, + 255, 0, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 1, 255, 255, + 255, 0, 2, 0, 0, 0, 0, 1, 2, 2, 2, 2, 1, 2, 1, 255, + 255, 0, 2, 2, 2, 2, 2, 1, 2, 0, 0, 2, 1, 1, 1, 1, + 255, 0, 2, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 1, + 255, 0, 2, 2, 2, 2, 2, 1, 2, 0, 0, 0, 0, 0, 2, 1, + 255, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 1, + 255, 255, 255, 255, 255, 255, 255, 1, 2, 0, 0, 0, 0, 0, 2, 1, + 255, 255, 255, 255, 255, 255, 255, 1, 2, 2, 2, 2, 2, 2, 2, 1, + 255, 255, 255, 255, 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 128"); + IupSetAttribute(image, "2", "255 255 255"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MediaGoToEnd8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, + 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 255, + 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_EditPaste8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 255, 255, 255, + 0, 2, 4, 2, 0, 3, 0, 0, 3, 0, 4, 2, 4, 0, 255, 255, + 0, 4, 4, 0, 5, 5, 5, 5, 5, 5, 0, 4, 2, 0, 255, 255, + 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 255, 255, + 0, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 0, 255, 255, + 0, 2, 4, 2, 4, 2, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 0, 4, 2, 4, 2, 4, 1, 6, 6, 6, 6, 6, 1, 1, 255, 255, + 0, 2, 4, 2, 4, 2, 1, 6, 6, 6, 6, 6, 1, 6, 1, 255, + 0, 4, 2, 4, 2, 4, 1, 6, 1, 1, 1, 6, 1, 1, 1, 1, + 0, 2, 4, 2, 4, 2, 1, 6, 6, 6, 6, 6, 6, 6, 6, 1, + 0, 4, 2, 4, 2, 4, 1, 6, 1, 1, 1, 1, 1, 1, 6, 1, + 255, 0, 0, 0, 0, 0, 1, 6, 6, 6, 6, 6, 6, 6, 6, 1, + 255, 255, 255, 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 128"); + IupSetAttribute(image, "2", "128 128 0"); + IupSetAttribute(image, "3", "255 255 0"); + IupSetAttribute(image, "4", "128 128 128"); + IupSetAttribute(image, "5", "192 192 192"); + IupSetAttribute(image, "6", "255 255 255"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ZoomActualSize8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, + 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, + 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, + 0, 0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 0, 255, + 255, 0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 255, + 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, + 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, + 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, + 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, + 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, + 255, 0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 255, + 255, 0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MediaStop8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_WindowsCascade8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 255, 255, 255, 255, 255, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "255 255 255"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ZoomOut8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 1, 0, 0, 0, 0, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 0, 1, 2, 2, 2, 255, 255, 255, 1, 0, 255, 255, 255, 255, + 255, 1, 0, 2, 2, 255, 255, 255, 255, 255, 255, 0, 1, 255, 255, 255, + 255, 0, 255, 2, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 2, 0, 0, 0, 0, 0, 0, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 0, 255, 255, 255, + 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 1, 255, 0, 255, 255, 255, + 255, 1, 0, 255, 255, 255, 255, 255, 255, 1, 255, 0, 1, 255, 255, 255, + 255, 255, 0, 1, 255, 255, 255, 1, 1, 255, 1, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 1, 0, 0, 0, 0, 1, 255, 0, 0, 0, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 128 128"); + IupSetAttribute(image, "2", "255 255 255"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MediaPause8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_NavigateRefresh8(void) +{ + unsigned char imgdata[] = { + 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 255, 255, 255, 255, + 255, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 255, 255, 255, + 255, 0, 2, 2, 2, 2, 2, 1, 2, 2, 0, 0, 0, 0, 255, 255, + 255, 0, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 0, 255, 255, + 255, 0, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 0, 255, 255, + 255, 0, 2, 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 0, 255, 255, + 255, 0, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 0, 255, 255, + 255, 0, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 0, 255, 255, + 255, 0, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 0, 255, 255, + 255, 0, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 0, 255, 255, + 255, 0, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 0, 255, 255, + 255, 0, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 0, 255, 255, + 255, 0, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 0, 255, 255, + 255, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 255, 255, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 128 0"); + IupSetAttribute(image, "2", "255 255 255"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ActionCancel8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 2, 1, 255, 255, 255, 255, 255, 1, 2, 255, 255, 255, + 255, 255, 255, 255, 1, 2, 1, 255, 255, 255, 1, 2, 1, 255, 255, 255, + 255, 255, 255, 255, 255, 1, 2, 1, 255, 1, 2, 1, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 1, 2, 1, 2, 1, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 1, 2, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 1, 2, 1, 2, 1, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 1, 2, 1, 255, 1, 2, 1, 255, 255, 255, 255, + 255, 255, 255, 255, 1, 2, 1, 255, 255, 255, 1, 2, 1, 255, 255, 255, + 255, 255, 255, 255, 2, 1, 255, 255, 255, 255, 255, 1, 2, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 0 0"); + IupSetAttribute(image, "2", "255 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FileSave8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 255, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 255, 0, 255, + 255, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 255, + 255, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, 255, + 255, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, 255, + 255, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, 255, + 255, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, 255, + 255, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 255, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 255, + 255, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 2, 0, 1, 0, 255, + 255, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 2, 0, 1, 0, 255, + 255, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 2, 0, 1, 0, 255, + 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 128 0"); + IupSetAttribute(image, "2", "192 192 192"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_EditRedo8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 0, 255, + 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, + 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, + 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, + 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 0, 255, 0, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FontDialog8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 2, 1, 2, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 1, 1, 1, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 2, 1, 1, 1, 2, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 1, 1, 255, 1, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 2, 1, 255, 255, 1, 1, 2, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, 255, 255, + 255, 255, 255, 2, 1, 255, 255, 255, 255, 1, 1, 2, 255, 255, 255, 255, + 255, 255, 255, 1, 1, 255, 255, 255, 255, 2, 1, 1, 255, 255, 255, 255, + 255, 255, 2, 1, 255, 255, 255, 255, 255, 2, 1, 1, 2, 255, 255, 255, + 255, 1, 1, 1, 1, 255, 255, 255, 1, 1, 1, 1, 1, 1, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 128"); + IupSetAttribute(image, "2", "128 128 128"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FileSaveAll8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 255, 255, 255, 255, 0, 1, 0, 2, 2, 2, 2, 2, 0, 2, 0, 255, + 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 255, 255, 0, 1, 0, 2, 2, 2, 2, 2, 0, 2, 0, 1, 0, 255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 255, + 0, 1, 0, 2, 2, 2, 2, 2, 0, 2, 0, 1, 0, 1, 0, 255, + 0, 1, 0, 2, 2, 2, 2, 2, 0, 0, 0, 1, 0, 1, 0, 255, + 0, 1, 0, 2, 2, 2, 2, 2, 0, 1, 0, 1, 0, 1, 0, 255, + 0, 1, 0, 2, 2, 2, 2, 2, 0, 1, 0, 1, 0, 1, 0, 255, + 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 255, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 255, + 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 255, 255, 255, + 0, 1, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 255, 255, 255, + 0, 1, 1, 0, 0, 0, 0, 2, 0, 1, 0, 255, 255, 255, 255, 255, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 128 0"); + IupSetAttribute(image, "2", "192 192 192"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MessageHelp8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, + 255, 255, 1, 6, 6, 6, 3, 6, 6, 6, 3, 6, 6, 6, 1, 255, + 255, 255, 1, 6, 3, 6, 6, 6, 3, 6, 6, 6, 3, 6, 1, 4, + 255, 255, 1, 6, 6, 6, 5, 2, 2, 2, 2, 5, 6, 6, 1, 4, + 255, 255, 1, 6, 3, 6, 2, 2, 3, 5, 2, 2, 3, 6, 1, 4, + 255, 255, 1, 6, 6, 6, 2, 4, 6, 6, 2, 2, 6, 6, 1, 4, + 255, 255, 1, 6, 3, 6, 6, 6, 3, 4, 2, 4, 3, 6, 1, 4, + 255, 255, 1, 6, 6, 6, 3, 6, 4, 2, 5, 6, 6, 6, 1, 4, + 255, 255, 1, 6, 3, 6, 6, 6, 2, 4, 6, 6, 3, 6, 1, 4, + 255, 255, 1, 6, 6, 6, 3, 6, 6, 6, 3, 6, 6, 6, 1, 4, + 255, 255, 1, 6, 3, 6, 6, 6, 2, 2, 6, 6, 3, 6, 1, 4, + 255, 255, 1, 6, 6, 6, 3, 6, 3, 6, 3, 6, 6, 6, 1, 4, + 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 6, 6, 1, 1, 4, 255, + 255, 255, 255, 255, 4, 4, 4, 4, 4, 4, 1, 3, 1, 4, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, 1, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "64 64 64"); + IupSetAttribute(image, "2", "64 64 128"); + IupSetAttribute(image, "3", "255 255 64"); + IupSetAttribute(image, "4", "128 128 128"); + IupSetAttribute(image, "5", "224 224 224"); + IupSetAttribute(image, "6", "255 255 255"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FontBold8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ActionOk8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, 3, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, 3, 2, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, 3, 2, 1, 255, 255, 255, + 255, 255, 255, 3, 1, 255, 255, 255, 1, 3, 2, 1, 255, 255, 255, 255, + 255, 255, 255, 2, 3, 1, 255, 1, 3, 2, 1, 255, 255, 255, 255, 255, + 255, 255, 255, 1, 2, 3, 1, 3, 2, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 1, 2, 3, 2, 1, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 1, 2, 1, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "43 155 43"); + IupSetAttribute(image, "2", "92 249 105"); + IupSetAttribute(image, "3", "98 244 85"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FileOpen8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, + 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, + 255, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 0, 2, 3, 2, 3, 2, 3, 2, 3, 2, 0, 255, 255, 255, 255, + 255, 0, 3, 2, 3, 2, 3, 2, 3, 2, 3, 0, 255, 255, 255, 255, + 255, 0, 2, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 0, 3, 2, 3, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 255, 0, 2, 3, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 0, 3, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 255, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 128 0"); + IupSetAttribute(image, "2", "255 255 0"); + IupSetAttribute(image, "3", "255 255 255"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FileText8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 0, 1, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 255, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 255, 255, 255, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 255, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 255, 255, 255, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 255, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 255, 255, 255, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 255, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "255 255 255"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ArrowDown8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 255, 255, 255, 255, 0, 1, 1, 1, 1, 1, 1, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "76 178 127"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FileClose8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 0, 255, + 255, 255, 255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, + 255, 255, 0, 3, 3, 3, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, + 255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 255, 255, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "128 128 0"); + IupSetAttribute(image, "2", "128 128 128"); + IupSetAttribute(image, "3", "255 255 255"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_NavigateHome8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 1, 1, 255, 255, 2, 1, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 1, 3, 3, 1, 255, 2, 1, 255, 255, 255, + 255, 255, 255, 255, 255, 1, 3, 1, 1, 3, 1, 2, 1, 255, 255, 255, + 255, 255, 255, 255, 1, 3, 1, 4, 4, 1, 3, 1, 1, 255, 255, 255, + 255, 255, 255, 1, 3, 1, 4, 4, 4, 4, 1, 3, 1, 255, 255, 255, + 255, 255, 1, 3, 1, 4, 4, 4, 4, 4, 4, 1, 3, 1, 255, 255, + 255, 1, 3, 1, 4, 4, 4, 4, 4, 4, 4, 4, 1, 3, 1, 255, + 255, 255, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 255, 255, + 255, 255, 1, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 1, 255, 255, + 255, 255, 1, 4, 4, 4, 1, 3, 3, 1, 4, 4, 4, 1, 255, 255, + 255, 255, 1, 4, 4, 4, 1, 3, 3, 1, 4, 4, 4, 1, 255, 255, + 255, 255, 1, 4, 4, 4, 1, 3, 3, 1, 4, 4, 4, 1, 255, 255, + 255, 255, 1, 4, 4, 4, 1, 3, 3, 1, 4, 4, 4, 1, 255, 255, + 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "4 2 4"); + IupSetAttribute(image, "2", "132 2 4"); + IupSetAttribute(image, "3", "252 254 4"); + IupSetAttribute(image, "4", "252 254 252"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MediaForward8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MessageInfo8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 1, 1, 1, 1, 1, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 1, 1, 7, 7, 7, 7, 7, 1, 1, 255, 255, 255, 255, + 255, 255, 1, 7, 7, 7, 7, 6, 5, 7, 7, 7, 1, 255, 255, 255, + 255, 1, 7, 7, 7, 7, 7, 1, 1, 7, 7, 7, 7, 1, 255, 255, + 255, 1, 7, 7, 7, 7, 7, 1, 1, 7, 7, 7, 7, 1, 2, 255, + 1, 7, 7, 7, 7, 7, 7, 3, 4, 7, 7, 7, 7, 7, 1, 255, + 1, 7, 7, 7, 7, 7, 7, 1, 1, 7, 7, 7, 7, 7, 1, 2, + 1, 7, 7, 7, 7, 7, 7, 1, 1, 7, 7, 7, 7, 7, 1, 2, + 1, 7, 7, 7, 7, 7, 7, 1, 1, 7, 7, 7, 7, 7, 1, 2, + 1, 7, 7, 7, 7, 7, 7, 1, 1, 7, 7, 7, 7, 7, 1, 2, + 255, 1, 7, 7, 7, 7, 7, 1, 1, 7, 7, 7, 7, 1, 2, 2, + 255, 1, 7, 7, 7, 7, 7, 1, 1, 7, 7, 7, 7, 1, 2, 255, + 255, 255, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 2, 2, 255, + 255, 255, 255, 1, 1, 7, 7, 7, 7, 7, 1, 1, 2, 2, 255, 255, + 255, 255, 255, 255, 2, 1, 1, 1, 1, 1, 2, 2, 2, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 2, 2, 2, 2, 2, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "47 93 185"); + IupSetAttribute(image, "2", "128 128 128"); + IupSetAttribute(image, "3", "208 219 235"); + IupSetAttribute(image, "4", "228 235 242"); + IupSetAttribute(image, "5", "239 245 251"); + IupSetAttribute(image, "6", "240 245 252"); + IupSetAttribute(image, "7", "255 255 255"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ViewFullScreen8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, + 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 255, + 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 255, + 1, 5, 1, 2, 4, 2, 4, 2, 4, 2, 4, 2, 1, 5, 1, 255, + 1, 5, 1, 4, 3, 3, 3, 4, 2, 4, 2, 4, 1, 5, 1, 255, + 1, 5, 1, 2, 4, 2, 4, 2, 4, 2, 4, 2, 1, 5, 1, 255, + 1, 5, 1, 4, 3, 3, 3, 3, 3, 3, 3, 4, 1, 5, 1, 255, + 1, 5, 1, 2, 4, 2, 4, 2, 4, 2, 4, 2, 1, 5, 1, 255, + 1, 5, 1, 4, 3, 3, 3, 3, 3, 3, 3, 4, 1, 5, 1, 255, + 1, 5, 1, 2, 4, 2, 4, 2, 4, 2, 4, 2, 1, 5, 1, 255, + 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 255, + 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 255, + 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "4 2 4"); + IupSetAttribute(image, "2", "4 254 252"); + IupSetAttribute(image, "3", "132 130 132"); + IupSetAttribute(image, "4", "252 254 252"); + IupSetAttribute(image, "5", "255 255 255"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ArrowLeft8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 255, 255, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 255, 255, 255, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 1, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "76 178 127"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MediaRewind8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 255, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 255, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ArrowRight8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 1, 1, 1, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 1, 1, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 1, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "76 178 127"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MediaReverse8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_Print8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, + 255, 255, 255, 255, 1, 5, 5, 5, 5, 5, 5, 5, 5, 1, 255, 255, + 255, 255, 255, 255, 1, 5, 1, 1, 1, 1, 1, 5, 1, 255, 255, 255, + 255, 255, 255, 1, 5, 5, 5, 5, 5, 5, 5, 5, 1, 255, 255, 255, + 255, 255, 255, 1, 5, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 255, + 255, 255, 1, 5, 5, 5, 5, 5, 5, 5, 5, 1, 4, 1, 4, 1, + 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 1, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4, 1, 4, 1, 255, + 1, 4, 4, 4, 4, 4, 4, 2, 2, 2, 4, 4, 1, 1, 1, 255, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 255, + 255, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 1, 255, 255, + 255, 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "64 64 64"); + IupSetAttribute(image, "2", "255 255 64"); + IupSetAttribute(image, "3", "128 128 128"); + IupSetAttribute(image, "4", "224 224 224"); + IupSetAttribute(image, "5", "255 255 255"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_FileProperties8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 1, 1, + 255, 255, 255, 255, 255, 255, 0, 2, 2, 2, 2, 2, 2, 0, 1, 1, + 255, 255, 255, 255, 255, 0, 2, 0, 2, 2, 2, 2, 2, 2, 1, 1, + 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 2, 2, 2, 2, 1, 1, + 0, 3, 3, 0, 2, 0, 2, 0, 2, 0, 2, 2, 2, 0, 1, 1, + 0, 3, 0, 2, 0, 3, 0, 2, 0, 2, 0, 0, 0, 255, 1, 1, + 0, 3, 0, 0, 3, 3, 3, 0, 2, 0, 3, 0, 255, 255, 255, 1, + 0, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 0, 255, 255, 255, 255, + 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, 255, 255, 255, + 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 255, 255, 255, 255, + 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, 255, 255, 255, + 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 255, 255, 255, 255, + 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 128"); + IupSetAttribute(image, "2", "192 192 192"); + IupSetAttribute(image, "3", "255 255 255"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ToolsSortDescend8(void) +{ + unsigned char imgdata[] = { + 255, 3, 3, 3, 3, 3, 3, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 3, 255, 255, 255, 3, 3, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 255, 3, 3, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 3, 3, 255, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 3, 3, 255, 255, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 3, 3, 255, 255, 255, 3, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 3, 3, 3, 3, 3, 3, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 255, 2, 255, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 4, 2, 4, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 2, 2, 2, 255, 255, 255, 255, 1, 1, 1, 1, 1, 255, + 255, 255, 4, 2, 255, 2, 4, 255, 255, 255, 4, 1, 1, 1, 4, 255, + 255, 255, 2, 2, 2, 2, 2, 255, 255, 255, 255, 1, 1, 1, 255, 255, + 255, 4, 2, 255, 255, 255, 2, 4, 255, 255, 255, 4, 1, 4, 255, 255, + 255, 2, 2, 2, 255, 2, 2, 2, 255, 255, 255, 255, 1, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "4 2 4"); + IupSetAttribute(image, "2", "4 2 132"); + IupSetAttribute(image, "3", "132 2 4"); + IupSetAttribute(image, "4", "132 130 132"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_ToolsColor8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 0, 5, 7, 5, 7, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 0, 7, 5, 7, 6, 0, 6, 7, 5, 0, 255, 255, 255, + 255, 255, 0, 7, 6, 0, 6, 0, 4, 0, 5, 7, 5, 0, 255, 255, + 255, 255, 0, 5, 0, 3, 0, 6, 0, 6, 6, 0, 6, 5, 0, 255, + 255, 255, 0, 7, 6, 0, 6, 7, 5, 7, 0, 6, 0, 7, 0, 255, + 255, 255, 0, 5, 7, 5, 7, 5, 7, 5, 6, 0, 6, 5, 0, 255, + 255, 255, 255, 0, 0, 0, 5, 7, 5, 6, 0, 6, 5, 7, 0, 255, + 255, 255, 255, 255, 255, 0, 6, 0, 6, 0, 2, 0, 7, 5, 0, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 0, 6, 0, 6, 5, 0, 255, 255, + 255, 255, 255, 255, 255, 0, 6, 0, 6, 5, 7, 5, 7, 0, 255, 255, + 255, 255, 255, 255, 255, 0, 5, 7, 5, 7, 5, 0, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 255 255"); + IupSetAttribute(image, "2", "255 0 0"); + IupSetAttribute(image, "3", "128 0 128"); + IupSetAttribute(image, "4", "255 0 255"); + IupSetAttribute(image, "5", "255 255 0"); + IupSetAttribute(image, "6", "236 233 216"); + IupSetAttribute(image, "7", "255 255 255"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_MediaPlay8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 0"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_PrintPreview8(void) +{ + unsigned char imgdata[] = { + 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 255, 255, 255, 255, + 255, 1, 5, 5, 5, 5, 5, 5, 5, 1, 1, 255, 255, 255, 255, 255, + 255, 1, 5, 5, 5, 5, 5, 5, 5, 1, 4, 1, 255, 255, 255, 255, + 255, 1, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 255, 255, 255, + 255, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 255, 255, 255, + 255, 1, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 255, 255, 255, + 255, 1, 5, 5, 5, 5, 5, 5, 1, 3, 4, 4, 3, 1, 255, 255, + 255, 1, 5, 5, 5, 5, 5, 1, 3, 2, 2, 4, 3, 3, 1, 255, + 255, 1, 5, 5, 5, 5, 5, 1, 4, 2, 4, 4, 3, 4, 1, 255, + 255, 1, 5, 5, 5, 5, 5, 1, 4, 4, 4, 4, 3, 4, 1, 255, + 255, 1, 5, 5, 5, 5, 5, 1, 3, 4, 4, 2, 3, 3, 1, 255, + 255, 1, 5, 5, 5, 5, 5, 5, 1, 3, 4, 4, 3, 1, 3, 255, + 255, 1, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 3, 1, 1, + 255, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 255, 1, 1, + 255, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 255, 1, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "64 64 64"); + IupSetAttribute(image, "2", "64 255 255"); + IupSetAttribute(image, "3", "128 128 128"); + IupSetAttribute(image, "4", "224 224 224"); + IupSetAttribute(image, "5", "255 255 255"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_WindowsTile8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 0, 255, 255, 0, 1, 1, 1, 1, 1, 0, + 0, 1, 1, 1, 1, 1, 0, 255, 255, 0, 1, 1, 1, 1, 1, 0, + 0, 1, 1, 1, 1, 1, 0, 255, 255, 0, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 0, 255, 255, 0, 1, 1, 1, 1, 1, 0, + 0, 1, 1, 1, 1, 1, 0, 255, 255, 0, 1, 1, 1, 1, 1, 0, + 0, 1, 1, 1, 1, 1, 0, 255, 255, 0, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(16, 16, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "255 255 255"); + IupSetAttribute(image, "2", "0 0 0"); + IupSetAttribute(image, "3", "0 0 0"); + IupSetAttribute(image, "4", "0 0 0"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetAttribute(image, "6", "0 0 0"); + IupSetAttribute(image, "7", "0 0 0"); + IupSetAttribute(image, "8", "0 0 0"); + IupSetAttribute(image, "9", "0 0 0"); + IupSetAttribute(image, "10", "0 0 0"); + IupSetAttribute(image, "11", "0 0 0"); + IupSetAttribute(image, "12", "0 0 0"); + IupSetAttribute(image, "13", "0 0 0"); + IupSetAttribute(image, "14", "0 0 0"); + IupSetAttribute(image, "15", "0 0 0"); + IupSetAttribute(image, "16", "0 0 0"); + IupSetAttribute(image, "17", "0 0 0"); + IupSetAttribute(image, "18", "0 0 0"); + IupSetAttribute(image, "19", "0 0 0"); + IupSetAttribute(image, "20", "0 0 0"); + IupSetAttribute(image, "21", "0 0 0"); + IupSetAttribute(image, "22", "0 0 0"); + IupSetAttribute(image, "23", "0 0 0"); + IupSetAttribute(image, "24", "0 0 0"); + IupSetAttribute(image, "25", "0 0 0"); + IupSetAttribute(image, "26", "0 0 0"); + IupSetAttribute(image, "27", "0 0 0"); + IupSetAttribute(image, "28", "0 0 0"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + diff --git a/iup/srcimglib/iup_imglib_bitmapsgtk.h b/iup/srcimglib/iup_imglib_bitmapsgtk.h new file mode 100755 index 0000000..4b22ad2 --- /dev/null +++ b/iup/srcimglib/iup_imglib_bitmapsgtk.h @@ -0,0 +1,224 @@ +static Ihandle* load_image_iupgtk_close_all(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 30, 30, 30, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 118, 0, 0, 0, 228, 0, 0, 0, 247, 0, 0, 0, 255, 0, 0, 0, 255, 5, 5, 4, 54, 21, 21, 21, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 44, 45, 35, 48, 111, 113, 102, 236, 217, 221, 192, 255, 217, 221, 192, 255, 217, 221, 192, 255, 186, 190, 163, 255, 48, 48, 40, 255, 16, 16, 12, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 35, 36, 29, 169, 191, 193, 175, 255, 198, 202, 166, 255, 196, 201, 165, 255, 198, 203, 167, 255, 201, 206, 169, 255, 85, 88, 71, 255, 27, 28, 22, 91, 25, 25, 25, 4, 31, 31, 31, 3, 31, 31, 31, 3, 14, 14, 14, 3, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 33, 34, 27, 246, 118, 120, 109, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 115, 117, 108, 255, 113, 115, 106, 255, 114, 115, 106, 246, 123, 124, 118, 227, 2, 2, 2, 90, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 12, 12, 9, 255, 225, 228, 205, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 206, 211, 174, 255, 206, 211, 174, 255, 204, 209, 172, 255, 198, 203, 168, 255, 190, 195, 161, 255, 171, 176, 145, 255, 10, 10, 8, 162, 31, 31, 31, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 6, 4, 255, 222, 225, 201, 255, 206, 211, 174, 255, 204, 209, 172, 255, 110, 113, 93, 255, 21, 22, 18, 255, 6, 6, 5, 255, 0, 0, 0, 255, 0, 0, 0, 255, 160, 164, 134, 255, 193, 197, 164, 255, 187, 191, 158, 255, 164, 167, 138, 255, 10, 10, 8, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 219, 223, 197, 255, 205, 210, 173, 255, 174, 178, 147, 255, 118, 120, 107, 255, 217, 221, 192, 255, 217, 221, 192, 255, 217, 221, 192, 255, 186, 190, 163, 255, 48, 48, 40, 255, 177, 180, 149, 255, 183, 188, 155, 255, 157, 158, 132, 255, 10, 10, 8, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 222, 224, 202, 255, 202, 207, 170, 255, 91, 93, 76, 255, 191, 193, 175, 255, 198, 202, 166, 255, 196, 201, 165, 255, 198, 203, 167, 255, 201, 206, 169, 255, 85, 88, 71, 255, 130, 133, 110, 255, 176, 180, 149, 255, 147, 151, 124, 255, 10, 10, 8, 163, 14, 14, 14, 3, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 215, 218, 195, 255, 194, 199, 164, 255, 38, 39, 31, 255, 118, 120, 109, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 115, 117, 108, 255, 113, 115, 106, 255, 114, 115, 106, 246, 123, 124, 118, 227, 2, 2, 2, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 201, 203, 183, 255, 176, 180, 149, 255, 12, 12, 9, 255, 225, 228, 205, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 206, 211, 174, 255, 205, 210, 173, 255, 204, 209, 172, 255, 205, 210, 173, 255, 203, 208, 171, 255, 198, 203, 168, 255, 190, 195, 161, 255, 171, 176, 145, 255, 10, 10, 8, 162, 0, 0, 0, 0, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 170, 173, 149, 255, 143, 147, 121, 255, 6, 6, 4, 255, 222, 225, 201, 255, 206, 211, 174, 255, 204, 209, 172, 255, 110, 113, 93, 255, 21, 22, 18, 255, 6, 6, 5, 255, 0, 0, 0, 255, 0, 0, 0, 255, 160, 164, 134, 255, 193, 197, 164, 255, 187, 191, 158, 255, 164, 167, 138, 255, 10, 10, 8, 162, 0, 0, 0, 0, 31, 31, 31, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 26, 26, 20, 87, 9, 10, 7, 158, 10, 10, 8, 161, 0, 0, 0, 255, 219, 223, 197, 255, 205, 210, 173, 255, 174, 178, 147, 255, 118, 120, 107, 255, 217, 221, 192, 255, 217, 221, 192, 255, 217, 221, 192, 255, 186, 190, 163, 255, 48, 48, 40, 255, 177, 180, 149, 255, 183, 188, 155, 255, 157, 158, 132, 255, 10, 10, 8, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 51, 51, 30, 9, 48, 48, 38, 22, 48, 48, 36, 25, 0, 0, 0, 255, 222, 224, 202, 255, 202, 207, 170, 255, 91, 93, 76, 255, 191, 193, 175, 255, 198, 202, 166, 255, 196, 201, 165, 255, 198, 203, 167, 255, 201, 206, 169, 255, 85, 88, 71, 255, 130, 133, 110, 255, 176, 180, 149, 255, 147, 151, 124, 255, 10, 10, 8, 163, 14, 14, 14, 3, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 215, 218, 195, 255, 194, 199, 164, 255, 38, 39, 31, 255, 118, 120, 109, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 116, 117, 108, 255, 115, 117, 108, 255, 113, 115, 106, 255, 114, 115, 106, 246, 123, 124, 118, 227, 2, 2, 2, 90, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 201, 203, 183, 255, 176, 180, 149, 255, 12, 12, 9, 255, 225, 228, 205, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 206, 211, 174, 255, 206, 211, 174, 255, 204, 209, 172, 255, 198, 203, 168, 255, 190, 195, 161, 255, 171, 176, 145, 255, 10, 10, 8, 162, 31, 31, 31, 6, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 170, 173, 149, 255, 143, 147, 121, 255, 6, 6, 4, 255, 222, 225, 201, 255, 206, 211, 174, 255, 206, 211, 174, 255, 206, 211, 174, 255, 206, 211, 174, 255, 206, 211, 174, 255, 205, 210, 173, 255, 205, 210, 173, 255, 202, 207, 170, 255, 196, 200, 166, 255, 187, 191, 158, 255, 164, 167, 138, 255, 10, 10, 8, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 20, 87, 9, 10, 7, 158, 10, 10, 8, 161, 0, 0, 0, 255, 219, 223, 197, 255, 205, 210, 173, 255, 205, 210, 173, 255, 205, 210, 173, 255, 205, 210, 173, 255, 205, 210, 173, 255, 205, 210, 173, 255, 204, 209, 172, 255, 200, 205, 169, 255, 194, 198, 164, 255, 183, 188, 155, 255, 157, 158, 132, 255, 10, 10, 8, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 30, 9, 48, 48, 38, 22, 48, 48, 36, 25, 0, 0, 0, 255, 222, 224, 202, 255, 202, 207, 170, 255, 202, 207, 170, 255, 201, 206, 170, 255, 201, 206, 170, 255, 199, 204, 168, 255, 200, 205, 169, 255, 198, 203, 168, 255, 194, 199, 164, 255, 188, 192, 159, 255, 179, 183, 151, 255, 149, 153, 126, 255, 10, 10, 8, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 215, 218, 195, 255, 194, 199, 164, 255, 194, 198, 164, 255, 192, 197, 162, 255, 192, 197, 162, 255, 189, 194, 160, 255, 190, 195, 161, 255, 185, 189, 156, 255, 182, 186, 154, 255, 176, 181, 149, 255, 166, 170, 140, 255, 124, 127, 105, 255, 10, 10, 8, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 201, 203, 183, 255, 176, 180, 149, 255, 172, 176, 146, 255, 171, 175, 144, 255, 169, 173, 143, 255, 167, 171, 141, 255, 166, 169, 140, 255, 162, 166, 137, 255, 157, 160, 132, 255, 149, 152, 126, 255, 146, 149, 123, 255, 107, 110, 90, 255, 10, 10, 8, 162, 0, 0, 0, 0, 42, 47, 34, 6, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 170, 173, 149, 255, 143, 147, 121, 255, 138, 142, 116, 255, 136, 140, 115, 255, 134, 138, 113, 255, 133, 137, 112, 255, 129, 132, 109, 255, 125, 128, 105, 255, 117, 120, 99, 255, 113, 116, 96, 255, 109, 112, 92, 255, 67, 69, 56, 255, 10, 10, 8, 162, 51, 51, 39, 33, 37, 37, 27, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 20, 87, 9, 10, 7, 158, 10, 10, 8, 161, 10, 10, 8, 162, 10, 10, 8, 162, 10, 10, 8, 162, 10, 10, 8, 162, 10, 10, 8, 162, 10, 10, 8, 162, 10, 10, 8, 162, 10, 10, 8, 162, 10, 10, 8, 161, 9, 10, 7, 159, 33, 34, 26, 63, 47, 47, 37, 9, 21, 21, 21, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 49, 49, 38, 26, 48, 48, 36, 23, 45, 45, 32, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(24, 24, imgdata); + return image; +} + +static Ihandle* load_image_iupgtk_close(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 3, 31, 31, 31, 3, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 6, 6, 4, 36, 0, 0, 0, 201, 0, 0, 0, 228, 0, 0, 0, 239, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 6, 6, 5, 53, 21, 21, 21, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 33, 33, 21, 8, 1, 1, 0, 204, 181, 184, 165, 255, 228, 231, 210, 255, 228, 231, 210, 255, 228, 231, 210, 255, 228, 231, 210, 255, 228, 231, 210, 255, 135, 138, 118, 255, 51, 52, 43, 255, 33, 33, 27, 14, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 46, 47, 37, 88, 11, 11, 11, 232, 226, 229, 207, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 206, 211, 174, 255, 206, 211, 174, 255, 178, 182, 150, 255, 45, 45, 37, 255, 12, 12, 9, 75, 42, 42, 21, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 35, 36, 29, 169, 157, 159, 144, 255, 226, 229, 207, 255, 198, 202, 166, 255, 196, 201, 165, 255, 198, 203, 167, 255, 199, 204, 168, 255, 201, 206, 169, 255, 201, 206, 169, 255, 85, 88, 71, 255, 26, 27, 21, 168, 45, 45, 37, 13, 25, 25, 25, 4, 31, 31, 31, 3, 31, 31, 31, 3, 31, 31, 31, 3, 28, 28, 28, 3, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 32, 26, 240, 21, 22, 18, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 1, 1, 1, 219, 1, 1, 1, 198, 4, 4, 2, 88, 28, 28, 28, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 35, 36, 29, 252, 218, 221, 200, 255, 235, 237, 221, 255, 232, 235, 217, 255, 232, 235, 217, 255, 232, 235, 217, 255, 232, 235, 217, 255, 232, 235, 217, 255, 232, 235, 217, 255, 232, 235, 217, 255, 232, 235, 217, 255, 232, 235, 217, 255, 232, 235, 217, 255, 232, 235, 217, 255, 231, 234, 216, 255, 227, 230, 212, 255, 222, 225, 208, 255, 218, 220, 204, 255, 218, 220, 209, 255, 0, 0, 0, 255, 47, 47, 39, 12, 0, 0, 0, 1, 20, 20, 15, 0, 0, 0, 0, 0, + 12, 12, 9, 255, 244, 244, 236, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 206, 211, 174, 255, 206, 211, 174, 255, 206, 211, 174, 255, 202, 207, 171, 255, 198, 203, 168, 255, 194, 198, 164, 255, 187, 192, 158, 255, 171, 176, 145, 255, 0, 0, 0, 255, 51, 52, 41, 68, 31, 31, 31, 6, 20, 20, 15, 0, 20, 20, 15, 0, + 12, 12, 9, 255, 244, 244, 236, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 207, 212, 175, 255, 206, 211, 174, 255, 206, 211, 174, 255, 206, 211, 174, 255, 202, 207, 171, 255, 198, 203, 168, 255, 194, 198, 164, 255, 187, 192, 158, 255, 171, 176, 145, 255, 0, 0, 0, 255, 51, 52, 41, 68, 0, 0, 0, 0, 20, 20, 15, 0, 20, 20, 15, 0, + 0, 0, 0, 255, 234, 236, 221, 255, 205, 210, 173, 255, 206, 211, 174, 255, 206, 211, 174, 255, 205, 210, 173, 255, 206, 211, 174, 255, 205, 210, 173, 255, 205, 210, 173, 255, 205, 210, 173, 255, 205, 210, 173, 255, 205, 210, 173, 255, 204, 209, 172, 255, 202, 207, 170, 255, 198, 203, 168, 255, 194, 198, 164, 255, 186, 191, 157, 255, 181, 185, 153, 255, 157, 158, 132, 255, 0, 0, 0, 255, 51, 52, 41, 68, 0, 0, 0, 0, 20, 20, 15, 0, 20, 20, 15, 0, + 0, 0, 0, 255, 234, 236, 221, 255, 205, 210, 173, 255, 206, 211, 174, 255, 206, 211, 174, 255, 205, 210, 173, 255, 206, 211, 174, 255, 205, 210, 173, 255, 205, 210, 173, 255, 205, 210, 173, 255, 205, 210, 173, 255, 205, 210, 173, 255, 204, 209, 172, 255, 202, 207, 170, 255, 198, 203, 168, 255, 194, 198, 164, 255, 186, 191, 157, 255, 181, 185, 153, 255, 157, 158, 132, 255, 0, 0, 0, 255, 51, 52, 41, 68, 0, 0, 0, 0, 20, 20, 15, 0, 20, 20, 15, 0, + 0, 0, 0, 255, 242, 242, 234, 255, 202, 207, 171, 255, 202, 207, 170, 255, 202, 207, 171, 255, 202, 207, 170, 255, 201, 206, 170, 255, 202, 207, 170, 255, 201, 206, 170, 255, 199, 204, 168, 255, 200, 205, 169, 255, 200, 205, 169, 255, 198, 203, 168, 255, 196, 201, 166, 255, 193, 197, 163, 255, 188, 192, 159, 255, 182, 187, 154, 255, 176, 180, 148, 255, 149, 153, 126, 255, 0, 0, 0, 255, 51, 52, 41, 68, 20, 20, 15, 0, 20, 20, 15, 0, 20, 20, 15, 0, + 0, 0, 0, 255, 242, 242, 234, 255, 202, 207, 171, 255, 202, 207, 170, 255, 202, 207, 171, 255, 202, 207, 170, 255, 201, 206, 170, 255, 202, 207, 170, 255, 201, 206, 170, 255, 199, 204, 168, 255, 200, 205, 169, 255, 200, 205, 169, 255, 198, 203, 168, 255, 196, 201, 166, 255, 193, 197, 163, 255, 188, 192, 159, 255, 182, 187, 154, 255, 176, 180, 148, 255, 149, 153, 126, 255, 0, 0, 0, 255, 51, 52, 41, 68, 20, 20, 15, 0, 20, 20, 15, 0, 20, 20, 15, 0, + 0, 0, 0, 255, 236, 236, 226, 255, 195, 200, 165, 255, 194, 199, 164, 255, 194, 199, 164, 255, 194, 198, 164, 255, 192, 197, 162, 255, 194, 198, 164, 255, 191, 196, 161, 255, 189, 194, 160, 255, 192, 197, 162, 255, 189, 194, 160, 255, 185, 189, 156, 255, 185, 190, 157, 255, 179, 183, 151, 255, 176, 181, 149, 255, 169, 173, 143, 255, 163, 167, 138, 255, 124, 127, 105, 255, 0, 0, 0, 255, 51, 52, 41, 68, 20, 20, 15, 0, 20, 20, 15, 0, 20, 20, 15, 0, + 0, 0, 0, 255, 220, 220, 212, 255, 184, 188, 155, 255, 184, 188, 155, 255, 181, 185, 153, 255, 179, 183, 151, 255, 179, 183, 151, 255, 176, 181, 149, 255, 176, 181, 149, 255, 175, 179, 148, 255, 175, 179, 148, 255, 175, 179, 148, 255, 172, 176, 145, 255, 168, 172, 142, 255, 166, 170, 140, 255, 159, 162, 134, 255, 155, 159, 131, 255, 154, 157, 130, 255, 113, 116, 95, 255, 0, 0, 0, 255, 51, 52, 41, 68, 20, 20, 15, 0, 20, 20, 15, 0, 20, 20, 15, 0, + 0, 0, 0, 255, 229, 230, 218, 255, 173, 177, 146, 255, 169, 173, 143, 255, 166, 170, 140, 255, 165, 169, 140, 255, 163, 167, 138, 255, 163, 167, 138, 255, 161, 165, 136, 255, 159, 163, 135, 255, 159, 162, 134, 255, 155, 159, 131, 255, 153, 157, 129, 255, 149, 152, 126, 255, 146, 149, 123, 255, 140, 143, 118, 255, 138, 141, 116, 255, 138, 141, 116, 255, 102, 104, 86, 255, 0, 0, 0, 255, 51, 52, 41, 68, 20, 20, 15, 0, 45, 50, 35, 19, 28, 28, 28, 3, + 0, 0, 0, 255, 192, 195, 175, 255, 148, 152, 124, 255, 143, 147, 121, 255, 139, 143, 117, 255, 138, 142, 116, 255, 136, 140, 115, 255, 136, 140, 115, 255, 133, 137, 112, 255, 134, 137, 113, 255, 130, 134, 110, 255, 128, 131, 108, 255, 125, 128, 105, 255, 121, 124, 102, 255, 114, 117, 96, 255, 113, 116, 96, 255, 113, 116, 95, 255, 106, 109, 89, 255, 67, 69, 56, 255, 0, 0, 0, 255, 51, 52, 41, 68, 51, 51, 39, 33, 42, 42, 31, 9, 0, 0, 0, 1, + 20, 20, 15, 136, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 20, 20, 15, 136, 51, 52, 41, 68, 47, 47, 37, 18, 28, 28, 28, 3, 0, 0, 0, 0, + 50, 50, 40, 37, 50, 52, 40, 56, 51, 52, 41, 66, 50, 51, 40, 67, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 51, 52, 41, 68, 50, 51, 40, 67, 51, 52, 40, 62, 50, 52, 40, 47, 20, 20, 15, 0, 20, 20, 15, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 51, 51, 30, 9, 48, 48, 38, 20, 49, 49, 38, 25, 48, 48, 36, 25, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 51, 51, 40, 26, 48, 48, 36, 25, 49, 49, 37, 23, 47, 47, 35, 16, 42, 42, 28, 7, 20, 20, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 42, 42, 0, 2, 31, 31, 0, 3, 31, 31, 0, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 56, 56, 28, 3, 31, 31, 31, 3, 36, 36, 0, 3, 51, 51, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(24, 24, imgdata); + return image; +} + +static Ihandle* load_image_iupgtk_tile(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 185, 195, 205, 255, 103, 124, 146, 255, 103, 124, 146, 255, 100, 121, 143, 255, 102, 124, 145, 255, 102, 123, 145, 255, 95, 115, 135, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 185, 195, 205, 255, 103, 124, 146, 255, 103, 124, 146, 255, 102, 123, 145, 255, 102, 124, 145, 255, 102, 123, 145, 255, 95, 115, 135, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 178, 189, 200, 255, 98, 119, 141, 255, 98, 119, 141, 255, 95, 116, 138, 255, 96, 117, 139, 255, 95, 116, 138, 255, 89, 109, 130, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 178, 189, 200, 255, 98, 119, 141, 255, 98, 119, 141, 255, 97, 118, 140, 255, 96, 117, 139, 255, 95, 116, 138, 255, 89, 109, 130, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 255, 247, 247, 247, 255, 228, 228, 228, 255, 225, 225, 225, 255, 218, 218, 218, 255, 216, 216, 216, 255, 212, 212, 212, 255, 171, 171, 171, 255, 0, 0, 0, 255, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 255, 244, 244, 244, 255, 225, 225, 225, 255, 223, 223, 223, 255, 219, 219, 219, 255, 216, 216, 216, 255, 214, 214, 214, 255, 172, 172, 172, 255, 0, 0, 0, 255, 0, 0, 0, 3, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 249, 249, 249, 255, 228, 228, 228, 255, 224, 224, 224, 255, 216, 216, 216, 255, 217, 217, 217, 255, 213, 213, 213, 255, 172, 172, 172, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 249, 249, 249, 255, 228, 228, 228, 255, 224, 224, 224, 255, 220, 220, 220, 255, 217, 217, 217, 255, 213, 213, 213, 255, 172, 172, 172, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 248, 248, 248, 255, 224, 224, 224, 255, 220, 220, 220, 255, 212, 212, 212, 255, 213, 213, 213, 255, 209, 209, 209, 255, 169, 169, 169, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 248, 248, 248, 255, 224, 224, 224, 255, 220, 220, 220, 255, 217, 217, 217, 255, 213, 213, 213, 255, 209, 209, 209, 255, 169, 169, 169, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 207, 207, 207, 255, 181, 181, 181, 255, 178, 178, 178, 255, 171, 171, 171, 255, 172, 172, 172, 255, 169, 169, 169, 255, 158, 158, 158, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 207, 207, 207, 255, 181, 181, 181, 255, 178, 178, 178, 255, 175, 175, 175, 255, 172, 172, 172, 255, 169, 169, 169, 255, 158, 158, 158, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 185, 195, 205, 255, 103, 124, 146, 255, 103, 124, 146, 255, 100, 121, 143, 255, 102, 124, 145, 255, 102, 123, 145, 255, 95, 115, 135, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 185, 195, 205, 255, 103, 124, 146, 255, 103, 124, 146, 255, 102, 123, 145, 255, 102, 124, 145, 255, 102, 123, 145, 255, 95, 115, 135, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 178, 189, 200, 255, 98, 119, 141, 255, 98, 119, 141, 255, 95, 116, 138, 255, 96, 117, 139, 255, 95, 116, 138, 255, 89, 109, 130, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 178, 189, 200, 255, 98, 119, 141, 255, 98, 119, 141, 255, 97, 118, 140, 255, 96, 117, 139, 255, 95, 116, 138, 255, 89, 109, 130, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 250, 250, 250, 255, 231, 231, 231, 255, 228, 228, 228, 255, 221, 221, 221, 255, 220, 220, 220, 255, 217, 217, 217, 255, 175, 175, 175, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 250, 250, 250, 255, 231, 231, 231, 255, 228, 228, 228, 255, 224, 224, 224, 255, 220, 220, 220, 255, 217, 217, 217, 255, 175, 175, 175, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 249, 249, 249, 255, 228, 228, 228, 255, 224, 224, 224, 255, 217, 217, 217, 255, 217, 217, 217, 255, 213, 213, 213, 255, 172, 172, 172, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 249, 249, 249, 255, 228, 228, 228, 255, 224, 224, 224, 255, 220, 220, 220, 255, 217, 217, 217, 255, 213, 213, 213, 255, 172, 172, 172, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 248, 248, 248, 255, 224, 224, 224, 255, 220, 220, 220, 255, 214, 214, 214, 255, 213, 213, 213, 255, 209, 209, 209, 255, 169, 169, 169, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 248, 248, 248, 255, 224, 224, 224, 255, 220, 220, 220, 255, 217, 217, 217, 255, 213, 213, 213, 255, 209, 209, 209, 255, 169, 169, 169, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 255, 207, 207, 207, 255, 181, 181, 181, 255, 178, 178, 178, 255, 172, 172, 172, 255, 172, 172, 172, 255, 169, 169, 169, 255, 158, 158, 158, 255, 0, 0, 0, 255, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 255, 207, 207, 207, 255, 181, 181, 181, 255, 178, 178, 178, 255, 175, 175, 175, 255, 172, 172, 172, 255, 169, 169, 169, 255, 158, 158, 158, 255, 0, 0, 0, 255, 0, 0, 0, 3, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(24, 24, imgdata); + return image; +} + +static Ihandle* load_image_iupgtk_save_all(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 238, 0, 0, 0, 89, 0, 0, 0, 13, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 159, 190, 215, 255, 162, 129, 127, 255, 229, 153, 137, 255, 226, 145, 129, 255, 225, 146, 133, 255, 220, 148, 135, 255, 215, 138, 126, 255, 215, 139, 127, 255, 207, 131, 121, 255, 120, 130, 142, 255, 100, 125, 145, 255, 0, 0, 0, 255, 0, 0, 0, 24, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 148, 179, 204, 255, 159, 135, 137, 255, 219, 164, 159, 255, 219, 164, 158, 255, 219, 165, 158, 255, 214, 157, 151, 255, 213, 154, 148, 255, 213, 150, 143, 255, 209, 151, 148, 255, 115, 125, 138, 255, 74, 99, 118, 255, 0, 0, 0, 255, 0, 0, 0, 29, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 146, 176, 201, 255, 181, 181, 181, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 120, 131, 140, 255, 71, 94, 111, 255, 0, 0, 0, 255, 0, 0, 0, 30, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 15, 15, 15, 255, 153, 153, 153, 255, 233, 233, 233, 255, 122, 132, 141, 255, 63, 85, 102, 255, 0, 0, 0, 255, 0, 0, 0, 30, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 159, 190, 215, 255, 162, 129, 127, 255, 229, 153, 137, 255, 226, 145, 129, 255, 225, 146, 133, 255, 220, 148, 135, 255, 215, 138, 126, 255, 215, 139, 127, 255, 207, 131, 121, 255, 120, 130, 142, 255, 100, 125, 145, 255, 0, 0, 0, 255, 239, 239, 239, 255, 122, 132, 141, 255, 65, 83, 96, 255, 0, 0, 0, 255, 0, 0, 0, 30, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 148, 179, 204, 255, 159, 135, 137, 255, 219, 164, 159, 255, 219, 164, 158, 255, 219, 165, 158, 255, 214, 157, 151, 255, 213, 154, 148, 255, 213, 150, 143, 255, 209, 151, 148, 255, 115, 125, 138, 255, 74, 99, 118, 255, 0, 0, 0, 255, 251, 251, 251, 255, 120, 131, 140, 255, 72, 82, 90, 255, 0, 0, 0, 255, 0, 0, 0, 30, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 146, 176, 201, 255, 181, 181, 181, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 120, 131, 140, 255, 71, 94, 111, 255, 0, 0, 0, 255, 125, 141, 155, 255, 127, 151, 170, 255, 49, 68, 81, 255, 0, 0, 0, 255, 0, 0, 0, 11, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 15, 15, 15, 255, 153, 153, 153, 255, 233, 233, 233, 255, 122, 132, 141, 255, 63, 85, 102, 255, 0, 0, 0, 255, 63, 79, 91, 255, 130, 158, 183, 255, 48, 64, 73, 255, 0, 0, 0, 255, 0, 0, 0, 30, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 255, 159, 190, 215, 255, 162, 129, 127, 255, 229, 153, 137, 255, 226, 145, 129, 255, 225, 146, 133, 255, 220, 148, 135, 255, 215, 138, 126, 255, 215, 139, 127, 255, 207, 131, 121, 255, 120, 130, 142, 255, 100, 125, 145, 255, 0, 0, 0, 255, 239, 239, 239, 255, 122, 132, 141, 255, 65, 83, 96, 255, 0, 0, 0, 255, 73, 94, 111, 255, 115, 144, 164, 255, 44, 56, 65, 255, 0, 0, 0, 255, 0, 0, 0, 30, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 255, 148, 179, 204, 255, 159, 135, 137, 255, 219, 164, 159, 255, 219, 164, 158, 255, 219, 165, 158, 255, 214, 157, 151, 255, 213, 154, 148, 255, 213, 150, 143, 255, 209, 151, 148, 255, 115, 125, 138, 255, 74, 99, 118, 255, 0, 0, 0, 255, 251, 251, 251, 255, 120, 131, 140, 255, 72, 82, 90, 255, 0, 0, 0, 255, 76, 96, 111, 255, 112, 142, 162, 255, 47, 56, 62, 255, 0, 0, 0, 255, 0, 0, 0, 30, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 255, 146, 176, 201, 255, 181, 181, 181, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 120, 131, 140, 255, 71, 94, 111, 255, 0, 0, 0, 255, 125, 141, 155, 255, 127, 151, 170, 255, 49, 68, 81, 255, 0, 0, 0, 255, 70, 89, 103, 255, 106, 134, 154, 255, 49, 53, 57, 255, 0, 0, 0, 255, 0, 0, 0, 30, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 255, 144, 174, 199, 255, 167, 167, 167, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 233, 233, 233, 255, 122, 132, 141, 255, 63, 85, 102, 255, 0, 0, 0, 255, 63, 79, 91, 255, 130, 158, 183, 255, 48, 64, 73, 255, 0, 0, 0, 255, 7, 9, 10, 255, 24, 30, 36, 255, 5, 6, 6, 240, 0, 0, 0, 110, 0, 0, 0, 30, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 255, 140, 172, 196, 255, 174, 174, 174, 255, 240, 240, 240, 255, 240, 240, 240, 255, 240, 240, 240, 255, 240, 240, 240, 255, 240, 240, 240, 255, 240, 240, 240, 255, 239, 239, 239, 255, 122, 132, 141, 255, 65, 83, 96, 255, 0, 0, 0, 255, 73, 94, 111, 255, 115, 144, 164, 255, 44, 56, 65, 255, 0, 0, 0, 255, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 142, 173, 194, 255, 179, 167, 167, 255, 252, 252, 252, 255, 252, 252, 252, 255, 252, 252, 252, 255, 252, 252, 252, 255, 252, 252, 252, 255, 252, 252, 252, 255, 251, 251, 251, 255, 120, 131, 140, 255, 72, 82, 90, 255, 0, 0, 0, 255, 76, 96, 111, 255, 112, 142, 162, 255, 47, 56, 62, 255, 0, 0, 0, 255, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 255, 132, 164, 189, 255, 126, 148, 165, 255, 125, 142, 156, 255, 122, 140, 155, 255, 123, 140, 155, 255, 119, 138, 153, 255, 125, 142, 156, 255, 126, 143, 157, 255, 125, 141, 155, 255, 127, 151, 170, 255, 49, 68, 81, 255, 0, 0, 0, 255, 70, 89, 103, 255, 106, 134, 154, 255, 49, 53, 57, 255, 0, 0, 0, 255, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 255, 128, 160, 186, 255, 107, 137, 161, 255, 91, 97, 98, 255, 119, 125, 130, 255, 132, 141, 148, 255, 127, 136, 141, 255, 118, 126, 131, 255, 102, 108, 112, 255, 63, 79, 91, 255, 130, 158, 183, 255, 48, 64, 73, 255, 0, 0, 0, 255, 7, 9, 10, 255, 24, 30, 36, 255, 5, 6, 6, 240, 0, 0, 0, 110, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 124, 157, 181, 255, 87, 107, 123, 255, 216, 214, 209, 255, 119, 117, 111, 255, 94, 91, 84, 255, 211, 209, 205, 255, 192, 188, 181, 255, 200, 199, 193, 255, 73, 94, 111, 255, 115, 144, 164, 255, 44, 56, 65, 255, 0, 0, 0, 255, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 255, 121, 155, 179, 255, 87, 104, 119, 255, 227, 225, 222, 255, 98, 95, 88, 255, 80, 77, 69, 255, 197, 194, 188, 255, 201, 197, 191, 255, 226, 224, 222, 255, 76, 96, 111, 255, 112, 142, 162, 255, 47, 56, 62, 255, 0, 0, 0, 255, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 208, 100, 121, 139, 255, 79, 97, 110, 255, 204, 201, 196, 255, 108, 104, 97, 255, 106, 103, 96, 255, 204, 200, 195, 255, 231, 230, 227, 255, 220, 219, 215, 255, 70, 89, 103, 255, 106, 134, 154, 255, 49, 53, 57, 255, 0, 0, 0, 255, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 85, 7, 9, 10, 208, 8, 10, 11, 255, 17, 17, 16, 255, 19, 18, 18, 255, 21, 21, 20, 255, 23, 23, 22, 255, 24, 24, 24, 255, 19, 19, 18, 255, 7, 9, 10, 255, 24, 30, 36, 255, 5, 6, 6, 240, 0, 0, 0, 110, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 8, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0}; + + Ihandle* image = IupImageRGBA(24, 24, imgdata); + return image; +} + +static Ihandle* load_image_iupgtk_text(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 88, 88, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 246, 0, 0, 0, 242, 14, 14, 14, 255, 40, 40, 40, 255, 97, 97, 97, 219, 0, 0, 0, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 211, 211, 211, 255, 246, 246, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 249, 249, 255, 249, 249, 248, 255, 249, 249, 248, 255, 231, 231, 231, 255, 228, 228, 228, 255, 205, 205, 205, 255, 31, 31, 31, 228, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 246, 246, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 249, 248, 255, 239, 239, 238, 255, 175, 175, 174, 255, 233, 233, 233, 255, 255, 255, 255, 255, 179, 179, 179, 255, 56, 56, 56, 253, 0, 0, 0, 14, 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 194, 194, 194, 255, 194, 194, 194, 255, 194, 194, 194, 255, 194, 194, 194, 255, 194, 194, 194, 255, 193, 193, 193, 255, 194, 194, 194, 255, 193, 193, 193, 255, 192, 192, 192, 255, 189, 189, 188, 255, 181, 181, 181, 255, 164, 164, 163, 255, 240, 240, 240, 255, 255, 255, 255, 255, 244, 244, 244, 255, 171, 171, 171, 255, 5, 5, 5, 153, 0, 0, 0, 11, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 253, 253, 253, 255, 252, 252, 251, 255, 253, 253, 253, 255, 252, 252, 251, 255, 251, 251, 251, 255, 249, 249, 248, 255, 242, 242, 242, 255, 158, 158, 158, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 58, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 194, 194, 194, 255, 193, 193, 193, 255, 192, 192, 192, 255, 191, 191, 190, 255, 190, 190, 190, 255, 190, 190, 189, 255, 190, 190, 190, 255, 190, 190, 189, 255, 189, 189, 188, 255, 189, 189, 188, 255, 185, 185, 185, 255, 161, 161, 160, 255, 161, 161, 160, 255, 130, 130, 128, 255, 130, 130, 128, 255, 130, 130, 128, 255, 0, 0, 0, 255, 0, 0, 0, 58, 0, 0, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 254, 254, 254, 255, 253, 253, 253, 255, 252, 252, 251, 255, 251, 251, 251, 255, 250, 250, 249, 255, 249, 249, 248, 255, 248, 248, 247, 255, 249, 249, 248, 255, 248, 248, 247, 255, 248, 247, 246, 255, 248, 248, 247, 255, 248, 248, 247, 255, 242, 242, 242, 255, 224, 224, 223, 255, 224, 224, 223, 255, 224, 224, 223, 255, 161, 155, 144, 255, 0, 0, 0, 255, 0, 0, 0, 58, 0, 0, 0, 20, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 252, 252, 251, 255, 190, 190, 190, 255, 190, 190, 189, 255, 189, 189, 188, 255, 188, 188, 187, 255, 188, 187, 187, 255, 187, 187, 186, 255, 188, 187, 187, 255, 187, 187, 186, 255, 187, 187, 185, 255, 185, 184, 184, 255, 183, 182, 181, 255, 183, 182, 181, 255, 183, 182, 181, 255, 183, 182, 181, 255, 229, 228, 227, 255, 161, 155, 144, 255, 0, 0, 0, 255, 0, 0, 0, 58, 0, 0, 0, 28, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 250, 250, 249, 255, 249, 249, 248, 255, 248, 248, 247, 255, 248, 247, 246, 255, 247, 246, 245, 255, 246, 246, 244, 255, 245, 244, 243, 255, 246, 246, 244, 255, 245, 244, 243, 255, 244, 243, 242, 255, 244, 243, 242, 255, 243, 242, 241, 255, 244, 243, 242, 255, 244, 243, 242, 255, 244, 243, 242, 255, 229, 228, 227, 255, 161, 155, 144, 255, 0, 0, 0, 255, 0, 0, 0, 58, 0, 0, 0, 27, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 248, 248, 247, 255, 188, 187, 187, 255, 187, 187, 186, 255, 187, 187, 185, 255, 186, 185, 184, 255, 185, 184, 184, 255, 184, 184, 183, 255, 185, 184, 184, 255, 184, 184, 183, 255, 184, 184, 182, 255, 180, 180, 179, 255, 183, 182, 181, 255, 183, 182, 181, 255, 183, 182, 181, 255, 183, 182, 181, 255, 229, 228, 227, 255, 161, 155, 144, 255, 0, 0, 0, 255, 0, 0, 0, 58, 0, 0, 0, 19, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 246, 245, 244, 255, 245, 245, 243, 255, 244, 243, 242, 255, 244, 243, 242, 255, 243, 243, 241, 255, 242, 242, 240, 255, 241, 241, 239, 255, 242, 242, 240, 255, 241, 241, 239, 255, 240, 239, 237, 255, 244, 243, 242, 255, 244, 243, 242, 255, 244, 243, 242, 255, 244, 243, 242, 255, 244, 243, 242, 255, 229, 228, 227, 255, 161, 155, 144, 255, 0, 0, 0, 255, 0, 0, 0, 58, 0, 0, 0, 12, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 244, 243, 242, 255, 184, 184, 183, 255, 184, 184, 182, 255, 182, 182, 181, 255, 181, 181, 180, 255, 183, 182, 181, 255, 182, 181, 180, 255, 183, 182, 181, 255, 181, 180, 179, 255, 183, 182, 181, 255, 183, 182, 181, 255, 183, 182, 181, 255, 183, 182, 181, 255, 183, 182, 181, 255, 183, 182, 181, 255, 229, 228, 227, 255, 161, 155, 144, 255, 0, 0, 0, 255, 0, 0, 0, 58, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 244, 243, 242, 255, 243, 242, 241, 255, 242, 242, 240, 255, 240, 240, 238, 255, 239, 239, 237, 255, 241, 240, 238, 255, 240, 239, 237, 255, 240, 239, 237, 255, 244, 243, 242, 255, 244, 243, 242, 255, 244, 243, 242, 255, 244, 243, 242, 255, 244, 243, 242, 255, 244, 243, 242, 255, 229, 228, 227, 255, 229, 228, 227, 255, 158, 153, 142, 255, 0, 0, 0, 255, 0, 0, 0, 47, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 240, 240, 238, 255, 181, 181, 180, 255, 181, 181, 180, 255, 181, 181, 179, 255, 181, 180, 178, 255, 180, 179, 178, 255, 179, 178, 177, 255, 174, 173, 172, 255, 174, 173, 172, 255, 174, 173, 172, 255, 174, 173, 172, 255, 174, 173, 172, 255, 174, 173, 172, 255, 174, 173, 172, 255, 174, 173, 172, 255, 218, 217, 213, 255, 159, 154, 142, 255, 0, 0, 0, 255, 0, 0, 0, 47, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 237, 237, 235, 255, 237, 236, 234, 255, 236, 235, 233, 255, 236, 235, 233, 255, 236, 235, 233, 255, 236, 235, 233, 255, 236, 235, 233, 255, 236, 235, 233, 255, 236, 235, 233, 255, 236, 235, 233, 255, 229, 228, 227, 255, 229, 228, 227, 255, 229, 228, 227, 255, 218, 217, 213, 255, 218, 217, 213, 255, 219, 218, 214, 255, 161, 155, 144, 255, 0, 0, 0, 255, 0, 0, 0, 47, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 235, 234, 232, 255, 177, 176, 174, 255, 177, 176, 174, 255, 176, 175, 174, 255, 176, 175, 173, 255, 176, 175, 174, 255, 176, 175, 174, 255, 176, 175, 174, 255, 176, 175, 174, 255, 176, 175, 174, 255, 176, 175, 174, 255, 176, 175, 174, 255, 176, 175, 174, 255, 176, 175, 174, 255, 176, 175, 174, 255, 220, 219, 215, 255, 161, 155, 144, 255, 0, 0, 0, 255, 0, 0, 0, 47, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 231, 230, 227, 255, 230, 229, 226, 255, 230, 229, 226, 255, 230, 229, 226, 255, 229, 228, 225, 255, 228, 226, 223, 255, 224, 223, 219, 255, 221, 219, 217, 255, 222, 221, 217, 255, 213, 212, 209, 255, 218, 217, 213, 255, 217, 216, 212, 255, 219, 218, 214, 255, 218, 217, 213, 255, 219, 217, 213, 255, 217, 215, 211, 255, 159, 153, 141, 255, 0, 0, 0, 255, 0, 0, 0, 47, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 249, 249, 249, 255, 228, 227, 224, 255, 227, 226, 223, 255, 227, 226, 222, 255, 228, 226, 223, 255, 228, 227, 223, 255, 224, 223, 219, 255, 222, 221, 217, 255, 218, 217, 213, 255, 216, 215, 211, 255, 218, 217, 213, 255, 221, 220, 216, 255, 220, 219, 215, 255, 220, 218, 214, 255, 220, 218, 214, 255, 217, 215, 211, 255, 216, 214, 210, 255, 158, 152, 141, 255, 0, 0, 0, 255, 0, 0, 0, 47, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 237, 237, 237, 255, 225, 224, 221, 255, 225, 223, 220, 255, 225, 224, 220, 255, 224, 223, 219, 255, 226, 225, 221, 255, 223, 222, 218, 255, 223, 222, 218, 255, 219, 218, 214, 255, 220, 219, 215, 255, 221, 220, 216, 255, 222, 220, 216, 255, 220, 218, 214, 255, 220, 218, 214, 255, 217, 215, 211, 255, 216, 214, 209, 255, 215, 213, 209, 255, 157, 151, 139, 255, 0, 0, 0, 255, 0, 0, 0, 47, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 209, 209, 209, 255, 225, 223, 219, 255, 224, 222, 218, 255, 223, 222, 218, 255, 222, 221, 217, 255, 224, 223, 219, 255, 222, 221, 217, 255, 223, 221, 217, 255, 220, 219, 215, 255, 222, 220, 216, 255, 221, 219, 215, 255, 222, 220, 216, 255, 220, 218, 214, 255, 220, 218, 214, 255, 216, 214, 210, 255, 215, 214, 209, 255, 213, 211, 206, 255, 155, 149, 138, 255, 0, 0, 0, 255, 0, 0, 0, 47, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 153, 152, 145, 255, 163, 158, 146, 255, 164, 158, 147, 255, 163, 157, 146, 255, 163, 157, 145, 255, 163, 157, 146, 255, 161, 156, 144, 255, 162, 156, 144, 255, 161, 156, 144, 255, 162, 156, 144, 255, 161, 155, 143, 255, 161, 155, 144, 255, 159, 153, 141, 255, 159, 153, 141, 255, 157, 151, 140, 255, 157, 151, 140, 255, 155, 150, 138, 255, 103, 99, 89, 255, 0, 0, 0, 255, 0, 0, 0, 46, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 125, 0, 0, 0, 42, 0, 0, 0, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 23, 0, 0, 0, 42, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 42, 0, 0, 0, 23, 0, 0, 0, 4}; + + Ihandle* image = IupImageRGBA(24, 24, imgdata); + return image; +} + +static Ihandle* load_image_iupgtk_zoom(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 73, 73, 78, 52, 52, 52, 163, 45, 45, 45, 221, 41, 41, 41, 251, 38, 38, 38, 251, 38, 38, 38, 221, 38, 38, 38, 163, 53, 53, 53, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 93, 93, 50, 46, 46, 46, 192, 48, 48, 48, 255, 115, 115, 115, 255, 161, 161, 161, 255, 180, 180, 180, 255, 178, 178, 178, 255, 157, 157, 157, 255, 103, 103, 103, 255, 32, 32, 32, 255, 28, 28, 28, 192, 55, 55, 55, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 78, 39, 39, 39, 251, 97, 97, 97, 255, 180, 180, 180, 255, 202, 202, 202, 255, 207, 207, 207, 255, 208, 208, 208, 255, 206, 206, 206, 255, 201, 201, 201, 255, 193, 193, 193, 255, 167, 167, 167, 255, 76, 76, 76, 255, 19, 19, 19, 251, 35, 35, 35, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79, 79, 79, 50, 34, 34, 34, 251, 117, 117, 117, 255, 202, 202, 202, 255, 211, 211, 211, 255, 219, 219, 219, 255, 231, 231, 231, 255, 239, 239, 239, 255, 243, 243, 243, 255, 241, 241, 241, 255, 229, 229, 229, 255, 210, 210, 210, 255, 188, 188, 188, 255, 94, 94, 94, 255, 16, 16, 16, 251, 36, 36, 36, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 192, 91, 91, 91, 255, 204, 204, 204, 255, 215, 215, 215, 255, 229, 229, 229, 255, 245, 245, 245, 255, 250, 250, 250, 255, 251, 251, 251, 255, 250, 250, 250, 255, 248, 248, 248, 255, 245, 245, 245, 255, 240, 240, 240, 255, 225, 225, 225, 255, 194, 194, 194, 255, 67, 67, 67, 255, 15, 15, 15, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 48, 48, 48, 78, 31, 31, 31, 255, 185, 185, 185, 255, 214, 214, 214, 255, 231, 231, 231, 255, 249, 249, 249, 255, 251, 251, 251, 255, 253, 253, 253, 255, 253, 253, 253, 255, 252, 252, 252, 255, 251, 251, 251, 255, 248, 248, 248, 255, 242, 242, 242, 255, 236, 236, 236, 255, 228, 228, 228, 255, 171, 171, 171, 255, 14, 14, 14, 255, 18, 18, 18, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 27, 27, 27, 163, 109, 109, 109, 255, 210, 210, 210, 255, 225, 225, 225, 255, 245, 245, 245, 255, 250, 250, 250, 255, 253, 253, 253, 255, 254, 254, 254, 255, 254, 254, 254, 255, 253, 253, 253, 255, 252, 252, 252, 255, 249, 249, 249, 255, 245, 245, 245, 255, 238, 238, 238, 255, 230, 230, 230, 255, 219, 219, 219, 255, 87, 87, 87, 255, 9, 9, 9, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 20, 20, 20, 221, 168, 168, 168, 255, 216, 216, 216, 255, 238, 238, 238, 255, 246, 246, 246, 255, 249, 249, 249, 255, 252, 252, 252, 255, 254, 254, 254, 255, 254, 254, 254, 255, 253, 253, 253, 255, 251, 251, 251, 255, 248, 248, 248, 255, 244, 244, 244, 255, 238, 238, 238, 255, 230, 230, 230, 255, 220, 220, 220, 255, 155, 155, 155, 255, 6, 6, 6, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 17, 17, 251, 197, 197, 197, 255, 223, 223, 223, 255, 239, 239, 239, 255, 245, 245, 245, 255, 246, 246, 246, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 246, 246, 246, 255, 237, 237, 237, 255, 229, 229, 229, 255, 219, 219, 219, 255, 191, 191, 191, 255, 6, 6, 6, 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 14, 14, 14, 251, 198, 198, 198, 255, 227, 227, 227, 255, 236, 236, 236, 255, 242, 242, 242, 255, 246, 246, 246, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 246, 246, 246, 255, 234, 234, 234, 255, 224, 224, 224, 255, 215, 215, 215, 255, 186, 186, 186, 255, 5, 5, 5, 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 11, 11, 11, 221, 165, 165, 165, 255, 225, 225, 225, 255, 231, 231, 231, 255, 237, 237, 237, 255, 241, 241, 241, 255, 244, 244, 244, 255, 246, 246, 246, 255, 246, 246, 246, 255, 245, 245, 245, 255, 243, 243, 243, 255, 239, 239, 239, 255, 236, 236, 236, 255, 228, 228, 228, 255, 219, 219, 219, 255, 209, 209, 209, 255, 147, 147, 147, 255, 2, 2, 2, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 10, 10, 163, 95, 95, 95, 255, 217, 217, 217, 255, 225, 225, 225, 255, 230, 230, 230, 255, 235, 235, 235, 255, 238, 238, 238, 255, 239, 239, 239, 255, 239, 239, 239, 255, 238, 238, 238, 255, 237, 237, 237, 255, 233, 233, 233, 255, 228, 228, 228, 255, 219, 219, 219, 255, 212, 212, 212, 255, 202, 202, 202, 255, 76, 76, 76, 255, 0, 0, 0, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 12, 12, 12, 78, 10, 10, 10, 255, 180, 180, 180, 255, 216, 216, 216, 255, 220, 220, 220, 255, 226, 226, 226, 255, 229, 229, 229, 255, 230, 230, 230, 255, 230, 230, 230, 255, 231, 231, 231, 255, 227, 227, 227, 255, 223, 223, 223, 255, 218, 218, 218, 255, 212, 212, 212, 255, 203, 203, 203, 255, 161, 161, 161, 255, 2, 2, 2, 255, 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 31, 6, 6, 6, 192, 59, 59, 59, 255, 204, 204, 204, 255, 210, 210, 210, 255, 212, 212, 212, 255, 218, 218, 218, 255, 219, 219, 219, 255, 218, 218, 218, 255, 219, 219, 219, 255, 216, 216, 216, 255, 213, 213, 213, 255, 208, 208, 208, 255, 200, 200, 200, 255, 189, 189, 189, 255, 46, 46, 46, 255, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 50, 5, 5, 5, 251, 81, 81, 81, 255, 194, 194, 194, 255, 199, 199, 199, 255, 203, 203, 203, 255, 204, 204, 204, 255, 205, 205, 205, 255, 203, 203, 203, 255, 203, 203, 203, 255, 200, 200, 200, 255, 194, 194, 194, 255, 184, 184, 184, 255, 69, 69, 69, 255, 0, 0, 0, 251, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 3, 3, 3, 78, 3, 3, 3, 251, 49, 49, 49, 255, 153, 153, 153, 255, 187, 187, 187, 255, 189, 189, 189, 255, 188, 188, 188, 255, 188, 188, 188, 255, 188, 188, 188, 255, 182, 182, 182, 255, 144, 144, 144, 255, 43, 43, 43, 255, 0, 0, 0, 251, 0, 0, 0, 241, 0, 0, 0, 242, 0, 0, 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 50, 1, 1, 1, 192, 3, 3, 3, 255, 65, 65, 65, 255, 122, 122, 122, 255, 154, 154, 154, 255, 154, 154, 154, 255, 119, 119, 119, 255, 60, 60, 60, 255, 0, 0, 0, 255, 0, 0, 0, 192, 0, 0, 0, 50, 0, 0, 0, 223, 0, 0, 0, 240, 0, 0, 0, 243, 0, 0, 0, 223, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 78, 0, 0, 0, 163, 0, 0, 0, 221, 0, 0, 0, 251, 0, 0, 0, 251, 0, 0, 0, 221, 0, 0, 0, 163, 0, 0, 0, 78, 0, 0, 0, 58, 0, 0, 0, 31, 0, 0, 0, 31, 32, 32, 32, 243, 32, 32, 32, 244, 0, 0, 0, 246, 0, 0, 0, 241, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 236, 104, 104, 104, 251, 52, 52, 52, 247, 0, 0, 0, 242, 0, 0, 0, 246, 0, 0, 0, 31, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 243, 121, 121, 121, 253, 58, 58, 58, 252, 0, 0, 0, 243, 0, 0, 0, 244, 0, 0, 0, 31, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 248, 104, 104, 104, 251, 31, 31, 31, 251, 0, 0, 0, 244, 0, 0, 0, 31, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 231, 0, 0, 0, 253, 0, 0, 0, 63, 0, 0, 0, 31, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(24, 24, imgdata); + return image; +} + +static Ihandle* load_image_iupgtk_cascade(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 185, 195, 205, 255, 102, 123, 145, 255, 102, 123, 144, 255, 101, 122, 143, 255, 101, 123, 143, 255, 100, 121, 143, 255, 93, 113, 133, 255, 0, 0, 0, 255, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 177, 188, 199, 255, 98, 119, 141, 255, 98, 119, 141, 255, 97, 118, 140, 255, 96, 117, 139, 255, 95, 116, 138, 255, 89, 109, 130, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 248, 248, 248, 255, 231, 231, 231, 255, 228, 228, 228, 255, 224, 224, 224, 255, 220, 220, 220, 255, 217, 217, 217, 255, 175, 175, 175, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 247, 247, 247, 255, 228, 228, 228, 255, 224, 224, 224, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 245, 245, 245, 255, 224, 224, 224, 255, 220, 220, 220, 255, 0, 0, 0, 255, 185, 195, 205, 255, 103, 124, 146, 255, 103, 124, 146, 255, 102, 123, 145, 255, 102, 124, 145, 255, 102, 123, 145, 255, 95, 115, 135, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 204, 204, 204, 255, 181, 181, 181, 255, 178, 178, 178, 255, 0, 0, 0, 255, 178, 189, 200, 255, 98, 119, 141, 255, 98, 119, 141, 255, 97, 118, 140, 255, 96, 117, 139, 255, 95, 116, 138, 255, 89, 109, 130, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 250, 250, 250, 255, 231, 231, 231, 255, 228, 228, 228, 255, 224, 224, 224, 255, 220, 220, 220, 255, 217, 217, 217, 255, 175, 175, 175, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 249, 249, 249, 255, 228, 228, 228, 255, 224, 224, 224, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 248, 248, 248, 255, 224, 224, 224, 255, 220, 220, 220, 255, 0, 0, 0, 255, 185, 195, 205, 255, 103, 124, 146, 255, 103, 124, 146, 255, 102, 123, 145, 255, 102, 124, 145, 255, 102, 123, 145, 255, 95, 115, 135, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 207, 207, 207, 255, 181, 181, 181, 255, 178, 178, 178, 255, 0, 0, 0, 255, 178, 189, 200, 255, 98, 119, 141, 255, 98, 119, 141, 255, 97, 118, 140, 255, 96, 117, 139, 255, 95, 116, 138, 255, 89, 109, 130, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 250, 250, 250, 255, 231, 231, 231, 255, 228, 228, 228, 255, 224, 224, 224, 255, 220, 220, 220, 255, 217, 217, 217, 255, 175, 175, 175, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 249, 249, 249, 255, 228, 228, 228, 255, 224, 224, 224, 255, 220, 220, 220, 255, 217, 217, 217, 255, 213, 213, 213, 255, 172, 172, 172, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 248, 248, 248, 255, 224, 224, 224, 255, 220, 220, 220, 255, 217, 217, 217, 255, 213, 213, 213, 255, 209, 209, 209, 255, 169, 169, 169, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 207, 207, 207, 255, 181, 181, 181, 255, 178, 178, 178, 255, 175, 175, 175, 255, 172, 172, 172, 255, 169, 169, 169, 255, 158, 158, 158, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 6, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1}; + + Ihandle* image = IupImageRGBA(24, 24, imgdata); + return image; +} + diff --git a/iup/srcimglib/iup_imglib_icons.h b/iup/srcimglib/iup_imglib_icons.h new file mode 100755 index 0000000..f369eb6 --- /dev/null +++ b/iup/srcimglib/iup_imglib_icons.h @@ -0,0 +1,240 @@ +static Ihandle* load_image_Tecgraf(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 95, 108, 1, 90, 100, 117, 99, 123, 138, 166, 126, 137, 152, 181, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 105, 123, 147, 122, 137, 165, 255, 136, 152, 183, 255, 132, 149, 179, 250, 133, 149, 178, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 100, 115, 43, 111, 125, 150, 253, 140, 158, 190, 255, 135, 151, 182, 255, 132, 149, 179, 255, 131, 147, 177, 217, 153, 164, 188, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 113, 134, 148, 134, 151, 182, 255, 137, 154, 185, 255, 115, 129, 154, 252, 114, 128, 155, 255, 130, 146, 175, 255, 132, 147, 175, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 159, 162, 3, 108, 121, 145, 230, 144, 162, 195, 255, 137, 154, 185, 197, 74, 79, 86, 45, 41, 46, 55, 246, 120, 134, 162, 255, 129, 145, 174, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 101, 113, 48, 124, 139, 167, 255, 144, 161, 194, 255, 138, 155, 186, 67, 0, 0, 0, 0, 49, 54, 62, 150, 87, 98, 118, 255, 128, 144, 173, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 113, 132, 105, 137, 154, 185, 255, 139, 156, 188, 231, 143, 159, 187, 3, 0, 0, 0, 0, 64, 68, 76, 61, 70, 79, 95, 255, 127, 143, 172, 254, 134, 149, 175, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 121, 142, 153, 141, 159, 191, 255, 139, 156, 188, 164, 0, 0, 0, 0, 0, 0, 0, 0, 79, 82, 87, 3, 69, 77, 92, 241, 122, 137, 165, 255, 127, 142, 170, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 122, 146, 191, 145, 163, 196, 255, 139, 156, 188, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 86, 101, 190, 115, 129, 156, 255, 126, 141, 170, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 125, 149, 227, 150, 168, 201, 255, 141, 157, 188, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 91, 107, 144, 113, 127, 153, 255, 125, 140, 169, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163, 165, 167, 2, 112, 125, 150, 252, 155, 173, 203, 255, 143, 159, 189, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 94, 110, 109, 114, 128, 155, 255, 125, 140, 168, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 167, 181, 1, 120, 130, 149, 33, 48, 53, 59, 69, 43, 46, 52, 100, 50, 54, 59, 137, 116, 130, 156, 255, 155, 171, 201, 255, 105, 118, 142, 155, 104, 117, 141, 151, 105, 118, 141, 151, 105, 118, 142, 151, 101, 113, 136, 185, 111, 124, 150, 255, 116, 130, 156, 220, 112, 125, 148, 95, 115, 127, 150, 67, 123, 134, 156, 33, 168, 176, 190, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 129, 147, 5, 109, 121, 142, 71, 106, 118, 140, 140, 105, 117, 140, 197, 107, 120, 144, 242, 120, 135, 162, 255, 123, 137, 163, 255, 44, 49, 58, 255, 28, 32, 39, 255, 125, 139, 164, 255, 150, 167, 197, 255, 138, 155, 186, 255, 131, 148, 178, 255, 125, 141, 170, 255, 119, 134, 162, 255, 114, 128, 154, 255, 108, 122, 147, 255, 104, 117, 141, 255, 102, 115, 138, 255, 103, 116, 139, 255, 107, 120, 145, 255, 111, 124, 149, 245, 113, 126, 151, 200, 113, 127, 152, 140, 116, 129, 154, 71, 122, 135, 158, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 118, 128, 145, 14, 106, 118, 140, 130, 104, 116, 139, 234, 105, 118, 142, 255, 128, 144, 173, 255, 147, 165, 199, 255, 157, 177, 213, 255, 150, 168, 202, 255, 140, 156, 187, 229, 41, 45, 52, 196, 39, 43, 51, 183, 130, 143, 168, 255, 144, 161, 192, 233, 109, 122, 145, 109, 105, 116, 138, 109, 99, 110, 130, 109, 92, 103, 123, 109, 91, 100, 117, 145, 97, 109, 131, 255, 95, 106, 128, 248, 74, 83, 97, 193, 64, 72, 85, 227, 56, 63, 75, 255, 55, 62, 75, 255, 65, 73, 88, 255, 90, 101, 121, 255, 111, 125, 150, 255, 114, 128, 154, 236, 116, 129, 155, 130, 127, 140, 165, 16, 0, 0, 0, 0, + 95, 101, 113, 22, 103, 115, 137, 220, 103, 116, 140, 255, 110, 123, 148, 255, 146, 165, 198, 255, 147, 165, 197, 232, 142, 158, 188, 147, 131, 144, 169, 78, 115, 123, 139, 20, 0, 0, 0, 0, 0, 0, 0, 0, 91, 97, 108, 68, 128, 142, 167, 255, 144, 162, 193, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 100, 107, 31, 120, 135, 163, 255, 133, 150, 180, 231, 0, 0, 0, 0, 0, 0, 0, 0, 86, 89, 93, 20, 50, 54, 61, 73, 37, 40, 46, 141, 33, 36, 42, 230, 46, 52, 63, 255, 107, 120, 144, 255, 116, 130, 157, 255, 118, 133, 159, 223, 132, 147, 174, 24, + 76, 83, 95, 114, 104, 117, 140, 255, 105, 117, 141, 255, 118, 133, 160, 253, 139, 155, 184, 116, 134, 143, 161, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 100, 110, 74, 122, 137, 163, 255, 143, 160, 191, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 114, 120, 31, 123, 138, 166, 255, 136, 153, 183, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 93, 97, 5, 42, 45, 51, 111, 86, 97, 117, 253, 118, 133, 160, 255, 119, 133, 161, 255, 133, 149, 180, 116, + 46, 50, 56, 109, 67, 76, 91, 255, 105, 118, 142, 255, 107, 120, 145, 254, 112, 125, 149, 131, 127, 139, 161, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 98, 109, 74, 116, 130, 156, 255, 142, 159, 190, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 115, 122, 31, 128, 143, 172, 255, 141, 157, 185, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 137, 163, 7, 122, 136, 162, 122, 120, 135, 162, 254, 121, 136, 164, 255, 136, 152, 184, 255, 126, 141, 168, 116, + 71, 74, 79, 17, 31, 35, 41, 206, 42, 47, 57, 255, 77, 87, 105, 255, 103, 116, 140, 255, 110, 124, 149, 239, 112, 125, 150, 157, 115, 128, 153, 89, 122, 134, 158, 30, 147, 158, 177, 2, 0, 0, 0, 0, 81, 87, 96, 65, 109, 123, 148, 255, 141, 158, 190, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 103, 112, 31, 135, 151, 180, 255, 141, 156, 183, 231, 0, 0, 0, 0, 153, 164, 183, 1, 134, 147, 171, 30, 124, 138, 165, 84, 123, 138, 165, 154, 122, 137, 164, 235, 127, 143, 172, 255, 140, 157, 189, 255, 144, 162, 195, 255, 129, 144, 172, 218, 126, 138, 161, 22, + 0, 0, 0, 0, 64, 68, 73, 7, 39, 43, 49, 118, 32, 36, 42, 225, 30, 35, 42, 255, 50, 57, 68, 255, 72, 81, 97, 255, 91, 102, 123, 255, 105, 118, 142, 255, 113, 127, 152, 240, 115, 129, 155, 204, 111, 124, 149, 196, 111, 125, 150, 255, 126, 141, 170, 234, 119, 133, 159, 120, 120, 134, 160, 116, 121, 135, 161, 117, 121, 135, 162, 119, 116, 130, 155, 152, 127, 142, 170, 255, 125, 140, 168, 248, 123, 138, 166, 199, 130, 145, 173, 235, 140, 155, 183, 255, 143, 160, 190, 255, 143, 161, 193, 255, 147, 165, 199, 255, 145, 164, 197, 255, 132, 148, 177, 230, 127, 140, 166, 126, 124, 134, 151, 12, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 141, 144, 3, 55, 58, 63, 58, 37, 40, 46, 126, 34, 38, 44, 184, 34, 38, 44, 235, 35, 39, 47, 254, 49, 55, 66, 255, 64, 72, 87, 255, 77, 87, 104, 255, 88, 98, 118, 255, 96, 108, 130, 255, 103, 116, 139, 255, 108, 122, 147, 255, 113, 127, 153, 255, 118, 133, 160, 255, 124, 140, 168, 255, 133, 148, 176, 255, 141, 156, 183, 255, 146, 161, 187, 255, 144, 159, 186, 255, 131, 146, 174, 254, 127, 141, 168, 237, 126, 141, 168, 188, 123, 137, 162, 131, 112, 123, 143, 61, 128, 132, 140, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 94, 98, 19, 64, 68, 73, 56, 53, 57, 65, 82, 62, 67, 76, 116, 66, 74, 89, 255, 95, 107, 129, 255, 80, 88, 103, 155, 81, 90, 105, 151, 86, 95, 112, 151, 95, 104, 122, 151, 98, 109, 128, 180, 124, 139, 166, 255, 109, 122, 146, 218, 100, 110, 128, 84, 96, 104, 118, 56, 105, 109, 117, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 176, 2, 74, 83, 98, 252, 131, 147, 178, 255, 140, 155, 184, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 134, 157, 114, 151, 169, 203, 255, 123, 138, 165, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 76, 90, 224, 122, 137, 165, 255, 136, 152, 182, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 139, 165, 147, 146, 164, 198, 255, 122, 137, 165, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 69, 81, 191, 110, 124, 149, 255, 134, 151, 181, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 143, 170, 193, 142, 160, 192, 255, 122, 137, 164, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 63, 74, 150, 94, 105, 127, 255, 133, 149, 179, 166, 0, 0, 0, 0, 0, 0, 0, 0, 115, 119, 128, 5, 130, 145, 174, 242, 137, 154, 186, 255, 125, 139, 166, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 58, 66, 102, 72, 81, 97, 255, 132, 148, 178, 236, 148, 161, 187, 5, 0, 0, 0, 0, 110, 121, 140, 64, 140, 157, 189, 255, 127, 142, 171, 254, 131, 144, 169, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 65, 71, 43, 47, 52, 63, 255, 127, 143, 172, 255, 132, 148, 177, 75, 0, 0, 0, 0, 121, 134, 158, 160, 139, 156, 188, 255, 123, 138, 165, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 156, 158, 1, 36, 39, 46, 227, 106, 119, 143, 255, 130, 145, 175, 203, 114, 125, 147, 51, 123, 138, 166, 247, 131, 147, 177, 255, 123, 138, 165, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 41, 47, 143, 68, 77, 93, 255, 128, 144, 174, 255, 126, 141, 170, 252, 129, 145, 174, 255, 123, 138, 166, 255, 127, 141, 167, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 68, 73, 40, 34, 38, 46, 250, 117, 131, 158, 255, 126, 142, 171, 255, 124, 140, 168, 255, 125, 139, 166, 214, 140, 152, 172, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 44, 50, 134, 58, 66, 79, 255, 123, 138, 166, 255, 123, 138, 166, 250, 127, 140, 165, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 156, 158, 1, 46, 50, 55, 83, 82, 89, 102, 123, 106, 116, 136, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(32, 32, imgdata); + return image; +} + +static Ihandle* load_image_PUC_Rio(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 70, 47, 28, 103, 97, 66, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 99, 63, 107, 119, 112, 74, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 92, 92, 139, 94, 94, 94, 162, 93, 93, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 83, 55, 59, 148, 138, 82, 117, 126, 120, 89, 189, 142, 136, 102, 254, 147, 140, 102, 255, 122, 117, 91, 197, 151, 141, 83, 130, 86, 80, 52, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 106, 66, 133, 137, 129, 84, 228, 144, 136, 91, 255, 136, 129, 88, 255, 143, 134, 90, 255, 138, 131, 90, 255, 142, 133, 86, 241, 112, 104, 64, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 34, 104, 104, 104, 122, 79, 79, 79, 12, 0, 0, 0, 0, 126, 118, 72, 126, 151, 141, 91, 255, 150, 140, 100, 255, 147, 139, 102, 255, 146, 137, 98, 255, 151, 141, 102, 255, 150, 141, 90, 255, 128, 119, 73, 142, 0, 0, 0, 0, 50, 50, 50, 6, 99, 99, 99, 109, 84, 84, 84, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 36, 119, 119, 119, 255, 74, 74, 74, 108, 49, 48, 39, 27, 137, 131, 98, 234, 152, 145, 106, 255, 155, 147, 102, 255, 157, 149, 104, 255, 166, 156, 101, 255, 147, 140, 105, 255, 161, 152, 103, 255, 133, 128, 102, 234, 100, 94, 60, 50, 69, 69, 69, 81, 116, 116, 116, 255, 75, 75, 75, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, 103, 103, 126, 123, 123, 123, 242, 34, 34, 34, 11, 54, 54, 54, 6, 139, 131, 88, 252, 128, 121, 84, 255, 145, 133, 89, 255, 141, 133, 89, 255, 148, 137, 90, 255, 137, 127, 86, 255, 140, 132, 86, 255, 139, 132, 92, 255, 50, 48, 37, 26, 64, 64, 64, 1, 118, 118, 118, 225, 109, 109, 109, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 40, 39, 4, 104, 97, 61, 53, 0, 0, 0, 0, 0, 0, 0, 0, 118, 118, 118, 226, 104, 104, 104, 140, 0, 0, 0, 0, 0, 0, 0, 0, 134, 127, 93, 226, 140, 134, 102, 255, 127, 124, 109, 255, 123, 121, 107, 255, 125, 122, 105, 255, 126, 123, 111, 255, 139, 133, 101, 255, 136, 130, 95, 243, 83, 83, 83, 1, 0, 0, 0, 0, 98, 98, 98, 114, 123, 123, 123, 246, 24, 24, 24, 7, 0, 0, 0, 0, 74, 74, 74, 46, 52, 52, 52, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 44, 42, 8, 159, 148, 87, 169, 161, 149, 88, 177, 100, 94, 59, 36, 94, 43, 44, 162, 127, 10, 11, 254, 101, 101, 101, 139, 73, 73, 73, 5, 129, 123, 89, 234, 161, 152, 104, 255, 163, 153, 99, 255, 152, 143, 95, 255, 160, 150, 94, 255, 154, 146, 99, 255, 168, 158, 102, 255, 132, 126, 96, 247, 33, 32, 28, 13, 99, 99, 99, 122, 126, 16, 17, 252, 98, 41, 41, 178, 61, 61, 61, 29, 106, 106, 106, 161, 105, 105, 105, 184, 53, 53, 53, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 35, 32, 22, 162, 151, 87, 247, 165, 154, 89, 248, 158, 147, 87, 138, 87, 65, 64, 179, 92, 83, 83, 219, 0, 0, 0, 0, 111, 105, 76, 152, 130, 123, 84, 255, 132, 121, 80, 255, 137, 118, 77, 255, 140, 116, 77, 255, 127, 116, 77, 255, 139, 130, 86, 255, 109, 104, 77, 177, 0, 0, 0, 0, 91, 83, 83, 201, 88, 65, 66, 190, 100, 100, 100, 123, 107, 107, 107, 243, 110, 110, 110, 255, 48, 48, 48, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 154, 91, 205, 153, 142, 84, 199, 151, 140, 83, 197, 148, 137, 80, 253, 100, 87, 81, 255, 93, 86, 73, 168, 45, 45, 45, 2, 90, 83, 52, 37, 104, 19, 14, 180, 157, 0, 2, 254, 129, 4, 5, 190, 138, 3, 5, 188, 149, 1, 3, 250, 111, 14, 11, 194, 95, 86, 54, 46, 72, 72, 72, 0, 76, 73, 73, 148, 96, 82, 82, 255, 94, 94, 94, 253, 103, 103, 103, 215, 94, 94, 94, 181, 111, 111, 111, 230, 54, 54, 54, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 99, 62, 71, 169, 157, 92, 225, 135, 126, 76, 177, 187, 173, 101, 240, 104, 101, 82, 169, 68, 88, 139, 255, 43, 78, 160, 255, 24, 64, 166, 223, 28, 69, 176, 207, 52, 62, 153, 238, 60, 60, 145, 250, 39, 78, 179, 207, 39, 78, 179, 207, 57, 62, 149, 244, 56, 60, 149, 243, 28, 70, 176, 207, 21, 63, 169, 218, 31, 68, 163, 255, 60, 83, 142, 255, 90, 90, 90, 159, 120, 120, 120, 240, 90, 90, 90, 177, 112, 112, 112, 233, 77, 77, 77, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 0, 70, 66, 46, 36, 134, 125, 76, 150, 156, 145, 86, 169, 79, 78, 75, 73, 47, 80, 163, 254, 26, 81, 221, 255, 39, 96, 243, 255, 57, 90, 172, 255, 65, 102, 193, 255, 59, 98, 197, 255, 59, 104, 217, 255, 61, 109, 231, 255, 62, 101, 201, 255, 61, 95, 176, 255, 57, 91, 172, 255, 40, 97, 243, 255, 27, 81, 221, 255, 41, 79, 175, 255, 86, 86, 86, 80, 93, 93, 93, 149, 97, 97, 97, 172, 53, 53, 53, 40, 54, 54, 54, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 34, 30, 5, 98, 92, 59, 46, 0, 0, 0, 0, 25, 66, 171, 188, 58, 96, 188, 255, 67, 108, 208, 255, 93, 112, 149, 255, 94, 114, 154, 255, 95, 116, 157, 255, 86, 130, 243, 255, 87, 132, 246, 255, 95, 115, 155, 255, 94, 114, 153, 255, 94, 113, 149, 255, 63, 107, 221, 255, 65, 98, 176, 255, 27, 69, 178, 208, 0, 0, 0, 0, 68, 68, 68, 39, 39, 39, 39, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 75, 174, 184, 60, 108, 232, 255, 111, 122, 134, 255, 104, 124, 161, 255, 116, 125, 131, 255, 100, 111, 126, 255, 101, 135, 223, 255, 104, 140, 234, 255, 102, 113, 127, 255, 112, 122, 132, 255, 106, 123, 154, 255, 111, 123, 136, 255, 61, 107, 225, 255, 39, 79, 181, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 84, 175, 184, 81, 108, 170, 255, 100, 125, 182, 255, 127, 130, 116, 255, 187, 175, 106, 255, 188, 175, 101, 255, 126, 156, 235, 255, 133, 165, 248, 255, 175, 164, 101, 255, 187, 175, 106, 255, 132, 133, 114, 255, 103, 127, 178, 255, 84, 108, 162, 255, 50, 87, 182, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 91, 175, 184, 81, 114, 197, 255, 124, 133, 139, 255, 152, 152, 128, 255, 182, 174, 122, 255, 154, 159, 152, 255, 156, 182, 250, 255, 156, 182, 250, 255, 153, 160, 162, 255, 177, 171, 125, 255, 158, 156, 125, 255, 128, 135, 135, 255, 82, 113, 192, 255, 61, 95, 182, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 28, 6, 101, 101, 101, 141, 103, 103, 103, 160, 65, 65, 65, 24, 42, 42, 42, 8, 66, 94, 167, 198, 101, 132, 211, 255, 113, 126, 148, 255, 194, 181, 107, 255, 160, 168, 172, 255, 171, 194, 251, 255, 178, 199, 251, 255, 178, 199, 251, 255, 172, 194, 251, 255, 158, 167, 178, 255, 202, 187, 108, 255, 115, 126, 143, 255, 101, 130, 203, 255, 71, 100, 176, 216, 33, 32, 30, 11, 70, 67, 49, 14, 156, 145, 86, 151, 156, 145, 86, 153, 72, 69, 47, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 94, 94, 94, 97, 97, 97, 119, 69, 69, 69, 72, 105, 105, 105, 189, 99, 99, 99, 251, 80, 102, 158, 243, 106, 135, 204, 255, 124, 134, 149, 255, 186, 171, 102, 255, 181, 175, 166, 255, 205, 209, 241, 255, 210, 213, 241, 255, 208, 211, 240, 255, 206, 210, 241, 255, 182, 175, 164, 255, 199, 182, 110, 255, 121, 130, 140, 255, 107, 133, 196, 255, 90, 113, 169, 240, 156, 145, 84, 250, 144, 134, 79, 192, 131, 122, 73, 98, 127, 118, 73, 93, 157, 146, 86, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 15, 105, 105, 105, 194, 103, 103, 103, 201, 98, 98, 98, 170, 119, 119, 119, 242, 85, 85, 85, 148, 75, 101, 166, 198, 115, 145, 224, 255, 123, 134, 152, 255, 186, 168, 105, 255, 223, 223, 223, 255, 122, 122, 122, 255, 231, 231, 231, 255, 221, 214, 214, 255, 122, 122, 122, 255, 188, 188, 188, 255, 205, 188, 127, 255, 124, 133, 144, 255, 114, 143, 216, 255, 82, 110, 183, 206, 117, 109, 67, 135, 180, 168, 97, 243, 152, 141, 83, 175, 156, 145, 86, 199, 165, 153, 90, 204, 97, 91, 58, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90, 84, 101, 101, 101, 118, 44, 44, 44, 30, 105, 105, 105, 171, 48, 48, 48, 37, 107, 107, 107, 165, 81, 108, 176, 187, 113, 137, 194, 255, 137, 142, 137, 255, 181, 165, 109, 255, 219, 219, 219, 255, 40, 40, 40, 255, 226, 226, 226, 255, 143, 136, 136, 255, 253, 253, 253, 255, 130, 130, 130, 255, 196, 180, 126, 255, 140, 144, 135, 255, 114, 135, 185, 255, 84, 111, 183, 204, 164, 153, 90, 137, 106, 99, 61, 65, 164, 153, 90, 143, 98, 92, 59, 58, 137, 127, 76, 89, 154, 144, 85, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 91, 91, 118, 104, 104, 104, 203, 102, 103, 106, 198, 121, 133, 153, 241, 188, 179, 120, 227, 156, 157, 137, 147, 79, 105, 171, 182, 122, 152, 228, 255, 128, 137, 148, 255, 175, 160, 112, 255, 117, 117, 117, 255, 171, 171, 171, 255, 118, 118, 118, 255, 149, 142, 142, 255, 223, 223, 223, 255, 127, 127, 127, 255, 192, 177, 130, 255, 130, 137, 143, 255, 122, 150, 222, 255, 82, 109, 178, 201, 154, 156, 137, 114, 189, 180, 120, 231, 150, 154, 144, 238, 151, 144, 96, 205, 158, 147, 87, 202, 139, 130, 78, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 29, 29, 5, 29, 62, 171, 38, 87, 110, 171, 255, 90, 102, 126, 255, 166, 163, 128, 174, 71, 95, 155, 155, 118, 151, 235, 255, 126, 139, 164, 255, 169, 155, 106, 255, 233, 231, 230, 255, 255, 255, 255, 255, 241, 241, 241, 255, 236, 229, 229, 255, 241, 240, 240, 255, 226, 225, 225, 255, 186, 171, 123, 255, 128, 139, 157, 255, 117, 149, 230, 255, 76, 101, 165, 174, 177, 173, 134, 139, 175, 167, 113, 255, 130, 141, 158, 255, 18, 61, 201, 53, 24, 24, 24, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 82, 242, 8, 69, 101, 197, 194, 134, 137, 127, 255, 134, 138, 129, 236, 40, 54, 93, 89, 112, 146, 236, 255, 115, 137, 187, 255, 152, 149, 116, 255, 178, 164, 110, 255, 184, 166, 110, 255, 173, 162, 128, 255, 172, 160, 132, 255, 180, 163, 108, 255, 178, 163, 111, 255, 160, 155, 114, 255, 116, 135, 178, 255, 114, 149, 238, 255, 48, 63, 102, 102, 131, 136, 132, 208, 128, 132, 126, 255, 86, 109, 174, 200, 19, 71, 241, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 106, 212, 11, 150, 147, 114, 237, 186, 176, 114, 255, 125, 134, 147, 103, 66, 87, 140, 171, 115, 147, 228, 255, 124, 148, 207, 255, 133, 153, 201, 255, 136, 153, 197, 255, 171, 192, 247, 255, 173, 195, 250, 255, 136, 154, 199, 255, 134, 153, 199, 255, 123, 146, 203, 255, 118, 150, 232, 255, 70, 92, 148, 186, 126, 135, 145, 72, 124, 129, 126, 255, 149, 148, 121, 252, 117, 135, 177, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 142, 137, 115, 128, 133, 131, 255, 135, 136, 119, 238, 128, 141, 167, 36, 28, 33, 45, 58, 63, 76, 111, 104, 89, 106, 150, 150, 121, 143, 202, 240, 151, 178, 250, 255, 151, 179, 250, 255, 124, 147, 207, 244, 91, 108, 154, 156, 64, 78, 114, 105, 30, 36, 50, 63, 101, 121, 173, 20, 109, 119, 134, 220, 121, 125, 119, 255, 146, 148, 132, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 87, 235, 3, 130, 132, 120, 192, 126, 130, 125, 255, 180, 175, 130, 211, 52, 97, 243, 3, 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 23, 22, 91, 112, 168, 198, 96, 119, 179, 209, 27, 30, 36, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 169, 138, 183, 191, 178, 105, 255, 165, 159, 115, 222, 98, 123, 190, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 128, 187, 19, 155, 159, 146, 235, 184, 178, 128, 248, 157, 161, 148, 111, 162, 164, 144, 134, 117, 135, 178, 42, 0, 0, 0, 0, 22, 25, 33, 25, 28, 34, 49, 32, 0, 0, 0, 0, 107, 129, 184, 33, 161, 161, 138, 130, 156, 160, 148, 128, 184, 178, 128, 250, 162, 163, 142, 248, 130, 143, 168, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 96, 227, 12, 170, 169, 137, 206, 209, 194, 112, 255, 189, 181, 124, 255, 120, 127, 132, 255, 166, 158, 105, 255, 112, 121, 134, 230, 173, 169, 129, 196, 153, 153, 126, 195, 133, 136, 129, 224, 120, 125, 124, 255, 142, 137, 101, 255, 190, 181, 124, 255, 209, 194, 112, 255, 173, 171, 135, 195, 37, 83, 231, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 111, 205, 10, 172, 170, 138, 141, 140, 149, 156, 217, 138, 139, 124, 198, 145, 144, 118, 254, 61, 84, 148, 255, 164, 156, 104, 255, 106, 115, 129, 255, 126, 130, 122, 255, 188, 178, 113, 255, 112, 121, 135, 207, 137, 147, 158, 204, 168, 168, 139, 124, 51, 92, 222, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 76, 242, 3, 0, 0, 0, 0, 96, 122, 193, 28, 148, 153, 149, 78, 139, 142, 129, 101, 147, 149, 132, 101, 154, 158, 150, 80, 100, 124, 190, 31, 0, 0, 0, 0, 89, 125, 246, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(32, 32, imgdata); + return image; +} + +static Ihandle* load_image_BR(void) +{ + unsigned char imgdata[] = { + 255, 255, 254, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 252, 245, 255, 255, 255, 254, 255, + 255, 250, 235, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 250, 235, 255, + 255, 250, 235, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 250, 235, 255, + 255, 250, 235, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 250, 235, 255, + 255, 250, 235, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 250, 235, 255, + 255, 250, 235, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 250, 235, 255, + 255, 250, 235, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 250, 235, 255, + 255, 250, 235, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 250, 235, 255, + 255, 254, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 249, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 250, 252, 251, 255, 250, 252, 251, 255, 250, 252, 251, 255, 250, 252, 251, 255, 250, 252, 251, 255, 251, 253, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 254, 253, 255, 250, 252, 251, 255, 250, 252, 251, 255, 250, 252, 251, 255, 250, 252, 251, 255, 250, 252, 251, 255, 250, 252, 251, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 253, 252, 255, 250, 252, 251, 255, 250, 252, 251, 255, 250, 252, 251, 255, 250, 252, 251, 255, 250, 252, 251, 255, 255, 255, 255, 255, + 240, 248, 244, 255, 1, 140, 79, 255, 1, 140, 79, 255, 1, 140, 79, 255, 1, 140, 79, 255, 1, 140, 79, 255, 111, 189, 155, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 218, 238, 229, 255, 109, 188, 154, 255, 1, 140, 79, 255, 1, 140, 79, 255, 1, 140, 79, 255, 15, 146, 89, 255, 250, 252, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 251, 250, 255, 174, 218, 198, 255, 22, 150, 94, 255, 1, 140, 79, 255, 1, 140, 79, 255, 1, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 183, 222, 205, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 88, 179, 139, 255, 0, 140, 79, 255, 0, 140, 79, 255, 82, 177, 135, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 175, 218, 199, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 10, 144, 86, 255, 247, 251, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 95, 182, 144, 255, 53, 164, 116, 255, 54, 164, 116, 255, 145, 205, 178, 255, 255, 255, 255, 255, 255, 255, 255, 255, 153, 209, 185, 255, 0, 140, 79, 255, 0, 140, 79, 255, 156, 210, 186, 255, 255, 255, 255, 255, 255, 255, 255, 255, 171, 217, 196, 255, 58, 165, 118, 255, 58, 165, 118, 255, 82, 176, 135, 255, 243, 249, 246, 255, 255, 255, 255, 255, 245, 250, 248, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 75, 173, 130, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 248, 244, 255, 4, 142, 82, 255, 0, 140, 79, 255, 0, 140, 79, 255, 96, 182, 144, 255, 255, 255, 255, 255, 255, 255, 255, 255, 123, 195, 163, 255, 0, 140, 79, 255, 1, 140, 80, 255, 228, 243, 236, 255, 255, 255, 255, 255, 255, 255, 255, 255, 84, 177, 137, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 80, 255, 222, 240, 232, 255, 255, 255, 255, 255, 225, 241, 234, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 149, 207, 181, 255, 255, 255, 255, 255, 255, 255, 255, 255, 240, 248, 244, 255, 189, 224, 208, 255, 189, 224, 208, 255, 194, 227, 212, 255, 249, 252, 251, 255, 255, 255, 255, 255, 225, 241, 234, 255, 20, 149, 93, 255, 0, 140, 79, 255, 48, 161, 111, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 90, 180, 141, 255, 73, 173, 130, 255, 78, 175, 132, 255, 162, 212, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 119, 193, 161, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 222, 240, 232, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 253, 255, 58, 165, 118, 255, 0, 140, 79, 255, 0, 140, 79, 255, 121, 194, 162, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 254, 254, 255, 144, 204, 178, 255, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 41, 158, 106, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 118, 193, 160, 255, 111, 190, 155, 255, 114, 191, 157, 255, 206, 233, 221, 255, 255, 255, 255, 255, 255, 255, 255, 255, 198, 229, 215, 255, 0, 140, 79, 255, 0, 140, 79, 255, 195, 227, 213, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 249, 245, 255, 233, 245, 240, 255, 242, 249, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 228, 242, 236, 255, 38, 157, 105, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 114, 191, 157, 255, 255, 255, 255, 255, 255, 255, 255, 255, 209, 234, 223, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 103, 186, 150, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 253, 252, 255, 1, 140, 80, 255, 17, 147, 91, 255, 251, 253, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 54, 164, 116, 255, 0, 140, 79, 255, 1, 141, 80, 255, 170, 216, 196, 255, 255, 255, 255, 255, 255, 255, 255, 255, 124, 195, 164, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 187, 224, 208, 255, 255, 255, 255, 255, 255, 255, 255, 255, 162, 213, 190, 255, 46, 160, 110, 255, 46, 160, 110, 255, 69, 171, 126, 255, 216, 237, 227, 255, 255, 255, 255, 255, 255, 255, 255, 255, 221, 239, 231, 255, 0, 140, 79, 255, 87, 179, 139, 255, 255, 255, 255, 255, 255, 255, 255, 255, 235, 246, 241, 255, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 129, 198, 167, 255, 255, 255, 255, 255, 255, 255, 255, 255, 137, 201, 173, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 12, 145, 87, 255, 249, 252, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 108, 188, 153, 255, 0, 140, 79, 255, 161, 212, 189, 255, 255, 255, 255, 255, 255, 255, 255, 255, 166, 214, 193, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 120, 194, 161, 255, 255, 255, 255, 255, 255, 255, 255, 255, 146, 206, 180, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 79, 175, 133, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 224, 241, 233, 255, 103, 186, 150, 255, 0, 140, 79, 255, 2, 141, 80, 255, 232, 244, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 94, 182, 143, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 111, 190, 155, 255, 255, 255, 255, 255, 255, 255, 255, 255, 156, 210, 187, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 17, 147, 91, 255, 36, 156, 104, 255, 36, 156, 104, 255, 36, 156, 104, 255, 36, 156, 104, 255, 36, 156, 104, 255, 36, 156, 104, 255, 35, 155, 102, 255, 18, 148, 91, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 4, 141, 81, 255, 43, 158, 108, 255, 43, 158, 108, 255, 43, 158, 108, 255, 9, 144, 85, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 27, 152, 97, 255, 65, 168, 123, 255, 65, 168, 123, 255, 41, 158, 107, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 240, 248, 244, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 235, 245, 241, 255, + 253, 254, 253, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 219, 238, 230, 255, 252, 254, 253, 255}; + + Ihandle* image = IupImageRGBA(32, 32, imgdata); + return image; +} + +static Ihandle* load_image_Lua(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 138, 13, 6, 6, 130, 84, 9, 9, 131, 105, 12, 12, 133, 56, 102, 102, 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 131, 68, 1, 1, 128, 234, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 3, 3, 129, 183, 18, 18, 136, 14, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 135, 27, 1, 1, 128, 242, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 164, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 130, 122, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 127, 252, 25, 25, 140, 19, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 140, 18, 8, 8, 131, 73, 5, 5, 129, 111, 3, 3, 129, 129, 3, 3, 128, 128, 4, 4, 129, 109, 9, 9, 132, 72, 24, 24, 139, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 129, 154, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 17, 17, 136, 50, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 53, 154, 3, 8, 8, 131, 88, 4, 4, 129, 192, 1, 1, 127, 252, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 127, 251, 4, 4, 129, 186, 8, 8, 131, 82, 52, 52, 153, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 130, 120, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 127, 251, 23, 23, 138, 18, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 131, 59, 3, 3, 128, 211, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 2, 2, 128, 205, 9, 9, 132, 53, 0, 0, 0, 0, 18, 18, 136, 25, 1, 1, 128, 240, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 159, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 150, 0, 7, 7, 130, 120, 1, 1, 127, 252, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 127, 250, 7, 7, 130, 110, 0, 0, 0, 0, 12, 12, 133, 64, 2, 2, 128, 231, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 177, 25, 25, 140, 12, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 153, 204, 0, 3, 3, 129, 139, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 27, 27, 141, 255, 122, 122, 188, 255, 155, 155, 205, 255, 121, 121, 188, 255, 26, 26, 140, 255, 0, 0, 127, 255, 9, 9, 132, 132, 0, 0, 0, 0, 33, 33, 144, 10, 8, 8, 131, 77, 5, 5, 129, 96, 15, 15, 135, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 130, 111, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 67, 67, 160, 255, 242, 242, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 241, 248, 255, 64, 64, 159, 255, 0, 0, 127, 255, 7, 7, 131, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 132, 47, 1, 1, 127, 250, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 12, 12, 133, 255, 234, 234, 244, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 232, 232, 243, 255, 11, 11, 132, 255, 1, 1, 127, 246, 10, 10, 132, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 97, 97, 176, 0, 3, 3, 128, 193, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 81, 81, 168, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 78, 78, 166, 255, 0, 0, 127, 255, 3, 3, 129, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 12, 12, 133, 63, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 101, 101, 178, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 97, 97, 176, 255, 0, 0, 127, 255, 0, 0, 127, 255, 13, 13, 133, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 4, 129, 162, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 52, 52, 153, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 49, 49, 152, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 67, 67, 161, 2, 2, 2, 128, 236, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 179, 179, 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 176, 176, 215, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 3, 3, 128, 225, 130, 130, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 14, 14, 134, 37, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 5, 5, 130, 255, 73, 73, 164, 255, 3, 3, 129, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 12, 12, 133, 255, 160, 160, 207, 255, 251, 251, 253, 255, 255, 255, 255, 255, 251, 251, 253, 255, 158, 158, 206, 255, 11, 11, 132, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 22, 22, 138, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 9, 9, 131, 72, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 17, 17, 136, 255, 255, 255, 255, 255, 12, 12, 133, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 17, 17, 135, 255, 46, 46, 150, 255, 16, 16, 135, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 10, 10, 132, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 129, 86, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 17, 17, 136, 255, 255, 255, 255, 255, 12, 12, 133, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 6, 130, 82, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 17, 17, 136, 255, 255, 255, 255, 255, 12, 12, 133, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 123, 123, 189, 255, 84, 84, 169, 255, 0, 0, 127, 255, 0, 0, 127, 255, 120, 120, 187, 255, 87, 87, 171, 255, 0, 0, 127, 255, 66, 66, 160, 255, 211, 211, 233, 255, 238, 238, 246, 255, 227, 227, 241, 255, 97, 97, 176, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 5, 5, 130, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 12, 133, 61, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 17, 17, 136, 255, 255, 255, 255, 255, 12, 12, 133, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 151, 151, 203, 255, 103, 103, 179, 255, 0, 0, 127, 255, 0, 0, 127, 255, 147, 147, 201, 255, 107, 107, 181, 255, 0, 0, 127, 255, 214, 214, 235, 255, 82, 82, 168, 255, 0, 0, 127, 255, 55, 55, 154, 255, 235, 235, 245, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 11, 11, 133, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 24, 139, 19, 1, 1, 127, 254, 0, 0, 127, 255, 0, 0, 127, 255, 17, 17, 136, 255, 255, 255, 255, 255, 12, 12, 133, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 151, 151, 203, 255, 103, 103, 179, 255, 0, 0, 127, 255, 0, 0, 127, 255, 147, 147, 201, 255, 107, 107, 181, 255, 0, 0, 127, 255, 7, 7, 130, 255, 4, 4, 129, 255, 32, 32, 143, 255, 92, 92, 173, 255, 243, 243, 249, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 251, 30, 30, 142, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 3, 129, 210, 0, 0, 127, 255, 0, 0, 127, 255, 17, 17, 136, 255, 255, 255, 255, 255, 12, 12, 133, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 151, 151, 203, 255, 103, 103, 179, 255, 0, 0, 127, 255, 0, 0, 127, 255, 147, 147, 201, 255, 107, 107, 181, 255, 0, 0, 127, 255, 135, 135, 195, 255, 219, 219, 237, 255, 172, 172, 214, 255, 133, 133, 194, 255, 243, 243, 249, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 3, 3, 129, 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 6, 130, 126, 0, 0, 127, 255, 0, 0, 127, 255, 17, 17, 136, 255, 255, 255, 255, 255, 12, 12, 133, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 151, 151, 203, 255, 104, 104, 179, 255, 0, 0, 127, 255, 0, 0, 127, 255, 175, 175, 215, 255, 107, 107, 181, 255, 36, 36, 145, 255, 234, 234, 244, 255, 10, 10, 132, 255, 0, 0, 127, 255, 17, 17, 135, 255, 243, 243, 249, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 6, 6, 130, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 16, 135, 25, 1, 1, 127, 247, 0, 0, 127, 255, 17, 17, 136, 255, 255, 255, 255, 255, 141, 141, 198, 255, 135, 135, 195, 255, 135, 135, 195, 255, 135, 135, 195, 255, 49, 49, 151, 255, 127, 127, 191, 255, 193, 193, 224, 255, 49, 49, 152, 255, 100, 100, 177, 255, 234, 234, 244, 255, 107, 107, 181, 255, 23, 23, 139, 255, 241, 241, 248, 255, 73, 73, 163, 255, 54, 54, 154, 255, 169, 169, 212, 255, 247, 247, 251, 255, 31, 31, 142, 255, 0, 0, 127, 255, 2, 2, 128, 243, 22, 22, 138, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 129, 137, 0, 0, 127, 255, 8, 8, 131, 255, 115, 115, 185, 255, 115, 115, 185, 255, 115, 115, 185, 255, 115, 115, 185, 255, 115, 115, 185, 255, 42, 42, 148, 255, 12, 12, 133, 255, 138, 138, 196, 255, 180, 180, 217, 255, 121, 121, 188, 255, 60, 60, 157, 255, 48, 48, 151, 255, 0, 0, 127, 255, 76, 76, 165, 255, 174, 174, 214, 255, 162, 162, 208, 255, 53, 53, 153, 255, 138, 138, 196, 255, 124, 124, 189, 255, 0, 0, 127, 255, 6, 6, 130, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 137, 11, 2, 2, 128, 217, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 2, 2, 128, 209, 24, 24, 139, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 132, 43, 2, 2, 128, 240, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 235, 11, 11, 133, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 132, 56, 2, 2, 128, 237, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 233, 4, 4, 129, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 133, 37, 3, 3, 128, 206, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 3, 3, 129, 200, 13, 13, 134, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 142, 5, 6, 6, 130, 113, 2, 2, 128, 233, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 2, 2, 128, 230, 6, 6, 130, 106, 20, 20, 137, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22, 138, 8, 9, 9, 131, 90, 4, 4, 129, 170, 3, 3, 128, 228, 0, 0, 127, 254, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 127, 254, 3, 3, 128, 225, 4, 4, 129, 167, 8, 8, 131, 86, 38, 38, 146, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 41, 147, 11, 16, 16, 135, 29, 18, 18, 136, 28, 41, 41, 148, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(32, 32, imgdata); + return image; +} + +static Ihandle* load_image_TecgrafPUC_Rio(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 167, 173, 184, 80, 176, 185, 202, 166, 177, 185, 202, 166, 177, 186, 202, 166, 177, 186, 202, 166, 177, 186, 202, 166, 177, 186, 203, 166, 178, 186, 203, 166, 178, 186, 203, 166, 178, 186, 203, 166, 178, 186, 203, 166, 178, 186, 203, 166, 178, 186, 203, 166, 178, 186, 203, 166, 178, 186, 204, 166, 178, 187, 204, 166, 178, 187, 204, 166, 178, 187, 204, 166, 178, 187, 204, 166, 179, 187, 204, 166, 179, 188, 204, 166, 179, 188, 205, 166, 204, 210, 221, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 214, 218, 225, 5, 188, 196, 210, 81, 158, 171, 195, 81, 180, 191, 212, 142, 189, 199, 218, 166, 189, 199, 218, 166, 189, 199, 219, 166, 189, 199, 219, 166, 176, 187, 207, 80, 0, 0, 0, 0, + 0, 0, 0, 0, 100, 102, 107, 168, 106, 119, 143, 255, 122, 137, 165, 255, 122, 137, 166, 255, 122, 137, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 169, 255, 125, 141, 169, 255, 138, 155, 187, 255, 201, 209, 224, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 152, 158, 169, 64, 135, 148, 173, 227, 139, 156, 188, 255, 142, 159, 192, 255, 143, 161, 193, 255, 144, 162, 195, 255, 144, 162, 195, 255, 144, 162, 195, 255, 145, 163, 196, 255, 140, 155, 181, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 97, 99, 103, 168, 91, 102, 123, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 113, 126, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 135, 152, 182, 255, 201, 209, 224, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 177, 180, 45, 116, 126, 144, 253, 128, 144, 173, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 142, 166, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 97, 99, 103, 168, 91, 102, 123, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 135, 151, 182, 255, 201, 209, 224, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 121, 127, 130, 106, 120, 144, 255, 128, 144, 174, 255, 128, 144, 174, 255, 129, 144, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 175, 255, 129, 145, 175, 255, 118, 130, 151, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 97, 99, 103, 168, 91, 102, 123, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 113, 126, 152, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 134, 151, 181, 255, 201, 209, 224, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 227, 232, 31, 226, 229, 234, 70, 228, 231, 236, 70, 227, 230, 236, 70, 227, 230, 235, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 220, 226, 43, 182, 189, 204, 70, 159, 170, 192, 70, 157, 170, 194, 70, 161, 174, 198, 70, 182, 192, 211, 70, 205, 211, 225, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 231, 236, 14, 213, 218, 227, 70, 205, 211, 223, 70, 207, 214, 226, 70, 208, 214, 225, 70, 227, 231, 237, 46, 229, 232, 238, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 115, 121, 192, 113, 127, 152, 255, 128, 144, 173, 255, 128, 144, 174, 255, 128, 144, 174, 255, 129, 144, 174, 255, 129, 145, 174, 255, 127, 143, 172, 255, 118, 133, 160, 255, 121, 135, 163, 255, 107, 116, 135, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 97, 99, 103, 168, 76, 85, 103, 255, 91, 101, 122, 255, 91, 102, 122, 255, 91, 102, 122, 255, 91, 102, 122, 255, 91, 102, 123, 255, 92, 103, 125, 255, 111, 124, 150, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 111, 125, 151, 255, 94, 106, 127, 255, 92, 103, 124, 255, 92, 103, 125, 255, 92, 103, 125, 255, 92, 103, 125, 255, 92, 103, 125, 255, 116, 131, 157, 255, 181, 192, 213, 77, 0, 0, 0, 0, 0, 0, 0, 0, 171, 176, 185, 32, 152, 160, 176, 136, 149, 160, 180, 221, 143, 156, 180, 239, 133, 148, 176, 246, 137, 152, 180, 255, 140, 156, 185, 255, 141, 157, 187, 255, 146, 162, 193, 243, 163, 178, 206, 239, 174, 189, 215, 204, 179, 193, 219, 119, 215, 221, 234, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 157, 170, 66, 138, 149, 170, 150, 142, 154, 178, 236, 132, 146, 174, 249, 134, 149, 178, 255, 134, 150, 179, 255, 134, 151, 181, 255, 137, 154, 184, 255, 141, 158, 189, 255, 148, 165, 197, 251, 166, 183, 213, 239, 179, 195, 224, 191, 187, 201, 226, 77, 226, 231, 240, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 166, 181, 67, 150, 162, 183, 153, 155, 168, 193, 222, 154, 168, 195, 239, 152, 168, 198, 239, 165, 181, 209, 239, 172, 188, 218, 201, 185, 199, 225, 145, 161, 166, 177, 111, 158, 169, 189, 239, 174, 186, 210, 239, 174, 187, 210, 239, 174, 187, 210, 239, 174, 187, 210, 239, 175, 187, 211, 239, 175, 187, 211, 239, 182, 191, 209, 203, 0, 0, 0, 0, 131, 136, 143, 55, 164, 175, 196, 239, 176, 188, 211, 239, 176, 188, 211, 239, 176, 188, 212, 239, 176, 189, 212, 239, 176, 189, 212, 239, 176, 189, 212, 239, 176, 187, 207, 140, 171, 177, 189, 64, 148, 160, 183, 149, 162, 176, 203, 234, 201, 213, 233, 239, 213, 224, 243, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 199, 208, 38, 157, 168, 188, 115, 151, 165, 192, 171, 157, 171, 198, 239, 147, 164, 195, 242, 149, 166, 197, 255, 148, 164, 196, 255, 149, 167, 199, 255, 152, 169, 201, 255, 155, 172, 206, 250, 159, 177, 210, 247, 165, 182, 214, 239, 181, 197, 225, 227, 179, 195, 226, 142, 190, 203, 227, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 217, 226, 51, 204, 210, 222, 67, 101, 106, 113, 208, 117, 131, 158, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 128, 144, 174, 255, 111, 124, 149, 255, 101, 106, 114, 255, 111, 116, 125, 255, 130, 135, 145, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 128, 131, 134, 96, 110, 113, 117, 191, 110, 113, 118, 191, 110, 113, 118, 191, 110, 113, 118, 191, 110, 113, 118, 191, 110, 113, 118, 191, 56, 61, 69, 251, 108, 121, 146, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 119, 133, 161, 255, 111, 120, 135, 241, 111, 113, 118, 191, 111, 113, 118, 191, 111, 113, 118, 191, 111, 113, 118, 191, 111, 113, 118, 191, 118, 121, 127, 191, 184, 189, 197, 61, 182, 185, 190, 45, 136, 144, 159, 192, 117, 129, 152, 245, 117, 131, 157, 255, 115, 130, 157, 255, 115, 130, 156, 255, 115, 130, 156, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 130, 157, 255, 116, 130, 157, 255, 117, 132, 159, 255, 124, 140, 167, 255, 142, 159, 190, 255, 171, 188, 219, 248, 183, 200, 230, 142, 211, 220, 236, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 180, 186, 70, 132, 141, 158, 206, 118, 132, 157, 255, 119, 134, 162, 255, 119, 133, 160, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 161, 255, 122, 136, 164, 255, 134, 150, 180, 255, 162, 180, 209, 255, 185, 202, 230, 220, 195, 208, 233, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 157, 167, 46, 138, 147, 164, 221, 123, 138, 164, 252, 124, 139, 168, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 123, 138, 167, 255, 128, 144, 173, 255, 147, 165, 195, 255, 136, 152, 179, 255, 104, 117, 141, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 130, 146, 176, 255, 167, 179, 202, 248, 0, 0, 0, 0, 114, 117, 120, 89, 88, 99, 119, 255, 127, 143, 172, 255, 128, 143, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 133, 149, 179, 255, 142, 153, 170, 250, 122, 136, 161, 254, 127, 143, 172, 255, 126, 142, 170, 255, 169, 181, 199, 255, 219, 229, 245, 104, 0, 0, 0, 0, 0, 0, 0, 0, 143, 150, 165, 127, 126, 140, 167, 247, 130, 146, 175, 255, 129, 145, 174, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 171, 255, 127, 143, 172, 255, 127, 143, 173, 255, 128, 144, 173, 255, 134, 150, 179, 255, 151, 168, 196, 255, 176, 192, 220, 253, 186, 203, 232, 158, 191, 204, 227, 14, 0, 0, 0, 0, 111, 118, 131, 195, 148, 164, 196, 255, 132, 147, 177, 255, 122, 137, 165, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 129, 145, 174, 255, 166, 181, 205, 255, 180, 195, 217, 255, 163, 180, 212, 255, 149, 163, 189, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 73, 80, 240, 108, 121, 146, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 119, 134, 161, 255, 168, 181, 205, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 114, 121, 44, 100, 109, 125, 229, 110, 124, 149, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 120, 134, 160, 255, 158, 173, 196, 255, 189, 205, 233, 205, 203, 214, 236, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 110, 120, 69, 104, 115, 134, 247, 116, 129, 156, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 120, 134, 162, 255, 139, 153, 178, 255, 186, 201, 226, 251, 190, 205, 233, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 140, 148, 60, 111, 121, 139, 244, 118, 133, 159, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 142, 171, 255, 167, 179, 201, 248, 0, 0, 0, 0, 114, 117, 120, 89, 84, 94, 114, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 135, 151, 177, 255, 141, 154, 178, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 148, 165, 192, 255, 201, 215, 237, 104, 0, 0, 0, 0, 141, 146, 157, 106, 104, 118, 145, 253, 121, 137, 167, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 129, 144, 173, 255, 163, 178, 204, 255, 182, 198, 228, 184, 0, 0, 0, 0, 81, 87, 95, 195, 120, 135, 162, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 143, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 129, 144, 174, 255, 141, 154, 181, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 73, 80, 240, 108, 121, 146, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 119, 134, 161, 255, 171, 185, 209, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 126, 130, 24, 84, 92, 105, 228, 108, 121, 146, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 116, 130, 157, 255, 146, 159, 182, 255, 192, 208, 234, 212, 210, 219, 237, 18, 0, 0, 0, 0, 0, 0, 0, 0, 150, 152, 156, 68, 91, 101, 118, 247, 115, 129, 155, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 130, 144, 169, 255, 185, 200, 224, 250, 188, 203, 231, 52, 0, 0, 0, 0, 143, 145, 148, 25, 96, 104, 118, 229, 115, 129, 156, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 142, 171, 255, 167, 179, 201, 248, 0, 0, 0, 0, 114, 117, 120, 89, 84, 94, 114, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 139, 167, 255, 126, 142, 170, 255, 125, 140, 168, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 134, 149, 179, 255, 182, 194, 216, 104, 222, 222, 223, 15, 115, 124, 140, 230, 118, 134, 163, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 128, 143, 172, 255, 156, 174, 206, 252, 177, 190, 213, 72, 81, 87, 95, 195, 120, 135, 162, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 143, 173, 255, 128, 143, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 141, 154, 181, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 73, 80, 240, 108, 121, 145, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 119, 134, 161, 255, 171, 185, 209, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 112, 118, 167, 94, 105, 127, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 110, 123, 149, 255, 89, 101, 122, 255, 72, 82, 98, 255, 74, 83, 100, 255, 97, 109, 132, 255, 114, 128, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 116, 130, 156, 255, 160, 173, 195, 255, 193, 208, 234, 174, 0, 0, 0, 0, 137, 139, 142, 1, 87, 93, 104, 218, 110, 124, 149, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 113, 127, 154, 255, 91, 102, 122, 255, 73, 82, 98, 255, 70, 78, 94, 255, 92, 104, 125, 255, 116, 131, 157, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 140, 154, 179, 255, 179, 197, 226, 208, 205, 213, 227, 8, 102, 106, 113, 140, 98, 110, 133, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 119, 133, 161, 255, 116, 131, 157, 255, 120, 135, 162, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 142, 171, 255, 166, 178, 200, 248, 0, 0, 0, 0, 114, 117, 120, 89, 83, 94, 114, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 130, 145, 173, 255, 188, 195, 209, 152, 184, 184, 185, 63, 115, 127, 149, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 123, 138, 166, 255, 103, 116, 139, 255, 82, 93, 112, 255, 75, 84, 100, 255, 73, 82, 98, 255, 91, 103, 124, 255, 122, 136, 164, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 135, 152, 183, 255, 165, 178, 204, 143, 81, 87, 95, 195, 120, 134, 162, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 143, 173, 255, 128, 143, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 141, 154, 181, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 73, 80, 240, 108, 121, 145, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 119, 134, 160, 255, 171, 185, 209, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 156, 158, 161, 39, 80, 86, 98, 250, 111, 124, 150, 255, 113, 127, 153, 255, 113, 127, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 111, 125, 151, 255, 97, 106, 123, 255, 126, 131, 141, 189, 160, 165, 173, 169, 136, 141, 148, 177, 84, 89, 96, 255, 72, 81, 97, 255, 114, 128, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 119, 133, 158, 255, 176, 193, 222, 252, 217, 223, 237, 44, 134, 136, 139, 96, 79, 89, 107, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 114, 129, 154, 255, 93, 101, 116, 240, 123, 126, 131, 149, 156, 157, 160, 93, 145, 147, 150, 109, 79, 83, 88, 179, 70, 79, 93, 255, 116, 131, 158, 255, 118, 133, 160, 255, 118, 132, 159, 255, 117, 131, 158, 255, 117, 131, 159, 255, 118, 133, 160, 255, 137, 153, 182, 255, 176, 184, 199, 94, 82, 89, 100, 224, 115, 129, 155, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 119, 134, 161, 255, 95, 106, 127, 255, 80, 87, 98, 249, 69, 74, 83, 225, 71, 77, 88, 255, 89, 100, 120, 255, 120, 135, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 126, 141, 171, 255, 166, 178, 200, 248, 0, 0, 0, 0, 114, 117, 120, 89, 83, 94, 113, 255, 122, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 127, 141, 169, 255, 184, 189, 198, 190, 162, 164, 170, 63, 107, 117, 137, 255, 98, 110, 133, 255, 97, 109, 131, 255, 96, 108, 130, 255, 95, 107, 129, 255, 95, 106, 128, 255, 98, 110, 132, 255, 113, 121, 134, 255, 160, 166, 178, 255, 165, 173, 189, 211, 156, 163, 177, 241, 100, 107, 120, 255, 91, 102, 123, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 130, 146, 176, 255, 167, 178, 199, 219, 75, 80, 87, 195, 73, 82, 99, 255, 79, 89, 108, 255, 120, 135, 163, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 143, 173, 255, 119, 133, 161, 255, 77, 86, 104, 255, 79, 89, 107, 255, 123, 135, 158, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 73, 80, 240, 108, 121, 145, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 119, 133, 160, 255, 171, 185, 209, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 140, 143, 119, 77, 87, 104, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 121, 136, 164, 255, 128, 143, 171, 255, 134, 149, 177, 255, 132, 146, 173, 255, 126, 140, 166, 255, 117, 130, 155, 255, 92, 103, 124, 255, 112, 126, 152, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 116, 130, 156, 255, 144, 161, 192, 255, 174, 189, 217, 97, 90, 94, 99, 173, 101, 114, 137, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 124, 136, 159, 255, 158, 163, 169, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 210, 211, 8, 86, 90, 95, 190, 70, 78, 91, 255, 81, 89, 103, 255, 88, 96, 109, 255, 88, 95, 106, 244, 81, 89, 101, 204, 98, 104, 115, 204, 115, 121, 131, 204, 159, 163, 169, 174, 80, 88, 102, 255, 119, 134, 160, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 117, 131, 157, 255, 126, 131, 140, 166, 163, 165, 167, 29, 207, 208, 209, 14, 131, 133, 136, 40, 77, 81, 87, 205, 96, 108, 130, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 126, 141, 170, 255, 166, 178, 200, 248, 0, 0, 0, 0, 114, 117, 120, 89, 83, 94, 113, 255, 122, 137, 165, 255, 122, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 121, 136, 164, 255, 100, 113, 136, 255, 84, 95, 114, 255, 78, 88, 106, 255, 98, 110, 131, 255, 165, 170, 178, 144, 201, 202, 205, 29, 139, 142, 146, 118, 124, 128, 135, 184, 103, 111, 126, 255, 96, 108, 131, 255, 112, 126, 152, 255, 119, 134, 161, 255, 129, 145, 175, 255, 138, 155, 187, 255, 135, 151, 182, 255, 134, 150, 181, 255, 132, 148, 178, 255, 128, 144, 173, 255, 123, 138, 166, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 128, 144, 173, 255, 165, 176, 197, 229, 176, 177, 179, 91, 159, 161, 163, 118, 84, 89, 96, 221, 117, 131, 157, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 134, 150, 181, 255, 130, 135, 143, 160, 159, 161, 163, 118, 178, 181, 185, 78, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 72, 80, 240, 108, 121, 145, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 119, 133, 160, 255, 171, 184, 209, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 97, 101, 130, 86, 96, 116, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 128, 144, 173, 255, 173, 187, 213, 166, 66, 70, 77, 189, 109, 122, 147, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 120, 135, 163, 255, 148, 161, 185, 192, 220, 222, 226, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, 188, 189, 41, 103, 106, 110, 43, 121, 123, 126, 35, 169, 171, 173, 35, 208, 209, 210, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 90, 94, 47, 78, 86, 102, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 142, 157, 185, 255, 214, 217, 223, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 129, 133, 108, 79, 89, 107, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 125, 141, 170, 255, 166, 178, 199, 248, 0, 0, 0, 0, 114, 117, 120, 89, 83, 94, 113, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 105, 117, 138, 255, 93, 96, 104, 156, 135, 137, 140, 121, 156, 158, 160, 121, 140, 143, 147, 121, 183, 185, 188, 49, 228, 229, 231, 12, 148, 155, 170, 147, 129, 142, 167, 252, 127, 142, 172, 255, 126, 141, 170, 255, 124, 140, 169, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 128, 144, 173, 255, 165, 176, 197, 229, 0, 0, 0, 0, 0, 0, 0, 0, 80, 85, 93, 192, 116, 131, 157, 255, 127, 142, 171, 255, 127, 142, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 136, 152, 183, 255, 133, 142, 161, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 72, 80, 240, 108, 120, 145, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 118, 133, 160, 255, 171, 184, 208, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 95, 100, 130, 84, 95, 114, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 114, 128, 153, 255, 114, 128, 153, 255, 114, 127, 154, 255, 113, 127, 154, 255, 113, 128, 154, 255, 120, 135, 163, 255, 156, 171, 200, 169, 93, 96, 102, 255, 112, 125, 151, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 124, 139, 168, 255, 167, 181, 208, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 189, 197, 41, 207, 211, 218, 46, 228, 231, 236, 46, 229, 233, 239, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 114, 117, 47, 76, 83, 98, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 160, 177, 207, 255, 190, 204, 229, 69, 0, 0, 0, 0, 0, 0, 0, 0, 183, 186, 190, 4, 110, 115, 124, 163, 101, 113, 137, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 125, 140, 170, 255, 166, 177, 199, 248, 0, 0, 0, 0, 114, 117, 120, 89, 83, 94, 113, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 138, 166, 255, 124, 140, 168, 255, 135, 148, 171, 192, 186, 188, 191, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, 139, 149, 107, 117, 131, 155, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 122, 137, 164, 255, 121, 135, 163, 255, 119, 133, 160, 255, 117, 131, 158, 255, 119, 134, 161, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 128, 143, 173, 255, 166, 176, 197, 229, 0, 0, 0, 0, 0, 0, 0, 0, 80, 85, 93, 192, 116, 130, 157, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 143, 172, 255, 127, 143, 172, 255, 136, 152, 183, 255, 136, 147, 167, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 72, 80, 240, 107, 120, 145, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 118, 133, 160, 255, 171, 184, 208, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 131, 134, 116, 70, 79, 95, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 154, 255, 107, 120, 144, 255, 91, 99, 113, 255, 93, 101, 114, 255, 92, 100, 113, 255, 91, 99, 112, 255, 90, 97, 110, 255, 83, 90, 103, 255, 79, 87, 99, 255, 80, 87, 99, 255, 84, 90, 102, 255, 82, 89, 100, 255, 81, 87, 98, 255, 79, 85, 95, 255, 79, 85, 96, 255, 145, 153, 167, 224, 67, 71, 77, 186, 105, 118, 142, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 121, 136, 164, 255, 175, 193, 224, 219, 216, 225, 239, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 124, 132, 66, 122, 134, 155, 251, 137, 150, 175, 255, 148, 163, 189, 255, 160, 176, 205, 246, 186, 202, 230, 215, 204, 216, 236, 215, 212, 223, 241, 215, 176, 186, 203, 214, 67, 73, 84, 248, 117, 131, 158, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 137, 151, 176, 255, 182, 198, 224, 237, 176, 193, 223, 176, 157, 172, 199, 138, 146, 157, 179, 219, 114, 127, 152, 255, 119, 134, 162, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 125, 140, 169, 255, 165, 177, 199, 248, 0, 0, 0, 0, 114, 117, 120, 89, 83, 94, 113, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 142, 171, 255, 152, 165, 189, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 201, 203, 11, 100, 108, 121, 224, 121, 136, 164, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 108, 121, 146, 255, 82, 91, 106, 255, 78, 84, 95, 247, 65, 71, 82, 212, 74, 79, 88, 212, 72, 78, 87, 248, 99, 111, 134, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 128, 143, 173, 255, 166, 177, 198, 229, 0, 0, 0, 0, 0, 0, 0, 0, 80, 85, 93, 192, 116, 130, 157, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 142, 172, 255, 136, 152, 183, 255, 136, 147, 167, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 72, 80, 240, 107, 120, 145, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 118, 133, 160, 255, 171, 183, 208, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 115, 119, 45, 66, 72, 84, 255, 112, 125, 150, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 158, 171, 193, 255, 185, 196, 215, 207, 207, 211, 217, 66, 209, 210, 211, 43, 210, 211, 212, 46, 185, 189, 194, 119, 126, 136, 153, 233, 126, 139, 163, 255, 134, 147, 170, 255, 157, 170, 194, 255, 179, 192, 213, 255, 196, 206, 221, 255, 210, 218, 230, 255, 207, 215, 228, 255, 200, 209, 223, 194, 110, 112, 116, 160, 83, 93, 112, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 163, 177, 199, 255, 193, 208, 235, 176, 205, 215, 232, 45, 227, 232, 239, 3, 222, 225, 229, 10, 148, 154, 167, 62, 103, 112, 128, 229, 113, 127, 154, 255, 118, 132, 159, 255, 118, 132, 159, 255, 119, 133, 161, 255, 122, 137, 164, 255, 126, 141, 167, 255, 143, 159, 186, 255, 179, 191, 212, 166, 83, 87, 93, 202, 100, 112, 135, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 125, 139, 166, 255, 133, 149, 178, 255, 130, 146, 176, 255, 123, 139, 166, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 125, 140, 169, 255, 165, 177, 199, 248, 0, 0, 0, 0, 114, 117, 120, 89, 83, 94, 112, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 141, 170, 255, 153, 165, 190, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 157, 160, 65, 87, 97, 114, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 125, 140, 169, 255, 130, 144, 168, 238, 147, 151, 159, 74, 209, 211, 214, 56, 192, 198, 210, 55, 150, 160, 178, 141, 120, 133, 156, 248, 123, 138, 166, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 127, 143, 173, 255, 166, 177, 198, 229, 0, 0, 0, 0, 0, 0, 0, 0, 80, 85, 93, 192, 116, 130, 156, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 142, 171, 255, 135, 152, 182, 255, 136, 147, 167, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 72, 80, 240, 107, 120, 144, 255, 110, 124, 149, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 118, 133, 159, 255, 171, 183, 208, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 201, 202, 8, 82, 85, 91, 209, 93, 104, 125, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 117, 130, 156, 255, 158, 173, 196, 255, 164, 182, 213, 235, 161, 175, 202, 209, 143, 157, 181, 213, 122, 134, 158, 255, 113, 127, 153, 255, 114, 128, 155, 255, 114, 128, 155, 255, 116, 131, 157, 255, 119, 133, 160, 255, 124, 138, 164, 255, 130, 144, 168, 255, 156, 171, 198, 254, 186, 197, 216, 84, 144, 146, 149, 46, 58, 64, 74, 255, 114, 128, 154, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 119, 133, 159, 255, 155, 169, 193, 255, 166, 184, 214, 255, 156, 172, 203, 212, 144, 159, 185, 221, 125, 138, 164, 255, 116, 131, 157, 255, 117, 132, 159, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 127, 141, 166, 255, 171, 179, 193, 53, 122, 125, 128, 82, 63, 70, 82, 249, 115, 129, 155, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 125, 140, 168, 255, 165, 176, 198, 248, 0, 0, 0, 0, 114, 117, 120, 89, 83, 93, 112, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 141, 170, 255, 153, 166, 190, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 121, 124, 65, 82, 92, 109, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 140, 168, 255, 162, 177, 203, 255, 169, 187, 218, 231, 157, 174, 204, 233, 146, 161, 190, 255, 129, 145, 175, 255, 125, 141, 169, 255, 125, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 127, 143, 172, 255, 166, 177, 198, 229, 0, 0, 0, 0, 0, 0, 0, 0, 80, 85, 93, 192, 116, 130, 156, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 135, 152, 182, 255, 136, 147, 166, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 72, 80, 240, 107, 120, 144, 255, 110, 124, 149, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 118, 133, 159, 255, 171, 183, 208, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 138, 142, 82, 58, 64, 75, 249, 105, 118, 142, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 116, 130, 157, 255, 118, 133, 160, 255, 116, 131, 157, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 128, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 110, 124, 149, 255, 145, 154, 171, 197, 0, 0, 0, 0, 173, 174, 176, 0, 97, 100, 104, 175, 75, 85, 102, 255, 115, 129, 155, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 117, 132, 159, 255, 120, 135, 162, 255, 119, 133, 160, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 110, 124, 149, 255, 130, 138, 152, 175, 226, 227, 230, 7, 0, 0, 0, 0, 107, 110, 114, 162, 70, 77, 92, 255, 113, 127, 153, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 119, 134, 161, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 125, 140, 168, 255, 164, 176, 198, 248, 0, 0, 0, 0, 114, 117, 120, 89, 83, 93, 112, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 141, 170, 255, 153, 166, 191, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 189, 190, 192, 56, 72, 79, 91, 252, 121, 136, 164, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 126, 141, 169, 255, 126, 141, 171, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 127, 143, 172, 255, 166, 178, 198, 229, 0, 0, 0, 0, 0, 0, 0, 0, 80, 85, 93, 192, 116, 130, 156, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 135, 151, 182, 255, 136, 147, 166, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 72, 80, 240, 107, 120, 144, 255, 110, 124, 149, 255, 110, 124, 149, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 118, 133, 159, 255, 171, 183, 207, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 85, 89, 99, 58, 64, 76, 249, 102, 114, 138, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 113, 127, 154, 255, 100, 113, 136, 255, 100, 107, 122, 199, 139, 143, 152, 16, 0, 0, 0, 0, 0, 0, 0, 0, 182, 183, 185, 17, 82, 86, 91, 205, 72, 81, 97, 255, 113, 127, 152, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 116, 131, 158, 255, 102, 115, 138, 255, 114, 120, 133, 221, 194, 196, 200, 36, 0, 0, 0, 0, 0, 0, 0, 0, 200, 201, 202, 9, 99, 102, 106, 136, 64, 70, 80, 249, 90, 100, 121, 255, 113, 127, 153, 255, 118, 133, 160, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 117, 132, 159, 255, 112, 125, 151, 255, 88, 98, 119, 255, 95, 107, 129, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 124, 139, 168, 255, 164, 176, 198, 248, 0, 0, 0, 0, 114, 117, 120, 89, 83, 93, 112, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 126, 141, 170, 255, 154, 167, 191, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 87, 93, 195, 95, 107, 128, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 123, 138, 166, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 128, 143, 172, 255, 170, 182, 205, 229, 0, 0, 0, 0, 0, 0, 0, 0, 80, 85, 93, 192, 115, 130, 156, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 135, 151, 182, 255, 136, 147, 166, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 72, 80, 240, 107, 120, 144, 255, 110, 124, 149, 255, 110, 124, 149, 255, 110, 124, 149, 255, 111, 124, 150, 255, 111, 124, 150, 255, 118, 132, 159, 255, 170, 183, 207, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 105, 109, 99, 69, 73, 81, 240, 75, 83, 100, 255, 104, 117, 140, 255, 111, 125, 151, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 111, 124, 149, 255, 97, 109, 131, 255, 84, 92, 108, 254, 118, 123, 130, 190, 142, 144, 148, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 201, 202, 18, 98, 100, 105, 167, 63, 70, 81, 255, 89, 100, 120, 255, 112, 126, 151, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 115, 129, 155, 255, 104, 117, 141, 255, 84, 93, 109, 249, 112, 116, 125, 179, 192, 193, 196, 36, 0, 0, 0, 0, 200, 201, 204, 21, 164, 172, 188, 188, 158, 175, 206, 129, 173, 185, 207, 187, 157, 166, 181, 246, 88, 97, 112, 255, 82, 91, 105, 255, 92, 101, 117, 255, 94, 104, 122, 255, 77, 85, 101, 255, 77, 85, 99, 255, 71, 78, 89, 242, 85, 91, 99, 217, 98, 102, 106, 188, 85, 95, 115, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 123, 139, 167, 255, 147, 161, 187, 180, 0, 0, 0, 0, 114, 117, 120, 89, 83, 93, 112, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 126, 141, 170, 255, 154, 167, 191, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 160, 162, 53, 74, 79, 86, 235, 92, 103, 124, 255, 120, 135, 163, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 123, 138, 166, 255, 114, 128, 154, 255, 91, 102, 123, 255, 74, 83, 100, 255, 122, 137, 165, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 169, 255, 127, 143, 172, 255, 159, 175, 206, 241, 187, 195, 210, 37, 0, 0, 0, 0, 80, 85, 93, 192, 115, 130, 156, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 134, 150, 181, 255, 136, 146, 166, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 75, 81, 240, 71, 79, 93, 255, 73, 80, 95, 255, 73, 80, 95, 255, 73, 80, 95, 255, 73, 81, 95, 255, 73, 81, 95, 255, 79, 88, 103, 255, 160, 170, 190, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 171, 173, 27, 93, 96, 100, 138, 75, 79, 86, 228, 62, 69, 79, 250, 72, 81, 97, 255, 83, 93, 112, 255, 90, 101, 122, 255, 93, 105, 126, 255, 91, 102, 123, 255, 85, 96, 115, 255, 79, 88, 106, 255, 76, 84, 98, 255, 78, 84, 94, 235, 97, 100, 107, 166, 158, 160, 162, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 155, 158, 83, 81, 84, 89, 169, 65, 70, 79, 245, 70, 78, 92, 255, 80, 89, 108, 255, 93, 104, 126, 255, 97, 109, 131, 255, 100, 113, 135, 255, 100, 112, 135, 255, 96, 108, 130, 255, 86, 97, 117, 255, 80, 89, 106, 255, 74, 81, 93, 240, 84, 89, 96, 181, 150, 152, 155, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 228, 229, 10, 82, 87, 96, 225, 120, 135, 163, 255, 132, 148, 178, 255, 137, 154, 183, 255, 145, 161, 186, 255, 151, 164, 186, 255, 154, 166, 187, 255, 177, 188, 207, 255, 154, 162, 175, 165, 134, 137, 140, 56, 185, 187, 188, 32, 217, 219, 222, 3, 131, 135, 141, 152, 94, 106, 128, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 123, 139, 167, 255, 142, 154, 177, 162, 0, 0, 0, 0, 120, 122, 126, 89, 62, 69, 81, 255, 77, 86, 101, 255, 77, 86, 101, 255, 77, 86, 101, 255, 77, 86, 101, 255, 77, 86, 101, 255, 80, 89, 105, 255, 139, 150, 168, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 145, 147, 33, 88, 91, 96, 183, 67, 74, 85, 252, 80, 90, 108, 255, 94, 105, 126, 255, 102, 114, 138, 255, 101, 114, 137, 255, 96, 108, 130, 255, 84, 94, 113, 255, 75, 83, 97, 250, 80, 85, 94, 214, 108, 111, 116, 128, 77, 82, 88, 220, 81, 90, 106, 255, 87, 97, 114, 255, 91, 101, 120, 255, 94, 105, 124, 255, 97, 108, 128, 255, 100, 111, 132, 255, 107, 119, 140, 255, 135, 144, 160, 183, 0, 0, 0, 0, 83, 87, 93, 192, 76, 84, 99, 255, 79, 88, 104, 255, 79, 88, 104, 255, 79, 88, 104, 255, 80, 88, 104, 255, 80, 88, 104, 255, 93, 103, 122, 255, 137, 147, 165, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 139, 142, 56, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 166, 170, 176, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 159, 162, 47, 135, 137, 141, 127, 108, 110, 114, 145, 85, 88, 93, 145, 69, 73, 79, 145, 88, 92, 97, 145, 114, 117, 121, 145, 118, 121, 124, 110, 147, 149, 152, 59, 219, 219, 220, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 202, 204, 38, 112, 115, 119, 59, 120, 122, 126, 141, 83, 86, 91, 145, 62, 66, 71, 145, 58, 62, 69, 145, 58, 62, 68, 145, 77, 81, 87, 145, 117, 120, 124, 145, 98, 101, 104, 67, 178, 179, 182, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 83, 88, 150, 91, 102, 123, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 135, 149, 174, 255, 183, 199, 225, 228, 182, 197, 222, 196, 179, 190, 212, 196, 154, 167, 189, 202, 118, 131, 154, 255, 117, 131, 158, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 121, 136, 163, 255, 147, 155, 171, 125, 0, 0, 0, 0, 171, 172, 174, 21, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 148, 151, 155, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 157, 159, 53, 131, 133, 136, 136, 98, 101, 105, 145, 65, 70, 75, 145, 75, 79, 84, 145, 100, 103, 108, 145, 109, 112, 116, 100, 161, 162, 165, 49, 0, 0, 0, 0, 0, 0, 0, 0, 151, 153, 155, 49, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 140, 143, 149, 53, 0, 0, 0, 0, 142, 144, 147, 44, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 117, 120, 123, 59, 118, 121, 124, 59, 162, 166, 173, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 146, 149, 90, 64, 71, 83, 252, 115, 129, 155, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 125, 140, 166, 255, 133, 148, 178, 255, 129, 144, 175, 255, 123, 139, 167, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 119, 134, 161, 255, 116, 127, 147, 251, 197, 200, 206, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 103, 108, 173, 72, 80, 96, 255, 115, 129, 155, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 118, 132, 160, 255, 98, 109, 130, 254, 140, 145, 154, 141, 0, 0, 0, 0, 0, 0, 0, 0, 188, 196, 211, 7, 164, 176, 196, 19, 165, 176, 197, 19, 165, 176, 197, 19, 165, 176, 197, 19, 188, 197, 211, 19, 209, 215, 225, 0, 197, 204, 217, 12, 165, 176, 197, 19, 170, 181, 200, 13, 0, 0, 0, 0, 0, 0, 0, 0, 180, 189, 207, 18, 164, 175, 196, 19, 188, 196, 212, 8, 0, 0, 0, 0, 223, 227, 234, 4, 195, 203, 216, 38, 192, 200, 214, 105, 190, 198, 213, 105, 201, 208, 220, 58, 195, 203, 216, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 178, 197, 15, 165, 176, 197, 19, 165, 176, 197, 19, 165, 176, 197, 19, 167, 178, 198, 19, 204, 210, 222, 17, 0, 0, 0, 0, 179, 188, 206, 8, 164, 175, 196, 19, 167, 178, 198, 11, 0, 0, 0, 0, 0, 0, 0, 0, 185, 194, 210, 14, 202, 208, 220, 81, 201, 208, 220, 105, 195, 203, 216, 43, 202, 208, 220, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 201, 202, 11, 107, 110, 114, 181, 62, 69, 81, 252, 101, 113, 136, 255, 117, 131, 158, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 117, 132, 159, 255, 104, 117, 141, 255, 84, 93, 108, 249, 124, 128, 135, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 177, 197, 89, 137, 152, 178, 255, 137, 152, 179, 255, 138, 153, 179, 255, 138, 152, 179, 255, 143, 157, 182, 255, 153, 166, 189, 108, 180, 190, 207, 162, 137, 152, 179, 255, 145, 159, 184, 182, 0, 0, 0, 0, 0, 0, 0, 0, 158, 170, 192, 238, 137, 151, 178, 255, 168, 179, 199, 106, 162, 173, 194, 4, 152, 165, 188, 158, 138, 153, 179, 255, 131, 146, 175, 255, 131, 147, 175, 255, 135, 150, 177, 255, 151, 164, 187, 180, 195, 202, 216, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 154, 180, 210, 137, 152, 179, 255, 138, 153, 179, 255, 138, 153, 179, 255, 138, 152, 179, 255, 150, 163, 187, 247, 185, 194, 209, 75, 157, 169, 192, 112, 137, 151, 178, 255, 164, 175, 196, 210, 200, 207, 219, 1, 167, 178, 198, 115, 141, 156, 181, 237, 132, 147, 175, 255, 132, 147, 175, 255, 135, 150, 177, 255, 149, 162, 186, 204, 181, 191, 208, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 111, 115, 71, 84, 88, 94, 226, 63, 70, 82, 252, 80, 89, 108, 255, 97, 109, 132, 255, 107, 120, 144, 255, 110, 124, 149, 255, 110, 124, 150, 255, 107, 121, 145, 255, 104, 117, 140, 255, 96, 108, 130, 255, 81, 90, 108, 255, 73, 80, 93, 250, 86, 91, 98, 174, 105, 108, 112, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 172, 193, 89, 127, 143, 172, 255, 153, 165, 188, 255, 149, 162, 186, 70, 166, 177, 197, 158, 127, 143, 172, 255, 150, 163, 187, 255, 176, 186, 204, 169, 127, 143, 172, 255, 137, 152, 179, 182, 0, 0, 0, 0, 0, 0, 0, 0, 151, 164, 187, 238, 127, 143, 172, 255, 162, 174, 195, 106, 159, 171, 193, 128, 128, 144, 173, 255, 141, 155, 181, 233, 177, 186, 204, 79, 185, 193, 210, 70, 145, 159, 184, 191, 157, 169, 191, 242, 192, 200, 215, 86, 228, 232, 238, 7, 229, 232, 238, 13, 229, 232, 238, 13, 230, 233, 239, 2, 131, 147, 175, 210, 127, 143, 172, 255, 142, 156, 182, 109, 148, 161, 186, 70, 148, 161, 186, 188, 127, 143, 172, 255, 154, 166, 189, 170, 150, 163, 187, 112, 127, 143, 172, 255, 165, 176, 196, 233, 190, 198, 213, 83, 133, 149, 176, 255, 132, 147, 175, 248, 153, 165, 189, 93, 181, 190, 207, 70, 140, 154, 180, 169, 127, 143, 172, 255, 148, 161, 186, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 164, 166, 59, 118, 120, 124, 141, 77, 81, 86, 158, 91, 94, 100, 226, 95, 98, 104, 244, 93, 96, 102, 244, 88, 92, 98, 207, 65, 69, 75, 158, 99, 101, 106, 158, 130, 132, 135, 94, 199, 199, 201, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 172, 193, 89, 127, 143, 172, 255, 142, 156, 182, 255, 157, 170, 192, 183, 146, 160, 185, 206, 127, 143, 172, 255, 151, 164, 188, 225, 176, 186, 204, 167, 127, 143, 172, 255, 137, 152, 179, 182, 0, 0, 0, 0, 0, 0, 0, 0, 151, 164, 187, 238, 127, 143, 172, 255, 162, 174, 195, 106, 162, 174, 195, 233, 127, 143, 172, 255, 163, 174, 195, 136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 174, 195, 193, 156, 168, 191, 255, 158, 170, 192, 255, 164, 176, 196, 43, 131, 147, 175, 210, 127, 143, 172, 255, 145, 158, 183, 221, 137, 152, 178, 183, 138, 152, 179, 240, 128, 144, 173, 255, 161, 172, 194, 138, 150, 163, 187, 112, 127, 143, 172, 255, 165, 176, 196, 233, 159, 171, 193, 139, 127, 143, 172, 255, 154, 167, 189, 206, 0, 0, 0, 0, 0, 0, 0, 0, 197, 204, 217, 64, 127, 143, 172, 255, 132, 147, 175, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 172, 193, 89, 127, 143, 172, 255, 136, 151, 178, 255, 160, 172, 194, 247, 160, 172, 194, 247, 158, 170, 192, 191, 186, 194, 210, 54, 175, 185, 203, 162, 127, 143, 172, 255, 137, 151, 178, 185, 182, 191, 207, 0, 220, 225, 233, 2, 148, 162, 186, 239, 127, 143, 172, 255, 168, 179, 198, 106, 157, 169, 191, 201, 127, 143, 172, 255, 162, 174, 195, 174, 209, 215, 225, 1, 0, 0, 0, 0, 157, 169, 191, 53, 165, 177, 197, 94, 188, 196, 212, 45, 171, 182, 201, 182, 168, 179, 199, 247, 169, 180, 199, 247, 173, 184, 202, 41, 131, 147, 175, 210, 127, 143, 172, 255, 150, 163, 187, 208, 141, 155, 181, 234, 127, 143, 172, 255, 149, 162, 186, 176, 218, 222, 231, 16, 150, 163, 187, 112, 127, 143, 172, 255, 165, 176, 196, 233, 162, 173, 195, 131, 127, 143, 172, 255, 146, 159, 184, 214, 190, 198, 213, 2, 0, 0, 0, 0, 174, 184, 202, 74, 127, 143, 172, 255, 139, 153, 180, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 172, 193, 89, 127, 143, 172, 255, 161, 172, 194, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, 196, 212, 101, 130, 146, 174, 255, 132, 147, 175, 255, 160, 172, 194, 181, 163, 175, 195, 198, 130, 146, 174, 255, 135, 150, 177, 254, 183, 192, 208, 46, 172, 182, 201, 86, 133, 149, 176, 254, 134, 149, 176, 255, 161, 172, 194, 186, 160, 172, 193, 177, 132, 148, 176, 245, 134, 149, 177, 254, 184, 193, 209, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 147, 175, 210, 127, 143, 172, 255, 127, 143, 172, 48, 176, 186, 204, 88, 131, 146, 175, 254, 137, 152, 179, 246, 183, 192, 208, 41, 150, 163, 187, 112, 127, 143, 172, 255, 164, 176, 196, 233, 188, 197, 212, 39, 136, 150, 178, 230, 129, 145, 173, 255, 152, 165, 188, 198, 170, 180, 200, 177, 139, 153, 180, 233, 128, 144, 173, 255, 166, 177, 197, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163, 175, 195, 58, 134, 149, 176, 166, 165, 176, 196, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 185, 203, 132, 155, 167, 190, 220, 151, 164, 188, 252, 152, 165, 188, 252, 151, 164, 188, 201, 173, 183, 202, 95, 0, 0, 0, 0, 0, 0, 0, 0, 182, 191, 208, 93, 148, 161, 186, 186, 152, 165, 188, 252, 153, 166, 189, 252, 157, 170, 192, 206, 172, 182, 201, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 151, 178, 137, 134, 149, 177, 166, 134, 149, 177, 32, 0, 0, 0, 0, 150, 163, 186, 132, 134, 149, 176, 166, 171, 182, 201, 121, 154, 166, 189, 73, 134, 149, 176, 166, 168, 179, 198, 152, 0, 0, 0, 0, 171, 182, 201, 39, 151, 164, 188, 172, 156, 168, 191, 252, 151, 164, 187, 252, 154, 166, 189, 220, 171, 182, 201, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(138, 32, imgdata); + return image; +} + +static Ihandle* load_image_Petrobras(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 21, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 4, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 1, 0, 0, 0, 0, 217, 231, 222, 18, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 21, 0, 0, 0, 0, 0, 0, 0, 0, 218, 232, 223, 27, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 174, 205, 185, 9, 56, 160, 112, 55, 65, 165, 120, 95, 61, 164, 118, 91, 86, 170, 129, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 16, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 18, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 7, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 29, 217, 231, 222, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 180, 144, 41, 52, 160, 111, 79, 61, 163, 116, 96, 60, 163, 116, 74, 135, 191, 162, 19, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 3, 141, 81, 255, 3, 141, 81, 255, 3, 141, 81, 255, 3, 141, 81, 255, 3, 141, 81, 255, 164, 212, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 230, 242, 236, 255, 119, 191, 159, 255, 4, 142, 82, 255, 3, 141, 81, 255, 3, 141, 81, 255, 22, 149, 93, 255, 251, 253, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 254, 255, 206, 231, 219, 255, 49, 161, 112, 255, 3, 141, 81, 255, 3, 141, 81, 255, 3, 141, 81, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 146, 90, 224, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 7, 142, 83, 252, 20, 147, 91, 221, 36, 152, 99, 118, 192, 219, 204, 6, 0, 0, 0, 0, 0, 0, 0, 0, 52, 159, 111, 91, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 16, 146, 89, 246, 153, 200, 175, 8, 0, 0, 0, 0, 21, 148, 91, 202, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 27, 150, 95, 177, 0, 0, 0, 0, 110, 180, 145, 23, 9, 143, 85, 252, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 3, 141, 81, 255, 6, 142, 82, 251, 22, 148, 93, 235, 21, 147, 91, 158, 100, 177, 139, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 171, 130, 22, 28, 149, 95, 148, 11, 144, 86, 242, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 23, 148, 92, 203, 84, 172, 131, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 148, 91, 203, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 3, 141, 81, 252, 19, 147, 90, 239, 25, 149, 93, 168, 82, 171, 129, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 148, 93, 214, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 2, 141, 80, 252, 17, 146, 89, 242, 26, 149, 94, 189, 57, 160, 113, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 150, 96, 161, 4, 141, 81, 255, 4, 141, 81, 255, 4, 141, 81, 255, 36, 154, 102, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 204, 185, 1, 51, 159, 109, 94, 21, 147, 91, 219, 1, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 9, 143, 84, 245, 43, 156, 105, 111, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 81, 255, 232, 244, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 89, 178, 138, 255, 0, 140, 79, 255, 0, 140, 79, 255, 88, 178, 138, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 218, 237, 228, 255, 3, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 166, 122, 43, 1, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 37, 153, 100, 114, 0, 0, 0, 0, 0, 0, 0, 0, 29, 151, 96, 164, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 24, 149, 93, 181, 0, 0, 0, 0, 113, 182, 148, 22, 6, 142, 82, 253, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 40, 154, 102, 104, 0, 0, 0, 0, 48, 158, 108, 93, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 24, 148, 93, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 162, 116, 66, 11, 144, 85, 233, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 19, 147, 90, 224, 143, 191, 164, 9, 0, 0, 0, 0, 0, 0, 0, 0, 115, 182, 148, 25, 5, 141, 82, 252, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 20, 147, 90, 164, 0, 0, 0, 0, 0, 0, 0, 0, 111, 181, 146, 32, 3, 141, 81, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 16, 146, 89, 233, 222, 234, 226, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 160, 112, 72, 2, 141, 80, 253, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 13, 144, 86, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 151, 98, 136, 1, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 5, 142, 82, 253, 80, 170, 127, 41, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 54, 163, 115, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 254, 255, 76, 172, 130, 255, 56, 164, 116, 255, 56, 164, 117, 255, 165, 213, 191, 255, 255, 255, 255, 255, 255, 255, 255, 255, 146, 206, 180, 255, 0, 140, 79, 255, 0, 140, 79, 255, 162, 212, 189, 255, 255, 255, 255, 255, 255, 255, 255, 255, 185, 222, 205, 255, 56, 164, 116, 255, 56, 164, 116, 255, 76, 173, 130, 255, 234, 245, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 32, 153, 100, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 152, 99, 117, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 8, 143, 84, 185, 16, 146, 89, 173, 14, 145, 87, 223, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 27, 149, 95, 183, 0, 0, 0, 0, 180, 208, 190, 4, 17, 146, 89, 233, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 83, 239, 0, 140, 79, 160, 0, 140, 79, 160, 0, 140, 79, 160, 0, 140, 79, 160, 0, 140, 79, 160, 32, 151, 98, 76, 0, 0, 0, 0, 65, 163, 117, 95, 13, 144, 86, 255, 13, 144, 86, 255, 11, 143, 85, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 5, 142, 82, 255, 13, 144, 86, 255, 13, 144, 86, 255, 16, 145, 87, 253, 95, 174, 136, 31, 0, 0, 0, 0, 29, 151, 97, 168, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 7, 143, 83, 169, 0, 140, 79, 160, 18, 147, 90, 214, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 24, 149, 93, 191, 0, 0, 0, 0, 0, 0, 0, 0, 66, 163, 117, 53, 8, 142, 83, 244, 0, 140, 79, 255, 0, 140, 79, 255, 8, 143, 83, 245, 23, 148, 93, 155, 25, 148, 93, 145, 9, 143, 85, 248, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 46, 157, 106, 84, 0, 0, 0, 0, 0, 0, 0, 0, 43, 155, 104, 94, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 83, 194, 0, 140, 79, 160, 24, 149, 94, 205, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 20, 147, 91, 178, 0, 0, 0, 0, 0, 0, 0, 0, 43, 156, 105, 104, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 82, 191, 0, 140, 79, 160, 23, 149, 93, 194, 2, 140, 80, 254, 0, 140, 79, 255, 0, 140, 79, 255, 10, 144, 85, 249, 217, 231, 222, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 173, 134, 11, 13, 145, 87, 222, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 29, 151, 97, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 157, 107, 55, 2, 141, 80, 254, 0, 140, 79, 255, 0, 140, 79, 255, 26, 149, 94, 168, 46, 155, 104, 94, 16, 145, 88, 176, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 50, 156, 107, 88, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 128, 196, 166, 255, 255, 255, 255, 255, 255, 255, 255, 255, 215, 236, 226, 255, 1, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 126, 195, 163, 255, 255, 255, 255, 255, 255, 255, 255, 255, 120, 192, 160, 255, 0, 140, 79, 255, 4, 142, 82, 255, 232, 243, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 102, 185, 148, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 204, 230, 218, 255, 255, 255, 255, 255, 251, 253, 252, 255, 17, 146, 89, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 147, 91, 190, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 83, 254, 113, 181, 146, 24, 0, 0, 0, 0, 101, 174, 137, 28, 4, 141, 81, 255, 0, 140, 79, 255, 0, 140, 79, 255, 31, 152, 98, 161, 0, 0, 0, 0, 81, 170, 128, 54, 1, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 27, 150, 95, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 189, 162, 3, 117, 174, 140, 5, 117, 174, 140, 5, 59, 161, 114, 89, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 35, 153, 100, 131, 117, 174, 140, 5, 117, 174, 140, 5, 117, 174, 140, 5, 0, 0, 0, 0, 185, 211, 194, 2, 15, 145, 88, 234, 0, 140, 79, 255, 0, 140, 79, 255, 15, 145, 88, 222, 207, 224, 213, 0, 0, 0, 0, 0, 116, 183, 149, 25, 2, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 26, 149, 94, 124, 0, 0, 0, 0, 167, 205, 184, 8, 16, 146, 88, 215, 0, 140, 79, 255, 0, 140, 79, 255, 8, 143, 84, 246, 65, 165, 119, 55, 0, 0, 0, 0, 0, 0, 0, 0, 31, 151, 97, 131, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 46, 158, 108, 129, 0, 0, 0, 0, 0, 0, 0, 0, 23, 148, 92, 166, 0, 140, 79, 255, 0, 140, 79, 255, 2, 140, 80, 255, 73, 166, 123, 45, 0, 0, 0, 0, 68, 165, 119, 42, 1, 140, 80, 255, 0, 140, 79, 255, 1, 140, 79, 255, 49, 157, 107, 91, 0, 0, 0, 0, 0, 0, 0, 0, 24, 149, 94, 177, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 89, 172, 132, 35, 0, 0, 0, 0, 0, 0, 0, 0, 24, 149, 93, 219, 0, 140, 79, 255, 0, 140, 79, 255, 19, 147, 90, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 153, 100, 146, 0, 140, 79, 255, 0, 140, 79, 255, 19, 147, 91, 248, 0, 140, 79, 255, 0, 140, 79, 255, 15, 146, 88, 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 150, 96, 151, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 35, 152, 99, 137, 112, 181, 146, 21, 47, 154, 104, 23, 0, 140, 79, 72, 0, 140, 79, 72, 0, 140, 79, 72, 59, 161, 114, 25, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 201, 229, 216, 255, 255, 255, 255, 255, 255, 255, 255, 255, 236, 245, 240, 255, 194, 226, 211, 255, 194, 226, 211, 255, 203, 230, 217, 255, 252, 253, 253, 255, 255, 255, 255, 255, 224, 240, 232, 255, 20, 148, 92, 255, 0, 140, 79, 255, 55, 163, 115, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 101, 185, 148, 255, 72, 172, 129, 255, 78, 174, 132, 255, 153, 207, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 163, 212, 190, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 185, 154, 13, 8, 143, 84, 249, 0, 140, 79, 255, 0, 140, 79, 255, 18, 147, 90, 205, 0, 0, 0, 0, 135, 191, 163, 3, 37, 152, 99, 132, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 47, 156, 106, 75, 0, 0, 0, 0, 29, 150, 96, 122, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 15, 145, 87, 229, 19, 146, 89, 205, 19, 146, 89, 205, 19, 146, 89, 205, 33, 151, 97, 197, 180, 208, 190, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 151, 98, 158, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 77, 168, 125, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 164, 119, 54, 1, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 21, 147, 91, 171, 0, 140, 79, 39, 53, 160, 112, 59, 33, 152, 98, 172, 0, 140, 79, 255, 0, 140, 79, 255, 12, 144, 86, 232, 78, 166, 123, 19, 0, 0, 0, 0, 41, 154, 102, 95, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 30, 150, 96, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 154, 103, 108, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 41, 155, 104, 116, 0, 0, 0, 0, 158, 201, 178, 1, 16, 146, 88, 238, 0, 140, 79, 255, 0, 140, 79, 255, 8, 142, 83, 250, 31, 149, 96, 141, 22, 147, 91, 142, 13, 144, 86, 223, 0, 140, 79, 255, 1, 140, 79, 254, 31, 150, 96, 145, 173, 204, 185, 1, 0, 0, 0, 0, 135, 192, 163, 7, 14, 145, 87, 243, 0, 140, 79, 255, 0, 140, 79, 255, 13, 145, 87, 227, 3, 141, 81, 39, 40, 156, 105, 48, 33, 151, 97, 117, 4, 141, 81, 254, 0, 140, 79, 255, 6, 142, 82, 254, 54, 159, 111, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 159, 111, 54, 4, 141, 81, 252, 0, 140, 79, 255, 7, 142, 83, 246, 54, 162, 113, 139, 0, 140, 79, 255, 0, 140, 79, 255, 21, 148, 92, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 154, 101, 178, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 83, 251, 22, 148, 92, 204, 36, 153, 100, 123, 112, 182, 147, 19, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 23, 149, 94, 255, 252, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 252, 255, 57, 163, 116, 255, 0, 140, 79, 255, 0, 140, 79, 255, 129, 197, 166, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 179, 219, 200, 255, 13, 145, 87, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 155, 104, 80, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 245, 0, 140, 79, 227, 8, 143, 84, 241, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 25, 149, 93, 195, 147, 189, 163, 2, 0, 0, 0, 0, 17, 146, 89, 194, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 20, 147, 91, 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 211, 194, 1, 16, 146, 88, 224, 0, 140, 79, 255, 0, 140, 79, 255, 16, 146, 88, 236, 127, 187, 156, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 151, 97, 126, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 19, 147, 90, 199, 79, 170, 128, 49, 0, 0, 0, 0, 0, 0, 0, 0, 20, 147, 90, 186, 0, 140, 79, 255, 0, 140, 79, 255, 4, 141, 81, 255, 107, 178, 142, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 152, 98, 157, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 70, 166, 121, 63, 0, 0, 0, 0, 75, 168, 124, 59, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 18, 146, 89, 229, 91, 173, 133, 40, 0, 0, 0, 0, 0, 0, 0, 0, 60, 162, 115, 65, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 14, 145, 88, 227, 53, 159, 110, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 194, 167, 7, 18, 146, 90, 212, 0, 140, 79, 255, 0, 140, 79, 255, 28, 149, 95, 131, 0, 140, 79, 83, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 83, 248, 208, 225, 214, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 162, 115, 81, 7, 142, 83, 254, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 15, 145, 88, 231, 88, 171, 131, 30, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 95, 181, 143, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 250, 247, 255, 122, 192, 160, 255, 122, 192, 160, 255, 127, 196, 165, 255, 226, 241, 234, 255, 255, 255, 255, 255, 255, 255, 255, 255, 190, 224, 209, 255, 0, 140, 79, 255, 0, 140, 79, 255, 203, 230, 218, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 251, 249, 255, 239, 248, 244, 255, 245, 250, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 243, 248, 245, 255, 62, 166, 120, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 149, 94, 154, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 20, 147, 91, 195, 58, 155, 107, 17, 0, 0, 0, 0, 117, 183, 150, 18, 7, 143, 83, 251, 0, 140, 79, 255, 0, 140, 79, 255, 11, 144, 86, 250, 24, 149, 94, 239, 24, 149, 94, 239, 24, 149, 94, 239, 24, 149, 94, 239, 50, 158, 108, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 167, 124, 43, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 24, 148, 93, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 147, 90, 198, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 25, 149, 94, 201, 139, 193, 165, 13, 0, 0, 0, 0, 196, 218, 204, 5, 14, 145, 87, 243, 0, 140, 79, 255, 0, 140, 79, 255, 18, 146, 90, 227, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, 189, 158, 8, 12, 144, 86, 230, 0, 140, 79, 255, 0, 140, 79, 255, 15, 145, 87, 226, 198, 218, 205, 5, 0, 0, 0, 0, 33, 152, 99, 132, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 36, 155, 102, 193, 42, 157, 106, 173, 24, 148, 93, 181, 3, 141, 80, 252, 0, 140, 79, 255, 0, 140, 79, 255, 21, 147, 91, 164, 0, 0, 0, 0, 0, 0, 0, 0, 28, 150, 95, 138, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 15, 145, 88, 232, 56, 159, 111, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 150, 96, 123, 0, 140, 79, 255, 0, 140, 79, 255, 10, 143, 84, 229, 128, 189, 158, 16, 0, 140, 79, 83, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 82, 255, 112, 177, 142, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 166, 122, 58, 26, 150, 95, 169, 15, 145, 88, 240, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 42, 157, 106, 124, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 169, 214, 194, 255, 255, 255, 255, 255, 255, 255, 255, 255, 180, 220, 202, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 133, 199, 169, 255, 255, 255, 255, 255, 255, 255, 255, 255, 242, 248, 245, 255, 5, 141, 82, 255, 24, 150, 95, 255, 252, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 70, 170, 126, 255, 0, 140, 79, 255, 7, 142, 83, 255, 164, 212, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 162, 211, 189, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 221, 209, 2, 15, 145, 88, 225, 0, 140, 79, 255, 0, 140, 79, 255, 9, 143, 84, 249, 26, 150, 95, 218, 26, 150, 95, 218, 20, 148, 91, 200, 27, 150, 95, 162, 57, 161, 113, 84, 117, 174, 140, 2, 0, 0, 0, 0, 0, 0, 0, 0, 49, 157, 108, 87, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 38, 154, 102, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 151, 97, 116, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 44, 155, 105, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 179, 144, 18, 8, 143, 83, 253, 0, 140, 79, 255, 0, 140, 79, 255, 20, 147, 91, 211, 61, 166, 119, 118, 49, 159, 110, 122, 14, 145, 87, 227, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 28, 148, 93, 49, 0, 0, 0, 0, 131, 181, 151, 15, 9, 143, 84, 255, 0, 140, 79, 255, 0, 140, 79, 255, 21, 147, 91, 226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 155, 103, 130, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 46, 157, 106, 112, 0, 0, 0, 0, 0, 0, 0, 0, 22, 148, 92, 204, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 83, 250, 135, 191, 162, 17, 0, 0, 0, 0, 147, 189, 163, 0, 16, 145, 88, 227, 0, 140, 79, 255, 0, 140, 79, 255, 17, 146, 89, 169, 0, 0, 0, 0, 0, 0, 0, 0, 18, 146, 90, 210, 0, 140, 79, 255, 0, 140, 79, 255, 8, 143, 83, 245, 61, 165, 119, 118, 56, 162, 115, 118, 18, 146, 90, 192, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 46, 158, 108, 130, 0, 0, 0, 0, 0, 0, 0, 0, 79, 170, 128, 47, 8, 143, 83, 249, 0, 140, 79, 255, 0, 140, 79, 255, 27, 151, 96, 222, 42, 158, 107, 171, 25, 150, 95, 198, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 115, 186, 153, 46, 0, 0, 0, 0, 163, 206, 184, 8, 81, 170, 129, 71, 81, 170, 129, 71, 81, 170, 129, 71, 98, 177, 140, 40, 179, 208, 190, 6, 62, 162, 115, 55, 23, 149, 93, 194, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 39, 154, 101, 102, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 82, 255, 236, 246, 241, 255, 255, 255, 255, 255, 255, 255, 255, 255, 135, 198, 169, 255, 41, 156, 105, 255, 42, 157, 106, 255, 75, 172, 129, 255, 229, 242, 236, 255, 255, 255, 255, 255, 255, 255, 255, 255, 217, 237, 227, 255, 0, 140, 79, 255, 97, 182, 144, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 249, 247, 255, 10, 144, 85, 255, 0, 140, 79, 255, 0, 140, 79, 255, 111, 190, 155, 255, 255, 255, 255, 255, 255, 255, 255, 255, 173, 217, 197, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 167, 123, 45, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 25, 149, 94, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 149, 94, 160, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 52, 160, 112, 160, 57, 164, 117, 126, 57, 164, 117, 126, 57, 164, 117, 126, 57, 164, 117, 126, 67, 168, 123, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 146, 89, 188, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 82, 251, 118, 184, 150, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 158, 109, 91, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 39, 155, 103, 123, 0, 0, 0, 0, 0, 0, 0, 0, 32, 152, 98, 162, 0, 140, 79, 255, 0, 140, 79, 255, 4, 141, 81, 253, 114, 181, 147, 27, 0, 0, 0, 0, 185, 211, 194, 8, 14, 145, 87, 246, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 33, 151, 98, 120, 48, 156, 106, 65, 34, 152, 99, 148, 3, 141, 81, 255, 0, 140, 79, 255, 0, 140, 79, 255, 23, 148, 93, 194, 153, 197, 171, 4, 0, 0, 0, 0, 114, 181, 147, 24, 7, 142, 83, 253, 0, 140, 79, 255, 0, 140, 79, 255, 20, 148, 91, 234, 57, 164, 117, 126, 55, 163, 115, 126, 23, 148, 92, 171, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 48, 158, 108, 100, 0, 0, 0, 0, 106, 178, 141, 30, 3, 141, 81, 253, 0, 140, 79, 255, 0, 140, 79, 255, 22, 148, 92, 184, 0, 0, 0, 0, 0, 0, 0, 0, 32, 152, 99, 89, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 46, 157, 106, 93, 0, 0, 0, 0, 211, 228, 218, 4, 19, 146, 89, 197, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 48, 154, 104, 53, 0, 0, 0, 0, 107, 176, 140, 44, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 21, 148, 92, 207, 100, 175, 137, 36, 96, 175, 136, 41, 23, 148, 93, 183, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 83, 243, 93, 173, 134, 22, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 61, 166, 120, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 111, 188, 153, 255, 0, 140, 79, 255, 170, 215, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 182, 220, 203, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 105, 186, 151, 255, 255, 255, 255, 255, 255, 255, 255, 255, 180, 221, 203, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 151, 97, 117, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 43, 155, 105, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 194, 168, 2, 16, 146, 88, 231, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 28, 150, 96, 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 180, 145, 13, 9, 143, 84, 249, 0, 140, 79, 255, 0, 140, 79, 255, 21, 148, 92, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 150, 95, 164, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 81, 169, 127, 49, 0, 0, 0, 0, 0, 0, 0, 0, 20, 147, 91, 217, 0, 140, 79, 255, 0, 140, 79, 255, 20, 147, 91, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 150, 96, 172, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 20, 147, 91, 203, 85, 168, 128, 18, 0, 0, 0, 0, 0, 0, 0, 0, 49, 158, 109, 96, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 28, 150, 95, 198, 107, 173, 136, 3, 0, 0, 0, 0, 38, 153, 101, 100, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 39, 154, 102, 112, 0, 0, 0, 0, 0, 0, 0, 0, 25, 149, 94, 149, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 82, 254, 115, 183, 150, 26, 0, 0, 0, 0, 46, 157, 107, 113, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 80, 253, 0, 140, 79, 207, 0, 140, 79, 207, 0, 140, 79, 207, 0, 140, 79, 223, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 70, 167, 123, 85, 0, 0, 0, 0, 156, 202, 179, 17, 13, 145, 87, 246, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 80, 255, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 81, 255, 53, 160, 111, 108, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 135, 200, 171, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 235, 245, 240, 255, 114, 189, 155, 255, 1, 140, 80, 255, 6, 142, 83, 255, 238, 246, 242, 255, 255, 255, 255, 255, 255, 255, 255, 255, 110, 188, 153, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 99, 183, 145, 255, 255, 255, 255, 255, 255, 255, 255, 255, 196, 226, 212, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 146, 90, 190, 0, 140, 79, 255, 0, 140, 79, 255, 5, 141, 81, 251, 116, 183, 149, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 169, 127, 50, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 49, 158, 108, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 157, 108, 81, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 33, 152, 99, 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 218, 204, 5, 15, 145, 88, 232, 0, 140, 79, 255, 0, 140, 79, 255, 19, 147, 91, 235, 0, 0, 0, 0, 0, 0, 0, 0, 159, 197, 174, 17, 5, 141, 82, 255, 0, 140, 79, 255, 0, 140, 79, 255, 24, 148, 93, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 160, 114, 22, 16, 145, 88, 206, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 10, 143, 85, 247, 38, 154, 102, 140, 102, 173, 136, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 149, 93, 165, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 14, 145, 87, 242, 36, 153, 101, 146, 99, 173, 134, 11, 0, 0, 0, 0, 0, 0, 0, 0, 22, 148, 92, 173, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 81, 255, 98, 177, 139, 39, 0, 0, 0, 0, 0, 0, 0, 0, 19, 147, 91, 209, 0, 140, 79, 255, 0, 140, 79, 255, 19, 147, 90, 226, 227, 237, 231, 4, 75, 167, 123, 31, 8, 143, 83, 241, 0, 140, 79, 255, 0, 140, 79, 255, 27, 149, 95, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 79, 83, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 35, 153, 100, 96, 0, 0, 0, 0, 0, 0, 0, 0, 52, 160, 111, 101, 5, 142, 82, 249, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 17, 146, 89, 231, 47, 156, 106, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 41, 158, 106, 255, 59, 165, 119, 255, 59, 165, 119, 255, 59, 165, 119, 255, 59, 165, 119, 255, 59, 165, 119, 255, 59, 165, 119, 255, 55, 163, 116, 255, 36, 155, 102, 255, 4, 141, 81, 255, 0, 140, 79, 255, 0, 140, 79, 255, 8, 143, 84, 255, 59, 165, 119, 255, 59, 165, 119, 255, 59, 165, 119, 255, 15, 146, 89, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 32, 153, 99, 255, 86, 177, 137, 255, 86, 177, 137, 255, 68, 169, 124, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 173, 132, 87, 75, 171, 128, 97, 75, 171, 128, 97, 86, 175, 135, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 189, 156, 40, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 124, 190, 157, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 178, 139, 47, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 81, 170, 127, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 179, 143, 6, 77, 172, 129, 97, 75, 171, 128, 97, 75, 171, 128, 97, 80, 172, 130, 66, 0, 0, 0, 0, 0, 0, 0, 0, 99, 177, 138, 12, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 88, 176, 136, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 207, 187, 7, 57, 161, 113, 87, 29, 151, 97, 143, 35, 153, 101, 163, 27, 150, 95, 145, 42, 155, 104, 96, 124, 186, 154, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 177, 138, 81, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 49, 159, 110, 78, 86, 171, 130, 51, 202, 222, 210, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 178, 139, 85, 75, 171, 128, 97, 75, 171, 128, 97, 83, 174, 133, 91, 227, 237, 231, 1, 0, 0, 0, 0, 0, 0, 0, 0, 88, 177, 137, 87, 75, 171, 128, 97, 75, 171, 128, 97, 80, 173, 131, 96, 0, 0, 0, 0, 101, 182, 145, 47, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 80, 169, 126, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 171, 128, 32, 75, 171, 128, 97, 75, 171, 128, 97, 75, 171, 128, 97, 102, 183, 146, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 160, 113, 32, 31, 151, 97, 121, 38, 154, 103, 163, 38, 155, 103, 163, 26, 149, 94, 127, 55, 159, 110, 72, 148, 191, 164, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(158, 32, imgdata); + return image; +} + diff --git a/iup/srcimglib/iup_imglib_icons8.h b/iup/srcimglib/iup_imglib_icons8.h new file mode 100755 index 0000000..b4e7b15 --- /dev/null +++ b/iup/srcimglib/iup_imglib_icons8.h @@ -0,0 +1,1788 @@ +static Ihandle* load_image_Petrobras8(void) +{ + unsigned char imgdata[] = { + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 61, 60, 61, 60, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 60, 61, 60, 61, 60, 61, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 61, 61, 61, 61, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 61, 61, 61, 61, 61, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 61, 60, 61, 60, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 60, 61, 60, 61, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 61, 61, 61, 61, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 60, 61, 61, 61, 61, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 61, 60, 61, 60, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 60, 61, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 61, 60, 61, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 89, 89, 89, 89, 93, 102, 121, 123, 121, 123, 117, 95, 93, 89, 89, 89, 89, 89, 116, 122, 122, 123, 122, 116, 93, 89, 89, 89, 89, 89, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 93, 76, 87, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 108, 84, 79, 92, 255, 255, 255, 255, + 124, 5, 2, 5, 5, 2, 50, 123, 123, 122, 123, 122, 122, 89, 52, 2, 5, 1, 11, 110, 121, 123, 121, 121, 121, 115, 74, 25, 5, 2, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 78, 20, 19, 22, 19, 21, 18, 31, 53, 105, 255, 255, 255, 25, 20, 23, 18, 23, 20, 19, 20, 23, 94, 255, 64, 18, 23, 18, 23, 18, 21, 18, 23, 20, 56, 255, 111, 22, 19, 20, 19, 20, 19, 23, 40, 65, 255, 255, 255, 255, 255, 97, 52, 20, 4, 2, 5, 18, 68, 255, 255, 255, 255, 88, 23, 21, 18, 22, 18, 20, 24, 46, 89, 255, 255, 255, 71, 19, 20, 19, 20, 19, 20, 26, 49, 87, 255, 255, 255, 255, 255, 255, 66, 18, 22, 19, 64, 255, 255, 255, 255, 255, 255, 72, 36, 5, 5, 2, 5, 29, 96, 255, 255, + 124, 5, 4, 2, 4, 5, 66, 122, 121, 120, 122, 118, 122, 122, 123, 48, 5, 4, 42, 123, 121, 118, 119, 122, 122, 122, 118, 75, 4, 4, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 54, 5, 2, 4, 1, 4, 5, 5, 5, 32, 255, 255, 81, 5, 5, 2, 4, 2, 4, 5, 4, 25, 255, 255, 27, 2, 4, 2, 5, 2, 4, 2, 4, 5, 68, 255, 66, 5, 5, 5, 4, 5, 5, 1, 5, 5, 66, 255, 255, 255, 79, 17, 5, 5, 4, 5, 4, 5, 5, 68, 255, 255, 255, 56, 4, 5, 2, 5, 5, 5, 5, 5, 17, 113, 255, 255, 38, 5, 5, 4, 5, 4, 5, 5, 5, 18, 109, 255, 255, 255, 255, 93, 10, 5, 2, 5, 53, 255, 255, 255, 255, 255, 55, 5, 4, 2, 4, 5, 5, 2, 29, 255, 255, + 124, 5, 5, 5, 5, 2, 102, 123, 123, 45, 21, 21, 64, 123, 121, 66, 5, 2, 64, 122, 123, 69, 23, 20, 36, 98, 122, 108, 2, 5, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 28, 5, 4, 24, 53, 42, 2, 5, 4, 2, 115, 255, 57, 5, 1, 5, 44, 53, 52, 53, 52, 81, 255, 94, 4, 5, 5, 5, 4, 5, 5, 5, 5, 5, 99, 255, 53, 5, 4, 8, 51, 53, 25, 5, 5, 1, 56, 255, 255, 78, 5, 2, 5, 25, 53, 41, 4, 2, 4, 27, 255, 255, 255, 36, 5, 5, 17, 52, 48, 18, 2, 5, 5, 255, 255, 108, 10, 4, 2, 25, 51, 50, 8, 5, 1, 5, 97, 255, 255, 255, 255, 32, 5, 2, 5, 5, 45, 255, 255, 255, 255, 84, 5, 1, 5, 53, 66, 30, 5, 5, 5, 255, 255, + 124, 4, 5, 1, 5, 38, 118, 118, 110, 10, 4, 2, 49, 118, 122, 56, 5, 4, 93, 123, 122, 45, 1, 5, 2, 88, 118, 89, 5, 2, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 89, 4, 2, 5, 57, 255, 255, 50, 2, 5, 13, 255, 255, 36, 5, 5, 22, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 83, 2, 5, 2, 55, 255, 255, 255, 255, 255, 15, 5, 5, 38, 255, 255, 80, 1, 5, 5, 78, 255, 98, 17, 5, 4, 30, 113, 255, 255, 27, 5, 5, 4, 255, 255, 102, 5, 5, 5, 54, 255, 255, 44, 4, 5, 42, 255, 255, 71, 5, 2, 5, 70, 255, 255, 53, 5, 5, 25, 255, 255, 255, 255, 66, 2, 1, 7, 5, 5, 39, 255, 255, 255, 255, 52, 5, 5, 5, 74, 255, 94, 72, 72, 72, 255, 255, + 124, 5, 2, 5, 5, 58, 122, 122, 105, 75, 77, 82, 111, 122, 96, 14, 5, 29, 117, 122, 123, 57, 52, 53, 77, 122, 122, 47, 4, 4, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 63, 2, 5, 4, 79, 255, 101, 23, 5, 5, 48, 255, 103, 4, 5, 2, 18, 45, 45, 45, 45, 107, 255, 255, 255, 255, 255, 63, 5, 4, 5, 79, 255, 255, 255, 255, 89, 2, 5, 4, 45, 93, 83, 34, 5, 5, 31, 255, 255, 56, 5, 5, 5, 89, 255, 255, 255, 42, 5, 4, 8, 255, 255, 70, 5, 2, 5, 31, 59, 50, 1, 4, 29, 101, 255, 255, 53, 5, 4, 5, 72, 91, 74, 24, 5, 5, 71, 255, 255, 255, 101, 14, 5, 11, 48, 2, 5, 21, 255, 255, 255, 255, 48, 5, 5, 2, 5, 16, 45, 76, 255, 255, 255, 255, + 124, 5, 5, 4, 5, 86, 118, 121, 122, 122, 122, 123, 118, 117, 39, 5, 5, 54, 122, 123, 122, 121, 122, 123, 121, 110, 48, 5, 2, 5, 2, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 45, 5, 5, 5, 18, 19, 6, 2, 5, 11, 93, 255, 68, 1, 5, 5, 4, 5, 1, 5, 20, 255, 255, 255, 255, 255, 255, 43, 5, 5, 16, 255, 255, 255, 255, 255, 59, 4, 5, 5, 5, 1, 5, 4, 11, 50, 101, 255, 255, 15, 1, 5, 36, 255, 255, 255, 255, 18, 2, 5, 37, 255, 255, 49, 4, 5, 4, 2, 4, 5, 2, 5, 68, 255, 255, 255, 21, 5, 2, 5, 4, 5, 5, 5, 19, 68, 255, 255, 255, 255, 36, 5, 5, 57, 72, 5, 1, 17, 255, 255, 255, 255, 79, 4, 5, 4, 5, 4, 5, 5, 36, 255, 255, 255, + 124, 5, 1, 5, 19, 116, 122, 119, 54, 52, 50, 85, 122, 122, 86, 4, 5, 76, 121, 118, 101, 88, 95, 122, 123, 96, 25, 5, 4, 5, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 111, 8, 4, 5, 4, 5, 5, 4, 5, 18, 87, 255, 255, 52, 5, 5, 2, 18, 23, 23, 20, 59, 255, 255, 255, 255, 255, 112, 8, 4, 5, 45, 255, 255, 255, 255, 255, 39, 2, 5, 1, 5, 5, 5, 2, 1, 52, 255, 255, 93, 5, 5, 5, 54, 255, 255, 255, 79, 5, 5, 4, 63, 255, 255, 18, 5, 2, 28, 56, 53, 25, 5, 4, 12, 255, 255, 88, 5, 4, 5, 5, 2, 5, 1, 5, 17, 85, 255, 255, 255, 74, 5, 5, 21, 255, 72, 5, 4, 2, 255, 255, 255, 255, 255, 89, 49, 19, 5, 5, 2, 4, 2, 84, 255, 255, + 124, 5, 5, 5, 52, 121, 123, 87, 1, 5, 5, 50, 121, 122, 118, 5, 8, 111, 122, 121, 33, 2, 5, 64, 118, 121, 56, 5, 5, 2, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 5, 5, 2, 32, 48, 45, 53, 64, 105, 255, 255, 255, 17, 2, 5, 39, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 2, 5, 5, 66, 255, 255, 255, 255, 111, 6, 4, 4, 35, 66, 63, 24, 5, 5, 5, 255, 255, 76, 5, 1, 5, 56, 255, 255, 111, 31, 5, 5, 24, 111, 255, 83, 5, 2, 4, 58, 255, 255, 62, 5, 5, 9, 115, 255, 63, 5, 1, 5, 48, 65, 45, 5, 5, 5, 53, 255, 255, 102, 21, 5, 2, 24, 52, 32, 2, 1, 5, 102, 255, 111, 78, 76, 76, 100, 255, 86, 29, 5, 2, 5, 104, 255, 255, + 124, 5, 1, 5, 67, 123, 121, 84, 45, 45, 49, 93, 118, 119, 93, 1, 46, 122, 117, 97, 5, 4, 5, 54, 122, 122, 58, 4, 2, 4, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 55, 5, 4, 5, 96, 255, 255, 255, 255, 255, 255, 255, 85, 4, 2, 4, 31, 66, 64, 66, 64, 66, 255, 255, 255, 255, 255, 55, 4, 5, 2, 96, 255, 255, 255, 255, 71, 4, 2, 6, 69, 255, 255, 48, 5, 5, 23, 255, 255, 95, 2, 5, 5, 21, 66, 70, 32, 2, 5, 4, 80, 255, 255, 57, 5, 5, 5, 41, 66, 56, 21, 5, 4, 41, 255, 255, 42, 5, 5, 18, 255, 255, 101, 2, 4, 4, 58, 255, 255, 43, 5, 5, 5, 5, 5, 5, 5, 5, 5, 89, 255, 88, 3, 5, 5, 38, 88, 82, 29, 5, 5, 39, 255, 255, 255, + 124, 5, 5, 8, 108, 122, 123, 123, 123, 123, 123, 122, 122, 117, 44, 5, 63, 123, 121, 64, 5, 2, 5, 54, 117, 122, 64, 5, 5, 5, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 27, 5, 5, 27, 255, 255, 255, 255, 255, 255, 255, 255, 56, 5, 4, 5, 1, 5, 4, 2, 4, 35, 255, 255, 255, 255, 255, 28, 2, 5, 36, 255, 255, 255, 255, 255, 53, 2, 5, 4, 103, 255, 255, 17, 1, 5, 52, 255, 255, 255, 29, 5, 4, 2, 5, 2, 5, 5, 14, 71, 255, 255, 255, 37, 4, 1, 5, 1, 5, 2, 4, 5, 18, 93, 255, 108, 10, 2, 5, 45, 255, 255, 71, 5, 2, 5, 84, 255, 79, 5, 5, 4, 42, 45, 48, 29, 5, 1, 5, 76, 255, 108, 10, 4, 5, 1, 5, 4, 5, 4, 18, 93, 255, 255, 255, + 124, 5, 4, 36, 122, 121, 122, 122, 122, 121, 122, 104, 78, 36, 4, 1, 97, 122, 122, 50, 5, 4, 5, 49, 122, 123, 66, 5, 1, 5, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 94, 1, 4, 5, 56, 255, 255, 255, 255, 255, 255, 255, 255, 36, 5, 5, 5, 5, 5, 5, 5, 5, 56, 255, 255, 255, 255, 90, 5, 5, 4, 57, 255, 255, 255, 255, 255, 23, 5, 4, 36, 255, 255, 93, 4, 5, 6, 63, 255, 255, 255, 96, 25, 5, 5, 5, 5, 5, 34, 88, 255, 255, 255, 110, 1, 5, 5, 5, 5, 5, 4, 11, 49, 96, 255, 255, 74, 5, 5, 5, 66, 255, 255, 55, 5, 4, 2, 107, 112, 25, 4, 5, 42, 255, 255, 255, 73, 5, 5, 5, 66, 255, 255, 84, 11, 4, 5, 5, 2, 5, 39, 97, 255, 255, 255, 255, + 124, 5, 2, 5, 5, 5, 5, 2, 5, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 11, 19, 23, 14, 5, 5, 4, 2, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 106, 76, 77, 78, 101, 255, 255, 255, 255, 255, 255, 255, 255, 78, 77, 78, 77, 76, 79, 76, 77, 78, 101, 255, 255, 255, 255, 105, 78, 77, 76, 102, 255, 255, 255, 255, 255, 78, 77, 77, 94, 255, 255, 110, 77, 78, 77, 96, 255, 255, 255, 255, 255, 78, 63, 59, 66, 88, 255, 255, 255, 255, 255, 110, 76, 77, 78, 77, 76, 84, 93, 255, 255, 255, 255, 255, 96, 76, 77, 76, 110, 255, 255, 94, 77, 77, 78, 114, 106, 76, 79, 76, 105, 255, 255, 255, 106, 76, 77, 78, 101, 255, 255, 255, 101, 66, 62, 59, 70, 101, 255, 255, 255, 255, 255, 255, + 124, 5, 4, 5, 1, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 4, 5, 4, 1, 5, 5, 5, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 5, 2, 5, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 1, 5, 1, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 4, 2, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 5, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(157, 32, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "4 130 92"); + IupSetAttribute(image, "2", "4 134 92"); + IupSetAttribute(image, "3", "4 138 92"); + IupSetAttribute(image, "4", "4 130 100"); + IupSetAttribute(image, "5", "4 134 100"); + IupSetAttribute(image, "6", "4 138 100"); + IupSetAttribute(image, "7", "12 134 108"); + IupSetAttribute(image, "8", "12 138 100"); + IupSetAttribute(image, "9", "12 142 100"); + IupSetAttribute(image, "10", "12 138 108"); + IupSetAttribute(image, "11", "12 142 108"); + IupSetAttribute(image, "12", "20 138 100"); + IupSetAttribute(image, "13", "20 138 108"); + IupSetAttribute(image, "14", "20 142 108"); + IupSetAttribute(image, "15", "28 142 108"); + IupSetAttribute(image, "16", "28 146 108"); + IupSetAttribute(image, "17", "20 146 116"); + IupSetAttribute(image, "18", "28 146 116"); + IupSetAttribute(image, "19", "28 150 116"); + IupSetAttribute(image, "20", "36 146 116"); + IupSetAttribute(image, "21", "36 150 116"); + IupSetAttribute(image, "22", "36 146 124"); + IupSetAttribute(image, "23", "36 150 124"); + IupSetAttribute(image, "24", "36 154 124"); + IupSetAttribute(image, "25", "44 154 124"); + IupSetAttribute(image, "26", "44 158 124"); + IupSetAttribute(image, "27", "52 154 124"); + IupSetAttribute(image, "28", "44 158 132"); + IupSetAttribute(image, "29", "52 158 132"); + IupSetAttribute(image, "30", "60 158 132"); + IupSetAttribute(image, "31", "60 162 132"); + IupSetAttribute(image, "32", "60 162 140"); + IupSetAttribute(image, "33", "60 166 140"); + IupSetAttribute(image, "34", "68 166 132"); + IupSetAttribute(image, "35", "68 162 140"); + IupSetAttribute(image, "36", "68 166 140"); + IupSetAttribute(image, "37", "68 170 140"); + IupSetAttribute(image, "38", "76 166 140"); + IupSetAttribute(image, "39", "76 170 148"); + IupSetAttribute(image, "40", "76 174 148"); + IupSetAttribute(image, "41", "84 170 148"); + IupSetAttribute(image, "42", "84 174 148"); + IupSetAttribute(image, "43", "92 174 148"); + IupSetAttribute(image, "44", "84 178 156"); + IupSetAttribute(image, "45", "92 178 156"); + IupSetAttribute(image, "46", "92 182 156"); + IupSetAttribute(image, "47", "100 174 156"); + IupSetAttribute(image, "48", "100 178 156"); + IupSetAttribute(image, "49", "100 182 156"); + IupSetAttribute(image, "50", "100 182 164"); + IupSetAttribute(image, "51", "100 186 164"); + IupSetAttribute(image, "52", "108 182 164"); + IupSetAttribute(image, "53", "108 186 164"); + IupSetAttribute(image, "54", "116 186 164"); + IupSetAttribute(image, "55", "116 186 172"); + IupSetAttribute(image, "56", "116 190 172"); + IupSetAttribute(image, "57", "124 190 172"); + IupSetAttribute(image, "58", "124 194 172"); + IupSetAttribute(image, "59", "124 194 180"); + IupSetAttribute(image, "60", "244 190 4"); + IupSetAttribute(image, "61", "244 194 4"); + IupSetAttribute(image, "62", "132 194 172"); + IupSetAttribute(image, "63", "132 194 180"); + IupSetAttribute(image, "64", "132 198 180"); + IupSetAttribute(image, "65", "140 194 180"); + IupSetAttribute(image, "66", "140 198 180"); + IupSetAttribute(image, "67", "140 202 180"); + IupSetAttribute(image, "68", "140 202 188"); + IupSetAttribute(image, "69", "148 198 180"); + IupSetAttribute(image, "70", "148 198 188"); + IupSetAttribute(image, "71", "148 202 188"); + IupSetAttribute(image, "72", "148 206 188"); + IupSetAttribute(image, "73", "156 198 188"); + IupSetAttribute(image, "74", "156 202 188"); + IupSetAttribute(image, "75", "156 206 188"); + IupSetAttribute(image, "76", "156 206 196"); + IupSetAttribute(image, "77", "156 210 196"); + IupSetAttribute(image, "78", "164 206 196"); + IupSetAttribute(image, "79", "164 210 196"); + IupSetAttribute(image, "80", "164 210 204"); + IupSetAttribute(image, "81", "164 214 204"); + IupSetAttribute(image, "82", "172 210 196"); + IupSetAttribute(image, "83", "172 210 204"); + IupSetAttribute(image, "84", "172 214 204"); + IupSetAttribute(image, "85", "180 214 204"); + IupSetAttribute(image, "86", "180 218 204"); + IupSetAttribute(image, "87", "180 218 212"); + IupSetAttribute(image, "88", "188 218 212"); + IupSetAttribute(image, "89", "188 222 212"); + IupSetAttribute(image, "90", "188 222 220"); + IupSetAttribute(image, "91", "188 226 212"); + IupSetAttribute(image, "92", "188 226 220"); + IupSetAttribute(image, "93", "196 222 212"); + IupSetAttribute(image, "94", "196 226 220"); + IupSetAttribute(image, "95", "196 230 220"); + IupSetAttribute(image, "96", "204 226 220"); + IupSetAttribute(image, "97", "204 230 220"); + IupSetAttribute(image, "98", "212 230 220"); + IupSetAttribute(image, "99", "204 230 228"); + IupSetAttribute(image, "100", "204 234 228"); + IupSetAttribute(image, "101", "212 230 228"); + IupSetAttribute(image, "102", "212 234 228"); + IupSetAttribute(image, "103", "212 234 236"); + IupSetAttribute(image, "104", "212 238 236"); + IupSetAttribute(image, "105", "220 230 228"); + IupSetAttribute(image, "106", "220 234 228"); + IupSetAttribute(image, "107", "220 234 236"); + IupSetAttribute(image, "108", "220 238 236"); + IupSetAttribute(image, "109", "220 242 236"); + IupSetAttribute(image, "110", "228 234 236"); + IupSetAttribute(image, "111", "228 238 236"); + IupSetAttribute(image, "112", "228 242 236"); + IupSetAttribute(image, "113", "236 242 236"); + IupSetAttribute(image, "114", "228 242 244"); + IupSetAttribute(image, "115", "228 246 244"); + IupSetAttribute(image, "116", "244 246 244"); + IupSetAttribute(image, "117", "244 250 244"); + IupSetAttribute(image, "118", "244 250 252"); + IupSetAttribute(image, "119", "244 254 252"); + IupSetAttribute(image, "120", "252 246 244"); + IupSetAttribute(image, "121", "252 250 244"); + IupSetAttribute(image, "122", "252 250 252"); + IupSetAttribute(image, "123", "252 254 252"); + IupSetAttribute(image, "124", "255 255 255"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_Lua8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 23, 19, 19, 23, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 19, 1, 1, 1, 1, 20, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 26, 1, 1, 1, 1, 1, 1, 23, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 19, 1, 1, 1, 1, 1, 1, 19, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 25, 21, 17, 17, 17, 17, 20, 23, 255, 255, 255, 255, 255, 19, 1, 1, 1, 1, 1, 1, 19, 255, + 255, 255, 255, 255, 255, 255, 255, 23, 18, 6, 1, 1, 1, 1, 1, 1, 1, 2, 1, 16, 25, 255, 255, 24, 1, 1, 1, 1, 1, 1, 23, 255, + 255, 255, 255, 255, 255, 255, 23, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 23, 255, 14, 1, 1, 1, 1, 14, 255, 255, + 255, 255, 255, 255, 255, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 11, 5, 1, 9, 23, 255, 23, 15, 17, 24, 255, 255, 255, + 255, 255, 255, 255, 23, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 17, 28, 28, 28, 18, 1, 9, 23, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 26, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 28, 28, 28, 28, 28, 19, 1, 15, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 28, 28, 28, 28, 28, 28, 9, 1, 23, 255, 255, 255, 255, 255, 255, + 255, 255, 24, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 28, 28, 28, 28, 28, 28, 28, 17, 1, 15, 255, 255, 255, 255, 255, 255, + 255, 255, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 28, 28, 28, 28, 28, 28, 28, 11, 1, 1, 23, 255, 255, 255, 255, 255, + 255, 255, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 28, 28, 28, 28, 28, 23, 1, 1, 1, 22, 255, 255, 255, 255, 255, + 255, 24, 1, 1, 1, 7, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 21, 28, 28, 28, 22, 4, 1, 1, 1, 18, 255, 255, 255, 255, 255, + 255, 23, 1, 1, 1, 16, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 9, 4, 1, 1, 1, 1, 1, 14, 255, 255, 255, 255, 255, + 255, 17, 1, 1, 1, 16, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 255, 255, 255, 255, 255, + 255, 17, 1, 1, 1, 16, 27, 1, 1, 1, 1, 11, 21, 1, 1, 8, 17, 1, 13, 27, 27, 27, 11, 1, 1, 1, 11, 255, 255, 255, 255, 255, + 255, 17, 1, 1, 1, 16, 27, 1, 1, 1, 1, 16, 27, 1, 1, 11, 27, 1, 27, 8, 1, 14, 27, 1, 1, 1, 16, 255, 255, 255, 255, 255, + 255, 24, 1, 1, 1, 16, 27, 1, 1, 1, 1, 16, 27, 1, 1, 11, 27, 1, 3, 1, 6, 19, 27, 1, 1, 1, 19, 255, 255, 255, 255, 255, + 255, 255, 8, 1, 1, 16, 27, 1, 1, 1, 1, 16, 27, 1, 1, 11, 27, 1, 20, 27, 27, 27, 27, 1, 1, 1, 23, 255, 255, 255, 255, 255, + 255, 255, 19, 1, 1, 16, 27, 1, 1, 1, 1, 16, 27, 1, 1, 15, 27, 4, 27, 1, 1, 15, 27, 1, 1, 1, 23, 255, 255, 255, 255, 255, + 255, 255, 24, 1, 1, 16, 27, 19, 19, 19, 13, 10, 27, 15, 14, 21, 27, 3, 27, 13, 13, 21, 27, 8, 1, 14, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 10, 1, 16, 27, 27, 27, 27, 11, 1, 11, 27, 27, 27, 11, 1, 12, 27, 27, 27, 21, 27, 5, 23, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 23, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 23, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 23, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 25, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 23, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 24, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 23, 17, 5, 1, 1, 1, 1, 1, 1, 1, 13, 21, 23, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 23, 20, 17, 17, 17, 20, 22, 23, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(32, 32, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 123"); + IupSetAttribute(image, "2", "0 0 132"); + IupSetAttribute(image, "3", "8 8 132"); + IupSetAttribute(image, "4", "16 16 132"); + IupSetAttribute(image, "5", "24 24 140"); + IupSetAttribute(image, "6", "33 33 140"); + IupSetAttribute(image, "7", "33 33 148"); + IupSetAttribute(image, "8", "41 41 148"); + IupSetAttribute(image, "9", "49 49 148"); + IupSetAttribute(image, "10", "57 57 156"); + IupSetAttribute(image, "11", "66 66 156"); + IupSetAttribute(image, "12", "66 66 165"); + IupSetAttribute(image, "13", "74 74 165"); + IupSetAttribute(image, "14", "82 82 165"); + IupSetAttribute(image, "15", "90 90 173"); + IupSetAttribute(image, "16", "99 99 173"); + IupSetAttribute(image, "17", "107 107 181"); + IupSetAttribute(image, "18", "115 115 181"); + IupSetAttribute(image, "19", "123 123 189"); + IupSetAttribute(image, "20", "132 132 189"); + IupSetAttribute(image, "21", "140 140 198"); + IupSetAttribute(image, "22", "148 148 198"); + IupSetAttribute(image, "23", "156 156 206"); + IupSetAttribute(image, "24", "165 165 206"); + IupSetAttribute(image, "25", "173 173 214"); + IupSetAttribute(image, "26", "189 189 222"); + IupSetAttribute(image, "27", "214 214 231"); + IupSetAttribute(image, "28", "255 255 255"); + IupSetAttribute(image, "29", "0 0 0"); + IupSetAttribute(image, "30", "0 0 0"); + IupSetAttribute(image, "31", "0 0 0"); + IupSetAttribute(image, "32", "0 0 0"); + IupSetAttribute(image, "33", "0 0 0"); + IupSetAttribute(image, "34", "0 0 0"); + IupSetAttribute(image, "35", "0 0 0"); + IupSetAttribute(image, "36", "0 0 0"); + IupSetAttribute(image, "37", "0 0 0"); + IupSetAttribute(image, "38", "0 0 0"); + IupSetAttribute(image, "39", "0 0 0"); + IupSetAttribute(image, "40", "0 0 0"); + IupSetAttribute(image, "41", "0 0 0"); + IupSetAttribute(image, "42", "0 0 0"); + IupSetAttribute(image, "43", "0 0 0"); + IupSetAttribute(image, "44", "0 0 0"); + IupSetAttribute(image, "45", "0 0 0"); + IupSetAttribute(image, "46", "0 0 0"); + IupSetAttribute(image, "47", "0 0 0"); + IupSetAttribute(image, "48", "0 0 0"); + IupSetAttribute(image, "49", "0 0 0"); + IupSetAttribute(image, "50", "0 0 0"); + IupSetAttribute(image, "51", "0 0 0"); + IupSetAttribute(image, "52", "0 0 0"); + IupSetAttribute(image, "53", "0 0 0"); + IupSetAttribute(image, "54", "0 0 0"); + IupSetAttribute(image, "55", "0 0 0"); + IupSetAttribute(image, "56", "0 0 0"); + IupSetAttribute(image, "57", "0 0 0"); + IupSetAttribute(image, "58", "0 0 0"); + IupSetAttribute(image, "59", "0 0 0"); + IupSetAttribute(image, "60", "0 0 0"); + IupSetAttribute(image, "61", "0 0 0"); + IupSetAttribute(image, "62", "0 0 0"); + IupSetAttribute(image, "63", "0 0 0"); + IupSetAttribute(image, "64", "0 0 0"); + IupSetAttribute(image, "65", "0 0 0"); + IupSetAttribute(image, "66", "0 0 0"); + IupSetAttribute(image, "67", "0 0 0"); + IupSetAttribute(image, "68", "0 0 0"); + IupSetAttribute(image, "69", "0 0 0"); + IupSetAttribute(image, "70", "0 0 0"); + IupSetAttribute(image, "71", "0 0 0"); + IupSetAttribute(image, "72", "0 0 0"); + IupSetAttribute(image, "73", "0 0 0"); + IupSetAttribute(image, "74", "0 0 0"); + IupSetAttribute(image, "75", "0 0 0"); + IupSetAttribute(image, "76", "0 0 0"); + IupSetAttribute(image, "77", "0 0 0"); + IupSetAttribute(image, "78", "0 0 0"); + IupSetAttribute(image, "79", "0 0 0"); + IupSetAttribute(image, "80", "0 0 0"); + IupSetAttribute(image, "81", "0 0 0"); + IupSetAttribute(image, "82", "0 0 0"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_TecgrafPUC_Rio8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 154, 150, 150, 150, 150, 155, 150, 150, 155, 150, 150, 155, 150, 150, 150, 152, 155, 150, 152, 155, 150, 160, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 189, 167, 191, 191, 171, 169, 171, 181, 168, 255, + 255, 39, 66, 67, 61, 67, 60, 67, 67, 61, 67, 66, 61, 71, 67, 71, 71, 71, 71, 71, 71, 71, 109, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 154, 81, 108, 104, 104, 104, 104, 104, 104, 101, 255, + 255, 39, 59, 60, 66, 59, 67, 60, 59, 67, 60, 67, 60, 67, 61, 66, 61, 66, 61, 66, 61, 70, 108, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 57, 98, 81, 98, 81, 103, 81, 103, 81, 79, 255, + 255, 38, 66, 59, 66, 59, 59, 66, 67, 59, 67, 60, 67, 59, 66, 60, 67, 61, 66, 61, 67, 61, 108, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 83, 61, 81, 103, 81, 98, 81, 96, 98, 96, 75, 255, + 255, 39, 59, 60, 66, 59, 66, 60, 59, 60, 66, 59, 61, 66, 61, 67, 60, 66, 67, 66, 60, 67, 106, 255, 255, 255, 255, 255, 255, 189, 162, 150, 160, 160, 169, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 156, 150, 152, 153, 160, 165, 168, 197, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 186, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 197, 167, 166, 165, 168, 168, 169, 181, 255, 255, 255, 255, 255, 255, 255, 255, 255, 64, 71, 96, 81, 98, 81, 98, 81, 29, 22, 34, 255, + 255, 28, 4, 3, 2, 3, 2, 3, 9, 66, 61, 59, 67, 60, 66, 72, 15, 3, 2, 3, 2, 3, 27, 255, 255, 190, 122, 112, 76, 72, 76, 78, 76, 78, 78, 98, 109, 153, 198, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 129, 102, 77, 76, 78, 77, 77, 77, 78, 96, 104, 137, 152, 194, 255, 255, 255, 255, 255, 255, 255, 255, 154, 107, 98, 81, 98, 98, 108, 143, 168, 97, 71, 105, 104, 104, 104, 108, 109, 184, 255, 86, 96, 104, 105, 105, 105, 106, 109, 150, 121, 106, 104, 182, 255, 255, 255, 255, 148, 139, 101, 103, 104, 104, 103, 103, 104, 105, 108, 108, 139, 153, 195, 255, 255, 255, 179, 168, 56, 71, 81, 98, 81, 103, 81, 108, 120, 146, 123, 255, + 255, 255, 255, 255, 255, 255, 255, 117, 1, 60, 66, 66, 60, 67, 61, 80, 155, 255, 255, 255, 255, 255, 255, 255, 175, 57, 71, 71, 67, 71, 67, 71, 71, 71, 71, 61, 71, 79, 151, 194, 255, 255, 255, 255, 255, 255, 255, 255, 100, 71, 71, 76, 75, 71, 76, 72, 76, 71, 76, 77, 77, 78, 151, 172, 255, 255, 255, 255, 255, 255, 115, 72, 77, 76, 78, 76, 78, 78, 76, 98, 105, 67, 76, 78, 78, 78, 76, 105, 182, 255, 65, 67, 78, 80, 78, 81, 80, 81, 101, 76, 78, 81, 156, 255, 255, 255, 112, 76, 81, 79, 81, 81, 78, 96, 81, 81, 96, 79, 81, 81, 96, 145, 192, 255, 255, 82, 104, 109, 81, 96, 81, 98, 81, 98, 109, 150, 146, 116, 255, + 255, 255, 255, 255, 255, 255, 255, 130, 1, 66, 61, 59, 67, 60, 66, 81, 193, 255, 255, 255, 255, 255, 255, 185, 51, 71, 60, 67, 71, 61, 71, 71, 61, 66, 71, 71, 71, 67, 71, 143, 198, 255, 255, 255, 255, 255, 255, 110, 60, 71, 76, 71, 76, 71, 77, 71, 72, 77, 71, 72, 76, 71, 76, 144, 194, 255, 255, 255, 255, 128, 56, 78, 76, 77, 72, 78, 76, 77, 76, 78, 72, 78, 78, 78, 76, 78, 80, 104, 184, 255, 64, 60, 80, 78, 78, 76, 78, 98, 124, 78, 81, 78, 143, 255, 255, 158, 58, 78, 80, 81, 78, 96, 81, 79, 96, 78, 80, 81, 96, 81, 96, 81, 143, 198, 255, 65, 71, 81, 98, 81, 98, 81, 98, 81, 98, 96, 81, 101, 255, + 255, 255, 255, 255, 255, 255, 255, 130, 2, 60, 66, 66, 59, 67, 60, 81, 184, 255, 255, 255, 255, 255, 189, 34, 61, 70, 67, 71, 60, 71, 67, 71, 67, 71, 67, 71, 71, 71, 71, 71, 124, 255, 255, 255, 255, 255, 91, 59, 71, 76, 71, 71, 71, 71, 71, 76, 71, 76, 72, 71, 77, 71, 77, 71, 119, 198, 255, 255, 158, 36, 77, 76, 76, 77, 76, 75, 77, 76, 78, 76, 77, 76, 78, 76, 78, 77, 76, 101, 182, 255, 65, 60, 78, 78, 80, 79, 80, 81, 79, 80, 78, 80, 106, 255, 255, 74, 76, 81, 79, 80, 81, 78, 80, 81, 80, 81, 96, 78, 81, 79, 81, 79, 96, 139, 255, 65, 72, 81, 81, 96, 81, 96, 81, 98, 81, 81, 98, 99, 255, + 255, 255, 255, 255, 255, 255, 255, 130, 2, 59, 59, 61, 60, 60, 66, 81, 191, 255, 255, 255, 255, 255, 45, 56, 60, 67, 71, 60, 71, 67, 60, 35, 25, 24, 36, 61, 71, 71, 67, 71, 71, 146, 255, 255, 255, 161, 35, 71, 71, 71, 71, 76, 71, 71, 49, 24, 23, 33, 67, 72, 76, 72, 76, 77, 71, 143, 255, 255, 44, 71, 76, 75, 77, 72, 77, 76, 76, 67, 71, 76, 78, 76, 77, 78, 76, 78, 78, 104, 182, 255, 64, 60, 80, 78, 76, 78, 78, 80, 76, 79, 80, 78, 98, 255, 255, 66, 78, 80, 78, 80, 78, 76, 54, 33, 27, 24, 33, 61, 96, 80, 81, 96, 81, 104, 255, 65, 71, 96, 81, 81, 98, 81, 96, 81, 98, 98, 81, 103, 255, + 255, 255, 255, 255, 255, 255, 255, 130, 2, 60, 66, 59, 67, 59, 60, 81, 184, 255, 255, 255, 255, 178, 26, 61, 67, 60, 71, 67, 70, 61, 41, 85, 162, 132, 25, 14, 60, 71, 71, 71, 67, 71, 153, 255, 255, 39, 61, 71, 72, 71, 76, 71, 71, 57, 126, 255, 255, 90, 17, 67, 71, 76, 71, 71, 71, 78, 146, 136, 29, 72, 77, 76, 76, 77, 76, 57, 34, 47, 37, 20, 36, 77, 76, 78, 76, 78, 77, 104, 181, 255, 65, 60, 78, 78, 80, 78, 76, 78, 78, 78, 78, 79, 81, 187, 183, 51, 36, 36, 35, 36, 35, 35, 40, 122, 181, 167, 86, 27, 80, 79, 81, 78, 81, 96, 167, 48, 23, 25, 78, 81, 81, 81, 81, 96, 81, 49, 27, 55, 255, + 255, 255, 255, 255, 255, 255, 255, 130, 1, 66, 60, 60, 59, 67, 66, 80, 193, 255, 255, 255, 255, 69, 36, 67, 70, 61, 70, 61, 71, 71, 81, 81, 78, 76, 71, 51, 59, 71, 61, 71, 71, 71, 139, 196, 255, 12, 71, 71, 71, 71, 71, 71, 71, 187, 255, 255, 255, 255, 125, 18, 31, 40, 62, 86, 89, 87, 91, 92, 51, 76, 72, 76, 75, 76, 78, 88, 255, 255, 255, 255, 31, 59, 76, 78, 78, 76, 78, 104, 184, 255, 65, 59, 80, 76, 78, 80, 78, 78, 76, 50, 25, 23, 35, 176, 255, 174, 87, 36, 49, 71, 81, 109, 109, 108, 104, 104, 98, 81, 79, 80, 96, 81, 81, 81, 166, 255, 255, 42, 71, 96, 81, 96, 79, 81, 103, 147, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 131, 1, 59, 59, 66, 61, 60, 59, 81, 184, 255, 255, 255, 255, 47, 52, 61, 66, 61, 67, 67, 60, 71, 61, 70, 61, 71, 66, 71, 71, 71, 67, 71, 71, 67, 104, 151, 178, 19, 71, 71, 71, 72, 71, 71, 116, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 114, 56, 72, 77, 76, 72, 77, 104, 255, 255, 255, 255, 255, 133, 35, 77, 76, 76, 78, 76, 104, 180, 255, 65, 59, 78, 78, 78, 76, 78, 78, 71, 114, 255, 255, 255, 255, 255, 129, 78, 81, 78, 81, 78, 81, 78, 78, 81, 79, 80, 81, 80, 79, 80, 81, 78, 96, 163, 255, 255, 47, 71, 81, 81, 81, 81, 96, 104, 156, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 130, 1, 66, 60, 66, 59, 66, 60, 80, 193, 255, 255, 255, 255, 47, 51, 67, 60, 67, 70, 60, 67, 71, 70, 67, 71, 61, 71, 61, 67, 60, 66, 60, 66, 60, 76, 141, 173, 22, 67, 71, 71, 71, 71, 71, 146, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 94, 49, 77, 76, 72, 77, 76, 106, 255, 255, 255, 255, 255, 88, 66, 76, 78, 77, 76, 77, 104, 181, 255, 65, 60, 78, 76, 77, 78, 78, 80, 147, 255, 255, 255, 255, 255, 134, 71, 81, 78, 80, 78, 81, 78, 81, 77, 67, 59, 54, 56, 78, 81, 81, 95, 81, 81, 166, 255, 255, 46, 71, 81, 81, 96, 81, 81, 103, 160, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 130, 2, 59, 59, 60, 61, 60, 66, 80, 182, 255, 255, 255, 255, 84, 33, 67, 61, 66, 61, 61, 66, 76, 74, 113, 93, 111, 111, 68, 62, 69, 88, 86, 86, 86, 82, 129, 185, 11, 71, 71, 71, 71, 71, 71, 143, 255, 255, 255, 255, 255, 255, 62, 71, 76, 98, 138, 152, 164, 195, 62, 25, 76, 76, 77, 71, 76, 77, 139, 171, 196, 168, 107, 71, 76, 75, 76, 77, 78, 77, 104, 179, 255, 65, 59, 78, 78, 76, 78, 76, 81, 155, 255, 255, 255, 255, 255, 55, 76, 79, 78, 78, 80, 78, 33, 39, 65, 92, 91, 47, 33, 81, 80, 79, 81, 80, 79, 166, 255, 255, 47, 71, 81, 95, 80, 79, 96, 103, 156, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 130, 1, 59, 66, 59, 66, 59, 60, 80, 196, 255, 255, 255, 255, 173, 18, 60, 67, 60, 67, 66, 67, 99, 181, 255, 255, 255, 183, 95, 67, 72, 99, 140, 150, 186, 199, 197, 255, 13, 71, 71, 71, 71, 71, 71, 102, 194, 255, 255, 255, 183, 63, 67, 71, 77, 76, 71, 72, 76, 141, 255, 19, 71, 73, 76, 77, 76, 71, 75, 78, 81, 80, 75, 76, 77, 76, 77, 72, 78, 76, 104, 181, 255, 65, 60, 76, 78, 77, 78, 78, 78, 159, 255, 255, 255, 255, 176, 29, 78, 80, 78, 80, 78, 81, 149, 255, 255, 255, 163, 97, 77, 81, 78, 81, 78, 81, 81, 166, 255, 255, 47, 71, 81, 81, 81, 96, 81, 98, 160, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 132, 1, 60, 59, 59, 59, 67, 59, 80, 182, 255, 255, 255, 255, 255, 28, 53, 66, 67, 61, 66, 61, 66, 98, 119, 143, 106, 66, 67, 61, 71, 66, 71, 61, 71, 120, 255, 255, 93, 25, 71, 71, 71, 71, 71, 71, 98, 137, 138, 108, 76, 71, 71, 76, 71, 71, 77, 71, 71, 147, 255, 91, 24, 76, 76, 73, 76, 77, 76, 76, 77, 71, 77, 72, 76, 76, 78, 76, 77, 75, 104, 179, 255, 65, 59, 77, 76, 78, 78, 76, 81, 150, 255, 255, 255, 255, 175, 27, 80, 76, 78, 79, 78, 81, 139, 139, 137, 104, 103, 78, 81, 78, 80, 78, 80, 81, 78, 166, 255, 255, 47, 67, 81, 78, 81, 81, 81, 103, 156, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 130, 1, 59, 59, 66, 59, 66, 60, 78, 193, 255, 255, 255, 255, 255, 177, 9, 58, 66, 61, 70, 67, 60, 71, 61, 66, 71, 71, 61, 70, 71, 61, 71, 67, 52, 189, 255, 255, 255, 28, 49, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 76, 71, 72, 71, 76, 71, 71, 73, 255, 255, 255, 47, 23, 71, 76, 72, 76, 71, 77, 72, 77, 76, 76, 71, 75, 76, 72, 78, 76, 104, 181, 255, 65, 59, 78, 76, 78, 78, 77, 79, 159, 255, 255, 255, 255, 255, 24, 78, 78, 80, 76, 80, 78, 80, 78, 78, 78, 80, 78, 80, 79, 80, 79, 80, 78, 81, 166, 255, 255, 47, 71, 81, 81, 96, 81, 81, 98, 160, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 130, 1, 60, 59, 59, 59, 59, 66, 78, 191, 255, 255, 255, 255, 255, 255, 174, 8, 51, 60, 67, 61, 66, 61, 66, 61, 66, 61, 70, 61, 71, 71, 59, 29, 157, 255, 255, 255, 255, 255, 30, 27, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 76, 72, 71, 56, 51, 255, 255, 255, 255, 255, 125, 9, 27, 59, 75, 76, 72, 67, 54, 35, 9, 49, 77, 76, 77, 76, 75, 104, 179, 255, 65, 59, 76, 78, 76, 78, 76, 81, 155, 255, 255, 255, 255, 255, 84, 29, 78, 78, 78, 76, 78, 80, 78, 80, 78, 80, 78, 76, 78, 80, 78, 81, 79, 80, 166, 255, 255, 47, 67, 79, 80, 79, 81, 79, 103, 155, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 131, 1, 59, 59, 66, 59, 66, 59, 80, 191, 255, 255, 255, 255, 255, 255, 255, 188, 43, 4, 18, 52, 61, 66, 61, 70, 61, 67, 71, 67, 49, 19, 46, 255, 255, 255, 255, 255, 255, 255, 255, 87, 7, 27, 60, 71, 71, 71, 71, 72, 71, 71, 71, 67, 51, 24, 91, 255, 255, 255, 158, 118, 164, 153, 146, 113, 122, 129, 31, 31, 69, 127, 135, 125, 51, 76, 72, 77, 72, 76, 98, 186, 255, 65, 59, 78, 77, 76, 78, 77, 78, 160, 255, 255, 255, 255, 255, 255, 47, 18, 71, 78, 80, 78, 78, 78, 79, 77, 52, 17, 16, 67, 78, 81, 78, 80, 78, 137, 255, 255, 46, 71, 81, 80, 81, 81, 80, 103, 160, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 173, 21, 31, 31, 31, 31, 31, 31, 37, 175, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 158, 84, 10, 4, 7, 11, 9, 5, 6, 45, 127, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 127, 42, 8, 7, 12, 17, 17, 12, 7, 16, 47, 132, 255, 255, 255, 255, 255, 255, 12, 77, 76, 80, 78, 78, 96, 169, 255, 255, 255, 255, 85, 59, 75, 76, 78, 76, 78, 76, 255, 255, 93, 31, 31, 37, 31, 31, 37, 31, 126, 255, 255, 255, 255, 255, 255, 255, 177, 37, 5, 9, 18, 12, 11, 7, 43, 130, 255, 136, 31, 39, 39, 44, 45, 45, 55, 114, 255, 90, 31, 37, 31, 37, 31, 37, 32, 127, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 189, 173, 133, 173, 189, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 173, 130, 125, 126, 132, 187, 255, 255, 255, 255, 255, 255, 255, 255, 255, 26, 71, 76, 73, 76, 77, 72, 164, 170, 166, 155, 118, 71, 76, 76, 77, 76, 75, 76, 67, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 173, 126, 134, 177, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 47, 52, 71, 76, 72, 71, 76, 78, 139, 109, 108, 81, 77, 72, 77, 71, 76, 77, 72, 121, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 187, 18, 56, 76, 71, 77, 76, 71, 77, 71, 76, 77, 72, 76, 72, 77, 76, 71, 56, 183, 255, 255, 148, 96, 98, 99, 98, 81, 155, 255, 81, 149, 255, 255, 144, 81, 255, 255, 141, 96, 107, 106, 81, 166, 255, 255, 255, 255, 255, 181, 98, 81, 103, 98, 98, 255, 186, 81, 160, 255, 182, 81, 98, 106, 104, 98, 182, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 173, 19, 36, 71, 71, 72, 72, 72, 76, 75, 71, 77, 76, 77, 72, 56, 36, 173, 255, 255, 255, 149, 81, 255, 255, 141, 96, 107, 255, 81, 149, 255, 255, 144, 81, 255, 156, 81, 156, 255, 255, 160, 158, 255, 255, 255, 255, 255, 179, 81, 166, 255, 179, 81, 163, 184, 81, 156, 255, 81, 108, 255, 255, 255, 106, 98, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 19, 25, 50, 59, 61, 71, 61, 60, 56, 51, 29, 27, 82, 255, 255, 255, 255, 255, 148, 96, 120, 144, 98, 81, 142, 255, 81, 148, 255, 255, 144, 96, 255, 145, 96, 255, 255, 255, 255, 255, 255, 255, 81, 81, 167, 179, 81, 98, 106, 98, 98, 255, 186, 81, 156, 156, 96, 167, 255, 255, 255, 166, 81, 167, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 125, 65, 47, 43, 42, 43, 64, 68, 82, 136, 255, 255, 255, 255, 255, 255, 255, 149, 81, 147, 166, 167, 255, 255, 255, 81, 142, 255, 255, 119, 81, 255, 150, 81, 179, 255, 255, 182, 182, 255, 255, 179, 181, 255, 182, 96, 129, 149, 81, 150, 255, 186, 81, 156, 255, 81, 124, 255, 255, 255, 120, 96, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 149, 81, 255, 255, 255, 255, 255, 255, 116, 81, 144, 124, 81, 141, 255, 255, 116, 81, 147, 120, 96, 149, 255, 255, 255, 255, 255, 179, 81, 166, 255, 123, 81, 255, 184, 96, 160, 255, 145, 81, 101, 147, 124, 96, 160, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 181, 255, 255, 255, 255, 255, 255, 255, 182, 167, 167, 184, 255, 255, 255, 255, 182, 167, 167, 255, 255, 255, 255, 255, 255, 255, 255, 181, 255, 255, 255, 181, 255, 255, 181, 255, 255, 255, 255, 169, 167, 167, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(139, 32, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "44 46 60"); + IupSetAttribute(image, "2", "44 50 60"); + IupSetAttribute(image, "3", "44 54 68"); + IupSetAttribute(image, "4", "52 54 68"); + IupSetAttribute(image, "5", "52 58 68"); + IupSetAttribute(image, "6", "52 62 68"); + IupSetAttribute(image, "7", "52 62 76"); + IupSetAttribute(image, "8", "60 62 76"); + IupSetAttribute(image, "9", "60 66 76"); + IupSetAttribute(image, "10", "60 70 76"); + IupSetAttribute(image, "11", "60 66 84"); + IupSetAttribute(image, "12", "60 70 84"); + IupSetAttribute(image, "13", "68 70 76"); + IupSetAttribute(image, "14", "68 70 84"); + IupSetAttribute(image, "15", "68 74 84"); + IupSetAttribute(image, "16", "68 78 84"); + IupSetAttribute(image, "17", "68 74 92"); + IupSetAttribute(image, "18", "68 78 92"); + IupSetAttribute(image, "19", "76 78 92"); + IupSetAttribute(image, "20", "76 82 92"); + IupSetAttribute(image, "21", "84 86 92"); + IupSetAttribute(image, "22", "68 82 100"); + IupSetAttribute(image, "23", "76 82 100"); + IupSetAttribute(image, "24", "76 86 100"); + IupSetAttribute(image, "25", "76 90 108"); + IupSetAttribute(image, "26", "84 86 100"); + IupSetAttribute(image, "27", "84 90 108"); + IupSetAttribute(image, "28", "92 94 100"); + IupSetAttribute(image, "29", "84 94 116"); + IupSetAttribute(image, "30", "92 98 100"); + IupSetAttribute(image, "31", "92 98 108"); + IupSetAttribute(image, "32", "92 102 108"); + IupSetAttribute(image, "33", "84 98 116"); + IupSetAttribute(image, "34", "92 98 116"); + IupSetAttribute(image, "35", "92 102 124"); + IupSetAttribute(image, "36", "92 106 124"); + IupSetAttribute(image, "37", "100 102 108"); + IupSetAttribute(image, "38", "100 106 108"); + IupSetAttribute(image, "39", "100 106 116"); + IupSetAttribute(image, "40", "100 106 124"); + IupSetAttribute(image, "41", "100 110 124"); + IupSetAttribute(image, "42", "108 106 116"); + IupSetAttribute(image, "43", "108 110 116"); + IupSetAttribute(image, "44", "108 110 124"); + IupSetAttribute(image, "45", "108 114 124"); + IupSetAttribute(image, "46", "108 118 124"); + IupSetAttribute(image, "47", "116 118 124"); + IupSetAttribute(image, "48", "116 122 124"); + IupSetAttribute(image, "49", "92 106 132"); + IupSetAttribute(image, "50", "100 106 132"); + IupSetAttribute(image, "51", "100 110 132"); + IupSetAttribute(image, "52", "100 114 132"); + IupSetAttribute(image, "53", "100 114 140"); + IupSetAttribute(image, "54", "100 118 140"); + IupSetAttribute(image, "55", "108 118 132"); + IupSetAttribute(image, "56", "108 118 140"); + IupSetAttribute(image, "57", "108 122 140"); + IupSetAttribute(image, "58", "100 118 148"); + IupSetAttribute(image, "59", "108 122 148"); + IupSetAttribute(image, "60", "108 126 148"); + IupSetAttribute(image, "61", "108 126 156"); + IupSetAttribute(image, "62", "116 122 132"); + IupSetAttribute(image, "63", "116 126 140"); + IupSetAttribute(image, "64", "124 122 132"); + IupSetAttribute(image, "65", "124 126 132"); + IupSetAttribute(image, "66", "116 126 148"); + IupSetAttribute(image, "67", "116 126 156"); + IupSetAttribute(image, "68", "124 130 132"); + IupSetAttribute(image, "69", "124 130 140"); + IupSetAttribute(image, "70", "116 130 148"); + IupSetAttribute(image, "71", "116 130 156"); + IupSetAttribute(image, "72", "116 134 156"); + IupSetAttribute(image, "73", "124 130 148"); + IupSetAttribute(image, "74", "124 134 148"); + IupSetAttribute(image, "75", "124 134 156"); + IupSetAttribute(image, "76", "116 134 164"); + IupSetAttribute(image, "77", "124 134 164"); + IupSetAttribute(image, "78", "124 138 164"); + IupSetAttribute(image, "79", "124 142 164"); + IupSetAttribute(image, "80", "124 138 172"); + IupSetAttribute(image, "81", "124 142 172"); + IupSetAttribute(image, "82", "132 134 140"); + IupSetAttribute(image, "83", "132 138 140"); + IupSetAttribute(image, "84", "140 138 140"); + IupSetAttribute(image, "85", "132 134 148"); + IupSetAttribute(image, "86", "132 138 148"); + IupSetAttribute(image, "87", "140 142 148"); + IupSetAttribute(image, "88", "140 142 156"); + IupSetAttribute(image, "89", "140 146 156"); + IupSetAttribute(image, "90", "148 146 148"); + IupSetAttribute(image, "91", "148 150 156"); + IupSetAttribute(image, "92", "148 154 156"); + IupSetAttribute(image, "93", "156 154 156"); + IupSetAttribute(image, "94", "156 158 156"); + IupSetAttribute(image, "95", "132 142 164"); + IupSetAttribute(image, "96", "132 142 172"); + IupSetAttribute(image, "97", "132 146 164"); + IupSetAttribute(image, "98", "132 146 172"); + IupSetAttribute(image, "99", "132 150 172"); + IupSetAttribute(image, "100", "140 146 164"); + IupSetAttribute(image, "101", "140 150 172"); + IupSetAttribute(image, "102", "140 154 172"); + IupSetAttribute(image, "103", "132 146 180"); + IupSetAttribute(image, "104", "132 150 180"); + IupSetAttribute(image, "105", "132 154 180"); + IupSetAttribute(image, "106", "140 154 180"); + IupSetAttribute(image, "107", "140 158 180"); + IupSetAttribute(image, "108", "140 154 188"); + IupSetAttribute(image, "109", "140 158 188"); + IupSetAttribute(image, "110", "148 150 164"); + IupSetAttribute(image, "111", "148 154 164"); + IupSetAttribute(image, "112", "148 154 172"); + IupSetAttribute(image, "113", "148 158 172"); + IupSetAttribute(image, "114", "156 158 164"); + IupSetAttribute(image, "115", "156 158 172"); + IupSetAttribute(image, "116", "148 158 188"); + IupSetAttribute(image, "117", "156 162 164"); + IupSetAttribute(image, "118", "148 162 180"); + IupSetAttribute(image, "119", "148 162 188"); + IupSetAttribute(image, "120", "148 166 188"); + IupSetAttribute(image, "121", "156 162 180"); + IupSetAttribute(image, "122", "156 166 180"); + IupSetAttribute(image, "123", "156 166 188"); + IupSetAttribute(image, "124", "156 170 188"); + IupSetAttribute(image, "125", "164 166 164"); + IupSetAttribute(image, "126", "164 166 172"); + IupSetAttribute(image, "127", "172 170 172"); + IupSetAttribute(image, "128", "164 170 180"); + IupSetAttribute(image, "129", "164 174 188"); + IupSetAttribute(image, "130", "172 174 180"); + IupSetAttribute(image, "131", "172 178 188"); + IupSetAttribute(image, "132", "180 178 180"); + IupSetAttribute(image, "133", "180 182 180"); + IupSetAttribute(image, "134", "180 182 188"); + IupSetAttribute(image, "135", "180 186 188"); + IupSetAttribute(image, "136", "188 186 188"); + IupSetAttribute(image, "137", "140 162 196"); + IupSetAttribute(image, "138", "148 162 196"); + IupSetAttribute(image, "139", "148 166 196"); + IupSetAttribute(image, "140", "156 166 196"); + IupSetAttribute(image, "141", "156 170 196"); + IupSetAttribute(image, "142", "156 174 196"); + IupSetAttribute(image, "143", "156 174 204"); + IupSetAttribute(image, "144", "164 174 196"); + IupSetAttribute(image, "145", "164 178 196"); + IupSetAttribute(image, "146", "164 178 204"); + IupSetAttribute(image, "147", "172 178 196"); + IupSetAttribute(image, "148", "172 182 196"); + IupSetAttribute(image, "149", "172 182 204"); + IupSetAttribute(image, "150", "172 186 204"); + IupSetAttribute(image, "151", "164 182 212"); + IupSetAttribute(image, "152", "172 186 212"); + IupSetAttribute(image, "153", "172 190 220"); + IupSetAttribute(image, "154", "180 182 196"); + IupSetAttribute(image, "155", "180 186 204"); + IupSetAttribute(image, "156", "180 190 204"); + IupSetAttribute(image, "157", "188 186 196"); + IupSetAttribute(image, "158", "188 190 196"); + IupSetAttribute(image, "159", "180 186 212"); + IupSetAttribute(image, "160", "180 190 212"); + IupSetAttribute(image, "161", "188 194 196"); + IupSetAttribute(image, "162", "188 194 204"); + IupSetAttribute(image, "163", "180 194 212"); + IupSetAttribute(image, "164", "180 194 220"); + IupSetAttribute(image, "165", "180 198 220"); + IupSetAttribute(image, "166", "188 194 212"); + IupSetAttribute(image, "167", "188 198 212"); + IupSetAttribute(image, "168", "188 198 220"); + IupSetAttribute(image, "169", "188 202 220"); + IupSetAttribute(image, "170", "180 198 228"); + IupSetAttribute(image, "171", "188 202 228"); + IupSetAttribute(image, "172", "188 206 236"); + IupSetAttribute(image, "173", "196 194 196"); + IupSetAttribute(image, "174", "196 198 196"); + IupSetAttribute(image, "175", "196 198 204"); + IupSetAttribute(image, "176", "196 202 204"); + IupSetAttribute(image, "177", "204 202 204"); + IupSetAttribute(image, "178", "204 206 204"); + IupSetAttribute(image, "179", "196 202 212"); + IupSetAttribute(image, "180", "196 206 212"); + IupSetAttribute(image, "181", "196 202 220"); + IupSetAttribute(image, "182", "196 206 220"); + IupSetAttribute(image, "183", "204 206 212"); + IupSetAttribute(image, "184", "204 206 220"); + IupSetAttribute(image, "185", "204 210 212"); + IupSetAttribute(image, "186", "204 210 220"); + IupSetAttribute(image, "187", "212 210 212"); + IupSetAttribute(image, "188", "212 214 212"); + IupSetAttribute(image, "189", "212 214 220"); + IupSetAttribute(image, "190", "212 218 220"); + IupSetAttribute(image, "191", "196 206 228"); + IupSetAttribute(image, "192", "196 206 236"); + IupSetAttribute(image, "193", "196 210 228"); + IupSetAttribute(image, "194", "196 210 236"); + IupSetAttribute(image, "195", "196 214 236"); + IupSetAttribute(image, "196", "204 210 228"); + IupSetAttribute(image, "197", "204 214 228"); + IupSetAttribute(image, "198", "204 214 236"); + IupSetAttribute(image, "199", "212 222 236"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_PUC_Rio8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 242, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 214, 186, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 189, 170, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 234, 218, 167, 118, 123, 166, 216, 234, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 186, 123, 113, 110, 110, 110, 113, 181, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 243, 195, 249, 255, 194, 113, 123, 123, 123, 123, 113, 187, 255, 252, 197, 236, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 243, 14, 195, 246, 124, 126, 125, 126, 133, 124, 133, 122, 241, 225, 14, 233, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 195, 155, 249, 252, 110, 101, 111, 110, 113, 102, 109, 110, 246, 252, 155, 189, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 252, 235, 255, 255, 155, 191, 255, 255, 124, 117, 13, 13, 13, 13, 117, 117, 252, 255, 197, 17, 252, 255, 236, 249, 255, 255, 255, 255, + 255, 255, 255, 255, 252, 184, 183, 245, 106, 2, 191, 252, 117, 134, 133, 114, 131, 125, 135, 116, 249, 195, 3, 105, 246, 189, 169, 249, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 246, 132, 132, 216, 104, 12, 255, 179, 101, 101, 100, 100, 7, 109, 166, 255, 15, 103, 195, 14, 9, 236, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 146, 140, 140, 112, 6, 164, 252, 243, 99, 97, 107, 108, 96, 98, 242, 255, 169, 6, 4, 17, 158, 17, 252, 255, 255, 255, 255, + 255, 255, 255, 255, 231, 142, 176, 148, 168, 40, 22, 26, 44, 39, 18, 61, 61, 38, 38, 44, 27, 19, 20, 170, 17, 158, 17, 225, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 243, 185, 183, 228, 24, 30, 34, 25, 60, 31, 33, 36, 32, 28, 25, 35, 30, 23, 228, 189, 169, 236, 252, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 252, 242, 255, 63, 29, 62, 41, 42, 42, 78, 78, 42, 42, 41, 33, 43, 60, 255, 243, 249, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 65, 37, 49, 57, 52, 10, 83, 91, 11, 52, 51, 50, 36, 63, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 80, 46, 58, 66, 145, 144, 95, 201, 138, 145, 119, 58, 45, 64, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 84, 63, 68, 167, 146, 170, 203, 203, 173, 146, 130, 155, 63, 65, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 252, 191, 170, 246, 252, 71, 82, 55, 150, 190, 207, 208, 208, 207, 175, 151, 53, 79, 59, 249, 249, 212, 212, 249, 255, 255, 255, 255, + 255, 255, 255, 255, 225, 195, 228, 158, 8, 47, 81, 69, 144, 193, 237, 238, 238, 237, 193, 150, 68, 80, 56, 115, 140, 220, 223, 221, 255, 255, 255, 255, + 255, 255, 255, 249, 158, 155, 169, 17, 170, 74, 92, 70, 145, 236, 17, 243, 234, 17, 197, 153, 69, 87, 84, 186, 142, 183, 146, 146, 246, 255, 255, 255, + 255, 255, 255, 228, 195, 243, 170, 243, 170, 88, 84, 158, 141, 236, 1, 243, 158, 252, 155, 152, 161, 74, 84, 217, 232, 216, 235, 230, 222, 255, 255, 255, + 255, 255, 255, 195, 155, 158, 160, 210, 219, 198, 94, 159, 139, 14, 191, 14, 165, 236, 17, 209, 156, 90, 84, 231, 210, 172, 140, 146, 212, 255, 255, 255, + 255, 255, 255, 255, 252, 240, 46, 5, 215, 198, 93, 72, 136, 244, 252, 249, 244, 249, 243, 147, 160, 92, 198, 224, 139, 160, 237, 252, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 252, 86, 121, 162, 205, 93, 75, 129, 141, 143, 176, 176, 141, 141, 137, 73, 93, 204, 170, 120, 77, 247, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 251, 130, 149, 229, 171, 92, 89, 198, 198, 206, 207, 198, 198, 89, 93, 76, 236, 67, 128, 247, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 228, 155, 157, 247, 228, 205, 200, 198, 202, 202, 199, 200, 205, 226, 250, 159, 16, 196, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 252, 178, 67, 211, 252, 255, 255, 246, 77, 85, 243, 255, 255, 255, 215, 148, 180, 250, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 250, 178, 182, 233, 227, 247, 255, 246, 243, 255, 247, 227, 228, 182, 177, 247, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 250, 188, 154, 149, 54, 134, 69, 188, 186, 169, 17, 118, 149, 154, 213, 250, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 224, 174, 178, 127, 21, 134, 48, 67, 149, 163, 192, 230, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 255, 248, 236, 231, 231, 239, 247, 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(32, 32, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "40 40 40"); + IupSetAttribute(image, "2", "127 10 11"); + IupSetAttribute(image, "3", "127 18 19"); + IupSetAttribute(image, "4", "95 95 95"); + IupSetAttribute(image, "5", "90 102 126"); + IupSetAttribute(image, "6", "98 84 81"); + IupSetAttribute(image, "7", "127 116 77"); + IupSetAttribute(image, "8", "101 101 101"); + IupSetAttribute(image, "9", "110 110 110"); + IupSetAttribute(image, "10", "100 111 126"); + IupSetAttribute(image, "11", "102 113 127"); + IupSetAttribute(image, "12", "115 107 107"); + IupSetAttribute(image, "13", "125 122 108"); + IupSetAttribute(image, "14", "116 116 116"); + IupSetAttribute(image, "15", "125 119 119"); + IupSetAttribute(image, "16", "121 125 119"); + IupSetAttribute(image, "17", "124 125 124"); + IupSetAttribute(image, "18", "63 63 147"); + IupSetAttribute(image, "19", "31 68 163"); + IupSetAttribute(image, "20", "60 83 142"); + IupSetAttribute(image, "21", "61 84 148"); + IupSetAttribute(image, "22", "43 78 160"); + IupSetAttribute(image, "23", "41 79 175"); + IupSetAttribute(image, "24", "47 80 163"); + IupSetAttribute(image, "25", "57 90 172"); + IupSetAttribute(image, "26", "52 87 177"); + IupSetAttribute(image, "27", "54 90 181"); + IupSetAttribute(image, "28", "61 95 176"); + IupSetAttribute(image, "29", "58 96 188"); + IupSetAttribute(image, "30", "26 81 221"); + IupSetAttribute(image, "31", "59 98 197"); + IupSetAttribute(image, "32", "62 101 201"); + IupSetAttribute(image, "33", "61 105 219"); + IupSetAttribute(image, "34", "39 96 243"); + IupSetAttribute(image, "35", "40 97 243"); + IupSetAttribute(image, "36", "61 108 228"); + IupSetAttribute(image, "37", "60 108 232"); + IupSetAttribute(image, "38", "65 69 153"); + IupSetAttribute(image, "39", "65 74 159"); + IupSetAttribute(image, "40", "68 88 139"); + IupSetAttribute(image, "41", "93 112 149"); + IupSetAttribute(image, "42", "94 114 154"); + IupSetAttribute(image, "43", "65 98 176"); + IupSetAttribute(image, "44", "70 104 190"); + IupSetAttribute(image, "45", "84 108 162"); + IupSetAttribute(image, "46", "84 109 170"); + IupSetAttribute(image, "47", "88 109 162"); + IupSetAttribute(image, "48", "106 115 129"); + IupSetAttribute(image, "49", "111 122 134"); + IupSetAttribute(image, "50", "111 123 136"); + IupSetAttribute(image, "51", "106 123 154"); + IupSetAttribute(image, "52", "114 123 131"); + IupSetAttribute(image, "53", "115 126 143"); + IupSetAttribute(image, "54", "120 127 132"); + IupSetAttribute(image, "55", "113 126 148"); + IupSetAttribute(image, "56", "99 121 174"); + IupSetAttribute(image, "57", "104 124 161"); + IupSetAttribute(image, "58", "101 126 180"); + IupSetAttribute(image, "59", "99 123 188"); + IupSetAttribute(image, "60", "67 102 192"); + IupSetAttribute(image, "61", "79 111 193"); + IupSetAttribute(image, "62", "67 108 208"); + IupSetAttribute(image, "63", "82 114 194"); + IupSetAttribute(image, "64", "91 120 196"); + IupSetAttribute(image, "65", "98 126 196"); + IupSetAttribute(image, "66", "127 130 116"); + IupSetAttribute(image, "67", "125 129 124"); + IupSetAttribute(image, "68", "122 131 139"); + IupSetAttribute(image, "69", "124 133 146"); + IupSetAttribute(image, "70", "123 134 152"); + IupSetAttribute(image, "71", "108 129 186"); + IupSetAttribute(image, "72", "126 139 164"); + IupSetAttribute(image, "73", "116 135 178"); + IupSetAttribute(image, "74", "114 135 185"); + IupSetAttribute(image, "75", "115 137 187"); + IupSetAttribute(image, "76", "120 136 176"); + IupSetAttribute(image, "77", "124 141 189"); + IupSetAttribute(image, "78", "86 131 244"); + IupSetAttribute(image, "79", "101 130 203"); + IupSetAttribute(image, "80", "106 132 196"); + IupSetAttribute(image, "81", "106 135 204"); + IupSetAttribute(image, "82", "101 132 211"); + IupSetAttribute(image, "83", "101 135 223"); + IupSetAttribute(image, "84", "115 137 195"); + IupSetAttribute(image, "85", "124 143 192"); + IupSetAttribute(image, "86", "113 137 210"); + IupSetAttribute(image, "87", "114 143 216"); + IupSetAttribute(image, "88", "127 147 197"); + IupSetAttribute(image, "89", "123 147 205"); + IupSetAttribute(image, "90", "122 150 222"); + IupSetAttribute(image, "91", "104 140 234"); + IupSetAttribute(image, "92", "115 147 227"); + IupSetAttribute(image, "93", "115 149 235"); + IupSetAttribute(image, "94", "122 152 228"); + IupSetAttribute(image, "95", "126 156 235"); + IupSetAttribute(image, "96", "151 5 7"); + IupSetAttribute(image, "97", "157 1 2"); + IupSetAttribute(image, "98", "145 71 69"); + IupSetAttribute(image, "99", "148 88 84"); + IupSetAttribute(image, "100", "138 117 77"); + IupSetAttribute(image, "101", "130 121 82"); + IupSetAttribute(image, "102", "137 127 86"); + IupSetAttribute(image, "103", "130 113 114"); + IupSetAttribute(image, "104", "137 121 120"); + IupSetAttribute(image, "105", "145 105 105"); + IupSetAttribute(image, "106", "152 120 120"); + IupSetAttribute(image, "107", "161 67 68"); + IupSetAttribute(image, "108", "168 69 70"); + IupSetAttribute(image, "109", "139 131 86"); + IupSetAttribute(image, "110", "139 131 89"); + IupSetAttribute(image, "111", "145 133 89"); + IupSetAttribute(image, "112", "148 137 81"); + IupSetAttribute(image, "113", "148 138 91"); + IupSetAttribute(image, "114", "152 143 95"); + IupSetAttribute(image, "115", "157 147 87"); + IupSetAttribute(image, "116", "135 130 100"); + IupSetAttribute(image, "117", "139 133 101"); + IupSetAttribute(image, "118", "142 136 101"); + IupSetAttribute(image, "119", "132 133 114"); + IupSetAttribute(image, "120", "128 132 126"); + IupSetAttribute(image, "121", "134 137 127"); + IupSetAttribute(image, "122", "143 138 114"); + IupSetAttribute(image, "123", "148 139 101"); + IupSetAttribute(image, "124", "146 140 108"); + IupSetAttribute(image, "125", "154 146 100"); + IupSetAttribute(image, "126", "154 147 105"); + IupSetAttribute(image, "127", "145 144 118"); + IupSetAttribute(image, "128", "150 149 122"); + IupSetAttribute(image, "129", "152 149 116"); + IupSetAttribute(image, "130", "157 155 124"); + IupSetAttribute(image, "131", "160 150 94"); + IupSetAttribute(image, "132", "165 155 92"); + IupSetAttribute(image, "133", "163 153 101"); + IupSetAttribute(image, "134", "163 155 104"); + IupSetAttribute(image, "135", "168 158 102"); + IupSetAttribute(image, "136", "169 155 106"); + IupSetAttribute(image, "137", "160 155 114"); + IupSetAttribute(image, "138", "175 164 101"); + IupSetAttribute(image, "139", "175 163 112"); + IupSetAttribute(image, "140", "172 165 123"); + IupSetAttribute(image, "141", "179 163 109"); + IupSetAttribute(image, "142", "181 170 107"); + IupSetAttribute(image, "143", "184 166 110"); + IupSetAttribute(image, "144", "187 173 101"); + IupSetAttribute(image, "145", "186 172 105"); + IupSetAttribute(image, "146", "180 171 122"); + IupSetAttribute(image, "147", "186 171 123"); + IupSetAttribute(image, "148", "191 177 107"); + IupSetAttribute(image, "149", "188 179 118"); + IupSetAttribute(image, "150", "196 181 108"); + IupSetAttribute(image, "151", "202 187 108"); + IupSetAttribute(image, "152", "196 180 126"); + IupSetAttribute(image, "153", "205 188 127"); + IupSetAttribute(image, "154", "209 194 112"); + IupSetAttribute(image, "155", "131 132 132"); + IupSetAttribute(image, "156", "130 137 143"); + IupSetAttribute(image, "157", "143 143 128"); + IupSetAttribute(image, "158", "139 139 139"); + IupSetAttribute(image, "159", "128 137 149"); + IupSetAttribute(image, "160", "128 139 157"); + IupSetAttribute(image, "161", "140 144 135"); + IupSetAttribute(image, "162", "143 146 138"); + IupSetAttribute(image, "163", "138 146 157"); + IupSetAttribute(image, "164", "148 143 135"); + IupSetAttribute(image, "165", "149 142 142"); + IupSetAttribute(image, "166", "152 149 129"); + IupSetAttribute(image, "167", "155 153 129"); + IupSetAttribute(image, "168", "154 152 140"); + IupSetAttribute(image, "169", "148 148 147"); + IupSetAttribute(image, "170", "154 156 154"); + IupSetAttribute(image, "171", "128 142 177"); + IupSetAttribute(image, "172", "157 160 151"); + IupSetAttribute(image, "173", "153 160 162"); + IupSetAttribute(image, "174", "157 164 170"); + IupSetAttribute(image, "175", "158 167 178"); + IupSetAttribute(image, "176", "172 162 130"); + IupSetAttribute(image, "177", "164 165 145"); + IupSetAttribute(image, "178", "162 164 153"); + IupSetAttribute(image, "179", "169 165 148"); + IupSetAttribute(image, "180", "176 171 133"); + IupSetAttribute(image, "181", "179 175 153"); + IupSetAttribute(image, "182", "185 179 130"); + IupSetAttribute(image, "183", "187 179 139"); + IupSetAttribute(image, "184", "191 184 143"); + IupSetAttribute(image, "185", "183 178 149"); + IupSetAttribute(image, "186", "180 177 156"); + IupSetAttribute(image, "187", "184 179 153"); + IupSetAttribute(image, "188", "188 186 158"); + IupSetAttribute(image, "189", "163 163 163"); + IupSetAttribute(image, "190", "160 168 172"); + IupSetAttribute(image, "191", "170 170 170"); + IupSetAttribute(image, "192", "160 168 177"); + IupSetAttribute(image, "193", "181 175 165"); + IupSetAttribute(image, "194", "191 187 164"); + IupSetAttribute(image, "195", "180 180 180"); + IupSetAttribute(image, "196", "188 189 179"); + IupSetAttribute(image, "197", "186 186 186"); + IupSetAttribute(image, "198", "133 151 197"); + IupSetAttribute(image, "199", "129 151 209"); + IupSetAttribute(image, "200", "155 166 193"); + IupSetAttribute(image, "201", "133 165 248"); + IupSetAttribute(image, "202", "151 178 250"); + IupSetAttribute(image, "203", "156 182 250"); + IupSetAttribute(image, "204", "172 178 193"); + IupSetAttribute(image, "205", "177 182 196"); + IupSetAttribute(image, "206", "171 192 247"); + IupSetAttribute(image, "207", "172 194 250"); + IupSetAttribute(image, "208", "178 199 251"); + IupSetAttribute(image, "209", "192 177 130"); + IupSetAttribute(image, "210", "195 187 133"); + IupSetAttribute(image, "211", "192 188 151"); + IupSetAttribute(image, "212", "194 188 155"); + IupSetAttribute(image, "213", "192 190 163"); + IupSetAttribute(image, "214", "192 189 174"); + IupSetAttribute(image, "215", "194 192 169"); + IupSetAttribute(image, "216", "202 196 164"); + IupSetAttribute(image, "217", "206 200 166"); + IupSetAttribute(image, "218", "205 201 175"); + IupSetAttribute(image, "219", "197 198 186"); + IupSetAttribute(image, "220", "207 203 185"); + IupSetAttribute(image, "221", "208 203 175"); + IupSetAttribute(image, "222", "210 205 179"); + IupSetAttribute(image, "223", "208 205 188"); + IupSetAttribute(image, "224", "210 209 189"); + IupSetAttribute(image, "225", "194 194 194"); + IupSetAttribute(image, "226", "199 200 204"); + IupSetAttribute(image, "227", "206 207 195"); + IupSetAttribute(image, "228", "202 203 202"); + IupSetAttribute(image, "229", "202 206 211"); + IupSetAttribute(image, "230", "212 211 195"); + IupSetAttribute(image, "231", "210 211 203"); + IupSetAttribute(image, "232", "217 215 205"); + IupSetAttribute(image, "233", "211 212 209"); + IupSetAttribute(image, "234", "218 214 210"); + IupSetAttribute(image, "235", "221 219 212"); + IupSetAttribute(image, "236", "220 221 221"); + IupSetAttribute(image, "237", "205 211 241"); + IupSetAttribute(image, "238", "209 212 240"); + IupSetAttribute(image, "239", "223 224 222"); + IupSetAttribute(image, "240", "221 226 242"); + IupSetAttribute(image, "241", "224 223 216"); + IupSetAttribute(image, "242", "227 225 220"); + IupSetAttribute(image, "243", "227 227 226"); + IupSetAttribute(image, "244", "234 230 229"); + IupSetAttribute(image, "245", "233 232 227"); + IupSetAttribute(image, "246", "234 234 233"); + IupSetAttribute(image, "247", "234 237 244"); + IupSetAttribute(image, "248", "237 240 248"); + IupSetAttribute(image, "249", "243 243 243"); + IupSetAttribute(image, "250", "243 245 250"); + IupSetAttribute(image, "251", "247 248 253"); + IupSetAttribute(image, "252", "251 251 251"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_BR8(void) +{ + unsigned char imgdata[] = { + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 155, + 155, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 155, + 155, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 155, + 155, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 155, + 155, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 155, + 155, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 155, + 155, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 77, 155, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 145, 145, 145, 145, 142, 136, 155, 155, 155, 155, 151, 139, 142, 138, 145, 145, 149, 154, 152, 153, 155, 155, 153, 152, 134, 138, 154, 154, 145, 145, 155, + 155, 3, 3, 3, 3, 3, 55, 155, 155, 155, 155, 151, 112, 95, 46, 3, 3, 9, 27, 131, 154, 155, 155, 154, 131, 109, 72, 20, 7, 3, 3, 155, + 155, 4, 4, 4, 4, 10, 87, 155, 155, 148, 146, 132, 150, 154, 130, 41, 11, 11, 56, 155, 155, 154, 149, 150, 149, 154, 153, 66, 8, 4, 4, 155, + 155, 4, 4, 4, 4, 21, 114, 155, 155, 57, 37, 47, 94, 153, 154, 76, 0, 6, 86, 155, 155, 96, 51, 52, 70, 130, 154, 92, 19, 4, 4, 155, + 155, 4, 4, 4, 4, 44, 147, 144, 111, 9, 7, 12, 61, 154, 153, 63, 8, 13, 117, 137, 152, 40, 1, 2, 25, 123, 152, 85, 7, 4, 4, 155, + 155, 4, 4, 4, 4, 74, 147, 142, 115, 91, 89, 90, 121, 137, 108, 23, 4, 43, 140, 154, 125, 52, 53, 54, 103, 152, 126, 45, 16, 4, 4, 155, + 155, 4, 4, 3, 9, 101, 149, 152, 141, 142, 151, 137, 142, 124, 36, 4, 4, 75, 141, 153, 154, 149, 150, 155, 155, 118, 50, 4, 4, 4, 4, 155, + 155, 4, 4, 9, 29, 141, 153, 129, 67, 60, 65, 108, 137, 135, 92, 4, 4, 105, 138, 142, 113, 106, 116, 155, 155, 104, 30, 4, 4, 4, 4, 155, + 155, 4, 4, 5, 71, 155, 155, 99, 6, 18, 17, 64, 149, 137, 107, 8, 31, 155, 155, 128, 35, 4, 9, 102, 137, 141, 58, 4, 4, 4, 4, 155, + 155, 4, 4, 7, 84, 155, 155, 93, 39, 38, 48, 110, 133, 150, 97, 5, 69, 155, 155, 100, 2, 4, 4, 82, 152, 154, 59, 4, 4, 4, 4, 155, + 155, 4, 4, 15, 119, 155, 155, 155, 155, 155, 155, 141, 140, 127, 46, 10, 88, 155, 155, 73, 5, 4, 4, 83, 149, 141, 62, 4, 4, 4, 4, 155, + 155, 4, 4, 49, 143, 155, 155, 155, 155, 155, 155, 122, 98, 46, 3, 14, 120, 155, 155, 42, 5, 4, 4, 81, 149, 140, 68, 4, 4, 4, 4, 155, + 155, 4, 4, 22, 34, 33, 33, 33, 33, 33, 26, 4, 4, 4, 4, 15, 28, 33, 33, 9, 4, 4, 4, 24, 32, 32, 24, 4, 4, 4, 4, 155, + 155, 4, 4, 3, 3, 4, 4, 4, 4, 8, 4, 4, 4, 4, 4, 8, 3, 4, 4, 4, 4, 4, 4, 3, 8, 8, 3, 4, 4, 4, 4, 155, + 155, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 155, + 155, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 155, + 155, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 155, + 155, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 155, + 155, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 155, + 155, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 155, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155}; + + Ihandle* image = IupImage(32, 32, imgdata); + + IupSetAttribute(image, "0", "1 132 95"); + IupSetAttribute(image, "1", "2 131 97"); + IupSetAttribute(image, "2", "2 132 96"); + IupSetAttribute(image, "3", "1 132 97"); + IupSetAttribute(image, "4", "0 132 98"); + IupSetAttribute(image, "5", "2 133 99"); + IupSetAttribute(image, "6", "1 134 96"); + IupSetAttribute(image, "7", "1 134 97"); + IupSetAttribute(image, "8", "1 134 98"); + IupSetAttribute(image, "9", "1 134 99"); + IupSetAttribute(image, "10", "2 132 100"); + IupSetAttribute(image, "11", "2 135 100"); + IupSetAttribute(image, "12", "5 133 96"); + IupSetAttribute(image, "13", "7 133 97"); + IupSetAttribute(image, "14", "5 134 98"); + IupSetAttribute(image, "15", "6 134 99"); + IupSetAttribute(image, "16", "5 134 102"); + IupSetAttribute(image, "17", "0 136 96"); + IupSetAttribute(image, "18", "0 136 97"); + IupSetAttribute(image, "19", "1 136 98"); + IupSetAttribute(image, "20", "2 136 99"); + IupSetAttribute(image, "21", "7 136 99"); + IupSetAttribute(image, "22", "12 138 105"); + IupSetAttribute(image, "23", "14 140 108"); + IupSetAttribute(image, "24", "15 142 108"); + IupSetAttribute(image, "25", "17 139 108"); + IupSetAttribute(image, "26", "18 141 109"); + IupSetAttribute(image, "27", "31 151 111"); + IupSetAttribute(image, "28", "27 149 116"); + IupSetAttribute(image, "29", "31 150 112"); + IupSetAttribute(image, "30", "33 146 115"); + IupSetAttribute(image, "31", "34 148 116"); + IupSetAttribute(image, "32", "32 149 118"); + IupSetAttribute(image, "33", "32 148 119"); + IupSetAttribute(image, "34", "32 151 119"); + IupSetAttribute(image, "35", "37 146 115"); + IupSetAttribute(image, "36", "60 157 125"); + IupSetAttribute(image, "37", "78 167 126"); + IupSetAttribute(image, "38", "83 165 126"); + IupSetAttribute(image, "39", "82 166 127"); + IupSetAttribute(image, "40", "60 162 130"); + IupSetAttribute(image, "41", "61 161 132"); + IupSetAttribute(image, "42", "75 164 137"); + IupSetAttribute(image, "43", "72 166 139"); + IupSetAttribute(image, "44", "75 166 140"); + IupSetAttribute(image, "45", "76 166 140"); + IupSetAttribute(image, "46", "78 168 140"); + IupSetAttribute(image, "47", "82 165 136"); + IupSetAttribute(image, "48", "93 171 141"); + IupSetAttribute(image, "49", "80 165 145"); + IupSetAttribute(image, "50", "92 171 146"); + IupSetAttribute(image, "51", "94 178 155"); + IupSetAttribute(image, "52", "93 178 156"); + IupSetAttribute(image, "53", "94 179 157"); + IupSetAttribute(image, "54", "102 179 156"); + IupSetAttribute(image, "55", "104 182 159"); + IupSetAttribute(image, "56", "109 182 158"); + IupSetAttribute(image, "57", "117 186 148"); + IupSetAttribute(image, "58", "102 180 160"); + IupSetAttribute(image, "59", "106 181 162"); + IupSetAttribute(image, "60", "105 182 162"); + IupSetAttribute(image, "61", "109 183 164"); + IupSetAttribute(image, "62", "104 184 163"); + IupSetAttribute(image, "63", "107 185 164"); + IupSetAttribute(image, "64", "110 184 164"); + IupSetAttribute(image, "65", "111 186 164"); + IupSetAttribute(image, "66", "112 183 160"); + IupSetAttribute(image, "67", "113 185 163"); + IupSetAttribute(image, "68", "114 186 161"); + IupSetAttribute(image, "69", "114 186 162"); + IupSetAttribute(image, "70", "112 185 167"); + IupSetAttribute(image, "71", "113 186 164"); + IupSetAttribute(image, "72", "121 189 160"); + IupSetAttribute(image, "73", "121 190 169"); + IupSetAttribute(image, "74", "122 191 172"); + IupSetAttribute(image, "75", "124 191 171"); + IupSetAttribute(image, "76", "124 192 172"); + IupSetAttribute(image, "77", "239 194 8"); + IupSetAttribute(image, "78", "243 193 6"); + IupSetAttribute(image, "79", "244 194 4"); + IupSetAttribute(image, "80", "242 194 8"); + IupSetAttribute(image, "81", "129 196 178"); + IupSetAttribute(image, "82", "137 197 182"); + IupSetAttribute(image, "83", "137 198 182"); + IupSetAttribute(image, "84", "149 199 182"); + IupSetAttribute(image, "85", "148 199 184"); + IupSetAttribute(image, "86", "147 201 182"); + IupSetAttribute(image, "87", "146 202 186"); + IupSetAttribute(image, "88", "150 201 186"); + IupSetAttribute(image, "89", "152 203 183"); + IupSetAttribute(image, "90", "155 205 182"); + IupSetAttribute(image, "91", "152 204 183"); + IupSetAttribute(image, "92", "157 202 189"); + IupSetAttribute(image, "93", "169 209 186"); + IupSetAttribute(image, "94", "158 209 194"); + IupSetAttribute(image, "95", "163 208 195"); + IupSetAttribute(image, "96", "162 210 194"); + IupSetAttribute(image, "97", "160 210 197"); + IupSetAttribute(image, "98", "167 209 195"); + IupSetAttribute(image, "99", "171 210 197"); + IupSetAttribute(image, "100", "174 209 199"); + IupSetAttribute(image, "101", "171 213 201"); + IupSetAttribute(image, "102", "174 213 200"); + IupSetAttribute(image, "103", "170 216 199"); + IupSetAttribute(image, "104", "189 218 207"); + IupSetAttribute(image, "105", "189 222 207"); + IupSetAttribute(image, "106", "190 222 215"); + IupSetAttribute(image, "107", "189 224 216"); + IupSetAttribute(image, "108", "194 220 213"); + IupSetAttribute(image, "109", "194 226 214"); + IupSetAttribute(image, "110", "198 225 218"); + IupSetAttribute(image, "111", "211 230 222"); + IupSetAttribute(image, "112", "221 227 223"); + IupSetAttribute(image, "113", "212 230 226"); + IupSetAttribute(image, "114", "215 233 227"); + IupSetAttribute(image, "115", "216 232 225"); + IupSetAttribute(image, "116", "219 235 228"); + IupSetAttribute(image, "117", "216 237 233"); + IupSetAttribute(image, "118", "221 239 234"); + IupSetAttribute(image, "119", "229 239 236"); + IupSetAttribute(image, "120", "225 240 236"); + IupSetAttribute(image, "121", "227 242 239"); + IupSetAttribute(image, "122", "241 245 238"); + IupSetAttribute(image, "123", "245 246 238"); + IupSetAttribute(image, "124", "240 245 244"); + IupSetAttribute(image, "125", "240 247 244"); + IupSetAttribute(image, "126", "247 247 244"); + IupSetAttribute(image, "127", "241 250 243"); + IupSetAttribute(image, "128", "243 249 245"); + IupSetAttribute(image, "129", "242 250 244"); + IupSetAttribute(image, "130", "247 248 242"); + IupSetAttribute(image, "131", "249 249 247"); + IupSetAttribute(image, "132", "251 250 248"); + IupSetAttribute(image, "133", "248 251 249"); + IupSetAttribute(image, "134", "251 250 250"); + IupSetAttribute(image, "135", "251 251 251"); + IupSetAttribute(image, "136", "249 249 252"); + IupSetAttribute(image, "137", "250 251 252"); + IupSetAttribute(image, "138", "249 251 253"); + IupSetAttribute(image, "139", "248 252 250"); + IupSetAttribute(image, "140", "249 252 251"); + IupSetAttribute(image, "141", "249 252 252"); + IupSetAttribute(image, "142", "250 252 253"); + IupSetAttribute(image, "143", "250 254 252"); + IupSetAttribute(image, "144", "250 254 253"); + IupSetAttribute(image, "145", "251 254 254"); + IupSetAttribute(image, "146", "253 251 250"); + IupSetAttribute(image, "147", "252 251 251"); + IupSetAttribute(image, "148", "254 248 252"); + IupSetAttribute(image, "149", "252 250 252"); + IupSetAttribute(image, "150", "252 251 253"); + IupSetAttribute(image, "151", "252 252 251"); + IupSetAttribute(image, "152", "253 252 252"); + IupSetAttribute(image, "153", "252 252 253"); + IupSetAttribute(image, "154", "253 252 254"); + IupSetAttribute(image, "155", "255 255 255"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_Tecgraf8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 70, 76, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 59, 33, 44, 43, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 32, 55, 44, 43, 52, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 73, 43, 44, 40, 19, 42, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 60, 44, 67, 255, 12, 23, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 36, 58, 76, 255, 50, 15, 52, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 44, 58, 76, 255, 76, 9, 39, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 78, 44, 77, 255, 255, 255, 34, 31, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 78, 44, 76, 255, 255, 255, 59, 29, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 71, 44, 76, 255, 255, 255, 63, 31, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 74, 40, 52, 66, 73, 73, 73, 48, 31, 60, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 76, 78, 70, 59, 30, 4, 1, 9, 55, 39, 32, 29, 29, 28, 28, 28, 28, 36, 53, 71, 79, 76, 255, 255, 255, 255, 255, + 255, 255, 76, 73, 53, 29, 42, 43, 58, 75, 21, 10, 17, 57, 76, 76, 71, 70, 40, 22, 21, 14, 7, 9, 9, 14, 27, 51, 73, 76, 255, 255, + 255, 76, 40, 27, 31, 55, 65, 76, 76, 255, 255, 255, 28, 58, 255, 255, 255, 255, 82, 43, 65, 255, 76, 69, 46, 11, 3, 16, 30, 41, 76, 255, + 255, 70, 27, 27, 43, 81, 255, 255, 255, 255, 255, 255, 22, 58, 255, 255, 255, 255, 82, 44, 65, 255, 255, 255, 255, 255, 69, 12, 32, 32, 62, 255, + 255, 47, 13, 28, 38, 76, 255, 255, 255, 255, 255, 255, 21, 55, 255, 255, 255, 255, 82, 57, 67, 255, 255, 255, 255, 255, 76, 52, 32, 42, 62, 255, + 255, 76, 5, 5, 14, 28, 54, 76, 76, 255, 255, 255, 21, 44, 255, 255, 255, 255, 82, 65, 67, 255, 255, 255, 80, 71, 39, 44, 44, 44, 76, 255, + 255, 255, 76, 35, 5, 3, 6, 8, 16, 28, 53, 66, 28, 39, 71, 76, 76, 76, 60, 43, 43, 67, 64, 57, 44, 44, 56, 55, 76, 76, 255, 255, + 255, 255, 255, 255, 255, 72, 47, 25, 5, 2, 4, 9, 15, 19, 22, 27, 29, 30, 33, 43, 52, 57, 39, 38, 66, 76, 76, 76, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 50, 18, 15, 40, 59, 63, 63, 48, 37, 48, 79, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 49, 28, 76, 255, 255, 255, 80, 55, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 61, 22, 76, 255, 255, 255, 80, 44, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 61, 20, 76, 255, 255, 255, 67, 44, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 72, 13, 57, 255, 255, 76, 52, 44, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 5, 39, 76, 255, 79, 55, 51, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 24, 22, 68, 255, 60, 43, 71, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 45, 9, 42, 64, 42, 39, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 3, 32, 39, 39, 43, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 24, 7, 39, 39, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 76, 26, 40, 76, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(32, 32, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "8 16 24"); + IupSetAttribute(image, "2", "33 33 41"); + IupSetAttribute(image, "3", "33 33 49"); + IupSetAttribute(image, "4", "41 49 66"); + IupSetAttribute(image, "5", "49 57 66"); + IupSetAttribute(image, "6", "49 57 74"); + IupSetAttribute(image, "7", "57 66 82"); + IupSetAttribute(image, "8", "57 74 90"); + IupSetAttribute(image, "9", "66 74 90"); + IupSetAttribute(image, "10", "74 74 82"); + IupSetAttribute(image, "11", "74 82 82"); + IupSetAttribute(image, "12", "74 82 90"); + IupSetAttribute(image, "13", "66 74 99"); + IupSetAttribute(image, "14", "74 82 99"); + IupSetAttribute(image, "15", "74 82 107"); + IupSetAttribute(image, "16", "74 90 107"); + IupSetAttribute(image, "17", "82 90 107"); + IupSetAttribute(image, "18", "90 90 107"); + IupSetAttribute(image, "19", "82 90 115"); + IupSetAttribute(image, "20", "82 99 115"); + IupSetAttribute(image, "21", "90 99 115"); + IupSetAttribute(image, "22", "90 99 123"); + IupSetAttribute(image, "23", "90 107 123"); + IupSetAttribute(image, "24", "99 99 107"); + IupSetAttribute(image, "25", "107 107 115"); + IupSetAttribute(image, "26", "123 123 123"); + IupSetAttribute(image, "27", "90 107 132"); + IupSetAttribute(image, "28", "99 107 132"); + IupSetAttribute(image, "29", "99 115 140"); + IupSetAttribute(image, "30", "107 115 140"); + IupSetAttribute(image, "31", "107 115 148"); + IupSetAttribute(image, "32", "107 123 148"); + IupSetAttribute(image, "33", "107 123 156"); + IupSetAttribute(image, "34", "115 123 132"); + IupSetAttribute(image, "35", "123 123 132"); + IupSetAttribute(image, "36", "115 123 148"); + IupSetAttribute(image, "37", "115 123 156"); + IupSetAttribute(image, "38", "115 132 148"); + IupSetAttribute(image, "39", "115 132 156"); + IupSetAttribute(image, "40", "123 132 148"); + IupSetAttribute(image, "41", "123 132 156"); + IupSetAttribute(image, "42", "115 132 165"); + IupSetAttribute(image, "43", "123 140 165"); + IupSetAttribute(image, "44", "123 140 173"); + IupSetAttribute(image, "45", "132 132 140"); + IupSetAttribute(image, "46", "132 140 140"); + IupSetAttribute(image, "47", "140 140 140"); + IupSetAttribute(image, "48", "132 140 156"); + IupSetAttribute(image, "49", "148 148 156"); + IupSetAttribute(image, "50", "156 156 156"); + IupSetAttribute(image, "51", "132 140 165"); + IupSetAttribute(image, "52", "132 148 173"); + IupSetAttribute(image, "53", "140 148 165"); + IupSetAttribute(image, "54", "140 156 173"); + IupSetAttribute(image, "55", "132 148 181"); + IupSetAttribute(image, "56", "132 156 189"); + IupSetAttribute(image, "57", "140 156 181"); + IupSetAttribute(image, "58", "140 156 189"); + IupSetAttribute(image, "59", "148 156 165"); + IupSetAttribute(image, "60", "148 156 173"); + IupSetAttribute(image, "61", "156 156 165"); + IupSetAttribute(image, "62", "148 156 181"); + IupSetAttribute(image, "63", "156 165 173"); + IupSetAttribute(image, "64", "148 165 181"); + IupSetAttribute(image, "65", "148 165 189"); + IupSetAttribute(image, "66", "156 165 181"); + IupSetAttribute(image, "67", "156 165 189"); + IupSetAttribute(image, "68", "156 173 189"); + IupSetAttribute(image, "69", "165 165 173"); + IupSetAttribute(image, "70", "165 173 181"); + IupSetAttribute(image, "71", "165 173 189"); + IupSetAttribute(image, "72", "173 173 181"); + IupSetAttribute(image, "73", "173 181 189"); + IupSetAttribute(image, "74", "189 189 189"); + IupSetAttribute(image, "75", "148 165 198"); + IupSetAttribute(image, "76", "173 181 198"); + IupSetAttribute(image, "77", "173 189 206"); + IupSetAttribute(image, "78", "181 181 198"); + IupSetAttribute(image, "79", "181 189 198"); + IupSetAttribute(image, "80", "181 189 206"); + IupSetAttribute(image, "81", "189 198 214"); + IupSetAttribute(image, "82", "198 198 198"); + IupSetAttribute(image, "83", "0 0 0"); + IupSetAttribute(image, "84", "0 0 0"); + IupSetAttribute(image, "85", "0 0 0"); + IupSetAttribute(image, "86", "0 0 0"); + IupSetAttribute(image, "87", "0 0 0"); + IupSetAttribute(image, "88", "0 0 0"); + IupSetAttribute(image, "89", "0 0 0"); + IupSetAttribute(image, "90", "0 0 0"); + IupSetAttribute(image, "91", "0 0 0"); + IupSetAttribute(image, "92", "0 0 0"); + IupSetAttribute(image, "93", "0 0 0"); + IupSetAttribute(image, "94", "0 0 0"); + IupSetAttribute(image, "95", "0 0 0"); + IupSetAttribute(image, "96", "0 0 0"); + IupSetAttribute(image, "97", "0 0 0"); + IupSetAttribute(image, "98", "0 0 0"); + IupSetAttribute(image, "99", "0 0 0"); + IupSetAttribute(image, "100", "0 0 0"); + IupSetAttribute(image, "101", "0 0 0"); + IupSetAttribute(image, "102", "0 0 0"); + IupSetAttribute(image, "103", "0 0 0"); + IupSetAttribute(image, "104", "0 0 0"); + IupSetAttribute(image, "105", "0 0 0"); + IupSetAttribute(image, "106", "0 0 0"); + IupSetAttribute(image, "107", "0 0 0"); + IupSetAttribute(image, "108", "0 0 0"); + IupSetAttribute(image, "109", "0 0 0"); + IupSetAttribute(image, "110", "0 0 0"); + IupSetAttribute(image, "111", "0 0 0"); + IupSetAttribute(image, "112", "0 0 0"); + IupSetAttribute(image, "113", "0 0 0"); + IupSetAttribute(image, "114", "0 0 0"); + IupSetAttribute(image, "115", "0 0 0"); + IupSetAttribute(image, "116", "0 0 0"); + IupSetAttribute(image, "117", "0 0 0"); + IupSetAttribute(image, "118", "0 0 0"); + IupSetAttribute(image, "119", "0 0 0"); + IupSetAttribute(image, "120", "0 0 0"); + IupSetAttribute(image, "121", "0 0 0"); + IupSetAttribute(image, "122", "0 0 0"); + IupSetAttribute(image, "123", "0 0 0"); + IupSetAttribute(image, "124", "0 0 0"); + IupSetAttribute(image, "125", "0 0 0"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + diff --git a/iup/srcimglib/iup_imglib_logos.h b/iup/srcimglib/iup_imglib_logos.h new file mode 100755 index 0000000..9d527f3 --- /dev/null +++ b/iup/srcimglib/iup_imglib_logos.h @@ -0,0 +1,1319 @@ +static Ihandle* load_image_LogoBR(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 26, 150, 95, 255, 252, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 233, 243, 238, 255, 176, 217, 198, 255, 73, 171, 127, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 124, 194, 163, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 231, 242, 237, 255, 159, 210, 186, 255, 35, 154, 101, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 8, 142, 83, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 89, 179, 140, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 123, 194, 162, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 192, 226, 211, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 231, 244, 238, 255, 31, 154, 100, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 163, 213, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 253, 255, 36, 156, 103, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 16, 146, 89, 255, 250, 253, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 163, 213, 191, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 81, 255, 234, 245, 240, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 236, 246, 242, 255, 90, 181, 141, 255, 90, 181, 141, 255, 90, 181, 141, 255, 92, 181, 142, 255, 155, 209, 185, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 100, 185, 147, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 85, 177, 137, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 166, 214, 193, 255, 98, 183, 145, 255, 98, 183, 145, 255, 98, 183, 145, 255, 111, 189, 155, 255, 216, 237, 228, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 234, 245, 240, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 55, 164, 116, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 167, 215, 193, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 230, 243, 236, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 100, 184, 147, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 158, 211, 188, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 54, 164, 116, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 66, 169, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 249, 247, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 129, 197, 167, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 95, 182, 144, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 38, 157, 105, 255, 250, 253, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 43, 159, 108, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 231, 243, 237, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 236, 246, 241, 255, 3, 141, 81, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 90, 180, 140, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 199, 229, 215, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 202, 231, 218, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 166, 213, 192, 255, 147, 205, 179, 255, 147, 205, 179, 255, 147, 205, 179, 255, 159, 211, 188, 255, 238, 247, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 170, 216, 195, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 51, 162, 114, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 168, 215, 194, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 80, 255, 61, 166, 120, 255, 229, 243, 237, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 97, 183, 145, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 23, 150, 94, 255, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 187, 224, 208, 255, 12, 145, 87, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 125, 196, 164, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 243, 249, 247, 255, 230, 244, 238, 255, 230, 244, 238, 255, 230, 244, 238, 255, 239, 247, 244, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 172, 217, 197, 255, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 95, 182, 144, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 252, 250, 255, 67, 169, 124, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 199, 229, 216, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 254, 253, 255, 146, 205, 179, 255, 5, 142, 83, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 169, 215, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 182, 222, 204, 255, 170, 216, 196, 255, 170, 216, 196, 255, 171, 216, 196, 255, 201, 230, 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 248, 245, 255, 25, 151, 96, 255, 0, 140, 79, 255, 0, 140, 79, 255, 20, 149, 92, 255, 252, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 193, 226, 211, 255, 19, 148, 92, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 4, 142, 82, 255, 238, 247, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 238, 247, 243, 255, 4, 142, 82, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 177, 219, 200, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 106, 187, 151, 255, 0, 140, 79, 255, 0, 140, 79, 255, 92, 180, 141, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 173, 218, 198, 255, 99, 185, 147, 255, 99, 185, 147, 255, 104, 186, 150, 255, 168, 215, 194, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 150, 207, 182, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 61, 167, 120, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 169, 215, 195, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 157, 210, 187, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 125, 196, 164, 255, 0, 140, 79, 255, 0, 140, 79, 255, 165, 214, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 64, 168, 122, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 219, 238, 230, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 191, 226, 210, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 135, 200, 171, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 95, 182, 144, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 56, 164, 117, 255, 244, 250, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 94, 182, 143, 255, 0, 140, 79, 255, 4, 141, 81, 255, 236, 246, 241, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 248, 245, 255, 5, 142, 82, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 195, 227, 213, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 202, 231, 218, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 208, 233, 222, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 206, 233, 221, 255, 195, 227, 213, 255, 195, 227, 213, 255, 195, 227, 213, 255, 213, 235, 225, 255, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 251, 250, 255, 22, 149, 94, 255, 0, 140, 79, 255, 58, 165, 118, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 175, 218, 199, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 186, 223, 207, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 213, 235, 225, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 28, 152, 98, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 121, 194, 162, 255, 0, 140, 79, 255, 0, 140, 79, 255, 132, 199, 169, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 103, 186, 149, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 178, 219, 201, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 222, 240, 232, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 101, 185, 148, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 251, 249, 255, 110, 189, 154, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 205, 232, 220, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 31, 153, 100, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 169, 215, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 233, 244, 239, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 115, 191, 157, 255, 179, 220, 202, 255, 179, 220, 202, 255, 179, 220, 202, 255, 179, 220, 202, 255, 179, 220, 202, 255, 179, 220, 202, 255, 179, 220, 202, 255, 179, 220, 202, 255, 179, 220, 202, 255, 178, 220, 201, 255, 169, 215, 195, 255, 145, 205, 178, 255, 98, 184, 146, 255, 22, 149, 93, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 12, 145, 87, 255, 188, 223, 207, 255, 189, 224, 208, 255, 189, 224, 208, 255, 189, 224, 208, 255, 165, 213, 191, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 140, 202, 174, 255, 221, 239, 231, 255, 221, 239, 231, 255, 221, 239, 231, 255, 210, 233, 222, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DeviceFax(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, 221, 232, 47, 149, 150, 184, 146, 89, 89, 145, 238, 89, 89, 149, 246, 104, 105, 168, 248, 112, 114, 184, 255, 117, 120, 198, 255, 123, 126, 209, 255, 121, 124, 209, 255, 114, 116, 202, 255, 108, 110, 190, 255, 99, 101, 168, 244, 80, 80, 141, 249, 84, 85, 143, 242, 162, 162, 182, 109, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 209, 225, 63, 114, 115, 162, 204, 92, 93, 151, 245, 127, 129, 196, 255, 152, 157, 234, 255, 168, 173, 255, 255, 166, 171, 255, 255, 164, 168, 255, 255, 161, 165, 255, 255, 158, 162, 255, 255, 150, 154, 248, 255, 144, 147, 243, 255, 139, 143, 243, 255, 133, 136, 243, 255, 128, 132, 248, 255, 113, 117, 238, 255, 85, 85, 148, 250, 124, 124, 143, 157, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 250, 11, 118, 119, 165, 196, 98, 99, 155, 245, 145, 148, 209, 255, 181, 186, 254, 255, 183, 187, 255, 255, 180, 184, 255, 255, 171, 175, 251, 255, 143, 146, 219, 255, 130, 132, 202, 255, 135, 138, 205, 255, 136, 140, 205, 255, 147, 151, 213, 255, 153, 157, 218, 255, 152, 157, 218, 255, 152, 157, 218, 255, 146, 150, 213, 255, 130, 134, 205, 255, 110, 112, 194, 255, 81, 81, 147, 254, 119, 119, 135, 153, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 238, 238, 244, 23, 98, 99, 152, 224, 131, 133, 186, 255, 197, 203, 255, 255, 196, 201, 255, 255, 191, 195, 255, 255, 173, 176, 241, 255, 133, 136, 202, 255, 141, 145, 207, 255, 179, 186, 237, 255, 203, 211, 255, 255, 202, 210, 255, 255, 201, 209, 255, 255, 199, 207, 255, 255, 199, 206, 255, 255, 198, 206, 255, 255, 198, 205, 255, 255, 198, 206, 255, 255, 199, 207, 255, 255, 199, 207, 255, 255, 172, 179, 240, 255, 81, 82, 139, 251, 68, 68, 71, 105, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 106, 106, 158, 221, 148, 150, 200, 255, 208, 213, 255, 255, 206, 210, 255, 255, 185, 189, 243, 255, 137, 140, 202, 255, 152, 156, 213, 255, 201, 208, 252, 255, 203, 211, 255, 255, 201, 209, 255, 255, 200, 208, 255, 255, 200, 207, 255, 255, 199, 207, 255, 255, 199, 206, 255, 255, 198, 206, 255, 255, 198, 205, 255, 255, 196, 204, 255, 255, 195, 202, 255, 255, 191, 198, 249, 255, 188, 194, 242, 255, 182, 187, 231, 255, 133, 136, 182, 255, 116, 116, 142, 229, 142, 142, 142, 102, 207, 207, 207, 70, 212, 212, 212, 68, 178, 178, 178, 21, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 253, 253, 254, 3, 91, 91, 147, 237, 169, 173, 222, 255, 217, 222, 255, 255, 188, 192, 240, 255, 134, 137, 197, 255, 201, 209, 252, 255, 205, 212, 255, 255, 203, 211, 255, 255, 203, 210, 255, 255, 202, 210, 255, 255, 201, 209, 255, 255, 200, 208, 255, 255, 197, 205, 255, 255, 187, 193, 234, 255, 175, 179, 207, 255, 167, 169, 187, 255, 159, 160, 168, 255, 153, 154, 156, 255, 154, 154, 157, 255, 157, 158, 163, 255, 163, 165, 175, 255, 161, 164, 176, 255, 161, 164, 174, 254, 159, 162, 172, 249, 160, 164, 174, 247, 161, 164, 175, 247, 156, 156, 159, 246, 178, 178, 177, 158, 153, 153, 153, 37, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 164, 164, 182, 102, 83, 84, 145, 253, 165, 169, 219, 255, 150, 154, 208, 255, 204, 212, 254, 255, 206, 213, 255, 255, 205, 212, 255, 255, 204, 212, 255, 255, 203, 211, 255, 255, 200, 208, 255, 255, 190, 196, 237, 255, 171, 175, 195, 255, 156, 157, 161, 255, 161, 162, 165, 255, 183, 187, 193, 255, 197, 203, 211, 255, 210, 218, 232, 255, 221, 232, 251, 255, 221, 233, 255, 255, 216, 229, 255, 255, 212, 225, 255, 255, 208, 221, 255, 255, 203, 217, 255, 255, 195, 211, 255, 255, 192, 208, 255, 255, 185, 202, 255, 255, 175, 191, 246, 255, 167, 174, 196, 255, 152, 153, 155, 250, 172, 172, 172, 159, 129, 129, 129, 29, 234, 234, 234, 32, 222, 222, 222, 42, 204, 204, 204, 23, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 102, 102, 150, 221, 88, 89, 157, 255, 209, 217, 254, 255, 207, 215, 255, 255, 207, 214, 255, 255, 206, 214, 255, 255, 202, 211, 255, 255, 190, 197, 236, 255, 167, 170, 183, 255, 158, 158, 160, 255, 198, 202, 203, 255, 231, 238, 239, 255, 243, 252, 255, 255, 240, 249, 255, 255, 237, 246, 255, 255, 232, 242, 255, 255, 229, 238, 255, 255, 225, 235, 255, 255, 222, 233, 255, 255, 220, 231, 255, 255, 215, 227, 255, 255, 209, 222, 255, 255, 202, 215, 249, 255, 188, 198, 229, 255, 177, 185, 211, 255, 166, 172, 191, 255, 159, 163, 177, 255, 154, 155, 160, 255, 150, 150, 150, 255, 155, 156, 158, 250, 159, 160, 162, 247, 162, 164, 169, 247, 156, 157, 160, 246, 179, 179, 178, 134, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 152, 152, 161, 73, 71, 71, 133, 255, 149, 154, 214, 255, 212, 220, 255, 255, 207, 215, 255, 255, 201, 210, 254, 255, 176, 180, 199, 255, 158, 159, 160, 255, 208, 209, 209, 255, 252, 252, 252, 255, 250, 255, 255, 255, 248, 255, 255, 255, 245, 253, 255, 255, 241, 250, 255, 255, 238, 247, 255, 255, 237, 246, 255, 255, 235, 244, 255, 255, 231, 241, 255, 255, 225, 235, 252, 255, 200, 207, 222, 255, 179, 183, 194, 255, 171, 174, 180, 255, 174, 177, 181, 255, 178, 182, 189, 255, 194, 202, 211, 255, 208, 216, 223, 255, 203, 217, 232, 255, 201, 218, 239, 255, 216, 233, 248, 255, 223, 238, 255, 255, 213, 233, 255, 255, 207, 227, 255, 255, 191, 210, 241, 255, 163, 166, 172, 251, 159, 159, 161, 213, 118, 118, 118, 48, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 120, 120, 157, 184, 84, 84, 152, 255, 199, 207, 249, 255, 200, 209, 251, 255, 168, 170, 180, 255, 177, 177, 178, 255, 249, 249, 249, 255, 255, 255, 255, 255, 253, 255, 255, 255, 251, 255, 255, 255, 250, 255, 255, 255, 248, 255, 255, 255, 246, 254, 255, 255, 244, 252, 255, 255, 242, 250, 255, 255, 216, 222, 229, 255, 187, 191, 196, 255, 190, 194, 196, 255, 206, 212, 215, 255, 231, 240, 244, 255, 250, 255, 255, 255, 236, 246, 252, 255, 226, 237, 244, 255, 243, 253, 255, 255, 244, 253, 255, 255, 164, 218, 249, 255, 125, 186, 248, 255, 118, 167, 238, 255, 162, 191, 236, 255, 228, 242, 255, 255, 216, 234, 255, 255, 211, 230, 255, 255, 201, 222, 253, 255, 168, 176, 195, 255, 154, 155, 157, 246, 152, 152, 152, 106, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 252, 252, 252, 7, 221, 221, 221, 76, 172, 172, 176, 169, 150, 150, 150, 255, 152, 152, 158, 255, 158, 159, 161, 255, 150, 150, 150, 255, 196, 196, 195, 255, 241, 241, 241, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 253, 255, 255, 255, 252, 255, 255, 255, 251, 255, 255, 255, 221, 227, 228, 255, 197, 200, 202, 255, 213, 217, 219, 255, 251, 254, 250, 255, 255, 255, 255, 255, 254, 255, 254, 255, 255, 255, 255, 255, 240, 254, 255, 255, 146, 205, 250, 255, 119, 172, 241, 255, 128, 169, 232, 255, 203, 218, 242, 255, 229, 250, 251, 255, 187, 236, 247, 255, 154, 209, 253, 255, 156, 188, 240, 255, 227, 239, 252, 255, 228, 242, 255, 255, 226, 241, 255, 255, 215, 233, 255, 255, 207, 227, 255, 255, 187, 203, 228, 255, 154, 155, 158, 251, 159, 158, 158, 169, 35, 35, 35, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 247, 247, 247, 19, 167, 167, 167, 229, 174, 174, 174, 248, 205, 205, 204, 255, 227, 227, 224, 255, 242, 242, 242, 255, 242, 242, 242, 255, 230, 230, 229, 255, 197, 198, 199, 255, 157, 157, 158, 255, 180, 180, 181, 255, 229, 229, 229, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 251, 251, 255, 203, 205, 206, 255, 222, 227, 229, 255, 248, 254, 255, 255, 255, 255, 255, 255, 212, 238, 254, 255, 136, 186, 243, 255, 133, 173, 232, 255, 174, 199, 233, 255, 247, 254, 251, 255, 204, 245, 247, 255, 167, 229, 253, 255, 128, 189, 252, 255, 176, 201, 246, 255, 255, 255, 255, 255, 250, 254, 255, 255, 241, 249, 255, 255, 170, 214, 249, 255, 132, 180, 243, 255, 132, 171, 231, 255, 184, 206, 239, 255, 226, 241, 255, 255, 214, 232, 255, 255, 210, 229, 255, 255, 193, 212, 245, 255, 166, 171, 180, 252, 157, 158, 159, 228, 123, 123, 123, 61, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 212, 212, 212, 104, 190, 190, 190, 255, 250, 250, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 252, 252, 255, 207, 207, 210, 255, 164, 164, 165, 255, 170, 170, 171, 255, 216, 216, 216, 255, 213, 215, 216, 255, 244, 252, 253, 255, 249, 255, 255, 255, 250, 255, 255, 255, 255, 255, 255, 255, 222, 249, 251, 255, 168, 233, 253, 255, 139, 207, 255, 255, 107, 165, 247, 255, 222, 233, 250, 255, 255, 255, 255, 255, 248, 254, 253, 255, 222, 237, 247, 255, 166, 204, 246, 255, 144, 181, 234, 255, 169, 196, 232, 255, 234, 242, 250, 255, 217, 253, 255, 255, 170, 232, 253, 255, 130, 194, 253, 255, 143, 182, 244, 255, 237, 247, 255, 255, 230, 244, 255, 255, 222, 238, 255, 255, 212, 230, 255, 255, 201, 222, 255, 255, 172, 182, 206, 255, 152, 152, 154, 250, 155, 155, 155, 123, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 205, 205, 205, 101, 191, 191, 191, 254, 215, 215, 215, 255, 218, 218, 218, 255, 250, 250, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 219, 219, 220, 255, 162, 163, 163, 255, 181, 182, 183, 255, 235, 239, 239, 255, 250, 255, 255, 255, 250, 255, 255, 255, 252, 255, 255, 255, 255, 255, 255, 255, 247, 254, 250, 255, 223, 243, 247, 255, 199, 222, 247, 255, 186, 209, 240, 255, 188, 210, 235, 255, 237, 245, 247, 255, 255, 255, 255, 255, 176, 236, 252, 255, 146, 213, 255, 255, 111, 174, 252, 255, 157, 187, 238, 255, 255, 255, 255, 255, 237, 248, 251, 255, 216, 232, 244, 255, 183, 214, 247, 255, 157, 191, 238, 255, 162, 190, 231, 255, 209, 225, 246, 255, 226, 241, 255, 255, 213, 231, 255, 255, 205, 225, 255, 255, 185, 202, 234, 255, 156, 158, 162, 251, 158, 158, 159, 191, 84, 84, 84, 33, 0, 0, 0, 1, 0, 0, 0, 0, + 251, 251, 251, 11, 193, 193, 193, 140, 179, 179, 179, 251, 230, 230, 230, 255, 247, 247, 247, 255, 217, 217, 217, 255, 217, 217, 217, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 252, 252, 255, 197, 197, 200, 255, 159, 159, 160, 255, 210, 213, 213, 255, 252, 255, 255, 255, 251, 255, 255, 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 209, 246, 255, 255, 138, 209, 255, 255, 121, 181, 254, 255, 109, 160, 237, 255, 229, 238, 249, 255, 252, 255, 250, 255, 214, 241, 243, 255, 197, 226, 246, 255, 186, 209, 240, 255, 200, 218, 240, 255, 218, 231, 244, 255, 253, 255, 255, 255, 202, 249, 255, 255, 148, 216, 255, 255, 121, 183, 254, 255, 119, 164, 235, 255, 219, 234, 252, 255, 220, 236, 255, 255, 215, 232, 255, 255, 211, 230, 255, 255, 199, 219, 251, 255, 171, 177, 187, 255, 163, 164, 165, 230, 18, 18, 18, 42, 0, 0, 0, 1, + 201, 201, 201, 147, 175, 175, 175, 255, 165, 165, 166, 255, 231, 231, 231, 255, 212, 212, 212, 255, 225, 225, 225, 255, 247, 247, 247, 255, 213, 213, 213, 255, 229, 229, 229, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 238, 238, 239, 255, 166, 166, 167, 255, 186, 188, 189, 255, 252, 254, 254, 255, 253, 255, 255, 255, 252, 255, 255, 255, 255, 255, 255, 255, 251, 254, 252, 255, 217, 250, 251, 255, 172, 224, 245, 255, 155, 195, 244, 255, 226, 235, 246, 255, 255, 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 158, 222, 255, 255, 123, 184, 252, 255, 109, 162, 239, 255, 161, 188, 234, 255, 248, 255, 255, 255, 214, 242, 246, 255, 179, 219, 242, 255, 180, 208, 246, 255, 233, 246, 255, 255, 231, 246, 255, 255, 225, 240, 249, 255, 200, 212, 224, 255, 182, 190, 210, 255, 158, 169, 211, 255, 153, 154, 159, 253, 52, 52, 52, 143, 0, 0, 0, 24, + 183, 183, 183, 172, 208, 208, 209, 255, 210, 210, 210, 255, 168, 168, 168, 255, 193, 194, 196, 255, 234, 234, 233, 255, 182, 182, 182, 255, 186, 186, 188, 255, 229, 229, 227, 255, 213, 213, 213, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 249, 250, 255, 179, 180, 182, 255, 178, 179, 180, 255, 250, 251, 251, 255, 253, 255, 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 255, 215, 238, 252, 255, 134, 189, 247, 255, 119, 165, 234, 255, 148, 180, 228, 255, 245, 249, 249, 255, 236, 255, 255, 255, 189, 241, 251, 255, 143, 201, 250, 255, 159, 192, 243, 255, 247, 255, 255, 255, 246, 253, 255, 255, 248, 255, 255, 255, 242, 247, 247, 255, 210, 218, 223, 255, 189, 197, 214, 255, 172, 181, 214, 255, 146, 161, 229, 255, 127, 145, 234, 255, 110, 130, 232, 255, 150, 151, 154, 253, 28, 28, 28, 170, 0, 0, 0, 40, + 180, 180, 180, 169, 213, 213, 213, 255, 255, 255, 255, 255, 248, 248, 248, 255, 202, 202, 202, 255, 170, 170, 170, 255, 182, 185, 188, 255, 151, 151, 151, 255, 157, 157, 159, 255, 222, 222, 222, 255, 209, 209, 209, 255, 247, 247, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 189, 189, 190, 255, 179, 180, 181, 255, 251, 251, 251, 255, 255, 255, 255, 255, 254, 255, 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 237, 255, 255, 255, 178, 242, 255, 255, 147, 216, 255, 255, 101, 165, 249, 255, 189, 209, 242, 255, 255, 255, 255, 255, 254, 255, 254, 255, 249, 255, 250, 255, 255, 255, 255, 255, 247, 247, 247, 255, 213, 219, 220, 255, 194, 201, 212, 255, 183, 192, 216, 255, 152, 166, 230, 255, 137, 152, 233, 255, 136, 152, 233, 255, 135, 152, 234, 255, 134, 151, 235, 255, 115, 135, 233, 255, 150, 150, 150, 255, 0, 0, 0, 166, 0, 0, 0, 35, + 188, 188, 188, 143, 203, 203, 203, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 243, 243, 243, 255, 206, 207, 208, 255, 176, 176, 179, 255, 187, 189, 199, 255, 157, 157, 158, 255, 200, 200, 201, 255, 209, 209, 209, 255, 243, 243, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 255, 255, 190, 191, 195, 255, 183, 183, 184, 255, 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 253, 255, 228, 247, 251, 255, 214, 229, 245, 255, 255, 255, 253, 255, 255, 255, 255, 255, 247, 247, 247, 255, 221, 222, 222, 255, 197, 201, 212, 255, 184, 192, 214, 255, 160, 173, 230, 255, 147, 161, 234, 255, 144, 158, 233, 255, 145, 161, 234, 255, 145, 160, 234, 255, 143, 158, 235, 255, 138, 155, 235, 255, 134, 151, 235, 255, 114, 134, 233, 255, 150, 150, 150, 255, 0, 0, 0, 166, 0, 0, 0, 25, + 192, 192, 192, 134, 203, 203, 203, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 240, 240, 240, 255, 211, 211, 212, 255, 211, 215, 230, 255, 165, 165, 168, 255, 187, 187, 188, 255, 207, 207, 207, 255, 243, 243, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 184, 184, 185, 255, 190, 190, 191, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 244, 244, 255, 218, 218, 218, 255, 197, 200, 211, 255, 182, 189, 215, 255, 171, 185, 239, 255, 151, 166, 233, 255, 154, 168, 233, 255, 154, 167, 233, 255, 153, 168, 234, 255, 151, 166, 235, 255, 148, 164, 235, 255, 146, 161, 235, 255, 142, 157, 235, 255, 137, 154, 235, 255, 134, 151, 235, 255, 118, 136, 223, 255, 149, 150, 152, 250, 0, 0, 0, 166, 0, 0, 0, 24, + 196, 196, 196, 125, 192, 193, 196, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 248, 248, 255, 207, 208, 209, 255, 221, 224, 236, 255, 167, 168, 172, 255, 182, 182, 183, 255, 207, 207, 207, 255, 245, 245, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 249, 250, 255, 164, 165, 168, 255, 178, 179, 179, 255, 244, 244, 244, 255, 255, 255, 255, 255, 244, 244, 244, 255, 218, 218, 218, 255, 198, 201, 209, 255, 187, 194, 218, 255, 171, 184, 234, 255, 158, 172, 233, 255, 158, 171, 232, 255, 161, 174, 234, 255, 161, 174, 234, 255, 159, 173, 235, 255, 157, 171, 234, 255, 155, 169, 235, 255, 151, 166, 235, 255, 148, 163, 235, 255, 145, 160, 235, 255, 142, 158, 235, 255, 138, 155, 237, 255, 127, 145, 234, 255, 109, 127, 219, 255, 149, 150, 152, 250, 0, 0, 0, 158, 0, 0, 0, 22, + 202, 202, 202, 102, 179, 179, 181, 255, 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 253, 255, 210, 211, 212, 255, 219, 221, 230, 255, 168, 169, 173, 255, 182, 182, 183, 255, 206, 206, 206, 255, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 242, 241, 241, 255, 157, 158, 160, 255, 197, 200, 202, 255, 196, 199, 211, 255, 184, 191, 217, 255, 171, 184, 234, 255, 161, 174, 233, 255, 163, 176, 233, 255, 166, 178, 234, 255, 167, 179, 234, 255, 166, 178, 235, 255, 164, 176, 235, 255, 162, 175, 235, 255, 159, 173, 235, 255, 157, 171, 234, 255, 154, 169, 235, 255, 152, 166, 235, 255, 149, 164, 237, 255, 141, 157, 234, 255, 130, 147, 234, 255, 126, 139, 207, 255, 140, 146, 175, 254, 150, 150, 153, 253, 113, 113, 113, 221, 0, 0, 0, 145, 0, 0, 0, 22, + 162, 162, 162, 23, 160, 160, 160, 236, 179, 179, 181, 253, 235, 236, 237, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 255, 255, 255, 249, 255, 255, 255, 215, 219, 219, 255, 212, 214, 222, 255, 172, 172, 177, 255, 186, 186, 187, 255, 213, 213, 213, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 249, 249, 255, 211, 213, 216, 255, 164, 165, 170, 255, 179, 184, 191, 255, 175, 185, 231, 255, 168, 180, 233, 255, 170, 181, 234, 255, 170, 182, 235, 255, 169, 182, 235, 255, 169, 181, 234, 255, 167, 180, 234, 255, 166, 178, 235, 255, 164, 176, 235, 255, 162, 175, 235, 255, 159, 173, 235, 255, 158, 171, 236, 255, 152, 167, 236, 255, 140, 156, 231, 255, 132, 146, 212, 255, 141, 148, 180, 255, 149, 150, 156, 253, 145, 145, 148, 246, 107, 107, 107, 217, 36, 36, 36, 183, 0, 0, 0, 154, 0, 0, 0, 91, 0, 0, 0, 11, + 0, 0, 0, 1, 42, 42, 42, 42, 127, 127, 127, 191, 151, 151, 152, 252, 177, 177, 179, 255, 242, 243, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 255, 255, 255, 247, 255, 255, 255, 241, 255, 255, 255, 220, 230, 232, 255, 204, 206, 210, 255, 160, 160, 161, 255, 204, 204, 204, 255, 227, 227, 227, 255, 249, 249, 249, 255, 237, 237, 237, 255, 220, 220, 220, 255, 198, 200, 209, 255, 179, 184, 204, 255, 153, 159, 185, 255, 156, 157, 159, 255, 193, 196, 198, 255, 180, 190, 232, 255, 171, 182, 234, 255, 172, 184, 235, 255, 170, 182, 235, 255, 170, 182, 235, 255, 169, 181, 234, 255, 167, 180, 234, 255, 166, 178, 235, 255, 164, 177, 236, 255, 161, 175, 236, 255, 152, 166, 233, 255, 141, 155, 218, 255, 143, 151, 186, 255, 147, 149, 156, 252, 148, 148, 150, 250, 120, 120, 119, 224, 53, 53, 53, 192, 0, 0, 0, 164, 0, 0, 0, 139, 0, 0, 0, 88, 0, 0, 0, 44, 0, 0, 0, 14, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 35, 46, 46, 46, 103, 134, 135, 135, 214, 151, 152, 153, 253, 196, 197, 202, 255, 254, 254, 254, 255, 255, 255, 255, 255, 253, 255, 255, 255, 247, 255, 255, 255, 241, 255, 255, 255, 234, 251, 255, 255, 226, 237, 242, 255, 184, 185, 186, 255, 159, 159, 160, 255, 195, 196, 196, 255, 194, 197, 212, 255, 171, 177, 204, 255, 145, 153, 189, 255, 144, 149, 173, 255, 152, 153, 159, 255, 162, 163, 165, 255, 204, 205, 205, 255, 189, 190, 190, 255, 178, 189, 233, 255, 172, 183, 234, 255, 172, 184, 235, 255, 170, 182, 235, 255, 170, 182, 235, 255, 169, 182, 235, 255, 167, 180, 235, 255, 160, 173, 234, 255, 151, 164, 227, 255, 146, 154, 193, 255, 148, 151, 162, 252, 149, 150, 151, 253, 130, 130, 130, 230, 73, 73, 73, 199, 0, 0, 0, 167, 0, 0, 0, 148, 0, 0, 0, 100, 0, 0, 0, 52, 0, 0, 0, 25, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 44, 72, 72, 72, 129, 145, 145, 146, 231, 156, 156, 157, 252, 208, 210, 215, 255, 255, 255, 255, 255, 252, 255, 255, 255, 241, 255, 255, 255, 235, 251, 255, 255, 227, 245, 255, 255, 225, 239, 248, 255, 187, 188, 189, 255, 172, 172, 173, 255, 159, 161, 171, 255, 155, 156, 158, 255, 157, 157, 158, 255, 168, 168, 169, 255, 183, 183, 184, 255, 192, 196, 211, 255, 190, 198, 226, 255, 177, 187, 236, 255, 170, 182, 234, 255, 173, 184, 235, 255, 172, 184, 235, 255, 171, 183, 236, 255, 167, 180, 235, 255, 157, 170, 229, 255, 149, 159, 201, 255, 151, 155, 171, 253, 150, 151, 152, 254, 138, 139, 140, 237, 88, 88, 88, 207, 10, 10, 10, 172, 0, 0, 0, 154, 0, 0, 0, 112, 0, 0, 0, 61, 0, 0, 0, 28, 0, 0, 0, 13, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 18, 0, 0, 0, 56, 96, 96, 96, 158, 149, 149, 151, 244, 162, 163, 167, 253, 214, 222, 224, 255, 243, 255, 255, 255, 237, 253, 255, 255, 229, 246, 255, 255, 220, 239, 255, 255, 217, 237, 254, 255, 198, 201, 203, 255, 193, 193, 193, 255, 201, 201, 201, 255, 194, 197, 210, 255, 196, 202, 229, 255, 180, 191, 236, 255, 172, 183, 232, 255, 176, 187, 234, 255, 175, 185, 234, 255, 176, 187, 237, 255, 171, 183, 235, 255, 164, 177, 234, 255, 154, 165, 211, 255, 154, 158, 179, 255, 150, 151, 153, 253, 144, 144, 145, 243, 103, 103, 103, 214, 26, 26, 26, 180, 0, 0, 0, 160, 0, 0, 0, 124, 0, 0, 0, 72, 0, 0, 0, 34, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 25, 11, 11, 11, 71, 115, 114, 115, 183, 149, 150, 150, 250, 178, 183, 185, 254, 220, 236, 242, 255, 229, 246, 255, 255, 225, 243, 255, 255, 213, 234, 255, 255, 209, 233, 255, 255, 187, 193, 205, 255, 176, 186, 233, 255, 173, 184, 232, 255, 178, 189, 234, 255, 178, 189, 234, 255, 180, 190, 235, 255, 177, 188, 236, 255, 172, 183, 236, 255, 158, 169, 216, 255, 154, 160, 185, 255, 152, 153, 158, 252, 148, 148, 150, 248, 114, 114, 113, 221, 44, 44, 44, 189, 0, 0, 0, 163, 0, 0, 0, 134, 0, 0, 0, 83, 0, 0, 0, 40, 0, 0, 0, 19, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 31, 40, 40, 40, 93, 130, 130, 130, 205, 151, 152, 152, 252, 172, 179, 187, 255, 209, 228, 246, 255, 217, 237, 255, 255, 215, 237, 255, 255, 189, 195, 210, 255, 177, 186, 233, 255, 182, 192, 236, 255, 181, 191, 236, 255, 175, 186, 233, 255, 165, 176, 223, 255, 157, 164, 192, 255, 153, 155, 163, 252, 150, 150, 150, 252, 124, 124, 124, 227, 66, 66, 66, 196, 0, 0, 0, 166, 0, 0, 0, 144, 0, 0, 0, 94, 0, 0, 0, 48, 0, 0, 0, 22, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 40, 64, 64, 64, 118, 141, 141, 141, 223, 151, 152, 154, 253, 174, 187, 208, 255, 204, 227, 255, 255, 188, 195, 212, 255, 176, 185, 233, 255, 171, 181, 228, 255, 160, 167, 200, 255, 154, 157, 168, 253, 150, 150, 151, 253, 136, 136, 136, 234, 83, 83, 83, 204, 5, 5, 5, 170, 0, 0, 0, 152, 0, 0, 0, 107, 0, 0, 0, 58, 0, 0, 0, 27, 0, 0, 0, 11, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 16, 0, 0, 0, 51, 88, 88, 88, 145, 148, 148, 150, 238, 154, 157, 163, 253, 169, 174, 186, 255, 159, 162, 178, 254, 151, 152, 153, 253, 142, 142, 143, 240, 97, 97, 97, 211, 16, 16, 16, 176, 0, 0, 0, 157, 0, 0, 0, 119, 0, 0, 0, 67, 0, 0, 0, 31, 0, 0, 0, 14, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 22, 0, 0, 0, 64, 110, 110, 110, 173, 142, 142, 142, 227, 111, 111, 111, 215, 35, 35, 35, 185, 0, 0, 0, 162, 0, 0, 0, 130, 0, 0, 0, 78, 0, 0, 0, 36, 0, 0, 0, 17, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 28, 0, 0, 0, 72, 0, 0, 0, 108, 0, 0, 0, 85, 0, 0, 0, 44, 0, 0, 0, 21, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 16, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_LogoTecgraf(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 107, 121, 49, 89, 100, 121, 62, 131, 145, 171, 46, 152, 163, 184, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 111, 120, 5, 92, 101, 119, 171, 101, 113, 136, 255, 135, 152, 182, 255, 135, 151, 182, 255, 134, 150, 179, 173, 134, 149, 178, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 103, 120, 139, 101, 114, 137, 255, 141, 158, 191, 255, 135, 152, 183, 255, 134, 150, 181, 255, 132, 148, 179, 255, 133, 149, 178, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 94, 106, 34, 100, 111, 133, 250, 133, 150, 180, 255, 137, 154, 186, 255, 135, 152, 183, 255, 133, 150, 180, 255, 132, 148, 178, 255, 131, 147, 177, 254, 136, 151, 179, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 107, 125, 151, 112, 126, 152, 255, 146, 164, 198, 255, 136, 153, 185, 255, 135, 152, 182, 255, 133, 150, 180, 255, 132, 148, 178, 255, 130, 146, 176, 255, 131, 147, 176, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 109, 115, 5, 103, 114, 136, 239, 133, 150, 180, 255, 140, 158, 190, 255, 136, 153, 184, 255, 120, 134, 160, 248, 78, 88, 105, 255, 117, 132, 159, 255, 130, 146, 176, 255, 130, 146, 175, 246, 142, 155, 181, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 93, 106, 74, 113, 127, 153, 255, 146, 164, 197, 255, 138, 155, 186, 255, 137, 153, 184, 209, 141, 148, 161, 29, 36, 40, 46, 200, 48, 54, 65, 255, 123, 138, 167, 255, 128, 144, 174, 255, 133, 148, 175, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 112, 130, 152, 121, 135, 163, 255, 150, 168, 203, 255, 138, 154, 186, 255, 137, 153, 184, 53, 0, 0, 0, 0, 70, 73, 78, 56, 36, 41, 49, 254, 89, 100, 120, 255, 128, 144, 173, 255, 129, 144, 173, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 119, 140, 216, 133, 149, 179, 255, 145, 163, 196, 255, 139, 155, 186, 204, 157, 170, 193, 1, 0, 0, 0, 0, 0, 0, 0, 0, 51, 56, 65, 198, 61, 69, 83, 255, 126, 142, 171, 255, 128, 144, 172, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 115, 121, 20, 110, 123, 147, 250, 143, 161, 194, 255, 140, 157, 189, 255, 139, 155, 186, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 67, 75, 113, 58, 65, 78, 255, 114, 128, 154, 255, 126, 142, 171, 253, 133, 147, 174, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 95, 106, 67, 118, 133, 160, 255, 148, 167, 201, 255, 139, 156, 187, 254, 144, 159, 188, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 74, 80, 29, 62, 70, 83, 255, 99, 112, 135, 255, 126, 142, 171, 255, 132, 147, 174, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 105, 120, 115, 122, 137, 165, 255, 152, 171, 206, 255, 139, 156, 188, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 138, 141, 1, 69, 76, 89, 223, 90, 101, 121, 255, 128, 143, 173, 255, 127, 142, 170, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 111, 130, 151, 125, 140, 169, 255, 153, 172, 207, 255, 140, 157, 188, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 78, 92, 167, 85, 96, 115, 255, 128, 144, 174, 255, 127, 142, 170, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 115, 136, 187, 132, 148, 177, 255, 151, 169, 203, 255, 140, 157, 188, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 83, 95, 125, 87, 98, 118, 255, 126, 142, 171, 255, 125, 140, 169, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 117, 139, 218, 143, 160, 188, 255, 145, 163, 196, 255, 140, 157, 188, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 74, 83, 77, 91, 102, 123, 255, 123, 139, 167, 255, 125, 140, 169, 227, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 120, 142, 250, 152, 169, 196, 255, 141, 158, 191, 255, 143, 159, 189, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 79, 85, 41, 91, 103, 124, 255, 122, 137, 165, 255, 125, 140, 169, 251, 136, 150, 175, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 145, 148, 22, 106, 119, 143, 253, 158, 173, 200, 255, 139, 156, 188, 255, 141, 158, 188, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, 151, 153, 13, 90, 101, 121, 253, 122, 137, 165, 255, 124, 140, 168, 255, 141, 154, 178, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 167, 181, 1, 125, 134, 154, 39, 86, 93, 106, 81, 43, 47, 52, 111, 50, 54, 59, 150, 42, 45, 51, 169, 42, 46, 51, 197, 110, 124, 149, 255, 160, 176, 202, 255, 137, 154, 186, 255, 105, 118, 142, 228, 104, 117, 141, 227, 104, 117, 141, 227, 105, 117, 141, 227, 105, 118, 142, 227, 105, 118, 142, 227, 108, 120, 144, 227, 104, 116, 140, 255, 109, 123, 148, 255, 111, 125, 150, 255, 109, 122, 147, 170, 115, 127, 150, 138, 115, 128, 151, 111, 116, 128, 152, 75, 124, 136, 157, 39, 168, 176, 190, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 175, 186, 1, 120, 130, 149, 35, 110, 121, 143, 97, 105, 117, 140, 152, 106, 118, 141, 206, 105, 117, 140, 248, 103, 115, 139, 255, 105, 118, 142, 255, 91, 103, 123, 255, 43, 49, 58, 255, 26, 30, 36, 255, 29, 33, 40, 255, 113, 127, 153, 255, 160, 175, 202, 255, 139, 156, 188, 255, 144, 161, 192, 255, 138, 155, 186, 255, 134, 150, 181, 255, 130, 146, 176, 255, 126, 142, 171, 255, 122, 138, 166, 255, 119, 134, 162, 255, 116, 131, 158, 255, 114, 128, 154, 255, 113, 127, 152, 255, 112, 126, 151, 255, 111, 125, 151, 255, 110, 124, 149, 255, 109, 122, 148, 255, 109, 122, 147, 255, 112, 125, 149, 251, 113, 126, 151, 210, 114, 127, 151, 158, 116, 129, 153, 97, 123, 135, 158, 35, 156, 165, 182, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 129, 148, 32, 106, 118, 140, 129, 105, 117, 140, 214, 103, 116, 139, 255, 102, 115, 138, 255, 108, 121, 146, 255, 127, 142, 171, 255, 142, 160, 193, 255, 154, 172, 207, 255, 161, 181, 217, 255, 164, 183, 215, 255, 57, 64, 75, 255, 26, 30, 36, 255, 31, 36, 43, 255, 113, 128, 154, 255, 161, 177, 203, 255, 137, 154, 185, 255, 126, 142, 171, 255, 121, 136, 164, 255, 116, 131, 157, 255, 112, 126, 152, 255, 109, 122, 147, 255, 105, 118, 143, 255, 102, 115, 138, 255, 98, 111, 133, 255, 94, 106, 128, 255, 89, 100, 120, 255, 83, 94, 113, 255, 79, 89, 108, 255, 78, 88, 106, 255, 79, 89, 107, 255, 84, 94, 113, 255, 92, 103, 124, 255, 103, 116, 139, 255, 110, 123, 148, 255, 111, 125, 150, 255, 112, 126, 151, 255, 114, 127, 153, 214, 115, 129, 154, 129, 127, 139, 162, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 118, 128, 145, 31, 106, 118, 140, 164, 103, 116, 139, 252, 102, 115, 139, 255, 103, 116, 139, 255, 120, 135, 162, 255, 147, 165, 198, 255, 160, 179, 216, 255, 157, 176, 212, 255, 153, 172, 207, 255, 147, 165, 199, 255, 139, 156, 187, 241, 132, 146, 173, 211, 43, 47, 53, 174, 46, 50, 55, 144, 45, 50, 59, 153, 113, 127, 153, 255, 160, 176, 203, 255, 136, 152, 183, 205, 58, 65, 78, 35, 89, 94, 103, 35, 83, 88, 95, 35, 81, 85, 93, 35, 83, 87, 94, 35, 47, 53, 62, 35, 98, 102, 110, 64, 84, 93, 110, 198, 100, 113, 136, 255, 103, 116, 139, 255, 84, 93, 109, 187, 70, 77, 89, 168, 65, 72, 84, 205, 59, 65, 77, 241, 50, 56, 68, 255, 45, 51, 61, 255, 40, 45, 54, 255, 47, 53, 63, 255, 71, 80, 96, 255, 100, 113, 136, 255, 113, 127, 153, 255, 113, 127, 154, 255, 114, 128, 154, 252, 116, 130, 156, 164, 127, 140, 165, 37, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 110, 118, 133, 72, 103, 115, 138, 239, 103, 116, 139, 255, 103, 116, 140, 255, 106, 119, 143, 255, 141, 158, 191, 255, 154, 174, 209, 255, 150, 169, 203, 255, 143, 160, 191, 234, 137, 153, 182, 162, 127, 140, 163, 102, 113, 122, 138, 40, 126, 131, 140, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 93, 104, 97, 112, 125, 151, 255, 158, 174, 201, 255, 140, 156, 187, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, 114, 134, 175, 126, 141, 170, 255, 136, 153, 184, 255, 125, 140, 167, 94, 0, 0, 0, 0, 0, 0, 0, 0, 124, 126, 129, 6, 80, 84, 88, 40, 56, 60, 66, 96, 43, 47, 54, 157, 33, 36, 42, 227, 26, 30, 36, 255, 31, 35, 42, 255, 66, 75, 90, 255, 112, 125, 151, 255, 115, 130, 156, 255, 116, 130, 156, 255, 118, 132, 158, 245, 125, 139, 166, 73, 0, 0, 0, 0, + 98, 101, 105, 10, 94, 104, 124, 232, 103, 116, 140, 255, 104, 117, 140, 255, 104, 117, 141, 255, 129, 145, 174, 255, 144, 162, 195, 255, 142, 158, 187, 191, 131, 144, 167, 77, 140, 145, 154, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 105, 115, 111, 109, 123, 148, 255, 154, 171, 200, 255, 142, 158, 188, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 120, 139, 175, 128, 144, 173, 255, 138, 155, 187, 255, 122, 137, 165, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 120, 123, 2, 62, 65, 70, 71, 40, 44, 50, 180, 28, 32, 38, 255, 72, 82, 98, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 122, 137, 164, 236, 142, 159, 190, 10, + 106, 108, 112, 55, 81, 92, 110, 255, 104, 117, 141, 255, 105, 118, 142, 255, 105, 118, 142, 255, 122, 137, 165, 250, 136, 151, 180, 85, 151, 158, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 97, 107, 111, 107, 120, 145, 255, 147, 165, 197, 255, 139, 156, 186, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 120, 140, 175, 131, 147, 177, 255, 142, 159, 190, 255, 122, 137, 165, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 176, 0, 52, 56, 61, 79, 75, 84, 100, 250, 118, 133, 160, 255, 119, 133, 161, 255, 119, 134, 161, 255, 127, 142, 172, 255, 138, 154, 185, 61, + 100, 103, 106, 50, 40, 45, 54, 255, 97, 109, 131, 255, 106, 119, 143, 255, 106, 119, 143, 255, 107, 121, 145, 253, 115, 128, 153, 111, 134, 146, 167, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 97, 108, 111, 104, 117, 141, 255, 143, 160, 193, 255, 138, 155, 186, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 122, 143, 175, 134, 151, 181, 255, 146, 163, 192, 255, 122, 137, 165, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, 144, 165, 0, 124, 137, 160, 99, 119, 134, 160, 253, 120, 135, 162, 255, 120, 135, 163, 255, 125, 140, 169, 255, 139, 156, 188, 255, 117, 130, 154, 61, + 110, 112, 116, 7, 36, 40, 45, 224, 35, 39, 47, 255, 77, 87, 105, 255, 105, 118, 141, 255, 107, 121, 145, 255, 108, 121, 146, 255, 112, 126, 150, 208, 117, 130, 153, 95, 121, 133, 157, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 100, 110, 111, 102, 114, 137, 255, 140, 157, 188, 255, 141, 157, 187, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 127, 148, 175, 139, 155, 185, 255, 148, 164, 192, 255, 122, 137, 164, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 153, 174, 11, 126, 140, 166, 83, 121, 136, 163, 191, 121, 136, 163, 255, 121, 136, 164, 255, 123, 139, 167, 255, 140, 157, 189, 255, 145, 163, 197, 255, 123, 138, 165, 232, 120, 133, 155, 10, + 0, 0, 0, 0, 51, 55, 60, 47, 32, 36, 42, 227, 26, 30, 36, 255, 39, 45, 54, 255, 71, 80, 96, 255, 97, 110, 132, 255, 108, 121, 146, 255, 109, 123, 148, 255, 111, 124, 149, 242, 114, 127, 152, 184, 116, 129, 154, 117, 122, 135, 158, 61, 130, 142, 164, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 80, 89, 92, 98, 110, 133, 255, 136, 153, 184, 255, 138, 155, 185, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 125, 148, 175, 145, 161, 190, 255, 146, 162, 189, 255, 124, 139, 166, 94, 0, 0, 0, 0, 0, 0, 0, 0, 136, 149, 172, 10, 134, 147, 172, 61, 124, 138, 165, 109, 124, 138, 165, 174, 123, 137, 165, 242, 121, 136, 164, 255, 123, 138, 166, 255, 133, 150, 180, 255, 147, 165, 199, 255, 152, 170, 205, 255, 139, 156, 188, 255, 127, 142, 170, 235, 129, 140, 161, 71, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 68, 73, 16, 42, 46, 51, 145, 31, 35, 41, 247, 26, 30, 36, 255, 29, 33, 40, 255, 45, 51, 61, 255, 68, 76, 92, 255, 89, 100, 120, 255, 104, 117, 140, 255, 110, 124, 149, 255, 112, 126, 151, 255, 114, 128, 153, 253, 115, 129, 154, 222, 117, 131, 156, 190, 116, 130, 155, 153, 105, 117, 138, 175, 104, 117, 141, 255, 127, 142, 171, 255, 130, 146, 175, 209, 128, 141, 165, 61, 133, 146, 168, 52, 118, 132, 159, 36, 118, 132, 159, 36, 137, 149, 172, 58, 128, 141, 166, 55, 124, 138, 164, 74, 115, 129, 154, 204, 135, 151, 179, 255, 131, 146, 174, 255, 120, 135, 162, 187, 122, 137, 164, 180, 122, 137, 164, 216, 122, 137, 164, 249, 121, 136, 164, 255, 126, 141, 170, 255, 136, 152, 183, 255, 145, 163, 196, 255, 150, 168, 203, 255, 153, 172, 207, 255, 148, 166, 200, 255, 140, 157, 189, 255, 130, 146, 175, 247, 127, 140, 164, 163, 124, 134, 151, 26, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 94, 98, 20, 49, 53, 58, 111, 39, 43, 48, 195, 30, 34, 40, 250, 26, 30, 36, 255, 26, 30, 36, 255, 32, 36, 43, 255, 44, 49, 60, 255, 61, 69, 83, 255, 77, 86, 104, 255, 90, 101, 121, 255, 100, 112, 135, 255, 108, 121, 146, 255, 112, 126, 152, 255, 116, 130, 157, 255, 117, 132, 159, 255, 119, 133, 160, 255, 119, 134, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 121, 136, 164, 255, 122, 137, 165, 255, 123, 139, 167, 255, 125, 141, 170, 255, 130, 146, 175, 255, 136, 152, 181, 255, 145, 160, 187, 255, 153, 168, 193, 255, 157, 172, 198, 255, 160, 175, 201, 255, 162, 177, 203, 255, 162, 178, 207, 255, 157, 175, 205, 255, 147, 165, 197, 255, 139, 157, 188, 255, 138, 155, 186, 255, 130, 146, 175, 250, 125, 139, 166, 201, 118, 130, 153, 117, 115, 122, 134, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 95, 99, 18, 52, 56, 61, 77, 45, 49, 54, 137, 39, 43, 48, 188, 38, 42, 48, 236, 32, 36, 43, 253, 37, 41, 50, 255, 44, 49, 59, 255, 50, 56, 67, 255, 56, 63, 76, 255, 63, 71, 86, 255, 71, 80, 96, 255, 78, 88, 106, 255, 85, 96, 116, 255, 92, 103, 124, 255, 97, 109, 132, 255, 102, 115, 138, 255, 107, 120, 144, 255, 111, 124, 150, 255, 115, 129, 155, 255, 119, 133, 160, 255, 122, 137, 165, 255, 125, 140, 166, 255, 125, 140, 167, 255, 124, 139, 167, 255, 125, 140, 169, 255, 127, 143, 172, 255, 126, 142, 171, 255, 121, 136, 164, 254, 121, 135, 160, 236, 120, 133, 157, 194, 117, 129, 151, 143, 105, 115, 132, 83, 115, 121, 130, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 115, 118, 20, 77, 80, 85, 60, 58, 61, 67, 90, 45, 50, 57, 111, 61, 66, 74, 148, 56, 61, 71, 169, 58, 65, 79, 255, 69, 78, 94, 255, 76, 85, 103, 255, 79, 87, 101, 228, 82, 90, 105, 227, 80, 89, 105, 227, 83, 92, 109, 227, 92, 102, 119, 227, 96, 105, 123, 227, 99, 109, 127, 216, 97, 109, 131, 254, 113, 126, 150, 255, 102, 115, 138, 255, 107, 117, 136, 170, 95, 105, 123, 115, 95, 103, 118, 90, 94, 100, 111, 60, 122, 125, 130, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 152, 154, 22, 71, 79, 95, 253, 109, 122, 147, 255, 135, 152, 183, 255, 146, 161, 188, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 151, 153, 157, 18, 126, 141, 169, 253, 160, 179, 211, 255, 122, 137, 165, 255, 136, 149, 172, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 81, 95, 250, 98, 110, 133, 255, 136, 152, 184, 255, 137, 153, 182, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 105, 115, 47, 134, 151, 181, 255, 155, 174, 208, 255, 123, 138, 165, 251, 141, 153, 175, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 72, 84, 212, 87, 97, 117, 255, 136, 153, 184, 255, 137, 153, 182, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, 112, 129, 83, 139, 156, 188, 255, 150, 169, 203, 255, 123, 137, 165, 227, 170, 179, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 71, 82, 187, 75, 84, 102, 255, 134, 150, 181, 255, 136, 152, 181, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 125, 147, 125, 140, 158, 190, 255, 146, 164, 197, 255, 122, 137, 164, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 67, 77, 151, 65, 73, 88, 255, 128, 144, 173, 255, 134, 150, 180, 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 133, 157, 173, 143, 161, 194, 255, 138, 155, 187, 255, 123, 137, 164, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 64, 71, 109, 58, 65, 78, 255, 116, 130, 157, 255, 133, 149, 179, 231, 149, 163, 188, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 142, 147, 2, 124, 138, 164, 227, 149, 167, 202, 255, 128, 143, 173, 255, 125, 139, 166, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 78, 83, 67, 50, 57, 68, 255, 99, 111, 134, 255, 132, 148, 179, 255, 134, 149, 179, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 116, 128, 41, 129, 145, 174, 255, 150, 168, 202, 255, 122, 137, 165, 255, 127, 141, 166, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 99, 103, 14, 46, 52, 61, 250, 78, 88, 106, 255, 132, 148, 178, 255, 135, 150, 179, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 122, 143, 113, 133, 150, 180, 255, 145, 162, 196, 255, 122, 136, 164, 253, 133, 146, 170, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 52, 59, 210, 55, 62, 75, 255, 129, 145, 174, 255, 131, 147, 177, 212, 134, 149, 178, 1, 0, 0, 0, 0, 168, 171, 174, 1, 119, 132, 157, 210, 139, 157, 188, 255, 132, 148, 178, 255, 125, 139, 166, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 49, 55, 141, 38, 42, 51, 255, 115, 129, 156, 255, 130, 146, 176, 255, 132, 148, 177, 70, 0, 0, 0, 0, 116, 126, 142, 70, 121, 136, 163, 255, 144, 161, 195, 255, 122, 138, 166, 255, 124, 139, 166, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 64, 69, 68, 28, 32, 39, 255, 86, 96, 116, 255, 130, 146, 175, 255, 129, 145, 174, 215, 122, 135, 160, 29, 111, 124, 147, 213, 132, 148, 178, 255, 131, 147, 177, 255, 122, 137, 165, 255, 125, 139, 166, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 129, 133, 5, 34, 38, 43, 233, 50, 57, 69, 255, 127, 143, 172, 255, 128, 144, 173, 255, 126, 142, 170, 248, 127, 143, 172, 255, 131, 147, 177, 255, 123, 138, 166, 255, 123, 138, 165, 240, 144, 156, 176, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 47, 52, 139, 28, 33, 39, 255, 105, 118, 143, 255, 128, 144, 173, 255, 127, 142, 171, 255, 125, 141, 169, 255, 124, 139, 168, 255, 123, 138, 166, 255, 126, 140, 166, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 97, 101, 34, 30, 34, 40, 244, 58, 65, 79, 255, 126, 142, 170, 255, 126, 142, 171, 255, 125, 140, 169, 255, 124, 139, 167, 255, 123, 138, 166, 249, 138, 150, 172, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 51, 56, 121, 27, 32, 38, 255, 91, 102, 123, 255, 126, 141, 170, 255, 125, 140, 169, 255, 124, 139, 167, 255, 127, 140, 165, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 120, 124, 3, 47, 50, 56, 149, 34, 39, 46, 252, 85, 96, 115, 255, 113, 126, 152, 253, 118, 131, 154, 160, 127, 135, 151, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 97, 101, 28, 112, 115, 118, 62, 102, 106, 112, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_LogoPUC_Rio(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163, 163, 163, 2, 92, 88, 66, 92, 106, 100, 67, 116, 85, 85, 85, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 136, 136, 19, 122, 114, 67, 227, 151, 141, 82, 233, 46, 45, 41, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 88, 82, 161, 94, 92, 83, 193, 143, 143, 143, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 101, 101, 220, 104, 104, 104, 247, 107, 107, 107, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 58, 58, 7, 53, 51, 40, 52, 57, 57, 57, 11, 90, 90, 90, 145, 104, 102, 89, 252, 106, 103, 87, 255, 100, 100, 100, 181, 57, 57, 57, 28, 56, 54, 42, 47, 70, 70, 68, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 93, 63, 102, 69, 66, 52, 41, 113, 106, 67, 108, 198, 184, 106, 255, 86, 84, 75, 227, 125, 124, 121, 255, 164, 154, 95, 255, 173, 161, 96, 255, 124, 123, 117, 255, 96, 95, 89, 237, 186, 172, 100, 254, 133, 124, 77, 138, 60, 60, 60, 24, 99, 94, 64, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 100, 66, 100, 121, 114, 77, 142, 155, 145, 86, 234, 209, 194, 112, 255, 193, 179, 103, 255, 111, 107, 83, 255, 207, 192, 111, 255, 208, 193, 111, 255, 130, 124, 92, 255, 174, 161, 94, 255, 209, 194, 112, 255, 169, 157, 92, 243, 100, 94, 63, 128, 111, 104, 66, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 81, 57, 75, 117, 110, 71, 183, 110, 105, 78, 246, 141, 132, 83, 255, 96, 94, 81, 255, 102, 98, 78, 255, 115, 109, 79, 255, 126, 119, 82, 255, 101, 98, 77, 255, 98, 96, 86, 255, 136, 127, 79, 255, 118, 113, 84, 254, 105, 99, 69, 184, 110, 103, 67, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 87, 87, 72, 109, 109, 109, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 41, 36, 50, 153, 143, 86, 227, 179, 166, 98, 255, 180, 158, 92, 255, 183, 170, 98, 255, 169, 158, 93, 255, 158, 145, 89, 255, 155, 139, 86, 255, 168, 156, 93, 255, 180, 167, 96, 255, 181, 159, 92, 255, 174, 162, 96, 255, 159, 148, 87, 227, 84, 80, 57, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 89, 39, 98, 98, 98, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 82, 82, 119, 108, 108, 108, 254, 81, 81, 81, 179, 109, 109, 109, 40, 0, 0, 0, 0, 133, 133, 133, 2, 74, 74, 74, 32, 132, 125, 88, 255, 121, 117, 94, 255, 107, 102, 77, 255, 119, 119, 119, 255, 134, 134, 134, 255, 129, 125, 102, 255, 134, 128, 94, 255, 135, 135, 135, 255, 127, 127, 127, 255, 104, 100, 81, 255, 116, 112, 88, 255, 143, 136, 97, 255, 50, 49, 44, 58, 95, 95, 95, 3, 0, 0, 0, 0, 83, 83, 83, 23, 94, 94, 94, 153, 95, 95, 95, 251, 99, 99, 99, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 67, 67, 95, 125, 125, 125, 255, 92, 92, 92, 255, 77, 77, 77, 110, 0, 0, 0, 0, 51, 51, 46, 55, 149, 138, 82, 247, 125, 125, 125, 255, 117, 114, 97, 255, 209, 194, 112, 255, 125, 120, 90, 255, 120, 118, 110, 255, 175, 163, 98, 255, 187, 174, 101, 255, 127, 124, 106, 255, 123, 119, 99, 255, 192, 178, 103, 255, 133, 126, 92, 255, 135, 135, 135, 255, 131, 123, 79, 243, 99, 94, 64, 101, 0, 0, 0, 0, 58, 58, 58, 62, 96, 96, 96, 255, 115, 115, 115, 255, 90, 90, 90, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 170, 135, 135, 135, 255, 105, 105, 105, 217, 79, 79, 79, 5, 0, 0, 0, 0, 58, 58, 58, 23, 178, 165, 96, 255, 130, 125, 97, 255, 161, 151, 92, 255, 208, 193, 111, 255, 180, 167, 97, 255, 98, 95, 79, 255, 170, 158, 94, 255, 179, 167, 98, 255, 119, 114, 88, 255, 153, 143, 87, 255, 204, 190, 110, 255, 194, 180, 104, 255, 108, 105, 88, 255, 191, 177, 103, 255, 73, 70, 51, 67, 0, 0, 0, 0, 119, 119, 119, 0, 95, 95, 95, 173, 135, 135, 135, 255, 104, 104, 104, 216, 167, 167, 167, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 58, 58, 35, 119, 119, 119, 251, 135, 135, 135, 255, 86, 86, 86, 137, 0, 0, 0, 0, 0, 0, 0, 0, 178, 178, 178, 3, 135, 127, 79, 246, 110, 107, 93, 255, 95, 92, 74, 255, 124, 114, 74, 255, 113, 109, 88, 255, 133, 126, 86, 255, 143, 134, 93, 255, 151, 134, 88, 255, 135, 128, 87, 255, 118, 115, 95, 255, 124, 113, 71, 255, 96, 93, 77, 255, 100, 98, 85, 255, 144, 135, 86, 255, 51, 51, 51, 33, 0, 0, 0, 0, 0, 0, 0, 0, 67, 67, 67, 90, 132, 132, 132, 255, 130, 130, 130, 255, 63, 63, 63, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 89, 143, 135, 135, 135, 255, 114, 114, 114, 242, 47, 47, 47, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 144, 87, 219, 155, 145, 90, 255, 167, 156, 93, 255, 146, 133, 90, 255, 140, 133, 98, 255, 135, 130, 103, 255, 131, 126, 103, 255, 129, 125, 102, 255, 134, 129, 103, 255, 141, 135, 101, 255, 141, 128, 89, 255, 164, 153, 94, 255, 161, 150, 91, 255, 152, 142, 86, 251, 126, 126, 126, 5, 0, 0, 0, 0, 0, 0, 0, 0, 123, 123, 123, 4, 103, 103, 103, 213, 135, 135, 135, 255, 101, 101, 101, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 62, 50, 32, 126, 118, 73, 133, 63, 62, 55, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 106, 106, 213, 135, 135, 135, 255, 93, 93, 93, 165, 49, 49, 49, 12, 0, 0, 0, 0, 0, 0, 0, 0, 93, 93, 93, 1, 94, 91, 79, 189, 117, 117, 115, 255, 123, 122, 118, 255, 140, 133, 96, 255, 127, 127, 126, 255, 135, 135, 135, 255, 134, 128, 94, 255, 140, 132, 88, 255, 135, 135, 135, 255, 134, 134, 134, 255, 132, 126, 95, 255, 124, 122, 111, 255, 120, 120, 118, 255, 101, 98, 87, 219, 115, 115, 115, 2, 0, 0, 0, 0, 0, 0, 0, 0, 58, 58, 58, 9, 78, 78, 78, 122, 135, 135, 135, 255, 111, 111, 111, 252, 119, 119, 119, 7, 0, 0, 0, 0, 0, 0, 0, 0, 58, 58, 58, 15, 82, 82, 82, 123, 73, 73, 73, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 69, 54, 45, 171, 159, 94, 238, 178, 165, 97, 244, 114, 107, 68, 126, 82, 82, 82, 10, 0, 0, 0, 0, 65, 51, 51, 166, 121, 45, 46, 255, 133, 6, 7, 255, 92, 40, 41, 228, 60, 60, 60, 55, 0, 0, 0, 0, 89, 89, 89, 7, 122, 114, 70, 240, 123, 123, 123, 255, 124, 119, 95, 255, 209, 194, 112, 255, 141, 133, 90, 255, 116, 114, 99, 255, 186, 173, 101, 255, 194, 181, 105, 255, 128, 124, 99, 255, 130, 124, 92, 255, 198, 184, 106, 255, 138, 131, 91, 255, 131, 131, 131, 255, 119, 112, 73, 254, 56, 56, 55, 34, 0, 0, 0, 0, 61, 61, 61, 40, 83, 50, 50, 214, 136, 3, 4, 255, 122, 41, 41, 255, 73, 53, 53, 200, 121, 121, 121, 3, 128, 128, 128, 2, 72, 72, 72, 99, 109, 109, 109, 232, 118, 118, 118, 249, 76, 76, 76, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 48, 20, 120, 113, 70, 185, 184, 171, 99, 255, 161, 150, 89, 224, 95, 90, 62, 87, 75, 75, 75, 8, 99, 14, 15, 140, 153, 2, 3, 253, 113, 82, 83, 255, 120, 120, 120, 250, 49, 49, 49, 49, 0, 0, 0, 0, 150, 140, 86, 163, 138, 131, 95, 255, 159, 148, 90, 255, 193, 179, 103, 255, 155, 146, 91, 255, 93, 91, 81, 255, 154, 145, 93, 255, 164, 154, 95, 255, 106, 103, 86, 255, 140, 132, 88, 255, 185, 172, 100, 255, 186, 173, 100, 255, 111, 106, 84, 255, 160, 149, 91, 204, 0, 0, 0, 0, 52, 52, 52, 24, 110, 110, 110, 242, 111, 99, 99, 255, 155, 0, 2, 255, 107, 12, 13, 163, 61, 59, 59, 16, 63, 63, 63, 60, 100, 100, 100, 204, 123, 123, 123, 255, 87, 87, 87, 215, 55, 55, 55, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 105, 68, 127, 173, 161, 93, 255, 152, 141, 81, 255, 191, 177, 102, 255, 146, 137, 83, 192, 73, 70, 54, 49, 64, 43, 43, 115, 101, 92, 92, 255, 93, 87, 88, 254, 49, 49, 49, 28, 0, 0, 0, 0, 92, 87, 61, 78, 93, 91, 80, 255, 105, 101, 79, 255, 131, 115, 75, 255, 135, 127, 92, 255, 158, 148, 91, 255, 159, 148, 94, 255, 161, 142, 88, 255, 158, 148, 92, 255, 141, 134, 97, 255, 133, 115, 72, 255, 104, 101, 84, 255, 92, 90, 80, 255, 96, 90, 58, 119, 0, 0, 0, 0, 109, 109, 109, 8, 93, 93, 93, 244, 98, 83, 83, 255, 69, 53, 53, 148, 54, 54, 54, 29, 92, 92, 92, 165, 123, 123, 123, 254, 101, 101, 101, 255, 107, 107, 107, 255, 91, 91, 91, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 104, 69, 99, 140, 131, 80, 190, 201, 186, 107, 255, 163, 151, 90, 230, 143, 133, 77, 255, 160, 148, 86, 255, 186, 173, 100, 252, 97, 96, 89, 233, 57, 20, 20, 255, 93, 93, 93, 196, 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90, 8, 120, 109, 65, 241, 160, 111, 64, 255, 133, 74, 43, 255, 136, 50, 30, 255, 120, 33, 20, 255, 143, 26, 16, 255, 142, 24, 15, 255, 121, 31, 19, 255, 136, 47, 28, 255, 135, 69, 40, 255, 153, 105, 61, 255, 137, 121, 71, 254, 57, 56, 49, 35, 0, 0, 0, 0, 0, 0, 0, 0, 95, 95, 95, 166, 61, 24, 24, 255, 87, 87, 87, 234, 113, 113, 113, 244, 109, 109, 109, 255, 96, 96, 96, 255, 96, 96, 96, 228, 130, 130, 130, 255, 101, 101, 101, 205, 83, 83, 83, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, 133, 133, 4, 157, 146, 87, 233, 206, 192, 111, 255, 83, 79, 55, 169, 67, 64, 52, 110, 190, 176, 102, 255, 193, 179, 103, 255, 115, 108, 66, 255, 106, 102, 102, 255, 93, 76, 76, 255, 81, 78, 61, 158, 79, 79, 79, 5, 0, 0, 0, 0, 0, 0, 0, 0, 47, 42, 42, 33, 80, 25, 25, 119, 145, 0, 2, 255, 168, 0, 2, 255, 110, 10, 11, 217, 132, 11, 12, 199, 132, 10, 12, 199, 103, 11, 12, 203, 165, 0, 2, 255, 163, 0, 2, 255, 76, 16, 17, 150, 40, 30, 30, 40, 0, 0, 0, 0, 0, 0, 0, 0, 118, 118, 118, 0, 62, 62, 62, 123, 95, 85, 85, 255, 101, 91, 91, 255, 74, 74, 74, 255, 118, 118, 118, 255, 133, 133, 133, 255, 60, 60, 60, 130, 57, 57, 57, 145, 122, 122, 122, 255, 117, 117, 117, 254, 57, 57, 57, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 61, 47, 63, 135, 126, 78, 190, 209, 194, 112, 255, 131, 123, 78, 166, 114, 107, 68, 158, 158, 147, 88, 234, 103, 97, 64, 146, 86, 86, 86, 198, 104, 105, 109, 255, 68, 72, 77, 255, 115, 110, 75, 255, 52, 53, 47, 215, 18, 26, 44, 121, 20, 28, 46, 119, 21, 28, 46, 119, 57, 14, 26, 189, 118, 5, 15, 255, 96, 7, 16, 254, 27, 32, 47, 140, 22, 29, 46, 119, 22, 29, 46, 119, 24, 30, 47, 122, 81, 11, 20, 245, 118, 5, 15, 255, 75, 12, 23, 216, 21, 28, 46, 119, 20, 28, 46, 119, 19, 27, 46, 119, 29, 34, 46, 192, 71, 75, 84, 255, 65, 69, 79, 255, 96, 98, 103, 255, 96, 96, 96, 226, 48, 48, 48, 107, 111, 111, 111, 252, 83, 83, 83, 167, 70, 70, 70, 139, 133, 133, 133, 255, 103, 103, 103, 226, 48, 48, 48, 73, 141, 141, 141, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107, 7, 131, 123, 76, 197, 154, 144, 87, 232, 172, 160, 94, 242, 98, 93, 62, 141, 207, 192, 111, 255, 209, 194, 112, 255, 141, 132, 81, 184, 109, 109, 109, 230, 51, 73, 131, 255, 6, 72, 241, 255, 13, 77, 242, 255, 19, 82, 242, 255, 25, 86, 243, 255, 29, 87, 235, 255, 35, 93, 241, 255, 39, 97, 243, 255, 42, 98, 241, 255, 45, 101, 244, 255, 47, 102, 244, 255, 48, 103, 244, 255, 48, 103, 244, 255, 47, 102, 244, 255, 45, 101, 244, 255, 42, 98, 241, 255, 40, 97, 243, 255, 36, 94, 243, 255, 30, 87, 233, 255, 26, 87, 243, 255, 20, 82, 242, 255, 14, 78, 242, 255, 7, 73, 241, 255, 36, 67, 148, 255, 112, 112, 112, 254, 83, 83, 83, 145, 135, 135, 135, 255, 135, 135, 135, 255, 92, 92, 92, 170, 103, 103, 103, 215, 105, 105, 105, 231, 99, 99, 99, 219, 51, 51, 51, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, 221, 221, 1, 91, 91, 91, 7, 66, 64, 50, 124, 131, 122, 73, 241, 190, 177, 102, 254, 129, 120, 75, 152, 77, 73, 53, 50, 101, 101, 101, 195, 55, 76, 131, 255, 17, 80, 242, 255, 24, 85, 242, 255, 31, 90, 243, 255, 37, 95, 243, 255, 51, 82, 157, 255, 42, 91, 215, 255, 52, 105, 243, 255, 50, 74, 130, 255, 58, 110, 244, 255, 47, 84, 179, 255, 61, 112, 244, 255, 61, 112, 244, 255, 50, 88, 187, 255, 56, 107, 237, 255, 54, 80, 142, 255, 49, 100, 230, 255, 48, 103, 243, 255, 47, 72, 130, 255, 38, 95, 243, 255, 32, 91, 243, 255, 25, 86, 242, 255, 18, 81, 242, 255, 40, 71, 148, 255, 107, 107, 107, 227, 55, 55, 55, 22, 86, 86, 86, 145, 116, 116, 116, 243, 101, 101, 101, 254, 52, 52, 52, 128, 49, 49, 49, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 96, 96, 13, 82, 82, 82, 22, 152, 142, 83, 246, 85, 80, 56, 83, 0, 0, 0, 0, 63, 63, 63, 54, 41, 63, 118, 244, 27, 88, 243, 255, 40, 75, 161, 255, 40, 90, 219, 255, 49, 103, 244, 255, 89, 111, 156, 255, 61, 96, 184, 255, 57, 98, 200, 255, 100, 115, 140, 255, 70, 104, 187, 255, 82, 106, 160, 255, 74, 122, 245, 255, 74, 122, 245, 255, 68, 102, 186, 255, 84, 108, 160, 255, 85, 111, 167, 255, 73, 103, 174, 255, 54, 99, 215, 255, 97, 109, 124, 255, 50, 104, 244, 255, 42, 97, 237, 255, 40, 70, 143, 255, 28, 88, 243, 255, 35, 64, 139, 252, 71, 71, 71, 78, 0, 0, 0, 0, 48, 48, 48, 41, 106, 106, 106, 248, 60, 60, 60, 60, 78, 78, 78, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 63, 54, 35, 54, 53, 48, 24, 0, 0, 0, 0, 0, 0, 0, 0, 31, 57, 123, 194, 38, 95, 243, 255, 46, 88, 193, 255, 88, 106, 139, 255, 60, 112, 244, 255, 84, 110, 165, 255, 95, 116, 159, 255, 82, 110, 174, 255, 103, 122, 157, 255, 113, 125, 139, 255, 75, 109, 194, 255, 87, 131, 246, 255, 87, 131, 246, 255, 80, 122, 229, 255, 109, 113, 104, 255, 82, 111, 178, 255, 104, 121, 152, 255, 73, 105, 181, 255, 108, 123, 143, 255, 61, 112, 244, 255, 71, 100, 165, 255, 65, 96, 167, 255, 39, 96, 243, 255, 31, 62, 141, 229, 0, 0, 0, 0, 0, 0, 0, 0, 69, 69, 69, 5, 53, 53, 53, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 60, 123, 194, 48, 103, 244, 255, 56, 108, 242, 255, 119, 120, 99, 255, 68, 107, 205, 255, 70, 105, 192, 255, 124, 131, 126, 255, 98, 120, 167, 255, 111, 127, 156, 255, 117, 118, 98, 255, 92, 131, 230, 255, 100, 141, 247, 255, 100, 141, 247, 255, 99, 140, 247, 255, 113, 111, 86, 255, 90, 115, 173, 255, 118, 130, 144, 255, 109, 124, 151, 255, 88, 113, 168, 255, 67, 112, 226, 255, 125, 123, 93, 255, 54, 102, 227, 255, 49, 103, 244, 255, 36, 66, 141, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 63, 123, 194, 57, 110, 244, 255, 63, 111, 234, 255, 78, 107, 176, 255, 136, 135, 108, 255, 84, 126, 232, 255, 121, 118, 87, 255, 99, 118, 155, 255, 128, 136, 138, 255, 114, 111, 82, 255, 78, 102, 162, 255, 113, 151, 247, 255, 113, 151, 248, 255, 84, 110, 174, 255, 122, 122, 101, 255, 97, 110, 129, 255, 123, 133, 144, 255, 125, 125, 100, 255, 80, 118, 216, 255, 118, 126, 125, 255, 95, 114, 150, 255, 66, 115, 240, 255, 57, 108, 238, 255, 41, 69, 142, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 65, 124, 194, 66, 116, 245, 255, 61, 79, 121, 255, 82, 125, 238, 255, 121, 127, 125, 255, 119, 126, 127, 255, 121, 131, 139, 255, 122, 121, 95, 255, 180, 169, 103, 255, 183, 171, 100, 255, 111, 128, 164, 255, 126, 160, 248, 255, 126, 160, 248, 255, 105, 129, 190, 255, 184, 171, 100, 255, 172, 161, 98, 255, 130, 128, 100, 255, 132, 134, 116, 255, 105, 121, 148, 255, 138, 137, 108, 255, 82, 125, 237, 255, 62, 81, 123, 255, 65, 113, 236, 255, 46, 73, 142, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 68, 124, 194, 75, 123, 245, 255, 85, 113, 178, 255, 118, 123, 115, 255, 92, 127, 219, 255, 140, 139, 112, 255, 151, 145, 98, 255, 209, 194, 112, 255, 209, 194, 112, 255, 209, 194, 112, 255, 117, 137, 185, 255, 139, 170, 249, 255, 139, 170, 249, 255, 120, 146, 215, 255, 195, 181, 105, 255, 209, 194, 112, 255, 209, 194, 112, 255, 159, 152, 102, 255, 152, 146, 102, 255, 94, 128, 213, 255, 108, 119, 134, 255, 95, 113, 149, 255, 76, 124, 245, 255, 50, 76, 142, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 71, 124, 194, 81, 125, 239, 255, 89, 129, 234, 255, 108, 122, 147, 255, 144, 141, 106, 255, 97, 120, 175, 255, 160, 152, 99, 255, 208, 193, 111, 255, 176, 164, 95, 255, 167, 156, 94, 255, 138, 163, 227, 255, 152, 179, 250, 255, 152, 180, 250, 255, 149, 177, 247, 255, 150, 143, 98, 255, 175, 162, 94, 255, 205, 190, 110, 255, 182, 169, 98, 255, 91, 113, 168, 255, 135, 137, 118, 255, 119, 126, 125, 255, 92, 133, 238, 255, 79, 121, 231, 255, 54, 79, 142, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 73, 124, 194, 90, 133, 244, 255, 73, 87, 115, 255, 100, 126, 189, 255, 112, 129, 165, 255, 186, 173, 102, 255, 208, 193, 111, 255, 146, 146, 122, 255, 147, 172, 237, 255, 147, 170, 230, 255, 163, 188, 250, 255, 165, 189, 250, 255, 165, 189, 250, 255, 164, 188, 250, 255, 150, 173, 233, 255, 148, 174, 239, 255, 135, 140, 139, 255, 209, 194, 112, 255, 195, 181, 105, 255, 118, 129, 143, 255, 99, 128, 201, 255, 80, 91, 112, 255, 87, 127, 232, 255, 58, 82, 143, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 40, 40, 2, 80, 80, 80, 124, 105, 105, 105, 206, 101, 101, 101, 184, 66, 66, 66, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 75, 124, 194, 98, 139, 247, 255, 105, 142, 238, 255, 110, 122, 142, 255, 119, 121, 106, 255, 178, 167, 105, 255, 209, 194, 112, 255, 146, 151, 148, 255, 166, 189, 250, 255, 172, 194, 251, 255, 176, 197, 251, 255, 178, 199, 251, 255, 178, 199, 251, 255, 176, 197, 251, 255, 172, 194, 251, 255, 167, 190, 251, 255, 142, 150, 159, 255, 209, 194, 112, 255, 189, 176, 103, 255, 127, 129, 115, 255, 111, 119, 126, 255, 102, 137, 227, 255, 99, 140, 247, 255, 61, 84, 142, 229, 153, 153, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 66, 54, 33, 141, 132, 81, 167, 158, 148, 90, 210, 131, 122, 77, 149, 46, 45, 44, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 82, 82, 129, 118, 118, 118, 245, 87, 87, 87, 135, 97, 97, 97, 187, 114, 114, 114, 244, 56, 56, 56, 31, 87, 87, 87, 160, 79, 79, 79, 162, 62, 76, 113, 252, 104, 144, 247, 255, 78, 96, 139, 255, 111, 131, 177, 255, 104, 125, 179, 255, 178, 166, 100, 255, 209, 194, 112, 255, 156, 154, 129, 255, 177, 197, 251, 255, 183, 203, 251, 255, 188, 206, 252, 255, 191, 208, 252, 255, 191, 208, 252, 255, 189, 207, 252, 255, 184, 203, 252, 255, 178, 198, 251, 255, 156, 154, 127, 255, 209, 194, 112, 255, 196, 182, 105, 255, 101, 118, 160, 255, 110, 132, 183, 255, 82, 97, 131, 255, 102, 141, 240, 255, 70, 88, 129, 255, 134, 125, 77, 182, 132, 124, 77, 165, 57, 56, 47, 36, 154, 144, 86, 219, 157, 146, 86, 207, 125, 116, 71, 127, 170, 158, 93, 227, 138, 129, 78, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 106, 106, 218, 88, 88, 88, 133, 0, 0, 0, 0, 78, 78, 78, 6, 110, 110, 110, 241, 77, 77, 77, 184, 104, 104, 104, 255, 100, 100, 100, 254, 62, 76, 114, 238, 109, 148, 247, 255, 117, 151, 240, 255, 120, 135, 162, 255, 140, 137, 108, 255, 185, 172, 100, 255, 195, 175, 109, 255, 162, 146, 122, 255, 197, 197, 232, 255, 210, 207, 233, 255, 216, 211, 233, 255, 208, 205, 232, 255, 206, 206, 235, 255, 216, 211, 233, 255, 212, 208, 233, 255, 199, 199, 233, 255, 163, 145, 117, 255, 196, 174, 112, 255, 198, 183, 106, 255, 138, 134, 99, 255, 127, 138, 152, 255, 114, 147, 230, 255, 110, 149, 247, 255, 68, 87, 133, 246, 139, 130, 77, 240, 184, 171, 99, 255, 98, 92, 59, 189, 181, 168, 97, 255, 53, 52, 49, 39, 0, 0, 0, 0, 81, 77, 55, 84, 172, 160, 93, 253, 112, 112, 112, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 67, 67, 56, 112, 112, 112, 238, 106, 106, 106, 212, 73, 73, 73, 95, 56, 56, 56, 43, 119, 119, 119, 251, 127, 127, 127, 255, 80, 80, 80, 194, 97, 97, 97, 246, 62, 78, 119, 213, 113, 151, 247, 255, 124, 158, 245, 255, 116, 140, 200, 255, 138, 143, 140, 255, 193, 179, 105, 255, 205, 186, 142, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 253, 253, 255, 253, 253, 253, 255, 255, 254, 254, 255, 248, 235, 235, 255, 254, 254, 254, 255, 210, 210, 210, 255, 218, 218, 218, 255, 255, 255, 255, 255, 224, 207, 176, 255, 201, 187, 108, 255, 143, 144, 128, 255, 116, 138, 190, 255, 123, 156, 241, 255, 114, 152, 248, 255, 69, 90, 143, 229, 136, 127, 78, 203, 121, 113, 70, 200, 184, 170, 99, 254, 202, 187, 108, 255, 83, 79, 55, 86, 89, 84, 59, 68, 144, 134, 81, 193, 185, 172, 100, 255, 96, 91, 63, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 35, 115, 115, 115, 246, 100, 100, 100, 198, 95, 95, 95, 164, 117, 117, 117, 252, 105, 105, 105, 249, 105, 105, 105, 199, 115, 115, 115, 240, 94, 94, 94, 196, 163, 163, 163, 6, 64, 81, 125, 194, 116, 153, 248, 255, 110, 139, 212, 255, 120, 135, 166, 255, 118, 133, 165, 255, 164, 153, 95, 255, 205, 186, 142, 255, 255, 255, 255, 255, 37, 37, 37, 255, 1, 1, 1, 255, 120, 120, 120, 255, 255, 255, 255, 255, 248, 236, 236, 255, 82, 82, 82, 255, 77, 77, 77, 255, 33, 33, 33, 255, 165, 165, 165, 255, 224, 207, 176, 255, 184, 171, 99, 255, 110, 123, 150, 255, 125, 140, 168, 255, 105, 131, 197, 255, 117, 154, 248, 255, 71, 91, 143, 229, 180, 180, 180, 4, 124, 116, 73, 149, 181, 168, 98, 250, 155, 145, 89, 197, 159, 148, 87, 242, 181, 169, 98, 252, 145, 135, 81, 181, 145, 136, 83, 179, 182, 169, 98, 253, 89, 84, 57, 73, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 84, 84, 84, 120, 108, 108, 108, 231, 69, 69, 69, 6, 0, 0, 0, 0, 92, 92, 92, 153, 102, 102, 102, 198, 0, 0, 0, 0, 60, 60, 60, 54, 119, 119, 119, 255, 46, 46, 46, 56, 64, 81, 125, 194, 117, 154, 248, 255, 123, 154, 234, 255, 124, 139, 169, 255, 160, 153, 106, 255, 188, 174, 101, 255, 205, 186, 142, 255, 255, 255, 255, 255, 104, 104, 104, 255, 35, 35, 35, 255, 177, 177, 177, 255, 255, 255, 255, 255, 203, 192, 192, 255, 100, 100, 100, 255, 255, 255, 255, 255, 222, 222, 222, 255, 60, 60, 60, 255, 224, 207, 176, 255, 193, 179, 103, 255, 166, 157, 100, 255, 128, 140, 159, 255, 120, 150, 225, 255, 119, 155, 248, 255, 71, 92, 143, 229, 88, 88, 88, 10, 171, 159, 93, 252, 92, 87, 59, 102, 0, 0, 0, 0, 138, 129, 81, 153, 154, 144, 88, 202, 153, 153, 153, 0, 221, 221, 221, 0, 150, 139, 84, 190, 144, 135, 81, 165, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79, 79, 79, 150, 112, 112, 112, 240, 50, 50, 50, 20, 136, 136, 136, 1, 95, 96, 97, 177, 91, 100, 127, 204, 83, 120, 235, 47, 63, 88, 167, 69, 103, 109, 131, 255, 49, 50, 53, 56, 61, 78, 121, 194, 118, 154, 248, 255, 98, 113, 145, 255, 135, 144, 156, 255, 123, 140, 179, 255, 155, 150, 112, 255, 205, 186, 142, 255, 243, 243, 243, 255, 18, 18, 18, 255, 63, 63, 63, 255, 65, 65, 65, 255, 255, 255, 255, 255, 210, 199, 199, 255, 120, 120, 120, 255, 255, 255, 255, 255, 241, 241, 241, 255, 77, 77, 77, 255, 224, 207, 176, 255, 171, 161, 105, 255, 120, 136, 176, 255, 134, 144, 160, 255, 105, 117, 139, 255, 114, 149, 237, 255, 68, 88, 138, 226, 93, 93, 93, 10, 153, 147, 107, 251, 65, 79, 118, 108, 83, 120, 235, 47, 114, 118, 117, 164, 150, 142, 93, 216, 90, 90, 90, 8, 56, 56, 56, 5, 155, 145, 88, 209, 140, 130, 79, 195, 95, 95, 95, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 134, 134, 134, 6, 92, 92, 92, 240, 110, 110, 110, 242, 111, 111, 111, 233, 105, 105, 105, 215, 91, 107, 158, 255, 160, 162, 142, 255, 206, 192, 114, 255, 206, 192, 114, 255, 187, 179, 126, 255, 66, 106, 237, 20, 53, 70, 111, 180, 117, 154, 248, 255, 130, 163, 248, 255, 123, 144, 193, 255, 139, 135, 101, 255, 162, 154, 105, 255, 205, 186, 142, 255, 148, 148, 148, 255, 114, 114, 114, 255, 206, 206, 206, 255, 49, 49, 49, 255, 206, 206, 206, 255, 245, 234, 234, 255, 59, 59, 59, 255, 250, 250, 250, 255, 172, 172, 172, 255, 136, 136, 136, 255, 224, 207, 176, 255, 170, 161, 106, 255, 142, 137, 96, 255, 123, 140, 176, 255, 131, 164, 247, 255, 119, 155, 248, 255, 61, 81, 131, 211, 0, 0, 0, 0, 171, 169, 140, 219, 206, 192, 114, 255, 206, 192, 114, 255, 203, 190, 116, 255, 119, 133, 161, 255, 161, 150, 89, 224, 161, 150, 90, 223, 177, 165, 97, 247, 158, 147, 87, 248, 38, 38, 35, 42, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 146, 146, 146, 6, 47, 47, 47, 22, 83, 83, 83, 122, 91, 91, 91, 139, 23, 63, 194, 182, 128, 138, 149, 255, 121, 118, 89, 255, 152, 146, 100, 255, 182, 173, 114, 255, 66, 106, 234, 42, 47, 60, 93, 160, 116, 153, 248, 255, 106, 133, 202, 255, 118, 131, 157, 255, 130, 151, 205, 255, 151, 149, 120, 255, 205, 185, 142, 255, 126, 126, 126, 255, 183, 183, 183, 255, 255, 255, 255, 255, 158, 158, 158, 255, 180, 180, 180, 255, 236, 225, 225, 255, 94, 94, 94, 255, 216, 216, 216, 255, 140, 140, 140, 255, 144, 144, 144, 255, 224, 207, 176, 255, 166, 159, 110, 255, 128, 150, 203, 255, 122, 137, 165, 255, 101, 125, 184, 255, 117, 154, 248, 255, 57, 74, 118, 191, 163, 183, 250, 0, 176, 173, 136, 234, 209, 194, 112, 255, 155, 150, 113, 255, 186, 179, 126, 255, 17, 62, 211, 193, 127, 119, 75, 130, 129, 121, 76, 134, 64, 62, 48, 39, 130, 130, 130, 5, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 62, 240, 146, 101, 123, 178, 255, 104, 112, 122, 255, 67, 90, 156, 255, 183, 173, 113, 255, 114, 134, 184, 82, 28, 33, 45, 121, 111, 149, 245, 255, 125, 160, 248, 255, 119, 142, 199, 255, 131, 129, 103, 255, 149, 143, 101, 255, 203, 182, 138, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 238, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 222, 202, 171, 255, 158, 151, 103, 255, 135, 130, 95, 255, 119, 138, 183, 255, 126, 160, 247, 255, 114, 152, 248, 255, 42, 54, 82, 152, 70, 110, 242, 22, 190, 182, 124, 255, 209, 194, 112, 255, 154, 150, 113, 255, 149, 154, 149, 255, 8, 62, 240, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 241, 134, 52, 90, 208, 255, 151, 147, 112, 255, 207, 193, 111, 255, 151, 146, 107, 255, 154, 159, 152, 148, 36, 36, 36, 56, 85, 115, 192, 255, 118, 153, 242, 255, 104, 126, 182, 255, 125, 150, 214, 255, 150, 148, 118, 255, 201, 185, 107, 255, 206, 181, 122, 255, 215, 191, 142, 255, 211, 188, 135, 255, 206, 182, 122, 255, 208, 185, 137, 255, 209, 180, 138, 255, 203, 179, 121, 255, 207, 184, 130, 255, 211, 188, 140, 255, 210, 186, 129, 255, 203, 184, 108, 255, 163, 156, 107, 255, 124, 148, 211, 255, 107, 130, 185, 255, 113, 146, 231, 255, 99, 133, 221, 255, 24, 25, 27, 87, 119, 137, 182, 88, 178, 167, 102, 255, 209, 194, 112, 255, 136, 133, 101, 255, 102, 123, 177, 255, 10, 64, 241, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 81, 242, 50, 37, 84, 237, 91, 141, 142, 122, 254, 60, 85, 156, 255, 105, 119, 147, 255, 157, 155, 127, 231, 82, 119, 237, 6, 55, 71, 113, 207, 115, 152, 248, 255, 117, 149, 230, 255, 94, 101, 108, 255, 131, 140, 149, 255, 145, 140, 102, 255, 144, 145, 128, 255, 172, 161, 96, 255, 132, 131, 109, 255, 158, 152, 110, 255, 150, 160, 181, 255, 151, 161, 181, 255, 153, 151, 123, 255, 137, 135, 111, 255, 185, 172, 100, 255, 129, 132, 123, 255, 154, 145, 89, 255, 124, 136, 157, 255, 105, 109, 104, 255, 110, 139, 213, 255, 116, 153, 248, 255, 60, 81, 132, 230, 66, 66, 66, 8, 161, 163, 147, 177, 91, 105, 136, 255, 63, 87, 156, 255, 118, 123, 118, 255, 100, 125, 192, 122, 31, 80, 242, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 148, 142, 188, 149, 142, 98, 255, 205, 191, 110, 255, 198, 184, 107, 255, 124, 140, 178, 99, 32, 33, 34, 54, 73, 97, 159, 246, 119, 155, 247, 255, 129, 162, 247, 255, 116, 141, 207, 255, 117, 134, 171, 255, 121, 140, 190, 255, 129, 140, 158, 255, 114, 128, 163, 255, 160, 179, 228, 255, 177, 198, 251, 255, 178, 198, 251, 255, 169, 189, 241, 255, 108, 120, 151, 255, 139, 152, 181, 255, 113, 129, 167, 255, 127, 146, 191, 255, 107, 129, 185, 255, 131, 164, 248, 255, 120, 155, 246, 255, 82, 110, 180, 253, 27, 29, 36, 77, 95, 123, 207, 42, 112, 121, 132, 251, 156, 153, 121, 255, 205, 190, 110, 255, 149, 148, 123, 240, 65, 106, 241, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 132, 190, 70, 168, 161, 112, 255, 169, 163, 115, 255, 63, 87, 156, 255, 145, 145, 123, 229, 70, 108, 230, 17, 34, 34, 35, 56, 58, 74, 113, 207, 87, 112, 176, 255, 117, 146, 221, 255, 135, 165, 241, 255, 147, 176, 249, 255, 154, 181, 250, 255, 159, 184, 250, 255, 162, 187, 250, 255, 164, 189, 250, 255, 165, 189, 250, 255, 163, 187, 250, 255, 159, 185, 250, 255, 154, 181, 250, 255, 148, 176, 249, 255, 137, 167, 243, 255, 120, 149, 225, 255, 91, 117, 183, 255, 61, 78, 123, 216, 30, 32, 36, 74, 119, 149, 247, 1, 140, 145, 142, 186, 152, 144, 95, 255, 105, 119, 147, 255, 80, 95, 129, 255, 146, 154, 159, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, 202, 251, 0, 130, 137, 139, 184, 77, 96, 145, 255, 188, 176, 110, 255, 137, 137, 115, 255, 140, 147, 148, 173, 143, 168, 248, 3, 170, 170, 170, 0, 43, 43, 43, 35, 27, 27, 27, 82, 21, 22, 24, 103, 53, 61, 84, 156, 85, 101, 142, 237, 136, 163, 231, 255, 150, 178, 250, 255, 152, 179, 250, 255, 152, 179, 250, 255, 150, 178, 250, 255, 141, 168, 238, 255, 90, 107, 151, 243, 57, 67, 92, 165, 24, 25, 29, 108, 25, 25, 25, 85, 43, 43, 43, 43, 96, 96, 96, 1, 0, 0, 0, 0, 128, 142, 170, 116, 133, 136, 128, 255, 92, 102, 117, 255, 162, 157, 118, 255, 170, 165, 125, 237, 70, 109, 231, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 117, 207, 34, 162, 158, 121, 241, 137, 134, 101, 255, 92, 110, 154, 255, 140, 135, 97, 255, 139, 149, 162, 147, 132, 159, 248, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 46, 46, 9, 38, 43, 54, 125, 97, 118, 172, 248, 138, 169, 249, 255, 138, 169, 249, 255, 106, 129, 188, 253, 40, 46, 62, 141, 43, 43, 43, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 144, 180, 95, 175, 167, 113, 253, 98, 105, 116, 255, 137, 139, 125, 255, 149, 148, 120, 255, 125, 141, 178, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 138, 176, 87, 113, 115, 104, 254, 120, 128, 136, 255, 208, 193, 112, 255, 196, 186, 121, 254, 96, 125, 212, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 27, 29, 61, 85, 108, 165, 244, 95, 120, 185, 251, 32, 34, 40, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 98, 241, 17, 172, 170, 137, 236, 209, 194, 112, 255, 209, 194, 112, 255, 139, 133, 90, 255, 142, 149, 155, 162, 197, 210, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, 147, 169, 120, 202, 190, 116, 255, 197, 186, 119, 255, 161, 163, 143, 249, 127, 143, 177, 99, 204, 216, 252, 0, 80, 114, 217, 55, 91, 127, 245, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 35, 47, 98, 41, 49, 68, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 149, 247, 0, 78, 112, 218, 55, 159, 180, 249, 3, 132, 146, 171, 117, 162, 164, 142, 251, 182, 176, 129, 255, 209, 194, 112, 255, 158, 162, 149, 190, 77, 116, 244, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 75, 241, 20, 69, 102, 201, 231, 170, 168, 136, 255, 209, 194, 112, 255, 202, 190, 116, 255, 146, 154, 158, 174, 183, 177, 130, 246, 169, 167, 138, 220, 145, 153, 162, 125, 77, 111, 218, 44, 132, 159, 248, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, 229, 253, 1, 70, 108, 232, 32, 134, 147, 168, 107, 131, 138, 142, 200, 193, 183, 119, 255, 141, 150, 161, 206, 206, 192, 114, 255, 209, 194, 112, 255, 173, 171, 134, 255, 105, 126, 177, 252, 28, 78, 241, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 113, 204, 62, 185, 178, 130, 248, 209, 194, 112, 255, 209, 194, 112, 255, 209, 194, 112, 255, 174, 171, 133, 255, 128, 135, 136, 255, 104, 112, 124, 255, 128, 126, 100, 255, 165, 158, 109, 255, 129, 134, 131, 243, 166, 165, 138, 202, 168, 168, 143, 185, 163, 163, 141, 182, 153, 154, 136, 199, 151, 151, 129, 235, 145, 141, 107, 255, 104, 114, 130, 255, 110, 111, 94, 255, 192, 179, 106, 255, 176, 172, 132, 255, 209, 194, 112, 255, 209, 194, 112, 255, 209, 194, 112, 255, 184, 178, 129, 238, 88, 118, 210, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 132, 189, 59, 180, 176, 133, 231, 209, 194, 112, 255, 209, 194, 112, 255, 173, 170, 134, 255, 82, 100, 144, 255, 184, 171, 103, 255, 148, 145, 109, 255, 133, 139, 135, 255, 107, 113, 119, 255, 100, 114, 147, 255, 206, 191, 110, 255, 84, 97, 129, 255, 170, 163, 114, 255, 81, 100, 152, 255, 160, 150, 94, 255, 168, 162, 116, 255, 55, 79, 149, 255, 138, 133, 97, 255, 181, 175, 129, 255, 204, 191, 115, 255, 209, 194, 112, 255, 172, 171, 139, 217, 102, 128, 201, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 115, 225, 23, 154, 159, 154, 162, 195, 185, 121, 253, 71, 103, 201, 218, 144, 148, 141, 210, 123, 125, 111, 255, 151, 150, 124, 255, 89, 107, 153, 255, 63, 84, 144, 255, 165, 159, 112, 255, 154, 145, 94, 255, 67, 86, 137, 255, 170, 164, 115, 255, 109, 120, 141, 255, 150, 145, 108, 255, 206, 191, 111, 255, 107, 115, 122, 255, 139, 141, 128, 224, 78, 109, 197, 209, 181, 176, 131, 246, 143, 152, 162, 135, 70, 110, 241, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 121, 206, 44, 91, 120, 204, 62, 164, 184, 250, 1, 87, 118, 209, 52, 149, 156, 159, 133, 133, 138, 137, 190, 141, 143, 130, 236, 132, 136, 132, 255, 137, 135, 109, 255, 158, 154, 119, 255, 126, 133, 135, 255, 172, 170, 135, 238, 159, 160, 139, 195, 152, 158, 155, 140, 94, 122, 201, 62, 131, 158, 248, 4, 52, 94, 227, 41, 80, 116, 227, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 195, 250, 7, 71, 112, 244, 21, 70, 111, 244, 22, 165, 185, 250, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 146, 146, 146, 86, 137, 137, 137, 132, 135, 135, 135, 139, 135, 135, 135, 139, 135, 135, 135, 139, 140, 140, 140, 137, 141, 141, 141, 108, 150, 150, 150, 38, 0, 0, 0, 0, 0, 0, 0, 0, 144, 144, 144, 59, 140, 140, 140, 123, 135, 135, 135, 139, 135, 135, 135, 139, 138, 138, 138, 128, 147, 147, 147, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 142, 142, 71, 138, 138, 138, 128, 135, 135, 135, 139, 138, 138, 138, 128, 140, 140, 140, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 148, 148, 64, 139, 139, 139, 158, 141, 141, 141, 191, 141, 141, 141, 177, 141, 141, 141, 168, 143, 143, 143, 88, 161, 161, 161, 21, 146, 146, 146, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145, 145, 145, 68, 135, 135, 135, 255, 139, 139, 139, 208, 146, 146, 146, 69, 146, 146, 146, 82, 138, 138, 138, 193, 136, 136, 136, 253, 142, 142, 142, 131, 231, 231, 231, 0, 0, 0, 0, 0, 156, 156, 156, 16, 137, 137, 137, 244, 135, 135, 135, 255, 150, 150, 150, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 157, 157, 38, 137, 137, 137, 252, 152, 152, 152, 34, 0, 0, 0, 0, 0, 0, 0, 0, 157, 157, 157, 10, 140, 140, 140, 168, 137, 137, 137, 226, 145, 145, 145, 76, 198, 198, 198, 3, 0, 0, 0, 0, 161, 161, 161, 11, 140, 140, 140, 116, 137, 137, 137, 250, 139, 139, 139, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 35, 135, 135, 135, 255, 140, 140, 140, 181, 0, 0, 0, 0, 0, 0, 0, 0, 161, 161, 161, 8, 137, 137, 137, 221, 135, 135, 135, 255, 146, 146, 146, 79, 0, 0, 0, 0, 0, 0, 0, 0, 137, 137, 137, 214, 135, 135, 135, 248, 217, 217, 217, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 141, 141, 228, 0, 0, 0, 0, 0, 0, 0, 0, 171, 171, 171, 1, 140, 140, 140, 177, 136, 136, 136, 245, 146, 146, 146, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 143, 143, 106, 140, 140, 140, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 179, 179, 35, 135, 135, 135, 255, 140, 140, 140, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 141, 141, 144, 135, 135, 135, 255, 140, 140, 140, 156, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 207, 135, 135, 135, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 142, 142, 227, 0, 0, 0, 0, 0, 0, 0, 0, 143, 143, 143, 87, 135, 135, 135, 255, 140, 140, 140, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 189, 189, 189, 2, 144, 144, 144, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 179, 179, 35, 135, 135, 135, 255, 140, 140, 140, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 142, 142, 139, 135, 135, 135, 255, 140, 140, 140, 153, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 207, 135, 135, 135, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 142, 142, 227, 0, 0, 0, 0, 0, 0, 0, 0, 139, 139, 139, 197, 135, 135, 135, 255, 148, 148, 148, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 151, 151, 151, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 179, 179, 35, 135, 135, 135, 255, 140, 140, 140, 181, 0, 0, 0, 0, 0, 0, 0, 0, 167, 167, 167, 5, 137, 137, 137, 211, 135, 135, 135, 255, 144, 144, 144, 73, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 207, 135, 135, 135, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 142, 142, 227, 0, 0, 0, 0, 172, 172, 172, 11, 136, 136, 136, 252, 135, 135, 135, 255, 177, 177, 177, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 179, 179, 35, 135, 135, 135, 255, 139, 139, 139, 212, 146, 146, 146, 84, 147, 147, 147, 83, 139, 139, 139, 187, 136, 136, 136, 251, 141, 141, 141, 129, 215, 215, 215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 207, 135, 135, 135, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 142, 142, 227, 0, 0, 0, 0, 160, 160, 160, 41, 135, 135, 135, 255, 138, 138, 138, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 179, 179, 35, 135, 135, 135, 255, 141, 141, 141, 194, 143, 143, 143, 69, 144, 144, 144, 97, 144, 144, 144, 86, 153, 153, 153, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 207, 135, 135, 135, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 142, 142, 227, 0, 0, 0, 0, 160, 160, 160, 36, 135, 135, 135, 255, 137, 137, 137, 255, 215, 215, 215, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 179, 179, 35, 135, 135, 135, 255, 140, 140, 140, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 137, 137, 207, 136, 136, 136, 250, 212, 212, 212, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 1, 141, 141, 141, 225, 0, 0, 0, 0, 175, 175, 175, 5, 137, 137, 137, 246, 135, 135, 135, 255, 157, 157, 157, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 179, 179, 35, 135, 135, 135, 255, 140, 140, 140, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 139, 139, 193, 135, 135, 135, 255, 165, 165, 165, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 169, 169, 23, 139, 139, 139, 204, 0, 0, 0, 0, 0, 0, 0, 0, 139, 139, 139, 175, 135, 135, 135, 255, 142, 142, 142, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 153, 153, 9, 190, 190, 190, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 179, 179, 35, 135, 135, 135, 255, 140, 140, 140, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 140, 140, 145, 135, 135, 135, 255, 144, 144, 144, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 143, 143, 87, 139, 139, 139, 149, 0, 0, 0, 0, 0, 0, 0, 0, 145, 145, 145, 49, 136, 136, 136, 251, 137, 137, 137, 216, 157, 157, 157, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, 188, 188, 6, 146, 146, 146, 138, 188, 188, 188, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 152, 152, 152, 40, 135, 135, 135, 255, 138, 138, 138, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, 149, 149, 34, 137, 137, 137, 242, 138, 138, 138, 202, 156, 156, 156, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145, 145, 145, 53, 138, 138, 138, 217, 150, 150, 150, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145, 145, 145, 108, 136, 136, 136, 254, 138, 138, 138, 188, 149, 149, 149, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 154, 154, 17, 146, 146, 146, 158, 150, 150, 150, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159, 159, 159, 96, 146, 146, 146, 186, 141, 141, 141, 255, 142, 142, 142, 250, 150, 150, 150, 130, 158, 158, 158, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 147, 147, 56, 138, 138, 138, 211, 137, 137, 137, 235, 141, 141, 141, 165, 141, 141, 141, 154, 139, 139, 139, 196, 139, 139, 139, 208, 145, 145, 145, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145, 145, 145, 73, 139, 139, 139, 208, 137, 137, 137, 249, 139, 139, 139, 187, 139, 139, 139, 156, 140, 140, 140, 174, 140, 140, 140, 161, 147, 147, 147, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 1, 223, 223, 223, 1, 223, 223, 223, 1, 223, 223, 223, 1, 223, 223, 223, 1, 224, 224, 224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 180, 180, 0, 159, 159, 159, 35, 148, 148, 148, 66, 148, 148, 148, 68, 159, 159, 159, 36, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 202, 202, 0, 158, 158, 158, 30, 147, 147, 147, 63, 150, 150, 150, 62, 162, 162, 162, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 75, 241, 115, 15, 68, 241, 141, 14, 67, 241, 133, 36, 84, 242, 38, 0, 0, 0, 0, 0, 0, 0, 0, 29, 78, 242, 75, 37, 85, 242, 45, 0, 0, 0, 0, 0, 0, 0, 0, 23, 74, 241, 38, 19, 71, 241, 140, 19, 71, 241, 138, 44, 90, 243, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 72, 241, 190, 96, 131, 246, 30, 61, 104, 244, 47, 12, 65, 241, 165, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64, 241, 116, 0, 56, 240, 59, 0, 0, 0, 0, 87, 124, 245, 7, 13, 66, 241, 187, 46, 92, 243, 14, 60, 103, 244, 17, 16, 69, 241, 189, 128, 156, 248, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 66, 241, 190, 20, 72, 241, 147, 11, 65, 241, 223, 41, 88, 242, 54, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64, 241, 116, 0, 56, 240, 59, 0, 0, 0, 0, 57, 100, 243, 22, 12, 66, 241, 167, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64, 241, 171, 57, 101, 243, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 72, 241, 194, 115, 146, 247, 4, 32, 81, 242, 72, 18, 70, 241, 134, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64, 241, 120, 9, 63, 241, 64, 0, 0, 0, 0, 0, 0, 0, 0, 23, 74, 241, 150, 18, 70, 241, 124, 18, 70, 241, 125, 20, 72, 241, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 128, 245, 36, 91, 127, 245, 5, 134, 161, 248, 5, 88, 125, 245, 36, 0, 0, 0, 0, 0, 0, 0, 0, 92, 128, 245, 25, 95, 130, 246, 16, 0, 0, 0, 0, 0, 0, 0, 0, 153, 176, 249, 0, 43, 90, 243, 31, 45, 92, 243, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 79, imgdata); + return image; +} + +static Ihandle* load_image_LogoLua(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 12, 64, 64, 64, 35, 64, 64, 64, 8, 0, 0, 0, 0, 64, 64, 64, 25, 64, 64, 64, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 60, 64, 64, 64, 130, 64, 64, 64, 27, 0, 0, 0, 0, 64, 64, 64, 96, 64, 64, 64, 100, 64, 64, 64, 16, 0, 0, 0, 0, 64, 64, 64, 86, 64, 64, 64, 127, 64, 64, 64, 22, 0, 0, 0, 0, 64, 64, 64, 107, 64, 64, 64, 63, 64, 64, 64, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 149, 5, 7, 7, 131, 108, 4, 4, 129, 199, 5, 5, 129, 236, 4, 4, 129, 222, 6, 6, 130, 158, 13, 13, 134, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 43, 64, 64, 64, 45, 0, 0, 0, 0, 64, 64, 64, 44, 64, 64, 64, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 13, 64, 64, 64, 77, 64, 64, 64, 6, 64, 64, 64, 3, 64, 64, 64, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 138, 15, 4, 4, 129, 199, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 247, 8, 8, 131, 82, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 66, 64, 64, 64, 106, 64, 64, 64, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 7, 64, 64, 64, 111, 64, 64, 64, 119, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 130, 171, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 247, 13, 13, 134, 39, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 9, 64, 64, 64, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 136, 41, 1, 1, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 6, 6, 130, 158, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 130, 64, 64, 64, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 132, 107, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 222, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22, 138, 42, 7, 7, 130, 100, 5, 5, 130, 143, 5, 5, 129, 172, 2, 2, 128, 183, 1, 1, 128, 182, 5, 5, 129, 171, 5, 5, 129, 141, 9, 9, 132, 99, 21, 21, 138, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 129, 118, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 5, 5, 129, 236, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 85, 64, 64, 64, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22, 138, 28, 8, 8, 131, 132, 4, 4, 129, 223, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 220, 7, 7, 131, 128, 21, 21, 138, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 132, 83, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 199, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22, 138, 19, 7, 7, 130, 149, 1, 1, 128, 250, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 247, 6, 6, 130, 143, 18, 18, 136, 16, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 149, 12, 2, 2, 128, 236, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 7, 7, 131, 108, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 132, 79, 2, 2, 128, 234, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 2, 2, 128, 230, 10, 10, 132, 73, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 133, 89, 0, 0, 127, 254, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 199, 43, 43, 149, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 11, 64, 64, 64, 154, 64, 64, 64, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 153, 1, 9, 9, 131, 134, 0, 0, 127, 254, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 254, 7, 7, 131, 124, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 133, 89, 2, 2, 128, 236, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 127, 255, 6, 6, 130, 171, 21, 21, 138, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 55, 64, 64, 64, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 153, 1, 3, 3, 129, 150, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 49, 49, 152, 255, 118, 118, 186, 255, 134, 134, 194, 255, 100, 100, 177, 255, 22, 22, 138, 255, 0, 0, 127, 255, 0, 0, 127, 255, 13, 13, 134, 149, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 149, 12, 10, 10, 132, 83, 4, 4, 129, 118, 9, 9, 132, 107, 19, 19, 136, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 131, 135, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 15, 15, 135, 255, 175, 175, 215, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 246, 250, 255, 113, 113, 184, 255, 0, 0, 127, 255, 0, 0, 127, 255, 7, 7, 131, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 133, 83, 0, 0, 127, 254, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 255, 195, 195, 225, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 113, 113, 184, 255, 0, 0, 127, 255, 1, 1, 128, 254, 10, 10, 132, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 47, 64, 64, 64, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 137, 21, 2, 2, 128, 236, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 99, 99, 177, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 246, 250, 255, 22, 22, 138, 255, 0, 0, 127, 255, 2, 2, 128, 230, 18, 18, 136, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 112, 64, 64, 64, 39, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 4, 64, 64, 64, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 129, 152, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 186, 186, 220, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 100, 100, 177, 255, 0, 0, 127, 255, 0, 0, 127, 255, 6, 6, 130, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 14, 64, 64, 64, 49, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 64, 64, 4, 64, 64, 64, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 23, 139, 33, 1, 1, 128, 251, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 220, 220, 237, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 134, 134, 194, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 247, 21, 21, 138, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 64, 64, 75, 64, 64, 64, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 130, 138, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 203, 203, 229, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 118, 118, 186, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 7, 7, 131, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 42, 64, 64, 64, 54, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 64, 64, 114, 64, 64, 64, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 191, 2, 3, 3, 129, 229, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 135, 135, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 49, 49, 152, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 12, 64, 64, 64, 128, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 135, 49, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 23, 23, 139, 255, 237, 237, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 175, 175, 215, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 21, 21, 138, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 35, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 64, 64, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 131, 109, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 60, 60, 157, 255, 237, 237, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 195, 195, 225, 255, 15, 15, 135, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 9, 9, 132, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 23, 64, 64, 64, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 129, 152, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 15, 15, 134, 255, 195, 195, 225, 255, 80, 80, 167, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 23, 23, 139, 255, 135, 135, 195, 255, 203, 203, 229, 255, 220, 220, 237, 255, 186, 186, 220, 255, 99, 99, 177, 255, 4, 4, 129, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 5, 5, 129, 141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 94, 64, 64, 64, 11, + 64, 64, 64, 34, 64, 64, 64, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 129, 181, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 19, 19, 137, 255, 255, 255, 255, 255, 105, 105, 180, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 5, 5, 129, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 100, 64, 64, 64, 35, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 128, 195, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 19, 19, 137, 255, 255, 255, 255, 255, 105, 105, 180, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 21, 64, 64, 64, 11, + 64, 64, 64, 9, 64, 64, 64, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 128, 195, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 19, 19, 137, 255, 255, 255, 255, 255, 105, 105, 180, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 53, 53, 154, 255, 106, 106, 180, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 11, 11, 132, 255, 120, 120, 187, 255, 28, 28, 141, 255, 0, 0, 127, 255, 0, 0, 127, 255, 38, 38, 146, 255, 138, 138, 196, 255, 176, 176, 216, 255, 169, 169, 212, 255, 112, 112, 183, 255, 9, 9, 131, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 2, 2, 128, 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 43, 64, 64, 64, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 129, 182, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 19, 19, 137, 255, 255, 255, 255, 255, 105, 105, 180, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 113, 113, 184, 255, 225, 225, 240, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 23, 23, 139, 255, 255, 255, 255, 255, 60, 60, 157, 255, 0, 0, 127, 255, 42, 42, 148, 255, 244, 244, 250, 255, 206, 206, 230, 255, 140, 140, 197, 255, 159, 159, 207, 255, 245, 245, 250, 255, 168, 168, 211, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 5, 5, 129, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 79, 64, 64, 64, 25, + 64, 64, 64, 20, 64, 64, 64, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 130, 154, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 19, 19, 137, 255, 255, 255, 255, 255, 105, 105, 180, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 113, 113, 184, 255, 225, 225, 240, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 23, 23, 139, 255, 255, 255, 255, 255, 60, 60, 157, 255, 0, 0, 127, 255, 125, 125, 190, 255, 228, 228, 241, 255, 7, 7, 130, 255, 0, 0, 127, 255, 0, 0, 127, 255, 116, 116, 185, 255, 237, 237, 246, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 5, 5, 130, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 122, 64, 64, 64, 12, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 131, 110, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 19, 19, 137, 255, 255, 255, 255, 255, 105, 105, 180, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 113, 113, 184, 255, 225, 225, 240, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 23, 23, 139, 255, 255, 255, 255, 255, 60, 60, 157, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 6, 6, 130, 255, 145, 145, 200, 255, 240, 240, 247, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 7, 7, 130, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 28, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 64, 64, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 136, 52, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 19, 19, 137, 255, 255, 255, 255, 255, 105, 105, 180, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 113, 113, 184, 255, 225, 225, 240, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 23, 23, 139, 255, 255, 255, 255, 255, 60, 60, 157, 255, 0, 0, 127, 255, 4, 4, 129, 255, 105, 105, 180, 255, 181, 181, 218, 255, 220, 220, 237, 255, 249, 249, 252, 255, 234, 234, 244, 255, 240, 240, 247, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 22, 22, 138, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 64, 64, 136, 64, 64, 64, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 85, 170, 2, 4, 4, 129, 232, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 19, 19, 137, 255, 255, 255, 255, 255, 105, 105, 180, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 113, 113, 184, 255, 225, 225, 240, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 27, 27, 141, 255, 255, 255, 255, 255, 60, 60, 157, 255, 0, 0, 127, 255, 145, 145, 200, 255, 240, 240, 248, 255, 115, 115, 185, 255, 53, 53, 154, 255, 15, 15, 135, 255, 98, 98, 176, 255, 240, 240, 247, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 4, 4, 129, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 9, 64, 64, 64, 104, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 64, 64, 65, 64, 64, 64, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 130, 141, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 19, 19, 137, 255, 255, 255, 255, 255, 105, 105, 180, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 113, 113, 184, 255, 229, 229, 242, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 76, 76, 165, 255, 255, 255, 255, 255, 60, 60, 157, 255, 0, 0, 127, 255, 227, 227, 241, 255, 132, 132, 193, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 111, 111, 183, 255, 240, 240, 247, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 8, 8, 131, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 73, 64, 64, 64, 69, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 136, 35, 1, 1, 127, 251, 0, 0, 127, 255, 0, 0, 127, 255, 19, 19, 137, 255, 255, 255, 255, 255, 169, 169, 212, 255, 109, 109, 182, 255, 109, 109, 182, 255, 109, 109, 182, 255, 109, 109, 182, 255, 109, 109, 182, 255, 18, 18, 136, 255, 93, 93, 174, 255, 255, 255, 255, 255, 79, 79, 167, 255, 0, 0, 127, 255, 34, 34, 144, 255, 208, 208, 231, 255, 253, 253, 254, 255, 60, 60, 157, 255, 0, 0, 127, 255, 205, 205, 230, 255, 188, 188, 221, 255, 11, 11, 132, 255, 1, 1, 128, 255, 71, 71, 163, 255, 233, 233, 244, 255, 245, 245, 250, 255, 5, 5, 129, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 250, 22, 22, 138, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 12, 64, 64, 64, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 50, 64, 64, 64, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 130, 159, 0, 0, 127, 255, 0, 0, 127, 255, 17, 17, 135, 255, 225, 225, 240, 255, 225, 225, 240, 255, 225, 225, 240, 255, 225, 225, 240, 255, 225, 225, 240, 255, 225, 225, 240, 255, 225, 225, 240, 255, 36, 36, 145, 255, 9, 9, 132, 255, 190, 190, 223, 255, 255, 255, 255, 255, 242, 242, 248, 255, 242, 242, 248, 255, 87, 87, 171, 255, 219, 219, 237, 255, 53, 53, 154, 255, 0, 0, 127, 255, 65, 65, 160, 255, 238, 238, 246, 255, 249, 249, 252, 255, 244, 244, 250, 255, 212, 212, 233, 255, 99, 99, 177, 255, 253, 253, 254, 255, 227, 227, 241, 255, 0, 0, 127, 255, 0, 0, 127, 255, 7, 7, 130, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 4, 64, 64, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 53, 64, 64, 64, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 135, 24, 1, 1, 128, 238, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 40, 40, 147, 255, 56, 56, 155, 255, 13, 13, 134, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 10, 10, 132, 255, 54, 54, 154, 255, 43, 43, 149, 255, 1, 1, 128, 255, 0, 0, 127, 255, 36, 36, 145, 255, 46, 46, 150, 255, 0, 0, 127, 255, 2, 2, 128, 234, 22, 22, 138, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 106, 64, 64, 64, 41, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 133, 90, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 254, 9, 9, 132, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 130, 143, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 9, 9, 131, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 106, 64, 64, 64, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 68, 161, 3, 6, 6, 130, 162, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 3, 3, 129, 150, 51, 51, 153, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 33, 64, 64, 64, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 12, 64, 64, 64, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 68, 161, 3, 7, 7, 130, 143, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 254, 8, 8, 131, 135, 51, 51, 153, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 4, 64, 64, 64, 154, 64, 64, 64, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 133, 90, 1, 1, 128, 238, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 2, 2, 128, 236, 11, 11, 133, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 2, 64, 64, 64, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 19, 64, 64, 64, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 135, 24, 6, 6, 130, 159, 1, 1, 127, 251, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 1, 1, 128, 251, 5, 5, 129, 152, 20, 20, 137, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 92, 64, 64, 64, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 136, 35, 6, 6, 130, 141, 4, 4, 129, 232, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 0, 0, 127, 255, 3, 3, 129, 229, 6, 6, 130, 138, 23, 23, 139, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 109, 64, 64, 64, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 1, 64, 64, 64, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 85, 170, 2, 17, 17, 136, 52, 7, 7, 131, 110, 5, 5, 130, 154, 5, 5, 129, 182, 2, 2, 128, 195, 3, 3, 128, 195, 5, 5, 129, 181, 5, 5, 129, 152, 8, 8, 131, 109, 16, 16, 135, 49, 128, 128, 191, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 25, 64, 64, 64, 153, 64, 64, 64, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 32, 64, 64, 64, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 12, 64, 64, 64, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 108, 64, 64, 64, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 118, 64, 64, 64, 97, 64, 64, 64, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 9, 64, 64, 64, 103, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 49, 64, 64, 64, 2, 64, 64, 64, 11, 64, 64, 64, 63, 64, 64, 64, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 6, 64, 64, 64, 35, 0, 0, 0, 0, 64, 64, 64, 54, 64, 64, 64, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 6, 64, 64, 64, 78, 64, 64, 64, 110, 0, 0, 0, 0, 64, 64, 64, 28, 64, 64, 64, 112, 64, 64, 64, 71, 0, 0, 0, 0, 64, 64, 64, 18, 64, 64, 64, 92, 64, 64, 64, 86, 0, 0, 0, 0, 64, 64, 64, 35, 64, 64, 64, 134, 64, 64, 64, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 23, 64, 64, 64, 33, 0, 0, 0, 0, 64, 64, 64, 11, 64, 64, 64, 42, 64, 64, 64, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_LogoPetrobras(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 204, 48, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 15, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 25, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 5, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 16, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 3, 0, 0, 0, 0, 0, 0, 0, 0, 222, 234, 226, 18, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 196, 172, 25, 76, 167, 124, 83, 52, 161, 113, 125, 60, 162, 116, 144, 68, 167, 122, 144, 60, 162, 115, 100, 105, 179, 142, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 24, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 8, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 32, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 44, 217, 231, 222, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 212, 195, 16, 91, 174, 135, 73, 41, 154, 103, 104, 64, 165, 119, 144, 61, 163, 116, 144, 50, 160, 111, 120, 95, 174, 135, 79, 188, 213, 197, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 111, 187, 152, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 251, 250, 255, 195, 225, 211, 255, 82, 174, 133, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 164, 211, 189, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 252, 255, 194, 224, 210, 255, 59, 164, 118, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 5, 142, 82, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 155, 104, 137, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 2, 141, 81, 252, 27, 149, 95, 249, 30, 151, 97, 199, 55, 158, 109, 107, 185, 211, 194, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 156, 104, 215, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 14, 145, 88, 255, 127, 189, 158, 38, 0, 0, 0, 0, 0, 0, 0, 0, 43, 156, 105, 143, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 16, 146, 89, 255, 131, 190, 160, 29, 0, 0, 0, 0, 0, 0, 0, 0, 42, 155, 104, 142, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 2, 141, 80, 251, 15, 144, 87, 249, 33, 153, 100, 236, 36, 153, 101, 175, 56, 160, 113, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 165, 120, 78, 33, 152, 99, 194, 9, 143, 84, 252, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 4, 141, 81, 253, 38, 154, 101, 195, 104, 178, 141, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 150, 96, 206, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 1, 141, 80, 250, 28, 149, 95, 249, 32, 152, 98, 209, 44, 155, 104, 127, 153, 197, 171, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 159, 111, 115, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 3, 141, 81, 253, 10, 143, 84, 249, 29, 151, 97, 237, 34, 152, 98, 186, 72, 166, 122, 101, 217, 231, 222, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 172, 131, 46, 15, 146, 88, 250, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 5, 142, 83, 255, 17, 147, 90, 251, 209, 226, 215, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 179, 143, 51, 41, 155, 103, 172, 15, 145, 88, 248, 1, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 19, 146, 89, 234, 65, 164, 118, 100, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 180, 219, 201, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 118, 190, 157, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 5, 142, 82, 255, 230, 242, 236, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 250, 248, 255, 55, 163, 115, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 149, 94, 209, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 38, 153, 100, 205, 116, 176, 142, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 190, 163, 26, 7, 142, 83, 252, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 24, 148, 92, 213, 227, 237, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 150, 95, 215, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 24, 148, 92, 204, 217, 231, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 153, 101, 223, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 63, 163, 117, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 175, 137, 32, 34, 151, 98, 190, 1, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 17, 146, 89, 246, 104, 178, 141, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 180, 145, 27, 6, 142, 83, 251, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 25, 149, 94, 215, 136, 185, 157, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 151, 96, 187, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 43, 155, 104, 169, 196, 218, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, 218, 204, 6, 29, 149, 95, 198, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 11, 144, 85, 255, 148, 190, 165, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 166, 127, 0, 55, 159, 111, 122, 8, 143, 83, 250, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 4, 141, 82, 255, 72, 167, 123, 92, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 10, 143, 84, 255, 245, 249, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 250, 247, 255, 24, 149, 94, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 54, 162, 113, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 190, 223, 208, 255, 1, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 180, 145, 29, 6, 142, 82, 252, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 51, 159, 109, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 167, 123, 103, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 51, 159, 110, 150, 0, 0, 0, 0, 0, 0, 0, 0, 124, 186, 155, 34, 6, 142, 82, 253, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 52, 159, 110, 142, 0, 0, 0, 0, 0, 0, 0, 0, 141, 190, 162, 32, 5, 141, 82, 254, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 17, 146, 88, 242, 152, 193, 168, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 177, 140, 67, 14, 145, 87, 234, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 33, 152, 99, 219, 192, 218, 202, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 166, 122, 104, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 66, 161, 116, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 193, 217, 202, 18, 18, 146, 89, 250, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 83, 255, 138, 197, 169, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 160, 113, 114, 1, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 42, 152, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 160, 112, 125, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 29, 151, 96, 212, 212, 228, 218, 1, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 72, 170, 126, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 197, 227, 213, 255, 83, 176, 135, 255, 83, 176, 135, 255, 83, 176, 135, 255, 85, 177, 137, 255, 183, 220, 203, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 66, 169, 124, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 127, 195, 164, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 152, 206, 182, 255, 83, 176, 135, 255, 83, 176, 135, 255, 83, 176, 135, 255, 103, 185, 149, 255, 214, 235, 225, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 250, 248, 255, 8, 143, 84, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 163, 117, 105, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 80, 243, 0, 140, 79, 240, 10, 144, 85, 253, 1, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 41, 155, 104, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 155, 103, 174, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 254, 0, 140, 79, 240, 0, 140, 79, 240, 0, 140, 79, 240, 0, 140, 79, 240, 0, 140, 79, 240, 0, 140, 79, 240, 0, 140, 79, 240, 1, 140, 79, 240, 76, 167, 124, 69, 0, 0, 0, 0, 0, 0, 0, 0, 73, 167, 123, 111, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 140, 80, 255, 84, 170, 129, 62, 0, 0, 0, 0, 0, 0, 0, 0, 65, 165, 120, 110, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 242, 0, 140, 79, 240, 0, 140, 79, 240, 6, 142, 83, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 18, 146, 89, 255, 136, 184, 155, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 164, 120, 46, 15, 145, 87, 242, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 80, 255, 21, 148, 92, 233, 20, 145, 89, 190, 20, 147, 91, 236, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 105, 179, 143, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 150, 96, 167, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 254, 0, 140, 79, 240, 0, 140, 79, 240, 6, 143, 83, 248, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 63, 161, 114, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 166, 122, 76, 1, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 245, 0, 140, 79, 240, 0, 140, 79, 240, 8, 143, 84, 254, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 134, 196, 167, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 167, 125, 30, 15, 146, 88, 245, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 121, 188, 156, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 161, 115, 37, 7, 142, 83, 249, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 32, 152, 99, 202, 48, 156, 106, 141, 34, 151, 98, 152, 10, 143, 84, 242, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 24, 148, 93, 255, 139, 186, 157, 6, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 146, 203, 177, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 109, 187, 152, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 37, 153, 101, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 64, 168, 122, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 200, 228, 215, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 254, 255, 44, 158, 107, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 74, 172, 129, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 252, 251, 255, 9, 144, 85, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 149, 94, 170, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 15, 145, 88, 247, 170, 203, 182, 13, 0, 0, 0, 0, 190, 215, 200, 32, 58, 159, 112, 95, 6, 142, 82, 251, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 43, 155, 105, 186, 0, 0, 0, 0, 0, 0, 0, 0, 215, 230, 221, 10, 21, 148, 92, 238, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 34, 153, 100, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 165, 122, 83, 43, 153, 102, 135, 43, 153, 102, 135, 43, 153, 102, 135, 43, 153, 102, 135, 27, 150, 95, 237, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 12, 144, 86, 242, 44, 153, 102, 136, 43, 153, 102, 135, 43, 153, 102, 135, 43, 153, 102, 135, 52, 156, 107, 130, 176, 206, 187, 8, 0, 0, 0, 0, 0, 0, 0, 0, 39, 154, 102, 181, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 17, 146, 89, 243, 157, 197, 172, 12, 0, 0, 0, 0, 0, 0, 0, 0, 119, 184, 152, 44, 16, 146, 89, 218, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 23, 149, 93, 229, 214, 229, 220, 5, 0, 0, 0, 0, 0, 0, 0, 0, 158, 202, 178, 17, 29, 150, 96, 225, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 9, 144, 85, 252, 63, 162, 116, 111, 201, 221, 208, 7, 0, 0, 0, 0, 155, 200, 176, 12, 35, 152, 99, 194, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 44, 157, 107, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 208, 189, 7, 22, 148, 92, 238, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 30, 151, 97, 197, 0, 0, 0, 0, 0, 0, 0, 0, 207, 225, 214, 18, 50, 157, 108, 137, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 8, 142, 83, 252, 115, 184, 151, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 158, 108, 154, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 83, 253, 113, 181, 146, 35, 0, 0, 0, 0, 0, 0, 0, 0, 160, 203, 180, 42, 27, 148, 93, 194, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 12, 144, 86, 248, 131, 187, 157, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 189, 163, 1, 33, 151, 98, 181, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 71, 162, 117, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 153, 100, 151, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 23, 147, 91, 230, 164, 202, 179, 3, 0, 0, 0, 0, 0, 0, 0, 0, 37, 151, 98, 113, 0, 140, 79, 235, 0, 140, 79, 235, 0, 140, 79, 235, 0, 140, 79, 235, 23, 148, 92, 235, 135, 184, 154, 5, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 220, 237, 228, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 254, 253, 255, 39, 156, 104, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 106, 184, 148, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 249, 247, 255, 20, 148, 91, 255, 0, 140, 79, 255, 0, 140, 79, 255, 23, 149, 93, 255, 252, 253, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 225, 240, 232, 255, 5, 142, 82, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 107, 186, 150, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 214, 234, 224, 255, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 201, 180, 8, 20, 147, 90, 239, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 34, 153, 100, 194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 218, 204, 3, 23, 148, 92, 241, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 47, 158, 108, 137, 0, 0, 0, 0, 0, 0, 0, 0, 94, 174, 135, 61, 3, 141, 81, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 49, 158, 108, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 203, 181, 13, 16, 145, 88, 243, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 40, 155, 103, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 211, 194, 4, 19, 147, 90, 242, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 30, 151, 97, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 151, 98, 179, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 30, 150, 96, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 156, 105, 139, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 68, 165, 120, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 165, 122, 85, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 57, 161, 114, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 171, 130, 61, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 38, 153, 100, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 155, 103, 137, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 42, 155, 104, 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 151, 97, 225, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 22, 147, 91, 211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 162, 114, 153, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 30, 150, 96, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 168, 124, 100, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 45, 157, 106, 240, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 50, 161, 112, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 235, 228, 2, 28, 150, 96, 226, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 82, 255, 43, 156, 105, 148, 99, 174, 136, 45, 217, 231, 222, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 39, 155, 104, 255, 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 251, 250, 255, 167, 212, 191, 255, 164, 211, 190, 255, 164, 211, 190, 255, 164, 211, 190, 255, 187, 222, 206, 255, 251, 253, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 137, 199, 171, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 94, 179, 141, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 158, 209, 186, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 12, 144, 86, 255, 82, 174, 132, 255, 236, 245, 241, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 113, 188, 154, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 167, 123, 63, 1, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 47, 156, 106, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 163, 118, 91, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 80, 253, 99, 175, 137, 57, 0, 0, 0, 0, 0, 0, 0, 0, 37, 153, 101, 127, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 35, 151, 98, 205, 32, 149, 96, 180, 32, 149, 96, 180, 32, 149, 96, 180, 32, 149, 96, 180, 32, 149, 96, 180, 37, 151, 98, 179, 180, 208, 190, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 174, 134, 78, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 57, 161, 113, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 171, 131, 67, 1, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 50, 157, 108, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 178, 140, 88, 11, 144, 85, 250, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 11, 143, 85, 240, 83, 168, 126, 30, 0, 0, 0, 0, 0, 0, 0, 0, 110, 174, 137, 16, 15, 145, 88, 250, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 32, 151, 97, 192, 161, 197, 174, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 181, 148, 69, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 59, 163, 117, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 159, 110, 137, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 74, 163, 119, 125, 73, 161, 117, 80, 50, 154, 105, 80, 38, 154, 102, 145, 10, 143, 85, 253, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 20, 145, 89, 203, 119, 181, 149, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, 191, 161, 47, 5, 142, 82, 254, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 42, 156, 105, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 168, 126, 49, 16, 146, 89, 237, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 83, 252, 83, 170, 128, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 178, 142, 21, 13, 144, 86, 231, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 20, 147, 91, 219, 79, 173, 131, 155, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 67, 165, 120, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 232, 223, 8, 35, 155, 102, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 5, 142, 82, 255, 28, 151, 96, 233, 34, 151, 98, 157, 77, 169, 126, 83, 174, 206, 186, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 111, 188, 154, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 254, 255, 163, 210, 188, 255, 7, 142, 83, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 167, 213, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 250, 248, 255, 235, 246, 241, 255, 235, 246, 241, 255, 235, 246, 241, 255, 243, 249, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 187, 221, 205, 255, 6, 142, 83, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 157, 106, 140, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 30, 151, 98, 128, 0, 140, 79, 85, 11, 145, 86, 90, 41, 155, 104, 151, 8, 142, 83, 245, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 25, 148, 93, 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 150, 96, 202, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 25, 148, 93, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 156, 105, 148, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 83, 255, 121, 183, 150, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 153, 100, 135, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 13, 145, 88, 207, 0, 140, 79, 185, 0, 140, 79, 185, 30, 151, 98, 233, 4, 141, 81, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 10, 144, 85, 252, 76, 170, 127, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 157, 107, 113, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 71, 165, 121, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 165, 121, 96, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 60, 161, 114, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 149, 94, 203, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 45, 156, 106, 178, 129, 187, 157, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 159, 110, 112, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 5, 141, 81, 209, 0, 140, 79, 185, 0, 140, 79, 185, 28, 151, 96, 222, 4, 141, 81, 250, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 81, 253, 72, 166, 121, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 1, 41, 154, 103, 166, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 71, 165, 120, 86, 8, 144, 85, 99, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 25, 147, 91, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 227, 237, 231, 1, 28, 150, 96, 200, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 25, 149, 93, 226, 76, 169, 125, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 184, 221, 204, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 240, 246, 243, 255, 53, 161, 112, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 4, 141, 81, 255, 236, 245, 240, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 254, 253, 255, 159, 209, 186, 255, 13, 144, 86, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 147, 91, 205, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 11, 143, 85, 244, 110, 180, 145, 52, 0, 0, 0, 0, 0, 0, 0, 0, 117, 182, 148, 23, 8, 143, 84, 250, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 41, 155, 103, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 211, 194, 1, 26, 149, 95, 216, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 27, 150, 95, 217, 207, 225, 214, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 150, 95, 209, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 4, 141, 81, 255, 28, 150, 95, 195, 91, 173, 133, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 150, 96, 196, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 18, 146, 89, 239, 156, 197, 172, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 155, 103, 156, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 82, 255, 142, 192, 165, 34, 0, 0, 0, 0, 0, 0, 0, 0, 130, 190, 160, 28, 12, 144, 86, 253, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 28, 150, 95, 224, 117, 183, 149, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 150, 96, 180, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 27, 149, 95, 210, 75, 168, 124, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 170, 128, 78, 5, 142, 82, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 24, 147, 92, 188, 117, 174, 140, 1, 0, 140, 79, 95, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 46, 159, 109, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 177, 139, 69, 18, 146, 89, 249, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 9, 143, 84, 253, 86, 171, 130, 71, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 14, 145, 87, 255, 244, 249, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 251, 249, 255, 182, 219, 201, 255, 182, 219, 201, 255, 182, 219, 201, 255, 186, 220, 204, 255, 228, 241, 235, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 222, 239, 231, 255, 12, 144, 86, 255, 0, 140, 79, 255, 0, 140, 79, 255, 60, 165, 118, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 207, 230, 219, 255, 27, 150, 96, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 184, 151, 30, 10, 143, 85, 254, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 12, 144, 86, 245, 48, 152, 102, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 166, 121, 97, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 78, 166, 123, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130, 186, 155, 35, 6, 142, 82, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 44, 155, 104, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 184, 152, 28, 8, 142, 83, 252, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 80, 255, 30, 150, 96, 202, 116, 188, 155, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 147, 91, 250, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 25, 149, 94, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 174, 137, 5, 20, 147, 90, 231, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 28, 150, 95, 199, 198, 218, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 165, 121, 99, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 33, 153, 100, 255, 39, 156, 105, 255, 37, 155, 103, 255, 18, 146, 89, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 40, 154, 102, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 197, 174, 11, 16, 145, 88, 242, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 29, 150, 96, 224, 63, 159, 112, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, 182, 152, 9, 17, 146, 88, 222, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 81, 250, 97, 176, 138, 60, 0, 0, 0, 0, 0, 140, 79, 95, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 40, 154, 102, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 180, 143, 45, 44, 156, 106, 178, 13, 144, 86, 251, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 36, 153, 101, 174, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 78, 172, 130, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 187, 221, 205, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 15, 145, 88, 255, 233, 244, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 72, 171, 127, 255, 0, 140, 79, 255, 0, 140, 79, 255, 132, 197, 168, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 171, 216, 195, 255, 104, 187, 151, 255, 104, 187, 151, 255, 118, 191, 158, 255, 189, 223, 208, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 161, 210, 188, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 160, 112, 101, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 82, 255, 37, 154, 102, 188, 105, 178, 141, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 150, 96, 160, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 11, 144, 85, 251, 90, 174, 135, 112, 83, 171, 130, 104, 83, 171, 130, 104, 83, 171, 130, 104, 83, 171, 130, 104, 83, 171, 130, 104, 83, 171, 130, 104, 178, 208, 189, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 158, 109, 105, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 89, 173, 133, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 166, 121, 105, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 80, 255, 1, 140, 80, 255, 1, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 32, 151, 98, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 206, 187, 44, 3, 141, 81, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 49, 158, 109, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 163, 117, 102, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 76, 168, 124, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 154, 101, 170, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 11, 143, 85, 255, 172, 205, 185, 24, 217, 231, 222, 4, 208, 225, 214, 4, 150, 197, 171, 9, 40, 153, 101, 165, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 80, 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 163, 117, 69, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 1, 140, 80, 255, 1, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 39, 155, 103, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 157, 107, 148, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 41, 154, 103, 168, 217, 231, 222, 1, 217, 231, 222, 1, 1, 141, 80, 96, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 17, 147, 90, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 199, 175, 20, 67, 164, 119, 91, 42, 156, 105, 160, 23, 148, 92, 223, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 36, 155, 102, 197, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 152, 206, 181, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 111, 188, 154, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 79, 255, 219, 237, 228, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 96, 180, 142, 255, 0, 140, 79, 255, 0, 140, 79, 255, 206, 231, 219, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 54, 163, 115, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 5, 141, 81, 255, 238, 245, 241, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 208, 231, 219, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 152, 98, 173, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 13, 145, 87, 254, 43, 156, 106, 199, 43, 156, 106, 199, 43, 156, 106, 199, 46, 158, 108, 194, 27, 148, 94, 149, 59, 162, 115, 113, 109, 180, 145, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 189, 214, 198, 5, 24, 149, 94, 235, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 35, 154, 101, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 150, 96, 177, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 16, 145, 88, 240, 128, 183, 151, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 150, 95, 168, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 14, 145, 87, 246, 202, 223, 210, 56, 217, 231, 222, 49, 194, 217, 202, 49, 81, 170, 128, 110, 6, 142, 82, 252, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 83, 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 175, 141, 45, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 33, 152, 98, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 185, 151, 38, 18, 147, 90, 239, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 34, 152, 99, 217, 144, 191, 163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 171, 204, 184, 6, 23, 148, 93, 235, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 30, 151, 97, 204, 227, 237, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 150, 96, 150, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 33, 152, 99, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 157, 106, 150, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 81, 253, 159, 202, 179, 73, 217, 231, 222, 49, 203, 222, 210, 49, 68, 163, 117, 81, 15, 145, 88, 246, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 37, 154, 102, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 180, 143, 67, 8, 143, 83, 254, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 32, 153, 99, 255, 42, 157, 106, 255, 42, 157, 106, 255, 26, 151, 96, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 42, 157, 106, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 229, 219, 10, 82, 170, 129, 106, 81, 170, 129, 106, 81, 170, 129, 106, 81, 170, 129, 106, 81, 170, 129, 106, 116, 186, 153, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 175, 136, 111, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 49, 157, 108, 146, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 222, 238, 230, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 254, 253, 255, 40, 156, 105, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 102, 183, 146, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 166, 120, 255, 0, 140, 79, 255, 29, 151, 97, 255, 252, 253, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 232, 243, 237, 255, 6, 142, 83, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 205, 233, 221, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 215, 235, 225, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 191, 163, 7, 18, 146, 89, 236, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 33, 152, 98, 193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 174, 136, 56, 3, 141, 81, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 73, 168, 124, 163, 177, 214, 195, 61, 177, 214, 195, 61, 177, 214, 195, 61, 177, 214, 195, 61, 177, 214, 195, 61, 177, 214, 195, 61, 177, 214, 195, 61, 178, 214, 196, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 205, 184, 3, 17, 146, 89, 247, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 39, 154, 102, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, 213, 196, 7, 23, 149, 93, 240, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 37, 154, 102, 196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 151, 97, 243, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 37, 153, 101, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 211, 194, 34, 3, 141, 81, 254, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 10, 143, 85, 250, 76, 166, 122, 67, 196, 218, 204, 1, 185, 211, 194, 4, 90, 173, 133, 71, 22, 148, 92, 229, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 82, 246, 84, 171, 129, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 178, 140, 59, 2, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 75, 169, 125, 170, 177, 214, 195, 61, 177, 214, 195, 61, 154, 201, 177, 61, 45, 155, 104, 114, 9, 143, 84, 250, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 60, 162, 116, 115, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 1, 23, 147, 92, 212, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 31, 151, 97, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 146, 88, 198, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 31, 151, 98, 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 210, 191, 9, 24, 148, 92, 210, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 25, 147, 92, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 188, 160, 47, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 52, 159, 110, 159, 185, 211, 194, 1, 0, 0, 0, 0, 0, 0, 0, 0, 88, 173, 133, 84, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 4, 141, 81, 254, 89, 172, 132, 53, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 45, 158, 108, 255, 253, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 253, 252, 255, 191, 222, 206, 255, 190, 222, 206, 255, 190, 222, 206, 255, 192, 223, 208, 255, 219, 237, 228, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 233, 243, 238, 255, 10, 144, 85, 255, 0, 140, 79, 255, 99, 182, 145, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 168, 213, 192, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 200, 229, 216, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 221, 239, 231, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 169, 127, 62, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 53, 159, 111, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 158, 108, 130, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 34, 153, 100, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 172, 133, 73, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 52, 158, 109, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 173, 134, 63, 2, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 48, 156, 106, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 194, 166, 35, 7, 142, 83, 253, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 64, 163, 117, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 149, 94, 227, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 83, 255, 17, 145, 88, 219, 17, 146, 89, 231, 3, 141, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 5, 142, 82, 253, 67, 165, 121, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 162, 115, 138, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 17, 145, 88, 228, 173, 206, 186, 17, 0, 0, 0, 0, 0, 0, 0, 0, 118, 184, 151, 37, 9, 143, 84, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 43, 156, 105, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 209, 191, 8, 20, 147, 91, 241, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 44, 156, 105, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 158, 109, 129, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 10, 144, 86, 242, 217, 231, 222, 12, 0, 0, 0, 0, 0, 0, 0, 0, 172, 204, 184, 44, 3, 141, 81, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 81, 255, 27, 149, 94, 193, 48, 157, 108, 167, 30, 151, 97, 196, 9, 143, 85, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 40, 154, 102, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 116, 190, 157, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 106, 185, 149, 255, 0, 140, 79, 255, 0, 140, 79, 255, 173, 216, 196, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 95, 180, 142, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 195, 226, 212, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 227, 242, 236, 255, 1, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 157, 107, 140, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 80, 255, 113, 181, 147, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 150, 95, 198, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 47, 156, 106, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 151, 98, 138, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 8, 143, 84, 255, 114, 181, 147, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 158, 109, 138, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 3, 141, 81, 254, 120, 185, 152, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 165, 119, 102, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 7, 142, 83, 250, 136, 191, 162, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 164, 118, 129, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 8, 143, 83, 249, 65, 164, 118, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 227, 237, 231, 1, 29, 150, 96, 202, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 15, 146, 88, 251, 89, 173, 132, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 159, 111, 107, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 73, 165, 121, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 171, 130, 65, 1, 140, 80, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 255, 103, 177, 140, 66, 0, 0, 0, 0, 0, 0, 0, 0, 105, 180, 144, 50, 12, 144, 86, 249, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 2, 141, 80, 254, 6, 142, 82, 191, 0, 140, 79, 183, 0, 140, 79, 183, 0, 140, 79, 183, 0, 140, 79, 183, 0, 140, 79, 210, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 16, 146, 89, 255, 171, 203, 183, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 153, 101, 224, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 39, 154, 102, 224, 103, 175, 137, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 191, 224, 208, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 250, 247, 255, 109, 186, 151, 255, 1, 140, 80, 255, 0, 140, 79, 255, 9, 143, 84, 255, 238, 246, 242, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 252, 251, 255, 29, 151, 96, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 190, 223, 207, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 246, 242, 255, 10, 143, 84, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 207, 224, 213, 1, 22, 148, 92, 204, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 29, 151, 96, 233, 178, 209, 190, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 190, 160, 22, 13, 145, 87, 252, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 123, 186, 154, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 150, 95, 215, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 23, 148, 92, 214, 217, 231, 222, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 149, 95, 205, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 23, 148, 92, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 153, 100, 153, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 26, 149, 94, 214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 202, 182, 6, 27, 148, 93, 176, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 30, 151, 97, 220, 77, 168, 125, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 198, 173, 25, 13, 145, 87, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 1, 140, 80, 255, 31, 151, 98, 217, 80, 168, 126, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 153, 101, 183, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 18, 146, 89, 248, 212, 228, 218, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 159, 110, 125, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 20, 147, 91, 246, 196, 218, 204, 4, 0, 0, 0, 0, 133, 182, 152, 3, 29, 149, 95, 194, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 36, 153, 100, 194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 79, 95, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 6, 142, 82, 255, 59, 157, 110, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 170, 127, 68, 13, 145, 87, 250, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 4, 141, 81, 255, 37, 153, 100, 180, 106, 177, 140, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 11, 144, 86, 255, 205, 230, 218, 255, 215, 236, 226, 255, 215, 236, 226, 255, 215, 236, 226, 255, 215, 236, 226, 255, 215, 236, 226, 255, 215, 236, 226, 255, 215, 236, 226, 255, 215, 236, 226, 255, 215, 236, 226, 255, 212, 233, 223, 255, 202, 228, 215, 255, 169, 215, 194, 255, 120, 191, 159, 255, 33, 153, 100, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 49, 160, 111, 255, 215, 236, 226, 255, 215, 236, 226, 255, 215, 236, 226, 255, 215, 236, 226, 255, 179, 218, 200, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 172, 213, 193, 255, 245, 249, 246, 255, 245, 249, 246, 255, 245, 249, 246, 255, 235, 243, 238, 255, 13, 145, 87, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 192, 163, 20, 38, 155, 103, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 54, 161, 113, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 181, 145, 95, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 47, 158, 108, 239, 149, 196, 171, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 161, 200, 176, 32, 32, 153, 100, 254, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 56, 160, 112, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 193, 165, 23, 38, 155, 103, 253, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 58, 162, 115, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 158, 109, 187, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 41, 156, 105, 234, 180, 208, 190, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 190, 164, 6, 57, 160, 112, 129, 25, 149, 93, 238, 1, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 12, 144, 86, 255, 27, 149, 95, 202, 73, 167, 123, 106, 153, 196, 171, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 173, 133, 85, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 151, 97, 254, 12, 143, 85, 223, 34, 153, 100, 209, 46, 156, 106, 158, 88, 172, 131, 80, 173, 205, 185, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 212, 195, 9, 45, 158, 108, 240, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 55, 161, 113, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 166, 120, 160, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 39, 155, 104, 252, 132, 190, 160, 38, 0, 0, 0, 0, 96, 178, 139, 108, 29, 152, 98, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 26, 150, 95, 247, 91, 172, 132, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 152, 97, 95, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 27, 152, 97, 255, 142, 199, 172, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 176, 138, 61, 20, 146, 90, 189, 7, 142, 83, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 14, 144, 86, 242, 35, 153, 100, 180, 92, 174, 135, 78, 217, 231, 222, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 8, 143, 84, 255, 12, 144, 86, 255, 12, 144, 86, 255, 12, 144, 86, 255, 12, 144, 86, 255, 1, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 1, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, 234, 226, 8, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 219, 232, 224, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 3, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 2, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 13, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 192, 165, 8, 105, 178, 141, 61, 66, 166, 121, 103, 73, 167, 124, 118, 79, 171, 129, 118, 56, 158, 110, 69, 134, 192, 163, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, 234, 226, 8, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 219, 232, 224, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 227, 237, 231, 1, 218, 232, 223, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 220, 233, 225, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 9, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 227, 237, 231, 3, 0, 0, 0, 0, 217, 231, 222, 9, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 231, 222, 7, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 18, 217, 231, 222, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 218, 204, 1, 128, 189, 159, 41, 73, 168, 124, 92, 74, 167, 124, 118, 73, 167, 124, 118, 67, 168, 123, 99, 106, 178, 142, 58, 131, 183, 152, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 0, 140, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(236, 48, imgdata); + return image; +} + +static Ihandle* load_image_LogoMessageInfo(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, 212, 237, 31, 204, 220, 235, 169, 215, 225, 233, 227, 226, 230, 235, 248, 233, 234, 235, 254, 235, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 235, 234, 236, 255, 232, 234, 236, 254, 226, 230, 236, 249, 214, 226, 237, 228, 199, 215, 234, 174, 136, 161, 191, 44, 21, 42, 85, 12, 21, 42, 85, 7, 21, 42, 85, 3, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 1, 208, 223, 238, 184, 227, 233, 237, 244, 235, 236, 237, 255, 236, 236, 236, 255, 238, 238, 238, 255, 241, 241, 241, 255, 243, 242, 243, 255, 243, 243, 243, 255, 242, 242, 243, 255, 242, 243, 243, 255, 243, 243, 243, 255, 243, 243, 244, 255, 242, 243, 244, 255, 242, 243, 244, 255, 241, 243, 244, 255, 239, 241, 242, 255, 238, 239, 241, 255, 234, 237, 240, 255, 222, 231, 239, 246, 197, 214, 231, 193, 21, 42, 85, 22, 21, 42, 85, 13, 21, 42, 85, 6, 21, 42, 85, 2, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 182, 211, 5, 213, 224, 237, 207, 231, 234, 236, 252, 237, 237, 237, 255, 238, 237, 238, 255, 239, 240, 240, 255, 241, 242, 242, 255, 244, 244, 245, 255, 247, 248, 248, 255, 250, 251, 252, 255, 252, 253, 254, 255, 253, 254, 255, 255, 252, 254, 255, 255, 252, 254, 255, 255, 252, 253, 255, 255, 252, 254, 255, 255, 250, 253, 254, 255, 247, 249, 251, 255, 244, 245, 248, 255, 242, 243, 245, 255, 238, 241, 243, 255, 237, 239, 242, 255, 236, 239, 241, 255, 226, 233, 239, 253, 198, 215, 231, 217, 40, 61, 103, 35, 21, 42, 85, 16, 21, 42, 85, 7, 21, 42, 85, 2, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 220, 235, 177, 228, 231, 234, 251, 235, 236, 236, 255, 237, 238, 238, 255, 240, 240, 241, 255, 242, 243, 244, 255, 245, 247, 247, 255, 247, 248, 249, 255, 251, 252, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 223, 226, 231, 255, 207, 211, 219, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 245, 249, 252, 255, 243, 246, 250, 255, 240, 244, 247, 255, 237, 241, 244, 255, 234, 238, 242, 255, 233, 236, 241, 255, 220, 229, 237, 252, 182, 201, 223, 195, 21, 42, 85, 33, 21, 42, 85, 16, 21, 42, 85, 6, 21, 42, 85, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 207, 234, 21, 214, 223, 231, 230, 231, 231, 233, 255, 234, 234, 235, 255, 237, 238, 239, 255, 241, 241, 243, 255, 244, 246, 247, 255, 248, 250, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 191, 197, 209, 255, 77, 94, 127, 255, 0, 26, 78, 255, 0, 27, 81, 255, 29, 53, 102, 255, 158, 168, 189, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 249, 254, 255, 241, 246, 250, 255, 238, 242, 247, 255, 233, 238, 244, 255, 230, 235, 241, 255, 225, 232, 238, 255, 198, 213, 228, 239, 64, 88, 128, 73, 21, 42, 85, 28, 21, 42, 85, 10, 21, 42, 85, 3, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 214, 236, 90, 217, 223, 229, 246, 227, 229, 230, 255, 231, 233, 234, 255, 237, 239, 240, 255, 243, 244, 246, 255, 246, 249, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 253, 255, 255, 44, 67, 113, 255, 0, 32, 96, 255, 0, 36, 110, 255, 0, 38, 114, 255, 0, 35, 105, 255, 0, 31, 95, 255, 216, 224, 235, 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 242, 249, 254, 255, 237, 243, 250, 255, 233, 239, 245, 255, 227, 233, 240, 255, 223, 230, 237, 255, 204, 217, 232, 251, 122, 148, 182, 142, 21, 42, 85, 39, 21, 42, 85, 15, 21, 42, 85, 4, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 193, 214, 237, 101, 218, 224, 229, 249, 225, 227, 228, 255, 228, 230, 232, 255, 235, 237, 239, 255, 241, 244, 246, 255, 249, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 255, 255, 255, 249, 252, 255, 255, 247, 251, 255, 255, 184, 195, 214, 255, 0, 33, 99, 255, 0, 39, 118, 255, 0, 50, 151, 255, 0, 50, 151, 255, 0, 48, 144, 255, 0, 39, 118, 255, 105, 129, 174, 255, 244, 249, 255, 255, 244, 250, 255, 255, 247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 255, 255, 255, 235, 243, 250, 255, 229, 237, 245, 255, 224, 231, 239, 255, 219, 227, 236, 255, 204, 217, 231, 253, 121, 147, 181, 159, 21, 42, 85, 50, 21, 42, 85, 20, 21, 42, 85, 6, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 211, 237, 59, 214, 222, 229, 248, 224, 226, 228, 255, 226, 229, 232, 255, 233, 236, 238, 255, 239, 242, 245, 255, 250, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 253, 255, 255, 247, 251, 255, 255, 246, 251, 255, 255, 245, 250, 255, 255, 245, 250, 255, 255, 183, 196, 216, 255, 0, 36, 110, 255, 0, 42, 127, 255, 0, 50, 151, 255, 0, 51, 152, 255, 6, 55, 154, 255, 10, 56, 149, 255, 89, 120, 179, 255, 241, 247, 255, 255, 240, 247, 255, 255, 240, 248, 255, 255, 240, 247, 255, 255, 242, 250, 255, 255, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 231, 241, 250, 255, 226, 235, 244, 255, 221, 229, 238, 255, 217, 226, 236, 255, 197, 213, 230, 253, 83, 109, 147, 144, 21, 42, 85, 57, 21, 42, 85, 21, 21, 42, 85, 5, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 207, 217, 227, 239, 221, 225, 227, 255, 225, 227, 231, 255, 231, 234, 238, 255, 237, 241, 245, 255, 248, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 253, 255, 255, 245, 250, 255, 255, 244, 250, 255, 255, 244, 249, 255, 255, 244, 249, 255, 255, 243, 249, 255, 255, 242, 249, 255, 255, 242, 249, 255, 255, 27, 64, 136, 255, 1, 45, 135, 255, 54, 101, 196, 255, 135, 183, 255, 255, 118, 167, 255, 255, 5, 54, 152, 255, 209, 222, 241, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 237, 245, 255, 255, 236, 245, 255, 255, 236, 245, 255, 255, 239, 249, 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 228, 239, 250, 255, 223, 234, 244, 255, 217, 228, 238, 255, 213, 225, 235, 255, 185, 205, 226, 250, 21, 42, 85, 114, 21, 42, 85, 55, 21, 42, 85, 18, 21, 42, 85, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 195, 211, 227, 202, 217, 221, 225, 255, 221, 225, 229, 255, 228, 232, 237, 255, 235, 239, 244, 255, 245, 250, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 245, 250, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 242, 248, 255, 255, 242, 248, 255, 255, 241, 248, 255, 255, 240, 248, 255, 255, 240, 247, 255, 255, 180, 196, 223, 255, 42, 81, 160, 255, 20, 69, 168, 255, 63, 113, 214, 255, 41, 87, 178, 255, 132, 159, 208, 255, 236, 246, 255, 255, 236, 245, 255, 255, 235, 245, 255, 255, 235, 245, 255, 255, 234, 245, 255, 255, 234, 245, 255, 255, 234, 244, 255, 255, 233, 244, 255, 255, 234, 246, 255, 255, 246, 255, 255, 255, 255, 255, 255, 255, 250, 255, 255, 255, 225, 238, 249, 255, 219, 231, 243, 255, 212, 225, 237, 255, 206, 220, 233, 255, 155, 180, 209, 238, 21, 42, 85, 104, 21, 42, 85, 44, 21, 42, 85, 12, 21, 42, 85, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 181, 207, 234, 66, 206, 214, 221, 253, 216, 220, 224, 255, 222, 227, 233, 255, 231, 236, 242, 255, 241, 246, 251, 255, 255, 255, 255, 255, 252, 255, 255, 255, 244, 249, 255, 255, 241, 248, 255, 255, 241, 248, 255, 255, 241, 248, 255, 255, 240, 248, 255, 255, 239, 247, 255, 255, 239, 248, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 246, 255, 255, 237, 247, 255, 255, 237, 246, 255, 255, 211, 225, 245, 255, 194, 215, 247, 255, 235, 245, 255, 255, 235, 245, 255, 255, 234, 245, 255, 255, 233, 243, 255, 255, 233, 243, 255, 255, 232, 243, 255, 255, 232, 243, 255, 255, 231, 244, 255, 255, 231, 243, 255, 255, 230, 243, 255, 255, 230, 242, 255, 255, 230, 243, 255, 255, 243, 255, 255, 255, 255, 255, 255, 255, 239, 252, 255, 255, 220, 234, 247, 255, 213, 227, 240, 255, 207, 220, 233, 255, 190, 209, 227, 255, 72, 98, 138, 184, 21, 42, 85, 88, 21, 42, 85, 32, 21, 42, 85, 7, 21, 42, 85, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 190, 205, 222, 223, 211, 216, 221, 255, 216, 221, 227, 255, 224, 231, 237, 255, 233, 240, 245, 255, 252, 255, 255, 255, 249, 255, 255, 255, 241, 248, 255, 255, 240, 248, 255, 255, 240, 247, 255, 255, 239, 247, 255, 255, 239, 247, 255, 255, 238, 247, 255, 255, 237, 246, 255, 255, 237, 246, 255, 255, 236, 246, 255, 255, 236, 245, 255, 255, 236, 245, 255, 255, 235, 245, 255, 255, 234, 243, 255, 255, 234, 243, 255, 255, 234, 243, 255, 255, 233, 243, 255, 255, 232, 243, 255, 255, 232, 243, 255, 255, 231, 243, 255, 255, 230, 243, 255, 255, 229, 243, 255, 255, 229, 242, 255, 255, 229, 242, 255, 255, 229, 242, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 228, 242, 255, 255, 240, 255, 255, 255, 255, 255, 255, 255, 223, 238, 252, 255, 214, 229, 243, 255, 206, 220, 235, 255, 202, 216, 231, 255, 156, 183, 211, 249, 21, 42, 85, 140, 21, 42, 85, 66, 21, 42, 85, 20, 21, 42, 85, 4, 0, 0, 0, 0, + 161, 191, 223, 9, 201, 209, 219, 253, 210, 216, 222, 255, 217, 224, 231, 255, 226, 233, 241, 255, 238, 245, 253, 255, 248, 255, 255, 255, 241, 248, 255, 255, 237, 246, 255, 255, 237, 247, 255, 255, 237, 246, 255, 255, 237, 246, 255, 255, 236, 246, 255, 255, 235, 246, 255, 255, 235, 245, 255, 255, 234, 243, 255, 255, 234, 243, 255, 255, 234, 243, 255, 255, 233, 243, 255, 255, 232, 243, 255, 255, 232, 243, 255, 255, 231, 243, 255, 255, 230, 243, 255, 255, 230, 243, 255, 255, 229, 242, 255, 255, 229, 242, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 226, 240, 255, 255, 226, 240, 255, 255, 225, 240, 255, 255, 225, 240, 255, 255, 224, 239, 255, 255, 224, 239, 255, 255, 226, 242, 255, 255, 242, 255, 255, 255, 235, 252, 255, 255, 213, 230, 246, 255, 206, 222, 238, 255, 199, 216, 231, 255, 183, 203, 225, 255, 27, 49, 92, 186, 21, 42, 85, 107, 21, 42, 85, 40, 21, 42, 85, 9, 21, 42, 85, 1, + 178, 201, 222, 177, 205, 212, 219, 255, 209, 217, 224, 255, 219, 226, 235, 255, 228, 235, 244, 255, 243, 252, 255, 255, 241, 250, 255, 255, 236, 245, 255, 255, 236, 245, 255, 255, 235, 245, 255, 255, 234, 244, 255, 255, 234, 243, 255, 255, 233, 243, 255, 255, 233, 243, 255, 255, 232, 243, 255, 255, 231, 243, 255, 255, 202, 216, 233, 255, 143, 160, 185, 255, 114, 133, 164, 255, 113, 133, 167, 255, 113, 133, 168, 255, 112, 133, 168, 255, 84, 107, 147, 255, 54, 79, 125, 255, 54, 79, 125, 255, 141, 160, 191, 255, 226, 241, 255, 255, 225, 240, 255, 255, 225, 239, 255, 255, 224, 240, 255, 255, 223, 239, 255, 255, 222, 238, 255, 255, 223, 239, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 237, 255, 255, 220, 238, 255, 255, 227, 244, 255, 255, 240, 255, 255, 255, 215, 233, 251, 255, 206, 224, 242, 255, 198, 216, 233, 255, 194, 211, 228, 255, 123, 152, 187, 242, 21, 42, 85, 148, 21, 42, 85, 66, 21, 42, 85, 18, 21, 42, 85, 3, + 180, 197, 214, 236, 200, 208, 216, 255, 208, 217, 225, 255, 219, 228, 237, 255, 230, 239, 249, 255, 240, 251, 255, 255, 235, 246, 255, 255, 234, 244, 255, 255, 233, 243, 255, 255, 232, 244, 255, 255, 232, 243, 255, 255, 232, 243, 255, 255, 230, 243, 255, 255, 230, 243, 255, 255, 230, 242, 255, 255, 229, 242, 255, 255, 113, 136, 177, 255, 0, 35, 105, 255, 0, 37, 111, 255, 0, 42, 128, 255, 0, 41, 124, 255, 0, 40, 121, 255, 0, 40, 121, 255, 0, 37, 112, 255, 0, 35, 107, 255, 111, 136, 178, 255, 223, 239, 255, 255, 223, 238, 255, 255, 222, 238, 255, 255, 222, 238, 255, 255, 221, 238, 255, 255, 220, 238, 255, 255, 220, 237, 255, 255, 219, 237, 255, 255, 219, 237, 255, 255, 218, 236, 255, 255, 218, 236, 255, 255, 219, 238, 255, 255, 231, 250, 255, 255, 222, 242, 255, 255, 206, 224, 243, 255, 197, 215, 234, 255, 189, 208, 226, 255, 152, 180, 210, 253, 21, 42, 85, 180, 21, 42, 85, 96, 21, 42, 85, 33, 21, 42, 85, 6, + 182, 195, 208, 252, 195, 203, 212, 255, 206, 215, 224, 255, 217, 227, 238, 255, 231, 241, 253, 255, 236, 248, 255, 255, 232, 243, 255, 255, 231, 243, 255, 255, 230, 242, 255, 255, 230, 242, 255, 255, 229, 243, 255, 255, 229, 242, 255, 255, 227, 242, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 226, 241, 255, 255, 198, 215, 239, 255, 111, 140, 192, 255, 26, 67, 147, 255, 0, 48, 142, 255, 0, 50, 151, 255, 0, 50, 152, 255, 0, 50, 152, 255, 0, 50, 151, 255, 0, 41, 125, 255, 109, 137, 185, 255, 220, 237, 255, 255, 220, 237, 255, 255, 219, 237, 255, 255, 219, 237, 255, 255, 218, 236, 255, 255, 218, 236, 255, 255, 217, 236, 255, 255, 216, 236, 255, 255, 216, 235, 255, 255, 215, 235, 255, 255, 215, 234, 255, 255, 214, 235, 255, 255, 221, 242, 255, 255, 222, 242, 255, 255, 202, 223, 243, 255, 193, 212, 232, 255, 185, 204, 222, 255, 163, 188, 214, 255, 21, 42, 85, 206, 21, 42, 85, 131, 21, 42, 85, 52, 21, 42, 85, 12, + 183, 196, 206, 255, 190, 200, 209, 255, 201, 212, 222, 255, 213, 225, 237, 255, 229, 241, 253, 255, 232, 245, 255, 255, 229, 242, 255, 255, 229, 242, 255, 255, 228, 242, 255, 255, 227, 241, 255, 255, 226, 241, 255, 255, 227, 240, 255, 255, 225, 240, 255, 255, 225, 240, 255, 255, 224, 239, 255, 255, 224, 239, 255, 255, 223, 239, 255, 255, 223, 239, 255, 255, 208, 226, 247, 255, 25, 63, 140, 255, 0, 48, 145, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 136, 255, 108, 138, 189, 255, 218, 237, 255, 255, 217, 236, 255, 255, 217, 236, 255, 255, 216, 236, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 214, 235, 255, 255, 214, 235, 255, 255, 213, 235, 255, 255, 213, 234, 255, 255, 213, 233, 255, 255, 212, 234, 255, 255, 215, 237, 255, 255, 216, 239, 255, 255, 200, 221, 242, 255, 190, 211, 231, 255, 180, 201, 219, 255, 169, 192, 215, 255, 21, 42, 85, 223, 21, 42, 85, 157, 21, 42, 85, 68, 21, 42, 85, 17, + 184, 195, 207, 255, 187, 197, 208, 255, 198, 210, 221, 255, 211, 223, 236, 255, 226, 239, 253, 255, 228, 242, 255, 255, 226, 240, 255, 255, 226, 240, 255, 255, 225, 240, 255, 255, 224, 239, 255, 255, 224, 240, 255, 255, 224, 239, 255, 255, 223, 238, 255, 255, 222, 239, 255, 255, 222, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 220, 237, 255, 255, 219, 237, 255, 255, 108, 136, 184, 255, 0, 45, 135, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 137, 255, 107, 137, 189, 255, 215, 236, 255, 255, 214, 235, 255, 255, 214, 234, 255, 255, 214, 235, 255, 255, 213, 234, 255, 255, 213, 234, 255, 255, 211, 233, 255, 255, 211, 234, 255, 255, 211, 233, 255, 255, 211, 233, 255, 255, 210, 233, 255, 255, 210, 232, 255, 255, 212, 235, 255, 255, 213, 236, 255, 255, 197, 220, 242, 255, 186, 208, 229, 255, 177, 198, 218, 255, 172, 195, 216, 255, 21, 42, 85, 230, 21, 42, 85, 169, 21, 42, 85, 75, 21, 42, 85, 19, + 184, 196, 207, 255, 184, 196, 208, 255, 195, 208, 221, 255, 208, 222, 236, 255, 223, 238, 253, 255, 226, 241, 255, 255, 224, 239, 255, 255, 223, 239, 255, 255, 222, 238, 255, 255, 222, 238, 255, 255, 222, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 220, 238, 255, 255, 219, 237, 255, 255, 218, 237, 255, 255, 218, 236, 255, 255, 218, 236, 255, 255, 216, 236, 255, 255, 107, 134, 180, 255, 0, 43, 130, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 137, 255, 105, 136, 189, 255, 211, 234, 255, 255, 211, 233, 255, 255, 211, 233, 255, 255, 211, 233, 255, 255, 211, 232, 255, 255, 210, 232, 255, 255, 209, 232, 255, 255, 208, 232, 255, 255, 208, 232, 255, 255, 208, 232, 255, 255, 208, 231, 255, 255, 207, 231, 255, 255, 208, 233, 255, 255, 210, 233, 255, 255, 194, 218, 241, 255, 183, 206, 229, 255, 174, 196, 218, 255, 173, 196, 218, 255, 21, 42, 85, 232, 21, 42, 85, 173, 21, 42, 85, 78, 21, 42, 85, 20, + 179, 193, 206, 255, 182, 195, 207, 255, 192, 206, 220, 255, 205, 220, 235, 255, 220, 236, 252, 255, 222, 239, 255, 255, 221, 238, 255, 255, 221, 237, 255, 255, 220, 238, 255, 255, 220, 237, 255, 255, 219, 237, 255, 255, 218, 236, 255, 255, 218, 236, 255, 255, 217, 236, 255, 255, 216, 236, 255, 255, 216, 236, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 106, 133, 179, 255, 0, 43, 129, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 137, 255, 104, 136, 189, 255, 210, 232, 255, 255, 209, 232, 255, 255, 209, 232, 255, 255, 208, 231, 255, 255, 208, 231, 255, 255, 207, 231, 255, 255, 207, 231, 255, 255, 206, 231, 255, 255, 206, 231, 255, 255, 206, 230, 255, 255, 206, 230, 255, 255, 205, 230, 255, 255, 206, 232, 255, 255, 207, 231, 255, 255, 191, 216, 241, 255, 182, 205, 229, 255, 172, 194, 218, 255, 167, 192, 216, 255, 21, 42, 85, 233, 21, 42, 85, 174, 21, 42, 85, 79, 21, 42, 85, 20, + 171, 187, 204, 255, 179, 193, 207, 255, 190, 204, 219, 255, 202, 217, 234, 255, 217, 233, 251, 255, 220, 238, 255, 255, 218, 236, 255, 255, 218, 237, 255, 255, 218, 236, 255, 255, 217, 236, 255, 255, 216, 236, 255, 255, 216, 235, 255, 255, 215, 235, 255, 255, 214, 235, 255, 255, 214, 234, 255, 255, 214, 235, 255, 255, 213, 234, 255, 255, 211, 233, 255, 255, 211, 233, 255, 255, 104, 133, 179, 255, 0, 43, 129, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 137, 255, 103, 135, 189, 255, 207, 231, 255, 255, 208, 231, 255, 255, 207, 231, 255, 255, 206, 230, 255, 255, 206, 231, 255, 255, 205, 230, 255, 255, 204, 230, 255, 255, 205, 229, 255, 255, 203, 230, 255, 255, 203, 229, 255, 255, 202, 229, 255, 255, 202, 228, 255, 255, 203, 230, 255, 255, 203, 228, 255, 255, 189, 214, 239, 255, 179, 203, 227, 255, 170, 194, 217, 255, 156, 185, 213, 255, 21, 42, 85, 233, 21, 42, 85, 174, 21, 42, 85, 79, 21, 42, 85, 20, + 160, 181, 202, 252, 176, 189, 205, 255, 184, 201, 216, 255, 197, 213, 231, 255, 211, 229, 248, 255, 217, 237, 255, 255, 215, 235, 255, 255, 216, 235, 255, 255, 215, 235, 255, 255, 214, 235, 255, 255, 213, 234, 255, 255, 213, 234, 255, 255, 213, 234, 255, 255, 211, 234, 255, 255, 211, 233, 255, 255, 211, 233, 255, 255, 210, 233, 255, 255, 210, 233, 255, 255, 209, 232, 255, 255, 103, 132, 179, 255, 0, 43, 129, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 137, 255, 102, 134, 189, 255, 206, 230, 255, 255, 205, 229, 255, 255, 204, 229, 255, 255, 204, 230, 255, 255, 203, 229, 255, 255, 202, 229, 255, 255, 202, 229, 255, 255, 201, 227, 255, 255, 202, 228, 255, 255, 201, 228, 255, 255, 201, 228, 255, 255, 199, 227, 255, 255, 202, 229, 255, 255, 196, 223, 251, 255, 184, 209, 236, 255, 174, 200, 224, 255, 167, 190, 215, 255, 143, 173, 208, 255, 21, 42, 85, 233, 21, 42, 85, 174, 21, 42, 85, 79, 21, 42, 85, 20, + 149, 174, 201, 237, 171, 186, 201, 255, 177, 194, 210, 255, 189, 207, 225, 255, 201, 221, 240, 255, 212, 234, 254, 255, 213, 234, 255, 255, 213, 234, 255, 255, 212, 234, 255, 255, 212, 234, 255, 255, 211, 233, 255, 255, 210, 233, 255, 255, 210, 233, 255, 255, 209, 232, 255, 255, 209, 232, 255, 255, 209, 232, 255, 255, 208, 232, 255, 255, 208, 231, 255, 255, 206, 231, 255, 255, 102, 132, 179, 255, 0, 43, 129, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 137, 255, 101, 134, 189, 255, 203, 229, 255, 255, 203, 229, 255, 255, 202, 229, 255, 255, 201, 227, 255, 255, 201, 227, 255, 255, 200, 227, 255, 255, 200, 227, 255, 255, 199, 227, 255, 255, 199, 227, 255, 255, 198, 226, 255, 255, 198, 226, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 188, 216, 243, 255, 177, 204, 231, 255, 167, 194, 219, 255, 161, 186, 211, 255, 124, 160, 197, 255, 21, 42, 85, 232, 21, 42, 85, 173, 21, 42, 85, 78, 21, 42, 85, 20, + 140, 171, 204, 182, 166, 182, 198, 255, 169, 186, 203, 255, 180, 198, 217, 255, 192, 212, 231, 255, 206, 228, 250, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 209, 232, 255, 255, 208, 232, 255, 255, 208, 232, 255, 255, 208, 232, 255, 255, 207, 231, 255, 255, 206, 230, 255, 255, 206, 231, 255, 255, 206, 230, 255, 255, 205, 230, 255, 255, 204, 230, 255, 255, 101, 131, 179, 255, 0, 43, 129, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 137, 255, 100, 133, 189, 255, 201, 227, 255, 255, 201, 227, 255, 255, 200, 227, 255, 255, 199, 227, 255, 255, 199, 227, 255, 255, 198, 226, 255, 255, 198, 227, 255, 255, 197, 226, 255, 255, 197, 225, 255, 255, 196, 226, 255, 255, 196, 225, 255, 255, 196, 226, 255, 255, 192, 222, 252, 255, 178, 207, 236, 255, 169, 197, 224, 255, 160, 186, 212, 255, 157, 181, 207, 255, 94, 129, 172, 253, 21, 42, 85, 230, 21, 42, 85, 169, 21, 42, 85, 75, 21, 42, 85, 19, + 65, 93, 135, 24, 146, 169, 192, 254, 162, 180, 197, 255, 172, 190, 209, 255, 184, 204, 224, 255, 196, 218, 240, 255, 207, 230, 253, 255, 208, 232, 255, 255, 208, 231, 255, 255, 206, 231, 255, 255, 206, 230, 255, 255, 206, 230, 255, 255, 205, 230, 255, 255, 205, 230, 255, 255, 204, 230, 255, 255, 203, 229, 255, 255, 203, 229, 255, 255, 203, 229, 255, 255, 203, 229, 255, 255, 100, 130, 179, 255, 0, 43, 129, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 137, 255, 98, 133, 189, 255, 198, 227, 255, 255, 198, 226, 255, 255, 197, 226, 255, 255, 197, 226, 255, 255, 195, 225, 255, 255, 195, 225, 255, 255, 195, 225, 255, 255, 194, 225, 255, 255, 194, 224, 255, 255, 194, 224, 255, 255, 194, 225, 255, 255, 192, 224, 255, 255, 183, 212, 243, 255, 173, 201, 230, 255, 162, 189, 216, 255, 154, 180, 206, 255, 131, 164, 198, 255, 25, 46, 90, 248, 21, 42, 85, 223, 21, 42, 85, 157, 21, 42, 85, 68, 21, 42, 85, 17, + 21, 42, 85, 12, 132, 163, 193, 229, 158, 176, 194, 255, 163, 182, 201, 255, 174, 194, 215, 255, 185, 206, 229, 255, 199, 223, 247, 255, 205, 229, 254, 255, 205, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 203, 229, 255, 255, 202, 229, 255, 255, 202, 229, 255, 255, 201, 227, 255, 255, 201, 227, 255, 255, 200, 227, 255, 255, 200, 227, 255, 255, 200, 227, 255, 255, 98, 130, 179, 255, 0, 43, 129, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 137, 255, 96, 132, 189, 255, 195, 226, 255, 255, 195, 225, 255, 255, 195, 224, 255, 255, 194, 225, 255, 255, 194, 224, 255, 255, 193, 224, 255, 255, 192, 224, 255, 255, 192, 224, 255, 255, 191, 223, 255, 255, 190, 223, 255, 255, 190, 223, 255, 255, 185, 217, 248, 255, 173, 203, 233, 255, 164, 193, 221, 255, 154, 181, 209, 255, 149, 177, 203, 255, 105, 145, 186, 255, 21, 42, 85, 242, 21, 42, 85, 206, 21, 42, 85, 131, 21, 42, 85, 52, 21, 42, 85, 12, + 21, 42, 85, 6, 109, 144, 187, 90, 140, 165, 189, 254, 156, 175, 194, 255, 163, 183, 204, 255, 174, 196, 218, 255, 183, 207, 230, 255, 198, 223, 248, 255, 203, 229, 254, 255, 202, 229, 255, 255, 202, 228, 255, 255, 201, 227, 255, 255, 201, 228, 255, 255, 200, 228, 255, 255, 199, 227, 255, 255, 199, 227, 255, 255, 199, 227, 255, 255, 198, 226, 255, 255, 197, 226, 255, 255, 97, 129, 179, 255, 0, 43, 130, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 1, 46, 137, 255, 95, 131, 189, 255, 193, 224, 255, 255, 193, 223, 255, 255, 192, 223, 255, 255, 192, 224, 255, 255, 191, 223, 255, 255, 190, 222, 255, 255, 190, 222, 255, 255, 189, 222, 255, 255, 189, 222, 255, 255, 188, 222, 255, 255, 183, 216, 250, 255, 171, 203, 234, 255, 164, 193, 223, 255, 154, 183, 211, 255, 147, 175, 203, 255, 124, 159, 195, 255, 48, 76, 121, 251, 21, 42, 85, 232, 21, 42, 85, 180, 21, 42, 85, 96, 21, 42, 85, 33, 21, 42, 85, 6, + 21, 42, 85, 3, 21, 42, 85, 18, 123, 156, 191, 216, 147, 168, 189, 255, 153, 173, 193, 255, 161, 184, 204, 255, 172, 195, 218, 255, 181, 206, 231, 255, 195, 222, 249, 255, 200, 227, 254, 255, 199, 227, 255, 255, 199, 227, 255, 255, 198, 226, 255, 255, 197, 226, 255, 255, 197, 226, 255, 255, 197, 226, 255, 255, 196, 225, 255, 255, 195, 225, 255, 255, 194, 225, 255, 255, 96, 128, 179, 255, 0, 44, 134, 255, 0, 50, 152, 255, 0, 51, 153, 255, 0, 50, 152, 255, 0, 47, 139, 255, 70, 107, 170, 255, 191, 222, 255, 255, 190, 223, 255, 255, 189, 222, 255, 255, 189, 222, 255, 255, 188, 222, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 186, 221, 255, 255, 186, 220, 255, 255, 182, 216, 250, 255, 170, 202, 234, 255, 162, 192, 223, 255, 152, 181, 211, 255, 144, 173, 201, 255, 136, 167, 198, 255, 93, 134, 178, 254, 21, 42, 85, 244, 21, 42, 85, 214, 21, 42, 85, 148, 21, 42, 85, 66, 21, 42, 85, 18, 21, 42, 85, 3, + 21, 42, 85, 1, 21, 42, 85, 9, 21, 42, 85, 40, 122, 153, 185, 246, 146, 168, 188, 255, 150, 171, 192, 255, 159, 182, 204, 255, 169, 194, 218, 255, 179, 204, 230, 255, 192, 220, 248, 255, 196, 225, 254, 255, 196, 225, 255, 255, 195, 226, 255, 255, 195, 225, 255, 255, 195, 224, 255, 255, 194, 225, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 192, 224, 255, 255, 58, 92, 153, 255, 0, 48, 145, 255, 0, 50, 152, 255, 0, 50, 152, 255, 0, 50, 152, 255, 1, 50, 147, 255, 21, 61, 137, 255, 176, 210, 246, 255, 188, 222, 255, 255, 187, 221, 255, 255, 187, 220, 255, 255, 186, 220, 255, 255, 185, 220, 255, 255, 185, 220, 255, 255, 184, 219, 255, 255, 180, 214, 249, 255, 168, 201, 234, 255, 159, 191, 223, 255, 150, 180, 210, 255, 141, 171, 199, 255, 138, 167, 195, 255, 103, 144, 185, 255, 21, 42, 85, 249, 21, 42, 85, 231, 21, 42, 85, 184, 21, 42, 85, 107, 21, 42, 85, 40, 21, 42, 85, 9, 21, 42, 85, 1, + 0, 0, 0, 0, 21, 42, 85, 4, 21, 42, 85, 20, 82, 116, 160, 109, 121, 151, 183, 252, 144, 164, 186, 255, 147, 170, 192, 255, 157, 180, 204, 255, 166, 192, 218, 255, 175, 202, 229, 255, 187, 216, 246, 255, 191, 223, 252, 255, 193, 224, 255, 255, 193, 224, 255, 255, 192, 223, 255, 255, 192, 223, 255, 255, 191, 223, 255, 255, 94, 126, 174, 255, 45, 81, 146, 255, 1, 48, 142, 255, 31, 79, 174, 255, 69, 117, 213, 255, 75, 123, 219, 255, 81, 129, 226, 255, 70, 118, 215, 255, 12, 60, 156, 255, 9, 50, 131, 255, 79, 116, 174, 255, 161, 197, 237, 255, 183, 219, 255, 255, 183, 219, 255, 255, 183, 219, 255, 255, 180, 217, 253, 255, 175, 211, 247, 255, 164, 198, 232, 255, 157, 190, 222, 255, 148, 179, 210, 255, 139, 169, 199, 255, 135, 165, 194, 255, 106, 145, 185, 255, 44, 72, 117, 252, 21, 42, 85, 239, 21, 42, 85, 205, 21, 42, 85, 140, 21, 42, 85, 66, 21, 42, 85, 20, 21, 42, 85, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 7, 21, 42, 85, 32, 92, 128, 171, 153, 119, 150, 181, 253, 141, 164, 186, 255, 145, 168, 192, 255, 153, 178, 203, 255, 162, 188, 215, 255, 169, 197, 225, 255, 177, 207, 237, 255, 185, 217, 248, 255, 188, 220, 252, 255, 189, 221, 254, 255, 189, 222, 255, 255, 188, 222, 255, 255, 0, 42, 127, 255, 10, 58, 152, 255, 41, 91, 190, 255, 34, 84, 184, 255, 31, 81, 181, 255, 31, 81, 182, 255, 32, 82, 182, 255, 39, 89, 189, 255, 79, 129, 229, 255, 121, 171, 255, 255, 4, 51, 147, 255, 136, 175, 225, 255, 181, 218, 255, 255, 179, 215, 253, 255, 175, 211, 248, 255, 168, 204, 238, 255, 160, 194, 228, 255, 153, 186, 219, 255, 145, 176, 208, 255, 138, 168, 198, 255, 133, 163, 194, 255, 106, 146, 186, 255, 57, 91, 137, 253, 21, 42, 85, 243, 21, 42, 85, 215, 21, 42, 85, 160, 21, 42, 85, 88, 21, 42, 85, 32, 21, 42, 85, 7, 21, 42, 85, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 2, 21, 42, 85, 12, 21, 42, 85, 44, 81, 116, 161, 157, 113, 147, 181, 252, 139, 163, 186, 255, 141, 165, 190, 255, 147, 173, 199, 255, 154, 181, 208, 255, 160, 189, 218, 255, 166, 195, 226, 255, 173, 204, 235, 255, 178, 212, 245, 255, 181, 215, 249, 255, 183, 217, 251, 255, 184, 218, 253, 255, 184, 218, 254, 255, 183, 220, 255, 255, 184, 219, 255, 255, 182, 219, 255, 255, 182, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 180, 218, 255, 255, 180, 218, 255, 255, 179, 217, 254, 255, 176, 214, 251, 255, 172, 210, 246, 255, 165, 201, 237, 255, 158, 193, 228, 255, 153, 187, 221, 255, 146, 180, 212, 255, 140, 172, 204, 255, 135, 165, 196, 255, 132, 162, 193, 255, 100, 141, 184, 255, 53, 85, 132, 252, 21, 42, 85, 243, 21, 42, 85, 221, 21, 42, 85, 172, 21, 42, 85, 104, 21, 42, 85, 44, 21, 42, 85, 12, 21, 42, 85, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 4, 21, 42, 85, 18, 21, 42, 85, 55, 39, 64, 108, 125, 104, 140, 178, 247, 126, 154, 182, 255, 136, 162, 187, 255, 140, 166, 192, 255, 146, 172, 200, 255, 151, 180, 208, 255, 156, 185, 216, 255, 159, 189, 221, 255, 162, 193, 225, 255, 164, 196, 229, 255, 171, 204, 238, 255, 173, 209, 244, 255, 176, 212, 248, 255, 176, 213, 250, 255, 178, 214, 252, 255, 179, 216, 254, 255, 179, 217, 255, 255, 179, 217, 255, 255, 178, 217, 255, 255, 176, 213, 252, 255, 169, 207, 244, 255, 159, 195, 231, 255, 154, 189, 225, 255, 151, 184, 219, 255, 144, 178, 211, 255, 139, 171, 204, 255, 134, 166, 197, 255, 130, 161, 192, 255, 117, 153, 187, 255, 90, 133, 179, 255, 29, 52, 96, 250, 21, 42, 85, 241, 21, 42, 85, 219, 21, 42, 85, 175, 21, 42, 85, 114, 21, 42, 85, 55, 21, 42, 85, 18, 21, 42, 85, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 5, 21, 42, 85, 21, 21, 42, 85, 57, 21, 42, 85, 111, 90, 129, 171, 228, 109, 143, 177, 254, 133, 158, 184, 255, 134, 160, 187, 255, 137, 164, 191, 255, 140, 168, 197, 255, 142, 172, 201, 255, 145, 175, 205, 255, 145, 178, 211, 255, 146, 181, 216, 255, 150, 186, 220, 255, 155, 189, 223, 255, 157, 192, 226, 255, 160, 195, 231, 255, 169, 205, 244, 255, 173, 213, 251, 255, 175, 214, 254, 255, 172, 211, 251, 255, 162, 200, 238, 255, 154, 189, 226, 255, 147, 181, 216, 255, 140, 174, 207, 255, 135, 168, 201, 255, 132, 163, 195, 255, 129, 160, 191, 255, 127, 158, 189, 255, 99, 139, 180, 255, 75, 116, 163, 254, 21, 42, 85, 248, 21, 42, 85, 237, 21, 42, 85, 212, 21, 42, 85, 167, 21, 42, 85, 111, 21, 42, 85, 57, 21, 42, 85, 21, 21, 42, 85, 5, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 6, 21, 42, 85, 20, 21, 42, 85, 50, 21, 42, 85, 97, 24, 46, 89, 155, 90, 130, 172, 244, 106, 141, 177, 255, 129, 156, 184, 255, 130, 157, 184, 255, 130, 158, 185, 255, 128, 158, 188, 255, 127, 160, 192, 255, 129, 163, 197, 255, 131, 165, 200, 255, 134, 168, 202, 255, 140, 172, 206, 255, 146, 180, 214, 255, 153, 187, 223, 255, 162, 199, 238, 255, 169, 208, 248, 255, 163, 202, 240, 255, 152, 189, 226, 255, 144, 178, 213, 255, 135, 168, 201, 255, 129, 161, 193, 255, 126, 157, 189, 255, 123, 156, 187, 255, 97, 139, 180, 255, 80, 123, 170, 254, 22, 44, 87, 249, 21, 42, 85, 242, 21, 42, 85, 227, 21, 42, 85, 199, 21, 42, 85, 153, 21, 42, 85, 97, 21, 42, 85, 50, 21, 42, 85, 20, 21, 42, 85, 6, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 4, 21, 42, 85, 15, 21, 42, 85, 39, 21, 42, 85, 81, 21, 42, 85, 131, 21, 42, 85, 175, 70, 106, 152, 232, 82, 119, 163, 247, 104, 139, 175, 253, 123, 152, 183, 255, 121, 152, 184, 255, 121, 152, 184, 255, 121, 153, 184, 255, 122, 153, 186, 255, 125, 157, 190, 255, 131, 164, 198, 255, 141, 176, 210, 255, 150, 188, 224, 255, 162, 200, 241, 255, 154, 193, 232, 255, 145, 182, 220, 255, 136, 171, 205, 255, 129, 162, 195, 255, 106, 145, 183, 255, 88, 132, 177, 255, 73, 116, 164, 254, 21, 42, 85, 248, 21, 42, 85, 242, 21, 42, 85, 230, 21, 42, 85, 209, 21, 42, 85, 175, 21, 42, 85, 131, 21, 42, 85, 81, 21, 42, 85, 39, 21, 42, 85, 15, 21, 42, 85, 4, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 3, 21, 42, 85, 10, 21, 42, 85, 28, 21, 42, 85, 58, 21, 42, 85, 95, 21, 42, 85, 139, 21, 42, 85, 176, 25, 47, 90, 207, 52, 82, 128, 234, 83, 116, 159, 247, 97, 129, 167, 251, 101, 131, 169, 253, 110, 141, 176, 254, 120, 151, 183, 255, 125, 157, 190, 255, 132, 166, 200, 255, 144, 180, 217, 255, 156, 197, 238, 255, 153, 192, 232, 255, 143, 180, 218, 255, 113, 153, 194, 255, 74, 115, 163, 254, 32, 57, 102, 249, 21, 42, 85, 243, 21, 42, 85, 236, 21, 42, 85, 225, 21, 42, 85, 206, 21, 42, 85, 176, 21, 42, 85, 139, 21, 42, 85, 95, 21, 42, 85, 58, 21, 42, 85, 28, 21, 42, 85, 10, 21, 42, 85, 3, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 2, 21, 42, 85, 6, 21, 42, 85, 16, 21, 42, 85, 33, 21, 42, 85, 61, 21, 42, 85, 94, 21, 42, 85, 129, 21, 42, 85, 149, 21, 42, 85, 174, 23, 45, 88, 206, 24, 46, 89, 230, 31, 53, 96, 244, 72, 100, 142, 249, 119, 151, 187, 254, 129, 163, 197, 255, 138, 176, 213, 255, 154, 196, 237, 255, 154, 194, 235, 255, 145, 182, 220, 255, 102, 137, 179, 254, 28, 50, 93, 245, 21, 42, 85, 231, 21, 42, 85, 210, 21, 42, 85, 187, 21, 42, 85, 164, 21, 42, 85, 133, 21, 42, 85, 94, 21, 42, 85, 61, 21, 42, 85, 33, 21, 42, 85, 16, 21, 42, 85, 6, 21, 42, 85, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 2, 21, 42, 85, 7, 21, 42, 85, 16, 21, 42, 85, 31, 21, 42, 85, 45, 21, 42, 85, 44, 21, 42, 85, 48, 21, 42, 85, 67, 21, 42, 85, 108, 22, 43, 86, 189, 27, 49, 92, 234, 86, 117, 158, 247, 127, 163, 198, 255, 134, 172, 209, 255, 147, 190, 231, 255, 153, 195, 237, 255, 145, 184, 223, 255, 98, 141, 190, 254, 23, 45, 88, 231, 21, 42, 85, 193, 21, 42, 85, 146, 21, 42, 85, 105, 21, 42, 85, 77, 21, 42, 85, 54, 21, 42, 85, 32, 21, 42, 85, 16, 21, 42, 85, 7, 21, 42, 85, 2, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 2, 21, 42, 85, 6, 21, 42, 85, 10, 21, 42, 85, 9, 21, 42, 85, 6, 21, 42, 85, 7, 21, 42, 85, 15, 21, 42, 85, 78, 22, 44, 87, 198, 48, 78, 124, 238, 126, 162, 198, 254, 130, 168, 205, 255, 142, 183, 224, 255, 152, 195, 239, 255, 144, 185, 226, 255, 82, 129, 181, 253, 21, 42, 85, 216, 21, 42, 85, 154, 21, 42, 85, 87, 21, 42, 85, 42, 21, 42, 85, 22, 21, 42, 85, 13, 21, 42, 85, 6, 21, 42, 85, 2, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 2, 21, 42, 85, 4, 21, 42, 85, 4, 21, 42, 85, 3, 21, 42, 85, 16, 21, 42, 85, 110, 21, 42, 85, 205, 74, 121, 172, 250, 120, 159, 198, 255, 133, 173, 213, 255, 143, 186, 229, 255, 142, 184, 227, 255, 75, 124, 178, 252, 21, 42, 85, 213, 21, 42, 85, 144, 21, 42, 85, 64, 21, 42, 85, 19, 21, 42, 85, 4, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 1, 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 24, 21, 42, 85, 130, 21, 42, 85, 208, 61, 103, 154, 243, 122, 162, 201, 255, 134, 177, 218, 255, 138, 181, 225, 255, 72, 121, 177, 252, 21, 42, 85, 216, 21, 42, 85, 146, 21, 42, 85, 62, 21, 42, 85, 15, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 3, 21, 42, 85, 37, 21, 42, 85, 121, 21, 42, 85, 185, 72, 122, 175, 250, 125, 167, 208, 255, 133, 175, 218, 255, 71, 121, 177, 252, 21, 42, 85, 216, 21, 42, 85, 148, 21, 42, 85, 63, 21, 42, 85, 15, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 4, 21, 42, 85, 26, 21, 42, 85, 88, 21, 42, 85, 174, 71, 122, 176, 249, 123, 168, 213, 255, 70, 122, 178, 251, 21, 42, 85, 217, 21, 42, 85, 148, 21, 42, 85, 62, 21, 42, 85, 15, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 1, 21, 42, 85, 2, 21, 42, 85, 17, 21, 42, 85, 68, 21, 42, 85, 149, 55, 96, 148, 223, 51, 89, 141, 232, 21, 42, 85, 207, 21, 42, 85, 144, 21, 42, 85, 60, 21, 42, 85, 14, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 2, 21, 42, 85, 12, 21, 42, 85, 43, 21, 42, 85, 101, 21, 42, 85, 150, 21, 42, 85, 160, 21, 42, 85, 117, 21, 42, 85, 50, 21, 42, 85, 12, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 2, 21, 42, 85, 10, 21, 42, 85, 32, 21, 42, 85, 66, 21, 42, 85, 86, 21, 42, 85, 67, 21, 42, 85, 30, 21, 42, 85, 8, 21, 42, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 42, 85, 2, 21, 42, 85, 8, 21, 42, 85, 19, 21, 42, 85, 29, 21, 42, 85, 25, 21, 42, 85, 12, 21, 42, 85, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DeviceNetwork(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 129, 165, 50, 117, 117, 156, 54, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 139, 157, 33, 136, 136, 152, 68, 145, 145, 166, 134, 160, 160, 184, 167, 178, 178, 202, 213, 174, 174, 206, 255, 173, 173, 206, 255, 137, 137, 180, 243, 0, 0, 0, 47, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 148, 148, 66, 145, 145, 145, 118, 176, 176, 178, 151, 179, 179, 189, 198, 195, 195, 204, 241, 208, 208, 222, 255, 200, 200, 216, 255, 190, 190, 211, 255, 169, 169, 198, 255, 152, 152, 187, 255, 138, 143, 182, 255, 139, 162, 201, 255, 129, 140, 188, 255, 0, 0, 0, 111, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, 149, 149, 115, 217, 217, 217, 255, 229, 229, 230, 255, 199, 199, 205, 255, 182, 182, 193, 255, 162, 162, 178, 255, 146, 150, 168, 255, 154, 168, 189, 255, 171, 197, 211, 255, 182, 217, 229, 255, 175, 230, 245, 255, 169, 237, 255, 255, 159, 232, 255, 255, 128, 155, 204, 255, 36, 36, 53, 165, 0, 0, 0, 51, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 136, 136, 90, 236, 236, 236, 255, 144, 156, 170, 255, 143, 180, 200, 255, 148, 197, 220, 255, 160, 223, 243, 255, 180, 243, 255, 255, 188, 247, 255, 255, 198, 252, 255, 255, 188, 247, 255, 255, 180, 243, 255, 255, 162, 234, 255, 255, 156, 231, 255, 255, 129, 172, 219, 255, 44, 44, 67, 177, 0, 0, 0, 62, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 88, 88, 28, 210, 210, 216, 255, 142, 191, 218, 255, 130, 218, 255, 255, 139, 222, 255, 255, 158, 231, 255, 255, 163, 234, 255, 255, 177, 242, 255, 255, 181, 244, 255, 255, 177, 242, 255, 255, 163, 234, 255, 255, 159, 232, 255, 255, 146, 226, 255, 255, 129, 177, 224, 255, 67, 67, 105, 200, 0, 0, 0, 74, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 188, 188, 197, 217, 165, 190, 212, 255, 117, 212, 255, 255, 136, 221, 255, 255, 143, 224, 255, 255, 158, 231, 255, 255, 159, 232, 255, 255, 159, 232, 255, 255, 159, 232, 255, 255, 159, 232, 255, 255, 149, 227, 255, 255, 136, 221, 255, 255, 120, 189, 239, 255, 71, 71, 116, 209, 0, 0, 0, 86, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 163, 163, 177, 174, 180, 192, 214, 255, 113, 210, 255, 255, 120, 213, 255, 255, 135, 220, 255, 255, 137, 222, 255, 255, 146, 226, 255, 255, 148, 227, 255, 255, 148, 227, 255, 255, 140, 223, 255, 255, 135, 220, 255, 255, 122, 214, 255, 255, 113, 198, 247, 255, 82, 82, 139, 222, 0, 0, 0, 97, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 121, 140, 113, 201, 201, 220, 255, 102, 204, 255, 255, 113, 210, 255, 255, 114, 211, 255, 255, 123, 215, 255, 255, 130, 218, 255, 255, 130, 218, 255, 255, 130, 218, 255, 255, 123, 215, 255, 255, 114, 211, 255, 255, 113, 210, 255, 255, 103, 205, 255, 255, 91, 91, 159, 234, 0, 0, 0, 107, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 106, 127, 63, 189, 189, 212, 255, 102, 182, 234, 255, 97, 201, 255, 255, 109, 208, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 109, 208, 255, 255, 97, 201, 255, 255, 91, 198, 255, 255, 91, 106, 177, 241, 0, 0, 0, 118, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 178, 178, 208, 255, 104, 175, 227, 255, 88, 197, 255, 255, 91, 198, 255, 255, 95, 200, 255, 255, 98, 202, 255, 255, 102, 204, 255, 255, 98, 202, 255, 255, 95, 200, 255, 255, 91, 198, 255, 255, 88, 197, 255, 255, 75, 190, 255, 255, 97, 127, 213, 255, 0, 0, 0, 128, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 160, 160, 192, 203, 116, 175, 228, 255, 68, 187, 255, 255, 77, 191, 255, 255, 82, 194, 255, 255, 85, 195, 255, 255, 85, 195, 255, 255, 85, 195, 255, 255, 82, 194, 255, 255, 77, 191, 255, 255, 68, 187, 255, 255, 65, 186, 255, 255, 84, 132, 222, 255, 0, 0, 0, 139, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 139, 175, 145, 131, 164, 215, 255, 54, 180, 255, 255, 61, 184, 255, 255, 67, 186, 255, 255, 68, 187, 255, 255, 68, 187, 255, 255, 68, 187, 255, 255, 67, 186, 255, 255, 61, 184, 255, 255, 92, 178, 241, 255, 114, 155, 220, 255, 111, 111, 194, 251, 0, 0, 0, 142, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 115, 156, 96, 153, 161, 208, 255, 45, 176, 255, 255, 45, 176, 255, 255, 45, 176, 255, 255, 45, 176, 255, 255, 45, 176, 255, 255, 64, 179, 251, 255, 117, 183, 239, 255, 141, 157, 217, 255, 110, 110, 185, 247, 47, 47, 94, 209, 10, 10, 19, 168, 0, 0, 0, 110, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 128, 45, 154, 154, 202, 255, 31, 162, 251, 255, 31, 169, 255, 255, 34, 170, 255, 255, 102, 192, 250, 255, 148, 189, 236, 255, 156, 156, 214, 255, 111, 111, 198, 255, 81, 81, 181, 255, 0, 0, 0, 176, 0, 0, 0, 134, 0, 0, 0, 87, 0, 0, 0, 46, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 148, 148, 197, 230, 69, 161, 238, 255, 135, 206, 254, 255, 173, 191, 232, 255, 155, 155, 211, 255, 110, 110, 199, 255, 103, 103, 203, 255, 100, 100, 202, 255, 96, 96, 198, 255, 27, 27, 55, 175, 0, 0, 0, 77, 0, 0, 0, 22, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 183, 17, 179, 179, 207, 147, 169, 169, 210, 255, 149, 149, 205, 255, 147, 147, 205, 255, 182, 182, 214, 255, 165, 165, 207, 255, 155, 155, 205, 255, 113, 113, 193, 255, 109, 109, 197, 255, 106, 106, 200, 255, 138, 138, 194, 249, 87, 87, 116, 136, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 170, 202, 178, 238, 238, 238, 255, 231, 231, 240, 255, 223, 223, 237, 255, 239, 239, 239, 255, 228, 228, 228, 255, 185, 185, 208, 255, 175, 175, 212, 255, 132, 132, 191, 255, 119, 119, 187, 255, 116, 116, 190, 255, 154, 154, 203, 255, 160, 160, 204, 255, 83, 83, 113, 134, 0, 0, 0, 26, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 177, 50, 199, 199, 215, 255, 239, 239, 239, 255, 249, 249, 249, 255, 249, 249, 249, 255, 239, 239, 239, 255, 228, 228, 228, 255, 206, 206, 216, 255, 171, 171, 205, 255, 162, 162, 197, 255, 129, 129, 178, 255, 128, 128, 179, 255, 157, 157, 200, 255, 164, 164, 206, 255, 116, 116, 159, 227, 0, 0, 0, 72, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 109, 154, 54, 199, 199, 212, 255, 233, 233, 233, 255, 239, 239, 239, 255, 239, 239, 239, 255, 234, 234, 234, 255, 226, 226, 226, 255, 212, 212, 219, 255, 174, 174, 204, 255, 187, 187, 203, 255, 140, 140, 166, 255, 138, 138, 168, 255, 160, 160, 198, 255, 163, 163, 206, 255, 107, 107, 149, 235, 0, 0, 0, 109, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 147, 147, 177, 218, 224, 224, 224, 255, 228, 228, 228, 255, 228, 228, 228, 255, 226, 226, 226, 255, 216, 216, 220, 255, 207, 207, 218, 255, 162, 162, 194, 255, 209, 209, 212, 255, 141, 141, 155, 255, 126, 126, 164, 255, 159, 159, 200, 255, 152, 152, 198, 255, 62, 62, 89, 210, 0, 0, 0, 112, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 36, 36, 52, 50, 133, 133, 160, 219, 201, 201, 211, 255, 214, 214, 220, 255, 212, 212, 219, 255, 207, 207, 218, 255, 199, 199, 216, 255, 189, 189, 211, 255, 146, 146, 185, 255, 151, 151, 189, 255, 172, 172, 209, 255, 143, 143, 187, 255, 68, 68, 97, 220, 0, 0, 0, 151, 0, 0, 0, 80, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 129, 165, 50, 117, 117, 156, 54, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 52, 59, 59, 89, 165, 118, 118, 144, 223, 151, 151, 180, 250, 173, 173, 199, 255, 171, 171, 199, 255, 168, 168, 198, 255, 151, 151, 189, 255, 123, 123, 157, 243, 75, 75, 106, 222, 18, 18, 28, 179, 0, 0, 0, 141, 0, 0, 0, 90, 0, 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 129, 165, 50, 117, 117, 156, 54, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 139, 157, 33, 136, 136, 152, 68, 145, 145, 166, 134, 160, 160, 184, 167, 178, 178, 202, 213, 174, 174, 206, 255, 173, 173, 206, 255, 137, 137, 180, 243, 0, 0, 0, 47, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0, 39, 0, 0, 0, 79, 0, 0, 0, 112, 0, 0, 0, 133, 0, 0, 0, 142, 38, 38, 38, 255, 0, 0, 0, 167, 0, 0, 0, 151, 0, 0, 0, 124, 0, 0, 0, 97, 0, 0, 0, 61, 0, 0, 0, 26, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 139, 157, 33, 136, 136, 152, 68, 145, 145, 166, 134, 160, 160, 184, 167, 178, 178, 202, 213, 174, 174, 206, 255, 173, 173, 206, 255, 137, 137, 180, 243, 0, 0, 0, 47, 0, 0, 0, 15, 0, 0, 0, 0, + 0, 0, 0, 0, 148, 148, 148, 66, 145, 145, 145, 118, 176, 176, 178, 151, 179, 179, 189, 198, 195, 195, 204, 241, 208, 208, 222, 255, 200, 200, 216, 255, 190, 190, 211, 255, 169, 169, 198, 255, 152, 152, 187, 255, 138, 143, 182, 255, 139, 162, 201, 255, 129, 140, 188, 255, 0, 0, 0, 111, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 31, 0, 0, 0, 42, 0, 0, 0, 46, 38, 38, 38, 255, 0, 0, 0, 119, 0, 0, 0, 81, 0, 0, 0, 37, 0, 0, 0, 24, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, 0, 0, 148, 148, 148, 66, 145, 145, 145, 118, 176, 176, 178, 151, 179, 179, 189, 198, 195, 195, 204, 241, 208, 208, 222, 255, 200, 200, 216, 255, 190, 190, 211, 255, 169, 169, 198, 255, 152, 152, 187, 255, 138, 143, 182, 255, 139, 162, 201, 255, 129, 140, 188, 255, 0, 0, 0, 111, 0, 0, 0, 36, 0, 0, 0, 0, + 149, 149, 149, 115, 217, 217, 217, 255, 229, 229, 230, 255, 199, 199, 205, 255, 182, 182, 193, 255, 162, 162, 178, 255, 146, 150, 168, 255, 154, 168, 189, 255, 171, 197, 211, 255, 182, 217, 229, 255, 175, 230, 245, 255, 169, 237, 255, 255, 159, 232, 255, 255, 128, 155, 204, 255, 36, 36, 53, 165, 0, 0, 0, 51, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 38, 38, 255, 0, 0, 0, 95, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, 149, 149, 115, 217, 217, 217, 255, 229, 229, 230, 255, 199, 199, 205, 255, 182, 182, 193, 255, 162, 162, 178, 255, 146, 150, 168, 255, 154, 168, 189, 255, 171, 197, 211, 255, 182, 217, 229, 255, 175, 230, 245, 255, 169, 237, 255, 255, 159, 232, 255, 255, 128, 155, 204, 255, 36, 36, 53, 165, 0, 0, 0, 51, 0, 0, 0, 2, + 136, 136, 136, 90, 236, 236, 236, 255, 144, 156, 170, 255, 143, 180, 200, 255, 148, 197, 220, 255, 160, 223, 243, 255, 180, 243, 255, 255, 188, 247, 255, 255, 198, 252, 255, 255, 188, 247, 255, 255, 180, 243, 255, 255, 162, 234, 255, 255, 156, 231, 255, 255, 129, 172, 219, 255, 44, 44, 67, 177, 0, 0, 0, 62, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 153, 153, 255, 153, 153, 153, 255, 153, 153, 153, 255, 0, 0, 0, 71, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 136, 136, 90, 236, 236, 236, 255, 144, 156, 170, 255, 143, 180, 200, 255, 148, 197, 220, 255, 160, 223, 243, 255, 180, 243, 255, 255, 188, 247, 255, 255, 198, 252, 255, 255, 188, 247, 255, 255, 180, 243, 255, 255, 162, 234, 255, 255, 156, 231, 255, 255, 129, 172, 219, 255, 44, 44, 67, 177, 0, 0, 0, 62, 0, 0, 0, 7, + 88, 88, 88, 28, 210, 210, 216, 255, 142, 191, 218, 255, 130, 218, 255, 255, 139, 222, 255, 255, 158, 231, 255, 255, 163, 234, 255, 255, 177, 242, 255, 255, 181, 244, 255, 255, 177, 242, 255, 255, 163, 234, 255, 255, 159, 232, 255, 255, 146, 226, 255, 255, 129, 177, 224, 255, 67, 67, 105, 200, 0, 0, 0, 74, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 153, 153, 255, 224, 241, 255, 255, 38, 38, 38, 255, 0, 0, 0, 119, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 88, 88, 28, 210, 210, 216, 255, 142, 191, 218, 255, 130, 218, 255, 255, 139, 222, 255, 255, 158, 231, 255, 255, 163, 234, 255, 255, 177, 242, 255, 255, 181, 244, 255, 255, 177, 242, 255, 255, 163, 234, 255, 255, 159, 232, 255, 255, 146, 226, 255, 255, 129, 177, 224, 255, 67, 67, 105, 200, 0, 0, 0, 74, 0, 0, 0, 13, + 0, 0, 0, 5, 188, 188, 197, 217, 165, 190, 212, 255, 117, 212, 255, 255, 136, 221, 255, 255, 143, 224, 255, 255, 158, 231, 255, 255, 159, 232, 255, 255, 159, 232, 255, 255, 159, 232, 255, 255, 159, 232, 255, 255, 149, 227, 255, 255, 136, 221, 255, 255, 120, 189, 239, 255, 71, 71, 116, 209, 0, 0, 0, 86, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 153, 153, 255, 224, 241, 255, 255, 38, 38, 38, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 188, 188, 197, 217, 165, 190, 212, 255, 117, 212, 255, 255, 136, 221, 255, 255, 143, 224, 255, 255, 158, 231, 255, 255, 159, 232, 255, 255, 159, 232, 255, 255, 159, 232, 255, 255, 159, 232, 255, 255, 149, 227, 255, 255, 136, 221, 255, 255, 120, 189, 239, 255, 71, 71, 116, 209, 0, 0, 0, 86, 0, 0, 0, 19, + 0, 0, 0, 1, 163, 163, 177, 174, 180, 192, 214, 255, 113, 210, 255, 255, 120, 213, 255, 255, 135, 220, 255, 255, 137, 222, 255, 255, 146, 226, 255, 255, 148, 227, 255, 255, 148, 227, 255, 255, 140, 223, 255, 255, 135, 220, 255, 255, 122, 214, 255, 255, 113, 198, 247, 255, 82, 82, 139, 222, 0, 0, 0, 97, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 153, 153, 255, 224, 241, 255, 255, 38, 38, 38, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 163, 163, 177, 174, 180, 192, 214, 255, 113, 210, 255, 255, 120, 213, 255, 255, 135, 220, 255, 255, 137, 222, 255, 255, 146, 226, 255, 255, 148, 227, 255, 255, 148, 227, 255, 255, 140, 223, 255, 255, 135, 220, 255, 255, 122, 214, 255, 255, 113, 198, 247, 255, 82, 82, 139, 222, 0, 0, 0, 97, 0, 0, 0, 24, + 0, 0, 0, 0, 121, 121, 140, 113, 201, 201, 220, 255, 102, 204, 255, 255, 113, 210, 255, 255, 114, 211, 255, 255, 123, 215, 255, 255, 130, 218, 255, 255, 130, 218, 255, 255, 130, 218, 255, 255, 123, 215, 255, 255, 114, 211, 255, 255, 113, 210, 255, 255, 103, 205, 255, 255, 91, 91, 159, 234, 0, 0, 0, 107, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 153, 153, 255, 224, 241, 255, 255, 38, 38, 38, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 121, 140, 113, 201, 201, 220, 255, 102, 204, 255, 255, 113, 210, 255, 255, 114, 211, 255, 255, 123, 215, 255, 255, 130, 218, 255, 255, 130, 218, 255, 255, 130, 218, 255, 255, 123, 215, 255, 255, 114, 211, 255, 255, 113, 210, 255, 255, 103, 205, 255, 255, 91, 91, 159, 234, 0, 0, 0, 107, 0, 0, 0, 29, + 0, 0, 0, 0, 106, 106, 127, 63, 189, 189, 212, 255, 102, 182, 234, 255, 97, 201, 255, 255, 109, 208, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 109, 208, 255, 255, 97, 201, 255, 255, 91, 198, 255, 255, 91, 106, 177, 241, 0, 0, 0, 118, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 153, 153, 255, 224, 241, 255, 255, 38, 38, 38, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 106, 127, 63, 189, 189, 212, 255, 102, 182, 234, 255, 97, 201, 255, 255, 109, 208, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 113, 210, 255, 255, 109, 208, 255, 255, 97, 201, 255, 255, 91, 198, 255, 255, 91, 106, 177, 241, 0, 0, 0, 118, 0, 0, 0, 34, + 0, 0, 0, 0, 0, 0, 0, 9, 178, 178, 208, 255, 104, 175, 227, 255, 88, 197, 255, 255, 91, 198, 255, 255, 95, 200, 255, 255, 98, 202, 255, 255, 102, 204, 255, 255, 98, 202, 255, 255, 95, 200, 255, 255, 91, 198, 255, 255, 88, 197, 255, 255, 75, 190, 255, 255, 97, 127, 213, 255, 0, 0, 0, 128, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 167, 37, 255, 217, 178, 64, 255, 219, 183, 75, 255, 213, 171, 46, 255, 210, 174, 71, 255, 0, 0, 0, 71, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 178, 178, 208, 255, 104, 175, 227, 255, 88, 197, 255, 255, 91, 198, 255, 255, 95, 200, 255, 255, 98, 202, 255, 255, 102, 204, 255, 255, 98, 202, 255, 255, 95, 200, 255, 255, 91, 198, 255, 255, 88, 197, 255, 255, 75, 190, 255, 255, 97, 127, 213, 255, 0, 0, 0, 128, 0, 0, 0, 40, + 0, 0, 0, 0, 0, 0, 0, 2, 160, 160, 192, 203, 116, 175, 228, 255, 68, 187, 255, 255, 77, 191, 255, 255, 82, 194, 255, 255, 85, 195, 255, 255, 85, 195, 255, 255, 85, 195, 255, 255, 82, 194, 255, 255, 77, 191, 255, 255, 68, 187, 255, 255, 65, 186, 255, 255, 84, 132, 222, 255, 0, 0, 0, 139, 0, 0, 0, 45, 153, 153, 153, 255, 153, 153, 153, 255, 153, 153, 153, 255, 153, 153, 153, 255, 153, 153, 153, 255, 216, 182, 77, 255, 239, 235, 218, 255, 255, 255, 255, 255, 245, 238, 212, 255, 190, 144, 21, 255, 153, 153, 153, 255, 153, 153, 153, 255, 153, 153, 153, 255, 153, 153, 153, 255, 153, 153, 153, 255, 0, 0, 0, 37, 157, 157, 189, 206, 116, 175, 228, 255, 68, 187, 255, 255, 77, 191, 255, 255, 82, 194, 255, 255, 85, 195, 255, 255, 85, 195, 255, 255, 85, 195, 255, 255, 82, 194, 255, 255, 77, 191, 255, 255, 68, 187, 255, 255, 65, 186, 255, 255, 84, 132, 222, 255, 0, 0, 0, 139, 0, 0, 0, 45, + 0, 0, 0, 0, 0, 0, 0, 0, 139, 139, 175, 145, 131, 164, 215, 255, 54, 180, 255, 255, 61, 184, 255, 255, 67, 186, 255, 255, 68, 187, 255, 255, 68, 187, 255, 255, 68, 187, 255, 255, 67, 186, 255, 255, 61, 184, 255, 255, 92, 178, 241, 255, 114, 155, 220, 255, 111, 111, 194, 255, 38, 38, 38, 255, 38, 38, 38, 255, 153, 153, 153, 255, 223, 241, 255, 255, 223, 241, 255, 255, 224, 241, 255, 255, 224, 241, 255, 255, 213, 173, 50, 255, 239, 229, 187, 255, 255, 247, 205, 255, 242, 228, 175, 255, 189, 143, 25, 255, 223, 241, 255, 255, 223, 241, 255, 255, 223, 241, 255, 255, 223, 241, 255, 255, 38, 38, 38, 255, 38, 38, 38, 255, 98, 98, 118, 255, 131, 164, 215, 255, 54, 180, 255, 255, 61, 184, 255, 255, 67, 186, 255, 255, 68, 187, 255, 255, 68, 187, 255, 255, 68, 187, 255, 255, 67, 186, 255, 255, 61, 184, 255, 255, 92, 178, 241, 255, 114, 155, 220, 255, 111, 111, 194, 251, 0, 0, 0, 142, 0, 0, 0, 46, + 0, 0, 0, 0, 0, 0, 0, 0, 115, 115, 156, 96, 153, 161, 208, 255, 45, 176, 255, 255, 45, 176, 255, 255, 45, 176, 255, 255, 45, 176, 255, 255, 45, 176, 255, 255, 64, 179, 251, 255, 117, 183, 239, 255, 141, 157, 217, 255, 110, 110, 185, 247, 47, 47, 94, 209, 10, 10, 19, 169, 0, 0, 0, 137, 0, 0, 0, 108, 38, 38, 38, 255, 38, 38, 38, 255, 38, 38, 38, 255, 38, 38, 38, 255, 38, 38, 38, 255, 217, 173, 21, 255, 235, 193, 43, 255, 223, 184, 42, 255, 234, 192, 40, 255, 175, 126, 5, 255, 38, 38, 38, 255, 38, 38, 38, 255, 38, 38, 38, 255, 38, 38, 38, 255, 38, 38, 38, 255, 0, 0, 0, 167, 64, 64, 87, 171, 153, 161, 208, 255, 45, 176, 255, 255, 45, 176, 255, 255, 45, 176, 255, 255, 45, 176, 255, 255, 45, 176, 255, 255, 64, 179, 251, 255, 117, 183, 239, 255, 141, 157, 217, 255, 110, 110, 185, 247, 47, 47, 94, 209, 10, 10, 19, 168, 0, 0, 0, 110, 0, 0, 0, 34, + 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 128, 45, 154, 154, 202, 255, 31, 162, 251, 255, 31, 169, 255, 255, 34, 170, 255, 255, 102, 192, 250, 255, 148, 189, 236, 255, 156, 156, 214, 255, 111, 111, 198, 255, 81, 81, 181, 255, 0, 0, 0, 176, 0, 0, 0, 134, 0, 0, 0, 88, 0, 0, 0, 59, 0, 0, 0, 49, 0, 0, 0, 71, 0, 0, 0, 119, 0, 0, 0, 143, 0, 0, 0, 143, 0, 0, 0, 143, 169, 118, 1, 255, 163, 113, 1, 255, 163, 113, 1, 255, 168, 117, 2, 255, 162, 111, 1, 255, 0, 0, 0, 179, 0, 0, 0, 155, 0, 0, 0, 143, 0, 0, 0, 143, 0, 0, 0, 143, 0, 0, 0, 119, 39, 39, 57, 102, 154, 154, 202, 255, 31, 162, 251, 255, 31, 169, 255, 255, 34, 170, 255, 255, 102, 192, 250, 255, 148, 189, 236, 255, 156, 156, 214, 255, 111, 111, 198, 255, 81, 81, 181, 255, 0, 0, 0, 176, 0, 0, 0, 134, 0, 0, 0, 87, 0, 0, 0, 46, 0, 0, 0, 12, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 148, 148, 197, 230, 69, 161, 238, 255, 135, 206, 254, 255, 173, 191, 232, 255, 155, 155, 211, 255, 110, 110, 199, 255, 103, 103, 203, 255, 100, 100, 202, 255, 96, 96, 198, 255, 27, 27, 55, 175, 0, 0, 0, 77, 0, 0, 0, 22, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 11, 0, 0, 0, 35, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 71, 0, 0, 0, 119, 0, 0, 0, 143, 0, 0, 0, 143, 0, 0, 0, 143, 0, 0, 0, 119, 0, 0, 0, 71, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 35, 0, 0, 0, 18, 148, 148, 197, 230, 69, 161, 238, 255, 135, 206, 254, 255, 173, 191, 232, 255, 155, 155, 211, 255, 110, 110, 199, 255, 103, 103, 203, 255, 100, 100, 202, 255, 96, 96, 198, 255, 27, 27, 55, 175, 0, 0, 0, 77, 0, 0, 0, 22, 0, 0, 0, 6, 0, 0, 0, 1, + 0, 0, 0, 0, 135, 135, 183, 17, 179, 179, 207, 147, 169, 169, 210, 255, 149, 149, 205, 255, 147, 147, 205, 255, 182, 182, 214, 255, 165, 165, 207, 255, 155, 155, 205, 255, 113, 113, 193, 255, 109, 109, 197, 255, 106, 106, 200, 255, 138, 138, 194, 249, 87, 87, 116, 136, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 35, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 35, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 183, 17, 179, 179, 207, 147, 169, 169, 210, 255, 149, 149, 205, 255, 147, 147, 205, 255, 182, 182, 214, 255, 165, 165, 207, 255, 155, 155, 205, 255, 113, 113, 193, 255, 109, 109, 197, 255, 106, 106, 200, 255, 138, 138, 194, 249, 87, 87, 116, 136, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 170, 170, 202, 178, 238, 238, 238, 255, 231, 231, 240, 255, 223, 223, 237, 255, 239, 239, 239, 255, 228, 228, 228, 255, 185, 185, 208, 255, 175, 175, 212, 255, 132, 132, 191, 255, 119, 119, 187, 255, 116, 116, 190, 255, 154, 154, 203, 255, 160, 160, 204, 255, 83, 83, 113, 134, 0, 0, 0, 26, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 170, 202, 178, 238, 238, 238, 255, 231, 231, 240, 255, 223, 223, 237, 255, 239, 239, 239, 255, 228, 228, 228, 255, 185, 185, 208, 255, 175, 175, 212, 255, 132, 132, 191, 255, 119, 119, 187, 255, 116, 116, 190, 255, 154, 154, 203, 255, 160, 160, 204, 255, 83, 83, 113, 134, 0, 0, 0, 26, 0, 0, 0, 4, + 128, 128, 177, 50, 199, 199, 215, 255, 239, 239, 239, 255, 249, 249, 249, 255, 249, 249, 249, 255, 239, 239, 239, 255, 228, 228, 228, 255, 206, 206, 216, 255, 171, 171, 205, 255, 162, 162, 197, 255, 129, 129, 178, 255, 128, 128, 179, 255, 157, 157, 200, 255, 164, 164, 206, 255, 116, 116, 159, 227, 0, 0, 0, 72, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 177, 50, 199, 199, 215, 255, 239, 239, 239, 255, 249, 249, 249, 255, 249, 249, 249, 255, 239, 239, 239, 255, 228, 228, 228, 255, 206, 206, 216, 255, 171, 171, 205, 255, 162, 162, 197, 255, 129, 129, 178, 255, 128, 128, 179, 255, 157, 157, 200, 255, 164, 164, 206, 255, 116, 116, 159, 227, 0, 0, 0, 72, 0, 0, 0, 16, + 109, 109, 154, 54, 199, 199, 212, 255, 233, 233, 233, 255, 239, 239, 239, 255, 239, 239, 239, 255, 234, 234, 234, 255, 226, 226, 226, 255, 212, 212, 219, 255, 174, 174, 204, 255, 187, 187, 203, 255, 140, 140, 166, 255, 138, 138, 168, 255, 160, 160, 198, 255, 163, 163, 206, 255, 107, 107, 149, 235, 0, 0, 0, 109, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 109, 154, 54, 199, 199, 212, 255, 233, 233, 233, 255, 239, 239, 239, 255, 239, 239, 239, 255, 234, 234, 234, 255, 226, 226, 226, 255, 212, 212, 219, 255, 174, 174, 204, 255, 187, 187, 203, 255, 140, 140, 166, 255, 138, 138, 168, 255, 160, 160, 198, 255, 163, 163, 206, 255, 107, 107, 149, 235, 0, 0, 0, 109, 0, 0, 0, 30, + 0, 0, 0, 7, 147, 147, 177, 218, 224, 224, 224, 255, 228, 228, 228, 255, 228, 228, 228, 255, 226, 226, 226, 255, 216, 216, 220, 255, 207, 207, 218, 255, 162, 162, 194, 255, 209, 209, 212, 255, 141, 141, 155, 255, 126, 126, 164, 255, 159, 159, 200, 255, 152, 152, 198, 255, 62, 62, 89, 210, 0, 0, 0, 112, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 147, 147, 177, 218, 224, 224, 224, 255, 228, 228, 228, 255, 228, 228, 228, 255, 226, 226, 226, 255, 216, 216, 220, 255, 207, 207, 218, 255, 162, 162, 194, 255, 209, 209, 212, 255, 141, 141, 155, 255, 126, 126, 164, 255, 159, 159, 200, 255, 152, 152, 198, 255, 62, 62, 89, 210, 0, 0, 0, 112, 0, 0, 0, 31, + 0, 0, 0, 2, 36, 36, 52, 50, 133, 133, 160, 219, 201, 201, 211, 255, 214, 214, 220, 255, 212, 212, 219, 255, 207, 207, 218, 255, 199, 199, 216, 255, 189, 189, 211, 255, 146, 146, 185, 255, 151, 151, 189, 255, 172, 172, 209, 255, 143, 143, 187, 255, 68, 68, 97, 220, 0, 0, 0, 151, 0, 0, 0, 80, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 36, 36, 52, 50, 133, 133, 160, 219, 201, 201, 211, 255, 214, 214, 220, 255, 212, 212, 219, 255, 207, 207, 218, 255, 199, 199, 216, 255, 189, 189, 211, 255, 146, 146, 185, 255, 151, 151, 189, 255, 172, 172, 209, 255, 143, 143, 187, 255, 68, 68, 97, 220, 0, 0, 0, 151, 0, 0, 0, 80, 0, 0, 0, 19, + 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 52, 59, 59, 89, 165, 118, 118, 144, 223, 151, 151, 180, 250, 173, 173, 199, 255, 171, 171, 199, 255, 168, 168, 198, 255, 151, 151, 189, 255, 123, 123, 157, 243, 75, 75, 106, 222, 18, 18, 28, 179, 0, 0, 0, 141, 0, 0, 0, 90, 0, 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 52, 59, 59, 89, 165, 118, 118, 144, 223, 151, 151, 180, 250, 173, 173, 199, 255, 171, 171, 199, 255, 168, 168, 198, 255, 151, 151, 189, 255, 123, 123, 157, 243, 75, 75, 106, 222, 18, 18, 28, 179, 0, 0, 0, 141, 0, 0, 0, 90, 0, 0, 0, 34, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0, 39, 0, 0, 0, 79, 0, 0, 0, 112, 0, 0, 0, 133, 0, 0, 0, 142, 0, 0, 0, 143, 0, 0, 0, 143, 0, 0, 0, 139, 0, 0, 0, 124, 0, 0, 0, 97, 0, 0, 0, 61, 0, 0, 0, 26, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0, 39, 0, 0, 0, 79, 0, 0, 0, 112, 0, 0, 0, 133, 0, 0, 0, 142, 0, 0, 0, 143, 0, 0, 0, 143, 0, 0, 0, 139, 0, 0, 0, 124, 0, 0, 0, 97, 0, 0, 0, 61, 0, 0, 0, 26, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 31, 0, 0, 0, 42, 0, 0, 0, 46, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 45, 0, 0, 0, 37, 0, 0, 0, 24, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 31, 0, 0, 0, 42, 0, 0, 0, 46, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 45, 0, 0, 0, 37, 0, 0, 0, 24, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DeviceCamera(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 4, 0, 0, 85, 3, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 51, 20, 42, 45, 51, 68, 30, 35, 52, 43, 19, 28, 47, 27, 23, 35, 46, 22, 15, 30, 60, 17, 20, 39, 59, 13, 28, 28, 57, 9, 0, 51, 51, 5, 0, 0, 128, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 43, 51, 54, 43, 45, 51, 90, 46, 48, 51, 152, 47, 48, 51, 182, 49, 50, 51, 220, 51, 51, 51, 255, 74, 74, 74, 255, 85, 85, 85, 255, 49, 50, 51, 234, 46, 47, 51, 189, 42, 45, 51, 151, 39, 43, 52, 107, 24, 30, 53, 43, 18, 35, 53, 29, 26, 26, 51, 20, 16, 32, 48, 16, 20, 39, 59, 13, 28, 28, 57, 9, 0, 64, 64, 4, 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 16, 41, 46, 50, 88, 47, 48, 51, 151, 47, 48, 51, 182, 48, 49, 51, 208, 51, 51, 51, 255, 74, 74, 74, 255, 98, 98, 98, 255, 144, 144, 144, 255, 167, 167, 167, 255, 188, 188, 188, 255, 209, 209, 209, 255, 192, 192, 192, 255, 167, 167, 167, 255, 191, 191, 191, 255, 169, 169, 169, 255, 162, 162, 162, 255, 128, 128, 128, 255, 95, 95, 95, 255, 47, 49, 51, 214, 45, 47, 51, 177, 41, 45, 50, 138, 40, 44, 51, 105, 19, 31, 50, 41, 20, 29, 49, 26, 20, 39, 59, 13, 0, 51, 51, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 16, 51, 51, 51, 64, 46, 48, 51, 137, 47, 48, 51, 168, 48, 49, 51, 208, 50, 51, 51, 244, 75, 75, 75, 255, 99, 99, 99, 255, 147, 147, 147, 255, 169, 169, 169, 255, 193, 193, 193, 255, 239, 239, 239, 255, 221, 221, 221, 255, 178, 178, 178, 255, 152, 152, 152, 255, 135, 135, 135, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 110, 110, 110, 255, 133, 133, 133, 255, 164, 164, 164, 255, 209, 209, 209, 255, 191, 191, 191, 255, 158, 158, 158, 255, 125, 125, 125, 255, 61, 61, 62, 246, 38, 43, 52, 136, 21, 31, 52, 49, 23, 35, 46, 22, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 64, 51, 51, 51, 96, 46, 48, 51, 155, 49, 49, 51, 207, 50, 51, 51, 244, 76, 76, 76, 255, 100, 100, 100, 255, 149, 149, 149, 255, 173, 173, 173, 255, 197, 197, 197, 255, 244, 244, 244, 255, 243, 243, 243, 255, 242, 242, 242, 255, 241, 241, 241, 255, 240, 240, 240, 255, 239, 239, 239, 255, 237, 237, 237, 255, 220, 220, 220, 255, 186, 186, 186, 255, 152, 152, 152, 255, 118, 118, 118, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 134, 134, 134, 255, 157, 157, 157, 255, 172, 172, 172, 255, 194, 194, 194, 255, 203, 203, 203, 255, 170, 170, 170, 255, 149, 149, 149, 255, 126, 126, 126, 255, 123, 123, 123, 255, 102, 102, 102, 255, 57, 57, 57, 255, 29, 37, 51, 141, 22, 30, 48, 59, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 48, 51, 51, 51, 80, 51, 51, 51, 128, 49, 50, 51, 207, 50, 50, 51, 232, 64, 64, 64, 255, 101, 101, 101, 255, 151, 151, 151, 255, 176, 176, 176, 255, 200, 200, 200, 255, 249, 249, 249, 255, 248, 248, 248, 255, 247, 247, 247, 255, 246, 246, 246, 255, 245, 245, 245, 255, 244, 244, 244, 255, 243, 243, 243, 255, 242, 242, 242, 255, 241, 241, 241, 255, 240, 240, 240, 255, 239, 239, 239, 255, 237, 237, 237, 255, 237, 237, 237, 255, 236, 236, 236, 255, 234, 234, 234, 255, 234, 234, 234, 255, 233, 233, 233, 255, 215, 215, 215, 255, 198, 198, 198, 255, 214, 214, 214, 255, 195, 195, 195, 255, 172, 172, 172, 255, 146, 146, 146, 255, 121, 121, 121, 255, 114, 114, 114, 255, 122, 122, 122, 255, 115, 115, 115, 255, 115, 115, 115, 255, 96, 96, 96, 255, 77, 77, 77, 255, 154, 154, 154, 255, 109, 109, 109, 255, 43, 46, 51, 230, 19, 29, 51, 106, + 0, 0, 0, 0, 0, 0, 0, 0, 46, 48, 50, 96, 78, 79, 79, 229, 128, 128, 128, 255, 77, 77, 77, 255, 115, 115, 115, 255, 204, 204, 204, 255, 241, 241, 241, 255, 253, 253, 253, 255, 214, 214, 214, 255, 176, 176, 176, 255, 177, 177, 177, 255, 164, 164, 164, 255, 202, 202, 202, 255, 151, 151, 151, 255, 200, 200, 200, 255, 172, 172, 172, 255, 220, 220, 220, 255, 243, 243, 243, 255, 242, 242, 242, 255, 241, 241, 241, 255, 240, 240, 240, 255, 239, 239, 239, 255, 237, 237, 237, 255, 237, 237, 237, 255, 236, 236, 236, 255, 234, 234, 234, 255, 234, 234, 234, 255, 199, 199, 199, 255, 164, 164, 164, 255, 137, 137, 137, 255, 123, 123, 123, 255, 104, 104, 104, 255, 124, 124, 124, 255, 123, 123, 123, 255, 110, 110, 110, 255, 90, 90, 90, 255, 71, 71, 71, 255, 51, 51, 51, 255, 51, 51, 51, 255, 54, 54, 54, 255, 64, 64, 64, 255, 61, 61, 61, 255, 157, 157, 157, 255, 130, 130, 130, 255, 43, 46, 51, 244, 18, 30, 51, 145, + 0, 0, 0, 0, 46, 47, 51, 97, 127, 127, 127, 255, 242, 242, 242, 255, 255, 255, 255, 255, 255, 255, 255, 255, 216, 216, 216, 255, 178, 178, 178, 255, 165, 165, 165, 255, 101, 101, 101, 255, 87, 87, 87, 255, 234, 234, 234, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 234, 234, 234, 255, 75, 75, 75, 255, 159, 159, 159, 255, 241, 241, 241, 255, 240, 240, 240, 255, 239, 239, 239, 255, 237, 237, 237, 255, 190, 190, 190, 255, 155, 155, 155, 255, 120, 120, 120, 255, 125, 125, 125, 255, 99, 99, 99, 255, 126, 126, 126, 255, 146, 146, 146, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 78, 78, 78, 255, 57, 57, 57, 255, 67, 67, 67, 255, 77, 77, 77, 255, 86, 86, 86, 255, 96, 96, 96, 255, 102, 102, 102, 255, 102, 102, 102, 255, 77, 77, 77, 255, 160, 160, 160, 255, 133, 133, 133, 255, 43, 46, 51, 248, 19, 28, 52, 163, + 51, 51, 51, 16, 63, 63, 64, 243, 240, 240, 240, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 64, 64, 64, 255, 63, 63, 63, 255, 131, 131, 131, 255, 174, 174, 174, 255, 185, 185, 185, 255, 185, 185, 185, 255, 185, 185, 185, 255, 174, 174, 174, 255, 120, 120, 120, 255, 51, 51, 51, 255, 86, 86, 86, 255, 157, 157, 157, 255, 122, 122, 122, 255, 115, 115, 115, 255, 100, 100, 100, 255, 121, 121, 121, 255, 142, 142, 142, 255, 163, 163, 163, 255, 163, 163, 163, 255, 147, 147, 147, 255, 136, 136, 136, 255, 128, 128, 128, 255, 128, 128, 128, 255, 163, 163, 163, 255, 163, 163, 163, 255, 163, 163, 163, 255, 125, 125, 125, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 77, 77, 77, 255, 163, 163, 163, 255, 135, 135, 135, 255, 43, 46, 51, 249, 18, 29, 52, 168, + 51, 51, 51, 96, 126, 126, 126, 255, 252, 252, 252, 255, 252, 252, 252, 255, 252, 252, 252, 255, 252, 252, 252, 255, 252, 252, 252, 255, 252, 252, 252, 255, 252, 252, 252, 255, 227, 227, 227, 255, 139, 139, 139, 255, 89, 89, 89, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 73, 73, 73, 255, 102, 102, 102, 255, 123, 123, 123, 255, 144, 144, 144, 255, 166, 166, 166, 255, 166, 166, 166, 255, 166, 166, 166, 255, 166, 166, 166, 255, 166, 166, 166, 255, 166, 166, 166, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 118, 118, 118, 255, 166, 166, 166, 255, 166, 166, 166, 255, 166, 166, 166, 255, 134, 134, 134, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 96, 96, 96, 255, 86, 86, 86, 255, 77, 77, 77, 255, 74, 74, 74, 255, 87, 87, 87, 255, 166, 166, 166, 255, 137, 137, 137, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 175, 157, 157, 157, 255, 244, 244, 244, 255, 250, 250, 250, 255, 250, 250, 250, 255, 250, 250, 250, 255, 250, 250, 250, 255, 250, 250, 250, 255, 250, 250, 250, 255, 250, 250, 250, 255, 250, 250, 250, 255, 250, 250, 250, 255, 250, 250, 250, 255, 250, 250, 250, 255, 225, 225, 225, 255, 98, 98, 98, 255, 153, 153, 153, 255, 168, 168, 168, 255, 168, 168, 168, 255, 168, 168, 168, 255, 168, 168, 168, 255, 168, 168, 168, 255, 168, 168, 168, 255, 168, 168, 168, 255, 168, 168, 168, 255, 168, 168, 168, 255, 168, 168, 168, 255, 102, 102, 102, 255, 102, 102, 102, 255, 114, 114, 114, 255, 123, 123, 123, 255, 143, 143, 143, 255, 168, 168, 168, 255, 168, 168, 168, 255, 168, 168, 168, 255, 122, 122, 122, 255, 73, 73, 73, 255, 78, 78, 78, 255, 91, 91, 91, 255, 110, 110, 110, 255, 131, 131, 131, 255, 153, 153, 153, 255, 168, 168, 168, 255, 168, 168, 168, 255, 168, 168, 168, 255, 139, 139, 139, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 152, 152, 152, 255, 153, 153, 153, 255, 177, 177, 177, 255, 207, 207, 207, 255, 237, 237, 237, 255, 249, 249, 249, 255, 249, 249, 249, 255, 249, 249, 249, 255, 249, 249, 249, 255, 249, 249, 249, 255, 249, 249, 249, 255, 249, 249, 249, 255, 249, 249, 249, 255, 88, 88, 88, 255, 156, 156, 156, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 154, 154, 154, 255, 171, 171, 171, 255, 197, 197, 197, 255, 224, 224, 224, 255, 239, 239, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 239, 239, 255, 209, 209, 209, 255, 185, 185, 185, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 171, 171, 171, 255, 141, 141, 141, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 174, 174, 174, 255, 229, 229, 229, 255, 194, 194, 194, 255, 165, 165, 165, 255, 153, 153, 153, 255, 171, 171, 171, 255, 206, 206, 206, 255, 229, 229, 229, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 186, 186, 186, 255, 82, 82, 82, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 193, 193, 193, 255, 241, 241, 241, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 251, 251, 251, 255, 231, 231, 231, 255, 184, 184, 184, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 143, 143, 143, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 149, 149, 149, 255, 246, 246, 246, 255, 246, 246, 246, 255, 246, 246, 246, 255, 229, 229, 229, 255, 200, 200, 200, 255, 170, 170, 170, 255, 153, 153, 153, 255, 165, 165, 165, 255, 229, 229, 229, 255, 246, 246, 246, 255, 246, 246, 246, 255, 149, 149, 149, 255, 67, 67, 67, 255, 114, 114, 114, 255, 153, 153, 153, 255, 177, 177, 177, 255, 177, 177, 177, 255, 177, 177, 177, 255, 177, 177, 177, 255, 177, 177, 177, 255, 177, 177, 177, 255, 177, 177, 177, 255, 177, 177, 177, 255, 177, 177, 177, 255, 216, 216, 216, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 235, 235, 235, 255, 198, 198, 198, 255, 235, 235, 235, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 242, 242, 242, 255, 190, 190, 190, 255, 177, 177, 177, 255, 177, 177, 177, 255, 177, 177, 177, 255, 177, 177, 177, 255, 177, 177, 177, 255, 146, 146, 146, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 148, 148, 148, 255, 245, 245, 245, 255, 245, 245, 245, 255, 182, 182, 182, 255, 233, 233, 233, 255, 245, 245, 245, 255, 245, 245, 245, 255, 233, 233, 233, 255, 153, 153, 153, 255, 222, 222, 222, 255, 245, 245, 245, 255, 245, 245, 245, 255, 199, 199, 199, 255, 170, 170, 170, 255, 170, 170, 170, 255, 147, 147, 147, 255, 110, 110, 110, 255, 140, 140, 140, 255, 180, 180, 180, 255, 180, 180, 180, 255, 180, 180, 180, 255, 180, 180, 180, 255, 180, 180, 180, 255, 180, 180, 180, 255, 218, 218, 218, 255, 242, 242, 242, 255, 242, 242, 242, 255, 242, 242, 242, 255, 230, 230, 230, 255, 147, 147, 147, 255, 75, 75, 75, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 75, 75, 75, 255, 147, 147, 147, 255, 242, 242, 242, 255, 242, 242, 242, 255, 238, 238, 238, 255, 188, 188, 188, 255, 180, 180, 180, 255, 180, 180, 180, 255, 180, 180, 180, 255, 180, 180, 180, 255, 148, 148, 148, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 147, 147, 147, 255, 243, 243, 243, 255, 243, 243, 243, 255, 153, 153, 153, 255, 221, 221, 221, 255, 243, 243, 243, 255, 243, 243, 243, 255, 243, 243, 243, 255, 153, 153, 153, 255, 221, 221, 221, 255, 243, 243, 243, 255, 243, 243, 243, 255, 198, 198, 198, 255, 170, 170, 170, 255, 187, 187, 187, 255, 204, 204, 204, 255, 221, 221, 221, 255, 169, 169, 169, 255, 113, 113, 113, 255, 183, 183, 183, 255, 183, 183, 183, 255, 183, 183, 183, 255, 183, 183, 183, 255, 207, 207, 207, 255, 237, 237, 237, 255, 237, 237, 237, 255, 237, 237, 237, 255, 191, 191, 191, 255, 63, 63, 63, 255, 51, 51, 51, 255, 70, 70, 70, 255, 96, 96, 96, 255, 102, 102, 102, 255, 96, 96, 96, 255, 64, 64, 64, 255, 51, 51, 51, 255, 86, 86, 86, 255, 226, 226, 226, 255, 237, 237, 237, 255, 223, 223, 223, 255, 183, 183, 183, 255, 183, 183, 183, 255, 183, 183, 183, 255, 183, 183, 183, 255, 150, 150, 150, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 146, 146, 146, 255, 242, 242, 242, 255, 242, 242, 242, 255, 153, 153, 153, 255, 219, 219, 219, 255, 242, 242, 242, 255, 242, 242, 242, 255, 242, 242, 242, 255, 153, 153, 153, 255, 219, 219, 219, 255, 242, 242, 242, 255, 242, 242, 242, 255, 197, 197, 197, 255, 170, 170, 170, 255, 187, 187, 187, 255, 204, 204, 204, 255, 221, 221, 221, 255, 242, 242, 242, 255, 191, 191, 191, 255, 119, 119, 119, 255, 186, 186, 186, 255, 186, 186, 186, 255, 192, 192, 192, 255, 233, 233, 233, 255, 233, 233, 233, 255, 233, 233, 233, 255, 188, 188, 188, 255, 51, 51, 51, 255, 63, 63, 63, 255, 127, 127, 127, 255, 152, 152, 152, 255, 152, 152, 152, 255, 152, 152, 152, 255, 152, 152, 152, 255, 152, 152, 152, 255, 107, 107, 107, 255, 57, 57, 57, 255, 85, 85, 85, 255, 222, 222, 222, 255, 233, 233, 233, 255, 204, 204, 204, 255, 186, 186, 186, 255, 186, 186, 186, 255, 186, 186, 186, 255, 152, 152, 152, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 146, 146, 146, 255, 240, 240, 240, 255, 240, 240, 240, 255, 153, 153, 153, 255, 218, 218, 218, 255, 240, 240, 240, 255, 240, 240, 240, 255, 240, 240, 240, 255, 153, 153, 153, 255, 218, 218, 218, 255, 240, 240, 240, 255, 240, 240, 240, 255, 197, 197, 197, 255, 170, 170, 170, 255, 187, 187, 187, 255, 204, 204, 204, 255, 221, 221, 221, 255, 242, 242, 242, 255, 255, 255, 255, 255, 85, 85, 85, 255, 188, 188, 188, 255, 188, 188, 188, 255, 218, 218, 218, 255, 228, 228, 228, 255, 228, 228, 228, 255, 206, 206, 206, 255, 62, 62, 62, 255, 69, 69, 69, 255, 142, 142, 142, 255, 136, 136, 136, 255, 88, 88, 88, 255, 57, 57, 57, 255, 51, 51, 51, 255, 63, 63, 63, 255, 100, 100, 100, 255, 148, 148, 148, 255, 124, 124, 124, 255, 51, 51, 51, 255, 140, 140, 140, 255, 228, 228, 228, 255, 221, 221, 221, 255, 188, 188, 188, 255, 188, 188, 188, 255, 188, 188, 188, 255, 154, 154, 154, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 145, 145, 145, 255, 239, 239, 239, 255, 239, 239, 239, 255, 153, 153, 153, 255, 217, 217, 217, 255, 239, 239, 239, 255, 239, 239, 239, 255, 239, 239, 239, 255, 153, 153, 153, 255, 217, 217, 217, 255, 239, 239, 239, 255, 239, 239, 239, 255, 196, 196, 196, 255, 170, 170, 170, 255, 181, 181, 181, 255, 179, 179, 179, 255, 217, 217, 217, 255, 242, 242, 242, 255, 255, 255, 255, 255, 86, 86, 86, 255, 191, 191, 191, 255, 197, 197, 197, 255, 225, 225, 225, 255, 225, 225, 225, 255, 225, 225, 225, 255, 106, 106, 106, 255, 57, 57, 57, 255, 139, 139, 139, 255, 127, 127, 127, 255, 57, 57, 57, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 69, 69, 69, 255, 145, 145, 145, 255, 98, 98, 98, 255, 62, 62, 62, 255, 214, 214, 214, 255, 225, 225, 225, 255, 195, 195, 195, 255, 191, 191, 191, 255, 191, 191, 191, 255, 156, 156, 156, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 144, 144, 144, 255, 237, 237, 237, 255, 237, 237, 237, 255, 153, 153, 153, 255, 216, 216, 216, 255, 237, 237, 237, 255, 237, 237, 237, 255, 237, 237, 237, 255, 153, 153, 153, 255, 216, 216, 216, 255, 237, 237, 237, 255, 237, 237, 237, 255, 195, 195, 195, 255, 170, 170, 170, 255, 172, 172, 172, 255, 153, 153, 153, 255, 204, 204, 204, 255, 242, 242, 242, 255, 255, 255, 255, 255, 87, 87, 87, 255, 194, 194, 194, 255, 209, 209, 209, 255, 221, 221, 221, 255, 221, 221, 221, 255, 200, 200, 200, 255, 51, 51, 51, 255, 107, 107, 107, 255, 135, 135, 135, 255, 57, 57, 57, 255, 51, 51, 51, 255, 67, 67, 67, 255, 96, 96, 96, 255, 102, 102, 102, 255, 89, 89, 89, 255, 61, 61, 61, 255, 51, 51, 51, 255, 96, 96, 96, 255, 130, 130, 130, 255, 51, 51, 51, 255, 157, 157, 157, 255, 221, 221, 221, 255, 204, 204, 204, 255, 194, 194, 194, 255, 194, 194, 194, 255, 158, 158, 158, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 143, 143, 143, 255, 236, 236, 236, 255, 236, 236, 236, 255, 153, 153, 153, 255, 215, 215, 215, 255, 236, 236, 236, 255, 236, 236, 236, 255, 220, 220, 220, 255, 153, 153, 153, 255, 215, 215, 215, 255, 236, 236, 236, 255, 236, 236, 236, 255, 194, 194, 194, 255, 170, 170, 170, 255, 185, 185, 185, 255, 191, 191, 191, 255, 221, 221, 221, 255, 242, 242, 242, 255, 255, 255, 255, 255, 88, 88, 88, 255, 197, 197, 197, 255, 213, 213, 213, 255, 216, 216, 216, 255, 216, 216, 216, 255, 133, 133, 133, 255, 56, 56, 56, 255, 137, 137, 137, 255, 83, 83, 83, 255, 51, 51, 51, 255, 70, 70, 70, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 99, 99, 99, 255, 54, 54, 54, 255, 56, 56, 56, 255, 137, 137, 137, 255, 73, 73, 73, 255, 133, 133, 133, 255, 216, 216, 216, 255, 206, 206, 206, 255, 197, 197, 197, 255, 197, 197, 197, 255, 161, 161, 161, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 191, 143, 143, 143, 255, 234, 234, 234, 255, 234, 234, 234, 255, 153, 153, 153, 255, 214, 214, 214, 255, 234, 234, 234, 255, 234, 234, 234, 255, 214, 214, 214, 255, 153, 153, 153, 255, 214, 214, 214, 255, 234, 234, 234, 255, 234, 234, 234, 255, 194, 194, 194, 255, 170, 170, 170, 255, 187, 187, 187, 255, 204, 204, 204, 255, 221, 221, 221, 255, 242, 242, 242, 255, 255, 255, 255, 255, 88, 88, 88, 255, 201, 201, 201, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 91, 91, 91, 255, 77, 77, 77, 255, 133, 133, 133, 255, 56, 56, 56, 255, 54, 54, 54, 255, 99, 99, 99, 255, 89, 107, 120, 255, 13, 140, 230, 255, 0, 147, 249, 255, 51, 123, 174, 255, 102, 102, 102, 255, 73, 73, 73, 255, 51, 51, 51, 255, 118, 118, 118, 255, 82, 82, 82, 255, 91, 91, 91, 255, 211, 211, 211, 255, 206, 206, 206, 255, 200, 200, 200, 255, 200, 200, 200, 255, 163, 163, 163, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 143, 142, 142, 142, 255, 233, 233, 233, 255, 233, 233, 233, 255, 153, 153, 153, 255, 213, 213, 213, 255, 233, 233, 233, 255, 233, 233, 233, 255, 213, 213, 213, 255, 153, 153, 153, 255, 213, 213, 213, 255, 233, 233, 233, 255, 233, 233, 233, 255, 193, 193, 193, 255, 170, 170, 170, 255, 187, 187, 187, 255, 194, 194, 194, 255, 221, 221, 221, 255, 242, 242, 242, 255, 255, 255, 255, 255, 89, 89, 89, 255, 204, 204, 204, 255, 207, 207, 207, 255, 207, 207, 207, 255, 207, 207, 207, 255, 61, 61, 61, 255, 90, 90, 90, 255, 114, 114, 114, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 38, 113, 177, 255, 0, 122, 224, 255, 0, 122, 224, 255, 0, 122, 224, 255, 102, 102, 102, 255, 77, 77, 77, 255, 51, 51, 51, 255, 110, 110, 110, 255, 90, 90, 90, 255, 90, 90, 90, 255, 207, 207, 207, 255, 205, 205, 205, 255, 203, 203, 203, 255, 203, 203, 203, 255, 165, 165, 165, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 128, 141, 141, 141, 255, 231, 231, 231, 255, 231, 231, 231, 255, 153, 153, 153, 255, 212, 212, 212, 255, 231, 231, 231, 255, 231, 231, 231, 255, 212, 212, 212, 255, 153, 153, 153, 255, 212, 212, 212, 255, 231, 231, 231, 255, 231, 231, 231, 255, 192, 192, 192, 255, 170, 170, 170, 255, 172, 172, 172, 255, 153, 153, 153, 255, 208, 208, 208, 255, 242, 242, 242, 255, 255, 255, 255, 255, 90, 90, 90, 255, 205, 205, 205, 255, 203, 203, 203, 255, 203, 203, 203, 255, 203, 203, 203, 255, 51, 51, 51, 255, 89, 89, 89, 255, 108, 108, 108, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 26, 93, 169, 255, 0, 90, 192, 255, 0, 90, 192, 255, 0, 90, 192, 255, 102, 102, 102, 255, 77, 77, 77, 255, 51, 51, 51, 255, 113, 113, 113, 255, 80, 80, 80, 255, 108, 108, 108, 255, 203, 203, 203, 255, 204, 204, 204, 255, 206, 206, 206, 255, 206, 206, 206, 255, 167, 167, 167, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 128, 140, 140, 140, 255, 230, 230, 230, 255, 230, 230, 230, 255, 153, 153, 153, 255, 211, 211, 211, 255, 230, 230, 230, 255, 230, 230, 230, 255, 211, 211, 211, 255, 153, 153, 153, 255, 211, 211, 211, 255, 230, 230, 230, 255, 230, 230, 230, 255, 191, 191, 191, 255, 170, 170, 170, 255, 181, 181, 181, 255, 175, 175, 175, 255, 217, 217, 217, 255, 242, 242, 242, 255, 255, 255, 255, 255, 90, 90, 90, 255, 206, 206, 206, 255, 198, 198, 198, 255, 198, 198, 198, 255, 198, 198, 198, 255, 51, 51, 51, 255, 87, 87, 87, 255, 109, 109, 109, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 64, 86, 124, 255, 0, 58, 160, 255, 0, 58, 160, 255, 45, 78, 136, 255, 102, 102, 102, 255, 67, 67, 67, 255, 55, 55, 55, 255, 123, 123, 123, 255, 65, 65, 65, 255, 125, 125, 125, 255, 198, 198, 198, 255, 204, 204, 204, 255, 209, 209, 209, 255, 209, 209, 209, 255, 169, 169, 169, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 128, 140, 140, 140, 255, 229, 229, 229, 255, 229, 229, 229, 255, 153, 153, 153, 255, 210, 210, 210, 255, 229, 229, 229, 255, 229, 229, 229, 255, 210, 210, 210, 255, 153, 153, 153, 255, 210, 210, 210, 255, 229, 229, 229, 255, 229, 229, 229, 255, 191, 191, 191, 255, 170, 170, 170, 255, 187, 187, 187, 255, 204, 204, 204, 255, 221, 221, 221, 255, 242, 242, 242, 255, 255, 255, 255, 255, 91, 91, 91, 255, 207, 207, 207, 255, 194, 194, 194, 255, 194, 194, 194, 255, 194, 194, 194, 255, 78, 78, 78, 255, 81, 81, 81, 255, 119, 119, 119, 255, 55, 55, 55, 255, 51, 51, 51, 255, 96, 96, 96, 255, 102, 102, 102, 255, 83, 92, 112, 255, 77, 89, 115, 255, 102, 102, 102, 255, 89, 89, 89, 255, 51, 51, 51, 255, 76, 76, 76, 255, 111, 111, 111, 255, 51, 51, 51, 255, 167, 167, 167, 255, 194, 194, 194, 255, 207, 207, 207, 255, 212, 212, 212, 255, 212, 212, 212, 255, 171, 171, 171, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 128, 139, 139, 139, 255, 227, 227, 227, 255, 227, 227, 227, 255, 153, 153, 153, 255, 208, 208, 208, 255, 227, 227, 227, 255, 227, 227, 227, 255, 208, 208, 208, 255, 153, 153, 153, 255, 222, 222, 222, 255, 227, 227, 227, 255, 227, 227, 227, 255, 190, 190, 190, 255, 170, 170, 170, 255, 187, 187, 187, 255, 191, 191, 191, 255, 221, 221, 221, 255, 242, 242, 242, 255, 255, 255, 255, 255, 92, 92, 92, 255, 210, 210, 210, 255, 189, 189, 189, 255, 189, 189, 189, 255, 189, 189, 189, 255, 103, 103, 103, 255, 59, 59, 59, 255, 115, 115, 115, 255, 79, 79, 79, 255, 51, 51, 51, 255, 61, 61, 61, 255, 92, 92, 92, 255, 102, 102, 102, 255, 102, 102, 102, 255, 83, 83, 83, 255, 54, 54, 54, 255, 55, 55, 55, 255, 107, 107, 107, 255, 83, 83, 83, 255, 68, 68, 68, 255, 189, 189, 189, 255, 191, 191, 191, 255, 215, 215, 215, 255, 215, 215, 215, 255, 215, 215, 215, 255, 174, 174, 174, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 128, 138, 138, 138, 255, 226, 226, 226, 255, 226, 226, 226, 255, 153, 153, 153, 255, 207, 207, 207, 255, 226, 226, 226, 255, 226, 226, 226, 255, 207, 207, 207, 255, 153, 153, 153, 255, 226, 226, 226, 255, 226, 226, 226, 255, 226, 226, 226, 255, 189, 189, 189, 255, 170, 170, 170, 255, 176, 176, 176, 255, 153, 153, 153, 255, 204, 204, 204, 255, 242, 242, 242, 255, 255, 255, 255, 255, 93, 93, 93, 255, 218, 218, 218, 255, 186, 186, 186, 255, 184, 184, 184, 255, 184, 184, 184, 255, 151, 151, 151, 255, 51, 51, 51, 255, 93, 93, 93, 255, 108, 108, 108, 255, 62, 62, 62, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 89, 89, 89, 255, 105, 105, 105, 255, 55, 55, 55, 255, 142, 142, 142, 255, 184, 184, 184, 255, 197, 197, 197, 255, 218, 218, 218, 255, 218, 218, 218, 255, 218, 218, 218, 255, 176, 176, 176, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 128, 137, 137, 137, 255, 224, 224, 224, 255, 224, 224, 224, 255, 153, 153, 153, 255, 206, 206, 206, 255, 224, 224, 224, 255, 224, 224, 224, 255, 206, 206, 206, 255, 153, 153, 153, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 188, 188, 188, 255, 170, 170, 170, 255, 183, 183, 183, 255, 179, 179, 179, 255, 217, 217, 217, 255, 242, 242, 242, 255, 255, 255, 255, 255, 93, 93, 93, 255, 221, 221, 221, 255, 196, 196, 196, 255, 181, 181, 181, 255, 181, 181, 181, 255, 181, 181, 181, 255, 84, 84, 84, 255, 58, 58, 58, 255, 105, 105, 105, 255, 104, 104, 104, 255, 72, 72, 72, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 65, 65, 65, 255, 97, 97, 97, 255, 105, 105, 105, 255, 62, 62, 62, 255, 92, 92, 92, 255, 181, 181, 181, 255, 181, 181, 181, 255, 213, 213, 213, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 178, 178, 178, 255, 43, 46, 51, 249, 18, 29, 51, 169, + 51, 51, 51, 128, 137, 137, 137, 255, 223, 223, 223, 255, 223, 223, 223, 255, 153, 153, 153, 255, 205, 205, 205, 255, 223, 223, 223, 255, 223, 223, 223, 255, 205, 205, 205, 255, 153, 153, 153, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 188, 188, 188, 255, 170, 170, 170, 255, 187, 187, 187, 255, 204, 204, 204, 255, 221, 221, 221, 255, 242, 242, 242, 255, 255, 255, 255, 255, 94, 94, 94, 255, 223, 223, 223, 255, 211, 211, 211, 255, 176, 176, 176, 255, 176, 176, 176, 255, 176, 176, 176, 255, 160, 160, 160, 255, 59, 59, 59, 255, 61, 61, 61, 255, 94, 94, 94, 255, 104, 104, 104, 255, 104, 104, 104, 255, 104, 104, 104, 255, 104, 104, 104, 255, 104, 104, 104, 255, 91, 91, 91, 255, 58, 58, 58, 255, 74, 74, 74, 255, 168, 168, 168, 255, 176, 176, 176, 255, 191, 191, 191, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 169, 169, 169, 255, 43, 46, 51, 249, 18, 29, 52, 167, + 51, 51, 51, 128, 136, 136, 136, 255, 221, 221, 221, 255, 221, 221, 221, 255, 153, 153, 153, 255, 204, 204, 204, 255, 221, 221, 221, 255, 221, 221, 221, 255, 204, 204, 204, 255, 153, 153, 153, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 187, 187, 187, 255, 170, 170, 170, 255, 187, 187, 187, 255, 191, 191, 191, 255, 221, 221, 221, 255, 242, 242, 242, 255, 255, 255, 255, 255, 95, 95, 95, 255, 226, 226, 226, 255, 226, 226, 226, 255, 186, 186, 186, 255, 172, 172, 172, 255, 172, 172, 172, 255, 172, 172, 172, 255, 149, 149, 149, 255, 66, 66, 66, 255, 51, 51, 51, 255, 67, 67, 67, 255, 77, 77, 77, 255, 77, 77, 77, 255, 77, 77, 77, 255, 64, 64, 64, 255, 51, 51, 51, 255, 89, 89, 89, 255, 164, 164, 164, 255, 172, 172, 172, 255, 176, 176, 176, 255, 222, 222, 222, 255, 226, 226, 226, 255, 226, 226, 226, 255, 226, 226, 226, 255, 226, 226, 226, 255, 127, 127, 127, 255, 35, 40, 51, 240, 19, 29, 51, 159, + 51, 51, 51, 128, 106, 106, 106, 255, 219, 219, 219, 255, 219, 219, 219, 255, 203, 203, 203, 255, 211, 211, 211, 255, 219, 219, 219, 255, 219, 219, 219, 255, 203, 203, 203, 255, 153, 153, 153, 255, 219, 219, 219, 255, 219, 219, 219, 255, 219, 219, 219, 255, 186, 186, 186, 255, 170, 170, 170, 255, 174, 174, 174, 255, 153, 153, 153, 255, 204, 204, 204, 255, 242, 242, 242, 255, 217, 217, 217, 255, 95, 95, 95, 255, 229, 229, 229, 255, 229, 229, 229, 255, 217, 217, 217, 255, 171, 171, 171, 255, 167, 167, 167, 255, 167, 167, 167, 255, 167, 167, 167, 255, 160, 160, 160, 255, 109, 109, 109, 255, 73, 73, 73, 255, 51, 51, 51, 255, 51, 51, 51, 255, 58, 58, 58, 255, 87, 87, 87, 255, 138, 138, 138, 255, 167, 167, 167, 255, 167, 167, 167, 255, 167, 167, 167, 255, 214, 214, 214, 255, 229, 229, 229, 255, 229, 229, 229, 255, 229, 229, 229, 255, 229, 229, 229, 255, 218, 218, 218, 255, 62, 62, 62, 255, 21, 31, 51, 216, 18, 30, 50, 138, + 51, 51, 51, 128, 96, 96, 96, 255, 161, 161, 161, 255, 194, 194, 194, 255, 218, 218, 218, 255, 218, 218, 218, 255, 218, 218, 218, 255, 218, 218, 218, 255, 202, 202, 202, 255, 153, 153, 153, 255, 218, 218, 218, 255, 218, 218, 218, 255, 218, 218, 218, 255, 186, 186, 186, 255, 170, 170, 170, 255, 183, 183, 183, 255, 172, 172, 172, 255, 217, 217, 217, 255, 242, 242, 242, 255, 204, 204, 204, 255, 96, 96, 96, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 206, 206, 206, 255, 162, 162, 162, 255, 162, 162, 162, 255, 162, 162, 162, 255, 162, 162, 162, 255, 162, 162, 162, 255, 162, 162, 162, 255, 162, 162, 162, 255, 162, 162, 162, 255, 162, 162, 162, 255, 162, 162, 162, 255, 162, 162, 162, 255, 162, 162, 162, 255, 167, 167, 167, 255, 206, 206, 206, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 220, 220, 220, 255, 164, 164, 164, 255, 85, 85, 85, 255, 34, 40, 51, 241, 17, 28, 51, 179, 20, 30, 50, 103, + 51, 51, 51, 128, 88, 88, 88, 255, 177, 177, 177, 255, 153, 153, 153, 255, 161, 161, 161, 255, 188, 188, 188, 255, 212, 212, 212, 255, 216, 216, 216, 255, 200, 200, 200, 255, 153, 153, 153, 255, 216, 216, 216, 255, 216, 216, 216, 255, 216, 216, 216, 255, 185, 185, 185, 255, 170, 170, 170, 255, 187, 187, 187, 255, 204, 204, 204, 255, 221, 221, 221, 255, 242, 242, 242, 255, 204, 204, 204, 255, 97, 97, 97, 255, 235, 235, 235, 255, 235, 235, 235, 255, 235, 235, 235, 255, 235, 235, 235, 255, 211, 211, 211, 255, 163, 163, 163, 255, 158, 158, 158, 255, 158, 158, 158, 255, 158, 158, 158, 255, 158, 158, 158, 255, 158, 158, 158, 255, 158, 158, 158, 255, 158, 158, 158, 255, 158, 158, 158, 255, 158, 158, 158, 255, 168, 168, 168, 255, 221, 221, 221, 255, 235, 235, 235, 255, 223, 223, 223, 255, 165, 165, 165, 255, 108, 108, 108, 255, 49, 50, 51, 254, 38, 42, 51, 247, 25, 34, 52, 227, 17, 28, 51, 185, 18, 30, 51, 129, 20, 28, 49, 63, + 51, 51, 51, 128, 92, 92, 92, 255, 215, 215, 215, 255, 211, 211, 211, 255, 184, 184, 184, 255, 157, 157, 157, 255, 157, 157, 157, 255, 184, 184, 184, 255, 196, 196, 196, 255, 153, 153, 153, 255, 215, 215, 215, 255, 215, 215, 215, 255, 215, 215, 215, 255, 184, 184, 184, 255, 170, 170, 170, 255, 187, 187, 187, 255, 194, 194, 194, 255, 221, 221, 221, 255, 242, 242, 242, 255, 204, 204, 204, 255, 144, 144, 144, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 233, 233, 233, 255, 185, 185, 185, 255, 158, 158, 158, 255, 153, 153, 153, 255, 153, 153, 153, 255, 153, 153, 153, 255, 153, 153, 153, 255, 153, 153, 153, 255, 164, 164, 164, 255, 206, 206, 206, 255, 214, 214, 214, 255, 167, 167, 167, 255, 109, 109, 109, 255, 49, 50, 51, 254, 38, 42, 51, 247, 27, 35, 51, 232, 15, 28, 50, 202, 16, 28, 51, 179, 17, 29, 51, 151, 18, 29, 52, 113, 23, 30, 49, 67, 19, 28, 47, 27, + 51, 51, 51, 96, 92, 92, 92, 255, 213, 213, 213, 255, 213, 213, 213, 255, 213, 213, 213, 255, 209, 209, 209, 255, 183, 183, 183, 255, 157, 157, 157, 255, 153, 153, 153, 255, 153, 153, 153, 255, 213, 213, 213, 255, 213, 213, 213, 255, 213, 213, 213, 255, 183, 183, 183, 255, 170, 170, 170, 255, 174, 174, 174, 255, 153, 153, 153, 255, 204, 204, 204, 255, 242, 242, 242, 255, 204, 204, 204, 255, 146, 146, 146, 255, 241, 241, 241, 255, 241, 241, 241, 255, 241, 241, 241, 255, 241, 241, 241, 255, 241, 241, 241, 255, 241, 241, 241, 255, 241, 241, 241, 255, 241, 241, 241, 255, 219, 219, 219, 255, 219, 219, 219, 255, 214, 214, 214, 255, 219, 219, 219, 255, 206, 206, 206, 255, 157, 157, 157, 255, 86, 86, 86, 255, 49, 50, 51, 254, 38, 42, 51, 247, 27, 35, 51, 232, 15, 28, 50, 202, 16, 28, 51, 180, 16, 28, 51, 155, 16, 29, 51, 125, 16, 30, 52, 93, 19, 30, 53, 68, 23, 29, 52, 44, 23, 35, 58, 22, 32, 32, 64, 8, + 51, 51, 51, 32, 71, 71, 71, 255, 212, 212, 212, 255, 212, 212, 212, 255, 212, 212, 212, 255, 212, 212, 212, 255, 212, 212, 212, 255, 209, 209, 209, 255, 183, 183, 183, 255, 157, 157, 157, 255, 212, 212, 212, 255, 212, 212, 212, 255, 212, 212, 212, 255, 183, 183, 183, 255, 170, 170, 170, 255, 183, 183, 183, 255, 172, 172, 172, 255, 217, 217, 217, 255, 242, 242, 242, 255, 204, 204, 204, 255, 147, 147, 147, 255, 243, 243, 243, 255, 243, 243, 243, 255, 243, 243, 243, 255, 243, 243, 243, 255, 243, 243, 243, 255, 243, 243, 243, 255, 243, 243, 243, 255, 243, 243, 243, 255, 243, 243, 243, 255, 219, 219, 219, 255, 159, 159, 159, 255, 87, 87, 87, 255, 51, 51, 51, 255, 40, 44, 51, 249, 30, 37, 51, 236, 15, 27, 51, 205, 15, 28, 51, 181, 16, 28, 51, 155, 16, 29, 51, 125, 16, 30, 52, 94, 18, 30, 52, 69, 21, 31, 52, 49, 17, 34, 51, 30, 14, 28, 57, 18, 26, 26, 51, 10, 0, 64, 64, 4, 0, 0, 0, 1, + 0, 0, 0, 0, 47, 48, 51, 222, 111, 111, 111, 255, 201, 201, 201, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 182, 182, 182, 255, 170, 170, 170, 255, 187, 187, 187, 255, 204, 204, 204, 255, 221, 221, 221, 255, 242, 242, 242, 255, 166, 166, 166, 255, 185, 185, 185, 255, 246, 246, 246, 255, 246, 246, 246, 255, 246, 246, 246, 255, 246, 246, 246, 255, 246, 246, 246, 255, 246, 246, 246, 255, 222, 222, 222, 255, 161, 161, 161, 255, 88, 88, 88, 255, 51, 51, 51, 255, 40, 44, 51, 249, 30, 37, 51, 236, 18, 29, 51, 210, 15, 28, 51, 185, 17, 29, 51, 161, 18, 30, 51, 129, 16, 29, 50, 96, 18, 29, 51, 70, 21, 31, 52, 49, 17, 34, 51, 30, 14, 28, 57, 18, 23, 23, 46, 11, 0, 51, 51, 5, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 26, 33, 49, 89, 44, 46, 51, 221, 71, 71, 71, 255, 160, 160, 160, 255, 209, 209, 209, 255, 209, 209, 209, 255, 209, 209, 209, 255, 209, 209, 209, 255, 209, 209, 209, 255, 209, 209, 209, 255, 209, 209, 209, 255, 209, 209, 209, 255, 181, 181, 181, 255, 170, 170, 170, 255, 187, 187, 187, 255, 204, 204, 204, 255, 221, 221, 221, 255, 230, 230, 230, 255, 101, 101, 101, 255, 249, 249, 249, 255, 249, 249, 249, 255, 249, 249, 249, 255, 249, 249, 249, 255, 212, 212, 212, 255, 138, 138, 138, 255, 76, 76, 76, 255, 51, 51, 51, 255, 40, 44, 51, 249, 30, 37, 51, 236, 18, 29, 51, 210, 15, 28, 51, 185, 17, 29, 51, 161, 17, 29, 50, 132, 18, 30, 50, 101, 20, 31, 51, 75, 20, 29, 49, 52, 16, 33, 49, 31, 13, 27, 54, 19, 23, 23, 46, 11, 0, 51, 51, 5, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 21, 28, 48, 37, 20, 32, 52, 89, 32, 39, 51, 183, 47, 49, 51, 248, 90, 90, 90, 255, 188, 188, 188, 255, 208, 208, 208, 255, 208, 208, 208, 255, 208, 208, 208, 255, 208, 208, 208, 255, 208, 208, 208, 255, 208, 208, 208, 255, 170, 170, 170, 255, 170, 170, 170, 255, 187, 187, 187, 255, 204, 204, 204, 255, 221, 221, 221, 255, 134, 134, 134, 255, 214, 214, 214, 255, 252, 252, 252, 255, 214, 214, 214, 255, 139, 139, 139, 255, 76, 76, 76, 255, 51, 51, 51, 255, 40, 44, 51, 249, 30, 37, 51, 236, 18, 29, 51, 210, 15, 28, 51, 185, 17, 29, 51, 161, 17, 29, 50, 132, 18, 30, 50, 101, 20, 31, 51, 75, 19, 33, 52, 54, 23, 30, 53, 34, 24, 36, 49, 21, 21, 43, 43, 12, 0, 43, 43, 6, 0, 0, 128, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 20, 20, 39, 13, 21, 34, 48, 37, 20, 29, 52, 78, 18, 28, 51, 126, 37, 42, 51, 213, 49, 50, 51, 252, 129, 129, 129, 255, 197, 197, 197, 255, 206, 206, 206, 255, 206, 206, 206, 255, 206, 206, 206, 255, 206, 206, 206, 255, 166, 166, 166, 255, 170, 170, 170, 255, 187, 187, 187, 255, 194, 194, 194, 255, 166, 166, 166, 255, 179, 179, 179, 255, 140, 140, 140, 255, 77, 77, 77, 255, 51, 51, 51, 255, 40, 44, 51, 249, 30, 37, 51, 236, 18, 29, 51, 210, 15, 28, 51, 185, 17, 29, 51, 161, 17, 29, 50, 132, 18, 30, 50, 101, 20, 31, 51, 75, 19, 33, 52, 54, 23, 30, 53, 34, 24, 36, 49, 21, 20, 39, 59, 13, 36, 36, 36, 7, 0, 0, 85, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 26, 26, 51, 10, 19, 28, 47, 27, 19, 28, 52, 54, 19, 30, 52, 93, 20, 31, 51, 147, 40, 44, 51, 228, 70, 70, 70, 255, 148, 148, 148, 255, 205, 205, 205, 255, 205, 205, 205, 255, 205, 205, 205, 255, 166, 166, 166, 255, 163, 163, 163, 255, 128, 128, 128, 255, 61, 61, 61, 255, 51, 51, 51, 255, 51, 51, 51, 255, 40, 44, 51, 249, 30, 37, 51, 236, 18, 29, 51, 210, 15, 28, 51, 185, 17, 29, 51, 161, 17, 29, 50, 132, 18, 30, 50, 101, 20, 31, 51, 75, 19, 33, 52, 54, 23, 30, 53, 34, 24, 36, 49, 21, 20, 39, 59, 13, 36, 36, 36, 7, 0, 0, 85, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 51, 51, 5, 18, 36, 55, 14, 15, 31, 54, 33, 20, 28, 52, 64, 17, 29, 51, 104, 27, 35, 51, 171, 44, 46, 51, 239, 70, 70, 70, 255, 118, 118, 118, 255, 128, 128, 128, 255, 80, 80, 80, 255, 51, 51, 51, 255, 49, 50, 51, 254, 38, 42, 51, 247, 30, 37, 51, 235, 18, 29, 51, 209, 15, 28, 51, 185, 17, 29, 51, 161, 17, 29, 50, 132, 18, 30, 50, 101, 20, 31, 51, 75, 19, 33, 52, 54, 23, 30, 53, 34, 24, 36, 49, 21, 20, 39, 59, 13, 36, 36, 36, 7, 0, 0, 85, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 36, 36, 36, 7, 13, 27, 54, 19, 19, 32, 51, 40, 21, 31, 52, 74, 18, 29, 51, 116, 23, 32, 51, 168, 27, 35, 52, 200, 27, 34, 51, 211, 26, 34, 51, 214, 23, 33, 52, 209, 15, 27, 51, 190, 16, 28, 51, 175, 16, 28, 51, 156, 18, 29, 51, 131, 18, 30, 50, 101, 20, 31, 51, 75, 19, 33, 52, 54, 23, 30, 53, 34, 24, 36, 49, 21, 20, 39, 59, 13, 36, 36, 36, 7, 0, 0, 85, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 85, 3, 28, 28, 57, 9, 22, 33, 55, 23, 22, 33, 50, 46, 17, 28, 52, 73, 18, 29, 50, 97, 18, 29, 52, 113, 19, 30, 51, 119, 18, 29, 51, 116, 17, 29, 51, 104, 18, 30, 50, 86, 18, 30, 52, 69, 20, 29, 49, 52, 23, 30, 53, 34, 24, 36, 49, 21, 20, 39, 59, 13, 36, 36, 36, 7, 0, 0, 85, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 64, 64, 4, 23, 23, 46, 11, 24, 24, 49, 21, 24, 32, 48, 32, 25, 31, 50, 41, 23, 34, 51, 45, 24, 30, 47, 43, 21, 28, 50, 36, 20, 31, 51, 25, 14, 28, 43, 18, 21, 21, 43, 12, 36, 36, 36, 7, 0, 0, 85, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DeviceMP3(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 16, 50, 50, 50, 65, 50, 50, 50, 115, 49, 49, 49, 133, 45, 45, 45, 73, 46, 46, 46, 53, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 16, 51, 51, 51, 143, 51, 51, 51, 255, 49, 49, 49, 214, 45, 45, 45, 180, 41, 41, 41, 176, 46, 46, 46, 211, 49, 49, 49, 230, 50, 50, 50, 242, 48, 48, 48, 169, 44, 44, 44, 75, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 207, 48, 48, 48, 187, 14, 14, 14, 115, 0, 0, 0, 133, 0, 0, 0, 122, 0, 0, 0, 103, 0, 0, 0, 98, 0, 0, 0, 112, 11, 11, 11, 144, 34, 34, 34, 192, 50, 50, 50, 245, 47, 47, 47, 206, 31, 31, 31, 53, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 80, 50, 50, 50, 226, 0, 0, 0, 116, 0, 0, 0, 101, 0, 0, 0, 52, 0, 0, 0, 22, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 24, 0, 0, 0, 46, 8, 8, 8, 98, 37, 37, 37, 199, 50, 50, 50, 246, 38, 38, 38, 128, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 146, 41, 41, 41, 160, 0, 0, 0, 122, 0, 0, 0, 37, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 13, 0, 0, 0, 42, 24, 24, 24, 135, 49, 49, 49, 247, 36, 36, 36, 157, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 48, 115, 115, 115, 255, 72, 72, 72, 255, 18, 18, 18, 134, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 19, 24, 24, 24, 104, 49, 49, 49, 247, 33, 33, 33, 150, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 67, 162, 162, 162, 255, 88, 88, 88, 255, 18, 18, 18, 184, 0, 0, 0, 48, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 25, 25, 25, 99, 51, 51, 51, 255, 21, 21, 21, 115, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 129, 129, 129, 255, 77, 77, 77, 255, 17, 17, 17, 194, 0, 0, 0, 58, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 39, 39, 39, 148, 46, 46, 46, 230, 0, 0, 0, 61, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 32, 49, 49, 49, 66, 50, 50, 50, 115, 49, 49, 49, 165, 101, 101, 101, 255, 68, 68, 68, 255, 51, 51, 51, 255, 100, 100, 100, 255, 98, 98, 98, 255, 78, 78, 78, 241, 49, 49, 49, 167, 27, 27, 27, 30, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 49, 49, 49, 234, 29, 29, 29, 166, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 32, 49, 49, 49, 66, 49, 49, 49, 100, 49, 49, 49, 132, 49, 49, 49, 164, 85, 85, 85, 195, 90, 90, 90, 225, 111, 111, 111, 255, 118, 118, 118, 255, 141, 141, 141, 255, 147, 147, 147, 255, 67, 67, 67, 255, 70, 70, 70, 255, 57, 57, 57, 255, 65, 65, 65, 255, 140, 140, 140, 255, 158, 158, 158, 255, 156, 156, 156, 255, 136, 136, 136, 255, 68, 68, 68, 218, 0, 0, 0, 39, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 43, 115, 48, 48, 48, 238, 0, 0, 0, 78, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 16, 102, 102, 102, 159, 98, 98, 98, 225, 123, 123, 123, 255, 132, 132, 132, 255, 160, 160, 160, 255, 167, 167, 167, 255, 193, 193, 193, 255, 199, 199, 199, 255, 196, 196, 196, 255, 191, 191, 191, 255, 186, 186, 186, 255, 183, 183, 183, 255, 177, 177, 177, 255, 174, 174, 174, 255, 167, 167, 167, 255, 163, 163, 163, 255, 159, 159, 159, 255, 153, 153, 153, 255, 153, 153, 153, 255, 155, 155, 155, 255, 157, 157, 157, 255, 160, 160, 160, 255, 106, 106, 106, 255, 17, 17, 17, 146, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 50, 50, 50, 244, 16, 16, 16, 149, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 159, 118, 118, 118, 255, 135, 135, 135, 255, 159, 159, 159, 255, 170, 170, 170, 255, 205, 205, 205, 255, 200, 200, 200, 255, 195, 195, 195, 255, 190, 190, 190, 255, 186, 186, 186, 255, 181, 181, 181, 255, 177, 177, 177, 255, 174, 174, 174, 255, 170, 170, 170, 255, 165, 165, 165, 255, 161, 161, 161, 255, 158, 158, 158, 255, 153, 153, 153, 255, 153, 153, 153, 255, 129, 129, 129, 255, 73, 128, 61, 255, 91, 100, 90, 255, 162, 162, 162, 255, 107, 107, 107, 255, 17, 17, 17, 188, 0, 0, 0, 48, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 47, 171, 34, 34, 34, 193, 0, 0, 0, 52, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 63, 63, 195, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 135, 135, 135, 255, 197, 197, 197, 255, 193, 193, 193, 255, 189, 189, 189, 255, 186, 186, 186, 255, 181, 181, 181, 255, 177, 177, 177, 255, 174, 174, 174, 255, 170, 170, 170, 255, 165, 165, 165, 255, 161, 161, 161, 255, 158, 158, 158, 255, 153, 153, 153, 255, 153, 153, 153, 255, 155, 155, 155, 255, 140, 155, 133, 255, 200, 255, 171, 255, 41, 96, 38, 255, 164, 164, 164, 255, 108, 108, 108, 255, 17, 17, 17, 194, 0, 0, 0, 58, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 47, 105, 45, 45, 45, 217, 0, 0, 0, 85, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 58, 58, 196, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 160, 160, 160, 255, 193, 193, 193, 255, 189, 189, 189, 255, 186, 186, 186, 255, 181, 181, 181, 255, 177, 177, 177, 255, 174, 174, 174, 255, 170, 170, 170, 255, 165, 165, 165, 255, 161, 161, 161, 255, 158, 158, 158, 255, 153, 153, 153, 255, 153, 153, 153, 255, 155, 155, 155, 255, 157, 157, 157, 255, 147, 152, 145, 255, 94, 139, 77, 255, 93, 102, 92, 255, 166, 166, 166, 255, 109, 109, 109, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 45, 55, 49, 49, 49, 232, 0, 0, 0, 113, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 196, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 158, 158, 158, 255, 189, 189, 189, 255, 186, 186, 186, 255, 181, 181, 181, 255, 177, 177, 177, 255, 174, 174, 174, 255, 170, 170, 170, 255, 165, 165, 165, 255, 161, 161, 161, 255, 158, 158, 158, 255, 153, 153, 153, 255, 153, 153, 153, 255, 155, 155, 155, 255, 157, 157, 157, 255, 160, 160, 160, 255, 162, 162, 162, 255, 164, 164, 164, 255, 166, 166, 166, 255, 168, 168, 168, 255, 111, 111, 111, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 51, 51, 51, 255, 0, 0, 0, 130, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 196, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 154, 154, 154, 255, 186, 186, 186, 255, 181, 181, 181, 255, 177, 177, 177, 255, 174, 174, 174, 255, 170, 170, 170, 255, 165, 165, 165, 255, 161, 161, 161, 255, 158, 158, 158, 255, 153, 153, 153, 255, 147, 147, 147, 255, 142, 142, 142, 255, 133, 133, 133, 255, 131, 131, 131, 255, 117, 117, 117, 255, 117, 117, 117, 255, 122, 122, 122, 255, 143, 143, 143, 255, 171, 171, 171, 255, 112, 112, 112, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 140, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 196, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 152, 152, 152, 255, 181, 181, 181, 255, 177, 177, 177, 255, 162, 162, 162, 255, 155, 155, 155, 255, 137, 137, 137, 255, 135, 135, 135, 255, 121, 121, 121, 255, 117, 117, 117, 255, 108, 108, 108, 255, 108, 108, 108, 255, 108, 108, 108, 255, 108, 108, 108, 255, 108, 108, 108, 255, 108, 108, 108, 255, 108, 108, 108, 255, 108, 108, 108, 255, 108, 108, 108, 255, 156, 156, 156, 255, 113, 113, 113, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 143, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 196, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 116, 116, 116, 255, 119, 119, 119, 255, 115, 115, 115, 255, 115, 115, 115, 255, 115, 115, 115, 255, 115, 115, 115, 255, 115, 115, 115, 255, 115, 115, 115, 255, 115, 115, 115, 255, 115, 115, 115, 255, 115, 115, 115, 255, 115, 115, 115, 255, 115, 115, 115, 255, 112, 112, 112, 255, 112, 112, 112, 255, 114, 114, 114, 255, 115, 115, 115, 255, 110, 110, 110, 255, 157, 157, 157, 255, 114, 114, 114, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 143, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 196, 102, 102, 102, 255, 102, 102, 102, 255, 86, 86, 86, 255, 117, 117, 117, 255, 121, 121, 121, 255, 121, 121, 121, 255, 121, 121, 121, 255, 103, 103, 103, 255, 94, 94, 94, 255, 117, 117, 117, 255, 121, 121, 121, 255, 121, 121, 121, 255, 121, 121, 121, 255, 121, 121, 121, 255, 117, 117, 117, 255, 140, 140, 140, 255, 173, 173, 173, 255, 155, 155, 155, 255, 161, 161, 161, 255, 125, 125, 125, 255, 109, 109, 109, 255, 160, 160, 160, 255, 115, 115, 115, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 143, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 196, 102, 102, 102, 255, 102, 102, 102, 255, 89, 89, 89, 255, 127, 127, 127, 255, 127, 127, 127, 255, 127, 127, 127, 255, 108, 108, 108, 255, 137, 137, 137, 255, 117, 117, 117, 255, 100, 100, 100, 255, 127, 127, 127, 255, 127, 127, 127, 255, 127, 127, 127, 255, 127, 127, 127, 255, 130, 130, 130, 255, 189, 189, 189, 255, 126, 126, 126, 255, 155, 155, 155, 255, 186, 186, 186, 255, 177, 177, 177, 255, 110, 110, 110, 255, 150, 150, 150, 255, 116, 116, 116, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 64, 50, 50, 50, 213, 0, 0, 0, 139, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 196, 102, 102, 102, 255, 102, 102, 102, 255, 98, 98, 98, 255, 133, 133, 133, 255, 133, 133, 133, 255, 131, 131, 131, 255, 113, 113, 113, 255, 189, 189, 189, 255, 149, 149, 149, 255, 122, 122, 122, 255, 133, 133, 133, 255, 133, 133, 133, 255, 133, 133, 133, 255, 123, 123, 123, 255, 178, 178, 178, 255, 133, 133, 133, 255, 155, 155, 155, 255, 186, 186, 186, 255, 217, 217, 217, 255, 247, 247, 247, 255, 114, 114, 114, 255, 148, 148, 148, 255, 117, 117, 117, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 84, 48, 48, 48, 204, 0, 0, 0, 125, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 58, 58, 196, 102, 102, 102, 255, 99, 99, 99, 255, 112, 112, 112, 255, 140, 140, 140, 255, 140, 140, 140, 255, 140, 140, 140, 255, 113, 113, 113, 255, 119, 119, 119, 255, 112, 112, 112, 255, 137, 137, 137, 255, 115, 115, 115, 255, 98, 98, 98, 255, 111, 111, 111, 255, 121, 121, 121, 255, 178, 178, 178, 255, 155, 155, 155, 255, 186, 186, 186, 255, 217, 217, 217, 255, 247, 247, 247, 255, 245, 245, 245, 255, 118, 118, 118, 255, 151, 151, 151, 255, 118, 118, 118, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 131, 41, 41, 41, 161, 0, 0, 0, 110, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 89, 89, 89, 255, 134, 134, 134, 255, 136, 136, 136, 255, 107, 107, 107, 255, 95, 95, 95, 255, 127, 127, 127, 255, 161, 161, 161, 255, 159, 159, 159, 255, 125, 125, 125, 255, 197, 197, 197, 255, 143, 143, 143, 255, 115, 115, 115, 255, 124, 124, 124, 255, 160, 160, 160, 255, 186, 186, 186, 255, 217, 217, 217, 255, 247, 247, 247, 255, 245, 245, 245, 255, 216, 216, 216, 255, 121, 121, 121, 255, 154, 154, 154, 255, 119, 119, 119, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 194, 30, 30, 30, 138, 0, 0, 0, 85, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 83, 83, 83, 255, 154, 154, 154, 255, 109, 109, 109, 255, 205, 205, 205, 255, 169, 169, 169, 255, 106, 106, 106, 255, 154, 154, 154, 255, 152, 152, 152, 255, 106, 106, 106, 255, 126, 126, 126, 255, 116, 116, 116, 255, 146, 146, 146, 255, 144, 144, 144, 255, 121, 121, 121, 255, 201, 201, 201, 255, 247, 247, 247, 255, 245, 245, 245, 255, 228, 228, 228, 255, 157, 157, 157, 255, 125, 125, 125, 255, 157, 157, 157, 255, 120, 120, 120, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 7, 7, 7, 124, 0, 0, 0, 61, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 84, 84, 84, 255, 153, 153, 153, 255, 115, 115, 115, 255, 162, 162, 162, 255, 145, 145, 145, 255, 134, 134, 134, 255, 148, 148, 148, 255, 147, 147, 147, 255, 139, 139, 139, 255, 154, 154, 154, 255, 176, 176, 176, 255, 164, 164, 164, 255, 160, 160, 160, 255, 139, 139, 139, 255, 116, 116, 116, 255, 175, 175, 175, 255, 175, 175, 175, 255, 172, 172, 172, 255, 137, 137, 137, 255, 129, 129, 129, 255, 159, 159, 159, 255, 121, 121, 121, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 48, 50, 50, 50, 227, 0, 0, 0, 136, 0, 0, 0, 37, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 105, 105, 105, 255, 167, 167, 167, 255, 140, 140, 140, 255, 129, 129, 129, 255, 140, 140, 140, 255, 147, 147, 147, 255, 157, 157, 157, 255, 152, 152, 152, 255, 137, 137, 137, 255, 167, 167, 167, 255, 167, 167, 167, 255, 167, 167, 167, 255, 167, 167, 167, 255, 167, 167, 167, 255, 167, 167, 167, 255, 167, 167, 167, 255, 167, 167, 167, 255, 167, 167, 167, 255, 149, 149, 149, 255, 132, 132, 132, 255, 162, 162, 162, 255, 122, 122, 122, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 83, 48, 48, 48, 203, 0, 0, 0, 130, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 107, 107, 107, 255, 173, 173, 173, 255, 173, 173, 173, 255, 182, 182, 182, 255, 176, 176, 176, 255, 116, 116, 116, 255, 165, 165, 165, 255, 158, 158, 158, 255, 155, 155, 155, 255, 173, 173, 173, 255, 173, 173, 173, 255, 173, 173, 173, 255, 173, 173, 173, 255, 173, 173, 173, 255, 173, 173, 173, 255, 173, 173, 173, 255, 173, 173, 173, 255, 173, 173, 173, 255, 154, 154, 154, 255, 135, 135, 135, 255, 165, 165, 165, 255, 124, 124, 124, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 131, 41, 41, 41, 160, 0, 0, 0, 112, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 108, 108, 108, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 138, 138, 138, 255, 106, 106, 106, 255, 130, 130, 130, 255, 189, 189, 189, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 166, 166, 166, 255, 138, 138, 138, 255, 167, 167, 167, 255, 124, 124, 124, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 39, 39, 39, 167, 0, 0, 0, 90, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 110, 110, 110, 255, 185, 185, 185, 255, 185, 185, 185, 255, 185, 185, 185, 255, 185, 185, 185, 255, 189, 189, 189, 255, 211, 211, 211, 255, 209, 209, 209, 255, 185, 185, 185, 255, 185, 185, 185, 255, 185, 185, 185, 255, 185, 185, 185, 255, 185, 185, 185, 255, 185, 185, 185, 255, 159, 159, 159, 255, 176, 176, 176, 255, 185, 185, 185, 255, 185, 185, 185, 255, 180, 180, 180, 255, 142, 142, 142, 255, 171, 171, 171, 255, 125, 125, 125, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 194, 29, 29, 29, 142, 0, 0, 0, 79, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 112, 112, 112, 255, 192, 192, 192, 255, 192, 192, 192, 255, 192, 192, 192, 255, 192, 192, 192, 255, 192, 192, 192, 255, 192, 192, 192, 255, 192, 192, 192, 255, 192, 192, 192, 255, 173, 173, 173, 255, 147, 147, 147, 255, 121, 121, 121, 255, 86, 86, 86, 255, 51, 51, 51, 255, 51, 51, 51, 255, 156, 156, 156, 255, 192, 192, 192, 255, 192, 192, 192, 255, 192, 192, 192, 255, 152, 152, 152, 255, 173, 173, 173, 255, 127, 127, 127, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 196, 22, 22, 22, 146, 0, 0, 0, 66, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 86, 86, 86, 255, 198, 198, 198, 255, 198, 198, 198, 255, 198, 198, 198, 255, 179, 179, 179, 255, 151, 151, 151, 255, 124, 124, 124, 255, 87, 87, 87, 255, 60, 60, 60, 255, 50, 62, 51, 255, 49, 72, 50, 255, 48, 83, 50, 255, 47, 94, 50, 255, 46, 108, 49, 255, 49, 80, 50, 255, 133, 133, 133, 255, 198, 198, 198, 255, 198, 198, 198, 255, 198, 198, 198, 255, 170, 170, 170, 255, 176, 176, 176, 255, 128, 128, 128, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 196, 22, 22, 22, 149, 0, 0, 0, 55, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 89, 89, 89, 255, 204, 204, 204, 255, 204, 204, 204, 255, 127, 127, 127, 255, 54, 61, 54, 255, 57, 75, 59, 255, 61, 89, 64, 255, 66, 108, 70, 255, 70, 122, 74, 255, 71, 127, 76, 255, 71, 127, 76, 255, 71, 127, 76, 255, 71, 127, 76, 255, 71, 127, 76, 255, 64, 99, 67, 255, 79, 79, 79, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 197, 197, 197, 255, 180, 180, 180, 255, 129, 129, 129, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 151, 36, 36, 36, 182, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 89, 89, 89, 255, 190, 190, 190, 255, 210, 210, 210, 255, 130, 130, 130, 255, 95, 145, 103, 255, 95, 145, 103, 255, 95, 145, 103, 255, 95, 145, 103, 255, 95, 145, 103, 255, 95, 145, 103, 255, 95, 145, 103, 255, 95, 145, 103, 255, 95, 145, 103, 255, 95, 145, 103, 255, 92, 139, 100, 255, 51, 51, 51, 255, 190, 190, 190, 255, 210, 210, 210, 255, 210, 210, 210, 255, 210, 210, 210, 255, 201, 201, 201, 255, 130, 130, 130, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 37, 37, 37, 175, 0, 0, 0, 79, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 102, 102, 102, 255, 165, 165, 165, 255, 217, 217, 217, 255, 165, 165, 165, 255, 115, 157, 125, 255, 119, 164, 130, 255, 119, 164, 130, 255, 119, 164, 130, 255, 119, 164, 130, 255, 119, 164, 130, 255, 119, 164, 130, 255, 102, 136, 110, 255, 96, 118, 101, 255, 125, 139, 128, 255, 139, 142, 139, 255, 176, 176, 176, 255, 206, 206, 206, 255, 212, 212, 212, 255, 211, 211, 211, 255, 209, 209, 209, 255, 210, 210, 210, 255, 131, 131, 131, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 46, 46, 88, 46, 46, 46, 211, 0, 0, 0, 90, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 102, 102, 102, 255, 147, 147, 147, 255, 223, 223, 223, 255, 202, 202, 202, 255, 115, 142, 124, 255, 144, 183, 157, 255, 132, 167, 144, 255, 109, 134, 117, 255, 136, 154, 142, 255, 145, 152, 148, 255, 170, 170, 170, 255, 202, 202, 202, 255, 221, 221, 221, 255, 215, 215, 215, 255, 210, 210, 210, 255, 206, 206, 206, 255, 202, 202, 202, 255, 205, 205, 205, 255, 208, 208, 208, 255, 210, 210, 210, 255, 212, 212, 212, 255, 132, 132, 132, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 35, 35, 23, 51, 51, 51, 255, 7, 7, 7, 124, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 102, 102, 102, 255, 116, 116, 116, 255, 234, 234, 234, 255, 234, 234, 234, 255, 167, 172, 169, 255, 173, 175, 174, 255, 200, 200, 200, 255, 234, 234, 234, 255, 225, 225, 225, 255, 216, 216, 216, 255, 207, 207, 207, 255, 201, 201, 201, 255, 196, 196, 196, 255, 198, 198, 198, 255, 200, 200, 200, 255, 202, 202, 202, 255, 205, 205, 205, 255, 208, 208, 208, 255, 210, 210, 210, 255, 212, 212, 212, 255, 214, 214, 214, 255, 133, 133, 133, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 48, 48, 48, 187, 34, 34, 34, 194, 0, 0, 0, 42, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 102, 102, 102, 255, 83, 83, 83, 255, 238, 238, 238, 255, 242, 242, 242, 255, 228, 228, 228, 255, 216, 216, 216, 255, 201, 201, 201, 255, 191, 191, 191, 255, 190, 190, 190, 255, 192, 192, 192, 255, 194, 194, 194, 255, 196, 196, 196, 255, 198, 198, 198, 255, 200, 200, 200, 255, 202, 202, 202, 255, 205, 205, 205, 255, 208, 208, 208, 255, 210, 210, 210, 255, 212, 212, 212, 255, 214, 214, 214, 255, 216, 216, 216, 255, 135, 135, 135, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 77, 50, 50, 50, 246, 8, 8, 8, 98, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 102, 102, 102, 255, 89, 89, 89, 255, 147, 147, 147, 255, 182, 182, 182, 255, 184, 184, 184, 255, 186, 186, 186, 255, 188, 188, 188, 255, 190, 190, 190, 255, 192, 192, 192, 255, 194, 194, 194, 255, 196, 196, 196, 255, 198, 198, 198, 255, 200, 200, 200, 255, 202, 202, 202, 255, 205, 205, 205, 255, 208, 208, 208, 255, 210, 210, 210, 255, 212, 212, 212, 255, 214, 214, 214, 255, 187, 187, 187, 255, 167, 167, 167, 255, 135, 135, 135, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 43, 43, 43, 171, 44, 44, 44, 222, 0, 0, 0, 46, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 102, 102, 102, 255, 89, 89, 89, 255, 149, 149, 149, 255, 184, 184, 184, 255, 186, 186, 186, 255, 188, 188, 188, 255, 190, 190, 190, 255, 192, 192, 192, 255, 194, 194, 194, 255, 196, 196, 196, 255, 198, 198, 198, 255, 200, 200, 200, 255, 202, 202, 202, 255, 205, 205, 205, 255, 208, 208, 208, 255, 210, 210, 210, 255, 212, 212, 212, 255, 214, 214, 214, 255, 216, 216, 216, 255, 167, 167, 167, 255, 132, 132, 132, 255, 115, 115, 115, 255, 9, 9, 9, 183, 0, 0, 0, 57, 50, 50, 50, 131, 51, 51, 51, 225, 51, 51, 51, 255, 50, 50, 50, 212, 49, 49, 49, 166, 45, 45, 45, 90, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 24, 34, 47, 47, 47, 225, 41, 41, 41, 199, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 102, 102, 102, 255, 89, 89, 89, 255, 151, 151, 151, 255, 186, 186, 186, 255, 188, 188, 188, 255, 190, 190, 190, 255, 192, 192, 192, 255, 194, 194, 194, 255, 196, 196, 196, 255, 198, 198, 198, 255, 200, 200, 200, 255, 202, 202, 202, 255, 147, 147, 147, 255, 90, 90, 90, 255, 91, 91, 91, 255, 91, 91, 91, 255, 163, 163, 163, 255, 216, 216, 216, 255, 218, 218, 218, 255, 210, 210, 210, 255, 147, 147, 147, 255, 41, 41, 41, 239, 25, 25, 25, 198, 50, 50, 50, 229, 49, 49, 49, 214, 25, 25, 25, 130, 0, 0, 0, 125, 24, 24, 24, 173, 48, 48, 48, 239, 51, 51, 51, 255, 49, 49, 49, 232, 49, 49, 49, 198, 50, 50, 50, 196, 45, 45, 45, 108, 13, 13, 13, 61, 46, 46, 46, 228, 47, 47, 47, 225, 26, 26, 26, 62, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 102, 102, 102, 255, 89, 89, 89, 255, 152, 152, 152, 255, 188, 188, 188, 255, 190, 190, 190, 255, 192, 192, 192, 255, 194, 194, 194, 255, 196, 196, 196, 255, 198, 198, 198, 255, 200, 200, 200, 255, 202, 202, 202, 255, 118, 118, 118, 255, 51, 51, 51, 255, 51, 51, 51, 255, 80, 80, 80, 255, 75, 75, 75, 255, 51, 51, 51, 255, 114, 114, 114, 255, 83, 83, 83, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 45, 45, 45, 236, 31, 31, 31, 156, 6, 6, 6, 129, 0, 0, 0, 118, 24, 24, 24, 100, 50, 50, 50, 242, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 45, 45, 45, 200, 28, 28, 28, 116, 37, 37, 37, 195, 50, 50, 50, 246, 35, 35, 35, 117, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 196, 102, 102, 102, 255, 102, 102, 102, 255, 89, 89, 89, 255, 171, 171, 171, 255, 157, 157, 157, 255, 169, 169, 169, 255, 194, 194, 194, 255, 196, 196, 196, 255, 198, 198, 198, 255, 200, 200, 200, 255, 202, 202, 202, 255, 205, 205, 205, 255, 61, 61, 61, 255, 58, 58, 58, 255, 171, 171, 171, 255, 202, 202, 202, 255, 157, 157, 157, 255, 123, 123, 123, 255, 51, 51, 51, 255, 49, 49, 49, 251, 51, 51, 51, 255, 51, 51, 51, 255, 46, 46, 46, 247, 33, 33, 33, 221, 49, 49, 49, 247, 51, 51, 51, 255, 50, 50, 50, 243, 50, 50, 50, 213, 51, 51, 51, 255, 45, 45, 45, 235, 27, 27, 27, 214, 17, 17, 17, 197, 17, 17, 17, 191, 17, 17, 17, 189, 28, 28, 28, 206, 49, 49, 49, 249, 48, 48, 48, 238, 40, 40, 40, 184, 22, 22, 22, 150, 50, 50, 50, 246, 22, 22, 22, 109, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 58, 58, 196, 102, 102, 102, 255, 102, 102, 102, 255, 89, 89, 89, 255, 190, 190, 190, 255, 130, 130, 130, 255, 137, 137, 137, 255, 196, 196, 196, 255, 198, 198, 198, 255, 200, 200, 200, 255, 164, 164, 164, 255, 128, 128, 128, 255, 90, 90, 90, 255, 49, 49, 49, 251, 80, 80, 80, 255, 133, 133, 133, 255, 112, 112, 112, 255, 106, 106, 106, 255, 142, 142, 142, 255, 43, 43, 43, 243, 51, 51, 51, 255, 61, 61, 61, 255, 101, 101, 101, 255, 99, 99, 99, 255, 61, 61, 61, 255, 23, 23, 23, 176, 0, 0, 0, 143, 15, 15, 15, 163, 45, 45, 45, 233, 51, 51, 51, 255, 41, 41, 41, 236, 32, 32, 32, 205, 36, 36, 36, 179, 39, 39, 39, 166, 44, 44, 44, 186, 50, 50, 50, 244, 38, 38, 38, 194, 32, 32, 32, 203, 43, 43, 43, 225, 0, 0, 0, 112, 49, 49, 49, 233, 28, 28, 28, 176, 0, 0, 0, 49, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 46, 46, 107, 76, 76, 76, 247, 99, 99, 99, 255, 92, 92, 92, 255, 192, 192, 192, 255, 194, 194, 194, 255, 160, 160, 160, 255, 124, 124, 124, 255, 88, 88, 88, 255, 41, 41, 41, 239, 30, 30, 30, 220, 16, 16, 16, 198, 0, 0, 0, 173, 17, 17, 17, 188, 49, 49, 49, 249, 92, 92, 92, 255, 70, 70, 70, 255, 80, 80, 80, 255, 74, 74, 74, 239, 49, 49, 49, 250, 61, 61, 61, 255, 181, 181, 181, 255, 205, 205, 205, 255, 147, 147, 147, 255, 97, 97, 97, 255, 17, 17, 17, 187, 0, 0, 0, 82, 0, 0, 0, 36, 19, 19, 19, 84, 49, 49, 49, 247, 49, 49, 49, 250, 47, 47, 47, 242, 50, 50, 50, 246, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 47, 47, 47, 240, 32, 32, 32, 180, 47, 47, 47, 227, 48, 48, 48, 219, 0, 0, 0, 134, 0, 0, 0, 61, 0, 0, 0, 9, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 17, 17, 17, 98, 42, 42, 42, 215, 66, 66, 66, 246, 85, 85, 85, 251, 41, 41, 41, 239, 30, 30, 30, 220, 16, 16, 16, 198, 0, 0, 0, 173, 0, 0, 0, 161, 0, 0, 0, 131, 0, 0, 0, 96, 0, 0, 0, 60, 0, 0, 0, 36, 10, 10, 10, 81, 19, 19, 19, 173, 17, 17, 17, 193, 13, 13, 13, 188, 0, 0, 0, 166, 51, 51, 51, 255, 80, 80, 80, 255, 154, 154, 154, 255, 120, 120, 120, 255, 92, 92, 92, 255, 80, 80, 80, 251, 0, 0, 0, 172, 0, 0, 0, 55, 0, 0, 0, 6, 0, 0, 0, 7, 27, 27, 27, 92, 41, 41, 41, 220, 51, 51, 51, 255, 44, 44, 44, 238, 39, 39, 39, 227, 31, 31, 31, 213, 31, 31, 31, 213, 39, 39, 39, 231, 44, 44, 44, 239, 49, 49, 49, 248, 37, 37, 37, 197, 6, 6, 6, 129, 0, 0, 0, 119, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 49, 0, 0, 0, 107, 0, 0, 0, 145, 0, 0, 0, 152, 0, 0, 0, 130, 0, 0, 0, 96, 0, 0, 0, 60, 0, 0, 0, 30, 0, 0, 0, 18, 0, 0, 0, 12, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 34, 0, 0, 0, 55, 0, 0, 0, 58, 0, 0, 0, 48, 50, 50, 50, 242, 65, 65, 65, 255, 128, 128, 128, 255, 77, 77, 77, 255, 68, 68, 68, 255, 25, 25, 25, 214, 0, 0, 0, 146, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 57, 0, 0, 0, 116, 18, 18, 18, 178, 26, 26, 26, 187, 34, 34, 34, 193, 35, 35, 35, 184, 33, 33, 33, 175, 20, 20, 20, 162, 0, 0, 0, 143, 0, 0, 0, 133, 0, 0, 0, 97, 0, 0, 0, 39, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 15, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 18, 0, 0, 0, 12, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 4, 37, 37, 37, 66, 41, 41, 41, 220, 41, 41, 41, 237, 38, 38, 38, 233, 16, 16, 16, 202, 0, 0, 0, 158, 0, 0, 0, 82, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 30, 0, 0, 0, 52, 0, 0, 0, 70, 0, 0, 0, 81, 0, 0, 0, 82, 0, 0, 0, 76, 0, 0, 0, 54, 0, 0, 0, 28, 0, 0, 0, 13, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 61, 0, 0, 0, 128, 0, 0, 0, 146, 0, 0, 0, 130, 0, 0, 0, 70, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 9, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 10, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_LogoMessageSecurity(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 204, 127, 255, 229, 204, 127, 255, 229, 204, 127, 255, 229, 204, 127, 255, 102, 77, 0, 64, 0, 0, 0, 14, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 144, 0, 17, 199, 149, 0, 131, 206, 159, 10, 240, 223, 191, 57, 255, 230, 204, 77, 255, 233, 210, 86, 255, 230, 204, 77, 255, 214, 172, 29, 255, 186, 139, 0, 210, 129, 97, 0, 76, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 197, 148, 0, 83, 206, 159, 10, 240, 236, 217, 96, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 242, 230, 115, 255, 205, 162, 19, 246, 143, 107, 0, 137, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 150, 0, 146, 220, 185, 48, 255, 252, 249, 143, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 252, 249, 143, 255, 206, 167, 30, 248, 87, 65, 0, 112, 0, 0, 0, 24, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 150, 0, 162, 223, 191, 57, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 236, 217, 96, 255, 217, 179, 38, 255, 188, 144, 10, 247, 201, 159, 19, 251, 223, 191, 57, 255, 249, 242, 134, 255, 255, 255, 153, 255, 255, 255, 153, 255, 245, 236, 124, 255, 173, 130, 0, 226, 0, 0, 0, 65, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 150, 0, 98, 220, 185, 48, 255, 255, 255, 153, 255, 255, 255, 153, 255, 252, 249, 143, 255, 214, 172, 29, 255, 118, 89, 0, 220, 19, 14, 0, 173, 0, 0, 0, 148, 0, 0, 0, 136, 78, 58, 0, 169, 199, 154, 10, 249, 249, 239, 131, 255, 255, 249, 147, 255, 255, 248, 146, 255, 220, 182, 45, 255, 70, 52, 0, 140, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 144, 0, 17, 206, 159, 10, 240, 252, 249, 143, 255, 255, 253, 151, 255, 252, 246, 141, 255, 204, 165, 30, 251, 66, 49, 0, 200, 0, 0, 0, 148, 0, 0, 0, 100, 0, 0, 0, 61, 0, 0, 0, 45, 0, 0, 0, 50, 103, 77, 0, 127, 220, 180, 43, 255, 255, 239, 137, 255, 255, 236, 135, 255, 236, 204, 83, 255, 130, 97, 0, 202, 0, 0, 0, 65, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 150, 0, 162, 236, 209, 88, 255, 255, 242, 140, 255, 255, 242, 140, 255, 217, 175, 35, 255, 80, 60, 0, 204, 0, 0, 0, 142, 0, 0, 0, 79, 0, 0, 0, 30, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 22, 190, 143, 0, 222, 252, 224, 119, 255, 255, 226, 125, 255, 245, 212, 101, 255, 146, 110, 0, 221, 0, 0, 0, 91, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 144, 0, 17, 210, 163, 16, 255, 255, 232, 131, 255, 255, 232, 131, 255, 236, 201, 80, 255, 130, 97, 0, 225, 0, 0, 0, 151, 0, 0, 0, 82, 0, 0, 0, 24, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 175, 131, 0, 149, 214, 172, 48, 255, 255, 217, 115, 255, 255, 215, 113, 255, 166, 125, 0, 234, 0, 0, 0, 107, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 197, 148, 0, 116, 233, 193, 69, 255, 255, 223, 122, 255, 255, 222, 121, 255, 201, 154, 15, 251, 19, 14, 0, 173, 0, 0, 0, 103, 0, 0, 0, 33, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 139, 0, 141, 214, 172, 48, 255, 255, 204, 102, 255, 255, 204, 102, 255, 165, 124, 0, 236, 0, 0, 0, 116, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 148, 0, 181, 249, 207, 98, 255, 255, 214, 112, 255, 239, 194, 76, 255, 130, 98, 0, 224, 0, 0, 0, 138, 0, 0, 0, 57, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 140, 0, 140, 214, 172, 48, 255, 253, 202, 98, 255, 252, 201, 95, 255, 165, 124, 0, 236, 0, 0, 0, 119, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, 155, 7, 227, 255, 204, 102, 255, 255, 204, 102, 255, 226, 175, 45, 255, 68, 51, 0, 192, 0, 0, 0, 103, 0, 0, 0, 28, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 140, 0, 140, 214, 172, 48, 255, 248, 197, 87, 255, 248, 197, 86, 255, 165, 124, 0, 236, 0, 0, 0, 119, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, 165, 25, 255, 252, 201, 95, 255, 252, 201, 95, 255, 216, 165, 24, 255, 0, 0, 0, 156, 0, 0, 0, 73, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 148, 0, 66, 194, 145, 0, 118, 193, 145, 0, 151, 197, 148, 0, 198, 198, 148, 0, 230, 214, 172, 48, 255, 240, 189, 73, 255, 240, 189, 73, 255, 204, 153, 0, 255, 190, 142, 0, 240, 182, 137, 0, 196, 117, 88, 0, 56, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 164, 22, 255, 247, 196, 85, 255, 246, 195, 84, 255, 215, 164, 21, 255, 0, 0, 0, 146, 0, 0, 0, 53, 192, 144, 0, 85, 196, 147, 0, 149, 198, 148, 0, 197, 204, 153, 0, 255, 217, 177, 37, 255, 226, 192, 61, 255, 233, 197, 73, 255, 242, 208, 94, 255, 223, 178, 44, 255, 214, 172, 48, 255, 235, 184, 62, 255, 235, 184, 62, 255, 214, 163, 19, 255, 242, 191, 77, 255, 228, 177, 48, 255, 201, 151, 3, 245, 103, 77, 0, 95, 0, 0, 0, 18, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 162, 18, 255, 240, 189, 73, 255, 240, 189, 73, 255, 213, 162, 18, 255, 150, 113, 0, 216, 200, 150, 0, 244, 220, 185, 48, 255, 233, 210, 86, 255, 245, 236, 124, 255, 255, 249, 147, 255, 255, 240, 138, 255, 255, 231, 130, 255, 255, 223, 122, 255, 255, 215, 113, 255, 230, 181, 53, 255, 214, 172, 48, 255, 230, 179, 53, 255, 230, 179, 51, 255, 213, 162, 18, 255, 232, 182, 58, 255, 229, 179, 51, 255, 221, 170, 34, 255, 190, 143, 0, 239, 0, 0, 0, 65, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 161, 15, 255, 235, 184, 62, 255, 233, 182, 58, 255, 211, 160, 15, 255, 236, 217, 96, 255, 252, 249, 143, 255, 255, 255, 153, 255, 255, 253, 151, 255, 255, 244, 142, 255, 255, 236, 134, 255, 255, 227, 126, 255, 255, 219, 117, 255, 255, 211, 109, 255, 255, 204, 102, 255, 207, 158, 38, 255, 214, 172, 48, 255, 226, 175, 43, 255, 224, 173, 40, 255, 193, 144, 10, 255, 217, 168, 47, 255, 221, 170, 34, 255, 217, 166, 26, 255, 208, 157, 8, 255, 85, 64, 0, 154, 0, 0, 0, 40, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 150, 0, 98, 210, 159, 13, 255, 230, 179, 51, 255, 228, 177, 48, 255, 210, 159, 12, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 249, 147, 255, 255, 240, 139, 255, 255, 231, 130, 255, 255, 224, 122, 255, 255, 216, 114, 255, 255, 207, 105, 255, 255, 204, 102, 255, 217, 169, 78, 255, 171, 125, 17, 255, 215, 164, 22, 255, 219, 168, 29, 255, 218, 167, 27, 255, 187, 139, 9, 255, 197, 149, 28, 255, 216, 165, 24, 255, 210, 159, 11, 255, 204, 153, 0, 255, 204, 153, 0, 255, 0, 0, 0, 82, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 148, 0, 66, 202, 152, 0, 225, 230, 204, 77, 255, 209, 158, 10, 255, 224, 173, 40, 255, 224, 173, 39, 255, 209, 158, 9, 255, 255, 253, 151, 255, 255, 245, 143, 255, 255, 236, 135, 255, 255, 228, 127, 255, 255, 220, 118, 255, 255, 211, 109, 255, 255, 205, 103, 255, 254, 203, 100, 255, 246, 195, 85, 255, 196, 149, 58, 255, 158, 114, 23, 255, 206, 155, 4, 255, 210, 159, 11, 255, 205, 154, 3, 255, 162, 117, 21, 255, 204, 154, 21, 255, 206, 155, 3, 255, 210, 166, 32, 255, 233, 210, 143, 255, 204, 153, 0, 255, 0, 0, 0, 125, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 150, 0, 146, 217, 179, 38, 255, 249, 242, 134, 255, 255, 255, 153, 255, 208, 157, 7, 255, 219, 168, 29, 255, 219, 168, 29, 255, 207, 156, 6, 255, 255, 241, 139, 255, 255, 232, 131, 255, 255, 224, 122, 255, 255, 216, 114, 255, 255, 207, 105, 255, 255, 204, 102, 255, 251, 200, 94, 255, 243, 192, 79, 255, 241, 190, 75, 255, 227, 178, 58, 255, 160, 117, 38, 255, 141, 100, 32, 255, 154, 110, 26, 255, 150, 108, 29, 255, 185, 137, 14, 255, 204, 153, 0, 255, 226, 197, 107, 255, 251, 247, 231, 255, 242, 228, 184, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 151, 0, 177, 226, 198, 67, 255, 255, 255, 153, 255, 255, 255, 153, 255, 211, 195, 108, 255, 206, 155, 5, 255, 211, 160, 15, 255, 211, 160, 15, 255, 206, 155, 4, 255, 181, 145, 68, 255, 255, 220, 118, 255, 255, 211, 109, 255, 255, 205, 103, 255, 254, 203, 100, 255, 246, 195, 85, 255, 242, 191, 77, 255, 238, 187, 69, 255, 230, 180, 53, 255, 228, 178, 49, 255, 222, 172, 37, 255, 207, 157, 27, 255, 197, 148, 18, 255, 206, 155, 3, 255, 223, 191, 92, 255, 248, 241, 214, 255, 254, 253, 243, 255, 254, 252, 241, 255, 242, 229, 176, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 153, 0, 255, 223, 191, 57, 255, 255, 255, 153, 255, 255, 255, 153, 255, 152, 116, 49, 255, 205, 154, 2, 255, 206, 155, 5, 255, 206, 155, 4, 255, 200, 150, 3, 255, 167, 125, 53, 255, 255, 207, 105, 255, 255, 204, 102, 255, 251, 200, 94, 255, 243, 192, 79, 255, 241, 190, 75, 255, 235, 184, 62, 255, 229, 179, 51, 255, 226, 176, 45, 255, 215, 164, 23, 255, 209, 158, 10, 255, 211, 166, 31, 255, 232, 209, 136, 255, 248, 239, 210, 255, 254, 251, 239, 255, 254, 251, 238, 255, 254, 253, 229, 255, 255, 255, 218, 255, 242, 230, 163, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 175, 35, 255, 223, 185, 52, 255, 223, 191, 57, 255, 252, 248, 143, 255, 167, 133, 61, 255, 158, 114, 23, 255, 171, 125, 17, 255, 171, 125, 17, 255, 157, 113, 32, 255, 218, 170, 81, 255, 254, 203, 100, 255, 246, 195, 85, 255, 242, 191, 77, 255, 239, 188, 71, 255, 226, 176, 45, 255, 218, 168, 29, 255, 215, 167, 31, 255, 220, 184, 76, 255, 232, 208, 134, 255, 248, 239, 208, 255, 254, 251, 238, 255, 254, 251, 238, 255, 254, 251, 236, 255, 254, 252, 224, 255, 255, 255, 210, 255, 255, 255, 207, 255, 255, 255, 207, 255, 242, 230, 155, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 174, 34, 255, 255, 236, 134, 255, 236, 204, 83, 255, 214, 169, 26, 255, 229, 196, 78, 255, 191, 150, 53, 255, 193, 152, 67, 255, 196, 150, 68, 255, 228, 178, 68, 255, 241, 190, 75, 255, 227, 176, 46, 255, 221, 170, 34, 255, 223, 181, 64, 255, 223, 190, 89, 255, 232, 208, 134, 255, 245, 233, 193, 255, 254, 251, 238, 255, 254, 251, 237, 255, 254, 251, 236, 255, 253, 250, 234, 255, 253, 251, 227, 255, 254, 253, 211, 255, 255, 254, 201, 255, 255, 255, 198, 255, 255, 255, 198, 255, 255, 255, 198, 255, 255, 255, 198, 255, 242, 230, 148, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 172, 32, 255, 255, 229, 128, 255, 255, 229, 128, 255, 249, 220, 112, 255, 223, 186, 70, 255, 242, 228, 184, 255, 235, 216, 153, 255, 229, 203, 122, 255, 232, 209, 136, 255, 242, 227, 180, 255, 242, 227, 179, 255, 254, 251, 238, 255, 254, 251, 238, 255, 254, 251, 237, 255, 254, 251, 235, 255, 253, 250, 233, 255, 253, 250, 231, 255, 254, 251, 217, 255, 254, 253, 208, 255, 255, 254, 195, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 188, 255, 242, 230, 141, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 170, 30, 255, 255, 221, 119, 255, 255, 221, 119, 255, 255, 221, 119, 255, 229, 195, 90, 255, 254, 252, 241, 255, 254, 252, 235, 255, 254, 251, 238, 255, 254, 251, 238, 255, 254, 251, 236, 255, 254, 251, 234, 255, 254, 251, 226, 255, 254, 251, 218, 255, 254, 252, 208, 255, 254, 253, 201, 255, 255, 254, 189, 255, 255, 255, 179, 255, 255, 255, 179, 255, 255, 249, 169, 255, 255, 239, 155, 255, 255, 255, 179, 255, 255, 255, 179, 255, 255, 255, 179, 255, 255, 255, 179, 255, 255, 255, 179, 255, 255, 255, 179, 255, 255, 255, 179, 255, 242, 230, 134, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 169, 29, 255, 255, 217, 115, 255, 255, 217, 115, 255, 255, 217, 115, 255, 229, 193, 88, 255, 254, 251, 236, 255, 254, 253, 200, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 250, 159, 255, 255, 232, 136, 255, 255, 218, 118, 255, 255, 212, 110, 255, 255, 222, 124, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 255, 255, 166, 255, 242, 230, 125, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 167, 27, 255, 255, 211, 109, 255, 255, 211, 109, 255, 255, 211, 109, 255, 229, 192, 85, 255, 253, 250, 230, 255, 254, 252, 192, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 247, 147, 255, 220, 195, 119, 255, 155, 143, 113, 255, 129, 122, 105, 255, 225, 204, 122, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 255, 255, 156, 255, 242, 230, 117, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 166, 26, 255, 255, 204, 102, 255, 255, 204, 102, 255, 255, 204, 102, 255, 229, 190, 82, 255, 253, 248, 223, 255, 254, 252, 188, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 249, 147, 255, 189, 175, 120, 255, 129, 122, 105, 255, 139, 124, 94, 255, 228, 209, 122, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 255, 255, 153, 255, 242, 230, 115, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, 165, 25, 255, 254, 203, 100, 255, 254, 203, 100, 255, 254, 203, 100, 255, 229, 189, 80, 255, 252, 247, 218, 255, 254, 250, 183, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 248, 146, 255, 193, 180, 120, 255, 139, 124, 94, 255, 149, 126, 81, 255, 230, 210, 120, 255, 255, 249, 147, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 252, 150, 255, 255, 252, 150, 255, 242, 227, 113, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, 165, 23, 255, 250, 199, 93, 255, 250, 199, 93, 255, 250, 199, 93, 255, 228, 188, 77, 255, 252, 247, 213, 255, 254, 248, 180, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 248, 145, 255, 190, 177, 115, 255, 147, 126, 84, 255, 156, 127, 70, 255, 199, 172, 88, 255, 255, 244, 142, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 249, 147, 255, 255, 249, 147, 255, 242, 225, 110, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 164, 21, 255, 246, 195, 83, 255, 246, 195, 83, 255, 246, 195, 83, 255, 227, 187, 73, 255, 252, 246, 209, 255, 254, 246, 175, 255, 255, 246, 143, 255, 255, 246, 143, 255, 255, 246, 143, 255, 255, 246, 143, 255, 255, 246, 143, 255, 255, 246, 143, 255, 255, 246, 143, 255, 255, 248, 145, 255, 233, 230, 142, 255, 147, 126, 84, 255, 156, 127, 70, 255, 163, 128, 56, 255, 173, 136, 58, 255, 246, 236, 136, 255, 255, 246, 143, 255, 255, 246, 143, 255, 255, 246, 143, 255, 255, 246, 143, 255, 255, 246, 143, 255, 255, 246, 143, 255, 242, 223, 107, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 214, 163, 20, 255, 244, 193, 79, 255, 244, 193, 79, 255, 244, 193, 79, 255, 226, 186, 70, 255, 252, 245, 203, 255, 254, 244, 172, 255, 255, 242, 140, 255, 255, 242, 140, 255, 255, 242, 140, 255, 255, 242, 140, 255, 255, 242, 140, 255, 255, 242, 140, 255, 255, 242, 140, 255, 255, 249, 147, 255, 196, 183, 112, 255, 156, 127, 70, 255, 163, 128, 56, 255, 173, 136, 58, 255, 182, 142, 60, 255, 250, 246, 146, 255, 255, 242, 140, 255, 255, 242, 140, 255, 255, 242, 140, 255, 255, 242, 140, 255, 255, 242, 140, 255, 255, 242, 140, 255, 242, 220, 105, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 162, 18, 255, 240, 189, 72, 255, 240, 189, 72, 255, 240, 189, 72, 255, 225, 185, 67, 255, 252, 243, 197, 255, 254, 241, 166, 255, 255, 238, 136, 255, 255, 238, 136, 255, 255, 238, 136, 255, 255, 238, 136, 255, 255, 238, 136, 255, 255, 238, 136, 255, 255, 238, 136, 255, 255, 243, 141, 255, 193, 172, 97, 255, 163, 128, 56, 255, 173, 136, 58, 255, 182, 142, 60, 255, 214, 182, 88, 255, 255, 243, 141, 255, 255, 238, 136, 255, 255, 238, 136, 255, 255, 238, 136, 255, 255, 238, 136, 255, 255, 238, 136, 255, 255, 238, 136, 255, 242, 217, 102, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 161, 16, 255, 236, 185, 65, 255, 236, 185, 65, 255, 236, 185, 65, 255, 224, 183, 65, 255, 252, 243, 192, 255, 253, 239, 162, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 236, 134, 255, 238, 216, 120, 255, 183, 147, 67, 255, 182, 142, 60, 255, 196, 152, 63, 255, 245, 218, 116, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 235, 133, 255, 255, 235, 133, 255, 242, 215, 100, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 211, 160, 15, 255, 233, 182, 58, 255, 233, 182, 58, 255, 233, 182, 58, 255, 224, 185, 55, 255, 255, 253, 157, 255, 255, 244, 142, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 235, 191, 92, 255, 196, 152, 63, 255, 208, 161, 65, 255, 245, 218, 116, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 255, 233, 131, 255, 242, 213, 98, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 159, 13, 255, 230, 179, 51, 255, 230, 179, 51, 255, 230, 179, 51, 255, 223, 185, 53, 255, 255, 255, 163, 255, 255, 242, 147, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 228, 127, 255, 235, 191, 92, 255, 206, 160, 65, 255, 218, 169, 67, 255, 249, 212, 109, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 255, 229, 128, 255, 242, 210, 96, 255, 204, 153, 0, 255, 0, 0, 0, 143, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 159, 11, 255, 226, 175, 44, 255, 226, 175, 44, 255, 226, 175, 44, 255, 222, 184, 55, 255, 255, 255, 174, 255, 255, 240, 151, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 222, 120, 255, 235, 191, 92, 255, 215, 167, 66, 255, 235, 183, 74, 255, 251, 211, 108, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 225, 123, 255, 255, 225, 123, 255, 249, 216, 108, 255, 214, 167, 23, 255, 79, 59, 0, 206, 0, 0, 0, 127, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 158, 9, 255, 223, 172, 37, 255, 223, 172, 37, 255, 223, 172, 37, 255, 222, 183, 56, 255, 255, 255, 187, 255, 255, 239, 156, 255, 255, 222, 120, 255, 255, 222, 120, 255, 255, 222, 120, 255, 255, 222, 120, 255, 255, 222, 120, 255, 255, 222, 120, 255, 255, 222, 120, 255, 255, 222, 120, 255, 255, 218, 116, 255, 250, 203, 101, 255, 250, 203, 101, 255, 255, 212, 110, 255, 255, 218, 116, 255, 255, 222, 120, 255, 255, 222, 120, 255, 255, 222, 120, 255, 255, 222, 120, 255, 255, 222, 120, 255, 233, 192, 68, 255, 188, 143, 8, 247, 51, 38, 0, 192, 0, 0, 0, 142, 0, 0, 0, 76, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 208, 157, 8, 255, 219, 168, 30, 255, 219, 168, 30, 255, 219, 168, 30, 255, 221, 182, 58, 255, 255, 255, 204, 255, 255, 237, 161, 255, 255, 219, 117, 255, 255, 219, 117, 255, 255, 219, 117, 255, 255, 219, 117, 255, 255, 219, 117, 255, 255, 219, 117, 255, 255, 219, 117, 255, 255, 219, 117, 255, 255, 217, 115, 255, 255, 212, 110, 255, 255, 216, 114, 255, 255, 219, 117, 255, 255, 219, 117, 255, 255, 219, 117, 255, 255, 219, 117, 255, 255, 219, 117, 255, 242, 203, 88, 255, 210, 162, 15, 255, 130, 97, 0, 225, 19, 14, 0, 172, 0, 0, 0, 126, 0, 0, 0, 70, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 149, 2, 215, 214, 163, 20, 255, 216, 165, 24, 255, 216, 165, 24, 255, 220, 181, 59, 255, 255, 255, 216, 255, 255, 236, 166, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 255, 216, 114, 255, 252, 212, 107, 255, 236, 193, 72, 255, 210, 161, 14, 255, 142, 106, 0, 229, 36, 27, 0, 182, 0, 0, 0, 143, 0, 0, 0, 100, 0, 0, 0, 51, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 55, 0, 45, 186, 139, 0, 228, 210, 159, 12, 255, 213, 162, 19, 255, 219, 181, 61, 255, 255, 255, 228, 255, 255, 234, 170, 255, 255, 213, 111, 255, 255, 213, 111, 255, 255, 213, 111, 255, 255, 213, 111, 255, 255, 213, 111, 255, 255, 213, 111, 255, 255, 213, 111, 255, 255, 213, 111, 255, 255, 213, 111, 255, 255, 213, 111, 255, 255, 213, 111, 255, 239, 194, 76, 255, 223, 176, 42, 255, 188, 142, 7, 247, 119, 89, 0, 219, 37, 28, 0, 178, 0, 0, 0, 143, 0, 0, 0, 106, 0, 0, 0, 63, 0, 0, 0, 28, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 49, 37, 0, 67, 176, 132, 0, 221, 206, 155, 4, 255, 218, 180, 62, 255, 255, 255, 240, 255, 255, 232, 174, 255, 255, 208, 106, 255, 255, 208, 106, 255, 255, 208, 106, 255, 255, 208, 106, 255, 255, 208, 106, 255, 255, 208, 106, 255, 252, 205, 99, 255, 242, 194, 80, 255, 230, 181, 53, 255, 217, 167, 27, 255, 174, 130, 0, 243, 131, 98, 0, 222, 53, 40, 0, 185, 0, 0, 0, 151, 0, 0, 0, 127, 0, 0, 0, 95, 0, 0, 0, 61, 0, 0, 0, 31, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 0, 0, 0, 52, 161, 121, 0, 202, 214, 172, 48, 255, 249, 242, 223, 255, 249, 224, 167, 255, 245, 196, 85, 255, 242, 193, 79, 255, 242, 193, 79, 255, 230, 181, 53, 255, 223, 174, 40, 255, 214, 163, 20, 255, 164, 123, 0, 238, 131, 98, 0, 222, 83, 62, 0, 196, 20, 15, 0, 164, 0, 0, 0, 144, 0, 0, 0, 124, 0, 0, 0, 98, 0, 0, 0, 68, 0, 0, 0, 43, 0, 0, 0, 23, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0, 45, 134, 101, 0, 170, 129, 97, 0, 203, 167, 125, 0, 233, 155, 116, 0, 230, 122, 91, 0, 215, 123, 92, 0, 212, 98, 73, 0, 200, 55, 41, 0, 178, 0, 0, 0, 152, 0, 0, 0, 139, 0, 0, 0, 121, 0, 0, 0, 100, 0, 0, 0, 77, 0, 0, 0, 55, 0, 0, 0, 39, 0, 0, 0, 25, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 37, 0, 0, 0, 76, 0, 0, 0, 100, 0, 0, 0, 112, 0, 0, 0, 110, 0, 0, 0, 100, 0, 0, 0, 92, 0, 0, 0, 82, 0, 0, 0, 65, 0, 0, 0, 49, 0, 0, 0, 36, 0, 0, 0, 25, 0, 0, 0, 14, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 16, 0, 0, 0, 25, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 22, 0, 0, 0, 17, 0, 0, 0, 9, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DevicePrinter(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 22, 0, 0, 0, 27, 46, 46, 69, 71, 59, 59, 88, 111, 58, 58, 86, 113, 55, 55, 83, 118, 73, 73, 109, 179, 72, 72, 107, 182, 72, 72, 107, 182, 74, 74, 112, 196, 86, 86, 129, 227, 86, 86, 128, 228, 117, 117, 150, 229, 130, 130, 160, 238, 140, 140, 179, 255, 140, 140, 179, 255, 140, 140, 179, 255, 79, 79, 118, 206, 30, 30, 44, 55, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 67, 67, 100, 98, 99, 99, 148, 247, 140, 140, 179, 255, 177, 178, 204, 255, 177, 178, 204, 255, 187, 187, 210, 255, 215, 216, 230, 255, 215, 216, 230, 255, 215, 216, 230, 255, 234, 235, 242, 255, 254, 254, 255, 255, 254, 254, 255, 255, 254, 254, 255, 255, 254, 254, 255, 255, 254, 254, 255, 255, 254, 254, 255, 255, 254, 254, 255, 255, 254, 254, 255, 255, 225, 226, 236, 255, 101, 102, 145, 231, 31, 31, 46, 53, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 49, 49, 73, 100, 111, 111, 159, 255, 221, 224, 236, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 248, 251, 255, 255, 202, 204, 223, 255, 78, 78, 116, 188, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 74, 74, 111, 176, 129, 130, 172, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 243, 249, 255, 255, 137, 139, 179, 255, 42, 42, 64, 77, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 94, 94, 142, 241, 187, 193, 217, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 238, 247, 255, 255, 204, 211, 230, 255, 81, 81, 122, 200, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 75, 75, 112, 175, 118, 120, 166, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 232, 244, 255, 255, 114, 116, 160, 249, 32, 32, 48, 51, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30, 30, 44, 55, 102, 102, 153, 255, 204, 215, 236, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 227, 241, 255, 255, 172, 180, 210, 255, 68, 68, 101, 145, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 84, 84, 126, 213, 154, 162, 198, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 221, 238, 255, 255, 199, 213, 236, 255, 84, 84, 126, 213, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 68, 68, 101, 145, 116, 119, 166, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 215, 235, 255, 255, 116, 119, 166, 255, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 31, 31, 46, 53, 102, 102, 153, 255, 197, 216, 242, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 210, 232, 255, 255, 143, 151, 191, 255, 60, 60, 90, 109, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 87, 87, 130, 224, 159, 174, 210, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 204, 230, 255, 255, 159, 174, 210, 255, 74, 74, 111, 176, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 74, 74, 111, 176, 132, 141, 185, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 198, 227, 255, 255, 174, 196, 230, 255, 87, 87, 130, 224, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 60, 60, 90, 109, 113, 117, 166, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 193, 224, 255, 255, 98, 98, 147, 249, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 102, 102, 153, 255, 182, 214, 249, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 187, 221, 255, 255, 113, 117, 166, 255, 47, 47, 71, 69, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 87, 87, 130, 224, 161, 189, 230, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 181, 218, 255, 255, 178, 216, 255, 255, 174, 215, 255, 255, 120, 130, 179, 255, 54, 54, 82, 120, 0, 0, 0, 24, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 76, 76, 115, 191, 139, 159, 204, 255, 176, 215, 255, 255, 176, 215, 255, 255, 176, 215, 255, 255, 176, 215, 255, 255, 176, 215, 255, 255, 176, 215, 255, 255, 176, 215, 255, 255, 170, 209, 255, 255, 167, 206, 255, 255, 165, 203, 255, 255, 160, 201, 255, 255, 157, 200, 255, 255, 153, 198, 255, 255, 153, 198, 255, 255, 153, 198, 255, 255, 137, 159, 210, 255, 140, 140, 159, 255, 116, 116, 116, 224, 77, 77, 77, 170, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 53, 53, 53, 93, 75, 75, 100, 195, 123, 137, 185, 255, 167, 207, 255, 255, 166, 205, 255, 255, 162, 196, 255, 255, 159, 192, 255, 255, 157, 188, 255, 255, 154, 183, 255, 255, 153, 182, 255, 255, 153, 182, 255, 255, 153, 182, 255, 255, 159, 187, 255, 255, 179, 201, 255, 255, 198, 215, 255, 255, 210, 225, 255, 255, 230, 239, 255, 255, 242, 244, 248, 255, 242, 242, 242, 255, 232, 232, 232, 255, 204, 204, 204, 255, 87, 87, 87, 224, 0, 0, 0, 33, 0, 0, 0, 12, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 100, 100, 100, 219, 159, 159, 159, 255, 179, 179, 185, 255, 151, 155, 198, 255, 159, 172, 255, 255, 153, 166, 255, 255, 153, 166, 255, 255, 153, 166, 255, 255, 179, 188, 255, 255, 191, 199, 255, 255, 204, 211, 255, 255, 230, 233, 255, 255, 249, 249, 255, 255, 237, 237, 237, 255, 229, 229, 229, 255, 218, 218, 218, 255, 209, 209, 209, 255, 201, 201, 201, 255, 202, 202, 202, 255, 206, 206, 206, 255, 211, 211, 211, 255, 215, 215, 215, 255, 102, 102, 102, 255, 80, 80, 80, 204, 75, 75, 75, 175, 65, 65, 65, 126, 33, 33, 33, 50, 0, 0, 0, 16, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 87, 87, 87, 223, 223, 223, 223, 255, 251, 251, 251, 255, 252, 252, 252, 255, 254, 254, 254, 255, 249, 249, 255, 255, 242, 242, 255, 255, 243, 243, 243, 255, 232, 232, 232, 255, 211, 211, 211, 255, 198, 198, 198, 255, 191, 191, 191, 255, 180, 180, 180, 255, 184, 184, 184, 255, 189, 189, 189, 255, 192, 192, 192, 255, 197, 197, 197, 255, 202, 202, 202, 255, 206, 206, 206, 255, 211, 211, 211, 255, 215, 215, 215, 255, 220, 220, 220, 255, 124, 124, 124, 255, 158, 158, 158, 255, 173, 173, 173, 255, 160, 160, 160, 255, 106, 106, 106, 249, 80, 80, 80, 200, 43, 43, 43, 75, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 80, 80, 80, 203, 207, 207, 207, 255, 243, 243, 243, 255, 243, 243, 243, 255, 243, 243, 243, 255, 243, 243, 243, 255, 180, 180, 180, 255, 161, 161, 161, 255, 166, 166, 166, 255, 172, 172, 172, 255, 176, 176, 176, 255, 180, 180, 180, 255, 184, 184, 184, 255, 189, 189, 189, 255, 192, 192, 192, 255, 197, 197, 197, 255, 202, 202, 202, 255, 206, 206, 206, 255, 211, 211, 211, 255, 187, 187, 187, 255, 168, 168, 168, 255, 147, 147, 147, 255, 109, 109, 109, 255, 196, 196, 196, 255, 198, 198, 198, 255, 173, 173, 173, 255, 207, 207, 207, 255, 173, 173, 173, 255, 104, 104, 104, 248, 68, 68, 68, 161, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 24, 27, 27, 27, 58, 78, 78, 78, 206, 185, 185, 185, 255, 234, 234, 234, 255, 234, 234, 234, 255, 234, 234, 234, 255, 234, 234, 234, 255, 198, 198, 198, 255, 166, 166, 166, 255, 172, 172, 172, 255, 176, 176, 176, 255, 180, 180, 180, 255, 184, 184, 184, 255, 189, 189, 189, 255, 192, 192, 192, 255, 179, 179, 179, 255, 164, 164, 164, 255, 147, 147, 147, 255, 122, 122, 122, 255, 119, 119, 119, 255, 144, 144, 144, 255, 169, 169, 169, 255, 202, 202, 202, 255, 226, 226, 226, 255, 234, 234, 234, 255, 233, 233, 233, 255, 227, 227, 227, 255, 187, 187, 187, 255, 182, 182, 182, 255, 216, 216, 216, 255, 122, 122, 122, 255, 78, 78, 78, 199, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 29, 29, 29, 53, 73, 73, 73, 187, 93, 93, 93, 248, 103, 103, 103, 255, 106, 106, 106, 255, 133, 133, 133, 255, 164, 164, 164, 255, 164, 164, 164, 255, 194, 194, 194, 255, 223, 223, 223, 255, 195, 195, 195, 255, 172, 172, 172, 255, 176, 176, 176, 255, 170, 170, 170, 255, 158, 158, 158, 255, 145, 145, 145, 255, 124, 124, 124, 255, 111, 111, 111, 255, 137, 137, 137, 255, 171, 171, 171, 255, 196, 196, 196, 255, 221, 221, 221, 255, 238, 238, 238, 255, 237, 237, 237, 255, 235, 235, 235, 255, 234, 234, 234, 255, 234, 234, 234, 255, 233, 233, 233, 255, 231, 231, 231, 255, 231, 231, 231, 255, 230, 230, 230, 255, 201, 201, 201, 255, 172, 172, 172, 255, 219, 219, 219, 255, 121, 121, 121, 255, 77, 77, 77, 199, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 39, 39, 39, 77, 87, 87, 87, 240, 132, 132, 132, 255, 183, 183, 183, 255, 205, 205, 205, 255, 203, 203, 203, 255, 210, 210, 210, 255, 202, 202, 202, 255, 174, 174, 174, 255, 146, 146, 146, 255, 123, 123, 123, 255, 149, 149, 149, 255, 124, 124, 124, 255, 107, 107, 107, 255, 138, 138, 138, 255, 164, 164, 164, 255, 190, 190, 190, 255, 225, 225, 225, 255, 241, 241, 241, 255, 241, 241, 241, 255, 239, 239, 239, 255, 238, 238, 238, 255, 238, 238, 238, 255, 237, 237, 237, 255, 235, 235, 235, 255, 234, 234, 234, 255, 234, 234, 234, 255, 233, 233, 233, 255, 231, 231, 231, 255, 231, 231, 231, 255, 230, 230, 230, 255, 229, 229, 229, 255, 228, 228, 228, 255, 190, 190, 190, 255, 189, 189, 189, 255, 217, 217, 217, 255, 102, 102, 102, 255, 65, 65, 65, 161, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 83, 83, 83, 231, 141, 141, 141, 255, 218, 218, 218, 255, 215, 215, 215, 255, 212, 212, 212, 255, 210, 210, 210, 255, 207, 207, 207, 255, 213, 213, 213, 255, 241, 241, 241, 255, 225, 225, 225, 255, 182, 182, 182, 255, 146, 146, 146, 255, 219, 219, 219, 255, 245, 245, 245, 255, 244, 244, 244, 255, 243, 243, 243, 255, 242, 242, 242, 255, 241, 241, 241, 255, 241, 241, 241, 255, 239, 239, 239, 255, 238, 238, 238, 255, 238, 238, 238, 255, 237, 237, 237, 255, 235, 235, 235, 255, 234, 234, 234, 255, 234, 234, 234, 255, 233, 233, 233, 255, 231, 231, 231, 255, 231, 231, 231, 255, 230, 230, 230, 255, 229, 229, 229, 255, 228, 228, 228, 255, 219, 219, 219, 255, 199, 199, 199, 255, 153, 153, 153, 255, 220, 220, 220, 255, 175, 175, 175, 255, 89, 89, 89, 248, 38, 38, 38, 77, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 58, 58, 58, 125, 99, 99, 99, 255, 215, 215, 215, 255, 221, 221, 221, 255, 218, 218, 218, 255, 215, 215, 215, 255, 212, 212, 212, 255, 210, 210, 210, 255, 207, 207, 207, 255, 207, 207, 207, 255, 239, 239, 239, 255, 247, 247, 247, 255, 205, 205, 205, 255, 176, 176, 176, 255, 239, 239, 239, 255, 243, 243, 243, 255, 242, 242, 242, 255, 241, 241, 241, 255, 241, 241, 241, 255, 239, 239, 239, 255, 238, 238, 238, 255, 238, 238, 238, 255, 237, 237, 237, 255, 235, 235, 235, 255, 234, 234, 234, 255, 234, 234, 234, 255, 233, 233, 233, 255, 231, 231, 231, 255, 231, 231, 231, 255, 225, 225, 225, 255, 205, 205, 205, 255, 181, 181, 181, 255, 162, 162, 162, 255, 171, 171, 171, 255, 189, 189, 189, 255, 211, 211, 211, 255, 224, 224, 224, 255, 222, 222, 222, 255, 107, 107, 107, 255, 74, 74, 74, 211, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 65, 65, 65, 173, 123, 123, 123, 255, 227, 227, 227, 255, 224, 224, 224, 255, 221, 221, 221, 255, 218, 218, 218, 255, 215, 215, 215, 255, 212, 212, 212, 255, 210, 210, 210, 255, 207, 207, 207, 255, 207, 207, 207, 255, 238, 238, 238, 255, 245, 245, 245, 255, 210, 210, 210, 255, 170, 170, 170, 255, 237, 237, 237, 255, 241, 241, 241, 255, 241, 241, 241, 255, 239, 239, 239, 255, 238, 238, 238, 255, 238, 238, 238, 255, 237, 237, 237, 255, 235, 235, 235, 255, 234, 234, 234, 255, 234, 234, 234, 255, 228, 228, 228, 255, 207, 207, 207, 255, 187, 187, 187, 255, 167, 167, 167, 255, 167, 167, 167, 255, 191, 191, 191, 255, 209, 209, 209, 255, 226, 226, 226, 255, 225, 225, 225, 255, 225, 225, 225, 255, 224, 224, 224, 255, 222, 222, 222, 255, 221, 221, 221, 255, 150, 150, 150, 255, 88, 88, 88, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 63, 63, 63, 176, 122, 122, 122, 255, 229, 229, 229, 255, 227, 227, 227, 255, 224, 224, 224, 255, 221, 221, 221, 255, 218, 218, 218, 255, 215, 215, 215, 255, 212, 212, 212, 255, 210, 210, 210, 255, 207, 207, 207, 255, 207, 207, 207, 255, 237, 237, 237, 255, 243, 243, 243, 255, 209, 209, 209, 255, 170, 170, 170, 255, 235, 235, 235, 255, 239, 239, 239, 255, 238, 238, 238, 255, 238, 238, 238, 255, 237, 237, 237, 255, 235, 235, 235, 255, 214, 214, 214, 255, 194, 194, 194, 255, 173, 173, 173, 255, 168, 168, 168, 255, 187, 187, 187, 255, 206, 206, 206, 255, 224, 224, 224, 255, 228, 228, 228, 255, 228, 228, 228, 255, 226, 226, 226, 255, 225, 225, 225, 255, 225, 225, 225, 255, 216, 216, 216, 255, 204, 204, 204, 255, 193, 193, 193, 255, 185, 185, 185, 255, 137, 137, 137, 255, 87, 87, 87, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 62, 62, 62, 176, 122, 122, 122, 255, 231, 231, 231, 255, 229, 229, 229, 255, 227, 227, 227, 255, 224, 224, 224, 255, 221, 221, 221, 255, 218, 218, 218, 255, 215, 215, 215, 255, 212, 212, 212, 255, 210, 210, 210, 255, 207, 207, 207, 255, 212, 212, 212, 255, 240, 240, 240, 255, 241, 241, 241, 255, 202, 202, 202, 255, 185, 185, 185, 255, 238, 238, 238, 255, 222, 222, 222, 255, 200, 200, 200, 255, 174, 174, 174, 255, 163, 163, 163, 255, 183, 183, 183, 255, 208, 208, 208, 255, 226, 226, 226, 255, 231, 231, 231, 255, 230, 230, 230, 255, 229, 229, 229, 255, 228, 228, 228, 255, 228, 228, 228, 255, 223, 223, 223, 255, 210, 210, 210, 255, 196, 196, 196, 255, 185, 185, 185, 255, 181, 181, 181, 255, 183, 183, 183, 255, 185, 185, 185, 255, 187, 187, 187, 255, 137, 137, 137, 255, 85, 85, 85, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 60, 60, 60, 176, 121, 121, 121, 255, 234, 234, 234, 255, 231, 231, 231, 255, 229, 229, 229, 255, 227, 227, 227, 255, 224, 224, 224, 255, 221, 221, 221, 255, 218, 218, 218, 255, 215, 215, 215, 255, 212, 212, 212, 255, 210, 210, 210, 255, 207, 207, 207, 255, 221, 221, 221, 255, 241, 241, 241, 255, 239, 239, 239, 255, 174, 174, 174, 255, 169, 169, 169, 255, 184, 184, 184, 255, 204, 204, 204, 255, 224, 224, 224, 255, 234, 234, 234, 255, 233, 233, 233, 255, 231, 231, 231, 255, 231, 231, 231, 255, 230, 230, 230, 255, 229, 229, 229, 255, 218, 218, 218, 255, 200, 200, 200, 255, 184, 184, 184, 255, 176, 176, 176, 255, 178, 178, 178, 255, 180, 180, 180, 255, 181, 181, 181, 255, 183, 183, 183, 255, 180, 180, 180, 255, 155, 155, 155, 255, 129, 129, 129, 255, 93, 93, 93, 255, 83, 83, 83, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 59, 59, 59, 176, 92, 92, 92, 255, 127, 127, 127, 255, 184, 184, 184, 255, 231, 231, 231, 255, 229, 229, 229, 255, 227, 227, 227, 255, 224, 224, 224, 255, 221, 221, 221, 255, 218, 218, 218, 255, 215, 215, 215, 255, 212, 212, 212, 255, 210, 210, 210, 255, 207, 207, 207, 255, 231, 231, 231, 255, 238, 238, 238, 255, 238, 238, 238, 255, 237, 237, 237, 255, 235, 235, 235, 255, 234, 234, 234, 255, 234, 234, 234, 255, 233, 233, 233, 255, 231, 231, 231, 255, 222, 222, 222, 255, 206, 206, 206, 255, 191, 191, 191, 255, 173, 173, 173, 255, 172, 172, 172, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 180, 180, 180, 255, 171, 171, 171, 255, 148, 148, 148, 255, 123, 123, 123, 255, 102, 102, 102, 255, 113, 113, 113, 255, 142, 142, 142, 255, 126, 126, 126, 255, 81, 81, 81, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 59, 59, 59, 173, 111, 111, 111, 255, 171, 171, 171, 255, 111, 111, 111, 255, 118, 118, 118, 255, 182, 182, 182, 255, 221, 221, 221, 255, 227, 227, 227, 255, 224, 224, 224, 255, 221, 221, 221, 255, 218, 218, 218, 255, 215, 215, 215, 255, 212, 212, 212, 255, 210, 210, 210, 255, 214, 214, 214, 255, 238, 238, 238, 255, 237, 237, 237, 255, 235, 235, 235, 255, 234, 234, 234, 255, 234, 234, 234, 255, 215, 215, 215, 255, 193, 193, 193, 255, 176, 176, 176, 255, 165, 165, 165, 255, 167, 167, 167, 255, 169, 169, 169, 255, 172, 172, 172, 255, 174, 174, 174, 255, 176, 176, 176, 255, 163, 163, 163, 255, 141, 141, 141, 255, 117, 117, 117, 255, 102, 102, 102, 255, 118, 118, 118, 255, 145, 145, 145, 255, 147, 147, 147, 255, 85, 111, 72, 255, 94, 120, 82, 255, 119, 119, 119, 255, 79, 79, 79, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 44, 44, 44, 113, 78, 78, 78, 255, 242, 242, 242, 255, 231, 231, 231, 255, 178, 178, 178, 255, 119, 119, 119, 255, 110, 110, 110, 255, 165, 165, 165, 255, 219, 219, 219, 255, 224, 224, 224, 255, 221, 221, 221, 255, 218, 218, 218, 255, 215, 215, 215, 255, 212, 212, 212, 255, 210, 210, 210, 255, 226, 226, 226, 255, 226, 226, 226, 255, 200, 200, 200, 255, 182, 182, 182, 255, 164, 164, 164, 255, 162, 162, 162, 255, 164, 164, 164, 255, 165, 165, 165, 255, 167, 167, 167, 255, 169, 169, 169, 255, 172, 172, 172, 255, 151, 151, 151, 255, 134, 134, 134, 255, 111, 111, 111, 255, 102, 102, 102, 255, 117, 117, 117, 255, 148, 148, 148, 255, 175, 175, 175, 255, 187, 187, 187, 255, 189, 189, 189, 255, 107, 120, 101, 255, 153, 255, 102, 255, 128, 204, 89, 255, 101, 101, 101, 255, 78, 78, 78, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 45, 45, 45, 109, 76, 76, 76, 255, 245, 245, 245, 255, 242, 242, 242, 255, 239, 239, 239, 255, 237, 237, 237, 255, 185, 185, 185, 255, 118, 118, 118, 255, 102, 102, 102, 255, 148, 148, 148, 255, 209, 209, 209, 255, 221, 221, 221, 255, 218, 218, 218, 255, 215, 215, 215, 255, 212, 212, 212, 255, 182, 182, 182, 255, 156, 156, 156, 255, 158, 158, 158, 255, 160, 160, 160, 255, 162, 162, 162, 255, 164, 164, 164, 255, 165, 165, 165, 255, 163, 163, 163, 255, 148, 148, 148, 255, 128, 128, 128, 255, 106, 106, 106, 255, 102, 102, 102, 255, 126, 126, 126, 255, 151, 151, 151, 255, 176, 176, 176, 255, 183, 183, 183, 255, 185, 185, 185, 255, 187, 187, 187, 255, 189, 189, 189, 255, 192, 192, 192, 255, 111, 117, 107, 255, 128, 204, 89, 255, 111, 162, 86, 255, 119, 119, 119, 255, 76, 76, 76, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 44, 44, 44, 109, 74, 74, 74, 255, 247, 247, 247, 255, 245, 245, 245, 255, 242, 242, 242, 255, 239, 239, 239, 255, 237, 237, 237, 255, 234, 234, 234, 255, 183, 183, 183, 255, 134, 134, 134, 255, 102, 102, 102, 255, 148, 148, 148, 255, 191, 191, 191, 255, 218, 218, 218, 255, 215, 215, 215, 255, 184, 184, 184, 255, 158, 158, 158, 255, 160, 160, 160, 255, 162, 162, 162, 255, 160, 160, 160, 255, 141, 141, 141, 255, 122, 122, 122, 255, 102, 102, 102, 255, 106, 106, 106, 255, 125, 125, 125, 255, 148, 148, 148, 255, 173, 173, 173, 255, 180, 180, 180, 255, 181, 181, 181, 255, 183, 183, 183, 255, 185, 185, 185, 255, 187, 187, 187, 255, 189, 189, 189, 255, 192, 192, 192, 255, 194, 194, 194, 255, 187, 187, 187, 255, 161, 161, 161, 255, 181, 181, 181, 255, 137, 137, 137, 255, 74, 74, 74, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 42, 42, 42, 109, 72, 72, 72, 255, 250, 250, 250, 255, 247, 247, 247, 255, 245, 245, 245, 255, 242, 242, 242, 255, 239, 239, 239, 255, 237, 237, 237, 255, 234, 234, 234, 255, 231, 231, 231, 255, 197, 197, 197, 255, 134, 134, 134, 255, 102, 102, 102, 255, 132, 132, 132, 255, 181, 181, 181, 255, 187, 187, 187, 255, 152, 152, 152, 255, 136, 136, 136, 255, 113, 113, 113, 255, 102, 102, 102, 255, 106, 106, 106, 255, 128, 128, 128, 255, 150, 150, 150, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 180, 180, 180, 255, 181, 181, 181, 255, 183, 183, 183, 255, 185, 185, 185, 255, 187, 187, 187, 255, 189, 189, 189, 255, 192, 192, 192, 255, 194, 194, 194, 255, 187, 187, 187, 255, 142, 142, 142, 255, 181, 181, 181, 255, 201, 201, 201, 255, 137, 137, 137, 255, 72, 72, 72, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 41, 41, 41, 109, 70, 70, 70, 255, 253, 253, 253, 255, 250, 250, 250, 255, 247, 247, 247, 255, 245, 245, 245, 255, 242, 242, 242, 255, 239, 239, 239, 255, 237, 237, 237, 255, 234, 234, 234, 255, 231, 231, 231, 255, 229, 229, 229, 255, 204, 204, 204, 255, 148, 148, 148, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 110, 110, 110, 255, 130, 130, 130, 255, 147, 147, 147, 255, 169, 169, 169, 255, 172, 172, 172, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 180, 180, 180, 255, 181, 181, 181, 255, 183, 183, 183, 255, 185, 185, 185, 255, 187, 187, 187, 255, 189, 189, 189, 255, 182, 182, 182, 255, 159, 159, 159, 255, 101, 101, 101, 255, 51, 51, 51, 255, 51, 51, 51, 255, 164, 164, 164, 255, 203, 203, 203, 255, 128, 128, 128, 255, 70, 70, 70, 255, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 41, 41, 41, 107, 68, 68, 68, 255, 255, 255, 255, 255, 253, 253, 253, 255, 250, 250, 250, 255, 247, 247, 247, 255, 245, 245, 245, 255, 242, 242, 242, 255, 239, 239, 239, 255, 237, 237, 237, 255, 234, 234, 234, 255, 231, 231, 231, 255, 229, 229, 229, 255, 227, 227, 227, 255, 209, 209, 209, 255, 147, 147, 147, 255, 152, 152, 152, 255, 165, 165, 165, 255, 167, 167, 167, 255, 169, 169, 169, 255, 172, 172, 172, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 180, 180, 180, 255, 181, 181, 181, 255, 183, 183, 183, 255, 185, 185, 185, 255, 176, 176, 176, 255, 152, 152, 152, 255, 127, 127, 127, 255, 122, 122, 122, 255, 131, 131, 131, 255, 143, 143, 143, 255, 129, 129, 129, 255, 102, 102, 102, 255, 103, 103, 103, 255, 74, 74, 74, 255, 62, 62, 62, 255, 62, 62, 62, 249, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 36, 36, 36, 87, 66, 66, 66, 255, 113, 113, 113, 255, 220, 220, 220, 255, 253, 253, 253, 255, 250, 250, 250, 255, 247, 247, 247, 255, 245, 245, 245, 255, 242, 242, 242, 255, 239, 239, 239, 255, 237, 237, 237, 255, 234, 234, 234, 255, 231, 231, 231, 255, 229, 229, 229, 255, 227, 227, 227, 255, 194, 194, 194, 255, 165, 165, 165, 255, 167, 167, 167, 255, 169, 169, 169, 255, 172, 172, 172, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 180, 180, 180, 255, 181, 181, 181, 255, 171, 171, 171, 255, 140, 140, 140, 255, 111, 111, 111, 255, 100, 100, 100, 255, 112, 112, 112, 255, 122, 122, 122, 255, 131, 131, 131, 255, 143, 143, 143, 255, 153, 153, 153, 255, 165, 165, 165, 255, 176, 176, 176, 255, 187, 187, 187, 255, 179, 179, 179, 255, 149, 149, 149, 255, 108, 108, 108, 255, 38, 38, 38, 170, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 27, 27, 27, 77, 54, 54, 54, 211, 65, 65, 65, 255, 136, 136, 136, 255, 241, 241, 241, 255, 250, 250, 250, 255, 247, 247, 247, 255, 245, 245, 245, 255, 242, 242, 242, 255, 239, 239, 239, 255, 237, 237, 237, 255, 234, 234, 234, 255, 231, 231, 231, 255, 229, 229, 229, 255, 197, 197, 197, 255, 167, 167, 167, 255, 169, 169, 169, 255, 172, 172, 172, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 164, 164, 164, 255, 131, 131, 131, 255, 91, 91, 91, 255, 81, 81, 81, 255, 91, 91, 91, 255, 100, 100, 100, 255, 112, 112, 112, 255, 122, 122, 122, 255, 131, 131, 131, 255, 143, 143, 143, 255, 153, 153, 153, 255, 165, 165, 165, 255, 176, 176, 176, 255, 187, 187, 187, 255, 196, 196, 196, 255, 224, 224, 224, 255, 244, 244, 244, 255, 255, 255, 255, 255, 38, 38, 38, 174, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 22, 35, 35, 35, 116, 59, 59, 59, 240, 74, 74, 74, 255, 157, 157, 157, 255, 250, 250, 250, 255, 247, 247, 247, 255, 245, 245, 245, 255, 242, 242, 242, 255, 239, 239, 239, 255, 237, 237, 237, 255, 234, 234, 234, 255, 231, 231, 231, 255, 198, 198, 198, 255, 169, 169, 169, 255, 172, 172, 172, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 99, 99, 99, 255, 60, 60, 60, 255, 69, 69, 69, 255, 81, 81, 81, 255, 91, 91, 91, 255, 100, 100, 100, 255, 112, 112, 112, 255, 122, 122, 122, 255, 131, 131, 131, 255, 143, 143, 143, 255, 153, 153, 153, 255, 165, 165, 165, 255, 176, 176, 176, 255, 195, 195, 195, 255, 227, 227, 227, 255, 252, 252, 252, 255, 255, 255, 255, 255, 230, 230, 230, 255, 153, 153, 153, 255, 35, 35, 35, 141, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 31, 42, 42, 42, 161, 59, 59, 59, 248, 84, 84, 84, 255, 179, 179, 179, 255, 247, 247, 247, 255, 245, 245, 245, 255, 242, 242, 242, 255, 239, 239, 239, 255, 237, 237, 237, 255, 234, 234, 234, 255, 201, 201, 201, 255, 172, 172, 172, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 180, 180, 180, 255, 92, 92, 92, 255, 69, 69, 69, 255, 81, 81, 81, 255, 91, 91, 91, 255, 100, 100, 100, 255, 112, 112, 112, 255, 122, 122, 122, 255, 131, 131, 131, 255, 143, 143, 143, 255, 153, 153, 153, 255, 170, 170, 170, 255, 205, 205, 205, 255, 241, 241, 241, 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 204, 204, 255, 114, 114, 114, 249, 39, 39, 39, 188, 22, 22, 22, 75, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 17, 17, 17, 56, 47, 47, 47, 200, 59, 59, 59, 255, 106, 106, 106, 255, 200, 200, 200, 255, 245, 245, 245, 255, 242, 242, 242, 255, 239, 239, 239, 255, 237, 237, 237, 255, 204, 204, 204, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 180, 180, 180, 255, 181, 181, 181, 255, 136, 136, 177, 255, 108, 108, 127, 255, 91, 91, 91, 255, 100, 100, 100, 255, 112, 112, 112, 255, 122, 122, 122, 255, 131, 131, 131, 255, 143, 143, 143, 255, 171, 171, 171, 255, 219, 219, 219, 255, 250, 250, 250, 255, 255, 255, 255, 255, 242, 242, 242, 255, 166, 166, 166, 255, 74, 74, 74, 241, 37, 37, 37, 175, 15, 15, 15, 53, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 19, 28, 28, 28, 97, 49, 49, 49, 222, 57, 57, 57, 255, 128, 128, 128, 255, 221, 221, 221, 255, 242, 242, 242, 255, 239, 239, 239, 255, 206, 206, 206, 255, 176, 176, 176, 255, 178, 178, 178, 255, 180, 180, 180, 255, 165, 165, 165, 255, 119, 119, 119, 255, 128, 128, 166, 255, 153, 153, 204, 255, 146, 146, 191, 255, 127, 127, 146, 255, 122, 122, 122, 255, 138, 138, 138, 255, 192, 192, 192, 255, 241, 241, 241, 255, 255, 255, 255, 255, 255, 255, 255, 255, 217, 217, 217, 255, 128, 128, 128, 255, 60, 60, 60, 232, 34, 34, 34, 145, 0, 0, 0, 30, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 27, 37, 37, 37, 147, 51, 51, 51, 241, 67, 67, 67, 255, 149, 149, 149, 255, 231, 231, 231, 255, 208, 208, 208, 255, 170, 170, 170, 255, 133, 133, 133, 255, 87, 87, 87, 255, 55, 55, 55, 255, 55, 55, 55, 255, 52, 52, 52, 255, 86, 86, 102, 255, 140, 140, 185, 255, 153, 153, 204, 255, 150, 150, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 179, 179, 179, 255, 102, 102, 102, 255, 42, 42, 42, 212, 29, 29, 29, 112, 0, 0, 0, 25, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 17, 17, 17, 53, 39, 39, 39, 176, 54, 54, 54, 255, 65, 65, 65, 255, 116, 116, 116, 255, 61, 61, 61, 255, 54, 54, 54, 255, 54, 54, 54, 255, 44, 44, 44, 213, 34, 34, 34, 128, 0, 0, 0, 40, 33, 33, 33, 147, 47, 47, 47, 241, 89, 89, 108, 255, 140, 140, 185, 255, 236, 236, 236, 255, 153, 153, 153, 255, 77, 77, 77, 255, 41, 41, 41, 200, 21, 21, 21, 77, 0, 0, 0, 19, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 15, 22, 22, 22, 77, 43, 43, 43, 211, 52, 52, 52, 255, 48, 48, 48, 241, 36, 36, 36, 161, 16, 16, 16, 53, 0, 0, 0, 18, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 33, 37, 37, 37, 175, 49, 49, 49, 248, 49, 49, 49, 248, 37, 37, 37, 176, 15, 15, 15, 55, 0, 0, 0, 16, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 19, 26, 26, 26, 63, 0, 0, 0, 24, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 19, 19, 19, 42, 0, 0, 0, 24, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DeviceCD(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 48, 100, 100, 100, 98, 99, 99, 99, 132, 99, 99, 99, 164, 100, 100, 100, 195, 99, 99, 99, 196, 99, 99, 99, 196, 98, 98, 98, 166, 97, 97, 97, 135, 95, 95, 95, 103, 89, 89, 89, 55, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 64, 101, 101, 101, 161, 101, 101, 101, 225, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 99, 99, 99, 229, 96, 96, 96, 168, 87, 87, 87, 75, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 96, 102, 102, 102, 224, 102, 102, 102, 255, 102, 102, 102, 255, 129, 129, 131, 255, 165, 165, 169, 255, 201, 201, 207, 255, 226, 226, 236, 255, 242, 242, 255, 255, 241, 241, 255, 255, 239, 239, 255, 255, 237, 237, 255, 255, 235, 235, 255, 255, 217, 217, 236, 255, 200, 200, 217, 255, 166, 166, 179, 255, 126, 126, 131, 255, 102, 102, 102, 255, 102, 102, 102, 255, 98, 98, 98, 231, 87, 87, 87, 113, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 64, 102, 102, 102, 224, 102, 102, 102, 255, 112, 112, 112, 255, 168, 168, 169, 255, 230, 230, 236, 255, 247, 247, 255, 255, 246, 246, 255, 255, 244, 244, 255, 255, 242, 242, 255, 255, 241, 241, 255, 255, 239, 239, 255, 255, 237, 237, 255, 255, 235, 235, 255, 255, 234, 234, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 210, 210, 236, 255, 163, 163, 179, 255, 110, 110, 112, 255, 102, 102, 102, 255, 95, 95, 95, 222, 77, 77, 77, 85, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 143, 102, 102, 102, 255, 102, 102, 102, 255, 179, 179, 179, 255, 245, 245, 245, 255, 254, 254, 255, 255, 247, 247, 255, 255, 246, 246, 255, 255, 244, 244, 255, 255, 242, 242, 255, 255, 241, 241, 255, 255, 239, 239, 255, 255, 237, 237, 255, 255, 235, 235, 255, 255, 234, 234, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 213, 213, 245, 255, 161, 161, 179, 255, 109, 109, 112, 255, 102, 102, 102, 255, 85, 85, 85, 172, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 16, 102, 102, 102, 207, 102, 102, 102, 255, 131, 131, 131, 255, 226, 226, 226, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 249, 255, 255, 244, 244, 255, 255, 242, 242, 255, 255, 241, 241, 255, 255, 239, 239, 255, 255, 237, 237, 255, 255, 235, 235, 255, 255, 234, 234, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 202, 202, 236, 255, 130, 130, 140, 255, 102, 102, 102, 255, 94, 94, 94, 226, 35, 35, 35, 47, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 16, 102, 102, 102, 208, 102, 102, 102, 255, 159, 159, 159, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 252, 255, 255, 242, 242, 255, 255, 241, 241, 255, 255, 239, 239, 255, 255, 237, 237, 255, 255, 235, 235, 255, 255, 234, 234, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 157, 157, 179, 255, 102, 102, 102, 255, 92, 92, 92, 231, 28, 28, 28, 58, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 16, 102, 102, 102, 208, 102, 102, 102, 255, 188, 188, 188, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 242, 242, 255, 255, 239, 239, 255, 255, 237, 237, 255, 255, 235, 235, 255, 255, 234, 234, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 168, 168, 198, 255, 102, 102, 102, 255, 92, 92, 92, 231, 28, 28, 28, 58, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 207, 102, 102, 102, 255, 188, 188, 188, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 249, 255, 255, 237, 237, 255, 255, 235, 235, 255, 255, 234, 234, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 166, 166, 198, 255, 102, 102, 102, 255, 92, 92, 92, 231, 0, 0, 0, 45, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 143, 102, 102, 102, 255, 159, 159, 159, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 255, 255, 236, 236, 255, 255, 234, 234, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 161, 161, 188, 255, 102, 102, 102, 255, 73, 73, 73, 199, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 64, 102, 102, 102, 255, 131, 131, 131, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 243, 243, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 135, 135, 150, 255, 102, 102, 102, 255, 47, 47, 47, 140, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 224, 102, 102, 102, 255, 226, 226, 226, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 252, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 205, 205, 245, 255, 109, 109, 112, 255, 94, 94, 94, 243, 0, 0, 0, 69, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 96, 102, 102, 102, 255, 179, 179, 179, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 237, 237, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 165, 165, 188, 255, 102, 102, 102, 255, 54, 54, 54, 181, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 224, 112, 112, 112, 255, 245, 245, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 248, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 117, 117, 121, 255, 93, 93, 93, 245, 0, 0, 0, 81, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 80, 102, 102, 102, 255, 163, 163, 169, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 232, 228, 255, 255, 237, 218, 255, 255, 240, 212, 255, 255, 246, 209, 255, 255, 239, 214, 255, 255, 233, 217, 255, 255, 219, 215, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 168, 168, 188, 255, 102, 102, 102, 255, 46, 46, 46, 176, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 162, 102, 102, 102, 255, 191, 191, 236, 255, 207, 207, 255, 255, 226, 226, 255, 255, 249, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 238, 255, 255, 255, 221, 255, 255, 255, 213, 255, 255, 255, 206, 255, 255, 255, 206, 255, 255, 255, 212, 255, 255, 255, 219, 255, 255, 255, 225, 255, 255, 239, 224, 255, 255, 213, 211, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 215, 215, 245, 255, 102, 102, 102, 255, 78, 78, 78, 229, 0, 0, 0, 70, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 240, 121, 121, 131, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 217, 217, 255, 255, 236, 236, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 255, 255, 255, 236, 255, 255, 255, 228, 255, 255, 255, 221, 255, 255, 255, 213, 255, 255, 255, 206, 255, 255, 255, 206, 255, 255, 255, 212, 255, 255, 255, 219, 255, 255, 255, 225, 255, 255, 255, 232, 255, 255, 252, 235, 255, 255, 215, 213, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 140, 140, 150, 255, 102, 102, 102, 255, 0, 0, 0, 121, 0, 0, 0, 16, 0, 0, 0, 0, + 0, 0, 0, 0, 102, 102, 102, 48, 102, 102, 102, 255, 153, 153, 179, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 207, 207, 255, 255, 226, 226, 255, 255, 249, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 242, 255, 255, 255, 235, 255, 255, 255, 228, 255, 255, 255, 228, 255, 255, 241, 228, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 225, 214, 255, 255, 247, 222, 255, 255, 255, 232, 255, 255, 255, 238, 255, 255, 252, 241, 255, 255, 207, 207, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 173, 173, 188, 255, 102, 102, 102, 255, 36, 36, 36, 184, 0, 0, 0, 30, 0, 0, 0, 0, + 0, 0, 0, 0, 100, 100, 100, 98, 102, 102, 102, 255, 179, 179, 217, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 217, 217, 255, 255, 236, 236, 255, 255, 255, 255, 255, 255, 255, 251, 255, 255, 255, 242, 255, 255, 255, 235, 255, 255, 255, 239, 255, 255, 255, 255, 255, 255, 231, 231, 236, 255, 152, 152, 169, 255, 130, 130, 140, 255, 150, 150, 169, 255, 183, 183, 217, 255, 208, 208, 255, 255, 237, 223, 255, 255, 255, 238, 255, 255, 255, 244, 255, 255, 237, 233, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 206, 206, 226, 255, 102, 102, 102, 255, 55, 55, 55, 209, 0, 0, 0, 58, 0, 0, 0, 6, + 0, 0, 0, 0, 99, 99, 99, 132, 102, 102, 102, 255, 198, 198, 245, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 214, 214, 255, 255, 255, 250, 255, 255, 255, 242, 255, 255, 255, 239, 255, 255, 255, 255, 255, 255, 198, 198, 198, 255, 112, 112, 112, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 167, 167, 198, 255, 204, 204, 255, 255, 245, 232, 255, 255, 255, 244, 255, 255, 255, 251, 255, 255, 215, 215, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 231, 231, 255, 255, 102, 102, 102, 255, 66, 66, 66, 221, 0, 0, 0, 85, 0, 0, 0, 10, + 0, 0, 0, 0, 100, 100, 100, 179, 102, 102, 102, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 226, 226, 255, 255, 255, 250, 255, 255, 255, 242, 255, 255, 226, 221, 255, 255, 220, 220, 236, 255, 112, 112, 112, 255, 87, 87, 87, 243, 32, 32, 32, 204, 0, 0, 0, 173, 18, 18, 18, 178, 88, 88, 88, 239, 102, 102, 102, 255, 179, 179, 217, 255, 221, 217, 255, 255, 255, 244, 255, 255, 255, 251, 255, 255, 231, 231, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 231, 231, 255, 255, 233, 233, 255, 255, 110, 110, 112, 255, 82, 82, 82, 236, 0, 0, 0, 106, 0, 0, 0, 13, + 0, 0, 0, 0, 100, 100, 100, 195, 108, 108, 112, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 236, 236, 255, 255, 255, 250, 255, 255, 255, 242, 255, 255, 204, 204, 255, 255, 153, 153, 179, 255, 102, 102, 102, 255, 24, 24, 24, 200, 0, 0, 0, 136, 0, 0, 0, 67, 0, 0, 0, 33, 24, 24, 24, 68, 102, 102, 102, 255, 141, 141, 159, 255, 208, 208, 255, 255, 255, 244, 255, 255, 255, 251, 255, 255, 240, 240, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 231, 231, 255, 255, 233, 233, 255, 255, 235, 235, 255, 255, 136, 136, 140, 255, 82, 82, 82, 237, 0, 0, 0, 127, 0, 0, 0, 18, + 0, 0, 0, 0, 99, 99, 99, 196, 130, 130, 140, 255, 213, 213, 255, 255, 212, 212, 255, 255, 212, 212, 255, 255, 211, 211, 255, 255, 211, 211, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 210, 210, 255, 255, 209, 209, 255, 255, 209, 209, 255, 255, 209, 209, 255, 255, 208, 208, 255, 255, 243, 243, 255, 255, 255, 250, 255, 255, 249, 238, 255, 255, 206, 206, 255, 255, 147, 147, 169, 255, 102, 102, 102, 255, 0, 0, 0, 172, 0, 0, 0, 61, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 4, 96, 96, 96, 203, 128, 128, 140, 255, 207, 207, 255, 255, 255, 244, 255, 255, 255, 251, 255, 255, 244, 244, 255, 255, 210, 210, 255, 255, 211, 211, 255, 255, 212, 212, 255, 255, 213, 213, 255, 255, 214, 214, 255, 255, 214, 214, 255, 255, 216, 216, 255, 255, 217, 217, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 219, 219, 255, 255, 220, 220, 255, 255, 132, 132, 140, 255, 82, 82, 82, 237, 0, 0, 0, 131, 0, 0, 0, 18, + 0, 0, 0, 0, 99, 99, 99, 196, 119, 119, 121, 255, 237, 237, 255, 255, 235, 235, 255, 255, 234, 234, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 243, 243, 255, 255, 255, 250, 255, 255, 255, 242, 255, 255, 213, 213, 255, 255, 143, 143, 159, 255, 102, 102, 102, 255, 10, 10, 10, 173, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, 102, 16, 102, 102, 102, 255, 134, 134, 150, 255, 204, 204, 255, 255, 255, 244, 255, 255, 255, 251, 255, 255, 236, 236, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 128, 128, 140, 255, 82, 82, 82, 237, 0, 0, 0, 131, 0, 0, 0, 18, + 0, 0, 0, 0, 99, 99, 99, 196, 102, 102, 102, 255, 235, 235, 255, 255, 234, 234, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 236, 236, 255, 255, 255, 250, 255, 255, 255, 242, 255, 255, 222, 218, 255, 255, 183, 183, 217, 255, 102, 102, 102, 255, 78, 78, 78, 228, 28, 28, 28, 59, 0, 0, 0, 3, 102, 102, 102, 16, 102, 102, 102, 192, 102, 102, 102, 255, 185, 185, 198, 255, 226, 222, 255, 255, 255, 244, 255, 255, 255, 251, 255, 255, 226, 226, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 128, 128, 140, 255, 82, 82, 82, 237, 0, 0, 0, 131, 0, 0, 0, 18, + 0, 0, 0, 0, 95, 95, 95, 137, 102, 102, 102, 255, 234, 234, 255, 255, 232, 232, 255, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 219, 219, 255, 255, 255, 250, 255, 255, 255, 242, 255, 255, 244, 229, 255, 255, 208, 208, 255, 255, 141, 141, 159, 255, 102, 102, 102, 255, 99, 99, 99, 246, 96, 96, 96, 202, 102, 102, 102, 240, 102, 102, 102, 255, 159, 159, 159, 255, 255, 255, 255, 255, 255, 242, 255, 255, 255, 244, 255, 255, 255, 251, 255, 255, 210, 210, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 108, 108, 112, 255, 71, 71, 71, 229, 0, 0, 0, 128, 0, 0, 0, 18, + 0, 0, 0, 0, 96, 96, 96, 119, 102, 102, 102, 255, 200, 200, 217, 255, 231, 231, 255, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 244, 239, 255, 255, 255, 242, 255, 255, 255, 235, 255, 255, 237, 220, 255, 255, 204, 204, 255, 255, 172, 172, 207, 255, 135, 135, 150, 255, 129, 129, 140, 255, 129, 129, 140, 255, 187, 187, 198, 255, 255, 255, 255, 255, 255, 241, 255, 255, 255, 238, 255, 255, 255, 244, 255, 255, 255, 251, 255, 255, 252, 252, 255, 255, 233, 233, 255, 255, 210, 210, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 198, 198, 245, 255, 102, 102, 102, 255, 60, 60, 60, 219, 0, 0, 0, 113, 0, 0, 0, 15, + 0, 0, 0, 0, 88, 88, 88, 56, 102, 102, 102, 255, 175, 175, 188, 255, 229, 229, 255, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 216, 215, 255, 255, 252, 240, 255, 255, 255, 235, 255, 255, 255, 228, 255, 255, 242, 217, 255, 255, 218, 208, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 229, 220, 255, 255, 255, 233, 255, 255, 255, 232, 255, 255, 255, 238, 255, 255, 255, 244, 255, 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 242, 242, 255, 255, 223, 223, 255, 255, 207, 207, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 172, 172, 207, 255, 102, 102, 102, 255, 33, 33, 33, 198, 0, 0, 0, 93, 0, 0, 0, 12, + 0, 0, 0, 0, 0, 0, 0, 4, 101, 101, 101, 242, 142, 142, 150, 255, 227, 227, 255, 255, 226, 226, 255, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 215, 212, 255, 255, 252, 233, 255, 255, 255, 228, 255, 255, 255, 221, 255, 255, 255, 213, 255, 255, 255, 206, 255, 255, 244, 207, 255, 255, 255, 212, 255, 255, 255, 219, 255, 255, 255, 225, 255, 255, 255, 232, 255, 255, 255, 238, 255, 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 252, 255, 255, 236, 236, 255, 255, 214, 214, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 147, 147, 169, 255, 102, 102, 102, 255, 9, 9, 9, 178, 0, 0, 0, 61, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 96, 96, 96, 169, 102, 102, 102, 255, 218, 218, 245, 255, 225, 225, 255, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 211, 208, 255, 255, 243, 222, 255, 255, 255, 221, 255, 255, 255, 213, 255, 255, 255, 206, 255, 255, 255, 206, 255, 255, 255, 212, 255, 255, 255, 219, 255, 255, 255, 225, 255, 255, 255, 237, 255, 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 245, 255, 255, 223, 223, 255, 255, 207, 207, 255, 255, 204, 204, 255, 255, 115, 115, 121, 255, 82, 82, 82, 239, 0, 0, 0, 163, 0, 0, 0, 36, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 91, 91, 91, 90, 102, 102, 102, 255, 171, 171, 188, 255, 223, 223, 255, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 218, 211, 255, 255, 234, 213, 255, 255, 242, 208, 255, 255, 245, 208, 255, 255, 243, 213, 255, 255, 237, 219, 255, 255, 227, 221, 255, 255, 247, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 252, 255, 255, 194, 194, 207, 255, 102, 102, 102, 255, 46, 46, 46, 211, 0, 0, 0, 128, 0, 0, 0, 19, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 98, 98, 98, 232, 117, 117, 121, 255, 221, 221, 255, 255, 219, 219, 255, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 235, 235, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 140, 140, 140, 255, 97, 97, 97, 251, 9, 9, 9, 180, 0, 0, 0, 79, 0, 0, 0, 9, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 87, 87, 113, 102, 102, 102, 255, 175, 175, 198, 255, 218, 218, 255, 255, 216, 216, 255, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 217, 217, 217, 255, 102, 102, 102, 255, 58, 58, 58, 223, 0, 0, 0, 151, 0, 0, 0, 37, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 98, 98, 98, 233, 109, 109, 112, 255, 209, 209, 245, 255, 214, 214, 255, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 242, 242, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 131, 131, 131, 255, 97, 97, 97, 251, 9, 9, 9, 183, 0, 0, 0, 96, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 81, 81, 101, 102, 102, 102, 255, 137, 137, 150, 255, 213, 213, 255, 255, 211, 211, 255, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 233, 233, 255, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 179, 179, 179, 255, 102, 102, 102, 255, 52, 52, 52, 219, 0, 0, 0, 149, 0, 0, 0, 40, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 87, 87, 87, 187, 102, 102, 102, 255, 170, 170, 198, 255, 210, 210, 255, 255, 208, 208, 255, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 231, 231, 255, 255, 233, 233, 255, 255, 247, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 217, 217, 217, 255, 102, 102, 102, 255, 82, 82, 82, 239, 0, 0, 0, 172, 0, 0, 0, 88, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 44, 44, 37, 93, 93, 93, 228, 102, 102, 102, 255, 181, 181, 217, 255, 206, 206, 255, 255, 204, 204, 255, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 231, 231, 255, 255, 233, 233, 255, 255, 235, 235, 255, 255, 239, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 226, 226, 226, 255, 112, 112, 112, 255, 97, 97, 97, 251, 9, 9, 9, 188, 0, 0, 0, 121, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 31, 31, 31, 53, 99, 99, 99, 247, 109, 109, 112, 255, 179, 179, 217, 255, 204, 204, 255, 255, 206, 206, 255, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 231, 231, 255, 255, 233, 233, 255, 255, 235, 235, 255, 255, 237, 237, 255, 255, 238, 238, 255, 255, 251, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 226, 226, 226, 255, 112, 112, 112, 255, 97, 97, 97, 251, 24, 24, 24, 201, 0, 0, 0, 143, 0, 0, 0, 46, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 56, 56, 56, 87, 98, 98, 98, 248, 102, 102, 102, 255, 167, 167, 198, 255, 208, 208, 255, 255, 209, 209, 255, 255, 211, 211, 255, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 231, 231, 255, 255, 233, 233, 255, 255, 235, 235, 255, 255, 237, 237, 255, 255, 238, 238, 255, 255, 240, 240, 255, 255, 245, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 217, 217, 217, 255, 112, 112, 112, 255, 97, 97, 97, 251, 24, 24, 24, 201, 0, 0, 0, 146, 0, 0, 0, 63, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 38, 38, 38, 87, 90, 90, 90, 234, 102, 102, 102, 255, 142, 142, 159, 255, 205, 205, 245, 255, 213, 213, 255, 255, 215, 215, 255, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 231, 231, 255, 255, 233, 233, 255, 255, 235, 235, 255, 255, 237, 237, 255, 255, 238, 238, 255, 255, 240, 240, 255, 255, 242, 242, 255, 255, 244, 244, 255, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 179, 179, 179, 255, 102, 102, 102, 255, 97, 97, 97, 251, 24, 24, 24, 201, 0, 0, 0, 146, 0, 0, 0, 63, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 24, 24, 24, 67, 83, 83, 83, 216, 102, 102, 102, 255, 116, 116, 121, 255, 172, 172, 198, 255, 217, 217, 255, 255, 218, 218, 255, 255, 220, 220, 255, 255, 222, 222, 255, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 231, 231, 255, 255, 233, 233, 255, 255, 235, 235, 255, 255, 237, 237, 255, 255, 238, 238, 255, 255, 240, 240, 255, 255, 242, 242, 255, 255, 244, 244, 255, 255, 245, 245, 255, 255, 250, 250, 255, 255, 255, 255, 255, 255, 217, 217, 217, 255, 131, 131, 131, 255, 102, 102, 102, 255, 82, 82, 82, 239, 9, 9, 9, 188, 0, 0, 0, 143, 0, 0, 0, 63, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 42, 51, 51, 51, 159, 93, 93, 93, 244, 102, 102, 102, 255, 117, 117, 121, 255, 176, 176, 198, 255, 215, 215, 245, 255, 224, 224, 255, 255, 225, 225, 255, 255, 228, 228, 255, 255, 230, 230, 255, 255, 231, 231, 255, 255, 233, 233, 255, 255, 235, 235, 255, 255, 237, 237, 255, 255, 238, 238, 255, 255, 240, 240, 255, 255, 242, 242, 255, 255, 244, 244, 255, 255, 245, 245, 255, 255, 238, 238, 245, 255, 194, 194, 198, 255, 140, 140, 140, 255, 102, 102, 102, 255, 97, 97, 97, 251, 52, 52, 52, 219, 0, 0, 0, 172, 0, 0, 0, 121, 0, 0, 0, 46, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 24, 19, 19, 19, 86, 66, 66, 66, 198, 98, 98, 98, 250, 102, 102, 102, 255, 110, 110, 112, 255, 148, 148, 159, 255, 180, 180, 198, 255, 214, 214, 236, 255, 231, 231, 255, 255, 233, 233, 255, 255, 235, 235, 255, 255, 237, 237, 255, 255, 238, 238, 255, 255, 240, 240, 255, 255, 242, 242, 255, 255, 226, 226, 236, 255, 191, 191, 198, 255, 156, 156, 159, 255, 111, 111, 112, 255, 102, 102, 102, 255, 97, 97, 97, 251, 58, 58, 58, 223, 9, 9, 9, 183, 0, 0, 0, 149, 0, 0, 0, 88, 0, 0, 0, 28, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 39, 0, 0, 0, 96, 52, 52, 52, 189, 78, 78, 78, 230, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 127, 127, 131, 255, 136, 136, 140, 255, 136, 136, 140, 255, 137, 137, 140, 255, 128, 128, 131, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 87, 87, 87, 243, 53, 53, 53, 217, 9, 9, 9, 181, 0, 0, 0, 151, 0, 0, 0, 96, 0, 0, 0, 40, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 0, 0, 0, 31, 0, 0, 0, 76, 12, 12, 12, 130, 35, 35, 35, 185, 61, 61, 61, 214, 77, 77, 77, 231, 82, 82, 82, 237, 82, 82, 82, 237, 82, 82, 82, 237, 82, 82, 82, 237, 82, 82, 82, 237, 77, 77, 77, 233, 59, 59, 59, 220, 40, 40, 40, 203, 9, 9, 9, 180, 0, 0, 0, 164, 0, 0, 0, 136, 0, 0, 0, 87, 0, 0, 0, 39, 0, 0, 0, 13, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 36, 0, 0, 0, 61, 0, 0, 0, 94, 0, 0, 0, 119, 0, 0, 0, 130, 0, 0, 0, 131, 0, 0, 0, 131, 0, 0, 0, 131, 0, 0, 0, 130, 0, 0, 0, 119, 0, 0, 0, 96, 0, 0, 0, 67, 0, 0, 0, 37, 0, 0, 0, 21, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DeviceComputer(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 171, 64, 130, 129, 168, 116, 150, 150, 186, 148, 161, 161, 197, 195, 155, 155, 193, 255, 120, 118, 164, 142, 32, 0, 64, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 140, 166, 32, 136, 136, 165, 82, 144, 143, 172, 132, 162, 161, 189, 179, 177, 177, 204, 225, 180, 180, 208, 255, 186, 186, 215, 255, 184, 184, 214, 255, 165, 165, 200, 255, 151, 151, 191, 255, 138, 138, 182, 255, 125, 124, 172, 250, 26, 4, 57, 110, 32, 0, 64, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145, 145, 161, 16, 143, 143, 160, 65, 140, 139, 159, 116, 163, 163, 183, 164, 173, 173, 192, 195, 181, 181, 201, 255, 199, 199, 219, 255, 207, 207, 227, 255, 194, 194, 218, 255, 173, 173, 201, 255, 158, 158, 190, 255, 143, 143, 179, 255, 133, 133, 173, 255, 132, 132, 174, 255, 131, 131, 175, 255, 130, 130, 176, 255, 129, 129, 177, 255, 128, 128, 178, 255, 24, 4, 56, 173, 26, 9, 60, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 150, 156, 48, 145, 144, 153, 83, 156, 155, 165, 132, 175, 175, 186, 195, 190, 190, 201, 226, 201, 201, 213, 255, 209, 209, 222, 255, 228, 228, 242, 255, 205, 205, 222, 255, 182, 182, 202, 255, 165, 165, 188, 255, 149, 149, 176, 255, 138, 138, 168, 255, 137, 137, 169, 255, 136, 136, 170, 255, 134, 134, 172, 255, 133, 133, 173, 255, 132, 132, 174, 255, 131, 131, 175, 255, 130, 130, 176, 255, 129, 129, 177, 255, 130, 140, 188, 255, 126, 126, 180, 255, 110, 106, 157, 239, 110, 107, 158, 152, 115, 111, 164, 90, 111, 108, 159, 55, 43, 0, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 153, 153, 153, 16, 152, 152, 153, 113, 168, 168, 170, 164, 190, 189, 193, 195, 200, 200, 204, 255, 216, 216, 221, 255, 232, 232, 238, 255, 241, 241, 247, 255, 215, 215, 225, 255, 196, 196, 208, 255, 177, 177, 193, 255, 159, 159, 178, 255, 142, 142, 164, 255, 141, 141, 165, 255, 140, 140, 166, 255, 139, 139, 167, 255, 138, 138, 168, 255, 137, 137, 169, 255, 136, 136, 170, 255, 134, 134, 172, 255, 133, 133, 173, 255, 142, 154, 189, 255, 149, 173, 205, 255, 154, 197, 225, 255, 155, 214, 240, 255, 153, 229, 255, 255, 136, 176, 218, 255, 125, 125, 181, 255, 163, 163, 207, 255, 176, 176, 215, 255, 165, 165, 206, 255, 158, 158, 201, 255, 147, 147, 192, 255, 136, 135, 183, 213, 120, 118, 169, 168, 113, 111, 163, 136, 105, 101, 153, 74, 90, 80, 135, 23, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 152, 152, 153, 176, 236, 236, 236, 255, 253, 253, 254, 255, 225, 225, 228, 255, 205, 205, 210, 255, 184, 184, 193, 255, 165, 165, 176, 255, 146, 146, 160, 255, 145, 145, 161, 255, 144, 144, 162, 255, 143, 143, 163, 255, 142, 142, 164, 255, 141, 141, 165, 255, 140, 140, 166, 255, 139, 139, 167, 255, 138, 138, 168, 255, 145, 152, 180, 255, 157, 173, 197, 255, 169, 195, 213, 255, 184, 224, 234, 255, 193, 250, 255, 255, 185, 245, 255, 255, 177, 242, 255, 255, 169, 237, 255, 255, 160, 233, 255, 255, 153, 229, 255, 255, 139, 194, 232, 255, 124, 124, 182, 255, 165, 165, 208, 255, 191, 191, 223, 255, 191, 191, 223, 255, 191, 191, 223, 255, 191, 191, 223, 255, 191, 191, 223, 255, 191, 191, 223, 255, 182, 182, 216, 255, 174, 174, 210, 255, 154, 154, 195, 255, 140, 139, 184, 242, 129, 129, 174, 198, 106, 104, 156, 152, 101, 99, 150, 106, 99, 97, 150, 71, 32, 0, 64, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 149, 149, 151, 196, 253, 253, 254, 255, 175, 175, 180, 255, 149, 149, 157, 255, 148, 148, 158, 255, 147, 147, 159, 255, 146, 146, 160, 255, 145, 145, 161, 255, 144, 144, 162, 255, 143, 143, 163, 255, 142, 142, 164, 255, 141, 141, 165, 255, 152, 167, 188, 255, 167, 195, 211, 255, 182, 218, 228, 255, 196, 240, 244, 255, 204, 255, 255, 255, 204, 255, 255, 255, 203, 255, 255, 255, 198, 252, 255, 255, 191, 249, 255, 255, 183, 244, 255, 255, 175, 241, 255, 255, 168, 237, 255, 255, 160, 233, 255, 255, 152, 229, 255, 255, 139, 200, 237, 255, 123, 123, 183, 255, 164, 164, 207, 255, 205, 205, 230, 255, 205, 205, 230, 255, 205, 205, 230, 255, 205, 205, 230, 255, 205, 205, 230, 255, 205, 205, 230, 255, 205, 205, 230, 255, 205, 205, 230, 255, 205, 205, 230, 255, 205, 205, 230, 255, 205, 205, 230, 255, 205, 205, 230, 255, 188, 188, 218, 255, 170, 170, 204, 255, 158, 158, 195, 255, 133, 133, 176, 227, 109, 108, 157, 183, 97, 95, 147, 137, 32, 0, 64, 14, + 143, 142, 149, 152, 238, 238, 240, 255, 186, 186, 192, 255, 148, 148, 158, 255, 147, 147, 159, 255, 146, 146, 160, 255, 145, 145, 161, 255, 145, 160, 179, 255, 148, 181, 203, 255, 155, 200, 221, 255, 165, 220, 238, 255, 177, 242, 255, 255, 185, 245, 255, 255, 191, 249, 255, 255, 197, 251, 255, 255, 201, 253, 255, 255, 203, 254, 255, 255, 202, 254, 255, 255, 198, 252, 255, 255, 193, 250, 255, 255, 187, 246, 255, 255, 180, 243, 255, 255, 172, 239, 255, 255, 165, 235, 255, 255, 157, 232, 255, 255, 150, 228, 255, 255, 141, 224, 255, 255, 122, 122, 184, 255, 157, 157, 204, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 219, 219, 237, 255, 196, 196, 230, 255, 159, 159, 219, 255, 109, 109, 168, 255, 25, 4, 57, 117, + 135, 132, 144, 91, 216, 216, 221, 255, 202, 202, 210, 255, 147, 147, 159, 255, 132, 184, 213, 255, 133, 200, 231, 255, 137, 222, 255, 255, 145, 225, 255, 255, 152, 229, 255, 255, 159, 233, 255, 255, 167, 236, 255, 255, 173, 240, 255, 255, 180, 243, 255, 255, 186, 246, 255, 255, 190, 248, 255, 255, 193, 250, 255, 255, 194, 250, 255, 255, 194, 250, 255, 255, 191, 249, 255, 255, 187, 246, 255, 255, 182, 244, 255, 255, 175, 241, 255, 255, 169, 237, 255, 255, 162, 234, 255, 255, 154, 230, 255, 255, 147, 226, 255, 255, 139, 223, 255, 255, 121, 121, 185, 255, 148, 148, 201, 255, 234, 234, 244, 255, 234, 234, 244, 255, 234, 234, 244, 255, 234, 234, 244, 255, 234, 234, 244, 255, 234, 234, 244, 255, 234, 234, 244, 255, 234, 234, 244, 255, 234, 234, 244, 255, 234, 234, 244, 255, 234, 234, 244, 255, 234, 234, 244, 255, 192, 192, 230, 255, 160, 160, 220, 255, 121, 121, 207, 255, 105, 105, 202, 255, 105, 105, 202, 255, 103, 103, 165, 255, 26, 4, 58, 208, + 108, 99, 122, 24, 190, 190, 197, 255, 223, 223, 231, 255, 146, 146, 160, 255, 121, 208, 249, 255, 126, 216, 255, 255, 134, 220, 255, 255, 141, 224, 255, 255, 149, 227, 255, 255, 155, 230, 255, 255, 162, 234, 255, 255, 168, 237, 255, 255, 174, 240, 255, 255, 179, 242, 255, 255, 183, 244, 255, 255, 185, 246, 255, 255, 186, 246, 255, 255, 186, 246, 255, 255, 184, 245, 255, 255, 180, 243, 255, 255, 175, 241, 255, 255, 170, 238, 255, 255, 164, 235, 255, 255, 157, 232, 255, 255, 151, 228, 255, 255, 143, 225, 255, 255, 136, 221, 255, 255, 123, 144, 204, 255, 133, 133, 194, 255, 196, 196, 222, 255, 204, 204, 227, 255, 216, 216, 234, 255, 231, 231, 242, 255, 248, 248, 252, 255, 248, 248, 252, 255, 248, 248, 252, 255, 248, 248, 252, 255, 239, 239, 248, 255, 203, 203, 235, 255, 159, 159, 219, 255, 116, 116, 204, 255, 108, 108, 201, 255, 108, 108, 201, 255, 108, 108, 201, 255, 108, 108, 201, 255, 108, 108, 201, 255, 103, 103, 165, 255, 25, 4, 57, 222, + 0, 0, 128, 2, 163, 162, 175, 215, 238, 238, 247, 255, 145, 145, 161, 255, 124, 195, 232, 255, 123, 215, 255, 255, 131, 218, 255, 255, 137, 222, 255, 255, 144, 225, 255, 255, 151, 228, 255, 255, 157, 231, 255, 255, 163, 234, 255, 255, 168, 237, 255, 255, 172, 239, 255, 255, 175, 241, 255, 255, 177, 242, 255, 255, 178, 242, 255, 255, 178, 242, 255, 255, 176, 241, 255, 255, 173, 240, 255, 255, 169, 237, 255, 255, 164, 235, 255, 255, 158, 232, 255, 255, 152, 229, 255, 255, 146, 226, 255, 255, 139, 223, 255, 255, 132, 219, 255, 255, 121, 149, 209, 255, 117, 117, 189, 255, 193, 193, 220, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 194, 194, 223, 255, 203, 203, 230, 255, 156, 156, 217, 255, 110, 110, 200, 255, 110, 110, 200, 255, 110, 110, 200, 255, 110, 110, 200, 255, 110, 110, 200, 255, 110, 110, 200, 255, 110, 110, 200, 255, 110, 110, 200, 255, 110, 110, 200, 255, 104, 104, 165, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 138, 136, 153, 154, 235, 235, 245, 255, 166, 166, 183, 255, 129, 176, 209, 255, 119, 213, 255, 255, 126, 216, 255, 255, 133, 219, 255, 255, 139, 223, 255, 255, 145, 226, 255, 255, 151, 228, 255, 255, 156, 231, 255, 255, 161, 233, 255, 255, 165, 235, 255, 255, 168, 237, 255, 255, 169, 237, 255, 255, 170, 238, 255, 255, 170, 238, 255, 255, 168, 237, 255, 255, 166, 236, 255, 255, 162, 234, 255, 255, 157, 232, 255, 255, 152, 229, 255, 255, 147, 227, 255, 255, 141, 224, 255, 255, 135, 220, 255, 255, 128, 217, 255, 255, 120, 166, 222, 255, 116, 116, 190, 255, 188, 188, 218, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 162, 162, 210, 255, 112, 112, 199, 255, 112, 112, 199, 255, 112, 112, 199, 255, 112, 112, 199, 255, 112, 112, 199, 255, 112, 112, 199, 255, 112, 112, 199, 255, 111, 111, 193, 255, 107, 107, 176, 255, 110, 110, 190, 255, 105, 105, 164, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 131, 127, 148, 91, 209, 209, 222, 255, 180, 180, 198, 255, 132, 163, 192, 255, 115, 210, 255, 255, 121, 214, 255, 255, 128, 217, 255, 255, 133, 220, 255, 255, 139, 223, 255, 255, 145, 225, 255, 255, 150, 228, 255, 255, 154, 230, 255, 255, 157, 231, 255, 255, 160, 233, 255, 255, 161, 234, 255, 255, 162, 234, 255, 255, 162, 234, 255, 255, 160, 233, 255, 255, 158, 232, 255, 255, 155, 230, 255, 255, 151, 228, 255, 255, 146, 226, 255, 255, 141, 224, 255, 255, 135, 221, 255, 255, 130, 218, 255, 255, 123, 215, 255, 255, 117, 170, 227, 255, 115, 115, 191, 255, 173, 173, 213, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 162, 162, 210, 255, 115, 115, 198, 255, 115, 115, 198, 255, 115, 115, 198, 255, 115, 115, 198, 255, 114, 114, 195, 255, 109, 109, 178, 255, 104, 104, 161, 255, 108, 108, 159, 255, 112, 112, 163, 255, 111, 111, 186, 255, 105, 105, 164, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 120, 115, 140, 40, 185, 185, 202, 255, 194, 194, 212, 255, 137, 149, 176, 255, 110, 208, 255, 255, 116, 211, 255, 255, 122, 214, 255, 255, 128, 217, 255, 255, 133, 220, 255, 255, 138, 222, 255, 255, 142, 224, 255, 255, 146, 226, 255, 255, 149, 227, 255, 255, 152, 229, 255, 255, 153, 229, 255, 255, 154, 230, 255, 255, 153, 229, 255, 255, 152, 229, 255, 255, 150, 228, 255, 255, 147, 227, 255, 255, 144, 225, 255, 255, 139, 223, 255, 255, 135, 220, 255, 255, 130, 218, 255, 255, 123, 215, 255, 255, 118, 212, 255, 255, 113, 186, 239, 255, 114, 114, 192, 255, 173, 173, 213, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 163, 163, 210, 255, 117, 117, 196, 255, 116, 116, 194, 255, 111, 111, 180, 255, 106, 106, 167, 255, 105, 105, 156, 255, 121, 121, 172, 255, 140, 140, 191, 255, 153, 153, 204, 255, 128, 128, 179, 255, 113, 113, 185, 255, 106, 106, 164, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 64, 3, 161, 161, 182, 229, 212, 212, 229, 255, 140, 140, 166, 255, 107, 201, 250, 255, 111, 208, 255, 255, 116, 211, 255, 255, 122, 214, 255, 255, 127, 216, 255, 255, 132, 219, 255, 255, 135, 221, 255, 255, 139, 223, 255, 255, 141, 224, 255, 255, 144, 225, 255, 255, 145, 225, 255, 255, 146, 226, 255, 255, 145, 226, 255, 255, 144, 225, 255, 255, 142, 224, 255, 255, 139, 223, 255, 255, 136, 221, 255, 255, 133, 219, 255, 255, 128, 217, 255, 255, 123, 215, 255, 255, 118, 212, 255, 255, 113, 209, 255, 255, 107, 195, 247, 255, 113, 113, 193, 255, 152, 152, 207, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 164, 164, 210, 255, 119, 119, 195, 255, 106, 106, 164, 255, 115, 115, 166, 255, 134, 134, 185, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 128, 128, 179, 255, 115, 115, 185, 255, 106, 106, 164, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 141, 140, 166, 170, 219, 219, 237, 255, 144, 144, 172, 255, 109, 186, 233, 255, 104, 205, 255, 255, 110, 208, 255, 255, 115, 210, 255, 255, 120, 213, 255, 255, 124, 215, 255, 255, 128, 217, 255, 255, 132, 219, 255, 255, 134, 220, 255, 255, 136, 221, 255, 255, 137, 222, 255, 255, 137, 222, 255, 255, 137, 222, 255, 255, 136, 221, 255, 255, 134, 220, 255, 255, 132, 219, 255, 255, 129, 217, 255, 255, 125, 216, 255, 255, 121, 214, 255, 255, 117, 211, 255, 255, 112, 209, 255, 255, 106, 206, 255, 255, 101, 203, 255, 255, 112, 112, 194, 255, 152, 152, 207, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 164, 164, 209, 255, 122, 122, 194, 255, 107, 107, 163, 255, 140, 140, 191, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 150, 150, 201, 255, 147, 147, 198, 255, 128, 128, 179, 255, 117, 117, 184, 255, 107, 107, 163, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 128, 126, 156, 107, 202, 202, 223, 255, 157, 157, 185, 255, 116, 169, 212, 255, 99, 202, 255, 255, 104, 205, 255, 255, 109, 207, 255, 255, 113, 209, 255, 255, 117, 211, 255, 255, 120, 213, 255, 255, 124, 215, 255, 255, 126, 216, 255, 255, 128, 217, 255, 255, 129, 217, 255, 255, 129, 217, 255, 255, 129, 217, 255, 255, 128, 217, 255, 255, 127, 216, 255, 255, 124, 215, 255, 255, 121, 214, 255, 255, 118, 212, 255, 255, 115, 210, 255, 255, 110, 208, 255, 255, 105, 206, 255, 255, 100, 203, 255, 255, 95, 200, 255, 255, 108, 122, 202, 255, 136, 136, 203, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 124, 124, 193, 255, 108, 108, 163, 255, 140, 140, 191, 255, 153, 153, 204, 255, 137, 137, 188, 255, 121, 121, 172, 255, 102, 102, 153, 255, 131, 131, 182, 255, 128, 128, 179, 255, 119, 119, 183, 255, 108, 108, 163, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 113, 108, 145, 41, 180, 180, 205, 255, 173, 173, 201, 255, 121, 155, 197, 255, 92, 199, 255, 255, 97, 202, 255, 255, 102, 204, 255, 255, 106, 206, 255, 255, 110, 208, 255, 255, 113, 209, 255, 255, 116, 211, 255, 255, 118, 212, 255, 255, 119, 213, 255, 255, 121, 214, 255, 255, 121, 214, 255, 255, 121, 214, 255, 255, 120, 213, 255, 255, 118, 212, 255, 255, 117, 211, 255, 255, 114, 210, 255, 255, 111, 208, 255, 255, 107, 207, 255, 255, 103, 205, 255, 255, 99, 202, 255, 255, 94, 200, 255, 255, 88, 197, 255, 255, 104, 131, 211, 255, 130, 130, 203, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 127, 127, 192, 255, 108, 108, 163, 255, 140, 140, 191, 255, 118, 118, 169, 255, 105, 105, 156, 255, 124, 124, 175, 255, 147, 147, 198, 255, 147, 147, 198, 255, 124, 124, 175, 255, 120, 120, 182, 255, 108, 108, 163, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 3, 164, 163, 192, 230, 185, 185, 212, 255, 128, 142, 182, 255, 86, 196, 255, 255, 90, 198, 255, 255, 95, 200, 255, 255, 99, 202, 255, 255, 102, 204, 255, 255, 105, 206, 255, 255, 108, 207, 255, 255, 110, 208, 255, 255, 112, 209, 255, 255, 112, 209, 255, 255, 113, 209, 255, 255, 113, 209, 255, 255, 112, 209, 255, 255, 111, 208, 255, 255, 108, 207, 255, 255, 106, 206, 255, 255, 103, 205, 255, 255, 100, 203, 255, 255, 96, 201, 255, 255, 91, 199, 255, 255, 87, 197, 255, 255, 82, 194, 255, 255, 96, 145, 223, 255, 113, 113, 200, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 129, 129, 191, 255, 109, 109, 162, 255, 140, 140, 191, 255, 140, 140, 191, 255, 153, 153, 204, 255, 134, 134, 185, 255, 115, 115, 166, 255, 102, 102, 153, 255, 115, 115, 166, 255, 122, 122, 181, 255, 109, 109, 162, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 141, 176, 184, 199, 199, 226, 255, 133, 133, 173, 255, 83, 189, 250, 255, 84, 195, 255, 255, 87, 197, 255, 255, 91, 199, 255, 255, 95, 200, 255, 255, 98, 202, 255, 255, 100, 203, 255, 255, 102, 204, 255, 255, 103, 205, 255, 255, 104, 205, 255, 255, 104, 205, 255, 255, 104, 205, 255, 255, 104, 205, 255, 255, 102, 204, 255, 255, 101, 203, 255, 255, 98, 202, 255, 255, 96, 201, 255, 255, 92, 199, 255, 255, 89, 198, 255, 255, 85, 195, 255, 255, 80, 193, 255, 255, 75, 191, 255, 255, 90, 149, 227, 255, 107, 107, 199, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 131, 131, 189, 255, 109, 109, 162, 255, 134, 134, 185, 255, 121, 121, 172, 255, 105, 105, 156, 255, 105, 105, 156, 255, 124, 124, 175, 255, 147, 147, 198, 255, 128, 128, 179, 255, 124, 124, 180, 255, 109, 109, 162, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 122, 162, 123, 192, 192, 221, 255, 140, 140, 180, 255, 87, 175, 235, 255, 76, 191, 255, 255, 81, 193, 255, 255, 84, 195, 255, 255, 87, 197, 255, 255, 90, 198, 255, 255, 92, 199, 255, 255, 94, 200, 255, 255, 96, 201, 255, 255, 96, 201, 255, 255, 96, 201, 255, 255, 96, 201, 255, 255, 96, 201, 255, 255, 94, 200, 255, 255, 93, 199, 255, 255, 90, 198, 255, 255, 88, 197, 255, 255, 85, 195, 255, 255, 82, 194, 255, 255, 78, 192, 255, 255, 73, 190, 255, 255, 69, 187, 255, 255, 78, 161, 238, 255, 106, 106, 200, 255, 179, 179, 217, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 134, 134, 188, 255, 110, 110, 162, 255, 115, 115, 166, 255, 112, 112, 163, 255, 134, 134, 185, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 128, 128, 179, 255, 126, 126, 179, 255, 110, 110, 162, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 110, 153, 58, 177, 177, 210, 255, 151, 151, 191, 255, 98, 158, 215, 255, 69, 187, 255, 255, 73, 190, 255, 255, 76, 191, 255, 255, 80, 193, 255, 255, 82, 194, 255, 255, 84, 195, 255, 255, 86, 196, 255, 255, 87, 197, 255, 255, 88, 197, 255, 255, 88, 197, 255, 255, 88, 197, 255, 255, 87, 197, 255, 255, 86, 196, 255, 255, 85, 195, 255, 255, 83, 194, 255, 255, 80, 193, 255, 255, 77, 192, 255, 255, 74, 190, 255, 255, 70, 188, 255, 255, 67, 186, 255, 255, 62, 184, 255, 255, 70, 163, 241, 255, 105, 105, 201, 255, 168, 168, 215, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 137, 137, 187, 255, 111, 111, 161, 255, 140, 140, 191, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 128, 128, 179, 255, 128, 128, 178, 255, 111, 111, 161, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 43, 5, 158, 158, 196, 243, 161, 161, 200, 255, 108, 146, 201, 255, 62, 184, 255, 255, 66, 186, 255, 255, 69, 187, 255, 255, 71, 189, 255, 255, 74, 190, 255, 255, 76, 191, 255, 255, 78, 192, 255, 255, 79, 192, 255, 255, 80, 193, 255, 255, 80, 193, 255, 255, 80, 193, 255, 255, 79, 193, 255, 255, 78, 192, 255, 255, 77, 191, 255, 255, 74, 190, 255, 255, 72, 189, 255, 255, 70, 188, 255, 255, 67, 186, 255, 255, 64, 185, 255, 255, 59, 183, 255, 255, 55, 181, 255, 255, 60, 171, 249, 255, 104, 104, 203, 255, 168, 168, 215, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 139, 139, 186, 255, 111, 111, 161, 255, 140, 140, 191, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 128, 128, 179, 255, 130, 130, 177, 255, 111, 111, 161, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 138, 182, 185, 173, 173, 211, 255, 119, 135, 188, 255, 54, 180, 255, 255, 58, 182, 255, 255, 61, 184, 255, 255, 64, 185, 255, 255, 66, 186, 255, 255, 68, 187, 255, 255, 70, 188, 255, 255, 70, 188, 255, 255, 71, 189, 255, 255, 72, 189, 255, 255, 71, 189, 255, 255, 71, 188, 255, 255, 70, 188, 255, 255, 69, 187, 255, 255, 67, 186, 255, 255, 65, 185, 255, 255, 62, 184, 255, 255, 59, 183, 255, 255, 56, 181, 255, 255, 86, 173, 240, 255, 122, 162, 221, 255, 127, 127, 204, 255, 104, 104, 204, 255, 173, 173, 216, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 144, 144, 186, 255, 112, 112, 161, 255, 140, 140, 191, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 140, 140, 191, 255, 118, 118, 169, 255, 117, 117, 165, 255, 139, 139, 183, 255, 112, 112, 161, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 120, 169, 137, 185, 185, 220, 255, 126, 126, 180, 255, 53, 173, 250, 255, 51, 178, 255, 255, 53, 180, 255, 255, 56, 181, 255, 255, 58, 182, 255, 255, 60, 183, 255, 255, 62, 184, 255, 255, 63, 184, 255, 255, 64, 185, 255, 255, 64, 185, 255, 255, 64, 185, 255, 255, 63, 184, 255, 255, 62, 184, 255, 255, 61, 183, 255, 255, 59, 182, 255, 255, 57, 181, 255, 255, 69, 180, 250, 255, 119, 174, 231, 255, 144, 160, 215, 255, 133, 133, 205, 255, 110, 110, 203, 255, 126, 126, 208, 255, 159, 159, 214, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 152, 152, 191, 255, 120, 120, 166, 255, 140, 140, 191, 255, 153, 153, 204, 255, 134, 134, 185, 255, 114, 114, 164, 255, 121, 121, 166, 255, 139, 139, 179, 255, 144, 144, 183, 255, 133, 133, 176, 255, 107, 107, 157, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 164, 74, 168, 168, 208, 255, 135, 135, 188, 255, 61, 161, 237, 255, 43, 175, 255, 255, 46, 176, 255, 255, 48, 177, 255, 255, 51, 178, 255, 255, 52, 179, 255, 255, 54, 180, 255, 255, 54, 180, 255, 255, 55, 181, 255, 255, 55, 181, 255, 255, 55, 181, 255, 255, 54, 180, 255, 255, 54, 180, 255, 255, 52, 179, 255, 255, 103, 182, 242, 255, 149, 181, 227, 255, 155, 155, 211, 255, 126, 126, 205, 255, 105, 105, 201, 255, 122, 122, 203, 255, 172, 172, 215, 255, 195, 195, 221, 255, 193, 193, 220, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 154, 154, 190, 255, 124, 124, 168, 255, 118, 118, 169, 255, 114, 114, 163, 255, 127, 127, 169, 255, 144, 144, 180, 255, 146, 146, 182, 255, 129, 129, 171, 255, 113, 113, 160, 255, 102, 102, 153, 255, 102, 102, 153, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 64, 7, 151, 151, 199, 255, 143, 143, 195, 255, 78, 146, 219, 255, 35, 171, 255, 255, 38, 172, 255, 255, 40, 173, 255, 255, 42, 174, 255, 255, 44, 175, 255, 255, 45, 176, 255, 255, 47, 176, 255, 255, 47, 176, 255, 255, 47, 176, 255, 255, 47, 176, 255, 255, 76, 181, 250, 255, 141, 189, 237, 255, 173, 181, 222, 255, 143, 143, 208, 255, 116, 116, 202, 255, 100, 100, 195, 255, 121, 121, 188, 255, 163, 163, 209, 255, 153, 153, 204, 255, 153, 153, 204, 255, 158, 158, 206, 255, 175, 175, 213, 255, 185, 185, 217, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 156, 156, 189, 255, 134, 134, 172, 255, 132, 132, 170, 255, 149, 149, 181, 255, 149, 149, 181, 255, 131, 131, 171, 255, 108, 108, 157, 255, 102, 102, 153, 255, 105, 105, 155, 255, 126, 126, 167, 255, 111, 111, 158, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 135, 187, 200, 154, 154, 203, 255, 92, 136, 206, 255, 27, 167, 255, 255, 30, 168, 255, 255, 32, 169, 255, 255, 35, 171, 255, 255, 36, 171, 255, 255, 37, 172, 255, 255, 38, 172, 255, 255, 49, 175, 254, 255, 105, 189, 247, 255, 177, 202, 236, 255, 168, 168, 217, 255, 131, 131, 205, 255, 108, 108, 198, 255, 96, 96, 191, 255, 80, 80, 180, 255, 66, 66, 168, 255, 125, 125, 170, 255, 203, 203, 224, 255, 195, 195, 221, 255, 176, 176, 213, 255, 158, 158, 206, 255, 153, 153, 204, 255, 153, 153, 204, 255, 162, 162, 208, 255, 173, 173, 212, 255, 181, 181, 215, 255, 180, 180, 215, 255, 178, 178, 214, 255, 157, 157, 188, 255, 151, 151, 180, 255, 148, 148, 178, 255, 129, 129, 168, 255, 108, 108, 156, 255, 102, 102, 153, 255, 105, 105, 155, 255, 127, 127, 166, 255, 148, 148, 178, 255, 151, 151, 180, 255, 114, 114, 160, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 120, 178, 138, 160, 160, 207, 255, 108, 126, 194, 255, 20, 163, 255, 255, 22, 164, 255, 255, 24, 165, 255, 255, 26, 166, 255, 255, 28, 167, 255, 255, 79, 183, 252, 255, 152, 203, 246, 255, 206, 206, 232, 255, 156, 156, 213, 255, 116, 116, 198, 255, 107, 107, 196, 255, 96, 96, 192, 255, 83, 83, 184, 255, 79, 79, 181, 255, 79, 79, 181, 255, 79, 79, 181, 255, 99, 99, 162, 255, 203, 203, 224, 255, 201, 201, 223, 255, 198, 198, 222, 255, 195, 195, 221, 255, 183, 183, 216, 255, 167, 167, 210, 255, 153, 153, 204, 255, 153, 153, 204, 255, 153, 153, 204, 255, 163, 163, 208, 255, 170, 170, 211, 255, 156, 156, 186, 255, 128, 128, 166, 255, 105, 105, 155, 255, 102, 102, 153, 255, 105, 105, 155, 255, 128, 128, 166, 255, 150, 150, 177, 255, 154, 154, 179, 255, 153, 198, 145, 255, 153, 166, 169, 255, 115, 115, 159, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 108, 172, 90, 157, 157, 206, 255, 120, 120, 186, 255, 19, 157, 251, 255, 15, 160, 255, 255, 31, 167, 255, 255, 116, 197, 252, 255, 209, 226, 246, 255, 186, 186, 224, 255, 140, 140, 206, 255, 111, 111, 195, 255, 108, 108, 196, 255, 99, 99, 196, 255, 92, 92, 194, 255, 92, 92, 194, 255, 92, 92, 194, 255, 92, 92, 194, 255, 92, 92, 194, 255, 92, 92, 194, 255, 101, 101, 168, 255, 191, 191, 215, 255, 201, 201, 223, 255, 198, 198, 222, 255, 195, 195, 221, 255, 193, 193, 220, 255, 190, 190, 219, 255, 186, 186, 217, 255, 173, 173, 212, 255, 159, 159, 206, 255, 153, 153, 204, 255, 153, 153, 204, 255, 115, 115, 166, 255, 102, 102, 153, 255, 105, 105, 155, 255, 129, 129, 165, 255, 153, 153, 176, 255, 156, 156, 177, 255, 156, 156, 177, 255, 156, 156, 177, 255, 153, 255, 102, 255, 155, 187, 154, 255, 116, 116, 159, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 81, 140, 24, 144, 144, 199, 255, 129, 129, 193, 255, 80, 165, 238, 255, 175, 222, 254, 255, 230, 230, 243, 255, 170, 170, 217, 255, 121, 121, 196, 255, 112, 112, 194, 255, 135, 135, 199, 255, 143, 143, 203, 255, 117, 117, 203, 255, 102, 102, 203, 255, 102, 102, 203, 255, 102, 102, 203, 255, 102, 102, 203, 255, 102, 102, 203, 255, 102, 102, 203, 255, 102, 102, 203, 255, 103, 103, 179, 255, 178, 178, 207, 255, 201, 201, 223, 255, 198, 198, 222, 255, 195, 195, 221, 255, 193, 193, 220, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 177, 177, 214, 255, 164, 164, 209, 255, 120, 120, 168, 255, 130, 130, 165, 255, 155, 155, 175, 255, 158, 158, 176, 255, 158, 158, 176, 255, 158, 158, 176, 255, 158, 158, 176, 255, 158, 158, 176, 255, 157, 176, 162, 255, 158, 158, 176, 255, 116, 116, 159, 255, 25, 4, 57, 222, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 144, 195, 80, 170, 170, 207, 224, 150, 150, 202, 255, 137, 137, 198, 255, 142, 142, 202, 255, 141, 141, 203, 255, 114, 114, 192, 255, 128, 128, 197, 255, 175, 175, 210, 255, 212, 212, 219, 255, 182, 182, 210, 255, 158, 158, 205, 255, 160, 160, 207, 255, 137, 137, 205, 255, 110, 110, 204, 255, 110, 110, 204, 255, 110, 110, 204, 255, 110, 110, 204, 255, 110, 110, 204, 255, 110, 110, 204, 255, 107, 107, 180, 255, 133, 133, 182, 255, 160, 160, 200, 255, 190, 190, 217, 255, 195, 195, 221, 255, 193, 193, 220, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 165, 165, 187, 255, 161, 161, 175, 255, 161, 161, 175, 255, 161, 161, 175, 255, 161, 161, 175, 255, 161, 161, 175, 255, 161, 161, 175, 255, 161, 161, 175, 255, 146, 146, 170, 255, 110, 107, 149, 251, 52, 38, 91, 230, 25, 4, 57, 203, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 142, 193, 159, 195, 195, 217, 255, 238, 238, 238, 255, 176, 176, 214, 255, 142, 142, 200, 255, 115, 115, 191, 255, 154, 154, 207, 255, 198, 198, 222, 255, 231, 231, 231, 255, 226, 226, 226, 255, 221, 221, 221, 255, 208, 208, 217, 255, 152, 152, 200, 255, 169, 169, 210, 255, 161, 161, 209, 255, 120, 120, 204, 255, 120, 120, 204, 255, 120, 120, 204, 255, 120, 120, 204, 255, 120, 120, 204, 255, 120, 120, 204, 255, 116, 116, 192, 255, 132, 132, 179, 255, 147, 147, 196, 255, 123, 121, 172, 251, 144, 143, 186, 253, 176, 176, 209, 255, 190, 190, 219, 255, 188, 188, 218, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 170, 170, 193, 255, 163, 163, 174, 255, 163, 163, 174, 255, 163, 163, 174, 255, 163, 163, 174, 255, 163, 163, 174, 255, 156, 156, 172, 255, 123, 122, 158, 253, 58, 46, 98, 233, 25, 4, 57, 201, 25, 4, 58, 161, 26, 5, 58, 96, + 0, 0, 0, 0, 0, 0, 0, 0, 138, 138, 189, 159, 198, 198, 217, 255, 237, 237, 237, 255, 242, 242, 242, 255, 238, 238, 243, 255, 215, 215, 234, 255, 230, 230, 240, 255, 243, 243, 243, 255, 238, 238, 238, 255, 233, 233, 233, 255, 228, 228, 228, 255, 223, 223, 223, 255, 217, 217, 220, 255, 166, 166, 203, 255, 173, 173, 211, 255, 175, 175, 213, 255, 134, 134, 205, 255, 129, 129, 204, 255, 129, 129, 204, 255, 129, 129, 204, 255, 129, 129, 204, 255, 129, 129, 204, 255, 122, 122, 192, 255, 136, 136, 181, 255, 164, 164, 206, 255, 143, 143, 193, 255, 80, 69, 121, 228, 76, 66, 118, 222, 131, 128, 174, 249, 164, 164, 202, 255, 185, 185, 217, 255, 183, 183, 216, 255, 180, 180, 215, 255, 178, 178, 214, 255, 171, 171, 193, 255, 165, 165, 173, 255, 165, 165, 173, 255, 165, 165, 173, 255, 162, 162, 172, 255, 125, 124, 159, 253, 70, 60, 112, 238, 31, 12, 65, 209, 25, 4, 57, 172, 26, 5, 56, 96, 26, 6, 57, 35, 26, 0, 51, 9, + 0, 0, 0, 0, 135, 135, 186, 96, 176, 176, 205, 255, 233, 233, 233, 255, 238, 238, 238, 255, 244, 244, 244, 255, 249, 249, 249, 255, 253, 253, 253, 255, 250, 250, 250, 255, 245, 245, 245, 255, 239, 239, 239, 255, 234, 234, 234, 255, 229, 229, 229, 255, 223, 223, 223, 255, 218, 218, 220, 255, 192, 192, 212, 255, 161, 161, 204, 255, 184, 184, 216, 255, 157, 157, 209, 255, 138, 138, 204, 255, 138, 138, 204, 255, 138, 138, 204, 255, 138, 138, 204, 255, 138, 138, 204, 255, 130, 130, 192, 255, 136, 136, 181, 255, 166, 166, 207, 255, 160, 160, 205, 255, 131, 130, 180, 252, 48, 32, 84, 155, 25, 4, 57, 117, 73, 61, 113, 199, 114, 111, 161, 245, 156, 156, 197, 255, 176, 176, 212, 255, 178, 178, 214, 255, 172, 172, 192, 255, 168, 168, 172, 255, 164, 164, 171, 255, 139, 139, 167, 255, 79, 71, 120, 241, 31, 12, 65, 211, 25, 4, 57, 175, 26, 4, 58, 111, 28, 5, 57, 47, 18, 0, 55, 12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 131, 131, 182, 209, 216, 216, 222, 255, 233, 233, 233, 255, 238, 238, 238, 255, 243, 243, 243, 255, 248, 248, 248, 255, 252, 252, 252, 255, 250, 250, 250, 255, 245, 245, 245, 255, 239, 239, 239, 255, 234, 234, 234, 255, 229, 229, 229, 255, 223, 223, 223, 255, 218, 218, 220, 255, 213, 213, 219, 255, 152, 152, 197, 255, 193, 193, 220, 255, 177, 177, 214, 255, 149, 149, 204, 255, 149, 149, 204, 255, 149, 149, 204, 255, 149, 149, 204, 255, 149, 149, 204, 255, 149, 149, 204, 255, 128, 128, 174, 255, 166, 166, 207, 255, 161, 161, 206, 255, 142, 142, 192, 255, 95, 87, 139, 220, 26, 7, 56, 68, 23, 6, 58, 38, 24, 5, 55, 92, 58, 45, 97, 181, 104, 100, 150, 240, 144, 144, 189, 255, 165, 165, 186, 255, 146, 146, 168, 255, 87, 79, 128, 243, 38, 20, 73, 217, 25, 4, 57, 185, 26, 4, 58, 119, 27, 5, 59, 49, 28, 0, 57, 16, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 129, 129, 180, 255, 226, 226, 226, 255, 231, 231, 231, 255, 237, 237, 237, 255, 241, 241, 241, 255, 245, 245, 245, 255, 247, 247, 247, 255, 246, 246, 246, 255, 242, 242, 242, 255, 238, 238, 238, 255, 233, 233, 233, 255, 228, 228, 228, 255, 222, 222, 222, 255, 217, 217, 220, 255, 213, 213, 219, 255, 166, 166, 201, 255, 194, 194, 219, 255, 196, 196, 221, 255, 158, 158, 204, 255, 158, 158, 204, 255, 158, 158, 204, 255, 158, 158, 204, 255, 158, 158, 204, 255, 158, 158, 204, 255, 119, 119, 167, 255, 166, 166, 207, 255, 161, 161, 206, 255, 143, 143, 192, 255, 107, 102, 153, 243, 25, 4, 56, 114, 28, 0, 57, 16, 21, 0, 64, 10, 23, 8, 60, 30, 26, 3, 58, 77, 52, 38, 90, 166, 82, 75, 127, 227, 51, 36, 89, 221, 26, 3, 57, 191, 26, 3, 57, 128, 26, 4, 56, 59, 23, 0, 58, 19, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 125, 125, 176, 255, 224, 224, 224, 255, 229, 229, 229, 255, 233, 233, 233, 255, 237, 237, 237, 255, 240, 240, 240, 255, 241, 241, 241, 255, 240, 240, 240, 255, 238, 238, 238, 255, 234, 234, 234, 255, 230, 230, 230, 255, 225, 225, 225, 255, 220, 220, 221, 255, 216, 216, 220, 255, 212, 212, 218, 255, 186, 186, 209, 255, 183, 183, 213, 255, 208, 208, 226, 255, 173, 173, 207, 255, 168, 168, 204, 255, 168, 168, 204, 255, 168, 168, 204, 255, 168, 168, 204, 255, 168, 168, 204, 255, 119, 119, 167, 255, 165, 165, 207, 255, 161, 161, 206, 255, 141, 141, 191, 255, 103, 98, 150, 245, 26, 5, 57, 147, 21, 0, 53, 21, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 64, 7, 26, 9, 60, 26, 24, 3, 59, 64, 26, 4, 57, 102, 25, 3, 56, 71, 27, 0, 55, 24, 0, 0, 64, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 120, 119, 170, 212, 197, 197, 209, 255, 226, 226, 226, 255, 230, 230, 230, 255, 232, 232, 232, 255, 235, 235, 235, 255, 235, 235, 235, 255, 235, 235, 235, 255, 233, 233, 233, 255, 230, 230, 230, 255, 227, 227, 227, 255, 222, 222, 222, 255, 218, 218, 220, 255, 214, 214, 219, 255, 210, 210, 218, 255, 202, 202, 216, 255, 168, 168, 204, 255, 217, 217, 229, 255, 189, 189, 212, 255, 177, 177, 204, 255, 177, 177, 204, 255, 177, 177, 204, 255, 177, 177, 204, 255, 177, 177, 204, 255, 119, 119, 167, 255, 164, 164, 207, 255, 160, 160, 206, 255, 133, 133, 183, 255, 84, 75, 127, 237, 26, 5, 57, 147, 21, 0, 53, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 43, 5, 28, 0, 57, 16, 32, 0, 64, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 104, 99, 152, 96, 144, 144, 182, 255, 222, 222, 222, 255, 225, 225, 225, 255, 228, 228, 228, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 229, 229, 229, 255, 226, 226, 226, 255, 223, 223, 223, 255, 219, 219, 220, 255, 215, 215, 220, 255, 212, 212, 219, 255, 208, 208, 218, 255, 204, 204, 217, 255, 158, 158, 198, 255, 226, 226, 233, 255, 205, 205, 218, 255, 186, 186, 204, 255, 186, 186, 204, 255, 186, 186, 204, 255, 186, 186, 204, 255, 150, 150, 183, 255, 139, 139, 184, 255, 163, 163, 207, 255, 149, 149, 197, 255, 114, 113, 164, 253, 39, 21, 74, 214, 25, 4, 56, 114, 28, 0, 57, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 26, 0, 51, 9, 101, 97, 148, 191, 154, 154, 187, 255, 220, 220, 221, 255, 223, 223, 223, 255, 224, 224, 224, 255, 225, 225, 225, 255, 224, 224, 224, 255, 223, 223, 223, 255, 221, 221, 221, 255, 218, 218, 220, 255, 216, 216, 220, 255, 212, 212, 219, 255, 209, 209, 218, 255, 206, 206, 217, 255, 202, 202, 216, 255, 164, 164, 200, 255, 215, 215, 227, 255, 221, 221, 226, 255, 196, 196, 204, 255, 196, 196, 204, 255, 175, 175, 194, 255, 135, 135, 175, 255, 142, 142, 186, 255, 167, 167, 207, 255, 154, 154, 199, 255, 118, 118, 169, 255, 62, 50, 102, 233, 24, 4, 56, 173, 24, 4, 56, 56, 0, 0, 64, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 60, 26, 88, 82, 134, 197, 138, 138, 177, 255, 204, 204, 213, 255, 219, 219, 220, 255, 219, 219, 221, 255, 219, 219, 221, 255, 218, 218, 220, 255, 216, 216, 220, 255, 214, 214, 219, 255, 212, 212, 219, 255, 209, 209, 218, 255, 206, 206, 217, 255, 203, 203, 217, 255, 200, 200, 215, 255, 189, 189, 211, 255, 151, 151, 193, 255, 195, 195, 211, 255, 158, 158, 187, 255, 138, 138, 179, 255, 142, 142, 186, 255, 165, 165, 203, 255, 169, 169, 208, 255, 145, 145, 190, 255, 110, 109, 160, 253, 61, 49, 101, 233, 25, 5, 57, 187, 26, 5, 56, 96, 32, 0, 64, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 7, 60, 33, 61, 48, 101, 152, 108, 106, 154, 247, 155, 155, 185, 255, 201, 201, 212, 255, 214, 214, 219, 255, 214, 214, 219, 255, 212, 212, 219, 255, 211, 211, 218, 255, 208, 208, 218, 255, 206, 206, 217, 255, 203, 203, 217, 255, 200, 200, 216, 255, 197, 197, 215, 255, 194, 194, 214, 255, 190, 190, 213, 255, 161, 161, 198, 255, 168, 168, 202, 255, 179, 179, 211, 255, 175, 175, 210, 255, 152, 152, 193, 255, 123, 123, 172, 255, 90, 85, 137, 247, 37, 19, 72, 218, 24, 4, 56, 173, 26, 5, 56, 96, 21, 11, 53, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 59, 23, 25, 3, 55, 80, 60, 48, 100, 189, 85, 79, 131, 237, 125, 125, 168, 255, 158, 158, 187, 255, 183, 183, 203, 255, 200, 200, 214, 255, 205, 205, 217, 255, 202, 202, 216, 255, 200, 200, 216, 255, 197, 197, 215, 255, 194, 194, 214, 255, 191, 191, 213, 255, 188, 188, 213, 255, 175, 175, 205, 255, 153, 153, 190, 255, 133, 133, 176, 255, 105, 104, 154, 253, 78, 71, 123, 242, 43, 27, 79, 220, 25, 5, 58, 192, 25, 5, 58, 142, 26, 4, 58, 61, 32, 0, 64, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 64, 7, 27, 7, 60, 33, 24, 3, 57, 82, 34, 16, 68, 147, 55, 42, 94, 208, 69, 60, 111, 229, 86, 81, 133, 243, 85, 80, 132, 245, 127, 127, 169, 255, 126, 126, 169, 255, 125, 125, 168, 255, 125, 125, 168, 255, 109, 108, 155, 253, 85, 80, 132, 246, 81, 75, 126, 242, 68, 58, 110, 234, 48, 33, 86, 220, 24, 4, 57, 199, 25, 4, 57, 177, 26, 3, 57, 128, 27, 3, 57, 66, 26, 9, 60, 26, 0, 0, 64, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 51, 9, 21, 0, 53, 21, 26, 5, 56, 44, 26, 3, 57, 78, 26, 4, 57, 113, 26, 5, 58, 145, 25, 4, 57, 159, 25, 4, 57, 187, 25, 5, 57, 194, 25, 5, 57, 194, 25, 5, 57, 192, 25, 4, 57, 180, 26, 4, 57, 156, 26, 5, 58, 138, 26, 4, 57, 110, 26, 3, 57, 70, 27, 7, 54, 33, 26, 0, 64, 17, 43, 0, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 2, 26, 0, 51, 9, 32, 0, 64, 14, 21, 0, 53, 21, 21, 0, 53, 21, 24, 8, 56, 28, 24, 8, 56, 28, 24, 8, 56, 28, 24, 8, 56, 28, 26, 9, 60, 26, 21, 0, 53, 21, 23, 0, 58, 19, 32, 0, 64, 14, 32, 0, 64, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DeviceScanner(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 48, 50, 50, 50, 145, 67, 67, 67, 194, 105, 105, 105, 240, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 77, 77, 128, 255, 77, 77, 128, 255, 78, 78, 136, 197, 66, 66, 99, 196, 60, 60, 83, 137, 46, 46, 46, 88, 43, 43, 43, 38, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 70, 70, 176, 230, 230, 230, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 188, 188, 233, 255, 102, 102, 204, 255, 102, 102, 204, 255, 102, 102, 204, 255, 102, 102, 204, 255, 118, 118, 201, 255, 118, 118, 124, 255, 64, 64, 64, 228, 47, 47, 47, 154, 46, 46, 46, 89, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 116, 116, 240, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 220, 220, 239, 255, 175, 175, 226, 255, 175, 175, 226, 255, 202, 202, 234, 255, 247, 247, 247, 255, 247, 247, 247, 255, 247, 247, 247, 255, 210, 210, 210, 255, 137, 137, 137, 255, 76, 76, 76, 243, 48, 48, 48, 170, 41, 41, 41, 60, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 48, 98, 98, 98, 255, 168, 168, 168, 255, 215, 215, 215, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 238, 238, 238, 255, 203, 203, 203, 255, 133, 133, 133, 255, 62, 62, 62, 218, 44, 44, 44, 111, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 41, 41, 20, 40, 40, 40, 123, 37, 37, 37, 217, 49, 49, 49, 250, 73, 73, 73, 255, 107, 107, 107, 255, 152, 152, 152, 255, 196, 196, 196, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 230, 230, 230, 255, 163, 163, 163, 255, 74, 74, 74, 233, 43, 43, 43, 115, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 19, 0, 0, 0, 76, 0, 0, 0, 115, 22, 22, 22, 184, 36, 36, 36, 224, 46, 46, 46, 246, 51, 51, 51, 255, 62, 62, 62, 255, 94, 94, 94, 255, 136, 136, 136, 255, 179, 179, 179, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 221, 221, 221, 255, 142, 142, 142, 255, 115, 115, 115, 255, 63, 63, 63, 233, 46, 46, 46, 143, 30, 30, 30, 27, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 15, 0, 0, 0, 30, 0, 0, 0, 69, 0, 0, 0, 112, 15, 15, 15, 167, 34, 34, 34, 217, 44, 44, 44, 241, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 81, 81, 81, 255, 122, 122, 122, 255, 162, 162, 162, 255, 203, 203, 203, 255, 213, 213, 213, 255, 213, 213, 213, 255, 213, 213, 213, 255, 213, 213, 213, 255, 213, 213, 213, 255, 213, 213, 213, 255, 138, 138, 144, 255, 153, 153, 161, 255, 153, 153, 161, 255, 115, 115, 122, 255, 76, 76, 79, 245, 44, 44, 44, 148, 29, 29, 29, 28, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 15, 0, 0, 0, 25, 0, 0, 0, 55, 0, 0, 0, 101, 11, 11, 11, 154, 28, 28, 28, 205, 44, 44, 44, 241, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 71, 71, 71, 255, 111, 111, 111, 255, 149, 149, 149, 255, 178, 178, 178, 255, 206, 206, 206, 255, 158, 158, 158, 255, 153, 153, 173, 255, 153, 153, 173, 255, 153, 153, 173, 255, 153, 153, 173, 255, 153, 153, 173, 255, 128, 128, 144, 255, 76, 76, 82, 245, 44, 44, 44, 148, 38, 38, 38, 43, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 13, 0, 0, 0, 22, 0, 0, 0, 46, 0, 0, 0, 88, 6, 6, 6, 143, 25, 25, 25, 198, 39, 39, 39, 230, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 61, 61, 61, 255, 83, 83, 86, 255, 134, 134, 159, 255, 153, 153, 184, 255, 153, 153, 184, 255, 153, 153, 184, 255, 153, 153, 184, 255, 153, 153, 184, 255, 153, 153, 184, 255, 134, 134, 161, 255, 89, 89, 102, 255, 46, 46, 46, 177, 34, 34, 34, 48, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 10, 0, 0, 0, 21, 0, 0, 0, 39, 0, 0, 0, 78, 0, 0, 0, 122, 21, 21, 21, 190, 36, 36, 36, 225, 49, 49, 49, 250, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 70, 70, 77, 255, 108, 108, 131, 255, 147, 147, 186, 255, 153, 153, 195, 255, 153, 153, 195, 255, 153, 153, 195, 255, 153, 153, 195, 255, 153, 153, 195, 255, 140, 140, 178, 255, 89, 89, 106, 255, 55, 55, 59, 178, 34, 34, 34, 48, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 16, 0, 0, 0, 31, 0, 0, 0, 69, 0, 0, 0, 113, 18, 18, 18, 178, 36, 36, 36, 224, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 89, 89, 108, 255, 121, 121, 157, 255, 153, 153, 207, 255, 153, 153, 207, 255, 153, 153, 207, 255, 153, 153, 207, 255, 153, 153, 207, 255, 147, 147, 198, 255, 102, 102, 131, 255, 55, 55, 60, 191, 42, 42, 42, 78, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 47, 69, 60, 60, 60, 138, 96, 96, 96, 215, 113, 113, 113, 255, 141, 141, 141, 255, 136, 136, 136, 255, 114, 114, 114, 255, 99, 99, 99, 255, 72, 72, 72, 255, 51, 51, 51, 255, 51, 51, 51, 255, 64, 64, 71, 255, 102, 102, 133, 255, 140, 140, 197, 255, 153, 153, 218, 255, 153, 153, 218, 255, 153, 153, 218, 255, 153, 153, 218, 255, 147, 147, 208, 255, 108, 108, 147, 255, 63, 63, 73, 207, 40, 40, 40, 82, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 32, 50, 50, 50, 98, 94, 94, 94, 178, 114, 114, 114, 240, 143, 143, 143, 255, 156, 156, 156, 255, 136, 136, 136, 255, 145, 152, 160, 255, 143, 167, 191, 255, 140, 179, 217, 255, 129, 167, 204, 255, 114, 136, 158, 255, 116, 124, 132, 255, 116, 116, 116, 255, 104, 104, 104, 255, 79, 79, 79, 255, 60, 60, 60, 255, 51, 51, 51, 255, 83, 83, 105, 255, 115, 115, 161, 255, 153, 153, 229, 255, 153, 153, 229, 255, 153, 153, 229, 255, 153, 153, 229, 255, 153, 153, 229, 255, 115, 115, 164, 255, 62, 62, 74, 208, 43, 43, 43, 96, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 16, 50, 50, 50, 81, 79, 79, 79, 146, 107, 107, 107, 225, 141, 141, 141, 255, 171, 171, 171, 255, 156, 156, 156, 255, 150, 153, 155, 255, 165, 168, 172, 255, 207, 207, 207, 255, 227, 236, 245, 255, 198, 227, 255, 255, 173, 214, 255, 255, 153, 204, 255, 255, 141, 196, 251, 255, 129, 188, 247, 255, 118, 180, 243, 255, 105, 160, 213, 255, 98, 137, 177, 255, 102, 121, 139, 255, 114, 114, 114, 255, 105, 105, 105, 255, 90, 90, 90, 255, 68, 68, 68, 255, 57, 57, 62, 255, 96, 96, 132, 255, 134, 134, 205, 255, 153, 153, 241, 255, 153, 153, 241, 255, 153, 153, 241, 255, 153, 153, 241, 255, 102, 102, 148, 255, 28, 28, 28, 118, 0, 0, 0, 13, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 48, 50, 50, 50, 114, 112, 112, 112, 194, 134, 134, 134, 255, 168, 168, 168, 255, 181, 181, 181, 255, 155, 155, 155, 255, 154, 163, 169, 255, 136, 164, 193, 255, 165, 195, 226, 255, 211, 233, 255, 255, 236, 245, 255, 255, 255, 255, 255, 255, 236, 245, 255, 255, 198, 227, 255, 255, 173, 214, 255, 255, 153, 204, 255, 255, 141, 196, 251, 255, 129, 188, 247, 255, 118, 180, 243, 255, 106, 173, 239, 255, 94, 165, 235, 255, 82, 157, 231, 255, 73, 146, 220, 255, 75, 126, 178, 255, 85, 117, 149, 255, 105, 110, 116, 255, 108, 108, 108, 255, 93, 93, 93, 255, 74, 74, 74, 255, 77, 77, 94, 255, 115, 115, 176, 255, 147, 147, 240, 255, 153, 153, 252, 255, 102, 102, 152, 255, 10, 10, 10, 169, 0, 0, 0, 57, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 16, 50, 50, 50, 97, 100, 100, 100, 162, 127, 127, 127, 240, 162, 162, 162, 255, 209, 209, 209, 255, 179, 179, 179, 255, 161, 163, 164, 255, 187, 187, 187, 255, 197, 201, 204, 255, 213, 231, 243, 255, 186, 217, 235, 255, 153, 204, 255, 255, 179, 217, 255, 255, 211, 233, 255, 255, 236, 245, 255, 255, 255, 255, 255, 255, 236, 245, 255, 255, 198, 227, 255, 255, 173, 214, 255, 255, 153, 204, 255, 255, 141, 196, 251, 255, 129, 188, 247, 255, 118, 180, 243, 255, 106, 173, 239, 255, 94, 165, 235, 255, 82, 157, 231, 255, 71, 149, 228, 255, 59, 141, 224, 255, 50, 135, 221, 255, 38, 128, 217, 255, 41, 117, 192, 255, 59, 107, 156, 255, 86, 105, 124, 255, 106, 106, 106, 255, 96, 96, 96, 255, 80, 80, 80, 255, 102, 102, 140, 255, 64, 64, 77, 255, 0, 0, 0, 170, 0, 0, 0, 45, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 64, 71, 71, 71, 146, 120, 120, 120, 209, 163, 163, 163, 255, 204, 204, 204, 255, 208, 208, 208, 255, 171, 174, 177, 255, 156, 170, 180, 255, 154, 172, 183, 255, 190, 210, 223, 255, 224, 236, 246, 255, 255, 255, 255, 255, 242, 247, 251, 255, 213, 231, 243, 255, 186, 217, 235, 255, 153, 204, 255, 255, 179, 217, 255, 255, 211, 233, 255, 255, 236, 245, 255, 255, 255, 255, 255, 255, 236, 245, 255, 255, 198, 227, 255, 255, 173, 214, 255, 255, 153, 204, 255, 255, 141, 196, 251, 255, 129, 188, 247, 255, 118, 180, 243, 255, 106, 173, 239, 255, 94, 165, 235, 255, 82, 157, 231, 255, 71, 149, 228, 255, 59, 141, 224, 255, 50, 135, 221, 255, 38, 128, 217, 255, 27, 120, 213, 255, 22, 113, 204, 255, 60, 110, 160, 255, 105, 112, 118, 255, 110, 110, 110, 255, 106, 106, 106, 255, 121, 121, 159, 255, 77, 77, 96, 255, 0, 0, 0, 167, 0, 0, 0, 27, + 51, 51, 51, 16, 51, 51, 51, 113, 103, 103, 103, 178, 149, 149, 149, 255, 196, 196, 196, 255, 240, 240, 240, 255, 211, 211, 211, 255, 168, 178, 187, 255, 140, 162, 185, 255, 140, 179, 217, 255, 153, 204, 255, 255, 160, 206, 243, 255, 181, 215, 234, 255, 202, 225, 240, 255, 224, 236, 246, 255, 255, 255, 255, 255, 242, 247, 251, 255, 213, 231, 243, 255, 186, 217, 235, 255, 153, 204, 255, 255, 179, 217, 255, 255, 211, 233, 255, 255, 236, 245, 255, 255, 255, 255, 255, 255, 236, 245, 255, 255, 198, 227, 255, 255, 173, 214, 255, 255, 153, 204, 255, 255, 141, 196, 251, 255, 129, 188, 247, 255, 118, 180, 243, 255, 106, 173, 239, 255, 94, 165, 235, 255, 82, 157, 231, 255, 71, 149, 228, 255, 59, 141, 224, 255, 50, 135, 221, 255, 62, 129, 196, 255, 89, 124, 159, 255, 123, 123, 123, 255, 120, 120, 120, 255, 118, 118, 124, 255, 133, 133, 179, 255, 148, 148, 232, 255, 153, 153, 255, 255, 74, 74, 100, 251, 0, 0, 0, 166, 0, 0, 0, 24, + 50, 50, 50, 65, 185, 185, 185, 255, 247, 247, 247, 255, 250, 250, 250, 255, 246, 246, 246, 255, 244, 244, 244, 255, 240, 240, 240, 255, 207, 220, 233, 255, 184, 216, 248, 255, 158, 206, 254, 255, 153, 204, 255, 255, 160, 206, 243, 255, 181, 215, 234, 255, 202, 225, 240, 255, 224, 236, 246, 255, 255, 255, 255, 255, 242, 247, 251, 255, 213, 231, 243, 255, 186, 217, 235, 255, 153, 204, 255, 255, 179, 217, 255, 255, 211, 233, 255, 255, 236, 245, 255, 255, 255, 255, 255, 255, 236, 245, 255, 255, 198, 227, 255, 255, 173, 214, 255, 255, 153, 204, 255, 255, 141, 196, 251, 255, 129, 188, 247, 255, 118, 180, 243, 255, 106, 173, 239, 255, 94, 165, 235, 255, 82, 157, 231, 255, 76, 149, 223, 255, 95, 141, 188, 255, 126, 136, 147, 255, 134, 134, 134, 255, 130, 130, 130, 255, 130, 130, 140, 255, 141, 141, 193, 255, 153, 153, 241, 255, 153, 153, 246, 255, 153, 153, 250, 255, 153, 153, 255, 255, 68, 68, 95, 239, 0, 0, 0, 155, 0, 0, 0, 22, + 48, 48, 48, 68, 167, 167, 167, 255, 206, 206, 206, 255, 215, 215, 215, 255, 234, 234, 234, 255, 243, 243, 243, 255, 244, 244, 244, 255, 240, 240, 240, 255, 236, 236, 236, 255, 233, 233, 233, 255, 206, 222, 238, 255, 181, 212, 237, 255, 181, 215, 234, 255, 202, 225, 240, 255, 224, 236, 246, 255, 255, 255, 255, 255, 242, 247, 251, 255, 213, 231, 243, 255, 186, 217, 235, 255, 153, 204, 255, 255, 179, 217, 255, 255, 211, 233, 255, 255, 236, 245, 255, 255, 255, 255, 255, 255, 236, 245, 255, 255, 198, 227, 255, 255, 173, 214, 255, 255, 153, 204, 255, 255, 141, 196, 251, 255, 129, 188, 247, 255, 118, 180, 243, 255, 106, 173, 239, 255, 106, 159, 212, 255, 125, 153, 181, 255, 147, 147, 147, 255, 144, 144, 144, 255, 140, 140, 140, 255, 140, 140, 158, 255, 148, 148, 204, 255, 153, 153, 232, 255, 153, 153, 236, 255, 153, 153, 241, 255, 153, 153, 246, 255, 153, 153, 250, 255, 153, 153, 255, 255, 62, 62, 82, 237, 0, 0, 0, 136, 0, 0, 0, 18, + 48, 48, 48, 68, 141, 141, 141, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 213, 213, 213, 255, 224, 224, 224, 255, 236, 236, 236, 255, 240, 240, 240, 255, 236, 236, 236, 255, 233, 233, 233, 255, 229, 229, 229, 255, 224, 225, 227, 255, 216, 224, 230, 255, 224, 232, 238, 255, 255, 255, 255, 255, 242, 247, 251, 255, 213, 231, 243, 255, 186, 217, 235, 255, 153, 204, 255, 255, 179, 217, 255, 255, 211, 233, 255, 255, 236, 245, 255, 255, 255, 255, 255, 255, 236, 245, 255, 255, 198, 227, 255, 255, 173, 214, 255, 255, 153, 204, 255, 255, 141, 196, 251, 255, 132, 187, 242, 255, 135, 169, 205, 255, 150, 158, 166, 255, 158, 158, 158, 255, 154, 154, 154, 255, 151, 151, 154, 255, 149, 149, 171, 255, 152, 152, 209, 255, 153, 153, 223, 255, 153, 153, 227, 255, 153, 153, 232, 255, 153, 153, 236, 255, 153, 153, 241, 255, 153, 153, 246, 255, 128, 128, 200, 255, 74, 74, 100, 251, 27, 27, 27, 215, 0, 0, 0, 124, 0, 0, 0, 18, + 37, 37, 37, 22, 133, 133, 133, 255, 215, 215, 215, 255, 215, 215, 215, 255, 215, 215, 215, 255, 215, 215, 215, 255, 215, 215, 215, 255, 215, 215, 215, 255, 219, 219, 219, 255, 228, 228, 228, 255, 234, 234, 234, 255, 233, 233, 233, 255, 229, 229, 229, 255, 226, 226, 226, 255, 223, 223, 223, 255, 221, 221, 221, 255, 225, 227, 229, 255, 212, 225, 233, 255, 186, 217, 235, 255, 153, 204, 255, 255, 179, 217, 255, 255, 211, 233, 255, 255, 236, 245, 255, 255, 255, 255, 255, 255, 236, 245, 255, 255, 198, 227, 255, 255, 173, 214, 255, 255, 158, 199, 241, 255, 163, 183, 204, 255, 167, 167, 167, 255, 168, 168, 168, 255, 164, 164, 164, 255, 159, 159, 165, 255, 155, 155, 180, 255, 153, 153, 205, 255, 153, 153, 212, 255, 153, 153, 218, 255, 153, 153, 223, 255, 153, 153, 227, 255, 153, 153, 232, 255, 153, 153, 236, 255, 128, 128, 194, 255, 74, 74, 98, 251, 29, 29, 29, 223, 4, 4, 4, 183, 0, 0, 0, 149, 0, 0, 0, 82, 0, 0, 0, 10, + 0, 0, 0, 1, 135, 135, 135, 255, 219, 219, 219, 255, 219, 219, 219, 255, 219, 219, 219, 255, 219, 219, 219, 255, 219, 219, 219, 255, 219, 219, 219, 255, 219, 219, 219, 255, 219, 219, 219, 255, 219, 219, 219, 255, 224, 224, 224, 255, 228, 228, 228, 255, 229, 229, 229, 255, 226, 226, 226, 255, 223, 223, 223, 255, 219, 219, 219, 255, 216, 216, 216, 255, 211, 213, 214, 255, 189, 208, 227, 255, 186, 215, 243, 255, 211, 233, 255, 255, 236, 245, 255, 255, 255, 255, 255, 255, 234, 242, 251, 255, 195, 213, 230, 255, 183, 190, 197, 255, 182, 182, 182, 255, 179, 179, 179, 255, 175, 175, 175, 255, 167, 167, 174, 255, 158, 158, 184, 255, 153, 153, 198, 255, 153, 153, 203, 255, 153, 153, 208, 255, 153, 153, 212, 255, 153, 153, 218, 255, 153, 153, 223, 255, 153, 153, 227, 255, 128, 128, 187, 255, 77, 77, 97, 255, 35, 35, 35, 231, 4, 4, 4, 186, 0, 0, 0, 151, 0, 0, 0, 96, 0, 0, 0, 40, 0, 0, 0, 12, 0, 0, 0, 0, + 0, 0, 0, 0, 74, 74, 74, 226, 158, 158, 158, 255, 212, 212, 212, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 224, 224, 224, 255, 225, 225, 225, 255, 226, 226, 226, 255, 223, 223, 223, 255, 219, 219, 219, 255, 216, 216, 216, 255, 212, 212, 212, 255, 209, 209, 209, 255, 207, 209, 212, 255, 217, 221, 225, 255, 220, 220, 220, 255, 199, 199, 199, 255, 192, 192, 192, 255, 188, 188, 188, 255, 184, 184, 184, 255, 171, 171, 181, 255, 160, 160, 183, 255, 153, 153, 189, 255, 153, 153, 194, 255, 153, 153, 198, 255, 153, 153, 203, 255, 153, 153, 208, 255, 153, 153, 212, 255, 153, 153, 218, 255, 128, 128, 180, 255, 77, 77, 95, 255, 35, 35, 35, 231, 9, 9, 9, 191, 0, 0, 0, 161, 0, 0, 0, 109, 0, 0, 0, 43, 0, 0, 0, 13, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 21, 24, 24, 24, 170, 51, 51, 51, 229, 116, 116, 116, 255, 194, 194, 194, 255, 212, 212, 212, 255, 156, 156, 156, 255, 122, 122, 122, 255, 112, 112, 112, 255, 116, 116, 116, 255, 121, 121, 121, 255, 158, 158, 158, 255, 209, 209, 209, 255, 228, 228, 228, 255, 228, 228, 228, 255, 227, 227, 227, 255, 226, 226, 226, 255, 220, 220, 220, 255, 216, 216, 216, 255, 212, 212, 212, 255, 209, 209, 209, 255, 205, 205, 205, 255, 202, 202, 202, 255, 199, 199, 199, 255, 192, 192, 193, 255, 175, 175, 183, 255, 157, 157, 177, 255, 153, 153, 180, 255, 153, 153, 184, 255, 153, 153, 189, 255, 153, 153, 194, 255, 153, 153, 198, 255, 153, 153, 203, 255, 153, 153, 208, 255, 128, 128, 172, 255, 77, 77, 93, 255, 35, 35, 35, 231, 9, 9, 9, 191, 0, 0, 0, 161, 0, 0, 0, 110, 0, 0, 0, 51, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 70, 12, 12, 12, 138, 31, 31, 31, 209, 56, 56, 56, 245, 50, 50, 50, 247, 49, 49, 49, 251, 63, 63, 63, 255, 68, 68, 68, 255, 74, 74, 74, 255, 101, 101, 101, 255, 135, 135, 135, 255, 203, 203, 203, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 228, 228, 228, 255, 222, 222, 222, 255, 212, 212, 212, 255, 209, 209, 209, 255, 198, 198, 199, 255, 174, 174, 179, 255, 156, 156, 168, 255, 153, 153, 171, 255, 153, 153, 175, 255, 153, 153, 180, 255, 153, 153, 184, 255, 153, 153, 189, 255, 153, 153, 194, 255, 153, 153, 198, 255, 134, 134, 174, 255, 77, 77, 90, 255, 35, 35, 35, 231, 9, 9, 9, 191, 0, 0, 0, 161, 0, 0, 0, 110, 0, 0, 0, 51, 0, 0, 0, 18, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 19, 0, 0, 0, 48, 0, 0, 0, 96, 0, 0, 0, 140, 0, 0, 0, 151, 0, 0, 0, 158, 5, 5, 5, 172, 21, 21, 21, 196, 41, 41, 41, 235, 73, 73, 73, 255, 145, 145, 145, 255, 231, 231, 231, 255, 236, 236, 236, 255, 236, 236, 236, 255, 211, 211, 211, 255, 171, 178, 168, 255, 211, 211, 211, 255, 235, 235, 235, 255, 199, 199, 199, 255, 153, 153, 157, 255, 153, 153, 161, 255, 153, 153, 166, 255, 153, 153, 171, 255, 153, 153, 175, 255, 153, 153, 180, 255, 153, 153, 184, 255, 153, 153, 189, 255, 140, 140, 176, 255, 89, 89, 106, 255, 35, 35, 35, 231, 9, 9, 9, 191, 0, 0, 0, 161, 0, 0, 0, 110, 0, 0, 0, 51, 0, 0, 0, 18, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 12, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 25, 0, 0, 0, 37, 0, 0, 0, 73, 28, 28, 28, 175, 70, 70, 70, 255, 202, 202, 202, 255, 241, 241, 241, 255, 241, 241, 241, 255, 158, 184, 145, 255, 153, 255, 102, 255, 138, 177, 119, 255, 241, 241, 241, 255, 197, 197, 197, 255, 153, 153, 157, 255, 153, 153, 161, 255, 153, 153, 166, 255, 153, 153, 171, 255, 153, 153, 175, 255, 153, 153, 180, 255, 140, 140, 167, 255, 89, 89, 103, 255, 35, 35, 35, 231, 9, 9, 9, 191, 0, 0, 0, 161, 0, 0, 0, 110, 0, 0, 0, 51, 0, 0, 0, 18, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 27, 41, 41, 41, 180, 143, 143, 143, 255, 246, 246, 246, 255, 246, 246, 246, 255, 181, 193, 174, 255, 140, 217, 102, 255, 136, 168, 120, 255, 246, 246, 246, 255, 199, 199, 199, 255, 153, 153, 157, 255, 153, 153, 161, 255, 153, 153, 166, 255, 153, 153, 171, 255, 140, 140, 159, 255, 89, 89, 99, 255, 35, 35, 35, 231, 9, 9, 9, 191, 0, 0, 0, 161, 0, 0, 0, 110, 0, 0, 0, 51, 0, 0, 0, 18, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22, 22, 37, 31, 31, 31, 160, 59, 59, 59, 244, 138, 138, 138, 255, 213, 213, 213, 255, 214, 214, 214, 255, 232, 232, 232, 255, 250, 250, 250, 255, 202, 202, 202, 255, 153, 153, 157, 255, 153, 153, 161, 255, 140, 140, 151, 255, 89, 89, 96, 255, 35, 35, 35, 231, 9, 9, 9, 191, 0, 0, 0, 161, 0, 0, 0, 110, 0, 0, 0, 51, 0, 0, 0, 18, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 82, 19, 19, 19, 169, 36, 36, 36, 223, 89, 89, 89, 255, 178, 178, 178, 255, 241, 241, 241, 255, 204, 204, 204, 255, 140, 140, 143, 255, 89, 89, 92, 255, 38, 38, 38, 235, 8, 8, 8, 193, 0, 0, 0, 161, 0, 0, 0, 110, 0, 0, 0, 51, 0, 0, 0, 18, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 27, 0, 0, 0, 63, 7, 7, 7, 122, 28, 28, 28, 202, 60, 60, 60, 245, 89, 89, 89, 255, 41, 41, 41, 239, 16, 16, 16, 203, 0, 0, 0, 166, 0, 0, 0, 116, 0, 0, 0, 52, 0, 0, 0, 18, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 16, 0, 0, 0, 40, 0, 0, 0, 88, 10, 10, 10, 156, 0, 0, 0, 161, 0, 0, 0, 125, 0, 0, 0, 66, 0, 0, 0, 22, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0, 24, 0, 0, 0, 36, 0, 0, 0, 21, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DevicePDA(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 16, 50, 50, 50, 65, 50, 50, 50, 115, 49, 49, 49, 133, 49, 49, 49, 134, 49, 49, 49, 164, 50, 50, 50, 195, 50, 50, 50, 196, 50, 50, 50, 196, 116, 93, 60, 196, 116, 92, 59, 196, 116, 90, 57, 196, 116, 89, 55, 196, 83, 69, 53, 196, 49, 49, 49, 181, 48, 48, 48, 136, 49, 49, 49, 134, 45, 45, 45, 73, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 48, 50, 50, 50, 130, 50, 50, 50, 179, 65, 63, 56, 240, 102, 96, 71, 255, 153, 138, 87, 255, 179, 157, 93, 255, 204, 175, 99, 255, 230, 191, 102, 255, 255, 207, 105, 255, 255, 202, 100, 255, 204, 160, 84, 255, 204, 156, 80, 255, 179, 136, 72, 255, 153, 117, 66, 255, 178, 124, 62, 255, 166, 137, 67, 255, 153, 146, 69, 255, 128, 130, 66, 255, 128, 128, 65, 255, 164, 103, 49, 255, 89, 68, 50, 255, 30, 30, 30, 109, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 64, 50, 50, 50, 177, 105, 105, 78, 240, 140, 138, 94, 255, 191, 185, 115, 255, 230, 217, 128, 255, 255, 236, 134, 255, 230, 209, 120, 255, 204, 182, 105, 255, 153, 136, 85, 255, 164, 126, 72, 255, 151, 108, 62, 255, 161, 96, 48, 255, 161, 91, 44, 255, 198, 106, 43, 255, 223, 117, 42, 255, 248, 128, 41, 255, 248, 130, 42, 255, 150, 91, 47, 255, 102, 153, 77, 255, 153, 255, 102, 255, 153, 255, 102, 255, 102, 153, 77, 255, 202, 119, 47, 255, 202, 119, 47, 255, 32, 32, 32, 205, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 131, 128, 108, 70, 255, 179, 159, 96, 255, 153, 139, 88, 255, 162, 118, 69, 255, 198, 128, 64, 255, 171, 89, 40, 255, 196, 98, 39, 255, 220, 107, 37, 255, 244, 116, 36, 255, 245, 118, 37, 255, 245, 120, 38, 255, 246, 122, 39, 255, 247, 124, 40, 255, 247, 126, 40, 255, 248, 128, 41, 255, 248, 130, 42, 255, 248, 131, 42, 255, 150, 92, 47, 255, 70, 89, 61, 255, 77, 102, 64, 255, 114, 119, 63, 255, 114, 99, 56, 255, 215, 126, 48, 255, 202, 121, 49, 255, 30, 30, 30, 217, 0, 0, 0, 90, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 204, 165, 89, 255, 255, 204, 102, 255, 255, 204, 102, 255, 195, 95, 38, 255, 243, 111, 34, 255, 244, 113, 35, 255, 244, 115, 35, 255, 244, 116, 36, 255, 245, 118, 37, 255, 245, 120, 38, 255, 246, 122, 39, 255, 247, 124, 40, 255, 247, 126, 40, 255, 248, 128, 41, 255, 248, 130, 42, 255, 248, 131, 42, 255, 249, 133, 43, 255, 225, 125, 45, 255, 250, 137, 44, 255, 251, 139, 45, 255, 252, 141, 46, 255, 252, 143, 47, 255, 253, 145, 48, 255, 203, 123, 49, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 204, 164, 87, 255, 255, 201, 100, 255, 255, 201, 100, 255, 195, 96, 38, 255, 244, 113, 35, 255, 244, 115, 35, 255, 244, 116, 36, 255, 233, 114, 41, 255, 197, 103, 54, 255, 173, 95, 63, 255, 149, 87, 71, 255, 125, 79, 79, 255, 100, 70, 87, 255, 211, 115, 53, 255, 248, 131, 42, 255, 249, 133, 43, 255, 250, 135, 44, 255, 250, 137, 44, 255, 239, 134, 45, 255, 202, 119, 47, 255, 164, 102, 48, 255, 139, 92, 50, 255, 177, 111, 50, 255, 203, 124, 50, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 203, 162, 86, 255, 254, 199, 98, 255, 254, 199, 98, 255, 196, 98, 39, 255, 244, 115, 35, 255, 135, 79, 73, 255, 51, 51, 102, 255, 51, 51, 102, 255, 51, 51, 102, 255, 51, 51, 102, 255, 88, 65, 91, 255, 100, 70, 87, 255, 137, 86, 73, 255, 174, 101, 52, 255, 162, 97, 47, 255, 138, 88, 48, 255, 101, 72, 49, 255, 64, 57, 51, 255, 55, 57, 54, 255, 66, 78, 65, 255, 78, 99, 77, 255, 68, 79, 67, 255, 152, 100, 50, 255, 203, 125, 50, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 203, 160, 85, 255, 254, 196, 97, 255, 254, 196, 97, 255, 196, 99, 39, 255, 244, 116, 36, 255, 172, 93, 61, 255, 136, 82, 71, 255, 149, 87, 58, 255, 124, 79, 56, 255, 137, 83, 46, 255, 100, 70, 49, 255, 63, 56, 50, 255, 51, 51, 51, 255, 74, 86, 74, 255, 83, 101, 83, 255, 111, 134, 110, 255, 126, 157, 124, 255, 104, 148, 102, 255, 110, 156, 107, 255, 113, 159, 110, 255, 117, 163, 114, 255, 85, 108, 83, 255, 153, 101, 51, 255, 204, 127, 51, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 203, 158, 84, 255, 254, 194, 95, 255, 254, 194, 95, 255, 196, 100, 40, 255, 245, 118, 37, 255, 100, 68, 48, 255, 51, 51, 51, 255, 88, 101, 88, 255, 102, 121, 102, 255, 119, 141, 119, 255, 160, 187, 159, 255, 186, 211, 186, 255, 206, 236, 206, 255, 209, 238, 208, 255, 229, 255, 229, 255, 223, 255, 223, 255, 219, 255, 219, 255, 110, 156, 107, 255, 113, 159, 110, 255, 117, 163, 114, 255, 120, 166, 117, 255, 87, 110, 86, 255, 153, 102, 51, 255, 204, 128, 51, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 203, 157, 83, 255, 253, 192, 93, 255, 253, 192, 93, 255, 196, 102, 40, 255, 245, 120, 38, 255, 100, 69, 48, 255, 220, 255, 220, 255, 240, 253, 240, 255, 246, 254, 246, 255, 246, 255, 246, 255, 242, 255, 242, 255, 237, 255, 237, 255, 234, 255, 234, 255, 230, 255, 230, 255, 224, 255, 224, 255, 220, 255, 220, 255, 217, 255, 217, 255, 113, 159, 110, 255, 117, 163, 114, 255, 120, 166, 117, 255, 123, 170, 121, 255, 89, 112, 88, 255, 153, 102, 51, 255, 204, 128, 52, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 203, 155, 81, 255, 253, 189, 91, 255, 253, 189, 91, 255, 197, 103, 41, 255, 246, 122, 39, 255, 100, 69, 48, 255, 224, 250, 224, 255, 250, 255, 250, 255, 246, 255, 246, 255, 242, 255, 242, 255, 237, 255, 237, 255, 234, 255, 234, 255, 230, 255, 230, 255, 224, 255, 224, 255, 221, 255, 221, 255, 217, 255, 217, 255, 211, 255, 211, 255, 117, 163, 114, 255, 120, 167, 118, 255, 123, 170, 121, 255, 127, 174, 125, 255, 90, 113, 89, 255, 153, 103, 52, 255, 204, 129, 53, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 203, 153, 80, 255, 253, 187, 90, 255, 253, 187, 90, 255, 197, 104, 42, 255, 247, 124, 40, 255, 100, 70, 48, 255, 218, 245, 217, 255, 246, 255, 246, 255, 242, 255, 242, 255, 237, 255, 237, 255, 234, 255, 234, 255, 230, 255, 230, 255, 224, 255, 224, 255, 221, 255, 221, 255, 217, 255, 217, 255, 211, 255, 211, 255, 197, 244, 197, 255, 121, 167, 118, 255, 123, 170, 121, 255, 127, 174, 125, 255, 130, 177, 128, 255, 92, 115, 91, 255, 153, 104, 53, 255, 204, 131, 55, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 202, 151, 79, 255, 252, 184, 88, 255, 252, 184, 88, 255, 198, 106, 43, 255, 247, 126, 40, 255, 100, 70, 49, 255, 208, 238, 208, 255, 242, 255, 242, 255, 237, 255, 237, 255, 234, 255, 234, 255, 230, 255, 230, 255, 224, 255, 224, 255, 221, 255, 221, 255, 217, 255, 217, 255, 211, 255, 211, 255, 208, 255, 208, 255, 178, 228, 178, 255, 123, 170, 121, 255, 127, 174, 125, 255, 130, 177, 128, 255, 133, 180, 131, 255, 94, 117, 93, 255, 153, 105, 54, 255, 204, 132, 56, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 202, 149, 77, 255, 252, 182, 86, 255, 252, 182, 86, 255, 198, 108, 43, 255, 248, 128, 41, 255, 100, 71, 49, 255, 202, 233, 202, 255, 237, 255, 237, 255, 234, 255, 234, 255, 230, 255, 230, 255, 224, 255, 224, 255, 221, 255, 221, 255, 217, 255, 217, 255, 211, 255, 211, 255, 208, 255, 208, 255, 204, 255, 204, 255, 154, 202, 152, 255, 127, 174, 125, 255, 130, 177, 128, 255, 133, 180, 131, 255, 137, 184, 135, 255, 95, 118, 94, 255, 153, 105, 54, 255, 204, 133, 56, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 202, 147, 76, 255, 252, 179, 84, 255, 252, 179, 84, 255, 199, 109, 44, 255, 248, 130, 42, 255, 100, 71, 49, 255, 193, 227, 193, 255, 235, 255, 235, 255, 230, 255, 230, 255, 226, 255, 226, 255, 222, 255, 222, 255, 217, 255, 217, 255, 212, 255, 212, 255, 209, 255, 209, 255, 204, 255, 204, 255, 203, 254, 203, 255, 131, 179, 130, 255, 130, 177, 128, 255, 133, 180, 131, 255, 137, 184, 135, 255, 140, 187, 138, 255, 97, 120, 96, 255, 153, 106, 55, 255, 204, 135, 58, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 201, 146, 75, 255, 251, 177, 83, 255, 251, 177, 83, 255, 199, 110, 44, 255, 249, 132, 43, 255, 101, 72, 49, 255, 187, 222, 186, 255, 230, 255, 230, 255, 226, 255, 226, 255, 222, 255, 222, 255, 217, 255, 217, 255, 213, 255, 213, 255, 209, 255, 209, 255, 204, 255, 204, 255, 203, 254, 203, 255, 172, 221, 172, 255, 130, 177, 128, 255, 133, 180, 131, 255, 137, 184, 135, 255, 140, 187, 138, 255, 144, 191, 142, 255, 99, 123, 98, 255, 153, 107, 56, 255, 204, 136, 59, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 201, 143, 74, 255, 251, 174, 81, 255, 251, 174, 81, 255, 199, 112, 45, 255, 249, 134, 43, 255, 101, 72, 49, 255, 178, 214, 177, 255, 226, 255, 226, 255, 222, 255, 222, 255, 217, 255, 217, 255, 213, 255, 213, 255, 209, 255, 209, 255, 204, 255, 204, 255, 203, 254, 203, 255, 198, 248, 199, 255, 139, 186, 137, 255, 133, 180, 131, 255, 137, 184, 135, 255, 141, 188, 139, 255, 144, 191, 142, 255, 146, 194, 145, 255, 100, 124, 100, 255, 153, 108, 57, 255, 204, 137, 61, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 201, 142, 72, 255, 251, 172, 79, 255, 251, 172, 79, 255, 200, 113, 45, 255, 250, 136, 44, 255, 101, 72, 49, 255, 171, 210, 170, 255, 222, 255, 222, 255, 217, 255, 217, 255, 213, 255, 213, 255, 209, 255, 209, 255, 204, 255, 204, 255, 203, 254, 203, 255, 198, 248, 199, 255, 164, 213, 164, 255, 133, 180, 131, 255, 137, 184, 135, 255, 141, 188, 139, 255, 144, 191, 142, 255, 146, 194, 145, 255, 150, 198, 149, 255, 101, 125, 101, 255, 153, 109, 58, 255, 204, 139, 62, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 200, 141, 71, 255, 250, 171, 78, 255, 250, 171, 78, 255, 200, 115, 46, 255, 251, 138, 45, 255, 101, 73, 50, 255, 164, 205, 163, 255, 217, 255, 217, 255, 213, 255, 213, 255, 209, 255, 209, 255, 204, 255, 204, 255, 203, 254, 203, 255, 198, 248, 199, 255, 187, 236, 188, 255, 138, 185, 136, 255, 137, 184, 135, 255, 141, 188, 139, 255, 144, 191, 142, 255, 146, 194, 145, 255, 150, 198, 149, 255, 153, 201, 152, 255, 104, 128, 103, 255, 153, 110, 59, 255, 204, 140, 63, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 200, 139, 69, 255, 250, 168, 76, 255, 250, 168, 76, 255, 201, 116, 46, 255, 251, 140, 45, 255, 101, 74, 50, 255, 163, 205, 162, 255, 214, 255, 214, 255, 210, 255, 210, 255, 204, 255, 204, 255, 204, 255, 204, 255, 199, 249, 200, 255, 194, 244, 197, 255, 156, 204, 156, 255, 137, 184, 135, 255, 141, 188, 139, 255, 144, 191, 142, 255, 146, 194, 145, 255, 150, 198, 149, 255, 153, 201, 152, 255, 156, 204, 155, 255, 105, 129, 104, 255, 153, 111, 60, 255, 204, 141, 64, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 200, 137, 68, 255, 250, 166, 74, 255, 250, 166, 74, 255, 201, 118, 47, 255, 252, 142, 46, 255, 101, 74, 50, 255, 163, 207, 161, 255, 210, 255, 210, 255, 205, 255, 205, 255, 204, 255, 204, 255, 199, 249, 200, 255, 195, 244, 197, 255, 188, 236, 191, 255, 141, 188, 139, 255, 141, 188, 139, 255, 144, 191, 142, 255, 146, 194, 145, 255, 150, 198, 149, 255, 153, 201, 152, 255, 156, 204, 155, 255, 160, 209, 158, 255, 107, 131, 106, 255, 153, 111, 60, 255, 204, 142, 65, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 200, 135, 67, 255, 249, 163, 73, 255, 249, 163, 73, 255, 202, 119, 47, 255, 253, 144, 47, 255, 102, 75, 50, 255, 163, 209, 162, 255, 205, 255, 205, 255, 204, 255, 204, 255, 199, 249, 200, 255, 196, 245, 198, 255, 191, 240, 194, 255, 168, 215, 170, 255, 141, 188, 139, 255, 144, 191, 142, 255, 146, 194, 145, 255, 150, 198, 149, 255, 153, 201, 152, 255, 157, 205, 156, 255, 160, 209, 158, 255, 164, 213, 162, 255, 109, 133, 108, 255, 153, 112, 61, 255, 204, 143, 67, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 200, 133, 66, 255, 249, 161, 71, 255, 249, 161, 71, 255, 202, 121, 48, 255, 253, 145, 48, 255, 102, 75, 50, 255, 162, 210, 160, 255, 204, 255, 204, 255, 199, 249, 200, 255, 196, 245, 198, 255, 192, 241, 195, 255, 187, 234, 191, 255, 152, 199, 152, 255, 144, 191, 142, 255, 146, 194, 145, 255, 150, 198, 149, 255, 153, 201, 152, 255, 157, 205, 156, 255, 161, 210, 159, 255, 164, 213, 162, 255, 167, 216, 165, 255, 110, 135, 110, 255, 153, 113, 62, 255, 204, 144, 68, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 200, 131, 64, 255, 249, 158, 69, 255, 249, 158, 69, 255, 203, 122, 49, 255, 253, 147, 49, 255, 102, 75, 51, 255, 163, 212, 162, 255, 199, 249, 200, 255, 196, 245, 198, 255, 192, 241, 195, 255, 187, 235, 191, 255, 180, 227, 184, 255, 144, 191, 142, 255, 146, 194, 145, 255, 150, 198, 149, 255, 153, 201, 152, 255, 157, 205, 156, 255, 161, 210, 159, 255, 164, 213, 162, 255, 167, 216, 165, 255, 170, 220, 169, 255, 111, 136, 111, 255, 153, 114, 63, 255, 204, 146, 69, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 63, 58, 52, 255, 101, 78, 55, 255, 248, 156, 67, 255, 203, 123, 50, 255, 254, 149, 50, 255, 102, 76, 51, 255, 163, 211, 162, 255, 196, 245, 198, 255, 192, 241, 195, 255, 187, 235, 191, 255, 184, 230, 188, 255, 169, 216, 172, 255, 146, 194, 145, 255, 150, 198, 149, 255, 154, 202, 153, 255, 157, 205, 156, 255, 157, 206, 155, 255, 150, 198, 147, 255, 137, 185, 135, 255, 127, 174, 125, 255, 133, 180, 130, 255, 113, 138, 113, 255, 153, 114, 63, 255, 204, 147, 71, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 174, 114, 60, 255, 199, 127, 62, 255, 248, 153, 66, 255, 203, 125, 50, 255, 254, 151, 50, 255, 102, 76, 51, 255, 163, 211, 163, 255, 192, 241, 195, 255, 187, 235, 191, 255, 184, 230, 188, 255, 180, 226, 185, 255, 160, 206, 162, 255, 139, 187, 138, 255, 133, 180, 131, 255, 126, 173, 124, 255, 114, 161, 112, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 125, 172, 123, 255, 115, 140, 115, 255, 153, 116, 65, 255, 204, 148, 72, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 51, 51, 51, 255, 51, 51, 51, 255, 248, 151, 64, 255, 203, 126, 50, 255, 255, 153, 51, 255, 102, 77, 51, 255, 162, 210, 163, 255, 187, 235, 191, 255, 184, 230, 188, 255, 180, 226, 185, 255, 175, 220, 182, 255, 120, 166, 119, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 126, 173, 124, 255, 117, 142, 117, 255, 153, 116, 65, 255, 204, 149, 73, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 174, 112, 58, 255, 248, 149, 62, 255, 248, 149, 62, 255, 204, 128, 51, 255, 255, 153, 51, 255, 102, 77, 51, 255, 162, 209, 163, 255, 184, 230, 188, 255, 180, 226, 185, 255, 175, 220, 182, 255, 172, 216, 179, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 112, 158, 109, 255, 119, 165, 116, 255, 140, 188, 139, 255, 118, 143, 118, 255, 153, 117, 66, 255, 204, 151, 75, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 63, 57, 52, 255, 63, 57, 52, 255, 247, 146, 61, 255, 204, 128, 51, 255, 255, 155, 53, 255, 102, 77, 52, 255, 161, 208, 163, 255, 180, 226, 185, 255, 175, 220, 182, 255, 172, 216, 179, 255, 153, 198, 158, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 108, 154, 105, 255, 110, 157, 108, 255, 118, 164, 115, 255, 125, 172, 123, 255, 129, 177, 128, 255, 135, 183, 134, 255, 153, 201, 152, 255, 121, 146, 120, 255, 153, 118, 67, 255, 204, 152, 76, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 174, 109, 56, 255, 223, 132, 58, 255, 247, 144, 59, 255, 204, 129, 52, 255, 255, 156, 54, 255, 102, 78, 52, 255, 161, 208, 163, 255, 175, 220, 182, 255, 172, 216, 179, 255, 168, 212, 176, 255, 140, 184, 143, 255, 108, 154, 105, 255, 109, 155, 106, 255, 116, 163, 114, 255, 123, 170, 121, 255, 128, 175, 126, 255, 134, 182, 133, 255, 140, 188, 139, 255, 146, 194, 145, 255, 154, 202, 152, 255, 167, 216, 166, 255, 122, 147, 122, 255, 153, 119, 68, 255, 204, 153, 77, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 51, 51, 51, 255, 76, 62, 52, 255, 222, 130, 56, 255, 204, 130, 54, 255, 255, 158, 56, 255, 102, 78, 53, 255, 160, 207, 163, 255, 172, 216, 179, 255, 168, 212, 176, 255, 163, 206, 172, 255, 139, 184, 143, 255, 121, 168, 119, 255, 127, 174, 125, 255, 133, 180, 131, 255, 139, 187, 138, 255, 146, 194, 145, 255, 152, 201, 151, 255, 159, 207, 157, 255, 165, 214, 163, 255, 170, 219, 168, 255, 180, 230, 179, 255, 123, 148, 123, 255, 153, 119, 68, 255, 204, 154, 78, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 197, 117, 54, 255, 197, 117, 54, 255, 246, 139, 55, 255, 204, 132, 55, 255, 255, 160, 58, 255, 102, 78, 53, 255, 160, 207, 164, 255, 168, 212, 176, 255, 163, 206, 172, 255, 160, 202, 169, 255, 138, 184, 139, 255, 139, 187, 138, 255, 145, 193, 144, 255, 150, 198, 149, 255, 157, 206, 156, 255, 164, 212, 162, 255, 168, 218, 167, 255, 176, 225, 174, 255, 183, 233, 182, 255, 187, 238, 187, 255, 194, 245, 194, 255, 125, 151, 125, 255, 153, 120, 69, 255, 204, 156, 79, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 63, 56, 51, 255, 100, 73, 52, 255, 246, 137, 53, 255, 204, 133, 56, 255, 255, 162, 60, 255, 102, 79, 54, 255, 160, 206, 164, 255, 163, 206, 172, 255, 160, 202, 169, 255, 156, 197, 166, 255, 150, 197, 151, 255, 155, 203, 153, 255, 162, 211, 160, 255, 167, 216, 165, 255, 174, 224, 173, 255, 181, 231, 180, 255, 186, 236, 185, 255, 192, 243, 192, 255, 198, 249, 198, 255, 204, 255, 204, 255, 203, 254, 203, 255, 127, 153, 127, 255, 153, 121, 70, 255, 204, 157, 80, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 185, 108, 51, 255, 209, 118, 51, 255, 246, 134, 52, 255, 204, 134, 58, 255, 255, 163, 61, 255, 102, 79, 54, 255, 159, 205, 163, 255, 160, 202, 169, 255, 156, 197, 166, 255, 151, 191, 163, 255, 167, 216, 165, 255, 173, 223, 172, 255, 179, 229, 178, 255, 185, 235, 184, 255, 191, 241, 190, 255, 195, 246, 195, 255, 200, 251, 200, 255, 198, 249, 198, 255, 162, 200, 162, 255, 125, 151, 125, 255, 89, 102, 89, 255, 77, 69, 56, 255, 179, 140, 76, 255, 204, 158, 82, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 197, 111, 50, 255, 245, 132, 50, 255, 245, 132, 50, 255, 204, 135, 59, 255, 255, 165, 63, 255, 102, 80, 54, 255, 159, 205, 163, 255, 156, 197, 166, 255, 151, 191, 163, 255, 148, 187, 160, 255, 184, 234, 183, 255, 184, 234, 183, 255, 187, 237, 186, 255, 191, 241, 190, 255, 155, 192, 154, 255, 121, 146, 120, 255, 86, 99, 86, 255, 89, 77, 57, 255, 128, 102, 64, 255, 179, 137, 74, 255, 230, 174, 84, 255, 255, 192, 90, 255, 255, 194, 92, 255, 204, 159, 83, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 197, 110, 49, 255, 245, 129, 48, 255, 245, 129, 48, 255, 204, 137, 60, 255, 255, 167, 65, 255, 102, 80, 55, 255, 160, 205, 164, 255, 151, 191, 163, 255, 154, 197, 163, 255, 160, 204, 166, 255, 146, 183, 145, 255, 116, 141, 115, 255, 84, 96, 84, 255, 89, 76, 56, 255, 140, 109, 64, 255, 191, 143, 73, 255, 242, 178, 82, 255, 255, 187, 85, 255, 255, 189, 87, 255, 255, 191, 89, 255, 249, 163, 86, 255, 245, 145, 89, 255, 245, 131, 50, 255, 203, 158, 82, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 196, 108, 48, 255, 245, 127, 47, 255, 245, 127, 47, 255, 204, 138, 62, 255, 255, 168, 66, 255, 102, 81, 55, 255, 136, 172, 136, 255, 111, 136, 110, 255, 81, 94, 81, 255, 102, 83, 57, 255, 153, 115, 64, 255, 204, 148, 71, 255, 242, 173, 78, 255, 250, 157, 64, 255, 251, 172, 78, 255, 255, 186, 84, 255, 253, 172, 75, 255, 246, 146, 81, 255, 244, 125, 52, 255, 236, 147, 71, 255, 190, 182, 177, 255, 191, 191, 191, 255, 221, 171, 118, 255, 202, 158, 85, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 196, 106, 46, 255, 244, 125, 45, 255, 244, 125, 45, 255, 204, 139, 63, 255, 255, 170, 68, 255, 140, 104, 59, 255, 153, 112, 61, 255, 204, 144, 68, 255, 255, 176, 74, 255, 255, 178, 76, 255, 255, 180, 78, 255, 255, 181, 79, 255, 228, 179, 125, 255, 177, 177, 177, 255, 162, 158, 153, 255, 239, 203, 115, 255, 216, 168, 131, 255, 204, 204, 204, 255, 206, 193, 183, 255, 217, 159, 88, 255, 77, 77, 77, 255, 77, 77, 77, 255, 212, 196, 123, 255, 204, 166, 90, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 196, 104, 45, 255, 244, 122, 44, 255, 244, 122, 44, 255, 204, 140, 64, 255, 255, 171, 69, 255, 255, 173, 71, 255, 255, 175, 73, 255, 255, 176, 74, 255, 253, 169, 70, 255, 249, 144, 55, 255, 250, 154, 62, 255, 255, 183, 81, 255, 165, 157, 152, 255, 83, 83, 83, 255, 145, 124, 93, 255, 236, 191, 101, 255, 132, 107, 79, 255, 77, 77, 77, 255, 124, 120, 95, 255, 254, 216, 116, 255, 217, 182, 100, 255, 230, 202, 112, 255, 255, 212, 110, 255, 204, 165, 88, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 196, 102, 44, 255, 244, 120, 42, 255, 244, 120, 42, 255, 204, 141, 65, 255, 254, 168, 68, 255, 249, 146, 55, 255, 249, 142, 53, 255, 251, 156, 62, 255, 237, 173, 134, 255, 239, 206, 187, 255, 240, 152, 87, 255, 252, 175, 79, 255, 231, 176, 93, 255, 192, 158, 107, 255, 166, 150, 124, 255, 229, 171, 96, 255, 242, 191, 96, 255, 204, 178, 101, 255, 242, 210, 114, 255, 255, 198, 96, 255, 255, 199, 97, 255, 255, 201, 99, 255, 255, 203, 101, 255, 204, 166, 89, 255, 30, 30, 30, 217, 0, 0, 0, 96, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 195, 101, 42, 255, 243, 117, 40, 255, 243, 117, 40, 255, 204, 142, 66, 255, 240, 151, 80, 255, 228, 211, 202, 255, 228, 182, 153, 255, 228, 146, 74, 255, 128, 128, 128, 255, 128, 128, 128, 255, 189, 164, 118, 255, 253, 194, 96, 255, 169, 165, 158, 255, 104, 104, 104, 255, 77, 77, 77, 255, 234, 209, 120, 255, 255, 194, 92, 255, 255, 196, 94, 255, 255, 198, 96, 255, 255, 199, 97, 255, 255, 201, 99, 255, 255, 203, 101, 255, 255, 204, 102, 255, 115, 99, 67, 255, 24, 24, 24, 208, 0, 0, 0, 93, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 195, 99, 41, 255, 243, 115, 38, 255, 243, 115, 38, 255, 204, 144, 68, 255, 164, 135, 107, 255, 128, 128, 128, 255, 137, 135, 129, 255, 251, 204, 110, 255, 115, 108, 76, 255, 115, 115, 83, 255, 242, 223, 128, 255, 255, 188, 86, 255, 222, 169, 94, 255, 190, 159, 111, 255, 204, 173, 97, 255, 255, 198, 96, 255, 255, 196, 94, 255, 255, 198, 96, 255, 255, 199, 97, 255, 255, 201, 99, 255, 255, 203, 101, 255, 242, 194, 99, 255, 102, 89, 64, 255, 23, 23, 23, 215, 0, 0, 0, 161, 0, 0, 0, 72, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 195, 97, 40, 255, 243, 112, 37, 255, 207, 101, 39, 255, 204, 145, 69, 255, 216, 164, 84, 255, 127, 125, 87, 255, 204, 195, 118, 255, 255, 197, 95, 255, 255, 185, 83, 255, 255, 187, 85, 255, 255, 188, 86, 255, 255, 189, 87, 255, 255, 191, 89, 255, 255, 193, 91, 255, 255, 194, 92, 255, 255, 196, 94, 255, 255, 198, 96, 255, 255, 199, 97, 255, 255, 201, 99, 255, 255, 203, 101, 255, 230, 185, 96, 255, 88, 78, 58, 251, 19, 19, 19, 210, 0, 0, 0, 160, 0, 0, 0, 84, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 119, 170, 88, 41, 255, 242, 110, 35, 255, 194, 95, 39, 255, 204, 147, 70, 255, 255, 180, 78, 255, 255, 182, 80, 255, 217, 158, 75, 255, 153, 118, 67, 255, 242, 178, 83, 255, 255, 188, 86, 255, 255, 189, 87, 255, 255, 191, 89, 255, 255, 193, 91, 255, 255, 194, 92, 255, 255, 196, 94, 255, 255, 198, 96, 255, 255, 199, 97, 255, 255, 201, 99, 255, 255, 203, 101, 255, 191, 156, 86, 255, 54, 51, 44, 239, 8, 8, 8, 193, 0, 0, 0, 148, 0, 0, 0, 76, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 39, 39, 39, 167, 97, 61, 42, 244, 158, 83, 41, 255, 204, 148, 71, 255, 255, 182, 80, 255, 255, 183, 81, 255, 89, 76, 57, 255, 51, 51, 51, 255, 128, 102, 64, 255, 255, 189, 87, 255, 255, 191, 89, 255, 255, 193, 91, 255, 255, 194, 92, 255, 255, 196, 94, 255, 255, 198, 96, 255, 255, 199, 97, 255, 255, 201, 99, 255, 230, 184, 94, 255, 113, 97, 65, 251, 26, 26, 26, 219, 0, 0, 0, 172, 0, 0, 0, 122, 0, 0, 0, 52, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 93, 26, 26, 26, 185, 99, 80, 54, 245, 153, 117, 66, 255, 204, 152, 75, 255, 51, 51, 51, 255, 51, 51, 51, 255, 102, 86, 60, 255, 255, 191, 89, 255, 255, 193, 91, 255, 255, 194, 92, 255, 255, 196, 94, 255, 255, 198, 96, 255, 255, 199, 97, 255, 191, 154, 84, 255, 127, 106, 68, 251, 29, 29, 29, 223, 4, 4, 4, 183, 0, 0, 0, 149, 0, 0, 0, 88, 0, 0, 0, 28, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 30, 0, 0, 0, 81, 11, 11, 11, 154, 21, 21, 21, 195, 30, 30, 30, 215, 39, 39, 39, 231, 55, 51, 44, 237, 96, 79, 52, 237, 96, 80, 53, 237, 96, 80, 53, 237, 96, 81, 53, 237, 96, 81, 53, 237, 30, 30, 30, 220, 20, 20, 20, 203, 0, 0, 0, 173, 0, 0, 0, 149, 0, 0, 0, 96, 0, 0, 0, 40, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 24, 0, 0, 0, 46, 0, 0, 0, 76, 0, 0, 0, 108, 0, 0, 0, 136, 0, 0, 0, 148, 0, 0, 0, 149, 0, 0, 0, 149, 0, 0, 0, 149, 0, 0, 0, 149, 0, 0, 0, 143, 0, 0, 0, 109, 0, 0, 0, 73, 0, 0, 0, 30, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DeviceVideo(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 48, 49, 49, 49, 67, 49, 49, 49, 100, 49, 49, 49, 132, 49, 49, 49, 134, 49, 49, 49, 148, 50, 50, 50, 194, 89, 89, 89, 196, 75, 75, 75, 196, 48, 48, 48, 137, 49, 49, 49, 134, 48, 48, 48, 119, 46, 46, 46, 71, 48, 48, 48, 68, 37, 37, 37, 22, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 32, 77, 77, 77, 255, 204, 204, 204, 255, 200, 200, 200, 255, 223, 223, 223, 255, 226, 226, 226, 255, 222, 222, 222, 255, 212, 212, 212, 255, 210, 210, 210, 255, 207, 207, 207, 255, 205, 205, 205, 255, 203, 203, 203, 255, 164, 164, 164, 255, 161, 161, 161, 255, 133, 133, 133, 255, 123, 123, 123, 255, 103, 103, 103, 255, 92, 92, 92, 212, 60, 60, 60, 196, 48, 48, 48, 151, 49, 49, 49, 134, 45, 45, 45, 73, 44, 44, 44, 37, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 192, 128, 128, 128, 255, 206, 206, 206, 255, 126, 126, 126, 255, 189, 189, 189, 255, 242, 242, 242, 255, 245, 245, 245, 255, 243, 243, 243, 255, 236, 236, 236, 255, 229, 229, 229, 255, 219, 219, 219, 255, 213, 213, 213, 255, 207, 207, 207, 255, 196, 196, 196, 255, 194, 194, 194, 255, 192, 192, 192, 255, 190, 190, 190, 255, 188, 188, 188, 255, 186, 186, 186, 255, 184, 184, 184, 255, 148, 148, 148, 255, 131, 131, 131, 255, 106, 106, 106, 255, 83, 83, 83, 242, 49, 49, 49, 183, 47, 47, 47, 121, 33, 33, 33, 25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 96, 92, 92, 92, 240, 64, 64, 64, 255, 134, 134, 134, 255, 157, 157, 157, 255, 85, 85, 85, 255, 128, 128, 128, 255, 166, 166, 166, 255, 175, 175, 175, 255, 191, 191, 191, 255, 204, 204, 204, 255, 212, 212, 212, 255, 222, 222, 222, 255, 229, 229, 229, 255, 230, 230, 230, 255, 227, 227, 227, 255, 218, 218, 218, 255, 210, 210, 210, 255, 202, 202, 202, 255, 192, 192, 192, 255, 184, 184, 184, 255, 181, 181, 181, 255, 179, 179, 179, 255, 177, 177, 177, 255, 175, 175, 175, 255, 172, 172, 172, 255, 163, 163, 163, 255, 109, 109, 109, 255, 58, 58, 58, 244, 43, 43, 43, 134, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 51, 51, 51, 32, 113, 113, 113, 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 204, 204, 255, 166, 166, 166, 255, 155, 155, 155, 255, 138, 138, 138, 255, 123, 123, 123, 255, 148, 148, 148, 255, 173, 173, 173, 255, 176, 176, 176, 255, 180, 180, 180, 255, 184, 184, 184, 255, 187, 187, 187, 255, 192, 192, 192, 255, 202, 202, 202, 255, 209, 209, 209, 255, 212, 212, 212, 255, 215, 215, 215, 255, 217, 217, 217, 255, 212, 212, 212, 255, 202, 202, 202, 255, 189, 189, 189, 255, 175, 175, 175, 255, 172, 172, 172, 255, 170, 170, 170, 255, 168, 168, 168, 255, 166, 166, 166, 255, 156, 156, 156, 255, 99, 99, 99, 255, 46, 46, 46, 213, 19, 19, 19, 42, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 50, 50, 82, 136, 136, 136, 255, 229, 229, 229, 255, 235, 235, 235, 255, 241, 241, 241, 255, 248, 248, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 204, 204, 255, 166, 166, 166, 255, 159, 159, 159, 255, 146, 146, 146, 255, 142, 142, 142, 255, 170, 170, 170, 255, 190, 190, 190, 255, 193, 193, 193, 255, 197, 197, 197, 255, 200, 200, 200, 255, 203, 203, 203, 255, 188, 188, 188, 255, 51, 51, 51, 255, 142, 142, 142, 255, 209, 209, 209, 255, 200, 200, 200, 255, 174, 174, 174, 255, 168, 168, 168, 255, 166, 166, 166, 255, 163, 163, 163, 255, 162, 162, 162, 255, 160, 160, 160, 255, 130, 130, 130, 255, 55, 55, 55, 238, 29, 29, 29, 85, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 50, 50, 131, 178, 178, 178, 255, 219, 219, 219, 255, 217, 217, 217, 255, 185, 185, 185, 255, 215, 215, 215, 255, 213, 213, 213, 255, 223, 223, 223, 255, 230, 230, 230, 255, 238, 238, 238, 255, 246, 246, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 255, 201, 201, 201, 255, 170, 170, 170, 255, 159, 159, 159, 255, 160, 160, 160, 255, 153, 153, 153, 255, 184, 184, 184, 255, 207, 207, 207, 255, 150, 150, 150, 255, 204, 204, 204, 255, 215, 215, 215, 255, 207, 207, 207, 255, 195, 195, 195, 255, 166, 166, 166, 255, 163, 163, 163, 255, 162, 162, 162, 255, 160, 160, 160, 255, 157, 157, 157, 255, 155, 155, 155, 255, 115, 115, 115, 255, 49, 49, 49, 248, 33, 33, 33, 122, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 50, 50, 194, 198, 198, 198, 255, 207, 207, 207, 255, 72, 97, 69, 255, 54, 121, 45, 255, 144, 152, 142, 255, 212, 212, 212, 255, 211, 211, 211, 255, 209, 209, 209, 255, 209, 209, 209, 255, 207, 207, 207, 255, 206, 206, 206, 255, 217, 217, 217, 255, 223, 223, 223, 255, 230, 230, 230, 255, 237, 237, 237, 255, 244, 244, 244, 255, 242, 242, 242, 255, 239, 239, 239, 255, 202, 202, 202, 255, 175, 175, 175, 255, 170, 170, 170, 255, 177, 177, 177, 255, 165, 165, 165, 255, 194, 194, 194, 255, 194, 194, 194, 255, 107, 107, 107, 255, 107, 107, 107, 255, 78, 78, 78, 255, 78, 78, 78, 255, 51, 51, 51, 255, 54, 54, 54, 255, 64, 64, 64, 255, 64, 64, 64, 255, 57, 57, 57, 255, 37, 37, 37, 155, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 32, 49, 49, 49, 50, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 50, 50, 210, 217, 217, 217, 255, 175, 175, 175, 255, 80, 169, 61, 255, 211, 255, 188, 255, 162, 182, 151, 255, 211, 211, 211, 255, 209, 209, 209, 255, 209, 209, 209, 255, 207, 207, 207, 255, 206, 206, 206, 255, 204, 204, 204, 255, 202, 202, 202, 255, 201, 201, 201, 255, 200, 200, 200, 255, 198, 198, 198, 255, 197, 197, 197, 255, 207, 207, 207, 255, 213, 213, 213, 255, 218, 218, 218, 255, 222, 222, 222, 255, 230, 230, 230, 255, 228, 228, 228, 255, 225, 225, 225, 255, 190, 190, 190, 255, 51, 51, 51, 255, 65, 65, 65, 255, 78, 78, 78, 255, 84, 84, 84, 255, 80, 80, 80, 255, 89, 89, 89, 255, 89, 89, 89, 255, 93, 93, 93, 255, 103, 103, 103, 255, 97, 97, 97, 255, 51, 51, 51, 255, 0, 0, 0, 90, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 80, 142, 142, 142, 177, 168, 168, 168, 255, 175, 175, 175, 255, 79, 79, 79, 202, 0, 0, 0, 22, 0, 0, 0, 0, + 0, 0, 0, 0, 72, 72, 72, 255, 216, 216, 216, 255, 205, 205, 205, 255, 111, 124, 107, 255, 162, 188, 149, 255, 201, 201, 201, 255, 209, 209, 209, 255, 209, 209, 209, 255, 207, 207, 207, 255, 206, 206, 206, 255, 204, 204, 204, 255, 202, 202, 202, 255, 201, 201, 201, 255, 200, 200, 200, 255, 198, 198, 198, 255, 197, 197, 197, 255, 196, 196, 196, 255, 194, 194, 194, 255, 193, 193, 193, 255, 192, 192, 192, 255, 190, 190, 190, 255, 189, 189, 189, 255, 195, 195, 195, 255, 200, 200, 200, 255, 178, 178, 178, 255, 87, 87, 87, 255, 108, 108, 108, 255, 93, 93, 93, 255, 58, 58, 58, 255, 62, 62, 62, 255, 89, 89, 89, 255, 88, 88, 88, 255, 51, 51, 51, 255, 62, 62, 62, 255, 97, 97, 97, 255, 51, 51, 51, 255, 0, 0, 0, 154, 21, 21, 21, 38, 74, 74, 74, 113, 147, 147, 147, 224, 200, 200, 200, 255, 213, 213, 213, 255, 187, 187, 187, 255, 169, 169, 169, 255, 100, 100, 100, 244, 0, 0, 0, 116, 0, 0, 0, 18, + 0, 0, 0, 0, 92, 92, 92, 255, 215, 215, 215, 255, 213, 213, 213, 255, 212, 212, 212, 255, 211, 211, 211, 255, 209, 209, 209, 255, 208, 208, 208, 255, 207, 207, 207, 255, 206, 206, 206, 255, 204, 204, 204, 255, 202, 202, 202, 255, 201, 201, 201, 255, 200, 200, 200, 255, 198, 198, 198, 255, 197, 197, 197, 255, 196, 196, 196, 255, 194, 194, 194, 255, 193, 193, 193, 255, 192, 192, 192, 255, 190, 190, 190, 255, 189, 189, 189, 255, 188, 188, 188, 255, 186, 186, 186, 255, 185, 185, 185, 255, 83, 83, 83, 255, 111, 111, 111, 255, 89, 89, 89, 255, 62, 62, 62, 255, 157, 157, 157, 255, 201, 201, 201, 255, 166, 166, 166, 255, 156, 156, 156, 255, 143, 143, 143, 255, 111, 111, 111, 255, 55, 55, 55, 255, 51, 51, 51, 255, 35, 35, 35, 211, 139, 139, 139, 255, 210, 210, 210, 255, 204, 204, 204, 255, 179, 179, 179, 255, 162, 162, 162, 255, 166, 166, 166, 255, 170, 170, 170, 255, 112, 112, 112, 255, 0, 0, 0, 149, 0, 0, 0, 21, + 51, 51, 51, 32, 92, 92, 92, 255, 213, 213, 213, 255, 212, 212, 212, 255, 211, 211, 211, 255, 209, 209, 209, 255, 208, 208, 208, 255, 207, 207, 207, 255, 206, 206, 206, 255, 204, 204, 204, 255, 202, 202, 202, 255, 201, 201, 201, 255, 200, 200, 200, 255, 198, 198, 198, 255, 197, 197, 197, 255, 196, 196, 196, 255, 194, 194, 194, 255, 193, 193, 193, 255, 192, 192, 192, 255, 190, 190, 190, 255, 189, 189, 189, 255, 188, 188, 188, 255, 186, 186, 186, 255, 185, 185, 185, 255, 142, 142, 142, 255, 100, 100, 100, 255, 96, 96, 96, 255, 83, 83, 83, 255, 210, 210, 210, 255, 153, 153, 153, 255, 61, 61, 61, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 65, 65, 65, 255, 96, 96, 96, 255, 51, 51, 51, 255, 58, 58, 58, 241, 102, 102, 102, 255, 122, 122, 122, 255, 160, 160, 160, 255, 164, 164, 164, 255, 167, 167, 167, 255, 171, 171, 171, 255, 174, 174, 174, 255, 114, 114, 114, 255, 0, 0, 0, 164, 0, 0, 0, 24, + 49, 49, 49, 66, 112, 112, 112, 255, 212, 212, 212, 255, 211, 211, 211, 255, 209, 209, 209, 255, 199, 199, 199, 255, 178, 178, 178, 255, 206, 206, 206, 255, 204, 204, 204, 255, 202, 202, 202, 255, 201, 201, 201, 255, 200, 200, 200, 255, 198, 198, 198, 255, 197, 197, 197, 255, 196, 196, 196, 255, 194, 194, 194, 255, 193, 193, 193, 255, 192, 192, 192, 255, 190, 190, 190, 255, 189, 189, 189, 255, 188, 188, 188, 255, 186, 186, 186, 255, 185, 185, 185, 255, 184, 184, 184, 255, 109, 109, 109, 255, 116, 116, 116, 255, 68, 68, 68, 255, 196, 196, 196, 255, 134, 134, 134, 255, 48, 54, 61, 255, 38, 64, 89, 255, 27, 76, 126, 255, 20, 82, 145, 255, 27, 75, 123, 255, 49, 53, 58, 255, 57, 57, 57, 255, 86, 86, 86, 255, 64, 64, 64, 255, 102, 102, 102, 255, 104, 104, 104, 255, 165, 165, 165, 255, 168, 168, 168, 255, 172, 172, 172, 255, 176, 176, 176, 255, 180, 180, 180, 255, 117, 117, 117, 255, 13, 13, 13, 184, 0, 0, 0, 28, + 48, 48, 48, 68, 131, 131, 131, 255, 211, 211, 211, 255, 209, 209, 209, 255, 208, 208, 208, 255, 168, 168, 168, 255, 204, 204, 204, 255, 174, 174, 174, 255, 172, 172, 172, 255, 171, 171, 171, 255, 180, 180, 180, 255, 189, 189, 189, 255, 197, 197, 197, 255, 196, 196, 196, 255, 194, 194, 194, 255, 193, 193, 193, 255, 192, 192, 192, 255, 190, 190, 190, 255, 189, 189, 189, 255, 188, 188, 188, 255, 186, 186, 186, 255, 185, 185, 185, 255, 184, 184, 184, 255, 182, 182, 182, 255, 99, 99, 99, 255, 92, 92, 92, 255, 153, 153, 153, 255, 255, 255, 255, 255, 46, 56, 65, 255, 44, 58, 72, 255, 39, 63, 87, 255, 34, 69, 104, 255, 25, 78, 130, 255, 13, 89, 166, 255, 15, 87, 159, 255, 51, 51, 51, 255, 82, 82, 82, 255, 64, 64, 64, 255, 102, 102, 102, 255, 106, 106, 106, 255, 170, 170, 170, 255, 173, 173, 173, 255, 177, 177, 177, 255, 181, 181, 181, 255, 186, 186, 186, 255, 154, 154, 154, 255, 17, 17, 17, 193, 0, 0, 0, 52, + 48, 48, 48, 68, 131, 131, 131, 255, 209, 209, 209, 255, 208, 208, 208, 255, 207, 207, 207, 255, 196, 196, 196, 255, 202, 202, 202, 255, 200, 200, 200, 255, 196, 196, 196, 255, 194, 194, 194, 255, 191, 191, 191, 255, 170, 170, 170, 255, 161, 161, 161, 255, 162, 162, 162, 255, 162, 162, 162, 255, 165, 165, 165, 255, 190, 190, 190, 255, 189, 189, 189, 255, 188, 188, 188, 255, 186, 186, 186, 255, 185, 185, 185, 255, 184, 184, 184, 255, 182, 182, 182, 255, 181, 181, 181, 255, 104, 104, 104, 255, 70, 70, 70, 255, 182, 182, 182, 255, 139, 141, 143, 255, 40, 62, 84, 255, 51, 51, 51, 255, 43, 59, 75, 255, 35, 67, 99, 255, 26, 77, 128, 255, 13, 89, 166, 255, 7, 96, 185, 255, 32, 70, 108, 255, 67, 67, 67, 255, 60, 60, 60, 255, 102, 102, 102, 255, 113, 113, 113, 255, 174, 174, 174, 255, 179, 179, 179, 255, 182, 182, 182, 255, 187, 187, 187, 255, 191, 191, 191, 255, 158, 158, 158, 255, 17, 17, 17, 194, 0, 0, 0, 64, + 48, 48, 48, 68, 130, 130, 130, 255, 208, 208, 208, 255, 207, 207, 207, 255, 205, 205, 205, 255, 165, 165, 165, 255, 200, 200, 200, 255, 196, 196, 196, 255, 194, 194, 194, 255, 191, 191, 191, 255, 187, 187, 187, 255, 185, 185, 185, 255, 182, 182, 182, 255, 178, 178, 178, 255, 176, 176, 176, 255, 173, 173, 173, 255, 140, 140, 140, 255, 150, 150, 150, 255, 152, 152, 152, 255, 157, 157, 157, 255, 184, 184, 184, 255, 182, 182, 182, 255, 181, 181, 181, 255, 148, 148, 148, 255, 112, 112, 112, 255, 51, 51, 51, 255, 203, 203, 203, 255, 51, 70, 89, 255, 95, 135, 174, 255, 139, 195, 250, 255, 84, 142, 200, 255, 30, 73, 116, 255, 24, 79, 133, 255, 13, 89, 166, 255, 4, 98, 192, 255, 16, 88, 159, 255, 51, 51, 51, 255, 87, 87, 87, 255, 102, 102, 102, 255, 89, 89, 89, 255, 180, 180, 180, 255, 184, 184, 184, 255, 187, 187, 187, 255, 192, 192, 192, 255, 196, 196, 196, 255, 163, 163, 163, 255, 17, 17, 17, 194, 0, 0, 0, 66, + 48, 48, 48, 68, 129, 129, 129, 255, 207, 207, 207, 255, 205, 205, 205, 255, 204, 204, 204, 255, 164, 164, 164, 255, 196, 196, 196, 255, 194, 194, 194, 255, 191, 191, 191, 255, 187, 187, 187, 255, 185, 185, 185, 255, 182, 182, 182, 255, 178, 178, 178, 255, 176, 176, 176, 255, 173, 173, 173, 255, 170, 170, 170, 255, 167, 167, 167, 255, 164, 164, 164, 255, 161, 161, 161, 255, 157, 157, 157, 255, 182, 182, 182, 255, 181, 181, 181, 255, 180, 180, 180, 255, 147, 147, 147, 255, 115, 115, 115, 255, 88, 88, 88, 255, 190, 190, 190, 255, 33, 70, 106, 255, 123, 179, 234, 255, 101, 169, 238, 255, 50, 136, 221, 255, 26, 77, 128, 255, 16, 86, 157, 255, 12, 90, 168, 255, 1, 101, 202, 255, 13, 106, 182, 255, 51, 51, 51, 255, 90, 90, 90, 255, 102, 102, 102, 255, 89, 89, 89, 255, 186, 186, 186, 255, 189, 189, 189, 255, 194, 194, 194, 255, 198, 198, 198, 255, 201, 201, 201, 255, 166, 166, 166, 255, 17, 17, 17, 194, 0, 0, 0, 66, + 48, 48, 48, 68, 129, 129, 129, 255, 205, 205, 205, 255, 204, 204, 204, 255, 202, 202, 202, 255, 162, 162, 162, 255, 194, 194, 194, 255, 191, 191, 191, 255, 162, 162, 162, 255, 176, 176, 176, 255, 182, 182, 182, 255, 178, 178, 178, 255, 176, 176, 176, 255, 173, 173, 173, 255, 170, 170, 170, 255, 167, 167, 167, 255, 164, 164, 164, 255, 161, 161, 161, 255, 158, 158, 158, 255, 162, 162, 162, 255, 181, 181, 181, 255, 180, 180, 180, 255, 178, 178, 178, 255, 146, 146, 146, 255, 119, 119, 119, 255, 77, 77, 77, 255, 181, 181, 181, 255, 23, 79, 135, 255, 72, 142, 212, 255, 50, 136, 221, 255, 11, 103, 195, 255, 15, 88, 161, 255, 12, 90, 168, 255, 2, 100, 197, 255, 0, 110, 212, 255, 13, 125, 202, 255, 62, 62, 62, 255, 57, 57, 57, 255, 102, 102, 102, 255, 89, 89, 89, 255, 191, 191, 191, 255, 194, 194, 194, 255, 199, 199, 199, 255, 202, 202, 202, 255, 206, 206, 206, 255, 169, 169, 169, 255, 27, 27, 27, 209, 0, 0, 0, 70, + 48, 48, 48, 68, 128, 128, 128, 255, 204, 204, 204, 255, 202, 202, 202, 255, 201, 201, 201, 255, 161, 161, 161, 255, 191, 191, 191, 255, 181, 181, 181, 255, 181, 181, 181, 255, 194, 194, 194, 255, 178, 178, 178, 255, 165, 165, 165, 255, 167, 167, 167, 255, 170, 170, 170, 255, 167, 167, 167, 255, 164, 164, 164, 255, 161, 161, 161, 255, 158, 158, 158, 255, 155, 155, 155, 255, 159, 159, 159, 255, 180, 180, 180, 255, 178, 178, 178, 255, 177, 177, 177, 255, 160, 160, 160, 255, 121, 121, 121, 255, 57, 57, 57, 255, 170, 170, 170, 255, 33, 82, 132, 255, 12, 94, 176, 255, 15, 96, 177, 255, 12, 90, 168, 255, 8, 94, 180, 255, 2, 100, 199, 255, 0, 104, 206, 255, 0, 140, 242, 255, 29, 90, 135, 255, 83, 83, 83, 255, 64, 64, 64, 255, 102, 102, 102, 255, 89, 89, 89, 255, 196, 196, 196, 255, 201, 201, 201, 255, 204, 204, 204, 255, 207, 207, 207, 255, 211, 211, 211, 255, 184, 184, 184, 255, 30, 30, 30, 217, 0, 0, 0, 94, + 48, 48, 48, 68, 127, 127, 127, 255, 202, 202, 202, 255, 201, 201, 201, 255, 200, 200, 200, 255, 159, 159, 159, 255, 187, 187, 187, 255, 185, 185, 185, 255, 195, 195, 195, 255, 192, 192, 192, 255, 176, 176, 176, 255, 178, 178, 178, 255, 219, 219, 219, 255, 171, 171, 171, 255, 164, 164, 164, 255, 159, 159, 159, 255, 176, 176, 176, 255, 155, 155, 155, 255, 152, 152, 152, 255, 158, 158, 158, 255, 178, 178, 178, 255, 177, 177, 177, 255, 176, 176, 176, 255, 174, 174, 174, 255, 118, 118, 118, 255, 82, 82, 82, 255, 124, 124, 124, 255, 77, 102, 128, 255, 0, 102, 204, 255, 0, 102, 204, 255, 0, 102, 204, 255, 0, 102, 204, 255, 0, 118, 220, 255, 0, 145, 247, 255, 3, 130, 226, 255, 48, 56, 62, 255, 72, 72, 72, 255, 64, 64, 64, 255, 102, 102, 102, 255, 89, 89, 89, 255, 183, 183, 183, 255, 205, 205, 205, 255, 208, 208, 208, 255, 213, 213, 213, 255, 216, 216, 216, 255, 221, 221, 221, 255, 30, 30, 30, 217, 0, 0, 0, 106, + 48, 48, 48, 68, 126, 126, 126, 255, 200, 200, 200, 255, 200, 200, 200, 255, 198, 198, 198, 255, 158, 158, 158, 255, 185, 185, 185, 255, 182, 182, 182, 255, 178, 178, 178, 255, 176, 176, 176, 255, 173, 173, 173, 255, 173, 173, 173, 255, 181, 181, 181, 255, 164, 164, 164, 255, 161, 161, 161, 255, 183, 183, 183, 255, 212, 212, 212, 255, 152, 152, 152, 255, 149, 149, 149, 255, 154, 154, 154, 255, 177, 177, 177, 255, 176, 176, 176, 255, 174, 174, 174, 255, 173, 173, 173, 255, 125, 125, 125, 255, 128, 128, 128, 255, 77, 77, 77, 255, 143, 143, 143, 255, 26, 112, 175, 255, 0, 137, 239, 255, 0, 136, 238, 255, 0, 146, 248, 255, 0, 140, 242, 255, 3, 124, 220, 255, 35, 73, 105, 255, 83, 83, 83, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 99, 99, 99, 255, 168, 168, 168, 255, 210, 210, 210, 255, 214, 214, 214, 255, 218, 218, 218, 255, 221, 221, 221, 255, 189, 189, 190, 255, 30, 30, 30, 217, 0, 0, 0, 108, + 48, 48, 48, 68, 116, 116, 116, 255, 200, 200, 200, 255, 198, 198, 198, 255, 197, 197, 197, 255, 157, 157, 157, 255, 182, 182, 182, 255, 178, 178, 178, 255, 176, 176, 176, 255, 173, 173, 173, 255, 170, 170, 170, 255, 167, 167, 167, 255, 164, 164, 164, 255, 161, 161, 161, 255, 158, 158, 158, 255, 155, 155, 155, 255, 152, 152, 152, 255, 149, 149, 149, 255, 146, 146, 146, 255, 152, 152, 152, 255, 176, 176, 176, 255, 174, 174, 174, 255, 173, 173, 173, 255, 172, 172, 172, 255, 129, 129, 129, 255, 157, 157, 157, 255, 84, 84, 84, 255, 109, 109, 109, 255, 152, 152, 152, 255, 34, 101, 152, 255, 13, 110, 187, 255, 13, 107, 184, 255, 19, 96, 160, 255, 41, 63, 82, 255, 104, 104, 104, 255, 75, 75, 75, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 102, 102, 102, 255, 172, 172, 172, 255, 215, 215, 215, 255, 220, 220, 220, 255, 221, 221, 221, 255, 220, 220, 223, 255, 176, 176, 183, 255, 27, 27, 27, 212, 0, 0, 0, 106, + 46, 46, 46, 53, 88, 88, 88, 255, 198, 198, 198, 255, 197, 197, 197, 255, 196, 196, 196, 255, 155, 155, 155, 255, 178, 178, 178, 255, 171, 171, 171, 255, 163, 163, 163, 255, 170, 170, 170, 255, 167, 167, 167, 255, 164, 164, 164, 255, 161, 161, 161, 255, 158, 158, 158, 255, 155, 155, 155, 255, 152, 152, 152, 255, 149, 149, 149, 255, 146, 146, 146, 255, 144, 144, 144, 255, 150, 150, 150, 255, 174, 174, 174, 255, 173, 173, 173, 255, 172, 172, 172, 255, 170, 170, 170, 255, 131, 131, 131, 255, 162, 162, 162, 255, 155, 155, 155, 255, 79, 79, 79, 255, 91, 91, 91, 255, 157, 157, 157, 255, 144, 144, 144, 255, 130, 130, 130, 255, 125, 125, 125, 255, 104, 104, 104, 255, 72, 72, 72, 255, 155, 155, 155, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 102, 102, 102, 255, 176, 176, 176, 255, 221, 221, 221, 255, 221, 221, 221, 255, 219, 219, 225, 255, 218, 218, 228, 255, 174, 174, 187, 255, 17, 17, 17, 197, 0, 0, 0, 94, + 0, 0, 0, 4, 88, 88, 88, 255, 197, 197, 197, 255, 196, 196, 196, 255, 194, 194, 194, 255, 154, 154, 154, 255, 176, 176, 176, 255, 174, 174, 174, 255, 215, 215, 215, 255, 193, 193, 193, 255, 164, 164, 164, 255, 155, 155, 155, 255, 153, 153, 153, 255, 155, 155, 155, 255, 152, 152, 152, 255, 149, 149, 149, 255, 146, 146, 146, 255, 143, 143, 143, 255, 141, 141, 141, 255, 147, 147, 147, 255, 173, 173, 173, 255, 172, 172, 172, 255, 170, 170, 170, 255, 168, 168, 168, 255, 152, 152, 152, 255, 130, 130, 130, 255, 166, 166, 166, 255, 166, 166, 166, 255, 123, 123, 123, 255, 80, 80, 80, 255, 51, 51, 51, 255, 51, 51, 51, 255, 80, 80, 80, 255, 123, 123, 123, 255, 166, 166, 166, 255, 166, 166, 166, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 102, 102, 102, 255, 179, 179, 179, 255, 221, 221, 222, 255, 219, 219, 227, 255, 217, 217, 230, 255, 214, 214, 235, 255, 173, 173, 190, 255, 17, 17, 17, 194, 0, 0, 0, 70, + 0, 0, 0, 0, 87, 87, 87, 255, 196, 196, 196, 255, 194, 194, 194, 255, 193, 193, 193, 255, 152, 152, 152, 255, 173, 173, 173, 255, 170, 170, 170, 255, 173, 173, 173, 255, 164, 164, 164, 255, 161, 161, 161, 255, 169, 169, 169, 255, 227, 227, 227, 255, 157, 157, 157, 255, 149, 149, 149, 255, 153, 153, 153, 255, 167, 167, 167, 255, 141, 141, 141, 255, 137, 137, 137, 255, 144, 144, 144, 255, 172, 172, 172, 255, 170, 170, 170, 255, 168, 168, 168, 255, 167, 167, 167, 255, 165, 165, 165, 255, 109, 109, 109, 255, 170, 170, 170, 255, 170, 170, 170, 255, 170, 170, 170, 255, 170, 170, 170, 255, 170, 170, 170, 255, 170, 170, 170, 255, 170, 170, 170, 255, 170, 170, 170, 255, 170, 170, 170, 255, 170, 170, 170, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 96, 96, 96, 255, 199, 199, 202, 255, 218, 218, 228, 255, 216, 216, 232, 255, 214, 214, 235, 255, 212, 212, 239, 255, 171, 171, 194, 255, 17, 17, 17, 194, 0, 0, 0, 66, + 0, 0, 0, 0, 51, 51, 51, 241, 194, 194, 194, 255, 193, 193, 193, 255, 192, 192, 192, 255, 151, 151, 151, 255, 170, 170, 170, 255, 167, 167, 167, 255, 164, 164, 164, 255, 161, 161, 161, 255, 158, 158, 158, 255, 159, 159, 159, 255, 166, 166, 166, 255, 149, 149, 149, 255, 146, 146, 146, 255, 191, 191, 191, 255, 193, 193, 193, 255, 137, 137, 137, 255, 135, 135, 135, 255, 127, 127, 127, 255, 170, 170, 170, 255, 168, 168, 168, 255, 167, 167, 167, 255, 165, 165, 165, 255, 164, 164, 164, 255, 79, 79, 79, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 174, 174, 174, 255, 165, 165, 165, 255, 156, 156, 156, 255, 142, 142, 142, 255, 156, 156, 156, 255, 174, 174, 174, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 89, 89, 89, 255, 218, 218, 228, 255, 215, 215, 233, 255, 213, 213, 236, 255, 212, 212, 240, 255, 210, 210, 243, 255, 139, 139, 161, 255, 17, 17, 17, 194, 0, 0, 0, 66, + 0, 0, 0, 0, 49, 49, 49, 197, 193, 193, 193, 255, 192, 192, 192, 255, 190, 190, 190, 255, 150, 150, 150, 255, 167, 167, 167, 255, 164, 164, 164, 255, 153, 153, 153, 255, 158, 158, 158, 255, 155, 155, 155, 255, 152, 152, 152, 255, 149, 149, 149, 255, 146, 146, 146, 255, 143, 143, 143, 255, 140, 140, 140, 255, 137, 137, 137, 255, 135, 135, 135, 255, 132, 132, 132, 255, 120, 120, 120, 255, 168, 168, 168, 255, 167, 167, 167, 255, 165, 165, 165, 255, 164, 164, 164, 255, 163, 163, 163, 255, 79, 79, 79, 255, 179, 179, 179, 255, 169, 169, 169, 255, 120, 120, 120, 255, 116, 116, 116, 255, 102, 102, 102, 255, 122, 122, 122, 255, 131, 131, 131, 255, 122, 122, 122, 255, 140, 140, 140, 255, 179, 179, 179, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 89, 89, 89, 255, 214, 214, 235, 255, 213, 213, 237, 255, 211, 211, 241, 255, 209, 209, 245, 255, 207, 207, 248, 255, 128, 128, 151, 255, 13, 13, 13, 188, 0, 0, 0, 64, + 0, 0, 0, 0, 50, 50, 50, 196, 183, 183, 183, 255, 190, 190, 190, 255, 189, 189, 189, 255, 148, 148, 148, 255, 164, 164, 164, 255, 158, 158, 158, 255, 172, 172, 172, 255, 168, 168, 168, 255, 152, 152, 152, 255, 146, 146, 146, 255, 140, 140, 140, 255, 143, 143, 143, 255, 140, 140, 140, 255, 137, 137, 137, 255, 135, 135, 135, 255, 132, 132, 132, 255, 129, 129, 129, 255, 118, 118, 118, 255, 167, 167, 167, 255, 165, 165, 165, 255, 164, 164, 164, 255, 163, 163, 163, 255, 161, 161, 161, 255, 79, 79, 79, 255, 182, 182, 182, 255, 162, 162, 162, 255, 132, 132, 132, 255, 177, 177, 177, 255, 182, 182, 182, 255, 182, 182, 182, 255, 182, 182, 182, 255, 142, 142, 142, 255, 142, 142, 142, 255, 182, 182, 182, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 113, 113, 118, 255, 212, 212, 239, 255, 211, 211, 242, 255, 208, 208, 247, 255, 206, 206, 249, 255, 204, 204, 254, 255, 128, 128, 153, 255, 0, 0, 0, 172, 0, 0, 0, 52, + 0, 0, 0, 0, 47, 47, 47, 122, 103, 103, 103, 255, 189, 189, 189, 255, 188, 188, 188, 255, 147, 147, 147, 255, 161, 161, 161, 255, 161, 161, 161, 255, 204, 204, 204, 255, 168, 168, 168, 255, 149, 149, 149, 255, 157, 157, 157, 255, 179, 179, 179, 255, 140, 140, 140, 255, 137, 137, 137, 255, 133, 133, 133, 255, 133, 133, 133, 255, 129, 129, 129, 255, 126, 126, 126, 255, 116, 116, 116, 255, 165, 165, 165, 255, 164, 164, 164, 255, 163, 163, 163, 255, 161, 161, 161, 255, 161, 161, 161, 255, 78, 78, 78, 255, 187, 187, 187, 255, 165, 165, 165, 255, 144, 144, 144, 255, 187, 187, 187, 255, 187, 187, 187, 255, 187, 187, 187, 255, 187, 187, 187, 255, 144, 144, 144, 255, 144, 144, 144, 255, 187, 187, 187, 255, 51, 51, 51, 255, 64, 64, 64, 255, 102, 102, 102, 255, 117, 117, 124, 255, 210, 210, 243, 255, 207, 207, 248, 255, 206, 206, 251, 255, 166, 166, 204, 255, 97, 97, 113, 251, 29, 29, 29, 223, 0, 0, 0, 155, 0, 0, 0, 28, + 0, 0, 0, 0, 0, 0, 0, 10, 36, 36, 36, 159, 68, 68, 68, 255, 110, 110, 110, 255, 112, 112, 112, 255, 158, 158, 158, 255, 155, 155, 155, 255, 152, 152, 152, 255, 149, 149, 149, 255, 146, 146, 146, 255, 166, 166, 166, 255, 204, 204, 204, 255, 137, 137, 137, 255, 134, 134, 134, 255, 167, 167, 167, 255, 154, 154, 154, 255, 126, 126, 126, 255, 123, 123, 123, 255, 114, 114, 114, 255, 164, 164, 164, 255, 163, 163, 163, 255, 161, 161, 161, 255, 160, 160, 160, 255, 159, 159, 159, 255, 78, 78, 78, 255, 190, 190, 190, 255, 168, 168, 168, 255, 146, 146, 146, 255, 190, 190, 190, 255, 190, 190, 190, 255, 190, 190, 190, 255, 190, 190, 190, 255, 146, 146, 146, 255, 146, 146, 146, 255, 190, 190, 190, 255, 51, 51, 51, 255, 57, 57, 57, 243, 102, 102, 102, 255, 145, 145, 162, 255, 197, 197, 236, 255, 148, 148, 176, 255, 66, 66, 72, 247, 23, 23, 23, 213, 0, 0, 0, 175, 0, 0, 0, 149, 0, 0, 0, 94, 0, 0, 0, 12, + 0, 0, 0, 0, 0, 0, 0, 0, 38, 38, 38, 65, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 155, 155, 155, 255, 152, 152, 152, 255, 149, 149, 149, 255, 146, 146, 146, 255, 143, 143, 143, 255, 140, 140, 140, 255, 137, 137, 137, 255, 134, 134, 134, 255, 132, 132, 132, 255, 190, 190, 190, 255, 163, 163, 163, 255, 123, 123, 123, 255, 120, 120, 120, 255, 113, 113, 113, 255, 163, 163, 163, 255, 161, 161, 161, 255, 160, 160, 160, 255, 159, 159, 159, 255, 158, 158, 158, 255, 78, 78, 78, 255, 195, 195, 195, 255, 172, 172, 172, 255, 149, 149, 149, 255, 195, 195, 195, 255, 195, 195, 195, 255, 195, 195, 195, 255, 195, 195, 195, 255, 149, 149, 149, 255, 149, 149, 149, 255, 195, 195, 195, 255, 51, 51, 51, 255, 51, 51, 51, 238, 89, 89, 89, 255, 83, 83, 88, 255, 48, 48, 51, 235, 16, 16, 16, 202, 0, 0, 0, 170, 0, 0, 0, 140, 0, 0, 0, 81, 0, 0, 0, 31, 0, 0, 0, 12, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 45, 45, 45, 179, 51, 51, 51, 255, 51, 51, 51, 255, 152, 152, 152, 255, 149, 149, 149, 255, 146, 146, 146, 255, 143, 143, 143, 255, 140, 140, 140, 255, 137, 137, 137, 255, 134, 134, 134, 255, 132, 132, 132, 255, 129, 129, 129, 255, 126, 126, 126, 255, 123, 123, 123, 255, 120, 120, 120, 255, 117, 117, 117, 255, 111, 111, 111, 255, 161, 161, 161, 255, 160, 160, 160, 255, 159, 159, 159, 255, 158, 158, 158, 255, 157, 157, 157, 255, 77, 77, 77, 255, 199, 199, 199, 255, 175, 175, 175, 255, 151, 151, 151, 255, 199, 199, 199, 255, 199, 199, 199, 255, 199, 199, 199, 255, 199, 199, 199, 255, 151, 151, 151, 255, 151, 151, 151, 255, 199, 199, 199, 255, 51, 51, 51, 255, 12, 12, 12, 198, 19, 19, 19, 171, 9, 9, 9, 178, 0, 0, 0, 163, 0, 0, 0, 119, 0, 0, 0, 64, 0, 0, 0, 27, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 30, 30, 30, 163, 39, 39, 39, 227, 70, 70, 70, 255, 93, 93, 93, 255, 126, 126, 126, 255, 140, 140, 140, 255, 137, 137, 137, 255, 134, 134, 134, 255, 132, 132, 132, 255, 129, 129, 129, 255, 126, 126, 126, 255, 123, 123, 123, 255, 120, 120, 120, 255, 117, 117, 117, 255, 114, 114, 114, 255, 88, 88, 88, 255, 122, 122, 122, 255, 139, 139, 139, 255, 157, 157, 157, 255, 157, 157, 157, 255, 155, 155, 155, 255, 77, 77, 77, 255, 203, 203, 203, 255, 178, 178, 178, 255, 153, 153, 153, 255, 203, 203, 203, 255, 203, 203, 203, 255, 203, 203, 203, 255, 203, 203, 203, 255, 153, 153, 153, 255, 153, 153, 153, 255, 203, 203, 203, 255, 51, 51, 51, 255, 0, 0, 0, 172, 0, 0, 0, 66, 0, 0, 0, 55, 0, 0, 0, 42, 0, 0, 0, 19, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 76, 6, 6, 6, 130, 25, 25, 25, 196, 39, 39, 39, 230, 62, 62, 62, 255, 87, 87, 87, 255, 107, 107, 107, 255, 129, 129, 129, 255, 126, 126, 126, 255, 123, 123, 123, 255, 120, 120, 120, 255, 117, 117, 117, 255, 114, 114, 114, 255, 111, 111, 111, 255, 80, 80, 80, 255, 102, 102, 102, 255, 102, 102, 102, 255, 99, 99, 99, 255, 109, 109, 109, 255, 125, 125, 125, 255, 77, 77, 77, 255, 207, 207, 207, 255, 181, 181, 181, 255, 155, 155, 155, 255, 207, 207, 207, 255, 207, 207, 207, 255, 207, 207, 207, 255, 207, 207, 207, 255, 155, 155, 155, 255, 155, 155, 155, 255, 207, 207, 207, 255, 51, 51, 51, 255, 0, 0, 0, 167, 0, 0, 0, 28, 0, 0, 0, 6, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 39, 0, 0, 0, 78, 6, 6, 6, 130, 25, 25, 25, 196, 39, 39, 39, 230, 56, 56, 56, 255, 78, 78, 78, 255, 99, 99, 99, 255, 113, 113, 113, 255, 114, 114, 114, 255, 111, 111, 111, 255, 108, 108, 108, 255, 82, 82, 82, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 73, 73, 73, 255, 212, 212, 212, 255, 185, 185, 185, 255, 157, 157, 157, 255, 212, 212, 212, 255, 192, 192, 192, 255, 182, 182, 182, 255, 212, 212, 212, 255, 157, 157, 157, 255, 157, 157, 157, 255, 202, 202, 202, 255, 46, 46, 46, 247, 0, 0, 0, 164, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 39, 0, 0, 0, 78, 6, 6, 6, 130, 25, 25, 25, 196, 39, 39, 39, 230, 51, 51, 51, 255, 70, 70, 70, 255, 87, 87, 87, 255, 102, 102, 102, 255, 90, 90, 90, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 77, 77, 77, 255, 215, 215, 215, 255, 187, 187, 187, 255, 159, 159, 159, 255, 215, 215, 215, 255, 112, 112, 112, 255, 71, 71, 71, 255, 215, 215, 215, 255, 159, 159, 159, 255, 159, 159, 159, 255, 112, 112, 112, 255, 29, 29, 29, 222, 0, 0, 0, 143, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 39, 0, 0, 0, 78, 6, 6, 6, 130, 25, 25, 25, 196, 39, 39, 39, 230, 51, 51, 51, 255, 61, 61, 61, 255, 86, 86, 86, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 77, 77, 77, 255, 220, 220, 220, 255, 190, 190, 190, 255, 161, 161, 161, 255, 220, 220, 220, 255, 209, 209, 209, 255, 157, 157, 157, 255, 135, 135, 135, 255, 89, 89, 89, 255, 54, 54, 54, 255, 32, 32, 32, 227, 0, 0, 0, 169, 0, 0, 0, 93, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 39, 0, 0, 0, 78, 6, 6, 6, 130, 25, 25, 25, 196, 39, 39, 39, 230, 54, 54, 54, 255, 70, 70, 70, 255, 86, 86, 86, 255, 96, 96, 96, 255, 99, 99, 99, 255, 129, 129, 129, 255, 121, 121, 121, 255, 85, 85, 85, 255, 83, 83, 83, 255, 49, 49, 49, 251, 38, 38, 38, 235, 30, 30, 30, 220, 16, 16, 16, 198, 0, 0, 0, 173, 0, 0, 0, 157, 0, 0, 0, 101, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 39, 0, 0, 0, 78, 6, 6, 6, 130, 25, 25, 25, 196, 36, 36, 36, 225, 41, 41, 41, 237, 41, 41, 41, 237, 41, 41, 41, 237, 35, 35, 35, 229, 23, 23, 23, 209, 13, 13, 13, 191, 0, 0, 0, 170, 0, 0, 0, 154, 0, 0, 0, 124, 0, 0, 0, 94, 0, 0, 0, 60, 0, 0, 0, 30, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 39, 0, 0, 0, 76, 0, 0, 0, 110, 0, 0, 0, 128, 0, 0, 0, 131, 0, 0, 0, 128, 0, 0, 0, 110, 0, 0, 0, 79, 0, 0, 0, 51, 0, 0, 0, 27, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 15, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 15, 0, 0, 0, 9, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_LogoMessageWarning(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 25, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 4, 93, 255, 255, 8, 241, 255, 255, 10, 255, 255, 255, 12, 241, 255, 255, 8, 93, 39, 39, 98, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 252, 0, 111, 247, 247, 0, 255, 251, 251, 1, 255, 255, 255, 3, 255, 255, 255, 3, 255, 253, 253, 2, 255, 190, 190, 32, 157, 36, 36, 101, 43, 43, 43, 106, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 253, 0, 56, 242, 242, 0, 250, 244, 243, 0, 255, 250, 249, 1, 255, 255, 255, 6, 255, 255, 254, 2, 255, 249, 248, 0, 255, 244, 244, 2, 255, 92, 93, 76, 209, 33, 35, 103, 109, 29, 39, 98, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 242, 0, 185, 238, 237, 0, 255, 242, 240, 0, 255, 253, 252, 3, 255, 255, 255, 26, 255, 255, 255, 8, 255, 248, 246, 0, 255, 245, 244, 0, 255, 190, 190, 28, 254, 33, 35, 103, 217, 32, 34, 103, 119, 36, 36, 109, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251, 248, 0, 70, 236, 234, 0, 255, 237, 235, 0, 255, 243, 240, 0, 255, 255, 255, 13, 255, 255, 255, 92, 255, 255, 255, 29, 255, 249, 246, 1, 255, 243, 241, 0, 255, 242, 241, 0, 255, 93, 94, 75, 254, 33, 35, 103, 210, 34, 34, 106, 82, 36, 36, 109, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 238, 0, 185, 234, 230, 0, 255, 237, 234, 0, 255, 244, 241, 0, 255, 255, 255, 32, 255, 255, 255, 81, 255, 255, 255, 64, 255, 252, 249, 3, 255, 243, 241, 0, 255, 241, 237, 0, 255, 188, 186, 28, 255, 33, 35, 103, 246, 33, 34, 103, 163, 32, 32, 104, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 248, 0, 51, 234, 230, 0, 255, 234, 230, 0, 255, 238, 235, 0, 255, 248, 244, 3, 255, 255, 255, 32, 255, 255, 255, 38, 255, 255, 255, 58, 255, 255, 255, 11, 255, 245, 241, 0, 255, 241, 237, 0, 255, 241, 237, 0, 255, 77, 78, 82, 255, 33, 35, 103, 223, 34, 37, 102, 90, 28, 28, 113, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 236, 0, 185, 233, 228, 0, 255, 235, 231, 0, 255, 241, 236, 0, 255, 255, 251, 10, 255, 255, 255, 24, 255, 255, 255, 14, 255, 255, 255, 39, 255, 255, 255, 28, 255, 248, 243, 1, 255, 242, 237, 0, 255, 240, 236, 0, 255, 188, 184, 28, 255, 33, 35, 104, 246, 32, 36, 104, 165, 34, 34, 102, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 245, 0, 46, 234, 228, 0, 255, 233, 227, 0, 255, 238, 232, 0, 255, 245, 239, 1, 255, 255, 255, 16, 255, 255, 255, 15, 255, 255, 252, 4, 255, 255, 255, 22, 255, 255, 255, 37, 255, 255, 249, 7, 255, 244, 238, 0, 255, 241, 234, 0, 255, 241, 235, 0, 255, 73, 73, 84, 255, 33, 35, 103, 221, 35, 35, 104, 81, 43, 43, 128, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 242, 235, 0, 172, 233, 226, 0, 255, 235, 229, 0, 255, 241, 233, 0, 255, 253, 246, 7, 255, 255, 255, 18, 255, 255, 254, 8, 255, 255, 248, 1, 255, 255, 255, 10, 255, 255, 255, 33, 255, 255, 255, 22, 255, 248, 240, 1, 255, 242, 235, 0, 255, 240, 233, 0, 255, 177, 173, 34, 255, 33, 35, 104, 246, 33, 34, 103, 163, 35, 35, 106, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 244, 0, 46, 234, 225, 0, 255, 233, 226, 0, 255, 238, 229, 0, 255, 245, 236, 1, 255, 255, 255, 15, 255, 255, 255, 14, 255, 255, 249, 3, 255, 255, 247, 0, 255, 255, 250, 4, 255, 255, 255, 22, 255, 255, 255, 34, 255, 255, 246, 7, 255, 244, 236, 0, 255, 241, 233, 0, 255, 241, 232, 0, 255, 73, 73, 84, 255, 34, 35, 103, 220, 34, 34, 104, 76, 43, 43, 85, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 233, 0, 162, 233, 224, 0, 255, 235, 225, 0, 255, 241, 231, 0, 255, 253, 243, 7, 255, 255, 255, 17, 255, 255, 253, 8, 255, 227, 218, 4, 255, 153, 143, 11, 255, 202, 192, 7, 255, 255, 255, 12, 255, 255, 255, 33, 255, 255, 255, 22, 255, 248, 238, 1, 255, 242, 232, 0, 255, 240, 231, 0, 255, 169, 163, 38, 255, 33, 35, 103, 245, 33, 36, 103, 156, 38, 38, 104, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 240, 0, 42, 234, 224, 0, 250, 233, 222, 0, 255, 238, 227, 0, 255, 245, 234, 1, 255, 255, 254, 15, 255, 255, 255, 14, 255, 56, 49, 15, 255, 1, 0, 2, 255, 1, 0, 1, 255, 1, 0, 2, 255, 27, 21, 15, 255, 235, 233, 24, 255, 255, 255, 34, 255, 255, 244, 7, 255, 244, 234, 0, 255, 241, 229, 0, 255, 237, 226, 2, 255, 69, 69, 86, 255, 33, 35, 102, 219, 34, 34, 105, 75, 43, 43, 85, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 230, 0, 162, 233, 222, 0, 255, 235, 223, 0, 255, 241, 228, 0, 255, 253, 240, 7, 255, 255, 255, 17, 255, 106, 99, 17, 255, 1, 0, 2, 255, 3, 1, 7, 255, 7, 1, 15, 255, 7, 1, 17, 255, 10, 2, 24, 255, 97, 84, 36, 255, 255, 255, 33, 255, 255, 255, 22, 255, 248, 235, 1, 255, 242, 230, 0, 255, 240, 229, 0, 255, 169, 161, 38, 255, 34, 35, 103, 243, 32, 34, 102, 150, 29, 39, 98, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 239, 0, 28, 234, 221, 0, 250, 233, 221, 0, 255, 238, 225, 0, 255, 245, 231, 1, 255, 255, 250, 15, 255, 255, 254, 14, 255, 20, 15, 12, 255, 1, 0, 2, 255, 10, 2, 22, 255, 23, 4, 53, 255, 24, 4, 54, 255, 23, 4, 52, 255, 24, 4, 55, 255, 255, 255, 22, 255, 255, 255, 34, 255, 255, 241, 7, 255, 244, 231, 0, 255, 241, 227, 0, 255, 237, 224, 2, 255, 57, 58, 92, 254, 33, 35, 104, 214, 31, 35, 101, 73, 51, 51, 102, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 229, 0, 158, 233, 219, 0, 255, 235, 221, 0, 255, 241, 226, 0, 255, 253, 238, 7, 255, 255, 254, 17, 255, 255, 247, 8, 255, 20, 15, 10, 255, 1, 0, 3, 255, 13, 2, 29, 255, 25, 4, 57, 255, 25, 4, 57, 255, 25, 4, 57, 255, 25, 4, 57, 255, 255, 250, 12, 255, 255, 255, 33, 255, 255, 255, 22, 255, 248, 233, 1, 255, 242, 228, 0, 255, 240, 226, 0, 255, 166, 158, 39, 255, 33, 35, 103, 243, 33, 34, 103, 149, 32, 32, 106, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 236, 0, 28, 234, 218, 0, 250, 233, 218, 0, 255, 238, 222, 0, 255, 245, 229, 1, 255, 255, 248, 15, 255, 255, 251, 14, 255, 255, 242, 4, 255, 21, 16, 11, 255, 2, 0, 4, 255, 15, 2, 34, 255, 25, 4, 57, 255, 25, 4, 57, 255, 25, 4, 57, 255, 25, 4, 57, 255, 255, 243, 5, 255, 255, 255, 22, 255, 255, 255, 34, 255, 255, 238, 7, 255, 244, 228, 0, 255, 241, 225, 0, 255, 237, 221, 2, 255, 57, 57, 92, 254, 32, 35, 103, 213, 35, 35, 102, 65, 64, 64, 64, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245, 227, 0, 139, 233, 216, 0, 255, 235, 219, 0, 255, 241, 223, 0, 255, 253, 236, 7, 255, 255, 251, 17, 255, 255, 245, 8, 255, 255, 237, 1, 255, 72, 61, 15, 255, 4, 1, 9, 255, 18, 3, 41, 255, 25, 5, 57, 255, 27, 5, 58, 255, 26, 5, 57, 255, 66, 45, 47, 255, 255, 237, 2, 255, 255, 248, 12, 255, 255, 255, 33, 255, 255, 254, 22, 255, 248, 229, 1, 255, 242, 225, 0, 255, 240, 223, 0, 255, 150, 141, 47, 255, 33, 35, 103, 242, 33, 35, 103, 146, 33, 33, 100, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 234, 0, 28, 234, 215, 0, 250, 233, 215, 0, 255, 238, 219, 0, 255, 245, 226, 1, 255, 255, 245, 15, 255, 255, 248, 14, 255, 255, 239, 4, 255, 255, 235, 0, 255, 111, 98, 14, 255, 11, 2, 25, 255, 23, 4, 52, 255, 31, 10, 62, 255, 40, 19, 70, 255, 40, 20, 58, 255, 111, 90, 36, 255, 255, 235, 0, 255, 255, 240, 5, 255, 255, 255, 22, 255, 255, 255, 34, 255, 255, 235, 7, 255, 244, 225, 0, 255, 241, 222, 0, 255, 237, 218, 2, 255, 57, 57, 92, 254, 32, 35, 103, 212, 32, 36, 101, 63, 64, 64, 64, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 224, 0, 139, 233, 214, 0, 255, 235, 216, 0, 255, 241, 221, 0, 255, 253, 233, 7, 255, 255, 249, 17, 255, 255, 242, 8, 255, 255, 235, 1, 255, 255, 234, 0, 255, 202, 183, 6, 255, 12, 2, 27, 255, 24, 5, 54, 255, 42, 22, 74, 255, 56, 35, 82, 255, 68, 45, 60, 255, 153, 131, 25, 255, 255, 234, 0, 255, 255, 235, 2, 255, 255, 245, 12, 255, 255, 255, 33, 255, 255, 251, 22, 255, 248, 227, 1, 255, 242, 222, 0, 255, 240, 220, 0, 255, 150, 140, 47, 255, 33, 35, 103, 240, 34, 36, 103, 136, 36, 36, 97, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 231, 0, 19, 234, 213, 0, 241, 233, 212, 0, 255, 237, 217, 0, 255, 244, 223, 1, 255, 255, 242, 15, 255, 255, 245, 14, 255, 255, 237, 4, 255, 255, 233, 0, 255, 255, 233, 0, 255, 255, 233, 0, 255, 14, 6, 20, 255, 23, 5, 51, 255, 63, 43, 95, 255, 71, 51, 96, 255, 79, 58, 63, 255, 210, 188, 11, 255, 255, 233, 0, 255, 255, 233, 0, 255, 255, 238, 5, 255, 255, 253, 22, 255, 255, 255, 34, 255, 254, 232, 6, 255, 244, 223, 0, 255, 240, 219, 0, 255, 230, 210, 6, 255, 49, 50, 95, 254, 33, 35, 103, 210, 32, 36, 101, 63, 64, 64, 64, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 221, 0, 139, 232, 210, 0, 255, 234, 212, 0, 255, 240, 217, 0, 255, 251, 228, 6, 255, 255, 246, 17, 255, 255, 240, 8, 255, 255, 232, 1, 255, 255, 231, 0, 255, 255, 231, 0, 255, 255, 232, 0, 255, 45, 34, 19, 255, 18, 5, 41, 255, 86, 68, 122, 255, 81, 63, 109, 255, 76, 57, 60, 255, 255, 232, 0, 255, 255, 231, 0, 255, 255, 231, 0, 255, 255, 233, 2, 255, 255, 243, 12, 255, 255, 255, 32, 255, 255, 245, 19, 255, 246, 223, 1, 255, 241, 218, 0, 255, 239, 217, 0, 255, 150, 138, 47, 255, 33, 35, 103, 240, 34, 36, 102, 135, 38, 38, 102, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 230, 0, 14, 233, 210, 0, 241, 231, 208, 0, 255, 235, 212, 0, 255, 242, 219, 1, 255, 255, 236, 12, 255, 255, 242, 14, 255, 255, 234, 4, 255, 255, 230, 0, 255, 255, 230, 0, 255, 255, 230, 0, 255, 255, 230, 0, 255, 103, 88, 17, 255, 18, 5, 40, 255, 103, 91, 147, 255, 83, 67, 109, 255, 100, 77, 48, 255, 255, 230, 0, 255, 255, 230, 0, 255, 255, 230, 0, 255, 255, 230, 0, 255, 255, 235, 5, 255, 255, 251, 22, 255, 255, 255, 29, 255, 251, 226, 4, 255, 242, 218, 0, 255, 239, 215, 0, 255, 230, 207, 6, 255, 45, 46, 97, 253, 33, 35, 103, 204, 31, 36, 103, 57, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 221, 0, 125, 231, 208, 0, 255, 232, 208, 0, 255, 237, 213, 0, 255, 246, 221, 3, 255, 255, 240, 14, 255, 255, 237, 9, 255, 255, 230, 2, 255, 255, 229, 0, 255, 255, 229, 0, 255, 255, 229, 0, 255, 255, 229, 0, 255, 187, 165, 9, 255, 18, 3, 41, 255, 152, 134, 186, 255, 82, 69, 94, 255, 141, 118, 32, 255, 255, 229, 0, 255, 255, 229, 0, 255, 255, 229, 0, 255, 255, 229, 0, 255, 255, 231, 2, 255, 255, 241, 13, 255, 255, 255, 30, 255, 255, 233, 10, 255, 244, 219, 0, 255, 239, 215, 0, 255, 239, 214, 0, 255, 139, 128, 53, 255, 33, 35, 102, 239, 32, 34, 103, 134, 40, 40, 107, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 227, 0, 14, 235, 209, 0, 241, 232, 206, 0, 255, 234, 208, 0, 255, 240, 215, 0, 255, 254, 228, 8, 255, 255, 239, 14, 255, 255, 233, 5, 255, 255, 228, 0, 255, 255, 228, 0, 255, 255, 228, 0, 255, 255, 228, 0, 255, 255, 227, 0, 255, 255, 227, 0, 255, 21, 4, 45, 255, 34, 36, 108, 255, 65, 53, 74, 255, 195, 169, 16, 255, 255, 227, 0, 255, 255, 228, 0, 255, 255, 228, 0, 255, 255, 228, 0, 255, 255, 228, 1, 255, 255, 234, 7, 255, 255, 250, 24, 255, 255, 246, 23, 255, 247, 221, 1, 255, 241, 215, 0, 255, 239, 213, 0, 255, 231, 206, 6, 255, 45, 46, 97, 253, 33, 35, 103, 203, 34, 34, 101, 53, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 220, 0, 116, 233, 207, 0, 255, 233, 206, 0, 255, 237, 210, 0, 255, 244, 218, 1, 255, 255, 236, 13, 255, 255, 236, 11, 255, 255, 229, 3, 255, 255, 226, 0, 255, 255, 227, 0, 255, 255, 226, 0, 255, 255, 226, 0, 255, 255, 227, 0, 255, 255, 226, 0, 255, 63, 48, 40, 255, 28, 35, 106, 255, 37, 21, 63, 255, 255, 226, 0, 255, 255, 227, 0, 255, 255, 226, 0, 255, 255, 226, 0, 255, 255, 227, 0, 255, 255, 226, 0, 255, 255, 230, 3, 255, 255, 242, 17, 255, 255, 254, 30, 255, 254, 227, 7, 255, 244, 216, 0, 255, 240, 213, 0, 255, 240, 213, 0, 255, 132, 121, 56, 255, 33, 36, 103, 237, 32, 34, 103, 126, 30, 30, 105, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 224, 0, 14, 237, 210, 0, 232, 233, 205, 0, 255, 235, 207, 0, 255, 240, 212, 0, 255, 252, 225, 7, 255, 255, 238, 16, 255, 255, 232, 7, 255, 255, 226, 1, 255, 255, 225, 0, 255, 255, 225, 0, 255, 255, 226, 0, 255, 255, 225, 0, 255, 255, 225, 0, 255, 255, 225, 0, 255, 112, 96, 36, 255, 27, 29, 97, 255, 66, 44, 48, 255, 255, 225, 0, 255, 255, 225, 0, 255, 255, 225, 0, 255, 255, 226, 0, 255, 255, 225, 0, 255, 255, 225, 0, 255, 255, 226, 1, 255, 255, 234, 10, 255, 255, 253, 30, 255, 255, 242, 21, 255, 247, 218, 1, 255, 242, 213, 0, 255, 240, 212, 0, 255, 224, 199, 9, 255, 45, 45, 97, 253, 33, 35, 102, 202, 34, 34, 103, 52, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 217, 0, 116, 234, 205, 0, 255, 234, 205, 0, 255, 238, 208, 0, 255, 245, 215, 1, 255, 255, 233, 14, 255, 255, 235, 13, 255, 255, 227, 4, 255, 255, 224, 0, 255, 255, 224, 0, 255, 255, 223, 0, 255, 255, 224, 0, 255, 255, 224, 0, 255, 255, 224, 0, 255, 255, 223, 0, 255, 161, 138, 20, 255, 25, 19, 79, 255, 124, 99, 32, 255, 255, 223, 0, 255, 255, 224, 0, 255, 255, 224, 0, 255, 255, 224, 0, 255, 255, 223, 0, 255, 255, 224, 0, 255, 255, 224, 0, 255, 255, 228, 5, 255, 255, 243, 21, 255, 255, 254, 33, 255, 255, 225, 6, 255, 244, 214, 0, 255, 241, 211, 0, 255, 241, 212, 0, 255, 132, 119, 56, 255, 33, 35, 103, 236, 34, 36, 103, 121, 32, 32, 112, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 223, 0, 9, 238, 208, 0, 227, 233, 204, 0, 255, 235, 205, 0, 255, 241, 211, 0, 255, 253, 221, 7, 255, 255, 237, 17, 255, 255, 230, 8, 255, 255, 223, 1, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 222, 0, 255, 216, 187, 8, 255, 25, 14, 71, 255, 153, 125, 25, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 222, 0, 255, 255, 223, 2, 255, 255, 233, 12, 255, 255, 253, 33, 255, 255, 240, 22, 255, 248, 217, 1, 255, 242, 211, 0, 255, 241, 210, 0, 255, 221, 193, 11, 255, 41, 42, 99, 252, 33, 35, 103, 196, 35, 35, 105, 51, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 215, 0, 116, 235, 203, 0, 255, 235, 203, 0, 255, 238, 207, 0, 255, 246, 213, 2, 255, 255, 232, 15, 255, 255, 234, 14, 255, 255, 225, 4, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 25, 14, 72, 255, 197, 167, 14, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 221, 0, 255, 255, 226, 5, 255, 255, 243, 22, 255, 255, 254, 35, 255, 255, 223, 7, 255, 245, 212, 0, 255, 242, 209, 0, 255, 242, 209, 0, 255, 132, 118, 56, 255, 33, 35, 103, 235, 34, 36, 104, 120, 32, 32, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 219, 0, 14, 237, 204, 0, 241, 235, 201, 0, 255, 237, 204, 0, 255, 242, 209, 0, 255, 255, 221, 10, 255, 255, 235, 18, 255, 255, 228, 8, 255, 255, 220, 1, 255, 255, 219, 0, 255, 255, 220, 0, 255, 255, 220, 0, 255, 255, 219, 0, 255, 255, 220, 0, 255, 255, 220, 0, 255, 255, 220, 0, 255, 255, 219, 0, 255, 255, 220, 0, 255, 137, 110, 31, 255, 226, 193, 7, 255, 255, 219, 0, 255, 255, 220, 0, 255, 255, 220, 0, 255, 255, 220, 0, 255, 255, 219, 0, 255, 255, 220, 0, 255, 255, 220, 0, 255, 255, 219, 0, 255, 255, 220, 2, 255, 255, 231, 11, 255, 255, 251, 34, 255, 255, 242, 27, 255, 250, 216, 2, 255, 244, 210, 0, 255, 242, 207, 0, 255, 232, 200, 6, 255, 45, 45, 97, 252, 33, 34, 103, 193, 33, 33, 103, 47, 0, 0, 255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 211, 0, 130, 234, 200, 0, 255, 235, 201, 0, 255, 240, 205, 0, 255, 248, 213, 3, 255, 255, 233, 18, 255, 255, 231, 14, 255, 255, 221, 4, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 219, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 219, 0, 255, 255, 219, 0, 255, 255, 219, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 219, 0, 255, 255, 218, 0, 255, 255, 218, 0, 255, 255, 222, 5, 255, 255, 239, 22, 255, 255, 255, 39, 255, 255, 225, 12, 255, 246, 211, 0, 255, 242, 207, 0, 255, 241, 206, 0, 255, 143, 126, 50, 255, 33, 35, 104, 234, 34, 36, 103, 121, 32, 32, 112, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 216, 0, 14, 235, 200, 0, 241, 233, 197, 0, 255, 236, 200, 0, 255, 243, 207, 0, 255, 255, 223, 13, 255, 255, 233, 19, 255, 255, 224, 7, 255, 255, 218, 1, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 216, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 216, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 217, 0, 255, 255, 218, 1, 255, 255, 227, 10, 255, 255, 248, 33, 255, 255, 246, 33, 255, 251, 214, 3, 255, 243, 206, 0, 255, 240, 203, 0, 255, 231, 197, 6, 255, 45, 45, 97, 253, 33, 36, 103, 201, 34, 34, 106, 53, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 209, 0, 116, 232, 195, 0, 255, 233, 197, 0, 255, 238, 202, 0, 255, 247, 209, 3, 255, 255, 229, 17, 255, 255, 227, 12, 255, 255, 219, 3, 255, 255, 215, 0, 255, 255, 215, 0, 255, 255, 216, 0, 255, 255, 215, 0, 255, 255, 215, 0, 255, 255, 216, 0, 255, 255, 216, 0, 255, 255, 215, 0, 255, 255, 215, 0, 255, 137, 112, 15, 255, 17, 7, 25, 255, 8, 1, 17, 255, 12, 3, 24, 255, 106, 85, 26, 255, 255, 215, 0, 255, 255, 215, 0, 255, 255, 216, 0, 255, 255, 216, 0, 255, 255, 215, 0, 255, 255, 215, 0, 255, 255, 216, 0, 255, 255, 215, 0, 255, 255, 215, 0, 255, 255, 219, 4, 255, 255, 234, 18, 255, 255, 249, 36, 255, 255, 221, 11, 255, 245, 207, 0, 255, 240, 203, 0, 255, 239, 202, 0, 255, 132, 115, 56, 255, 33, 35, 103, 238, 34, 36, 103, 129, 28, 43, 99, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 255, 215, 0, 5, 236, 198, 0, 227, 232, 194, 0, 255, 234, 196, 0, 255, 240, 202, 0, 255, 255, 215, 9, 255, 255, 228, 16, 255, 255, 220, 6, 255, 255, 216, 1, 255, 255, 215, 0, 255, 255, 214, 0, 255, 255, 214, 0, 255, 255, 214, 0, 255, 255, 214, 0, 255, 255, 214, 0, 255, 255, 214, 0, 255, 255, 215, 0, 255, 154, 128, 11, 255, 6, 3, 10, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 50, 28, 61, 255, 148, 121, 17, 255, 255, 215, 0, 255, 255, 214, 0, 255, 255, 214, 0, 255, 255, 214, 0, 255, 255, 214, 0, 255, 255, 214, 0, 255, 255, 214, 0, 255, 255, 215, 0, 255, 255, 216, 1, 255, 255, 222, 8, 255, 255, 241, 28, 255, 255, 234, 25, 255, 248, 208, 1, 255, 241, 202, 0, 255, 239, 201, 0, 255, 220, 185, 11, 255, 37, 39, 101, 253, 33, 35, 104, 202, 34, 34, 103, 52, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 248, 208, 0, 93, 232, 194, 0, 255, 232, 194, 0, 255, 237, 198, 0, 255, 244, 204, 1, 255, 255, 222, 13, 255, 255, 223, 11, 255, 255, 216, 3, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 212, 0, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 213, 0, 255, 71, 52, 25, 255, 0, 0, 0, 255, 0, 0, 1, 255, 20, 3, 46, 255, 22, 3, 50, 255, 27, 7, 55, 255, 59, 40, 57, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 212, 0, 255, 255, 213, 0, 255, 255, 213, 0, 255, 255, 216, 3, 255, 255, 230, 18, 255, 255, 241, 30, 255, 254, 213, 6, 255, 243, 203, 0, 255, 240, 200, 0, 255, 240, 200, 0, 255, 113, 99, 65, 255, 33, 35, 103, 236, 34, 36, 104, 120, 34, 34, 102, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 238, 198, 0, 209, 231, 191, 0, 255, 233, 194, 0, 255, 239, 199, 0, 255, 250, 208, 6, 255, 255, 224, 14, 255, 255, 218, 6, 255, 255, 213, 1, 255, 255, 211, 0, 255, 255, 212, 0, 255, 255, 211, 0, 255, 255, 211, 0, 255, 255, 211, 0, 255, 255, 212, 0, 255, 255, 212, 0, 255, 255, 211, 0, 255, 255, 211, 0, 255, 38, 25, 19, 255, 0, 0, 0, 255, 19, 3, 44, 255, 25, 4, 57, 255, 29, 10, 60, 255, 27, 7, 57, 255, 74, 54, 104, 255, 255, 211, 0, 255, 255, 211, 0, 255, 255, 212, 0, 255, 255, 212, 0, 255, 255, 211, 0, 255, 255, 211, 0, 255, 255, 211, 0, 255, 255, 212, 0, 255, 255, 211, 0, 255, 255, 213, 1, 255, 255, 220, 9, 255, 255, 237, 27, 255, 255, 224, 18, 255, 246, 205, 1, 255, 240, 200, 0, 255, 239, 197, 0, 255, 206, 172, 19, 255, 33, 35, 103, 252, 33, 35, 104, 192, 36, 36, 101, 43, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 251, 207, 0, 51, 231, 191, 0, 255, 230, 189, 0, 255, 234, 193, 0, 255, 241, 198, 0, 255, 255, 213, 8, 255, 255, 218, 9, 255, 255, 212, 2, 255, 255, 211, 0, 255, 255, 210, 0, 255, 255, 210, 0, 255, 255, 211, 0, 255, 255, 211, 0, 255, 255, 210, 0, 255, 255, 210, 0, 255, 255, 210, 0, 255, 255, 210, 0, 255, 255, 210, 0, 255, 15, 8, 17, 255, 0, 0, 0, 255, 16, 2, 37, 255, 26, 7, 56, 255, 192, 171, 224, 255, 83, 63, 115, 255, 124, 107, 146, 255, 255, 210, 0, 255, 255, 210, 0, 255, 255, 210, 0, 255, 255, 210, 0, 255, 255, 210, 0, 255, 255, 211, 0, 255, 255, 211, 0, 255, 255, 210, 0, 255, 255, 210, 0, 255, 255, 211, 0, 255, 255, 213, 3, 255, 255, 224, 14, 255, 255, 227, 21, 255, 249, 205, 3, 255, 241, 198, 0, 255, 238, 196, 0, 255, 239, 197, 0, 255, 77, 70, 82, 255, 33, 35, 104, 231, 34, 36, 104, 105, 43, 43, 106, 12, 0, 0, 0, 0, + 0, 0, 0, 0, 245, 202, 0, 121, 229, 187, 0, 255, 229, 187, 0, 255, 233, 191, 0, 255, 240, 198, 1, 255, 254, 209, 4, 255, 255, 211, 3, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 211, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 161, 131, 17, 255, 26, 8, 52, 255, 7, 1, 16, 255, 26, 6, 56, 255, 77, 56, 108, 255, 255, 243, 255, 255, 136, 115, 73, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 211, 2, 255, 255, 210, 2, 255, 255, 210, 2, 255, 255, 211, 2, 255, 255, 213, 5, 255, 255, 216, 10, 255, 248, 205, 4, 255, 240, 197, 0, 255, 236, 193, 0, 255, 236, 194, 0, 255, 135, 115, 54, 255, 33, 35, 103, 249, 33, 35, 103, 180, 31, 39, 100, 33, 0, 0, 0, 0, + 0, 0, 0, 0, 238, 196, 0, 181, 226, 184, 0, 255, 226, 184, 0, 255, 229, 187, 0, 255, 234, 191, 0, 255, 245, 200, 1, 255, 249, 203, 1, 255, 249, 203, 1, 255, 249, 203, 1, 255, 249, 203, 1, 255, 248, 204, 1, 255, 248, 204, 1, 255, 248, 203, 1, 255, 248, 203, 1, 255, 248, 203, 1, 255, 248, 204, 1, 255, 248, 203, 1, 255, 248, 203, 1, 255, 248, 203, 1, 255, 192, 157, 13, 255, 52, 37, 65, 255, 76, 59, 99, 255, 119, 105, 137, 255, 147, 123, 54, 255, 248, 203, 1, 255, 248, 203, 1, 255, 248, 203, 1, 255, 248, 204, 1, 255, 248, 203, 1, 255, 248, 203, 1, 255, 248, 203, 1, 255, 248, 204, 1, 255, 248, 204, 1, 255, 249, 203, 1, 255, 249, 203, 1, 255, 249, 204, 1, 255, 250, 204, 1, 255, 247, 202, 2, 255, 239, 195, 1, 255, 236, 192, 0, 255, 233, 190, 0, 255, 233, 190, 0, 255, 182, 151, 30, 255, 33, 35, 103, 255, 33, 35, 102, 224, 35, 35, 105, 73, 43, 43, 128, 6, + 0, 0, 0, 0, 239, 194, 0, 158, 223, 181, 0, 255, 220, 179, 0, 255, 222, 180, 0, 255, 224, 183, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 226, 184, 0, 255, 227, 184, 0, 255, 227, 185, 0, 255, 228, 186, 0, 255, 228, 186, 0, 255, 227, 185, 0, 255, 227, 184, 0, 255, 229, 186, 0, 255, 163, 135, 39, 255, 33, 35, 103, 255, 33, 35, 103, 238, 34, 36, 103, 121, 34, 34, 102, 15, + 0, 0, 0, 0, 248, 200, 0, 70, 220, 178, 0, 255, 215, 174, 0, 255, 213, 173, 0, 255, 213, 173, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 213, 172, 0, 255, 214, 173, 0, 255, 215, 174, 0, 255, 216, 176, 0, 255, 218, 177, 0, 255, 221, 179, 0, 255, 226, 183, 0, 255, 92, 81, 75, 255, 33, 35, 103, 255, 33, 35, 103, 246, 32, 36, 104, 157, 33, 33, 100, 23, + 0, 0, 0, 0, 0, 0, 0, 0, 238, 191, 0, 134, 214, 173, 0, 255, 209, 168, 0, 255, 206, 166, 0, 255, 204, 165, 0, 255, 203, 163, 0, 255, 203, 163, 0, 255, 203, 164, 0, 255, 203, 163, 0, 255, 203, 164, 0, 255, 203, 163, 0, 255, 203, 163, 0, 255, 203, 163, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 164, 0, 255, 203, 163, 0, 255, 203, 163, 0, 255, 203, 163, 0, 255, 203, 164, 0, 255, 203, 163, 0, 255, 203, 164, 0, 255, 203, 163, 0, 255, 204, 164, 0, 255, 206, 166, 0, 255, 209, 168, 0, 255, 213, 171, 0, 255, 218, 176, 0, 255, 142, 118, 49, 255, 33, 35, 103, 255, 33, 35, 103, 255, 33, 35, 103, 243, 32, 36, 104, 142, 38, 38, 102, 20, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 183, 8, 80, 194, 157, 19, 188, 157, 129, 37, 240, 149, 123, 41, 255, 148, 121, 41, 255, 148, 121, 41, 255, 148, 122, 41, 255, 148, 122, 41, 255, 148, 122, 41, 255, 148, 122, 41, 255, 148, 121, 41, 255, 148, 121, 41, 255, 148, 121, 41, 255, 148, 122, 41, 255, 148, 122, 41, 255, 148, 121, 41, 255, 148, 121, 41, 255, 148, 121, 41, 255, 148, 121, 41, 255, 148, 122, 41, 255, 148, 122, 41, 255, 148, 121, 41, 255, 148, 121, 41, 255, 148, 121, 41, 255, 148, 122, 41, 255, 148, 122, 41, 255, 148, 121, 41, 255, 148, 121, 41, 255, 148, 121, 41, 255, 148, 122, 41, 255, 148, 122, 41, 255, 148, 122, 41, 255, 148, 122, 41, 255, 148, 121, 41, 255, 148, 122, 41, 255, 149, 123, 41, 255, 150, 124, 41, 255, 152, 126, 41, 255, 95, 82, 73, 255, 33, 35, 103, 255, 33, 35, 103, 255, 33, 35, 103, 255, 33, 35, 103, 217, 32, 35, 103, 87, 28, 28, 113, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 39, 98, 26, 33, 35, 103, 131, 33, 35, 103, 217, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 242, 33, 35, 103, 217, 33, 35, 103, 131, 29, 39, 98, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 39, 108, 26, 35, 35, 104, 88, 34, 35, 102, 137, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 33, 35, 102, 147, 34, 35, 102, 137, 35, 35, 104, 88, 29, 39, 108, 26, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 113, 9, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 40, 40, 107, 19, 28, 28, 113, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DeviceSound(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 66, 49, 49, 49, 134, 49, 49, 49, 197, 49, 49, 49, 199, 49, 49, 49, 200, 49, 49, 49, 200, 45, 45, 45, 144, 43, 43, 43, 96, 0, 0, 0, 13, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 17, 50, 50, 50, 131, 51, 51, 51, 240, 53, 53, 53, 255, 57, 57, 57, 255, 61, 61, 61, 255, 65, 65, 65, 255, 69, 69, 69, 255, 69, 69, 69, 255, 65, 65, 65, 255, 55, 55, 55, 255, 50, 50, 50, 244, 43, 43, 43, 151, 0, 0, 0, 22, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 115, 51, 51, 51, 240, 53, 53, 53, 255, 56, 56, 56, 255, 61, 61, 61, 255, 64, 64, 64, 255, 68, 68, 68, 255, 71, 71, 71, 255, 76, 76, 76, 255, 81, 81, 81, 255, 84, 84, 84, 255, 89, 89, 89, 255, 82, 82, 82, 255, 59, 59, 59, 255, 47, 47, 47, 224, 29, 29, 29, 85, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 99, 33, 48, 48, 96, 68, 46, 46, 92, 71, 0, 0, 0, 9, 0, 0, 0, 3, 0, 0, 0, 0, 48, 48, 48, 17, 50, 50, 50, 194, 51, 51, 51, 255, 53, 53, 53, 255, 55, 55, 55, 255, 57, 57, 57, 255, 63, 63, 63, 255, 67, 67, 67, 255, 72, 72, 72, 255, 73, 73, 73, 255, 77, 77, 77, 255, 78, 78, 78, 255, 84, 84, 84, 255, 91, 91, 91, 255, 96, 96, 96, 255, 98, 98, 98, 255, 77, 77, 77, 255, 49, 49, 49, 247, 24, 24, 24, 100, 0, 0, 0, 19, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 98, 50, 50, 50, 100, 194, 51, 51, 102, 255, 51, 51, 102, 255, 51, 51, 102, 255, 50, 50, 100, 243, 46, 46, 92, 177, 41, 41, 74, 100, 50, 50, 50, 212, 51, 51, 51, 255, 51, 51, 51, 255, 54, 54, 54, 255, 61, 61, 61, 255, 66, 66, 66, 255, 70, 70, 70, 255, 74, 74, 74, 255, 77, 77, 77, 255, 82, 82, 82, 255, 84, 84, 84, 255, 88, 88, 88, 255, 87, 87, 87, 255, 88, 88, 88, 255, 96, 96, 96, 255, 102, 102, 102, 255, 103, 103, 103, 255, 90, 90, 90, 255, 49, 49, 49, 247, 23, 23, 23, 105, 0, 0, 0, 19, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 100, 98, 51, 51, 102, 255, 82, 82, 120, 255, 135, 135, 151, 255, 167, 167, 167, 255, 153, 153, 156, 255, 115, 115, 134, 255, 77, 77, 112, 255, 51, 51, 61, 255, 51, 51, 51, 255, 51, 51, 51, 255, 55, 55, 55, 255, 64, 64, 64, 255, 66, 66, 66, 255, 70, 70, 70, 255, 74, 74, 74, 255, 77, 77, 77, 255, 82, 82, 82, 255, 84, 84, 84, 255, 89, 89, 89, 255, 92, 92, 92, 255, 96, 96, 96, 255, 96, 96, 96, 255, 94, 94, 94, 255, 101, 101, 101, 255, 114, 114, 114, 255, 118, 118, 118, 255, 89, 89, 89, 255, 46, 46, 46, 232, 0, 0, 0, 64, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 100, 98, 51, 51, 102, 255, 105, 105, 137, 255, 191, 191, 191, 255, 185, 185, 185, 255, 177, 177, 177, 255, 173, 173, 173, 255, 172, 172, 172, 255, 71, 71, 71, 255, 51, 51, 51, 255, 51, 51, 51, 255, 56, 56, 56, 255, 64, 64, 64, 255, 66, 66, 66, 255, 70, 70, 70, 255, 74, 74, 74, 255, 77, 77, 77, 255, 82, 82, 82, 255, 84, 84, 84, 255, 89, 89, 89, 255, 92, 92, 92, 255, 96, 96, 96, 255, 98, 98, 98, 255, 102, 102, 102, 255, 102, 102, 102, 255, 100, 100, 100, 255, 115, 115, 115, 255, 128, 128, 128, 255, 134, 134, 134, 255, 75, 75, 75, 255, 35, 35, 35, 188, 0, 0, 0, 45, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 99, 33, 51, 51, 102, 240, 112, 112, 144, 255, 210, 210, 210, 255, 203, 203, 203, 255, 197, 197, 197, 255, 194, 194, 194, 255, 191, 191, 191, 255, 108, 108, 108, 255, 51, 51, 51, 255, 51, 51, 51, 255, 57, 57, 57, 255, 64, 64, 64, 255, 66, 66, 66, 255, 70, 70, 70, 255, 71, 71, 71, 255, 71, 71, 71, 255, 74, 74, 74, 255, 80, 80, 80, 255, 89, 89, 89, 255, 92, 92, 92, 255, 96, 96, 96, 255, 98, 98, 98, 255, 102, 102, 102, 255, 103, 103, 103, 255, 114, 114, 114, 255, 111, 111, 111, 255, 109, 109, 109, 255, 134, 134, 134, 255, 145, 145, 145, 255, 124, 124, 124, 255, 49, 49, 49, 249, 8, 8, 8, 102, 0, 0, 0, 24, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 100, 163, 74, 74, 119, 255, 217, 217, 220, 255, 221, 221, 221, 255, 214, 214, 214, 255, 214, 214, 214, 255, 208, 208, 208, 255, 163, 163, 163, 255, 51, 51, 51, 255, 51, 51, 51, 255, 56, 56, 56, 255, 64, 64, 64, 255, 66, 66, 66, 255, 63, 63, 63, 255, 53, 53, 53, 255, 57, 57, 57, 255, 76, 76, 76, 255, 70, 70, 70, 255, 56, 56, 56, 255, 61, 61, 61, 255, 88, 88, 88, 255, 98, 98, 98, 255, 102, 102, 102, 255, 103, 103, 103, 255, 114, 114, 114, 255, 118, 118, 118, 255, 128, 128, 128, 255, 113, 113, 113, 255, 133, 133, 133, 255, 149, 149, 149, 255, 159, 159, 159, 255, 78, 78, 78, 255, 30, 30, 30, 188, 0, 0, 0, 53, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 49, 49, 99, 33, 51, 51, 102, 255, 174, 174, 193, 255, 239, 239, 239, 255, 235, 235, 235, 255, 234, 234, 234, 255, 227, 227, 227, 255, 221, 221, 221, 255, 82, 82, 82, 255, 51, 51, 51, 255, 54, 54, 54, 255, 64, 64, 64, 255, 65, 65, 65, 255, 57, 57, 57, 255, 66, 66, 66, 255, 127, 127, 127, 255, 159, 159, 159, 255, 150, 150, 150, 255, 134, 134, 134, 255, 121, 121, 121, 255, 78, 78, 78, 255, 54, 54, 54, 255, 92, 92, 92, 255, 103, 103, 103, 255, 114, 114, 114, 255, 118, 118, 118, 255, 128, 128, 128, 255, 134, 134, 134, 255, 133, 133, 133, 255, 123, 123, 123, 255, 159, 159, 159, 255, 163, 163, 163, 255, 128, 128, 128, 255, 44, 44, 44, 238, 0, 0, 0, 88, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 49, 49, 98, 116, 75, 75, 120, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 253, 253, 255, 245, 245, 245, 255, 238, 238, 238, 255, 166, 166, 166, 255, 51, 51, 51, 255, 52, 52, 52, 255, 63, 63, 63, 255, 66, 66, 66, 255, 55, 55, 55, 255, 78, 78, 78, 255, 186, 186, 186, 255, 182, 182, 182, 255, 173, 173, 173, 255, 156, 156, 156, 255, 146, 146, 146, 255, 126, 126, 126, 255, 110, 110, 110, 255, 83, 83, 83, 255, 54, 54, 54, 255, 110, 110, 110, 255, 118, 118, 118, 255, 128, 128, 128, 255, 134, 134, 134, 255, 145, 145, 145, 255, 147, 147, 147, 255, 119, 119, 119, 255, 158, 158, 158, 255, 174, 174, 174, 255, 173, 173, 173, 255, 51, 51, 51, 255, 6, 6, 6, 129, 0, 0, 0, 37, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 50, 99, 196, 126, 126, 162, 255, 231, 231, 243, 255, 239, 239, 247, 255, 249, 249, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 89, 89, 89, 255, 51, 51, 51, 255, 58, 58, 58, 255, 66, 66, 66, 255, 59, 59, 59, 255, 78, 78, 78, 255, 198, 198, 198, 255, 202, 202, 202, 255, 196, 196, 196, 255, 173, 173, 173, 255, 166, 166, 166, 255, 150, 150, 150, 255, 126, 126, 126, 255, 114, 114, 114, 255, 102, 102, 102, 255, 65, 65, 68, 255, 85, 85, 85, 255, 128, 128, 128, 255, 134, 134, 134, 255, 145, 145, 145, 255, 149, 149, 149, 255, 159, 159, 159, 255, 132, 132, 132, 255, 156, 156, 156, 255, 180, 180, 180, 255, 189, 189, 189, 255, 86, 86, 86, 255, 19, 19, 19, 171, 0, 0, 0, 54, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 51, 51, 102, 255, 142, 142, 179, 255, 206, 206, 230, 255, 213, 213, 234, 255, 221, 221, 238, 255, 232, 232, 244, 255, 205, 205, 211, 255, 51, 51, 51, 255, 53, 53, 53, 255, 66, 66, 66, 255, 66, 66, 66, 255, 60, 60, 60, 255, 179, 179, 179, 255, 221, 221, 221, 255, 211, 211, 211, 255, 197, 197, 197, 255, 173, 173, 173, 255, 167, 167, 167, 255, 150, 150, 150, 255, 126, 126, 126, 255, 114, 114, 114, 255, 102, 102, 102, 255, 90, 90, 100, 255, 61, 61, 61, 255, 134, 134, 134, 255, 145, 145, 145, 255, 149, 149, 149, 255, 159, 159, 159, 255, 163, 163, 163, 255, 149, 149, 149, 255, 156, 156, 156, 255, 189, 189, 189, 255, 195, 195, 195, 255, 118, 118, 118, 255, 32, 32, 32, 206, 0, 0, 0, 73, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 51, 51, 102, 255, 142, 142, 186, 255, 181, 181, 218, 255, 188, 188, 222, 255, 196, 196, 225, 255, 207, 207, 231, 255, 123, 123, 131, 255, 52, 52, 52, 255, 60, 60, 60, 255, 70, 70, 70, 255, 59, 59, 59, 255, 117, 117, 117, 255, 197, 197, 197, 255, 202, 202, 202, 255, 199, 199, 199, 255, 191, 191, 191, 255, 173, 173, 173, 255, 164, 164, 164, 255, 149, 149, 149, 255, 126, 126, 126, 255, 113, 113, 113, 255, 102, 102, 102, 255, 114, 114, 139, 255, 51, 51, 51, 255, 139, 139, 139, 255, 149, 149, 149, 255, 159, 159, 159, 255, 163, 163, 163, 255, 174, 174, 174, 255, 153, 153, 153, 255, 149, 149, 149, 255, 195, 195, 195, 255, 204, 204, 204, 255, 128, 128, 128, 255, 31, 31, 31, 210, 0, 0, 0, 89, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 51, 51, 102, 255, 128, 128, 179, 255, 155, 155, 205, 255, 163, 163, 209, 255, 171, 171, 213, 255, 181, 181, 218, 255, 77, 77, 83, 255, 56, 56, 56, 255, 65, 65, 65, 255, 73, 73, 73, 255, 51, 51, 51, 255, 158, 158, 158, 255, 179, 179, 179, 255, 185, 185, 185, 255, 184, 184, 184, 255, 175, 175, 175, 255, 173, 173, 173, 255, 153, 153, 153, 255, 141, 141, 141, 255, 126, 126, 126, 255, 107, 107, 107, 255, 103, 103, 104, 255, 116, 116, 144, 255, 69, 69, 79, 255, 125, 125, 125, 255, 159, 159, 159, 255, 163, 163, 163, 255, 174, 174, 174, 255, 180, 180, 180, 255, 175, 175, 175, 255, 151, 151, 151, 255, 204, 204, 204, 255, 204, 204, 204, 255, 128, 128, 128, 255, 31, 31, 31, 211, 0, 0, 0, 95, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 51, 51, 102, 255, 115, 115, 161, 255, 148, 148, 195, 255, 152, 152, 202, 255, 153, 153, 204, 255, 148, 148, 195, 255, 51, 51, 51, 255, 58, 58, 58, 255, 73, 73, 73, 255, 69, 69, 69, 255, 70, 70, 70, 255, 159, 159, 159, 255, 172, 172, 172, 255, 173, 173, 173, 255, 173, 173, 173, 255, 170, 170, 170, 255, 156, 156, 156, 255, 149, 149, 149, 255, 128, 128, 128, 255, 120, 120, 120, 255, 102, 102, 102, 255, 106, 106, 114, 255, 119, 119, 154, 255, 69, 69, 79, 255, 133, 133, 133, 255, 163, 163, 163, 255, 174, 174, 174, 255, 180, 180, 180, 255, 189, 189, 189, 255, 170, 170, 170, 255, 153, 153, 153, 255, 204, 204, 204, 255, 204, 204, 204, 255, 128, 128, 128, 255, 34, 34, 34, 217, 0, 0, 0, 97, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 49, 49, 98, 215, 88, 88, 131, 255, 138, 138, 174, 255, 140, 140, 179, 255, 145, 145, 188, 255, 124, 124, 160, 255, 55, 55, 55, 255, 63, 63, 63, 255, 77, 77, 77, 255, 66, 66, 66, 255, 90, 90, 90, 255, 149, 149, 149, 255, 150, 150, 150, 255, 156, 156, 156, 255, 154, 154, 154, 255, 150, 150, 150, 255, 146, 146, 146, 255, 131, 131, 131, 255, 125, 125, 125, 255, 105, 105, 105, 255, 102, 102, 102, 255, 112, 112, 133, 255, 122, 122, 163, 255, 64, 64, 72, 255, 136, 136, 136, 255, 174, 174, 174, 255, 180, 180, 180, 255, 189, 189, 189, 255, 195, 195, 195, 255, 171, 171, 171, 255, 168, 168, 168, 255, 204, 204, 204, 255, 204, 204, 204, 255, 128, 128, 128, 255, 31, 31, 31, 212, 0, 0, 0, 98, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 45, 45, 90, 146, 56, 56, 105, 255, 122, 122, 148, 255, 130, 130, 156, 255, 133, 133, 164, 255, 94, 94, 112, 255, 57, 57, 57, 255, 67, 67, 67, 255, 82, 82, 82, 255, 67, 67, 67, 255, 89, 89, 89, 255, 128, 128, 128, 255, 135, 135, 135, 255, 138, 138, 138, 255, 138, 138, 138, 255, 131, 131, 131, 255, 126, 126, 126, 255, 123, 123, 123, 255, 107, 107, 107, 255, 102, 102, 102, 255, 108, 108, 119, 255, 120, 120, 156, 255, 123, 123, 165, 255, 51, 51, 51, 255, 174, 174, 174, 255, 180, 180, 180, 255, 189, 189, 189, 255, 195, 195, 195, 255, 204, 204, 204, 255, 165, 165, 165, 255, 173, 173, 173, 255, 204, 204, 204, 255, 204, 204, 204, 255, 128, 128, 128, 255, 31, 31, 31, 212, 0, 0, 0, 97, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 22, 22, 44, 37, 50, 50, 100, 245, 75, 75, 112, 255, 117, 117, 133, 255, 122, 122, 142, 255, 89, 89, 100, 255, 61, 61, 61, 255, 72, 72, 72, 255, 84, 84, 84, 255, 70, 70, 70, 255, 81, 81, 81, 255, 117, 117, 117, 255, 123, 123, 123, 255, 126, 126, 126, 255, 126, 126, 126, 255, 120, 120, 120, 255, 113, 113, 113, 255, 104, 104, 104, 255, 102, 102, 102, 255, 106, 106, 116, 255, 118, 118, 152, 255, 122, 122, 163, 255, 103, 103, 138, 255, 74, 74, 74, 255, 180, 180, 180, 255, 189, 189, 189, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 154, 154, 154, 255, 189, 189, 189, 255, 204, 204, 204, 255, 204, 204, 204, 255, 99, 99, 99, 255, 24, 24, 24, 200, 0, 0, 0, 92, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, 32, 32, 63, 103, 49, 49, 99, 247, 59, 59, 105, 255, 87, 87, 117, 255, 75, 75, 86, 255, 64, 64, 64, 255, 74, 74, 74, 255, 89, 89, 89, 255, 70, 70, 70, 255, 77, 77, 77, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 102, 102, 102, 255, 103, 103, 106, 255, 110, 110, 127, 255, 118, 118, 152, 255, 122, 122, 163, 255, 126, 126, 175, 255, 72, 72, 87, 255, 126, 126, 126, 255, 189, 189, 189, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 197, 197, 197, 255, 147, 147, 147, 255, 200, 200, 200, 255, 204, 204, 204, 255, 204, 204, 204, 255, 70, 70, 70, 255, 18, 18, 18, 185, 0, 0, 0, 83, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 18, 18, 18, 35, 93, 39, 39, 78, 209, 49, 49, 98, 250, 51, 51, 77, 255, 64, 64, 64, 255, 76, 76, 76, 255, 92, 92, 92, 255, 82, 82, 82, 255, 62, 62, 66, 255, 109, 109, 123, 255, 107, 107, 118, 255, 107, 107, 118, 255, 107, 107, 118, 255, 107, 107, 118, 255, 111, 111, 129, 255, 116, 116, 146, 255, 121, 121, 159, 255, 122, 122, 163, 255, 128, 128, 179, 255, 113, 113, 158, 255, 60, 60, 60, 255, 180, 180, 180, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 179, 179, 179, 255, 165, 165, 165, 255, 204, 204, 204, 255, 204, 204, 204, 255, 185, 185, 185, 255, 51, 51, 51, 255, 0, 0, 0, 154, 0, 0, 0, 68, 197, 197, 246, 165, 54, 54, 109, 30, 0, 0, 0, 8, 0, 0, 0, 1, 0, 0, 0, 0, 198, 198, 247, 33, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 19, 0, 0, 0, 58, 0, 0, 0, 102, 38, 38, 46, 211, 70, 70, 70, 255, 76, 76, 76, 255, 95, 95, 95, 255, 95, 95, 95, 255, 54, 54, 54, 255, 113, 113, 147, 255, 120, 120, 156, 255, 120, 120, 156, 255, 120, 120, 156, 255, 120, 120, 157, 255, 122, 122, 163, 255, 122, 122, 163, 255, 125, 125, 171, 255, 130, 130, 186, 255, 128, 128, 185, 255, 66, 66, 78, 255, 120, 120, 120, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 155, 155, 155, 255, 185, 185, 185, 255, 204, 204, 204, 255, 204, 204, 204, 255, 147, 147, 147, 255, 38, 38, 38, 234, 0, 0, 0, 139, 109, 109, 136, 90, 191, 191, 249, 255, 82, 82, 164, 159, 0, 0, 0, 41, 0, 0, 0, 7, 0, 0, 0, 0, 202, 202, 253, 209, 157, 157, 229, 227, 34, 34, 68, 48, 0, 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0, 27, 41, 41, 41, 159, 72, 72, 72, 255, 83, 83, 83, 255, 93, 93, 93, 255, 102, 102, 102, 255, 77, 77, 77, 255, 69, 69, 79, 255, 125, 125, 171, 255, 125, 125, 171, 255, 125, 125, 171, 255, 125, 125, 171, 255, 128, 128, 179, 255, 131, 131, 188, 255, 133, 133, 194, 255, 128, 128, 185, 255, 77, 77, 96, 255, 86, 86, 86, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 187, 187, 187, 255, 155, 155, 155, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 89, 89, 89, 255, 24, 24, 24, 206, 0, 0, 0, 113, 161, 161, 201, 122, 172, 172, 239, 255, 59, 59, 118, 166, 0, 0, 0, 77, 0, 0, 0, 17, 0, 0, 0, 0, 204, 204, 255, 255, 128, 128, 217, 255, 0, 0, 0, 100, 0, 0, 0, 35, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 43, 95, 62, 62, 62, 255, 89, 89, 89, 255, 92, 92, 92, 255, 103, 103, 103, 255, 110, 110, 110, 255, 63, 63, 63, 255, 82, 82, 105, 255, 128, 128, 185, 255, 133, 133, 194, 255, 133, 133, 194, 255, 133, 133, 194, 255, 134, 134, 196, 255, 125, 125, 184, 255, 67, 67, 80, 255, 77, 77, 77, 255, 186, 186, 186, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 159, 159, 159, 255, 182, 182, 182, 255, 204, 204, 204, 255, 204, 204, 204, 255, 185, 185, 185, 255, 49, 49, 49, 251, 5, 5, 5, 166, 0, 0, 0, 82, 187, 187, 234, 173, 147, 147, 226, 255, 32, 32, 63, 154, 0, 0, 0, 82, 0, 0, 0, 17, 198, 198, 247, 66, 204, 204, 255, 255, 109, 109, 196, 240, 0, 0, 0, 136, 0, 0, 0, 46, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 36, 36, 45, 54, 54, 54, 255, 99, 99, 99, 255, 89, 89, 89, 255, 113, 113, 113, 255, 118, 118, 118, 255, 123, 123, 123, 255, 72, 72, 72, 255, 61, 61, 69, 255, 87, 87, 114, 255, 110, 110, 157, 255, 100, 100, 141, 255, 80, 80, 105, 255, 51, 51, 51, 255, 120, 120, 120, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 175, 175, 175, 255, 163, 163, 163, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 108, 108, 108, 255, 35, 35, 35, 229, 0, 0, 0, 137, 0, 0, 0, 53, 202, 202, 253, 241, 111, 111, 199, 236, 0, 0, 0, 132, 0, 0, 0, 64, 0, 0, 0, 9, 195, 195, 244, 134, 191, 191, 249, 255, 76, 76, 151, 215, 0, 0, 0, 128, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 49, 49, 49, 230, 93, 93, 93, 255, 98, 98, 98, 255, 107, 107, 107, 255, 128, 128, 128, 255, 134, 134, 134, 255, 145, 145, 145, 255, 125, 125, 125, 255, 106, 106, 106, 255, 80, 80, 80, 255, 98, 98, 98, 255, 126, 126, 126, 255, 172, 172, 172, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 185, 185, 185, 255, 156, 156, 156, 255, 194, 194, 194, 255, 204, 204, 204, 255, 204, 204, 204, 255, 185, 185, 185, 255, 51, 51, 51, 255, 9, 9, 9, 182, 0, 0, 0, 103, 167, 167, 209, 117, 185, 185, 245, 255, 73, 73, 146, 199, 0, 0, 0, 123, 0, 0, 0, 43, 0, 0, 0, 2, 199, 199, 249, 212, 159, 159, 233, 255, 52, 52, 103, 190, 0, 0, 0, 107, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 45, 45, 45, 161, 76, 76, 76, 255, 113, 113, 113, 255, 99, 99, 99, 255, 128, 128, 128, 255, 145, 145, 145, 255, 149, 149, 149, 255, 159, 159, 159, 255, 163, 163, 163, 255, 174, 174, 174, 255, 180, 180, 180, 255, 189, 189, 189, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 191, 191, 191, 255, 156, 156, 156, 255, 185, 185, 185, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 89, 89, 89, 255, 30, 30, 30, 220, 0, 0, 0, 142, 0, 0, 0, 62, 197, 197, 246, 198, 140, 140, 223, 255, 31, 31, 62, 160, 0, 0, 0, 99, 0, 0, 0, 25, 198, 198, 247, 33, 204, 204, 255, 255, 134, 134, 220, 255, 20, 20, 40, 164, 0, 0, 0, 83, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 54, 55, 55, 55, 255, 123, 123, 123, 255, 119, 119, 119, 255, 108, 108, 108, 255, 141, 141, 141, 255, 159, 159, 159, 255, 163, 163, 163, 255, 174, 174, 174, 255, 180, 180, 180, 255, 189, 189, 189, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 184, 184, 184, 255, 153, 153, 153, 255, 185, 185, 185, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 137, 137, 137, 255, 46, 46, 46, 247, 5, 5, 5, 171, 0, 0, 0, 97, 152, 152, 190, 86, 198, 198, 252, 255, 96, 96, 180, 220, 0, 0, 0, 135, 0, 0, 0, 67, 0, 0, 0, 10, 198, 198, 247, 132, 191, 191, 249, 255, 86, 86, 172, 227, 0, 0, 0, 142, 0, 0, 0, 59, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 47, 47, 47, 207, 88, 88, 88, 255, 145, 145, 145, 255, 126, 126, 126, 255, 114, 114, 114, 255, 148, 148, 148, 255, 174, 174, 174, 255, 180, 180, 180, 255, 189, 189, 189, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 197, 197, 197, 255, 166, 166, 166, 255, 156, 156, 156, 255, 191, 191, 191, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 175, 175, 175, 255, 51, 51, 51, 255, 13, 13, 13, 192, 0, 0, 0, 125, 0, 0, 0, 49, 200, 200, 250, 211, 147, 147, 226, 255, 39, 39, 78, 167, 0, 0, 0, 112, 0, 0, 0, 37, 0, 0, 0, 2, 202, 202, 253, 241, 153, 153, 230, 255, 51, 51, 102, 192, 0, 0, 0, 118, 0, 0, 0, 37, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 26, 26, 26, 62, 51, 51, 51, 255, 131, 131, 131, 255, 159, 159, 159, 255, 149, 149, 149, 255, 121, 121, 121, 255, 136, 136, 136, 255, 165, 165, 165, 255, 186, 186, 186, 255, 204, 204, 204, 255, 204, 204, 204, 255, 196, 196, 196, 255, 184, 184, 184, 255, 168, 168, 168, 255, 147, 147, 147, 255, 171, 171, 171, 255, 201, 201, 201, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 175, 175, 175, 255, 61, 61, 61, 255, 23, 23, 23, 211, 0, 0, 0, 143, 0, 0, 0, 70, 184, 184, 230, 124, 185, 185, 245, 255, 88, 88, 176, 221, 0, 0, 0, 139, 0, 0, 0, 74, 0, 0, 0, 14, 200, 200, 250, 98, 204, 204, 255, 255, 106, 106, 201, 247, 0, 0, 0, 152, 0, 0, 0, 82, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 39, 39, 39, 148, 58, 58, 58, 255, 156, 156, 156, 255, 174, 174, 174, 255, 177, 177, 177, 255, 164, 164, 164, 255, 146, 146, 146, 255, 130, 130, 130, 255, 135, 135, 135, 255, 137, 137, 137, 255, 141, 141, 141, 255, 155, 155, 155, 255, 176, 176, 176, 255, 197, 197, 197, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 175, 175, 175, 255, 61, 61, 61, 255, 23, 23, 23, 211, 0, 0, 0, 149, 0, 0, 0, 84, 140, 140, 175, 70, 204, 204, 255, 255, 119, 119, 209, 245, 21, 21, 42, 157, 0, 0, 0, 110, 0, 0, 0, 37, 163, 163, 204, 20, 203, 203, 254, 240, 159, 159, 233, 255, 64, 64, 127, 205, 0, 0, 0, 132, 0, 0, 0, 49, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 25, 42, 42, 42, 193, 74, 74, 74, 255, 156, 156, 156, 255, 189, 189, 189, 255, 195, 195, 195, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 137, 137, 137, 255, 51, 51, 51, 255, 23, 23, 23, 211, 0, 0, 0, 149, 0, 0, 0, 86, 74, 74, 93, 44, 203, 203, 254, 240, 147, 147, 226, 255, 54, 54, 108, 181, 0, 0, 0, 130, 0, 0, 0, 62, 0, 0, 0, 11, 199, 199, 249, 131, 198, 198, 252, 255, 102, 102, 194, 239, 10, 10, 20, 161, 0, 0, 0, 94, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 37, 39, 39, 39, 187, 60, 60, 60, 255, 140, 140, 140, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 166, 166, 166, 255, 89, 89, 89, 255, 46, 46, 46, 247, 13, 13, 13, 192, 0, 0, 0, 143, 0, 0, 0, 84, 74, 74, 93, 44, 201, 201, 251, 210, 166, 166, 236, 255, 78, 78, 157, 207, 0, 0, 0, 143, 0, 0, 0, 85, 0, 0, 0, 22, 192, 192, 240, 51, 204, 204, 255, 255, 147, 147, 226, 255, 51, 51, 102, 193, 0, 0, 0, 129, 0, 0, 0, 52, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 40, 24, 24, 24, 137, 47, 47, 47, 242, 70, 70, 70, 255, 147, 147, 147, 255, 185, 185, 185, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 204, 204, 204, 255, 185, 185, 185, 255, 147, 147, 147, 255, 89, 89, 89, 255, 49, 49, 49, 251, 30, 30, 30, 220, 5, 5, 5, 170, 0, 0, 0, 125, 0, 0, 0, 70, 140, 140, 175, 70, 203, 203, 254, 240, 166, 166, 236, 255, 80, 80, 159, 204, 0, 0, 0, 144, 0, 0, 0, 100, 0, 0, 0, 35, 155, 155, 194, 21, 202, 202, 253, 225, 179, 179, 242, 255, 86, 86, 172, 227, 0, 0, 0, 151, 0, 0, 0, 84, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 31, 0, 0, 0, 75, 28, 28, 28, 173, 40, 40, 40, 224, 51, 51, 51, 255, 61, 61, 61, 255, 89, 89, 89, 255, 89, 89, 89, 255, 61, 61, 61, 255, 51, 51, 51, 255, 38, 38, 38, 234, 24, 24, 24, 206, 5, 5, 5, 166, 0, 0, 0, 134, 0, 0, 0, 94, 0, 0, 0, 49, 184, 184, 230, 124, 204, 204, 255, 255, 147, 147, 226, 255, 73, 73, 146, 199, 0, 0, 0, 142, 0, 0, 0, 101, 0, 0, 0, 41, 0, 0, 0, 7, 201, 201, 251, 178, 198, 198, 252, 255, 106, 106, 201, 247, 10, 10, 20, 166, 0, 0, 0, 112, 0, 0, 0, 39, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 16, 0, 0, 0, 44, 0, 0, 0, 80, 0, 0, 0, 113, 11, 11, 11, 152, 19, 19, 19, 176, 18, 18, 18, 179, 10, 10, 10, 167, 0, 0, 0, 149, 0, 0, 0, 137, 0, 0, 0, 113, 0, 0, 0, 82, 0, 0, 0, 52, 172, 172, 215, 114, 202, 202, 252, 226, 185, 185, 245, 255, 119, 119, 209, 245, 47, 47, 94, 173, 0, 0, 0, 140, 0, 0, 0, 97, 0, 0, 0, 40, 0, 0, 0, 7, 200, 200, 250, 162, 204, 204, 255, 255, 121, 121, 214, 255, 28, 28, 56, 176, 0, 0, 0, 130, 0, 0, 0, 57, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 32, 0, 0, 0, 46, 0, 0, 0, 59, 0, 0, 0, 68, 0, 0, 0, 68, 77, 77, 96, 85, 126, 126, 158, 103, 159, 159, 199, 123, 187, 187, 234, 173, 202, 202, 253, 241, 185, 185, 245, 255, 140, 140, 223, 255, 79, 79, 158, 205, 11, 11, 22, 148, 0, 0, 0, 126, 0, 0, 0, 80, 0, 0, 0, 32, 0, 0, 0, 6, 200, 200, 250, 162, 204, 204, 255, 255, 140, 140, 223, 255, 51, 51, 102, 193, 0, 0, 0, 140, 0, 0, 0, 72, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 10, 0, 0, 0, 10, 190, 190, 243, 180, 179, 179, 242, 255, 172, 172, 239, 255, 147, 147, 226, 255, 112, 112, 190, 218, 63, 63, 126, 181, 22, 22, 44, 149, 0, 0, 0, 132, 0, 0, 0, 102, 0, 0, 0, 55, 0, 0, 0, 19, 163, 163, 204, 20, 201, 201, 251, 194, 198, 198, 252, 255, 140, 140, 223, 255, 51, 51, 102, 192, 0, 0, 0, 145, 0, 0, 0, 84, 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 58, 58, 115, 113, 36, 36, 72, 136, 0, 0, 0, 122, 0, 0, 0, 122, 0, 0, 0, 112, 0, 0, 0, 88, 0, 0, 0, 59, 0, 0, 0, 30, 0, 0, 0, 8, 195, 195, 244, 67, 202, 202, 253, 225, 198, 198, 252, 255, 119, 119, 208, 246, 51, 51, 102, 193, 0, 0, 0, 144, 0, 0, 0, 86, 0, 0, 0, 29, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 34, 0, 0, 0, 60, 0, 0, 0, 62, 0, 0, 0, 49, 0, 0, 0, 34, 0, 0, 0, 20, 0, 0, 0, 8, 186, 186, 233, 35, 201, 201, 251, 178, 204, 204, 255, 255, 172, 172, 239, 255, 99, 99, 187, 231, 28, 28, 56, 174, 0, 0, 0, 136, 0, 0, 0, 82, 0, 0, 0, 29, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 7, 0, 0, 0, 2, 192, 192, 240, 17, 197, 197, 246, 83, 198, 198, 248, 180, 204, 204, 255, 255, 191, 191, 249, 255, 132, 132, 215, 246, 65, 65, 130, 200, 0, 0, 0, 150, 0, 0, 0, 118, 0, 0, 0, 67, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 197, 197, 246, 83, 195, 195, 244, 134, 194, 194, 243, 167, 197, 197, 246, 198, 204, 204, 255, 255, 204, 204, 255, 255, 172, 172, 239, 255, 132, 132, 215, 246, 72, 72, 143, 204, 20, 20, 40, 163, 0, 0, 0, 134, 0, 0, 0, 93, 0, 0, 0, 45, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 192, 240, 119, 179, 179, 242, 255, 172, 172, 239, 255, 153, 153, 230, 255, 127, 127, 202, 230, 85, 85, 159, 209, 53, 53, 106, 184, 11, 11, 22, 150, 0, 0, 0, 132, 0, 0, 0, 100, 0, 0, 0, 59, 0, 0, 0, 25, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 58, 0, 0, 0, 105, 0, 0, 0, 125, 0, 0, 0, 128, 0, 0, 0, 122, 0, 0, 0, 106, 0, 0, 0, 81, 0, 0, 0, 52, 0, 0, 0, 27, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 22, 0, 0, 0, 40, 0, 0, 0, 47, 0, 0, 0, 45, 0, 0, 0, 38, 0, 0, 0, 28, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_LogoMessageError(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251, 5, 4, 29, 247, 14, 13, 83, 246, 25, 25, 131, 247, 39, 39, 172, 249, 53, 53, 207, 252, 63, 63, 233, 254, 70, 70, 250, 254, 68, 68, 250, 252, 59, 59, 233, 249, 47, 47, 207, 246, 34, 34, 172, 244, 22, 22, 131, 246, 12, 11, 83, 250, 4, 3, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 2, 1, 6, 247, 11, 10, 82, 246, 27, 27, 154, 251, 49, 49, 222, 255, 69, 69, 255, 255, 81, 81, 255, 255, 91, 91, 255, 255, 99, 99, 255, 255, 104, 104, 255, 255, 104, 104, 255, 255, 102, 102, 255, 255, 96, 96, 255, 255, 87, 87, 255, 255, 77, 77, 255, 255, 67, 67, 255, 255, 56, 56, 255, 245, 38, 38, 226, 229, 20, 20, 164, 222, 8, 7, 90, 166, 1, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 11, 10, 89, 248, 28, 28, 176, 255, 56, 56, 255, 255, 71, 71, 255, 255, 86, 86, 255, 255, 101, 101, 255, 255, 113, 113, 255, 255, 123, 123, 255, 255, 131, 131, 255, 255, 134, 134, 255, 255, 134, 134, 255, 255, 130, 130, 255, 255, 122, 122, 255, 255, 113, 113, 255, 255, 102, 102, 255, 255, 90, 90, 255, 255, 79, 79, 255, 255, 67, 67, 255, 255, 55, 55, 255, 250, 43, 43, 255, 226, 20, 20, 189, 208, 7, 7, 104, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 6, 5, 54, 247, 21, 21, 154, 255, 49, 49, 253, 255, 66, 66, 255, 255, 83, 83, 255, 255, 100, 100, 255, 255, 115, 115, 255, 255, 128, 128, 255, 255, 139, 139, 255, 255, 147, 147, 255, 255, 152, 152, 255, 255, 154, 154, 255, 255, 152, 152, 255, 255, 146, 146, 255, 255, 138, 138, 255, 255, 129, 129, 255, 255, 118, 118, 255, 255, 107, 107, 255, 255, 96, 96, 255, 255, 85, 85, 255, 255, 73, 73, 255, 255, 61, 61, 255, 254, 48, 48, 255, 241, 37, 37, 254, 208, 14, 14, 176, 177, 4, 3, 74, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 10, 9, 93, 249, 30, 30, 203, 255, 54, 54, 255, 255, 72, 72, 255, 255, 90, 90, 255, 255, 107, 107, 255, 255, 122, 122, 255, 255, 135, 135, 255, 255, 145, 145, 255, 255, 153, 153, 255, 255, 158, 158, 255, 255, 160, 160, 255, 255, 159, 159, 255, 255, 156, 156, 255, 255, 150, 150, 255, 255, 143, 143, 255, 255, 134, 134, 255, 255, 125, 125, 255, 255, 115, 115, 255, 255, 106, 106, 255, 255, 96, 96, 255, 255, 85, 85, 255, 255, 74, 74, 255, 255, 63, 63, 255, 254, 50, 50, 255, 240, 39, 39, 255, 213, 20, 20, 221, 177, 5, 5, 125, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 13, 12, 116, 252, 36, 36, 235, 255, 56, 56, 255, 255, 74, 74, 255, 255, 92, 92, 255, 255, 109, 109, 255, 255, 123, 123, 255, 255, 135, 135, 255, 255, 144, 144, 255, 255, 150, 150, 255, 255, 154, 154, 255, 255, 155, 155, 255, 255, 154, 154, 255, 255, 151, 151, 255, 255, 146, 146, 255, 255, 141, 141, 255, 255, 135, 135, 255, 255, 128, 128, 255, 255, 122, 122, 255, 255, 115, 115, 255, 255, 107, 107, 255, 255, 99, 99, 255, 255, 91, 91, 255, 255, 81, 81, 255, 255, 72, 72, 255, 255, 61, 61, 255, 251, 50, 50, 255, 238, 39, 39, 255, 220, 25, 25, 244, 174, 7, 7, 156, 0, 0, 0, 34, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245, 13, 12, 122, 253, 38, 38, 250, 255, 55, 55, 255, 255, 73, 73, 255, 255, 90, 90, 255, 255, 106, 106, 255, 255, 119, 119, 255, 255, 130, 130, 255, 255, 137, 137, 255, 255, 142, 142, 255, 255, 144, 144, 255, 255, 143, 143, 255, 255, 140, 140, 255, 255, 135, 135, 255, 255, 129, 129, 255, 255, 123, 123, 255, 255, 119, 119, 255, 255, 115, 115, 255, 255, 112, 112, 255, 255, 110, 110, 255, 255, 106, 106, 255, 255, 102, 102, 255, 255, 96, 96, 255, 255, 90, 90, 255, 255, 83, 83, 255, 255, 75, 75, 255, 255, 66, 66, 255, 255, 57, 57, 255, 246, 47, 47, 255, 232, 37, 37, 255, 220, 26, 26, 253, 165, 7, 6, 169, 0, 0, 0, 43, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 11, 10, 112, 250, 35, 35, 248, 255, 52, 52, 255, 255, 69, 69, 255, 255, 85, 85, 255, 255, 99, 99, 255, 255, 111, 111, 255, 255, 121, 121, 255, 255, 127, 127, 255, 255, 131, 131, 255, 255, 131, 131, 255, 255, 128, 128, 255, 255, 121, 121, 255, 255, 113, 113, 255, 255, 104, 104, 255, 255, 96, 96, 255, 255, 90, 90, 255, 255, 87, 87, 255, 255, 87, 87, 255, 255, 88, 88, 255, 255, 90, 90, 255, 255, 91, 91, 255, 255, 91, 91, 255, 255, 89, 89, 255, 255, 85, 85, 255, 255, 79, 79, 255, 255, 73, 73, 255, 255, 66, 66, 255, 255, 59, 59, 255, 255, 51, 51, 255, 238, 42, 42, 255, 226, 33, 33, 255, 214, 23, 23, 252, 151, 5, 5, 168, 0, 0, 0, 46, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 8, 7, 86, 245, 29, 29, 230, 255, 47, 47, 255, 255, 63, 63, 255, 255, 77, 77, 255, 255, 90, 90, 255, 255, 101, 101, 255, 255, 110, 110, 255, 255, 115, 115, 255, 255, 118, 118, 255, 255, 116, 116, 255, 255, 111, 111, 255, 255, 102, 102, 255, 255, 91, 91, 255, 255, 80, 80, 255, 255, 69, 69, 255, 255, 61, 61, 255, 255, 56, 56, 255, 255, 55, 55, 255, 255, 56, 56, 255, 255, 59, 59, 255, 255, 64, 64, 255, 255, 70, 70, 255, 255, 74, 74, 255, 255, 76, 76, 255, 255, 76, 76, 255, 255, 73, 73, 255, 255, 69, 69, 255, 255, 63, 63, 255, 255, 57, 57, 255, 255, 51, 51, 255, 245, 45, 45, 255, 231, 37, 37, 255, 219, 29, 29, 255, 198, 18, 18, 247, 125, 3, 3, 154, 0, 0, 0, 46, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 4, 3, 44, 240, 21, 21, 195, 252, 40, 40, 255, 255, 55, 55, 255, 255, 68, 68, 255, 255, 80, 80, 255, 255, 90, 90, 255, 255, 98, 98, 255, 255, 103, 103, 255, 255, 105, 105, 255, 245, 101, 101, 255, 255, 95, 95, 255, 255, 85, 85, 255, 255, 72, 72, 255, 255, 59, 59, 255, 255, 48, 48, 255, 255, 39, 39, 255, 255, 33, 33, 255, 255, 29, 29, 255, 255, 29, 29, 255, 255, 30, 30, 255, 255, 34, 34, 255, 255, 40, 40, 255, 255, 47, 47, 255, 255, 54, 54, 255, 255, 60, 60, 255, 255, 63, 63, 255, 245, 66, 66, 255, 255, 62, 62, 255, 255, 58, 58, 255, 255, 54, 54, 255, 255, 49, 49, 255, 248, 44, 44, 255, 235, 38, 38, 255, 222, 32, 32, 255, 211, 25, 25, 255, 175, 12, 12, 235, 79, 1, 1, 126, 0, 0, 0, 42, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 238, 12, 12, 143, 242, 34, 34, 255, 255, 47, 47, 255, 255, 59, 59, 255, 255, 70, 70, 255, 255, 78, 78, 255, 255, 85, 85, 255, 255, 90, 90, 255, 255, 92, 92, 255, 158, 97, 97, 255, 134, 103, 103, 255, 246, 73, 73, 255, 255, 57, 57, 255, 255, 44, 44, 255, 255, 33, 33, 255, 255, 25, 25, 255, 255, 19, 19, 255, 250, 15, 15, 255, 247, 13, 13, 255, 247, 13, 13, 255, 247, 14, 14, 255, 250, 17, 17, 255, 254, 21, 21, 255, 255, 27, 27, 255, 255, 34, 34, 255, 255, 42, 42, 255, 194, 66, 66, 255, 111, 100, 100, 255, 227, 64, 64, 255, 255, 52, 52, 255, 255, 49, 49, 255, 255, 45, 45, 255, 248, 41, 41, 255, 237, 36, 36, 255, 225, 32, 32, 255, 213, 27, 27, 255, 204, 21, 21, 255, 142, 5, 5, 213, 0, 0, 0, 89, 0, 0, 0, 32, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237, 6, 5, 75, 236, 25, 25, 240, 246, 38, 38, 255, 255, 49, 49, 255, 255, 59, 59, 255, 255, 67, 67, 255, 255, 73, 73, 255, 255, 78, 78, 255, 255, 80, 80, 255, 165, 99, 99, 255, 144, 144, 144, 255, 150, 150, 150, 255, 150, 113, 113, 255, 247, 39, 39, 255, 255, 24, 24, 255, 250, 16, 16, 255, 244, 11, 11, 255, 241, 8, 8, 255, 238, 6, 6, 255, 237, 5, 5, 255, 236, 5, 5, 255, 237, 5, 5, 255, 237, 7, 7, 255, 240, 10, 10, 255, 244, 14, 14, 255, 248, 19, 19, 255, 194, 53, 53, 255, 111, 111, 111, 255, 135, 135, 135, 255, 131, 120, 120, 255, 229, 59, 59, 255, 255, 43, 43, 255, 255, 40, 40, 255, 247, 37, 37, 255, 237, 33, 33, 255, 225, 30, 30, 255, 214, 26, 26, 255, 204, 22, 22, 255, 189, 14, 14, 252, 92, 1, 1, 176, 0, 0, 0, 70, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 231, 13, 13, 162, 235, 30, 30, 255, 247, 40, 40, 255, 255, 49, 49, 255, 255, 56, 56, 255, 255, 62, 62, 255, 255, 66, 66, 255, 255, 69, 69, 255, 169, 100, 100, 255, 160, 160, 160, 255, 217, 217, 217, 255, 219, 219, 219, 255, 171, 171, 171, 255, 156, 115, 115, 255, 235, 18, 18, 255, 239, 7, 7, 255, 236, 4, 4, 255, 233, 3, 3, 255, 232, 2, 2, 255, 231, 1, 1, 255, 231, 1, 1, 255, 230, 2, 2, 255, 231, 2, 2, 255, 231, 4, 4, 255, 233, 6, 6, 255, 184, 43, 43, 255, 116, 116, 116, 255, 158, 158, 158, 255, 201, 201, 201, 255, 170, 170, 170, 255, 146, 135, 135, 255, 231, 54, 54, 255, 251, 35, 35, 255, 244, 32, 32, 255, 235, 29, 29, 255, 225, 27, 27, 255, 215, 24, 24, 255, 203, 21, 21, 255, 195, 17, 17, 255, 142, 6, 6, 231, 0, 0, 0, 115, 0, 0, 0, 47, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 233, 5, 4, 66, 227, 22, 22, 245, 236, 32, 32, 255, 247, 40, 40, 255, 255, 46, 46, 255, 255, 51, 51, 255, 255, 55, 55, 255, 255, 58, 58, 255, 177, 104, 104, 255, 162, 162, 162, 255, 221, 221, 221, 255, 248, 248, 248, 255, 249, 249, 249, 255, 228, 228, 228, 255, 175, 175, 175, 255, 156, 115, 115, 255, 225, 10, 10, 255, 230, 1, 1, 255, 229, 1, 1, 255, 229, 0, 0, 255, 227, 0, 0, 255, 227, 0, 0, 255, 227, 0, 0, 255, 226, 0, 0, 255, 227, 1, 1, 255, 178, 39, 39, 255, 118, 118, 118, 255, 161, 161, 161, 255, 225, 225, 225, 255, 244, 244, 244, 255, 229, 229, 229, 255, 182, 182, 182, 255, 158, 147, 147, 255, 228, 52, 52, 255, 240, 28, 28, 255, 233, 26, 26, 255, 223, 23, 23, 255, 214, 22, 22, 255, 202, 20, 20, 255, 194, 17, 17, 255, 183, 12, 12, 254, 74, 1, 1, 186, 0, 0, 0, 82, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 226, 9, 9, 137, 226, 24, 24, 255, 233, 32, 32, 255, 244, 37, 37, 255, 255, 42, 42, 255, 255, 45, 45, 255, 255, 48, 48, 255, 241, 62, 62, 255, 163, 152, 152, 255, 185, 185, 185, 255, 229, 229, 229, 255, 250, 250, 250, 255, 253, 253, 253, 255, 250, 250, 250, 255, 228, 228, 228, 255, 176, 176, 176, 255, 158, 118, 118, 255, 220, 8, 8, 255, 226, 0, 0, 255, 226, 1, 0, 255, 227, 0, 0, 255, 226, 1, 0, 255, 226, 1, 0, 255, 224, 0, 0, 255, 177, 39, 39, 255, 123, 123, 123, 255, 162, 162, 162, 255, 226, 226, 226, 255, 249, 249, 249, 255, 253, 253, 253, 255, 247, 247, 247, 255, 224, 224, 224, 255, 193, 193, 193, 255, 206, 114, 114, 255, 235, 24, 24, 255, 228, 22, 22, 255, 221, 20, 20, 255, 211, 19, 19, 255, 202, 18, 18, 255, 192, 16, 16, 255, 185, 14, 14, 255, 119, 3, 3, 229, 0, 0, 0, 123, 0, 0, 0, 50, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 232, 1, 1, 12, 220, 14, 14, 205, 224, 25, 25, 255, 231, 30, 30, 255, 241, 34, 34, 255, 249, 37, 37, 255, 255, 39, 39, 255, 255, 41, 41, 255, 255, 42, 42, 255, 240, 65, 65, 255, 190, 178, 178, 255, 212, 212, 212, 255, 239, 239, 239, 255, 251, 251, 251, 255, 254, 254, 254, 255, 250, 250, 250, 255, 229, 229, 229, 255, 177, 177, 177, 255, 164, 124, 124, 255, 219, 9, 8, 255, 224, 0, 0, 255, 224, 0, 0, 255, 223, 1, 0, 255, 222, 1, 0, 255, 178, 40, 40, 255, 132, 132, 132, 255, 164, 164, 164, 255, 226, 226, 226, 255, 250, 250, 250, 255, 253, 253, 253, 255, 252, 252, 252, 255, 250, 250, 250, 255, 255, 255, 255, 255, 237, 159, 159, 255, 232, 21, 21, 255, 229, 20, 20, 255, 224, 19, 19, 255, 218, 17, 17, 255, 210, 16, 16, 255, 200, 15, 15, 255, 190, 15, 15, 255, 183, 13, 13, 255, 154, 7, 7, 248, 15, 0, 0, 166, 0, 0, 0, 80, 0, 0, 0, 20, 0, 0, 0, 0, + 0, 0, 0, 0, 226, 4, 3, 66, 215, 18, 18, 255, 220, 24, 24, 255, 229, 28, 28, 255, 236, 30, 30, 255, 244, 32, 32, 255, 250, 34, 34, 255, 255, 35, 35, 255, 255, 35, 35, 255, 253, 31, 31, 255, 237, 56, 56, 255, 201, 190, 190, 255, 217, 217, 217, 255, 240, 240, 240, 255, 251, 251, 251, 255, 254, 254, 254, 255, 250, 250, 250, 255, 230, 230, 230, 255, 181, 181, 181, 255, 171, 132, 132, 255, 216, 9, 9, 255, 221, 1, 0, 255, 221, 1, 0, 255, 185, 50, 49, 255, 144, 144, 144, 255, 168, 168, 168, 255, 226, 226, 226, 255, 250, 250, 250, 255, 254, 254, 254, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 165, 165, 255, 226, 14, 14, 255, 226, 17, 17, 255, 226, 17, 17, 255, 220, 16, 16, 255, 215, 14, 14, 255, 207, 13, 13, 255, 198, 13, 13, 255, 188, 13, 13, 255, 181, 12, 12, 255, 177, 10, 10, 255, 64, 1, 1, 209, 0, 0, 0, 112, 0, 0, 0, 37, 0, 0, 0, 1, + 0, 0, 0, 0, 219, 7, 6, 115, 212, 18, 18, 255, 217, 22, 22, 255, 225, 25, 25, 255, 232, 26, 26, 255, 238, 27, 27, 255, 244, 29, 29, 255, 247, 30, 30, 255, 247, 28, 28, 255, 245, 24, 24, 255, 238, 17, 17, 255, 224, 45, 45, 255, 203, 192, 192, 255, 218, 218, 218, 255, 241, 241, 241, 255, 251, 251, 251, 255, 254, 254, 254, 255, 251, 251, 251, 255, 232, 232, 232, 255, 185, 185, 185, 255, 177, 138, 138, 255, 214, 10, 10, 255, 193, 58, 58, 255, 158, 158, 158, 255, 174, 174, 174, 255, 230, 230, 230, 255, 251, 251, 251, 255, 254, 254, 254, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 162, 162, 255, 218, 7, 7, 255, 220, 11, 11, 255, 222, 13, 13, 255, 219, 14, 14, 255, 217, 13, 13, 255, 210, 12, 12, 255, 203, 11, 11, 255, 195, 11, 11, 255, 186, 11, 11, 255, 178, 11, 11, 255, 174, 10, 10, 255, 95, 2, 2, 232, 0, 0, 0, 140, 0, 0, 0, 58, 0, 0, 0, 8, + 0, 0, 0, 0, 214, 8, 8, 158, 209, 17, 17, 255, 214, 20, 20, 255, 221, 22, 22, 255, 227, 23, 23, 255, 232, 23, 23, 255, 237, 24, 24, 255, 241, 25, 25, 255, 240, 23, 23, 255, 237, 19, 19, 255, 231, 13, 13, 255, 226, 7, 7, 255, 217, 39, 39, 255, 204, 193, 193, 255, 219, 219, 219, 255, 241, 241, 241, 255, 251, 251, 251, 255, 254, 254, 254, 255, 251, 251, 251, 255, 239, 239, 239, 255, 212, 212, 212, 255, 189, 165, 165, 255, 184, 184, 184, 255, 209, 209, 209, 255, 238, 238, 238, 255, 251, 251, 251, 255, 254, 254, 254, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 161, 161, 255, 212, 3, 3, 255, 213, 5, 5, 255, 215, 8, 8, 255, 217, 11, 11, 255, 215, 12, 12, 255, 212, 11, 11, 255, 206, 10, 10, 255, 201, 9, 9, 255, 194, 9, 9, 255, 185, 9, 9, 255, 176, 9, 9, 255, 171, 9, 9, 255, 118, 3, 3, 244, 0, 0, 0, 166, 0, 0, 0, 82, 0, 0, 0, 20, + 0, 0, 0, 0, 207, 10, 10, 194, 205, 16, 16, 255, 209, 18, 18, 255, 216, 19, 19, 255, 221, 19, 19, 255, 227, 20, 20, 255, 232, 20, 20, 255, 234, 21, 21, 255, 234, 19, 19, 255, 230, 15, 15, 255, 226, 10, 10, 255, 221, 5, 5, 255, 219, 2, 2, 255, 211, 37, 37, 255, 206, 195, 195, 255, 219, 219, 219, 255, 242, 242, 242, 255, 252, 252, 252, 255, 253, 253, 253, 255, 252, 252, 252, 255, 247, 247, 247, 255, 241, 241, 241, 255, 240, 240, 240, 255, 247, 247, 247, 255, 252, 252, 252, 255, 253, 253, 253, 255, 252, 252, 252, 255, 254, 254, 254, 255, 255, 255, 255, 255, 238, 161, 161, 255, 208, 0, 0, 255, 208, 2, 2, 255, 211, 4, 4, 255, 211, 6, 6, 255, 212, 9, 9, 255, 211, 10, 10, 255, 208, 9, 9, 255, 204, 8, 8, 255, 197, 8, 8, 255, 191, 7, 7, 255, 182, 8, 8, 255, 174, 8, 8, 255, 168, 8, 8, 255, 137, 4, 4, 250, 0, 0, 0, 188, 0, 0, 0, 105, 0, 0, 0, 32, + 0, 0, 0, 0, 202, 10, 10, 223, 201, 15, 15, 255, 206, 16, 16, 255, 210, 16, 16, 255, 216, 16, 16, 255, 221, 16, 16, 255, 225, 17, 17, 255, 228, 17, 17, 255, 228, 16, 16, 255, 225, 12, 12, 255, 221, 8, 8, 255, 218, 4, 4, 255, 215, 1, 1, 255, 214, 0, 0, 255, 209, 36, 35, 255, 207, 196, 196, 255, 217, 217, 217, 255, 244, 244, 244, 255, 252, 252, 252, 255, 253, 253, 253, 255, 253, 253, 253, 255, 252, 252, 252, 255, 252, 252, 252, 255, 253, 253, 253, 255, 253, 253, 253, 255, 252, 252, 252, 255, 249, 249, 249, 255, 255, 255, 255, 255, 237, 161, 161, 255, 207, 0, 0, 255, 206, 0, 0, 255, 207, 1, 1, 255, 207, 3, 3, 255, 208, 5, 5, 255, 208, 7, 7, 255, 207, 8, 8, 255, 205, 8, 8, 255, 200, 7, 7, 255, 194, 6, 6, 255, 188, 6, 6, 255, 180, 6, 6, 255, 171, 7, 7, 255, 164, 7, 7, 255, 148, 5, 5, 253, 0, 0, 0, 202, 0, 0, 0, 120, 0, 0, 0, 39, + 0, 0, 0, 0, 197, 10, 10, 243, 196, 13, 13, 255, 200, 14, 14, 255, 206, 13, 13, 255, 211, 13, 13, 255, 217, 13, 13, 255, 220, 14, 14, 255, 223, 14, 14, 255, 222, 13, 13, 255, 221, 10, 10, 255, 218, 6, 6, 255, 215, 3, 3, 255, 212, 1, 1, 255, 211, 0, 0, 255, 211, 1, 0, 255, 207, 37, 36, 255, 205, 195, 195, 255, 227, 227, 227, 255, 249, 249, 249, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 250, 250, 250, 255, 243, 243, 243, 255, 230, 154, 154, 255, 205, 0, 0, 255, 205, 0, 0, 255, 203, 0, 0, 255, 204, 1, 1, 255, 204, 2, 2, 255, 205, 4, 4, 255, 205, 6, 6, 255, 204, 7, 7, 255, 201, 6, 6, 255, 197, 6, 6, 255, 192, 5, 5, 255, 185, 5, 5, 255, 177, 5, 5, 255, 168, 6, 6, 255, 162, 6, 6, 255, 156, 6, 6, 254, 0, 0, 0, 211, 0, 0, 0, 129, 0, 0, 0, 43, + 0, 0, 0, 0, 191, 10, 10, 254, 192, 11, 11, 255, 197, 12, 12, 255, 201, 11, 11, 255, 205, 11, 11, 255, 211, 11, 11, 255, 214, 11, 11, 255, 218, 12, 12, 255, 218, 11, 11, 255, 216, 8, 8, 255, 214, 5, 5, 255, 211, 3, 3, 255, 210, 1, 1, 255, 209, 1, 0, 255, 209, 0, 0, 255, 209, 1, 0, 255, 205, 37, 36, 255, 207, 196, 196, 255, 244, 244, 244, 255, 253, 253, 253, 255, 253, 253, 253, 255, 254, 254, 254, 255, 254, 254, 254, 255, 253, 253, 253, 255, 253, 253, 253, 255, 246, 246, 246, 255, 216, 141, 141, 255, 203, 1, 0, 255, 203, 0, 0, 255, 203, 1, 0, 255, 202, 1, 0, 255, 200, 1, 1, 255, 201, 2, 2, 255, 201, 4, 4, 255, 201, 5, 5, 255, 200, 5, 5, 255, 197, 5, 5, 255, 193, 5, 5, 255, 188, 4, 4, 255, 181, 4, 4, 255, 173, 4, 4, 255, 166, 5, 5, 255, 159, 5, 5, 255, 157, 5, 5, 255, 0, 0, 0, 216, 0, 0, 0, 134, 0, 0, 0, 46, + 0, 0, 0, 0, 189, 9, 9, 243, 189, 10, 10, 255, 191, 10, 10, 255, 197, 9, 9, 255, 201, 9, 9, 255, 205, 9, 9, 255, 210, 9, 9, 255, 213, 10, 10, 255, 213, 9, 9, 255, 213, 7, 7, 255, 211, 5, 5, 255, 209, 3, 3, 255, 207, 1, 1, 255, 206, 0, 0, 255, 206, 0, 0, 255, 206, 1, 0, 255, 194, 67, 67, 255, 198, 198, 198, 255, 243, 243, 243, 255, 253, 253, 253, 255, 253, 253, 253, 255, 254, 254, 254, 255, 254, 254, 254, 255, 253, 253, 253, 255, 253, 253, 253, 255, 245, 245, 245, 255, 212, 176, 176, 255, 201, 12, 12, 255, 201, 0, 0, 255, 200, 0, 0, 255, 199, 0, 0, 255, 198, 1, 1, 255, 199, 2, 2, 255, 200, 3, 3, 255, 199, 4, 4, 255, 197, 5, 5, 255, 194, 4, 4, 255, 189, 4, 4, 255, 184, 3, 3, 255, 177, 3, 3, 255, 170, 3, 3, 255, 162, 4, 4, 255, 155, 5, 5, 255, 150, 5, 5, 255, 0, 0, 0, 219, 0, 0, 0, 137, 0, 0, 0, 47, + 0, 0, 0, 0, 187, 7, 7, 223, 184, 9, 9, 255, 186, 8, 8, 255, 191, 8, 8, 255, 196, 7, 7, 255, 201, 7, 7, 255, 204, 7, 7, 255, 208, 8, 8, 255, 209, 8, 8, 255, 209, 7, 7, 255, 208, 5, 5, 255, 207, 3, 3, 255, 205, 1, 1, 255, 203, 0, 0, 255, 205, 0, 0, 255, 179, 54, 54, 255, 169, 169, 169, 255, 214, 214, 214, 255, 248, 248, 248, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 249, 249, 249, 255, 223, 223, 223, 255, 191, 156, 156, 255, 196, 11, 10, 255, 198, 1, 0, 255, 196, 0, 0, 255, 196, 1, 1, 255, 197, 2, 2, 255, 195, 3, 3, 255, 195, 4, 4, 255, 193, 4, 4, 255, 190, 3, 3, 255, 185, 3, 3, 255, 180, 2, 2, 255, 173, 2, 2, 255, 166, 3, 3, 255, 158, 3, 3, 255, 153, 4, 4, 255, 139, 3, 3, 254, 0, 0, 0, 220, 0, 0, 0, 138, 0, 0, 0, 47, + 0, 0, 0, 0, 187, 5, 5, 194, 181, 8, 8, 255, 183, 7, 7, 255, 186, 6, 6, 255, 193, 6, 6, 255, 196, 6, 6, 255, 200, 6, 6, 255, 203, 6, 6, 255, 205, 6, 6, 255, 206, 6, 6, 255, 205, 4, 4, 255, 204, 3, 3, 255, 203, 1, 1, 255, 202, 0, 0, 255, 167, 43, 43, 255, 149, 149, 149, 255, 178, 178, 178, 255, 238, 238, 238, 255, 252, 252, 252, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 253, 253, 253, 255, 252, 252, 252, 255, 240, 240, 240, 255, 191, 191, 191, 255, 173, 139, 138, 255, 190, 9, 9, 255, 194, 0, 0, 255, 193, 1, 1, 255, 194, 2, 2, 255, 193, 3, 3, 255, 192, 3, 3, 255, 189, 3, 3, 255, 185, 3, 3, 255, 180, 2, 2, 255, 176, 2, 2, 255, 169, 2, 2, 255, 162, 2, 2, 255, 154, 3, 3, 255, 149, 4, 4, 255, 122, 2, 2, 253, 0, 0, 0, 219, 0, 0, 0, 137, 0, 0, 0, 47, + 0, 0, 0, 0, 189, 4, 4, 158, 177, 7, 7, 255, 179, 6, 6, 255, 182, 6, 6, 255, 187, 5, 5, 255, 191, 4, 4, 255, 195, 5, 5, 255, 198, 5, 5, 255, 201, 5, 5, 255, 203, 5, 5, 255, 202, 4, 4, 255, 202, 3, 3, 255, 201, 2, 2, 255, 163, 41, 41, 255, 134, 134, 134, 255, 169, 169, 169, 255, 230, 230, 230, 255, 251, 251, 251, 255, 253, 253, 253, 255, 253, 253, 253, 255, 252, 252, 252, 255, 254, 254, 254, 255, 253, 253, 253, 255, 251, 251, 251, 255, 252, 252, 252, 255, 253, 253, 253, 255, 251, 251, 251, 255, 232, 232, 232, 255, 183, 183, 183, 255, 161, 127, 127, 255, 187, 8, 8, 255, 191, 1, 1, 255, 191, 2, 2, 255, 190, 3, 3, 255, 188, 3, 3, 255, 185, 2, 2, 255, 181, 2, 2, 255, 177, 2, 2, 255, 172, 1, 1, 255, 165, 2, 2, 255, 157, 2, 2, 255, 150, 3, 3, 255, 146, 3, 3, 255, 103, 1, 1, 251, 0, 0, 0, 216, 0, 0, 0, 134, 0, 0, 0, 46, + 0, 0, 0, 0, 191, 3, 2, 115, 174, 6, 6, 255, 174, 6, 6, 255, 178, 5, 5, 255, 182, 4, 4, 255, 187, 4, 4, 255, 191, 4, 4, 255, 193, 4, 4, 255, 197, 4, 4, 255, 199, 4, 4, 255, 199, 4, 4, 255, 198, 3, 3, 255, 161, 39, 39, 255, 124, 124, 124, 255, 165, 165, 165, 255, 226, 226, 226, 255, 251, 251, 251, 255, 254, 254, 254, 255, 252, 252, 252, 255, 254, 254, 254, 255, 255, 255, 255, 255, 237, 178, 178, 255, 252, 242, 242, 255, 255, 255, 255, 255, 247, 247, 247, 255, 252, 252, 252, 255, 254, 254, 254, 255, 251, 251, 251, 255, 230, 230, 230, 255, 178, 178, 178, 255, 153, 120, 120, 255, 185, 9, 9, 255, 188, 2, 2, 255, 186, 2, 2, 255, 184, 2, 2, 255, 182, 2, 2, 255, 177, 1, 1, 255, 172, 1, 1, 255, 166, 1, 1, 255, 159, 1, 1, 255, 152, 2, 2, 255, 145, 2, 2, 255, 144, 3, 3, 255, 77, 1, 0, 248, 0, 0, 0, 211, 0, 0, 0, 129, 0, 0, 0, 43, + 0, 0, 0, 0, 194, 1, 1, 66, 170, 5, 5, 255, 170, 5, 5, 255, 172, 4, 4, 255, 177, 3, 3, 255, 182, 3, 3, 255, 185, 3, 3, 255, 189, 3, 3, 255, 193, 3, 3, 255, 195, 4, 4, 255, 195, 3, 3, 255, 160, 40, 40, 255, 119, 119, 119, 255, 162, 162, 162, 255, 226, 226, 226, 255, 250, 250, 250, 255, 254, 254, 254, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 232, 161, 161, 255, 191, 0, 0, 255, 203, 49, 48, 255, 249, 239, 239, 255, 233, 233, 233, 255, 242, 242, 242, 255, 251, 251, 251, 255, 254, 254, 254, 255, 250, 250, 250, 255, 229, 229, 229, 255, 176, 176, 176, 255, 148, 115, 115, 255, 181, 10, 10, 255, 183, 2, 2, 255, 180, 2, 2, 255, 176, 1, 1, 255, 172, 1, 1, 255, 168, 1, 1, 255, 162, 1, 1, 255, 156, 1, 1, 255, 148, 2, 2, 255, 142, 2, 2, 255, 141, 3, 3, 255, 47, 1, 0, 243, 0, 0, 0, 202, 0, 0, 0, 120, 0, 0, 0, 39, + 0, 0, 0, 0, 197, 1, 0, 12, 170, 4, 4, 211, 166, 5, 5, 255, 169, 4, 4, 255, 173, 3, 3, 255, 176, 2, 2, 255, 180, 2, 2, 255, 184, 2, 2, 255, 187, 2, 2, 255, 190, 3, 3, 255, 158, 41, 41, 255, 119, 119, 119, 255, 162, 162, 162, 255, 226, 226, 226, 255, 250, 250, 250, 255, 254, 254, 254, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 231, 161, 161, 255, 189, 0, 0, 255, 189, 0, 0, 255, 188, 0, 0, 255, 197, 45, 45, 255, 223, 214, 214, 255, 224, 224, 224, 255, 241, 241, 241, 255, 251, 251, 251, 255, 254, 254, 254, 255, 250, 250, 250, 255, 229, 229, 229, 255, 176, 176, 176, 255, 148, 116, 116, 255, 176, 9, 9, 255, 176, 1, 1, 255, 171, 1, 1, 255, 167, 1, 1, 255, 163, 1, 1, 255, 156, 1, 1, 255, 150, 1, 1, 255, 142, 2, 2, 255, 139, 2, 2, 255, 120, 2, 2, 254, 9, 0, 0, 235, 0, 0, 0, 188, 0, 0, 0, 105, 0, 0, 0, 32, + 0, 0, 0, 0, 0, 0, 0, 0, 170, 2, 2, 146, 165, 4, 4, 255, 164, 4, 4, 255, 168, 3, 3, 255, 171, 2, 2, 255, 175, 2, 2, 255, 178, 2, 2, 255, 183, 2, 2, 255, 159, 45, 45, 255, 126, 126, 126, 255, 165, 165, 165, 255, 226, 226, 226, 255, 250, 250, 250, 255, 253, 253, 253, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 230, 161, 161, 255, 187, 0, 0, 255, 187, 0, 0, 255, 186, 1, 0, 255, 185, 0, 0, 255, 186, 0, 0, 255, 192, 42, 42, 255, 214, 205, 205, 255, 221, 221, 221, 255, 241, 241, 241, 255, 251, 251, 251, 255, 253, 253, 253, 255, 250, 250, 250, 255, 230, 230, 230, 255, 182, 182, 182, 255, 157, 126, 126, 255, 169, 10, 10, 255, 168, 0, 0, 255, 162, 0, 0, 255, 158, 0, 0, 255, 151, 1, 1, 255, 144, 1, 1, 255, 139, 2, 2, 255, 137, 2, 2, 255, 85, 1, 1, 251, 0, 0, 0, 225, 0, 0, 0, 166, 0, 0, 0, 82, 0, 0, 0, 20, + 0, 0, 0, 0, 0, 0, 0, 0, 171, 2, 1, 72, 161, 4, 4, 247, 160, 3, 3, 255, 162, 3, 3, 255, 165, 2, 2, 255, 170, 1, 1, 255, 173, 1, 1, 255, 171, 18, 18, 255, 144, 144, 144, 255, 166, 166, 166, 255, 213, 213, 213, 255, 246, 246, 246, 255, 253, 253, 253, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 229, 161, 161, 255, 184, 0, 0, 255, 183, 0, 0, 255, 183, 0, 0, 255, 182, 0, 0, 255, 182, 0, 0, 255, 181, 0, 0, 255, 181, 0, 0, 255, 186, 39, 39, 255, 208, 198, 198, 255, 219, 219, 219, 255, 241, 241, 241, 255, 251, 251, 251, 255, 253, 253, 253, 255, 247, 247, 247, 255, 225, 225, 225, 255, 194, 194, 194, 255, 175, 114, 114, 255, 161, 0, 0, 255, 158, 0, 0, 255, 152, 0, 0, 255, 146, 1, 1, 255, 139, 1, 1, 255, 135, 2, 2, 255, 131, 2, 2, 255, 44, 1, 0, 245, 0, 0, 0, 213, 0, 0, 0, 140, 0, 0, 0, 58, 0, 0, 0, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 158, 2, 2, 175, 156, 3, 3, 255, 157, 3, 3, 255, 160, 2, 2, 255, 163, 1, 1, 255, 168, 1, 1, 255, 171, 1, 1, 255, 172, 65, 65, 255, 178, 178, 178, 255, 206, 206, 206, 255, 240, 240, 240, 255, 251, 251, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 228, 161, 161, 255, 182, 1, 1, 255, 182, 1, 1, 255, 181, 0, 0, 255, 180, 0, 0, 255, 180, 0, 0, 255, 180, 0, 0, 255, 179, 0, 0, 255, 179, 0, 0, 255, 178, 1, 1, 255, 182, 39, 39, 255, 203, 194, 194, 255, 220, 220, 220, 255, 243, 243, 243, 255, 251, 251, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 227, 198, 198, 255, 164, 14, 14, 255, 157, 0, 0, 255, 151, 0, 0, 255, 145, 0, 0, 255, 140, 1, 1, 255, 135, 1, 1, 255, 132, 2, 2, 255, 95, 1, 1, 252, 0, 0, 0, 235, 0, 0, 0, 193, 0, 0, 0, 112, 0, 0, 0, 37, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 151, 1, 1, 89, 154, 3, 3, 245, 154, 3, 3, 255, 155, 2, 2, 255, 158, 1, 1, 255, 161, 1, 1, 255, 165, 1, 1, 255, 168, 1, 1, 255, 178, 73, 73, 255, 204, 204, 204, 255, 238, 238, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 227, 161, 161, 255, 179, 1, 1, 255, 179, 1, 1, 255, 179, 1, 1, 255, 178, 1, 1, 255, 178, 1, 1, 255, 177, 1, 1, 255, 177, 1, 1, 255, 177, 1, 1, 255, 176, 1, 1, 255, 176, 1, 1, 255, 174, 1, 1, 255, 179, 38, 38, 255, 208, 199, 199, 255, 241, 241, 241, 255, 255, 255, 255, 255, 255, 255, 255, 255, 238, 210, 210, 255, 164, 16, 16, 255, 154, 0, 0, 255, 150, 0, 0, 255, 145, 0, 0, 255, 139, 0, 0, 255, 133, 1, 1, 255, 130, 1, 1, 255, 125, 2, 2, 255, 48, 0, 0, 247, 0, 0, 0, 221, 0, 0, 0, 162, 0, 0, 0, 80, 0, 0, 0, 20, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 145, 2, 2, 165, 151, 3, 3, 255, 150, 2, 2, 255, 151, 1, 1, 255, 155, 1, 1, 255, 158, 1, 1, 255, 161, 0, 0, 255, 164, 0, 0, 255, 182, 78, 78, 255, 246, 246, 246, 255, 255, 255, 255, 255, 224, 161, 161, 255, 174, 1, 1, 255, 174, 1, 1, 255, 174, 1, 1, 255, 175, 1, 1, 255, 174, 1, 1, 255, 174, 1, 1, 255, 173, 1, 1, 255, 174, 1, 1, 255, 173, 1, 1, 255, 173, 1, 1, 255, 171, 1, 1, 255, 170, 1, 1, 255, 169, 1, 1, 255, 175, 39, 39, 255, 242, 233, 233, 255, 255, 255, 255, 255, 238, 210, 210, 255, 162, 16, 16, 255, 153, 0, 0, 255, 148, 0, 0, 255, 143, 0, 0, 255, 138, 0, 0, 255, 132, 0, 0, 255, 128, 1, 1, 255, 128, 1, 1, 255, 83, 1, 1, 252, 0, 0, 0, 235, 0, 0, 0, 198, 0, 0, 0, 123, 0, 0, 0, 50, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 1, 0, 62, 144, 2, 2, 214, 146, 2, 2, 255, 146, 2, 2, 255, 148, 1, 1, 255, 151, 1, 1, 255, 155, 0, 0, 255, 158, 0, 0, 255, 161, 0, 0, 255, 197, 96, 96, 255, 216, 145, 145, 255, 167, 0, 0, 255, 169, 0, 0, 255, 168, 1, 1, 255, 170, 1, 1, 255, 170, 1, 1, 255, 170, 1, 1, 255, 169, 1, 1, 255, 171, 1, 1, 255, 169, 1, 1, 255, 168, 1, 1, 255, 168, 1, 1, 255, 166, 0, 0, 255, 165, 0, 0, 255, 164, 0, 0, 255, 161, 0, 0, 255, 177, 47, 47, 255, 225, 178, 178, 255, 160, 16, 16, 255, 151, 0, 0, 255, 146, 0, 0, 255, 141, 0, 0, 255, 136, 0, 0, 255, 132, 0, 0, 255, 126, 1, 1, 255, 125, 1, 1, 255, 105, 1, 1, 254, 29, 0, 0, 245, 0, 0, 0, 218, 0, 0, 0, 162, 0, 0, 0, 82, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 124, 1, 1, 117, 141, 2, 2, 241, 143, 2, 2, 255, 143, 1, 1, 255, 145, 1, 1, 255, 148, 0, 0, 255, 152, 0, 0, 255, 155, 0, 0, 255, 156, 0, 0, 255, 159, 0, 0, 255, 161, 0, 0, 255, 162, 0, 0, 255, 163, 0, 0, 255, 165, 0, 0, 255, 165, 0, 0, 255, 164, 0, 0, 255, 165, 0, 0, 255, 164, 0, 0, 255, 164, 0, 0, 255, 164, 0, 0, 255, 162, 0, 0, 255, 161, 0, 0, 255, 159, 0, 0, 255, 158, 0, 0, 255, 156, 0, 0, 255, 153, 0, 0, 255, 150, 0, 0, 255, 148, 0, 0, 255, 144, 0, 0, 255, 140, 0, 0, 255, 134, 0, 0, 255, 129, 0, 0, 255, 125, 0, 0, 255, 123, 1, 1, 255, 116, 1, 1, 255, 52, 0, 0, 249, 0, 0, 0, 230, 0, 0, 0, 188, 0, 0, 0, 115, 0, 0, 0, 47, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 121, 1, 1, 151, 141, 2, 2, 252, 139, 1, 1, 255, 140, 1, 1, 255, 142, 1, 1, 255, 145, 0, 0, 255, 148, 0, 0, 255, 150, 0, 0, 255, 152, 0, 0, 255, 155, 0, 0, 255, 156, 0, 0, 255, 158, 0, 0, 255, 158, 0, 0, 255, 159, 0, 0, 255, 159, 0, 0, 255, 160, 0, 0, 255, 160, 0, 0, 255, 159, 0, 0, 255, 159, 0, 0, 255, 157, 0, 0, 255, 156, 0, 0, 255, 153, 0, 0, 255, 152, 0, 0, 255, 150, 0, 0, 255, 147, 0, 0, 255, 145, 0, 0, 255, 141, 0, 0, 255, 137, 0, 0, 255, 133, 0, 0, 255, 127, 0, 0, 255, 123, 0, 0, 255, 122, 1, 1, 255, 121, 1, 1, 255, 65, 0, 0, 251, 0, 0, 0, 236, 0, 0, 0, 204, 0, 0, 0, 143, 0, 0, 0, 70, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 32, 115, 1, 1, 168, 138, 2, 2, 253, 137, 1, 1, 255, 137, 1, 1, 255, 139, 0, 0, 255, 141, 0, 0, 255, 143, 0, 0, 255, 146, 0, 0, 255, 148, 0, 0, 255, 150, 0, 0, 255, 150, 0, 0, 255, 152, 0, 0, 255, 153, 0, 0, 255, 153, 0, 0, 255, 154, 0, 0, 255, 153, 0, 0, 255, 153, 0, 0, 255, 152, 0, 0, 255, 150, 0, 0, 255, 150, 0, 0, 255, 147, 0, 0, 255, 146, 0, 0, 255, 144, 0, 0, 255, 141, 0, 0, 255, 138, 0, 0, 255, 135, 0, 0, 255, 131, 0, 0, 255, 126, 0, 0, 255, 122, 0, 0, 255, 120, 1, 1, 255, 121, 1, 1, 255, 70, 0, 0, 251, 0, 0, 0, 239, 0, 0, 0, 213, 0, 0, 0, 160, 0, 0, 0, 89, 0, 0, 0, 32, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 42, 107, 1, 1, 170, 133, 1, 1, 248, 134, 1, 1, 255, 134, 1, 1, 255, 135, 0, 0, 255, 137, 0, 0, 255, 139, 0, 0, 255, 142, 0, 0, 255, 144, 0, 0, 255, 144, 0, 0, 255, 145, 0, 0, 255, 146, 0, 0, 255, 146, 0, 0, 255, 147, 0, 0, 255, 147, 0, 0, 255, 147, 0, 0, 255, 145, 0, 0, 255, 145, 0, 0, 255, 143, 0, 0, 255, 142, 0, 0, 255, 139, 0, 0, 255, 136, 0, 0, 255, 133, 0, 0, 255, 130, 0, 0, 255, 126, 0, 0, 255, 123, 0, 0, 255, 120, 0, 0, 255, 119, 1, 1, 255, 114, 1, 1, 255, 66, 0, 0, 251, 0, 0, 0, 239, 0, 0, 0, 216, 0, 0, 0, 168, 0, 0, 0, 99, 0, 0, 0, 42, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 46, 92, 1, 1, 158, 120, 1, 1, 237, 131, 1, 1, 255, 131, 1, 1, 255, 130, 0, 0, 255, 133, 0, 0, 255, 133, 0, 0, 255, 136, 0, 0, 255, 137, 0, 0, 255, 138, 0, 0, 255, 140, 0, 0, 255, 140, 0, 0, 255, 140, 0, 0, 255, 140, 0, 0, 255, 139, 0, 0, 255, 139, 0, 0, 255, 138, 0, 0, 255, 135, 0, 0, 255, 134, 0, 0, 255, 132, 0, 0, 255, 129, 0, 0, 255, 127, 0, 0, 255, 124, 0, 0, 255, 120, 0, 0, 255, 119, 0, 0, 255, 119, 1, 1, 255, 102, 1, 1, 254, 54, 0, 0, 249, 0, 0, 0, 237, 0, 0, 0, 214, 0, 0, 0, 169, 0, 0, 0, 102, 0, 0, 0, 46, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 46, 64, 0, 0, 133, 102, 1, 1, 219, 129, 1, 1, 255, 128, 1, 1, 255, 127, 0, 0, 255, 128, 0, 0, 255, 129, 0, 0, 255, 131, 0, 0, 255, 131, 0, 0, 255, 132, 0, 0, 255, 132, 0, 0, 255, 132, 0, 0, 255, 133, 0, 0, 255, 133, 0, 0, 255, 131, 0, 0, 255, 130, 0, 0, 255, 128, 0, 0, 255, 127, 0, 0, 255, 125, 0, 0, 255, 122, 0, 0, 255, 120, 0, 0, 255, 118, 0, 0, 255, 117, 0, 0, 255, 118, 1, 1, 255, 81, 1, 1, 253, 33, 0, 0, 246, 0, 0, 0, 231, 0, 0, 0, 206, 0, 0, 0, 163, 0, 0, 0, 100, 0, 0, 0, 46, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 43, 0, 0, 0, 91, 73, 0, 0, 185, 104, 1, 1, 235, 127, 1, 1, 255, 125, 1, 1, 255, 125, 0, 0, 255, 125, 0, 0, 255, 125, 0, 0, 255, 125, 0, 0, 255, 125, 0, 0, 255, 125, 0, 0, 255, 125, 0, 0, 255, 124, 0, 0, 255, 124, 0, 0, 255, 122, 0, 0, 255, 121, 0, 0, 255, 121, 0, 0, 255, 119, 0, 0, 255, 117, 0, 0, 255, 117, 0, 0, 255, 118, 0, 0, 255, 91, 1, 1, 253, 52, 0, 0, 248, 0, 0, 0, 237, 0, 0, 0, 221, 0, 0, 0, 192, 0, 0, 0, 147, 0, 0, 0, 91, 0, 0, 0, 43, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 34, 0, 0, 0, 74, 7, 0, 0, 123, 63, 0, 0, 195, 92, 1, 1, 234, 113, 1, 1, 251, 122, 1, 1, 255, 121, 0, 0, 255, 121, 0, 0, 255, 120, 0, 0, 255, 119, 0, 0, 255, 119, 0, 0, 255, 119, 0, 0, 255, 119, 0, 0, 255, 117, 0, 0, 255, 118, 0, 0, 255, 117, 0, 0, 255, 116, 0, 0, 255, 107, 0, 0, 254, 81, 1, 1, 252, 47, 0, 0, 248, 4, 0, 0, 237, 0, 0, 0, 224, 0, 0, 0, 202, 0, 0, 0, 167, 0, 0, 0, 120, 0, 0, 0, 74, 0, 0, 0, 34, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 19, 0, 0, 0, 50, 0, 0, 0, 87, 0, 0, 0, 130, 25, 0, 0, 179, 56, 0, 0, 217, 77, 1, 1, 237, 93, 1, 1, 246, 105, 1, 1, 251, 112, 0, 0, 254, 117, 0, 0, 255, 117, 0, 0, 255, 111, 0, 0, 254, 102, 0, 0, 253, 89, 1, 1, 252, 71, 1, 1, 249, 48, 0, 0, 245, 18, 0, 0, 238, 0, 0, 0, 228, 0, 0, 0, 217, 0, 0, 0, 198, 0, 0, 0, 169, 0, 0, 0, 130, 0, 0, 0, 87, 0, 0, 0, 50, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 25, 0, 0, 0, 55, 0, 0, 0, 86, 0, 0, 0, 119, 0, 0, 0, 148, 0, 0, 0, 174, 0, 0, 0, 193, 0, 0, 0, 205, 0, 0, 0, 213, 0, 0, 0, 218, 0, 0, 0, 219, 0, 0, 0, 219, 0, 0, 0, 218, 0, 0, 0, 213, 0, 0, 0, 205, 0, 0, 0, 193, 0, 0, 0, 174, 0, 0, 0, 148, 0, 0, 0, 119, 0, 0, 0, 86, 0, 0, 0, 55, 0, 0, 0, 25, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 23, 0, 0, 0, 43, 0, 0, 0, 65, 0, 0, 0, 90, 0, 0, 0, 110, 0, 0, 0, 124, 0, 0, 0, 132, 0, 0, 0, 136, 0, 0, 0, 138, 0, 0, 0, 138, 0, 0, 0, 136, 0, 0, 0, 132, 0, 0, 0, 124, 0, 0, 0, 110, 0, 0, 0, 90, 0, 0, 0, 65, 0, 0, 0, 43, 0, 0, 0, 23, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 12, 0, 0, 0, 24, 0, 0, 0, 34, 0, 0, 0, 41, 0, 0, 0, 44, 0, 0, 0, 46, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 46, 0, 0, 0, 44, 0, 0, 0, 41, 0, 0, 0, 34, 0, 0, 0, 24, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_DeviceCellPhone(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 16, 31, 31, 31, 65, 12, 12, 24, 68, 37, 37, 74, 22, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 75, 75, 239, 32, 32, 32, 255, 13, 13, 26, 255, 55, 55, 111, 242, 0, 0, 0, 34, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 115, 115, 64, 96, 96, 96, 255, 32, 32, 32, 255, 38, 38, 48, 255, 81, 81, 124, 255, 16, 16, 32, 154, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 132, 132, 68, 134, 134, 134, 255, 115, 115, 115, 255, 83, 83, 89, 255, 105, 105, 134, 255, 38, 38, 51, 191, 0, 0, 0, 42, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 132, 132, 68, 134, 134, 134, 255, 123, 123, 123, 255, 118, 118, 121, 255, 129, 129, 143, 255, 44, 44, 50, 194, 0, 0, 0, 57, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 96, 96, 68, 77, 77, 77, 255, 32, 32, 32, 255, 13, 13, 26, 255, 58, 58, 115, 255, 40, 40, 80, 204, 0, 0, 0, 63, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 96, 96, 68, 77, 77, 77, 255, 32, 32, 32, 255, 13, 13, 26, 255, 58, 58, 115, 255, 53, 53, 106, 216, 0, 0, 0, 78, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 96, 96, 68, 77, 77, 77, 255, 32, 32, 32, 255, 13, 13, 26, 255, 58, 58, 115, 255, 53, 53, 105, 217, 0, 0, 0, 93, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 48, 76, 76, 76, 194, 86, 86, 86, 255, 32, 32, 32, 255, 13, 13, 26, 255, 56, 56, 99, 255, 62, 62, 96, 245, 43, 43, 43, 208, 46, 46, 46, 142, 49, 49, 49, 134, 49, 49, 49, 134, 49, 49, 49, 134, 45, 45, 45, 73, 48, 48, 48, 68, 46, 46, 46, 53, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 85, 85, 239, 141, 141, 141, 255, 115, 115, 115, 255, 90, 90, 90, 255, 64, 64, 64, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 55, 55, 55, 255, 70, 70, 70, 255, 71, 71, 71, 255, 72, 72, 72, 255, 62, 62, 62, 255, 50, 50, 50, 242, 43, 43, 43, 113, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 64, 85, 85, 85, 255, 116, 116, 116, 255, 109, 109, 109, 255, 102, 102, 102, 255, 85, 85, 85, 255, 70, 70, 70, 255, 93, 93, 93, 255, 103, 103, 103, 255, 115, 115, 115, 255, 121, 121, 121, 255, 124, 124, 124, 255, 129, 129, 129, 255, 135, 135, 135, 255, 139, 139, 139, 255, 144, 144, 144, 255, 142, 142, 142, 255, 47, 47, 47, 241, 0, 0, 0, 79, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 136, 136, 136, 255, 220, 220, 220, 255, 218, 218, 218, 255, 217, 217, 217, 255, 215, 215, 215, 255, 93, 93, 93, 255, 110, 110, 110, 255, 115, 115, 115, 255, 121, 121, 121, 255, 124, 124, 124, 255, 129, 129, 129, 255, 135, 135, 135, 255, 139, 139, 139, 255, 144, 144, 144, 255, 148, 148, 148, 255, 154, 154, 154, 255, 58, 58, 58, 255, 0, 0, 0, 140, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 146, 146, 146, 255, 187, 187, 187, 255, 82, 82, 82, 255, 215, 215, 215, 255, 173, 173, 173, 255, 96, 96, 96, 255, 115, 115, 115, 255, 121, 121, 121, 255, 124, 124, 124, 255, 129, 129, 129, 255, 135, 135, 135, 255, 139, 139, 139, 255, 144, 144, 144, 255, 148, 148, 148, 255, 154, 154, 154, 255, 159, 159, 159, 255, 79, 79, 79, 255, 0, 0, 0, 164, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 176, 176, 176, 255, 196, 196, 196, 255, 102, 102, 102, 255, 213, 213, 213, 255, 171, 171, 171, 255, 99, 99, 99, 255, 121, 121, 121, 255, 125, 125, 125, 255, 129, 129, 129, 255, 135, 135, 135, 255, 139, 139, 139, 255, 144, 144, 144, 255, 148, 148, 148, 255, 154, 154, 154, 255, 159, 159, 159, 255, 163, 163, 163, 255, 80, 80, 80, 255, 0, 0, 0, 167, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 175, 175, 175, 255, 215, 215, 215, 255, 213, 213, 213, 255, 211, 211, 211, 255, 170, 170, 170, 255, 121, 121, 121, 255, 126, 126, 126, 255, 115, 115, 115, 255, 100, 100, 100, 255, 100, 100, 100, 255, 133, 133, 133, 255, 141, 141, 141, 255, 99, 99, 99, 255, 97, 97, 97, 255, 84, 84, 84, 255, 168, 168, 168, 255, 81, 81, 81, 255, 0, 0, 0, 167, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 174, 174, 174, 255, 213, 213, 213, 255, 211, 211, 211, 255, 209, 209, 209, 255, 169, 169, 169, 255, 126, 126, 126, 255, 143, 143, 143, 255, 114, 114, 114, 255, 89, 89, 89, 255, 65, 65, 65, 255, 130, 130, 130, 255, 120, 120, 120, 255, 81, 81, 81, 255, 99, 99, 99, 255, 96, 96, 96, 255, 174, 174, 174, 255, 82, 82, 82, 255, 17, 17, 17, 189, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 172, 172, 172, 255, 211, 211, 211, 255, 209, 209, 209, 255, 208, 208, 208, 255, 167, 167, 167, 255, 129, 129, 129, 255, 125, 125, 125, 255, 103, 121, 102, 255, 106, 142, 104, 255, 119, 153, 115, 255, 96, 155, 88, 255, 102, 167, 90, 255, 110, 172, 96, 255, 117, 177, 100, 255, 124, 181, 105, 255, 130, 130, 130, 255, 92, 92, 92, 255, 17, 17, 17, 194, 0, 0, 0, 54, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 171, 171, 171, 255, 209, 209, 209, 255, 208, 208, 208, 255, 206, 206, 206, 255, 166, 166, 166, 255, 135, 135, 135, 255, 60, 163, 59, 255, 100, 207, 88, 255, 123, 226, 97, 255, 123, 233, 82, 255, 122, 232, 79, 255, 131, 236, 83, 255, 95, 207, 54, 255, 74, 190, 37, 255, 84, 196, 43, 255, 93, 121, 83, 255, 119, 119, 119, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 169, 169, 169, 255, 208, 208, 208, 255, 206, 206, 206, 255, 204, 204, 204, 255, 165, 165, 165, 255, 141, 141, 141, 255, 89, 179, 81, 255, 174, 255, 144, 255, 155, 255, 107, 255, 150, 252, 99, 255, 143, 245, 92, 255, 133, 236, 83, 255, 74, 190, 37, 255, 84, 196, 43, 255, 93, 200, 47, 255, 98, 124, 85, 255, 121, 121, 121, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 168, 168, 168, 255, 206, 206, 206, 255, 204, 204, 204, 255, 202, 202, 202, 255, 164, 164, 164, 255, 144, 144, 144, 255, 90, 183, 75, 255, 155, 255, 107, 255, 150, 252, 99, 255, 143, 245, 92, 255, 137, 239, 86, 255, 104, 213, 60, 255, 84, 196, 43, 255, 93, 200, 47, 255, 102, 204, 51, 255, 82, 107, 69, 255, 123, 123, 123, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 167, 167, 167, 255, 204, 204, 204, 255, 202, 202, 202, 255, 201, 201, 201, 255, 162, 162, 162, 255, 149, 149, 149, 255, 94, 187, 73, 255, 150, 252, 99, 255, 143, 245, 92, 255, 137, 239, 86, 255, 125, 228, 75, 255, 84, 196, 43, 255, 95, 201, 48, 255, 102, 204, 51, 255, 104, 206, 53, 255, 66, 91, 53, 255, 126, 126, 126, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 68, 165, 165, 165, 255, 202, 202, 202, 255, 200, 200, 200, 255, 198, 198, 198, 255, 161, 161, 161, 255, 155, 155, 155, 255, 98, 189, 74, 255, 143, 245, 92, 255, 137, 239, 86, 255, 131, 233, 80, 255, 100, 207, 54, 255, 96, 201, 48, 255, 102, 204, 51, 255, 105, 207, 54, 255, 112, 214, 61, 255, 68, 93, 55, 255, 129, 129, 129, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 44, 44, 37, 164, 164, 164, 255, 200, 200, 200, 255, 198, 198, 198, 255, 197, 197, 197, 255, 160, 160, 160, 255, 160, 160, 160, 255, 103, 184, 78, 255, 137, 239, 86, 255, 131, 233, 80, 255, 117, 221, 68, 255, 96, 201, 48, 255, 102, 204, 51, 255, 106, 208, 55, 255, 113, 215, 62, 255, 120, 222, 69, 255, 69, 95, 57, 255, 131, 131, 131, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 144, 144, 144, 255, 198, 198, 198, 255, 197, 197, 197, 255, 195, 195, 195, 255, 158, 158, 158, 255, 164, 164, 164, 255, 105, 161, 84, 255, 131, 233, 80, 255, 125, 227, 74, 255, 107, 210, 57, 255, 102, 204, 51, 255, 106, 208, 55, 255, 113, 215, 62, 255, 120, 222, 69, 255, 129, 231, 78, 255, 72, 97, 59, 255, 133, 133, 133, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, 125, 255, 197, 197, 197, 255, 195, 195, 195, 255, 193, 193, 193, 255, 156, 156, 156, 255, 169, 169, 169, 255, 107, 161, 85, 255, 125, 227, 74, 255, 119, 221, 68, 255, 105, 207, 54, 255, 106, 208, 55, 255, 113, 215, 62, 255, 120, 222, 69, 255, 129, 231, 78, 255, 135, 237, 84, 255, 73, 99, 61, 255, 136, 136, 136, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 124, 124, 255, 195, 195, 195, 255, 193, 193, 193, 255, 191, 191, 191, 255, 155, 155, 155, 255, 151, 151, 151, 255, 109, 162, 85, 255, 118, 220, 67, 255, 113, 215, 62, 255, 107, 209, 56, 255, 113, 215, 62, 255, 120, 222, 69, 255, 129, 231, 78, 255, 135, 237, 84, 255, 143, 245, 92, 255, 75, 101, 63, 255, 136, 136, 136, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 123, 123, 255, 193, 193, 193, 255, 191, 191, 191, 255, 190, 190, 190, 255, 154, 154, 154, 255, 147, 147, 147, 255, 111, 163, 86, 255, 112, 214, 61, 255, 105, 207, 54, 255, 109, 211, 58, 255, 120, 222, 69, 255, 129, 231, 78, 255, 136, 238, 85, 255, 137, 232, 89, 255, 126, 202, 87, 255, 70, 89, 61, 255, 136, 136, 137, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, 122, 255, 191, 191, 191, 255, 190, 190, 190, 255, 188, 188, 188, 255, 152, 152, 152, 255, 151, 151, 151, 255, 138, 189, 112, 255, 101, 190, 56, 255, 95, 171, 57, 255, 86, 137, 60, 255, 78, 117, 59, 255, 72, 97, 59, 255, 67, 74, 64, 255, 94, 94, 94, 255, 125, 125, 126, 255, 135, 135, 138, 255, 135, 135, 138, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 121, 121, 255, 189, 189, 189, 255, 188, 188, 188, 255, 186, 186, 186, 255, 151, 151, 151, 255, 154, 154, 154, 255, 140, 140, 140, 255, 89, 89, 89, 255, 127, 127, 127, 255, 150, 150, 150, 255, 132, 132, 132, 255, 143, 143, 143, 255, 189, 189, 189, 255, 123, 123, 123, 255, 93, 93, 94, 255, 187, 187, 194, 255, 134, 134, 139, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 120, 120, 255, 188, 188, 188, 255, 186, 186, 186, 255, 184, 184, 184, 255, 150, 150, 150, 255, 159, 159, 159, 255, 152, 152, 152, 255, 79, 79, 79, 255, 51, 51, 51, 255, 130, 130, 130, 255, 119, 119, 119, 255, 51, 51, 51, 255, 121, 121, 122, 255, 96, 96, 96, 255, 51, 51, 51, 255, 176, 176, 184, 255, 134, 134, 141, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 119, 119, 255, 186, 186, 186, 255, 184, 184, 184, 255, 182, 182, 182, 255, 149, 149, 149, 255, 162, 162, 162, 255, 147, 147, 147, 255, 157, 157, 157, 255, 51, 51, 51, 255, 92, 92, 92, 255, 60, 60, 60, 255, 51, 51, 51, 255, 104, 104, 105, 255, 51, 51, 51, 255, 61, 61, 62, 255, 186, 186, 197, 255, 133, 133, 141, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 119, 119, 255, 184, 184, 184, 255, 182, 182, 182, 255, 181, 181, 181, 255, 147, 147, 147, 255, 165, 165, 165, 255, 129, 129, 129, 255, 51, 51, 51, 255, 51, 51, 51, 255, 157, 157, 157, 255, 93, 93, 94, 255, 125, 125, 127, 255, 197, 197, 205, 255, 114, 114, 117, 255, 134, 134, 141, 255, 195, 195, 209, 255, 133, 133, 142, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 117, 117, 255, 182, 182, 182, 255, 181, 181, 181, 255, 179, 179, 179, 255, 146, 146, 146, 255, 169, 169, 169, 255, 182, 182, 182, 255, 113, 113, 113, 255, 125, 125, 125, 255, 168, 168, 168, 255, 98, 98, 98, 255, 51, 51, 51, 255, 141, 141, 146, 255, 96, 96, 96, 255, 51, 51, 51, 255, 143, 143, 154, 255, 132, 132, 143, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 120, 120, 241, 181, 181, 181, 255, 179, 179, 179, 255, 177, 177, 177, 255, 145, 145, 145, 255, 173, 173, 173, 255, 144, 144, 144, 255, 104, 104, 104, 255, 51, 51, 51, 255, 102, 102, 103, 255, 102, 102, 102, 255, 51, 51, 51, 255, 134, 134, 141, 255, 64, 64, 64, 255, 51, 51, 51, 255, 153, 153, 167, 255, 132, 132, 145, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 91, 91, 197, 179, 179, 179, 255, 177, 177, 177, 255, 175, 175, 175, 255, 143, 143, 143, 255, 177, 177, 177, 255, 147, 147, 147, 255, 104, 104, 104, 255, 51, 51, 51, 255, 103, 103, 106, 255, 51, 51, 51, 255, 61, 61, 62, 255, 164, 164, 175, 255, 102, 102, 108, 255, 71, 71, 74, 255, 193, 193, 215, 255, 131, 131, 145, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90, 196, 177, 177, 177, 255, 175, 175, 175, 255, 173, 173, 173, 255, 142, 142, 142, 255, 179, 179, 179, 255, 157, 157, 158, 255, 83, 83, 84, 255, 82, 82, 84, 255, 165, 165, 173, 255, 72, 72, 73, 255, 92, 92, 96, 255, 156, 156, 167, 255, 102, 102, 102, 255, 51, 51, 51, 255, 141, 141, 158, 255, 131, 131, 146, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90, 196, 175, 175, 175, 255, 173, 173, 173, 255, 171, 171, 171, 255, 140, 140, 140, 255, 178, 178, 180, 255, 157, 157, 159, 255, 72, 72, 72, 255, 51, 51, 51, 255, 89, 89, 90, 255, 128, 128, 128, 255, 51, 51, 51, 255, 132, 132, 144, 255, 64, 64, 64, 255, 51, 51, 51, 255, 141, 141, 159, 255, 131, 131, 148, 255, 17, 17, 17, 194, 0, 0, 0, 60, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 89, 196, 173, 173, 173, 255, 171, 171, 171, 255, 170, 170, 170, 255, 139, 139, 139, 255, 177, 177, 181, 255, 156, 156, 160, 255, 136, 136, 136, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 152, 152, 168, 255, 101, 101, 110, 255, 141, 141, 159, 255, 200, 200, 233, 255, 130, 130, 149, 255, 13, 13, 13, 188, 0, 0, 0, 58, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 89, 196, 171, 171, 171, 255, 170, 170, 170, 255, 168, 168, 168, 255, 159, 159, 159, 255, 155, 155, 161, 255, 134, 134, 140, 255, 51, 51, 51, 255, 71, 71, 74, 255, 173, 173, 189, 255, 122, 122, 132, 255, 112, 112, 121, 255, 168, 168, 187, 255, 93, 93, 95, 255, 51, 51, 51, 255, 139, 139, 161, 255, 129, 129, 149, 255, 0, 0, 0, 172, 0, 0, 0, 48, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 69, 69, 196, 170, 170, 170, 255, 168, 168, 168, 255, 166, 166, 166, 255, 164, 164, 164, 255, 134, 134, 140, 255, 186, 186, 196, 255, 102, 102, 107, 255, 92, 92, 97, 255, 151, 151, 164, 255, 128, 128, 128, 255, 51, 51, 51, 255, 91, 91, 99, 255, 70, 70, 70, 255, 51, 51, 51, 255, 129, 129, 150, 255, 110, 110, 125, 255, 0, 0, 0, 167, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 166, 168, 168, 168, 255, 166, 166, 166, 255, 164, 164, 164, 255, 163, 163, 163, 255, 133, 133, 141, 255, 144, 144, 152, 255, 157, 157, 157, 255, 51, 51, 51, 255, 91, 91, 98, 255, 51, 51, 51, 255, 51, 51, 51, 255, 91, 91, 99, 255, 51, 51, 51, 255, 80, 80, 88, 255, 177, 177, 213, 255, 90, 90, 101, 255, 0, 0, 0, 167, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 135, 166, 166, 166, 255, 164, 164, 164, 255, 163, 163, 163, 255, 161, 161, 161, 255, 133, 133, 142, 255, 133, 133, 142, 255, 51, 51, 51, 255, 51, 51, 51, 255, 121, 121, 134, 255, 91, 91, 99, 255, 140, 140, 160, 255, 198, 198, 235, 255, 207, 207, 249, 255, 206, 206, 250, 255, 205, 205, 252, 255, 89, 89, 102, 255, 0, 0, 0, 167, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 164, 164, 164, 255, 163, 163, 163, 255, 161, 161, 161, 255, 159, 159, 159, 255, 133, 133, 143, 255, 173, 173, 190, 255, 132, 132, 145, 255, 181, 181, 205, 255, 210, 210, 243, 255, 210, 210, 245, 255, 208, 208, 247, 255, 207, 207, 249, 255, 206, 206, 250, 255, 205, 205, 252, 255, 204, 204, 254, 255, 86, 86, 98, 247, 0, 0, 0, 164, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49, 134, 134, 134, 134, 255, 161, 161, 161, 255, 159, 159, 159, 255, 157, 157, 157, 255, 132, 132, 144, 255, 213, 213, 239, 255, 211, 211, 241, 255, 210, 210, 243, 255, 210, 210, 245, 255, 208, 208, 247, 255, 207, 207, 249, 255, 206, 206, 250, 255, 205, 205, 252, 255, 156, 156, 191, 255, 108, 108, 128, 255, 26, 26, 26, 217, 0, 0, 0, 142, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 46, 46, 88, 99, 99, 99, 255, 152, 152, 152, 255, 157, 157, 157, 255, 155, 155, 155, 255, 101, 101, 110, 255, 211, 211, 241, 255, 210, 210, 243, 255, 209, 209, 245, 255, 208, 208, 247, 255, 188, 188, 224, 255, 148, 148, 175, 255, 109, 109, 126, 255, 54, 54, 56, 243, 26, 26, 26, 217, 9, 9, 9, 188, 0, 0, 0, 157, 0, 0, 0, 87, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 36, 36, 36, 137, 45, 45, 45, 237, 84, 84, 84, 255, 109, 109, 109, 255, 90, 90, 94, 255, 131, 131, 147, 255, 130, 130, 148, 255, 100, 100, 112, 255, 62, 62, 67, 239, 33, 33, 33, 224, 20, 20, 20, 204, 5, 5, 5, 180, 0, 0, 0, 164, 0, 0, 0, 136, 0, 0, 0, 88, 0, 0, 0, 46, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 79, 11, 11, 11, 149, 21, 21, 21, 194, 30, 30, 30, 215, 16, 16, 16, 198, 13, 13, 13, 188, 0, 0, 0, 172, 0, 0, 0, 161, 0, 0, 0, 133, 0, 0, 0, 103, 0, 0, 0, 69, 0, 0, 0, 37, 0, 0, 0, 21, 0, 0, 0, 10, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 22, 0, 0, 0, 46, 0, 0, 0, 76, 0, 0, 0, 97, 0, 0, 0, 70, 0, 0, 0, 52, 0, 0, 0, 28, 0, 0, 0, 18, 0, 0, 0, 13, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_LogoMessageHelp(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 205, 241, 69, 193, 210, 243, 121, 201, 218, 246, 185, 208, 223, 248, 226, 210, 224, 248, 236, 211, 225, 248, 235, 210, 224, 248, 236, 209, 223, 248, 227, 202, 218, 246, 195, 193, 210, 243, 124, 188, 206, 242, 77, 181, 201, 239, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 204, 240, 58, 199, 215, 245, 168, 211, 225, 248, 235, 215, 226, 248, 252, 221, 231, 249, 254, 231, 238, 251, 255, 239, 244, 252, 255, 243, 246, 253, 255, 242, 246, 253, 255, 243, 246, 253, 255, 240, 244, 252, 255, 233, 239, 251, 255, 222, 231, 249, 254, 216, 227, 248, 252, 211, 224, 248, 240, 199, 215, 245, 171, 187, 205, 241, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, 205, 239, 93, 208, 223, 248, 226, 214, 226, 248, 253, 228, 236, 250, 255, 242, 246, 253, 255, 251, 252, 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 255, 255, 252, 253, 254, 255, 244, 247, 253, 255, 229, 236, 250, 255, 215, 226, 248, 253, 206, 219, 244, 234, 165, 181, 212, 105, 0, 0, 0, 12, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 201, 239, 12, 206, 221, 247, 218, 218, 228, 249, 254, 239, 244, 252, 255, 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 255, 255, 241, 245, 253, 255, 218, 228, 249, 254, 204, 218, 243, 233, 136, 149, 176, 75, 0, 0, 0, 13, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 211, 244, 138, 212, 225, 248, 251, 238, 242, 252, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 255, 255, 240, 245, 252, 255, 211, 224, 247, 254, 177, 193, 223, 177, 0, 0, 0, 24, 0, 0, 0, 10, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 218, 246, 199, 224, 232, 250, 254, 250, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 253, 254, 255, 227, 235, 250, 254, 193, 207, 234, 223, 0, 0, 0, 36, 0, 0, 0, 15, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 207, 221, 248, 225, 233, 239, 251, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 255, 255, 255, 228, 255, 255, 255, 215, 255, 255, 255, 203, 254, 255, 255, 199, 249, 255, 255, 194, 245, 255, 255, 190, 240, 255, 255, 185, 235, 255, 255, 187, 235, 255, 255, 196, 238, 255, 255, 211, 245, 255, 255, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 236, 241, 252, 255, 204, 218, 243, 245, 65, 71, 84, 65, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 206, 220, 247, 223, 239, 243, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 215, 255, 255, 255, 197, 247, 255, 255, 194, 245, 255, 255, 190, 241, 255, 255, 184, 235, 255, 255, 178, 229, 255, 255, 173, 223, 255, 255, 168, 219, 255, 255, 165, 216, 255, 255, 163, 214, 255, 255, 162, 213, 255, 255, 161, 211, 255, 255, 159, 209, 255, 255, 155, 205, 255, 255, 169, 212, 255, 255, 231, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 247, 253, 255, 204, 217, 243, 247, 0, 0, 0, 53, 0, 0, 0, 23, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 217, 247, 205, 235, 240, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 211, 249, 255, 255, 181, 231, 255, 255, 180, 230, 255, 255, 176, 226, 255, 255, 169, 219, 255, 255, 160, 211, 255, 255, 152, 202, 255, 255, 144, 194, 255, 255, 138, 188, 255, 255, 134, 185, 255, 255, 133, 183, 255, 255, 133, 184, 255, 255, 135, 186, 255, 255, 138, 188, 255, 255, 140, 190, 255, 255, 141, 191, 255, 255, 139, 190, 255, 255, 136, 186, 255, 255, 163, 203, 255, 255, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 238, 243, 252, 255, 191, 205, 232, 234, 0, 0, 0, 57, 0, 0, 0, 23, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 211, 244, 144, 225, 233, 250, 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 172, 219, 255, 255, 165, 215, 255, 255, 162, 213, 255, 255, 156, 206, 255, 255, 146, 197, 255, 255, 136, 186, 255, 255, 138, 181, 255, 255, 158, 188, 248, 255, 175, 194, 234, 255, 181, 196, 227, 255, 181, 196, 224, 255, 180, 195, 224, 255, 179, 196, 228, 255, 170, 192, 238, 255, 142, 180, 253, 255, 117, 168, 255, 255, 121, 171, 255, 255, 124, 174, 255, 255, 124, 174, 255, 255, 122, 172, 255, 255, 124, 172, 255, 255, 213, 237, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 228, 236, 250, 255, 162, 176, 203, 203, 0, 0, 0, 54, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181, 200, 235, 52, 212, 224, 248, 253, 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 236, 255, 255, 255, 147, 198, 255, 255, 149, 199, 255, 255, 145, 196, 255, 255, 138, 188, 255, 255, 127, 177, 255, 255, 120, 167, 255, 255, 152, 179, 232, 255, 196, 202, 216, 255, 212, 212, 212, 255, 213, 213, 213, 255, 211, 211, 211, 255, 211, 211, 211, 255, 212, 212, 212, 255, 214, 214, 214, 255, 218, 218, 218, 255, 222, 223, 225, 255, 186, 203, 237, 255, 127, 167, 249, 255, 105, 155, 255, 255, 109, 159, 255, 255, 110, 161, 255, 255, 109, 159, 255, 255, 105, 155, 255, 255, 179, 208, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 254, 255, 255, 213, 225, 248, 254, 114, 125, 146, 151, 0, 0, 0, 47, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, 219, 248, 227, 240, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 233, 255, 255, 255, 134, 184, 255, 255, 134, 185, 255, 255, 131, 181, 255, 255, 123, 174, 255, 255, 112, 162, 255, 255, 107, 154, 246, 255, 158, 177, 213, 255, 206, 206, 206, 255, 237, 237, 237, 255, 251, 251, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 250, 250, 255, 231, 231, 231, 255, 210, 218, 233, 255, 122, 161, 238, 255, 93, 143, 244, 255, 97, 148, 248, 255, 99, 149, 249, 255, 97, 147, 247, 255, 94, 144, 243, 255, 178, 206, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 247, 253, 255, 200, 213, 239, 247, 0, 0, 0, 84, 0, 0, 0, 38, 0, 0, 0, 12, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 186, 204, 238, 99, 219, 229, 249, 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 126, 174, 255, 255, 122, 172, 255, 255, 120, 170, 255, 255, 112, 163, 255, 255, 101, 152, 253, 255, 89, 140, 241, 255, 142, 164, 207, 255, 203, 203, 203, 255, 249, 249, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 233, 233, 233, 255, 201, 210, 230, 255, 95, 140, 231, 255, 84, 135, 236, 255, 89, 139, 239, 255, 90, 140, 240, 255, 88, 138, 238, 255, 89, 138, 235, 255, 208, 226, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 223, 232, 249, 255, 135, 147, 171, 190, 0, 0, 0, 69, 0, 0, 0, 27, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 208, 222, 248, 243, 245, 248, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 138, 181, 255, 255, 111, 161, 255, 255, 110, 160, 255, 255, 104, 155, 255, 255, 95, 145, 246, 255, 83, 134, 235, 255, 105, 140, 210, 255, 190, 191, 192, 255, 245, 245, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 219, 228, 247, 255, 196, 210, 238, 255, 207, 217, 237, 255, 242, 244, 246, 255, 252, 252, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 250, 250, 255, 229, 229, 229, 255, 146, 173, 225, 255, 73, 124, 225, 255, 79, 129, 230, 255, 82, 132, 232, 255, 82, 132, 232, 255, 81, 130, 230, 255, 102, 146, 232, 255, 241, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 250, 254, 255, 205, 219, 243, 252, 0, 0, 0, 102, 0, 0, 0, 49, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 187, 205, 241, 77, 215, 227, 248, 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 195, 221, 255, 255, 102, 152, 252, 255, 102, 152, 253, 255, 99, 149, 249, 255, 91, 141, 242, 255, 80, 131, 232, 255, 72, 122, 221, 255, 146, 161, 193, 255, 228, 228, 228, 255, 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 247, 252, 255, 150, 176, 229, 255, 74, 119, 210, 255, 54, 104, 205, 255, 66, 113, 206, 255, 118, 149, 212, 255, 219, 224, 236, 255, 250, 250, 250, 255, 255, 255, 255, 255, 253, 253, 253, 255, 241, 241, 241, 255, 193, 204, 227, 255, 73, 121, 218, 255, 70, 121, 222, 255, 75, 125, 226, 255, 77, 127, 227, 255, 76, 126, 226, 255, 74, 124, 223, 255, 147, 178, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 255, 255, 217, 228, 248, 255, 116, 127, 147, 185, 0, 0, 0, 77, 0, 0, 0, 29, 0, 0, 0, 7, 0, 0, 0, 1, + 0, 0, 0, 0, 202, 217, 246, 216, 237, 242, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 110, 156, 247, 255, 95, 145, 245, 255, 93, 144, 244, 255, 88, 138, 239, 255, 79, 130, 231, 255, 70, 121, 222, 255, 86, 126, 206, 255, 182, 186, 194, 255, 235, 235, 235, 255, 249, 249, 249, 255, 255, 255, 255, 255, 253, 254, 255, 255, 153, 179, 230, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 119, 149, 209, 255, 237, 238, 241, 255, 253, 253, 253, 255, 255, 255, 255, 255, 248, 248, 248, 255, 215, 221, 234, 255, 88, 131, 215, 255, 64, 114, 216, 255, 69, 119, 220, 255, 72, 122, 222, 255, 72, 122, 222, 255, 71, 121, 220, 255, 75, 122, 218, 255, 213, 226, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 240, 244, 252, 255, 189, 202, 228, 244, 0, 0, 0, 105, 0, 0, 0, 50, 0, 0, 0, 15, 0, 0, 0, 3, + 181, 201, 239, 12, 209, 222, 248, 250, 249, 250, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 184, 210, 255, 255, 88, 138, 237, 255, 88, 138, 238, 255, 85, 136, 236, 255, 79, 129, 230, 255, 71, 121, 222, 255, 63, 113, 215, 255, 102, 136, 202, 255, 205, 205, 205, 255, 222, 222, 222, 255, 244, 244, 244, 255, 255, 255, 255, 255, 229, 236, 249, 255, 73, 118, 209, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 65, 111, 203, 255, 201, 209, 225, 255, 251, 251, 251, 255, 254, 254, 254, 255, 250, 250, 250, 255, 238, 241, 247, 255, 106, 143, 217, 255, 59, 110, 211, 255, 64, 114, 215, 255, 67, 117, 218, 255, 69, 119, 219, 255, 68, 118, 217, 255, 66, 116, 214, 255, 143, 173, 232, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 252, 254, 255, 208, 221, 246, 254, 39, 43, 52, 144, 0, 0, 0, 73, 0, 0, 0, 27, 0, 0, 0, 6, + 187, 205, 241, 98, 215, 227, 249, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 114, 156, 239, 255, 82, 132, 232, 255, 82, 132, 232, 255, 78, 129, 229, 255, 72, 122, 223, 255, 64, 115, 216, 255, 58, 109, 211, 255, 74, 118, 206, 255, 117, 148, 209, 255, 130, 158, 214, 255, 159, 180, 224, 255, 175, 194, 234, 255, 124, 157, 222, 255, 53, 103, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 57, 106, 203, 255, 188, 198, 218, 255, 250, 250, 250, 255, 254, 254, 254, 255, 252, 252, 252, 255, 246, 248, 253, 255, 107, 144, 217, 255, 56, 107, 209, 255, 60, 111, 212, 255, 63, 114, 215, 255, 65, 116, 216, 255, 65, 115, 215, 255, 64, 113, 212, 255, 84, 127, 215, 255, 241, 245, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 255, 255, 216, 227, 248, 255, 107, 118, 137, 193, 0, 0, 0, 96, 0, 0, 0, 41, 0, 0, 0, 11, + 193, 210, 243, 155, 226, 234, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 222, 234, 255, 255, 81, 130, 226, 255, 77, 127, 227, 255, 76, 127, 227, 255, 73, 123, 224, 255, 67, 117, 218, 255, 60, 111, 212, 255, 56, 106, 208, 255, 53, 104, 206, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 72, 115, 200, 255, 209, 214, 225, 255, 252, 252, 252, 255, 254, 254, 254, 255, 255, 255, 255, 255, 232, 238, 249, 255, 85, 128, 213, 255, 54, 105, 207, 255, 57, 108, 209, 255, 61, 111, 212, 255, 63, 113, 213, 255, 63, 113, 212, 255, 62, 111, 210, 255, 61, 110, 208, 255, 191, 207, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 228, 236, 250, 255, 148, 161, 185, 222, 0, 0, 0, 115, 0, 0, 0, 55, 0, 0, 0, 17, + 200, 215, 245, 208, 235, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 173, 197, 245, 255, 72, 122, 221, 255, 73, 123, 222, 255, 72, 122, 222, 255, 68, 118, 219, 255, 63, 113, 214, 255, 58, 108, 210, 255, 54, 105, 207, 255, 52, 103, 205, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 53, 103, 203, 255, 127, 148, 192, 255, 241, 241, 241, 255, 254, 254, 254, 255, 253, 253, 253, 255, 255, 255, 255, 255, 197, 211, 240, 255, 58, 108, 207, 255, 53, 104, 206, 255, 56, 106, 208, 255, 58, 109, 210, 255, 60, 111, 211, 255, 61, 111, 211, 255, 60, 110, 208, 255, 59, 108, 206, 255, 143, 171, 225, 255, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 238, 243, 252, 255, 185, 197, 224, 243, 0, 0, 0, 129, 0, 0, 0, 70, 0, 0, 0, 24, + 204, 218, 246, 231, 241, 245, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 137, 169, 233, 255, 69, 118, 217, 255, 69, 119, 218, 255, 68, 118, 218, 255, 65, 115, 216, 255, 60, 111, 212, 255, 56, 107, 208, 255, 53, 104, 206, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 105, 133, 190, 255, 213, 216, 221, 255, 251, 251, 251, 255, 254, 254, 254, 255, 255, 255, 255, 255, 253, 253, 254, 255, 121, 155, 222, 255, 51, 102, 204, 255, 52, 103, 205, 255, 54, 105, 207, 255, 57, 107, 209, 255, 59, 109, 210, 255, 59, 109, 209, 255, 59, 108, 207, 255, 57, 106, 204, 255, 112, 146, 216, 255, 251, 251, 251, 255, 252, 252, 252, 255, 255, 255, 255, 255, 245, 248, 253, 255, 200, 213, 238, 251, 0, 0, 0, 140, 0, 0, 0, 84, 0, 0, 0, 32, + 208, 221, 247, 246, 246, 249, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 110, 148, 223, 255, 65, 114, 213, 255, 66, 115, 215, 255, 65, 115, 215, 255, 62, 112, 213, 255, 58, 109, 210, 255, 55, 106, 207, 255, 52, 103, 205, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 97, 129, 189, 255, 200, 201, 205, 255, 247, 247, 247, 255, 254, 254, 254, 255, 254, 254, 254, 255, 255, 255, 255, 255, 178, 197, 236, 255, 56, 106, 205, 255, 51, 102, 204, 255, 52, 103, 205, 255, 54, 104, 206, 255, 56, 106, 207, 255, 57, 108, 208, 255, 58, 108, 208, 255, 57, 106, 205, 255, 56, 105, 203, 255, 96, 134, 211, 255, 244, 245, 248, 255, 250, 250, 250, 255, 253, 253, 253, 255, 249, 250, 254, 255, 206, 218, 244, 253, 0, 0, 0, 147, 0, 0, 0, 95, 0, 0, 0, 39, + 209, 222, 247, 250, 248, 250, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 253, 255, 255, 100, 139, 218, 255, 62, 111, 210, 255, 63, 112, 212, 255, 62, 112, 212, 255, 60, 110, 211, 255, 57, 108, 209, 255, 54, 105, 207, 255, 52, 103, 205, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 99, 128, 187, 255, 188, 190, 194, 255, 243, 243, 243, 255, 254, 254, 254, 255, 253, 253, 253, 255, 255, 255, 255, 255, 189, 205, 238, 255, 71, 117, 209, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 103, 205, 255, 53, 104, 206, 255, 55, 105, 207, 255, 56, 106, 207, 255, 56, 106, 206, 255, 56, 105, 204, 255, 54, 103, 201, 255, 92, 132, 209, 255, 238, 240, 244, 255, 249, 249, 249, 255, 252, 252, 252, 255, 251, 252, 254, 255, 208, 221, 246, 254, 0, 0, 0, 153, 0, 0, 0, 105, 0, 0, 0, 45, + 208, 221, 247, 250, 248, 250, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 247, 252, 255, 95, 135, 215, 255, 59, 109, 207, 255, 60, 110, 209, 255, 60, 110, 210, 255, 59, 109, 210, 255, 56, 107, 208, 255, 54, 105, 206, 255, 52, 103, 205, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 96, 126, 186, 255, 177, 179, 186, 255, 241, 241, 241, 255, 254, 254, 254, 255, 253, 253, 253, 255, 255, 255, 255, 255, 188, 205, 238, 255, 72, 118, 209, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 103, 204, 255, 53, 104, 205, 255, 54, 105, 206, 255, 55, 105, 206, 255, 55, 105, 205, 255, 54, 104, 202, 255, 53, 102, 200, 255, 90, 129, 207, 255, 234, 237, 243, 255, 247, 247, 247, 255, 250, 250, 250, 255, 250, 251, 253, 255, 208, 221, 246, 255, 0, 0, 0, 157, 0, 0, 0, 112, 0, 0, 0, 48, + 208, 221, 247, 249, 248, 250, 254, 255, 255, 255, 255, 255, 253, 253, 253, 255, 250, 250, 251, 255, 98, 136, 213, 255, 57, 106, 204, 255, 58, 108, 206, 255, 58, 108, 208, 255, 58, 108, 209, 255, 56, 106, 208, 255, 54, 104, 206, 255, 52, 103, 205, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 80, 117, 190, 255, 172, 174, 179, 255, 236, 236, 236, 255, 254, 254, 254, 255, 253, 253, 253, 255, 255, 255, 255, 255, 191, 207, 239, 255, 67, 114, 208, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 103, 204, 255, 53, 104, 205, 255, 54, 104, 206, 255, 54, 105, 205, 255, 54, 104, 204, 255, 53, 102, 201, 255, 52, 101, 198, 255, 91, 130, 207, 255, 238, 239, 242, 255, 246, 246, 246, 255, 249, 249, 249, 255, 248, 249, 252, 255, 206, 218, 244, 254, 0, 0, 0, 159, 0, 0, 0, 115, 0, 0, 0, 51, + 205, 219, 246, 238, 243, 247, 253, 255, 255, 255, 255, 255, 252, 252, 252, 255, 250, 250, 250, 255, 121, 153, 217, 255, 55, 104, 202, 255, 56, 106, 204, 255, 57, 107, 206, 255, 57, 107, 207, 255, 55, 106, 207, 255, 54, 104, 206, 255, 52, 103, 205, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 53, 103, 203, 255, 129, 146, 180, 255, 215, 215, 215, 255, 251, 251, 251, 255, 254, 254, 254, 255, 255, 255, 255, 255, 195, 210, 240, 255, 71, 117, 209, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 103, 204, 255, 53, 103, 205, 255, 53, 104, 205, 255, 54, 104, 204, 255, 53, 103, 202, 255, 52, 101, 199, 255, 51, 100, 197, 255, 99, 135, 207, 255, 243, 243, 243, 255, 245, 245, 245, 255, 248, 248, 248, 255, 244, 247, 251, 255, 203, 216, 241, 252, 0, 0, 0, 160, 0, 0, 0, 117, 0, 0, 0, 51, + 200, 215, 244, 216, 237, 242, 252, 255, 254, 254, 254, 255, 251, 251, 251, 255, 248, 248, 248, 255, 146, 171, 222, 255, 54, 102, 200, 255, 55, 104, 202, 255, 56, 105, 204, 255, 56, 106, 206, 255, 55, 106, 207, 255, 54, 104, 206, 255, 52, 103, 205, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 62, 108, 199, 255, 159, 166, 182, 255, 236, 236, 236, 255, 254, 254, 254, 255, 253, 253, 253, 255, 234, 239, 250, 255, 93, 134, 215, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 103, 205, 255, 53, 103, 205, 255, 53, 104, 205, 255, 53, 103, 203, 255, 52, 102, 201, 255, 51, 100, 198, 255, 50, 98, 195, 255, 127, 155, 212, 255, 242, 242, 242, 255, 244, 244, 244, 255, 248, 248, 248, 255, 239, 243, 251, 255, 192, 204, 231, 248, 0, 0, 0, 159, 0, 0, 0, 114, 0, 0, 0, 50, + 194, 210, 242, 164, 228, 235, 250, 255, 253, 253, 253, 255, 250, 250, 250, 255, 247, 247, 247, 255, 184, 199, 231, 255, 54, 102, 198, 255, 53, 102, 200, 255, 54, 104, 203, 255, 55, 105, 205, 255, 55, 105, 206, 255, 54, 104, 206, 255, 53, 103, 205, 255, 52, 103, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 68, 111, 197, 255, 168, 175, 187, 255, 243, 243, 243, 255, 254, 254, 254, 255, 255, 255, 255, 255, 209, 221, 244, 255, 60, 109, 206, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 103, 205, 255, 53, 103, 205, 255, 53, 103, 204, 255, 52, 102, 202, 255, 51, 101, 199, 255, 50, 99, 196, 255, 49, 98, 194, 255, 161, 180, 221, 255, 241, 241, 241, 255, 244, 244, 244, 255, 248, 248, 248, 255, 231, 237, 250, 255, 161, 174, 199, 235, 0, 0, 0, 155, 0, 0, 0, 109, 0, 0, 0, 46, + 189, 206, 241, 116, 215, 227, 248, 254, 252, 253, 253, 255, 250, 250, 250, 255, 247, 247, 247, 255, 225, 230, 240, 255, 70, 113, 201, 255, 52, 101, 198, 255, 53, 102, 200, 255, 54, 104, 203, 255, 54, 104, 205, 255, 54, 104, 205, 255, 53, 104, 205, 255, 52, 103, 205, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 69, 112, 198, 255, 175, 180, 190, 255, 245, 245, 245, 255, 253, 253, 253, 255, 255, 255, 255, 255, 202, 215, 242, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 103, 204, 255, 52, 103, 204, 255, 52, 103, 204, 255, 52, 102, 203, 255, 52, 101, 200, 255, 51, 99, 197, 255, 49, 98, 194, 255, 57, 103, 194, 255, 209, 216, 232, 255, 241, 241, 241, 255, 245, 245, 245, 255, 249, 249, 249, 255, 218, 228, 248, 255, 118, 128, 149, 216, 0, 0, 0, 150, 0, 0, 0, 100, 0, 0, 0, 41, + 182, 201, 239, 35, 209, 222, 247, 253, 249, 250, 252, 255, 250, 250, 250, 255, 246, 246, 246, 255, 243, 243, 244, 255, 124, 154, 213, 255, 51, 99, 196, 255, 52, 101, 198, 255, 53, 102, 201, 255, 53, 103, 203, 255, 54, 104, 205, 255, 53, 104, 205, 255, 52, 103, 205, 255, 52, 103, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 65, 110, 200, 255, 143, 160, 195, 255, 202, 213, 236, 255, 206, 218, 242, 255, 211, 222, 244, 255, 161, 184, 231, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 103, 204, 255, 52, 103, 204, 255, 52, 102, 203, 255, 52, 101, 201, 255, 51, 100, 198, 255, 50, 98, 195, 255, 49, 97, 193, 255, 100, 134, 204, 255, 236, 237, 238, 255, 242, 242, 242, 255, 245, 245, 245, 255, 246, 247, 249, 255, 208, 221, 246, 254, 57, 62, 73, 189, 0, 0, 0, 142, 0, 0, 0, 88, 0, 0, 0, 34, + 0, 0, 0, 0, 203, 217, 245, 231, 240, 244, 252, 255, 250, 250, 250, 255, 247, 247, 247, 255, 244, 244, 244, 255, 188, 202, 229, 255, 52, 100, 196, 255, 51, 99, 196, 255, 52, 101, 199, 255, 52, 102, 201, 255, 53, 103, 203, 255, 53, 103, 204, 255, 53, 103, 205, 255, 52, 103, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 103, 204, 255, 61, 108, 203, 255, 69, 115, 208, 255, 69, 116, 208, 255, 71, 117, 209, 255, 63, 111, 207, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 102, 204, 255, 52, 103, 204, 255, 52, 102, 203, 255, 52, 102, 202, 255, 51, 100, 199, 255, 50, 99, 196, 255, 49, 97, 193, 255, 48, 96, 191, 255, 172, 189, 221, 255, 239, 239, 239, 255, 242, 242, 242, 255, 246, 246, 246, 255, 240, 243, 249, 255, 194, 208, 233, 250, 0, 0, 0, 166, 0, 0, 0, 133, 0, 0, 0, 75, 0, 0, 0, 27, + 0, 0, 0, 0, 190, 207, 241, 131, 217, 228, 248, 254, 251, 251, 251, 255, 247, 247, 247, 255, 244, 244, 244, 255, 234, 236, 240, 255, 112, 144, 208, 255, 50, 98, 194, 255, 51, 99, 196, 255, 51, 101, 199, 255, 52, 102, 201, 255, 53, 103, 203, 255, 52, 103, 204, 255, 52, 103, 204, 255, 52, 103, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 102, 204, 255, 52, 102, 204, 255, 52, 102, 203, 255, 51, 102, 202, 255, 51, 100, 200, 255, 50, 99, 197, 255, 49, 97, 194, 255, 48, 96, 192, 255, 96, 132, 202, 255, 226, 228, 235, 255, 240, 240, 240, 255, 243, 243, 243, 255, 247, 247, 247, 255, 222, 231, 247, 255, 145, 156, 180, 229, 0, 0, 0, 160, 0, 0, 0, 120, 0, 0, 0, 60, 0, 0, 0, 19, + 0, 0, 0, 0, 0, 0, 0, 0, 207, 220, 245, 252, 247, 248, 251, 255, 249, 249, 249, 255, 245, 245, 245, 255, 242, 242, 242, 255, 194, 206, 229, 255, 58, 104, 195, 255, 50, 98, 194, 255, 50, 99, 196, 255, 51, 100, 199, 255, 52, 101, 201, 255, 52, 102, 203, 255, 52, 103, 204, 255, 52, 103, 204, 255, 52, 103, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 68, 112, 201, 255, 134, 163, 220, 255, 156, 180, 229, 255, 119, 151, 216, 255, 54, 104, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 52, 102, 204, 255, 52, 102, 204, 255, 52, 102, 203, 255, 51, 101, 202, 255, 51, 100, 200, 255, 50, 99, 197, 255, 49, 97, 194, 255, 48, 96, 192, 255, 54, 100, 192, 255, 176, 191, 222, 255, 238, 238, 238, 255, 241, 241, 241, 255, 245, 245, 245, 255, 246, 247, 249, 255, 208, 221, 245, 254, 20, 22, 26, 179, 0, 0, 0, 150, 0, 0, 0, 102, 0, 0, 0, 46, 0, 0, 0, 12, + 0, 0, 0, 0, 0, 0, 0, 0, 182, 197, 228, 174, 223, 232, 249, 255, 250, 250, 250, 255, 246, 246, 246, 255, 243, 243, 243, 255, 238, 239, 240, 255, 140, 165, 214, 255, 49, 97, 192, 255, 49, 97, 194, 255, 50, 99, 196, 255, 51, 100, 198, 255, 51, 101, 200, 255, 52, 102, 202, 255, 52, 102, 203, 255, 52, 102, 204, 255, 52, 102, 204, 255, 52, 102, 204, 255, 67, 110, 198, 255, 151, 162, 185, 255, 238, 238, 238, 255, 252, 252, 252, 255, 237, 237, 239, 255, 156, 176, 217, 255, 53, 103, 204, 255, 51, 102, 204, 255, 51, 102, 204, 255, 51, 102, 203, 255, 51, 102, 202, 255, 51, 101, 201, 255, 50, 100, 199, 255, 50, 99, 197, 255, 49, 97, 194, 255, 48, 96, 192, 255, 48, 95, 190, 255, 127, 155, 209, 255, 234, 235, 236, 255, 239, 239, 239, 255, 243, 243, 243, 255, 247, 247, 247, 255, 229, 236, 249, 255, 164, 177, 202, 237, 0, 0, 0, 166, 0, 0, 0, 135, 0, 0, 0, 81, 0, 0, 0, 31, 0, 0, 0, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 206, 219, 245, 249, 244, 246, 250, 255, 248, 248, 248, 255, 244, 244, 244, 255, 241, 241, 241, 255, 233, 234, 237, 255, 110, 142, 207, 255, 48, 96, 192, 255, 49, 97, 193, 255, 49, 98, 196, 255, 50, 99, 198, 255, 51, 100, 200, 255, 51, 101, 201, 255, 51, 102, 202, 255, 52, 102, 203, 255, 52, 102, 203, 255, 105, 131, 183, 255, 182, 182, 182, 255, 240, 240, 240, 255, 253, 253, 253, 255, 245, 245, 245, 255, 234, 234, 234, 255, 113, 147, 213, 255, 51, 102, 203, 255, 51, 102, 203, 255, 51, 101, 202, 255, 51, 101, 200, 255, 50, 100, 199, 255, 49, 98, 197, 255, 49, 97, 194, 255, 48, 96, 192, 255, 47, 95, 190, 255, 98, 132, 201, 255, 222, 226, 232, 255, 238, 238, 238, 255, 241, 241, 241, 255, 245, 245, 245, 255, 245, 246, 249, 255, 206, 219, 244, 254, 9, 9, 11, 176, 0, 0, 0, 156, 0, 0, 0, 114, 0, 0, 0, 58, 0, 0, 0, 18, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 168, 183, 214, 143, 216, 226, 247, 254, 249, 250, 250, 255, 246, 246, 246, 255, 242, 242, 242, 255, 240, 240, 240, 255, 217, 222, 232, 255, 94, 131, 202, 255, 48, 96, 191, 255, 48, 96, 193, 255, 49, 97, 194, 255, 50, 98, 196, 255, 50, 99, 198, 255, 50, 100, 200, 255, 51, 101, 201, 255, 51, 101, 202, 255, 121, 140, 178, 255, 186, 186, 186, 255, 239, 239, 239, 255, 252, 252, 252, 255, 253, 253, 253, 255, 253, 253, 253, 255, 143, 168, 222, 255, 51, 101, 201, 255, 51, 101, 200, 255, 50, 100, 199, 255, 50, 99, 197, 255, 49, 98, 195, 255, 48, 97, 193, 255, 48, 96, 191, 255, 47, 95, 189, 255, 92, 128, 199, 255, 211, 218, 230, 255, 237, 237, 237, 255, 240, 240, 240, 255, 243, 243, 243, 255, 247, 247, 247, 255, 217, 226, 246, 255, 130, 141, 164, 222, 0, 0, 0, 166, 0, 0, 0, 138, 0, 0, 0, 87, 0, 0, 0, 37, 0, 0, 0, 9, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 17, 192, 207, 233, 223, 232, 238, 249, 255, 248, 248, 248, 255, 245, 245, 245, 255, 241, 241, 241, 255, 239, 239, 239, 255, 218, 223, 232, 255, 112, 143, 205, 255, 48, 95, 190, 255, 48, 96, 191, 255, 48, 97, 193, 255, 49, 97, 195, 255, 49, 98, 196, 255, 50, 99, 198, 255, 50, 100, 199, 255, 105, 132, 186, 255, 191, 191, 191, 255, 228, 228, 228, 255, 248, 248, 248, 255, 250, 250, 250, 255, 245, 246, 249, 255, 109, 144, 214, 255, 50, 99, 199, 255, 50, 99, 197, 255, 49, 98, 196, 255, 49, 97, 194, 255, 48, 96, 192, 255, 47, 95, 190, 255, 47, 94, 188, 255, 98, 132, 200, 255, 211, 216, 228, 255, 236, 236, 236, 255, 239, 239, 239, 255, 242, 242, 242, 255, 246, 246, 246, 255, 235, 240, 248, 255, 184, 197, 223, 246, 0, 0, 0, 171, 0, 0, 0, 153, 0, 0, 0, 112, 0, 0, 0, 58, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 30, 204, 216, 242, 247, 241, 244, 249, 255, 247, 247, 247, 255, 244, 244, 244, 255, 240, 240, 240, 255, 238, 238, 238, 255, 233, 234, 235, 255, 142, 165, 212, 255, 60, 104, 192, 255, 47, 95, 190, 255, 48, 96, 191, 255, 48, 96, 192, 255, 49, 97, 194, 255, 49, 98, 195, 255, 62, 106, 194, 255, 152, 167, 196, 255, 215, 215, 215, 255, 247, 247, 247, 255, 242, 243, 245, 255, 155, 177, 223, 255, 50, 99, 196, 255, 49, 97, 195, 255, 48, 97, 193, 255, 48, 96, 192, 255, 47, 95, 190, 255, 47, 94, 189, 255, 55, 100, 189, 255, 129, 156, 208, 255, 221, 224, 231, 255, 236, 236, 236, 255, 238, 238, 238, 255, 241, 241, 241, 255, 245, 245, 245, 255, 242, 244, 248, 255, 204, 217, 242, 253, 4, 5, 6, 175, 0, 0, 0, 161, 0, 0, 0, 128, 0, 0, 0, 79, 0, 0, 0, 32, 0, 0, 0, 8, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 14, 101, 111, 131, 80, 207, 220, 245, 253, 245, 247, 250, 255, 246, 246, 246, 255, 243, 243, 243, 255, 240, 240, 240, 255, 238, 238, 238, 255, 236, 236, 236, 255, 185, 198, 222, 255, 100, 134, 201, 255, 47, 94, 188, 255, 47, 95, 189, 255, 47, 95, 190, 255, 48, 96, 191, 255, 48, 96, 192, 255, 57, 102, 193, 255, 113, 142, 202, 255, 136, 160, 211, 255, 111, 143, 208, 255, 48, 96, 193, 255, 48, 96, 192, 255, 48, 95, 191, 255, 47, 95, 190, 255, 47, 94, 189, 255, 47, 94, 188, 255, 100, 134, 200, 255, 176, 190, 219, 255, 234, 234, 234, 255, 236, 236, 236, 255, 238, 238, 238, 255, 241, 241, 241, 255, 245, 245, 245, 255, 244, 246, 248, 255, 206, 218, 243, 254, 66, 73, 86, 197, 0, 0, 0, 166, 0, 0, 0, 140, 0, 0, 0, 95, 0, 0, 0, 46, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 20, 127, 139, 164, 117, 207, 220, 245, 253, 242, 244, 249, 255, 246, 246, 246, 255, 243, 243, 243, 255, 240, 240, 240, 255, 238, 238, 238, 255, 235, 235, 235, 255, 223, 226, 231, 255, 173, 187, 217, 255, 105, 135, 196, 255, 58, 101, 188, 255, 48, 95, 188, 255, 47, 94, 189, 255, 47, 94, 189, 255, 47, 95, 189, 255, 47, 95, 190, 255, 47, 95, 190, 255, 47, 94, 189, 255, 47, 94, 189, 255, 49, 95, 188, 255, 59, 103, 190, 255, 108, 139, 202, 255, 170, 186, 217, 255, 222, 224, 230, 255, 234, 234, 234, 255, 236, 236, 236, 255, 239, 239, 239, 255, 242, 242, 242, 255, 245, 245, 245, 255, 242, 244, 248, 255, 207, 219, 244, 254, 69, 76, 89, 198, 0, 0, 0, 168, 0, 0, 0, 147, 0, 0, 0, 106, 0, 0, 0, 57, 0, 0, 0, 22, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 25, 84, 93, 110, 96, 203, 217, 242, 250, 234, 238, 248, 255, 246, 247, 247, 255, 244, 244, 244, 255, 241, 241, 241, 255, 238, 238, 238, 255, 236, 236, 236, 255, 234, 234, 234, 255, 226, 226, 227, 255, 190, 195, 206, 255, 144, 160, 192, 255, 117, 142, 192, 255, 98, 129, 193, 255, 88, 124, 194, 255, 89, 125, 195, 255, 92, 127, 198, 255, 104, 136, 202, 255, 133, 158, 209, 255, 169, 185, 217, 255, 204, 211, 226, 255, 230, 231, 232, 255, 233, 233, 233, 255, 235, 235, 235, 255, 237, 237, 237, 255, 240, 240, 240, 255, 243, 243, 243, 255, 246, 246, 246, 255, 236, 240, 248, 255, 204, 217, 242, 253, 64, 71, 83, 197, 0, 0, 0, 168, 0, 0, 0, 148, 0, 0, 0, 112, 0, 0, 0, 66, 0, 0, 0, 27, 0, 0, 0, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 9, 0, 0, 0, 30, 11, 12, 14, 70, 187, 202, 229, 235, 214, 225, 245, 255, 243, 245, 248, 255, 245, 245, 245, 255, 242, 242, 242, 255, 240, 240, 240, 255, 238, 238, 238, 255, 235, 235, 235, 255, 229, 229, 229, 255, 219, 219, 219, 255, 208, 208, 208, 255, 212, 212, 212, 255, 220, 220, 220, 255, 232, 232, 232, 255, 234, 234, 234, 255, 234, 234, 234, 255, 234, 234, 234, 255, 234, 234, 234, 255, 233, 233, 233, 255, 235, 235, 235, 255, 237, 237, 237, 255, 238, 238, 238, 255, 241, 241, 241, 255, 244, 244, 244, 255, 243, 245, 247, 255, 219, 228, 245, 255, 188, 201, 227, 247, 27, 30, 36, 183, 0, 0, 0, 166, 0, 0, 0, 147, 0, 0, 0, 112, 0, 0, 0, 69, 0, 0, 0, 32, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 10, 0, 0, 0, 30, 0, 0, 0, 64, 145, 157, 182, 188, 206, 219, 244, 253, 228, 235, 248, 255, 244, 245, 247, 255, 245, 245, 245, 255, 243, 243, 243, 255, 241, 241, 241, 255, 240, 240, 240, 255, 238, 238, 238, 255, 237, 237, 237, 255, 237, 237, 237, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 237, 237, 237, 255, 238, 238, 238, 255, 239, 239, 239, 255, 240, 240, 240, 255, 242, 242, 242, 255, 244, 244, 244, 255, 243, 244, 246, 255, 230, 236, 248, 255, 207, 220, 245, 254, 142, 154, 178, 228, 0, 0, 0, 172, 0, 0, 0, 162, 0, 0, 0, 141, 0, 0, 0, 107, 0, 0, 0, 67, 0, 0, 0, 32, 0, 0, 0, 11, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 9, 0, 0, 0, 26, 0, 0, 0, 56, 8, 9, 10, 96, 170, 184, 210, 225, 208, 221, 245, 254, 220, 229, 247, 255, 238, 241, 247, 255, 243, 244, 246, 255, 244, 244, 244, 255, 243, 243, 243, 255, 242, 242, 242, 255, 241, 241, 241, 255, 241, 241, 241, 255, 240, 240, 240, 255, 241, 241, 241, 255, 241, 241, 241, 255, 241, 241, 241, 255, 242, 242, 242, 255, 244, 244, 244, 255, 243, 244, 245, 255, 239, 241, 247, 255, 222, 230, 246, 255, 208, 221, 245, 254, 172, 185, 211, 241, 12, 13, 16, 177, 0, 0, 0, 167, 0, 0, 0, 154, 0, 0, 0, 131, 0, 0, 0, 97, 0, 0, 0, 59, 0, 0, 0, 29, 0, 0, 0, 10, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 21, 0, 0, 0, 45, 0, 0, 0, 77, 0, 0, 0, 110, 156, 169, 195, 218, 198, 210, 236, 250, 208, 221, 245, 254, 217, 227, 247, 255, 228, 234, 247, 255, 236, 240, 247, 255, 238, 241, 246, 255, 242, 243, 246, 255, 242, 243, 245, 255, 242, 243, 245, 255, 239, 242, 246, 255, 236, 239, 246, 255, 230, 236, 247, 255, 218, 228, 247, 255, 208, 221, 245, 254, 198, 211, 236, 251, 151, 163, 188, 231, 0, 0, 0, 172, 0, 0, 0, 166, 0, 0, 0, 157, 0, 0, 0, 139, 0, 0, 0, 114, 0, 0, 0, 81, 0, 0, 0, 48, 0, 0, 0, 22, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 14, 0, 0, 0, 32, 0, 0, 0, 56, 0, 0, 0, 86, 0, 0, 0, 114, 66, 72, 85, 162, 122, 132, 154, 204, 158, 170, 195, 229, 192, 205, 231, 248, 200, 213, 238, 251, 206, 218, 243, 254, 208, 221, 245, 254, 207, 220, 245, 254, 201, 215, 239, 252, 192, 205, 231, 249, 171, 184, 210, 240, 121, 132, 153, 217, 62, 68, 81, 192, 0, 0, 0, 166, 0, 0, 0, 161, 0, 0, 0, 151, 0, 0, 0, 136, 0, 0, 0, 115, 0, 0, 0, 88, 0, 0, 0, 59, 0, 0, 0, 34, 0, 0, 0, 16, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 18, 0, 0, 0, 35, 0, 0, 0, 57, 0, 0, 0, 81, 0, 0, 0, 103, 0, 0, 0, 120, 0, 0, 0, 133, 0, 0, 0, 142, 0, 0, 0, 150, 0, 0, 0, 154, 0, 0, 0, 158, 0, 0, 0, 159, 0, 0, 0, 159, 0, 0, 0, 155, 0, 0, 0, 151, 0, 0, 0, 144, 0, 0, 0, 134, 0, 0, 0, 121, 0, 0, 0, 104, 0, 0, 0, 82, 0, 0, 0, 58, 0, 0, 0, 37, 0, 0, 0, 20, 0, 0, 0, 9, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 31, 0, 0, 0, 46, 0, 0, 0, 60, 0, 0, 0, 74, 0, 0, 0, 88, 0, 0, 0, 99, 0, 0, 0, 107, 0, 0, 0, 113, 0, 0, 0, 115, 0, 0, 0, 114, 0, 0, 0, 109, 0, 0, 0, 102, 0, 0, 0, 91, 0, 0, 0, 77, 0, 0, 0, 62, 0, 0, 0, 46, 0, 0, 0, 32, 0, 0, 0, 18, 0, 0, 0, 9, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(48, 48, imgdata); + return image; +} + +static Ihandle* load_image_LogoTecgrafPUC_Rio(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 167, 173, 184, 178, 176, 185, 201, 250, 177, 185, 202, 250, 177, 185, 202, 250, 177, 186, 202, 250, 177, 186, 202, 250, 177, 186, 202, 250, 177, 186, 202, 250, 177, 186, 203, 250, 177, 186, 203, 250, 178, 186, 203, 250, 178, 186, 203, 250, 178, 186, 203, 250, 178, 186, 203, 250, 178, 186, 203, 250, 178, 186, 203, 250, 178, 186, 203, 250, 178, 186, 203, 250, 178, 186, 203, 250, 178, 186, 203, 250, 178, 186, 203, 250, 178, 186, 204, 250, 178, 186, 204, 250, 178, 187, 204, 250, 178, 187, 204, 250, 178, 187, 204, 250, 178, 187, 204, 250, 178, 187, 204, 250, 178, 187, 204, 250, 179, 187, 204, 250, 179, 188, 204, 250, 179, 188, 204, 250, 181, 190, 206, 239, 229, 232, 238, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 206, 211, 220, 80, 177, 186, 204, 121, 159, 171, 195, 121, 159, 172, 198, 136, 188, 198, 217, 250, 189, 199, 218, 250, 189, 199, 218, 250, 189, 199, 218, 250, 189, 199, 219, 250, 189, 199, 219, 250, 189, 199, 219, 250, 176, 186, 207, 178, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 102, 105, 110, 249, 105, 117, 141, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 173, 255, 127, 143, 173, 255, 127, 143, 173, 255, 128, 143, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 128, 144, 174, 255, 128, 144, 174, 255, 128, 144, 174, 255, 128, 144, 174, 255, 128, 145, 174, 255, 128, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 146, 176, 255, 129, 146, 176, 255, 129, 146, 176, 255, 130, 146, 176, 255, 130, 146, 176, 255, 130, 146, 176, 255, 130, 146, 176, 255, 130, 146, 177, 255, 130, 147, 177, 255, 133, 150, 181, 255, 153, 169, 201, 255, 230, 233, 239, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 143, 158, 22, 143, 153, 172, 205, 139, 154, 183, 252, 146, 164, 197, 255, 147, 166, 199, 255, 149, 167, 201, 255, 150, 168, 203, 255, 151, 170, 204, 255, 151, 170, 204, 255, 151, 170, 204, 255, 151, 170, 204, 255, 152, 170, 205, 255, 152, 171, 205, 255, 143, 157, 184, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 100, 104, 249, 80, 90, 108, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 113, 126, 152, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 122, 137, 164, 255, 155, 172, 203, 255, 230, 233, 239, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 200, 204, 106, 124, 134, 151, 246, 125, 141, 170, 255, 130, 147, 176, 255, 130, 146, 175, 255, 130, 146, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 130, 145, 175, 255, 130, 146, 176, 255, 135, 148, 173, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 100, 104, 249, 80, 90, 108, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 113, 126, 152, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 122, 137, 164, 255, 155, 172, 203, 255, 230, 233, 239, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 201, 202, 23, 116, 122, 132, 212, 110, 123, 149, 255, 128, 144, 174, 255, 129, 144, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 128, 140, 164, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 100, 104, 249, 80, 89, 108, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 113, 126, 152, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 154, 255, 122, 136, 164, 255, 155, 172, 203, 255, 230, 233, 239, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 121, 126, 53, 90, 98, 112, 255, 121, 136, 164, 255, 128, 144, 174, 255, 128, 144, 174, 255, 129, 144, 174, 255, 129, 144, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 129, 145, 175, 255, 120, 132, 153, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 100, 104, 249, 80, 89, 108, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 113, 126, 152, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 121, 136, 164, 255, 155, 172, 203, 255, 230, 233, 239, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 171, 172, 75, 84, 100, 255, 124, 140, 168, 255, 128, 144, 173, 255, 128, 144, 174, 255, 128, 144, 174, 255, 128, 144, 174, 255, 129, 144, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 129, 145, 175, 255, 128, 144, 174, 255, 112, 123, 143, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 100, 104, 249, 80, 89, 108, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 113, 126, 152, 255, 113, 127, 152, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 121, 136, 163, 255, 155, 172, 203, 255, 230, 233, 239, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 227, 232, 99, 226, 229, 234, 105, 227, 230, 236, 105, 228, 231, 236, 105, 227, 230, 236, 105, 227, 230, 235, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 227, 231, 5, 215, 218, 225, 105, 182, 189, 203, 105, 173, 182, 200, 105, 151, 164, 187, 105, 156, 169, 193, 105, 159, 172, 197, 105, 163, 176, 199, 105, 183, 193, 212, 105, 191, 200, 217, 105, 211, 217, 228, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 226, 229, 235, 104, 202, 209, 220, 105, 204, 210, 222, 105, 206, 213, 225, 105, 207, 214, 226, 105, 206, 212, 224, 105, 218, 223, 232, 61, 230, 233, 239, 95, 229, 232, 238, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 145, 148, 182, 74, 84, 101, 255, 126, 142, 170, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 128, 144, 174, 255, 128, 144, 174, 255, 129, 144, 174, 255, 129, 144, 174, 255, 129, 145, 174, 255, 125, 140, 169, 255, 115, 129, 155, 255, 112, 126, 151, 255, 118, 132, 160, 255, 105, 114, 132, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 100, 104, 249, 78, 87, 105, 255, 107, 120, 144, 255, 107, 120, 144, 255, 107, 120, 144, 255, 107, 120, 144, 255, 107, 120, 144, 255, 107, 120, 144, 255, 107, 120, 145, 255, 107, 120, 145, 255, 107, 120, 145, 255, 109, 122, 148, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 111, 125, 151, 255, 109, 122, 147, 255, 109, 122, 146, 255, 109, 122, 147, 255, 109, 122, 147, 255, 109, 122, 147, 255, 109, 122, 147, 255, 109, 122, 147, 255, 109, 122, 147, 255, 109, 122, 147, 255, 116, 131, 157, 255, 151, 169, 201, 247, 230, 233, 239, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 222, 226, 1, 195, 199, 207, 102, 159, 167, 182, 165, 165, 174, 190, 231, 151, 162, 184, 231, 137, 152, 178, 231, 139, 154, 182, 254, 143, 158, 186, 255, 146, 162, 191, 255, 148, 164, 193, 255, 149, 165, 194, 255, 150, 166, 196, 246, 158, 174, 203, 231, 172, 186, 211, 231, 188, 199, 219, 231, 178, 191, 214, 123, 206, 214, 229, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 183, 188, 197, 61, 136, 147, 166, 112, 152, 163, 183, 231, 137, 150, 176, 232, 138, 153, 181, 255, 139, 155, 184, 255, 141, 157, 187, 255, 139, 156, 187, 255, 141, 158, 189, 255, 143, 160, 191, 255, 146, 164, 196, 255, 150, 167, 200, 255, 154, 172, 204, 255, 158, 176, 209, 244, 171, 186, 216, 231, 188, 200, 223, 231, 184, 197, 221, 114, 196, 207, 226, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 201, 210, 71, 156, 166, 184, 102, 164, 174, 194, 189, 165, 176, 199, 231, 162, 176, 201, 231, 156, 171, 200, 231, 166, 181, 208, 231, 175, 189, 214, 231, 185, 197, 220, 219, 172, 187, 214, 102, 213, 220, 234, 95, 167, 169, 172, 6, 168, 173, 183, 173, 187, 196, 214, 231, 187, 196, 214, 231, 187, 196, 214, 231, 188, 197, 214, 231, 188, 197, 214, 231, 188, 197, 214, 231, 188, 197, 214, 231, 188, 197, 214, 231, 188, 197, 214, 231, 188, 197, 214, 231, 185, 194, 211, 231, 213, 217, 225, 72, 0, 0, 0, 0, 0, 0, 0, 0, 167, 174, 187, 137, 188, 196, 214, 231, 189, 197, 215, 231, 189, 198, 215, 231, 189, 198, 215, 231, 189, 198, 215, 231, 189, 198, 215, 231, 189, 198, 215, 231, 189, 198, 215, 231, 189, 198, 215, 231, 189, 198, 215, 231, 186, 195, 212, 200, 171, 180, 196, 28, 0, 0, 0, 0, 187, 192, 204, 72, 152, 164, 185, 126, 171, 183, 206, 231, 187, 201, 228, 231, 205, 218, 239, 231, 211, 222, 241, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 206, 215, 5, 187, 193, 206, 102, 145, 158, 183, 106, 170, 182, 202, 231, 160, 174, 200, 231, 150, 167, 197, 231, 155, 172, 202, 255, 154, 172, 204, 255, 155, 173, 205, 255, 158, 175, 208, 255, 158, 175, 208, 255, 160, 177, 210, 255, 161, 179, 213, 245, 162, 180, 213, 253, 163, 181, 214, 246, 168, 185, 216, 231, 174, 190, 219, 231, 189, 202, 225, 231, 177, 191, 219, 122, 198, 208, 227, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 130, 134, 182, 79, 89, 107, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 128, 144, 174, 255, 128, 144, 174, 255, 128, 143, 173, 255, 95, 107, 128, 255, 69, 74, 82, 255, 74, 79, 86, 255, 82, 88, 98, 255, 104, 109, 120, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 97, 100, 104, 249, 40, 45, 54, 255, 44, 50, 60, 255, 44, 50, 60, 255, 44, 50, 60, 255, 44, 50, 60, 255, 44, 50, 60, 255, 44, 50, 60, 255, 44, 50, 60, 255, 44, 50, 60, 255, 45, 50, 61, 255, 77, 87, 105, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 114, 128, 154, 255, 79, 89, 107, 255, 45, 51, 61, 255, 45, 51, 61, 255, 45, 51, 61, 255, 45, 51, 61, 255, 45, 51, 61, 255, 45, 51, 61, 255, 45, 51, 61, 255, 45, 51, 61, 255, 47, 53, 64, 255, 99, 110, 131, 242, 229, 232, 236, 42, 0, 0, 0, 0, 0, 0, 0, 0, 207, 209, 213, 53, 132, 139, 153, 102, 137, 146, 163, 228, 124, 137, 161, 255, 122, 136, 164, 255, 122, 138, 166, 255, 123, 138, 166, 255, 122, 137, 164, 255, 120, 135, 162, 255, 120, 135, 162, 255, 121, 135, 163, 255, 121, 136, 164, 255, 121, 136, 165, 255, 125, 140, 169, 255, 127, 143, 172, 255, 133, 150, 180, 255, 143, 161, 193, 255, 153, 172, 205, 255, 166, 184, 218, 246, 185, 199, 225, 228, 197, 208, 229, 125, 210, 218, 233, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 219, 222, 12, 167, 172, 181, 114, 136, 146, 163, 228, 122, 135, 160, 244, 124, 139, 166, 255, 125, 140, 168, 255, 122, 136, 164, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 119, 134, 162, 255, 119, 134, 162, 255, 119, 134, 162, 255, 120, 135, 163, 255, 120, 136, 163, 255, 122, 136, 164, 255, 128, 143, 172, 255, 138, 154, 186, 255, 152, 170, 204, 255, 166, 186, 220, 255, 175, 193, 227, 231, 193, 206, 229, 180, 207, 217, 234, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 227, 229, 23, 172, 177, 186, 99, 141, 151, 169, 191, 130, 144, 170, 247, 133, 149, 177, 255, 131, 147, 177, 255, 132, 148, 178, 255, 132, 148, 178, 255, 131, 148, 178, 255, 135, 152, 183, 255, 140, 157, 189, 255, 147, 164, 198, 255, 161, 180, 215, 255, 175, 194, 227, 253, 169, 183, 208, 230, 82, 87, 97, 255, 124, 139, 168, 255, 142, 159, 192, 255, 142, 160, 192, 255, 142, 160, 192, 255, 142, 160, 192, 255, 142, 160, 192, 255, 142, 160, 192, 255, 142, 160, 193, 255, 142, 160, 193, 255, 144, 162, 195, 255, 139, 156, 188, 255, 210, 215, 224, 151, 0, 0, 0, 0, 0, 0, 0, 0, 94, 99, 107, 223, 122, 137, 166, 255, 143, 161, 194, 255, 144, 161, 194, 255, 144, 161, 194, 255, 144, 162, 195, 255, 144, 162, 195, 255, 144, 162, 195, 255, 144, 162, 195, 255, 144, 162, 195, 255, 146, 163, 197, 255, 159, 175, 204, 255, 185, 189, 198, 170, 145, 154, 171, 228, 132, 146, 173, 247, 134, 150, 180, 255, 137, 154, 185, 255, 160, 175, 200, 255, 223, 228, 238, 255, 213, 224, 244, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 204, 210, 58, 163, 171, 186, 173, 138, 152, 176, 230, 140, 156, 185, 255, 140, 156, 188, 255, 137, 154, 185, 255, 135, 152, 183, 255, 134, 150, 181, 255, 132, 148, 178, 255, 131, 147, 176, 255, 129, 144, 174, 255, 129, 145, 174, 255, 129, 145, 174, 255, 130, 147, 176, 255, 135, 151, 182, 255, 135, 152, 183, 255, 140, 157, 189, 255, 140, 158, 189, 255, 146, 164, 196, 255, 157, 176, 209, 255, 170, 189, 222, 255, 180, 199, 230, 246, 185, 201, 231, 228, 184, 199, 227, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 183, 193, 171, 178, 189, 210, 228, 180, 192, 214, 228, 126, 135, 152, 247, 85, 95, 115, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 128, 144, 174, 255, 132, 149, 179, 255, 138, 154, 181, 255, 169, 180, 198, 255, 176, 187, 206, 255, 171, 182, 201, 255, 173, 181, 197, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 173, 175, 176, 89, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 79, 82, 87, 241, 71, 80, 97, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 112, 126, 152, 255, 119, 134, 161, 255, 134, 147, 172, 255, 161, 163, 166, 188, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 176, 178, 158, 175, 177, 178, 158, 183, 185, 188, 148, 229, 232, 236, 13, 190, 192, 196, 5, 175, 179, 185, 167, 115, 124, 142, 241, 114, 126, 151, 255, 115, 129, 156, 255, 115, 129, 156, 255, 114, 128, 156, 255, 114, 129, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 116, 131, 157, 255, 118, 133, 160, 255, 131, 147, 175, 255, 154, 172, 203, 255, 177, 196, 226, 255, 178, 196, 229, 195, 199, 211, 233, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 179, 185, 80, 144, 150, 162, 229, 115, 127, 150, 255, 117, 132, 159, 255, 118, 133, 160, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 160, 255, 120, 134, 163, 255, 125, 140, 168, 255, 149, 166, 193, 255, 178, 195, 222, 255, 184, 202, 232, 244, 192, 206, 232, 115, 227, 233, 243, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 159, 166, 23, 142, 149, 161, 198, 118, 130, 153, 255, 122, 137, 165, 255, 122, 137, 165, 255, 121, 136, 164, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 165, 255, 125, 140, 168, 255, 138, 154, 181, 255, 150, 168, 200, 255, 111, 125, 150, 255, 114, 128, 154, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 127, 143, 172, 255, 138, 155, 186, 255, 211, 215, 224, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 94, 106, 128, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 168, 255, 125, 140, 168, 255, 129, 144, 173, 255, 149, 162, 183, 255, 101, 111, 128, 255, 121, 136, 163, 255, 125, 140, 169, 255, 124, 140, 168, 255, 124, 140, 168, 255, 128, 144, 171, 255, 209, 218, 229, 255, 212, 223, 243, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 151, 156, 166, 69, 124, 134, 154, 243, 116, 132, 163, 255, 127, 142, 172, 255, 127, 143, 171, 255, 126, 142, 170, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 143, 172, 255, 131, 146, 175, 255, 143, 158, 185, 255, 170, 185, 209, 255, 187, 205, 233, 246, 189, 203, 230, 188, 191, 204, 227, 21, 0, 0, 0, 0, 0, 0, 0, 0, 99, 103, 110, 191, 111, 125, 151, 255, 145, 162, 196, 255, 142, 159, 192, 255, 125, 140, 168, 255, 128, 143, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 141, 157, 184, 255, 181, 194, 213, 255, 182, 195, 213, 255, 172, 188, 213, 255, 154, 172, 206, 255, 143, 157, 184, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 80, 97, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 112, 126, 152, 255, 119, 134, 161, 255, 156, 171, 200, 255, 194, 199, 209, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 129, 135, 6, 113, 118, 128, 168, 98, 109, 128, 255, 111, 125, 150, 255, 114, 128, 155, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 129, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 117, 132, 157, 255, 129, 143, 168, 255, 173, 188, 211, 255, 188, 206, 234, 246, 184, 200, 230, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 127, 136, 81, 102, 112, 128, 243, 110, 123, 148, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 125, 140, 166, 255, 161, 175, 197, 255, 191, 207, 234, 255, 192, 206, 233, 184, 191, 204, 230, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 178, 183, 56, 121, 128, 141, 231, 108, 121, 144, 255, 119, 134, 161, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 165, 255, 123, 138, 166, 255, 122, 137, 165, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 142, 171, 255, 137, 155, 186, 255, 211, 215, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 94, 105, 127, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 133, 148, 175, 255, 165, 177, 196, 255, 118, 132, 159, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 126, 142, 171, 255, 185, 202, 225, 255, 204, 217, 238, 91, 0, 0, 0, 0, 0, 0, 0, 0, 183, 185, 191, 70, 109, 119, 138, 242, 105, 122, 152, 255, 120, 136, 166, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 142, 171, 255, 128, 143, 172, 255, 152, 165, 190, 255, 185, 201, 228, 255, 182, 198, 228, 194, 208, 216, 231, 21, 0, 0, 0, 0, 92, 96, 102, 191, 89, 100, 121, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 143, 173, 255, 128, 143, 173, 255, 128, 143, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 128, 144, 174, 255, 130, 145, 175, 255, 141, 154, 181, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 80, 96, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 152, 255, 119, 134, 161, 255, 158, 174, 203, 255, 205, 212, 224, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 122, 126, 7, 97, 102, 110, 168, 86, 96, 114, 255, 110, 124, 149, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 129, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 116, 130, 156, 255, 116, 130, 156, 255, 121, 135, 160, 255, 162, 175, 195, 255, 192, 208, 234, 246, 199, 212, 236, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 116, 124, 82, 89, 97, 113, 243, 107, 120, 145, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 121, 135, 162, 255, 149, 162, 184, 255, 192, 207, 230, 255, 190, 206, 233, 184, 215, 223, 238, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, 151, 155, 24, 100, 106, 117, 198, 101, 113, 136, 255, 118, 133, 160, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 142, 171, 255, 137, 154, 186, 255, 211, 215, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 94, 105, 127, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 132, 148, 175, 255, 143, 160, 186, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 125, 140, 169, 255, 162, 178, 207, 255, 193, 205, 228, 91, 0, 0, 0, 0, 185, 187, 190, 10, 126, 132, 144, 191, 97, 113, 141, 255, 119, 135, 165, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 143, 159, 186, 255, 172, 191, 224, 255, 178, 192, 217, 104, 0, 0, 0, 0, 92, 96, 102, 191, 89, 100, 121, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 143, 172, 255, 128, 143, 173, 255, 128, 143, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 128, 144, 175, 255, 141, 154, 181, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 80, 96, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 119, 134, 161, 255, 158, 174, 203, 255, 205, 212, 224, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 117, 122, 131, 73, 81, 96, 255, 107, 121, 145, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 116, 130, 156, 255, 116, 130, 156, 255, 118, 131, 158, 255, 156, 168, 189, 255, 194, 209, 236, 246, 196, 209, 234, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 170, 172, 82, 94, 100, 111, 242, 102, 114, 138, 255, 117, 131, 157, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 119, 134, 161, 255, 147, 160, 182, 255, 190, 206, 233, 255, 183, 199, 229, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 120, 127, 178, 88, 98, 118, 255, 116, 131, 157, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 142, 171, 255, 137, 154, 185, 255, 210, 215, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 94, 105, 127, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 149, 164, 192, 255, 185, 196, 216, 91, 0, 0, 0, 0, 189, 189, 192, 74, 108, 117, 133, 255, 114, 131, 160, 255, 124, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 128, 143, 172, 255, 148, 166, 199, 255, 164, 180, 211, 210, 211, 216, 227, 21, 92, 96, 102, 191, 89, 100, 121, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 143, 173, 255, 128, 143, 173, 255, 128, 143, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 141, 154, 181, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 80, 96, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 119, 134, 160, 255, 158, 174, 203, 255, 205, 212, 224, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 187, 189, 63, 78, 83, 92, 238, 96, 108, 130, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 112, 126, 152, 255, 105, 118, 142, 255, 95, 107, 129, 255, 87, 98, 117, 255, 93, 104, 125, 255, 105, 118, 142, 255, 115, 128, 154, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 116, 130, 156, 255, 116, 130, 156, 255, 119, 133, 159, 255, 172, 184, 204, 255, 191, 207, 235, 246, 205, 216, 235, 59, 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 176, 16, 92, 97, 104, 201, 88, 99, 119, 255, 115, 129, 156, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 113, 126, 152, 255, 103, 116, 139, 255, 88, 99, 120, 255, 83, 93, 112, 255, 90, 101, 122, 255, 107, 121, 146, 255, 117, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 120, 135, 162, 255, 162, 176, 199, 255, 182, 200, 230, 242, 188, 201, 226, 41, 0, 0, 0, 0, 137, 139, 142, 60, 80, 86, 98, 246, 107, 119, 144, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 142, 171, 255, 137, 154, 185, 255, 210, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 93, 105, 127, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 143, 158, 185, 255, 194, 201, 214, 134, 0, 0, 0, 0, 175, 177, 181, 158, 104, 117, 139, 255, 123, 139, 167, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 123, 138, 166, 255, 112, 126, 152, 255, 103, 116, 139, 255, 93, 104, 126, 255, 86, 97, 117, 255, 90, 101, 122, 255, 101, 114, 137, 255, 118, 132, 159, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 133, 149, 179, 255, 159, 175, 204, 255, 182, 192, 209, 61, 92, 96, 102, 191, 89, 100, 120, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 143, 172, 255, 128, 143, 173, 255, 128, 143, 173, 255, 128, 143, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 173, 255, 128, 144, 174, 255, 141, 154, 181, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 80, 96, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 112, 126, 151, 255, 119, 134, 160, 255, 158, 174, 203, 255, 205, 212, 224, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 210, 211, 9, 124, 127, 131, 186, 68, 77, 92, 255, 110, 124, 150, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 107, 120, 144, 255, 76, 85, 102, 255, 71, 77, 87, 255, 82, 86, 93, 255, 87, 90, 95, 255, 72, 76, 82, 255, 47, 53, 62, 255, 71, 80, 96, 255, 107, 120, 144, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 116, 130, 156, 255, 116, 130, 156, 255, 125, 139, 163, 255, 180, 195, 220, 255, 190, 205, 231, 177, 0, 0, 0, 0, 0, 0, 0, 0, 129, 131, 135, 89, 72, 79, 92, 255, 108, 122, 147, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 158, 255, 116, 131, 158, 255, 103, 116, 140, 255, 71, 79, 94, 255, 80, 85, 93, 255, 97, 100, 106, 255, 73, 77, 82, 213, 78, 82, 88, 255, 48, 54, 63, 255, 72, 82, 99, 255, 112, 127, 152, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 125, 140, 166, 255, 159, 178, 209, 255, 179, 192, 215, 156, 0, 0, 0, 0, 116, 119, 124, 178, 80, 90, 108, 255, 117, 131, 159, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 119, 134, 161, 255, 110, 124, 150, 255, 97, 109, 131, 255, 85, 95, 115, 255, 88, 100, 120, 255, 102, 115, 138, 255, 118, 132, 159, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 126, 142, 171, 255, 136, 154, 185, 255, 210, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 93, 105, 127, 255, 122, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 139, 152, 178, 255, 200, 204, 211, 220, 0, 0, 0, 0, 152, 155, 161, 158, 113, 127, 153, 255, 124, 139, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 119, 133, 160, 255, 80, 90, 108, 255, 74, 79, 89, 255, 83, 87, 94, 255, 93, 97, 102, 255, 61, 65, 71, 176, 87, 91, 96, 249, 74, 78, 85, 255, 53, 60, 71, 255, 105, 118, 142, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 129, 145, 175, 255, 146, 162, 193, 255, 182, 191, 207, 103, 92, 96, 102, 191, 87, 98, 118, 255, 123, 138, 166, 255, 123, 138, 167, 255, 124, 140, 168, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 143, 173, 255, 128, 143, 173, 255, 128, 143, 173, 255, 126, 141, 170, 255, 124, 139, 168, 255, 124, 139, 168, 255, 126, 142, 171, 255, 140, 154, 181, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 80, 96, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 112, 126, 151, 255, 119, 134, 160, 255, 158, 174, 203, 255, 205, 212, 224, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 141, 144, 27, 82, 87, 94, 255, 93, 105, 127, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 112, 126, 152, 255, 87, 98, 118, 255, 136, 141, 152, 255, 158, 165, 178, 135, 180, 187, 200, 126, 189, 197, 209, 126, 161, 166, 177, 126, 147, 151, 158, 240, 60, 64, 71, 255, 57, 65, 78, 255, 109, 122, 147, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 116, 130, 156, 255, 116, 130, 156, 255, 151, 167, 192, 255, 183, 199, 230, 245, 217, 223, 237, 60, 200, 201, 202, 16, 100, 103, 109, 201, 78, 89, 107, 255, 115, 130, 156, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 109, 122, 147, 255, 93, 100, 113, 253, 148, 150, 154, 173, 150, 152, 154, 46, 214, 214, 215, 46, 209, 210, 211, 23, 174, 176, 178, 46, 115, 118, 121, 105, 74, 78, 83, 251, 66, 75, 90, 255, 116, 131, 157, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 116, 131, 158, 255, 116, 130, 157, 255, 116, 130, 157, 255, 117, 131, 158, 255, 118, 132, 159, 255, 126, 141, 170, 255, 148, 161, 185, 241, 195, 199, 206, 66, 75, 80, 88, 217, 95, 107, 128, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 119, 133, 160, 255, 95, 107, 129, 255, 71, 78, 89, 255, 82, 86, 93, 246, 59, 63, 69, 182, 84, 87, 93, 255, 60, 64, 72, 255, 57, 65, 78, 255, 107, 121, 145, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 126, 141, 171, 255, 136, 153, 185, 255, 210, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 93, 105, 126, 255, 122, 137, 166, 255, 122, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 133, 146, 170, 255, 193, 196, 202, 220, 0, 0, 0, 0, 151, 155, 164, 158, 95, 105, 123, 255, 87, 97, 117, 255, 84, 95, 114, 255, 83, 94, 113, 255, 83, 93, 112, 255, 82, 92, 111, 255, 81, 91, 110, 255, 80, 90, 108, 255, 79, 89, 107, 255, 98, 110, 132, 255, 101, 110, 127, 255, 157, 166, 181, 255, 175, 183, 199, 255, 191, 200, 218, 255, 164, 176, 198, 212, 167, 177, 196, 252, 153, 163, 180, 255, 85, 93, 108, 255, 82, 92, 110, 255, 124, 139, 167, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 143, 172, 255, 135, 152, 183, 255, 193, 199, 211, 190, 90, 94, 98, 191, 48, 54, 65, 255, 55, 61, 74, 255, 56, 63, 76, 255, 89, 100, 121, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 143, 173, 255, 107, 121, 146, 255, 56, 63, 76, 255, 55, 62, 74, 255, 59, 67, 81, 255, 115, 126, 146, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 80, 96, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 119, 133, 160, 255, 158, 174, 203, 255, 205, 212, 224, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 179, 181, 131, 53, 59, 69, 255, 106, 119, 144, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 123, 139, 168, 255, 125, 141, 169, 255, 140, 155, 183, 255, 142, 157, 185, 255, 139, 154, 182, 255, 136, 151, 178, 255, 130, 144, 169, 255, 126, 139, 164, 255, 106, 118, 140, 255, 78, 88, 106, 255, 103, 115, 138, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 116, 130, 156, 255, 125, 140, 167, 255, 164, 182, 216, 255, 170, 186, 216, 73, 159, 161, 163, 50, 80, 85, 93, 255, 99, 111, 134, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 118, 132, 159, 255, 114, 125, 146, 252, 164, 167, 172, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 162, 164, 104, 49, 53, 60, 250, 75, 85, 103, 255, 79, 89, 107, 255, 77, 87, 105, 255, 75, 85, 102, 255, 70, 80, 96, 255, 71, 80, 95, 255, 79, 87, 102, 255, 87, 94, 108, 255, 93, 100, 112, 255, 97, 103, 114, 255, 122, 129, 141, 255, 175, 178, 183, 191, 71, 77, 86, 255, 107, 120, 144, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 113, 127, 152, 255, 109, 115, 127, 245, 137, 139, 143, 97, 184, 185, 187, 43, 209, 210, 211, 5, 199, 200, 201, 48, 112, 115, 119, 57, 92, 95, 99, 221, 52, 59, 70, 255, 114, 129, 155, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 126, 141, 170, 255, 136, 153, 184, 255, 210, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 93, 105, 126, 255, 122, 137, 165, 255, 122, 137, 166, 255, 122, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 122, 137, 165, 255, 115, 129, 156, 255, 108, 122, 147, 255, 97, 110, 132, 255, 98, 110, 132, 255, 108, 121, 146, 255, 124, 136, 158, 255, 187, 190, 196, 180, 0, 0, 0, 0, 192, 193, 196, 110, 136, 139, 143, 177, 109, 113, 118, 177, 116, 120, 125, 223, 90, 96, 105, 255, 65, 73, 88, 255, 85, 96, 115, 255, 100, 113, 136, 255, 113, 127, 153, 255, 112, 126, 152, 255, 131, 147, 177, 255, 145, 162, 195, 255, 142, 160, 192, 255, 140, 157, 189, 255, 139, 156, 188, 255, 138, 155, 187, 255, 135, 152, 183, 255, 132, 149, 179, 255, 128, 144, 173, 255, 120, 135, 163, 255, 125, 141, 169, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 133, 150, 181, 255, 191, 197, 210, 190, 185, 186, 188, 133, 159, 161, 163, 177, 159, 161, 163, 177, 95, 98, 103, 233, 81, 91, 110, 255, 127, 142, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 144, 174, 255, 133, 149, 180, 255, 123, 127, 135, 211, 159, 161, 163, 177, 159, 161, 163, 177, 179, 181, 185, 173, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 80, 96, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 112, 125, 151, 255, 119, 133, 160, 255, 158, 173, 203, 255, 205, 212, 224, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, 137, 140, 156, 54, 61, 74, 255, 112, 126, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 117, 131, 158, 255, 117, 131, 158, 255, 116, 131, 157, 255, 117, 132, 158, 255, 117, 131, 158, 255, 116, 130, 157, 255, 115, 129, 156, 255, 114, 129, 155, 255, 114, 128, 154, 255, 113, 127, 153, 255, 114, 128, 154, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 118, 132, 158, 255, 150, 168, 202, 255, 187, 199, 221, 176, 101, 104, 108, 50, 67, 72, 82, 255, 106, 119, 144, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 125, 140, 169, 255, 156, 164, 180, 207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 137, 140, 202, 65, 70, 75, 185, 83, 86, 92, 180, 103, 107, 111, 180, 126, 128, 132, 180, 151, 153, 156, 180, 144, 146, 149, 133, 73, 77, 81, 51, 111, 114, 118, 51, 142, 144, 146, 51, 172, 173, 175, 51, 206, 207, 208, 51, 124, 127, 130, 84, 67, 74, 84, 255, 111, 125, 151, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 122, 137, 164, 255, 127, 141, 167, 255, 175, 179, 187, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 160, 163, 41, 65, 69, 76, 255, 100, 113, 135, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 126, 141, 170, 255, 136, 153, 184, 255, 210, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 93, 105, 126, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 120, 135, 162, 255, 94, 106, 127, 255, 68, 75, 87, 255, 78, 83, 91, 255, 83, 87, 93, 255, 86, 90, 96, 255, 89, 94, 102, 255, 112, 118, 127, 255, 165, 169, 175, 91, 0, 0, 0, 0, 0, 0, 0, 0, 155, 161, 173, 8, 159, 166, 178, 152, 130, 142, 163, 234, 131, 146, 174, 255, 132, 148, 179, 255, 133, 150, 180, 255, 130, 146, 176, 255, 128, 144, 173, 255, 126, 142, 170, 255, 126, 141, 169, 255, 126, 141, 170, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 170, 255, 133, 150, 181, 255, 191, 197, 210, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 81, 91, 110, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 145, 174, 255, 138, 155, 186, 255, 124, 133, 150, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 112, 125, 151, 255, 119, 133, 160, 255, 158, 173, 202, 255, 205, 211, 224, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 107, 111, 156, 60, 68, 82, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 139, 157, 188, 255, 171, 185, 210, 202, 117, 119, 123, 87, 55, 62, 73, 255, 110, 123, 149, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 118, 132, 159, 255, 137, 153, 183, 255, 165, 174, 192, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 228, 229, 23, 228, 228, 229, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 81, 85, 74, 62, 69, 80, 255, 113, 127, 152, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 126, 141, 170, 255, 151, 166, 195, 255, 223, 226, 232, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 165, 168, 15, 92, 96, 101, 255, 92, 104, 125, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 125, 141, 170, 255, 136, 153, 184, 255, 210, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 93, 105, 126, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 138, 166, 255, 122, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 114, 128, 155, 255, 105, 111, 123, 239, 117, 120, 124, 90, 154, 156, 159, 54, 198, 199, 200, 54, 209, 210, 211, 54, 193, 194, 195, 54, 176, 178, 180, 54, 209, 210, 211, 19, 0, 0, 0, 0, 213, 214, 218, 60, 146, 153, 166, 207, 125, 139, 164, 255, 126, 141, 171, 255, 125, 140, 169, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 134, 150, 181, 255, 191, 197, 210, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 81, 91, 109, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 142, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 145, 174, 255, 139, 156, 186, 255, 135, 145, 165, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 111, 125, 151, 255, 118, 133, 160, 255, 157, 173, 202, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 104, 108, 156, 59, 66, 79, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 129, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 129, 156, 255, 115, 130, 156, 255, 115, 130, 156, 255, 134, 150, 181, 255, 152, 166, 193, 202, 158, 160, 162, 179, 51, 57, 69, 255, 112, 126, 152, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 119, 133, 160, 255, 147, 165, 197, 255, 190, 199, 215, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 106, 109, 74, 63, 69, 79, 255, 111, 124, 150, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 119, 134, 162, 255, 120, 134, 162, 255, 128, 143, 172, 255, 168, 186, 219, 255, 200, 209, 229, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 156, 160, 50, 80, 86, 96, 255, 108, 121, 146, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 125, 140, 170, 255, 135, 152, 183, 255, 210, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 93, 105, 126, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 166, 255, 122, 138, 166, 255, 123, 138, 166, 255, 124, 139, 167, 255, 127, 141, 168, 255, 141, 149, 163, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 169, 173, 9, 140, 145, 156, 185, 114, 127, 151, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 134, 150, 181, 255, 191, 197, 210, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 81, 91, 109, 255, 126, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 128, 145, 174, 255, 139, 156, 187, 255, 137, 147, 167, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 111, 125, 151, 255, 118, 133, 160, 255, 157, 173, 202, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 139, 142, 156, 48, 54, 65, 255, 112, 126, 151, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 155, 255, 113, 127, 152, 255, 109, 123, 148, 255, 109, 122, 147, 255, 108, 122, 147, 255, 108, 121, 146, 255, 107, 121, 145, 255, 107, 120, 144, 255, 106, 119, 144, 255, 106, 119, 144, 255, 105, 119, 143, 255, 105, 118, 142, 255, 103, 116, 140, 255, 100, 113, 136, 255, 100, 112, 135, 255, 99, 111, 133, 255, 98, 109, 132, 255, 96, 109, 131, 255, 96, 107, 130, 255, 94, 106, 128, 255, 93, 105, 127, 255, 110, 124, 149, 255, 157, 171, 198, 216, 165, 166, 168, 165, 50, 56, 67, 255, 109, 123, 148, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 118, 133, 160, 255, 154, 172, 206, 255, 171, 186, 214, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 167, 172, 29, 156, 163, 175, 187, 163, 171, 185, 196, 186, 193, 207, 196, 195, 203, 217, 196, 200, 208, 223, 196, 197, 207, 225, 149, 184, 201, 231, 67, 190, 207, 237, 67, 189, 206, 237, 67, 194, 209, 237, 67, 201, 213, 235, 67, 146, 150, 158, 122, 62, 66, 75, 255, 107, 119, 144, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 119, 134, 162, 255, 123, 137, 165, 255, 173, 188, 212, 255, 186, 204, 234, 200, 188, 202, 228, 67, 224, 229, 239, 26, 0, 0, 0, 0, 220, 224, 229, 40, 160, 166, 178, 76, 126, 133, 146, 229, 96, 107, 129, 255, 118, 132, 160, 255, 121, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 125, 140, 169, 255, 135, 152, 183, 255, 210, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 93, 105, 126, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 166, 255, 122, 138, 166, 255, 125, 141, 170, 255, 142, 156, 184, 255, 164, 172, 189, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 143, 148, 66, 105, 114, 130, 255, 120, 136, 163, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 167, 255, 118, 133, 160, 255, 111, 125, 150, 255, 97, 109, 131, 255, 92, 103, 125, 255, 89, 100, 121, 255, 84, 94, 113, 255, 81, 91, 110, 255, 75, 85, 102, 255, 95, 107, 129, 255, 123, 138, 167, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 134, 151, 182, 255, 191, 197, 210, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 81, 91, 109, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 142, 172, 255, 127, 143, 172, 255, 128, 144, 174, 255, 139, 155, 187, 255, 136, 147, 167, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 151, 255, 118, 133, 160, 255, 157, 173, 202, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 166, 168, 123, 40, 46, 54, 255, 105, 118, 142, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 155, 255, 110, 123, 147, 255, 77, 83, 93, 255, 89, 94, 103, 255, 88, 94, 102, 255, 88, 93, 101, 255, 87, 92, 101, 255, 87, 92, 100, 255, 86, 91, 99, 255, 86, 91, 98, 255, 77, 82, 90, 255, 71, 75, 83, 255, 72, 77, 85, 255, 75, 79, 87, 255, 82, 87, 94, 255, 82, 86, 93, 255, 81, 86, 93, 255, 81, 85, 92, 255, 80, 84, 91, 255, 79, 83, 90, 255, 79, 83, 89, 255, 82, 86, 94, 255, 130, 136, 147, 242, 156, 158, 161, 107, 58, 63, 72, 255, 104, 117, 140, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 117, 132, 158, 255, 158, 176, 205, 255, 183, 199, 229, 216, 227, 233, 243, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 114, 123, 144, 109, 122, 146, 255, 121, 136, 163, 255, 126, 142, 171, 255, 131, 148, 178, 255, 139, 156, 187, 255, 154, 172, 205, 255, 181, 198, 227, 255, 202, 215, 235, 255, 210, 220, 236, 255, 214, 224, 239, 255, 215, 227, 244, 255, 162, 171, 188, 236, 59, 63, 69, 241, 91, 102, 124, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 119, 134, 162, 255, 131, 144, 170, 255, 178, 191, 213, 255, 181, 199, 229, 255, 167, 184, 217, 217, 158, 174, 203, 193, 151, 165, 190, 230, 133, 147, 172, 255, 116, 130, 157, 255, 119, 134, 161, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 121, 136, 164, 255, 125, 140, 169, 255, 135, 152, 183, 255, 210, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 93, 105, 126, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 125, 141, 170, 255, 144, 159, 186, 255, 171, 179, 195, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 201, 203, 9, 107, 111, 118, 185, 100, 112, 133, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 105, 119, 143, 255, 69, 76, 90, 255, 73, 78, 87, 255, 81, 85, 91, 255, 64, 68, 75, 193, 62, 66, 72, 191, 83, 87, 92, 191, 101, 105, 109, 217, 64, 70, 80, 255, 102, 115, 139, 255, 125, 139, 168, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 134, 151, 182, 255, 191, 198, 210, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 81, 91, 109, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 128, 144, 174, 255, 139, 155, 187, 255, 136, 147, 167, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 118, 133, 160, 255, 157, 172, 202, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 90, 95, 27, 56, 60, 67, 255, 95, 106, 128, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 178, 191, 211, 255, 170, 181, 200, 255, 205, 209, 215, 106, 209, 210, 211, 64, 209, 210, 211, 64, 209, 210, 211, 64, 209, 210, 211, 64, 209, 210, 211, 64, 195, 197, 200, 118, 135, 142, 156, 237, 123, 134, 155, 255, 130, 141, 162, 255, 134, 145, 165, 255, 162, 172, 192, 255, 169, 180, 201, 255, 185, 196, 213, 255, 194, 203, 216, 255, 201, 208, 221, 255, 211, 217, 228, 255, 201, 207, 217, 255, 209, 215, 225, 255, 209, 215, 226, 215, 185, 186, 189, 69, 79, 82, 88, 255, 87, 97, 117, 255, 116, 130, 156, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 131, 145, 169, 255, 193, 208, 232, 255, 189, 205, 233, 152, 215, 223, 238, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 146, 150, 157, 117, 89, 97, 112, 251, 111, 125, 151, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 160, 255, 121, 135, 163, 255, 123, 138, 166, 255, 126, 142, 169, 255, 131, 145, 170, 255, 140, 155, 180, 255, 173, 190, 218, 255, 189, 198, 213, 150, 102, 105, 109, 200, 63, 72, 86, 255, 117, 131, 158, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 123, 137, 164, 255, 136, 151, 179, 255, 140, 157, 188, 255, 137, 154, 185, 255, 130, 147, 176, 255, 123, 139, 167, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 164, 255, 125, 140, 169, 255, 135, 152, 182, 255, 209, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 93, 105, 125, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 125, 140, 169, 255, 144, 159, 187, 255, 171, 179, 195, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 175, 35, 98, 102, 110, 255, 107, 120, 145, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 125, 141, 170, 255, 110, 122, 145, 255, 129, 131, 135, 131, 143, 145, 148, 64, 208, 208, 209, 64, 219, 219, 220, 3, 228, 229, 232, 27, 159, 166, 180, 62, 134, 142, 159, 207, 109, 122, 146, 255, 122, 137, 165, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 125, 141, 170, 255, 134, 151, 182, 255, 192, 198, 210, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 81, 91, 109, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 142, 171, 255, 127, 142, 171, 255, 128, 144, 173, 255, 139, 155, 186, 255, 136, 147, 167, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 110, 124, 149, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 118, 132, 159, 255, 157, 172, 202, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 176, 178, 21, 91, 94, 98, 231, 63, 71, 85, 255, 112, 125, 151, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 133, 145, 168, 255, 190, 203, 224, 255, 181, 198, 226, 225, 191, 203, 226, 133, 181, 193, 213, 59, 184, 192, 207, 59, 161, 171, 188, 59, 166, 173, 185, 173, 122, 131, 147, 247, 112, 125, 151, 255, 118, 133, 161, 255, 119, 134, 162, 255, 121, 136, 164, 255, 126, 142, 171, 255, 133, 149, 179, 255, 146, 163, 192, 255, 161, 177, 201, 255, 175, 188, 209, 255, 184, 196, 215, 255, 190, 203, 222, 255, 199, 214, 236, 255, 179, 192, 215, 186, 212, 213, 216, 33, 97, 100, 104, 197, 58, 66, 79, 255, 113, 127, 153, 255, 116, 130, 156, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 117, 131, 157, 255, 152, 164, 185, 255, 191, 207, 231, 255, 184, 201, 230, 220, 200, 210, 228, 188, 160, 175, 204, 59, 163, 175, 197, 59, 180, 188, 202, 120, 139, 149, 168, 188, 111, 123, 143, 252, 109, 123, 148, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 125, 141, 170, 255, 150, 164, 189, 237, 188, 195, 208, 40, 139, 141, 144, 105, 56, 60, 68, 255, 98, 110, 133, 255, 119, 133, 161, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 125, 140, 169, 255, 135, 151, 182, 255, 209, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 92, 104, 125, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 125, 140, 169, 255, 144, 159, 187, 255, 171, 179, 195, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 119, 123, 35, 77, 82, 92, 255, 111, 124, 150, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 129, 145, 174, 255, 172, 190, 220, 255, 190, 204, 230, 188, 159, 177, 210, 62, 189, 199, 217, 119, 186, 195, 212, 188, 160, 171, 193, 217, 139, 153, 179, 255, 127, 142, 171, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 125, 141, 170, 255, 134, 151, 182, 255, 192, 198, 210, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 81, 90, 109, 255, 126, 142, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 142, 171, 255, 128, 144, 173, 255, 138, 155, 186, 255, 136, 147, 166, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 110, 124, 149, 255, 110, 124, 149, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 118, 132, 159, 255, 157, 172, 202, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 151, 154, 156, 124, 47, 51, 59, 255, 97, 109, 131, 255, 113, 126, 152, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 128, 141, 164, 255, 159, 176, 201, 255, 158, 177, 211, 255, 157, 174, 204, 255, 152, 166, 194, 255, 139, 153, 180, 255, 121, 135, 162, 255, 116, 130, 157, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 129, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 126, 141, 170, 255, 158, 172, 199, 243, 194, 202, 217, 57, 0, 0, 0, 0, 123, 125, 129, 82, 53, 57, 64, 255, 93, 105, 126, 255, 116, 130, 156, 255, 116, 130, 156, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 133, 147, 170, 255, 160, 178, 205, 255, 155, 174, 208, 255, 152, 170, 203, 255, 148, 164, 194, 255, 134, 149, 178, 255, 123, 138, 166, 255, 118, 133, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 117, 131, 157, 255, 155, 163, 178, 178, 0, 0, 0, 0, 200, 201, 202, 19, 86, 89, 93, 184, 57, 63, 76, 255, 110, 123, 149, 255, 119, 133, 161, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 121, 136, 163, 255, 125, 140, 168, 255, 134, 151, 182, 255, 209, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 92, 104, 125, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 125, 140, 169, 255, 144, 159, 187, 255, 171, 180, 196, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 125, 128, 35, 74, 79, 87, 255, 108, 122, 146, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 154, 168, 191, 255, 172, 190, 219, 255, 160, 179, 214, 255, 151, 169, 202, 255, 142, 160, 193, 255, 136, 152, 183, 255, 128, 144, 173, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 125, 141, 169, 255, 134, 151, 182, 255, 192, 198, 210, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 81, 90, 109, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 128, 144, 173, 255, 138, 155, 186, 255, 136, 147, 166, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 110, 124, 149, 255, 110, 124, 149, 255, 110, 124, 149, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 118, 132, 159, 255, 157, 172, 201, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 187, 189, 19, 102, 104, 109, 233, 55, 61, 74, 255, 107, 120, 145, 255, 113, 126, 152, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 118, 133, 160, 255, 121, 136, 163, 255, 120, 135, 163, 255, 118, 132, 159, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 115, 129, 155, 255, 114, 128, 154, 255, 118, 132, 156, 255, 176, 183, 195, 171, 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 176, 13, 93, 96, 100, 196, 53, 60, 71, 255, 107, 121, 145, 255, 116, 130, 156, 255, 116, 130, 156, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 119, 133, 161, 255, 122, 136, 164, 255, 122, 136, 164, 255, 118, 133, 160, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 159, 255, 112, 126, 152, 255, 114, 123, 141, 238, 188, 191, 198, 75, 0, 0, 0, 0, 0, 0, 0, 0, 154, 156, 158, 53, 82, 85, 90, 242, 62, 70, 84, 255, 110, 123, 148, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 121, 136, 163, 255, 125, 140, 168, 255, 134, 151, 182, 255, 209, 214, 223, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 92, 104, 125, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 125, 140, 169, 255, 145, 159, 187, 255, 171, 180, 196, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 178, 181, 35, 89, 92, 98, 255, 93, 105, 126, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 126, 141, 168, 255, 128, 144, 172, 255, 127, 143, 172, 255, 125, 140, 169, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 141, 169, 255, 135, 151, 182, 255, 192, 199, 211, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 81, 90, 109, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 144, 173, 255, 138, 155, 186, 255, 136, 147, 166, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 110, 124, 149, 255, 110, 124, 149, 255, 110, 124, 149, 255, 110, 124, 149, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 111, 125, 150, 255, 118, 132, 159, 255, 157, 172, 201, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 123, 126, 54, 59, 63, 68, 233, 59, 66, 80, 255, 107, 120, 145, 255, 113, 127, 152, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 129, 155, 255, 115, 129, 155, 255, 112, 125, 150, 255, 98, 110, 131, 255, 117, 125, 139, 187, 181, 184, 191, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 179, 181, 73, 75, 79, 84, 238, 60, 68, 81, 255, 106, 120, 143, 255, 116, 130, 156, 255, 116, 130, 156, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 131, 158, 255, 109, 122, 147, 255, 99, 108, 126, 255, 167, 171, 177, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 170, 172, 90, 82, 85, 90, 242, 56, 63, 75, 255, 98, 110, 132, 255, 117, 131, 158, 255, 119, 133, 161, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 119, 133, 161, 255, 112, 126, 151, 255, 112, 126, 151, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 121, 135, 163, 255, 125, 140, 168, 255, 134, 151, 181, 255, 209, 214, 222, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 92, 104, 125, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 122, 137, 165, 255, 122, 137, 165, 255, 125, 140, 169, 255, 145, 160, 187, 255, 172, 180, 196, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 228, 229, 10, 110, 113, 117, 189, 61, 69, 83, 255, 120, 135, 162, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 135, 152, 183, 255, 193, 200, 211, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 80, 90, 109, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 126, 142, 171, 255, 126, 142, 171, 255, 127, 143, 173, 255, 138, 155, 186, 255, 136, 147, 166, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 110, 124, 149, 255, 110, 124, 149, 255, 110, 124, 149, 255, 110, 124, 149, 255, 110, 124, 149, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 125, 150, 255, 118, 132, 159, 255, 157, 172, 201, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 111, 114, 53, 59, 62, 68, 234, 57, 65, 78, 255, 102, 114, 137, 255, 112, 126, 151, 255, 113, 127, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 155, 255, 113, 127, 154, 255, 104, 117, 141, 255, 88, 98, 116, 255, 103, 109, 120, 187, 134, 138, 145, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 141, 144, 73, 82, 85, 90, 238, 52, 59, 70, 255, 98, 111, 133, 255, 115, 129, 155, 255, 116, 130, 156, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 114, 129, 155, 255, 101, 113, 136, 255, 89, 98, 113, 255, 148, 151, 157, 173, 203, 205, 207, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 160, 162, 58, 82, 86, 90, 184, 52, 57, 65, 255, 67, 75, 91, 255, 98, 110, 133, 255, 113, 126, 152, 255, 117, 131, 159, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 117, 132, 158, 255, 114, 128, 154, 255, 107, 120, 145, 255, 84, 94, 114, 255, 58, 65, 79, 255, 101, 114, 137, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 124, 139, 168, 255, 134, 150, 181, 255, 209, 214, 222, 151, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 92, 104, 125, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 122, 137, 164, 255, 122, 137, 165, 255, 125, 140, 169, 255, 145, 160, 188, 255, 172, 180, 197, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145, 147, 150, 72, 62, 66, 73, 255, 88, 98, 118, 255, 122, 137, 164, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 168, 255, 124, 139, 168, 255, 124, 139, 168, 255, 121, 136, 165, 255, 124, 139, 167, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 125, 140, 169, 255, 142, 159, 191, 255, 192, 200, 216, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 80, 90, 109, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 142, 170, 255, 127, 143, 172, 255, 138, 154, 186, 255, 136, 146, 166, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 71, 79, 96, 255, 110, 124, 149, 255, 110, 124, 149, 255, 110, 124, 149, 255, 110, 124, 149, 255, 110, 124, 149, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 111, 124, 150, 255, 118, 132, 159, 255, 157, 172, 201, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 115, 118, 52, 78, 82, 87, 234, 47, 52, 61, 255, 75, 84, 101, 255, 105, 118, 141, 255, 112, 126, 152, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 114, 128, 154, 255, 111, 125, 151, 255, 103, 116, 140, 255, 86, 97, 117, 255, 82, 89, 102, 255, 128, 132, 138, 187, 142, 144, 148, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 187, 189, 72, 101, 103, 108, 216, 47, 52, 61, 255, 78, 88, 106, 255, 105, 118, 141, 255, 115, 129, 155, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 115, 130, 155, 255, 104, 117, 141, 255, 81, 91, 109, 255, 87, 92, 103, 239, 166, 167, 171, 166, 209, 210, 211, 14, 0, 0, 0, 0, 0, 0, 0, 0, 190, 192, 196, 13, 196, 202, 212, 147, 202, 210, 225, 140, 149, 168, 202, 46, 197, 204, 217, 142, 190, 195, 203, 193, 152, 156, 163, 255, 71, 76, 85, 255, 46, 52, 63, 255, 59, 66, 80, 255, 72, 81, 98, 255, 86, 97, 117, 255, 89, 100, 120, 255, 87, 98, 118, 255, 85, 96, 115, 255, 80, 90, 108, 255, 69, 78, 94, 255, 66, 73, 85, 255, 68, 74, 83, 252, 87, 91, 97, 212, 68, 72, 78, 255, 102, 114, 137, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 120, 135, 163, 255, 124, 139, 168, 255, 137, 153, 182, 255, 192, 198, 210, 63, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 92, 104, 125, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 121, 136, 164, 255, 122, 137, 164, 255, 125, 141, 169, 255, 145, 160, 188, 255, 172, 181, 197, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 219, 219, 220, 10, 132, 134, 137, 166, 52, 57, 65, 255, 87, 98, 118, 255, 120, 134, 161, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 123, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 124, 139, 167, 255, 123, 138, 165, 255, 116, 130, 158, 255, 98, 111, 134, 255, 77, 86, 104, 255, 114, 128, 155, 255, 124, 139, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 124, 140, 168, 255, 125, 140, 168, 255, 125, 140, 169, 255, 125, 140, 169, 255, 147, 164, 198, 255, 174, 187, 213, 202, 194, 202, 216, 11, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 80, 90, 109, 255, 125, 141, 170, 255, 125, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 126, 141, 170, 255, 127, 143, 172, 255, 138, 154, 185, 255, 136, 146, 166, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 84, 88, 218, 68, 76, 93, 255, 104, 117, 141, 255, 104, 117, 141, 255, 104, 117, 141, 255, 104, 117, 141, 255, 104, 117, 141, 255, 104, 117, 141, 255, 105, 117, 142, 255, 105, 117, 142, 255, 105, 117, 142, 255, 112, 126, 152, 255, 155, 171, 200, 255, 205, 211, 223, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 210, 212, 46, 126, 128, 131, 152, 60, 63, 69, 235, 49, 55, 64, 255, 68, 77, 92, 255, 86, 97, 117, 255, 103, 116, 140, 255, 110, 123, 149, 255, 112, 126, 151, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 113, 127, 153, 255, 112, 126, 152, 255, 111, 125, 151, 255, 109, 122, 147, 255, 101, 114, 137, 255, 90, 101, 122, 255, 73, 82, 98, 255, 75, 80, 91, 255, 102, 106, 113, 221, 149, 151, 155, 112, 228, 228, 229, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 138, 141, 11, 127, 129, 132, 164, 71, 74, 80, 239, 51, 56, 65, 255, 68, 76, 92, 255, 95, 106, 128, 255, 108, 121, 145, 255, 112, 125, 151, 255, 115, 129, 156, 255, 116, 130, 157, 255, 116, 130, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 157, 255, 116, 131, 158, 255, 117, 131, 158, 255, 117, 131, 158, 255, 115, 129, 156, 255, 113, 127, 153, 255, 106, 119, 143, 255, 92, 104, 125, 255, 75, 85, 101, 255, 78, 84, 94, 255, 105, 109, 115, 171, 167, 169, 172, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 214, 216, 61, 100, 107, 119, 246, 126, 141, 171, 255, 149, 168, 202, 255, 151, 170, 204, 255, 152, 170, 204, 255, 156, 174, 207, 255, 160, 178, 204, 255, 167, 182, 201, 255, 168, 178, 194, 255, 164, 173, 186, 255, 166, 173, 185, 255, 141, 150, 164, 255, 82, 86, 94, 249, 85, 88, 93, 212, 98, 101, 106, 212, 120, 123, 126, 200, 88, 91, 95, 83, 165, 167, 169, 77, 158, 160, 163, 15, 92, 96, 101, 255, 102, 113, 137, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 120, 135, 163, 255, 122, 137, 165, 255, 139, 154, 181, 255, 144, 156, 178, 22, 0, 0, 0, 0, 0, 0, 0, 0, 83, 87, 93, 223, 88, 100, 120, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 128, 155, 255, 114, 128, 155, 255, 115, 129, 155, 255, 118, 133, 160, 255, 143, 158, 185, 255, 172, 181, 197, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 192, 194, 10, 140, 142, 145, 162, 50, 54, 61, 238, 64, 72, 87, 255, 101, 113, 136, 255, 118, 132, 159, 255, 121, 136, 164, 255, 123, 138, 166, 255, 123, 138, 166, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 138, 167, 255, 123, 139, 167, 255, 120, 135, 162, 255, 116, 130, 157, 255, 104, 117, 140, 255, 81, 91, 109, 255, 66, 73, 85, 255, 73, 77, 85, 238, 50, 55, 63, 251, 98, 110, 132, 255, 119, 133, 161, 255, 119, 134, 162, 255, 120, 135, 163, 255, 121, 136, 164, 255, 121, 137, 164, 255, 122, 138, 165, 255, 123, 138, 166, 255, 124, 139, 167, 255, 133, 149, 179, 255, 144, 161, 190, 255, 175, 183, 198, 151, 0, 0, 0, 0, 0, 0, 0, 0, 95, 99, 104, 182, 77, 87, 105, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 161, 255, 118, 133, 161, 255, 119, 133, 161, 255, 119, 133, 161, 255, 119, 133, 161, 255, 120, 134, 162, 255, 133, 148, 178, 255, 136, 146, 166, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 94, 99, 218, 51, 56, 64, 255, 60, 65, 76, 255, 60, 65, 76, 255, 60, 65, 76, 255, 60, 65, 76, 255, 60, 65, 76, 255, 60, 65, 76, 255, 60, 66, 76, 255, 60, 66, 76, 255, 60, 66, 76, 255, 65, 71, 82, 255, 131, 141, 161, 255, 207, 213, 224, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 171, 173, 45, 125, 128, 131, 152, 89, 92, 96, 215, 50, 54, 60, 234, 54, 59, 67, 255, 56, 63, 75, 255, 63, 72, 86, 255, 72, 82, 98, 255, 79, 89, 107, 255, 83, 93, 112, 255, 83, 94, 113, 255, 80, 90, 108, 255, 75, 85, 102, 255, 67, 76, 91, 255, 64, 71, 86, 255, 64, 71, 82, 255, 67, 72, 80, 255, 76, 80, 87, 222, 113, 115, 120, 175, 161, 163, 165, 86, 228, 228, 229, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 206, 206, 207, 53, 106, 109, 112, 99, 87, 90, 95, 218, 59, 63, 69, 255, 55, 61, 70, 255, 56, 63, 76, 255, 69, 78, 94, 255, 81, 91, 110, 255, 84, 94, 114, 255, 90, 101, 122, 255, 92, 104, 125, 255, 92, 104, 125, 255, 91, 102, 123, 255, 87, 98, 118, 255, 80, 90, 108, 255, 68, 77, 93, 255, 66, 73, 87, 255, 65, 70, 80, 255, 74, 79, 85, 219, 104, 107, 111, 165, 156, 158, 161, 86, 228, 228, 229, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 101, 105, 200, 68, 77, 93, 255, 120, 134, 161, 255, 121, 136, 164, 255, 122, 137, 165, 255, 123, 139, 166, 255, 125, 140, 166, 255, 127, 141, 166, 255, 127, 141, 166, 255, 127, 141, 166, 255, 132, 144, 169, 255, 186, 198, 218, 255, 183, 194, 213, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 219, 222, 3, 189, 191, 195, 118, 79, 86, 98, 255, 109, 122, 148, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 163, 255, 125, 140, 169, 255, 140, 152, 176, 255, 156, 164, 180, 22, 0, 0, 0, 0, 0, 0, 0, 0, 92, 95, 100, 223, 58, 64, 73, 255, 62, 68, 79, 255, 62, 68, 79, 255, 62, 68, 79, 255, 62, 68, 79, 255, 62, 68, 79, 255, 62, 68, 79, 255, 62, 68, 79, 255, 62, 68, 79, 255, 63, 70, 81, 255, 108, 117, 133, 255, 172, 180, 193, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 140, 143, 63, 102, 105, 109, 218, 57, 61, 68, 255, 57, 64, 76, 255, 67, 75, 90, 255, 79, 89, 107, 255, 88, 98, 119, 255, 95, 106, 128, 255, 90, 101, 122, 255, 86, 96, 117, 255, 80, 90, 109, 255, 67, 75, 89, 255, 66, 72, 83, 255, 60, 64, 72, 237, 100, 103, 108, 215, 108, 111, 115, 96, 199, 200, 202, 51, 97, 100, 104, 228, 60, 67, 77, 255, 70, 76, 89, 255, 73, 80, 93, 255, 76, 84, 98, 255, 79, 87, 102, 255, 82, 90, 105, 255, 84, 93, 109, 255, 86, 96, 112, 255, 88, 98, 114, 255, 90, 100, 117, 255, 95, 106, 124, 255, 120, 129, 146, 234, 164, 169, 177, 44, 0, 0, 0, 0, 103, 107, 111, 182, 57, 62, 72, 255, 63, 69, 80, 255, 63, 69, 80, 255, 63, 69, 80, 255, 63, 69, 81, 255, 63, 69, 81, 255, 63, 69, 81, 255, 63, 69, 81, 255, 63, 69, 81, 255, 64, 70, 81, 255, 88, 97, 112, 255, 138, 147, 164, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 152, 154, 76, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 144, 148, 154, 89, 220, 224, 230, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 192, 194, 43, 124, 126, 130, 89, 144, 146, 149, 214, 111, 114, 117, 217, 103, 106, 110, 217, 83, 86, 91, 217, 69, 73, 79, 217, 75, 79, 85, 217, 87, 90, 95, 217, 107, 110, 114, 217, 123, 126, 129, 217, 120, 122, 125, 172, 105, 108, 111, 89, 187, 188, 189, 89, 219, 219, 220, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 219, 219, 220, 8, 195, 195, 197, 89, 122, 124, 128, 89, 124, 127, 130, 160, 106, 109, 113, 217, 82, 85, 90, 217, 74, 78, 83, 217, 57, 61, 67, 217, 58, 63, 69, 217, 58, 62, 69, 217, 58, 62, 68, 217, 73, 76, 82, 217, 100, 103, 108, 217, 125, 128, 131, 217, 80, 83, 88, 98, 155, 156, 159, 89, 191, 192, 194, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 111, 115, 116, 54, 59, 70, 255, 111, 124, 149, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 152, 165, 188, 255, 187, 204, 231, 243, 183, 199, 228, 166, 204, 213, 228, 166, 209, 215, 227, 166, 197, 204, 217, 166, 162, 172, 190, 173, 128, 138, 157, 255, 105, 118, 142, 255, 118, 133, 160, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 123, 138, 166, 255, 145, 155, 173, 239, 198, 202, 209, 19, 0, 0, 0, 0, 0, 0, 0, 0, 149, 151, 154, 78, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 133, 136, 139, 89, 183, 186, 190, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 210, 211, 7, 169, 170, 173, 89, 130, 132, 135, 161, 123, 125, 128, 217, 99, 102, 106, 217, 77, 81, 86, 217, 57, 62, 68, 217, 76, 80, 85, 217, 88, 92, 97, 217, 108, 111, 115, 217, 111, 114, 117, 158, 127, 129, 132, 89, 187, 188, 190, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 166, 168, 79, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 135, 138, 143, 89, 169, 173, 179, 23, 0, 0, 0, 0, 157, 158, 161, 63, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 117, 120, 123, 89, 120, 123, 127, 89, 162, 166, 173, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 146, 149, 151, 71, 62, 67, 74, 255, 95, 107, 129, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 120, 134, 161, 255, 152, 165, 187, 255, 167, 184, 214, 255, 156, 175, 210, 255, 146, 164, 197, 255, 140, 157, 189, 255, 132, 148, 178, 255, 121, 137, 164, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 120, 135, 162, 255, 115, 129, 155, 255, 143, 151, 165, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 219, 219, 220, 26, 100, 103, 107, 202, 55, 62, 75, 255, 111, 124, 150, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 122, 137, 165, 255, 122, 136, 164, 255, 120, 135, 163, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 119, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 120, 134, 162, 255, 115, 129, 155, 255, 115, 124, 141, 255, 200, 202, 208, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 160, 162, 60, 72, 76, 81, 248, 67, 75, 91, 255, 112, 126, 152, 255, 118, 132, 159, 255, 118, 132, 159, 255, 118, 132, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 162, 255, 120, 134, 162, 255, 112, 125, 151, 255, 91, 101, 119, 255, 159, 162, 169, 172, 222, 223, 225, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, 226, 234, 2, 216, 221, 230, 30, 197, 204, 217, 30, 201, 208, 220, 30, 221, 225, 233, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 227, 234, 5, 219, 223, 232, 30, 215, 220, 229, 30, 221, 226, 233, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 159, 162, 108, 71, 75, 80, 248, 65, 73, 87, 255, 108, 121, 145, 255, 117, 131, 158, 255, 118, 132, 159, 255, 118, 132, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 118, 132, 159, 255, 105, 118, 142, 255, 81, 90, 106, 255, 129, 132, 139, 172, 167, 169, 172, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 183, 201, 136, 158, 170, 192, 156, 158, 170, 193, 156, 158, 170, 193, 156, 158, 170, 193, 156, 158, 170, 193, 156, 161, 172, 194, 156, 178, 188, 205, 156, 185, 194, 210, 48, 0, 0, 0, 0, 203, 210, 221, 117, 158, 170, 192, 156, 158, 170, 192, 156, 167, 178, 198, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, 203, 216, 104, 157, 169, 192, 156, 158, 170, 192, 156, 176, 185, 203, 136, 0, 0, 0, 0, 0, 0, 0, 0, 175, 185, 203, 2, 200, 207, 219, 102, 162, 174, 195, 162, 165, 176, 197, 255, 155, 167, 190, 255, 157, 169, 191, 255, 168, 179, 199, 253, 169, 180, 199, 155, 170, 181, 200, 27, 200, 207, 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 161, 173, 194, 139, 158, 170, 192, 156, 158, 170, 193, 156, 158, 170, 193, 156, 158, 170, 193, 156, 158, 170, 193, 156, 159, 171, 192, 156, 172, 182, 201, 156, 205, 211, 223, 118, 202, 209, 221, 6, 0, 0, 0, 0, 171, 182, 201, 119, 158, 170, 192, 156, 159, 171, 193, 156, 176, 186, 204, 56, 0, 0, 0, 0, 0, 0, 0, 0, 190, 198, 213, 18, 182, 191, 208, 114, 159, 171, 193, 171, 167, 177, 198, 255, 164, 175, 196, 255, 167, 178, 198, 243, 161, 173, 194, 156, 182, 191, 207, 78, 201, 208, 220, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 171, 173, 107, 77, 81, 85, 236, 48, 54, 64, 255, 84, 94, 114, 255, 112, 125, 150, 255, 117, 131, 158, 255, 118, 132, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 118, 133, 160, 255, 119, 133, 160, 255, 119, 133, 161, 255, 119, 133, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 119, 134, 161, 255, 117, 131, 158, 255, 104, 118, 141, 255, 82, 92, 111, 255, 72, 78, 89, 244, 145, 147, 151, 172, 164, 166, 168, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 146, 160, 184, 223, 127, 143, 172, 255, 127, 143, 172, 255, 129, 144, 173, 255, 129, 145, 173, 255, 129, 145, 173, 255, 127, 143, 172, 255, 127, 143, 172, 255, 142, 156, 181, 227, 179, 188, 205, 48, 187, 196, 211, 192, 127, 143, 172, 255, 127, 143, 172, 255, 140, 154, 180, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 187, 204, 171, 127, 143, 172, 255, 127, 143, 172, 255, 151, 165, 188, 223, 0, 0, 0, 0, 162, 173, 194, 2, 152, 165, 188, 110, 136, 151, 178, 255, 127, 143, 172, 255, 129, 144, 173, 255, 134, 149, 177, 255, 133, 148, 176, 255, 128, 144, 172, 255, 127, 143, 172, 255, 144, 158, 183, 255, 189, 197, 212, 91, 219, 223, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 147, 175, 228, 127, 143, 172, 255, 127, 143, 172, 255, 129, 144, 173, 255, 129, 145, 173, 255, 129, 145, 173, 255, 128, 143, 172, 255, 127, 143, 172, 255, 139, 154, 180, 255, 189, 198, 212, 132, 0, 0, 0, 0, 146, 160, 185, 194, 127, 143, 172, 255, 128, 144, 173, 255, 190, 198, 213, 199, 0, 0, 0, 0, 186, 195, 210, 42, 159, 171, 192, 223, 130, 146, 174, 255, 127, 143, 172, 255, 130, 146, 174, 255, 133, 148, 176, 255, 129, 145, 173, 255, 127, 143, 172, 255, 134, 149, 177, 255, 167, 178, 198, 184, 198, 205, 218, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 176, 24, 98, 101, 105, 133, 61, 65, 71, 249, 51, 56, 67, 255, 71, 80, 96, 255, 97, 108, 131, 255, 109, 123, 148, 255, 114, 128, 155, 255, 116, 131, 157, 255, 117, 132, 158, 255, 117, 132, 159, 255, 117, 132, 159, 255, 117, 132, 158, 255, 116, 131, 157, 255, 117, 130, 157, 255, 116, 130, 156, 255, 112, 125, 152, 255, 101, 113, 136, 255, 87, 98, 118, 255, 70, 78, 93, 255, 62, 67, 77, 244, 88, 92, 98, 172, 141, 143, 146, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 160, 185, 223, 127, 143, 172, 255, 128, 143, 172, 255, 170, 181, 200, 205, 149, 162, 186, 105, 168, 179, 199, 144, 146, 159, 184, 251, 127, 143, 172, 255, 128, 143, 172, 255, 181, 191, 207, 189, 188, 196, 212, 192, 127, 143, 172, 255, 127, 143, 172, 255, 141, 155, 181, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 187, 205, 171, 127, 143, 172, 255, 127, 143, 172, 255, 152, 165, 188, 223, 0, 0, 0, 0, 180, 190, 207, 102, 133, 148, 176, 255, 127, 143, 172, 255, 133, 148, 176, 254, 159, 171, 193, 161, 201, 208, 220, 105, 191, 199, 214, 105, 146, 160, 185, 172, 131, 147, 175, 255, 134, 149, 177, 255, 174, 183, 202, 245, 208, 214, 225, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, 148, 176, 228, 127, 143, 172, 255, 127, 143, 172, 255, 142, 156, 182, 126, 148, 161, 186, 105, 149, 162, 186, 105, 155, 167, 190, 217, 128, 144, 173, 255, 127, 143, 172, 255, 148, 161, 185, 190, 228, 232, 238, 5, 147, 160, 185, 194, 127, 143, 172, 255, 129, 145, 173, 255, 191, 199, 213, 199, 220, 225, 232, 31, 167, 178, 198, 224, 127, 143, 172, 255, 127, 143, 172, 255, 139, 154, 180, 220, 163, 174, 195, 105, 188, 196, 212, 105, 151, 164, 188, 120, 135, 150, 177, 247, 127, 143, 172, 255, 130, 146, 174, 255, 166, 177, 197, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 198, 200, 76, 117, 120, 123, 132, 98, 101, 105, 236, 52, 56, 62, 249, 47, 52, 60, 255, 55, 61, 72, 255, 61, 69, 83, 255, 67, 75, 91, 255, 70, 79, 95, 255, 71, 80, 97, 255, 68, 77, 93, 255, 66, 74, 89, 255, 63, 71, 85, 255, 62, 69, 81, 255, 55, 61, 71, 255, 64, 69, 76, 245, 99, 102, 107, 236, 121, 123, 127, 171, 173, 174, 176, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 160, 185, 223, 127, 143, 172, 255, 128, 144, 173, 255, 199, 206, 218, 176, 191, 199, 214, 19, 183, 192, 208, 19, 158, 170, 192, 208, 127, 143, 172, 255, 127, 143, 172, 255, 174, 184, 203, 189, 188, 196, 212, 192, 127, 143, 172, 255, 127, 143, 172, 255, 141, 155, 181, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 187, 205, 171, 127, 143, 172, 255, 127, 143, 172, 255, 152, 165, 188, 223, 227, 230, 236, 17, 166, 176, 197, 213, 127, 143, 172, 255, 128, 144, 172, 255, 172, 182, 201, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 182, 201, 2, 176, 186, 204, 107, 208, 214, 224, 107, 226, 230, 236, 55, 0, 0, 0, 0, 210, 216, 226, 78, 216, 221, 230, 148, 216, 221, 230, 148, 216, 221, 230, 148, 218, 223, 231, 87, 0, 0, 0, 0, 133, 148, 176, 228, 127, 143, 172, 255, 127, 143, 172, 255, 184, 193, 209, 117, 149, 162, 186, 19, 148, 161, 185, 19, 170, 180, 200, 159, 130, 146, 174, 255, 127, 143, 172, 255, 148, 161, 185, 214, 228, 232, 238, 24, 147, 160, 185, 194, 127, 143, 172, 255, 129, 145, 173, 255, 191, 199, 213, 199, 169, 180, 199, 53, 140, 154, 180, 255, 127, 143, 172, 255, 137, 151, 178, 255, 180, 189, 206, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 179, 199, 157, 127, 143, 172, 255, 127, 143, 172, 255, 150, 163, 187, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 212, 214, 74, 167, 169, 171, 110, 105, 108, 112, 110, 120, 122, 125, 192, 125, 127, 130, 239, 123, 125, 128, 239, 114, 117, 121, 239, 126, 129, 132, 239, 115, 118, 122, 165, 73, 77, 81, 110, 114, 117, 120, 110, 162, 164, 166, 110, 228, 228, 229, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 160, 185, 223, 127, 143, 172, 255, 127, 143, 172, 255, 147, 161, 185, 255, 155, 167, 190, 255, 151, 164, 188, 255, 130, 146, 174, 255, 127, 143, 172, 255, 135, 150, 177, 255, 183, 192, 208, 115, 187, 196, 212, 192, 127, 143, 172, 255, 127, 143, 172, 255, 141, 155, 181, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 187, 205, 171, 127, 143, 172, 255, 127, 143, 172, 255, 152, 165, 188, 223, 216, 221, 230, 29, 162, 174, 195, 255, 127, 143, 172, 255, 130, 145, 174, 255, 162, 173, 195, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 152, 165, 188, 247, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 255, 136, 151, 178, 150, 0, 0, 0, 0, 133, 148, 176, 228, 127, 143, 172, 255, 127, 143, 172, 255, 135, 150, 177, 255, 137, 151, 178, 255, 136, 151, 178, 255, 128, 144, 173, 255, 127, 143, 172, 255, 131, 147, 175, 255, 179, 188, 206, 175, 0, 0, 0, 0, 147, 160, 185, 194, 127, 143, 172, 255, 129, 145, 173, 255, 191, 199, 213, 199, 187, 195, 211, 126, 129, 145, 174, 255, 127, 143, 172, 255, 144, 158, 183, 230, 227, 231, 237, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 202, 215, 84, 127, 143, 172, 255, 127, 143, 172, 255, 132, 147, 175, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 160, 185, 223, 127, 143, 172, 255, 127, 143, 172, 255, 133, 148, 176, 255, 135, 150, 177, 255, 135, 150, 177, 255, 137, 152, 179, 255, 146, 160, 184, 244, 169, 180, 199, 141, 226, 230, 236, 26, 187, 196, 211, 192, 127, 143, 172, 255, 127, 143, 172, 255, 141, 155, 181, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 187, 204, 171, 127, 143, 172, 255, 127, 143, 172, 255, 153, 166, 189, 223, 220, 224, 232, 28, 164, 175, 196, 250, 127, 143, 172, 255, 129, 144, 173, 255, 179, 189, 206, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 161, 173, 194, 0, 158, 170, 192, 13, 169, 180, 199, 13, 186, 195, 211, 13, 196, 203, 217, 0, 160, 172, 193, 240, 141, 155, 181, 255, 141, 155, 181, 255, 140, 154, 181, 255, 147, 160, 185, 150, 0, 0, 0, 0, 133, 148, 176, 228, 127, 143, 172, 255, 127, 143, 172, 255, 141, 156, 181, 250, 140, 155, 181, 246, 129, 145, 173, 255, 127, 143, 172, 255, 136, 151, 178, 255, 169, 180, 200, 141, 218, 222, 231, 24, 0, 0, 0, 0, 147, 160, 185, 194, 127, 143, 172, 255, 129, 145, 173, 255, 191, 199, 213, 199, 184, 193, 209, 110, 131, 147, 175, 255, 127, 143, 172, 255, 139, 154, 180, 236, 204, 211, 222, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 190, 207, 100, 127, 143, 172, 255, 127, 143, 172, 255, 136, 151, 178, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 160, 185, 223, 127, 143, 172, 255, 128, 144, 173, 255, 197, 204, 217, 208, 216, 221, 230, 115, 216, 221, 230, 115, 221, 226, 233, 115, 230, 233, 239, 24, 0, 0, 0, 0, 0, 0, 0, 0, 193, 201, 215, 187, 128, 144, 173, 255, 127, 143, 172, 255, 138, 152, 179, 231, 178, 187, 204, 49, 217, 222, 231, 11, 210, 216, 226, 33, 162, 174, 195, 217, 127, 143, 172, 255, 127, 143, 172, 255, 167, 178, 198, 217, 0, 0, 0, 0, 162, 174, 194, 150, 127, 143, 172, 255, 127, 143, 172, 255, 146, 160, 185, 247, 200, 207, 219, 67, 216, 221, 230, 11, 203, 210, 222, 11, 165, 176, 196, 80, 141, 155, 181, 255, 146, 160, 184, 255, 167, 178, 198, 255, 185, 194, 210, 5, 228, 232, 238, 53, 229, 233, 238, 115, 229, 233, 238, 115, 229, 233, 238, 115, 229, 233, 238, 68, 0, 0, 0, 0, 133, 148, 176, 228, 127, 143, 172, 255, 127, 143, 172, 255, 188, 196, 212, 94, 204, 211, 222, 39, 146, 159, 184, 232, 127, 143, 172, 255, 130, 145, 174, 255, 160, 172, 193, 125, 213, 219, 228, 2, 0, 0, 0, 0, 147, 160, 185, 194, 127, 143, 172, 255, 129, 145, 173, 255, 191, 199, 213, 199, 189, 196, 212, 51, 147, 160, 185, 252, 127, 143, 172, 255, 131, 146, 174, 255, 165, 176, 197, 158, 191, 199, 214, 11, 219, 224, 232, 11, 187, 195, 211, 26, 154, 166, 189, 211, 127, 143, 172, 255, 128, 143, 172, 255, 175, 185, 203, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 160, 185, 223, 127, 143, 172, 255, 128, 144, 173, 255, 201, 207, 220, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 193, 200, 215, 61, 147, 160, 185, 253, 127, 143, 172, 255, 127, 143, 172, 255, 144, 158, 183, 255, 169, 180, 199, 255, 156, 169, 191, 255, 129, 145, 173, 255, 127, 143, 172, 255, 134, 149, 176, 254, 170, 180, 200, 91, 0, 0, 0, 0, 186, 194, 210, 25, 156, 168, 191, 252, 127, 143, 172, 255, 127, 143, 172, 255, 140, 154, 180, 255, 169, 179, 199, 255, 162, 174, 195, 255, 131, 147, 175, 255, 127, 143, 172, 255, 129, 145, 174, 255, 189, 198, 212, 184, 226, 230, 236, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, 148, 176, 228, 127, 143, 172, 255, 127, 143, 172, 255, 127, 143, 172, 36, 0, 0, 0, 0, 185, 194, 209, 141, 132, 148, 175, 254, 127, 143, 172, 255, 143, 158, 183, 255, 181, 191, 207, 59, 0, 0, 0, 0, 147, 160, 185, 194, 127, 143, 172, 255, 129, 145, 173, 255, 191, 199, 213, 199, 0, 0, 0, 0, 160, 171, 193, 108, 132, 147, 175, 252, 127, 143, 172, 255, 130, 145, 173, 255, 157, 169, 191, 255, 170, 180, 200, 255, 150, 163, 187, 255, 127, 143, 172, 255, 127, 143, 172, 255, 144, 158, 183, 239, 190, 198, 213, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 151, 164, 187, 219, 134, 149, 177, 250, 134, 149, 177, 250, 203, 209, 221, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 193, 201, 215, 120, 157, 169, 192, 250, 134, 149, 177, 253, 130, 145, 173, 255, 128, 144, 173, 255, 129, 145, 173, 255, 133, 148, 176, 254, 147, 161, 185, 250, 177, 187, 205, 150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 222, 230, 72, 162, 174, 195, 196, 138, 153, 179, 250, 131, 146, 174, 255, 128, 144, 173, 255, 129, 145, 173, 255, 133, 149, 176, 255, 151, 164, 187, 249, 177, 186, 204, 121, 210, 215, 226, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 152, 178, 224, 134, 149, 177, 250, 134, 149, 177, 250, 134, 149, 177, 35, 0, 0, 0, 0, 0, 0, 0, 0, 157, 169, 191, 205, 134, 149, 176, 250, 134, 149, 176, 250, 158, 170, 192, 183, 0, 0, 0, 0, 151, 164, 188, 190, 134, 149, 176, 250, 135, 150, 177, 250, 193, 201, 215, 195, 0, 0, 0, 0, 0, 0, 0, 0, 171, 182, 201, 107, 153, 166, 189, 250, 134, 149, 176, 253, 129, 145, 173, 255, 128, 144, 173, 255, 130, 146, 174, 255, 137, 152, 179, 252, 169, 179, 199, 237, 189, 197, 212, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, 226, 233, 89, 204, 210, 222, 123, 193, 201, 215, 123, 200, 206, 219, 123, 218, 222, 231, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, 221, 230, 8, 209, 215, 225, 123, 194, 201, 215, 123, 199, 207, 219, 123, 223, 227, 234, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 227, 230, 237, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 224, 232, 82, 201, 208, 220, 123, 194, 202, 216, 123, 207, 213, 224, 123, 223, 227, 234, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(208, 48, imgdata); + return image; +} + diff --git a/iup/srcimglib/iup_imglib_logos8.h b/iup/srcimglib/iup_imglib_logos8.h new file mode 100755 index 0000000..c25cc89 --- /dev/null +++ b/iup/srcimglib/iup_imglib_logos8.h @@ -0,0 +1,1915 @@ +static Ihandle* load_image_LogoBR8(void) +{ + unsigned char imgdata[] = { + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 6, 6, 6, 6, 6, 6, 6, 14, 123, 125, 125, 125, 125, 125, 125, 125, 124, 106, 78, 30, 6, 6, 6, 6, 6, 6, 51, 125, 125, 125, 125, 125, 125, 125, 125, 124, 104, 62, 19, 6, 6, 6, 6, 6, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 32, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 50, 0, 0, 0, 0, 0, 89, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 105, 18, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 65, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 122, 20, 0, 0, 0, 8, 121, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 66, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 2, 108, 125, 125, 125, 110, 34, 34, 34, 36, 61, 125, 125, 125, 125, 42, 0, 0, 0, 31, 125, 125, 125, 125, 70, 39, 39, 39, 48, 99, 125, 125, 125, 108, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 24, 125, 125, 125, 125, 70, 0, 0, 0, 0, 0, 103, 125, 125, 125, 42, 0, 0, 0, 64, 125, 125, 125, 125, 24, 0, 0, 0, 0, 29, 125, 125, 125, 115, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 54, 125, 125, 125, 125, 38, 0, 0, 0, 0, 21, 120, 125, 125, 125, 22, 0, 0, 1, 104, 125, 125, 125, 109, 2, 0, 0, 0, 0, 33, 125, 125, 125, 91, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 94, 125, 125, 125, 125, 68, 59, 59, 59, 64, 111, 125, 125, 125, 73, 0, 0, 0, 23, 125, 125, 125, 125, 71, 0, 0, 0, 1, 27, 104, 125, 125, 125, 39, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 13, 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 86, 7, 0, 0, 0, 52, 125, 125, 125, 125, 114, 105, 105, 105, 112, 125, 125, 125, 125, 75, 1, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 38, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 119, 29, 0, 0, 0, 0, 92, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 123, 59, 5, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 72, 125, 125, 125, 125, 83, 74, 74, 74, 93, 125, 125, 125, 125, 113, 15, 0, 0, 10, 123, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 89, 9, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 4, 111, 125, 125, 125, 111, 4, 0, 0, 0, 0, 79, 125, 125, 125, 125, 46, 0, 0, 35, 125, 125, 125, 125, 76, 41, 41, 45, 71, 125, 125, 125, 125, 60, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 27, 125, 125, 125, 125, 72, 0, 0, 0, 0, 0, 63, 125, 125, 125, 125, 52, 0, 0, 69, 125, 125, 125, 125, 28, 0, 0, 0, 0, 100, 125, 125, 125, 88, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 56, 125, 125, 125, 125, 38, 0, 0, 0, 0, 25, 116, 125, 125, 125, 125, 37, 0, 3, 109, 125, 125, 125, 113, 4, 0, 0, 0, 0, 90, 125, 125, 125, 94, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 97, 125, 125, 125, 125, 96, 90, 90, 90, 98, 124, 125, 125, 125, 125, 118, 12, 0, 26, 125, 125, 125, 125, 77, 0, 0, 0, 0, 0, 84, 125, 125, 125, 98, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 16, 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 50, 0, 0, 55, 125, 125, 125, 125, 44, 0, 0, 0, 0, 0, 80, 125, 125, 125, 102, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 43, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 117, 47, 0, 0, 0, 95, 125, 125, 125, 125, 17, 0, 0, 0, 0, 0, 72, 125, 125, 125, 107, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 49, 82, 82, 82, 82, 82, 82, 82, 82, 82, 81, 72, 58, 40, 11, 0, 0, 0, 7, 85, 87, 87, 87, 67, 0, 0, 0, 0, 0, 0, 57, 101, 101, 101, 97, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125}; + + Ihandle* image = IupImage(48, 48, imgdata); + + IupSetAttribute(image, "0", "0 140 79"); + IupSetAttribute(image, "1", "1 140 80"); + IupSetAttribute(image, "2", "3 141 81"); + IupSetAttribute(image, "3", "4 141 81"); + IupSetAttribute(image, "4", "4 142 82"); + IupSetAttribute(image, "5", "5 142 83"); + IupSetAttribute(image, "6", "8 142 83"); + IupSetAttribute(image, "7", "12 145 87"); + IupSetAttribute(image, "8", "16 146 89"); + IupSetAttribute(image, "9", "19 148 92"); + IupSetAttribute(image, "10", "20 149 92"); + IupSetAttribute(image, "11", "22 149 93"); + IupSetAttribute(image, "12", "22 149 94"); + IupSetAttribute(image, "13", "23 150 94"); + IupSetAttribute(image, "14", "26 150 95"); + IupSetAttribute(image, "15", "25 151 96"); + IupSetAttribute(image, "16", "28 152 98"); + IupSetAttribute(image, "17", "31 153 100"); + IupSetAttribute(image, "18", "31 154 100"); + IupSetAttribute(image, "19", "35 154 101"); + IupSetAttribute(image, "20", "36 156 103"); + IupSetAttribute(image, "21", "38 157 105"); + IupSetAttribute(image, "22", "43 159 108"); + IupSetAttribute(image, "23", "51 162 114"); + IupSetAttribute(image, "24", "54 164 116"); + IupSetAttribute(image, "25", "56 164 117"); + IupSetAttribute(image, "26", "58 165 118"); + IupSetAttribute(image, "27", "61 166 120"); + IupSetAttribute(image, "28", "64 168 122"); + IupSetAttribute(image, "29", "66 169 124"); + IupSetAttribute(image, "30", "73 171 127"); + IupSetAttribute(image, "31", "85 177 137"); + IupSetAttribute(image, "32", "89 179 140"); + IupSetAttribute(image, "33", "90 180 140"); + IupSetAttribute(image, "34", "90 181 141"); + IupSetAttribute(image, "35", "92 180 141"); + IupSetAttribute(image, "36", "92 181 142"); + IupSetAttribute(image, "37", "94 182 143"); + IupSetAttribute(image, "38", "95 182 144"); + IupSetAttribute(image, "39", "97 183 145"); + IupSetAttribute(image, "40", "98 184 146"); + IupSetAttribute(image, "41", "99 185 147"); + IupSetAttribute(image, "42", "100 184 147"); + IupSetAttribute(image, "43", "101 185 148"); + IupSetAttribute(image, "44", "103 186 149"); + IupSetAttribute(image, "45", "104 186 150"); + IupSetAttribute(image, "46", "106 187 151"); + IupSetAttribute(image, "47", "110 189 154"); + IupSetAttribute(image, "48", "111 189 155"); + IupSetAttribute(image, "49", "115 191 157"); + IupSetAttribute(image, "50", "122 194 162"); + IupSetAttribute(image, "51", "124 194 163"); + IupSetAttribute(image, "52", "125 196 164"); + IupSetAttribute(image, "53", "255 204 48"); + IupSetAttribute(image, "54", "129 197 167"); + IupSetAttribute(image, "55", "132 199 169"); + IupSetAttribute(image, "56", "135 200 171"); + IupSetAttribute(image, "57", "140 202 174"); + IupSetAttribute(image, "58", "145 205 178"); + IupSetAttribute(image, "59", "146 205 179"); + IupSetAttribute(image, "60", "150 207 182"); + IupSetAttribute(image, "61", "155 209 185"); + IupSetAttribute(image, "62", "159 210 186"); + IupSetAttribute(image, "63", "157 210 187"); + IupSetAttribute(image, "64", "158 211 188"); + IupSetAttribute(image, "65", "163 213 190"); + IupSetAttribute(image, "66", "163 213 191"); + IupSetAttribute(image, "67", "165 213 191"); + IupSetAttribute(image, "68", "166 213 192"); + IupSetAttribute(image, "69", "165 214 192"); + IupSetAttribute(image, "70", "166 214 193"); + IupSetAttribute(image, "71", "168 215 194"); + IupSetAttribute(image, "72", "169 215 195"); + IupSetAttribute(image, "73", "170 216 195"); + IupSetAttribute(image, "74", "170 216 196"); + IupSetAttribute(image, "75", "172 217 197"); + IupSetAttribute(image, "76", "173 218 198"); + IupSetAttribute(image, "77", "175 218 199"); + IupSetAttribute(image, "78", "176 217 198"); + IupSetAttribute(image, "79", "177 219 200"); + IupSetAttribute(image, "80", "178 219 201"); + IupSetAttribute(image, "81", "178 220 201"); + IupSetAttribute(image, "82", "179 220 202"); + IupSetAttribute(image, "83", "182 222 204"); + IupSetAttribute(image, "84", "186 223 207"); + IupSetAttribute(image, "85", "188 223 207"); + IupSetAttribute(image, "86", "187 224 208"); + IupSetAttribute(image, "87", "189 224 208"); + IupSetAttribute(image, "88", "191 226 210"); + IupSetAttribute(image, "89", "192 226 211"); + IupSetAttribute(image, "90", "195 227 213"); + IupSetAttribute(image, "91", "199 229 215"); + IupSetAttribute(image, "92", "199 229 216"); + IupSetAttribute(image, "93", "201 230 217"); + IupSetAttribute(image, "94", "202 231 218"); + IupSetAttribute(image, "95", "205 232 220"); + IupSetAttribute(image, "96", "206 233 221"); + IupSetAttribute(image, "97", "209 233 222"); + IupSetAttribute(image, "98", "213 235 225"); + IupSetAttribute(image, "99", "216 237 228"); + IupSetAttribute(image, "100", "219 238 230"); + IupSetAttribute(image, "101", "221 239 231"); + IupSetAttribute(image, "102", "222 240 232"); + IupSetAttribute(image, "103", "230 243 236"); + IupSetAttribute(image, "104", "230 242 237"); + IupSetAttribute(image, "105", "230 244 238"); + IupSetAttribute(image, "106", "233 243 238"); + IupSetAttribute(image, "107", "233 244 239"); + IupSetAttribute(image, "108", "234 245 240"); + IupSetAttribute(image, "109", "236 246 241"); + IupSetAttribute(image, "110", "236 246 242"); + IupSetAttribute(image, "111", "238 247 243"); + IupSetAttribute(image, "112", "239 247 244"); + IupSetAttribute(image, "113", "241 248 245"); + IupSetAttribute(image, "114", "243 249 247"); + IupSetAttribute(image, "115", "244 249 247"); + IupSetAttribute(image, "116", "244 250 247"); + IupSetAttribute(image, "117", "246 251 249"); + IupSetAttribute(image, "118", "248 251 250"); + IupSetAttribute(image, "119", "248 252 250"); + IupSetAttribute(image, "120", "250 253 251"); + IupSetAttribute(image, "121", "250 253 252"); + IupSetAttribute(image, "122", "252 253 253"); + IupSetAttribute(image, "123", "252 254 253"); + IupSetAttribute(image, "124", "253 254 254"); + IupSetAttribute(image, "125", "254 255 255"); + IupSetAttribute(image, "126", "0 0 0"); + IupSetAttribute(image, "127", "0 0 0"); + IupSetAttribute(image, "128", "0 0 0"); + IupSetAttribute(image, "129", "0 0 0"); + IupSetAttribute(image, "130", "0 0 0"); + IupSetAttribute(image, "131", "0 0 0"); + IupSetAttribute(image, "132", "0 0 0"); + IupSetAttribute(image, "133", "0 0 0"); + IupSetAttribute(image, "134", "0 0 0"); + IupSetAttribute(image, "135", "0 0 0"); + IupSetAttribute(image, "136", "0 0 0"); + IupSetAttribute(image, "137", "0 0 0"); + IupSetAttribute(image, "138", "0 0 0"); + IupSetAttribute(image, "139", "0 0 0"); + IupSetAttribute(image, "140", "0 0 0"); + IupSetAttribute(image, "141", "0 0 0"); + IupSetAttribute(image, "142", "0 0 0"); + IupSetAttribute(image, "143", "0 0 0"); + IupSetAttribute(image, "144", "0 0 0"); + IupSetAttribute(image, "145", "0 0 0"); + IupSetAttribute(image, "146", "0 0 0"); + IupSetAttribute(image, "147", "0 0 0"); + IupSetAttribute(image, "148", "0 0 0"); + IupSetAttribute(image, "149", "0 0 0"); + IupSetAttribute(image, "150", "0 0 0"); + IupSetAttribute(image, "151", "0 0 0"); + IupSetAttribute(image, "152", "0 0 0"); + IupSetAttribute(image, "153", "0 0 0"); + IupSetAttribute(image, "154", "0 0 0"); + IupSetAttribute(image, "155", "0 0 0"); + IupSetAttribute(image, "156", "0 0 0"); + IupSetAttribute(image, "157", "0 0 0"); + IupSetAttribute(image, "158", "0 0 0"); + IupSetAttribute(image, "159", "0 0 0"); + IupSetAttribute(image, "160", "0 0 0"); + IupSetAttribute(image, "161", "0 0 0"); + IupSetAttribute(image, "162", "0 0 0"); + IupSetAttribute(image, "163", "0 0 0"); + IupSetAttribute(image, "164", "0 0 0"); + IupSetAttribute(image, "165", "0 0 0"); + IupSetAttribute(image, "166", "0 0 0"); + IupSetAttribute(image, "167", "0 0 0"); + IupSetAttribute(image, "168", "0 0 0"); + IupSetAttribute(image, "169", "0 0 0"); + IupSetAttribute(image, "170", "0 0 0"); + IupSetAttribute(image, "171", "0 0 0"); + IupSetAttribute(image, "172", "0 0 0"); + IupSetAttribute(image, "173", "0 0 0"); + IupSetAttribute(image, "174", "0 0 0"); + IupSetAttribute(image, "175", "0 0 0"); + IupSetAttribute(image, "176", "0 0 0"); + IupSetAttribute(image, "177", "0 0 0"); + IupSetAttribute(image, "178", "0 0 0"); + IupSetAttribute(image, "179", "0 0 0"); + IupSetAttribute(image, "180", "0 0 0"); + IupSetAttribute(image, "181", "0 0 0"); + IupSetAttribute(image, "182", "0 0 0"); + IupSetAttribute(image, "183", "0 0 0"); + IupSetAttribute(image, "184", "0 0 0"); + IupSetAttribute(image, "185", "0 0 0"); + IupSetAttribute(image, "186", "0 0 0"); + IupSetAttribute(image, "187", "0 0 0"); + IupSetAttribute(image, "188", "0 0 0"); + IupSetAttribute(image, "189", "0 0 0"); + IupSetAttribute(image, "190", "0 0 0"); + IupSetAttribute(image, "191", "0 0 0"); + IupSetAttribute(image, "192", "0 0 0"); + IupSetAttribute(image, "193", "0 0 0"); + IupSetAttribute(image, "194", "0 0 0"); + IupSetAttribute(image, "195", "0 0 0"); + IupSetAttribute(image, "196", "0 0 0"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_LogoPUC_Rio8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 222, 199, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 143, 151, 232, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 180, 148, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 41, 35, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 232, 248, 193, 30, 30, 180, 244, 232, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 220, 243, 219, 168, 30, 41, 154, 160, 41, 35, 162, 192, 244, 196, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 221, 192, 156, 173, 168, 30, 170, 172, 133, 158, 173, 160, 190, 196, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 227, 152, 32, 143, 27, 29, 31, 34, 29, 30, 132, 34, 150, 221, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 227, 232, 255, 255, 255, 255, 232, 156, 162, 155, 162, 154, 146, 145, 154, 162, 155, 160, 156, 227, 255, 255, 255, 255, 244, 227, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 193, 35, 174, 244, 255, 251, 244, 133, 34, 29, 41, 174, 134, 142, 174, 41, 30, 34, 147, 231, 251, 255, 244, 180, 35, 180, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 200, 41, 18, 200, 255, 232, 145, 41, 40, 173, 34, 40, 160, 162, 40, 40, 168, 133, 174, 143, 220, 255, 227, 35, 41, 193, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 180, 174, 41, 251, 255, 244, 162, 134, 154, 172, 162, 26, 154, 162, 34, 145, 168, 168, 30, 164, 227, 255, 255, 180, 174, 41, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 41, 174, 193, 255, 255, 251, 143, 30, 17, 33, 32, 133, 144, 145, 141, 34, 33, 26, 30, 145, 244, 255, 255, 200, 174, 174, 227, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 193, 174, 41, 244, 255, 255, 255, 156, 146, 154, 145, 147, 147, 134, 134, 147, 147, 144, 154, 154, 145, 251, 255, 255, 251, 174, 174, 174, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 244, 197, 244, 255, 255, 255, 174, 174, 180, 248, 255, 255, 251, 148, 41, 41, 147, 41, 174, 142, 144, 174, 174, 133, 40, 41, 40, 251, 255, 255, 251, 193, 174, 41, 251, 255, 255, 248, 193, 232, 255, 255, 255, 255, + 255, 255, 255, 255, 232, 162, 162, 197, 251, 255, 135, 13, 119, 12, 232, 255, 251, 133, 41, 34, 173, 144, 40, 162, 168, 134, 133, 168, 144, 174, 33, 244, 255, 244, 27, 119, 13, 39, 251, 251, 200, 41, 41, 227, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 244, 152, 162, 160, 223, 251, 139, 122, 28, 41, 232, 255, 192, 144, 146, 168, 146, 18, 146, 154, 30, 144, 162, 162, 30, 163, 255, 244, 41, 35, 122, 138, 248, 232, 174, 41, 41, 244, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 196, 158, 145, 164, 161, 232, 186, 27, 18, 244, 255, 227, 18, 29, 132, 133, 146, 146, 153, 146, 147, 132, 30, 18, 196, 255, 251, 35, 27, 178, 244, 180, 41, 35, 35, 174, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 221, 161, 168, 160, 140, 154, 162, 35, 2, 174, 255, 255, 251, 33, 137, 129, 124, 11, 121, 120, 10, 123, 129, 130, 132, 244, 255, 255, 180, 2, 35, 41, 35, 35, 41, 174, 174, 193, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 251, 156, 170, 148, 193, 164, 168, 31, 35, 16, 179, 251, 255, 255, 244, 186, 122, 127, 125, 131, 128, 126, 127, 127, 136, 232, 255, 255, 255, 193, 18, 27, 14, 41, 174, 180, 174, 41, 41, 244, 255, 255, 255, 255, + 255, 255, 255, 255, 227, 157, 173, 187, 187, 156, 188, 41, 35, 14, 31, 17, 177, 180, 180, 25, 9, 8, 174, 180, 180, 180, 7, 9, 12, 180, 180, 180, 21, 15, 14, 35, 41, 193, 41, 174, 180, 174, 41, 227, 251, 255, 255, 255, + 255, 255, 255, 251, 152, 156, 162, 188, 170, 173, 187, 41, 44, 52, 52, 54, 54, 53, 58, 62, 62, 62, 62, 64, 64, 62, 62, 62, 62, 58, 53, 54, 54, 52, 52, 43, 41, 180, 174, 174, 180, 41, 41, 41, 244, 255, 255, 255, + 255, 255, 255, 255, 251, 251, 188, 143, 164, 190, 232, 174, 44, 54, 54, 54, 58, 47, 56, 64, 44, 64, 49, 65, 65, 50, 63, 46, 63, 64, 42, 58, 58, 54, 54, 43, 41, 244, 180, 41, 35, 180, 244, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 248, 248, 146, 222, 255, 232, 5, 54, 48, 56, 64, 72, 51, 59, 82, 75, 76, 93, 93, 75, 76, 76, 74, 60, 36, 64, 61, 42, 54, 42, 227, 255, 232, 35, 232, 248, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 244, 244, 255, 255, 72, 58, 55, 71, 65, 76, 73, 76, 83, 84, 88, 107, 107, 94, 37, 77, 83, 75, 82, 65, 74, 74, 62, 47, 255, 255, 251, 232, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 72, 64, 64, 40, 88, 88, 97, 86, 83, 40, 106, 114, 114, 114, 32, 78, 99, 83, 78, 92, 34, 63, 64, 47, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 72, 64, 63, 75, 147, 94, 34, 83, 174, 32, 74, 117, 117, 76, 40, 80, 99, 40, 91, 41, 73, 93, 63, 47, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 72, 93, 5, 94, 41, 41, 98, 34, 162, 162, 100, 118, 118, 101, 162, 160, 147, 148, 83, 147, 94, 6, 92, 67, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 83, 93, 79, 41, 91, 148, 151, 173, 173, 173, 103, 204, 204, 112, 168, 173, 173, 151, 151, 105, 82, 73, 93, 67, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 83, 94, 106, 83, 149, 86, 156, 172, 159, 154, 203, 207, 207, 207, 149, 158, 168, 162, 78, 148, 41, 106, 92, 70, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 83, 107, 20, 87, 102, 162, 172, 152, 205, 205, 210, 210, 210, 210, 205, 205, 174, 173, 168, 98, 108, 22, 94, 70, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 251, 193, 174, 174, 232, 255, 255, 255, 83, 114, 113, 82, 40, 162, 173, 180, 210, 213, 215, 215, 215, 215, 213, 210, 177, 173, 164, 97, 38, 113, 114, 72, 255, 255, 255, 244, 189, 161, 192, 248, 255, 255, 255, 255, + 255, 255, 255, 255, 193, 41, 193, 174, 41, 244, 180, 174, 19, 115, 69, 101, 87, 162, 173, 179, 215, 215, 215, 216, 216, 215, 215, 215, 152, 173, 168, 86, 101, 71, 114, 66, 161, 187, 244, 156, 161, 198, 162, 187, 255, 255, 255, 255, + 255, 255, 255, 255, 41, 193, 255, 251, 41, 41, 35, 35, 20, 115, 117, 102, 147, 162, 166, 157, 233, 237, 238, 237, 233, 238, 238, 233, 157, 167, 168, 147, 99, 116, 115, 66, 145, 162, 147, 162, 242, 255, 222, 158, 248, 255, 255, 255, + 255, 255, 255, 232, 41, 174, 200, 232, 41, 41, 41, 35, 71, 117, 117, 110, 174, 168, 217, 251, 251, 251, 251, 251, 247, 251, 232, 232, 251, 226, 168, 176, 103, 117, 117, 72, 157, 149, 162, 168, 222, 231, 161, 162, 224, 255, 255, 255, + 255, 255, 244, 41, 174, 180, 41, 35, 174, 41, 174, 251, 83, 117, 109, 102, 102, 154, 217, 251, 3, 0, 41, 251, 247, 18, 14, 3, 193, 226, 162, 83, 102, 108, 117, 72, 251, 190, 162, 163, 154, 162, 189, 189, 162, 227, 255, 255, + 255, 255, 193, 41, 251, 255, 180, 174, 255, 232, 41, 232, 83, 117, 116, 102, 156, 162, 217, 251, 35, 3, 200, 251, 227, 35, 251, 232, 4, 226, 168, 156, 175, 116, 117, 72, 251, 158, 200, 255, 192, 161, 255, 255, 163, 191, 255, 255, + 255, 255, 180, 41, 244, 251, 177, 99, 241, 235, 80, 232, 83, 117, 83, 177, 103, 152, 217, 248, 1, 4, 14, 251, 230, 41, 251, 248, 14, 226, 160, 103, 181, 82, 116, 72, 251, 151, 208, 241, 193, 157, 251, 251, 161, 157, 251, 255, + 255, 251, 35, 41, 41, 174, 72, 187, 171, 171, 165, 249, 85, 117, 204, 111, 147, 156, 217, 180, 41, 227, 4, 227, 247, 4, 251, 193, 174, 226, 160, 147, 103, 204, 117, 72, 255, 192, 171, 171, 169, 102, 160, 160, 162, 154, 232, 255, + 255, 255, 251, 244, 193, 193, 91, 175, 34, 151, 163, 241, 99, 117, 108, 99, 201, 152, 217, 41, 200, 251, 180, 200, 244, 18, 232, 174, 180, 226, 156, 201, 102, 87, 117, 83, 255, 192, 173, 152, 165, 89, 198, 198, 243, 251, 255, 255, + 255, 255, 255, 255, 255, 255, 117, 87, 38, 67, 163, 238, 180, 115, 118, 110, 147, 149, 217, 251, 251, 251, 251, 251, 247, 251, 251, 251, 251, 225, 151, 142, 103, 118, 117, 175, 246, 165, 173, 152, 180, 93, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 202, 57, 152, 170, 151, 227, 227, 90, 117, 87, 112, 152, 168, 169, 218, 218, 169, 218, 218, 169, 217, 218, 218, 168, 156, 112, 101, 116, 109, 200, 238, 162, 173, 147, 87, 95, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 239, 215, 148, 47, 83, 187, 251, 71, 117, 116, 23, 175, 149, 179, 160, 147, 151, 185, 185, 152, 147, 162, 148, 146, 99, 35, 109, 117, 70, 251, 200, 71, 47, 41, 214, 236, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 195, 149, 168, 168, 235, 228, 74, 117, 204, 110, 102, 103, 175, 102, 209, 215, 215, 210, 83, 182, 102, 104, 101, 204, 117, 77, 200, 245, 84, 152, 168, 179, 249, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 238, 161, 161, 47, 179, 249, 227, 71, 79, 112, 204, 207, 207, 207, 210, 210, 210, 210, 207, 207, 207, 204, 116, 79, 71, 200, 251, 193, 146, 83, 68, 227, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 193, 70, 164, 148, 200, 251, 255, 244, 200, 193, 175, 81, 203, 207, 207, 207, 207, 203, 83, 99, 180, 200, 232, 251, 255, 228, 174, 24, 157, 189, 249, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 187, 147, 72, 147, 212, 251, 255, 255, 255, 255, 248, 180, 86, 204, 204, 101, 175, 248, 255, 255, 255, 255, 255, 235, 161, 36, 148, 152, 235, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 238, 40, 98, 173, 169, 239, 255, 255, 255, 255, 255, 255, 227, 78, 87, 200, 255, 255, 255, 255, 255, 255, 249, 192, 173, 173, 144, 200, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 228, 169, 169, 188, 235, 255, 241, 251, 255, 255, 255, 255, 193, 183, 255, 255, 255, 255, 255, 241, 251, 228, 187, 191, 173, 200, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 90, 187, 173, 169, 200, 191, 192, 228, 245, 251, 255, 255, 255, 255, 251, 245, 229, 184, 169, 194, 171, 173, 187, 87, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 191, 173, 173, 173, 187, 174, 38, 134, 156, 174, 197, 199, 199, 195, 179, 149, 82, 30, 168, 189, 173, 173, 173, 191, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 240, 192, 173, 173, 187, 72, 162, 151, 174, 38, 83, 168, 71, 161, 72, 154, 161, 45, 147, 189, 169, 173, 192, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 211, 169, 96, 193, 40, 152, 72, 47, 157, 146, 66, 161, 82, 151, 168, 38, 179, 108, 191, 227, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 239, 251, 241, 227, 193, 179, 174, 147, 152, 98, 189, 196, 227, 239, 251, 241, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 246, 246, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 232, 227, 200, 200, 200, 227, 227, 244, 255, 255, 244, 227, 200, 200, 227, 232, 255, 255, 255, 232, 227, 200, 227, 244, 255, 255, 255, 244, 200, 193, 193, 200, 232, 248, 227, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 244, 174, 193, 244, 232, 193, 174, 227, 255, 255, 251, 174, 174, 244, 255, 255, 255, 255, 255, 248, 174, 248, 255, 255, 251, 200, 180, 232, 251, 255, 251, 227, 174, 200, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 248, 174, 193, 255, 255, 251, 180, 174, 232, 255, 255, 180, 174, 251, 255, 255, 255, 255, 255, 255, 180, 255, 255, 251, 193, 174, 244, 255, 255, 255, 255, 255, 232, 193, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 248, 174, 193, 255, 255, 255, 200, 174, 200, 255, 255, 180, 174, 255, 255, 255, 255, 255, 255, 255, 180, 255, 255, 232, 174, 200, 255, 255, 255, 255, 255, 255, 251, 200, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 248, 174, 193, 255, 255, 255, 227, 174, 200, 255, 255, 180, 174, 255, 255, 255, 255, 255, 255, 255, 180, 255, 255, 193, 174, 244, 255, 255, 255, 255, 255, 255, 255, 244, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 248, 174, 193, 255, 255, 251, 180, 174, 232, 255, 255, 180, 174, 255, 255, 255, 255, 255, 255, 255, 180, 255, 251, 174, 174, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 248, 174, 180, 232, 232, 193, 174, 227, 255, 255, 255, 180, 174, 255, 255, 255, 255, 255, 255, 255, 180, 255, 244, 174, 174, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 248, 174, 193, 244, 232, 232, 248, 255, 255, 255, 255, 180, 174, 255, 255, 255, 255, 255, 255, 255, 180, 255, 248, 174, 174, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 248, 174, 193, 255, 255, 255, 255, 255, 255, 255, 255, 180, 174, 251, 255, 255, 255, 255, 255, 251, 180, 255, 251, 174, 174, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 248, 174, 193, 255, 255, 255, 255, 255, 255, 255, 255, 193, 174, 248, 255, 255, 255, 255, 255, 248, 193, 255, 255, 193, 174, 232, 255, 255, 255, 255, 255, 255, 255, 251, 251, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 248, 174, 193, 255, 255, 255, 255, 255, 255, 255, 255, 200, 174, 244, 255, 255, 255, 255, 255, 232, 200, 255, 255, 244, 174, 180, 251, 255, 255, 255, 255, 255, 251, 227, 251, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 244, 174, 193, 255, 255, 255, 255, 255, 255, 255, 255, 248, 174, 193, 251, 255, 255, 255, 244, 180, 244, 255, 255, 255, 232, 174, 193, 248, 255, 255, 255, 251, 200, 244, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 232, 193, 174, 180, 227, 244, 255, 255, 255, 255, 255, 255, 255, 244, 180, 180, 200, 200, 193, 193, 244, 255, 255, 255, 255, 255, 232, 193, 174, 193, 200, 200, 200, 248, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 251, 251, 251, 251, 251, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 244, 244, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 244, 244, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 206, 117, 202, 241, 255, 255, 215, 241, 255, 255, 241, 117, 117, 241, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 93, 246, 241, 114, 255, 255, 204, 236, 255, 251, 93, 249, 249, 93, 251, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 93, 117, 58, 239, 255, 255, 204, 236, 255, 246, 107, 255, 255, 95, 249, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 93, 251, 234, 202, 255, 255, 204, 234, 255, 255, 117, 204, 204, 117, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 251, 251, 245, 255, 255, 246, 249, 255, 255, 255, 245, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(48, 79, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "18 18 18"); + IupSetAttribute(image, "2", "59 22 22"); + IupSetAttribute(image, "3", "35 35 35"); + IupSetAttribute(image, "4", "57 57 57"); + IupSetAttribute(image, "5", "55 75 122"); + IupSetAttribute(image, "6", "62 81 123"); + IupSetAttribute(image, "7", "87 20 29"); + IupSetAttribute(image, "8", "96 7 16"); + IupSetAttribute(image, "9", "118 5 15"); + IupSetAttribute(image, "10", "121 31 19"); + IupSetAttribute(image, "11", "120 33 20"); + IupSetAttribute(image, "12", "105 55 60"); + IupSetAttribute(image, "13", "121 43 43"); + IupSetAttribute(image, "14", "71 72 74"); + IupSetAttribute(image, "15", "71 75 84"); + IupSetAttribute(image, "16", "93 76 76"); + IupSetAttribute(image, "17", "89 88 76"); + IupSetAttribute(image, "18", "91 89 85"); + IupSetAttribute(image, "19", "64 78 114"); + IupSetAttribute(image, "20", "73 87 119"); + IupSetAttribute(image, "21", "84 88 97"); + IupSetAttribute(image, "22", "80 91 112"); + IupSetAttribute(image, "23", "94 101 108"); + IupSetAttribute(image, "24", "92 102 117"); + IupSetAttribute(image, "25", "108 76 85"); + IupSetAttribute(image, "26", "97 94 78"); + IupSetAttribute(image, "27", "101 88 85"); + IupSetAttribute(image, "28", "113 82 83"); + IupSetAttribute(image, "29", "103 99 77"); + IupSetAttribute(image, "30", "105 103 87"); + IupSetAttribute(image, "31", "115 109 73"); + IupSetAttribute(image, "32", "113 110 85"); + IupSetAttribute(image, "33", "123 114 73"); + IupSetAttribute(image, "34", "121 117 90"); + IupSetAttribute(image, "35", "103 103 102"); + IupSetAttribute(image, "36", "97 107 120"); + IupSetAttribute(image, "37", "109 113 104"); + IupSetAttribute(image, "38", "106 114 122"); + IupSetAttribute(image, "39", "112 96 96"); + IupSetAttribute(image, "40", "120 119 103"); + IupSetAttribute(image, "41", "120 121 120"); + IupSetAttribute(image, "42", "41 69 137"); + IupSetAttribute(image, "43", "38 69 148"); + IupSetAttribute(image, "44", "52 74 130"); + IupSetAttribute(image, "45", "55 79 149"); + IupSetAttribute(image, "46", "54 80 142"); + IupSetAttribute(image, "47", "59 84 153"); + IupSetAttribute(image, "48", "40 75 161"); + IupSetAttribute(image, "49", "47 84 179"); + IupSetAttribute(image, "50", "50 88 187"); + IupSetAttribute(image, "51", "61 96 184"); + IupSetAttribute(image, "52", "10 75 241"); + IupSetAttribute(image, "53", "29 87 234"); + IupSetAttribute(image, "54", "23 85 242"); + IupSetAttribute(image, "55", "46 88 193"); + IupSetAttribute(image, "56", "41 90 217"); + IupSetAttribute(image, "57", "52 90 208"); + IupSetAttribute(image, "58", "36 93 242"); + IupSetAttribute(image, "59", "57 98 200"); + IupSetAttribute(image, "60", "54 99 215"); + IupSetAttribute(image, "61", "42 97 237"); + IupSetAttribute(image, "62", "42 99 243"); + IupSetAttribute(image, "63", "55 105 233"); + IupSetAttribute(image, "64", "51 105 243"); + IupSetAttribute(image, "65", "60 112 244"); + IupSetAttribute(image, "66", "70 88 134"); + IupSetAttribute(image, "67", "68 91 154"); + IupSetAttribute(image, "68", "80 95 129"); + IupSetAttribute(image, "69", "78 96 139"); + IupSetAttribute(image, "70", "77 97 149"); + IupSetAttribute(image, "71", "89 103 137"); + IupSetAttribute(image, "72", "87 106 153"); + IupSetAttribute(image, "73", "95 114 152"); + IupSetAttribute(image, "74", "73 100 166"); + IupSetAttribute(image, "75", "72 104 182"); + IupSetAttribute(image, "76", "83 109 166"); + IupSetAttribute(image, "77", "82 111 179"); + IupSetAttribute(image, "78", "90 113 169"); + IupSetAttribute(image, "79", "87 114 179"); + IupSetAttribute(image, "80", "100 109 130"); + IupSetAttribute(image, "81", "97 111 149"); + IupSetAttribute(image, "82", "106 118 138"); + IupSetAttribute(image, "83", "104 119 152"); + IupSetAttribute(image, "84", "113 124 136"); + IupSetAttribute(image, "85", "112 124 153"); + IupSetAttribute(image, "86", "99 119 169"); + IupSetAttribute(image, "87", "101 124 181"); + IupSetAttribute(image, "88", "71 107 197"); + IupSetAttribute(image, "89", "74 108 221"); + IupSetAttribute(image, "90", "85 115 199"); + IupSetAttribute(image, "91", "87 120 215"); + IupSetAttribute(image, "92", "70 115 231"); + IupSetAttribute(image, "93", "74 118 244"); + IupSetAttribute(image, "94", "82 125 234"); + IupSetAttribute(image, "95", "88 124 245"); + IupSetAttribute(image, "96", "97 125 208"); + IupSetAttribute(image, "97", "125 130 120"); + IupSetAttribute(image, "98", "121 130 138"); + IupSetAttribute(image, "99", "122 133 151"); + IupSetAttribute(image, "100", "111 128 164"); + IupSetAttribute(image, "101", "107 130 184"); + IupSetAttribute(image, "102", "118 133 165"); + IupSetAttribute(image, "103", "119 138 182"); + IupSetAttribute(image, "104", "127 146 191"); + IupSetAttribute(image, "105", "94 128 213"); + IupSetAttribute(image, "106", "91 131 234"); + IupSetAttribute(image, "107", "89 131 245"); + IupSetAttribute(image, "108", "104 131 201"); + IupSetAttribute(image, "109", "106 137 215"); + IupSetAttribute(image, "110", "117 141 202"); + IupSetAttribute(image, "111", "123 144 193"); + IupSetAttribute(image, "112", "121 147 215"); + IupSetAttribute(image, "113", "103 139 232"); + IupSetAttribute(image, "114", "99 139 245"); + IupSetAttribute(image, "115", "108 147 246"); + IupSetAttribute(image, "116", "117 149 230"); + IupSetAttribute(image, "117", "117 152 246"); + IupSetAttribute(image, "118", "125 160 247"); + IupSetAttribute(image, "119", "134 4 5"); + IupSetAttribute(image, "120", "142 24 15"); + IupSetAttribute(image, "121", "143 26 16"); + IupSetAttribute(image, "122", "151 1 2"); + IupSetAttribute(image, "123", "136 47 28"); + IupSetAttribute(image, "124", "136 50 30"); + IupSetAttribute(image, "125", "131 46 47"); + IupSetAttribute(image, "126", "133 60 61"); + IupSetAttribute(image, "127", "165 0 2"); + IupSetAttribute(image, "128", "159 63 65"); + IupSetAttribute(image, "129", "134 71 41"); + IupSetAttribute(image, "130", "153 105 61"); + IupSetAttribute(image, "131", "159 64 65"); + IupSetAttribute(image, "132", "134 119 74"); + IupSetAttribute(image, "133", "131 125 89"); + IupSetAttribute(image, "134", "129 125 100"); + IupSetAttribute(image, "135", "131 122 122"); + IupSetAttribute(image, "136", "149 114 115"); + IupSetAttribute(image, "137", "160 111 64"); + IupSetAttribute(image, "138", "160 99 100"); + IupSetAttribute(image, "139", "169 122 123"); + IupSetAttribute(image, "140", "143 133 77"); + IupSetAttribute(image, "141", "135 128 87"); + IupSetAttribute(image, "142", "134 128 94"); + IupSetAttribute(image, "143", "137 130 84"); + IupSetAttribute(image, "144", "140 131 90"); + IupSetAttribute(image, "145", "150 138 86"); + IupSetAttribute(image, "146", "155 146 91"); + IupSetAttribute(image, "147", "137 133 102"); + IupSetAttribute(image, "148", "136 136 120"); + IupSetAttribute(image, "149", "147 141 103"); + IupSetAttribute(image, "150", "146 142 120"); + IupSetAttribute(image, "151", "153 147 104"); + IupSetAttribute(image, "152", "153 150 118"); + IupSetAttribute(image, "153", "161 142 88"); + IupSetAttribute(image, "154", "164 153 93"); + IupSetAttribute(image, "155", "180 158 92"); + IupSetAttribute(image, "156", "164 155 104"); + IupSetAttribute(image, "157", "163 154 117"); + IupSetAttribute(image, "158", "173 160 93"); + IupSetAttribute(image, "159", "176 164 95"); + IupSetAttribute(image, "160", "172 161 102"); + IupSetAttribute(image, "161", "171 164 118"); + IupSetAttribute(image, "162", "182 169 100"); + IupSetAttribute(image, "163", "179 170 120"); + IupSetAttribute(image, "164", "189 176 103"); + IupSetAttribute(image, "165", "187 180 125"); + IupSetAttribute(image, "166", "195 175 109"); + IupSetAttribute(image, "167", "196 174 112"); + IupSetAttribute(image, "168", "198 183 106"); + IupSetAttribute(image, "169", "200 185 119"); + IupSetAttribute(image, "170", "206 192 111"); + IupSetAttribute(image, "171", "206 192 114"); + IupSetAttribute(image, "172", "208 193 111"); + IupSetAttribute(image, "173", "208 193 112"); + IupSetAttribute(image, "174", "135 135 135"); + IupSetAttribute(image, "175", "130 138 152"); + IupSetAttribute(image, "176", "143 144 128"); + IupSetAttribute(image, "177", "140 146 153"); + IupSetAttribute(image, "178", "147 137 137"); + IupSetAttribute(image, "179", "152 152 134"); + IupSetAttribute(image, "180", "151 152 153"); + IupSetAttribute(image, "181", "134 144 160"); + IupSetAttribute(image, "182", "139 152 181"); + IupSetAttribute(image, "183", "148 152 161"); + IupSetAttribute(image, "184", "157 163 166"); + IupSetAttribute(image, "185", "150 160 181"); + IupSetAttribute(image, "186", "170 153 153"); + IupSetAttribute(image, "187", "169 166 135"); + IupSetAttribute(image, "188", "165 164 148"); + IupSetAttribute(image, "189", "177 172 134"); + IupSetAttribute(image, "190", "178 173 151"); + IupSetAttribute(image, "191", "184 178 135"); + IupSetAttribute(image, "192", "183 179 150"); + IupSetAttribute(image, "193", "167 168 168"); + IupSetAttribute(image, "194", "162 170 179"); + IupSetAttribute(image, "195", "174 176 166"); + IupSetAttribute(image, "196", "181 179 162"); + IupSetAttribute(image, "197", "185 182 161"); + IupSetAttribute(image, "198", "189 184 162"); + IupSetAttribute(image, "199", "189 188 171"); + IupSetAttribute(image, "200", "184 184 184"); + IupSetAttribute(image, "201", "129 150 204"); + IupSetAttribute(image, "202", "129 156 247"); + IupSetAttribute(image, "203", "138 164 232"); + IupSetAttribute(image, "204", "136 166 247"); + IupSetAttribute(image, "205", "148 172 234"); + IupSetAttribute(image, "206", "150 173 248"); + IupSetAttribute(image, "207", "152 179 249"); + IupSetAttribute(image, "208", "174 180 196"); + IupSetAttribute(image, "209", "160 179 228"); + IupSetAttribute(image, "210", "164 188 249"); + IupSetAttribute(image, "211", "190 194 190"); + IupSetAttribute(image, "212", "188 193 201"); + IupSetAttribute(image, "213", "172 194 251"); + IupSetAttribute(image, "214", "180 192 224"); + IupSetAttribute(image, "215", "180 199 251"); + IupSetAttribute(image, "216", "191 208 252"); + IupSetAttribute(image, "217", "205 185 140"); + IupSetAttribute(image, "218", "210 186 136"); + IupSetAttribute(image, "219", "194 191 175"); + IupSetAttribute(image, "220", "192 190 178"); + IupSetAttribute(image, "221", "197 194 180"); + IupSetAttribute(image, "222", "197 195 188"); + IupSetAttribute(image, "223", "200 198 189"); + IupSetAttribute(image, "224", "202 200 191"); + IupSetAttribute(image, "225", "222 202 171"); + IupSetAttribute(image, "226", "224 207 176"); + IupSetAttribute(image, "227", "200 200 199"); + IupSetAttribute(image, "228", "200 204 212"); + IupSetAttribute(image, "229", "204 209 218"); + IupSetAttribute(image, "230", "210 199 199"); + IupSetAttribute(image, "231", "209 208 204"); + IupSetAttribute(image, "232", "216 215 215"); + IupSetAttribute(image, "233", "200 200 233"); + IupSetAttribute(image, "234", "192 205 251"); + IupSetAttribute(image, "235", "205 211 226"); + IupSetAttribute(image, "236", "196 209 251"); + IupSetAttribute(image, "237", "209 206 232"); + IupSetAttribute(image, "238", "212 213 232"); + IupSetAttribute(image, "239", "213 221 246"); + IupSetAttribute(image, "240", "221 226 239"); + IupSetAttribute(image, "241", "220 227 250"); + IupSetAttribute(image, "242", "224 223 223"); + IupSetAttribute(image, "243", "225 224 222"); + IupSetAttribute(image, "244", "231 231 231"); + IupSetAttribute(image, "245", "229 234 249"); + IupSetAttribute(image, "246", "237 241 253"); + IupSetAttribute(image, "247", "247 235 235"); + IupSetAttribute(image, "248", "243 243 243"); + IupSetAttribute(image, "249", "242 245 253"); + IupSetAttribute(image, "250", "247 248 254"); + IupSetAttribute(image, "251", "252 252 252"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_LogoLua8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 181, 155, 187, 255, 161, 186, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 130, 71, 160, 255, 89, 87, 177, 255, 93, 72, 163, 255, 83, 128, 193, 255, 255, 255, 255, 255, 255, 191, 103, 33, 17, 23, 50, 148, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 139, 138, 255, 139, 186, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 180, 120, 188, 192, 154, 255, 255, 255, 182, 33, 1, 1, 1, 1, 1, 6, 110, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 126, 84, 181, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 187, 80, 77, 255, 255, 45, 1, 1, 1, 1, 1, 1, 1, 6, 148, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 186, 86, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 147, 1, 1, 1, 1, 1, 1, 1, 1, 1, 50, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 71, 157, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 104, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 179, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 147, 105, 59, 43, 38, 39, 43, 61, 106, 149, 255, 255, 255, 255, 255, 255, 255, 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 255, + 255, 255, 255, 255, 255, 255, 255, 94, 84, 255, 255, 255, 255, 255, 255, 255, 168, 66, 22, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 24, 95, 169, 255, 255, 255, 255, 109, 1, 1, 1, 1, 1, 1, 1, 1, 1, 33, 255, + 255, 255, 255, 255, 255, 255, 255, 122, 255, 255, 255, 255, 255, 255, 173, 55, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 59, 178, 255, 255, 184, 16, 1, 1, 1, 1, 1, 1, 1, 1, 103, 255, + 255, 255, 255, 255, 255, 175, 255, 255, 255, 255, 255, 255, 255, 112, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 114, 255, 255, 108, 1, 1, 1, 1, 1, 1, 1, 33, 191, 255, + 255, 255, 255, 255, 181, 67, 192, 255, 255, 255, 255, 195, 64, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 97, 255, 255, 108, 16, 1, 1, 1, 1, 45, 182, 255, 255, + 255, 255, 255, 255, 132, 158, 255, 255, 255, 255, 195, 53, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 29, 62, 97, 50, 17, 1, 1, 58, 255, 255, 184, 109, 99, 104, 147, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 64, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 110, 196, 196, 196, 196, 185, 58, 1, 1, 97, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 77, 255, 255, 255, 255, 255, 110, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 141, 196, 196, 196, 196, 196, 196, 196, 58, 1, 2, 114, 255, 255, 255, 255, 255, 131, 255, 255, 255, + 255, 255, 137, 85, 255, 255, 255, 255, 172, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 49, 196, 196, 196, 196, 196, 196, 196, 196, 185, 17, 1, 19, 178, 255, 255, 255, 255, 80, 153, 255, 255, + 255, 255, 192, 189, 255, 255, 255, 255, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 115, 196, 196, 196, 196, 196, 196, 196, 196, 196, 50, 1, 1, 59, 255, 255, 255, 255, 179, 136, 255, 255, + 255, 192, 188, 255, 255, 255, 255, 159, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 150, 196, 196, 196, 196, 196, 196, 196, 196, 196, 97, 1, 1, 6, 169, 255, 255, 255, 255, 255, 255, 255, + 255, 121, 125, 255, 255, 255, 255, 63, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 142, 196, 196, 196, 196, 196, 196, 196, 196, 196, 62, 1, 1, 1, 95, 255, 255, 255, 255, 140, 133, 255, + 255, 79, 188, 255, 255, 255, 195, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 98, 196, 196, 196, 196, 196, 196, 196, 196, 196, 29, 1, 1, 1, 24, 255, 255, 255, 255, 181, 72, 255, + 255, 255, 255, 255, 255, 255, 145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 173, 196, 196, 196, 196, 196, 196, 196, 110, 1, 1, 1, 1, 1, 149, 255, 255, 255, 255, 155, 255, + 255, 163, 255, 255, 255, 255, 102, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 34, 173, 196, 196, 196, 196, 196, 141, 11, 1, 1, 1, 1, 1, 106, 255, 255, 255, 255, 255, 255, + 162, 79, 255, 255, 255, 255, 51, 1, 1, 1, 1, 10, 141, 42, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 98, 142, 150, 115, 49, 3, 1, 1, 1, 1, 1, 1, 61, 255, 255, 255, 255, 90, 181, + 156, 121, 255, 255, 255, 255, 40, 1, 1, 1, 1, 15, 196, 52, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 43, 255, 255, 255, 255, 87, 155, + 255, 255, 255, 255, 255, 255, 35, 1, 1, 1, 1, 15, 196, 52, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 39, 255, 255, 255, 255, 164, 181, + 186, 180, 255, 255, 255, 255, 34, 1, 1, 1, 1, 15, 196, 52, 1, 1, 1, 1, 1, 1, 30, 53, 1, 1, 1, 8, 63, 21, 1, 1, 24, 99, 111, 108, 57, 6, 1, 1, 1, 1, 1, 38, 255, 255, 255, 255, 255, 255, + 139, 91, 255, 255, 255, 255, 40, 1, 1, 1, 1, 15, 196, 52, 1, 1, 1, 1, 1, 1, 58, 165, 1, 1, 1, 18, 196, 34, 1, 26, 184, 144, 100, 106, 184, 107, 1, 1, 1, 1, 1, 43, 255, 255, 255, 255, 118, 161, + 175, 92, 255, 255, 255, 255, 51, 1, 1, 1, 1, 15, 196, 52, 1, 1, 1, 1, 1, 1, 58, 165, 1, 1, 1, 18, 196, 34, 1, 65, 167, 5, 1, 1, 61, 173, 1, 1, 1, 1, 1, 59, 255, 255, 255, 255, 75, 181, + 255, 255, 255, 255, 255, 255, 102, 1, 1, 1, 1, 15, 196, 52, 1, 1, 1, 1, 1, 1, 58, 165, 1, 1, 1, 18, 196, 34, 1, 1, 1, 1, 1, 5, 101, 178, 1, 1, 1, 1, 1, 105, 255, 255, 255, 255, 160, 255, + 255, 160, 255, 255, 255, 255, 144, 1, 1, 1, 1, 15, 196, 52, 1, 1, 1, 1, 1, 1, 58, 165, 1, 1, 1, 18, 196, 34, 1, 3, 52, 113, 150, 190, 171, 178, 1, 1, 1, 1, 1, 147, 255, 255, 255, 255, 255, 255, + 255, 69, 192, 255, 255, 255, 194, 19, 1, 1, 1, 15, 196, 52, 1, 1, 1, 1, 1, 1, 58, 165, 1, 1, 1, 20, 196, 34, 1, 101, 182, 60, 30, 11, 48, 178, 1, 1, 1, 1, 22, 255, 255, 255, 255, 186, 85, 255, + 255, 127, 155, 255, 255, 255, 255, 61, 1, 1, 1, 15, 196, 52, 1, 1, 1, 1, 1, 1, 58, 168, 1, 1, 1, 40, 196, 34, 1, 166, 96, 1, 1, 1, 56, 178, 1, 1, 1, 1, 66, 255, 255, 255, 255, 122, 124, 255, + 255, 255, 255, 255, 255, 255, 255, 151, 3, 1, 1, 15, 196, 108, 54, 54, 54, 54, 54, 14, 46, 196, 41, 1, 22, 145, 194, 34, 1, 143, 116, 8, 2, 37, 170, 184, 3, 1, 1, 4, 168, 255, 255, 255, 255, 181, 192, 255, + 255, 255, 135, 188, 255, 255, 255, 255, 49, 1, 1, 12, 165, 165, 165, 165, 165, 165, 165, 23, 7, 117, 196, 183, 183, 44, 149, 30, 1, 36, 174, 190, 184, 146, 49, 194, 166, 1, 1, 55, 255, 255, 255, 255, 192, 195, 255, 255, + 255, 255, 134, 88, 255, 255, 255, 255, 169, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 32, 9, 1, 1, 1, 1, 1, 8, 31, 27, 2, 1, 23, 28, 1, 17, 173, 255, 255, 255, 255, 84, 152, 255, 255, + 255, 255, 255, 127, 255, 255, 255, 255, 255, 107, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 112, 255, 255, 255, 255, 255, 76, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 59, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 64, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 84, 160, 255, 255, 255, 255, 193, 47, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 53, 195, 255, 255, 255, 255, 157, 139, 255, 255, 255, 255, + 255, 255, 255, 255, 181, 73, 255, 255, 255, 255, 255, 193, 59, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 64, 195, 255, 255, 255, 255, 192, 67, 186, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 107, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 110, 255, 255, 255, 255, 255, 255, 193, 162, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 175, 87, 255, 255, 255, 255, 255, 255, 169, 49, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 51, 172, 255, 255, 255, 255, 255, 255, 128, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 91, 126, 255, 255, 255, 255, 255, 255, 255, 151, 61, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 21, 63, 159, 255, 255, 255, 255, 255, 255, 255, 82, 94, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 195, 192, 255, 255, 255, 255, 255, 255, 255, 194, 144, 102, 51, 40, 34, 35, 40, 51, 102, 145, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 176, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 161, 68, 160, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 158, 74, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 181, 135, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 83, 181, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 78, 88, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 186, 85, 128, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 136, 193, 181, 128, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 188, 155, 255, 133, 137, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 188, 119, 81, 255, 160, 80, 123, 255, 176, 91, 93, 255, 155, 70, 129, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 162, 157, 255, 181, 140, 175, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(48, 48, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 0 127"); + IupSetAttribute(image, "2", "1 1 128"); + IupSetAttribute(image, "3", "4 4 129"); + IupSetAttribute(image, "4", "5 5 130"); + IupSetAttribute(image, "5", "6 6 130"); + IupSetAttribute(image, "6", "8 8 131"); + IupSetAttribute(image, "7", "9 9 132"); + IupSetAttribute(image, "8", "10 10 132"); + IupSetAttribute(image, "9", "13 13 134"); + IupSetAttribute(image, "10", "15 15 134"); + IupSetAttribute(image, "11", "15 15 135"); + IupSetAttribute(image, "12", "17 17 135"); + IupSetAttribute(image, "13", "17 17 136"); + IupSetAttribute(image, "14", "18 18 136"); + IupSetAttribute(image, "15", "19 19 137"); + IupSetAttribute(image, "16", "20 20 137"); + IupSetAttribute(image, "17", "22 22 138"); + IupSetAttribute(image, "18", "23 23 139"); + IupSetAttribute(image, "19", "26 26 140"); + IupSetAttribute(image, "20", "27 27 141"); + IupSetAttribute(image, "21", "28 28 141"); + IupSetAttribute(image, "22", "34 34 144"); + IupSetAttribute(image, "23", "36 36 145"); + IupSetAttribute(image, "24", "38 38 146"); + IupSetAttribute(image, "25", "40 40 147"); + IupSetAttribute(image, "26", "42 42 148"); + IupSetAttribute(image, "27", "43 43 149"); + IupSetAttribute(image, "28", "46 46 150"); + IupSetAttribute(image, "29", "49 49 152"); + IupSetAttribute(image, "30", "53 53 154"); + IupSetAttribute(image, "31", "54 54 154"); + IupSetAttribute(image, "32", "56 56 155"); + IupSetAttribute(image, "33", "59 59 156"); + IupSetAttribute(image, "34", "60 60 157"); + IupSetAttribute(image, "35", "62 62 157"); + IupSetAttribute(image, "36", "65 65 160"); + IupSetAttribute(image, "37", "71 71 163"); + IupSetAttribute(image, "38", "73 73 163"); + IupSetAttribute(image, "39", "73 73 164"); + IupSetAttribute(image, "40", "76 76 165"); + IupSetAttribute(image, "41", "79 79 167"); + IupSetAttribute(image, "42", "80 80 167"); + IupSetAttribute(image, "43", "86 86 170"); + IupSetAttribute(image, "44", "87 87 171"); + IupSetAttribute(image, "45", "88 88 171"); + IupSetAttribute(image, "46", "93 93 174"); + IupSetAttribute(image, "47", "96 96 175"); + IupSetAttribute(image, "48", "98 98 176"); + IupSetAttribute(image, "49", "99 99 177"); + IupSetAttribute(image, "50", "100 100 177"); + IupSetAttribute(image, "51", "104 104 179"); + IupSetAttribute(image, "52", "105 105 180"); + IupSetAttribute(image, "53", "106 106 180"); + IupSetAttribute(image, "54", "109 109 182"); + IupSetAttribute(image, "55", "110 110 181"); + IupSetAttribute(image, "56", "111 111 183"); + IupSetAttribute(image, "57", "112 112 183"); + IupSetAttribute(image, "58", "113 113 184"); + IupSetAttribute(image, "59", "114 114 184"); + IupSetAttribute(image, "60", "115 115 185"); + IupSetAttribute(image, "61", "116 116 185"); + IupSetAttribute(image, "62", "118 118 186"); + IupSetAttribute(image, "63", "120 120 187"); + IupSetAttribute(image, "64", "124 124 189"); + IupSetAttribute(image, "65", "125 125 190"); + IupSetAttribute(image, "66", "127 127 190"); + IupSetAttribute(image, "67", "139 139 139"); + IupSetAttribute(image, "68", "140 140 140"); + IupSetAttribute(image, "69", "153 153 153"); + IupSetAttribute(image, "70", "154 154 154"); + IupSetAttribute(image, "71", "157 157 157"); + IupSetAttribute(image, "72", "159 159 159"); + IupSetAttribute(image, "73", "161 161 161"); + IupSetAttribute(image, "74", "162 162 162"); + IupSetAttribute(image, "75", "163 163 163"); + IupSetAttribute(image, "76", "164 164 164"); + IupSetAttribute(image, "77", "165 165 165"); + IupSetAttribute(image, "78", "166 166 166"); + IupSetAttribute(image, "79", "169 169 169"); + IupSetAttribute(image, "80", "171 171 171"); + IupSetAttribute(image, "81", "172 172 172"); + IupSetAttribute(image, "82", "173 173 173"); + IupSetAttribute(image, "83", "174 174 174"); + IupSetAttribute(image, "84", "175 175 175"); + IupSetAttribute(image, "85", "177 177 177"); + IupSetAttribute(image, "86", "179 179 179"); + IupSetAttribute(image, "87", "180 180 180"); + IupSetAttribute(image, "88", "182 182 182"); + IupSetAttribute(image, "89", "183 183 183"); + IupSetAttribute(image, "90", "184 184 184"); + IupSetAttribute(image, "91", "186 186 186"); + IupSetAttribute(image, "92", "188 188 188"); + IupSetAttribute(image, "93", "190 190 190"); + IupSetAttribute(image, "94", "191 191 191"); + IupSetAttribute(image, "95", "130 130 192"); + IupSetAttribute(image, "96", "132 132 193"); + IupSetAttribute(image, "97", "134 134 194"); + IupSetAttribute(image, "98", "135 135 195"); + IupSetAttribute(image, "99", "138 138 196"); + IupSetAttribute(image, "100", "140 140 197"); + IupSetAttribute(image, "101", "145 145 200"); + IupSetAttribute(image, "102", "148 148 201"); + IupSetAttribute(image, "103", "149 149 202"); + IupSetAttribute(image, "104", "151 151 203"); + IupSetAttribute(image, "105", "157 157 205"); + IupSetAttribute(image, "106", "159 159 207"); + IupSetAttribute(image, "107", "168 168 211"); + IupSetAttribute(image, "108", "169 169 212"); + IupSetAttribute(image, "109", "175 175 214"); + IupSetAttribute(image, "110", "175 175 215"); + IupSetAttribute(image, "111", "176 176 216"); + IupSetAttribute(image, "112", "178 178 216"); + IupSetAttribute(image, "113", "181 181 218"); + IupSetAttribute(image, "114", "184 184 219"); + IupSetAttribute(image, "115", "186 186 220"); + IupSetAttribute(image, "116", "188 188 221"); + IupSetAttribute(image, "117", "190 190 223"); + IupSetAttribute(image, "118", "195 195 195"); + IupSetAttribute(image, "119", "196 196 196"); + IupSetAttribute(image, "120", "197 197 197"); + IupSetAttribute(image, "121", "198 198 198"); + IupSetAttribute(image, "122", "200 200 200"); + IupSetAttribute(image, "123", "201 201 201"); + IupSetAttribute(image, "124", "203 203 203"); + IupSetAttribute(image, "125", "204 204 204"); + IupSetAttribute(image, "126", "205 205 205"); + IupSetAttribute(image, "127", "206 206 206"); + IupSetAttribute(image, "128", "207 207 207"); + IupSetAttribute(image, "129", "208 208 208"); + IupSetAttribute(image, "130", "210 210 210"); + IupSetAttribute(image, "131", "211 211 211"); + IupSetAttribute(image, "132", "213 213 213"); + IupSetAttribute(image, "133", "214 214 214"); + IupSetAttribute(image, "134", "215 215 215"); + IupSetAttribute(image, "135", "217 217 217"); + IupSetAttribute(image, "136", "218 218 218"); + IupSetAttribute(image, "137", "219 219 219"); + IupSetAttribute(image, "138", "221 221 221"); + IupSetAttribute(image, "139", "222 222 222"); + IupSetAttribute(image, "140", "223 223 223"); + IupSetAttribute(image, "141", "195 195 225"); + IupSetAttribute(image, "142", "203 203 229"); + IupSetAttribute(image, "143", "205 205 230"); + IupSetAttribute(image, "144", "206 206 230"); + IupSetAttribute(image, "145", "208 208 231"); + IupSetAttribute(image, "146", "212 212 233"); + IupSetAttribute(image, "147", "216 216 235"); + IupSetAttribute(image, "148", "217 217 236"); + IupSetAttribute(image, "149", "219 219 237"); + IupSetAttribute(image, "150", "220 220 237"); + IupSetAttribute(image, "151", "222 222 238"); + IupSetAttribute(image, "152", "224 224 224"); + IupSetAttribute(image, "153", "225 225 225"); + IupSetAttribute(image, "154", "227 227 227"); + IupSetAttribute(image, "155", "228 228 228"); + IupSetAttribute(image, "156", "229 229 229"); + IupSetAttribute(image, "157", "230 230 230"); + IupSetAttribute(image, "158", "231 231 231"); + IupSetAttribute(image, "159", "224 224 239"); + IupSetAttribute(image, "160", "234 234 234"); + IupSetAttribute(image, "161", "236 236 236"); + IupSetAttribute(image, "162", "237 237 237"); + IupSetAttribute(image, "163", "238 238 238"); + IupSetAttribute(image, "164", "239 239 239"); + IupSetAttribute(image, "165", "225 225 240"); + IupSetAttribute(image, "166", "227 227 241"); + IupSetAttribute(image, "167", "228 228 241"); + IupSetAttribute(image, "168", "229 229 242"); + IupSetAttribute(image, "169", "232 232 243"); + IupSetAttribute(image, "170", "233 233 244"); + IupSetAttribute(image, "171", "234 234 244"); + IupSetAttribute(image, "172", "235 235 245"); + IupSetAttribute(image, "173", "237 237 246"); + IupSetAttribute(image, "174", "238 238 246"); + IupSetAttribute(image, "175", "240 240 240"); + IupSetAttribute(image, "176", "241 241 241"); + IupSetAttribute(image, "177", "243 243 243"); + IupSetAttribute(image, "178", "240 240 247"); + IupSetAttribute(image, "179", "244 244 244"); + IupSetAttribute(image, "180", "245 245 245"); + IupSetAttribute(image, "181", "246 246 246"); + IupSetAttribute(image, "182", "240 240 248"); + IupSetAttribute(image, "183", "242 242 248"); + IupSetAttribute(image, "184", "244 244 250"); + IupSetAttribute(image, "185", "246 246 250"); + IupSetAttribute(image, "186", "248 248 248"); + IupSetAttribute(image, "187", "249 249 249"); + IupSetAttribute(image, "188", "250 250 250"); + IupSetAttribute(image, "189", "251 251 251"); + IupSetAttribute(image, "190", "249 249 252"); + IupSetAttribute(image, "191", "250 250 252"); + IupSetAttribute(image, "192", "252 252 252"); + IupSetAttribute(image, "193", "252 252 253"); + IupSetAttribute(image, "194", "253 253 254"); + IupSetAttribute(image, "195", "254 254 254"); + IupSetAttribute(image, "196", "255 255 255"); + IupSetAttribute(image, "197", "0 0 0"); + IupSetAttribute(image, "198", "0 0 0"); + IupSetAttribute(image, "199", "0 0 0"); + IupSetAttribute(image, "200", "0 0 0"); + IupSetAttribute(image, "201", "0 0 0"); + IupSetAttribute(image, "202", "0 0 0"); + IupSetAttribute(image, "203", "0 0 0"); + IupSetAttribute(image, "204", "0 0 0"); + IupSetAttribute(image, "205", "0 0 0"); + IupSetAttribute(image, "206", "0 0 0"); + IupSetAttribute(image, "207", "0 0 0"); + IupSetAttribute(image, "208", "0 0 0"); + IupSetAttribute(image, "209", "0 0 0"); + IupSetAttribute(image, "210", "0 0 0"); + IupSetAttribute(image, "211", "0 0 0"); + IupSetAttribute(image, "212", "0 0 0"); + IupSetAttribute(image, "213", "0 0 0"); + IupSetAttribute(image, "214", "0 0 0"); + IupSetAttribute(image, "215", "0 0 0"); + IupSetAttribute(image, "216", "0 0 0"); + IupSetAttribute(image, "217", "0 0 0"); + IupSetAttribute(image, "218", "0 0 0"); + IupSetAttribute(image, "219", "0 0 0"); + IupSetAttribute(image, "220", "0 0 0"); + IupSetAttribute(image, "221", "0 0 0"); + IupSetAttribute(image, "222", "0 0 0"); + IupSetAttribute(image, "223", "0 0 0"); + IupSetAttribute(image, "224", "0 0 0"); + IupSetAttribute(image, "225", "0 0 0"); + IupSetAttribute(image, "226", "0 0 0"); + IupSetAttribute(image, "227", "0 0 0"); + IupSetAttribute(image, "228", "0 0 0"); + IupSetAttribute(image, "229", "0 0 0"); + IupSetAttribute(image, "230", "0 0 0"); + IupSetAttribute(image, "231", "0 0 0"); + IupSetAttribute(image, "232", "0 0 0"); + IupSetAttribute(image, "233", "0 0 0"); + IupSetAttribute(image, "234", "0 0 0"); + IupSetAttribute(image, "235", "0 0 0"); + IupSetAttribute(image, "236", "0 0 0"); + IupSetAttribute(image, "237", "0 0 0"); + IupSetAttribute(image, "238", "0 0 0"); + IupSetAttribute(image, "239", "0 0 0"); + IupSetAttribute(image, "240", "0 0 0"); + IupSetAttribute(image, "241", "0 0 0"); + IupSetAttribute(image, "242", "0 0 0"); + IupSetAttribute(image, "243", "0 0 0"); + IupSetAttribute(image, "244", "0 0 0"); + IupSetAttribute(image, "245", "0 0 0"); + IupSetAttribute(image, "246", "0 0 0"); + IupSetAttribute(image, "247", "0 0 0"); + IupSetAttribute(image, "248", "0 0 0"); + IupSetAttribute(image, "249", "0 0 0"); + IupSetAttribute(image, "250", "0 0 0"); + IupSetAttribute(image, "251", "0 0 0"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_LogoPetrobras8(void) +{ + unsigned char imgdata[] = { + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 244, 244, 244, 244, 244, 244, 244, 244, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 252, 255, 255, 249, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 252, 255, 255, 249, 244, 244, 244, 244, 244, 244, 244, 244, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 196, 151, 141, 145, 179, 230, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 244, 244, 244, 244, 244, 244, 244, 244, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 244, 244, 244, 244, 244, 244, 244, 244, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 244, 244, 244, 244, 244, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 209, 167, 143, 141, 155, 203, 248, 255, 255, 255, + 253, 253, 5, 5, 5, 5, 5, 5, 5, 113, 253, 253, 253, 253, 253, 253, 253, 253, 253, 245, 193, 90, 5, 5, 5, 5, 5, 5, 163, 253, 253, 253, 253, 253, 253, 253, 253, 253, 249, 192, 62, 5, 5, 5, 5, 5, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 137, 6, 6, 6, 6, 6, 6, 6, 6, 6, 33, 86, 169, 250, 255, 255, 255, 255, 255, 81, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 15, 231, 255, 255, 133, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 236, 255, 255, 133, 6, 6, 6, 6, 6, 6, 6, 6, 5, 21, 53, 108, 197, 255, 255, 255, 255, 255, 255, 255, 255, 255, 197, 93, 12, 1, 1, 1, 1, 1, 4, 94, 223, 255, 255, 255, 255, 255, 255, 255, 80, 6, 6, 6, 6, 6, 6, 6, 6, 6, 33, 80, 145, 243, 255, 255, 255, 255, 255, 164, 6, 6, 6, 6, 6, 6, 6, 6, 4, 15, 48, 98, 181, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 222, 20, 6, 6, 6, 6, 24, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 221, 113, 24, 1, 1, 1, 1, 1, 1, 39, 180, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 180, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 252, 117, 1, 1, 1, 1, 5, 226, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 243, 58, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 72, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 88, 247, 255, 255, 255, 237, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 66, 255, 255, 255, 69, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 255, 255, 255, 68, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 144, 255, 255, 255, 255, 255, 255, 231, 95, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 219, 255, 255, 255, 255, 255, 234, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 66, 247, 255, 255, 255, 255, 96, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 115, 255, 255, 255, 255, 255, 255, 255, 255, 251, 85, 1, 1, 1, 1, 1, 11, 236, 255, 255, 255, 255, 255, 255, 255, 255, 153, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 187, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 9, 239, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 241, 27, 1, 1, 1, 57, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 188, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 234, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 154, 255, 255, 255, 180, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 131, 255, 255, 233, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 138, 255, 255, 235, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 30, 247, 255, 255, 255, 255, 214, 36, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 70, 252, 255, 255, 255, 255, 180, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 196, 255, 255, 255, 247, 24, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 231, 255, 255, 255, 255, 255, 255, 255, 165, 1, 1, 1, 1, 1, 1, 2, 223, 255, 255, 255, 255, 255, 255, 255, 152, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 252, + 253, 253, 1, 1, 1, 1, 1, 1, 80, 253, 253, 253, 253, 197, 92, 92, 92, 93, 182, 253, 253, 253, 253, 73, 1, 1, 1, 124, 253, 253, 253, 253, 150, 92, 92, 92, 107, 214, 253, 253, 253, 243, 9, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 176, 1, 1, 1, 1, 1, 15, 16, 12, 1, 1, 1, 1, 1, 1, 102, 255, 255, 255, 112, 1, 1, 1, 1, 2, 16, 16, 16, 16, 16, 16, 16, 16, 205, 255, 255, 175, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 214, 255, 255, 175, 1, 1, 1, 1, 1, 13, 16, 16, 6, 1, 1, 1, 1, 1, 18, 243, 255, 255, 255, 220, 28, 1, 1, 1, 1, 2, 45, 86, 39, 1, 1, 1, 1, 1, 1, 211, 255, 255, 255, 255, 112, 1, 1, 1, 1, 2, 16, 16, 14, 2, 1, 1, 1, 1, 1, 187, 255, 255, 255, 200, 1, 1, 1, 1, 1, 12, 16, 16, 9, 1, 1, 1, 1, 1, 1, 223, 255, 255, 255, 255, 255, 255, 230, 28, 1, 1, 1, 1, 1, 1, 1, 212, 255, 255, 255, 255, 255, 255, 223, 13, 1, 1, 1, 1, 86, 136, 120, 24, 1, 1, 1, 1, 26, 249, + 253, 253, 1, 1, 1, 1, 1, 1, 142, 253, 253, 253, 253, 113, 1, 1, 1, 1, 38, 253, 253, 253, 253, 72, 1, 1, 1, 200, 253, 253, 253, 252, 47, 1, 1, 1, 1, 83, 253, 253, 253, 247, 11, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 106, 1, 1, 1, 1, 24, 247, 255, 242, 180, 9, 1, 1, 1, 1, 104, 255, 255, 251, 39, 1, 1, 1, 1, 89, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 195, 138, 138, 138, 138, 45, 1, 1, 1, 1, 27, 137, 138, 138, 138, 145, 249, 255, 255, 105, 1, 1, 1, 1, 30, 247, 255, 255, 226, 54, 1, 1, 1, 1, 48, 252, 255, 255, 244, 58, 1, 1, 1, 1, 12, 170, 251, 255, 247, 93, 1, 1, 1, 1, 1, 147, 255, 255, 255, 250, 39, 1, 1, 1, 1, 89, 255, 255, 248, 141, 1, 1, 1, 1, 9, 233, 255, 255, 255, 127, 1, 1, 1, 1, 9, 231, 255, 255, 234, 88, 1, 1, 1, 1, 19, 243, 255, 255, 255, 255, 255, 252, 100, 1, 1, 1, 1, 1, 1, 1, 1, 195, 255, 255, 255, 255, 255, 255, 123, 1, 1, 1, 1, 46, 252, 255, 255, 152, 24, 24, 24, 24, 44, 250, + 253, 253, 1, 1, 1, 1, 1, 1, 219, 253, 253, 253, 251, 41, 1, 1, 1, 1, 108, 253, 253, 253, 240, 23, 1, 1, 24, 249, 253, 253, 253, 222, 5, 1, 1, 1, 1, 110, 253, 253, 253, 214, 2, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 35, 1, 1, 1, 1, 93, 255, 255, 255, 252, 35, 1, 1, 1, 1, 140, 255, 255, 216, 2, 1, 1, 1, 1, 150, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 28, 1, 1, 1, 1, 102, 255, 255, 255, 255, 255, 255, 255, 252, 32, 1, 1, 1, 1, 100, 255, 255, 255, 255, 101, 1, 1, 1, 1, 127, 255, 255, 255, 135, 1, 1, 1, 1, 2, 177, 255, 255, 255, 255, 192, 1, 1, 1, 1, 1, 134, 255, 255, 255, 214, 2, 1, 1, 1, 1, 150, 255, 255, 255, 135, 1, 1, 1, 1, 115, 255, 255, 255, 255, 59, 1, 1, 1, 1, 66, 255, 255, 255, 255, 133, 1, 1, 1, 1, 100, 255, 255, 255, 255, 255, 255, 183, 2, 1, 1, 1, 59, 1, 1, 1, 1, 170, 255, 255, 255, 255, 255, 252, 56, 1, 1, 1, 1, 5, 127, 223, 252, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 40, 252, 253, 253, 253, 245, 165, 164, 164, 164, 186, 248, 253, 253, 253, 134, 1, 1, 1, 98, 253, 253, 253, 253, 153, 1, 1, 1, 13, 89, 233, 253, 253, 253, 115, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 211, 2, 1, 1, 1, 1, 153, 255, 255, 255, 187, 2, 1, 1, 1, 3, 219, 255, 255, 143, 1, 1, 1, 1, 1, 84, 100, 100, 100, 100, 100, 103, 243, 255, 255, 255, 255, 255, 255, 255, 255, 204, 1, 1, 1, 1, 1, 170, 255, 255, 255, 255, 255, 255, 255, 211, 2, 1, 1, 1, 1, 172, 255, 255, 255, 200, 16, 1, 1, 1, 27, 230, 255, 255, 240, 19, 1, 1, 1, 1, 93, 252, 255, 255, 255, 255, 216, 1, 1, 1, 1, 1, 139, 255, 255, 255, 142, 1, 1, 1, 1, 1, 162, 195, 187, 129, 10, 1, 1, 1, 71, 240, 255, 255, 255, 227, 5, 1, 1, 1, 1, 132, 255, 255, 255, 220, 35, 1, 1, 1, 9, 211, 255, 255, 255, 255, 255, 237, 36, 1, 1, 1, 58, 145, 1, 1, 1, 1, 152, 255, 255, 255, 255, 255, 251, 37, 1, 1, 1, 1, 1, 1, 5, 48, 118, 197, 249, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 114, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 252, 160, 6, 1, 1, 1, 166, 253, 253, 253, 253, 243, 232, 232, 232, 238, 253, 253, 253, 253, 184, 6, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 135, 1, 1, 1, 1, 1, 140, 174, 173, 126, 18, 1, 1, 1, 1, 91, 255, 255, 255, 82, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 55, 255, 255, 255, 255, 255, 255, 255, 255, 255, 128, 1, 1, 1, 1, 6, 233, 255, 255, 255, 255, 255, 255, 255, 135, 1, 1, 1, 1, 1, 63, 79, 79, 50, 3, 1, 1, 1, 13, 187, 255, 255, 255, 160, 1, 1, 1, 1, 1, 198, 255, 255, 255, 255, 255, 184, 1, 1, 1, 1, 1, 181, 255, 255, 255, 80, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 111, 243, 255, 255, 255, 255, 165, 1, 1, 1, 1, 1, 54, 79, 79, 61, 9, 1, 1, 1, 4, 152, 255, 255, 255, 255, 255, 252, 116, 1, 1, 1, 2, 191, 156, 1, 1, 1, 1, 133, 255, 255, 255, 255, 255, 252, 85, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 53, 196, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 184, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 235, 55, 1, 1, 1, 3, 233, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 251, 153, 13, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 72, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 22, 221, 255, 255, 237, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 123, 255, 255, 255, 255, 255, 255, 255, 255, 252, 66, 1, 1, 1, 1, 66, 252, 255, 255, 255, 255, 255, 255, 255, 75, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 89, 213, 255, 255, 255, 255, 89, 1, 1, 1, 1, 34, 248, 255, 255, 255, 255, 255, 122, 1, 1, 1, 1, 5, 234, 255, 255, 236, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 58, 226, 255, 255, 255, 255, 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 71, 192, 255, 255, 255, 255, 255, 255, 201, 5, 1, 1, 1, 91, 252, 161, 1, 1, 1, 1, 118, 255, 255, 255, 255, 255, 255, 212, 24, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 206, 255, 255, + 253, 253, 1, 1, 1, 1, 13, 240, 253, 253, 253, 244, 180, 180, 180, 184, 225, 253, 253, 253, 253, 220, 13, 1, 1, 66, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 205, 29, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 234, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 24, 201, 255, 255, 255, 184, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 196, 255, 255, 255, 255, 255, 255, 255, 255, 233, 5, 1, 1, 1, 1, 130, 255, 255, 255, 255, 255, 255, 255, 235, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 84, 226, 255, 255, 255, 255, 27, 1, 1, 1, 1, 93, 255, 255, 255, 255, 255, 249, 44, 1, 1, 1, 1, 85, 255, 255, 255, 182, 1, 1, 1, 1, 1, 35, 41, 39, 18, 1, 1, 1, 1, 1, 109, 255, 255, 255, 247, 30, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 59, 216, 255, 255, 255, 255, 255, 247, 51, 1, 1, 1, 7, 217, 255, 161, 1, 1, 1, 1, 105, 255, 255, 255, 255, 255, 255, 255, 225, 109, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 108, 255, 255, + 253, 253, 1, 1, 1, 1, 85, 253, 253, 253, 253, 184, 1, 1, 1, 1, 15, 229, 253, 253, 253, 253, 81, 1, 1, 130, 253, 253, 253, 253, 173, 110, 110, 118, 188, 253, 253, 253, 253, 160, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 177, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 99, 225, 255, 255, 255, 255, 115, 1, 1, 1, 1, 13, 181, 184, 184, 184, 184, 184, 184, 248, 255, 255, 255, 255, 255, 255, 255, 255, 170, 1, 1, 1, 1, 1, 205, 255, 255, 255, 255, 255, 255, 255, 178, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 108, 255, 255, 255, 235, 2, 1, 1, 1, 1, 115, 255, 255, 255, 255, 255, 178, 1, 1, 1, 1, 1, 184, 255, 255, 255, 113, 1, 1, 1, 1, 9, 243, 252, 252, 248, 115, 1, 1, 1, 1, 64, 255, 255, 255, 202, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 76, 255, 255, 255, 255, 255, 131, 1, 1, 1, 1, 115, 252, 252, 157, 1, 1, 1, 1, 87, 255, 255, 255, 255, 255, 255, 255, 255, 255, 243, 186, 120, 55, 1, 1, 1, 1, 1, 1, 93, 255, 255, + 253, 253, 1, 1, 1, 1, 149, 253, 253, 253, 253, 114, 1, 1, 1, 1, 1, 218, 253, 253, 253, 253, 100, 1, 1, 205, 253, 253, 253, 253, 58, 1, 1, 1, 3, 233, 253, 253, 253, 208, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 107, 1, 1, 1, 1, 13, 95, 95, 95, 99, 120, 168, 230, 255, 255, 255, 255, 255, 251, 45, 1, 1, 1, 1, 87, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 102, 1, 1, 1, 1, 30, 247, 255, 255, 255, 255, 255, 255, 255, 108, 1, 1, 1, 1, 24, 236, 243, 236, 179, 9, 1, 1, 1, 1, 86, 255, 255, 255, 225, 2, 1, 1, 1, 1, 97, 255, 255, 255, 255, 230, 35, 1, 1, 1, 1, 71, 251, 255, 255, 250, 44, 1, 1, 1, 1, 82, 255, 255, 255, 255, 120, 1, 1, 1, 1, 98, 255, 255, 255, 127, 1, 1, 1, 1, 4, 221, 243, 239, 193, 24, 1, 1, 1, 1, 50, 255, 255, 255, 255, 214, 8, 1, 1, 1, 1, 34, 45, 45, 29, 1, 1, 1, 1, 69, 255, 255, 255, 250, 181, 181, 181, 181, 181, 228, 255, 255, 255, 183, 1, 1, 1, 1, 1, 133, 255, 255, + 253, 253, 1, 1, 1, 2, 220, 253, 253, 253, 251, 44, 1, 1, 1, 2, 105, 253, 253, 253, 253, 253, 69, 1, 30, 249, 253, 253, 253, 227, 6, 1, 1, 1, 1, 207, 253, 253, 253, 214, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 36, 1, 1, 1, 1, 93, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 219, 2, 1, 1, 1, 1, 134, 233, 233, 233, 233, 233, 233, 233, 234, 255, 255, 255, 255, 255, 255, 255, 252, 27, 1, 1, 1, 1, 100, 255, 255, 255, 255, 255, 255, 255, 250, 39, 1, 1, 1, 1, 93, 255, 255, 255, 255, 43, 1, 1, 1, 1, 117, 255, 255, 255, 239, 2, 1, 1, 1, 1, 15, 206, 252, 252, 210, 48, 1, 1, 1, 1, 15, 217, 255, 255, 255, 218, 2, 1, 1, 1, 1, 130, 233, 233, 226, 159, 13, 1, 1, 1, 1, 166, 255, 255, 252, 66, 1, 1, 1, 1, 59, 255, 255, 255, 255, 74, 1, 1, 1, 1, 90, 255, 255, 255, 249, 70, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46, 255, 255, 255, 227, 2, 1, 1, 1, 1, 126, 252, 255, 255, 198, 1, 1, 1, 1, 3, 219, 255, 255, + 253, 253, 1, 1, 1, 48, 251, 253, 253, 253, 248, 187, 187, 187, 190, 218, 253, 253, 253, 253, 253, 228, 11, 1, 102, 253, 253, 253, 253, 168, 1, 1, 1, 1, 1, 201, 253, 253, 253, 220, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 213, 1, 1, 1, 1, 1, 153, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 146, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 85, 255, 255, 255, 255, 255, 255, 255, 206, 1, 1, 1, 1, 1, 169, 255, 255, 255, 255, 255, 255, 255, 214, 2, 1, 1, 1, 1, 158, 255, 255, 255, 234, 9, 1, 1, 1, 1, 179, 255, 255, 255, 255, 53, 1, 1, 1, 1, 1, 6, 53, 41, 2, 1, 1, 1, 1, 6, 177, 255, 255, 255, 255, 145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 44, 245, 255, 255, 230, 9, 1, 1, 1, 1, 127, 255, 255, 255, 249, 35, 1, 1, 1, 1, 141, 255, 255, 255, 148, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 250, 255, 255, 235, 2, 1, 1, 1, 1, 2, 90, 118, 90, 9, 1, 1, 1, 1, 112, 255, 255, 255, + 253, 253, 1, 1, 1, 117, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 252, 108, 1, 1, 175, 253, 253, 253, 253, 99, 1, 1, 1, 1, 1, 194, 253, 253, 253, 224, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 137, 1, 1, 1, 1, 2, 225, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 85, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 146, 255, 255, 255, 255, 255, 255, 255, 132, 1, 1, 1, 1, 9, 230, 255, 255, 255, 255, 255, 255, 255, 139, 1, 1, 1, 1, 2, 222, 255, 255, 255, 179, 1, 1, 1, 1, 12, 236, 255, 255, 255, 255, 152, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 175, 255, 255, 255, 255, 252, 82, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 205, 255, 255, 255, 170, 1, 1, 1, 1, 1, 201, 255, 255, 255, 211, 2, 1, 1, 1, 2, 214, 255, 255, 222, 18, 1, 1, 1, 2, 78, 83, 83, 83, 83, 52, 1, 1, 1, 1, 18, 240, 255, 255, 255, 66, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 70, 239, 255, 255, 255, + 253, 253, 1, 1, 1, 189, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 241, 112, 2, 1, 9, 234, 253, 253, 253, 247, 30, 1, 1, 1, 1, 1, 187, 253, 253, 253, 234, 9, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 76, 1, 1, 1, 1, 49, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 220, 255, 255, 255, 255, 255, 255, 255, 69, 1, 1, 1, 1, 66, 252, 255, 255, 255, 255, 255, 255, 255, 77, 1, 1, 1, 1, 47, 255, 255, 255, 255, 121, 1, 1, 1, 1, 67, 255, 255, 255, 255, 255, 250, 100, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 66, 213, 255, 255, 255, 255, 255, 239, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 70, 214, 255, 255, 255, 255, 101, 1, 1, 1, 1, 26, 249, 255, 255, 255, 150, 1, 1, 1, 1, 30, 252, 255, 251, 90, 1, 1, 1, 1, 94, 255, 255, 255, 255, 255, 161, 1, 1, 1, 1, 5, 231, 255, 255, 255, 210, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 104, 237, 255, 255, 255, 255, + 253, 253, 1, 1, 12, 205, 215, 215, 215, 215, 215, 215, 215, 215, 215, 212, 200, 170, 119, 35, 1, 1, 1, 53, 215, 215, 215, 215, 179, 1, 1, 1, 1, 1, 1, 171, 239, 239, 239, 228, 13, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 39, 31, 31, 31, 31, 127, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 198, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 65, 252, 255, 255, 255, 255, 255, 255, 237, 35, 31, 31, 31, 31, 138, 255, 255, 255, 255, 255, 255, 255, 239, 40, 31, 31, 31, 31, 126, 255, 255, 255, 255, 105, 31, 31, 31, 31, 61, 244, 255, 255, 255, 255, 255, 249, 150, 42, 1, 1, 1, 1, 1, 13, 82, 179, 248, 255, 255, 255, 255, 255, 255, 199, 31, 31, 31, 31, 31, 31, 31, 31, 29, 45, 81, 122, 201, 250, 255, 255, 255, 255, 249, 60, 31, 31, 31, 31, 112, 255, 255, 255, 255, 132, 31, 31, 31, 31, 44, 233, 255, 185, 32, 31, 31, 31, 35, 220, 255, 255, 255, 255, 255, 174, 31, 31, 31, 31, 31, 222, 255, 255, 255, 255, 217, 89, 6, 1, 1, 1, 1, 1, 27, 102, 205, 252, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 13, 13, 13, 13, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 249, 249, 249, 249, 249, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 250, 255, 255, 255, 255, 255, 255, 255, 252, 249, 249, 249, 249, 249, 252, 255, 255, 255, 255, 255, 255, 255, 252, 249, 249, 249, 249, 249, 252, 255, 255, 255, 255, 250, 249, 249, 249, 249, 249, 255, 255, 255, 255, 255, 255, 255, 255, 248, 217, 179, 170, 175, 200, 237, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 249, 249, 249, 249, 249, 249, 249, 249, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 252, 249, 249, 249, 249, 249, 251, 255, 255, 255, 255, 251, 249, 249, 249, 249, 249, 252, 255, 251, 249, 249, 249, 249, 250, 255, 255, 255, 255, 255, 255, 252, 249, 249, 249, 249, 249, 252, 255, 255, 255, 255, 255, 252, 230, 187, 170, 170, 182, 219, 246, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(236, 48, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "0 140 79"); + IupSetAttribute(image, "2", "1 140 80"); + IupSetAttribute(image, "3", "4 141 81"); + IupSetAttribute(image, "4", "4 141 82"); + IupSetAttribute(image, "5", "5 142 82"); + IupSetAttribute(image, "6", "5 142 83"); + IupSetAttribute(image, "7", "7 143 84"); + IupSetAttribute(image, "8", "8 143 83"); + IupSetAttribute(image, "9", "8 142 84"); + IupSetAttribute(image, "10", "11 143 86"); + IupSetAttribute(image, "11", "10 144 85"); + IupSetAttribute(image, "12", "11 144 86"); + IupSetAttribute(image, "13", "12 144 86"); + IupSetAttribute(image, "14", "12 146 87"); + IupSetAttribute(image, "15", "14 145 88"); + IupSetAttribute(image, "16", "15 146 88"); + IupSetAttribute(image, "17", "16 145 88"); + IupSetAttribute(image, "18", "17 146 89"); + IupSetAttribute(image, "19", "18 147 90"); + IupSetAttribute(image, "20", "19 148 91"); + IupSetAttribute(image, "21", "20 146 90"); + IupSetAttribute(image, "22", "21 147 92"); + IupSetAttribute(image, "23", "20 148 91"); + IupSetAttribute(image, "24", "21 148 92"); + IupSetAttribute(image, "25", "22 149 94"); + IupSetAttribute(image, "26", "24 148 93"); + IupSetAttribute(image, "27", "24 149 94"); + IupSetAttribute(image, "28", "26 150 94"); + IupSetAttribute(image, "29", "26 150 96"); + IupSetAttribute(image, "30", "28 150 96"); + IupSetAttribute(image, "31", "27 152 97"); + IupSetAttribute(image, "32", "30 152 98"); + IupSetAttribute(image, "33", "32 151 98"); + IupSetAttribute(image, "34", "32 152 99"); + IupSetAttribute(image, "35", "32 152 100"); + IupSetAttribute(image, "36", "34 154 100"); + IupSetAttribute(image, "37", "35 155 102"); + IupSetAttribute(image, "38", "37 153 101"); + IupSetAttribute(image, "39", "37 154 102"); + IupSetAttribute(image, "40", "39 155 104"); + IupSetAttribute(image, "41", "39 156 104"); + IupSetAttribute(image, "42", "40 156 103"); + IupSetAttribute(image, "43", "41 155 104"); + IupSetAttribute(image, "44", "41 156 104"); + IupSetAttribute(image, "45", "42 157 106"); + IupSetAttribute(image, "46", "45 157 107"); + IupSetAttribute(image, "47", "44 158 107"); + IupSetAttribute(image, "48", "45 158 108"); + IupSetAttribute(image, "49", "48 159 109"); + IupSetAttribute(image, "50", "49 159 111"); + IupSetAttribute(image, "51", "47 160 109"); + IupSetAttribute(image, "52", "45 160 110"); + IupSetAttribute(image, "53", "50 160 111"); + IupSetAttribute(image, "54", "50 161 112"); + IupSetAttribute(image, "55", "52 161 112"); + IupSetAttribute(image, "56", "53 161 114"); + IupSetAttribute(image, "57", "54 162 113"); + IupSetAttribute(image, "58", "54 162 114"); + IupSetAttribute(image, "59", "56 162 114"); + IupSetAttribute(image, "60", "57 163 116"); + IupSetAttribute(image, "61", "57 164 116"); + IupSetAttribute(image, "62", "59 164 118"); + IupSetAttribute(image, "63", "58 165 119"); + IupSetAttribute(image, "64", "59 166 119"); + IupSetAttribute(image, "65", "60 164 117"); + IupSetAttribute(image, "66", "61 165 118"); + IupSetAttribute(image, "67", "62 166 119"); + IupSetAttribute(image, "68", "63 165 120"); + IupSetAttribute(image, "69", "62 166 120"); + IupSetAttribute(image, "70", "64 166 120"); + IupSetAttribute(image, "71", "66 167 122"); + IupSetAttribute(image, "72", "66 168 122"); + IupSetAttribute(image, "73", "66 169 124"); + IupSetAttribute(image, "74", "67 170 125"); + IupSetAttribute(image, "75", "68 168 123"); + IupSetAttribute(image, "76", "69 169 124"); + IupSetAttribute(image, "77", "71 169 126"); + IupSetAttribute(image, "78", "68 170 125"); + IupSetAttribute(image, "79", "70 171 127"); + IupSetAttribute(image, "80", "72 170 126"); + IupSetAttribute(image, "81", "73 171 127"); + IupSetAttribute(image, "82", "74 171 128"); + IupSetAttribute(image, "83", "72 172 128"); + IupSetAttribute(image, "84", "77 171 128"); + IupSetAttribute(image, "85", "77 172 130"); + IupSetAttribute(image, "86", "78 173 131"); + IupSetAttribute(image, "87", "77 174 131"); + IupSetAttribute(image, "88", "80 173 130"); + IupSetAttribute(image, "89", "80 174 132"); + IupSetAttribute(image, "90", "82 174 133"); + IupSetAttribute(image, "91", "84 175 134"); + IupSetAttribute(image, "92", "83 176 135"); + IupSetAttribute(image, "93", "86 176 136"); + IupSetAttribute(image, "94", "88 177 137"); + IupSetAttribute(image, "95", "89 177 138"); + IupSetAttribute(image, "96", "90 178 138"); + IupSetAttribute(image, "97", "92 179 139"); + IupSetAttribute(image, "98", "93 179 140"); + IupSetAttribute(image, "99", "94 180 142"); + IupSetAttribute(image, "100", "96 180 142"); + IupSetAttribute(image, "101", "98 181 144"); + IupSetAttribute(image, "102", "98 182 144"); + IupSetAttribute(image, "103", "101 181 144"); + IupSetAttribute(image, "104", "100 182 145"); + IupSetAttribute(image, "105", "102 183 146"); + IupSetAttribute(image, "106", "102 184 147"); + IupSetAttribute(image, "107", "103 185 148"); + IupSetAttribute(image, "108", "105 184 148"); + IupSetAttribute(image, "109", "107 185 150"); + IupSetAttribute(image, "110", "105 186 150"); + IupSetAttribute(image, "111", "108 185 150"); + IupSetAttribute(image, "112", "108 186 150"); + IupSetAttribute(image, "113", "109 187 152"); + IupSetAttribute(image, "114", "111 188 154"); + IupSetAttribute(image, "115", "113 188 154"); + IupSetAttribute(image, "116", "115 189 156"); + IupSetAttribute(image, "117", "117 190 157"); + IupSetAttribute(image, "118", "118 190 158"); + IupSetAttribute(image, "119", "120 191 159"); + IupSetAttribute(image, "120", "122 192 160"); + IupSetAttribute(image, "121", "123 193 162"); + IupSetAttribute(image, "122", "124 193 162"); + IupSetAttribute(image, "123", "124 194 162"); + IupSetAttribute(image, "124", "127 195 164"); + IupSetAttribute(image, "125", "255 204 48"); + IupSetAttribute(image, "126", "128 195 164"); + IupSetAttribute(image, "127", "129 196 166"); + IupSetAttribute(image, "128", "132 197 167"); + IupSetAttribute(image, "129", "131 197 168"); + IupSetAttribute(image, "130", "133 197 168"); + IupSetAttribute(image, "131", "134 198 169"); + IupSetAttribute(image, "132", "133 198 170"); + IupSetAttribute(image, "133", "136 198 170"); + IupSetAttribute(image, "134", "137 199 171"); + IupSetAttribute(image, "135", "139 201 172"); + IupSetAttribute(image, "136", "140 200 172"); + IupSetAttribute(image, "137", "140 200 173"); + IupSetAttribute(image, "138", "141 201 174"); + IupSetAttribute(image, "139", "142 202 175"); + IupSetAttribute(image, "140", "142 202 176"); + IupSetAttribute(image, "141", "144 202 176"); + IupSetAttribute(image, "142", "145 203 177"); + IupSetAttribute(image, "143", "146 204 178"); + IupSetAttribute(image, "144", "148 203 178"); + IupSetAttribute(image, "145", "149 204 179"); + IupSetAttribute(image, "146", "150 205 180"); + IupSetAttribute(image, "147", "151 206 182"); + IupSetAttribute(image, "148", "152 205 181"); + IupSetAttribute(image, "149", "152 206 181"); + IupSetAttribute(image, "150", "153 206 182"); + IupSetAttribute(image, "151", "155 208 185"); + IupSetAttribute(image, "152", "158 208 184"); + IupSetAttribute(image, "153", "158 209 186"); + IupSetAttribute(image, "154", "159 210 186"); + IupSetAttribute(image, "155", "158 210 187"); + IupSetAttribute(image, "156", "159 211 189"); + IupSetAttribute(image, "157", "159 212 189"); + IupSetAttribute(image, "158", "160 209 186"); + IupSetAttribute(image, "159", "161 210 187"); + IupSetAttribute(image, "160", "162 210 188"); + IupSetAttribute(image, "161", "160 212 189"); + IupSetAttribute(image, "162", "166 209 188"); + IupSetAttribute(image, "163", "164 211 189"); + IupSetAttribute(image, "164", "164 211 190"); + IupSetAttribute(image, "165", "166 212 191"); + IupSetAttribute(image, "166", "167 213 192"); + IupSetAttribute(image, "167", "167 213 193"); + IupSetAttribute(image, "168", "168 213 192"); + IupSetAttribute(image, "169", "170 214 193"); + IupSetAttribute(image, "170", "170 214 194"); + IupSetAttribute(image, "171", "172 213 193"); + IupSetAttribute(image, "172", "172 215 195"); + IupSetAttribute(image, "173", "169 216 195"); + IupSetAttribute(image, "174", "170 216 196"); + IupSetAttribute(image, "175", "173 216 196"); + IupSetAttribute(image, "176", "175 217 198"); + IupSetAttribute(image, "177", "176 217 198"); + IupSetAttribute(image, "178", "179 218 199"); + IupSetAttribute(image, "179", "178 218 200"); + IupSetAttribute(image, "180", "180 218 200"); + IupSetAttribute(image, "181", "182 219 202"); + IupSetAttribute(image, "182", "182 220 202"); + IupSetAttribute(image, "183", "184 220 203"); + IupSetAttribute(image, "184", "184 220 204"); + IupSetAttribute(image, "185", "187 222 205"); + IupSetAttribute(image, "186", "187 222 206"); + IupSetAttribute(image, "187", "189 222 206"); + IupSetAttribute(image, "188", "189 223 208"); + IupSetAttribute(image, "189", "191 224 208"); + IupSetAttribute(image, "190", "192 223 208"); + IupSetAttribute(image, "191", "192 224 209"); + IupSetAttribute(image, "192", "194 224 210"); + IupSetAttribute(image, "193", "195 225 211"); + IupSetAttribute(image, "194", "195 226 212"); + IupSetAttribute(image, "195", "196 225 211"); + IupSetAttribute(image, "196", "196 226 212"); + IupSetAttribute(image, "197", "197 227 213"); + IupSetAttribute(image, "198", "199 227 214"); + IupSetAttribute(image, "199", "200 227 214"); + IupSetAttribute(image, "200", "201 228 215"); + IupSetAttribute(image, "201", "201 228 216"); + IupSetAttribute(image, "202", "203 230 217"); + IupSetAttribute(image, "203", "205 229 217"); + IupSetAttribute(image, "204", "204 230 217"); + IupSetAttribute(image, "205", "206 230 218"); + IupSetAttribute(image, "206", "207 231 220"); + IupSetAttribute(image, "207", "205 233 221"); + IupSetAttribute(image, "208", "208 231 219"); + IupSetAttribute(image, "209", "208 231 220"); + IupSetAttribute(image, "210", "208 232 220"); + IupSetAttribute(image, "211", "210 232 222"); + IupSetAttribute(image, "212", "212 233 223"); + IupSetAttribute(image, "213", "212 234 223"); + IupSetAttribute(image, "214", "214 234 224"); + IupSetAttribute(image, "215", "215 236 226"); + IupSetAttribute(image, "216", "216 234 226"); + IupSetAttribute(image, "217", "217 236 226"); + IupSetAttribute(image, "218", "218 237 228"); + IupSetAttribute(image, "219", "220 237 228"); + IupSetAttribute(image, "220", "222 238 230"); + IupSetAttribute(image, "221", "225 239 232"); + IupSetAttribute(image, "222", "225 240 232"); + IupSetAttribute(image, "223", "226 240 234"); + IupSetAttribute(image, "224", "227 242 236"); + IupSetAttribute(image, "225", "228 240 234"); + IupSetAttribute(image, "226", "230 242 236"); + IupSetAttribute(image, "227", "232 242 237"); + IupSetAttribute(image, "228", "233 243 238"); + IupSetAttribute(image, "229", "233 244 238"); + IupSetAttribute(image, "230", "234 244 239"); + IupSetAttribute(image, "231", "234 244 240"); + IupSetAttribute(image, "232", "235 246 241"); + IupSetAttribute(image, "233", "236 245 240"); + IupSetAttribute(image, "234", "238 246 242"); + IupSetAttribute(image, "235", "240 246 242"); + IupSetAttribute(image, "236", "241 247 244"); + IupSetAttribute(image, "237", "242 248 244"); + IupSetAttribute(image, "238", "243 249 246"); + IupSetAttribute(image, "239", "244 248 246"); + IupSetAttribute(image, "240", "245 249 247"); + IupSetAttribute(image, "241", "245 250 247"); + IupSetAttribute(image, "242", "246 249 248"); + IupSetAttribute(image, "243", "246 250 248"); + IupSetAttribute(image, "244", "248 250 249"); + IupSetAttribute(image, "245", "249 251 250"); + IupSetAttribute(image, "246", "250 252 250"); + IupSetAttribute(image, "247", "250 252 251"); + IupSetAttribute(image, "248", "251 252 252"); + IupSetAttribute(image, "249", "252 253 252"); + IupSetAttribute(image, "250", "252 253 253"); + IupSetAttribute(image, "251", "253 254 253"); + IupSetAttribute(image, "252", "253 254 254"); + IupSetAttribute(image, "253", "254 255 255"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_LogoTecgrafPUC_Rio8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 195, 166, 166, 166, 166, 166, 166, 166, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 168, 168, 168, 168, 168, 168, 169, 169, 169, 179, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 243, 226, 222, 218, 185, 186, 186, 186, 186, 186, 186, 205, 255, 255, + 255, 255, 48, 62, 85, 85, 85, 85, 85, 102, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 148, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 133, 114, 143, 143, 144, 145, 145, 145, 145, 145, 148, 148, 120, 255, 255, + 255, 255, 43, 34, 65, 65, 65, 65, 65, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 75, 75, 81, 148, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 237, 91, 84, 111, 105, 105, 105, 105, 105, 105, 105, 105, 105, 111, 110, 255, 255, + 255, 255, 43, 34, 65, 65, 65, 65, 65, 65, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 75, 81, 148, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 95, 65, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 100, 255, 255, + 255, 255, 43, 34, 65, 65, 65, 65, 65, 65, 65, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 81, 148, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 235, 40, 81, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 77, 255, 255, + 255, 255, 43, 34, 65, 65, 65, 65, 65, 65, 65, 65, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 81, 148, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 193, 29, 84, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 70, 255, 255, + 255, 255, 43, 34, 65, 65, 65, 65, 65, 65, 65, 65, 65, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 81, 148, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 245, 245, 245, 245, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 241, 236, 232, 223, 223, 223, 226, 236, 237, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 241, 241, 241, 241, 241, 246, 246, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 135, 29, 84, 105, 105, 105, 105, 105, 105, 105, 105, 84, 75, 70, 79, 60, 255, 255, + 255, 255, 43, 30, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 70, 70, 70, 70, 70, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 75, 148, 248, 255, 255, 255, 255, 251, 237, 195, 156, 133, 125, 114, 115, 125, 143, 143, 147, 155, 177, 202, 232, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 206, 133, 119, 114, 115, 115, 115, 115, 121, 143, 144, 148, 159, 178, 214, 232, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 223, 179, 157, 157, 155, 163, 178, 214, 232, 243, 251, 195, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 183, 245, 255, 255, 209, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 207, 246, 255, 241, 209, 172, 214, 229, 246, 255, 255, 255, 255, 255, 255, 251, 236, 222, 168, 157, 148, 148, 148, 148, 149, 149, 159, 159, 159, 159, 173, 178, 214, 232, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 130, 31, 105, 105, 105, 105, 105, 105, 105, 105, 102, 56, 18, 20, 33, 52, 255, 255, + 255, 255, 43, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 30, 70, 70, 70, 70, 70, 71, 71, 71, 71, 75, 31, 2, 2, 2, 2, 2, 2, 2, 2, 5, 61, 248, 255, 255, 245, 208, 116, 81, 81, 81, 81, 81, 80, 80, 80, 81, 81, 84, 85, 111, 142, 148, 164, 214, 239, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 212, 116, 81, 81, 84, 81, 80, 80, 80, 79, 79, 79, 80, 81, 81, 102, 115, 148, 162, 189, 224, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 231, 136, 107, 111, 111, 111, 111, 111, 112, 115, 143, 159, 188, 172, 32, 83, 141, 142, 142, 142, 142, 142, 142, 142, 143, 115, 236, 255, 255, 54, 81, 142, 143, 143, 143, 143, 143, 143, 143, 143, 148, 211, 126, 108, 111, 115, 153, 232, 246, 255, 255, 255, 255, 245, 199, 124, 115, 115, 115, 112, 111, 111, 111, 105, 105, 105, 111, 111, 112, 115, 115, 143, 151, 164, 190, 215, 240, 255, 255, 255, 255, 206, 180, 184, 91, 36, 105, 105, 105, 105, 105, 105, 105, 105, 111, 114, 156, 167, 157, 156, 255, 255, + 255, 255, 235, 198, 198, 198, 198, 198, 198, 198, 198, 198, 35, 28, 65, 70, 70, 70, 70, 70, 71, 71, 71, 79, 107, 140, 198, 198, 198, 198, 198, 198, 198, 198, 211, 251, 251, 206, 76, 70, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 79, 105, 148, 189, 217, 244, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 236, 123, 70, 75, 79, 75, 75, 75, 75, 75, 75, 79, 79, 79, 79, 79, 79, 79, 79, 80, 84, 143, 178, 192, 240, 251, 255, 255, 255, 255, 255, 255, 255, 245, 132, 75, 81, 81, 81, 80, 81, 81, 81, 81, 81, 81, 84, 114, 145, 65, 75, 81, 81, 81, 81, 81, 81, 81, 81, 85, 115, 236, 255, 255, 48, 56, 81, 83, 83, 83, 84, 84, 84, 84, 105, 124, 57, 81, 84, 84, 84, 104, 223, 244, 255, 255, 255, 235, 91, 79, 85, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 105, 115, 163, 192, 221, 249, 255, 255, 92, 65, 143, 141, 84, 102, 105, 105, 105, 105, 105, 105, 105, 115, 177, 177, 163, 148, 120, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 28, 65, 65, 70, 70, 70, 70, 70, 71, 71, 79, 148, 241, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 130, 57, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 101, 163, 192, 240, 255, 255, 255, 255, 255, 255, 255, 255, 211, 60, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 81, 152, 192, 224, 249, 255, 255, 255, 255, 255, 238, 90, 65, 79, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 84, 115, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 108, 154, 75, 83, 83, 83, 83, 84, 191, 244, 255, 255, 238, 68, 66, 81, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 102, 127, 191, 217, 249, 255, 88, 41, 85, 85, 85, 102, 102, 102, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 114, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 28, 65, 65, 65, 70, 70, 70, 70, 70, 71, 79, 148, 243, 255, 255, 255, 255, 255, 255, 255, 255, 248, 98, 39, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 80, 152, 217, 234, 255, 255, 255, 255, 255, 255, 210, 46, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 125, 214, 224, 251, 255, 255, 255, 245, 90, 59, 79, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 84, 115, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 108, 121, 81, 81, 83, 83, 83, 84, 155, 241, 255, 251, 123, 59, 79, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 115, 174, 232, 255, 88, 41, 85, 85, 85, 85, 102, 102, 102, 105, 105, 105, 105, 105, 105, 105, 105, 105, 114, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 28, 65, 65, 65, 70, 70, 70, 70, 70, 70, 79, 148, 243, 255, 255, 255, 255, 255, 255, 255, 255, 139, 29, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 128, 217, 240, 255, 255, 255, 255, 235, 46, 59, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 124, 192, 240, 255, 255, 255, 122, 40, 75, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 84, 115, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 84, 81, 81, 81, 83, 83, 83, 143, 240, 255, 238, 60, 79, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 102, 143, 178, 249, 88, 41, 85, 85, 85, 85, 85, 85, 102, 102, 102, 105, 105, 105, 105, 105, 105, 105, 114, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 28, 65, 65, 65, 65, 70, 70, 70, 70, 70, 79, 148, 243, 255, 255, 255, 255, 255, 255, 255, 238, 35, 57, 71, 75, 75, 75, 75, 75, 75, 75, 75, 75, 71, 62, 56, 39, 42, 62, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 158, 217, 246, 255, 255, 248, 72, 40, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 71, 59, 41, 36, 41, 65, 75, 79, 79, 79, 79, 79, 79, 79, 79, 80, 154, 191, 246, 255, 235, 33, 64, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 84, 115, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 83, 83, 115, 232, 255, 206, 61, 81, 84, 84, 84, 84, 84, 84, 84, 84, 81, 71, 59, 42, 39, 41, 59, 75, 84, 84, 84, 84, 84, 84, 84, 84, 84, 111, 148, 241, 88, 41, 85, 85, 85, 85, 85, 85, 85, 102, 102, 102, 102, 105, 105, 105, 105, 105, 114, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 28, 65, 65, 65, 65, 65, 70, 70, 70, 70, 79, 148, 243, 255, 255, 255, 255, 255, 255, 251, 122, 19, 65, 71, 71, 75, 75, 75, 75, 75, 75, 75, 65, 29, 18, 25, 26, 20, 2, 28, 65, 75, 75, 75, 75, 75, 75, 75, 75, 81, 178, 224, 255, 255, 210, 21, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 59, 19, 25, 43, 44, 24, 3, 29, 71, 79, 79, 79, 79, 79, 79, 79, 79, 81, 151, 223, 255, 122, 34, 75, 80, 80, 80, 80, 80, 80, 80, 80, 80, 79, 65, 57, 36, 41, 59, 75, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 84, 115, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 114, 209, 255, 175, 71, 83, 84, 84, 84, 84, 84, 84, 84, 79, 34, 21, 25, 37, 69, 35, 20, 7, 62, 84, 84, 84, 84, 84, 84, 84, 84, 105, 143, 236, 88, 39, 81, 81, 84, 85, 85, 85, 85, 85, 85, 102, 102, 102, 84, 83, 83, 84, 114, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 28, 65, 65, 65, 65, 65, 65, 70, 70, 70, 79, 148, 243, 255, 255, 255, 255, 255, 255, 245, 25, 42, 71, 71, 71, 71, 75, 75, 75, 75, 75, 71, 39, 93, 206, 225, 232, 211, 117, 11, 12, 65, 75, 75, 75, 75, 75, 75, 75, 75, 143, 191, 246, 248, 88, 31, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 65, 40, 138, 238, 245, 248, 245, 193, 23, 19, 75, 79, 79, 79, 75, 75, 75, 75, 75, 84, 127, 242, 46, 56, 79, 79, 80, 80, 80, 80, 80, 80, 80, 79, 56, 19, 35, 54, 25, 12, 12, 65, 81, 81, 81, 81, 81, 81, 81, 81, 81, 84, 115, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 106, 206, 255, 175, 42, 39, 36, 36, 36, 34, 34, 34, 31, 57, 47, 126, 156, 186, 168, 156, 126, 34, 34, 81, 84, 84, 84, 84, 84, 84, 84, 85, 112, 211, 88, 6, 8, 10, 41, 85, 85, 85, 85, 85, 85, 85, 85, 102, 65, 10, 8, 13, 74, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 28, 65, 65, 65, 65, 65, 65, 65, 70, 70, 79, 148, 243, 255, 255, 255, 255, 255, 255, 211, 7, 64, 71, 71, 71, 71, 71, 75, 75, 75, 75, 82, 84, 114, 115, 114, 113, 104, 81, 62, 31, 59, 75, 75, 75, 75, 75, 75, 75, 75, 81, 160, 240, 238, 25, 57, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 70, 213, 255, 255, 255, 255, 255, 255, 213, 4, 29, 31, 30, 29, 28, 22, 29, 34, 40, 45, 73, 194, 18, 65, 79, 79, 79, 80, 80, 80, 80, 80, 80, 71, 67, 210, 245, 251, 245, 227, 53, 7, 75, 81, 81, 81, 81, 81, 81, 81, 81, 84, 115, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 75, 65, 57, 57, 65, 78, 208, 255, 235, 134, 99, 89, 38, 19, 39, 59, 71, 71, 111, 143, 142, 115, 115, 115, 112, 111, 105, 80, 84, 84, 84, 84, 84, 84, 84, 84, 84, 111, 209, 213, 140, 140, 50, 34, 85, 85, 85, 85, 85, 85, 85, 85, 105, 111, 97, 140, 140, 198, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 28, 65, 65, 65, 65, 65, 65, 65, 70, 70, 79, 148, 243, 255, 255, 255, 255, 255, 255, 138, 8, 71, 71, 71, 71, 71, 71, 71, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 71, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 145, 223, 235, 18, 64, 75, 75, 75, 75, 75, 75, 75, 75, 75, 84, 156, 255, 255, 255, 255, 255, 255, 255, 255, 122, 55, 88, 97, 130, 138, 193, 213, 235, 238, 238, 245, 210, 18, 65, 79, 79, 79, 79, 80, 80, 80, 80, 81, 81, 213, 255, 255, 255, 255, 255, 241, 15, 58, 81, 81, 81, 81, 81, 81, 81, 81, 84, 115, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 81, 80, 42, 18, 24, 25, 33, 35, 54, 231, 255, 255, 250, 200, 110, 105, 111, 111, 111, 105, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 111, 209, 255, 255, 255, 92, 34, 84, 84, 85, 85, 85, 85, 85, 85, 105, 115, 200, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 70, 79, 148, 243, 255, 255, 255, 255, 255, 255, 129, 13, 71, 71, 71, 71, 71, 71, 71, 71, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 115, 185, 208, 8, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 114, 223, 255, 255, 255, 255, 255, 255, 255, 255, 251, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 198, 13, 71, 79, 79, 79, 79, 79, 80, 80, 80, 84, 143, 245, 255, 255, 255, 255, 255, 248, 37, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 115, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 81, 75, 67, 206, 238, 245, 245, 245, 238, 248, 255, 245, 132, 81, 84, 84, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 111, 209, 255, 255, 255, 92, 34, 84, 84, 84, 85, 85, 85, 85, 85, 105, 115, 207, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 65, 79, 148, 243, 255, 255, 255, 255, 255, 255, 129, 12, 71, 71, 71, 71, 71, 71, 71, 71, 71, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 111, 158, 140, 7, 71, 75, 75, 75, 75, 75, 75, 75, 75, 79, 143, 236, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 210, 12, 65, 79, 79, 79, 79, 79, 79, 79, 80, 102, 164, 241, 255, 255, 255, 255, 255, 238, 32, 65, 81, 81, 81, 81, 81, 81, 81, 81, 84, 112, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 81, 84, 211, 255, 255, 255, 255, 255, 255, 255, 249, 134, 70, 81, 81, 81, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 111, 209, 255, 255, 255, 92, 34, 84, 84, 84, 84, 84, 85, 85, 85, 105, 115, 209, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 65, 79, 148, 243, 255, 255, 255, 255, 255, 255, 139, 6, 70, 71, 71, 71, 71, 71, 71, 71, 71, 75, 71, 65, 65, 65, 65, 65, 65, 64, 64, 62, 62, 59, 59, 58, 57, 57, 57, 57, 56, 42, 65, 157, 193, 7, 65, 75, 75, 75, 75, 75, 75, 75, 75, 79, 148, 228, 255, 255, 255, 255, 255, 255, 255, 255, 245, 165, 171, 207, 222, 223, 232, 244, 244, 244, 244, 246, 206, 12, 64, 79, 79, 79, 79, 79, 79, 79, 79, 81, 163, 220, 243, 250, 255, 248, 236, 95, 57, 79, 80, 80, 81, 81, 81, 81, 81, 81, 84, 112, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 115, 237, 255, 255, 255, 255, 255, 255, 255, 235, 60, 81, 81, 81, 81, 81, 83, 83, 83, 83, 81, 79, 65, 57, 41, 41, 36, 34, 29, 56, 81, 84, 84, 84, 84, 84, 84, 84, 84, 111, 209, 255, 255, 255, 92, 34, 84, 84, 84, 84, 84, 84, 85, 85, 105, 115, 209, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 65, 79, 148, 243, 255, 255, 255, 255, 255, 255, 210, 1, 62, 71, 71, 71, 71, 71, 71, 71, 71, 75, 65, 24, 35, 35, 35, 33, 33, 33, 33, 24, 18, 20, 20, 25, 25, 25, 25, 25, 24, 24, 25, 93, 210, 10, 62, 75, 75, 75, 75, 75, 75, 75, 75, 75, 150, 215, 250, 255, 255, 255, 255, 255, 255, 255, 134, 65, 81, 84, 111, 115, 148, 189, 220, 224, 230, 233, 156, 16, 41, 79, 79, 79, 79, 79, 79, 79, 79, 79, 104, 172, 189, 178, 177, 152, 107, 75, 79, 80, 80, 80, 80, 81, 81, 81, 81, 81, 84, 112, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 120, 238, 255, 255, 255, 255, 255, 255, 251, 97, 58, 81, 81, 81, 81, 81, 81, 83, 83, 83, 62, 19, 20, 25, 51, 51, 72, 69, 17, 59, 83, 84, 84, 84, 84, 84, 84, 84, 84, 111, 209, 255, 255, 255, 92, 34, 84, 84, 84, 84, 84, 84, 84, 84, 105, 115, 209, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 65, 79, 148, 243, 255, 255, 255, 255, 255, 255, 238, 9, 56, 71, 71, 71, 71, 71, 71, 71, 71, 71, 172, 157, 238, 245, 245, 245, 245, 245, 235, 109, 77, 100, 103, 152, 157, 181, 201, 209, 223, 207, 222, 226, 238, 24, 39, 75, 75, 75, 75, 75, 75, 75, 75, 75, 104, 217, 233, 249, 255, 255, 255, 255, 255, 206, 40, 65, 75, 75, 75, 79, 80, 81, 84, 104, 114, 164, 226, 89, 14, 75, 79, 79, 79, 79, 79, 79, 79, 79, 79, 81, 113, 115, 115, 111, 81, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 84, 112, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 120, 238, 255, 255, 255, 255, 255, 255, 245, 43, 65, 81, 81, 81, 81, 81, 81, 81, 81, 84, 65, 170, 235, 245, 251, 251, 237, 126, 65, 81, 84, 84, 84, 84, 84, 84, 84, 84, 84, 111, 211, 255, 255, 255, 92, 34, 84, 84, 84, 84, 84, 84, 84, 84, 105, 115, 209, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 65, 75, 148, 243, 255, 255, 255, 255, 255, 255, 248, 48, 13, 70, 71, 71, 71, 71, 71, 71, 71, 71, 106, 191, 191, 232, 243, 242, 238, 195, 76, 70, 79, 79, 81, 84, 111, 143, 155, 163, 181, 187, 217, 216, 248, 88, 12, 71, 75, 75, 75, 75, 75, 75, 75, 75, 75, 127, 191, 217, 224, 241, 241, 226, 136, 70, 65, 75, 75, 75, 75, 75, 75, 75, 79, 79, 84, 147, 245, 208, 9, 57, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 84, 111, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 120, 238, 255, 255, 255, 255, 255, 255, 238, 24, 65, 81, 81, 81, 81, 81, 81, 81, 81, 105, 164, 221, 240, 236, 209, 157, 114, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 111, 211, 255, 255, 255, 92, 34, 84, 84, 84, 84, 84, 84, 84, 84, 105, 115, 209, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 65, 75, 148, 243, 255, 255, 255, 255, 255, 255, 255, 198, 2, 57, 71, 71, 71, 71, 71, 71, 71, 71, 71, 100, 150, 151, 148, 146, 114, 80, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 84, 153, 245, 255, 210, 7, 42, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 106, 155, 149, 148, 143, 111, 81, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 79, 75, 171, 255, 248, 88, 10, 65, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 84, 111, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 120, 238, 255, 255, 255, 255, 255, 255, 238, 20, 65, 81, 81, 81, 81, 81, 81, 81, 81, 81, 128, 164, 159, 145, 142, 114, 105, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 111, 211, 255, 255, 255, 92, 34, 84, 84, 84, 84, 84, 84, 84, 84, 105, 115, 209, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 65, 75, 148, 243, 255, 255, 255, 255, 255, 255, 255, 248, 54, 8, 65, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 79, 81, 80, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 206, 255, 255, 248, 87, 7, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 79, 81, 81, 79, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 71, 76, 238, 255, 255, 238, 35, 13, 65, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 84, 111, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 120, 238, 255, 255, 255, 255, 255, 255, 245, 35, 42, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 84, 105, 85, 84, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 111, 211, 255, 255, 255, 92, 34, 84, 84, 84, 84, 84, 84, 84, 84, 86, 115, 209, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 65, 75, 148, 243, 255, 255, 255, 255, 255, 255, 255, 255, 235, 20, 13, 65, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 70, 57, 118, 248, 255, 255, 255, 238, 26, 13, 63, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 65, 47, 206, 255, 255, 255, 255, 235, 35, 10, 57, 75, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 79, 70, 70, 80, 80, 80, 80, 80, 80, 80, 80, 84, 111, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 125, 238, 255, 255, 255, 255, 255, 255, 251, 97, 13, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 112, 211, 255, 255, 255, 92, 34, 84, 84, 84, 84, 84, 84, 84, 84, 85, 115, 209, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 65, 75, 148, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 235, 20, 12, 59, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 75, 75, 75, 75, 75, 75, 75, 75, 75, 71, 62, 40, 95, 245, 255, 255, 255, 255, 255, 213, 37, 7, 57, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 59, 40, 139, 251, 255, 255, 255, 255, 255, 238, 87, 7, 19, 57, 71, 75, 79, 79, 79, 79, 79, 75, 75, 65, 36, 12, 59, 80, 80, 80, 80, 80, 80, 80, 80, 83, 111, 236, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 125, 238, 255, 255, 255, 255, 255, 255, 255, 231, 12, 40, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 83, 83, 83, 81, 81, 84, 84, 84, 84, 84, 84, 84, 84, 115, 222, 255, 255, 255, 92, 34, 84, 84, 84, 84, 84, 84, 84, 84, 85, 115, 207, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 27, 65, 65, 65, 65, 65, 65, 65, 65, 65, 75, 148, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 235, 37, 2, 29, 62, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 75, 75, 75, 75, 75, 75, 65, 59, 39, 33, 130, 245, 255, 255, 255, 255, 255, 255, 255, 238, 69, 2, 31, 62, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 62, 34, 45, 196, 251, 255, 255, 248, 231, 236, 241, 232, 208, 117, 18, 2, 13, 29, 39, 41, 39, 39, 34, 19, 18, 18, 54, 16, 59, 80, 80, 80, 80, 80, 80, 80, 80, 83, 114, 242, 255, 255, 48, 42, 81, 81, 81, 81, 81, 81, 81, 81, 84, 125, 238, 255, 255, 255, 255, 255, 255, 255, 251, 135, 7, 39, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 75, 57, 30, 75, 83, 84, 84, 84, 84, 84, 84, 84, 143, 187, 251, 255, 255, 92, 34, 84, 84, 84, 84, 84, 84, 84, 84, 85, 115, 207, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 19, 62, 62, 62, 62, 62, 62, 62, 62, 62, 71, 148, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 137, 20, 6, 19, 39, 59, 65, 70, 71, 71, 71, 71, 71, 71, 71, 65, 65, 59, 41, 29, 24, 69, 210, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 131, 25, 7, 19, 56, 65, 70, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 71, 62, 42, 29, 24, 117, 238, 255, 255, 255, 255, 245, 52, 84, 145, 145, 148, 148, 155, 155, 156, 133, 133, 109, 33, 54, 69, 97, 198, 235, 248, 37, 59, 80, 80, 80, 80, 80, 80, 80, 80, 81, 114, 246, 255, 255, 48, 41, 75, 75, 75, 75, 75, 75, 75, 75, 79, 115, 238, 255, 255, 255, 255, 255, 255, 255, 255, 251, 138, 12, 18, 59, 75, 81, 81, 81, 81, 81, 81, 81, 80, 75, 62, 34, 18, 33, 7, 57, 79, 79, 80, 81, 81, 81, 81, 81, 111, 125, 209, 255, 255, 92, 30, 79, 79, 79, 79, 79, 79, 79, 79, 80, 111, 207, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 54, 7, 12, 12, 12, 12, 12, 12, 12, 12, 12, 17, 100, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 137, 54, 15, 7, 10, 14, 29, 31, 36, 36, 34, 29, 19, 17, 17, 18, 43, 117, 227, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 193, 51, 9, 7, 10, 19, 34, 36, 41, 42, 42, 41, 39, 34, 19, 18, 17, 43, 117, 213, 251, 255, 255, 255, 255, 255, 255, 88, 19, 80, 81, 81, 81, 81, 81, 81, 81, 106, 184, 201, 255, 255, 255, 255, 251, 235, 29, 65, 80, 80, 80, 80, 80, 80, 80, 80, 84, 114, 246, 255, 255, 53, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 60, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 235, 69, 9, 12, 19, 31, 40, 56, 41, 39, 34, 19, 18, 20, 69, 197, 245, 53, 12, 19, 24, 29, 29, 34, 34, 39, 40, 40, 42, 91, 242, 255, 97, 10, 13, 13, 13, 13, 13, 13, 13, 13, 17, 40, 208, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 231, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 213, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 210, 129, 88, 72, 49, 43, 44, 53, 87, 94, 129, 198, 235, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 238, 210, 134, 87, 48, 44, 26, 33, 33, 26, 43, 69, 96, 140, 213, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 140, 7, 65, 75, 79, 79, 79, 79, 79, 79, 79, 127, 192, 224, 232, 236, 226, 182, 91, 62, 79, 79, 80, 80, 80, 80, 80, 80, 80, 81, 124, 248, 255, 255, 227, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 210, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 235, 137, 94, 69, 44, 26, 44, 54, 87, 130, 210, 245, 255, 255, 255, 235, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 210, 246, 255, 235, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 208, 245, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 235, 12, 56, 75, 75, 79, 79, 79, 79, 79, 79, 80, 127, 161, 149, 143, 115, 111, 81, 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, 75, 176, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 88, 8, 65, 75, 75, 79, 79, 79, 79, 79, 79, 79, 79, 81, 81, 80, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, 75, 68, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 238, 23, 19, 71, 75, 75, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 70, 40, 175, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 249, 248, 248, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 249, 248, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 210, 20, 18, 65, 75, 75, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 75, 62, 34, 134, 251, 255, 255, 255, 255, 223, 201, 201, 201, 201, 201, 204, 219, 245, 255, 237, 201, 201, 223, 255, 255, 255, 237, 201, 201, 223, 255, 255, 251, 241, 201, 154, 127, 128, 156, 209, 246, 255, 255, 255, 255, 255, 255, 255, 255, 209, 201, 201, 201, 201, 201, 203, 209, 240, 251, 255, 223, 201, 203, 241, 255, 255, 249, 232, 183, 154, 152, 157, 204, 241, 251, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 213, 35, 6, 36, 70, 75, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 75, 62, 34, 29, 138, 251, 255, 255, 255, 255, 255, 147, 85, 85, 105, 105, 105, 85, 85, 127, 245, 209, 85, 85, 152, 255, 255, 255, 209, 85, 85, 154, 255, 251, 223, 113, 85, 105, 111, 111, 105, 85, 119, 237, 255, 255, 255, 255, 255, 255, 255, 119, 85, 85, 105, 105, 105, 102, 85, 114, 232, 255, 157, 85, 105, 209, 255, 245, 156, 105, 85, 105, 111, 105, 85, 111, 183, 251, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 134, 15, 7, 28, 57, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 71, 59, 39, 19, 18, 94, 235, 255, 255, 255, 255, 255, 255, 255, 152, 85, 102, 179, 223, 209, 125, 85, 102, 207, 209, 85, 85, 154, 255, 255, 255, 209, 85, 85, 154, 255, 236, 111, 85, 111, 200, 241, 236, 169, 105, 111, 167, 251, 255, 255, 255, 255, 255, 255, 120, 85, 85, 204, 223, 223, 156, 105, 85, 158, 251, 157, 85, 105, 209, 249, 167, 85, 85, 127, 226, 236, 209, 114, 85, 105, 223, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 238, 139, 51, 9, 2, 8, 13, 19, 19, 28, 19, 19, 13, 13, 7, 18, 51, 130, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 152, 85, 105, 226, 248, 248, 158, 85, 85, 201, 209, 85, 85, 154, 255, 255, 255, 209, 85, 85, 154, 251, 169, 85, 105, 169, 255, 255, 255, 251, 232, 241, 248, 255, 245, 241, 241, 241, 245, 255, 120, 85, 85, 232, 247, 246, 209, 105, 85, 154, 251, 157, 85, 105, 209, 241, 114, 85, 113, 237, 255, 255, 255, 209, 85, 85, 147, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 213, 170, 99, 88, 87, 69, 89, 130, 137, 193, 211, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 152, 85, 85, 125, 127, 125, 105, 85, 111, 232, 209, 85, 85, 154, 255, 255, 255, 209, 85, 85, 154, 249, 152, 85, 105, 223, 255, 255, 255, 255, 255, 255, 255, 255, 127, 85, 85, 85, 179, 255, 120, 85, 85, 111, 113, 113, 105, 85, 105, 209, 255, 157, 85, 105, 209, 232, 105, 85, 127, 249, 255, 255, 255, 241, 85, 85, 114, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 152, 85, 85, 111, 111, 111, 114, 125, 219, 251, 209, 85, 85, 154, 255, 255, 255, 209, 85, 85, 154, 249, 154, 85, 105, 209, 255, 255, 255, 255, 248, 249, 249, 255, 154, 114, 114, 114, 183, 255, 120, 85, 85, 114, 119, 105, 85, 113, 219, 249, 255, 157, 85, 105, 209, 236, 105, 85, 125, 246, 255, 255, 255, 236, 85, 85, 119, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 152, 85, 105, 219, 241, 241, 243, 251, 255, 255, 222, 105, 85, 125, 245, 251, 248, 158, 85, 85, 169, 255, 207, 85, 85, 125, 245, 251, 251, 236, 114, 125, 154, 251, 248, 245, 245, 245, 248, 255, 120, 85, 85, 237, 247, 127, 85, 105, 222, 251, 255, 157, 85, 105, 209, 245, 125, 85, 105, 204, 251, 251, 248, 157, 85, 102, 169, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 152, 85, 105, 226, 255, 255, 255, 255, 255, 255, 245, 125, 85, 85, 119, 156, 128, 105, 85, 111, 236, 255, 248, 128, 85, 85, 114, 156, 152, 105, 85, 105, 209, 251, 255, 255, 255, 255, 255, 255, 120, 85, 85, 241, 255, 226, 108, 85, 114, 242, 255, 157, 85, 105, 209, 255, 223, 108, 85, 105, 128, 157, 125, 85, 85, 125, 245, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 154, 113, 113, 232, 255, 255, 255, 255, 255, 255, 255, 236, 147, 111, 105, 105, 105, 111, 125, 222, 255, 255, 255, 245, 177, 114, 105, 105, 105, 111, 127, 226, 251, 255, 255, 255, 255, 255, 255, 255, 127, 113, 113, 243, 255, 255, 166, 113, 113, 179, 255, 167, 113, 114, 219, 255, 255, 232, 127, 111, 105, 105, 105, 114, 158, 245, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 237, 236, 236, 245, 255, 255, 255, 255, 255, 255, 255, 251, 241, 236, 236, 243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 237, 236, 240, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(208, 48, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "40 45 54"); + IupSetAttribute(image, "2", "45 50 60"); + IupSetAttribute(image, "3", "48 54 63"); + IupSetAttribute(image, "4", "53 56 63"); + IupSetAttribute(image, "5", "47 53 64"); + IupSetAttribute(image, "6", "48 54 64"); + IupSetAttribute(image, "7", "52 58 67"); + IupSetAttribute(image, "8", "54 61 73"); + IupSetAttribute(image, "9", "56 60 67"); + IupSetAttribute(image, "10", "56 62 74"); + IupSetAttribute(image, "11", "60 64 71"); + IupSetAttribute(image, "12", "60 66 76"); + IupSetAttribute(image, "13", "61 68 81"); + IupSetAttribute(image, "14", "63 72 86"); + IupSetAttribute(image, "15", "65 69 75"); + IupSetAttribute(image, "16", "68 72 78"); + IupSetAttribute(image, "17", "64 70 81"); + IupSetAttribute(image, "18", "68 74 84"); + IupSetAttribute(image, "19", "68 76 91"); + IupSetAttribute(image, "20", "74 78 84"); + IupSetAttribute(image, "21", "73 79 90"); + IupSetAttribute(image, "22", "71 80 95"); + IupSetAttribute(image, "23", "76 80 85"); + IupSetAttribute(image, "24", "77 82 90"); + IupSetAttribute(image, "25", "81 85 92"); + IupSetAttribute(image, "26", "86 89 95"); + IupSetAttribute(image, "27", "71 79 96"); + IupSetAttribute(image, "28", "70 80 96"); + IupSetAttribute(image, "29", "75 84 99"); + IupSetAttribute(image, "30", "77 86 104"); + IupSetAttribute(image, "31", "78 88 106"); + IupSetAttribute(image, "32", "81 86 96"); + IupSetAttribute(image, "33", "85 90 98"); + IupSetAttribute(image, "34", "81 90 108"); + IupSetAttribute(image, "35", "89 93 99"); + IupSetAttribute(image, "36", "83 94 113"); + IupSetAttribute(image, "37", "92 96 101"); + IupSetAttribute(image, "38", "90 96 105"); + IupSetAttribute(image, "39", "86 97 116"); + IupSetAttribute(image, "40", "89 98 115"); + IupSetAttribute(image, "41", "89 100 121"); + IupSetAttribute(image, "42", "92 104 125"); + IupSetAttribute(image, "43", "99 102 107"); + IupSetAttribute(image, "44", "101 105 109"); + IupSetAttribute(image, "45", "97 102 113"); + IupSetAttribute(image, "46", "99 105 116"); + IupSetAttribute(image, "47", "100 109 126"); + IupSetAttribute(image, "48", "104 108 112"); + IupSetAttribute(image, "49", "108 111 115"); + IupSetAttribute(image, "50", "108 111 116"); + IupSetAttribute(image, "51", "110 112 117"); + IupSetAttribute(image, "52", "106 112 123"); + IupSetAttribute(image, "53", "112 115 118"); + IupSetAttribute(image, "54", "113 117 122"); + IupSetAttribute(image, "55", "117 120 124"); + IupSetAttribute(image, "56", "94 106 128"); + IupSetAttribute(image, "57", "97 109 131"); + IupSetAttribute(image, "58", "100 112 134"); + IupSetAttribute(image, "59", "101 114 137"); + IupSetAttribute(image, "60", "107 116 132"); + IupSetAttribute(image, "61", "105 117 138"); + IupSetAttribute(image, "62", "104 117 141"); + IupSetAttribute(image, "63", "106 120 143"); + IupSetAttribute(image, "64", "106 119 144"); + IupSetAttribute(image, "65", "110 123 149"); + IupSetAttribute(image, "66", "105 122 152"); + IupSetAttribute(image, "67", "114 120 131"); + IupSetAttribute(image, "68", "115 124 142"); + IupSetAttribute(image, "69", "122 125 129"); + IupSetAttribute(image, "70", "112 125 150"); + IupSetAttribute(image, "71", "112 126 152"); + IupSetAttribute(image, "72", "125 129 132"); + IupSetAttribute(image, "73", "122 129 141"); + IupSetAttribute(image, "74", "118 129 148"); + IupSetAttribute(image, "75", "115 130 156"); + IupSetAttribute(image, "76", "123 132 148"); + IupSetAttribute(image, "77", "123 134 155"); + IupSetAttribute(image, "78", "124 136 158"); + IupSetAttribute(image, "79", "118 133 160"); + IupSetAttribute(image, "80", "120 134 162"); + IupSetAttribute(image, "81", "122 137 165"); + IupSetAttribute(image, "82", "123 139 168"); + IupSetAttribute(image, "83", "124 139 168"); + IupSetAttribute(image, "84", "125 140 169"); + IupSetAttribute(image, "85", "126 142 172"); + IupSetAttribute(image, "86", "127 144 173"); + IupSetAttribute(image, "87", "129 131 134"); + IupSetAttribute(image, "88", "132 134 138"); + IupSetAttribute(image, "89", "134 136 140"); + IupSetAttribute(image, "90", "133 139 149"); + IupSetAttribute(image, "91", "129 138 155"); + IupSetAttribute(image, "92", "139 142 146"); + IupSetAttribute(image, "93", "136 141 152"); + IupSetAttribute(image, "94", "142 144 147"); + IupSetAttribute(image, "95", "140 145 155"); + IupSetAttribute(image, "96", "144 146 149"); + IupSetAttribute(image, "97", "146 149 153"); + IupSetAttribute(image, "98", "150 154 159"); + IupSetAttribute(image, "99", "153 155 158"); + IupSetAttribute(image, "100", "129 141 163"); + IupSetAttribute(image, "101", "129 143 168"); + IupSetAttribute(image, "102", "128 143 172"); + IupSetAttribute(image, "103", "134 145 165"); + IupSetAttribute(image, "104", "130 144 169"); + IupSetAttribute(image, "105", "128 144 173"); + IupSetAttribute(image, "106", "132 145 169"); + IupSetAttribute(image, "107", "133 147 172"); + IupSetAttribute(image, "108", "133 148 175"); + IupSetAttribute(image, "109", "142 149 163"); + IupSetAttribute(image, "110", "138 150 172"); + IupSetAttribute(image, "111", "132 148 178"); + IupSetAttribute(image, "112", "135 152 182"); + IupSetAttribute(image, "113", "136 151 177"); + IupSetAttribute(image, "114", "139 154 180"); + IupSetAttribute(image, "115", "139 155 186"); + IupSetAttribute(image, "116", "148 157 172"); + IupSetAttribute(image, "117", "154 157 162"); + IupSetAttribute(image, "118", "153 159 169"); + IupSetAttribute(image, "119", "144 158 183"); + IupSetAttribute(image, "120", "144 159 185"); + IupSetAttribute(image, "121", "143 160 188"); + IupSetAttribute(image, "122", "158 160 163"); + IupSetAttribute(image, "123", "156 161 171"); + IupSetAttribute(image, "124", "149 161 181"); + IupSetAttribute(image, "125", "147 161 186"); + IupSetAttribute(image, "126", "155 164 179"); + IupSetAttribute(image, "127", "153 166 188"); + IupSetAttribute(image, "128", "156 168 190"); + IupSetAttribute(image, "129", "161 163 166"); + IupSetAttribute(image, "130", "163 165 168"); + IupSetAttribute(image, "131", "172 173 175"); + IupSetAttribute(image, "132", "166 172 182"); + IupSetAttribute(image, "133", "163 172 187"); + IupSetAttribute(image, "134", "171 174 178"); + IupSetAttribute(image, "135", "174 176 178"); + IupSetAttribute(image, "136", "169 176 190"); + IupSetAttribute(image, "137", "176 178 180"); + IupSetAttribute(image, "138", "180 182 184"); + IupSetAttribute(image, "139", "182 184 186"); + IupSetAttribute(image, "140", "187 188 190"); + IupSetAttribute(image, "141", "142 159 192"); + IupSetAttribute(image, "142", "142 160 192"); + IupSetAttribute(image, "143", "146 163 195"); + IupSetAttribute(image, "144", "149 167 200"); + IupSetAttribute(image, "145", "150 169 202"); + IupSetAttribute(image, "146", "152 166 194"); + IupSetAttribute(image, "147", "156 169 193"); + IupSetAttribute(image, "148", "155 172 203"); + IupSetAttribute(image, "149", "156 174 208"); + IupSetAttribute(image, "150", "158 176 203"); + IupSetAttribute(image, "151", "158 177 209"); + IupSetAttribute(image, "152", "161 172 194"); + IupSetAttribute(image, "153", "161 175 200"); + IupSetAttribute(image, "154", "164 176 196"); + IupSetAttribute(image, "155", "163 178 204"); + IupSetAttribute(image, "156", "170 179 197"); + IupSetAttribute(image, "157", "171 181 201"); + IupSetAttribute(image, "158", "174 184 203"); + IupSetAttribute(image, "159", "162 179 213"); + IupSetAttribute(image, "160", "164 182 216"); + IupSetAttribute(image, "161", "167 184 214"); + IupSetAttribute(image, "162", "166 186 220"); + IupSetAttribute(image, "163", "172 187 211"); + IupSetAttribute(image, "164", "170 188 219"); + IupSetAttribute(image, "165", "182 187 196"); + IupSetAttribute(image, "166", "177 186 202"); + IupSetAttribute(image, "167", "178 186 204"); + IupSetAttribute(image, "168", "178 188 205"); + IupSetAttribute(image, "169", "180 189 205"); + IupSetAttribute(image, "170", "190 191 193"); + IupSetAttribute(image, "171", "184 190 201"); + IupSetAttribute(image, "172", "177 190 211"); + IupSetAttribute(image, "173", "176 191 219"); + IupSetAttribute(image, "174", "172 191 224"); + IupSetAttribute(image, "175", "190 192 196"); + IupSetAttribute(image, "176", "189 194 202"); + IupSetAttribute(image, "177", "181 193 212"); + IupSetAttribute(image, "178", "179 194 220"); + IupSetAttribute(image, "179", "185 194 209"); + IupSetAttribute(image, "180", "186 195 214"); + IupSetAttribute(image, "181", "184 196 214"); + IupSetAttribute(image, "182", "191 198 210"); + IupSetAttribute(image, "183", "190 198 213"); + IupSetAttribute(image, "184", "186 198 218"); + IupSetAttribute(image, "185", "188 199 218"); + IupSetAttribute(image, "186", "190 200 218"); + IupSetAttribute(image, "187", "190 202 221"); + IupSetAttribute(image, "188", "175 194 227"); + IupSetAttribute(image, "189", "180 197 227"); + IupSetAttribute(image, "190", "182 200 230"); + IupSetAttribute(image, "191", "187 202 228"); + IupSetAttribute(image, "192", "189 206 233"); + IupSetAttribute(image, "193", "196 197 198"); + IupSetAttribute(image, "194", "195 197 201"); + IupSetAttribute(image, "195", "193 198 206"); + IupSetAttribute(image, "196", "197 197 200"); + IupSetAttribute(image, "197", "199 200 202"); + IupSetAttribute(image, "198", "204 205 206"); + IupSetAttribute(image, "199", "192 198 208"); + IupSetAttribute(image, "200", "196 201 211"); + IupSetAttribute(image, "201", "194 202 217"); + IupSetAttribute(image, "202", "194 204 222"); + IupSetAttribute(image, "203", "196 203 216"); + IupSetAttribute(image, "204", "198 205 217"); + IupSetAttribute(image, "205", "199 206 221"); + IupSetAttribute(image, "206", "205 206 208"); + IupSetAttribute(image, "207", "201 207 217"); + IupSetAttribute(image, "208", "206 208 212"); + IupSetAttribute(image, "209", "204 209 220"); + IupSetAttribute(image, "210", "210 211 212"); + IupSetAttribute(image, "211", "209 213 219"); + IupSetAttribute(image, "212", "215 217 221"); + IupSetAttribute(image, "213", "218 219 220"); + IupSetAttribute(image, "214", "193 205 227"); + IupSetAttribute(image, "215", "193 206 232"); + IupSetAttribute(image, "216", "199 209 225"); + IupSetAttribute(image, "217", "195 209 234"); + IupSetAttribute(image, "218", "203 210 224"); + IupSetAttribute(image, "219", "207 213 224"); + IupSetAttribute(image, "220", "201 215 236"); + IupSetAttribute(image, "221", "206 216 236"); + IupSetAttribute(image, "222", "208 214 225"); + IupSetAttribute(image, "223", "211 217 227"); + IupSetAttribute(image, "224", "209 219 237"); + IupSetAttribute(image, "225", "217 221 227"); + IupSetAttribute(image, "226", "217 221 230"); + IupSetAttribute(image, "227", "222 223 224"); + IupSetAttribute(image, "228", "216 223 236"); + IupSetAttribute(image, "229", "209 221 240"); + IupSetAttribute(image, "230", "214 224 239"); + IupSetAttribute(image, "231", "222 224 226"); + IupSetAttribute(image, "232", "221 226 234"); + IupSetAttribute(image, "233", "215 226 242"); + IupSetAttribute(image, "234", "218 227 242"); + IupSetAttribute(image, "235", "226 226 227"); + IupSetAttribute(image, "236", "226 229 235"); + IupSetAttribute(image, "237", "230 232 237"); + IupSetAttribute(image, "238", "234 235 236"); + IupSetAttribute(image, "239", "226 231 242"); + IupSetAttribute(image, "240", "229 234 243"); + IupSetAttribute(image, "241", "234 237 241"); + IupSetAttribute(image, "242", "238 240 242"); + IupSetAttribute(image, "243", "238 240 245"); + IupSetAttribute(image, "244", "237 241 249"); + IupSetAttribute(image, "245", "242 243 245"); + IupSetAttribute(image, "246", "244 245 248"); + IupSetAttribute(image, "247", "247 248 249"); + IupSetAttribute(image, "248", "249 249 250"); + IupSetAttribute(image, "249", "250 250 252"); + IupSetAttribute(image, "250", "251 252 252"); + IupSetAttribute(image, "251", "252 252 253"); + IupSetAttribute(image, "252", "0 0 0"); + IupSetAttribute(image, "253", "0 0 0"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + +static Ihandle* load_image_LogoTecgraf8(void) +{ + unsigned char imgdata[] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 232, 220, 237, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 124, 55, 114, 113, 182, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 144, 55, 123, 114, 113, 112, 197, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 236, 54, 113, 120, 114, 113, 112, 111, 242, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 141, 72, 157, 120, 114, 113, 112, 111, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 68, 113, 123, 120, 85, 32, 78, 111, 112, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 211, 72, 157, 120, 164, 246, 27, 15, 86, 107, 223, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 142, 84, 160, 120, 240, 255, 218, 7, 41, 107, 190, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 98, 112, 156, 173, 253, 255, 255, 44, 23, 90, 119, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 71, 154, 123, 222, 255, 255, 255, 140, 22, 74, 90, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 215, 83, 159, 121, 243, 255, 255, 255, 236, 23, 53, 90, 226, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 188, 86, 167, 158, 255, 255, 255, 255, 253, 38, 41, 103, 206, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 142, 90, 168, 186, 255, 255, 255, 255, 255, 97, 39, 107, 183, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 125, 112, 160, 210, 255, 255, 255, 255, 255, 143, 40, 90, 137, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 82, 129, 156, 228, 255, 255, 255, 255, 255, 200, 41, 86, 116, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 63, 163, 123, 241, 255, 255, 255, 255, 255, 231, 42, 86, 90, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 60, 169, 122, 250, 255, 255, 255, 255, 255, 250, 41, 86, 90, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 238, 203, 138, 93, 50, 35, 65, 176, 120, 80, 80, 80, 80, 80, 80, 81, 59, 64, 65, 135, 187, 205, 223, 242, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 253, 243, 207, 147, 104, 61, 55, 59, 41, 10, 1, 3, 72, 175, 122, 155, 120, 113, 111, 90, 86, 83, 77, 74, 72, 71, 65, 65, 64, 63, 71, 109, 148, 212, 243, 253, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 243, 187, 98, 56, 55, 63, 90, 154, 168, 185, 184, 21, 1, 4, 74, 176, 120, 90, 86, 77, 72, 63, 59, 55, 52, 51, 41, 36, 33, 32, 32, 36, 43, 56, 64, 65, 71, 109, 193, 242, 255, 255, 255, 255, + 255, 255, 243, 135, 59, 55, 56, 84, 157, 185, 172, 168, 157, 131, 136, 49, 94, 92, 72, 176, 165, 233, 236, 235, 234, 234, 232, 219, 73, 55, 56, 95, 96, 47, 25, 16, 12, 9, 13, 29, 55, 72, 72, 74, 148, 243, 255, 255, + 255, 220, 70, 56, 57, 59, 123, 171, 160, 161, 194, 214, 237, 252, 255, 255, 255, 195, 71, 169, 181, 255, 255, 255, 255, 255, 255, 255, 126, 90, 120, 214, 255, 255, 251, 233, 151, 69, 18, 1, 3, 26, 71, 75, 77, 85, 226, 255, + 250, 58, 57, 59, 59, 107, 155, 181, 226, 253, 255, 255, 255, 255, 255, 255, 255, 192, 64, 166, 181, 255, 255, 255, 255, 255, 255, 255, 130, 107, 120, 217, 255, 255, 255, 255, 255, 255, 253, 202, 45, 2, 30, 77, 78, 78, 106, 251, + 227, 34, 59, 59, 59, 87, 225, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 152, 62, 157, 194, 255, 255, 255, 255, 255, 255, 255, 132, 111, 123, 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 199, 30, 83, 83, 83, 91, 234, + 231, 9, 52, 59, 59, 63, 205, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 152, 59, 154, 194, 255, 255, 255, 255, 255, 255, 255, 134, 113, 155, 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 214, 84, 84, 84, 90, 122, 229, + 250, 20, 5, 31, 59, 62, 63, 109, 214, 250, 255, 255, 255, 255, 255, 255, 255, 153, 55, 123, 181, 255, 255, 255, 255, 255, 255, 255, 135, 120, 158, 217, 255, 255, 255, 255, 255, 255, 250, 223, 136, 85, 86, 86, 123, 156, 108, 250, + 255, 221, 18, 1, 8, 29, 52, 63, 64, 76, 133, 198, 229, 250, 255, 255, 255, 192, 52, 120, 178, 255, 255, 255, 255, 255, 255, 255, 135, 131, 131, 214, 255, 255, 250, 234, 209, 174, 102, 86, 86, 113, 157, 167, 122, 115, 226, 255, + 255, 255, 245, 93, 6, 1, 3, 12, 26, 41, 59, 65, 71, 74, 105, 133, 179, 130, 59, 90, 136, 234, 235, 242, 242, 234, 234, 226, 110, 112, 107, 136, 145, 118, 87, 86, 90, 117, 156, 160, 168, 159, 123, 112, 179, 246, 255, 255, + 255, 255, 255, 255, 245, 139, 35, 5, 1, 1, 5, 12, 23, 31, 41, 54, 63, 72, 77, 78, 83, 83, 84, 84, 86, 86, 86, 90, 107, 117, 131, 162, 165, 175, 176, 177, 170, 157, 122, 120, 112, 136, 205, 245, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 245, 199, 100, 37, 14, 5, 7, 11, 16, 19, 24, 29, 32, 40, 43, 52, 55, 62, 65, 74, 83, 86, 88, 88, 87, 90, 91, 90, 86, 101, 133, 187, 213, 245, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 216, 153, 139, 100, 69, 22, 26, 30, 47, 48, 48, 48, 58, 67, 79, 52, 71, 55, 130, 188, 201, 221, 245, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 30, 63, 114, 249, 255, 255, 255, 255, 255, 249, 90, 184, 86, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 30, 52, 120, 240, 255, 255, 255, 255, 255, 232, 113, 171, 87, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 46, 40, 120, 224, 255, 255, 255, 255, 255, 213, 122, 160, 109, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 66, 30, 113, 206, 255, 255, 255, 255, 255, 193, 123, 157, 136, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 99, 26, 107, 180, 255, 255, 255, 255, 255, 146, 154, 120, 179, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 149, 22, 77, 128, 253, 255, 255, 255, 253, 109, 159, 103, 206, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 213, 16, 52, 112, 242, 255, 255, 255, 235, 107, 160, 86, 226, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 15, 32, 112, 208, 255, 255, 255, 196, 113, 156, 86, 249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 28, 17, 107, 131, 253, 255, 253, 110, 122, 112, 118, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 99, 7, 75, 111, 230, 255, 221, 85, 155, 86, 182, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 2, 40, 107, 131, 244, 105, 112, 111, 86, 224, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 14, 16, 91, 107, 107, 91, 111, 86, 106, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 99, 2, 59, 107, 90, 90, 89, 86, 189, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 236, 7, 22, 90, 90, 90, 87, 90, 242, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 127, 2, 41, 90, 90, 87, 191, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 92, 7, 39, 72, 150, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 221, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + + Ihandle* image = IupImage(48, 48, imgdata); + + IupSetAttribute(image, "0", "0 0 0"); + IupSetAttribute(image, "1", "26 30 36"); + IupSetAttribute(image, "2", "27 32 38"); + IupSetAttribute(image, "3", "29 33 40"); + IupSetAttribute(image, "4", "31 36 43"); + IupSetAttribute(image, "5", "33 37 44"); + IupSetAttribute(image, "6", "38 41 47"); + IupSetAttribute(image, "7", "37 41 49"); + IupSetAttribute(image, "8", "39 45 54"); + IupSetAttribute(image, "9", "40 45 54"); + IupSetAttribute(image, "10", "43 49 58"); + IupSetAttribute(image, "11", "44 49 59"); + IupSetAttribute(image, "12", "44 50 60"); + IupSetAttribute(image, "13", "47 53 63"); + IupSetAttribute(image, "14", "53 56 62"); + IupSetAttribute(image, "15", "49 54 64"); + IupSetAttribute(image, "16", "50 56 68"); + IupSetAttribute(image, "17", "55 62 75"); + IupSetAttribute(image, "18", "56 60 65"); + IupSetAttribute(image, "19", "56 63 76"); + IupSetAttribute(image, "20", "62 66 70"); + IupSetAttribute(image, "21", "57 64 75"); + IupSetAttribute(image, "22", "58 65 78"); + IupSetAttribute(image, "23", "61 69 83"); + IupSetAttribute(image, "24", "63 71 86"); + IupSetAttribute(image, "25", "69 75 86"); + IupSetAttribute(image, "26", "67 75 91"); + IupSetAttribute(image, "27", "83 86 91"); + IupSetAttribute(image, "28", "83 87 93"); + IupSetAttribute(image, "29", "71 80 96"); + IupSetAttribute(image, "30", "75 83 100"); + IupSetAttribute(image, "31", "77 86 104"); + IupSetAttribute(image, "32", "78 88 106"); + IupSetAttribute(image, "33", "79 89 108"); + IupSetAttribute(image, "34", "81 92 110"); + IupSetAttribute(image, "35", "89 92 96"); + IupSetAttribute(image, "36", "83 94 113"); + IupSetAttribute(image, "37", "95 98 102"); + IupSetAttribute(image, "38", "92 98 109"); + IupSetAttribute(image, "39", "85 96 115"); + IupSetAttribute(image, "40", "86 96 116"); + IupSetAttribute(image, "41", "90 101 121"); + IupSetAttribute(image, "42", "91 103 124"); + IupSetAttribute(image, "43", "92 103 124"); + IupSetAttribute(image, "44", "96 100 107"); + IupSetAttribute(image, "45", "103 106 110"); + IupSetAttribute(image, "46", "96 102 112"); + IupSetAttribute(image, "47", "99 105 117"); + IupSetAttribute(image, "48", "100 108 122"); + IupSetAttribute(image, "49", "110 113 117"); + IupSetAttribute(image, "50", "113 115 119"); + IupSetAttribute(image, "51", "94 106 128"); + IupSetAttribute(image, "52", "97 109 132"); + IupSetAttribute(image, "53", "99 112 135"); + IupSetAttribute(image, "54", "101 112 135"); + IupSetAttribute(image, "55", "101 114 137"); + IupSetAttribute(image, "56", "103 116 139"); + IupSetAttribute(image, "57", "103 116 140"); + IupSetAttribute(image, "58", "108 117 134"); + IupSetAttribute(image, "59", "104 117 141"); + IupSetAttribute(image, "60", "107 120 143"); + IupSetAttribute(image, "61", "109 120 143"); + IupSetAttribute(image, "62", "107 120 144"); + IupSetAttribute(image, "63", "108 121 146"); + IupSetAttribute(image, "64", "109 122 148"); + IupSetAttribute(image, "65", "110 124 149"); + IupSetAttribute(image, "66", "115 120 128"); + IupSetAttribute(image, "67", "113 121 137"); + IupSetAttribute(image, "68", "112 122 143"); + IupSetAttribute(image, "69", "123 126 132"); + IupSetAttribute(image, "70", "112 123 145"); + IupSetAttribute(image, "71", "112 125 150"); + IupSetAttribute(image, "72", "112 126 152"); + IupSetAttribute(image, "73", "122 129 142"); + IupSetAttribute(image, "74", "114 128 154"); + IupSetAttribute(image, "75", "115 129 156"); + IupSetAttribute(image, "76", "118 130 154"); + IupSetAttribute(image, "77", "116 130 157"); + IupSetAttribute(image, "78", "117 132 158"); + IupSetAttribute(image, "79", "122 131 146"); + IupSetAttribute(image, "80", "120 132 153"); + IupSetAttribute(image, "81", "124 134 156"); + IupSetAttribute(image, "82", "126 137 155"); + IupSetAttribute(image, "83", "118 133 160"); + IupSetAttribute(image, "84", "120 134 162"); + IupSetAttribute(image, "85", "122 136 162"); + IupSetAttribute(image, "86", "122 137 165"); + IupSetAttribute(image, "87", "124 139 166"); + IupSetAttribute(image, "88", "125 140 166"); + IupSetAttribute(image, "89", "124 139 168"); + IupSetAttribute(image, "90", "125 141 170"); + IupSetAttribute(image, "91", "127 142 172"); + IupSetAttribute(image, "92", "131 133 137"); + IupSetAttribute(image, "93", "133 136 139"); + IupSetAttribute(image, "94", "136 139 142"); + IupSetAttribute(image, "95", "129 136 147"); + IupSetAttribute(image, "96", "133 137 145"); + IupSetAttribute(image, "97", "134 139 148"); + IupSetAttribute(image, "98", "129 139 157"); + IupSetAttribute(image, "99", "139 141 145"); + IupSetAttribute(image, "100", "142 144 148"); + IupSetAttribute(image, "101", "130 143 167"); + IupSetAttribute(image, "102", "129 143 169"); + IupSetAttribute(image, "103", "128 143 173"); + IupSetAttribute(image, "104", "134 144 162"); + IupSetAttribute(image, "105", "133 145 165"); + IupSetAttribute(image, "106", "130 144 170"); + IupSetAttribute(image, "107", "128 144 173"); + IupSetAttribute(image, "108", "134 148 173"); + IupSetAttribute(image, "109", "137 148 170"); + IupSetAttribute(image, "110", "143 153 174"); + IupSetAttribute(image, "111", "130 146 176"); + IupSetAttribute(image, "112", "132 148 177"); + IupSetAttribute(image, "113", "133 150 180"); + IupSetAttribute(image, "114", "135 152 182"); + IupSetAttribute(image, "115", "137 150 176"); + IupSetAttribute(image, "116", "139 152 178"); + IupSetAttribute(image, "117", "136 152 182"); + IupSetAttribute(image, "118", "141 153 176"); + IupSetAttribute(image, "119", "142 157 181"); + IupSetAttribute(image, "120", "137 153 185"); + IupSetAttribute(image, "121", "139 156 187"); + IupSetAttribute(image, "122", "139 156 188"); + IupSetAttribute(image, "123", "140 157 189"); + IupSetAttribute(image, "124", "145 151 163"); + IupSetAttribute(image, "125", "144 152 167"); + IupSetAttribute(image, "126", "150 158 171"); + IupSetAttribute(image, "127", "156 158 160"); + IupSetAttribute(image, "128", "144 158 186"); + IupSetAttribute(image, "129", "143 160 188"); + IupSetAttribute(image, "130", "154 161 174"); + IupSetAttribute(image, "131", "146 161 188"); + IupSetAttribute(image, "132", "154 162 176"); + IupSetAttribute(image, "133", "152 162 180"); + IupSetAttribute(image, "134", "156 163 178"); + IupSetAttribute(image, "135", "157 166 181"); + IupSetAttribute(image, "136", "153 165 186"); + IupSetAttribute(image, "137", "157 168 190"); + IupSetAttribute(image, "138", "162 164 166"); + IupSetAttribute(image, "139", "164 166 168"); + IupSetAttribute(image, "140", "169 171 175"); + IupSetAttribute(image, "141", "161 167 178"); + IupSetAttribute(image, "142", "163 169 180"); + IupSetAttribute(image, "143", "167 170 176"); + IupSetAttribute(image, "144", "167 172 181"); + IupSetAttribute(image, "145", "161 171 190"); + IupSetAttribute(image, "146", "163 172 188"); + IupSetAttribute(image, "147", "165 172 186"); + IupSetAttribute(image, "148", "166 174 190"); + IupSetAttribute(image, "149", "171 173 176"); + IupSetAttribute(image, "150", "169 177 191"); + IupSetAttribute(image, "151", "180 181 183"); + IupSetAttribute(image, "152", "183 186 190"); + IupSetAttribute(image, "153", "185 186 189"); + IupSetAttribute(image, "154", "142 160 193"); + IupSetAttribute(image, "155", "144 161 193"); + IupSetAttribute(image, "156", "145 162 196"); + IupSetAttribute(image, "157", "146 164 197"); + IupSetAttribute(image, "158", "148 164 193"); + IupSetAttribute(image, "159", "148 166 201"); + IupSetAttribute(image, "160", "150 168 202"); + IupSetAttribute(image, "161", "152 167 196"); + IupSetAttribute(image, "162", "153 168 193"); + IupSetAttribute(image, "163", "152 169 196"); + IupSetAttribute(image, "164", "158 171 196"); + IupSetAttribute(image, "165", "158 172 197"); + IupSetAttribute(image, "166", "154 171 200"); + IupSetAttribute(image, "167", "152 170 205"); + IupSetAttribute(image, "168", "153 172 207"); + IupSetAttribute(image, "169", "158 173 200"); + IupSetAttribute(image, "170", "157 175 205"); + IupSetAttribute(image, "171", "154 174 208"); + IupSetAttribute(image, "172", "157 176 212"); + IupSetAttribute(image, "173", "162 175 199"); + IupSetAttribute(image, "174", "165 175 193"); + IupSetAttribute(image, "175", "160 175 201"); + IupSetAttribute(image, "176", "160 176 202"); + IupSetAttribute(image, "177", "162 178 207"); + IupSetAttribute(image, "178", "167 180 202"); + IupSetAttribute(image, "179", "172 181 196"); + IupSetAttribute(image, "180", "168 179 201"); + IupSetAttribute(image, "181", "169 181 204"); + IupSetAttribute(image, "182", "173 183 201"); + IupSetAttribute(image, "183", "174 184 201"); + IupSetAttribute(image, "184", "162 181 213"); + IupSetAttribute(image, "185", "160 180 216"); + IupSetAttribute(image, "186", "175 186 208"); + IupSetAttribute(image, "187", "178 184 196"); + IupSetAttribute(image, "188", "182 187 194"); + IupSetAttribute(image, "189", "177 185 201"); + IupSetAttribute(image, "190", "177 186 204"); + IupSetAttribute(image, "191", "183 190 204"); + IupSetAttribute(image, "192", "188 190 194"); + IupSetAttribute(image, "193", "184 191 202"); + IupSetAttribute(image, "194", "179 190 209"); + IupSetAttribute(image, "195", "191 193 197"); + IupSetAttribute(image, "196", "191 196 205"); + IupSetAttribute(image, "197", "184 193 210"); + IupSetAttribute(image, "198", "191 197 208"); + IupSetAttribute(image, "199", "192 193 195"); + IupSetAttribute(image, "200", "198 200 203"); + IupSetAttribute(image, "201", "198 201 206"); + IupSetAttribute(image, "202", "201 202 203"); + IupSetAttribute(image, "203", "201 203 207"); + IupSetAttribute(image, "204", "203 204 205"); + IupSetAttribute(image, "205", "193 198 209"); + IupSetAttribute(image, "206", "193 201 214"); + IupSetAttribute(image, "207", "199 204 212"); + IupSetAttribute(image, "208", "194 202 216"); + IupSetAttribute(image, "209", "199 204 216"); + IupSetAttribute(image, "210", "198 206 221"); + IupSetAttribute(image, "211", "205 207 211"); + IupSetAttribute(image, "212", "202 207 216"); + IupSetAttribute(image, "213", "206 208 212"); + IupSetAttribute(image, "214", "204 210 219"); + IupSetAttribute(image, "215", "211 212 215"); + IupSetAttribute(image, "216", "213 213 215"); + IupSetAttribute(image, "217", "209 214 223"); + IupSetAttribute(image, "218", "214 215 216"); + IupSetAttribute(image, "219", "215 216 218"); + IupSetAttribute(image, "220", "214 216 221"); + IupSetAttribute(image, "221", "217 218 221"); + IupSetAttribute(image, "222", "203 210 224"); + IupSetAttribute(image, "223", "213 217 225"); + IupSetAttribute(image, "224", "213 218 228"); + IupSetAttribute(image, "225", "215 220 230"); + IupSetAttribute(image, "226", "217 221 228"); + IupSetAttribute(image, "227", "222 223 224"); + IupSetAttribute(image, "228", "217 223 233"); + IupSetAttribute(image, "229", "222 225 230"); + IupSetAttribute(image, "230", "221 225 233"); + IupSetAttribute(image, "231", "225 225 226"); + IupSetAttribute(image, "232", "225 226 228"); + IupSetAttribute(image, "233", "227 228 229"); + IupSetAttribute(image, "234", "227 229 234"); + IupSetAttribute(image, "235", "230 232 234"); + IupSetAttribute(image, "236", "232 233 234"); + IupSetAttribute(image, "237", "232 234 237"); + IupSetAttribute(image, "238", "235 236 238"); + IupSetAttribute(image, "239", "237 237 238"); + IupSetAttribute(image, "240", "230 233 240"); + IupSetAttribute(image, "241", "232 235 241"); + IupSetAttribute(image, "242", "234 236 240"); + IupSetAttribute(image, "243", "236 238 241"); + IupSetAttribute(image, "244", "239 241 244"); + IupSetAttribute(image, "245", "241 242 242"); + IupSetAttribute(image, "246", "241 242 244"); + IupSetAttribute(image, "247", "243 244 244"); + IupSetAttribute(image, "248", "245 245 246"); + IupSetAttribute(image, "249", "245 246 248"); + IupSetAttribute(image, "250", "249 249 250"); + IupSetAttribute(image, "251", "250 251 252"); + IupSetAttribute(image, "252", "251 252 252"); + IupSetAttribute(image, "253", "253 253 253"); + IupSetAttribute(image, "254", "0 0 0"); + IupSetAttribute(image, "255", "BGCOLOR"); + + return image; +} + diff --git a/iup/srcimglib/iupimglib.def b/iup/srcimglib/iupimglib.def new file mode 100755 index 0000000..e5e6063 --- /dev/null +++ b/iup/srcimglib/iupimglib.def @@ -0,0 +1,4 @@ +EXPORTS + IupImageLibOpen + iupImageLibLoadAll + \ No newline at end of file diff --git a/iup/srcimglib/iupimglib.dep b/iup/srcimglib/iupimglib.dep new file mode 100644 index 0000000..6029a95 --- /dev/null +++ b/iup/srcimglib/iupimglib.dep @@ -0,0 +1,5 @@ +$(OBJDIR)/iup_image_library.o: iup_image_library.c ../include/iup.h \ + ../include/iupkey.h ../include/iupdef.h ../src/iup_str.h \ + ../src/iup_image.h iup_imglib_bitmaps8.h iup_imglib_bitmapsgtk.h \ + iup_imglib_icons8.h iup_imglib_logos8.h iup_imglib_icons.h \ + iup_imglib_logos.h diff --git a/iup/srcimglib/make_uname b/iup/srcimglib/make_uname new file mode 100755 index 0000000..cc4b881 --- /dev/null +++ b/iup/srcimglib/make_uname @@ -0,0 +1,3 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake $1 $2 $3 $4 $5 $6 $7 diff --git a/iup/srcimglib/make_uname.bat b/iup/srcimglib/make_uname.bat new file mode 100755 index 0000000..f0a0722 --- /dev/null +++ b/iup/srcimglib/make_uname.bat @@ -0,0 +1,4 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +call tecmake %1 %2 %3 %4 %5 %6 diff --git a/iup/srcledc/Makefile b/iup/srcledc/Makefile new file mode 100755 index 0000000..8854269 --- /dev/null +++ b/iup/srcledc/Makefile @@ -0,0 +1,6 @@ + +.PHONY: do_all ledc +do_all: ledc + +ledc: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak diff --git a/iup/srcledc/config.mak b/iup/srcledc/config.mak new file mode 100755 index 0000000..670881e --- /dev/null +++ b/iup/srcledc/config.mak @@ -0,0 +1,22 @@ +PROJNAME = iup +APPNAME = ledc +APPTYPE = console +OPT = YES + +#y.tab.c y.tab.h : ledc.y +# yacc -dv ledc.y + +#lex.yy.c : ledc.l +# lex ledc.l + +INCLUDES = . + +SRC = lex.yy.c y.tab.c ledc.c + +ifeq ($(TEC_UNAME), vc8) + ifdef DBG + #debug info not working for vc8 linker + define DBG + endef + endif +endif diff --git a/iup/srcledc/ledc b/iup/srcledc/ledc new file mode 100755 index 0000000..69531fb --- /dev/null +++ b/iup/srcledc/ledc @@ -0,0 +1,6 @@ +#!/bin/csh +# Script generated automatically by tecmake v3.19 +# Remove the comment bellow to set the LD_LIBRARY_PATH if needed. +#setenv LD_LIBRARY_PATH /lib/${TEC_UNAME}:/lib/${TEC_UNAME}:$LD_LIBRARY_PATH +if ( -r app.env ) source app.env +exec ../bin/$TEC_UNAME/ledc $* diff --git a/iup/srcledc/ledc.bat b/iup/srcledc/ledc.bat new file mode 100644 index 0000000..44bca28 --- /dev/null +++ b/iup/srcledc/ledc.bat @@ -0,0 +1,3 @@ +@echo off +REM Script generated automatically by tecmake v3.20 +..\bin\Win64\ledc.exe %* diff --git a/iup/srcledc/ledc.c b/iup/srcledc/ledc.c new file mode 100755 index 0000000..9429474 --- /dev/null +++ b/iup/srcledc/ledc.c @@ -0,0 +1,920 @@ +/** \file + * \brief LED to C converter + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include +#include +#include +#include + +#include "ledc.h" + +#define alloc(type) ((type*)malloc(sizeof(type))) + +#define IMAGE 0 +#define COLOR 1 + +static FILE* outfile = NULL; + +char *filename; +char *outname = 0; +char *funcname = 0; +int nocode = 0; + +static long vetsizepos; + +typedef struct { + char* name; + int used; +} Tname; + +static Tlist* all_names; +static Tlist* all_elems; +static Tlist* all_images; + +static Tlist* all_named; +static Tlist* all_late; + +static int nerrors = 0; + +struct { + char* name; + int used; +} headerfile[] = { + { "iup", 1 }, + { "iupdial", 0 }, + { "iupgauge", 0 }, + { "iupmatrix", 0 }, + { "iupgl", 0 }, + { "iuptree", 0 }, + { "iupcolorbar",0 }, + { "iupcb", 0 }, + { "iupcells", 0 }, + { "iupole", 0 }, + { "iupspin", 0 }, + { "iup_pplot", 0 } +}; +#define nheaders (sizeof(headerfile)/sizeof(headerfile[0])) + +enum headers { + IUP_H, + IUPCONTROLS_H, + IUPGL_H, + IUPOLE_H, + IUPPPLOT_H +}; + +static void check_empty( Telem* elem ); +static void check_image( Telem* elem ); +static void check_imagergb( Telem* elem ); +static void check_imagergba( Telem* elem ); +static void check_string( Telem* elem ); +static void check_cb( Telem* elem ); +static void check_elem( Telem* elem ); +static void check_elemlist( Telem* elem ); +static void check_string_cb( Telem* elem ); +static void check_string_elem( Telem* elem ); +static void check_iupCpi( Telem* elem ); +static void code_image( Telem* elem ); +static void code_iupCpi( Telem* elem ); + +static void code_empty( Telem* elem ); +static void code_string( Telem* elem ); +static void code_string_cb( Telem* elem ); +static void code_elem( Telem* elem ); +static void code_elemlist( Telem* elem ); +static void code_string_elem( Telem* elem ); + +typedef void(*function)(Telem*); + +static struct { + char* name; + void (*code)(Telem*); + void (*check)(Telem*); + int header; +} +elems[] = +{ + { "Image", code_image, check_image, 0 }, + { "ImageRGB", code_image, check_imagergb, 0 }, + { "ImageRGBA", code_image, check_imagergba, 0 }, + { "User", code_empty, check_empty, 0 }, + { "Button", code_string_cb, check_string_cb, 0 }, + { "Canvas", code_string, check_cb, 0 }, + { "Colorbar", code_empty, check_empty, IUPCONTROLS_H }, + { "ColorBrowser", code_empty, check_empty, IUPCONTROLS_H }, + { "Dial", code_string, check_string, IUPCONTROLS_H }, + { "Dialog", code_elem, check_elem, 0 }, + { "Fill", code_empty, check_empty, 0 }, + { "FileDlg", code_empty, check_empty, 0 }, + { "MessageDlg", code_empty, check_empty, 0 }, + { "ColorDlg", code_empty, check_empty, 0 }, + { "FontDlg", code_empty, check_empty, 0 }, + { "ProgressBar", code_empty, check_empty, 0 }, + { "Frame", code_elem, check_elem, 0 }, + { "Gauge", code_empty, check_empty, IUPCONTROLS_H }, + { "GLCanvas", code_string, check_cb, IUPGL_H }, + { "Hbox", code_elemlist, check_elemlist, 0 }, + { "Item", code_string_cb, check_string_cb, 0 }, + { "Label", code_string, check_string, 0 }, + { "List", code_string, check_cb, 0 }, + { "Matrix", code_string, check_cb, IUPCONTROLS_H }, + { "Sbox", code_elem, check_elem, 0 }, + { "Menu", code_elemlist, check_elemlist, 0 }, + { "MultiLine", code_string, check_cb, 0 }, + { "Radio", code_elem, check_elem, 0 }, + { "Separator", code_empty, check_empty, 0 }, + { "Submenu", code_string_elem, check_string_elem, 0 }, + { "Text", code_string, check_cb, 0 }, + { "Val", code_string, check_string, 0 }, + { "Tree", code_empty, check_empty, 0 }, + { "Tabs", code_elemlist, check_elemlist, 0 }, + { "Toggle", code_string_cb, check_string_cb, 0 }, + { "Vbox", code_elemlist, check_elemlist, 0 }, + { "Zbox", code_elemlist, check_elemlist, 0 }, + { "OleControl", code_string, check_cb, IUPOLE_H }, + { "Cbox", code_elemlist, check_elemlist, 0 }, + { "Cells", code_empty, check_empty, IUPCONTROLS_H }, + { "Spin", code_empty, check_empty, 0 }, + { "Spinbox", code_elem, check_elem, 0 }, + { "PPlot", code_empty, check_empty, IUPPPLOT_H }, + { "@@@", code_iupCpi, check_iupCpi, 0 } +}; +#define nelems (sizeof(elems)/sizeof(elems[0])) + +static int mystricmp(char *s1, char *s2) +{ + int i = 0; + if (s1 == s2) return 0; + while (s1[i] && s2[i] && tolower(s1[i])==tolower(s2[i])) i++; + if (s1[i] == s2[i]) return 0; + else if (s1[i]name = name; + n->used = 0; + addlist( all_names, n ); +} + +void use( char* name ) +{ + Telemlist* p = all_names->first; + if (!name) return; + while (p) + { + Tname* n = (Tname*)p->data; + + if (!strcmp(name,n->name)) + { + if (n->used) error("element '%s' already used in line %d", name, n->used ); + else n->used = yylineno; + break; + } + p = p->next; + } +} + +static int iselem( char* name ) +{ + Telemlist* p = all_names->first; + while (p) + { + Tname* n = (Tname*)p->data; + if (!strcmp(name,n->name)) return 1; + p = p->next; + } + return 0; +} + +static int verify_nparams( int min, int max, Telem* elem ) +{ + if (min!=-1 && elem->nparams < min ) + { + error("too few arguments for %s", elem->elemname ); + return 0; + } + if (max!=-1 && elem->nparams >max ) + { + error("too many arguments for %s", elem->elemname ); + return 0; + } + return 1; +} + +static void param_elem( Tparam* p[], int n ) +{ + switch (p[n-1]->tag) + { + case ELEM_PARAM: + if (p[n-1]->data.elem->elemidx == IMAGE || + p[n-1]->data.elem->elemidx == COLOR ) + error( "%s is not a valid child", p[n-1]->data.elem->elemname ); + break; + case NAME_PARAM: + if (!iselem(p[n-1]->data.name)) + { + warning( "undeclared control '%s' (argument #%d)", p[n-1]->data.name, n ); + } + else + { + use( p[n-1]->data.name ); + } + break; + case STRING_PARAM: + error( "control expected (argument #%d)", n ); + break; + } +} + +static void param_string( Tparam* p[], int n ) +{ + switch (p[n-1]->tag) + { + case ELEM_PARAM: + error( "string expected (argument #%d)", n ); + break; + case NAME_PARAM: + warning( "string expected (argument #%d)", n ); + break; + case STRING_PARAM: + break; + } +} + +static void param_number( Tparam* p[], int n ) +{ + switch (p[n-1]->tag) + { + case ELEM_PARAM: + error( "number expected (argument #%d)", n ); + break; + case NAME_PARAM: + break; + case STRING_PARAM: + error( "number expected (argument #%d)", n ); + break; + } +} + +static void param_callback( Tparam* p[], int n ) +{ + switch (p[n-1]->tag) + { + case ELEM_PARAM: + error( "callback expected (argument #%d)", n ); + break; + case NAME_PARAM: + break; + case STRING_PARAM: + warning( "callback expected (argument #%d)", n ); + break; + } +} + +/****************************************************************/ + +static void check_empty( Telem* elem ) +{ + verify_nparams( 0, 0, elem ); +} + +static void check_image( Telem* elem ) +{ + int i, w, h, size; + if (!verify_nparams( 2, -1, elem )) return; + param_number( elem->params, 1 ); + param_number( elem->params, 2 ); + w = atoi( elem->params[0]->data.name ); + h = atoi( elem->params[1]->data.name ); + size = w*h; + if (!verify_nparams( size+2, size+2, elem )) return; + for (i=0; iparams, i+3 ); + + elem->data.image.w = w; + elem->data.image.h = h; +} + +static void check_imagergb( Telem* elem ) +{ + int i, w, h, size; + if (!verify_nparams( 2, -1, elem )) return; + param_number( elem->params, 1 ); + param_number( elem->params, 2 ); + w = atoi( elem->params[0]->data.name ); + h = atoi( elem->params[1]->data.name ); + size = w*h*3; + if (!verify_nparams( size+2, size+2, elem )) return; + for (i=0; iparams, i+3 ); + + elem->data.image.w = w; + elem->data.image.h = h; +} + +static void check_imagergba( Telem* elem ) +{ + int i, w, h, size; + if (!verify_nparams( 2, -1, elem )) return; + param_number( elem->params, 1 ); + param_number( elem->params, 2 ); + w = atoi( elem->params[0]->data.name ); + h = atoi( elem->params[1]->data.name ); + size = w*h*4; + if (!verify_nparams( size+2, size+2, elem )) return; + for (i=0; iparams, i+3 ); + + elem->data.image.w = w; + elem->data.image.h = h; +} + +static void check_string( Telem* elem ) +{ + if (!verify_nparams( 1, 1, elem )) return; + param_string( elem->params, 1 ); +} + +static void check_cb( Telem* elem ) +{ + if (!verify_nparams( 1, 1, elem )) return; + param_callback( elem->params, 1 ); +} + +static void check_elem( Telem* elem ) +{ + if (!verify_nparams( 1, 1, elem )) return; + param_elem( elem->params, 1 ); +} + +static void check_elemlist( Telem* elem ) +{ + int i; + if (!verify_nparams( 1, -1, elem )) return; + for (i=0; inparams; i++) + param_elem( elem->params, i+1 ); +} + +static void check_string_cb( Telem* elem ) +{ + if (!verify_nparams( 2, 2, elem )) return; + param_string( elem->params, 1 ); + param_callback( elem->params, 2 ); +} + +static void check_string_elem( Telem* elem ) +{ + if (!verify_nparams( 2, 2, elem )) return; + param_string( elem->params, 1 ); + param_elem( elem->params, 2 ); +} + +static void check_iupCpi( Telem* elem ) +{ + warning( "Unknown control %s used", elem->elemname ); +} + +/****************************************************************/ + +static int indentcol = 0; +static int nameds = 0; + +static void indent(void) { indentcol++; } +static void unindent(void) { indentcol--; } + +static void codeindent(void) +{ + int i; + for (i=0; iname) + { + sprintf( name, "named[%d]", nameds++ ); + e->codename = strdup( name ); + addlist( all_named, e ); + addlist( all_late, e ); + } + else + { + e->codename = 0; + } +} + +static int codename( Telem* elem ) +{ + if (elem->elemidx == IMAGE || + elem->elemidx == COLOR ) + { + return 0; + } + + if (elem->name && elem->codename) + { + fprintf( outfile, "%s", elem->codename ); + return 1; + } + else + return 0; +} + +static void codeelemname( Telem *elem ) +{ + if (elem->elemidx < nelems-1) + fprintf( outfile, "Iup%s", elems[elem->elemidx].name ); + else + { + fprintf( outfile, "Iup%c%s", toupper(elem->elemname[0]), elem->elemname+1 ); + } +} + +static void code_attrs( Telem* elem ) +{ + fprintf( outfile, ", " ); + if (elem->attrs) + { + Telemlist *p = elem->attrs->first; + indent(); + while (p) + { + fprintf( outfile, "\n" ); + codeindent(); + fprintf( outfile, "\"%s\", \"%s\", ", + ((Tattr*)(p->data))->name, ((Tattr*)(p->data))->value ); + p = p ->next; + } + unindent(); + } + fprintf( outfile, "NULL )" ); +} + +static void code_start( Telem* elem ) +{ + codeindent(); + if (elem->name && elem->elemidx != IMAGE && elem->elemidx != COLOR) + generatename( elem ); + if ( codename( elem ) ) + fprintf( outfile, " = " ); + if (elem->name) + fprintf( outfile, "IupSetAtt( \"%s\", ", elem->name ); + else + fprintf( outfile, "IupSetAtt( NULL, " ); + codeelemname( elem ); +} + +static void code_c_name( char* name ) +{ + char *ant = name; + char *p = name; + while ( (p = strpbrk( p, "+-." )) != NULL ) + { + char c = p[0]; + p[0] = 0; + fprintf( outfile, "%s", ant ); + switch (c) + { + case '+': fprintf( outfile, "%s", "_plus_" ); break; + case '-': fprintf( outfile, "%s", "_minus_" ); break; + case '.': fprintf( outfile, "%s", "_dot_" ); break; + } + p[0] = c; + ant = ++p; + } + fprintf( outfile, "%s", ant ); +} + +static void code_decl( Telem *e ) +{ + if (e->name || e->attrs) + { + code_start( e ); + elems[e->elemidx].code( e ); + code_attrs( e ); + } + else + { + codeindent(); + if (e->name && e->elemidx != IMAGE && e->elemidx != COLOR) + generatename( e ); + if ( codename( e ) ) + fprintf( outfile, " = " ); + codeelemname( e ); + elems[e->elemidx].code( e ); + } +} + +static Telem* namedelem( char *name ) +{ + Telemlist* p = all_named->first; + while (p) + { + Telem* n = (Telem*)p->data; + if (!strcmp(n->name,name)) + { + return n; + } + p = p->next; + } + return 0; +} + +static void codeelemparam( Tparam* param ) +{ + if (param->tag == ELEM_PARAM) + { + code_decl( param->data.elem ); + } + else + { + Telem *e = namedelem( param->data.name ); + codeindent(); + if (e) + { + codename( e ); + fprintf( outfile, " /* %s */", param->data.name ); + } + else + { + fprintf( outfile, "IupGetHandle( \"%s\" )", param->data.name ); + } + } +} + +/****************************************************************/ + +static void code_iupCpi( Telem* elem ) +{ + int i=0; + indent(); + fprintf( outfile, "( " ); + for (i=0; inparams; i++) + { + if (elem->params[i]->tag == ELEM_PARAM) + { + fprintf( outfile, "\n" ); + codeindent(); + codeelemparam( elem->params[i] ); + } + else + { + fprintf( outfile, "\"%s\"", elem->params[i]->data.name ); + } + if (i+1nparams) fprintf( outfile, ", " ); + } + fprintf( outfile, ")" ); + unindent(); +} + +static void code_image( Telem* elem ) +{ + int i, + w = elem->data.image.w, + h = elem->data.image.h; + + fprintf( outfile, "static void image_" ); + code_c_name( elem->name ); + fprintf( outfile, + " (void)\n" + "{\n" + " unsigned char map[] = {" ); + + for (i=0; iparams[i+2]->data.name) ); + } + + fprintf( outfile, + "\n" + " -1 };\n\n" ); + indent(); + code_start( elem ); + fprintf( outfile, "( %d, %d, map )", elem->data.image.w, elem->data.image.h ); + code_attrs( elem ); + fprintf( outfile, ";\n}\n\n" ); + unindent(); +} + +static void code_empty( Telem* elem ) +{ + (void) elem; + fprintf( outfile, "()" ); +} + +static void code_string( Telem* elem ) +{ + fprintf( outfile, "( \"%s\" )", elem->params[0]->data.name ); +} + +static void code_string_cb( Telem* elem ) +{ + fprintf( outfile, "( \"%s\", \"%s\" )", elem->params[0]->data.name, elem->params[1]->data.name ); +} + +static void code_elem( Telem* elem ) +{ + fprintf( outfile, "(\n" ); + indent(); + codeelemparam( elem->params[0] ); + fprintf( outfile, "\n" ); + unindent(); + codeindent(); + fprintf( outfile, ")" ); +} + + +static void code_elemlist( Telem* elem ) +{ + int i=0; + fprintf( outfile, "(\n" ); + indent(); + for (i=0; inparams; i++) + { + codeelemparam( elem->params[i] ); + fprintf( outfile, ",\n" ); + } + unindent(); + codeindent(); + fprintf( outfile, "NULL)" ); +} + +static void code_string_elem( Telem* elem ) +{ + fprintf( outfile, "( \"%s\",\n", elem->params[0]->data.name ); + indent(); + codeelemparam( elem->params[1] ); + fprintf( outfile, "\n" ); + unindent(); + codeindent(); + fprintf( outfile, ")" ); +} + +/****************************************************************/ + +static char* strlower( char* str ) +{ + int i=0; + while (str[i]) { str[i]=(char)tolower(str[i]); i++; } + return str; +} + +static int lookupelem( char* name ) +{ + int i; + for (i=0; iname = name; + ret->value = value; + return ret; +} + +Tparam* param( int tag, void* value ) +{ + Tparam* ret = alloc(Tparam); + ret->tag = tag; + switch (tag) + { + case NAME_PARAM: + case STRING_PARAM: + ret->data.name = (char*)value; + break; + case ELEM_PARAM: + ret->data.elem = (Telem*)value; + break; + } + return ret; +} + +Telem* elem( char* name, Tlist* attrs, Tlist* params ) +{ + Telem* ret = alloc(Telem); + ret->name = 0; + ret->elemname = strlower(name); + ret->attrs = attrs; + if (params) + { + ret->nparams = params->size; + ret->params = list2paramvector( params ); + } + else + { + ret->nparams = 0; + ret->params = 0; + } + ret->elemidx = lookupelem( name ); + elems[ret->elemidx].check(ret); + headerfile[elems[ret->elemidx].header].used = 1; + return ret; +} + +Tlist* list( void ) +{ + Tlist* ret = alloc(Tlist); + ret->first = 0; + ret->size = 0; + return ret; +} + +Tlist* addlist( Tlist* l, void* data ) +{ + Telemlist* ne = alloc(Telemlist); + ne->data = data; + ne->next = l->first; + l->first = ne; + l->size++; + return l; +} + +void cleanlist( Tlist* l ) +{ + l->first = 0; + l->size = 0; +} + + +void decl( Telem* e ) +{ + if (!e->name) warning("%s declared without a name", e->elemname ); + else + { + if (nerrors || nocode) return; + if (e->elemidx == IMAGE) + { + code_image( e ); + addlist( all_images, e ); + } + else + { + addlist( all_elems, e ); + } + } +} + + +static Telemlist* revert( Telemlist* elem ) +{ + if (!elem->next) + { + return elem; + } + else + { + Telemlist *ret; + ret = revert( elem->next ); + elem->next->next = elem; + elem->next = 0; + return ret; + } +} + +Tlist* revertlist( Tlist* l ) +{ + if (l->first) + l->first = revert( l->first ); + return l; +} + +Tparam** list2paramvector( Tlist* params ) +{ + int i = params->size; + if (i) + { + Tparam** ret = (Tparam**)malloc(i*sizeof(Tparam*)); + Telemlist *p = params->first; + while (p) + { + ret[--i] = (Tparam*)p->data; + p = p->next; + } + return ret; + } + else + return 0; +} + + +void init(void) +{ + all_names = list(); + all_elems = list(); + all_images = list(); + all_named = list(); + all_late = list(); + + if (nocode) return; + outfile = stdout; + + outfile = fopen( outname, "w" ); + if (!outfile) + { + perror( outname ); + exit(-1); + } + + fprintf( outfile, + "/* Automatically generated by Iup 3.0 LED Compiler to C. */\n" + "\n" + "#include \n" + "#include \n" + "#include \n" + "\n" + "static Ihandle* named[ " ); + vetsizepos = ftell( outfile ); + fprintf( outfile, + " ];\n" + "\n" ); +} + +void finish(void) +{ + int i; + Telemlist *p; + + if (nerrors || nocode) return; + + for (i=1; i\n", headerfile[i].name ); + } + } + + fprintf( outfile, "\nvoid %s (void)\n{\n", funcname ); + + revertlist( all_images ); + p = all_images->first; + while (p) + { + Telem* e = (Telem*)(p->data); + fprintf(outfile, " image_" ); + code_c_name( e->name ); + fprintf(outfile, " ();\n" ); + p = p->next; + } + + indent(); + revertlist( all_elems ); + p = all_elems->first; + while (p) + { + Telem* e = (Telem*)(p->data); + code_decl( e ); + fprintf( outfile, ";\n" ); + p = p->next; + } + unindent(); + + fprintf( outfile, "}\n" ); + fseek( outfile, vetsizepos, SEEK_SET ); + fprintf( outfile, "%6d", nameds+1 ); + + fclose( outfile ); +} + +/* necessario para o Linux ?? */ +int gettxt( char *v1, char *v2); +int gettxt( char *v1, char *v2) +{ + fprintf(stderr, "%s: %s\n", v1, v2); + return 0; +} + diff --git a/iup/srcledc/ledc.dep b/iup/srcledc/ledc.dep new file mode 100644 index 0000000..17cbbb9 --- /dev/null +++ b/iup/srcledc/ledc.dep @@ -0,0 +1,3 @@ +$(OBJDIR)/lex.yy.o: lex.yy.c ledc.h y.tab.h +$(OBJDIR)/y.tab.o: y.tab.c ledc.h +$(OBJDIR)/ledc.o: ledc.c ledc.h diff --git a/iup/srcledc/ledc.h b/iup/srcledc/ledc.h new file mode 100755 index 0000000..782cf1f --- /dev/null +++ b/iup/srcledc/ledc.h @@ -0,0 +1,84 @@ +/** \file + * \brief LEDC definitions. + * + * See Copyright Notice in iup.h + * $Id: ledc.h,v 1.2 2009/06/22 15:47:16 scuri Exp $ + */ + +#ifndef __LEDC_H +#define __LEDC_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _elemlist { + struct _elemlist *next; + void *data; +} Telemlist; + +typedef struct { + Telemlist* first; + int size; +} Tlist; + +typedef struct { + char *name; + char *value; +} Tattr; + +typedef struct _Telem Telem; +typedef struct _Tparam Tparam; + +struct _Telem { + char* name; + char* elemname; + Tlist* attrs; + Tparam**params; + int nparams; + int elemidx; + char *codename; + union { + struct { int w, h; } image; + } data; +}; + +struct _Tparam { + enum { NAME_PARAM, STRING_PARAM, ELEM_PARAM } tag; + union { + char *name; + Telem *elem; + } data; +}; + +Tattr* attr( char* name, char* value ); +Tparam* param( int tag, void* value ); +Telem* elem( char* name, Tlist* attrs, Tlist* params ); +Tlist* list( void ); +Tlist* addlist( Tlist* l, void* data ); +Tlist* revertlist( Tlist* l ); +Tparam** list2paramvector( Tlist* l ); +void cleanlist( Tlist* l ); + +void decl( Telem* e ); + +void use( char* name ); +void named( char* name ); + +void init(void); +void finish(void); + +void error( char* fmt, ... ); + +extern int yylineno; + +extern char* filename; +extern char* outname; +extern char* funcname; +extern int nocode; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srcledc/ledc.l b/iup/srcledc/ledc.l new file mode 100755 index 0000000..1a803c6 --- /dev/null +++ b/iup/srcledc/ledc.l @@ -0,0 +1,65 @@ +%option yylineno + +%{ +#include +#include "ledc.h" +#include "y.tab.h" +%} + +a [aA] +b [bB] +c [cC] +d [dD] +e [eE] +f [fF] +g [gG] +h [hH] +i [iI] +j [jJ] +k [kK] +l [lL] +m [mM] +n [nN] +o [oO] +p [pP] +q [qQ] +r [rR] +s [sS] +t [tT] +u [uU] +v [vV] +w [wW] +x [xX] +y [yY] +z [zZ] + +%% + +[ \t\n] ; + +"(" { return '('; } +")" { return ')'; } +"=" { return '='; } +"[" { return '['; } +"]" { return ']'; } +"," { return ','; } + +["](\\.|[^"])*["] { + int len = strlen(yytext)-2; + char *str = (char*)malloc(sizeof(char)*len+1); + strncpy(str, yytext+1, len); + str[len] = 0; + yylval.fString = str; + return STRING; + } + +[A-Za-z0-9_.+-][A-Za-z0-9_.+-]* { + yylval.fString = strdup(yytext); + return NAME; + } + +"#".*$ ; + +%% + + diff --git a/iup/srcledc/ledc.y b/iup/srcledc/ledc.y new file mode 100755 index 0000000..1c76b76 --- /dev/null +++ b/iup/srcledc/ledc.y @@ -0,0 +1,189 @@ +%{ + +#include +#include +#include +#include +#include "ledc.h" + +%} + +%union { + char* fString; + Tattr* fAttr; + Tlist* fList; + Telem* fElem; + Tparam* fParam; +} + +%type attr_def +%type name_str +%type attr_list opt_attr param_list param_decl +%type iupelem iupelem_decl +%type param + +%token '(' ')' '=' '[' ']' ',' +%token NAME STRING + +%start led + +%% + +led : /* empty */ + | decl_list + ; + +decl_list : decl + | decl_list decl + ; + +decl : iupelem_decl + { decl( $1 ); } + ; + +iupelem_decl : iupelem + { $$ = $1; } + | NAME '=' iupelem + { $$ = $3; $3->name = $1; named($1); } + ; + +iupelem : NAME opt_attr '(' param_decl ')' + { $$ = elem( $1, $2, $4 ); } + +param_decl : /* empty */ + { $$ = 0; } + | param_list + { $$ = $1; } + ; + +param_list : param + { $$ = list(); addlist( $$, $1 ); } + | param_list ',' param + { $$ = addlist( $1, $3 ); } + ; + +param : NAME + { $$ = param( NAME_PARAM, $1 ); } + | STRING + { $$ = param( STRING_PARAM, $1 ); } + | iupelem_decl + { $$ = param( ELEM_PARAM, $1 ); use($1->name); } + ; + +opt_attr : /* empty */ + { $$ = 0; } + | '[' attr_list ']' + { $$ = revertlist( $2 ); } + ; + +attr_list : attr_def + { $$ = list(); addlist( $$, $1 ); } + | attr_list ',' attr_def + { addlist( $1, $3 ); } + ; + +attr_def : name_str '=' name_str + { $$ = attr( $1, $3 ); } + ; + +name_str : NAME + | STRING + ; + +%% + +extern int yylineno; +extern FILE *yyin; + +int yywrap(void) { return 1; } + +void yyerror(char *str) +{ + error(" %s; last token read: %s", + str, yylval.fString); +} + +static int usage(void) +{ + fprintf( stderr, + "ledc [-v] [-c] [-f funcname] [-o file] files\n" + " -v print the version number\n" + " -c only perform checking, do not generate code\n" + " -f funcname generate exported function (default: led_load)\n" + " -o file place output in file (default: led.c)\n" + ); + return -1; +} + +int main(int argc, char *argv[]) +{ + if (argc < 2) + { + return usage(); + } + + while (argc > 1) + { + char *op = *(argv+1); + if (op[0] != '-') break; + argc--; + argv++; + switch (op[1]) + { + case 'v': + printf("Iup 3.0 LED Compiler to C\n"); + return 0; + break; + case 'o': + if (argc>1) + { + argc--; + argv++; + outname = *argv; + } + else return usage(); + break; + case 'f': + if (argc>1) + { + argc--; + argv++; + funcname = *argv; + } + else return usage(); + break; + case 'c': + nocode = 1; + break; + default: + return usage(); + } + } + + if (!outname) outname = "led.c"; + if (!funcname) funcname = "led_load"; + + init(); + while (--argc > 0) + { + char * name = *++argv; + filename = name; + if ((yyin = fopen(name, "r")) == NULL) + { + fprintf( stderr, "ledc: %s: %s\n", name, +#ifdef SunOS + "cannot open file" +#else + strerror(errno) +#endif + ); + continue; + } + yylineno = 1; + yyparse(); + fclose(yyin); + } + finish(); + return 0; +} + diff --git a/iup/srcledc/lex.yy.c b/iup/srcledc/lex.yy.c new file mode 100755 index 0000000..f4f21d6 --- /dev/null +++ b/iup/srcledc/lex.yy.c @@ -0,0 +1,1604 @@ +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /cvsroot/iup/iup/srcledc/lex.yy.c,v 1.1 2008/11/21 03:00:11 scuri Exp $ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +extern int yylineno; +int yylineno = 1; +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 11 +#define YY_END_OF_BUFFER 12 +static yyconst short int yy_acclist[25] = + { 0, + 12, 11, 1, 11, 11, 11, 2, 11, 3, 11, + 9, 11, 7, 11, 4, 11, 5, 11, 6, 11, + 8, 10, 9, 8 + } ; + +static yyconst short int yy_accept[26] = + { 0, + 1, 1, 1, 2, 3, 5, 6, 7, 9, 11, + 13, 15, 17, 19, 21, 21, 22, 22, 22, 23, + 24, 24, 25, 25, 25 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 4, 5, 1, 1, 1, 1, 6, + 7, 1, 8, 9, 8, 8, 1, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 1, 1, 1, + 10, 1, 1, 1, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 11, 12, 13, 1, 8, 1, 8, 8, 8, 8, + + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[14] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1 + } ; + +static yyconst short int yy_base[28] = + { 0, + 0, 0, 24, 70, 70, 10, 18, 70, 70, 12, + 70, 70, 70, 70, 19, 70, 29, 16, 70, 10, + 38, 47, 57, 70, 16, 15, 14 + } ; + +static yyconst short int yy_def[28] = + { 0, + 24, 1, 24, 24, 24, 25, 26, 24, 24, 24, + 24, 24, 24, 24, 25, 24, 27, 26, 24, 24, + 25, 25, 27, 0, 24, 24, 24 + } ; + +static yyconst short int yy_nxt[84] = + { 0, + 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 4, 14, 16, 21, 18, 15, 20, 19, 20, + 19, 17, 16, 24, 24, 24, 24, 24, 24, 24, + 17, 15, 22, 24, 24, 24, 24, 24, 24, 24, + 23, 16, 24, 24, 24, 24, 24, 24, 24, 17, + 16, 24, 24, 24, 24, 24, 24, 24, 17, 15, + 22, 24, 24, 24, 24, 24, 24, 24, 23, 3, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24 + } ; + +static yyconst short int yy_chk[84] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 6, 27, 26, 25, 20, 18, 10, + 7, 6, 15, 3, 0, 0, 0, 0, 0, 0, + 15, 17, 17, 0, 0, 0, 0, 0, 0, 0, + 17, 21, 0, 0, 0, 0, 0, 0, 0, 21, + 22, 0, 0, 0, 0, 0, 0, 0, 22, 23, + 23, 0, 0, 0, 0, 0, 0, 0, 23, 24, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ +yy_cp = yy_full_match; /* restore poss. backed-over text */ \ +++yy_lp; \ +goto find_rule; \ +} +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "ledc.l" +#define INITIAL 0 +#line 4 "ledc.l" +#include +#include "ledc.h" +#include "y.tab.h" +#line 404 "lex.yy.c" + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp = NULL, *yy_bp = NULL; + register int yy_act; + +#line 36 "ledc.l" + + +#line 558 "lex.yy.c" + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 25 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 70 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +#line 38 "ledc.l" +; + YY_BREAK +case 2: +YY_RULE_SETUP +#line 40 "ledc.l" +{ return '('; } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 41 "ledc.l" +{ return ')'; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 42 "ledc.l" +{ return '='; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 43 "ledc.l" +{ return '['; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 44 "ledc.l" +{ return ']'; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 45 "ledc.l" +{ return ','; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 47 "ledc.l" +{ + int len = strlen(yytext)-2; + char *str = (char*)malloc(sizeof(char)*len+1); + strncpy(str, yytext+1, len); + str[len] = 0; + yylval.fString = str; + return STRING; + } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 56 "ledc.l" +{ + yylval.fString = strdup(yytext); + return NAME; + } + YY_BREAK +case 10: +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ +yy_c_buf_p = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ +YY_RULE_SETUP +#line 61 "ledc.l" +; + YY_BREAK +case 11: +YY_RULE_SETUP +#line 63 "ledc.l" +ECHO; + YY_BREAK +#line 717 "lex.yy.c" + case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 25 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 25 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 24); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + if ( c == '\n' ) + ++yylineno; + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif +#line 63 "ledc.l" + + + diff --git a/iup/srcledc/make_uname b/iup/srcledc/make_uname new file mode 100755 index 0000000..ca4b499 --- /dev/null +++ b/iup/srcledc/make_uname @@ -0,0 +1,3 @@ +# This builds the executable for 1 uname + +tecmake relink $1 $2 $3 $4 $5 $6 $7 $8 diff --git a/iup/srcledc/make_uname.bat b/iup/srcledc/make_uname.bat new file mode 100755 index 0000000..a6645a6 --- /dev/null +++ b/iup/srcledc/make_uname.bat @@ -0,0 +1,22 @@ +@echo off + +if "%1"=="" goto iupexe32 +if "%1"=="vc8" goto iupexe32 +if "%1"=="vc8_64" goto iupexe64 +if "%1"=="all" goto iupexe +goto end + +:iupexe32 +call tecmake vc8 relink %2 %3 %4 %5 %6 %7 +goto end + +:iupexe64 +call tecmake vc8_64 relink %2 %3 %4 %5 %6 %7 +goto end + +:iupexe +call tecmake vc8 relink %2 %3 %4 %5 %6 %7 +call tecmake vc8_64 relink %2 %3 %4 %5 %6 %7 +goto end + +:end diff --git a/iup/srcledc/y.tab.c b/iup/srcledc/y.tab.c new file mode 100755 index 0000000..e749dc7 --- /dev/null +++ b/iup/srcledc/y.tab.c @@ -0,0 +1,507 @@ +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define yyclearin (yychar=(-1)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING (yyerrflag!=0) +#define YYPREFIX "yy" +#line 1 "ledc.y" + + +#include +#include +#include +#include +#include "ledc.h" + +static int yyparse(void); + +#line 11 "ledc.y" +typedef union { + char* fString; + Tattr* fAttr; + Tlist* fList; + Telem* fElem; + Tparam* fParam; +} YYSTYPE; +#line 29 "y.tab.c" +#define NAME 257 +#define STRING 258 +#define YYERRCODE 256 +short yylhs[] = { -1, + 0, 0, 10, 10, 11, 8, 8, 7, 6, 6, + 5, 5, 9, 9, 9, 4, 4, 3, 3, 1, + 2, 2, +}; +short yylen[] = { 2, + 0, 1, 1, 2, 1, 1, 3, 5, 0, 1, + 1, 3, 1, 1, 1, 0, 3, 1, 3, 3, + 1, 1, +}; +short yydefred[] = { 0, + 0, 0, 6, 5, 0, 3, 0, 0, 0, 4, + 0, 7, 21, 22, 18, 0, 0, 0, 0, 17, + 0, 0, 14, 0, 0, 15, 11, 20, 19, 0, + 8, 12, +}; +short yydgoto[] = { 2, + 15, 16, 17, 9, 24, 25, 3, 4, 27, 5, + 6, +}; +short yysindex[] = { -247, + -60, 0, 0, 0, -247, 0, -246, -252, -28, 0, + -78, 0, 0, 0, 0, -46, -44, -249, -252, 0, + -252, -60, 0, -27, -25, 0, 0, 0, 0, -249, + 0, 0, +}; +short yyrindex[] = { 18, + -21, 0, 0, 0, 20, 0, 0, 0, 0, 0, + -21, 0, 0, 0, 0, 0, 0, -20, 0, 0, + 0, -37, 0, -19, 0, 0, 0, 0, 0, 0, + 0, 0, +}; +short yygindex[] = { 0, + 2, 5, 0, 0, 0, 0, 19, -16, -5, 0, + 22, +}; +#define YYTABLESIZE 49 +short yytable[] = { 21, + 7, 26, 16, 13, 13, 14, 13, 22, 23, 1, + 11, 18, 8, 26, 19, 31, 30, 1, 16, 2, + 9, 10, 29, 28, 32, 12, 10, 0, 0, 0, + 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 20, +}; +short yycheck[] = { 44, + 61, 18, 40, 41, 257, 258, 44, 257, 258, 257, + 257, 40, 91, 30, 61, 41, 44, 0, 40, 0, + 41, 41, 21, 19, 30, 7, 5, -1, -1, -1, + 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 93, +}; +#define YYFINAL 2 +#ifndef YYDEBUG +#define YYDEBUG 0 +#endif +#define YYMAXTOKEN 258 +#if YYDEBUG +char *yyname[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,"'('","')'",0,0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'='",0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'['",0,"']'",0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"NAME", +"STRING", +}; +char *yyrule[] = { +"$accept : led", +"led :", +"led : decl_list", +"decl_list : decl", +"decl_list : decl_list decl", +"decl : iupelem_decl", +"iupelem_decl : iupelem", +"iupelem_decl : NAME '=' iupelem", +"iupelem : NAME opt_attr '(' param_decl ')'", +"param_decl :", +"param_decl : param_list", +"param_list : param", +"param_list : param_list ',' param", +"param : NAME", +"param : STRING", +"param : iupelem_decl", +"opt_attr :", +"opt_attr : '[' attr_list ']'", +"attr_list : attr_def", +"attr_list : attr_list ',' attr_def", +"attr_def : name_str '=' name_str", +"name_str : NAME", +"name_str : STRING", +}; +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 +#endif +#endif +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short yyss[YYSTACKSIZE]; +YYSTYPE yyvs[YYSTACKSIZE]; +#define yystacksize YYSTACKSIZE +#line 93 "ledc.y" + + +extern int yylineno; +extern FILE *yyin; + +int yywrap(void) { return 1; } + +void yyerror(char *str) +{ + error(" %s; last token read: %s", + str, yylval.fString); +} + +static int usage(void) +{ + fprintf( stderr, + "ledc [-v] [-c] [-f funcname] [-o file] files\n" + " -v print the version number\n" + " -c only perform checking, do not generate code\n" + " -f funcname generate exported function (default: led_load)\n" + " -o file place output in file (default: led.c)\n" + ); + return -1; +} + +int main(int argc, char *argv[]) +{ + if (argc < 2) + { + return usage(); + } + + while (argc > 1) + { + char *op = *(argv+1); + if (op[0] != '-') break; + argc--; + argv++; + switch (op[1]) + { + case 'v': + printf("Iup 3.0 LED Compiler to C\n"); + return 0; + break; + case 'o': + if (argc>1) + { + argc--; + argv++; + outname = *argv; + } + else return usage(); + break; + case 'f': + if (argc>1) + { + argc--; + argv++; + funcname = *argv; + } + else return usage(); + break; + case 'c': + nocode = 1; + break; + default: + return usage(); + } + } + + if (!outname) outname = "led.c"; + if (!funcname) funcname = "led_load"; + + init(); + while (--argc > 0) + { + char * name = *++argv; + filename = name; + if ((yyin = fopen(name, "r")) == NULL) + { + fprintf( stderr, "ledc: %s: %s\n", name, +#ifdef SunOS + "cannot open file" +#else + strerror(errno) +#endif + ); + continue; + } + yylineno = 1; + yyparse(); + fclose(yyin); + } + finish(); + return 0; +} + +#line 246 "y.tab.c" +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab +static int yyparse(void) +{ + register int yym, yyn, yystate; +#if YYDEBUG + register char *yys; + extern char *getenv(); + + if (yys = getenv("YYDEBUG")) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if (yyn = yydefred[yystate]) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; +#ifdef lint + goto yynewerror; +#endif +yynewerror: + yyerror("syntax error"); +#ifdef lint + goto yyerrlab; +#endif +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 5: +#line 41 "ledc.y" +{ decl( yyvsp[0].fElem ); } +break; +case 6: +#line 45 "ledc.y" +{ yyval.fElem = yyvsp[0].fElem; } +break; +case 7: +#line 47 "ledc.y" +{ yyval.fElem = yyvsp[0].fElem; yyvsp[0].fElem->name = yyvsp[-2].fString; named(yyvsp[-2].fString); } +break; +case 8: +#line 51 "ledc.y" +{ yyval.fElem = elem( yyvsp[-4].fString, yyvsp[-3].fList, yyvsp[-1].fList ); } +break; +case 9: +#line 54 "ledc.y" +{ yyval.fList = 0; } +break; +case 10: +#line 56 "ledc.y" +{ yyval.fList = yyvsp[0].fList; } +break; +case 11: +#line 60 "ledc.y" +{ yyval.fList = list(); addlist( yyval.fList, yyvsp[0].fParam ); } +break; +case 12: +#line 62 "ledc.y" +{ yyval.fList = addlist( yyvsp[-2].fList, yyvsp[0].fParam ); } +break; +case 13: +#line 66 "ledc.y" +{ yyval.fParam = param( NAME_PARAM, yyvsp[0].fString ); } +break; +case 14: +#line 68 "ledc.y" +{ yyval.fParam = param( STRING_PARAM, yyvsp[0].fString ); } +break; +case 15: +#line 70 "ledc.y" +{ yyval.fParam = param( ELEM_PARAM, yyvsp[0].fElem ); use(yyvsp[0].fElem->name); } +break; +case 16: +#line 74 "ledc.y" +{ yyval.fList = 0; } +break; +case 17: +#line 76 "ledc.y" +{ yyval.fList = revertlist( yyvsp[-1].fList ); } +break; +case 18: +#line 80 "ledc.y" +{ yyval.fList = list(); addlist( yyval.fList, yyvsp[0].fAttr ); } +break; +case 19: +#line 82 "ledc.y" +{ addlist( yyvsp[-2].fList, yyvsp[0].fAttr ); } +break; +case 20: +#line 86 "ledc.y" +{ yyval.fAttr = attr( yyvsp[-2].fString, yyvsp[0].fString ); } +break; +#line 451 "y.tab.c" + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff --git a/iup/srcledc/y.tab.h b/iup/srcledc/y.tab.h new file mode 100755 index 0000000..4a16f88 --- /dev/null +++ b/iup/srcledc/y.tab.h @@ -0,0 +1,10 @@ +#define NAME 257 +#define STRING 258 +typedef union { + char* fString; + Tattr* fAttr; + Tlist* fList; + Telem* fElem; + Tparam* fParam; +} YYSTYPE; +extern YYSTYPE yylval; diff --git a/iup/srclua3/Makefile b/iup/srclua3/Makefile new file mode 100755 index 0000000..b63716a --- /dev/null +++ b/iup/srclua3/Makefile @@ -0,0 +1,21 @@ + +.PHONY: do_all iuplua iupluacd iupluacontrols iuplua_pplot iupluagl iupluaim +do_all: iuplua iupluacd iupluacontrols iuplua_pplot iupluagl iupluaim + +iuplua: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak + +iupluacd: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iupcd + +iupluacontrols: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iupcontrols + +iuplua_pplot: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iup_pplot + +iupluagl: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iupgl + +iupluaim: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iupim diff --git a/iup/srclua3/cells.lua b/iup/srclua3/cells.lua new file mode 100755 index 0000000..0f1e0cc --- /dev/null +++ b/iup/srclua3/cells.lua @@ -0,0 +1,37 @@ +IUPCELLS = {parent = WIDGET} + +function IUPCELLS:CreateIUPelement( obj ) + return iupCreateCells() +end + +function IUPCELLS:redraw() + self.repaint = IUP_YES +end + +function iupcells(o) + return IUPCELLS:Constructor(o) +end +iup.cells = iupcells + + +-- iup_callbacks.draw_cb = iup_callbacks.draw = {"DRAW_CB", iup_mat_draw_cb} -- same callback at IupMatrix + +iup_callbacks.mouseclick = {"MOUSECLICK_CB", iup_cells_mouseclick_cb} +iup_callbacks.mousemotion = {"MOUSEMOTION_CB", iup_cells_mousemotion_cb} +iup_callbacks.scrolling = {"SCROLLING_CB", iup_cells_scrolling_cb} +iup_callbacks.width = {"WIDTH_CB", iup_cells_width_cb} +iup_callbacks.height = {"HEIGHT_CB", iup_cells_height_cb} +iup_callbacks.nlines = {"NLINES_CB", iup_cells_nlines_cb} +iup_callbacks.ncols = {"NCOLS_CB", iup_cells_ncols_cb} +iup_callbacks.hspan = {"HSPAN_CB", iup_cells_hspan_cb} +iup_callbacks.vspan = {"VSPAN_CB", iup_cells_vspan_cb} + +iup_callbacks.mouseclick_cb = iup_callbacks.mouseclick +iup_callbacks.mousemotion_cb = iup_callbacks.mousemotion +iup_callbacks.scrolling_cb = iup_callbacks.scrolling +iup_callbacks.width_cb = iup_callbacks.width +iup_callbacks.height_cb = iup_callbacks.height +iup_callbacks.nlines_cb = iup_callbacks.nlines +iup_callbacks.ncols_cb = iup_callbacks.ncols +iup_callbacks.hspan_cb = iup_callbacks.hspan +iup_callbacks.vspan_cb = iup_callbacks.vspan diff --git a/iup/srclua3/colorbar.lua b/iup/srclua3/colorbar.lua new file mode 100755 index 0000000..41953de --- /dev/null +++ b/iup/srclua3/colorbar.lua @@ -0,0 +1,21 @@ +IUPCOLORBAR = {parent = WIDGET} + +function IUPCOLORBAR:CreateIUPelement(obj) + return iupCreateColorbar(obj) +end + +function iupcolorbar (o) + return IUPCOLORBAR:Constructor (o) +end +iup.colorbar = iupcolorbar + + +iup_callbacks.cellcb = {"CELL_CB", iup_colorbar_cell_cb} +iup_callbacks.selectcb = {"SELECT_CB", iup_colorbar_select_cb} +iup_callbacks.switchcb = {"SWITCH_CB", iup_colorbar_switch_cb} +iup_callbacks.extendedcb = {"EXTENDED_CB", iup_colorbar_extended_cb} + +iup_callbacks.cell_cb = iup_callbacks.cellcb +iup_callbacks.select_cb = iup_callbacks.selectcb +iup_callbacks.switch_cb = iup_callbacks.switchcb +iup_callbacks.extended_cb = iup_callbacks.extendedcb diff --git a/iup/srclua3/colorbrowser.lua b/iup/srclua3/colorbrowser.lua new file mode 100755 index 0000000..fdd7bd7 --- /dev/null +++ b/iup/srclua3/colorbrowser.lua @@ -0,0 +1,17 @@ +IUPCOLORBROWSER = {parent = WIDGET} + +function IUPCOLORBROWSER:CreateIUPelement(obj) + return iupCreateColorBrowser(obj) +end + +function iupcolorbrowser (o) + return IUPCOLORBROWSER:Constructor (o) +end +iup.colorbrowser = iupcolorbrowser + + +iup_callbacks.drag = {"DRAG_CB", iup_colorbrowser_drag_cb} +iup_callbacks.change = {"CHANGE_CB", iup_colorbrowser_change_cb} + +iup_callbacks.drag_cb = iup_callbacks.drag +iup_callbacks.change_cb = iup_callbacks.change diff --git a/iup/srclua3/config.mak b/iup/srclua3/config.mak new file mode 100755 index 0000000..fae6145 --- /dev/null +++ b/iup/srclua3/config.mak @@ -0,0 +1,19 @@ +BUILD_IUP3 = Yes + +PROJNAME = iup +LIBNAME = iuplua3 +OPT = YES + +LOHDIR = loh +SRCLUA = iuplua.lua iuplua_widgets.lua constants.lua spin.lua \ + sbox.lua val.lua tree.lua tabs.lua +SRC = iuplua.c iuplua_api.c iuplua_widgets.c il_scanf.c il_cbox.c \ + il_sbox.c il_spin.c il_val.c il_tree.c il_tabs.c il_getcolor.c il_getparam.c + +USE_LUA = Yes + +DEFINES = IUPLUA_USELOH +INCLUDES = ../include ../src +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup + diff --git a/iup/srclua3/constants.lua b/iup/srclua3/constants.lua new file mode 100755 index 0000000..bbd366b --- /dev/null +++ b/iup/srclua3/constants.lua @@ -0,0 +1,148 @@ + +-- ################################################################################# +-- Constants +-- ################################################################################# + + +IUP_ERROR = 1 iup.ERROR = IUP_ERROR +IUP_NOERROR = 0 iup.NOERROR = IUP_NOERROR +IUP_OPENED = -1 iup.OPENED = IUP_OPENED +IUP_INVALID = -1 iup.INVALID = IUP_INVALID + +IUP_CENTER = 65535 iup.CENTER = IUP_CENTER +IUP_LEFT = 65534 iup.LEFT = IUP_LEFT +IUP_RIGHT = 65533 iup.RIGHT = IUP_RIGHT +IUP_MOUSEPOS = 65532 iup.MOUSEPOS = IUP_MOUSEPOS +IUP_CURRENT = 65531 iup.CURRENT = IUP_CURRENT +IUP_CENTERPARENT = 65530 iup.CENTERPARENT = IUP_CENTERPARENT +IUP_TOP = IUP_LEFT iup.TOP = IUP_TOP +IUP_BOTTOM = IUP_RIGHT iup.BOTTOM = IUP_BOTTOM + +IUP_BUTTON1 = 49 iup.BUTTON1 = IUP_BUTTON1 -- '1' +IUP_BUTTON2 = 50 iup.BUTTON2 = IUP_BUTTON2 -- '2' +IUP_BUTTON3 = 51 iup.BUTTON3 = IUP_BUTTON3 -- '3' +IUP_BUTTON4 = 52 iup.BUTTON4 = IUP_BUTTON4 -- '4' +IUP_BUTTON5 = 53 iup.BUTTON5 = IUP_BUTTON5 -- '5' + +IUP_IGNORE = -1 iup.IGNORE = IUP_IGNORE +IUP_DEFAULT = -2 iup.DEFAULT = IUP_DEFAULT +IUP_CLOSE = -3 iup.CLOSE = IUP_CLOSE +IUP_CONTINUE = -4 iup.CONTINUE = IUP_CONTINUE + +IUP_SBUP = 0 iup.SBUP = IUP_SBUP +IUP_SBDN = 1 iup.SBDN = IUP_SBDN +IUP_SBPGUP = 2 iup.SBPGUP = IUP_SBPGUP +IUP_SBPGDN = 3 iup.SBPGDN = IUP_SBPGDN +IUP_SBPOSV = 4 iup.SBPOSV = IUP_SBPOSV +IUP_SBDRAGV = 5 iup.SBDRAGV = IUP_SBDRAGV +IUP_SBLEFT = 6 iup.SBLEFT = IUP_SBLEFT +IUP_SBRIGHT = 7 iup.SBRIGHT = IUP_SBRIGHT +IUP_SBPGLEFT = 8 iup.SBPGLEFT = IUP_SBPGLEFT +IUP_SBPGRIGHT = 9 iup.SBPGRIGHT = IUP_SBPGRIGHT +IUP_SBPOSH = 10 iup.SBPOSH = IUP_SBPOSH +IUP_SBDRAGH = 11 iup.SBDRAGH = IUP_SBDRAGH + +IUP_SHOW = 0 iup.SHOW = IUP_SHOW +IUP_RESTORE = 1 iup.RESTORE = IUP_RESTORE +IUP_MINIMIZE = 2 iup.MINIMIZE = IUP_MINIMIZE +IUP_MAXIMIZE = 3 iup.MAXIMIZE = IUP_MAXIMIZE +IUP_HIDE = 4 iup.HIDE = IUP_HIDE + +RED = IupRGB(1, 0, 0) iup.RED = RED +GREEN = IupRGB(0, 1, 0) iup.GREEN = GREEN +BLUE = IupRGB(0, 0, 1) iup.BLUE = BLUE +BLACK = IupRGB(0, 0, 0) iup.BLACK = BLACK +WHITE = IupRGB(1, 1, 1) iup.WHITE = WHITE +YELLOW = IupRGB(1, 1, 0) iup.YELLOW = YELLOW + +IUP_ON = "ON" iup.ON = IUP_ON +IUP_OFF = "OFF" iup.OFF = IUP_OFF +IUP_YES = "YES" iup.YES = IUP_YES +IUP_NO = "NO" iup.NO = IUP_NO +IUP_APPEND = "APPEND" iup.APPEND = IUP_APPEND +IUP_VERTICAL = "VERTICAL" iup.VERTICAL = IUP_VERTICAL +IUP_HORIZONTAL ="HORIZONTAL" iup.HORIZONTAL =IUP_HORIZONTAL + +IUP_ACENTER = "ACENTER" iup.ACENTER = IUP_ACENTER +IUP_ALEFT = "ALEFT" iup.ALEFT = IUP_ALEFT +IUP_ARIGHT = "ARIGHT" iup.ARIGHT = IUP_ARIGHT +IUP_ATOP = "ATOP" iup.ATOP = IUP_ATOP +IUP_ABOTTOM = "ABOTTOM" iup.ABOTTOM = IUP_ABOTTOM + +IUP_NORTH = "NORTH" iup.NORTH = IUP_NORTH +IUP_SOUTH = "SOUTH" iup.SOUTH = IUP_SOUTH +IUP_WEST = "WEST" iup.WEST = IUP_WEST +IUP_EAST = "EAST" iup.EAST = IUP_EAST +IUP_NE = "NE" iup.NE = IUP_NE +IUP_SE = "SE" iup.SE = IUP_SE +IUP_NW = "NW" iup.NW = IUP_NW +IUP_SW = "SW" iup.SW = IUP_SW + +IUP_FULL = "FULL" iup.FULL = IUP_FULL +IUP_HALF = "HALF" iup.HALF = IUP_HALF +IUP_THIRD = "THIRD" iup.THIRD = IUP_THIRD +IUP_QUARTER = "QUARTER" iup.QUARTER = IUP_QUARTER +IUP_EIGHTH = "EIGHTH" iup.EIGHTH = IUP_EIGHTH + +IUP_ARROW = "ARROW" iup.ARROW = IUP_ARROW +IUP_BUSY = "BUSY" iup.BUSY = IUP_BUSY +IUP_RESIZE_N = "RESIZE_N" iup.RESIZE_N = IUP_RESIZE_N +IUP_RESIZE_S = "RESIZE_S" iup.RESIZE_S = IUP_RESIZE_S +IUP_RESIZE_E = "RESIZE_E" iup.RESIZE_E = IUP_RESIZE_E +IUP_RESIZE_W = "RESIZE_W" iup.RESIZE_W = IUP_RESIZE_W +IUP_RESIZE_NE = "RESIZE_NE" iup.RESIZE_NE = IUP_RESIZE_NE +IUP_RESIZE_NW = "RESIZE_NW" iup.RESIZE_NW = IUP_RESIZE_NW +IUP_RESIZE_SE = "RESIZE_SE" iup.RESIZE_SE = IUP_RESIZE_SE +IUP_RESIZE_SW = "RESIZE_SW" iup.RESIZE_SW = IUP_RESIZE_SW +IUP_MOVE = "MOVE" iup.MOVE = IUP_MOVE +IUP_HAND = "HAND" iup.HAND = IUP_HAND +IUP_NONE = "NONE" iup.NONE = IUP_NONE +IUP_IUP = "IUP" iup.IUP = IUP_IUP +IUP_CROSS = "CROSS" iup.CROSS = IUP_CROSS +IUP_PEN = "PEN" iup.PEN = IUP_PEN +IUP_TEXT = "TEXT" iup.TEXT = IUP_TEXT +IUP_RESIZE_C = "RESIZE_C" iup.RESIZE_C = IUP_RESIZE_C +IUP_OPENHAND = "OPENHAND" iup.OPENHAND = IUP_OPENHAND + +IUP_HELVETICA_NORMAL_8 = "HELVETICA_NORMAL_8" iup.HELVETICA_NORMAL_8 = IUP_HELVETICA_NORMAL_8 +IUP_HELVETICA_ITALIC_8 = "HELVETICA_ITALIC_8" iup.HELVETICA_ITALIC_8 = IUP_HELVETICA_ITALIC_8 +IUP_HELVETICA_BOLD_8 = "HELVETICA_BOLD_8" iup.HELVETICA_BOLD_8 = IUP_HELVETICA_BOLD_8 +IUP_HELVETICA_NORMAL_10 = "HELVETICA_NORMAL_10" iup.HELVETICA_NORMAL_10 = IUP_HELVETICA_NORMAL_10 +IUP_HELVETICA_ITALIC_10 = "HELVETICA_ITALIC_10" iup.HELVETICA_ITALIC_10 = IUP_HELVETICA_ITALIC_10 +IUP_HELVETICA_BOLD_10 = "HELVETICA_BOLD_10" iup.HELVETICA_BOLD_10 = IUP_HELVETICA_BOLD_10 +IUP_HELVETICA_NORMAL_12 = "HELVETICA_NORMAL_12" iup.HELVETICA_NORMAL_12 = IUP_HELVETICA_NORMAL_12 +IUP_HELVETICA_ITALIC_12 = "HELVETICA_ITALIC_12" iup.HELVETICA_ITALIC_12 = IUP_HELVETICA_ITALIC_12 +IUP_HELVETICA_BOLD_12 = "HELVETICA_BOLD_12" iup.HELVETICA_BOLD_12 = IUP_HELVETICA_BOLD_12 +IUP_HELVETICA_NORMAL_14 = "HELVETICA_NORMAL_14" iup.HELVETICA_NORMAL_14 = IUP_HELVETICA_NORMAL_14 +IUP_HELVETICA_ITALIC_14 = "HELVETICA_ITALIC_14" iup.HELVETICA_ITALIC_14 = IUP_HELVETICA_ITALIC_14 +IUP_HELVETICA_BOLD_14 = "HELVETICA_BOLD_14" iup.HELVETICA_BOLD_14 = IUP_HELVETICA_BOLD_14 +IUP_COURIER_NORMAL_8 = "COURIER_NORMAL_8" iup.COURIER_NORMAL_8 = IUP_COURIER_NORMAL_8 +IUP_COURIER_ITALIC_8 = "COURIER_ITALIC_8" iup.COURIER_ITALIC_8 = IUP_COURIER_ITALIC_8 +IUP_COURIER_BOLD_8 = "COURIER_BOLD_8" iup.COURIER_BOLD_8 = IUP_COURIER_BOLD_8 +IUP_COURIER_NORMAL_10 = "COURIER_NORMAL_10" iup.COURIER_NORMAL_10 = IUP_COURIER_NORMAL_10 +IUP_COURIER_ITALIC_10 = "COURIER_ITALIC_10" iup.COURIER_ITALIC_10 = IUP_COURIER_ITALIC_10 +IUP_COURIER_BOLD_10 = "COURIER_BOLD_10" iup.COURIER_BOLD_10 = IUP_COURIER_BOLD_10 +IUP_COURIER_NORMAL_12 = "COURIER_NORMAL_12" iup.COURIER_NORMAL_12 = IUP_COURIER_NORMAL_12 +IUP_COURIER_ITALIC_12 = "COURIER_ITALIC_12" iup.COURIER_ITALIC_12 = IUP_COURIER_ITALIC_12 +IUP_COURIER_BOLD_12 = "COURIER_BOLD_12" iup.COURIER_BOLD_12 = IUP_COURIER_BOLD_12 +IUP_COURIER_NORMAL_14 = "COURIER_NORMAL_14" iup.COURIER_NORMAL_14 = IUP_COURIER_NORMAL_14 +IUP_COURIER_ITALIC_14 = "COURIER_ITALIC_14" iup.COURIER_ITALIC_14 = IUP_COURIER_ITALIC_14 +IUP_COURIER_BOLD_14 = "COURIER_BOLD_14" iup.COURIER_BOLD_14 = IUP_COURIER_BOLD_14 +IUP_TIMES_NORMAL_8 = "TIMES_NORMAL_8" iup.TIMES_NORMAL_8 = IUP_TIMES_NORMAL_8 +IUP_TIMES_ITALIC_8 = "TIMES_ITALIC_8" iup.TIMES_ITALIC_8 = IUP_TIMES_ITALIC_8 +IUP_TIMES_BOLD_8 = "TIMES_BOLD_8" iup.TIMES_BOLD_8 = IUP_TIMES_BOLD_8 +IUP_TIMES_NORMAL_10 = "TIMES_NORMAL_10" iup.TIMES_NORMAL_10 = IUP_TIMES_NORMAL_10 +IUP_TIMES_ITALIC_10 = "TIMES_ITALIC_10" iup.TIMES_ITALIC_10 = IUP_TIMES_ITALIC_10 +IUP_TIMES_BOLD_10 = "TIMES_BOLD_10" iup.TIMES_BOLD_10 = IUP_TIMES_BOLD_10 +IUP_TIMES_NORMAL_12 = "TIMES_NORMAL_12" iup.TIMES_NORMAL_12 = IUP_TIMES_NORMAL_12 +IUP_TIMES_ITALIC_12 = "TIMES_ITALIC_12" iup.TIMES_ITALIC_12 = IUP_TIMES_ITALIC_12 +IUP_TIMES_BOLD_12 = "TIMES_BOLD_12" iup.TIMES_BOLD_12 = IUP_TIMES_BOLD_12 +IUP_TIMES_NORMAL_14 = "TIMES_NORMAL_14" iup.TIMES_NORMAL_14 = IUP_TIMES_NORMAL_14 +IUP_TIMES_ITALIC_14 = "TIMES_ITALIC_14" iup.TIMES_ITALIC_14 = IUP_TIMES_ITALIC_14 +IUP_TIMES_BOLD_14 = "TIMES_BOLD_14" iup.TIMES_BOLD_14 = IUP_TIMES_BOLD_14 + +iup.MASK_FLOAT = "[+/-]?(/d+/.?/d*|/./d+)" +iup.MASK_UFLOAT = "(/d+/.?/d*|/./d+)" +iup.MASK_EFLOAT = "[+/-]?(/d+/.?/d*|/./d+)([eE][+/-]?/d+)?" +iup.MASK_INT = "[+/-]?/d+" +iup.MASK_UINT = "/d+" diff --git a/iup/srclua3/dial.lua b/iup/srclua3/dial.lua new file mode 100755 index 0000000..ee2c488 --- /dev/null +++ b/iup/srclua3/dial.lua @@ -0,0 +1,15 @@ +IUPDIAL = {parent = WIDGET} + +function IUPDIAL:CreateIUPelement (obj) + return iupCreateDial (obj[1]) +end + +function iupdial (o) + return IUPDIAL:Constructor (o) +end +iup.dial = iupdial + +iup_callbacks.mousemove.dial = iup_val_mousemove_cb -- same callback at IupVal + +-- iup_callbacks.buttonpress = {"BUTTON_PRESS_CB", iup_val_button_press_cb} -- same callback at IupVal +-- iup_callbacks.buttonrelease = {"BUTTON_RELEASE_CB", iup_val_button_release_cb} -- same callback at IupVal diff --git a/iup/srclua3/gauge.lua b/iup/srclua3/gauge.lua new file mode 100755 index 0000000..3fd886f --- /dev/null +++ b/iup/srclua3/gauge.lua @@ -0,0 +1,10 @@ +IUPGAUGE = {parent = WIDGET} + +function IUPGAUGE:CreateIUPelement (obj) + return iupCreateGauge () +end + +function iupgauge (o) + return IUPGAUGE:Constructor (o) +end +iup.gauge = iupgauge diff --git a/iup/srclua3/il.h b/iup/srclua3/il.h new file mode 100755 index 0000000..406ccc4 --- /dev/null +++ b/iup/srclua3/il.h @@ -0,0 +1,81 @@ +/** \file + * \brief iupLua internal declarations + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IL_H +#define __IL_H + +#ifdef __cplusplus +extern "C" { +#endif + +int iupluaapi_open(void); +int iupluawidgets_open(int tag); + +int sboxlua_open(void); +int spinlua_open(void); +int cboxlua_open(void); +int gclua_open (void); +int vallua_open (void); +int tabslua_open (void); +int treelua_open (void); + +void iupluaScanf(void); +void getparamlua_open (void); + +/** First function called inside a callback. + * It prepares the stack for the call and returns the Lua state. + */ +void iuplua_call_start(Ihandle* handle, char* name); + +/** Called when a callback in Lua should be called. + * Returns the callback return value. If nil returns IUP_DEFAULT. + * At the end clears the Lua stack. + */ +int iuplua_call(void); + +/** Same as /ref iuplua_call, but returns a string. + */ +char* iuplua_call_rs(void); + +/** Register a function. + */ +void iuplua_register(char* name, lua_CFunction func); + +/** Register a function. But consider no prefix. + */ +void iuplua_register_macro(char* name, lua_CFunction func); + +/** Register a number. + */ +void iuplua_regnumber(double num, char* name); + +/** Register a string. + */ +void iuplua_regstring(char* str, char* name); + +/** Register a string, but consider only 3 character as prefix. + */ +void iuplua_regstring_mask(char* str, char* name); + +/** Returns an array of ihandle stored in a Lua table. + */ +Ihandle** iuplua_checkihandle_array(int numArg); + +/** Pushes an ihandle inside a callback. + * If ihandle is from C must call iuplua_regihandle before iuplua_call_start. + */ +void iuplua_pushihandle_cb(Ihandle *n); + +/** Register an ihandle created in C in Lua. + */ +void iuplua_regihandle(Ihandle *n); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srclua3/il_cbox.c b/iup/srclua3/il_cbox.c new file mode 100755 index 0000000..9dc388d --- /dev/null +++ b/iup/srclua3/il_cbox.c @@ -0,0 +1,36 @@ +/** \file + * \brief Bindig of iupcbox to Lua 3. + * + * See Copyright Notice in "iup.h" + */ +#include + +#include + +#include "iup.h" + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + +static void CreateCbox(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + Ihandle** params = iuplua_checkihandle_array(1); + lua_pushusertag(IupCboxv(params),tag); + free(params); +} + +int cboxlua_open (void) +{ + lua_register("iupCreateCbox",CreateCbox); + + return lua_dostring("IUPCBOX = {parent = IUPCANVAS}\n" + "function IUPCBOX:CreateIUPelement (obj)\n" + " return iupCreateCbox (obj, getn(obj))\n" + "end\n" + "function iupcbox (o)\n" + " return IUPCBOX:Constructor (o)\n" + "end\n" + "iup.cbox = iupcbox\n"); +} diff --git a/iup/srclua3/il_cells.c b/iup/srclua3/il_cells.c new file mode 100755 index 0000000..92969f8 --- /dev/null +++ b/iup/srclua3/il_cells.c @@ -0,0 +1,150 @@ +/** \file + * \brief Bindig of IupCells to Lua 3. + * @author André Luiz Clinio. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iupcontrols.h" + +#include + +#include "iuplua.h" + +#include "il.h" +#include "il_controls.h" + + +static int luacells_mouseclick_cb( Ihandle* handle, int b, int m, + int i, int j, int x, int y, char* r ) +{ + iuplua_call_start(handle, "mouseclick"); + lua_pushnumber(b); + lua_pushnumber(m); + lua_pushnumber(i); + lua_pushnumber(j); + lua_pushnumber(x); + lua_pushnumber(y); + lua_pushstring(r); + return iuplua_call(); +} + +static int luacells_mousemotion_cb( Ihandle* handle, int i, int j, + int x, int y, char* r ) +{ + iuplua_call_start(handle, "mousemotion"); + lua_pushnumber(i); + lua_pushnumber(j); + lua_pushnumber(x); + lua_pushnumber(y); + lua_pushstring(r); + return iuplua_call(); +} + +static int luacells_width_cb( Ihandle* handle, int col ) +{ + iuplua_call_start(handle, "width"); + lua_pushnumber(col); + return iuplua_call(); +} + +static int luacells_height_cb( Ihandle* handle, int line ) +{ + iuplua_call_start(handle, "height"); + lua_pushnumber(line); + return iuplua_call(); +} + +static int luacells_nlines_cb( Ihandle* handle ) +{ + iuplua_call_start(handle, "nlines"); + return iuplua_call(); +} + +static int luacells_ncols_cb( Ihandle* handle ) +{ + iuplua_call_start(handle, "ncols"); + return iuplua_call(); +} + +static int luacells_hspan_cb( Ihandle* handle, int i, int j ) +{ + iuplua_call_start(handle, "hspan"); + lua_pushnumber(i); + lua_pushnumber(j); + return iuplua_call(); +} + +static int luacells_vspan_cb( Ihandle* handle, int i, int j ) +{ + iuplua_call_start(handle, "vspan"); + lua_pushnumber(i); + lua_pushnumber(j); + return iuplua_call(); +} + +static int luacells_scrolling_cb( Ihandle* handle, int fline, int fcol ) +{ + iuplua_call_start(handle, "scrolling"); + lua_pushnumber(fline); + lua_pushnumber(fcol); + return iuplua_call(); +} + +static void createCells(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupCells(), tag); +} + +int cellslua_open(void) +{ + int i; + struct TypeAssocList { + char *name; + lua_CFunction func; + } assoc_list [] = { + {"iup_cells_mouseclick_cb", (lua_CFunction) luacells_mouseclick_cb }, + {"iup_cells_mousemotion_cb", (lua_CFunction) luacells_mousemotion_cb }, + {"iup_cells_width_cb", (lua_CFunction) luacells_width_cb }, + {"iup_cells_height_cb", (lua_CFunction) luacells_height_cb }, + {"iup_cells_nlines_cb", (lua_CFunction) luacells_nlines_cb }, + {"iup_cells_ncols_cb", (lua_CFunction) luacells_ncols_cb }, + {"iup_cells_hspan_cb", (lua_CFunction) luacells_hspan_cb }, + {"iup_cells_vspan_cb", (lua_CFunction) luacells_vspan_cb }, + {"iup_cells_scrolling_cb", (lua_CFunction) luacells_scrolling_cb } + }; + int assoc_list_size = (sizeof(assoc_list)/sizeof(struct TypeAssocList)); + + lua_register("iupCreateCells", createCells); + + for( i = 0; i < assoc_list_size; i++ ) + lua_register(assoc_list[i].name, assoc_list[i].func); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/cells_be64.loh" +#else +#include "loh/cells_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/cells_le64w.loh" +#else +#include "loh/cells_le64.loh" +#endif +#else +#include "loh/cells.loh" +#endif +#endif +#else + iuplua_dofile("luacells.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/il_colorbar.c b/iup/srclua3/il_colorbar.c new file mode 100755 index 0000000..28c912e --- /dev/null +++ b/iup/srclua3/il_colorbar.c @@ -0,0 +1,97 @@ +/** \file + * \brief Bindig of iupcb to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iupcontrols.h" + +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static char* COLORBAR_cell_cb(Ihandle *handle, int cell) +{ + iuplua_call_start(handle, "cellcb"); + lua_pushnumber(cell); + return iuplua_call_rs(); +} + +static int COLORBAR_select_cb(Ihandle *handle, int cell, int type) +{ + iuplua_call_start(handle, "selectcb"); + lua_pushnumber(cell); + lua_pushnumber(type); + return iuplua_call(); +} + +static int COLORBAR_switch_cb(Ihandle *handle, int prim_cell, int sec_cell) +{ + iuplua_call_start(handle, "switchcb"); + lua_pushnumber(prim_cell); + lua_pushnumber(sec_cell); + return iuplua_call(); +} + +static int COLORBAR_extended_cb(Ihandle *handle, int cell) +{ + iuplua_call_start(handle, "extendedcb"); + lua_pushnumber(cell); + return iuplua_call(); +} + +static void CreateColorbar(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupColorbar(), tag); +} + +int colorbarlua_open(void) +{ + struct AssocList { + char *name; + lua_CFunction func; + } COLORBARAssocList [] = { + {"iup_colorbar_cell_cb", (lua_CFunction)COLORBAR_cell_cb}, + {"iup_colorbar_select_cb", (lua_CFunction)COLORBAR_select_cb}, + {"iup_colorbar_switch_cb", (lua_CFunction)COLORBAR_switch_cb}, + {"iup_colorbar_extended_cb", (lua_CFunction)COLORBAR_extended_cb} + }; + int SizeCOLORBARAssocList = (sizeof(COLORBARAssocList)/sizeof(struct AssocList)); + int i; + + lua_register("iupCreateColorbar", CreateColorbar); + + for (i = 0; i < SizeCOLORBARAssocList; i++) + lua_register(COLORBARAssocList[i].name, COLORBARAssocList[i].func); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/colorbar_be64.loh" +#else +#include "loh/colorbar_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/colorbar_le64w.loh" +#else +#include "loh/colorbar_le64.loh" +#endif +#else +#include "loh/colorbar.loh" +#endif +#endif +#else + iuplua_dofile("luacolorbar.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/il_colorbrowser.c b/iup/srclua3/il_colorbrowser.c new file mode 100755 index 0000000..9415244 --- /dev/null +++ b/iup/srclua3/il_colorbrowser.c @@ -0,0 +1,72 @@ +/** \file + * \brief Bindig of iupcb to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include + +#include "iup.h" +#include "iupcontrols.h" + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static int CB_drag(Ihandle *handle, unsigned char r, unsigned char g, unsigned char b) +{ + iuplua_call_start(handle, "drag"); + lua_pushnumber(r); + lua_pushnumber(g); + lua_pushnumber(b); + return iuplua_call(); +} + +static int CB_change(Ihandle *handle, unsigned char r, unsigned char g, unsigned char b) +{ + iuplua_call_start(handle, "change"); + lua_pushnumber(r); + lua_pushnumber(g); + lua_pushnumber(b); + return iuplua_call(); +} + +static void CreateColorBrowser(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupColorBrowser(), tag); +} + +int cblua_open(void) +{ + lua_register("iupCreateColorBrowser", CreateColorBrowser); + lua_register("iup_colorbrowser_drag_cb", (lua_CFunction)CB_drag); + lua_register("iup_colorbrowser_change_cb", (lua_CFunction)CB_change); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/colorbrowser_be64.loh" +#else +#include "loh/colorbrowser_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/colorbrowser_le64w.loh" +#else +#include "loh/colorbrowser_le64.loh" +#endif +#else +#include "loh/colorbrowser.loh" +#endif +#endif +#else + iuplua_dofile("luacb.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/il_controls.h b/iup/srclua3/il_controls.h new file mode 100755 index 0000000..813ed58 --- /dev/null +++ b/iup/srclua3/il_controls.h @@ -0,0 +1,26 @@ +/** \file + * \brief iupLua Controls initialization + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IL_CONTROLS_H +#define __IL_CONTROLS_H + +#ifdef __cplusplus +extern "C" { +#endif + +int diallua_open (void); +int gaugelua_open (void); +int masklua_open (void); +int matrixlua_open (void); +int cblua_open (void); +int colorbarlua_open (void); +int cellslua_open(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srclua3/il_dial.c b/iup/srclua3/il_dial.c new file mode 100755 index 0000000..60582e6 --- /dev/null +++ b/iup/srclua3/il_dial.c @@ -0,0 +1,53 @@ +/** \file + * \brief Bindig of iupdial to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iupcontrols.h" + +#include +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static void CreateDial(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupDial(luaL_check_string(1)), tag); +} + +int diallua_open(void) +{ + lua_register("iupCreateDial", CreateDial); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/dial_be64.loh" +#else +#include "loh/dial_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/dial_le64w.loh" +#else +#include "loh/dial_le64.loh" +#endif +#else +#include "loh/dial.loh" +#endif +#endif +#else + iuplua_dofile("luadial.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/il_gauge.c b/iup/srclua3/il_gauge.c new file mode 100755 index 0000000..670bb96 --- /dev/null +++ b/iup/srclua3/il_gauge.c @@ -0,0 +1,52 @@ +/** \file + * \brief Bindig of iupgauge to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iupcontrols.h" + +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static void CreateGauge(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupGauge(), tag); +} + +int gaugelua_open(void) +{ + lua_register("iupCreateGauge", CreateGauge); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/gauge_be64.loh" +#else +#include "loh/gauge_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/gauge_le64w.loh" +#else +#include "loh/gauge_le64.loh" +#endif +#else +#include "loh/gauge.loh" +#endif +#endif +#else + iuplua_dofile("luagauge.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/il_getcolor.c b/iup/srclua3/il_getcolor.c new file mode 100755 index 0000000..96ef20d --- /dev/null +++ b/iup/srclua3/il_getcolor.c @@ -0,0 +1,42 @@ +/** \file + * \brief Bindig of iupgc to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" + +#include +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + +static void GetColor(void) +{ + int x = luaL_check_int(1); + int y = luaL_check_int(2); + unsigned char r = (unsigned char)luaL_check_int(3); + unsigned char g = (unsigned char)luaL_check_int(4); + unsigned char b = (unsigned char)luaL_check_int(5); + + if (IupGetColor(x, y, &r, &g, &b )) + { + lua_pushnumber(r); + lua_pushnumber(g); + lua_pushnumber(b); + } + else + { + lua_pushnil(); + } +} + +int gclua_open(void) +{ + iuplua_register("IupGetColor", GetColor); + return 1; +} diff --git a/iup/srclua3/il_getparam.c b/iup/srclua3/il_getparam.c new file mode 100755 index 0000000..28a41be --- /dev/null +++ b/iup/srclua3/il_getparam.c @@ -0,0 +1,171 @@ +/** \file + * \brief Bindig of iupgetparam to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include + +#include "iup.h" + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +/* Used only by the Lua binding */ +int iupGetParamCount(const char *format, int *param_extra); +char iupGetParamType(const char* format, int *line_size); + + +typedef struct _getparam_data +{ + int has_func; + int func_ref; +}getparam_data; + +static int param_action(Ihandle* dialog, int param_index, void* user_data) +{ + int ret = 1; + getparam_data* gp = (getparam_data*)user_data; + if (gp->has_func) + { + lua_Object func; + lua_beginblock(); + func = lua_getref(gp->func_ref); + iuplua_pushihandle(dialog); + lua_pushnumber(param_index); + lua_callfunction(func); + ret = (int)luaL_check_number(1); + lua_endblock(); + } + return ret; +} + +static void GetParam(void) +{ + getparam_data gp; + lua_Object func; + const char* title = luaL_check_string(1); + void* user_data = (void*)&gp; + const char* format = luaL_check_string(3); + int param_count, param_extra, i, size, ret, + line_size = 0, lua_param_start = 4; + const char* f = format; + const char* s; + void* param_data[50]; + char param_type[50]; + + gp.has_func = 0; + gp.func_ref = 0; + + memset(param_data, 0, sizeof(void*)*50); + memset(param_type, 0, sizeof(char)*50); + + param_count = iupGetParamCount(format, ¶m_extra); + + for (i = 0; i < param_count; i++) + { + char t = iupGetParamType(f, &line_size); + + if (t == 't') /* if separator */ + { + f += line_size; + i--; /* compensate next increment */ + continue; + } + + switch(t) + { + case 'b': + case 'i': + case 'l': + param_data[i] = malloc(sizeof(int)); + *(int*)(param_data[i]) = (int)luaL_check_number(lua_param_start); lua_param_start++; + break; + case 'a': + case 'r': + param_data[i] = malloc(sizeof(float)); + *(float*)(param_data[i]) = (float)luaL_check_number(lua_param_start); lua_param_start++; + break; + case 's': + case 'm': + s = luaL_check_string(lua_param_start); lua_param_start++; + size = strlen(s); + if (size < 512) + param_data[i] = malloc(512); + else + param_data[i] = malloc(2*size); + memcpy(param_data[i], s, size+1); + break; + } + + param_type[i] = t; + f += line_size; + } + + func = lua_getparam(2); + if (lua_isfunction(func)) + { + lua_pushobject(func); + gp.func_ref = lua_ref(1); + gp.has_func = 1; + } + + ret = IupGetParamv(title, param_action, user_data, format, param_count, param_extra, param_data); + + lua_pushnumber(ret); + + if (ret) + { + for (i = 0; i < param_count; i++) + { + switch(param_type[i]) + { + case 'b': + case 'i': + case 'l': + lua_pushnumber(*(int*)(param_data[i])); + break; + case 'a': + case 'r': + lua_pushnumber(*(float*)(param_data[i])); + break; + case 's': + case 'm': + lua_pushstring((char*)(param_data[i])); + break; + } + } + } + + for (i = 0; i < param_count; i++) + { + free(param_data[i]); + } + + if (gp.has_func) + lua_unref(gp.func_ref); +} + +static void GetParamParam(void) +{ + Ihandle* param; + Ihandle *dialog = iuplua_checkihandle(1); + int param_index = luaL_check_int(2); + char param_str[50]; + sprintf(param_str, "PARAM%d", param_index); + param = (Ihandle*)IupGetAttribute(dialog, param_str); + iuplua_pushihandle(param); +} + +void getparamlua_open(void) +{ + iuplua_register("IupGetParam", GetParam); + iuplua_register("IupGetParamParam", GetParamParam); +} diff --git a/iup/srclua3/il_mask.c b/iup/srclua3/il_mask.c new file mode 100755 index 0000000..7f44090 --- /dev/null +++ b/iup/srclua3/il_mask.c @@ -0,0 +1,138 @@ +/** \file + * \brief Bindig of iupmask to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iupmask.h" + +#include +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static void cfMaskSet (void) +{ + iupmaskSet(iuplua_checkihandle(1), + luaL_check_string(2), + luaL_check_int(3), + luaL_check_int(4)); +} + +static void cfMaskRemove (void) +{ + iupmaskRemove(iuplua_checkihandle(1)); +} + +static void cfMaskMatSet(void) +{ + iupmaskMatSet(iuplua_checkihandle(1), + luaL_check_string(2), + luaL_check_int(3), + luaL_check_int(4), + luaL_check_int(5), + luaL_check_int(6)); + +} + +static void cfMaskMatRemove(void) +{ + iupmaskMatRemove(iuplua_checkihandle(1), + luaL_check_int(2), + luaL_check_int(3)); + +} + +static void cfMaskSetInt(void) +{ + iupmaskSetInt(iuplua_checkihandle(1), + luaL_check_int(2), + luaL_check_int(3), + luaL_check_int(4)); + +} + +static void cfMaskSetFloat(void) +{ + iupmaskSetFloat(iuplua_checkihandle(1), + luaL_check_int(2), + (float)luaL_check_number(3), + (float)luaL_check_number(4)); + + +} + +static void cfMaskMatSetInt (void) +{ + iupmaskMatSetInt(iuplua_checkihandle(1), + luaL_check_int(2), + luaL_check_int(3), + luaL_check_int(4), + luaL_check_int(5), + luaL_check_int(6)); + +} + +static void cfMaskMatSetFloat (void) +{ + iupmaskMatSetFloat(iuplua_checkihandle(1), + luaL_check_int(2), + (float)luaL_check_number(3), + (float)luaL_check_number(4), + luaL_check_int(5), + luaL_check_int(6)); +} + +static void cfMaskCheck (void) +{ + iupmaskCheck(iuplua_checkihandle(1)); +} + +static void cfMaskMatCheck (void) +{ + iupmaskMatCheck(iuplua_checkihandle(1), + luaL_check_int(2), + luaL_check_int(3)); +} + +static int match_cb (Ihandle *handle) +{ + iuplua_call_start(handle, "match_cb"); + return iuplua_call(); +} + + +int masklua_open(void) +{ + iuplua_regstring_mask(IUP_MASK_FLOAT, "IUPMASK_FLOAT"); + iuplua_regstring_mask(IUP_MASK_UFLOAT, "IUPMASK_UFLOAT"); + iuplua_regstring_mask(IUP_MASK_EFLOAT, "IUPMASK_EFLOAT"); + iuplua_regstring_mask(IUP_MASK_INT, "IUPMASK_INT"); + iuplua_regstring_mask(IUP_MASK_UINT, "IUPMASK_UINT"); + iuplua_regstring(IUP_MASK_FLOAT, "IUP_MASK_FLOAT"); + iuplua_regstring(IUP_MASK_UFLOAT, "IUP_MASK_UFLOAT"); + iuplua_regstring(IUP_MASK_EFLOAT, "IUP_MASK_EFLOAT"); + iuplua_regstring(IUP_MASK_INT, "IUP_MASK_INT"); + iuplua_regstring(IUP_MASK_UINT, "IUP_MASK_UINT"); + + iuplua_register("iupmaskRemove", cfMaskRemove); + iuplua_register("iupmaskMatRemove", cfMaskMatRemove); + iuplua_register("iupmaskSet", cfMaskSet); + iuplua_register("iupmaskMatSet", cfMaskMatSet); + iuplua_register("iupmaskSetInt", cfMaskSetInt); + iuplua_register("iupmaskSetFloat", cfMaskSetFloat); + iuplua_register("iupmaskMatSetInt", cfMaskMatSetInt); + iuplua_register("iupmaskMatSetFloat", cfMaskMatSetFloat); + iuplua_register("iupmaskCheck", cfMaskCheck); + iuplua_register("iupmaskMatCheck", cfMaskMatCheck); + + lua_register("iup_match_cb", (lua_CFunction)match_cb); + + return lua_dostring("iup_callbacks.match_cb = {\"MATCH_CB\", iup_match_cb}"); +} diff --git a/iup/srclua3/il_matrix.c b/iup/srclua3/il_matrix.c new file mode 100755 index 0000000..21bb8ce --- /dev/null +++ b/iup/srclua3/il_matrix.c @@ -0,0 +1,308 @@ +/** \file + * \brief Bindig of iupmatrix to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iupcontrols.h" + +#include + +#include + +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static int MATRIX_draw(Ihandle *handle, int lin, int col, + int x1, int x2, int y1, int y2, cdCanvas* cnv) +{ + iuplua_call_start(handle, "draw"); + lua_pushnumber(lin); + lua_pushnumber(col); + lua_pushnumber(x1); + lua_pushnumber(x2); + lua_pushnumber(y1); + lua_pushnumber(y2); + cdlua_pushcanvas(cnv); + return iuplua_call(); +} + +static int MATRIX_action (Ihandle *handle, int c, int lin, int col, int active, char *after) +{ + iuplua_call_start(handle, "action"); + lua_pushnumber(c); + lua_pushnumber(lin); + lua_pushnumber(col); + lua_pushnumber(active); + lua_pushstring(after); + return iuplua_call(); +} + +static int MATRIX_edition (Ihandle *handle, int lin, int col, int modo, int update) +{ + iuplua_call_start(handle, "edition"); + lua_pushnumber(lin); + lua_pushnumber(col); + lua_pushnumber(modo); + lua_pushnumber(update); + return iuplua_call(); +} + +static int MATRIX_dropcheck (Ihandle *handle, int lin, int col) +{ + iuplua_call_start(handle, "dropcheck"); + lua_pushnumber(lin); + lua_pushnumber(col); + return iuplua_call(); +} + +static int MATRIX_markedit_cb (Ihandle *handle, int lin, int col, int marked) +{ + iuplua_call_start(handle, "markedit_cb"); + lua_pushnumber(lin); + lua_pushnumber(col); + lua_pushnumber(marked); + return iuplua_call(); +} + +static int MATRIX_mark_cb (Ihandle *handle, int lin, int col) +{ + iuplua_call_start(handle, "mark_cb"); + lua_pushnumber(lin); + lua_pushnumber(col); + return iuplua_call(); +} + +static int MATRIX_drop (Ihandle *handle, Ihandle *drop, int lin, int col) +{ + iuplua_regihandle(drop); + iuplua_call_start(handle, "drop"); + iuplua_pushihandle_cb(drop); + lua_pushnumber(lin); + lua_pushnumber(col); + return iuplua_call(); +} + +static int MATRIX_dropselect (Ihandle *handle, int lin, int col, + Ihandle *list, char *t, int i, int v) +{ + iuplua_regihandle(list); + iuplua_call_start(handle, "dropselect"); + lua_pushnumber(lin); + lua_pushnumber(col); + iuplua_pushihandle_cb(list); + lua_pushstring(t); + lua_pushnumber(i); + lua_pushnumber(v); + return iuplua_call(); +} + +static int MATRIX_enteritem (Ihandle *handle, int lin, int col) +{ + iuplua_call_start(handle, "enteritem"); + lua_pushnumber(lin); + lua_pushnumber(col); + return iuplua_call(); +} + +static int MATRIX_leaveitem (Ihandle *handle, int lin, int col) +{ + iuplua_call_start(handle, "leaveitem"); + lua_pushnumber(lin); + lua_pushnumber(col); + return iuplua_call(); +} + +static int MATRIX_mousemove (Ihandle *handle, int lin, int col) +{ + iuplua_call_start(handle, "mousemove"); + lua_pushnumber(lin); + lua_pushnumber(col); + return iuplua_call(); +} + +static int MATRIX_click (Ihandle *handle, int lin, int col, char *r) +{ + iuplua_call_start(handle, "click"); + lua_pushnumber(lin); + lua_pushnumber(col); + lua_pushstring(r); + return iuplua_call(); +} + +static int MATRIX_release_cb (Ihandle *handle, int lin, int col, char *r) +{ + iuplua_call_start(handle, "release_cb"); + lua_pushnumber(lin); + lua_pushnumber(col); + lua_pushstring(r); + return iuplua_call(); +} + +static int MATRIX_scrolltop (Ihandle *handle, int lin, int col) +{ + iuplua_call_start(handle, "scrolltop"); + lua_pushnumber(lin); + lua_pushnumber(col); + return iuplua_call(); +} + +static int MATRIX_color(Ihandle *handle, char* name, int lin, int col, unsigned int *red, unsigned int *green, unsigned int *blue) +{ + lua_Object obj; + iuplua_call_start(handle, name); + lua_pushnumber(lin); + lua_pushnumber(col); + if (lua_call ("iupCallMethod")) + { + lua_endblock (); + return IUP_IGNORE; + } + obj = lua_getresult (1); + if (obj == LUA_NOOBJECT) + { + lua_endblock (); + return IUP_IGNORE; + } + else if (lua_isnumber (obj)) + { + int ret; + *red = (unsigned int)lua_getnumber (obj); + + obj = lua_getresult (2); + if (obj == LUA_NOOBJECT || !lua_isnumber (obj)) + { + lua_endblock (); + return IUP_IGNORE; + } + *green = (unsigned int)lua_getnumber (obj); + + obj = lua_getresult (3); + if (obj == LUA_NOOBJECT || !lua_isnumber (obj)) + { + lua_endblock (); + return IUP_IGNORE; + } + *blue = (unsigned int)lua_getnumber (obj); + + obj = lua_getresult (4); + if (obj == LUA_NOOBJECT || !lua_isnumber (obj)) + { + lua_endblock (); + return IUP_DEFAULT; + } + ret = (int)lua_getnumber (obj); + lua_endblock (); + return ret; + } + + lua_endblock (); + return IUP_IGNORE; +} + +static int MATRIX_fgcolor(Ihandle *handle, int lin, int col, unsigned int *red, unsigned int *green, unsigned int *blue) +{ + return MATRIX_color(handle, "fgcolorcb", lin, col, red, green, blue); +} + +static int MATRIX_bgcolor(Ihandle *handle, int lin, int col, unsigned int *red, unsigned int *green, unsigned int *blue) +{ + return MATRIX_color(handle, "bgcolorcb", lin, col, red, green, blue); +} + +static char* MATRIX_value (Ihandle *handle, int lin, int col) +{ + iuplua_call_start(handle, "valuecb"); + lua_pushnumber(lin); + lua_pushnumber(col); + return iuplua_call_rs(); +} + +static int MATRIX_value_edit (Ihandle *handle, int lin, int col, char* val) +{ + iuplua_call_start(handle, "value_edit"); + lua_pushnumber(lin); + lua_pushnumber(col); + lua_pushstring(val); + return iuplua_call(); +} + +static char* MATRIX_font_cb (Ihandle *handle, int lin, int col) +{ + iuplua_call_start(handle, "font_cb"); + lua_pushnumber(lin); + lua_pushnumber(col); + return iuplua_call_rs(); +} + +static void CreateMatrix(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupMatrix(NULL), tag); +} + +int matrixlua_open(void) +{ + struct AssocList { + char *name; + lua_CFunction func; + } MatAssocList [] = { + {"iup_mat_action_cb", (lua_CFunction)MATRIX_action}, + {"iup_mat_edition_cb", (lua_CFunction)MATRIX_edition}, + {"iup_mat_enteritem_cb", (lua_CFunction)MATRIX_enteritem}, + {"iup_mat_drop_cb", (lua_CFunction)MATRIX_drop}, + {"iup_mat_dropselect_cb", (lua_CFunction)MATRIX_dropselect}, + {"iup_mat_leaveitem_cb", (lua_CFunction)MATRIX_leaveitem}, + {"iup_mat_click_cb", (lua_CFunction)MATRIX_click}, + {"iup_mat_release_cb", (lua_CFunction)MATRIX_release_cb}, + {"iup_mat_mousemove_cb", (lua_CFunction)MATRIX_mousemove}, + {"iup_mat_scrolltop_cb", (lua_CFunction)MATRIX_scrolltop}, + {"iup_mat_fgcolor_cb", (lua_CFunction)MATRIX_fgcolor}, + {"iup_mat_bgcolor_cb", (lua_CFunction)MATRIX_bgcolor}, + {"iup_mat_draw_cb", (lua_CFunction)MATRIX_draw}, + {"iup_mat_dropcheck_cb", (lua_CFunction)MATRIX_dropcheck}, + {"iup_mat_font_cb", (lua_CFunction)MATRIX_font_cb}, + {"iup_mat_value_cb", (lua_CFunction)MATRIX_value}, + {"iup_mat_value_edit_cb", (lua_CFunction)MATRIX_value_edit}, + {"iup_mat_mark_cb", (lua_CFunction)MATRIX_mark_cb}, + {"iup_mat_markedit_cb", (lua_CFunction)MATRIX_markedit_cb} + }; + int SizeMatAssocList = (sizeof(MatAssocList)/sizeof(struct AssocList)); + int i; + + lua_register("iupCreateMatrix", CreateMatrix); + + for (i = 0; i < SizeMatAssocList; i++) + lua_register(MatAssocList[i].name, MatAssocList[i].func); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/matrix_be64.loh" +#else +#include "loh/matrix_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/matrix_le64w.loh" +#else +#include "loh/matrix_le64.loh" +#endif +#else +#include "loh/matrix.loh" +#endif +#endif +#else + iuplua_dofile("luamatrix.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/il_sbox.c b/iup/srclua3/il_sbox.c new file mode 100755 index 0000000..6742819 --- /dev/null +++ b/iup/srclua3/il_sbox.c @@ -0,0 +1,50 @@ +/** \file + * \brief Bindig of iupsbox to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" + +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + +static void CreateSbox(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupSbox(iuplua_checkihandle(1)), tag); +} + +int sboxlua_open(void) +{ + lua_register("iupCreateSbox", CreateSbox); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/sbox_be64.loh" +#else +#include "loh/sbox_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/sbox_le64w.loh" +#else +#include "loh/sbox_le64.loh" +#endif +#else +#include "loh/sbox.loh" +#endif +#endif +#else + iuplua_dofile("luasbox.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/il_scanf.c b/iup/srclua3/il_scanf.c new file mode 100755 index 0000000..d98b586 --- /dev/null +++ b/iup/srclua3/il_scanf.c @@ -0,0 +1,181 @@ +/** \file + * \brief Iup API in Lua + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include + +#include "iup.h" + +#include "iuplua.h" +#include "il.h" + +#include "iup_str.h" +#include "iup_predial.h" + +#define ALLOC(n,t) ((t *)calloc((n),sizeof(t))) +#define REQUIRE(b) {if (!(b)) goto cleanup;} + +void iupluaScanf(void) +{ + char *format; + int i; + int fields; + int *width = NULL; + int *scroll = NULL; + char **prompt = NULL; + char **text = NULL; + char *title = NULL; + char *s = NULL; + char *s1 = NULL; + char *outf = NULL; + int indParam; /* va_list va; */ + + format = luaL_check_string(1); + fields = iupStrCountChar(format, '\n') - 1; + REQUIRE(fields > 0); + width = ALLOC(fields, int); + REQUIRE(width != NULL); + scroll = ALLOC(fields, int); + REQUIRE(scroll != NULL); + prompt = ALLOC(fields, char *); + REQUIRE(prompt != NULL); + text = ALLOC(fields, char *); + REQUIRE(text != NULL); + + indParam = 2; /* va_start(va,format); */ + REQUIRE((s1 = s = (char *) iupStrDup(format)) != NULL); + title = iupStrCopyUntil(&s, '\n'); + REQUIRE(title != NULL); + for (i = 0; i < fields; ++i) { + int n; + prompt[i] = iupStrCopyUntil(&s, '%'); + REQUIRE(prompt[i] != NULL); + n = sscanf(s, "%d.%d", width + i, scroll + i); + REQUIRE(n == 2); + s = strchr(s, '%'); + REQUIRE(s != NULL); + if (outf) free(outf); + outf = iupStrCopyUntil(&s, '\n'); + text[i] = ALLOC(width[i] + 1, char); + REQUIRE(text[i] != NULL); + + switch (s[-2]) { + case 'd': + case 'i': + case 'o': + case 'u': + case 'x': + case 'X': + if (s[-3] == 'l') + sprintf(text[i], outf, luaL_check_long(indParam++)); + else if (s[-3] == 'h') + sprintf(text[i], outf, (short)luaL_check_int(indParam++)); + else + sprintf(text[i], outf, luaL_check_int(indParam++)); + break; + case 'e': + case 'f': + case 'g': + case 'E': + case 'G': + if (s[-3] == 'l') + sprintf(text[i], outf, luaL_check_number(indParam++)); + else + sprintf(text[i], outf, (float)luaL_check_number(indParam++)); + break; + case 's': + sprintf(text[i], outf, (char *)luaL_check_string(indParam++)); + break; + default: + goto cleanup; + } + } + /* va_end(va); */ + + REQUIRE(iupDataEntry(fields, width, scroll, title, prompt, text)>0); + + /* va_start(va,format); */ + s = strchr(format, '\n') + 1; + for (i = 0; i < fields; ++i) { + s = strchr(s, '\n') + 1; + switch (s[-2]) { + case 'd': + case 'u': + if (s[-3] == 'l') { + long l = 0; + sscanf(text[i], "%ld", &l); + lua_pushnumber(l); + } else if (s[-3] == 'h') { + short l = 0; + sscanf(text[i], "%hd", &l); + lua_pushnumber(l); + } else { + int l = 0; + sscanf(text[i], "%d", &l); + lua_pushnumber(l); + } + break; + case 'i': + case 'o': + case 'x': + case 'X': + if (s[-3] == 'l') { + long l = 0; + sscanf(text[i], "%li", &l); + lua_pushnumber(l); + } else if (s[-3] == 'h') { + short l = 0; + sscanf(text[i], "%hi", &l); + lua_pushnumber(l); + } else { + int l = 0; + sscanf(text[i], "%i", &l); + lua_pushnumber(l); + } + break; + case 'e': + case 'f': + case 'g': + case 'E': + case 'G': + if (s[-3] == 'l') { + double l = 0; + sscanf(text[i], "%lg", &l); + lua_pushnumber(l); + } else { + float l = 0; + sscanf(text[i], "%g", &l); + lua_pushnumber(l); + } + break; + case 's': + lua_pushstring(text[i]); + break; + } + } + /* va_end(va); */ + +cleanup: + if (s1) free(s1); + if (title) free(title); + if (width) free(width); + if (scroll) free(scroll); + if (outf) free(outf); + if (prompt) { + for (i = 0; i < fields; ++i) + if (prompt[i]) free(prompt[i]); + free(prompt); + } + if (text) { + for (i = 0; i < fields; ++i) + if (text[i]) free(text[i]); + free(text); + } +} diff --git a/iup/srclua3/il_spin.c b/iup/srclua3/il_spin.c new file mode 100755 index 0000000..6319c51 --- /dev/null +++ b/iup/srclua3/il_spin.c @@ -0,0 +1,66 @@ +/** \file + * \brief Bindig of iupspin to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" + +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static int SPIN_spin_cb (Ihandle *handle, int v) +{ + iuplua_call_start(handle, "spincb"); + lua_pushnumber(v); + return iuplua_call(); +} + +static void CreateSpin(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupSpin(), tag); +} + +static void CreateSpinbox(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupSpinbox(iuplua_checkihandle(1)), tag); +} + +int spinlua_open(void) +{ + lua_register("iupCreateSpin", CreateSpin); + lua_register("iupCreateSpinbox", CreateSpinbox); + lua_register("iup_spin_cb", (lua_CFunction)SPIN_spin_cb); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/spin_be64.loh" +#else +#include "loh/spin_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/spin_le64w.loh" +#else +#include "loh/spin_le64.loh" +#endif +#else +#include "loh/spin.loh" +#endif +#endif +#else + iuplua_dofile("luaspin.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/il_tabs.c b/iup/srclua3/il_tabs.c new file mode 100755 index 0000000..59332ec --- /dev/null +++ b/iup/srclua3/il_tabs.c @@ -0,0 +1,67 @@ +/** \file + * \brief Bindig of iuptabs to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" + +#include +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static int TABS_tabchange (Ihandle *handle, Ihandle *newtab, Ihandle *oldtab ) +{ + iuplua_regihandle(newtab); + iuplua_regihandle(oldtab); + iuplua_call_start(handle, "tabchange"); + iuplua_pushihandle_cb(newtab); + iuplua_pushihandle_cb(oldtab); + return iuplua_call(); +} + +static void CreateTabs(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + Ihandle** params = iuplua_checkihandle_array(1); + lua_pushusertag(IupTabsv(params), tag); + free(params); +} + +int tabslua_open(void) +{ + lua_register("iupCreateTabs", CreateTabs); + lua_register("iup_tabchange_cb", (lua_CFunction)TABS_tabchange); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/tabs_be64.loh" +#else +#include "loh/tabs_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/tabs_le64w.loh" +#else +#include "loh/tabs_le64.loh" +#endif +#else +#include "loh/tabs.loh" +#endif +#endif +#else + iuplua_dofile("luatabs.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/il_tree.c b/iup/srclua3/il_tree.c new file mode 100755 index 0000000..8d5fcf8 --- /dev/null +++ b/iup/srclua3/il_tree.c @@ -0,0 +1,283 @@ +/** \file + * \brief Bindig of iuptree to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iupcontrols.h" + +#include +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static int TREE_pattern (Ihandle *handle, int id, char* name) +{ + iuplua_call_start(handle, name); + lua_pushnumber(id); + return iuplua_call(); +} + +static int TREE_branchopen (Ihandle *handle, int id) +{ + return TREE_pattern(handle,id,"branchopen"); +} + +static int TREE_branchclose (Ihandle *handle, int id) +{ + return TREE_pattern(handle,id,"branchclose"); +} + +static int TREE_showrename (Ihandle *handle, int id) +{ + return TREE_pattern(handle,id,"showrenamecb"); +} + +static int TREE_executeleaf (Ihandle *handle, int id) +{ + return TREE_pattern(handle,id,"executeleaf"); +} + +static int TREE_selection (Ihandle *handle, int node, int state) +{ + iuplua_call_start(handle, "selection"); + lua_pushnumber(node); + lua_pushnumber(state); + return iuplua_call(); +} + +static int TREE_renamenode (Ihandle *handle, int id, char* name) +{ + iuplua_call_start(handle, "renamenode"); + lua_pushnumber(id); + lua_pushstring(name); + return iuplua_call(); +} + +static int TREE_rename (Ihandle *handle, int id, char* name) +{ + iuplua_call_start(handle, "renamecb"); + lua_pushnumber(id); + lua_pushstring(name); + return iuplua_call(); +} + +static int TREE_multiselection (Ihandle *handle, int *ids, int n) +{ + int i; + lua_Object tb; + + iuplua_call_start(handle, "multiselection"); + + tb = lua_createtable(); + for (i = 0; i < n; i++) + { + lua_beginblock(); + lua_pushobject(tb); + lua_pushnumber(i+1); + lua_pushnumber(ids[i]); + lua_settable(); + lua_endblock(); + } + lua_pushobject(tb); + + lua_pushnumber (n); + return iuplua_call(); +} + +static int TREE_dragdrop(Ihandle* handle, int drag_id, int drop_id, int isshift, int iscontrol) +{ + iuplua_call_start(handle, "dragdrop"); + lua_pushnumber(drag_id); + lua_pushnumber(drop_id); + lua_pushnumber(isshift); + lua_pushnumber(iscontrol); + return iuplua_call(); +} + +static int TREE_rightclick (Ihandle *handle, int id, char* r) +{ + iuplua_call_start(handle, "rightclick"); + lua_pushnumber(id); + lua_pushstring(r); + return iuplua_call(); +} + +static void CreateTree(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupTree(), tag); +} + +static int tree_getnumberintable(lua_Object o) +{ + lua_pushobject(lua_getglobal("IUPTREEREFERENCETABLE")); + lua_pushobject(o); + return (int)lua_getnumber(lua_rawgettable()); +} + +static void tree_setnumberintable(lua_Object o, int ref) +{ + /* Set in global table in index o, the value of ref. + If ref is 0, then set nil in the table. */ + lua_pushobject(lua_getglobal("IUPTREEREFERENCETABLE")); + lua_pushobject(o); + if(ref == 0) + lua_pushnil(); + else + lua_pushnumber(ref); + lua_rawsettable(); +} + +static void* check_userdata(int numArg) +{ + lua_Object o = lua_getparam(numArg); + luaL_arg_check(lua_isuserdata(o), numArg, "userdata expected"); + return lua_getuserdata(o); +} + +static void cfTreeSetUserId(void) +{ + lua_pushnumber(IupTreeSetUserId(iuplua_checkihandle(1), luaL_check_int(2), check_userdata(3))); +} + +static void cfTreeGetUserId(void) +{ + lua_pushusertag(IupTreeGetUserId(iuplua_checkihandle(1), luaL_check_int(2)), LUA_ANYTAG); +} + +static lua_Object tree_gettable(Ihandle* ih, int id) +{ + int ref = (int)IupTreeGetUserId(ih, id); + if(ref == 0) + return LUA_NOOBJECT; + else + return lua_getref(ref-1); +} + +static void cfTreeSetTableId(void) +{ + Ihandle* ih = iuplua_checkihandle(1); + int id = luaL_check_int(2); + + lua_Object o3 = lua_getparam(3); + if(lua_isnil(o3)) + { + int ref; + /* Setting in the id table the reference as nil */ + o3 = tree_gettable(ih, id); + if(o3 != LUA_NOOBJECT) + tree_setnumberintable(o3, 0); + + ref = (int)IupTreeGetUserId(ih, id); + lua_unref(ref); + lua_pushnumber(IupTreeSetUserId(ih, id, NULL)); + } + else + { + int ref; + lua_pushobject(o3); + ref = lua_ref(1); + lua_pushnumber(IupTreeSetUserId(ih, id, (void*)(ref+1))); + tree_setnumberintable(o3, ref+1); + } +} + +static void cfTreeGetTable(void) +{ + Ihandle* ih = iuplua_checkihandle(1); + int id = luaL_check_int(2); + + lua_Object o3 = tree_gettable(ih, id); + if(o3 == LUA_NOOBJECT) + lua_pushnil(); + else + lua_pushobject(o3); +} + +static int tree_gettableid(Ihandle* ih, lua_Object o) +{ + int ref = tree_getnumberintable(o); + if(ref == 0) + return -1; + return IupTreeGetId(ih, (void*) ref); +} + +static void cfTreeGetTableId(void) +{ + Ihandle* ih = iuplua_checkihandle(1); + lua_Object o2 = luaL_tablearg(2); + int ret = tree_gettableid(ih, o2); + if(ret == -1) + lua_pushnil(); + else + lua_pushnumber(ret); +} + +static void cfTreeGetId(void) +{ + lua_pushnumber(IupTreeGetId(iuplua_checkihandle(1), check_userdata(2))); +} + +int treelua_open(void) +{ + struct AssocList { + char *name; + lua_CFunction func; + } TreeAssocList [] = { + {"iup_tree_multiselection_cb", (lua_CFunction)TREE_multiselection}, + {"iup_tree_selection_cb", (lua_CFunction)TREE_selection}, + {"iup_tree_branchopen_cb", (lua_CFunction)TREE_branchopen}, + {"iup_tree_branchclose_cb", (lua_CFunction)TREE_branchclose}, + {"iup_tree_executeleaf_cb", (lua_CFunction)TREE_executeleaf}, + {"iup_tree_renamenode_cb", (lua_CFunction)TREE_renamenode}, + {"iup_tree_rename_cb", (lua_CFunction)TREE_rename}, + {"iup_tree_showrename_cb", (lua_CFunction)TREE_showrename}, + {"iup_tree_dragdrop_cb", (lua_CFunction)TREE_dragdrop}, + {"iup_tree_rightclick_cb", (lua_CFunction)TREE_rightclick} + }; + int SizeTreeAssocList = (sizeof(TreeAssocList)/sizeof(struct AssocList)); + int i ; + + iuplua_register("IupTreeSetUserId", cfTreeSetUserId); + iuplua_register("IupTreeGetUserId", cfTreeGetUserId); + iuplua_register("IupTreeGetId", cfTreeGetId); + iuplua_register("IupTreeSetTableId", cfTreeSetTableId); + iuplua_register("IupTreeGetTableId", cfTreeGetTableId); + iuplua_register("IupTreeGetTable", cfTreeGetTable); + + lua_register("iupCreateTree", CreateTree); + + for (i = 0; i < SizeTreeAssocList; i++) + lua_register(TreeAssocList[i].name, TreeAssocList[i].func); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/tree_be64.loh" +#else +#include "loh/tree_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/tree_le64w.loh" +#else +#include "loh/tree_le64.loh" +#endif +#else +#include "loh/tree.loh" +#endif +#endif +#else + iuplua_dofile("luatree.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/il_val.c b/iup/srclua3/il_val.c new file mode 100755 index 0000000..ae99754 --- /dev/null +++ b/iup/srclua3/il_val.c @@ -0,0 +1,77 @@ +/** \file + * \brief Bindig of iupval to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iupcontrols.h" + +#include +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static int VAL_mousemove (Ihandle *handle, double v) +{ + iuplua_call_start(handle, "mousemove"); + lua_pushnumber(v); + return iuplua_call(); +} + +static int VAL_button_press (Ihandle *handle, double v) +{ + iuplua_call_start(handle, "buttonpress"); + lua_pushnumber(v); + return iuplua_call(); +} + +static int VAL_button_release (Ihandle *handle, double v) +{ + iuplua_call_start(handle, "buttonrelease"); + lua_pushnumber(v); + return iuplua_call(); +} + +static void CreateVal(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupVal(luaL_check_string(1)), tag); +} + +int vallua_open(void) +{ + lua_register("iupCreateVal", CreateVal); + lua_register("iup_val_mousemove_cb", (lua_CFunction)VAL_mousemove); + lua_register("iup_val_button_press_cb", (lua_CFunction)VAL_button_press); + lua_register("iup_val_button_release_cb", (lua_CFunction)VAL_button_release); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/val_be64.loh" +#else +#include "loh/val_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/val_le64w.loh" +#else +#include "loh/val_le64.loh" +#endif +#else +#include "loh/val.loh" +#endif +#endif +#else + iuplua_dofile("luaval.lua"); +#endif + + return 1; +} diff --git a/iup/srclua3/iup_pplot.mak b/iup/srclua3/iup_pplot.mak new file mode 100755 index 0000000..66ee7db --- /dev/null +++ b/iup/srclua3/iup_pplot.mak @@ -0,0 +1,15 @@ +PROJNAME = iup +LIBNAME = iuplua_pplot3 +OPT = YES + +USE_LUA = Yes +USE_CDLUA = Yes + +LOHDIR = loh +SRCLUA = pplot.lua +SRC = iuplua_pplot.c + +DEFINES = IUPLUA_USELOH +INCLUDES = ../include +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup iuplua3 iup_pplot iupcd diff --git a/iup/srclua3/iupcd.mak b/iup/srclua3/iupcd.mak new file mode 100755 index 0000000..36db871 --- /dev/null +++ b/iup/srclua3/iupcd.mak @@ -0,0 +1,19 @@ +PROJNAME = iup +LIBNAME = iupluacd3 +OPT = YES + +DEF_FILE = iupluacd3.def +SRC = iuplua_cd.c + +# Can not use USE_IUPLUA because Tecmake will include "iupluacd3" in linker + +INCLUDES = ../include +LIBS = iuplua3 +LDIR = ../lib/$(TEC_UNAME) + +IUP := .. + +USE_CD = YES +USE_IUP3 = YES +USE_LUA = YES +USE_CDLUA = YES diff --git a/iup/srclua3/iupcontrols.mak b/iup/srclua3/iupcontrols.mak new file mode 100755 index 0000000..4498ddf --- /dev/null +++ b/iup/srclua3/iupcontrols.mak @@ -0,0 +1,19 @@ +BUILD_IUP3 = Yes + +PROJNAME = iup +LIBNAME = iupluacontrols3 +OPT = YES + +USE_LUA = Yes +USE_CDLUA = Yes + +LOHDIR = loh +SRCLUA = dial.lua gauge.lua colorbar.lua \ + matrix.lua colorbrowser.lua cells.lua +SRC = il_dial.c il_gauge.c il_colorbrowser.c il_colorbar.c il_cells.c \ + il_mask.c il_matrix.c iuplua_controls.c + +DEFINES = IUPLUA_USELOH +INCLUDES = ../include +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup iuplua3 iupcontrols iupcd diff --git a/iup/srclua3/iupgl.mak b/iup/srclua3/iupgl.mak new file mode 100755 index 0000000..3d65c48 --- /dev/null +++ b/iup/srclua3/iupgl.mak @@ -0,0 +1,12 @@ +PROJNAME = iup +LIBNAME = iupluagl3 +OPT = YES + +USE_LUA = Yes +USE_OPENGL = Yes + +SRC = iuplua_glcanvas.c + +INCLUDES = ../include +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup iuplua3 iupgl diff --git a/iup/srclua3/iupim.mak b/iup/srclua3/iupim.mak new file mode 100755 index 0000000..e4831ec --- /dev/null +++ b/iup/srclua3/iupim.mak @@ -0,0 +1,12 @@ +PROJNAME = iup +LIBNAME = iupluaim3 +OPT = YES + +USE_LUA = Yes +USE_IM = Yes + +SRC = iuplua_im.c + +INCLUDES = ../include ../src +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup iuplua3 iupim diff --git a/iup/srclua3/iuplua.c b/iup/srclua3/iuplua.c new file mode 100755 index 0000000..7789ce8 --- /dev/null +++ b/iup/srclua3/iuplua.c @@ -0,0 +1,494 @@ +/** \file + * \brief IULUA core - Bindig of iup to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include + +#include "iup.h" +#include "iupkey.h" + +#include "iuplua.h" +#include "il.h" + +#include "iup_str.h" + + +/* from iupkey.c */ +void iupKeyForEach(void (*func)(char *name, int code, void* user_data), void* user_data); + +static int iuplua_tag = 0; +static lua_Object iuplua_namespace; + + +void iuplua_call_start(Ihandle* handle, char* name) +{ + lua_beginblock(); + lua_pushstring(name); + lua_pushusertag(handle, iuplua_tag); +} + +int iuplua_call(void) +{ + lua_Object obj; + + if (lua_call("iupCallMethod")) + { + lua_endblock(); + return IUP_DEFAULT; /* call failed */ + } + + obj = lua_getresult(1); + if (obj == LUA_NOOBJECT) + { + lua_endblock(); + return IUP_DEFAULT; /* no return, provides IUP_DEFAULT return */ + } + else if (lua_isnumber(obj)) + { + int ret = (int) lua_getnumber(obj); + lua_endblock(); + return ret; + } + lua_endblock(); + return IUP_DEFAULT; /* returned a non normal value. what to do? */ +} + +char* iuplua_call_rs(void) +{ + lua_Object obj; + + if (lua_call("iupCallMethod")) + { + lua_endblock(); + return NULL; /* call failed */ + } + + obj = lua_getresult(1); + if (obj == LUA_NOOBJECT) + { + lua_endblock(); + return NULL; /* no return, provides IUP_DEFAULT return */ + } + else if (lua_isstring(obj)) + { + char* ret = lua_getstring(obj); + lua_endblock(); + return ret; + } + lua_endblock(); + return NULL; /* returned a non normal value. what to do? */ +} + +static void iuplua_set_callback(void) +{ + lua_Object o; + Icallback func; + + Ihandle* ih = iuplua_checkihandle(1); + char* name = luaL_check_string(2); + + o = lua_getparam(3); + if (!lua_iscfunction(o)) + lua_error("invalid function when set callback"); + func = (Icallback)lua_getcfunction(o); + + o = lua_getparam(4); + if (lua_isnil(o)) + IupSetCallback(ih, name, (Icallback)NULL); + else + IupSetCallback(ih, name, func); +} + +/*********************************************************************************** +***********************************************************************************/ + +static int idle_ref = 0; +static int default_idle(void) +{ + lua_Object obj; + lua_beginblock(); + obj = lua_getref(idle_ref); + if (lua_callfunction(obj)) + { + lua_endblock(); + return IUP_IGNORE; + } + + obj = lua_getresult(1); + if (lua_isnumber(obj)) + { + int ret = (int) lua_getnumber(obj); + lua_endblock(); + return ret; + } + lua_endblock(); + return IUP_DEFAULT; +} + +static void IupSetIdle(void) +{ + lua_Object obj = lua_getparam(1); + lua_Object old; + if (idle_ref != 0) + old = lua_getref(idle_ref); + else + old = LUA_NOOBJECT; + if (lua_isnil(obj)) + { + lua_unref(idle_ref); + idle_ref = 0; + IupSetFunction("IDLE_ACTION", (Icallback) NULL); + } + else + { + if (!lua_isfunction(obj) && !lua_iscfunction(obj)) + lua_error("IupSetIdle: parameter must be a function or a cfunction"); + lua_pushobject(obj); + idle_ref = lua_ref(1); + IupSetFunction("IDLE_ACTION", (Icallback) default_idle); + } + + if (old == LUA_NOOBJECT) + lua_pushnil(); + else + lua_pushobject(old); +} + +/*********************************************************************************** +***********************************************************************************/ + +static void iuplua_gettable(void) +{ + lua_Object t, index, tab, result; + t = lua_getparam(1); + index = lua_getparam(2); + lua_pushobject(lua_getglobal("iup_handles")); + lua_pushobject(t); + tab = lua_gettable(); + if (lua_isnil(tab)) + { + lua_pushnil(); + return; + } + else + { + lua_Object method; + lua_pushobject(tab); + lua_pushstring("get"); + method = lua_gettable(); + lua_pushobject(tab); + lua_pushobject(index); + if (lua_callfunction(method)) + return; + } + + result = lua_getresult(1); + if (result != LUA_NOOBJECT) + lua_pushobject(result); + else + lua_pushnil(); +} + +static void iuplua_settable(void) +{ + lua_Object t, index, value, tab, result; + t = lua_getparam(1); + index = lua_getparam(2); + value = lua_getparam(3); + lua_pushobject(lua_getglobal("iup_handles")); + lua_pushobject(t); + tab = lua_gettable(); + if (lua_isnil(tab)) + { + lua_pushnil(); + return; + } + else + { + lua_Object method; + lua_pushobject(tab); + lua_pushstring("set"); + method = lua_gettable(); + lua_pushobject(tab); + lua_pushobject(index); + lua_pushobject(value); + if (lua_callfunction(method)) + return; + } + + result = lua_getresult(1); + if (result != LUA_NOOBJECT) + lua_pushobject(result); +} + +static void iuplua_index(void) +{ + lua_Object t, f, result; + t = lua_getparam(1); + f = lua_getparam(2); + if (!(lua_isstring(f) && iupStrEqual(lua_getstring(f), "parent"))) + { + lua_Object p; + lua_pushobject(t); + lua_pushstring("parent"); + p = lua_gettable(); + if (lua_istable(p)) + { + lua_pushobject(p); + lua_pushobject(f); + result = lua_gettable(); + if (lua_isnil(result)) + lua_pushnil(); + else + lua_pushobject(result); + return; + } + } + lua_pushnil(); +} + +/*********************************************************************************** +***********************************************************************************/ + +static void iuplua_setnamespace(char* name, char* new_name) +{ + lua_Object obj = lua_getglobal(name); + lua_pushobject(iuplua_namespace); + lua_pushstring(new_name); + lua_pushobject(obj); + lua_settable(); +} + +void iuplua_register(char* name, lua_CFunction func) +{ + lua_register(name, func); + iuplua_setnamespace(name, name+3); /* IupXxx */ +} + +void iuplua_register_macro(char* name, lua_CFunction func) +{ + lua_register(name, func); + iuplua_setnamespace(name, name); /* xxx */ +} + +void iuplua_regstring_mask(char* str, char* name) +{ + lua_pushstring(str); lua_setglobal(name); + iuplua_setnamespace(name, name+3); /* IUPMASK_XXX */ +} + +void iuplua_regnumber(double num, char* name) +{ + lua_pushnumber(num); lua_setglobal(name); + iuplua_setnamespace(name, name+4); /* IUP_XXXX */ +} + +void iuplua_regstring(char* str, char* name) +{ + lua_pushstring(str); lua_setglobal(name); + iuplua_setnamespace(name, name+4); /* IUP_XXXX */ +} + +void iuplua_regihandle(Ihandle *h) +{ + if (h) + { + lua_pushusertag((void*)h, iuplua_tag); + lua_pushstring(IupGetClassName(h)); + lua_call("IupRegisterHandle"); + } +} + +void iuplua_pushihandle_cb(Ihandle *h) +{ + if (h) + lua_pushusertag((void*)h, iuplua_tag); + else + lua_pushnil(); +} + +void iuplua_pushihandle(Ihandle *h) +{ + if (h) + { + lua_pushusertag((void*)h, iuplua_tag); + lua_pushstring(IupGetClassName(h)); + lua_call("IupRegisterHandle"); + lua_pushobject(lua_getresult(1)); + } + else + lua_pushnil(); +} + +Ihandle* iuplua_checkihandle(int numArg) +{ + lua_Object o = lua_getparam(numArg); + luaL_arg_check(lua_tag(o)==iuplua_tag, numArg, "handle expected"); + return (Ihandle*)lua_getuserdata(o); +} + +static Ihandle* checkihandle_table(lua_Object tab, int index) +{ + Ihandle* ih; + lua_Object o; + lua_beginblock(); + lua_pushobject(tab); + lua_pushnumber(index); + o = lua_gettable(); + luaL_arg_check(lua_tag(o)==iuplua_tag, index, "handle expected"); + ih = (Ihandle*)lua_getuserdata(o); + lua_endblock(); + return ih; +} + +Ihandle** iuplua_checkihandle_array(int numArg) +{ + int i; + lua_Object tab = luaL_tablearg(numArg); + int count = luaL_check_int(numArg+1); + + Ihandle **params = (Ihandle **) malloc(sizeof(Ihandle *) * (count+1)); + + for (i = 0; i < count; i++) + params[i] = checkihandle_table(tab, i+1); + params[count] = NULL; + + return params; +} + +int iuplua_dofile(char *filename) +{ + if (lua_dofile(filename) != 0) + { + char *dir = getenv("IUPLUA_DIR"); + if (!dir) + return 0; + else + { + int len = strlen(dir); + char *full_name = malloc((len + strlen(filename) + 2) * sizeof(char)); + if (!full_name) + return 0; + strcpy(full_name, dir); + strcat(full_name, "/"); + strcat(full_name, filename); + if (lua_dofile(full_name)) + { + free(full_name); + return 0; + } + free(full_name); + } + } + return 1; +} + +/*********************************************************************************** +***********************************************************************************/ + +static void register_key(char *name, int code, void* user_data) +{ + (void)user_data; + lua_pushnumber(code); lua_setglobal(name); + iuplua_setnamespace(name, name); /* K_xxx */ +} + +int iupkey_open(void) +{ + /* does nothing, kept for backward compatibility */ + return 1; +} + +/*********************************************************************************** +***********************************************************************************/ + +static void setinfo(void) +{ + iuplua_regstring_mask(IUP_COPYRIGHT, "IUP_COPYRIGHT"); + iuplua_regstring_mask("Portable toolkit for building graphical user interfaces.", "IUP_DESCRIPTION"); + iuplua_regstring_mask("IUP - Portable User Interface", "IUP_NAME"); + iuplua_regstring_mask("IUP "IUP_VERSION, "IUP_VERSION"); + iuplua_regstring_mask(LUA_COPYRIGHT, "IUP_LUA_COPYRIGHT"); +} + +int iuplua_open(void) +{ + struct FuncList { + char *name; + lua_CFunction func; + } FuncList[] = { + { "IupSetIdle", IupSetIdle }, + }; + int SizeFuncList = (sizeof(FuncList)/sizeof(struct FuncList)); + int i; + + iuplua_tag = lua_newtag(); + lua_pushnumber(iuplua_tag); + lua_setglobal("iuplua_tag"); + + iuplua_namespace = lua_createtable(); + lua_pushobject(iuplua_namespace); lua_setglobal ("iup"); + + setinfo(); + + for (i = 0; i < SizeFuncList; i++) + iuplua_register(FuncList[i].name, FuncList[i].func); + + lua_register("iup_gettable", iuplua_gettable); + lua_register("iup_settable", iuplua_settable); + lua_register("iup_index", iuplua_index); + lua_register("iupSetCallback", iuplua_set_callback); + + iupKeyForEach(register_key, NULL); + + iupluaapi_open(); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/iuplua_be64.loh" +#include "loh/constants_be64.loh" +#else +#include "loh/iuplua_be32.loh" +#include "loh/constants_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/iuplua_le64w.loh" +#include "loh/constants_le64w.loh" +#else +#include "loh/iuplua_le64.loh" +#include "loh/constants_le64.loh" +#endif +#else +#include "loh/iuplua.loh" +#include "loh/constants.loh" +#endif +#endif +#else + iuplua_dofile("iuplua.lua"); + iuplua_dofile("constants.lua"); +#endif + + iupluawidgets_open(iuplua_tag); + + sboxlua_open(); + spinlua_open(); + cboxlua_open(); + vallua_open(); + tabslua_open(); + gclua_open(); + getparamlua_open(); + treelua_open(); + + return 1; +} + diff --git a/iup/srclua3/iuplua.lua b/iup/srclua3/iuplua.lua new file mode 100755 index 0000000..5bfd7d4 --- /dev/null +++ b/iup/srclua3/iuplua.lua @@ -0,0 +1,134 @@ + + +-- ################################################################################# +-- Private functions +-- ################################################################################# + +-- maps Ihandles into Lua objects +iup_handles = {} + +settagmethod(iuplua_tag, "gettable", iup_gettable) +settagmethod(iuplua_tag, "settable", iup_settable) +settagmethod (tag({}), "index", iup_index) + +function _ALERT(s) + local bt = iupbutton{title="Ok", size="60", action="return IUP_CLOSE"} + local ml = iupmultiline{expand="YES", readonly="YES", value=s, size="300x150"} + local vb = iupvbox{ml, bt; alignment="ACENTER", margin="10x10", gap="10"} + local dg = iupdialog{vb; title="Lua Error",defaultesc=bt,defaultenter=bt,startfocus=bt} + dg:popup(IUP_CENTER, IUP_CENTER) + dg:destroy() +end + +function type_string (o) + return type(o) == "string" +end + +function type_number (o) + return type(o) == "number" +end + +function type_nil (o) + return type(o) == "nil" +end + +function type_function (o) + return type(o) == "function" +end + +function type_widget(w) + if w then + return iup_handles[w] + else + return nil + end +end + +function type_menu (o) + return type_widget(o) and (o.parent==IUPMENU) +end + +function type_item (o) + return type_widget(o) and (o.parent==IUPITEM or o.parent==IUPSUBMENU or o.parent==IUPSEPARATOR) +end + +function iupCallMethod(name, ...) + local handle = arg[1] -- always the handle + + local func = handle[name] -- this is the old name + if (not func) then + local full_name = strlower(iup_callbacks[name][1]) + func = handle[full_name] -- check also for the full name + + if (not func) then + return + end + end + + if type_function (func) then + return call(func, arg) + elseif type_string(func) then + local temp = self + self = handle + local result = dostring(func) + self = temp + return result + else + return IUP_ERROR + end +end + +function iupSetName (handle) + if not type_string(iup_handles[handle].IUP_name) then + iup_handles[handle].IUP_name = format("_IUPLUA_NAME(%s)", tostring(handle)) + IupSetHandle(handle.IUP_name, handle) + end +end + +function iupCreateChildrenNames (obj) + if obj.parent.parent == COMPOSITION then + local i = 1 + while obj[i] do + iupCreateChildrenNames (obj[i]) + i = i+1 + end + elseif obj.parent == IUPFRAME then + iupCreateChildrenNames (obj[1]) + else + iupSetName (obj) + end +end + + +-- ################################################################################# +-- Public Functions +-- ################################################################################# + + +function IupRGB (red, green, blue) + return floor(red*255).." "..floor(green*255).." "..floor(blue*255) +end +iup.RGB = IupRGB + +function IupRegisterHandle(handle, typename) + if not iup_handles[handle] then + local obj = getglobal("IUP"..strupper(typename)) + if not obj then + obj = WIDGET + end + iup_handles[handle] = { parent=obj, handle=handle } + end + return handle +end +iup.RegisterHandle = IupRegisterHandle + +function IupGetFromC(obj) + local handle = IupGetHandle(obj[1]) + return IupRegisterHandle(handle, IupGetClassName(handle)) +end + +iup.GetFromC = function (name) + local handle = IupGetHandle(name) + return IupRegisterHandle(handle, IupGetClassName(handle)) +end + diff --git a/iup/srclua3/iuplua3.def b/iup/srclua3/iuplua3.def new file mode 100755 index 0000000..c67aeca --- /dev/null +++ b/iup/srclua3/iuplua3.def @@ -0,0 +1,16 @@ +EXPORTS + iuplua_open + iupkey_open + iuplua_dofile + iuplua_checkihandle + iuplua_checkihandle_array + iuplua_pushihandle + iuplua_call_start + iuplua_call + iuplua_call_rs + iuplua_register + iuplua_regstring + iuplua_regnumber + iuplua_regstring_mask + iuplua_regihandle + iuplua_pushihandle_cb \ No newline at end of file diff --git a/iup/srclua3/iuplua_api.c b/iup/srclua3/iuplua_api.c new file mode 100755 index 0000000..3221658 --- /dev/null +++ b/iup/srclua3/iuplua_api.c @@ -0,0 +1,762 @@ +/** \file + * \brief Iup API in Lua + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include + +#include "iup.h" +#include "iupkey.h" + +#include "iuplua.h" +#include "il.h" + +#include "iup_attrib.h" +#include "iup_globalattrib.h" + + +static void SaveImageAsText(void) +{ + Ihandle *ih = iuplua_checkihandle(1); + const char *file_name = luaL_check_string(2); + const char *format = luaL_check_string(3); + const char *name = luaL_opt_string(4, NULL); + lua_pushnumber(IupSaveImageAsText(ih, file_name, format, name)); +} + +static void Reparent(void) +{ + lua_pushnumber(IupReparent(iuplua_checkihandle(1), + iuplua_checkihandle(2))); +} + +static void PreviousField(void) +{ + iuplua_pushihandle(IupPreviousField(iuplua_checkihandle(1))); +} + +static void NextField(void) +{ + iuplua_pushihandle(IupNextField(iuplua_checkihandle(1))); +} + +static void cf_isprint(void) +{ + int cod = luaL_check_int(1); + lua_pushnumber(iup_isprint(cod)); +} + +static void codekey(void) +{ + int cod = luaL_check_int(1); + lua_pushnumber(IUPxCODE(cod)); +} + +static void cf_isxkey(void) +{ + int cod = luaL_check_int(1); + lua_pushnumber(iup_isXkey(cod)); +} + +static void cf_isShiftXkey(void) +{ + int cod = luaL_check_int(1); + lua_pushnumber(iup_isShiftXkey(cod)); +} + +static void cf_isCtrlXkey(void) +{ + int cod = luaL_check_int(1); + lua_pushnumber(iup_isCtrlXkey(cod)); +} + +static void cf_isAltXkey(void) +{ + int cod = luaL_check_int(1); + lua_pushnumber(iup_isAltXkey(cod)); +} + +static void cf_isSysXkey(void) +{ + int cod = luaL_check_int(1); + lua_pushnumber(iup_isSysXkey(cod)); +} + +static void cf_isbutton1(void) +{ + if(iup_isbutton1(luaL_check_string(1))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +static void cf_isbutton2(void) +{ + if(iup_isbutton2(luaL_check_string(1))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +static void cf_isbutton3(void) +{ + if(iup_isbutton3(luaL_check_string(1))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +static void cf_isshift(void) +{ + if(iup_isshift(luaL_check_string(1))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +static void cf_isdouble(void) +{ + if(iup_isdouble(luaL_check_string(1))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +static void cf_isalt(void) +{ + if(iup_isalt(luaL_check_string(1))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +static void cf_isbutton4(void) +{ + if(iup_isbutton4(luaL_check_string(1))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +static void cf_isbutton5(void) +{ + if(iup_isbutton5(luaL_check_string(1))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +static void cf_issys(void) +{ + if(iup_issys(luaL_check_string(1))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +static void cf_iscontrol(void) +{ + if(iup_iscontrol(luaL_check_string(1))) + lua_pushnumber(1); + else + lua_pushnil(); +} + +static void GetAttributeData(void) +{ + char *value = IupGetAttribute(iuplua_checkihandle(1), luaL_check_string(2)); + if (value) + lua_pushuserdata((void*)value); + else + lua_pushnil(); +} + +static void GetAttribute(void) +{ + char *name = luaL_check_string(2); + Ihandle* ih = iuplua_checkihandle(1); + char *value = IupGetAttribute(ih, name); + if (!value || iupAttribIsInternal(name)) + lua_pushnil(); + else + { + if (iupAttribIsPointer(ih, name)) + lua_pushuserdata((void*)value); + else + lua_pushstring(value); + } +} + +static void GetDialog(void) +{ + iuplua_pushihandle(IupGetDialog(iuplua_checkihandle(1))); +} + +static void GetHandle(void) +{ + iuplua_pushihandle(IupGetHandle(luaL_check_string(1))); +} + +static void SetAttribute(void) +{ + if (lua_isnil(lua_getparam(3))) + IupSetAttribute(iuplua_checkihandle(1), luaL_check_string(2), NULL); + else + IupStoreAttribute(iuplua_checkihandle(1), luaL_check_string(2), luaL_check_string(3)); +} + +static void SetHandle(void) +{ + if (lua_isnil(lua_getparam(2))) + IupSetHandle(luaL_check_string(1), NULL); + else + IupSetHandle(luaL_check_string(1), iuplua_checkihandle(2)); +} + +static void Destroy(void) +{ + IupDestroy(iuplua_checkihandle(1)); +} + +static void Detach(void) +{ + IupDetach(iuplua_checkihandle(1)); +} + +static void Map(void) +{ + lua_pushnumber(IupMap(iuplua_checkihandle(1))); +} + +static void Unmap(void) +{ + IupUnmap(iuplua_checkihandle(1)); +} + +static void Show(void) +{ + lua_pushnumber(IupShow(iuplua_checkihandle(1))); +} + +static void GetChildCount(void) +{ + lua_pushnumber(IupGetChildCount(iuplua_checkihandle(1))); +} + +static void Refresh(void) +{ + IupRefresh(iuplua_checkihandle(1)); +} + +static void Update(void) +{ + IupUpdate(iuplua_checkihandle(1)); +} + +static void UpdateChildren(void) +{ + IupUpdateChildren(iuplua_checkihandle(1)); +} + +static void Redraw(void) +{ + IupRedraw(iuplua_checkihandle(1), luaL_check_int(2)); +} + +static void VersionNumber(void) +{ + lua_pushnumber(IupVersionNumber()); +} + +static void ShowXY(void) +{ + lua_pushnumber(IupShowXY(iuplua_checkihandle(1), + luaL_opt_int(2, IUP_CURRENT), luaL_opt_int(3, IUP_CURRENT))); +} + +static void Hide(void) +{ + lua_pushnumber(IupHide(iuplua_checkihandle(1))); +} + +static void Popup(void) +{ + lua_pushnumber(IupPopup(iuplua_checkihandle(1), + luaL_opt_int(2, IUP_CURRENT), luaL_opt_int(3, IUP_CURRENT))); +} + +static void Insert(void) +{ + if (lua_isnil(lua_getparam(2))) + iuplua_pushihandle(IupInsert(iuplua_checkihandle(1), NULL, iuplua_checkihandle(3))); + else + iuplua_pushihandle(IupInsert(iuplua_checkihandle(1), iuplua_checkihandle(2), iuplua_checkihandle(3))); +} + +static void Append(void) +{ + iuplua_pushihandle(IupAppend(iuplua_checkihandle(1), iuplua_checkihandle(2))); +} + +static void GetNextChild(void) +{ + if (lua_isnil(lua_getparam(2))) + iuplua_pushihandle(IupGetNextChild(iuplua_checkihandle(1), NULL)); + else + iuplua_pushihandle(IupGetNextChild(iuplua_checkihandle(1), iuplua_checkihandle(2))); +} + +static void ConvertXYToPos(void) +{ + lua_pushnumber(IupConvertXYToPos(iuplua_checkihandle(1), luaL_check_int(2), luaL_check_int(3))); +} + +static void TextConvertLinColToPos(void) +{ + int pos; + IupTextConvertLinColToPos(iuplua_checkihandle(1), luaL_check_int(2), luaL_check_int(3), &pos); + lua_pushnumber(pos); +} + +static void TextConvertPosToLinCol(void) +{ + int lin, col; + IupTextConvertPosToLinCol(iuplua_checkihandle(1), luaL_check_int(2), &lin, &col); + lua_pushnumber(lin); + lua_pushnumber(col); +} + +static void GetChildPos(void) +{ + lua_pushnumber(IupGetChildPos(iuplua_checkihandle(1), iuplua_checkihandle(2))); +} + +static void GetDialogChild(void) +{ + iuplua_pushihandle(IupGetDialogChild(iuplua_checkihandle(1), luaL_check_string(2))); +} + +static void GetBrother(void) +{ + iuplua_pushihandle(IupGetBrother(iuplua_checkihandle(1))); +} + +static void ClassName(void) +{ + lua_pushstring(IupGetClassName(iuplua_checkihandle(1))); +} + +static void ClassType(void) +{ + lua_pushstring(IupGetClassType(iuplua_checkihandle(1))); +} + +static void GetFocus(void) +{ + iuplua_pushihandle(IupGetFocus()); +} + +static void SetFocus(void) +{ + IupSetFocus(iuplua_checkihandle(1)); +} + +static void GetName(void) +{ + char* s = IupGetName(iuplua_checkihandle(1)); + lua_pushstring(s); +} + +static void Alarm(void) +{ + lua_pushnumber(IupAlarm(luaL_check_string(1), + luaL_check_string(2), + luaL_check_string(3), + luaL_opt_string(4, NULL), + luaL_opt_string(5, NULL))); +} + +static void GetFile(void) +{ + char buffer[10240]; + int ret; + strcpy(buffer, luaL_check_string(1)); + ret = IupGetFile(buffer); + lua_pushstring(buffer); + lua_pushnumber(ret); +} + +static void GetParent(void) +{ + Ihandle *p = IupGetParent(iuplua_checkihandle(1)); + iuplua_pushihandle(p); +} + +static void MapFont(void) +{ + lua_pushstring(IupMapFont(luaL_check_string(1))); +} + +static void UnMapFont(void) +{ + lua_pushstring(IupUnMapFont(luaL_check_string(1))); +} + +static void GetLanguage(void) +{ + lua_pushstring(IupGetLanguage()); +} + +static void SetLanguage(void) +{ + IupSetLanguage(luaL_check_string(1)); +} + +static void ListDialog(void) +{ + lua_Object list_tbl = luaL_tablearg(4); + lua_Object marks_tbl; + int i, ret; + char **list; + int *marks = NULL; + + int type = luaL_check_int(1); + char* title = luaL_check_string(2); + int size = luaL_check_int(3); + int opt = luaL_check_int(5); + int max_col = luaL_check_int(6); + int max_lin = luaL_check_int(7); + + marks_tbl = lua_getparam(8); + if (!lua_isnil(marks_tbl)) + { + luaL_arg_check(lua_istable(marks_tbl), 8, "table expected"); + marks = malloc(sizeof(int) * size); + } + + if (!marks && type==2) + lua_error("invalid marks, must not be nil."); + + list = malloc(sizeof(char *) * size); + + for (i = 0; i < size; i++) + { + lua_beginblock(); + + lua_pushobject(list_tbl); + lua_pushnumber(i + 1); + list[i] = lua_getstring(lua_gettable()); + + if (marks) + { + lua_pushobject(marks_tbl); + lua_pushnumber(i + 1); + marks[i] = (int) lua_getnumber(lua_gettable()); + } + + lua_endblock(); + } + + ret = IupListDialog(type, title, size, list, opt, max_col, max_lin, marks); + + if (marks && type==2 && ret!=-1) + { + for (i = 0; i < size; i++) + { + lua_beginblock(); + lua_pushobject(marks_tbl); + lua_pushnumber(i + 1); + lua_pushnumber(marks[i]); + lua_settable(); + lua_endblock(); + } + } + + lua_pushnumber(ret); + + if (marks) free(marks); + free(list); +} + +static void Message(void) +{ + IupMessage(luaL_check_string(1), luaL_check_string(2)); +} + +static void GetText(void) +{ + char buffer[10240]; + strcpy(buffer, luaL_check_string(2)); + if(IupGetText(luaL_check_string(1), buffer)) + lua_pushstring(buffer); + else + lua_pushnil(); +} + +static void GetAttributes(void) +{ + Ihandle *ih = iuplua_checkihandle(1); + char *value = IupGetAttributes(ih); + lua_pushstring(value); +} + +static void GetAllAttributes(void) +{ + int max_n = luaL_check_int(2); + char **names = (char **) malloc(max_n * sizeof(char *)); + int i; + int n = IupGetAllAttributes(iuplua_checkihandle(1), names, max_n); + + lua_Object tb = lua_createtable(); + for (i = 0; i < n; i++) + { + lua_beginblock(); + lua_pushobject(tb); + lua_pushnumber(i); + lua_pushstring(names[i]); + lua_settable(); + lua_endblock(); /* end a section and starts another */ + } + + lua_pushobject(tb); + lua_pushnumber(n); + free(names); +} + +static void GetClassAttributes(void) +{ + int max_n = luaL_check_int(2); + char **names = (char **) malloc(max_n * sizeof(char *)); + int n = IupGetClassAttributes(luaL_check_string(1), names, max_n); + lua_Object tb; + int i; + + if (n == -1) + { + lua_pushnil(); + return; + } + + tb = lua_createtable(); + for (i = 0; i < n; i++) + { + lua_beginblock(); + lua_pushobject(tb); + lua_pushnumber(i); + lua_pushstring(names[i]); + lua_settable(); + lua_endblock(); /* end a section and starts another */ + } + + lua_pushobject(tb); + lua_pushnumber(n); + free(names); +} + +static void GetAllNames(void) +{ + int max_n = luaL_check_int(1); + char **names = (char **) malloc(max_n * sizeof(char *)); + int i; + int n = IupGetAllNames(names, max_n); + + lua_Object tb = lua_createtable(); + for (i = 0; i < n; i++) + { + lua_beginblock(); + lua_pushobject(tb); + lua_pushnumber(i); + lua_pushstring(names[i]); + lua_settable(); + lua_endblock(); /* end a section and starts another */ + } + + lua_pushobject(tb); + lua_pushnumber(n); + free(names); +} + +static void SetClassDefaultAttribute(void) +{ + IupSetClassDefaultAttribute(luaL_check_string(1), luaL_check_string(2), luaL_opt_string(3,NULL)); +} + +static void GetAllDialogs(void) +{ + int max_n = luaL_check_int(1); + char **names = (char **) malloc(max_n * sizeof(char *)); + int i; + int n = IupGetAllDialogs(names, 100); + + lua_Object tb = lua_createtable(); + for (i = 0; i < n; i++) + { + lua_beginblock(); + lua_pushobject(tb); + lua_pushnumber(i); + lua_pushstring(names[i]); + lua_settable(); + lua_endblock(); /* end a section and starts another */ + } + + lua_pushobject(tb); + lua_pushnumber(n); + free(names); +} + +static void GetGlobal(void) +{ + const char* a = luaL_check_string(1); + char *v = IupGetGlobal(a); + if (iupGlobalIsPointer(a)) + lua_pushuserdata((void*)v); + else + lua_pushstring(v); +} + +static void SetGlobal(void) +{ + IupStoreGlobal(luaL_check_string(1), luaL_check_string(2)); +} + +static void LoopStep(void) +{ + lua_pushnumber(IupLoopStep()); +} + +static void ExitLoop(void) +{ + IupExitLoop(); +} + +static void Version(void) +{ + lua_pushstring(IupVersion()); +} + +static void MainLoop(void) +{ + lua_pushnumber(IupMainLoop()); +} + +static void MainLoopLevel(void) +{ + lua_pushnumber(IupMainLoopLevel()); +} + +static void Open(void) +{ + lua_pushnumber(IupOpen(NULL, NULL)); +} + +static void Help(void) +{ + IupHelp(luaL_check_string(1)); +} + +int iupluaapi_open(void) +{ + struct FuncList { + char *name; + lua_CFunction func; + } FuncList[] = { + { "IupGetAttribute", GetAttribute }, + { "IupGetAttributeData", GetAttributeData }, + { "IupGetHandle", GetHandle }, + { "IupGetDialog", GetDialog }, + { "IupSetAttribute", SetAttribute }, + { "IupSetHandle", SetHandle }, + { "IupDestroy", Destroy }, + { "IupDetach", Detach }, + { "IupMap", Map }, + { "IupUnmap", Unmap }, + { "IupShow", Show }, + { "IupGetChildCount", GetChildCount }, + { "IupRefresh", Refresh }, + { "IupUpdate", Update }, + { "IupUpdateChildren", UpdateChildren }, + { "IupRedraw", Redraw }, + { "IupVersionNumber", VersionNumber }, + { "IupShowXY", ShowXY }, + { "IupHide", Hide }, + { "IupPopup", Popup }, + { "IupAppend", Append }, + { "IupInsert", Insert }, + { "IupReparent", Reparent }, + { "IupSaveImageAsText", SaveImageAsText }, + { "IupGetNextChild", GetNextChild }, + { "IupGetChildPos", GetChildPos }, + { "IupGetBrother", GetBrother }, + { "IupGetDialogChild", GetDialogChild }, + { "IupGetClassName", ClassName }, + { "IupGetClassType", ClassType }, + { "IupGetFocus", GetFocus }, + { "IupSetFocus", SetFocus }, + { "IupGetName", GetName }, + { "IupAlarm", Alarm }, + { "IupGetFile", GetFile }, + { "IupMapFont", MapFont }, + { "IupGetParent", GetParent }, + { "IupUnMapFont", UnMapFont }, + { "IupSetLanguage", SetLanguage }, + { "IupGetLanguage", GetLanguage }, + { "IupListDialog", ListDialog }, + { "IupMessage", Message }, + { "IupGetText", GetText }, + { "IupGetAttributes", GetAttributes }, + { "IupGetAllAttributes", GetAllAttributes }, + { "IupSetClassDefaultAttribute", SetClassDefaultAttribute}, + { "IupGetClassAttributes", GetClassAttributes }, + { "IupGetAllNames", GetAllNames }, + { "IupGetAllDialogs", GetAllDialogs }, + { "IupGetGlobal", GetGlobal }, + { "IupSetGlobal", SetGlobal }, + { "IupLoopStep", LoopStep }, + { "IupExitLoop", ExitLoop }, + { "IupMainLoop", MainLoop }, + { "IupMainLoopLevel", MainLoopLevel }, + { "IupOpen", Open }, + { "IupClose", (lua_CFunction)IupClose }, + { "IupFlush", IupFlush }, + { "IupVersion", Version }, + { "IupHelp", Help }, + { "IupScanf", iupluaScanf }, + { "IupTextConvertLinColToPos", TextConvertLinColToPos}, + { "IupTextConvertPosToLinCol", TextConvertPosToLinCol}, + { "IupConvertXYToPos", ConvertXYToPos}, + { "IupPreviousField", PreviousField }, + { "IupNextField", NextField } + }; + int SizeFuncList = (sizeof(FuncList)/sizeof(struct FuncList)); + int i; + + for (i = 0; i < SizeFuncList; i++) + iuplua_register(FuncList[i].name, FuncList[i].func); + + iuplua_register_macro("isbutton1",cf_isbutton1); + iuplua_register_macro("isbutton2",cf_isbutton2); + iuplua_register_macro("isbutton3",cf_isbutton3); + iuplua_register_macro("isshift",cf_isshift); + iuplua_register_macro("iscontrol",cf_iscontrol); + iuplua_register_macro("isdouble",cf_isdouble); + iuplua_register_macro("isalt",cf_isalt); + iuplua_register_macro("issys",cf_issys); + iuplua_register_macro("isbutton4",cf_isbutton4); + iuplua_register_macro("isbutton5",cf_isbutton5); + iuplua_register_macro("isprint",cf_isprint); + iuplua_register_macro("IUPxCODE", codekey); + iuplua_register_macro("isxkey", cf_isxkey); + iuplua_register_macro("isXkey", cf_isxkey); + iuplua_register_macro("isShiftXkey", cf_isShiftXkey); + iuplua_register_macro("isCtrlXkey", cf_isCtrlXkey); + iuplua_register_macro("isAltXkey", cf_isAltXkey); + iuplua_register_macro("isSysXkey", cf_isSysXkey); + + return 1; +} diff --git a/iup/srclua3/iuplua_cd.c b/iup/srclua3/iuplua_cd.c new file mode 100755 index 0000000..d0a38ad --- /dev/null +++ b/iup/srclua3/iuplua_cd.c @@ -0,0 +1,43 @@ +/** \file + * \brief IUP Canvas Lua 3 Binding + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" + +#include +#include +#include + + +static void *cdiup_checkdata(int param) +{ + return iuplua_checkihandle(param); +} + +static cdContextLUA cdluaiupctx = +{ + 0, + "CD_IUP", + cdContextIup, + cdiup_checkdata, + NULL, + 0 +}; + +void cdluaiup_open(void) +{ + cdlua_addcontext(&cdluaiupctx); +} + diff --git a/iup/srclua3/iuplua_controls.c b/iup/srclua3/iuplua_controls.c new file mode 100755 index 0000000..a2414d1 --- /dev/null +++ b/iup/srclua3/iuplua_controls.c @@ -0,0 +1,25 @@ +/** \file + * \brief Bindig of iupcontrols to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include "iup.h" +#include "iuplua.h" +#include "iupluacontrols.h" +#include "il.h" +#include "il_controls.h" + +int iupcontrolslua_open(void) +{ + gaugelua_open(); + matrixlua_open(); + masklua_open(); + diallua_open(); + cblua_open(); + colorbarlua_open(); + cellslua_open(); + return 1; +} diff --git a/iup/srclua3/iuplua_glcanvas.c b/iup/srclua3/iuplua_glcanvas.c new file mode 100755 index 0000000..57f696b --- /dev/null +++ b/iup/srclua3/iuplua_glcanvas.c @@ -0,0 +1,112 @@ +/** \file + * \brief Bindig of iupgl to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include + +#include "iup.h" +#include "iupgl.h" + +#include "iuplua.h" +#include "iupluagl.h" +#include "il.h" + +#ifdef _WIN32 +#include +#endif +#include + + +static void createglcanvas(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupGLCanvas(NULL), tag); +} + +static void iscurrent(void) +{ + lua_pushnumber(IupGLIsCurrent(iuplua_checkihandle(1))); +} + +static void makecurrent(void) +{ + IupGLMakeCurrent(iuplua_checkihandle(1)); + + iuplua_regstring_mask((char*)glGetString(GL_VENDOR), "IUPGL_VENDOR"); + iuplua_regstring_mask((char*)glGetString(GL_RENDERER), "IUPGL_RENDERER"); + iuplua_regstring_mask((char*)glGetString(GL_VERSION), "IUPGL_VERSION"); +} + +static void swapbuffers(void) +{ + IupGLSwapBuffers(iuplua_checkihandle(1)); +} + +static void palette(void) +{ + IupGLPalette(iuplua_checkihandle(1), + luaL_check_int(2), + (float)luaL_check_number(3), + (float)luaL_check_number(4), + (float)luaL_check_number(5)); +} + +static void usefont(void) +{ + IupGLUseFont(iuplua_checkihandle(1), + luaL_check_int(2), + luaL_check_int(3), + luaL_check_int(4)); +} + +static void glwait(void) +{ + IupGLWait(luaL_check_int(1)); +} + +int iupgllua_open (void) +{ + iuplua_register("iupCreateGLCanvas",createglcanvas); + iuplua_register("IupGLMakeCurrent",makecurrent); + iuplua_register("IupGLIsCurrent",iscurrent); + iuplua_register("IupGLSwapBuffers",swapbuffers); + iuplua_register("IupGLPalette",palette); + iuplua_register("IupGLUseFont",usefont); + iuplua_register("IupGLWait",glwait); + + iuplua_regstring("BUFFER", "IUP_BUFFER"); + iuplua_regstring("STEREO", "IUP_STEREO"); + iuplua_regstring("COLOR", "IUP_COLOR"); + iuplua_regstring("BUFFER_SIZE", "IUP_BUFFER_SIZE"); + iuplua_regstring("RED_SIZE", "IUP_RED_SIZE"); + iuplua_regstring("GREEN_SIZE", "IUP_GREEN_SIZE"); + iuplua_regstring("BLUE_SIZE", "IUP_BLUE_SIZE"); + iuplua_regstring("ALPHA_SIZE", "IUP_ALPHA_SIZE"); + iuplua_regstring("DEPTH_SIZE", "IUP_DEPTH_SIZE"); + iuplua_regstring("STENCIL_SIZE", "IUP_STENCIL_SIZE"); + iuplua_regstring("ACCUM_RED_SIZE", "IUP_ACCUM_RED_SIZE"); + iuplua_regstring("ACCUM_GREEN_SIZE", "IUP_ACCUM_GREEN_SIZE"); + iuplua_regstring("ACCUM_BLUE_SIZE", "IUP_ACCUM_BLUE_SIZE"); + iuplua_regstring("ACCUM_ALPHA_SIZE", "IUP_ACCUM_ALPHA_SIZE"); + iuplua_regstring("DOUBLE", "IUP_DOUBLE"); + iuplua_regstring("SINGLE", "IUP_SINGLE"); + iuplua_regstring("INDEX", "IUP_INDEX"); + iuplua_regstring("RGBA", "IUP_RGBA"); + iuplua_regstring("YES", "IUP_YES"); + iuplua_regstring("NO", "IUP_NO"); + + return lua_dostring("IUPGLCANVAS = {parent = IUPCANVAS}\n" + "function IUPGLCANVAS:CreateIUPelement (obj)\n" + " return iupCreateGLCanvas ()\n" + "end\n" + "function iupglcanvas (o)\n" + " return IUPGLCANVAS:Constructor (o)\n" + "end\n" + "iup.glcanvas = iupglcanvas\n" + "iup_callbacks.action.glcanvas = iup_action_canvas\n"); +} diff --git a/iup/srclua3/iuplua_im.c b/iup/srclua3/iuplua_im.c new file mode 100755 index 0000000..2104e0d --- /dev/null +++ b/iup/srclua3/iuplua_im.c @@ -0,0 +1,39 @@ +/** \file + * \brief IULUA core - Bindig of iup to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include "iup.h" +#include "iupim.h" + +#include +#include + +#include "iuplua.h" +#include "iupluaim.h" +#include "il.h" + +static void SaveImage(void) +{ + Ihandle* image = iuplua_checkihandle(1); + char *filename = luaL_check_string(2); + char *format = luaL_check_string(3); + lua_pushnumber(IupSaveImage(image, filename, format)); +} + +static void LoadImage(void) +{ + char *filename = luaL_check_string(1); + iuplua_pushihandle(IupLoadImage(filename)); +} + +void iupimlua_open(void) +{ + iuplua_register("IupLoadImage", LoadImage); + iuplua_register("IupSaveImage", SaveImage); +} diff --git a/iup/srclua3/iuplua_olecontrol.c b/iup/srclua3/iuplua_olecontrol.c new file mode 100755 index 0000000..f302713 --- /dev/null +++ b/iup/srclua3/iuplua_olecontrol.c @@ -0,0 +1,34 @@ +/** \file + * \brief Bindig of iupole to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include + +#include "iup.h" +#include "iupole.h" +#include "iupluaole.h" + +static void createOleControl (void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupOleControl(luaL_check_string(1)),tag); +} + +int iupolelua_open (void) +{ + lua_register("iupCreateOleControl",createOleControl); + + return lua_dostring("IUPOLECONTROL = {parent = WIDGET}\n" + "function IUPOLECONTROL:CreateIUPelement (obj)\n" + " return iupCreateOleControl (obj[1])\n" + "end\n" + "function iupolecontrol (o)\n" + " return IUPOLECONTROL:Constructor (o)\n" + "end\n" + "iup.olecontrol = iupolecontrol\n"); +} diff --git a/iup/srclua3/iuplua_pplot.c b/iup/srclua3/iuplua_pplot.c new file mode 100755 index 0000000..588f203 --- /dev/null +++ b/iup/srclua3/iuplua_pplot.c @@ -0,0 +1,241 @@ +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iup_pplot.h" + +#include +#include + +#include "il.h" + + +static int pplot_edit_cb(Ihandle *self, int p0, int p1, float p2, float p3, float *p4, float *p5) +{ + lua_Object obj; + iuplua_call_start(self, "edit_cb"); + lua_pushnumber(p0); + lua_pushnumber(p1); + lua_pushnumber(p2); + lua_pushnumber(p3); + if (lua_call ("iupCallMethod")) + { + lua_endblock (); + return IUP_IGNORE; + } + obj = lua_getresult (1); + if (obj == LUA_NOOBJECT) + { + lua_endblock (); + return IUP_IGNORE; + } + else if (lua_isnumber (obj)) + { + int ret; + *p4 = (float)lua_getnumber (obj); + + obj = lua_getresult (2); + if (obj == LUA_NOOBJECT || !lua_isnumber (obj)) + { + lua_endblock (); + return IUP_IGNORE; + } + *p5 = (float)lua_getnumber (obj); + + obj = lua_getresult (4); + if (obj == LUA_NOOBJECT || !lua_isnumber (obj)) + { + lua_endblock (); + return IUP_DEFAULT; + } + ret = (int)lua_getnumber (obj); + lua_endblock (); + return ret; + } + + lua_endblock (); + return IUP_IGNORE; +} + +static int pplot_postdraw_cb(Ihandle *self, cdCanvas* cnv) +{ + iuplua_call_start(self, "postdraw_cb"); + cdlua_pushcanvas(cnv); + return iuplua_call(); +} + +static int pplot_predraw_cb(Ihandle *self, cdCanvas* cnv) +{ + iuplua_call_start(self, "predraw_cb"); + cdlua_pushcanvas(cnv); + return iuplua_call(); +} + +static int pplot_deleteend_cb(Ihandle *self) +{ + iuplua_call_start(self, "deleteend_cb"); + return iuplua_call(); +} + +static int pplot_selectbegin_cb(Ihandle *self) +{ + iuplua_call_start(self, "selectbegin_cb"); + return iuplua_call(); +} + +static int pplot_editend_cb(Ihandle *self) +{ + iuplua_call_start(self, "editend_cb"); + return iuplua_call(); +} + +static int pplot_editbegin_cb(Ihandle *self) +{ + iuplua_call_start(self, "editbegin_cb"); + return iuplua_call(); +} + +static int pplot_selectend_cb(Ihandle *self) +{ + iuplua_call_start(self, "selectend_cb"); + return iuplua_call(); +} + +static int pplot_select_cb(Ihandle *self, int p0, int p1, float p2, float p3, int p4) +{ + iuplua_call_start(self, "select_cb"); + lua_pushnumber(p0); + lua_pushnumber(p1); + lua_pushnumber(p2); + lua_pushnumber(p3); + lua_pushnumber(p4); + return iuplua_call(); +} + +static int pplot_deletebegin_cb(Ihandle *self) +{ + iuplua_call_start(self, "deletebegin_cb"); + return iuplua_call(); +} + +static int pplot_delete_cb(Ihandle *self, int p0, int p1, float p2, float p3) +{ + iuplua_call_start(self, "delete_cb"); + lua_pushnumber(p0); + lua_pushnumber(p1); + lua_pushnumber(p2); + lua_pushnumber(p3); + return iuplua_call(); +} + +static void PPlot(void) +{ + int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag")); + lua_pushusertag(IupPPlot(), tag); +} + +static void PPlotBegin(void) +{ + Ihandle *ih = iuplua_checkihandle(1); + IupPPlotBegin(ih, luaL_check_int(2)); +} + +static void PPlotAdd(void) +{ + Ihandle *ih = iuplua_checkihandle(1); + IupPPlotAdd(ih, (float)luaL_check_number(2), (float)luaL_check_number(3)); +} + +static void PPlotAddStr(void) +{ + Ihandle *ih = iuplua_checkihandle(1); + IupPPlotAddStr(ih, luaL_check_string(2), (float)luaL_check_number(3)); +} + +static void PPlotEnd(void) +{ + Ihandle *ih = iuplua_checkihandle(1); + int ret = IupPPlotEnd(ih); + lua_pushnumber(ret); +} + +static void PPlotInsertStr(void) +{ + Ihandle *ih = iuplua_checkihandle(1); + IupPPlotInsertStr(ih, luaL_check_int(2), luaL_check_int(3), luaL_check_string(4), (float)luaL_check_number(5)); +} + +static void PPlotInsert(void) +{ + Ihandle *ih = iuplua_checkihandle(1); + IupPPlotInsert(ih, luaL_check_int(2), luaL_check_int(3), (float)luaL_check_number(4), (float)luaL_check_number(5)); +} + +static void PPlotTransform(void) +{ + Ihandle *ih = iuplua_checkihandle(1); + int ix, iy; + IupPPlotTransform(ih, (float)luaL_check_number(2), (float)luaL_check_number(3), &ix, &iy); + lua_pushnumber(ix); + lua_pushnumber(iy); +} + +static void PPlotPaintTo(void) +{ + Ihandle *ih = iuplua_checkihandle(1); + IupPPlotPaintTo(ih, cdlua_checkcanvas(2)); +} + +int iup_pplotlua_open(void) +{ + lua_register("iupCreatePPlot", PPlot); + + lua_register("iup_pplot_edit_cb", (lua_CFunction)pplot_edit_cb); + lua_register("iup_pplot_deleteend_cb", (lua_CFunction)pplot_deleteend_cb); + lua_register("iup_pplot_selectbegin_cb", (lua_CFunction)pplot_selectbegin_cb); + lua_register("iup_pplot_postdraw_cb", (lua_CFunction)pplot_postdraw_cb); + lua_register("iup_pplot_editend_cb", (lua_CFunction)pplot_editend_cb); + lua_register("iup_pplot_editbegin_cb", (lua_CFunction)pplot_editbegin_cb); + lua_register("iup_pplot_selectend_cb", (lua_CFunction)pplot_selectend_cb); + lua_register("iup_pplot_select_cb", (lua_CFunction)pplot_select_cb); + lua_register("iup_pplot_deletebegin_cb", (lua_CFunction)pplot_deletebegin_cb); + lua_register("iup_pplot_predraw_cb", (lua_CFunction)pplot_predraw_cb); + lua_register("iup_pplot_delete_cb", (lua_CFunction)pplot_delete_cb); + + iuplua_register("IupPPlotBegin", PPlotBegin); + iuplua_register("IupPPlotAdd", PPlotAdd); + iuplua_register("IupPPlotAddStr", PPlotAddStr); + iuplua_register("IupPPlotEnd", PPlotEnd); + iuplua_register("IupPPlotInsertStr", PPlotInsertStr); + iuplua_register("IupPPlotInsert", PPlotInsert); + iuplua_register("IupPPlotTransform", PPlotTransform); + iuplua_register("IupPPlotPaintTo", PPlotPaintTo); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/pplot_be64.loh" +#else +#include "loh/pplot_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/pplot_le64w.loh" +#else +#include "loh/pplot_le64.loh" +#endif +#else +#include "loh/pplot.loh" +#endif +#endif +#else + iuplua_dofile("luapplot.lua"); +#endif + + return 1; +} + diff --git a/iup/srclua3/iuplua_pplot3.def b/iup/srclua3/iuplua_pplot3.def new file mode 100755 index 0000000..3701b0f --- /dev/null +++ b/iup/srclua3/iuplua_pplot3.def @@ -0,0 +1,2 @@ +EXPORTS + iup_pplotlua_open diff --git a/iup/srclua3/iuplua_widgets.c b/iup/srclua3/iuplua_widgets.c new file mode 100755 index 0000000..f6b801b --- /dev/null +++ b/iup/srclua3/iuplua_widgets.c @@ -0,0 +1,662 @@ +/** \file + * \brief IULUA core - Bindig of iup to Lua 3. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include + +#include "iup.h" + +#include "iuplua.h" +#include "il.h" + + +static int iuplua_tag = 0; + +static int valuechanged_cb(Ihandle* handle) +{ + iuplua_call_start(handle, "valuechanged_cb"); + return iuplua_call(); +} + +static int file_cb(Ihandle* handle, char* file_name, char* status) +{ + iuplua_call_start(handle, "file_cb"); + lua_pushstring(file_name); + lua_pushstring(status); + return iuplua_call(); +} + +static int text_action(Ihandle* handle, int carac, char *newtext) +{ + iuplua_call_start(handle, "action"); + lua_pushnumber(carac); + lua_pushstring(newtext); + return iuplua_call(); +} + +static int timer_action(Ihandle* handle) +{ + iuplua_call_start(handle, "actioncb"); + return iuplua_call(); +} + +static int button_action(Ihandle* handle) +{ + iuplua_call_start(handle, "action"); + return iuplua_call(); +} + +static int toggle_action(Ihandle* handle, int v) +{ + iuplua_call_start(handle, "action"); + lua_pushnumber(v); + return iuplua_call(); +} + +static int iupluaCanvasFocusCb(Ihandle* handle, int focus) +{ + iuplua_call_start(handle, "focus"); + lua_pushnumber(focus); + return iuplua_call(); +} + +static int iupluaGetfocusCb(Ihandle* handle) +{ + iuplua_call_start(handle, "getfocus"); + return iuplua_call(); +} + +static int iupluaKillfocusCb(Ihandle* handle) +{ + iuplua_call_start(handle, "killfocus"); + return iuplua_call(); +} + +static int item_highlight(Ihandle* handle) +{ + iuplua_call_start(handle, "highlight"); + return iuplua_call(); +} + +static int menu_open(Ihandle* handle) +{ + iuplua_call_start(handle, "open"); + return iuplua_call(); +} + +static int menu_close(Ihandle* handle) +{ + iuplua_call_start(handle, "menu_close"); + return iuplua_call(); +} + +static int iupluaKanyCb(Ihandle* handle, int carac) +{ + iuplua_call_start(handle, "k_any"); + lua_pushnumber(carac); + return iuplua_call(); +} + +static int iupluaHelpCb(Ihandle* handle) +{ + iuplua_call_start(handle, "help"); + return iuplua_call(); +} + +static int iupluaCanvasKeypressCb(Ihandle *handle, int carac, int press) +{ + iuplua_call_start(handle, "keypress"); + lua_pushnumber(carac); + lua_pushnumber(press); + return iuplua_call(); +} + +static int iupluaCanvasScrollCb(Ihandle *handle, int op, float posx, float posy) +{ + iuplua_call_start(handle, "scroll"); + lua_pushnumber(op); + lua_pushnumber(posx); + lua_pushnumber(posy); + return iuplua_call(); +} + +static int text_caret(Ihandle *handle, int row, int col, int pos) +{ + iuplua_call_start(handle, "caretcb"); + lua_pushnumber(row); + lua_pushnumber(col); + lua_pushnumber(pos); + return iuplua_call(); +} + +static int list_dblclick_cb(Ihandle *handle, int p0, char * p1) +{ + iuplua_call_start(handle, "dblclick_cb"); + lua_pushnumber(p0); + lua_pushstring(p1); + return iuplua_call(); +} + +static int list_dropdown_cb(Ihandle *handle, int p0) +{ + iuplua_call_start(handle, "dropdown_cb"); + lua_pushnumber(p0); + return iuplua_call(); +} + +static int dialog_close(Ihandle* handle) +{ + iuplua_call_start(handle, "close"); + return iuplua_call(); +} + +static int dialog_show(Ihandle* handle, int v) +{ + iuplua_call_start(handle, "showcb"); + lua_pushnumber(v); + return iuplua_call(); +} + +static int iupluaUnMapCb(Ihandle* handle) +{ + iuplua_call_start(handle, "unmapcb"); + return iuplua_call(); +} + +static int iupluaMapCb(Ihandle* handle) +{ + iuplua_call_start(handle, "mapcb"); + return iuplua_call(); +} + +static int iupluaDropfilesCb(Ihandle *handle, char* filename, int numFile, int posx, int posy) +{ + iuplua_call_start(handle, "dropfiles"); + lua_pushstring(filename); + lua_pushnumber(numFile); + lua_pushnumber(posx); + lua_pushnumber(posy); + return iuplua_call(); +} + +static int dialog_trayclick(Ihandle *handle, int p1, int p2, int p3) +{ + iuplua_call_start(handle, "trayclick"); + lua_pushnumber(p1); + lua_pushnumber(p2); + lua_pushnumber(p3); + return iuplua_call(); +} + +static int iupluaCanvasAction(Ihandle* handle, float x, float y) +{ + iuplua_call_start(handle, "action"); + lua_pushnumber(x); + lua_pushnumber(y); + return iuplua_call(); +} + +static int iupluaCanvasButtonCb(Ihandle* handle, int b, int e, int x, int y, char *r) +{ + iuplua_call_start(handle, "button"); + lua_pushnumber(b); + lua_pushnumber(e); + lua_pushnumber(x); + lua_pushnumber(y); + lua_pushstring(r); + return iuplua_call(); +} + +static int iupluaCanvasResizeCb(Ihandle* handle, int w, int h) +{ + iuplua_call_start(handle, "resize"); + lua_pushnumber(w); + lua_pushnumber(h); + return iuplua_call(); +} + +static int iupluaCanvasMotionCb(Ihandle* handle, int x, int y, char *r) +{ + iuplua_call_start(handle, "motion"); + lua_pushnumber(x); + lua_pushnumber(y); + lua_pushstring(r); + return iuplua_call(); +} + +static int iupluaDialogMoveCb(Ihandle* handle, int x, int y) +{ + iuplua_call_start(handle, "move"); + lua_pushnumber(x); + lua_pushnumber(y); + return iuplua_call(); +} + +static int canvas_mdiactivate(Ihandle* handle) +{ + iuplua_call_start(handle, "mdiactivatecb"); + return iuplua_call(); +} + +static int iupluaCanvasEnterwindowCb(Ihandle* handle) +{ + iuplua_call_start(handle, "enterwindow"); + return iuplua_call(); +} + +static int iupluaCanvasLeavewindowCb(Ihandle* handle) +{ + iuplua_call_start(handle, "leavewindow"); + return iuplua_call(); +} + +static int iupluaCanvasWheelCb(Ihandle* handle, float delta, int x, int y, char *r) +{ + iuplua_call_start(handle, "wheel"); + lua_pushnumber(delta); + lua_pushnumber(x); + lua_pushnumber(y); + lua_pushstring(r); + return iuplua_call(); +} + +static int iupluaCanvasWomCb(Ihandle* handle, int i) +{ + iuplua_call_start(handle, "wom"); + lua_pushnumber(i); + return iuplua_call(); +} + +static int list_edit(Ihandle *handle, int c, char *after) +{ + iuplua_call_start(handle, "edit"); + lua_pushnumber(c); + lua_pushstring(after); + return iuplua_call(); +} + +static int list_action(Ihandle* handle, char *text, int opt, int select) +{ + iuplua_call_start(handle, "action"); + lua_pushstring(text); + lua_pushnumber(opt); + lua_pushnumber(select); + return iuplua_call(); +} + +static int list_multiselect(Ihandle *handle, char *value) +{ + iuplua_call_start(handle, "multiselect"); + lua_pushstring(value); + return iuplua_call(); +} + +/*********************************************************************************** +***********************************************************************************/ + +static void CreateTimer(void) +{ + lua_pushusertag(IupTimer(), iuplua_tag); +} + +static void CreateClipboard(void) +{ + lua_pushusertag(IupClipboard(), iuplua_tag); +} + +static void CreateDialog(void) +{ + lua_pushusertag(IupDialog(iuplua_checkihandle(1)), iuplua_tag); +} + +static void CreateRadio(void) +{ + lua_pushusertag(IupRadio(iuplua_checkihandle(1)), iuplua_tag); +} + +static void CreateMenu(void) +{ + lua_pushusertag(IupMenu(NULL), iuplua_tag); +} + +static void CreateHbox(void) +{ + lua_pushusertag(IupHbox(NULL), iuplua_tag); +} + +static void CreateVbox(void) +{ + lua_pushusertag(IupVbox(NULL), iuplua_tag); +} + +static void CreateZbox(void) +{ + lua_pushusertag(IupZbox(NULL), iuplua_tag); +} + +static void CreateFill(void) +{ + lua_pushusertag(IupFill(), iuplua_tag); +} + +static void CreateNormalizer(void) +{ + lua_pushusertag(IupNormalizer(NULL), iuplua_tag); +} + +static void CreateButton(void) +{ + lua_pushusertag(IupButton(luaL_opt_string(1, NULL), NULL), iuplua_tag); +} + +static void CreateText(void) +{ + lua_pushusertag(IupText(NULL), iuplua_tag); +} + +static void CreateMultiLine(void) +{ + lua_pushusertag(IupMultiLine(NULL), iuplua_tag); +} + +static void CreateLabel(void) +{ + lua_pushusertag(IupLabel(luaL_opt_string(1, NULL)), iuplua_tag); +} + +static void CreateToggle(void) +{ + lua_pushusertag(IupToggle(luaL_opt_string(1, NULL), NULL), iuplua_tag); +} + +static void CreateItem(void) +{ + lua_pushusertag(IupItem(luaL_opt_string(1, NULL), NULL), iuplua_tag); +} + +static void CreateSubmenu(void) +{ + lua_pushusertag(IupSubmenu(luaL_opt_string(1, NULL), iuplua_checkihandle(2)), iuplua_tag); +} + +static void CreateSeparator(void) +{ + lua_pushusertag(IupSeparator(), iuplua_tag); +} + +static void CreateFileDlg(void) +{ + lua_pushusertag(IupFileDlg(), iuplua_tag); +} + +static void CreateMessageDlg(void) +{ + lua_pushusertag(IupMessageDlg(), iuplua_tag); +} + +static void CreateFontDlg(void) +{ + lua_pushusertag(IupFontDlg(), iuplua_tag); +} + +static void CreateColorDlg(void) +{ + lua_pushusertag(IupColorDlg(), iuplua_tag); +} + +static void CreateProgressBar(void) +{ + lua_pushusertag(IupProgressBar(), iuplua_tag); +} + +static void CreateUser(void) +{ + lua_pushusertag(IupUser(), iuplua_tag); +} + +static void CreateFrame(void) +{ + lua_pushusertag(IupFrame(iuplua_checkihandle(1)), iuplua_tag); +} + +static void CreateCanvas(void) +{ + lua_pushusertag(IupCanvas(NULL), iuplua_tag); +} + +static void CreateList(void) +{ + lua_pushusertag(IupList(NULL), iuplua_tag); +} + +static void CreateImage(void) +{ + int i, j; + lua_Object linha; + int width, height; + unsigned char *pixels; + lua_Object obj = luaL_tablearg(3); + width = luaL_check_int(1); + height = luaL_check_int(2); + pixels = (unsigned char *) malloc(width*height); + + for (i = 1; i <= height; i++) + { + lua_beginblock(); + lua_pushobject(obj); + lua_pushnumber(i); + linha = lua_gettable(); + if (!lua_istable(linha)) + { + lua_endblock(); + lua_error("iupCreateImage: incorrect value in argument"); + } + + for (j = 1; j <= width; j++) + { + lua_Object n; + lua_beginblock(); + lua_pushobject(linha); + lua_pushnumber(j); + n = lua_gettable(); + if (!lua_isnumber(n)) + { + lua_endblock(); + lua_error("iupCreateImage: incorrect value in argument"); + } + pixels[(i - 1) * width + (j - 1)] = (unsigned char) lua_getnumber(n); + lua_endblock(); + } + + lua_pushobject(obj); + lua_pushnumber(i); + lua_pushnil(); + lua_settable(); + lua_endblock(); + } + + lua_pushusertag(IupImage(width, height, pixels), iuplua_tag); + free(pixels); +} + +static void CreateImageRGB(void) +{ + int i, count, width, height; + unsigned char *pixels; + lua_Object n, obj = luaL_tablearg(3); + width = luaL_check_int(1); + height = luaL_check_int(2); + count = width * height * 3; + pixels = (unsigned char *) malloc(count); + + for (i = 0; i < count; i++) + { + lua_beginblock(); + lua_pushobject(obj); + lua_pushnumber(i+1); + + n = lua_gettable(); + if (!lua_isnumber(n)) + { + lua_endblock(); + lua_error("iupCreateImage: incorrect value in argument"); + } + pixels[i] = (unsigned char)lua_getnumber(n); + lua_endblock(); + } + + lua_pushusertag(IupImageRGB(width, height, pixels), iuplua_tag); + free(pixels); +} + +static void CreateImageRGBA(void) +{ + int i, count, width, height; + unsigned char *pixels; + lua_Object n, obj = luaL_tablearg(3); + width = luaL_check_int(1); + height = luaL_check_int(2); + count = width * height * 4; + pixels = (unsigned char *) malloc(count); + + for (i = 0; i < count; i++) + { + lua_beginblock(); + lua_pushobject(obj); + lua_pushnumber(i+1); + + n = lua_gettable(); + if (!lua_isnumber(n)) + { + lua_endblock(); + lua_error("iupCreateImage: incorrect value in argument"); + } + pixels[i] = (unsigned char)lua_getnumber(n); + lua_endblock(); + } + + lua_pushusertag(IupImageRGBA(width, height, pixels), iuplua_tag); + free(pixels); +} + +/*********************************************************************************** +***********************************************************************************/ + +int iupluawidgets_open(int tag) +{ + struct FuncList { + char *name; + lua_CFunction func; + } FuncList[] = { + + { "iupCreateButton", CreateButton }, + { "iupCreateDialog", CreateDialog }, + { "iupCreateTimer", CreateTimer }, + { "iupCreateClipboard", CreateClipboard }, + { "iupCreateHbox", CreateHbox }, + { "iupCreateVbox", CreateVbox }, + { "iupCreateZbox", CreateZbox }, + { "iupCreateText", CreateText }, + { "iupCreateMultiLine", CreateMultiLine }, + { "iupCreateLabel", CreateLabel }, + { "iupCreateToggle", CreateToggle }, + { "iupCreateItem", CreateItem }, + { "iupCreateSubmenu", CreateSubmenu }, + { "iupCreateSeparator", CreateSeparator }, + { "iupCreateFileDlg", CreateFileDlg }, + { "iupCreateMessageDlg", CreateMessageDlg}, + { "iupCreateColorDlg", CreateColorDlg}, + { "iupCreateFontDlg", CreateFontDlg}, + { "iupCreateUser", CreateUser }, + { "iupCreateFrame", CreateFrame }, + { "iupCreateCanvas", CreateCanvas }, + { "iupCreateList", CreateList }, + { "iupCreateImage", CreateImage }, + { "iupCreateImageRGB", CreateImageRGB }, + { "iupCreateImageRGBA", CreateImageRGBA }, + { "iupCreateFill", CreateFill }, + { "iupCreateRadio", CreateRadio }, + { "iupCreateMenu", CreateMenu }, + { "iupCreateProgressBar", CreateProgressBar }, + { "iupCreateNormalizer", CreateNormalizer }, + + { "iup_action_timer", (lua_CFunction)timer_action}, + { "iup_action_text", (lua_CFunction)text_action}, + { "iup_action_toggle", (lua_CFunction)toggle_action}, + { "iup_action_button", (lua_CFunction)button_action}, + { "iup_action_list", (lua_CFunction)list_action}, + { "iup_action_canvas", (lua_CFunction)iupluaCanvasAction}, + { "iup_focus_cb", (lua_CFunction)iupluaCanvasFocusCb}, + { "iup_keypress_cb", (lua_CFunction)iupluaCanvasKeypressCb}, + { "iup_scroll_cb", (lua_CFunction)iupluaCanvasScrollCb}, + { "iup_resize_cb", (lua_CFunction)iupluaCanvasResizeCb}, + { "iup_move_cb", (lua_CFunction)iupluaDialogMoveCb}, + { "iup_motion_cb", (lua_CFunction)iupluaCanvasMotionCb}, + { "iup_mdiactivate_cb", (lua_CFunction)canvas_mdiactivate}, + { "iup_enterwindow_cb", (lua_CFunction)iupluaCanvasEnterwindowCb}, + { "iup_leavewindow_cb", (lua_CFunction)iupluaCanvasLeavewindowCb}, + { "iup_wom_cb", (lua_CFunction)iupluaCanvasWomCb}, + { "iup_wheel_cb", (lua_CFunction)iupluaCanvasWheelCb}, + { "iup_highlight_cb", (lua_CFunction)item_highlight}, + { "iup_button_cb", (lua_CFunction)iupluaCanvasButtonCb}, + { "iup_close_cb", (lua_CFunction)dialog_close}, + { "iup_show_cb", (lua_CFunction)dialog_show}, + { "iup_map_cb", (lua_CFunction)iupluaMapCb}, + { "iup_unmap_cb", (lua_CFunction)iupluaUnMapCb}, + { "iup_dropfiles_cb", (lua_CFunction)iupluaDropfilesCb}, + { "iup_trayclick_cb", (lua_CFunction)dialog_trayclick}, + { "iup_getfocus_cb", (lua_CFunction)iupluaGetfocusCb}, + { "iup_killfocus_cb", (lua_CFunction)iupluaKillfocusCb}, + { "iup_k_any", (lua_CFunction)iupluaKanyCb}, + { "iup_help_cb", (lua_CFunction)iupluaHelpCb}, + { "iup_edit_cb", (lua_CFunction)list_edit}, + { "iup_caret_cb", (lua_CFunction)text_caret}, + { "iup_multiselect_cb", (lua_CFunction)list_multiselect}, + { "iup_open_cb", (lua_CFunction)menu_open}, + { "iup_menuclose_cb", (lua_CFunction)menu_close}, + { "iup_file_cb", (lua_CFunction)file_cb}, + { "iup_dropdown_cb", (lua_CFunction)list_dropdown_cb}, + { "iup_dblclick_cb", (lua_CFunction)list_dblclick_cb}, + { "iup_valuechanged_cb", (lua_CFunction)valuechanged_cb} + }; + + int SizeFuncList = (sizeof(FuncList)/sizeof(struct FuncList)); + int ret_val = 1; + int i; + + iuplua_tag = tag; + + for (i = 0; i < SizeFuncList; i++) + lua_register(FuncList[i].name, FuncList[i].func); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/iuplua_widgets_be64.loh" +#else +#include "loh/iuplua_widgets_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/iuplua_widgets_le64w.loh" +#else +#include "loh/iuplua_widgets_le64.loh" +#endif +#else +#include "loh/iuplua_widgets.loh" +#endif +#endif +#else + iuplua_dofile("iuplua_widgets.lua"); +#endif + + return ret_val; +} diff --git a/iup/srclua3/iuplua_widgets.lua b/iup/srclua3/iuplua_widgets.lua new file mode 100755 index 0000000..33be9e3 --- /dev/null +++ b/iup/srclua3/iuplua_widgets.lua @@ -0,0 +1,942 @@ + +-- ################################################################################# +-- Widgets +-- ################################################################################# + + +-- "type" is used to check the type of each parameter in the creation table +WIDGET = {type = {}} + +-- called by the iupxxx functions +-- obj is a lua table +function WIDGET:Constructor(obj) + -- the parent of the table is the widget class used to create the control + obj.parent = self + + -- check the table parameters + self:checkParams(obj) + + -- create the IUP control, calling iupCreateXXX + obj.handle = self:CreateIUPelement(obj) + + -- set the parameters that are attributes + self:setAttributes(obj) + + -- save the table indexed by the handle + iup_handles[obj.handle] = obj + + -- the returned value is the handle, not the table + return obj.handle +end + +function WIDGET:checkParams (obj) + local type = self.type + local param, func = next(type, nil) + while param do + if not func(obj[param]) then + error("parameter " .. param .. " has wrong value or is not initialized") + end + param, func = next(type, param) + end +end + +function WIDGET:setAttributes (obj) + local temp = {} + local f = next(obj, nil) + while f do + temp[f] = 1 + f = next(obj, f) + end + f = next(temp, nil) + while f do + obj:set (f, obj[f]) + f = next(temp, f) + end +end + +function WIDGET:get(index) + if type_string (index) then + if (iup_callbacks[index]) then + return self[index] + else + local INDEX = strupper (index) + local value = IupGetAttribute (self.handle, INDEX) + if value then + local handle = IupGetHandle (value) + if handle then + return handle + else + return value + end + end + end + end + return self[index] +end + +function WIDGET:set(index, value) + if type_string (index) then + local INDEX = strupper (index) + local cb = iup_callbacks[index] + + -- workaround for resize attribute in dialog + if (index == "resize" and IupGetClassName(self.handle) == "dialog") then + cb = nil + end + + if (cb) then + local func = cb[2] + if (not func) then + func = cb[IupGetClassName(self.handle)] + end + iupSetCallback(self.handle, cb[1], func, value) + self[index] = value + return + elseif type_string(value) or type_number(value) then + IupSetAttribute(self.handle, INDEX, value) + return + elseif type_nil(value) then + local old_value = IupGetAttribute(self.handle, INDEX) + if old_value then + IupSetAttribute(self.handle, INDEX, value) + return + end + elseif type_widget(value) then + iupSetName(value) + IupSetAttribute(self.handle, INDEX, value.IUP_name) + return + end + end + self[index] = value +end + +function WIDGET:r_destroy() + local i = 1 + local elem = self[i] + while elem do + if type_widget (elem) and elem.IUP_parent then + if elem.IUP_parent == self then + elem.IUP_parent = nil + elem:r_destroy () + else -- wrong parent + error ("Internal table inconsistency") + exit() + end + end + + i = i + 1 + elem = self[i] + end + iup_handles[self] = nil +end + +function WIDGET:destroy() + self:r_destroy () + IupDestroy (self) +end + +function WIDGET:detach() + IupDetach (self) + local parent = self.IUP_parent + if parent then + self.IUP_parent = nil + local i = 1 + while parent[i] do + if parent[i] == self then + while parent[i+1] do + parent[i] = parent[i+1] + i = i+1 + end + parent[i] = nil + return + end + i = i+1 + end + end +end + +function WIDGET:append(o) + if IupAppend (self, o) then + o.IUP_parent = self + local i = 1 + while self[i] do + if self[i] == o then + return i + end + i = i+1 + end + iup_handles[self][i] = o + return i + else + return nil + end +end + +function WIDGET:map() + return IupMap(self) +end + +function WIDGET:hide() + return IupHide(self) +end + + +-- ############### +IUPTIMER = {parent = WIDGET} + +function IUPTIMER:CreateIUPelement (obj) + return iupCreateTimer() +end + +function iuptimer(o) + return IUPTIMER:Constructor(o) +end +iup.timer = iuptimer + + +-- ############### +IUPCLIPBOARD = {parent = WIDGET} + +function IUPCLIPBOARD:CreateIUPelement (obj) + return iupCreateClipboard() +end + +function iupclipboard(o) + return IUPCLIPBOARD:Constructor(o) +end +iup.clipboard = iupclipboard + + +-- ############### +IUPDIALOG = {parent = WIDGET, type = {type_widget}} + +function IUPDIALOG:CreateIUPelement (obj) + local handle = iupCreateDialog(obj[1]) + obj[1].IUP_parent = handle + return handle +end + +function IUPDIALOG:show () + return IupShow(self) +end + +function IUPDIALOG:showxy (x,y) + return IupShowXY(self, x, y) +end + +function IUPDIALOG:popup (x, y) + return IupPopup (self, x, y) +end + +function iupdialog (o) + return IUPDIALOG:Constructor (o) +end +iup.dialog = iupdialog + + +-- ############### +IUPRADIO = {parent = WIDGET, type = {type_widget}} + +function IUPRADIO:CreateIUPelement (obj) + local handle = iupCreateRadio (obj[1]) + obj[1].IUP_parent = handle + return handle +end + +function iupradio (o) + local handle = IUPRADIO:Constructor (o) + iupCreateChildrenNames (handle[1]) + return handle +end +iup.radio = iupradio + +-- OLD STUFF +function edntoggles (h) + local tmp = {} + local i = 1 + while h[i] do + if type_string (h[i]) then + tmp[i] = iuptoggle{title = h[i], action = h.action} + else + error ("option "..i.." must be a string") + end + i = i + 1 + end + + if h.value then + local j = 1 + while h[j] and (h[j] ~= h.value) do + j = j + 1 + end + if h[j] then + tmp.value = tmp[j] + end + elseif h.nvalue then + tmp.value = tmp[h.nvalue] + end + + return tmp +end + +-- OLD STUFF +function edhradio (o) + local toggles = edntoggles (o) + return iupradio{edhbox (toggles); value = toggles.value} +end + +-- OLD STUFF +function edvradio (o) + local toggles = edntoggles (o) + return iupradio{edvbox (toggles); value = toggles.value} +end + + +-- ############### +IUPMENU = {parent = WIDGET} + +function IUPMENU:checkParams (obj) + local i = 1 + while obj[i] do + local o = obj[i] + if not type_item (o) then -- not a menu item + if type (o) ~= 'table' then + error("parameter " .. i .. " is not a table nor a menu item") + elseif (o[1] and not type_string (o[1])) then + error("parameter " .. i .. " does not have a string title") + elseif (o[2] and not type_string (o[2]) and not type_function (o[2]) + and not type_widget (o[2])) then + error("parameter " .. i .. " does not have an action nor a menu") + end + end + i = i + 1 + end +end + +function IUPMENU:CreateIUPelement (obj) + local handle = iupCreateMenu () + local i = 1 + while obj[i] do + local o = obj[i] + local elem + if type_widget (o) then -- predefined + elem = o + elseif not o[1] then -- Separator + elem = iupseparator {} + elseif type_widget (o[2]) then -- SubMenu + o.title = o[1] + o[1] = o[2] + o[2] = nil + elem = iupsubmenu(o) + else -- Item + o.title = o[1] + o.action = o[2] + o[1] = nil + o[2] = nil + elem = iupitem(o) + end + IupAppend (handle, elem) + elem.IUP_parent = handle + obj[i] = elem + i = i + 1 + end + return handle +end + +function iupmenu (o) + return IUPMENU:Constructor (o) +end +iup.menu = iupmenu + +function IUPMENU:popup (x, y) + return IupPopup (self, x, y) +end + + +-- ############### +COMPOSITION = {parent = WIDGET} + +function COMPOSITION:checkParams (obj) + local i = 1 + while obj[i] do + if not type_widget (obj[i]) then + error("parameter " .. i .. " has wrong value or is not initialized") + end + i = i + 1 + end +end + +function COMPOSITION:CreateIUPelement (obj) + local handle = self:CreateBoxElement () + local filled = obj.filled + local i = 1 + local n = 0 + while obj[i] do + n = n + 1 + i = i + 1 + end + i = 1 + + if filled == IUP_YES then + obj[i+n] = iupfill{} + IupAppend (handle, obj[i+n]) + obj[i+n].IUP_parent = handle + end + + while i <= n do + IupAppend (handle, obj[i]) + obj[i].IUP_parent = handle + i = i + 1 + if filled == IUP_YES then + obj[i+n] = iupfill{} + IupAppend (handle, obj[i+n]) + obj[i+n].IUP_parent = handle + end + end + return handle +end + + +-- ############### +IUPHBOX = {parent = COMPOSITION} + +function IUPHBOX:CreateBoxElement () + return iupCreateHbox () +end + +function iuphbox (o) + return IUPHBOX:Constructor (o) +end +iup.hbox = iuphbox + +-- OLD STUFF +function edhbox (o) + o.filled = IUP_YES + return IUPHBOX:Constructor (o) +end + +-- OLD STUFF +function edfield (f) + local l, t + if (type_string (f.prompt) or type_number (f.prompt)) then + l = iuplabel {title = f.prompt} + else + error ("parameter prompt has wrong value or is not initialized") + end + if f.value then + t = iuptext {value = f.value} + else + t = iuptext {value = f.nvalue} + end + if t and l then + return edhbox {l, t} + else + return nil + end +end + + +-- ############### +IUPVBOX = {parent = COMPOSITION} + +function IUPVBOX:CreateBoxElement () + return iupCreateVbox () +end + +function iupvbox (o) + return IUPVBOX:Constructor (o) +end +iup.vbox = iupvbox + +-- OLD STUFF +function edvbox (o) + o.filled = IUP_YES + return IUPVBOX:Constructor (o) +end + + +-- ############### +IUPZBOX = {parent = COMPOSITION} + +function IUPZBOX:CreateBoxElement () + return iupCreateZbox () +end + +function iupzbox (obj) + local handle = IUPZBOX:Constructor (obj) + local i = 1 + while obj[i] do + iupSetName(handle[i]) + i = i+1 + end + return handle +end +iup.zbox = iupzbox + + +-- ############### +IUPFILL = {parent = WIDGET} + +function IUPFILL:CreateIUPelement (obj) + return iupCreateFill () +end + +function iupfill (o) + return IUPFILL:Constructor (o) +end +iup.fill = iupfill + + +-- ############### +IUPBUTTON = {parent = WIDGET, type = {title = type_string}} + +function IUPBUTTON:CreateIUPelement (obj) + if not obj.title and obj.image then + obj.title='' + end + return iupCreateButton(obj.title) +end + +function iupbutton (o) + return IUPBUTTON:Constructor (o) +end +iup.button = iupbutton + + +-- ############### +IUPTEXT = {parent = WIDGET} + +function IUPTEXT:CreateIUPelement (obj) + return iupCreateText() +end + +function iuptext (o) + return IUPTEXT:Constructor (o) +end +iup.text = iuptext + + +-- ############### +IUPMULTILINE = {parent = IUPTEXT} + +function IUPMULTILINE:CreateIUPelement (obj) + return iupCreateMultiLine() +end + +function iupmultiline (o) + return IUPMULTILINE:Constructor (o) +end +iup.multiline = iupmultiline + + +-- ############### +IUPLABEL = {parent = WIDGET, type = {title = type_string}} + +function IUPLABEL:CreateIUPelement (obj) + if not obj.title and obj.image then + obj.title='' + end + return iupCreateLabel (obj.title) +end + +function iuplabel (o) + return IUPLABEL:Constructor (o) +end +iup.label = iuplabel + + +-- ############### +IUPTOGGLE = {parent = IUPBUTTON} + +function IUPTOGGLE:CreateIUPelement (obj) + return iupCreateToggle (obj.title) +end + +function iuptoggle (o) + return IUPTOGGLE:Constructor (o) +end +iup.toggle = iuptoggle + + +-- ############### +IUPITEM = {parent = IUPBUTTON} + +function IUPITEM:CreateIUPelement (obj) + return iupCreateItem (obj.title) +end + +function iupitem (o) + return IUPITEM:Constructor (o) +end +iup.item = iupitem + + +-- ############### +IUPSUBMENU = {parent = WIDGET, type = {type_menu; title = type_string}} + +function IUPSUBMENU:CreateIUPelement (obj) + local h = iupCreateSubmenu (obj.title, obj[1]) + obj[1].IUP_parent = h + return h +end + +function iupsubmenu (o) + return IUPSUBMENU:Constructor (o) +end +iup.submenu = iupsubmenu + + +-- ############### +IUPSEPARATOR = {parent = WIDGET} + +function IUPSEPARATOR:CreateIUPelement (obj) + return iupCreateSeparator () +end + +function iupseparator (o) + return IUPSEPARATOR:Constructor (o) +end +iup.separator = iupseparator + + +-- ############### +IUPFILEDLG = {parent = WIDGET} + +function IUPFILEDLG:popup (x, y) + return IupPopup (self, x, y) +end + +function IUPFILEDLG:CreateIUPelement () + return iupCreateFileDlg () +end + +function iupfiledlg (o) + return IUPFILEDLG:Constructor (o) +end +iup.filedlg = iupfiledlg + + +-- ############### +IUPMESSAGEDLG = {parent = WIDGET} + +function IUPMESSAGEDLG:popup (x, y) + return IupPopup (self, x, y) +end + +function IUPMESSAGEDLG:CreateIUPelement () + return iupCreateMessageDlg () +end + +function iupmessagedlg (o) + return IUPMESSAGEDLG:Constructor (o) +end +iup.messagedlg = iupmessagedlg + + +-- ############### +IUPCOLORDLG = {parent = WIDGET} + +function IUPCOLORDLG:popup (x, y) + return IupPopup (self, x, y) +end + +function IUPCOLORDLG:CreateIUPelement () + return iupCreateColorDlg () +end + +function iupcolordlg (o) + return IUPCOLORDLG:Constructor (o) +end +iup.colordlg = iupcolordlg + + +-- ############### +IUPFONTDLG = {parent = WIDGET} + +function IUPFONTDLG:popup (x, y) + return IupPopup (self, x, y) +end + +function IUPFONTDLG:CreateIUPelement () + return iupCreateFontDlg () +end + +function iupfontdlg (o) + return IUPFONTDLG:Constructor (o) +end +iup.fontdlg = iupfontdlg + + +-- ############### +IUPUSER = {parent = WIDGET} + +function IUPUSER:CreateIUPelement () + return iupCreateUser () +end + +function iupuser () + return IUPUSER:Constructor () +end +iup.user = iupuser + + +-- ############### +IUPNORMALIZER = {parent = WIDGET} + +function IUPNORMALIZER:checkParams (obj) + local i = 1 + while obj[i] do + if not type_widget (obj[i]) then + error("parameter " .. i .. " has wrong value or is not initialized") + end + i = i + 1 + end +end + +function IUPNORMALIZER:CreateIUPelement (obj) + local handle = iupCreateNormalizer () + local i = 1 + while obj[i] do + handle.addcontrol = obj[i] + i = i + 1 + end + return handle +end + +function iupnormalizer () + return IUPNORMALIZER:Constructor () +end +iup.normalizer = iupnormalizer + + +-- ############### +IUPFRAME = {parent = WIDGET, type = {type_widget}} + +function IUPFRAME:CreateIUPelement (obj) + local h = iupCreateFrame (obj[1]) + obj[1].IUP_parent = h + return h +end + +function iupframe (o) + return IUPFRAME:Constructor (o) +end +iup.frame = iupframe + + +-- ############### +IUPCANVAS = {parent = WIDGET} + +function IUPCANVAS:CreateIUPelement (obj) + return iupCreateCanvas () +end + +function iupcanvas (o) + return IUPCANVAS:Constructor (o) +end +iup.canvas = iupcanvas + + +-- ############### +IUPLIST = {parent = WIDGET} + +function IUPLIST:CreateIUPelement (obj) + return iupCreateList () +end + +function IUPLIST:get(index) + if type (index) == 'number' then + return IupGetAttribute (self.handle, ""..index) + else + return WIDGET.get(self, index) + end +end + +function IUPLIST:set (index, value) + if type (index) == 'number' then + if (type_string (value) or type_number (value)) then + return IupSetAttribute (self.handle, ""..index, ""..value) + elseif value == nil then + return IupSetAttribute (self.handle, ""..index, value) + end + end + return WIDGET.set(self, index, value) +end + +function iuplist (o) + return IUPLIST:Constructor (o) +end +iup.list = iuplist + + +-- ############### +IUPIMAGE = {parent = WIDGET} + +function IUPIMAGE:checkParams (obj) + local i = 1 + while obj[i] do + local j = 1 + while obj[i][j] do + if type (obj[i][j]) ~= 'number' then + error ("non-numeric value in image definition") + end + j = j + 1 + end + + if obj.width and (j - 1) ~= obj.width then + error ("inconsistent image lenght") + else + obj.width = j - 1 + end + + i = i + 1 + end + + obj.height = i - 1 +end + +function IUPIMAGE:CreateIUPelement (obj) + local handle = iupCreateImage (obj.width, obj.height, obj) + if type (obj.colors) == 'table' then + local i = 1 + while obj.colors[i] do + IupSetAttribute (handle, i, obj.colors[i]) + i = i + 1 + end + end + return handle +end + +function iupimage (o) + return IUPIMAGE:Constructor (o) +end +iup.image = iupimage + + +IUPIMAGERGB = {parent = WIDGET} + +function IUPIMAGERGB:CreateIUPelement (obj) + return iupCreateImageRGB(obj.width, obj.height, obj.pixels) +end + +function iupimagergb (o) + return IUPIMAGERGB:Constructor (o) +end +iup.imagergb = iupimagergb + + +IUPIMAGERGBA = {parent = WIDGET} + +function IUPIMAGERGBA:CreateIUPelement (obj) + return iupCreateImageRGBA(obj.width, obj.height, obj.pixels) +end + +function iupimagergba (o) + return IUPIMAGERGBA:Constructor (o) +end +iup.imagergba = iupimagergba + + +-- ############### +IUPPROGRESSBAR = {parent = WIDGET} + +function IUPPROGRESSBAR:CreateIUPelement () + return iupCreateProgressBar() +end + +function iupprogressbar (o) + return IUPPROGRESSBAR:Constructor (o) +end +iup.progressbar = iupprogressbar + + +-- ################################################################################# +-- Callbacks +-- ################################################################################# + + +-- global list of callbacks +-- index is the Lua callback name +-- each callback contains the full name, and the C callback +iup_callbacks = +{ + action = {"ACTION", nil}, + actioncb = {"ACTION_CB", nil}, + getfocus = {"GETFOCUS_CB", iup_getfocus_cb}, + killfocus = {"KILLFOCUS_CB", iup_killfocus_cb}, + focus = {"FOCUS_CB", iup_focus_cb}, + k_any = {"K_ANY", iup_k_any}, + help = {"HELP_CB", iup_help_cb}, + caretcb = {"CARET_CB", iup_caret_cb}, + keypress = {"KEYPRESS_CB", iup_keypress_cb}, + scroll = {"SCROLL_CB", iup_scroll_cb}, + trayclick = {"TRAYCLICK_CB", iup_trayclick_cb}, + close = {"CLOSE_CB", iup_close_cb}, + open = {"OPEN_CB", iup_open_cb}, + showcb = {"SHOW_CB", iup_show_cb}, + mapcb = {"MAP_CB", iup_map_cb}, + unmapcb = {"UNMAP_CB", iup_unmap_cb}, + dropfiles = {"DROPFILES_CB", iup_dropfiles_cb}, + menuclose = {"MENUCLOSE_CB", iup_menuclose_cb}, + highlight = {"HIGHLIGHT_CB", iup_highlight_cb}, + wom = {"WOM_CB", iup_wom_cb}, + wheel = {"WHEEL_CB", iup_wheel_cb}, + button = {"BUTTON_CB", iup_button_cb}, + resize = {"RESIZE_CB", iup_resize_cb}, + move = {"RESIZE_CB", iup_move_cb}, + motion = {"MOTION_CB", iup_motion_cb}, + enterwindow = {"ENTERWINDOW_CB", iup_enterwindow_cb}, + leavewindow = {"LEAVEWINDOW_CB", iup_leavewindow_cb}, + edit = {"EDIT_CB", iup_edit_cb}, + multiselect = {"MULTISELECT_CB", iup_multiselect_cb}, + filecb = {"FILE_CB", iup_file_cb}, + mdiactivatecb = {"MDIACTIVATE_CB", iup_mdiactivate_cb}, + dropdowncb = {"DROPDOWN_CB", iup_dropdown_cb}, + dblclickcb = {"DBLCLICK_CB", iup_dblclick_cb}, +} + +iup_callbacks.action.toggle = iup_action_toggle +iup_callbacks.action.multiline = iup_action_text +iup_callbacks.action.text = iup_action_text +iup_callbacks.action.button = iup_action_button +iup_callbacks.action.list = iup_action_list +iup_callbacks.action.item = iup_action_button +iup_callbacks.action.canvas = iup_action_canvas + +-- must set here because it is also used elsewhere with a different signature +iup_callbacks.actioncb.timer = iup_action_timer + +-- aliases for the full names +iup_callbacks.action_cb = iup_callbacks.actioncb +iup_callbacks.getfocus_cb = iup_callbacks.getfocus +iup_callbacks.killfocus_cb = iup_callbacks.killfocus +iup_callbacks.focus_cb = iup_callbacks.focus +iup_callbacks.k_any = iup_callbacks.k_any +iup_callbacks.help_cb = iup_callbacks.help +iup_callbacks.caret_cb = iup_callbacks.caretcb +iup_callbacks.keypress_cb = iup_callbacks.keypress +iup_callbacks.scroll_cb = iup_callbacks.scroll +iup_callbacks.trayclick_cb = iup_callbacks.trayclick +iup_callbacks.close_cb = iup_callbacks.close +iup_callbacks.open_cb = iup_callbacks.open +iup_callbacks.show_cb = iup_callbacks.showcb +iup_callbacks.map_cb = iup_callbacks.mapcb +iup_callbacks.unmap_cb = iup_callbacks.unmapcb +iup_callbacks.dropfiles_cb = iup_callbacks.dropfiles +iup_callbacks.menuclose_cb = iup_callbacks.menuclose +iup_callbacks.highlight_cb = iup_callbacks.highlight +iup_callbacks.wom_cb = iup_callbacks.wom +iup_callbacks.wheel_cb = iup_callbacks.wheel +iup_callbacks.button_cb = iup_callbacks.button +iup_callbacks.resize_cb = iup_callbacks.resize +iup_callbacks.move_cb = iup_callbacks.move +iup_callbacks.motion_cb = iup_callbacks.motion +iup_callbacks.enterwindow_cb = iup_callbacks.enterwindow +iup_callbacks.leavewindow_cb = iup_callbacks.leavewindow +iup_callbacks.edit_cb = iup_callbacks.edit +iup_callbacks.multiselect_cb = iup_callbacks.multiselect +iup_callbacks.mdiactivate_cb = iup_callbacks.mdiactivatecb +iup_callbacks.file_cb = iup_callbacks.filecb +iup_callbacks.dropdown_cb = iup_callbacks.dropdowncb +iup_callbacks.dblclick_cb = iup_callbacks.dblclickcb +iup_callbacks.valuechanged_cb = iup_callbacks.valuechangedcb + \ No newline at end of file diff --git a/iup/srclua3/iupluacd3.def b/iup/srclua3/iupluacd3.def new file mode 100755 index 0000000..a281128 --- /dev/null +++ b/iup/srclua3/iupluacd3.def @@ -0,0 +1,3 @@ +EXPORTS + cdluaiup_open + \ No newline at end of file diff --git a/iup/srclua3/iupluacontrols3.def b/iup/srclua3/iupluacontrols3.def new file mode 100755 index 0000000..7736388 --- /dev/null +++ b/iup/srclua3/iupluacontrols3.def @@ -0,0 +1,2 @@ +EXPORTS + iupcontrolslua_open diff --git a/iup/srclua3/iupluagl3.def b/iup/srclua3/iupluagl3.def new file mode 100755 index 0000000..dfc4849 --- /dev/null +++ b/iup/srclua3/iupluagl3.def @@ -0,0 +1,2 @@ +EXPORTS + iupgllua_open diff --git a/iup/srclua3/iupluaim3.def b/iup/srclua3/iupluaim3.def new file mode 100755 index 0000000..3acf8ae --- /dev/null +++ b/iup/srclua3/iupluaim3.def @@ -0,0 +1,2 @@ +EXPORTS + iupimlua_open diff --git a/iup/srclua3/iupluaole3.def b/iup/srclua3/iupluaole3.def new file mode 100755 index 0000000..6389829 --- /dev/null +++ b/iup/srclua3/iupluaole3.def @@ -0,0 +1,2 @@ +EXPORTS + iupolelua_open diff --git a/iup/srclua3/iupole.mak b/iup/srclua3/iupole.mak new file mode 100755 index 0000000..30ea1f9 --- /dev/null +++ b/iup/srclua3/iupole.mak @@ -0,0 +1,13 @@ +PROJNAME = iup +LIBNAME = iupluaole3 +OPT = YES + +USE_LUA = Yes +USE_OPENGL = Yes + +SRC = iuplua_olecontrol.c + +INCLUDES = ../include +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup iuplua3 iupole + diff --git a/iup/srclua3/loh/cells.loh b/iup/srclua3/loh/cells.loh new file mode 100755 index 0000000..78336b8 --- /dev/null +++ b/iup/srclua3/loh/cells.loh @@ -0,0 +1,76 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacells.lo"); +*/ +/* ../obj/iupluacontrols3/luacells.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64,108,117, 97, 99,101, +108,108,115, 46,108,117, 97, 0, 0, 0, 0,245, 5, 0, 22, 1, 11, 1, 15, 2, + 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 15, 0, 11, 5, 11, 6, 26, 11, 8, + 25, 7, 15, 9, 11, 10, 15, 7, 26, 15, 11, 11, 12, 22, 2, 11, 13, 15, 14, 29, + 0, 2, 26, 15, 11, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 11, 11, + 18, 22, 2, 11, 19, 15, 20, 29, 0, 2, 26, 15, 11, 11, 21, 22, 2, 11, 22, 15, + 23, 29, 0, 2, 26, 15, 11, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, + 11, 11, 27, 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 11, 11, 30, 22, 2, 11, + 31, 15, 32, 29, 0, 2, 26, 15, 11, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, + 26, 15, 11, 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 11, 11, 39, 15, + 11, 18, 12, 26, 15, 11, 11, 40, 15, 11, 18, 15, 26, 15, 11, 11, 41, 15, 11, 18, + 18, 26, 15, 11, 11, 42, 15, 11, 18, 21, 26, 15, 11, 11, 43, 15, 11, 18, 24, 26, + 15, 11, 11, 44, 15, 11, 18, 27, 26, 15, 11, 11, 45, 15, 11, 18, 30, 26, 15, 11, + 11, 46, 15, 11, 18, 33, 26, 15, 11, 11, 47, 15, 11, 18, 36, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 48, 2, 0, 0, 0, 9, 73, 85, 80, 67, 69, 76, 76, 83, 0, 2, + 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, + 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101, +109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 14, 64,108,117, 97, 99,101, +108,108,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, + 0, 15,105,117,112, 67,114,101, 97,116,101, 67,101,108,108,115, 0, 2, 0, 0, + 0, 7,114,101,100,114, 97,119, 0, 4, 0, 0, 0, 7, 0, 0, 0, 14, 64,108, +117, 97, 99,101,108,108,115, 46,108,117, 97, 0, 0, 0, 0, 10, 4, 1, 13, 0, + 11, 1, 15, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 5,115, +101,108,102, 0, 2, 0, 0, 0, 8,114,101,112, 97,105,110,116, 0, 2, 0, 0, + 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 9,105,117,112, 99,101, +108,108,115, 0, 4, 0, 0, 0, 11, 0, 0, 0, 14, 64,108,117, 97, 99,101,108, +108,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 67, 69, 76, 76, 83, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 6, 99,101,108,108,115, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97, +108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 11,109,111,117,115,101, 99,108, +105, 99,107, 0, 2, 0, 0, 0, 14, 77, 79, 85, 83, 69, 67, 76, 73, 67, 75, 95, + 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95, 99,101,108,108,115, 95,109,111, +117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 12,109,111,117, +115,101,109,111,116,105,111,110, 0, 2, 0, 0, 0, 15, 77, 79, 85, 83, 69, 77, + 79, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, 95, 99,101, +108,108,115, 95,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115, 99,114,111,108,108,105,110,103, 0, 2, 0, 0, 0, 13, 83, + 67, 82, 79, 76, 76, 73, 78, 71, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, + 95, 99,101,108,108,115, 95,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, + 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, 0, 9, 87, 73, 68, 84, + 72, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, 99,101,108,108,115, 95, +119,105,100,116,104, 95, 99, 98, 0, 2, 0, 0, 0, 7,104,101,105,103,104,116, + 0, 2, 0, 0, 0, 10, 72, 69, 73, 71, 72, 84, 95, 67, 66, 0, 2, 0, 0, 0, + 20,105,117,112, 95, 99,101,108,108,115, 95,104,101,105,103,104,116, 95, 99, 98, + 0, 2, 0, 0, 0, 7,110,108,105,110,101,115, 0, 2, 0, 0, 0, 10, 78, 76, + 73, 78, 69, 83, 95, 67, 66, 0, 2, 0, 0, 0, 20,105,117,112, 95, 99,101,108, +108,115, 95,110,108,105,110,101,115, 95, 99, 98, 0, 2, 0, 0, 0, 6,110, 99, +111,108,115, 0, 2, 0, 0, 0, 9, 78, 67, 79, 76, 83, 95, 67, 66, 0, 2, 0, + 0, 0, 19,105,117,112, 95, 99,101,108,108,115, 95,110, 99,111,108,115, 95, 99, + 98, 0, 2, 0, 0, 0, 6,104,115,112, 97,110, 0, 2, 0, 0, 0, 9, 72, 83, + 80, 65, 78, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, 99,101,108,108, +115, 95,104,115,112, 97,110, 95, 99, 98, 0, 2, 0, 0, 0, 6,118,115,112, 97, +110, 0, 2, 0, 0, 0, 9, 86, 83, 80, 65, 78, 95, 67, 66, 0, 2, 0, 0, 0, + 19,105,117,112, 95, 99,101,108,108,115, 95,118,115,112, 97,110, 95, 99, 98, 0, + 2, 0, 0, 0, 14,109,111,117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 2, + 0, 0, 0, 15,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 2, + 0, 0, 0, 13,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, 2, 0, 0, + 0, 9,119,105,100,116,104, 95, 99, 98, 0, 2, 0, 0, 0, 10,104,101,105,103, +104,116, 95, 99, 98, 0, 2, 0, 0, 0, 10,110,108,105,110,101,115, 95, 99, 98, + 0, 2, 0, 0, 0, 9,110, 99,111,108,115, 95, 99, 98, 0, 2, 0, 0, 0, 9, +104,115,112, 97,110, 95, 99, 98, 0, 2, 0, 0, 0, 9,118,115,112, 97,110, 95, + 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacells.lo"); +} diff --git a/iup/srclua3/loh/cells_be32.loh b/iup/srclua3/loh/cells_be32.loh new file mode 100755 index 0000000..d1db35f --- /dev/null +++ b/iup/srclua3/loh/cells_be32.loh @@ -0,0 +1,76 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacells_be32.lo"); +*/ +/* ../obj/iupluacontrols3/luacells_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64,108,117, 97, 99,101, +108,108,115, 46,108,117, 97, 0, 0, 0, 0,245, 5, 0, 22, 1, 11, 1, 15, 2, + 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 15, 0, 11, 5, 11, 6, 26, 11, 8, + 25, 7, 15, 9, 11, 10, 15, 7, 26, 15, 11, 11, 12, 22, 2, 11, 13, 15, 14, 29, + 0, 2, 26, 15, 11, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 11, 11, + 18, 22, 2, 11, 19, 15, 20, 29, 0, 2, 26, 15, 11, 11, 21, 22, 2, 11, 22, 15, + 23, 29, 0, 2, 26, 15, 11, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, + 11, 11, 27, 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 11, 11, 30, 22, 2, 11, + 31, 15, 32, 29, 0, 2, 26, 15, 11, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, + 26, 15, 11, 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 11, 11, 39, 15, + 11, 18, 12, 26, 15, 11, 11, 40, 15, 11, 18, 15, 26, 15, 11, 11, 41, 15, 11, 18, + 18, 26, 15, 11, 11, 42, 15, 11, 18, 21, 26, 15, 11, 11, 43, 15, 11, 18, 24, 26, + 15, 11, 11, 44, 15, 11, 18, 27, 26, 15, 11, 11, 45, 15, 11, 18, 30, 26, 15, 11, + 11, 46, 15, 11, 18, 33, 26, 15, 11, 11, 47, 15, 11, 18, 36, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 48, 2, 0, 0, 0, 9, 73, 85, 80, 67, 69, 76, 76, 83, 0, 2, + 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, + 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101, +109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 14, 64,108,117, 97, 99,101, +108,108,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, + 0, 15,105,117,112, 67,114,101, 97,116,101, 67,101,108,108,115, 0, 2, 0, 0, + 0, 7,114,101,100,114, 97,119, 0, 4, 0, 0, 0, 7, 0, 0, 0, 14, 64,108, +117, 97, 99,101,108,108,115, 46,108,117, 97, 0, 0, 0, 0, 10, 4, 1, 13, 0, + 11, 1, 15, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 5,115, +101,108,102, 0, 2, 0, 0, 0, 8,114,101,112, 97,105,110,116, 0, 2, 0, 0, + 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 9,105,117,112, 99,101, +108,108,115, 0, 4, 0, 0, 0, 11, 0, 0, 0, 14, 64,108,117, 97, 99,101,108, +108,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 67, 69, 76, 76, 83, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 6, 99,101,108,108,115, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97, +108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 11,109,111,117,115,101, 99,108, +105, 99,107, 0, 2, 0, 0, 0, 14, 77, 79, 85, 83, 69, 67, 76, 73, 67, 75, 95, + 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95, 99,101,108,108,115, 95,109,111, +117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 12,109,111,117, +115,101,109,111,116,105,111,110, 0, 2, 0, 0, 0, 15, 77, 79, 85, 83, 69, 77, + 79, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, 95, 99,101, +108,108,115, 95,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115, 99,114,111,108,108,105,110,103, 0, 2, 0, 0, 0, 13, 83, + 67, 82, 79, 76, 76, 73, 78, 71, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, + 95, 99,101,108,108,115, 95,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, + 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, 0, 9, 87, 73, 68, 84, + 72, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, 99,101,108,108,115, 95, +119,105,100,116,104, 95, 99, 98, 0, 2, 0, 0, 0, 7,104,101,105,103,104,116, + 0, 2, 0, 0, 0, 10, 72, 69, 73, 71, 72, 84, 95, 67, 66, 0, 2, 0, 0, 0, + 20,105,117,112, 95, 99,101,108,108,115, 95,104,101,105,103,104,116, 95, 99, 98, + 0, 2, 0, 0, 0, 7,110,108,105,110,101,115, 0, 2, 0, 0, 0, 10, 78, 76, + 73, 78, 69, 83, 95, 67, 66, 0, 2, 0, 0, 0, 20,105,117,112, 95, 99,101,108, +108,115, 95,110,108,105,110,101,115, 95, 99, 98, 0, 2, 0, 0, 0, 6,110, 99, +111,108,115, 0, 2, 0, 0, 0, 9, 78, 67, 79, 76, 83, 95, 67, 66, 0, 2, 0, + 0, 0, 19,105,117,112, 95, 99,101,108,108,115, 95,110, 99,111,108,115, 95, 99, + 98, 0, 2, 0, 0, 0, 6,104,115,112, 97,110, 0, 2, 0, 0, 0, 9, 72, 83, + 80, 65, 78, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, 99,101,108,108, +115, 95,104,115,112, 97,110, 95, 99, 98, 0, 2, 0, 0, 0, 6,118,115,112, 97, +110, 0, 2, 0, 0, 0, 9, 86, 83, 80, 65, 78, 95, 67, 66, 0, 2, 0, 0, 0, + 19,105,117,112, 95, 99,101,108,108,115, 95,118,115,112, 97,110, 95, 99, 98, 0, + 2, 0, 0, 0, 14,109,111,117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 2, + 0, 0, 0, 15,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 2, + 0, 0, 0, 13,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, 2, 0, 0, + 0, 9,119,105,100,116,104, 95, 99, 98, 0, 2, 0, 0, 0, 10,104,101,105,103, +104,116, 95, 99, 98, 0, 2, 0, 0, 0, 10,110,108,105,110,101,115, 95, 99, 98, + 0, 2, 0, 0, 0, 9,110, 99,111,108,115, 95, 99, 98, 0, 2, 0, 0, 0, 9, +104,115,112, 97,110, 95, 99, 98, 0, 2, 0, 0, 0, 9,118,115,112, 97,110, 95, + 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacells_be32.lo"); +} diff --git a/iup/srclua3/loh/cells_be64.loh b/iup/srclua3/loh/cells_be64.loh new file mode 100755 index 0000000..b832e4b --- /dev/null +++ b/iup/srclua3/loh/cells_be64.loh @@ -0,0 +1,75 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/cells_be64.lo"); +*/ +/* ../obj/iupluacontrols3/cells_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64, 99,101,108,108,115, + 46,108,117, 97, 0, 0, 0, 0,245, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, + 0, 15, 0, 11, 3, 11, 4, 26, 15, 0, 11, 5, 11, 6, 26, 11, 8, 25, 7, 15, + 9, 11, 10, 15, 7, 26, 15, 11, 11, 12, 22, 2, 11, 13, 15, 14, 29, 0, 2, 26, + 15, 11, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 11, 11, 18, 22, 2, + 11, 19, 15, 20, 29, 0, 2, 26, 15, 11, 11, 21, 22, 2, 11, 22, 15, 23, 29, 0, + 2, 26, 15, 11, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 11, 11, 27, + 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 11, 11, 30, 22, 2, 11, 31, 15, 32, + 29, 0, 2, 26, 15, 11, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, 11, + 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 11, 11, 39, 15, 11, 18, 12, + 26, 15, 11, 11, 40, 15, 11, 18, 15, 26, 15, 11, 11, 41, 15, 11, 18, 18, 26, 15, + 11, 11, 42, 15, 11, 18, 21, 26, 15, 11, 11, 43, 15, 11, 18, 24, 26, 15, 11, 11, + 44, 15, 11, 18, 27, 26, 15, 11, 11, 45, 15, 11, 18, 30, 26, 15, 11, 11, 46, 15, + 11, 18, 33, 26, 15, 11, 11, 47, 15, 11, 18, 36, 26, 0, 0, 0, 0, 0, 0, 0, + 0, 48, 2, 0, 0, 0, 9, 73, 85, 80, 67, 69, 76, 76, 83, 0, 2, 0, 0, 0, + 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, + 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110, +116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 11, 64, 99,101,108,108,115, 46,108,117, + 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 15,105,117,112, 67, +114,101, 97,116,101, 67,101,108,108,115, 0, 2, 0, 0, 0, 7,114,101,100,114, + 97,119, 0, 4, 0, 0, 0, 7, 0, 0, 0, 11, 64, 99,101,108,108,115, 46,108, +117, 97, 0, 0, 0, 0, 10, 4, 1, 13, 0, 11, 1, 15, 2, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 8, +114,101,112, 97,105,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 89, 69, 83, + 0, 2, 0, 0, 0, 9,105,117,112, 99,101,108,108,115, 0, 4, 0, 0, 0, 11, + 0, 0, 0, 11, 64, 99,101,108,108,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 67, 69, 76, 76, 83, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 6, 99,101,108,108,115, 0, 2, 0, 0, + 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, + 11,109,111,117,115,101, 99,108,105, 99,107, 0, 2, 0, 0, 0, 14, 77, 79, 85, + 83, 69, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95, + 99,101,108,108,115, 95,109,111,117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, + 2, 0, 0, 0, 12,109,111,117,115,101,109,111,116,105,111,110, 0, 2, 0, 0, + 0, 15, 77, 79, 85, 83, 69, 77, 79, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, + 0, 25,105,117,112, 95, 99,101,108,108,115, 95,109,111,117,115,101,109,111,116, +105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 10,115, 99,114,111,108,108,105,110, +103, 0, 2, 0, 0, 0, 13, 83, 67, 82, 79, 76, 76, 73, 78, 71, 95, 67, 66, 0, + 2, 0, 0, 0, 23,105,117,112, 95, 99,101,108,108,115, 95,115, 99,114,111,108, +108,105,110,103, 95, 99, 98, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, + 0, 0, 0, 9, 87, 73, 68, 84, 72, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117, +112, 95, 99,101,108,108,115, 95,119,105,100,116,104, 95, 99, 98, 0, 2, 0, 0, + 0, 7,104,101,105,103,104,116, 0, 2, 0, 0, 0, 10, 72, 69, 73, 71, 72, 84, + 95, 67, 66, 0, 2, 0, 0, 0, 20,105,117,112, 95, 99,101,108,108,115, 95,104, +101,105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 7,110,108,105,110,101,115, + 0, 2, 0, 0, 0, 10, 78, 76, 73, 78, 69, 83, 95, 67, 66, 0, 2, 0, 0, 0, + 20,105,117,112, 95, 99,101,108,108,115, 95,110,108,105,110,101,115, 95, 99, 98, + 0, 2, 0, 0, 0, 6,110, 99,111,108,115, 0, 2, 0, 0, 0, 9, 78, 67, 79, + 76, 83, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, 99,101,108,108,115, + 95,110, 99,111,108,115, 95, 99, 98, 0, 2, 0, 0, 0, 6,104,115,112, 97,110, + 0, 2, 0, 0, 0, 9, 72, 83, 80, 65, 78, 95, 67, 66, 0, 2, 0, 0, 0, 19, +105,117,112, 95, 99,101,108,108,115, 95,104,115,112, 97,110, 95, 99, 98, 0, 2, + 0, 0, 0, 6,118,115,112, 97,110, 0, 2, 0, 0, 0, 9, 86, 83, 80, 65, 78, + 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, 99,101,108,108,115, 95,118, +115,112, 97,110, 95, 99, 98, 0, 2, 0, 0, 0, 14,109,111,117,115,101, 99,108, +105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,111,117,115,101,109,111,116, +105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 13,115, 99,114,111,108,108,105,110, +103, 95, 99, 98, 0, 2, 0, 0, 0, 9,119,105,100,116,104, 95, 99, 98, 0, 2, + 0, 0, 0, 10,104,101,105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 10,110, +108,105,110,101,115, 95, 99, 98, 0, 2, 0, 0, 0, 9,110, 99,111,108,115, 95, + 99, 98, 0, 2, 0, 0, 0, 9,104,115,112, 97,110, 95, 99, 98, 0, 2, 0, 0, + 0, 9,118,115,112, 97,110, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/cells_be64.lo"); +} diff --git a/iup/srclua3/loh/cells_le64.loh b/iup/srclua3/loh/cells_le64.loh new file mode 100755 index 0000000..11a2caf --- /dev/null +++ b/iup/srclua3/loh/cells_le64.loh @@ -0,0 +1,76 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacells_le64.lo"); +*/ +/* ../obj/iupluacontrols3/luacells_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64,108,117, 97, 99,101, +108,108,115, 46,108,117, 97, 0, 0, 0, 0,245, 5, 0, 22, 1, 11, 1, 15, 2, + 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 15, 0, 11, 5, 11, 6, 26, 11, 8, + 25, 7, 15, 9, 11, 10, 15, 7, 26, 15, 11, 11, 12, 22, 2, 11, 13, 15, 14, 29, + 0, 2, 26, 15, 11, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 11, 11, + 18, 22, 2, 11, 19, 15, 20, 29, 0, 2, 26, 15, 11, 11, 21, 22, 2, 11, 22, 15, + 23, 29, 0, 2, 26, 15, 11, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, + 11, 11, 27, 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 11, 11, 30, 22, 2, 11, + 31, 15, 32, 29, 0, 2, 26, 15, 11, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, + 26, 15, 11, 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 11, 11, 39, 15, + 11, 18, 12, 26, 15, 11, 11, 40, 15, 11, 18, 15, 26, 15, 11, 11, 41, 15, 11, 18, + 18, 26, 15, 11, 11, 42, 15, 11, 18, 21, 26, 15, 11, 11, 43, 15, 11, 18, 24, 26, + 15, 11, 11, 44, 15, 11, 18, 27, 26, 15, 11, 11, 45, 15, 11, 18, 30, 26, 15, 11, + 11, 46, 15, 11, 18, 33, 26, 15, 11, 11, 47, 15, 11, 18, 36, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 48, 2, 0, 0, 0, 9, 73, 85, 80, 67, 69, 76, 76, 83, 0, 2, + 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, + 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101, +109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 14, 64,108,117, 97, 99,101, +108,108,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, + 0, 15,105,117,112, 67,114,101, 97,116,101, 67,101,108,108,115, 0, 2, 0, 0, + 0, 7,114,101,100,114, 97,119, 0, 4, 0, 0, 0, 7, 0, 0, 0, 14, 64,108, +117, 97, 99,101,108,108,115, 46,108,117, 97, 0, 0, 0, 0, 10, 4, 1, 13, 0, + 11, 1, 15, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 5,115, +101,108,102, 0, 2, 0, 0, 0, 8,114,101,112, 97,105,110,116, 0, 2, 0, 0, + 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 9,105,117,112, 99,101, +108,108,115, 0, 4, 0, 0, 0, 11, 0, 0, 0, 14, 64,108,117, 97, 99,101,108, +108,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 67, 69, 76, 76, 83, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 6, 99,101,108,108,115, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97, +108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 11,109,111,117,115,101, 99,108, +105, 99,107, 0, 2, 0, 0, 0, 14, 77, 79, 85, 83, 69, 67, 76, 73, 67, 75, 95, + 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95, 99,101,108,108,115, 95,109,111, +117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 12,109,111,117, +115,101,109,111,116,105,111,110, 0, 2, 0, 0, 0, 15, 77, 79, 85, 83, 69, 77, + 79, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, 95, 99,101, +108,108,115, 95,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115, 99,114,111,108,108,105,110,103, 0, 2, 0, 0, 0, 13, 83, + 67, 82, 79, 76, 76, 73, 78, 71, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, + 95, 99,101,108,108,115, 95,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, + 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, 0, 9, 87, 73, 68, 84, + 72, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, 99,101,108,108,115, 95, +119,105,100,116,104, 95, 99, 98, 0, 2, 0, 0, 0, 7,104,101,105,103,104,116, + 0, 2, 0, 0, 0, 10, 72, 69, 73, 71, 72, 84, 95, 67, 66, 0, 2, 0, 0, 0, + 20,105,117,112, 95, 99,101,108,108,115, 95,104,101,105,103,104,116, 95, 99, 98, + 0, 2, 0, 0, 0, 7,110,108,105,110,101,115, 0, 2, 0, 0, 0, 10, 78, 76, + 73, 78, 69, 83, 95, 67, 66, 0, 2, 0, 0, 0, 20,105,117,112, 95, 99,101,108, +108,115, 95,110,108,105,110,101,115, 95, 99, 98, 0, 2, 0, 0, 0, 6,110, 99, +111,108,115, 0, 2, 0, 0, 0, 9, 78, 67, 79, 76, 83, 95, 67, 66, 0, 2, 0, + 0, 0, 19,105,117,112, 95, 99,101,108,108,115, 95,110, 99,111,108,115, 95, 99, + 98, 0, 2, 0, 0, 0, 6,104,115,112, 97,110, 0, 2, 0, 0, 0, 9, 72, 83, + 80, 65, 78, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, 99,101,108,108, +115, 95,104,115,112, 97,110, 95, 99, 98, 0, 2, 0, 0, 0, 6,118,115,112, 97, +110, 0, 2, 0, 0, 0, 9, 86, 83, 80, 65, 78, 95, 67, 66, 0, 2, 0, 0, 0, + 19,105,117,112, 95, 99,101,108,108,115, 95,118,115,112, 97,110, 95, 99, 98, 0, + 2, 0, 0, 0, 14,109,111,117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 2, + 0, 0, 0, 15,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 2, + 0, 0, 0, 13,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, 2, 0, 0, + 0, 9,119,105,100,116,104, 95, 99, 98, 0, 2, 0, 0, 0, 10,104,101,105,103, +104,116, 95, 99, 98, 0, 2, 0, 0, 0, 10,110,108,105,110,101,115, 95, 99, 98, + 0, 2, 0, 0, 0, 9,110, 99,111,108,115, 95, 99, 98, 0, 2, 0, 0, 0, 9, +104,115,112, 97,110, 95, 99, 98, 0, 2, 0, 0, 0, 9,118,115,112, 97,110, 95, + 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacells_le64.lo"); +} diff --git a/iup/srclua3/loh/cells_le64w.loh b/iup/srclua3/loh/cells_le64w.loh new file mode 100755 index 0000000..9084ea9 --- /dev/null +++ b/iup/srclua3/loh/cells_le64w.loh @@ -0,0 +1,76 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacells_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luacells_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64,108,117, 97, 99,101, +108,108,115, 46,108,117, 97, 0, 0, 0, 0,245, 5, 0, 22, 1, 11, 1, 15, 2, + 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 15, 0, 11, 5, 11, 6, 26, 11, 8, + 25, 7, 15, 9, 11, 10, 15, 7, 26, 15, 11, 11, 12, 22, 2, 11, 13, 15, 14, 29, + 0, 2, 26, 15, 11, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 11, 11, + 18, 22, 2, 11, 19, 15, 20, 29, 0, 2, 26, 15, 11, 11, 21, 22, 2, 11, 22, 15, + 23, 29, 0, 2, 26, 15, 11, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, + 11, 11, 27, 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 11, 11, 30, 22, 2, 11, + 31, 15, 32, 29, 0, 2, 26, 15, 11, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, + 26, 15, 11, 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 11, 11, 39, 15, + 11, 18, 12, 26, 15, 11, 11, 40, 15, 11, 18, 15, 26, 15, 11, 11, 41, 15, 11, 18, + 18, 26, 15, 11, 11, 42, 15, 11, 18, 21, 26, 15, 11, 11, 43, 15, 11, 18, 24, 26, + 15, 11, 11, 44, 15, 11, 18, 27, 26, 15, 11, 11, 45, 15, 11, 18, 30, 26, 15, 11, + 11, 46, 15, 11, 18, 33, 26, 15, 11, 11, 47, 15, 11, 18, 36, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 48, 2, 0, 0, 0, 9, 73, 85, 80, 67, 69, 76, 76, 83, 0, 2, + 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, + 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101, +109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 14, 64,108,117, 97, 99,101, +108,108,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, + 0, 15,105,117,112, 67,114,101, 97,116,101, 67,101,108,108,115, 0, 2, 0, 0, + 0, 7,114,101,100,114, 97,119, 0, 4, 0, 0, 0, 7, 0, 0, 0, 14, 64,108, +117, 97, 99,101,108,108,115, 46,108,117, 97, 0, 0, 0, 0, 10, 4, 1, 13, 0, + 11, 1, 15, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 5,115, +101,108,102, 0, 2, 0, 0, 0, 8,114,101,112, 97,105,110,116, 0, 2, 0, 0, + 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 9,105,117,112, 99,101, +108,108,115, 0, 4, 0, 0, 0, 11, 0, 0, 0, 14, 64,108,117, 97, 99,101,108, +108,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 67, 69, 76, 76, 83, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 6, 99,101,108,108,115, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97, +108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 11,109,111,117,115,101, 99,108, +105, 99,107, 0, 2, 0, 0, 0, 14, 77, 79, 85, 83, 69, 67, 76, 73, 67, 75, 95, + 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95, 99,101,108,108,115, 95,109,111, +117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 12,109,111,117, +115,101,109,111,116,105,111,110, 0, 2, 0, 0, 0, 15, 77, 79, 85, 83, 69, 77, + 79, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, 95, 99,101, +108,108,115, 95,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115, 99,114,111,108,108,105,110,103, 0, 2, 0, 0, 0, 13, 83, + 67, 82, 79, 76, 76, 73, 78, 71, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, + 95, 99,101,108,108,115, 95,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, + 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, 0, 9, 87, 73, 68, 84, + 72, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, 99,101,108,108,115, 95, +119,105,100,116,104, 95, 99, 98, 0, 2, 0, 0, 0, 7,104,101,105,103,104,116, + 0, 2, 0, 0, 0, 10, 72, 69, 73, 71, 72, 84, 95, 67, 66, 0, 2, 0, 0, 0, + 20,105,117,112, 95, 99,101,108,108,115, 95,104,101,105,103,104,116, 95, 99, 98, + 0, 2, 0, 0, 0, 7,110,108,105,110,101,115, 0, 2, 0, 0, 0, 10, 78, 76, + 73, 78, 69, 83, 95, 67, 66, 0, 2, 0, 0, 0, 20,105,117,112, 95, 99,101,108, +108,115, 95,110,108,105,110,101,115, 95, 99, 98, 0, 2, 0, 0, 0, 6,110, 99, +111,108,115, 0, 2, 0, 0, 0, 9, 78, 67, 79, 76, 83, 95, 67, 66, 0, 2, 0, + 0, 0, 19,105,117,112, 95, 99,101,108,108,115, 95,110, 99,111,108,115, 95, 99, + 98, 0, 2, 0, 0, 0, 6,104,115,112, 97,110, 0, 2, 0, 0, 0, 9, 72, 83, + 80, 65, 78, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, 99,101,108,108, +115, 95,104,115,112, 97,110, 95, 99, 98, 0, 2, 0, 0, 0, 6,118,115,112, 97, +110, 0, 2, 0, 0, 0, 9, 86, 83, 80, 65, 78, 95, 67, 66, 0, 2, 0, 0, 0, + 19,105,117,112, 95, 99,101,108,108,115, 95,118,115,112, 97,110, 95, 99, 98, 0, + 2, 0, 0, 0, 14,109,111,117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 2, + 0, 0, 0, 15,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 2, + 0, 0, 0, 13,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, 2, 0, 0, + 0, 9,119,105,100,116,104, 95, 99, 98, 0, 2, 0, 0, 0, 10,104,101,105,103, +104,116, 95, 99, 98, 0, 2, 0, 0, 0, 10,110,108,105,110,101,115, 95, 99, 98, + 0, 2, 0, 0, 0, 9,110, 99,111,108,115, 95, 99, 98, 0, 2, 0, 0, 0, 9, +104,115,112, 97,110, 95, 99, 98, 0, 2, 0, 0, 0, 9,118,115,112, 97,110, 95, + 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacells_le64w.lo"); +} diff --git a/iup/srclua3/loh/colorbar.loh b/iup/srclua3/loh/colorbar.loh new file mode 100755 index 0000000..6dd3f7e --- /dev/null +++ b/iup/srclua3/loh/colorbar.loh @@ -0,0 +1,49 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacolorbar.lo"); +*/ +/* ../obj/iupluacontrols3/luacolorbar.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 17, 64,108,117, 97, 99,111, +108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0,123, 5, 0, 22, 1, 11, + 1, 15, 2, 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, + 11, 8, 15, 5, 26, 15, 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, + 9, 11, 13, 22, 2, 11, 14, 15, 15, 29, 0, 2, 26, 15, 9, 11, 16, 22, 2, 11, + 17, 15, 18, 29, 0, 2, 26, 15, 9, 11, 19, 22, 2, 11, 20, 15, 21, 29, 0, 2, + 26, 15, 9, 11, 22, 15, 9, 18, 10, 26, 15, 9, 11, 23, 15, 9, 18, 13, 26, 15, + 9, 11, 24, 15, 9, 18, 16, 26, 15, 9, 11, 25, 15, 9, 18, 19, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 26, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 66, + 65, 82, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, + 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, + 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 17, 64,108, +117, 97, 99,111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 10, 4, + 2, 15, 1, 13, 1, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 18,105,117,112, 67,114,101, 97,116,101, + 67,111,108,111,114, 98, 97,114, 0, 2, 0, 0, 0, 12,105,117,112, 99,111,108, +111,114, 98, 97,114, 0, 4, 0, 0, 0, 7, 0, 0, 0, 17, 64,108,117, 97, 99, +111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, + 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 66, 65, 82, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 9, 99,111,108,111,114, 98, 97,114, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 7, 99,101,108,108, 99, 98, 0, 2, 0, 0, 0, 8, 67, 69, 76, 76, + 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95, 99,111,108,111,114, 98, 97, +114, 95, 99,101,108,108, 95, 99, 98, 0, 2, 0, 0, 0, 9,115,101,108,101, 99, +116, 99, 98, 0, 2, 0, 0, 0, 10, 83, 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, + 0, 0, 0, 23,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,115,101,108, +101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 9,115,119,105,116, 99,104, 99, 98, + 0, 2, 0, 0, 0, 10, 83, 87, 73, 84, 67, 72, 95, 67, 66, 0, 2, 0, 0, 0, + 23,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,115,119,105,116, 99,104, + 95, 99, 98, 0, 2, 0, 0, 0, 11,101,120,116,101,110,100,101,100, 99, 98, 0, + 2, 0, 0, 0, 12, 69, 88, 84, 69, 78, 68, 69, 68, 95, 67, 66, 0, 2, 0, 0, + 0, 25,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,101,120,116,101,110, +100,101,100, 95, 99, 98, 0, 2, 0, 0, 0, 8, 99,101,108,108, 95, 99, 98, 0, + 2, 0, 0, 0, 10,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 10, +115,119,105,116, 99,104, 95, 99, 98, 0, 2, 0, 0, 0, 12,101,120,116,101,110, +100,101,100, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacolorbar.lo"); +} diff --git a/iup/srclua3/loh/colorbar_be32.loh b/iup/srclua3/loh/colorbar_be32.loh new file mode 100755 index 0000000..2a33b10 --- /dev/null +++ b/iup/srclua3/loh/colorbar_be32.loh @@ -0,0 +1,49 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacolorbar_be32.lo"); +*/ +/* ../obj/iupluacontrols3/luacolorbar_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 17, 64,108,117, 97, 99,111, +108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0,123, 5, 0, 22, 1, 11, + 1, 15, 2, 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, + 11, 8, 15, 5, 26, 15, 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, + 9, 11, 13, 22, 2, 11, 14, 15, 15, 29, 0, 2, 26, 15, 9, 11, 16, 22, 2, 11, + 17, 15, 18, 29, 0, 2, 26, 15, 9, 11, 19, 22, 2, 11, 20, 15, 21, 29, 0, 2, + 26, 15, 9, 11, 22, 15, 9, 18, 10, 26, 15, 9, 11, 23, 15, 9, 18, 13, 26, 15, + 9, 11, 24, 15, 9, 18, 16, 26, 15, 9, 11, 25, 15, 9, 18, 19, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 26, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 66, + 65, 82, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, + 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, + 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 17, 64,108, +117, 97, 99,111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 10, 4, + 2, 15, 1, 13, 1, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 18,105,117,112, 67,114,101, 97,116,101, + 67,111,108,111,114, 98, 97,114, 0, 2, 0, 0, 0, 12,105,117,112, 99,111,108, +111,114, 98, 97,114, 0, 4, 0, 0, 0, 7, 0, 0, 0, 17, 64,108,117, 97, 99, +111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, + 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 66, 65, 82, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 9, 99,111,108,111,114, 98, 97,114, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 7, 99,101,108,108, 99, 98, 0, 2, 0, 0, 0, 8, 67, 69, 76, 76, + 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95, 99,111,108,111,114, 98, 97, +114, 95, 99,101,108,108, 95, 99, 98, 0, 2, 0, 0, 0, 9,115,101,108,101, 99, +116, 99, 98, 0, 2, 0, 0, 0, 10, 83, 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, + 0, 0, 0, 23,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,115,101,108, +101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 9,115,119,105,116, 99,104, 99, 98, + 0, 2, 0, 0, 0, 10, 83, 87, 73, 84, 67, 72, 95, 67, 66, 0, 2, 0, 0, 0, + 23,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,115,119,105,116, 99,104, + 95, 99, 98, 0, 2, 0, 0, 0, 11,101,120,116,101,110,100,101,100, 99, 98, 0, + 2, 0, 0, 0, 12, 69, 88, 84, 69, 78, 68, 69, 68, 95, 67, 66, 0, 2, 0, 0, + 0, 25,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,101,120,116,101,110, +100,101,100, 95, 99, 98, 0, 2, 0, 0, 0, 8, 99,101,108,108, 95, 99, 98, 0, + 2, 0, 0, 0, 10,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 10, +115,119,105,116, 99,104, 95, 99, 98, 0, 2, 0, 0, 0, 12,101,120,116,101,110, +100,101,100, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacolorbar_be32.lo"); +} diff --git a/iup/srclua3/loh/colorbar_be64.loh b/iup/srclua3/loh/colorbar_be64.loh new file mode 100755 index 0000000..cb0ed3e --- /dev/null +++ b/iup/srclua3/loh/colorbar_be64.loh @@ -0,0 +1,48 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/colorbar_be64.lo"); +*/ +/* ../obj/iupluacontrols3/colorbar_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64, 99,111,108,111,114, + 98, 97,114, 46,108,117, 97, 0, 0, 0, 0,123, 5, 0, 22, 1, 11, 1, 15, 2, + 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, + 5, 26, 15, 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, 9, 11, 13, + 22, 2, 11, 14, 15, 15, 29, 0, 2, 26, 15, 9, 11, 16, 22, 2, 11, 17, 15, 18, + 29, 0, 2, 26, 15, 9, 11, 19, 22, 2, 11, 20, 15, 21, 29, 0, 2, 26, 15, 9, + 11, 22, 15, 9, 18, 10, 26, 15, 9, 11, 23, 15, 9, 18, 13, 26, 15, 9, 11, 24, + 15, 9, 18, 16, 26, 15, 9, 11, 25, 15, 9, 18, 19, 26, 0, 0, 0, 0, 0, 0, + 0, 0, 26, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 66, 65, 82, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108, +101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 14, 64, 99,111,108,111, +114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 10, 4, 2, 15, 1, 13, 1, 3, + 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, + 2, 0, 0, 0, 18,105,117,112, 67,114,101, 97,116,101, 67,111,108,111,114, 98, + 97,114, 0, 2, 0, 0, 0, 12,105,117,112, 99,111,108,111,114, 98, 97,114, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 14, 64, 99,111,108,111,114, 98, 97,114, 46,108, +117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, + 85, 80, 67, 79, 76, 79, 82, 66, 65, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, + 0, 9, 99,111,108,111,114, 98, 97,114, 0, 2, 0, 0, 0, 14,105,117,112, 95, + 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 7, 99,101,108,108, 99, + 98, 0, 2, 0, 0, 0, 8, 67, 69, 76, 76, 95, 67, 66, 0, 2, 0, 0, 0, 21, +105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95, 99,101,108,108, 95, 99, 98, + 0, 2, 0, 0, 0, 9,115,101,108,101, 99,116, 99, 98, 0, 2, 0, 0, 0, 10, + 83, 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95, 99, +111,108,111,114, 98, 97,114, 95,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, + 0, 0, 9,115,119,105,116, 99,104, 99, 98, 0, 2, 0, 0, 0, 10, 83, 87, 73, + 84, 67, 72, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95, 99,111,108,111, +114, 98, 97,114, 95,115,119,105,116, 99,104, 95, 99, 98, 0, 2, 0, 0, 0, 11, +101,120,116,101,110,100,101,100, 99, 98, 0, 2, 0, 0, 0, 12, 69, 88, 84, 69, + 78, 68, 69, 68, 95, 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, 95, 99,111,108, +111,114, 98, 97,114, 95,101,120,116,101,110,100,101,100, 95, 99, 98, 0, 2, 0, + 0, 0, 8, 99,101,108,108, 95, 99, 98, 0, 2, 0, 0, 0, 10,115,101,108,101, + 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 10,115,119,105,116, 99,104, 95, 99, 98, + 0, 2, 0, 0, 0, 12,101,120,116,101,110,100,101,100, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/colorbar_be64.lo"); +} diff --git a/iup/srclua3/loh/colorbar_le64.loh b/iup/srclua3/loh/colorbar_le64.loh new file mode 100755 index 0000000..583e9d3 --- /dev/null +++ b/iup/srclua3/loh/colorbar_le64.loh @@ -0,0 +1,49 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacolorbar_le64.lo"); +*/ +/* ../obj/iupluacontrols3/luacolorbar_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 17, 64,108,117, 97, 99,111, +108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0,123, 5, 0, 22, 1, 11, + 1, 15, 2, 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, + 11, 8, 15, 5, 26, 15, 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, + 9, 11, 13, 22, 2, 11, 14, 15, 15, 29, 0, 2, 26, 15, 9, 11, 16, 22, 2, 11, + 17, 15, 18, 29, 0, 2, 26, 15, 9, 11, 19, 22, 2, 11, 20, 15, 21, 29, 0, 2, + 26, 15, 9, 11, 22, 15, 9, 18, 10, 26, 15, 9, 11, 23, 15, 9, 18, 13, 26, 15, + 9, 11, 24, 15, 9, 18, 16, 26, 15, 9, 11, 25, 15, 9, 18, 19, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 26, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 66, + 65, 82, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, + 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, + 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 17, 64,108, +117, 97, 99,111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 10, 4, + 2, 15, 1, 13, 1, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 18,105,117,112, 67,114,101, 97,116,101, + 67,111,108,111,114, 98, 97,114, 0, 2, 0, 0, 0, 12,105,117,112, 99,111,108, +111,114, 98, 97,114, 0, 4, 0, 0, 0, 7, 0, 0, 0, 17, 64,108,117, 97, 99, +111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, + 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 66, 65, 82, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 9, 99,111,108,111,114, 98, 97,114, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 7, 99,101,108,108, 99, 98, 0, 2, 0, 0, 0, 8, 67, 69, 76, 76, + 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95, 99,111,108,111,114, 98, 97, +114, 95, 99,101,108,108, 95, 99, 98, 0, 2, 0, 0, 0, 9,115,101,108,101, 99, +116, 99, 98, 0, 2, 0, 0, 0, 10, 83, 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, + 0, 0, 0, 23,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,115,101,108, +101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 9,115,119,105,116, 99,104, 99, 98, + 0, 2, 0, 0, 0, 10, 83, 87, 73, 84, 67, 72, 95, 67, 66, 0, 2, 0, 0, 0, + 23,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,115,119,105,116, 99,104, + 95, 99, 98, 0, 2, 0, 0, 0, 11,101,120,116,101,110,100,101,100, 99, 98, 0, + 2, 0, 0, 0, 12, 69, 88, 84, 69, 78, 68, 69, 68, 95, 67, 66, 0, 2, 0, 0, + 0, 25,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,101,120,116,101,110, +100,101,100, 95, 99, 98, 0, 2, 0, 0, 0, 8, 99,101,108,108, 95, 99, 98, 0, + 2, 0, 0, 0, 10,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 10, +115,119,105,116, 99,104, 95, 99, 98, 0, 2, 0, 0, 0, 12,101,120,116,101,110, +100,101,100, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacolorbar_le64.lo"); +} diff --git a/iup/srclua3/loh/colorbar_le64w.loh b/iup/srclua3/loh/colorbar_le64w.loh new file mode 100755 index 0000000..ce8d260 --- /dev/null +++ b/iup/srclua3/loh/colorbar_le64w.loh @@ -0,0 +1,49 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacolorbar_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luacolorbar_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 17, 64,108,117, 97, 99,111, +108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0,123, 5, 0, 22, 1, 11, + 1, 15, 2, 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, + 11, 8, 15, 5, 26, 15, 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, + 9, 11, 13, 22, 2, 11, 14, 15, 15, 29, 0, 2, 26, 15, 9, 11, 16, 22, 2, 11, + 17, 15, 18, 29, 0, 2, 26, 15, 9, 11, 19, 22, 2, 11, 20, 15, 21, 29, 0, 2, + 26, 15, 9, 11, 22, 15, 9, 18, 10, 26, 15, 9, 11, 23, 15, 9, 18, 13, 26, 15, + 9, 11, 24, 15, 9, 18, 16, 26, 15, 9, 11, 25, 15, 9, 18, 19, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 26, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 66, + 65, 82, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, + 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, + 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 17, 64,108, +117, 97, 99,111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 10, 4, + 2, 15, 1, 13, 1, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 18,105,117,112, 67,114,101, 97,116,101, + 67,111,108,111,114, 98, 97,114, 0, 2, 0, 0, 0, 12,105,117,112, 99,111,108, +111,114, 98, 97,114, 0, 4, 0, 0, 0, 7, 0, 0, 0, 17, 64,108,117, 97, 99, +111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, + 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 66, 65, 82, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 9, 99,111,108,111,114, 98, 97,114, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 7, 99,101,108,108, 99, 98, 0, 2, 0, 0, 0, 8, 67, 69, 76, 76, + 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95, 99,111,108,111,114, 98, 97, +114, 95, 99,101,108,108, 95, 99, 98, 0, 2, 0, 0, 0, 9,115,101,108,101, 99, +116, 99, 98, 0, 2, 0, 0, 0, 10, 83, 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, + 0, 0, 0, 23,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,115,101,108, +101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 9,115,119,105,116, 99,104, 99, 98, + 0, 2, 0, 0, 0, 10, 83, 87, 73, 84, 67, 72, 95, 67, 66, 0, 2, 0, 0, 0, + 23,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,115,119,105,116, 99,104, + 95, 99, 98, 0, 2, 0, 0, 0, 11,101,120,116,101,110,100,101,100, 99, 98, 0, + 2, 0, 0, 0, 12, 69, 88, 84, 69, 78, 68, 69, 68, 95, 67, 66, 0, 2, 0, 0, + 0, 25,105,117,112, 95, 99,111,108,111,114, 98, 97,114, 95,101,120,116,101,110, +100,101,100, 95, 99, 98, 0, 2, 0, 0, 0, 8, 99,101,108,108, 95, 99, 98, 0, + 2, 0, 0, 0, 10,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 10, +115,119,105,116, 99,104, 95, 99, 98, 0, 2, 0, 0, 0, 12,101,120,116,101,110, +100,101,100, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacolorbar_le64w.lo"); +} diff --git a/iup/srclua3/loh/colorbrowser.loh b/iup/srclua3/loh/colorbrowser.loh new file mode 100755 index 0000000..eb3301a --- /dev/null +++ b/iup/srclua3/loh/colorbrowser.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacb.lo"); +*/ +/* ../obj/iupluacontrols3/luacb.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64,108,117, 97, 99, 98, + 46,108,117, 97, 0, 0, 0, 0, 77, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, + 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, + 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, 9, 11, 13, 22, 2, 11, + 14, 15, 15, 29, 0, 2, 26, 15, 9, 11, 16, 15, 9, 18, 10, 26, 15, 9, 11, 17, + 15, 9, 18, 13, 26, 0, 0, 0, 0, 0, 0, 0, 0, 18, 2, 0, 0, 0, 16, 73, + 85, 80, 67, 79, 76, 79, 82, 66, 82, 79, 87, 83, 69, 82, 0, 2, 0, 0, 0, 7, +112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, + 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, + 0, 4, 0, 0, 0, 3, 0, 0, 0, 11, 64,108,117, 97, 99, 98, 46,108,117, 97, + 0, 0, 0, 0, 10, 4, 2, 15, 1, 13, 1, 3, 2, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 22,105,117,112, + 67,114,101, 97,116,101, 67,111,108,111,114, 66,114,111,119,115,101,114, 0, 2, + 0, 0, 0, 16,105,117,112, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 11, 64,108,117, 97, 99, 98, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 16, 73, 85, 80, 67, + 79, 76, 79, 82, 66, 82, 79, 87, 83, 69, 82, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 13, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, 2, 0, 0, 0, + 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 5, +100,114, 97,103, 0, 2, 0, 0, 0, 8, 68, 82, 65, 71, 95, 67, 66, 0, 2, 0, + 0, 0, 25,105,117,112, 95, 99,111,108,111,114, 98,114,111,119,115,101,114, 95, +100,114, 97,103, 95, 99, 98, 0, 2, 0, 0, 0, 7, 99,104, 97,110,103,101, 0, + 2, 0, 0, 0, 10, 67, 72, 65, 78, 71, 69, 95, 67, 66, 0, 2, 0, 0, 0, 27, +105,117,112, 95, 99,111,108,111,114, 98,114,111,119,115,101,114, 95, 99,104, 97, +110,103,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,100,114, 97,103, 95, 99, 98, 0, + 2, 0, 0, 0, 10, 99,104, 97,110,103,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacb.lo"); +} diff --git a/iup/srclua3/loh/colorbrowser_be32.loh b/iup/srclua3/loh/colorbrowser_be32.loh new file mode 100755 index 0000000..950ac0b --- /dev/null +++ b/iup/srclua3/loh/colorbrowser_be32.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacb_be32.lo"); +*/ +/* ../obj/iupluacontrols3/luacb_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64,108,117, 97, 99, 98, + 46,108,117, 97, 0, 0, 0, 0, 77, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, + 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, + 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, 9, 11, 13, 22, 2, 11, + 14, 15, 15, 29, 0, 2, 26, 15, 9, 11, 16, 15, 9, 18, 10, 26, 15, 9, 11, 17, + 15, 9, 18, 13, 26, 0, 0, 0, 0, 0, 0, 0, 0, 18, 2, 0, 0, 0, 16, 73, + 85, 80, 67, 79, 76, 79, 82, 66, 82, 79, 87, 83, 69, 82, 0, 2, 0, 0, 0, 7, +112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, + 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, + 0, 4, 0, 0, 0, 3, 0, 0, 0, 11, 64,108,117, 97, 99, 98, 46,108,117, 97, + 0, 0, 0, 0, 10, 4, 2, 15, 1, 13, 1, 3, 2, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 22,105,117,112, + 67,114,101, 97,116,101, 67,111,108,111,114, 66,114,111,119,115,101,114, 0, 2, + 0, 0, 0, 16,105,117,112, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 11, 64,108,117, 97, 99, 98, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 16, 73, 85, 80, 67, + 79, 76, 79, 82, 66, 82, 79, 87, 83, 69, 82, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 13, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, 2, 0, 0, 0, + 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 5, +100,114, 97,103, 0, 2, 0, 0, 0, 8, 68, 82, 65, 71, 95, 67, 66, 0, 2, 0, + 0, 0, 25,105,117,112, 95, 99,111,108,111,114, 98,114,111,119,115,101,114, 95, +100,114, 97,103, 95, 99, 98, 0, 2, 0, 0, 0, 7, 99,104, 97,110,103,101, 0, + 2, 0, 0, 0, 10, 67, 72, 65, 78, 71, 69, 95, 67, 66, 0, 2, 0, 0, 0, 27, +105,117,112, 95, 99,111,108,111,114, 98,114,111,119,115,101,114, 95, 99,104, 97, +110,103,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,100,114, 97,103, 95, 99, 98, 0, + 2, 0, 0, 0, 10, 99,104, 97,110,103,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacb_be32.lo"); +} diff --git a/iup/srclua3/loh/colorbrowser_be64.loh b/iup/srclua3/loh/colorbrowser_be64.loh new file mode 100755 index 0000000..e307445 --- /dev/null +++ b/iup/srclua3/loh/colorbrowser_be64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/colorbrowser_be64.lo"); +*/ +/* ../obj/iupluacontrols3/colorbrowser_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 18, 64, 99,111,108,111,114, + 98,114,111,119,115,101,114, 46,108,117, 97, 0, 0, 0, 0, 77, 5, 0, 22, 1, + 11, 1, 15, 2, 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, + 7, 11, 8, 15, 5, 26, 15, 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, + 15, 9, 11, 13, 22, 2, 11, 14, 15, 15, 29, 0, 2, 26, 15, 9, 11, 16, 15, 9, + 18, 10, 26, 15, 9, 11, 17, 15, 9, 18, 13, 26, 0, 0, 0, 0, 0, 0, 0, 0, + 18, 2, 0, 0, 0, 16, 73, 85, 80, 67, 79, 76, 79, 82, 66, 82, 79, 87, 83, 69, + 82, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80, +101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 18, 64, 99,111, +108,111,114, 98,114,111,119,115,101,114, 46,108,117, 97, 0, 0, 0, 0, 10, 4, + 2, 15, 1, 13, 1, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 22,105,117,112, 67,114,101, 97,116,101, + 67,111,108,111,114, 66,114,111,119,115,101,114, 0, 2, 0, 0, 0, 16,105,117, +112, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, 4, 0, 0, 0, 7, 0, + 0, 0, 18, 64, 99,111,108,111,114, 98,114,111,119,115,101,114, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 16, 73, 85, 80, + 67, 79, 76, 79, 82, 66, 82, 79, 87, 83, 69, 82, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, + 0, 0, 0, 13, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, 2, 0, 0, + 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, + 5,100,114, 97,103, 0, 2, 0, 0, 0, 8, 68, 82, 65, 71, 95, 67, 66, 0, 2, + 0, 0, 0, 25,105,117,112, 95, 99,111,108,111,114, 98,114,111,119,115,101,114, + 95,100,114, 97,103, 95, 99, 98, 0, 2, 0, 0, 0, 7, 99,104, 97,110,103,101, + 0, 2, 0, 0, 0, 10, 67, 72, 65, 78, 71, 69, 95, 67, 66, 0, 2, 0, 0, 0, + 27,105,117,112, 95, 99,111,108,111,114, 98,114,111,119,115,101,114, 95, 99,104, + 97,110,103,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,100,114, 97,103, 95, 99, 98, + 0, 2, 0, 0, 0, 10, 99,104, 97,110,103,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/colorbrowser_be64.lo"); +} diff --git a/iup/srclua3/loh/colorbrowser_le64.loh b/iup/srclua3/loh/colorbrowser_le64.loh new file mode 100755 index 0000000..dbf21d2 --- /dev/null +++ b/iup/srclua3/loh/colorbrowser_le64.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacb_le64.lo"); +*/ +/* ../obj/iupluacontrols3/luacb_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64,108,117, 97, 99, 98, + 46,108,117, 97, 0, 0, 0, 0, 77, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, + 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, + 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, 9, 11, 13, 22, 2, 11, + 14, 15, 15, 29, 0, 2, 26, 15, 9, 11, 16, 15, 9, 18, 10, 26, 15, 9, 11, 17, + 15, 9, 18, 13, 26, 0, 0, 0, 0, 0, 0, 0, 0, 18, 2, 0, 0, 0, 16, 73, + 85, 80, 67, 79, 76, 79, 82, 66, 82, 79, 87, 83, 69, 82, 0, 2, 0, 0, 0, 7, +112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, + 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, + 0, 4, 0, 0, 0, 3, 0, 0, 0, 11, 64,108,117, 97, 99, 98, 46,108,117, 97, + 0, 0, 0, 0, 10, 4, 2, 15, 1, 13, 1, 3, 2, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 22,105,117,112, + 67,114,101, 97,116,101, 67,111,108,111,114, 66,114,111,119,115,101,114, 0, 2, + 0, 0, 0, 16,105,117,112, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 11, 64,108,117, 97, 99, 98, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 16, 73, 85, 80, 67, + 79, 76, 79, 82, 66, 82, 79, 87, 83, 69, 82, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 13, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, 2, 0, 0, 0, + 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 5, +100,114, 97,103, 0, 2, 0, 0, 0, 8, 68, 82, 65, 71, 95, 67, 66, 0, 2, 0, + 0, 0, 25,105,117,112, 95, 99,111,108,111,114, 98,114,111,119,115,101,114, 95, +100,114, 97,103, 95, 99, 98, 0, 2, 0, 0, 0, 7, 99,104, 97,110,103,101, 0, + 2, 0, 0, 0, 10, 67, 72, 65, 78, 71, 69, 95, 67, 66, 0, 2, 0, 0, 0, 27, +105,117,112, 95, 99,111,108,111,114, 98,114,111,119,115,101,114, 95, 99,104, 97, +110,103,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,100,114, 97,103, 95, 99, 98, 0, + 2, 0, 0, 0, 10, 99,104, 97,110,103,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacb_le64.lo"); +} diff --git a/iup/srclua3/loh/colorbrowser_le64w.loh b/iup/srclua3/loh/colorbrowser_le64w.loh new file mode 100755 index 0000000..5738bec --- /dev/null +++ b/iup/srclua3/loh/colorbrowser_le64w.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luacb_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luacb_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64,108,117, 97, 99, 98, + 46,108,117, 97, 0, 0, 0, 0, 77, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, + 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, + 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, 9, 11, 13, 22, 2, 11, + 14, 15, 15, 29, 0, 2, 26, 15, 9, 11, 16, 15, 9, 18, 10, 26, 15, 9, 11, 17, + 15, 9, 18, 13, 26, 0, 0, 0, 0, 0, 0, 0, 0, 18, 2, 0, 0, 0, 16, 73, + 85, 80, 67, 79, 76, 79, 82, 66, 82, 79, 87, 83, 69, 82, 0, 2, 0, 0, 0, 7, +112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, + 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, + 0, 4, 0, 0, 0, 3, 0, 0, 0, 11, 64,108,117, 97, 99, 98, 46,108,117, 97, + 0, 0, 0, 0, 10, 4, 2, 15, 1, 13, 1, 3, 2, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 22,105,117,112, + 67,114,101, 97,116,101, 67,111,108,111,114, 66,114,111,119,115,101,114, 0, 2, + 0, 0, 0, 16,105,117,112, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 11, 64,108,117, 97, 99, 98, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 16, 73, 85, 80, 67, + 79, 76, 79, 82, 66, 82, 79, 87, 83, 69, 82, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 13, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, 2, 0, 0, 0, + 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 5, +100,114, 97,103, 0, 2, 0, 0, 0, 8, 68, 82, 65, 71, 95, 67, 66, 0, 2, 0, + 0, 0, 25,105,117,112, 95, 99,111,108,111,114, 98,114,111,119,115,101,114, 95, +100,114, 97,103, 95, 99, 98, 0, 2, 0, 0, 0, 7, 99,104, 97,110,103,101, 0, + 2, 0, 0, 0, 10, 67, 72, 65, 78, 71, 69, 95, 67, 66, 0, 2, 0, 0, 0, 27, +105,117,112, 95, 99,111,108,111,114, 98,114,111,119,115,101,114, 95, 99,104, 97, +110,103,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,100,114, 97,103, 95, 99, 98, 0, + 2, 0, 0, 0, 10, 99,104, 97,110,103,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luacb_le64w.lo"); +} diff --git a/iup/srclua3/loh/constants.loh b/iup/srclua3/loh/constants.loh new file mode 100755 index 0000000..c9c3c4b --- /dev/null +++ b/iup/srclua3/loh/constants.loh @@ -0,0 +1,301 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/constants.lo"); +*/ +/* ../obj/iuplua3/constants.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 15, 64, 99,111,110,115,116, + 97,110,116,115, 46,108,117, 97, 0, 0, 0, 5,182, 4, 0, 7, 1, 25, 0, 15, + 1, 11, 2, 15, 0, 26, 7, 0, 25, 3, 15, 1, 11, 4, 15, 3, 26, 9, 1, 25, + 5, 15, 1, 11, 6, 15, 5, 26, 9, 1, 25, 7, 15, 1, 11, 8, 15, 7, 26, 6, +255,255, 25, 9, 15, 1, 11, 10, 15, 9, 26, 6,255,254, 25, 11, 15, 1, 11, 12, + 15, 11, 26, 6,255,253, 25, 13, 15, 1, 11, 14, 15, 13, 26, 6,255,252, 25, 15, + 15, 1, 11, 16, 15, 15, 26, 6,255,251, 25, 17, 15, 1, 11, 18, 15, 17, 26, 6, +255,250, 25, 19, 15, 1, 11, 20, 15, 19, 26, 15, 11, 25, 21, 15, 1, 11, 22, 15, + 21, 26, 15, 13, 25, 23, 15, 1, 11, 24, 15, 23, 26, 7, 49, 25, 25, 15, 1, 11, + 26, 15, 25, 26, 7, 50, 25, 27, 15, 1, 11, 28, 15, 27, 26, 7, 51, 25, 29, 15, + 1, 11, 30, 15, 29, 26, 7, 52, 25, 31, 15, 1, 11, 32, 15, 31, 26, 7, 53, 25, + 33, 15, 1, 11, 34, 15, 33, 26, 9, 1, 25, 35, 15, 1, 11, 36, 15, 35, 26, 9, + 2, 25, 37, 15, 1, 11, 38, 15, 37, 26, 9, 3, 25, 39, 15, 1, 11, 40, 15, 39, + 26, 9, 4, 25, 41, 15, 1, 11, 42, 15, 41, 26, 7, 0, 25, 43, 15, 1, 11, 44, + 15, 43, 26, 7, 1, 25, 45, 15, 1, 11, 46, 15, 45, 26, 7, 2, 25, 47, 15, 1, + 11, 48, 15, 47, 26, 7, 3, 25, 49, 15, 1, 11, 50, 15, 49, 26, 7, 4, 25, 51, + 15, 1, 11, 52, 15, 51, 26, 7, 5, 25, 53, 15, 1, 11, 54, 15, 53, 26, 7, 6, + 25, 55, 15, 1, 11, 56, 15, 55, 26, 7, 7, 25, 57, 15, 1, 11, 58, 15, 57, 26, + 7, 8, 25, 59, 15, 1, 11, 60, 15, 59, 26, 7, 9, 25, 61, 15, 1, 11, 62, 15, + 61, 26, 7, 10, 25, 63, 15, 1, 11, 64, 15, 63, 26, 7, 11, 25, 65, 15, 1, 11, + 66, 15, 65, 26, 7, 0, 25, 67, 15, 1, 11, 68, 15, 67, 26, 7, 1, 25, 69, 15, + 1, 11, 70, 15, 69, 26, 7, 2, 25, 71, 15, 1, 11, 72, 15, 71, 26, 7, 3, 25, + 73, 15, 1, 11, 74, 15, 73, 26, 7, 4, 25, 75, 15, 1, 11, 76, 15, 75, 26, 15, + 78, 7, 1, 7, 0, 7, 0, 2, 1, 3, 25, 77, 15, 1, 11, 77, 15, 77, 26, 15, + 78, 7, 0, 7, 1, 7, 0, 2, 1, 3, 25, 79, 15, 1, 11, 79, 15, 79, 26, 15, + 78, 7, 0, 7, 0, 7, 1, 2, 1, 3, 25, 80, 15, 1, 11, 80, 15, 80, 26, 15, + 78, 7, 0, 7, 0, 7, 0, 2, 1, 3, 25, 81, 15, 1, 11, 81, 15, 81, 26, 15, + 78, 7, 1, 7, 1, 7, 1, 2, 1, 3, 25, 82, 15, 1, 11, 82, 15, 82, 26, 15, + 78, 7, 1, 7, 1, 7, 0, 2, 1, 3, 25, 83, 15, 1, 11, 83, 15, 83, 26, 11, + 85, 25, 84, 15, 1, 11, 85, 15, 84, 26, 11, 87, 25, 86, 15, 1, 11, 87, 15, 86, + 26, 11, 89, 25, 88, 15, 1, 11, 89, 15, 88, 26, 11, 91, 25, 90, 15, 1, 11, 91, + 15, 90, 26, 11, 93, 25, 92, 15, 1, 11, 93, 15, 92, 26, 11, 95, 25, 94, 15, 1, + 11, 95, 15, 94, 26, 11, 97, 25, 96, 15, 1, 11, 97, 15, 96, 26, 11, 99, 25, 98, + 15, 1, 11, 99, 15, 98, 26, 11,101, 25,100, 15, 1, 11,101, 15,100, 26, 11,103, + 25,102, 15, 1, 11,103, 15,102, 26, 11,105, 25,104, 15, 1, 11,105, 15,104, 26, + 11,107, 25,106, 15, 1, 11,107, 15,106, 26, 11,109, 25,108, 15, 1, 11,109, 15, +108, 26, 11,111, 25,110, 15, 1, 11,111, 15,110, 26, 11,113, 25,112, 15, 1, 11, +113, 15,112, 26, 11,115, 25,114, 15, 1, 11,115, 15,114, 26, 11,117, 25,116, 15, + 1, 11,117, 15,116, 26, 11,119, 25,118, 15, 1, 11,119, 15,118, 26, 11,121, 25, +120, 15, 1, 11,121, 15,120, 26, 11,123, 25,122, 15, 1, 11,123, 15,122, 26, 11, +125, 25,124, 15, 1, 11,125, 15,124, 26, 11,127, 25,126, 15, 1, 11,127, 15,126, + 26, 11,129, 25,128, 15, 1, 11,129, 15,128, 26, 11,131, 25,130, 15, 1, 11,131, + 15,130, 26, 11,133, 25,132, 15, 1, 11,133, 15,132, 26, 11,135, 25,134, 15, 1, + 11,135, 15,134, 26, 11,137, 25,136, 15, 1, 11,137, 15,136, 26, 11,139, 25,138, + 15, 1, 11,139, 15,138, 26, 11,141, 25,140, 15, 1, 11,141, 15,140, 26, 11,143, + 25,142, 15, 1, 11,143, 15,142, 26, 11,145, 25,144, 15, 1, 11,145, 15,144, 26, + 11,147, 25,146, 15, 1, 11,147, 15,146, 26, 11,149, 25,148, 15, 1, 11,149, 15, +148, 26, 11,151, 25,150, 15, 1, 11,151, 15,150, 26, 11,153, 25,152, 15, 1, 11, +153, 15,152, 26, 11,155, 25,154, 15, 1, 11,155, 15,154, 26, 11,157, 25,156, 15, + 1, 11,157, 15,156, 26, 11,159, 25,158, 15, 1, 11,159, 15,158, 26, 11,161, 25, +160, 15, 1, 11,161, 15,160, 26, 11,163, 25,162, 15, 1, 11,163, 15,162, 26, 11, +165, 25,164, 15, 1, 11,165, 15,164, 26, 11,167, 25,166, 15, 1, 11,167, 15,166, + 26, 11,169, 25,168, 15, 1, 11,169, 15,168, 26, 11,171, 25,170, 15, 1, 11,171, + 15,170, 26, 11,173, 25,172, 15, 1, 11,173, 15,172, 26, 11,175, 25,174, 15, 1, + 11,175, 15,174, 26, 11,177, 25,176, 15, 1, 11,177, 15,176, 26, 11,179, 25,178, + 15, 1, 11,179, 15,178, 26, 11,181, 25,180, 15, 1, 11,181, 15,180, 26, 11,183, + 25,182, 15, 1, 11,183, 15,182, 26, 11,185, 25,184, 15, 1, 11,185, 15,184, 26, + 11,187, 25,186, 15, 1, 11,187, 15,186, 26, 11,189, 25,188, 15, 1, 11,189, 15, +188, 26, 11,191, 25,190, 15, 1, 11,191, 15,190, 26, 11,193, 25,192, 15, 1, 11, +193, 15,192, 26, 11,195, 25,194, 15, 1, 11,195, 15,194, 26, 11,197, 25,196, 15, + 1, 11,197, 15,196, 26, 11,199, 25,198, 15, 1, 11,199, 15,198, 26, 11,201, 25, +200, 15, 1, 11,201, 15,200, 26, 11,203, 25,202, 15, 1, 11,203, 15,202, 26, 11, +205, 25,204, 15, 1, 11,205, 15,204, 26, 11,207, 25,206, 15, 1, 11,207, 15,206, + 26, 11,209, 25,208, 15, 1, 11,209, 15,208, 26, 11,211, 25,210, 15, 1, 11,211, + 15,210, 26, 11,213, 25,212, 15, 1, 11,213, 15,212, 26, 11,215, 25,214, 15, 1, + 11,215, 15,214, 26, 11,217, 25,216, 15, 1, 11,217, 15,216, 26, 11,219, 25,218, + 15, 1, 11,219, 15,218, 26, 11,221, 25,220, 15, 1, 11,221, 15,220, 26, 11,223, + 25,222, 15, 1, 11,223, 15,222, 26, 11,225, 25,224, 15, 1, 11,225, 15,224, 26, + 11,227, 25,226, 15, 1, 11,227, 15,226, 26, 11,229, 25,228, 15, 1, 11,229, 15, +228, 26, 11,231, 25,230, 15, 1, 11,231, 15,230, 26, 11,233, 25,232, 15, 1, 11, +233, 15,232, 26, 11,235, 25,234, 15, 1, 11,235, 15,234, 26, 11,237, 25,236, 15, + 1, 11,237, 15,236, 26, 11,239, 25,238, 15, 1, 11,239, 15,238, 26, 11,241, 25, +240, 15, 1, 11,241, 15,240, 26, 11,243, 25,242, 15, 1, 11,243, 15,242, 26, 15, + 1, 11,244, 11,245, 26, 15, 1, 11,246, 11,247, 26, 15, 1, 11,248, 11,249, 26, + 15, 1, 11,250, 11,251, 26, 15, 1, 11,252, 11,253, 26, 0, 0, 0, 0, 0, 0, + 0, 0,254, 2, 0, 0, 0, 10, 73, 85, 80, 95, 69, 82, 82, 79, 82, 0, 2, 0, + 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6, 69, 82, 82, 79, 82, 0, 2, 0, + 0, 0, 12, 73, 85, 80, 95, 78, 79, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 8, + 78, 79, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 79, 80, 69, + 78, 69, 68, 0, 2, 0, 0, 0, 7, 79, 80, 69, 78, 69, 68, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 73, 78, 86, 65, 76, 73, 68, 0, 2, 0, 0, 0, 8, 73, 78, + 86, 65, 76, 73, 68, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 67, 69, 78, 84, 69, + 82, 0, 2, 0, 0, 0, 7, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 9, 73, + 85, 80, 95, 76, 69, 70, 84, 0, 2, 0, 0, 0, 5, 76, 69, 70, 84, 0, 2, 0, + 0, 0, 10, 73, 85, 80, 95, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 6, 82, 73, + 71, 72, 84, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 77, 79, 85, 83, 69, 80, 79, + 83, 0, 2, 0, 0, 0, 9, 77, 79, 85, 83, 69, 80, 79, 83, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 67, 85, 82, 82, 69, 78, 84, 0, 2, 0, 0, 0, 8, 67, 85, + 82, 82, 69, 78, 84, 0, 2, 0, 0, 0, 17, 73, 85, 80, 95, 67, 69, 78, 84, 69, + 82, 80, 65, 82, 69, 78, 84, 0, 2, 0, 0, 0, 13, 67, 69, 78, 84, 69, 82, 80, + 65, 82, 69, 78, 84, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 84, 79, 80, 0, 2, + 0, 0, 0, 4, 84, 79, 80, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 66, 79, 84, + 84, 79, 77, 0, 2, 0, 0, 0, 7, 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 49, 0, 2, 0, 0, 0, 8, 66, 85, + 84, 84, 79, 78, 49, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, + 78, 50, 0, 2, 0, 0, 0, 8, 66, 85, 84, 84, 79, 78, 50, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 51, 0, 2, 0, 0, 0, 8, 66, 85, + 84, 84, 79, 78, 51, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, + 78, 52, 0, 2, 0, 0, 0, 8, 66, 85, 84, 84, 79, 78, 52, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 53, 0, 2, 0, 0, 0, 8, 66, 85, + 84, 84, 79, 78, 53, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 73, 71, 78, 79, 82, + 69, 0, 2, 0, 0, 0, 7, 73, 71, 78, 79, 82, 69, 0, 2, 0, 0, 0, 12, 73, + 85, 80, 95, 68, 69, 70, 65, 85, 76, 84, 0, 2, 0, 0, 0, 8, 68, 69, 70, 65, + 85, 76, 84, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 67, 76, 79, 83, 69, 0, 2, + 0, 0, 0, 6, 67, 76, 79, 83, 69, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 67, + 79, 78, 84, 73, 78, 85, 69, 0, 2, 0, 0, 0, 9, 67, 79, 78, 84, 73, 78, 85, + 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 66, 85, 80, 0, 2, 0, 0, 0, + 5, 83, 66, 85, 80, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 66, 68, 78, 0, + 2, 0, 0, 0, 5, 83, 66, 68, 78, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, + 66, 80, 71, 85, 80, 0, 2, 0, 0, 0, 7, 83, 66, 80, 71, 85, 80, 0, 2, 0, + 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, 71, 68, 78, 0, 2, 0, 0, 0, 7, 83, + 66, 80, 71, 68, 78, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, 79, 83, + 86, 0, 2, 0, 0, 0, 7, 83, 66, 80, 79, 83, 86, 0, 2, 0, 0, 0, 12, 73, + 85, 80, 95, 83, 66, 68, 82, 65, 71, 86, 0, 2, 0, 0, 0, 8, 83, 66, 68, 82, + 65, 71, 86, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 76, 69, 70, 84, 0, + 2, 0, 0, 0, 7, 83, 66, 76, 69, 70, 84, 0, 2, 0, 0, 0, 12, 73, 85, 80, + 95, 83, 66, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 8, 83, 66, 82, 73, 71, 72, + 84, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 83, 66, 80, 71, 76, 69, 70, 84, 0, + 2, 0, 0, 0, 9, 83, 66, 80, 71, 76, 69, 70, 84, 0, 2, 0, 0, 0, 14, 73, + 85, 80, 95, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 10, 83, 66, + 80, 71, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, + 79, 83, 72, 0, 2, 0, 0, 0, 7, 83, 66, 80, 79, 83, 72, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 83, 66, 68, 82, 65, 71, 72, 0, 2, 0, 0, 0, 8, 83, 66, + 68, 82, 65, 71, 72, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 72, 79, 87, 0, + 2, 0, 0, 0, 5, 83, 72, 79, 87, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 82, + 69, 83, 84, 79, 82, 69, 0, 2, 0, 0, 0, 8, 82, 69, 83, 84, 79, 82, 69, 0, + 2, 0, 0, 0, 13, 73, 85, 80, 95, 77, 73, 78, 73, 77, 73, 90, 69, 0, 2, 0, + 0, 0, 9, 77, 73, 78, 73, 77, 73, 90, 69, 0, 2, 0, 0, 0, 13, 73, 85, 80, + 95, 77, 65, 88, 73, 77, 73, 90, 69, 0, 2, 0, 0, 0, 9, 77, 65, 88, 73, 77, + 73, 90, 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 72, 73, 68, 69, 0, 2, 0, + 0, 0, 5, 72, 73, 68, 69, 0, 2, 0, 0, 0, 4, 82, 69, 68, 0, 2, 0, 0, + 0, 7, 73,117,112, 82, 71, 66, 0, 2, 0, 0, 0, 6, 71, 82, 69, 69, 78, 0, + 2, 0, 0, 0, 5, 66, 76, 85, 69, 0, 2, 0, 0, 0, 6, 66, 76, 65, 67, 75, + 0, 2, 0, 0, 0, 6, 87, 72, 73, 84, 69, 0, 2, 0, 0, 0, 7, 89, 69, 76, + 76, 79, 87, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 79, 78, 0, 2, 0, 0, 0, + 3, 79, 78, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 79, 70, 70, 0, 2, 0, 0, + 0, 4, 79, 70, 70, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, + 0, 0, 0, 4, 89, 69, 83, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 79, 0, + 2, 0, 0, 0, 3, 78, 79, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 65, 80, 80, + 69, 78, 68, 0, 2, 0, 0, 0, 7, 65, 80, 80, 69, 78, 68, 0, 2, 0, 0, 0, + 13, 73, 85, 80, 95, 86, 69, 82, 84, 73, 67, 65, 76, 0, 2, 0, 0, 0, 9, 86, + 69, 82, 84, 73, 67, 65, 76, 0, 2, 0, 0, 0, 15, 73, 85, 80, 95, 72, 79, 82, + 73, 90, 79, 78, 84, 65, 76, 0, 2, 0, 0, 0, 11, 72, 79, 82, 73, 90, 79, 78, + 84, 65, 76, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 65, 67, 69, 78, 84, 69, 82, + 0, 2, 0, 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 10, 73, + 85, 80, 95, 65, 76, 69, 70, 84, 0, 2, 0, 0, 0, 6, 65, 76, 69, 70, 84, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, + 7, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 65, 84, 79, + 80, 0, 2, 0, 0, 0, 5, 65, 84, 79, 80, 0, 2, 0, 0, 0, 12, 73, 85, 80, + 95, 65, 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, 8, 65, 66, 79, 84, 84, 79, + 77, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 78, 79, 82, 84, 72, 0, 2, 0, 0, + 0, 6, 78, 79, 82, 84, 72, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 83, 79, 85, + 84, 72, 0, 2, 0, 0, 0, 6, 83, 79, 85, 84, 72, 0, 2, 0, 0, 0, 9, 73, + 85, 80, 95, 87, 69, 83, 84, 0, 2, 0, 0, 0, 5, 87, 69, 83, 84, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 95, 69, 65, 83, 84, 0, 2, 0, 0, 0, 5, 69, 65, 83, + 84, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 69, 0, 2, 0, 0, 0, 3, 78, + 69, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 83, 69, 0, 2, 0, 0, 0, 3, 83, + 69, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 87, 0, 2, 0, 0, 0, 3, 78, + 87, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 83, 87, 0, 2, 0, 0, 0, 3, 83, + 87, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 70, 85, 76, 76, 0, 2, 0, 0, 0, + 5, 70, 85, 76, 76, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 72, 65, 76, 70, 0, + 2, 0, 0, 0, 5, 72, 65, 76, 70, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 84, + 72, 73, 82, 68, 0, 2, 0, 0, 0, 6, 84, 72, 73, 82, 68, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 81, 85, 65, 82, 84, 69, 82, 0, 2, 0, 0, 0, 8, 81, 85, + 65, 82, 84, 69, 82, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 69, 73, 71, 72, 84, + 72, 0, 2, 0, 0, 0, 7, 69, 73, 71, 72, 84, 72, 0, 2, 0, 0, 0, 10, 73, + 85, 80, 95, 65, 82, 82, 79, 87, 0, 2, 0, 0, 0, 6, 65, 82, 82, 79, 87, 0, + 2, 0, 0, 0, 9, 73, 85, 80, 95, 66, 85, 83, 89, 0, 2, 0, 0, 0, 5, 66, + 85, 83, 89, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, + 78, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 78, 0, 2, 0, 0, 0, + 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 0, 2, 0, 0, 0, 9, 82, + 69, 83, 73, 90, 69, 95, 83, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, + 73, 90, 69, 95, 69, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 69, 0, + 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 87, 0, 2, 0, + 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 87, 0, 2, 0, 0, 0, 14, 73, 85, 80, + 95, 82, 69, 83, 73, 90, 69, 95, 78, 69, 0, 2, 0, 0, 0, 10, 82, 69, 83, 73, + 90, 69, 95, 78, 69, 0, 2, 0, 0, 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, + 69, 95, 78, 87, 0, 2, 0, 0, 0, 10, 82, 69, 83, 73, 90, 69, 95, 78, 87, 0, + 2, 0, 0, 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 69, 0, 2, + 0, 0, 0, 10, 82, 69, 83, 73, 90, 69, 95, 83, 69, 0, 2, 0, 0, 0, 14, 73, + 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 87, 0, 2, 0, 0, 0, 10, 82, 69, + 83, 73, 90, 69, 95, 83, 87, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 77, 79, 86, + 69, 0, 2, 0, 0, 0, 5, 77, 79, 86, 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, + 95, 72, 65, 78, 68, 0, 2, 0, 0, 0, 5, 72, 65, 78, 68, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 95, 78, 79, 78, 69, 0, 2, 0, 0, 0, 5, 78, 79, 78, 69, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 95, 73, 85, 80, 0, 2, 0, 0, 0, 4, 73, 85, + 80, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 67, 82, 79, 83, 83, 0, 2, 0, 0, + 0, 6, 67, 82, 79, 83, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 80, 69, 78, + 0, 2, 0, 0, 0, 4, 80, 69, 78, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 84, + 69, 88, 84, 0, 2, 0, 0, 0, 5, 84, 69, 88, 84, 0, 2, 0, 0, 0, 13, 73, + 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 67, 0, 2, 0, 0, 0, 9, 82, 69, 83, + 73, 90, 69, 95, 67, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 79, 80, 69, 78, 72, + 65, 78, 68, 0, 2, 0, 0, 0, 9, 79, 80, 69, 78, 72, 65, 78, 68, 0, 2, 0, + 0, 0, 23, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, + 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 19, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 23, 73, 85, 80, 95, 72, + 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, + 0, 0, 19, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, + 56, 0, 2, 0, 0, 0, 21, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 17, 72, 69, 76, 86, 69, 84, 73, + 67, 65, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, + 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, + 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, + 95, 49, 48, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, + 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 20, 72, 69, + 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, 0, 2, 0, + 0, 0, 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, + 68, 95, 49, 48, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, + 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, + 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, + 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, + 50, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 20, 72, 69, 76, 86, + 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, + 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, + 49, 50, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, + 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, + 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 20, + 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 52, 0, + 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, + 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, + 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 22, 73, + 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, 49, 52, + 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, + 95, 49, 52, 0, 2, 0, 0, 0, 21, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, + 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 17, 67, 79, 85, 82, 73, + 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 21, 73, 85, 80, + 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, + 0, 0, 17, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, + 2, 0, 0, 0, 19, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, + 68, 95, 56, 0, 2, 0, 0, 0, 15, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, + 68, 95, 56, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, + 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, + 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 22, 73, + 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, + 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, + 95, 49, 48, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, + 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 16, 67, 79, 85, 82, 73, 69, + 82, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, + 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, + 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, + 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, + 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, + 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 67, + 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, 16, + 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, + 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, + 49, 52, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, + 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, + 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 18, 67, 79, + 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, + 20, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 52, + 0, 2, 0, 0, 0, 16, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, + 52, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, 79, 82, + 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 15, 84, 73, 77, 69, 83, 95, 78, 79, 82, + 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, 84, 73, 77, 69, 83, + 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 15, 84, 73, 77, 69, 83, + 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 17, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 13, 84, 73, 77, + 69, 83, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 16, + 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, + 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, + 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, + 48, 0, 2, 0, 0, 0, 18, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, + 68, 95, 49, 48, 0, 2, 0, 0, 0, 14, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, + 95, 49, 48, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, + 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, + 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 16, + 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, + 18, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, + 0, 0, 0, 14, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, + 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, + 49, 52, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, + 95, 49, 52, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 73, + 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, + 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 18, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 14, 84, 73, + 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 11, 77, 65, 83, + 75, 95, 70, 76, 79, 65, 84, 0, 2, 0, 0, 0, 24, 91, 43, 47, 45, 93, 63, 40, + 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, 43, 41, 0, 2, 0, 0, + 0, 12, 77, 65, 83, 75, 95, 85, 70, 76, 79, 65, 84, 0, 2, 0, 0, 0, 18, 40, + 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, 43, 41, 0, 2, 0, 0, + 0, 12, 77, 65, 83, 75, 95, 69, 70, 76, 79, 65, 84, 0, 2, 0, 0, 0, 40, 91, + 43, 47, 45, 93, 63, 40, 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, + 43, 41, 40, 91,101, 69, 93, 91, 43, 47, 45, 93, 63, 47,100, 43, 41, 63, 0, 2, + 0, 0, 0, 9, 77, 65, 83, 75, 95, 73, 78, 84, 0, 2, 0, 0, 0, 10, 91, 43, + 47, 45, 93, 63, 47,100, 43, 0, 2, 0, 0, 0, 10, 77, 65, 83, 75, 95, 85, 73, + 78, 84, 0, 2, 0, 0, 0, 4, 47,100, 43, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/constants.lo"); +} diff --git a/iup/srclua3/loh/constants_be32.loh b/iup/srclua3/loh/constants_be32.loh new file mode 100755 index 0000000..0b6a3a8 --- /dev/null +++ b/iup/srclua3/loh/constants_be32.loh @@ -0,0 +1,289 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/constants_be32.lo"); +*/ +/* ../obj/iuplua3/constants_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 15, 64, 99,111,110,115,116, + 97,110,116,115, 46,108,117, 97, 0, 0, 0, 5,147, 4, 0, 7, 1, 25, 0, 15, + 1, 11, 2, 15, 0, 26, 7, 0, 25, 3, 15, 1, 11, 4, 15, 3, 26, 9, 1, 25, + 5, 15, 1, 11, 6, 15, 5, 26, 9, 1, 25, 7, 15, 1, 11, 8, 15, 7, 26, 6, +255,255, 25, 9, 15, 1, 11, 10, 15, 9, 26, 6,255,254, 25, 11, 15, 1, 11, 12, + 15, 11, 26, 6,255,253, 25, 13, 15, 1, 11, 14, 15, 13, 26, 6,255,252, 25, 15, + 15, 1, 11, 16, 15, 15, 26, 6,255,251, 25, 17, 15, 1, 11, 18, 15, 17, 26, 6, +255,250, 25, 19, 15, 1, 11, 20, 15, 19, 26, 15, 11, 25, 21, 15, 1, 11, 22, 15, + 21, 26, 15, 13, 25, 23, 15, 1, 11, 24, 15, 23, 26, 7, 49, 25, 25, 15, 1, 11, + 26, 15, 25, 26, 7, 50, 25, 27, 15, 1, 11, 28, 15, 27, 26, 7, 51, 25, 29, 15, + 1, 11, 30, 15, 29, 26, 7, 52, 25, 31, 15, 1, 11, 32, 15, 31, 26, 7, 53, 25, + 33, 15, 1, 11, 34, 15, 33, 26, 9, 1, 25, 35, 15, 1, 11, 36, 15, 35, 26, 9, + 2, 25, 37, 15, 1, 11, 38, 15, 37, 26, 9, 3, 25, 39, 15, 1, 11, 40, 15, 39, + 26, 9, 4, 25, 41, 15, 1, 11, 42, 15, 41, 26, 7, 0, 25, 43, 15, 1, 11, 44, + 15, 43, 26, 7, 1, 25, 45, 15, 1, 11, 46, 15, 45, 26, 7, 2, 25, 47, 15, 1, + 11, 48, 15, 47, 26, 7, 3, 25, 49, 15, 1, 11, 50, 15, 49, 26, 7, 4, 25, 51, + 15, 1, 11, 52, 15, 51, 26, 7, 5, 25, 53, 15, 1, 11, 54, 15, 53, 26, 7, 6, + 25, 55, 15, 1, 11, 56, 15, 55, 26, 7, 7, 25, 57, 15, 1, 11, 58, 15, 57, 26, + 7, 8, 25, 59, 15, 1, 11, 60, 15, 59, 26, 7, 9, 25, 61, 15, 1, 11, 62, 15, + 61, 26, 7, 10, 25, 63, 15, 1, 11, 64, 15, 63, 26, 7, 11, 25, 65, 15, 1, 11, + 66, 15, 65, 26, 7, 0, 25, 67, 15, 1, 11, 68, 15, 67, 26, 7, 1, 25, 69, 15, + 1, 11, 70, 15, 69, 26, 7, 2, 25, 71, 15, 1, 11, 72, 15, 71, 26, 7, 3, 25, + 73, 15, 1, 11, 74, 15, 73, 26, 7, 4, 25, 75, 15, 1, 11, 76, 15, 75, 26, 15, + 78, 7, 1, 7, 0, 7, 0, 2, 1, 3, 25, 77, 15, 1, 11, 77, 15, 77, 26, 15, + 78, 7, 0, 7, 1, 7, 0, 2, 1, 3, 25, 79, 15, 1, 11, 79, 15, 79, 26, 15, + 78, 7, 0, 7, 0, 7, 1, 2, 1, 3, 25, 80, 15, 1, 11, 80, 15, 80, 26, 15, + 78, 7, 0, 7, 0, 7, 0, 2, 1, 3, 25, 81, 15, 1, 11, 81, 15, 81, 26, 15, + 78, 7, 1, 7, 1, 7, 1, 2, 1, 3, 25, 82, 15, 1, 11, 82, 15, 82, 26, 15, + 78, 7, 1, 7, 1, 7, 0, 2, 1, 3, 25, 83, 15, 1, 11, 83, 15, 83, 26, 11, + 85, 25, 84, 15, 1, 11, 85, 15, 84, 26, 11, 87, 25, 86, 15, 1, 11, 87, 15, 86, + 26, 11, 89, 25, 88, 15, 1, 11, 89, 15, 88, 26, 11, 91, 25, 90, 15, 1, 11, 91, + 15, 90, 26, 11, 93, 25, 92, 15, 1, 11, 93, 15, 92, 26, 11, 95, 25, 94, 15, 1, + 11, 95, 15, 94, 26, 11, 97, 25, 96, 15, 1, 11, 97, 15, 96, 26, 11, 99, 25, 98, + 15, 1, 11, 99, 15, 98, 26, 11,101, 25,100, 15, 1, 11,101, 15,100, 26, 11,103, + 25,102, 15, 1, 11,103, 15,102, 26, 11,105, 25,104, 15, 1, 11,105, 15,104, 26, + 11,107, 25,106, 15, 1, 11,107, 15,106, 26, 11,109, 25,108, 15, 1, 11,109, 15, +108, 26, 11,111, 25,110, 15, 1, 11,111, 15,110, 26, 11,113, 25,112, 15, 1, 11, +113, 15,112, 26, 11,115, 25,114, 15, 1, 11,115, 15,114, 26, 11,117, 25,116, 15, + 1, 11,117, 15,116, 26, 11,119, 25,118, 15, 1, 11,119, 15,118, 26, 11,121, 25, +120, 15, 1, 11,121, 15,120, 26, 11,123, 25,122, 15, 1, 11,123, 15,122, 26, 11, +125, 25,124, 15, 1, 11,125, 15,124, 26, 11,127, 25,126, 15, 1, 11,127, 15,126, + 26, 11,129, 25,128, 15, 1, 11,129, 15,128, 26, 11,131, 25,130, 15, 1, 11,131, + 15,130, 26, 11,133, 25,132, 15, 1, 11,133, 15,132, 26, 11,135, 25,134, 15, 1, + 11,135, 15,134, 26, 11,137, 25,136, 15, 1, 11,137, 15,136, 26, 11,139, 25,138, + 15, 1, 11,139, 15,138, 26, 11,141, 25,140, 15, 1, 11,141, 15,140, 26, 11,143, + 25,142, 15, 1, 11,143, 15,142, 26, 11,145, 25,144, 15, 1, 11,145, 15,144, 26, + 11,147, 25,146, 15, 1, 11,147, 15,146, 26, 11,149, 25,148, 15, 1, 11,149, 15, +148, 26, 11,151, 25,150, 15, 1, 11,151, 15,150, 26, 11,153, 25,152, 15, 1, 11, +153, 15,152, 26, 11,155, 25,154, 15, 1, 11,155, 15,154, 26, 11,157, 25,156, 15, + 1, 11,157, 15,156, 26, 11,159, 25,158, 15, 1, 11,159, 15,158, 26, 11,161, 25, +160, 15, 1, 11,161, 15,160, 26, 11,163, 25,162, 15, 1, 11,163, 15,162, 26, 11, +165, 25,164, 15, 1, 11,165, 15,164, 26, 11,167, 25,166, 15, 1, 11,167, 15,166, + 26, 11,169, 25,168, 15, 1, 11,169, 15,168, 26, 11,171, 25,170, 15, 1, 11,171, + 15,170, 26, 11,173, 25,172, 15, 1, 11,173, 15,172, 26, 11,175, 25,174, 15, 1, + 11,175, 15,174, 26, 11,177, 25,176, 15, 1, 11,177, 15,176, 26, 11,179, 25,178, + 15, 1, 11,179, 15,178, 26, 11,181, 25,180, 15, 1, 11,181, 15,180, 26, 11,183, + 25,182, 15, 1, 11,183, 15,182, 26, 11,185, 25,184, 15, 1, 11,185, 15,184, 26, + 11,187, 25,186, 15, 1, 11,187, 15,186, 26, 11,189, 25,188, 15, 1, 11,189, 15, +188, 26, 11,191, 25,190, 15, 1, 11,191, 15,190, 26, 11,193, 25,192, 15, 1, 11, +193, 15,192, 26, 11,195, 25,194, 15, 1, 11,195, 15,194, 26, 11,197, 25,196, 15, + 1, 11,197, 15,196, 26, 11,199, 25,198, 15, 1, 11,199, 15,198, 26, 11,201, 25, +200, 15, 1, 11,201, 15,200, 26, 11,203, 25,202, 15, 1, 11,203, 15,202, 26, 11, +205, 25,204, 15, 1, 11,205, 15,204, 26, 11,207, 25,206, 15, 1, 11,207, 15,206, + 26, 11,209, 25,208, 15, 1, 11,209, 15,208, 26, 11,211, 25,210, 15, 1, 11,211, + 15,210, 26, 11,213, 25,212, 15, 1, 11,213, 15,212, 26, 11,215, 25,214, 15, 1, + 11,215, 15,214, 26, 11,217, 25,216, 15, 1, 11,217, 15,216, 26, 11,219, 25,218, + 15, 1, 11,219, 15,218, 26, 11,221, 25,220, 15, 1, 11,221, 15,220, 26, 11,223, + 25,222, 15, 1, 11,223, 15,222, 26, 11,225, 25,224, 15, 1, 11,225, 15,224, 26, + 11,227, 25,226, 15, 1, 11,227, 15,226, 26, 11,229, 25,228, 15, 1, 11,229, 15, +228, 26, 11,231, 25,230, 15, 1, 11,231, 15,230, 26, 11,233, 25,232, 15, 1, 11, +233, 15,232, 26, 11,235, 25,234, 15, 1, 11,235, 15,234, 26, 11,237, 25,236, 15, + 1, 11,237, 15,236, 26, 11,239, 25,238, 15, 1, 11,239, 15,238, 26, 11,241, 25, +240, 15, 1, 11,241, 15,240, 26, 11,243, 25,242, 15, 1, 11,243, 15,242, 26, 0, + 0, 0, 0, 0, 0, 0, 0,244, 2, 0, 0, 0, 10, 73, 85, 80, 95, 69, 82, 82, + 79, 82, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6, 69, 82, 82, + 79, 82, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 78, 79, 69, 82, 82, 79, 82, 0, + 2, 0, 0, 0, 8, 78, 79, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 95, 79, 80, 69, 78, 69, 68, 0, 2, 0, 0, 0, 7, 79, 80, 69, 78, 69, 68, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 73, 78, 86, 65, 76, 73, 68, 0, 2, 0, + 0, 0, 8, 73, 78, 86, 65, 76, 73, 68, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, + 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 7, 67, 69, 78, 84, 69, 82, 0, 2, + 0, 0, 0, 9, 73, 85, 80, 95, 76, 69, 70, 84, 0, 2, 0, 0, 0, 5, 76, 69, + 70, 84, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 82, 73, 71, 72, 84, 0, 2, 0, + 0, 0, 6, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 77, 79, + 85, 83, 69, 80, 79, 83, 0, 2, 0, 0, 0, 9, 77, 79, 85, 83, 69, 80, 79, 83, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 67, 85, 82, 82, 69, 78, 84, 0, 2, 0, + 0, 0, 8, 67, 85, 82, 82, 69, 78, 84, 0, 2, 0, 0, 0, 17, 73, 85, 80, 95, + 67, 69, 78, 84, 69, 82, 80, 65, 82, 69, 78, 84, 0, 2, 0, 0, 0, 13, 67, 69, + 78, 84, 69, 82, 80, 65, 82, 69, 78, 84, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 84, 79, 80, 0, 2, 0, 0, 0, 4, 84, 79, 80, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 95, 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, 7, 66, 79, 84, 84, 79, 77, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 49, 0, 2, 0, + 0, 0, 8, 66, 85, 84, 84, 79, 78, 49, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, + 66, 85, 84, 84, 79, 78, 50, 0, 2, 0, 0, 0, 8, 66, 85, 84, 84, 79, 78, 50, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 51, 0, 2, 0, + 0, 0, 8, 66, 85, 84, 84, 79, 78, 51, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, + 66, 85, 84, 84, 79, 78, 52, 0, 2, 0, 0, 0, 8, 66, 85, 84, 84, 79, 78, 52, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 53, 0, 2, 0, + 0, 0, 8, 66, 85, 84, 84, 79, 78, 53, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, + 73, 71, 78, 79, 82, 69, 0, 2, 0, 0, 0, 7, 73, 71, 78, 79, 82, 69, 0, 2, + 0, 0, 0, 12, 73, 85, 80, 95, 68, 69, 70, 65, 85, 76, 84, 0, 2, 0, 0, 0, + 8, 68, 69, 70, 65, 85, 76, 84, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 67, 76, + 79, 83, 69, 0, 2, 0, 0, 0, 6, 67, 76, 79, 83, 69, 0, 2, 0, 0, 0, 13, + 73, 85, 80, 95, 67, 79, 78, 84, 73, 78, 85, 69, 0, 2, 0, 0, 0, 9, 67, 79, + 78, 84, 73, 78, 85, 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 66, 85, 80, + 0, 2, 0, 0, 0, 5, 83, 66, 85, 80, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, + 83, 66, 68, 78, 0, 2, 0, 0, 0, 5, 83, 66, 68, 78, 0, 2, 0, 0, 0, 11, + 73, 85, 80, 95, 83, 66, 80, 71, 85, 80, 0, 2, 0, 0, 0, 7, 83, 66, 80, 71, + 85, 80, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, 71, 68, 78, 0, 2, + 0, 0, 0, 7, 83, 66, 80, 71, 68, 78, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, + 83, 66, 80, 79, 83, 86, 0, 2, 0, 0, 0, 7, 83, 66, 80, 79, 83, 86, 0, 2, + 0, 0, 0, 12, 73, 85, 80, 95, 83, 66, 68, 82, 65, 71, 86, 0, 2, 0, 0, 0, + 8, 83, 66, 68, 82, 65, 71, 86, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, + 76, 69, 70, 84, 0, 2, 0, 0, 0, 7, 83, 66, 76, 69, 70, 84, 0, 2, 0, 0, + 0, 12, 73, 85, 80, 95, 83, 66, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 8, 83, + 66, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 83, 66, 80, 71, + 76, 69, 70, 84, 0, 2, 0, 0, 0, 9, 83, 66, 80, 71, 76, 69, 70, 84, 0, 2, + 0, 0, 0, 14, 73, 85, 80, 95, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 2, 0, + 0, 0, 10, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 95, 83, 66, 80, 79, 83, 72, 0, 2, 0, 0, 0, 7, 83, 66, 80, 79, 83, 72, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 83, 66, 68, 82, 65, 71, 72, 0, 2, 0, + 0, 0, 8, 83, 66, 68, 82, 65, 71, 72, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, + 83, 72, 79, 87, 0, 2, 0, 0, 0, 5, 83, 72, 79, 87, 0, 2, 0, 0, 0, 12, + 73, 85, 80, 95, 82, 69, 83, 84, 79, 82, 69, 0, 2, 0, 0, 0, 8, 82, 69, 83, + 84, 79, 82, 69, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 77, 73, 78, 73, 77, 73, + 90, 69, 0, 2, 0, 0, 0, 9, 77, 73, 78, 73, 77, 73, 90, 69, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 95, 77, 65, 88, 73, 77, 73, 90, 69, 0, 2, 0, 0, 0, 9, + 77, 65, 88, 73, 77, 73, 90, 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 72, 73, + 68, 69, 0, 2, 0, 0, 0, 5, 72, 73, 68, 69, 0, 2, 0, 0, 0, 4, 82, 69, + 68, 0, 2, 0, 0, 0, 7, 73,117,112, 82, 71, 66, 0, 2, 0, 0, 0, 6, 71, + 82, 69, 69, 78, 0, 2, 0, 0, 0, 5, 66, 76, 85, 69, 0, 2, 0, 0, 0, 6, + 66, 76, 65, 67, 75, 0, 2, 0, 0, 0, 6, 87, 72, 73, 84, 69, 0, 2, 0, 0, + 0, 7, 89, 69, 76, 76, 79, 87, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 79, 78, + 0, 2, 0, 0, 0, 3, 79, 78, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 79, 70, + 70, 0, 2, 0, 0, 0, 4, 79, 70, 70, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 89, 69, 83, 0, 2, 0, 0, 0, 4, 89, 69, 83, 0, 2, 0, 0, 0, 7, 73, 85, + 80, 95, 78, 79, 0, 2, 0, 0, 0, 3, 78, 79, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 95, 65, 80, 80, 69, 78, 68, 0, 2, 0, 0, 0, 7, 65, 80, 80, 69, 78, 68, + 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 86, 69, 82, 84, 73, 67, 65, 76, 0, 2, + 0, 0, 0, 9, 86, 69, 82, 84, 73, 67, 65, 76, 0, 2, 0, 0, 0, 15, 73, 85, + 80, 95, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 0, 2, 0, 0, 0, 11, 72, 79, + 82, 73, 90, 79, 78, 84, 65, 76, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 65, 67, + 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, + 0, 0, 0, 10, 73, 85, 80, 95, 65, 76, 69, 70, 84, 0, 2, 0, 0, 0, 6, 65, + 76, 69, 70, 84, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 65, 82, 73, 71, 72, 84, + 0, 2, 0, 0, 0, 7, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 9, 73, 85, + 80, 95, 65, 84, 79, 80, 0, 2, 0, 0, 0, 5, 65, 84, 79, 80, 0, 2, 0, 0, + 0, 12, 73, 85, 80, 95, 65, 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, 8, 65, + 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 78, 79, 82, 84, + 72, 0, 2, 0, 0, 0, 6, 78, 79, 82, 84, 72, 0, 2, 0, 0, 0, 10, 73, 85, + 80, 95, 83, 79, 85, 84, 72, 0, 2, 0, 0, 0, 6, 83, 79, 85, 84, 72, 0, 2, + 0, 0, 0, 9, 73, 85, 80, 95, 87, 69, 83, 84, 0, 2, 0, 0, 0, 5, 87, 69, + 83, 84, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 69, 65, 83, 84, 0, 2, 0, 0, + 0, 5, 69, 65, 83, 84, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 69, 0, 2, + 0, 0, 0, 3, 78, 69, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 83, 69, 0, 2, + 0, 0, 0, 3, 83, 69, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 87, 0, 2, + 0, 0, 0, 3, 78, 87, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 83, 87, 0, 2, + 0, 0, 0, 3, 83, 87, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 70, 85, 76, 76, + 0, 2, 0, 0, 0, 5, 70, 85, 76, 76, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, + 72, 65, 76, 70, 0, 2, 0, 0, 0, 5, 72, 65, 76, 70, 0, 2, 0, 0, 0, 10, + 73, 85, 80, 95, 84, 72, 73, 82, 68, 0, 2, 0, 0, 0, 6, 84, 72, 73, 82, 68, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 81, 85, 65, 82, 84, 69, 82, 0, 2, 0, + 0, 0, 8, 81, 85, 65, 82, 84, 69, 82, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, + 69, 73, 71, 72, 84, 72, 0, 2, 0, 0, 0, 7, 69, 73, 71, 72, 84, 72, 0, 2, + 0, 0, 0, 10, 73, 85, 80, 95, 65, 82, 82, 79, 87, 0, 2, 0, 0, 0, 6, 65, + 82, 82, 79, 87, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 66, 85, 83, 89, 0, 2, + 0, 0, 0, 5, 66, 85, 83, 89, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, + 83, 73, 90, 69, 95, 78, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 78, + 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 0, 2, + 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 83, 0, 2, 0, 0, 0, 13, 73, 85, + 80, 95, 82, 69, 83, 73, 90, 69, 95, 69, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, + 90, 69, 95, 69, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, + 95, 87, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 87, 0, 2, 0, 0, + 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 78, 69, 0, 2, 0, 0, 0, + 10, 82, 69, 83, 73, 90, 69, 95, 78, 69, 0, 2, 0, 0, 0, 14, 73, 85, 80, 95, + 82, 69, 83, 73, 90, 69, 95, 78, 87, 0, 2, 0, 0, 0, 10, 82, 69, 83, 73, 90, + 69, 95, 78, 87, 0, 2, 0, 0, 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, + 95, 83, 69, 0, 2, 0, 0, 0, 10, 82, 69, 83, 73, 90, 69, 95, 83, 69, 0, 2, + 0, 0, 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 87, 0, 2, 0, + 0, 0, 10, 82, 69, 83, 73, 90, 69, 95, 83, 87, 0, 2, 0, 0, 0, 9, 73, 85, + 80, 95, 77, 79, 86, 69, 0, 2, 0, 0, 0, 5, 77, 79, 86, 69, 0, 2, 0, 0, + 0, 9, 73, 85, 80, 95, 72, 65, 78, 68, 0, 2, 0, 0, 0, 5, 72, 65, 78, 68, + 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 78, 79, 78, 69, 0, 2, 0, 0, 0, 5, + 78, 79, 78, 69, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 73, 85, 80, 0, 2, 0, + 0, 0, 4, 73, 85, 80, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 67, 82, 79, 83, + 83, 0, 2, 0, 0, 0, 6, 67, 82, 79, 83, 83, 0, 2, 0, 0, 0, 8, 73, 85, + 80, 95, 80, 69, 78, 0, 2, 0, 0, 0, 4, 80, 69, 78, 0, 2, 0, 0, 0, 9, + 73, 85, 80, 95, 84, 69, 88, 84, 0, 2, 0, 0, 0, 5, 84, 69, 88, 84, 0, 2, + 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 67, 0, 2, 0, 0, + 0, 9, 82, 69, 83, 73, 90, 69, 95, 67, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, + 79, 80, 69, 78, 72, 65, 78, 68, 0, 2, 0, 0, 0, 9, 79, 80, 69, 78, 72, 65, + 78, 68, 0, 2, 0, 0, 0, 23, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, + 65, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 19, 72, 69, 76, 86, + 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 23, + 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, + 95, 56, 0, 2, 0, 0, 0, 19, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, + 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 21, 73, 85, 80, 95, 72, 69, 76, 86, + 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 17, 72, 69, + 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 24, + 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, + 95, 49, 48, 0, 2, 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, + 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, + 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, 0, 2, 0, + 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, + 49, 48, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, + 65, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, + 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 24, 73, 85, + 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, + 50, 0, 2, 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, + 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, + 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, + 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, + 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, + 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, + 67, 65, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, + 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 52, 0, + 2, 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, + 76, 95, 49, 52, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, + 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 20, 72, + 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, + 0, 0, 0, 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, + 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 66, 79, 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 21, 73, 85, 80, 95, 67, 79, + 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 17, + 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, + 0, 21, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, + 95, 56, 0, 2, 0, 0, 0, 17, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, + 73, 67, 95, 56, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, + 82, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 15, 67, 79, 85, 82, 73, 69, + 82, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, + 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, + 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, + 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, + 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 73, + 84, 65, 76, 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 67, 79, + 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 16, 67, + 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 22, + 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, + 50, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, + 76, 95, 49, 50, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, + 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 18, 67, 79, 85, + 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 20, + 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 50, 0, + 2, 0, 0, 0, 16, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 50, + 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, + 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, + 95, 78, 79, 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, + 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, + 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, + 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, + 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 16, 67, 79, 85, 82, 73, 69, 82, 95, 66, + 79, 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, 84, 73, 77, 69, + 83, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 15, 84, 73, 77, 69, + 83, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, + 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 15, + 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 17, + 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, + 0, 13, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 20, + 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, + 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, + 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, + 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 73, 84, 65, + 76, 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 18, 73, 85, 80, 95, 84, 73, 77, 69, + 83, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 14, 84, 73, 77, 69, 83, + 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, + 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 16, 84, + 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 20, + 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, + 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, + 0, 2, 0, 0, 0, 18, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, + 95, 49, 50, 0, 2, 0, 0, 0, 14, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, + 49, 50, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, 79, + 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 78, + 79, 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, + 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 16, 84, + 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 18, + 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 52, 0, 2, 0, + 0, 0, 14, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 52, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/constants_be32.lo"); +} diff --git a/iup/srclua3/loh/constants_be64.loh b/iup/srclua3/loh/constants_be64.loh new file mode 100755 index 0000000..bb31b19 --- /dev/null +++ b/iup/srclua3/loh/constants_be64.loh @@ -0,0 +1,301 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/constants_be64.lo"); +*/ +/* ../obj/iuplua3/constants_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 15, 64, 99,111,110,115,116, + 97,110,116,115, 46,108,117, 97, 0, 0, 0, 5,182, 4, 0, 7, 1, 25, 0, 15, + 1, 11, 2, 15, 0, 26, 7, 0, 25, 3, 15, 1, 11, 4, 15, 3, 26, 9, 1, 25, + 5, 15, 1, 11, 6, 15, 5, 26, 9, 1, 25, 7, 15, 1, 11, 8, 15, 7, 26, 6, +255,255, 25, 9, 15, 1, 11, 10, 15, 9, 26, 6,255,254, 25, 11, 15, 1, 11, 12, + 15, 11, 26, 6,255,253, 25, 13, 15, 1, 11, 14, 15, 13, 26, 6,255,252, 25, 15, + 15, 1, 11, 16, 15, 15, 26, 6,255,251, 25, 17, 15, 1, 11, 18, 15, 17, 26, 6, +255,250, 25, 19, 15, 1, 11, 20, 15, 19, 26, 15, 11, 25, 21, 15, 1, 11, 22, 15, + 21, 26, 15, 13, 25, 23, 15, 1, 11, 24, 15, 23, 26, 7, 49, 25, 25, 15, 1, 11, + 26, 15, 25, 26, 7, 50, 25, 27, 15, 1, 11, 28, 15, 27, 26, 7, 51, 25, 29, 15, + 1, 11, 30, 15, 29, 26, 7, 52, 25, 31, 15, 1, 11, 32, 15, 31, 26, 7, 53, 25, + 33, 15, 1, 11, 34, 15, 33, 26, 9, 1, 25, 35, 15, 1, 11, 36, 15, 35, 26, 9, + 2, 25, 37, 15, 1, 11, 38, 15, 37, 26, 9, 3, 25, 39, 15, 1, 11, 40, 15, 39, + 26, 9, 4, 25, 41, 15, 1, 11, 42, 15, 41, 26, 7, 0, 25, 43, 15, 1, 11, 44, + 15, 43, 26, 7, 1, 25, 45, 15, 1, 11, 46, 15, 45, 26, 7, 2, 25, 47, 15, 1, + 11, 48, 15, 47, 26, 7, 3, 25, 49, 15, 1, 11, 50, 15, 49, 26, 7, 4, 25, 51, + 15, 1, 11, 52, 15, 51, 26, 7, 5, 25, 53, 15, 1, 11, 54, 15, 53, 26, 7, 6, + 25, 55, 15, 1, 11, 56, 15, 55, 26, 7, 7, 25, 57, 15, 1, 11, 58, 15, 57, 26, + 7, 8, 25, 59, 15, 1, 11, 60, 15, 59, 26, 7, 9, 25, 61, 15, 1, 11, 62, 15, + 61, 26, 7, 10, 25, 63, 15, 1, 11, 64, 15, 63, 26, 7, 11, 25, 65, 15, 1, 11, + 66, 15, 65, 26, 7, 0, 25, 67, 15, 1, 11, 68, 15, 67, 26, 7, 1, 25, 69, 15, + 1, 11, 70, 15, 69, 26, 7, 2, 25, 71, 15, 1, 11, 72, 15, 71, 26, 7, 3, 25, + 73, 15, 1, 11, 74, 15, 73, 26, 7, 4, 25, 75, 15, 1, 11, 76, 15, 75, 26, 15, + 78, 7, 1, 7, 0, 7, 0, 2, 1, 3, 25, 77, 15, 1, 11, 77, 15, 77, 26, 15, + 78, 7, 0, 7, 1, 7, 0, 2, 1, 3, 25, 79, 15, 1, 11, 79, 15, 79, 26, 15, + 78, 7, 0, 7, 0, 7, 1, 2, 1, 3, 25, 80, 15, 1, 11, 80, 15, 80, 26, 15, + 78, 7, 0, 7, 0, 7, 0, 2, 1, 3, 25, 81, 15, 1, 11, 81, 15, 81, 26, 15, + 78, 7, 1, 7, 1, 7, 1, 2, 1, 3, 25, 82, 15, 1, 11, 82, 15, 82, 26, 15, + 78, 7, 1, 7, 1, 7, 0, 2, 1, 3, 25, 83, 15, 1, 11, 83, 15, 83, 26, 11, + 85, 25, 84, 15, 1, 11, 85, 15, 84, 26, 11, 87, 25, 86, 15, 1, 11, 87, 15, 86, + 26, 11, 89, 25, 88, 15, 1, 11, 89, 15, 88, 26, 11, 91, 25, 90, 15, 1, 11, 91, + 15, 90, 26, 11, 93, 25, 92, 15, 1, 11, 93, 15, 92, 26, 11, 95, 25, 94, 15, 1, + 11, 95, 15, 94, 26, 11, 97, 25, 96, 15, 1, 11, 97, 15, 96, 26, 11, 99, 25, 98, + 15, 1, 11, 99, 15, 98, 26, 11,101, 25,100, 15, 1, 11,101, 15,100, 26, 11,103, + 25,102, 15, 1, 11,103, 15,102, 26, 11,105, 25,104, 15, 1, 11,105, 15,104, 26, + 11,107, 25,106, 15, 1, 11,107, 15,106, 26, 11,109, 25,108, 15, 1, 11,109, 15, +108, 26, 11,111, 25,110, 15, 1, 11,111, 15,110, 26, 11,113, 25,112, 15, 1, 11, +113, 15,112, 26, 11,115, 25,114, 15, 1, 11,115, 15,114, 26, 11,117, 25,116, 15, + 1, 11,117, 15,116, 26, 11,119, 25,118, 15, 1, 11,119, 15,118, 26, 11,121, 25, +120, 15, 1, 11,121, 15,120, 26, 11,123, 25,122, 15, 1, 11,123, 15,122, 26, 11, +125, 25,124, 15, 1, 11,125, 15,124, 26, 11,127, 25,126, 15, 1, 11,127, 15,126, + 26, 11,129, 25,128, 15, 1, 11,129, 15,128, 26, 11,131, 25,130, 15, 1, 11,131, + 15,130, 26, 11,133, 25,132, 15, 1, 11,133, 15,132, 26, 11,135, 25,134, 15, 1, + 11,135, 15,134, 26, 11,137, 25,136, 15, 1, 11,137, 15,136, 26, 11,139, 25,138, + 15, 1, 11,139, 15,138, 26, 11,141, 25,140, 15, 1, 11,141, 15,140, 26, 11,143, + 25,142, 15, 1, 11,143, 15,142, 26, 11,145, 25,144, 15, 1, 11,145, 15,144, 26, + 11,147, 25,146, 15, 1, 11,147, 15,146, 26, 11,149, 25,148, 15, 1, 11,149, 15, +148, 26, 11,151, 25,150, 15, 1, 11,151, 15,150, 26, 11,153, 25,152, 15, 1, 11, +153, 15,152, 26, 11,155, 25,154, 15, 1, 11,155, 15,154, 26, 11,157, 25,156, 15, + 1, 11,157, 15,156, 26, 11,159, 25,158, 15, 1, 11,159, 15,158, 26, 11,161, 25, +160, 15, 1, 11,161, 15,160, 26, 11,163, 25,162, 15, 1, 11,163, 15,162, 26, 11, +165, 25,164, 15, 1, 11,165, 15,164, 26, 11,167, 25,166, 15, 1, 11,167, 15,166, + 26, 11,169, 25,168, 15, 1, 11,169, 15,168, 26, 11,171, 25,170, 15, 1, 11,171, + 15,170, 26, 11,173, 25,172, 15, 1, 11,173, 15,172, 26, 11,175, 25,174, 15, 1, + 11,175, 15,174, 26, 11,177, 25,176, 15, 1, 11,177, 15,176, 26, 11,179, 25,178, + 15, 1, 11,179, 15,178, 26, 11,181, 25,180, 15, 1, 11,181, 15,180, 26, 11,183, + 25,182, 15, 1, 11,183, 15,182, 26, 11,185, 25,184, 15, 1, 11,185, 15,184, 26, + 11,187, 25,186, 15, 1, 11,187, 15,186, 26, 11,189, 25,188, 15, 1, 11,189, 15, +188, 26, 11,191, 25,190, 15, 1, 11,191, 15,190, 26, 11,193, 25,192, 15, 1, 11, +193, 15,192, 26, 11,195, 25,194, 15, 1, 11,195, 15,194, 26, 11,197, 25,196, 15, + 1, 11,197, 15,196, 26, 11,199, 25,198, 15, 1, 11,199, 15,198, 26, 11,201, 25, +200, 15, 1, 11,201, 15,200, 26, 11,203, 25,202, 15, 1, 11,203, 15,202, 26, 11, +205, 25,204, 15, 1, 11,205, 15,204, 26, 11,207, 25,206, 15, 1, 11,207, 15,206, + 26, 11,209, 25,208, 15, 1, 11,209, 15,208, 26, 11,211, 25,210, 15, 1, 11,211, + 15,210, 26, 11,213, 25,212, 15, 1, 11,213, 15,212, 26, 11,215, 25,214, 15, 1, + 11,215, 15,214, 26, 11,217, 25,216, 15, 1, 11,217, 15,216, 26, 11,219, 25,218, + 15, 1, 11,219, 15,218, 26, 11,221, 25,220, 15, 1, 11,221, 15,220, 26, 11,223, + 25,222, 15, 1, 11,223, 15,222, 26, 11,225, 25,224, 15, 1, 11,225, 15,224, 26, + 11,227, 25,226, 15, 1, 11,227, 15,226, 26, 11,229, 25,228, 15, 1, 11,229, 15, +228, 26, 11,231, 25,230, 15, 1, 11,231, 15,230, 26, 11,233, 25,232, 15, 1, 11, +233, 15,232, 26, 11,235, 25,234, 15, 1, 11,235, 15,234, 26, 11,237, 25,236, 15, + 1, 11,237, 15,236, 26, 11,239, 25,238, 15, 1, 11,239, 15,238, 26, 11,241, 25, +240, 15, 1, 11,241, 15,240, 26, 11,243, 25,242, 15, 1, 11,243, 15,242, 26, 15, + 1, 11,244, 11,245, 26, 15, 1, 11,246, 11,247, 26, 15, 1, 11,248, 11,249, 26, + 15, 1, 11,250, 11,251, 26, 15, 1, 11,252, 11,253, 26, 0, 0, 0, 0, 0, 0, + 0, 0,254, 2, 0, 0, 0, 10, 73, 85, 80, 95, 69, 82, 82, 79, 82, 0, 2, 0, + 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6, 69, 82, 82, 79, 82, 0, 2, 0, + 0, 0, 12, 73, 85, 80, 95, 78, 79, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 8, + 78, 79, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 79, 80, 69, + 78, 69, 68, 0, 2, 0, 0, 0, 7, 79, 80, 69, 78, 69, 68, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 73, 78, 86, 65, 76, 73, 68, 0, 2, 0, 0, 0, 8, 73, 78, + 86, 65, 76, 73, 68, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 67, 69, 78, 84, 69, + 82, 0, 2, 0, 0, 0, 7, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 9, 73, + 85, 80, 95, 76, 69, 70, 84, 0, 2, 0, 0, 0, 5, 76, 69, 70, 84, 0, 2, 0, + 0, 0, 10, 73, 85, 80, 95, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 6, 82, 73, + 71, 72, 84, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 77, 79, 85, 83, 69, 80, 79, + 83, 0, 2, 0, 0, 0, 9, 77, 79, 85, 83, 69, 80, 79, 83, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 67, 85, 82, 82, 69, 78, 84, 0, 2, 0, 0, 0, 8, 67, 85, + 82, 82, 69, 78, 84, 0, 2, 0, 0, 0, 17, 73, 85, 80, 95, 67, 69, 78, 84, 69, + 82, 80, 65, 82, 69, 78, 84, 0, 2, 0, 0, 0, 13, 67, 69, 78, 84, 69, 82, 80, + 65, 82, 69, 78, 84, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 84, 79, 80, 0, 2, + 0, 0, 0, 4, 84, 79, 80, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 66, 79, 84, + 84, 79, 77, 0, 2, 0, 0, 0, 7, 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 49, 0, 2, 0, 0, 0, 8, 66, 85, + 84, 84, 79, 78, 49, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, + 78, 50, 0, 2, 0, 0, 0, 8, 66, 85, 84, 84, 79, 78, 50, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 51, 0, 2, 0, 0, 0, 8, 66, 85, + 84, 84, 79, 78, 51, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, + 78, 52, 0, 2, 0, 0, 0, 8, 66, 85, 84, 84, 79, 78, 52, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 53, 0, 2, 0, 0, 0, 8, 66, 85, + 84, 84, 79, 78, 53, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 73, 71, 78, 79, 82, + 69, 0, 2, 0, 0, 0, 7, 73, 71, 78, 79, 82, 69, 0, 2, 0, 0, 0, 12, 73, + 85, 80, 95, 68, 69, 70, 65, 85, 76, 84, 0, 2, 0, 0, 0, 8, 68, 69, 70, 65, + 85, 76, 84, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 67, 76, 79, 83, 69, 0, 2, + 0, 0, 0, 6, 67, 76, 79, 83, 69, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 67, + 79, 78, 84, 73, 78, 85, 69, 0, 2, 0, 0, 0, 9, 67, 79, 78, 84, 73, 78, 85, + 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 66, 85, 80, 0, 2, 0, 0, 0, + 5, 83, 66, 85, 80, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 66, 68, 78, 0, + 2, 0, 0, 0, 5, 83, 66, 68, 78, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, + 66, 80, 71, 85, 80, 0, 2, 0, 0, 0, 7, 83, 66, 80, 71, 85, 80, 0, 2, 0, + 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, 71, 68, 78, 0, 2, 0, 0, 0, 7, 83, + 66, 80, 71, 68, 78, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, 79, 83, + 86, 0, 2, 0, 0, 0, 7, 83, 66, 80, 79, 83, 86, 0, 2, 0, 0, 0, 12, 73, + 85, 80, 95, 83, 66, 68, 82, 65, 71, 86, 0, 2, 0, 0, 0, 8, 83, 66, 68, 82, + 65, 71, 86, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 76, 69, 70, 84, 0, + 2, 0, 0, 0, 7, 83, 66, 76, 69, 70, 84, 0, 2, 0, 0, 0, 12, 73, 85, 80, + 95, 83, 66, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 8, 83, 66, 82, 73, 71, 72, + 84, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 83, 66, 80, 71, 76, 69, 70, 84, 0, + 2, 0, 0, 0, 9, 83, 66, 80, 71, 76, 69, 70, 84, 0, 2, 0, 0, 0, 14, 73, + 85, 80, 95, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 10, 83, 66, + 80, 71, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, + 79, 83, 72, 0, 2, 0, 0, 0, 7, 83, 66, 80, 79, 83, 72, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 83, 66, 68, 82, 65, 71, 72, 0, 2, 0, 0, 0, 8, 83, 66, + 68, 82, 65, 71, 72, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 72, 79, 87, 0, + 2, 0, 0, 0, 5, 83, 72, 79, 87, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 82, + 69, 83, 84, 79, 82, 69, 0, 2, 0, 0, 0, 8, 82, 69, 83, 84, 79, 82, 69, 0, + 2, 0, 0, 0, 13, 73, 85, 80, 95, 77, 73, 78, 73, 77, 73, 90, 69, 0, 2, 0, + 0, 0, 9, 77, 73, 78, 73, 77, 73, 90, 69, 0, 2, 0, 0, 0, 13, 73, 85, 80, + 95, 77, 65, 88, 73, 77, 73, 90, 69, 0, 2, 0, 0, 0, 9, 77, 65, 88, 73, 77, + 73, 90, 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 72, 73, 68, 69, 0, 2, 0, + 0, 0, 5, 72, 73, 68, 69, 0, 2, 0, 0, 0, 4, 82, 69, 68, 0, 2, 0, 0, + 0, 7, 73,117,112, 82, 71, 66, 0, 2, 0, 0, 0, 6, 71, 82, 69, 69, 78, 0, + 2, 0, 0, 0, 5, 66, 76, 85, 69, 0, 2, 0, 0, 0, 6, 66, 76, 65, 67, 75, + 0, 2, 0, 0, 0, 6, 87, 72, 73, 84, 69, 0, 2, 0, 0, 0, 7, 89, 69, 76, + 76, 79, 87, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 79, 78, 0, 2, 0, 0, 0, + 3, 79, 78, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 79, 70, 70, 0, 2, 0, 0, + 0, 4, 79, 70, 70, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, + 0, 0, 0, 4, 89, 69, 83, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 79, 0, + 2, 0, 0, 0, 3, 78, 79, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 65, 80, 80, + 69, 78, 68, 0, 2, 0, 0, 0, 7, 65, 80, 80, 69, 78, 68, 0, 2, 0, 0, 0, + 13, 73, 85, 80, 95, 86, 69, 82, 84, 73, 67, 65, 76, 0, 2, 0, 0, 0, 9, 86, + 69, 82, 84, 73, 67, 65, 76, 0, 2, 0, 0, 0, 15, 73, 85, 80, 95, 72, 79, 82, + 73, 90, 79, 78, 84, 65, 76, 0, 2, 0, 0, 0, 11, 72, 79, 82, 73, 90, 79, 78, + 84, 65, 76, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 65, 67, 69, 78, 84, 69, 82, + 0, 2, 0, 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 10, 73, + 85, 80, 95, 65, 76, 69, 70, 84, 0, 2, 0, 0, 0, 6, 65, 76, 69, 70, 84, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, + 7, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 65, 84, 79, + 80, 0, 2, 0, 0, 0, 5, 65, 84, 79, 80, 0, 2, 0, 0, 0, 12, 73, 85, 80, + 95, 65, 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, 8, 65, 66, 79, 84, 84, 79, + 77, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 78, 79, 82, 84, 72, 0, 2, 0, 0, + 0, 6, 78, 79, 82, 84, 72, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 83, 79, 85, + 84, 72, 0, 2, 0, 0, 0, 6, 83, 79, 85, 84, 72, 0, 2, 0, 0, 0, 9, 73, + 85, 80, 95, 87, 69, 83, 84, 0, 2, 0, 0, 0, 5, 87, 69, 83, 84, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 95, 69, 65, 83, 84, 0, 2, 0, 0, 0, 5, 69, 65, 83, + 84, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 69, 0, 2, 0, 0, 0, 3, 78, + 69, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 83, 69, 0, 2, 0, 0, 0, 3, 83, + 69, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 87, 0, 2, 0, 0, 0, 3, 78, + 87, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 83, 87, 0, 2, 0, 0, 0, 3, 83, + 87, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 70, 85, 76, 76, 0, 2, 0, 0, 0, + 5, 70, 85, 76, 76, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 72, 65, 76, 70, 0, + 2, 0, 0, 0, 5, 72, 65, 76, 70, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 84, + 72, 73, 82, 68, 0, 2, 0, 0, 0, 6, 84, 72, 73, 82, 68, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 81, 85, 65, 82, 84, 69, 82, 0, 2, 0, 0, 0, 8, 81, 85, + 65, 82, 84, 69, 82, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 69, 73, 71, 72, 84, + 72, 0, 2, 0, 0, 0, 7, 69, 73, 71, 72, 84, 72, 0, 2, 0, 0, 0, 10, 73, + 85, 80, 95, 65, 82, 82, 79, 87, 0, 2, 0, 0, 0, 6, 65, 82, 82, 79, 87, 0, + 2, 0, 0, 0, 9, 73, 85, 80, 95, 66, 85, 83, 89, 0, 2, 0, 0, 0, 5, 66, + 85, 83, 89, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, + 78, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 78, 0, 2, 0, 0, 0, + 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 0, 2, 0, 0, 0, 9, 82, + 69, 83, 73, 90, 69, 95, 83, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, + 73, 90, 69, 95, 69, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 69, 0, + 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 87, 0, 2, 0, + 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 87, 0, 2, 0, 0, 0, 14, 73, 85, 80, + 95, 82, 69, 83, 73, 90, 69, 95, 78, 69, 0, 2, 0, 0, 0, 10, 82, 69, 83, 73, + 90, 69, 95, 78, 69, 0, 2, 0, 0, 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, + 69, 95, 78, 87, 0, 2, 0, 0, 0, 10, 82, 69, 83, 73, 90, 69, 95, 78, 87, 0, + 2, 0, 0, 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 69, 0, 2, + 0, 0, 0, 10, 82, 69, 83, 73, 90, 69, 95, 83, 69, 0, 2, 0, 0, 0, 14, 73, + 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 87, 0, 2, 0, 0, 0, 10, 82, 69, + 83, 73, 90, 69, 95, 83, 87, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 77, 79, 86, + 69, 0, 2, 0, 0, 0, 5, 77, 79, 86, 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, + 95, 72, 65, 78, 68, 0, 2, 0, 0, 0, 5, 72, 65, 78, 68, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 95, 78, 79, 78, 69, 0, 2, 0, 0, 0, 5, 78, 79, 78, 69, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 95, 73, 85, 80, 0, 2, 0, 0, 0, 4, 73, 85, + 80, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 67, 82, 79, 83, 83, 0, 2, 0, 0, + 0, 6, 67, 82, 79, 83, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 80, 69, 78, + 0, 2, 0, 0, 0, 4, 80, 69, 78, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 84, + 69, 88, 84, 0, 2, 0, 0, 0, 5, 84, 69, 88, 84, 0, 2, 0, 0, 0, 13, 73, + 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 67, 0, 2, 0, 0, 0, 9, 82, 69, 83, + 73, 90, 69, 95, 67, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 79, 80, 69, 78, 72, + 65, 78, 68, 0, 2, 0, 0, 0, 9, 79, 80, 69, 78, 72, 65, 78, 68, 0, 2, 0, + 0, 0, 23, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, + 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 19, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 23, 73, 85, 80, 95, 72, + 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, + 0, 0, 19, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, + 56, 0, 2, 0, 0, 0, 21, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 17, 72, 69, 76, 86, 69, 84, 73, + 67, 65, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, + 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, + 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, + 95, 49, 48, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, + 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 20, 72, 69, + 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, 0, 2, 0, + 0, 0, 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, + 68, 95, 49, 48, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, + 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, + 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, + 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, + 50, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 20, 72, 69, 76, 86, + 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, + 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, + 49, 50, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, + 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, + 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 20, + 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 52, 0, + 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, + 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, + 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 22, 73, + 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, 49, 52, + 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, + 95, 49, 52, 0, 2, 0, 0, 0, 21, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, + 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 17, 67, 79, 85, 82, 73, + 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 21, 73, 85, 80, + 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, + 0, 0, 17, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, + 2, 0, 0, 0, 19, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, + 68, 95, 56, 0, 2, 0, 0, 0, 15, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, + 68, 95, 56, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, + 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, + 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 22, 73, + 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, + 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, + 95, 49, 48, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, + 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 16, 67, 79, 85, 82, 73, 69, + 82, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, + 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, + 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, + 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, + 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, + 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 67, + 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, 16, + 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, + 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, + 49, 52, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, + 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, + 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 18, 67, 79, + 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, + 20, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 52, + 0, 2, 0, 0, 0, 16, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, + 52, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, 79, 82, + 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 15, 84, 73, 77, 69, 83, 95, 78, 79, 82, + 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, 84, 73, 77, 69, 83, + 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 15, 84, 73, 77, 69, 83, + 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 17, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 13, 84, 73, 77, + 69, 83, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 16, + 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, + 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, + 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, + 48, 0, 2, 0, 0, 0, 18, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, + 68, 95, 49, 48, 0, 2, 0, 0, 0, 14, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, + 95, 49, 48, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, + 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, + 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 16, + 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, + 18, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, + 0, 0, 0, 14, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, + 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, + 49, 52, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, + 95, 49, 52, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 73, + 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, + 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 18, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 14, 84, 73, + 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 11, 77, 65, 83, + 75, 95, 70, 76, 79, 65, 84, 0, 2, 0, 0, 0, 24, 91, 43, 47, 45, 93, 63, 40, + 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, 43, 41, 0, 2, 0, 0, + 0, 12, 77, 65, 83, 75, 95, 85, 70, 76, 79, 65, 84, 0, 2, 0, 0, 0, 18, 40, + 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, 43, 41, 0, 2, 0, 0, + 0, 12, 77, 65, 83, 75, 95, 69, 70, 76, 79, 65, 84, 0, 2, 0, 0, 0, 40, 91, + 43, 47, 45, 93, 63, 40, 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, + 43, 41, 40, 91,101, 69, 93, 91, 43, 47, 45, 93, 63, 47,100, 43, 41, 63, 0, 2, + 0, 0, 0, 9, 77, 65, 83, 75, 95, 73, 78, 84, 0, 2, 0, 0, 0, 10, 91, 43, + 47, 45, 93, 63, 47,100, 43, 0, 2, 0, 0, 0, 10, 77, 65, 83, 75, 95, 85, 73, + 78, 84, 0, 2, 0, 0, 0, 4, 47,100, 43, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/constants_be64.lo"); +} diff --git a/iup/srclua3/loh/constants_le64.loh b/iup/srclua3/loh/constants_le64.loh new file mode 100755 index 0000000..54ece5d --- /dev/null +++ b/iup/srclua3/loh/constants_le64.loh @@ -0,0 +1,289 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/constants_le64.lo"); +*/ +/* ../obj/iuplua3/constants_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 15, 64, 99,111,110,115,116, + 97,110,116,115, 46,108,117, 97, 0, 0, 0, 5,147, 4, 0, 7, 1, 25, 0, 15, + 1, 11, 2, 15, 0, 26, 7, 0, 25, 3, 15, 1, 11, 4, 15, 3, 26, 9, 1, 25, + 5, 15, 1, 11, 6, 15, 5, 26, 9, 1, 25, 7, 15, 1, 11, 8, 15, 7, 26, 6, +255,255, 25, 9, 15, 1, 11, 10, 15, 9, 26, 6,255,254, 25, 11, 15, 1, 11, 12, + 15, 11, 26, 6,255,253, 25, 13, 15, 1, 11, 14, 15, 13, 26, 6,255,252, 25, 15, + 15, 1, 11, 16, 15, 15, 26, 6,255,251, 25, 17, 15, 1, 11, 18, 15, 17, 26, 6, +255,250, 25, 19, 15, 1, 11, 20, 15, 19, 26, 15, 11, 25, 21, 15, 1, 11, 22, 15, + 21, 26, 15, 13, 25, 23, 15, 1, 11, 24, 15, 23, 26, 7, 49, 25, 25, 15, 1, 11, + 26, 15, 25, 26, 7, 50, 25, 27, 15, 1, 11, 28, 15, 27, 26, 7, 51, 25, 29, 15, + 1, 11, 30, 15, 29, 26, 7, 52, 25, 31, 15, 1, 11, 32, 15, 31, 26, 7, 53, 25, + 33, 15, 1, 11, 34, 15, 33, 26, 9, 1, 25, 35, 15, 1, 11, 36, 15, 35, 26, 9, + 2, 25, 37, 15, 1, 11, 38, 15, 37, 26, 9, 3, 25, 39, 15, 1, 11, 40, 15, 39, + 26, 9, 4, 25, 41, 15, 1, 11, 42, 15, 41, 26, 7, 0, 25, 43, 15, 1, 11, 44, + 15, 43, 26, 7, 1, 25, 45, 15, 1, 11, 46, 15, 45, 26, 7, 2, 25, 47, 15, 1, + 11, 48, 15, 47, 26, 7, 3, 25, 49, 15, 1, 11, 50, 15, 49, 26, 7, 4, 25, 51, + 15, 1, 11, 52, 15, 51, 26, 7, 5, 25, 53, 15, 1, 11, 54, 15, 53, 26, 7, 6, + 25, 55, 15, 1, 11, 56, 15, 55, 26, 7, 7, 25, 57, 15, 1, 11, 58, 15, 57, 26, + 7, 8, 25, 59, 15, 1, 11, 60, 15, 59, 26, 7, 9, 25, 61, 15, 1, 11, 62, 15, + 61, 26, 7, 10, 25, 63, 15, 1, 11, 64, 15, 63, 26, 7, 11, 25, 65, 15, 1, 11, + 66, 15, 65, 26, 7, 0, 25, 67, 15, 1, 11, 68, 15, 67, 26, 7, 1, 25, 69, 15, + 1, 11, 70, 15, 69, 26, 7, 2, 25, 71, 15, 1, 11, 72, 15, 71, 26, 7, 3, 25, + 73, 15, 1, 11, 74, 15, 73, 26, 7, 4, 25, 75, 15, 1, 11, 76, 15, 75, 26, 15, + 78, 7, 1, 7, 0, 7, 0, 2, 1, 3, 25, 77, 15, 1, 11, 77, 15, 77, 26, 15, + 78, 7, 0, 7, 1, 7, 0, 2, 1, 3, 25, 79, 15, 1, 11, 79, 15, 79, 26, 15, + 78, 7, 0, 7, 0, 7, 1, 2, 1, 3, 25, 80, 15, 1, 11, 80, 15, 80, 26, 15, + 78, 7, 0, 7, 0, 7, 0, 2, 1, 3, 25, 81, 15, 1, 11, 81, 15, 81, 26, 15, + 78, 7, 1, 7, 1, 7, 1, 2, 1, 3, 25, 82, 15, 1, 11, 82, 15, 82, 26, 15, + 78, 7, 1, 7, 1, 7, 0, 2, 1, 3, 25, 83, 15, 1, 11, 83, 15, 83, 26, 11, + 85, 25, 84, 15, 1, 11, 85, 15, 84, 26, 11, 87, 25, 86, 15, 1, 11, 87, 15, 86, + 26, 11, 89, 25, 88, 15, 1, 11, 89, 15, 88, 26, 11, 91, 25, 90, 15, 1, 11, 91, + 15, 90, 26, 11, 93, 25, 92, 15, 1, 11, 93, 15, 92, 26, 11, 95, 25, 94, 15, 1, + 11, 95, 15, 94, 26, 11, 97, 25, 96, 15, 1, 11, 97, 15, 96, 26, 11, 99, 25, 98, + 15, 1, 11, 99, 15, 98, 26, 11,101, 25,100, 15, 1, 11,101, 15,100, 26, 11,103, + 25,102, 15, 1, 11,103, 15,102, 26, 11,105, 25,104, 15, 1, 11,105, 15,104, 26, + 11,107, 25,106, 15, 1, 11,107, 15,106, 26, 11,109, 25,108, 15, 1, 11,109, 15, +108, 26, 11,111, 25,110, 15, 1, 11,111, 15,110, 26, 11,113, 25,112, 15, 1, 11, +113, 15,112, 26, 11,115, 25,114, 15, 1, 11,115, 15,114, 26, 11,117, 25,116, 15, + 1, 11,117, 15,116, 26, 11,119, 25,118, 15, 1, 11,119, 15,118, 26, 11,121, 25, +120, 15, 1, 11,121, 15,120, 26, 11,123, 25,122, 15, 1, 11,123, 15,122, 26, 11, +125, 25,124, 15, 1, 11,125, 15,124, 26, 11,127, 25,126, 15, 1, 11,127, 15,126, + 26, 11,129, 25,128, 15, 1, 11,129, 15,128, 26, 11,131, 25,130, 15, 1, 11,131, + 15,130, 26, 11,133, 25,132, 15, 1, 11,133, 15,132, 26, 11,135, 25,134, 15, 1, + 11,135, 15,134, 26, 11,137, 25,136, 15, 1, 11,137, 15,136, 26, 11,139, 25,138, + 15, 1, 11,139, 15,138, 26, 11,141, 25,140, 15, 1, 11,141, 15,140, 26, 11,143, + 25,142, 15, 1, 11,143, 15,142, 26, 11,145, 25,144, 15, 1, 11,145, 15,144, 26, + 11,147, 25,146, 15, 1, 11,147, 15,146, 26, 11,149, 25,148, 15, 1, 11,149, 15, +148, 26, 11,151, 25,150, 15, 1, 11,151, 15,150, 26, 11,153, 25,152, 15, 1, 11, +153, 15,152, 26, 11,155, 25,154, 15, 1, 11,155, 15,154, 26, 11,157, 25,156, 15, + 1, 11,157, 15,156, 26, 11,159, 25,158, 15, 1, 11,159, 15,158, 26, 11,161, 25, +160, 15, 1, 11,161, 15,160, 26, 11,163, 25,162, 15, 1, 11,163, 15,162, 26, 11, +165, 25,164, 15, 1, 11,165, 15,164, 26, 11,167, 25,166, 15, 1, 11,167, 15,166, + 26, 11,169, 25,168, 15, 1, 11,169, 15,168, 26, 11,171, 25,170, 15, 1, 11,171, + 15,170, 26, 11,173, 25,172, 15, 1, 11,173, 15,172, 26, 11,175, 25,174, 15, 1, + 11,175, 15,174, 26, 11,177, 25,176, 15, 1, 11,177, 15,176, 26, 11,179, 25,178, + 15, 1, 11,179, 15,178, 26, 11,181, 25,180, 15, 1, 11,181, 15,180, 26, 11,183, + 25,182, 15, 1, 11,183, 15,182, 26, 11,185, 25,184, 15, 1, 11,185, 15,184, 26, + 11,187, 25,186, 15, 1, 11,187, 15,186, 26, 11,189, 25,188, 15, 1, 11,189, 15, +188, 26, 11,191, 25,190, 15, 1, 11,191, 15,190, 26, 11,193, 25,192, 15, 1, 11, +193, 15,192, 26, 11,195, 25,194, 15, 1, 11,195, 15,194, 26, 11,197, 25,196, 15, + 1, 11,197, 15,196, 26, 11,199, 25,198, 15, 1, 11,199, 15,198, 26, 11,201, 25, +200, 15, 1, 11,201, 15,200, 26, 11,203, 25,202, 15, 1, 11,203, 15,202, 26, 11, +205, 25,204, 15, 1, 11,205, 15,204, 26, 11,207, 25,206, 15, 1, 11,207, 15,206, + 26, 11,209, 25,208, 15, 1, 11,209, 15,208, 26, 11,211, 25,210, 15, 1, 11,211, + 15,210, 26, 11,213, 25,212, 15, 1, 11,213, 15,212, 26, 11,215, 25,214, 15, 1, + 11,215, 15,214, 26, 11,217, 25,216, 15, 1, 11,217, 15,216, 26, 11,219, 25,218, + 15, 1, 11,219, 15,218, 26, 11,221, 25,220, 15, 1, 11,221, 15,220, 26, 11,223, + 25,222, 15, 1, 11,223, 15,222, 26, 11,225, 25,224, 15, 1, 11,225, 15,224, 26, + 11,227, 25,226, 15, 1, 11,227, 15,226, 26, 11,229, 25,228, 15, 1, 11,229, 15, +228, 26, 11,231, 25,230, 15, 1, 11,231, 15,230, 26, 11,233, 25,232, 15, 1, 11, +233, 15,232, 26, 11,235, 25,234, 15, 1, 11,235, 15,234, 26, 11,237, 25,236, 15, + 1, 11,237, 15,236, 26, 11,239, 25,238, 15, 1, 11,239, 15,238, 26, 11,241, 25, +240, 15, 1, 11,241, 15,240, 26, 11,243, 25,242, 15, 1, 11,243, 15,242, 26, 0, + 0, 0, 0, 0, 0, 0, 0,244, 2, 0, 0, 0, 10, 73, 85, 80, 95, 69, 82, 82, + 79, 82, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6, 69, 82, 82, + 79, 82, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 78, 79, 69, 82, 82, 79, 82, 0, + 2, 0, 0, 0, 8, 78, 79, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 95, 79, 80, 69, 78, 69, 68, 0, 2, 0, 0, 0, 7, 79, 80, 69, 78, 69, 68, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 73, 78, 86, 65, 76, 73, 68, 0, 2, 0, + 0, 0, 8, 73, 78, 86, 65, 76, 73, 68, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, + 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 7, 67, 69, 78, 84, 69, 82, 0, 2, + 0, 0, 0, 9, 73, 85, 80, 95, 76, 69, 70, 84, 0, 2, 0, 0, 0, 5, 76, 69, + 70, 84, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 82, 73, 71, 72, 84, 0, 2, 0, + 0, 0, 6, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 77, 79, + 85, 83, 69, 80, 79, 83, 0, 2, 0, 0, 0, 9, 77, 79, 85, 83, 69, 80, 79, 83, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 67, 85, 82, 82, 69, 78, 84, 0, 2, 0, + 0, 0, 8, 67, 85, 82, 82, 69, 78, 84, 0, 2, 0, 0, 0, 17, 73, 85, 80, 95, + 67, 69, 78, 84, 69, 82, 80, 65, 82, 69, 78, 84, 0, 2, 0, 0, 0, 13, 67, 69, + 78, 84, 69, 82, 80, 65, 82, 69, 78, 84, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 84, 79, 80, 0, 2, 0, 0, 0, 4, 84, 79, 80, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 95, 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, 7, 66, 79, 84, 84, 79, 77, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 49, 0, 2, 0, + 0, 0, 8, 66, 85, 84, 84, 79, 78, 49, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, + 66, 85, 84, 84, 79, 78, 50, 0, 2, 0, 0, 0, 8, 66, 85, 84, 84, 79, 78, 50, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 51, 0, 2, 0, + 0, 0, 8, 66, 85, 84, 84, 79, 78, 51, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, + 66, 85, 84, 84, 79, 78, 52, 0, 2, 0, 0, 0, 8, 66, 85, 84, 84, 79, 78, 52, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 53, 0, 2, 0, + 0, 0, 8, 66, 85, 84, 84, 79, 78, 53, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, + 73, 71, 78, 79, 82, 69, 0, 2, 0, 0, 0, 7, 73, 71, 78, 79, 82, 69, 0, 2, + 0, 0, 0, 12, 73, 85, 80, 95, 68, 69, 70, 65, 85, 76, 84, 0, 2, 0, 0, 0, + 8, 68, 69, 70, 65, 85, 76, 84, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 67, 76, + 79, 83, 69, 0, 2, 0, 0, 0, 6, 67, 76, 79, 83, 69, 0, 2, 0, 0, 0, 13, + 73, 85, 80, 95, 67, 79, 78, 84, 73, 78, 85, 69, 0, 2, 0, 0, 0, 9, 67, 79, + 78, 84, 73, 78, 85, 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 66, 85, 80, + 0, 2, 0, 0, 0, 5, 83, 66, 85, 80, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, + 83, 66, 68, 78, 0, 2, 0, 0, 0, 5, 83, 66, 68, 78, 0, 2, 0, 0, 0, 11, + 73, 85, 80, 95, 83, 66, 80, 71, 85, 80, 0, 2, 0, 0, 0, 7, 83, 66, 80, 71, + 85, 80, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, 71, 68, 78, 0, 2, + 0, 0, 0, 7, 83, 66, 80, 71, 68, 78, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, + 83, 66, 80, 79, 83, 86, 0, 2, 0, 0, 0, 7, 83, 66, 80, 79, 83, 86, 0, 2, + 0, 0, 0, 12, 73, 85, 80, 95, 83, 66, 68, 82, 65, 71, 86, 0, 2, 0, 0, 0, + 8, 83, 66, 68, 82, 65, 71, 86, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, + 76, 69, 70, 84, 0, 2, 0, 0, 0, 7, 83, 66, 76, 69, 70, 84, 0, 2, 0, 0, + 0, 12, 73, 85, 80, 95, 83, 66, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 8, 83, + 66, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 83, 66, 80, 71, + 76, 69, 70, 84, 0, 2, 0, 0, 0, 9, 83, 66, 80, 71, 76, 69, 70, 84, 0, 2, + 0, 0, 0, 14, 73, 85, 80, 95, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 2, 0, + 0, 0, 10, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 95, 83, 66, 80, 79, 83, 72, 0, 2, 0, 0, 0, 7, 83, 66, 80, 79, 83, 72, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 83, 66, 68, 82, 65, 71, 72, 0, 2, 0, + 0, 0, 8, 83, 66, 68, 82, 65, 71, 72, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, + 83, 72, 79, 87, 0, 2, 0, 0, 0, 5, 83, 72, 79, 87, 0, 2, 0, 0, 0, 12, + 73, 85, 80, 95, 82, 69, 83, 84, 79, 82, 69, 0, 2, 0, 0, 0, 8, 82, 69, 83, + 84, 79, 82, 69, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 77, 73, 78, 73, 77, 73, + 90, 69, 0, 2, 0, 0, 0, 9, 77, 73, 78, 73, 77, 73, 90, 69, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 95, 77, 65, 88, 73, 77, 73, 90, 69, 0, 2, 0, 0, 0, 9, + 77, 65, 88, 73, 77, 73, 90, 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 72, 73, + 68, 69, 0, 2, 0, 0, 0, 5, 72, 73, 68, 69, 0, 2, 0, 0, 0, 4, 82, 69, + 68, 0, 2, 0, 0, 0, 7, 73,117,112, 82, 71, 66, 0, 2, 0, 0, 0, 6, 71, + 82, 69, 69, 78, 0, 2, 0, 0, 0, 5, 66, 76, 85, 69, 0, 2, 0, 0, 0, 6, + 66, 76, 65, 67, 75, 0, 2, 0, 0, 0, 6, 87, 72, 73, 84, 69, 0, 2, 0, 0, + 0, 7, 89, 69, 76, 76, 79, 87, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 79, 78, + 0, 2, 0, 0, 0, 3, 79, 78, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 79, 70, + 70, 0, 2, 0, 0, 0, 4, 79, 70, 70, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 89, 69, 83, 0, 2, 0, 0, 0, 4, 89, 69, 83, 0, 2, 0, 0, 0, 7, 73, 85, + 80, 95, 78, 79, 0, 2, 0, 0, 0, 3, 78, 79, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 95, 65, 80, 80, 69, 78, 68, 0, 2, 0, 0, 0, 7, 65, 80, 80, 69, 78, 68, + 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 86, 69, 82, 84, 73, 67, 65, 76, 0, 2, + 0, 0, 0, 9, 86, 69, 82, 84, 73, 67, 65, 76, 0, 2, 0, 0, 0, 15, 73, 85, + 80, 95, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 0, 2, 0, 0, 0, 11, 72, 79, + 82, 73, 90, 79, 78, 84, 65, 76, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 65, 67, + 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, + 0, 0, 0, 10, 73, 85, 80, 95, 65, 76, 69, 70, 84, 0, 2, 0, 0, 0, 6, 65, + 76, 69, 70, 84, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 65, 82, 73, 71, 72, 84, + 0, 2, 0, 0, 0, 7, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 9, 73, 85, + 80, 95, 65, 84, 79, 80, 0, 2, 0, 0, 0, 5, 65, 84, 79, 80, 0, 2, 0, 0, + 0, 12, 73, 85, 80, 95, 65, 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, 8, 65, + 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 78, 79, 82, 84, + 72, 0, 2, 0, 0, 0, 6, 78, 79, 82, 84, 72, 0, 2, 0, 0, 0, 10, 73, 85, + 80, 95, 83, 79, 85, 84, 72, 0, 2, 0, 0, 0, 6, 83, 79, 85, 84, 72, 0, 2, + 0, 0, 0, 9, 73, 85, 80, 95, 87, 69, 83, 84, 0, 2, 0, 0, 0, 5, 87, 69, + 83, 84, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 69, 65, 83, 84, 0, 2, 0, 0, + 0, 5, 69, 65, 83, 84, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 69, 0, 2, + 0, 0, 0, 3, 78, 69, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 83, 69, 0, 2, + 0, 0, 0, 3, 83, 69, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 87, 0, 2, + 0, 0, 0, 3, 78, 87, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 83, 87, 0, 2, + 0, 0, 0, 3, 83, 87, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 70, 85, 76, 76, + 0, 2, 0, 0, 0, 5, 70, 85, 76, 76, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, + 72, 65, 76, 70, 0, 2, 0, 0, 0, 5, 72, 65, 76, 70, 0, 2, 0, 0, 0, 10, + 73, 85, 80, 95, 84, 72, 73, 82, 68, 0, 2, 0, 0, 0, 6, 84, 72, 73, 82, 68, + 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 81, 85, 65, 82, 84, 69, 82, 0, 2, 0, + 0, 0, 8, 81, 85, 65, 82, 84, 69, 82, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, + 69, 73, 71, 72, 84, 72, 0, 2, 0, 0, 0, 7, 69, 73, 71, 72, 84, 72, 0, 2, + 0, 0, 0, 10, 73, 85, 80, 95, 65, 82, 82, 79, 87, 0, 2, 0, 0, 0, 6, 65, + 82, 82, 79, 87, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 66, 85, 83, 89, 0, 2, + 0, 0, 0, 5, 66, 85, 83, 89, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, + 83, 73, 90, 69, 95, 78, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 78, + 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 0, 2, + 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 83, 0, 2, 0, 0, 0, 13, 73, 85, + 80, 95, 82, 69, 83, 73, 90, 69, 95, 69, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, + 90, 69, 95, 69, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, + 95, 87, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 87, 0, 2, 0, 0, + 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 78, 69, 0, 2, 0, 0, 0, + 10, 82, 69, 83, 73, 90, 69, 95, 78, 69, 0, 2, 0, 0, 0, 14, 73, 85, 80, 95, + 82, 69, 83, 73, 90, 69, 95, 78, 87, 0, 2, 0, 0, 0, 10, 82, 69, 83, 73, 90, + 69, 95, 78, 87, 0, 2, 0, 0, 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, + 95, 83, 69, 0, 2, 0, 0, 0, 10, 82, 69, 83, 73, 90, 69, 95, 83, 69, 0, 2, + 0, 0, 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 87, 0, 2, 0, + 0, 0, 10, 82, 69, 83, 73, 90, 69, 95, 83, 87, 0, 2, 0, 0, 0, 9, 73, 85, + 80, 95, 77, 79, 86, 69, 0, 2, 0, 0, 0, 5, 77, 79, 86, 69, 0, 2, 0, 0, + 0, 9, 73, 85, 80, 95, 72, 65, 78, 68, 0, 2, 0, 0, 0, 5, 72, 65, 78, 68, + 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 78, 79, 78, 69, 0, 2, 0, 0, 0, 5, + 78, 79, 78, 69, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 73, 85, 80, 0, 2, 0, + 0, 0, 4, 73, 85, 80, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 67, 82, 79, 83, + 83, 0, 2, 0, 0, 0, 6, 67, 82, 79, 83, 83, 0, 2, 0, 0, 0, 8, 73, 85, + 80, 95, 80, 69, 78, 0, 2, 0, 0, 0, 4, 80, 69, 78, 0, 2, 0, 0, 0, 9, + 73, 85, 80, 95, 84, 69, 88, 84, 0, 2, 0, 0, 0, 5, 84, 69, 88, 84, 0, 2, + 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 67, 0, 2, 0, 0, + 0, 9, 82, 69, 83, 73, 90, 69, 95, 67, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, + 79, 80, 69, 78, 72, 65, 78, 68, 0, 2, 0, 0, 0, 9, 79, 80, 69, 78, 72, 65, + 78, 68, 0, 2, 0, 0, 0, 23, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, + 65, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 19, 72, 69, 76, 86, + 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 23, + 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, + 95, 56, 0, 2, 0, 0, 0, 19, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, + 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 21, 73, 85, 80, 95, 72, 69, 76, 86, + 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 17, 72, 69, + 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 24, + 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, + 95, 49, 48, 0, 2, 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, + 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, + 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, 0, 2, 0, + 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, + 49, 48, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, + 65, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, + 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 24, 73, 85, + 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, + 50, 0, 2, 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, + 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, + 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, + 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, + 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, + 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, + 67, 65, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, + 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 52, 0, + 2, 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, + 76, 95, 49, 52, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, + 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 20, 72, + 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, + 0, 0, 0, 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, + 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 66, 79, 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 21, 73, 85, 80, 95, 67, 79, + 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 17, + 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, + 0, 21, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, + 95, 56, 0, 2, 0, 0, 0, 17, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, + 73, 67, 95, 56, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, + 82, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 15, 67, 79, 85, 82, 73, 69, + 82, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, + 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, + 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, + 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, + 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 73, + 84, 65, 76, 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 67, 79, + 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 16, 67, + 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 22, + 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, + 50, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, + 76, 95, 49, 50, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, + 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 18, 67, 79, 85, + 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 20, + 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 50, 0, + 2, 0, 0, 0, 16, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 50, + 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, + 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, + 95, 78, 79, 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, + 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, + 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, + 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, + 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 16, 67, 79, 85, 82, 73, 69, 82, 95, 66, + 79, 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, 84, 73, 77, 69, + 83, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 15, 84, 73, 77, 69, + 83, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, + 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 15, + 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 17, + 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, + 0, 13, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 20, + 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, + 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, + 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, + 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 73, 84, 65, + 76, 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 18, 73, 85, 80, 95, 84, 73, 77, 69, + 83, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 14, 84, 73, 77, 69, 83, + 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, + 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 16, 84, + 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 20, + 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, + 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, + 0, 2, 0, 0, 0, 18, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, + 95, 49, 50, 0, 2, 0, 0, 0, 14, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, + 49, 50, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, 79, + 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 78, + 79, 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, + 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 16, 84, + 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 18, + 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 52, 0, 2, 0, + 0, 0, 14, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 52, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/constants_le64.lo"); +} diff --git a/iup/srclua3/loh/constants_le64w.loh b/iup/srclua3/loh/constants_le64w.loh new file mode 100755 index 0000000..6e7ed93 --- /dev/null +++ b/iup/srclua3/loh/constants_le64w.loh @@ -0,0 +1,301 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/constants_le64w.lo"); +*/ +/* ../obj/iuplua3/constants_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 15, 64, 99,111,110,115,116, + 97,110,116,115, 46,108,117, 97, 0, 0, 0, 5,182, 4, 0, 7, 1, 25, 0, 15, + 1, 11, 2, 15, 0, 26, 7, 0, 25, 3, 15, 1, 11, 4, 15, 3, 26, 9, 1, 25, + 5, 15, 1, 11, 6, 15, 5, 26, 9, 1, 25, 7, 15, 1, 11, 8, 15, 7, 26, 6, +255,255, 25, 9, 15, 1, 11, 10, 15, 9, 26, 6,255,254, 25, 11, 15, 1, 11, 12, + 15, 11, 26, 6,255,253, 25, 13, 15, 1, 11, 14, 15, 13, 26, 6,255,252, 25, 15, + 15, 1, 11, 16, 15, 15, 26, 6,255,251, 25, 17, 15, 1, 11, 18, 15, 17, 26, 6, +255,250, 25, 19, 15, 1, 11, 20, 15, 19, 26, 15, 11, 25, 21, 15, 1, 11, 22, 15, + 21, 26, 15, 13, 25, 23, 15, 1, 11, 24, 15, 23, 26, 7, 49, 25, 25, 15, 1, 11, + 26, 15, 25, 26, 7, 50, 25, 27, 15, 1, 11, 28, 15, 27, 26, 7, 51, 25, 29, 15, + 1, 11, 30, 15, 29, 26, 7, 52, 25, 31, 15, 1, 11, 32, 15, 31, 26, 7, 53, 25, + 33, 15, 1, 11, 34, 15, 33, 26, 9, 1, 25, 35, 15, 1, 11, 36, 15, 35, 26, 9, + 2, 25, 37, 15, 1, 11, 38, 15, 37, 26, 9, 3, 25, 39, 15, 1, 11, 40, 15, 39, + 26, 9, 4, 25, 41, 15, 1, 11, 42, 15, 41, 26, 7, 0, 25, 43, 15, 1, 11, 44, + 15, 43, 26, 7, 1, 25, 45, 15, 1, 11, 46, 15, 45, 26, 7, 2, 25, 47, 15, 1, + 11, 48, 15, 47, 26, 7, 3, 25, 49, 15, 1, 11, 50, 15, 49, 26, 7, 4, 25, 51, + 15, 1, 11, 52, 15, 51, 26, 7, 5, 25, 53, 15, 1, 11, 54, 15, 53, 26, 7, 6, + 25, 55, 15, 1, 11, 56, 15, 55, 26, 7, 7, 25, 57, 15, 1, 11, 58, 15, 57, 26, + 7, 8, 25, 59, 15, 1, 11, 60, 15, 59, 26, 7, 9, 25, 61, 15, 1, 11, 62, 15, + 61, 26, 7, 10, 25, 63, 15, 1, 11, 64, 15, 63, 26, 7, 11, 25, 65, 15, 1, 11, + 66, 15, 65, 26, 7, 0, 25, 67, 15, 1, 11, 68, 15, 67, 26, 7, 1, 25, 69, 15, + 1, 11, 70, 15, 69, 26, 7, 2, 25, 71, 15, 1, 11, 72, 15, 71, 26, 7, 3, 25, + 73, 15, 1, 11, 74, 15, 73, 26, 7, 4, 25, 75, 15, 1, 11, 76, 15, 75, 26, 15, + 78, 7, 1, 7, 0, 7, 0, 2, 1, 3, 25, 77, 15, 1, 11, 77, 15, 77, 26, 15, + 78, 7, 0, 7, 1, 7, 0, 2, 1, 3, 25, 79, 15, 1, 11, 79, 15, 79, 26, 15, + 78, 7, 0, 7, 0, 7, 1, 2, 1, 3, 25, 80, 15, 1, 11, 80, 15, 80, 26, 15, + 78, 7, 0, 7, 0, 7, 0, 2, 1, 3, 25, 81, 15, 1, 11, 81, 15, 81, 26, 15, + 78, 7, 1, 7, 1, 7, 1, 2, 1, 3, 25, 82, 15, 1, 11, 82, 15, 82, 26, 15, + 78, 7, 1, 7, 1, 7, 0, 2, 1, 3, 25, 83, 15, 1, 11, 83, 15, 83, 26, 11, + 85, 25, 84, 15, 1, 11, 85, 15, 84, 26, 11, 87, 25, 86, 15, 1, 11, 87, 15, 86, + 26, 11, 89, 25, 88, 15, 1, 11, 89, 15, 88, 26, 11, 91, 25, 90, 15, 1, 11, 91, + 15, 90, 26, 11, 93, 25, 92, 15, 1, 11, 93, 15, 92, 26, 11, 95, 25, 94, 15, 1, + 11, 95, 15, 94, 26, 11, 97, 25, 96, 15, 1, 11, 97, 15, 96, 26, 11, 99, 25, 98, + 15, 1, 11, 99, 15, 98, 26, 11,101, 25,100, 15, 1, 11,101, 15,100, 26, 11,103, + 25,102, 15, 1, 11,103, 15,102, 26, 11,105, 25,104, 15, 1, 11,105, 15,104, 26, + 11,107, 25,106, 15, 1, 11,107, 15,106, 26, 11,109, 25,108, 15, 1, 11,109, 15, +108, 26, 11,111, 25,110, 15, 1, 11,111, 15,110, 26, 11,113, 25,112, 15, 1, 11, +113, 15,112, 26, 11,115, 25,114, 15, 1, 11,115, 15,114, 26, 11,117, 25,116, 15, + 1, 11,117, 15,116, 26, 11,119, 25,118, 15, 1, 11,119, 15,118, 26, 11,121, 25, +120, 15, 1, 11,121, 15,120, 26, 11,123, 25,122, 15, 1, 11,123, 15,122, 26, 11, +125, 25,124, 15, 1, 11,125, 15,124, 26, 11,127, 25,126, 15, 1, 11,127, 15,126, + 26, 11,129, 25,128, 15, 1, 11,129, 15,128, 26, 11,131, 25,130, 15, 1, 11,131, + 15,130, 26, 11,133, 25,132, 15, 1, 11,133, 15,132, 26, 11,135, 25,134, 15, 1, + 11,135, 15,134, 26, 11,137, 25,136, 15, 1, 11,137, 15,136, 26, 11,139, 25,138, + 15, 1, 11,139, 15,138, 26, 11,141, 25,140, 15, 1, 11,141, 15,140, 26, 11,143, + 25,142, 15, 1, 11,143, 15,142, 26, 11,145, 25,144, 15, 1, 11,145, 15,144, 26, + 11,147, 25,146, 15, 1, 11,147, 15,146, 26, 11,149, 25,148, 15, 1, 11,149, 15, +148, 26, 11,151, 25,150, 15, 1, 11,151, 15,150, 26, 11,153, 25,152, 15, 1, 11, +153, 15,152, 26, 11,155, 25,154, 15, 1, 11,155, 15,154, 26, 11,157, 25,156, 15, + 1, 11,157, 15,156, 26, 11,159, 25,158, 15, 1, 11,159, 15,158, 26, 11,161, 25, +160, 15, 1, 11,161, 15,160, 26, 11,163, 25,162, 15, 1, 11,163, 15,162, 26, 11, +165, 25,164, 15, 1, 11,165, 15,164, 26, 11,167, 25,166, 15, 1, 11,167, 15,166, + 26, 11,169, 25,168, 15, 1, 11,169, 15,168, 26, 11,171, 25,170, 15, 1, 11,171, + 15,170, 26, 11,173, 25,172, 15, 1, 11,173, 15,172, 26, 11,175, 25,174, 15, 1, + 11,175, 15,174, 26, 11,177, 25,176, 15, 1, 11,177, 15,176, 26, 11,179, 25,178, + 15, 1, 11,179, 15,178, 26, 11,181, 25,180, 15, 1, 11,181, 15,180, 26, 11,183, + 25,182, 15, 1, 11,183, 15,182, 26, 11,185, 25,184, 15, 1, 11,185, 15,184, 26, + 11,187, 25,186, 15, 1, 11,187, 15,186, 26, 11,189, 25,188, 15, 1, 11,189, 15, +188, 26, 11,191, 25,190, 15, 1, 11,191, 15,190, 26, 11,193, 25,192, 15, 1, 11, +193, 15,192, 26, 11,195, 25,194, 15, 1, 11,195, 15,194, 26, 11,197, 25,196, 15, + 1, 11,197, 15,196, 26, 11,199, 25,198, 15, 1, 11,199, 15,198, 26, 11,201, 25, +200, 15, 1, 11,201, 15,200, 26, 11,203, 25,202, 15, 1, 11,203, 15,202, 26, 11, +205, 25,204, 15, 1, 11,205, 15,204, 26, 11,207, 25,206, 15, 1, 11,207, 15,206, + 26, 11,209, 25,208, 15, 1, 11,209, 15,208, 26, 11,211, 25,210, 15, 1, 11,211, + 15,210, 26, 11,213, 25,212, 15, 1, 11,213, 15,212, 26, 11,215, 25,214, 15, 1, + 11,215, 15,214, 26, 11,217, 25,216, 15, 1, 11,217, 15,216, 26, 11,219, 25,218, + 15, 1, 11,219, 15,218, 26, 11,221, 25,220, 15, 1, 11,221, 15,220, 26, 11,223, + 25,222, 15, 1, 11,223, 15,222, 26, 11,225, 25,224, 15, 1, 11,225, 15,224, 26, + 11,227, 25,226, 15, 1, 11,227, 15,226, 26, 11,229, 25,228, 15, 1, 11,229, 15, +228, 26, 11,231, 25,230, 15, 1, 11,231, 15,230, 26, 11,233, 25,232, 15, 1, 11, +233, 15,232, 26, 11,235, 25,234, 15, 1, 11,235, 15,234, 26, 11,237, 25,236, 15, + 1, 11,237, 15,236, 26, 11,239, 25,238, 15, 1, 11,239, 15,238, 26, 11,241, 25, +240, 15, 1, 11,241, 15,240, 26, 11,243, 25,242, 15, 1, 11,243, 15,242, 26, 15, + 1, 11,244, 11,245, 26, 15, 1, 11,246, 11,247, 26, 15, 1, 11,248, 11,249, 26, + 15, 1, 11,250, 11,251, 26, 15, 1, 11,252, 11,253, 26, 0, 0, 0, 0, 0, 0, + 0, 0,254, 2, 0, 0, 0, 10, 73, 85, 80, 95, 69, 82, 82, 79, 82, 0, 2, 0, + 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6, 69, 82, 82, 79, 82, 0, 2, 0, + 0, 0, 12, 73, 85, 80, 95, 78, 79, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 8, + 78, 79, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 79, 80, 69, + 78, 69, 68, 0, 2, 0, 0, 0, 7, 79, 80, 69, 78, 69, 68, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 73, 78, 86, 65, 76, 73, 68, 0, 2, 0, 0, 0, 8, 73, 78, + 86, 65, 76, 73, 68, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 67, 69, 78, 84, 69, + 82, 0, 2, 0, 0, 0, 7, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 9, 73, + 85, 80, 95, 76, 69, 70, 84, 0, 2, 0, 0, 0, 5, 76, 69, 70, 84, 0, 2, 0, + 0, 0, 10, 73, 85, 80, 95, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 6, 82, 73, + 71, 72, 84, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 77, 79, 85, 83, 69, 80, 79, + 83, 0, 2, 0, 0, 0, 9, 77, 79, 85, 83, 69, 80, 79, 83, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 67, 85, 82, 82, 69, 78, 84, 0, 2, 0, 0, 0, 8, 67, 85, + 82, 82, 69, 78, 84, 0, 2, 0, 0, 0, 17, 73, 85, 80, 95, 67, 69, 78, 84, 69, + 82, 80, 65, 82, 69, 78, 84, 0, 2, 0, 0, 0, 13, 67, 69, 78, 84, 69, 82, 80, + 65, 82, 69, 78, 84, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 84, 79, 80, 0, 2, + 0, 0, 0, 4, 84, 79, 80, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 66, 79, 84, + 84, 79, 77, 0, 2, 0, 0, 0, 7, 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 49, 0, 2, 0, 0, 0, 8, 66, 85, + 84, 84, 79, 78, 49, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, + 78, 50, 0, 2, 0, 0, 0, 8, 66, 85, 84, 84, 79, 78, 50, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 51, 0, 2, 0, 0, 0, 8, 66, 85, + 84, 84, 79, 78, 51, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, + 78, 52, 0, 2, 0, 0, 0, 8, 66, 85, 84, 84, 79, 78, 52, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 66, 85, 84, 84, 79, 78, 53, 0, 2, 0, 0, 0, 8, 66, 85, + 84, 84, 79, 78, 53, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 73, 71, 78, 79, 82, + 69, 0, 2, 0, 0, 0, 7, 73, 71, 78, 79, 82, 69, 0, 2, 0, 0, 0, 12, 73, + 85, 80, 95, 68, 69, 70, 65, 85, 76, 84, 0, 2, 0, 0, 0, 8, 68, 69, 70, 65, + 85, 76, 84, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 67, 76, 79, 83, 69, 0, 2, + 0, 0, 0, 6, 67, 76, 79, 83, 69, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 67, + 79, 78, 84, 73, 78, 85, 69, 0, 2, 0, 0, 0, 9, 67, 79, 78, 84, 73, 78, 85, + 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 66, 85, 80, 0, 2, 0, 0, 0, + 5, 83, 66, 85, 80, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 66, 68, 78, 0, + 2, 0, 0, 0, 5, 83, 66, 68, 78, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, + 66, 80, 71, 85, 80, 0, 2, 0, 0, 0, 7, 83, 66, 80, 71, 85, 80, 0, 2, 0, + 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, 71, 68, 78, 0, 2, 0, 0, 0, 7, 83, + 66, 80, 71, 68, 78, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, 79, 83, + 86, 0, 2, 0, 0, 0, 7, 83, 66, 80, 79, 83, 86, 0, 2, 0, 0, 0, 12, 73, + 85, 80, 95, 83, 66, 68, 82, 65, 71, 86, 0, 2, 0, 0, 0, 8, 83, 66, 68, 82, + 65, 71, 86, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 76, 69, 70, 84, 0, + 2, 0, 0, 0, 7, 83, 66, 76, 69, 70, 84, 0, 2, 0, 0, 0, 12, 73, 85, 80, + 95, 83, 66, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 8, 83, 66, 82, 73, 71, 72, + 84, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 83, 66, 80, 71, 76, 69, 70, 84, 0, + 2, 0, 0, 0, 9, 83, 66, 80, 71, 76, 69, 70, 84, 0, 2, 0, 0, 0, 14, 73, + 85, 80, 95, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 10, 83, 66, + 80, 71, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 83, 66, 80, + 79, 83, 72, 0, 2, 0, 0, 0, 7, 83, 66, 80, 79, 83, 72, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 83, 66, 68, 82, 65, 71, 72, 0, 2, 0, 0, 0, 8, 83, 66, + 68, 82, 65, 71, 72, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 83, 72, 79, 87, 0, + 2, 0, 0, 0, 5, 83, 72, 79, 87, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 82, + 69, 83, 84, 79, 82, 69, 0, 2, 0, 0, 0, 8, 82, 69, 83, 84, 79, 82, 69, 0, + 2, 0, 0, 0, 13, 73, 85, 80, 95, 77, 73, 78, 73, 77, 73, 90, 69, 0, 2, 0, + 0, 0, 9, 77, 73, 78, 73, 77, 73, 90, 69, 0, 2, 0, 0, 0, 13, 73, 85, 80, + 95, 77, 65, 88, 73, 77, 73, 90, 69, 0, 2, 0, 0, 0, 9, 77, 65, 88, 73, 77, + 73, 90, 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 72, 73, 68, 69, 0, 2, 0, + 0, 0, 5, 72, 73, 68, 69, 0, 2, 0, 0, 0, 4, 82, 69, 68, 0, 2, 0, 0, + 0, 7, 73,117,112, 82, 71, 66, 0, 2, 0, 0, 0, 6, 71, 82, 69, 69, 78, 0, + 2, 0, 0, 0, 5, 66, 76, 85, 69, 0, 2, 0, 0, 0, 6, 66, 76, 65, 67, 75, + 0, 2, 0, 0, 0, 6, 87, 72, 73, 84, 69, 0, 2, 0, 0, 0, 7, 89, 69, 76, + 76, 79, 87, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 79, 78, 0, 2, 0, 0, 0, + 3, 79, 78, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 79, 70, 70, 0, 2, 0, 0, + 0, 4, 79, 70, 70, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 89, 69, 83, 0, 2, + 0, 0, 0, 4, 89, 69, 83, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 79, 0, + 2, 0, 0, 0, 3, 78, 79, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 65, 80, 80, + 69, 78, 68, 0, 2, 0, 0, 0, 7, 65, 80, 80, 69, 78, 68, 0, 2, 0, 0, 0, + 13, 73, 85, 80, 95, 86, 69, 82, 84, 73, 67, 65, 76, 0, 2, 0, 0, 0, 9, 86, + 69, 82, 84, 73, 67, 65, 76, 0, 2, 0, 0, 0, 15, 73, 85, 80, 95, 72, 79, 82, + 73, 90, 79, 78, 84, 65, 76, 0, 2, 0, 0, 0, 11, 72, 79, 82, 73, 90, 79, 78, + 84, 65, 76, 0, 2, 0, 0, 0, 12, 73, 85, 80, 95, 65, 67, 69, 78, 84, 69, 82, + 0, 2, 0, 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 10, 73, + 85, 80, 95, 65, 76, 69, 70, 84, 0, 2, 0, 0, 0, 6, 65, 76, 69, 70, 84, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, + 7, 65, 82, 73, 71, 72, 84, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 65, 84, 79, + 80, 0, 2, 0, 0, 0, 5, 65, 84, 79, 80, 0, 2, 0, 0, 0, 12, 73, 85, 80, + 95, 65, 66, 79, 84, 84, 79, 77, 0, 2, 0, 0, 0, 8, 65, 66, 79, 84, 84, 79, + 77, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 78, 79, 82, 84, 72, 0, 2, 0, 0, + 0, 6, 78, 79, 82, 84, 72, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 83, 79, 85, + 84, 72, 0, 2, 0, 0, 0, 6, 83, 79, 85, 84, 72, 0, 2, 0, 0, 0, 9, 73, + 85, 80, 95, 87, 69, 83, 84, 0, 2, 0, 0, 0, 5, 87, 69, 83, 84, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 95, 69, 65, 83, 84, 0, 2, 0, 0, 0, 5, 69, 65, 83, + 84, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 69, 0, 2, 0, 0, 0, 3, 78, + 69, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 83, 69, 0, 2, 0, 0, 0, 3, 83, + 69, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 78, 87, 0, 2, 0, 0, 0, 3, 78, + 87, 0, 2, 0, 0, 0, 7, 73, 85, 80, 95, 83, 87, 0, 2, 0, 0, 0, 3, 83, + 87, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 70, 85, 76, 76, 0, 2, 0, 0, 0, + 5, 70, 85, 76, 76, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 72, 65, 76, 70, 0, + 2, 0, 0, 0, 5, 72, 65, 76, 70, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 84, + 72, 73, 82, 68, 0, 2, 0, 0, 0, 6, 84, 72, 73, 82, 68, 0, 2, 0, 0, 0, + 12, 73, 85, 80, 95, 81, 85, 65, 82, 84, 69, 82, 0, 2, 0, 0, 0, 8, 81, 85, + 65, 82, 84, 69, 82, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, 69, 73, 71, 72, 84, + 72, 0, 2, 0, 0, 0, 7, 69, 73, 71, 72, 84, 72, 0, 2, 0, 0, 0, 10, 73, + 85, 80, 95, 65, 82, 82, 79, 87, 0, 2, 0, 0, 0, 6, 65, 82, 82, 79, 87, 0, + 2, 0, 0, 0, 9, 73, 85, 80, 95, 66, 85, 83, 89, 0, 2, 0, 0, 0, 5, 66, + 85, 83, 89, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, + 78, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 78, 0, 2, 0, 0, 0, + 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 0, 2, 0, 0, 0, 9, 82, + 69, 83, 73, 90, 69, 95, 83, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, + 73, 90, 69, 95, 69, 0, 2, 0, 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 69, 0, + 2, 0, 0, 0, 13, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 87, 0, 2, 0, + 0, 0, 9, 82, 69, 83, 73, 90, 69, 95, 87, 0, 2, 0, 0, 0, 14, 73, 85, 80, + 95, 82, 69, 83, 73, 90, 69, 95, 78, 69, 0, 2, 0, 0, 0, 10, 82, 69, 83, 73, + 90, 69, 95, 78, 69, 0, 2, 0, 0, 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, + 69, 95, 78, 87, 0, 2, 0, 0, 0, 10, 82, 69, 83, 73, 90, 69, 95, 78, 87, 0, + 2, 0, 0, 0, 14, 73, 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 69, 0, 2, + 0, 0, 0, 10, 82, 69, 83, 73, 90, 69, 95, 83, 69, 0, 2, 0, 0, 0, 14, 73, + 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 83, 87, 0, 2, 0, 0, 0, 10, 82, 69, + 83, 73, 90, 69, 95, 83, 87, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 77, 79, 86, + 69, 0, 2, 0, 0, 0, 5, 77, 79, 86, 69, 0, 2, 0, 0, 0, 9, 73, 85, 80, + 95, 72, 65, 78, 68, 0, 2, 0, 0, 0, 5, 72, 65, 78, 68, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 95, 78, 79, 78, 69, 0, 2, 0, 0, 0, 5, 78, 79, 78, 69, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 95, 73, 85, 80, 0, 2, 0, 0, 0, 4, 73, 85, + 80, 0, 2, 0, 0, 0, 10, 73, 85, 80, 95, 67, 82, 79, 83, 83, 0, 2, 0, 0, + 0, 6, 67, 82, 79, 83, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 80, 69, 78, + 0, 2, 0, 0, 0, 4, 80, 69, 78, 0, 2, 0, 0, 0, 9, 73, 85, 80, 95, 84, + 69, 88, 84, 0, 2, 0, 0, 0, 5, 84, 69, 88, 84, 0, 2, 0, 0, 0, 13, 73, + 85, 80, 95, 82, 69, 83, 73, 90, 69, 95, 67, 0, 2, 0, 0, 0, 9, 82, 69, 83, + 73, 90, 69, 95, 67, 0, 2, 0, 0, 0, 13, 73, 85, 80, 95, 79, 80, 69, 78, 72, + 65, 78, 68, 0, 2, 0, 0, 0, 9, 79, 80, 69, 78, 72, 65, 78, 68, 0, 2, 0, + 0, 0, 23, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, + 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 19, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 23, 73, 85, 80, 95, 72, + 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, + 0, 0, 19, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, + 56, 0, 2, 0, 0, 0, 21, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 17, 72, 69, 76, 86, 69, 84, 73, + 67, 65, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, + 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, + 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, + 95, 49, 48, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, + 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, 0, 2, 0, 0, 0, 20, 72, 69, + 76, 86, 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, 0, 2, 0, + 0, 0, 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, + 68, 95, 49, 48, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, + 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, + 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, + 0, 20, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, + 50, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, + 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 20, 72, 69, 76, 86, + 69, 84, 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, + 22, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, + 49, 50, 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, + 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, + 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 20, + 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 78, 79, 82, 77, 65, 76, 95, 49, 52, 0, + 2, 0, 0, 0, 24, 73, 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 73, + 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 20, 72, 69, 76, 86, 69, 84, + 73, 67, 65, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 22, 73, + 85, 80, 95, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, 95, 49, 52, + 0, 2, 0, 0, 0, 18, 72, 69, 76, 86, 69, 84, 73, 67, 65, 95, 66, 79, 76, 68, + 95, 49, 52, 0, 2, 0, 0, 0, 21, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, + 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 17, 67, 79, 85, 82, 73, + 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 21, 73, 85, 80, + 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, + 0, 0, 17, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, + 2, 0, 0, 0, 19, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, + 68, 95, 56, 0, 2, 0, 0, 0, 15, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, + 68, 95, 56, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, + 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, + 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 22, 73, + 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, + 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, + 95, 49, 48, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, + 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 16, 67, 79, 85, 82, 73, 69, + 82, 95, 66, 79, 76, 68, 95, 49, 48, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, + 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, + 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, + 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 73, 84, 65, + 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, + 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 67, + 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, 16, + 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, 0, 0, + 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, 65, 76, 95, + 49, 52, 0, 2, 0, 0, 0, 18, 67, 79, 85, 82, 73, 69, 82, 95, 78, 79, 82, 77, + 65, 76, 95, 49, 52, 0, 2, 0, 0, 0, 22, 73, 85, 80, 95, 67, 79, 85, 82, 73, + 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 18, 67, 79, + 85, 82, 73, 69, 82, 95, 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, + 20, 73, 85, 80, 95, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, 52, + 0, 2, 0, 0, 0, 16, 67, 79, 85, 82, 73, 69, 82, 95, 66, 79, 76, 68, 95, 49, + 52, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, 79, 82, + 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 15, 84, 73, 77, 69, 83, 95, 78, 79, 82, + 77, 65, 76, 95, 56, 0, 2, 0, 0, 0, 19, 73, 85, 80, 95, 84, 73, 77, 69, 83, + 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 15, 84, 73, 77, 69, 83, + 95, 73, 84, 65, 76, 73, 67, 95, 56, 0, 2, 0, 0, 0, 17, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 13, 84, 73, 77, + 69, 83, 95, 66, 79, 76, 68, 95, 56, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, 16, + 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, 49, 48, 0, 2, 0, 0, 0, + 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 48, + 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, + 48, 0, 2, 0, 0, 0, 18, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, + 68, 95, 49, 48, 0, 2, 0, 0, 0, 14, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, + 95, 49, 48, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, + 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, + 78, 79, 82, 77, 65, 76, 95, 49, 50, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, 16, + 84, 73, 77, 69, 83, 95, 73, 84, 65, 76, 73, 67, 95, 49, 50, 0, 2, 0, 0, 0, + 18, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, + 0, 0, 0, 14, 84, 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 50, 0, 2, 0, + 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, 95, + 49, 52, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, 78, 79, 82, 77, 65, 76, + 95, 49, 52, 0, 2, 0, 0, 0, 20, 73, 85, 80, 95, 84, 73, 77, 69, 83, 95, 73, + 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 16, 84, 73, 77, 69, 83, 95, + 73, 84, 65, 76, 73, 67, 95, 49, 52, 0, 2, 0, 0, 0, 18, 73, 85, 80, 95, 84, + 73, 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 14, 84, 73, + 77, 69, 83, 95, 66, 79, 76, 68, 95, 49, 52, 0, 2, 0, 0, 0, 11, 77, 65, 83, + 75, 95, 70, 76, 79, 65, 84, 0, 2, 0, 0, 0, 24, 91, 43, 47, 45, 93, 63, 40, + 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, 43, 41, 0, 2, 0, 0, + 0, 12, 77, 65, 83, 75, 95, 85, 70, 76, 79, 65, 84, 0, 2, 0, 0, 0, 18, 40, + 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, 43, 41, 0, 2, 0, 0, + 0, 12, 77, 65, 83, 75, 95, 69, 70, 76, 79, 65, 84, 0, 2, 0, 0, 0, 40, 91, + 43, 47, 45, 93, 63, 40, 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, + 43, 41, 40, 91,101, 69, 93, 91, 43, 47, 45, 93, 63, 47,100, 43, 41, 63, 0, 2, + 0, 0, 0, 9, 77, 65, 83, 75, 95, 73, 78, 84, 0, 2, 0, 0, 0, 10, 91, 43, + 47, 45, 93, 63, 47,100, 43, 0, 2, 0, 0, 0, 10, 77, 65, 83, 75, 95, 85, 73, + 78, 84, 0, 2, 0, 0, 0, 4, 47,100, 43, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/constants_le64w.lo"); +} diff --git a/iup/srclua3/loh/dial.loh b/iup/srclua3/loh/dial.loh new file mode 100755 index 0000000..f1811dd --- /dev/null +++ b/iup/srclua3/loh/dial.loh @@ -0,0 +1,31 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luadial.lo"); +*/ +/* ../obj/iupluacontrols3/luadial.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 13, 64,108,117, 97,100,105, + 97,108, 46,108,117, 97, 0, 0, 0, 0, 40, 3, 0, 22, 1, 11, 1, 15, 2, 30, + 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, + 26, 15, 9, 18, 10, 11, 8, 15, 11, 26, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, + 0, 0, 0, 8, 73, 85, 80, 68, 73, 65, 76, 0, 2, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, + 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, + 0, 0, 3, 0, 0, 0, 13, 64,108,117, 97,100,105, 97,108, 46,108,117, 97, 0, + 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105, +117,112, 67,114,101, 97,116,101, 68,105, 97,108, 0, 2, 0, 0, 0, 8,105,117, +112,100,105, 97,108, 0, 4, 0, 0, 0, 7, 0, 0, 0, 13, 64,108,117, 97,100, +105, 97,108, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 68, 73, 65, 76, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 5,100,105, 97,108, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108, +108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,109,111,117,115,101,109,111,118, +101, 0, 2, 0, 0, 0, 21,105,117,112, 95,118, 97,108, 95,109,111,117,115,101, +109,111,118,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luadial.lo"); +} diff --git a/iup/srclua3/loh/dial_be32.loh b/iup/srclua3/loh/dial_be32.loh new file mode 100755 index 0000000..8a2e8ed --- /dev/null +++ b/iup/srclua3/loh/dial_be32.loh @@ -0,0 +1,31 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luadial_be32.lo"); +*/ +/* ../obj/iupluacontrols3/luadial_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 13, 64,108,117, 97,100,105, + 97,108, 46,108,117, 97, 0, 0, 0, 0, 40, 3, 0, 22, 1, 11, 1, 15, 2, 30, + 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, + 26, 15, 9, 18, 10, 11, 8, 15, 11, 26, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, + 0, 0, 0, 8, 73, 85, 80, 68, 73, 65, 76, 0, 2, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, + 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, + 0, 0, 3, 0, 0, 0, 13, 64,108,117, 97,100,105, 97,108, 46,108,117, 97, 0, + 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105, +117,112, 67,114,101, 97,116,101, 68,105, 97,108, 0, 2, 0, 0, 0, 8,105,117, +112,100,105, 97,108, 0, 4, 0, 0, 0, 7, 0, 0, 0, 13, 64,108,117, 97,100, +105, 97,108, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 68, 73, 65, 76, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 5,100,105, 97,108, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108, +108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,109,111,117,115,101,109,111,118, +101, 0, 2, 0, 0, 0, 21,105,117,112, 95,118, 97,108, 95,109,111,117,115,101, +109,111,118,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luadial_be32.lo"); +} diff --git a/iup/srclua3/loh/dial_be64.loh b/iup/srclua3/loh/dial_be64.loh new file mode 100755 index 0000000..d6a30c1 --- /dev/null +++ b/iup/srclua3/loh/dial_be64.loh @@ -0,0 +1,30 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/dial_be64.lo"); +*/ +/* ../obj/iupluacontrols3/dial_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,100,105, 97,108, 46, +108,117, 97, 0, 0, 0, 0, 40, 3, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, 9, + 18, 10, 11, 8, 15, 11, 26, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, + 8, 73, 85, 80, 68, 73, 65, 76, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, + 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114, +101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, + 0, 0, 0, 10, 64,100,105, 97,108, 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, + 15, 1, 13, 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97, +116,101, 68,105, 97,108, 0, 2, 0, 0, 0, 8,105,117,112,100,105, 97,108, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 10, 64,100,105, 97,108, 46,108,117, 97, 0, 0, + 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 68, 73, + 65, 76, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,100,105, 97,108, 0, 2, + 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, + 0, 0, 10,109,111,117,115,101,109,111,118,101, 0, 2, 0, 0, 0, 21,105,117, +112, 95,118, 97,108, 95,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/dial_be64.lo"); +} diff --git a/iup/srclua3/loh/dial_le64.loh b/iup/srclua3/loh/dial_le64.loh new file mode 100755 index 0000000..e68eb83 --- /dev/null +++ b/iup/srclua3/loh/dial_le64.loh @@ -0,0 +1,31 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luadial_le64.lo"); +*/ +/* ../obj/iupluacontrols3/luadial_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 13, 64,108,117, 97,100,105, + 97,108, 46,108,117, 97, 0, 0, 0, 0, 40, 3, 0, 22, 1, 11, 1, 15, 2, 30, + 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, + 26, 15, 9, 18, 10, 11, 8, 15, 11, 26, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, + 0, 0, 0, 8, 73, 85, 80, 68, 73, 65, 76, 0, 2, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, + 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, + 0, 0, 3, 0, 0, 0, 13, 64,108,117, 97,100,105, 97,108, 46,108,117, 97, 0, + 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105, +117,112, 67,114,101, 97,116,101, 68,105, 97,108, 0, 2, 0, 0, 0, 8,105,117, +112,100,105, 97,108, 0, 4, 0, 0, 0, 7, 0, 0, 0, 13, 64,108,117, 97,100, +105, 97,108, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 68, 73, 65, 76, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 5,100,105, 97,108, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108, +108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,109,111,117,115,101,109,111,118, +101, 0, 2, 0, 0, 0, 21,105,117,112, 95,118, 97,108, 95,109,111,117,115,101, +109,111,118,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luadial_le64.lo"); +} diff --git a/iup/srclua3/loh/dial_le64w.loh b/iup/srclua3/loh/dial_le64w.loh new file mode 100755 index 0000000..ace3d04 --- /dev/null +++ b/iup/srclua3/loh/dial_le64w.loh @@ -0,0 +1,31 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luadial_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luadial_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 13, 64,108,117, 97,100,105, + 97,108, 46,108,117, 97, 0, 0, 0, 0, 40, 3, 0, 22, 1, 11, 1, 15, 2, 30, + 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, + 26, 15, 9, 18, 10, 11, 8, 15, 11, 26, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, + 0, 0, 0, 8, 73, 85, 80, 68, 73, 65, 76, 0, 2, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, + 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, + 0, 0, 3, 0, 0, 0, 13, 64,108,117, 97,100,105, 97,108, 46,108,117, 97, 0, + 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105, +117,112, 67,114,101, 97,116,101, 68,105, 97,108, 0, 2, 0, 0, 0, 8,105,117, +112,100,105, 97,108, 0, 4, 0, 0, 0, 7, 0, 0, 0, 13, 64,108,117, 97,100, +105, 97,108, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 68, 73, 65, 76, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, + 0, 0, 5,100,105, 97,108, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108, +108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,109,111,117,115,101,109,111,118, +101, 0, 2, 0, 0, 0, 21,105,117,112, 95,118, 97,108, 95,109,111,117,115,101, +109,111,118,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luadial_le64w.lo"); +} diff --git a/iup/srclua3/loh/gauge.loh b/iup/srclua3/loh/gauge.loh new file mode 100755 index 0000000..f4f22bf --- /dev/null +++ b/iup/srclua3/loh/gauge.loh @@ -0,0 +1,28 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luagauge.lo"); +*/ +/* ../obj/iupluacontrols3/luagauge.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64,108,117, 97,103, 97, +117,103,101, 46,108,117, 97, 0, 0, 0, 0, 31, 3, 0, 22, 1, 11, 1, 15, 2, + 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, + 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 9, 73, 85, 80, 71, + 65, 85, 71, 69, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, + 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, + 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 14, + 64,108,117, 97,103, 97,117,103,101, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, + 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 71, 97,117, +103,101, 0, 2, 0, 0, 0, 9,105,117,112,103, 97,117,103,101, 0, 4, 0, 0, + 0, 7, 0, 0, 0, 14, 64,108,117, 97,103, 97,117,103,101, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 71, + 65, 85, 71, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,103, 97,117,103, +101, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luagauge.lo"); +} diff --git a/iup/srclua3/loh/gauge_be32.loh b/iup/srclua3/loh/gauge_be32.loh new file mode 100755 index 0000000..c4ef637 --- /dev/null +++ b/iup/srclua3/loh/gauge_be32.loh @@ -0,0 +1,28 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luagauge_be32.lo"); +*/ +/* ../obj/iupluacontrols3/luagauge_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64,108,117, 97,103, 97, +117,103,101, 46,108,117, 97, 0, 0, 0, 0, 31, 3, 0, 22, 1, 11, 1, 15, 2, + 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, + 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 9, 73, 85, 80, 71, + 65, 85, 71, 69, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, + 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, + 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 14, + 64,108,117, 97,103, 97,117,103,101, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, + 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 71, 97,117, +103,101, 0, 2, 0, 0, 0, 9,105,117,112,103, 97,117,103,101, 0, 4, 0, 0, + 0, 7, 0, 0, 0, 14, 64,108,117, 97,103, 97,117,103,101, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 71, + 65, 85, 71, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,103, 97,117,103, +101, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luagauge_be32.lo"); +} diff --git a/iup/srclua3/loh/gauge_be64.loh b/iup/srclua3/loh/gauge_be64.loh new file mode 100755 index 0000000..99ce14d --- /dev/null +++ b/iup/srclua3/loh/gauge_be64.loh @@ -0,0 +1,27 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/gauge_be64.lo"); +*/ +/* ../obj/iupluacontrols3/gauge_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64,103, 97,117,103,101, + 46,108,117, 97, 0, 0, 0, 0, 31, 3, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, + 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 0, + 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 9, 73, 85, 80, 71, 65, 85, 71, + 69, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80, +101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 11, 64,103, 97, +117,103,101, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, + 0, 15,105,117,112, 67,114,101, 97,116,101, 71, 97,117,103,101, 0, 2, 0, 0, + 0, 9,105,117,112,103, 97,117,103,101, 0, 4, 0, 0, 0, 7, 0, 0, 0, 11, + 64,103, 97,117,103,101, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, + 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2, +111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 71, 65, 85, 71, 69, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117, +112, 0, 2, 0, 0, 0, 6,103, 97,117,103,101, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/gauge_be64.lo"); +} diff --git a/iup/srclua3/loh/gauge_le64.loh b/iup/srclua3/loh/gauge_le64.loh new file mode 100755 index 0000000..5c3803c --- /dev/null +++ b/iup/srclua3/loh/gauge_le64.loh @@ -0,0 +1,28 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luagauge_le64.lo"); +*/ +/* ../obj/iupluacontrols3/luagauge_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64,108,117, 97,103, 97, +117,103,101, 46,108,117, 97, 0, 0, 0, 0, 31, 3, 0, 22, 1, 11, 1, 15, 2, + 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, + 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 9, 73, 85, 80, 71, + 65, 85, 71, 69, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, + 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, + 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 14, + 64,108,117, 97,103, 97,117,103,101, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, + 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 71, 97,117, +103,101, 0, 2, 0, 0, 0, 9,105,117,112,103, 97,117,103,101, 0, 4, 0, 0, + 0, 7, 0, 0, 0, 14, 64,108,117, 97,103, 97,117,103,101, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 71, + 65, 85, 71, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,103, 97,117,103, +101, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luagauge_le64.lo"); +} diff --git a/iup/srclua3/loh/gauge_le64w.loh b/iup/srclua3/loh/gauge_le64w.loh new file mode 100755 index 0000000..7aeedac --- /dev/null +++ b/iup/srclua3/loh/gauge_le64w.loh @@ -0,0 +1,28 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luagauge_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luagauge_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64,108,117, 97,103, 97, +117,103,101, 46,108,117, 97, 0, 0, 0, 0, 31, 3, 0, 22, 1, 11, 1, 15, 2, + 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, + 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 9, 73, 85, 80, 71, + 65, 85, 71, 69, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, + 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, + 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 14, + 64,108,117, 97,103, 97,117,103,101, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, + 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 71, 97,117, +103,101, 0, 2, 0, 0, 0, 9,105,117,112,103, 97,117,103,101, 0, 4, 0, 0, + 0, 7, 0, 0, 0, 14, 64,108,117, 97,103, 97,117,103,101, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 71, + 65, 85, 71, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,103, 97,117,103, +101, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luagauge_le64w.lo"); +} diff --git a/iup/srclua3/loh/iuplua.loh b/iup/srclua3/loh/iuplua.loh new file mode 100755 index 0000000..d55bd40 --- /dev/null +++ b/iup/srclua3/loh/iuplua.loh @@ -0,0 +1,170 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/iuplua.lo"); +*/ +/* ../obj/iuplua3/iuplua.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64,105,117,112,108,117, + 97, 46,108,117, 97, 0, 0, 0, 0,122, 4, 0, 22, 0, 25, 0, 15, 1, 15, 2, + 11, 3, 15, 4, 2, 0, 3, 15, 1, 15, 2, 11, 5, 15, 6, 2, 0, 3, 15, 1, + 15, 7, 22, 0, 2, 1, 1, 11, 8, 15, 9, 2, 0, 3, 11, 11, 25, 10, 11, 13, + 25, 12, 11, 15, 25, 14, 11, 17, 25, 16, 11, 19, 25, 18, 11, 21, 25, 20, 11, 23, + 25, 22, 11, 25, 25, 24, 11, 27, 25, 26, 11, 29, 25, 28, 11, 31, 25, 30, 11, 33, + 25, 32, 15, 34, 11, 35, 15, 32, 26, 11, 37, 25, 36, 15, 34, 11, 38, 15, 36, 26, + 11, 40, 25, 39, 15, 34, 11, 41, 11, 42, 26, 0, 0, 0, 0, 0, 0, 0, 0, 43, + 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, + 0, 13,115,101,116,116, 97,103,109,101,116,104,111,100, 0, 2, 0, 0, 0, 11, +105,117,112,108,117, 97, 95,116, 97,103, 0, 2, 0, 0, 0, 9,103,101,116,116, + 97, 98,108,101, 0, 2, 0, 0, 0, 13,105,117,112, 95,103,101,116,116, 97, 98, +108,101, 0, 2, 0, 0, 0, 9,115,101,116,116, 97, 98,108,101, 0, 2, 0, 0, + 0, 13,105,117,112, 95,115,101,116,116, 97, 98,108,101, 0, 2, 0, 0, 0, 4, +116, 97,103, 0, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 10, +105,117,112, 95,105,110,100,101,120, 0, 2, 0, 0, 0, 7, 95, 65, 76, 69, 82, + 84, 0, 4, 0, 0, 0, 14, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108, +117, 97, 0, 0, 0, 0,125, 14, 1, 15, 2, 22, 3, 11, 3, 11, 4, 11, 5, 11, + 6, 11, 7, 11, 8, 30, 2, 2, 1, 1, 15, 10, 22, 4, 11, 11, 11, 12, 11, 13, + 11, 12, 11, 14, 13, 0, 11, 5, 11, 15, 30, 3, 2, 1, 1, 15, 17, 22, 5, 13, + 2, 13, 1, 29, 0, 2, 11, 18, 11, 19, 11, 20, 11, 21, 11, 22, 11, 23, 30, 2, + 2, 1, 1, 15, 25, 22, 5, 13, 3, 29, 0, 1, 11, 3, 11, 26, 11, 27, 13, 1, + 11, 28, 13, 1, 11, 29, 13, 1, 30, 3, 2, 1, 1, 13, 4, 20, 30, 15, 31, 15, + 31, 2, 0, 3, 13, 4, 20, 32, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 33, + 2, 0, 0, 0, 2,115, 0, 2, 0, 0, 0, 3, 98,116, 0, 2, 0, 0, 0, 10, +105,117,112, 98,117,116,116,111,110, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 2, 0, 0, 0, 3, 79,107, 0, 2, 0, 0, 0, 5,115,105,122,101, 0, 2, + 0, 0, 0, 3, 54, 48, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, + 0, 0, 0, 17,114,101,116,117,114,110, 32, 73, 85, 80, 95, 67, 76, 79, 83, 69, + 0, 2, 0, 0, 0, 3,109,108, 0, 2, 0, 0, 0, 13,105,117,112,109,117,108, +116,105,108,105,110,101, 0, 2, 0, 0, 0, 7,101,120,112, 97,110,100, 0, 2, + 0, 0, 0, 4, 89, 69, 83, 0, 2, 0, 0, 0, 9,114,101, 97,100,111,110,108, +121, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 8, 51, 48, + 48,120, 49, 53, 48, 0, 2, 0, 0, 0, 3,118, 98, 0, 2, 0, 0, 0, 8,105, +117,112,118, 98,111,120, 0, 2, 0, 0, 0, 10, 97,108,105,103,110,109,101,110, +116, 0, 2, 0, 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 7, +109, 97,114,103,105,110, 0, 2, 0, 0, 0, 6, 49, 48,120, 49, 48, 0, 2, 0, + 0, 0, 4,103, 97,112, 0, 2, 0, 0, 0, 3, 49, 48, 0, 2, 0, 0, 0, 3, +100,103, 0, 2, 0, 0, 0, 10,105,117,112,100,105, 97,108,111,103, 0, 2, 0, + 0, 0, 10, 76,117, 97, 32, 69,114,114,111,114, 0, 2, 0, 0, 0, 11,100,101, +102, 97,117,108,116,101,115, 99, 0, 2, 0, 0, 0, 13,100,101,102, 97,117,108, +116,101,110,116,101,114, 0, 2, 0, 0, 0, 11,115,116, 97,114,116,102,111, 99, +117,115, 0, 2, 0, 0, 0, 6,112,111,112,117,112, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 95, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 8,100,101,115,116,114, +111,121, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, + 4, 0, 0, 0, 23, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, + 0, 0, 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5, +116,121,112,101, 0, 2, 0, 0, 0, 7,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,110,117,109, 98,101,114, 0, 4, 0, 0, 0, 27, 0, + 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 15, 3, + 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, + 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 9,116,121,112,101, + 95,110,105,108, 0, 4, 0, 0, 0, 31, 0, 0, 0, 12, 64,105,117,112,108,117, + 97, 46,108,117, 97, 0, 0, 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, + 2, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 4,110,105,108, 0, 2, + 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99,116,105,111,110, 0, 4, 0, + 0, 0, 35, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, + 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,116,121, +112,101, 0, 2, 0, 0, 0, 9,102,117,110, 99,116,105,111,110, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 0, 39, 0, + 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 20, 3, + 1, 13, 0, 52, 9, 15, 1, 13, 0, 16, 1, 1, 50, 4, 4, 0, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2,119, 0, 2, 0, 0, 0, 12,105, +117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, 0, 10,116,121,112,101, + 95,109,101,110,117, 0, 4, 0, 0, 0, 47, 0, 0, 0, 12, 64,105,117,112,108, +117, 97, 46,108,117, 97, 0, 0, 0, 0, 21, 3, 1, 15, 1, 13, 0, 2, 1, 1, + 48, 7, 13, 0, 18, 2, 15, 3, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100, +103,101,116, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 77, 69, 78, 85, 0, 2, 0, 0, 0, 10,116,121,112,101, 95,105, +116,101,109, 0, 4, 0, 0, 0, 51, 0, 0, 0, 12, 64,105,117,112,108,117, 97, + 46,108,117, 97, 0, 0, 0, 0, 39, 3, 1, 15, 1, 13, 0, 2, 1, 1, 48, 25, + 13, 0, 18, 2, 15, 3, 32, 46, 7, 13, 0, 18, 2, 15, 4, 32, 46, 7, 13, 0, + 18, 2, 15, 5, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 73, 84, 69, 77, 0, 2, 0, 0, 0, 11, 73, 85, 80, 83, 85, 66, 77, 69, 78, 85, + 0, 2, 0, 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 2, + 0, 0, 0, 14,105,117,112, 67, 97,108,108, 77,101,116,104,111,100, 0, 4, 0, + 0, 0, 55, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, + 0, 0,105, 7,129, 13, 1, 7, 1, 16, 13, 2, 13, 0, 16, 13, 3, 44, 52, 29, + 15, 5, 15, 6, 13, 0, 16, 7, 1, 16, 2, 1, 1, 13, 2, 13, 4, 16, 23, 3, + 13, 3, 44, 52, 2, 1, 5, 5, 1, 15, 7, 13, 3, 2, 1, 1, 52, 11, 15, 8, + 13, 3, 13, 1, 3, 4, 2, 50, 38, 15, 9, 13, 3, 2, 1, 1, 52, 25, 15, 11, + 13, 2, 25, 11, 15, 13, 13, 3, 2, 1, 1, 13, 4, 25, 11, 13, 5, 1, 6, 5, + 2, 50, 4, 15, 14, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 15, 2, 0, 0, 0, + 5,110, 97,109,101, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, + 0, 0, 4, 97,114,103, 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, 0, 0, + 0, 10,102,117,108,108, 95,110, 97,109,101, 0, 2, 0, 0, 0, 9,115,116,114, +108,111,119,101,114, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, + 97, 99,107,115, 0, 2, 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99,116, +105,111,110, 0, 2, 0, 0, 0, 5, 99, 97,108,108, 0, 2, 0, 0, 0, 12,116, +121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 5,116,101,109,112, + 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 7,114,101,115,117, +108,116, 0, 2, 0, 0, 0, 9,100,111,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 10, 73, 85, 80, 95, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 11,105,117,112, + 83,101,116, 78, 97,109,101, 0, 4, 0, 0, 0, 81, 0, 0, 0, 12, 64,105,117, +112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 51, 7, 1, 15, 1, 15, 2, 13, + 0, 16, 18, 3, 2, 1, 1, 44, 52, 33, 15, 2, 13, 0, 16, 11, 3, 15, 4, 11, + 5, 15, 6, 13, 0, 2, 1, 1, 2, 1, 2, 26, 15, 7, 13, 0, 18, 3, 13, 0, + 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 7,104, 97,110, +100,108,101, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, + 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 95,110, 97,109,101, 0, 2, 0, 0, 0, 7,102,111,114, +109, 97,116, 0, 2, 0, 0, 0, 17, 95, 73, 85, 80, 76, 85, 65, 95, 78, 65, 77, + 69, 40, 37,115, 41, 0, 2, 0, 0, 0, 9,116,111,115,116,114,105,110,103, 0, + 2, 0, 0, 0, 13, 73,117,112, 83,101,116, 72, 97,110,100,108,101, 0, 2, 0, + 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 4, 0, 0, 0, 88, 0, 0, 0, 12, 64,105,117,112,108, +117, 97, 46,108,117, 97, 0, 0, 0, 0, 74, 5, 1, 13, 0, 18, 1, 18, 1, 15, + 2, 32, 52, 32, 7, 1, 50, 17, 15, 4, 13, 0, 13, 1, 16, 2, 0, 1, 13, 1, + 7, 1, 37, 23, 1, 13, 0, 13, 1, 16, 54, 24, 5, 1, 50, 28, 13, 0, 18, 1, + 15, 5, 32, 52, 12, 15, 4, 13, 0, 7, 1, 16, 2, 0, 1, 50, 7, 15, 6, 13, + 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 12, 67, + 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, + 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, + 2, 0, 0, 0, 11,105,117,112, 83,101,116, 78, 97,109,101, 0, 2, 0, 0, 0, + 7, 73,117,112, 82, 71, 66, 0, 4, 0, 0, 0,108, 0, 0, 0, 12, 64,105,117, +112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 43, 7, 3, 15, 3, 13, 0, 7, +255, 39, 2, 1, 1, 11, 4, 42, 15, 3, 13, 1, 7,255, 39, 2, 1, 1, 42, 11, + 4, 42, 15, 3, 13, 2, 7,255, 39, 2, 1, 1, 42, 1, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 2, 0, 0, 0, 4,114,101,100, 0, 2, 0, 0, 0, 6,103,114, +101,101,110, 0, 2, 0, 0, 0, 5, 98,108,117,101, 0, 2, 0, 0, 0, 6,102, +108,111,111,114, 0, 2, 0, 0, 0, 2, 32, 0, 2, 0, 0, 0, 4,105,117,112, + 0, 2, 0, 0, 0, 4, 82, 71, 66, 0, 2, 0, 0, 0, 18, 73,117,112, 82,101, +103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 4, 0, 0, 0,113, 0, 0, + 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 58, 10, 2, + 15, 2, 13, 0, 16, 44, 52, 43, 15, 4, 11, 5, 15, 6, 13, 1, 2, 1, 1, 42, + 2, 1, 1, 13, 2, 44, 52, 4, 15, 7, 23, 2, 15, 2, 13, 0, 22, 2, 11, 8, + 13, 2, 11, 0, 13, 0, 30, 1, 26, 5, 1, 13, 0, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, + 9,116,121,112,101,110, 97,109,101, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, + 97,110,100,108,101,115, 0, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 10,103,101,116,103,108,111, 98, 97,108, 0, 2, 0, 0, 0, 4, 73, 85, 80, 0, + 2, 0, 0, 0, 9,115,116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 15, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, + 0, 0, 12, 73,117,112, 71,101,116, 70,114,111,109, 67, 0, 4, 0, 0, 0,125, + 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 27, + 6, 1, 15, 2, 13, 0, 7, 1, 16, 2, 1, 1, 15, 3, 13, 1, 15, 4, 13, 1, + 2, 1, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, + 13, 73,117,112, 71,101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 18, 73, +117,112, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, 0, + 0, 16, 73,117,112, 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, 2, 0, + 0, 0, 9, 71,101,116, 70,114,111,109, 67, 0, 4, 0, 0, 0,130, 0, 0, 0, + 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 24, 6, 1, 15, + 2, 13, 0, 2, 1, 1, 15, 3, 13, 1, 15, 4, 13, 1, 2, 1, 1, 3, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 5,110, 97,109,101, 0, 2, + 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 13, 73,117,112, 71, +101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 18, 73,117,112, 82,101,103, +105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 16, 73,117,112, + 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/iuplua.lo"); +} diff --git a/iup/srclua3/loh/iuplua_be32.loh b/iup/srclua3/loh/iuplua_be32.loh new file mode 100755 index 0000000..2d41b1b --- /dev/null +++ b/iup/srclua3/loh/iuplua_be32.loh @@ -0,0 +1,170 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/iuplua_be32.lo"); +*/ +/* ../obj/iuplua3/iuplua_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64,105,117,112,108,117, + 97, 46,108,117, 97, 0, 0, 0, 0,122, 4, 0, 22, 0, 25, 0, 15, 1, 15, 2, + 11, 3, 15, 4, 2, 0, 3, 15, 1, 15, 2, 11, 5, 15, 6, 2, 0, 3, 15, 1, + 15, 7, 22, 0, 2, 1, 1, 11, 8, 15, 9, 2, 0, 3, 11, 11, 25, 10, 11, 13, + 25, 12, 11, 15, 25, 14, 11, 17, 25, 16, 11, 19, 25, 18, 11, 21, 25, 20, 11, 23, + 25, 22, 11, 25, 25, 24, 11, 27, 25, 26, 11, 29, 25, 28, 11, 31, 25, 30, 11, 33, + 25, 32, 15, 34, 11, 35, 15, 32, 26, 11, 37, 25, 36, 15, 34, 11, 38, 15, 36, 26, + 11, 40, 25, 39, 15, 34, 11, 41, 11, 42, 26, 0, 0, 0, 0, 0, 0, 0, 0, 43, + 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, + 0, 13,115,101,116,116, 97,103,109,101,116,104,111,100, 0, 2, 0, 0, 0, 11, +105,117,112,108,117, 97, 95,116, 97,103, 0, 2, 0, 0, 0, 9,103,101,116,116, + 97, 98,108,101, 0, 2, 0, 0, 0, 13,105,117,112, 95,103,101,116,116, 97, 98, +108,101, 0, 2, 0, 0, 0, 9,115,101,116,116, 97, 98,108,101, 0, 2, 0, 0, + 0, 13,105,117,112, 95,115,101,116,116, 97, 98,108,101, 0, 2, 0, 0, 0, 4, +116, 97,103, 0, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 10, +105,117,112, 95,105,110,100,101,120, 0, 2, 0, 0, 0, 7, 95, 65, 76, 69, 82, + 84, 0, 4, 0, 0, 0, 14, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108, +117, 97, 0, 0, 0, 0,125, 14, 1, 15, 2, 22, 3, 11, 3, 11, 4, 11, 5, 11, + 6, 11, 7, 11, 8, 30, 2, 2, 1, 1, 15, 10, 22, 4, 11, 11, 11, 12, 11, 13, + 11, 12, 11, 14, 13, 0, 11, 5, 11, 15, 30, 3, 2, 1, 1, 15, 17, 22, 5, 13, + 2, 13, 1, 29, 0, 2, 11, 18, 11, 19, 11, 20, 11, 21, 11, 22, 11, 23, 30, 2, + 2, 1, 1, 15, 25, 22, 5, 13, 3, 29, 0, 1, 11, 3, 11, 26, 11, 27, 13, 1, + 11, 28, 13, 1, 11, 29, 13, 1, 30, 3, 2, 1, 1, 13, 4, 20, 30, 15, 31, 15, + 31, 2, 0, 3, 13, 4, 20, 32, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 33, + 2, 0, 0, 0, 2,115, 0, 2, 0, 0, 0, 3, 98,116, 0, 2, 0, 0, 0, 10, +105,117,112, 98,117,116,116,111,110, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 2, 0, 0, 0, 3, 79,107, 0, 2, 0, 0, 0, 5,115,105,122,101, 0, 2, + 0, 0, 0, 3, 54, 48, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, + 0, 0, 0, 17,114,101,116,117,114,110, 32, 73, 85, 80, 95, 67, 76, 79, 83, 69, + 0, 2, 0, 0, 0, 3,109,108, 0, 2, 0, 0, 0, 13,105,117,112,109,117,108, +116,105,108,105,110,101, 0, 2, 0, 0, 0, 7,101,120,112, 97,110,100, 0, 2, + 0, 0, 0, 4, 89, 69, 83, 0, 2, 0, 0, 0, 9,114,101, 97,100,111,110,108, +121, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 8, 51, 48, + 48,120, 49, 53, 48, 0, 2, 0, 0, 0, 3,118, 98, 0, 2, 0, 0, 0, 8,105, +117,112,118, 98,111,120, 0, 2, 0, 0, 0, 10, 97,108,105,103,110,109,101,110, +116, 0, 2, 0, 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 7, +109, 97,114,103,105,110, 0, 2, 0, 0, 0, 6, 49, 48,120, 49, 48, 0, 2, 0, + 0, 0, 4,103, 97,112, 0, 2, 0, 0, 0, 3, 49, 48, 0, 2, 0, 0, 0, 3, +100,103, 0, 2, 0, 0, 0, 10,105,117,112,100,105, 97,108,111,103, 0, 2, 0, + 0, 0, 10, 76,117, 97, 32, 69,114,114,111,114, 0, 2, 0, 0, 0, 11,100,101, +102, 97,117,108,116,101,115, 99, 0, 2, 0, 0, 0, 13,100,101,102, 97,117,108, +116,101,110,116,101,114, 0, 2, 0, 0, 0, 11,115,116, 97,114,116,102,111, 99, +117,115, 0, 2, 0, 0, 0, 6,112,111,112,117,112, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 95, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 8,100,101,115,116,114, +111,121, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, + 4, 0, 0, 0, 23, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, + 0, 0, 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5, +116,121,112,101, 0, 2, 0, 0, 0, 7,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,110,117,109, 98,101,114, 0, 4, 0, 0, 0, 27, 0, + 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 15, 3, + 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, + 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 9,116,121,112,101, + 95,110,105,108, 0, 4, 0, 0, 0, 31, 0, 0, 0, 12, 64,105,117,112,108,117, + 97, 46,108,117, 97, 0, 0, 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, + 2, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 4,110,105,108, 0, 2, + 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99,116,105,111,110, 0, 4, 0, + 0, 0, 35, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, + 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,116,121, +112,101, 0, 2, 0, 0, 0, 9,102,117,110, 99,116,105,111,110, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 0, 39, 0, + 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 20, 3, + 1, 13, 0, 52, 9, 15, 1, 13, 0, 16, 1, 1, 50, 4, 4, 0, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2,119, 0, 2, 0, 0, 0, 12,105, +117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, 0, 10,116,121,112,101, + 95,109,101,110,117, 0, 4, 0, 0, 0, 47, 0, 0, 0, 12, 64,105,117,112,108, +117, 97, 46,108,117, 97, 0, 0, 0, 0, 21, 3, 1, 15, 1, 13, 0, 2, 1, 1, + 48, 7, 13, 0, 18, 2, 15, 3, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100, +103,101,116, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 77, 69, 78, 85, 0, 2, 0, 0, 0, 10,116,121,112,101, 95,105, +116,101,109, 0, 4, 0, 0, 0, 51, 0, 0, 0, 12, 64,105,117,112,108,117, 97, + 46,108,117, 97, 0, 0, 0, 0, 39, 3, 1, 15, 1, 13, 0, 2, 1, 1, 48, 25, + 13, 0, 18, 2, 15, 3, 32, 46, 7, 13, 0, 18, 2, 15, 4, 32, 46, 7, 13, 0, + 18, 2, 15, 5, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 73, 84, 69, 77, 0, 2, 0, 0, 0, 11, 73, 85, 80, 83, 85, 66, 77, 69, 78, 85, + 0, 2, 0, 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 2, + 0, 0, 0, 14,105,117,112, 67, 97,108,108, 77,101,116,104,111,100, 0, 4, 0, + 0, 0, 55, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, + 0, 0,105, 7,129, 13, 1, 7, 1, 16, 13, 2, 13, 0, 16, 13, 3, 44, 52, 29, + 15, 5, 15, 6, 13, 0, 16, 7, 1, 16, 2, 1, 1, 13, 2, 13, 4, 16, 23, 3, + 13, 3, 44, 52, 2, 1, 5, 5, 1, 15, 7, 13, 3, 2, 1, 1, 52, 11, 15, 8, + 13, 3, 13, 1, 3, 4, 2, 50, 38, 15, 9, 13, 3, 2, 1, 1, 52, 25, 15, 11, + 13, 2, 25, 11, 15, 13, 13, 3, 2, 1, 1, 13, 4, 25, 11, 13, 5, 1, 6, 5, + 2, 50, 4, 15, 14, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 15, 2, 0, 0, 0, + 5,110, 97,109,101, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, + 0, 0, 4, 97,114,103, 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, 0, 0, + 0, 10,102,117,108,108, 95,110, 97,109,101, 0, 2, 0, 0, 0, 9,115,116,114, +108,111,119,101,114, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, + 97, 99,107,115, 0, 2, 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99,116, +105,111,110, 0, 2, 0, 0, 0, 5, 99, 97,108,108, 0, 2, 0, 0, 0, 12,116, +121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 5,116,101,109,112, + 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 7,114,101,115,117, +108,116, 0, 2, 0, 0, 0, 9,100,111,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 10, 73, 85, 80, 95, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 11,105,117,112, + 83,101,116, 78, 97,109,101, 0, 4, 0, 0, 0, 81, 0, 0, 0, 12, 64,105,117, +112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 51, 7, 1, 15, 1, 15, 2, 13, + 0, 16, 18, 3, 2, 1, 1, 44, 52, 33, 15, 2, 13, 0, 16, 11, 3, 15, 4, 11, + 5, 15, 6, 13, 0, 2, 1, 1, 2, 1, 2, 26, 15, 7, 13, 0, 18, 3, 13, 0, + 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 7,104, 97,110, +100,108,101, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, + 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 95,110, 97,109,101, 0, 2, 0, 0, 0, 7,102,111,114, +109, 97,116, 0, 2, 0, 0, 0, 17, 95, 73, 85, 80, 76, 85, 65, 95, 78, 65, 77, + 69, 40, 37,115, 41, 0, 2, 0, 0, 0, 9,116,111,115,116,114,105,110,103, 0, + 2, 0, 0, 0, 13, 73,117,112, 83,101,116, 72, 97,110,100,108,101, 0, 2, 0, + 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 4, 0, 0, 0, 88, 0, 0, 0, 12, 64,105,117,112,108, +117, 97, 46,108,117, 97, 0, 0, 0, 0, 74, 5, 1, 13, 0, 18, 1, 18, 1, 15, + 2, 32, 52, 32, 7, 1, 50, 17, 15, 4, 13, 0, 13, 1, 16, 2, 0, 1, 13, 1, + 7, 1, 37, 23, 1, 13, 0, 13, 1, 16, 54, 24, 5, 1, 50, 28, 13, 0, 18, 1, + 15, 5, 32, 52, 12, 15, 4, 13, 0, 7, 1, 16, 2, 0, 1, 50, 7, 15, 6, 13, + 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 12, 67, + 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, + 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, + 2, 0, 0, 0, 11,105,117,112, 83,101,116, 78, 97,109,101, 0, 2, 0, 0, 0, + 7, 73,117,112, 82, 71, 66, 0, 4, 0, 0, 0,108, 0, 0, 0, 12, 64,105,117, +112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 43, 7, 3, 15, 3, 13, 0, 7, +255, 39, 2, 1, 1, 11, 4, 42, 15, 3, 13, 1, 7,255, 39, 2, 1, 1, 42, 11, + 4, 42, 15, 3, 13, 2, 7,255, 39, 2, 1, 1, 42, 1, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 2, 0, 0, 0, 4,114,101,100, 0, 2, 0, 0, 0, 6,103,114, +101,101,110, 0, 2, 0, 0, 0, 5, 98,108,117,101, 0, 2, 0, 0, 0, 6,102, +108,111,111,114, 0, 2, 0, 0, 0, 2, 32, 0, 2, 0, 0, 0, 4,105,117,112, + 0, 2, 0, 0, 0, 4, 82, 71, 66, 0, 2, 0, 0, 0, 18, 73,117,112, 82,101, +103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 4, 0, 0, 0,113, 0, 0, + 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 58, 10, 2, + 15, 2, 13, 0, 16, 44, 52, 43, 15, 4, 11, 5, 15, 6, 13, 1, 2, 1, 1, 42, + 2, 1, 1, 13, 2, 44, 52, 4, 15, 7, 23, 2, 15, 2, 13, 0, 22, 2, 11, 8, + 13, 2, 11, 0, 13, 0, 30, 1, 26, 5, 1, 13, 0, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, + 9,116,121,112,101,110, 97,109,101, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, + 97,110,100,108,101,115, 0, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 10,103,101,116,103,108,111, 98, 97,108, 0, 2, 0, 0, 0, 4, 73, 85, 80, 0, + 2, 0, 0, 0, 9,115,116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 15, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, + 0, 0, 12, 73,117,112, 71,101,116, 70,114,111,109, 67, 0, 4, 0, 0, 0,125, + 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 27, + 6, 1, 15, 2, 13, 0, 7, 1, 16, 2, 1, 1, 15, 3, 13, 1, 15, 4, 13, 1, + 2, 1, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, + 13, 73,117,112, 71,101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 18, 73, +117,112, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, 0, + 0, 16, 73,117,112, 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, 2, 0, + 0, 0, 9, 71,101,116, 70,114,111,109, 67, 0, 4, 0, 0, 0,130, 0, 0, 0, + 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 24, 6, 1, 15, + 2, 13, 0, 2, 1, 1, 15, 3, 13, 1, 15, 4, 13, 1, 2, 1, 1, 3, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 5,110, 97,109,101, 0, 2, + 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 13, 73,117,112, 71, +101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 18, 73,117,112, 82,101,103, +105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 16, 73,117,112, + 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/iuplua_be32.lo"); +} diff --git a/iup/srclua3/loh/iuplua_be64.loh b/iup/srclua3/loh/iuplua_be64.loh new file mode 100755 index 0000000..f9f7162 --- /dev/null +++ b/iup/srclua3/loh/iuplua_be64.loh @@ -0,0 +1,170 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/iuplua_be64.lo"); +*/ +/* ../obj/iuplua3/iuplua_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64,105,117,112,108,117, + 97, 46,108,117, 97, 0, 0, 0, 0,122, 4, 0, 22, 0, 25, 0, 15, 1, 15, 2, + 11, 3, 15, 4, 2, 0, 3, 15, 1, 15, 2, 11, 5, 15, 6, 2, 0, 3, 15, 1, + 15, 7, 22, 0, 2, 1, 1, 11, 8, 15, 9, 2, 0, 3, 11, 11, 25, 10, 11, 13, + 25, 12, 11, 15, 25, 14, 11, 17, 25, 16, 11, 19, 25, 18, 11, 21, 25, 20, 11, 23, + 25, 22, 11, 25, 25, 24, 11, 27, 25, 26, 11, 29, 25, 28, 11, 31, 25, 30, 11, 33, + 25, 32, 15, 34, 11, 35, 15, 32, 26, 11, 37, 25, 36, 15, 34, 11, 38, 15, 36, 26, + 11, 40, 25, 39, 15, 34, 11, 41, 11, 42, 26, 0, 0, 0, 0, 0, 0, 0, 0, 43, + 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, + 0, 13,115,101,116,116, 97,103,109,101,116,104,111,100, 0, 2, 0, 0, 0, 11, +105,117,112,108,117, 97, 95,116, 97,103, 0, 2, 0, 0, 0, 9,103,101,116,116, + 97, 98,108,101, 0, 2, 0, 0, 0, 13,105,117,112, 95,103,101,116,116, 97, 98, +108,101, 0, 2, 0, 0, 0, 9,115,101,116,116, 97, 98,108,101, 0, 2, 0, 0, + 0, 13,105,117,112, 95,115,101,116,116, 97, 98,108,101, 0, 2, 0, 0, 0, 4, +116, 97,103, 0, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 10, +105,117,112, 95,105,110,100,101,120, 0, 2, 0, 0, 0, 7, 95, 65, 76, 69, 82, + 84, 0, 4, 0, 0, 0, 14, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108, +117, 97, 0, 0, 0, 0,125, 14, 1, 15, 2, 22, 3, 11, 3, 11, 4, 11, 5, 11, + 6, 11, 7, 11, 8, 30, 2, 2, 1, 1, 15, 10, 22, 4, 11, 11, 11, 12, 11, 13, + 11, 12, 11, 14, 13, 0, 11, 5, 11, 15, 30, 3, 2, 1, 1, 15, 17, 22, 5, 13, + 2, 13, 1, 29, 0, 2, 11, 18, 11, 19, 11, 20, 11, 21, 11, 22, 11, 23, 30, 2, + 2, 1, 1, 15, 25, 22, 5, 13, 3, 29, 0, 1, 11, 3, 11, 26, 11, 27, 13, 1, + 11, 28, 13, 1, 11, 29, 13, 1, 30, 3, 2, 1, 1, 13, 4, 20, 30, 15, 31, 15, + 31, 2, 0, 3, 13, 4, 20, 32, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 33, + 2, 0, 0, 0, 2,115, 0, 2, 0, 0, 0, 3, 98,116, 0, 2, 0, 0, 0, 10, +105,117,112, 98,117,116,116,111,110, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 2, 0, 0, 0, 3, 79,107, 0, 2, 0, 0, 0, 5,115,105,122,101, 0, 2, + 0, 0, 0, 3, 54, 48, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, + 0, 0, 0, 17,114,101,116,117,114,110, 32, 73, 85, 80, 95, 67, 76, 79, 83, 69, + 0, 2, 0, 0, 0, 3,109,108, 0, 2, 0, 0, 0, 13,105,117,112,109,117,108, +116,105,108,105,110,101, 0, 2, 0, 0, 0, 7,101,120,112, 97,110,100, 0, 2, + 0, 0, 0, 4, 89, 69, 83, 0, 2, 0, 0, 0, 9,114,101, 97,100,111,110,108, +121, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 8, 51, 48, + 48,120, 49, 53, 48, 0, 2, 0, 0, 0, 3,118, 98, 0, 2, 0, 0, 0, 8,105, +117,112,118, 98,111,120, 0, 2, 0, 0, 0, 10, 97,108,105,103,110,109,101,110, +116, 0, 2, 0, 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 7, +109, 97,114,103,105,110, 0, 2, 0, 0, 0, 6, 49, 48,120, 49, 48, 0, 2, 0, + 0, 0, 4,103, 97,112, 0, 2, 0, 0, 0, 3, 49, 48, 0, 2, 0, 0, 0, 3, +100,103, 0, 2, 0, 0, 0, 10,105,117,112,100,105, 97,108,111,103, 0, 2, 0, + 0, 0, 10, 76,117, 97, 32, 69,114,114,111,114, 0, 2, 0, 0, 0, 11,100,101, +102, 97,117,108,116,101,115, 99, 0, 2, 0, 0, 0, 13,100,101,102, 97,117,108, +116,101,110,116,101,114, 0, 2, 0, 0, 0, 11,115,116, 97,114,116,102,111, 99, +117,115, 0, 2, 0, 0, 0, 6,112,111,112,117,112, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 95, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 8,100,101,115,116,114, +111,121, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, + 4, 0, 0, 0, 23, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, + 0, 0, 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5, +116,121,112,101, 0, 2, 0, 0, 0, 7,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,110,117,109, 98,101,114, 0, 4, 0, 0, 0, 27, 0, + 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 15, 3, + 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, + 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 9,116,121,112,101, + 95,110,105,108, 0, 4, 0, 0, 0, 31, 0, 0, 0, 12, 64,105,117,112,108,117, + 97, 46,108,117, 97, 0, 0, 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, + 2, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 4,110,105,108, 0, 2, + 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99,116,105,111,110, 0, 4, 0, + 0, 0, 35, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, + 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,116,121, +112,101, 0, 2, 0, 0, 0, 9,102,117,110, 99,116,105,111,110, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 0, 39, 0, + 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 20, 3, + 1, 13, 0, 52, 9, 15, 1, 13, 0, 16, 1, 1, 50, 4, 4, 0, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2,119, 0, 2, 0, 0, 0, 12,105, +117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, 0, 10,116,121,112,101, + 95,109,101,110,117, 0, 4, 0, 0, 0, 47, 0, 0, 0, 12, 64,105,117,112,108, +117, 97, 46,108,117, 97, 0, 0, 0, 0, 21, 3, 1, 15, 1, 13, 0, 2, 1, 1, + 48, 7, 13, 0, 18, 2, 15, 3, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100, +103,101,116, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 77, 69, 78, 85, 0, 2, 0, 0, 0, 10,116,121,112,101, 95,105, +116,101,109, 0, 4, 0, 0, 0, 51, 0, 0, 0, 12, 64,105,117,112,108,117, 97, + 46,108,117, 97, 0, 0, 0, 0, 39, 3, 1, 15, 1, 13, 0, 2, 1, 1, 48, 25, + 13, 0, 18, 2, 15, 3, 32, 46, 7, 13, 0, 18, 2, 15, 4, 32, 46, 7, 13, 0, + 18, 2, 15, 5, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 73, 84, 69, 77, 0, 2, 0, 0, 0, 11, 73, 85, 80, 83, 85, 66, 77, 69, 78, 85, + 0, 2, 0, 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 2, + 0, 0, 0, 14,105,117,112, 67, 97,108,108, 77,101,116,104,111,100, 0, 4, 0, + 0, 0, 55, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, + 0, 0,105, 7,129, 13, 1, 7, 1, 16, 13, 2, 13, 0, 16, 13, 3, 44, 52, 29, + 15, 5, 15, 6, 13, 0, 16, 7, 1, 16, 2, 1, 1, 13, 2, 13, 4, 16, 23, 3, + 13, 3, 44, 52, 2, 1, 5, 5, 1, 15, 7, 13, 3, 2, 1, 1, 52, 11, 15, 8, + 13, 3, 13, 1, 3, 4, 2, 50, 38, 15, 9, 13, 3, 2, 1, 1, 52, 25, 15, 11, + 13, 2, 25, 11, 15, 13, 13, 3, 2, 1, 1, 13, 4, 25, 11, 13, 5, 1, 6, 5, + 2, 50, 4, 15, 14, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 15, 2, 0, 0, 0, + 5,110, 97,109,101, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, + 0, 0, 4, 97,114,103, 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, 0, 0, + 0, 10,102,117,108,108, 95,110, 97,109,101, 0, 2, 0, 0, 0, 9,115,116,114, +108,111,119,101,114, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, + 97, 99,107,115, 0, 2, 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99,116, +105,111,110, 0, 2, 0, 0, 0, 5, 99, 97,108,108, 0, 2, 0, 0, 0, 12,116, +121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 5,116,101,109,112, + 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 7,114,101,115,117, +108,116, 0, 2, 0, 0, 0, 9,100,111,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 10, 73, 85, 80, 95, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 11,105,117,112, + 83,101,116, 78, 97,109,101, 0, 4, 0, 0, 0, 81, 0, 0, 0, 12, 64,105,117, +112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 51, 7, 1, 15, 1, 15, 2, 13, + 0, 16, 18, 3, 2, 1, 1, 44, 52, 33, 15, 2, 13, 0, 16, 11, 3, 15, 4, 11, + 5, 15, 6, 13, 0, 2, 1, 1, 2, 1, 2, 26, 15, 7, 13, 0, 18, 3, 13, 0, + 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 7,104, 97,110, +100,108,101, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, + 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 95,110, 97,109,101, 0, 2, 0, 0, 0, 7,102,111,114, +109, 97,116, 0, 2, 0, 0, 0, 17, 95, 73, 85, 80, 76, 85, 65, 95, 78, 65, 77, + 69, 40, 37,115, 41, 0, 2, 0, 0, 0, 9,116,111,115,116,114,105,110,103, 0, + 2, 0, 0, 0, 13, 73,117,112, 83,101,116, 72, 97,110,100,108,101, 0, 2, 0, + 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 4, 0, 0, 0, 88, 0, 0, 0, 12, 64,105,117,112,108, +117, 97, 46,108,117, 97, 0, 0, 0, 0, 74, 5, 1, 13, 0, 18, 1, 18, 1, 15, + 2, 32, 52, 32, 7, 1, 50, 17, 15, 4, 13, 0, 13, 1, 16, 2, 0, 1, 13, 1, + 7, 1, 37, 23, 1, 13, 0, 13, 1, 16, 54, 24, 5, 1, 50, 28, 13, 0, 18, 1, + 15, 5, 32, 52, 12, 15, 4, 13, 0, 7, 1, 16, 2, 0, 1, 50, 7, 15, 6, 13, + 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 12, 67, + 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, + 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, + 2, 0, 0, 0, 11,105,117,112, 83,101,116, 78, 97,109,101, 0, 2, 0, 0, 0, + 7, 73,117,112, 82, 71, 66, 0, 4, 0, 0, 0,108, 0, 0, 0, 12, 64,105,117, +112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 43, 7, 3, 15, 3, 13, 0, 7, +255, 39, 2, 1, 1, 11, 4, 42, 15, 3, 13, 1, 7,255, 39, 2, 1, 1, 42, 11, + 4, 42, 15, 3, 13, 2, 7,255, 39, 2, 1, 1, 42, 1, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 2, 0, 0, 0, 4,114,101,100, 0, 2, 0, 0, 0, 6,103,114, +101,101,110, 0, 2, 0, 0, 0, 5, 98,108,117,101, 0, 2, 0, 0, 0, 6,102, +108,111,111,114, 0, 2, 0, 0, 0, 2, 32, 0, 2, 0, 0, 0, 4,105,117,112, + 0, 2, 0, 0, 0, 4, 82, 71, 66, 0, 2, 0, 0, 0, 18, 73,117,112, 82,101, +103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 4, 0, 0, 0,113, 0, 0, + 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 58, 10, 2, + 15, 2, 13, 0, 16, 44, 52, 43, 15, 4, 11, 5, 15, 6, 13, 1, 2, 1, 1, 42, + 2, 1, 1, 13, 2, 44, 52, 4, 15, 7, 23, 2, 15, 2, 13, 0, 22, 2, 11, 8, + 13, 2, 11, 0, 13, 0, 30, 1, 26, 5, 1, 13, 0, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, + 9,116,121,112,101,110, 97,109,101, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, + 97,110,100,108,101,115, 0, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 10,103,101,116,103,108,111, 98, 97,108, 0, 2, 0, 0, 0, 4, 73, 85, 80, 0, + 2, 0, 0, 0, 9,115,116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 15, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, + 0, 0, 12, 73,117,112, 71,101,116, 70,114,111,109, 67, 0, 4, 0, 0, 0,125, + 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 27, + 6, 1, 15, 2, 13, 0, 7, 1, 16, 2, 1, 1, 15, 3, 13, 1, 15, 4, 13, 1, + 2, 1, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, + 13, 73,117,112, 71,101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 18, 73, +117,112, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, 0, + 0, 16, 73,117,112, 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, 2, 0, + 0, 0, 9, 71,101,116, 70,114,111,109, 67, 0, 4, 0, 0, 0,130, 0, 0, 0, + 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 24, 6, 1, 15, + 2, 13, 0, 2, 1, 1, 15, 3, 13, 1, 15, 4, 13, 1, 2, 1, 1, 3, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 5,110, 97,109,101, 0, 2, + 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 13, 73,117,112, 71, +101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 18, 73,117,112, 82,101,103, +105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 16, 73,117,112, + 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/iuplua_be64.lo"); +} diff --git a/iup/srclua3/loh/iuplua_le64.loh b/iup/srclua3/loh/iuplua_le64.loh new file mode 100755 index 0000000..0e58b29 --- /dev/null +++ b/iup/srclua3/loh/iuplua_le64.loh @@ -0,0 +1,170 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/iuplua_le64.lo"); +*/ +/* ../obj/iuplua3/iuplua_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64,105,117,112,108,117, + 97, 46,108,117, 97, 0, 0, 0, 0,122, 4, 0, 22, 0, 25, 0, 15, 1, 15, 2, + 11, 3, 15, 4, 2, 0, 3, 15, 1, 15, 2, 11, 5, 15, 6, 2, 0, 3, 15, 1, + 15, 7, 22, 0, 2, 1, 1, 11, 8, 15, 9, 2, 0, 3, 11, 11, 25, 10, 11, 13, + 25, 12, 11, 15, 25, 14, 11, 17, 25, 16, 11, 19, 25, 18, 11, 21, 25, 20, 11, 23, + 25, 22, 11, 25, 25, 24, 11, 27, 25, 26, 11, 29, 25, 28, 11, 31, 25, 30, 11, 33, + 25, 32, 15, 34, 11, 35, 15, 32, 26, 11, 37, 25, 36, 15, 34, 11, 38, 15, 36, 26, + 11, 40, 25, 39, 15, 34, 11, 41, 11, 42, 26, 0, 0, 0, 0, 0, 0, 0, 0, 43, + 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, + 0, 13,115,101,116,116, 97,103,109,101,116,104,111,100, 0, 2, 0, 0, 0, 11, +105,117,112,108,117, 97, 95,116, 97,103, 0, 2, 0, 0, 0, 9,103,101,116,116, + 97, 98,108,101, 0, 2, 0, 0, 0, 13,105,117,112, 95,103,101,116,116, 97, 98, +108,101, 0, 2, 0, 0, 0, 9,115,101,116,116, 97, 98,108,101, 0, 2, 0, 0, + 0, 13,105,117,112, 95,115,101,116,116, 97, 98,108,101, 0, 2, 0, 0, 0, 4, +116, 97,103, 0, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 10, +105,117,112, 95,105,110,100,101,120, 0, 2, 0, 0, 0, 7, 95, 65, 76, 69, 82, + 84, 0, 4, 0, 0, 0, 14, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108, +117, 97, 0, 0, 0, 0,125, 14, 1, 15, 2, 22, 3, 11, 3, 11, 4, 11, 5, 11, + 6, 11, 7, 11, 8, 30, 2, 2, 1, 1, 15, 10, 22, 4, 11, 11, 11, 12, 11, 13, + 11, 12, 11, 14, 13, 0, 11, 5, 11, 15, 30, 3, 2, 1, 1, 15, 17, 22, 5, 13, + 2, 13, 1, 29, 0, 2, 11, 18, 11, 19, 11, 20, 11, 21, 11, 22, 11, 23, 30, 2, + 2, 1, 1, 15, 25, 22, 5, 13, 3, 29, 0, 1, 11, 3, 11, 26, 11, 27, 13, 1, + 11, 28, 13, 1, 11, 29, 13, 1, 30, 3, 2, 1, 1, 13, 4, 20, 30, 15, 31, 15, + 31, 2, 0, 3, 13, 4, 20, 32, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 33, + 2, 0, 0, 0, 2,115, 0, 2, 0, 0, 0, 3, 98,116, 0, 2, 0, 0, 0, 10, +105,117,112, 98,117,116,116,111,110, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 2, 0, 0, 0, 3, 79,107, 0, 2, 0, 0, 0, 5,115,105,122,101, 0, 2, + 0, 0, 0, 3, 54, 48, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, + 0, 0, 0, 17,114,101,116,117,114,110, 32, 73, 85, 80, 95, 67, 76, 79, 83, 69, + 0, 2, 0, 0, 0, 3,109,108, 0, 2, 0, 0, 0, 13,105,117,112,109,117,108, +116,105,108,105,110,101, 0, 2, 0, 0, 0, 7,101,120,112, 97,110,100, 0, 2, + 0, 0, 0, 4, 89, 69, 83, 0, 2, 0, 0, 0, 9,114,101, 97,100,111,110,108, +121, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 8, 51, 48, + 48,120, 49, 53, 48, 0, 2, 0, 0, 0, 3,118, 98, 0, 2, 0, 0, 0, 8,105, +117,112,118, 98,111,120, 0, 2, 0, 0, 0, 10, 97,108,105,103,110,109,101,110, +116, 0, 2, 0, 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 7, +109, 97,114,103,105,110, 0, 2, 0, 0, 0, 6, 49, 48,120, 49, 48, 0, 2, 0, + 0, 0, 4,103, 97,112, 0, 2, 0, 0, 0, 3, 49, 48, 0, 2, 0, 0, 0, 3, +100,103, 0, 2, 0, 0, 0, 10,105,117,112,100,105, 97,108,111,103, 0, 2, 0, + 0, 0, 10, 76,117, 97, 32, 69,114,114,111,114, 0, 2, 0, 0, 0, 11,100,101, +102, 97,117,108,116,101,115, 99, 0, 2, 0, 0, 0, 13,100,101,102, 97,117,108, +116,101,110,116,101,114, 0, 2, 0, 0, 0, 11,115,116, 97,114,116,102,111, 99, +117,115, 0, 2, 0, 0, 0, 6,112,111,112,117,112, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 95, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 8,100,101,115,116,114, +111,121, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, + 4, 0, 0, 0, 23, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, + 0, 0, 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5, +116,121,112,101, 0, 2, 0, 0, 0, 7,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,110,117,109, 98,101,114, 0, 4, 0, 0, 0, 27, 0, + 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 15, 3, + 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, + 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 9,116,121,112,101, + 95,110,105,108, 0, 4, 0, 0, 0, 31, 0, 0, 0, 12, 64,105,117,112,108,117, + 97, 46,108,117, 97, 0, 0, 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, + 2, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 4,110,105,108, 0, 2, + 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99,116,105,111,110, 0, 4, 0, + 0, 0, 35, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, + 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,116,121, +112,101, 0, 2, 0, 0, 0, 9,102,117,110, 99,116,105,111,110, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 0, 39, 0, + 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 20, 3, + 1, 13, 0, 52, 9, 15, 1, 13, 0, 16, 1, 1, 50, 4, 4, 0, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2,119, 0, 2, 0, 0, 0, 12,105, +117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, 0, 10,116,121,112,101, + 95,109,101,110,117, 0, 4, 0, 0, 0, 47, 0, 0, 0, 12, 64,105,117,112,108, +117, 97, 46,108,117, 97, 0, 0, 0, 0, 21, 3, 1, 15, 1, 13, 0, 2, 1, 1, + 48, 7, 13, 0, 18, 2, 15, 3, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100, +103,101,116, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 77, 69, 78, 85, 0, 2, 0, 0, 0, 10,116,121,112,101, 95,105, +116,101,109, 0, 4, 0, 0, 0, 51, 0, 0, 0, 12, 64,105,117,112,108,117, 97, + 46,108,117, 97, 0, 0, 0, 0, 39, 3, 1, 15, 1, 13, 0, 2, 1, 1, 48, 25, + 13, 0, 18, 2, 15, 3, 32, 46, 7, 13, 0, 18, 2, 15, 4, 32, 46, 7, 13, 0, + 18, 2, 15, 5, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 73, 84, 69, 77, 0, 2, 0, 0, 0, 11, 73, 85, 80, 83, 85, 66, 77, 69, 78, 85, + 0, 2, 0, 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 2, + 0, 0, 0, 14,105,117,112, 67, 97,108,108, 77,101,116,104,111,100, 0, 4, 0, + 0, 0, 55, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, + 0, 0,105, 7,129, 13, 1, 7, 1, 16, 13, 2, 13, 0, 16, 13, 3, 44, 52, 29, + 15, 5, 15, 6, 13, 0, 16, 7, 1, 16, 2, 1, 1, 13, 2, 13, 4, 16, 23, 3, + 13, 3, 44, 52, 2, 1, 5, 5, 1, 15, 7, 13, 3, 2, 1, 1, 52, 11, 15, 8, + 13, 3, 13, 1, 3, 4, 2, 50, 38, 15, 9, 13, 3, 2, 1, 1, 52, 25, 15, 11, + 13, 2, 25, 11, 15, 13, 13, 3, 2, 1, 1, 13, 4, 25, 11, 13, 5, 1, 6, 5, + 2, 50, 4, 15, 14, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 15, 2, 0, 0, 0, + 5,110, 97,109,101, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, + 0, 0, 4, 97,114,103, 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, 0, 0, + 0, 10,102,117,108,108, 95,110, 97,109,101, 0, 2, 0, 0, 0, 9,115,116,114, +108,111,119,101,114, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, + 97, 99,107,115, 0, 2, 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99,116, +105,111,110, 0, 2, 0, 0, 0, 5, 99, 97,108,108, 0, 2, 0, 0, 0, 12,116, +121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 5,116,101,109,112, + 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 7,114,101,115,117, +108,116, 0, 2, 0, 0, 0, 9,100,111,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 10, 73, 85, 80, 95, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 11,105,117,112, + 83,101,116, 78, 97,109,101, 0, 4, 0, 0, 0, 81, 0, 0, 0, 12, 64,105,117, +112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 51, 7, 1, 15, 1, 15, 2, 13, + 0, 16, 18, 3, 2, 1, 1, 44, 52, 33, 15, 2, 13, 0, 16, 11, 3, 15, 4, 11, + 5, 15, 6, 13, 0, 2, 1, 1, 2, 1, 2, 26, 15, 7, 13, 0, 18, 3, 13, 0, + 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 7,104, 97,110, +100,108,101, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, + 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 95,110, 97,109,101, 0, 2, 0, 0, 0, 7,102,111,114, +109, 97,116, 0, 2, 0, 0, 0, 17, 95, 73, 85, 80, 76, 85, 65, 95, 78, 65, 77, + 69, 40, 37,115, 41, 0, 2, 0, 0, 0, 9,116,111,115,116,114,105,110,103, 0, + 2, 0, 0, 0, 13, 73,117,112, 83,101,116, 72, 97,110,100,108,101, 0, 2, 0, + 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 4, 0, 0, 0, 88, 0, 0, 0, 12, 64,105,117,112,108, +117, 97, 46,108,117, 97, 0, 0, 0, 0, 74, 5, 1, 13, 0, 18, 1, 18, 1, 15, + 2, 32, 52, 32, 7, 1, 50, 17, 15, 4, 13, 0, 13, 1, 16, 2, 0, 1, 13, 1, + 7, 1, 37, 23, 1, 13, 0, 13, 1, 16, 54, 24, 5, 1, 50, 28, 13, 0, 18, 1, + 15, 5, 32, 52, 12, 15, 4, 13, 0, 7, 1, 16, 2, 0, 1, 50, 7, 15, 6, 13, + 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 12, 67, + 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, + 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, + 2, 0, 0, 0, 11,105,117,112, 83,101,116, 78, 97,109,101, 0, 2, 0, 0, 0, + 7, 73,117,112, 82, 71, 66, 0, 4, 0, 0, 0,108, 0, 0, 0, 12, 64,105,117, +112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 43, 7, 3, 15, 3, 13, 0, 7, +255, 39, 2, 1, 1, 11, 4, 42, 15, 3, 13, 1, 7,255, 39, 2, 1, 1, 42, 11, + 4, 42, 15, 3, 13, 2, 7,255, 39, 2, 1, 1, 42, 1, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 2, 0, 0, 0, 4,114,101,100, 0, 2, 0, 0, 0, 6,103,114, +101,101,110, 0, 2, 0, 0, 0, 5, 98,108,117,101, 0, 2, 0, 0, 0, 6,102, +108,111,111,114, 0, 2, 0, 0, 0, 2, 32, 0, 2, 0, 0, 0, 4,105,117,112, + 0, 2, 0, 0, 0, 4, 82, 71, 66, 0, 2, 0, 0, 0, 18, 73,117,112, 82,101, +103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 4, 0, 0, 0,113, 0, 0, + 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 58, 10, 2, + 15, 2, 13, 0, 16, 44, 52, 43, 15, 4, 11, 5, 15, 6, 13, 1, 2, 1, 1, 42, + 2, 1, 1, 13, 2, 44, 52, 4, 15, 7, 23, 2, 15, 2, 13, 0, 22, 2, 11, 8, + 13, 2, 11, 0, 13, 0, 30, 1, 26, 5, 1, 13, 0, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, + 9,116,121,112,101,110, 97,109,101, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, + 97,110,100,108,101,115, 0, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 10,103,101,116,103,108,111, 98, 97,108, 0, 2, 0, 0, 0, 4, 73, 85, 80, 0, + 2, 0, 0, 0, 9,115,116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 15, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, + 0, 0, 12, 73,117,112, 71,101,116, 70,114,111,109, 67, 0, 4, 0, 0, 0,125, + 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 27, + 6, 1, 15, 2, 13, 0, 7, 1, 16, 2, 1, 1, 15, 3, 13, 1, 15, 4, 13, 1, + 2, 1, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, + 13, 73,117,112, 71,101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 18, 73, +117,112, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, 0, + 0, 16, 73,117,112, 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, 2, 0, + 0, 0, 9, 71,101,116, 70,114,111,109, 67, 0, 4, 0, 0, 0,130, 0, 0, 0, + 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 24, 6, 1, 15, + 2, 13, 0, 2, 1, 1, 15, 3, 13, 1, 15, 4, 13, 1, 2, 1, 1, 3, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 5,110, 97,109,101, 0, 2, + 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 13, 73,117,112, 71, +101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 18, 73,117,112, 82,101,103, +105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 16, 73,117,112, + 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/iuplua_le64.lo"); +} diff --git a/iup/srclua3/loh/iuplua_le64w.loh b/iup/srclua3/loh/iuplua_le64w.loh new file mode 100755 index 0000000..6755c03 --- /dev/null +++ b/iup/srclua3/loh/iuplua_le64w.loh @@ -0,0 +1,170 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/iuplua_le64w.lo"); +*/ +/* ../obj/iuplua3/iuplua_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64,105,117,112,108,117, + 97, 46,108,117, 97, 0, 0, 0, 0,122, 4, 0, 22, 0, 25, 0, 15, 1, 15, 2, + 11, 3, 15, 4, 2, 0, 3, 15, 1, 15, 2, 11, 5, 15, 6, 2, 0, 3, 15, 1, + 15, 7, 22, 0, 2, 1, 1, 11, 8, 15, 9, 2, 0, 3, 11, 11, 25, 10, 11, 13, + 25, 12, 11, 15, 25, 14, 11, 17, 25, 16, 11, 19, 25, 18, 11, 21, 25, 20, 11, 23, + 25, 22, 11, 25, 25, 24, 11, 27, 25, 26, 11, 29, 25, 28, 11, 31, 25, 30, 11, 33, + 25, 32, 15, 34, 11, 35, 15, 32, 26, 11, 37, 25, 36, 15, 34, 11, 38, 15, 36, 26, + 11, 40, 25, 39, 15, 34, 11, 41, 11, 42, 26, 0, 0, 0, 0, 0, 0, 0, 0, 43, + 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, + 0, 13,115,101,116,116, 97,103,109,101,116,104,111,100, 0, 2, 0, 0, 0, 11, +105,117,112,108,117, 97, 95,116, 97,103, 0, 2, 0, 0, 0, 9,103,101,116,116, + 97, 98,108,101, 0, 2, 0, 0, 0, 13,105,117,112, 95,103,101,116,116, 97, 98, +108,101, 0, 2, 0, 0, 0, 9,115,101,116,116, 97, 98,108,101, 0, 2, 0, 0, + 0, 13,105,117,112, 95,115,101,116,116, 97, 98,108,101, 0, 2, 0, 0, 0, 4, +116, 97,103, 0, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 10, +105,117,112, 95,105,110,100,101,120, 0, 2, 0, 0, 0, 7, 95, 65, 76, 69, 82, + 84, 0, 4, 0, 0, 0, 14, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108, +117, 97, 0, 0, 0, 0,125, 14, 1, 15, 2, 22, 3, 11, 3, 11, 4, 11, 5, 11, + 6, 11, 7, 11, 8, 30, 2, 2, 1, 1, 15, 10, 22, 4, 11, 11, 11, 12, 11, 13, + 11, 12, 11, 14, 13, 0, 11, 5, 11, 15, 30, 3, 2, 1, 1, 15, 17, 22, 5, 13, + 2, 13, 1, 29, 0, 2, 11, 18, 11, 19, 11, 20, 11, 21, 11, 22, 11, 23, 30, 2, + 2, 1, 1, 15, 25, 22, 5, 13, 3, 29, 0, 1, 11, 3, 11, 26, 11, 27, 13, 1, + 11, 28, 13, 1, 11, 29, 13, 1, 30, 3, 2, 1, 1, 13, 4, 20, 30, 15, 31, 15, + 31, 2, 0, 3, 13, 4, 20, 32, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 33, + 2, 0, 0, 0, 2,115, 0, 2, 0, 0, 0, 3, 98,116, 0, 2, 0, 0, 0, 10, +105,117,112, 98,117,116,116,111,110, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 2, 0, 0, 0, 3, 79,107, 0, 2, 0, 0, 0, 5,115,105,122,101, 0, 2, + 0, 0, 0, 3, 54, 48, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, + 0, 0, 0, 17,114,101,116,117,114,110, 32, 73, 85, 80, 95, 67, 76, 79, 83, 69, + 0, 2, 0, 0, 0, 3,109,108, 0, 2, 0, 0, 0, 13,105,117,112,109,117,108, +116,105,108,105,110,101, 0, 2, 0, 0, 0, 7,101,120,112, 97,110,100, 0, 2, + 0, 0, 0, 4, 89, 69, 83, 0, 2, 0, 0, 0, 9,114,101, 97,100,111,110,108, +121, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 8, 51, 48, + 48,120, 49, 53, 48, 0, 2, 0, 0, 0, 3,118, 98, 0, 2, 0, 0, 0, 8,105, +117,112,118, 98,111,120, 0, 2, 0, 0, 0, 10, 97,108,105,103,110,109,101,110, +116, 0, 2, 0, 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 7, +109, 97,114,103,105,110, 0, 2, 0, 0, 0, 6, 49, 48,120, 49, 48, 0, 2, 0, + 0, 0, 4,103, 97,112, 0, 2, 0, 0, 0, 3, 49, 48, 0, 2, 0, 0, 0, 3, +100,103, 0, 2, 0, 0, 0, 10,105,117,112,100,105, 97,108,111,103, 0, 2, 0, + 0, 0, 10, 76,117, 97, 32, 69,114,114,111,114, 0, 2, 0, 0, 0, 11,100,101, +102, 97,117,108,116,101,115, 99, 0, 2, 0, 0, 0, 13,100,101,102, 97,117,108, +116,101,110,116,101,114, 0, 2, 0, 0, 0, 11,115,116, 97,114,116,102,111, 99, +117,115, 0, 2, 0, 0, 0, 6,112,111,112,117,112, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 95, 67, 69, 78, 84, 69, 82, 0, 2, 0, 0, 0, 8,100,101,115,116,114, +111,121, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, + 4, 0, 0, 0, 23, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, + 0, 0, 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5, +116,121,112,101, 0, 2, 0, 0, 0, 7,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,110,117,109, 98,101,114, 0, 4, 0, 0, 0, 27, 0, + 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 15, 3, + 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, + 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 9,116,121,112,101, + 95,110,105,108, 0, 4, 0, 0, 0, 31, 0, 0, 0, 12, 64,105,117,112,108,117, + 97, 46,108,117, 97, 0, 0, 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, + 2, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 4,110,105,108, 0, 2, + 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99,116,105,111,110, 0, 4, 0, + 0, 0, 35, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, + 0, 0, 15, 3, 1, 15, 1, 13, 0, 2, 1, 1, 11, 2, 32, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,116,121, +112,101, 0, 2, 0, 0, 0, 9,102,117,110, 99,116,105,111,110, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 0, 39, 0, + 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 20, 3, + 1, 13, 0, 52, 9, 15, 1, 13, 0, 16, 1, 1, 50, 4, 4, 0, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2,119, 0, 2, 0, 0, 0, 12,105, +117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, 0, 10,116,121,112,101, + 95,109,101,110,117, 0, 4, 0, 0, 0, 47, 0, 0, 0, 12, 64,105,117,112,108, +117, 97, 46,108,117, 97, 0, 0, 0, 0, 21, 3, 1, 15, 1, 13, 0, 2, 1, 1, + 48, 7, 13, 0, 18, 2, 15, 3, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100, +103,101,116, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 77, 69, 78, 85, 0, 2, 0, 0, 0, 10,116,121,112,101, 95,105, +116,101,109, 0, 4, 0, 0, 0, 51, 0, 0, 0, 12, 64,105,117,112,108,117, 97, + 46,108,117, 97, 0, 0, 0, 0, 39, 3, 1, 15, 1, 13, 0, 2, 1, 1, 48, 25, + 13, 0, 18, 2, 15, 3, 32, 46, 7, 13, 0, 18, 2, 15, 4, 32, 46, 7, 13, 0, + 18, 2, 15, 5, 32, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 73, 84, 69, 77, 0, 2, 0, 0, 0, 11, 73, 85, 80, 83, 85, 66, 77, 69, 78, 85, + 0, 2, 0, 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 2, + 0, 0, 0, 14,105,117,112, 67, 97,108,108, 77,101,116,104,111,100, 0, 4, 0, + 0, 0, 55, 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, + 0, 0,105, 7,129, 13, 1, 7, 1, 16, 13, 2, 13, 0, 16, 13, 3, 44, 52, 29, + 15, 5, 15, 6, 13, 0, 16, 7, 1, 16, 2, 1, 1, 13, 2, 13, 4, 16, 23, 3, + 13, 3, 44, 52, 2, 1, 5, 5, 1, 15, 7, 13, 3, 2, 1, 1, 52, 11, 15, 8, + 13, 3, 13, 1, 3, 4, 2, 50, 38, 15, 9, 13, 3, 2, 1, 1, 52, 25, 15, 11, + 13, 2, 25, 11, 15, 13, 13, 3, 2, 1, 1, 13, 4, 25, 11, 13, 5, 1, 6, 5, + 2, 50, 4, 15, 14, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 15, 2, 0, 0, 0, + 5,110, 97,109,101, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, + 0, 0, 4, 97,114,103, 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, 0, 0, + 0, 10,102,117,108,108, 95,110, 97,109,101, 0, 2, 0, 0, 0, 9,115,116,114, +108,111,119,101,114, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, + 97, 99,107,115, 0, 2, 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99,116, +105,111,110, 0, 2, 0, 0, 0, 5, 99, 97,108,108, 0, 2, 0, 0, 0, 12,116, +121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 5,116,101,109,112, + 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 7,114,101,115,117, +108,116, 0, 2, 0, 0, 0, 9,100,111,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 10, 73, 85, 80, 95, 69, 82, 82, 79, 82, 0, 2, 0, 0, 0, 11,105,117,112, + 83,101,116, 78, 97,109,101, 0, 4, 0, 0, 0, 81, 0, 0, 0, 12, 64,105,117, +112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 51, 7, 1, 15, 1, 15, 2, 13, + 0, 16, 18, 3, 2, 1, 1, 44, 52, 33, 15, 2, 13, 0, 16, 11, 3, 15, 4, 11, + 5, 15, 6, 13, 0, 2, 1, 1, 2, 1, 2, 26, 15, 7, 13, 0, 18, 3, 13, 0, + 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 7,104, 97,110, +100,108,101, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, + 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, + 0, 0, 9, 73, 85, 80, 95,110, 97,109,101, 0, 2, 0, 0, 0, 7,102,111,114, +109, 97,116, 0, 2, 0, 0, 0, 17, 95, 73, 85, 80, 76, 85, 65, 95, 78, 65, 77, + 69, 40, 37,115, 41, 0, 2, 0, 0, 0, 9,116,111,115,116,114,105,110,103, 0, + 2, 0, 0, 0, 13, 73,117,112, 83,101,116, 72, 97,110,100,108,101, 0, 2, 0, + 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 4, 0, 0, 0, 88, 0, 0, 0, 12, 64,105,117,112,108, +117, 97, 46,108,117, 97, 0, 0, 0, 0, 74, 5, 1, 13, 0, 18, 1, 18, 1, 15, + 2, 32, 52, 32, 7, 1, 50, 17, 15, 4, 13, 0, 13, 1, 16, 2, 0, 1, 13, 1, + 7, 1, 37, 23, 1, 13, 0, 13, 1, 16, 54, 24, 5, 1, 50, 28, 13, 0, 18, 1, + 15, 5, 32, 52, 12, 15, 4, 13, 0, 7, 1, 16, 2, 0, 1, 50, 7, 15, 6, 13, + 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 12, 67, + 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, + 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, + 2, 0, 0, 0, 11,105,117,112, 83,101,116, 78, 97,109,101, 0, 2, 0, 0, 0, + 7, 73,117,112, 82, 71, 66, 0, 4, 0, 0, 0,108, 0, 0, 0, 12, 64,105,117, +112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 43, 7, 3, 15, 3, 13, 0, 7, +255, 39, 2, 1, 1, 11, 4, 42, 15, 3, 13, 1, 7,255, 39, 2, 1, 1, 42, 11, + 4, 42, 15, 3, 13, 2, 7,255, 39, 2, 1, 1, 42, 1, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 2, 0, 0, 0, 4,114,101,100, 0, 2, 0, 0, 0, 6,103,114, +101,101,110, 0, 2, 0, 0, 0, 5, 98,108,117,101, 0, 2, 0, 0, 0, 6,102, +108,111,111,114, 0, 2, 0, 0, 0, 2, 32, 0, 2, 0, 0, 0, 4,105,117,112, + 0, 2, 0, 0, 0, 4, 82, 71, 66, 0, 2, 0, 0, 0, 18, 73,117,112, 82,101, +103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 4, 0, 0, 0,113, 0, 0, + 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 58, 10, 2, + 15, 2, 13, 0, 16, 44, 52, 43, 15, 4, 11, 5, 15, 6, 13, 1, 2, 1, 1, 42, + 2, 1, 1, 13, 2, 44, 52, 4, 15, 7, 23, 2, 15, 2, 13, 0, 22, 2, 11, 8, + 13, 2, 11, 0, 13, 0, 30, 1, 26, 5, 1, 13, 0, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, + 9,116,121,112,101,110, 97,109,101, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, + 97,110,100,108,101,115, 0, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 10,103,101,116,103,108,111, 98, 97,108, 0, 2, 0, 0, 0, 4, 73, 85, 80, 0, + 2, 0, 0, 0, 9,115,116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 15, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, + 0, 0, 12, 73,117,112, 71,101,116, 70,114,111,109, 67, 0, 4, 0, 0, 0,125, + 0, 0, 0, 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 27, + 6, 1, 15, 2, 13, 0, 7, 1, 16, 2, 1, 1, 15, 3, 13, 1, 15, 4, 13, 1, + 2, 1, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, + 13, 73,117,112, 71,101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 18, 73, +117,112, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, 0, + 0, 16, 73,117,112, 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, 2, 0, + 0, 0, 9, 71,101,116, 70,114,111,109, 67, 0, 4, 0, 0, 0,130, 0, 0, 0, + 12, 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 24, 6, 1, 15, + 2, 13, 0, 2, 1, 1, 15, 3, 13, 1, 15, 4, 13, 1, 2, 1, 1, 3, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 5,110, 97,109,101, 0, 2, + 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 13, 73,117,112, 71, +101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 18, 73,117,112, 82,101,103, +105,115,116,101,114, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 16, 73,117,112, + 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/iuplua_le64w.lo"); +} diff --git a/iup/srclua3/loh/iuplua_widgets.loh b/iup/srclua3/loh/iuplua_widgets.loh new file mode 100755 index 0000000..efaed40 --- /dev/null +++ b/iup/srclua3/loh/iuplua_widgets.loh @@ -0,0 +1,939 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/iuplua_widgets.lo"); +*/ +/* ../obj/iuplua3/iuplua_widgets.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 20, 64,105,117,112,108,117, + 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 7,202, 67, 0, + 22, 1, 11, 1, 22, 0, 30, 0, 25, 0, 15, 0, 11, 2, 11, 3, 26, 15, 0, 11, + 4, 11, 5, 26, 15, 0, 11, 6, 11, 7, 26, 15, 0, 11, 8, 11, 9, 26, 15, 0, + 11, 10, 11, 11, 26, 15, 0, 11, 12, 11, 13, 26, 15, 0, 11, 14, 11, 15, 26, 15, + 0, 11, 16, 11, 17, 26, 15, 0, 11, 18, 11, 19, 26, 15, 0, 11, 20, 11, 21, 26, + 15, 0, 11, 22, 11, 23, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, 24, 15, 24, 11, + 26, 11, 27, 26, 11, 29, 25, 28, 15, 30, 11, 31, 15, 28, 26, 22, 1, 11, 25, 15, + 0, 30, 0, 25, 32, 15, 32, 11, 26, 11, 33, 26, 11, 35, 25, 34, 15, 30, 11, 36, + 15, 34, 26, 22, 2, 11, 25, 15, 0, 11, 1, 22, 1, 15, 38, 29, 0, 1, 30, 1, + 25, 37, 15, 37, 11, 26, 11, 39, 26, 15, 37, 11, 40, 11, 41, 26, 15, 37, 11, 42, + 11, 43, 26, 15, 37, 11, 44, 11, 45, 26, 11, 47, 25, 46, 15, 30, 11, 48, 15, 46, + 26, 22, 2, 11, 25, 15, 0, 11, 1, 22, 1, 15, 38, 29, 0, 1, 30, 1, 25, 49, + 15, 49, 11, 26, 11, 50, 26, 11, 52, 25, 51, 15, 30, 11, 53, 15, 51, 26, 11, 55, + 25, 54, 11, 57, 25, 56, 11, 59, 25, 58, 22, 1, 11, 25, 15, 0, 30, 0, 25, 60, + 15, 60, 11, 4, 11, 61, 26, 15, 60, 11, 26, 11, 62, 26, 11, 64, 25, 63, 15, 30, + 11, 65, 15, 63, 26, 15, 66, 11, 44, 11, 67, 26, 22, 1, 11, 25, 15, 0, 30, 0, + 25, 68, 15, 68, 11, 4, 11, 69, 26, 15, 68, 11, 26, 11, 70, 26, 22, 1, 11, 25, + 15, 68, 30, 0, 25, 71, 15, 71, 11, 72, 11, 73, 26, 11, 75, 25, 74, 15, 30, 11, + 76, 15, 74, 26, 11, 78, 25, 77, 11, 80, 25, 79, 22, 1, 11, 25, 15, 68, 30, 0, + 25, 81, 15, 81, 11, 72, 11, 82, 26, 11, 84, 25, 83, 15, 30, 11, 85, 15, 83, 26, + 11, 87, 25, 86, 22, 1, 11, 25, 15, 68, 30, 0, 25, 88, 15, 88, 11, 72, 11, 89, + 26, 11, 91, 25, 90, 15, 30, 11, 92, 15, 90, 26, 22, 1, 11, 25, 15, 0, 30, 0, + 25, 93, 15, 93, 11, 26, 11, 94, 26, 11, 96, 25, 95, 15, 30, 11, 97, 15, 95, 26, + 22, 2, 11, 25, 15, 0, 11, 99, 22, 1, 11,100, 15,101, 30, 0, 30, 1, 25, 98, + 15, 98, 11, 26, 11,102, 26, 11,104, 25,103, 15, 30, 11,105, 15,103, 26, 22, 1, + 11, 25, 15, 0, 30, 0, 25,106, 15,106, 11, 26, 11,107, 26, 11,109, 25,108, 15, + 30, 11,110, 15,108, 26, 22, 1, 11, 25, 15,112, 30, 0, 25,111, 15,111, 11, 26, + 11,113, 26, 11,115, 25,114, 15, 30, 11,116, 15,114, 26, 22, 2, 11, 25, 15, 0, + 11, 99, 22, 1, 11,118, 15,101, 30, 0, 30, 1, 25,117, 15,117, 11, 26, 11,119, + 26, 11,121, 25,120, 15, 30, 11,122, 15,120, 26, 22, 1, 11, 25, 15,124, 30, 0, + 25,123, 15,123, 11, 26, 11,125, 26, 11,127, 25,126, 15, 30, 11,128, 15,126, 26, + 22, 1, 11, 25, 15,124, 30, 0, 25,129, 15,129, 11, 26, 11,130, 26, 11,132, 25, +131, 15, 30, 11,133, 15,131, 26, 22, 2, 11, 25, 15, 0, 11, 99, 22, 2, 15,135, + 29, 0, 1, 11,136, 15,101, 30, 0, 30, 1, 25,134, 15,134, 11, 26, 11,137, 26, + 11,139, 25,138, 15, 30, 11,140, 15,138, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, +141, 15,141, 11, 26, 11,142, 26, 11,144, 25,143, 15, 30, 11,145, 15,143, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,146, 15,146, 11, 44, 11,147, 26, 15,146, 11, 26, + 11,148, 26, 11,150, 25,149, 15, 30, 11,151, 15,149, 26, 22, 1, 11, 25, 15, 0, + 30, 0, 25,152, 15,152, 11, 44, 11,153, 26, 15,152, 11, 26, 11,154, 26, 11,156, + 25,155, 15, 30, 11,157, 15,155, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,158, 15, +158, 11, 44, 11,159, 26, 15,158, 11, 26, 11,160, 26, 11,162, 25,161, 15, 30, 11, +163, 15,161, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,164, 15,164, 11, 44, 11,165, + 26, 15,164, 11, 26, 11,166, 26, 11,168, 25,167, 15, 30, 11,169, 15,167, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,170, 15,170, 11, 26, 11,171, 26, 11,173, 25,172, + 15, 30, 11,174, 15,172, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,175, 15,175, 11, + 4, 11,176, 26, 15,175, 11, 26, 11,177, 26, 11,179, 25,178, 15, 30, 11,180, 15, +178, 26, 22, 2, 11, 25, 15, 0, 11, 99, 22, 1, 15,182, 29, 0, 1, 30, 1, 25, +181, 15,181, 11, 26, 11,183, 26, 11,185, 25,184, 15, 30, 11,186, 15,184, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,187, 15,187, 11, 26, 11,188, 26, 11,190, 25,189, + 15, 30, 11,191, 15,189, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,192, 15,192, 11, + 26, 11,193, 26, 15,192, 11, 8, 11,194, 26, 15,192, 11, 10, 11,195, 26, 11,197, + 25,196, 15, 30, 11,198, 15,196, 26, 22, 1, 11, 25, 15,200, 30, 0, 25,199, 15, +199, 11, 4, 11,201, 26, 15,199, 11, 26, 11,202, 26, 11,204, 25,203, 15, 30, 11, +205, 15,203, 26, 22, 1, 11, 25, 15,200, 30, 0, 25,206, 15,206, 11, 26, 11,207, + 26, 11,209, 25,208, 15, 30, 11,210, 15,208, 26, 22, 1, 11, 25, 15,200, 30, 0, + 25,211, 15,211, 11, 26, 11,212, 26, 11,214, 25,213, 15, 30, 11,215, 15,213, 26, + 22, 1, 11, 25, 15,200, 30, 0, 25,216, 15,216, 11, 26, 11,217, 26, 11,219, 25, +218, 15, 30, 11,220, 15,218, 26, 22, 33, 11,222, 22, 2, 11,223, 4, 0, 29, 0, + 2, 11,224, 22, 2, 11,225, 4, 0, 29, 0, 2, 11,226, 22, 2, 11,227, 15,228, + 29, 0, 2, 11,229, 22, 2, 11,230, 15,231, 29, 0, 2, 11,232, 22, 2, 11,233, + 15,234, 29, 0, 2, 11,235, 22, 2, 11,236, 15,237, 29, 0, 2, 11,238, 22, 2, + 11,239, 15,240, 29, 0, 2, 11,241, 22, 2, 11,242, 15,243, 29, 0, 2, 11,244, + 22, 2, 11,245, 15,246, 29, 0, 2, 11,247, 22, 2, 11,248, 15,249, 29, 0, 2, + 11,250, 22, 2, 11,251, 15,252, 29, 0, 2, 11,253, 22, 2, 11,254, 15,255, 29, + 0, 2, 10, 1, 0, 22, 2, 10, 1, 1, 14, 1, 2, 29, 0, 2, 10, 1, 3, 22, + 2, 10, 1, 4, 14, 1, 5, 29, 0, 2, 10, 1, 6, 22, 2, 10, 1, 7, 14, 1, + 8, 29, 0, 2, 10, 1, 9, 22, 2, 10, 1, 10, 14, 1, 11, 29, 0, 2, 10, 1, + 12, 22, 2, 10, 1, 13, 14, 1, 14, 29, 0, 2, 10, 1, 15, 22, 2, 10, 1, 16, + 14, 1, 17, 29, 0, 2, 10, 1, 18, 22, 2, 10, 1, 19, 14, 1, 20, 29, 0, 2, + 10, 1, 21, 22, 2, 10, 1, 22, 14, 1, 23, 29, 0, 2, 10, 1, 24, 22, 2, 10, + 1, 25, 14, 1, 26, 29, 0, 2, 11,105, 22, 2, 10, 1, 27, 14, 1, 28, 29, 0, + 2, 10, 1, 29, 22, 2, 10, 1, 30, 14, 1, 31, 29, 0, 2, 10, 1, 32, 22, 2, + 10, 1, 30, 14, 1, 33, 29, 0, 2, 10, 1, 34, 22, 2, 10, 1, 35, 14, 1, 36, + 29, 0, 2, 10, 1, 37, 22, 2, 10, 1, 38, 14, 1, 39, 29, 0, 2, 10, 1, 40, + 22, 2, 10, 1, 41, 14, 1, 42, 29, 0, 2, 10, 1, 43, 22, 2, 10, 1, 44, 14, + 1, 45, 29, 0, 2, 10, 1, 46, 22, 2, 10, 1, 47, 14, 1, 48, 29, 0, 2, 10, + 1, 49, 22, 2, 10, 1, 50, 14, 1, 51, 29, 0, 2, 10, 1, 52, 22, 2, 10, 1, + 53, 14, 1, 54, 29, 0, 2, 10, 1, 55, 22, 2, 10, 1, 56, 14, 1, 57, 29, 0, + 2, 30, 31, 10, 1, 58, 22, 2, 10, 1, 59, 14, 1, 60, 29, 0, 2, 30, 0, 25, +221, 15,221, 18,222, 11,128, 14, 1, 61, 26, 15,221, 18,222, 11,116, 14, 1, 62, + 26, 15,221, 18,222, 11,110, 14, 1, 62, 26, 15,221, 18,222, 11,105, 14, 1, 63, + 26, 15,221, 18,222, 11,198, 14, 1, 64, 26, 15,221, 18,222, 11,133, 14, 1, 63, + 26, 15,221, 18,222, 11,191, 14, 1, 65, 26, 15,221, 18,224, 11, 31, 14, 1, 66, + 26, 15,221, 10, 1, 67, 15,221, 18,224, 26, 15,221, 10, 1, 68, 15,221, 18,226, + 26, 15,221, 10, 1, 69, 15,221, 18,229, 26, 15,221, 10, 1, 70, 15,221, 18,232, + 26, 15,221, 11,235, 15,221, 18,235, 26, 15,221, 10, 1, 71, 15,221, 18,238, 26, + 15,221, 10, 1, 72, 15,221, 18,241, 26, 15,221, 10, 1, 73, 15,221, 18,244, 26, + 15,221, 10, 1, 74, 15,221, 18,247, 26, 15,221, 10, 1, 75, 15,221, 18,250, 26, + 15,221, 10, 1, 76, 15,221, 18,253, 26, 15,221, 10, 1, 77, 15,221, 17, 1, 0, + 26, 15,221, 10, 1, 78, 15,221, 17, 1, 3, 26, 15,221, 10, 1, 79, 15,221, 17, + 1, 6, 26, 15,221, 10, 1, 80, 15,221, 17, 1, 9, 26, 15,221, 10, 1, 81, 15, +221, 17, 1, 12, 26, 15,221, 10, 1, 82, 15,221, 17, 1, 15, 26, 15,221, 10, 1, + 83, 15,221, 17, 1, 18, 26, 15,221, 10, 1, 84, 15,221, 17, 1, 21, 26, 15,221, + 10, 1, 85, 15,221, 17, 1, 24, 26, 15,221, 10, 1, 86, 15,221, 18,105, 26, 15, +221, 10, 1, 87, 15,221, 17, 1, 29, 26, 15,221, 10, 1, 88, 15,221, 17, 1, 32, + 26, 15,221, 10, 1, 89, 15,221, 17, 1, 34, 26, 15,221, 10, 1, 90, 15,221, 17, + 1, 37, 26, 15,221, 10, 1, 91, 15,221, 17, 1, 40, 26, 15,221, 10, 1, 92, 15, +221, 17, 1, 43, 26, 15,221, 10, 1, 93, 15,221, 17, 1, 46, 26, 15,221, 10, 1, + 94, 15,221, 17, 1, 52, 26, 15,221, 10, 1, 95, 15,221, 17, 1, 49, 26, 15,221, + 10, 1, 96, 15,221, 17, 1, 55, 26, 15,221, 10, 1, 97, 15,221, 17, 1, 58, 26, + 15,221, 10, 1, 98, 15,221, 17, 1, 99, 26, 0, 0, 0, 0, 0, 0, 0, 1,100, + 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 5,116,121,112, +101, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 4, + 0, 0, 0, 12, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 57, 7, 2, 13, 1, 11, 1, 13, 0, + 26, 13, 0, 20, 3, 13, 1, 2, 0, 2, 13, 1, 11, 4, 13, 0, 20, 5, 13, 1, + 2, 1, 2, 26, 13, 0, 20, 6, 13, 1, 2, 0, 2, 15, 7, 13, 1, 18, 4, 13, + 1, 26, 13, 1, 18, 4, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 12, 99,104,101, 99,107, 80, 97, +114, 97,109,115, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, + 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 2, + 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 2, 0, + 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, 0, 12, + 99,104,101, 99,107, 80, 97,114, 97,109,115, 0, 4, 0, 0, 0, 32, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 61, 8, 2, 13, 0, 18, 1, 15, 5, 13, 2, 4, 0, 2, 2, 2, + 50, 39, 13, 4, 13, 1, 13, 3, 16, 2, 1, 1, 44, 52, 13, 15, 6, 11, 7, 13, + 3, 42, 11, 8, 42, 2, 0, 1, 15, 5, 13, 2, 13, 3, 2, 2, 2, 23, 4, 23, + 3, 13, 3, 54, 43, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 2, 0, 0, 0, 6,112, 97,114, 97,109, 0, 2, 0, 0, 0, 5,102, +117,110, 99, 0, 2, 0, 0, 0, 5,110,101,120,116, 0, 2, 0, 0, 0, 6,101, +114,114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, + 0, 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114,111,110,103, 32,118, 97,108, +117,101, 32,111,114, 32,105,115, 32,110,111,116, 32,105,110,105,116,105, 97,108, +105,122,101,100, 0, 2, 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98,117, +116,101,115, 0, 4, 0, 0, 0, 43, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 80, 9, 2, 22, + 0, 15, 3, 13, 1, 4, 0, 2, 1, 2, 50, 18, 13, 2, 13, 3, 7, 1, 26, 15, + 3, 13, 1, 13, 3, 2, 1, 2, 23, 3, 13, 3, 54, 22, 15, 3, 13, 2, 4, 0, + 2, 1, 2, 23, 3, 50, 25, 13, 1, 20, 4, 13, 3, 13, 1, 13, 3, 16, 2, 0, + 3, 15, 3, 13, 2, 13, 3, 2, 1, 2, 23, 3, 13, 3, 54, 29, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 5,116, +101,109,112, 0, 2, 0, 0, 0, 2,102, 0, 2, 0, 0, 0, 5,110,101,120,116, + 0, 2, 0, 0, 0, 4,115,101,116, 0, 2, 0, 0, 0, 4,103,101,116, 0, 4, + 0, 0, 0, 57, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 82, 6, 2, 15, 1, 13, 1, 2, 1, + 1, 52, 63, 15, 2, 13, 1, 16, 52, 9, 13, 0, 13, 1, 16, 1, 2, 50, 47, 15, + 5, 13, 1, 2, 1, 1, 15, 7, 13, 0, 18, 8, 13, 2, 2, 1, 2, 13, 3, 52, + 23, 15, 9, 13, 3, 2, 1, 1, 13, 4, 52, 6, 13, 4, 1, 5, 50, 4, 13, 3, + 1, 5, 5, 1, 5, 2, 13, 0, 13, 1, 16, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 10, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 12,116,121, +112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, + 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, + 0, 0, 0, 6, 73, 78, 68, 69, 88, 0, 2, 0, 0, 0, 9,115,116,114,117,112, +112,101,114, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 16, + 73,117,112, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, + 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 13, 73,117,112, 71,101,116, 72, + 97,110,100,108,101, 0, 2, 0, 0, 0, 4,115,101,116, 0, 4, 0, 0, 0, 77, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0,228, 11, 3, 15, 2, 13, 1, 2, 1, 1, 52,209, 15, + 4, 13, 1, 2, 1, 1, 15, 6, 13, 1, 16, 13, 1, 11, 7, 32, 48, 12, 15, 8, + 13, 0, 18, 10, 2, 1, 1, 11, 11, 32, 52, 4, 4, 0, 23, 4, 13, 4, 52, 55, + 13, 4, 7, 2, 16, 13, 5, 44, 52, 14, 13, 4, 15, 8, 13, 0, 18, 10, 2, 1, + 1, 16, 23, 5, 15, 13, 13, 0, 18, 10, 13, 4, 7, 1, 16, 13, 5, 13, 2, 2, + 0, 4, 13, 0, 13, 1, 13, 2, 26, 1, 6, 5, 1, 50,111, 15, 2, 13, 2, 2, + 1, 1, 46, 7, 15, 14, 13, 2, 2, 1, 1, 52, 17, 15, 15, 13, 0, 18, 10, 13, + 3, 13, 2, 2, 0, 3, 1, 5, 50, 76, 15, 16, 13, 2, 2, 1, 1, 52, 34, 15, + 18, 13, 0, 18, 10, 13, 3, 2, 1, 2, 13, 5, 52, 15, 15, 15, 13, 0, 18, 10, + 13, 3, 13, 2, 2, 0, 3, 1, 6, 5, 1, 50, 33, 15, 19, 13, 2, 2, 1, 1, + 52, 24, 15, 20, 13, 2, 2, 0, 1, 15, 15, 13, 0, 18, 10, 13, 3, 13, 2, 18, + 21, 2, 0, 3, 1, 5, 5, 2, 13, 0, 13, 1, 13, 2, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 6, +118, 97,108,117,101, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105, +110,103, 0, 2, 0, 0, 0, 6, 73, 78, 68, 69, 88, 0, 2, 0, 0, 0, 9,115, +116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 3, 99, 98, 0, 2, 0, 0, 0, + 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 7, +114,101,115,105,122,101, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 67,108, + 97,115,115, 78, 97,109,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, + 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 7,100,105, 97,108,111, +103, 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, 0, 0, 0, 15,105,117,112, + 83,101,116, 67, 97,108,108, 98, 97, 99,107, 0, 2, 0, 0, 0, 12,116,121,112, +101, 95,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 9,116,121,112,101, 95, +110,105,108, 0, 2, 0, 0, 0, 10,111,108,100, 95,118, 97,108,117,101, 0, 2, + 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, + 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, + 0, 11,105,117,112, 83,101,116, 78, 97,109,101, 0, 2, 0, 0, 0, 9, 73, 85, + 80, 95,110, 97,109,101, 0, 2, 0, 0, 0, 10,114, 95,100,101,115,116,114,111, +121, 0, 4, 0, 0, 0,113, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 89, 6, 1, 7, 1, 13, + 0, 13, 1, 16, 50, 66, 15, 3, 13, 2, 2, 1, 1, 48, 4, 13, 2, 18, 4, 52, + 37, 13, 2, 18, 4, 13, 0, 32, 52, 16, 13, 2, 11, 4, 4, 0, 26, 13, 2, 20, + 5, 2, 0, 1, 50, 12, 15, 6, 11, 7, 2, 0, 1, 15, 8, 2, 0, 0, 13, 1, + 7, 1, 37, 23, 1, 13, 0, 13, 1, 16, 23, 2, 13, 2, 54, 70, 15, 9, 13, 0, + 4, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 0, 0, 0, 2,105, 0, 2, + 0, 0, 0, 5,101,108,101,109, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, + 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, + 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 10,114, 95,100, +101,115,116,114,111,121, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, + 0, 0, 29, 73,110,116,101,114,110, 97,108, 32,116, 97, 98,108,101, 32,105,110, + 99,111,110,115,105,115,116,101,110, 99,121, 0, 2, 0, 0, 0, 5,101,120,105, +116, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, + 0, 0, 0, 8,100,101,115,116,114,111,121, 0, 4, 0, 0, 0,133, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 17, 3, 1, 13, 0, 20, 1, 2, 0, 1, 15, 2, 13, 0, 2, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 10,114, 95,100,101,115,116,114,111,121, 0, 2, 0, 0, 0, 11, + 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, 0, 0, 7,100,101,116, 97, + 99,104, 0, 4, 0, 0, 0,138, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 96, 8, 1, 15, 0, + 13, 0, 2, 0, 1, 13, 0, 18, 3, 13, 1, 52, 78, 13, 0, 11, 3, 4, 0, 26, + 7, 1, 50, 58, 13, 1, 13, 2, 16, 13, 0, 32, 52, 41, 50, 20, 13, 1, 13, 2, + 13, 1, 13, 2, 7, 1, 37, 16, 26, 13, 2, 7, 1, 37, 23, 2, 13, 1, 13, 2, + 7, 1, 37, 16, 54, 30, 13, 1, 13, 2, 4, 0, 26, 1, 3, 13, 2, 7, 1, 37, + 23, 2, 13, 1, 13, 2, 16, 54, 65, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 2, 0, 0, 0, 10, 73,117,112, 68,101,116, 97, 99,104, 0, 2, 0, 0, 0, 5, +115,101,108,102, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, + 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 2,105, 0, + 2, 0, 0, 0, 7, 97,112,112,101,110,100, 0, 4, 0, 0, 0,158, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 75, 6, 2, 15, 1, 13, 0, 13, 1, 2, 1, 2, 52, 57, 13, 1, + 11, 3, 13, 0, 26, 7, 1, 50, 21, 13, 0, 13, 2, 16, 13, 1, 32, 52, 4, 13, + 2, 1, 3, 13, 2, 7, 1, 37, 23, 2, 13, 0, 13, 2, 16, 54, 28, 15, 5, 13, + 0, 16, 13, 2, 13, 1, 26, 13, 2, 1, 3, 5, 1, 50, 4, 4, 0, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, + 73,117,112, 65,112,112,101,110,100, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 2,105, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, + 2, 0, 0, 0, 4,109, 97,112, 0, 4, 0, 0, 0,175, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 0, 0, 0, 7, 73,117,112, 77, 97,112, 0, 2, 0, 0, 0, 5,115,101,108, +102, 0, 2, 0, 0, 0, 5,104,105,100,101, 0, 4, 0, 0, 0,179, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 8, 73,117,112, 72,105,100,101, 0, 2, 0, 0, 0, + 5,115,101,108,102, 0, 2, 0, 0, 0, 9, 73, 85, 80, 84, 73, 77, 69, 82, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 17, 67,114,101, + 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0,187, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 15,105,117,112, + 67,114,101, 97,116,101, 84,105,109,101,114, 0, 2, 0, 0, 0, 9,105,117,112, +116,105,109,101,114, 0, 4, 0, 0, 0,191, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 84, 73, 77, 69, 82, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,116,105,109,101,114, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 67, 76, 73, 80, 66, 79, 65, 82, 68, 0, 4, 0, 0, 0,200, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 19,105,117, +112, 67,114,101, 97,116,101, 67,108,105,112, 98,111, 97,114,100, 0, 2, 0, 0, + 0, 13,105,117,112, 99,108,105,112, 98,111, 97,114,100, 0, 4, 0, 0, 0,204, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 13, + 73, 85, 80, 67, 76, 73, 80, 66, 79, 65, 82, 68, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10, 99,108,105,112, 98, +111, 97,114,100, 0, 2, 0, 0, 0, 10, 73, 85, 80, 68, 73, 65, 76, 79, 71, 0, + 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, + 0,213, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, + 1, 1, 13, 1, 7, 1, 16, 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, + 97,110,100,108,101, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, + 68,105, 97,108,111,103, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 5,115,104,111,119, 0, 4, 0, 0, 0,219, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 8, 73,117,112, 83,104,111,119, 0, 2, 0, 0, + 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 7,115,104,111,119,120,121, 0, 4, + 0, 0, 0,223, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, + 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, 0, 2,120, + 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 10, 73,117,112, 83,104,111,119, + 88, 89, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 6,112,111, +112,117,112, 0, 4, 0, 0, 0,227, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, + 0, 10,105,117,112,100,105, 97,108,111,103, 0, 4, 0, 0, 0,231, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, 73, 85, 80, + 68, 73, 65, 76, 79, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99, +116,111,114, 0, 2, 0, 0, 0, 7,100,105, 97,108,111,103, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 82, 65, 68, 73, 79, 0, 4, 0, 0, 0,240, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, 1, 13, 1, 7, 1, 16, + 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, + 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, + 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 82, 97,100,105,111, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 9, +105,117,112,114, 97,100,105,111, 0, 4, 0, 0, 0,246, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 26, 5, 1, 15, 2, 20, 3, 13, 0, 2, 1, 2, 15, 4, 13, 1, 7, 1, 16, + 2, 0, 1, 13, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 9, + 73, 85, 80, 82, 65, 68, 73, 79, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 23,105,117,112, 67,114,101, 97,116,101, + 67,104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 2, 0, 0, 0, 6,114, + 97,100,105,111, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, + 0, 4, 0, 0, 0,254, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,156, 11, 1, 22, 0, 7, 1, + 50, 61, 15, 3, 13, 0, 13, 2, 16, 2, 1, 1, 52, 29, 13, 1, 13, 2, 15, 4, + 22, 2, 11, 5, 13, 0, 13, 2, 16, 11, 6, 13, 0, 18, 6, 30, 1, 2, 1, 1, + 26, 50, 13, 15, 7, 11, 8, 13, 2, 42, 11, 9, 42, 2, 0, 1, 13, 2, 7, 1, + 37, 23, 2, 13, 0, 13, 2, 16, 54, 68, 13, 0, 18, 10, 52, 51, 7, 1, 50, 7, + 13, 3, 7, 1, 37, 23, 3, 13, 0, 13, 3, 16, 48, 10, 13, 0, 13, 3, 16, 13, + 0, 18, 10, 31, 54, 26, 13, 0, 13, 3, 16, 52, 10, 13, 1, 11, 10, 13, 1, 13, + 3, 16, 26, 5, 1, 50, 18, 13, 0, 18, 12, 52, 12, 13, 1, 11, 10, 13, 1, 13, + 0, 18, 12, 16, 26, 13, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, + 0, 0, 2,104, 0, 2, 0, 0, 0, 4,116,109,112, 0, 2, 0, 0, 0, 2,105, + 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, + 0, 0, 10,105,117,112,116,111,103,103,108,101, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, + 6,101,114,114,111,114, 0, 2, 0, 0, 0, 8,111,112,116,105,111,110, 32, 0, + 2, 0, 0, 0, 18, 32,109,117,115,116, 32, 98,101, 32, 97, 32,115,116,114,105, +110,103, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 2,106, + 0, 2, 0, 0, 0, 7,110,118, 97,108,117,101, 0, 2, 0, 0, 0, 9,101,100, +104,114, 97,100,105,111, 0, 4, 0, 0, 1, 26, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 35, + 6, 1, 15, 2, 13, 0, 2, 1, 1, 15, 3, 22, 2, 15, 4, 13, 1, 2, 1, 1, + 29, 0, 1, 11, 5, 13, 1, 18, 5, 30, 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8,116,111,103,103,108, +101,115, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, 0, 2, + 0, 0, 0, 9,105,117,112,114, 97,100,105,111, 0, 2, 0, 0, 0, 7,101,100, +104, 98,111,120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, + 9,101,100,118,114, 97,100,105,111, 0, 4, 0, 0, 1, 32, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 35, 6, 1, 15, 2, 13, 0, 2, 1, 1, 15, 3, 22, 2, 15, 4, 13, 1, + 2, 1, 1, 29, 0, 1, 11, 5, 13, 1, 18, 5, 30, 0, 3, 2, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8,116,111, +103,103,108,101,115, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101, +115, 0, 2, 0, 0, 0, 9,105,117,112,114, 97,100,105,111, 0, 2, 0, 0, 0, + 7,101,100,118, 98,111,120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, 85, 0, 4, 0, 0, 1, 41, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0,159, 7, 2, 7, 1, 50,145, 13, 1, 13, 2, 16, 15, 3, 13, 3, + 2, 1, 1, 44, 52,121, 15, 4, 13, 3, 2, 1, 1, 11, 5, 31, 52, 15, 15, 6, + 11, 7, 13, 2, 42, 11, 8, 42, 2, 0, 1, 50, 94, 13, 3, 7, 1, 16, 48, 11, + 15, 9, 13, 3, 7, 1, 16, 2, 1, 1, 44, 52, 15, 15, 6, 11, 7, 13, 2, 42, + 11, 10, 42, 2, 0, 1, 50, 59, 13, 3, 7, 2, 16, 48, 11, 15, 9, 13, 3, 7, + 2, 16, 2, 1, 1, 44, 48, 11, 15, 11, 13, 3, 7, 2, 16, 2, 1, 1, 44, 48, + 11, 15, 12, 13, 3, 7, 2, 16, 2, 1, 1, 44, 52, 13, 15, 6, 11, 7, 13, 2, + 42, 11, 13, 42, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 5, 1, 13, 1, 13, 2, + 16, 54,152, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, +116,121,112,101, 95,105,116,101,109, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, + 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111, +114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, 0, 2, 0, + 0, 0, 32, 32,105,115, 32,110,111,116, 32, 97, 32,116, 97, 98,108,101, 32,110, +111,114, 32, 97, 32,109,101,110,117, 32,105,116,101,109, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 30, 32,100,111, +101,115, 32,110,111,116, 32,104, 97,118,101, 32, 97, 32,115,116,114,105,110,103, + 32,116,105,116,108,101, 0, 2, 0, 0, 0, 14,116,121,112,101, 95,102,117,110, + 99,116,105,111,110, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103, +101,116, 0, 2, 0, 0, 0, 36, 32,100,111,101,115, 32,110,111,116, 32,104, 97, +118,101, 32, 97,110, 32, 97, 99,116,105,111,110, 32,110,111,114, 32, 97, 32,109, +101,110,117, 0, 4, 0, 0, 1, 59, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,189, 10, 2, 15, + 2, 2, 1, 0, 7, 1, 50,166, 13, 1, 13, 3, 16, 4, 0, 15, 6, 13, 4, 2, + 1, 1, 52, 6, 13, 4, 23, 5, 50,112, 13, 4, 7, 1, 16, 44, 52, 11, 15, 7, + 22, 0, 2, 1, 1, 23, 5, 50, 93, 15, 6, 13, 4, 7, 2, 16, 2, 1, 1, 52, + 38, 13, 4, 11, 8, 13, 4, 7, 1, 16, 26, 13, 4, 7, 1, 13, 4, 7, 2, 16, + 26, 13, 4, 7, 2, 4, 0, 26, 15, 9, 13, 4, 2, 1, 1, 23, 5, 50, 43, 13, + 4, 11, 8, 13, 4, 7, 1, 16, 26, 13, 4, 11, 10, 13, 4, 7, 2, 16, 26, 13, + 4, 7, 1, 4, 0, 26, 13, 4, 7, 2, 4, 0, 26, 15, 11, 13, 4, 2, 1, 1, + 23, 5, 15, 12, 13, 2, 13, 5, 2, 0, 2, 13, 5, 11, 13, 13, 2, 26, 13, 1, + 13, 3, 13, 5, 26, 13, 3, 7, 1, 37, 23, 3, 5, 2, 13, 1, 13, 3, 16, 54, +173, 13, 2, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 14, +105,117,112, 67,114,101, 97,116,101, 77,101,110,117, 0, 2, 0, 0, 0, 2,105, + 0, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,101,108,101,109, 0, 2, 0, + 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, 13, +105,117,112,115,101,112, 97,114, 97,116,111,114, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 11,105,117,112,115,117, 98,109,101,110,117, 0, + 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 8,105,117,112, +105,116,101,109, 0, 2, 0, 0, 0, 10, 73,117,112, 65,112,112,101,110,100, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 8,105,117,112,109,101,110,117, 0, 4, 0, 0, 1, 89, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, + 85, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 5,109,101,110,117, 0, 2, 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, + 85, 0, 4, 0, 0, 1, 94, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, 13, + 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, + 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117,112, 80, +111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 12, + 67, 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 0, 4, 0, 0, 1,102, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 47, 6, 2, 7, 1, 50, 33, 15, 2, 13, 1, 13, 2, 16, 2, 1, + 1, 44, 52, 13, 15, 3, 11, 4, 13, 2, 42, 11, 5, 42, 2, 0, 1, 13, 2, 7, + 1, 37, 23, 2, 13, 1, 13, 2, 16, 54, 40, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, 6,101,114, +114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, 0, + 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114,111,110,103, 32,118, 97,108,117, +101, 32,111,114, 32,105,115, 32,110,111,116, 32,105,110,105,116,105, 97,108,105, +122,101,100, 0, 4, 0, 0, 1,112, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,187, 11, 2, 13, + 0, 20, 3, 2, 1, 1, 13, 1, 18, 4, 7, 1, 7, 0, 50, 14, 13, 5, 7, 1, + 37, 23, 5, 13, 4, 7, 1, 37, 23, 4, 13, 1, 13, 4, 16, 54, 21, 7, 1, 23, + 4, 13, 3, 15, 7, 32, 52, 43, 13, 1, 13, 4, 13, 5, 37, 15, 8, 22, 0, 2, + 1, 1, 26, 15, 9, 13, 2, 13, 1, 13, 4, 13, 5, 37, 16, 2, 0, 2, 13, 1, + 13, 4, 13, 5, 37, 16, 11, 10, 13, 2, 26, 50, 79, 15, 9, 13, 2, 13, 1, 13, + 4, 16, 2, 0, 2, 13, 1, 13, 4, 16, 11, 10, 13, 2, 26, 13, 4, 7, 1, 37, + 23, 4, 13, 3, 15, 7, 32, 52, 43, 13, 1, 13, 4, 13, 5, 37, 15, 8, 22, 0, + 2, 1, 1, 26, 15, 9, 13, 2, 13, 1, 13, 4, 13, 5, 37, 16, 2, 0, 2, 13, + 1, 13, 4, 13, 5, 37, 16, 11, 10, 13, 2, 26, 13, 4, 13, 5, 34, 54, 86, 13, + 2, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 11, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 66,111,120, 69,108,101, +109,101,110,116, 0, 2, 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, + 0, 2,105, 0, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 89, 69, 83, 0, 2, 0, 0, 0, 8,105,117,112,102,105,108,108, 0, 2, 0, 0, + 0, 10, 73,117,112, 65,112,112,101,110,100, 0, 2, 0, 0, 0, 11, 73, 85, 80, + 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, + 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 66,111,120, 69,108,101,109,101, +110,116, 0, 4, 0, 0, 1,146, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, + 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14,105,117,112, + 67,114,101, 97,116,101, 72, 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,104, + 98,111,120, 0, 4, 0, 0, 1,150, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,104, + 98,111,120, 0, 2, 0, 0, 0, 7,101,100,104, 98,111,120, 0, 4, 0, 0, 1, +156, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 19, 4, 1, 13, 0, 11, 1, 15, 2, 26, 15, 3, + 20, 4, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, 8, + 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, + 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, + 0, 0, 8,101,100,102,105,101,108,100, 0, 4, 0, 0, 1,162, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0,123, 7, 1, 4, 1, 15, 3, 13, 0, 18, 4, 2, 1, 1, 46, 9, 15, + 5, 13, 0, 18, 4, 2, 1, 1, 52, 19, 15, 6, 22, 1, 11, 7, 13, 0, 18, 4, + 30, 0, 2, 1, 1, 23, 1, 50, 7, 15, 8, 11, 9, 2, 0, 1, 13, 0, 18, 10, + 52, 19, 15, 11, 22, 1, 11, 10, 13, 0, 18, 10, 30, 0, 2, 1, 1, 23, 2, 50, + 17, 15, 11, 22, 1, 11, 10, 13, 0, 18, 12, 30, 0, 2, 1, 1, 23, 2, 13, 2, + 48, 2, 13, 1, 52, 16, 15, 13, 22, 2, 13, 1, 13, 2, 29, 0, 2, 3, 3, 1, + 50, 4, 4, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 2, +102, 0, 2, 0, 0, 0, 2,108, 0, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 7,112,114, +111,109,112,116, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,110,117,109, 98,101, +114, 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 2, 0, 0, 0, + 6,116,105,116,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, + 0, 0, 55,112, 97,114, 97,109,101,116,101,114, 32,112,114,111,109,112,116, 32, +104, 97,115, 32,119,114,111,110,103, 32,118, 97,108,117,101, 32,111,114, 32,105, +115, 32,110,111,116, 32,105,110,105,116,105, 97,108,105,122,101,100, 0, 2, 0, + 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 8,105,117,112,116,101,120, +116, 0, 2, 0, 0, 0, 7,110,118, 97,108,117,101, 0, 2, 0, 0, 0, 7,101, +100,104, 98,111,120, 0, 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 4, + 0, 0, 1,185, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97, +116,101, 86, 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,118, 98,111,120, 0, + 4, 0, 0, 1,189, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,118, 98,111,120, 0, + 2, 0, 0, 0, 7,101,100,118, 98,111,120, 0, 4, 0, 0, 1,195, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 19, 4, 1, 13, 0, 11, 1, 15, 2, 26, 15, 3, 20, 4, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 89, 69, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 8, 73, + 85, 80, 90, 66, 79, 88, 0, 4, 0, 0, 1,204, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, + 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, + 14,105,117,112, 67,114,101, 97,116,101, 90, 98,111,120, 0, 2, 0, 0, 0, 8, +105,117,112,122, 98,111,120, 0, 4, 0, 0, 1,208, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 44, 6, 1, 15, 2, 20, 3, 13, 0, 2, 1, 2, 7, 1, 50, 17, 15, 5, 13, 1, + 13, 2, 16, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 13, 0, 13, 2, 16, 54, 24, + 13, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 8, 73, + 85, 80, 90, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99, +116,111,114, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 11,105,117,112, 83, +101,116, 78, 97,109,101, 0, 2, 0, 0, 0, 5,122, 98,111,120, 0, 2, 0, 0, + 0, 8, 73, 85, 80, 70, 73, 76, 76, 0, 4, 0, 0, 1,223, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97, +116,101, 70,105,108,108, 0, 2, 0, 0, 0, 8,105,117,112,102,105,108,108, 0, + 4, 0, 0, 1,227, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 70, 73, 76, 76, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,102,105,108,108, 0, + 2, 0, 0, 0, 10, 73, 85, 80, 66, 85, 84, 84, 79, 78, 0, 2, 0, 0, 0, 5, +116,121,112,101, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 4, 0, 0, 1,236, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 32, 5, 2, 13, 1, 18, 1, 44, 48, 4, 13, 1, 18, 2, 52, + 7, 13, 1, 11, 1, 11, 3, 26, 15, 4, 13, 1, 18, 1, 3, 2, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 2, 0, 0, + 0, 1, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 66,117,116, +116,111,110, 0, 2, 0, 0, 0, 10,105,117,112, 98,117,116,116,111,110, 0, 4, + 0, 0, 1,243, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 10, 73, 85, 80, 66, 85, 84, 84, 79, 78, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7, 98,117,116,116, +111,110, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 4, 0, 0, 1, +252, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105, +117,112, 67,114,101, 97,116,101, 84,101,120,116, 0, 2, 0, 0, 0, 8,105,117, +112,116,101,120,116, 0, 4, 0, 0, 2, 0, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 2, + 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, + 5,116,101,120,116, 0, 2, 0, 0, 0, 13, 73, 85, 80, 77, 85, 76, 84, 73, 76, + 73, 78, 69, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 4, 0, 0, + 2, 9, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 19, +105,117,112, 67,114,101, 97,116,101, 77,117,108,116,105, 76,105,110,101, 0, 2, + 0, 0, 0, 13,105,117,112,109,117,108,116,105,108,105,110,101, 0, 4, 0, 0, + 2, 13, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 77, 85, 76, 84, 73, 76, 73, 78, 69, 0, 2, 0, 0, 0, 12, + 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,109,117,108, +116,105,108,105,110,101, 0, 2, 0, 0, 0, 9, 73, 85, 80, 76, 65, 66, 69, 76, + 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 4, 0, 0, 2, 22, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 32, 5, 2, 13, 1, 18, 1, 44, 48, 4, 13, 1, 18, 2, 52, 7, + 13, 1, 11, 1, 11, 3, 26, 15, 4, 13, 1, 18, 1, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 6,116, +105,116,108,101, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 2, 0, 0, 0, + 1, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 76, 97, 98,101, +108, 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 4, 0, 0, 2, + 29, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 76, 65, 66, 69, 76, 0, 2, 0, 0, 0, 12, 67,111,110,115,116, +114,117, 99,116,111,114, 0, 2, 0, 0, 0, 6,108, 97, 98,101,108, 0, 2, 0, + 0, 0, 10, 73, 85, 80, 84, 79, 71, 71, 76, 69, 0, 2, 0, 0, 0, 10, 73, 85, + 80, 66, 85, 84, 84, 79, 78, 0, 4, 0, 0, 2, 38, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 12, 4, 2, 15, 1, 13, 1, 18, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114, +101, 97,116,101, 84,111,103,103,108,101, 0, 2, 0, 0, 0, 6,116,105,116,108, +101, 0, 2, 0, 0, 0, 10,105,117,112,116,111,103,103,108,101, 0, 4, 0, 0, + 2, 42, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, + 0, 10, 73, 85, 80, 84, 79, 71, 71, 76, 69, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7,116,111,103,103,108,101, + 0, 2, 0, 0, 0, 8, 73, 85, 80, 73, 84, 69, 77, 0, 4, 0, 0, 2, 51, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 12, 4, 2, 15, 1, 13, 1, 18, 2, 3, 2, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 14,105,117,112, 67,114,101, 97,116,101, 73,116,101,109, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 8,105,117,112,105,116,101,109, 0, 4, + 0, 0, 2, 55, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 73, 84, 69, 77, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,105,116,101,109, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 83, 85, 66, 77, 69, 78, 85, 0, 2, 0, 0, 0, 10, +116,121,112,101, 95,109,101,110,117, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 4, 0, 0, 2, 64, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 31, 6, 2, 15, 2, 13, 1, + 18, 3, 13, 1, 7, 1, 16, 2, 1, 2, 13, 1, 7, 1, 16, 11, 4, 13, 2, 26, + 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 2,104, 0, 2, 0, 0, 0, 17,105,117,112, 67,114,101, + 97,116,101, 83,117, 98,109,101,110,117, 0, 2, 0, 0, 0, 6,116,105,116,108, +101, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 11,105,117,112,115,117, 98,109,101,110,117, 0, 4, 0, 0, 2, 70, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 83, 85, 66, 77, 69, 78, 85, 0, 2, 0, 0, 0, 12, 67,111,110,115,116, +114,117, 99,116,111,114, 0, 2, 0, 0, 0, 8,115,117, 98,109,101,110,117, 0, + 2, 0, 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 4, 0, + 0, 2, 79, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 19,105,117,112, 67,114,101, 97,116,101, 83,101,112, 97,114, 97,116,111,114, 0, + 2, 0, 0, 0, 13,105,117,112,115,101,112, 97,114, 97,116,111,114, 0, 4, 0, + 0, 2, 83, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,115,101, +112, 97,114, 97,116,111,114, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 73, 76, 69, + 68, 76, 71, 0, 4, 0, 0, 2, 92, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, + 2, 96, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 17,105,117,112, 67,114,101, 97,116,101, + 70,105,108,101, 68,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105,108,101, +100,108,103, 0, 4, 0, 0, 2,100, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 73, 76, 69, 68, 76, 71, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 14, 73, 85, 80, 77, 69, + 83, 83, 65, 71, 69, 68, 76, 71, 0, 4, 0, 0, 2,109, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 2, 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, + 0, 0, 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108, +102, 0, 4, 0, 0, 2,113, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 20,105,117,112, 67, +114,101, 97,116,101, 77,101,115,115, 97,103,101, 68,108,103, 0, 2, 0, 0, 0, + 14,105,117,112,109,101,115,115, 97,103,101,100,108,103, 0, 4, 0, 0, 2,117, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 14, + 73, 85, 80, 77, 69, 83, 83, 65, 71, 69, 68, 76, 71, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 11,109,101,115,115, + 97,103,101,100,108,103, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, + 68, 76, 71, 0, 4, 0, 0, 2,126, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, + 2,130, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 18,105,117,112, 67,114,101, 97,116,101, + 67,111,108,111,114, 68,108,103, 0, 2, 0, 0, 0, 12,105,117,112, 99,111,108, +111,114,100,108,103, 0, 4, 0, 0, 2,134, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 68, + 76, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 9, 99,111,108,111,114,100,108,103, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 70, 79, 78, 84, 68, 76, 71, 0, 4, 0, 0, 2,143, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 2, 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, + 0, 0, 0, 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 4, 0, 0, 2,147, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, + 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 17,105,117,112, + 67,114,101, 97,116,101, 70,111,110,116, 68,108,103, 0, 2, 0, 0, 0, 11,105, +117,112,102,111,110,116,100,108,103, 0, 4, 0, 0, 2,151, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 79, + 78, 84, 68, 76, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116, +111,114, 0, 2, 0, 0, 0, 8,102,111,110,116,100,108,103, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 85, 83, 69, 82, 0, 4, 0, 0, 2,160, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, + 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 85,115,101,114, 0, 2, 0, 0, + 0, 8,105,117,112,117,115,101,114, 0, 4, 0, 0, 2,164, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 10, 2, 0, 15, 0, 20, 1, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 0, 0, 0, 8, 73, 85, 80, 85, 83, 69, 82, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,117,115,101,114, + 0, 2, 0, 0, 0, 14, 73, 85, 80, 78, 79, 82, 77, 65, 76, 73, 90, 69, 82, 0, + 4, 0, 0, 2,173, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 47, 6, 2, 7, 1, 50, 33, 15, + 2, 13, 1, 13, 2, 16, 2, 1, 1, 44, 52, 13, 15, 3, 11, 4, 13, 2, 42, 11, + 5, 42, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 13, 1, 13, 2, 16, 54, 40, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, + 0, 2,105, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, + 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, + 97,109,101,116,101,114, 32, 0, 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114, +111,110,103, 32,118, 97,108,117,101, 32,111,114, 32,105,115, 32,110,111,116, 32, +105,110,105,116,105, 97,108,105,122,101,100, 0, 4, 0, 0, 2,183, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 40, 8, 2, 15, 2, 2, 1, 0, 7, 1, 50, 17, 13, 2, 11, 4, + 13, 1, 13, 3, 16, 26, 13, 3, 7, 1, 37, 23, 3, 13, 1, 13, 3, 16, 54, 24, + 13, 2, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 20,105, +117,112, 67,114,101, 97,116,101, 78,111,114,109, 97,108,105,122,101,114, 0, 2, + 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 11, 97,100,100, 99,111,110,116,114,111, +108, 0, 2, 0, 0, 0, 14,105,117,112,110,111,114,109, 97,108,105,122,101,114, + 0, 4, 0, 0, 2,193, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 10, 2, 0, 15, 0, 20, 1, + 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 14, 73, 85, 80, + 78, 79, 82, 77, 65, 76, 73, 90, 69, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 11,110,111,114,109, 97,108,105, +122,101,114, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, 2, 0, + 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 2,202, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, 1, + 13, 1, 7, 1, 16, 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 2,104, 0, 2, + 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 70,114, 97,109,101, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 9, +105,117,112,102,114, 97,109,101, 0, 4, 0, 0, 2,208, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, + 77, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 6,102,114, 97,109,101, 0, 2, 0, 0, 0, 10, 73, 85, 80, 67, + 65, 78, 86, 65, 83, 0, 4, 0, 0, 2,217, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, + 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 67, 97, +110,118, 97,115, 0, 2, 0, 0, 0, 10,105,117,112, 99, 97,110,118, 97,115, 0, + 4, 0, 0, 2,221, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 10, 73, 85, 80, 67, 65, 78, 86, 65, 83, 0, 2, 0, 0, 0, 12, + 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7, 99, 97,110, +118, 97,115, 0, 2, 0, 0, 0, 8, 73, 85, 80, 76, 73, 83, 84, 0, 4, 0, 0, + 2,230, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14, +105,117,112, 67,114,101, 97,116,101, 76,105,115,116, 0, 4, 0, 0, 2,234, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 42, 6, 2, 15, 1, 13, 1, 2, 1, 1, 11, 2, 32, 52, + 16, 15, 3, 13, 0, 18, 5, 11, 6, 13, 1, 42, 3, 2, 2, 50, 11, 15, 7, 18, + 8, 13, 0, 13, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, + 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, + 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101, +116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, + 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 1, 0, 2, + 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 4,103,101,116, 0, + 4, 0, 0, 2,242, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 90, 8, 3, 15, 2, 13, 1, 2, + 1, 1, 11, 3, 32, 52, 62, 15, 4, 13, 2, 2, 1, 1, 46, 7, 15, 5, 13, 2, + 2, 1, 1, 52, 21, 15, 6, 13, 0, 18, 8, 11, 9, 13, 1, 42, 11, 9, 13, 2, + 42, 3, 3, 3, 50, 23, 13, 2, 4, 0, 32, 52, 16, 15, 6, 13, 0, 18, 8, 11, + 9, 13, 1, 42, 13, 2, 3, 3, 3, 15, 10, 18, 11, 13, 0, 13, 1, 13, 2, 3, + 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 6,105,110,100,101, +120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 5,116,121, +112,101, 0, 2, 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 12,116,121,112, +101, 95,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 1, 0, 2, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 4,115,101,116, 0, 2, + 0, 0, 0, 8,105,117,112,108,105,115,116, 0, 4, 0, 0, 2,253, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 76, 73, 83, 84, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 5,108,105,115,116, 0, 2, 0, 0, 0, 9, 73, 85, 80, + 73, 77, 65, 71, 69, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, + 0, 3, 6, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0,116, 8, 2, 7, 1, 50, 92, 7, 1, 50, + 32, 15, 3, 13, 1, 13, 2, 16, 13, 3, 16, 2, 1, 1, 11, 4, 31, 52, 7, 15, + 5, 11, 6, 2, 0, 1, 13, 3, 7, 1, 37, 23, 3, 13, 1, 13, 2, 16, 13, 3, + 16, 54, 42, 13, 1, 18, 7, 48, 10, 13, 3, 7, 1, 38, 13, 1, 18, 7, 31, 52, + 9, 15, 5, 11, 8, 2, 0, 1, 50, 10, 13, 1, 11, 7, 13, 3, 7, 1, 38, 26, + 13, 2, 7, 1, 37, 23, 2, 5, 1, 13, 1, 13, 2, 16, 54, 99, 13, 1, 11, 9, + 13, 2, 7, 1, 38, 26, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 2,106, 0, 2, 0, + 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 7,110,117,109, 98,101,114, 0, + 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 38,110,111,110, 45, +110,117,109,101,114,105, 99, 32,118, 97,108,117,101, 32,105,110, 32,105,109, 97, +103,101, 32,100,101,102,105,110,105,116,105,111,110, 0, 2, 0, 0, 0, 6,119, +105,100,116,104, 0, 2, 0, 0, 0, 26,105,110, 99,111,110,115,105,115,116,101, +110,116, 32,105,109, 97,103,101, 32,108,101,110,103,104,116, 0, 2, 0, 0, 0, + 7,104,101,105,103,104,116, 0, 4, 0, 0, 3, 29, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 74, 9, 2, 15, 2, 13, 1, 18, 3, 13, 1, 18, 4, 13, 1, 2, 1, 3, 15, 5, + 13, 1, 18, 6, 2, 1, 1, 11, 7, 32, 52, 38, 7, 1, 50, 23, 15, 9, 13, 2, + 13, 3, 13, 1, 18, 6, 13, 3, 16, 2, 0, 3, 13, 3, 7, 1, 37, 23, 3, 13, + 1, 18, 6, 13, 3, 16, 54, 32, 5, 1, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110, +100,108,101, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 73,109, + 97,103,101, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, 0, 7, +104,101,105,103,104,116, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, + 0, 7, 99,111,108,111,114,115, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, + 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 9,105,117,112,105,109, 97,103, +101, 0, 4, 0, 0, 3, 41, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, + 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2, +111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 73, 77, 65, 71, 69, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 6,105,109, + 97,103,101, 0, 2, 0, 0, 0, 12, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, + 0, 4, 0, 0, 3, 49, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 20, 6, 2, 15, 1, 13, 1, + 18, 2, 13, 1, 18, 3, 13, 1, 18, 4, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 18,105,117,112, 67, +114,101, 97,116,101, 73,109, 97,103,101, 82, 71, 66, 0, 2, 0, 0, 0, 6,119, +105,100,116,104, 0, 2, 0, 0, 0, 7,104,101,105,103,104,116, 0, 2, 0, 0, + 0, 7,112,105,120,101,108,115, 0, 2, 0, 0, 0, 12,105,117,112,105,109, 97, +103,101,114,103, 98, 0, 4, 0, 0, 3, 53, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 73, 77, 65, 71, 69, 82, + 71, 66, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 9,105,109, 97,103,101,114,103, 98, 0, 2, 0, 0, 0, 13, 73, + 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, 65, 0, 4, 0, 0, 3, 61, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 20, 6, 2, 15, 1, 13, 1, 18, 2, 13, 1, 18, 3, 13, 1, 18, + 4, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 19,105,117,112, 67,114,101, 97,116,101, 73,109, 97,103, +101, 82, 71, 66, 65, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, + 0, 7,104,101,105,103,104,116, 0, 2, 0, 0, 0, 7,112,105,120,101,108,115, + 0, 2, 0, 0, 0, 13,105,117,112,105,109, 97,103,101,114,103, 98, 97, 0, 4, + 0, 0, 3, 65, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 13, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, 65, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,105, +109, 97,103,101,114,103, 98, 97, 0, 2, 0, 0, 0, 15, 73, 85, 80, 80, 82, 79, + 71, 82, 69, 83, 83, 66, 65, 82, 0, 4, 0, 0, 3, 74, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, + 0, 0, 21,105,117,112, 67,114,101, 97,116,101, 80,114,111,103,114,101,115,115, + 66, 97,114, 0, 2, 0, 0, 0, 15,105,117,112,112,114,111,103,114,101,115,115, + 98, 97,114, 0, 4, 0, 0, 3, 78, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 15, 73, 85, 80, 80, 82, 79, 71, 82, 69, 83, 83, + 66, 65, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, + 0, 2, 0, 0, 0, 12,112,114,111,103,114,101,115,115, 98, 97,114, 0, 2, 0, + 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, + 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 7, 65, 67, 84, 73, 79, 78, + 0, 2, 0, 0, 0, 9, 97, 99,116,105,111,110, 99, 98, 0, 2, 0, 0, 0, 10, + 65, 67, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 9,103,101,116,102,111, + 99,117,115, 0, 2, 0, 0, 0, 12, 71, 69, 84, 70, 79, 67, 85, 83, 95, 67, 66, + 0, 2, 0, 0, 0, 16,105,117,112, 95,103,101,116,102,111, 99,117,115, 95, 99, + 98, 0, 2, 0, 0, 0, 10,107,105,108,108,102,111, 99,117,115, 0, 2, 0, 0, + 0, 13, 75, 73, 76, 76, 70, 79, 67, 85, 83, 95, 67, 66, 0, 2, 0, 0, 0, 17, +105,117,112, 95,107,105,108,108,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, + 0, 6,102,111, 99,117,115, 0, 2, 0, 0, 0, 9, 70, 79, 67, 85, 83, 95, 67, + 66, 0, 2, 0, 0, 0, 13,105,117,112, 95,102,111, 99,117,115, 95, 99, 98, 0, + 2, 0, 0, 0, 6,107, 95, 97,110,121, 0, 2, 0, 0, 0, 6, 75, 95, 65, 78, + 89, 0, 2, 0, 0, 0, 10,105,117,112, 95,107, 95, 97,110,121, 0, 2, 0, 0, + 0, 5,104,101,108,112, 0, 2, 0, 0, 0, 8, 72, 69, 76, 80, 95, 67, 66, 0, + 2, 0, 0, 0, 12,105,117,112, 95,104,101,108,112, 95, 99, 98, 0, 2, 0, 0, + 0, 8, 99, 97,114,101,116, 99, 98, 0, 2, 0, 0, 0, 9, 67, 65, 82, 69, 84, + 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95, 99, 97,114,101,116, 95, 99, + 98, 0, 2, 0, 0, 0, 9,107,101,121,112,114,101,115,115, 0, 2, 0, 0, 0, + 12, 75, 69, 89, 80, 82, 69, 83, 83, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117, +112, 95,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, 0, 7,115, + 99,114,111,108,108, 0, 2, 0, 0, 0, 10, 83, 67, 82, 79, 76, 76, 95, 67, 66, + 0, 2, 0, 0, 0, 14,105,117,112, 95,115, 99,114,111,108,108, 95, 99, 98, 0, + 2, 0, 0, 0, 10,116,114, 97,121, 99,108,105, 99,107, 0, 2, 0, 0, 0, 13, + 84, 82, 65, 89, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117, +112, 95,116,114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 6, + 99,108,111,115,101, 0, 2, 0, 0, 0, 9, 67, 76, 79, 83, 69, 95, 67, 66, 0, + 2, 0, 0, 0, 13,105,117,112, 95, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, + 0, 0, 5,111,112,101,110, 0, 2, 0, 0, 0, 8, 79, 80, 69, 78, 95, 67, 66, + 0, 2, 0, 0, 0, 12,105,117,112, 95,111,112,101,110, 95, 99, 98, 0, 2, 0, + 0, 0, 7,115,104,111,119, 99, 98, 0, 2, 0, 0, 0, 8, 83, 72, 79, 87, 95, + 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,115,104,111,119, 95, 99, 98, 0, + 2, 0, 0, 0, 6,109, 97,112, 99, 98, 0, 2, 0, 0, 0, 7, 77, 65, 80, 95, + 67, 66, 0, 2, 0, 0, 0, 11,105,117,112, 95,109, 97,112, 95, 99, 98, 0, 2, + 0, 0, 0, 8,117,110,109, 97,112, 99, 98, 0, 2, 0, 0, 0, 9, 85, 78, 77, + 65, 80, 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95,117,110,109, 97,112, + 95, 99, 98, 0, 2, 0, 0, 0, 10,100,114,111,112,102,105,108,101,115, 0, 2, + 0, 0, 0, 13, 68, 82, 79, 80, 70, 73, 76, 69, 83, 95, 67, 66, 0, 2, 0, 0, + 0, 17,105,117,112, 95,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 2, + 0, 0, 0, 10,109,101,110,117, 99,108,111,115,101, 0, 2, 0, 0, 0, 13, 77, + 69, 78, 85, 67, 76, 79, 83, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, + 95,109,101,110,117, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 10,104, +105,103,104,108,105,103,104,116, 0, 2, 0, 0, 0, 13, 72, 73, 71, 72, 76, 73, + 71, 72, 84, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,104,105,103,104, +108,105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 4,119,111,109, 0, 2, 0, + 0, 0, 7, 87, 79, 77, 95, 67, 66, 0, 2, 0, 0, 0, 11,105,117,112, 95,119, +111,109, 95, 99, 98, 0, 2, 0, 0, 0, 6,119,104,101,101,108, 0, 2, 0, 0, + 0, 9, 87, 72, 69, 69, 76, 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95, +119,104,101,101,108, 95, 99, 98, 0, 2, 0, 0, 0, 10, 66, 85, 84, 84, 79, 78, + 95, 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95, 98,117,116,116,111,110, 95, + 99, 98, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, 2, 0, 0, 0, 10, + 82, 69, 83, 73, 90, 69, 95, 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95,114, +101,115,105,122,101, 95, 99, 98, 0, 2, 0, 0, 0, 5,109,111,118,101, 0, 2, + 0, 0, 0, 12,105,117,112, 95,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, + 7,109,111,116,105,111,110, 0, 2, 0, 0, 0, 10, 77, 79, 84, 73, 79, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95,109,111,116,105,111,110, 95, 99, + 98, 0, 2, 0, 0, 0, 12,101,110,116,101,114,119,105,110,100,111,119, 0, 2, + 0, 0, 0, 15, 69, 78, 84, 69, 82, 87, 73, 78, 68, 79, 87, 95, 67, 66, 0, 2, + 0, 0, 0, 19,105,117,112, 95,101,110,116,101,114,119,105,110,100,111,119, 95, + 99, 98, 0, 2, 0, 0, 0, 12,108,101, 97,118,101,119,105,110,100,111,119, 0, + 2, 0, 0, 0, 15, 76, 69, 65, 86, 69, 87, 73, 78, 68, 79, 87, 95, 67, 66, 0, + 2, 0, 0, 0, 19,105,117,112, 95,108,101, 97,118,101,119,105,110,100,111,119, + 95, 99, 98, 0, 2, 0, 0, 0, 5,101,100,105,116, 0, 2, 0, 0, 0, 8, 69, + 68, 73, 84, 95, 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,101,100,105,116, + 95, 99, 98, 0, 2, 0, 0, 0, 12,109,117,108,116,105,115,101,108,101, 99,116, + 0, 2, 0, 0, 0, 15, 77, 85, 76, 84, 73, 83, 69, 76, 69, 67, 84, 95, 67, 66, + 0, 2, 0, 0, 0, 19,105,117,112, 95,109,117,108,116,105,115,101,108,101, 99, +116, 95, 99, 98, 0, 2, 0, 0, 0, 7,102,105,108,101, 99, 98, 0, 2, 0, 0, + 0, 8, 70, 73, 76, 69, 95, 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,102, +105,108,101, 95, 99, 98, 0, 2, 0, 0, 0, 14,109,100,105, 97, 99,116,105,118, + 97,116,101, 99, 98, 0, 2, 0, 0, 0, 15, 77, 68, 73, 65, 67, 84, 73, 86, 65, + 84, 69, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109,100,105, 97, 99, +116,105,118, 97,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 11,100,114,111,112,100, +111,119,110, 99, 98, 0, 2, 0, 0, 0, 12, 68, 82, 79, 80, 68, 79, 87, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,100,114,111,112,100,111,119,110, + 95, 99, 98, 0, 2, 0, 0, 0, 11,100, 98,108, 99,108,105, 99,107, 99, 98, 0, + 2, 0, 0, 0, 12, 68, 66, 76, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, + 0, 16,105,117,112, 95,100, 98,108, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, + 0, 0, 18,105,117,112, 95, 97, 99,116,105,111,110, 95,116,111,103,103,108,101, + 0, 2, 0, 0, 0, 16,105,117,112, 95, 97, 99,116,105,111,110, 95,116,101,120, +116, 0, 2, 0, 0, 0, 18,105,117,112, 95, 97, 99,116,105,111,110, 95, 98,117, +116,116,111,110, 0, 2, 0, 0, 0, 16,105,117,112, 95, 97, 99,116,105,111,110, + 95,108,105,115,116, 0, 2, 0, 0, 0, 18,105,117,112, 95, 97, 99,116,105,111, +110, 95, 99, 97,110,118, 97,115, 0, 2, 0, 0, 0, 17,105,117,112, 95, 97, 99, +116,105,111,110, 95,116,105,109,101,114, 0, 2, 0, 0, 0, 10, 97, 99,116,105, +111,110, 95, 99, 98, 0, 2, 0, 0, 0, 12,103,101,116,102,111, 99,117,115, 95, + 99, 98, 0, 2, 0, 0, 0, 13,107,105,108,108,102,111, 99,117,115, 95, 99, 98, + 0, 2, 0, 0, 0, 9,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, 0, 8, +104,101,108,112, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99, 97,114,101,116, 95, 99, + 98, 0, 2, 0, 0, 0, 12,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115, 99,114,111,108,108, 95, 99, 98, 0, 2, 0, 0, 0, 13,116, +114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99,108,111, +115,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,111,112,101,110, 95, 99, 98, 0, 2, + 0, 0, 0, 8,115,104,111,119, 95, 99, 98, 0, 2, 0, 0, 0, 7,109, 97,112, + 95, 99, 98, 0, 2, 0, 0, 0, 9,117,110,109, 97,112, 95, 99, 98, 0, 2, 0, + 0, 0, 13,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 2, 0, 0, 0, + 13,109,101,110,117, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 13,104, +105,103,104,108,105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 7,119,111,109, + 95, 99, 98, 0, 2, 0, 0, 0, 9,119,104,101,101,108, 95, 99, 98, 0, 2, 0, + 0, 0, 10, 98,117,116,116,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 10,114,101, +115,105,122,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,109,111,118,101, 95, 99, 98, + 0, 2, 0, 0, 0, 10,109,111,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, + 15,101,110,116,101,114,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, + 15,108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, + 8,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,117,108,116,105,115, +101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,100,105, 97, 99,116, +105,118, 97,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,102,105,108,101, 95, 99, + 98, 0, 2, 0, 0, 0, 12,100,114,111,112,100,111,119,110, 95, 99, 98, 0, 2, + 0, 0, 0, 12,100, 98,108, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, + 16,118, 97,108,117,101, 99,104, 97,110,103,101,100, 95, 99, 98, 0, 2, 0, 0, + 0, 15,118, 97,108,117,101, 99,104, 97,110,103,101,100, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/iuplua_widgets.lo"); +} diff --git a/iup/srclua3/loh/iuplua_widgets_be32.loh b/iup/srclua3/loh/iuplua_widgets_be32.loh new file mode 100755 index 0000000..4ed9835 --- /dev/null +++ b/iup/srclua3/loh/iuplua_widgets_be32.loh @@ -0,0 +1,939 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/iuplua_widgets_be32.lo"); +*/ +/* ../obj/iuplua3/iuplua_widgets_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 20, 64,105,117,112,108,117, + 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 7,202, 67, 0, + 22, 1, 11, 1, 22, 0, 30, 0, 25, 0, 15, 0, 11, 2, 11, 3, 26, 15, 0, 11, + 4, 11, 5, 26, 15, 0, 11, 6, 11, 7, 26, 15, 0, 11, 8, 11, 9, 26, 15, 0, + 11, 10, 11, 11, 26, 15, 0, 11, 12, 11, 13, 26, 15, 0, 11, 14, 11, 15, 26, 15, + 0, 11, 16, 11, 17, 26, 15, 0, 11, 18, 11, 19, 26, 15, 0, 11, 20, 11, 21, 26, + 15, 0, 11, 22, 11, 23, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, 24, 15, 24, 11, + 26, 11, 27, 26, 11, 29, 25, 28, 15, 30, 11, 31, 15, 28, 26, 22, 1, 11, 25, 15, + 0, 30, 0, 25, 32, 15, 32, 11, 26, 11, 33, 26, 11, 35, 25, 34, 15, 30, 11, 36, + 15, 34, 26, 22, 2, 11, 25, 15, 0, 11, 1, 22, 1, 15, 38, 29, 0, 1, 30, 1, + 25, 37, 15, 37, 11, 26, 11, 39, 26, 15, 37, 11, 40, 11, 41, 26, 15, 37, 11, 42, + 11, 43, 26, 15, 37, 11, 44, 11, 45, 26, 11, 47, 25, 46, 15, 30, 11, 48, 15, 46, + 26, 22, 2, 11, 25, 15, 0, 11, 1, 22, 1, 15, 38, 29, 0, 1, 30, 1, 25, 49, + 15, 49, 11, 26, 11, 50, 26, 11, 52, 25, 51, 15, 30, 11, 53, 15, 51, 26, 11, 55, + 25, 54, 11, 57, 25, 56, 11, 59, 25, 58, 22, 1, 11, 25, 15, 0, 30, 0, 25, 60, + 15, 60, 11, 4, 11, 61, 26, 15, 60, 11, 26, 11, 62, 26, 11, 64, 25, 63, 15, 30, + 11, 65, 15, 63, 26, 15, 66, 11, 44, 11, 67, 26, 22, 1, 11, 25, 15, 0, 30, 0, + 25, 68, 15, 68, 11, 4, 11, 69, 26, 15, 68, 11, 26, 11, 70, 26, 22, 1, 11, 25, + 15, 68, 30, 0, 25, 71, 15, 71, 11, 72, 11, 73, 26, 11, 75, 25, 74, 15, 30, 11, + 76, 15, 74, 26, 11, 78, 25, 77, 11, 80, 25, 79, 22, 1, 11, 25, 15, 68, 30, 0, + 25, 81, 15, 81, 11, 72, 11, 82, 26, 11, 84, 25, 83, 15, 30, 11, 85, 15, 83, 26, + 11, 87, 25, 86, 22, 1, 11, 25, 15, 68, 30, 0, 25, 88, 15, 88, 11, 72, 11, 89, + 26, 11, 91, 25, 90, 15, 30, 11, 92, 15, 90, 26, 22, 1, 11, 25, 15, 0, 30, 0, + 25, 93, 15, 93, 11, 26, 11, 94, 26, 11, 96, 25, 95, 15, 30, 11, 97, 15, 95, 26, + 22, 2, 11, 25, 15, 0, 11, 99, 22, 1, 11,100, 15,101, 30, 0, 30, 1, 25, 98, + 15, 98, 11, 26, 11,102, 26, 11,104, 25,103, 15, 30, 11,105, 15,103, 26, 22, 1, + 11, 25, 15, 0, 30, 0, 25,106, 15,106, 11, 26, 11,107, 26, 11,109, 25,108, 15, + 30, 11,110, 15,108, 26, 22, 1, 11, 25, 15,112, 30, 0, 25,111, 15,111, 11, 26, + 11,113, 26, 11,115, 25,114, 15, 30, 11,116, 15,114, 26, 22, 2, 11, 25, 15, 0, + 11, 99, 22, 1, 11,118, 15,101, 30, 0, 30, 1, 25,117, 15,117, 11, 26, 11,119, + 26, 11,121, 25,120, 15, 30, 11,122, 15,120, 26, 22, 1, 11, 25, 15,124, 30, 0, + 25,123, 15,123, 11, 26, 11,125, 26, 11,127, 25,126, 15, 30, 11,128, 15,126, 26, + 22, 1, 11, 25, 15,124, 30, 0, 25,129, 15,129, 11, 26, 11,130, 26, 11,132, 25, +131, 15, 30, 11,133, 15,131, 26, 22, 2, 11, 25, 15, 0, 11, 99, 22, 2, 15,135, + 29, 0, 1, 11,136, 15,101, 30, 0, 30, 1, 25,134, 15,134, 11, 26, 11,137, 26, + 11,139, 25,138, 15, 30, 11,140, 15,138, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, +141, 15,141, 11, 26, 11,142, 26, 11,144, 25,143, 15, 30, 11,145, 15,143, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,146, 15,146, 11, 44, 11,147, 26, 15,146, 11, 26, + 11,148, 26, 11,150, 25,149, 15, 30, 11,151, 15,149, 26, 22, 1, 11, 25, 15, 0, + 30, 0, 25,152, 15,152, 11, 44, 11,153, 26, 15,152, 11, 26, 11,154, 26, 11,156, + 25,155, 15, 30, 11,157, 15,155, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,158, 15, +158, 11, 44, 11,159, 26, 15,158, 11, 26, 11,160, 26, 11,162, 25,161, 15, 30, 11, +163, 15,161, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,164, 15,164, 11, 44, 11,165, + 26, 15,164, 11, 26, 11,166, 26, 11,168, 25,167, 15, 30, 11,169, 15,167, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,170, 15,170, 11, 26, 11,171, 26, 11,173, 25,172, + 15, 30, 11,174, 15,172, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,175, 15,175, 11, + 4, 11,176, 26, 15,175, 11, 26, 11,177, 26, 11,179, 25,178, 15, 30, 11,180, 15, +178, 26, 22, 2, 11, 25, 15, 0, 11, 99, 22, 1, 15,182, 29, 0, 1, 30, 1, 25, +181, 15,181, 11, 26, 11,183, 26, 11,185, 25,184, 15, 30, 11,186, 15,184, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,187, 15,187, 11, 26, 11,188, 26, 11,190, 25,189, + 15, 30, 11,191, 15,189, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,192, 15,192, 11, + 26, 11,193, 26, 15,192, 11, 8, 11,194, 26, 15,192, 11, 10, 11,195, 26, 11,197, + 25,196, 15, 30, 11,198, 15,196, 26, 22, 1, 11, 25, 15,200, 30, 0, 25,199, 15, +199, 11, 4, 11,201, 26, 15,199, 11, 26, 11,202, 26, 11,204, 25,203, 15, 30, 11, +205, 15,203, 26, 22, 1, 11, 25, 15,200, 30, 0, 25,206, 15,206, 11, 26, 11,207, + 26, 11,209, 25,208, 15, 30, 11,210, 15,208, 26, 22, 1, 11, 25, 15,200, 30, 0, + 25,211, 15,211, 11, 26, 11,212, 26, 11,214, 25,213, 15, 30, 11,215, 15,213, 26, + 22, 1, 11, 25, 15,200, 30, 0, 25,216, 15,216, 11, 26, 11,217, 26, 11,219, 25, +218, 15, 30, 11,220, 15,218, 26, 22, 33, 11,222, 22, 2, 11,223, 4, 0, 29, 0, + 2, 11,224, 22, 2, 11,225, 4, 0, 29, 0, 2, 11,226, 22, 2, 11,227, 15,228, + 29, 0, 2, 11,229, 22, 2, 11,230, 15,231, 29, 0, 2, 11,232, 22, 2, 11,233, + 15,234, 29, 0, 2, 11,235, 22, 2, 11,236, 15,237, 29, 0, 2, 11,238, 22, 2, + 11,239, 15,240, 29, 0, 2, 11,241, 22, 2, 11,242, 15,243, 29, 0, 2, 11,244, + 22, 2, 11,245, 15,246, 29, 0, 2, 11,247, 22, 2, 11,248, 15,249, 29, 0, 2, + 11,250, 22, 2, 11,251, 15,252, 29, 0, 2, 11,253, 22, 2, 11,254, 15,255, 29, + 0, 2, 10, 1, 0, 22, 2, 10, 1, 1, 14, 1, 2, 29, 0, 2, 10, 1, 3, 22, + 2, 10, 1, 4, 14, 1, 5, 29, 0, 2, 10, 1, 6, 22, 2, 10, 1, 7, 14, 1, + 8, 29, 0, 2, 10, 1, 9, 22, 2, 10, 1, 10, 14, 1, 11, 29, 0, 2, 10, 1, + 12, 22, 2, 10, 1, 13, 14, 1, 14, 29, 0, 2, 10, 1, 15, 22, 2, 10, 1, 16, + 14, 1, 17, 29, 0, 2, 10, 1, 18, 22, 2, 10, 1, 19, 14, 1, 20, 29, 0, 2, + 10, 1, 21, 22, 2, 10, 1, 22, 14, 1, 23, 29, 0, 2, 10, 1, 24, 22, 2, 10, + 1, 25, 14, 1, 26, 29, 0, 2, 11,105, 22, 2, 10, 1, 27, 14, 1, 28, 29, 0, + 2, 10, 1, 29, 22, 2, 10, 1, 30, 14, 1, 31, 29, 0, 2, 10, 1, 32, 22, 2, + 10, 1, 30, 14, 1, 33, 29, 0, 2, 10, 1, 34, 22, 2, 10, 1, 35, 14, 1, 36, + 29, 0, 2, 10, 1, 37, 22, 2, 10, 1, 38, 14, 1, 39, 29, 0, 2, 10, 1, 40, + 22, 2, 10, 1, 41, 14, 1, 42, 29, 0, 2, 10, 1, 43, 22, 2, 10, 1, 44, 14, + 1, 45, 29, 0, 2, 10, 1, 46, 22, 2, 10, 1, 47, 14, 1, 48, 29, 0, 2, 10, + 1, 49, 22, 2, 10, 1, 50, 14, 1, 51, 29, 0, 2, 10, 1, 52, 22, 2, 10, 1, + 53, 14, 1, 54, 29, 0, 2, 10, 1, 55, 22, 2, 10, 1, 56, 14, 1, 57, 29, 0, + 2, 30, 31, 10, 1, 58, 22, 2, 10, 1, 59, 14, 1, 60, 29, 0, 2, 30, 0, 25, +221, 15,221, 18,222, 11,128, 14, 1, 61, 26, 15,221, 18,222, 11,116, 14, 1, 62, + 26, 15,221, 18,222, 11,110, 14, 1, 62, 26, 15,221, 18,222, 11,105, 14, 1, 63, + 26, 15,221, 18,222, 11,198, 14, 1, 64, 26, 15,221, 18,222, 11,133, 14, 1, 63, + 26, 15,221, 18,222, 11,191, 14, 1, 65, 26, 15,221, 18,224, 11, 31, 14, 1, 66, + 26, 15,221, 10, 1, 67, 15,221, 18,224, 26, 15,221, 10, 1, 68, 15,221, 18,226, + 26, 15,221, 10, 1, 69, 15,221, 18,229, 26, 15,221, 10, 1, 70, 15,221, 18,232, + 26, 15,221, 11,235, 15,221, 18,235, 26, 15,221, 10, 1, 71, 15,221, 18,238, 26, + 15,221, 10, 1, 72, 15,221, 18,241, 26, 15,221, 10, 1, 73, 15,221, 18,244, 26, + 15,221, 10, 1, 74, 15,221, 18,247, 26, 15,221, 10, 1, 75, 15,221, 18,250, 26, + 15,221, 10, 1, 76, 15,221, 18,253, 26, 15,221, 10, 1, 77, 15,221, 17, 1, 0, + 26, 15,221, 10, 1, 78, 15,221, 17, 1, 3, 26, 15,221, 10, 1, 79, 15,221, 17, + 1, 6, 26, 15,221, 10, 1, 80, 15,221, 17, 1, 9, 26, 15,221, 10, 1, 81, 15, +221, 17, 1, 12, 26, 15,221, 10, 1, 82, 15,221, 17, 1, 15, 26, 15,221, 10, 1, + 83, 15,221, 17, 1, 18, 26, 15,221, 10, 1, 84, 15,221, 17, 1, 21, 26, 15,221, + 10, 1, 85, 15,221, 17, 1, 24, 26, 15,221, 10, 1, 86, 15,221, 18,105, 26, 15, +221, 10, 1, 87, 15,221, 17, 1, 29, 26, 15,221, 10, 1, 88, 15,221, 17, 1, 32, + 26, 15,221, 10, 1, 89, 15,221, 17, 1, 34, 26, 15,221, 10, 1, 90, 15,221, 17, + 1, 37, 26, 15,221, 10, 1, 91, 15,221, 17, 1, 40, 26, 15,221, 10, 1, 92, 15, +221, 17, 1, 43, 26, 15,221, 10, 1, 93, 15,221, 17, 1, 46, 26, 15,221, 10, 1, + 94, 15,221, 17, 1, 52, 26, 15,221, 10, 1, 95, 15,221, 17, 1, 49, 26, 15,221, + 10, 1, 96, 15,221, 17, 1, 55, 26, 15,221, 10, 1, 97, 15,221, 17, 1, 58, 26, + 15,221, 10, 1, 98, 15,221, 17, 1, 99, 26, 0, 0, 0, 0, 0, 0, 0, 1,100, + 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 5,116,121,112, +101, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 4, + 0, 0, 0, 12, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 57, 7, 2, 13, 1, 11, 1, 13, 0, + 26, 13, 0, 20, 3, 13, 1, 2, 0, 2, 13, 1, 11, 4, 13, 0, 20, 5, 13, 1, + 2, 1, 2, 26, 13, 0, 20, 6, 13, 1, 2, 0, 2, 15, 7, 13, 1, 18, 4, 13, + 1, 26, 13, 1, 18, 4, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 12, 99,104,101, 99,107, 80, 97, +114, 97,109,115, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, + 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 2, + 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 2, 0, + 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, 0, 12, + 99,104,101, 99,107, 80, 97,114, 97,109,115, 0, 4, 0, 0, 0, 32, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 61, 8, 2, 13, 0, 18, 1, 15, 5, 13, 2, 4, 0, 2, 2, 2, + 50, 39, 13, 4, 13, 1, 13, 3, 16, 2, 1, 1, 44, 52, 13, 15, 6, 11, 7, 13, + 3, 42, 11, 8, 42, 2, 0, 1, 15, 5, 13, 2, 13, 3, 2, 2, 2, 23, 4, 23, + 3, 13, 3, 54, 43, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 2, 0, 0, 0, 6,112, 97,114, 97,109, 0, 2, 0, 0, 0, 5,102, +117,110, 99, 0, 2, 0, 0, 0, 5,110,101,120,116, 0, 2, 0, 0, 0, 6,101, +114,114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, + 0, 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114,111,110,103, 32,118, 97,108, +117,101, 32,111,114, 32,105,115, 32,110,111,116, 32,105,110,105,116,105, 97,108, +105,122,101,100, 0, 2, 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98,117, +116,101,115, 0, 4, 0, 0, 0, 43, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 80, 9, 2, 22, + 0, 15, 3, 13, 1, 4, 0, 2, 1, 2, 50, 18, 13, 2, 13, 3, 7, 1, 26, 15, + 3, 13, 1, 13, 3, 2, 1, 2, 23, 3, 13, 3, 54, 22, 15, 3, 13, 2, 4, 0, + 2, 1, 2, 23, 3, 50, 25, 13, 1, 20, 4, 13, 3, 13, 1, 13, 3, 16, 2, 0, + 3, 15, 3, 13, 2, 13, 3, 2, 1, 2, 23, 3, 13, 3, 54, 29, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 5,116, +101,109,112, 0, 2, 0, 0, 0, 2,102, 0, 2, 0, 0, 0, 5,110,101,120,116, + 0, 2, 0, 0, 0, 4,115,101,116, 0, 2, 0, 0, 0, 4,103,101,116, 0, 4, + 0, 0, 0, 57, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 82, 6, 2, 15, 1, 13, 1, 2, 1, + 1, 52, 63, 15, 2, 13, 1, 16, 52, 9, 13, 0, 13, 1, 16, 1, 2, 50, 47, 15, + 5, 13, 1, 2, 1, 1, 15, 7, 13, 0, 18, 8, 13, 2, 2, 1, 2, 13, 3, 52, + 23, 15, 9, 13, 3, 2, 1, 1, 13, 4, 52, 6, 13, 4, 1, 5, 50, 4, 13, 3, + 1, 5, 5, 1, 5, 2, 13, 0, 13, 1, 16, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 10, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 12,116,121, +112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, + 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, + 0, 0, 0, 6, 73, 78, 68, 69, 88, 0, 2, 0, 0, 0, 9,115,116,114,117,112, +112,101,114, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 16, + 73,117,112, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, + 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 13, 73,117,112, 71,101,116, 72, + 97,110,100,108,101, 0, 2, 0, 0, 0, 4,115,101,116, 0, 4, 0, 0, 0, 77, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0,228, 11, 3, 15, 2, 13, 1, 2, 1, 1, 52,209, 15, + 4, 13, 1, 2, 1, 1, 15, 6, 13, 1, 16, 13, 1, 11, 7, 32, 48, 12, 15, 8, + 13, 0, 18, 10, 2, 1, 1, 11, 11, 32, 52, 4, 4, 0, 23, 4, 13, 4, 52, 55, + 13, 4, 7, 2, 16, 13, 5, 44, 52, 14, 13, 4, 15, 8, 13, 0, 18, 10, 2, 1, + 1, 16, 23, 5, 15, 13, 13, 0, 18, 10, 13, 4, 7, 1, 16, 13, 5, 13, 2, 2, + 0, 4, 13, 0, 13, 1, 13, 2, 26, 1, 6, 5, 1, 50,111, 15, 2, 13, 2, 2, + 1, 1, 46, 7, 15, 14, 13, 2, 2, 1, 1, 52, 17, 15, 15, 13, 0, 18, 10, 13, + 3, 13, 2, 2, 0, 3, 1, 5, 50, 76, 15, 16, 13, 2, 2, 1, 1, 52, 34, 15, + 18, 13, 0, 18, 10, 13, 3, 2, 1, 2, 13, 5, 52, 15, 15, 15, 13, 0, 18, 10, + 13, 3, 13, 2, 2, 0, 3, 1, 6, 5, 1, 50, 33, 15, 19, 13, 2, 2, 1, 1, + 52, 24, 15, 20, 13, 2, 2, 0, 1, 15, 15, 13, 0, 18, 10, 13, 3, 13, 2, 18, + 21, 2, 0, 3, 1, 5, 5, 2, 13, 0, 13, 1, 13, 2, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 6, +118, 97,108,117,101, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105, +110,103, 0, 2, 0, 0, 0, 6, 73, 78, 68, 69, 88, 0, 2, 0, 0, 0, 9,115, +116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 3, 99, 98, 0, 2, 0, 0, 0, + 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 7, +114,101,115,105,122,101, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 67,108, + 97,115,115, 78, 97,109,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, + 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 7,100,105, 97,108,111, +103, 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, 0, 0, 0, 15,105,117,112, + 83,101,116, 67, 97,108,108, 98, 97, 99,107, 0, 2, 0, 0, 0, 12,116,121,112, +101, 95,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 9,116,121,112,101, 95, +110,105,108, 0, 2, 0, 0, 0, 10,111,108,100, 95,118, 97,108,117,101, 0, 2, + 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, + 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, + 0, 11,105,117,112, 83,101,116, 78, 97,109,101, 0, 2, 0, 0, 0, 9, 73, 85, + 80, 95,110, 97,109,101, 0, 2, 0, 0, 0, 10,114, 95,100,101,115,116,114,111, +121, 0, 4, 0, 0, 0,113, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 89, 6, 1, 7, 1, 13, + 0, 13, 1, 16, 50, 66, 15, 3, 13, 2, 2, 1, 1, 48, 4, 13, 2, 18, 4, 52, + 37, 13, 2, 18, 4, 13, 0, 32, 52, 16, 13, 2, 11, 4, 4, 0, 26, 13, 2, 20, + 5, 2, 0, 1, 50, 12, 15, 6, 11, 7, 2, 0, 1, 15, 8, 2, 0, 0, 13, 1, + 7, 1, 37, 23, 1, 13, 0, 13, 1, 16, 23, 2, 13, 2, 54, 70, 15, 9, 13, 0, + 4, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 0, 0, 0, 2,105, 0, 2, + 0, 0, 0, 5,101,108,101,109, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, + 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, + 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 10,114, 95,100, +101,115,116,114,111,121, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, + 0, 0, 29, 73,110,116,101,114,110, 97,108, 32,116, 97, 98,108,101, 32,105,110, + 99,111,110,115,105,115,116,101,110, 99,121, 0, 2, 0, 0, 0, 5,101,120,105, +116, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, + 0, 0, 0, 8,100,101,115,116,114,111,121, 0, 4, 0, 0, 0,133, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 17, 3, 1, 13, 0, 20, 1, 2, 0, 1, 15, 2, 13, 0, 2, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 10,114, 95,100,101,115,116,114,111,121, 0, 2, 0, 0, 0, 11, + 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, 0, 0, 7,100,101,116, 97, + 99,104, 0, 4, 0, 0, 0,138, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 96, 8, 1, 15, 0, + 13, 0, 2, 0, 1, 13, 0, 18, 3, 13, 1, 52, 78, 13, 0, 11, 3, 4, 0, 26, + 7, 1, 50, 58, 13, 1, 13, 2, 16, 13, 0, 32, 52, 41, 50, 20, 13, 1, 13, 2, + 13, 1, 13, 2, 7, 1, 37, 16, 26, 13, 2, 7, 1, 37, 23, 2, 13, 1, 13, 2, + 7, 1, 37, 16, 54, 30, 13, 1, 13, 2, 4, 0, 26, 1, 3, 13, 2, 7, 1, 37, + 23, 2, 13, 1, 13, 2, 16, 54, 65, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 2, 0, 0, 0, 10, 73,117,112, 68,101,116, 97, 99,104, 0, 2, 0, 0, 0, 5, +115,101,108,102, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, + 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 2,105, 0, + 2, 0, 0, 0, 7, 97,112,112,101,110,100, 0, 4, 0, 0, 0,158, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 75, 6, 2, 15, 1, 13, 0, 13, 1, 2, 1, 2, 52, 57, 13, 1, + 11, 3, 13, 0, 26, 7, 1, 50, 21, 13, 0, 13, 2, 16, 13, 1, 32, 52, 4, 13, + 2, 1, 3, 13, 2, 7, 1, 37, 23, 2, 13, 0, 13, 2, 16, 54, 28, 15, 5, 13, + 0, 16, 13, 2, 13, 1, 26, 13, 2, 1, 3, 5, 1, 50, 4, 4, 0, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, + 73,117,112, 65,112,112,101,110,100, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 2,105, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, + 2, 0, 0, 0, 4,109, 97,112, 0, 4, 0, 0, 0,175, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 0, 0, 0, 7, 73,117,112, 77, 97,112, 0, 2, 0, 0, 0, 5,115,101,108, +102, 0, 2, 0, 0, 0, 5,104,105,100,101, 0, 4, 0, 0, 0,179, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 8, 73,117,112, 72,105,100,101, 0, 2, 0, 0, 0, + 5,115,101,108,102, 0, 2, 0, 0, 0, 9, 73, 85, 80, 84, 73, 77, 69, 82, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 17, 67,114,101, + 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0,187, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 15,105,117,112, + 67,114,101, 97,116,101, 84,105,109,101,114, 0, 2, 0, 0, 0, 9,105,117,112, +116,105,109,101,114, 0, 4, 0, 0, 0,191, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 84, 73, 77, 69, 82, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,116,105,109,101,114, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 67, 76, 73, 80, 66, 79, 65, 82, 68, 0, 4, 0, 0, 0,200, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 19,105,117, +112, 67,114,101, 97,116,101, 67,108,105,112, 98,111, 97,114,100, 0, 2, 0, 0, + 0, 13,105,117,112, 99,108,105,112, 98,111, 97,114,100, 0, 4, 0, 0, 0,204, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 13, + 73, 85, 80, 67, 76, 73, 80, 66, 79, 65, 82, 68, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10, 99,108,105,112, 98, +111, 97,114,100, 0, 2, 0, 0, 0, 10, 73, 85, 80, 68, 73, 65, 76, 79, 71, 0, + 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, + 0,213, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, + 1, 1, 13, 1, 7, 1, 16, 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, + 97,110,100,108,101, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, + 68,105, 97,108,111,103, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 5,115,104,111,119, 0, 4, 0, 0, 0,219, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 8, 73,117,112, 83,104,111,119, 0, 2, 0, 0, + 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 7,115,104,111,119,120,121, 0, 4, + 0, 0, 0,223, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, + 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, 0, 2,120, + 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 10, 73,117,112, 83,104,111,119, + 88, 89, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 6,112,111, +112,117,112, 0, 4, 0, 0, 0,227, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, + 0, 10,105,117,112,100,105, 97,108,111,103, 0, 4, 0, 0, 0,231, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, 73, 85, 80, + 68, 73, 65, 76, 79, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99, +116,111,114, 0, 2, 0, 0, 0, 7,100,105, 97,108,111,103, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 82, 65, 68, 73, 79, 0, 4, 0, 0, 0,240, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, 1, 13, 1, 7, 1, 16, + 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, + 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, + 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 82, 97,100,105,111, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 9, +105,117,112,114, 97,100,105,111, 0, 4, 0, 0, 0,246, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 26, 5, 1, 15, 2, 20, 3, 13, 0, 2, 1, 2, 15, 4, 13, 1, 7, 1, 16, + 2, 0, 1, 13, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 9, + 73, 85, 80, 82, 65, 68, 73, 79, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 23,105,117,112, 67,114,101, 97,116,101, + 67,104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 2, 0, 0, 0, 6,114, + 97,100,105,111, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, + 0, 4, 0, 0, 0,254, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,156, 11, 1, 22, 0, 7, 1, + 50, 61, 15, 3, 13, 0, 13, 2, 16, 2, 1, 1, 52, 29, 13, 1, 13, 2, 15, 4, + 22, 2, 11, 5, 13, 0, 13, 2, 16, 11, 6, 13, 0, 18, 6, 30, 1, 2, 1, 1, + 26, 50, 13, 15, 7, 11, 8, 13, 2, 42, 11, 9, 42, 2, 0, 1, 13, 2, 7, 1, + 37, 23, 2, 13, 0, 13, 2, 16, 54, 68, 13, 0, 18, 10, 52, 51, 7, 1, 50, 7, + 13, 3, 7, 1, 37, 23, 3, 13, 0, 13, 3, 16, 48, 10, 13, 0, 13, 3, 16, 13, + 0, 18, 10, 31, 54, 26, 13, 0, 13, 3, 16, 52, 10, 13, 1, 11, 10, 13, 1, 13, + 3, 16, 26, 5, 1, 50, 18, 13, 0, 18, 12, 52, 12, 13, 1, 11, 10, 13, 1, 13, + 0, 18, 12, 16, 26, 13, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, + 0, 0, 2,104, 0, 2, 0, 0, 0, 4,116,109,112, 0, 2, 0, 0, 0, 2,105, + 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, + 0, 0, 10,105,117,112,116,111,103,103,108,101, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, + 6,101,114,114,111,114, 0, 2, 0, 0, 0, 8,111,112,116,105,111,110, 32, 0, + 2, 0, 0, 0, 18, 32,109,117,115,116, 32, 98,101, 32, 97, 32,115,116,114,105, +110,103, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 2,106, + 0, 2, 0, 0, 0, 7,110,118, 97,108,117,101, 0, 2, 0, 0, 0, 9,101,100, +104,114, 97,100,105,111, 0, 4, 0, 0, 1, 26, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 35, + 6, 1, 15, 2, 13, 0, 2, 1, 1, 15, 3, 22, 2, 15, 4, 13, 1, 2, 1, 1, + 29, 0, 1, 11, 5, 13, 1, 18, 5, 30, 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8,116,111,103,103,108, +101,115, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, 0, 2, + 0, 0, 0, 9,105,117,112,114, 97,100,105,111, 0, 2, 0, 0, 0, 7,101,100, +104, 98,111,120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, + 9,101,100,118,114, 97,100,105,111, 0, 4, 0, 0, 1, 32, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 35, 6, 1, 15, 2, 13, 0, 2, 1, 1, 15, 3, 22, 2, 15, 4, 13, 1, + 2, 1, 1, 29, 0, 1, 11, 5, 13, 1, 18, 5, 30, 0, 3, 2, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8,116,111, +103,103,108,101,115, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101, +115, 0, 2, 0, 0, 0, 9,105,117,112,114, 97,100,105,111, 0, 2, 0, 0, 0, + 7,101,100,118, 98,111,120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, 85, 0, 4, 0, 0, 1, 41, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0,159, 7, 2, 7, 1, 50,145, 13, 1, 13, 2, 16, 15, 3, 13, 3, + 2, 1, 1, 44, 52,121, 15, 4, 13, 3, 2, 1, 1, 11, 5, 31, 52, 15, 15, 6, + 11, 7, 13, 2, 42, 11, 8, 42, 2, 0, 1, 50, 94, 13, 3, 7, 1, 16, 48, 11, + 15, 9, 13, 3, 7, 1, 16, 2, 1, 1, 44, 52, 15, 15, 6, 11, 7, 13, 2, 42, + 11, 10, 42, 2, 0, 1, 50, 59, 13, 3, 7, 2, 16, 48, 11, 15, 9, 13, 3, 7, + 2, 16, 2, 1, 1, 44, 48, 11, 15, 11, 13, 3, 7, 2, 16, 2, 1, 1, 44, 48, + 11, 15, 12, 13, 3, 7, 2, 16, 2, 1, 1, 44, 52, 13, 15, 6, 11, 7, 13, 2, + 42, 11, 13, 42, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 5, 1, 13, 1, 13, 2, + 16, 54,152, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, +116,121,112,101, 95,105,116,101,109, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, + 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111, +114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, 0, 2, 0, + 0, 0, 32, 32,105,115, 32,110,111,116, 32, 97, 32,116, 97, 98,108,101, 32,110, +111,114, 32, 97, 32,109,101,110,117, 32,105,116,101,109, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 30, 32,100,111, +101,115, 32,110,111,116, 32,104, 97,118,101, 32, 97, 32,115,116,114,105,110,103, + 32,116,105,116,108,101, 0, 2, 0, 0, 0, 14,116,121,112,101, 95,102,117,110, + 99,116,105,111,110, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103, +101,116, 0, 2, 0, 0, 0, 36, 32,100,111,101,115, 32,110,111,116, 32,104, 97, +118,101, 32, 97,110, 32, 97, 99,116,105,111,110, 32,110,111,114, 32, 97, 32,109, +101,110,117, 0, 4, 0, 0, 1, 59, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,189, 10, 2, 15, + 2, 2, 1, 0, 7, 1, 50,166, 13, 1, 13, 3, 16, 4, 0, 15, 6, 13, 4, 2, + 1, 1, 52, 6, 13, 4, 23, 5, 50,112, 13, 4, 7, 1, 16, 44, 52, 11, 15, 7, + 22, 0, 2, 1, 1, 23, 5, 50, 93, 15, 6, 13, 4, 7, 2, 16, 2, 1, 1, 52, + 38, 13, 4, 11, 8, 13, 4, 7, 1, 16, 26, 13, 4, 7, 1, 13, 4, 7, 2, 16, + 26, 13, 4, 7, 2, 4, 0, 26, 15, 9, 13, 4, 2, 1, 1, 23, 5, 50, 43, 13, + 4, 11, 8, 13, 4, 7, 1, 16, 26, 13, 4, 11, 10, 13, 4, 7, 2, 16, 26, 13, + 4, 7, 1, 4, 0, 26, 13, 4, 7, 2, 4, 0, 26, 15, 11, 13, 4, 2, 1, 1, + 23, 5, 15, 12, 13, 2, 13, 5, 2, 0, 2, 13, 5, 11, 13, 13, 2, 26, 13, 1, + 13, 3, 13, 5, 26, 13, 3, 7, 1, 37, 23, 3, 5, 2, 13, 1, 13, 3, 16, 54, +173, 13, 2, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 14, +105,117,112, 67,114,101, 97,116,101, 77,101,110,117, 0, 2, 0, 0, 0, 2,105, + 0, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,101,108,101,109, 0, 2, 0, + 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, 13, +105,117,112,115,101,112, 97,114, 97,116,111,114, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 11,105,117,112,115,117, 98,109,101,110,117, 0, + 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 8,105,117,112, +105,116,101,109, 0, 2, 0, 0, 0, 10, 73,117,112, 65,112,112,101,110,100, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 8,105,117,112,109,101,110,117, 0, 4, 0, 0, 1, 89, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, + 85, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 5,109,101,110,117, 0, 2, 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, + 85, 0, 4, 0, 0, 1, 94, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, 13, + 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, + 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117,112, 80, +111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 12, + 67, 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 0, 4, 0, 0, 1,102, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 47, 6, 2, 7, 1, 50, 33, 15, 2, 13, 1, 13, 2, 16, 2, 1, + 1, 44, 52, 13, 15, 3, 11, 4, 13, 2, 42, 11, 5, 42, 2, 0, 1, 13, 2, 7, + 1, 37, 23, 2, 13, 1, 13, 2, 16, 54, 40, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, 6,101,114, +114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, 0, + 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114,111,110,103, 32,118, 97,108,117, +101, 32,111,114, 32,105,115, 32,110,111,116, 32,105,110,105,116,105, 97,108,105, +122,101,100, 0, 4, 0, 0, 1,112, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,187, 11, 2, 13, + 0, 20, 3, 2, 1, 1, 13, 1, 18, 4, 7, 1, 7, 0, 50, 14, 13, 5, 7, 1, + 37, 23, 5, 13, 4, 7, 1, 37, 23, 4, 13, 1, 13, 4, 16, 54, 21, 7, 1, 23, + 4, 13, 3, 15, 7, 32, 52, 43, 13, 1, 13, 4, 13, 5, 37, 15, 8, 22, 0, 2, + 1, 1, 26, 15, 9, 13, 2, 13, 1, 13, 4, 13, 5, 37, 16, 2, 0, 2, 13, 1, + 13, 4, 13, 5, 37, 16, 11, 10, 13, 2, 26, 50, 79, 15, 9, 13, 2, 13, 1, 13, + 4, 16, 2, 0, 2, 13, 1, 13, 4, 16, 11, 10, 13, 2, 26, 13, 4, 7, 1, 37, + 23, 4, 13, 3, 15, 7, 32, 52, 43, 13, 1, 13, 4, 13, 5, 37, 15, 8, 22, 0, + 2, 1, 1, 26, 15, 9, 13, 2, 13, 1, 13, 4, 13, 5, 37, 16, 2, 0, 2, 13, + 1, 13, 4, 13, 5, 37, 16, 11, 10, 13, 2, 26, 13, 4, 13, 5, 34, 54, 86, 13, + 2, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 11, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 66,111,120, 69,108,101, +109,101,110,116, 0, 2, 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, + 0, 2,105, 0, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 89, 69, 83, 0, 2, 0, 0, 0, 8,105,117,112,102,105,108,108, 0, 2, 0, 0, + 0, 10, 73,117,112, 65,112,112,101,110,100, 0, 2, 0, 0, 0, 11, 73, 85, 80, + 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, + 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 66,111,120, 69,108,101,109,101, +110,116, 0, 4, 0, 0, 1,146, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, + 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14,105,117,112, + 67,114,101, 97,116,101, 72, 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,104, + 98,111,120, 0, 4, 0, 0, 1,150, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,104, + 98,111,120, 0, 2, 0, 0, 0, 7,101,100,104, 98,111,120, 0, 4, 0, 0, 1, +156, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 19, 4, 1, 13, 0, 11, 1, 15, 2, 26, 15, 3, + 20, 4, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, 8, + 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, + 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, + 0, 0, 8,101,100,102,105,101,108,100, 0, 4, 0, 0, 1,162, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0,123, 7, 1, 4, 1, 15, 3, 13, 0, 18, 4, 2, 1, 1, 46, 9, 15, + 5, 13, 0, 18, 4, 2, 1, 1, 52, 19, 15, 6, 22, 1, 11, 7, 13, 0, 18, 4, + 30, 0, 2, 1, 1, 23, 1, 50, 7, 15, 8, 11, 9, 2, 0, 1, 13, 0, 18, 10, + 52, 19, 15, 11, 22, 1, 11, 10, 13, 0, 18, 10, 30, 0, 2, 1, 1, 23, 2, 50, + 17, 15, 11, 22, 1, 11, 10, 13, 0, 18, 12, 30, 0, 2, 1, 1, 23, 2, 13, 2, + 48, 2, 13, 1, 52, 16, 15, 13, 22, 2, 13, 1, 13, 2, 29, 0, 2, 3, 3, 1, + 50, 4, 4, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 2, +102, 0, 2, 0, 0, 0, 2,108, 0, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 7,112,114, +111,109,112,116, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,110,117,109, 98,101, +114, 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 2, 0, 0, 0, + 6,116,105,116,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, + 0, 0, 55,112, 97,114, 97,109,101,116,101,114, 32,112,114,111,109,112,116, 32, +104, 97,115, 32,119,114,111,110,103, 32,118, 97,108,117,101, 32,111,114, 32,105, +115, 32,110,111,116, 32,105,110,105,116,105, 97,108,105,122,101,100, 0, 2, 0, + 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 8,105,117,112,116,101,120, +116, 0, 2, 0, 0, 0, 7,110,118, 97,108,117,101, 0, 2, 0, 0, 0, 7,101, +100,104, 98,111,120, 0, 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 4, + 0, 0, 1,185, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97, +116,101, 86, 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,118, 98,111,120, 0, + 4, 0, 0, 1,189, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,118, 98,111,120, 0, + 2, 0, 0, 0, 7,101,100,118, 98,111,120, 0, 4, 0, 0, 1,195, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 19, 4, 1, 13, 0, 11, 1, 15, 2, 26, 15, 3, 20, 4, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 89, 69, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 8, 73, + 85, 80, 90, 66, 79, 88, 0, 4, 0, 0, 1,204, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, + 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, + 14,105,117,112, 67,114,101, 97,116,101, 90, 98,111,120, 0, 2, 0, 0, 0, 8, +105,117,112,122, 98,111,120, 0, 4, 0, 0, 1,208, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 44, 6, 1, 15, 2, 20, 3, 13, 0, 2, 1, 2, 7, 1, 50, 17, 15, 5, 13, 1, + 13, 2, 16, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 13, 0, 13, 2, 16, 54, 24, + 13, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 8, 73, + 85, 80, 90, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99, +116,111,114, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 11,105,117,112, 83, +101,116, 78, 97,109,101, 0, 2, 0, 0, 0, 5,122, 98,111,120, 0, 2, 0, 0, + 0, 8, 73, 85, 80, 70, 73, 76, 76, 0, 4, 0, 0, 1,223, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97, +116,101, 70,105,108,108, 0, 2, 0, 0, 0, 8,105,117,112,102,105,108,108, 0, + 4, 0, 0, 1,227, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 70, 73, 76, 76, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,102,105,108,108, 0, + 2, 0, 0, 0, 10, 73, 85, 80, 66, 85, 84, 84, 79, 78, 0, 2, 0, 0, 0, 5, +116,121,112,101, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 4, 0, 0, 1,236, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 32, 5, 2, 13, 1, 18, 1, 44, 48, 4, 13, 1, 18, 2, 52, + 7, 13, 1, 11, 1, 11, 3, 26, 15, 4, 13, 1, 18, 1, 3, 2, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 2, 0, 0, + 0, 1, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 66,117,116, +116,111,110, 0, 2, 0, 0, 0, 10,105,117,112, 98,117,116,116,111,110, 0, 4, + 0, 0, 1,243, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 10, 73, 85, 80, 66, 85, 84, 84, 79, 78, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7, 98,117,116,116, +111,110, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 4, 0, 0, 1, +252, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105, +117,112, 67,114,101, 97,116,101, 84,101,120,116, 0, 2, 0, 0, 0, 8,105,117, +112,116,101,120,116, 0, 4, 0, 0, 2, 0, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 2, + 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, + 5,116,101,120,116, 0, 2, 0, 0, 0, 13, 73, 85, 80, 77, 85, 76, 84, 73, 76, + 73, 78, 69, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 4, 0, 0, + 2, 9, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 19, +105,117,112, 67,114,101, 97,116,101, 77,117,108,116,105, 76,105,110,101, 0, 2, + 0, 0, 0, 13,105,117,112,109,117,108,116,105,108,105,110,101, 0, 4, 0, 0, + 2, 13, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 77, 85, 76, 84, 73, 76, 73, 78, 69, 0, 2, 0, 0, 0, 12, + 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,109,117,108, +116,105,108,105,110,101, 0, 2, 0, 0, 0, 9, 73, 85, 80, 76, 65, 66, 69, 76, + 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 4, 0, 0, 2, 22, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 32, 5, 2, 13, 1, 18, 1, 44, 48, 4, 13, 1, 18, 2, 52, 7, + 13, 1, 11, 1, 11, 3, 26, 15, 4, 13, 1, 18, 1, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 6,116, +105,116,108,101, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 2, 0, 0, 0, + 1, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 76, 97, 98,101, +108, 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 4, 0, 0, 2, + 29, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 76, 65, 66, 69, 76, 0, 2, 0, 0, 0, 12, 67,111,110,115,116, +114,117, 99,116,111,114, 0, 2, 0, 0, 0, 6,108, 97, 98,101,108, 0, 2, 0, + 0, 0, 10, 73, 85, 80, 84, 79, 71, 71, 76, 69, 0, 2, 0, 0, 0, 10, 73, 85, + 80, 66, 85, 84, 84, 79, 78, 0, 4, 0, 0, 2, 38, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 12, 4, 2, 15, 1, 13, 1, 18, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114, +101, 97,116,101, 84,111,103,103,108,101, 0, 2, 0, 0, 0, 6,116,105,116,108, +101, 0, 2, 0, 0, 0, 10,105,117,112,116,111,103,103,108,101, 0, 4, 0, 0, + 2, 42, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, + 0, 10, 73, 85, 80, 84, 79, 71, 71, 76, 69, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7,116,111,103,103,108,101, + 0, 2, 0, 0, 0, 8, 73, 85, 80, 73, 84, 69, 77, 0, 4, 0, 0, 2, 51, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 12, 4, 2, 15, 1, 13, 1, 18, 2, 3, 2, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 14,105,117,112, 67,114,101, 97,116,101, 73,116,101,109, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 8,105,117,112,105,116,101,109, 0, 4, + 0, 0, 2, 55, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 73, 84, 69, 77, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,105,116,101,109, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 83, 85, 66, 77, 69, 78, 85, 0, 2, 0, 0, 0, 10, +116,121,112,101, 95,109,101,110,117, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 4, 0, 0, 2, 64, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 31, 6, 2, 15, 2, 13, 1, + 18, 3, 13, 1, 7, 1, 16, 2, 1, 2, 13, 1, 7, 1, 16, 11, 4, 13, 2, 26, + 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 2,104, 0, 2, 0, 0, 0, 17,105,117,112, 67,114,101, + 97,116,101, 83,117, 98,109,101,110,117, 0, 2, 0, 0, 0, 6,116,105,116,108, +101, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 11,105,117,112,115,117, 98,109,101,110,117, 0, 4, 0, 0, 2, 70, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 83, 85, 66, 77, 69, 78, 85, 0, 2, 0, 0, 0, 12, 67,111,110,115,116, +114,117, 99,116,111,114, 0, 2, 0, 0, 0, 8,115,117, 98,109,101,110,117, 0, + 2, 0, 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 4, 0, + 0, 2, 79, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 19,105,117,112, 67,114,101, 97,116,101, 83,101,112, 97,114, 97,116,111,114, 0, + 2, 0, 0, 0, 13,105,117,112,115,101,112, 97,114, 97,116,111,114, 0, 4, 0, + 0, 2, 83, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,115,101, +112, 97,114, 97,116,111,114, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 73, 76, 69, + 68, 76, 71, 0, 4, 0, 0, 2, 92, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, + 2, 96, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 17,105,117,112, 67,114,101, 97,116,101, + 70,105,108,101, 68,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105,108,101, +100,108,103, 0, 4, 0, 0, 2,100, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 73, 76, 69, 68, 76, 71, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 14, 73, 85, 80, 77, 69, + 83, 83, 65, 71, 69, 68, 76, 71, 0, 4, 0, 0, 2,109, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 2, 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, + 0, 0, 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108, +102, 0, 4, 0, 0, 2,113, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 20,105,117,112, 67, +114,101, 97,116,101, 77,101,115,115, 97,103,101, 68,108,103, 0, 2, 0, 0, 0, + 14,105,117,112,109,101,115,115, 97,103,101,100,108,103, 0, 4, 0, 0, 2,117, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 14, + 73, 85, 80, 77, 69, 83, 83, 65, 71, 69, 68, 76, 71, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 11,109,101,115,115, + 97,103,101,100,108,103, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, + 68, 76, 71, 0, 4, 0, 0, 2,126, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, + 2,130, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 18,105,117,112, 67,114,101, 97,116,101, + 67,111,108,111,114, 68,108,103, 0, 2, 0, 0, 0, 12,105,117,112, 99,111,108, +111,114,100,108,103, 0, 4, 0, 0, 2,134, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 68, + 76, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 9, 99,111,108,111,114,100,108,103, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 70, 79, 78, 84, 68, 76, 71, 0, 4, 0, 0, 2,143, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 2, 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, + 0, 0, 0, 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 4, 0, 0, 2,147, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, + 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 17,105,117,112, + 67,114,101, 97,116,101, 70,111,110,116, 68,108,103, 0, 2, 0, 0, 0, 11,105, +117,112,102,111,110,116,100,108,103, 0, 4, 0, 0, 2,151, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 79, + 78, 84, 68, 76, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116, +111,114, 0, 2, 0, 0, 0, 8,102,111,110,116,100,108,103, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 85, 83, 69, 82, 0, 4, 0, 0, 2,160, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, + 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 85,115,101,114, 0, 2, 0, 0, + 0, 8,105,117,112,117,115,101,114, 0, 4, 0, 0, 2,164, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 10, 2, 0, 15, 0, 20, 1, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 0, 0, 0, 8, 73, 85, 80, 85, 83, 69, 82, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,117,115,101,114, + 0, 2, 0, 0, 0, 14, 73, 85, 80, 78, 79, 82, 77, 65, 76, 73, 90, 69, 82, 0, + 4, 0, 0, 2,173, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 47, 6, 2, 7, 1, 50, 33, 15, + 2, 13, 1, 13, 2, 16, 2, 1, 1, 44, 52, 13, 15, 3, 11, 4, 13, 2, 42, 11, + 5, 42, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 13, 1, 13, 2, 16, 54, 40, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, + 0, 2,105, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, + 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, + 97,109,101,116,101,114, 32, 0, 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114, +111,110,103, 32,118, 97,108,117,101, 32,111,114, 32,105,115, 32,110,111,116, 32, +105,110,105,116,105, 97,108,105,122,101,100, 0, 4, 0, 0, 2,183, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 40, 8, 2, 15, 2, 2, 1, 0, 7, 1, 50, 17, 13, 2, 11, 4, + 13, 1, 13, 3, 16, 26, 13, 3, 7, 1, 37, 23, 3, 13, 1, 13, 3, 16, 54, 24, + 13, 2, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 20,105, +117,112, 67,114,101, 97,116,101, 78,111,114,109, 97,108,105,122,101,114, 0, 2, + 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 11, 97,100,100, 99,111,110,116,114,111, +108, 0, 2, 0, 0, 0, 14,105,117,112,110,111,114,109, 97,108,105,122,101,114, + 0, 4, 0, 0, 2,193, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 10, 2, 0, 15, 0, 20, 1, + 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 14, 73, 85, 80, + 78, 79, 82, 77, 65, 76, 73, 90, 69, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 11,110,111,114,109, 97,108,105, +122,101,114, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, 2, 0, + 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 2,202, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, 1, + 13, 1, 7, 1, 16, 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 2,104, 0, 2, + 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 70,114, 97,109,101, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 9, +105,117,112,102,114, 97,109,101, 0, 4, 0, 0, 2,208, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, + 77, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 6,102,114, 97,109,101, 0, 2, 0, 0, 0, 10, 73, 85, 80, 67, + 65, 78, 86, 65, 83, 0, 4, 0, 0, 2,217, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, + 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 67, 97, +110,118, 97,115, 0, 2, 0, 0, 0, 10,105,117,112, 99, 97,110,118, 97,115, 0, + 4, 0, 0, 2,221, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 10, 73, 85, 80, 67, 65, 78, 86, 65, 83, 0, 2, 0, 0, 0, 12, + 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7, 99, 97,110, +118, 97,115, 0, 2, 0, 0, 0, 8, 73, 85, 80, 76, 73, 83, 84, 0, 4, 0, 0, + 2,230, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14, +105,117,112, 67,114,101, 97,116,101, 76,105,115,116, 0, 4, 0, 0, 2,234, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 42, 6, 2, 15, 1, 13, 1, 2, 1, 1, 11, 2, 32, 52, + 16, 15, 3, 13, 0, 18, 5, 11, 6, 13, 1, 42, 3, 2, 2, 50, 11, 15, 7, 18, + 8, 13, 0, 13, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, + 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, + 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101, +116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, + 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 1, 0, 2, + 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 4,103,101,116, 0, + 4, 0, 0, 2,242, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 90, 8, 3, 15, 2, 13, 1, 2, + 1, 1, 11, 3, 32, 52, 62, 15, 4, 13, 2, 2, 1, 1, 46, 7, 15, 5, 13, 2, + 2, 1, 1, 52, 21, 15, 6, 13, 0, 18, 8, 11, 9, 13, 1, 42, 11, 9, 13, 2, + 42, 3, 3, 3, 50, 23, 13, 2, 4, 0, 32, 52, 16, 15, 6, 13, 0, 18, 8, 11, + 9, 13, 1, 42, 13, 2, 3, 3, 3, 15, 10, 18, 11, 13, 0, 13, 1, 13, 2, 3, + 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 6,105,110,100,101, +120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 5,116,121, +112,101, 0, 2, 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 12,116,121,112, +101, 95,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 1, 0, 2, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 4,115,101,116, 0, 2, + 0, 0, 0, 8,105,117,112,108,105,115,116, 0, 4, 0, 0, 2,253, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 76, 73, 83, 84, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 5,108,105,115,116, 0, 2, 0, 0, 0, 9, 73, 85, 80, + 73, 77, 65, 71, 69, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, + 0, 3, 6, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0,116, 8, 2, 7, 1, 50, 92, 7, 1, 50, + 32, 15, 3, 13, 1, 13, 2, 16, 13, 3, 16, 2, 1, 1, 11, 4, 31, 52, 7, 15, + 5, 11, 6, 2, 0, 1, 13, 3, 7, 1, 37, 23, 3, 13, 1, 13, 2, 16, 13, 3, + 16, 54, 42, 13, 1, 18, 7, 48, 10, 13, 3, 7, 1, 38, 13, 1, 18, 7, 31, 52, + 9, 15, 5, 11, 8, 2, 0, 1, 50, 10, 13, 1, 11, 7, 13, 3, 7, 1, 38, 26, + 13, 2, 7, 1, 37, 23, 2, 5, 1, 13, 1, 13, 2, 16, 54, 99, 13, 1, 11, 9, + 13, 2, 7, 1, 38, 26, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 2,106, 0, 2, 0, + 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 7,110,117,109, 98,101,114, 0, + 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 38,110,111,110, 45, +110,117,109,101,114,105, 99, 32,118, 97,108,117,101, 32,105,110, 32,105,109, 97, +103,101, 32,100,101,102,105,110,105,116,105,111,110, 0, 2, 0, 0, 0, 6,119, +105,100,116,104, 0, 2, 0, 0, 0, 26,105,110, 99,111,110,115,105,115,116,101, +110,116, 32,105,109, 97,103,101, 32,108,101,110,103,104,116, 0, 2, 0, 0, 0, + 7,104,101,105,103,104,116, 0, 4, 0, 0, 3, 29, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 74, 9, 2, 15, 2, 13, 1, 18, 3, 13, 1, 18, 4, 13, 1, 2, 1, 3, 15, 5, + 13, 1, 18, 6, 2, 1, 1, 11, 7, 32, 52, 38, 7, 1, 50, 23, 15, 9, 13, 2, + 13, 3, 13, 1, 18, 6, 13, 3, 16, 2, 0, 3, 13, 3, 7, 1, 37, 23, 3, 13, + 1, 18, 6, 13, 3, 16, 54, 32, 5, 1, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110, +100,108,101, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 73,109, + 97,103,101, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, 0, 7, +104,101,105,103,104,116, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, + 0, 7, 99,111,108,111,114,115, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, + 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 9,105,117,112,105,109, 97,103, +101, 0, 4, 0, 0, 3, 41, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, + 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2, +111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 73, 77, 65, 71, 69, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 6,105,109, + 97,103,101, 0, 2, 0, 0, 0, 12, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, + 0, 4, 0, 0, 3, 49, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 20, 6, 2, 15, 1, 13, 1, + 18, 2, 13, 1, 18, 3, 13, 1, 18, 4, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 18,105,117,112, 67, +114,101, 97,116,101, 73,109, 97,103,101, 82, 71, 66, 0, 2, 0, 0, 0, 6,119, +105,100,116,104, 0, 2, 0, 0, 0, 7,104,101,105,103,104,116, 0, 2, 0, 0, + 0, 7,112,105,120,101,108,115, 0, 2, 0, 0, 0, 12,105,117,112,105,109, 97, +103,101,114,103, 98, 0, 4, 0, 0, 3, 53, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 73, 77, 65, 71, 69, 82, + 71, 66, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 9,105,109, 97,103,101,114,103, 98, 0, 2, 0, 0, 0, 13, 73, + 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, 65, 0, 4, 0, 0, 3, 61, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 20, 6, 2, 15, 1, 13, 1, 18, 2, 13, 1, 18, 3, 13, 1, 18, + 4, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 19,105,117,112, 67,114,101, 97,116,101, 73,109, 97,103, +101, 82, 71, 66, 65, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, + 0, 7,104,101,105,103,104,116, 0, 2, 0, 0, 0, 7,112,105,120,101,108,115, + 0, 2, 0, 0, 0, 13,105,117,112,105,109, 97,103,101,114,103, 98, 97, 0, 4, + 0, 0, 3, 65, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 13, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, 65, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,105, +109, 97,103,101,114,103, 98, 97, 0, 2, 0, 0, 0, 15, 73, 85, 80, 80, 82, 79, + 71, 82, 69, 83, 83, 66, 65, 82, 0, 4, 0, 0, 3, 74, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, + 0, 0, 21,105,117,112, 67,114,101, 97,116,101, 80,114,111,103,114,101,115,115, + 66, 97,114, 0, 2, 0, 0, 0, 15,105,117,112,112,114,111,103,114,101,115,115, + 98, 97,114, 0, 4, 0, 0, 3, 78, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 15, 73, 85, 80, 80, 82, 79, 71, 82, 69, 83, 83, + 66, 65, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, + 0, 2, 0, 0, 0, 12,112,114,111,103,114,101,115,115, 98, 97,114, 0, 2, 0, + 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, + 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 7, 65, 67, 84, 73, 79, 78, + 0, 2, 0, 0, 0, 9, 97, 99,116,105,111,110, 99, 98, 0, 2, 0, 0, 0, 10, + 65, 67, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 9,103,101,116,102,111, + 99,117,115, 0, 2, 0, 0, 0, 12, 71, 69, 84, 70, 79, 67, 85, 83, 95, 67, 66, + 0, 2, 0, 0, 0, 16,105,117,112, 95,103,101,116,102,111, 99,117,115, 95, 99, + 98, 0, 2, 0, 0, 0, 10,107,105,108,108,102,111, 99,117,115, 0, 2, 0, 0, + 0, 13, 75, 73, 76, 76, 70, 79, 67, 85, 83, 95, 67, 66, 0, 2, 0, 0, 0, 17, +105,117,112, 95,107,105,108,108,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, + 0, 6,102,111, 99,117,115, 0, 2, 0, 0, 0, 9, 70, 79, 67, 85, 83, 95, 67, + 66, 0, 2, 0, 0, 0, 13,105,117,112, 95,102,111, 99,117,115, 95, 99, 98, 0, + 2, 0, 0, 0, 6,107, 95, 97,110,121, 0, 2, 0, 0, 0, 6, 75, 95, 65, 78, + 89, 0, 2, 0, 0, 0, 10,105,117,112, 95,107, 95, 97,110,121, 0, 2, 0, 0, + 0, 5,104,101,108,112, 0, 2, 0, 0, 0, 8, 72, 69, 76, 80, 95, 67, 66, 0, + 2, 0, 0, 0, 12,105,117,112, 95,104,101,108,112, 95, 99, 98, 0, 2, 0, 0, + 0, 8, 99, 97,114,101,116, 99, 98, 0, 2, 0, 0, 0, 9, 67, 65, 82, 69, 84, + 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95, 99, 97,114,101,116, 95, 99, + 98, 0, 2, 0, 0, 0, 9,107,101,121,112,114,101,115,115, 0, 2, 0, 0, 0, + 12, 75, 69, 89, 80, 82, 69, 83, 83, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117, +112, 95,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, 0, 7,115, + 99,114,111,108,108, 0, 2, 0, 0, 0, 10, 83, 67, 82, 79, 76, 76, 95, 67, 66, + 0, 2, 0, 0, 0, 14,105,117,112, 95,115, 99,114,111,108,108, 95, 99, 98, 0, + 2, 0, 0, 0, 10,116,114, 97,121, 99,108,105, 99,107, 0, 2, 0, 0, 0, 13, + 84, 82, 65, 89, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117, +112, 95,116,114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 6, + 99,108,111,115,101, 0, 2, 0, 0, 0, 9, 67, 76, 79, 83, 69, 95, 67, 66, 0, + 2, 0, 0, 0, 13,105,117,112, 95, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, + 0, 0, 5,111,112,101,110, 0, 2, 0, 0, 0, 8, 79, 80, 69, 78, 95, 67, 66, + 0, 2, 0, 0, 0, 12,105,117,112, 95,111,112,101,110, 95, 99, 98, 0, 2, 0, + 0, 0, 7,115,104,111,119, 99, 98, 0, 2, 0, 0, 0, 8, 83, 72, 79, 87, 95, + 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,115,104,111,119, 95, 99, 98, 0, + 2, 0, 0, 0, 6,109, 97,112, 99, 98, 0, 2, 0, 0, 0, 7, 77, 65, 80, 95, + 67, 66, 0, 2, 0, 0, 0, 11,105,117,112, 95,109, 97,112, 95, 99, 98, 0, 2, + 0, 0, 0, 8,117,110,109, 97,112, 99, 98, 0, 2, 0, 0, 0, 9, 85, 78, 77, + 65, 80, 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95,117,110,109, 97,112, + 95, 99, 98, 0, 2, 0, 0, 0, 10,100,114,111,112,102,105,108,101,115, 0, 2, + 0, 0, 0, 13, 68, 82, 79, 80, 70, 73, 76, 69, 83, 95, 67, 66, 0, 2, 0, 0, + 0, 17,105,117,112, 95,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 2, + 0, 0, 0, 10,109,101,110,117, 99,108,111,115,101, 0, 2, 0, 0, 0, 13, 77, + 69, 78, 85, 67, 76, 79, 83, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, + 95,109,101,110,117, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 10,104, +105,103,104,108,105,103,104,116, 0, 2, 0, 0, 0, 13, 72, 73, 71, 72, 76, 73, + 71, 72, 84, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,104,105,103,104, +108,105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 4,119,111,109, 0, 2, 0, + 0, 0, 7, 87, 79, 77, 95, 67, 66, 0, 2, 0, 0, 0, 11,105,117,112, 95,119, +111,109, 95, 99, 98, 0, 2, 0, 0, 0, 6,119,104,101,101,108, 0, 2, 0, 0, + 0, 9, 87, 72, 69, 69, 76, 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95, +119,104,101,101,108, 95, 99, 98, 0, 2, 0, 0, 0, 10, 66, 85, 84, 84, 79, 78, + 95, 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95, 98,117,116,116,111,110, 95, + 99, 98, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, 2, 0, 0, 0, 10, + 82, 69, 83, 73, 90, 69, 95, 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95,114, +101,115,105,122,101, 95, 99, 98, 0, 2, 0, 0, 0, 5,109,111,118,101, 0, 2, + 0, 0, 0, 12,105,117,112, 95,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, + 7,109,111,116,105,111,110, 0, 2, 0, 0, 0, 10, 77, 79, 84, 73, 79, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95,109,111,116,105,111,110, 95, 99, + 98, 0, 2, 0, 0, 0, 12,101,110,116,101,114,119,105,110,100,111,119, 0, 2, + 0, 0, 0, 15, 69, 78, 84, 69, 82, 87, 73, 78, 68, 79, 87, 95, 67, 66, 0, 2, + 0, 0, 0, 19,105,117,112, 95,101,110,116,101,114,119,105,110,100,111,119, 95, + 99, 98, 0, 2, 0, 0, 0, 12,108,101, 97,118,101,119,105,110,100,111,119, 0, + 2, 0, 0, 0, 15, 76, 69, 65, 86, 69, 87, 73, 78, 68, 79, 87, 95, 67, 66, 0, + 2, 0, 0, 0, 19,105,117,112, 95,108,101, 97,118,101,119,105,110,100,111,119, + 95, 99, 98, 0, 2, 0, 0, 0, 5,101,100,105,116, 0, 2, 0, 0, 0, 8, 69, + 68, 73, 84, 95, 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,101,100,105,116, + 95, 99, 98, 0, 2, 0, 0, 0, 12,109,117,108,116,105,115,101,108,101, 99,116, + 0, 2, 0, 0, 0, 15, 77, 85, 76, 84, 73, 83, 69, 76, 69, 67, 84, 95, 67, 66, + 0, 2, 0, 0, 0, 19,105,117,112, 95,109,117,108,116,105,115,101,108,101, 99, +116, 95, 99, 98, 0, 2, 0, 0, 0, 7,102,105,108,101, 99, 98, 0, 2, 0, 0, + 0, 8, 70, 73, 76, 69, 95, 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,102, +105,108,101, 95, 99, 98, 0, 2, 0, 0, 0, 14,109,100,105, 97, 99,116,105,118, + 97,116,101, 99, 98, 0, 2, 0, 0, 0, 15, 77, 68, 73, 65, 67, 84, 73, 86, 65, + 84, 69, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109,100,105, 97, 99, +116,105,118, 97,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 11,100,114,111,112,100, +111,119,110, 99, 98, 0, 2, 0, 0, 0, 12, 68, 82, 79, 80, 68, 79, 87, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,100,114,111,112,100,111,119,110, + 95, 99, 98, 0, 2, 0, 0, 0, 11,100, 98,108, 99,108,105, 99,107, 99, 98, 0, + 2, 0, 0, 0, 12, 68, 66, 76, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, + 0, 16,105,117,112, 95,100, 98,108, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, + 0, 0, 18,105,117,112, 95, 97, 99,116,105,111,110, 95,116,111,103,103,108,101, + 0, 2, 0, 0, 0, 16,105,117,112, 95, 97, 99,116,105,111,110, 95,116,101,120, +116, 0, 2, 0, 0, 0, 18,105,117,112, 95, 97, 99,116,105,111,110, 95, 98,117, +116,116,111,110, 0, 2, 0, 0, 0, 16,105,117,112, 95, 97, 99,116,105,111,110, + 95,108,105,115,116, 0, 2, 0, 0, 0, 18,105,117,112, 95, 97, 99,116,105,111, +110, 95, 99, 97,110,118, 97,115, 0, 2, 0, 0, 0, 17,105,117,112, 95, 97, 99, +116,105,111,110, 95,116,105,109,101,114, 0, 2, 0, 0, 0, 10, 97, 99,116,105, +111,110, 95, 99, 98, 0, 2, 0, 0, 0, 12,103,101,116,102,111, 99,117,115, 95, + 99, 98, 0, 2, 0, 0, 0, 13,107,105,108,108,102,111, 99,117,115, 95, 99, 98, + 0, 2, 0, 0, 0, 9,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, 0, 8, +104,101,108,112, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99, 97,114,101,116, 95, 99, + 98, 0, 2, 0, 0, 0, 12,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115, 99,114,111,108,108, 95, 99, 98, 0, 2, 0, 0, 0, 13,116, +114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99,108,111, +115,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,111,112,101,110, 95, 99, 98, 0, 2, + 0, 0, 0, 8,115,104,111,119, 95, 99, 98, 0, 2, 0, 0, 0, 7,109, 97,112, + 95, 99, 98, 0, 2, 0, 0, 0, 9,117,110,109, 97,112, 95, 99, 98, 0, 2, 0, + 0, 0, 13,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 2, 0, 0, 0, + 13,109,101,110,117, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 13,104, +105,103,104,108,105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 7,119,111,109, + 95, 99, 98, 0, 2, 0, 0, 0, 9,119,104,101,101,108, 95, 99, 98, 0, 2, 0, + 0, 0, 10, 98,117,116,116,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 10,114,101, +115,105,122,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,109,111,118,101, 95, 99, 98, + 0, 2, 0, 0, 0, 10,109,111,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, + 15,101,110,116,101,114,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, + 15,108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, + 8,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,117,108,116,105,115, +101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,100,105, 97, 99,116, +105,118, 97,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,102,105,108,101, 95, 99, + 98, 0, 2, 0, 0, 0, 12,100,114,111,112,100,111,119,110, 95, 99, 98, 0, 2, + 0, 0, 0, 12,100, 98,108, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, + 16,118, 97,108,117,101, 99,104, 97,110,103,101,100, 95, 99, 98, 0, 2, 0, 0, + 0, 15,118, 97,108,117,101, 99,104, 97,110,103,101,100, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/iuplua_widgets_be32.lo"); +} diff --git a/iup/srclua3/loh/iuplua_widgets_be64.loh b/iup/srclua3/loh/iuplua_widgets_be64.loh new file mode 100755 index 0000000..6ca1eb6 --- /dev/null +++ b/iup/srclua3/loh/iuplua_widgets_be64.loh @@ -0,0 +1,939 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/iuplua_widgets_be64.lo"); +*/ +/* ../obj/iuplua3/iuplua_widgets_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 20, 64,105,117,112,108,117, + 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 7,202, 67, 0, + 22, 1, 11, 1, 22, 0, 30, 0, 25, 0, 15, 0, 11, 2, 11, 3, 26, 15, 0, 11, + 4, 11, 5, 26, 15, 0, 11, 6, 11, 7, 26, 15, 0, 11, 8, 11, 9, 26, 15, 0, + 11, 10, 11, 11, 26, 15, 0, 11, 12, 11, 13, 26, 15, 0, 11, 14, 11, 15, 26, 15, + 0, 11, 16, 11, 17, 26, 15, 0, 11, 18, 11, 19, 26, 15, 0, 11, 20, 11, 21, 26, + 15, 0, 11, 22, 11, 23, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, 24, 15, 24, 11, + 26, 11, 27, 26, 11, 29, 25, 28, 15, 30, 11, 31, 15, 28, 26, 22, 1, 11, 25, 15, + 0, 30, 0, 25, 32, 15, 32, 11, 26, 11, 33, 26, 11, 35, 25, 34, 15, 30, 11, 36, + 15, 34, 26, 22, 2, 11, 25, 15, 0, 11, 1, 22, 1, 15, 38, 29, 0, 1, 30, 1, + 25, 37, 15, 37, 11, 26, 11, 39, 26, 15, 37, 11, 40, 11, 41, 26, 15, 37, 11, 42, + 11, 43, 26, 15, 37, 11, 44, 11, 45, 26, 11, 47, 25, 46, 15, 30, 11, 48, 15, 46, + 26, 22, 2, 11, 25, 15, 0, 11, 1, 22, 1, 15, 38, 29, 0, 1, 30, 1, 25, 49, + 15, 49, 11, 26, 11, 50, 26, 11, 52, 25, 51, 15, 30, 11, 53, 15, 51, 26, 11, 55, + 25, 54, 11, 57, 25, 56, 11, 59, 25, 58, 22, 1, 11, 25, 15, 0, 30, 0, 25, 60, + 15, 60, 11, 4, 11, 61, 26, 15, 60, 11, 26, 11, 62, 26, 11, 64, 25, 63, 15, 30, + 11, 65, 15, 63, 26, 15, 66, 11, 44, 11, 67, 26, 22, 1, 11, 25, 15, 0, 30, 0, + 25, 68, 15, 68, 11, 4, 11, 69, 26, 15, 68, 11, 26, 11, 70, 26, 22, 1, 11, 25, + 15, 68, 30, 0, 25, 71, 15, 71, 11, 72, 11, 73, 26, 11, 75, 25, 74, 15, 30, 11, + 76, 15, 74, 26, 11, 78, 25, 77, 11, 80, 25, 79, 22, 1, 11, 25, 15, 68, 30, 0, + 25, 81, 15, 81, 11, 72, 11, 82, 26, 11, 84, 25, 83, 15, 30, 11, 85, 15, 83, 26, + 11, 87, 25, 86, 22, 1, 11, 25, 15, 68, 30, 0, 25, 88, 15, 88, 11, 72, 11, 89, + 26, 11, 91, 25, 90, 15, 30, 11, 92, 15, 90, 26, 22, 1, 11, 25, 15, 0, 30, 0, + 25, 93, 15, 93, 11, 26, 11, 94, 26, 11, 96, 25, 95, 15, 30, 11, 97, 15, 95, 26, + 22, 2, 11, 25, 15, 0, 11, 99, 22, 1, 11,100, 15,101, 30, 0, 30, 1, 25, 98, + 15, 98, 11, 26, 11,102, 26, 11,104, 25,103, 15, 30, 11,105, 15,103, 26, 22, 1, + 11, 25, 15, 0, 30, 0, 25,106, 15,106, 11, 26, 11,107, 26, 11,109, 25,108, 15, + 30, 11,110, 15,108, 26, 22, 1, 11, 25, 15,112, 30, 0, 25,111, 15,111, 11, 26, + 11,113, 26, 11,115, 25,114, 15, 30, 11,116, 15,114, 26, 22, 2, 11, 25, 15, 0, + 11, 99, 22, 1, 11,118, 15,101, 30, 0, 30, 1, 25,117, 15,117, 11, 26, 11,119, + 26, 11,121, 25,120, 15, 30, 11,122, 15,120, 26, 22, 1, 11, 25, 15,124, 30, 0, + 25,123, 15,123, 11, 26, 11,125, 26, 11,127, 25,126, 15, 30, 11,128, 15,126, 26, + 22, 1, 11, 25, 15,124, 30, 0, 25,129, 15,129, 11, 26, 11,130, 26, 11,132, 25, +131, 15, 30, 11,133, 15,131, 26, 22, 2, 11, 25, 15, 0, 11, 99, 22, 2, 15,135, + 29, 0, 1, 11,136, 15,101, 30, 0, 30, 1, 25,134, 15,134, 11, 26, 11,137, 26, + 11,139, 25,138, 15, 30, 11,140, 15,138, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, +141, 15,141, 11, 26, 11,142, 26, 11,144, 25,143, 15, 30, 11,145, 15,143, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,146, 15,146, 11, 44, 11,147, 26, 15,146, 11, 26, + 11,148, 26, 11,150, 25,149, 15, 30, 11,151, 15,149, 26, 22, 1, 11, 25, 15, 0, + 30, 0, 25,152, 15,152, 11, 44, 11,153, 26, 15,152, 11, 26, 11,154, 26, 11,156, + 25,155, 15, 30, 11,157, 15,155, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,158, 15, +158, 11, 44, 11,159, 26, 15,158, 11, 26, 11,160, 26, 11,162, 25,161, 15, 30, 11, +163, 15,161, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,164, 15,164, 11, 44, 11,165, + 26, 15,164, 11, 26, 11,166, 26, 11,168, 25,167, 15, 30, 11,169, 15,167, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,170, 15,170, 11, 26, 11,171, 26, 11,173, 25,172, + 15, 30, 11,174, 15,172, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,175, 15,175, 11, + 4, 11,176, 26, 15,175, 11, 26, 11,177, 26, 11,179, 25,178, 15, 30, 11,180, 15, +178, 26, 22, 2, 11, 25, 15, 0, 11, 99, 22, 1, 15,182, 29, 0, 1, 30, 1, 25, +181, 15,181, 11, 26, 11,183, 26, 11,185, 25,184, 15, 30, 11,186, 15,184, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,187, 15,187, 11, 26, 11,188, 26, 11,190, 25,189, + 15, 30, 11,191, 15,189, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,192, 15,192, 11, + 26, 11,193, 26, 15,192, 11, 8, 11,194, 26, 15,192, 11, 10, 11,195, 26, 11,197, + 25,196, 15, 30, 11,198, 15,196, 26, 22, 1, 11, 25, 15,200, 30, 0, 25,199, 15, +199, 11, 4, 11,201, 26, 15,199, 11, 26, 11,202, 26, 11,204, 25,203, 15, 30, 11, +205, 15,203, 26, 22, 1, 11, 25, 15,200, 30, 0, 25,206, 15,206, 11, 26, 11,207, + 26, 11,209, 25,208, 15, 30, 11,210, 15,208, 26, 22, 1, 11, 25, 15,200, 30, 0, + 25,211, 15,211, 11, 26, 11,212, 26, 11,214, 25,213, 15, 30, 11,215, 15,213, 26, + 22, 1, 11, 25, 15,200, 30, 0, 25,216, 15,216, 11, 26, 11,217, 26, 11,219, 25, +218, 15, 30, 11,220, 15,218, 26, 22, 33, 11,222, 22, 2, 11,223, 4, 0, 29, 0, + 2, 11,224, 22, 2, 11,225, 4, 0, 29, 0, 2, 11,226, 22, 2, 11,227, 15,228, + 29, 0, 2, 11,229, 22, 2, 11,230, 15,231, 29, 0, 2, 11,232, 22, 2, 11,233, + 15,234, 29, 0, 2, 11,235, 22, 2, 11,236, 15,237, 29, 0, 2, 11,238, 22, 2, + 11,239, 15,240, 29, 0, 2, 11,241, 22, 2, 11,242, 15,243, 29, 0, 2, 11,244, + 22, 2, 11,245, 15,246, 29, 0, 2, 11,247, 22, 2, 11,248, 15,249, 29, 0, 2, + 11,250, 22, 2, 11,251, 15,252, 29, 0, 2, 11,253, 22, 2, 11,254, 15,255, 29, + 0, 2, 10, 1, 0, 22, 2, 10, 1, 1, 14, 1, 2, 29, 0, 2, 10, 1, 3, 22, + 2, 10, 1, 4, 14, 1, 5, 29, 0, 2, 10, 1, 6, 22, 2, 10, 1, 7, 14, 1, + 8, 29, 0, 2, 10, 1, 9, 22, 2, 10, 1, 10, 14, 1, 11, 29, 0, 2, 10, 1, + 12, 22, 2, 10, 1, 13, 14, 1, 14, 29, 0, 2, 10, 1, 15, 22, 2, 10, 1, 16, + 14, 1, 17, 29, 0, 2, 10, 1, 18, 22, 2, 10, 1, 19, 14, 1, 20, 29, 0, 2, + 10, 1, 21, 22, 2, 10, 1, 22, 14, 1, 23, 29, 0, 2, 10, 1, 24, 22, 2, 10, + 1, 25, 14, 1, 26, 29, 0, 2, 11,105, 22, 2, 10, 1, 27, 14, 1, 28, 29, 0, + 2, 10, 1, 29, 22, 2, 10, 1, 30, 14, 1, 31, 29, 0, 2, 10, 1, 32, 22, 2, + 10, 1, 30, 14, 1, 33, 29, 0, 2, 10, 1, 34, 22, 2, 10, 1, 35, 14, 1, 36, + 29, 0, 2, 10, 1, 37, 22, 2, 10, 1, 38, 14, 1, 39, 29, 0, 2, 10, 1, 40, + 22, 2, 10, 1, 41, 14, 1, 42, 29, 0, 2, 10, 1, 43, 22, 2, 10, 1, 44, 14, + 1, 45, 29, 0, 2, 10, 1, 46, 22, 2, 10, 1, 47, 14, 1, 48, 29, 0, 2, 10, + 1, 49, 22, 2, 10, 1, 50, 14, 1, 51, 29, 0, 2, 10, 1, 52, 22, 2, 10, 1, + 53, 14, 1, 54, 29, 0, 2, 10, 1, 55, 22, 2, 10, 1, 56, 14, 1, 57, 29, 0, + 2, 30, 31, 10, 1, 58, 22, 2, 10, 1, 59, 14, 1, 60, 29, 0, 2, 30, 0, 25, +221, 15,221, 18,222, 11,128, 14, 1, 61, 26, 15,221, 18,222, 11,116, 14, 1, 62, + 26, 15,221, 18,222, 11,110, 14, 1, 62, 26, 15,221, 18,222, 11,105, 14, 1, 63, + 26, 15,221, 18,222, 11,198, 14, 1, 64, 26, 15,221, 18,222, 11,133, 14, 1, 63, + 26, 15,221, 18,222, 11,191, 14, 1, 65, 26, 15,221, 18,224, 11, 31, 14, 1, 66, + 26, 15,221, 10, 1, 67, 15,221, 18,224, 26, 15,221, 10, 1, 68, 15,221, 18,226, + 26, 15,221, 10, 1, 69, 15,221, 18,229, 26, 15,221, 10, 1, 70, 15,221, 18,232, + 26, 15,221, 11,235, 15,221, 18,235, 26, 15,221, 10, 1, 71, 15,221, 18,238, 26, + 15,221, 10, 1, 72, 15,221, 18,241, 26, 15,221, 10, 1, 73, 15,221, 18,244, 26, + 15,221, 10, 1, 74, 15,221, 18,247, 26, 15,221, 10, 1, 75, 15,221, 18,250, 26, + 15,221, 10, 1, 76, 15,221, 18,253, 26, 15,221, 10, 1, 77, 15,221, 17, 1, 0, + 26, 15,221, 10, 1, 78, 15,221, 17, 1, 3, 26, 15,221, 10, 1, 79, 15,221, 17, + 1, 6, 26, 15,221, 10, 1, 80, 15,221, 17, 1, 9, 26, 15,221, 10, 1, 81, 15, +221, 17, 1, 12, 26, 15,221, 10, 1, 82, 15,221, 17, 1, 15, 26, 15,221, 10, 1, + 83, 15,221, 17, 1, 18, 26, 15,221, 10, 1, 84, 15,221, 17, 1, 21, 26, 15,221, + 10, 1, 85, 15,221, 17, 1, 24, 26, 15,221, 10, 1, 86, 15,221, 18,105, 26, 15, +221, 10, 1, 87, 15,221, 17, 1, 29, 26, 15,221, 10, 1, 88, 15,221, 17, 1, 32, + 26, 15,221, 10, 1, 89, 15,221, 17, 1, 34, 26, 15,221, 10, 1, 90, 15,221, 17, + 1, 37, 26, 15,221, 10, 1, 91, 15,221, 17, 1, 40, 26, 15,221, 10, 1, 92, 15, +221, 17, 1, 43, 26, 15,221, 10, 1, 93, 15,221, 17, 1, 46, 26, 15,221, 10, 1, + 94, 15,221, 17, 1, 52, 26, 15,221, 10, 1, 95, 15,221, 17, 1, 49, 26, 15,221, + 10, 1, 96, 15,221, 17, 1, 55, 26, 15,221, 10, 1, 97, 15,221, 17, 1, 58, 26, + 15,221, 10, 1, 98, 15,221, 17, 1, 99, 26, 0, 0, 0, 0, 0, 0, 0, 1,100, + 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 5,116,121,112, +101, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 4, + 0, 0, 0, 12, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 57, 7, 2, 13, 1, 11, 1, 13, 0, + 26, 13, 0, 20, 3, 13, 1, 2, 0, 2, 13, 1, 11, 4, 13, 0, 20, 5, 13, 1, + 2, 1, 2, 26, 13, 0, 20, 6, 13, 1, 2, 0, 2, 15, 7, 13, 1, 18, 4, 13, + 1, 26, 13, 1, 18, 4, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 12, 99,104,101, 99,107, 80, 97, +114, 97,109,115, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, + 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 2, + 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 2, 0, + 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, 0, 12, + 99,104,101, 99,107, 80, 97,114, 97,109,115, 0, 4, 0, 0, 0, 32, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 61, 8, 2, 13, 0, 18, 1, 15, 5, 13, 2, 4, 0, 2, 2, 2, + 50, 39, 13, 4, 13, 1, 13, 3, 16, 2, 1, 1, 44, 52, 13, 15, 6, 11, 7, 13, + 3, 42, 11, 8, 42, 2, 0, 1, 15, 5, 13, 2, 13, 3, 2, 2, 2, 23, 4, 23, + 3, 13, 3, 54, 43, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 2, 0, 0, 0, 6,112, 97,114, 97,109, 0, 2, 0, 0, 0, 5,102, +117,110, 99, 0, 2, 0, 0, 0, 5,110,101,120,116, 0, 2, 0, 0, 0, 6,101, +114,114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, + 0, 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114,111,110,103, 32,118, 97,108, +117,101, 32,111,114, 32,105,115, 32,110,111,116, 32,105,110,105,116,105, 97,108, +105,122,101,100, 0, 2, 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98,117, +116,101,115, 0, 4, 0, 0, 0, 43, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 80, 9, 2, 22, + 0, 15, 3, 13, 1, 4, 0, 2, 1, 2, 50, 18, 13, 2, 13, 3, 7, 1, 26, 15, + 3, 13, 1, 13, 3, 2, 1, 2, 23, 3, 13, 3, 54, 22, 15, 3, 13, 2, 4, 0, + 2, 1, 2, 23, 3, 50, 25, 13, 1, 20, 4, 13, 3, 13, 1, 13, 3, 16, 2, 0, + 3, 15, 3, 13, 2, 13, 3, 2, 1, 2, 23, 3, 13, 3, 54, 29, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 5,116, +101,109,112, 0, 2, 0, 0, 0, 2,102, 0, 2, 0, 0, 0, 5,110,101,120,116, + 0, 2, 0, 0, 0, 4,115,101,116, 0, 2, 0, 0, 0, 4,103,101,116, 0, 4, + 0, 0, 0, 57, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 82, 6, 2, 15, 1, 13, 1, 2, 1, + 1, 52, 63, 15, 2, 13, 1, 16, 52, 9, 13, 0, 13, 1, 16, 1, 2, 50, 47, 15, + 5, 13, 1, 2, 1, 1, 15, 7, 13, 0, 18, 8, 13, 2, 2, 1, 2, 13, 3, 52, + 23, 15, 9, 13, 3, 2, 1, 1, 13, 4, 52, 6, 13, 4, 1, 5, 50, 4, 13, 3, + 1, 5, 5, 1, 5, 2, 13, 0, 13, 1, 16, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 10, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 12,116,121, +112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, + 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, + 0, 0, 0, 6, 73, 78, 68, 69, 88, 0, 2, 0, 0, 0, 9,115,116,114,117,112, +112,101,114, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 16, + 73,117,112, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, + 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 13, 73,117,112, 71,101,116, 72, + 97,110,100,108,101, 0, 2, 0, 0, 0, 4,115,101,116, 0, 4, 0, 0, 0, 77, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0,228, 11, 3, 15, 2, 13, 1, 2, 1, 1, 52,209, 15, + 4, 13, 1, 2, 1, 1, 15, 6, 13, 1, 16, 13, 1, 11, 7, 32, 48, 12, 15, 8, + 13, 0, 18, 10, 2, 1, 1, 11, 11, 32, 52, 4, 4, 0, 23, 4, 13, 4, 52, 55, + 13, 4, 7, 2, 16, 13, 5, 44, 52, 14, 13, 4, 15, 8, 13, 0, 18, 10, 2, 1, + 1, 16, 23, 5, 15, 13, 13, 0, 18, 10, 13, 4, 7, 1, 16, 13, 5, 13, 2, 2, + 0, 4, 13, 0, 13, 1, 13, 2, 26, 1, 6, 5, 1, 50,111, 15, 2, 13, 2, 2, + 1, 1, 46, 7, 15, 14, 13, 2, 2, 1, 1, 52, 17, 15, 15, 13, 0, 18, 10, 13, + 3, 13, 2, 2, 0, 3, 1, 5, 50, 76, 15, 16, 13, 2, 2, 1, 1, 52, 34, 15, + 18, 13, 0, 18, 10, 13, 3, 2, 1, 2, 13, 5, 52, 15, 15, 15, 13, 0, 18, 10, + 13, 3, 13, 2, 2, 0, 3, 1, 6, 5, 1, 50, 33, 15, 19, 13, 2, 2, 1, 1, + 52, 24, 15, 20, 13, 2, 2, 0, 1, 15, 15, 13, 0, 18, 10, 13, 3, 13, 2, 18, + 21, 2, 0, 3, 1, 5, 5, 2, 13, 0, 13, 1, 13, 2, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 6, +118, 97,108,117,101, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105, +110,103, 0, 2, 0, 0, 0, 6, 73, 78, 68, 69, 88, 0, 2, 0, 0, 0, 9,115, +116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 3, 99, 98, 0, 2, 0, 0, 0, + 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 7, +114,101,115,105,122,101, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 67,108, + 97,115,115, 78, 97,109,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, + 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 7,100,105, 97,108,111, +103, 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, 0, 0, 0, 15,105,117,112, + 83,101,116, 67, 97,108,108, 98, 97, 99,107, 0, 2, 0, 0, 0, 12,116,121,112, +101, 95,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 9,116,121,112,101, 95, +110,105,108, 0, 2, 0, 0, 0, 10,111,108,100, 95,118, 97,108,117,101, 0, 2, + 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, + 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, + 0, 11,105,117,112, 83,101,116, 78, 97,109,101, 0, 2, 0, 0, 0, 9, 73, 85, + 80, 95,110, 97,109,101, 0, 2, 0, 0, 0, 10,114, 95,100,101,115,116,114,111, +121, 0, 4, 0, 0, 0,113, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 89, 6, 1, 7, 1, 13, + 0, 13, 1, 16, 50, 66, 15, 3, 13, 2, 2, 1, 1, 48, 4, 13, 2, 18, 4, 52, + 37, 13, 2, 18, 4, 13, 0, 32, 52, 16, 13, 2, 11, 4, 4, 0, 26, 13, 2, 20, + 5, 2, 0, 1, 50, 12, 15, 6, 11, 7, 2, 0, 1, 15, 8, 2, 0, 0, 13, 1, + 7, 1, 37, 23, 1, 13, 0, 13, 1, 16, 23, 2, 13, 2, 54, 70, 15, 9, 13, 0, + 4, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 0, 0, 0, 2,105, 0, 2, + 0, 0, 0, 5,101,108,101,109, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, + 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, + 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 10,114, 95,100, +101,115,116,114,111,121, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, + 0, 0, 29, 73,110,116,101,114,110, 97,108, 32,116, 97, 98,108,101, 32,105,110, + 99,111,110,115,105,115,116,101,110, 99,121, 0, 2, 0, 0, 0, 5,101,120,105, +116, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, + 0, 0, 0, 8,100,101,115,116,114,111,121, 0, 4, 0, 0, 0,133, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 17, 3, 1, 13, 0, 20, 1, 2, 0, 1, 15, 2, 13, 0, 2, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 10,114, 95,100,101,115,116,114,111,121, 0, 2, 0, 0, 0, 11, + 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, 0, 0, 7,100,101,116, 97, + 99,104, 0, 4, 0, 0, 0,138, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 96, 8, 1, 15, 0, + 13, 0, 2, 0, 1, 13, 0, 18, 3, 13, 1, 52, 78, 13, 0, 11, 3, 4, 0, 26, + 7, 1, 50, 58, 13, 1, 13, 2, 16, 13, 0, 32, 52, 41, 50, 20, 13, 1, 13, 2, + 13, 1, 13, 2, 7, 1, 37, 16, 26, 13, 2, 7, 1, 37, 23, 2, 13, 1, 13, 2, + 7, 1, 37, 16, 54, 30, 13, 1, 13, 2, 4, 0, 26, 1, 3, 13, 2, 7, 1, 37, + 23, 2, 13, 1, 13, 2, 16, 54, 65, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 2, 0, 0, 0, 10, 73,117,112, 68,101,116, 97, 99,104, 0, 2, 0, 0, 0, 5, +115,101,108,102, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, + 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 2,105, 0, + 2, 0, 0, 0, 7, 97,112,112,101,110,100, 0, 4, 0, 0, 0,158, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 75, 6, 2, 15, 1, 13, 0, 13, 1, 2, 1, 2, 52, 57, 13, 1, + 11, 3, 13, 0, 26, 7, 1, 50, 21, 13, 0, 13, 2, 16, 13, 1, 32, 52, 4, 13, + 2, 1, 3, 13, 2, 7, 1, 37, 23, 2, 13, 0, 13, 2, 16, 54, 28, 15, 5, 13, + 0, 16, 13, 2, 13, 1, 26, 13, 2, 1, 3, 5, 1, 50, 4, 4, 0, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, + 73,117,112, 65,112,112,101,110,100, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 2,105, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, + 2, 0, 0, 0, 4,109, 97,112, 0, 4, 0, 0, 0,175, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 0, 0, 0, 7, 73,117,112, 77, 97,112, 0, 2, 0, 0, 0, 5,115,101,108, +102, 0, 2, 0, 0, 0, 5,104,105,100,101, 0, 4, 0, 0, 0,179, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 8, 73,117,112, 72,105,100,101, 0, 2, 0, 0, 0, + 5,115,101,108,102, 0, 2, 0, 0, 0, 9, 73, 85, 80, 84, 73, 77, 69, 82, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 17, 67,114,101, + 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0,187, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 15,105,117,112, + 67,114,101, 97,116,101, 84,105,109,101,114, 0, 2, 0, 0, 0, 9,105,117,112, +116,105,109,101,114, 0, 4, 0, 0, 0,191, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 84, 73, 77, 69, 82, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,116,105,109,101,114, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 67, 76, 73, 80, 66, 79, 65, 82, 68, 0, 4, 0, 0, 0,200, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 19,105,117, +112, 67,114,101, 97,116,101, 67,108,105,112, 98,111, 97,114,100, 0, 2, 0, 0, + 0, 13,105,117,112, 99,108,105,112, 98,111, 97,114,100, 0, 4, 0, 0, 0,204, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 13, + 73, 85, 80, 67, 76, 73, 80, 66, 79, 65, 82, 68, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10, 99,108,105,112, 98, +111, 97,114,100, 0, 2, 0, 0, 0, 10, 73, 85, 80, 68, 73, 65, 76, 79, 71, 0, + 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, + 0,213, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, + 1, 1, 13, 1, 7, 1, 16, 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, + 97,110,100,108,101, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, + 68,105, 97,108,111,103, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 5,115,104,111,119, 0, 4, 0, 0, 0,219, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 8, 73,117,112, 83,104,111,119, 0, 2, 0, 0, + 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 7,115,104,111,119,120,121, 0, 4, + 0, 0, 0,223, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, + 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, 0, 2,120, + 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 10, 73,117,112, 83,104,111,119, + 88, 89, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 6,112,111, +112,117,112, 0, 4, 0, 0, 0,227, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, + 0, 10,105,117,112,100,105, 97,108,111,103, 0, 4, 0, 0, 0,231, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, 73, 85, 80, + 68, 73, 65, 76, 79, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99, +116,111,114, 0, 2, 0, 0, 0, 7,100,105, 97,108,111,103, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 82, 65, 68, 73, 79, 0, 4, 0, 0, 0,240, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, 1, 13, 1, 7, 1, 16, + 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, + 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, + 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 82, 97,100,105,111, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 9, +105,117,112,114, 97,100,105,111, 0, 4, 0, 0, 0,246, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 26, 5, 1, 15, 2, 20, 3, 13, 0, 2, 1, 2, 15, 4, 13, 1, 7, 1, 16, + 2, 0, 1, 13, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 9, + 73, 85, 80, 82, 65, 68, 73, 79, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 23,105,117,112, 67,114,101, 97,116,101, + 67,104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 2, 0, 0, 0, 6,114, + 97,100,105,111, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, + 0, 4, 0, 0, 0,254, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,156, 11, 1, 22, 0, 7, 1, + 50, 61, 15, 3, 13, 0, 13, 2, 16, 2, 1, 1, 52, 29, 13, 1, 13, 2, 15, 4, + 22, 2, 11, 5, 13, 0, 13, 2, 16, 11, 6, 13, 0, 18, 6, 30, 1, 2, 1, 1, + 26, 50, 13, 15, 7, 11, 8, 13, 2, 42, 11, 9, 42, 2, 0, 1, 13, 2, 7, 1, + 37, 23, 2, 13, 0, 13, 2, 16, 54, 68, 13, 0, 18, 10, 52, 51, 7, 1, 50, 7, + 13, 3, 7, 1, 37, 23, 3, 13, 0, 13, 3, 16, 48, 10, 13, 0, 13, 3, 16, 13, + 0, 18, 10, 31, 54, 26, 13, 0, 13, 3, 16, 52, 10, 13, 1, 11, 10, 13, 1, 13, + 3, 16, 26, 5, 1, 50, 18, 13, 0, 18, 12, 52, 12, 13, 1, 11, 10, 13, 1, 13, + 0, 18, 12, 16, 26, 13, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, + 0, 0, 2,104, 0, 2, 0, 0, 0, 4,116,109,112, 0, 2, 0, 0, 0, 2,105, + 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, + 0, 0, 10,105,117,112,116,111,103,103,108,101, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, + 6,101,114,114,111,114, 0, 2, 0, 0, 0, 8,111,112,116,105,111,110, 32, 0, + 2, 0, 0, 0, 18, 32,109,117,115,116, 32, 98,101, 32, 97, 32,115,116,114,105, +110,103, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 2,106, + 0, 2, 0, 0, 0, 7,110,118, 97,108,117,101, 0, 2, 0, 0, 0, 9,101,100, +104,114, 97,100,105,111, 0, 4, 0, 0, 1, 26, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 35, + 6, 1, 15, 2, 13, 0, 2, 1, 1, 15, 3, 22, 2, 15, 4, 13, 1, 2, 1, 1, + 29, 0, 1, 11, 5, 13, 1, 18, 5, 30, 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8,116,111,103,103,108, +101,115, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, 0, 2, + 0, 0, 0, 9,105,117,112,114, 97,100,105,111, 0, 2, 0, 0, 0, 7,101,100, +104, 98,111,120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, + 9,101,100,118,114, 97,100,105,111, 0, 4, 0, 0, 1, 32, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 35, 6, 1, 15, 2, 13, 0, 2, 1, 1, 15, 3, 22, 2, 15, 4, 13, 1, + 2, 1, 1, 29, 0, 1, 11, 5, 13, 1, 18, 5, 30, 0, 3, 2, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8,116,111, +103,103,108,101,115, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101, +115, 0, 2, 0, 0, 0, 9,105,117,112,114, 97,100,105,111, 0, 2, 0, 0, 0, + 7,101,100,118, 98,111,120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, 85, 0, 4, 0, 0, 1, 41, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0,159, 7, 2, 7, 1, 50,145, 13, 1, 13, 2, 16, 15, 3, 13, 3, + 2, 1, 1, 44, 52,121, 15, 4, 13, 3, 2, 1, 1, 11, 5, 31, 52, 15, 15, 6, + 11, 7, 13, 2, 42, 11, 8, 42, 2, 0, 1, 50, 94, 13, 3, 7, 1, 16, 48, 11, + 15, 9, 13, 3, 7, 1, 16, 2, 1, 1, 44, 52, 15, 15, 6, 11, 7, 13, 2, 42, + 11, 10, 42, 2, 0, 1, 50, 59, 13, 3, 7, 2, 16, 48, 11, 15, 9, 13, 3, 7, + 2, 16, 2, 1, 1, 44, 48, 11, 15, 11, 13, 3, 7, 2, 16, 2, 1, 1, 44, 48, + 11, 15, 12, 13, 3, 7, 2, 16, 2, 1, 1, 44, 52, 13, 15, 6, 11, 7, 13, 2, + 42, 11, 13, 42, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 5, 1, 13, 1, 13, 2, + 16, 54,152, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, +116,121,112,101, 95,105,116,101,109, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, + 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111, +114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, 0, 2, 0, + 0, 0, 32, 32,105,115, 32,110,111,116, 32, 97, 32,116, 97, 98,108,101, 32,110, +111,114, 32, 97, 32,109,101,110,117, 32,105,116,101,109, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 30, 32,100,111, +101,115, 32,110,111,116, 32,104, 97,118,101, 32, 97, 32,115,116,114,105,110,103, + 32,116,105,116,108,101, 0, 2, 0, 0, 0, 14,116,121,112,101, 95,102,117,110, + 99,116,105,111,110, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103, +101,116, 0, 2, 0, 0, 0, 36, 32,100,111,101,115, 32,110,111,116, 32,104, 97, +118,101, 32, 97,110, 32, 97, 99,116,105,111,110, 32,110,111,114, 32, 97, 32,109, +101,110,117, 0, 4, 0, 0, 1, 59, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,189, 10, 2, 15, + 2, 2, 1, 0, 7, 1, 50,166, 13, 1, 13, 3, 16, 4, 0, 15, 6, 13, 4, 2, + 1, 1, 52, 6, 13, 4, 23, 5, 50,112, 13, 4, 7, 1, 16, 44, 52, 11, 15, 7, + 22, 0, 2, 1, 1, 23, 5, 50, 93, 15, 6, 13, 4, 7, 2, 16, 2, 1, 1, 52, + 38, 13, 4, 11, 8, 13, 4, 7, 1, 16, 26, 13, 4, 7, 1, 13, 4, 7, 2, 16, + 26, 13, 4, 7, 2, 4, 0, 26, 15, 9, 13, 4, 2, 1, 1, 23, 5, 50, 43, 13, + 4, 11, 8, 13, 4, 7, 1, 16, 26, 13, 4, 11, 10, 13, 4, 7, 2, 16, 26, 13, + 4, 7, 1, 4, 0, 26, 13, 4, 7, 2, 4, 0, 26, 15, 11, 13, 4, 2, 1, 1, + 23, 5, 15, 12, 13, 2, 13, 5, 2, 0, 2, 13, 5, 11, 13, 13, 2, 26, 13, 1, + 13, 3, 13, 5, 26, 13, 3, 7, 1, 37, 23, 3, 5, 2, 13, 1, 13, 3, 16, 54, +173, 13, 2, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 14, +105,117,112, 67,114,101, 97,116,101, 77,101,110,117, 0, 2, 0, 0, 0, 2,105, + 0, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,101,108,101,109, 0, 2, 0, + 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, 13, +105,117,112,115,101,112, 97,114, 97,116,111,114, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 11,105,117,112,115,117, 98,109,101,110,117, 0, + 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 8,105,117,112, +105,116,101,109, 0, 2, 0, 0, 0, 10, 73,117,112, 65,112,112,101,110,100, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 8,105,117,112,109,101,110,117, 0, 4, 0, 0, 1, 89, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, + 85, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 5,109,101,110,117, 0, 2, 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, + 85, 0, 4, 0, 0, 1, 94, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, 13, + 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, + 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117,112, 80, +111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 12, + 67, 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 0, 4, 0, 0, 1,102, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 47, 6, 2, 7, 1, 50, 33, 15, 2, 13, 1, 13, 2, 16, 2, 1, + 1, 44, 52, 13, 15, 3, 11, 4, 13, 2, 42, 11, 5, 42, 2, 0, 1, 13, 2, 7, + 1, 37, 23, 2, 13, 1, 13, 2, 16, 54, 40, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, 6,101,114, +114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, 0, + 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114,111,110,103, 32,118, 97,108,117, +101, 32,111,114, 32,105,115, 32,110,111,116, 32,105,110,105,116,105, 97,108,105, +122,101,100, 0, 4, 0, 0, 1,112, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,187, 11, 2, 13, + 0, 20, 3, 2, 1, 1, 13, 1, 18, 4, 7, 1, 7, 0, 50, 14, 13, 5, 7, 1, + 37, 23, 5, 13, 4, 7, 1, 37, 23, 4, 13, 1, 13, 4, 16, 54, 21, 7, 1, 23, + 4, 13, 3, 15, 7, 32, 52, 43, 13, 1, 13, 4, 13, 5, 37, 15, 8, 22, 0, 2, + 1, 1, 26, 15, 9, 13, 2, 13, 1, 13, 4, 13, 5, 37, 16, 2, 0, 2, 13, 1, + 13, 4, 13, 5, 37, 16, 11, 10, 13, 2, 26, 50, 79, 15, 9, 13, 2, 13, 1, 13, + 4, 16, 2, 0, 2, 13, 1, 13, 4, 16, 11, 10, 13, 2, 26, 13, 4, 7, 1, 37, + 23, 4, 13, 3, 15, 7, 32, 52, 43, 13, 1, 13, 4, 13, 5, 37, 15, 8, 22, 0, + 2, 1, 1, 26, 15, 9, 13, 2, 13, 1, 13, 4, 13, 5, 37, 16, 2, 0, 2, 13, + 1, 13, 4, 13, 5, 37, 16, 11, 10, 13, 2, 26, 13, 4, 13, 5, 34, 54, 86, 13, + 2, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 11, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 66,111,120, 69,108,101, +109,101,110,116, 0, 2, 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, + 0, 2,105, 0, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 89, 69, 83, 0, 2, 0, 0, 0, 8,105,117,112,102,105,108,108, 0, 2, 0, 0, + 0, 10, 73,117,112, 65,112,112,101,110,100, 0, 2, 0, 0, 0, 11, 73, 85, 80, + 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, + 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 66,111,120, 69,108,101,109,101, +110,116, 0, 4, 0, 0, 1,146, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, + 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14,105,117,112, + 67,114,101, 97,116,101, 72, 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,104, + 98,111,120, 0, 4, 0, 0, 1,150, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,104, + 98,111,120, 0, 2, 0, 0, 0, 7,101,100,104, 98,111,120, 0, 4, 0, 0, 1, +156, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 19, 4, 1, 13, 0, 11, 1, 15, 2, 26, 15, 3, + 20, 4, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, 8, + 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, + 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, + 0, 0, 8,101,100,102,105,101,108,100, 0, 4, 0, 0, 1,162, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0,123, 7, 1, 4, 1, 15, 3, 13, 0, 18, 4, 2, 1, 1, 46, 9, 15, + 5, 13, 0, 18, 4, 2, 1, 1, 52, 19, 15, 6, 22, 1, 11, 7, 13, 0, 18, 4, + 30, 0, 2, 1, 1, 23, 1, 50, 7, 15, 8, 11, 9, 2, 0, 1, 13, 0, 18, 10, + 52, 19, 15, 11, 22, 1, 11, 10, 13, 0, 18, 10, 30, 0, 2, 1, 1, 23, 2, 50, + 17, 15, 11, 22, 1, 11, 10, 13, 0, 18, 12, 30, 0, 2, 1, 1, 23, 2, 13, 2, + 48, 2, 13, 1, 52, 16, 15, 13, 22, 2, 13, 1, 13, 2, 29, 0, 2, 3, 3, 1, + 50, 4, 4, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 2, +102, 0, 2, 0, 0, 0, 2,108, 0, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 7,112,114, +111,109,112,116, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,110,117,109, 98,101, +114, 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 2, 0, 0, 0, + 6,116,105,116,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, + 0, 0, 55,112, 97,114, 97,109,101,116,101,114, 32,112,114,111,109,112,116, 32, +104, 97,115, 32,119,114,111,110,103, 32,118, 97,108,117,101, 32,111,114, 32,105, +115, 32,110,111,116, 32,105,110,105,116,105, 97,108,105,122,101,100, 0, 2, 0, + 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 8,105,117,112,116,101,120, +116, 0, 2, 0, 0, 0, 7,110,118, 97,108,117,101, 0, 2, 0, 0, 0, 7,101, +100,104, 98,111,120, 0, 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 4, + 0, 0, 1,185, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97, +116,101, 86, 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,118, 98,111,120, 0, + 4, 0, 0, 1,189, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,118, 98,111,120, 0, + 2, 0, 0, 0, 7,101,100,118, 98,111,120, 0, 4, 0, 0, 1,195, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 19, 4, 1, 13, 0, 11, 1, 15, 2, 26, 15, 3, 20, 4, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 89, 69, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 8, 73, + 85, 80, 90, 66, 79, 88, 0, 4, 0, 0, 1,204, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, + 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, + 14,105,117,112, 67,114,101, 97,116,101, 90, 98,111,120, 0, 2, 0, 0, 0, 8, +105,117,112,122, 98,111,120, 0, 4, 0, 0, 1,208, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 44, 6, 1, 15, 2, 20, 3, 13, 0, 2, 1, 2, 7, 1, 50, 17, 15, 5, 13, 1, + 13, 2, 16, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 13, 0, 13, 2, 16, 54, 24, + 13, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 8, 73, + 85, 80, 90, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99, +116,111,114, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 11,105,117,112, 83, +101,116, 78, 97,109,101, 0, 2, 0, 0, 0, 5,122, 98,111,120, 0, 2, 0, 0, + 0, 8, 73, 85, 80, 70, 73, 76, 76, 0, 4, 0, 0, 1,223, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97, +116,101, 70,105,108,108, 0, 2, 0, 0, 0, 8,105,117,112,102,105,108,108, 0, + 4, 0, 0, 1,227, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 70, 73, 76, 76, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,102,105,108,108, 0, + 2, 0, 0, 0, 10, 73, 85, 80, 66, 85, 84, 84, 79, 78, 0, 2, 0, 0, 0, 5, +116,121,112,101, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 4, 0, 0, 1,236, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 32, 5, 2, 13, 1, 18, 1, 44, 48, 4, 13, 1, 18, 2, 52, + 7, 13, 1, 11, 1, 11, 3, 26, 15, 4, 13, 1, 18, 1, 3, 2, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 2, 0, 0, + 0, 1, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 66,117,116, +116,111,110, 0, 2, 0, 0, 0, 10,105,117,112, 98,117,116,116,111,110, 0, 4, + 0, 0, 1,243, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 10, 73, 85, 80, 66, 85, 84, 84, 79, 78, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7, 98,117,116,116, +111,110, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 4, 0, 0, 1, +252, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105, +117,112, 67,114,101, 97,116,101, 84,101,120,116, 0, 2, 0, 0, 0, 8,105,117, +112,116,101,120,116, 0, 4, 0, 0, 2, 0, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 2, + 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, + 5,116,101,120,116, 0, 2, 0, 0, 0, 13, 73, 85, 80, 77, 85, 76, 84, 73, 76, + 73, 78, 69, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 4, 0, 0, + 2, 9, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 19, +105,117,112, 67,114,101, 97,116,101, 77,117,108,116,105, 76,105,110,101, 0, 2, + 0, 0, 0, 13,105,117,112,109,117,108,116,105,108,105,110,101, 0, 4, 0, 0, + 2, 13, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 77, 85, 76, 84, 73, 76, 73, 78, 69, 0, 2, 0, 0, 0, 12, + 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,109,117,108, +116,105,108,105,110,101, 0, 2, 0, 0, 0, 9, 73, 85, 80, 76, 65, 66, 69, 76, + 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 4, 0, 0, 2, 22, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 32, 5, 2, 13, 1, 18, 1, 44, 48, 4, 13, 1, 18, 2, 52, 7, + 13, 1, 11, 1, 11, 3, 26, 15, 4, 13, 1, 18, 1, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 6,116, +105,116,108,101, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 2, 0, 0, 0, + 1, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 76, 97, 98,101, +108, 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 4, 0, 0, 2, + 29, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 76, 65, 66, 69, 76, 0, 2, 0, 0, 0, 12, 67,111,110,115,116, +114,117, 99,116,111,114, 0, 2, 0, 0, 0, 6,108, 97, 98,101,108, 0, 2, 0, + 0, 0, 10, 73, 85, 80, 84, 79, 71, 71, 76, 69, 0, 2, 0, 0, 0, 10, 73, 85, + 80, 66, 85, 84, 84, 79, 78, 0, 4, 0, 0, 2, 38, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 12, 4, 2, 15, 1, 13, 1, 18, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114, +101, 97,116,101, 84,111,103,103,108,101, 0, 2, 0, 0, 0, 6,116,105,116,108, +101, 0, 2, 0, 0, 0, 10,105,117,112,116,111,103,103,108,101, 0, 4, 0, 0, + 2, 42, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, + 0, 10, 73, 85, 80, 84, 79, 71, 71, 76, 69, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7,116,111,103,103,108,101, + 0, 2, 0, 0, 0, 8, 73, 85, 80, 73, 84, 69, 77, 0, 4, 0, 0, 2, 51, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 12, 4, 2, 15, 1, 13, 1, 18, 2, 3, 2, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 14,105,117,112, 67,114,101, 97,116,101, 73,116,101,109, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 8,105,117,112,105,116,101,109, 0, 4, + 0, 0, 2, 55, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 73, 84, 69, 77, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,105,116,101,109, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 83, 85, 66, 77, 69, 78, 85, 0, 2, 0, 0, 0, 10, +116,121,112,101, 95,109,101,110,117, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 4, 0, 0, 2, 64, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 31, 6, 2, 15, 2, 13, 1, + 18, 3, 13, 1, 7, 1, 16, 2, 1, 2, 13, 1, 7, 1, 16, 11, 4, 13, 2, 26, + 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 2,104, 0, 2, 0, 0, 0, 17,105,117,112, 67,114,101, + 97,116,101, 83,117, 98,109,101,110,117, 0, 2, 0, 0, 0, 6,116,105,116,108, +101, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 11,105,117,112,115,117, 98,109,101,110,117, 0, 4, 0, 0, 2, 70, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 83, 85, 66, 77, 69, 78, 85, 0, 2, 0, 0, 0, 12, 67,111,110,115,116, +114,117, 99,116,111,114, 0, 2, 0, 0, 0, 8,115,117, 98,109,101,110,117, 0, + 2, 0, 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 4, 0, + 0, 2, 79, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 19,105,117,112, 67,114,101, 97,116,101, 83,101,112, 97,114, 97,116,111,114, 0, + 2, 0, 0, 0, 13,105,117,112,115,101,112, 97,114, 97,116,111,114, 0, 4, 0, + 0, 2, 83, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,115,101, +112, 97,114, 97,116,111,114, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 73, 76, 69, + 68, 76, 71, 0, 4, 0, 0, 2, 92, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, + 2, 96, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 17,105,117,112, 67,114,101, 97,116,101, + 70,105,108,101, 68,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105,108,101, +100,108,103, 0, 4, 0, 0, 2,100, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 73, 76, 69, 68, 76, 71, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 14, 73, 85, 80, 77, 69, + 83, 83, 65, 71, 69, 68, 76, 71, 0, 4, 0, 0, 2,109, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 2, 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, + 0, 0, 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108, +102, 0, 4, 0, 0, 2,113, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 20,105,117,112, 67, +114,101, 97,116,101, 77,101,115,115, 97,103,101, 68,108,103, 0, 2, 0, 0, 0, + 14,105,117,112,109,101,115,115, 97,103,101,100,108,103, 0, 4, 0, 0, 2,117, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 14, + 73, 85, 80, 77, 69, 83, 83, 65, 71, 69, 68, 76, 71, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 11,109,101,115,115, + 97,103,101,100,108,103, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, + 68, 76, 71, 0, 4, 0, 0, 2,126, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, + 2,130, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 18,105,117,112, 67,114,101, 97,116,101, + 67,111,108,111,114, 68,108,103, 0, 2, 0, 0, 0, 12,105,117,112, 99,111,108, +111,114,100,108,103, 0, 4, 0, 0, 2,134, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 68, + 76, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 9, 99,111,108,111,114,100,108,103, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 70, 79, 78, 84, 68, 76, 71, 0, 4, 0, 0, 2,143, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 2, 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, + 0, 0, 0, 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 4, 0, 0, 2,147, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, + 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 17,105,117,112, + 67,114,101, 97,116,101, 70,111,110,116, 68,108,103, 0, 2, 0, 0, 0, 11,105, +117,112,102,111,110,116,100,108,103, 0, 4, 0, 0, 2,151, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 79, + 78, 84, 68, 76, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116, +111,114, 0, 2, 0, 0, 0, 8,102,111,110,116,100,108,103, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 85, 83, 69, 82, 0, 4, 0, 0, 2,160, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, + 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 85,115,101,114, 0, 2, 0, 0, + 0, 8,105,117,112,117,115,101,114, 0, 4, 0, 0, 2,164, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 10, 2, 0, 15, 0, 20, 1, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 0, 0, 0, 8, 73, 85, 80, 85, 83, 69, 82, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,117,115,101,114, + 0, 2, 0, 0, 0, 14, 73, 85, 80, 78, 79, 82, 77, 65, 76, 73, 90, 69, 82, 0, + 4, 0, 0, 2,173, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 47, 6, 2, 7, 1, 50, 33, 15, + 2, 13, 1, 13, 2, 16, 2, 1, 1, 44, 52, 13, 15, 3, 11, 4, 13, 2, 42, 11, + 5, 42, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 13, 1, 13, 2, 16, 54, 40, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, + 0, 2,105, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, + 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, + 97,109,101,116,101,114, 32, 0, 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114, +111,110,103, 32,118, 97,108,117,101, 32,111,114, 32,105,115, 32,110,111,116, 32, +105,110,105,116,105, 97,108,105,122,101,100, 0, 4, 0, 0, 2,183, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 40, 8, 2, 15, 2, 2, 1, 0, 7, 1, 50, 17, 13, 2, 11, 4, + 13, 1, 13, 3, 16, 26, 13, 3, 7, 1, 37, 23, 3, 13, 1, 13, 3, 16, 54, 24, + 13, 2, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 20,105, +117,112, 67,114,101, 97,116,101, 78,111,114,109, 97,108,105,122,101,114, 0, 2, + 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 11, 97,100,100, 99,111,110,116,114,111, +108, 0, 2, 0, 0, 0, 14,105,117,112,110,111,114,109, 97,108,105,122,101,114, + 0, 4, 0, 0, 2,193, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 10, 2, 0, 15, 0, 20, 1, + 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 14, 73, 85, 80, + 78, 79, 82, 77, 65, 76, 73, 90, 69, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 11,110,111,114,109, 97,108,105, +122,101,114, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, 2, 0, + 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 2,202, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, 1, + 13, 1, 7, 1, 16, 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 2,104, 0, 2, + 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 70,114, 97,109,101, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 9, +105,117,112,102,114, 97,109,101, 0, 4, 0, 0, 2,208, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, + 77, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 6,102,114, 97,109,101, 0, 2, 0, 0, 0, 10, 73, 85, 80, 67, + 65, 78, 86, 65, 83, 0, 4, 0, 0, 2,217, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, + 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 67, 97, +110,118, 97,115, 0, 2, 0, 0, 0, 10,105,117,112, 99, 97,110,118, 97,115, 0, + 4, 0, 0, 2,221, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 10, 73, 85, 80, 67, 65, 78, 86, 65, 83, 0, 2, 0, 0, 0, 12, + 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7, 99, 97,110, +118, 97,115, 0, 2, 0, 0, 0, 8, 73, 85, 80, 76, 73, 83, 84, 0, 4, 0, 0, + 2,230, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14, +105,117,112, 67,114,101, 97,116,101, 76,105,115,116, 0, 4, 0, 0, 2,234, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 42, 6, 2, 15, 1, 13, 1, 2, 1, 1, 11, 2, 32, 52, + 16, 15, 3, 13, 0, 18, 5, 11, 6, 13, 1, 42, 3, 2, 2, 50, 11, 15, 7, 18, + 8, 13, 0, 13, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, + 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, + 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101, +116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, + 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 1, 0, 2, + 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 4,103,101,116, 0, + 4, 0, 0, 2,242, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 90, 8, 3, 15, 2, 13, 1, 2, + 1, 1, 11, 3, 32, 52, 62, 15, 4, 13, 2, 2, 1, 1, 46, 7, 15, 5, 13, 2, + 2, 1, 1, 52, 21, 15, 6, 13, 0, 18, 8, 11, 9, 13, 1, 42, 11, 9, 13, 2, + 42, 3, 3, 3, 50, 23, 13, 2, 4, 0, 32, 52, 16, 15, 6, 13, 0, 18, 8, 11, + 9, 13, 1, 42, 13, 2, 3, 3, 3, 15, 10, 18, 11, 13, 0, 13, 1, 13, 2, 3, + 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 6,105,110,100,101, +120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 5,116,121, +112,101, 0, 2, 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 12,116,121,112, +101, 95,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 1, 0, 2, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 4,115,101,116, 0, 2, + 0, 0, 0, 8,105,117,112,108,105,115,116, 0, 4, 0, 0, 2,253, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 76, 73, 83, 84, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 5,108,105,115,116, 0, 2, 0, 0, 0, 9, 73, 85, 80, + 73, 77, 65, 71, 69, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, + 0, 3, 6, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0,116, 8, 2, 7, 1, 50, 92, 7, 1, 50, + 32, 15, 3, 13, 1, 13, 2, 16, 13, 3, 16, 2, 1, 1, 11, 4, 31, 52, 7, 15, + 5, 11, 6, 2, 0, 1, 13, 3, 7, 1, 37, 23, 3, 13, 1, 13, 2, 16, 13, 3, + 16, 54, 42, 13, 1, 18, 7, 48, 10, 13, 3, 7, 1, 38, 13, 1, 18, 7, 31, 52, + 9, 15, 5, 11, 8, 2, 0, 1, 50, 10, 13, 1, 11, 7, 13, 3, 7, 1, 38, 26, + 13, 2, 7, 1, 37, 23, 2, 5, 1, 13, 1, 13, 2, 16, 54, 99, 13, 1, 11, 9, + 13, 2, 7, 1, 38, 26, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 2,106, 0, 2, 0, + 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 7,110,117,109, 98,101,114, 0, + 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 38,110,111,110, 45, +110,117,109,101,114,105, 99, 32,118, 97,108,117,101, 32,105,110, 32,105,109, 97, +103,101, 32,100,101,102,105,110,105,116,105,111,110, 0, 2, 0, 0, 0, 6,119, +105,100,116,104, 0, 2, 0, 0, 0, 26,105,110, 99,111,110,115,105,115,116,101, +110,116, 32,105,109, 97,103,101, 32,108,101,110,103,104,116, 0, 2, 0, 0, 0, + 7,104,101,105,103,104,116, 0, 4, 0, 0, 3, 29, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 74, 9, 2, 15, 2, 13, 1, 18, 3, 13, 1, 18, 4, 13, 1, 2, 1, 3, 15, 5, + 13, 1, 18, 6, 2, 1, 1, 11, 7, 32, 52, 38, 7, 1, 50, 23, 15, 9, 13, 2, + 13, 3, 13, 1, 18, 6, 13, 3, 16, 2, 0, 3, 13, 3, 7, 1, 37, 23, 3, 13, + 1, 18, 6, 13, 3, 16, 54, 32, 5, 1, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110, +100,108,101, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 73,109, + 97,103,101, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, 0, 7, +104,101,105,103,104,116, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, + 0, 7, 99,111,108,111,114,115, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, + 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 9,105,117,112,105,109, 97,103, +101, 0, 4, 0, 0, 3, 41, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, + 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2, +111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 73, 77, 65, 71, 69, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 6,105,109, + 97,103,101, 0, 2, 0, 0, 0, 12, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, + 0, 4, 0, 0, 3, 49, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 20, 6, 2, 15, 1, 13, 1, + 18, 2, 13, 1, 18, 3, 13, 1, 18, 4, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 18,105,117,112, 67, +114,101, 97,116,101, 73,109, 97,103,101, 82, 71, 66, 0, 2, 0, 0, 0, 6,119, +105,100,116,104, 0, 2, 0, 0, 0, 7,104,101,105,103,104,116, 0, 2, 0, 0, + 0, 7,112,105,120,101,108,115, 0, 2, 0, 0, 0, 12,105,117,112,105,109, 97, +103,101,114,103, 98, 0, 4, 0, 0, 3, 53, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 73, 77, 65, 71, 69, 82, + 71, 66, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 9,105,109, 97,103,101,114,103, 98, 0, 2, 0, 0, 0, 13, 73, + 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, 65, 0, 4, 0, 0, 3, 61, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 20, 6, 2, 15, 1, 13, 1, 18, 2, 13, 1, 18, 3, 13, 1, 18, + 4, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 19,105,117,112, 67,114,101, 97,116,101, 73,109, 97,103, +101, 82, 71, 66, 65, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, + 0, 7,104,101,105,103,104,116, 0, 2, 0, 0, 0, 7,112,105,120,101,108,115, + 0, 2, 0, 0, 0, 13,105,117,112,105,109, 97,103,101,114,103, 98, 97, 0, 4, + 0, 0, 3, 65, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 13, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, 65, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,105, +109, 97,103,101,114,103, 98, 97, 0, 2, 0, 0, 0, 15, 73, 85, 80, 80, 82, 79, + 71, 82, 69, 83, 83, 66, 65, 82, 0, 4, 0, 0, 3, 74, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, + 0, 0, 21,105,117,112, 67,114,101, 97,116,101, 80,114,111,103,114,101,115,115, + 66, 97,114, 0, 2, 0, 0, 0, 15,105,117,112,112,114,111,103,114,101,115,115, + 98, 97,114, 0, 4, 0, 0, 3, 78, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 15, 73, 85, 80, 80, 82, 79, 71, 82, 69, 83, 83, + 66, 65, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, + 0, 2, 0, 0, 0, 12,112,114,111,103,114,101,115,115, 98, 97,114, 0, 2, 0, + 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, + 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 7, 65, 67, 84, 73, 79, 78, + 0, 2, 0, 0, 0, 9, 97, 99,116,105,111,110, 99, 98, 0, 2, 0, 0, 0, 10, + 65, 67, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 9,103,101,116,102,111, + 99,117,115, 0, 2, 0, 0, 0, 12, 71, 69, 84, 70, 79, 67, 85, 83, 95, 67, 66, + 0, 2, 0, 0, 0, 16,105,117,112, 95,103,101,116,102,111, 99,117,115, 95, 99, + 98, 0, 2, 0, 0, 0, 10,107,105,108,108,102,111, 99,117,115, 0, 2, 0, 0, + 0, 13, 75, 73, 76, 76, 70, 79, 67, 85, 83, 95, 67, 66, 0, 2, 0, 0, 0, 17, +105,117,112, 95,107,105,108,108,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, + 0, 6,102,111, 99,117,115, 0, 2, 0, 0, 0, 9, 70, 79, 67, 85, 83, 95, 67, + 66, 0, 2, 0, 0, 0, 13,105,117,112, 95,102,111, 99,117,115, 95, 99, 98, 0, + 2, 0, 0, 0, 6,107, 95, 97,110,121, 0, 2, 0, 0, 0, 6, 75, 95, 65, 78, + 89, 0, 2, 0, 0, 0, 10,105,117,112, 95,107, 95, 97,110,121, 0, 2, 0, 0, + 0, 5,104,101,108,112, 0, 2, 0, 0, 0, 8, 72, 69, 76, 80, 95, 67, 66, 0, + 2, 0, 0, 0, 12,105,117,112, 95,104,101,108,112, 95, 99, 98, 0, 2, 0, 0, + 0, 8, 99, 97,114,101,116, 99, 98, 0, 2, 0, 0, 0, 9, 67, 65, 82, 69, 84, + 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95, 99, 97,114,101,116, 95, 99, + 98, 0, 2, 0, 0, 0, 9,107,101,121,112,114,101,115,115, 0, 2, 0, 0, 0, + 12, 75, 69, 89, 80, 82, 69, 83, 83, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117, +112, 95,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, 0, 7,115, + 99,114,111,108,108, 0, 2, 0, 0, 0, 10, 83, 67, 82, 79, 76, 76, 95, 67, 66, + 0, 2, 0, 0, 0, 14,105,117,112, 95,115, 99,114,111,108,108, 95, 99, 98, 0, + 2, 0, 0, 0, 10,116,114, 97,121, 99,108,105, 99,107, 0, 2, 0, 0, 0, 13, + 84, 82, 65, 89, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117, +112, 95,116,114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 6, + 99,108,111,115,101, 0, 2, 0, 0, 0, 9, 67, 76, 79, 83, 69, 95, 67, 66, 0, + 2, 0, 0, 0, 13,105,117,112, 95, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, + 0, 0, 5,111,112,101,110, 0, 2, 0, 0, 0, 8, 79, 80, 69, 78, 95, 67, 66, + 0, 2, 0, 0, 0, 12,105,117,112, 95,111,112,101,110, 95, 99, 98, 0, 2, 0, + 0, 0, 7,115,104,111,119, 99, 98, 0, 2, 0, 0, 0, 8, 83, 72, 79, 87, 95, + 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,115,104,111,119, 95, 99, 98, 0, + 2, 0, 0, 0, 6,109, 97,112, 99, 98, 0, 2, 0, 0, 0, 7, 77, 65, 80, 95, + 67, 66, 0, 2, 0, 0, 0, 11,105,117,112, 95,109, 97,112, 95, 99, 98, 0, 2, + 0, 0, 0, 8,117,110,109, 97,112, 99, 98, 0, 2, 0, 0, 0, 9, 85, 78, 77, + 65, 80, 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95,117,110,109, 97,112, + 95, 99, 98, 0, 2, 0, 0, 0, 10,100,114,111,112,102,105,108,101,115, 0, 2, + 0, 0, 0, 13, 68, 82, 79, 80, 70, 73, 76, 69, 83, 95, 67, 66, 0, 2, 0, 0, + 0, 17,105,117,112, 95,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 2, + 0, 0, 0, 10,109,101,110,117, 99,108,111,115,101, 0, 2, 0, 0, 0, 13, 77, + 69, 78, 85, 67, 76, 79, 83, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, + 95,109,101,110,117, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 10,104, +105,103,104,108,105,103,104,116, 0, 2, 0, 0, 0, 13, 72, 73, 71, 72, 76, 73, + 71, 72, 84, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,104,105,103,104, +108,105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 4,119,111,109, 0, 2, 0, + 0, 0, 7, 87, 79, 77, 95, 67, 66, 0, 2, 0, 0, 0, 11,105,117,112, 95,119, +111,109, 95, 99, 98, 0, 2, 0, 0, 0, 6,119,104,101,101,108, 0, 2, 0, 0, + 0, 9, 87, 72, 69, 69, 76, 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95, +119,104,101,101,108, 95, 99, 98, 0, 2, 0, 0, 0, 10, 66, 85, 84, 84, 79, 78, + 95, 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95, 98,117,116,116,111,110, 95, + 99, 98, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, 2, 0, 0, 0, 10, + 82, 69, 83, 73, 90, 69, 95, 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95,114, +101,115,105,122,101, 95, 99, 98, 0, 2, 0, 0, 0, 5,109,111,118,101, 0, 2, + 0, 0, 0, 12,105,117,112, 95,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, + 7,109,111,116,105,111,110, 0, 2, 0, 0, 0, 10, 77, 79, 84, 73, 79, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95,109,111,116,105,111,110, 95, 99, + 98, 0, 2, 0, 0, 0, 12,101,110,116,101,114,119,105,110,100,111,119, 0, 2, + 0, 0, 0, 15, 69, 78, 84, 69, 82, 87, 73, 78, 68, 79, 87, 95, 67, 66, 0, 2, + 0, 0, 0, 19,105,117,112, 95,101,110,116,101,114,119,105,110,100,111,119, 95, + 99, 98, 0, 2, 0, 0, 0, 12,108,101, 97,118,101,119,105,110,100,111,119, 0, + 2, 0, 0, 0, 15, 76, 69, 65, 86, 69, 87, 73, 78, 68, 79, 87, 95, 67, 66, 0, + 2, 0, 0, 0, 19,105,117,112, 95,108,101, 97,118,101,119,105,110,100,111,119, + 95, 99, 98, 0, 2, 0, 0, 0, 5,101,100,105,116, 0, 2, 0, 0, 0, 8, 69, + 68, 73, 84, 95, 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,101,100,105,116, + 95, 99, 98, 0, 2, 0, 0, 0, 12,109,117,108,116,105,115,101,108,101, 99,116, + 0, 2, 0, 0, 0, 15, 77, 85, 76, 84, 73, 83, 69, 76, 69, 67, 84, 95, 67, 66, + 0, 2, 0, 0, 0, 19,105,117,112, 95,109,117,108,116,105,115,101,108,101, 99, +116, 95, 99, 98, 0, 2, 0, 0, 0, 7,102,105,108,101, 99, 98, 0, 2, 0, 0, + 0, 8, 70, 73, 76, 69, 95, 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,102, +105,108,101, 95, 99, 98, 0, 2, 0, 0, 0, 14,109,100,105, 97, 99,116,105,118, + 97,116,101, 99, 98, 0, 2, 0, 0, 0, 15, 77, 68, 73, 65, 67, 84, 73, 86, 65, + 84, 69, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109,100,105, 97, 99, +116,105,118, 97,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 11,100,114,111,112,100, +111,119,110, 99, 98, 0, 2, 0, 0, 0, 12, 68, 82, 79, 80, 68, 79, 87, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,100,114,111,112,100,111,119,110, + 95, 99, 98, 0, 2, 0, 0, 0, 11,100, 98,108, 99,108,105, 99,107, 99, 98, 0, + 2, 0, 0, 0, 12, 68, 66, 76, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, + 0, 16,105,117,112, 95,100, 98,108, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, + 0, 0, 18,105,117,112, 95, 97, 99,116,105,111,110, 95,116,111,103,103,108,101, + 0, 2, 0, 0, 0, 16,105,117,112, 95, 97, 99,116,105,111,110, 95,116,101,120, +116, 0, 2, 0, 0, 0, 18,105,117,112, 95, 97, 99,116,105,111,110, 95, 98,117, +116,116,111,110, 0, 2, 0, 0, 0, 16,105,117,112, 95, 97, 99,116,105,111,110, + 95,108,105,115,116, 0, 2, 0, 0, 0, 18,105,117,112, 95, 97, 99,116,105,111, +110, 95, 99, 97,110,118, 97,115, 0, 2, 0, 0, 0, 17,105,117,112, 95, 97, 99, +116,105,111,110, 95,116,105,109,101,114, 0, 2, 0, 0, 0, 10, 97, 99,116,105, +111,110, 95, 99, 98, 0, 2, 0, 0, 0, 12,103,101,116,102,111, 99,117,115, 95, + 99, 98, 0, 2, 0, 0, 0, 13,107,105,108,108,102,111, 99,117,115, 95, 99, 98, + 0, 2, 0, 0, 0, 9,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, 0, 8, +104,101,108,112, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99, 97,114,101,116, 95, 99, + 98, 0, 2, 0, 0, 0, 12,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115, 99,114,111,108,108, 95, 99, 98, 0, 2, 0, 0, 0, 13,116, +114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99,108,111, +115,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,111,112,101,110, 95, 99, 98, 0, 2, + 0, 0, 0, 8,115,104,111,119, 95, 99, 98, 0, 2, 0, 0, 0, 7,109, 97,112, + 95, 99, 98, 0, 2, 0, 0, 0, 9,117,110,109, 97,112, 95, 99, 98, 0, 2, 0, + 0, 0, 13,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 2, 0, 0, 0, + 13,109,101,110,117, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 13,104, +105,103,104,108,105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 7,119,111,109, + 95, 99, 98, 0, 2, 0, 0, 0, 9,119,104,101,101,108, 95, 99, 98, 0, 2, 0, + 0, 0, 10, 98,117,116,116,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 10,114,101, +115,105,122,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,109,111,118,101, 95, 99, 98, + 0, 2, 0, 0, 0, 10,109,111,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, + 15,101,110,116,101,114,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, + 15,108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, + 8,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,117,108,116,105,115, +101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,100,105, 97, 99,116, +105,118, 97,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,102,105,108,101, 95, 99, + 98, 0, 2, 0, 0, 0, 12,100,114,111,112,100,111,119,110, 95, 99, 98, 0, 2, + 0, 0, 0, 12,100, 98,108, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, + 16,118, 97,108,117,101, 99,104, 97,110,103,101,100, 95, 99, 98, 0, 2, 0, 0, + 0, 15,118, 97,108,117,101, 99,104, 97,110,103,101,100, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/iuplua_widgets_be64.lo"); +} diff --git a/iup/srclua3/loh/iuplua_widgets_le64.loh b/iup/srclua3/loh/iuplua_widgets_le64.loh new file mode 100755 index 0000000..dd42bf4 --- /dev/null +++ b/iup/srclua3/loh/iuplua_widgets_le64.loh @@ -0,0 +1,939 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/iuplua_widgets_le64.lo"); +*/ +/* ../obj/iuplua3/iuplua_widgets_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 20, 64,105,117,112,108,117, + 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 7,202, 67, 0, + 22, 1, 11, 1, 22, 0, 30, 0, 25, 0, 15, 0, 11, 2, 11, 3, 26, 15, 0, 11, + 4, 11, 5, 26, 15, 0, 11, 6, 11, 7, 26, 15, 0, 11, 8, 11, 9, 26, 15, 0, + 11, 10, 11, 11, 26, 15, 0, 11, 12, 11, 13, 26, 15, 0, 11, 14, 11, 15, 26, 15, + 0, 11, 16, 11, 17, 26, 15, 0, 11, 18, 11, 19, 26, 15, 0, 11, 20, 11, 21, 26, + 15, 0, 11, 22, 11, 23, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, 24, 15, 24, 11, + 26, 11, 27, 26, 11, 29, 25, 28, 15, 30, 11, 31, 15, 28, 26, 22, 1, 11, 25, 15, + 0, 30, 0, 25, 32, 15, 32, 11, 26, 11, 33, 26, 11, 35, 25, 34, 15, 30, 11, 36, + 15, 34, 26, 22, 2, 11, 25, 15, 0, 11, 1, 22, 1, 15, 38, 29, 0, 1, 30, 1, + 25, 37, 15, 37, 11, 26, 11, 39, 26, 15, 37, 11, 40, 11, 41, 26, 15, 37, 11, 42, + 11, 43, 26, 15, 37, 11, 44, 11, 45, 26, 11, 47, 25, 46, 15, 30, 11, 48, 15, 46, + 26, 22, 2, 11, 25, 15, 0, 11, 1, 22, 1, 15, 38, 29, 0, 1, 30, 1, 25, 49, + 15, 49, 11, 26, 11, 50, 26, 11, 52, 25, 51, 15, 30, 11, 53, 15, 51, 26, 11, 55, + 25, 54, 11, 57, 25, 56, 11, 59, 25, 58, 22, 1, 11, 25, 15, 0, 30, 0, 25, 60, + 15, 60, 11, 4, 11, 61, 26, 15, 60, 11, 26, 11, 62, 26, 11, 64, 25, 63, 15, 30, + 11, 65, 15, 63, 26, 15, 66, 11, 44, 11, 67, 26, 22, 1, 11, 25, 15, 0, 30, 0, + 25, 68, 15, 68, 11, 4, 11, 69, 26, 15, 68, 11, 26, 11, 70, 26, 22, 1, 11, 25, + 15, 68, 30, 0, 25, 71, 15, 71, 11, 72, 11, 73, 26, 11, 75, 25, 74, 15, 30, 11, + 76, 15, 74, 26, 11, 78, 25, 77, 11, 80, 25, 79, 22, 1, 11, 25, 15, 68, 30, 0, + 25, 81, 15, 81, 11, 72, 11, 82, 26, 11, 84, 25, 83, 15, 30, 11, 85, 15, 83, 26, + 11, 87, 25, 86, 22, 1, 11, 25, 15, 68, 30, 0, 25, 88, 15, 88, 11, 72, 11, 89, + 26, 11, 91, 25, 90, 15, 30, 11, 92, 15, 90, 26, 22, 1, 11, 25, 15, 0, 30, 0, + 25, 93, 15, 93, 11, 26, 11, 94, 26, 11, 96, 25, 95, 15, 30, 11, 97, 15, 95, 26, + 22, 2, 11, 25, 15, 0, 11, 99, 22, 1, 11,100, 15,101, 30, 0, 30, 1, 25, 98, + 15, 98, 11, 26, 11,102, 26, 11,104, 25,103, 15, 30, 11,105, 15,103, 26, 22, 1, + 11, 25, 15, 0, 30, 0, 25,106, 15,106, 11, 26, 11,107, 26, 11,109, 25,108, 15, + 30, 11,110, 15,108, 26, 22, 1, 11, 25, 15,112, 30, 0, 25,111, 15,111, 11, 26, + 11,113, 26, 11,115, 25,114, 15, 30, 11,116, 15,114, 26, 22, 2, 11, 25, 15, 0, + 11, 99, 22, 1, 11,118, 15,101, 30, 0, 30, 1, 25,117, 15,117, 11, 26, 11,119, + 26, 11,121, 25,120, 15, 30, 11,122, 15,120, 26, 22, 1, 11, 25, 15,124, 30, 0, + 25,123, 15,123, 11, 26, 11,125, 26, 11,127, 25,126, 15, 30, 11,128, 15,126, 26, + 22, 1, 11, 25, 15,124, 30, 0, 25,129, 15,129, 11, 26, 11,130, 26, 11,132, 25, +131, 15, 30, 11,133, 15,131, 26, 22, 2, 11, 25, 15, 0, 11, 99, 22, 2, 15,135, + 29, 0, 1, 11,136, 15,101, 30, 0, 30, 1, 25,134, 15,134, 11, 26, 11,137, 26, + 11,139, 25,138, 15, 30, 11,140, 15,138, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, +141, 15,141, 11, 26, 11,142, 26, 11,144, 25,143, 15, 30, 11,145, 15,143, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,146, 15,146, 11, 44, 11,147, 26, 15,146, 11, 26, + 11,148, 26, 11,150, 25,149, 15, 30, 11,151, 15,149, 26, 22, 1, 11, 25, 15, 0, + 30, 0, 25,152, 15,152, 11, 44, 11,153, 26, 15,152, 11, 26, 11,154, 26, 11,156, + 25,155, 15, 30, 11,157, 15,155, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,158, 15, +158, 11, 44, 11,159, 26, 15,158, 11, 26, 11,160, 26, 11,162, 25,161, 15, 30, 11, +163, 15,161, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,164, 15,164, 11, 44, 11,165, + 26, 15,164, 11, 26, 11,166, 26, 11,168, 25,167, 15, 30, 11,169, 15,167, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,170, 15,170, 11, 26, 11,171, 26, 11,173, 25,172, + 15, 30, 11,174, 15,172, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,175, 15,175, 11, + 4, 11,176, 26, 15,175, 11, 26, 11,177, 26, 11,179, 25,178, 15, 30, 11,180, 15, +178, 26, 22, 2, 11, 25, 15, 0, 11, 99, 22, 1, 15,182, 29, 0, 1, 30, 1, 25, +181, 15,181, 11, 26, 11,183, 26, 11,185, 25,184, 15, 30, 11,186, 15,184, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,187, 15,187, 11, 26, 11,188, 26, 11,190, 25,189, + 15, 30, 11,191, 15,189, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,192, 15,192, 11, + 26, 11,193, 26, 15,192, 11, 8, 11,194, 26, 15,192, 11, 10, 11,195, 26, 11,197, + 25,196, 15, 30, 11,198, 15,196, 26, 22, 1, 11, 25, 15,200, 30, 0, 25,199, 15, +199, 11, 4, 11,201, 26, 15,199, 11, 26, 11,202, 26, 11,204, 25,203, 15, 30, 11, +205, 15,203, 26, 22, 1, 11, 25, 15,200, 30, 0, 25,206, 15,206, 11, 26, 11,207, + 26, 11,209, 25,208, 15, 30, 11,210, 15,208, 26, 22, 1, 11, 25, 15,200, 30, 0, + 25,211, 15,211, 11, 26, 11,212, 26, 11,214, 25,213, 15, 30, 11,215, 15,213, 26, + 22, 1, 11, 25, 15,200, 30, 0, 25,216, 15,216, 11, 26, 11,217, 26, 11,219, 25, +218, 15, 30, 11,220, 15,218, 26, 22, 33, 11,222, 22, 2, 11,223, 4, 0, 29, 0, + 2, 11,224, 22, 2, 11,225, 4, 0, 29, 0, 2, 11,226, 22, 2, 11,227, 15,228, + 29, 0, 2, 11,229, 22, 2, 11,230, 15,231, 29, 0, 2, 11,232, 22, 2, 11,233, + 15,234, 29, 0, 2, 11,235, 22, 2, 11,236, 15,237, 29, 0, 2, 11,238, 22, 2, + 11,239, 15,240, 29, 0, 2, 11,241, 22, 2, 11,242, 15,243, 29, 0, 2, 11,244, + 22, 2, 11,245, 15,246, 29, 0, 2, 11,247, 22, 2, 11,248, 15,249, 29, 0, 2, + 11,250, 22, 2, 11,251, 15,252, 29, 0, 2, 11,253, 22, 2, 11,254, 15,255, 29, + 0, 2, 10, 1, 0, 22, 2, 10, 1, 1, 14, 1, 2, 29, 0, 2, 10, 1, 3, 22, + 2, 10, 1, 4, 14, 1, 5, 29, 0, 2, 10, 1, 6, 22, 2, 10, 1, 7, 14, 1, + 8, 29, 0, 2, 10, 1, 9, 22, 2, 10, 1, 10, 14, 1, 11, 29, 0, 2, 10, 1, + 12, 22, 2, 10, 1, 13, 14, 1, 14, 29, 0, 2, 10, 1, 15, 22, 2, 10, 1, 16, + 14, 1, 17, 29, 0, 2, 10, 1, 18, 22, 2, 10, 1, 19, 14, 1, 20, 29, 0, 2, + 10, 1, 21, 22, 2, 10, 1, 22, 14, 1, 23, 29, 0, 2, 10, 1, 24, 22, 2, 10, + 1, 25, 14, 1, 26, 29, 0, 2, 11,105, 22, 2, 10, 1, 27, 14, 1, 28, 29, 0, + 2, 10, 1, 29, 22, 2, 10, 1, 30, 14, 1, 31, 29, 0, 2, 10, 1, 32, 22, 2, + 10, 1, 30, 14, 1, 33, 29, 0, 2, 10, 1, 34, 22, 2, 10, 1, 35, 14, 1, 36, + 29, 0, 2, 10, 1, 37, 22, 2, 10, 1, 38, 14, 1, 39, 29, 0, 2, 10, 1, 40, + 22, 2, 10, 1, 41, 14, 1, 42, 29, 0, 2, 10, 1, 43, 22, 2, 10, 1, 44, 14, + 1, 45, 29, 0, 2, 10, 1, 46, 22, 2, 10, 1, 47, 14, 1, 48, 29, 0, 2, 10, + 1, 49, 22, 2, 10, 1, 50, 14, 1, 51, 29, 0, 2, 10, 1, 52, 22, 2, 10, 1, + 53, 14, 1, 54, 29, 0, 2, 10, 1, 55, 22, 2, 10, 1, 56, 14, 1, 57, 29, 0, + 2, 30, 31, 10, 1, 58, 22, 2, 10, 1, 59, 14, 1, 60, 29, 0, 2, 30, 0, 25, +221, 15,221, 18,222, 11,128, 14, 1, 61, 26, 15,221, 18,222, 11,116, 14, 1, 62, + 26, 15,221, 18,222, 11,110, 14, 1, 62, 26, 15,221, 18,222, 11,105, 14, 1, 63, + 26, 15,221, 18,222, 11,198, 14, 1, 64, 26, 15,221, 18,222, 11,133, 14, 1, 63, + 26, 15,221, 18,222, 11,191, 14, 1, 65, 26, 15,221, 18,224, 11, 31, 14, 1, 66, + 26, 15,221, 10, 1, 67, 15,221, 18,224, 26, 15,221, 10, 1, 68, 15,221, 18,226, + 26, 15,221, 10, 1, 69, 15,221, 18,229, 26, 15,221, 10, 1, 70, 15,221, 18,232, + 26, 15,221, 11,235, 15,221, 18,235, 26, 15,221, 10, 1, 71, 15,221, 18,238, 26, + 15,221, 10, 1, 72, 15,221, 18,241, 26, 15,221, 10, 1, 73, 15,221, 18,244, 26, + 15,221, 10, 1, 74, 15,221, 18,247, 26, 15,221, 10, 1, 75, 15,221, 18,250, 26, + 15,221, 10, 1, 76, 15,221, 18,253, 26, 15,221, 10, 1, 77, 15,221, 17, 1, 0, + 26, 15,221, 10, 1, 78, 15,221, 17, 1, 3, 26, 15,221, 10, 1, 79, 15,221, 17, + 1, 6, 26, 15,221, 10, 1, 80, 15,221, 17, 1, 9, 26, 15,221, 10, 1, 81, 15, +221, 17, 1, 12, 26, 15,221, 10, 1, 82, 15,221, 17, 1, 15, 26, 15,221, 10, 1, + 83, 15,221, 17, 1, 18, 26, 15,221, 10, 1, 84, 15,221, 17, 1, 21, 26, 15,221, + 10, 1, 85, 15,221, 17, 1, 24, 26, 15,221, 10, 1, 86, 15,221, 18,105, 26, 15, +221, 10, 1, 87, 15,221, 17, 1, 29, 26, 15,221, 10, 1, 88, 15,221, 17, 1, 32, + 26, 15,221, 10, 1, 89, 15,221, 17, 1, 34, 26, 15,221, 10, 1, 90, 15,221, 17, + 1, 37, 26, 15,221, 10, 1, 91, 15,221, 17, 1, 40, 26, 15,221, 10, 1, 92, 15, +221, 17, 1, 43, 26, 15,221, 10, 1, 93, 15,221, 17, 1, 46, 26, 15,221, 10, 1, + 94, 15,221, 17, 1, 52, 26, 15,221, 10, 1, 95, 15,221, 17, 1, 49, 26, 15,221, + 10, 1, 96, 15,221, 17, 1, 55, 26, 15,221, 10, 1, 97, 15,221, 17, 1, 58, 26, + 15,221, 10, 1, 98, 15,221, 17, 1, 99, 26, 0, 0, 0, 0, 0, 0, 0, 1,100, + 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 5,116,121,112, +101, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 4, + 0, 0, 0, 12, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 57, 7, 2, 13, 1, 11, 1, 13, 0, + 26, 13, 0, 20, 3, 13, 1, 2, 0, 2, 13, 1, 11, 4, 13, 0, 20, 5, 13, 1, + 2, 1, 2, 26, 13, 0, 20, 6, 13, 1, 2, 0, 2, 15, 7, 13, 1, 18, 4, 13, + 1, 26, 13, 1, 18, 4, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 12, 99,104,101, 99,107, 80, 97, +114, 97,109,115, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, + 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 2, + 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 2, 0, + 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, 0, 0, 0, 12, + 99,104,101, 99,107, 80, 97,114, 97,109,115, 0, 4, 0, 0, 0, 32, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 61, 8, 2, 13, 0, 18, 1, 15, 5, 13, 2, 4, 0, 2, 2, 2, + 50, 39, 13, 4, 13, 1, 13, 3, 16, 2, 1, 1, 44, 52, 13, 15, 6, 11, 7, 13, + 3, 42, 11, 8, 42, 2, 0, 1, 15, 5, 13, 2, 13, 3, 2, 2, 2, 23, 4, 23, + 3, 13, 3, 54, 43, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 2, 0, 0, 0, 6,112, 97,114, 97,109, 0, 2, 0, 0, 0, 5,102, +117,110, 99, 0, 2, 0, 0, 0, 5,110,101,120,116, 0, 2, 0, 0, 0, 6,101, +114,114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, + 0, 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114,111,110,103, 32,118, 97,108, +117,101, 32,111,114, 32,105,115, 32,110,111,116, 32,105,110,105,116,105, 97,108, +105,122,101,100, 0, 2, 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98,117, +116,101,115, 0, 4, 0, 0, 0, 43, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 80, 9, 2, 22, + 0, 15, 3, 13, 1, 4, 0, 2, 1, 2, 50, 18, 13, 2, 13, 3, 7, 1, 26, 15, + 3, 13, 1, 13, 3, 2, 1, 2, 23, 3, 13, 3, 54, 22, 15, 3, 13, 2, 4, 0, + 2, 1, 2, 23, 3, 50, 25, 13, 1, 20, 4, 13, 3, 13, 1, 13, 3, 16, 2, 0, + 3, 15, 3, 13, 2, 13, 3, 2, 1, 2, 23, 3, 13, 3, 54, 29, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 5,116, +101,109,112, 0, 2, 0, 0, 0, 2,102, 0, 2, 0, 0, 0, 5,110,101,120,116, + 0, 2, 0, 0, 0, 4,115,101,116, 0, 2, 0, 0, 0, 4,103,101,116, 0, 4, + 0, 0, 0, 57, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 82, 6, 2, 15, 1, 13, 1, 2, 1, + 1, 52, 63, 15, 2, 13, 1, 16, 52, 9, 13, 0, 13, 1, 16, 1, 2, 50, 47, 15, + 5, 13, 1, 2, 1, 1, 15, 7, 13, 0, 18, 8, 13, 2, 2, 1, 2, 13, 3, 52, + 23, 15, 9, 13, 3, 2, 1, 1, 13, 4, 52, 6, 13, 4, 1, 5, 50, 4, 13, 3, + 1, 5, 5, 1, 5, 2, 13, 0, 13, 1, 16, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 10, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 12,116,121, +112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, + 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, + 0, 0, 0, 6, 73, 78, 68, 69, 88, 0, 2, 0, 0, 0, 9,115,116,114,117,112, +112,101,114, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 16, + 73,117,112, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, + 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 13, 73,117,112, 71,101,116, 72, + 97,110,100,108,101, 0, 2, 0, 0, 0, 4,115,101,116, 0, 4, 0, 0, 0, 77, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0,228, 11, 3, 15, 2, 13, 1, 2, 1, 1, 52,209, 15, + 4, 13, 1, 2, 1, 1, 15, 6, 13, 1, 16, 13, 1, 11, 7, 32, 48, 12, 15, 8, + 13, 0, 18, 10, 2, 1, 1, 11, 11, 32, 52, 4, 4, 0, 23, 4, 13, 4, 52, 55, + 13, 4, 7, 2, 16, 13, 5, 44, 52, 14, 13, 4, 15, 8, 13, 0, 18, 10, 2, 1, + 1, 16, 23, 5, 15, 13, 13, 0, 18, 10, 13, 4, 7, 1, 16, 13, 5, 13, 2, 2, + 0, 4, 13, 0, 13, 1, 13, 2, 26, 1, 6, 5, 1, 50,111, 15, 2, 13, 2, 2, + 1, 1, 46, 7, 15, 14, 13, 2, 2, 1, 1, 52, 17, 15, 15, 13, 0, 18, 10, 13, + 3, 13, 2, 2, 0, 3, 1, 5, 50, 76, 15, 16, 13, 2, 2, 1, 1, 52, 34, 15, + 18, 13, 0, 18, 10, 13, 3, 2, 1, 2, 13, 5, 52, 15, 15, 15, 13, 0, 18, 10, + 13, 3, 13, 2, 2, 0, 3, 1, 6, 5, 1, 50, 33, 15, 19, 13, 2, 2, 1, 1, + 52, 24, 15, 20, 13, 2, 2, 0, 1, 15, 15, 13, 0, 18, 10, 13, 3, 13, 2, 18, + 21, 2, 0, 3, 1, 5, 5, 2, 13, 0, 13, 1, 13, 2, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 2, 0, 0, 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 6, +118, 97,108,117,101, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105, +110,103, 0, 2, 0, 0, 0, 6, 73, 78, 68, 69, 88, 0, 2, 0, 0, 0, 9,115, +116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 3, 99, 98, 0, 2, 0, 0, 0, + 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 7, +114,101,115,105,122,101, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 67,108, + 97,115,115, 78, 97,109,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, + 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 7,100,105, 97,108,111, +103, 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, 0, 0, 0, 15,105,117,112, + 83,101,116, 67, 97,108,108, 98, 97, 99,107, 0, 2, 0, 0, 0, 12,116,121,112, +101, 95,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 9,116,121,112,101, 95, +110,105,108, 0, 2, 0, 0, 0, 10,111,108,100, 95,118, 97,108,117,101, 0, 2, + 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, + 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, + 0, 11,105,117,112, 83,101,116, 78, 97,109,101, 0, 2, 0, 0, 0, 9, 73, 85, + 80, 95,110, 97,109,101, 0, 2, 0, 0, 0, 10,114, 95,100,101,115,116,114,111, +121, 0, 4, 0, 0, 0,113, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 89, 6, 1, 7, 1, 13, + 0, 13, 1, 16, 50, 66, 15, 3, 13, 2, 2, 1, 1, 48, 4, 13, 2, 18, 4, 52, + 37, 13, 2, 18, 4, 13, 0, 32, 52, 16, 13, 2, 11, 4, 4, 0, 26, 13, 2, 20, + 5, 2, 0, 1, 50, 12, 15, 6, 11, 7, 2, 0, 1, 15, 8, 2, 0, 0, 13, 1, + 7, 1, 37, 23, 1, 13, 0, 13, 1, 16, 23, 2, 13, 2, 54, 70, 15, 9, 13, 0, + 4, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 0, 0, 0, 2,105, 0, 2, + 0, 0, 0, 5,101,108,101,109, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, + 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, + 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 10,114, 95,100, +101,115,116,114,111,121, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, + 0, 0, 29, 73,110,116,101,114,110, 97,108, 32,116, 97, 98,108,101, 32,105,110, + 99,111,110,115,105,115,116,101,110, 99,121, 0, 2, 0, 0, 0, 5,101,120,105, +116, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, 2, + 0, 0, 0, 8,100,101,115,116,114,111,121, 0, 4, 0, 0, 0,133, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 17, 3, 1, 13, 0, 20, 1, 2, 0, 1, 15, 2, 13, 0, 2, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 10,114, 95,100,101,115,116,114,111,121, 0, 2, 0, 0, 0, 11, + 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, 0, 0, 7,100,101,116, 97, + 99,104, 0, 4, 0, 0, 0,138, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 96, 8, 1, 15, 0, + 13, 0, 2, 0, 1, 13, 0, 18, 3, 13, 1, 52, 78, 13, 0, 11, 3, 4, 0, 26, + 7, 1, 50, 58, 13, 1, 13, 2, 16, 13, 0, 32, 52, 41, 50, 20, 13, 1, 13, 2, + 13, 1, 13, 2, 7, 1, 37, 16, 26, 13, 2, 7, 1, 37, 23, 2, 13, 1, 13, 2, + 7, 1, 37, 16, 54, 30, 13, 1, 13, 2, 4, 0, 26, 1, 3, 13, 2, 7, 1, 37, + 23, 2, 13, 1, 13, 2, 16, 54, 65, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 2, 0, 0, 0, 10, 73,117,112, 68,101,116, 97, 99,104, 0, 2, 0, 0, 0, 5, +115,101,108,102, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, + 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 2,105, 0, + 2, 0, 0, 0, 7, 97,112,112,101,110,100, 0, 4, 0, 0, 0,158, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 75, 6, 2, 15, 1, 13, 0, 13, 1, 2, 1, 2, 52, 57, 13, 1, + 11, 3, 13, 0, 26, 7, 1, 50, 21, 13, 0, 13, 2, 16, 13, 1, 32, 52, 4, 13, + 2, 1, 3, 13, 2, 7, 1, 37, 23, 2, 13, 0, 13, 2, 16, 54, 28, 15, 5, 13, + 0, 16, 13, 2, 13, 1, 26, 13, 2, 1, 3, 5, 1, 50, 4, 4, 0, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, + 73,117,112, 65,112,112,101,110,100, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 2,105, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101,115, 0, + 2, 0, 0, 0, 4,109, 97,112, 0, 4, 0, 0, 0,175, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 0, 0, 0, 7, 73,117,112, 77, 97,112, 0, 2, 0, 0, 0, 5,115,101,108, +102, 0, 2, 0, 0, 0, 5,104,105,100,101, 0, 4, 0, 0, 0,179, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 8, 73,117,112, 72,105,100,101, 0, 2, 0, 0, 0, + 5,115,101,108,102, 0, 2, 0, 0, 0, 9, 73, 85, 80, 84, 73, 77, 69, 82, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 17, 67,114,101, + 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0,187, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 15,105,117,112, + 67,114,101, 97,116,101, 84,105,109,101,114, 0, 2, 0, 0, 0, 9,105,117,112, +116,105,109,101,114, 0, 4, 0, 0, 0,191, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 84, 73, 77, 69, 82, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,116,105,109,101,114, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 67, 76, 73, 80, 66, 79, 65, 82, 68, 0, 4, 0, 0, 0,200, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 19,105,117, +112, 67,114,101, 97,116,101, 67,108,105,112, 98,111, 97,114,100, 0, 2, 0, 0, + 0, 13,105,117,112, 99,108,105,112, 98,111, 97,114,100, 0, 4, 0, 0, 0,204, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 13, + 73, 85, 80, 67, 76, 73, 80, 66, 79, 65, 82, 68, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10, 99,108,105,112, 98, +111, 97,114,100, 0, 2, 0, 0, 0, 10, 73, 85, 80, 68, 73, 65, 76, 79, 71, 0, + 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, + 0,213, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, + 1, 1, 13, 1, 7, 1, 16, 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, + 97,110,100,108,101, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, + 68,105, 97,108,111,103, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 5,115,104,111,119, 0, 4, 0, 0, 0,219, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 8, 73,117,112, 83,104,111,119, 0, 2, 0, 0, + 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 7,115,104,111,119,120,121, 0, 4, + 0, 0, 0,223, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, + 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, 0, 2,120, + 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 10, 73,117,112, 83,104,111,119, + 88, 89, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 6,112,111, +112,117,112, 0, 4, 0, 0, 0,227, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, + 0, 10,105,117,112,100,105, 97,108,111,103, 0, 4, 0, 0, 0,231, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, 73, 85, 80, + 68, 73, 65, 76, 79, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99, +116,111,114, 0, 2, 0, 0, 0, 7,100,105, 97,108,111,103, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 82, 65, 68, 73, 79, 0, 4, 0, 0, 0,240, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, 1, 13, 1, 7, 1, 16, + 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, + 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, + 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 82, 97,100,105,111, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 9, +105,117,112,114, 97,100,105,111, 0, 4, 0, 0, 0,246, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 26, 5, 1, 15, 2, 20, 3, 13, 0, 2, 1, 2, 15, 4, 13, 1, 7, 1, 16, + 2, 0, 1, 13, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 9, + 73, 85, 80, 82, 65, 68, 73, 79, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 23,105,117,112, 67,114,101, 97,116,101, + 67,104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 2, 0, 0, 0, 6,114, + 97,100,105,111, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, + 0, 4, 0, 0, 0,254, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,156, 11, 1, 22, 0, 7, 1, + 50, 61, 15, 3, 13, 0, 13, 2, 16, 2, 1, 1, 52, 29, 13, 1, 13, 2, 15, 4, + 22, 2, 11, 5, 13, 0, 13, 2, 16, 11, 6, 13, 0, 18, 6, 30, 1, 2, 1, 1, + 26, 50, 13, 15, 7, 11, 8, 13, 2, 42, 11, 9, 42, 2, 0, 1, 13, 2, 7, 1, + 37, 23, 2, 13, 0, 13, 2, 16, 54, 68, 13, 0, 18, 10, 52, 51, 7, 1, 50, 7, + 13, 3, 7, 1, 37, 23, 3, 13, 0, 13, 3, 16, 48, 10, 13, 0, 13, 3, 16, 13, + 0, 18, 10, 31, 54, 26, 13, 0, 13, 3, 16, 52, 10, 13, 1, 11, 10, 13, 1, 13, + 3, 16, 26, 5, 1, 50, 18, 13, 0, 18, 12, 52, 12, 13, 1, 11, 10, 13, 1, 13, + 0, 18, 12, 16, 26, 13, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, + 0, 0, 2,104, 0, 2, 0, 0, 0, 4,116,109,112, 0, 2, 0, 0, 0, 2,105, + 0, 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, + 0, 0, 10,105,117,112,116,111,103,103,108,101, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, + 6,101,114,114,111,114, 0, 2, 0, 0, 0, 8,111,112,116,105,111,110, 32, 0, + 2, 0, 0, 0, 18, 32,109,117,115,116, 32, 98,101, 32, 97, 32,115,116,114,105, +110,103, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 2,106, + 0, 2, 0, 0, 0, 7,110,118, 97,108,117,101, 0, 2, 0, 0, 0, 9,101,100, +104,114, 97,100,105,111, 0, 4, 0, 0, 1, 26, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 35, + 6, 1, 15, 2, 13, 0, 2, 1, 1, 15, 3, 22, 2, 15, 4, 13, 1, 2, 1, 1, + 29, 0, 1, 11, 5, 13, 1, 18, 5, 30, 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8,116,111,103,103,108, +101,115, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, 0, 2, + 0, 0, 0, 9,105,117,112,114, 97,100,105,111, 0, 2, 0, 0, 0, 7,101,100, +104, 98,111,120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, + 9,101,100,118,114, 97,100,105,111, 0, 4, 0, 0, 1, 32, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 35, 6, 1, 15, 2, 13, 0, 2, 1, 1, 15, 3, 22, 2, 15, 4, 13, 1, + 2, 1, 1, 29, 0, 1, 11, 5, 13, 1, 18, 5, 30, 0, 3, 2, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8,116,111, +103,103,108,101,115, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101, +115, 0, 2, 0, 0, 0, 9,105,117,112,114, 97,100,105,111, 0, 2, 0, 0, 0, + 7,101,100,118, 98,111,120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, 85, 0, 4, 0, 0, 1, 41, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0,159, 7, 2, 7, 1, 50,145, 13, 1, 13, 2, 16, 15, 3, 13, 3, + 2, 1, 1, 44, 52,121, 15, 4, 13, 3, 2, 1, 1, 11, 5, 31, 52, 15, 15, 6, + 11, 7, 13, 2, 42, 11, 8, 42, 2, 0, 1, 50, 94, 13, 3, 7, 1, 16, 48, 11, + 15, 9, 13, 3, 7, 1, 16, 2, 1, 1, 44, 52, 15, 15, 6, 11, 7, 13, 2, 42, + 11, 10, 42, 2, 0, 1, 50, 59, 13, 3, 7, 2, 16, 48, 11, 15, 9, 13, 3, 7, + 2, 16, 2, 1, 1, 44, 48, 11, 15, 11, 13, 3, 7, 2, 16, 2, 1, 1, 44, 48, + 11, 15, 12, 13, 3, 7, 2, 16, 2, 1, 1, 44, 52, 13, 15, 6, 11, 7, 13, 2, + 42, 11, 13, 42, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 5, 1, 13, 1, 13, 2, + 16, 54,152, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, +116,121,112,101, 95,105,116,101,109, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, + 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111, +114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, 0, 2, 0, + 0, 0, 32, 32,105,115, 32,110,111,116, 32, 97, 32,116, 97, 98,108,101, 32,110, +111,114, 32, 97, 32,109,101,110,117, 32,105,116,101,109, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 30, 32,100,111, +101,115, 32,110,111,116, 32,104, 97,118,101, 32, 97, 32,115,116,114,105,110,103, + 32,116,105,116,108,101, 0, 2, 0, 0, 0, 14,116,121,112,101, 95,102,117,110, + 99,116,105,111,110, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103, +101,116, 0, 2, 0, 0, 0, 36, 32,100,111,101,115, 32,110,111,116, 32,104, 97, +118,101, 32, 97,110, 32, 97, 99,116,105,111,110, 32,110,111,114, 32, 97, 32,109, +101,110,117, 0, 4, 0, 0, 1, 59, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,189, 10, 2, 15, + 2, 2, 1, 0, 7, 1, 50,166, 13, 1, 13, 3, 16, 4, 0, 15, 6, 13, 4, 2, + 1, 1, 52, 6, 13, 4, 23, 5, 50,112, 13, 4, 7, 1, 16, 44, 52, 11, 15, 7, + 22, 0, 2, 1, 1, 23, 5, 50, 93, 15, 6, 13, 4, 7, 2, 16, 2, 1, 1, 52, + 38, 13, 4, 11, 8, 13, 4, 7, 1, 16, 26, 13, 4, 7, 1, 13, 4, 7, 2, 16, + 26, 13, 4, 7, 2, 4, 0, 26, 15, 9, 13, 4, 2, 1, 1, 23, 5, 50, 43, 13, + 4, 11, 8, 13, 4, 7, 1, 16, 26, 13, 4, 11, 10, 13, 4, 7, 2, 16, 26, 13, + 4, 7, 1, 4, 0, 26, 13, 4, 7, 2, 4, 0, 26, 15, 11, 13, 4, 2, 1, 1, + 23, 5, 15, 12, 13, 2, 13, 5, 2, 0, 2, 13, 5, 11, 13, 13, 2, 26, 13, 1, + 13, 3, 13, 5, 26, 13, 3, 7, 1, 37, 23, 3, 5, 2, 13, 1, 13, 3, 16, 54, +173, 13, 2, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 14, +105,117,112, 67,114,101, 97,116,101, 77,101,110,117, 0, 2, 0, 0, 0, 2,105, + 0, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,101,108,101,109, 0, 2, 0, + 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, 13, +105,117,112,115,101,112, 97,114, 97,116,111,114, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 11,105,117,112,115,117, 98,109,101,110,117, 0, + 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 8,105,117,112, +105,116,101,109, 0, 2, 0, 0, 0, 10, 73,117,112, 65,112,112,101,110,100, 0, + 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, + 8,105,117,112,109,101,110,117, 0, 4, 0, 0, 1, 89, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, + 85, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 5,109,101,110,117, 0, 2, 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, + 85, 0, 4, 0, 0, 1, 94, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, 13, + 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, + 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117,112, 80, +111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 12, + 67, 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 0, 4, 0, 0, 1,102, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 47, 6, 2, 7, 1, 50, 33, 15, 2, 13, 1, 13, 2, 16, 2, 1, + 1, 44, 52, 13, 15, 3, 11, 4, 13, 2, 42, 11, 5, 42, 2, 0, 1, 13, 2, 7, + 1, 37, 23, 2, 13, 1, 13, 2, 16, 54, 40, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, 6,101,114, +114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, 0, + 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114,111,110,103, 32,118, 97,108,117, +101, 32,111,114, 32,105,115, 32,110,111,116, 32,105,110,105,116,105, 97,108,105, +122,101,100, 0, 4, 0, 0, 1,112, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,187, 11, 2, 13, + 0, 20, 3, 2, 1, 1, 13, 1, 18, 4, 7, 1, 7, 0, 50, 14, 13, 5, 7, 1, + 37, 23, 5, 13, 4, 7, 1, 37, 23, 4, 13, 1, 13, 4, 16, 54, 21, 7, 1, 23, + 4, 13, 3, 15, 7, 32, 52, 43, 13, 1, 13, 4, 13, 5, 37, 15, 8, 22, 0, 2, + 1, 1, 26, 15, 9, 13, 2, 13, 1, 13, 4, 13, 5, 37, 16, 2, 0, 2, 13, 1, + 13, 4, 13, 5, 37, 16, 11, 10, 13, 2, 26, 50, 79, 15, 9, 13, 2, 13, 1, 13, + 4, 16, 2, 0, 2, 13, 1, 13, 4, 16, 11, 10, 13, 2, 26, 13, 4, 7, 1, 37, + 23, 4, 13, 3, 15, 7, 32, 52, 43, 13, 1, 13, 4, 13, 5, 37, 15, 8, 22, 0, + 2, 1, 1, 26, 15, 9, 13, 2, 13, 1, 13, 4, 13, 5, 37, 16, 2, 0, 2, 13, + 1, 13, 4, 13, 5, 37, 16, 11, 10, 13, 2, 26, 13, 4, 13, 5, 34, 54, 86, 13, + 2, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 11, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 66,111,120, 69,108,101, +109,101,110,116, 0, 2, 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, + 0, 2,105, 0, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 89, 69, 83, 0, 2, 0, 0, 0, 8,105,117,112,102,105,108,108, 0, 2, 0, 0, + 0, 10, 73,117,112, 65,112,112,101,110,100, 0, 2, 0, 0, 0, 11, 73, 85, 80, + 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, + 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 66,111,120, 69,108,101,109,101, +110,116, 0, 4, 0, 0, 1,146, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, + 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14,105,117,112, + 67,114,101, 97,116,101, 72, 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,104, + 98,111,120, 0, 4, 0, 0, 1,150, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,104, + 98,111,120, 0, 2, 0, 0, 0, 7,101,100,104, 98,111,120, 0, 4, 0, 0, 1, +156, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 19, 4, 1, 13, 0, 11, 1, 15, 2, 26, 15, 3, + 20, 4, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, 8, + 73, 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, + 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, + 0, 0, 8,101,100,102,105,101,108,100, 0, 4, 0, 0, 1,162, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0,123, 7, 1, 4, 1, 15, 3, 13, 0, 18, 4, 2, 1, 1, 46, 9, 15, + 5, 13, 0, 18, 4, 2, 1, 1, 52, 19, 15, 6, 22, 1, 11, 7, 13, 0, 18, 4, + 30, 0, 2, 1, 1, 23, 1, 50, 7, 15, 8, 11, 9, 2, 0, 1, 13, 0, 18, 10, + 52, 19, 15, 11, 22, 1, 11, 10, 13, 0, 18, 10, 30, 0, 2, 1, 1, 23, 2, 50, + 17, 15, 11, 22, 1, 11, 10, 13, 0, 18, 12, 30, 0, 2, 1, 1, 23, 2, 13, 2, + 48, 2, 13, 1, 52, 16, 15, 13, 22, 2, 13, 1, 13, 2, 29, 0, 2, 3, 3, 1, + 50, 4, 4, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 2, +102, 0, 2, 0, 0, 0, 2,108, 0, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 7,112,114, +111,109,112,116, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,110,117,109, 98,101, +114, 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 2, 0, 0, 0, + 6,116,105,116,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, + 0, 0, 55,112, 97,114, 97,109,101,116,101,114, 32,112,114,111,109,112,116, 32, +104, 97,115, 32,119,114,111,110,103, 32,118, 97,108,117,101, 32,111,114, 32,105, +115, 32,110,111,116, 32,105,110,105,116,105, 97,108,105,122,101,100, 0, 2, 0, + 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 8,105,117,112,116,101,120, +116, 0, 2, 0, 0, 0, 7,110,118, 97,108,117,101, 0, 2, 0, 0, 0, 7,101, +100,104, 98,111,120, 0, 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 4, + 0, 0, 1,185, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97, +116,101, 86, 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,118, 98,111,120, 0, + 4, 0, 0, 1,189, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,118, 98,111,120, 0, + 2, 0, 0, 0, 7,101,100,118, 98,111,120, 0, 4, 0, 0, 1,195, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 19, 4, 1, 13, 0, 11, 1, 15, 2, 26, 15, 3, 20, 4, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, + 89, 69, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 8, 73, + 85, 80, 90, 66, 79, 88, 0, 4, 0, 0, 1,204, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, + 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, + 14,105,117,112, 67,114,101, 97,116,101, 90, 98,111,120, 0, 2, 0, 0, 0, 8, +105,117,112,122, 98,111,120, 0, 4, 0, 0, 1,208, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 44, 6, 1, 15, 2, 20, 3, 13, 0, 2, 1, 2, 7, 1, 50, 17, 15, 5, 13, 1, + 13, 2, 16, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 13, 0, 13, 2, 16, 54, 24, + 13, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 8, 73, + 85, 80, 90, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99, +116,111,114, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 11,105,117,112, 83, +101,116, 78, 97,109,101, 0, 2, 0, 0, 0, 5,122, 98,111,120, 0, 2, 0, 0, + 0, 8, 73, 85, 80, 70, 73, 76, 76, 0, 4, 0, 0, 1,223, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97, +116,101, 70,105,108,108, 0, 2, 0, 0, 0, 8,105,117,112,102,105,108,108, 0, + 4, 0, 0, 1,227, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 70, 73, 76, 76, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,102,105,108,108, 0, + 2, 0, 0, 0, 10, 73, 85, 80, 66, 85, 84, 84, 79, 78, 0, 2, 0, 0, 0, 5, +116,121,112,101, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, 0, 0, + 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 4, 0, 0, 1,236, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 32, 5, 2, 13, 1, 18, 1, 44, 48, 4, 13, 1, 18, 2, 52, + 7, 13, 1, 11, 1, 11, 3, 26, 15, 4, 13, 1, 18, 1, 3, 2, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 2, 0, 0, + 0, 1, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 66,117,116, +116,111,110, 0, 2, 0, 0, 0, 10,105,117,112, 98,117,116,116,111,110, 0, 4, + 0, 0, 1,243, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 10, 73, 85, 80, 66, 85, 84, 84, 79, 78, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7, 98,117,116,116, +111,110, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 4, 0, 0, 1, +252, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105, +117,112, 67,114,101, 97,116,101, 84,101,120,116, 0, 2, 0, 0, 0, 8,105,117, +112,116,101,120,116, 0, 4, 0, 0, 2, 0, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 2, + 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, + 5,116,101,120,116, 0, 2, 0, 0, 0, 13, 73, 85, 80, 77, 85, 76, 84, 73, 76, + 73, 78, 69, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 4, 0, 0, + 2, 9, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 19, +105,117,112, 67,114,101, 97,116,101, 77,117,108,116,105, 76,105,110,101, 0, 2, + 0, 0, 0, 13,105,117,112,109,117,108,116,105,108,105,110,101, 0, 4, 0, 0, + 2, 13, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 77, 85, 76, 84, 73, 76, 73, 78, 69, 0, 2, 0, 0, 0, 12, + 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,109,117,108, +116,105,108,105,110,101, 0, 2, 0, 0, 0, 9, 73, 85, 80, 76, 65, 66, 69, 76, + 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 4, 0, 0, 2, 22, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 32, 5, 2, 13, 1, 18, 1, 44, 48, 4, 13, 1, 18, 2, 52, 7, + 13, 1, 11, 1, 11, 3, 26, 15, 4, 13, 1, 18, 1, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 6,116, +105,116,108,101, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 2, 0, 0, 0, + 1, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 76, 97, 98,101, +108, 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 4, 0, 0, 2, + 29, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, + 9, 73, 85, 80, 76, 65, 66, 69, 76, 0, 2, 0, 0, 0, 12, 67,111,110,115,116, +114,117, 99,116,111,114, 0, 2, 0, 0, 0, 6,108, 97, 98,101,108, 0, 2, 0, + 0, 0, 10, 73, 85, 80, 84, 79, 71, 71, 76, 69, 0, 2, 0, 0, 0, 10, 73, 85, + 80, 66, 85, 84, 84, 79, 78, 0, 4, 0, 0, 2, 38, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 12, 4, 2, 15, 1, 13, 1, 18, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114, +101, 97,116,101, 84,111,103,103,108,101, 0, 2, 0, 0, 0, 6,116,105,116,108, +101, 0, 2, 0, 0, 0, 10,105,117,112,116,111,103,103,108,101, 0, 4, 0, 0, + 2, 42, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, + 0, 10, 73, 85, 80, 84, 79, 71, 71, 76, 69, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7,116,111,103,103,108,101, + 0, 2, 0, 0, 0, 8, 73, 85, 80, 73, 84, 69, 77, 0, 4, 0, 0, 2, 51, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 12, 4, 2, 15, 1, 13, 1, 18, 2, 3, 2, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 14,105,117,112, 67,114,101, 97,116,101, 73,116,101,109, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 8,105,117,112,105,116,101,109, 0, 4, + 0, 0, 2, 55, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 73, 84, 69, 77, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,105,116,101,109, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 83, 85, 66, 77, 69, 78, 85, 0, 2, 0, 0, 0, 10, +116,121,112,101, 95,109,101,110,117, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 4, 0, 0, 2, 64, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 31, 6, 2, 15, 2, 13, 1, + 18, 3, 13, 1, 7, 1, 16, 2, 1, 2, 13, 1, 7, 1, 16, 11, 4, 13, 2, 26, + 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 2,104, 0, 2, 0, 0, 0, 17,105,117,112, 67,114,101, + 97,116,101, 83,117, 98,109,101,110,117, 0, 2, 0, 0, 0, 6,116,105,116,108, +101, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 11,105,117,112,115,117, 98,109,101,110,117, 0, 4, 0, 0, 2, 70, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 83, 85, 66, 77, 69, 78, 85, 0, 2, 0, 0, 0, 12, 67,111,110,115,116, +114,117, 99,116,111,114, 0, 2, 0, 0, 0, 8,115,117, 98,109,101,110,117, 0, + 2, 0, 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 4, 0, + 0, 2, 79, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 19,105,117,112, 67,114,101, 97,116,101, 83,101,112, 97,114, 97,116,111,114, 0, + 2, 0, 0, 0, 13,105,117,112,115,101,112, 97,114, 97,116,111,114, 0, 4, 0, + 0, 2, 83, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,115,101, +112, 97,114, 97,116,111,114, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 73, 76, 69, + 68, 76, 71, 0, 4, 0, 0, 2, 92, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, + 2, 96, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 17,105,117,112, 67,114,101, 97,116,101, + 70,105,108,101, 68,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105,108,101, +100,108,103, 0, 4, 0, 0, 2,100, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 73, 76, 69, 68, 76, 71, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 14, 73, 85, 80, 77, 69, + 83, 83, 65, 71, 69, 68, 76, 71, 0, 4, 0, 0, 2,109, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 2, 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, + 0, 0, 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108, +102, 0, 4, 0, 0, 2,113, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 20,105,117,112, 67, +114,101, 97,116,101, 77,101,115,115, 97,103,101, 68,108,103, 0, 2, 0, 0, 0, + 14,105,117,112,109,101,115,115, 97,103,101,100,108,103, 0, 4, 0, 0, 2,117, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 14, + 73, 85, 80, 77, 69, 83, 83, 65, 71, 69, 68, 76, 71, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 11,109,101,115,115, + 97,103,101,100,108,103, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, + 68, 76, 71, 0, 4, 0, 0, 2,126, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, + 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, + 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117, +112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, + 2,130, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 18,105,117,112, 67,114,101, 97,116,101, + 67,111,108,111,114, 68,108,103, 0, 2, 0, 0, 0, 12,105,117,112, 99,111,108, +111,114,100,108,103, 0, 4, 0, 0, 2,134, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 68, + 76, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 9, 99,111,108,111,114,100,108,103, 0, 2, 0, 0, 0, 11, 73, + 85, 80, 70, 79, 78, 84, 68, 76, 71, 0, 4, 0, 0, 2,143, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 2, 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, + 0, 0, 0, 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 4, 0, 0, 2,147, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, + 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 17,105,117,112, + 67,114,101, 97,116,101, 70,111,110,116, 68,108,103, 0, 2, 0, 0, 0, 11,105, +117,112,102,111,110,116,100,108,103, 0, 4, 0, 0, 2,151, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 79, + 78, 84, 68, 76, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116, +111,114, 0, 2, 0, 0, 0, 8,102,111,110,116,100,108,103, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 85, 83, 69, 82, 0, 4, 0, 0, 2,160, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, + 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 85,115,101,114, 0, 2, 0, 0, + 0, 8,105,117,112,117,115,101,114, 0, 4, 0, 0, 2,164, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 10, 2, 0, 15, 0, 20, 1, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 0, 0, 0, 8, 73, 85, 80, 85, 83, 69, 82, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,117,115,101,114, + 0, 2, 0, 0, 0, 14, 73, 85, 80, 78, 79, 82, 77, 65, 76, 73, 90, 69, 82, 0, + 4, 0, 0, 2,173, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 47, 6, 2, 7, 1, 50, 33, 15, + 2, 13, 1, 13, 2, 16, 2, 1, 1, 44, 52, 13, 15, 3, 11, 4, 13, 2, 42, 11, + 5, 42, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 13, 1, 13, 2, 16, 54, 40, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, + 0, 2,105, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, + 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, + 97,109,101,116,101,114, 32, 0, 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114, +111,110,103, 32,118, 97,108,117,101, 32,111,114, 32,105,115, 32,110,111,116, 32, +105,110,105,116,105, 97,108,105,122,101,100, 0, 4, 0, 0, 2,183, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 40, 8, 2, 15, 2, 2, 1, 0, 7, 1, 50, 17, 13, 2, 11, 4, + 13, 1, 13, 3, 16, 26, 13, 3, 7, 1, 37, 23, 3, 13, 1, 13, 3, 16, 54, 24, + 13, 2, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 20,105, +117,112, 67,114,101, 97,116,101, 78,111,114,109, 97,108,105,122,101,114, 0, 2, + 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 11, 97,100,100, 99,111,110,116,114,111, +108, 0, 2, 0, 0, 0, 14,105,117,112,110,111,114,109, 97,108,105,122,101,114, + 0, 4, 0, 0, 2,193, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 10, 2, 0, 15, 0, 20, 1, + 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 14, 73, 85, 80, + 78, 79, 82, 77, 65, 76, 73, 90, 69, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 11,110,111,114,109, 97,108,105, +122,101,114, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, 2, 0, + 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 2,202, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, 1, + 13, 1, 7, 1, 16, 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 2,104, 0, 2, + 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 70,114, 97,109,101, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 9, +105,117,112,102,114, 97,109,101, 0, 4, 0, 0, 2,208, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, + 77, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 6,102,114, 97,109,101, 0, 2, 0, 0, 0, 10, 73, 85, 80, 67, + 65, 78, 86, 65, 83, 0, 4, 0, 0, 2,217, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, + 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 67, 97, +110,118, 97,115, 0, 2, 0, 0, 0, 10,105,117,112, 99, 97,110,118, 97,115, 0, + 4, 0, 0, 2,221, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 10, 73, 85, 80, 67, 65, 78, 86, 65, 83, 0, 2, 0, 0, 0, 12, + 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7, 99, 97,110, +118, 97,115, 0, 2, 0, 0, 0, 8, 73, 85, 80, 76, 73, 83, 84, 0, 4, 0, 0, + 2,230, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14, +105,117,112, 67,114,101, 97,116,101, 76,105,115,116, 0, 4, 0, 0, 2,234, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 42, 6, 2, 15, 1, 13, 1, 2, 1, 1, 11, 2, 32, 52, + 16, 15, 3, 13, 0, 18, 5, 11, 6, 13, 1, 42, 3, 2, 2, 50, 11, 15, 7, 18, + 8, 13, 0, 13, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, + 0, 6,105,110,100,101,120, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, + 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101, +116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, + 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 1, 0, 2, + 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 4,103,101,116, 0, + 4, 0, 0, 2,242, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 90, 8, 3, 15, 2, 13, 1, 2, + 1, 1, 11, 3, 32, 52, 62, 15, 4, 13, 2, 2, 1, 1, 46, 7, 15, 5, 13, 2, + 2, 1, 1, 52, 21, 15, 6, 13, 0, 18, 8, 11, 9, 13, 1, 42, 11, 9, 13, 2, + 42, 3, 3, 3, 50, 23, 13, 2, 4, 0, 32, 52, 16, 15, 6, 13, 0, 18, 8, 11, + 9, 13, 1, 42, 13, 2, 3, 3, 3, 15, 10, 18, 11, 13, 0, 13, 1, 13, 2, 3, + 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 6,105,110,100,101, +120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 5,116,121, +112,101, 0, 2, 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 12,116,121,112, +101, 95,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 1, 0, 2, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 4,115,101,116, 0, 2, + 0, 0, 0, 8,105,117,112,108,105,115,116, 0, 4, 0, 0, 2,253, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 76, 73, 83, 84, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 5,108,105,115,116, 0, 2, 0, 0, 0, 9, 73, 85, 80, + 73, 77, 65, 71, 69, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, + 0, 3, 6, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0,116, 8, 2, 7, 1, 50, 92, 7, 1, 50, + 32, 15, 3, 13, 1, 13, 2, 16, 13, 3, 16, 2, 1, 1, 11, 4, 31, 52, 7, 15, + 5, 11, 6, 2, 0, 1, 13, 3, 7, 1, 37, 23, 3, 13, 1, 13, 2, 16, 13, 3, + 16, 54, 42, 13, 1, 18, 7, 48, 10, 13, 3, 7, 1, 38, 13, 1, 18, 7, 31, 52, + 9, 15, 5, 11, 8, 2, 0, 1, 50, 10, 13, 1, 11, 7, 13, 3, 7, 1, 38, 26, + 13, 2, 7, 1, 37, 23, 2, 5, 1, 13, 1, 13, 2, 16, 54, 99, 13, 1, 11, 9, + 13, 2, 7, 1, 38, 26, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 0, 0, 0, 4, +111, 98,106, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 2,106, 0, 2, 0, + 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 7,110,117,109, 98,101,114, 0, + 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 38,110,111,110, 45, +110,117,109,101,114,105, 99, 32,118, 97,108,117,101, 32,105,110, 32,105,109, 97, +103,101, 32,100,101,102,105,110,105,116,105,111,110, 0, 2, 0, 0, 0, 6,119, +105,100,116,104, 0, 2, 0, 0, 0, 26,105,110, 99,111,110,115,105,115,116,101, +110,116, 32,105,109, 97,103,101, 32,108,101,110,103,104,116, 0, 2, 0, 0, 0, + 7,104,101,105,103,104,116, 0, 4, 0, 0, 3, 29, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 74, 9, 2, 15, 2, 13, 1, 18, 3, 13, 1, 18, 4, 13, 1, 2, 1, 3, 15, 5, + 13, 1, 18, 6, 2, 1, 1, 11, 7, 32, 52, 38, 7, 1, 50, 23, 15, 9, 13, 2, + 13, 3, 13, 1, 18, 6, 13, 3, 16, 2, 0, 3, 13, 3, 7, 1, 37, 23, 3, 13, + 1, 18, 6, 13, 3, 16, 54, 32, 5, 1, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110, +100,108,101, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 73,109, + 97,103,101, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, 0, 7, +104,101,105,103,104,116, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, + 0, 7, 99,111,108,111,114,115, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, + 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 9,105,117,112,105,109, 97,103, +101, 0, 4, 0, 0, 3, 41, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, + 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2, +111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 73, 77, 65, 71, 69, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 6,105,109, + 97,103,101, 0, 2, 0, 0, 0, 12, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, + 0, 4, 0, 0, 3, 49, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 20, 6, 2, 15, 1, 13, 1, + 18, 2, 13, 1, 18, 3, 13, 1, 18, 4, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 18,105,117,112, 67, +114,101, 97,116,101, 73,109, 97,103,101, 82, 71, 66, 0, 2, 0, 0, 0, 6,119, +105,100,116,104, 0, 2, 0, 0, 0, 7,104,101,105,103,104,116, 0, 2, 0, 0, + 0, 7,112,105,120,101,108,115, 0, 2, 0, 0, 0, 12,105,117,112,105,109, 97, +103,101,114,103, 98, 0, 4, 0, 0, 3, 53, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, + 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 73, 77, 65, 71, 69, 82, + 71, 66, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 9,105,109, 97,103,101,114,103, 98, 0, 2, 0, 0, 0, 13, 73, + 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, 65, 0, 4, 0, 0, 3, 61, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 20, 6, 2, 15, 1, 13, 1, 18, 2, 13, 1, 18, 3, 13, 1, 18, + 4, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 19,105,117,112, 67,114,101, 97,116,101, 73,109, 97,103, +101, 82, 71, 66, 65, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, + 0, 7,104,101,105,103,104,116, 0, 2, 0, 0, 0, 7,112,105,120,101,108,115, + 0, 2, 0, 0, 0, 13,105,117,112,105,109, 97,103,101,114,103, 98, 97, 0, 4, + 0, 0, 3, 65, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 13, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, 65, 0, 2, 0, 0, + 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,105, +109, 97,103,101,114,103, 98, 97, 0, 2, 0, 0, 0, 15, 73, 85, 80, 80, 82, 79, + 71, 82, 69, 83, 83, 66, 65, 82, 0, 4, 0, 0, 3, 74, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, + 0, 0, 21,105,117,112, 67,114,101, 97,116,101, 80,114,111,103,114,101,115,115, + 66, 97,114, 0, 2, 0, 0, 0, 15,105,117,112,112,114,111,103,114,101,115,115, + 98, 97,114, 0, 4, 0, 0, 3, 78, 0, 0, 0, 20, 64,105,117,112,108,117, 97, + 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, + 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 2,111, 0, 2, 0, 0, 0, 15, 73, 85, 80, 80, 82, 79, 71, 82, 69, 83, 83, + 66, 65, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, + 0, 2, 0, 0, 0, 12,112,114,111,103,114,101,115,115, 98, 97,114, 0, 2, 0, + 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, + 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 7, 65, 67, 84, 73, 79, 78, + 0, 2, 0, 0, 0, 9, 97, 99,116,105,111,110, 99, 98, 0, 2, 0, 0, 0, 10, + 65, 67, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 9,103,101,116,102,111, + 99,117,115, 0, 2, 0, 0, 0, 12, 71, 69, 84, 70, 79, 67, 85, 83, 95, 67, 66, + 0, 2, 0, 0, 0, 16,105,117,112, 95,103,101,116,102,111, 99,117,115, 95, 99, + 98, 0, 2, 0, 0, 0, 10,107,105,108,108,102,111, 99,117,115, 0, 2, 0, 0, + 0, 13, 75, 73, 76, 76, 70, 79, 67, 85, 83, 95, 67, 66, 0, 2, 0, 0, 0, 17, +105,117,112, 95,107,105,108,108,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, + 0, 6,102,111, 99,117,115, 0, 2, 0, 0, 0, 9, 70, 79, 67, 85, 83, 95, 67, + 66, 0, 2, 0, 0, 0, 13,105,117,112, 95,102,111, 99,117,115, 95, 99, 98, 0, + 2, 0, 0, 0, 6,107, 95, 97,110,121, 0, 2, 0, 0, 0, 6, 75, 95, 65, 78, + 89, 0, 2, 0, 0, 0, 10,105,117,112, 95,107, 95, 97,110,121, 0, 2, 0, 0, + 0, 5,104,101,108,112, 0, 2, 0, 0, 0, 8, 72, 69, 76, 80, 95, 67, 66, 0, + 2, 0, 0, 0, 12,105,117,112, 95,104,101,108,112, 95, 99, 98, 0, 2, 0, 0, + 0, 8, 99, 97,114,101,116, 99, 98, 0, 2, 0, 0, 0, 9, 67, 65, 82, 69, 84, + 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95, 99, 97,114,101,116, 95, 99, + 98, 0, 2, 0, 0, 0, 9,107,101,121,112,114,101,115,115, 0, 2, 0, 0, 0, + 12, 75, 69, 89, 80, 82, 69, 83, 83, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117, +112, 95,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, 0, 7,115, + 99,114,111,108,108, 0, 2, 0, 0, 0, 10, 83, 67, 82, 79, 76, 76, 95, 67, 66, + 0, 2, 0, 0, 0, 14,105,117,112, 95,115, 99,114,111,108,108, 95, 99, 98, 0, + 2, 0, 0, 0, 10,116,114, 97,121, 99,108,105, 99,107, 0, 2, 0, 0, 0, 13, + 84, 82, 65, 89, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117, +112, 95,116,114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 6, + 99,108,111,115,101, 0, 2, 0, 0, 0, 9, 67, 76, 79, 83, 69, 95, 67, 66, 0, + 2, 0, 0, 0, 13,105,117,112, 95, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, + 0, 0, 5,111,112,101,110, 0, 2, 0, 0, 0, 8, 79, 80, 69, 78, 95, 67, 66, + 0, 2, 0, 0, 0, 12,105,117,112, 95,111,112,101,110, 95, 99, 98, 0, 2, 0, + 0, 0, 7,115,104,111,119, 99, 98, 0, 2, 0, 0, 0, 8, 83, 72, 79, 87, 95, + 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,115,104,111,119, 95, 99, 98, 0, + 2, 0, 0, 0, 6,109, 97,112, 99, 98, 0, 2, 0, 0, 0, 7, 77, 65, 80, 95, + 67, 66, 0, 2, 0, 0, 0, 11,105,117,112, 95,109, 97,112, 95, 99, 98, 0, 2, + 0, 0, 0, 8,117,110,109, 97,112, 99, 98, 0, 2, 0, 0, 0, 9, 85, 78, 77, + 65, 80, 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95,117,110,109, 97,112, + 95, 99, 98, 0, 2, 0, 0, 0, 10,100,114,111,112,102,105,108,101,115, 0, 2, + 0, 0, 0, 13, 68, 82, 79, 80, 70, 73, 76, 69, 83, 95, 67, 66, 0, 2, 0, 0, + 0, 17,105,117,112, 95,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 2, + 0, 0, 0, 10,109,101,110,117, 99,108,111,115,101, 0, 2, 0, 0, 0, 13, 77, + 69, 78, 85, 67, 76, 79, 83, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, + 95,109,101,110,117, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 10,104, +105,103,104,108,105,103,104,116, 0, 2, 0, 0, 0, 13, 72, 73, 71, 72, 76, 73, + 71, 72, 84, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,104,105,103,104, +108,105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 4,119,111,109, 0, 2, 0, + 0, 0, 7, 87, 79, 77, 95, 67, 66, 0, 2, 0, 0, 0, 11,105,117,112, 95,119, +111,109, 95, 99, 98, 0, 2, 0, 0, 0, 6,119,104,101,101,108, 0, 2, 0, 0, + 0, 9, 87, 72, 69, 69, 76, 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95, +119,104,101,101,108, 95, 99, 98, 0, 2, 0, 0, 0, 10, 66, 85, 84, 84, 79, 78, + 95, 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95, 98,117,116,116,111,110, 95, + 99, 98, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, 2, 0, 0, 0, 10, + 82, 69, 83, 73, 90, 69, 95, 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95,114, +101,115,105,122,101, 95, 99, 98, 0, 2, 0, 0, 0, 5,109,111,118,101, 0, 2, + 0, 0, 0, 12,105,117,112, 95,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, + 7,109,111,116,105,111,110, 0, 2, 0, 0, 0, 10, 77, 79, 84, 73, 79, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95,109,111,116,105,111,110, 95, 99, + 98, 0, 2, 0, 0, 0, 12,101,110,116,101,114,119,105,110,100,111,119, 0, 2, + 0, 0, 0, 15, 69, 78, 84, 69, 82, 87, 73, 78, 68, 79, 87, 95, 67, 66, 0, 2, + 0, 0, 0, 19,105,117,112, 95,101,110,116,101,114,119,105,110,100,111,119, 95, + 99, 98, 0, 2, 0, 0, 0, 12,108,101, 97,118,101,119,105,110,100,111,119, 0, + 2, 0, 0, 0, 15, 76, 69, 65, 86, 69, 87, 73, 78, 68, 79, 87, 95, 67, 66, 0, + 2, 0, 0, 0, 19,105,117,112, 95,108,101, 97,118,101,119,105,110,100,111,119, + 95, 99, 98, 0, 2, 0, 0, 0, 5,101,100,105,116, 0, 2, 0, 0, 0, 8, 69, + 68, 73, 84, 95, 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,101,100,105,116, + 95, 99, 98, 0, 2, 0, 0, 0, 12,109,117,108,116,105,115,101,108,101, 99,116, + 0, 2, 0, 0, 0, 15, 77, 85, 76, 84, 73, 83, 69, 76, 69, 67, 84, 95, 67, 66, + 0, 2, 0, 0, 0, 19,105,117,112, 95,109,117,108,116,105,115,101,108,101, 99, +116, 95, 99, 98, 0, 2, 0, 0, 0, 7,102,105,108,101, 99, 98, 0, 2, 0, 0, + 0, 8, 70, 73, 76, 69, 95, 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,102, +105,108,101, 95, 99, 98, 0, 2, 0, 0, 0, 14,109,100,105, 97, 99,116,105,118, + 97,116,101, 99, 98, 0, 2, 0, 0, 0, 15, 77, 68, 73, 65, 67, 84, 73, 86, 65, + 84, 69, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109,100,105, 97, 99, +116,105,118, 97,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 11,100,114,111,112,100, +111,119,110, 99, 98, 0, 2, 0, 0, 0, 12, 68, 82, 79, 80, 68, 79, 87, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,100,114,111,112,100,111,119,110, + 95, 99, 98, 0, 2, 0, 0, 0, 11,100, 98,108, 99,108,105, 99,107, 99, 98, 0, + 2, 0, 0, 0, 12, 68, 66, 76, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, + 0, 16,105,117,112, 95,100, 98,108, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, + 0, 0, 18,105,117,112, 95, 97, 99,116,105,111,110, 95,116,111,103,103,108,101, + 0, 2, 0, 0, 0, 16,105,117,112, 95, 97, 99,116,105,111,110, 95,116,101,120, +116, 0, 2, 0, 0, 0, 18,105,117,112, 95, 97, 99,116,105,111,110, 95, 98,117, +116,116,111,110, 0, 2, 0, 0, 0, 16,105,117,112, 95, 97, 99,116,105,111,110, + 95,108,105,115,116, 0, 2, 0, 0, 0, 18,105,117,112, 95, 97, 99,116,105,111, +110, 95, 99, 97,110,118, 97,115, 0, 2, 0, 0, 0, 17,105,117,112, 95, 97, 99, +116,105,111,110, 95,116,105,109,101,114, 0, 2, 0, 0, 0, 10, 97, 99,116,105, +111,110, 95, 99, 98, 0, 2, 0, 0, 0, 12,103,101,116,102,111, 99,117,115, 95, + 99, 98, 0, 2, 0, 0, 0, 13,107,105,108,108,102,111, 99,117,115, 95, 99, 98, + 0, 2, 0, 0, 0, 9,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, 0, 8, +104,101,108,112, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99, 97,114,101,116, 95, 99, + 98, 0, 2, 0, 0, 0, 12,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115, 99,114,111,108,108, 95, 99, 98, 0, 2, 0, 0, 0, 13,116, +114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99,108,111, +115,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,111,112,101,110, 95, 99, 98, 0, 2, + 0, 0, 0, 8,115,104,111,119, 95, 99, 98, 0, 2, 0, 0, 0, 7,109, 97,112, + 95, 99, 98, 0, 2, 0, 0, 0, 9,117,110,109, 97,112, 95, 99, 98, 0, 2, 0, + 0, 0, 13,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 2, 0, 0, 0, + 13,109,101,110,117, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 13,104, +105,103,104,108,105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 7,119,111,109, + 95, 99, 98, 0, 2, 0, 0, 0, 9,119,104,101,101,108, 95, 99, 98, 0, 2, 0, + 0, 0, 10, 98,117,116,116,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 10,114,101, +115,105,122,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,109,111,118,101, 95, 99, 98, + 0, 2, 0, 0, 0, 10,109,111,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, + 15,101,110,116,101,114,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, + 15,108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, + 8,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,117,108,116,105,115, +101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,100,105, 97, 99,116, +105,118, 97,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,102,105,108,101, 95, 99, + 98, 0, 2, 0, 0, 0, 12,100,114,111,112,100,111,119,110, 95, 99, 98, 0, 2, + 0, 0, 0, 12,100, 98,108, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, + 16,118, 97,108,117,101, 99,104, 97,110,103,101,100, 95, 99, 98, 0, 2, 0, 0, + 0, 15,118, 97,108,117,101, 99,104, 97,110,103,101,100, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/iuplua_widgets_le64.lo"); +} diff --git a/iup/srclua3/loh/iuplua_widgets_le64w.loh b/iup/srclua3/loh/iuplua_widgets_le64w.loh new file mode 100755 index 0000000..cce26b4 --- /dev/null +++ b/iup/srclua3/loh/iuplua_widgets_le64w.loh @@ -0,0 +1,920 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/iuplua_widgets_le64w.lo"); +*/ +/* ../obj/iuplua3/iuplua_widgets_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 20, 64,105,117,112,108,117, + 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 7,129, 67, 0, + 22, 1, 11, 1, 22, 0, 30, 0, 25, 0, 15, 0, 11, 2, 11, 3, 26, 15, 0, 11, + 4, 11, 5, 26, 15, 0, 11, 6, 11, 7, 26, 15, 0, 11, 8, 11, 9, 26, 15, 0, + 11, 10, 11, 11, 26, 15, 0, 11, 12, 11, 13, 26, 15, 0, 11, 14, 11, 15, 26, 15, + 0, 11, 16, 11, 17, 26, 15, 0, 11, 18, 11, 19, 26, 15, 0, 11, 20, 11, 21, 26, + 15, 0, 11, 22, 11, 23, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, 24, 15, 24, 11, + 26, 11, 27, 26, 11, 29, 25, 28, 15, 30, 11, 31, 15, 28, 26, 22, 2, 11, 25, 15, + 0, 11, 1, 22, 1, 15, 33, 29, 0, 1, 30, 1, 25, 32, 15, 32, 11, 26, 11, 34, + 26, 15, 32, 11, 35, 11, 36, 26, 15, 32, 11, 37, 11, 38, 26, 15, 32, 11, 39, 11, + 40, 26, 11, 42, 25, 41, 15, 30, 11, 43, 15, 41, 26, 22, 2, 11, 25, 15, 0, 11, + 1, 22, 1, 15, 33, 29, 0, 1, 30, 1, 25, 44, 15, 44, 11, 26, 11, 45, 26, 11, + 47, 25, 46, 15, 30, 11, 48, 15, 46, 26, 11, 50, 25, 49, 11, 52, 25, 51, 11, 54, + 25, 53, 22, 1, 11, 25, 15, 0, 30, 0, 25, 55, 15, 55, 11, 4, 11, 56, 26, 15, + 55, 11, 26, 11, 57, 26, 11, 59, 25, 58, 15, 30, 11, 60, 15, 58, 26, 15, 61, 11, + 39, 11, 62, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, 63, 15, 63, 11, 4, 11, 64, + 26, 15, 63, 11, 26, 11, 65, 26, 22, 1, 11, 25, 15, 63, 30, 0, 25, 66, 15, 66, + 11, 67, 11, 68, 26, 11, 70, 25, 69, 15, 30, 11, 71, 15, 69, 26, 11, 73, 25, 72, + 11, 75, 25, 74, 22, 1, 11, 25, 15, 63, 30, 0, 25, 76, 15, 76, 11, 67, 11, 77, + 26, 11, 79, 25, 78, 15, 30, 11, 80, 15, 78, 26, 11, 82, 25, 81, 22, 1, 11, 25, + 15, 63, 30, 0, 25, 83, 15, 83, 11, 67, 11, 84, 26, 11, 86, 25, 85, 15, 30, 11, + 87, 15, 85, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, 88, 15, 88, 11, 26, 11, 89, + 26, 11, 91, 25, 90, 15, 30, 11, 92, 15, 90, 26, 22, 2, 11, 25, 15, 0, 11, 94, + 22, 1, 11, 95, 15, 96, 30, 0, 30, 1, 25, 93, 15, 93, 11, 26, 11, 97, 26, 11, + 99, 25, 98, 15, 30, 11,100, 15, 98, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,101, + 15,101, 11, 26, 11,102, 26, 11,104, 25,103, 15, 30, 11,105, 15,103, 26, 22, 1, + 11, 25, 15,107, 30, 0, 25,106, 15,106, 11, 26, 11,108, 26, 11,110, 25,109, 15, + 30, 11,111, 15,109, 26, 22, 2, 11, 25, 15, 0, 11, 94, 22, 1, 11,113, 15, 96, + 30, 0, 30, 1, 25,112, 15,112, 11, 26, 11,114, 26, 11,116, 25,115, 15, 30, 11, +117, 15,115, 26, 22, 1, 11, 25, 15,119, 30, 0, 25,118, 15,118, 11, 26, 11,120, + 26, 11,122, 25,121, 15, 30, 11,123, 15,121, 26, 22, 1, 11, 25, 15,119, 30, 0, + 25,124, 15,124, 11, 26, 11,125, 26, 11,127, 25,126, 15, 30, 11,128, 15,126, 26, + 22, 2, 11, 25, 15, 0, 11, 94, 22, 2, 15,130, 29, 0, 1, 11,131, 15, 96, 30, + 0, 30, 1, 25,129, 15,129, 11, 26, 11,132, 26, 11,134, 25,133, 15, 30, 11,135, + 15,133, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,136, 15,136, 11, 26, 11,137, 26, + 11,139, 25,138, 15, 30, 11,140, 15,138, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, +141, 15,141, 11, 39, 11,142, 26, 15,141, 11, 26, 11,143, 26, 11,145, 25,144, 15, + 30, 11,146, 15,144, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,147, 15,147, 11, 39, + 11,148, 26, 15,147, 11, 26, 11,149, 26, 11,151, 25,150, 15, 30, 11,152, 15,150, + 26, 22, 1, 11, 25, 15, 0, 30, 0, 25,153, 15,153, 11, 39, 11,154, 26, 15,153, + 11, 26, 11,155, 26, 11,157, 25,156, 15, 30, 11,158, 15,156, 26, 22, 1, 11, 25, + 15, 0, 30, 0, 25,159, 15,159, 11, 39, 11,160, 26, 15,159, 11, 26, 11,161, 26, + 11,163, 25,162, 15, 30, 11,164, 15,162, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, +165, 15,165, 11, 26, 11,166, 26, 11,168, 25,167, 15, 30, 11,169, 15,167, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,170, 15,170, 11, 4, 11,171, 26, 15,170, 11, 26, + 11,172, 26, 11,174, 25,173, 15, 30, 11,175, 15,173, 26, 22, 2, 11, 25, 15, 0, + 11, 94, 22, 1, 15,177, 29, 0, 1, 30, 1, 25,176, 15,176, 11, 26, 11,178, 26, + 11,180, 25,179, 15, 30, 11,181, 15,179, 26, 22, 1, 11, 25, 15, 0, 30, 0, 25, +182, 15,182, 11, 26, 11,183, 26, 11,185, 25,184, 15, 30, 11,186, 15,184, 26, 22, + 1, 11, 25, 15, 0, 30, 0, 25,187, 15,187, 11, 26, 11,188, 26, 15,187, 11, 8, + 11,189, 26, 15,187, 11, 10, 11,190, 26, 11,192, 25,191, 15, 30, 11,193, 15,191, + 26, 22, 1, 11, 25, 15,195, 30, 0, 25,194, 15,194, 11, 4, 11,196, 26, 15,194, + 11, 26, 11,197, 26, 11,199, 25,198, 15, 30, 11,200, 15,198, 26, 22, 1, 11, 25, + 15,195, 30, 0, 25,201, 15,201, 11, 26, 11,202, 26, 11,204, 25,203, 15, 30, 11, +205, 15,203, 26, 22, 1, 11, 25, 15,195, 30, 0, 25,206, 15,206, 11, 26, 11,207, + 26, 11,209, 25,208, 15, 30, 11,210, 15,208, 26, 22, 1, 11, 25, 15,195, 30, 0, + 25,211, 15,211, 11, 26, 11,212, 26, 11,214, 25,213, 15, 30, 11,215, 15,213, 26, + 22, 32, 11,217, 22, 2, 11,218, 4, 0, 29, 0, 2, 11,219, 22, 2, 11,220, 4, + 0, 29, 0, 2, 11,221, 22, 2, 11,222, 15,223, 29, 0, 2, 11,224, 22, 2, 11, +225, 15,226, 29, 0, 2, 11,227, 22, 2, 11,228, 15,229, 29, 0, 2, 11,230, 22, + 2, 11,231, 15,232, 29, 0, 2, 11,233, 22, 2, 11,234, 15,235, 29, 0, 2, 11, +236, 22, 2, 11,237, 15,238, 29, 0, 2, 11,239, 22, 2, 11,240, 15,241, 29, 0, + 2, 11,242, 22, 2, 11,243, 15,244, 29, 0, 2, 11,245, 22, 2, 11,246, 15,247, + 29, 0, 2, 11,248, 22, 2, 11,249, 15,250, 29, 0, 2, 11,251, 22, 2, 11,252, + 15,253, 29, 0, 2, 11,254, 22, 2, 11,255, 14, 1, 0, 29, 0, 2, 10, 1, 1, + 22, 2, 10, 1, 2, 14, 1, 3, 29, 0, 2, 10, 1, 4, 22, 2, 10, 1, 5, 14, + 1, 6, 29, 0, 2, 10, 1, 7, 22, 2, 10, 1, 8, 14, 1, 9, 29, 0, 2, 10, + 1, 10, 22, 2, 10, 1, 11, 14, 1, 12, 29, 0, 2, 10, 1, 13, 22, 2, 10, 1, + 14, 14, 1, 15, 29, 0, 2, 10, 1, 16, 22, 2, 10, 1, 17, 14, 1, 18, 29, 0, + 2, 10, 1, 19, 22, 2, 10, 1, 20, 14, 1, 21, 29, 0, 2, 11,100, 22, 2, 10, + 1, 22, 14, 1, 23, 29, 0, 2, 10, 1, 24, 22, 2, 10, 1, 25, 14, 1, 26, 29, + 0, 2, 10, 1, 27, 22, 2, 10, 1, 28, 14, 1, 29, 29, 0, 2, 10, 1, 30, 22, + 2, 10, 1, 31, 14, 1, 32, 29, 0, 2, 10, 1, 33, 22, 2, 10, 1, 34, 14, 1, + 35, 29, 0, 2, 10, 1, 36, 22, 2, 10, 1, 37, 14, 1, 38, 29, 0, 2, 10, 1, + 39, 22, 2, 10, 1, 40, 14, 1, 41, 29, 0, 2, 10, 1, 42, 22, 2, 10, 1, 43, + 14, 1, 44, 29, 0, 2, 10, 1, 45, 22, 2, 10, 1, 46, 14, 1, 47, 29, 0, 2, + 10, 1, 48, 22, 2, 10, 1, 49, 14, 1, 50, 29, 0, 2, 10, 1, 51, 22, 2, 10, + 1, 52, 14, 1, 53, 29, 0, 2, 30, 31, 25,216, 15,216, 18,217, 11,123, 14, 1, + 54, 26, 15,216, 18,217, 11,111, 14, 1, 55, 26, 15,216, 18,217, 11,105, 14, 1, + 55, 26, 15,216, 18,217, 11,100, 14, 1, 56, 26, 15,216, 18,217, 11,193, 14, 1, + 57, 26, 15,216, 18,217, 11,128, 14, 1, 56, 26, 15,216, 18,217, 11,186, 14, 1, + 58, 26, 15,216, 18,219, 11, 31, 14, 1, 59, 26, 15,216, 10, 1, 60, 15,216, 18, +219, 26, 15,216, 10, 1, 61, 15,216, 18,221, 26, 15,216, 10, 1, 62, 15,216, 18, +224, 26, 15,216, 10, 1, 63, 15,216, 18,227, 26, 15,216, 11,230, 15,216, 18,230, + 26, 15,216, 10, 1, 64, 15,216, 18,233, 26, 15,216, 10, 1, 65, 15,216, 18,236, + 26, 15,216, 10, 1, 66, 15,216, 18,239, 26, 15,216, 10, 1, 67, 15,216, 18,242, + 26, 15,216, 10, 1, 68, 15,216, 18,245, 26, 15,216, 10, 1, 69, 15,216, 18,248, + 26, 15,216, 10, 1, 70, 15,216, 18,251, 26, 15,216, 10, 1, 71, 15,216, 18,254, + 26, 15,216, 10, 1, 72, 15,216, 17, 1, 1, 26, 15,216, 10, 1, 73, 15,216, 17, + 1, 4, 26, 15,216, 10, 1, 74, 15,216, 17, 1, 7, 26, 15,216, 10, 1, 75, 15, +216, 17, 1, 10, 26, 15,216, 10, 1, 76, 15,216, 17, 1, 13, 26, 15,216, 10, 1, + 77, 15,216, 17, 1, 16, 26, 15,216, 10, 1, 78, 15,216, 17, 1, 19, 26, 15,216, + 10, 1, 79, 15,216, 18,100, 26, 15,216, 10, 1, 80, 15,216, 17, 1, 24, 26, 15, +216, 10, 1, 81, 15,216, 17, 1, 27, 26, 15,216, 10, 1, 82, 15,216, 17, 1, 30, + 26, 15,216, 10, 1, 83, 15,216, 17, 1, 33, 26, 15,216, 10, 1, 84, 15,216, 17, + 1, 36, 26, 15,216, 10, 1, 85, 15,216, 17, 1, 39, 26, 15,216, 10, 1, 86, 15, +216, 17, 1, 45, 26, 15,216, 10, 1, 87, 15,216, 17, 1, 42, 26, 15,216, 10, 1, + 88, 15,216, 17, 1, 48, 26, 15,216, 10, 1, 89, 15,216, 17, 1, 51, 26, 0, 0, + 0, 0, 0, 0, 0, 1, 90, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, + 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 4, 0, 0, 0, 12, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 57, 7, + 2, 13, 1, 11, 1, 13, 0, 26, 13, 0, 20, 3, 13, 1, 2, 0, 2, 13, 1, 11, + 4, 13, 0, 20, 5, 13, 1, 2, 1, 2, 26, 13, 0, 20, 6, 13, 1, 2, 0, 2, + 15, 7, 13, 1, 18, 4, 13, 1, 26, 13, 1, 18, 4, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,112, 97, +114,101,110,116, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 12, + 99,104,101, 99,107, 80, 97,114, 97,109,115, 0, 2, 0, 0, 0, 7,104, 97,110, +100,108,101, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108, +101,109,101,110,116, 0, 2, 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98, +117,116,101,115, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97,110,100,108,101, +115, 0, 2, 0, 0, 0, 12, 99,104,101, 99,107, 80, 97,114, 97,109,115, 0, 4, + 0, 0, 0, 32, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 61, 8, 2, 13, 0, 18, 1, 15, 5, + 13, 2, 4, 0, 2, 2, 2, 50, 39, 13, 4, 13, 1, 13, 3, 16, 2, 1, 1, 44, + 52, 13, 15, 6, 11, 7, 13, 3, 42, 11, 8, 42, 2, 0, 1, 15, 5, 13, 2, 13, + 3, 2, 2, 2, 23, 4, 23, 3, 13, 3, 54, 43, 0, 0, 0, 0, 0, 0, 0, 0, + 9, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, + 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 6,112, 97,114, 97,109, + 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, 0, 0, 0, 5,110,101,120,116, + 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, + 97,109,101,116,101,114, 32, 0, 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114, +111,110,103, 32,118, 97,108,117,101, 32,111,114, 32,105,115, 32,110,111,116, 32, +105,110,105,116,105, 97,108,105,122,101,100, 0, 2, 0, 0, 0, 14,115,101,116, + 65,116,116,114,105, 98,117,116,101,115, 0, 4, 0, 0, 0, 43, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0, 80, 9, 2, 22, 0, 15, 3, 13, 1, 4, 0, 2, 1, 2, 50, 18, 13, + 2, 13, 3, 7, 1, 26, 15, 3, 13, 1, 13, 3, 2, 1, 2, 23, 3, 13, 3, 54, + 22, 15, 3, 13, 2, 4, 0, 2, 1, 2, 23, 3, 50, 25, 13, 1, 20, 4, 13, 3, + 13, 1, 13, 3, 16, 2, 0, 3, 15, 3, 13, 2, 13, 3, 2, 1, 2, 23, 3, 13, + 3, 54, 29, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 5,116,101,109,112, 0, 2, 0, 0, 0, 2,102, 0, 2, 0, + 0, 0, 5,110,101,120,116, 0, 2, 0, 0, 0, 4,115,101,116, 0, 2, 0, 0, + 0, 4,103,101,116, 0, 4, 0, 0, 0, 57, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 82, 6, + 2, 15, 1, 13, 1, 2, 1, 1, 52, 63, 15, 2, 13, 1, 16, 52, 9, 13, 0, 13, + 1, 16, 1, 2, 50, 47, 15, 5, 13, 1, 2, 1, 1, 15, 7, 13, 0, 18, 8, 13, + 2, 2, 1, 2, 13, 3, 52, 23, 15, 9, 13, 3, 2, 1, 1, 13, 4, 52, 6, 13, + 4, 1, 5, 50, 4, 13, 3, 1, 5, 5, 1, 5, 2, 13, 0, 13, 1, 16, 1, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 0, 0, 0, 6,105,110,100,101,120, 0, + 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, + 5,115,101,108,102, 0, 2, 0, 0, 0, 6, 73, 78, 68, 69, 88, 0, 2, 0, 0, + 0, 9,115,116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 6,118, 97,108,117, +101, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 13, + 73,117,112, 71,101,116, 72, 97,110,100,108,101, 0, 2, 0, 0, 0, 4,115,101, +116, 0, 4, 0, 0, 0, 77, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,228, 11, 3, 15, 2, 13, + 1, 2, 1, 1, 52,209, 15, 4, 13, 1, 2, 1, 1, 15, 6, 13, 1, 16, 13, 1, + 11, 7, 32, 48, 12, 15, 8, 13, 0, 18, 10, 2, 1, 1, 11, 11, 32, 52, 4, 4, + 0, 23, 4, 13, 4, 52, 55, 13, 4, 7, 2, 16, 13, 5, 44, 52, 14, 13, 4, 15, + 8, 13, 0, 18, 10, 2, 1, 1, 16, 23, 5, 15, 13, 13, 0, 18, 10, 13, 4, 7, + 1, 16, 13, 5, 13, 2, 2, 0, 4, 13, 0, 13, 1, 13, 2, 26, 1, 6, 5, 1, + 50,111, 15, 2, 13, 2, 2, 1, 1, 46, 7, 15, 14, 13, 2, 2, 1, 1, 52, 17, + 15, 15, 13, 0, 18, 10, 13, 3, 13, 2, 2, 0, 3, 1, 5, 50, 76, 15, 16, 13, + 2, 2, 1, 1, 52, 34, 15, 18, 13, 0, 18, 10, 13, 3, 2, 1, 2, 13, 5, 52, + 15, 15, 15, 13, 0, 18, 10, 13, 3, 13, 2, 2, 0, 3, 1, 6, 5, 1, 50, 33, + 15, 19, 13, 2, 2, 1, 1, 52, 24, 15, 20, 13, 2, 2, 0, 1, 15, 15, 13, 0, + 18, 10, 13, 3, 13, 2, 18, 21, 2, 0, 3, 1, 5, 5, 2, 13, 0, 13, 1, 13, + 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 6,105,110,100,101, +120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 12,116,121, +112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 6, 73, 78, 68, 69, 88, + 0, 2, 0, 0, 0, 9,115,116,114,117,112,112,101,114, 0, 2, 0, 0, 0, 3, + 99, 98, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107, +115, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, 2, 0, 0, 0, 16, 73, +117,112, 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, 2, 0, 0, 0, 5, +115,101,108,102, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, + 0, 7,100,105, 97,108,111,103, 0, 2, 0, 0, 0, 5,102,117,110, 99, 0, 2, + 0, 0, 0, 15,105,117,112, 83,101,116, 67, 97,108,108, 98, 97, 99,107, 0, 2, + 0, 0, 0, 12,116,121,112,101, 95,110,117,109, 98,101,114, 0, 2, 0, 0, 0, + 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, + 0, 9,116,121,112,101, 95,110,105,108, 0, 2, 0, 0, 0, 10,111,108,100, 95, +118, 97,108,117,101, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116, +114,105, 98,117,116,101, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100, +103,101,116, 0, 2, 0, 0, 0, 11,105,117,112, 83,101,116, 78, 97,109,101, 0, + 2, 0, 0, 0, 9, 73, 85, 80, 95,110, 97,109,101, 0, 2, 0, 0, 0, 10,114, + 95,100,101,115,116,114,111,121, 0, 4, 0, 0, 0,113, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 89, 6, 1, 7, 1, 13, 0, 13, 1, 16, 50, 66, 15, 3, 13, 2, 2, 1, 1, + 48, 4, 13, 2, 18, 4, 52, 37, 13, 2, 18, 4, 13, 0, 32, 52, 16, 13, 2, 11, + 4, 4, 0, 26, 13, 2, 20, 5, 2, 0, 1, 50, 12, 15, 6, 11, 7, 2, 0, 1, + 15, 8, 2, 0, 0, 13, 1, 7, 1, 37, 23, 1, 13, 0, 13, 1, 16, 23, 2, 13, + 2, 54, 70, 15, 9, 13, 0, 4, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, + 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 5,101,108,101,109, 0, 2, 0, 0, 0, + 5,115,101,108,102, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103, +101,116, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, + 0, 0, 0, 10,114, 95,100,101,115,116,114,111,121, 0, 2, 0, 0, 0, 6,101, +114,114,111,114, 0, 2, 0, 0, 0, 29, 73,110,116,101,114,110, 97,108, 32,116, + 97, 98,108,101, 32,105,110, 99,111,110,115,105,115,116,101,110, 99,121, 0, 2, + 0, 0, 0, 5,101,120,105,116, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, 97, +110,100,108,101,115, 0, 2, 0, 0, 0, 8,100,101,115,116,114,111,121, 0, 4, + 0, 0, 0,133, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 17, 3, 1, 13, 0, 20, 1, 2, 0, + 1, 15, 2, 13, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 10,114, 95,100,101,115,116,114,111, +121, 0, 2, 0, 0, 0, 11, 73,117,112, 68,101,115,116,114,111,121, 0, 2, 0, + 0, 0, 7,100,101,116, 97, 99,104, 0, 4, 0, 0, 0,138, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0, 96, 8, 1, 15, 0, 13, 0, 2, 0, 1, 13, 0, 18, 3, 13, 1, 52, 78, + 13, 0, 11, 3, 4, 0, 26, 7, 1, 50, 58, 13, 1, 13, 2, 16, 13, 0, 32, 52, + 41, 50, 20, 13, 1, 13, 2, 13, 1, 13, 2, 7, 1, 37, 16, 26, 13, 2, 7, 1, + 37, 23, 2, 13, 1, 13, 2, 7, 1, 37, 16, 54, 30, 13, 1, 13, 2, 4, 0, 26, + 1, 3, 13, 2, 7, 1, 37, 23, 2, 13, 1, 13, 2, 16, 54, 65, 5, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 10, 73,117,112, 68,101,116, 97, 99, +104, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, + 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 7, 97,112,112,101,110,100, 0, 4, + 0, 0, 0,158, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 75, 6, 2, 15, 1, 13, 0, 13, 1, + 2, 1, 2, 52, 57, 13, 1, 11, 3, 13, 0, 26, 7, 1, 50, 21, 13, 0, 13, 2, + 16, 13, 1, 32, 52, 4, 13, 2, 1, 3, 13, 2, 7, 1, 37, 23, 2, 13, 0, 13, + 2, 16, 54, 28, 15, 5, 13, 0, 16, 13, 2, 13, 1, 26, 13, 2, 1, 3, 5, 1, + 50, 4, 4, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2, +111, 0, 2, 0, 0, 0, 10, 73,117,112, 65,112,112,101,110,100, 0, 2, 0, 0, + 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 12,105,117,112, 95,104, + 97,110,100,108,101,115, 0, 2, 0, 0, 0, 4,109, 97,112, 0, 4, 0, 0, 0, +175, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 7, 73,117,112, 77, 97,112, 0, 2, + 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 5,104,105,100,101, 0, 4, + 0, 0, 0,179, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 8, 73,117,112, 72,105, +100,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 9, 73, 85, + 80, 84, 73, 77, 69, 82, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, + 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, + 0, 4, 0, 0, 0,187, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, + 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 84,105,109,101,114, 0, 2, + 0, 0, 0, 9,105,117,112,116,105,109,101,114, 0, 4, 0, 0, 0,191, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, + 80, 84, 73, 77, 69, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99, +116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,116,105, +109,101,114, 0, 2, 0, 0, 0, 10, 73, 85, 80, 68, 73, 65, 76, 79, 71, 0, 2, + 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 0, +200, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, + 1, 13, 1, 7, 1, 16, 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97, +110,100,108,101, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 68, +105, 97,108,111,103, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110, +116, 0, 2, 0, 0, 0, 5,115,104,111,119, 0, 4, 0, 0, 0,206, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 10, 3, 1, 15, 0, 13, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 8, 73,117,112, 83,104,111,119, 0, 2, 0, 0, 0, + 5,115,101,108,102, 0, 2, 0, 0, 0, 7,115,104,111,119,120,121, 0, 4, 0, + 0, 0,210, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, + 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, 0, 2,120, 0, + 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 10, 73,117,112, 83,104,111,119, 88, + 89, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 6,112,111,112, +117,112, 0, 4, 0, 0, 0,214, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, + 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, + 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117,112, + 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, + 10,105,117,112,100,105, 97,108,111,103, 0, 4, 0, 0, 0,218, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, 73, 85, 80, 68, + 73, 65, 76, 79, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116, +111,114, 0, 2, 0, 0, 0, 7,100,105, 97,108,111,103, 0, 2, 0, 0, 0, 9, + 73, 85, 80, 82, 65, 68, 73, 79, 0, 4, 0, 0, 0,227, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, 1, 13, 1, 7, 1, 16, 11, + 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, + 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 82, 97,100,105,111, 0, 2, 0, + 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 9,105, +117,112,114, 97,100,105,111, 0, 4, 0, 0, 0,233, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 26, 5, 1, 15, 2, 20, 3, 13, 0, 2, 1, 2, 15, 4, 13, 1, 7, 1, 16, 2, + 0, 1, 13, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 2, +111, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 9, 73, + 85, 80, 82, 65, 68, 73, 79, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, + 99,116,111,114, 0, 2, 0, 0, 0, 23,105,117,112, 67,114,101, 97,116,101, 67, +104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 2, 0, 0, 0, 6,114, 97, +100,105,111, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, 0, + 4, 0, 0, 0,241, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,156, 11, 1, 22, 0, 7, 1, 50, + 61, 15, 3, 13, 0, 13, 2, 16, 2, 1, 1, 52, 29, 13, 1, 13, 2, 15, 4, 22, + 2, 11, 5, 13, 0, 13, 2, 16, 11, 6, 13, 0, 18, 6, 30, 1, 2, 1, 1, 26, + 50, 13, 15, 7, 11, 8, 13, 2, 42, 11, 9, 42, 2, 0, 1, 13, 2, 7, 1, 37, + 23, 2, 13, 0, 13, 2, 16, 54, 68, 13, 0, 18, 10, 52, 51, 7, 1, 50, 7, 13, + 3, 7, 1, 37, 23, 3, 13, 0, 13, 3, 16, 48, 10, 13, 0, 13, 3, 16, 13, 0, + 18, 10, 31, 54, 26, 13, 0, 13, 3, 16, 52, 10, 13, 1, 11, 10, 13, 1, 13, 3, + 16, 26, 5, 1, 50, 18, 13, 0, 18, 12, 52, 12, 13, 1, 11, 10, 13, 1, 13, 0, + 18, 12, 16, 26, 13, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, 0, + 0, 2,104, 0, 2, 0, 0, 0, 4,116,109,112, 0, 2, 0, 0, 0, 2,105, 0, + 2, 0, 0, 0, 12,116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, + 0, 10,105,117,112,116,111,103,103,108,101, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 6, +101,114,114,111,114, 0, 2, 0, 0, 0, 8,111,112,116,105,111,110, 32, 0, 2, + 0, 0, 0, 18, 32,109,117,115,116, 32, 98,101, 32, 97, 32,115,116,114,105,110, +103, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 2,106, 0, + 2, 0, 0, 0, 7,110,118, 97,108,117,101, 0, 2, 0, 0, 0, 9,101,100,104, +114, 97,100,105,111, 0, 4, 0, 0, 1, 13, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 35, 6, + 1, 15, 2, 13, 0, 2, 1, 1, 15, 3, 22, 2, 15, 4, 13, 1, 2, 1, 1, 29, + 0, 1, 11, 5, 13, 1, 18, 5, 30, 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8,116,111,103,103,108,101, +115, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, 0, 2, 0, + 0, 0, 9,105,117,112,114, 97,100,105,111, 0, 2, 0, 0, 0, 7,101,100,104, + 98,111,120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 9, +101,100,118,114, 97,100,105,111, 0, 4, 0, 0, 1, 19, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 35, 6, 1, 15, 2, 13, 0, 2, 1, 1, 15, 3, 22, 2, 15, 4, 13, 1, 2, + 1, 1, 29, 0, 1, 11, 5, 13, 1, 18, 5, 30, 0, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8,116,111,103, +103,108,101,115, 0, 2, 0, 0, 0, 11,101,100,110,116,111,103,103,108,101,115, + 0, 2, 0, 0, 0, 9,105,117,112,114, 97,100,105,111, 0, 2, 0, 0, 0, 7, +101,100,118, 98,111,120, 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, + 0, 0, 8, 73, 85, 80, 77, 69, 78, 85, 0, 4, 0, 0, 1, 28, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0,159, 7, 2, 7, 1, 50,145, 13, 1, 13, 2, 16, 15, 3, 13, 3, 2, + 1, 1, 44, 52,121, 15, 4, 13, 3, 2, 1, 1, 11, 5, 31, 52, 15, 15, 6, 11, + 7, 13, 2, 42, 11, 8, 42, 2, 0, 1, 50, 94, 13, 3, 7, 1, 16, 48, 11, 15, + 9, 13, 3, 7, 1, 16, 2, 1, 1, 44, 52, 15, 15, 6, 11, 7, 13, 2, 42, 11, + 10, 42, 2, 0, 1, 50, 59, 13, 3, 7, 2, 16, 48, 11, 15, 9, 13, 3, 7, 2, + 16, 2, 1, 1, 44, 48, 11, 15, 11, 13, 3, 7, 2, 16, 2, 1, 1, 44, 48, 11, + 15, 12, 13, 3, 7, 2, 16, 2, 1, 1, 44, 52, 13, 15, 6, 11, 7, 13, 2, 42, + 11, 13, 42, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 5, 1, 13, 1, 13, 2, 16, + 54,152, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 4,111, 98,106, 0, + 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10,116, +121,112,101, 95,105,116,101,109, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, + 0, 0, 0, 6,116, 97, 98,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, + 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, 0, 2, 0, 0, + 0, 32, 32,105,115, 32,110,111,116, 32, 97, 32,116, 97, 98,108,101, 32,110,111, +114, 32, 97, 32,109,101,110,117, 32,105,116,101,109, 0, 2, 0, 0, 0, 12,116, +121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 30, 32,100,111,101, +115, 32,110,111,116, 32,104, 97,118,101, 32, 97, 32,115,116,114,105,110,103, 32, +116,105,116,108,101, 0, 2, 0, 0, 0, 14,116,121,112,101, 95,102,117,110, 99, +116,105,111,110, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101, +116, 0, 2, 0, 0, 0, 36, 32,100,111,101,115, 32,110,111,116, 32,104, 97,118, +101, 32, 97,110, 32, 97, 99,116,105,111,110, 32,110,111,114, 32, 97, 32,109,101, +110,117, 0, 4, 0, 0, 1, 46, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,189, 10, 2, 15, 2, + 2, 1, 0, 7, 1, 50,166, 13, 1, 13, 3, 16, 4, 0, 15, 6, 13, 4, 2, 1, + 1, 52, 6, 13, 4, 23, 5, 50,112, 13, 4, 7, 1, 16, 44, 52, 11, 15, 7, 22, + 0, 2, 1, 1, 23, 5, 50, 93, 15, 6, 13, 4, 7, 2, 16, 2, 1, 1, 52, 38, + 13, 4, 11, 8, 13, 4, 7, 1, 16, 26, 13, 4, 7, 1, 13, 4, 7, 2, 16, 26, + 13, 4, 7, 2, 4, 0, 26, 15, 9, 13, 4, 2, 1, 1, 23, 5, 50, 43, 13, 4, + 11, 8, 13, 4, 7, 1, 16, 26, 13, 4, 11, 10, 13, 4, 7, 2, 16, 26, 13, 4, + 7, 1, 4, 0, 26, 13, 4, 7, 2, 4, 0, 26, 15, 11, 13, 4, 2, 1, 1, 23, + 5, 15, 12, 13, 2, 13, 5, 2, 0, 2, 13, 5, 11, 13, 13, 2, 26, 13, 1, 13, + 3, 13, 5, 26, 13, 3, 7, 1, 37, 23, 3, 5, 2, 13, 1, 13, 3, 16, 54,173, + 13, 2, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 4,111, 98, +106, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 14,105, +117,112, 67,114,101, 97,116,101, 77,101,110,117, 0, 2, 0, 0, 0, 2,105, 0, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 5,101,108,101,109, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, 13,105, +117,112,115,101,112, 97,114, 97,116,111,114, 0, 2, 0, 0, 0, 6,116,105,116, +108,101, 0, 2, 0, 0, 0, 11,105,117,112,115,117, 98,109,101,110,117, 0, 2, + 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 8,105,117,112,105, +116,101,109, 0, 2, 0, 0, 0, 10, 73,117,112, 65,112,112,101,110,100, 0, 2, + 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, +105,117,112,109,101,110,117, 0, 4, 0, 0, 1, 76, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, 85, + 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, + 0, 0, 5,109,101,110,117, 0, 2, 0, 0, 0, 8, 73, 85, 80, 77, 69, 78, 85, + 0, 4, 0, 0, 1, 81, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, 13, 0, + 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, 0, + 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117,112, 80,111, +112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 12, 67, + 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 0, 4, 0, 0, 1, 89, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0, 47, 6, 2, 7, 1, 50, 33, 15, 2, 13, 1, 13, 2, 16, 2, 1, 1, + 44, 52, 13, 15, 3, 11, 4, 13, 2, 42, 11, 5, 42, 2, 0, 1, 13, 2, 7, 1, + 37, 23, 2, 13, 1, 13, 2, 16, 54, 40, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, + 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,119,105,100,103,101,116, 0, 2, 0, 0, 0, 6,101,114,114, +111,114, 0, 2, 0, 0, 0, 11,112, 97,114, 97,109,101,116,101,114, 32, 0, 2, + 0, 0, 0, 39, 32,104, 97,115, 32,119,114,111,110,103, 32,118, 97,108,117,101, + 32,111,114, 32,105,115, 32,110,111,116, 32,105,110,105,116,105, 97,108,105,122, +101,100, 0, 4, 0, 0, 1, 99, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0,187, 11, 2, 13, 0, + 20, 3, 2, 1, 1, 13, 1, 18, 4, 7, 1, 7, 0, 50, 14, 13, 5, 7, 1, 37, + 23, 5, 13, 4, 7, 1, 37, 23, 4, 13, 1, 13, 4, 16, 54, 21, 7, 1, 23, 4, + 13, 3, 15, 7, 32, 52, 43, 13, 1, 13, 4, 13, 5, 37, 15, 8, 22, 0, 2, 1, + 1, 26, 15, 9, 13, 2, 13, 1, 13, 4, 13, 5, 37, 16, 2, 0, 2, 13, 1, 13, + 4, 13, 5, 37, 16, 11, 10, 13, 2, 26, 50, 79, 15, 9, 13, 2, 13, 1, 13, 4, + 16, 2, 0, 2, 13, 1, 13, 4, 16, 11, 10, 13, 2, 26, 13, 4, 7, 1, 37, 23, + 4, 13, 3, 15, 7, 32, 52, 43, 13, 1, 13, 4, 13, 5, 37, 15, 8, 22, 0, 2, + 1, 1, 26, 15, 9, 13, 2, 13, 1, 13, 4, 13, 5, 37, 16, 2, 0, 2, 13, 1, + 13, 4, 13, 5, 37, 16, 11, 10, 13, 2, 26, 13, 4, 13, 5, 34, 54, 86, 13, 2, + 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 11, 2, 0, 0, 0, 4,111, 98,106, 0, + 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 5,115,101,108, +102, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 66,111,120, 69,108,101,109, +101,110,116, 0, 2, 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, + 2,105, 0, 2, 0, 0, 0, 2,110, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 89, + 69, 83, 0, 2, 0, 0, 0, 8,105,117,112,102,105,108,108, 0, 2, 0, 0, 0, + 10, 73,117,112, 65,112,112,101,110,100, 0, 2, 0, 0, 0, 11, 73, 85, 80, 95, +112, 97,114,101,110,116, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, 0, + 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 66,111,120, 69,108,101,109,101,110, +116, 0, 4, 0, 0, 1,133, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14,105,117,112, 67, +114,101, 97,116,101, 72, 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,104, 98, +111,120, 0, 4, 0, 0, 1,137, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, + 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,104, 98, +111,120, 0, 2, 0, 0, 0, 7,101,100,104, 98,111,120, 0, 4, 0, 0, 1,143, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 19, 4, 1, 13, 0, 11, 1, 15, 2, 26, 15, 3, 20, + 4, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 2, +111, 0, 2, 0, 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, 8, 73, + 85, 80, 95, 89, 69, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 72, 66, 79, 88, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 8,101,100,102,105,101,108,100, 0, 4, 0, 0, 1,149, 0, 0, 0, 20, 64, +105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, + 0, 0,123, 7, 1, 4, 1, 15, 3, 13, 0, 18, 4, 2, 1, 1, 46, 9, 15, 5, + 13, 0, 18, 4, 2, 1, 1, 52, 19, 15, 6, 22, 1, 11, 7, 13, 0, 18, 4, 30, + 0, 2, 1, 1, 23, 1, 50, 7, 15, 8, 11, 9, 2, 0, 1, 13, 0, 18, 10, 52, + 19, 15, 11, 22, 1, 11, 10, 13, 0, 18, 10, 30, 0, 2, 1, 1, 23, 2, 50, 17, + 15, 11, 22, 1, 11, 10, 13, 0, 18, 12, 30, 0, 2, 1, 1, 23, 2, 13, 2, 48, + 2, 13, 1, 52, 16, 15, 13, 22, 2, 13, 1, 13, 2, 29, 0, 2, 3, 3, 1, 50, + 4, 4, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 2,102, + 0, 2, 0, 0, 0, 2,108, 0, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 7,112,114,111, +109,112,116, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,110,117,109, 98,101,114, + 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 2, 0, 0, 0, 6, +116,105,116,108,101, 0, 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, + 0, 55,112, 97,114, 97,109,101,116,101,114, 32,112,114,111,109,112,116, 32,104, + 97,115, 32,119,114,111,110,103, 32,118, 97,108,117,101, 32,111,114, 32,105,115, + 32,110,111,116, 32,105,110,105,116,105, 97,108,105,122,101,100, 0, 2, 0, 0, + 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 8,105,117,112,116,101,120,116, + 0, 2, 0, 0, 0, 7,110,118, 97,108,117,101, 0, 2, 0, 0, 0, 7,101,100, +104, 98,111,120, 0, 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 4, 0, + 0, 1,172, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116, +101, 86, 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,118, 98,111,120, 0, 4, + 0, 0, 1,176, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,118, 98,111,120, 0, 2, + 0, 0, 0, 7,101,100,118, 98,111,120, 0, 4, 0, 0, 1,182, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0, 19, 4, 1, 13, 0, 11, 1, 15, 2, 26, 15, 3, 20, 4, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 7,102,105,108,108,101,100, 0, 2, 0, 0, 0, 8, 73, 85, 80, 95, 89, + 69, 83, 0, 2, 0, 0, 0, 8, 73, 85, 80, 86, 66, 79, 88, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 8, 73, 85, + 80, 90, 66, 79, 88, 0, 4, 0, 0, 1,191, 0, 0, 0, 20, 64,105,117,112,108, +117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, + 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 14, +105,117,112, 67,114,101, 97,116,101, 90, 98,111,120, 0, 2, 0, 0, 0, 8,105, +117,112,122, 98,111,120, 0, 4, 0, 0, 1,195, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 44, + 6, 1, 15, 2, 20, 3, 13, 0, 2, 1, 2, 7, 1, 50, 17, 15, 5, 13, 1, 13, + 2, 16, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 13, 0, 13, 2, 16, 54, 24, 13, + 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 8, 73, 85, + 80, 90, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116, +111,114, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 11,105,117,112, 83,101, +116, 78, 97,109,101, 0, 2, 0, 0, 0, 5,122, 98,111,120, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 70, 73, 76, 76, 0, 4, 0, 0, 1,210, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, + 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116, +101, 70,105,108,108, 0, 2, 0, 0, 0, 8,105,117,112,102,105,108,108, 0, 4, + 0, 0, 1,214, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 8, 73, 85, 80, 70, 73, 76, 76, 0, 2, 0, 0, 0, 12, 67,111,110, +115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,102,105,108,108, 0, 2, + 0, 0, 0, 10, 73, 85, 80, 66, 85, 84, 84, 79, 78, 0, 2, 0, 0, 0, 5,116, +121,112,101, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, 2, 0, 0, 0, 12, +116,121,112,101, 95,115,116,114,105,110,103, 0, 4, 0, 0, 1,223, 0, 0, 0, + 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, + 0, 0, 0, 0, 32, 5, 2, 13, 1, 18, 1, 44, 48, 4, 13, 1, 18, 2, 52, 7, + 13, 1, 11, 1, 11, 3, 26, 15, 4, 13, 1, 18, 1, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 6,116, +105,116,108,101, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 2, 0, 0, 0, + 1, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 66,117,116,116, +111,110, 0, 2, 0, 0, 0, 10,105,117,112, 98,117,116,116,111,110, 0, 4, 0, + 0, 1,230, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 10, 73, 85, 80, 66, 85, 84, 84, 79, 78, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7, 98,117,116,116,111, +110, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 4, 0, 0, 1,239, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117, +112, 67,114,101, 97,116,101, 84,101,120,116, 0, 2, 0, 0, 0, 8,105,117,112, +116,101,120,116, 0, 4, 0, 0, 1,243, 0, 0, 0, 20, 64,105,117,112,108,117, + 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, + 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, + 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 2, 0, + 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5, +116,101,120,116, 0, 2, 0, 0, 0, 13, 73, 85, 80, 77, 85, 76, 84, 73, 76, 73, + 78, 69, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 69, 88, 84, 0, 4, 0, 0, 1, +252, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 19,105, +117,112, 67,114,101, 97,116,101, 77,117,108,116,105, 76,105,110,101, 0, 2, 0, + 0, 0, 13,105,117,112,109,117,108,116,105,108,105,110,101, 0, 4, 0, 0, 2, + 0, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, + 13, 73, 85, 80, 77, 85, 76, 84, 73, 76, 73, 78, 69, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,109,117,108,116, +105,108,105,110,101, 0, 2, 0, 0, 0, 9, 73, 85, 80, 76, 65, 66, 69, 76, 0, + 2, 0, 0, 0, 6,116,105,116,108,101, 0, 4, 0, 0, 2, 9, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0, 32, 5, 2, 13, 1, 18, 1, 44, 48, 4, 13, 1, 18, 2, 52, 7, 13, + 1, 11, 1, 11, 3, 26, 15, 4, 13, 1, 18, 1, 3, 2, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 6,116,105, +116,108,101, 0, 2, 0, 0, 0, 6,105,109, 97,103,101, 0, 2, 0, 0, 0, 1, + 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 76, 97, 98,101,108, + 0, 2, 0, 0, 0, 9,105,117,112,108, 97, 98,101,108, 0, 4, 0, 0, 2, 16, + 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46, +108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, + 73, 85, 80, 76, 65, 66, 69, 76, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 6,108, 97, 98,101,108, 0, 2, 0, 0, + 0, 10, 73, 85, 80, 84, 79, 71, 71, 76, 69, 0, 2, 0, 0, 0, 10, 73, 85, 80, + 66, 85, 84, 84, 79, 78, 0, 4, 0, 0, 2, 25, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, + 4, 2, 15, 1, 13, 1, 18, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, + 97,116,101, 84,111,103,103,108,101, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 2, 0, 0, 0, 10,105,117,112,116,111,103,103,108,101, 0, 4, 0, 0, 2, + 29, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, + 10, 73, 85, 80, 84, 79, 71, 71, 76, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7,116,111,103,103,108,101, 0, + 2, 0, 0, 0, 8, 73, 85, 80, 73, 84, 69, 77, 0, 4, 0, 0, 2, 38, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 2, 15, 1, 13, 1, 18, 2, 3, 2, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14, +105,117,112, 67,114,101, 97,116,101, 73,116,101,109, 0, 2, 0, 0, 0, 6,116, +105,116,108,101, 0, 2, 0, 0, 0, 8,105,117,112,105,116,101,109, 0, 4, 0, + 0, 2, 42, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 8, 73, 85, 80, 73, 84, 69, 77, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,105,116,101,109, 0, 2, 0, + 0, 0, 11, 73, 85, 80, 83, 85, 66, 77, 69, 78, 85, 0, 2, 0, 0, 0, 10,116, +121,112,101, 95,109,101,110,117, 0, 2, 0, 0, 0, 6,116,105,116,108,101, 0, + 4, 0, 0, 2, 51, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 31, 6, 2, 15, 2, 13, 1, 18, + 3, 13, 1, 7, 1, 16, 2, 1, 2, 13, 1, 7, 1, 16, 11, 4, 13, 2, 26, 13, + 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 2,104, 0, 2, 0, 0, 0, 17,105,117,112, 67,114,101, 97, +116,101, 83,117, 98,109,101,110,117, 0, 2, 0, 0, 0, 6,116,105,116,108,101, + 0, 2, 0, 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, + 0, 11,105,117,112,115,117, 98,109,101,110,117, 0, 4, 0, 0, 2, 57, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 83, 85, 66, 77, 69, 78, 85, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 8,115,117, 98,109,101,110,117, 0, 2, + 0, 0, 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 4, 0, 0, + 2, 66, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 19, +105,117,112, 67,114,101, 97,116,101, 83,101,112, 97,114, 97,116,111,114, 0, 2, + 0, 0, 0, 13,105,117,112,115,101,112, 97,114, 97,116,111,114, 0, 4, 0, 0, + 2, 70, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, + 0, 13, 73, 85, 80, 83, 69, 80, 65, 82, 65, 84, 79, 82, 0, 2, 0, 0, 0, 12, + 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,115,101,112, + 97,114, 97,116,111,114, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 73, 76, 69, 68, + 76, 71, 0, 4, 0, 0, 2, 79, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, + 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, + 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117,112, + 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, 2, + 83, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 2, 0, 0, 0, 17,105,117,112, 67,114,101, 97,116,101, 70, +105,108,101, 68,108,103, 0, 2, 0, 0, 0, 11,105,117,112,102,105,108,101,100, +108,103, 0, 4, 0, 0, 2, 87, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, + 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 73, 76, 69, 68, 76, 71, 0, 2, + 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, + 8,102,105,108,101,100,108,103, 0, 2, 0, 0, 0, 14, 73, 85, 80, 77, 69, 83, + 83, 65, 71, 69, 68, 76, 71, 0, 4, 0, 0, 2, 96, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 2, 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, + 0, 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, + 0, 4, 0, 0, 2,100, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 20,105,117,112, 67,114, +101, 97,116,101, 77,101,115,115, 97,103,101, 68,108,103, 0, 2, 0, 0, 0, 14, +105,117,112,109,101,115,115, 97,103,101,100,108,103, 0, 4, 0, 0, 2,104, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 14, 73, + 85, 80, 77, 69, 83, 83, 65, 71, 69, 68, 76, 71, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 11,109,101,115,115, 97, +103,101,100,108,103, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 68, + 76, 71, 0, 4, 0, 0, 2,113, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 14, 7, 3, 15, 2, + 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, + 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, 0, 0, 9, 73,117,112, + 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, 2, +117, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 2, 0, 0, 0, 18,105,117,112, 67,114,101, 97,116,101, 67, +111,108,111,114, 68,108,103, 0, 2, 0, 0, 0, 12,105,117,112, 99,111,108,111, +114,100,108,103, 0, 4, 0, 0, 2,121, 0, 0, 0, 20, 64,105,117,112,108,117, + 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, + 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, + 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 67, 79, 76, 79, 82, 68, 76, + 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 9, 99,111,108,111,114,100,108,103, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 70, 79, 78, 84, 68, 76, 71, 0, 4, 0, 0, 2,130, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 14, 7, 3, 15, 2, 13, 0, 13, 1, 13, 2, 3, 3, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 2, 0, 0, 0, 2,120, 0, 2, 0, 0, 0, 2,121, 0, 2, 0, + 0, 0, 9, 73,117,112, 80,111,112,117,112, 0, 2, 0, 0, 0, 5,115,101,108, +102, 0, 4, 0, 0, 2,134, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119, +105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 2, 1, 15, 0, 3, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 17,105,117,112, 67, +114,101, 97,116,101, 70,111,110,116, 68,108,103, 0, 2, 0, 0, 0, 11,105,117, +112,102,111,110,116,100,108,103, 0, 4, 0, 0, 2,138, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 70, 79, 78, + 84, 68, 76, 71, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 8,102,111,110,116,100,108,103, 0, 2, 0, 0, 0, 8, + 73, 85, 80, 85, 83, 69, 82, 0, 4, 0, 0, 2,147, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, + 0, 14,105,117,112, 67,114,101, 97,116,101, 85,115,101,114, 0, 2, 0, 0, 0, + 8,105,117,112,117,115,101,114, 0, 4, 0, 0, 2,151, 0, 0, 0, 20, 64,105, +117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, + 0, 10, 2, 0, 15, 0, 20, 1, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 0, 0, 0, 8, 73, 85, 80, 85, 83, 69, 82, 0, 2, 0, 0, 0, 12, 67,111, +110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 5,117,115,101,114, 0, + 2, 0, 0, 0, 14, 73, 85, 80, 78, 79, 82, 77, 65, 76, 73, 90, 69, 82, 0, 4, + 0, 0, 2,160, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 47, 6, 2, 7, 1, 50, 33, 15, 2, + 13, 1, 13, 2, 16, 2, 1, 1, 44, 52, 13, 15, 3, 11, 4, 13, 2, 42, 11, 5, + 42, 2, 0, 1, 13, 2, 7, 1, 37, 23, 2, 13, 1, 13, 2, 16, 54, 40, 0, 0, + 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 2,105, 0, 2, 0, 0, 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, + 2, 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 11,112, 97,114, 97, +109,101,116,101,114, 32, 0, 2, 0, 0, 0, 39, 32,104, 97,115, 32,119,114,111, +110,103, 32,118, 97,108,117,101, 32,111,114, 32,105,115, 32,110,111,116, 32,105, +110,105,116,105, 97,108,105,122,101,100, 0, 4, 0, 0, 2,170, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0, 40, 8, 2, 15, 2, 2, 1, 0, 7, 1, 50, 17, 13, 2, 11, 4, 13, + 1, 13, 3, 16, 26, 13, 3, 7, 1, 37, 23, 3, 13, 1, 13, 3, 16, 54, 24, 13, + 2, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 20,105,117, +112, 67,114,101, 97,116,101, 78,111,114,109, 97,108,105,122,101,114, 0, 2, 0, + 0, 0, 2,105, 0, 2, 0, 0, 0, 11, 97,100,100, 99,111,110,116,114,111,108, + 0, 2, 0, 0, 0, 14,105,117,112,110,111,114,109, 97,108,105,122,101,114, 0, + 4, 0, 0, 2,180, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 10, 2, 0, 15, 0, 20, 1, 3, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 14, 73, 85, 80, 78, + 79, 82, 77, 65, 76, 73, 90, 69, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115,116, +114,117, 99,116,111,114, 0, 2, 0, 0, 0, 11,110,111,114,109, 97,108,105,122, +101,114, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, 2, 0, 0, + 0, 12,116,121,112,101, 95,119,105,100,103,101,116, 0, 4, 0, 0, 2,189, 0, + 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108, +117, 97, 0, 0, 0, 0, 27, 6, 2, 15, 2, 13, 1, 7, 1, 16, 2, 1, 1, 13, + 1, 7, 1, 16, 11, 3, 13, 2, 26, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 2,104, 0, 2, 0, + 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 70,114, 97,109,101, 0, 2, 0, + 0, 0, 11, 73, 85, 80, 95,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 9,105, +117,112,102,114, 97,109,101, 0, 4, 0, 0, 2,195, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, + 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 6,102,114, 97,109,101, 0, 2, 0, 0, 0, 10, 73, 85, 80, 67, 65, + 78, 86, 65, 83, 0, 4, 0, 0, 2,204, 0, 0, 0, 20, 64,105,117,112,108,117, + 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, + 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 67, 97,110, +118, 97,115, 0, 2, 0, 0, 0, 10,105,117,112, 99, 97,110,118, 97,115, 0, 4, + 0, 0, 2,208, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, + 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, + 0, 0, 0, 10, 73, 85, 80, 67, 65, 78, 86, 65, 83, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 7, 99, 97,110,118, + 97,115, 0, 2, 0, 0, 0, 8, 73, 85, 80, 76, 73, 83, 84, 0, 4, 0, 0, 2, +217, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, + 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105, +117,112, 67,114,101, 97,116,101, 76,105,115,116, 0, 4, 0, 0, 2,221, 0, 0, + 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, + 97, 0, 0, 0, 0, 42, 6, 2, 15, 1, 13, 1, 2, 1, 1, 11, 2, 32, 52, 16, + 15, 3, 13, 0, 18, 5, 11, 6, 13, 1, 42, 3, 2, 2, 50, 11, 15, 7, 18, 8, + 13, 0, 13, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, + 6,105,110,100,101,120, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, + 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, + 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 1, 0, 2, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 4,103,101,116, 0, 4, + 0, 0, 2,229, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103, +101,116,115, 46,108,117, 97, 0, 0, 0, 0, 90, 8, 3, 15, 2, 13, 1, 2, 1, + 1, 11, 3, 32, 52, 62, 15, 4, 13, 2, 2, 1, 1, 46, 7, 15, 5, 13, 2, 2, + 1, 1, 52, 21, 15, 6, 13, 0, 18, 8, 11, 9, 13, 1, 42, 11, 9, 13, 2, 42, + 3, 3, 3, 50, 23, 13, 2, 4, 0, 32, 52, 16, 15, 6, 13, 0, 18, 8, 11, 9, + 13, 1, 42, 13, 2, 3, 3, 3, 15, 10, 18, 11, 13, 0, 13, 1, 13, 2, 3, 3, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 6,105,110,100,101,120, + 0, 2, 0, 0, 0, 6,118, 97,108,117,101, 0, 2, 0, 0, 0, 5,116,121,112, +101, 0, 2, 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 12,116, +121,112,101, 95,115,116,114,105,110,103, 0, 2, 0, 0, 0, 12,116,121,112,101, + 95,110,117,109, 98,101,114, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, 65, +116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, + 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, + 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 4,115,101,116, 0, 2, 0, + 0, 0, 8,105,117,112,108,105,115,116, 0, 4, 0, 0, 2,240, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 76, + 73, 83, 84, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, + 0, 2, 0, 0, 0, 5,108,105,115,116, 0, 2, 0, 0, 0, 9, 73, 85, 80, 73, + 77, 65, 71, 69, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, + 2,249, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116, +115, 46,108,117, 97, 0, 0, 0, 0,116, 8, 2, 7, 1, 50, 92, 7, 1, 50, 32, + 15, 3, 13, 1, 13, 2, 16, 13, 3, 16, 2, 1, 1, 11, 4, 31, 52, 7, 15, 5, + 11, 6, 2, 0, 1, 13, 3, 7, 1, 37, 23, 3, 13, 1, 13, 2, 16, 13, 3, 16, + 54, 42, 13, 1, 18, 7, 48, 10, 13, 3, 7, 1, 38, 13, 1, 18, 7, 31, 52, 9, + 15, 5, 11, 8, 2, 0, 1, 50, 10, 13, 1, 11, 7, 13, 3, 7, 1, 38, 26, 13, + 2, 7, 1, 37, 23, 2, 5, 1, 13, 1, 13, 2, 16, 54, 99, 13, 1, 11, 9, 13, + 2, 7, 1, 38, 26, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 0, 0, 0, 4,111, + 98,106, 0, 2, 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 2,106, 0, 2, 0, 0, + 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 7,110,117,109, 98,101,114, 0, 2, + 0, 0, 0, 6,101,114,114,111,114, 0, 2, 0, 0, 0, 38,110,111,110, 45,110, +117,109,101,114,105, 99, 32,118, 97,108,117,101, 32,105,110, 32,105,109, 97,103, +101, 32,100,101,102,105,110,105,116,105,111,110, 0, 2, 0, 0, 0, 6,119,105, +100,116,104, 0, 2, 0, 0, 0, 26,105,110, 99,111,110,115,105,115,116,101,110, +116, 32,105,109, 97,103,101, 32,108,101,110,103,104,116, 0, 2, 0, 0, 0, 7, +104,101,105,103,104,116, 0, 4, 0, 0, 3, 16, 0, 0, 0, 20, 64,105,117,112, +108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 74, + 9, 2, 15, 2, 13, 1, 18, 3, 13, 1, 18, 4, 13, 1, 2, 1, 3, 15, 5, 13, + 1, 18, 6, 2, 1, 1, 11, 7, 32, 52, 38, 7, 1, 50, 23, 15, 9, 13, 2, 13, + 3, 13, 1, 18, 6, 13, 3, 16, 2, 0, 3, 13, 3, 7, 1, 37, 23, 3, 13, 1, + 18, 6, 13, 3, 16, 54, 32, 5, 1, 13, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 10, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 7,104, 97,110,100, +108,101, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, 73,109, 97, +103,101, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, 0, 7,104, +101,105,103,104,116, 0, 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, + 7, 99,111,108,111,114,115, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, 2, + 0, 0, 0, 2,105, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, 65,116,116, +114,105, 98,117,116,101, 0, 2, 0, 0, 0, 9,105,117,112,105,109, 97,103,101, + 0, 4, 0, 0, 3, 28, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105, +100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, + 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, + 0, 2, 0, 0, 0, 9, 73, 85, 80, 73, 77, 65, 71, 69, 0, 2, 0, 0, 0, 12, + 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 6,105,109, 97, +103,101, 0, 2, 0, 0, 0, 12, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, 0, + 4, 0, 0, 3, 36, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100, +103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 20, 6, 2, 15, 1, 13, 1, 18, + 2, 13, 1, 18, 3, 13, 1, 18, 4, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 18,105,117,112, 67,114, +101, 97,116,101, 73,109, 97,103,101, 82, 71, 66, 0, 2, 0, 0, 0, 6,119,105, +100,116,104, 0, 2, 0, 0, 0, 7,104,101,105,103,104,116, 0, 2, 0, 0, 0, + 7,112,105,120,101,108,115, 0, 2, 0, 0, 0, 12,105,117,112,105,109, 97,103, +101,114,103, 98, 0, 4, 0, 0, 3, 40, 0, 0, 0, 20, 64,105,117,112,108,117, + 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, + 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, + 0, 0, 2,111, 0, 2, 0, 0, 0, 12, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, + 66, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 9,105,109, 97,103,101,114,103, 98, 0, 2, 0, 0, 0, 13, 73, 85, + 80, 73, 77, 65, 71, 69, 82, 71, 66, 65, 0, 4, 0, 0, 3, 48, 0, 0, 0, 20, + 64,105,117,112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, + 0, 0, 0, 20, 6, 2, 15, 1, 13, 1, 18, 2, 13, 1, 18, 3, 13, 1, 18, 4, + 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 0, 4,111, 98,106, + 0, 2, 0, 0, 0, 19,105,117,112, 67,114,101, 97,116,101, 73,109, 97,103,101, + 82, 71, 66, 65, 0, 2, 0, 0, 0, 6,119,105,100,116,104, 0, 2, 0, 0, 0, + 7,104,101,105,103,104,116, 0, 2, 0, 0, 0, 7,112,105,120,101,108,115, 0, + 2, 0, 0, 0, 13,105,117,112,105,109, 97,103,101,114,103, 98, 97, 0, 4, 0, + 0, 3, 52, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95,119,105,100,103,101, +116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 13, 73, 85, 80, 73, 77, 65, 71, 69, 82, 71, 66, 65, 0, 2, 0, 0, 0, + 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 10,105,109, + 97,103,101,114,103, 98, 97, 0, 2, 0, 0, 0, 15, 73, 85, 80, 80, 82, 79, 71, + 82, 69, 83, 83, 66, 65, 82, 0, 4, 0, 0, 3, 61, 0, 0, 0, 20, 64,105,117, +112,108,117, 97, 95,119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, + 8, 2, 1, 15, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, + 0, 21,105,117,112, 67,114,101, 97,116,101, 80,114,111,103,114,101,115,115, 66, + 97,114, 0, 2, 0, 0, 0, 15,105,117,112,112,114,111,103,114,101,115,115, 98, + 97,114, 0, 4, 0, 0, 3, 65, 0, 0, 0, 20, 64,105,117,112,108,117, 97, 95, +119,105,100,103,101,116,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, + 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, + 2,111, 0, 2, 0, 0, 0, 15, 73, 85, 80, 80, 82, 79, 71, 82, 69, 83, 83, 66, + 65, 82, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 12,112,114,111,103,114,101,115,115, 98, 97,114, 0, 2, 0, 0, + 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, + 7, 97, 99,116,105,111,110, 0, 2, 0, 0, 0, 7, 65, 67, 84, 73, 79, 78, 0, + 2, 0, 0, 0, 9, 97, 99,116,105,111,110, 99, 98, 0, 2, 0, 0, 0, 10, 65, + 67, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 9,103,101,116,102,111, 99, +117,115, 0, 2, 0, 0, 0, 12, 71, 69, 84, 70, 79, 67, 85, 83, 95, 67, 66, 0, + 2, 0, 0, 0, 16,105,117,112, 95,103,101,116,102,111, 99,117,115, 95, 99, 98, + 0, 2, 0, 0, 0, 10,107,105,108,108,102,111, 99,117,115, 0, 2, 0, 0, 0, + 13, 75, 73, 76, 76, 70, 79, 67, 85, 83, 95, 67, 66, 0, 2, 0, 0, 0, 17,105, +117,112, 95,107,105,108,108,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, 0, + 6,102,111, 99,117,115, 0, 2, 0, 0, 0, 9, 70, 79, 67, 85, 83, 95, 67, 66, + 0, 2, 0, 0, 0, 13,105,117,112, 95,102,111, 99,117,115, 95, 99, 98, 0, 2, + 0, 0, 0, 6,107, 95, 97,110,121, 0, 2, 0, 0, 0, 6, 75, 95, 65, 78, 89, + 0, 2, 0, 0, 0, 10,105,117,112, 95,107, 95, 97,110,121, 0, 2, 0, 0, 0, + 5,104,101,108,112, 0, 2, 0, 0, 0, 8, 72, 69, 76, 80, 95, 67, 66, 0, 2, + 0, 0, 0, 12,105,117,112, 95,104,101,108,112, 95, 99, 98, 0, 2, 0, 0, 0, + 8, 99, 97,114,101,116, 99, 98, 0, 2, 0, 0, 0, 9, 67, 65, 82, 69, 84, 95, + 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95, 99, 97,114,101,116, 95, 99, 98, + 0, 2, 0, 0, 0, 9,107,101,121,112,114,101,115,115, 0, 2, 0, 0, 0, 12, + 75, 69, 89, 80, 82, 69, 83, 83, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, + 95,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, 0, 7,115, 99, +114,111,108,108, 0, 2, 0, 0, 0, 10, 83, 67, 82, 79, 76, 76, 95, 67, 66, 0, + 2, 0, 0, 0, 14,105,117,112, 95,115, 99,114,111,108,108, 95, 99, 98, 0, 2, + 0, 0, 0, 10,116,114, 97,121, 99,108,105, 99,107, 0, 2, 0, 0, 0, 13, 84, + 82, 65, 89, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, + 95,116,114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 6, 99, +108,111,115,101, 0, 2, 0, 0, 0, 9, 67, 76, 79, 83, 69, 95, 67, 66, 0, 2, + 0, 0, 0, 13,105,117,112, 95, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, + 0, 5,111,112,101,110, 0, 2, 0, 0, 0, 8, 79, 80, 69, 78, 95, 67, 66, 0, + 2, 0, 0, 0, 12,105,117,112, 95,111,112,101,110, 95, 99, 98, 0, 2, 0, 0, + 0, 7,115,104,111,119, 99, 98, 0, 2, 0, 0, 0, 8, 83, 72, 79, 87, 95, 67, + 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,115,104,111,119, 95, 99, 98, 0, 2, + 0, 0, 0, 6,109, 97,112, 99, 98, 0, 2, 0, 0, 0, 7, 77, 65, 80, 95, 67, + 66, 0, 2, 0, 0, 0, 11,105,117,112, 95,109, 97,112, 95, 99, 98, 0, 2, 0, + 0, 0, 8,117,110,109, 97,112, 99, 98, 0, 2, 0, 0, 0, 9, 85, 78, 77, 65, + 80, 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95,117,110,109, 97,112, 95, + 99, 98, 0, 2, 0, 0, 0, 10,100,114,111,112,102,105,108,101,115, 0, 2, 0, + 0, 0, 13, 68, 82, 79, 80, 70, 73, 76, 69, 83, 95, 67, 66, 0, 2, 0, 0, 0, + 17,105,117,112, 95,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 2, 0, + 0, 0, 10,109,101,110,117, 99,108,111,115,101, 0, 2, 0, 0, 0, 13, 77, 69, + 78, 85, 67, 76, 79, 83, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95, +109,101,110,117, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 10,104,105, +103,104,108,105,103,104,116, 0, 2, 0, 0, 0, 13, 72, 73, 71, 72, 76, 73, 71, + 72, 84, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,104,105,103,104,108, +105,103,104,116, 95, 99, 98, 0, 2, 0, 0, 0, 4,119,111,109, 0, 2, 0, 0, + 0, 7, 87, 79, 77, 95, 67, 66, 0, 2, 0, 0, 0, 11,105,117,112, 95,119,111, +109, 95, 99, 98, 0, 2, 0, 0, 0, 6,119,104,101,101,108, 0, 2, 0, 0, 0, + 9, 87, 72, 69, 69, 76, 95, 67, 66, 0, 2, 0, 0, 0, 13,105,117,112, 95,119, +104,101,101,108, 95, 99, 98, 0, 2, 0, 0, 0, 10, 66, 85, 84, 84, 79, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95, 98,117,116,116,111,110, 95, 99, + 98, 0, 2, 0, 0, 0, 7,114,101,115,105,122,101, 0, 2, 0, 0, 0, 10, 82, + 69, 83, 73, 90, 69, 95, 67, 66, 0, 2, 0, 0, 0, 14,105,117,112, 95,114,101, +115,105,122,101, 95, 99, 98, 0, 2, 0, 0, 0, 7,109,111,116,105,111,110, 0, + 2, 0, 0, 0, 10, 77, 79, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 14, +105,117,112, 95,109,111,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 12,101, +110,116,101,114,119,105,110,100,111,119, 0, 2, 0, 0, 0, 15, 69, 78, 84, 69, + 82, 87, 73, 78, 68, 79, 87, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95, +101,110,116,101,114,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, 12, +108,101, 97,118,101,119,105,110,100,111,119, 0, 2, 0, 0, 0, 15, 76, 69, 65, + 86, 69, 87, 73, 78, 68, 79, 87, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, + 95,108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, + 5,101,100,105,116, 0, 2, 0, 0, 0, 8, 69, 68, 73, 84, 95, 67, 66, 0, 2, + 0, 0, 0, 12,105,117,112, 95,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, 0, + 12,109,117,108,116,105,115,101,108,101, 99,116, 0, 2, 0, 0, 0, 15, 77, 85, + 76, 84, 73, 83, 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117, +112, 95,109,117,108,116,105,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, + 0, 7,102,105,108,101, 99, 98, 0, 2, 0, 0, 0, 8, 70, 73, 76, 69, 95, 67, + 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,102,105,108,101, 95, 99, 98, 0, 2, + 0, 0, 0, 14,109,100,105, 97, 99,116,105,118, 97,116,101, 99, 98, 0, 2, 0, + 0, 0, 15, 77, 68, 73, 65, 67, 84, 73, 86, 65, 84, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 19,105,117,112, 95,109,100,105, 97, 99,116,105,118, 97,116,101, 95, 99, + 98, 0, 2, 0, 0, 0, 11,100,114,111,112,100,111,119,110, 99, 98, 0, 2, 0, + 0, 0, 12, 68, 82, 79, 80, 68, 79, 87, 78, 95, 67, 66, 0, 2, 0, 0, 0, 16, +105,117,112, 95,100,114,111,112,100,111,119,110, 95, 99, 98, 0, 2, 0, 0, 0, + 11,100, 98,108, 99,108,105, 99,107, 99, 98, 0, 2, 0, 0, 0, 12, 68, 66, 76, + 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,100, 98, +108, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 18,105,117,112, 95, 97, + 99,116,105,111,110, 95,116,111,103,103,108,101, 0, 2, 0, 0, 0, 16,105,117, +112, 95, 97, 99,116,105,111,110, 95,116,101,120,116, 0, 2, 0, 0, 0, 18,105, +117,112, 95, 97, 99,116,105,111,110, 95, 98,117,116,116,111,110, 0, 2, 0, 0, + 0, 16,105,117,112, 95, 97, 99,116,105,111,110, 95,108,105,115,116, 0, 2, 0, + 0, 0, 18,105,117,112, 95, 97, 99,116,105,111,110, 95, 99, 97,110,118, 97,115, + 0, 2, 0, 0, 0, 17,105,117,112, 95, 97, 99,116,105,111,110, 95,116,105,109, +101,114, 0, 2, 0, 0, 0, 10, 97, 99,116,105,111,110, 95, 99, 98, 0, 2, 0, + 0, 0, 12,103,101,116,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, 0, 13, +107,105,108,108,102,111, 99,117,115, 95, 99, 98, 0, 2, 0, 0, 0, 9,102,111, + 99,117,115, 95, 99, 98, 0, 2, 0, 0, 0, 8,104,101,108,112, 95, 99, 98, 0, + 2, 0, 0, 0, 9, 99, 97,114,101,116, 95, 99, 98, 0, 2, 0, 0, 0, 12,107, +101,121,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, 0, 10,115, 99,114,111, +108,108, 95, 99, 98, 0, 2, 0, 0, 0, 13,116,114, 97,121, 99,108,105, 99,107, + 95, 99, 98, 0, 2, 0, 0, 0, 9, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, + 0, 0, 8,111,112,101,110, 95, 99, 98, 0, 2, 0, 0, 0, 8,115,104,111,119, + 95, 99, 98, 0, 2, 0, 0, 0, 7,109, 97,112, 95, 99, 98, 0, 2, 0, 0, 0, + 9,117,110,109, 97,112, 95, 99, 98, 0, 2, 0, 0, 0, 13,100,114,111,112,102, +105,108,101,115, 95, 99, 98, 0, 2, 0, 0, 0, 13,109,101,110,117, 99,108,111, +115,101, 95, 99, 98, 0, 2, 0, 0, 0, 13,104,105,103,104,108,105,103,104,116, + 95, 99, 98, 0, 2, 0, 0, 0, 7,119,111,109, 95, 99, 98, 0, 2, 0, 0, 0, + 9,119,104,101,101,108, 95, 99, 98, 0, 2, 0, 0, 0, 10, 98,117,116,116,111, +110, 95, 99, 98, 0, 2, 0, 0, 0, 10,114,101,115,105,122,101, 95, 99, 98, 0, + 2, 0, 0, 0, 10,109,111,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 15, +101,110,116,101,114,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, 15, +108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 2, 0, 0, 0, 8, +101,100,105,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,117,108,116,105,115,101, +108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,100,105, 97, 99,116,105, +118, 97,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,102,105,108,101, 95, 99, 98, + 0, 2, 0, 0, 0, 12,100,114,111,112,100,111,119,110, 95, 99, 98, 0, 2, 0, + 0, 0, 12,100, 98,108, 99,108,105, 99,107, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/iuplua_widgets_le64w.lo"); +} diff --git a/iup/srclua3/loh/matrix.loh b/iup/srclua3/loh/matrix.loh new file mode 100755 index 0000000..3f8ee52 --- /dev/null +++ b/iup/srclua3/loh/matrix.loh @@ -0,0 +1,120 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/matrix.lo"); +*/ +/* ../obj/iupluacontrols3/matrix.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64,109, 97,116,114,105, +120, 46,108,117, 97, 0, 0, 0, 1,162, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, + 25, 0, 15, 0, 11, 3, 11, 4, 26, 15, 0, 11, 5, 11, 6, 26, 15, 0, 11, 7, + 11, 8, 26, 11, 10, 25, 9, 15, 11, 11, 12, 15, 9, 26, 15, 13, 18, 14, 11, 12, + 15, 15, 26, 15, 13, 18, 16, 11, 12, 15, 17, 26, 15, 13, 11, 18, 22, 2, 11, 19, + 15, 20, 29, 0, 2, 26, 15, 13, 11, 21, 22, 2, 11, 22, 15, 23, 29, 0, 2, 26, + 15, 13, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 13, 11, 27, 22, 2, + 11, 28, 15, 29, 29, 0, 2, 26, 15, 13, 11, 30, 22, 2, 11, 31, 15, 32, 29, 0, + 2, 26, 15, 13, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, 13, 11, 36, + 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 13, 11, 39, 22, 2, 11, 40, 15, 41, + 29, 0, 2, 26, 15, 13, 11, 42, 22, 2, 11, 43, 15, 44, 29, 0, 2, 26, 15, 13, + 11, 45, 22, 2, 11, 46, 15, 47, 29, 0, 2, 26, 15, 13, 11, 48, 22, 2, 11, 49, + 15, 50, 29, 0, 2, 26, 15, 13, 11, 51, 22, 2, 11, 52, 15, 53, 29, 0, 2, 26, + 15, 13, 11, 54, 22, 2, 11, 55, 15, 56, 29, 0, 2, 26, 15, 13, 11, 57, 22, 2, + 11, 58, 15, 59, 29, 0, 2, 26, 15, 13, 11, 60, 22, 2, 11, 61, 15, 62, 29, 0, + 2, 26, 15, 13, 11, 63, 22, 2, 11, 64, 15, 65, 29, 0, 2, 26, 15, 13, 11, 66, + 22, 2, 11, 67, 15, 68, 29, 0, 2, 26, 15, 13, 11, 69, 15, 13, 18, 18, 26, 15, + 13, 11, 70, 15, 13, 18, 21, 26, 15, 13, 11, 71, 15, 13, 18, 24, 26, 15, 13, 11, + 72, 15, 13, 18, 27, 26, 15, 13, 11, 73, 15, 13, 18, 30, 26, 15, 13, 11, 74, 15, + 13, 18, 33, 26, 15, 13, 11, 75, 15, 13, 18, 36, 26, 15, 13, 11, 76, 15, 13, 18, + 39, 26, 15, 13, 11, 77, 15, 13, 18, 42, 26, 15, 13, 11, 78, 15, 13, 18, 45, 26, + 15, 13, 11, 79, 15, 13, 18, 48, 26, 15, 13, 11, 80, 15, 13, 18, 51, 26, 15, 13, + 11, 81, 15, 13, 18, 54, 26, 0, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, + 10, 73, 85, 80, 77, 65, 84, 82, 73, 88, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, + 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, + 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116, +101, 77, 97,116,114,105,120, 0, 2, 0, 0, 0, 8,115,101,116, 99,101,108,108, + 0, 4, 0, 0, 0, 7, 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, + 97, 0, 0, 0, 0, 20, 8, 4, 15, 3, 13, 0, 13, 1, 11, 5, 42, 13, 2, 42, + 13, 3, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,108, + 0, 2, 0, 0, 0, 2, 99, 0, 2, 0, 0, 0, 4,118, 97,108, 0, 2, 0, 0, + 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, + 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 2, 58, 0, 2, 0, 0, 0, 8, +103,101,116, 99,101,108,108, 0, 4, 0, 0, 0, 11, 0, 0, 0, 12, 64,109, 97, +116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 18, 8, 4, 15, 3, 13, 0, 13, + 1, 11, 5, 42, 13, 2, 42, 3, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, + 0, 0, 0, 2,108, 0, 2, 0, 0, 0, 2, 99, 0, 2, 0, 0, 0, 4,118, 97, +108, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 2, 58, 0, + 2, 0, 0, 0, 10,105,117,112,109, 97,116,114,105,120, 0, 4, 0, 0, 0, 15, + 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 12, + 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, 73, 85, 80, 77, 65, 84, 82, 73, + 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 7,109, 97,116,114,105,120, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 9, 97, 99,116,105,111,110, 99, 98, 0, 2, 0, 0, 0, 18,105,117, +112, 95,109, 97,116, 95, 97, 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, + 10,109,111,117,115,101,109,111,118,101, 0, 2, 0, 0, 0, 21,105,117,112, 95, +109, 97,116, 95,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, + 0, 8,101,100,105,116,105,111,110, 0, 2, 0, 0, 0, 11, 69, 68, 73, 84, 73, + 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95,101, +100,105,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 5,100,114,111,112, 0, + 2, 0, 0, 0, 8, 68, 82, 79, 80, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117, +112, 95,109, 97,116, 95,100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, 11,100, +114,111,112,115,101,108,101, 99,116, 0, 2, 0, 0, 0, 14, 68, 82, 79, 80, 83, + 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,109, 97, +116, 95,100,114,111,112,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, + 10,101,110,116,101,114,105,116,101,109, 0, 2, 0, 0, 0, 13, 69, 78, 84, 69, + 82, 73, 84, 69, 77, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97, +116, 95,101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 10, +108,101, 97,118,101,105,116,101,109, 0, 2, 0, 0, 0, 13, 76, 69, 65, 86, 69, + 73, 84, 69, 77, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97,116, + 95,108,101, 97,118,101,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 6, 99, +108,105, 99,107, 0, 2, 0, 0, 0, 9, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, + 0, 0, 0, 17,105,117,112, 95,109, 97,116, 95, 99,108,105, 99,107, 95, 99, 98, + 0, 2, 0, 0, 0, 10,115, 99,114,111,108,108,116,111,112, 0, 2, 0, 0, 0, + 13, 83, 67, 82, 79, 76, 76, 84, 79, 80, 95, 67, 66, 0, 2, 0, 0, 0, 21,105, +117,112, 95,109, 97,116, 95,115, 99,114,111,108,108,116,111,112, 95, 99, 98, 0, + 2, 0, 0, 0, 8,118, 97,108,117,101, 99, 98, 0, 2, 0, 0, 0, 9, 86, 65, + 76, 85, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,109, 97,116, 95, +118, 97,108,117,101, 95, 99, 98, 0, 2, 0, 0, 0, 5,100,114, 97,119, 0, 2, + 0, 0, 0, 8, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, + 95,109, 97,116, 95,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 10,100,114, +111,112, 99,104,101, 99,107, 0, 2, 0, 0, 0, 13, 68, 82, 79, 80, 67, 72, 69, + 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97,116, 95,100, +114,111,112, 99,104,101, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 10,102,103, 99, +111,108,111,114, 99, 98, 0, 2, 0, 0, 0, 11, 70, 71, 67, 79, 76, 79, 82, 95, + 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95,102,103, 99,111, +108,111,114, 95, 99, 98, 0, 2, 0, 0, 0, 10, 98,103, 99,111,108,111,114, 99, + 98, 0, 2, 0, 0, 0, 11, 66, 71, 67, 79, 76, 79, 82, 95, 67, 66, 0, 2, 0, + 0, 0, 19,105,117,112, 95,109, 97,116, 95, 98,103, 99,111,108,111,114, 95, 99, + 98, 0, 2, 0, 0, 0, 11,118, 97,108,117,101, 95,101,100,105,116, 0, 2, 0, + 0, 0, 14, 86, 65, 76, 85, 69, 95, 69, 68, 73, 84, 95, 67, 66, 0, 2, 0, 0, + 0, 22,105,117,112, 95,109, 97,116, 95,118, 97,108,117,101, 95,101,100,105,116, + 95, 99, 98, 0, 2, 0, 0, 0, 12,109, 97,114,107,101,100,105,116, 95, 99, 98, + 0, 2, 0, 0, 0, 12, 77, 65, 82, 75, 69, 68, 73, 84, 95, 67, 66, 0, 2, 0, + 0, 0, 20,105,117,112, 95,109, 97,116, 95,109, 97,114,107,101,100,105,116, 95, + 99, 98, 0, 2, 0, 0, 0, 8,109, 97,114,107, 95, 99, 98, 0, 2, 0, 0, 0, + 8, 77, 65, 82, 75, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,109, 97, +116, 95,109, 97,114,107, 95, 99, 98, 0, 2, 0, 0, 0, 9,109,111,117,115,101, + 95, 99, 98, 0, 2, 0, 0, 0, 9, 77, 79, 85, 83, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 17,105,117,112, 95,109, 97,116, 95,109,111,117,115,101, 95, 99, 98, 0, + 2, 0, 0, 0, 8,102,111,110,116, 95, 99, 98, 0, 2, 0, 0, 0, 8, 70, 79, + 78, 84, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,109, 97,116, 95,102, +111,110,116, 95, 99, 98, 0, 2, 0, 0, 0, 11,101,100,105,116,105,111,110, 95, + 99, 98, 0, 2, 0, 0, 0, 8,100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, + 14,100,114,111,112,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 13, +101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 13,108,101, + 97,118,101,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99,108,105, 99, +107, 95, 99, 98, 0, 2, 0, 0, 0, 13,115, 99,114,111,108,108,116,111,112, 95, + 99, 98, 0, 2, 0, 0, 0, 9,118, 97,108,117,101, 95, 99, 98, 0, 2, 0, 0, + 0, 8,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 13,100,114,111,112, 99, +104,101, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 11,102,103, 99,111,108,111,114, + 95, 99, 98, 0, 2, 0, 0, 0, 11, 98,103, 99,111,108,111,114, 95, 99, 98, 0, + 2, 0, 0, 0, 14,118, 97,108,117,101, 95,101,100,105,116, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/matrix.lo"); +} diff --git a/iup/srclua3/loh/matrix_be32.loh b/iup/srclua3/loh/matrix_be32.loh new file mode 100755 index 0000000..5f88a5b --- /dev/null +++ b/iup/srclua3/loh/matrix_be32.loh @@ -0,0 +1,120 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/matrix_be32.lo"); +*/ +/* ../obj/iupluacontrols3/matrix_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64,109, 97,116,114,105, +120, 46,108,117, 97, 0, 0, 0, 1,162, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, + 25, 0, 15, 0, 11, 3, 11, 4, 26, 15, 0, 11, 5, 11, 6, 26, 15, 0, 11, 7, + 11, 8, 26, 11, 10, 25, 9, 15, 11, 11, 12, 15, 9, 26, 15, 13, 18, 14, 11, 12, + 15, 15, 26, 15, 13, 18, 16, 11, 12, 15, 17, 26, 15, 13, 11, 18, 22, 2, 11, 19, + 15, 20, 29, 0, 2, 26, 15, 13, 11, 21, 22, 2, 11, 22, 15, 23, 29, 0, 2, 26, + 15, 13, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 13, 11, 27, 22, 2, + 11, 28, 15, 29, 29, 0, 2, 26, 15, 13, 11, 30, 22, 2, 11, 31, 15, 32, 29, 0, + 2, 26, 15, 13, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, 13, 11, 36, + 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 13, 11, 39, 22, 2, 11, 40, 15, 41, + 29, 0, 2, 26, 15, 13, 11, 42, 22, 2, 11, 43, 15, 44, 29, 0, 2, 26, 15, 13, + 11, 45, 22, 2, 11, 46, 15, 47, 29, 0, 2, 26, 15, 13, 11, 48, 22, 2, 11, 49, + 15, 50, 29, 0, 2, 26, 15, 13, 11, 51, 22, 2, 11, 52, 15, 53, 29, 0, 2, 26, + 15, 13, 11, 54, 22, 2, 11, 55, 15, 56, 29, 0, 2, 26, 15, 13, 11, 57, 22, 2, + 11, 58, 15, 59, 29, 0, 2, 26, 15, 13, 11, 60, 22, 2, 11, 61, 15, 62, 29, 0, + 2, 26, 15, 13, 11, 63, 22, 2, 11, 64, 15, 65, 29, 0, 2, 26, 15, 13, 11, 66, + 22, 2, 11, 67, 15, 68, 29, 0, 2, 26, 15, 13, 11, 69, 15, 13, 18, 18, 26, 15, + 13, 11, 70, 15, 13, 18, 21, 26, 15, 13, 11, 71, 15, 13, 18, 24, 26, 15, 13, 11, + 72, 15, 13, 18, 27, 26, 15, 13, 11, 73, 15, 13, 18, 30, 26, 15, 13, 11, 74, 15, + 13, 18, 33, 26, 15, 13, 11, 75, 15, 13, 18, 36, 26, 15, 13, 11, 76, 15, 13, 18, + 39, 26, 15, 13, 11, 77, 15, 13, 18, 42, 26, 15, 13, 11, 78, 15, 13, 18, 45, 26, + 15, 13, 11, 79, 15, 13, 18, 48, 26, 15, 13, 11, 80, 15, 13, 18, 51, 26, 15, 13, + 11, 81, 15, 13, 18, 54, 26, 0, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, + 10, 73, 85, 80, 77, 65, 84, 82, 73, 88, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, + 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, + 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116, +101, 77, 97,116,114,105,120, 0, 2, 0, 0, 0, 8,115,101,116, 99,101,108,108, + 0, 4, 0, 0, 0, 7, 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, + 97, 0, 0, 0, 0, 20, 8, 4, 15, 3, 13, 0, 13, 1, 11, 5, 42, 13, 2, 42, + 13, 3, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,108, + 0, 2, 0, 0, 0, 2, 99, 0, 2, 0, 0, 0, 4,118, 97,108, 0, 2, 0, 0, + 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, + 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 2, 58, 0, 2, 0, 0, 0, 8, +103,101,116, 99,101,108,108, 0, 4, 0, 0, 0, 11, 0, 0, 0, 12, 64,109, 97, +116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 18, 8, 4, 15, 3, 13, 0, 13, + 1, 11, 5, 42, 13, 2, 42, 3, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, + 0, 0, 0, 2,108, 0, 2, 0, 0, 0, 2, 99, 0, 2, 0, 0, 0, 4,118, 97, +108, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 2, 58, 0, + 2, 0, 0, 0, 10,105,117,112,109, 97,116,114,105,120, 0, 4, 0, 0, 0, 15, + 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 12, + 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, 73, 85, 80, 77, 65, 84, 82, 73, + 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 7,109, 97,116,114,105,120, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 9, 97, 99,116,105,111,110, 99, 98, 0, 2, 0, 0, 0, 18,105,117, +112, 95,109, 97,116, 95, 97, 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, + 10,109,111,117,115,101,109,111,118,101, 0, 2, 0, 0, 0, 21,105,117,112, 95, +109, 97,116, 95,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, + 0, 8,101,100,105,116,105,111,110, 0, 2, 0, 0, 0, 11, 69, 68, 73, 84, 73, + 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95,101, +100,105,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 5,100,114,111,112, 0, + 2, 0, 0, 0, 8, 68, 82, 79, 80, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117, +112, 95,109, 97,116, 95,100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, 11,100, +114,111,112,115,101,108,101, 99,116, 0, 2, 0, 0, 0, 14, 68, 82, 79, 80, 83, + 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,109, 97, +116, 95,100,114,111,112,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, + 10,101,110,116,101,114,105,116,101,109, 0, 2, 0, 0, 0, 13, 69, 78, 84, 69, + 82, 73, 84, 69, 77, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97, +116, 95,101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 10, +108,101, 97,118,101,105,116,101,109, 0, 2, 0, 0, 0, 13, 76, 69, 65, 86, 69, + 73, 84, 69, 77, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97,116, + 95,108,101, 97,118,101,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 6, 99, +108,105, 99,107, 0, 2, 0, 0, 0, 9, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, + 0, 0, 0, 17,105,117,112, 95,109, 97,116, 95, 99,108,105, 99,107, 95, 99, 98, + 0, 2, 0, 0, 0, 10,115, 99,114,111,108,108,116,111,112, 0, 2, 0, 0, 0, + 13, 83, 67, 82, 79, 76, 76, 84, 79, 80, 95, 67, 66, 0, 2, 0, 0, 0, 21,105, +117,112, 95,109, 97,116, 95,115, 99,114,111,108,108,116,111,112, 95, 99, 98, 0, + 2, 0, 0, 0, 8,118, 97,108,117,101, 99, 98, 0, 2, 0, 0, 0, 9, 86, 65, + 76, 85, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,109, 97,116, 95, +118, 97,108,117,101, 95, 99, 98, 0, 2, 0, 0, 0, 5,100,114, 97,119, 0, 2, + 0, 0, 0, 8, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, + 95,109, 97,116, 95,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 10,100,114, +111,112, 99,104,101, 99,107, 0, 2, 0, 0, 0, 13, 68, 82, 79, 80, 67, 72, 69, + 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97,116, 95,100, +114,111,112, 99,104,101, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 10,102,103, 99, +111,108,111,114, 99, 98, 0, 2, 0, 0, 0, 11, 70, 71, 67, 79, 76, 79, 82, 95, + 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95,102,103, 99,111, +108,111,114, 95, 99, 98, 0, 2, 0, 0, 0, 10, 98,103, 99,111,108,111,114, 99, + 98, 0, 2, 0, 0, 0, 11, 66, 71, 67, 79, 76, 79, 82, 95, 67, 66, 0, 2, 0, + 0, 0, 19,105,117,112, 95,109, 97,116, 95, 98,103, 99,111,108,111,114, 95, 99, + 98, 0, 2, 0, 0, 0, 11,118, 97,108,117,101, 95,101,100,105,116, 0, 2, 0, + 0, 0, 14, 86, 65, 76, 85, 69, 95, 69, 68, 73, 84, 95, 67, 66, 0, 2, 0, 0, + 0, 22,105,117,112, 95,109, 97,116, 95,118, 97,108,117,101, 95,101,100,105,116, + 95, 99, 98, 0, 2, 0, 0, 0, 12,109, 97,114,107,101,100,105,116, 95, 99, 98, + 0, 2, 0, 0, 0, 12, 77, 65, 82, 75, 69, 68, 73, 84, 95, 67, 66, 0, 2, 0, + 0, 0, 20,105,117,112, 95,109, 97,116, 95,109, 97,114,107,101,100,105,116, 95, + 99, 98, 0, 2, 0, 0, 0, 8,109, 97,114,107, 95, 99, 98, 0, 2, 0, 0, 0, + 8, 77, 65, 82, 75, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,109, 97, +116, 95,109, 97,114,107, 95, 99, 98, 0, 2, 0, 0, 0, 9,109,111,117,115,101, + 95, 99, 98, 0, 2, 0, 0, 0, 9, 77, 79, 85, 83, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 17,105,117,112, 95,109, 97,116, 95,109,111,117,115,101, 95, 99, 98, 0, + 2, 0, 0, 0, 8,102,111,110,116, 95, 99, 98, 0, 2, 0, 0, 0, 8, 70, 79, + 78, 84, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,109, 97,116, 95,102, +111,110,116, 95, 99, 98, 0, 2, 0, 0, 0, 11,101,100,105,116,105,111,110, 95, + 99, 98, 0, 2, 0, 0, 0, 8,100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, + 14,100,114,111,112,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 13, +101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 13,108,101, + 97,118,101,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99,108,105, 99, +107, 95, 99, 98, 0, 2, 0, 0, 0, 13,115, 99,114,111,108,108,116,111,112, 95, + 99, 98, 0, 2, 0, 0, 0, 9,118, 97,108,117,101, 95, 99, 98, 0, 2, 0, 0, + 0, 8,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 13,100,114,111,112, 99, +104,101, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 11,102,103, 99,111,108,111,114, + 95, 99, 98, 0, 2, 0, 0, 0, 11, 98,103, 99,111,108,111,114, 95, 99, 98, 0, + 2, 0, 0, 0, 14,118, 97,108,117,101, 95,101,100,105,116, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/matrix_be32.lo"); +} diff --git a/iup/srclua3/loh/matrix_be64.loh b/iup/srclua3/loh/matrix_be64.loh new file mode 100755 index 0000000..87c64b7 --- /dev/null +++ b/iup/srclua3/loh/matrix_be64.loh @@ -0,0 +1,120 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/matrix_be64.lo"); +*/ +/* ../obj/iupluacontrols3/matrix_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64,109, 97,116,114,105, +120, 46,108,117, 97, 0, 0, 0, 1,162, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, + 25, 0, 15, 0, 11, 3, 11, 4, 26, 15, 0, 11, 5, 11, 6, 26, 15, 0, 11, 7, + 11, 8, 26, 11, 10, 25, 9, 15, 11, 11, 12, 15, 9, 26, 15, 13, 18, 14, 11, 12, + 15, 15, 26, 15, 13, 18, 16, 11, 12, 15, 17, 26, 15, 13, 11, 18, 22, 2, 11, 19, + 15, 20, 29, 0, 2, 26, 15, 13, 11, 21, 22, 2, 11, 22, 15, 23, 29, 0, 2, 26, + 15, 13, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 13, 11, 27, 22, 2, + 11, 28, 15, 29, 29, 0, 2, 26, 15, 13, 11, 30, 22, 2, 11, 31, 15, 32, 29, 0, + 2, 26, 15, 13, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, 13, 11, 36, + 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 13, 11, 39, 22, 2, 11, 40, 15, 41, + 29, 0, 2, 26, 15, 13, 11, 42, 22, 2, 11, 43, 15, 44, 29, 0, 2, 26, 15, 13, + 11, 45, 22, 2, 11, 46, 15, 47, 29, 0, 2, 26, 15, 13, 11, 48, 22, 2, 11, 49, + 15, 50, 29, 0, 2, 26, 15, 13, 11, 51, 22, 2, 11, 52, 15, 53, 29, 0, 2, 26, + 15, 13, 11, 54, 22, 2, 11, 55, 15, 56, 29, 0, 2, 26, 15, 13, 11, 57, 22, 2, + 11, 58, 15, 59, 29, 0, 2, 26, 15, 13, 11, 60, 22, 2, 11, 61, 15, 62, 29, 0, + 2, 26, 15, 13, 11, 63, 22, 2, 11, 64, 15, 65, 29, 0, 2, 26, 15, 13, 11, 66, + 22, 2, 11, 67, 15, 68, 29, 0, 2, 26, 15, 13, 11, 69, 15, 13, 18, 18, 26, 15, + 13, 11, 70, 15, 13, 18, 21, 26, 15, 13, 11, 71, 15, 13, 18, 24, 26, 15, 13, 11, + 72, 15, 13, 18, 27, 26, 15, 13, 11, 73, 15, 13, 18, 30, 26, 15, 13, 11, 74, 15, + 13, 18, 33, 26, 15, 13, 11, 75, 15, 13, 18, 36, 26, 15, 13, 11, 76, 15, 13, 18, + 39, 26, 15, 13, 11, 77, 15, 13, 18, 42, 26, 15, 13, 11, 78, 15, 13, 18, 45, 26, + 15, 13, 11, 79, 15, 13, 18, 48, 26, 15, 13, 11, 80, 15, 13, 18, 51, 26, 15, 13, + 11, 81, 15, 13, 18, 54, 26, 0, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, + 10, 73, 85, 80, 77, 65, 84, 82, 73, 88, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, + 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, + 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116, +101, 77, 97,116,114,105,120, 0, 2, 0, 0, 0, 8,115,101,116, 99,101,108,108, + 0, 4, 0, 0, 0, 7, 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, + 97, 0, 0, 0, 0, 20, 8, 4, 15, 3, 13, 0, 13, 1, 11, 5, 42, 13, 2, 42, + 13, 3, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,108, + 0, 2, 0, 0, 0, 2, 99, 0, 2, 0, 0, 0, 4,118, 97,108, 0, 2, 0, 0, + 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, + 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 2, 58, 0, 2, 0, 0, 0, 8, +103,101,116, 99,101,108,108, 0, 4, 0, 0, 0, 11, 0, 0, 0, 12, 64,109, 97, +116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 18, 8, 4, 15, 3, 13, 0, 13, + 1, 11, 5, 42, 13, 2, 42, 3, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, + 0, 0, 0, 2,108, 0, 2, 0, 0, 0, 2, 99, 0, 2, 0, 0, 0, 4,118, 97, +108, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 2, 58, 0, + 2, 0, 0, 0, 10,105,117,112,109, 97,116,114,105,120, 0, 4, 0, 0, 0, 15, + 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 12, + 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, 73, 85, 80, 77, 65, 84, 82, 73, + 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 7,109, 97,116,114,105,120, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 9, 97, 99,116,105,111,110, 99, 98, 0, 2, 0, 0, 0, 18,105,117, +112, 95,109, 97,116, 95, 97, 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, + 10,109,111,117,115,101,109,111,118,101, 0, 2, 0, 0, 0, 21,105,117,112, 95, +109, 97,116, 95,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, + 0, 8,101,100,105,116,105,111,110, 0, 2, 0, 0, 0, 11, 69, 68, 73, 84, 73, + 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95,101, +100,105,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 5,100,114,111,112, 0, + 2, 0, 0, 0, 8, 68, 82, 79, 80, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117, +112, 95,109, 97,116, 95,100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, 11,100, +114,111,112,115,101,108,101, 99,116, 0, 2, 0, 0, 0, 14, 68, 82, 79, 80, 83, + 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,109, 97, +116, 95,100,114,111,112,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, + 10,101,110,116,101,114,105,116,101,109, 0, 2, 0, 0, 0, 13, 69, 78, 84, 69, + 82, 73, 84, 69, 77, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97, +116, 95,101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 10, +108,101, 97,118,101,105,116,101,109, 0, 2, 0, 0, 0, 13, 76, 69, 65, 86, 69, + 73, 84, 69, 77, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97,116, + 95,108,101, 97,118,101,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 6, 99, +108,105, 99,107, 0, 2, 0, 0, 0, 9, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, + 0, 0, 0, 17,105,117,112, 95,109, 97,116, 95, 99,108,105, 99,107, 95, 99, 98, + 0, 2, 0, 0, 0, 10,115, 99,114,111,108,108,116,111,112, 0, 2, 0, 0, 0, + 13, 83, 67, 82, 79, 76, 76, 84, 79, 80, 95, 67, 66, 0, 2, 0, 0, 0, 21,105, +117,112, 95,109, 97,116, 95,115, 99,114,111,108,108,116,111,112, 95, 99, 98, 0, + 2, 0, 0, 0, 8,118, 97,108,117,101, 99, 98, 0, 2, 0, 0, 0, 9, 86, 65, + 76, 85, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,109, 97,116, 95, +118, 97,108,117,101, 95, 99, 98, 0, 2, 0, 0, 0, 5,100,114, 97,119, 0, 2, + 0, 0, 0, 8, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, + 95,109, 97,116, 95,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 10,100,114, +111,112, 99,104,101, 99,107, 0, 2, 0, 0, 0, 13, 68, 82, 79, 80, 67, 72, 69, + 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97,116, 95,100, +114,111,112, 99,104,101, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 10,102,103, 99, +111,108,111,114, 99, 98, 0, 2, 0, 0, 0, 11, 70, 71, 67, 79, 76, 79, 82, 95, + 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95,102,103, 99,111, +108,111,114, 95, 99, 98, 0, 2, 0, 0, 0, 10, 98,103, 99,111,108,111,114, 99, + 98, 0, 2, 0, 0, 0, 11, 66, 71, 67, 79, 76, 79, 82, 95, 67, 66, 0, 2, 0, + 0, 0, 19,105,117,112, 95,109, 97,116, 95, 98,103, 99,111,108,111,114, 95, 99, + 98, 0, 2, 0, 0, 0, 11,118, 97,108,117,101, 95,101,100,105,116, 0, 2, 0, + 0, 0, 14, 86, 65, 76, 85, 69, 95, 69, 68, 73, 84, 95, 67, 66, 0, 2, 0, 0, + 0, 22,105,117,112, 95,109, 97,116, 95,118, 97,108,117,101, 95,101,100,105,116, + 95, 99, 98, 0, 2, 0, 0, 0, 12,109, 97,114,107,101,100,105,116, 95, 99, 98, + 0, 2, 0, 0, 0, 12, 77, 65, 82, 75, 69, 68, 73, 84, 95, 67, 66, 0, 2, 0, + 0, 0, 20,105,117,112, 95,109, 97,116, 95,109, 97,114,107,101,100,105,116, 95, + 99, 98, 0, 2, 0, 0, 0, 8,109, 97,114,107, 95, 99, 98, 0, 2, 0, 0, 0, + 8, 77, 65, 82, 75, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,109, 97, +116, 95,109, 97,114,107, 95, 99, 98, 0, 2, 0, 0, 0, 9,109,111,117,115,101, + 95, 99, 98, 0, 2, 0, 0, 0, 9, 77, 79, 85, 83, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 17,105,117,112, 95,109, 97,116, 95,109,111,117,115,101, 95, 99, 98, 0, + 2, 0, 0, 0, 8,102,111,110,116, 95, 99, 98, 0, 2, 0, 0, 0, 8, 70, 79, + 78, 84, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,109, 97,116, 95,102, +111,110,116, 95, 99, 98, 0, 2, 0, 0, 0, 11,101,100,105,116,105,111,110, 95, + 99, 98, 0, 2, 0, 0, 0, 8,100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, + 14,100,114,111,112,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 13, +101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 13,108,101, + 97,118,101,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99,108,105, 99, +107, 95, 99, 98, 0, 2, 0, 0, 0, 13,115, 99,114,111,108,108,116,111,112, 95, + 99, 98, 0, 2, 0, 0, 0, 9,118, 97,108,117,101, 95, 99, 98, 0, 2, 0, 0, + 0, 8,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 13,100,114,111,112, 99, +104,101, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 11,102,103, 99,111,108,111,114, + 95, 99, 98, 0, 2, 0, 0, 0, 11, 98,103, 99,111,108,111,114, 95, 99, 98, 0, + 2, 0, 0, 0, 14,118, 97,108,117,101, 95,101,100,105,116, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/matrix_be64.lo"); +} diff --git a/iup/srclua3/loh/matrix_le64.loh b/iup/srclua3/loh/matrix_le64.loh new file mode 100755 index 0000000..208d715 --- /dev/null +++ b/iup/srclua3/loh/matrix_le64.loh @@ -0,0 +1,120 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/matrix_le64.lo"); +*/ +/* ../obj/iupluacontrols3/matrix_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64,109, 97,116,114,105, +120, 46,108,117, 97, 0, 0, 0, 1,162, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, + 25, 0, 15, 0, 11, 3, 11, 4, 26, 15, 0, 11, 5, 11, 6, 26, 15, 0, 11, 7, + 11, 8, 26, 11, 10, 25, 9, 15, 11, 11, 12, 15, 9, 26, 15, 13, 18, 14, 11, 12, + 15, 15, 26, 15, 13, 18, 16, 11, 12, 15, 17, 26, 15, 13, 11, 18, 22, 2, 11, 19, + 15, 20, 29, 0, 2, 26, 15, 13, 11, 21, 22, 2, 11, 22, 15, 23, 29, 0, 2, 26, + 15, 13, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 13, 11, 27, 22, 2, + 11, 28, 15, 29, 29, 0, 2, 26, 15, 13, 11, 30, 22, 2, 11, 31, 15, 32, 29, 0, + 2, 26, 15, 13, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, 13, 11, 36, + 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 13, 11, 39, 22, 2, 11, 40, 15, 41, + 29, 0, 2, 26, 15, 13, 11, 42, 22, 2, 11, 43, 15, 44, 29, 0, 2, 26, 15, 13, + 11, 45, 22, 2, 11, 46, 15, 47, 29, 0, 2, 26, 15, 13, 11, 48, 22, 2, 11, 49, + 15, 50, 29, 0, 2, 26, 15, 13, 11, 51, 22, 2, 11, 52, 15, 53, 29, 0, 2, 26, + 15, 13, 11, 54, 22, 2, 11, 55, 15, 56, 29, 0, 2, 26, 15, 13, 11, 57, 22, 2, + 11, 58, 15, 59, 29, 0, 2, 26, 15, 13, 11, 60, 22, 2, 11, 61, 15, 62, 29, 0, + 2, 26, 15, 13, 11, 63, 22, 2, 11, 64, 15, 65, 29, 0, 2, 26, 15, 13, 11, 66, + 22, 2, 11, 67, 15, 68, 29, 0, 2, 26, 15, 13, 11, 69, 15, 13, 18, 18, 26, 15, + 13, 11, 70, 15, 13, 18, 21, 26, 15, 13, 11, 71, 15, 13, 18, 24, 26, 15, 13, 11, + 72, 15, 13, 18, 27, 26, 15, 13, 11, 73, 15, 13, 18, 30, 26, 15, 13, 11, 74, 15, + 13, 18, 33, 26, 15, 13, 11, 75, 15, 13, 18, 36, 26, 15, 13, 11, 76, 15, 13, 18, + 39, 26, 15, 13, 11, 77, 15, 13, 18, 42, 26, 15, 13, 11, 78, 15, 13, 18, 45, 26, + 15, 13, 11, 79, 15, 13, 18, 48, 26, 15, 13, 11, 80, 15, 13, 18, 51, 26, 15, 13, + 11, 81, 15, 13, 18, 54, 26, 0, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, + 10, 73, 85, 80, 77, 65, 84, 82, 73, 88, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, + 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, + 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 16,105,117,112, 67,114,101, 97,116, +101, 77, 97,116,114,105,120, 0, 2, 0, 0, 0, 8,115,101,116, 99,101,108,108, + 0, 4, 0, 0, 0, 7, 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, + 97, 0, 0, 0, 0, 20, 8, 4, 15, 3, 13, 0, 13, 1, 11, 5, 42, 13, 2, 42, + 13, 3, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,108, + 0, 2, 0, 0, 0, 2, 99, 0, 2, 0, 0, 0, 4,118, 97,108, 0, 2, 0, 0, + 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, + 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 2, 58, 0, 2, 0, 0, 0, 8, +103,101,116, 99,101,108,108, 0, 4, 0, 0, 0, 11, 0, 0, 0, 12, 64,109, 97, +116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 18, 8, 4, 15, 3, 13, 0, 13, + 1, 11, 5, 42, 13, 2, 42, 3, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, + 0, 0, 0, 2,108, 0, 2, 0, 0, 0, 2, 99, 0, 2, 0, 0, 0, 4,118, 97, +108, 0, 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 2, 58, 0, + 2, 0, 0, 0, 10,105,117,112,109, 97,116,114,105,120, 0, 4, 0, 0, 0, 15, + 0, 0, 0, 12, 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 12, + 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, 73, 85, 80, 77, 65, 84, 82, 73, + 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, + 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 7,109, 97,116,114,105,120, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 9, 97, 99,116,105,111,110, 99, 98, 0, 2, 0, 0, 0, 18,105,117, +112, 95,109, 97,116, 95, 97, 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, + 10,109,111,117,115,101,109,111,118,101, 0, 2, 0, 0, 0, 21,105,117,112, 95, +109, 97,116, 95,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, + 0, 8,101,100,105,116,105,111,110, 0, 2, 0, 0, 0, 11, 69, 68, 73, 84, 73, + 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95,101, +100,105,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 5,100,114,111,112, 0, + 2, 0, 0, 0, 8, 68, 82, 79, 80, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117, +112, 95,109, 97,116, 95,100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, 11,100, +114,111,112,115,101,108,101, 99,116, 0, 2, 0, 0, 0, 14, 68, 82, 79, 80, 83, + 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,109, 97, +116, 95,100,114,111,112,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, + 10,101,110,116,101,114,105,116,101,109, 0, 2, 0, 0, 0, 13, 69, 78, 84, 69, + 82, 73, 84, 69, 77, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97, +116, 95,101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 10, +108,101, 97,118,101,105,116,101,109, 0, 2, 0, 0, 0, 13, 76, 69, 65, 86, 69, + 73, 84, 69, 77, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97,116, + 95,108,101, 97,118,101,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 6, 99, +108,105, 99,107, 0, 2, 0, 0, 0, 9, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, + 0, 0, 0, 17,105,117,112, 95,109, 97,116, 95, 99,108,105, 99,107, 95, 99, 98, + 0, 2, 0, 0, 0, 10,115, 99,114,111,108,108,116,111,112, 0, 2, 0, 0, 0, + 13, 83, 67, 82, 79, 76, 76, 84, 79, 80, 95, 67, 66, 0, 2, 0, 0, 0, 21,105, +117,112, 95,109, 97,116, 95,115, 99,114,111,108,108,116,111,112, 95, 99, 98, 0, + 2, 0, 0, 0, 8,118, 97,108,117,101, 99, 98, 0, 2, 0, 0, 0, 9, 86, 65, + 76, 85, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,109, 97,116, 95, +118, 97,108,117,101, 95, 99, 98, 0, 2, 0, 0, 0, 5,100,114, 97,119, 0, 2, + 0, 0, 0, 8, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, + 95,109, 97,116, 95,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 10,100,114, +111,112, 99,104,101, 99,107, 0, 2, 0, 0, 0, 13, 68, 82, 79, 80, 67, 72, 69, + 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97,116, 95,100, +114,111,112, 99,104,101, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 10,102,103, 99, +111,108,111,114, 99, 98, 0, 2, 0, 0, 0, 11, 70, 71, 67, 79, 76, 79, 82, 95, + 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95,102,103, 99,111, +108,111,114, 95, 99, 98, 0, 2, 0, 0, 0, 10, 98,103, 99,111,108,111,114, 99, + 98, 0, 2, 0, 0, 0, 11, 66, 71, 67, 79, 76, 79, 82, 95, 67, 66, 0, 2, 0, + 0, 0, 19,105,117,112, 95,109, 97,116, 95, 98,103, 99,111,108,111,114, 95, 99, + 98, 0, 2, 0, 0, 0, 11,118, 97,108,117,101, 95,101,100,105,116, 0, 2, 0, + 0, 0, 14, 86, 65, 76, 85, 69, 95, 69, 68, 73, 84, 95, 67, 66, 0, 2, 0, 0, + 0, 22,105,117,112, 95,109, 97,116, 95,118, 97,108,117,101, 95,101,100,105,116, + 95, 99, 98, 0, 2, 0, 0, 0, 12,109, 97,114,107,101,100,105,116, 95, 99, 98, + 0, 2, 0, 0, 0, 12, 77, 65, 82, 75, 69, 68, 73, 84, 95, 67, 66, 0, 2, 0, + 0, 0, 20,105,117,112, 95,109, 97,116, 95,109, 97,114,107,101,100,105,116, 95, + 99, 98, 0, 2, 0, 0, 0, 8,109, 97,114,107, 95, 99, 98, 0, 2, 0, 0, 0, + 8, 77, 65, 82, 75, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,109, 97, +116, 95,109, 97,114,107, 95, 99, 98, 0, 2, 0, 0, 0, 9,109,111,117,115,101, + 95, 99, 98, 0, 2, 0, 0, 0, 9, 77, 79, 85, 83, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 17,105,117,112, 95,109, 97,116, 95,109,111,117,115,101, 95, 99, 98, 0, + 2, 0, 0, 0, 8,102,111,110,116, 95, 99, 98, 0, 2, 0, 0, 0, 8, 70, 79, + 78, 84, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,109, 97,116, 95,102, +111,110,116, 95, 99, 98, 0, 2, 0, 0, 0, 11,101,100,105,116,105,111,110, 95, + 99, 98, 0, 2, 0, 0, 0, 8,100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, + 14,100,114,111,112,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 13, +101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 13,108,101, + 97,118,101,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99,108,105, 99, +107, 95, 99, 98, 0, 2, 0, 0, 0, 13,115, 99,114,111,108,108,116,111,112, 95, + 99, 98, 0, 2, 0, 0, 0, 9,118, 97,108,117,101, 95, 99, 98, 0, 2, 0, 0, + 0, 8,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 13,100,114,111,112, 99, +104,101, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 11,102,103, 99,111,108,111,114, + 95, 99, 98, 0, 2, 0, 0, 0, 11, 98,103, 99,111,108,111,114, 95, 99, 98, 0, + 2, 0, 0, 0, 14,118, 97,108,117,101, 95,101,100,105,116, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/matrix_le64.lo"); +} diff --git a/iup/srclua3/loh/matrix_le64w.loh b/iup/srclua3/loh/matrix_le64w.loh new file mode 100755 index 0000000..ed95bb7 --- /dev/null +++ b/iup/srclua3/loh/matrix_le64w.loh @@ -0,0 +1,118 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luamatrix_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luamatrix_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 15, 64,108,117, 97,109, 97, +116,114,105,120, 46,108,117, 97, 0, 0, 0, 1,148, 5, 0, 22, 1, 11, 1, 15, + 2, 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 15, 0, 11, 5, 11, 6, 26, 15, + 0, 11, 7, 11, 8, 26, 11, 10, 25, 9, 15, 11, 11, 12, 15, 9, 26, 15, 13, 18, + 14, 11, 12, 15, 15, 26, 15, 13, 18, 16, 11, 12, 15, 17, 26, 15, 13, 11, 18, 22, + 2, 11, 19, 15, 20, 29, 0, 2, 26, 15, 13, 11, 21, 22, 2, 11, 22, 15, 23, 29, + 0, 2, 26, 15, 13, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 13, 11, + 27, 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 13, 11, 30, 22, 2, 11, 31, 15, + 32, 29, 0, 2, 26, 15, 13, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, + 13, 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 13, 11, 39, 22, 2, 11, + 40, 15, 41, 29, 0, 2, 26, 15, 13, 11, 42, 22, 2, 11, 43, 15, 44, 29, 0, 2, + 26, 15, 13, 11, 45, 22, 2, 11, 46, 15, 47, 29, 0, 2, 26, 15, 13, 11, 48, 22, + 2, 11, 49, 15, 50, 29, 0, 2, 26, 15, 13, 11, 51, 22, 2, 11, 52, 15, 53, 29, + 0, 2, 26, 15, 13, 11, 54, 22, 2, 11, 55, 15, 56, 29, 0, 2, 26, 15, 13, 11, + 57, 22, 2, 11, 58, 15, 59, 29, 0, 2, 26, 15, 13, 11, 60, 22, 2, 11, 61, 15, + 62, 29, 0, 2, 26, 15, 13, 11, 63, 22, 2, 11, 64, 15, 65, 29, 0, 2, 26, 15, + 13, 11, 66, 15, 13, 18, 18, 26, 15, 13, 11, 67, 15, 13, 18, 21, 26, 15, 13, 11, + 68, 15, 13, 18, 24, 26, 15, 13, 11, 69, 15, 13, 18, 27, 26, 15, 13, 11, 70, 15, + 13, 18, 30, 26, 15, 13, 11, 71, 15, 13, 18, 33, 26, 15, 13, 11, 72, 15, 13, 18, + 36, 26, 15, 13, 11, 73, 15, 13, 18, 39, 26, 15, 13, 11, 74, 15, 13, 18, 42, 26, + 15, 13, 11, 75, 15, 13, 18, 45, 26, 15, 13, 11, 76, 15, 13, 18, 48, 26, 15, 13, + 11, 77, 15, 13, 18, 51, 26, 15, 13, 11, 78, 15, 13, 18, 54, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 79, 2, 0, 0, 0, 10, 73, 85, 80, 77, 65, 84, 82, 73, 88, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108, +101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 15, 64,108,117, 97,109, + 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, + 0, 0, 0, 16,105,117,112, 67,114,101, 97,116,101, 77, 97,116,114,105,120, 0, + 2, 0, 0, 0, 8,115,101,116, 99,101,108,108, 0, 4, 0, 0, 0, 7, 0, 0, + 0, 15, 64,108,117, 97,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, + 20, 8, 4, 15, 3, 13, 0, 13, 1, 11, 5, 42, 13, 2, 42, 13, 3, 2, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 2,108, 0, 2, 0, 0, 0, + 2, 99, 0, 2, 0, 0, 0, 4,118, 97,108, 0, 2, 0, 0, 0, 16, 73,117,112, + 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 5,115,101, +108,102, 0, 2, 0, 0, 0, 2, 58, 0, 2, 0, 0, 0, 8,103,101,116, 99,101, +108,108, 0, 4, 0, 0, 0, 11, 0, 0, 0, 15, 64,108,117, 97,109, 97,116,114, +105,120, 46,108,117, 97, 0, 0, 0, 0, 18, 8, 4, 15, 3, 13, 0, 13, 1, 11, + 5, 42, 13, 2, 42, 3, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, + 0, 2,108, 0, 2, 0, 0, 0, 2, 99, 0, 2, 0, 0, 0, 4,118, 97,108, 0, + 2, 0, 0, 0, 16, 73,117,112, 71,101,116, 65,116,116,114,105, 98,117,116,101, + 0, 2, 0, 0, 0, 5,115,101,108,102, 0, 2, 0, 0, 0, 2, 58, 0, 2, 0, + 0, 0, 10,105,117,112,109, 97,116,114,105,120, 0, 4, 0, 0, 0, 15, 0, 0, + 0, 15, 64,108,117, 97,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, + 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 10, 73, 85, 80, 77, 65, 84, 82, + 73, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 7,109, 97,116,114,105,120, + 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, + 2, 0, 0, 0, 9, 97, 99,116,105,111,110, 99, 98, 0, 2, 0, 0, 0, 18,105, +117,112, 95,109, 97,116, 95, 97, 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, + 0, 10,109,111,117,115,101,109,111,118,101, 0, 2, 0, 0, 0, 21,105,117,112, + 95,109, 97,116, 95,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, + 0, 0, 8,101,100,105,116,105,111,110, 0, 2, 0, 0, 0, 11, 69, 68, 73, 84, + 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95, +101,100,105,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 5,100,114,111,112, + 0, 2, 0, 0, 0, 8, 68, 82, 79, 80, 95, 67, 66, 0, 2, 0, 0, 0, 16,105, +117,112, 95,109, 97,116, 95,100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, 11, +100,114,111,112,115,101,108,101, 99,116, 0, 2, 0, 0, 0, 14, 68, 82, 79, 80, + 83, 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,109, + 97,116, 95,100,114,111,112,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, + 0, 10,101,110,116,101,114,105,116,101,109, 0, 2, 0, 0, 0, 13, 69, 78, 84, + 69, 82, 73, 84, 69, 77, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, + 97,116, 95,101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, + 10,108,101, 97,118,101,105,116,101,109, 0, 2, 0, 0, 0, 13, 76, 69, 65, 86, + 69, 73, 84, 69, 77, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97, +116, 95,108,101, 97,118,101,105,116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 6, + 99,108,105, 99,107, 0, 2, 0, 0, 0, 9, 67, 76, 73, 67, 75, 95, 67, 66, 0, + 2, 0, 0, 0, 17,105,117,112, 95,109, 97,116, 95, 99,108,105, 99,107, 95, 99, + 98, 0, 2, 0, 0, 0, 10,115, 99,114,111,108,108,116,111,112, 0, 2, 0, 0, + 0, 13, 83, 67, 82, 79, 76, 76, 84, 79, 80, 95, 67, 66, 0, 2, 0, 0, 0, 21, +105,117,112, 95,109, 97,116, 95,115, 99,114,111,108,108,116,111,112, 95, 99, 98, + 0, 2, 0, 0, 0, 8,118, 97,108,117,101, 99, 98, 0, 2, 0, 0, 0, 9, 86, + 65, 76, 85, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,109, 97,116, + 95,118, 97,108,117,101, 95, 99, 98, 0, 2, 0, 0, 0, 5,100,114, 97,119, 0, + 2, 0, 0, 0, 8, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117, +112, 95,109, 97,116, 95,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 10,100, +114,111,112, 99,104,101, 99,107, 0, 2, 0, 0, 0, 13, 68, 82, 79, 80, 67, 72, + 69, 67, 75, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,109, 97,116, 95, +100,114,111,112, 99,104,101, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 10,102,103, + 99,111,108,111,114, 99, 98, 0, 2, 0, 0, 0, 11, 70, 71, 67, 79, 76, 79, 82, + 95, 67, 66, 0, 2, 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95,102,103, 99, +111,108,111,114, 95, 99, 98, 0, 2, 0, 0, 0, 10, 98,103, 99,111,108,111,114, + 99, 98, 0, 2, 0, 0, 0, 11, 66, 71, 67, 79, 76, 79, 82, 95, 67, 66, 0, 2, + 0, 0, 0, 19,105,117,112, 95,109, 97,116, 95, 98,103, 99,111,108,111,114, 95, + 99, 98, 0, 2, 0, 0, 0, 11,118, 97,108,117,101, 95,101,100,105,116, 0, 2, + 0, 0, 0, 14, 86, 65, 76, 85, 69, 95, 69, 68, 73, 84, 95, 67, 66, 0, 2, 0, + 0, 0, 22,105,117,112, 95,109, 97,116, 95,118, 97,108,117,101, 95,101,100,105, +116, 95, 99, 98, 0, 2, 0, 0, 0, 12,109, 97,114,107,101,100,105,116, 95, 99, + 98, 0, 2, 0, 0, 0, 12, 77, 65, 82, 75, 69, 68, 73, 84, 95, 67, 66, 0, 2, + 0, 0, 0, 20,105,117,112, 95,109, 97,116, 95,109, 97,114,107,101,100,105,116, + 95, 99, 98, 0, 2, 0, 0, 0, 8,109, 97,114,107, 95, 99, 98, 0, 2, 0, 0, + 0, 8, 77, 65, 82, 75, 95, 67, 66, 0, 2, 0, 0, 0, 16,105,117,112, 95,109, + 97,116, 95,109, 97,114,107, 95, 99, 98, 0, 2, 0, 0, 0, 9,109,111,117,115, +101, 95, 99, 98, 0, 2, 0, 0, 0, 9, 77, 79, 85, 83, 69, 95, 67, 66, 0, 2, + 0, 0, 0, 17,105,117,112, 95,109, 97,116, 95,109,111,117,115,101, 95, 99, 98, + 0, 2, 0, 0, 0, 11,101,100,105,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, + 0, 8,100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, 14,100,114,111,112,115, +101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 13,101,110,116,101,114,105, +116,101,109, 95, 99, 98, 0, 2, 0, 0, 0, 13,108,101, 97,118,101,105,116,101, +109, 95, 99, 98, 0, 2, 0, 0, 0, 9, 99,108,105, 99,107, 95, 99, 98, 0, 2, + 0, 0, 0, 13,115, 99,114,111,108,108,116,111,112, 95, 99, 98, 0, 2, 0, 0, + 0, 9,118, 97,108,117,101, 95, 99, 98, 0, 2, 0, 0, 0, 8,100,114, 97,119, + 95, 99, 98, 0, 2, 0, 0, 0, 13,100,114,111,112, 99,104,101, 99,107, 95, 99, + 98, 0, 2, 0, 0, 0, 11,102,103, 99,111,108,111,114, 95, 99, 98, 0, 2, 0, + 0, 0, 11, 98,103, 99,111,108,111,114, 95, 99, 98, 0, 2, 0, 0, 0, 14,118, + 97,108,117,101, 95,101,100,105,116, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luamatrix_le64w.lo"); +} diff --git a/iup/srclua3/loh/pplot.loh b/iup/srclua3/loh/pplot.loh new file mode 100755 index 0000000..1a7aff0 --- /dev/null +++ b/iup/srclua3/loh/pplot.loh @@ -0,0 +1,68 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua_pplot3/pplot.lo"); +*/ +/* ../obj/iuplua_pplot3/pplot.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64,112,112,108,111,116, + 46,108,117, 97, 0, 0, 0, 0,180, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, + 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, + 9, 18, 10, 11, 8, 15, 11, 26, 15, 9, 11, 12, 22, 2, 11, 13, 15, 14, 29, 0, + 2, 26, 15, 9, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 9, 11, 18, + 22, 2, 11, 19, 15, 20, 29, 0, 2, 26, 15, 9, 11, 21, 22, 2, 11, 22, 15, 23, + 29, 0, 2, 26, 15, 9, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 9, + 11, 27, 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 9, 11, 30, 22, 2, 11, 31, + 15, 32, 29, 0, 2, 26, 15, 9, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, + 15, 9, 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 9, 11, 39, 22, 2, + 11, 40, 15, 41, 29, 0, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 42, 2, 0, 0, + 0, 9, 73, 85, 80, 80, 80, 76, 79, 84, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 11, 64,112,112,108,111,116, 46,108,117, 97, 0, 0, 0, 0, + 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, + 80, 80,108,111,116, 0, 2, 0, 0, 0, 9,105,117,112,112,112,108,111,116, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 11, 64,112,112,108,111,116, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 80, + 80, 76, 79, 84, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,112,112,108,111, +116, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, + 0, 2, 0, 0, 0, 8,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, 0, 18,105, +117,112, 95,112,112,108,111,116, 95,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, + 0, 13,101,100,105,116, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 13, + 69, 68, 73, 84, 66, 69, 71, 73, 78, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117, +112, 95,112,112,108,111,116, 95,101,100,105,116, 98,101,103,105,110, 95, 99, 98, + 0, 2, 0, 0, 0, 11,101,100,105,116,101,110,100, 95, 99, 98, 0, 2, 0, 0, + 0, 11, 69, 68, 73, 84, 69, 78, 68, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117, +112, 95,112,112,108,111,116, 95,101,100,105,116,101,110,100, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 10, 83, + 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 20,105,117,112, 95,112,112, +108,111,116, 95,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,115, +101,108,101, 99,116, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 15, 83, + 69, 76, 69, 67, 84, 66, 69, 71, 73, 78, 95, 67, 66, 0, 2, 0, 0, 0, 25,105, +117,112, 95,112,112,108,111,116, 95,115,101,108,101, 99,116, 98,101,103,105,110, + 95, 99, 98, 0, 2, 0, 0, 0, 13,115,101,108,101, 99,116,101,110,100, 95, 99, + 98, 0, 2, 0, 0, 0, 13, 83, 69, 76, 69, 67, 84, 69, 78, 68, 95, 67, 66, 0, + 2, 0, 0, 0, 23,105,117,112, 95,112,112,108,111,116, 95,115,101,108,101, 99, +116,101,110,100, 95, 99, 98, 0, 2, 0, 0, 0, 10,100,101,108,101,116,101, 95, + 99, 98, 0, 2, 0, 0, 0, 10, 68, 69, 76, 69, 84, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 20,105,117,112, 95,112,112,108,111,116, 95,100,101,108,101,116,101, 95, + 99, 98, 0, 2, 0, 0, 0, 15,100,101,108,101,116,101, 98,101,103,105,110, 95, + 99, 98, 0, 2, 0, 0, 0, 15, 68, 69, 76, 69, 84, 69, 66, 69, 71, 73, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, 95,112,112,108,111,116, 95,100,101, +108,101,116,101, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 13,100,101, +108,101,116,101,101,110,100, 95, 99, 98, 0, 2, 0, 0, 0, 13, 68, 69, 76, 69, + 84, 69, 69, 78, 68, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,112,112, +108,111,116, 95,100,101,108,101,116,101,101,110,100, 95, 99, 98, 0, 2, 0, 0, + 0, 11,112,114,101,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 11, 80, 82, + 69, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,112,112, +108,111,116, 95,112,114,101,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 12, +112,111,115,116,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 12, 80, 79, 83, + 84, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,112,112, +108,111,116, 95,112,111,115,116,100,114, 97,119, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua_pplot3/pplot.lo"); +} diff --git a/iup/srclua3/loh/pplot_be32.loh b/iup/srclua3/loh/pplot_be32.loh new file mode 100755 index 0000000..37f3b47 --- /dev/null +++ b/iup/srclua3/loh/pplot_be32.loh @@ -0,0 +1,68 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua_pplot3/pplot_be32.lo"); +*/ +/* ../obj/iuplua_pplot3/pplot_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64,112,112,108,111,116, + 46,108,117, 97, 0, 0, 0, 0,180, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, + 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, + 9, 18, 10, 11, 8, 15, 11, 26, 15, 9, 11, 12, 22, 2, 11, 13, 15, 14, 29, 0, + 2, 26, 15, 9, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 9, 11, 18, + 22, 2, 11, 19, 15, 20, 29, 0, 2, 26, 15, 9, 11, 21, 22, 2, 11, 22, 15, 23, + 29, 0, 2, 26, 15, 9, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 9, + 11, 27, 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 9, 11, 30, 22, 2, 11, 31, + 15, 32, 29, 0, 2, 26, 15, 9, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, + 15, 9, 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 9, 11, 39, 22, 2, + 11, 40, 15, 41, 29, 0, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 42, 2, 0, 0, + 0, 9, 73, 85, 80, 80, 80, 76, 79, 84, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 11, 64,112,112,108,111,116, 46,108,117, 97, 0, 0, 0, 0, + 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, + 80, 80,108,111,116, 0, 2, 0, 0, 0, 9,105,117,112,112,112,108,111,116, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 11, 64,112,112,108,111,116, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 80, + 80, 76, 79, 84, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,112,112,108,111, +116, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, + 0, 2, 0, 0, 0, 8,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, 0, 18,105, +117,112, 95,112,112,108,111,116, 95,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, + 0, 13,101,100,105,116, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 13, + 69, 68, 73, 84, 66, 69, 71, 73, 78, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117, +112, 95,112,112,108,111,116, 95,101,100,105,116, 98,101,103,105,110, 95, 99, 98, + 0, 2, 0, 0, 0, 11,101,100,105,116,101,110,100, 95, 99, 98, 0, 2, 0, 0, + 0, 11, 69, 68, 73, 84, 69, 78, 68, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117, +112, 95,112,112,108,111,116, 95,101,100,105,116,101,110,100, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 10, 83, + 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 20,105,117,112, 95,112,112, +108,111,116, 95,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,115, +101,108,101, 99,116, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 15, 83, + 69, 76, 69, 67, 84, 66, 69, 71, 73, 78, 95, 67, 66, 0, 2, 0, 0, 0, 25,105, +117,112, 95,112,112,108,111,116, 95,115,101,108,101, 99,116, 98,101,103,105,110, + 95, 99, 98, 0, 2, 0, 0, 0, 13,115,101,108,101, 99,116,101,110,100, 95, 99, + 98, 0, 2, 0, 0, 0, 13, 83, 69, 76, 69, 67, 84, 69, 78, 68, 95, 67, 66, 0, + 2, 0, 0, 0, 23,105,117,112, 95,112,112,108,111,116, 95,115,101,108,101, 99, +116,101,110,100, 95, 99, 98, 0, 2, 0, 0, 0, 10,100,101,108,101,116,101, 95, + 99, 98, 0, 2, 0, 0, 0, 10, 68, 69, 76, 69, 84, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 20,105,117,112, 95,112,112,108,111,116, 95,100,101,108,101,116,101, 95, + 99, 98, 0, 2, 0, 0, 0, 15,100,101,108,101,116,101, 98,101,103,105,110, 95, + 99, 98, 0, 2, 0, 0, 0, 15, 68, 69, 76, 69, 84, 69, 66, 69, 71, 73, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, 95,112,112,108,111,116, 95,100,101, +108,101,116,101, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 13,100,101, +108,101,116,101,101,110,100, 95, 99, 98, 0, 2, 0, 0, 0, 13, 68, 69, 76, 69, + 84, 69, 69, 78, 68, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,112,112, +108,111,116, 95,100,101,108,101,116,101,101,110,100, 95, 99, 98, 0, 2, 0, 0, + 0, 11,112,114,101,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 11, 80, 82, + 69, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,112,112, +108,111,116, 95,112,114,101,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 12, +112,111,115,116,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 12, 80, 79, 83, + 84, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,112,112, +108,111,116, 95,112,111,115,116,100,114, 97,119, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua_pplot3/pplot_be32.lo"); +} diff --git a/iup/srclua3/loh/pplot_be64.loh b/iup/srclua3/loh/pplot_be64.loh new file mode 100755 index 0000000..893c368 --- /dev/null +++ b/iup/srclua3/loh/pplot_be64.loh @@ -0,0 +1,68 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua_pplot3/pplot_be64.lo"); +*/ +/* ../obj/iuplua_pplot3/pplot_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64,112,112,108,111,116, + 46,108,117, 97, 0, 0, 0, 0,180, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, + 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, + 9, 18, 10, 11, 8, 15, 11, 26, 15, 9, 11, 12, 22, 2, 11, 13, 15, 14, 29, 0, + 2, 26, 15, 9, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 9, 11, 18, + 22, 2, 11, 19, 15, 20, 29, 0, 2, 26, 15, 9, 11, 21, 22, 2, 11, 22, 15, 23, + 29, 0, 2, 26, 15, 9, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 9, + 11, 27, 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 9, 11, 30, 22, 2, 11, 31, + 15, 32, 29, 0, 2, 26, 15, 9, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, + 15, 9, 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 9, 11, 39, 22, 2, + 11, 40, 15, 41, 29, 0, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 42, 2, 0, 0, + 0, 9, 73, 85, 80, 80, 80, 76, 79, 84, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 11, 64,112,112,108,111,116, 46,108,117, 97, 0, 0, 0, 0, + 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, + 80, 80,108,111,116, 0, 2, 0, 0, 0, 9,105,117,112,112,112,108,111,116, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 11, 64,112,112,108,111,116, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 80, + 80, 76, 79, 84, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,112,112,108,111, +116, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, + 0, 2, 0, 0, 0, 8,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, 0, 18,105, +117,112, 95,112,112,108,111,116, 95,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, + 0, 13,101,100,105,116, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 13, + 69, 68, 73, 84, 66, 69, 71, 73, 78, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117, +112, 95,112,112,108,111,116, 95,101,100,105,116, 98,101,103,105,110, 95, 99, 98, + 0, 2, 0, 0, 0, 11,101,100,105,116,101,110,100, 95, 99, 98, 0, 2, 0, 0, + 0, 11, 69, 68, 73, 84, 69, 78, 68, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117, +112, 95,112,112,108,111,116, 95,101,100,105,116,101,110,100, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 10, 83, + 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 20,105,117,112, 95,112,112, +108,111,116, 95,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,115, +101,108,101, 99,116, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 15, 83, + 69, 76, 69, 67, 84, 66, 69, 71, 73, 78, 95, 67, 66, 0, 2, 0, 0, 0, 25,105, +117,112, 95,112,112,108,111,116, 95,115,101,108,101, 99,116, 98,101,103,105,110, + 95, 99, 98, 0, 2, 0, 0, 0, 13,115,101,108,101, 99,116,101,110,100, 95, 99, + 98, 0, 2, 0, 0, 0, 13, 83, 69, 76, 69, 67, 84, 69, 78, 68, 95, 67, 66, 0, + 2, 0, 0, 0, 23,105,117,112, 95,112,112,108,111,116, 95,115,101,108,101, 99, +116,101,110,100, 95, 99, 98, 0, 2, 0, 0, 0, 10,100,101,108,101,116,101, 95, + 99, 98, 0, 2, 0, 0, 0, 10, 68, 69, 76, 69, 84, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 20,105,117,112, 95,112,112,108,111,116, 95,100,101,108,101,116,101, 95, + 99, 98, 0, 2, 0, 0, 0, 15,100,101,108,101,116,101, 98,101,103,105,110, 95, + 99, 98, 0, 2, 0, 0, 0, 15, 68, 69, 76, 69, 84, 69, 66, 69, 71, 73, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, 95,112,112,108,111,116, 95,100,101, +108,101,116,101, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 13,100,101, +108,101,116,101,101,110,100, 95, 99, 98, 0, 2, 0, 0, 0, 13, 68, 69, 76, 69, + 84, 69, 69, 78, 68, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,112,112, +108,111,116, 95,100,101,108,101,116,101,101,110,100, 95, 99, 98, 0, 2, 0, 0, + 0, 11,112,114,101,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 11, 80, 82, + 69, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,112,112, +108,111,116, 95,112,114,101,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 12, +112,111,115,116,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 12, 80, 79, 83, + 84, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,112,112, +108,111,116, 95,112,111,115,116,100,114, 97,119, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua_pplot3/pplot_be64.lo"); +} diff --git a/iup/srclua3/loh/pplot_le64.loh b/iup/srclua3/loh/pplot_le64.loh new file mode 100755 index 0000000..05a718d --- /dev/null +++ b/iup/srclua3/loh/pplot_le64.loh @@ -0,0 +1,68 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua_pplot3/pplot_le64.lo"); +*/ +/* ../obj/iuplua_pplot3/pplot_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 11, 64,112,112,108,111,116, + 46,108,117, 97, 0, 0, 0, 0,180, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, + 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, + 9, 18, 10, 11, 8, 15, 11, 26, 15, 9, 11, 12, 22, 2, 11, 13, 15, 14, 29, 0, + 2, 26, 15, 9, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 9, 11, 18, + 22, 2, 11, 19, 15, 20, 29, 0, 2, 26, 15, 9, 11, 21, 22, 2, 11, 22, 15, 23, + 29, 0, 2, 26, 15, 9, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 9, + 11, 27, 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 9, 11, 30, 22, 2, 11, 31, + 15, 32, 29, 0, 2, 26, 15, 9, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, + 15, 9, 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 9, 11, 39, 22, 2, + 11, 40, 15, 41, 29, 0, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 42, 2, 0, 0, + 0, 9, 73, 85, 80, 80, 80, 76, 79, 84, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 11, 64,112,112,108,111,116, 46,108,117, 97, 0, 0, 0, 0, + 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 15,105,117,112, 67,114,101, 97,116,101, + 80, 80,108,111,116, 0, 2, 0, 0, 0, 9,105,117,112,112,112,108,111,116, 0, + 4, 0, 0, 0, 7, 0, 0, 0, 11, 64,112,112,108,111,116, 46,108,117, 97, 0, + 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 9, 73, 85, 80, 80, + 80, 76, 79, 84, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 6,112,112,108,111, +116, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, + 0, 2, 0, 0, 0, 8,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, 0, 18,105, +117,112, 95,112,112,108,111,116, 95,101,100,105,116, 95, 99, 98, 0, 2, 0, 0, + 0, 13,101,100,105,116, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 13, + 69, 68, 73, 84, 66, 69, 71, 73, 78, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117, +112, 95,112,112,108,111,116, 95,101,100,105,116, 98,101,103,105,110, 95, 99, 98, + 0, 2, 0, 0, 0, 11,101,100,105,116,101,110,100, 95, 99, 98, 0, 2, 0, 0, + 0, 11, 69, 68, 73, 84, 69, 78, 68, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117, +112, 95,112,112,108,111,116, 95,101,100,105,116,101,110,100, 95, 99, 98, 0, 2, + 0, 0, 0, 10,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 10, 83, + 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, 0, 0, 20,105,117,112, 95,112,112, +108,111,116, 95,115,101,108,101, 99,116, 95, 99, 98, 0, 2, 0, 0, 0, 15,115, +101,108,101, 99,116, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 15, 83, + 69, 76, 69, 67, 84, 66, 69, 71, 73, 78, 95, 67, 66, 0, 2, 0, 0, 0, 25,105, +117,112, 95,112,112,108,111,116, 95,115,101,108,101, 99,116, 98,101,103,105,110, + 95, 99, 98, 0, 2, 0, 0, 0, 13,115,101,108,101, 99,116,101,110,100, 95, 99, + 98, 0, 2, 0, 0, 0, 13, 83, 69, 76, 69, 67, 84, 69, 78, 68, 95, 67, 66, 0, + 2, 0, 0, 0, 23,105,117,112, 95,112,112,108,111,116, 95,115,101,108,101, 99, +116,101,110,100, 95, 99, 98, 0, 2, 0, 0, 0, 10,100,101,108,101,116,101, 95, + 99, 98, 0, 2, 0, 0, 0, 10, 68, 69, 76, 69, 84, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 20,105,117,112, 95,112,112,108,111,116, 95,100,101,108,101,116,101, 95, + 99, 98, 0, 2, 0, 0, 0, 15,100,101,108,101,116,101, 98,101,103,105,110, 95, + 99, 98, 0, 2, 0, 0, 0, 15, 68, 69, 76, 69, 84, 69, 66, 69, 71, 73, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, 95,112,112,108,111,116, 95,100,101, +108,101,116,101, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 13,100,101, +108,101,116,101,101,110,100, 95, 99, 98, 0, 2, 0, 0, 0, 13, 68, 69, 76, 69, + 84, 69, 69, 78, 68, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,112,112, +108,111,116, 95,100,101,108,101,116,101,101,110,100, 95, 99, 98, 0, 2, 0, 0, + 0, 11,112,114,101,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 11, 80, 82, + 69, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,112,112, +108,111,116, 95,112,114,101,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 12, +112,111,115,116,100,114, 97,119, 95, 99, 98, 0, 2, 0, 0, 0, 12, 80, 79, 83, + 84, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,112,112, +108,111,116, 95,112,111,115,116,100,114, 97,119, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua_pplot3/pplot_le64.lo"); +} diff --git a/iup/srclua3/loh/pplot_le64w.loh b/iup/srclua3/loh/pplot_le64w.loh new file mode 100755 index 0000000..fc37ccc --- /dev/null +++ b/iup/srclua3/loh/pplot_le64w.loh @@ -0,0 +1,69 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua_pplot3/luapplot_le64w.lo"); +*/ +/* ../obj/iuplua_pplot3/luapplot_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 14, 64,108,117, 97,112,112, +108,111,116, 46,108,117, 97, 0, 0, 0, 0,180, 5, 0, 22, 1, 11, 1, 15, 2, + 30, 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, + 5, 26, 15, 9, 18, 10, 11, 8, 15, 11, 26, 15, 9, 11, 12, 22, 2, 11, 13, 15, + 14, 29, 0, 2, 26, 15, 9, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, + 9, 11, 18, 22, 2, 11, 19, 15, 20, 29, 0, 2, 26, 15, 9, 11, 21, 22, 2, 11, + 22, 15, 23, 29, 0, 2, 26, 15, 9, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, + 26, 15, 9, 11, 27, 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 9, 11, 30, 22, + 2, 11, 31, 15, 32, 29, 0, 2, 26, 15, 9, 11, 33, 22, 2, 11, 34, 15, 35, 29, + 0, 2, 26, 15, 9, 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 9, 11, + 39, 22, 2, 11, 40, 15, 41, 29, 0, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 2, 0, 0, 0, 9, 73, 85, 80, 80, 80, 76, 79, 84, 0, 2, 0, 0, 0, 7,112, + 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, + 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, + 4, 0, 0, 0, 3, 0, 0, 0, 14, 64,108,117, 97,112,112,108,111,116, 46,108, +117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 15,105,117,112, + 67,114,101, 97,116,101, 80, 80,108,111,116, 0, 2, 0, 0, 0, 9,105,117,112, +112,112,108,111,116, 0, 4, 0, 0, 0, 7, 0, 0, 0, 14, 64,108,117, 97,112, +112,108,111,116, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, + 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, + 2, 0, 0, 0, 9, 73, 85, 80, 80, 80, 76, 79, 84, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, + 2, 0, 0, 0, 6,112,112,108,111,116, 0, 2, 0, 0, 0, 14,105,117,112, 95, + 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 8,101,100,105,116, 95, + 99, 98, 0, 2, 0, 0, 0, 18,105,117,112, 95,112,112,108,111,116, 95,101,100, +105,116, 95, 99, 98, 0, 2, 0, 0, 0, 13,101,100,105,116, 98,101,103,105,110, + 95, 99, 98, 0, 2, 0, 0, 0, 13, 69, 68, 73, 84, 66, 69, 71, 73, 78, 95, 67, + 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,112,112,108,111,116, 95,101,100,105, +116, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 11,101,100,105,116,101, +110,100, 95, 99, 98, 0, 2, 0, 0, 0, 11, 69, 68, 73, 84, 69, 78, 68, 95, 67, + 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,112,112,108,111,116, 95,101,100,105, +116,101,110,100, 95, 99, 98, 0, 2, 0, 0, 0, 10,115,101,108,101, 99,116, 95, + 99, 98, 0, 2, 0, 0, 0, 10, 83, 69, 76, 69, 67, 84, 95, 67, 66, 0, 2, 0, + 0, 0, 20,105,117,112, 95,112,112,108,111,116, 95,115,101,108,101, 99,116, 95, + 99, 98, 0, 2, 0, 0, 0, 15,115,101,108,101, 99,116, 98,101,103,105,110, 95, + 99, 98, 0, 2, 0, 0, 0, 15, 83, 69, 76, 69, 67, 84, 66, 69, 71, 73, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, 95,112,112,108,111,116, 95,115,101, +108,101, 99,116, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 13,115,101, +108,101, 99,116,101,110,100, 95, 99, 98, 0, 2, 0, 0, 0, 13, 83, 69, 76, 69, + 67, 84, 69, 78, 68, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,112,112, +108,111,116, 95,115,101,108,101, 99,116,101,110,100, 95, 99, 98, 0, 2, 0, 0, + 0, 10,100,101,108,101,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 10, 68, 69, 76, + 69, 84, 69, 95, 67, 66, 0, 2, 0, 0, 0, 20,105,117,112, 95,112,112,108,111, +116, 95,100,101,108,101,116,101, 95, 99, 98, 0, 2, 0, 0, 0, 15,100,101,108, +101,116,101, 98,101,103,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 15, 68, 69, 76, + 69, 84, 69, 66, 69, 71, 73, 78, 95, 67, 66, 0, 2, 0, 0, 0, 25,105,117,112, + 95,112,112,108,111,116, 95,100,101,108,101,116,101, 98,101,103,105,110, 95, 99, + 98, 0, 2, 0, 0, 0, 13,100,101,108,101,116,101,101,110,100, 95, 99, 98, 0, + 2, 0, 0, 0, 13, 68, 69, 76, 69, 84, 69, 69, 78, 68, 95, 67, 66, 0, 2, 0, + 0, 0, 23,105,117,112, 95,112,112,108,111,116, 95,100,101,108,101,116,101,101, +110,100, 95, 99, 98, 0, 2, 0, 0, 0, 11,112,114,101,100,114, 97,119, 95, 99, + 98, 0, 2, 0, 0, 0, 11, 80, 82, 69, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, + 0, 0, 21,105,117,112, 95,112,112,108,111,116, 95,112,114,101,100,114, 97,119, + 95, 99, 98, 0, 2, 0, 0, 0, 12,112,111,115,116,100,114, 97,119, 95, 99, 98, + 0, 2, 0, 0, 0, 12, 80, 79, 83, 84, 68, 82, 65, 87, 95, 67, 66, 0, 2, 0, + 0, 0, 22,105,117,112, 95,112,112,108,111,116, 95,112,111,115,116,100,114, 97, +119, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua_pplot3/luapplot_le64w.lo"); +} diff --git a/iup/srclua3/loh/sbox.loh b/iup/srclua3/loh/sbox.loh new file mode 100755 index 0000000..4a5af85 --- /dev/null +++ b/iup/srclua3/loh/sbox.loh @@ -0,0 +1,27 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/sbox.lo"); +*/ +/* ../obj/iuplua3/sbox.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,115, 98,111,120, 46, +108,117, 97, 0, 0, 0, 0, 31, 3, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 8, 73, 85, 80, 83, 66, 79, 88, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108, +101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 10, 64,115, 98,111,120, + 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, + 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 83, 98,111,120, 0, 2, 0, + 0, 0, 8,105,117,112,115, 98,111,120, 0, 4, 0, 0, 0, 7, 0, 0, 0, 10, + 64,115, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, + 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, + 0, 2, 0, 0, 0, 8, 73, 85, 80, 83, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, + 2, 0, 0, 0, 5,115, 98,111,120, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/sbox.lo"); +} diff --git a/iup/srclua3/loh/sbox_be32.loh b/iup/srclua3/loh/sbox_be32.loh new file mode 100755 index 0000000..5b50619 --- /dev/null +++ b/iup/srclua3/loh/sbox_be32.loh @@ -0,0 +1,27 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/sbox_be32.lo"); +*/ +/* ../obj/iuplua3/sbox_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,115, 98,111,120, 46, +108,117, 97, 0, 0, 0, 0, 31, 3, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 8, 73, 85, 80, 83, 66, 79, 88, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108, +101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 10, 64,115, 98,111,120, + 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, + 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 83, 98,111,120, 0, 2, 0, + 0, 0, 8,105,117,112,115, 98,111,120, 0, 4, 0, 0, 0, 7, 0, 0, 0, 10, + 64,115, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, + 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, + 0, 2, 0, 0, 0, 8, 73, 85, 80, 83, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, + 2, 0, 0, 0, 5,115, 98,111,120, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/sbox_be32.lo"); +} diff --git a/iup/srclua3/loh/sbox_be64.loh b/iup/srclua3/loh/sbox_be64.loh new file mode 100755 index 0000000..eddb0ff --- /dev/null +++ b/iup/srclua3/loh/sbox_be64.loh @@ -0,0 +1,27 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/sbox_be64.lo"); +*/ +/* ../obj/iuplua3/sbox_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,115, 98,111,120, 46, +108,117, 97, 0, 0, 0, 0, 31, 3, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 8, 73, 85, 80, 83, 66, 79, 88, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108, +101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 10, 64,115, 98,111,120, + 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, + 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 83, 98,111,120, 0, 2, 0, + 0, 0, 8,105,117,112,115, 98,111,120, 0, 4, 0, 0, 0, 7, 0, 0, 0, 10, + 64,115, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, + 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, + 0, 2, 0, 0, 0, 8, 73, 85, 80, 83, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, + 2, 0, 0, 0, 5,115, 98,111,120, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/sbox_be64.lo"); +} diff --git a/iup/srclua3/loh/sbox_le64.loh b/iup/srclua3/loh/sbox_le64.loh new file mode 100755 index 0000000..089ccc2 --- /dev/null +++ b/iup/srclua3/loh/sbox_le64.loh @@ -0,0 +1,27 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/sbox_le64.lo"); +*/ +/* ../obj/iuplua3/sbox_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,115, 98,111,120, 46, +108,117, 97, 0, 0, 0, 0, 31, 3, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 8, 73, 85, 80, 83, 66, 79, 88, 0, + 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108, +101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 10, 64,115, 98,111,120, + 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, + 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 83, 98,111,120, 0, 2, 0, + 0, 0, 8,105,117,112,115, 98,111,120, 0, 4, 0, 0, 0, 7, 0, 0, 0, 10, + 64,115, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, + 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, + 0, 2, 0, 0, 0, 8, 73, 85, 80, 83, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, + 2, 0, 0, 0, 5,115, 98,111,120, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/sbox_le64.lo"); +} diff --git a/iup/srclua3/loh/sbox_le64w.loh b/iup/srclua3/loh/sbox_le64w.loh new file mode 100755 index 0000000..cc44ebb --- /dev/null +++ b/iup/srclua3/loh/sbox_le64w.loh @@ -0,0 +1,27 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luasbox_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luasbox_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 13, 64,108,117, 97,115, 98, +111,120, 46,108,117, 97, 0, 0, 0, 0, 31, 3, 0, 22, 1, 11, 1, 15, 2, 30, + 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 0, 8, 73, 85, 80, 83, 66, + 79, 88, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, + 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, + 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 13, 64,108, +117, 97,115, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, + 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, + 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 83, + 98,111,120, 0, 2, 0, 0, 0, 8,105,117,112,115, 98,111,120, 0, 4, 0, 0, + 0, 7, 0, 0, 0, 13, 64,108,117, 97,115, 98,111,120, 46,108,117, 97, 0, 0, + 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 83, 66, + 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, + 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,115, 98,111,120, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luasbox_le64w.lo"); +} diff --git a/iup/srclua3/loh/spin.loh b/iup/srclua3/loh/spin.loh new file mode 100755 index 0000000..cd4cc02 --- /dev/null +++ b/iup/srclua3/loh/spin.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/spin.lo"); +*/ +/* ../obj/iuplua3/spin.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,115,112,105,110, 46, +108,117, 97, 0, 0, 0, 0, 82, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 22, 1, + 11, 1, 15, 2, 30, 0, 25, 9, 15, 9, 11, 3, 11, 10, 26, 11, 12, 25, 11, 15, + 7, 11, 13, 15, 11, 26, 15, 14, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, + 15, 14, 11, 18, 15, 14, 18, 15, 26, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 0, + 0, 0, 8, 73, 85, 80, 83, 80, 73, 78, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 8, + 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, + 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 83, +112,105,110, 0, 2, 0, 0, 0, 8,105,117,112,115,112,105,110, 0, 4, 0, 0, + 0, 7, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 12, + 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 83, 80, 73, 78, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,115,112,105,110, 0, 2, 0, 0, 0, + 11, 73, 85, 80, 83, 80, 73, 78, 66, 79, 88, 0, 4, 0, 0, 0, 14, 0, 0, 0, + 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, + 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, + 4,111, 98,106, 0, 2, 0, 0, 0, 17,105,117,112, 67,114,101, 97,116,101, 83, +112,105,110, 98,111,120, 0, 2, 0, 0, 0, 11,105,117,112,115,112,105,110, 98, +111,120, 0, 4, 0, 0, 0, 18, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 83, 80, 73, 78, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 8,115,112,105,110, 98,111,120, 0, 2, + 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, + 0, 0, 7,115,112,105,110, 99, 98, 0, 2, 0, 0, 0, 8, 83, 80, 73, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,115,112,105,110, 95, 99, 98, 0, + 2, 0, 0, 0, 8,115,112,105,110, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/spin.lo"); +} diff --git a/iup/srclua3/loh/spin_be32.loh b/iup/srclua3/loh/spin_be32.loh new file mode 100755 index 0000000..9e1f9e4 --- /dev/null +++ b/iup/srclua3/loh/spin_be32.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/spin_be32.lo"); +*/ +/* ../obj/iuplua3/spin_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,115,112,105,110, 46, +108,117, 97, 0, 0, 0, 0, 82, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 22, 1, + 11, 1, 15, 2, 30, 0, 25, 9, 15, 9, 11, 3, 11, 10, 26, 11, 12, 25, 11, 15, + 7, 11, 13, 15, 11, 26, 15, 14, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, + 15, 14, 11, 18, 15, 14, 18, 15, 26, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 0, + 0, 0, 8, 73, 85, 80, 83, 80, 73, 78, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 8, + 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, + 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 83, +112,105,110, 0, 2, 0, 0, 0, 8,105,117,112,115,112,105,110, 0, 4, 0, 0, + 0, 7, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 12, + 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 83, 80, 73, 78, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,115,112,105,110, 0, 2, 0, 0, 0, + 11, 73, 85, 80, 83, 80, 73, 78, 66, 79, 88, 0, 4, 0, 0, 0, 14, 0, 0, 0, + 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, + 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, + 4,111, 98,106, 0, 2, 0, 0, 0, 17,105,117,112, 67,114,101, 97,116,101, 83, +112,105,110, 98,111,120, 0, 2, 0, 0, 0, 11,105,117,112,115,112,105,110, 98, +111,120, 0, 4, 0, 0, 0, 18, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 83, 80, 73, 78, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 8,115,112,105,110, 98,111,120, 0, 2, + 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, + 0, 0, 7,115,112,105,110, 99, 98, 0, 2, 0, 0, 0, 8, 83, 80, 73, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,115,112,105,110, 95, 99, 98, 0, + 2, 0, 0, 0, 8,115,112,105,110, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/spin_be32.lo"); +} diff --git a/iup/srclua3/loh/spin_be64.loh b/iup/srclua3/loh/spin_be64.loh new file mode 100755 index 0000000..12af7ac --- /dev/null +++ b/iup/srclua3/loh/spin_be64.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/spin_be64.lo"); +*/ +/* ../obj/iuplua3/spin_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,115,112,105,110, 46, +108,117, 97, 0, 0, 0, 0, 82, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 22, 1, + 11, 1, 15, 2, 30, 0, 25, 9, 15, 9, 11, 3, 11, 10, 26, 11, 12, 25, 11, 15, + 7, 11, 13, 15, 11, 26, 15, 14, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, + 15, 14, 11, 18, 15, 14, 18, 15, 26, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 0, + 0, 0, 8, 73, 85, 80, 83, 80, 73, 78, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 8, + 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, + 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 83, +112,105,110, 0, 2, 0, 0, 0, 8,105,117,112,115,112,105,110, 0, 4, 0, 0, + 0, 7, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 12, + 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 83, 80, 73, 78, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,115,112,105,110, 0, 2, 0, 0, 0, + 11, 73, 85, 80, 83, 80, 73, 78, 66, 79, 88, 0, 4, 0, 0, 0, 14, 0, 0, 0, + 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, + 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, + 4,111, 98,106, 0, 2, 0, 0, 0, 17,105,117,112, 67,114,101, 97,116,101, 83, +112,105,110, 98,111,120, 0, 2, 0, 0, 0, 11,105,117,112,115,112,105,110, 98, +111,120, 0, 4, 0, 0, 0, 18, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 83, 80, 73, 78, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 8,115,112,105,110, 98,111,120, 0, 2, + 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, + 0, 0, 7,115,112,105,110, 99, 98, 0, 2, 0, 0, 0, 8, 83, 80, 73, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,115,112,105,110, 95, 99, 98, 0, + 2, 0, 0, 0, 8,115,112,105,110, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/spin_be64.lo"); +} diff --git a/iup/srclua3/loh/spin_le64.loh b/iup/srclua3/loh/spin_le64.loh new file mode 100755 index 0000000..1e7aea7 --- /dev/null +++ b/iup/srclua3/loh/spin_le64.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/spin_le64.lo"); +*/ +/* ../obj/iuplua3/spin_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,115,112,105,110, 46, +108,117, 97, 0, 0, 0, 0, 82, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 22, 1, + 11, 1, 15, 2, 30, 0, 25, 9, 15, 9, 11, 3, 11, 10, 26, 11, 12, 25, 11, 15, + 7, 11, 13, 15, 11, 26, 15, 14, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, + 15, 14, 11, 18, 15, 14, 18, 15, 26, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 0, + 0, 0, 8, 73, 85, 80, 83, 80, 73, 78, 0, 2, 0, 0, 0, 7,112, 97,114,101, +110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, + 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 3, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 8, + 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, + 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, 83, +112,105,110, 0, 2, 0, 0, 0, 8,105,117,112,115,112,105,110, 0, 4, 0, 0, + 0, 7, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 12, + 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 83, 80, 73, 78, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,115,112,105,110, 0, 2, 0, 0, 0, + 11, 73, 85, 80, 83, 80, 73, 78, 66, 79, 88, 0, 4, 0, 0, 0, 14, 0, 0, 0, + 10, 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, + 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, + 4,111, 98,106, 0, 2, 0, 0, 0, 17,105,117,112, 67,114,101, 97,116,101, 83, +112,105,110, 98,111,120, 0, 2, 0, 0, 0, 11,105,117,112,115,112,105,110, 98, +111,120, 0, 4, 0, 0, 0, 18, 0, 0, 0, 10, 64,115,112,105,110, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, + 80, 83, 80, 73, 78, 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 8,115,112,105,110, 98,111,120, 0, 2, + 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, + 0, 0, 7,115,112,105,110, 99, 98, 0, 2, 0, 0, 0, 8, 83, 80, 73, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 12,105,117,112, 95,115,112,105,110, 95, 99, 98, 0, + 2, 0, 0, 0, 8,115,112,105,110, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/spin_le64.lo"); +} diff --git a/iup/srclua3/loh/spin_le64w.loh b/iup/srclua3/loh/spin_le64w.loh new file mode 100755 index 0000000..de49021 --- /dev/null +++ b/iup/srclua3/loh/spin_le64w.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luaspin_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luaspin_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 13, 64,108,117, 97,115,112, +105,110, 46,108,117, 97, 0, 0, 0, 0, 82, 5, 0, 22, 1, 11, 1, 15, 2, 30, + 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, + 26, 22, 1, 11, 1, 15, 2, 30, 0, 25, 9, 15, 9, 11, 3, 11, 10, 26, 11, 12, + 25, 11, 15, 7, 11, 13, 15, 11, 26, 15, 14, 11, 15, 22, 2, 11, 16, 15, 17, 29, + 0, 2, 26, 15, 14, 11, 18, 15, 14, 18, 15, 26, 0, 0, 0, 0, 0, 0, 0, 0, + 19, 2, 0, 0, 0, 8, 73, 85, 80, 83, 80, 73, 78, 0, 2, 0, 0, 0, 7,112, + 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, + 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110,116, 0, + 4, 0, 0, 0, 3, 0, 0, 0, 13, 64,108,117, 97,115,112,105,110, 46,108,117, + 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67, +114,101, 97,116,101, 83,112,105,110, 0, 2, 0, 0, 0, 8,105,117,112,115,112, +105,110, 0, 4, 0, 0, 0, 7, 0, 0, 0, 13, 64,108,117, 97,115,112,105,110, + 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, + 8, 73, 85, 80, 83, 80, 73, 78, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114, +117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5, +115,112,105,110, 0, 2, 0, 0, 0, 11, 73, 85, 80, 83, 80, 73, 78, 66, 79, 88, + 0, 4, 0, 0, 0, 14, 0, 0, 0, 13, 64,108,117, 97,115,112,105,110, 46,108, +117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, + 0, 17,105,117,112, 67,114,101, 97,116,101, 83,112,105,110, 98,111,120, 0, 2, + 0, 0, 0, 11,105,117,112,115,112,105,110, 98,111,120, 0, 4, 0, 0, 0, 18, + 0, 0, 0, 13, 64,108,117, 97,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, + 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 11, 73, 85, 80, 83, 80, 73, 78, + 66, 79, 88, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, + 0, 2, 0, 0, 0, 8,115,112,105,110, 98,111,120, 0, 2, 0, 0, 0, 14,105, +117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 7,115,112, +105,110, 99, 98, 0, 2, 0, 0, 0, 8, 83, 80, 73, 78, 95, 67, 66, 0, 2, 0, + 0, 0, 12,105,117,112, 95,115,112,105,110, 95, 99, 98, 0, 2, 0, 0, 0, 8, +115,112,105,110, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luaspin_le64w.lo"); +} diff --git a/iup/srclua3/loh/tabs.loh b/iup/srclua3/loh/tabs.loh new file mode 100755 index 0000000..86c4ab0 --- /dev/null +++ b/iup/srclua3/loh/tabs.loh @@ -0,0 +1,33 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/tabs.lo"); +*/ +/* ../obj/iuplua3/tabs.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,116, 97, 98,115, 46, +108,117, 97, 0, 0, 0, 0, 54, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, 9, + 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, 9, 11, 13, 15, 9, 18, 10, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 8, 73, 85, 80, 84, 65, + 66, 83, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, + 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, + 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 10, 64,116, + 97, 98,115, 46,108,117, 97, 0, 0, 0, 0, 17, 6, 2, 15, 1, 13, 1, 15, 2, + 13, 1, 2, 1, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, + 84, 97, 98,115, 0, 2, 0, 0, 0, 5,103,101,116,110, 0, 2, 0, 0, 0, 8, +105,117,112,116, 97, 98,115, 0, 4, 0, 0, 0, 7, 0, 0, 0, 10, 64,116, 97, + 98,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 8, 73, 85, 80, 84, 65, 66, 83, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, + 0, 5,116, 97, 98,115, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, + 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,116, 97, 98, 99,104, 97,110,103,101, + 0, 2, 0, 0, 0, 13, 84, 65, 66, 67, 72, 65, 78, 71, 69, 95, 67, 66, 0, 2, + 0, 0, 0, 17,105,117,112, 95,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, + 0, 2, 0, 0, 0, 13,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/tabs.lo"); +} diff --git a/iup/srclua3/loh/tabs_be32.loh b/iup/srclua3/loh/tabs_be32.loh new file mode 100755 index 0000000..4eb4b83 --- /dev/null +++ b/iup/srclua3/loh/tabs_be32.loh @@ -0,0 +1,33 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/tabs_be32.lo"); +*/ +/* ../obj/iuplua3/tabs_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,116, 97, 98,115, 46, +108,117, 97, 0, 0, 0, 0, 54, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, 9, + 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, 9, 11, 13, 15, 9, 18, 10, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 8, 73, 85, 80, 84, 65, + 66, 83, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, + 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, + 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 10, 64,116, + 97, 98,115, 46,108,117, 97, 0, 0, 0, 0, 17, 6, 2, 15, 1, 13, 1, 15, 2, + 13, 1, 2, 1, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, + 84, 97, 98,115, 0, 2, 0, 0, 0, 5,103,101,116,110, 0, 2, 0, 0, 0, 8, +105,117,112,116, 97, 98,115, 0, 4, 0, 0, 0, 7, 0, 0, 0, 10, 64,116, 97, + 98,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 8, 73, 85, 80, 84, 65, 66, 83, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, + 0, 5,116, 97, 98,115, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, + 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,116, 97, 98, 99,104, 97,110,103,101, + 0, 2, 0, 0, 0, 13, 84, 65, 66, 67, 72, 65, 78, 71, 69, 95, 67, 66, 0, 2, + 0, 0, 0, 17,105,117,112, 95,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, + 0, 2, 0, 0, 0, 13,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/tabs_be32.lo"); +} diff --git a/iup/srclua3/loh/tabs_be64.loh b/iup/srclua3/loh/tabs_be64.loh new file mode 100755 index 0000000..c4ada05 --- /dev/null +++ b/iup/srclua3/loh/tabs_be64.loh @@ -0,0 +1,33 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/tabs_be64.lo"); +*/ +/* ../obj/iuplua3/tabs_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,116, 97, 98,115, 46, +108,117, 97, 0, 0, 0, 0, 54, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, 9, + 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, 9, 11, 13, 15, 9, 18, 10, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 8, 73, 85, 80, 84, 65, + 66, 83, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, + 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, + 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 10, 64,116, + 97, 98,115, 46,108,117, 97, 0, 0, 0, 0, 17, 6, 2, 15, 1, 13, 1, 15, 2, + 13, 1, 2, 1, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, + 84, 97, 98,115, 0, 2, 0, 0, 0, 5,103,101,116,110, 0, 2, 0, 0, 0, 8, +105,117,112,116, 97, 98,115, 0, 4, 0, 0, 0, 7, 0, 0, 0, 10, 64,116, 97, + 98,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 8, 73, 85, 80, 84, 65, 66, 83, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, + 0, 5,116, 97, 98,115, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, + 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,116, 97, 98, 99,104, 97,110,103,101, + 0, 2, 0, 0, 0, 13, 84, 65, 66, 67, 72, 65, 78, 71, 69, 95, 67, 66, 0, 2, + 0, 0, 0, 17,105,117,112, 95,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, + 0, 2, 0, 0, 0, 13,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/tabs_be64.lo"); +} diff --git a/iup/srclua3/loh/tabs_le64.loh b/iup/srclua3/loh/tabs_le64.loh new file mode 100755 index 0000000..7a4c6b1 --- /dev/null +++ b/iup/srclua3/loh/tabs_le64.loh @@ -0,0 +1,33 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/tabs_le64.lo"); +*/ +/* ../obj/iuplua3/tabs_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,116, 97, 98,115, 46, +108,117, 97, 0, 0, 0, 0, 54, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, 9, + 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, 9, 11, 13, 15, 9, 18, 10, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 8, 73, 85, 80, 84, 65, + 66, 83, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, + 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, + 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 10, 64,116, + 97, 98,115, 46,108,117, 97, 0, 0, 0, 0, 17, 6, 2, 15, 1, 13, 1, 15, 2, + 13, 1, 2, 1, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, + 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114,101, 97,116,101, + 84, 97, 98,115, 0, 2, 0, 0, 0, 5,103,101,116,110, 0, 2, 0, 0, 0, 8, +105,117,112,116, 97, 98,115, 0, 4, 0, 0, 0, 7, 0, 0, 0, 10, 64,116, 97, + 98,115, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, + 0, 0, 8, 73, 85, 80, 84, 65, 66, 83, 0, 2, 0, 0, 0, 12, 67,111,110,115, +116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, + 0, 5,116, 97, 98,115, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, + 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,116, 97, 98, 99,104, 97,110,103,101, + 0, 2, 0, 0, 0, 13, 84, 65, 66, 67, 72, 65, 78, 71, 69, 95, 67, 66, 0, 2, + 0, 0, 0, 17,105,117,112, 95,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, + 0, 2, 0, 0, 0, 13,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/tabs_le64.lo"); +} diff --git a/iup/srclua3/loh/tabs_le64w.loh b/iup/srclua3/loh/tabs_le64w.loh new file mode 100755 index 0000000..24a87dc --- /dev/null +++ b/iup/srclua3/loh/tabs_le64w.loh @@ -0,0 +1,34 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luatabs_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luatabs_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 13, 64,108,117, 97,116, 97, + 98,115, 46,108,117, 97, 0, 0, 0, 0, 54, 5, 0, 22, 1, 11, 1, 15, 2, 30, + 0, 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, + 26, 15, 9, 11, 10, 22, 2, 11, 11, 15, 12, 29, 0, 2, 26, 15, 9, 11, 13, 15, + 9, 18, 10, 26, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 8, 73, 85, + 80, 84, 65, 66, 83, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116, +101, 73, 85, 80,101,108,101,109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, + 13, 64,108,117, 97,116, 97, 98,115, 46,108,117, 97, 0, 0, 0, 0, 17, 6, 2, + 15, 1, 13, 1, 15, 2, 13, 1, 2, 1, 1, 3, 2, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, + 67,114,101, 97,116,101, 84, 97, 98,115, 0, 2, 0, 0, 0, 5,103,101,116,110, + 0, 2, 0, 0, 0, 8,105,117,112,116, 97, 98,115, 0, 4, 0, 0, 0, 7, 0, + 0, 0, 13, 64,108,117, 97,116, 97, 98,115, 46,108,117, 97, 0, 0, 0, 0, 12, + 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 65, 66, 83, 0, + 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, + 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,116, 97, 98,115, 0, 2, 0, 0, 0, + 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10, +116, 97, 98, 99,104, 97,110,103,101, 0, 2, 0, 0, 0, 13, 84, 65, 66, 67, 72, + 65, 78, 71, 69, 95, 67, 66, 0, 2, 0, 0, 0, 17,105,117,112, 95,116, 97, 98, + 99,104, 97,110,103,101, 95, 99, 98, 0, 2, 0, 0, 0, 13,116, 97, 98, 99,104, + 97,110,103,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luatabs_le64w.lo"); +} diff --git a/iup/srclua3/loh/tree.loh b/iup/srclua3/loh/tree.loh new file mode 100755 index 0000000..f3af92c --- /dev/null +++ b/iup/srclua3/loh/tree.loh @@ -0,0 +1,115 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/tree.lo"); +*/ +/* ../obj/iupluacontrols3/tree.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,116,114,101,101, 46, +108,117, 97, 0, 0, 0, 1, 24, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 22, 0, 25, 3, 15, 0, 11, 4, 11, 5, 26, 11, 7, 25, 6, 15, 8, 11, 9, 15, + 6, 26, 11, 11, 25, 10, 11, 13, 25, 12, 15, 8, 11, 12, 15, 12, 26, 15, 14, 11, + 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 14, 11, 18, 22, 2, 11, 19, 15, + 20, 29, 0, 2, 26, 15, 14, 11, 21, 22, 2, 11, 22, 15, 23, 29, 0, 2, 26, 15, + 14, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 14, 11, 27, 22, 2, 11, + 28, 15, 29, 29, 0, 2, 26, 15, 14, 11, 30, 22, 2, 11, 31, 15, 32, 29, 0, 2, + 26, 15, 14, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, 14, 11, 36, 22, + 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 14, 11, 39, 22, 2, 11, 40, 15, 41, 29, + 0, 2, 26, 15, 14, 11, 42, 22, 2, 11, 43, 15, 44, 29, 0, 2, 26, 15, 14, 11, + 45, 15, 14, 18, 15, 26, 15, 14, 11, 46, 15, 14, 18, 18, 26, 15, 14, 11, 47, 15, + 14, 18, 21, 26, 15, 14, 11, 48, 15, 14, 18, 24, 26, 15, 14, 11, 49, 15, 14, 18, + 27, 26, 15, 14, 11, 50, 15, 14, 18, 30, 26, 15, 14, 11, 51, 15, 14, 18, 33, 26, + 15, 14, 11, 52, 15, 14, 18, 36, 26, 15, 14, 11, 53, 15, 14, 18, 39, 26, 15, 14, + 11, 54, 15, 14, 18, 42, 26, 0, 0, 0, 0, 0, 0, 0, 0, 55, 2, 0, 0, 0, + 8, 73, 85, 80, 84, 82, 69, 69, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, + 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 22, 73, 85, + 80, 84, 82, 69, 69, 82, 69, 70, 69, 82, 69, 78, 67, 69, 84, 65, 66, 76, 69, 0, + 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110, +116, 0, 4, 0, 0, 0, 4, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114, +101, 97,116,101, 84,114,101,101, 0, 2, 0, 0, 0, 8,105,117,112,116,114,101, +101, 0, 4, 0, 0, 0, 8, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 84, 82, 69, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,116,114,101,101, + 0, 2, 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82,101, + 99, 0, 4, 0, 0, 0, 13, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0,140, 9, 3, 13, 1, 4, 0, 32, 52, 2, 1, 3, 15, 4, 13, 1, + 2, 1, 1, 50,112, 15, 5, 13, 1, 13, 3, 16, 2, 1, 1, 11, 6, 32, 52, 66, + 13, 1, 13, 3, 16, 18, 7, 4, 0, 31, 52, 21, 15, 8, 13, 0, 11, 9, 13, 2, + 42, 13, 1, 13, 3, 16, 18, 7, 2, 0, 3, 50, 14, 15, 8, 13, 0, 11, 9, 13, + 2, 42, 11, 10, 2, 0, 3, 15, 11, 13, 0, 13, 1, 13, 3, 16, 13, 2, 7, 1, + 37, 2, 0, 3, 50, 24, 13, 1, 13, 3, 16, 52, 17, 15, 8, 13, 0, 11, 12, 13, + 2, 42, 13, 1, 13, 3, 16, 2, 0, 3, 13, 3, 7, 1, 38, 23, 3, 13, 3, 7, + 0, 36, 54,119, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 7,104, 97, +110,100,108,101, 0, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 3,105,100, 0, + 2, 0, 0, 0, 5, 99,111,110,116, 0, 2, 0, 0, 0, 5,103,101,116,110, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, + 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,110, 97,109,101, 0, 2, 0, 0, + 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, + 0, 0, 10, 65, 68, 68, 66, 82, 65, 78, 67, 72, 0, 2, 0, 0, 0, 1, 0, 2, + 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, + 2, 0, 0, 0, 8, 65, 68, 68, 76, 69, 65, 70, 0, 2, 0, 0, 0, 13, 84,114, +101,101, 83,101,116, 86, 97,108,117,101, 0, 4, 0, 0, 0, 36, 0, 0, 0, 10, + 64,116,114,101,101, 46,108,117, 97, 0, 0, 0, 0, 59, 6, 2, 15, 2, 13, 1, + 2, 1, 1, 11, 3, 31, 52, 11, 15, 4, 11, 5, 11, 6, 2, 0, 2, 1, 2, 13, + 1, 18, 7, 4, 0, 31, 52, 13, 15, 8, 13, 0, 11, 9, 13, 1, 18, 7, 2, 0, + 3, 15, 10, 13, 0, 13, 1, 7, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 11, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 2,116, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, + 0, 2, 0, 0, 0, 11, 73,117,112, 77,101,115,115, 97,103,101, 0, 2, 0, 0, + 0, 14, 84,114,101,101, 76,117, 97, 32, 69,114,114,111,114, 0, 2, 0, 0, 0, + 45, 73,110, 99,111,114,114,101, 99,116, 32, 97,114,103,117,109,101,110,116,115, + 32,116,111, 32,102,117,110, 99,116,105,111,110, 32, 84,114,101,101, 83,101,116, + 86, 97,108,117,101, 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,110, 97,109, +101, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 2, 0, 0, 0, 5, 78, 65, 77, 69, 0, 2, 0, 0, 0, 16, 84,114, +101,101, 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, 2, 0, 0, 0, 14,105, +117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,115,101, +108,101, 99,116,105,111,110, 0, 2, 0, 0, 0, 13, 83, 69, 76, 69, 67, 84, 73, + 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,116,114,101,101, 95, +115,101,108,101, 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,117, +108,116,105,115,101,108,101, 99,116,105,111,110, 0, 2, 0, 0, 0, 18, 77, 85, + 76, 84, 73, 83, 69, 76, 69, 67, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, + 27,105,117,112, 95,116,114,101,101, 95,109,117,108,116,105,115,101,108,101, 99, +116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,111, +112,101,110, 0, 2, 0, 0, 0, 14, 66, 82, 65, 78, 67, 72, 79, 80, 69, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,116,114,101,101, 95, 98,114, 97, +110, 99,104,111,112,101,110, 95, 99, 98, 0, 2, 0, 0, 0, 12, 98,114, 97,110, + 99,104, 99,108,111,115,101, 0, 2, 0, 0, 0, 15, 66, 82, 65, 78, 67, 72, 67, + 76, 79, 83, 69, 95, 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95,116,114,101, +101, 95, 98,114, 97,110, 99,104, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, + 0, 12,101,120,101, 99,117,116,101,108,101, 97,102, 0, 2, 0, 0, 0, 15, 69, + 88, 69, 67, 85, 84, 69, 76, 69, 65, 70, 95, 67, 66, 0, 2, 0, 0, 0, 24,105, +117,112, 95,116,114,101,101, 95,101,120,101, 99,117,116,101,108,101, 97,102, 95, + 99, 98, 0, 2, 0, 0, 0, 11,114,101,110, 97,109,101,110,111,100,101, 0, 2, + 0, 0, 0, 14, 82, 69, 78, 65, 77, 69, 78, 79, 68, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 23,105,117,112, 95,116,114,101,101, 95,114,101,110, 97,109,101,110,111, +100,101, 95, 99, 98, 0, 2, 0, 0, 0, 9,114,101,110, 97,109,101, 99, 98, 0, + 2, 0, 0, 0, 10, 82, 69, 78, 65, 77, 69, 95, 67, 66, 0, 2, 0, 0, 0, 21, +105,117,112, 95,116,114,101,101, 95,114,101,110, 97,109,101, 99, 98, 95, 99, 98, + 0, 2, 0, 0, 0, 13,115,104,111,119,114,101,110, 97,109,101, 99, 98, 0, 2, + 0, 0, 0, 14, 83, 72, 79, 87, 82, 69, 78, 65, 77, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 25,105,117,112, 95,116,114,101,101, 95,115,104,111,119,114,101,110, 97, +109,101, 99, 98, 95, 99, 98, 0, 2, 0, 0, 0, 11,114,105,103,104,116, 99,108, +105, 99,107, 0, 2, 0, 0, 0, 14, 82, 73, 71, 72, 84, 67, 76, 73, 67, 75, 95, + 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,116,114,101,101, 95,114,105,103, +104,116, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 9,100,114, 97,103, +100,114,111,112, 0, 2, 0, 0, 0, 12, 68, 82, 65, 71, 68, 82, 79, 80, 95, 67, + 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,116,114,101,101, 95,100,114, 97,103, +100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, 13,115,101,108,101, 99,116,105, +111,110, 95, 99, 98, 0, 2, 0, 0, 0, 18,109,117,108,116,105,115,101,108,101, + 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 14, 98,114, 97,110, 99,104, +111,112,101,110, 95, 99, 98, 0, 2, 0, 0, 0, 15, 98,114, 97,110, 99,104, 99, +108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 15,101,120,101, 99,117,116,101, +108,101, 97,102, 95, 99, 98, 0, 2, 0, 0, 0, 14,114,101,110, 97,109,101,110, +111,100,101, 95, 99, 98, 0, 2, 0, 0, 0, 10,114,101,110, 97,109,101, 95, 99, + 98, 0, 2, 0, 0, 0, 14,115,104,111,119,114,101,110, 97,109,101, 95, 99, 98, + 0, 2, 0, 0, 0, 14,114,105,103,104,116, 99,108,105, 99,107, 95, 99, 98, 0, + 2, 0, 0, 0, 12,100,114, 97,103,100,114,111,112, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/tree.lo"); +} diff --git a/iup/srclua3/loh/tree_be32.loh b/iup/srclua3/loh/tree_be32.loh new file mode 100755 index 0000000..c7a5992 --- /dev/null +++ b/iup/srclua3/loh/tree_be32.loh @@ -0,0 +1,115 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/tree_be32.lo"); +*/ +/* ../obj/iupluacontrols3/tree_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,116,114,101,101, 46, +108,117, 97, 0, 0, 0, 1, 24, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 22, 0, 25, 3, 15, 0, 11, 4, 11, 5, 26, 11, 7, 25, 6, 15, 8, 11, 9, 15, + 6, 26, 11, 11, 25, 10, 11, 13, 25, 12, 15, 8, 11, 12, 15, 12, 26, 15, 14, 11, + 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 14, 11, 18, 22, 2, 11, 19, 15, + 20, 29, 0, 2, 26, 15, 14, 11, 21, 22, 2, 11, 22, 15, 23, 29, 0, 2, 26, 15, + 14, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 14, 11, 27, 22, 2, 11, + 28, 15, 29, 29, 0, 2, 26, 15, 14, 11, 30, 22, 2, 11, 31, 15, 32, 29, 0, 2, + 26, 15, 14, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, 14, 11, 36, 22, + 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 14, 11, 39, 22, 2, 11, 40, 15, 41, 29, + 0, 2, 26, 15, 14, 11, 42, 22, 2, 11, 43, 15, 44, 29, 0, 2, 26, 15, 14, 11, + 45, 15, 14, 18, 15, 26, 15, 14, 11, 46, 15, 14, 18, 18, 26, 15, 14, 11, 47, 15, + 14, 18, 21, 26, 15, 14, 11, 48, 15, 14, 18, 24, 26, 15, 14, 11, 49, 15, 14, 18, + 27, 26, 15, 14, 11, 50, 15, 14, 18, 30, 26, 15, 14, 11, 51, 15, 14, 18, 33, 26, + 15, 14, 11, 52, 15, 14, 18, 36, 26, 15, 14, 11, 53, 15, 14, 18, 39, 26, 15, 14, + 11, 54, 15, 14, 18, 42, 26, 0, 0, 0, 0, 0, 0, 0, 0, 55, 2, 0, 0, 0, + 8, 73, 85, 80, 84, 82, 69, 69, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, + 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 22, 73, 85, + 80, 84, 82, 69, 69, 82, 69, 70, 69, 82, 69, 78, 67, 69, 84, 65, 66, 76, 69, 0, + 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110, +116, 0, 4, 0, 0, 0, 4, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114, +101, 97,116,101, 84,114,101,101, 0, 2, 0, 0, 0, 8,105,117,112,116,114,101, +101, 0, 4, 0, 0, 0, 8, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 84, 82, 69, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,116,114,101,101, + 0, 2, 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82,101, + 99, 0, 4, 0, 0, 0, 13, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0,140, 9, 3, 13, 1, 4, 0, 32, 52, 2, 1, 3, 15, 4, 13, 1, + 2, 1, 1, 50,112, 15, 5, 13, 1, 13, 3, 16, 2, 1, 1, 11, 6, 32, 52, 66, + 13, 1, 13, 3, 16, 18, 7, 4, 0, 31, 52, 21, 15, 8, 13, 0, 11, 9, 13, 2, + 42, 13, 1, 13, 3, 16, 18, 7, 2, 0, 3, 50, 14, 15, 8, 13, 0, 11, 9, 13, + 2, 42, 11, 10, 2, 0, 3, 15, 11, 13, 0, 13, 1, 13, 3, 16, 13, 2, 7, 1, + 37, 2, 0, 3, 50, 24, 13, 1, 13, 3, 16, 52, 17, 15, 8, 13, 0, 11, 12, 13, + 2, 42, 13, 1, 13, 3, 16, 2, 0, 3, 13, 3, 7, 1, 38, 23, 3, 13, 3, 7, + 0, 36, 54,119, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 7,104, 97, +110,100,108,101, 0, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 3,105,100, 0, + 2, 0, 0, 0, 5, 99,111,110,116, 0, 2, 0, 0, 0, 5,103,101,116,110, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, + 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,110, 97,109,101, 0, 2, 0, 0, + 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, + 0, 0, 10, 65, 68, 68, 66, 82, 65, 78, 67, 72, 0, 2, 0, 0, 0, 1, 0, 2, + 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, + 2, 0, 0, 0, 8, 65, 68, 68, 76, 69, 65, 70, 0, 2, 0, 0, 0, 13, 84,114, +101,101, 83,101,116, 86, 97,108,117,101, 0, 4, 0, 0, 0, 36, 0, 0, 0, 10, + 64,116,114,101,101, 46,108,117, 97, 0, 0, 0, 0, 59, 6, 2, 15, 2, 13, 1, + 2, 1, 1, 11, 3, 31, 52, 11, 15, 4, 11, 5, 11, 6, 2, 0, 2, 1, 2, 13, + 1, 18, 7, 4, 0, 31, 52, 13, 15, 8, 13, 0, 11, 9, 13, 1, 18, 7, 2, 0, + 3, 15, 10, 13, 0, 13, 1, 7, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 11, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 2,116, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, + 0, 2, 0, 0, 0, 11, 73,117,112, 77,101,115,115, 97,103,101, 0, 2, 0, 0, + 0, 14, 84,114,101,101, 76,117, 97, 32, 69,114,114,111,114, 0, 2, 0, 0, 0, + 45, 73,110, 99,111,114,114,101, 99,116, 32, 97,114,103,117,109,101,110,116,115, + 32,116,111, 32,102,117,110, 99,116,105,111,110, 32, 84,114,101,101, 83,101,116, + 86, 97,108,117,101, 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,110, 97,109, +101, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 2, 0, 0, 0, 5, 78, 65, 77, 69, 0, 2, 0, 0, 0, 16, 84,114, +101,101, 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, 2, 0, 0, 0, 14,105, +117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,115,101, +108,101, 99,116,105,111,110, 0, 2, 0, 0, 0, 13, 83, 69, 76, 69, 67, 84, 73, + 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,116,114,101,101, 95, +115,101,108,101, 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,117, +108,116,105,115,101,108,101, 99,116,105,111,110, 0, 2, 0, 0, 0, 18, 77, 85, + 76, 84, 73, 83, 69, 76, 69, 67, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, + 27,105,117,112, 95,116,114,101,101, 95,109,117,108,116,105,115,101,108,101, 99, +116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,111, +112,101,110, 0, 2, 0, 0, 0, 14, 66, 82, 65, 78, 67, 72, 79, 80, 69, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,116,114,101,101, 95, 98,114, 97, +110, 99,104,111,112,101,110, 95, 99, 98, 0, 2, 0, 0, 0, 12, 98,114, 97,110, + 99,104, 99,108,111,115,101, 0, 2, 0, 0, 0, 15, 66, 82, 65, 78, 67, 72, 67, + 76, 79, 83, 69, 95, 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95,116,114,101, +101, 95, 98,114, 97,110, 99,104, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, + 0, 12,101,120,101, 99,117,116,101,108,101, 97,102, 0, 2, 0, 0, 0, 15, 69, + 88, 69, 67, 85, 84, 69, 76, 69, 65, 70, 95, 67, 66, 0, 2, 0, 0, 0, 24,105, +117,112, 95,116,114,101,101, 95,101,120,101, 99,117,116,101,108,101, 97,102, 95, + 99, 98, 0, 2, 0, 0, 0, 11,114,101,110, 97,109,101,110,111,100,101, 0, 2, + 0, 0, 0, 14, 82, 69, 78, 65, 77, 69, 78, 79, 68, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 23,105,117,112, 95,116,114,101,101, 95,114,101,110, 97,109,101,110,111, +100,101, 95, 99, 98, 0, 2, 0, 0, 0, 9,114,101,110, 97,109,101, 99, 98, 0, + 2, 0, 0, 0, 10, 82, 69, 78, 65, 77, 69, 95, 67, 66, 0, 2, 0, 0, 0, 21, +105,117,112, 95,116,114,101,101, 95,114,101,110, 97,109,101, 99, 98, 95, 99, 98, + 0, 2, 0, 0, 0, 13,115,104,111,119,114,101,110, 97,109,101, 99, 98, 0, 2, + 0, 0, 0, 14, 83, 72, 79, 87, 82, 69, 78, 65, 77, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 25,105,117,112, 95,116,114,101,101, 95,115,104,111,119,114,101,110, 97, +109,101, 99, 98, 95, 99, 98, 0, 2, 0, 0, 0, 11,114,105,103,104,116, 99,108, +105, 99,107, 0, 2, 0, 0, 0, 14, 82, 73, 71, 72, 84, 67, 76, 73, 67, 75, 95, + 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,116,114,101,101, 95,114,105,103, +104,116, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 9,100,114, 97,103, +100,114,111,112, 0, 2, 0, 0, 0, 12, 68, 82, 65, 71, 68, 82, 79, 80, 95, 67, + 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,116,114,101,101, 95,100,114, 97,103, +100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, 13,115,101,108,101, 99,116,105, +111,110, 95, 99, 98, 0, 2, 0, 0, 0, 18,109,117,108,116,105,115,101,108,101, + 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 14, 98,114, 97,110, 99,104, +111,112,101,110, 95, 99, 98, 0, 2, 0, 0, 0, 15, 98,114, 97,110, 99,104, 99, +108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 15,101,120,101, 99,117,116,101, +108,101, 97,102, 95, 99, 98, 0, 2, 0, 0, 0, 14,114,101,110, 97,109,101,110, +111,100,101, 95, 99, 98, 0, 2, 0, 0, 0, 10,114,101,110, 97,109,101, 95, 99, + 98, 0, 2, 0, 0, 0, 14,115,104,111,119,114,101,110, 97,109,101, 95, 99, 98, + 0, 2, 0, 0, 0, 14,114,105,103,104,116, 99,108,105, 99,107, 95, 99, 98, 0, + 2, 0, 0, 0, 12,100,114, 97,103,100,114,111,112, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/tree_be32.lo"); +} diff --git a/iup/srclua3/loh/tree_be64.loh b/iup/srclua3/loh/tree_be64.loh new file mode 100755 index 0000000..d46105b --- /dev/null +++ b/iup/srclua3/loh/tree_be64.loh @@ -0,0 +1,115 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/tree_be64.lo"); +*/ +/* ../obj/iupluacontrols3/tree_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,116,114,101,101, 46, +108,117, 97, 0, 0, 0, 1, 24, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 22, 0, 25, 3, 15, 0, 11, 4, 11, 5, 26, 11, 7, 25, 6, 15, 8, 11, 9, 15, + 6, 26, 11, 11, 25, 10, 11, 13, 25, 12, 15, 8, 11, 12, 15, 12, 26, 15, 14, 11, + 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 14, 11, 18, 22, 2, 11, 19, 15, + 20, 29, 0, 2, 26, 15, 14, 11, 21, 22, 2, 11, 22, 15, 23, 29, 0, 2, 26, 15, + 14, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 14, 11, 27, 22, 2, 11, + 28, 15, 29, 29, 0, 2, 26, 15, 14, 11, 30, 22, 2, 11, 31, 15, 32, 29, 0, 2, + 26, 15, 14, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, 14, 11, 36, 22, + 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 14, 11, 39, 22, 2, 11, 40, 15, 41, 29, + 0, 2, 26, 15, 14, 11, 42, 22, 2, 11, 43, 15, 44, 29, 0, 2, 26, 15, 14, 11, + 45, 15, 14, 18, 15, 26, 15, 14, 11, 46, 15, 14, 18, 18, 26, 15, 14, 11, 47, 15, + 14, 18, 21, 26, 15, 14, 11, 48, 15, 14, 18, 24, 26, 15, 14, 11, 49, 15, 14, 18, + 27, 26, 15, 14, 11, 50, 15, 14, 18, 30, 26, 15, 14, 11, 51, 15, 14, 18, 33, 26, + 15, 14, 11, 52, 15, 14, 18, 36, 26, 15, 14, 11, 53, 15, 14, 18, 39, 26, 15, 14, + 11, 54, 15, 14, 18, 42, 26, 0, 0, 0, 0, 0, 0, 0, 0, 55, 2, 0, 0, 0, + 8, 73, 85, 80, 84, 82, 69, 69, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, + 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 22, 73, 85, + 80, 84, 82, 69, 69, 82, 69, 70, 69, 82, 69, 78, 67, 69, 84, 65, 66, 76, 69, 0, + 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110, +116, 0, 4, 0, 0, 0, 4, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114, +101, 97,116,101, 84,114,101,101, 0, 2, 0, 0, 0, 8,105,117,112,116,114,101, +101, 0, 4, 0, 0, 0, 8, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 84, 82, 69, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,116,114,101,101, + 0, 2, 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82,101, + 99, 0, 4, 0, 0, 0, 13, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0,140, 9, 3, 13, 1, 4, 0, 32, 52, 2, 1, 3, 15, 4, 13, 1, + 2, 1, 1, 50,112, 15, 5, 13, 1, 13, 3, 16, 2, 1, 1, 11, 6, 32, 52, 66, + 13, 1, 13, 3, 16, 18, 7, 4, 0, 31, 52, 21, 15, 8, 13, 0, 11, 9, 13, 2, + 42, 13, 1, 13, 3, 16, 18, 7, 2, 0, 3, 50, 14, 15, 8, 13, 0, 11, 9, 13, + 2, 42, 11, 10, 2, 0, 3, 15, 11, 13, 0, 13, 1, 13, 3, 16, 13, 2, 7, 1, + 37, 2, 0, 3, 50, 24, 13, 1, 13, 3, 16, 52, 17, 15, 8, 13, 0, 11, 12, 13, + 2, 42, 13, 1, 13, 3, 16, 2, 0, 3, 13, 3, 7, 1, 38, 23, 3, 13, 3, 7, + 0, 36, 54,119, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 7,104, 97, +110,100,108,101, 0, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 3,105,100, 0, + 2, 0, 0, 0, 5, 99,111,110,116, 0, 2, 0, 0, 0, 5,103,101,116,110, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, + 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,110, 97,109,101, 0, 2, 0, 0, + 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, + 0, 0, 10, 65, 68, 68, 66, 82, 65, 78, 67, 72, 0, 2, 0, 0, 0, 1, 0, 2, + 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, + 2, 0, 0, 0, 8, 65, 68, 68, 76, 69, 65, 70, 0, 2, 0, 0, 0, 13, 84,114, +101,101, 83,101,116, 86, 97,108,117,101, 0, 4, 0, 0, 0, 36, 0, 0, 0, 10, + 64,116,114,101,101, 46,108,117, 97, 0, 0, 0, 0, 59, 6, 2, 15, 2, 13, 1, + 2, 1, 1, 11, 3, 31, 52, 11, 15, 4, 11, 5, 11, 6, 2, 0, 2, 1, 2, 13, + 1, 18, 7, 4, 0, 31, 52, 13, 15, 8, 13, 0, 11, 9, 13, 1, 18, 7, 2, 0, + 3, 15, 10, 13, 0, 13, 1, 7, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 11, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 2,116, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, + 0, 2, 0, 0, 0, 11, 73,117,112, 77,101,115,115, 97,103,101, 0, 2, 0, 0, + 0, 14, 84,114,101,101, 76,117, 97, 32, 69,114,114,111,114, 0, 2, 0, 0, 0, + 45, 73,110, 99,111,114,114,101, 99,116, 32, 97,114,103,117,109,101,110,116,115, + 32,116,111, 32,102,117,110, 99,116,105,111,110, 32, 84,114,101,101, 83,101,116, + 86, 97,108,117,101, 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,110, 97,109, +101, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 2, 0, 0, 0, 5, 78, 65, 77, 69, 0, 2, 0, 0, 0, 16, 84,114, +101,101, 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, 2, 0, 0, 0, 14,105, +117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,115,101, +108,101, 99,116,105,111,110, 0, 2, 0, 0, 0, 13, 83, 69, 76, 69, 67, 84, 73, + 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,116,114,101,101, 95, +115,101,108,101, 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,117, +108,116,105,115,101,108,101, 99,116,105,111,110, 0, 2, 0, 0, 0, 18, 77, 85, + 76, 84, 73, 83, 69, 76, 69, 67, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, + 27,105,117,112, 95,116,114,101,101, 95,109,117,108,116,105,115,101,108,101, 99, +116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,111, +112,101,110, 0, 2, 0, 0, 0, 14, 66, 82, 65, 78, 67, 72, 79, 80, 69, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,116,114,101,101, 95, 98,114, 97, +110, 99,104,111,112,101,110, 95, 99, 98, 0, 2, 0, 0, 0, 12, 98,114, 97,110, + 99,104, 99,108,111,115,101, 0, 2, 0, 0, 0, 15, 66, 82, 65, 78, 67, 72, 67, + 76, 79, 83, 69, 95, 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95,116,114,101, +101, 95, 98,114, 97,110, 99,104, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, + 0, 12,101,120,101, 99,117,116,101,108,101, 97,102, 0, 2, 0, 0, 0, 15, 69, + 88, 69, 67, 85, 84, 69, 76, 69, 65, 70, 95, 67, 66, 0, 2, 0, 0, 0, 24,105, +117,112, 95,116,114,101,101, 95,101,120,101, 99,117,116,101,108,101, 97,102, 95, + 99, 98, 0, 2, 0, 0, 0, 11,114,101,110, 97,109,101,110,111,100,101, 0, 2, + 0, 0, 0, 14, 82, 69, 78, 65, 77, 69, 78, 79, 68, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 23,105,117,112, 95,116,114,101,101, 95,114,101,110, 97,109,101,110,111, +100,101, 95, 99, 98, 0, 2, 0, 0, 0, 9,114,101,110, 97,109,101, 99, 98, 0, + 2, 0, 0, 0, 10, 82, 69, 78, 65, 77, 69, 95, 67, 66, 0, 2, 0, 0, 0, 21, +105,117,112, 95,116,114,101,101, 95,114,101,110, 97,109,101, 99, 98, 95, 99, 98, + 0, 2, 0, 0, 0, 13,115,104,111,119,114,101,110, 97,109,101, 99, 98, 0, 2, + 0, 0, 0, 14, 83, 72, 79, 87, 82, 69, 78, 65, 77, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 25,105,117,112, 95,116,114,101,101, 95,115,104,111,119,114,101,110, 97, +109,101, 99, 98, 95, 99, 98, 0, 2, 0, 0, 0, 11,114,105,103,104,116, 99,108, +105, 99,107, 0, 2, 0, 0, 0, 14, 82, 73, 71, 72, 84, 67, 76, 73, 67, 75, 95, + 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,116,114,101,101, 95,114,105,103, +104,116, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 9,100,114, 97,103, +100,114,111,112, 0, 2, 0, 0, 0, 12, 68, 82, 65, 71, 68, 82, 79, 80, 95, 67, + 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,116,114,101,101, 95,100,114, 97,103, +100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, 13,115,101,108,101, 99,116,105, +111,110, 95, 99, 98, 0, 2, 0, 0, 0, 18,109,117,108,116,105,115,101,108,101, + 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 14, 98,114, 97,110, 99,104, +111,112,101,110, 95, 99, 98, 0, 2, 0, 0, 0, 15, 98,114, 97,110, 99,104, 99, +108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 15,101,120,101, 99,117,116,101, +108,101, 97,102, 95, 99, 98, 0, 2, 0, 0, 0, 14,114,101,110, 97,109,101,110, +111,100,101, 95, 99, 98, 0, 2, 0, 0, 0, 10,114,101,110, 97,109,101, 95, 99, + 98, 0, 2, 0, 0, 0, 14,115,104,111,119,114,101,110, 97,109,101, 95, 99, 98, + 0, 2, 0, 0, 0, 14,114,105,103,104,116, 99,108,105, 99,107, 95, 99, 98, 0, + 2, 0, 0, 0, 12,100,114, 97,103,100,114,111,112, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/tree_be64.lo"); +} diff --git a/iup/srclua3/loh/tree_le64.loh b/iup/srclua3/loh/tree_le64.loh new file mode 100755 index 0000000..e308539 --- /dev/null +++ b/iup/srclua3/loh/tree_le64.loh @@ -0,0 +1,115 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/tree_le64.lo"); +*/ +/* ../obj/iupluacontrols3/tree_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 10, 64,116,114,101,101, 46, +108,117, 97, 0, 0, 0, 1, 24, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, + 22, 0, 25, 3, 15, 0, 11, 4, 11, 5, 26, 11, 7, 25, 6, 15, 8, 11, 9, 15, + 6, 26, 11, 11, 25, 10, 11, 13, 25, 12, 15, 8, 11, 12, 15, 12, 26, 15, 14, 11, + 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 14, 11, 18, 22, 2, 11, 19, 15, + 20, 29, 0, 2, 26, 15, 14, 11, 21, 22, 2, 11, 22, 15, 23, 29, 0, 2, 26, 15, + 14, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 14, 11, 27, 22, 2, 11, + 28, 15, 29, 29, 0, 2, 26, 15, 14, 11, 30, 22, 2, 11, 31, 15, 32, 29, 0, 2, + 26, 15, 14, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, 14, 11, 36, 22, + 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 14, 11, 39, 22, 2, 11, 40, 15, 41, 29, + 0, 2, 26, 15, 14, 11, 42, 22, 2, 11, 43, 15, 44, 29, 0, 2, 26, 15, 14, 11, + 45, 15, 14, 18, 15, 26, 15, 14, 11, 46, 15, 14, 18, 18, 26, 15, 14, 11, 47, 15, + 14, 18, 21, 26, 15, 14, 11, 48, 15, 14, 18, 24, 26, 15, 14, 11, 49, 15, 14, 18, + 27, 26, 15, 14, 11, 50, 15, 14, 18, 30, 26, 15, 14, 11, 51, 15, 14, 18, 33, 26, + 15, 14, 11, 52, 15, 14, 18, 36, 26, 15, 14, 11, 53, 15, 14, 18, 39, 26, 15, 14, + 11, 54, 15, 14, 18, 42, 26, 0, 0, 0, 0, 0, 0, 0, 0, 55, 2, 0, 0, 0, + 8, 73, 85, 80, 84, 82, 69, 69, 0, 2, 0, 0, 0, 7,112, 97,114,101,110,116, + 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, 22, 73, 85, + 80, 84, 82, 69, 69, 82, 69, 70, 69, 82, 69, 78, 67, 69, 84, 65, 66, 76, 69, 0, + 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110, +116, 0, 4, 0, 0, 0, 4, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 14,105,117,112, 67,114, +101, 97,116,101, 84,114,101,101, 0, 2, 0, 0, 0, 8,105,117,112,116,114,101, +101, 0, 4, 0, 0, 0, 8, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 8, 73, 85, 80, + 84, 82, 69, 69, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 5,116,114,101,101, + 0, 2, 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82,101, + 99, 0, 4, 0, 0, 0, 13, 0, 0, 0, 10, 64,116,114,101,101, 46,108,117, 97, + 0, 0, 0, 0,140, 9, 3, 13, 1, 4, 0, 32, 52, 2, 1, 3, 15, 4, 13, 1, + 2, 1, 1, 50,112, 15, 5, 13, 1, 13, 3, 16, 2, 1, 1, 11, 6, 32, 52, 66, + 13, 1, 13, 3, 16, 18, 7, 4, 0, 31, 52, 21, 15, 8, 13, 0, 11, 9, 13, 2, + 42, 13, 1, 13, 3, 16, 18, 7, 2, 0, 3, 50, 14, 15, 8, 13, 0, 11, 9, 13, + 2, 42, 11, 10, 2, 0, 3, 15, 11, 13, 0, 13, 1, 13, 3, 16, 13, 2, 7, 1, + 37, 2, 0, 3, 50, 24, 13, 1, 13, 3, 16, 52, 17, 15, 8, 13, 0, 11, 12, 13, + 2, 42, 13, 1, 13, 3, 16, 2, 0, 3, 13, 3, 7, 1, 38, 23, 3, 13, 3, 7, + 0, 36, 54,119, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 0, 0, 0, 7,104, 97, +110,100,108,101, 0, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 3,105,100, 0, + 2, 0, 0, 0, 5, 99,111,110,116, 0, 2, 0, 0, 0, 5,103,101,116,110, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, + 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,110, 97,109,101, 0, 2, 0, 0, + 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, + 0, 0, 10, 65, 68, 68, 66, 82, 65, 78, 67, 72, 0, 2, 0, 0, 0, 1, 0, 2, + 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, + 2, 0, 0, 0, 8, 65, 68, 68, 76, 69, 65, 70, 0, 2, 0, 0, 0, 13, 84,114, +101,101, 83,101,116, 86, 97,108,117,101, 0, 4, 0, 0, 0, 36, 0, 0, 0, 10, + 64,116,114,101,101, 46,108,117, 97, 0, 0, 0, 0, 59, 6, 2, 15, 2, 13, 1, + 2, 1, 1, 11, 3, 31, 52, 11, 15, 4, 11, 5, 11, 6, 2, 0, 2, 1, 2, 13, + 1, 18, 7, 4, 0, 31, 52, 13, 15, 8, 13, 0, 11, 9, 13, 1, 18, 7, 2, 0, + 3, 15, 10, 13, 0, 13, 1, 7, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 11, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 2,116, 0, + 2, 0, 0, 0, 5,116,121,112,101, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, + 0, 2, 0, 0, 0, 11, 73,117,112, 77,101,115,115, 97,103,101, 0, 2, 0, 0, + 0, 14, 84,114,101,101, 76,117, 97, 32, 69,114,114,111,114, 0, 2, 0, 0, 0, + 45, 73,110, 99,111,114,114,101, 99,116, 32, 97,114,103,117,109,101,110,116,115, + 32,116,111, 32,102,117,110, 99,116,105,111,110, 32, 84,114,101,101, 83,101,116, + 86, 97,108,117,101, 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,110, 97,109, +101, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 2, 0, 0, 0, 5, 78, 65, 77, 69, 0, 2, 0, 0, 0, 16, 84,114, +101,101, 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, 2, 0, 0, 0, 14,105, +117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,115,101, +108,101, 99,116,105,111,110, 0, 2, 0, 0, 0, 13, 83, 69, 76, 69, 67, 84, 73, + 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 22,105,117,112, 95,116,114,101,101, 95, +115,101,108,101, 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,117, +108,116,105,115,101,108,101, 99,116,105,111,110, 0, 2, 0, 0, 0, 18, 77, 85, + 76, 84, 73, 83, 69, 76, 69, 67, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, + 27,105,117,112, 95,116,114,101,101, 95,109,117,108,116,105,115,101,108,101, 99, +116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,111, +112,101,110, 0, 2, 0, 0, 0, 14, 66, 82, 65, 78, 67, 72, 79, 80, 69, 78, 95, + 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,116,114,101,101, 95, 98,114, 97, +110, 99,104,111,112,101,110, 95, 99, 98, 0, 2, 0, 0, 0, 12, 98,114, 97,110, + 99,104, 99,108,111,115,101, 0, 2, 0, 0, 0, 15, 66, 82, 65, 78, 67, 72, 67, + 76, 79, 83, 69, 95, 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95,116,114,101, +101, 95, 98,114, 97,110, 99,104, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, + 0, 12,101,120,101, 99,117,116,101,108,101, 97,102, 0, 2, 0, 0, 0, 15, 69, + 88, 69, 67, 85, 84, 69, 76, 69, 65, 70, 95, 67, 66, 0, 2, 0, 0, 0, 24,105, +117,112, 95,116,114,101,101, 95,101,120,101, 99,117,116,101,108,101, 97,102, 95, + 99, 98, 0, 2, 0, 0, 0, 11,114,101,110, 97,109,101,110,111,100,101, 0, 2, + 0, 0, 0, 14, 82, 69, 78, 65, 77, 69, 78, 79, 68, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 23,105,117,112, 95,116,114,101,101, 95,114,101,110, 97,109,101,110,111, +100,101, 95, 99, 98, 0, 2, 0, 0, 0, 9,114,101,110, 97,109,101, 99, 98, 0, + 2, 0, 0, 0, 10, 82, 69, 78, 65, 77, 69, 95, 67, 66, 0, 2, 0, 0, 0, 21, +105,117,112, 95,116,114,101,101, 95,114,101,110, 97,109,101, 99, 98, 95, 99, 98, + 0, 2, 0, 0, 0, 13,115,104,111,119,114,101,110, 97,109,101, 99, 98, 0, 2, + 0, 0, 0, 14, 83, 72, 79, 87, 82, 69, 78, 65, 77, 69, 95, 67, 66, 0, 2, 0, + 0, 0, 25,105,117,112, 95,116,114,101,101, 95,115,104,111,119,114,101,110, 97, +109,101, 99, 98, 95, 99, 98, 0, 2, 0, 0, 0, 11,114,105,103,104,116, 99,108, +105, 99,107, 0, 2, 0, 0, 0, 14, 82, 73, 71, 72, 84, 67, 76, 73, 67, 75, 95, + 67, 66, 0, 2, 0, 0, 0, 23,105,117,112, 95,116,114,101,101, 95,114,105,103, +104,116, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 9,100,114, 97,103, +100,114,111,112, 0, 2, 0, 0, 0, 12, 68, 82, 65, 71, 68, 82, 79, 80, 95, 67, + 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,116,114,101,101, 95,100,114, 97,103, +100,114,111,112, 95, 99, 98, 0, 2, 0, 0, 0, 13,115,101,108,101, 99,116,105, +111,110, 95, 99, 98, 0, 2, 0, 0, 0, 18,109,117,108,116,105,115,101,108,101, + 99,116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 14, 98,114, 97,110, 99,104, +111,112,101,110, 95, 99, 98, 0, 2, 0, 0, 0, 15, 98,114, 97,110, 99,104, 99, +108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 15,101,120,101, 99,117,116,101, +108,101, 97,102, 95, 99, 98, 0, 2, 0, 0, 0, 14,114,101,110, 97,109,101,110, +111,100,101, 95, 99, 98, 0, 2, 0, 0, 0, 10,114,101,110, 97,109,101, 95, 99, + 98, 0, 2, 0, 0, 0, 14,115,104,111,119,114,101,110, 97,109,101, 95, 99, 98, + 0, 2, 0, 0, 0, 14,114,105,103,104,116, 99,108,105, 99,107, 95, 99, 98, 0, + 2, 0, 0, 0, 12,100,114, 97,103,100,114,111,112, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/tree_le64.lo"); +} diff --git a/iup/srclua3/loh/tree_le64w.loh b/iup/srclua3/loh/tree_le64w.loh new file mode 100755 index 0000000..4db63e3 --- /dev/null +++ b/iup/srclua3/loh/tree_le64w.loh @@ -0,0 +1,116 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luatree_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luatree_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 13, 64,108,117, 97,116,114, +101,101, 46,108,117, 97, 0, 0, 0, 1, 24, 5, 0, 22, 1, 11, 1, 15, 2, 30, + 0, 25, 0, 22, 0, 25, 3, 15, 0, 11, 4, 11, 5, 26, 11, 7, 25, 6, 15, 8, + 11, 9, 15, 6, 26, 11, 11, 25, 10, 11, 13, 25, 12, 15, 8, 11, 12, 15, 12, 26, + 15, 14, 11, 15, 22, 2, 11, 16, 15, 17, 29, 0, 2, 26, 15, 14, 11, 18, 22, 2, + 11, 19, 15, 20, 29, 0, 2, 26, 15, 14, 11, 21, 22, 2, 11, 22, 15, 23, 29, 0, + 2, 26, 15, 14, 11, 24, 22, 2, 11, 25, 15, 26, 29, 0, 2, 26, 15, 14, 11, 27, + 22, 2, 11, 28, 15, 29, 29, 0, 2, 26, 15, 14, 11, 30, 22, 2, 11, 31, 15, 32, + 29, 0, 2, 26, 15, 14, 11, 33, 22, 2, 11, 34, 15, 35, 29, 0, 2, 26, 15, 14, + 11, 36, 22, 2, 11, 37, 15, 38, 29, 0, 2, 26, 15, 14, 11, 39, 22, 2, 11, 40, + 15, 41, 29, 0, 2, 26, 15, 14, 11, 42, 22, 2, 11, 43, 15, 44, 29, 0, 2, 26, + 15, 14, 11, 45, 15, 14, 18, 15, 26, 15, 14, 11, 46, 15, 14, 18, 18, 26, 15, 14, + 11, 47, 15, 14, 18, 21, 26, 15, 14, 11, 48, 15, 14, 18, 24, 26, 15, 14, 11, 49, + 15, 14, 18, 27, 26, 15, 14, 11, 50, 15, 14, 18, 30, 26, 15, 14, 11, 51, 15, 14, + 18, 33, 26, 15, 14, 11, 52, 15, 14, 18, 36, 26, 15, 14, 11, 53, 15, 14, 18, 39, + 26, 15, 14, 11, 54, 15, 14, 18, 42, 26, 0, 0, 0, 0, 0, 0, 0, 0, 55, 2, + 0, 0, 0, 8, 73, 85, 80, 84, 82, 69, 69, 0, 2, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 2, 0, 0, 0, + 22, 73, 85, 80, 84, 82, 69, 69, 82, 69, 70, 69, 82, 69, 78, 67, 69, 84, 65, 66, + 76, 69, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101, +109,101,110,116, 0, 4, 0, 0, 0, 4, 0, 0, 0, 13, 64,108,117, 97,116,114, +101,101, 46,108,117, 97, 0, 0, 0, 0, 8, 3, 2, 15, 1, 3, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, + 14,105,117,112, 67,114,101, 97,116,101, 84,114,101,101, 0, 2, 0, 0, 0, 8, +105,117,112,116,114,101,101, 0, 4, 0, 0, 0, 8, 0, 0, 0, 13, 64,108,117, + 97,116,114,101,101, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, + 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, + 0, 2, 0, 0, 0, 8, 73, 85, 80, 84, 82, 69, 69, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, + 2, 0, 0, 0, 5,116,114,101,101, 0, 2, 0, 0, 0, 16, 84,114,101,101, 83, +101,116, 86, 97,108,117,101, 82,101, 99, 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, + 64,108,117, 97,116,114,101,101, 46,108,117, 97, 0, 0, 0, 0,140, 9, 3, 13, + 1, 4, 0, 32, 52, 2, 1, 3, 15, 4, 13, 1, 2, 1, 1, 50,112, 15, 5, 13, + 1, 13, 3, 16, 2, 1, 1, 11, 6, 32, 52, 66, 13, 1, 13, 3, 16, 18, 7, 4, + 0, 31, 52, 21, 15, 8, 13, 0, 11, 9, 13, 2, 42, 13, 1, 13, 3, 16, 18, 7, + 2, 0, 3, 50, 14, 15, 8, 13, 0, 11, 9, 13, 2, 42, 11, 10, 2, 0, 3, 15, + 11, 13, 0, 13, 1, 13, 3, 16, 13, 2, 7, 1, 37, 2, 0, 3, 50, 24, 13, 1, + 13, 3, 16, 52, 17, 15, 8, 13, 0, 11, 12, 13, 2, 42, 13, 1, 13, 3, 16, 2, + 0, 3, 13, 3, 7, 1, 38, 23, 3, 13, 3, 7, 0, 36, 54,119, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 2, 0, 0, + 0, 2,116, 0, 2, 0, 0, 0, 3,105,100, 0, 2, 0, 0, 0, 5, 99,111,110, +116, 0, 2, 0, 0, 0, 5,103,101,116,110, 0, 2, 0, 0, 0, 5,116,121,112, +101, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, 2, 0, 0, 0, 11, 98,114, + 97,110, 99,104,110, 97,109,101, 0, 2, 0, 0, 0, 16, 73,117,112, 83,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 2, 0, 0, 0, 10, 65, 68, 68, 66, 82, + 65, 78, 67, 72, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, 16, 84,114,101,101, + 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, 2, 0, 0, 0, 8, 65, 68, 68, + 76, 69, 65, 70, 0, 2, 0, 0, 0, 13, 84,114,101,101, 83,101,116, 86, 97,108, +117,101, 0, 4, 0, 0, 0, 36, 0, 0, 0, 13, 64,108,117, 97,116,114,101,101, + 46,108,117, 97, 0, 0, 0, 0, 59, 6, 2, 15, 2, 13, 1, 2, 1, 1, 11, 3, + 31, 52, 11, 15, 4, 11, 5, 11, 6, 2, 0, 2, 1, 2, 13, 1, 18, 7, 4, 0, + 31, 52, 13, 15, 8, 13, 0, 11, 9, 13, 1, 18, 7, 2, 0, 3, 15, 10, 13, 0, + 13, 1, 7, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 11, 2, 0, 0, 0, + 7,104, 97,110,100,108,101, 0, 2, 0, 0, 0, 2,116, 0, 2, 0, 0, 0, 5, +116,121,112,101, 0, 2, 0, 0, 0, 6,116, 97, 98,108,101, 0, 2, 0, 0, 0, + 11, 73,117,112, 77,101,115,115, 97,103,101, 0, 2, 0, 0, 0, 14, 84,114,101, +101, 76,117, 97, 32, 69,114,114,111,114, 0, 2, 0, 0, 0, 45, 73,110, 99,111, +114,114,101, 99,116, 32, 97,114,103,117,109,101,110,116,115, 32,116,111, 32,102, +117,110, 99,116,105,111,110, 32, 84,114,101,101, 83,101,116, 86, 97,108,117,101, + 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,110, 97,109,101, 0, 2, 0, 0, + 0, 16, 73,117,112, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 2, 0, + 0, 0, 5, 78, 65, 77, 69, 0, 2, 0, 0, 0, 16, 84,114,101,101, 83,101,116, + 86, 97,108,117,101, 82,101, 99, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97, +108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,115,101,108,101, 99,116,105, +111,110, 0, 2, 0, 0, 0, 13, 83, 69, 76, 69, 67, 84, 73, 79, 78, 95, 67, 66, + 0, 2, 0, 0, 0, 22,105,117,112, 95,116,114,101,101, 95,115,101,108,101, 99, +116,105,111,110, 95, 99, 98, 0, 2, 0, 0, 0, 15,109,117,108,116,105,115,101, +108,101, 99,116,105,111,110, 0, 2, 0, 0, 0, 18, 77, 85, 76, 84, 73, 83, 69, + 76, 69, 67, 84, 73, 79, 78, 95, 67, 66, 0, 2, 0, 0, 0, 27,105,117,112, 95, +116,114,101,101, 95,109,117,108,116,105,115,101,108,101, 99,116,105,111,110, 95, + 99, 98, 0, 2, 0, 0, 0, 11, 98,114, 97,110, 99,104,111,112,101,110, 0, 2, + 0, 0, 0, 14, 66, 82, 65, 78, 67, 72, 79, 80, 69, 78, 95, 67, 66, 0, 2, 0, + 0, 0, 23,105,117,112, 95,116,114,101,101, 95, 98,114, 97,110, 99,104,111,112, +101,110, 95, 99, 98, 0, 2, 0, 0, 0, 12, 98,114, 97,110, 99,104, 99,108,111, +115,101, 0, 2, 0, 0, 0, 15, 66, 82, 65, 78, 67, 72, 67, 76, 79, 83, 69, 95, + 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95,116,114,101,101, 95, 98,114, 97, +110, 99,104, 99,108,111,115,101, 95, 99, 98, 0, 2, 0, 0, 0, 12,101,120,101, + 99,117,116,101,108,101, 97,102, 0, 2, 0, 0, 0, 15, 69, 88, 69, 67, 85, 84, + 69, 76, 69, 65, 70, 95, 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95,116,114, +101,101, 95,101,120,101, 99,117,116,101,108,101, 97,102, 95, 99, 98, 0, 2, 0, + 0, 0, 11,114,101,110, 97,109,101,110,111,100,101, 0, 2, 0, 0, 0, 14, 82, + 69, 78, 65, 77, 69, 78, 79, 68, 69, 95, 67, 66, 0, 2, 0, 0, 0, 23,105,117, +112, 95,116,114,101,101, 95,114,101,110, 97,109,101,110,111,100,101, 95, 99, 98, + 0, 2, 0, 0, 0, 9,114,101,110, 97,109,101, 99, 98, 0, 2, 0, 0, 0, 10, + 82, 69, 78, 65, 77, 69, 95, 67, 66, 0, 2, 0, 0, 0, 21,105,117,112, 95,116, +114,101,101, 95,114,101,110, 97,109,101, 99, 98, 95, 99, 98, 0, 2, 0, 0, 0, + 13,115,104,111,119,114,101,110, 97,109,101, 99, 98, 0, 2, 0, 0, 0, 14, 83, + 72, 79, 87, 82, 69, 78, 65, 77, 69, 95, 67, 66, 0, 2, 0, 0, 0, 25,105,117, +112, 95,116,114,101,101, 95,115,104,111,119,114,101,110, 97,109,101, 99, 98, 95, + 99, 98, 0, 2, 0, 0, 0, 11,114,105,103,104,116, 99,108,105, 99,107, 0, 2, + 0, 0, 0, 14, 82, 73, 71, 72, 84, 67, 76, 73, 67, 75, 95, 67, 66, 0, 2, 0, + 0, 0, 23,105,117,112, 95,116,114,101,101, 95,114,105,103,104,116, 99,108,105, + 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 9,100,114, 97,103,100,114,111,112, 0, + 2, 0, 0, 0, 12, 68, 82, 65, 71, 68, 82, 79, 80, 95, 67, 66, 0, 2, 0, 0, + 0, 21,105,117,112, 95,116,114,101,101, 95,100,114, 97,103,100,114,111,112, 95, + 99, 98, 0, 2, 0, 0, 0, 13,115,101,108,101, 99,116,105,111,110, 95, 99, 98, + 0, 2, 0, 0, 0, 18,109,117,108,116,105,115,101,108,101, 99,116,105,111,110, + 95, 99, 98, 0, 2, 0, 0, 0, 14, 98,114, 97,110, 99,104,111,112,101,110, 95, + 99, 98, 0, 2, 0, 0, 0, 15, 98,114, 97,110, 99,104, 99,108,111,115,101, 95, + 99, 98, 0, 2, 0, 0, 0, 15,101,120,101, 99,117,116,101,108,101, 97,102, 95, + 99, 98, 0, 2, 0, 0, 0, 14,114,101,110, 97,109,101,110,111,100,101, 95, 99, + 98, 0, 2, 0, 0, 0, 10,114,101,110, 97,109,101, 95, 99, 98, 0, 2, 0, 0, + 0, 14,115,104,111,119,114,101,110, 97,109,101, 95, 99, 98, 0, 2, 0, 0, 0, + 14,114,105,103,104,116, 99,108,105, 99,107, 95, 99, 98, 0, 2, 0, 0, 0, 12, +100,114, 97,103,100,114,111,112, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luatree_le64w.lo"); +} diff --git a/iup/srclua3/loh/val.loh b/iup/srclua3/loh/val.loh new file mode 100755 index 0000000..19d0a55 --- /dev/null +++ b/iup/srclua3/loh/val.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/val.lo"); +*/ +/* ../obj/iuplua3/val.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 9, 64,118, 97,108, 46,108, +117, 97, 0, 0, 0, 0,109, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, 15, + 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, 9, 11, + 10, 22, 2, 11, 11, 4, 0, 29, 0, 2, 26, 15, 9, 11, 12, 15, 9, 18, 10, 26, + 15, 9, 18, 10, 11, 8, 15, 13, 26, 15, 9, 11, 14, 22, 2, 11, 15, 15, 16, 29, + 0, 2, 26, 15, 9, 11, 17, 22, 2, 11, 18, 15, 19, 29, 0, 2, 26, 15, 9, 11, + 20, 15, 9, 18, 14, 26, 15, 9, 11, 21, 15, 9, 18, 17, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 2, 0, 0, 0, 7, 73, 85, 80, 86, 65, 76, 0, 2, 0, 0, 0, + 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, + 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110, +116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 9, 64,118, 97,108, 46,108,117, 97, 0, + 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 13,105, +117,112, 67,114,101, 97,116,101, 86, 97,108, 0, 2, 0, 0, 0, 7,105,117,112, +118, 97,108, 0, 4, 0, 0, 0, 7, 0, 0, 0, 9, 64,118, 97,108, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 7, 73, 85, + 80, 86, 65, 76, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 4,118, 97,108, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 10,109,111,117,115,101,109,111,118,101, 0, 2, 0, 0, 0, 13, 77, + 79, 85, 83, 69, 77, 79, 86, 69, 95, 67, 66, 0, 2, 0, 0, 0, 13,109,111,117, +115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, 21,105,117,112, 95,118, + 97,108, 95,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, + 12, 98,117,116,116,111,110,112,114,101,115,115, 0, 2, 0, 0, 0, 16, 66, 85, + 84, 84, 79, 78, 95, 80, 82, 69, 83, 83, 95, 67, 66, 0, 2, 0, 0, 0, 24,105, +117,112, 95,118, 97,108, 95, 98,117,116,116,111,110, 95,112,114,101,115,115, 95, + 99, 98, 0, 2, 0, 0, 0, 14, 98,117,116,116,111,110,114,101,108,101, 97,115, +101, 0, 2, 0, 0, 0, 18, 66, 85, 84, 84, 79, 78, 95, 82, 69, 76, 69, 65, 83, + 69, 95, 67, 66, 0, 2, 0, 0, 0, 26,105,117,112, 95,118, 97,108, 95, 98,117, +116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, 2, 0, 0, 0, + 16, 98,117,116,116,111,110, 95,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, + 0, 18, 98,117,116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, + +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/val.lo"); +} diff --git a/iup/srclua3/loh/val_be32.loh b/iup/srclua3/loh/val_be32.loh new file mode 100755 index 0000000..58971c8 --- /dev/null +++ b/iup/srclua3/loh/val_be32.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/val_be32.lo"); +*/ +/* ../obj/iuplua3/val_be32.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 9, 64,118, 97,108, 46,108, +117, 97, 0, 0, 0, 0,109, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, 15, + 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, 9, 11, + 10, 22, 2, 11, 11, 4, 0, 29, 0, 2, 26, 15, 9, 11, 12, 15, 9, 18, 10, 26, + 15, 9, 18, 10, 11, 8, 15, 13, 26, 15, 9, 11, 14, 22, 2, 11, 15, 15, 16, 29, + 0, 2, 26, 15, 9, 11, 17, 22, 2, 11, 18, 15, 19, 29, 0, 2, 26, 15, 9, 11, + 20, 15, 9, 18, 14, 26, 15, 9, 11, 21, 15, 9, 18, 17, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 2, 0, 0, 0, 7, 73, 85, 80, 86, 65, 76, 0, 2, 0, 0, 0, + 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, + 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110, +116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 9, 64,118, 97,108, 46,108,117, 97, 0, + 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 13,105, +117,112, 67,114,101, 97,116,101, 86, 97,108, 0, 2, 0, 0, 0, 7,105,117,112, +118, 97,108, 0, 4, 0, 0, 0, 7, 0, 0, 0, 9, 64,118, 97,108, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 7, 73, 85, + 80, 86, 65, 76, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 4,118, 97,108, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 10,109,111,117,115,101,109,111,118,101, 0, 2, 0, 0, 0, 13, 77, + 79, 85, 83, 69, 77, 79, 86, 69, 95, 67, 66, 0, 2, 0, 0, 0, 13,109,111,117, +115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, 21,105,117,112, 95,118, + 97,108, 95,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, + 12, 98,117,116,116,111,110,112,114,101,115,115, 0, 2, 0, 0, 0, 16, 66, 85, + 84, 84, 79, 78, 95, 80, 82, 69, 83, 83, 95, 67, 66, 0, 2, 0, 0, 0, 24,105, +117,112, 95,118, 97,108, 95, 98,117,116,116,111,110, 95,112,114,101,115,115, 95, + 99, 98, 0, 2, 0, 0, 0, 14, 98,117,116,116,111,110,114,101,108,101, 97,115, +101, 0, 2, 0, 0, 0, 18, 66, 85, 84, 84, 79, 78, 95, 82, 69, 76, 69, 65, 83, + 69, 95, 67, 66, 0, 2, 0, 0, 0, 26,105,117,112, 95,118, 97,108, 95, 98,117, +116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, 2, 0, 0, 0, + 16, 98,117,116,116,111,110, 95,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, + 0, 18, 98,117,116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, + +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/val_be32.lo"); +} diff --git a/iup/srclua3/loh/val_be64.loh b/iup/srclua3/loh/val_be64.loh new file mode 100755 index 0000000..d65e14b --- /dev/null +++ b/iup/srclua3/loh/val_be64.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/val_be64.lo"); +*/ +/* ../obj/iuplua3/val_be64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 9, 64,118, 97,108, 46,108, +117, 97, 0, 0, 0, 0,109, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, 15, + 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, 9, 11, + 10, 22, 2, 11, 11, 4, 0, 29, 0, 2, 26, 15, 9, 11, 12, 15, 9, 18, 10, 26, + 15, 9, 18, 10, 11, 8, 15, 13, 26, 15, 9, 11, 14, 22, 2, 11, 15, 15, 16, 29, + 0, 2, 26, 15, 9, 11, 17, 22, 2, 11, 18, 15, 19, 29, 0, 2, 26, 15, 9, 11, + 20, 15, 9, 18, 14, 26, 15, 9, 11, 21, 15, 9, 18, 17, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 2, 0, 0, 0, 7, 73, 85, 80, 86, 65, 76, 0, 2, 0, 0, 0, + 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, + 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110, +116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 9, 64,118, 97,108, 46,108,117, 97, 0, + 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 13,105, +117,112, 67,114,101, 97,116,101, 86, 97,108, 0, 2, 0, 0, 0, 7,105,117,112, +118, 97,108, 0, 4, 0, 0, 0, 7, 0, 0, 0, 9, 64,118, 97,108, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 7, 73, 85, + 80, 86, 65, 76, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 4,118, 97,108, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 10,109,111,117,115,101,109,111,118,101, 0, 2, 0, 0, 0, 13, 77, + 79, 85, 83, 69, 77, 79, 86, 69, 95, 67, 66, 0, 2, 0, 0, 0, 13,109,111,117, +115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, 21,105,117,112, 95,118, + 97,108, 95,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, + 12, 98,117,116,116,111,110,112,114,101,115,115, 0, 2, 0, 0, 0, 16, 66, 85, + 84, 84, 79, 78, 95, 80, 82, 69, 83, 83, 95, 67, 66, 0, 2, 0, 0, 0, 24,105, +117,112, 95,118, 97,108, 95, 98,117,116,116,111,110, 95,112,114,101,115,115, 95, + 99, 98, 0, 2, 0, 0, 0, 14, 98,117,116,116,111,110,114,101,108,101, 97,115, +101, 0, 2, 0, 0, 0, 18, 66, 85, 84, 84, 79, 78, 95, 82, 69, 76, 69, 65, 83, + 69, 95, 67, 66, 0, 2, 0, 0, 0, 26,105,117,112, 95,118, 97,108, 95, 98,117, +116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, 2, 0, 0, 0, + 16, 98,117,116,116,111,110, 95,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, + 0, 18, 98,117,116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, + +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/val_be64.lo"); +} diff --git a/iup/srclua3/loh/val_le64.loh b/iup/srclua3/loh/val_le64.loh new file mode 100755 index 0000000..179e80a --- /dev/null +++ b/iup/srclua3/loh/val_le64.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iuplua3/val_le64.lo"); +*/ +/* ../obj/iuplua3/val_le64.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 9, 64,118, 97,108, 46,108, +117, 97, 0, 0, 0, 0,109, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, 25, 0, 15, + 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, 15, 9, 11, + 10, 22, 2, 11, 11, 4, 0, 29, 0, 2, 26, 15, 9, 11, 12, 15, 9, 18, 10, 26, + 15, 9, 18, 10, 11, 8, 15, 13, 26, 15, 9, 11, 14, 22, 2, 11, 15, 15, 16, 29, + 0, 2, 26, 15, 9, 11, 17, 22, 2, 11, 18, 15, 19, 29, 0, 2, 26, 15, 9, 11, + 20, 15, 9, 18, 14, 26, 15, 9, 11, 21, 15, 9, 18, 17, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 2, 0, 0, 0, 7, 73, 85, 80, 86, 65, 76, 0, 2, 0, 0, 0, + 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, + 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101,109,101,110, +116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 9, 64,118, 97,108, 46,108,117, 97, 0, + 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, 2, 0, 0, 0, 13,105, +117,112, 67,114,101, 97,116,101, 86, 97,108, 0, 2, 0, 0, 0, 7,105,117,112, +118, 97,108, 0, 4, 0, 0, 0, 7, 0, 0, 0, 9, 64,118, 97,108, 46,108,117, + 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, 2, 13, 0, 3, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2,111, 0, 2, 0, 0, 0, 7, 73, 85, + 80, 86, 65, 76, 0, 2, 0, 0, 0, 12, 67,111,110,115,116,114,117, 99,116,111, +114, 0, 2, 0, 0, 0, 4,105,117,112, 0, 2, 0, 0, 0, 4,118, 97,108, 0, + 2, 0, 0, 0, 14,105,117,112, 95, 99, 97,108,108, 98, 97, 99,107,115, 0, 2, + 0, 0, 0, 10,109,111,117,115,101,109,111,118,101, 0, 2, 0, 0, 0, 13, 77, + 79, 85, 83, 69, 77, 79, 86, 69, 95, 67, 66, 0, 2, 0, 0, 0, 13,109,111,117, +115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, 21,105,117,112, 95,118, + 97,108, 95,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 2, 0, 0, 0, + 12, 98,117,116,116,111,110,112,114,101,115,115, 0, 2, 0, 0, 0, 16, 66, 85, + 84, 84, 79, 78, 95, 80, 82, 69, 83, 83, 95, 67, 66, 0, 2, 0, 0, 0, 24,105, +117,112, 95,118, 97,108, 95, 98,117,116,116,111,110, 95,112,114,101,115,115, 95, + 99, 98, 0, 2, 0, 0, 0, 14, 98,117,116,116,111,110,114,101,108,101, 97,115, +101, 0, 2, 0, 0, 0, 18, 66, 85, 84, 84, 79, 78, 95, 82, 69, 76, 69, 65, 83, + 69, 95, 67, 66, 0, 2, 0, 0, 0, 26,105,117,112, 95,118, 97,108, 95, 98,117, +116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, 2, 0, 0, 0, + 16, 98,117,116,116,111,110, 95,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, + 0, 18, 98,117,116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, + +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iuplua3/val_le64.lo"); +} diff --git a/iup/srclua3/loh/val_le64w.loh b/iup/srclua3/loh/val_le64w.loh new file mode 100755 index 0000000..65ce1be --- /dev/null +++ b/iup/srclua3/loh/val_le64w.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + lua_dofile("../obj/iupluacontrols3/luaval_le64w.lo"); +*/ +/* ../obj/iupluacontrols3/luaval_le64w.lo */ +static unsigned char B1[]={ + 27, 76,117, 97, 50, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64,108,117, 97,118, 97, +108, 46,108,117, 97, 0, 0, 0, 0,109, 5, 0, 22, 1, 11, 1, 15, 2, 30, 0, + 25, 0, 15, 0, 11, 3, 11, 4, 26, 11, 6, 25, 5, 15, 7, 11, 8, 15, 5, 26, + 15, 9, 11, 10, 22, 2, 11, 11, 4, 0, 29, 0, 2, 26, 15, 9, 11, 12, 15, 9, + 18, 10, 26, 15, 9, 18, 10, 11, 8, 15, 13, 26, 15, 9, 11, 14, 22, 2, 11, 15, + 15, 16, 29, 0, 2, 26, 15, 9, 11, 17, 22, 2, 11, 18, 15, 19, 29, 0, 2, 26, + 15, 9, 11, 20, 15, 9, 18, 14, 26, 15, 9, 11, 21, 15, 9, 18, 17, 26, 0, 0, + 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 7, 73, 85, 80, 86, 65, 76, 0, 2, + 0, 0, 0, 7,112, 97,114,101,110,116, 0, 2, 0, 0, 0, 7, 87, 73, 68, 71, + 69, 84, 0, 2, 0, 0, 0, 17, 67,114,101, 97,116,101, 73, 85, 80,101,108,101, +109,101,110,116, 0, 4, 0, 0, 0, 3, 0, 0, 0, 12, 64,108,117, 97,118, 97, +108, 46,108,117, 97, 0, 0, 0, 0, 13, 5, 2, 15, 1, 13, 1, 7, 1, 16, 3, + 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4,111, 98,106, 0, + 2, 0, 0, 0, 13,105,117,112, 67,114,101, 97,116,101, 86, 97,108, 0, 2, 0, + 0, 0, 7,105,117,112,118, 97,108, 0, 4, 0, 0, 0, 7, 0, 0, 0, 12, 64, +108,117, 97,118, 97,108, 46,108,117, 97, 0, 0, 0, 0, 12, 4, 1, 15, 1, 20, + 2, 13, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 2, +111, 0, 2, 0, 0, 0, 7, 73, 85, 80, 86, 65, 76, 0, 2, 0, 0, 0, 12, 67, +111,110,115,116,114,117, 99,116,111,114, 0, 2, 0, 0, 0, 4,105,117,112, 0, + 2, 0, 0, 0, 4,118, 97,108, 0, 2, 0, 0, 0, 14,105,117,112, 95, 99, 97, +108,108, 98, 97, 99,107,115, 0, 2, 0, 0, 0, 10,109,111,117,115,101,109,111, +118,101, 0, 2, 0, 0, 0, 13, 77, 79, 85, 83, 69, 77, 79, 86, 69, 95, 67, 66, + 0, 2, 0, 0, 0, 13,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 2, + 0, 0, 0, 21,105,117,112, 95,118, 97,108, 95,109,111,117,115,101,109,111,118, +101, 95, 99, 98, 0, 2, 0, 0, 0, 12, 98,117,116,116,111,110,112,114,101,115, +115, 0, 2, 0, 0, 0, 16, 66, 85, 84, 84, 79, 78, 95, 80, 82, 69, 83, 83, 95, + 67, 66, 0, 2, 0, 0, 0, 24,105,117,112, 95,118, 97,108, 95, 98,117,116,116, +111,110, 95,112,114,101,115,115, 95, 99, 98, 0, 2, 0, 0, 0, 14, 98,117,116, +116,111,110,114,101,108,101, 97,115,101, 0, 2, 0, 0, 0, 18, 66, 85, 84, 84, + 79, 78, 95, 82, 69, 76, 69, 65, 83, 69, 95, 67, 66, 0, 2, 0, 0, 0, 26,105, +117,112, 95,118, 97,108, 95, 98,117,116,116,111,110, 95,114,101,108,101, 97,115, +101, 95, 99, 98, 0, 2, 0, 0, 0, 16, 98,117,116,116,111,110, 95,112,114,101, +115,115, 95, 99, 98, 0, 2, 0, 0, 0, 18, 98,117,116,116,111,110, 95,114,101, +108,101, 97,115,101, 95, 99, 98, 0, +}; + + lua_dobuffer((char*)B1,sizeof(B1),"../obj/iupluacontrols3/luaval_le64w.lo"); +} diff --git a/iup/srclua3/make_uname b/iup/srclua3/make_uname new file mode 100755 index 0000000..f87a836 --- /dev/null +++ b/iup/srclua3/make_uname @@ -0,0 +1,8 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake $1 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iupcd $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iupcontrols $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iup_pplot $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iupgl $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iupim $2 $3 $4 $5 $6 $7 $8 diff --git a/iup/srclua3/make_uname.bat b/iup/srclua3/make_uname.bat new file mode 100755 index 0000000..0cb97de --- /dev/null +++ b/iup/srclua3/make_uname.bat @@ -0,0 +1,10 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +call tecmake %1 %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupcd" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupcontrols" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iup_pplot" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupgl" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupim" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupole" %2 %3 %4 %5 %6 %7 %8 diff --git a/iup/srclua3/matrix.lua b/iup/srclua3/matrix.lua new file mode 100755 index 0000000..26ca723 --- /dev/null +++ b/iup/srclua3/matrix.lua @@ -0,0 +1,54 @@ +IUPMATRIX = {parent = WIDGET} + +function IUPMATRIX:CreateIUPelement (obj) + return iupCreateMatrix () +end + +function IUPMATRIX:setcell(l,c,val) + IupSetAttribute(self,l..":"..c,val) +end + +function IUPMATRIX:getcell(l,c,val) + return IupGetAttribute(self,l..":"..c) +end + +function iupmatrix (o) + return IUPMATRIX:Constructor (o) +end +iup.matrix = iupmatrix + + +iup_callbacks.actioncb.matrix = iup_mat_action_cb +iup_callbacks.mousemove.matrix = iup_mat_mousemove_cb + +iup_callbacks.edition = {"EDITION_CB", iup_mat_edition_cb} +iup_callbacks.drop = {"DROP_CB", iup_mat_drop_cb} +iup_callbacks.dropselect = {"DROPSELECT_CB", iup_mat_dropselect_cb} +iup_callbacks.enteritem = {"ENTERITEM_CB", iup_mat_enteritem_cb} +iup_callbacks.leaveitem = {"LEAVEITEM_CB", iup_mat_leaveitem_cb} +iup_callbacks.click = {"CLICK_CB", iup_mat_click_cb} +iup_callbacks.scrolltop = {"SCROLLTOP_CB", iup_mat_scrolltop_cb} +iup_callbacks.valuecb = {"VALUE_CB", iup_mat_value_cb} +iup_callbacks.draw = {"DRAW_CB", iup_mat_draw_cb} +iup_callbacks.dropcheck = {"DROPCHECK_CB", iup_mat_dropcheck_cb} +iup_callbacks.fgcolorcb = {"FGCOLOR_CB", iup_mat_fgcolor_cb} +iup_callbacks.bgcolorcb = {"BGCOLOR_CB", iup_mat_bgcolor_cb} +iup_callbacks.value_edit = {"VALUE_EDIT_CB", iup_mat_value_edit_cb} +iup_callbacks.markedit_cb = {"MARKEDIT_CB", iup_mat_markedit_cb} +iup_callbacks.mark_cb = {"MARK_CB", iup_mat_mark_cb} +iup_callbacks.mouse_cb = {"MOUSE_CB", iup_mat_mouse_cb} +iup_callbacks.font_cb = {"FONT_CB", iup_mat_font_cb} + +iup_callbacks.edition_cb = iup_callbacks.edition +iup_callbacks.drop_cb = iup_callbacks.drop +iup_callbacks.dropselect_cb = iup_callbacks.dropselect +iup_callbacks.enteritem_cb = iup_callbacks.enteritem +iup_callbacks.leaveitem_cb = iup_callbacks.leaveitem +iup_callbacks.click_cb = iup_callbacks.click +iup_callbacks.scrolltop_cb = iup_callbacks.scrolltop +iup_callbacks.value_cb = iup_callbacks.valuecb +iup_callbacks.draw_cb = iup_callbacks.draw +iup_callbacks.dropcheck_cb = iup_callbacks.dropcheck +iup_callbacks.fgcolor_cb = iup_callbacks.fgcolorcb +iup_callbacks.bgcolor_cb = iup_callbacks.bgcolorcb +iup_callbacks.value_edit_cb = iup_callbacks.value_edit diff --git a/iup/srclua3/pplot.lua b/iup/srclua3/pplot.lua new file mode 100755 index 0000000..ba51893 --- /dev/null +++ b/iup/srclua3/pplot.lua @@ -0,0 +1,23 @@ +IUPPPLOT = {parent = WIDGET} + +function IUPPPLOT:CreateIUPelement (obj) + return iupCreatePPlot () +end + +function iuppplot (o) + return IUPPPLOT:Constructor (o) +end +iup.pplot = iuppplot + +iup_callbacks.edit_cb.pplot = iup_pplot_edit_cb + +iup_callbacks.editbegin_cb = {"EDITBEGIN_CB", iup_pplot_editbegin_cb} +iup_callbacks.editend_cb = {"EDITEND_CB", iup_pplot_editend_cb} +iup_callbacks.select_cb = {"SELECT_CB", iup_pplot_select_cb} +iup_callbacks.selectbegin_cb = {"SELECTBEGIN_CB", iup_pplot_selectbegin_cb} +iup_callbacks.selectend_cb = {"SELECTEND_CB", iup_pplot_selectend_cb} +iup_callbacks.delete_cb = {"DELETE_CB", iup_pplot_delete_cb} +iup_callbacks.deletebegin_cb = {"DELETEBEGIN_CB", iup_pplot_deletebegin_cb} +iup_callbacks.deleteend_cb = {"DELETEEND_CB", iup_pplot_deleteend_cb} +iup_callbacks.predraw_cb = {"PREDRAW_CB", iup_pplot_predraw_cb} +iup_callbacks.postdraw_cb = {"POSTDRAW_CB", iup_pplot_postdraw_cb} diff --git a/iup/srclua3/sbox.lua b/iup/srclua3/sbox.lua new file mode 100755 index 0000000..d687e0a --- /dev/null +++ b/iup/srclua3/sbox.lua @@ -0,0 +1,10 @@ +IUPSBOX = {parent = WIDGET} + +function IUPSBOX:CreateIUPelement (obj) + return iupCreateSbox(obj[1]) +end + +function iupsbox (o) + return IUPSBOX:Constructor (o) +end +iup.sbox = iupsbox diff --git a/iup/srclua3/spin.lua b/iup/srclua3/spin.lua new file mode 100755 index 0000000..b0b23fc --- /dev/null +++ b/iup/srclua3/spin.lua @@ -0,0 +1,24 @@ +IUPSPIN = {parent = WIDGET} + +function IUPSPIN:CreateIUPelement (obj) + return iupCreateSpin () +end + +function iupspin (o) + return IUPSPIN:Constructor (o) +end +iup.spin = iupspin + +IUPSPINBOX = {parent = WIDGET} + +function IUPSPINBOX:CreateIUPelement (obj) + return iupCreateSpinbox (obj[1]) +end + +function iupspinbox (o) + return IUPSPINBOX:Constructor (o) +end +iup.spinbox = iupspinbox + +iup_callbacks.spincb = {"SPIN_CB", iup_spin_cb} +iup_callbacks.spin_cb = iup_callbacks.spincb diff --git a/iup/srclua3/tabs.lua b/iup/srclua3/tabs.lua new file mode 100755 index 0000000..845e04b --- /dev/null +++ b/iup/srclua3/tabs.lua @@ -0,0 +1,13 @@ +IUPTABS = {parent = WIDGET} + +function IUPTABS:CreateIUPelement (obj) + return iupCreateTabs (obj, getn(obj)) +end + +function iuptabs (o) + return IUPTABS:Constructor (o) +end +iup.tabs = iuptabs + +iup_callbacks.tabchange = {"TABCHANGE_CB", iup_tabchange_cb} +iup_callbacks.tabchange_cb = iup_callbacks.tabchange \ No newline at end of file diff --git a/iup/srclua3/tree.lua b/iup/srclua3/tree.lua new file mode 100755 index 0000000..659afdb --- /dev/null +++ b/iup/srclua3/tree.lua @@ -0,0 +1,68 @@ +IUPTREE = {parent = WIDGET} +IUPTREEREFERENCETABLE = {} -- Used in C, see luatree.c + +function IUPTREE:CreateIUPelement (obj) + return iupCreateTree () +end + +function iuptree (o) + return IUPTREE:Constructor (o) +end +iup.tree = iuptree + +function TreeSetValueRec(handle, t, id) + + if t == nil then return end + + local cont = getn(t) + + while cont >= 0 do + if type (t[cont]) == "table" then + if t[cont].branchname ~= nil then + IupSetAttribute(handle, "ADDBRANCH"..id, t[cont].branchname) + else + IupSetAttribute(handle, "ADDBRANCH"..id, "") + end + TreeSetValueRec(handle, t[cont], id+1) + else + if t[cont] then + IupSetAttribute(handle, "ADDLEAF"..id, t[cont]) + end + end + cont = cont - 1 + end +end + +function TreeSetValue(handle, t) + if type(t) ~= "table" then + IupMessage("TreeLua Error", "Incorrect arguments to function TreeSetValue") + return + end + if t.branchname ~= nil then + IupSetAttribute(handle, "NAME", t.branchname) + end + TreeSetValueRec(handle, t, 0) +end +iup.TreeSetValue = TreeSetValue + +iup_callbacks.selection = {"SELECTION_CB", iup_tree_selection_cb} +iup_callbacks.multiselection = {"MULTISELECTION_CB", iup_tree_multiselection_cb} +iup_callbacks.branchopen = {"BRANCHOPEN_CB", iup_tree_branchopen_cb} +iup_callbacks.branchclose = {"BRANCHCLOSE_CB", iup_tree_branchclose_cb} +iup_callbacks.executeleaf = {"EXECUTELEAF_CB", iup_tree_executeleaf_cb} +iup_callbacks.renamenode = {"RENAMENODE_CB", iup_tree_renamenode_cb} +iup_callbacks.renamecb = {"RENAME_CB", iup_tree_renamecb_cb} +iup_callbacks.showrenamecb = {"SHOWRENAME_CB", iup_tree_showrenamecb_cb} +iup_callbacks.rightclick = {"RIGHTCLICK_CB", iup_tree_rightclick_cb} +iup_callbacks.dragdrop = {"DRAGDROP_CB", iup_tree_dragdrop_cb} + +iup_callbacks.selection_cb = iup_callbacks.selection +iup_callbacks.multiselection_cb = iup_callbacks.multiselection +iup_callbacks.branchopen_cb = iup_callbacks.branchopen +iup_callbacks.branchclose_cb = iup_callbacks.branchclose +iup_callbacks.executeleaf_cb = iup_callbacks.executeleaf +iup_callbacks.renamenode_cb = iup_callbacks.renamenode +iup_callbacks.rename_cb = iup_callbacks.renamecb +iup_callbacks.showrename_cb = iup_callbacks.showrenamecb +iup_callbacks.rightclick_cb = iup_callbacks.rightclick +iup_callbacks.dragdrop_cb = iup_callbacks.dragdrop diff --git a/iup/srclua3/val.lua b/iup/srclua3/val.lua new file mode 100755 index 0000000..e614421 --- /dev/null +++ b/iup/srclua3/val.lua @@ -0,0 +1,22 @@ +IUPVAL = {parent = WIDGET} + +function IUPVAL:CreateIUPelement (obj) + return iupCreateVal (obj[1]) +end + +function iupval (o) + return IUPVAL:Constructor (o) +end +iup.val = iupval + + +-- must set here because it is also used elsewhere with a different signature +iup_callbacks.mousemove = {"MOUSEMOVE_CB", nil} +iup_callbacks.mousemove_cb = iup_callbacks.mousemove +iup_callbacks.mousemove.val = iup_val_mousemove_cb + +iup_callbacks.buttonpress = {"BUTTON_PRESS_CB", iup_val_button_press_cb} +iup_callbacks.buttonrelease = {"BUTTON_RELEASE_CB", iup_val_button_release_cb} + +iup_callbacks.button_press_cb = iup_callbacks.buttonpress +iup_callbacks.button_release_cb = iup_callbacks.buttonrelease diff --git a/iup/srclua5/Makefile b/iup/srclua5/Makefile new file mode 100755 index 0000000..3942e79 --- /dev/null +++ b/iup/srclua5/Makefile @@ -0,0 +1,24 @@ + +.PHONY: do_all iuplua iupluacd iupluacontrols iuplua_pplot iupluagl iupluaim iupluaimglib +do_all: iuplua iupluacd iupluacontrols iuplua_pplot iupluagl iupluaim iupluaimglib + +iuplua: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak + +iupluacd: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iupcd + +iupluacontrols: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iupcontrols + +iuplua_pplot: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iup_pplot + +iupluagl: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iupgl + +iupluaim: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iupim + +iupluaimglib: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak MF=iupimglib diff --git a/iup/srclua5/button.lua b/iup/srclua5/button.lua new file mode 100755 index 0000000..946a05e --- /dev/null +++ b/iup/srclua5/button.lua @@ -0,0 +1,18 @@ +------------------------------------------------------------------------------ +-- Button class +------------------------------------------------------------------------------ +local ctrl = { + nick = "button", + parent = WIDGET, + creation = "S-", + callback = { + action = "", + } +} + +function ctrl.createElement(class, arg) + return Button(arg.title) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/canvas.lua b/iup/srclua5/canvas.lua new file mode 100755 index 0000000..562d671 --- /dev/null +++ b/iup/srclua5/canvas.lua @@ -0,0 +1,29 @@ +------------------------------------------------------------------------------ +-- Canvas class +------------------------------------------------------------------------------ +local ctrl = { + nick = "canvas", + parent = WIDGET, + creation = "-", + callback = { + action = "ff", + button_cb = "nnnns", + enterwindow_cb = "", + leavewindow_cb = "", + motion_cb = "nns", + resize_cb = "nn", + scroll_cb = "nff", + keypress_cb = "nn", + wom_cb = "n", + wheel_cb = "fnns", + mdiactivate_cb = "", + focus_cb = "n", + } +} + +function ctrl.createElement(class, arg) + return Canvas() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/cbox.lua b/iup/srclua5/cbox.lua new file mode 100755 index 0000000..3533970 --- /dev/null +++ b/iup/srclua5/cbox.lua @@ -0,0 +1,28 @@ +------------------------------------------------------------------------------ +-- Cbox class +------------------------------------------------------------------------------ +local ctrl = { + nick = "cbox", + parent = WIDGET, + creation = "v", + callback = {}, + funcname = "Cboxv", + createfunc = [[ +static int Cboxv(lua_State *L) +{ + Ihandle **hlist = iuplua_checkihandle_array(L, 1); + Ihandle *h = IupCboxv(hlist); + iuplua_plugstate(L, h); + iuplua_pushihandle_raw(L, h); + free(hlist); + return 1; +} + ]], +} + +function ctrl.createElement(class, arg) + return Cboxv(arg) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/cells.lua b/iup/srclua5/cells.lua new file mode 100755 index 0000000..9c914f2 --- /dev/null +++ b/iup/srclua5/cells.lua @@ -0,0 +1,32 @@ +------------------------------------------------------------------------------ +-- Cells class +------------------------------------------------------------------------------ +local ctrl = { + nick = "cells", + parent = WIDGET, + creation = "", + callback = { + mouseclick_cb = "nnnnnns", + mousemotion_cb = "nnnns", + scrolling_cb = "nn", +-- draw_cb = "nnnnnnn", -- already registered by the matrix + width_cb = "n", + height_cb = "n", + nlines_cb = "", + ncols_cb = "", + hspan_cb = "nn", + vspan_cb = "nn", + }, + include = "iupcontrols.h", +} + +function ctrl.redraw(handle) + handle.repaint = "YES" +end + +function ctrl.createElement(class, arg) + return Cells() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/clipboard.lua b/iup/srclua5/clipboard.lua new file mode 100755 index 0000000..e60b8bd --- /dev/null +++ b/iup/srclua5/clipboard.lua @@ -0,0 +1,17 @@ +------------------------------------------------------------------------------ +-- Clipboard class +------------------------------------------------------------------------------ +local ctrl = { + nick = "clipboard", + parent = WIDGET, + creation = "", + callback = { + }, +} + +function ctrl.createElement(class, arg) + return Clipboard() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/colorbar.lua b/iup/srclua5/colorbar.lua new file mode 100755 index 0000000..524d5f3 --- /dev/null +++ b/iup/srclua5/colorbar.lua @@ -0,0 +1,26 @@ +------------------------------------------------------------------------------ +-- Colorbar class +------------------------------------------------------------------------------ +local ctrl = { + nick = "colorbar", + parent = WIDGET, + creation = "", + callback = { + select_cb = "nn", + cell_cb = {"n", ret = "s"}, + switch_cb = "nn", + extended_cb = "n", + }, + funcname = "Colorbar", + include = "iupcontrols.h", +} + +PRIMARY = -1 +SECONDARY = -2 + +function ctrl.createElement(class, arg) + return Colorbar(arg.action) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/colorbrowser.lua b/iup/srclua5/colorbrowser.lua new file mode 100755 index 0000000..16ac58f --- /dev/null +++ b/iup/srclua5/colorbrowser.lua @@ -0,0 +1,21 @@ +------------------------------------------------------------------------------ +-- ColorBrowser class +------------------------------------------------------------------------------ +local ctrl = { + nick = "colorbrowser", + parent = WIDGET, + creation = "", + callback = { + drag_cb = "ccc", + change_cb = "ccc", + }, + funcname = "ColorBrowser", + include = "iupcontrols.h", +} + +function ctrl.createElement(class, arg) + return ColorBrowser(arg.action) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/colordlg.lua b/iup/srclua5/colordlg.lua new file mode 100755 index 0000000..6eea53b --- /dev/null +++ b/iup/srclua5/colordlg.lua @@ -0,0 +1,26 @@ +------------------------------------------------------------------------------ +-- ColorDlg class +------------------------------------------------------------------------------ +local ctrl = { + nick = "colordlg", + parent = WIDGET, + creation = "", + funcname = "ColorDlg", + callback = {} +} + +function ctrl.popup(handle, x, y) + Popup(handle,x,y) +end + +function ctrl.destroy(handle) + return Destroy(handle) +end + +function ctrl.createElement(class, arg) + return ColorDlg() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") + diff --git a/iup/srclua5/config.mak b/iup/srclua5/config.mak new file mode 100755 index 0000000..7979f0e --- /dev/null +++ b/iup/srclua5/config.mak @@ -0,0 +1,31 @@ +PROJNAME = iup +LIBNAME = iuplua51 +OPT = YES +DEF_FILE = iuplua5.def + +DEFINES = IUPLUA_USELOH + +USE_LUA51 = Yes +NO_LUALINK = Yes + +INCLUDES = ../include ../src +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup + +CTRLUA = button.lua canvas.lua dialog.lua colordlg.lua clipboard.lua \ + filedlg.lua fill.lua frame.lua hbox.lua normalizer.lua \ + item.lua image.lua imagergb.lua imagergba.lua label.lua \ + menu.lua multiline.lua list.lua separator.lua user.lua \ + submenu.lua text.lua toggle.lua vbox.lua zbox.lua timer.lua \ + sbox.lua spin.lua spinbox.lua cbox.lua messagedlg.lua \ + radio.lua val.lua tabs.lua fontdlg.lua tree.lua progressbar.lua + +GC := $(addsuffix .c, $(basename $(CTRLUA))) +GC := $(addprefix il_, $(GC)) +SRCLUA = iuplua.lua constants.lua $(CTRLUA) +LOHDIR = loh + +$(GC) : il_%.c : %.lua generator.lua + $(LUABIN) generator.lua $< + +SRC = iuplua.c iuplua_api.c il_tree_aux.c il_scanf.c il_getparam.c il_getcolor.c $(GC) diff --git a/iup/srclua5/constants.lua b/iup/srclua5/constants.lua new file mode 100755 index 0000000..9a72f6a --- /dev/null +++ b/iup/srclua5/constants.lua @@ -0,0 +1,72 @@ +-- This file is executed with the "iup" table already as the globalindex + +---------------------------------------------------------------------------- +-- Common return values +---------------------------------------------------------------------------- +ERROR = 1 +NOERROR = 0 +OPENED = -1 +INVALID = -1 + +---------------------------------------------------------------------------- +-- Callback return values +---------------------------------------------------------------------------- +IGNORE = -1 +DEFAULT = -2 +CLOSE = -3 +CONTINUE = -4 + +---------------------------------------------------------------------------- +-- IupPopup e IupShowXY +---------------------------------------------------------------------------- +CENTER = 65535 +LEFT = 65534 +RIGHT = 65533 +MOUSEPOS = 65532 +CURRENT = 65531 +CENTERPARENT = 65530 +TOP = LEFT +BOTTOM = RIGHT + +---------------------------------------------------------------------------- +-- Scrollbar +---------------------------------------------------------------------------- +SBUP = 0 +SBDN = 1 +SBPGUP = 2 +SBPGDN = 3 +SBPOSV = 4 +SBDRAGV = 5 +SBLEFT = 6 +SBRIGHT = 7 +SBPGLEFT = 8 +SBPGRIGHT = 9 +SBPOSH = 10 +SBDRAGH = 11 + +---------------------------------------------------------------------------- +-- SHOW_CB +---------------------------------------------------------------------------- +SHOW = 0 +RESTORE = 1 +MINIMIZE = 2 +MAXIMIZE = 3 +HIDE = 4 + +---------------------------------------------------------------------------- +-- BUTTON_CB +---------------------------------------------------------------------------- +BUTTON1 = string.byte('1') +BUTTON2 = string.byte('2') +BUTTON3 = string.byte('3') +BUTTON4 = string.byte('4') +BUTTON5 = string.byte('5') + +---------------------------------------------------------------------------- +-- Pre-Defined Masks +---------------------------------------------------------------------------- +MASK_FLOAT = "[+/-]?(/d+/.?/d*|/./d+)" +MASK_UFLOAT = "(/d+/.?/d*|/./d+)" +MASK_EFLOAT = "[+/-]?(/d+/.?/d*|/./d+)([eE][+/-]?/d+)?" +MASK_INT = "[+/-]?/d+" +MASK_UINT = "/d+" diff --git a/iup/srclua5/ctrl_template.lua b/iup/srclua5/ctrl_template.lua new file mode 100755 index 0000000..f314ac6 --- /dev/null +++ b/iup/srclua5/ctrl_template.lua @@ -0,0 +1,94 @@ +------------------------------------------------------------------------------ +-- Template to create control classes for IupLua5 +-- The Lua module is used by the "generator.lua" to build a C module, +-- and loaded during iuplua_open to initialize the control. +------------------------------------------------------------------------------ +local ctrl = { + nick = "mycontrol", -- name of the control, used in the control creation: iup.mycontrol{} + -- also used for the generated C module + parent = WIDGET, -- used to define a few methods used fro creation and set attribute + creation = "nn", -- the creation parameters in Lua + -- "n" = int + -- "d" = double + -- "s" = char* + -- "S" = optional char*, can be nil + -- "i" = Ihandle* + -- "-" = NULL, no parameters in Lua, but a NULL parameter in C + -- "a" = char* array in a table + -- "t" = int array in a table + -- "v" = Ihandle* array in a table + + funcname = "myControl", -- [optional] name of the function used in C + -- default is ctrl.nick with first letter uppercase + + callback = { -- partial list of callbacks + -- only the callbacks that are not already defined by other controls needs to be defined + action = "ff", + button_cb = "nnnns", + enterwindow_cb = "", + leavewindow_cb = "", + motion_cb = "nns", + resize_cb = "nn", + scroll_cb = "nff", + keypress_cb = "nn", + wom_cb = "n", + wheel_cb = "fnns", + mdiactivate_cb = "", + focus_cb = "n", + value_cb = {"nn", ret = "s"}, -- ret is return type, default is n ("int") + + -- the following types can be used for callback parameters: + -- n = "int", + -- s = "char *", + -- i = "Ihandle *", + -- c = "unsigned char ", + -- d = "double", + -- f = "float", + -- v = "Ihandle **", + -- + -- Other parameters must be implemented in C using the extrafuncs module + + -- IMPORTANT: callbacks with the same name in different controls + -- are assumed to have the same parameters, that's why they are defined only once + -- When callbacks conflict using the same name, but different parameters + -- generator.lua must be edited to include the callback in the list of conflicting callbacks + -- "action" is a common callback that conflicts + -- In the callback list, just declare the callback with the parameters used in that control. + } + + include = "iupmycontrol.h", -- [optional] header to be included, it is where the creation function is declared. + extrafuncs = 1, -- [optional] additional module in C called by the initialization function + + createfunc = [[ -- [optional] creation function in C, + -- used if creation parameters needs some interpretation in C + -- not to be used together with funcname +#include +static int myControl (lua_State * L) +{ + xxxx; + yyyy; + return 1; +} +]] + + extracode = [[ -- [optional] extra fucntions to be defined in C. +int luaopen_iupluamycontrol51(lua_State* L) +{ + return iupmycontrollua_open(L); +} +]] + +} + +-- must be defined so the WIDGET constructor can call it +function ctrl.createElement(class, arg) + return myControl() +end + +-- here you can add some custom methods to the class +function ctrl.popup(handle, x, y) + Popup(handle,x,y) +end + +iupRegisterWidget(ctrl) -- will make iup.mycontrol available +iupSetClass(ctrl, "iup widget") -- register the class in the registry diff --git a/iup/srclua5/dial.lua b/iup/srclua5/dial.lua new file mode 100755 index 0000000..0384b43 --- /dev/null +++ b/iup/srclua5/dial.lua @@ -0,0 +1,21 @@ +------------------------------------------------------------------------------ +-- Dial class +------------------------------------------------------------------------------ +local ctrl = { + nick = "dial", + parent = WIDGET, + creation = "s", + callback = { + mousemove_cb = "d", -- already registered by the val, but has a name conflict +-- button_press_cb = "d", -- already registered by the val +-- button_release_cb = "d", -- already registered by the val + }, + include = "iupcontrols.h", +} + +function ctrl.createElement(class, arg) + return Dial(arg[1]) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/dialog.lua b/iup/srclua5/dialog.lua new file mode 100755 index 0000000..a996ad7 --- /dev/null +++ b/iup/srclua5/dialog.lua @@ -0,0 +1,36 @@ +------------------------------------------------------------------------------ +-- Dialog class +------------------------------------------------------------------------------ +local ctrl = { + nick = "dialog", + parent = WIDGET, + creation = "I", + callback = { + map_cb = "", + unmap_cb = "", + close_cb = "", + show_cb = "n", + move_cb = "nn", + trayclick_cb = "nnn", + dropfiles_cb = "snnn", + } +} + +function ctrl.createElement(class, arg) + return Dialog(arg[1]) +end + +function ctrl.popup(handle, x, y) + Popup(handle,x,y) +end + +function ctrl.showxy(handle, x, y) + return ShowXY(handle, x, y) +end + +function ctrl.destroy(handle) + return Destroy(handle) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/filedlg.lua b/iup/srclua5/filedlg.lua new file mode 100755 index 0000000..71c4bb4 --- /dev/null +++ b/iup/srclua5/filedlg.lua @@ -0,0 +1,28 @@ +------------------------------------------------------------------------------ +-- FileDlg class +------------------------------------------------------------------------------ +local ctrl = { + nick = "filedlg", + parent = WIDGET, + creation = "", + callback = { + file_cb = "ss", + }, + funcname = "FileDlg" +} + +function ctrl.popup(handle, x, y) + Popup(handle,x,y) +end + +function ctrl.destroy(handle) + return Destroy(handle) +end + +function ctrl.createElement(class, arg) + return FileDlg() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") + diff --git a/iup/srclua5/fill.lua b/iup/srclua5/fill.lua new file mode 100755 index 0000000..4bf7803 --- /dev/null +++ b/iup/srclua5/fill.lua @@ -0,0 +1,16 @@ +------------------------------------------------------------------------------ +-- Fill class +------------------------------------------------------------------------------ +local ctrl = { + nick = "fill", + parent = WIDGET, + creation = "", + callback = {} +} + +function ctrl.createElement(class, arg) + return Fill() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/fontdlg.lua b/iup/srclua5/fontdlg.lua new file mode 100755 index 0000000..2c88d26 --- /dev/null +++ b/iup/srclua5/fontdlg.lua @@ -0,0 +1,26 @@ +------------------------------------------------------------------------------ +-- FontDlg class +------------------------------------------------------------------------------ +local ctrl = { + nick = "fontdlg", + parent = WIDGET, + creation = "", + funcname = "FontDlg", + callback = {} +} + +function ctrl.popup(handle, x, y) + Popup(handle,x,y) +end + +function ctrl.destroy(handle) + return Destroy(handle) +end + +function ctrl.createElement(class, arg) + return FontDlg() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") + diff --git a/iup/srclua5/frame.lua b/iup/srclua5/frame.lua new file mode 100755 index 0000000..7a1c1cc --- /dev/null +++ b/iup/srclua5/frame.lua @@ -0,0 +1,16 @@ +------------------------------------------------------------------------------ +-- Frame class +------------------------------------------------------------------------------ +local ctrl = { + nick = "frame", + parent = WIDGET, + creation = "i", + callback = {} +} + +function ctrl.createElement(class, arg) + return Frame(arg[1]) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/gauge.lua b/iup/srclua5/gauge.lua new file mode 100755 index 0000000..45a72b3 --- /dev/null +++ b/iup/srclua5/gauge.lua @@ -0,0 +1,17 @@ +------------------------------------------------------------------------------ +-- Gauge class +------------------------------------------------------------------------------ +local ctrl = { + nick = "gauge", + parent = WIDGET, + creation = "", + callback = {}, + include = "iupcontrols.h", +} + +function ctrl.createElement(class, arg) + return Gauge(arg.action) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/generator.lua b/iup/srclua5/generator.lua new file mode 100755 index 0000000..24fd325 --- /dev/null +++ b/iup/srclua5/generator.lua @@ -0,0 +1,222 @@ + +function dofile(f) + pcall(loadfile(f)) +end + +-- compatibility functions (with iuplua.lua) +function iupSetClass(ctrl, name) + element = ctrl +end + +-- dummy functions +iupluaNewClass = function() end +iupSetMethod = iupluaNewClass +iupRegisterWidget = iupluaNewClass + +c_types = { + n = "int", + s = "char *", + i = "Ihandle *", + c = "unsigned char ", + d = "double", + f = "float", + v = "Ihandle **", +} + +-- Adjust the callbacks table +function adjustcallbacktable(c) + d = {} + for i,j in pairs(c) do + if type(j) == "string" then + d[i] = { j, "IUP_".. string.upper(i)} + elseif type(j) == "table" then + d[i] = j + else + print("ERROR IN CALLBACK TABLE FORMAT") + end + end + return d +end + + +function header(o,i) + io.write [[ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don t change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +]] + if i then io.write('#include "',i,'"\n') end + io.write('#include "il.h"\n\n\n') +end + +function firstupper(name) + return string.upper(string.sub(name,1,1)) .. string.sub(name,2,-1) +end + +function write_creation(o, t) + local aux = {n = 1} + local u = firstupper(o) + local v = t.creation + local c = t.callback + if t.funcname then + u = t.funcname + end + io.write ("static int ",u,"(lua_State *L)\n") + io.write ("{\n") + if t.rettype == nil then io.write(" Ihandle *ih = Iup",u,"(") + elseif t.rettype == "n" then io.write(" int n = (Iup",u,"(") + elseif t.rettype == "s" then io.write(" char *s = (Iup",u,"(") + end + local max = string.len(v) + string.gsub(v, "(.)", function(p) + if p == "n" then io.write("luaL_checkint(L, ",aux.n,")") + elseif p == "d" then io.write("luaL_number(L, ",aux.n,")") + elseif p == "s" then io.write("(char *) luaL_checkstring(L, ",aux.n,")") + elseif p == "S" then io.write("(char *) luaL_optstring(L, ",aux.n,', NULL)') + elseif p == "i" then io.write("iuplua_checkihandle(L, ",aux.n,")") + elseif p == "I" then io.write("iuplua_checkihandleornil(L, ",aux.n,")") + elseif p == "-" then io.write("NULL") + elseif p == "a" then io.write("iuplua_checkstring_array(L, ",aux.n,")") + elseif p == "t" then io.write("iuplua_checkint_array(L, ",aux.n,")") + elseif p == "v" then io.write("iuplua_checkihandle_array(L, ",aux.n,")") + else io.write("FORMAT '", p, "' NOT SUPPORTED\n") + end + if aux.n < max then io.write(", ") end + aux.n = aux.n + 1 + end) + io.write(");\n") + + io.write(" iuplua_plugstate(L, ih);\n") + io.write(" iuplua_pushihandle_raw(L, ih);\n") + io.write(" return 1;\n") + io.write("}\n\n") +end + +function write_callbacks(o, c) + local aux = { } + for i,v in pairs(c) do + local s = v[1] + local max = string.len(s) + aux.n = 0 + io.write("static ") + if v.ret then + if v.ret == "s" then + io.write("char * ") + end + else + io.write("int ") + end + io.write(o, "_", i, "(Ihandle *self") + if max > 0 then io.write(", ") end + string.gsub(s, "(.)", function(p) + io.write(c_types[p], " p", aux.n) + aux.n = aux.n + 1 + if aux.n < max then io.write(", ") end + end) + io.write(")\n{\n") + io.write(' lua_State *L = iuplua_call_start(self, "', i, '");') + aux.n = 0 + string.gsub(s, "(.)", function(p) + if p == "n" or p == "f" or p == "d" or p == "c" then + io.write("\n lua_pushnumber(L, p"..aux.n..");") + elseif p == "s" then + io.write("\n lua_pushstring(L, p"..aux.n..");") + elseif p == "i" then + io.write("\n iuplua_pushihandle(L, p"..aux.n..");") + else + io.write("\n ERROR !! ") + end + aux.n = aux.n + 1 + end) + if v.ret and v.ret == "s" then + io.write("\n return iuplua_call_rs(L, " .. max .. ");") + else + io.write("\n return iuplua_call(L, " .. max .. ");") + end + io.write("\n}\n\n") + end +end + +function write_initialization(o,t) + local aux= {n=1} + local c = t.callback + local u = firstupper(o) + if t.extrafuncs then + io.write('void iuplua_', o,'funcs_open(lua_State *L);\n\n') + end + if t.openfuncname then + io.write("void ", t.openfuncname, "(lua_State * L)\n") + else + io.write("int iup", o,"lua_open(lua_State * L)\n") + end + io.write("{\n") + io.write(" iuplua_register(L, ") + if t.funcname then + u = t.funcname + end + io.write(u, ', "', u,'");\n\n') + + for i,v in pairs(c) do + local type = "NULL" + if i == "action" or + i == "action_cb" or + i == "edit_cb" or + i == "mousemove_cb" then + type = '"'..string.lower(o)..'"' + end + io.write(' iuplua_register_cb(L, "',string.upper(i),'", (lua_CFunction)',o,'_',i,', ',type,');\n') + first = 0 + end + io.write('\n') + + if t.extrafuncs then + io.write(' iuplua_', o,'funcs_open(L);\n\n') + end + io.write('#ifdef IUPLUA_USELOH\n') + io.write('#ifdef TEC_BIGENDIAN\n') + io.write('#ifdef TEC_64\n') + io.write('#include "loh/', o,'_be64.loh"\n') + io.write('#else\n') + io.write('#include "loh/', o,'_be32.loh"\n') + io.write('#endif\n') + io.write('#else\n') + io.write('#ifdef TEC_64\n') + io.write('#ifdef WIN64\n') + io.write('#include "loh/', o,'_le64w.loh"\n') + io.write('#else\n') + io.write('#include "loh/', o,'_le64.loh"\n') + io.write('#endif\n') + io.write('#else\n') + io.write('#include "loh/', o,'.loh"\n') + io.write('#endif\n') + io.write('#endif\n') + io.write('#else\n') + io.write(' iuplua_dofile(L, "', o,'.lua");\n') + io.write('#endif\n\n') + io.write(' return 0;\n') + io.write("}\n\n") +end + +dofile(arg[1]) +element.callback = adjustcallbacktable(element.callback) + +io.output("il_"..element.nick..".c") +header(element.nick, element.include) +write_callbacks(element.nick, element.callback) +if element.createfunc == nil then + write_creation(element.nick, element) +else + io.write(element.createfunc) +end +write_initialization(element.nick, element) +if element.extracode then + io.write(element.extracode) +end diff --git a/iup/srclua5/glcanvas.lua b/iup/srclua5/glcanvas.lua new file mode 100755 index 0000000..782e974 --- /dev/null +++ b/iup/srclua5/glcanvas.lua @@ -0,0 +1,46 @@ +------------------------------------------------------------------------------ +-- GLCanvas class +------------------------------------------------------------------------------ +local ctrl = { + nick = "glcanvas", + parent = WIDGET, + creation = "-", + funcname = "GLCanvas", + include = "iupgl.h", + callback = { + action = "nn", + }, + extrafuncs = 1, + extracode = [[ +int iupgllua_open(lua_State * L) +{ + if (iuplua_opencall_internal(L)) + IupGLCanvasOpen(); + + iuplua_changeEnv(L); + iupglcanvaslua_open(L); + iuplua_returnEnv(L); + return 0; +} + +/* obligatory to use require"iupluagl" */ +int luaopen_iupluagl(lua_State* L) +{ + return iupgllua_open(L); +} + +/* obligatory to use require"iupluagl51" */ +int luaopen_iupluagl51(lua_State* L) +{ + return iupgllua_open(L); +} + +]] +} + +function ctrl.createElement(class, arg) + return GLCanvas() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/hbox.lua b/iup/srclua5/hbox.lua new file mode 100755 index 0000000..38213bb --- /dev/null +++ b/iup/srclua5/hbox.lua @@ -0,0 +1,20 @@ +------------------------------------------------------------------------------ +-- HBox class +------------------------------------------------------------------------------ +local ctrl = { + nick = "hbox", + parent = BOX, + creation = "-", + callback = {} +} + +function ctrl.append(handle, elem) + Append(handle, elem) +end + +function ctrl.createElement(class, arg) + return Hbox() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/il.h b/iup/srclua5/il.h new file mode 100755 index 0000000..81a0140 --- /dev/null +++ b/iup/srclua5/il.h @@ -0,0 +1,161 @@ +/** \file + * \brief IUPLua5 internal Functions + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IL_H +#define __IL_H + +#ifdef __cplusplus +extern "C" { +#endif + +int iuplistlua_open (lua_State * L); +int iuplabellua_open (lua_State * L); +int iupitemlua_open (lua_State * L); +int iupimagelua_open (lua_State * L); +int iuphboxlua_open (lua_State * L); +int iupframelua_open (lua_State * L); +int iupfilllua_open (lua_State * L); +int iupfiledlglua_open (lua_State * L); +int iupdialoglua_open (lua_State * L); +int iupcanvaslua_open (lua_State * L); +int iupbuttonlua_open (lua_State * L); +int iupzboxlua_open (lua_State * L); +int iupvboxlua_open (lua_State * L); +int iuptogglelua_open (lua_State * L); +int iuptimerlua_open (lua_State * L); +int iuptextlua_open (lua_State * L); +int iupsubmenulua_open (lua_State * L); +int iupseparatorlua_open (lua_State * L); +int iupradiolua_open (lua_State * L); +int iupmultilinelua_open (lua_State * L); +int iupmenulua_open (lua_State * L); +int iupcboxlua_open (lua_State * L); +int iupspinboxlua_open (lua_State * L); +int iupspinlua_open (lua_State * L); +int iupsboxlua_open (lua_State * L); +int iupgclua_open (lua_State * L); +int iupvallua_open (lua_State * L); +int iuptabslua_open (lua_State * L); +int iupfontdlglua_open(lua_State * L); +int iupmessagedlglua_open(lua_State * L); +int iupcolordlglua_open(lua_State * L); +int iupimagergbalua_open(lua_State * L); +int iupimagergblua_open(lua_State * L); +int iupprogressbarlua_open(lua_State * L); +int iupnormalizerlua_open(lua_State * L); +int iupuserlua_open(lua_State * L); +int iuptreelua_open(lua_State * L); +int iupclipboardlua_open(lua_State * L); + +void iupgetparamlua_open (lua_State * L); + +int iupluaScanf(lua_State *L); +int iupluaapi_open(lua_State * L); + + + /* Registration */ + +/** Sets the global index as the table "iup". + * Used to simplify the registration of functions and constants in the "iup" namespace. + */ +void iuplua_changeEnv(lua_State *L); + +/** Resets the global index. + * Must match a iuplua_changeEnv call. + */ +void iuplua_returnEnv(lua_State *L); + +/** Returns true if IupOpen was called from inside the IupLua initialization function (iuplua_open). + * All the other C intialization functions are called from the respective IupLua initialization functions. + */ +int iuplua_opencall_internal(lua_State *L); + +/** Register a function. + */ +void iuplua_register(lua_State *L, lua_CFunction func, const char* name); + +/** Register a string. + */ +void iuplua_regstring(lua_State *L, const char* str, const char* name); + + + /* Callbacks */ + +/** Stores the Lua State inside the IUP element, + * so it can be retreived from inside a callback. + * Used in the creation of the element. + */ +void iuplua_plugstate(lua_State *L, Ihandle *ih); + +/** Retrieve the Lua State. Used inside a callback. + */ +lua_State* iuplua_getstate(Ihandle *ih); + +/** First function called inside a callback. + * It prepares the stack for the call and returns the Lua state. + */ +lua_State * iuplua_call_start(Ihandle *ih, const char* name); + +/** Called when a callback in Lua should be called. + * nargs is the number of arguments after the first Ihandle*. + * Returns the callback return value. If nil returns IUP_DEFAULT. + * At the end clears the Lua stack. + */ +int iuplua_call(lua_State *L, int nargs); + +/** Same as /ref iuplua_call, but returns a string. + */ +char* iuplua_call_rs(lua_State *L, int nargs); + +/** Same as lua_pcall, but if an error occour then + * _ERRORMESSAGE is called. + */ +int iuplua_call_raw(lua_State* L, int nargs, int nresults); + +/** Register the callback in the iup.callbaks table. + * If type is not NULL, register in a sub table with the controls class name. + */ +void iuplua_register_cb(lua_State *L, const char* name, lua_CFunction func, const char* type); + + + /* Functions */ + +/** Pushes a raw Ihandle into the stack (an userdata). + * Used by the control creation functions. + */ +void iuplua_pushihandle_raw(lua_State *L, Ihandle *h); + +/** Returns an array of string stored in a Lua table. + */ +char** iuplua_checkstring_array(lua_State *L, int pos); + +/** Returns an array of int stored in a Lua table. + */ +int* iuplua_checkint_array(lua_State *L, int pos); + +/** Returns an array of unsigned char stored in a Lua table. + * Must have count elements. + */ +unsigned char* iuplua_checkuchar_array(lua_State *L, int pos, int count); + +/** Returns an array of ihandle stored in a Lua table. + */ +Ihandle** iuplua_checkihandle_array(lua_State *L, int pos); + +/** Same as iuplua_checkihandle but also accepts nil. + */ +Ihandle *iuplua_checkihandleornil(lua_State *L, int pos); + +/** Removes the references in the Lua registry. + */ +void iuplua_removeihandle(lua_State *L, Ihandle *ih); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srclua5/il_button.c b/iup/srclua5/il_button.c new file mode 100755 index 0000000..bd844a5 --- /dev/null +++ b/iup/srclua5/il_button.c @@ -0,0 +1,59 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int button_action(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "action"); + return iuplua_call(L, 0); +} + +static int Button(lua_State *L) +{ + Ihandle *ih = IupButton((char *) luaL_optstring(L, 1, NULL), NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupbuttonlua_open(lua_State * L) +{ + iuplua_register(L, Button, "Button"); + + iuplua_register_cb(L, "ACTION", (lua_CFunction)button_action, "button"); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/button_be64.loh" +#else +#include "loh/button_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/button_le64w.loh" +#else +#include "loh/button_le64.loh" +#endif +#else +#include "loh/button.loh" +#endif +#endif +#else + iuplua_dofile(L, "button.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_canvas.c b/iup/srclua5/il_canvas.c new file mode 100755 index 0000000..8cff72a --- /dev/null +++ b/iup/srclua5/il_canvas.c @@ -0,0 +1,159 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int canvas_action(Ihandle *self, float p0, float p1) +{ + lua_State *L = iuplua_call_start(self, "action"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int canvas_leavewindow_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "leavewindow_cb"); + return iuplua_call(L, 0); +} + +static int canvas_resize_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "resize_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int canvas_wheel_cb(Ihandle *self, float p0, int p1, int p2, char * p3) +{ + lua_State *L = iuplua_call_start(self, "wheel_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushstring(L, p3); + return iuplua_call(L, 4); +} + +static int canvas_mdiactivate_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "mdiactivate_cb"); + return iuplua_call(L, 0); +} + +static int canvas_enterwindow_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "enterwindow_cb"); + return iuplua_call(L, 0); +} + +static int canvas_focus_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "focus_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int canvas_button_cb(Ihandle *self, int p0, int p1, int p2, int p3, char * p4) +{ + lua_State *L = iuplua_call_start(self, "button_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + lua_pushstring(L, p4); + return iuplua_call(L, 5); +} + +static int canvas_keypress_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "keypress_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int canvas_motion_cb(Ihandle *self, int p0, int p1, char * p2) +{ + lua_State *L = iuplua_call_start(self, "motion_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushstring(L, p2); + return iuplua_call(L, 3); +} + +static int canvas_wom_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "wom_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int canvas_scroll_cb(Ihandle *self, int p0, float p1, float p2) +{ + lua_State *L = iuplua_call_start(self, "scroll_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + return iuplua_call(L, 3); +} + +static int Canvas(lua_State *L) +{ + Ihandle *ih = IupCanvas(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupcanvaslua_open(lua_State * L) +{ + iuplua_register(L, Canvas, "Canvas"); + + iuplua_register_cb(L, "ACTION", (lua_CFunction)canvas_action, "canvas"); + iuplua_register_cb(L, "LEAVEWINDOW_CB", (lua_CFunction)canvas_leavewindow_cb, NULL); + iuplua_register_cb(L, "RESIZE_CB", (lua_CFunction)canvas_resize_cb, NULL); + iuplua_register_cb(L, "WHEEL_CB", (lua_CFunction)canvas_wheel_cb, NULL); + iuplua_register_cb(L, "MDIACTIVATE_CB", (lua_CFunction)canvas_mdiactivate_cb, NULL); + iuplua_register_cb(L, "ENTERWINDOW_CB", (lua_CFunction)canvas_enterwindow_cb, NULL); + iuplua_register_cb(L, "FOCUS_CB", (lua_CFunction)canvas_focus_cb, NULL); + iuplua_register_cb(L, "BUTTON_CB", (lua_CFunction)canvas_button_cb, NULL); + iuplua_register_cb(L, "KEYPRESS_CB", (lua_CFunction)canvas_keypress_cb, NULL); + iuplua_register_cb(L, "MOTION_CB", (lua_CFunction)canvas_motion_cb, NULL); + iuplua_register_cb(L, "WOM_CB", (lua_CFunction)canvas_wom_cb, NULL); + iuplua_register_cb(L, "SCROLL_CB", (lua_CFunction)canvas_scroll_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/canvas_be64.loh" +#else +#include "loh/canvas_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/canvas_le64w.loh" +#else +#include "loh/canvas_le64.loh" +#endif +#else +#include "loh/canvas.loh" +#endif +#endif +#else + iuplua_dofile(L, "canvas.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_cbox.c b/iup/srclua5/il_cbox.c new file mode 100755 index 0000000..66fdb4c --- /dev/null +++ b/iup/srclua5/il_cbox.c @@ -0,0 +1,53 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Cboxv(lua_State *L) +{ + Ihandle **hlist = iuplua_checkihandle_array(L, 1); + Ihandle *h = IupCboxv(hlist); + iuplua_plugstate(L, h); + iuplua_pushihandle_raw(L, h); + free(hlist); + return 1; +} + int iupcboxlua_open(lua_State * L) +{ + iuplua_register(L, Cboxv, "Cboxv"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/cbox_be64.loh" +#else +#include "loh/cbox_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/cbox_le64w.loh" +#else +#include "loh/cbox_le64.loh" +#endif +#else +#include "loh/cbox.loh" +#endif +#endif +#else + iuplua_dofile(L, "cbox.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_cells.c b/iup/srclua5/il_cells.c new file mode 100755 index 0000000..e0fbc0e --- /dev/null +++ b/iup/srclua5/il_cells.c @@ -0,0 +1,136 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iupcontrols.h" +#include "il.h" + + +static int cells_width_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "width_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int cells_mousemotion_cb(Ihandle *self, int p0, int p1, int p2, int p3, char * p4) +{ + lua_State *L = iuplua_call_start(self, "mousemotion_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + lua_pushstring(L, p4); + return iuplua_call(L, 5); +} + +static int cells_mouseclick_cb(Ihandle *self, int p0, int p1, int p2, int p3, int p4, int p5, char * p6) +{ + lua_State *L = iuplua_call_start(self, "mouseclick_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + lua_pushnumber(L, p4); + lua_pushnumber(L, p5); + lua_pushstring(L, p6); + return iuplua_call(L, 7); +} + +static int cells_ncols_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "ncols_cb"); + return iuplua_call(L, 0); +} + +static int cells_nlines_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "nlines_cb"); + return iuplua_call(L, 0); +} + +static int cells_scrolling_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "scrolling_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int cells_height_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "height_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int cells_hspan_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "hspan_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int cells_vspan_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "vspan_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int Cells(lua_State *L) +{ + Ihandle *ih = IupCells(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupcellslua_open(lua_State * L) +{ + iuplua_register(L, Cells, "Cells"); + + iuplua_register_cb(L, "WIDTH_CB", (lua_CFunction)cells_width_cb, NULL); + iuplua_register_cb(L, "MOUSEMOTION_CB", (lua_CFunction)cells_mousemotion_cb, NULL); + iuplua_register_cb(L, "MOUSECLICK_CB", (lua_CFunction)cells_mouseclick_cb, NULL); + iuplua_register_cb(L, "NCOLS_CB", (lua_CFunction)cells_ncols_cb, NULL); + iuplua_register_cb(L, "NLINES_CB", (lua_CFunction)cells_nlines_cb, NULL); + iuplua_register_cb(L, "SCROLLING_CB", (lua_CFunction)cells_scrolling_cb, NULL); + iuplua_register_cb(L, "HEIGHT_CB", (lua_CFunction)cells_height_cb, NULL); + iuplua_register_cb(L, "HSPAN_CB", (lua_CFunction)cells_hspan_cb, NULL); + iuplua_register_cb(L, "VSPAN_CB", (lua_CFunction)cells_vspan_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/cells_be64.loh" +#else +#include "loh/cells_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/cells_le64w.loh" +#else +#include "loh/cells_le64.loh" +#endif +#else +#include "loh/cells.loh" +#endif +#endif +#else + iuplua_dofile(L, "cells.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_clipboard.c b/iup/srclua5/il_clipboard.c new file mode 100644 index 0000000..207b1b7 --- /dev/null +++ b/iup/srclua5/il_clipboard.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Clipboard(lua_State *L) +{ + Ihandle *ih = IupClipboard(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupclipboardlua_open(lua_State * L) +{ + iuplua_register(L, Clipboard, "Clipboard"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/clipboard_be64.loh" +#else +#include "loh/clipboard_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/clipboard_le64w.loh" +#else +#include "loh/clipboard_le64.loh" +#endif +#else +#include "loh/clipboard.loh" +#endif +#endif +#else + iuplua_dofile(L, "clipboard.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_colorbar.c b/iup/srclua5/il_colorbar.c new file mode 100755 index 0000000..15dc73e --- /dev/null +++ b/iup/srclua5/il_colorbar.c @@ -0,0 +1,87 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iupcontrols.h" +#include "il.h" + + +static int colorbar_switch_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "switch_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int colorbar_select_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "select_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static char * colorbar_cell_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "cell_cb"); + lua_pushnumber(L, p0); + return iuplua_call_rs(L, 1); +} + +static int colorbar_extended_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "extended_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int Colorbar(lua_State *L) +{ + Ihandle *ih = IupColorbar(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupcolorbarlua_open(lua_State * L) +{ + iuplua_register(L, Colorbar, "Colorbar"); + + iuplua_register_cb(L, "SWITCH_CB", (lua_CFunction)colorbar_switch_cb, NULL); + iuplua_register_cb(L, "SELECT_CB", (lua_CFunction)colorbar_select_cb, NULL); + iuplua_register_cb(L, "CELL_CB", (lua_CFunction)colorbar_cell_cb, NULL); + iuplua_register_cb(L, "EXTENDED_CB", (lua_CFunction)colorbar_extended_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/colorbar_be64.loh" +#else +#include "loh/colorbar_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/colorbar_le64w.loh" +#else +#include "loh/colorbar_le64.loh" +#endif +#else +#include "loh/colorbar.loh" +#endif +#endif +#else + iuplua_dofile(L, "colorbar.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_colorbrowser.c b/iup/srclua5/il_colorbrowser.c new file mode 100755 index 0000000..f0316dd --- /dev/null +++ b/iup/srclua5/il_colorbrowser.c @@ -0,0 +1,73 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iupcontrols.h" +#include "il.h" + + +static int colorbrowser_drag_cb(Ihandle *self, unsigned char p0, unsigned char p1, unsigned char p2) +{ + lua_State *L = iuplua_call_start(self, "drag_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + return iuplua_call(L, 3); +} + +static int colorbrowser_change_cb(Ihandle *self, unsigned char p0, unsigned char p1, unsigned char p2) +{ + lua_State *L = iuplua_call_start(self, "change_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + return iuplua_call(L, 3); +} + +static int ColorBrowser(lua_State *L) +{ + Ihandle *ih = IupColorBrowser(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupcolorbrowserlua_open(lua_State * L) +{ + iuplua_register(L, ColorBrowser, "ColorBrowser"); + + iuplua_register_cb(L, "DRAG_CB", (lua_CFunction)colorbrowser_drag_cb, NULL); + iuplua_register_cb(L, "CHANGE_CB", (lua_CFunction)colorbrowser_change_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/colorbrowser_be64.loh" +#else +#include "loh/colorbrowser_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/colorbrowser_le64w.loh" +#else +#include "loh/colorbrowser_le64.loh" +#endif +#else +#include "loh/colorbrowser.loh" +#endif +#endif +#else + iuplua_dofile(L, "colorbrowser.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_colordlg.c b/iup/srclua5/il_colordlg.c new file mode 100755 index 0000000..c474c62 --- /dev/null +++ b/iup/srclua5/il_colordlg.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int ColorDlg(lua_State *L) +{ + Ihandle *ih = IupColorDlg(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupcolordlglua_open(lua_State * L) +{ + iuplua_register(L, ColorDlg, "ColorDlg"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/colordlg_be64.loh" +#else +#include "loh/colordlg_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/colordlg_le64w.loh" +#else +#include "loh/colordlg_le64.loh" +#endif +#else +#include "loh/colordlg.loh" +#endif +#endif +#else + iuplua_dofile(L, "colordlg.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_controls.h b/iup/srclua5/il_controls.h new file mode 100755 index 0000000..ab0aa67 --- /dev/null +++ b/iup/srclua5/il_controls.h @@ -0,0 +1,26 @@ +/** \file + * \brief IUPLua5 Controls internal Functions + * + * See Copyright Notice in "iup.h" + */ + +#ifndef __IL_CONTROLS_H +#define __IL_CONTROLS_H + +#ifdef __cplusplus +extern "C" { +#endif + +void iupmasklua_open (lua_State * L); +int iupgaugelua_open (lua_State * L); +int iupdiallua_open (lua_State * L); +int iupcolorbrowserlua_open (lua_State * L); +int iupcolorbarlua_open (lua_State * L); +int iupcellslua_open (lua_State * L); +int iupmatrixlua_open (lua_State * L); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/iup/srclua5/il_dial.c b/iup/srclua5/il_dial.c new file mode 100755 index 0000000..76a395a --- /dev/null +++ b/iup/srclua5/il_dial.c @@ -0,0 +1,61 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iupcontrols.h" +#include "il.h" + + +static int dial_mousemove_cb(Ihandle *self, double p0) +{ + lua_State *L = iuplua_call_start(self, "mousemove_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int Dial(lua_State *L) +{ + Ihandle *ih = IupDial((char *) luaL_checkstring(L, 1)); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupdiallua_open(lua_State * L) +{ + iuplua_register(L, Dial, "Dial"); + + iuplua_register_cb(L, "MOUSEMOVE_CB", (lua_CFunction)dial_mousemove_cb, "dial"); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/dial_be64.loh" +#else +#include "loh/dial_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/dial_le64w.loh" +#else +#include "loh/dial_le64.loh" +#endif +#else +#include "loh/dial.loh" +#endif +#endif +#else + iuplua_dofile(L, "dial.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_dialog.c b/iup/srclua5/il_dialog.c new file mode 100755 index 0000000..fafc5bd --- /dev/null +++ b/iup/srclua5/il_dialog.c @@ -0,0 +1,111 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int dialog_move_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "move_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int dialog_map_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "map_cb"); + return iuplua_call(L, 0); +} + +static int dialog_unmap_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "unmap_cb"); + return iuplua_call(L, 0); +} + +static int dialog_dropfiles_cb(Ihandle *self, char * p0, int p1, int p2, int p3) +{ + lua_State *L = iuplua_call_start(self, "dropfiles_cb"); + lua_pushstring(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + return iuplua_call(L, 4); +} + +static int dialog_show_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "show_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int dialog_trayclick_cb(Ihandle *self, int p0, int p1, int p2) +{ + lua_State *L = iuplua_call_start(self, "trayclick_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + return iuplua_call(L, 3); +} + +static int dialog_close_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "close_cb"); + return iuplua_call(L, 0); +} + +static int Dialog(lua_State *L) +{ + Ihandle *ih = IupDialog(iuplua_checkihandleornil(L, 1)); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupdialoglua_open(lua_State * L) +{ + iuplua_register(L, Dialog, "Dialog"); + + iuplua_register_cb(L, "MOVE_CB", (lua_CFunction)dialog_move_cb, NULL); + iuplua_register_cb(L, "MAP_CB", (lua_CFunction)dialog_map_cb, NULL); + iuplua_register_cb(L, "UNMAP_CB", (lua_CFunction)dialog_unmap_cb, NULL); + iuplua_register_cb(L, "DROPFILES_CB", (lua_CFunction)dialog_dropfiles_cb, NULL); + iuplua_register_cb(L, "SHOW_CB", (lua_CFunction)dialog_show_cb, NULL); + iuplua_register_cb(L, "TRAYCLICK_CB", (lua_CFunction)dialog_trayclick_cb, NULL); + iuplua_register_cb(L, "CLOSE_CB", (lua_CFunction)dialog_close_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/dialog_be64.loh" +#else +#include "loh/dialog_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/dialog_le64w.loh" +#else +#include "loh/dialog_le64.loh" +#endif +#else +#include "loh/dialog.loh" +#endif +#endif +#else + iuplua_dofile(L, "dialog.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_filedlg.c b/iup/srclua5/il_filedlg.c new file mode 100755 index 0000000..fc30ca7 --- /dev/null +++ b/iup/srclua5/il_filedlg.c @@ -0,0 +1,61 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int filedlg_file_cb(Ihandle *self, char * p0, char * p1) +{ + lua_State *L = iuplua_call_start(self, "file_cb"); + lua_pushstring(L, p0); + lua_pushstring(L, p1); + return iuplua_call(L, 2); +} + +static int FileDlg(lua_State *L) +{ + Ihandle *ih = IupFileDlg(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupfiledlglua_open(lua_State * L) +{ + iuplua_register(L, FileDlg, "FileDlg"); + + iuplua_register_cb(L, "FILE_CB", (lua_CFunction)filedlg_file_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/filedlg_be64.loh" +#else +#include "loh/filedlg_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/filedlg_le64w.loh" +#else +#include "loh/filedlg_le64.loh" +#endif +#else +#include "loh/filedlg.loh" +#endif +#endif +#else + iuplua_dofile(L, "filedlg.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_fill.c b/iup/srclua5/il_fill.c new file mode 100755 index 0000000..d3ebd0d --- /dev/null +++ b/iup/srclua5/il_fill.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Fill(lua_State *L) +{ + Ihandle *ih = IupFill(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupfilllua_open(lua_State * L) +{ + iuplua_register(L, Fill, "Fill"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/fill_be64.loh" +#else +#include "loh/fill_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/fill_le64w.loh" +#else +#include "loh/fill_le64.loh" +#endif +#else +#include "loh/fill.loh" +#endif +#endif +#else + iuplua_dofile(L, "fill.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_fontdlg.c b/iup/srclua5/il_fontdlg.c new file mode 100755 index 0000000..2be7c65 --- /dev/null +++ b/iup/srclua5/il_fontdlg.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int FontDlg(lua_State *L) +{ + Ihandle *ih = IupFontDlg(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupfontdlglua_open(lua_State * L) +{ + iuplua_register(L, FontDlg, "FontDlg"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/fontdlg_be64.loh" +#else +#include "loh/fontdlg_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/fontdlg_le64w.loh" +#else +#include "loh/fontdlg_le64.loh" +#endif +#else +#include "loh/fontdlg.loh" +#endif +#endif +#else + iuplua_dofile(L, "fontdlg.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_frame.c b/iup/srclua5/il_frame.c new file mode 100755 index 0000000..9b122ce --- /dev/null +++ b/iup/srclua5/il_frame.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Frame(lua_State *L) +{ + Ihandle *ih = IupFrame(iuplua_checkihandle(L, 1)); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupframelua_open(lua_State * L) +{ + iuplua_register(L, Frame, "Frame"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/frame_be64.loh" +#else +#include "loh/frame_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/frame_le64w.loh" +#else +#include "loh/frame_le64.loh" +#endif +#else +#include "loh/frame.loh" +#endif +#endif +#else + iuplua_dofile(L, "frame.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_gauge.c b/iup/srclua5/il_gauge.c new file mode 100755 index 0000000..402e78a --- /dev/null +++ b/iup/srclua5/il_gauge.c @@ -0,0 +1,53 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iupcontrols.h" +#include "il.h" + + +static int Gauge(lua_State *L) +{ + Ihandle *ih = IupGauge(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupgaugelua_open(lua_State * L) +{ + iuplua_register(L, Gauge, "Gauge"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/gauge_be64.loh" +#else +#include "loh/gauge_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/gauge_le64w.loh" +#else +#include "loh/gauge_le64.loh" +#endif +#else +#include "loh/gauge.loh" +#endif +#endif +#else + iuplua_dofile(L, "gauge.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_getcolor.c b/iup/srclua5/il_getcolor.c new file mode 100755 index 0000000..d468d38 --- /dev/null +++ b/iup/srclua5/il_getcolor.c @@ -0,0 +1,46 @@ +/** \file + * \brief IupGetColor bindig to Lua 5. + * + * See Copyright Notice in "iup.h" + */ + +#include + +#include +#include + +#include "iup.h" + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static int GetColor(lua_State *L) +{ + int x = (int)luaL_checknumber(L,1); + int y = (int)luaL_checknumber(L,2); + unsigned char r = (unsigned char) luaL_optnumber(L,3,0); + unsigned char g = (unsigned char) luaL_optnumber(L,4,0); + unsigned char b = (unsigned char) luaL_optnumber(L,5,0); + int ret = IupGetColor(x,y,&r,&g,&b); + if (ret) + { + lua_pushnumber(L, (int) r); + lua_pushnumber(L, (int) g); + lua_pushnumber(L, (int) b); + return 3; + } + else + { + lua_pushnil(L); + return 1; + } +} +int iupgclua_open(lua_State * L) +{ + lua_pushcfunction(L, GetColor); + lua_setglobal(L, "GetColor"); + return 0; +} + diff --git a/iup/srclua5/il_getparam.c b/iup/srclua5/il_getparam.c new file mode 100755 index 0000000..c7f4936 --- /dev/null +++ b/iup/srclua5/il_getparam.c @@ -0,0 +1,177 @@ +/** \file + * \brief IupGetParam bindig to Lua 5. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include +#include + +#include "iup.h" + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +/* Used only by the Lua binding */ +int iupGetParamCount(const char *format, int *param_extra); +char iupGetParamType(const char* format, int *line_size); + + +typedef struct _getparam_data +{ + lua_State *L; + int has_func; + int func_ref; +}getparam_data; + +static int param_action(Ihandle* dialog, int param_index, void* user_data) +{ + int ret = 1; + getparam_data* gp = (getparam_data*)user_data; + if (gp->has_func) + { + lua_State *L = gp->L; + lua_getref(L, gp->func_ref); + iuplua_pushihandle(L, dialog); + lua_pushnumber(L, param_index); + if (iuplua_call_raw(L, 2, 1) != 0) /* 2 args, 1 return */ + { + ret = (int)lua_tonumber(L,-1); + lua_pop(L, 1); + } + } + return ret; +} + +static int GetParam(lua_State *L) +{ + getparam_data gp; + const char* title = luaL_checkstring(L, 1); + void* user_data = (void*)&gp; + const char* format = luaL_checkstring(L, 3); + int param_count, param_extra, i, size, ret, + line_size = 0, lua_param_start = 4; + const char* f = format; + const char* s; + void* param_data[50]; + char param_type[50]; + + gp.L = L; + gp.has_func = 0; + gp.func_ref = 0; + + memset(param_data, 0, sizeof(void*)*50); + memset(param_type, 0, sizeof(char)*50); + + param_count = iupGetParamCount(format, ¶m_extra); + + for (i = 0; i < param_count; i++) + { + char t = iupGetParamType(f, &line_size); + + if (t == 't') /* if separator */ + { + f += line_size; + i--; /* compensate next increment */ + continue; + } + + switch(t) + { + case 'b': + case 'i': + case 'l': + param_data[i] = malloc(sizeof(int)); + *(int*)(param_data[i]) = (int)luaL_checknumber(L, lua_param_start); lua_param_start++; + break; + case 'a': + case 'r': + param_data[i] = malloc(sizeof(float)); + *(float*)(param_data[i]) = (float)luaL_checknumber(L, lua_param_start); lua_param_start++; + break; + case 's': + case 'm': + s = luaL_checkstring(L, lua_param_start); lua_param_start++; + size = strlen(s); + if (size < 512) + param_data[i] = malloc(512); + else + param_data[i] = malloc(2*size); + memcpy(param_data[i], s, size+1); + break; + } + + param_type[i] = t; + f += line_size; + } + + if (lua_isfunction(L, 2)) + { + lua_pushvalue(L, 2); + gp.func_ref = lua_ref(L, 1); + gp.has_func = 1; + } + + ret = IupGetParamv(title, param_action, user_data, format, param_count, param_extra, param_data); + + lua_pushboolean(L, ret); + + if (ret) + { + for (i = 0; i < param_count; i++) + { + switch(param_type[i]) + { + case 'b': + case 'i': + case 'l': + lua_pushnumber(L, *(int*)(param_data[i])); + break; + case 'a': + case 'r': + lua_pushnumber(L, *(float*)(param_data[i])); + break; + case 's': + case 'm': + lua_pushstring(L, (char*)(param_data[i])); + break; + } + } + } + + for (i = 0; i < param_count; i++) + { + free(param_data[i]); + } + + if (gp.has_func) + lua_unref(L, gp.func_ref); + + if (ret) + return param_count+1; + else + return 1; +} + +static int GetParamParam(lua_State *L) +{ + Ihandle *dialog = iuplua_checkihandle(L, 1); + int param_index = (int)luaL_checknumber(L, 2); + Ihandle* param; + char param_str[50]; + sprintf(param_str, "PARAM%d", param_index); + param = (Ihandle*)IupGetAttribute(dialog, param_str); + iuplua_pushihandle(L, param); + return 1; +} + +void iupgetparamlua_open(lua_State * L) +{ + iuplua_register(L, GetParam, "GetParam"); + iuplua_register(L, GetParamParam, "GetParamParam"); +} diff --git a/iup/srclua5/il_glcanvas.c b/iup/srclua5/il_glcanvas.c new file mode 100755 index 0000000..9f0dfb6 --- /dev/null +++ b/iup/srclua5/il_glcanvas.c @@ -0,0 +1,90 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iupgl.h" +#include "il.h" + + +static int glcanvas_action(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "action"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int GLCanvas(lua_State *L) +{ + Ihandle *ih = IupGLCanvas(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +void iuplua_glcanvasfuncs_open(lua_State *L); + +int iupglcanvaslua_open(lua_State * L) +{ + iuplua_register(L, GLCanvas, "GLCanvas"); + + iuplua_register_cb(L, "ACTION", (lua_CFunction)glcanvas_action, "glcanvas"); + + iuplua_glcanvasfuncs_open(L); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/glcanvas_be64.loh" +#else +#include "loh/glcanvas_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/glcanvas_le64w.loh" +#else +#include "loh/glcanvas_le64.loh" +#endif +#else +#include "loh/glcanvas.loh" +#endif +#endif +#else + iuplua_dofile(L, "glcanvas.lua"); +#endif + + return 0; +} + + +int iupgllua_open(lua_State * L) +{ + if (iuplua_opencall_internal(L)) + IupGLCanvasOpen(); + + iuplua_changeEnv(L); + iupglcanvaslua_open(L); + iuplua_returnEnv(L); + return 0; +} + +/* obligatory to use require"iupluagl" */ +int luaopen_iupluagl(lua_State* L) +{ + return iupgllua_open(L); +} + +/* obligatory to use require"iupluagl51" */ +int luaopen_iupluagl51(lua_State* L) +{ + return iupgllua_open(L); +} + diff --git a/iup/srclua5/il_hbox.c b/iup/srclua5/il_hbox.c new file mode 100755 index 0000000..5734540 --- /dev/null +++ b/iup/srclua5/il_hbox.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Hbox(lua_State *L) +{ + Ihandle *ih = IupHbox(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iuphboxlua_open(lua_State * L) +{ + iuplua_register(L, Hbox, "Hbox"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/hbox_be64.loh" +#else +#include "loh/hbox_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/hbox_le64w.loh" +#else +#include "loh/hbox_le64.loh" +#endif +#else +#include "loh/hbox.loh" +#endif +#endif +#else + iuplua_dofile(L, "hbox.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_image.c b/iup/srclua5/il_image.c new file mode 100755 index 0000000..b140855 --- /dev/null +++ b/iup/srclua5/il_image.c @@ -0,0 +1,119 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + + +static int Image (lua_State * L) +{ + int w, h, c, num_colors; + unsigned char *pixels; + Ihandle* ih; + char str[20]; + + if (lua_istable(L, 1)) + { + int i, j; + + /* get the number of lines */ + h = luaL_getn(L, 1); + + /* get the number of columns of the first line */ + lua_pushnumber(L, 1); + lua_gettable(L, 1); + w = luaL_getn(L, -1); + lua_pop(L, 1); + + pixels = (unsigned char *) malloc (h*w); + + for (i=1; i<=h; i++) + { + lua_pushnumber(L, i); + lua_gettable(L, 1); + for (j=1; j<=w; j++) + { + int idx = (i-1)*w+(j-1); + lua_pushnumber(L, j); + lua_gettable(L, -2); + pixels[idx] = (unsigned char)lua_tonumber(L, -1); + lua_pop(L, 1); + } + lua_pop(L, 1); + } + + ih = IupImage(w,h,pixels); + free(pixels); + + num_colors = luaL_getn(L, 2); + num_colors = num_colors>255? 255: num_colors; + for(c=1; c<=num_colors; c++) + { + lua_rawgeti(L, 2, c); + sprintf(str, "%d", c); + IupStoreAttribute(ih, str, lua_tostring(L,-1)); + lua_pop(L, 1); + } + } + else + { + w = luaL_checkint(L, 1); + h = luaL_checkint(L, 2); + pixels = iuplua_checkuchar_array(L, 3, w*h); + ih = IupImage(w, h, pixels); + free(pixels); + + num_colors = luaL_getn(L, 4); + num_colors = num_colors>256? 256: num_colors; + for(c=1; c<=num_colors; c++) + { + lua_rawgeti(L, 4, c); + sprintf(str, "%d", c-1); + IupStoreAttribute(ih, str, lua_tostring(L,-1)); + lua_pop(L, 1); + } + } + + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupimagelua_open(lua_State * L) +{ + iuplua_register(L, Image, "Image"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/image_be64.loh" +#else +#include "loh/image_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/image_le64w.loh" +#else +#include "loh/image_le64.loh" +#endif +#else +#include "loh/image.loh" +#endif +#endif +#else + iuplua_dofile(L, "image.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_imagergb.c b/iup/srclua5/il_imagergb.c new file mode 100755 index 0000000..f9d0318 --- /dev/null +++ b/iup/srclua5/il_imagergb.c @@ -0,0 +1,57 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + + +static int ImageRGB(lua_State *L) +{ + int w = luaL_checkint(L, 1); + int h = luaL_checkint(L, 2); + unsigned char *pixels = iuplua_checkuchar_array(L, 3, w*h*3); + Ihandle *ih = IupImageRGB(w, h, pixels); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + free(pixels); + return 1; +} + +int iupimagergblua_open(lua_State * L) +{ + iuplua_register(L, ImageRGB, "ImageRGB"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/imagergb_be64.loh" +#else +#include "loh/imagergb_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/imagergb_le64w.loh" +#else +#include "loh/imagergb_le64.loh" +#endif +#else +#include "loh/imagergb.loh" +#endif +#endif +#else + iuplua_dofile(L, "imagergb.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_imagergba.c b/iup/srclua5/il_imagergba.c new file mode 100755 index 0000000..4b67620 --- /dev/null +++ b/iup/srclua5/il_imagergba.c @@ -0,0 +1,57 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + + +static int ImageRGBA(lua_State *L) +{ + int w = luaL_checkint(L, 1); + int h = luaL_checkint(L, 2); + unsigned char *pixels = iuplua_checkuchar_array(L, 3, w*h*4); + Ihandle *ih = IupImageRGBA(w, h, pixels); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + free(pixels); + return 1; +} + +int iupimagergbalua_open(lua_State * L) +{ + iuplua_register(L, ImageRGBA, "ImageRGBA"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/imagergba_be64.loh" +#else +#include "loh/imagergba_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/imagergba_le64w.loh" +#else +#include "loh/imagergba_le64.loh" +#endif +#else +#include "loh/imagergba.loh" +#endif +#endif +#else + iuplua_dofile(L, "imagergba.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_item.c b/iup/srclua5/il_item.c new file mode 100755 index 0000000..401bf6e --- /dev/null +++ b/iup/srclua5/il_item.c @@ -0,0 +1,66 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int item_action(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "action"); + return iuplua_call(L, 0); +} + +static int item_highlight_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "highlight_cb"); + return iuplua_call(L, 0); +} + +static int Item(lua_State *L) +{ + Ihandle *ih = IupItem((char *) luaL_optstring(L, 1, NULL), NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupitemlua_open(lua_State * L) +{ + iuplua_register(L, Item, "Item"); + + iuplua_register_cb(L, "ACTION", (lua_CFunction)item_action, "item"); + iuplua_register_cb(L, "HIGHLIGHT_CB", (lua_CFunction)item_highlight_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/item_be64.loh" +#else +#include "loh/item_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/item_le64w.loh" +#else +#include "loh/item_le64.loh" +#endif +#else +#include "loh/item.loh" +#endif +#endif +#else + iuplua_dofile(L, "item.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_label.c b/iup/srclua5/il_label.c new file mode 100755 index 0000000..bd4a276 --- /dev/null +++ b/iup/srclua5/il_label.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Label(lua_State *L) +{ + Ihandle *ih = IupLabel((char *) luaL_optstring(L, 1, NULL)); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iuplabellua_open(lua_State * L) +{ + iuplua_register(L, Label, "Label"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/label_be64.loh" +#else +#include "loh/label_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/label_le64w.loh" +#else +#include "loh/label_le64.loh" +#endif +#else +#include "loh/label.loh" +#endif +#endif +#else + iuplua_dofile(L, "label.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_list.c b/iup/srclua5/il_list.c new file mode 100755 index 0000000..ac1dc2f --- /dev/null +++ b/iup/srclua5/il_list.c @@ -0,0 +1,96 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int list_dropdown_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "dropdown_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int list_action(Ihandle *self, char * p0, int p1, int p2) +{ + lua_State *L = iuplua_call_start(self, "action"); + lua_pushstring(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + return iuplua_call(L, 3); +} + +static int list_dblclick_cb(Ihandle *self, int p0, char * p1) +{ + lua_State *L = iuplua_call_start(self, "dblclick_cb"); + lua_pushnumber(L, p0); + lua_pushstring(L, p1); + return iuplua_call(L, 2); +} + +static int list_edit_cb(Ihandle *self, int p0, char * p1) +{ + lua_State *L = iuplua_call_start(self, "edit_cb"); + lua_pushnumber(L, p0); + lua_pushstring(L, p1); + return iuplua_call(L, 2); +} + +static int list_multiselect_cb(Ihandle *self, char * p0) +{ + lua_State *L = iuplua_call_start(self, "multiselect_cb"); + lua_pushstring(L, p0); + return iuplua_call(L, 1); +} + +static int List(lua_State *L) +{ + Ihandle *ih = IupList(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iuplistlua_open(lua_State * L) +{ + iuplua_register(L, List, "List"); + + iuplua_register_cb(L, "DROPDOWN_CB", (lua_CFunction)list_dropdown_cb, NULL); + iuplua_register_cb(L, "ACTION", (lua_CFunction)list_action, "list"); + iuplua_register_cb(L, "DBLCLICK_CB", (lua_CFunction)list_dblclick_cb, NULL); + iuplua_register_cb(L, "EDIT_CB", (lua_CFunction)list_edit_cb, "list"); + iuplua_register_cb(L, "MULTISELECT_CB", (lua_CFunction)list_multiselect_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/list_be64.loh" +#else +#include "loh/list_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/list_le64w.loh" +#else +#include "loh/list_le64.loh" +#endif +#else +#include "loh/list.loh" +#endif +#endif +#else + iuplua_dofile(L, "list.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_mask.c b/iup/srclua5/il_mask.c new file mode 100755 index 0000000..f471242 --- /dev/null +++ b/iup/srclua5/il_mask.c @@ -0,0 +1,132 @@ +/** \file + * \brief iupmask binding for Lua 5. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupmask.h" + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + + +static int cfMaskRemove (lua_State *L) +{ + iupmaskRemove(iuplua_checkihandle(L,1)); + return 0; +} + +static int cfMaskMatRemove(lua_State *L) +{ + iupmaskMatRemove(iuplua_checkihandle(L,1), + luaL_checkint(L,2), + luaL_checkint(L,3)); + return 0; +} + +static int cfMaskSet (lua_State *L) +{ + iupmaskSet(iuplua_checkihandle(L,1), + (char*)luaL_checkstring(L,2), + luaL_checkint(L,3), + luaL_checkint(L,4)); + return 0; +} + +static int cfMaskMatSet(lua_State *L) +{ + iupmaskMatSet(iuplua_checkihandle(L,1), + (char*)luaL_checkstring(L,2), + luaL_checkint(L,3), + luaL_checkint(L,4), + luaL_checkint(L,5), + luaL_checkint(L,6)); + return 0; +} + +static int cfMaskSetInt(lua_State *L) +{ + iupmaskSetInt(iuplua_checkihandle(L,1), + luaL_checkint(L,2), + luaL_checkint(L,3), + luaL_checkint(L,4)); + return 0; +} + +static int cfMaskSetFloat(lua_State *L) +{ + iupmaskSetFloat(iuplua_checkihandle(L,1), + luaL_checkint(L,2), + (float)luaL_checknumber(L,3), + (float)luaL_checknumber(L,4)); + return 0; +} + +static int cfMaskMatSetInt (lua_State *L) +{ + iupmaskMatSetInt(iuplua_checkihandle(L,1), + luaL_checkint(L,2), + luaL_checkint(L,3), + luaL_checkint(L,4), + luaL_checkint(L,5), + luaL_checkint(L,6)); + return 0; +} + +static int cfMaskMatSetFloat (lua_State *L) +{ + iupmaskMatSetFloat(iuplua_checkihandle(L,1), + luaL_checkint(L,2), + (float)luaL_checknumber(L,3), + (float)luaL_checknumber(L,4), + luaL_checkint(L,5), + luaL_checkint(L,6)); + return 0; +} + +static int cfMaskCheck (lua_State *L) +{ + iupmaskCheck(iuplua_checkihandle(L,1)); + return 0; +} + +static int cfMaskMatCheck (lua_State *L) +{ + iupmaskMatCheck(iuplua_checkihandle(L,1), + luaL_checkint(L,2), + luaL_checkint(L,3)); + return 0; +} + +static int match_cb (Ihandle *handle) +{ + lua_State *L = iuplua_call_start(handle, "match_cb"); + return iuplua_call(L, 0); +} + +void iupmasklua_open(lua_State *L) +{ + iuplua_regstring(L, IUP_MASK_FLOAT, "MASK_FLOAT"); + iuplua_regstring(L, IUP_MASK_UFLOAT, "MASK_UFLOAT"); + iuplua_regstring(L, IUP_MASK_EFLOAT, "MASK_EFLOAT"); + iuplua_regstring(L, IUP_MASK_INT, "MASK_INT"); + iuplua_regstring(L, IUP_MASK_UINT, "MASK_UINT"); + + iuplua_register(L, cfMaskRemove, "maskRemove"); + iuplua_register(L, cfMaskMatRemove, "maskMatRemove"); + iuplua_register(L, cfMaskSet, "maskSet"); + iuplua_register(L, cfMaskMatSet, "maskMatSet"); + iuplua_register(L, cfMaskSetInt, "maskSetInt"); + iuplua_register(L, cfMaskSetFloat, "maskSetFloat"); + iuplua_register(L, cfMaskMatSetInt, "maskMatSetInt"); + iuplua_register(L, cfMaskMatSetFloat, "maskMatSetFloat"); + iuplua_register(L, cfMaskCheck, "maskCheck"); + iuplua_register(L, cfMaskMatCheck, "maskMatCheck"); + + iuplua_register_cb(L, "MATCH_CB", (lua_CFunction)match_cb, NULL); +} diff --git a/iup/srclua5/il_matrix.c b/iup/srclua5/il_matrix.c new file mode 100755 index 0000000..e747536 --- /dev/null +++ b/iup/srclua5/il_matrix.c @@ -0,0 +1,247 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iupcontrols.h" +#include "il.h" + + +static char * matrix_font_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "font_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call_rs(L, 2); +} + +static int matrix_draw_cb(Ihandle *self, int p0, int p1, int p2, int p3, int p4, int p5, int p6) +{ + lua_State *L = iuplua_call_start(self, "draw_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + lua_pushnumber(L, p4); + lua_pushnumber(L, p5); + lua_pushnumber(L, p6); + return iuplua_call(L, 7); +} + +static int matrix_edition_cb(Ihandle *self, int p0, int p1, int p2, int p3) +{ + lua_State *L = iuplua_call_start(self, "edition_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + return iuplua_call(L, 4); +} + +static int matrix_mark_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "mark_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_markedit_cb(Ihandle *self, int p0, int p1, int p2) +{ + lua_State *L = iuplua_call_start(self, "markedit_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + return iuplua_call(L, 3); +} + +static int matrix_bgcolor_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "bgcolor_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static char * matrix_value_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "value_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call_rs(L, 2); +} + +static int matrix_dropselect_cb(Ihandle *self, int p0, int p1, Ihandle * p2, char * p3, int p4, int p5) +{ + lua_State *L = iuplua_call_start(self, "dropselect_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + iuplua_pushihandle(L, p2); + lua_pushstring(L, p3); + lua_pushnumber(L, p4); + lua_pushnumber(L, p5); + return iuplua_call(L, 6); +} + +static int matrix_drop_cb(Ihandle *self, Ihandle * p0, int p1, int p2) +{ + lua_State *L = iuplua_call_start(self, "drop_cb"); + iuplua_pushihandle(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + return iuplua_call(L, 3); +} + +static int matrix_dropcheck_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "dropcheck_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_action_cb(Ihandle *self, int p0, int p1, int p2, int p3, char * p4) +{ + lua_State *L = iuplua_call_start(self, "action_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + lua_pushstring(L, p4); + return iuplua_call(L, 5); +} + +static int matrix_enteritem_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "enteritem_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_leaveitem_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "leaveitem_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_scrolltop_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "scrolltop_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_fgcolor_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "fgcolor_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_release_cb(Ihandle *self, int p0, int p1, char * p2) +{ + lua_State *L = iuplua_call_start(self, "release_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushstring(L, p2); + return iuplua_call(L, 3); +} + +static int matrix_mousemove_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "mousemove_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_value_edit_cb(Ihandle *self, int p0, int p1, char * p2) +{ + lua_State *L = iuplua_call_start(self, "value_edit_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushstring(L, p2); + return iuplua_call(L, 3); +} + +static int matrix_click_cb(Ihandle *self, int p0, int p1, char * p2) +{ + lua_State *L = iuplua_call_start(self, "click_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushstring(L, p2); + return iuplua_call(L, 3); +} + +static int Matrix(lua_State *L) +{ + Ihandle *ih = IupMatrix(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +void iuplua_matrixfuncs_open(lua_State *L); + +int iupmatrixlua_open(lua_State * L) +{ + iuplua_register(L, Matrix, "Matrix"); + + iuplua_register_cb(L, "FONT_CB", (lua_CFunction)matrix_font_cb, NULL); + iuplua_register_cb(L, "DRAW_CB", (lua_CFunction)matrix_draw_cb, NULL); + iuplua_register_cb(L, "EDITION_CB", (lua_CFunction)matrix_edition_cb, NULL); + iuplua_register_cb(L, "MARK_CB", (lua_CFunction)matrix_mark_cb, NULL); + iuplua_register_cb(L, "MARKEDIT_CB", (lua_CFunction)matrix_markedit_cb, NULL); + iuplua_register_cb(L, "BGCOLOR_CB", (lua_CFunction)matrix_bgcolor_cb, NULL); + iuplua_register_cb(L, "VALUE_CB", (lua_CFunction)matrix_value_cb, NULL); + iuplua_register_cb(L, "DROPSELECT_CB", (lua_CFunction)matrix_dropselect_cb, NULL); + iuplua_register_cb(L, "DROP_CB", (lua_CFunction)matrix_drop_cb, NULL); + iuplua_register_cb(L, "DROPCHECK_CB", (lua_CFunction)matrix_dropcheck_cb, NULL); + iuplua_register_cb(L, "ACTION_CB", (lua_CFunction)matrix_action_cb, "matrix"); + iuplua_register_cb(L, "ENTERITEM_CB", (lua_CFunction)matrix_enteritem_cb, NULL); + iuplua_register_cb(L, "LEAVEITEM_CB", (lua_CFunction)matrix_leaveitem_cb, NULL); + iuplua_register_cb(L, "SCROLLTOP_CB", (lua_CFunction)matrix_scrolltop_cb, NULL); + iuplua_register_cb(L, "FGCOLOR_CB", (lua_CFunction)matrix_fgcolor_cb, NULL); + iuplua_register_cb(L, "RELEASE_CB", (lua_CFunction)matrix_release_cb, NULL); + iuplua_register_cb(L, "MOUSEMOVE_CB", (lua_CFunction)matrix_mousemove_cb, "matrix"); + iuplua_register_cb(L, "VALUE_EDIT_CB", (lua_CFunction)matrix_value_edit_cb, NULL); + iuplua_register_cb(L, "CLICK_CB", (lua_CFunction)matrix_click_cb, NULL); + + iuplua_matrixfuncs_open(L); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/matrix_be64.loh" +#else +#include "loh/matrix_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/matrix_le64w.loh" +#else +#include "loh/matrix_le64.loh" +#endif +#else +#include "loh/matrix.loh" +#endif +#endif +#else + iuplua_dofile(L, "matrix.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_matrix_aux.c b/iup/srclua5/il_matrix_aux.c new file mode 100755 index 0000000..240c837 --- /dev/null +++ b/iup/srclua5/il_matrix_aux.c @@ -0,0 +1,85 @@ +/** \file + * \brief matrix binding for Lua 5. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcontrols.h" +#include +#include + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + +static int matrix_draw_cb(Ihandle *self, int p0, int p1, int p2, int p3, int p4, int p5, cdCanvas* cnv) +{ + lua_State *L = iuplua_call_start(self, "draw_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + lua_pushnumber(L, p4); + lua_pushnumber(L, p5); + cdlua_pushcanvas(L, cnv); + return iuplua_call(L, 7); +} + +static int matrix_bgcolor_cb(Ihandle *self, int p0, int p1, unsigned int *p2, unsigned int *p3, unsigned int *p4) +{ + int ret; + lua_State *L = iuplua_call_start(self, "bgcolor_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + ret = iuplua_call_raw(L, 2+2, LUA_MULTRET); /* 2 args + 2 args(errormsg, handle), variable number of returns */ + if (ret || lua_isnil(L, -1)) + return IUP_DEFAULT; + ret = (int)lua_tonumber(L,-1); + + if (ret == IUP_IGNORE) + { + lua_pop(L, 1); + return IUP_IGNORE; + } + + *p2 = (unsigned int)lua_tonumber(L, -4); + *p3 = (unsigned int)lua_tonumber(L, -3); + *p4 = (unsigned int)lua_tonumber(L, -2); + lua_pop(L, 1); + return IUP_DEFAULT; +} + +static int matrix_fgcolor_cb(Ihandle *self, int p0, int p1, unsigned int *p2, unsigned int *p3, unsigned int *p4) +{ + int ret; + lua_State *L = iuplua_call_start(self, "fgcolor_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + ret = iuplua_call_raw(L, 2+2, LUA_MULTRET); /* 2 args + 2 args(errormsg, handle), variable number of returns */ + if (ret || lua_isnil(L, -1)) + return IUP_DEFAULT; + ret = (int)lua_tonumber(L,-1); + + if (ret == IUP_IGNORE) + { + lua_pop(L, 1); + return IUP_IGNORE; + } + + *p2 = (unsigned int)lua_tonumber(L, -4); + *p3 = (unsigned int)lua_tonumber(L, -3); + *p4 = (unsigned int)lua_tonumber(L, -2); + lua_pop(L, 1); + return IUP_DEFAULT; +} + +void iuplua_matrixfuncs_open (lua_State *L) +{ + iuplua_register_cb(L, "BGCOLOR_CB", (lua_CFunction)matrix_bgcolor_cb, NULL); + iuplua_register_cb(L, "FGCOLOR_CB", (lua_CFunction)matrix_fgcolor_cb, NULL); + iuplua_register_cb(L, "DRAW_CB", (lua_CFunction)matrix_draw_cb, NULL); +} diff --git a/iup/srclua5/il_menu.c b/iup/srclua5/il_menu.c new file mode 100755 index 0000000..e8eede7 --- /dev/null +++ b/iup/srclua5/il_menu.c @@ -0,0 +1,66 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int menu_open_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "open_cb"); + return iuplua_call(L, 0); +} + +static int menu_menuclose_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "menuclose_cb"); + return iuplua_call(L, 0); +} + +static int Menu(lua_State *L) +{ + Ihandle *ih = IupMenu(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupmenulua_open(lua_State * L) +{ + iuplua_register(L, Menu, "Menu"); + + iuplua_register_cb(L, "OPEN_CB", (lua_CFunction)menu_open_cb, NULL); + iuplua_register_cb(L, "MENUCLOSE_CB", (lua_CFunction)menu_menuclose_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/menu_be64.loh" +#else +#include "loh/menu_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/menu_le64w.loh" +#else +#include "loh/menu_le64.loh" +#endif +#else +#include "loh/menu.loh" +#endif +#endif +#else + iuplua_dofile(L, "menu.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_messagedlg.c b/iup/srclua5/il_messagedlg.c new file mode 100755 index 0000000..fb1047d --- /dev/null +++ b/iup/srclua5/il_messagedlg.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int MessageDlg(lua_State *L) +{ + Ihandle *ih = IupMessageDlg(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupmessagedlglua_open(lua_State * L) +{ + iuplua_register(L, MessageDlg, "MessageDlg"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/messagedlg_be64.loh" +#else +#include "loh/messagedlg_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/messagedlg_le64w.loh" +#else +#include "loh/messagedlg_le64.loh" +#endif +#else +#include "loh/messagedlg.loh" +#endif +#endif +#else + iuplua_dofile(L, "messagedlg.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_multiline.c b/iup/srclua5/il_multiline.c new file mode 100755 index 0000000..9108e3f --- /dev/null +++ b/iup/srclua5/il_multiline.c @@ -0,0 +1,61 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int multiline_action(Ihandle *self, int p0, char * p1) +{ + lua_State *L = iuplua_call_start(self, "action"); + lua_pushnumber(L, p0); + lua_pushstring(L, p1); + return iuplua_call(L, 2); +} + +static int MultiLine(lua_State *L) +{ + Ihandle *ih = IupMultiLine(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupmultilinelua_open(lua_State * L) +{ + iuplua_register(L, MultiLine, "MultiLine"); + + iuplua_register_cb(L, "ACTION", (lua_CFunction)multiline_action, "multiline"); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/multiline_be64.loh" +#else +#include "loh/multiline_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/multiline_le64w.loh" +#else +#include "loh/multiline_le64.loh" +#endif +#else +#include "loh/multiline.loh" +#endif +#endif +#else + iuplua_dofile(L, "multiline.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_normalizer.c b/iup/srclua5/il_normalizer.c new file mode 100755 index 0000000..42097d8 --- /dev/null +++ b/iup/srclua5/il_normalizer.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Normalizer(lua_State *L) +{ + Ihandle *ih = IupNormalizer(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupnormalizerlua_open(lua_State * L) +{ + iuplua_register(L, Normalizer, "Normalizer"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/normalizer_be64.loh" +#else +#include "loh/normalizer_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/normalizer_le64w.loh" +#else +#include "loh/normalizer_le64.loh" +#endif +#else +#include "loh/normalizer.loh" +#endif +#endif +#else + iuplua_dofile(L, "normalizer.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_olecontrol.c b/iup/srclua5/il_olecontrol.c new file mode 100755 index 0000000..955b5da --- /dev/null +++ b/iup/srclua5/il_olecontrol.c @@ -0,0 +1,77 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iupole.h" +#include "il.h" + + +static int OleControl(lua_State *L) +{ + Ihandle *ih = IupOleControl((char *) luaL_checkstring(L, 1)); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupolecontrollua_open(lua_State * L) +{ + iuplua_register(L, OleControl, "OleControl"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/olecontrol_be64.loh" +#else +#include "loh/olecontrol_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/olecontrol_le64w.loh" +#else +#include "loh/olecontrol_le64.loh" +#endif +#else +#include "loh/olecontrol.loh" +#endif +#endif +#else + iuplua_dofile(L, "olecontrol.lua"); +#endif + + return 0; +} + + +int iupolelua_open(lua_State* L) +{ + if (iuplua_opencall_internal(L)) + IupOleControlOpen(); + + iuplua_changeEnv(L); + iupolecontrollua_open(L); + iuplua_returnEnv(L); + return 0; +} + +/* obligatory to use require"iupluaole" */ +int luaopen_iupluaole(lua_State* L) +{ + return iupolelua_open(L); +} + +/* obligatory to use require"iupluaole51" */ +int luaopen_iupluaole51(lua_State* L) +{ + return iupolelua_open(L); +} + diff --git a/iup/srclua5/il_pplot.c b/iup/srclua5/il_pplot.c new file mode 100755 index 0000000..8929d33 --- /dev/null +++ b/iup/srclua5/il_pplot.c @@ -0,0 +1,151 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iup_pplot.h" +#include "il.h" + + +static int pplot_edit_cb(Ihandle *self, int p0, int p1, float p2, float p3, float p4, float p5) +{ + lua_State *L = iuplua_call_start(self, "edit_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + lua_pushnumber(L, p4); + lua_pushnumber(L, p5); + return iuplua_call(L, 6); +} + +static int pplot_deleteend_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "deleteend_cb"); + return iuplua_call(L, 0); +} + +static int pplot_selectbegin_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "selectbegin_cb"); + return iuplua_call(L, 0); +} + +static int pplot_postdraw_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "postdraw_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int pplot_delete_cb(Ihandle *self, int p0, int p1, float p2, float p3) +{ + lua_State *L = iuplua_call_start(self, "delete_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + return iuplua_call(L, 4); +} + +static int pplot_predraw_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "predraw_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int pplot_selectend_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "selectend_cb"); + return iuplua_call(L, 0); +} + +static int pplot_select_cb(Ihandle *self, int p0, int p1, float p2, float p3, int p4) +{ + lua_State *L = iuplua_call_start(self, "select_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + lua_pushnumber(L, p4); + return iuplua_call(L, 5); +} + +static int pplot_deletebegin_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "deletebegin_cb"); + return iuplua_call(L, 0); +} + +static int pplot_editbegin_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "editbegin_cb"); + return iuplua_call(L, 0); +} + +static int pplot_editend_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "editend_cb"); + return iuplua_call(L, 0); +} + +static int PPlot(lua_State *L) +{ + Ihandle *ih = IupPPlot(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +void iuplua_pplotfuncs_open(lua_State *L); + +int iuppplotlua_open(lua_State * L) +{ + iuplua_register(L, PPlot, "PPlot"); + + iuplua_register_cb(L, "EDIT_CB", (lua_CFunction)pplot_edit_cb, "pplot"); + iuplua_register_cb(L, "DELETEEND_CB", (lua_CFunction)pplot_deleteend_cb, NULL); + iuplua_register_cb(L, "SELECTBEGIN_CB", (lua_CFunction)pplot_selectbegin_cb, NULL); + iuplua_register_cb(L, "POSTDRAW_CB", (lua_CFunction)pplot_postdraw_cb, NULL); + iuplua_register_cb(L, "DELETE_CB", (lua_CFunction)pplot_delete_cb, NULL); + iuplua_register_cb(L, "PREDRAW_CB", (lua_CFunction)pplot_predraw_cb, NULL); + iuplua_register_cb(L, "SELECTEND_CB", (lua_CFunction)pplot_selectend_cb, NULL); + iuplua_register_cb(L, "SELECT_CB", (lua_CFunction)pplot_select_cb, NULL); + iuplua_register_cb(L, "DELETEBEGIN_CB", (lua_CFunction)pplot_deletebegin_cb, NULL); + iuplua_register_cb(L, "EDITBEGIN_CB", (lua_CFunction)pplot_editbegin_cb, NULL); + iuplua_register_cb(L, "EDITEND_CB", (lua_CFunction)pplot_editend_cb, NULL); + + iuplua_pplotfuncs_open(L); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/pplot_be64.loh" +#else +#include "loh/pplot_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/pplot_le64w.loh" +#else +#include "loh/pplot_le64.loh" +#endif +#else +#include "loh/pplot.loh" +#endif +#endif +#else + iuplua_dofile(L, "pplot.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_progressbar.c b/iup/srclua5/il_progressbar.c new file mode 100755 index 0000000..5dc789e --- /dev/null +++ b/iup/srclua5/il_progressbar.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int ProgressBar(lua_State *L) +{ + Ihandle *ih = IupProgressBar(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupprogressbarlua_open(lua_State * L) +{ + iuplua_register(L, ProgressBar, "ProgressBar"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/progressbar_be64.loh" +#else +#include "loh/progressbar_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/progressbar_le64w.loh" +#else +#include "loh/progressbar_le64.loh" +#endif +#else +#include "loh/progressbar.loh" +#endif +#endif +#else + iuplua_dofile(L, "progressbar.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_radio.c b/iup/srclua5/il_radio.c new file mode 100755 index 0000000..ef05eef --- /dev/null +++ b/iup/srclua5/il_radio.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Radio(lua_State *L) +{ + Ihandle *ih = IupRadio(iuplua_checkihandle(L, 1)); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupradiolua_open(lua_State * L) +{ + iuplua_register(L, Radio, "Radio"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/radio_be64.loh" +#else +#include "loh/radio_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/radio_le64w.loh" +#else +#include "loh/radio_le64.loh" +#endif +#else +#include "loh/radio.loh" +#endif +#endif +#else + iuplua_dofile(L, "radio.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_sbox.c b/iup/srclua5/il_sbox.c new file mode 100755 index 0000000..9a2e6d5 --- /dev/null +++ b/iup/srclua5/il_sbox.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Sbox(lua_State *L) +{ + Ihandle *ih = IupSbox(iuplua_checkihandle(L, 1)); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupsboxlua_open(lua_State * L) +{ + iuplua_register(L, Sbox, "Sbox"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/sbox_be64.loh" +#else +#include "loh/sbox_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/sbox_le64w.loh" +#else +#include "loh/sbox_le64.loh" +#endif +#else +#include "loh/sbox.loh" +#endif +#endif +#else + iuplua_dofile(L, "sbox.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_scanf.c b/iup/srclua5/il_scanf.c new file mode 100755 index 0000000..6f035a7 --- /dev/null +++ b/iup/srclua5/il_scanf.c @@ -0,0 +1,197 @@ +/** \file + * \brief IUP binding for Lua 5. + * IupScanf special implementation. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" + +#include "il.h" + +#include "iup_str.h" +#include "iup_predial.h" + +#define ALLOC(n,t) ((t *)calloc((n),sizeof(t))) +#define REQUIRE(b) {if (!(b)) goto cleanup;} + +int iupluaScanf(lua_State *L) +{ + char *format; + int i; + int fields; + int *width = NULL; + int *scroll = NULL; + char **prompt = NULL; + char **text = NULL; + char *title = NULL; + char *s = NULL; + char *s1 = NULL; + char *outf = NULL; + int indParam; /* va_list va; */ + int total = 0; + + format = (char*)luaL_checkstring(L, 1); + fields = iupStrCountChar(format, '\n') - 1; + REQUIRE(fields > 0); + width = ALLOC(fields, int); + REQUIRE(width != NULL); + scroll = ALLOC(fields, int); + REQUIRE(scroll != NULL); + prompt = ALLOC(fields, char *); + REQUIRE(prompt != NULL); + text = ALLOC(fields, char *); + REQUIRE(text != NULL); + + indParam = 2; /* va_start(va,format); */ + REQUIRE((s1 = s = (char *) iupStrDup(format)) != NULL); + title = iupStrCopyUntil(&s, '\n'); + REQUIRE(title != NULL); + for (i = 0; i < fields; ++i) { + int n; + prompt[i] = iupStrCopyUntil(&s, '%'); + REQUIRE(prompt[i] != NULL); + n = sscanf(s, "%d.%d", width + i, scroll + i); + REQUIRE(n == 2); + s = strchr(s, '%'); + REQUIRE(s != NULL); + if (outf) free(outf); + outf = iupStrCopyUntil(&s, '\n'); + text[i] = ALLOC(width[i] + 1, char); + REQUIRE(text[i] != NULL); + + switch (s[-2]) { + case 'd': + case 'i': + case 'o': + case 'u': + case 'x': + case 'X': + if (s[-3] == 'l') + sprintf(text[i], outf, luaL_checklong(L, indParam++)); + else if (s[-3] == 'h') + sprintf(text[i], outf, (short) luaL_checkint(L, indParam++)); + else + sprintf(text[i], outf, luaL_checkint(L, indParam++)); + break; + case 'e': + case 'f': + case 'g': + case 'E': + case 'G': + if (s[-3] == 'l') + sprintf(text[i], outf, luaL_checknumber(L, indParam++)); + else + sprintf(text[i], outf, (float)luaL_checknumber(L, indParam++)); + break; + case 's': + sprintf(text[i], outf, (char *)luaL_checkstring(L, indParam++)); + break; + default: + goto cleanup; + } + } + /* va_end(va); */ + + REQUIRE(iupDataEntry(fields, width, scroll, title, prompt, text)>0); + + /* va_start(va,format); */ + s = strchr(format, '\n') + 1; + for (i = 0; i < fields; ++i) { + s = strchr(s, '\n') + 1; + switch (s[-2]) { + case 'd': + case 'u': + if (s[-3] == 'l') { + long l = 0; + sscanf(text[i], "%ld", &l); + lua_pushnumber(L, l); + total++; + } else if (s[-3] == 'h') { + short l = 0; + sscanf(text[i], "%hd", &l); + lua_pushnumber(L, l); + total++; + } else { + int l = 0; + sscanf(text[i], "%d", &l); + lua_pushnumber(L, l); + total++; + } + break; + case 'i': + case 'o': + case 'x': + case 'X': + if (s[-3] == 'l') { + long l = 0; + sscanf(text[i], "%li", &l); + lua_pushnumber(L, l); + total++; + } else if (s[-3] == 'h') { + short l = 0; + sscanf(text[i], "%hi", &l); + lua_pushnumber(L, l); + total++; + } else { + int l = 0; + sscanf(text[i], "%i", &l); + lua_pushnumber(L, l); + total++; + } + break; + case 'e': + case 'f': + case 'g': + case 'E': + case 'G': + if (s[-3] == 'l') { + double l = 0; + sscanf(text[i], "%lg", &l); + lua_pushnumber(L, l); + total++; + } else { + float l = 0; + sscanf(text[i], "%g", &l); + lua_pushnumber(L, l); + total++; + } + break; + case 's': + lua_pushstring(L, text[i]); + total++; + break; + } + } + /* va_end(va); */ + +cleanup: + if (s1) free(s1); + if (title) free(title); + if (width) free(width); + if (scroll) free(scroll); + if (outf) free(outf); + if (prompt) + { + for (i = 0; i < fields; ++i) + if (prompt[i]) free(prompt[i]); + free(prompt); + } + if (text) + { + for (i = 0; i < fields; ++i) + if (text[i]) free(text[i]); + free(text); + } + + return total; +} + diff --git a/iup/srclua5/il_separator.c b/iup/srclua5/il_separator.c new file mode 100755 index 0000000..cfd71b1 --- /dev/null +++ b/iup/srclua5/il_separator.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Separator(lua_State *L) +{ + Ihandle *ih = IupSeparator(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupseparatorlua_open(lua_State * L) +{ + iuplua_register(L, Separator, "Separator"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/separator_be64.loh" +#else +#include "loh/separator_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/separator_le64w.loh" +#else +#include "loh/separator_le64.loh" +#endif +#else +#include "loh/separator.loh" +#endif +#endif +#else + iuplua_dofile(L, "separator.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_spin.c b/iup/srclua5/il_spin.c new file mode 100755 index 0000000..c3e5439 --- /dev/null +++ b/iup/srclua5/il_spin.c @@ -0,0 +1,60 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int spin_spin_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "spin_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int Spin(lua_State *L) +{ + Ihandle *ih = IupSpin(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupspinlua_open(lua_State * L) +{ + iuplua_register(L, Spin, "Spin"); + + iuplua_register_cb(L, "SPIN_CB", (lua_CFunction)spin_spin_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/spin_be64.loh" +#else +#include "loh/spin_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/spin_le64w.loh" +#else +#include "loh/spin_le64.loh" +#endif +#else +#include "loh/spin.loh" +#endif +#endif +#else + iuplua_dofile(L, "spin.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_spinbox.c b/iup/srclua5/il_spinbox.c new file mode 100755 index 0000000..843154e --- /dev/null +++ b/iup/srclua5/il_spinbox.c @@ -0,0 +1,60 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int spinbox_spin_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "spin_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int Spinbox(lua_State *L) +{ + Ihandle *ih = IupSpinbox(iuplua_checkihandle(L, 1)); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupspinboxlua_open(lua_State * L) +{ + iuplua_register(L, Spinbox, "Spinbox"); + + iuplua_register_cb(L, "SPIN_CB", (lua_CFunction)spinbox_spin_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/spinbox_be64.loh" +#else +#include "loh/spinbox_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/spinbox_le64w.loh" +#else +#include "loh/spinbox_le64.loh" +#endif +#else +#include "loh/spinbox.loh" +#endif +#endif +#else + iuplua_dofile(L, "spinbox.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_submenu.c b/iup/srclua5/il_submenu.c new file mode 100755 index 0000000..b82dd4b --- /dev/null +++ b/iup/srclua5/il_submenu.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Submenu(lua_State *L) +{ + Ihandle *ih = IupSubmenu((char *) luaL_optstring(L, 1, NULL), iuplua_checkihandle(L, 2)); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupsubmenulua_open(lua_State * L) +{ + iuplua_register(L, Submenu, "Submenu"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/submenu_be64.loh" +#else +#include "loh/submenu_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/submenu_le64w.loh" +#else +#include "loh/submenu_le64.loh" +#endif +#else +#include "loh/submenu.loh" +#endif +#endif +#else + iuplua_dofile(L, "submenu.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_tabs.c b/iup/srclua5/il_tabs.c new file mode 100755 index 0000000..09c68aa --- /dev/null +++ b/iup/srclua5/il_tabs.c @@ -0,0 +1,63 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int tabs_tabchange_cb(Ihandle *self, Ihandle * p0, Ihandle * p1) +{ + lua_State *L = iuplua_call_start(self, "tabchange_cb"); + iuplua_pushihandle(L, p0); + iuplua_pushihandle(L, p1); + return iuplua_call(L, 2); +} + +static int Tabsv(lua_State *L) +{ + Ihandle **hlist = iuplua_checkihandle_array(L, 1); + Ihandle *h = IupTabsv(hlist); + iuplua_plugstate(L, h); + iuplua_pushihandle_raw(L, h); + free(hlist); + return 1; +} + +int iuptabslua_open(lua_State * L) +{ + iuplua_register(L, Tabsv, "Tabsv"); + + iuplua_register_cb(L, "TABCHANGE_CB", (lua_CFunction)tabs_tabchange_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/tabs_be64.loh" +#else +#include "loh/tabs_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/tabs_le64w.loh" +#else +#include "loh/tabs_le64.loh" +#endif +#else +#include "loh/tabs.loh" +#endif +#endif +#else + iuplua_dofile(L, "tabs.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_text.c b/iup/srclua5/il_text.c new file mode 100755 index 0000000..f3751f2 --- /dev/null +++ b/iup/srclua5/il_text.c @@ -0,0 +1,78 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int text_caret_cb(Ihandle *self, int p0, int p1, int p2) +{ + lua_State *L = iuplua_call_start(self, "caret_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + return iuplua_call(L, 3); +} + +static int text_action(Ihandle *self, int p0, char * p1) +{ + lua_State *L = iuplua_call_start(self, "action"); + lua_pushnumber(L, p0); + lua_pushstring(L, p1); + return iuplua_call(L, 2); +} + +static int text_valuechanged_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "valuechanged_cb"); + return iuplua_call(L, 0); +} + +static int Text(lua_State *L) +{ + Ihandle *ih = IupText(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iuptextlua_open(lua_State * L) +{ + iuplua_register(L, Text, "Text"); + + iuplua_register_cb(L, "CARET_CB", (lua_CFunction)text_caret_cb, NULL); + iuplua_register_cb(L, "ACTION", (lua_CFunction)text_action, "text"); + iuplua_register_cb(L, "VALUECHANGED_CB", (lua_CFunction)text_valuechanged_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/text_be64.loh" +#else +#include "loh/text_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/text_le64w.loh" +#else +#include "loh/text_le64.loh" +#endif +#else +#include "loh/text.loh" +#endif +#endif +#else + iuplua_dofile(L, "text.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_timer.c b/iup/srclua5/il_timer.c new file mode 100755 index 0000000..b4845ee --- /dev/null +++ b/iup/srclua5/il_timer.c @@ -0,0 +1,59 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int timer_action_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "action_cb"); + return iuplua_call(L, 0); +} + +static int Timer(lua_State *L) +{ + Ihandle *ih = IupTimer(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iuptimerlua_open(lua_State * L) +{ + iuplua_register(L, Timer, "Timer"); + + iuplua_register_cb(L, "ACTION_CB", (lua_CFunction)timer_action_cb, "timer"); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/timer_be64.loh" +#else +#include "loh/timer_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/timer_le64w.loh" +#else +#include "loh/timer_le64.loh" +#endif +#else +#include "loh/timer.loh" +#endif +#endif +#else + iuplua_dofile(L, "timer.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_toggle.c b/iup/srclua5/il_toggle.c new file mode 100755 index 0000000..bea7099 --- /dev/null +++ b/iup/srclua5/il_toggle.c @@ -0,0 +1,60 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int toggle_action(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "action"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int Toggle(lua_State *L) +{ + Ihandle *ih = IupToggle((char *) luaL_optstring(L, 1, NULL), NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iuptogglelua_open(lua_State * L) +{ + iuplua_register(L, Toggle, "Toggle"); + + iuplua_register_cb(L, "ACTION", (lua_CFunction)toggle_action, "toggle"); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/toggle_be64.loh" +#else +#include "loh/toggle_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/toggle_le64w.loh" +#else +#include "loh/toggle_le64.loh" +#endif +#else +#include "loh/toggle.loh" +#endif +#endif +#else + iuplua_dofile(L, "toggle.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_tree.c b/iup/srclua5/il_tree.c new file mode 100755 index 0000000..a9eb407 --- /dev/null +++ b/iup/srclua5/il_tree.c @@ -0,0 +1,152 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int tree_branchopen_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "branchopen_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int tree_selection_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "selection_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int tree_dragdrop_cb(Ihandle *self, int p0, int p1, int p2, int p3) +{ + lua_State *L = iuplua_call_start(self, "dragdrop_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + return iuplua_call(L, 4); +} + +static int tree_rename_cb(Ihandle *self, int p0, char * p1) +{ + lua_State *L = iuplua_call_start(self, "rename_cb"); + lua_pushnumber(L, p0); + lua_pushstring(L, p1); + return iuplua_call(L, 2); +} + +static int tree_renamenode_cb(Ihandle *self, int p0, char * p1) +{ + lua_State *L = iuplua_call_start(self, "renamenode_cb"); + lua_pushnumber(L, p0); + lua_pushstring(L, p1); + return iuplua_call(L, 2); +} + +static int tree_showrename_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "showrename_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int tree_multiselection_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "multiselection_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int tree_branchclose_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "branchclose_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int tree_executeleaf_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "executeleaf_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int tree_rightclick_cb(Ihandle *self, int p0) +{ + lua_State *L = iuplua_call_start(self, "rightclick_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int tree_noderemoved_cb(Ihandle *self, int p0, char * p1) +{ + lua_State *L = iuplua_call_start(self, "noderemoved_cb"); + lua_pushnumber(L, p0); + lua_pushstring(L, p1); + return iuplua_call(L, 2); +} + +static int Tree(lua_State *L) +{ + Ihandle *ih = IupTree(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +void iuplua_treefuncs_open(lua_State *L); + +int iuptreelua_open(lua_State * L) +{ + iuplua_register(L, Tree, "Tree"); + + iuplua_register_cb(L, "BRANCHOPEN_CB", (lua_CFunction)tree_branchopen_cb, NULL); + iuplua_register_cb(L, "SELECTION_CB", (lua_CFunction)tree_selection_cb, NULL); + iuplua_register_cb(L, "DRAGDROP_CB", (lua_CFunction)tree_dragdrop_cb, NULL); + iuplua_register_cb(L, "RENAME_CB", (lua_CFunction)tree_rename_cb, NULL); + iuplua_register_cb(L, "RENAMENODE_CB", (lua_CFunction)tree_renamenode_cb, NULL); + iuplua_register_cb(L, "SHOWRENAME_CB", (lua_CFunction)tree_showrename_cb, NULL); + iuplua_register_cb(L, "MULTISELECTION_CB", (lua_CFunction)tree_multiselection_cb, NULL); + iuplua_register_cb(L, "BRANCHCLOSE_CB", (lua_CFunction)tree_branchclose_cb, NULL); + iuplua_register_cb(L, "EXECUTELEAF_CB", (lua_CFunction)tree_executeleaf_cb, NULL); + iuplua_register_cb(L, "RIGHTCLICK_CB", (lua_CFunction)tree_rightclick_cb, NULL); + iuplua_register_cb(L, "NODEREMOVED_CB", (lua_CFunction)tree_noderemoved_cb, NULL); + + iuplua_treefuncs_open(L); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/tree_be64.loh" +#else +#include "loh/tree_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/tree_le64w.loh" +#else +#include "loh/tree_le64.loh" +#endif +#else +#include "loh/tree.loh" +#endif +#endif +#else + iuplua_dofile(L, "tree.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_tree_aux.c b/iup/srclua5/il_tree_aux.c new file mode 100755 index 0000000..99e721b --- /dev/null +++ b/iup/srclua5/il_tree_aux.c @@ -0,0 +1,184 @@ +/** \file + * \brief iuptree binding for Lua 5. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcontrols.h" + +#include "iuplua.h" +#include "il.h" +#include "il_controls.h" + +/* + The REGISTRY is used to store references to the associated Lua objects. + Given an ID, to retreive a Lua object is quite simple. + + But given a user_id to obtain the ID is more complicated. + The IUPTREEREFTABLE is used to do this mapping. + We use the object as the index to this table. +*/ + +/* iup.IUPTREEREFTABLE[object at pos] = ref */ +static void tree_settableref(lua_State *L, int pos, int ref) +{ + lua_getglobal(L, "iup"); + lua_pushstring(L, "IUPTREEREFTABLE"); + lua_gettable(L, -2); + lua_remove(L, -2); + lua_pushvalue(L, pos); + if(ref == LUA_NOREF) + lua_pushnil(L); + else + lua_pushnumber(L, ref); + lua_settable(L, -3); + lua_pop(L, 1); +} + +/* ref = iup.IUPTREEREFTABLE[object at pos] */ +static int tree_gettableref(lua_State *L, int pos) +{ + lua_getglobal(L, "iup"); + lua_pushstring(L, "IUPTREEREFTABLE"); + lua_gettable(L, -2); + lua_remove(L, -2); + lua_pushvalue(L, pos); + lua_gettable(L, -2); + if (lua_isnil(L, -1)) + { + lua_pop(L, 1); + return LUA_NOREF; + } + else + { + int ref = (int) lua_tonumber(L, -1); + lua_pop(L, 1); + return ref; + } +} + +static void tree_push_userid(lua_State *L, void* userid) +{ + int ref = (int)userid; + if (ref == 0) /* userid is actually NULL */ + lua_pushnil(L); + else + { + if (ref > 0) ref--; /* only positive references are shifted */ + lua_getref(L, ref); + } +} + +/***************************************************************************** + * Userdata/Table <-> id functions + ****************************************************************************/ + +static int TreeGetId(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + int ref = tree_gettableref(L, 2); + if (ref == LUA_NOREF) + lua_pushnil(L); + else + { + int id; + if (ref >= 0) ref++; /* only positive references are shifted */ + id = IupTreeGetId(ih, (void*)ref); + if (id == -1) + lua_pushnil(L); + else + lua_pushnumber(L, id); + } + return 1; +} + +static int TreeGetUserId(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + int id = (int)luaL_checknumber(L,2); + tree_push_userid(L, IupTreeGetUserId(ih, id)); + return 1; +} + +static int TreeSetUserId(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + int id = (int)luaL_checknumber(L,2); + int ref = (int)IupTreeGetUserId(ih, id); + if (ref != 0) /* userid is not NULL */ + { + if (ref > 0) ref--; /* only positive references are shifted */ + + /* release the previous object referenced there */ + lua_getref(L, ref); + tree_settableref(L, 4, LUA_NOREF); + lua_unref(L, ref); + lua_pop(L, 1); + } + + if (lua_isnil(L, 3)) + IupTreeSetUserId(ih, id, NULL); + else + { + /* add a new reference */ + lua_pushvalue(L, 3); + ref = lua_ref(L, 1); + tree_settableref(L, 3, ref); + + if (ref >= 0) ref++; /* only positive references are shifted */ + IupTreeSetUserId(ih, id, (char*)ref); + } + + return 0; +} + +static int tree_multiselection_cb(Ihandle *ih, int* ids, int p1) +{ + int i; + lua_State *L = iuplua_call_start(ih, "multiselection_cb"); + lua_newtable(L); + for (i = 0; i < p1; i++) + { + lua_pushnumber(L,i+1); + lua_pushnumber(L,ids[i]); + lua_settable(L,-3); + } + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int tree_noderemoved_cb(Ihandle *ih, int id, void* p1) +{ + lua_State *L = iuplua_call_start(ih, "noderemoved_cb"); + lua_pushnumber(L, id); + tree_push_userid(L, p1); + return iuplua_call(L, 2); +} + +void iuplua_treefuncs_open (lua_State *L) +{ + iuplua_dostring(L, "IUPTREEREFTABLE={}", ""); + + iuplua_register_cb(L, "MULTISELECTION_CB", (lua_CFunction)tree_multiselection_cb, NULL); + iuplua_register_cb(L, "NODEREMOVED_CB", (lua_CFunction)tree_noderemoved_cb, NULL); + +/* In Lua 5: + TreeSetTableId = TreeSetUserId + TreeGetTable = TreeGetUserId + TreeGetTableId = TreeGetId +*/ + + /* Userdata <-> id */ + iuplua_register(L, TreeGetId, "TreeGetId"); + iuplua_register(L, TreeGetUserId, "TreeGetUserId"); + iuplua_register(L, TreeSetUserId, "TreeSetUserId"); + + /* Table <-> id */ + iuplua_register(L, TreeGetId, "TreeGetTableId"); + iuplua_register(L, TreeGetUserId, "TreeGetTable"); + iuplua_register(L, TreeSetUserId, "TreeSetTableId"); +} diff --git a/iup/srclua5/il_user.c b/iup/srclua5/il_user.c new file mode 100755 index 0000000..09475f2 --- /dev/null +++ b/iup/srclua5/il_user.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int User(lua_State *L) +{ + Ihandle *ih = IupUser(); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupuserlua_open(lua_State * L) +{ + iuplua_register(L, User, "User"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/user_be64.loh" +#else +#include "loh/user_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/user_le64w.loh" +#else +#include "loh/user_le64.loh" +#endif +#else +#include "loh/user.loh" +#endif +#endif +#else + iuplua_dofile(L, "user.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_val.c b/iup/srclua5/il_val.c new file mode 100755 index 0000000..e8918d7 --- /dev/null +++ b/iup/srclua5/il_val.c @@ -0,0 +1,76 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int val_button_press_cb(Ihandle *self, double p0) +{ + lua_State *L = iuplua_call_start(self, "button_press_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int val_mousemove_cb(Ihandle *self, double p0) +{ + lua_State *L = iuplua_call_start(self, "mousemove_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int val_button_release_cb(Ihandle *self, double p0) +{ + lua_State *L = iuplua_call_start(self, "button_release_cb"); + lua_pushnumber(L, p0); + return iuplua_call(L, 1); +} + +static int Val(lua_State *L) +{ + Ihandle *ih = IupVal((char *) luaL_checkstring(L, 1)); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupvallua_open(lua_State * L) +{ + iuplua_register(L, Val, "Val"); + + iuplua_register_cb(L, "BUTTON_PRESS_CB", (lua_CFunction)val_button_press_cb, NULL); + iuplua_register_cb(L, "MOUSEMOVE_CB", (lua_CFunction)val_mousemove_cb, "val"); + iuplua_register_cb(L, "BUTTON_RELEASE_CB", (lua_CFunction)val_button_release_cb, NULL); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/val_be64.loh" +#else +#include "loh/val_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/val_le64w.loh" +#else +#include "loh/val_le64.loh" +#endif +#else +#include "loh/val.loh" +#endif +#endif +#else + iuplua_dofile(L, "val.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_vbox.c b/iup/srclua5/il_vbox.c new file mode 100755 index 0000000..ff2c55d --- /dev/null +++ b/iup/srclua5/il_vbox.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Vbox(lua_State *L) +{ + Ihandle *ih = IupVbox(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupvboxlua_open(lua_State * L) +{ + iuplua_register(L, Vbox, "Vbox"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/vbox_be64.loh" +#else +#include "loh/vbox_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/vbox_le64w.loh" +#else +#include "loh/vbox_le64.loh" +#endif +#else +#include "loh/vbox.loh" +#endif +#endif +#else + iuplua_dofile(L, "vbox.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/il_zbox.c b/iup/srclua5/il_zbox.c new file mode 100755 index 0000000..cdc47be --- /dev/null +++ b/iup/srclua5/il_zbox.c @@ -0,0 +1,52 @@ +/****************************************************************************** + * Automatically generated file (iuplua5). Please don't change anything. * + *****************************************************************************/ + +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "il.h" + + +static int Zbox(lua_State *L) +{ + Ihandle *ih = IupZbox(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +int iupzboxlua_open(lua_State * L) +{ + iuplua_register(L, Zbox, "Zbox"); + + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/zbox_be64.loh" +#else +#include "loh/zbox_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/zbox_le64w.loh" +#else +#include "loh/zbox_le64.loh" +#endif +#else +#include "loh/zbox.loh" +#endif +#endif +#else + iuplua_dofile(L, "zbox.lua"); +#endif + + return 0; +} + diff --git a/iup/srclua5/image.lua b/iup/srclua5/image.lua new file mode 100755 index 0000000..38ef556 --- /dev/null +++ b/iup/srclua5/image.lua @@ -0,0 +1,96 @@ +------------------------------------------------------------------------------ +-- Image class +------------------------------------------------------------------------------ +local ctrl = { + nick = "image", + parent = WIDGET, + creation = "nns", -- fake definition + callback = {}, + createfunc = [[ +static int Image (lua_State * L) +{ + int w, h, c, num_colors; + unsigned char *pixels; + Ihandle* ih; + char str[20]; + + if (lua_istable(L, 1)) + { + int i, j; + + /* get the number of lines */ + h = luaL_getn(L, 1); + + /* get the number of columns of the first line */ + lua_pushnumber(L, 1); + lua_gettable(L, 1); + w = luaL_getn(L, -1); + lua_pop(L, 1); + + pixels = (unsigned char *) malloc (h*w); + + for (i=1; i<=h; i++) + { + lua_pushnumber(L, i); + lua_gettable(L, 1); + for (j=1; j<=w; j++) + { + int idx = (i-1)*w+(j-1); + lua_pushnumber(L, j); + lua_gettable(L, -2); + pixels[idx] = (unsigned char)lua_tonumber(L, -1); + lua_pop(L, 1); + } + lua_pop(L, 1); + } + + ih = IupImage(w,h,pixels); + free(pixels); + + num_colors = luaL_getn(L, 2); + num_colors = num_colors>255? 255: num_colors; + for(c=1; c<=num_colors; c++) + { + lua_rawgeti(L, 2, c); + sprintf(str, "%d", c); + IupStoreAttribute(ih, str, lua_tostring(L,-1)); + lua_pop(L, 1); + } + } + else + { + w = luaL_checkint(L, 1); + h = luaL_checkint(L, 2); + pixels = iuplua_checkuchar_array(L, 3, w*h); + ih = IupImage(w, h, pixels); + free(pixels); + + num_colors = luaL_getn(L, 4); + num_colors = num_colors>256? 256: num_colors; + for(c=1; c<=num_colors; c++) + { + lua_rawgeti(L, 4, c); + sprintf(str, "%d", c-1); + IupStoreAttribute(ih, str, lua_tostring(L,-1)); + lua_pop(L, 1); + } + } + + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +]] +} + +function ctrl.createElement(class, arg) + if (arg.width and arg.height and arg.pixels) then + return Image(arg.width, arg.height, arg.pixels, arg.colors) + else + return Image(arg, arg.colors) + end +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/imagergb.lua b/iup/srclua5/imagergb.lua new file mode 100755 index 0000000..caab772 --- /dev/null +++ b/iup/srclua5/imagergb.lua @@ -0,0 +1,31 @@ +------------------------------------------------------------------------------ +-- ImageRGB class +------------------------------------------------------------------------------ +local ctrl = { + nick = "imagergb", + parent = WIDGET, + creation = "nns", -- fake definition + funcname = "ImageRGB", + callback = {}, + createfunc = [[ +static int ImageRGB(lua_State *L) +{ + int w = luaL_checkint(L, 1); + int h = luaL_checkint(L, 2); + unsigned char *pixels = iuplua_checkuchar_array(L, 3, w*h*3); + Ihandle *ih = IupImageRGB(w, h, pixels); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + free(pixels); + return 1; +} + +]] +} + +function ctrl.createElement(class, arg) + return ImageRGB(arg.width, arg.height, arg.pixels) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/imagergba.lua b/iup/srclua5/imagergba.lua new file mode 100755 index 0000000..87eb967 --- /dev/null +++ b/iup/srclua5/imagergba.lua @@ -0,0 +1,31 @@ +------------------------------------------------------------------------------ +-- ImageRGBA class +------------------------------------------------------------------------------ +local ctrl = { + nick = "imagergba", + parent = WIDGET, + creation = "nns", -- fake definition + funcname = "ImageRGBA", + callback = {}, + createfunc = [[ +static int ImageRGBA(lua_State *L) +{ + int w = luaL_checkint(L, 1); + int h = luaL_checkint(L, 2); + unsigned char *pixels = iuplua_checkuchar_array(L, 3, w*h*4); + Ihandle *ih = IupImageRGBA(w, h, pixels); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + free(pixels); + return 1; +} + +]] +} + +function ctrl.createElement(class, arg) + return ImageRGBA(arg.width, arg.height, arg.pixels) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/item.lua b/iup/srclua5/item.lua new file mode 100755 index 0000000..cbd0c1e --- /dev/null +++ b/iup/srclua5/item.lua @@ -0,0 +1,19 @@ +------------------------------------------------------------------------------ +-- Item class +------------------------------------------------------------------------------ +local ctrl = { + nick = "item", + parent = WIDGET, + creation = "S-", + callback = { + action = "", + highlight_cb = "", + } +} + +function ctrl.createElement(class, arg) + return Item(arg.title) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/iup_pplot.mak b/iup/srclua5/iup_pplot.mak new file mode 100755 index 0000000..b353fe7 --- /dev/null +++ b/iup/srclua5/iup_pplot.mak @@ -0,0 +1,26 @@ +PROJNAME = iup +LIBNAME = iuplua_pplot51 +OPT = YES +DEF_FILE = iuplua_pplot5.def + +IUP := .. + +DEFINES = IUPLUA_USELOH + +USE_IUP3 = Yes +USE_IUPLUA = Yes +USE_CDLUA = Yes +LIBS = iup_pplot + +USE_LUA51 = Yes +NO_LUALINK = Yes + +LOHDIR = loh +SRCLUA = pplot.lua +GC := $(addsuffix .c, $(basename $(SRCLUA))) +GC := $(addprefix il_, $(GC)) + +$(GC) : il_%.c : %.lua generator.lua + $(LUABIN) generator.lua $< + +SRC := iuplua_pplot.c $(GC) diff --git a/iup/srclua5/iupcd.mak b/iup/srclua5/iupcd.mak new file mode 100755 index 0000000..26cf9b8 --- /dev/null +++ b/iup/srclua5/iupcd.mak @@ -0,0 +1,21 @@ +PROJNAME = iup +LIBNAME = iupluacd51 +OPT = YES + +DEFINES = CD_NO_OLD_INTERFACE +SRC = iuplua_cd.c +DEF_FILE = iupluacd5.def + +# Can not use USE_IUPLUA because Tecmake will include "iupluacd51" in linker + +INCLUDES = ../include +LIBS = iuplua51 +LDIR = ../lib/$(TEC_UNAME) + +IUP := .. + +USE_CD = YES +USE_IUP3 = YES +USE_LUA51 = Yes +NO_LUALINK = Yes +USE_CDLUA = YES diff --git a/iup/srclua5/iupcontrols.mak b/iup/srclua5/iupcontrols.mak new file mode 100755 index 0000000..ea1e59f --- /dev/null +++ b/iup/srclua5/iupcontrols.mak @@ -0,0 +1,26 @@ +PROJNAME = iup +LIBNAME = iupluacontrols51 +OPT = YES +DEF_FILE = iupluacontrols5.def + +IUP := .. + +DEFINES = IUPLUA_USELOH + +USE_IUP3 = Yes +USE_IUPLUA = Yes +USE_CDLUA = Yes +LIBS = iupcontrols + +USE_LUA51 = Yes +NO_LUALINK = Yes + +LOHDIR = loh +SRCLUA = dial.lua gauge.lua colorbrowser.lua colorbar.lua matrix.lua cells.lua +GC := $(addsuffix .c, $(basename $(SRCLUA))) +GC := $(addprefix il_, $(GC)) + +$(GC) : il_%.c : %.lua generator.lua + $(LUABIN) generator.lua $< + +SRC := iuplua_controls.c il_mask.c il_matrix_aux.c $(GC) diff --git a/iup/srclua5/iupgl.mak b/iup/srclua5/iupgl.mak new file mode 100755 index 0000000..6e9f45d --- /dev/null +++ b/iup/srclua5/iupgl.mak @@ -0,0 +1,27 @@ +PROJNAME = iup +LIBNAME = iupluagl51 +OPT = YES + +DEF_FILE = iupluagl5.def +DEFINES = IUPLUA_USELOH + +IUP := .. + +# Can not use USE_IUPLUA because Tecmake will include "iupluagl51" in linker + +USE_IUP3 = Yes +USE_OPENGL = Yes +LIBS = iuplua51 + +USE_LUA51 = Yes +NO_LUALINK = Yes + +LOHDIR = loh +SRCLUA = glcanvas.lua +GC = $(addsuffix .c, $(basename $(SRCLUA))) +GC := $(addprefix il_, $(GC)) + +$(GC) : il_%.c : %.lua generator.lua + $(LUABIN) generator.lua $< + +SRC = iuplua_glcanvas.c $(GC) diff --git a/iup/srclua5/iupim.mak b/iup/srclua5/iupim.mak new file mode 100755 index 0000000..1355c42 --- /dev/null +++ b/iup/srclua5/iupim.mak @@ -0,0 +1,17 @@ +PROJNAME = iup +LIBNAME = iupluaim51 +OPT = YES + +DEF_FILE = iupluaim5.def +SRC = iuplua_im.c + +INCLUDES = ../src +LIBS = iupim + +IUP := .. + +USE_IUP3 = Yes +USE_IUPLUA = Yes +USE_IM = Yes +USE_LUA51 = Yes +NO_LUALINK = Yes diff --git a/iup/srclua5/iupimglib.mak b/iup/srclua5/iupimglib.mak new file mode 100755 index 0000000..5b74dfb --- /dev/null +++ b/iup/srclua5/iupimglib.mak @@ -0,0 +1,17 @@ +PROJNAME = iup +LIBNAME = iupluaimglib51 +OPT = YES + +SRC = iuplua_imglib.c +DEF_FILE = iupluaimglib5.def + +INCLUDES = ../include +LIBS = iupimglib +LDIR = ../lib/$(TEC_UNAME) + +IUP := .. + +USE_IUP3 = Yes +USE_IUPLUA = Yes +USE_LUA51 = Yes +NO_LUALINK = Yes diff --git a/iup/srclua5/iuplua.c b/iup/srclua5/iuplua.c new file mode 100755 index 0000000..fd001a0 --- /dev/null +++ b/iup/srclua5/iuplua.c @@ -0,0 +1,918 @@ +/** \file +* \brief IUP binding for Lua 5. +* +* See Copyright Notice in "iup.h" +*/ + +#include +#include +#include + +#include "iup.h" +#include "iup_str.h" + +#include +#include + +#include "iuplua.h" +#include "il.h" + + +/***************************************************************************** +* Auxiliary functions * +****************************************************************************/ + + + /*************************************/ + /* iuplua_dostring and iuplua_dofile */ + +static void error_message(lua_State *L, const char *msg, const char* traceback) +{ + lua_getglobal(L, "iup"); + lua_pushstring(L, "_ERRORMESSAGE"); + lua_gettable(L, -2); + lua_remove(L, -2); + + if(lua_isnil(L, -1)) + { + /* Panic mode */ + if (traceback != NULL) + fprintf(stderr, "%s\n%s\n", msg, traceback); + else + fprintf(stderr, "%s\n", msg); + fflush(stderr); + return; + } + lua_pushstring(L, msg); + lua_pushstring(L, traceback); + lua_call(L, 2, 0); +} + +static int report (lua_State *L, int status, int concat_traceback) +{ + if (status && !lua_isnil(L, -1)) + { + const char *msg = lua_tostring(L, -2); + + + + const char *traceback; + if (msg == NULL) { + msg = "(error with no message)"; + traceback = NULL; + } + else if (concat_traceback) { + lua_concat(L, 2); + msg = lua_tostring(L, -1); + traceback = NULL; + } + else { + traceback = lua_tostring(L, -1); + } + error_message(L, msg, traceback); + lua_pop(L, 2); + } + return status; +} + +static int traceback (lua_State *L) { + lua_getfield(L, LUA_GLOBALSINDEX, "debug"); + if (!lua_istable(L, -1)) { + lua_pop(L, 1); + return 1; + } + lua_getfield(L, -1, "traceback"); + if (!lua_isfunction(L, -1)) { + lua_pop(L, 2); + return 1; + } + + lua_remove(L, 2); + lua_pushliteral(L, ""); + lua_pushinteger(L, 2); /* skip this function */ + lua_call(L, 2, 1); /* call debug.traceback */ + lua_getglobal(L, "iup"); /* store traceback in iup._LASTTRACEBACK */ + lua_pushstring(L, "_LASTTRACEBACK"); + lua_pushvalue(L, -3); + lua_settable(L, -3); + lua_pop(L, 2); + return 1; +} + +static int docall (lua_State *L, int narg, int nret) +{ + int status; + int base = lua_gettop(L) - narg; /* function index */ + lua_pushcfunction(L, traceback); /* push traceback function */ + lua_insert(L, base); /* put it under chunk and args */ + status = lua_pcall(L, narg, nret, base); + lua_remove(L, base); /* remove traceback function */ + if (status != 0) { + /* force a complete garbage collection in case of errors */ + lua_gc(L, LUA_GCCOLLECT, 0); + /* put _LASTTRACEBACK at stack position 2 */ + lua_getglobal(L, "iup"); + lua_pushliteral(L, "_LASTTRACEBACK"); + lua_gettable(L, -2); + lua_remove(L, -2); + if (!lua_isstring(L, -1)) { + lua_pop(L, 1); + lua_pushliteral(L, ""); + /* set _LASTTRACEBACK as nil */ + lua_getglobal(L, "iup"); + lua_pushliteral(L, "_LASTTRACEBACK"); + lua_pushnil(L); + lua_settable(L, -3); + lua_pop(L, 1); + } + } + return status; +} + +int iuplua_dofile(lua_State *L, const char *filename) +{ + int status = luaL_loadfile(L, filename); + if (status == 0) + status = docall(L, 0, 0); + return report(L, status, 1); +} + +int iuplua_dostring(lua_State *L, const char *s, const char *name) +{ + int status = luaL_loadbuffer(L, s, strlen(s), name); + if (status == 0) + status = docall(L, 0, 0); + return report(L, status, 1); +} + + /*************************************/ + /* Utilities */ + +Ihandle *iuplua_checkihandleornil(lua_State *L, int pos) +{ + if (lua_isnil(L, pos)) + return NULL; + else + return iuplua_checkihandle(L, pos); +} + +Ihandle *iuplua_checkihandle(lua_State *L, int pos) +{ + lua_getmetatable(L, pos); /* t2 = metatable(stack(pos)) */ + lua_pushstring(L, "iup handle"); + lua_gettable(L, LUA_REGISTRYINDEX); /* t = registry["iup handle"] */ + if (lua_equal(L, -2, -1)) /* check (t2==t)? */ + { + lua_pop (L, 2); + return *(Ihandle**)lua_touserdata(L, pos); + } + else + { + luaL_argerror(L, pos, "iup handle expected"); + return NULL; + } +} + +void iuplua_pushihandle_raw(lua_State *L, Ihandle *ih) +{ + if (ih) + { + Ihandle** new_pointer = (Ihandle**)lua_newuserdata(L, sizeof(Ihandle*)); + *new_pointer = ih; + } + else + lua_pushnil(L); +} + +void iuplua_pushihandle(lua_State *L, Ihandle *ih) +{ + if (ih) + { + /* not created in Lua? */ + char* sref = IupGetAttribute(ih, "_IUPLUA_WIDGET_TABLE_REF"); + if (!sref) + { + lua_getglobal(L,"iup"); + lua_pushstring(L,"RegisterHandle"); + lua_gettable(L, -2); /* f = iup.RegisterHandle */ + lua_remove(L, -2); + iuplua_pushihandle_raw(L, ih); /* push ih */ + lua_pushstring(L, IupGetClassName(ih)); /* push type */ + lua_call(L, 2, 1); /* call f(ih, type) */ + } + else + { + iuplua_pushihandle_raw(L, ih); /* push ih */ + lua_pushstring(L, "iup handle"); + lua_gettable(L, LUA_REGISTRYINDEX); /* t = registry["iup handle"] */ + lua_setmetatable(L, -2); /* metatable(ih) = t */ + } + } + else + lua_pushnil(L); +} + +void iuplua_removeihandle(lua_State *L, Ihandle *ih) +{ + char* sref; + + /* called from Destroy. + must also remove references from the children. */ + Ihandle* child = IupGetNextChild(ih, NULL); + while(child) + { + iuplua_removeihandle(L, child); + child = IupGetNextChild(ih, child); + } + + sref = IupGetAttribute(ih, "_IUPLUA_WIDGET_TABLE_REF"); + if (sref) + { + int ref = atoi(sref); + + /* removes the ihandle reference in the lua table */ + /* object.handle = nil */ + lua_getref(L, ref); /* push object */ + lua_pushstring(L, "handle"); + lua_pushnil(L); + lua_settable(L, -3); + lua_pop(L,1); + + /* removes the association of the ihandle with the lua table */ + lua_unref(L, ref); /* this is the complement of SetWidget */ + IupSetAttribute(ih, "_IUPLUA_WIDGET_TABLE_REF", NULL); + } +} + +char ** iuplua_checkstring_array(lua_State *L, int pos) +{ + int i,n; + char **v; + n = luaL_getn(L,pos); + v = (char **) malloc (n*sizeof(char *)); + for(i=1; i<=n; i++) + { + lua_pushnumber(L,i); + lua_gettable(L,pos); + v[i-1] = (char*)lua_tostring(L, -1); + lua_pop(L,1); + } + return v; +} + +int * iuplua_checkint_array(lua_State *L, int pos) +{ + int i,n; + int *v; + n = luaL_getn(L,pos); + v = (int *) malloc (n*sizeof(int)); + for(i=1; i<=n; i++) + { + lua_pushnumber(L,i); + lua_gettable(L,pos); + v[i-1] = (int)lua_tonumber(L, -1); + lua_pop(L,1); + } + return v; +} + +unsigned char* iuplua_checkuchar_array(lua_State *L, int pos, int count) +{ + int i,n; + unsigned char *v; + n = luaL_getn(L,pos); + if (n != count) + { + lua_pushstring(L, "invalid number of elements in array"); + lua_error(L); + } + v = (unsigned char *) malloc (n*sizeof(unsigned char)); + for(i=1; i<=n; i++) + { + lua_pushnumber(L,i); + lua_gettable(L,pos); + v[i-1] = (unsigned char)lua_tonumber(L, -1); + lua_pop(L,1); + } + return v; +} + +Ihandle ** iuplua_checkihandle_array(lua_State *L, int pos) +{ + Ihandle **v; + int i, n = luaL_getn(L, pos); + v = (Ihandle **) malloc ((n+1)*sizeof(Ihandle *)); + for (i=1; i<=n; i++) + { + lua_pushnumber(L,i); + lua_gettable(L,pos); + v[i-1] = iuplua_checkihandle(L, -1); + lua_pop(L,1); + } + v[i-1] = NULL; + return v; +} + + /*************************************/ + /* used by callbacks */ + +void iuplua_plugstate(lua_State *L, Ihandle *ih) +{ + IupSetAttribute(ih, "_IUPLUA_STATE_CONTEXT",(char *) L); +} + +lua_State* iuplua_getstate(Ihandle *ih) +{ + return (lua_State *) IupGetAttribute(ih, "_IUPLUA_STATE_CONTEXT"); +} + +lua_State* iuplua_call_start(Ihandle *ih, const char* name) +{ + lua_State *L = iuplua_getstate(ih); + + /* prepare to call iupCallMethod(name, handle, ...) */ + lua_getglobal(L,"iup"); + lua_pushstring(L,"iupCallMethod"); + lua_gettable(L, -2); + lua_remove(L, -2); + + lua_pushstring(L, name); + iuplua_pushihandle(L, ih); + return L; +} + +int iuplua_call(lua_State* L, int nargs) +{ + int status = docall(L, nargs+2, 1); + report(L, status, 0); + + if (status) + return IUP_DEFAULT; + else + { + int tmp = (int) lua_isnil(L, -1) ? IUP_DEFAULT : (int)lua_tonumber(L,-1); + lua_pop(L, 1); + return tmp; + } +} + +char* iuplua_call_rs(lua_State *L, int nargs) +{ + int status = docall(L, nargs+2, 1); + report(L, status, 0); + + if (status) + return NULL; + else + { + char* tmp = lua_isnil(L, -1) ? NULL: (char*)lua_tostring(L,-1); + lua_pop(L, 1); + return tmp; + } +} + +int iuplua_call_raw(lua_State* L, int nargs, int nresults) +{ + int status = docall(L, nargs, nresults); + report(L, status, 0); + return status; +} + +void iuplua_register_cb(lua_State *L, const char* name, lua_CFunction func, const char* type) +{ + lua_getglobal(L, "RegisterCallback"); + lua_pushstring(L, name); + lua_pushcfunction(L, func); + lua_pushstring(L, type); + lua_call(L, 3, 0); +} + +/* iupSetCallback(handle, name, func, value) */ +static int SetCallback(lua_State *L) +{ + Icallback func; + + Ihandle* ih = iuplua_checkihandle(L, 1); + const char* name = luaL_checkstring(L, 2); + + if (!lua_iscfunction(L, 3)) + { + lua_pushstring(L, "invalid function when set callback"); + lua_error(L); + } + func = (Icallback)lua_tocfunction(L, 3); + + if (lua_isnil(L, 4)) /* value is only used here to remove the callback */ + IupSetCallback(ih, name, (Icallback)NULL); + else + IupSetCallback(ih, name, func); + + /* value, when not nil, is always the same name of a C callback in lowercase */ + + return 0; +} + + /*************************************/ + /* metatable */ + +/* iupNewClass(class_name) + Calls: + iupNewClass("iup handle") + iupNewClass("iup widget") +*/ +static int NewClass(lua_State *L) +{ + lua_newtable(L); /* push t */ + lua_pushstring(L, "class"); /* push "class" */ + lua_pushvalue(L, 1); /* push again the class_name to the stack, because settable will remove it */ + lua_settable(L, -3); /* t.class = class_name */ + lua_settable(L, LUA_REGISTRYINDEX); /* registry[class_name] = t */ + return 0; +} + +/* iupSetClass(t, class_name) + Calls: + iupSetClass(handle, "iup handle") --Used only in RegisterHandle and WIDGET.constructor + iupSetClass(object, "iup widget") --Used whenever a new control class is created. +*/ +static int SetClass(lua_State *L) +{ + lua_gettable(L, LUA_REGISTRYINDEX); /* t2 = registry[class_name] */ + if (lua_isnil(L, -1)) + { + lua_pushstring(L, "invalid class name"); + lua_error(L); + } + lua_setmetatable(L, -2); /* metatable(t) = t2 */ + return 0; +} + +/* class_name = iupGetClass(t) */ +static int GetClass(lua_State *L) +{ + if (lua_istable(L, 1) || lua_isuserdata(L, 1)) + { + lua_getmetatable(L, 1); /* t2 = metatable(t) */ + if (lua_istable(L, -1)) + { + lua_pushstring(L, "class"); + lua_gettable(L, -2); /* class_name = t2.class */ + return 1; + } + } + lua_pushnil(L); + return 1; +} + +/* iupSetMethod(class_name, method, function) + For ex: + iupSetMethod("iup handle", "__index", ihandle_gettable) +*/ +static int SetMethod(lua_State *L) +{ + lua_pushvalue(L, 1); /* push class_name */ + lua_gettable(L, LUA_REGISTRYINDEX); /* t = registry[class_name] */ + if (lua_isnil(L, -1)) + { + lua_pushstring(L, "invalid class name"); + lua_error(L); + } + lua_pushvalue(L, -3); /* push method */ + lua_pushvalue(L, -3); /* push function */ + lua_settable(L, -3); /* t.method = function */ + return 0; +} + +static int ihandle_tostring (lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L, 1); + if (!ih) + lua_pushstring (L, "(not an IUP handle)"); + else + lua_pushfstring (L, "IUP(%s): %p", IupGetClassName(ih), ih); + return 1; +} + +static int ihandle_compare(lua_State *L) +{ + Ihandle *a = iuplua_checkihandle(L, 1); + Ihandle *b = iuplua_checkihandle(L, 2); + if(a == b) + lua_pushboolean(L, 1); + else + lua_pushboolean(L, 0); + return 1; +} + + /*************************************/ + /* table <-> ihandle */ + +/* local object = iupGetWidget(handle) */ +static int GetWidget(lua_State *L) +{ + /* Pushes a table that is associanted with an ihandle */ + /* Used by the "__index" metamethod of the "iup handle" */ + Ihandle * ih = iuplua_checkihandle(L,1); + char* sref = IupGetAttribute(ih, "_IUPLUA_WIDGET_TABLE_REF"); + if (!sref) + lua_pushnil(L); + else + lua_getref(L, atoi(sref)); + return 1; +} + +/* iupSetWidget(handle, object) */ +static int SetWidget(lua_State *L) +{ + /* Saves the object table reference as an attribute, + i.e. associates a table with the ihandle. + Used by the "iup widget" constructor and by RegisterHandle */ + Ihandle * ih = iuplua_checkihandle(L,1); + char* sref = IupGetAttribute(ih, "_IUPLUA_WIDGET_TABLE_REF"); + if (!sref) + { + int ref = lua_ref(L, 1); + IupSetfAttribute(ih, "_IUPLUA_WIDGET_TABLE_REF", "%d", ref); /* this must be a non-inheritable attribute */ + } + return 0; +} + + /*************************************/ + /* registration */ + +void iuplua_changeEnv(lua_State *L) +{ + /* Replaces global environment */ + lua_pushvalue(L, LUA_GLOBALSINDEX); + lua_getglobal(L, "iup"); + lua_replace(L, LUA_GLOBALSINDEX); +} + +void iuplua_returnEnv(lua_State *L) +{ + /* reestablishes global environment */ + lua_replace(L, LUA_GLOBALSINDEX); +} + +int iuplua_opencall_internal(lua_State * L) +{ + int ret = 0; + const char* s; + lua_getglobal(L, "iup"); + lua_pushliteral(L,"_IUPOPEN_CALL"); + lua_gettable(L, -2); + s = lua_tostring(L, -1); + if (s && strcmp(s, "INTERNAL")==0) + ret = 1; + lua_pop(L,2); + return ret; +} + +void iuplua_register(lua_State *L, lua_CFunction func, const char* name) +{ + lua_pushcfunction(L, func); + lua_setglobal(L, name); +} + +void iuplua_regstring(lua_State *L, const char* s, const char* name) +{ + lua_pushstring(L, s); + lua_setglobal(L, name); +} + +/***************************************************************************** +* Common Callbacks * +****************************************************************************/ + +static int help_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "help_cb"); + return iuplua_call(L, 0); +} + +static int getfocus_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "getfocus_cb"); + return iuplua_call(L, 0); +} + +static int k_any(Ihandle *self, int c) +{ + lua_State *L = iuplua_call_start(self, "k_any"); + lua_pushnumber(L, c); + return iuplua_call(L, 1); +} + +static int killfocus_cb(Ihandle *self) +{ + lua_State *L = iuplua_call_start(self, "killfocus_cb"); + return iuplua_call(L, 0); +} + +static int Idlecall(void) +{ + int ret = 0; + lua_State *L = (lua_State *) IupGetGlobal("_IUP_LUA_DEFAULT_STATE"); + lua_getglobal(L, "_IUP_LUA_IDLE_FUNC_"); + lua_call(L, 0, 1); + ret = (int) lua_tonumber(L, -1); + lua_pop(L, 1); + return ret; +} + +static int SetIdle(lua_State *L) +{ + if lua_isnoneornil(L,1) + IupSetFunction("IDLE_ACTION", NULL); + else + { + luaL_checktype(L, 1, LUA_TFUNCTION); + lua_pushvalue(L,1); + lua_setglobal(L, "_IUP_LUA_IDLE_FUNC_"); + IupSetFunction("IDLE_ACTION", (Icallback) Idlecall); + } + return 0; +} + +/***************************************************************************** +* Iuplua bind functions * +****************************************************************************/ + + +static int GetFromC(lua_State *L) +{ + Ihandle *n; + const char *a; + if (!lua_istable(L, -1)) + { + lua_pushstring(L, "IupGetFromC: wrong arguments to function"); + lua_error(L); + return 0; + } + lua_pushnumber(L, 1); + lua_gettable(L, -2); + if (!lua_isstring(L, -1)) + { + lua_pushstring(L, "IupGetFromC: wrong arguments to function"); + lua_error(L); + return 0; + } + a = lua_tostring(L, -1); + n = IupGetHandle((char*)a); + if(n) + iuplua_pushihandle(L, n); + else + lua_pushnil(L); + return 1; +} + + +/***************************************************************************** + * iupkey * + ****************************************************************************/ + + +static void register_key(char *name, int code, void* user_data) +{ + lua_State *L = (lua_State*)user_data; + lua_pushnumber(L, code); lua_setglobal(L, name); +} + +/* from iupkey.c */ +void iupKeyForEach(void (*func)(char *name, int code, void* user_data), void* user_data); + +int iupkey_open(lua_State *L) +{ + (void)L; + /* does nothing, kept for backward compatibility */ + return 0; +} + + +/***************************************************************************** +* iuplua_open * +****************************************************************************/ + + +static int il_open(lua_State * L) +{ + int ret, argc = 0; + char **argv = NULL; + + lua_getglobal(L, "arg"); + if (lua_istable(L, -1)) + { + int i; + argc = luaL_getn(L, -1); + argv = malloc(sizeof(char*)*argc); + for(i=1; i<=argc; i++) + { + lua_pushnumber(L,i); + lua_gettable(L,-2); + argv[i-1] = (char*)lua_tostring(L, -1); + lua_pop(L,1); + } + } + lua_pop(L, 1); + + ret = IupOpen(&argc, &argv); + if (ret == IUP_ERROR) + { + if (argv) free(argv); + lua_pushstring(L, "IupOpen: could not initialize"); + lua_error(L); + return 0; + } + + if (argv) free(argv); + lua_pushinteger(L, ret); + return 1; +} + +int iuplua_close(lua_State * L) +{ + if (iuplua_opencall_internal(L)) + IupClose(); + return 0; /* nothing in stack */ +} + +static void setinfo (lua_State *L) +{ + /* table "iup" is at the stack */ + + lua_pushliteral (L, "_COPYRIGHT"); + lua_pushliteral (L, IUP_COPYRIGHT); + lua_settable (L, -3); + + lua_pushliteral (L, "_DESCRIPTION"); + lua_pushliteral (L, IUP_DESCRIPTION); + lua_settable (L, -3); + + lua_pushliteral (L, "_NAME"); + lua_pushliteral (L, IUP_NAME); + lua_settable (L, -3); + + lua_pushliteral (L, "_VERSION"); + lua_pushstring (L, IupVersion()); + lua_settable (L, -3); + + lua_pushliteral (L, "_VERSION_DATE"); + lua_pushliteral (L, IUP_VERSION_DATE); + lua_settable (L, -3); + + lua_pushliteral (L, "_VERSION_NUMBER"); + lua_pushinteger (L, IupVersionNumber()); + lua_settable (L, -3); +} + +int iuplua_open(lua_State * L) +{ + int ret; + + struct luaL_reg funcs[] = { + {"key_open", iupkey_open}, + {"Open", il_open}, + {"Close", iuplua_close}, + {"SetIdle", SetIdle}, + {"GetFromC", GetFromC}, + {"iupGetWidget", GetWidget}, + {"iupSetWidget", SetWidget}, + {"iupNewClass", NewClass}, + {"iupSetClass", SetClass}, + {"iupGetClass", GetClass}, + {"iupSetMethod", SetMethod}, + {"iupSetCallback", SetCallback}, + {"ihandle_compare", ihandle_compare}, + {"ihandle_tostring", ihandle_tostring}, + {NULL, NULL}, + }; + + if (!il_open(L)) + return 0; + + ret = lua_tointeger(L, -1); /* retrieve IupOpen return value */ + lua_pop(L, -1); + + /* Creating global namespace iup */ + lua_newtable(L); + lua_setglobal(L, "iup"); + + /* Registers functions in iup namespace */ + luaL_openlib(L, "iup", funcs, 0); + iupluaapi_open(L); + + /* set version info */ + setinfo(L); + + /* register if IupOpen was called here or from outside IupLua */ + lua_pushliteral (L, "_IUPOPEN_CALL"); + if (ret == IUP_OPENED) lua_pushliteral (L, "EXTERNAL"); + else lua_pushliteral (L, "INTERNAL"); + lua_settable (L, -3); + + /* used by Idle */ + IupSetGlobal("_IUP_LUA_DEFAULT_STATE", (char *) L); + + /* Creating new environment with metamethod __index + * (so that normal Lua functions will be found while GLOBALSINDEX is the "iup" environment) */ + iuplua_dostring(L, "iup._G = _G\ + setmetatable(iup, {__index = iup._G})", "iuplua_setmetatable_global"); + + /* Changing environment to iup + * (all created variables and functions from now on will be put in "iup" environment) */ + iuplua_changeEnv(L); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/iuplua_be64.loh" +#include "loh/constants_be64.loh" +#else +#include "loh/iuplua_be32.loh" +#include "loh/constants_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/iuplua_le64w.loh" +#include "loh/constants_le64w.loh" +#else +#include "loh/iuplua_le64.loh" +#include "loh/constants_le64.loh" +#endif +#else +#include "loh/iuplua.loh" +#include "loh/constants.loh" +#endif +#endif +#else + iuplua_dofile(L, "iuplua.lua"); + iuplua_dofile(L, "constants.lua"); +#endif + + /* Register the common callbacks */ + iuplua_register_cb(L, "HELP_CB", (lua_CFunction)help_cb, NULL); + iuplua_register_cb(L, "GETFOCUS_CB", (lua_CFunction)getfocus_cb, NULL); + iuplua_register_cb(L, "K_ANY", (lua_CFunction)k_any, NULL); + iuplua_register_cb(L, "KILLFOCUS_CB", (lua_CFunction)killfocus_cb, NULL); + + /* Register Keys */ + iupKeyForEach(register_key, (void*)L); + + /* Iup Modules initialization */ + iupbuttonlua_open(L); + iupcanvaslua_open(L); + iupdialoglua_open(L); + iupfilllua_open(L); + iupframelua_open(L); + iupfiledlglua_open(L); + iuphboxlua_open(L); + iupitemlua_open(L); + iupimagelua_open(L); + iuplabellua_open(L); + iuplistlua_open(L); + iupmenulua_open(L); + iupmultilinelua_open(L); + iupradiolua_open(L); + iupseparatorlua_open(L); + iupsubmenulua_open(L); + iuptextlua_open(L); + iuptogglelua_open(L); + iupvboxlua_open(L); + iupzboxlua_open(L); + iuptimerlua_open(L); + iupsboxlua_open(L); + iupspinlua_open(L); + iupspinboxlua_open(L); + iupcboxlua_open(L); + iupgclua_open(L); + iupgetparamlua_open(L); + iupvallua_open(L); + iuptabslua_open(L); + iupfontdlglua_open(L); + iupmessagedlglua_open(L); + iupcolordlglua_open(L); + iupimagergbalua_open(L); + iupimagergblua_open(L); + iupprogressbarlua_open(L); + iupnormalizerlua_open(L); + iupuserlua_open(L); + iuptreelua_open(L); + iupclipboardlua_open(L); + + iuplua_returnEnv(L); + + return 0; /* nothing in stack */ +} + +/* obligatory to use require"iuplua" */ +int luaopen_iuplua(lua_State* L) +{ + return iuplua_open(L); +} + +/* obligatory to use require"iuplua51" */ +int luaopen_iuplua51(lua_State* L) +{ + return iuplua_open(L); +} diff --git a/iup/srclua5/iuplua.lua b/iup/srclua5/iuplua.lua new file mode 100755 index 0000000..b0f644a --- /dev/null +++ b/iup/srclua5/iuplua.lua @@ -0,0 +1,285 @@ +-- This file is executed with the "iup" table already as the globalindex + +------------------------------------------------------------------------------ +-- Callback handler +------------------------------------------------------------------------------ + +callbacks = {} + +function iupCallMethod(name, ...) + local handle = arg[1] -- always the handle + local func = handle[name] + if (not func) then + return + end + + if type(func) == "function" then + return func(unpack(arg)) + elseif type(func) == "string" then + local temp = self + self = handle + local result = iup.dostring(func) + self = temp + return result + else + return iup.ERROR + end +end + +function RegisterCallback(name, func, type) + if not callbacks[name] then callbacks[name] = {} end + local cb = callbacks[name] + if type then + cb[type] = func + else + cb[1] = func + end +end + +------------------------------------------------------------------------------ +-- Meta Methods +------------------------------------------------------------------------------ + + +local widget_gettable = function(object, index) + local p = object + local v + while 1 do + v = rawget(p, index) + if v then return v end + p = rawget(p, "parent") + if not p then return nil end + end +end + +iupNewClass("iup widget") +iupSetMethod("iup widget", "__index", widget_gettable) + + +local ihandle_gettable = function(handle, index) + local INDEX = string.upper(index) + if (callbacks[INDEX]) then + local object = iupGetWidget(handle) + if (not object or type(object)~="table") then error("invalid iup handle") end + return object[index] + else + local value = GetAttribute(handle, INDEX) + if (not value) then + local object = iupGetWidget(handle) + if (not object or type(object)~="table") then error("invalid iup handle") end + return object[index] + elseif type(value)== "number" or type(value) == "string" then + local ih = GetHandle(value) + if ih then return ih + else return value end + else + return value + end + end +end + +local ihandle_settable = function(handle, index, value) + local ti = type(index) + local tv = type(value) + local object = iupGetWidget(handle) + if (not object or type(object)~="table") then error("invalid iup handle") end + if ti == "number" or ti == "string" then -- check if a valid C name + local INDEX = string.upper(index) + local cb = callbacks[INDEX] + if (cb) then -- if a callback name + local func = cb[1] + if (not func) then + func = cb[GetClassName(handle)] + end + iupSetCallback(handle, INDEX, func, value) -- register the pre-defined C callback + object[index] = value -- store also in Lua + elseif iupGetClass(value) == "iup handle" then -- if a iup handle + local name = ihandle_setname(value) + SetAttribute(handle, INDEX, name) + object[index] = nil -- if there was something in Lua remove it + elseif tv == "string" or tv == "number" or tv == "nil" then -- if a common value + SetAttribute(handle, INDEX, value) + object[index] = nil -- if there was something in Lua remove it + else + object[index] = value -- store also in Lua + end + else + object[index] = value -- store also in Lua + end +end + +iupNewClass("iup handle") +iupSetMethod("iup handle", "__index", ihandle_gettable) +iupSetMethod("iup handle", "__newindex", ihandle_settable) +iupSetMethod("iup handle", "__tostring", ihandle_tostring) +iupSetMethod("iup handle", "__eq", ihandle_compare) -- implemented in C + + +------------------------------------------------------------------------------ +-- Utilities +------------------------------------------------------------------------------ + +function ihandle_setname(v) -- used also by radio and zbox + local name = GetName(v) + if not name then + local autoname = string.format("_IUPLUA_NAME(%s)", tostring(v)) + SetHandle(autoname, v) + return autoname + end + return name +end + +function iupRegisterWidget(ctrl) -- called by all the controls initialization functions + iup[ctrl.nick] = function(arg) + return ctrl:constructor(arg) + end +end + +function RegisterHandle(handle, typename) + + iupSetClass(handle, "iup handle") + + local object = iupGetWidget(handle) + if not object then + + local class = iup[string.upper(typename)] + if not class then + class = WIDGET + end + + local object = { parent=class, handle=handle } + iupSetClass(object, "iup widget") + iupSetWidget(handle, object) + end + + return handle +end + +------------------------------------------------------------------------------ +-- Widget class (top class) +------------------------------------------------------------------------------ + +WIDGET = { + callback = {} +} + +function WIDGET.show(object) + Show(object.handle) +end + +function WIDGET.hide(object) + Hide(object.handle) +end + +function WIDGET.map(object) + Map(object.handle) +end + +function WIDGET.constructor(class, arg) + local handle = class:createElement(arg) + local object = { + parent = class, + handle = handle + } + iupSetClass(handle, "iup handle") + iupSetClass(object, "iup widget") + iupSetWidget(handle, object) + object:setAttributes(arg) + return handle +end + +function WIDGET.setAttributes(object, arg) + local handle = object.handle + for i,v in pairs(arg) do + if type(i) == "number" and iupGetClass(v) == "iup handle" then + -- We should not set this or other elements (such as iuptext) + -- will erroneosly inherit it + rawset(object, i, v) + else + -- this will call settable metamethod + handle[i] = v + end + end +end + +-- all the objects in the hierarchy must be "iup widget" +-- Must repeat this call for every new widget +iupSetClass(WIDGET, "iup widget") + + +------------------------------------------------------------------------------ +-- Box class (inherits from WIDGET) +------------------------------------------------------------------------------ + +BOX = { + parent = WIDGET +} + +function BOX.setAttributes(object, arg) + local handle = rawget(object, "handle") + local n = #arg + for i = 1, n do + if iupGetClass(arg[i]) == "iup handle" then + Append(handle, arg[i]) + end + end + WIDGET.setAttributes(object, arg) +end + +iupSetClass(BOX, "iup widget") + + +------------------------------------------------------------------------------ +-- Compatibility functions. +------------------------------------------------------------------------------ + +error_message_popup = nil + +function _ERRORMESSAGE(err,traceback) + err = err..(traceback or "") + if (error_message_popup) then + error_message_popup.value = err + else + local bt = button{title="Ok", size="60", action="error_message_popup = nil; return iup.CLOSE"} + local ml = multiline{expand="YES", readonly="YES", value=err, size="300x150"} + local vb = vbox{ml, bt; alignment="ACENTER", margin="10x10", gap="10"} + local dg = dialog{vb; title="Error Message",defaultesc=bt,defaultenter=bt,startfocus=bt} + error_message_popup = ml + dg:popup(CENTER, CENTER) + dg:destroy() + error_message_popup = nil + end +end + +pack = function (...) return arg end + +function protectedcall_(f, err) + if not f then + _ERRORMESSAGE(err) + return + end + local ret = pack(pcall(f)) + if not ret[1] then + _ERRORMESSAGE(ret[2]) + return + else + table.remove(ret, 1) + return unpack(ret) + end +end + +function dostring(s) return protectedcall_(loadstring(s)) end +function dofile(f) return protectedcall_(loadfile(f)) end + +function RGB(r, g, b) + return string.format("%d %d %d", 255*r, 255*g, 255*b) +end + +-- This will allow both names to be used in the same application +-- also will allow static linking to work with require +if _G.package then + _G.package.loaded["iuplua"] = iup + _G.package.loaded["iuplua51"] = iup + iup._M = iup + iup._PACKAGE = "iuplua" +end diff --git a/iup/srclua5/iuplua5.def b/iup/srclua5/iuplua5.def new file mode 100755 index 0000000..78b2a6f --- /dev/null +++ b/iup/srclua5/iuplua5.def @@ -0,0 +1,27 @@ +EXPORTS + iuplua_open + iuplua_close + iuplua_plugstate + iuplua_getstate + iuplua_checkihandle + iuplua_checkihandle_array + iuplua_call + iuplua_call_rs + iuplua_call_raw + iuplua_pushihandle + iuplua_pushihandle_raw + iuplua_dofile + iuplua_dostring + iupkey_open + iuplua_returnEnv + iuplua_changeEnv + iuplua_opencall_internal + luaopen_iuplua + luaopen_iuplua51 + iuplua_register + iuplua_regstring + iuplua_checkstring_array + iuplua_checkint_array + iuplua_call_start + iuplua_register_cb + \ No newline at end of file diff --git a/iup/srclua5/iuplua51.dep b/iup/srclua5/iuplua51.dep new file mode 100644 index 0000000..ed11fe6 --- /dev/null +++ b/iup/srclua5/iuplua51.dep @@ -0,0 +1,177 @@ +$(OBJDIR)/iuplua.o: iuplua.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../src/iup_str.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iuplua.h il.h loh/iuplua_le64.loh \ + loh/constants_le64.loh +$(OBJDIR)/iuplua_api.o: iuplua_api.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iuplua.h il.h ../src/iup_attrib.h \ + ../src/iup_globalattrib.h ../src/iup_object.h ../src/iup_class.h \ + ../src/iup_table.h ../src/iup_classbase.h ../src/iup_str.h +$(OBJDIR)/il_tree_aux.o: il_tree_aux.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcontrols.h ../include/iuplua.h il.h \ + il_controls.h +$(OBJDIR)/il_scanf.o: il_scanf.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h ../src/iup_str.h \ + ../src/iup_predial.h +$(OBJDIR)/il_getparam.o: il_getparam.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h il_controls.h +$(OBJDIR)/il_getcolor.o: il_getcolor.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h il_controls.h +$(OBJDIR)/il_button.o: il_button.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/button_le64.loh +$(OBJDIR)/il_canvas.o: il_canvas.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/canvas_le64.loh +$(OBJDIR)/il_dialog.o: il_dialog.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/dialog_le64.loh +$(OBJDIR)/il_colordlg.o: il_colordlg.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/colordlg_le64.loh +$(OBJDIR)/il_clipboard.o: il_clipboard.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/clipboard_le64.loh +$(OBJDIR)/il_filedlg.o: il_filedlg.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/filedlg_le64.loh +$(OBJDIR)/il_fill.o: il_fill.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/fill_le64.loh +$(OBJDIR)/il_frame.o: il_frame.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/frame_le64.loh +$(OBJDIR)/il_hbox.o: il_hbox.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/hbox_le64.loh +$(OBJDIR)/il_normalizer.o: il_normalizer.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/normalizer_le64.loh +$(OBJDIR)/il_item.o: il_item.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/item_le64.loh +$(OBJDIR)/il_image.o: il_image.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/image_le64.loh +$(OBJDIR)/il_imagergb.o: il_imagergb.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/imagergb_le64.loh +$(OBJDIR)/il_imagergba.o: il_imagergba.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/imagergba_le64.loh +$(OBJDIR)/il_label.o: il_label.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/label_le64.loh +$(OBJDIR)/il_menu.o: il_menu.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/menu_le64.loh +$(OBJDIR)/il_multiline.o: il_multiline.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/multiline_le64.loh +$(OBJDIR)/il_list.o: il_list.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/list_le64.loh +$(OBJDIR)/il_separator.o: il_separator.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/separator_le64.loh +$(OBJDIR)/il_user.o: il_user.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/user_le64.loh +$(OBJDIR)/il_submenu.o: il_submenu.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/submenu_le64.loh +$(OBJDIR)/il_text.o: il_text.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/text_le64.loh +$(OBJDIR)/il_toggle.o: il_toggle.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/toggle_le64.loh +$(OBJDIR)/il_vbox.o: il_vbox.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/vbox_le64.loh +$(OBJDIR)/il_zbox.o: il_zbox.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/zbox_le64.loh +$(OBJDIR)/il_timer.o: il_timer.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/timer_le64.loh +$(OBJDIR)/il_sbox.o: il_sbox.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/sbox_le64.loh +$(OBJDIR)/il_spin.o: il_spin.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/spin_le64.loh +$(OBJDIR)/il_spinbox.o: il_spinbox.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/spinbox_le64.loh +$(OBJDIR)/il_cbox.o: il_cbox.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/cbox_le64.loh +$(OBJDIR)/il_messagedlg.o: il_messagedlg.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/messagedlg_le64.loh +$(OBJDIR)/il_radio.o: il_radio.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/radio_le64.loh +$(OBJDIR)/il_val.o: il_val.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/val_le64.loh +$(OBJDIR)/il_tabs.o: il_tabs.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/tabs_le64.loh +$(OBJDIR)/il_fontdlg.o: il_fontdlg.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/fontdlg_le64.loh +$(OBJDIR)/il_tree.o: il_tree.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/tree_le64.loh +$(OBJDIR)/il_progressbar.o: il_progressbar.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h il.h loh/progressbar_le64.loh diff --git a/iup/srclua5/iuplua_api.c b/iup/srclua5/iuplua_api.c new file mode 100755 index 0000000..8673442 --- /dev/null +++ b/iup/srclua5/iuplua_api.c @@ -0,0 +1,874 @@ +/** \file +* \brief IUP binding for Lua 5. +* +* See Copyright Notice in "iup.h" +*/ + +#include +#include +#include + +#include "iup.h" +#include "iupkey.h" + +#include +#include + +#include "iuplua.h" +#include "il.h" + +#include "iup_attrib.h" +#include "iup_globalattrib.h" +#include "iup_object.h" +#include "iup_str.h" + + +static int SaveImageAsText(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L, 1); + const char *file_name = luaL_checkstring(L, 2); + const char *format = luaL_checkstring(L, 3); + const char *name = luaL_optstring(L, 4, NULL); + lua_pushboolean(L, IupSaveImageAsText(ih, file_name, format, name)); + return 1; +} + +static int Reparent(lua_State *L) +{ + lua_pushnumber(L, IupReparent(iuplua_checkihandle(L,1), + iuplua_checkihandle(L,2))); + return 1; +} + +static int Insert(lua_State *L) +{ + iuplua_pushihandle(L, IupInsert(iuplua_checkihandle(L,1), + iuplua_checkihandleornil(L,2), + iuplua_checkihandle(L,3))); + return 1; +} + +static int Append(lua_State *L) +{ + iuplua_pushihandle(L, IupAppend(iuplua_checkihandle(L,1), + iuplua_checkihandle(L,2))); + return 1; +} + +static int Destroy(lua_State *L) +{ + Ihandle* ih = iuplua_checkihandle(L,1); + iuplua_removeihandle(L, ih); + IupDestroy(ih); + return 0; +} + +static int Detach(lua_State *L) +{ + IupDetach(iuplua_checkihandle(L,1)); + return 0; +} + +static int Flush(lua_State *L) +{ + (void)L; /* not used */ + IupFlush(); + return 0; +} + +static int Version(lua_State *L) +{ + lua_pushstring(L, IupVersion()); + return 1; +} + +static int GetAttributeData (lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + const char *name = luaL_checkstring(L,2); + const char *value = IupGetAttribute(ih, name); + if (!value) + lua_pushnil(L); + else + lua_pushlightuserdata(L, (void*)value); + return 1; +} + +static int GetAttribute (lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + const char *name = luaL_checkstring(L,2); + const char *value = IupGetAttribute(ih, name); + if (!value || iupAttribIsInternal(name)) + lua_pushnil(L); + else + { + if (iupAttribIsPointer(ih, name)) + { + if (iupObjectCheck((Ihandle*)value)) + iuplua_pushihandle(L, (Ihandle*)value); + else + lua_pushlightuserdata(L, (void*)value); + } + else + lua_pushstring(L,value); + } + return 1; +} + +static int GetAttributes(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + const char *value = IupGetAttributes(ih); + lua_pushstring(L,value); + return 1; +} + +static int GetAllDialogs(lua_State *L) +{ + int i, max_n = luaL_checkint(L,1); + char **names = (char **) malloc (max_n * sizeof(char *)); + int n = IupGetAllDialogs(names, max_n); + lua_newtable(L); + for (i=0; i +#include + +#include +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" + +#include +#include +#include + + +static void *cdiup_checkdata(lua_State *L, int param) +{ + return iuplua_checkihandle(L, param); +} + +static cdluaContext cdluaiupctx = +{ + 0, + "IUP", + cdContextIup, + cdiup_checkdata, + NULL, + 0 +}; + +int cdluaiup_open (lua_State *L) +{ + cdluaLuaState* cdL = cdlua_getstate(L); + lua_pushstring(L, "cd"); + lua_gettable(L, LUA_GLOBALSINDEX); /* leave "cd" table at the top of the stack */ + cdlua_addcontext(L, cdL, &cdluaiupctx); + return 1; +} + +int luaopen_iupluacd(lua_State* L) +{ + return cdluaiup_open(L); +} + +int luaopen_iupluacd51(lua_State* L) +{ + return cdluaiup_open(L); +} diff --git a/iup/srclua5/iuplua_controls.c b/iup/srclua5/iuplua_controls.c new file mode 100755 index 0000000..bd961bf --- /dev/null +++ b/iup/srclua5/iuplua_controls.c @@ -0,0 +1,55 @@ +/** \file + * \brief Bindig of iupcontrols to Lua 5. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupcontrols.h" + +#include "iuplua.h" +#include "iupluacontrols.h" +#include "il.h" +#include "il_controls.h" + +int iupcontrolslua_open(lua_State * L) +{ + if (iuplua_opencall_internal(L)) + IupControlsOpen(); + + iuplua_changeEnv(L); + + iupgaugelua_open(L); + iupmatrixlua_open(L); + iupmasklua_open(L); + iupdiallua_open(L); + iupcolorbrowserlua_open(L); + iupcellslua_open(L); + iupcolorbarlua_open(L); + + iuplua_returnEnv(L); + + return 0; +} + +int iupcontrolslua_close(lua_State * L) +{ + if (iuplua_opencall_internal(L)) + IupControlsClose(); + return 0; +} + +/* obligatory to use require"iupluacontrols" */ +int luaopen_iupluacontrols(lua_State* L) +{ + return iupcontrolslua_open(L); +} + +/* obligatory to use require"iupluacontrols51" */ +int luaopen_iupluacontrols51(lua_State* L) +{ + return iupcontrolslua_open(L); +} diff --git a/iup/srclua5/iuplua_glcanvas.c b/iup/srclua5/iuplua_glcanvas.c new file mode 100755 index 0000000..c50ba8f --- /dev/null +++ b/iup/srclua5/iuplua_glcanvas.c @@ -0,0 +1,82 @@ +/** \file + * \brief iupgl binding for Lua 5. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iupgl.h" + +#include "iuplua.h" +#include "iupluagl.h" +#include "il.h" + +#ifdef _WIN32 +#include +#endif +#include + +static int GLIsCurrent(lua_State *L) +{ + lua_pushboolean(L, IupGLIsCurrent(iuplua_checkihandle(L,1))); + return 1; +} + +static int GLMakeCurrent(lua_State *L) +{ + IupGLMakeCurrent(iuplua_checkihandle(L,1)); + + iuplua_changeEnv(L); + iuplua_regstring(L, (const char*)glGetString(GL_VENDOR), "GL_VENDOR"); + iuplua_regstring(L, (const char*)glGetString(GL_RENDERER), "GL_RENDERER"); + iuplua_regstring(L, (const char*)glGetString(GL_VERSION), "GL_VERSION"); + iuplua_returnEnv(L); + + return 0; +} + +static int GLSwapBuffers(lua_State *L) +{ + IupGLSwapBuffers(iuplua_checkihandle(L,1)); + return 0; +} + +static int GLPalette(lua_State *L) +{ + Ihandle *self = iuplua_checkihandle(L,1); + int index = luaL_checkint(L,2); + float r = (float)luaL_checknumber(L,3); + float g = (float)luaL_checknumber(L,4); + float b = (float)luaL_checknumber(L,5); + IupGLPalette(self, index, r, g, b); + return 0; +} + +static int GLUseFont(lua_State *L) +{ + Ihandle *self = iuplua_checkihandle(L,1); + int first = luaL_checkint(L,2); + int count = luaL_checkint(L,3); + int list_base = luaL_checkint(L,4); + IupGLUseFont(self, first, count, list_base); + return 0; +} + +static int GLWait(lua_State *L) +{ + IupGLWait(luaL_checkint(L,1)); + return 0; +} + +void iuplua_glcanvasfuncs_open (lua_State *L) +{ + iuplua_register(L, GLSwapBuffers, "GLSwapBuffers"); + iuplua_register(L, GLIsCurrent, "GLIsCurrent"); + iuplua_register(L, GLMakeCurrent, "GLMakeCurrent"); + iuplua_register(L, GLPalette, "GLPalette"); + iuplua_register(L, GLUseFont, "GLUseFont"); + iuplua_register(L, GLWait, "GLWait"); +} diff --git a/iup/srclua5/iuplua_im.c b/iup/srclua5/iuplua_im.c new file mode 100755 index 0000000..b700e1a --- /dev/null +++ b/iup/srclua5/iuplua_im.c @@ -0,0 +1,54 @@ +/** \file + * \brief IULUA core - Bindig of iup to Lua 5. + * + * See Copyright Notice in "iup.h" + */ + +#include "iup.h" +#include "iupim.h" + +#include +#include + +#include "iuplua.h" +#include "iupluaim.h" +#include "il.h" + +static int SaveImage(lua_State *L) +{ + Ihandle *image = iuplua_checkihandle(L,1); + const char *filename = luaL_checkstring(L, 2); + const char *format = luaL_checkstring(L, 3); + lua_pushboolean(L, IupSaveImage(image, filename, format)); + return 1; +} + +static int LoadImage(lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + Ihandle* image = IupLoadImage(filename); + iuplua_plugstate(L, image); + iuplua_pushihandle(L, image); + return 1; +} + +int iupimlua_open(lua_State *L) +{ + iuplua_changeEnv(L); + iuplua_register(L, LoadImage, "LoadImage"); + iuplua_register(L, SaveImage, "SaveImage"); + iuplua_returnEnv(L); + return 0; /* nothing in stack */ +} + +/* obligatory to use require"iupluaim" */ +int luaopen_iupluaim(lua_State* L) +{ + return iupimlua_open(L); +} + +/* obligatory to use require"iupluaim51" */ +int luaopen_iupluaim51(lua_State* L) +{ + return iupimlua_open(L); +} diff --git a/iup/srclua5/iuplua_imglib.c b/iup/srclua5/iuplua_imglib.c new file mode 100755 index 0000000..bece6d5 --- /dev/null +++ b/iup/srclua5/iuplua_imglib.c @@ -0,0 +1,44 @@ +/** \file + * \brief Iup Image Library Lua 5 Binding + * + * See Copyright Notice in cd.h + */ + +#include +#include + +#include +#include + +#include "iup.h" +#include "iuplua.h" +#include "iupcontrols.h" +#include "il.h" + + +static int imagelibopen(lua_State *L) +{ + (void)L; + IupImageLibOpen(); + return 0; +} + +static int iupluaimglib_open (lua_State *L) +{ + IupImageLibOpen(); + + iuplua_changeEnv(L); + iuplua_register(L, imagelibopen, "ImageLibOpen"); + iuplua_returnEnv(L); + return 0; /* nothing in stack */ +} + +int luaopen_iupluaimglib(lua_State* L) +{ + return iupluaimglib_open(L); +} + +int luaopen_iupluaimglib51(lua_State* L) +{ + return iupluaimglib_open(L); +} diff --git a/iup/srclua5/iuplua_pplot.c b/iup/srclua5/iuplua_pplot.c new file mode 100755 index 0000000..08b04bd --- /dev/null +++ b/iup/srclua5/iuplua_pplot.c @@ -0,0 +1,159 @@ +/** \file + * \brief pplot binding for Lua 5. + * + * See Copyright Notice in "iup.h" + */ + +#include +#include + +#include "iup.h" +#include "iup_pplot.h" + +#include +#include + +#include "iuplua.h" +#include "iuplua_pplot.h" +#include "il.h" + + +static int pplot_edit_cb(Ihandle *self, int p0, int p1, float p2, float p3, float *p4, float *p5) +{ + int ret; + lua_State *L = iuplua_call_start(self, "edit_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + ret = iuplua_call_raw(L, 4+2, LUA_MULTRET); /* 4 args + 2 args(errormsg, handle), variable number of returns */ + if (ret || lua_isnil(L, -1)) + return IUP_DEFAULT; + ret = (int)lua_tonumber(L,-1); + + if (ret == IUP_IGNORE) + { + lua_pop(L, 1); + return IUP_IGNORE; + } + + *p4 = (float)lua_tonumber(L, -3); + *p5 = (float)lua_tonumber(L, -2); + lua_pop(L, 1); + return IUP_DEFAULT; +} + +static int pplot_postdraw_cb(Ihandle *self, cdCanvas* cnv) +{ + lua_State *L = iuplua_call_start(self, "postdraw_cb"); + cdlua_pushcanvas(L, cnv); + return iuplua_call(L, 1); +} + +static int pplot_predraw_cb(Ihandle *self, cdCanvas* cnv) +{ + lua_State *L = iuplua_call_start(self, "predraw_cb"); + cdlua_pushcanvas(L, cnv); + return iuplua_call(L, 1); +} + +static int PPlotBegin(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + IupPPlotBegin(ih, luaL_checkint(L,2)); + return 0; +} + +static int PPlotAdd(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + IupPPlotAdd(ih, (float)luaL_checknumber(L,2), (float)luaL_checknumber(L,3)); + return 0; +} + +static int PPlotAddStr(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + IupPPlotAddStr(ih, luaL_checkstring(L,2), (float)luaL_checknumber(L,3)); + return 0; +} + +static int PPlotEnd(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + int ret = IupPPlotEnd(ih); + lua_pushnumber(L, ret); + return 1; +} + +static int PPlotInsertStr(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + IupPPlotInsertStr(ih, luaL_checkint(L,2), luaL_checkint(L,3), luaL_checkstring(L,4), (float)luaL_checknumber(L,5)); + return 0; +} + +static int PPlotInsert(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + IupPPlotInsert(ih, luaL_checkint(L,2), luaL_checkint(L,3), (float)luaL_checknumber(L,4), (float)luaL_checknumber(L,5)); + return 0; +} + +static int PPlotTransform(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + int ix, iy; + IupPPlotTransform(ih, (float)luaL_checknumber(L,2), (float)luaL_checknumber(L,3), &ix, &iy); + lua_pushnumber(L, ix); + lua_pushnumber(L, iy); + return 2; +} + +static int PPlotPaintTo(lua_State *L) +{ + Ihandle *ih = iuplua_checkihandle(L,1); + IupPPlotPaintTo(ih, cdlua_checkcanvas(L,2)); + return 0; +} + +void iuplua_pplotfuncs_open (lua_State *L) +{ + iuplua_register_cb(L, "EDIT_CB", (lua_CFunction)pplot_edit_cb, "pplot"); + iuplua_register_cb(L, "PREDRAW_CB", (lua_CFunction)pplot_predraw_cb, NULL); + iuplua_register_cb(L, "POSTDRAW_CB", (lua_CFunction)pplot_postdraw_cb, NULL); + + iuplua_register(L, PPlotBegin ,"PPlotBegin"); + iuplua_register(L, PPlotAdd ,"PPlotAdd"); + iuplua_register(L, PPlotAddStr ,"PPlotAddStr"); + iuplua_register(L, PPlotEnd ,"PPlotEnd"); + iuplua_register(L, PPlotInsertStr ,"PPlotInsertStr"); + iuplua_register(L, PPlotInsert ,"PPlotInsert"); + iuplua_register(L, PPlotTransform ,"PPlotTransform"); + iuplua_register(L, PPlotPaintTo ,"PPlotPaintTo"); +} + +int iuppplotlua_open(lua_State * L); + +int iup_pplotlua_open(lua_State * L) +{ + if (iuplua_opencall_internal(L)) + IupPPlotOpen(); + + iuplua_changeEnv(L); + iuppplotlua_open(L); + iuplua_returnEnv(L); + return 0; +} + +/* obligatory to use require"iuplua_pplot" */ +int luaopen_iuplua_pplot(lua_State* L) +{ + return iup_pplotlua_open(L); +} + +/* obligatory to use require"iuplua_pplot51" */ +int luaopen_iuplua_pplot51(lua_State* L) +{ + return iup_pplotlua_open(L); +} diff --git a/iup/srclua5/iuplua_pplot5.def b/iup/srclua5/iuplua_pplot5.def new file mode 100755 index 0000000..3b2ce41 --- /dev/null +++ b/iup/srclua5/iuplua_pplot5.def @@ -0,0 +1,4 @@ +EXPORTS + iup_pplotlua_open + luaopen_iuplua_pplot + luaopen_iuplua_pplot51 diff --git a/iup/srclua5/iuplua_pplot51.dep b/iup/srclua5/iuplua_pplot51.dep new file mode 100644 index 0000000..ed004dc --- /dev/null +++ b/iup/srclua5/iuplua_pplot51.dep @@ -0,0 +1,11 @@ +$(OBJDIR)/iuplua_pplot.o: iuplua_pplot.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iup_pplot.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../../cd/include/cdlua.h ../include/iuplua.h \ + ../include/iuplua_pplot.h il.h +$(OBJDIR)/il_pplot.o: il_pplot.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h ../include/iup_pplot.h il.h \ + loh/pplot_le64.loh diff --git a/iup/srclua5/iupluacd5.def b/iup/srclua5/iupluacd5.def new file mode 100755 index 0000000..c56c231 --- /dev/null +++ b/iup/srclua5/iupluacd5.def @@ -0,0 +1,4 @@ +EXPORTS + cdluaiup_open + luaopen_iupluacd + luaopen_iupluacd51 \ No newline at end of file diff --git a/iup/srclua5/iupluacd51.dep b/iup/srclua5/iupluacd51.dep new file mode 100644 index 0000000..1378e85 --- /dev/null +++ b/iup/srclua5/iupluacd51.dep @@ -0,0 +1,6 @@ +$(OBJDIR)/iuplua_cd.o: iuplua_cd.c ../../cd/include/cd.h ../../cd/include/cdiup.h \ + ../../lua5.1/include/lua.h ../../lua5.1/include/luaconf.h \ + ../../lua5.1/include/lauxlib.h ../../lua5.1/include/lua.h \ + ../include/iup.h ../include/iupkey.h ../include/iupdef.h \ + ../include/iuplua.h ../../cd/include/cdlua.h \ + ../../cd/include/cdluaiup.h ../../cd/include/cdlua5_private.h diff --git a/iup/srclua5/iupluacontrols5.def b/iup/srclua5/iupluacontrols5.def new file mode 100755 index 0000000..0317d30 --- /dev/null +++ b/iup/srclua5/iupluacontrols5.def @@ -0,0 +1,6 @@ +EXPORTS + iupcontrolslua_open + iupcontrolslua_close + luaopen_iupluacontrols + luaopen_iupluacontrols51 + \ No newline at end of file diff --git a/iup/srclua5/iupluacontrols51.dep b/iup/srclua5/iupluacontrols51.dep new file mode 100644 index 0000000..d020fd9 --- /dev/null +++ b/iup/srclua5/iupluacontrols51.dep @@ -0,0 +1,46 @@ +$(OBJDIR)/iuplua_controls.o: iuplua_controls.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lualib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcontrols.h ../include/iuplua.h \ + ../include/iupluacontrols.h il.h il_controls.h +$(OBJDIR)/il_mask.o: il_mask.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupmask.h ../include/iuplua.h il.h \ + il_controls.h +$(OBJDIR)/il_matrix_aux.o: il_matrix_aux.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcontrols.h ../../cd/include/cd.h \ + ../../cd/include/cd_old.h ../../cd/include/cdlua.h ../include/iuplua.h \ + il.h il_controls.h +$(OBJDIR)/il_dial.o: il_dial.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h ../include/iupcontrols.h il.h \ + loh/dial_le64.loh +$(OBJDIR)/il_gauge.o: il_gauge.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h ../include/iupcontrols.h il.h \ + loh/gauge_le64.loh +$(OBJDIR)/il_colorbrowser.o: il_colorbrowser.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h ../include/iupcontrols.h il.h \ + loh/colorbrowser_le64.loh +$(OBJDIR)/il_colorbar.o: il_colorbar.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h ../include/iupcontrols.h il.h \ + loh/colorbar_le64.loh +$(OBJDIR)/il_matrix.o: il_matrix.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h ../include/iupcontrols.h il.h \ + loh/matrix_le64.loh +$(OBJDIR)/il_cells.o: il_cells.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h ../include/iupcontrols.h il.h \ + loh/cells_le64.loh diff --git a/iup/srclua5/iupluagl5.def b/iup/srclua5/iupluagl5.def new file mode 100755 index 0000000..577d9cf --- /dev/null +++ b/iup/srclua5/iupluagl5.def @@ -0,0 +1,5 @@ +EXPORTS + iupgllua_open + luaopen_iupluagl + luaopen_iupluagl51 + \ No newline at end of file diff --git a/iup/srclua5/iupluagl51.dep b/iup/srclua5/iupluagl51.dep new file mode 100644 index 0000000..592207a --- /dev/null +++ b/iup/srclua5/iupluagl51.dep @@ -0,0 +1,10 @@ +$(OBJDIR)/iuplua_glcanvas.o: iuplua_glcanvas.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupgl.h ../include/iuplua.h \ + ../include/iupluagl.h il.h +$(OBJDIR)/il_glcanvas.o: il_glcanvas.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h ../include/iupgl.h il.h \ + loh/glcanvas_le64.loh diff --git a/iup/srclua5/iupluaim5.def b/iup/srclua5/iupluaim5.def new file mode 100755 index 0000000..063df5a --- /dev/null +++ b/iup/srclua5/iupluaim5.def @@ -0,0 +1,5 @@ +EXPORTS + iupimlua_open + luaopen_iupluaim + luaopen_iupluaim51 + \ No newline at end of file diff --git a/iup/srclua5/iupluaim51.dep b/iup/srclua5/iupluaim51.dep new file mode 100644 index 0000000..488ebfa --- /dev/null +++ b/iup/srclua5/iupluaim51.dep @@ -0,0 +1,5 @@ +$(OBJDIR)/iuplua_im.o: iuplua_im.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupim.h ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iuplua.h ../include/iupluaim.h \ + il.h diff --git a/iup/srclua5/iupluaimglib5.def b/iup/srclua5/iupluaimglib5.def new file mode 100755 index 0000000..134abb7 --- /dev/null +++ b/iup/srclua5/iupluaimglib5.def @@ -0,0 +1,4 @@ +EXPORTS + luaopen_iupluaimglib + luaopen_iupluaimglib51 + \ No newline at end of file diff --git a/iup/srclua5/iupluaimglib51.dep b/iup/srclua5/iupluaimglib51.dep new file mode 100644 index 0000000..cbbc352 --- /dev/null +++ b/iup/srclua5/iupluaimglib51.dep @@ -0,0 +1,4 @@ +$(OBJDIR)/iuplua_imglib.o: iuplua_imglib.c ../../lua5.1/include/lua.h \ + ../../lua5.1/include/luaconf.h ../../lua5.1/include/lauxlib.h \ + ../../lua5.1/include/lua.h ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iuplua.h ../include/iupcontrols.h il.h diff --git a/iup/srclua5/iupluaole5.def b/iup/srclua5/iupluaole5.def new file mode 100755 index 0000000..ab781ed --- /dev/null +++ b/iup/srclua5/iupluaole5.def @@ -0,0 +1,5 @@ +EXPORTS + iupolelua_open + luaopen_iupluaole + luaopen_iupluaole51 + \ No newline at end of file diff --git a/iup/srclua5/iupole.mak b/iup/srclua5/iupole.mak new file mode 100755 index 0000000..6a3f9ec --- /dev/null +++ b/iup/srclua5/iupole.mak @@ -0,0 +1,23 @@ +PROJNAME = iup +LIBNAME = iupluaole51 +OPT = YES +DEF_FILE = iupluaole5.def + +IUP := .. + +DEFINES = IUPLUA_USELOH + +USE_IUPLUA = Yes +LIBS = iupole +USE_LUA51 = Yes +NO_LUALINK = Yes + +LOHDIR = loh +SRCLUA = olecontrol.lua +GC = $(addsuffix .c, $(basename $(SRCLUA))) +GC := $(addprefix il_, $(GC)) + +$(GC) : il_%.c : %.lua generator.lua + $(LUABIN) generator.lua $< + +SRC = $(GC) diff --git a/iup/srclua5/label.lua b/iup/srclua5/label.lua new file mode 100755 index 0000000..11894a6 --- /dev/null +++ b/iup/srclua5/label.lua @@ -0,0 +1,16 @@ +------------------------------------------------------------------------------ +-- Label class +------------------------------------------------------------------------------ +local ctrl = { + nick = "label", + parent = WIDGET, + creation = "S", + callback = {} +} + +function ctrl.createElement(class, arg) + return Label(arg.title) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/list.lua b/iup/srclua5/list.lua new file mode 100755 index 0000000..5c927f2 --- /dev/null +++ b/iup/srclua5/list.lua @@ -0,0 +1,22 @@ +------------------------------------------------------------------------------ +-- List class +------------------------------------------------------------------------------ +local ctrl = { + nick = "list", + parent = WIDGET, + creation = "-", + callback = { + action = "snn", + multiselect_cb = "s", + edit_cb = "ns", + dropdown_cb = "n", + dblclick_cb = "ns", + } +} + +function ctrl.createElement(class, arg) + return List() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/loh/button.loh b/iup/srclua5/loh/button.loh new file mode 100755 index 0000000..9ffb6aa --- /dev/null +++ b/iup/srclua5/loh/button.loh @@ -0,0 +1,38 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/button.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/button.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 12, 0, 0, 0, 64, 98,117,116, +116,111,110, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, + 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131,100, 0, 0, 0, + 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 2, 0, +128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, 0, 0, + 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 7, 0, 0, 0, 98,117,116,116,111, +110, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 3, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, + 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, + 0, 0, 0, 4, 7, 0, 0, 0, 66,117,116,116,111,110, 0, 4, 6, 0, 0, 0, +116,105,116,108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 14, 0, 0, 0, 14, 0, + 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, 0, 6, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, + 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, + 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/button.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/button_be32.loh b/iup/srclua5/loh/button_be32.loh new file mode 100755 index 0000000..d7c1b69 --- /dev/null +++ b/iup/srclua5/loh/button_be32.loh @@ -0,0 +1,38 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/button_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/button_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 12, 64, 98,117,116, +116,111,110, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 0, 0, 0, 18, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9, +130, 65, 64, 9, 0, 0, 64, 74,131,194, 0, 73,131, 0, 64, 9, 0, 0, 0,100, +132,128, 64, 9, 0, 2,128, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2,192, 69, + 0, 0, 0,128, 0, 3, 0,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 13, + 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 7, 98,117,116,116,111, +110, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, + 4, 0, 0, 0, 3, 83, 45, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 4, 0, 0, 0, 1, 0, + 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 2, 0, 4, 0, 0, 0, 5, 0, + 0, 0,133, 0,192, 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, + 0, 0, 2, 4, 0, 0, 0, 7, 66,117,116,116,111,110, 0, 4, 0, 0, 0, 6, +116,105,116,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 14, 0, 0, + 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, + 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, + 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, + 99,116,114,108, 0, 0, 0, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/button_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/button_be64.loh b/iup/srclua5/loh/button_be64.loh new file mode 100755 index 0000000..50b2ba6 --- /dev/null +++ b/iup/srclua5/loh/button_be64.loh @@ -0,0 +1,42 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/button_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/button_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64, 98,117,116,116,111,110, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69,192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, + 13, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 98,117,116,116,111,110, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, + 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 66,117,116,116,111,110, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/button_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/button_le64.loh b/iup/srclua5/loh/button_le64.loh new file mode 100755 index 0000000..8c74526 --- /dev/null +++ b/iup/srclua5/loh/button_le64.loh @@ -0,0 +1,42 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/button_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/button_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64, 98,117,116,116,111,110, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69,192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, + 13, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 98,117,116,116,111,110, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, + 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 66,117,116,116,111,110, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/button_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/button_le64w.loh b/iup/srclua5/loh/button_le64w.loh new file mode 100755 index 0000000..21840c9 --- /dev/null +++ b/iup/srclua5/loh/button_le64w.loh @@ -0,0 +1,42 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/button_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/button_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64, 98,117,116,116,111,110, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69,192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, + 13, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 98,117,116,116,111,110, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, + 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 66,117,116,116,111,110, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/button_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/canvas.loh b/iup/srclua5/loh/canvas.loh new file mode 100755 index 0000000..2533ce8 --- /dev/null +++ b/iup/srclua5/loh/canvas.loh @@ -0,0 +1,54 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/canvas.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/canvas.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 12, 0, 0, 0, 64, 99, 97,110, +118, 97,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 29, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, + 9, 64, 65,130, 74, 0, 3, 0, 73, 0,194,131, 73,128,194,132, 73, 0,195,133, + 73, 0,195,134, 73,192, 67,135, 73, 64, 68,136, 73,192, 68,137, 73, 64, 68,138, + 73,128,197,138, 73, 0,198,139, 73, 0,195,140, 73,128, 69,141, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,141, 69, 0, 7, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69, 64, 7, 0,128, 0, 0, 0,193,128, 7, 0, 92, 64,128, 1, 30, 0,128, 0, + 31, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 7, 0, 0, 0, 99, + 97,110,118, 97,115, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 3, 0, + 0, 0,102,102, 0, 4, 10, 0, 0, 0, 98,117,116,116,111,110, 95, 99, 98, 0, + 4, 6, 0, 0, 0,110,110,110,110,115, 0, 4, 15, 0, 0, 0,101,110,116,101, +114,119,105,110,100,111,119, 95, 99, 98, 0, 4, 1, 0, 0, 0, 0, 4, 15, 0, + 0, 0,108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 4, 10, 0, + 0, 0,109,111,116,105,111,110, 95, 99, 98, 0, 4, 4, 0, 0, 0,110,110,115, + 0, 4, 10, 0, 0, 0,114,101,115,105,122,101, 95, 99, 98, 0, 4, 3, 0, 0, + 0,110,110, 0, 4, 10, 0, 0, 0,115, 99,114,111,108,108, 95, 99, 98, 0, 4, + 4, 0, 0, 0,110,102,102, 0, 4, 12, 0, 0, 0,107,101,121,112,114,101,115, +115, 95, 99, 98, 0, 4, 7, 0, 0, 0,119,111,109, 95, 99, 98, 0, 4, 2, 0, + 0, 0,110, 0, 4, 9, 0, 0, 0,119,104,101,101,108, 95, 99, 98, 0, 4, 5, + 0, 0, 0,102,110,110,115, 0, 4, 15, 0, 0, 0,109,100,105, 97, 99,116,105, +118, 97,116,101, 95, 99, 98, 0, 4, 9, 0, 0, 0,102,111, 99,117,115, 95, 99, + 98, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 24, 0, 0, 0, 26, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, + 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, + 0, 4, 7, 0, 0, 0, 67, 97,110,118, 97,115, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 2, 0, 0, + 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, + 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 29, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, + 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, + 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 26, + 0, 0, 0, 24, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, + 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 19, 0, 0, 0, 28, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/canvas.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/canvas_be32.loh b/iup/srclua5/loh/canvas_be32.loh new file mode 100755 index 0000000..7950cd4 --- /dev/null +++ b/iup/srclua5/loh/canvas_be32.loh @@ -0,0 +1,54 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/canvas_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/canvas_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 12, 64, 99, 97,110, +118, 97,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 0, 0, 0, 29, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9, +130, 65, 64, 9, 0, 3, 0, 74,131,194, 0, 73,132,194,128, 73,133,195, 0, 73, +134,195, 0, 73,135, 67,192, 73,136, 68, 64, 73,137, 68,192, 73,138, 68, 64, 73, +138,197,128, 73,139,198, 0, 73,140,195, 0, 73,141, 69,128, 73,131, 0, 64, 9, + 0, 0, 0,100,141,128, 64, 9, 0, 7, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, + 0, 7, 64, 69, 0, 0, 0,128, 0, 7,128,193, 1,128, 64, 92, 0,128, 0, 30, + 0, 0, 0, 31, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 7, 99, + 97,110,118, 97,115, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116, +105,111,110, 0, 4, 0, 0, 0, 2, 45, 0, 4, 0, 0, 0, 9, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 4, 0, 0, + 0, 3,102,102, 0, 4, 0, 0, 0, 10, 98,117,116,116,111,110, 95, 99, 98, 0, + 4, 0, 0, 0, 6,110,110,110,110,115, 0, 4, 0, 0, 0, 15,101,110,116,101, +114,119,105,110,100,111,119, 95, 99, 98, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, + 0, 15,108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 4, 0, 0, + 0, 10,109,111,116,105,111,110, 95, 99, 98, 0, 4, 0, 0, 0, 4,110,110,115, + 0, 4, 0, 0, 0, 10,114,101,115,105,122,101, 95, 99, 98, 0, 4, 0, 0, 0, + 3,110,110, 0, 4, 0, 0, 0, 10,115, 99,114,111,108,108, 95, 99, 98, 0, 4, + 0, 0, 0, 4,110,102,102, 0, 4, 0, 0, 0, 12,107,101,121,112,114,101,115, +115, 95, 99, 98, 0, 4, 0, 0, 0, 7,119,111,109, 95, 99, 98, 0, 4, 0, 0, + 0, 2,110, 0, 4, 0, 0, 0, 9,119,104,101,101,108, 95, 99, 98, 0, 4, 0, + 0, 0, 5,102,110,110,115, 0, 4, 0, 0, 0, 15,109,100,105, 97, 99,116,105, +118, 97,116,101, 95, 99, 98, 0, 4, 0, 0, 0, 9,102,111, 99,117,115, 95, 99, + 98, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 26, 0, 2, 0, 3, 0, 0, 0, + 4, 0, 0, 0,133, 0,128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, + 1, 4, 0, 0, 0, 7, 67, 97,110,118, 97,115, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, + 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 29, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, + 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, + 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, + 0, 0, 26, 0, 0, 0, 24, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, + 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, + 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 19, 0, 0, 0, 28, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/canvas_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/canvas_be64.loh b/iup/srclua5/loh/canvas_be64.loh new file mode 100755 index 0000000..2cdb93c --- /dev/null +++ b/iup/srclua5/loh/canvas_be64.loh @@ -0,0 +1,61 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/canvas_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/canvas_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64, 99, 97,110,118, 97,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 29, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 0, 3, 0, 73, 0,194,131, 73,128,194,132, + 73, 0,195,133, 73, 0,195,134, 73,192, 67,135, 73, 64, 68,136, 73,192, 68,137, + 73, 64, 68,138, 73,128,197,138, 73, 0,198,139, 73, 0,195,140, 73,128, 69,141, + 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,141, 69, 0, 7, 0,128, 0, 0, 0, + 92, 64, 0, 1, 69, 64, 7, 0,128, 0, 0, 0,193,128, 7, 0, 92, 64,128, 1, + 30, 0,128, 0, 31, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99, +107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 99, 97,110,118, 97,115, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,102,102, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 98,117,116,116,111,110, + 95, 99, 98, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,110,110,110,110,115, 0, 4, + 15, 0, 0, 0, 0, 0, 0, 0,101,110,116,101,114,119,105,110,100,111,119, 95, + 99, 98, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 15, 0, 0, 0, 0, 0, + 0, 0,108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0,109,111,116,105,111,110, 95, 99, 98, 0, 4, 4, 0, 0, + 0, 0, 0, 0, 0,110,110,115, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,114,101, +115,105,122,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, + 4, 10, 0, 0, 0, 0, 0, 0, 0,115, 99,114,111,108,108, 95, 99, 98, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0,110,102,102, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0,119,111,109, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0,119,104,101,101,108, 95, 99, 98, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,102,110,110,115, 0, 4, 15, 0, 0, 0, 0, 0, 0, + 0,109,100,105, 97, 99,116,105,118, 97,116,101, 95, 99, 98, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0,102,111, 99,117,115, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, + 0, 26, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 67, 97,110,118, 97,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 29, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, + 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, + 0, 0, 0, 26, 0, 0, 0, 24, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 19, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/canvas_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/canvas_le64.loh b/iup/srclua5/loh/canvas_le64.loh new file mode 100755 index 0000000..ad64990 --- /dev/null +++ b/iup/srclua5/loh/canvas_le64.loh @@ -0,0 +1,61 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/canvas_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/canvas_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64, 99, 97,110,118, 97,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 29, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 0, 3, 0, 73, 0,194,131, 73,128,194,132, + 73, 0,195,133, 73, 0,195,134, 73,192, 67,135, 73, 64, 68,136, 73,192, 68,137, + 73, 64, 68,138, 73,128,197,138, 73, 0,198,139, 73, 0,195,140, 73,128, 69,141, + 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,141, 69, 0, 7, 0,128, 0, 0, 0, + 92, 64, 0, 1, 69, 64, 7, 0,128, 0, 0, 0,193,128, 7, 0, 92, 64,128, 1, + 30, 0,128, 0, 31, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99, +107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 99, 97,110,118, 97,115, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,102,102, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 98,117,116,116,111,110, + 95, 99, 98, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,110,110,110,110,115, 0, 4, + 15, 0, 0, 0, 0, 0, 0, 0,101,110,116,101,114,119,105,110,100,111,119, 95, + 99, 98, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 15, 0, 0, 0, 0, 0, + 0, 0,108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0,109,111,116,105,111,110, 95, 99, 98, 0, 4, 4, 0, 0, + 0, 0, 0, 0, 0,110,110,115, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,114,101, +115,105,122,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, + 4, 10, 0, 0, 0, 0, 0, 0, 0,115, 99,114,111,108,108, 95, 99, 98, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0,110,102,102, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0,119,111,109, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0,119,104,101,101,108, 95, 99, 98, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,102,110,110,115, 0, 4, 15, 0, 0, 0, 0, 0, 0, + 0,109,100,105, 97, 99,116,105,118, 97,116,101, 95, 99, 98, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0,102,111, 99,117,115, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, + 0, 26, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 67, 97,110,118, 97,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 29, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, + 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, + 0, 0, 0, 26, 0, 0, 0, 24, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 19, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/canvas_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/canvas_le64w.loh b/iup/srclua5/loh/canvas_le64w.loh new file mode 100755 index 0000000..8712464 --- /dev/null +++ b/iup/srclua5/loh/canvas_le64w.loh @@ -0,0 +1,61 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/canvas_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/canvas_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64, 99, 97,110,118, 97,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 29, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 0, 3, 0, 73, 0,194,131, 73,128,194,132, + 73, 0,195,133, 73, 0,195,134, 73,192, 67,135, 73, 64, 68,136, 73,192, 68,137, + 73, 64, 68,138, 73,128,197,138, 73, 0,198,139, 73, 0,195,140, 73,128, 69,141, + 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,141, 69, 0, 7, 0,128, 0, 0, 0, + 92, 64, 0, 1, 69, 64, 7, 0,128, 0, 0, 0,193,128, 7, 0, 92, 64,128, 1, + 30, 0,128, 0, 31, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99, +107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 99, 97,110,118, 97,115, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,102,102, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 98,117,116,116,111,110, + 95, 99, 98, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,110,110,110,110,115, 0, 4, + 15, 0, 0, 0, 0, 0, 0, 0,101,110,116,101,114,119,105,110,100,111,119, 95, + 99, 98, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 15, 0, 0, 0, 0, 0, + 0, 0,108,101, 97,118,101,119,105,110,100,111,119, 95, 99, 98, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0,109,111,116,105,111,110, 95, 99, 98, 0, 4, 4, 0, 0, + 0, 0, 0, 0, 0,110,110,115, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,114,101, +115,105,122,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, + 4, 10, 0, 0, 0, 0, 0, 0, 0,115, 99,114,111,108,108, 95, 99, 98, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0,110,102,102, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0,107,101,121,112,114,101,115,115, 95, 99, 98, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0,119,111,109, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0,119,104,101,101,108, 95, 99, 98, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,102,110,110,115, 0, 4, 15, 0, 0, 0, 0, 0, 0, + 0,109,100,105, 97, 99,116,105,118, 97,116,101, 95, 99, 98, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0,102,111, 99,117,115, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, + 0, 26, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 67, 97,110,118, 97,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 29, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, + 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, + 0, 0, 0, 26, 0, 0, 0, 24, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 19, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/canvas_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/cbox.loh b/iup/srclua5/loh/cbox.loh new file mode 100755 index 0000000..23cd8e5 --- /dev/null +++ b/iup/srclua5/loh/cbox.loh @@ -0,0 +1,50 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/cbox.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/cbox.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64, 99, 98,111, +120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 19, 0, + 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131, 9,128,194,132,100, 0, + 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, + 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, + 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 99, 98,111, +120, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 2, 0, 0, 0,118, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 9, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 6, 0, 0, 0, + 67, 98,111,120,118, 0, 4, 11, 0, 0, 0, 99,114,101, 97,116,101,102,117,110, + 99, 0, 4,208, 0, 0, 0,115,116, 97,116,105, 99, 32,105,110,116, 32, 67, 98, +111,120,118, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 76, 41, 10,123, 10, + 32, 32, 73,104, 97,110,100,108,101, 32, 42, 42,104,108,105,115,116, 32, 61, 32, +105,117,112,108,117, 97, 95, 99,104,101, 99,107,105,104, 97,110,100,108,101, 95, + 97,114,114, 97,121, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 73,104, 97,110,100, +108,101, 32, 42,104, 32, 61, 32, 73,117,112, 67, 98,111,120,118, 40,104,108,105, +115,116, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,108,117,103,115,116, + 97,116,101, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95, +112,117,115,104,105,104, 97,110,100,108,101, 95,114, 97,119, 40, 76, 44, 32,104, + 41, 59, 10, 32, 32,102,114,101,101, 40,104,108,105,115,116, 41, 59, 10, 32, 32, +114,101,116,117,114,110, 32, 49, 59, 10,125, 10, 32, 32, 0, 4, 14, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 25, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,192, 0, +128, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, + 0, 0, 0, 67, 98,111,120,118, 0, 0, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, + 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, + 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, + 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 20, 0, 0, 0, 25, + 0, 0, 0, 23, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/cbox.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/cbox_be32.loh b/iup/srclua5/loh/cbox_be32.loh new file mode 100755 index 0000000..b9bbb51 --- /dev/null +++ b/iup/srclua5/loh/cbox_be32.loh @@ -0,0 +1,52 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/cbox_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/cbox_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64, 99, 98,111, +120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 20, 0, 1,192, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0, 0, 74,131, 0, 64, 9,131,194, 0, 9,132,194,128, 9,133,195, + 0, 9, 0, 0, 0,100,134,128, 64, 9, 0, 3,128, 69, 0, 0, 0,128, 1, 0, + 64, 92, 0, 3,192, 69, 0, 0, 0,128, 0, 4, 0,193, 1,128, 64, 92, 0,128, + 0, 30, 0, 0, 0, 17, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, + 5, 99, 98,111,120, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116, +105,111,110, 0, 4, 0, 0, 0, 2,118, 0, 4, 0, 0, 0, 9, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 0, 0, 0, 8,105,110, 99,108,117,100,101, 0, 4, 0, + 0, 0, 10,105,117,112, 99, 98,111,120, 46,104, 0, 4, 0, 0, 0, 9,102,117, +110, 99,110, 97,109,101, 0, 4, 0, 0, 0, 6, 67, 98,111,120,118, 0, 4, 0, + 0, 0, 11, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, 0, 0, 0,208,115, +116, 97,116,105, 99, 32,105,110,116, 32, 67, 98,111,120,118, 40,108,117, 97, 95, + 83,116, 97,116,101, 32, 42, 76, 41, 10,123, 10, 32, 32, 73,104, 97,110,100,108, +101, 32, 42, 42,104,108,105,115,116, 32, 61, 32,105,117,112,108,117, 97, 95, 99, +104,101, 99,107,105,104, 97,110,100,108,101, 95, 97,114,114, 97,121, 40, 76, 44, + 32, 49, 41, 59, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42,104, 32, 61, 32, + 73,117,112, 67, 98,111,120,118, 40,104,108,105,115,116, 41, 59, 10, 32, 32,105, +117,112,108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,104, + 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110, +100,108,101, 95,114, 97,119, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,102,114,101, +101, 40,104,108,105,115,116, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, + 59, 10,125, 10, 32, 32, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108, +101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, + 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101, +116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 26, 0, 2, + 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0,128, 0,192, 1, 0, 0,157, 0, 0, + 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 6, 67, 98,111,120,118, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97, +115,115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 4, 0, + 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 21, 0, 0, 0, 26, 0, + 0, 0, 24, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, + 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 1, 0, + 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 10, 0, 0, 0, 19, 0, 0, 0, 0, + +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/cbox_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/cbox_be64.loh b/iup/srclua5/loh/cbox_be64.loh new file mode 100755 index 0000000..b75e9c3 --- /dev/null +++ b/iup/srclua5/loh/cbox_be64.loh @@ -0,0 +1,54 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/cbox_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/cbox_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64, 99, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131, 9,128, +194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0, 99, 98,111,120, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,118, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, + 67, 98,111,120,118, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101,102,117,110, 99, 0, 4,208, 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,105, + 99, 32,105,110,116, 32, 67, 98,111,120,118, 40,108,117, 97, 95, 83,116, 97,116, +101, 32, 42, 76, 41, 10,123, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42, 42, +104,108,105,115,116, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107, +105,104, 97,110,100,108,101, 95, 97,114,114, 97,121, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42,104, 32, 61, 32, 73,117,112, 67, + 98,111,120,118, 40,104,108,105,115,116, 41, 59, 10, 32, 32,105,117,112,108,117, + 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,104, 41, 59, 10, 32, + 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100,108,101, 95, +114, 97,119, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,102,114,101,101, 40,104,108, +105,115,116, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 10, + 32, 32, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108, +101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101, +103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 0, 2, 0, 4, 5, 0, + 0, 0,133, 0, 0, 0,192, 0,128, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 67, 98,111,120,118, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, + 0, 24, 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 20, 0, 0, 0, 25, + 0, 0, 0, 23, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, + 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/cbox_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/cbox_le64.loh b/iup/srclua5/loh/cbox_le64.loh new file mode 100755 index 0000000..d4161cb --- /dev/null +++ b/iup/srclua5/loh/cbox_le64.loh @@ -0,0 +1,56 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/cbox_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/cbox_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64, 99, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 20, 0, 0, 0, 10,192, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131, 9,128, +194,132, 9, 0,195,133,100, 0, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, + 0, 0, 92, 64, 0, 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64, +128, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 99, 98,111,120, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,118, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, + 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 10, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 99, 98,111,120, 46,104, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, + 67, 98,111,120,118, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101,102,117,110, 99, 0, 4,208, 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,105, + 99, 32,105,110,116, 32, 67, 98,111,120,118, 40,108,117, 97, 95, 83,116, 97,116, +101, 32, 42, 76, 41, 10,123, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42, 42, +104,108,105,115,116, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107, +105,104, 97,110,100,108,101, 95, 97,114,114, 97,121, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42,104, 32, 61, 32, 73,117,112, 67, + 98,111,120,118, 40,104,108,105,115,116, 41, 59, 10, 32, 32,105,117,112,108,117, + 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,104, 41, 59, 10, 32, + 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100,108,101, 95, +114, 97,119, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,102,114,101,101, 40,104,108, +105,115,116, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 10, + 32, 32, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108, +101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101, +103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 26, 0, 0, 0, 0, 2, 0, 4, 5, 0, + 0, 0,133, 0, 0, 0,192, 0,128, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 67, 98,111,120,118, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 26, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 20, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 21, + 0, 0, 0, 26, 0, 0, 0, 24, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 10, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/cbox_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/cbox_le64w.loh b/iup/srclua5/loh/cbox_le64w.loh new file mode 100755 index 0000000..7320ebe --- /dev/null +++ b/iup/srclua5/loh/cbox_le64w.loh @@ -0,0 +1,54 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/cbox_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/cbox_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64, 99, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131, 9,128, +194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0, 99, 98,111,120, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,118, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, + 67, 98,111,120,118, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101,102,117,110, 99, 0, 4,208, 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,105, + 99, 32,105,110,116, 32, 67, 98,111,120,118, 40,108,117, 97, 95, 83,116, 97,116, +101, 32, 42, 76, 41, 10,123, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42, 42, +104,108,105,115,116, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107, +105,104, 97,110,100,108,101, 95, 97,114,114, 97,121, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42,104, 32, 61, 32, 73,117,112, 67, + 98,111,120,118, 40,104,108,105,115,116, 41, 59, 10, 32, 32,105,117,112,108,117, + 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,104, 41, 59, 10, 32, + 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100,108,101, 95, +114, 97,119, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,102,114,101,101, 40,104,108, +105,115,116, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 10, + 32, 32, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108, +101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101, +103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 0, 2, 0, 4, 5, 0, + 0, 0,133, 0, 0, 0,192, 0,128, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 67, 98,111,120,118, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, + 0, 24, 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 20, 0, 0, 0, 25, + 0, 0, 0, 23, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, + 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/cbox_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/cells.loh b/iup/srclua5/loh/cells.loh new file mode 100755 index 0000000..f424f00 --- /dev/null +++ b/iup/srclua5/loh/cells.loh @@ -0,0 +1,57 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/cells.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/cells.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 11, 0, 0, 0, 64, 99,101,108, +108,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 29, + 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, + 64, 65,130, 74, 64, 2, 0, 73, 0,194,131, 73,128,194,132, 73, 0,195,133, 73, +128,195,134, 73,128,195,135, 73, 64, 65,136, 73, 64,193,136, 73, 0, 67,137, 73, + 0,195,137, 9, 64, 0,131, 9, 64, 69,138,100, 0, 0, 0, 9, 64, 0,139,100, + 64, 0, 0, 9, 64,128,139, 69, 0, 6, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, + 64, 6, 0,128, 0, 0, 0,193,128, 6, 0, 92, 64,128, 1, 30, 0,128, 0, 27, + 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 99,101, +108,108,115, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 14, 0, 0, 0,109,111,117,115,101, 99,108,105, 99,107, 95, 99, 98, + 0, 4, 8, 0, 0, 0,110,110,110,110,110,110,115, 0, 4, 15, 0, 0, 0,109, +111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 4, 6, 0, 0, 0,110, +110,110,110,115, 0, 4, 13, 0, 0, 0,115, 99,114,111,108,108,105,110,103, 95, + 99, 98, 0, 4, 3, 0, 0, 0,110,110, 0, 4, 9, 0, 0, 0,119,105,100,116, +104, 95, 99, 98, 0, 4, 2, 0, 0, 0,110, 0, 4, 10, 0, 0, 0,104,101,105, +103,104,116, 95, 99, 98, 0, 4, 10, 0, 0, 0,110,108,105,110,101,115, 95, 99, + 98, 0, 4, 9, 0, 0, 0,110, 99,111,108,115, 95, 99, 98, 0, 4, 9, 0, 0, + 0,104,115,112, 97,110, 95, 99, 98, 0, 4, 9, 0, 0, 0,118,115,112, 97,110, + 95, 99, 98, 0, 4, 8, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 14, 0, + 0, 0,105,117,112, 99,111,110,116,114,111,108,115, 46,104, 0, 4, 7, 0, 0, + 0,114,101,100,114, 97,119, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69, +108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101, +116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103, +101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 0, + 1, 0, 2, 2, 0, 0, 0, 9, 64, 64,128, 30, 0,128, 0, 2, 0, 0, 0, 4, + 8, 0, 0, 0,114,101,112, 97,105,110,116, 0, 4, 4, 0, 0, 0, 89, 69, 83, + 0, 0, 0, 0, 0, 2, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, + 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 29, 0, 0, 0, 0, 2, 0, 3, + 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, + 1, 0, 0, 0, 4, 6, 0, 0, 0, 67,101,108,108,115, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, + 0, 29, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, + 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, + 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 25, 0, 0, 0, 23, 0, 0, + 0, 29, 0, 0, 0, 27, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 17, 0, 0, 0, 28, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/cells.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/cells_be32.loh b/iup/srclua5/loh/cells_be32.loh new file mode 100755 index 0000000..73e7cb0 --- /dev/null +++ b/iup/srclua5/loh/cells_be32.loh @@ -0,0 +1,57 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/cells_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/cells_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 11, 64, 99,101,108, +108,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, + 0, 0, 29, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, + 65, 64, 9, 0, 2, 64, 74,131,194, 0, 73,132,194,128, 73,133,195, 0, 73,134, +195,128, 73,135,195,128, 73,136, 65, 64, 73,136,193, 64, 73,137, 67, 0, 73,137, +195, 0, 73,131, 0, 64, 9,138, 69, 64, 9, 0, 0, 0,100,139, 0, 64, 9, 0, + 0, 64,100,139,128, 64, 9, 0, 6, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, + 6, 64, 69, 0, 0, 0,128, 0, 6,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, + 0, 0, 27, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 6, 99,101, +108,108,115, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, + 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111, +110, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 0, 0, 0, 14,109,111,117,115,101, 99,108,105, 99,107, 95, 99, 98, + 0, 4, 0, 0, 0, 8,110,110,110,110,110,110,115, 0, 4, 0, 0, 0, 15,109, +111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 4, 0, 0, 0, 6,110, +110,110,110,115, 0, 4, 0, 0, 0, 13,115, 99,114,111,108,108,105,110,103, 95, + 99, 98, 0, 4, 0, 0, 0, 3,110,110, 0, 4, 0, 0, 0, 9,119,105,100,116, +104, 95, 99, 98, 0, 4, 0, 0, 0, 2,110, 0, 4, 0, 0, 0, 10,104,101,105, +103,104,116, 95, 99, 98, 0, 4, 0, 0, 0, 10,110,108,105,110,101,115, 95, 99, + 98, 0, 4, 0, 0, 0, 9,110, 99,111,108,115, 95, 99, 98, 0, 4, 0, 0, 0, + 9,104,115,112, 97,110, 95, 99, 98, 0, 4, 0, 0, 0, 9,118,115,112, 97,110, + 95, 99, 98, 0, 4, 0, 0, 0, 8,105,110, 99,108,117,100,101, 0, 4, 0, 0, + 0, 11,105,117,112, 99,101,108,108,115, 46,104, 0, 4, 0, 0, 0, 7,114,101, +100,114, 97,119, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, + 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, + 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 1, 0, 2, + 0, 0, 0, 2,128, 64, 64, 9, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, + 8,114,101,112, 97,105,110,116, 0, 4, 0, 0, 0, 4, 89, 69, 83, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, + 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 29, 0, 2, 0, 3, 0, 0, 0, + 4, 0, 0, 0,133, 0,128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, + 1, 4, 0, 0, 0, 6, 67,101,108,108,115, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 2, + 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, + 0, 29, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, + 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, + 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 25, 0, 0, 0, 23, 0, 0, + 0, 29, 0, 0, 0, 27, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 17, 0, 0, 0, 28, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/cells_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/cells_be64.loh b/iup/srclua5/loh/cells_be64.loh new file mode 100755 index 0000000..ff5fc7d --- /dev/null +++ b/iup/srclua5/loh/cells_be64.loh @@ -0,0 +1,64 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/cells_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/cells_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64, 99,101,108,108,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 29, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 64, 2, 0, 73, 0,194,131, 73,128,194,132, 73, + 0,195,133, 73,128,195,134, 73,128,195,135, 73, 64, 65,136, 73, 64,193,136, 73, + 0, 67,137, 73, 0,195,137, 9, 64, 0,131, 9, 64, 69,138,100, 0, 0, 0, 9, + 64, 0,139,100, 64, 0, 0, 9, 64,128,139, 69, 0, 6, 0,128, 0, 0, 0, 92, + 64, 0, 1, 69, 64, 6, 0,128, 0, 0, 0,193,128, 6, 0, 92, 64,128, 1, 30, + 0,128, 0, 27, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99,101,108,108,115, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0,109,111,117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 4, 8, 0, + 0, 0, 0, 0, 0, 0,110,110,110,110,110,110,115, 0, 4, 15, 0, 0, 0, 0, + 0, 0, 0,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,110,110,110,110,115, 0, 4, 13, 0, 0, 0, 0, 0, + 0, 0,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,110,110, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,119,105,100,116, +104, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 10, 0, 0, + 0, 0, 0, 0, 0,104,101,105,103,104,116, 95, 99, 98, 0, 4, 10, 0, 0, 0, + 0, 0, 0, 0,110,108,105,110,101,115, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0,110, 99,111,108,115, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0,104,115,112, 97,110, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,118, +115,112, 97,110, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99, +108,117,100,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 99,101,108, +108,115, 46,104, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114,101,100,114, 97,119, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 0, 1, 0, 2, 2, 0, 0, 0, + 9, 64, 64,128, 30, 0,128, 0, 2, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, + 0,114,101,112, 97,105,110,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 89, 69, + 83, 0, 0, 0, 0, 0, 2, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 1, 0, + 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, + 0, 29, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 67,101,108,108,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, + 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 29, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, + 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, + 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 25, 0, 0, 0, 23, 0, + 0, 0, 29, 0, 0, 0, 27, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, + 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 17, + 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/cells_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/cells_le64.loh b/iup/srclua5/loh/cells_le64.loh new file mode 100755 index 0000000..0a49dbc --- /dev/null +++ b/iup/srclua5/loh/cells_le64.loh @@ -0,0 +1,64 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/cells_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/cells_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64, 99,101,108,108,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 29, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 64, 2, 0, 73, 0,194,131, 73,128,194,132, 73, + 0,195,133, 73,128,195,134, 73,128,195,135, 73, 64, 65,136, 73, 64,193,136, 73, + 0, 67,137, 73, 0,195,137, 9, 64, 0,131, 9, 64, 69,138,100, 0, 0, 0, 9, + 64, 0,139,100, 64, 0, 0, 9, 64,128,139, 69, 0, 6, 0,128, 0, 0, 0, 92, + 64, 0, 1, 69, 64, 6, 0,128, 0, 0, 0,193,128, 6, 0, 92, 64,128, 1, 30, + 0,128, 0, 27, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99,101,108,108,115, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0,109,111,117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 4, 8, 0, + 0, 0, 0, 0, 0, 0,110,110,110,110,110,110,115, 0, 4, 15, 0, 0, 0, 0, + 0, 0, 0,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,110,110,110,110,115, 0, 4, 13, 0, 0, 0, 0, 0, + 0, 0,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,110,110, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,119,105,100,116, +104, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 10, 0, 0, + 0, 0, 0, 0, 0,104,101,105,103,104,116, 95, 99, 98, 0, 4, 10, 0, 0, 0, + 0, 0, 0, 0,110,108,105,110,101,115, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0,110, 99,111,108,115, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0,104,115,112, 97,110, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,118, +115,112, 97,110, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99, +108,117,100,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 99,101,108, +108,115, 46,104, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114,101,100,114, 97,119, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 0, 1, 0, 2, 2, 0, 0, 0, + 9, 64, 64,128, 30, 0,128, 0, 2, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, + 0,114,101,112, 97,105,110,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 89, 69, + 83, 0, 0, 0, 0, 0, 2, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 1, 0, + 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, + 0, 29, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 67,101,108,108,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, + 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 29, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, + 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, + 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 25, 0, 0, 0, 23, 0, + 0, 0, 29, 0, 0, 0, 27, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, + 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 17, + 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/cells_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/cells_le64w.loh b/iup/srclua5/loh/cells_le64w.loh new file mode 100755 index 0000000..ed300df --- /dev/null +++ b/iup/srclua5/loh/cells_le64w.loh @@ -0,0 +1,64 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/cells_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/cells_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64, 99,101,108,108,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 29, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 64, 2, 0, 73, 0,194,131, 73,128,194,132, 73, + 0,195,133, 73,128,195,134, 73,128,195,135, 73, 64, 65,136, 73, 64,193,136, 73, + 0, 67,137, 73, 0,195,137, 9, 64, 0,131, 9, 64, 69,138,100, 0, 0, 0, 9, + 64, 0,139,100, 64, 0, 0, 9, 64,128,139, 69, 0, 6, 0,128, 0, 0, 0, 92, + 64, 0, 1, 69, 64, 6, 0,128, 0, 0, 0,193,128, 6, 0, 92, 64,128, 1, 30, + 0,128, 0, 27, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99,101,108,108,115, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0,109,111,117,115,101, 99,108,105, 99,107, 95, 99, 98, 0, 4, 8, 0, + 0, 0, 0, 0, 0, 0,110,110,110,110,110,110,115, 0, 4, 15, 0, 0, 0, 0, + 0, 0, 0,109,111,117,115,101,109,111,116,105,111,110, 95, 99, 98, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,110,110,110,110,115, 0, 4, 13, 0, 0, 0, 0, 0, + 0, 0,115, 99,114,111,108,108,105,110,103, 95, 99, 98, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0,110,110, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,119,105,100,116, +104, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 10, 0, 0, + 0, 0, 0, 0, 0,104,101,105,103,104,116, 95, 99, 98, 0, 4, 10, 0, 0, 0, + 0, 0, 0, 0,110,108,105,110,101,115, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0,110, 99,111,108,115, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0,104,115,112, 97,110, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,118, +115,112, 97,110, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99, +108,117,100,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 99,101,108, +108,115, 46,104, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114,101,100,114, 97,119, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 0, 1, 0, 2, 2, 0, 0, 0, + 9, 64, 64,128, 30, 0,128, 0, 2, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, + 0,114,101,112, 97,105,110,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 89, 69, + 83, 0, 0, 0, 0, 0, 2, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 1, 0, + 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, + 0, 29, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 67,101,108,108,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, + 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 29, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, + 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, + 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 25, 0, 0, 0, 23, 0, + 0, 0, 29, 0, 0, 0, 27, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, + 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 17, + 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/cells_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/clipboard.loh b/iup/srclua5/loh/clipboard.loh new file mode 100644 index 0000000..0f5d067 --- /dev/null +++ b/iup/srclua5/loh/clipboard.loh @@ -0,0 +1,36 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/clipboard.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/clipboard.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 15, 0, 0, 0, 64, 99,108,105, +112, 98,111, 97,114,100, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, + 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, + 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, + 5, 0, 0, 0,110,105, 99,107, 0, 4, 10, 0, 0, 0, 99,108,105,112, 98,111, + 97,114,100, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, + 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, + 0, 4, 10, 0, 0, 0, 67,108,105,112, 98,111, 97,114,100, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/clipboard.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/clipboard_be32.loh b/iup/srclua5/loh/clipboard_be32.loh new file mode 100755 index 0000000..96be360 --- /dev/null +++ b/iup/srclua5/loh/clipboard_be32.loh @@ -0,0 +1,36 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/clipboard_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/clipboard_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 15, 64, 99,108,105, +112, 98,111, 97,114,100, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 0, 0, 0, 17, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, + 0, 64, 9,130, 65, 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131, +128, 64, 9, 0, 2, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2, 64, 69, 0, + 0, 0,128, 0, 2,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 11, 4, + 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 10, 99,108,105,112, 98,111, + 97,114,100, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, + 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111, +110, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 2, 0, 3, 0, 0, 0, + 4, 0, 0, 0,133, 0,128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, + 1, 4, 0, 0, 0, 10, 67,108,105,112, 98,111, 97,114,100, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, + 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, + 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, + 0, 5, 99,116,114,108, 0, 0, 0, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/clipboard_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/clipboard_be64.loh b/iup/srclua5/loh/clipboard_be64.loh new file mode 100644 index 0000000..b7566e7 --- /dev/null +++ b/iup/srclua5/loh/clipboard_be64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/clipboard_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/clipboard_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64, 99,108,105,112, 98,111, 97,114,100, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, + 0, 0, 0, 9, 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, + 64, 2, 0,128, 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0, 99,108,105,112, 98,111, 97,114,100, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, + 0, 14, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, + 0, 0, 67,108,105,112, 98,111, 97,114,100, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 14, 0, + 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/clipboard_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/clipboard_le64.loh b/iup/srclua5/loh/clipboard_le64.loh new file mode 100755 index 0000000..f4f856b --- /dev/null +++ b/iup/srclua5/loh/clipboard_le64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/clipboard_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/clipboard_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64, 99,108,105,112, 98,111, 97,114,100, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, + 0, 0, 0, 9, 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, + 64, 2, 0,128, 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0, 99,108,105,112, 98,111, 97,114,100, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, + 0, 14, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, + 0, 0, 67,108,105,112, 98,111, 97,114,100, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 14, 0, + 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/clipboard_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/colorbar.loh b/iup/srclua5/loh/colorbar.loh new file mode 100755 index 0000000..73e4cc3 --- /dev/null +++ b/iup/srclua5/loh/colorbar.loh @@ -0,0 +1,53 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/colorbar.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/colorbar.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 14, 0, 0, 0, 64, 99,111,108, +111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 31, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 1, 0, 73, 0,194,131,138, 64,128, 0,193,128, + 2, 0,137, 0,195,133,162, 64,128, 0, 73,128,128,132, 73, 0,194,134, 73,128, + 66,135, 9, 64, 0,131, 9, 0,196,135, 9,128,196,136, 65, 0, 5, 0, 71,192, + 4, 0, 65,128, 5, 0, 71, 64, 5, 0,100, 0, 0, 0, 9, 64,128,139, 69, 0, + 6, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 6, 0,128, 0, 0, 0,193,128, + 6, 0, 92, 64,128, 1, 30, 0,128, 0, 27, 0, 0, 0, 4, 5, 0, 0, 0,110, +105, 99,107, 0, 4, 9, 0, 0, 0, 99,111,108,111,114, 98, 97,114, 0, 4, 7, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, + 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, + 0, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, + 0,115,101,108,101, 99,116, 95, 99, 98, 0, 4, 3, 0, 0, 0,110,110, 0, 4, + 8, 0, 0, 0, 99,101,108,108, 95, 99, 98, 0, 4, 2, 0, 0, 0,110, 0, 4, + 4, 0, 0, 0,114,101,116, 0, 4, 2, 0, 0, 0,115, 0, 4, 10, 0, 0, 0, +115,119,105,116, 99,104, 95, 99, 98, 0, 4, 12, 0, 0, 0,101,120,116,101,110, +100,101,100, 95, 99, 98, 0, 4, 9, 0, 0, 0,102,117,110, 99,110, 97,109,101, + 0, 4, 9, 0, 0, 0, 67,111,108,111,114, 98, 97,114, 0, 4, 8, 0, 0, 0, +105,110, 99,108,117,100,101, 0, 4, 14, 0, 0, 0,105,117,112, 99,111,110,116, +114,111,108,115, 46,104, 0, 4, 8, 0, 0, 0, 80, 82, 73, 77, 65, 82, 89, 0, + 3, 0, 0, 0, 0, 0, 0,240,191, 4, 10, 0, 0, 0, 83, 69, 67, 79, 78, 68, + 65, 82, 89, 0, 3, 0, 0, 0, 0, 0, 0, 0,192, 4, 14, 0, 0, 0, 99,114, +101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, + 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, + 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, + 23, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, +157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 9, 0, 0, + 0, 67,111,108,111,114, 98, 97,114, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111, +110, 0, 0, 0, 0, 0, 5, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, + 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, + 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, + 15, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 23, 0, 0, 0, 21, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 17, 0, 0, 0, 30, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/colorbar.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/colorbar_be32.loh b/iup/srclua5/loh/colorbar_be32.loh new file mode 100755 index 0000000..0d516ae --- /dev/null +++ b/iup/srclua5/loh/colorbar_be32.loh @@ -0,0 +1,49 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/colorbar_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/colorbar_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 14, 64, 99,111,108, +111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 0, 0, 0, 27, 0, 1,128, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, + 64, 9,130, 65, 64, 9, 0, 1, 0, 74,131,194, 0, 73, 0,128, 64,138, 0, 2, +128,193,133,195, 0,137, 0,128, 64,162,132,128,128, 73,134,194, 0, 73,135, 66, +128, 73,131, 0, 64, 9,135,196, 0, 9,136,196,128, 9, 0, 0, 0,100,137,128, + 64, 9, 0, 5, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 5, 64, 69, 0, 0, + 0,128, 0, 5,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 23, 4, 0, + 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 9, 99,111,108,111,114, 98, 97, +114, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, + 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, + 4, 0, 0, 0, 10,115,101,108,101, 99,116, 95, 99, 98, 0, 4, 0, 0, 0, 3, +110,110, 0, 4, 0, 0, 0, 8, 99,101,108,108, 95, 99, 98, 0, 4, 0, 0, 0, + 2,110, 0, 4, 0, 0, 0, 4,114,101,116, 0, 4, 0, 0, 0, 2,115, 0, 4, + 0, 0, 0, 10,115,119,105,116, 99,104, 95, 99, 98, 0, 4, 0, 0, 0, 12,101, +120,116,101,110,100,101,100, 95, 99, 98, 0, 4, 0, 0, 0, 9,102,117,110, 99, +110, 97,109,101, 0, 4, 0, 0, 0, 9, 67,111,108,111,114, 98, 97,114, 0, 4, + 0, 0, 0, 8,105,110, 99,108,117,100,101, 0, 4, 0, 0, 0, 14,105,117,112, + 99,111,108,111,114, 98, 97,114, 46,104, 0, 4, 0, 0, 0, 14, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101, +103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117, +112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119, +105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, + 0, 20, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0,192, 64,198, 1, 0, + 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 9, 67, +111,108,111,114, 98, 97,114, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, + 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, + 0, 15, 0, 0, 0, 20, 0, 0, 0, 18, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, + 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, + 0, 23, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 17, 0, + 0, 0, 26, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/colorbar_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/colorbar_be64.loh b/iup/srclua5/loh/colorbar_be64.loh new file mode 100755 index 0000000..e16bce6 --- /dev/null +++ b/iup/srclua5/loh/colorbar_be64.loh @@ -0,0 +1,59 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/colorbar_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/colorbar_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 31, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 1, 0, 73, 0,194,131,138, 64, +128, 0,193,128, 2, 0,137, 0,195,133,162, 64,128, 0, 73,128,128,132, 73, 0, +194,134, 73,128, 66,135, 9, 64, 0,131, 9, 0,196,135, 9,128,196,136, 65, 0, + 5, 0, 71,192, 4, 0, 65,128, 5, 0, 71, 64, 5, 0,100, 0, 0, 0, 9, 64, +128,139, 69, 0, 6, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 6, 0,128, 0, + 0, 0,193,128, 6, 0, 92, 64,128, 1, 30, 0,128, 0, 27, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99,111,108,111,114, 98, 97,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, + 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, + 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,115,101,108, +101, 99,116, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 99,101,108,108, 95, 99, 98, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, +115,119,105,116, 99,104, 95, 99, 98, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,101, +120,116,101,110,100,101,100, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99,110, 97,109,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 67,111, +108,111,114, 98, 97,114, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108, +117,100,101, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,105,117,112, 99,111,108,111, +114, 98, 97,114, 46,104, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 80, 82, 73, 77, + 65, 82, 89, 0, 3, 0, 0, 0, 0, 0, 0,240,191, 4, 10, 0, 0, 0, 0, 0, + 0, 0, 83, 69, 67, 79, 78, 68, 65, 82, 89, 0, 3, 0, 0, 0, 0, 0, 0, 0, +192, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 21, 0, 0, 0, 23, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0, +133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 98, 97, +114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, + 0, 0, 23, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, + 10, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, + 14, 0, 0, 0, 15, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 23, 0, 0, 0, 21, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, + 26, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, + 0, 17, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/colorbar_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/colorbar_le64.loh b/iup/srclua5/loh/colorbar_le64.loh new file mode 100755 index 0000000..83d07b1 --- /dev/null +++ b/iup/srclua5/loh/colorbar_le64.loh @@ -0,0 +1,55 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/colorbar_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/colorbar_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 27, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 1, 0, 73, 0,194,131,138, 64, +128, 0,193,128, 2, 0,137, 0,195,133,162, 64,128, 0, 73,128,128,132, 73, 0, +194,134, 73,128, 66,135, 9, 64, 0,131, 9, 0,196,135, 9,128,196,136,100, 0, + 0, 0, 9, 64,128,137, 69, 0, 5, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, + 5, 0,128, 0, 0, 0,193,128, 5, 0, 92, 64,128, 1, 30, 0,128, 0, 23, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,111,108,111,114, 98, 97,114, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, + 0,115,101,108,101, 99,116, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, +110,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 99,101,108,108, 95, 99, 98, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, +114,101,116, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 10, 0, 0, 0, + 0, 0, 0, 0,115,119,105,116, 99,104, 95, 99, 98, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,101,120,116,101,110,100,101,100, 95, 99, 98, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 67,111,108,111,114, 98, 97,114, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, +105,110, 99,108,117,100,101, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,105,117,112, + 99,111,108,111,114, 98, 97,114, 46,104, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, + 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115, +115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101, +116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 20, 0, + 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, + 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 67,111,108,111,114, 98, 97,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 97, 99,116,105,111,110, 0, 0, 0, 0, 0, 5, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, + 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 11, 0, + 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 20, 0, + 0, 0, 18, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, + 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 17, 0, 0, 0, 26, + 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/colorbar_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/colorbar_le64w.loh b/iup/srclua5/loh/colorbar_le64w.loh new file mode 100755 index 0000000..c599965 --- /dev/null +++ b/iup/srclua5/loh/colorbar_le64w.loh @@ -0,0 +1,59 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/colorbar_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/colorbar_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,108,111,114, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 31, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 1, 0, 73, 0,194,131,138, 64, +128, 0,193,128, 2, 0,137, 0,195,133,162, 64,128, 0, 73,128,128,132, 73, 0, +194,134, 73,128, 66,135, 9, 64, 0,131, 9, 0,196,135, 9,128,196,136, 65, 0, + 5, 0, 71,192, 4, 0, 65,128, 5, 0, 71, 64, 5, 0,100, 0, 0, 0, 9, 64, +128,139, 69, 0, 6, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 6, 0,128, 0, + 0, 0,193,128, 6, 0, 92, 64,128, 1, 30, 0,128, 0, 27, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99,111,108,111,114, 98, 97,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, + 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, + 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,115,101,108, +101, 99,116, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 99,101,108,108, 95, 99, 98, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, +115,119,105,116, 99,104, 95, 99, 98, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,101, +120,116,101,110,100,101,100, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99,110, 97,109,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 67,111, +108,111,114, 98, 97,114, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108, +117,100,101, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,105,117,112, 99,111,108,111, +114, 98, 97,114, 46,104, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 80, 82, 73, 77, + 65, 82, 89, 0, 3, 0, 0, 0, 0, 0, 0,240,191, 4, 10, 0, 0, 0, 0, 0, + 0, 0, 83, 69, 67, 79, 78, 68, 65, 82, 89, 0, 3, 0, 0, 0, 0, 0, 0, 0, +192, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 21, 0, 0, 0, 23, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0, +133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 98, 97, +114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, + 0, 0, 23, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, + 10, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, + 14, 0, 0, 0, 15, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 23, 0, 0, 0, 21, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, + 26, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, + 0, 17, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/colorbar_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/colorbrowser.loh b/iup/srclua5/loh/colorbrowser.loh new file mode 100755 index 0000000..9dd12d5 --- /dev/null +++ b/iup/srclua5/loh/colorbrowser.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/colorbrowser.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/colorbrowser.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 18, 0, 0, 0, 64, 99,111,108, +111,114, 98,114,111,119,115,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 21, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0,194,131, 73, 0, +194,132, 9, 64, 0,131, 9,192, 66,133, 9, 64, 67,134,100, 0, 0, 0, 9, 64, + 0,135, 69,192, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 0, 4, 0,128, 0, + 0, 0,193, 64, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 18, 0, 0, 0, 4, 5, + 0, 0, 0,110,105, 99,107, 0, 4, 13, 0, 0, 0, 99,111,108,111,114, 98,114, +111,119,115,101,114, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 1, 0, 0, 0, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, + 97, 99,107, 0, 4, 8, 0, 0, 0,100,114, 97,103, 95, 99, 98, 0, 4, 4, 0, + 0, 0, 99, 99, 99, 0, 4, 10, 0, 0, 0, 99,104, 97,110,103,101, 95, 99, 98, + 0, 4, 9, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 13, 0, 0, 0, + 67,111,108,111,114, 66,114,111,119,115,101,114, 0, 4, 8, 0, 0, 0,105,110, + 99,108,117,100,101, 0, 4, 14, 0, 0, 0,105,117,112, 99,111,110,116,114,111, +108,115, 46,104, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, + 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, + 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 2, 0, 4, + 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, + 30, 0,128, 0, 2, 0, 0, 0, 4, 13, 0, 0, 0, 67,111,108,111,114, 66,114, +111,119,115,101,114, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 18, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, + 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, + 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, + 16, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, + 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, + 5, 0, 0, 0, 99,116,114,108, 0, 11, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, + 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/colorbrowser.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/colorbrowser_be32.loh b/iup/srclua5/loh/colorbrowser_be32.loh new file mode 100755 index 0000000..fff8f43 --- /dev/null +++ b/iup/srclua5/loh/colorbrowser_be32.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/colorbrowser_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/colorbrowser_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 18, 64, 99,111,108, +111,114, 98,114,111,119,115,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 0, 0, 0, 21, 0, 1,128, 10,128, 64, 64, 9, 0, 0, +192, 69,129, 0, 64, 9,130, 65, 64, 9, 0, 0,128, 74,131,194, 0, 73,132,194, + 0, 73,131, 0, 64, 9,133, 66,192, 9,134, 67, 64, 9, 0, 0, 0,100,135, 0, + 64, 9, 0, 3,192, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 4, 0, 69, 0, 0, + 0,128, 0, 4, 64,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 18, 4, 0, + 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 13, 99,111,108,111,114, 98,114, +111,119,115,101,114, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116, +105,111,110, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, + 97, 99,107, 0, 4, 0, 0, 0, 8,100,114, 97,103, 95, 99, 98, 0, 4, 0, 0, + 0, 4, 99, 99, 99, 0, 4, 0, 0, 0, 10, 99,104, 97,110,103,101, 95, 99, 98, + 0, 4, 0, 0, 0, 9,102,117,110, 99,110, 97,109,101, 0, 4, 0, 0, 0, 13, + 67,111,108,111,114, 66,114,111,119,115,101,114, 0, 4, 0, 0, 0, 8,105,110, + 99,108,117,100,101, 0, 4, 0, 0, 0, 8,105,117,112, 99, 98, 46,104, 0, 4, + 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, + 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, + 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, + 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, + 0,133, 0,192, 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, + 0, 2, 4, 0, 0, 0, 13, 67,111,108,111,114, 66,114,111,119,115,101,114, 0, + 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, + 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 21, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, + 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, + 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 99,116, +114,108, 0, 0, 0, 0, 11, 0, 0, 0, 20, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/colorbrowser_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/colorbrowser_be64.loh b/iup/srclua5/loh/colorbrowser_be64.loh new file mode 100755 index 0000000..0f25250 --- /dev/null +++ b/iup/srclua5/loh/colorbrowser_be64.loh @@ -0,0 +1,49 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/colorbrowser_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/colorbrowser_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 18, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,108,111,114, 98,114,111,119,115,101,114, 46,108,117, 97, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 21, 0, 0, 0, 10,128, 1, 0, 9, 64, + 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0, +194,131, 73, 0,194,132, 9, 64, 0,131, 9,192, 66,133, 9, 64, 67,134,100, 0, + 0, 0, 9, 64, 0,135, 69,192, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 0, + 4, 0,128, 0, 0, 0,193, 64, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 18, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 13, 0, 0, + 0, 0, 0, 0, 0, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, + 0, 0, 0, 0, 0,100,114, 97,103, 95, 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, + 0, 0, 99, 99, 99, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99,104, 97,110,103, +101, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97, +109,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 66,114,111, +119,115,101,114, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100, +101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,117,112, 99, 98, 46,104, 0, 4, + 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110, +116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, + 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, + 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 66,114,111,119, +115,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 18, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 21, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, + 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116, +114,108, 0, 11, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/colorbrowser_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/colorbrowser_le64.loh b/iup/srclua5/loh/colorbrowser_le64.loh new file mode 100755 index 0000000..5ea6381 --- /dev/null +++ b/iup/srclua5/loh/colorbrowser_le64.loh @@ -0,0 +1,49 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/colorbrowser_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/colorbrowser_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 18, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,108,111,114, 98,114,111,119,115,101,114, 46,108,117, 97, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 21, 0, 0, 0, 10,128, 1, 0, 9, 64, + 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0, +194,131, 73, 0,194,132, 9, 64, 0,131, 9,192, 66,133, 9, 64, 67,134,100, 0, + 0, 0, 9, 64, 0,135, 69,192, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 0, + 4, 0,128, 0, 0, 0,193, 64, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 18, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 13, 0, 0, + 0, 0, 0, 0, 0, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, + 0, 0, 0, 0, 0,100,114, 97,103, 95, 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, + 0, 0, 99, 99, 99, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99,104, 97,110,103, +101, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97, +109,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 66,114,111, +119,115,101,114, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100, +101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,117,112, 99, 98, 46,104, 0, 4, + 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110, +116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, + 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, + 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 66,114,111,119, +115,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 18, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 21, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, + 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116, +114,108, 0, 11, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/colorbrowser_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/colorbrowser_le64w.loh b/iup/srclua5/loh/colorbrowser_le64w.loh new file mode 100755 index 0000000..f4625d8 --- /dev/null +++ b/iup/srclua5/loh/colorbrowser_le64w.loh @@ -0,0 +1,49 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/colorbrowser_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/colorbrowser_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 18, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,108,111,114, 98,114,111,119,115,101,114, 46,108,117, 97, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 21, 0, 0, 0, 10,128, 1, 0, 9, 64, + 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0, +194,131, 73, 0,194,132, 9, 64, 0,131, 9,192, 66,133, 9, 64, 67,134,100, 0, + 0, 0, 9, 64, 0,135, 69,192, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 0, + 4, 0,128, 0, 0, 0,193, 64, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 18, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 13, 0, 0, + 0, 0, 0, 0, 0, 99,111,108,111,114, 98,114,111,119,115,101,114, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, + 0, 0, 0, 0, 0,100,114, 97,103, 95, 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, + 0, 0, 99, 99, 99, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99,104, 97,110,103, +101, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97, +109,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 66,114,111, +119,115,101,114, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100, +101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,117,112, 99, 98, 46,104, 0, 4, + 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110, +116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, + 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, + 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 66,114,111,119, +115,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 18, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 21, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, + 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116, +114,108, 0, 11, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/colorbrowser_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/colordlg.loh b/iup/srclua5/loh/colordlg.loh new file mode 100755 index 0000000..4bff37b --- /dev/null +++ b/iup/srclua5/loh/colordlg.loh @@ -0,0 +1,54 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/colordlg.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/colordlg.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 14, 0, 0, 0, 64, 99,111,108, +111,114,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, 0,132,100, 0, + 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133,100,128, 0, 0, 9, 64, +128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, + 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, + 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, 0, 99,111,108,111,114,100,108, +103, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 1, 0, 0, 0, 0, 4, 9, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, + 4, 9, 0, 0, 0, 67,111,108,111,114, 68,108,103, 0, 4, 9, 0, 0, 0, 99, + 97,108,108, 98, 97, 99,107, 0, 4, 6, 0, 0, 0,112,111,112,117,112, 0, 4, + 8, 0, 0, 0,100,101,115,116,114,111,121, 0, 4, 14, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32, +119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, + 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, + 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, 0, 4, + 6, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, 13, 0, + 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, + 0, 0, 3, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 2, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, + 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, + 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, + 0, 4, 8, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, + 0, 0, 1, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 9, 0, 0, 0, 67,111,108,111,114, 68, +108,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, + 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, + 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, + 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, + 0, 22, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 21, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/colordlg.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/colordlg_be32.loh b/iup/srclua5/loh/colordlg_be32.loh new file mode 100755 index 0000000..166799a --- /dev/null +++ b/iup/srclua5/loh/colordlg_be32.loh @@ -0,0 +1,54 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/colordlg_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/colordlg_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 14, 64, 99,111,108, +111,114,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 0, 0, 0, 22, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, + 64, 9,130, 65, 64, 9,131, 65,192, 9, 0, 0, 0, 74,132, 0, 64, 9, 0, 0, + 0,100,132,128, 64, 9, 0, 0, 64,100,133, 0, 64, 9, 0, 0,128,100,133,128, + 64, 9, 0, 3, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 3, 64, 69, 0, 0, + 0,128, 0, 3,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 15, 4, 0, + 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 9, 99,111,108,111,114,100,108, +103, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, + 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 9,102,117,110, 99,110, 97,109,101, 0, + 4, 0, 0, 0, 9, 67,111,108,111,114, 68,108,103, 0, 4, 0, 0, 0, 9, 99, + 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 6,112,111,112,117,112, 0, 4, + 0, 0, 0, 8,100,101,115,116,114,111,121, 0, 4, 0, 0, 0, 14, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32, +119,105,100,103,101,116, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 12, 0, + 0, 0, 14, 0, 3, 0, 7, 0, 0, 0, 6, 0, 0, 0,197, 0, 0, 1, 0, 0, +128, 1, 64, 1, 0, 1,128, 2, 0, 64,220, 0,128, 0, 30, 0, 0, 0, 1, 4, + 0, 0, 0, 6, 80,111,112,117,112, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, + 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 14, 0, 0, 0, 3, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 2,120, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 2,121, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 1, 0, 3, 0, 0, 0, 5, 0, 0, 0, + 69, 0, 0, 0,128, 1, 0, 0, 93, 0, 0, 0, 94, 0,128, 0, 30, 0, 0, 0, + 1, 4, 0, 0, 0, 8, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, + 0, 18, 0, 0, 0, 1, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, + 22, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0,133, 0,128, 0,157, 0, 0, 0, +158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 9, 67,111,108,111,114, 68, +108,103, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 18, 0, 0, 0, + 16, 0, 0, 0, 22, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, + 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 8, 0, 0, + 0, 21, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/colordlg_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/colordlg_be64.loh b/iup/srclua5/loh/colordlg_be64.loh new file mode 100755 index 0000000..90f29eb --- /dev/null +++ b/iup/srclua5/loh/colordlg_be64.loh @@ -0,0 +1,60 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/colordlg_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/colordlg_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,108,111,114,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, + 0,132,100, 0, 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133,100,128, + 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, + 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,111,108,111,114,100,108,103, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 67,111,108,111,114, 68,108,103, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, + 97,108,108, 98, 97, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112, +117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, + 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, + 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80,111,112,117, +112, 0, 0, 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, + 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 1, 0, + 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 68,101, +115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 67,111, +108,111,114, 68,108,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 21, 0, 0, 0, 21, + 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, + 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, + 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, + 0, 12, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, 0, 20, 0, 0, + 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 21, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/colordlg_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/colordlg_le64.loh b/iup/srclua5/loh/colordlg_le64.loh new file mode 100755 index 0000000..834a8bd --- /dev/null +++ b/iup/srclua5/loh/colordlg_le64.loh @@ -0,0 +1,60 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/colordlg_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/colordlg_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,108,111,114,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, + 0,132,100, 0, 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133,100,128, + 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, + 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,111,108,111,114,100,108,103, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 67,111,108,111,114, 68,108,103, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, + 97,108,108, 98, 97, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112, +117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, + 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, + 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80,111,112,117, +112, 0, 0, 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, + 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 1, 0, + 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 68,101, +115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 67,111, +108,111,114, 68,108,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 21, 0, 0, 0, 21, + 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, + 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, + 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, + 0, 12, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, 0, 20, 0, 0, + 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 21, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/colordlg_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/colordlg_le64w.loh b/iup/srclua5/loh/colordlg_le64w.loh new file mode 100755 index 0000000..6a612da --- /dev/null +++ b/iup/srclua5/loh/colordlg_le64w.loh @@ -0,0 +1,60 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/colordlg_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/colordlg_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,108,111,114,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, + 0,132,100, 0, 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133,100,128, + 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, + 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,111,108,111,114,100,108,103, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 67,111,108,111,114, 68,108,103, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, + 97,108,108, 98, 97, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112, +117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, + 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, + 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80,111,112,117, +112, 0, 0, 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, + 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 1, 0, + 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 68,101, +115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 67,111, +108,111,114, 68,108,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 21, 0, 0, 0, 21, + 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, + 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, + 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, + 0, 12, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, 0, 20, 0, 0, + 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 21, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/colordlg_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/constants.loh b/iup/srclua5/loh/constants.loh new file mode 100755 index 0000000..a84103c --- /dev/null +++ b/iup/srclua5/loh/constants.loh @@ -0,0 +1,102 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/constants.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/constants.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 15, 0, 0, 0, 64, 99,111,110, +115,116, 97,110,116,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2,102, 0, 0, 0, 1, 64, 0, 0, 7, 0, 0, 0, 1,192, 0, 0, 7, +128, 0, 0, 1, 64, 1, 0, 7, 0, 1, 0, 1, 64, 1, 0, 7,128, 1, 0, 1, + 64, 1, 0, 7,192, 1, 0, 1, 64, 2, 0, 7, 0, 2, 0, 1,192, 2, 0, 7, +128, 2, 0, 1, 64, 3, 0, 7, 0, 3, 0, 1,192, 3, 0, 7,128, 3, 0, 1, + 64, 4, 0, 7, 0, 4, 0, 1,192, 4, 0, 7,128, 4, 0, 1, 64, 5, 0, 7, + 0, 5, 0, 1,192, 5, 0, 7,128, 5, 0, 1, 64, 6, 0, 7, 0, 6, 0, 5, + 0, 4, 0, 7,128, 6, 0, 5,128, 4, 0, 7,192, 6, 0, 1,192, 0, 0, 7, + 0, 7, 0, 1, 64, 0, 0, 7, 64, 7, 0, 1,192, 7, 0, 7,128, 7, 0, 1, + 64, 8, 0, 7, 0, 8, 0, 1,192, 8, 0, 7,128, 8, 0, 1, 64, 9, 0, 7, + 0, 9, 0, 1,192, 9, 0, 7,128, 9, 0, 1, 64, 10, 0, 7, 0, 10, 0, 1, +192, 10, 0, 7,128, 10, 0, 1, 64, 11, 0, 7, 0, 11, 0, 1,192, 11, 0, 7, +128, 11, 0, 1, 64, 12, 0, 7, 0, 12, 0, 1,192, 0, 0, 7,128, 12, 0, 1, + 64, 0, 0, 7,192, 12, 0, 1,192, 7, 0, 7, 0, 13, 0, 1, 64, 8, 0, 7, + 64, 13, 0, 1,192, 8, 0, 7,128, 13, 0, 5, 0, 14, 0, 6, 64, 78, 0, 65, +128, 14, 0, 28,128, 0, 1, 7,192, 13, 0, 5, 0, 14, 0, 6, 64, 78, 0, 65, + 0, 15, 0, 28,128, 0, 1, 7,192, 14, 0, 5, 0, 14, 0, 6, 64, 78, 0, 65, +128, 15, 0, 28,128, 0, 1, 7, 64, 15, 0, 5, 0, 14, 0, 6, 64, 78, 0, 65, + 0, 16, 0, 28,128, 0, 1, 7,192, 15, 0, 5, 0, 14, 0, 6, 64, 78, 0, 65, +128, 16, 0, 28,128, 0, 1, 7, 64, 16, 0, 1, 0, 17, 0, 7,192, 16, 0, 1, +128, 17, 0, 7, 64, 17, 0, 1, 0, 18, 0, 7,192, 17, 0, 1,128, 18, 0, 7, + 64, 18, 0, 1, 0, 19, 0, 7,192, 18, 0, 30, 0,128, 0, 77, 0, 0, 0, 4, + 6, 0, 0, 0, 69, 82, 82, 79, 82, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, + 8, 0, 0, 0, 78, 79, 69, 82, 82, 79, 82, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 7, 0, 0, 0, 79, 80, 69, 78, 69, 68, 0, 3, 0, 0, 0, 0, 0, 0, +240,191, 4, 8, 0, 0, 0, 73, 78, 86, 65, 76, 73, 68, 0, 4, 7, 0, 0, 0, + 73, 71, 78, 79, 82, 69, 0, 4, 8, 0, 0, 0, 68, 69, 70, 65, 85, 76, 84, 0, + 3, 0, 0, 0, 0, 0, 0, 0,192, 4, 6, 0, 0, 0, 67, 76, 79, 83, 69, 0, + 3, 0, 0, 0, 0, 0, 0, 8,192, 4, 9, 0, 0, 0, 67, 79, 78, 84, 73, 78, + 85, 69, 0, 3, 0, 0, 0, 0, 0, 0, 16,192, 4, 7, 0, 0, 0, 67, 69, 78, + 84, 69, 82, 0, 3, 0, 0, 0, 0,224,255,239, 64, 4, 5, 0, 0, 0, 76, 69, + 70, 84, 0, 3, 0, 0, 0, 0,192,255,239, 64, 4, 6, 0, 0, 0, 82, 73, 71, + 72, 84, 0, 3, 0, 0, 0, 0,160,255,239, 64, 4, 9, 0, 0, 0, 77, 79, 85, + 83, 69, 80, 79, 83, 0, 3, 0, 0, 0, 0,128,255,239, 64, 4, 8, 0, 0, 0, + 67, 85, 82, 82, 69, 78, 84, 0, 3, 0, 0, 0, 0, 96,255,239, 64, 4, 13, 0, + 0, 0, 67, 69, 78, 84, 69, 82, 80, 65, 82, 69, 78, 84, 0, 3, 0, 0, 0, 0, + 64,255,239, 64, 4, 4, 0, 0, 0, 84, 79, 80, 0, 4, 7, 0, 0, 0, 66, 79, + 84, 84, 79, 77, 0, 4, 5, 0, 0, 0, 83, 66, 85, 80, 0, 4, 5, 0, 0, 0, + 83, 66, 68, 78, 0, 4, 7, 0, 0, 0, 83, 66, 80, 71, 85, 80, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 64, 4, 7, 0, 0, 0, 83, 66, 80, 71, 68, 78, 0, 3, 0, + 0, 0, 0, 0, 0, 8, 64, 4, 7, 0, 0, 0, 83, 66, 80, 79, 83, 86, 0, 3, + 0, 0, 0, 0, 0, 0, 16, 64, 4, 8, 0, 0, 0, 83, 66, 68, 82, 65, 71, 86, + 0, 3, 0, 0, 0, 0, 0, 0, 20, 64, 4, 7, 0, 0, 0, 83, 66, 76, 69, 70, + 84, 0, 3, 0, 0, 0, 0, 0, 0, 24, 64, 4, 8, 0, 0, 0, 83, 66, 82, 73, + 71, 72, 84, 0, 3, 0, 0, 0, 0, 0, 0, 28, 64, 4, 9, 0, 0, 0, 83, 66, + 80, 71, 76, 69, 70, 84, 0, 3, 0, 0, 0, 0, 0, 0, 32, 64, 4, 10, 0, 0, + 0, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 3, 0, 0, 0, 0, 0, 0, 34, 64, + 4, 7, 0, 0, 0, 83, 66, 80, 79, 83, 72, 0, 3, 0, 0, 0, 0, 0, 0, 36, + 64, 4, 8, 0, 0, 0, 83, 66, 68, 82, 65, 71, 72, 0, 3, 0, 0, 0, 0, 0, + 0, 38, 64, 4, 5, 0, 0, 0, 83, 72, 79, 87, 0, 4, 8, 0, 0, 0, 82, 69, + 83, 84, 79, 82, 69, 0, 4, 9, 0, 0, 0, 77, 73, 78, 73, 77, 73, 90, 69, 0, + 4, 9, 0, 0, 0, 77, 65, 88, 73, 77, 73, 90, 69, 0, 4, 5, 0, 0, 0, 72, + 73, 68, 69, 0, 4, 8, 0, 0, 0, 66, 85, 84, 84, 79, 78, 49, 0, 4, 7, 0, + 0, 0,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0, 98,121,116,101, 0, 4, + 2, 0, 0, 0, 49, 0, 4, 8, 0, 0, 0, 66, 85, 84, 84, 79, 78, 50, 0, 4, + 2, 0, 0, 0, 50, 0, 4, 8, 0, 0, 0, 66, 85, 84, 84, 79, 78, 51, 0, 4, + 2, 0, 0, 0, 51, 0, 4, 8, 0, 0, 0, 66, 85, 84, 84, 79, 78, 52, 0, 4, + 2, 0, 0, 0, 52, 0, 4, 8, 0, 0, 0, 66, 85, 84, 84, 79, 78, 53, 0, 4, + 2, 0, 0, 0, 53, 0, 4, 11, 0, 0, 0, 77, 65, 83, 75, 95, 70, 76, 79, 65, + 84, 0, 4, 24, 0, 0, 0, 91, 43, 47, 45, 93, 63, 40, 47,100, 43, 47, 46, 63, + 47,100, 42,124, 47, 46, 47,100, 43, 41, 0, 4, 12, 0, 0, 0, 77, 65, 83, 75, + 95, 85, 70, 76, 79, 65, 84, 0, 4, 18, 0, 0, 0, 40, 47,100, 43, 47, 46, 63, + 47,100, 42,124, 47, 46, 47,100, 43, 41, 0, 4, 12, 0, 0, 0, 77, 65, 83, 75, + 95, 69, 70, 76, 79, 65, 84, 0, 4, 40, 0, 0, 0, 91, 43, 47, 45, 93, 63, 40, + 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, 43, 41, 40, 91,101, 69, + 93, 91, 43, 47, 45, 93, 63, 47,100, 43, 41, 63, 0, 4, 9, 0, 0, 0, 77, 65, + 83, 75, 95, 73, 78, 84, 0, 4, 10, 0, 0, 0, 91, 43, 47, 45, 93, 63, 47,100, + 43, 0, 4, 10, 0, 0, 0, 77, 65, 83, 75, 95, 85, 73, 78, 84, 0, 4, 4, 0, + 0, 0, 47,100, 43, 0, 0, 0, 0, 0,102, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 22, 0, + 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 24, 0, + 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 29, 0, + 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 36, 0, + 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 38, 0, 0, 0, 38, 0, + 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 41, 0, + 0, 0, 41, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, 0, 0, 43, 0, + 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 50, 0, + 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 52, 0, + 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 59, 0, + 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 60, 0, + 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 61, 0, + 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 62, 0, + 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 63, 0, + 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 68, 0, + 0, 0, 68, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 70, 0, 0, 0, 70, 0, + 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/constants.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/constants_be32.loh b/iup/srclua5/loh/constants_be32.loh new file mode 100755 index 0000000..eff05cc --- /dev/null +++ b/iup/srclua5/loh/constants_be32.loh @@ -0,0 +1,88 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/constants_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/constants_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 15, 64, 99,111,110, +115,116, 97,110,116,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 0, 0, 0, 92, 0, 0, 64, 1, 0, 0, 0, 7, 0, 0,192, 1, 0, + 0,128, 7, 0, 1, 64, 1, 0, 1, 0, 7, 0, 1,192, 1, 0, 1,128, 7, 0, + 2, 64, 1, 0, 2, 0, 7, 0, 2,192, 1, 0, 2,128, 7, 0, 3, 64, 1, 0, + 3, 0, 7, 0, 3,192, 1, 0, 3,128, 7, 0, 4, 64, 1, 0, 4, 0, 7, 0, + 4,192, 1, 0, 4,128, 7, 0, 2,128, 5, 0, 5, 0, 7, 0, 3, 0, 5, 0, + 5, 64, 7, 0, 5,192, 1, 0, 5,128, 7, 0, 6, 64, 1, 0, 6, 0, 7, 0, + 6,192, 1, 0, 6,128, 7, 0, 7, 64, 1, 0, 7, 0, 7, 0, 7,192, 1, 0, + 7,128, 7, 0, 8, 64, 1, 0, 8, 0, 7, 0, 8,192, 1, 0, 8,128, 7, 0, + 9, 64, 1, 0, 9, 0, 7, 0, 9,192, 1, 0, 9,128, 7, 0, 10, 64, 1, 0, + 10, 0, 7, 0, 10,192, 1, 0, 10,128, 7, 0, 11, 64, 1, 0, 11, 0, 7, 0, + 5,192, 1, 0, 11,128, 7, 0, 6, 64, 1, 0, 11,192, 7, 0, 6,192, 1, 0, + 12, 0, 7, 0, 7, 64, 1, 0, 12, 64, 7, 0, 7,192, 1, 0, 12,128, 7, 0, + 13, 0, 5, 0, 77, 64, 6, 0, 13,128, 65, 1, 0,128, 28, 0, 12,192, 7, 0, + 13, 0, 5, 0, 77, 64, 6, 0, 14, 0, 65, 1, 0,128, 28, 0, 13,192, 7, 0, + 13, 0, 5, 0, 77, 64, 6, 0, 14,128, 65, 1, 0,128, 28, 0, 14, 64, 7, 0, + 13, 0, 5, 0, 77, 64, 6, 0, 15, 0, 65, 1, 0,128, 28, 0, 14,192, 7, 0, + 13, 0, 5, 0, 77, 64, 6, 0, 15,128, 65, 1, 0,128, 28, 0, 15, 64, 7, 0, + 6, 64, 1, 0, 15,192, 7, 0, 5,192, 1, 0, 16, 0, 7, 0, 0, 64, 1, 0, + 16, 64, 7, 0, 0, 64, 1, 0, 16,128, 7, 0,128, 0, 30, 0, 0, 0, 67, 4, + 0, 0, 0, 7, 73, 71, 78, 79, 82, 69, 0, 3,191,240, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 8, 68, 69, 70, 65, 85, 76, 84, 0, 3,192, 0, 0, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 6, 67, 76, 79, 83, 69, 0, 3,192, 8, 0, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 9, 67, 79, 78, 84, 73, 78, 85, 69, 0, 3,192, 16, 0, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 7, 67, 69, 78, 84, 69, 82, 0, 3, 64,239, +255,224, 0, 0, 0, 0, 4, 0, 0, 0, 5, 76, 69, 70, 84, 0, 3, 64,239,255, +192, 0, 0, 0, 0, 4, 0, 0, 0, 6, 82, 73, 71, 72, 84, 0, 3, 64,239,255, +160, 0, 0, 0, 0, 4, 0, 0, 0, 9, 77, 79, 85, 83, 69, 80, 79, 83, 0, 3, + 64,239,255,128, 0, 0, 0, 0, 4, 0, 0, 0, 8, 67, 85, 82, 82, 69, 78, 84, + 0, 3, 64,239,255, 96, 0, 0, 0, 0, 4, 0, 0, 0, 13, 67, 69, 78, 84, 69, + 82, 80, 65, 82, 69, 78, 84, 0, 3, 64,239,255, 64, 0, 0, 0, 0, 4, 0, 0, + 0, 4, 84, 79, 80, 0, 4, 0, 0, 0, 7, 66, 79, 84, 84, 79, 77, 0, 4, 0, + 0, 0, 5, 83, 66, 85, 80, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 5, 83, 66, 68, 78, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 7, 83, 66, 80, 71, 85, 80, 0, 3, 64, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 7, 83, 66, 80, 71, 68, 78, 0, 3, 64, 8, 0, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 7, 83, 66, 80, 79, 83, 86, 0, 3, 64, 16, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 8, 83, 66, 68, 82, 65, 71, 86, 0, 3, 64, 20, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 7, 83, 66, 76, 69, 70, 84, 0, 3, 64, 24, 0, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 8, 83, 66, 82, 73, 71, 72, 84, 0, 3, 64, 28, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 9, 83, 66, 80, 71, 76, 69, 70, 84, 0, 3, 64, + 32, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 10, 83, 66, 80, 71, 82, 73, 71, 72, + 84, 0, 3, 64, 34, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 7, 83, 66, 80, 79, + 83, 72, 0, 3, 64, 36, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 8, 83, 66, 68, + 82, 65, 71, 72, 0, 3, 64, 38, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5, 83, + 72, 79, 87, 0, 4, 0, 0, 0, 8, 82, 69, 83, 84, 79, 82, 69, 0, 4, 0, 0, + 0, 9, 77, 73, 78, 73, 77, 73, 90, 69, 0, 4, 0, 0, 0, 9, 77, 65, 88, 73, + 77, 73, 90, 69, 0, 4, 0, 0, 0, 5, 72, 73, 68, 69, 0, 4, 0, 0, 0, 8, + 66, 85, 84, 84, 79, 78, 49, 0, 4, 0, 0, 0, 7,115,116,114,105,110,103, 0, + 4, 0, 0, 0, 5, 98,121,116,101, 0, 4, 0, 0, 0, 2, 49, 0, 4, 0, 0, + 0, 8, 66, 85, 84, 84, 79, 78, 50, 0, 4, 0, 0, 0, 2, 50, 0, 4, 0, 0, + 0, 8, 66, 85, 84, 84, 79, 78, 51, 0, 4, 0, 0, 0, 2, 51, 0, 4, 0, 0, + 0, 8, 66, 85, 84, 84, 79, 78, 52, 0, 4, 0, 0, 0, 2, 52, 0, 4, 0, 0, + 0, 8, 66, 85, 84, 84, 79, 78, 53, 0, 4, 0, 0, 0, 2, 53, 0, 4, 0, 0, + 0, 6, 69, 82, 82, 79, 82, 0, 4, 0, 0, 0, 8, 78, 79, 69, 82, 82, 79, 82, + 0, 4, 0, 0, 0, 7, 79, 80, 69, 78, 69, 68, 0, 4, 0, 0, 0, 8, 73, 78, + 86, 65, 76, 73, 68, 0, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, + 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, + 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, + 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, + 0, 29, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 34, 0, 0, + 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, + 0, 37, 0, 0, 0, 37, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, 0, + 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, + 0, 46, 0, 0, 0, 46, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, + 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, + 0, 52, 0, 0, 0, 52, 0, 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 53, 0, 0, + 0, 53, 0, 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, + 0, 54, 0, 0, 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 55, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 61, 0, 0, + 0, 61, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, + 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/constants_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/constants_be64.loh b/iup/srclua5/loh/constants_be64.loh new file mode 100755 index 0000000..4f434b6 --- /dev/null +++ b/iup/srclua5/loh/constants_be64.loh @@ -0,0 +1,113 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/constants_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/constants_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,110,115,116, 97,110,116,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2,102, 0, 0, 0, 1, 64, 0, 0, 7, 0, 0, 0, 1, +192, 0, 0, 7,128, 0, 0, 1, 64, 1, 0, 7, 0, 1, 0, 1, 64, 1, 0, 7, +128, 1, 0, 1, 64, 1, 0, 7,192, 1, 0, 1, 64, 2, 0, 7, 0, 2, 0, 1, +192, 2, 0, 7,128, 2, 0, 1, 64, 3, 0, 7, 0, 3, 0, 1,192, 3, 0, 7, +128, 3, 0, 1, 64, 4, 0, 7, 0, 4, 0, 1,192, 4, 0, 7,128, 4, 0, 1, + 64, 5, 0, 7, 0, 5, 0, 1,192, 5, 0, 7,128, 5, 0, 1, 64, 6, 0, 7, + 0, 6, 0, 5, 0, 4, 0, 7,128, 6, 0, 5,128, 4, 0, 7,192, 6, 0, 1, +192, 0, 0, 7, 0, 7, 0, 1, 64, 0, 0, 7, 64, 7, 0, 1,192, 7, 0, 7, +128, 7, 0, 1, 64, 8, 0, 7, 0, 8, 0, 1,192, 8, 0, 7,128, 8, 0, 1, + 64, 9, 0, 7, 0, 9, 0, 1,192, 9, 0, 7,128, 9, 0, 1, 64, 10, 0, 7, + 0, 10, 0, 1,192, 10, 0, 7,128, 10, 0, 1, 64, 11, 0, 7, 0, 11, 0, 1, +192, 11, 0, 7,128, 11, 0, 1, 64, 12, 0, 7, 0, 12, 0, 1,192, 0, 0, 7, +128, 12, 0, 1, 64, 0, 0, 7,192, 12, 0, 1,192, 7, 0, 7, 0, 13, 0, 1, + 64, 8, 0, 7, 64, 13, 0, 1,192, 8, 0, 7,128, 13, 0, 5, 0, 14, 0, 6, + 64, 78, 0, 65,128, 14, 0, 28,128, 0, 1, 7,192, 13, 0, 5, 0, 14, 0, 6, + 64, 78, 0, 65, 0, 15, 0, 28,128, 0, 1, 7,192, 14, 0, 5, 0, 14, 0, 6, + 64, 78, 0, 65,128, 15, 0, 28,128, 0, 1, 7, 64, 15, 0, 5, 0, 14, 0, 6, + 64, 78, 0, 65, 0, 16, 0, 28,128, 0, 1, 7,192, 15, 0, 5, 0, 14, 0, 6, + 64, 78, 0, 65,128, 16, 0, 28,128, 0, 1, 7, 64, 16, 0, 1, 0, 17, 0, 7, +192, 16, 0, 1,128, 17, 0, 7, 64, 17, 0, 1, 0, 18, 0, 7,192, 17, 0, 1, +128, 18, 0, 7, 64, 18, 0, 1, 0, 19, 0, 7,192, 18, 0, 30, 0,128, 0, 77, + 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 69, 82, 82, 79, 82, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 4, 8, 0, 0, 0, 0, 0, 0, 0, 78, 79, 69, 82, + 82, 79, 82, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 79, 80, 69, 78, 69, 68, 0, 3, 0, 0, 0, 0, 0, 0,240,191, 4, 8, + 0, 0, 0, 0, 0, 0, 0, 73, 78, 86, 65, 76, 73, 68, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0, 73, 71, 78, 79, 82, 69, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, + 68, 69, 70, 65, 85, 76, 84, 0, 3, 0, 0, 0, 0, 0, 0, 0,192, 4, 6, 0, + 0, 0, 0, 0, 0, 0, 67, 76, 79, 83, 69, 0, 3, 0, 0, 0, 0, 0, 0, 8, +192, 4, 9, 0, 0, 0, 0, 0, 0, 0, 67, 79, 78, 84, 73, 78, 85, 69, 0, 3, + 0, 0, 0, 0, 0, 0, 16,192, 4, 7, 0, 0, 0, 0, 0, 0, 0, 67, 69, 78, + 84, 69, 82, 0, 3, 0, 0, 0, 0,224,255,239, 64, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 76, 69, 70, 84, 0, 3, 0, 0, 0, 0,192,255,239, 64, 4, 6, 0, 0, + 0, 0, 0, 0, 0, 82, 73, 71, 72, 84, 0, 3, 0, 0, 0, 0,160,255,239, 64, + 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 79, 85, 83, 69, 80, 79, 83, 0, 3, 0, + 0, 0, 0,128,255,239, 64, 4, 8, 0, 0, 0, 0, 0, 0, 0, 67, 85, 82, 82, + 69, 78, 84, 0, 3, 0, 0, 0, 0, 96,255,239, 64, 4, 13, 0, 0, 0, 0, 0, + 0, 0, 67, 69, 78, 84, 69, 82, 80, 65, 82, 69, 78, 84, 0, 3, 0, 0, 0, 0, + 64,255,239, 64, 4, 4, 0, 0, 0, 0, 0, 0, 0, 84, 79, 80, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 66, 79, 84, 84, 79, 77, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 83, 66, 85, 80, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 83, 66, 68, 78, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, 71, 85, 80, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, 71, 68, + 78, 0, 3, 0, 0, 0, 0, 0, 0, 8, 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, + 83, 66, 80, 79, 83, 86, 0, 3, 0, 0, 0, 0, 0, 0, 16, 64, 4, 8, 0, 0, + 0, 0, 0, 0, 0, 83, 66, 68, 82, 65, 71, 86, 0, 3, 0, 0, 0, 0, 0, 0, + 20, 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 76, 69, 70, 84, 0, 3, 0, + 0, 0, 0, 0, 0, 24, 64, 4, 8, 0, 0, 0, 0, 0, 0, 0, 83, 66, 82, 73, + 71, 72, 84, 0, 3, 0, 0, 0, 0, 0, 0, 28, 64, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 83, 66, 80, 71, 76, 69, 70, 84, 0, 3, 0, 0, 0, 0, 0, 0, 32, 64, + 4, 10, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 3, + 0, 0, 0, 0, 0, 0, 34, 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, + 79, 83, 72, 0, 3, 0, 0, 0, 0, 0, 0, 36, 64, 4, 8, 0, 0, 0, 0, 0, + 0, 0, 83, 66, 68, 82, 65, 71, 72, 0, 3, 0, 0, 0, 0, 0, 0, 38, 64, 4, + 5, 0, 0, 0, 0, 0, 0, 0, 83, 72, 79, 87, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0, 82, 69, 83, 84, 79, 82, 69, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, + 73, 78, 73, 77, 73, 90, 69, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 65, 88, + 73, 77, 73, 90, 69, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 72, 73, 68, 69, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 49, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 98,121,116,101, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 49, 0, 4, 8, + 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 50, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0, 50, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, + 78, 51, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 51, 0, 4, 8, 0, 0, 0, 0, + 0, 0, 0, 66, 85, 84, 84, 79, 78, 52, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, + 52, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 53, 0, 4, + 2, 0, 0, 0, 0, 0, 0, 0, 53, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 77, + 65, 83, 75, 95, 70, 76, 79, 65, 84, 0, 4, 24, 0, 0, 0, 0, 0, 0, 0, 91, + 43, 47, 45, 93, 63, 40, 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, + 43, 41, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 77, 65, 83, 75, 95, 85, 70, 76, + 79, 65, 84, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 40, 47,100, 43, 47, 46, 63, + 47,100, 42,124, 47, 46, 47,100, 43, 41, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, + 77, 65, 83, 75, 95, 69, 70, 76, 79, 65, 84, 0, 4, 40, 0, 0, 0, 0, 0, 0, + 0, 91, 43, 47, 45, 93, 63, 40, 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, + 47,100, 43, 41, 40, 91,101, 69, 93, 91, 43, 47, 45, 93, 63, 47,100, 43, 41, 63, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 65, 83, 75, 95, 73, 78, 84, 0, 4, + 10, 0, 0, 0, 0, 0, 0, 0, 91, 43, 47, 45, 93, 63, 47,100, 43, 0, 4, 10, + 0, 0, 0, 0, 0, 0, 0, 77, 65, 83, 75, 95, 85, 73, 78, 84, 0, 4, 4, 0, + 0, 0, 0, 0, 0, 0, 47,100, 43, 0, 0, 0, 0, 0,102, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, + 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, + 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, + 0, 0, 29, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, + 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 38, 0, + 0, 0, 38, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 40, 0, 0, 0, 40, 0, + 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, + 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, + 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, + 0, 0, 52, 0, 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, 54, 0, + 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, + 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, + 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, + 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, + 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, + 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 70, 0, + 0, 0, 70, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 72, 0, 0, 0, 72, 0, + 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/constants_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/constants_le64.loh b/iup/srclua5/loh/constants_le64.loh new file mode 100755 index 0000000..9771f6f --- /dev/null +++ b/iup/srclua5/loh/constants_le64.loh @@ -0,0 +1,97 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/constants_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/constants_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,110,115,116, 97,110,116,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 92, 0, 0, 0, 1, 64, 0, 0, 7, 0, 0, 0, 1, +192, 0, 0, 7,128, 0, 0, 1, 64, 1, 0, 7, 0, 1, 0, 1,192, 1, 0, 7, +128, 1, 0, 1, 64, 2, 0, 7, 0, 2, 0, 1,192, 2, 0, 7,128, 2, 0, 1, + 64, 3, 0, 7, 0, 3, 0, 1,192, 3, 0, 7,128, 3, 0, 1, 64, 4, 0, 7, + 0, 4, 0, 1,192, 4, 0, 7,128, 4, 0, 5,128, 2, 0, 7, 0, 5, 0, 5, + 0, 3, 0, 7, 64, 5, 0, 1,192, 5, 0, 7,128, 5, 0, 1, 64, 6, 0, 7, + 0, 6, 0, 1,192, 6, 0, 7,128, 6, 0, 1, 64, 7, 0, 7, 0, 7, 0, 1, +192, 7, 0, 7,128, 7, 0, 1, 64, 8, 0, 7, 0, 8, 0, 1,192, 8, 0, 7, +128, 8, 0, 1, 64, 9, 0, 7, 0, 9, 0, 1,192, 9, 0, 7,128, 9, 0, 1, + 64, 10, 0, 7, 0, 10, 0, 1,192, 10, 0, 7,128, 10, 0, 1, 64, 11, 0, 7, + 0, 11, 0, 1,192, 5, 0, 7,128, 11, 0, 1, 64, 6, 0, 7,192, 11, 0, 1, +192, 6, 0, 7, 0, 12, 0, 1, 64, 7, 0, 7, 64, 12, 0, 1,192, 7, 0, 7, +128, 12, 0, 5, 0, 13, 0, 6, 64, 77, 0, 65,128, 13, 0, 28,128, 0, 1, 7, +192, 12, 0, 5, 0, 13, 0, 6, 64, 77, 0, 65, 0, 14, 0, 28,128, 0, 1, 7, +192, 13, 0, 5, 0, 13, 0, 6, 64, 77, 0, 65,128, 14, 0, 28,128, 0, 1, 7, + 64, 14, 0, 5, 0, 13, 0, 6, 64, 77, 0, 65, 0, 15, 0, 28,128, 0, 1, 7, +192, 14, 0, 5, 0, 13, 0, 6, 64, 77, 0, 65,128, 15, 0, 28,128, 0, 1, 7, + 64, 15, 0, 1, 64, 6, 0, 7,192, 15, 0, 1,192, 5, 0, 7, 0, 16, 0, 1, + 64, 0, 0, 7, 64, 16, 0, 1, 64, 0, 0, 7,128, 16, 0, 30, 0,128, 0, 67, + 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 73, 71, 78, 79, 82, 69, 0, 3, + 0, 0, 0, 0, 0, 0,240,191, 4, 8, 0, 0, 0, 0, 0, 0, 0, 68, 69, 70, + 65, 85, 76, 84, 0, 3, 0, 0, 0, 0, 0, 0, 0,192, 4, 6, 0, 0, 0, 0, + 0, 0, 0, 67, 76, 79, 83, 69, 0, 3, 0, 0, 0, 0, 0, 0, 8,192, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 67, 79, 78, 84, 73, 78, 85, 69, 0, 3, 0, 0, 0, + 0, 0, 0, 16,192, 4, 7, 0, 0, 0, 0, 0, 0, 0, 67, 69, 78, 84, 69, 82, + 0, 3, 0, 0, 0, 0,224,255,239, 64, 4, 5, 0, 0, 0, 0, 0, 0, 0, 76, + 69, 70, 84, 0, 3, 0, 0, 0, 0,192,255,239, 64, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 82, 73, 71, 72, 84, 0, 3, 0, 0, 0, 0,160,255,239, 64, 4, 9, 0, + 0, 0, 0, 0, 0, 0, 77, 79, 85, 83, 69, 80, 79, 83, 0, 3, 0, 0, 0, 0, +128,255,239, 64, 4, 8, 0, 0, 0, 0, 0, 0, 0, 67, 85, 82, 82, 69, 78, 84, + 0, 3, 0, 0, 0, 0, 96,255,239, 64, 4, 13, 0, 0, 0, 0, 0, 0, 0, 67, + 69, 78, 84, 69, 82, 80, 65, 82, 69, 78, 84, 0, 3, 0, 0, 0, 0, 64,255,239, + 64, 4, 4, 0, 0, 0, 0, 0, 0, 0, 84, 79, 80, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 66, 79, 84, 84, 79, 77, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 83, + 66, 85, 80, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 83, 66, 68, 78, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 83, 66, 80, 71, 85, 80, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, 71, 68, 78, 0, 3, 0, 0, + 0, 0, 0, 0, 8, 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, 79, 83, + 86, 0, 3, 0, 0, 0, 0, 0, 0, 16, 64, 4, 8, 0, 0, 0, 0, 0, 0, 0, + 83, 66, 68, 82, 65, 71, 86, 0, 3, 0, 0, 0, 0, 0, 0, 20, 64, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 83, 66, 76, 69, 70, 84, 0, 3, 0, 0, 0, 0, 0, 0, + 24, 64, 4, 8, 0, 0, 0, 0, 0, 0, 0, 83, 66, 82, 73, 71, 72, 84, 0, 3, + 0, 0, 0, 0, 0, 0, 28, 64, 4, 9, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, + 71, 76, 69, 70, 84, 0, 3, 0, 0, 0, 0, 0, 0, 32, 64, 4, 10, 0, 0, 0, + 0, 0, 0, 0, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 3, 0, 0, 0, 0, 0, + 0, 34, 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, 79, 83, 72, 0, 3, + 0, 0, 0, 0, 0, 0, 36, 64, 4, 8, 0, 0, 0, 0, 0, 0, 0, 83, 66, 68, + 82, 65, 71, 72, 0, 3, 0, 0, 0, 0, 0, 0, 38, 64, 4, 5, 0, 0, 0, 0, + 0, 0, 0, 83, 72, 79, 87, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 82, 69, 83, + 84, 79, 82, 69, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 73, 78, 73, 77, 73, + 90, 69, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 65, 88, 73, 77, 73, 90, 69, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 72, 73, 68, 69, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 49, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 98,121,116, +101, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 49, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0, 66, 85, 84, 84, 79, 78, 50, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 50, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 51, 0, 4, 2, + 0, 0, 0, 0, 0, 0, 0, 51, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 66, 85, + 84, 84, 79, 78, 52, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 52, 0, 4, 8, 0, + 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 53, 0, 4, 2, 0, 0, 0, 0, + 0, 0, 0, 53, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 69, 82, 82, 79, 82, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0, 78, 79, 69, 82, 82, 79, 82, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 79, 80, 69, 78, 69, 68, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0, 73, 78, 86, 65, 76, 73, 68, 0, 0, 0, 0, 0, 92, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, + 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, + 0, 0, 29, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 34, 0, + 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 36, 0, 0, 0, 36, 0, + 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, + 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, + 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, + 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, + 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 53, 0, + 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, + 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, + 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 61, 0, + 0, 0, 61, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 63, 0, 0, 0, 63, 0, + 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/constants_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/constants_le64w.loh b/iup/srclua5/loh/constants_le64w.loh new file mode 100755 index 0000000..b2eb2a8 --- /dev/null +++ b/iup/srclua5/loh/constants_le64w.loh @@ -0,0 +1,113 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/constants_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/constants_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64, 99,111,110,115,116, 97,110,116,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2,102, 0, 0, 0, 1, 64, 0, 0, 7, 0, 0, 0, 1, +192, 0, 0, 7,128, 0, 0, 1, 64, 1, 0, 7, 0, 1, 0, 1, 64, 1, 0, 7, +128, 1, 0, 1, 64, 1, 0, 7,192, 1, 0, 1, 64, 2, 0, 7, 0, 2, 0, 1, +192, 2, 0, 7,128, 2, 0, 1, 64, 3, 0, 7, 0, 3, 0, 1,192, 3, 0, 7, +128, 3, 0, 1, 64, 4, 0, 7, 0, 4, 0, 1,192, 4, 0, 7,128, 4, 0, 1, + 64, 5, 0, 7, 0, 5, 0, 1,192, 5, 0, 7,128, 5, 0, 1, 64, 6, 0, 7, + 0, 6, 0, 5, 0, 4, 0, 7,128, 6, 0, 5,128, 4, 0, 7,192, 6, 0, 1, +192, 0, 0, 7, 0, 7, 0, 1, 64, 0, 0, 7, 64, 7, 0, 1,192, 7, 0, 7, +128, 7, 0, 1, 64, 8, 0, 7, 0, 8, 0, 1,192, 8, 0, 7,128, 8, 0, 1, + 64, 9, 0, 7, 0, 9, 0, 1,192, 9, 0, 7,128, 9, 0, 1, 64, 10, 0, 7, + 0, 10, 0, 1,192, 10, 0, 7,128, 10, 0, 1, 64, 11, 0, 7, 0, 11, 0, 1, +192, 11, 0, 7,128, 11, 0, 1, 64, 12, 0, 7, 0, 12, 0, 1,192, 0, 0, 7, +128, 12, 0, 1, 64, 0, 0, 7,192, 12, 0, 1,192, 7, 0, 7, 0, 13, 0, 1, + 64, 8, 0, 7, 64, 13, 0, 1,192, 8, 0, 7,128, 13, 0, 5, 0, 14, 0, 6, + 64, 78, 0, 65,128, 14, 0, 28,128, 0, 1, 7,192, 13, 0, 5, 0, 14, 0, 6, + 64, 78, 0, 65, 0, 15, 0, 28,128, 0, 1, 7,192, 14, 0, 5, 0, 14, 0, 6, + 64, 78, 0, 65,128, 15, 0, 28,128, 0, 1, 7, 64, 15, 0, 5, 0, 14, 0, 6, + 64, 78, 0, 65, 0, 16, 0, 28,128, 0, 1, 7,192, 15, 0, 5, 0, 14, 0, 6, + 64, 78, 0, 65,128, 16, 0, 28,128, 0, 1, 7, 64, 16, 0, 1, 0, 17, 0, 7, +192, 16, 0, 1,128, 17, 0, 7, 64, 17, 0, 1, 0, 18, 0, 7,192, 17, 0, 1, +128, 18, 0, 7, 64, 18, 0, 1, 0, 19, 0, 7,192, 18, 0, 30, 0,128, 0, 77, + 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 69, 82, 82, 79, 82, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 4, 8, 0, 0, 0, 0, 0, 0, 0, 78, 79, 69, 82, + 82, 79, 82, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 79, 80, 69, 78, 69, 68, 0, 3, 0, 0, 0, 0, 0, 0,240,191, 4, 8, + 0, 0, 0, 0, 0, 0, 0, 73, 78, 86, 65, 76, 73, 68, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0, 73, 71, 78, 79, 82, 69, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, + 68, 69, 70, 65, 85, 76, 84, 0, 3, 0, 0, 0, 0, 0, 0, 0,192, 4, 6, 0, + 0, 0, 0, 0, 0, 0, 67, 76, 79, 83, 69, 0, 3, 0, 0, 0, 0, 0, 0, 8, +192, 4, 9, 0, 0, 0, 0, 0, 0, 0, 67, 79, 78, 84, 73, 78, 85, 69, 0, 3, + 0, 0, 0, 0, 0, 0, 16,192, 4, 7, 0, 0, 0, 0, 0, 0, 0, 67, 69, 78, + 84, 69, 82, 0, 3, 0, 0, 0, 0,224,255,239, 64, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 76, 69, 70, 84, 0, 3, 0, 0, 0, 0,192,255,239, 64, 4, 6, 0, 0, + 0, 0, 0, 0, 0, 82, 73, 71, 72, 84, 0, 3, 0, 0, 0, 0,160,255,239, 64, + 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 79, 85, 83, 69, 80, 79, 83, 0, 3, 0, + 0, 0, 0,128,255,239, 64, 4, 8, 0, 0, 0, 0, 0, 0, 0, 67, 85, 82, 82, + 69, 78, 84, 0, 3, 0, 0, 0, 0, 96,255,239, 64, 4, 13, 0, 0, 0, 0, 0, + 0, 0, 67, 69, 78, 84, 69, 82, 80, 65, 82, 69, 78, 84, 0, 3, 0, 0, 0, 0, + 64,255,239, 64, 4, 4, 0, 0, 0, 0, 0, 0, 0, 84, 79, 80, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 66, 79, 84, 84, 79, 77, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 83, 66, 85, 80, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 83, 66, 68, 78, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, 71, 85, 80, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, 71, 68, + 78, 0, 3, 0, 0, 0, 0, 0, 0, 8, 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, + 83, 66, 80, 79, 83, 86, 0, 3, 0, 0, 0, 0, 0, 0, 16, 64, 4, 8, 0, 0, + 0, 0, 0, 0, 0, 83, 66, 68, 82, 65, 71, 86, 0, 3, 0, 0, 0, 0, 0, 0, + 20, 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 76, 69, 70, 84, 0, 3, 0, + 0, 0, 0, 0, 0, 24, 64, 4, 8, 0, 0, 0, 0, 0, 0, 0, 83, 66, 82, 73, + 71, 72, 84, 0, 3, 0, 0, 0, 0, 0, 0, 28, 64, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 83, 66, 80, 71, 76, 69, 70, 84, 0, 3, 0, 0, 0, 0, 0, 0, 32, 64, + 4, 10, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, 71, 82, 73, 71, 72, 84, 0, 3, + 0, 0, 0, 0, 0, 0, 34, 64, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, 66, 80, + 79, 83, 72, 0, 3, 0, 0, 0, 0, 0, 0, 36, 64, 4, 8, 0, 0, 0, 0, 0, + 0, 0, 83, 66, 68, 82, 65, 71, 72, 0, 3, 0, 0, 0, 0, 0, 0, 38, 64, 4, + 5, 0, 0, 0, 0, 0, 0, 0, 83, 72, 79, 87, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0, 82, 69, 83, 84, 79, 82, 69, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, + 73, 78, 73, 77, 73, 90, 69, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 65, 88, + 73, 77, 73, 90, 69, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 72, 73, 68, 69, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 49, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 98,121,116,101, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 49, 0, 4, 8, + 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 50, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0, 50, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, + 78, 51, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 51, 0, 4, 8, 0, 0, 0, 0, + 0, 0, 0, 66, 85, 84, 84, 79, 78, 52, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, + 52, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 53, 0, 4, + 2, 0, 0, 0, 0, 0, 0, 0, 53, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 77, + 65, 83, 75, 95, 70, 76, 79, 65, 84, 0, 4, 24, 0, 0, 0, 0, 0, 0, 0, 91, + 43, 47, 45, 93, 63, 40, 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, 47,100, + 43, 41, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 77, 65, 83, 75, 95, 85, 70, 76, + 79, 65, 84, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, 40, 47,100, 43, 47, 46, 63, + 47,100, 42,124, 47, 46, 47,100, 43, 41, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, + 77, 65, 83, 75, 95, 69, 70, 76, 79, 65, 84, 0, 4, 40, 0, 0, 0, 0, 0, 0, + 0, 91, 43, 47, 45, 93, 63, 40, 47,100, 43, 47, 46, 63, 47,100, 42,124, 47, 46, + 47,100, 43, 41, 40, 91,101, 69, 93, 91, 43, 47, 45, 93, 63, 47,100, 43, 41, 63, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 77, 65, 83, 75, 95, 73, 78, 84, 0, 4, + 10, 0, 0, 0, 0, 0, 0, 0, 91, 43, 47, 45, 93, 63, 47,100, 43, 0, 4, 10, + 0, 0, 0, 0, 0, 0, 0, 77, 65, 83, 75, 95, 85, 73, 78, 84, 0, 4, 4, 0, + 0, 0, 0, 0, 0, 0, 47,100, 43, 0, 0, 0, 0, 0,102, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, + 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, + 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, + 0, 0, 29, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, + 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 38, 0, + 0, 0, 38, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 40, 0, 0, 0, 40, 0, + 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, + 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, + 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, + 0, 0, 52, 0, 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, 54, 0, + 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, 0, 0, 59, 0, + 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, + 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, + 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, + 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, + 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 70, 0, + 0, 0, 70, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 72, 0, 0, 0, 72, 0, + 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/constants_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/dial.loh b/iup/srclua5/loh/dial.loh new file mode 100755 index 0000000..ff16026 --- /dev/null +++ b/iup/srclua5/loh/dial.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/dial.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/dial.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,100,105, 97, +108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 19, 0, + 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128,194,132,100, 0, + 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, + 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, + 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0,100,105, 97, +108, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 2, 0, 0, 0,115, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 13, 0, 0, 0,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 4, + 2, 0, 0, 0,100, 0, 4, 8, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, + 14, 0, 0, 0,105,117,112, 99,111,110,116,114,111,108,115, 46,104, 0, 4, 14, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, + 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, + 0, 4, 5, 0, 0, 0, 68,105, 97,108, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 18, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116, +114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/dial.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/dial_be32.loh b/iup/srclua5/loh/dial_be32.loh new file mode 100755 index 0000000..e883239 --- /dev/null +++ b/iup/srclua5/loh/dial_be32.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/dial_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/dial_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,100,105, 97, +108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 19, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0, 64, 74,131,194, 0, 73,131, 0, 64, 9,132,194,128, 9, 0, 0, + 0,100,133,128, 64, 9, 0, 3, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 3, + 64, 69, 0, 0, 0,128, 0, 3,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, + 0, 15, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 5,100,105, 97, +108, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, + 4, 0, 0, 0, 2,115, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 0, 0, 0, 13,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 4, + 0, 0, 0, 2,100, 0, 4, 0, 0, 0, 8,105,110, 99,108,117,100,101, 0, 4, + 0, 0, 0, 14,105,117,112, 99,111,110,116,114,111,108,115, 46,104, 0, 4, 0, + 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, + 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, 0, +133, 0,192, 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, + 2, 4, 0, 0, 0, 5, 68,105, 97,108, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, + 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 99,116, +114,108, 0, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/dial_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/dial_be64.loh b/iup/srclua5/loh/dial_be64.loh new file mode 100755 index 0000000..86901b2 --- /dev/null +++ b/iup/srclua5/loh/dial_be64.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/dial_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/dial_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,100,105, 97,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128, +194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 13, 0, 0, 0, 0, 0, + 0, 0,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0,100, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117, +100,101, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,105,117,112, 99,111,110,116,114, +111,108,115, 46,104, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 2, 0, + 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, + 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 68,105, + 97,108, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/dial_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/dial_le64.loh b/iup/srclua5/loh/dial_le64.loh new file mode 100755 index 0000000..44ab7a5 --- /dev/null +++ b/iup/srclua5/loh/dial_le64.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/dial_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/dial_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,100,105, 97,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128, +194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 13, 0, 0, 0, 0, 0, + 0, 0,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0,100, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117, +100,101, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,105,117,112, 99,111,110,116,114, +111,108,115, 46,104, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 2, 0, + 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, + 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 68,105, + 97,108, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/dial_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/dial_le64w.loh b/iup/srclua5/loh/dial_le64w.loh new file mode 100755 index 0000000..38c2cc0 --- /dev/null +++ b/iup/srclua5/loh/dial_le64w.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/dial_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/dial_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,100,105, 97,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128, +194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 13, 0, 0, 0, 0, 0, + 0, 0,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0,100, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117, +100,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,105,117,112,100,105, 97,108, 46, +104, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101, +109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103, +105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, + 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, + 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 68,105, 97,108, 0, 3, + 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 12, 0, + 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116, +114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/dial_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/dialog.loh b/iup/srclua5/loh/dialog.loh new file mode 100755 index 0000000..c4c8760 --- /dev/null +++ b/iup/srclua5/loh/dialog.loh @@ -0,0 +1,72 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/dialog.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/dialog.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 12, 0, 0, 0, 64,100,105, 97, +108,111,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 30, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, + 9, 64, 65,130, 74,192, 1, 0, 73, 0,194,131, 73, 0,194,132, 73, 0, 66,133, + 73, 0,195,133, 73,128,195,134, 73, 0,196,135, 73,128,196,136, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,137,100, 64, 0, 0, 9, 64, 0,138,100,128, 0, 0, + 9, 64,128,138,100,192, 0, 0, 9, 64, 0,139, 69,192, 5, 0,128, 0, 0, 0, + 92, 64, 0, 1, 69, 0, 6, 0,128, 0, 0, 0,193, 64, 6, 0, 92, 64,128, 1, + 30, 0,128, 0, 26, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 7, + 0, 0, 0,100,105, 97,108,111,103, 0, 4, 7, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 73, 0, 4, 9, 0, 0, 0, + 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0,109, 97,112, 95, 99, 98, + 0, 4, 1, 0, 0, 0, 0, 4, 9, 0, 0, 0,117,110,109, 97,112, 95, 99, 98, + 0, 4, 9, 0, 0, 0, 99,108,111,115,101, 95, 99, 98, 0, 4, 8, 0, 0, 0, +115,104,111,119, 95, 99, 98, 0, 4, 2, 0, 0, 0,110, 0, 4, 8, 0, 0, 0, +109,111,118,101, 95, 99, 98, 0, 4, 3, 0, 0, 0,110,110, 0, 4, 13, 0, 0, + 0,116,114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 4, 4, 0, 0, 0,110, +110,110, 0, 4, 13, 0, 0, 0,100,114,111,112,102,105,108,101,115, 95, 99, 98, + 0, 4, 5, 0, 0, 0,115,110,110,110, 0, 4, 14, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 6, 0, 0, 0,112,111,112,117,112, + 0, 4, 7, 0, 0, 0,115,104,111,119,120,121, 0, 4, 8, 0, 0, 0,100,101, +115,116,114,111,121, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, + 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101, +116, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 21, 0, 0, 0, 0, 2, + 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, 68,105, 97,108,111, +103, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, + 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, + 2, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 80,111,112,117,112, 0, + 0, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, + 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0,120, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 29, 0, 0, 0, 0, + 3, 0, 7, 7, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, + 1, 0, 1,221, 0, 0, 2,222, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, + 7, 0, 0, 0, 83,104,111,119, 88, 89, 0, 0, 0, 0, 0, 7, 0, 0, 0, 28, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 29, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108, +101, 0, 0, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0,120, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 2, 0, 0, 0,121, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 33, 0, 0, 0, 0, 1, 0, 3, 5, 0, + 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 33, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108, +101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 4, 0, + 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, + 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, + 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 21, 0, 0, 0, 19, 0, + 0, 0, 25, 0, 0, 0, 23, 0, 0, 0, 29, 0, 0, 0, 27, 0, 0, 0, 33, 0, + 0, 0, 31, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 36, 0, + 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 14, 0, 0, 0, 29, 0, 0, 0, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/dialog.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/dialog_be32.loh b/iup/srclua5/loh/dialog_be32.loh new file mode 100755 index 0000000..5f280fd --- /dev/null +++ b/iup/srclua5/loh/dialog_be32.loh @@ -0,0 +1,72 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/dialog_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/dialog_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 12, 64,100,105, 97, +108,111,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 0, 0, 0, 30, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9, +130, 65, 64, 9, 0, 1,192, 74,131,194, 0, 73,132,194, 0, 73,133, 66, 0, 73, +133,195, 0, 73,134,195,128, 73,135,196, 0, 73,136,196,128, 73,131, 0, 64, 9, + 0, 0, 0,100,137,128, 64, 9, 0, 0, 64,100,138, 0, 64, 9, 0, 0,128,100, +138,128, 64, 9, 0, 0,192,100,139, 0, 64, 9, 0, 5,192, 69, 0, 0, 0,128, + 1, 0, 64, 92, 0, 6, 0, 69, 0, 0, 0,128, 0, 6, 64,193, 1,128, 64, 92, + 0,128, 0, 30, 0, 0, 0, 26, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, + 0, 0, 7,100,105, 97,108,111,103, 0, 4, 0, 0, 0, 7,112, 97,114,101,110, +116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99, +114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 2, 73, 0, 4, 0, 0, 0, 9, + 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 7,109, 97,112, 95, 99, 98, + 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 9,117,110,109, 97,112, 95, 99, 98, + 0, 4, 0, 0, 0, 9, 99,108,111,115,101, 95, 99, 98, 0, 4, 0, 0, 0, 8, +115,104,111,119, 95, 99, 98, 0, 4, 0, 0, 0, 2,110, 0, 4, 0, 0, 0, 8, +109,111,118,101, 95, 99, 98, 0, 4, 0, 0, 0, 3,110,110, 0, 4, 0, 0, 0, + 13,116,114, 97,121, 99,108,105, 99,107, 95, 99, 98, 0, 4, 0, 0, 0, 4,110, +110,110, 0, 4, 0, 0, 0, 13,100,114,111,112,102,105,108,101,115, 95, 99, 98, + 0, 4, 0, 0, 0, 5,115,110,110,110, 0, 4, 0, 0, 0, 14, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 6,112,111,112,117,112, + 0, 4, 0, 0, 0, 7,115,104,111,119,120,121, 0, 4, 0, 0, 0, 8,100,101, +115,116,114,111,121, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, + 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101, +116, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 21, 0, 2, + 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0,192, 64,198, 1, 0, 0,157, 0, 0, + 0,158, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 7, 68,105, 97,108,111, +103, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, + 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 3, 0, 7, 0, 0, 0, + 6, 0, 0, 0,197, 0, 0, 1, 0, 0,128, 1, 64, 1, 0, 1,128, 2, 0, 64, +220, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 6, 80,111,112,117,112, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 3, 0, 0, 0, 7, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2,120, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2,121, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 29, 0, + 3, 0, 7, 0, 0, 0, 7, 0, 0, 0,197, 0, 0, 1, 0, 0,128, 1, 64, 1, + 0, 1,128, 2, 0, 0,221, 0, 0, 0,222, 0,128, 0, 30, 0, 0, 0, 1, 4, + 0, 0, 0, 7, 83,104,111,119, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, + 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, + 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 3, 0, 0, 0, 7,104, 97,110,100,108, +101, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 2,120, 0, 0, 0, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 2,121, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 33, 0, 1, 0, 3, 0, 0, + 0, 5, 0, 0, 0, 69, 0, 0, 0,128, 1, 0, 0, 93, 0, 0, 0, 94, 0,128, + 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 8, 68,101,115,116,114,111,121, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, + 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 1, 0, 0, 0, 7,104, 97,110,100,108, +101, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 21, 0, 0, + 0, 19, 0, 0, 0, 25, 0, 0, 0, 23, 0, 0, 0, 29, 0, 0, 0, 27, 0, 0, + 0, 33, 0, 0, 0, 31, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, + 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 14, 0, 0, 0, 29, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/dialog_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/dialog_be64.loh b/iup/srclua5/loh/dialog_be64.loh new file mode 100755 index 0000000..94b0b30 --- /dev/null +++ b/iup/srclua5/loh/dialog_be64.loh @@ -0,0 +1,81 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/dialog_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/dialog_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,100,105, 97,108,111,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 30, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74,192, 1, 0, 73, 0,194,131, 73, 0,194,132, + 73, 0, 66,133, 73, 0,195,133, 73,128,195,134, 73, 0,196,135, 73,128,196,136, + 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,137,100, 64, 0, 0, 9, 64, 0,138, +100,128, 0, 0, 9, 64,128,138,100,192, 0, 0, 9, 64, 0,139, 69,192, 5, 0, +128, 0, 0, 0, 92, 64, 0, 1, 69, 0, 6, 0,128, 0, 0, 0,193, 64, 6, 0, + 92, 64,128, 1, 30, 0,128, 0, 26, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,105, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108,111, +103, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, + 0, 73, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97,112, 95, 99, 98, 0, 4, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,117,110,109, 97, +112, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,108,111,115,101, 95, + 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115,104,111,119, 95, 99, 98, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, +109,111,118,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,116,114, 97,121, 99,108,105, 99,107, 95, 99, + 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110,110, 0, 4, 13, 0, 0, 0, + 0, 0, 0, 0,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0,115,110,110,110, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,112,111,112,117,112, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,104, +111,119,120,121, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111, +121, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 19, 0, 0, 0, 21, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, + 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, + 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 68,105, 97,108,111,103, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 2, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, + 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, + 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, + 25, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, + 0, 0, 0, 29, 0, 0, 0, 0, 3, 0, 7, 7, 0, 0, 0,197, 0, 0, 0, 0, + 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,221, 0, 0, 2,222, 0, 0, 0, 30, + 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83,104,111,119, + 88, 89, 0, 0, 0, 0, 0, 7, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 3, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, + 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 33, 0, + 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, 0, + 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, + 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 1, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 21, 0, 0, 0, 19, 0, 0, 0, 25, 0, + 0, 0, 23, 0, 0, 0, 29, 0, 0, 0, 27, 0, 0, 0, 33, 0, 0, 0, 31, 0, + 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 36, 0, 0, 0, 36, 0, + 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 14, 0, 0, 0, 29, 0, 0, 0, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/dialog_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/dialog_le64.loh b/iup/srclua5/loh/dialog_le64.loh new file mode 100755 index 0000000..b3f4995 --- /dev/null +++ b/iup/srclua5/loh/dialog_le64.loh @@ -0,0 +1,81 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/dialog_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/dialog_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,100,105, 97,108,111,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 30, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74,192, 1, 0, 73, 0,194,131, 73, 0,194,132, + 73, 0, 66,133, 73, 0,195,133, 73,128,195,134, 73, 0,196,135, 73,128,196,136, + 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,137,100, 64, 0, 0, 9, 64, 0,138, +100,128, 0, 0, 9, 64,128,138,100,192, 0, 0, 9, 64, 0,139, 69,192, 5, 0, +128, 0, 0, 0, 92, 64, 0, 1, 69, 0, 6, 0,128, 0, 0, 0,193, 64, 6, 0, + 92, 64,128, 1, 30, 0,128, 0, 26, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,105, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108,111, +103, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, + 0, 73, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97,112, 95, 99, 98, 0, 4, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,117,110,109, 97, +112, 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,108,111,115,101, 95, + 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115,104,111,119, 95, 99, 98, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, +109,111,118,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,116,114, 97,121, 99,108,105, 99,107, 95, 99, + 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110,110, 0, 4, 13, 0, 0, 0, + 0, 0, 0, 0,100,114,111,112,102,105,108,101,115, 95, 99, 98, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0,115,110,110,110, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,112,111,112,117,112, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,104, +111,119,120,121, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111, +121, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 19, 0, 0, 0, 21, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, + 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, + 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 68,105, 97,108,111,103, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 2, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, + 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, + 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, + 25, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, + 0, 0, 0, 29, 0, 0, 0, 0, 3, 0, 7, 7, 0, 0, 0,197, 0, 0, 0, 0, + 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,221, 0, 0, 2,222, 0, 0, 0, 30, + 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83,104,111,119, + 88, 89, 0, 0, 0, 0, 0, 7, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 3, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, + 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 33, 0, + 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, 0, + 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, + 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 1, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 21, 0, 0, 0, 19, 0, 0, 0, 25, 0, + 0, 0, 23, 0, 0, 0, 29, 0, 0, 0, 27, 0, 0, 0, 33, 0, 0, 0, 31, 0, + 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 36, 0, 0, 0, 36, 0, + 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 14, 0, 0, 0, 29, 0, 0, 0, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/dialog_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/dialog_le64w.loh b/iup/srclua5/loh/dialog_le64w.loh new file mode 100755 index 0000000..ef19de9 --- /dev/null +++ b/iup/srclua5/loh/dialog_le64w.loh @@ -0,0 +1,79 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/dialog_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/dialog_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,100,105, 97,108,111,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 29, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74,128, 1, 0, 73, 0,194,131, 73, 0,194,132, + 73, 0, 66,133, 73, 0,195,133, 73,128,195,134, 73, 0,196,135, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,136,100, 64, 0, 0, 9, 64, 0,137,100,128, 0, 0, + 9, 64,128,137,100,192, 0, 0, 9, 64, 0,138, 69, 64, 5, 0,128, 0, 0, 0, + 92, 64, 0, 1, 69,128, 5, 0,128, 0, 0, 0,193,192, 5, 0, 92, 64,128, 1, + 30, 0,128, 0, 24, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99, +107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108,111,103, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0,109, 97,112, 95, 99, 98, 0, 4, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,117,110,109, 97,112, 95, 99, 98, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,108,111,115,101, 95, 99, 98, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0,115,104,111,119, 95, 99, 98, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,110, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,116,114, 97,121, + 99,108,105, 99,107, 95, 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110, +110, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,100,114,111,112,102,105,108,101,115, + 95, 99, 98, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,115,110,110,110, 0, 4, 14, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,115,104,111,119,120,121, 0, 4, 8, 0, 0, 0, 0, 0, 0, + 0,100,101,115,116,114,111,121, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 0, 2, 0, + 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, + 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 68,105, + 97,108,111,103, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 22, 0, 0, 0, 24, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, + 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, + 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, + 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, 3, 0, 7, 7, 0, + 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,221, 0, + 0, 2,222, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 83,104,111,119, 88, 89, 0, 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 28, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97, +110,100,108,101, 0, 0, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, + 0,120, 0, 0, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, + 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 32, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, + 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97, +110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 20, 0, 0, 0, 18, 0, 0, + 0, 24, 0, 0, 0, 22, 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, 32, 0, 0, + 0, 30, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, + 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 13, 0, 0, 0, 28, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/dialog_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/filedlg.loh b/iup/srclua5/loh/filedlg.loh new file mode 100755 index 0000000..01ac3e4 --- /dev/null +++ b/iup/srclua5/loh/filedlg.loh @@ -0,0 +1,55 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/filedlg.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/filedlg.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 13, 0, 0, 0, 64,102,105,108, +101,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 23, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0, +129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128,194, +132,100, 0, 0, 0, 9, 64,128,133,100, 64, 0, 0, 9, 64, 0,134,100,128, 0, + 0, 9, 64,128,134, 69,128, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 3, + 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 17, 0, 0, + 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 8, 0, 0, 0,102,105,108,101, +100,108,103, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 8, 0, 0, 0,102,105,108,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, +115,115, 0, 4, 9, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 8, 0, + 0, 0, 70,105,108,101, 68,108,103, 0, 4, 6, 0, 0, 0,112,111,112,117,112, + 0, 4, 8, 0, 0, 0,100,101,115,116,114,111,121, 0, 4, 14, 0, 0, 0, 99, +114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117, +112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, + 0, 16, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, + 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, + 0, 4, 6, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, + 0, 2, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, + 0, 0, 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, + 0, 0, 0, 4, 8, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 20, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 24, + 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, + 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 70,105,108,101, + 68,108,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, + 23, 0, 0, 0, 24, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 20, 0, + 0, 0, 18, 0, 0, 0, 24, 0, 0, 0, 22, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 9, + 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/filedlg.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/filedlg_be32.loh b/iup/srclua5/loh/filedlg_be32.loh new file mode 100755 index 0000000..13c492c --- /dev/null +++ b/iup/srclua5/loh/filedlg_be32.loh @@ -0,0 +1,55 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/filedlg_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/filedlg_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 13, 64,102,105,108, +101,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 0, 0, 0, 23, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, + 9,130, 65, 64, 9, 0, 0, 64, 74,131,194, 0, 73,131, 0, 64, 9,132,194,128, + 9, 0, 0, 0,100,133,128, 64, 9, 0, 0, 64,100,134, 0, 64, 9, 0, 0,128, +100,134,128, 64, 9, 0, 3,128, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 3,192, + 69, 0, 0, 0,128, 0, 4, 0,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, + 17, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 8,102,105,108,101, +100,108,103, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, + 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111, +110, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 0, 0, 0, 8,102,105,108,101, 95, 99, 98, 0, 4, 0, 0, 0, 3, +115,115, 0, 4, 0, 0, 0, 9,102,117,110, 99,110, 97,109,101, 0, 4, 0, 0, + 0, 8, 70,105,108,101, 68,108,103, 0, 4, 0, 0, 0, 6,112,111,112,117,112, + 0, 4, 0, 0, 0, 8,100,101,115,116,114,111,121, 0, 4, 0, 0, 0, 14, 99, +114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, + 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117, +112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 14, 0, 0, 0, 16, 0, 3, 0, 7, 0, 0, 0, 6, 0, 0, 0,197, 0, 0, 1, + 0, 0,128, 1, 64, 1, 0, 1,128, 2, 0, 64,220, 0,128, 0, 30, 0, 0, 0, + 1, 4, 0, 0, 0, 6, 80,111,112,117,112, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 16, 0, 0, 0, 3, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2,120, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 2,121, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 20, 0, 1, 0, 3, 0, 0, 0, 5, 0, + 0, 0, 69, 0, 0, 0,128, 1, 0, 0, 93, 0, 0, 0, 94, 0,128, 0, 30, 0, + 0, 0, 1, 4, 0, 0, 0, 8, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, + 0, 0, 24, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0,133, 0,128, 0,157, 0, + 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 8, 70,105,108,101, + 68,108,103, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 23, 0, 0, 0, 23, + 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, + 0, 20, 0, 0, 0, 18, 0, 0, 0, 24, 0, 0, 0, 22, 0, 0, 0, 26, 0, 0, + 0, 26, 0, 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, + 0, 27, 0, 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, + 0, 0, 9, 0, 0, 0, 22, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/filedlg_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/filedlg_be64.loh b/iup/srclua5/loh/filedlg_be64.loh new file mode 100755 index 0000000..1495118 --- /dev/null +++ b/iup/srclua5/loh/filedlg_be64.loh @@ -0,0 +1,61 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/filedlg_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/filedlg_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,102,105,108,101,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 23, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0, +131, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133,100, 64, 0, 0, 9, 64, 0, +134,100,128, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, 0, 0, 92, 64, 0, + 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64,128, 1, 30, 0,128, + 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,100,108,103, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, 0, + 0, 0, 0,102,105,108,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, +115,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 70,105,108,101, 68,108,103, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0,100,101,115,116,114,111,121, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, + 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, + 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 20, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, + 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 20, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 0, 0, 0, 24, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, + 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 70,105,108,101, 68,108,103, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 20, 0, + 0, 0, 18, 0, 0, 0, 24, 0, 0, 0, 22, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116, +114,108, 0, 9, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/filedlg_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/filedlg_le64.loh b/iup/srclua5/loh/filedlg_le64.loh new file mode 100755 index 0000000..5bffda4 --- /dev/null +++ b/iup/srclua5/loh/filedlg_le64.loh @@ -0,0 +1,61 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/filedlg_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/filedlg_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,102,105,108,101,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 23, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0, +131, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133,100, 64, 0, 0, 9, 64, 0, +134,100,128, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, 0, 0, 92, 64, 0, + 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64,128, 1, 30, 0,128, + 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,100,108,103, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, 0, + 0, 0, 0,102,105,108,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, +115,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 70,105,108,101, 68,108,103, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0,100,101,115,116,114,111,121, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, + 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, + 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 20, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, + 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 20, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 0, 0, 0, 24, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, + 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 70,105,108,101, 68,108,103, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 20, 0, + 0, 0, 18, 0, 0, 0, 24, 0, 0, 0, 22, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116, +114,108, 0, 9, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/filedlg_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/filedlg_le64w.loh b/iup/srclua5/loh/filedlg_le64w.loh new file mode 100755 index 0000000..14ed985 --- /dev/null +++ b/iup/srclua5/loh/filedlg_le64w.loh @@ -0,0 +1,61 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/filedlg_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/filedlg_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,102,105,108,101,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 23, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0, +131, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133,100, 64, 0, 0, 9, 64, 0, +134,100,128, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, 0, 0, 92, 64, 0, + 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64,128, 1, 30, 0,128, + 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0,102,105,108,101,100,108,103, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, 0, + 0, 0, 0,102,105,108,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, +115,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 70,105,108,101, 68,108,103, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0,100,101,115,116,114,111,121, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, + 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, + 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 20, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, + 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 20, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 0, 0, 0, 24, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, + 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 70,105,108,101, 68,108,103, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 20, 0, + 0, 0, 18, 0, 0, 0, 24, 0, 0, 0, 22, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116, +114,108, 0, 9, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/filedlg_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/fill.loh b/iup/srclua5/loh/fill.loh new file mode 100755 index 0000000..a3d0a19 --- /dev/null +++ b/iup/srclua5/loh/fill.loh @@ -0,0 +1,36 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/fill.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/fill.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,102,105,108, +108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 17, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,131, 69, 0, + 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, 0, 0,193,128, + 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0,102,105,108,108, 0, 4, 7, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 4, 9, + 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32, +119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, + 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, + 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 70,105,108,108, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 13, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, + 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/fill.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/fill_be32.loh b/iup/srclua5/loh/fill_be32.loh new file mode 100755 index 0000000..0a07884 --- /dev/null +++ b/iup/srclua5/loh/fill_be32.loh @@ -0,0 +1,36 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/fill_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/fill_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,102,105,108, +108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 17, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131,128, 64, 9, 0, 2, + 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2, 64, 69, 0, 0, 0,128, 0, 2, +128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 11, 4, 0, 0, 0, 5,110, +105, 99,107, 0, 4, 0, 0, 0, 5,102,105,108,108, 0, 4, 0, 0, 0, 7,112, + 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, + 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 1, 0, 4, 0, + 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 14, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32, +119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 11, 0, + 0, 0, 13, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0,133, 0,128, 0,157, 0, + 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 5, 70,105,108,108, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, + 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 7, 0, 0, 0, 16, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/fill_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/fill_be64.loh b/iup/srclua5/loh/fill_be64.loh new file mode 100755 index 0000000..a1b3504 --- /dev/null +++ b/iup/srclua5/loh/fill_be64.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/fill_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/fill_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,102,105,108,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, + 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,102,105,108,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, + 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69, +108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, 3, 4, + 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 70,105,108,108, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, + 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/fill_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/fill_le64.loh b/iup/srclua5/loh/fill_le64.loh new file mode 100755 index 0000000..837ca1b --- /dev/null +++ b/iup/srclua5/loh/fill_le64.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/fill_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/fill_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,102,105,108,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, + 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,102,105,108,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, + 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69, +108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, 3, 4, + 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 70,105,108,108, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, + 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/fill_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/fill_le64w.loh b/iup/srclua5/loh/fill_le64w.loh new file mode 100755 index 0000000..a0edb97 --- /dev/null +++ b/iup/srclua5/loh/fill_le64w.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/fill_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/fill_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,102,105,108,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, + 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,102,105,108,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, + 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69, +108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, 3, 4, + 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 70,105,108,108, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, + 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/fill_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/fontdlg.loh b/iup/srclua5/loh/fontdlg.loh new file mode 100755 index 0000000..9ddd288 --- /dev/null +++ b/iup/srclua5/loh/fontdlg.loh @@ -0,0 +1,54 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/fontdlg.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/fontdlg.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 13, 0, 0, 0, 64,102,111,110, +116,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0, +129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, 0,132,100, 0, 0, + 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133,100,128, 0, 0, 9, 64,128, +133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, + 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, + 0, 0,110,105, 99,107, 0, 4, 8, 0, 0, 0,102,111,110,116,100,108,103, 0, + 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, + 0, 0, 0, 0, 4, 9, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 8, + 0, 0, 0, 70,111,110,116, 68,108,103, 0, 4, 9, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 6, 0, 0, 0,112,111,112,117,112, 0, 4, 8, 0, 0, + 0,100,101,115,116,114,111,121, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, + 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83, +101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100, +103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, + 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0, +128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, + 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 3, + 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 2, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, +121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, + 0, 0, 18, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, + 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, + 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 1, + 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 0, 2, + 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 70,111,110,116, 68,108,103, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, + 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, + 0, 14, 0, 0, 0, 12, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, + 0, 20, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 21, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/fontdlg.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/fontdlg_be32.loh b/iup/srclua5/loh/fontdlg_be32.loh new file mode 100755 index 0000000..70d46ff --- /dev/null +++ b/iup/srclua5/loh/fontdlg_be32.loh @@ -0,0 +1,54 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/fontdlg_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/fontdlg_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 13, 64,102,111,110, +116,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 0, 0, 0, 22, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, + 9,130, 65, 64, 9,131, 65,192, 9, 0, 0, 0, 74,132, 0, 64, 9, 0, 0, 0, +100,132,128, 64, 9, 0, 0, 64,100,133, 0, 64, 9, 0, 0,128,100,133,128, 64, + 9, 0, 3, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 3, 64, 69, 0, 0, 0, +128, 0, 3,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 15, 4, 0, 0, + 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 8,102,111,110,116,100,108,103, 0, + 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, + 0, 0, 1, 0, 4, 0, 0, 0, 9,102,117,110, 99,110, 97,109,101, 0, 4, 0, + 0, 0, 8, 70,111,110,116, 68,108,103, 0, 4, 0, 0, 0, 9, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 0, 0, 0, 6,112,111,112,117,112, 0, 4, 0, 0, 0, + 8,100,101,115,116,114,111,121, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, + 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83, +101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100, +103,101,116, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, + 0, 3, 0, 7, 0, 0, 0, 6, 0, 0, 0,197, 0, 0, 1, 0, 0,128, 1, 64, + 1, 0, 1,128, 2, 0, 64,220, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, + 6, 80,111,112,117,112, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 13, 0, + 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, + 0, 0, 3, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 2,120, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, +121, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 18, 0, 1, 0, 3, 0, 0, 0, 5, 0, 0, 0, 69, 0, 0, + 0,128, 1, 0, 0, 93, 0, 0, 0, 94, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, + 0, 0, 8, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, + 0, 0, 1, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 22, 0, 2, + 0, 3, 0, 0, 0, 4, 0, 0, 0,133, 0,128, 0,157, 0, 0, 0,158, 0,128, + 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 8, 70,111,110,116, 68,108,103, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, + 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, + 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, + 22, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, + 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 8, 0, 0, 0, 21, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/fontdlg_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/fontdlg_be64.loh b/iup/srclua5/loh/fontdlg_be64.loh new file mode 100755 index 0000000..0d6acdd --- /dev/null +++ b/iup/srclua5/loh/fontdlg_be64.loh @@ -0,0 +1,59 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/fontdlg_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/fontdlg_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,102,111,110,116,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, 0, +132,100, 0, 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133,100,128, 0, + 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, + 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, 0, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,102,111,110,116,100,108,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0,102,117,110, 99,110, 97,109,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 70, +111,110,116, 68,108,103, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, 4, 14, 0, + 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, + 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83, +101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, + 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 14, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, + 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, + 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 1, 0, 3, 5, 0, + 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 68,101,115,116,114, +111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 0, 2, + 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 70,111,110,116, 68, +108,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, + 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, + 0, 18, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, + 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 99,116,114,108, 0, 8, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/fontdlg_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/fontdlg_le64.loh b/iup/srclua5/loh/fontdlg_le64.loh new file mode 100755 index 0000000..d7acd56 --- /dev/null +++ b/iup/srclua5/loh/fontdlg_le64.loh @@ -0,0 +1,59 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/fontdlg_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/fontdlg_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,102,111,110,116,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, 0, +132,100, 0, 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133,100,128, 0, + 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, + 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, 0, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,102,111,110,116,100,108,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0,102,117,110, 99,110, 97,109,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 70, +111,110,116, 68,108,103, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, 4, 14, 0, + 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, + 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83, +101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, + 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 14, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, + 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, + 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 1, 0, 3, 5, 0, + 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 68,101,115,116,114, +111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 0, 2, + 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 70,111,110,116, 68, +108,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, + 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, + 0, 18, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, + 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 99,116,114,108, 0, 8, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/fontdlg_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/fontdlg_le64w.loh b/iup/srclua5/loh/fontdlg_le64w.loh new file mode 100755 index 0000000..1d3b92e --- /dev/null +++ b/iup/srclua5/loh/fontdlg_le64w.loh @@ -0,0 +1,59 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/fontdlg_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/fontdlg_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,102,111,110,116,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, 0, +132,100, 0, 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133,100,128, 0, + 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, + 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, 0, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,102,111,110,116,100,108,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0,102,117,110, 99,110, 97,109,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 70, +111,110,116, 68,108,103, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, 4, 14, 0, + 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, + 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83, +101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, + 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 14, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, + 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, + 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 1, 0, 3, 5, 0, + 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 68,101,115,116,114, +111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 0, 2, + 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0, +128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 70,111,110,116, 68, +108,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, + 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, + 0, 18, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, + 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 99,116,114,108, 0, 8, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/fontdlg_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/frame.loh b/iup/srclua5/loh/frame.loh new file mode 100755 index 0000000..c243823 --- /dev/null +++ b/iup/srclua5/loh/frame.loh @@ -0,0 +1,37 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/frame.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/frame.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 11, 0, 0, 0, 64,102,114, 97, +109,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 17, + 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, + 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,131, 69, + 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, 0, 0,193, +128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, 0, 0, 0, +110,105, 99,107, 0, 4, 6, 0, 0, 0,102,114, 97,109,101, 0, 4, 7, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, + 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0,105, + 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 11, 0, + 0, 0, 13, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64, +192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, + 0, 0, 0, 70,114, 97,109,101, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, + 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, + 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, + 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, + 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/frame.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/frame_be32.loh b/iup/srclua5/loh/frame_be32.loh new file mode 100755 index 0000000..afbd184 --- /dev/null +++ b/iup/srclua5/loh/frame_be32.loh @@ -0,0 +1,37 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/frame_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/frame_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 11, 64,102,114, 97, +109,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, + 0, 0, 17, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, + 65, 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131,128, 64, 9, 0, + 2, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2, 64, 69, 0, 0, 0,128, 0, + 2,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 11, 4, 0, 0, 0, 5, +110,105, 99,107, 0, 4, 0, 0, 0, 6,102,114, 97,109,101, 0, 4, 0, 0, 0, + 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, + 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 2,105, + 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 14, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, + 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105, +117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 11, 0, 0, 0, 13, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0,192, + 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, + 0, 0, 6, 70,114, 97,109,101, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, + 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 7, 0, 0, 0, + 16, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/frame_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/frame_be64.loh b/iup/srclua5/loh/frame_be64.loh new file mode 100755 index 0000000..b15a60f --- /dev/null +++ b/iup/srclua5/loh/frame_be64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/frame_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/frame_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,102,114, 97,109,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, + 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, + 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0,102,114, 97,109,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, + 0, 0, 0, 0, 0, 0, 0,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97, +108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, + 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 70, +114, 97,109,101, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, + 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, + 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/frame_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/frame_le64.loh b/iup/srclua5/loh/frame_le64.loh new file mode 100755 index 0000000..f95d1bf --- /dev/null +++ b/iup/srclua5/loh/frame_le64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/frame_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/frame_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,102,114, 97,109,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, + 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, + 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0,102,114, 97,109,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, + 0, 0, 0, 0, 0, 0, 0,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97, +108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, + 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 70, +114, 97,109,101, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, + 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, + 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/frame_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/frame_le64w.loh b/iup/srclua5/loh/frame_le64w.loh new file mode 100755 index 0000000..6f2d88e --- /dev/null +++ b/iup/srclua5/loh/frame_le64w.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/frame_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/frame_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,102,114, 97,109,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, + 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, + 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0,102,114, 97,109,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, + 0, 0, 0, 0, 0, 0, 0,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97, +108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, + 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 70, +114, 97,109,101, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, + 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, + 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/frame_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/gauge.loh b/iup/srclua5/loh/gauge.loh new file mode 100755 index 0000000..0c990ee --- /dev/null +++ b/iup/srclua5/loh/gauge.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/gauge.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/gauge.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 11, 0, 0, 0, 64,103, 97,117, +103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 18, + 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, + 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131,100, 0, 0, 0, 9, + 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 2, 0,128, + 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, 0, 0, 4, + 5, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0,103, 97,117,103,101, 0, + 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, + 0, 0, 0, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, + 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 14, 0, 0, 0,105,117,112, 99, +111,110,116,114,111,108,115, 46,104, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103, +105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, + 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, + 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, + 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 71, 97, +117,103,101, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, + 14, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, + 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/gauge.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/gauge_be32.loh b/iup/srclua5/loh/gauge_be32.loh new file mode 100755 index 0000000..ede646b --- /dev/null +++ b/iup/srclua5/loh/gauge_be32.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/gauge_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/gauge_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 11, 64,103, 97,117, +103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, + 0, 0, 18, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, + 65, 64, 9, 0, 0, 0, 74,131, 0, 64, 9,131,194, 0, 9, 0, 0, 0,100,132, +128, 64, 9, 0, 2,128, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2,192, 69, 0, + 0, 0,128, 0, 3, 0,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 13, 4, + 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 6,103, 97,117,103,101, 0, + 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, + 0, 0, 1, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, + 0, 0, 8,105,110, 99,108,117,100,101, 0, 4, 0, 0, 0, 11,105,117,112,103, + 97,117,103,101, 46,104, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108, +101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, + 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101, +116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 2, + 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0,192, 64,198, 1, 0, 0,157, 0, 0, + 0,158, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 6, 71, 97,117,103,101, + 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, + 14, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 8, 0, 0, 0, 17, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/gauge_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/gauge_be64.loh b/iup/srclua5/loh/gauge_be64.loh new file mode 100755 index 0000000..75fbf2d --- /dev/null +++ b/iup/srclua5/loh/gauge_be64.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/gauge_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/gauge_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,103, 97,117,103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 18, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131,100, + 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, +192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,103, 97,117,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105, +110, 99,108,117,100,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112,103, + 97,117,103,101, 46,104, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, + 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 71, + 97,117,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/gauge_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/gauge_le64.loh b/iup/srclua5/loh/gauge_le64.loh new file mode 100755 index 0000000..afd4adf --- /dev/null +++ b/iup/srclua5/loh/gauge_le64.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/gauge_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/gauge_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,103, 97,117,103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 18, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131,100, + 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, +192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,103, 97,117,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105, +110, 99,108,117,100,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112,103, + 97,117,103,101, 46,104, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, + 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 71, + 97,117,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/gauge_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/gauge_le64w.loh b/iup/srclua5/loh/gauge_le64w.loh new file mode 100755 index 0000000..74d6621 --- /dev/null +++ b/iup/srclua5/loh/gauge_le64w.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/gauge_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/gauge_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,103, 97,117,103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 18, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131,100, + 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, +192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,103, 97,117,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105, +110, 99,108,117,100,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112,103, + 97,117,103,101, 46,104, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, + 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 71, + 97,117,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/gauge_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/glcanvas.loh b/iup/srclua5/loh/glcanvas.loh new file mode 100755 index 0000000..7411f43 --- /dev/null +++ b/iup/srclua5/loh/glcanvas.loh @@ -0,0 +1,65 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluagl51/glcanvas.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluagl51/glcanvas.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 14, 0, 0, 0, 64,103,108, 99, + 97,110,118, 97,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 22, 0, 0, 0, 10, 0, 2, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 9,192, 65,131, 9, 64, 66,132, 74, 64, 0, 0, 73, 0, +195,133, 9, 64, 0,133, 9,128,195,134, 9, 0,196,135,100, 0, 0, 0, 9, 64, +128,136, 69,128, 4, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 4, 0,128, 0, + 0, 0,193, 0, 5, 0, 92, 64,128, 1, 30, 0,128, 0, 21, 0, 0, 0, 4, 5, + 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, 0,103,108, 99, 97,110,118, 97, +115, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 2, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0,102,117,110, 99,110, 97,109,101, + 0, 4, 9, 0, 0, 0, 71, 76, 67, 97,110,118, 97,115, 0, 4, 8, 0, 0, 0, +105,110, 99,108,117,100,101, 0, 4, 8, 0, 0, 0,105,117,112,103,108, 46,104, + 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, + 97, 99,116,105,111,110, 0, 4, 3, 0, 0, 0,110,110, 0, 4, 11, 0, 0, 0, +101,120,116,114, 97,102,117,110, 99,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 4, 10, 0, 0, 0,101,120,116,114, 97, 99,111,100,101, 0, 4,150, 1, 0, 0, + 32, 10,105,110,116, 32,105,117,112,103,108,108,117, 97, 95,111,112,101,110, 40, +108,117, 97, 95, 83,116, 97,116,101, 32, 42, 32, 76, 41, 10,123, 10, 32, 32,105, +102, 32, 40,105,117,112,108,117, 97, 95,111,112,101,110, 99, 97,108,108, 95,105, +110,116,101,114,110, 97,108, 40, 76, 41, 41, 10, 32, 32, 32, 32, 73,117,112, 71, + 76, 67, 97,110,118, 97,115, 79,112,101,110, 40, 41, 59, 10, 10, 32, 32,105,117, +112,108,117, 97, 95, 99,104, 97,110,103,101, 69,110,118, 40, 76, 41, 59, 10, 32, + 32,105,117,112,103,108, 99, 97,110,118, 97,115,108,117, 97, 95,111,112,101,110, + 40, 76, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,114,101,116,117,114,110, + 69,110,118, 40, 76, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 48, 59, 10, +125, 10, 10, 47, 42, 32,111, 98,108,105,103, 97,116,111,114,121, 32,116,111, 32, +117,115,101, 32,114,101,113,117,105,114,101, 34,105,117,112,108,117, 97,103,108, + 34, 32, 42, 47, 10,105,110,116, 32,108,117, 97,111,112,101,110, 95,105,117,112, +108,117, 97,103,108, 40,108,117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, 10, +123, 10, 32, 32,114,101,116,117,114,110, 32,105,117,112,103,108,108,117, 97, 95, +111,112,101,110, 40, 76, 41, 59, 10,125, 10, 10, 47, 42, 32,111, 98,108,105,103, + 97,116,111,114,121, 32,116,111, 32,117,115,101, 32,114,101,113,117,105,114,101, + 34,105,117,112,108,117, 97,103,108, 53, 49, 34, 32, 42, 47, 10,105,110,116, 32, +108,117, 97,111,112,101,110, 95,105,117,112,108,117, 97,103,108, 53, 49, 40,108, +117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, 32,114,101,116, +117,114,110, 32,105,117,112,103,108,108,117, 97, 95,111,112,101,110, 40, 76, 41, + 59, 10,125, 10, 10, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101, +109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101, +114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 43, 0, 0, 0, 0, 2, 0, + 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, + 0, 1, 0, 0, 0, 4, 9, 0, 0, 0, 71, 76, 67, 97,110,118, 97,115, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, + 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, + 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 38, 0, 0, 0, 43, 0, 0, + 0, 41, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, + 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 99,116,114,108, 0, 12, 0, 0, 0, 21, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluagl51/glcanvas.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/glcanvas_be32.loh b/iup/srclua5/loh/glcanvas_be32.loh new file mode 100755 index 0000000..c6c7ee9 --- /dev/null +++ b/iup/srclua5/loh/glcanvas_be32.loh @@ -0,0 +1,65 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluagl51/glcanvas_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluagl51/glcanvas_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 14, 64,103,108, 99, + 97,110,118, 97,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 0, 0, 0, 22, 0, 2, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, + 64, 9,130, 65, 64, 9,131, 65,192, 9,132, 66, 64, 9, 0, 0, 64, 74,133,195, + 0, 73,133, 0, 64, 9,134,195,128, 9,135,196, 0, 9, 0, 0, 0,100,136,128, + 64, 9, 0, 4,128, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 4,192, 69, 0, 0, + 0,128, 0, 5, 0,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 21, 4, 0, + 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 9,103,108, 99, 97,110,118, 97, +115, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, + 4, 0, 0, 0, 2, 45, 0, 4, 0, 0, 0, 9,102,117,110, 99,110, 97,109,101, + 0, 4, 0, 0, 0, 9, 71, 76, 67, 97,110,118, 97,115, 0, 4, 0, 0, 0, 8, +105,110, 99,108,117,100,101, 0, 4, 0, 0, 0, 8,105,117,112,103,108, 46,104, + 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 7, + 97, 99,116,105,111,110, 0, 4, 0, 0, 0, 3,110,110, 0, 4, 0, 0, 0, 11, +101,120,116,114, 97,102,117,110, 99,115, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 10,101,120,116,114, 97, 99,111,100,101, 0, 4, 0, 0, 1,150, + 32, 10,105,110,116, 32,105,117,112,103,108,108,117, 97, 95,111,112,101,110, 40, +108,117, 97, 95, 83,116, 97,116,101, 32, 42, 32, 76, 41, 10,123, 10, 32, 32,105, +102, 32, 40,105,117,112,108,117, 97, 95,111,112,101,110, 99, 97,108,108, 95,105, +110,116,101,114,110, 97,108, 40, 76, 41, 41, 10, 32, 32, 32, 32, 73,117,112, 71, + 76, 67, 97,110,118, 97,115, 79,112,101,110, 40, 41, 59, 10, 10, 32, 32,105,117, +112,108,117, 97, 95, 99,104, 97,110,103,101, 69,110,118, 40, 76, 41, 59, 10, 32, + 32,105,117,112,103,108, 99, 97,110,118, 97,115,108,117, 97, 95,111,112,101,110, + 40, 76, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,114,101,116,117,114,110, + 69,110,118, 40, 76, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 48, 59, 10, +125, 10, 10, 47, 42, 32,111, 98,108,105,103, 97,116,111,114,121, 32,116,111, 32, +117,115,101, 32,114,101,113,117,105,114,101, 34,105,117,112,108,117, 97,103,108, + 34, 32, 42, 47, 10,105,110,116, 32,108,117, 97,111,112,101,110, 95,105,117,112, +108,117, 97,103,108, 40,108,117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, 10, +123, 10, 32, 32,114,101,116,117,114,110, 32,105,117,112,103,108,108,117, 97, 95, +111,112,101,110, 40, 76, 41, 59, 10,125, 10, 10, 47, 42, 32,111, 98,108,105,103, + 97,116,111,114,121, 32,116,111, 32,117,115,101, 32,114,101,113,117,105,114,101, + 34,105,117,112,108,117, 97,103,108, 53, 49, 34, 32, 42, 47, 10,105,110,116, 32, +108,117, 97,111,112,101,110, 95,105,117,112,108,117, 97,103,108, 53, 49, 40,108, +117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, 32,114,101,116, +117,114,110, 32,105,117,112,103,108,108,117, 97, 95,111,112,101,110, 40, 76, 41, + 59, 10,125, 10, 10, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101, +109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101, +114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 43, 0, 2, 0, + 3, 0, 0, 0, 4, 0, 0, 0,133, 0,128, 0,157, 0, 0, 0,158, 0,128, 0, + 30, 0, 0, 0, 1, 4, 0, 0, 0, 9, 71, 76, 67, 97,110,118, 97,115, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, + 0, 0, 43, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, + 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, + 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 38, 0, 0, 0, + 43, 0, 0, 0, 41, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, + 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, + 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 12, 0, 0, 0, 21, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluagl51/glcanvas_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/glcanvas_be64.loh b/iup/srclua5/loh/glcanvas_be64.loh new file mode 100755 index 0000000..ad012a5 --- /dev/null +++ b/iup/srclua5/loh/glcanvas_be64.loh @@ -0,0 +1,70 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluagl51/glcanvas_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluagl51/glcanvas_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64,103,108, 99, 97,110,118, 97,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 0, 2, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 9, 64, 66,132, 74, 64, + 0, 0, 73, 0,195,133, 9, 64, 0,133, 9,128,195,134, 9, 0,196,135,100, 0, + 0, 0, 9, 64,128,136, 69,128, 4, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, + 4, 0,128, 0, 0, 0,193, 0, 5, 0, 92, 64,128, 1, 30, 0,128, 0, 21, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0,103,108, 99, 97,110,118, 97,115, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 71, 76, 67, 97,110,118, 97,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, +105,110, 99,108,117,100,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,117,112, +103,108, 46,104, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +101,120,116,114, 97,102,117,110, 99,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 4, 10, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97, 99,111,100,101, 0, 4, +150, 1, 0, 0, 0, 0, 0, 0, 32, 10,105,110,116, 32,105,117,112,103,108,108, +117, 97, 95,111,112,101,110, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 32, + 76, 41, 10,123, 10, 32, 32,105,102, 32, 40,105,117,112,108,117, 97, 95,111,112, +101,110, 99, 97,108,108, 95,105,110,116,101,114,110, 97,108, 40, 76, 41, 41, 10, + 32, 32, 32, 32, 73,117,112, 71, 76, 67, 97,110,118, 97,115, 79,112,101,110, 40, + 41, 59, 10, 10, 32, 32,105,117,112,108,117, 97, 95, 99,104, 97,110,103,101, 69, +110,118, 40, 76, 41, 59, 10, 32, 32,105,117,112,103,108, 99, 97,110,118, 97,115, +108,117, 97, 95,111,112,101,110, 40, 76, 41, 59, 10, 32, 32,105,117,112,108,117, + 97, 95,114,101,116,117,114,110, 69,110,118, 40, 76, 41, 59, 10, 32, 32,114,101, +116,117,114,110, 32, 48, 59, 10,125, 10, 10, 47, 42, 32,111, 98,108,105,103, 97, +116,111,114,121, 32,116,111, 32,117,115,101, 32,114,101,113,117,105,114,101, 34, +105,117,112,108,117, 97,103,108, 34, 32, 42, 47, 10,105,110,116, 32,108,117, 97, +111,112,101,110, 95,105,117,112,108,117, 97,103,108, 40,108,117, 97, 95, 83,116, + 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, 32,114,101,116,117,114,110, 32,105, +117,112,103,108,108,117, 97, 95,111,112,101,110, 40, 76, 41, 59, 10,125, 10, 10, + 47, 42, 32,111, 98,108,105,103, 97,116,111,114,121, 32,116,111, 32,117,115,101, + 32,114,101,113,117,105,114,101, 34,105,117,112,108,117, 97,103,108, 53, 49, 34, + 32, 42, 47, 10,105,110,116, 32,108,117, 97,111,112,101,110, 95,105,117,112,108, +117, 97,103,108, 53, 49, 40,108,117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, + 10,123, 10, 32, 32,114,101,116,117,114,110, 32,105,117,112,103,108,108,117, 97, + 95,111,112,101,110, 40, 76, 41, 59, 10,125, 10, 10, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, + 0, 43, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 71, 76, 67, 97,110,118, 97,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 42, + 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, 0, 0, 2, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, + 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 38, 0, 0, 0, 43, 0, 0, + 0, 41, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, + 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 12, 0, 0, 0, 21, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluagl51/glcanvas_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/glcanvas_le64.loh b/iup/srclua5/loh/glcanvas_le64.loh new file mode 100755 index 0000000..64b6ef4 --- /dev/null +++ b/iup/srclua5/loh/glcanvas_le64.loh @@ -0,0 +1,70 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluagl51/glcanvas_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluagl51/glcanvas_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64,103,108, 99, 97,110,118, 97,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 0, 2, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 9, 64, 66,132, 74, 64, + 0, 0, 73, 0,195,133, 9, 64, 0,133, 9,128,195,134, 9, 0,196,135,100, 0, + 0, 0, 9, 64,128,136, 69,128, 4, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, + 4, 0,128, 0, 0, 0,193, 0, 5, 0, 92, 64,128, 1, 30, 0,128, 0, 21, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0,103,108, 99, 97,110,118, 97,115, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 71, 76, 67, 97,110,118, 97,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, +105,110, 99,108,117,100,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,117,112, +103,108, 46,104, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +101,120,116,114, 97,102,117,110, 99,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 4, 10, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97, 99,111,100,101, 0, 4, +150, 1, 0, 0, 0, 0, 0, 0, 32, 10,105,110,116, 32,105,117,112,103,108,108, +117, 97, 95,111,112,101,110, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 32, + 76, 41, 10,123, 10, 32, 32,105,102, 32, 40,105,117,112,108,117, 97, 95,111,112, +101,110, 99, 97,108,108, 95,105,110,116,101,114,110, 97,108, 40, 76, 41, 41, 10, + 32, 32, 32, 32, 73,117,112, 71, 76, 67, 97,110,118, 97,115, 79,112,101,110, 40, + 41, 59, 10, 10, 32, 32,105,117,112,108,117, 97, 95, 99,104, 97,110,103,101, 69, +110,118, 40, 76, 41, 59, 10, 32, 32,105,117,112,103,108, 99, 97,110,118, 97,115, +108,117, 97, 95,111,112,101,110, 40, 76, 41, 59, 10, 32, 32,105,117,112,108,117, + 97, 95,114,101,116,117,114,110, 69,110,118, 40, 76, 41, 59, 10, 32, 32,114,101, +116,117,114,110, 32, 48, 59, 10,125, 10, 10, 47, 42, 32,111, 98,108,105,103, 97, +116,111,114,121, 32,116,111, 32,117,115,101, 32,114,101,113,117,105,114,101, 34, +105,117,112,108,117, 97,103,108, 34, 32, 42, 47, 10,105,110,116, 32,108,117, 97, +111,112,101,110, 95,105,117,112,108,117, 97,103,108, 40,108,117, 97, 95, 83,116, + 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, 32,114,101,116,117,114,110, 32,105, +117,112,103,108,108,117, 97, 95,111,112,101,110, 40, 76, 41, 59, 10,125, 10, 10, + 47, 42, 32,111, 98,108,105,103, 97,116,111,114,121, 32,116,111, 32,117,115,101, + 32,114,101,113,117,105,114,101, 34,105,117,112,108,117, 97,103,108, 53, 49, 34, + 32, 42, 47, 10,105,110,116, 32,108,117, 97,111,112,101,110, 95,105,117,112,108, +117, 97,103,108, 53, 49, 40,108,117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, + 10,123, 10, 32, 32,114,101,116,117,114,110, 32,105,117,112,103,108,108,117, 97, + 95,111,112,101,110, 40, 76, 41, 59, 10,125, 10, 10, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, + 0, 43, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 71, 76, 67, 97,110,118, 97,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 42, + 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, 0, 0, 2, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, + 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 38, 0, 0, 0, 43, 0, 0, + 0, 41, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, + 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 12, 0, 0, 0, 21, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluagl51/glcanvas_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/glcanvas_le64w.loh b/iup/srclua5/loh/glcanvas_le64w.loh new file mode 100755 index 0000000..607c204 --- /dev/null +++ b/iup/srclua5/loh/glcanvas_le64w.loh @@ -0,0 +1,70 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluagl51/glcanvas_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluagl51/glcanvas_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64,103,108, 99, 97,110,118, 97,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 0, 2, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 9, 64, 66,132, 74, 64, + 0, 0, 73, 0,195,133, 9, 64, 0,133, 9,128,195,134, 9, 0,196,135,100, 0, + 0, 0, 9, 64,128,136, 69,128, 4, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, + 4, 0,128, 0, 0, 0,193, 0, 5, 0, 92, 64,128, 1, 30, 0,128, 0, 21, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0,103,108, 99, 97,110,118, 97,115, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 71, 76, 67, 97,110,118, 97,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, +105,110, 99,108,117,100,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,117,112, +103,108, 46,104, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +101,120,116,114, 97,102,117,110, 99,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 4, 10, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97, 99,111,100,101, 0, 4, +150, 1, 0, 0, 0, 0, 0, 0, 32, 10,105,110,116, 32,105,117,112,103,108,108, +117, 97, 95,111,112,101,110, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 32, + 76, 41, 10,123, 10, 32, 32,105,102, 32, 40,105,117,112,108,117, 97, 95,111,112, +101,110, 99, 97,108,108, 95,105,110,116,101,114,110, 97,108, 40, 76, 41, 41, 10, + 32, 32, 32, 32, 73,117,112, 71, 76, 67, 97,110,118, 97,115, 79,112,101,110, 40, + 41, 59, 10, 10, 32, 32,105,117,112,108,117, 97, 95, 99,104, 97,110,103,101, 69, +110,118, 40, 76, 41, 59, 10, 32, 32,105,117,112,103,108, 99, 97,110,118, 97,115, +108,117, 97, 95,111,112,101,110, 40, 76, 41, 59, 10, 32, 32,105,117,112,108,117, + 97, 95,114,101,116,117,114,110, 69,110,118, 40, 76, 41, 59, 10, 32, 32,114,101, +116,117,114,110, 32, 48, 59, 10,125, 10, 10, 47, 42, 32,111, 98,108,105,103, 97, +116,111,114,121, 32,116,111, 32,117,115,101, 32,114,101,113,117,105,114,101, 34, +105,117,112,108,117, 97,103,108, 34, 32, 42, 47, 10,105,110,116, 32,108,117, 97, +111,112,101,110, 95,105,117,112,108,117, 97,103,108, 40,108,117, 97, 95, 83,116, + 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, 32,114,101,116,117,114,110, 32,105, +117,112,103,108,108,117, 97, 95,111,112,101,110, 40, 76, 41, 59, 10,125, 10, 10, + 47, 42, 32,111, 98,108,105,103, 97,116,111,114,121, 32,116,111, 32,117,115,101, + 32,114,101,113,117,105,114,101, 34,105,117,112,108,117, 97,103,108, 53, 49, 34, + 32, 42, 47, 10,105,110,116, 32,108,117, 97,111,112,101,110, 95,105,117,112,108, +117, 97,103,108, 53, 49, 40,108,117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, + 10,123, 10, 32, 32,114,101,116,117,114,110, 32,105,117,112,103,108,108,117, 97, + 95,111,112,101,110, 40, 76, 41, 59, 10,125, 10, 10, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, + 0, 43, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 71, 76, 67, 97,110,118, 97,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 42, + 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, 0, 0, 2, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, + 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 38, 0, 0, 0, 43, 0, 0, + 0, 41, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, + 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 12, 0, 0, 0, 21, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluagl51/glcanvas_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/hbox.loh b/iup/srclua5/loh/hbox.loh new file mode 100755 index 0000000..2ab8faa --- /dev/null +++ b/iup/srclua5/loh/hbox.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/hbox.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/hbox.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,104, 98,111, +120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 19, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,131,100, 64, + 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, + 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 12, 0, + 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0,104, 98,111, +120, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, 66, + 79, 88, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, + 0, 0, 45, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, + 0, 0, 0, 97,112,112,101,110,100, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103, +105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, + 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, + 0, 0, 2, 0, 5, 5, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, + 0,156, 64,128, 1, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 65,112, +112,101,110,100, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, + 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, +101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 0, 0, 0, 17, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, + 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, + 0, 0, 72, 98,111,120, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 17, 0, 0, 0, 15, 0, 0, + 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, + 0, 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/hbox.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/hbox_be32.loh b/iup/srclua5/loh/hbox_be32.loh new file mode 100755 index 0000000..dda429c --- /dev/null +++ b/iup/srclua5/loh/hbox_be32.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/hbox_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/hbox_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,104, 98,111, +120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 19, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131,128, 64, 9, 0, 0, + 64,100,132, 0, 64, 9, 0, 2, 64, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2, +128, 69, 0, 0, 0,128, 0, 2,192,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, + 0, 12, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 5,104, 98,111, +120, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 4, 66, + 79, 88, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, + 0, 2, 45, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, + 0, 0, 7, 97,112,112,101,110,100, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103, +105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, + 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105, +100,103,101,116, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, + 13, 0, 2, 0, 5, 0, 0, 0, 5, 0, 0, 0,133, 0, 0, 0,192, 0,128, 1, + 0, 1,128, 64,156, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 7, 65,112, +112,101,110,100, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, + 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, + 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5, +101,108,101,109, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0, +133, 0,128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, + 0, 5, 72, 98,111,120, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 17, 0, 0, 0, + 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, + 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, + 5, 99,116,114,108, 0, 0, 0, 0, 7, 0, 0, 0, 18, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/hbox_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/hbox_be64.loh b/iup/srclua5/loh/hbox_be64.loh new file mode 100755 index 0000000..cfb75a5 --- /dev/null +++ b/iup/srclua5/loh/hbox_be64.loh @@ -0,0 +1,48 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/hbox_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/hbox_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,104, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131,100, 64, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0, +128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,104, 98,111,120, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, + 79, 88, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, + 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, +112,112,101,110,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, + 5, 5, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, + 1, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112, +112,101,110,100, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0,101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 72, 98, +111,120, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 17, 0, 0, + 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/hbox_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/hbox_le64.loh b/iup/srclua5/loh/hbox_le64.loh new file mode 100755 index 0000000..fe0e07e --- /dev/null +++ b/iup/srclua5/loh/hbox_le64.loh @@ -0,0 +1,48 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/hbox_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/hbox_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,104, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131,100, 64, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0, +128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,104, 98,111,120, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, + 79, 88, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, + 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, +112,112,101,110,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, + 5, 5, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, + 1, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112, +112,101,110,100, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0,101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 72, 98, +111,120, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 17, 0, 0, + 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/hbox_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/hbox_le64w.loh b/iup/srclua5/loh/hbox_le64w.loh new file mode 100755 index 0000000..b56d7f4 --- /dev/null +++ b/iup/srclua5/loh/hbox_le64w.loh @@ -0,0 +1,48 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/hbox_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/hbox_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,104, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131,100, 64, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0, +128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,104, 98,111,120, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, + 79, 88, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, + 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, +112,112,101,110,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, + 5, 5, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, + 1, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112, +112,101,110,100, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0,101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 72, 98, +111,120, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 17, 0, 0, + 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/hbox_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/image.loh b/iup/srclua5/loh/image.loh new file mode 100755 index 0000000..7dc84a1 --- /dev/null +++ b/iup/srclua5/loh/image.loh @@ -0,0 +1,127 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/image.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/image.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 11, 0, 0, 0, 64,105,109, 97, +103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 18, + 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, + 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131,100, 0, 0, 0, 9, + 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 2, 0,128, + 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, 0, 0, 4, + 5, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0,105,109, 97,103,101, 0, + 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 4, + 0, 0, 0,110,110,115, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 11, 0, 0, 0, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, 59, 6, + 0, 0, 32, 10,115,116, 97,116,105, 99, 32,105,110,116, 32, 73,109, 97,103,101, + 32, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 32, 76, 41, 10,123, 10, 32, + 32,105,110,116, 32,119, 44, 32,104, 44, 32, 99, 44, 32,110,117,109, 95, 99,111, +108,111,114,115, 59, 10, 32, 32,117,110,115,105,103,110,101,100, 32, 99,104, 97, +114, 32, 42,112,105,120,101,108,115, 59, 10, 32, 32, 73,104, 97,110,100,108,101, + 42, 32,105,104, 59, 10, 32, 32, 99,104, 97,114, 32,115,116,114, 91, 50, 48, 93, + 59, 10, 10, 32, 32,105,102, 32, 40,108,117, 97, 95,105,115,116, 97, 98,108,101, + 40, 76, 44, 32, 49, 41, 41, 10, 32, 32,123, 10, 32, 32, 32, 32,105,110,116, 32, +105, 44, 32,106, 59, 10, 10, 32, 32, 32, 32, 47, 42, 32,103,101,116, 32,116,104, +101, 32,110,117,109, 98,101,114, 32,111,102, 32,108,105,110,101,115, 32, 42, 47, + 10, 32, 32, 32, 32,104, 32, 61, 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, + 44, 32, 49, 41, 59, 32, 32, 10, 10, 32, 32, 32, 32, 47, 42, 32,103,101,116, 32, +116,104,101, 32,110,117,109, 98,101,114, 32,111,102, 32, 99,111,108,117,109,110, +115, 32,111,102, 32,116,104,101, 32,102,105,114,115,116, 32,108,105,110,101, 32, + 42, 47, 10, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104,110,117,109, 98,101, +114, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,108,117, 97, 95,103,101,116, +116, 97, 98,108,101, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,119, 32, 61, + 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, 44, 32, 45, 49, 41, 59, 32, 32, + 10, 32, 32, 32, 32,108,117, 97, 95,112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, + 32, 32, 32, 32, 10, 32, 32, 32, 32,112,105,120,101,108,115, 32, 61, 32, 40,117, +110,115,105,103,110,101,100, 32, 99,104, 97,114, 32, 42, 41, 32,109, 97,108,108, +111, 99, 32, 40,104, 42,119, 41, 59, 10, 10, 32, 32, 32, 32,102,111,114, 32, 40, +105, 61, 49, 59, 32,105, 60, 61,104, 59, 32,105, 43, 43, 41, 10, 32, 32, 32, 32, +123, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104,110,117,109, 98, +101,114, 40, 76, 44, 32,105, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95, +103,101,116,116, 97, 98,108,101, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32, + 32, 32,102,111,114, 32, 40,106, 61, 49, 59, 32,106, 60, 61,119, 59, 32,106, 43, + 43, 41, 10, 32, 32, 32, 32, 32, 32,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,105, +110,116, 32,105,100,120, 32, 61, 32, 40,105, 45, 49, 41, 42,119, 43, 40,106, 45, + 49, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104, +110,117,109, 98,101,114, 40, 76, 44, 32,106, 41, 59, 10, 32, 32, 32, 32, 32, 32, + 32, 32,108,117, 97, 95,103,101,116,116, 97, 98,108,101, 40, 76, 44, 32, 45, 50, + 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,112,105,120,101,108,115, 91,105,100, +120, 93, 32, 61, 32, 40,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 41, +108,117, 97, 95,116,111,110,117,109, 98,101,114, 40, 76, 44, 32, 45, 49, 41, 59, + 10, 32, 32, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,111,112, 40, 76, 44, 32, + 49, 41, 59, 10, 32, 32, 32, 32, 32, 32,125, 10, 32, 32, 32, 32, 32, 32,108,117, + 97, 95,112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, + 32, 32, 32, 10, 32, 32, 32, 32,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103, +101, 40,119, 44,104, 44,112,105,120,101,108,115, 41, 59, 32, 32, 10, 32, 32, 32, + 32,102,114,101,101, 40,112,105,120,101,108,115, 41, 59, 10, 10, 32, 32, 32, 32, +110,117,109, 95, 99,111,108,111,114,115, 32, 61, 32,108,117, 97, 76, 95,103,101, +116,110, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32, 32, 32,110,117,109, 95, 99,111, +108,111,114,115, 32, 61, 32,110,117,109, 95, 99,111,108,111,114,115, 62, 50, 53, + 53, 63, 32, 50, 53, 53, 58, 32,110,117,109, 95, 99,111,108,111,114,115, 59, 10, + 32, 32, 32, 32,102,111,114, 40, 99, 61, 49, 59, 32, 99, 60, 61,110,117,109, 95, + 99,111,108,111,114,115, 59, 32, 99, 43, 43, 41, 10, 32, 32, 32, 32,123, 10, 32, + 32, 32, 32, 32, 32,108,117, 97, 95,114, 97,119,103,101,116,105, 40, 76, 44, 32, + 50, 44, 32, 99, 41, 59, 10, 32, 32, 32, 32, 32, 32,115,112,114,105,110,116,102, + 40,115,116,114, 44, 32, 34, 37,100, 34, 44, 32, 99, 41, 59, 10, 32, 32, 32, 32, + 32, 32, 73,117,112, 83,116,111,114,101, 65,116,116,114,105, 98,117,116,101, 40, +105,104, 44, 32,115,116,114, 44, 32,108,117, 97, 95,116,111,115,116,114,105,110, +103, 40, 76, 44, 45, 49, 41, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95, +112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, 32,125, + 10, 32, 32,101,108,115,101, 10, 32, 32,123, 10, 32, 32, 32, 32,119, 32, 61, 32, +108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32, 32, 32,104, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105, +110,116, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32, 32, 32,112,105,120,101,108,115, + 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107,117, 99,104, 97,114, + 95, 97,114,114, 97,121, 40, 76, 44, 32, 51, 44, 32,119, 42,104, 41, 59, 10, 32, + 32, 32, 32,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, 40,119, 44, 32, +104, 44, 32,112,105,120,101,108,115, 41, 59, 10, 32, 32, 32, 32,102,114,101,101, + 40,112,105,120,101,108,115, 41, 59, 10, 10, 32, 32, 32, 32,110,117,109, 95, 99, +111,108,111,114,115, 32, 61, 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, 44, + 32, 52, 41, 59, 10, 32, 32, 32, 32,110,117,109, 95, 99,111,108,111,114,115, 32, + 61, 32,110,117,109, 95, 99,111,108,111,114,115, 62, 50, 53, 54, 63, 32, 50, 53, + 54, 58, 32,110,117,109, 95, 99,111,108,111,114,115, 59, 10, 32, 32, 32, 32,102, +111,114, 40, 99, 61, 49, 59, 32, 99, 60, 61,110,117,109, 95, 99,111,108,111,114, +115, 59, 32, 99, 43, 43, 41, 10, 32, 32, 32, 32,123, 10, 32, 32, 32, 32, 32, 32, +108,117, 97, 95,114, 97,119,103,101,116,105, 40, 76, 44, 32, 52, 44, 32, 99, 41, + 59, 10, 32, 32, 32, 32, 32, 32,115,112,114,105,110,116,102, 40,115,116,114, 44, + 32, 34, 37,100, 34, 44, 32, 99, 45, 49, 41, 59, 10, 32, 32, 32, 32, 32, 32, 73, +117,112, 83,116,111,114,101, 65,116,116,114,105, 98,117,116,101, 40,105,104, 44, + 32,115,116,114, 44, 32,108,117, 97, 95,116,111,115,116,114,105,110,103, 40, 76, + 44, 45, 49, 41, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,111,112, + 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, 32,125, 10, 10, 32, + 32,105,117,112,108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, + 32,105,104, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105, +104, 97,110,100,108,101, 95,114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, 32, + 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 32, 10, 32, 10, 0, 4, 14, 0, + 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, + 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, + 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 87, 0, 0, 0, 93, 0, 0, 0, 0, 2, 0, 7, 23, 0, 0, 0,134, 0,192, 0, +154, 0, 0, 0, 22, 64, 3,128,134, 64,192, 0,154, 0, 0, 0, 22,128, 2,128, +134,128,192, 0,154, 0, 0, 0, 22,192, 1,128,133,192, 0, 0,198, 0,192, 0, + 6, 65,192, 0, 70,129,192, 0,134, 1,193, 0,157, 0,128, 2,158, 0, 0, 0, + 22, 0, 1,128,133,192, 0, 0,192, 0,128, 0, 6, 1,193, 0,157, 0,128, 1, +158, 0, 0, 0, 30, 0,128, 0, 5, 0, 0, 0, 4, 6, 0, 0, 0,119,105,100, +116,104, 0, 4, 7, 0, 0, 0,104,101,105,103,104,116, 0, 4, 7, 0, 0, 0, +112,105,120,101,108,115, 0, 4, 6, 0, 0, 0, 73,109, 97,103,101, 0, 4, 7, + 0, 0, 0, 99,111,108,111,114,115, 0, 0, 0, 0, 0, 23, 0, 0, 0, 88, 0, + 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, + 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 89, 0, 0, 0, 89, 0, + 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, + 0, 0, 89, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 91, 0, + 0, 0, 91, 0, 0, 0, 93, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 8, 0, 0, 0, 84, 0, 0, 0, 93, 0, 0, 0, 87, 0, 0, 0, 95, 0, 0, 0, + 95, 0, 0, 0, 95, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, + 96, 0, 0, 0, 96, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, + 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/image.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/image_be32.loh b/iup/srclua5/loh/image_be32.loh new file mode 100755 index 0000000..87231d9 --- /dev/null +++ b/iup/srclua5/loh/image_be32.loh @@ -0,0 +1,127 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/image_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/image_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 11, 64,105,109, 97, +103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, + 0, 0, 18, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, + 65, 64, 9, 0, 0, 0, 74,131, 0, 64, 9,131,194, 0, 9, 0, 0, 0,100,132, +128, 64, 9, 0, 2,128, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2,192, 69, 0, + 0, 0,128, 0, 3, 0,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 13, 4, + 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 6,105,109, 97,103,101, 0, + 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, + 0, 0, 4,110,110,115, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 0, 0, 0, 11, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, 0, 0, + 6, 59, 32, 10,115,116, 97,116,105, 99, 32,105,110,116, 32, 73,109, 97,103,101, + 32, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 32, 76, 41, 10,123, 10, 32, + 32,105,110,116, 32,119, 44, 32,104, 44, 32, 99, 44, 32,110,117,109, 95, 99,111, +108,111,114,115, 59, 10, 32, 32,117,110,115,105,103,110,101,100, 32, 99,104, 97, +114, 32, 42,112,105,120,101,108,115, 59, 10, 32, 32, 73,104, 97,110,100,108,101, + 42, 32,105,104, 59, 10, 32, 32, 99,104, 97,114, 32,115,116,114, 91, 50, 48, 93, + 59, 10, 10, 32, 32,105,102, 32, 40,108,117, 97, 95,105,115,116, 97, 98,108,101, + 40, 76, 44, 32, 49, 41, 41, 10, 32, 32,123, 10, 32, 32, 32, 32,105,110,116, 32, +105, 44, 32,106, 59, 10, 10, 32, 32, 32, 32, 47, 42, 32,103,101,116, 32,116,104, +101, 32,110,117,109, 98,101,114, 32,111,102, 32,108,105,110,101,115, 32, 42, 47, + 10, 32, 32, 32, 32,104, 32, 61, 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, + 44, 32, 49, 41, 59, 32, 32, 10, 10, 32, 32, 32, 32, 47, 42, 32,103,101,116, 32, +116,104,101, 32,110,117,109, 98,101,114, 32,111,102, 32, 99,111,108,117,109,110, +115, 32,111,102, 32,116,104,101, 32,102,105,114,115,116, 32,108,105,110,101, 32, + 42, 47, 10, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104,110,117,109, 98,101, +114, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,108,117, 97, 95,103,101,116, +116, 97, 98,108,101, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,119, 32, 61, + 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, 44, 32, 45, 49, 41, 59, 32, 32, + 10, 32, 32, 32, 32,108,117, 97, 95,112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, + 32, 32, 32, 32, 10, 32, 32, 32, 32,112,105,120,101,108,115, 32, 61, 32, 40,117, +110,115,105,103,110,101,100, 32, 99,104, 97,114, 32, 42, 41, 32,109, 97,108,108, +111, 99, 32, 40,104, 42,119, 41, 59, 10, 10, 32, 32, 32, 32,102,111,114, 32, 40, +105, 61, 49, 59, 32,105, 60, 61,104, 59, 32,105, 43, 43, 41, 10, 32, 32, 32, 32, +123, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104,110,117,109, 98, +101,114, 40, 76, 44, 32,105, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95, +103,101,116,116, 97, 98,108,101, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32, + 32, 32,102,111,114, 32, 40,106, 61, 49, 59, 32,106, 60, 61,119, 59, 32,106, 43, + 43, 41, 10, 32, 32, 32, 32, 32, 32,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,105, +110,116, 32,105,100,120, 32, 61, 32, 40,105, 45, 49, 41, 42,119, 43, 40,106, 45, + 49, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104, +110,117,109, 98,101,114, 40, 76, 44, 32,106, 41, 59, 10, 32, 32, 32, 32, 32, 32, + 32, 32,108,117, 97, 95,103,101,116,116, 97, 98,108,101, 40, 76, 44, 32, 45, 50, + 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,112,105,120,101,108,115, 91,105,100, +120, 93, 32, 61, 32, 40,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 41, +108,117, 97, 95,116,111,110,117,109, 98,101,114, 40, 76, 44, 32, 45, 49, 41, 59, + 10, 32, 32, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,111,112, 40, 76, 44, 32, + 49, 41, 59, 10, 32, 32, 32, 32, 32, 32,125, 10, 32, 32, 32, 32, 32, 32,108,117, + 97, 95,112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, + 32, 32, 32, 10, 32, 32, 32, 32,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103, +101, 40,119, 44,104, 44,112,105,120,101,108,115, 41, 59, 32, 32, 10, 32, 32, 32, + 32,102,114,101,101, 40,112,105,120,101,108,115, 41, 59, 10, 10, 32, 32, 32, 32, +110,117,109, 95, 99,111,108,111,114,115, 32, 61, 32,108,117, 97, 76, 95,103,101, +116,110, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32, 32, 32,110,117,109, 95, 99,111, +108,111,114,115, 32, 61, 32,110,117,109, 95, 99,111,108,111,114,115, 62, 50, 53, + 53, 63, 32, 50, 53, 53, 58, 32,110,117,109, 95, 99,111,108,111,114,115, 59, 10, + 32, 32, 32, 32,102,111,114, 40, 99, 61, 49, 59, 32, 99, 60, 61,110,117,109, 95, + 99,111,108,111,114,115, 59, 32, 99, 43, 43, 41, 10, 32, 32, 32, 32,123, 10, 32, + 32, 32, 32, 32, 32,108,117, 97, 95,114, 97,119,103,101,116,105, 40, 76, 44, 32, + 50, 44, 32, 99, 41, 59, 10, 32, 32, 32, 32, 32, 32,115,112,114,105,110,116,102, + 40,115,116,114, 44, 32, 34, 37,100, 34, 44, 32, 99, 41, 59, 10, 32, 32, 32, 32, + 32, 32, 73,117,112, 83,116,111,114,101, 65,116,116,114,105, 98,117,116,101, 40, +105,104, 44, 32,115,116,114, 44, 32,108,117, 97, 95,116,111,115,116,114,105,110, +103, 40, 76, 44, 45, 49, 41, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95, +112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, 32,125, + 10, 32, 32,101,108,115,101, 10, 32, 32,123, 10, 32, 32, 32, 32,119, 32, 61, 32, +108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32, 32, 32,104, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105, +110,116, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32, 32, 32,112,105,120,101,108,115, + 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107,117, 99,104, 97,114, + 95, 97,114,114, 97,121, 40, 76, 44, 32, 51, 44, 32,119, 42,104, 41, 59, 10, 32, + 32, 32, 32,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, 40,119, 44, 32, +104, 44, 32,112,105,120,101,108,115, 41, 59, 10, 32, 32, 32, 32,102,114,101,101, + 40,112,105,120,101,108,115, 41, 59, 10, 10, 32, 32, 32, 32,110,117,109, 95, 99, +111,108,111,114,115, 32, 61, 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, 44, + 32, 52, 41, 59, 10, 32, 32, 32, 32,110,117,109, 95, 99,111,108,111,114,115, 32, + 61, 32,110,117,109, 95, 99,111,108,111,114,115, 62, 50, 53, 54, 63, 32, 50, 53, + 54, 58, 32,110,117,109, 95, 99,111,108,111,114,115, 59, 10, 32, 32, 32, 32,102, +111,114, 40, 99, 61, 49, 59, 32, 99, 60, 61,110,117,109, 95, 99,111,108,111,114, +115, 59, 32, 99, 43, 43, 41, 10, 32, 32, 32, 32,123, 10, 32, 32, 32, 32, 32, 32, +108,117, 97, 95,114, 97,119,103,101,116,105, 40, 76, 44, 32, 52, 44, 32, 99, 41, + 59, 10, 32, 32, 32, 32, 32, 32,115,112,114,105,110,116,102, 40,115,116,114, 44, + 32, 34, 37,100, 34, 44, 32, 99, 45, 49, 41, 59, 10, 32, 32, 32, 32, 32, 32, 73, +117,112, 83,116,111,114,101, 65,116,116,114,105, 98,117,116,101, 40,105,104, 44, + 32,115,116,114, 44, 32,108,117, 97, 95,116,111,115,116,114,105,110,103, 40, 76, + 44, 45, 49, 41, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,111,112, + 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, 32,125, 10, 10, 32, + 32,105,117,112,108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, + 32,105,104, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105, +104, 97,110,100,108,101, 95,114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, 32, + 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 32, 10, 32, 10, 0, 4, 0, 0, + 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, + 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, + 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, + 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 87, 0, 0, 0, 93, 0, 2, 0, 7, 0, 0, 0, 23, 0,192, 0,134, + 0, 0, 0,154,128, 3, 64, 22, 0,192, 64,134, 0, 0, 0,154,128, 2,128, 22, + 0,192,128,134, 0, 0, 0,154,128, 1,192, 22, 0, 0,192,133, 0,192, 0,198, + 0,192, 65, 6, 0,192,129, 70, 0,193, 1,134, 2,128, 0,157, 0, 0, 0,158, +128, 1, 0, 22, 0, 0,192,133, 0,128, 0,192, 0,193, 1, 6, 1,128, 0,157, + 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 5, 4, 0, 0, 0, 6,119,105,100, +116,104, 0, 4, 0, 0, 0, 7,104,101,105,103,104,116, 0, 4, 0, 0, 0, 7, +112,105,120,101,108,115, 0, 4, 0, 0, 0, 6, 73,109, 97,103,101, 0, 4, 0, + 0, 0, 7, 99,111,108,111,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, + 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, + 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 89, 0, 0, + 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, + 0, 89, 0, 0, 0, 89, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, + 0, 91, 0, 0, 0, 91, 0, 0, 0, 93, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 97,114,103, 0, + 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, + 0, 0, 0, 8, 0, 0, 0, 84, 0, 0, 0, 93, 0, 0, 0, 87, 0, 0, 0, 95, + 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, + 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, + 0, 0, 0, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/image_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/image_be64.loh b/iup/srclua5/loh/image_be64.loh new file mode 100755 index 0000000..d82ee9b --- /dev/null +++ b/iup/srclua5/loh/image_be64.loh @@ -0,0 +1,132 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/image_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/image_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,105,109, 97,103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 18, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131,100, + 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, +192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110,115, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, 59, 6, 0, 0, 0, 0, + 0, 0, 32, 10,115,116, 97,116,105, 99, 32,105,110,116, 32, 73,109, 97,103,101, + 32, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 32, 76, 41, 10,123, 10, 32, + 32,105,110,116, 32,119, 44, 32,104, 44, 32, 99, 44, 32,110,117,109, 95, 99,111, +108,111,114,115, 59, 10, 32, 32,117,110,115,105,103,110,101,100, 32, 99,104, 97, +114, 32, 42,112,105,120,101,108,115, 59, 10, 32, 32, 73,104, 97,110,100,108,101, + 42, 32,105,104, 59, 10, 32, 32, 99,104, 97,114, 32,115,116,114, 91, 50, 48, 93, + 59, 10, 10, 32, 32,105,102, 32, 40,108,117, 97, 95,105,115,116, 97, 98,108,101, + 40, 76, 44, 32, 49, 41, 41, 10, 32, 32,123, 10, 32, 32, 32, 32,105,110,116, 32, +105, 44, 32,106, 59, 10, 10, 32, 32, 32, 32, 47, 42, 32,103,101,116, 32,116,104, +101, 32,110,117,109, 98,101,114, 32,111,102, 32,108,105,110,101,115, 32, 42, 47, + 10, 32, 32, 32, 32,104, 32, 61, 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, + 44, 32, 49, 41, 59, 32, 32, 10, 10, 32, 32, 32, 32, 47, 42, 32,103,101,116, 32, +116,104,101, 32,110,117,109, 98,101,114, 32,111,102, 32, 99,111,108,117,109,110, +115, 32,111,102, 32,116,104,101, 32,102,105,114,115,116, 32,108,105,110,101, 32, + 42, 47, 10, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104,110,117,109, 98,101, +114, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,108,117, 97, 95,103,101,116, +116, 97, 98,108,101, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,119, 32, 61, + 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, 44, 32, 45, 49, 41, 59, 32, 32, + 10, 32, 32, 32, 32,108,117, 97, 95,112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, + 32, 32, 32, 32, 10, 32, 32, 32, 32,112,105,120,101,108,115, 32, 61, 32, 40,117, +110,115,105,103,110,101,100, 32, 99,104, 97,114, 32, 42, 41, 32,109, 97,108,108, +111, 99, 32, 40,104, 42,119, 41, 59, 10, 10, 32, 32, 32, 32,102,111,114, 32, 40, +105, 61, 49, 59, 32,105, 60, 61,104, 59, 32,105, 43, 43, 41, 10, 32, 32, 32, 32, +123, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104,110,117,109, 98, +101,114, 40, 76, 44, 32,105, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95, +103,101,116,116, 97, 98,108,101, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32, + 32, 32,102,111,114, 32, 40,106, 61, 49, 59, 32,106, 60, 61,119, 59, 32,106, 43, + 43, 41, 10, 32, 32, 32, 32, 32, 32,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,105, +110,116, 32,105,100,120, 32, 61, 32, 40,105, 45, 49, 41, 42,119, 43, 40,106, 45, + 49, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104, +110,117,109, 98,101,114, 40, 76, 44, 32,106, 41, 59, 10, 32, 32, 32, 32, 32, 32, + 32, 32,108,117, 97, 95,103,101,116,116, 97, 98,108,101, 40, 76, 44, 32, 45, 50, + 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,112,105,120,101,108,115, 91,105,100, +120, 93, 32, 61, 32, 40,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 41, +108,117, 97, 95,116,111,110,117,109, 98,101,114, 40, 76, 44, 32, 45, 49, 41, 59, + 10, 32, 32, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,111,112, 40, 76, 44, 32, + 49, 41, 59, 10, 32, 32, 32, 32, 32, 32,125, 10, 32, 32, 32, 32, 32, 32,108,117, + 97, 95,112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, + 32, 32, 32, 10, 32, 32, 32, 32,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103, +101, 40,119, 44,104, 44,112,105,120,101,108,115, 41, 59, 32, 32, 10, 32, 32, 32, + 32,102,114,101,101, 40,112,105,120,101,108,115, 41, 59, 10, 10, 32, 32, 32, 32, +110,117,109, 95, 99,111,108,111,114,115, 32, 61, 32,108,117, 97, 76, 95,103,101, +116,110, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32, 32, 32,110,117,109, 95, 99,111, +108,111,114,115, 32, 61, 32,110,117,109, 95, 99,111,108,111,114,115, 62, 50, 53, + 53, 63, 32, 50, 53, 53, 58, 32,110,117,109, 95, 99,111,108,111,114,115, 59, 10, + 32, 32, 32, 32,102,111,114, 40, 99, 61, 49, 59, 32, 99, 60, 61,110,117,109, 95, + 99,111,108,111,114,115, 59, 32, 99, 43, 43, 41, 10, 32, 32, 32, 32,123, 10, 32, + 32, 32, 32, 32, 32,108,117, 97, 95,114, 97,119,103,101,116,105, 40, 76, 44, 32, + 50, 44, 32, 99, 41, 59, 10, 32, 32, 32, 32, 32, 32,115,112,114,105,110,116,102, + 40,115,116,114, 44, 32, 34, 37,100, 34, 44, 32, 99, 41, 59, 10, 32, 32, 32, 32, + 32, 32, 73,117,112, 83,116,111,114,101, 65,116,116,114,105, 98,117,116,101, 40, +105,104, 44, 32,115,116,114, 44, 32,108,117, 97, 95,116,111,115,116,114,105,110, +103, 40, 76, 44, 45, 49, 41, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95, +112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, 32,125, + 10, 32, 32,101,108,115,101, 10, 32, 32,123, 10, 32, 32, 32, 32,119, 32, 61, 32, +108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32, 32, 32,104, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105, +110,116, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32, 32, 32,112,105,120,101,108,115, + 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107,117, 99,104, 97,114, + 95, 97,114,114, 97,121, 40, 76, 44, 32, 51, 44, 32,119, 42,104, 41, 59, 10, 32, + 32, 32, 32,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, 40,119, 44, 32, +104, 44, 32,112,105,120,101,108,115, 41, 59, 10, 32, 32, 32, 32,102,114,101,101, + 40,112,105,120,101,108,115, 41, 59, 10, 10, 32, 32, 32, 32,110,117,109, 95, 99, +111,108,111,114,115, 32, 61, 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, 44, + 32, 52, 41, 59, 10, 32, 32, 32, 32,110,117,109, 95, 99,111,108,111,114,115, 32, + 61, 32,110,117,109, 95, 99,111,108,111,114,115, 62, 50, 53, 54, 63, 32, 50, 53, + 54, 58, 32,110,117,109, 95, 99,111,108,111,114,115, 59, 10, 32, 32, 32, 32,102, +111,114, 40, 99, 61, 49, 59, 32, 99, 60, 61,110,117,109, 95, 99,111,108,111,114, +115, 59, 32, 99, 43, 43, 41, 10, 32, 32, 32, 32,123, 10, 32, 32, 32, 32, 32, 32, +108,117, 97, 95,114, 97,119,103,101,116,105, 40, 76, 44, 32, 52, 44, 32, 99, 41, + 59, 10, 32, 32, 32, 32, 32, 32,115,112,114,105,110,116,102, 40,115,116,114, 44, + 32, 34, 37,100, 34, 44, 32, 99, 45, 49, 41, 59, 10, 32, 32, 32, 32, 32, 32, 73, +117,112, 83,116,111,114,101, 65,116,116,114,105, 98,117,116,101, 40,105,104, 44, + 32,115,116,114, 44, 32,108,117, 97, 95,116,111,115,116,114,105,110,103, 40, 76, + 44, 45, 49, 41, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,111,112, + 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, 32,125, 10, 10, 32, + 32,105,117,112,108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, + 32,105,104, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105, +104, 97,110,100,108,101, 95,114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, 32, + 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 32, 10, 32, 10, 0, 4, 14, 0, + 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, + 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83, +101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, + 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 87, 0, 0, 0, 93, 0, 0, 0, 0, 2, 0, 7, 23, 0, 0, 0,134, 0,192, 0, +154, 0, 0, 0, 22, 64, 3,128,134, 64,192, 0,154, 0, 0, 0, 22,128, 2,128, +134,128,192, 0,154, 0, 0, 0, 22,192, 1,128,133,192, 0, 0,198, 0,192, 0, + 6, 65,192, 0, 70,129,192, 0,134, 1,193, 0,157, 0,128, 2,158, 0, 0, 0, + 22, 0, 1,128,133,192, 0, 0,192, 0,128, 0, 6, 1,193, 0,157, 0,128, 1, +158, 0, 0, 0, 30, 0,128, 0, 5, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, + 0,119,105,100,116,104, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103, +104,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112,105,120,101,108,115, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 99,111,108,111,114,115, 0, 0, 0, 0, 0, 23, 0, 0, 0, 88, 0, + 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, + 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 89, 0, 0, 0, 89, 0, + 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, + 0, 0, 89, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 91, 0, + 0, 0, 91, 0, 0, 0, 93, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, + 18, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 84, 0, 0, 0, 93, 0, 0, 0, + 87, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 96, 0, 0, 0, + 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 1, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/image_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/image_le64.loh b/iup/srclua5/loh/image_le64.loh new file mode 100755 index 0000000..64ea753 --- /dev/null +++ b/iup/srclua5/loh/image_le64.loh @@ -0,0 +1,132 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/image_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/image_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,105,109, 97,103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 18, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131,100, + 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, +192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110,115, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, 59, 6, 0, 0, 0, 0, + 0, 0, 32, 10,115,116, 97,116,105, 99, 32,105,110,116, 32, 73,109, 97,103,101, + 32, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 32, 76, 41, 10,123, 10, 32, + 32,105,110,116, 32,119, 44, 32,104, 44, 32, 99, 44, 32,110,117,109, 95, 99,111, +108,111,114,115, 59, 10, 32, 32,117,110,115,105,103,110,101,100, 32, 99,104, 97, +114, 32, 42,112,105,120,101,108,115, 59, 10, 32, 32, 73,104, 97,110,100,108,101, + 42, 32,105,104, 59, 10, 32, 32, 99,104, 97,114, 32,115,116,114, 91, 50, 48, 93, + 59, 10, 10, 32, 32,105,102, 32, 40,108,117, 97, 95,105,115,116, 97, 98,108,101, + 40, 76, 44, 32, 49, 41, 41, 10, 32, 32,123, 10, 32, 32, 32, 32,105,110,116, 32, +105, 44, 32,106, 59, 10, 10, 32, 32, 32, 32, 47, 42, 32,103,101,116, 32,116,104, +101, 32,110,117,109, 98,101,114, 32,111,102, 32,108,105,110,101,115, 32, 42, 47, + 10, 32, 32, 32, 32,104, 32, 61, 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, + 44, 32, 49, 41, 59, 32, 32, 10, 10, 32, 32, 32, 32, 47, 42, 32,103,101,116, 32, +116,104,101, 32,110,117,109, 98,101,114, 32,111,102, 32, 99,111,108,117,109,110, +115, 32,111,102, 32,116,104,101, 32,102,105,114,115,116, 32,108,105,110,101, 32, + 42, 47, 10, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104,110,117,109, 98,101, +114, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,108,117, 97, 95,103,101,116, +116, 97, 98,108,101, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,119, 32, 61, + 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, 44, 32, 45, 49, 41, 59, 32, 32, + 10, 32, 32, 32, 32,108,117, 97, 95,112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, + 32, 32, 32, 32, 10, 32, 32, 32, 32,112,105,120,101,108,115, 32, 61, 32, 40,117, +110,115,105,103,110,101,100, 32, 99,104, 97,114, 32, 42, 41, 32,109, 97,108,108, +111, 99, 32, 40,104, 42,119, 41, 59, 10, 10, 32, 32, 32, 32,102,111,114, 32, 40, +105, 61, 49, 59, 32,105, 60, 61,104, 59, 32,105, 43, 43, 41, 10, 32, 32, 32, 32, +123, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104,110,117,109, 98, +101,114, 40, 76, 44, 32,105, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95, +103,101,116,116, 97, 98,108,101, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32, + 32, 32,102,111,114, 32, 40,106, 61, 49, 59, 32,106, 60, 61,119, 59, 32,106, 43, + 43, 41, 10, 32, 32, 32, 32, 32, 32,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,105, +110,116, 32,105,100,120, 32, 61, 32, 40,105, 45, 49, 41, 42,119, 43, 40,106, 45, + 49, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104, +110,117,109, 98,101,114, 40, 76, 44, 32,106, 41, 59, 10, 32, 32, 32, 32, 32, 32, + 32, 32,108,117, 97, 95,103,101,116,116, 97, 98,108,101, 40, 76, 44, 32, 45, 50, + 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32,112,105,120,101,108,115, 91,105,100, +120, 93, 32, 61, 32, 40,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 41, +108,117, 97, 95,116,111,110,117,109, 98,101,114, 40, 76, 44, 32, 45, 49, 41, 59, + 10, 32, 32, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,111,112, 40, 76, 44, 32, + 49, 41, 59, 10, 32, 32, 32, 32, 32, 32,125, 10, 32, 32, 32, 32, 32, 32,108,117, + 97, 95,112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, + 32, 32, 32, 10, 32, 32, 32, 32,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103, +101, 40,119, 44,104, 44,112,105,120,101,108,115, 41, 59, 32, 32, 10, 32, 32, 32, + 32,102,114,101,101, 40,112,105,120,101,108,115, 41, 59, 10, 10, 32, 32, 32, 32, +110,117,109, 95, 99,111,108,111,114,115, 32, 61, 32,108,117, 97, 76, 95,103,101, +116,110, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32, 32, 32,110,117,109, 95, 99,111, +108,111,114,115, 32, 61, 32,110,117,109, 95, 99,111,108,111,114,115, 62, 50, 53, + 53, 63, 32, 50, 53, 53, 58, 32,110,117,109, 95, 99,111,108,111,114,115, 59, 10, + 32, 32, 32, 32,102,111,114, 40, 99, 61, 49, 59, 32, 99, 60, 61,110,117,109, 95, + 99,111,108,111,114,115, 59, 32, 99, 43, 43, 41, 10, 32, 32, 32, 32,123, 10, 32, + 32, 32, 32, 32, 32,108,117, 97, 95,114, 97,119,103,101,116,105, 40, 76, 44, 32, + 50, 44, 32, 99, 41, 59, 10, 32, 32, 32, 32, 32, 32,115,112,114,105,110,116,102, + 40,115,116,114, 44, 32, 34, 37,100, 34, 44, 32, 99, 41, 59, 10, 32, 32, 32, 32, + 32, 32, 73,117,112, 83,116,111,114,101, 65,116,116,114,105, 98,117,116,101, 40, +105,104, 44, 32,115,116,114, 44, 32,108,117, 97, 95,116,111,115,116,114,105,110, +103, 40, 76, 44, 45, 49, 41, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95, +112,111,112, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, 32,125, + 10, 32, 32,101,108,115,101, 10, 32, 32,123, 10, 32, 32, 32, 32,119, 32, 61, 32, +108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32, 32, 32,104, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105, +110,116, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32, 32, 32,112,105,120,101,108,115, + 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107,117, 99,104, 97,114, + 95, 97,114,114, 97,121, 40, 76, 44, 32, 51, 44, 32,119, 42,104, 41, 59, 10, 32, + 32, 32, 32,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, 40,119, 44, 32, +104, 44, 32,112,105,120,101,108,115, 41, 59, 10, 32, 32, 32, 32,102,114,101,101, + 40,112,105,120,101,108,115, 41, 59, 10, 10, 32, 32, 32, 32,110,117,109, 95, 99, +111,108,111,114,115, 32, 61, 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, 44, + 32, 52, 41, 59, 10, 32, 32, 32, 32,110,117,109, 95, 99,111,108,111,114,115, 32, + 61, 32,110,117,109, 95, 99,111,108,111,114,115, 62, 50, 53, 54, 63, 32, 50, 53, + 54, 58, 32,110,117,109, 95, 99,111,108,111,114,115, 59, 10, 32, 32, 32, 32,102, +111,114, 40, 99, 61, 49, 59, 32, 99, 60, 61,110,117,109, 95, 99,111,108,111,114, +115, 59, 32, 99, 43, 43, 41, 10, 32, 32, 32, 32,123, 10, 32, 32, 32, 32, 32, 32, +108,117, 97, 95,114, 97,119,103,101,116,105, 40, 76, 44, 32, 52, 44, 32, 99, 41, + 59, 10, 32, 32, 32, 32, 32, 32,115,112,114,105,110,116,102, 40,115,116,114, 44, + 32, 34, 37,100, 34, 44, 32, 99, 45, 49, 41, 59, 10, 32, 32, 32, 32, 32, 32, 73, +117,112, 83,116,111,114,101, 65,116,116,114,105, 98,117,116,101, 40,105,104, 44, + 32,115,116,114, 44, 32,108,117, 97, 95,116,111,115,116,114,105,110,103, 40, 76, + 44, 45, 49, 41, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,111,112, + 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,125, 10, 32, 32,125, 10, 10, 32, + 32,105,117,112,108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, + 32,105,104, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105, +104, 97,110,100,108,101, 95,114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, 32, + 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 32, 10, 32, 10, 0, 4, 14, 0, + 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, + 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83, +101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, + 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 87, 0, 0, 0, 93, 0, 0, 0, 0, 2, 0, 7, 23, 0, 0, 0,134, 0,192, 0, +154, 0, 0, 0, 22, 64, 3,128,134, 64,192, 0,154, 0, 0, 0, 22,128, 2,128, +134,128,192, 0,154, 0, 0, 0, 22,192, 1,128,133,192, 0, 0,198, 0,192, 0, + 6, 65,192, 0, 70,129,192, 0,134, 1,193, 0,157, 0,128, 2,158, 0, 0, 0, + 22, 0, 1,128,133,192, 0, 0,192, 0,128, 0, 6, 1,193, 0,157, 0,128, 1, +158, 0, 0, 0, 30, 0,128, 0, 5, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, + 0,119,105,100,116,104, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104,101,105,103, +104,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112,105,120,101,108,115, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 99,111,108,111,114,115, 0, 0, 0, 0, 0, 23, 0, 0, 0, 88, 0, + 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, + 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 89, 0, 0, 0, 89, 0, + 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 89, 0, + 0, 0, 89, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 91, 0, + 0, 0, 91, 0, 0, 0, 93, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, + 18, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 84, 0, 0, 0, 93, 0, 0, 0, + 87, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 96, 0, 0, 0, + 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 1, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/image_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/image_le64w.loh b/iup/srclua5/loh/image_le64w.loh new file mode 100755 index 0000000..c732956 --- /dev/null +++ b/iup/srclua5/loh/image_le64w.loh @@ -0,0 +1,90 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/image_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/image_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,105,109, 97,103,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 18, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, 9, 0,194,131,100, + 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, +192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110,115, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0, 99,114,101, 97,116,101,102,117,110, 99, 0, 4,170, 3, 0, 0, 0, 0, + 0, 0, 32, 10, 35,105,110, 99,108,117,100,101, 60,115,116,100,108,105, 98, 46, +104, 62, 10,115,116, 97,116,105, 99, 32,105,110,116, 32, 73,109, 97,103,101, 32, + 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 32, 76, 41, 10,123, 10, 32, 32, +105,110,116, 32,119, 44, 32,104, 44, 32,105, 44, 32,106, 59, 10, 32, 32,117,110, +115,105,103,110,101,100, 32, 99,104, 97,114, 32, 42,105,109,103, 59, 10, 32, 32, + 73,104, 97,110,100,108,101, 32, 42,105,109, 97,103,101, 59, 10, 32, 32, 10, 32, + 32,104, 32, 61, 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, 44, 32, 49, 41, + 59, 10, 32, 32,108,117, 97, 95,112,117,115,104,110,117,109, 98,101,114, 40, 76, + 44, 32, 49, 41, 59, 10, 32, 32,108,117, 97, 95,103,101,116,116, 97, 98,108,101, + 40, 76, 44, 32, 49, 41, 59, 10, 32, 32,119, 32, 61, 32,108,117, 97, 76, 95,103, +101,116,110, 40, 76, 44, 32, 45, 49, 41, 59, 10, 32, 32,108,117, 97, 95,112,111, +112, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 10, 32, 32,105,109,103, 32, 61, 32, + 40,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 32, 42, 41, 32,109, 97, +108,108,111, 99, 32, 40,104, 42,119, 41, 59, 10, 10, 32, 32,102,111,114, 32, 40, +105, 61, 49, 59, 32,105, 60, 61,104, 59, 32,105, 43, 43, 41, 10, 32, 32,123, 10, + 32, 32, 32, 32,108,117, 97, 95,112,117,115,104,110,117,109, 98,101,114, 40, 76, + 44, 32,105, 41, 59, 10, 32, 32, 32, 32,108,117, 97, 95,103,101,116,116, 97, 98, +108,101, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32, 32, 32,102,111,114, 32, 40,106, + 61, 49, 59, 32,106, 60, 61,119, 59, 32,106, 43, 43, 41, 10, 32, 32, 32, 32,123, + 10, 32, 32, 32, 32, 32, 32,105,110,116, 32,105,100,120, 32, 61, 32, 40,105, 45, + 49, 41, 42,119, 43, 40,106, 45, 49, 41, 59, 10, 32, 32, 32, 32, 32, 32,108,117, + 97, 95,112,117,115,104,110,117,109, 98,101,114, 40, 76, 44, 32,106, 41, 59, 10, + 32, 32, 32, 32, 32, 32,108,117, 97, 95,103,101,116,116, 97, 98,108,101, 40, 76, + 44, 32, 45, 50, 41, 59, 10, 32, 32, 32, 32, 32, 32,105,109,103, 91,105,100,120, + 93, 32, 61, 32, 40,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 41,108, +117, 97, 95,116,111,110,117,109, 98,101,114, 40, 76, 44, 32, 45, 49, 41, 59, 10, + 32, 32, 32, 32, 32, 32,108,117, 97, 95,112,111,112, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32, 32, 32,125, 10, 32, 32, 32, 32,108,117, 97, 95,112,111,112, 40, 76, + 44, 32, 49, 41, 59, 10, 32, 32,125, 10, 32, 32, 10, 32, 32,105,109, 97,103,101, + 32, 61, 32, 73,117,112, 73,109, 97,103,101, 40,119, 44,104, 44,105,109,103, 41, + 59, 32, 32, 10, 32, 32,102,114,101,101, 40,105,109,103, 41, 59, 10, 10, 32, 32, +119, 32, 61, 32,108,117, 97, 76, 95,103,101,116,110, 40, 76, 44, 32, 50, 41, 59, + 10, 10, 32, 32,102,111,114, 40,105, 61, 49, 59, 32,105, 60, 61,119, 59, 32,105, + 43, 43, 41, 10, 32, 32,123, 10, 32, 32, 32, 32,108,117, 97, 95,112,117,115,104, +110,117,109, 98,101,114, 40, 76, 44,105, 41, 59, 10, 32, 32, 32, 32,108,117, 97, + 95,112,117,115,104,110,117,109, 98,101,114, 40, 76, 44,105, 41, 59, 10, 32, 32, + 32, 32,108,117, 97, 95,103,101,116,116, 97, 98,108,101, 40, 76, 44, 32, 50, 41, + 59, 10, 32, 32, 32, 32, 73,117,112, 83,116,111,114,101, 65,116,116,114,105, 98, +117,116,101, 40,105,109, 97,103,101, 44, 32, 40, 99,104, 97,114, 32, 42, 41, 32, +108,117, 97, 95,116,111,115,116,114,105,110,103, 40, 76, 44, 45, 50, 41, 44, 32, + 40, 99,104, 97,114, 32, 42, 41, 32,108,117, 97, 95,116,111,115,116,114,105,110, +103, 40, 76, 44, 45, 49, 41, 41, 59, 10, 32, 32, 32, 32,108,117, 97, 95,112,111, +112, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32,125, 10, 32, 32, 10, 32, 32,105,117, +112,108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,105,109, + 97,103,101, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105, +104, 97,110,100,108,101, 95,114, 97,119, 40, 76, 44, 32,105,109, 97,103,101, 41, + 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 32, 10, 32, 10, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 62, 0, 0, 0, 64, 0, 0, 0, 0, 2, 0, 5, 6, 0, 0, 0,133, + 0, 0, 0,192, 0,128, 0, 6, 65,192, 0,157, 0,128, 1,158, 0, 0, 0, 30, + 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103, +101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114,115, 0, 0, 0, + 0, 0, 6, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, + 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 18, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 59, 0, 0, 0, 64, 0, 0, 0, + 62, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, + 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 1, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/image_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/imagergb.loh b/iup/srclua5/loh/imagergb.loh new file mode 100755 index 0000000..dd73833 --- /dev/null +++ b/iup/srclua5/loh/imagergb.loh @@ -0,0 +1,58 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/imagergb.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/imagergb.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 14, 0, 0, 0, 64,105,109, 97, +103,101,114,103, 98, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, 0,132, 9,128, +194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 9, 0, 0, + 0,105,109, 97,103,101,114,103, 98, 0, 4, 7, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 4, 0, 0, 0,110,110,115, 0, 4, 9, 0, + 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 9, 0, 0, 0, 73,109, 97,103, +101, 82, 71, 66, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, + 11, 0, 0, 0, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, 44, 1, 0, 0, + 32, 10,115,116, 97,116,105, 99, 32,105,110,116, 32, 73,109, 97,103,101, 82, 71, + 66, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 76, 41, 10,123, 10, 32, 32, +105,110,116, 32,119, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105,110, +116, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32,105,110,116, 32,104, 32, 61, 32,108, +117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 50, 41, 59, 10, + 32, 32,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 32, 42,112,105,120, +101,108,115, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107,117, 99, +104, 97,114, 95, 97,114,114, 97,121, 40, 76, 44, 32, 51, 44, 32,119, 42,104, 42, + 51, 41, 59, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42,105,104, 32, 61, 32, + 73,117,112, 73,109, 97,103,101, 82, 71, 66, 40,119, 44, 32,104, 44, 32,112,105, +120,101,108,115, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,108,117,103, +115,116, 97,116,101, 40, 76, 44, 32,105,104, 41, 59, 10, 32, 32,105,117,112,108, +117, 97, 95,112,117,115,104,105,104, 97,110,100,108,101, 95,114, 97,119, 40, 76, + 44, 32,105,104, 41, 59, 10, 32, 32,102,114,101,101, 40,112,105,120,101,108,115, + 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 10, 32, 10, 0, + 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, 2, 0, 6, 7, 0, 0, 0,133, + 0, 0, 0,198, 64,192, 0, 6,129,192, 0, 70,193,192, 0,157, 0, 0, 2,158, + 0, 0, 0, 30, 0,128, 0, 4, 0, 0, 0, 4, 9, 0, 0, 0, 73,109, 97,103, +101, 82, 71, 66, 0, 4, 6, 0, 0, 0,119,105,100,116,104, 0, 4, 7, 0, 0, + 0,104,101,105,103,104,116, 0, 4, 7, 0, 0, 0,112,105,120,101,108,115, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, + 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 6, 0, 0, 0, 4, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 19, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 23, 0, 0, 0, 28, 0, + 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, + 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/imagergb.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/imagergb_be32.loh b/iup/srclua5/loh/imagergb_be32.loh new file mode 100755 index 0000000..5825d4d --- /dev/null +++ b/iup/srclua5/loh/imagergb_be32.loh @@ -0,0 +1,58 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/imagergb_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/imagergb_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 14, 64,105,109, 97, +103,101,114,103, 98, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 0, 0, 0, 19, 0, 1,128, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, + 64, 9,130, 65, 64, 9,131, 65,192, 9, 0, 0, 0, 74,132, 0, 64, 9,132,194, +128, 9, 0, 0, 0,100,133,128, 64, 9, 0, 3, 0, 69, 0, 0, 0,128, 1, 0, + 64, 92, 0, 3, 64, 69, 0, 0, 0,128, 0, 3,128,193, 1,128, 64, 92, 0,128, + 0, 30, 0, 0, 0, 15, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, + 9,105,109, 97,103,101,114,103, 98, 0, 4, 0, 0, 0, 7,112, 97,114,101,110, +116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99, +114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 4,110,110,115, 0, 4, 0, 0, + 0, 9,102,117,110, 99,110, 97,109,101, 0, 4, 0, 0, 0, 9, 73,109, 97,103, +101, 82, 71, 66, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, + 0, 0, 0, 11, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, 0, 0, 1, 44, + 32, 10,115,116, 97,116,105, 99, 32,105,110,116, 32, 73,109, 97,103,101, 82, 71, + 66, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 76, 41, 10,123, 10, 32, 32, +105,110,116, 32,119, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105,110, +116, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32,105,110,116, 32,104, 32, 61, 32,108, +117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 50, 41, 59, 10, + 32, 32,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 32, 42,112,105,120, +101,108,115, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107,117, 99, +104, 97,114, 95, 97,114,114, 97,121, 40, 76, 44, 32, 51, 44, 32,119, 42,104, 42, + 51, 41, 59, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42,105,104, 32, 61, 32, + 73,117,112, 73,109, 97,103,101, 82, 71, 66, 40,119, 44, 32,104, 44, 32,112,105, +120,101,108,115, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,108,117,103, +115,116, 97,116,101, 40, 76, 44, 32,105,104, 41, 59, 10, 32, 32,105,117,112,108, +117, 97, 95,112,117,115,104,105,104, 97,110,100,108,101, 95,114, 97,119, 40, 76, + 44, 32,105,104, 41, 59, 10, 32, 32,102,114,101,101, 40,112,105,120,101,108,115, + 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 10, 32, 10, 0, + 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 2, 0, 6, 0, 0, 0, 7, 0, + 0, 0,133, 0,192, 64,198, 0,192,129, 6, 0,192,193, 70, 2, 0, 0,157, 0, + 0, 0,158, 0,128, 0, 30, 0, 0, 0, 4, 4, 0, 0, 0, 9, 73,109, 97,103, +101, 82, 71, 66, 0, 4, 0, 0, 0, 6,119,105,100,116,104, 0, 4, 0, 0, 0, + 7,104,101,105,103,104,116, 0, 4, 0, 0, 0, 7,112,105,120,101,108,115, 0, + 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, + 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 2, + 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, + 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, + 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 23, 0, 0, + 0, 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, + 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, + 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 9, 0, 0, 0, 18, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/imagergb_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/imagergb_be64.loh b/iup/srclua5/loh/imagergb_be64.loh new file mode 100755 index 0000000..b0d488f --- /dev/null +++ b/iup/srclua5/loh/imagergb_be64.loh @@ -0,0 +1,62 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/imagergb_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/imagergb_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64,105,109, 97,103,101,114,103, 98, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, + 0,132, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, + 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64, +128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110, +105, 99,107, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101,114,103, + 98, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0,110,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97, +109,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, 71, 66, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, + 44, 1, 0, 0, 0, 0, 0, 0, 32, 10,115,116, 97,116,105, 99, 32,105,110,116, + 32, 73,109, 97,103,101, 82, 71, 66, 40,108,117, 97, 95, 83,116, 97,116,101, 32, + 42, 76, 41, 10,123, 10, 32, 32,105,110,116, 32,119, 32, 61, 32,108,117, 97, 76, + 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32,105, +110,116, 32,104, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, + 40, 76, 44, 32, 50, 41, 59, 10, 32, 32,117,110,115,105,103,110,101,100, 32, 99, +104, 97,114, 32, 42,112,105,120,101,108,115, 32, 61, 32,105,117,112,108,117, 97, + 95, 99,104,101, 99,107,117, 99,104, 97,114, 95, 97,114,114, 97,121, 40, 76, 44, + 32, 51, 44, 32,119, 42,104, 42, 51, 41, 59, 10, 32, 32, 73,104, 97,110,100,108, +101, 32, 42,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, 82, 71, 66, 40, +119, 44, 32,104, 44, 32,112,105,120,101,108,115, 41, 59, 10, 32, 32,105,117,112, +108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,105,104, 41, + 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100, +108,101, 95,114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, 32, 32,102,114,101, +101, 40,112,105,120,101,108,115, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, + 49, 59, 10,125, 10, 32, 10, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, + 2, 0, 6, 7, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, 6,129,192, 0, 70, +193,192, 0,157, 0, 0, 2,158, 0, 0, 0, 30, 0,128, 0, 4, 0, 0, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, 71, 66, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,104,101,105,103,104,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112,105,120, +101,108,115, 0, 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, + 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 9, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, + 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/imagergb_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/imagergb_le64.loh b/iup/srclua5/loh/imagergb_le64.loh new file mode 100755 index 0000000..c73e537 --- /dev/null +++ b/iup/srclua5/loh/imagergb_le64.loh @@ -0,0 +1,62 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/imagergb_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/imagergb_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64,105,109, 97,103,101,114,103, 98, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, + 0,132, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, + 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64, +128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110, +105, 99,107, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101,114,103, + 98, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0,110,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97, +109,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, 71, 66, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, + 44, 1, 0, 0, 0, 0, 0, 0, 32, 10,115,116, 97,116,105, 99, 32,105,110,116, + 32, 73,109, 97,103,101, 82, 71, 66, 40,108,117, 97, 95, 83,116, 97,116,101, 32, + 42, 76, 41, 10,123, 10, 32, 32,105,110,116, 32,119, 32, 61, 32,108,117, 97, 76, + 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32,105, +110,116, 32,104, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, + 40, 76, 44, 32, 50, 41, 59, 10, 32, 32,117,110,115,105,103,110,101,100, 32, 99, +104, 97,114, 32, 42,112,105,120,101,108,115, 32, 61, 32,105,117,112,108,117, 97, + 95, 99,104,101, 99,107,117, 99,104, 97,114, 95, 97,114,114, 97,121, 40, 76, 44, + 32, 51, 44, 32,119, 42,104, 42, 51, 41, 59, 10, 32, 32, 73,104, 97,110,100,108, +101, 32, 42,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, 82, 71, 66, 40, +119, 44, 32,104, 44, 32,112,105,120,101,108,115, 41, 59, 10, 32, 32,105,117,112, +108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,105,104, 41, + 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100, +108,101, 95,114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, 32, 32,102,114,101, +101, 40,112,105,120,101,108,115, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, + 49, 59, 10,125, 10, 32, 10, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, + 2, 0, 6, 7, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, 6,129,192, 0, 70, +193,192, 0,157, 0, 0, 2,158, 0, 0, 0, 30, 0,128, 0, 4, 0, 0, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, 71, 66, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,104,101,105,103,104,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112,105,120, +101,108,115, 0, 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, + 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 9, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, + 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/imagergb_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/imagergb_le64w.loh b/iup/srclua5/loh/imagergb_le64w.loh new file mode 100755 index 0000000..f5ce332 --- /dev/null +++ b/iup/srclua5/loh/imagergb_le64w.loh @@ -0,0 +1,62 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/imagergb_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/imagergb_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 64,105,109, 97,103,101,114,103, 98, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, + 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, + 0,132, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, + 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64, +128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110, +105, 99,107, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101,114,103, + 98, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0,110,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97, +109,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, 71, 66, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, + 44, 1, 0, 0, 0, 0, 0, 0, 32, 10,115,116, 97,116,105, 99, 32,105,110,116, + 32, 73,109, 97,103,101, 82, 71, 66, 40,108,117, 97, 95, 83,116, 97,116,101, 32, + 42, 76, 41, 10,123, 10, 32, 32,105,110,116, 32,119, 32, 61, 32,108,117, 97, 76, + 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32,105, +110,116, 32,104, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, + 40, 76, 44, 32, 50, 41, 59, 10, 32, 32,117,110,115,105,103,110,101,100, 32, 99, +104, 97,114, 32, 42,112,105,120,101,108,115, 32, 61, 32,105,117,112,108,117, 97, + 95, 99,104,101, 99,107,117, 99,104, 97,114, 95, 97,114,114, 97,121, 40, 76, 44, + 32, 51, 44, 32,119, 42,104, 42, 51, 41, 59, 10, 32, 32, 73,104, 97,110,100,108, +101, 32, 42,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, 82, 71, 66, 40, +119, 44, 32,104, 44, 32,112,105,120,101,108,115, 41, 59, 10, 32, 32,105,117,112, +108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,105,104, 41, + 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100, +108,101, 95,114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, 32, 32,102,114,101, +101, 40,112,105,120,101,108,115, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, + 49, 59, 10,125, 10, 32, 10, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, + 2, 0, 6, 7, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, 6,129,192, 0, 70, +193,192, 0,157, 0, 0, 2,158, 0, 0, 0, 30, 0,128, 0, 4, 0, 0, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, 71, 66, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,104,101,105,103,104,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112,105,120, +101,108,115, 0, 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, + 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 9, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, + 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/imagergb_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/imagergba.loh b/iup/srclua5/loh/imagergba.loh new file mode 100755 index 0000000..777450b --- /dev/null +++ b/iup/srclua5/loh/imagergba.loh @@ -0,0 +1,58 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/imagergba.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/imagergba.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 15, 0, 0, 0, 64,105,109, 97, +103,101,114,103, 98, 97, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 19, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, 0,132, 9, +128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, + 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, + 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 10, 0, + 0, 0,105,109, 97,103,101,114,103, 98, 97, 0, 4, 7, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 99,114,101, 97,116,105,111,110, 0, 4, 4, 0, 0, 0,110,110,115, 0, 4, + 9, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 10, 0, 0, 0, 73,109, + 97,103,101, 82, 71, 66, 65, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 11, 0, 0, 0, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, 46, + 1, 0, 0, 32, 10,115,116, 97,116,105, 99, 32,105,110,116, 32, 73,109, 97,103, +101, 82, 71, 66, 65, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 76, 41, 10, +123, 10, 32, 32,105,110,116, 32,119, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, + 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32,105,110,116, 32,104, + 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, + 50, 41, 59, 10, 32, 32,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 32, + 42,112,105,120,101,108,115, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, + 99,107,117, 99,104, 97,114, 95, 97,114,114, 97,121, 40, 76, 44, 32, 51, 44, 32, +119, 42,104, 42, 52, 41, 59, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42,105, +104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, 82, 71, 66, 65, 40,119, 44, 32, +104, 44, 32,112,105,120,101,108,115, 41, 59, 10, 32, 32,105,117,112,108,117, 97, + 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,105,104, 41, 59, 10, 32, + 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100,108,101, 95, +114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, 32, 32,102,114,101,101, 40,112, +105,120,101,108,115, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10, +125, 10, 32, 10, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, + 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, + 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, 2, 0, 6, + 7, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, 6,129,192, 0, 70,193,192, 0, +157, 0, 0, 2,158, 0, 0, 0, 30, 0,128, 0, 4, 0, 0, 0, 4, 10, 0, 0, + 0, 73,109, 97,103,101, 82, 71, 66, 65, 0, 4, 6, 0, 0, 0,119,105,100,116, +104, 0, 4, 7, 0, 0, 0,104,101,105,103,104,116, 0, 4, 7, 0, 0, 0,112, +105,120,101,108,115, 0, 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, + 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, + 23, 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, + 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, + 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/imagergba.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/imagergba_be32.loh b/iup/srclua5/loh/imagergba_be32.loh new file mode 100755 index 0000000..78ae5a6 --- /dev/null +++ b/iup/srclua5/loh/imagergba_be32.loh @@ -0,0 +1,58 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/imagergba_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/imagergba_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 15, 64,105,109, 97, +103,101,114,103, 98, 97, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 0, 0, 0, 19, 0, 1,128, 10,128, 64, 64, 9, 0, 0,192, 69,129, + 0, 64, 9,130, 65, 64, 9,131, 65,192, 9, 0, 0, 0, 74,132, 0, 64, 9,132, +194,128, 9, 0, 0, 0,100,133,128, 64, 9, 0, 3, 0, 69, 0, 0, 0,128, 1, + 0, 64, 92, 0, 3, 64, 69, 0, 0, 0,128, 0, 3,128,193, 1,128, 64, 92, 0, +128, 0, 30, 0, 0, 0, 15, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, + 0, 10,105,109, 97,103,101,114,103, 98, 97, 0, 4, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, + 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 4,110,110,115, 0, 4, + 0, 0, 0, 9,102,117,110, 99,110, 97,109,101, 0, 4, 0, 0, 0, 10, 73,109, + 97,103,101, 82, 71, 66, 65, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 0, 0, 0, 11, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, 0, + 0, 1, 46, 32, 10,115,116, 97,116,105, 99, 32,105,110,116, 32, 73,109, 97,103, +101, 82, 71, 66, 65, 40,108,117, 97, 95, 83,116, 97,116,101, 32, 42, 76, 41, 10, +123, 10, 32, 32,105,110,116, 32,119, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, + 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, 10, 32, 32,105,110,116, 32,104, + 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, + 50, 41, 59, 10, 32, 32,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 32, + 42,112,105,120,101,108,115, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, + 99,107,117, 99,104, 97,114, 95, 97,114,114, 97,121, 40, 76, 44, 32, 51, 44, 32, +119, 42,104, 42, 52, 41, 59, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42,105, +104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, 82, 71, 66, 65, 40,119, 44, 32, +104, 44, 32,112,105,120,101,108,115, 41, 59, 10, 32, 32,105,117,112,108,117, 97, + 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,105,104, 41, 59, 10, 32, + 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100,108,101, 95, +114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, 32, 32,102,114,101,101, 40,112, +105,120,101,108,115, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10, +125, 10, 32, 10, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, + 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, + 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 2, 0, 6, + 0, 0, 0, 7, 0, 0, 0,133, 0,192, 64,198, 0,192,129, 6, 0,192,193, 70, + 2, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 4, 4, 0, 0, 0, + 10, 73,109, 97,103,101, 82, 71, 66, 65, 0, 4, 0, 0, 0, 6,119,105,100,116, +104, 0, 4, 0, 0, 0, 7,104,101,105,103,104,116, 0, 4, 0, 0, 0, 7,112, +105,120,101,108,115, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, + 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, + 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, + 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, 30, + 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, + 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, + 9, 0, 0, 0, 18, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/imagergba_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/imagergba_be64.loh b/iup/srclua5/loh/imagergba_be64.loh new file mode 100755 index 0000000..4a1db93 --- /dev/null +++ b/iup/srclua5/loh/imagergba_be64.loh @@ -0,0 +1,63 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/imagergba_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/imagergba_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64,105,109, 97,103,101,114,103, 98, 97, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, + 64, 0,132, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, + 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, + 64,128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +110,105, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101,114, +103, 98, 97, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 4, 0, 0, 0, 0, + 0, 0, 0,110,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, +110, 97,109,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, + 71, 66, 65, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101,102,117,110, + 99, 0, 4, 46, 1, 0, 0, 0, 0, 0, 0, 32, 10,115,116, 97,116,105, 99, 32, +105,110,116, 32, 73,109, 97,103,101, 82, 71, 66, 65, 40,108,117, 97, 95, 83,116, + 97,116,101, 32, 42, 76, 41, 10,123, 10, 32, 32,105,110,116, 32,119, 32, 61, 32, +108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32,105,110,116, 32,104, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99, +107,105,110,116, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32,117,110,115,105,103,110, +101,100, 32, 99,104, 97,114, 32, 42,112,105,120,101,108,115, 32, 61, 32,105,117, +112,108,117, 97, 95, 99,104,101, 99,107,117, 99,104, 97,114, 95, 97,114,114, 97, +121, 40, 76, 44, 32, 51, 44, 32,119, 42,104, 42, 52, 41, 59, 10, 32, 32, 73,104, + 97,110,100,108,101, 32, 42,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, + 82, 71, 66, 65, 40,119, 44, 32,104, 44, 32,112,105,120,101,108,115, 41, 59, 10, + 32, 32,105,117,112,108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, + 44, 32,105,104, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104, +105,104, 97,110,100,108,101, 95,114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, + 32, 32,102,114,101,101, 40,112,105,120,101,108,115, 41, 59, 10, 32, 32,114,101, +116,117,114,110, 32, 49, 59, 10,125, 10, 32, 10, 0, 4, 14, 0, 0, 0, 0, 0, + 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103, +101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, + 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100, +103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, + 28, 0, 0, 0, 0, 2, 0, 6, 7, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, + 6,129,192, 0, 70,193,192, 0,157, 0, 0, 2,158, 0, 0, 0, 30, 0,128, 0, + 4, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, 71, + 66, 65, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112,105,120,101,108,115, 0, 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 97,114,103, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, + 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/imagergba_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/imagergba_le64.loh b/iup/srclua5/loh/imagergba_le64.loh new file mode 100755 index 0000000..66b8966 --- /dev/null +++ b/iup/srclua5/loh/imagergba_le64.loh @@ -0,0 +1,63 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/imagergba_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/imagergba_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64,105,109, 97,103,101,114,103, 98, 97, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, + 64, 0,132, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, + 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, + 64,128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +110,105, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101,114, +103, 98, 97, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 4, 0, 0, 0, 0, + 0, 0, 0,110,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, +110, 97,109,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, + 71, 66, 65, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101,102,117,110, + 99, 0, 4, 46, 1, 0, 0, 0, 0, 0, 0, 32, 10,115,116, 97,116,105, 99, 32, +105,110,116, 32, 73,109, 97,103,101, 82, 71, 66, 65, 40,108,117, 97, 95, 83,116, + 97,116,101, 32, 42, 76, 41, 10,123, 10, 32, 32,105,110,116, 32,119, 32, 61, 32, +108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32,105,110,116, 32,104, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99, +107,105,110,116, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32,117,110,115,105,103,110, +101,100, 32, 99,104, 97,114, 32, 42,112,105,120,101,108,115, 32, 61, 32,105,117, +112,108,117, 97, 95, 99,104,101, 99,107,117, 99,104, 97,114, 95, 97,114,114, 97, +121, 40, 76, 44, 32, 51, 44, 32,119, 42,104, 42, 52, 41, 59, 10, 32, 32, 73,104, + 97,110,100,108,101, 32, 42,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, + 82, 71, 66, 65, 40,119, 44, 32,104, 44, 32,112,105,120,101,108,115, 41, 59, 10, + 32, 32,105,117,112,108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, + 44, 32,105,104, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104, +105,104, 97,110,100,108,101, 95,114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, + 32, 32,102,114,101,101, 40,112,105,120,101,108,115, 41, 59, 10, 32, 32,114,101, +116,117,114,110, 32, 49, 59, 10,125, 10, 32, 10, 0, 4, 14, 0, 0, 0, 0, 0, + 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103, +101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, + 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100, +103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, + 28, 0, 0, 0, 0, 2, 0, 6, 7, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, + 6,129,192, 0, 70,193,192, 0,157, 0, 0, 2,158, 0, 0, 0, 30, 0,128, 0, + 4, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, 71, + 66, 65, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112,105,120,101,108,115, 0, 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 97,114,103, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, + 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/imagergba_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/imagergba_le64w.loh b/iup/srclua5/loh/imagergba_le64w.loh new file mode 100755 index 0000000..eedbfad --- /dev/null +++ b/iup/srclua5/loh/imagergba_le64w.loh @@ -0,0 +1,63 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/imagergba_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/imagergba_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64,105,109, 97,103,101,114,103, 98, 97, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, + 64, 0,132, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, + 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, + 64,128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +110,105, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101,114, +103, 98, 97, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 4, 0, 0, 0, 0, + 0, 0, 0,110,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, +110, 97,109,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, + 71, 66, 65, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101,102,117,110, + 99, 0, 4, 46, 1, 0, 0, 0, 0, 0, 0, 32, 10,115,116, 97,116,105, 99, 32, +105,110,116, 32, 73,109, 97,103,101, 82, 71, 66, 65, 40,108,117, 97, 95, 83,116, + 97,116,101, 32, 42, 76, 41, 10,123, 10, 32, 32,105,110,116, 32,119, 32, 61, 32, +108,117, 97, 76, 95, 99,104,101, 99,107,105,110,116, 40, 76, 44, 32, 49, 41, 59, + 10, 32, 32,105,110,116, 32,104, 32, 61, 32,108,117, 97, 76, 95, 99,104,101, 99, +107,105,110,116, 40, 76, 44, 32, 50, 41, 59, 10, 32, 32,117,110,115,105,103,110, +101,100, 32, 99,104, 97,114, 32, 42,112,105,120,101,108,115, 32, 61, 32,105,117, +112,108,117, 97, 95, 99,104,101, 99,107,117, 99,104, 97,114, 95, 97,114,114, 97, +121, 40, 76, 44, 32, 51, 44, 32,119, 42,104, 42, 52, 41, 59, 10, 32, 32, 73,104, + 97,110,100,108,101, 32, 42,105,104, 32, 61, 32, 73,117,112, 73,109, 97,103,101, + 82, 71, 66, 65, 40,119, 44, 32,104, 44, 32,112,105,120,101,108,115, 41, 59, 10, + 32, 32,105,117,112,108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, + 44, 32,105,104, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104, +105,104, 97,110,100,108,101, 95,114, 97,119, 40, 76, 44, 32,105,104, 41, 59, 10, + 32, 32,102,114,101,101, 40,112,105,120,101,108,115, 41, 59, 10, 32, 32,114,101, +116,117,114,110, 32, 49, 59, 10,125, 10, 32, 10, 0, 4, 14, 0, 0, 0, 0, 0, + 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103, +101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, + 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100, +103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, + 28, 0, 0, 0, 0, 2, 0, 6, 7, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, + 6,129,192, 0, 70,193,192, 0,157, 0, 0, 2,158, 0, 0, 0, 30, 0,128, 0, + 4, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 73,109, 97,103,101, 82, 71, + 66, 65, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,119,105,100,116,104, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,104,101,105,103,104,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112,105,120,101,108,115, 0, 0, 0, 0, 0, 7, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 97,114,103, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, + 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/imagergba_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/item.loh b/iup/srclua5/loh/item.loh new file mode 100755 index 0000000..b17b36b --- /dev/null +++ b/iup/srclua5/loh/item.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/item.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/item.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,105,116,101, +109, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 19, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74,128, 0, 0, 73, 0,194,131, 73, 0,194,132, 9, 64, 0,131,100, 0, + 0, 0, 9, 64, 0,133, 69,192, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 0, + 3, 0,128, 0, 0, 0,193, 64, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 14, 0, + 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0,105,116,101, +109, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 3, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, + 4, 13, 0, 0, 0,104,105,103,104,108,105,103,104,116, 95, 99, 98, 0, 4, 14, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, + 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, + 0, 4, 5, 0, 0, 0, 73,116,101,109, 0, 4, 6, 0, 0, 0,116,105,116,108, +101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, + 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/item.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/item_be32.loh b/iup/srclua5/loh/item_be32.loh new file mode 100755 index 0000000..f707f78 --- /dev/null +++ b/iup/srclua5/loh/item_be32.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/item_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/item_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,105,116,101, +109, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 19, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0,128, 74,131,194, 0, 73,132,194, 0, 73,131, 0, 64, 9, 0, 0, + 0,100,133, 0, 64, 9, 0, 2,192, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 3, + 0, 69, 0, 0, 0,128, 0, 3, 64,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, + 0, 14, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 5,105,116,101, +109, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, + 4, 0, 0, 0, 3, 83, 45, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 4, 0, 0, 0, 1, 0, + 4, 0, 0, 0, 13,104,105,103,104,108,105,103,104,116, 95, 99, 98, 0, 4, 0, + 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, + 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, 0, +133, 0,192, 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, + 2, 4, 0, 0, 0, 5, 73,116,101,109, 0, 4, 0, 0, 0, 6,116,105,116,108, +101, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, + 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, + 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, + 99,116,114,108, 0, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/item_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/item_be64.loh b/iup/srclua5/loh/item_be64.loh new file mode 100755 index 0000000..45ac562 --- /dev/null +++ b/iup/srclua5/loh/item_be64.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/item_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/item_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,105,116,101,109, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0,194,131, 73, 0,194,132, 9, 64, + 0,131,100, 0, 0, 0, 9, 64, 0,133, 69,192, 2, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 0, 3, 0,128, 0, 0, 0,193, 64, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 14, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,105,116,101,109, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,104,105,103,104,108,105,103,104,116, 95, 99, + 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101, +109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103, +105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, + 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, + 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 73,116,101,109, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, + 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/item_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/item_le64.loh b/iup/srclua5/loh/item_le64.loh new file mode 100755 index 0000000..6f43478 --- /dev/null +++ b/iup/srclua5/loh/item_le64.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/item_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/item_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,105,116,101,109, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0,194,131, 73, 0,194,132, 9, 64, + 0,131,100, 0, 0, 0, 9, 64, 0,133, 69,192, 2, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 0, 3, 0,128, 0, 0, 0,193, 64, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 14, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,105,116,101,109, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,104,105,103,104,108,105,103,104,116, 95, 99, + 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101, +109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103, +105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, + 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, + 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 73,116,101,109, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, + 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/item_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/item_le64w.loh b/iup/srclua5/loh/item_le64w.loh new file mode 100755 index 0000000..4c635a0 --- /dev/null +++ b/iup/srclua5/loh/item_le64w.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/item_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/item_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,105,116,101,109, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0,194,131, 73, 0,194,132, 9, 64, + 0,131,100, 0, 0, 0, 9, 64, 0,133, 69,192, 2, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 0, 3, 0,128, 0, 0, 0,193, 64, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 14, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,105,116,101,109, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,104,105,103,104,108,105,103,104,116, 95, 99, + 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101, +109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103, +105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, + 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, + 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 73,116,101,109, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, + 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/item_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/iuplua.loh b/iup/srclua5/loh/iuplua.loh new file mode 100755 index 0000000..8f7ee10 --- /dev/null +++ b/iup/srclua5/loh/iuplua.loh @@ -0,0 +1,487 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/iuplua.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/iuplua.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 12, 0, 0, 0, 64,105,117,112, +108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 7, +114, 0, 0, 0, 10, 0, 0, 0, 7, 0, 0, 0, 36, 0, 0, 0, 7, 64, 0, 0, + 36, 64, 0, 0, 7,128, 0, 0, 36,128, 0, 0, 69,192, 0, 0,129, 0, 1, 0, + 92, 64, 0, 1, 69, 64, 1, 0,129, 0, 1, 0,193,128, 1, 0, 0, 1, 0, 0, + 92, 64, 0, 2,100,192, 0, 0,164, 0, 1, 0,197,192, 0, 0, 1,193, 1, 0, +220, 64, 0, 1,197, 64, 1, 0, 1,193, 1, 0, 65,129, 1, 0,128, 1,128, 0, +220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65, 1, 2, 0,128, 1, 0, 1, +220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65, 65, 2, 0,133,129, 2, 0, +220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65,193, 2, 0,133, 1, 3, 0, +220, 64, 0, 2,228, 64, 1, 0,199, 64, 3, 0,228,128, 1, 0,199,128, 3, 0, +228,192, 1, 0,199,192, 3, 0,202, 64, 0, 0, 10, 1, 0, 0,201, 0,129,136, +199, 0, 4, 0,197, 0, 4, 0, 36, 1, 2, 0,201, 0, 1,137,197, 0, 4, 0, + 36, 65, 2, 0,201, 0,129,137,197, 0, 4, 0, 36,129, 2, 0,201, 0, 1,138, +197, 0, 4, 0, 36,193, 2, 0,201, 0,129,138,197, 0, 4, 0, 36, 1, 3, 0, +201, 0, 1,139,197,192, 5, 0, 5, 1, 4, 0, 65, 1, 1, 0,220, 64,128, 1, +202, 64, 0, 0, 5, 1, 4, 0,201, 0,129,140,199, 0, 6, 0,197, 0, 6, 0, + 36, 65, 3, 0,201, 0, 1,139,197,192, 5, 0, 5, 1, 6, 0, 65, 1, 1, 0, +220, 64,128, 1,195, 0,128, 1,199,128, 6, 0,228,128, 3, 0,199,192, 6, 0, +228,192, 3, 0,199, 0, 7, 0,228, 0, 4, 0,199, 64, 7, 0,228, 64, 4, 0, +199,128, 7, 0,228,128, 4, 0,199,192, 7, 0,228,192, 4, 0,199, 0, 8, 0, +197, 64, 8, 0,198,128,200, 1,218, 0, 0, 0, 22,128, 3,128,197, 64, 8, 0, +198,128,200, 1,198,192,200, 1, 5, 65, 9, 0,201, 0, 1,146,197, 64, 8, 0, +198,128,200, 1,198,192,200, 1, 5, 65, 9, 0,201, 0, 1,147,197, 64, 9, 0, + 5, 65, 9, 0,201, 0,129,147,197, 64, 9, 0,201, 0, 73,148, 30, 0,128, 0, + 41, 0, 0, 0, 4, 10, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107,115, 0, 4, + 14, 0, 0, 0,105,117,112, 67, 97,108,108, 77,101,116,104,111,100, 0, 4, 17, + 0, 0, 0, 82,101,103,105,115,116,101,114, 67, 97,108,108, 98, 97, 99,107, 0, + 4, 12, 0, 0, 0,105,117,112, 78,101,119, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, 0, 0,105,117, +112, 83,101,116, 77,101,116,104,111,100, 0, 4, 8, 0, 0, 0, 95, 95,105,110, +100,101,120, 0, 4, 11, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, + 4, 11, 0, 0, 0, 95, 95,110,101,119,105,110,100,101,120, 0, 4, 11, 0, 0, + 0, 95, 95,116,111,115,116,114,105,110,103, 0, 4, 17, 0, 0, 0,105,104, 97, +110,100,108,101, 95,116,111,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0, 95, + 95,101,113, 0, 4, 16, 0, 0, 0,105,104, 97,110,100,108,101, 95, 99,111,109, +112, 97,114,101, 0, 4, 16, 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101, +116,110, 97,109,101, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 15, 0, 0, 0, 82,101,103,105,115,116, +101,114, 72, 97,110,100,108,101, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, + 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 5, 0, 0, 0, +115,104,111,119, 0, 4, 5, 0, 0, 0,104,105,100,101, 0, 4, 4, 0, 0, 0, +109, 97,112, 0, 4, 12, 0, 0, 0, 99,111,110,115,116,114,117, 99,116,111,114, + 0, 4, 14, 0, 0, 0,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, + 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 4, 0, + 0, 0, 66, 79, 88, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 20, + 0, 0, 0,101,114,114,111,114, 95,109,101,115,115, 97,103,101, 95,112,111,112, +117,112, 0, 4, 14, 0, 0, 0, 95, 69, 82, 82, 79, 82, 77, 69, 83, 83, 65, 71, + 69, 0, 4, 5, 0, 0, 0,112, 97, 99,107, 0, 4, 15, 0, 0, 0,112,114,111, +116,101, 99,116,101,100, 99, 97,108,108, 95, 0, 4, 9, 0, 0, 0,100,111,115, +116,114,105,110,103, 0, 4, 7, 0, 0, 0,100,111,102,105,108,101, 0, 4, 4, + 0, 0, 0, 82, 71, 66, 0, 4, 3, 0, 0, 0, 95, 71, 0, 4, 8, 0, 0, 0, +112, 97, 99,107, 97,103,101, 0, 4, 7, 0, 0, 0,108,111, 97,100,101,100, 0, + 4, 7, 0, 0, 0,105,117,112,108,117, 97, 0, 4, 4, 0, 0, 0,105,117,112, + 0, 4, 9, 0, 0, 0,105,117,112,108,117, 97, 53, 49, 0, 4, 3, 0, 0, 0, + 95, 77, 0, 4, 9, 0, 0, 0, 95, 80, 65, 67, 75, 65, 71, 69, 0, 20, 0, 0, + 0, 0, 0, 0, 0, 9, 0, 0, 0, 27, 0, 0, 0, 0, 1, 7, 7, 35, 0, 0, + 0,134, 0,192, 0,198, 0, 0, 1,218, 64, 0, 0, 22, 0, 0,128, 30, 0,128, + 0, 5, 65, 0, 0, 64, 1,128, 1, 28,129, 0, 1, 23,128, 64, 2, 22,128, 1, +128, 0, 1,128, 1, 69,193, 0, 0,128, 1,128, 0, 92, 1, 0, 1, 29, 1, 0, + 0, 30, 1, 0, 0, 22, 0, 4,128, 5, 65, 0, 0, 64, 1,128, 1, 28,129, 0, + 1, 23, 0, 65, 2, 22, 0, 2,128, 5, 65, 1, 0,135, 64, 1, 0, 69,129, 1, + 0, 70,193,193, 2,128, 1,128, 1, 92,129, 0, 1, 7, 65, 1, 0, 94, 1, 0, + 1, 22,128, 0,128, 5,129, 1, 0, 6, 1, 66, 2, 30, 1, 0, 1, 30, 0,128, + 0, 9, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 5, 0, 0, 0,116, +121,112,101, 0, 4, 9, 0, 0, 0,102,117,110, 99,116,105,111,110, 0, 4, 7, + 0, 0, 0,117,110,112, 97, 99,107, 0, 4, 7, 0, 0, 0,115,116,114,105,110, +103, 0, 4, 5, 0, 0, 0,115,101,108,102, 0, 4, 4, 0, 0, 0,105,117,112, + 0, 4, 9, 0, 0, 0,100,111,115,116,114,105,110,103, 0, 4, 6, 0, 0, 0, + 69, 82, 82, 79, 82, 0, 0, 0, 0, 0, 35, 0, 0, 0, 10, 0, 0, 0, 11, 0, + 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 25, 0, + 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 27, 0, 0, 0, 6, 0, 0, 0, 5, 0, + 0, 0,110, 97,109,101, 0, 0, 0, 0, 0, 34, 0, 0, 0, 4, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 34, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108, +101, 0, 1, 0, 0, 0, 34, 0, 0, 0, 5, 0, 0, 0,102,117,110, 99, 0, 2, + 0, 0, 0, 34, 0, 0, 0, 5, 0, 0, 0,116,101,109,112, 0, 23, 0, 0, 0, + 30, 0, 0, 0, 7, 0, 0, 0,114,101,115,117,108,116, 0, 28, 0, 0, 0, 30, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 37, 0, 0, 0, 0, + 3, 0, 5, 15, 0, 0, 0,197, 0, 0, 0,198, 0,128, 1,218, 64, 0, 0, 22, +128, 0,128,197, 0, 0, 0, 10, 1, 0, 0,201, 0, 1, 0,197, 0, 0, 0,198, + 0,128, 1,154, 0, 0, 0, 22, 64, 0,128,201, 64, 0, 1, 22, 0, 0,128,201, + 64,128,128, 30, 0,128, 0, 2, 0, 0, 0, 4, 10, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 15, + 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, + 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 35, 0, 0, 0, 37, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0,110, 97,109,101, 0, 0, 0, 0, 0, + 14, 0, 0, 0, 5, 0, 0, 0,102,117,110, 99, 0, 0, 0, 0, 0, 14, 0, 0, + 0, 5, 0, 0, 0,116,121,112,101, 0, 0, 0, 0, 0, 14, 0, 0, 0, 3, 0, + 0, 0, 99, 98, 0, 9, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 44, 0, 0, 0, 53, 0, 0, 0, 0, 2, 0, 7, 21, 0, 0, 0,128, 0, 0, + 0,195, 0,128, 1, 5, 1, 0, 0, 64, 1, 0, 1,128, 1,128, 0, 28,129,128, + 1,192, 0, 0, 2,218, 0, 0, 0, 22, 0, 0,128,222, 0, 0, 1, 5, 1, 0, + 0, 64, 1, 0, 1,129, 65, 0, 0, 28,129,128, 1,128, 0, 0, 2,154, 64, 0, + 0, 22, 0,252,127, 3, 1, 0, 2, 30, 1, 0, 1, 22, 64,251,127, 30, 0,128, + 0, 2, 0, 0, 0, 4, 7, 0, 0, 0,114, 97,119,103,101,116, 0, 4, 7, 0, + 0, 0,112, 97,114,101,110,116, 0, 0, 0, 0, 0, 21, 0, 0, 0, 45, 0, 0, + 0, 46, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, + 0, 48, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 50, 0, 0, + 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, + 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 53, 0, 0, + 0, 4, 0, 0, 0, 7, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, + 20, 0, 0, 0, 6, 0, 0, 0,105,110,100,101,120, 0, 0, 0, 0, 0, 20, 0, + 0, 0, 2, 0, 0, 0,112, 0, 1, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, +118, 0, 2, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, + 0, 0, 79, 0, 0, 0, 0, 2, 0, 7, 67, 0, 0, 0,133, 0, 0, 0,134, 64, + 64, 1,192, 0,128, 0,156,128, 0, 1,197,128, 0, 0,198,128,128, 1,218, 0, + 0, 0, 22,192, 3,128,197,192, 0, 0, 0, 1, 0, 0,220,128, 0, 1,218, 0, + 0, 0, 22, 0, 1,128, 5, 1, 1, 0, 64, 1,128, 1, 28,129, 0, 1, 87, 64, + 65, 2, 22,128, 0,128, 5,129, 1, 0, 65,193, 1, 0, 28, 65, 0, 1, 6, 65, +128, 1, 30, 1, 0, 1, 22, 64, 10,128,197, 0, 2, 0, 0, 1, 0, 0, 64, 1, + 0, 1,220,128,128, 1,218, 64, 0, 0, 22,192, 3,128, 5,193, 0, 0, 64, 1, + 0, 0, 28,129, 0, 1, 26, 1, 0, 0, 22, 0, 1,128, 69, 1, 1, 0,128, 1, + 0, 2, 92,129, 0, 1, 87, 64,193, 2, 22,128, 0,128, 69,129, 1, 0,129,193, + 1, 0, 92, 65, 0, 1, 70, 65, 0, 2, 94, 1, 0, 1, 22,192, 4,128, 5, 1, + 1, 0, 64, 1,128, 1, 28,129, 0, 1, 87, 64, 66, 2, 22, 0, 1,128, 5, 1, + 1, 0, 64, 1,128, 1, 28,129, 0, 1, 23, 0, 64, 2, 22, 0, 2,128, 5,129, + 2, 0, 64, 1,128, 1, 28,129, 0, 1, 26, 1, 0, 0, 22, 64, 0,128, 30, 1, + 0, 1, 22,128, 0,128,222, 0, 0, 1, 22, 0, 0,128,222, 0, 0, 1, 30, 0, +128, 0, 11, 0, 0, 0, 4, 7, 0, 0, 0,115,116,114,105,110,103, 0, 4, 6, + 0, 0, 0,117,112,112,101,114, 0, 4, 10, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107,115, 0, 4, 13, 0, 0, 0,105,117,112, 71,101,116, 87,105,100,103,101, +116, 0, 4, 5, 0, 0, 0,116,121,112,101, 0, 4, 6, 0, 0, 0,116, 97, 98, +108,101, 0, 4, 6, 0, 0, 0,101,114,114,111,114, 0, 4, 19, 0, 0, 0,105, +110,118, 97,108,105,100, 32,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 13, + 0, 0, 0, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 7, 0, 0, + 0,110,117,109, 98,101,114, 0, 4, 10, 0, 0, 0, 71,101,116, 72, 97,110,100, +108,101, 0, 0, 0, 0, 0, 67, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, + 0, 0, 0, 60, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, + 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, 64, + 0, 0, 0, 64, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, + 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, + 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, + 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, + 0, 0, 0, 70, 0, 0, 0, 70, 0, 0, 0, 70, 0, 0, 0, 71, 0, 0, 0, 71, + 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, + 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 72, 0, 0, 0, 72, + 0, 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 73, + 0, 0, 0, 74, 0, 0, 0, 74, 0, 0, 0, 76, 0, 0, 0, 79, 0, 0, 0, 7, + 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 66, 0, + 0, 0, 6, 0, 0, 0,105,110,100,101,120, 0, 0, 0, 0, 0, 66, 0, 0, 0, + 6, 0, 0, 0, 73, 78, 68, 69, 88, 0, 4, 0, 0, 0, 66, 0, 0, 0, 7, 0, + 0, 0,111, 98,106,101, 99,116, 0, 11, 0, 0, 0, 23, 0, 0, 0, 6, 0, 0, + 0,118, 97,108,117,101, 0, 28, 0, 0, 0, 66, 0, 0, 0, 7, 0, 0, 0,111, + 98,106,101, 99,116, 0, 33, 0, 0, 0, 45, 0, 0, 0, 3, 0, 0, 0,105,104, + 0, 59, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, + 0,109, 0, 0, 0, 0, 3, 0, 14, 78, 0, 0, 0,197, 0, 0, 0, 0, 1,128, + 0,220,128, 0, 1, 5, 1, 0, 0, 64, 1, 0, 1, 28,129, 0, 1, 69, 65, 0, + 0,128, 1, 0, 0, 92,129, 0, 1, 90, 1, 0, 0, 22, 0, 1,128,133, 1, 0, + 0,192, 1,128, 2,156,129, 0, 1, 87,128, 64, 3, 22,128, 0,128,133,193, 0, + 0,193, 1, 1, 0,156, 65, 0, 1, 87, 64,193, 1, 22, 64, 0,128, 23,128,193, + 1, 22, 0, 13,128,133,129, 1, 0,134,193, 65, 3,192, 1,128, 0,156,129, 0, + 1,197, 1, 2, 0,198,129,129, 3,218, 1, 0, 0, 22,128, 3,128, 6, 66,194, + 3, 26, 66, 0, 0, 22,192, 0,128, 69,130, 2, 0,128, 2, 0, 0, 92,130, 0, + 1, 6, 66,130, 3, 69,194, 2, 0,128, 2, 0, 0,192, 2, 0, 3, 0, 3, 0, + 4, 64, 3, 0, 1, 92, 66,128, 2, 73,129,128, 0, 22,128, 7,128, 5, 2, 3, + 0, 64, 2, 0, 1, 28,130, 0, 1, 23, 64, 67, 4, 22, 64, 2,128, 5,130, 3, + 0, 64, 2, 0, 1, 28,130, 0, 1, 69,194, 3, 0,128, 2, 0, 0,192, 2, 0, + 3, 0, 3, 0, 4, 92, 66, 0, 2, 73, 1,196, 0, 22,192, 3,128, 87,128, 65, + 2, 22,192, 0,128, 87, 64, 65, 2, 22, 64, 0,128, 23, 64, 68, 2, 22,128, 1, +128, 5,194, 3, 0, 64, 2, 0, 0,128, 2, 0, 3,192, 2, 0, 1, 28, 66, 0, + 2, 73, 1,196, 0, 22,128, 0,128, 73,129,128, 0, 22, 0, 0,128, 73,129,128, + 0, 30, 0,128, 0, 18, 0, 0, 0, 4, 5, 0, 0, 0,116,121,112,101, 0, 4, + 13, 0, 0, 0,105,117,112, 71,101,116, 87,105,100,103,101,116, 0, 4, 6, 0, + 0, 0,116, 97, 98,108,101, 0, 4, 6, 0, 0, 0,101,114,114,111,114, 0, 4, + 19, 0, 0, 0,105,110,118, 97,108,105,100, 32,105,117,112, 32,104, 97,110,100, +108,101, 0, 4, 7, 0, 0, 0,110,117,109, 98,101,114, 0, 4, 7, 0, 0, 0, +115,116,114,105,110,103, 0, 4, 6, 0, 0, 0,117,112,112,101,114, 0, 4, 10, + 0, 0, 0, 99, 97,108,108, 98, 97, 99,107,115, 0, 3, 0, 0, 0, 0, 0, 0, +240, 63, 4, 13, 0, 0, 0, 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, + 4, 15, 0, 0, 0,105,117,112, 83,101,116, 67, 97,108,108, 98, 97, 99,107, 0, + 4, 12, 0, 0, 0,105,117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 16, 0, 0, 0,105,104, + 97,110,100,108,101, 95,115,101,116,110, 97,109,101, 0, 4, 13, 0, 0, 0, 83, +101,116, 65,116,116,114,105, 98,117,116,101, 0, 0, 4, 4, 0, 0, 0,110,105, +108, 0, 0, 0, 0, 0, 78, 0, 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 82, 0, + 0, 0, 83, 0, 0, 0, 83, 0, 0, 0, 83, 0, 0, 0, 84, 0, 0, 0, 84, 0, + 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, + 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, + 0, 0, 85, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, 0, + 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 88, 0, + 0, 0, 88, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 90, 0, 0, 0, 91, 0, + 0, 0, 91, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, 0, + 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, + 0, 0, 94, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 96, 0, 0, 0, 96, 0, + 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 97, 0, 0, 0, 97, 0, + 0, 0, 97, 0, 0, 0, 98, 0, 0, 0, 98, 0, 0, 0, 98, 0, 0, 0, 98, 0, + 0, 0, 98, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0,100, 0, 0, 0,100, 0, + 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,101, 0, + 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,102, 0, + 0, 0,102, 0, 0, 0,104, 0, 0, 0,105, 0, 0, 0,107, 0, 0, 0,109, 0, + 0, 0, 10, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, + 0, 77, 0, 0, 0, 6, 0, 0, 0,105,110,100,101,120, 0, 0, 0, 0, 0, 77, + 0, 0, 0, 6, 0, 0, 0,118, 97,108,117,101, 0, 0, 0, 0, 0, 77, 0, 0, + 0, 3, 0, 0, 0,116,105, 0, 3, 0, 0, 0, 77, 0, 0, 0, 3, 0, 0, 0, +116,118, 0, 6, 0, 0, 0, 77, 0, 0, 0, 7, 0, 0, 0,111, 98,106,101, 99, +116, 0, 9, 0, 0, 0, 77, 0, 0, 0, 6, 0, 0, 0, 73, 78, 68, 69, 88, 0, + 27, 0, 0, 0, 75, 0, 0, 0, 3, 0, 0, 0, 99, 98, 0, 29, 0, 0, 0, 75, + 0, 0, 0, 5, 0, 0, 0,102,117,110, 99, 0, 32, 0, 0, 0, 45, 0, 0, 0, + 5, 0, 0, 0,110, 97,109,101, 0, 54, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,122, 0, 0, 0,130, 0, 0, 0, 0, 1, 0, 6, 19, 0, 0, + 0, 69, 0, 0, 0,128, 0, 0, 0, 92,128, 0, 1, 90, 64, 0, 0, 22,192, 2, +128,133, 64, 0, 0,134,128, 64, 1,193,192, 0, 0, 5, 1, 1, 0, 64, 1, 0, + 0, 28, 1, 0, 1,156,128, 0, 0,197, 64, 1, 0, 0, 1, 0, 1, 64, 1, 0, + 0,220, 64,128, 1,158, 0, 0, 1, 94, 0, 0, 1, 30, 0,128, 0, 6, 0, 0, + 0, 4, 8, 0, 0, 0, 71,101,116, 78, 97,109,101, 0, 4, 7, 0, 0, 0,115, +116,114,105,110,103, 0, 4, 7, 0, 0, 0,102,111,114,109, 97,116, 0, 4, 17, + 0, 0, 0, 95, 73, 85, 80, 76, 85, 65, 95, 78, 65, 77, 69, 40, 37,115, 41, 0, + 4, 9, 0, 0, 0,116,111,115,116,114,105,110,103, 0, 4, 10, 0, 0, 0, 83, +101,116, 72, 97,110,100,108,101, 0, 0, 0, 0, 0, 19, 0, 0, 0,123, 0, 0, + 0,123, 0, 0, 0,123, 0, 0, 0,124, 0, 0, 0,124, 0, 0, 0,125, 0, 0, + 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,125, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, + 0,127, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, + 0,118, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0,110, 97,109,101, 0, + 3, 0, 0, 0, 18, 0, 0, 0, 9, 0, 0, 0, 97,117,116,111,110, 97,109,101, + 0, 12, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,132, 0, 0, + 0,136, 0, 0, 0, 0, 1, 0, 4, 6, 0, 0, 0, 69, 0, 0, 0,134, 64, 64, + 0,228, 0, 0, 0, 0, 0, 0, 0, 73,192, 0, 1, 30, 0,128, 0, 2, 0, 0, + 0, 4, 4, 0, 0, 0,105,117,112, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, + 1, 0, 0, 0, 0, 0, 0, 0,133, 0, 0, 0,135, 0, 0, 0, 1, 1, 0, 4, + 6, 0, 0, 0, 68, 0, 0, 0, 75, 0,192, 0,192, 0, 0, 0, 93, 0,128, 1, + 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 12, 0, 0, 0, 99,111,110, +115,116,114,117, 99,116,111,114, 0, 0, 0, 0, 0, 6, 0, 0, 0,134, 0, 0, + 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,135, 0, 0, + 0, 1, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 5, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 6, 0, 0, 0,133, 0, + 0, 0,133, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,136, 0, + 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,138, 0, 0, 0,156, 0, 0, 0, 0, + 2, 0, 8, 31, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 1, 65, 0, 0,156, + 64,128, 1,133,128, 0, 0,192, 0, 0, 0,156,128, 0, 1,154, 64, 0, 0, 22, +192, 4,128,197,192, 0, 0, 5, 1, 1, 0, 6, 65, 65, 2, 64, 1,128, 0, 28, +129, 0, 1,198, 0,129, 1,218, 64, 0, 0, 22, 0, 0,128,197,128, 1, 0, 10, +129, 0, 0, 9,193,128,131, 9, 1, 0,132, 69, 1, 0, 0,128, 1, 0, 2,193, + 65, 2, 0, 92, 65,128, 1, 69,129, 2, 0,128, 1, 0, 0,192, 1, 0, 2, 92, + 65,128, 1, 30, 0, 0, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 12, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, + 32,104, 97,110,100,108,101, 0, 4, 13, 0, 0, 0,105,117,112, 71,101,116, 87, +105,100,103,101,116, 0, 4, 4, 0, 0, 0,105,117,112, 0, 4, 7, 0, 0, 0, +115,116,114,105,110,103, 0, 4, 6, 0, 0, 0,117,112,112,101,114, 0, 4, 7, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 7, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 11, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, 0, 0,105,117,112, 83,101, +116, 87,105,100,103,101,116, 0, 0, 0, 0, 0, 31, 0, 0, 0,140, 0, 0, 0, +140, 0, 0, 0,140, 0, 0, 0,140, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0, +142, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0, +145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,146, 0, 0, 0, +146, 0, 0, 0,147, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0,150, 0, 0, 0, +151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,152, 0, 0, 0, +152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,155, 0, 0, 0,156, 0, 0, 0, + 5, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 30, + 0, 0, 0, 9, 0, 0, 0,116,121,112,101,110, 97,109,101, 0, 0, 0, 0, 0, + 30, 0, 0, 0, 7, 0, 0, 0,111, 98,106,101, 99,116, 0, 7, 0, 0, 0, 30, + 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 15, 0, 0, 0, 29, 0, 0, + 0, 7, 0, 0, 0,111, 98,106,101, 99,116, 0, 21, 0, 0, 0, 29, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,166, 0, 0, 0,168, 0, 0, 0, 0, 1, 0, 3, + 4, 0, 0, 0, 69, 0, 0, 0,134, 64, 64, 0, 92, 64, 0, 1, 30, 0,128, 0, + 2, 0, 0, 0, 4, 5, 0, 0, 0, 83,104,111,119, 0, 4, 7, 0, 0, 0,104, + 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0,167, 0, 0, 0,167, 0, + 0, 0,167, 0, 0, 0,168, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0,111, 98, +106,101, 99,116, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,170, 0, 0, 0,172, 0, 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 69, 0, 0, + 0,134, 64, 64, 0, 92, 64, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 5, 0, + 0, 0, 72,105,100,101, 0, 4, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 4, 0, 0, 0,171, 0, 0, 0,171, 0, 0, 0,171, 0, 0, 0,172, + 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,174, 0, 0, 0,176, 0, + 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 69, 0, 0, 0,134, 64, 64, 0, 92, 64, + 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 4, 0, 0, 0, 77, 97,112, 0, 4, + 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0,175, + 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,176, 0, 0, 0, 1, 0, 0, 0, 7, + 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,178, 0, 0, 0,189, 0, 0, 0, 0, 2, 0, 7, 23, 0, + 0, 0,139, 0, 64, 0, 0, 1,128, 0,156,128,128, 1,202,128, 0, 0,201, 0, +128,128,201,128, 0,129, 5,193, 0, 0, 64, 1, 0, 1,129, 1, 1, 0, 28, 65, +128, 1, 5,193, 0, 0, 64, 1,128, 1,129, 65, 1, 0, 28, 65,128, 1, 5,129, + 1, 0, 64, 1, 0, 1,128, 1,128, 1, 28, 65,128, 1, 11,193,193, 1,128, 1, +128, 0, 28, 65,128, 1,158, 0, 0, 1, 30, 0,128, 0, 8, 0, 0, 0, 4, 14, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 7, 0, + 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0,104, 97,110,100,108,101, + 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 11, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, 0, 0,105,117,112, 83,101, +116, 87,105,100,103,101,116, 0, 4, 14, 0, 0, 0,115,101,116, 65,116,116,114, +105, 98,117,116,101,115, 0, 0, 0, 0, 0, 23, 0, 0, 0,179, 0, 0, 0,179, + 0, 0, 0,179, 0, 0, 0,180, 0, 0, 0,181, 0, 0, 0,182, 0, 0, 0,184, + 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,185, 0, 0, 0,185, + 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, + 0, 0, 0,186, 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0,188, + 0, 0, 0,189, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, + 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 22, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 3, 0, 0, 0, + 22, 0, 0, 0, 7, 0, 0, 0,111, 98,106,101, 99,116, 0, 6, 0, 0, 0, 22, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 0, 0, 0,203, 0, 0, 0, 0, + 2, 0, 12, 25, 0, 0, 0,134, 0, 64, 0,197, 64, 0, 0, 0, 1,128, 0,220, + 0, 1, 1, 22, 0, 4,128, 5,130, 0, 0, 64, 2, 0, 3, 28,130, 0, 1, 23, +192, 64, 4, 22,128, 2,128, 5, 2, 1, 0, 64, 2,128, 3, 28,130, 0, 1, 23, + 64, 65, 4, 22, 64, 1,128, 5,130, 1, 0, 64, 2, 0, 0,128, 2, 0, 3,192, + 2,128, 3, 28, 66, 0, 2, 22, 0, 0,128,137,192, 1, 3,225,128, 0, 0, 22, + 0,251,127, 30, 0,128, 0, 7, 0, 0, 0, 4, 7, 0, 0, 0,104, 97,110,100, +108,101, 0, 4, 6, 0, 0, 0,112, 97,105,114,115, 0, 4, 5, 0, 0, 0,116, +121,112,101, 0, 4, 7, 0, 0, 0,110,117,109, 98,101,114, 0, 4, 12, 0, 0, + 0,105,117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117, +112, 32,104, 97,110,100,108,101, 0, 4, 7, 0, 0, 0,114, 97,119,115,101,116, + 0, 0, 0, 0, 0, 25, 0, 0, 0,192, 0, 0, 0,193, 0, 0, 0,193, 0, 0, + 0,193, 0, 0, 0,193, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, + 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, + 0,194, 0, 0, 0,194, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, + 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,200, 0, 0, 0,193, 0, 0, + 0,201, 0, 0, 0,203, 0, 0, 0, 8, 0, 0, 0, 7, 0, 0, 0,111, 98,106, +101, 99,116, 0, 0, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 24, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 1, + 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 40,102,111,114, 32,103,101,110,101, +114, 97,116,111,114, 41, 0, 4, 0, 0, 0, 24, 0, 0, 0, 12, 0, 0, 0, 40, +102,111,114, 32,115,116, 97,116,101, 41, 0, 4, 0, 0, 0, 24, 0, 0, 0, 14, + 0, 0, 0, 40,102,111,114, 32, 99,111,110,116,114,111,108, 41, 0, 4, 0, 0, + 0, 24, 0, 0, 0, 2, 0, 0, 0,105, 0, 5, 0, 0, 0, 22, 0, 0, 0, 2, + 0, 0, 0,118, 0, 5, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,218, 0, 0, 0,227, 0, 0, 0, 0, 2, 0, 11, 25, 0, 0, 0,133, 0, 0, + 0,192, 0, 0, 0, 1, 65, 0, 0,156,128,128, 1,212, 0,128, 0, 1,129, 0, + 0, 64, 1,128, 1,129,129, 0, 0, 32, 1, 2,128, 5,194, 0, 0, 70,194,129, + 0, 28,130, 0, 1, 23, 0, 65, 4, 22,192, 0,128, 5, 66, 1, 0, 64, 2, 0, + 1,134,194,129, 0, 28, 66,128, 1, 31, 65,253,127, 5,129, 1, 0, 6,193, 65, + 2, 64, 1, 0, 0,128, 1,128, 0, 28, 65,128, 1, 30, 0,128, 0, 8, 0, 0, + 0, 4, 7, 0, 0, 0,114, 97,119,103,101,116, 0, 4, 7, 0, 0, 0,104, 97, +110,100,108,101, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 12, 0, 0, 0,105, +117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32, +104, 97,110,100,108,101, 0, 4, 7, 0, 0, 0, 65,112,112,101,110,100, 0, 4, + 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 14, 0, 0, 0,115,101,116, 65, +116,116,114,105, 98,117,116,101,115, 0, 0, 0, 0, 0, 25, 0, 0, 0,219, 0, + 0, 0,219, 0, 0, 0,219, 0, 0, 0,219, 0, 0, 0,220, 0, 0, 0,221, 0, + 0, 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,222, 0, 0, 0,222, 0, + 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,223, 0, 0, 0,223, 0, + 0, 0,223, 0, 0, 0,223, 0, 0, 0,221, 0, 0, 0,226, 0, 0, 0,226, 0, + 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,227, 0, 0, 0, 8, 0, + 0, 0, 7, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 24, 0, 0, + 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 24, 0, 0, 0, 7, 0, 0, + 0,104, 97,110,100,108,101, 0, 4, 0, 0, 0, 24, 0, 0, 0, 2, 0, 0, 0, +110, 0, 5, 0, 0, 0, 24, 0, 0, 0, 12, 0, 0, 0, 40,102,111,114, 32,105, +110,100,101,120, 41, 0, 8, 0, 0, 0, 19, 0, 0, 0, 12, 0, 0, 0, 40,102, +111,114, 32,108,105,109,105,116, 41, 0, 8, 0, 0, 0, 19, 0, 0, 0, 11, 0, + 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, 8, 0, 0, 0, 19, 0, 0, + 0, 2, 0, 0, 0,105, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,238, 0, 0, 0,252, 0, 0, 0, 0, 2, 0, 10, 52, 0, 0, 0,128, + 0, 0, 0,219, 64,128, 0, 22, 0, 0,128,193, 0, 0, 0, 21,192, 0, 1,133, + 64, 0, 0,154, 0, 0, 0, 22,128, 0,128,133, 64, 0, 0,137, 0, 0,129, 22, +192, 9,128,133,192, 0, 0,202,192, 0, 0,201, 64, 65,130,201,192, 65,131,201, + 64, 66,132,156,128, 0, 1,197,128, 2, 0, 10, 1, 1, 0, 9, 1,195,133, 9, + 1,195,134, 9, 1, 0,129, 9,129, 67,131,220,128, 0, 1, 5,193, 3, 0, 74, +193, 0, 1,128, 1,128, 1,192, 1, 0, 1, 73, 65, 68,136, 73,193, 68,137, 73, + 65, 69,138, 98, 65, 0, 1, 28,129, 0, 1, 69,129, 5, 0,138, 1,129, 0,192, + 1, 0, 2,137,193, 69,130,137,129, 0,140,137,129,128,140,137,129, 0,141,162, + 65,128, 0, 92,129, 0, 1,199, 64, 0, 0,139,193,198, 2, 5, 2, 7, 0, 69, + 2, 7, 0,156, 65, 0, 2,139, 65,199, 2,156, 65, 0, 1,131, 1, 0, 3,135, + 65, 0, 0, 30, 0,128, 0, 30, 0, 0, 0, 4, 1, 0, 0, 0, 0, 4, 20, 0, + 0, 0,101,114,114,111,114, 95,109,101,115,115, 97,103,101, 95,112,111,112,117, +112, 0, 4, 6, 0, 0, 0,118, 97,108,117,101, 0, 4, 7, 0, 0, 0, 98,117, +116,116,111,110, 0, 4, 6, 0, 0, 0,116,105,116,108,101, 0, 4, 3, 0, 0, + 0, 79,107, 0, 4, 5, 0, 0, 0,115,105,122,101, 0, 4, 3, 0, 0, 0, 54, + 48, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 44, 0, 0, 0,101, +114,114,111,114, 95,109,101,115,115, 97,103,101, 95,112,111,112,117,112, 32, 61, + 32,110,105,108, 59, 32,114,101,116,117,114,110, 32,105,117,112, 46, 67, 76, 79, + 83, 69, 0, 4, 10, 0, 0, 0,109,117,108,116,105,108,105,110,101, 0, 4, 7, + 0, 0, 0,101,120,112, 97,110,100, 0, 4, 4, 0, 0, 0, 89, 69, 83, 0, 4, + 9, 0, 0, 0,114,101, 97,100,111,110,108,121, 0, 4, 8, 0, 0, 0, 51, 48, + 48,120, 49, 53, 48, 0, 4, 5, 0, 0, 0,118, 98,111,120, 0, 4, 10, 0, 0, + 0, 97,108,105,103,110,109,101,110,116, 0, 4, 8, 0, 0, 0, 65, 67, 69, 78, + 84, 69, 82, 0, 4, 7, 0, 0, 0,109, 97,114,103,105,110, 0, 4, 6, 0, 0, + 0, 49, 48,120, 49, 48, 0, 4, 4, 0, 0, 0,103, 97,112, 0, 4, 3, 0, 0, + 0, 49, 48, 0, 4, 7, 0, 0, 0,100,105, 97,108,111,103, 0, 4, 14, 0, 0, + 0, 69,114,114,111,114, 32, 77,101,115,115, 97,103,101, 0, 4, 11, 0, 0, 0, +100,101,102, 97,117,108,116,101,115, 99, 0, 4, 13, 0, 0, 0,100,101,102, 97, +117,108,116,101,110,116,101,114, 0, 4, 11, 0, 0, 0,115,116, 97,114,116,102, +111, 99,117,115, 0, 4, 6, 0, 0, 0,112,111,112,117,112, 0, 4, 7, 0, 0, + 0, 67, 69, 78, 84, 69, 82, 0, 4, 8, 0, 0, 0,100,101,115,116,114,111,121, + 0, 0, 0, 0, 0, 52, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, + 0,239, 0, 0, 0,239, 0, 0, 0,240, 0, 0, 0,240, 0, 0, 0,240, 0, 0, + 0,241, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0,243, 0, 0, 0,243, 0, 0, + 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,244, 0, 0, + 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, + 0,244, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, + 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, + 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, + 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,247, 0, 0, + 0,248, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0,249, 0, 0, + 0,249, 0, 0, 0,250, 0, 0, 0,250, 0, 0, 0,252, 0, 0, 0, 6, 0, 0, + 0, 4, 0, 0, 0,101,114,114, 0, 0, 0, 0, 0, 51, 0, 0, 0, 10, 0, 0, + 0,116,114, 97, 99,101, 98, 97, 99,107, 0, 0, 0, 0, 0, 51, 0, 0, 0, 3, + 0, 0, 0, 98,116, 0, 17, 0, 0, 0, 51, 0, 0, 0, 3, 0, 0, 0,109,108, + 0, 24, 0, 0, 0, 51, 0, 0, 0, 3, 0, 0, 0,118, 98, 0, 33, 0, 0, 0, + 51, 0, 0, 0, 3, 0, 0, 0,100,103, 0, 42, 0, 0, 0, 51, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,254, 0, 0, 0,254, 0, 0, 0, 0, 0, 7, 2, 2, + 0, 0, 0, 30, 0, 0, 1, 30, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0,254, 0, 0, 0,254, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 13, 1, 0, 0, 0, 2, 0, 6, 29, 0, 0, 0, 26, 64, 0, 0, 22, +192, 0,128,133, 0, 0, 0,192, 0,128, 0,156, 64, 0, 1, 30, 0,128, 0,133, + 64, 0, 0,197,128, 0, 0, 0, 1, 0, 0,220, 0, 0, 1,156,128, 0, 0,198, +192, 64, 1,218, 64, 0, 0, 22, 0, 1,128,197, 0, 0, 0, 6, 1, 65, 1,220, + 64, 0, 1, 30, 0,128, 0, 22, 0, 2,128,197, 64, 1, 0,198,128,193, 1, 0, + 1, 0, 1, 65,193, 0, 0,220, 64,128, 1,197,192, 1, 0, 0, 1, 0, 1,221, + 0, 0, 1,222, 0, 0, 0, 30, 0,128, 0, 8, 0, 0, 0, 4, 14, 0, 0, 0, + 95, 69, 82, 82, 79, 82, 77, 69, 83, 83, 65, 71, 69, 0, 4, 5, 0, 0, 0,112, + 97, 99,107, 0, 4, 6, 0, 0, 0,112, 99, 97,108,108, 0, 3, 0, 0, 0, 0, + 0, 0,240, 63, 3, 0, 0, 0, 0, 0, 0, 0, 64, 4, 6, 0, 0, 0,116, 97, + 98,108,101, 0, 4, 7, 0, 0, 0,114,101,109,111,118,101, 0, 4, 7, 0, 0, + 0,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 29, 0, 0, 0, 1, 1, 0, 0, + 1, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 3, 1, 0, 0, + 5, 1, 0, 0, 5, 1, 0, 0, 5, 1, 0, 0, 5, 1, 0, 0, 5, 1, 0, 0, + 6, 1, 0, 0, 6, 1, 0, 0, 6, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, + 7, 1, 0, 0, 8, 1, 0, 0, 8, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, + 10, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 11, 1, 0, 0, 11, 1, 0, 0, + 11, 1, 0, 0, 11, 1, 0, 0, 13, 1, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, +102, 0, 0, 0, 0, 0, 28, 0, 0, 0, 4, 0, 0, 0,101,114,114, 0, 0, 0, + 0, 0, 28, 0, 0, 0, 4, 0, 0, 0,114,101,116, 0, 11, 0, 0, 0, 28, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 0, 1, + 0, 4, 7, 0, 0, 0, 69, 0, 0, 0,133, 64, 0, 0,192, 0, 0, 0,156, 0, + 0, 1, 93, 0, 0, 0, 94, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 15, + 0, 0, 0,112,114,111,116,101, 99,116,101,100, 99, 97,108,108, 95, 0, 4, 11, + 0, 0, 0,108,111, 97,100,115,116,114,105,110,103, 0, 0, 0, 0, 0, 7, 0, + 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, + 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0,115, 0, + 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 1, 0, 0, + 16, 1, 0, 0, 0, 1, 0, 4, 7, 0, 0, 0, 69, 0, 0, 0,133, 64, 0, 0, +192, 0, 0, 0,156, 0, 0, 1, 93, 0, 0, 0, 94, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 15, 0, 0, 0,112,114,111,116,101, 99,116,101,100, 99, 97, +108,108, 95, 0, 4, 9, 0, 0, 0,108,111, 97,100,102,105,108,101, 0, 0, 0, + 0, 0, 7, 0, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, + 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 1, 0, 0, 0, 2, 0, + 0, 0,102, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 18, 1, 0, 0, 20, 1, 0, 0, 0, 3, 0, 8, 9, 0, 0, 0,197, 0, 0, 0, +198, 64,192, 1, 1,129, 0, 0, 78, 1,128,129,142, 65,128,129,206,129,128,129, +221, 0,128, 2,222, 0, 0, 0, 30, 0,128, 0, 4, 0, 0, 0, 4, 7, 0, 0, + 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, 0,102,111,114,109, 97,116, 0, + 4, 9, 0, 0, 0, 37,100, 32, 37,100, 32, 37,100, 0, 3, 0, 0, 0, 0, 0, +224,111, 64, 0, 0, 0, 0, 9, 0, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, + 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, + 1, 0, 0, 20, 1, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0,114, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 2, 0, 0, 0,103, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, + 0, 0, 0, 98, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,114, 0, 0, + 0, 7, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, 0, 9, 0, 0, 0, 37, 0, 0, + 0, 29, 0, 0, 0, 53, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, + 0, 79, 0, 0, 0,109, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,111, 0, 0, + 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, + 0,113, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0,113, 0, 0, + 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, + 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, + 0,130, 0, 0, 0,122, 0, 0, 0,136, 0, 0, 0,132, 0, 0, 0,156, 0, 0, + 0,138, 0, 0, 0,162, 0, 0, 0,163, 0, 0, 0,163, 0, 0, 0,164, 0, 0, + 0,166, 0, 0, 0,168, 0, 0, 0,166, 0, 0, 0,170, 0, 0, 0,172, 0, 0, + 0,170, 0, 0, 0,174, 0, 0, 0,176, 0, 0, 0,174, 0, 0, 0,178, 0, 0, + 0,189, 0, 0, 0,178, 0, 0, 0,191, 0, 0, 0,203, 0, 0, 0,191, 0, 0, + 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,214, 0, 0, + 0,215, 0, 0, 0,215, 0, 0, 0,216, 0, 0, 0,218, 0, 0, 0,227, 0, 0, + 0,218, 0, 0, 0,229, 0, 0, 0,229, 0, 0, 0,229, 0, 0, 0,229, 0, 0, + 0,236, 0, 0, 0,236, 0, 0, 0,252, 0, 0, 0,238, 0, 0, 0,254, 0, 0, + 0,254, 0, 0, 0, 13, 1, 0, 0, 0, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, + 0, 16, 1, 0, 0, 16, 1, 0, 0, 20, 1, 0, 0, 18, 1, 0, 0, 24, 1, 0, + 0, 24, 1, 0, 0, 24, 1, 0, 0, 24, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, + 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, + 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 27, 1, 0, 0, 27, 1, 0, + 0, 27, 1, 0, 0, 28, 1, 0, 0, 28, 1, 0, 0, 29, 1, 0, 0, 3, 0, 0, + 0, 16, 0, 0, 0,119,105,100,103,101,116, 95,103,101,116,116, 97, 98,108,101, + 0, 7, 0, 0, 0,113, 0, 0, 0, 17, 0, 0, 0,105,104, 97,110,100,108,101, + 95,103,101,116,116, 97, 98,108,101, 0, 16, 0, 0, 0,113, 0, 0, 0, 17, 0, + 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,116, 97, 98,108,101, 0, 17, + 0, 0, 0,113, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/iuplua.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/iuplua_be32.loh b/iup/srclua5/loh/iuplua_be32.loh new file mode 100755 index 0000000..07dc238 --- /dev/null +++ b/iup/srclua5/loh/iuplua_be32.loh @@ -0,0 +1,489 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/iuplua_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/iuplua_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 12, 64,105,117,112, +108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 7, + 0, 0, 0,114, 0, 0, 0, 10, 0, 0, 0, 7, 0, 0, 0, 36, 0, 0, 64, 7, + 0, 0, 64, 36, 0, 0,128, 7, 0, 0,128, 36, 0, 0,192, 69, 0, 1, 0,129, + 1, 0, 64, 92, 0, 1, 64, 69, 0, 1, 0,129, 0, 1,128,193, 0, 0, 1, 0, + 2, 0, 64, 92, 0, 0,192,100, 0, 1, 0,164, 0, 0,192,197, 0, 1,193, 1, + 1, 0, 64,220, 0, 1, 64,197, 0, 1,193, 1, 0, 1,129, 65, 0,128, 1,128, + 2, 0, 64,220, 0, 1, 64,197, 0, 1,193, 1, 0, 2, 1, 65, 1, 0, 1,128, + 2, 0, 64,220, 0, 1, 64,197, 0, 1,193, 1, 0, 2, 65, 65, 0, 2,129,133, + 2, 0, 64,220, 0, 1, 64,197, 0, 1,193, 1, 0, 2,193, 65, 0, 3, 1,133, + 2, 0, 64,220, 0, 1, 64,228, 0, 3, 64,199, 0, 1,128,228, 0, 3,128,199, + 0, 1,192,228, 0, 3,192,199, 0, 0, 64,202, 0, 0, 1, 10,136,129, 0,201, + 0, 4, 0,199, 0, 4, 0,197, 0, 2, 1, 36,137, 1, 0,201, 0, 4, 0,197, + 0, 2, 65, 36,137,129, 0,201, 0, 4, 0,197, 0, 2,129, 36,138, 1, 0,201, + 0, 4, 0,197, 0, 2,193, 36,138,129, 0,201, 0, 4, 0,197, 0, 3, 1, 36, +139, 1, 0,201, 0, 5,192,197, 0, 4, 1, 5, 0, 1, 1, 65, 1,128, 64,220, + 0, 0, 64,202, 0, 4, 1, 5,140,129, 0,201, 0, 6, 0,199, 0, 6, 0,197, + 0, 3, 65, 36,139, 1, 0,201, 0, 5,192,197, 0, 6, 1, 5, 0, 1, 1, 65, + 1,128, 64,220, 1,128, 0,195, 0, 6,128,199, 0, 3,128,228, 0, 6,192,199, + 0, 3,192,228, 0, 7, 0,199, 0, 4, 0,228, 0, 7, 64,199, 0, 4, 64,228, + 0, 7,128,199, 0, 4,128,228, 0, 7,192,199, 0, 4,192,228, 0, 8, 0,199, + 0, 8, 64,197, 1,200,128,198, 0, 0, 0,218,128, 3,128, 22, 0, 8, 64,197, + 1,200,128,198, 1,200,192,198, 0, 9, 65, 5,146, 1, 0,201, 0, 8, 64,197, + 1,200,128,198, 1,200,192,198, 0, 9, 65, 5,147, 1, 0,201, 0, 9, 64,197, + 0, 9, 65, 5,147,129, 0,201, 0, 9, 64,197,148, 73, 0,201, 0,128, 0, 30, + 0, 0, 0, 41, 4, 0, 0, 0, 10, 99, 97,108,108, 98, 97, 99,107,115, 0, 4, + 0, 0, 0, 14,105,117,112, 67, 97,108,108, 77,101,116,104,111,100, 0, 4, 0, + 0, 0, 17, 82,101,103,105,115,116,101,114, 67, 97,108,108, 98, 97, 99,107, 0, + 4, 0, 0, 0, 12,105,117,112, 78,101,119, 67,108, 97,115,115, 0, 4, 0, 0, + 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 4, 0, 0, 0, 13,105,117, +112, 83,101,116, 77,101,116,104,111,100, 0, 4, 0, 0, 0, 8, 95, 95,105,110, +100,101,120, 0, 4, 0, 0, 0, 11,105,117,112, 32,104, 97,110,100,108,101, 0, + 4, 0, 0, 0, 11, 95, 95,110,101,119,105,110,100,101,120, 0, 4, 0, 0, 0, + 11, 95, 95,116,111,115,116,114,105,110,103, 0, 4, 0, 0, 0, 17,105,104, 97, +110,100,108,101, 95,116,111,115,116,114,105,110,103, 0, 4, 0, 0, 0, 5, 95, + 95,101,113, 0, 4, 0, 0, 0, 16,105,104, 97,110,100,108,101, 95, 99,111,109, +112, 97,114,101, 0, 4, 0, 0, 0, 16,105,104, 97,110,100,108,101, 95,115,101, +116,110, 97,109,101, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 15, 82,101,103,105,115,116, +101,114, 72, 97,110,100,108,101, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, + 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 5, +115,104,111,119, 0, 4, 0, 0, 0, 5,104,105,100,101, 0, 4, 0, 0, 0, 4, +109, 97,112, 0, 4, 0, 0, 0, 12, 99,111,110,115,116,114,117, 99,116,111,114, + 0, 4, 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, + 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, + 0, 4, 66, 79, 88, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, + 0, 0, 20,101,114,114,111,114, 95,109,101,115,115, 97,103,101, 95,112,111,112, +117,112, 0, 4, 0, 0, 0, 14, 95, 69, 82, 82, 79, 82, 77, 69, 83, 83, 65, 71, + 69, 0, 4, 0, 0, 0, 5,112, 97, 99,107, 0, 4, 0, 0, 0, 15,112,114,111, +116,101, 99,116,101,100, 99, 97,108,108, 95, 0, 4, 0, 0, 0, 9,100,111,115, +116,114,105,110,103, 0, 4, 0, 0, 0, 7,100,111,102,105,108,101, 0, 4, 0, + 0, 0, 4, 82, 71, 66, 0, 4, 0, 0, 0, 3, 95, 71, 0, 4, 0, 0, 0, 8, +112, 97, 99,107, 97,103,101, 0, 4, 0, 0, 0, 7,108,111, 97,100,101,100, 0, + 4, 0, 0, 0, 7,105,117,112,108,117, 97, 0, 4, 0, 0, 0, 4,105,117,112, + 0, 4, 0, 0, 0, 9,105,117,112,108,117, 97, 53, 49, 0, 4, 0, 0, 0, 3, + 95, 77, 0, 4, 0, 0, 0, 9, 95, 80, 65, 67, 75, 65, 71, 69, 0, 0, 0, 0, + 20, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 27, 0, 1, 7, 7, 0, 0, 0, + 35, 0,192, 0,134, 1, 0, 0,198, 0, 0, 64,218,128, 0, 0, 22, 0,128, 0, + 30, 0, 0, 65, 5, 1,128, 1, 64, 1, 0,129, 28, 2, 64,128, 23,128, 1,128, + 22, 1,128, 1, 0, 0, 0,193, 69, 0,128, 1,128, 1, 0, 1, 92, 0, 0, 1, + 29, 0, 0, 1, 30,128, 4, 0, 22, 0, 0, 65, 5, 1,128, 1, 64, 1, 0,129, + 28, 2, 65, 0, 23,128, 2, 0, 22, 0, 1, 65, 5, 0, 1, 64,135, 0, 1,129, + 69, 2,193,193, 70, 1,128, 1,128, 1, 0,129, 92, 0, 1, 65, 7, 1, 0, 1, + 94,128, 0,128, 22, 0, 1,129, 5, 2, 66, 1, 6, 1, 0, 1, 30, 0,128, 0, + 30, 0, 0, 0, 9, 3, 63,240, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5,116, +121,112,101, 0, 4, 0, 0, 0, 9,102,117,110, 99,116,105,111,110, 0, 4, 0, + 0, 0, 7,117,110,112, 97, 99,107, 0, 4, 0, 0, 0, 7,115,116,114,105,110, +103, 0, 4, 0, 0, 0, 5,115,101,108,102, 0, 4, 0, 0, 0, 4,105,117,112, + 0, 4, 0, 0, 0, 9,100,111,115,116,114,105,110,103, 0, 4, 0, 0, 0, 6, + 69, 82, 82, 79, 82, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 10, 0, 0, + 0, 11, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 16, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, + 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, + 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 27, 0, 0, 0, 6, 0, 0, + 0, 5,110, 97,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 4, 97, +114,103, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 7,104, 97,110,100,108, +101, 0, 0, 0, 0, 1, 0, 0, 0, 34, 0, 0, 0, 5,102,117,110, 99, 0, 0, + 0, 0, 2, 0, 0, 0, 34, 0, 0, 0, 5,116,101,109,112, 0, 0, 0, 0, 23, + 0, 0, 0, 30, 0, 0, 0, 7,114,101,115,117,108,116, 0, 0, 0, 0, 28, 0, + 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 37, 0, + 3, 0, 5, 0, 0, 0, 15, 0, 0, 0,197, 1,128, 0,198, 0, 0, 64,218,128, + 0,128, 22, 0, 0, 0,197, 0, 0, 1, 10, 0, 1, 0,201, 0, 0, 0,197, 1, +128, 0,198, 0, 0, 0,154,128, 0, 64, 22, 1, 0, 64,201,128, 0, 0, 22,128, +128, 64,201, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 10, 99, 97,108,108, + 98, 97, 99,107,115, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, + 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 35, 0, + 0, 0, 37, 0, 0, 0, 4, 0, 0, 0, 5,110, 97,109,101, 0, 0, 0, 0, 0, + 0, 0, 0, 14, 0, 0, 0, 5,102,117,110, 99, 0, 0, 0, 0, 0, 0, 0, 0, + 14, 0, 0, 0, 5,116,121,112,101, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, + 0, 3, 99, 98, 0, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 44, 0, 0, 0, 53, 0, 2, 0, 7, 0, 0, 0, 21, 0, 0, 0, +128, 1,128, 0,195, 0, 0, 1, 5, 1, 0, 1, 64, 0,128, 1,128, 1,128,129, + 28, 2, 0, 0,192, 0, 0, 0,218,128, 0, 0, 22, 1, 0, 0,222, 0, 0, 1, + 5, 1, 0, 1, 64, 0, 0, 65,129, 1,128,129, 28, 2, 0, 0,128, 0, 0, 64, +154,127,252, 0, 22, 2, 0, 1, 3, 1, 0, 1, 30,127,251, 64, 22, 0,128, 0, + 30, 0, 0, 0, 2, 4, 0, 0, 0, 7,114, 97,119,103,101,116, 0, 4, 0, 0, + 0, 7,112, 97,114,101,110,116, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, + 45, 0, 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, + 48, 0, 0, 0, 48, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, + 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, + 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, + 53, 0, 0, 0, 4, 0, 0, 0, 7,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, + 0, 0, 0, 20, 0, 0, 0, 6,105,110,100,101,120, 0, 0, 0, 0, 0, 0, 0, + 0, 20, 0, 0, 0, 2,112, 0, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 2, +118, 0, 0, 0, 0, 2, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 59, 0, 0, 0, 79, 0, 2, 0, 7, 0, 0, 0, 67, 0, 0, 0,133, 1, 64, + 64,134, 0,128, 0,192, 1, 0,128,156, 0, 0,128,197, 1,128,128,198, 0, 0, + 0,218,128, 3,192, 22, 0, 0,192,197, 0, 0, 1, 0, 1, 0,128,220, 0, 0, + 0,218,128, 1, 0, 22, 0, 1, 1, 5, 1,128, 1, 64, 1, 0,129, 28, 2, 65, + 64, 87,128, 0,128, 22, 0, 1,129, 5, 0, 1,193, 65, 1, 0, 65, 28, 1,128, + 65, 6, 1, 0, 1, 30,128, 10, 64, 22, 0, 2, 0,197, 0, 0, 1, 0, 1, 0, + 1, 64, 1,128,128,220, 0, 0, 64,218,128, 3,192, 22, 0, 0,193, 5, 0, 0, + 1, 64, 1, 0,129, 28, 0, 0, 1, 26,128, 1, 0, 22, 0, 1, 1, 69, 2, 0, + 1,128, 1, 0,129, 92, 2,193, 64, 87,128, 0,128, 22, 0, 1,129, 69, 0, 1, +193,129, 1, 0, 65, 92, 2, 0, 65, 70, 1, 0, 1, 94,128, 4,192, 22, 0, 1, + 1, 5, 1,128, 1, 64, 1, 0,129, 28, 2, 66, 64, 87,128, 1, 0, 22, 0, 1, + 1, 5, 1,128, 1, 64, 1, 0,129, 28, 2, 64, 0, 23,128, 2, 0, 22, 0, 2, +129, 5, 1,128, 1, 64, 1, 0,129, 28, 0, 0, 1, 26,128, 0, 64, 22, 1, 0, + 1, 30,128, 0,128, 22, 1, 0, 0,222,128, 0, 0, 22, 1, 0, 0,222, 0,128, + 0, 30, 0, 0, 0, 11, 4, 0, 0, 0, 7,115,116,114,105,110,103, 0, 4, 0, + 0, 0, 6,117,112,112,101,114, 0, 4, 0, 0, 0, 10, 99, 97,108,108, 98, 97, + 99,107,115, 0, 4, 0, 0, 0, 13,105,117,112, 71,101,116, 87,105,100,103,101, +116, 0, 4, 0, 0, 0, 5,116,121,112,101, 0, 4, 0, 0, 0, 6,116, 97, 98, +108,101, 0, 4, 0, 0, 0, 6,101,114,114,111,114, 0, 4, 0, 0, 0, 19,105, +110,118, 97,108,105,100, 32,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 0, + 0, 0, 13, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 0, 0, 0, + 7,110,117,109, 98,101,114, 0, 4, 0, 0, 0, 10, 71,101,116, 72, 97,110,100, +108,101, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 60, 0, 0, 0, 60, 0, + 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, + 0, 0, 61, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 63, 0, + 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, + 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 64, 0, + 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, + 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 68, 0, 0, 0, 68, 0, + 0, 0, 68, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, + 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, + 0, 0, 69, 0, 0, 0, 70, 0, 0, 0, 70, 0, 0, 0, 70, 0, 0, 0, 71, 0, + 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, + 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 72, 0, + 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 73, 0, + 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 74, 0, 0, 0, 76, 0, 0, 0, 79, 0, + 0, 0, 7, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, + 0, 66, 0, 0, 0, 6,105,110,100,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 66, + 0, 0, 0, 6, 73, 78, 68, 69, 88, 0, 0, 0, 0, 4, 0, 0, 0, 66, 0, 0, + 0, 7,111, 98,106,101, 99,116, 0, 0, 0, 0, 11, 0, 0, 0, 23, 0, 0, 0, + 6,118, 97,108,117,101, 0, 0, 0, 0, 28, 0, 0, 0, 66, 0, 0, 0, 7,111, + 98,106,101, 99,116, 0, 0, 0, 0, 33, 0, 0, 0, 45, 0, 0, 0, 3,105,104, + 0, 0, 0, 0, 59, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 81, 0, 0, 0,109, 0, 3, 0, 14, 0, 0, 0, 78, 0, 0, 0,197, 0,128, 1, + 0, 1, 0,128,220, 0, 0, 1, 5, 1, 0, 1, 64, 1, 0,129, 28, 0, 0, 65, + 69, 0, 0, 1,128, 1, 0,129, 92, 0, 0, 1, 90,128, 1, 0, 22, 0, 0, 1, +133, 2,128, 1,192, 1, 0,129,156, 3, 64,128, 87,128, 0,128, 22, 0, 0,193, +133, 0, 1, 1,193, 1, 0, 65,156, 1,193, 64, 87,128, 0, 64, 22, 1,193,128, + 23,128, 13, 0, 22, 0, 1,129,133, 3, 65,193,134, 0,128, 1,192, 1, 0,129, +156, 0, 2, 1,197, 3,129,129,198, 0, 0, 1,218,128, 3,128, 22, 3,194, 66, + 6, 0, 0, 66, 26,128, 0,192, 22, 0, 2,130, 69, 0, 0, 2,128, 1, 0,130, + 92, 3,130, 66, 6, 0, 2,194, 69, 0, 0, 2,128, 3, 0, 2,192, 4, 0, 3, + 0, 1, 0, 3, 64, 2,128, 66, 92, 0,128,129, 73,128, 7,128, 22, 0, 3, 2, + 5, 1, 0, 2, 64, 1, 0,130, 28, 4, 67, 64, 23,128, 2, 64, 22, 0, 3,130, + 5, 1, 0, 2, 64, 1, 0,130, 28, 0, 3,194, 69, 0, 0, 2,128, 3, 0, 2, +192, 4, 0, 3, 0, 2, 0, 66, 92, 0,196, 1, 73,128, 3,192, 22, 2, 65,128, + 87,128, 0,192, 22, 2, 65, 64, 87,128, 0, 64, 22, 2, 68, 64, 23,128, 1,128, + 22, 0, 3,194, 5, 0, 0, 2, 64, 3, 0, 2,128, 1, 0, 2,192, 2, 0, 66, + 28, 0,196, 1, 73,128, 0,128, 22, 0,128,129, 73,128, 0, 0, 22, 0,128,129, + 73, 0,128, 0, 30, 0, 0, 0, 18, 4, 0, 0, 0, 5,116,121,112,101, 0, 4, + 0, 0, 0, 13,105,117,112, 71,101,116, 87,105,100,103,101,116, 0, 4, 0, 0, + 0, 6,116, 97, 98,108,101, 0, 4, 0, 0, 0, 6,101,114,114,111,114, 0, 4, + 0, 0, 0, 19,105,110,118, 97,108,105,100, 32,105,117,112, 32,104, 97,110,100, +108,101, 0, 4, 0, 0, 0, 7,110,117,109, 98,101,114, 0, 4, 0, 0, 0, 7, +115,116,114,105,110,103, 0, 4, 0, 0, 0, 6,117,112,112,101,114, 0, 4, 0, + 0, 0, 10, 99, 97,108,108, 98, 97, 99,107,115, 0, 3, 63,240, 0, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 13, 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, + 4, 0, 0, 0, 15,105,117,112, 83,101,116, 67, 97,108,108, 98, 97, 99,107, 0, + 4, 0, 0, 0, 12,105,117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 0, 0, + 0, 11,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 0, 0, 0, 16,105,104, + 97,110,100,108,101, 95,115,101,116,110, 97,109,101, 0, 4, 0, 0, 0, 15, 83, +116,111,114,101, 65,116,116,114,105, 98,117,116,101, 0, 0, 4, 0, 0, 0, 4, +110,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 78, 0, 0, 0, 82, 0, 0, 0, 82, + 0, 0, 0, 82, 0, 0, 0, 83, 0, 0, 0, 83, 0, 0, 0, 83, 0, 0, 0, 84, + 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, + 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, + 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 86, + 0, 0, 0, 86, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, + 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, 90, + 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, + 0, 0, 0, 92, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, + 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 96, + 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 97, + 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 98, 0, 0, 0, 98, 0, 0, 0, 98, + 0, 0, 0, 98, 0, 0, 0, 98, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0,100, + 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, + 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, + 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,104, 0, 0, 0,105, 0, 0, 0,107, + 0, 0, 0,109, 0, 0, 0, 10, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 0, 0, 0, 77, 0, 0, 0, 6,105,110,100,101,120, 0, 0, 0, 0, + 0, 0, 0, 0, 77, 0, 0, 0, 6,118, 97,108,117,101, 0, 0, 0, 0, 0, 0, + 0, 0, 77, 0, 0, 0, 3,116,105, 0, 0, 0, 0, 3, 0, 0, 0, 77, 0, 0, + 0, 3,116,118, 0, 0, 0, 0, 6, 0, 0, 0, 77, 0, 0, 0, 7,111, 98,106, +101, 99,116, 0, 0, 0, 0, 9, 0, 0, 0, 77, 0, 0, 0, 6, 73, 78, 68, 69, + 88, 0, 0, 0, 0, 27, 0, 0, 0, 75, 0, 0, 0, 3, 99, 98, 0, 0, 0, 0, + 29, 0, 0, 0, 75, 0, 0, 0, 5,102,117,110, 99, 0, 0, 0, 0, 32, 0, 0, + 0, 45, 0, 0, 0, 5,110, 97,109,101, 0, 0, 0, 0, 54, 0, 0, 0, 60, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 0, 0, 0,130, 0, 1, 0, 6, 0, + 0, 0, 19, 0, 0, 0, 69, 0, 0, 0,128, 1, 0,128, 92, 0, 0, 64, 90,128, + 2,192, 22, 0, 0, 64,133, 1, 64,128,134, 0, 0,192,193, 0, 1, 1, 5, 0, + 0, 1, 64, 1, 0, 1, 28, 0, 0,128,156, 0, 1, 64,197, 1, 0, 1, 0, 0, + 0, 1, 64, 1,128, 64,220, 1, 0, 0,158, 1, 0, 0, 94, 0,128, 0, 30, 0, + 0, 0, 6, 4, 0, 0, 0, 8, 71,101,116, 78, 97,109,101, 0, 4, 0, 0, 0, + 7,115,116,114,105,110,103, 0, 4, 0, 0, 0, 7,102,111,114,109, 97,116, 0, + 4, 0, 0, 0, 17, 95, 73, 85, 80, 76, 85, 65, 95, 78, 65, 77, 69, 40, 37,115, + 41, 0, 4, 0, 0, 0, 9,116,111,115,116,114,105,110,103, 0, 4, 0, 0, 0, + 10, 83,101,116, 72, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, + 0, 0,123, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,124, 0, 0, 0,124, 0, + 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, + 0, 0,125, 0, 0, 0,125, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, + 0, 0,126, 0, 0, 0,127, 0, 0, 0,129, 0, 0, 0,130, 0, 0, 0, 3, 0, + 0, 0, 2,118, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5,110, 97,109, +101, 0, 0, 0, 0, 3, 0, 0, 0, 18, 0, 0, 0, 9, 97,117,116,111,110, 97, +109,101, 0, 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,132, 0, 0, 0,136, 0, 1, 0, 4, 0, 0, 0, 6, 0, 0, 0, 69, 0, + 64, 64,134, 0, 0, 0,228, 0, 0, 0, 0, 1, 0,192, 73, 0,128, 0, 30, 0, + 0, 0, 2, 4, 0, 0, 0, 4,105,117,112, 0, 4, 0, 0, 0, 5,110,105, 99, +107, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,133, 0, 0, 0,135, 1, 1, + 0, 4, 0, 0, 0, 6, 0, 0, 0, 68, 0,192, 0, 75, 0, 0, 0,192, 1,128, + 0, 93, 0, 0, 0, 94, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 12, 99, +111,110,115,116,114,117, 99,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, + 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, + 0, 0,135, 0, 0, 0, 1, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 6, + 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,135, + 0, 0, 0,136, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,138, 0, 0, 0, +156, 0, 2, 0, 8, 0, 0, 0, 31, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 65, + 1, 1,128, 64,156, 0, 0,128,133, 0, 0, 0,192, 1, 0,128,156, 0, 0, 64, +154,128, 4,192, 22, 0, 0,192,197, 0, 1, 1, 5, 2, 65, 65, 6, 0,128, 1, + 64, 1, 0,129, 28, 1,129, 0,198, 0, 0, 64,218,128, 0, 0, 22, 0, 1,128, +197, 0, 0,129, 10,131,128,193, 9,132, 0, 1, 9, 0, 0, 1, 69, 2, 0, 1, +128, 0, 2, 65,193, 1,128, 65, 92, 0, 2,129, 69, 0, 0, 1,128, 2, 0, 1, +192, 1,128, 65, 92, 1, 0, 0, 30, 0,128, 0, 30, 0, 0, 0, 11, 4, 0, 0, + 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105, +117,112, 32,104, 97,110,100,108,101, 0, 4, 0, 0, 0, 13,105,117,112, 71,101, +116, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 4,105,117,112, 0, 4, 0, 0, + 0, 7,115,116,114,105,110,103, 0, 4, 0, 0, 0, 6,117,112,112,101,114, 0, + 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 4, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 4, 0, 0, 0, + 11,105,117,112, 32,119,105,100,103,101,116, 0, 4, 0, 0, 0, 13,105,117,112, + 83,101,116, 87,105,100,103,101,116, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, + 0,140, 0, 0, 0,140, 0, 0, 0,140, 0, 0, 0,140, 0, 0, 0,142, 0, 0, + 0,142, 0, 0, 0,142, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,145, 0, 0, + 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, + 0,146, 0, 0, 0,146, 0, 0, 0,147, 0, 0, 0,150, 0, 0, 0,150, 0, 0, + 0,150, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, + 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,155, 0, 0, + 0,156, 0, 0, 0, 5, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 0, 0, 0, 9,116,121,112,101,110, 97,109,101, 0, 0, 0, + 0, 0, 0, 0, 0, 30, 0, 0, 0, 7,111, 98,106,101, 99,116, 0, 0, 0, 0, + 7, 0, 0, 0, 30, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 15, 0, + 0, 0, 29, 0, 0, 0, 7,111, 98,106,101, 99,116, 0, 0, 0, 0, 21, 0, 0, + 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,166, 0, 0, 0,168, 0, 1, + 0, 3, 0, 0, 0, 4, 0, 0, 0, 69, 0, 64, 64,134, 1, 0, 64, 92, 0,128, + 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 5, 83,104,111,119, 0, 4, 0, 0, 0, + 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,167, + 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0,168, 0, 0, 0, 1, 0, 0, 0, 7, +111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,170, 0, 0, 0,172, 0, 1, 0, 3, 0, 0, 0, 4, 0, + 0, 0, 69, 0, 64, 64,134, 1, 0, 64, 92, 0,128, 0, 30, 0, 0, 0, 2, 4, + 0, 0, 0, 5, 72,105,100,101, 0, 4, 0, 0, 0, 7,104, 97,110,100,108,101, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,171, 0, 0, 0,171, 0, 0, 0, +171, 0, 0, 0,172, 0, 0, 0, 1, 0, 0, 0, 7,111, 98,106,101, 99,116, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,174, + 0, 0, 0,176, 0, 1, 0, 3, 0, 0, 0, 4, 0, 0, 0, 69, 0, 64, 64,134, + 1, 0, 64, 92, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 4, 77, 97,112, + 0, 4, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,176, 0, 0, 0, + 1, 0, 0, 0, 7,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,178, 0, 0, 0,189, 0, 2, 0, 7, + 0, 0, 0, 23, 0, 64, 0,139, 0,128, 1, 0, 1,128,128,156, 0, 0,128,202, +128,128, 0,201,129, 0,128,201, 0, 0,193, 5, 1, 0, 1, 64, 0, 1, 1,129, + 1,128, 65, 28, 0, 0,193, 5, 1,128, 1, 64, 0, 1, 65,129, 1,128, 65, 28, + 0, 1,129, 5, 1, 0, 1, 64, 1,128, 1,128, 1,128, 65, 28, 1,193,193, 11, + 0,128, 1,128, 1,128, 65, 28, 1, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 8, + 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7,104, 97,110,100, +108,101, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 0, 0, 0, 11,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 0, 0, 0, + 11,105,117,112, 32,119,105,100,103,101,116, 0, 4, 0, 0, 0, 13,105,117,112, + 83,101,116, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 14,115,101,116, 65,116, +116,114,105, 98,117,116,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, +179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,180, 0, 0, 0,181, 0, 0, 0, +182, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0, +185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0, +186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0, +187, 0, 0, 0,188, 0, 0, 0,189, 0, 0, 0, 4, 0, 0, 0, 6, 99,108, 97, +115,115, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 97,114,103, 0, 0, + 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, + 0, 3, 0, 0, 0, 22, 0, 0, 0, 7,111, 98,106,101, 99,116, 0, 0, 0, 0, + 6, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 0, 0, 0, +203, 0, 2, 0, 12, 0, 0, 0, 25, 0, 64, 0,134, 0, 0, 64,197, 0,128, 1, + 0, 1, 1, 0,220,128, 4, 0, 22, 0, 0,130, 5, 3, 0, 2, 64, 1, 0,130, + 28, 4, 64,192, 23,128, 2,128, 22, 0, 1, 2, 5, 3,128, 2, 64, 1, 0,130, + 28, 4, 65, 64, 23,128, 1, 64, 22, 0, 1,130, 5, 0, 0, 2, 64, 3, 0, 2, +128, 3,128, 2,192, 2, 0, 66, 28,128, 0, 0, 22, 3, 1,192,137, 0, 0,128, +225,127,251, 0, 22, 0,128, 0, 30, 0, 0, 0, 7, 4, 0, 0, 0, 7,104, 97, +110,100,108,101, 0, 4, 0, 0, 0, 6,112, 97,105,114,115, 0, 4, 0, 0, 0, + 5,116,121,112,101, 0, 4, 0, 0, 0, 7,110,117,109, 98,101,114, 0, 4, 0, + 0, 0, 12,105,117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11, +105,117,112, 32,104, 97,110,100,108,101, 0, 4, 0, 0, 0, 7,114, 97,119,115, +101,116, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,192, 0, 0, 0,193, 0, + 0, 0,193, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,194, 0, 0, 0,194, 0, + 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, + 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,197, 0, 0, 0,197, 0, + 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,200, 0, + 0, 0,193, 0, 0, 0,201, 0, 0, 0,203, 0, 0, 0, 8, 0, 0, 0, 7,111, + 98,106,101, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 4, 97,114, +103, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 7,104, 97,110,100,108,101, + 0, 0, 0, 0, 1, 0, 0, 0, 24, 0, 0, 0, 16, 40,102,111,114, 32,103,101, +110,101,114, 97,116,111,114, 41, 0, 0, 0, 0, 4, 0, 0, 0, 24, 0, 0, 0, + 12, 40,102,111,114, 32,115,116, 97,116,101, 41, 0, 0, 0, 0, 4, 0, 0, 0, + 24, 0, 0, 0, 14, 40,102,111,114, 32, 99,111,110,116,114,111,108, 41, 0, 0, + 0, 0, 4, 0, 0, 0, 24, 0, 0, 0, 2,105, 0, 0, 0, 0, 5, 0, 0, 0, + 22, 0, 0, 0, 2,118, 0, 0, 0, 0, 5, 0, 0, 0, 22, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,218, 0, 0, 0,227, 0, 2, 0, 11, 0, 0, 0, 28, 0, + 0, 0,133, 0, 0, 0,192, 0, 0, 65, 1, 1,128,128,156, 0, 0,128,197, 1, +192,192,198, 0,128, 1, 0, 1, 0,128,220, 0, 1, 1, 1, 1,128, 1, 64, 0, + 1, 1,129,128, 2, 1, 32, 0, 1, 66, 5, 0,129,194, 70, 1, 0,130, 28, 4, + 65,128, 23,128, 0,192, 22, 0, 1,194, 5, 1, 0, 2, 64, 0,129,194,134, 1, +128, 66, 28,127,253, 65, 31, 0, 2, 1, 5, 2, 66, 65, 6, 0, 0, 1, 64, 0, +128, 1,128, 1,128, 65, 28, 0,128, 0, 30, 0, 0, 0, 10, 4, 0, 0, 0, 7, +114, 97,119,103,101,116, 0, 4, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 4, + 0, 0, 0, 6,116, 97, 98,108,101, 0, 4, 0, 0, 0, 5,103,101,116,110, 0, + 3, 63,240, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 12,105,117,112, 71,101,116, + 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,104, 97,110,100,108, +101, 0, 4, 0, 0, 0, 7, 65,112,112,101,110,100, 0, 4, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98, +117,116,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0,219, 0, 0, 0, +219, 0, 0, 0,219, 0, 0, 0,219, 0, 0, 0,220, 0, 0, 0,220, 0, 0, 0, +220, 0, 0, 0,220, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0, +221, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0, +222, 0, 0, 0,223, 0, 0, 0,223, 0, 0, 0,223, 0, 0, 0,223, 0, 0, 0, +221, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0, +226, 0, 0, 0,227, 0, 0, 0, 8, 0, 0, 0, 7,111, 98,106,101, 99,116, 0, + 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, + 0, 0, 0, 27, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 4, 0, + 0, 0, 27, 0, 0, 0, 2,110, 0, 0, 0, 0, 8, 0, 0, 0, 27, 0, 0, 0, + 12, 40,102,111,114, 32,105,110,100,101,120, 41, 0, 0, 0, 0, 11, 0, 0, 0, + 22, 0, 0, 0, 12, 40,102,111,114, 32,108,105,109,105,116, 41, 0, 0, 0, 0, + 11, 0, 0, 0, 22, 0, 0, 0, 11, 40,102,111,114, 32,115,116,101,112, 41, 0, + 0, 0, 0, 11, 0, 0, 0, 22, 0, 0, 0, 2,105, 0, 0, 0, 0, 12, 0, 0, + 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,238, 0, 0, 0,252, 0, 2, + 0, 10, 0, 0, 0, 52, 0, 0, 0,128, 0,128, 64,219,128, 0, 0, 22, 0, 0, + 0,193, 1, 0,192, 21, 0, 0, 64,133, 0, 0, 0,154,128, 0,128, 22, 0, 0, + 64,133,129, 0, 0,137,128, 9,192, 22, 0, 0,192,133, 0, 0,192,202,130, 65, + 64,201,131, 65,192,201,132, 66, 64,201, 1, 0,128,156, 0, 2,128,197, 0, 1, + 1, 10,133,195, 1, 9,134,195, 1, 9,129, 0, 1, 9,131, 67,129, 9, 1, 0, +128,220, 0, 3,193, 5, 1, 0,193, 74, 1,128, 1,128, 1, 0, 1,192,136, 68, + 65, 73,137, 68,193, 73,138, 69, 65, 73, 1, 0, 65, 98, 1, 0,129, 28, 0, 5, +129, 69, 0,129, 1,138, 2, 0, 1,192,130, 69,193,137,140, 0,129,137,140,128, +129,137,141, 0,129,137, 0,128, 65,162, 1, 0,129, 92, 0, 0, 64,199, 2,198, +193,139, 0, 7, 2, 5, 0, 7, 2, 69, 2, 0, 65,156, 2,199, 65,139, 1, 0, + 65,156, 3, 0, 1,131, 0, 0, 65,135, 0,128, 0, 30, 0, 0, 0, 30, 4, 0, + 0, 0, 1, 0, 4, 0, 0, 0, 20,101,114,114,111,114, 95,109,101,115,115, 97, +103,101, 95,112,111,112,117,112, 0, 4, 0, 0, 0, 6,118, 97,108,117,101, 0, + 4, 0, 0, 0, 7, 98,117,116,116,111,110, 0, 4, 0, 0, 0, 6,116,105,116, +108,101, 0, 4, 0, 0, 0, 3, 79,107, 0, 4, 0, 0, 0, 5,115,105,122,101, + 0, 4, 0, 0, 0, 3, 54, 48, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, + 0, 4, 0, 0, 0, 44,101,114,114,111,114, 95,109,101,115,115, 97,103,101, 95, +112,111,112,117,112, 32, 61, 32,110,105,108, 59, 32,114,101,116,117,114,110, 32, +105,117,112, 46, 67, 76, 79, 83, 69, 0, 4, 0, 0, 0, 10,109,117,108,116,105, +108,105,110,101, 0, 4, 0, 0, 0, 7,101,120,112, 97,110,100, 0, 4, 0, 0, + 0, 4, 89, 69, 83, 0, 4, 0, 0, 0, 9,114,101, 97,100,111,110,108,121, 0, + 4, 0, 0, 0, 8, 51, 48, 48,120, 49, 53, 48, 0, 4, 0, 0, 0, 5,118, 98, +111,120, 0, 4, 0, 0, 0, 10, 97,108,105,103,110,109,101,110,116, 0, 4, 0, + 0, 0, 8, 65, 67, 69, 78, 84, 69, 82, 0, 4, 0, 0, 0, 7,109, 97,114,103, +105,110, 0, 4, 0, 0, 0, 6, 49, 48,120, 49, 48, 0, 4, 0, 0, 0, 4,103, + 97,112, 0, 4, 0, 0, 0, 3, 49, 48, 0, 4, 0, 0, 0, 7,100,105, 97,108, +111,103, 0, 4, 0, 0, 0, 14, 69,114,114,111,114, 32, 77,101,115,115, 97,103, +101, 0, 4, 0, 0, 0, 11,100,101,102, 97,117,108,116,101,115, 99, 0, 4, 0, + 0, 0, 13,100,101,102, 97,117,108,116,101,110,116,101,114, 0, 4, 0, 0, 0, + 11,115,116, 97,114,116,102,111, 99,117,115, 0, 4, 0, 0, 0, 6,112,111,112, +117,112, 0, 4, 0, 0, 0, 7, 67, 69, 78, 84, 69, 82, 0, 4, 0, 0, 0, 8, +100,101,115,116,114,111,121, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0,239, + 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,240, + 0, 0, 0,240, 0, 0, 0,240, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0,241, + 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, + 0, 0, 0,243, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, + 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,245, 0, 0, 0,245, + 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, + 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, + 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, + 0, 0, 0,246, 0, 0, 0,247, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0,248, + 0, 0, 0,248, 0, 0, 0,249, 0, 0, 0,249, 0, 0, 0,250, 0, 0, 0,250, + 0, 0, 0,252, 0, 0, 0, 6, 0, 0, 0, 4,101,114,114, 0, 0, 0, 0, 0, + 0, 0, 0, 51, 0, 0, 0, 10,116,114, 97, 99,101, 98, 97, 99,107, 0, 0, 0, + 0, 0, 0, 0, 0, 51, 0, 0, 0, 3, 98,116, 0, 0, 0, 0, 17, 0, 0, 0, + 51, 0, 0, 0, 3,109,108, 0, 0, 0, 0, 24, 0, 0, 0, 51, 0, 0, 0, 3, +118, 98, 0, 0, 0, 0, 33, 0, 0, 0, 51, 0, 0, 0, 3,100,103, 0, 0, 0, + 0, 42, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 0, 0, + 0,254, 0, 0, 7, 2, 0, 0, 0, 2, 1, 0, 0, 30, 0,128, 0, 30, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,254, 0, 0, 0,254, 0, 0, + 0, 1, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 13, 0, 2, 0, 6, 0, 0, + 0, 29, 0, 0, 64, 26,128, 0,192, 22, 0, 0, 0,133, 0,128, 0,192, 1, 0, + 64,156, 0,128, 0, 30, 0, 0, 64,133, 0, 0,128,197, 0, 0, 1, 0, 1, 0, + 0,220, 0, 0,128,156, 1, 64,192,198, 0, 0, 64,218,128, 1, 0, 22, 0, 0, + 0,197, 1, 65, 1, 6, 1, 0, 64,220, 0,128, 0, 30,128, 2, 0, 22, 0, 1, + 64,197, 1,193,128,198, 1, 0, 1, 0, 0, 0,193, 65, 1,128, 64,220, 0, 1, +192,197, 1, 0, 1, 0, 1, 0, 0,221, 0, 0, 0,222, 0,128, 0, 30, 0, 0, + 0, 8, 4, 0, 0, 0, 14, 95, 69, 82, 82, 79, 82, 77, 69, 83, 83, 65, 71, 69, + 0, 4, 0, 0, 0, 5,112, 97, 99,107, 0, 4, 0, 0, 0, 6,112, 99, 97,108, +108, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 3, 64, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 6,116, 97, 98,108,101, 0, 4, 0, 0, 0, 7,114,101,109,111, +118,101, 0, 4, 0, 0, 0, 7,117,110,112, 97, 99,107, 0, 0, 0, 0, 0, 0, + 0, 0, 29, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 1, 2, 0, + 0, 1, 2, 0, 0, 1, 3, 0, 0, 1, 5, 0, 0, 1, 5, 0, 0, 1, 5, 0, + 0, 1, 5, 0, 0, 1, 5, 0, 0, 1, 6, 0, 0, 1, 6, 0, 0, 1, 6, 0, + 0, 1, 7, 0, 0, 1, 7, 0, 0, 1, 7, 0, 0, 1, 8, 0, 0, 1, 8, 0, + 0, 1, 10, 0, 0, 1, 10, 0, 0, 1, 10, 0, 0, 1, 10, 0, 0, 1, 10, 0, + 0, 1, 11, 0, 0, 1, 11, 0, 0, 1, 11, 0, 0, 1, 11, 0, 0, 1, 13, 0, + 0, 0, 3, 0, 0, 0, 2,102, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, + 4,101,114,114, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 4,114,101,116, + 0, 0, 0, 0, 11, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 15, 0, 0, 1, 15, 0, 1, 0, 4, 0, 0, 0, 7, 0, 0, 0, 69, 0, 0, 64, +133, 0, 0, 0,192, 1, 0, 0,156, 0, 0, 0, 93, 0, 0, 0, 94, 0,128, 0, + 30, 0, 0, 0, 2, 4, 0, 0, 0, 15,112,114,111,116,101, 99,116,101,100, 99, + 97,108,108, 95, 0, 4, 0, 0, 0, 11,108,111, 97,100,115,116,114,105,110,103, + 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 1, 15, 0, 0, 1, 15, 0, 0, 1, + 15, 0, 0, 1, 15, 0, 0, 1, 15, 0, 0, 1, 15, 0, 0, 1, 15, 0, 0, 0, + 1, 0, 0, 0, 2,115, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 16, 0, 0, 1, 16, 0, 1, 0, 4, 0, 0, 0, 7, 0, + 0, 0, 69, 0, 0, 64,133, 0, 0, 0,192, 1, 0, 0,156, 0, 0, 0, 93, 0, + 0, 0, 94, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 15,112,114,111,116, +101, 99,116,101,100, 99, 97,108,108, 95, 0, 4, 0, 0, 0, 9,108,111, 97,100, +102,105,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 1, 16, 0, 0, 1, + 16, 0, 0, 1, 16, 0, 0, 1, 16, 0, 0, 1, 16, 0, 0, 1, 16, 0, 0, 1, + 16, 0, 0, 0, 1, 0, 0, 0, 2,102, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 18, 0, 0, 1, 20, 0, 3, 0, 8, 0, + 0, 0, 9, 0, 0, 0,197, 1,192, 64,198, 0, 0,129, 1,129,128, 1, 78,129, +128, 65,142,129,128,129,206, 2,128, 0,221, 0, 0, 0,222, 0,128, 0, 30, 0, + 0, 0, 4, 4, 0, 0, 0, 7,115,116,114,105,110,103, 0, 4, 0, 0, 0, 7, +102,111,114,109, 97,116, 0, 4, 0, 0, 0, 9, 37,100, 32, 37,100, 32, 37,100, + 0, 3, 64,111,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, + 1, 19, 0, 0, 1, 19, 0, 0, 1, 19, 0, 0, 1, 19, 0, 0, 1, 19, 0, 0, + 1, 19, 0, 0, 1, 19, 0, 0, 1, 19, 0, 0, 1, 20, 0, 0, 0, 3, 0, 0, + 0, 2,114, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2,103, 0, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 98, 0, 0, 0, 0, 0, 0, 0, 0, 8, + 0, 0, 0, 0, 0, 0, 0,114, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 27, + 0, 0, 0, 9, 0, 0, 0, 37, 0, 0, 0, 29, 0, 0, 0, 53, 0, 0, 0, 55, + 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, + 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 79, 0, 0, 0,109, 0, 0, 0,111, + 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, + 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0,113, + 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, + 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, + 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,130, 0, 0, 0,122, 0, 0, 0,136, + 0, 0, 0,132, 0, 0, 0,156, 0, 0, 0,138, 0, 0, 0,162, 0, 0, 0,163, + 0, 0, 0,163, 0, 0, 0,164, 0, 0, 0,166, 0, 0, 0,168, 0, 0, 0,166, + 0, 0, 0,170, 0, 0, 0,172, 0, 0, 0,170, 0, 0, 0,174, 0, 0, 0,176, + 0, 0, 0,174, 0, 0, 0,178, 0, 0, 0,189, 0, 0, 0,178, 0, 0, 0,191, + 0, 0, 0,203, 0, 0, 0,191, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, + 0, 0, 0,207, 0, 0, 0,214, 0, 0, 0,215, 0, 0, 0,215, 0, 0, 0,216, + 0, 0, 0,218, 0, 0, 0,227, 0, 0, 0,218, 0, 0, 0,229, 0, 0, 0,229, + 0, 0, 0,229, 0, 0, 0,229, 0, 0, 0,236, 0, 0, 0,236, 0, 0, 0,252, + 0, 0, 0,238, 0, 0, 0,254, 0, 0, 0,254, 0, 0, 1, 13, 0, 0, 1, 0, + 0, 0, 1, 15, 0, 0, 1, 15, 0, 0, 1, 16, 0, 0, 1, 16, 0, 0, 1, 20, + 0, 0, 1, 18, 0, 0, 1, 24, 0, 0, 1, 24, 0, 0, 1, 24, 0, 0, 1, 24, + 0, 0, 1, 25, 0, 0, 1, 25, 0, 0, 1, 25, 0, 0, 1, 25, 0, 0, 1, 25, + 0, 0, 1, 26, 0, 0, 1, 26, 0, 0, 1, 26, 0, 0, 1, 26, 0, 0, 1, 26, + 0, 0, 1, 27, 0, 0, 1, 27, 0, 0, 1, 27, 0, 0, 1, 28, 0, 0, 1, 28, + 0, 0, 1, 29, 0, 0, 0, 3, 0, 0, 0, 16,119,105,100,103,101,116, 95,103, +101,116,116, 97, 98,108,101, 0, 0, 0, 0, 7, 0, 0, 0,113, 0, 0, 0, 17, +105,104, 97,110,100,108,101, 95,103,101,116,116, 97, 98,108,101, 0, 0, 0, 0, + 16, 0, 0, 0,113, 0, 0, 0, 17,105,104, 97,110,100,108,101, 95,115,101,116, +116, 97, 98,108,101, 0, 0, 0, 0, 17, 0, 0, 0,113, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/iuplua_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/iuplua_be64.loh b/iup/srclua5/loh/iuplua_be64.loh new file mode 100755 index 0000000..94837b6 --- /dev/null +++ b/iup/srclua5/loh/iuplua_be64.loh @@ -0,0 +1,545 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/iuplua_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/iuplua_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 7,114, 0, 0, 0, 10, 0, 0, 0, 7, 0, 0, 0, 36, 0, 0, 0, + 7, 64, 0, 0, 36, 64, 0, 0, 7,128, 0, 0, 36,128, 0, 0, 69,192, 0, 0, +129, 0, 1, 0, 92, 64, 0, 1, 69, 64, 1, 0,129, 0, 1, 0,193,128, 1, 0, + 0, 1, 0, 0, 92, 64, 0, 2,100,192, 0, 0,164, 0, 1, 0,197,192, 0, 0, + 1,193, 1, 0,220, 64, 0, 1,197, 64, 1, 0, 1,193, 1, 0, 65,129, 1, 0, +128, 1,128, 0,220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65, 1, 2, 0, +128, 1, 0, 1,220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65, 65, 2, 0, +133,129, 2, 0,220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65,193, 2, 0, +133, 1, 3, 0,220, 64, 0, 2,228, 64, 1, 0,199, 64, 3, 0,228,128, 1, 0, +199,128, 3, 0,228,192, 1, 0,199,192, 3, 0,202, 64, 0, 0, 10, 1, 0, 0, +201, 0,129,136,199, 0, 4, 0,197, 0, 4, 0, 36, 1, 2, 0,201, 0, 1,137, +197, 0, 4, 0, 36, 65, 2, 0,201, 0,129,137,197, 0, 4, 0, 36,129, 2, 0, +201, 0, 1,138,197, 0, 4, 0, 36,193, 2, 0,201, 0,129,138,197, 0, 4, 0, + 36, 1, 3, 0,201, 0, 1,139,197,192, 5, 0, 5, 1, 4, 0, 65, 1, 1, 0, +220, 64,128, 1,202, 64, 0, 0, 5, 1, 4, 0,201, 0,129,140,199, 0, 6, 0, +197, 0, 6, 0, 36, 65, 3, 0,201, 0, 1,139,197,192, 5, 0, 5, 1, 6, 0, + 65, 1, 1, 0,220, 64,128, 1,195, 0,128, 1,199,128, 6, 0,228,128, 3, 0, +199,192, 6, 0,228,192, 3, 0,199, 0, 7, 0,228, 0, 4, 0,199, 64, 7, 0, +228, 64, 4, 0,199,128, 7, 0,228,128, 4, 0,199,192, 7, 0,228,192, 4, 0, +199, 0, 8, 0,197, 64, 8, 0,198,128,200, 1,218, 0, 0, 0, 22,128, 3,128, +197, 64, 8, 0,198,128,200, 1,198,192,200, 1, 5, 65, 9, 0,201, 0, 1,146, +197, 64, 8, 0,198,128,200, 1,198,192,200, 1, 5, 65, 9, 0,201, 0, 1,147, +197, 64, 9, 0, 5, 65, 9, 0,201, 0,129,147,197, 64, 9, 0,201, 0, 73,148, + 30, 0,128, 0, 41, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99, 97,108, +108, 98, 97, 99,107,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,105,117,112, 67, + 97,108,108, 77,101,116,104,111,100, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 82, +101,103,105,115,116,101,114, 67, 97,108,108, 98, 97, 99,107, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 78,101,119, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 77,101,116,104,111,100, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 95, 95,105,110,100,101,120, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0, 95, 95,110,101,119,105,110,100,101,120, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0, 95, 95,116,111,115,116,114,105,110,103, 0, 4, 17, 0, 0, + 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,116,111,115,116,114,105,110, +103, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 95, 95,101,113, 0, 4, 16, 0, 0, + 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95, 99,111,109,112, 97,114,101, + 0, 4, 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101, +116,110, 97,109,101, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101, +103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 15, 0, 0, 0, 0, 0, + 0, 0, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +115,104,111,119, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,104,105,100,101, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0,109, 97,112, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0, 99,111,110,115,116,114,117, 99,116,111,114, 0, 4, 14, 0, 0, 0, 0, 0, + 0, 0,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 4, 0, + 0, 0, 0, 0, 0, 0, 66, 79, 88, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, + 95,109,101,115,115, 97,103,101, 95,112,111,112,117,112, 0, 4, 14, 0, 0, 0, + 0, 0, 0, 0, 95, 69, 82, 82, 79, 82, 77, 69, 83, 83, 65, 71, 69, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,112, 97, 99,107, 0, 4, 15, 0, 0, 0, 0, 0, 0, + 0,112,114,111,116,101, 99,116,101,100, 99, 97,108,108, 95, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0,100,111,115,116,114,105,110,103, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,100,111,102,105,108,101, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 82, + 71, 66, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 95, 71, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,112, 97, 99,107, 97,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,108,111, 97,100,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,105,117,112, +108,117, 97, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0,105,117,112,108,117, 97, 53, 49, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0, 95, 77, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 95, 80, 65, 67, + 75, 65, 71, 69, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, + 0, 27, 0, 0, 0, 0, 1, 7, 7, 35, 0, 0, 0,134, 0,192, 0,198, 0, 0, + 1,218, 64, 0, 0, 22, 0, 0,128, 30, 0,128, 0, 5, 65, 0, 0, 64, 1,128, + 1, 28,129, 0, 1, 23,128, 64, 2, 22,128, 1,128, 0, 1,128, 1, 69,193, 0, + 0,128, 1,128, 0, 92, 1, 0, 1, 29, 1, 0, 0, 30, 1, 0, 0, 22, 0, 4, +128, 5, 65, 0, 0, 64, 1,128, 1, 28,129, 0, 1, 23, 0, 65, 2, 22, 0, 2, +128, 5, 65, 1, 0,135, 64, 1, 0, 69,129, 1, 0, 70,193,193, 2,128, 1,128, + 1, 92,129, 0, 1, 7, 65, 1, 0, 94, 1, 0, 1, 22,128, 0,128, 5,129, 1, + 0, 6, 1, 66, 2, 30, 1, 0, 1, 30, 0,128, 0, 9, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0,240, 63, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,116,105,111,110, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,115, +101,108,102, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0,100,111,115,116,114,105,110,103, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0, 69, 82, 82, 79, 82, 0, 0, 0, 0, 0, 35, 0, 0, 0, 10, 0, + 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0, + 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 27, 0, 0, 0, 6, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109,101, 0, 0, 0, 0, 0, 34, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 34, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 1, 0, + 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, + 0, 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,116,101,109,112, 0, + 23, 0, 0, 0, 30, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,114,101,115,117, +108,116, 0, 28, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 29, 0, 0, 0, 37, 0, 0, 0, 0, 3, 0, 5, 15, 0, 0, 0,197, + 0, 0, 0,198, 0,128, 1,218, 64, 0, 0, 22,128, 0,128,197, 0, 0, 0, 10, + 1, 0, 0,201, 0, 1, 0,197, 0, 0, 0,198, 0,128, 1,154, 0, 0, 0, 22, + 64, 0,128,201, 64, 0, 1, 22, 0, 0,128,201, 64,128,128, 30, 0,128, 0, 2, + 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, +115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 15, 0, 0, 0, 30, + 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, + 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 35, 0, 0, 0, 37, 0, 0, 0, 4, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109,101, 0, 0, 0, 0, 0, + 14, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 0, 0, + 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 99, 98, 0, 9, 0, 0, + 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, + 0, 53, 0, 0, 0, 0, 2, 0, 7, 21, 0, 0, 0,128, 0, 0, 0,195, 0,128, + 1, 5, 1, 0, 0, 64, 1, 0, 1,128, 1,128, 0, 28,129,128, 1,192, 0, 0, + 2,218, 0, 0, 0, 22, 0, 0,128,222, 0, 0, 1, 5, 1, 0, 0, 64, 1, 0, + 1,129, 65, 0, 0, 28,129,128, 1,128, 0, 0, 2,154, 64, 0, 0, 22, 0,252, +127, 3, 1, 0, 2, 30, 1, 0, 1, 22, 64,251,127, 30, 0,128, 0, 2, 0, 0, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97,119,103,101,116, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 0, 0, 0, 0, 21, 0, 0, + 0, 45, 0, 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, + 0, 48, 0, 0, 0, 48, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, + 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, + 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, + 0, 53, 0, 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106, +101, 99,116, 0, 0, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, +105,110,100,101,120, 0, 0, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0,112, 0, 1, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, +118, 0, 2, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 59, 0, 0, 0, 79, 0, 0, 0, 0, 2, 0, 7, 67, 0, 0, 0,133, 0, + 0, 0,134, 64, 64, 1,192, 0,128, 0,156,128, 0, 1,197,128, 0, 0,198,128, +128, 1,218, 0, 0, 0, 22,192, 3,128,197,192, 0, 0, 0, 1, 0, 0,220,128, + 0, 1,218, 0, 0, 0, 22, 0, 1,128, 5, 1, 1, 0, 64, 1,128, 1, 28,129, + 0, 1, 87, 64, 65, 2, 22,128, 0,128, 5,129, 1, 0, 65,193, 1, 0, 28, 65, + 0, 1, 6, 65,128, 1, 30, 1, 0, 1, 22, 64, 10,128,197, 0, 2, 0, 0, 1, + 0, 0, 64, 1, 0, 1,220,128,128, 1,218, 64, 0, 0, 22,192, 3,128, 5,193, + 0, 0, 64, 1, 0, 0, 28,129, 0, 1, 26, 1, 0, 0, 22, 0, 1,128, 69, 1, + 1, 0,128, 1, 0, 2, 92,129, 0, 1, 87, 64,193, 2, 22,128, 0,128, 69,129, + 1, 0,129,193, 1, 0, 92, 65, 0, 1, 70, 65, 0, 2, 94, 1, 0, 1, 22,192, + 4,128, 5, 1, 1, 0, 64, 1,128, 1, 28,129, 0, 1, 87, 64, 66, 2, 22, 0, + 1,128, 5, 1, 1, 0, 64, 1,128, 1, 28,129, 0, 1, 23, 0, 64, 2, 22, 0, + 2,128, 5,129, 2, 0, 64, 1,128, 1, 28,129, 0, 1, 26, 1, 0, 0, 22, 64, + 0,128, 30, 1, 0, 1, 22,128, 0,128,222, 0, 0, 1, 22, 0, 0,128,222, 0, + 0, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115, +116,114,105,110,103, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,117,112,112,101,114, + 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107,115, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 87,105,100,103,101, +116, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 4, 6, 0, 0, + 0, 0, 0, 0, 0,116, 97, 98,108,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +101,114,114,111,114, 0, 4, 19, 0, 0, 0, 0, 0, 0, 0,105,110,118, 97,108, +105,100, 32,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 13, 0, 0, 0, 0, + 0, 0, 0, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,110,117,109, 98,101,114, 0, 4, 10, 0, 0, 0, 0, 0, 0, + 0, 71,101,116, 72, 97,110,100,108,101, 0, 0, 0, 0, 0, 67, 0, 0, 0, 60, + 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 61, 0, 0, 0, 61, + 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 66, 0, 0, 0, 66, + 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 68, + 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, + 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, + 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 70, 0, 0, 0, 70, 0, 0, 0, 70, + 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, + 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, + 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 73, + 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 74, 0, 0, 0, 76, + 0, 0, 0, 79, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, + 97,110,100,108,101, 0, 0, 0, 0, 0, 66, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0,105,110,100,101,120, 0, 0, 0, 0, 0, 66, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 73, 78, 68, 69, 88, 0, 4, 0, 0, 0, 66, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 11, 0, 0, 0, 23, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 28, 0, 0, 0, 66, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 33, 0, + 0, 0, 45, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,105,104, 0, 59, 0, 0, + 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, + 0,109, 0, 0, 0, 0, 3, 0, 14, 78, 0, 0, 0,197, 0, 0, 0, 0, 1,128, + 0,220,128, 0, 1, 5, 1, 0, 0, 64, 1, 0, 1, 28,129, 0, 1, 69, 65, 0, + 0,128, 1, 0, 0, 92,129, 0, 1, 90, 1, 0, 0, 22, 0, 1,128,133, 1, 0, + 0,192, 1,128, 2,156,129, 0, 1, 87,128, 64, 3, 22,128, 0,128,133,193, 0, + 0,193, 1, 1, 0,156, 65, 0, 1, 87, 64,193, 1, 22, 64, 0,128, 23,128,193, + 1, 22, 0, 13,128,133,129, 1, 0,134,193, 65, 3,192, 1,128, 0,156,129, 0, + 1,197, 1, 2, 0,198,129,129, 3,218, 1, 0, 0, 22,128, 3,128, 6, 66,194, + 3, 26, 66, 0, 0, 22,192, 0,128, 69,130, 2, 0,128, 2, 0, 0, 92,130, 0, + 1, 6, 66,130, 3, 69,194, 2, 0,128, 2, 0, 0,192, 2, 0, 3, 0, 3, 0, + 4, 64, 3, 0, 1, 92, 66,128, 2, 73,129,128, 0, 22,128, 7,128, 5, 2, 3, + 0, 64, 2, 0, 1, 28,130, 0, 1, 23, 64, 67, 4, 22, 64, 2,128, 5,130, 3, + 0, 64, 2, 0, 1, 28,130, 0, 1, 69,194, 3, 0,128, 2, 0, 0,192, 2, 0, + 3, 0, 3, 0, 4, 92, 66, 0, 2, 73, 1,196, 0, 22,192, 3,128, 87,128, 65, + 2, 22,192, 0,128, 87, 64, 65, 2, 22, 64, 0,128, 23, 64, 68, 2, 22,128, 1, +128, 5,194, 3, 0, 64, 2, 0, 0,128, 2, 0, 3,192, 2, 0, 1, 28, 66, 0, + 2, 73, 1,196, 0, 22,128, 0,128, 73,129,128, 0, 22, 0, 0,128, 73,129,128, + 0, 30, 0,128, 0, 18, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121, +112,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 87,105, +100,103,101,116, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,108,101, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, 0, 4, 19, 0, 0, 0, + 0, 0, 0, 0,105,110,118, 97,108,105,100, 32,105,117,112, 32,104, 97,110,100, +108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,117,109, 98,101,114, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,117,112,112,101,114, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99, + 97,108,108, 98, 97, 99,107,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 13, + 0, 0, 0, 0, 0, 0, 0, 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, + 4, 15, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, 97,108,108, 98, + 97, 99,107, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97, +110,100,108,101, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108, +101, 95,115,101,116,110, 97,109,101, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, 83, +116,111,114,101, 65,116,116,114,105, 98,117,116,101, 0, 0, 4, 4, 0, 0, 0, + 0, 0, 0, 0,110,105,108, 0, 0, 0, 0, 0, 78, 0, 0, 0, 82, 0, 0, 0, + 82, 0, 0, 0, 82, 0, 0, 0, 83, 0, 0, 0, 83, 0, 0, 0, 83, 0, 0, 0, + 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, + 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, + 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, + 86, 0, 0, 0, 86, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, + 87, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, + 90, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, + 92, 0, 0, 0, 92, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, + 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, + 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, + 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 98, 0, 0, 0, 98, 0, 0, 0, + 98, 0, 0, 0, 98, 0, 0, 0, 98, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, +100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0, +100, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0, +101, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,104, 0, 0, 0,105, 0, 0, 0, +107, 0, 0, 0,109, 0, 0, 0, 10, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 77, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0,105,110,100,101,120, 0, 0, 0, 0, 0, 77, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 0, 0, 0, 0, 77, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0,116,105, 0, 3, 0, 0, 0, 77, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0,116,118, 0, 6, 0, 0, 0, 77, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 9, 0, 0, 0, 77, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 73, 78, 68, 69, 88, 0, 27, 0, 0, 0, 75, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 99, 98, 0, 29, 0, 0, 0, 75, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 32, 0, 0, 0, 45, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109,101, 0, 54, 0, 0, 0, 60, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 0, 0, 0,130, + 0, 0, 0, 0, 1, 0, 6, 19, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 92, +128, 0, 1, 90, 64, 0, 0, 22,192, 2,128,133, 64, 0, 0,134,128, 64, 1,193, +192, 0, 0, 5, 1, 1, 0, 64, 1, 0, 0, 28, 1, 0, 1,156,128, 0, 0,197, + 64, 1, 0, 0, 1, 0, 1, 64, 1, 0, 0,220, 64,128, 1,158, 0, 0, 1, 94, + 0, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, + 71,101,116, 78, 97,109,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,116,114, +105,110,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,111,114,109, 97,116, 0, + 4, 17, 0, 0, 0, 0, 0, 0, 0, 95, 73, 85, 80, 76, 85, 65, 95, 78, 65, 77, + 69, 40, 37,115, 41, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,116,111,115,116,114, +105,110,103, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 72, 97,110,100, +108,101, 0, 0, 0, 0, 0, 19, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,123, + 0, 0, 0,124, 0, 0, 0,124, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, + 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,126, + 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,127, 0, 0, 0,129, + 0, 0, 0,130, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,118, + 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109, +101, 0, 3, 0, 0, 0, 18, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 97,117, +116,111,110, 97,109,101, 0, 12, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,132, 0, 0, 0,136, 0, 0, 0, 0, 1, 0, 4, 6, + 0, 0, 0, 69, 0, 0, 0,134, 64, 64, 0,228, 0, 0, 0, 0, 0, 0, 0, 73, +192, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,133, 0, 0, 0,135, 0, 0, 0, 1, 1, + 0, 4, 6, 0, 0, 0, 68, 0, 0, 0, 75, 0,192, 0,192, 0, 0, 0, 93, 0, +128, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0, 99,111,110,115,116,114,117, 99,116,111,114, 0, 0, 0, 0, 0, 6, + 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, + 0, 0, 0,135, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 99,116,114,108, 0, 6, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0, +135, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,136, 0, 0, 0, 1, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 0, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,138, 0, 0, 0,156, 0, 0, + 0, 0, 2, 0, 8, 31, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 1, 65, 0, + 0,156, 64,128, 1,133,128, 0, 0,192, 0, 0, 0,156,128, 0, 1,154, 64, 0, + 0, 22,192, 4,128,197,192, 0, 0, 5, 1, 1, 0, 6, 65, 65, 2, 64, 1,128, + 0, 28,129, 0, 1,198, 0,129, 1,218, 64, 0, 0, 22, 0, 0,128,197,128, 1, + 0, 10,129, 0, 0, 9,193,128,131, 9, 1, 0,132, 69, 1, 0, 0,128, 1, 0, + 2,193, 65, 2, 0, 92, 65,128, 1, 69,129, 2, 0,128, 1, 0, 0,192, 1, 0, + 2, 92, 65,128, 1, 30, 0, 0, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 13, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 87,105,100,103,101,116, 0, + 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0,115,116,114,105,110,103, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,117,112, +112,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 83,101,116, 87,105,100,103,101,116, 0, 0, 0, 0, 0, 31, 0, + 0, 0,140, 0, 0, 0,140, 0, 0, 0,140, 0, 0, 0,140, 0, 0, 0,142, 0, + 0, 0,142, 0, 0, 0,142, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,145, 0, + 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, + 0, 0,146, 0, 0, 0,146, 0, 0, 0,147, 0, 0, 0,150, 0, 0, 0,150, 0, + 0, 0,150, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, + 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,155, 0, + 0, 0,156, 0, 0, 0, 5, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97, +110,100,108,101, 0, 0, 0, 0, 0, 30, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, + 0,116,121,112,101,110, 97,109,101, 0, 0, 0, 0, 0, 30, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 7, 0, 0, 0, 30, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 15, 0, 0, 0, 29, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 21, 0, + 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,166, 0, + 0, 0,168, 0, 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 69, 0, 0, 0,134, 64, + 64, 0, 92, 64, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, + 0, 0, 0, 83,104,111,119, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110, +100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0, +167, 0, 0, 0,168, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,170, 0, 0, 0,172, 0, 0, 0, 0, 1, 0, 3, 4, + 0, 0, 0, 69, 0, 0, 0,134, 64, 64, 0, 92, 64, 0, 1, 30, 0,128, 0, 2, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 72,105,100,101, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, + 0,171, 0, 0, 0,171, 0, 0, 0,171, 0, 0, 0,172, 0, 0, 0, 1, 0, 0, + 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,174, 0, 0, 0, +176, 0, 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 69, 0, 0, 0,134, 64, 64, 0, + 92, 64, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 77, 97,112, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, + 0, 0, 0, 0, 0, 4, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, + 0,176, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106, +101, 99,116, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,178, 0, 0, 0,189, 0, 0, 0, 0, 2, 0, 7, 23, 0, 0, 0, +139, 0, 64, 0, 0, 1,128, 0,156,128,128, 1,202,128, 0, 0,201, 0,128,128, +201,128, 0,129, 5,193, 0, 0, 64, 1, 0, 1,129, 1, 1, 0, 28, 65,128, 1, + 5,193, 0, 0, 64, 1,128, 1,129, 65, 1, 0, 28, 65,128, 1, 5,129, 1, 0, + 64, 1, 0, 1,128, 1,128, 1, 28, 65,128, 1, 11,193,193, 1,128, 1,128, 0, + 28, 65,128, 1,158, 0, 0, 1, 30, 0,128, 0, 8, 0, 0, 0, 4, 14, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 83,101,116, 87,105,100,103,101,116, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 0, 0, 0, + 0, 23, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,180, 0, 0, + 0,181, 0, 0, 0,182, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,184, 0, 0, + 0,184, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, + 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,187, 0, 0, + 0,187, 0, 0, 0,187, 0, 0, 0,188, 0, 0, 0,189, 0, 0, 0, 4, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 22, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 22, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 3, 0, + 0, 0, 22, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, + 0, 6, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,191, 0, 0, 0,203, 0, 0, 0, 0, 2, 0, 12, 25, 0, 0, 0,134, 0, 64, + 0,197, 64, 0, 0, 0, 1,128, 0,220, 0, 1, 1, 22, 0, 4,128, 5,130, 0, + 0, 64, 2, 0, 3, 28,130, 0, 1, 23,192, 64, 4, 22,128, 2,128, 5, 2, 1, + 0, 64, 2,128, 3, 28,130, 0, 1, 23, 64, 65, 4, 22, 64, 1,128, 5,130, 1, + 0, 64, 2, 0, 0,128, 2, 0, 3,192, 2,128, 3, 28, 66, 0, 2, 22, 0, 0, +128,137,192, 1, 3,225,128, 0, 0, 22, 0,251,127, 30, 0,128, 0, 7, 0, 0, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,112, 97,105,114,115, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,116,121,112,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,117,109, 98,101, +114, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100, +108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97,119,115,101,116, 0, 0, + 0, 0, 0, 25, 0, 0, 0,192, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,193, + 0, 0, 0,193, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, + 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, + 0, 0, 0,194, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, + 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,200, 0, 0, 0,193, 0, 0, 0,201, + 0, 0, 0,203, 0, 0, 0, 8, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, + 98,106,101, 99,116, 0, 0, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 24, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 0,104, 97,110,100,108,101, 0, 1, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 40,102,111,114, 32,103,101,110,101,114, 97,116,111,114, 41, + 0, 4, 0, 0, 0, 24, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111, +114, 32,115,116, 97,116,101, 41, 0, 4, 0, 0, 0, 24, 0, 0, 0, 14, 0, 0, + 0, 0, 0, 0, 0, 40,102,111,114, 32, 99,111,110,116,114,111,108, 41, 0, 4, + 0, 0, 0, 24, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 5, 0, 0, + 0, 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,118, 0, 5, 0, 0, 0, 22, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218, 0, 0, 0,227, + 0, 0, 0, 0, 2, 0, 11, 28, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 1, + 65, 0, 0,156,128,128, 1,197,128, 0, 0,198,192,192, 1, 0, 1,128, 0,220, +128, 0, 1, 1, 1, 1, 0, 64, 1,128, 1,129, 1, 1, 0, 32, 1, 2,128, 5, + 66, 1, 0, 70,194,129, 0, 28,130, 0, 1, 23,128, 65, 4, 22,192, 0,128, 5, +194, 1, 0, 64, 2, 0, 1,134,194,129, 0, 28, 66,128, 1, 31, 65,253,127, 5, + 1, 2, 0, 6, 65, 66, 2, 64, 1, 0, 0,128, 1,128, 0, 28, 65,128, 1, 30, + 0,128, 0, 10, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97,119,103, +101,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,108,101, 0, 4, 5, 0, 0, 0, 0, + 0, 0, 0,103,101,116,110, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 65,112,112,101,110,100, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115, +101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 0, 0, 0, 0, 28, 0, 0, + 0,219, 0, 0, 0,219, 0, 0, 0,219, 0, 0, 0,219, 0, 0, 0,220, 0, 0, + 0,220, 0, 0, 0,220, 0, 0, 0,220, 0, 0, 0,221, 0, 0, 0,221, 0, 0, + 0,221, 0, 0, 0,221, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, + 0,222, 0, 0, 0,222, 0, 0, 0,223, 0, 0, 0,223, 0, 0, 0,223, 0, 0, + 0,223, 0, 0, 0,221, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, 0, 0, + 0,226, 0, 0, 0,226, 0, 0, 0,227, 0, 0, 0, 8, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 27, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 27, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 0, 0, 0, 27, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 8, 0, 0, 0, 27, 0, 0, + 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,105,110,100,101,120, 41, + 0, 11, 0, 0, 0, 22, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111, +114, 32,108,105,109,105,116, 41, 0, 11, 0, 0, 0, 22, 0, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, 11, 0, 0, 0, + 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 12, 0, 0, 0, 21, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,238, 0, 0, 0,252, 0, + 0, 0, 0, 2, 0, 10, 52, 0, 0, 0,128, 0, 0, 0,219, 64,128, 0, 22, 0, + 0,128,193, 0, 0, 0, 21,192, 0, 1,133, 64, 0, 0,154, 0, 0, 0, 22,128, + 0,128,133, 64, 0, 0,137, 0, 0,129, 22,192, 9,128,133,192, 0, 0,202,192, + 0, 0,201, 64, 65,130,201,192, 65,131,201, 64, 66,132,156,128, 0, 1,197,128, + 2, 0, 10, 1, 1, 0, 9, 1,195,133, 9, 1,195,134, 9, 1, 0,129, 9,129, + 67,131,220,128, 0, 1, 5,193, 3, 0, 74,193, 0, 1,128, 1,128, 1,192, 1, + 0, 1, 73, 65, 68,136, 73,193, 68,137, 73, 65, 69,138, 98, 65, 0, 1, 28,129, + 0, 1, 69,129, 5, 0,138, 1,129, 0,192, 1, 0, 2,137,193, 69,130,137,129, + 0,140,137,129,128,140,137,129, 0,141,162, 65,128, 0, 92,129, 0, 1,199, 64, + 0, 0,139,193,198, 2, 5, 2, 7, 0, 69, 2, 7, 0,156, 65, 0, 2,139, 65, +199, 2,156, 65, 0, 1,131, 1, 0, 3,135, 65, 0, 0, 30, 0,128, 0, 30, 0, + 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 20, 0, 0, 0, 0, 0, 0, + 0,101,114,114,111,114, 95,109,101,115,115, 97,103,101, 95,112,111,112,117,112, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 98,117,116,116,111,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, + 0,116,105,116,108,101, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 79,107, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,115,105,122,101, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0, 54, 48, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, + 0, 4, 44, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, 95,109,101,115,115, + 97,103,101, 95,112,111,112,117,112, 32, 61, 32,110,105,108, 59, 32,114,101,116, +117,114,110, 32,105,117,112, 46, 67, 76, 79, 83, 69, 0, 4, 10, 0, 0, 0, 0, + 0, 0, 0,109,117,108,116,105,108,105,110,101, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0,101,120,112, 97,110,100, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 89, 69, + 83, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,114,101, 97,100,111,110,108,121, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0, 51, 48, 48,120, 49, 53, 48, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0,118, 98,111,120, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, + 97,108,105,103,110,109,101,110,116, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 65, + 67, 69, 78, 84, 69, 82, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97,114,103, +105,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 49, 48,120, 49, 48, 0, 4, 4, + 0, 0, 0, 0, 0, 0, 0,103, 97,112, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, + 49, 48, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108,111,103, 0, 4, + 14, 0, 0, 0, 0, 0, 0, 0, 69,114,114,111,114, 32, 77,101,115,115, 97,103, +101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,100,101,102, 97,117,108,116,101,115, + 99, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,100,101,102, 97,117,108,116,101,110, +116,101,114, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,115,116, 97,114,116,102,111, + 99,117,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0, 67, 69, 78, 84, 69, 82, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,100,101,115,116,114,111,121, 0, 0, 0, 0, 0, 52, 0, 0, 0, +239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0, +240, 0, 0, 0,240, 0, 0, 0,240, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0, +241, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0, +243, 0, 0, 0,243, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0, +244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,245, 0, 0, 0, +245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0, +245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0, +246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0, +246, 0, 0, 0,246, 0, 0, 0,247, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0, +248, 0, 0, 0,248, 0, 0, 0,249, 0, 0, 0,249, 0, 0, 0,250, 0, 0, 0, +250, 0, 0, 0,252, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, +101,114,114, 0, 0, 0, 0, 0, 51, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, +116,114, 97, 99,101, 98, 97, 99,107, 0, 0, 0, 0, 0, 51, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 98,116, 0, 17, 0, 0, 0, 51, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0,109,108, 0, 24, 0, 0, 0, 51, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0,118, 98, 0, 33, 0, 0, 0, 51, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0,100,103, 0, 42, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,254, 0, 0, 0,254, 0, 0, 0, 0, 0, 7, 2, 2, 0, + 0, 0, 30, 0, 0, 1, 30, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, + 0, 0,254, 0, 0, 0,254, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 13, 1, 0, 0, 0, 2, 0, 6, 29, 0, + 0, 0, 26, 64, 0, 0, 22,192, 0,128,133, 0, 0, 0,192, 0,128, 0,156, 64, + 0, 1, 30, 0,128, 0,133, 64, 0, 0,197,128, 0, 0, 0, 1, 0, 0,220, 0, + 0, 1,156,128, 0, 0,198,192, 64, 1,218, 64, 0, 0, 22, 0, 1,128,197, 0, + 0, 0, 6, 1, 65, 1,220, 64, 0, 1, 30, 0,128, 0, 22, 0, 2,128,197, 64, + 1, 0,198,128,193, 1, 0, 1, 0, 1, 65,193, 0, 0,220, 64,128, 1,197,192, + 1, 0, 0, 1, 0, 1,221, 0, 0, 1,222, 0, 0, 0, 30, 0,128, 0, 8, 0, + 0, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 95, 69, 82, 82, 79, 82, 77, 69, 83, + 83, 65, 71, 69, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,112, 97, 99,107, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,112, 99, 97,108,108, 0, 3, 0, 0, 0, 0, 0, + 0,240, 63, 3, 0, 0, 0, 0, 0, 0, 0, 64, 4, 6, 0, 0, 0, 0, 0, 0, + 0,116, 97, 98,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114,101,109,111, +118,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 29, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0, 2, + 1, 0, 0, 2, 1, 0, 0, 3, 1, 0, 0, 5, 1, 0, 0, 5, 1, 0, 0, 5, + 1, 0, 0, 5, 1, 0, 0, 5, 1, 0, 0, 6, 1, 0, 0, 6, 1, 0, 0, 6, + 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 8, 1, 0, 0, 8, + 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 10, + 1, 0, 0, 11, 1, 0, 0, 11, 1, 0, 0, 11, 1, 0, 0, 11, 1, 0, 0, 13, + 1, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,102, 0, 0, 0, 0, + 0, 28, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,101,114,114, 0, 0, 0, 0, + 0, 28, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 11, 0, 0, + 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 1, 0, + 0, 15, 1, 0, 0, 0, 1, 0, 4, 7, 0, 0, 0, 69, 0, 0, 0,133, 64, 0, + 0,192, 0, 0, 0,156, 0, 0, 1, 93, 0, 0, 0, 94, 0, 0, 0, 30, 0,128, + 0, 2, 0, 0, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,112,114,111,116,101, 99, +116,101,100, 99, 97,108,108, 95, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,108,111, + 97,100,115,116,114,105,110,103, 0, 0, 0, 0, 0, 7, 0, 0, 0, 15, 1, 0, + 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, + 0, 15, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, + 1, 0, 0, 16, 1, 0, 0, 0, 1, 0, 4, 7, 0, 0, 0, 69, 0, 0, 0,133, + 64, 0, 0,192, 0, 0, 0,156, 0, 0, 1, 93, 0, 0, 0, 94, 0, 0, 0, 30, + 0,128, 0, 2, 0, 0, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,112,114,111,116, +101, 99,116,101,100, 99, 97,108,108, 95, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +108,111, 97,100,102,105,108,101, 0, 0, 0, 0, 0, 7, 0, 0, 0, 16, 1, 0, + 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, + 0, 16, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,102, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, + 1, 0, 0, 20, 1, 0, 0, 0, 3, 0, 8, 9, 0, 0, 0,197, 0, 0, 0,198, + 64,192, 1, 1,129, 0, 0, 78, 1,128,129,142, 65,128,129,206,129,128,129,221, + 0,128, 2,222, 0, 0, 0, 30, 0,128, 0, 4, 0, 0, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, +102,111,114,109, 97,116, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 37,100, 32, 37, +100, 32, 37,100, 0, 3, 0, 0, 0, 0, 0,224,111, 64, 0, 0, 0, 0, 9, 0, + 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, + 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 20, 1, 0, 0, 3, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,114, 0, 0, 0, 0, 0, 8, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0,103, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, 98, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, +114, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, 0, 9, 0, 0, 0, + 37, 0, 0, 0, 29, 0, 0, 0, 53, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, + 55, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, + 56, 0, 0, 0, 79, 0, 0, 0,109, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0, +111, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0, +112, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0, +113, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0, +114, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0, +115, 0, 0, 0,130, 0, 0, 0,122, 0, 0, 0,136, 0, 0, 0,132, 0, 0, 0, +156, 0, 0, 0,138, 0, 0, 0,162, 0, 0, 0,163, 0, 0, 0,163, 0, 0, 0, +164, 0, 0, 0,166, 0, 0, 0,168, 0, 0, 0,166, 0, 0, 0,170, 0, 0, 0, +172, 0, 0, 0,170, 0, 0, 0,174, 0, 0, 0,176, 0, 0, 0,174, 0, 0, 0, +178, 0, 0, 0,189, 0, 0, 0,178, 0, 0, 0,191, 0, 0, 0,203, 0, 0, 0, +191, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0, +214, 0, 0, 0,215, 0, 0, 0,215, 0, 0, 0,216, 0, 0, 0,218, 0, 0, 0, +227, 0, 0, 0,218, 0, 0, 0,229, 0, 0, 0,229, 0, 0, 0,229, 0, 0, 0, +229, 0, 0, 0,236, 0, 0, 0,236, 0, 0, 0,252, 0, 0, 0,238, 0, 0, 0, +254, 0, 0, 0,254, 0, 0, 0, 13, 1, 0, 0, 0, 1, 0, 0, 15, 1, 0, 0, + 15, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 20, 1, 0, 0, 18, 1, 0, 0, + 24, 1, 0, 0, 24, 1, 0, 0, 24, 1, 0, 0, 24, 1, 0, 0, 25, 1, 0, 0, + 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 26, 1, 0, 0, + 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 27, 1, 0, 0, + 27, 1, 0, 0, 27, 1, 0, 0, 28, 1, 0, 0, 28, 1, 0, 0, 29, 1, 0, 0, + 3, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0,119,105,100,103,101,116, 95,103, +101,116,116, 97, 98,108,101, 0, 7, 0, 0, 0,113, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,103,101,116,116, 97, 98,108,101, + 0, 16, 0, 0, 0,113, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,105,104, 97, +110,100,108,101, 95,115,101,116,116, 97, 98,108,101, 0, 17, 0, 0, 0,113, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/iuplua_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/iuplua_le64.loh b/iup/srclua5/loh/iuplua_le64.loh new file mode 100755 index 0000000..fb4a432 --- /dev/null +++ b/iup/srclua5/loh/iuplua_le64.loh @@ -0,0 +1,545 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/iuplua_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/iuplua_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 7,114, 0, 0, 0, 10, 0, 0, 0, 7, 0, 0, 0, 36, 0, 0, 0, + 7, 64, 0, 0, 36, 64, 0, 0, 7,128, 0, 0, 36,128, 0, 0, 69,192, 0, 0, +129, 0, 1, 0, 92, 64, 0, 1, 69, 64, 1, 0,129, 0, 1, 0,193,128, 1, 0, + 0, 1, 0, 0, 92, 64, 0, 2,100,192, 0, 0,164, 0, 1, 0,197,192, 0, 0, + 1,193, 1, 0,220, 64, 0, 1,197, 64, 1, 0, 1,193, 1, 0, 65,129, 1, 0, +128, 1,128, 0,220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65, 1, 2, 0, +128, 1, 0, 1,220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65, 65, 2, 0, +133,129, 2, 0,220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65,193, 2, 0, +133, 1, 3, 0,220, 64, 0, 2,228, 64, 1, 0,199, 64, 3, 0,228,128, 1, 0, +199,128, 3, 0,228,192, 1, 0,199,192, 3, 0,202, 64, 0, 0, 10, 1, 0, 0, +201, 0,129,136,199, 0, 4, 0,197, 0, 4, 0, 36, 1, 2, 0,201, 0, 1,137, +197, 0, 4, 0, 36, 65, 2, 0,201, 0,129,137,197, 0, 4, 0, 36,129, 2, 0, +201, 0, 1,138,197, 0, 4, 0, 36,193, 2, 0,201, 0,129,138,197, 0, 4, 0, + 36, 1, 3, 0,201, 0, 1,139,197,192, 5, 0, 5, 1, 4, 0, 65, 1, 1, 0, +220, 64,128, 1,202, 64, 0, 0, 5, 1, 4, 0,201, 0,129,140,199, 0, 6, 0, +197, 0, 6, 0, 36, 65, 3, 0,201, 0, 1,139,197,192, 5, 0, 5, 1, 6, 0, + 65, 1, 1, 0,220, 64,128, 1,195, 0,128, 1,199,128, 6, 0,228,128, 3, 0, +199,192, 6, 0,228,192, 3, 0,199, 0, 7, 0,228, 0, 4, 0,199, 64, 7, 0, +228, 64, 4, 0,199,128, 7, 0,228,128, 4, 0,199,192, 7, 0,228,192, 4, 0, +199, 0, 8, 0,197, 64, 8, 0,198,128,200, 1,218, 0, 0, 0, 22,128, 3,128, +197, 64, 8, 0,198,128,200, 1,198,192,200, 1, 5, 65, 9, 0,201, 0, 1,146, +197, 64, 8, 0,198,128,200, 1,198,192,200, 1, 5, 65, 9, 0,201, 0, 1,147, +197, 64, 9, 0, 5, 65, 9, 0,201, 0,129,147,197, 64, 9, 0,201, 0, 73,148, + 30, 0,128, 0, 41, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99, 97,108, +108, 98, 97, 99,107,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,105,117,112, 67, + 97,108,108, 77,101,116,104,111,100, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 82, +101,103,105,115,116,101,114, 67, 97,108,108, 98, 97, 99,107, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 78,101,119, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 77,101,116,104,111,100, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 95, 95,105,110,100,101,120, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0, 95, 95,110,101,119,105,110,100,101,120, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0, 95, 95,116,111,115,116,114,105,110,103, 0, 4, 17, 0, 0, + 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,116,111,115,116,114,105,110, +103, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 95, 95,101,113, 0, 4, 16, 0, 0, + 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95, 99,111,109,112, 97,114,101, + 0, 4, 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101, +116,110, 97,109,101, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101, +103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 15, 0, 0, 0, 0, 0, + 0, 0, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +115,104,111,119, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,104,105,100,101, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0,109, 97,112, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0, 99,111,110,115,116,114,117, 99,116,111,114, 0, 4, 14, 0, 0, 0, 0, 0, + 0, 0,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 4, 0, + 0, 0, 0, 0, 0, 0, 66, 79, 88, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, + 95,109,101,115,115, 97,103,101, 95,112,111,112,117,112, 0, 4, 14, 0, 0, 0, + 0, 0, 0, 0, 95, 69, 82, 82, 79, 82, 77, 69, 83, 83, 65, 71, 69, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,112, 97, 99,107, 0, 4, 15, 0, 0, 0, 0, 0, 0, + 0,112,114,111,116,101, 99,116,101,100, 99, 97,108,108, 95, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0,100,111,115,116,114,105,110,103, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,100,111,102,105,108,101, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 82, + 71, 66, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 95, 71, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,112, 97, 99,107, 97,103,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,108,111, 97,100,101,100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,105,117,112, +108,117, 97, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0,105,117,112,108,117, 97, 53, 49, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0, 95, 77, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 95, 80, 65, 67, + 75, 65, 71, 69, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, + 0, 27, 0, 0, 0, 0, 1, 7, 7, 35, 0, 0, 0,134, 0,192, 0,198, 0, 0, + 1,218, 64, 0, 0, 22, 0, 0,128, 30, 0,128, 0, 5, 65, 0, 0, 64, 1,128, + 1, 28,129, 0, 1, 23,128, 64, 2, 22,128, 1,128, 0, 1,128, 1, 69,193, 0, + 0,128, 1,128, 0, 92, 1, 0, 1, 29, 1, 0, 0, 30, 1, 0, 0, 22, 0, 4, +128, 5, 65, 0, 0, 64, 1,128, 1, 28,129, 0, 1, 23, 0, 65, 2, 22, 0, 2, +128, 5, 65, 1, 0,135, 64, 1, 0, 69,129, 1, 0, 70,193,193, 2,128, 1,128, + 1, 92,129, 0, 1, 7, 65, 1, 0, 94, 1, 0, 1, 22,128, 0,128, 5,129, 1, + 0, 6, 1, 66, 2, 30, 1, 0, 1, 30, 0,128, 0, 9, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0,240, 63, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,116,105,111,110, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,115, +101,108,102, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0,100,111,115,116,114,105,110,103, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0, 69, 82, 82, 79, 82, 0, 0, 0, 0, 0, 35, 0, 0, 0, 10, 0, + 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0, + 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 27, 0, 0, 0, 6, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109,101, 0, 0, 0, 0, 0, 34, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 34, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 1, 0, + 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 2, + 0, 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,116,101,109,112, 0, + 23, 0, 0, 0, 30, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,114,101,115,117, +108,116, 0, 28, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 29, 0, 0, 0, 37, 0, 0, 0, 0, 3, 0, 5, 15, 0, 0, 0,197, + 0, 0, 0,198, 0,128, 1,218, 64, 0, 0, 22,128, 0,128,197, 0, 0, 0, 10, + 1, 0, 0,201, 0, 1, 0,197, 0, 0, 0,198, 0,128, 1,154, 0, 0, 0, 22, + 64, 0,128,201, 64, 0, 1, 22, 0, 0,128,201, 64,128,128, 30, 0,128, 0, 2, + 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, +115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 15, 0, 0, 0, 30, + 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, + 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 35, 0, 0, 0, 37, 0, 0, 0, 4, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109,101, 0, 0, 0, 0, 0, + 14, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 0, 0, + 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 99, 98, 0, 9, 0, 0, + 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, + 0, 53, 0, 0, 0, 0, 2, 0, 7, 21, 0, 0, 0,128, 0, 0, 0,195, 0,128, + 1, 5, 1, 0, 0, 64, 1, 0, 1,128, 1,128, 0, 28,129,128, 1,192, 0, 0, + 2,218, 0, 0, 0, 22, 0, 0,128,222, 0, 0, 1, 5, 1, 0, 0, 64, 1, 0, + 1,129, 65, 0, 0, 28,129,128, 1,128, 0, 0, 2,154, 64, 0, 0, 22, 0,252, +127, 3, 1, 0, 2, 30, 1, 0, 1, 22, 64,251,127, 30, 0,128, 0, 2, 0, 0, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97,119,103,101,116, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 0, 0, 0, 0, 21, 0, 0, + 0, 45, 0, 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, + 0, 48, 0, 0, 0, 48, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, + 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, + 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, + 0, 53, 0, 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106, +101, 99,116, 0, 0, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, +105,110,100,101,120, 0, 0, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0,112, 0, 1, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, +118, 0, 2, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 59, 0, 0, 0, 79, 0, 0, 0, 0, 2, 0, 7, 67, 0, 0, 0,133, 0, + 0, 0,134, 64, 64, 1,192, 0,128, 0,156,128, 0, 1,197,128, 0, 0,198,128, +128, 1,218, 0, 0, 0, 22,192, 3,128,197,192, 0, 0, 0, 1, 0, 0,220,128, + 0, 1,218, 0, 0, 0, 22, 0, 1,128, 5, 1, 1, 0, 64, 1,128, 1, 28,129, + 0, 1, 87, 64, 65, 2, 22,128, 0,128, 5,129, 1, 0, 65,193, 1, 0, 28, 65, + 0, 1, 6, 65,128, 1, 30, 1, 0, 1, 22, 64, 10,128,197, 0, 2, 0, 0, 1, + 0, 0, 64, 1, 0, 1,220,128,128, 1,218, 64, 0, 0, 22,192, 3,128, 5,193, + 0, 0, 64, 1, 0, 0, 28,129, 0, 1, 26, 1, 0, 0, 22, 0, 1,128, 69, 1, + 1, 0,128, 1, 0, 2, 92,129, 0, 1, 87, 64,193, 2, 22,128, 0,128, 69,129, + 1, 0,129,193, 1, 0, 92, 65, 0, 1, 70, 65, 0, 2, 94, 1, 0, 1, 22,192, + 4,128, 5, 1, 1, 0, 64, 1,128, 1, 28,129, 0, 1, 87, 64, 66, 2, 22, 0, + 1,128, 5, 1, 1, 0, 64, 1,128, 1, 28,129, 0, 1, 23, 0, 64, 2, 22, 0, + 2,128, 5,129, 2, 0, 64, 1,128, 1, 28,129, 0, 1, 26, 1, 0, 0, 22, 64, + 0,128, 30, 1, 0, 1, 22,128, 0,128,222, 0, 0, 1, 22, 0, 0,128,222, 0, + 0, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115, +116,114,105,110,103, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,117,112,112,101,114, + 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107,115, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 87,105,100,103,101, +116, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 4, 6, 0, 0, + 0, 0, 0, 0, 0,116, 97, 98,108,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +101,114,114,111,114, 0, 4, 19, 0, 0, 0, 0, 0, 0, 0,105,110,118, 97,108, +105,100, 32,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 13, 0, 0, 0, 0, + 0, 0, 0, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,110,117,109, 98,101,114, 0, 4, 10, 0, 0, 0, 0, 0, 0, + 0, 71,101,116, 72, 97,110,100,108,101, 0, 0, 0, 0, 0, 67, 0, 0, 0, 60, + 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 61, 0, 0, 0, 61, + 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, 0, 62, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 66, 0, 0, 0, 66, + 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 68, + 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, + 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, + 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 70, 0, 0, 0, 70, 0, 0, 0, 70, + 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, + 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, + 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 73, + 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 74, 0, 0, 0, 76, + 0, 0, 0, 79, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, + 97,110,100,108,101, 0, 0, 0, 0, 0, 66, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0,105,110,100,101,120, 0, 0, 0, 0, 0, 66, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 73, 78, 68, 69, 88, 0, 4, 0, 0, 0, 66, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 11, 0, 0, 0, 23, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 28, 0, 0, 0, 66, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 33, 0, + 0, 0, 45, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,105,104, 0, 59, 0, 0, + 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, + 0,109, 0, 0, 0, 0, 3, 0, 14, 78, 0, 0, 0,197, 0, 0, 0, 0, 1,128, + 0,220,128, 0, 1, 5, 1, 0, 0, 64, 1, 0, 1, 28,129, 0, 1, 69, 65, 0, + 0,128, 1, 0, 0, 92,129, 0, 1, 90, 1, 0, 0, 22, 0, 1,128,133, 1, 0, + 0,192, 1,128, 2,156,129, 0, 1, 87,128, 64, 3, 22,128, 0,128,133,193, 0, + 0,193, 1, 1, 0,156, 65, 0, 1, 87, 64,193, 1, 22, 64, 0,128, 23,128,193, + 1, 22, 0, 13,128,133,129, 1, 0,134,193, 65, 3,192, 1,128, 0,156,129, 0, + 1,197, 1, 2, 0,198,129,129, 3,218, 1, 0, 0, 22,128, 3,128, 6, 66,194, + 3, 26, 66, 0, 0, 22,192, 0,128, 69,130, 2, 0,128, 2, 0, 0, 92,130, 0, + 1, 6, 66,130, 3, 69,194, 2, 0,128, 2, 0, 0,192, 2, 0, 3, 0, 3, 0, + 4, 64, 3, 0, 1, 92, 66,128, 2, 73,129,128, 0, 22,128, 7,128, 5, 2, 3, + 0, 64, 2, 0, 1, 28,130, 0, 1, 23, 64, 67, 4, 22, 64, 2,128, 5,130, 3, + 0, 64, 2, 0, 1, 28,130, 0, 1, 69,194, 3, 0,128, 2, 0, 0,192, 2, 0, + 3, 0, 3, 0, 4, 92, 66, 0, 2, 73, 1,196, 0, 22,192, 3,128, 87,128, 65, + 2, 22,192, 0,128, 87, 64, 65, 2, 22, 64, 0,128, 23, 64, 68, 2, 22,128, 1, +128, 5,194, 3, 0, 64, 2, 0, 0,128, 2, 0, 3,192, 2, 0, 1, 28, 66, 0, + 2, 73, 1,196, 0, 22,128, 0,128, 73,129,128, 0, 22, 0, 0,128, 73,129,128, + 0, 30, 0,128, 0, 18, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121, +112,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 87,105, +100,103,101,116, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,108,101, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, 0, 4, 19, 0, 0, 0, + 0, 0, 0, 0,105,110,118, 97,108,105,100, 32,105,117,112, 32,104, 97,110,100, +108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,117,109, 98,101,114, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,117,112,112,101,114, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99, + 97,108,108, 98, 97, 99,107,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 13, + 0, 0, 0, 0, 0, 0, 0, 71,101,116, 67,108, 97,115,115, 78, 97,109,101, 0, + 4, 15, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, 97,108,108, 98, + 97, 99,107, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97, +110,100,108,101, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108, +101, 95,115,101,116,110, 97,109,101, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, 83, +116,111,114,101, 65,116,116,114,105, 98,117,116,101, 0, 0, 4, 4, 0, 0, 0, + 0, 0, 0, 0,110,105,108, 0, 0, 0, 0, 0, 78, 0, 0, 0, 82, 0, 0, 0, + 82, 0, 0, 0, 82, 0, 0, 0, 83, 0, 0, 0, 83, 0, 0, 0, 83, 0, 0, 0, + 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, + 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, + 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, + 86, 0, 0, 0, 86, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, + 87, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 89, 0, 0, 0, 89, 0, 0, 0, + 90, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, + 92, 0, 0, 0, 92, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, + 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, + 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, + 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 98, 0, 0, 0, 98, 0, 0, 0, + 98, 0, 0, 0, 98, 0, 0, 0, 98, 0, 0, 0, 99, 0, 0, 0, 99, 0, 0, 0, +100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0, +100, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0, +101, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,104, 0, 0, 0,105, 0, 0, 0, +107, 0, 0, 0,109, 0, 0, 0, 10, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 77, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0,105,110,100,101,120, 0, 0, 0, 0, 0, 77, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 0, 0, 0, 0, 77, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0,116,105, 0, 3, 0, 0, 0, 77, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0,116,118, 0, 6, 0, 0, 0, 77, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 9, 0, 0, 0, 77, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 73, 78, 68, 69, 88, 0, 27, 0, 0, 0, 75, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 99, 98, 0, 29, 0, 0, 0, 75, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 32, 0, 0, 0, 45, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109,101, 0, 54, 0, 0, 0, 60, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 0, 0, 0,130, + 0, 0, 0, 0, 1, 0, 6, 19, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 92, +128, 0, 1, 90, 64, 0, 0, 22,192, 2,128,133, 64, 0, 0,134,128, 64, 1,193, +192, 0, 0, 5, 1, 1, 0, 64, 1, 0, 0, 28, 1, 0, 1,156,128, 0, 0,197, + 64, 1, 0, 0, 1, 0, 1, 64, 1, 0, 0,220, 64,128, 1,158, 0, 0, 1, 94, + 0, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, + 71,101,116, 78, 97,109,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,116,114, +105,110,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,111,114,109, 97,116, 0, + 4, 17, 0, 0, 0, 0, 0, 0, 0, 95, 73, 85, 80, 76, 85, 65, 95, 78, 65, 77, + 69, 40, 37,115, 41, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,116,111,115,116,114, +105,110,103, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 72, 97,110,100, +108,101, 0, 0, 0, 0, 0, 19, 0, 0, 0,123, 0, 0, 0,123, 0, 0, 0,123, + 0, 0, 0,124, 0, 0, 0,124, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, + 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,126, + 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,127, 0, 0, 0,129, + 0, 0, 0,130, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,118, + 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109, +101, 0, 3, 0, 0, 0, 18, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 97,117, +116,111,110, 97,109,101, 0, 12, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,132, 0, 0, 0,136, 0, 0, 0, 0, 1, 0, 4, 6, + 0, 0, 0, 69, 0, 0, 0,134, 64, 64, 0,228, 0, 0, 0, 0, 0, 0, 0, 73, +192, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,133, 0, 0, 0,135, 0, 0, 0, 1, 1, + 0, 4, 6, 0, 0, 0, 68, 0, 0, 0, 75, 0,192, 0,192, 0, 0, 0, 93, 0, +128, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0, 99,111,110,115,116,114,117, 99,116,111,114, 0, 0, 0, 0, 0, 6, + 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, + 0, 0, 0,135, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 99,116,114,108, 0, 6, 0, 0, 0,133, 0, 0, 0,133, 0, 0, 0, +135, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,136, 0, 0, 0, 1, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 0, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,138, 0, 0, 0,156, 0, 0, + 0, 0, 2, 0, 8, 31, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 1, 65, 0, + 0,156, 64,128, 1,133,128, 0, 0,192, 0, 0, 0,156,128, 0, 1,154, 64, 0, + 0, 22,192, 4,128,197,192, 0, 0, 5, 1, 1, 0, 6, 65, 65, 2, 64, 1,128, + 0, 28,129, 0, 1,198, 0,129, 1,218, 64, 0, 0, 22, 0, 0,128,197,128, 1, + 0, 10,129, 0, 0, 9,193,128,131, 9, 1, 0,132, 69, 1, 0, 0,128, 1, 0, + 2,193, 65, 2, 0, 92, 65,128, 1, 69,129, 2, 0,128, 1, 0, 0,192, 1, 0, + 2, 92, 65,128, 1, 30, 0, 0, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 13, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 87,105,100,103,101,116, 0, + 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0,115,116,114,105,110,103, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,117,112, +112,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 83,101,116, 87,105,100,103,101,116, 0, 0, 0, 0, 0, 31, 0, + 0, 0,140, 0, 0, 0,140, 0, 0, 0,140, 0, 0, 0,140, 0, 0, 0,142, 0, + 0, 0,142, 0, 0, 0,142, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0,145, 0, + 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, + 0, 0,146, 0, 0, 0,146, 0, 0, 0,147, 0, 0, 0,150, 0, 0, 0,150, 0, + 0, 0,150, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, + 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,155, 0, + 0, 0,156, 0, 0, 0, 5, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97, +110,100,108,101, 0, 0, 0, 0, 0, 30, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, + 0,116,121,112,101,110, 97,109,101, 0, 0, 0, 0, 0, 30, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 7, 0, 0, 0, 30, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 15, 0, 0, 0, 29, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 21, 0, + 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,166, 0, + 0, 0,168, 0, 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 69, 0, 0, 0,134, 64, + 64, 0, 92, 64, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, + 0, 0, 0, 83,104,111,119, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110, +100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0,167, 0, 0, 0,167, 0, 0, 0, +167, 0, 0, 0,168, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,170, 0, 0, 0,172, 0, 0, 0, 0, 1, 0, 3, 4, + 0, 0, 0, 69, 0, 0, 0,134, 64, 64, 0, 92, 64, 0, 1, 30, 0,128, 0, 2, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 72,105,100,101, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, + 0,171, 0, 0, 0,171, 0, 0, 0,171, 0, 0, 0,172, 0, 0, 0, 1, 0, 0, + 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,174, 0, 0, 0, +176, 0, 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 69, 0, 0, 0,134, 64, 64, 0, + 92, 64, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 77, 97,112, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, + 0, 0, 0, 0, 0, 4, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, 0, 0, + 0,176, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106, +101, 99,116, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,178, 0, 0, 0,189, 0, 0, 0, 0, 2, 0, 7, 23, 0, 0, 0, +139, 0, 64, 0, 0, 1,128, 0,156,128,128, 1,202,128, 0, 0,201, 0,128,128, +201,128, 0,129, 5,193, 0, 0, 64, 1, 0, 1,129, 1, 1, 0, 28, 65,128, 1, + 5,193, 0, 0, 64, 1,128, 1,129, 65, 1, 0, 28, 65,128, 1, 5,129, 1, 0, + 64, 1, 0, 1,128, 1,128, 1, 28, 65,128, 1, 11,193,193, 1,128, 1,128, 0, + 28, 65,128, 1,158, 0, 0, 1, 30, 0,128, 0, 8, 0, 0, 0, 4, 14, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 83,101,116, 87,105,100,103,101,116, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 0, 0, 0, + 0, 23, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,180, 0, 0, + 0,181, 0, 0, 0,182, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,184, 0, 0, + 0,184, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, + 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,187, 0, 0, + 0,187, 0, 0, 0,187, 0, 0, 0,188, 0, 0, 0,189, 0, 0, 0, 4, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 22, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 22, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 3, 0, + 0, 0, 22, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, + 0, 6, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,191, 0, 0, 0,203, 0, 0, 0, 0, 2, 0, 12, 25, 0, 0, 0,134, 0, 64, + 0,197, 64, 0, 0, 0, 1,128, 0,220, 0, 1, 1, 22, 0, 4,128, 5,130, 0, + 0, 64, 2, 0, 3, 28,130, 0, 1, 23,192, 64, 4, 22,128, 2,128, 5, 2, 1, + 0, 64, 2,128, 3, 28,130, 0, 1, 23, 64, 65, 4, 22, 64, 1,128, 5,130, 1, + 0, 64, 2, 0, 0,128, 2, 0, 3,192, 2,128, 3, 28, 66, 0, 2, 22, 0, 0, +128,137,192, 1, 3,225,128, 0, 0, 22, 0,251,127, 30, 0,128, 0, 7, 0, 0, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,112, 97,105,114,115, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,116,121,112,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,117,109, 98,101, +114, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100, +108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97,119,115,101,116, 0, 0, + 0, 0, 0, 25, 0, 0, 0,192, 0, 0, 0,193, 0, 0, 0,193, 0, 0, 0,193, + 0, 0, 0,193, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, + 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, + 0, 0, 0,194, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, + 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,200, 0, 0, 0,193, 0, 0, 0,201, + 0, 0, 0,203, 0, 0, 0, 8, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, + 98,106,101, 99,116, 0, 0, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 24, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 0,104, 97,110,100,108,101, 0, 1, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 40,102,111,114, 32,103,101,110,101,114, 97,116,111,114, 41, + 0, 4, 0, 0, 0, 24, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111, +114, 32,115,116, 97,116,101, 41, 0, 4, 0, 0, 0, 24, 0, 0, 0, 14, 0, 0, + 0, 0, 0, 0, 0, 40,102,111,114, 32, 99,111,110,116,114,111,108, 41, 0, 4, + 0, 0, 0, 24, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 5, 0, 0, + 0, 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,118, 0, 5, 0, 0, 0, 22, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218, 0, 0, 0,227, + 0, 0, 0, 0, 2, 0, 11, 28, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 1, + 65, 0, 0,156,128,128, 1,197,128, 0, 0,198,192,192, 1, 0, 1,128, 0,220, +128, 0, 1, 1, 1, 1, 0, 64, 1,128, 1,129, 1, 1, 0, 32, 1, 2,128, 5, + 66, 1, 0, 70,194,129, 0, 28,130, 0, 1, 23,128, 65, 4, 22,192, 0,128, 5, +194, 1, 0, 64, 2, 0, 1,134,194,129, 0, 28, 66,128, 1, 31, 65,253,127, 5, + 1, 2, 0, 6, 65, 66, 2, 64, 1, 0, 0,128, 1,128, 0, 28, 65,128, 1, 30, + 0,128, 0, 10, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97,119,103, +101,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,108,101, 0, 4, 5, 0, 0, 0, 0, + 0, 0, 0,103,101,116,110, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 65,112,112,101,110,100, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115, +101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 0, 0, 0, 0, 28, 0, 0, + 0,219, 0, 0, 0,219, 0, 0, 0,219, 0, 0, 0,219, 0, 0, 0,220, 0, 0, + 0,220, 0, 0, 0,220, 0, 0, 0,220, 0, 0, 0,221, 0, 0, 0,221, 0, 0, + 0,221, 0, 0, 0,221, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, 0, 0, + 0,222, 0, 0, 0,222, 0, 0, 0,223, 0, 0, 0,223, 0, 0, 0,223, 0, 0, + 0,223, 0, 0, 0,221, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, 0, 0, + 0,226, 0, 0, 0,226, 0, 0, 0,227, 0, 0, 0, 8, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 27, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 27, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 0, 0, 0, 27, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 8, 0, 0, 0, 27, 0, 0, + 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,105,110,100,101,120, 41, + 0, 11, 0, 0, 0, 22, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111, +114, 32,108,105,109,105,116, 41, 0, 11, 0, 0, 0, 22, 0, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, 11, 0, 0, 0, + 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 12, 0, 0, 0, 21, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,238, 0, 0, 0,252, 0, + 0, 0, 0, 2, 0, 10, 52, 0, 0, 0,128, 0, 0, 0,219, 64,128, 0, 22, 0, + 0,128,193, 0, 0, 0, 21,192, 0, 1,133, 64, 0, 0,154, 0, 0, 0, 22,128, + 0,128,133, 64, 0, 0,137, 0, 0,129, 22,192, 9,128,133,192, 0, 0,202,192, + 0, 0,201, 64, 65,130,201,192, 65,131,201, 64, 66,132,156,128, 0, 1,197,128, + 2, 0, 10, 1, 1, 0, 9, 1,195,133, 9, 1,195,134, 9, 1, 0,129, 9,129, + 67,131,220,128, 0, 1, 5,193, 3, 0, 74,193, 0, 1,128, 1,128, 1,192, 1, + 0, 1, 73, 65, 68,136, 73,193, 68,137, 73, 65, 69,138, 98, 65, 0, 1, 28,129, + 0, 1, 69,129, 5, 0,138, 1,129, 0,192, 1, 0, 2,137,193, 69,130,137,129, + 0,140,137,129,128,140,137,129, 0,141,162, 65,128, 0, 92,129, 0, 1,199, 64, + 0, 0,139,193,198, 2, 5, 2, 7, 0, 69, 2, 7, 0,156, 65, 0, 2,139, 65, +199, 2,156, 65, 0, 1,131, 1, 0, 3,135, 65, 0, 0, 30, 0,128, 0, 30, 0, + 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 20, 0, 0, 0, 0, 0, 0, + 0,101,114,114,111,114, 95,109,101,115,115, 97,103,101, 95,112,111,112,117,112, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 98,117,116,116,111,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, + 0,116,105,116,108,101, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 79,107, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,115,105,122,101, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0, 54, 48, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, + 0, 4, 44, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, 95,109,101,115,115, + 97,103,101, 95,112,111,112,117,112, 32, 61, 32,110,105,108, 59, 32,114,101,116, +117,114,110, 32,105,117,112, 46, 67, 76, 79, 83, 69, 0, 4, 10, 0, 0, 0, 0, + 0, 0, 0,109,117,108,116,105,108,105,110,101, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0,101,120,112, 97,110,100, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 89, 69, + 83, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,114,101, 97,100,111,110,108,121, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0, 51, 48, 48,120, 49, 53, 48, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0,118, 98,111,120, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, + 97,108,105,103,110,109,101,110,116, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 65, + 67, 69, 78, 84, 69, 82, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97,114,103, +105,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 49, 48,120, 49, 48, 0, 4, 4, + 0, 0, 0, 0, 0, 0, 0,103, 97,112, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, + 49, 48, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108,111,103, 0, 4, + 14, 0, 0, 0, 0, 0, 0, 0, 69,114,114,111,114, 32, 77,101,115,115, 97,103, +101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,100,101,102, 97,117,108,116,101,115, + 99, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,100,101,102, 97,117,108,116,101,110, +116,101,114, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,115,116, 97,114,116,102,111, + 99,117,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0, 67, 69, 78, 84, 69, 82, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,100,101,115,116,114,111,121, 0, 0, 0, 0, 0, 52, 0, 0, 0, +239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0, +240, 0, 0, 0,240, 0, 0, 0,240, 0, 0, 0,241, 0, 0, 0,241, 0, 0, 0, +241, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0, +243, 0, 0, 0,243, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0, +244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,245, 0, 0, 0, +245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0, +245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0, +246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0, +246, 0, 0, 0,246, 0, 0, 0,247, 0, 0, 0,248, 0, 0, 0,248, 0, 0, 0, +248, 0, 0, 0,248, 0, 0, 0,249, 0, 0, 0,249, 0, 0, 0,250, 0, 0, 0, +250, 0, 0, 0,252, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, +101,114,114, 0, 0, 0, 0, 0, 51, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, +116,114, 97, 99,101, 98, 97, 99,107, 0, 0, 0, 0, 0, 51, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 98,116, 0, 17, 0, 0, 0, 51, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0,109,108, 0, 24, 0, 0, 0, 51, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0,118, 98, 0, 33, 0, 0, 0, 51, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0,100,103, 0, 42, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,254, 0, 0, 0,254, 0, 0, 0, 0, 0, 7, 2, 2, 0, + 0, 0, 30, 0, 0, 1, 30, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, + 0, 0,254, 0, 0, 0,254, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 13, 1, 0, 0, 0, 2, 0, 6, 29, 0, + 0, 0, 26, 64, 0, 0, 22,192, 0,128,133, 0, 0, 0,192, 0,128, 0,156, 64, + 0, 1, 30, 0,128, 0,133, 64, 0, 0,197,128, 0, 0, 0, 1, 0, 0,220, 0, + 0, 1,156,128, 0, 0,198,192, 64, 1,218, 64, 0, 0, 22, 0, 1,128,197, 0, + 0, 0, 6, 1, 65, 1,220, 64, 0, 1, 30, 0,128, 0, 22, 0, 2,128,197, 64, + 1, 0,198,128,193, 1, 0, 1, 0, 1, 65,193, 0, 0,220, 64,128, 1,197,192, + 1, 0, 0, 1, 0, 1,221, 0, 0, 1,222, 0, 0, 0, 30, 0,128, 0, 8, 0, + 0, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 95, 69, 82, 82, 79, 82, 77, 69, 83, + 83, 65, 71, 69, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,112, 97, 99,107, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,112, 99, 97,108,108, 0, 3, 0, 0, 0, 0, 0, + 0,240, 63, 3, 0, 0, 0, 0, 0, 0, 0, 64, 4, 6, 0, 0, 0, 0, 0, 0, + 0,116, 97, 98,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114,101,109,111, +118,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 0, + 0, 0, 0, 29, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0, 2, + 1, 0, 0, 2, 1, 0, 0, 3, 1, 0, 0, 5, 1, 0, 0, 5, 1, 0, 0, 5, + 1, 0, 0, 5, 1, 0, 0, 5, 1, 0, 0, 6, 1, 0, 0, 6, 1, 0, 0, 6, + 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 8, 1, 0, 0, 8, + 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 10, + 1, 0, 0, 11, 1, 0, 0, 11, 1, 0, 0, 11, 1, 0, 0, 11, 1, 0, 0, 13, + 1, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,102, 0, 0, 0, 0, + 0, 28, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,101,114,114, 0, 0, 0, 0, + 0, 28, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 11, 0, 0, + 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 1, 0, + 0, 15, 1, 0, 0, 0, 1, 0, 4, 7, 0, 0, 0, 69, 0, 0, 0,133, 64, 0, + 0,192, 0, 0, 0,156, 0, 0, 1, 93, 0, 0, 0, 94, 0, 0, 0, 30, 0,128, + 0, 2, 0, 0, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,112,114,111,116,101, 99, +116,101,100, 99, 97,108,108, 95, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,108,111, + 97,100,115,116,114,105,110,103, 0, 0, 0, 0, 0, 7, 0, 0, 0, 15, 1, 0, + 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, + 0, 15, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, + 1, 0, 0, 16, 1, 0, 0, 0, 1, 0, 4, 7, 0, 0, 0, 69, 0, 0, 0,133, + 64, 0, 0,192, 0, 0, 0,156, 0, 0, 1, 93, 0, 0, 0, 94, 0, 0, 0, 30, + 0,128, 0, 2, 0, 0, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,112,114,111,116, +101, 99,116,101,100, 99, 97,108,108, 95, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +108,111, 97,100,102,105,108,101, 0, 0, 0, 0, 0, 7, 0, 0, 0, 16, 1, 0, + 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, + 0, 16, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,102, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, + 1, 0, 0, 20, 1, 0, 0, 0, 3, 0, 8, 9, 0, 0, 0,197, 0, 0, 0,198, + 64,192, 1, 1,129, 0, 0, 78, 1,128,129,142, 65,128,129,206,129,128,129,221, + 0,128, 2,222, 0, 0, 0, 30, 0,128, 0, 4, 0, 0, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, +102,111,114,109, 97,116, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 37,100, 32, 37, +100, 32, 37,100, 0, 3, 0, 0, 0, 0, 0,224,111, 64, 0, 0, 0, 0, 9, 0, + 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, + 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 20, 1, 0, 0, 3, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,114, 0, 0, 0, 0, 0, 8, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0,103, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, 98, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, +114, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, 0, 9, 0, 0, 0, + 37, 0, 0, 0, 29, 0, 0, 0, 53, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, + 55, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, + 56, 0, 0, 0, 79, 0, 0, 0,109, 0, 0, 0,111, 0, 0, 0,111, 0, 0, 0, +111, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0, +112, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0, +113, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0, +114, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0, +115, 0, 0, 0,130, 0, 0, 0,122, 0, 0, 0,136, 0, 0, 0,132, 0, 0, 0, +156, 0, 0, 0,138, 0, 0, 0,162, 0, 0, 0,163, 0, 0, 0,163, 0, 0, 0, +164, 0, 0, 0,166, 0, 0, 0,168, 0, 0, 0,166, 0, 0, 0,170, 0, 0, 0, +172, 0, 0, 0,170, 0, 0, 0,174, 0, 0, 0,176, 0, 0, 0,174, 0, 0, 0, +178, 0, 0, 0,189, 0, 0, 0,178, 0, 0, 0,191, 0, 0, 0,203, 0, 0, 0, +191, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0, +214, 0, 0, 0,215, 0, 0, 0,215, 0, 0, 0,216, 0, 0, 0,218, 0, 0, 0, +227, 0, 0, 0,218, 0, 0, 0,229, 0, 0, 0,229, 0, 0, 0,229, 0, 0, 0, +229, 0, 0, 0,236, 0, 0, 0,236, 0, 0, 0,252, 0, 0, 0,238, 0, 0, 0, +254, 0, 0, 0,254, 0, 0, 0, 13, 1, 0, 0, 0, 1, 0, 0, 15, 1, 0, 0, + 15, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 20, 1, 0, 0, 18, 1, 0, 0, + 24, 1, 0, 0, 24, 1, 0, 0, 24, 1, 0, 0, 24, 1, 0, 0, 25, 1, 0, 0, + 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 25, 1, 0, 0, 26, 1, 0, 0, + 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 26, 1, 0, 0, 27, 1, 0, 0, + 27, 1, 0, 0, 27, 1, 0, 0, 28, 1, 0, 0, 28, 1, 0, 0, 29, 1, 0, 0, + 3, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0,119,105,100,103,101,116, 95,103, +101,116,116, 97, 98,108,101, 0, 7, 0, 0, 0,113, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,103,101,116,116, 97, 98,108,101, + 0, 16, 0, 0, 0,113, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,105,104, 97, +110,100,108,101, 95,115,101,116,116, 97, 98,108,101, 0, 17, 0, 0, 0,113, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/iuplua_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/iuplua_le64w.loh b/iup/srclua5/loh/iuplua_le64w.loh new file mode 100755 index 0000000..2a2302b --- /dev/null +++ b/iup/srclua5/loh/iuplua_le64w.loh @@ -0,0 +1,531 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/iuplua_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/iuplua_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,105,117,112,108,117, 97, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 7, 95, 0, 0, 0, 10, 0, 0, 0, 7, 0, 0, 0, 36, 0, 0, 0, + 7, 64, 0, 0, 36, 64, 0, 0, 7,128, 0, 0, 36,128, 0, 0, 69,192, 0, 0, +129, 0, 1, 0, 92, 64, 0, 1, 69, 64, 1, 0,129, 0, 1, 0,193,128, 1, 0, + 0, 1, 0, 0, 92, 64, 0, 2,100,192, 0, 0,164, 0, 1, 0,197,192, 0, 0, + 1,193, 1, 0,220, 64, 0, 1,197, 64, 1, 0, 1,193, 1, 0, 65,129, 1, 0, +128, 1,128, 0,220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65, 1, 2, 0, +128, 1, 0, 1,220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65, 65, 2, 0, +133,129, 2, 0,220, 64, 0, 2,197, 64, 1, 0, 1,193, 1, 0, 65,193, 2, 0, +133, 1, 3, 0,220, 64, 0, 2,228, 64, 1, 0,199, 64, 3, 0,228,128, 1, 0, +199,128, 3, 0,228,192, 1, 0,199,192, 3, 0,202, 64, 0, 0, 10, 1, 0, 0, +201, 0,129,136,199, 0, 4, 0,197, 0, 4, 0, 36, 1, 2, 0,201, 0, 1,137, +197, 0, 4, 0, 36, 65, 2, 0,201, 0,129,137,197, 0, 4, 0, 36,129, 2, 0, +201, 0, 1,138,197, 0, 4, 0, 36,193, 2, 0,201, 0,129,138,197, 0, 4, 0, + 36, 1, 3, 0,201, 0, 1,139,197,192, 5, 0, 5, 1, 4, 0, 65, 1, 1, 0, +220, 64,128, 1,202, 64, 0, 0, 5, 1, 4, 0,201, 0,129,140,199, 0, 6, 0, +197, 0, 6, 0, 36, 65, 3, 0,201, 0, 1,139,197,192, 5, 0, 5, 1, 6, 0, + 65, 1, 1, 0,220, 64,128, 1,195, 0,128, 1,199,128, 6, 0,228,128, 3, 0, +199,192, 6, 0,228,192, 3, 0,199, 0, 7, 0,228, 0, 4, 0,199, 64, 7, 0, +228, 64, 4, 0,199,128, 7, 0,228,128, 4, 0,199,192, 7, 0,228,192, 4, 0, +199, 0, 8, 0, 30, 0,128, 0, 33, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 67, 97,108,108, 77,101,116,104,111,100, 0, 4, 17, 0, 0, 0, 0, + 0, 0, 0, 82,101,103,105,115,116,101,114, 67, 97,108,108, 98, 97, 99,107, 0, + 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 78,101,119, 67,108, 97,115,115, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, + 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 77,101,116,104, +111,100, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 95, 95,105,110,100,101,120, 0, + 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, + 4, 11, 0, 0, 0, 0, 0, 0, 0, 95, 95,110,101,119,105,110,100,101,120, 0, + 4, 11, 0, 0, 0, 0, 0, 0, 0, 95, 95,116,111,115,116,114,105,110,103, 0, + 4, 17, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,116,111,115, +116,114,105,110,103, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 95, 95,101,113, 0, + 4, 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95, 99,111,109, +112, 97,114,101, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108, +101, 95,115,101,116,110, 97,109,101, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 15, 0, + 0, 0, 0, 0, 0, 0, 82,101,103,105,115,116,101,114, 72, 97,110,100,108,101, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,115,104,111,119, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,104,105, +100,101, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,109, 97,112, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0, 99,111,110,115,116,114,117, 99,116,111,114, 0, 4, 14, 0, + 0, 0, 0, 0, 0, 0,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, + 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, 79, 88, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0,101, +114,114,111,114, 95,109,101,115,115, 97,103,101, 95,112,111,112,117,112, 0, 4, + 14, 0, 0, 0, 0, 0, 0, 0, 95, 69, 82, 82, 79, 82, 77, 69, 83, 83, 65, 71, + 69, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,112, 97, 99,107, 0, 4, 15, 0, 0, + 0, 0, 0, 0, 0,112,114,111,116,101, 99,116,101,100, 99, 97,108,108, 95, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0,100,111,115,116,114,105,110,103, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,100,111,102,105,108,101, 0, 4, 4, 0, 0, 0, 0, + 0, 0, 0, 82, 71, 66, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, + 0, 0, 0, 27, 0, 0, 0, 0, 1, 7, 7, 35, 0, 0, 0,134, 0,192, 0,198, + 0, 0, 1,218, 64, 0, 0, 22, 0, 0,128, 30, 0,128, 0, 5, 65, 0, 0, 64, + 1,128, 1, 28,129, 0, 1, 23,128, 64, 2, 22,128, 1,128, 0, 1,128, 1, 69, +193, 0, 0,128, 1,128, 0, 92, 1, 0, 1, 29, 1, 0, 0, 30, 1, 0, 0, 22, + 0, 4,128, 5, 65, 0, 0, 64, 1,128, 1, 28,129, 0, 1, 23, 0, 65, 2, 22, + 0, 2,128, 5, 65, 1, 0,135, 64, 1, 0, 69,129, 1, 0, 70,193,193, 2,128, + 1,128, 1, 92,129, 0, 1, 7, 65, 1, 0, 94, 1, 0, 1, 22,128, 0,128, 5, +129, 1, 0, 6, 1, 66, 2, 30, 1, 0, 1, 30, 0,128, 0, 9, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0,240, 63, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112, +101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,116,105,111,110, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,115,101,108,102, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0,100,111,115,116,114,105,110,103, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0, 69, 82, 82, 79, 82, 0, 0, 0, 0, 0, 35, 0, 0, 0, + 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, + 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, + 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, + 23, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 27, 0, 0, 0, + 6, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109,101, 0, 0, 0, 0, + 0, 34, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 34, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, + 1, 0, 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, + 0, 2, 0, 0, 0, 34, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,116,101,109, +112, 0, 23, 0, 0, 0, 30, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,114,101, +115,117,108,116, 0, 28, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 0, 0, 0, 37, 0, 0, 0, 0, 3, 0, 5, 15, 0, 0, + 0,197, 0, 0, 0,198, 0,128, 1,218, 64, 0, 0, 22,128, 0,128,197, 0, 0, + 0, 10, 1, 0, 0,201, 0, 1, 0,197, 0, 0, 0,198, 0,128, 1,154, 0, 0, + 0, 22, 64, 0,128,201, 64, 0, 1, 22, 0, 0,128,201, 64,128,128, 30, 0,128, + 0, 2, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 15, 0, 0, + 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, + 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, 0, 0, + 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 35, 0, 0, 0, 37, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109,101, 0, 0, 0, + 0, 0, 14, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 0, + 0, 0, 0, 14, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, + 0, 0, 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 99, 98, 0, 9, + 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 0, 0, 0, 53, 0, 0, 0, 0, 2, 0, 7, 21, 0, 0, 0,128, 0, 0, 0,195, + 0,128, 1, 5, 1, 0, 0, 64, 1, 0, 1,128, 1,128, 0, 28,129,128, 1,192, + 0, 0, 2,218, 0, 0, 0, 22, 0, 0,128,222, 0, 0, 1, 5, 1, 0, 0, 64, + 1, 0, 1,129, 65, 0, 0, 28,129,128, 1,128, 0, 0, 2,154, 64, 0, 0, 22, + 0,252,127, 3, 1, 0, 2, 30, 1, 0, 1, 22, 64,251,127, 30, 0,128, 0, 2, + 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97,119,103,101,116, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 0, 0, 0, 0, 21, + 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, + 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, + 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, + 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, + 0, 0, 0, 53, 0, 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, + 98,106,101, 99,116, 0, 0, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0,105,110,100,101,120, 0, 0, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,112, 0, 1, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0,118, 0, 2, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 59, 0, 0, 0, 79, 0, 0, 0, 0, 2, 0, 7, 67, 0, 0, 0, +133, 0, 0, 0,134, 64, 64, 1,192, 0,128, 0,156,128, 0, 1,197,128, 0, 0, +198,128,128, 1,218, 0, 0, 0, 22,192, 3,128,197,192, 0, 0, 0, 1, 0, 0, +220,128, 0, 1,218, 0, 0, 0, 22, 0, 1,128, 5, 1, 1, 0, 64, 1,128, 1, + 28,129, 0, 1, 87, 64, 65, 2, 22,128, 0,128, 5,129, 1, 0, 65,193, 1, 0, + 28, 65, 0, 1, 6, 65,128, 1, 30, 1, 0, 1, 22, 64, 10,128,197, 0, 2, 0, + 0, 1, 0, 0, 64, 1, 0, 1,220,128,128, 1,218, 64, 0, 0, 22,192, 3,128, + 5,193, 0, 0, 64, 1, 0, 0, 28,129, 0, 1, 26, 1, 0, 0, 22, 0, 1,128, + 69, 1, 1, 0,128, 1, 0, 2, 92,129, 0, 1, 87, 64,193, 2, 22,128, 0,128, + 69,129, 1, 0,129,193, 1, 0, 92, 65, 0, 1, 70, 65, 0, 2, 94, 1, 0, 1, + 22,192, 4,128, 5, 1, 1, 0, 64, 1,128, 1, 28,129, 0, 1, 87, 64, 66, 2, + 22, 0, 1,128, 5, 1, 1, 0, 64, 1,128, 1, 28,129, 0, 1, 23, 0, 64, 2, + 22, 0, 2,128, 5,129, 2, 0, 64, 1,128, 1, 28,129, 0, 1, 26, 1, 0, 0, + 22, 64, 0,128, 30, 1, 0, 1, 22,128, 0,128,222, 0, 0, 1, 22, 0, 0,128, +222, 0, 0, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,115,116,114,105,110,103, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,117,112,112, +101,114, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, +115, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 87,105,100, +103,101,116, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,116, 97, 98,108,101, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0,101,114,114,111,114, 0, 4, 19, 0, 0, 0, 0, 0, 0, 0,105,110,118, + 97,108,105,100, 32,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 13, 0, 0, + 0, 0, 0, 0, 0, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,110,117,109, 98,101,114, 0, 4, 10, 0, 0, 0, 0, + 0, 0, 0, 71,101,116, 72, 97,110,100,108,101, 0, 0, 0, 0, 0, 67, 0, 0, + 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 60, 0, 0, 0, 61, 0, 0, + 0, 61, 0, 0, 0, 61, 0, 0, 0, 61, 0, 0, 0, 62, 0, 0, 0, 62, 0, 0, + 0, 62, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, + 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, + 0, 63, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 66, 0, 0, + 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, + 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, + 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, + 0, 69, 0, 0, 0, 69, 0, 0, 0, 69, 0, 0, 0, 70, 0, 0, 0, 70, 0, 0, + 0, 70, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, + 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, 0, 71, 0, 0, + 0, 71, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 73, 0, 0, + 0, 73, 0, 0, 0, 73, 0, 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 74, 0, 0, + 0, 76, 0, 0, 0, 79, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 66, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0,105,110,100,101,120, 0, 0, 0, 0, 0, 66, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0, 73, 78, 68, 69, 88, 0, 4, 0, 0, 0, 66, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 11, 0, 0, 0, 23, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 28, 0, 0, + 0, 66, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, + 33, 0, 0, 0, 45, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,105,104, 0, 59, + 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, + 0, 0, 0,109, 0, 0, 0, 0, 3, 0, 14, 78, 0, 0, 0,197, 0, 0, 0, 0, + 1,128, 0,220,128, 0, 1, 5, 1, 0, 0, 64, 1, 0, 1, 28,129, 0, 1, 69, + 65, 0, 0,128, 1, 0, 0, 92,129, 0, 1, 90, 1, 0, 0, 22, 0, 1,128,133, + 1, 0, 0,192, 1,128, 2,156,129, 0, 1, 87,128, 64, 3, 22,128, 0,128,133, +193, 0, 0,193, 1, 1, 0,156, 65, 0, 1, 87, 64,193, 1, 22, 64, 0,128, 23, +128,193, 1, 22, 0, 13,128,133,129, 1, 0,134,193, 65, 3,192, 1,128, 0,156, +129, 0, 1,197, 1, 2, 0,198,129,129, 3,218, 1, 0, 0, 22,128, 3,128, 6, + 66,194, 3, 26, 66, 0, 0, 22,192, 0,128, 69,130, 2, 0,128, 2, 0, 0, 92, +130, 0, 1, 6, 66,130, 3, 69,194, 2, 0,128, 2, 0, 0,192, 2, 0, 3, 0, + 3, 0, 4, 64, 3, 0, 1, 92, 66,128, 2, 73,129,128, 0, 22,128, 7,128, 5, + 2, 3, 0, 64, 2, 0, 1, 28,130, 0, 1, 23, 64, 67, 4, 22, 64, 2,128, 5, +130, 3, 0, 64, 2, 0, 1, 28,130, 0, 1, 69,194, 3, 0,128, 2, 0, 0,192, + 2, 0, 3, 0, 3, 0, 4, 92, 66, 0, 2, 73, 1,196, 0, 22,192, 3,128, 87, +128, 65, 2, 22,192, 0,128, 87, 64, 65, 2, 22, 64, 0,128, 23, 64, 68, 2, 22, +128, 1,128, 5,194, 3, 0, 64, 2, 0, 0,128, 2, 0, 3,192, 2, 0, 1, 28, + 66, 0, 2, 73, 1,196, 0, 22,128, 0,128, 73,129,128, 0, 22, 0, 0,128, 73, +129,128, 0, 30, 0,128, 0, 18, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +116,121,112,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, + 87,105,100,103,101,116, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,108, +101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, 0, 4, 19, 0, + 0, 0, 0, 0, 0, 0,105,110,118, 97,108,105,100, 32,105,117,112, 32,104, 97, +110,100,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,117,109, 98,101,114, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,117,112,112,101,114, 0, 4, 10, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 4, 13, 0, 0, 0, 0, 0, 0, 0, 71,101,116, 67,108, 97,115,115, 78, 97,109, +101, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, 97,108, +108, 98, 97, 99,107, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101, +116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32, +104, 97,110,100,108,101, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110, +100,108,101, 95,115,101,116,110, 97,109,101, 0, 4, 15, 0, 0, 0, 0, 0, 0, + 0, 83,116,111,114,101, 65,116,116,114,105, 98,117,116,101, 0, 0, 4, 4, 0, + 0, 0, 0, 0, 0, 0,110,105,108, 0, 0, 0, 0, 0, 78, 0, 0, 0, 82, 0, + 0, 0, 82, 0, 0, 0, 82, 0, 0, 0, 83, 0, 0, 0, 83, 0, 0, 0, 83, 0, + 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 85, 0, 0, 0, 85, 0, + 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, + 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 85, 0, 0, 0, 86, 0, 0, 0, 86, 0, + 0, 0, 86, 0, 0, 0, 86, 0, 0, 0, 87, 0, 0, 0, 87, 0, 0, 0, 87, 0, + 0, 0, 87, 0, 0, 0, 88, 0, 0, 0, 88, 0, 0, 0, 89, 0, 0, 0, 89, 0, + 0, 0, 90, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 0, 92, 0, 0, 0, 92, 0, + 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, + 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 94, 0, 0, 0, 95, 0, 0, 0, 95, 0, + 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, 0, 0, 96, 0, + 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 97, 0, 0, 0, 98, 0, 0, 0, 98, 0, + 0, 0, 98, 0, 0, 0, 98, 0, 0, 0, 98, 0, 0, 0, 99, 0, 0, 0, 99, 0, + 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0,100, 0, + 0, 0,100, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, 0, 0,101, 0, + 0, 0,101, 0, 0, 0,102, 0, 0, 0,102, 0, 0, 0,104, 0, 0, 0,105, 0, + 0, 0,107, 0, 0, 0,109, 0, 0, 0, 10, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 77, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0,105,110,100,101,120, 0, 0, 0, 0, 0, 77, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 0, 0, 0, 0, 77, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0,116,105, 0, 3, 0, 0, 0, 77, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0,116,118, 0, 6, 0, 0, 0, 77, 0, 0, 0, 7, + 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 9, 0, 0, 0, 77, 0, + 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 73, 78, 68, 69, 88, 0, 27, 0, 0, 0, + 75, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 99, 98, 0, 29, 0, 0, 0, 75, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99, 0, 32, 0, 0, 0, + 45, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, 97,109,101, 0, 54, 0, 0, + 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 0, 0, + 0,130, 0, 0, 0, 0, 1, 0, 6, 19, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, + 0, 92,128, 0, 1, 90, 64, 0, 0, 22,192, 2,128,133, 64, 0, 0,134,128, 64, + 1,193,192, 0, 0, 5, 1, 1, 0, 64, 1, 0, 0, 28, 1, 0, 1,156,128, 0, + 0,197, 64, 1, 0, 0, 1, 0, 1, 64, 1, 0, 0,220, 64,128, 1,158, 0, 0, + 1, 94, 0, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, + 0, 0, 71,101,116, 78, 97,109,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115, +116,114,105,110,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,102,111,114,109, 97, +116, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 95, 73, 85, 80, 76, 85, 65, 95, 78, + 65, 77, 69, 40, 37,115, 41, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,116,111,115, +116,114,105,110,103, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 72, 97, +110,100,108,101, 0, 0, 0, 0, 0, 19, 0, 0, 0,123, 0, 0, 0,123, 0, 0, + 0,123, 0, 0, 0,124, 0, 0, 0,124, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, 0,125, 0, 0, + 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,126, 0, 0, 0,127, 0, 0, + 0,129, 0, 0, 0,130, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, + 0,118, 0, 0, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110, + 97,109,101, 0, 3, 0, 0, 0, 18, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, + 97,117,116,111,110, 97,109,101, 0, 12, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,132, 0, 0, 0,136, 0, 0, 0, 0, 1, 0, + 4, 6, 0, 0, 0, 69, 0, 0, 0,134, 64, 64, 0,228, 0, 0, 0, 0, 0, 0, + 0, 73,192, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,133, 0, 0, 0,135, 0, 0, 0, + 1, 1, 0, 4, 6, 0, 0, 0, 68, 0, 0, 0, 75, 0,192, 0,192, 0, 0, 0, + 93, 0,128, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0, 99,111,110,115,116,114,117, 99,116,111,114, 0, 0, 0, 0, + 0, 6, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0,134, 0, 0, + 0,134, 0, 0, 0,135, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0, 99,116,114,108, 0, 6, 0, 0, 0,133, 0, 0, 0,133, 0, + 0, 0,135, 0, 0, 0,135, 0, 0, 0,135, 0, 0, 0,136, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,138, 0, 0, 0,156, + 0, 0, 0, 0, 2, 0, 8, 31, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 1, + 65, 0, 0,156, 64,128, 1,133,128, 0, 0,192, 0, 0, 0,156,128, 0, 1,154, + 64, 0, 0, 22,192, 4,128,197,192, 0, 0, 5, 1, 1, 0, 6, 65, 65, 2, 64, + 1,128, 0, 28,129, 0, 1,198, 0,129, 1,218, 64, 0, 0, 22, 0, 0,128,197, +128, 1, 0, 10,129, 0, 0, 9,193,128,131, 9, 1, 0,132, 69, 1, 0, 0,128, + 1, 0, 2,193, 65, 2, 0, 92, 65,128, 1, 69,129, 2, 0,128, 1, 0, 0,192, + 1, 0, 2, 92, 65,128, 1, 30, 0, 0, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, + 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 87,105,100,103,101, +116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,117,112, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +117,112,112,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, + 84, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 87,105,100,103,101,116, 0, 0, 0, 0, 0, + 31, 0, 0, 0,140, 0, 0, 0,140, 0, 0, 0,140, 0, 0, 0,140, 0, 0, 0, +142, 0, 0, 0,142, 0, 0, 0,142, 0, 0, 0,143, 0, 0, 0,143, 0, 0, 0, +145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0,145, 0, 0, 0, +145, 0, 0, 0,146, 0, 0, 0,146, 0, 0, 0,147, 0, 0, 0,150, 0, 0, 0, +150, 0, 0, 0,150, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0,151, 0, 0, 0, +151, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0,152, 0, 0, 0, +155, 0, 0, 0,156, 0, 0, 0, 5, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 30, 0, 0, 0, 9, 0, 0, 0, 0, + 0, 0, 0,116,121,112,101,110, 97,109,101, 0, 0, 0, 0, 0, 30, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 7, 0, 0, 0, 30, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 15, 0, 0, + 0, 29, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, + 21, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +166, 0, 0, 0,168, 0, 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 69, 0, 0, 0, +134, 64, 64, 0, 92, 64, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0, 83,104,111,119, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, + 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0,167, 0, 0, 0,167, 0, + 0, 0,167, 0, 0, 0,168, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,170, 0, 0, 0,172, 0, 0, 0, 0, 1, 0, + 3, 4, 0, 0, 0, 69, 0, 0, 0,134, 64, 64, 0, 92, 64, 0, 1, 30, 0,128, + 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 72,105,100,101, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, + 0, 0, 0,171, 0, 0, 0,171, 0, 0, 0,171, 0, 0, 0,172, 0, 0, 0, 1, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,174, 0, + 0, 0,176, 0, 0, 0, 0, 1, 0, 3, 4, 0, 0, 0, 69, 0, 0, 0,134, 64, + 64, 0, 92, 64, 0, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, 4, 0, 0, 0, 0, + 0, 0, 0, 77, 97,112, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0,175, 0, 0, 0,175, 0, 0, 0,175, + 0, 0, 0,176, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, + 98,106,101, 99,116, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,178, 0, 0, 0,189, 0, 0, 0, 0, 2, 0, 7, 23, 0, + 0, 0,139, 0, 64, 0, 0, 1,128, 0,156,128,128, 1,202,128, 0, 0,201, 0, +128,128,201,128, 0,129, 5,193, 0, 0, 64, 1, 0, 1,129, 1, 1, 0, 28, 65, +128, 1, 5,193, 0, 0, 64, 1,128, 1,129, 65, 1, 0, 28, 65,128, 1, 5,129, + 1, 0, 64, 1, 0, 1,128, 1,128, 1, 28, 65,128, 1, 11,193,193, 1,128, 1, +128, 0, 28, 65,128, 1,158, 0, 0, 1, 30, 0,128, 0, 8, 0, 0, 0, 4, 14, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 4, 13, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 87,105,100,103,101,116, 0, 4, 14, 0, 0, + 0, 0, 0, 0, 0,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 0, + 0, 0, 0, 23, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,179, 0, 0, 0,180, + 0, 0, 0,181, 0, 0, 0,182, 0, 0, 0,184, 0, 0, 0,184, 0, 0, 0,184, + 0, 0, 0,184, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, 0, 0, 0,185, + 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,186, 0, 0, 0,187, + 0, 0, 0,187, 0, 0, 0,187, 0, 0, 0,188, 0, 0, 0,189, 0, 0, 0, 4, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 22, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, + 3, 0, 0, 0, 22, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, + 99,116, 0, 6, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,191, 0, 0, 0,203, 0, 0, 0, 0, 2, 0, 12, 25, 0, 0, 0,134, + 0, 64, 0,197, 64, 0, 0, 0, 1,128, 0,220, 0, 1, 1, 22, 0, 4,128, 5, +130, 0, 0, 64, 2, 0, 3, 28,130, 0, 1, 23,192, 64, 4, 22,128, 2,128, 5, + 2, 1, 0, 64, 2,128, 3, 28,130, 0, 1, 23, 64, 65, 4, 22, 64, 1,128, 5, +130, 1, 0, 64, 2, 0, 0,128, 2, 0, 3,192, 2,128, 3, 28, 66, 0, 2, 22, + 0, 0,128,137,192, 1, 3,225,128, 0, 0, 22, 0,251,127, 30, 0,128, 0, 7, + 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, + 6, 0, 0, 0, 0, 0, 0, 0,112, 97,105,114,115, 0, 4, 5, 0, 0, 0, 0, + 0, 0, 0,116,121,112,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,117,109, + 98,101,114, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97, +110,100,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97,119,115,101,116, + 0, 0, 0, 0, 0, 25, 0, 0, 0,192, 0, 0, 0,193, 0, 0, 0,193, 0, 0, + 0,193, 0, 0, 0,193, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, + 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, 0,194, 0, 0, + 0,194, 0, 0, 0,194, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, + 0,197, 0, 0, 0,197, 0, 0, 0,197, 0, 0, 0,200, 0, 0, 0,193, 0, 0, + 0,201, 0, 0, 0,203, 0, 0, 0, 8, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 24, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 24, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0,104, 97,110,100,108,101, 0, 1, 0, 0, 0, 24, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,103,101,110,101,114, 97,116,111, +114, 41, 0, 4, 0, 0, 0, 24, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40, +102,111,114, 32,115,116, 97,116,101, 41, 0, 4, 0, 0, 0, 24, 0, 0, 0, 14, + 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32, 99,111,110,116,114,111,108, 41, + 0, 4, 0, 0, 0, 24, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 5, + 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,118, 0, 5, 0, 0, + 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218, 0, 0, + 0,227, 0, 0, 0, 0, 2, 0, 11, 28, 0, 0, 0,133, 0, 0, 0,192, 0, 0, + 0, 1, 65, 0, 0,156,128,128, 1,197,128, 0, 0,198,192,192, 1, 0, 1,128, + 0,220,128, 0, 1, 1, 1, 1, 0, 64, 1,128, 1,129, 1, 1, 0, 32, 1, 2, +128, 5, 66, 1, 0, 70,194,129, 0, 28,130, 0, 1, 23,128, 65, 4, 22,192, 0, +128, 5,194, 1, 0, 64, 2, 0, 1,134,194,129, 0, 28, 66,128, 1, 31, 65,253, +127, 5, 1, 2, 0, 6, 65, 66, 2, 64, 1, 0, 0,128, 1,128, 0, 28, 65,128, + 1, 30, 0,128, 0, 10, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97, +119,103,101,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,108,101, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0,103,101,116,110, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, + 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 67,108, 97,115,115, 0, + 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101,110,100, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 14, 0, 0, 0, 0, 0, 0, + 0,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, 0, 0, 0, 0, 28, + 0, 0, 0,219, 0, 0, 0,219, 0, 0, 0,219, 0, 0, 0,219, 0, 0, 0,220, + 0, 0, 0,220, 0, 0, 0,220, 0, 0, 0,220, 0, 0, 0,221, 0, 0, 0,221, + 0, 0, 0,221, 0, 0, 0,221, 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,222, + 0, 0, 0,222, 0, 0, 0,222, 0, 0, 0,223, 0, 0, 0,223, 0, 0, 0,223, + 0, 0, 0,223, 0, 0, 0,221, 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,226, + 0, 0, 0,226, 0, 0, 0,226, 0, 0, 0,227, 0, 0, 0, 8, 0, 0, 0, 7, + 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 27, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 27, 0, + 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, 0, 0, + 0, 27, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 8, 0, 0, 0, 27, + 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,105,110,100,101, +120, 41, 0, 11, 0, 0, 0, 22, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40, +102,111,114, 32,108,105,109,105,116, 41, 0, 11, 0, 0, 0, 22, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, 11, 0, + 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 12, 0, 0, 0, + 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,238, 0, 0, 0, +252, 0, 0, 0, 0, 2, 0, 10, 52, 0, 0, 0,128, 0, 0, 0,219, 64,128, 0, + 22, 0, 0,128,193, 0, 0, 0, 21,192, 0, 1,133, 64, 0, 0,154, 0, 0, 0, + 22,128, 0,128,133, 64, 0, 0,137, 0, 0,129, 22,192, 9,128,133,192, 0, 0, +202,192, 0, 0,201, 64, 65,130,201,192, 65,131,201, 64, 66,132,156,128, 0, 1, +197,128, 2, 0, 10, 1, 1, 0, 9, 1,195,133, 9, 1,195,134, 9, 1, 0,129, + 9,129, 67,131,220,128, 0, 1, 5,193, 3, 0, 74,193, 0, 1,128, 1,128, 1, +192, 1, 0, 1, 73, 65, 68,136, 73,193, 68,137, 73, 65, 69,138, 98, 65, 0, 1, + 28,129, 0, 1, 69,129, 5, 0,138, 1,129, 0,192, 1, 0, 2,137,193, 69,130, +137,129, 0,140,137,129,128,140,137,129, 0,141,162, 65,128, 0, 92,129, 0, 1, +199, 64, 0, 0,139,193,198, 2, 5, 2, 7, 0, 69, 2, 7, 0,156, 65, 0, 2, +139, 65,199, 2,156, 65, 0, 1,131, 1, 0, 3,135, 65, 0, 0, 30, 0,128, 0, + 30, 0, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 20, 0, 0, 0, 0, + 0, 0, 0,101,114,114,111,114, 95,109,101,115,115, 97,103,101, 95,112,111,112, +117,112, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 98,117,116,116,111,110, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,116,105,116,108,101, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 79,107, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,115,105,122,101, 0, 4, 3, 0, 0, 0, + 0, 0, 0, 0, 54, 48, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105, +111,110, 0, 4, 44, 0, 0, 0, 0, 0, 0, 0,101,114,114,111,114, 95,109,101, +115,115, 97,103,101, 95,112,111,112,117,112, 32, 61, 32,110,105,108, 59, 32,114, +101,116,117,114,110, 32,105,117,112, 46, 67, 76, 79, 83, 69, 0, 4, 10, 0, 0, + 0, 0, 0, 0, 0,109,117,108,116,105,108,105,110,101, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,101,120,112, 97,110,100, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, + 89, 69, 83, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,114,101, 97,100,111,110,108, +121, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 51, 48, 48,120, 49, 53, 48, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,118, 98,111,120, 0, 4, 10, 0, 0, 0, 0, 0, + 0, 0, 97,108,105,103,110,109,101,110,116, 0, 4, 8, 0, 0, 0, 0, 0, 0, + 0, 65, 67, 69, 78, 84, 69, 82, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97, +114,103,105,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 49, 48,120, 49, 48, 0, + 4, 4, 0, 0, 0, 0, 0, 0, 0,103, 97,112, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0, 49, 48, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,100,105, 97,108,111,103, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 69,114,114,111,114, 32, 77,101,115,115, + 97,103,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,100,101,102, 97,117,108,116, +101,115, 99, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,100,101,102, 97,117,108,116, +101,110,116,101,114, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,115,116, 97,114,116, +102,111, 99,117,115, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,111,112,117,112, + 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 67, 69, 78, 84, 69, 82, 0, 4, 8, 0, + 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, 0, 0, 0, 0, 52, 0, + 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, 0, 0,239, 0, + 0, 0,240, 0, 0, 0,240, 0, 0, 0,240, 0, 0, 0,241, 0, 0, 0,241, 0, + 0, 0,241, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, 0, 0,243, 0, + 0, 0,243, 0, 0, 0,243, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, + 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,244, 0, 0, 0,245, 0, + 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, + 0, 0,245, 0, 0, 0,245, 0, 0, 0,245, 0, 0, 0,246, 0, 0, 0,246, 0, + 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, 0, 0,246, 0, + 0, 0,246, 0, 0, 0,246, 0, 0, 0,247, 0, 0, 0,248, 0, 0, 0,248, 0, + 0, 0,248, 0, 0, 0,248, 0, 0, 0,249, 0, 0, 0,249, 0, 0, 0,250, 0, + 0, 0,250, 0, 0, 0,252, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0,101,114,114, 0, 0, 0, 0, 0, 51, 0, 0, 0, 10, 0, 0, 0, 0, 0, + 0, 0,116,114, 97, 99,101, 98, 97, 99,107, 0, 0, 0, 0, 0, 51, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 98,116, 0, 17, 0, 0, 0, 51, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0,109,108, 0, 24, 0, 0, 0, 51, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0,118, 98, 0, 33, 0, 0, 0, 51, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0,100,103, 0, 42, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,254, 0, 0, 0,254, 0, 0, 0, 0, 0, 7, 2, + 2, 0, 0, 0, 30, 0, 0, 1, 30, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0,254, 0, 0, 0,254, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 13, 1, 0, 0, 0, 2, 0, 6, + 29, 0, 0, 0, 26, 64, 0, 0, 22,192, 0,128,133, 0, 0, 0,192, 0,128, 0, +156, 64, 0, 1, 30, 0,128, 0,133, 64, 0, 0,197,128, 0, 0, 0, 1, 0, 0, +220, 0, 0, 1,156,128, 0, 0,198,192, 64, 1,218, 64, 0, 0, 22, 0, 1,128, +197, 0, 0, 0, 6, 1, 65, 1,220, 64, 0, 1, 30, 0,128, 0, 22, 0, 2,128, +197, 64, 1, 0,198,128,193, 1, 0, 1, 0, 1, 65,193, 0, 0,220, 64,128, 1, +197,192, 1, 0, 0, 1, 0, 1,221, 0, 0, 1,222, 0, 0, 0, 30, 0,128, 0, + 8, 0, 0, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 95, 69, 82, 82, 79, 82, 77, + 69, 83, 83, 65, 71, 69, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,112, 97, 99,107, + 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112, 99, 97,108,108, 0, 3, 0, 0, 0, + 0, 0, 0,240, 63, 3, 0, 0, 0, 0, 0, 0, 0, 64, 4, 6, 0, 0, 0, 0, + 0, 0, 0,116, 97, 98,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114,101, +109,111,118,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,117,110,112, 97, 99,107, + 0, 0, 0, 0, 0, 29, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, + 0, 2, 1, 0, 0, 2, 1, 0, 0, 3, 1, 0, 0, 5, 1, 0, 0, 5, 1, 0, + 0, 5, 1, 0, 0, 5, 1, 0, 0, 5, 1, 0, 0, 6, 1, 0, 0, 6, 1, 0, + 0, 6, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 7, 1, 0, 0, 8, 1, 0, + 0, 8, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, 0, 10, 1, 0, + 0, 10, 1, 0, 0, 11, 1, 0, 0, 11, 1, 0, 0, 11, 1, 0, 0, 11, 1, 0, + 0, 13, 1, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,102, 0, 0, + 0, 0, 0, 28, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,101,114,114, 0, 0, + 0, 0, 0, 28, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 11, + 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, + 1, 0, 0, 15, 1, 0, 0, 0, 1, 0, 4, 7, 0, 0, 0, 69, 0, 0, 0,133, + 64, 0, 0,192, 0, 0, 0,156, 0, 0, 1, 93, 0, 0, 0, 94, 0, 0, 0, 30, + 0,128, 0, 2, 0, 0, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,112,114,111,116, +101, 99,116,101,100, 99, 97,108,108, 95, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +108,111, 97,100,115,116,114,105,110,103, 0, 0, 0, 0, 0, 7, 0, 0, 0, 15, + 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, 1, 0, 0, 15, + 1, 0, 0, 15, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,115, + 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 1, 0, 0, 16, 1, 0, 0, 0, 1, 0, 4, 7, 0, 0, 0, 69, 0, 0, + 0,133, 64, 0, 0,192, 0, 0, 0,156, 0, 0, 1, 93, 0, 0, 0, 94, 0, 0, + 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,112,114, +111,116,101, 99,116,101,100, 99, 97,108,108, 95, 0, 4, 9, 0, 0, 0, 0, 0, + 0, 0,108,111, 97,100,102,105,108,101, 0, 0, 0, 0, 0, 7, 0, 0, 0, 16, + 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 16, + 1, 0, 0, 16, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,102, + 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 18, 1, 0, 0, 20, 1, 0, 0, 0, 3, 0, 8, 9, 0, 0, 0,197, 0, 0, + 0,198, 64,192, 1, 1,129, 0, 0, 78, 1,128,129,142, 65,128,129,206,129,128, +129,221, 0,128, 2,222, 0, 0, 0, 30, 0,128, 0, 4, 0, 0, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0,102,111,114,109, 97,116, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 37,100, + 32, 37,100, 32, 37,100, 0, 3, 0, 0, 0, 0, 0,224,111, 64, 0, 0, 0, 0, + 9, 0, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, + 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 19, 1, 0, 0, 20, 1, 0, 0, + 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,114, 0, 0, 0, 0, 0, 8, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,103, 0, 0, 0, 0, 0, 8, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 98, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, + 0, 0, 95, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 27, 0, 0, 0, 9, 0, + 0, 0, 37, 0, 0, 0, 29, 0, 0, 0, 53, 0, 0, 0, 55, 0, 0, 0, 55, 0, + 0, 0, 55, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, 0, 0, 56, 0, + 0, 0, 56, 0, 0, 0, 79, 0, 0, 0,109, 0, 0, 0,111, 0, 0, 0,111, 0, + 0, 0,111, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, 0, 0,112, 0, + 0, 0,112, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0,113, 0, 0, 0,113, 0, + 0, 0,113, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, 0, 0,114, 0, + 0, 0,114, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, 0, 0,115, 0, + 0, 0,115, 0, 0, 0,130, 0, 0, 0,122, 0, 0, 0,136, 0, 0, 0,132, 0, + 0, 0,156, 0, 0, 0,138, 0, 0, 0,162, 0, 0, 0,163, 0, 0, 0,163, 0, + 0, 0,164, 0, 0, 0,166, 0, 0, 0,168, 0, 0, 0,166, 0, 0, 0,170, 0, + 0, 0,172, 0, 0, 0,170, 0, 0, 0,174, 0, 0, 0,176, 0, 0, 0,174, 0, + 0, 0,178, 0, 0, 0,189, 0, 0, 0,178, 0, 0, 0,191, 0, 0, 0,203, 0, + 0, 0,191, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, 0, 0,207, 0, + 0, 0,214, 0, 0, 0,215, 0, 0, 0,215, 0, 0, 0,216, 0, 0, 0,218, 0, + 0, 0,227, 0, 0, 0,218, 0, 0, 0,229, 0, 0, 0,229, 0, 0, 0,229, 0, + 0, 0,229, 0, 0, 0,236, 0, 0, 0,236, 0, 0, 0,252, 0, 0, 0,238, 0, + 0, 0,254, 0, 0, 0,254, 0, 0, 0, 13, 1, 0, 0, 0, 1, 0, 0, 15, 1, + 0, 0, 15, 1, 0, 0, 16, 1, 0, 0, 16, 1, 0, 0, 20, 1, 0, 0, 18, 1, + 0, 0, 20, 1, 0, 0, 3, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0,119,105, +100,103,101,116, 95,103,101,116,116, 97, 98,108,101, 0, 7, 0, 0, 0, 94, 0, + 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,103,101, +116,116, 97, 98,108,101, 0, 16, 0, 0, 0, 94, 0, 0, 0, 17, 0, 0, 0, 0, + 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,116, 97, 98,108,101, 0, + 17, 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/iuplua_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/label.loh b/iup/srclua5/loh/label.loh new file mode 100755 index 0000000..3aa72b7 --- /dev/null +++ b/iup/srclua5/loh/label.loh @@ -0,0 +1,37 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/label.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/label.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 11, 0, 0, 0, 64,108, 97, 98, +101,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 17, + 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, + 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,131, 69, + 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, 0, 0,193, +128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, 0, 0, 0, +110,105, 99,107, 0, 4, 6, 0, 0, 0,108, 97, 98,101,108, 0, 4, 7, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, + 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 83, + 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 11, 0, + 0, 0, 13, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64, +192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, + 0, 0, 0, 76, 97, 98,101,108, 0, 4, 6, 0, 0, 0,116,105,116,108,101, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, + 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/label.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/label_be32.loh b/iup/srclua5/loh/label_be32.loh new file mode 100755 index 0000000..ef70ed4 --- /dev/null +++ b/iup/srclua5/loh/label_be32.loh @@ -0,0 +1,37 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/label_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/label_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 11, 64,108, 97, 98, +101,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, + 0, 0, 17, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, + 65, 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131,128, 64, 9, 0, + 2, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2, 64, 69, 0, 0, 0,128, 0, + 2,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 11, 4, 0, 0, 0, 5, +110,105, 99,107, 0, 4, 0, 0, 0, 6,108, 97, 98,101,108, 0, 4, 0, 0, 0, + 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, + 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 2, 83, + 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 14, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, + 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105, +117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 11, 0, 0, 0, 13, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0,192, + 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, + 0, 0, 6, 76, 97, 98,101,108, 0, 4, 0, 0, 0, 6,116,105,116,108,101, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, + 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, + 0, 16, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 7, 0, + 0, 0, 16, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/label_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/label_be64.loh b/iup/srclua5/loh/label_be64.loh new file mode 100755 index 0000000..4d528c0 --- /dev/null +++ b/iup/srclua5/loh/label_be64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/label_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/label_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,108, 97, 98,101,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, + 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, + 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0,108, 97, 98,101,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, + 0, 0, 0, 0, 0, 0, 0, 83, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97, +108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, + 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 76, + 97, 98,101,108, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/label_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/label_le64.loh b/iup/srclua5/loh/label_le64.loh new file mode 100755 index 0000000..554b5da --- /dev/null +++ b/iup/srclua5/loh/label_le64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/label_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/label_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,108, 97, 98,101,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, + 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, + 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0,108, 97, 98,101,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, + 0, 0, 0, 0, 0, 0, 0, 83, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97, +108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, + 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 76, + 97, 98,101,108, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/label_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/label_le64w.loh b/iup/srclua5/loh/label_le64w.loh new file mode 100755 index 0000000..d622b47 --- /dev/null +++ b/iup/srclua5/loh/label_le64w.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/label_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/label_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,108, 97, 98,101,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, + 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, + 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0,108, 97, 98,101,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, + 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, + 0, 0, 0, 0, 0, 0, 0, 83, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97, +108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, + 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 76, + 97, 98,101,108, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/label_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/list.loh b/iup/srclua5/loh/list.loh new file mode 100755 index 0000000..860d071 --- /dev/null +++ b/iup/srclua5/loh/list.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/list.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/list.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,108,105,115, +116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 22, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 64, 1, 0, 73, 0,194,131, 73,128,194,132, 73, 0,195,133, 73,128, +195,134, 73, 0,195,135, 9, 64, 0,131,100, 0, 0, 0, 9, 64, 0,136, 69, 64, + 4, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, 4, 0,128, 0, 0, 0,193,192, + 4, 0, 92, 64,128, 1, 30, 0,128, 0, 20, 0, 0, 0, 4, 5, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0,108,105,115,116, 0, 4, 7, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 45, 0, 4, + 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 97, 99, +116,105,111,110, 0, 4, 4, 0, 0, 0,115,110,110, 0, 4, 15, 0, 0, 0,109, +117,108,116,105,115,101,108,101, 99,116, 95, 99, 98, 0, 4, 2, 0, 0, 0,115, + 0, 4, 8, 0, 0, 0,101,100,105,116, 95, 99, 98, 0, 4, 3, 0, 0, 0,110, +115, 0, 4, 12, 0, 0, 0,100,114,111,112,100,111,119,110, 95, 99, 98, 0, 4, + 2, 0, 0, 0,110, 0, 4, 12, 0, 0, 0,100, 98,108, 99,108,105, 99,107, 95, + 99, 98, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110, +116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105, +100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115, +115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 19, 0, 0, 0, 0, 2, 0, 3, 4, 0, + 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, + 0, 0, 4, 5, 0, 0, 0, 76,105,115,116, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, + 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 19, 0, 0, 0, 17, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, + 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116, +114,108, 0, 12, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/list.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/list_be32.loh b/iup/srclua5/loh/list_be32.loh new file mode 100755 index 0000000..1e70e44 --- /dev/null +++ b/iup/srclua5/loh/list_be32.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/list_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/list_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,108,105,115, +116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 20, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0,192, 74,131,194, 0, 73,132,194,128, 73,133,195, 0, 73,131, 0, + 64, 9, 0, 0, 0,100,134,128, 64, 9, 0, 3,128, 69, 0, 0, 0,128, 1, 0, + 64, 92, 0, 3,192, 69, 0, 0, 0,128, 0, 4, 0,193, 1,128, 64, 92, 0,128, + 0, 30, 0, 0, 0, 17, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, + 5,108,105,115,116, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116, +105,111,110, 0, 4, 0, 0, 0, 2, 45, 0, 4, 0, 0, 0, 9, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 4, 0, 0, + 0, 4,115,110,110, 0, 4, 0, 0, 0, 15,109,117,108,116,105,115,101,108,101, + 99,116, 95, 99, 98, 0, 4, 0, 0, 0, 2,115, 0, 4, 0, 0, 0, 8,101,100, +105,116, 95, 99, 98, 0, 4, 0, 0, 0, 3,110,115, 0, 4, 0, 0, 0, 14, 99, +114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, + 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117, +112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 17, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0,133, 0,128, 0, +157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 5, 76,105, +115,116, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, + 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, + 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, + 5, 99,116,114,108, 0, 0, 0, 0, 10, 0, 0, 0, 19, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/list_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/list_be64.loh b/iup/srclua5/loh/list_be64.loh new file mode 100755 index 0000000..1a3776c --- /dev/null +++ b/iup/srclua5/loh/list_be64.loh @@ -0,0 +1,48 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/list_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/list_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,108,105,115,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 22, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 1, 0, 73, 0,194,131, 73,128,194,132, 73, 0, +195,133, 73,128,195,134, 73, 0,195,135, 9, 64, 0,131,100, 0, 0, 0, 9, 64, + 0,136, 69, 64, 4, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, 4, 0,128, 0, + 0, 0,193,192, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 20, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,108,105,115,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, + 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,115,110,110, 0, 4, 15, 0, 0, 0, 0, + 0, 0, 0,109,117,108,116,105,115,101,108,101, 99,116, 95, 99, 98, 0, 4, 2, + 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,101,100, +105,116, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,115, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,100,114,111,112,100,111,119,110, 95, 99, 98, 0, 4, + 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,100, + 98,108, 99,108,105, 99,107, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, + 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115, +115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101, +116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 19, 0, + 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, + 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 76, +105,115,116, 0, 0, 0, 0, 0, 4, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 19, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, + 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 19, 0, 0, 0, 17, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, + 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 12, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/list_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/list_le64.loh b/iup/srclua5/loh/list_le64.loh new file mode 100755 index 0000000..995a457 --- /dev/null +++ b/iup/srclua5/loh/list_le64.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/list_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/list_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,108,105,115,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 20, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,192, 0, 0, 73, 0,194,131, 73,128,194,132, 73, 0, +195,133, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, + 0, 0, 92, 64, 0, 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64, +128, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,108,105,115,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 4, 0, 0, 0, 0, 0, + 0, 0,115,110,110, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,109,117,108,116,105, +115,101,108,101, 99,116, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,115, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,101,100,105,116, 95, 99, 98, 0, 4, 3, + 0, 0, 0, 0, 0, 0, 0,110,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 76,105, +115,116, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, + 0, 17, 0, 0, 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 10, 0, + 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/list_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/list_le64w.loh b/iup/srclua5/loh/list_le64w.loh new file mode 100755 index 0000000..1859883 --- /dev/null +++ b/iup/srclua5/loh/list_le64w.loh @@ -0,0 +1,48 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/list_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/list_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,108,105,115,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 22, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 1, 0, 73, 0,194,131, 73,128,194,132, 73, 0, +195,133, 73,128,195,134, 73, 0,195,135, 9, 64, 0,131,100, 0, 0, 0, 9, 64, + 0,136, 69, 64, 4, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, 4, 0,128, 0, + 0, 0,193,192, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 20, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,108,105,115,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, + 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,115,110,110, 0, 4, 15, 0, 0, 0, 0, + 0, 0, 0,109,117,108,116,105,115,101,108,101, 99,116, 95, 99, 98, 0, 4, 2, + 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,101,100, +105,116, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,115, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,100,114,111,112,100,111,119,110, 95, 99, 98, 0, 4, + 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,100, + 98,108, 99,108,105, 99,107, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, + 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115, +115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101, +116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 19, 0, + 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, + 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 76, +105,115,116, 0, 0, 0, 0, 0, 4, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 19, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, + 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 19, 0, 0, 0, 17, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, + 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 12, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/list_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/matrix.loh b/iup/srclua5/loh/matrix.loh new file mode 100755 index 0000000..cb1d401 --- /dev/null +++ b/iup/srclua5/loh/matrix.loh @@ -0,0 +1,94 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/matrix.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/matrix.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 12, 0, 0, 0, 64,109, 97,116, +114,105,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 50, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, + 9, 64, 65,130, 74,128, 4, 0, 73, 0,194,131, 73,128,194,132, 73,128,194,133, + 73, 64, 67,134, 73,192, 67,135, 73, 64, 68,136, 73,192, 68,137, 73, 64, 69,138, + 73,192, 67,139, 73,192,195,139, 73,192, 67,140, 73,192,195,140, 73,192, 67,141, + 73,192,195,141,138, 64,128, 0,193,192, 3, 0,137,128,199,142,162, 64,128, 0, + 73,128, 0,142,138, 64,128, 0,193,192, 3, 0,137,128,199,142,162, 64,128, 0, + 73,128,128,143, 73,128, 66,144, 73,192,195,144, 73,192, 72,145, 9, 64, 0,131, + 9, 64, 73,146, 9,192, 73,147,100, 0, 0, 0, 9, 64, 0,148,100, 64, 0, 0, + 9, 64,128,148,100,128, 0, 0, 9, 64, 0,149, 69,192, 10, 0,128, 0, 0, 0, + 92, 64, 0, 1, 69, 0, 11, 0,128, 0, 0, 0,193, 64, 11, 0, 92, 64,128, 1, + 30, 0,128, 0, 46, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 7, + 0, 0, 0,109, 97,116,114,105,120, 0, 4, 7, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, + 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, 97, 99,116,105,111,110, + 95, 99, 98, 0, 4, 6, 0, 0, 0,110,110,110,110,115, 0, 4, 9, 0, 0, 0, + 99,108,105, 99,107, 95, 99, 98, 0, 4, 4, 0, 0, 0,110,110,115, 0, 4, 11, + 0, 0, 0,114,101,108,101, 97,115,101, 95, 99, 98, 0, 4, 8, 0, 0, 0,100, +114,111,112, 95, 99, 98, 0, 4, 4, 0, 0, 0,105,110,110, 0, 4, 13, 0, 0, + 0,100,114,111,112, 99,104,101, 99,107, 95, 99, 98, 0, 4, 3, 0, 0, 0,110, +110, 0, 4, 8, 0, 0, 0,100,114, 97,119, 95, 99, 98, 0, 4, 8, 0, 0, 0, +110,110,110,110,110,110,110, 0, 4, 14, 0, 0, 0,100,114,111,112,115,101,108, +101, 99,116, 95, 99, 98, 0, 4, 7, 0, 0, 0,110,110,105,115,110,110, 0, 4, + 11, 0, 0, 0,101,100,105,116,105,111,110, 95, 99, 98, 0, 4, 5, 0, 0, 0, +110,110,110,110, 0, 4, 13, 0, 0, 0,101,110,116,101,114,105,116,101,109, 95, + 99, 98, 0, 4, 13, 0, 0, 0,108,101, 97,118,101,105,116,101,109, 95, 99, 98, + 0, 4, 13, 0, 0, 0,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 4, + 13, 0, 0, 0,115, 99,114,111,108,108,116,111,112, 95, 99, 98, 0, 4, 11, 0, + 0, 0,102,103, 99,111,108,111,114, 95, 99, 98, 0, 4, 11, 0, 0, 0, 98,103, + 99,111,108,111,114, 95, 99, 98, 0, 4, 8, 0, 0, 0,102,111,110,116, 95, 99, + 98, 0, 4, 4, 0, 0, 0,114,101,116, 0, 4, 2, 0, 0, 0,115, 0, 4, 9, + 0, 0, 0,118, 97,108,117,101, 95, 99, 98, 0, 4, 14, 0, 0, 0,118, 97,108, +117,101, 95,101,100,105,116, 95, 99, 98, 0, 4, 8, 0, 0, 0,109, 97,114,107, + 95, 99, 98, 0, 4, 12, 0, 0, 0,109, 97,114,107,101,100,105,116, 95, 99, 98, + 0, 4, 4, 0, 0, 0,110,110,110, 0, 4, 8, 0, 0, 0,105,110, 99,108,117, +100,101, 0, 4, 14, 0, 0, 0,105,117,112, 99,111,110,116,114,111,108,115, 46, +104, 0, 4, 11, 0, 0, 0,101,120,116,114, 97,102,117,110, 99,115, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108, +101,109,101,110,116, 0, 4, 8, 0, 0, 0,115,101,116, 99,101,108,108, 0, 4, + 8, 0, 0, 0,103,101,116, 99,101,108,108, 0, 4, 18, 0, 0, 0,105,117,112, + 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, + 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, + 35, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, +157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, + 0, 77, 97,116,114,105,120, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, + 34, 0, 0, 0, 35, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 39, 0, + 0, 0, 0, 4, 0, 9, 9, 0, 0, 0, 5, 1, 0, 0, 64, 1, 0, 0,128, 1, +128, 0,193, 65, 0, 0, 0, 2, 0, 1,149, 1, 2, 3,192, 1,128, 1, 28, 65, + 0, 2, 30, 0,128, 0, 2, 0, 0, 0, 4, 13, 0, 0, 0, 83,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 4, 2, 0, 0, 0, 58, 0, 0, 0, 0, 0, 9, + 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, + 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 39, 0, 0, 0, 4, + 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 8, 0, + 0, 0, 2, 0, 0, 0,108, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, + 99, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0,118, 97,108, 0, 0, 0, + 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 43, 0, + 0, 0, 0, 3, 0, 8, 9, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1, +128, 0,129, 65, 0, 0,192, 1, 0, 1, 85,193,129, 2,221, 0,128, 1,222, 0, + 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 13, 0, 0, 0, 71,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 4, 2, 0, 0, 0, 58, 0, 0, 0, 0, 0, 9, + 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, + 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, 0, 0, 3, + 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 8, 0, + 0, 0, 2, 0, 0, 0,108, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, + 99, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 4, 0, + 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, + 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, + 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 18, 0, + 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, 0, + 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, + 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, + 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 30, 0, + 0, 0, 35, 0, 0, 0, 33, 0, 0, 0, 39, 0, 0, 0, 37, 0, 0, 0, 43, 0, + 0, 0, 41, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, + 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 36, 0, 0, 0, 49, 0, 0, 0, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/matrix.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/matrix_be32.loh b/iup/srclua5/loh/matrix_be32.loh new file mode 100755 index 0000000..3d83422 --- /dev/null +++ b/iup/srclua5/loh/matrix_be32.loh @@ -0,0 +1,94 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/matrix_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/matrix_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 12, 64,109, 97,116, +114,105,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 0, 0, 0, 50, 0, 1,128, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9, +130, 65, 64, 9, 0, 4,128, 74,131,194, 0, 73,132,194,128, 73,133,194,128, 73, +134, 67, 64, 73,135, 67,192, 73,136, 68, 64, 73,137, 68,192, 73,138, 69, 64, 73, +139, 67,192, 73,139,195,192, 73,140, 67,192, 73,140,195,192, 73,141, 67,192, 73, +141,195,192, 73, 0,128, 64,138, 0, 3,192,193,142,199,128,137, 0,128, 64,162, +142, 0,128, 73, 0,128, 64,138, 0, 3,192,193,142,199,128,137, 0,128, 64,162, +143,128,128, 73,144, 66,128, 73,144,195,192, 73,145, 72,192, 73,131, 0, 64, 9, +146, 73, 64, 9,147, 73,192, 9, 0, 0, 0,100,148, 0, 64, 9, 0, 0, 64,100, +148,128, 64, 9, 0, 0,128,100,149, 0, 64, 9, 0, 10,192, 69, 0, 0, 0,128, + 1, 0, 64, 92, 0, 11, 0, 69, 0, 0, 0,128, 0, 11, 64,193, 1,128, 64, 92, + 0,128, 0, 30, 0, 0, 0, 46, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, + 0, 0, 7,109, 97,116,114,105,120, 0, 4, 0, 0, 0, 7,112, 97,114,101,110, +116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99, +114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 2, 45, 0, 4, 0, 0, 0, 9, + 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 10, 97, 99,116,105,111,110, + 95, 99, 98, 0, 4, 0, 0, 0, 6,110,110,110,110,115, 0, 4, 0, 0, 0, 9, + 99,108,105, 99,107, 95, 99, 98, 0, 4, 0, 0, 0, 4,110,110,115, 0, 4, 0, + 0, 0, 11,114,101,108,101, 97,115,101, 95, 99, 98, 0, 4, 0, 0, 0, 8,100, +114,111,112, 95, 99, 98, 0, 4, 0, 0, 0, 4,105,110,110, 0, 4, 0, 0, 0, + 13,100,114,111,112, 99,104,101, 99,107, 95, 99, 98, 0, 4, 0, 0, 0, 3,110, +110, 0, 4, 0, 0, 0, 8,100,114, 97,119, 95, 99, 98, 0, 4, 0, 0, 0, 8, +110,110,110,110,110,110,110, 0, 4, 0, 0, 0, 14,100,114,111,112,115,101,108, +101, 99,116, 95, 99, 98, 0, 4, 0, 0, 0, 7,110,110,105,115,110,110, 0, 4, + 0, 0, 0, 11,101,100,105,116,105,111,110, 95, 99, 98, 0, 4, 0, 0, 0, 5, +110,110,110,110, 0, 4, 0, 0, 0, 13,101,110,116,101,114,105,116,101,109, 95, + 99, 98, 0, 4, 0, 0, 0, 13,108,101, 97,118,101,105,116,101,109, 95, 99, 98, + 0, 4, 0, 0, 0, 13,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 4, + 0, 0, 0, 13,115, 99,114,111,108,108,116,111,112, 95, 99, 98, 0, 4, 0, 0, + 0, 11,102,103, 99,111,108,111,114, 95, 99, 98, 0, 4, 0, 0, 0, 11, 98,103, + 99,111,108,111,114, 95, 99, 98, 0, 4, 0, 0, 0, 8,102,111,110,116, 95, 99, + 98, 0, 4, 0, 0, 0, 4,114,101,116, 0, 4, 0, 0, 0, 2,115, 0, 4, 0, + 0, 0, 9,118, 97,108,117,101, 95, 99, 98, 0, 4, 0, 0, 0, 14,118, 97,108, +117,101, 95,101,100,105,116, 95, 99, 98, 0, 4, 0, 0, 0, 8,109, 97,114,107, + 95, 99, 98, 0, 4, 0, 0, 0, 12,109, 97,114,107,101,100,105,116, 95, 99, 98, + 0, 4, 0, 0, 0, 4,110,110,110, 0, 4, 0, 0, 0, 8,105,110, 99,108,117, +100,101, 0, 4, 0, 0, 0, 14,105,117,112, 99,111,110,116,114,111,108,115, 46, +104, 0, 4, 0, 0, 0, 11,101,120,116,114, 97,102,117,110, 99,115, 0, 3, 63, +240, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108, +101,109,101,110,116, 0, 4, 0, 0, 0, 8,115,101,116, 99,101,108,108, 0, 4, + 0, 0, 0, 8,103,101,116, 99,101,108,108, 0, 4, 0, 0, 0, 18,105,117,112, + 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, + 32,119,105,100,103,101,116, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 33, + 0, 0, 0, 35, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0,192, 64,198, + 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, + 7, 77, 97,116,114,105,120, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, + 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, + 0, 39, 0, 4, 0, 9, 0, 0, 0, 9, 0, 0, 1, 5, 0, 0, 1, 64, 0,128, + 1,128, 0, 0, 65,193, 1, 0, 2, 0, 3, 2, 1,149, 1,128, 1,192, 2, 0, + 65, 28, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 13, 83,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 4, 0, 0, 0, 2, 58, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, + 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 39, 0, + 0, 0, 4, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 2,108, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, + 99, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4,118, 97,108, 0, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, + 0, 43, 0, 3, 0, 8, 0, 0, 0, 9, 0, 0, 0,197, 0, 0, 1, 0, 0,128, + 1, 64, 0, 0, 65,129, 1, 0, 1,192, 2,129,193, 85, 1,128, 0,221, 0, 0, + 0,222, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 13, 71,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 4, 0, 0, 0, 2, 58, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, + 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, 0, + 0, 0, 3, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 2,108, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, + 99, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, + 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, + 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, + 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, + 0, 25, 0, 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, + 0, 30, 0, 0, 0, 35, 0, 0, 0, 33, 0, 0, 0, 39, 0, 0, 0, 37, 0, 0, + 0, 43, 0, 0, 0, 41, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, + 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, + 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 36, 0, 0, 0, 49, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/matrix_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/matrix_be64.loh b/iup/srclua5/loh/matrix_be64.loh new file mode 100755 index 0000000..b119ef9 --- /dev/null +++ b/iup/srclua5/loh/matrix_be64.loh @@ -0,0 +1,107 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/matrix_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/matrix_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 50, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74,128, 4, 0, 73, 0,194,131, 73,128,194,132, + 73,128,194,133, 73, 64, 67,134, 73,192, 67,135, 73, 64, 68,136, 73,192, 68,137, + 73, 64, 69,138, 73,192, 67,139, 73,192,195,139, 73,192, 67,140, 73,192,195,140, + 73,192, 67,141, 73,192,195,141,138, 64,128, 0,193,192, 3, 0,137,128,199,142, +162, 64,128, 0, 73,128, 0,142,138, 64,128, 0,193,192, 3, 0,137,128,199,142, +162, 64,128, 0, 73,128,128,143, 73,128, 66,144, 73,192,195,144, 73,192, 72,145, + 9, 64, 0,131, 9, 64, 73,146, 9,192, 73,147,100, 0, 0, 0, 9, 64, 0,148, +100, 64, 0, 0, 9, 64,128,148,100,128, 0, 0, 9, 64, 0,149, 69,192, 10, 0, +128, 0, 0, 0, 92, 64, 0, 1, 69, 0, 11, 0,128, 0, 0, 0,193, 64, 11, 0, + 92, 64,128, 1, 30, 0,128, 0, 46, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,105, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97,116,114,105, +120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, + 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 95, 99, 98, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,110,110,110,110,115, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99,108,105, 99,107, 95, 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, + 0, 0,110,110,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,114,101,108,101, 97, +115,101, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,114,111,112, 95, + 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,110,110, 0, 4, 13, 0, 0, + 0, 0, 0, 0, 0,100,114,111,112, 99,104,101, 99,107, 95, 99, 98, 0, 4, 3, + 0, 0, 0, 0, 0, 0, 0,110,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100, +114, 97,119, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,110,110,110,110, +110,110,110, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,100,114,111,112,115,101,108, +101, 99,116, 95, 99, 98, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,110,105,115, +110,110, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,101,100,105,116,105,111,110, 95, + 99, 98, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,110,110,110, 0, 4, 13, 0, + 0, 0, 0, 0, 0, 0,101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 4, + 13, 0, 0, 0, 0, 0, 0, 0,108,101, 97,118,101,105,116,101,109, 95, 99, 98, + 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,109,111,117,115,101,109,111,118,101, 95, + 99, 98, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,115, 99,114,111,108,108,116,111, +112, 95, 99, 98, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,102,103, 99,111,108,111, +114, 95, 99, 98, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 98,103, 99,111,108,111, +114, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,102,111,110,116, 95, 99, + 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, + 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 95,101, +100,105,116, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,109, 97,114,107, + 95, 99, 98, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,109, 97,114,107,101,100,105, +116, 95, 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110,110, 0, 4, 8, + 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 14, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 99,111,110,116,114,111,108,115, 46,104, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97,102,117,110, 99,115, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115, +101,116, 99,101,108,108, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,103,101,116, 99, +101,108,108, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 33, 0, 0, 0, 35, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0, +133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 77, 97,116,114,105,120, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, + 35, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114, +103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 37, 0, 0, 0, 39, 0, 0, 0, 0, 4, 0, 9, 9, 0, 0, 0, 5, 1, + 0, 0, 64, 1, 0, 0,128, 1,128, 0,193, 65, 0, 0, 0, 2, 0, 1,149, 1, + 2, 3,192, 1,128, 1, 28, 65, 0, 2, 30, 0,128, 0, 2, 0, 0, 0, 4, 13, + 0, 0, 0, 0, 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 9, 0, 0, 0, 38, + 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, + 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 39, 0, 0, 0, 4, 0, 0, 0, 7, + 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 8, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,108, 0, 0, 0, 0, 0, 8, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0,118, 97,108, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 43, 0, 0, 0, 0, 3, + 0, 8, 9, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,129, 65, + 0, 0,192, 1, 0, 1, 85,193,129, 2,221, 0,128, 1,222, 0, 0, 0, 30, 0, +128, 0, 2, 0, 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 71,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, + 0, 0, 0, 9, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, + 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, + 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108, +101, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,108, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, + 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, + 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0, + 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 24, 0, + 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 26, 0, + 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 30, 0, 0, 0, 35, 0, + 0, 0, 33, 0, 0, 0, 39, 0, 0, 0, 37, 0, 0, 0, 43, 0, 0, 0, 41, 0, + 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, 0, 46, 0, + 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 36, 0, 0, 0, 49, 0, 0, 0, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/matrix_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/matrix_le64.loh b/iup/srclua5/loh/matrix_le64.loh new file mode 100755 index 0000000..4fbccff --- /dev/null +++ b/iup/srclua5/loh/matrix_le64.loh @@ -0,0 +1,107 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/matrix_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluacontrols51/matrix_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 50, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74,128, 4, 0, 73, 0,194,131, 73,128,194,132, + 73,128,194,133, 73, 64, 67,134, 73,192, 67,135, 73, 64, 68,136, 73,192, 68,137, + 73, 64, 69,138, 73,192, 67,139, 73,192,195,139, 73,192, 67,140, 73,192,195,140, + 73,192, 67,141, 73,192,195,141,138, 64,128, 0,193,192, 3, 0,137,128,199,142, +162, 64,128, 0, 73,128, 0,142,138, 64,128, 0,193,192, 3, 0,137,128,199,142, +162, 64,128, 0, 73,128,128,143, 73,128, 66,144, 73,192,195,144, 73,192, 72,145, + 9, 64, 0,131, 9, 64, 73,146, 9,192, 73,147,100, 0, 0, 0, 9, 64, 0,148, +100, 64, 0, 0, 9, 64,128,148,100,128, 0, 0, 9, 64, 0,149, 69,192, 10, 0, +128, 0, 0, 0, 92, 64, 0, 1, 69, 0, 11, 0,128, 0, 0, 0,193, 64, 11, 0, + 92, 64,128, 1, 30, 0,128, 0, 46, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,105, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97,116,114,105, +120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, + 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 95, 99, 98, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,110,110,110,110,115, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99,108,105, 99,107, 95, 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, + 0, 0,110,110,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,114,101,108,101, 97, +115,101, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,114,111,112, 95, + 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,110,110, 0, 4, 13, 0, 0, + 0, 0, 0, 0, 0,100,114,111,112, 99,104,101, 99,107, 95, 99, 98, 0, 4, 3, + 0, 0, 0, 0, 0, 0, 0,110,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100, +114, 97,119, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,110,110,110,110, +110,110,110, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,100,114,111,112,115,101,108, +101, 99,116, 95, 99, 98, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,110,105,115, +110,110, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,101,100,105,116,105,111,110, 95, + 99, 98, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,110,110,110, 0, 4, 13, 0, + 0, 0, 0, 0, 0, 0,101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 4, + 13, 0, 0, 0, 0, 0, 0, 0,108,101, 97,118,101,105,116,101,109, 95, 99, 98, + 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,109,111,117,115,101,109,111,118,101, 95, + 99, 98, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,115, 99,114,111,108,108,116,111, +112, 95, 99, 98, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,102,103, 99,111,108,111, +114, 95, 99, 98, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 98,103, 99,111,108,111, +114, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,102,111,110,116, 95, 99, + 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, + 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 95,101, +100,105,116, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,109, 97,114,107, + 95, 99, 98, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,109, 97,114,107,101,100,105, +116, 95, 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110,110, 0, 4, 8, + 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 14, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 99,111,110,116,114,111,108,115, 46,104, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97,102,117,110, 99,115, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97, +116,101, 69,108,101,109,101,110,116, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115, +101,116, 99,101,108,108, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,103,101,116, 99, +101,108,108, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 33, 0, 0, 0, 35, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0, +133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 77, 97,116,114,105,120, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, + 35, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114, +103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 37, 0, 0, 0, 39, 0, 0, 0, 0, 4, 0, 9, 9, 0, 0, 0, 5, 1, + 0, 0, 64, 1, 0, 0,128, 1,128, 0,193, 65, 0, 0, 0, 2, 0, 1,149, 1, + 2, 3,192, 1,128, 1, 28, 65, 0, 2, 30, 0,128, 0, 2, 0, 0, 0, 4, 13, + 0, 0, 0, 0, 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 9, 0, 0, 0, 38, + 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, + 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 39, 0, 0, 0, 4, 0, 0, 0, 7, + 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 8, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,108, 0, 0, 0, 0, 0, 8, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0,118, 97,108, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 43, 0, 0, 0, 0, 3, + 0, 8, 9, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,129, 65, + 0, 0,192, 1, 0, 1, 85,193,129, 2,221, 0,128, 1,222, 0, 0, 0, 30, 0, +128, 0, 2, 0, 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 71,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, + 0, 0, 0, 9, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, + 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, + 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108, +101, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,108, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, + 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, + 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 23, 0, + 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 24, 0, + 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 26, 0, + 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 30, 0, 0, 0, 35, 0, + 0, 0, 33, 0, 0, 0, 39, 0, 0, 0, 37, 0, 0, 0, 43, 0, 0, 0, 41, 0, + 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, 0, 46, 0, + 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 36, 0, 0, 0, 49, 0, 0, 0, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/matrix_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/matrix_le64w.loh b/iup/srclua5/loh/matrix_le64w.loh new file mode 100755 index 0000000..13bc7f9 --- /dev/null +++ b/iup/srclua5/loh/matrix_le64w.loh @@ -0,0 +1,103 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/matrix_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/matrix_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,109, 97,116,114,105,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 45, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 64, 4, 0, 73, 0,194,131, 73,128,194,132, + 73,128,194,133, 73, 64, 67,134, 73,192, 67,135, 73, 64, 68,136, 73,192, 68,137, + 73, 64, 69,138, 73,192, 67,139, 73,192,195,139, 73,192, 67,140, 73,192,195,140, + 73,192, 67,141, 73,192,195,141,138, 64,128, 0,193,192, 3, 0,137,128,199,142, +162, 64,128, 0, 73,128, 0,142, 73,128,194,143, 73,192, 67,144, 73, 64,197,144, + 9, 64, 0,131, 9,192, 72,145, 9, 64, 73,146,100, 0, 0, 0, 9, 64, 0,147, +100, 64, 0, 0, 9, 64,128,147,100,128, 0, 0, 9, 64, 0,148, 69, 64, 10, 0, +128, 0, 0, 0, 92, 64, 0, 1, 69,128, 10, 0,128, 0, 0, 0,193,192, 10, 0, + 92, 64,128, 1, 30, 0,128, 0, 44, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,105, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97,116,114,105, +120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, + 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 95, 99, 98, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,110,110,110,110,115, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99,108,105, 99,107, 95, 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, + 0, 0,110,110,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,114,101,108,101, 97, +115,101, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,114,111,112, 95, + 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,105,110,110, 0, 4, 13, 0, 0, + 0, 0, 0, 0, 0,100,114,111,112, 99,104,101, 99,107, 95, 99, 98, 0, 4, 3, + 0, 0, 0, 0, 0, 0, 0,110,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100, +114, 97,119, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,110,110,110,110, +110,110,110, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,100,114,111,112,115,101,108, +101, 99,116, 95, 99, 98, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,110,105,115, +110,110, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,101,100,105,116,105,111,110, 95, + 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110,110, 0, 4, 13, 0, 0, + 0, 0, 0, 0, 0,101,110,116,101,114,105,116,101,109, 95, 99, 98, 0, 4, 13, + 0, 0, 0, 0, 0, 0, 0,108,101, 97,118,101,105,116,101,109, 95, 99, 98, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,109,111,117,115,101,109,111,118,101, 95, 99, + 98, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,115, 99,114,111,108,108,116,111,112, + 95, 99, 98, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,102,103, 99,111,108,111,114, + 95, 99, 98, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 98,103, 99,111,108,111,114, + 95, 99, 98, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 95, 99, + 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,114,101,116, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, + 95,101,100,105,116, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,109, 97, +114,107, 95, 99, 98, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,109, 97,114,107,101, +100,105,116, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108, +117,100,101, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112,109, 97,116,114, +105,120, 46,104, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97,102, +117,110, 99,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 8, 0, + 0, 0, 0, 0, 0, 0,115,101,116, 99,101,108,108, 0, 4, 8, 0, 0, 0, 0, + 0, 0, 0,103,101,116, 99,101,108,108, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 34, 0, 0, 0, 0, + 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, + 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, + 77, 97,116,114,105,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105, +111,110, 0, 0, 0, 0, 0, 5, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, + 0, 0, 0, 33, 0, 0, 0, 34, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 38, 0, 0, 0, 0, 4, 0, + 9, 9, 0, 0, 0, 5, 1, 0, 0, 64, 1, 0, 0,128, 1,128, 0,193, 65, 0, + 0, 0, 2, 0, 1,149, 1, 2, 3,192, 1,128, 1, 28, 65, 0, 2, 30, 0,128, + 0, 2, 0, 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 65,116,116, +114,105, 98,117,116,101, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, + 0, 0, 9, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, 0, + 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 38, 0, + 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,108, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,118, 97,108, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, + 0, 42, 0, 0, 0, 0, 3, 0, 8, 9, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, + 0, 64, 1,128, 0,129, 65, 0, 0,192, 1, 0, 1, 85,193,129, 2,221, 0,128, + 1,222, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 13, 0, 0, 0, 0, 0, + 0, 0, 71,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 9, 0, 0, 0, 41, 0, 0, 0, 41, 0, + 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 41, 0, + 0, 0, 41, 0, 0, 0, 42, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0,108, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 99, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, + 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, + 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, + 0, 24, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, + 0, 29, 0, 0, 0, 34, 0, 0, 0, 32, 0, 0, 0, 38, 0, 0, 0, 36, 0, 0, + 0, 42, 0, 0, 0, 40, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, + 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 31, 0, + 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/matrix_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/menu.loh b/iup/srclua5/loh/menu.loh new file mode 100755 index 0000000..2c6f9cf --- /dev/null +++ b/iup/srclua5/loh/menu.loh @@ -0,0 +1,122 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/menu.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/menu.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,109,101,110, +117, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 27, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74,128, 0, 0, 73, 0,194,131, 73, 0,194,132, 9, 64, 0,131,100, 0, + 0, 0, 9, 64, 0,133,100, 64, 0, 0, 9, 64,128,133,100,128, 0, 0, 9, 64, + 0,134,100,192, 0, 0, 9, 64,128,134,100, 0, 1, 0, 9, 64, 0,135, 69,192, + 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 0, 4, 0,128, 0, 0, 0,193, 64, + 4, 0, 92, 64,128, 1, 30, 0,128, 0, 18, 0, 0, 0, 4, 5, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0,109,101,110,117, 0, 4, 7, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 4, 0, 0, 0, 66, 79, 88, 0, 4, 9, 0, 0, 0, + 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 45, 0, 4, 9, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0,111,112,101,110, 95, + 99, 98, 0, 4, 1, 0, 0, 0, 0, 4, 13, 0, 0, 0,109,101,110,117, 99,108, +111,115,101, 95, 99, 98, 0, 4, 6, 0, 0, 0,112,111,112,117,112, 0, 4, 7, + 0, 0, 0, 97,112,112,101,110,100, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 7, 0, 0, 0,115,104,111,119,120,121, + 0, 4, 8, 0, 0, 0,100,101,115,116,114,111,121, 0, 4, 18, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 5, 0, 0, 0, 0, 0, 0, 0, 14, 0, + 0, 0, 16, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, + 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, + 0, 0, 4, 6, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, + 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 2, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 0, 2, 0, 5, 5, 0, 0, 0, +133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 30, 0,128, 0, + 1, 0, 0, 0, 4, 7, 0, 0, 0, 65,112,112,101,110,100, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 20, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0,101,108,101,109, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 44, 0, 0, 0, + 0, 2, 0, 14, 85, 0, 0, 0,148, 0,128, 0,193, 0, 0, 0, 0, 1, 0, 1, + 65, 1, 0, 0,224,128, 18,128,197, 65, 0, 0, 6,130,129, 0,220,129, 0, 1, + 23,128,192, 3, 22, 64, 17,128,202, 1, 0, 0,199,193, 0, 0,197, 1, 1, 0, + 6,130,129, 0,220, 1, 1, 1, 22,128, 1,128, 5, 67, 0, 0, 64, 3, 0, 5, + 28,131, 0, 1, 87, 64, 65, 6, 22, 64, 0,128, 5,195, 0, 0, 9,195, 2, 5, +225,129, 0, 0, 22,128,253,127,197, 65, 0, 0, 6,130,129, 0, 6, 2, 64, 4, +220,129, 0, 1, 23,128,193, 3, 22, 0, 6,128,197, 65, 0, 0, 6,130,129, 0, + 6,194, 65, 4,220,129, 0, 1, 87, 0,194, 3, 22, 64, 1,128,197, 65, 0, 0, + 6,130,129, 0, 6,194, 65, 4,220,129, 0, 1, 23,128,193, 3, 22, 0, 3,128, +197,193, 0, 0, 6,130,129, 0, 6, 2, 64, 4,201, 1,130,132,197,193, 0, 0, + 6,130,129, 0, 6,194, 65, 4,201, 1, 2,133,197,193, 2, 0, 5,194, 0, 0, +220,129, 0, 1, 73,192, 1, 3, 22,192, 5,128,197, 65, 0, 0, 6,130,129, 0, + 6, 2, 64, 4,220,129, 0, 1, 23,128,193, 3, 22, 64, 4,128,197, 65, 0, 0, + 6,130,129, 0, 6,194, 65, 4,220,129, 0, 1, 23, 0,195, 3, 22,192, 2,128, +197,193, 0, 0, 6,130,129, 0, 6,194, 65, 4,201, 1, 2,128,197,193, 0, 0, + 6,130,129, 0, 6, 2, 64, 4,201, 1,130,132,197, 65, 3, 0, 5,194, 0, 0, +220,129, 0, 1, 73,192, 1, 3,223,192,236,127,197,128, 3, 0,221, 0,128, 0, +222, 0, 0, 0, 30, 0,128, 0, 15, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, + 63, 4, 5, 0, 0, 0,116,121,112,101, 0, 4, 6, 0, 0, 0,116, 97, 98,108, +101, 0, 4, 8, 0, 0, 0,105,116,101,109, 97,114,103, 0, 4, 6, 0, 0, 0, +112, 97,105,114,115, 0, 4, 7, 0, 0, 0,110,117,109, 98,101,114, 0, 4, 7, + 0, 0, 0,115,116,114,105,110,103, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 4, + 9, 0, 0, 0,102,117,110, 99,116,105,111,110, 0, 4, 6, 0, 0, 0,116,105, +116,108,101, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 5, 0, 0, + 0,105,116,101,109, 0, 4, 9, 0, 0, 0,117,115,101,114,100, 97,116, 97, 0, + 4, 8, 0, 0, 0,115,117, 98,109,101,110,117, 0, 4, 5, 0, 0, 0, 77,101, +110,117, 0, 0, 0, 0, 0, 85, 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 24, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, + 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 27, + 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 27, 0, 0, 0, 30, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 34, + 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 38, + 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 39, 0, 0, 0, 39, + 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 24, 0, 0, 0, 43, 0, 0, 0, 43, + 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 12, 0, 0, 0, 6, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 84, 0, 0, 0, 4, 0, 0, 0, 97,114,103, + 0, 0, 0, 0, 0, 84, 0, 0, 0, 2, 0, 0, 0,110, 0, 1, 0, 0, 0, 84, + 0, 0, 0, 12, 0, 0, 0, 40,102,111,114, 32,105,110,100,101,120, 41, 0, 4, + 0, 0, 0, 81, 0, 0, 0, 12, 0, 0, 0, 40,102,111,114, 32,108,105,109,105, +116, 41, 0, 4, 0, 0, 0, 81, 0, 0, 0, 11, 0, 0, 0, 40,102,111,114, 32, +115,116,101,112, 41, 0, 4, 0, 0, 0, 81, 0, 0, 0, 2, 0, 0, 0,105, 0, + 5, 0, 0, 0, 80, 0, 0, 0, 16, 0, 0, 0, 40,102,111,114, 32,103,101,110, +101,114, 97,116,111,114, 41, 0, 15, 0, 0, 0, 25, 0, 0, 0, 12, 0, 0, 0, + 40,102,111,114, 32,115,116, 97,116,101, 41, 0, 15, 0, 0, 0, 25, 0, 0, 0, + 14, 0, 0, 0, 40,102,111,114, 32, 99,111,110,116,114,111,108, 41, 0, 15, 0, + 0, 0, 25, 0, 0, 0, 2, 0, 0, 0,117, 0, 16, 0, 0, 0, 23, 0, 0, 0, + 2, 0, 0, 0,118, 0, 16, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 0, 3, 0, 7, 7, 0, 0, 0,197, 0, + 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,221, 0, 0, 2,222, 0, + 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 83,104,111,119, 88, + 89, 0, 0, 0, 0, 0, 7, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, + 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 3, 0, + 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 6, 0, 0, + 0, 2, 0, 0, 0,120, 0, 0, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0,121, + 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, + 0, 52, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, + 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, + 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 51, 0, + 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 1, 0, + 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 27, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, + 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 20, 0, 0, 0, 18, 0, 0, + 0, 44, 0, 0, 0, 22, 0, 0, 0, 48, 0, 0, 0, 46, 0, 0, 0, 52, 0, 0, + 0, 50, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 26, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/menu.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/menu_be32.loh b/iup/srclua5/loh/menu_be32.loh new file mode 100755 index 0000000..6b81d0e --- /dev/null +++ b/iup/srclua5/loh/menu_be32.loh @@ -0,0 +1,122 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/menu_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/menu_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,109,101,110, +117, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 27, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0,128, 74,131,194, 0, 73,132,194, 0, 73,131, 0, 64, 9, 0, 0, + 0,100,133, 0, 64, 9, 0, 0, 64,100,133,128, 64, 9, 0, 0,128,100,134, 0, + 64, 9, 0, 0,192,100,134,128, 64, 9, 0, 1, 0,100,135, 0, 64, 9, 0, 3, +192, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 4, 0, 69, 0, 0, 0,128, 0, 4, + 64,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 18, 4, 0, 0, 0, 5,110, +105, 99,107, 0, 4, 0, 0, 0, 5,109,101,110,117, 0, 4, 0, 0, 0, 7,112, + 97,114,101,110,116, 0, 4, 0, 0, 0, 4, 66, 79, 88, 0, 4, 0, 0, 0, 9, + 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 2, 45, 0, 4, 0, 0, 0, + 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 8,111,112,101,110, 95, + 99, 98, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 13,109,101,110,117, 99,108, +111,115,101, 95, 99, 98, 0, 4, 0, 0, 0, 6,112,111,112,117,112, 0, 4, 0, + 0, 0, 7, 97,112,112,101,110,100, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 7,115,104,111,119,120,121, + 0, 4, 0, 0, 0, 8,100,101,115,116,114,111,121, 0, 4, 0, 0, 0, 18,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, + 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105, +117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 16, 0, 3, 0, 7, 0, 0, 0, 6, 0, 0, 0,197, 0, 0, + 1, 0, 0,128, 1, 64, 1, 0, 1,128, 2, 0, 64,220, 0,128, 0, 30, 0, 0, + 0, 1, 4, 0, 0, 0, 6, 80,111,112,117,112, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 16, 0, 0, 0, 3, 0, 0, 0, 7,104, 97,110,100,108,101, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2,120, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 2,121, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 20, 0, 2, 0, 5, 0, 0, 0, 5, + 0, 0, 0,133, 0, 0, 0,192, 0,128, 1, 0, 1,128, 64,156, 0,128, 0, 30, + 0, 0, 0, 1, 4, 0, 0, 0, 7, 65,112,112,101,110,100, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5,101,108,101,109, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 44, + 0, 2, 0, 14, 0, 0, 0, 85, 0,128, 0,148, 0, 0, 0,193, 1, 0, 1, 0, + 0, 0, 1, 65,128, 18,128,224, 0, 0, 65,197, 0,129,130, 6, 1, 0,129,220, + 3,192,128, 23,128, 17, 64, 22, 0, 0, 1,202, 0, 0,193,199, 0, 1, 1,197, + 0,129,130, 6, 1, 1, 1,220,128, 1,128, 22, 0, 0, 67, 5, 5, 0, 3, 64, + 1, 0,131, 28, 6, 65, 64, 87,128, 0, 64, 22, 0, 0,195, 5, 5, 2,195, 9, + 0, 0,129,225,127,253,128, 22, 0, 0, 65,197, 0,129,130, 6, 4, 64, 2, 6, + 1, 0,129,220, 3,193,128, 23,128, 6, 0, 22, 0, 0, 65,197, 0,129,130, 6, + 4, 65,194, 6, 1, 0,129,220, 3,194, 0, 87,128, 1, 64, 22, 0, 0, 65,197, + 0,129,130, 6, 4, 65,194, 6, 1, 0,129,220, 3,193,128, 23,128, 3, 0, 22, + 0, 0,193,197, 0,129,130, 6, 4, 64, 2, 6,132,130, 1,201, 0, 0,193,197, + 0,129,130, 6, 4, 65,194, 6,133, 2, 1,201, 0, 2,193,197, 0, 0,194, 5, + 1, 0,129,220, 3, 1,192, 73,128, 5,192, 22, 0, 0, 65,197, 0,129,130, 6, + 4, 64, 2, 6, 1, 0,129,220, 3,193,128, 23,128, 4, 64, 22, 0, 0, 65,197, + 0,129,130, 6, 4, 65,194, 6, 1, 0,129,220, 3,195, 0, 23,128, 2,192, 22, + 0, 0,193,197, 0,129,130, 6, 4, 65,194, 6,128, 2, 1,201, 0, 0,193,197, + 0,129,130, 6, 4, 64, 2, 6,132,130, 1,201, 0, 3, 65,197, 0, 0,194, 5, + 1, 0,129,220, 3, 1,192, 73,127,236,192,223, 0, 3,128,197, 0,128, 0,221, + 0, 0, 0,222, 0,128, 0, 30, 0, 0, 0, 15, 3, 63,240, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 5,116,121,112,101, 0, 4, 0, 0, 0, 6,116, 97, 98,108, +101, 0, 4, 0, 0, 0, 8,105,116,101,109, 97,114,103, 0, 4, 0, 0, 0, 6, +112, 97,105,114,115, 0, 4, 0, 0, 0, 7,110,117,109, 98,101,114, 0, 4, 0, + 0, 0, 7,115,116,114,105,110,103, 0, 3, 64, 0, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 9,102,117,110, 99,116,105,111,110, 0, 4, 0, 0, 0, 6,116,105, +116,108,101, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 4, 0, 0, 0, + 5,105,116,101,109, 0, 4, 0, 0, 0, 9,117,115,101,114,100, 97,116, 97, 0, + 4, 0, 0, 0, 8,115,117, 98,109,101,110,117, 0, 4, 0, 0, 0, 5, 77,101, +110,117, 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 23, 0, 0, 0, 24, 0, + 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, + 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, + 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, + 0, 0, 29, 0, 0, 0, 27, 0, 0, 0, 30, 0, 0, 0, 32, 0, 0, 0, 32, 0, + 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, + 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, + 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, + 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, + 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 35, 0, + 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 36, 0, + 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, + 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, + 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, 0, + 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 39, 0, + 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 24, 0, 0, 0, 43, 0, + 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 12, 0, 0, 0, 6, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 4, 97,114,103, + 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 2,110, 0, 0, 0, 0, 1, 0, + 0, 0, 84, 0, 0, 0, 12, 40,102,111,114, 32,105,110,100,101,120, 41, 0, 0, + 0, 0, 4, 0, 0, 0, 81, 0, 0, 0, 12, 40,102,111,114, 32,108,105,109,105, +116, 41, 0, 0, 0, 0, 4, 0, 0, 0, 81, 0, 0, 0, 11, 40,102,111,114, 32, +115,116,101,112, 41, 0, 0, 0, 0, 4, 0, 0, 0, 81, 0, 0, 0, 2,105, 0, + 0, 0, 0, 5, 0, 0, 0, 80, 0, 0, 0, 16, 40,102,111,114, 32,103,101,110, +101,114, 97,116,111,114, 41, 0, 0, 0, 0, 15, 0, 0, 0, 25, 0, 0, 0, 12, + 40,102,111,114, 32,115,116, 97,116,101, 41, 0, 0, 0, 0, 15, 0, 0, 0, 25, + 0, 0, 0, 14, 40,102,111,114, 32, 99,111,110,116,114,111,108, 41, 0, 0, 0, + 0, 15, 0, 0, 0, 25, 0, 0, 0, 2,117, 0, 0, 0, 0, 16, 0, 0, 0, 23, + 0, 0, 0, 2,118, 0, 0, 0, 0, 16, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 46, 0, 0, 0, 48, 0, 3, 0, 7, 0, 0, 0, 7, 0, 0, + 0,197, 0, 0, 1, 0, 0,128, 1, 64, 1, 0, 1,128, 2, 0, 0,221, 0, 0, + 0,222, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 7, 83,104,111,119, 88, + 89, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, + 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 48, 0, 0, + 0, 3, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 2,120, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 2,121, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 50, 0, 0, 0, 52, 0, 1, 0, 3, 0, 0, 0, 5, 0, 0, 0, 69, 0, 0, 0, +128, 1, 0, 0, 93, 0, 0, 0, 94, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, + 0, 8, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, + 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, + 0, 1, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, + 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, + 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 20, 0, 0, 0, + 18, 0, 0, 0, 44, 0, 0, 0, 22, 0, 0, 0, 48, 0, 0, 0, 46, 0, 0, 0, + 52, 0, 0, 0, 50, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, + 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, + 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 9, 0, 0, 0, 26, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/menu_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/menu_be64.loh b/iup/srclua5/loh/menu_be64.loh new file mode 100755 index 0000000..d09ad33 --- /dev/null +++ b/iup/srclua5/loh/menu_be64.loh @@ -0,0 +1,134 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/menu_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/menu_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,109,101,110,117, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 27, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0,194,131, 73, 0,194,132, 9, 64, + 0,131,100, 0, 0, 0, 9, 64, 0,133,100, 64, 0, 0, 9, 64,128,133,100,128, + 0, 0, 9, 64, 0,134,100,192, 0, 0, 9, 64,128,134,100, 0, 1, 0, 9, 64, + 0,135, 69,192, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 0, 4, 0,128, 0, + 0, 0,193, 64, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 18, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,109,101,110,117, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, 79, 88, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, + 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 95, 99, 98, 0, 4, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,109,101, +110,117, 99,108,111,115,101, 95, 99, 98, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +112,111,112,117,112, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,112,112,101,110, +100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101, +109,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,104,111,119,120,121, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, 4, 18, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105, +100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, + 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119, +105,100,103,101,116, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, + 0, 0, 16, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, + 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, + 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, + 0, 6, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 15, 0, 0, 0, 16, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 0, 2, 0, 5, 5, 0, 0, 0, +133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 30, 0,128, 0, + 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101,110,100, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 44, 0, 0, 0, 0, 2, 0, 14, + 85, 0, 0, 0,148, 0,128, 0,193, 0, 0, 0, 0, 1, 0, 1, 65, 1, 0, 0, +224,128, 18,128,197, 65, 0, 0, 6,130,129, 0,220,129, 0, 1, 23,128,192, 3, + 22, 64, 17,128,202, 1, 0, 0,199,193, 0, 0,197, 1, 1, 0, 6,130,129, 0, +220, 1, 1, 1, 22,128, 1,128, 5, 67, 0, 0, 64, 3, 0, 5, 28,131, 0, 1, + 87, 64, 65, 6, 22, 64, 0,128, 5,195, 0, 0, 9,195, 2, 5,225,129, 0, 0, + 22,128,253,127,197, 65, 0, 0, 6,130,129, 0, 6, 2, 64, 4,220,129, 0, 1, + 23,128,193, 3, 22, 0, 6,128,197, 65, 0, 0, 6,130,129, 0, 6,194, 65, 4, +220,129, 0, 1, 87, 0,194, 3, 22, 64, 1,128,197, 65, 0, 0, 6,130,129, 0, + 6,194, 65, 4,220,129, 0, 1, 23,128,193, 3, 22, 0, 3,128,197,193, 0, 0, + 6,130,129, 0, 6, 2, 64, 4,201, 1,130,132,197,193, 0, 0, 6,130,129, 0, + 6,194, 65, 4,201, 1, 2,133,197,193, 2, 0, 5,194, 0, 0,220,129, 0, 1, + 73,192, 1, 3, 22,192, 5,128,197, 65, 0, 0, 6,130,129, 0, 6, 2, 64, 4, +220,129, 0, 1, 23,128,193, 3, 22, 64, 4,128,197, 65, 0, 0, 6,130,129, 0, + 6,194, 65, 4,220,129, 0, 1, 23, 0,195, 3, 22,192, 2,128,197,193, 0, 0, + 6,130,129, 0, 6,194, 65, 4,201, 1, 2,128,197,193, 0, 0, 6,130,129, 0, + 6, 2, 64, 4,201, 1,130,132,197, 65, 3, 0, 5,194, 0, 0,220,129, 0, 1, + 73,192, 1, 3,223,192,236,127,197,128, 3, 0,221, 0,128, 0,222, 0, 0, 0, + 30, 0,128, 0, 15, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 5, 0, + 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +116, 97, 98,108,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,116,101,109, 97, +114,103, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112, 97,105,114,115, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,110,117,109, 98,101,114, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,115,116,114,105,110,103, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 4, + 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,116,105,111,110, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 97, 99,116,105,111,110, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,105,116,101, +109, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,117,115,101,114,100, 97,116, 97, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0,115,117, 98,109,101,110,117, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0, 77,101,110,117, 0, 0, 0, 0, 0, 85, 0, 0, 0, 23, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, + 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, + 0, 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 27, 0, 0, 0, 30, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, + 0, 0, 0, 33, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, + 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, + 0, 0, 0, 37, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, + 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 24, + 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 12, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 84, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 84, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 1, 0, 0, 0, 84, + 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,105,110,100,101, +120, 41, 0, 4, 0, 0, 0, 81, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40, +102,111,114, 32,108,105,109,105,116, 41, 0, 4, 0, 0, 0, 81, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, 4, 0, + 0, 0, 81, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 5, 0, 0, 0, + 80, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,103,101,110, +101,114, 97,116,111,114, 41, 0, 15, 0, 0, 0, 25, 0, 0, 0, 12, 0, 0, 0, + 0, 0, 0, 0, 40,102,111,114, 32,115,116, 97,116,101, 41, 0, 15, 0, 0, 0, + 25, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32, 99,111,110, +116,114,111,108, 41, 0, 15, 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0,117, 0, 16, 0, 0, 0, 23, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, +118, 0, 16, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 0, 3, 0, 7, 7, 0, 0, 0,197, 0, + 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,221, 0, 0, 2,222, 0, + 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, +104,111,119, 88, 89, 0, 0, 0, 0, 0, 7, 0, 0, 0, 47, 0, 0, 0, 47, 0, + 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 48, 0, + 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, + 0, 0, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, + 0, 52, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, + 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, + 0, 0, 0, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, + 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, + 0, 20, 0, 0, 0, 18, 0, 0, 0, 44, 0, 0, 0, 22, 0, 0, 0, 48, 0, 0, + 0, 46, 0, 0, 0, 52, 0, 0, 0, 50, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, + 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114, +108, 0, 9, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/menu_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/menu_le64.loh b/iup/srclua5/loh/menu_le64.loh new file mode 100755 index 0000000..a19667f --- /dev/null +++ b/iup/srclua5/loh/menu_le64.loh @@ -0,0 +1,134 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/menu_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/menu_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,109,101,110,117, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 27, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0,194,131, 73, 0,194,132, 9, 64, + 0,131,100, 0, 0, 0, 9, 64, 0,133,100, 64, 0, 0, 9, 64,128,133,100,128, + 0, 0, 9, 64, 0,134,100,192, 0, 0, 9, 64,128,134,100, 0, 1, 0, 9, 64, + 0,135, 69,192, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 0, 4, 0,128, 0, + 0, 0,193, 64, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 18, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,109,101,110,117, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, 79, 88, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, + 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 95, 99, 98, 0, 4, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,109,101, +110,117, 99,108,111,115,101, 95, 99, 98, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +112,111,112,117,112, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,112,112,101,110, +100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101, +109,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,104,111,119,120,121, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, 4, 18, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105, +100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, + 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119, +105,100,103,101,116, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, + 0, 0, 16, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, + 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, + 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, + 0, 6, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 15, 0, 0, 0, 16, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 0, 2, 0, 5, 5, 0, 0, 0, +133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 30, 0,128, 0, + 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101,110,100, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 44, 0, 0, 0, 0, 2, 0, 14, + 85, 0, 0, 0,148, 0,128, 0,193, 0, 0, 0, 0, 1, 0, 1, 65, 1, 0, 0, +224,128, 18,128,197, 65, 0, 0, 6,130,129, 0,220,129, 0, 1, 23,128,192, 3, + 22, 64, 17,128,202, 1, 0, 0,199,193, 0, 0,197, 1, 1, 0, 6,130,129, 0, +220, 1, 1, 1, 22,128, 1,128, 5, 67, 0, 0, 64, 3, 0, 5, 28,131, 0, 1, + 87, 64, 65, 6, 22, 64, 0,128, 5,195, 0, 0, 9,195, 2, 5,225,129, 0, 0, + 22,128,253,127,197, 65, 0, 0, 6,130,129, 0, 6, 2, 64, 4,220,129, 0, 1, + 23,128,193, 3, 22, 0, 6,128,197, 65, 0, 0, 6,130,129, 0, 6,194, 65, 4, +220,129, 0, 1, 87, 0,194, 3, 22, 64, 1,128,197, 65, 0, 0, 6,130,129, 0, + 6,194, 65, 4,220,129, 0, 1, 23,128,193, 3, 22, 0, 3,128,197,193, 0, 0, + 6,130,129, 0, 6, 2, 64, 4,201, 1,130,132,197,193, 0, 0, 6,130,129, 0, + 6,194, 65, 4,201, 1, 2,133,197,193, 2, 0, 5,194, 0, 0,220,129, 0, 1, + 73,192, 1, 3, 22,192, 5,128,197, 65, 0, 0, 6,130,129, 0, 6, 2, 64, 4, +220,129, 0, 1, 23,128,193, 3, 22, 64, 4,128,197, 65, 0, 0, 6,130,129, 0, + 6,194, 65, 4,220,129, 0, 1, 23, 0,195, 3, 22,192, 2,128,197,193, 0, 0, + 6,130,129, 0, 6,194, 65, 4,201, 1, 2,128,197,193, 0, 0, 6,130,129, 0, + 6, 2, 64, 4,201, 1,130,132,197, 65, 3, 0, 5,194, 0, 0,220,129, 0, 1, + 73,192, 1, 3,223,192,236,127,197,128, 3, 0,221, 0,128, 0,222, 0, 0, 0, + 30, 0,128, 0, 15, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 5, 0, + 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +116, 97, 98,108,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,116,101,109, 97, +114,103, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112, 97,105,114,115, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,110,117,109, 98,101,114, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,115,116,114,105,110,103, 0, 3, 0, 0, 0, 0, 0, 0, 0, 64, 4, + 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,116,105,111,110, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 97, 99,116,105,111,110, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,105,116,101, +109, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,117,115,101,114,100, 97,116, 97, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0,115,117, 98,109,101,110,117, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0, 77,101,110,117, 0, 0, 0, 0, 0, 85, 0, 0, 0, 23, + 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, + 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, + 0, 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 27, 0, 0, 0, 30, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, + 0, 0, 0, 33, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, + 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, + 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, + 0, 0, 0, 37, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, + 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 24, + 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 12, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 84, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 84, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 1, 0, 0, 0, 84, + 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,105,110,100,101, +120, 41, 0, 4, 0, 0, 0, 81, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40, +102,111,114, 32,108,105,109,105,116, 41, 0, 4, 0, 0, 0, 81, 0, 0, 0, 11, + 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, 4, 0, + 0, 0, 81, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 5, 0, 0, 0, + 80, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,103,101,110, +101,114, 97,116,111,114, 41, 0, 15, 0, 0, 0, 25, 0, 0, 0, 12, 0, 0, 0, + 0, 0, 0, 0, 40,102,111,114, 32,115,116, 97,116,101, 41, 0, 15, 0, 0, 0, + 25, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32, 99,111,110, +116,114,111,108, 41, 0, 15, 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0,117, 0, 16, 0, 0, 0, 23, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, +118, 0, 16, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 0, 3, 0, 7, 7, 0, 0, 0,197, 0, + 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,221, 0, 0, 2,222, 0, + 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83, +104,111,119, 88, 89, 0, 0, 0, 0, 0, 7, 0, 0, 0, 47, 0, 0, 0, 47, 0, + 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 48, 0, + 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, + 0, 0, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, + 0, 52, 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, + 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, + 0, 0, 0, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, + 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, + 0, 20, 0, 0, 0, 18, 0, 0, 0, 44, 0, 0, 0, 22, 0, 0, 0, 48, 0, 0, + 0, 46, 0, 0, 0, 52, 0, 0, 0, 50, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, + 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, + 0, 55, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114, +108, 0, 9, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/menu_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/menu_le64w.loh b/iup/srclua5/loh/menu_le64w.loh new file mode 100755 index 0000000..afca571 --- /dev/null +++ b/iup/srclua5/loh/menu_le64w.loh @@ -0,0 +1,136 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/menu_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/menu_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,109,101,110,117, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 27, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0,194,131, 73, 0,194,132, 9, 64, + 0,131,100, 0, 0, 0, 9, 64, 0,133,100, 64, 0, 0, 9, 64,128,133,100,128, + 0, 0, 9, 64, 0,134,100,192, 0, 0, 9, 64,128,134,100, 0, 1, 0, 9, 64, + 0,135, 69,192, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 0, 4, 0,128, 0, + 0, 0,193, 64, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 18, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,109,101,110,117, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, 79, 88, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, + 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,111,112,101,110, 95, 99, 98, 0, 4, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,109,101, +110,117, 99,108,111,115,101, 95, 99, 98, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, +112,111,112,117,112, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,112,112,101,110, +100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101, +109,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,115,104,111,119,120,121, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101,115,116,114,111,121, 0, 4, 18, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105, +100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, + 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119, +105,100,103,101,116, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, + 0, 0, 16, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, + 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, + 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, + 0, 6, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 15, 0, 0, 0, 16, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0,120, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 20, 0, 0, 0, 0, 2, 0, 5, 5, 0, 0, 0, +133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 30, 0,128, 0, + 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101,110,100, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 44, 0, 0, 0, 0, 2, 0, 14, + 88, 0, 0, 0,133, 0, 0, 0,134, 64, 64, 1,192, 0,128, 0,156,128, 0, 1, +193,128, 0, 0, 0, 1, 0, 1, 65,129, 0, 0,224,128, 18,128,197,193, 0, 0, + 6,130,129, 0,220,129, 0, 1, 23, 0,192, 3, 22, 64, 17,128,202, 1, 0, 0, +199, 1, 1, 0,197, 65, 1, 0, 6,130,129, 0,220, 1, 1, 1, 22,128, 1,128, + 5,195, 0, 0, 64, 3, 0, 5, 28,131, 0, 1, 87,128, 65, 6, 22, 64, 0,128, + 5, 3, 1, 0, 9,195, 2, 5,225,129, 0, 0, 22,128,253,127,197,193, 0, 0, + 6,130,129, 0, 6,130, 64, 4,220,129, 0, 1, 23,192,193, 3, 22, 0, 6,128, +197,193, 0, 0, 6,130,129, 0, 6, 2, 66, 4,220,129, 0, 1, 87, 64,194, 3, + 22, 64, 1,128,197,193, 0, 0, 6,130,129, 0, 6, 2, 66, 4,220,129, 0, 1, + 23,192,193, 3, 22, 0, 3,128,197, 1, 1, 0, 6,130,129, 0, 6,130, 64, 4, +201, 1, 2,133,197, 1, 1, 0, 6,130,129, 0, 6, 2, 66, 4,201, 1,130,133, +197, 1, 3, 0, 5, 2, 1, 0,220,129, 0, 1, 73,192, 1, 3, 22,192, 5,128, +197,193, 0, 0, 6,130,129, 0, 6,130, 64, 4,220,129, 0, 1, 23,192,193, 3, + 22, 64, 4,128,197,193, 0, 0, 6,130,129, 0, 6, 2, 66, 4,220,129, 0, 1, + 23, 64,195, 3, 22,192, 2,128,197, 1, 1, 0, 6,130,129, 0, 6, 2, 66, 4, +201, 1, 2,129,197, 1, 1, 0, 6,130,129, 0, 6,130, 64, 4,201, 1, 2,133, +197,129, 3, 0, 5, 2, 1, 0,220,129, 0, 1, 73,192, 1, 3,223,192,236,127, +197,192, 3, 0,221, 0,128, 0,222, 0, 0, 0, 30, 0,128, 0, 16, 0, 0, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,108,101, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,103,101,116,110, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 5, + 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, + 0,105,116,101,109, 97,114,103, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112, 97, +105,114,115, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,117,109, 98,101,114, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 64, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,116,105, +111,110, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 5, 0, 0, 0, 0, + 0, 0, 0,105,116,101,109, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,117,115,101, +114,100, 97,116, 97, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115,117, 98,109,101, +110,117, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 77,101,110,117, 0, 0, 0, 0, + 0, 88, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, + 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, + 0, 26, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, + 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, + 0, 29, 0, 0, 0, 29, 0, 0, 0, 27, 0, 0, 0, 30, 0, 0, 0, 32, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, + 0, 33, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, + 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, + 0, 37, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 38, 0, 0, + 0, 39, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 24, 0, 0, + 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 12, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 87, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 87, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 0, 0, 0, 87, 0, 0, + 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,105,110,100,101,120, 41, + 0, 7, 0, 0, 0, 84, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111, +114, 32,108,105,109,105,116, 41, 0, 7, 0, 0, 0, 84, 0, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, 7, 0, 0, 0, + 84, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 8, 0, 0, 0, 83, 0, + 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,103,101,110,101,114, + 97,116,111,114, 41, 0, 18, 0, 0, 0, 28, 0, 0, 0, 12, 0, 0, 0, 0, 0, + 0, 0, 40,102,111,114, 32,115,116, 97,116,101, 41, 0, 18, 0, 0, 0, 28, 0, + 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32, 99,111,110,116,114, +111,108, 41, 0, 18, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, +117, 0, 19, 0, 0, 0, 26, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,118, 0, + 19, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 46, 0, 0, 0, 48, 0, 0, 0, 0, 3, 0, 7, 7, 0, 0, 0,197, 0, 0, 0, + 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,221, 0, 0, 2,222, 0, 0, 0, + 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 83,104,111, +119, 88, 89, 0, 0, 0, 0, 0, 7, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, + 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, + 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, + 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 52, + 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, + 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, + 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, + 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 4, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, + 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 20, + 0, 0, 0, 18, 0, 0, 0, 44, 0, 0, 0, 22, 0, 0, 0, 48, 0, 0, 0, 46, + 0, 0, 0, 52, 0, 0, 0, 50, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, + 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 9, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/menu_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/messagedlg.loh b/iup/srclua5/loh/messagedlg.loh new file mode 100755 index 0000000..1463b2d --- /dev/null +++ b/iup/srclua5/loh/messagedlg.loh @@ -0,0 +1,54 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/messagedlg.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/messagedlg.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 16, 0, 0, 0, 64,109,101,115, +115, 97,103,101,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, 0,132, +100, 0, 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133,100,128, 0, 0, + 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, 0, +128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 15, 0, 0, 0, + 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 11, 0, 0, 0,109,101,115,115, 97, +103,101,100,108,103, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 1, 0, 0, 0, 0, 4, 9, 0, 0, 0,102,117,110, 99,110, + 97,109,101, 0, 4, 11, 0, 0, 0, 77,101,115,115, 97,103,101, 68,108,103, 0, + 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 6, 0, 0, 0,112, +111,112,117,112, 0, 4, 8, 0, 0, 0,100,101,115,116,114,111,121, 0, 4, 14, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, + 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 3, 0, 7, 6, 0, 0, 0,197, 0, 0, + 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, + 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0,120, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 2, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 1, 0, 3, 5, + 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, 0, 0, 1, 94, 0, 0, 0, 30, + 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, 68,101,115,116,114,111,121, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, + 0, 0, 0, 22, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, + 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 11, 0, 0, 0, + 77,101,115,115, 97,103,101, 68,108,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 21, + 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 6, + 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, + 0, 18, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, + 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114, +108, 0, 8, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/messagedlg.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/messagedlg_be32.loh b/iup/srclua5/loh/messagedlg_be32.loh new file mode 100755 index 0000000..d073d9f --- /dev/null +++ b/iup/srclua5/loh/messagedlg_be32.loh @@ -0,0 +1,54 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/messagedlg_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/messagedlg_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 16, 64,109,101,115, +115, 97,103,101,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 0, 0, 0, 22, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69, +129, 0, 64, 9,130, 65, 64, 9,131, 65,192, 9, 0, 0, 0, 74,132, 0, 64, 9, + 0, 0, 0,100,132,128, 64, 9, 0, 0, 64,100,133, 0, 64, 9, 0, 0,128,100, +133,128, 64, 9, 0, 3, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 3, 64, 69, + 0, 0, 0,128, 0, 3,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 15, + 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 11,109,101,115,115, 97, +103,101,100,108,103, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116, +105,111,110, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 9,102,117,110, 99,110, + 97,109,101, 0, 4, 0, 0, 0, 11, 77,101,115,115, 97,103,101, 68,108,103, 0, + 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 6,112, +111,112,117,112, 0, 4, 0, 0, 0, 8,100,101,115,116,114,111,121, 0, 4, 0, + 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, + 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, + 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 3, 0, 7, 0, 0, 0, 6, 0, 0, 0, +197, 0, 0, 1, 0, 0,128, 1, 64, 1, 0, 1,128, 2, 0, 64,220, 0,128, 0, + 30, 0, 0, 0, 1, 4, 0, 0, 0, 6, 80,111,112,117,112, 0, 0, 0, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 3, 0, 0, 0, 7,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 2,120, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 2,121, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 1, 0, 3, 0, + 0, 0, 5, 0, 0, 0, 69, 0, 0, 0,128, 1, 0, 0, 93, 0, 0, 0, 94, 0, +128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 8, 68,101,115,116,114,111,121, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 7,104, 97,110,100, +108,101, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 20, 0, 0, 0, 22, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0,133, 0, +128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 11, + 77,101,115,115, 97,103,101, 68,108,103, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 2, 0, + 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, + 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, + 12, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, 0, 20, 0, 0, 0, + 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114, +108, 0, 0, 0, 0, 8, 0, 0, 0, 21, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/messagedlg_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/messagedlg_be64.loh b/iup/srclua5/loh/messagedlg_be64.loh new file mode 100755 index 0000000..dd1d7bf --- /dev/null +++ b/iup/srclua5/loh/messagedlg_be64.loh @@ -0,0 +1,60 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/messagedlg_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/messagedlg_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 64,109,101,115,115, 97,103,101,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, + 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, + 9, 64, 0,132,100, 0, 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133, +100,128, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, + 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,109,101,115,115, 97,103,101,100,108,103, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0, 77,101,115,115, 97,103,101, 68,108,103, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,112,111,112,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101, +115,116,114,111,121, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 3, 0, + 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, + 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, + 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, + 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, + 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, + 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, + 0, 0, 0, 22, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, + 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0, 77,101,115,115, 97,103,101, 68,108,103, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, + 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, + 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, + 0, 22, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, + 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/messagedlg_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/messagedlg_le64.loh b/iup/srclua5/loh/messagedlg_le64.loh new file mode 100755 index 0000000..78dc095 --- /dev/null +++ b/iup/srclua5/loh/messagedlg_le64.loh @@ -0,0 +1,60 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/messagedlg_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/messagedlg_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 64,109,101,115,115, 97,103,101,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, + 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, + 9, 64, 0,132,100, 0, 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133, +100,128, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, + 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,109,101,115,115, 97,103,101,100,108,103, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0, 77,101,115,115, 97,103,101, 68,108,103, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,112,111,112,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101, +115,116,114,111,121, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 3, 0, + 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, + 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, + 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, + 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, + 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, + 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, + 0, 0, 0, 22, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, + 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0, 77,101,115,115, 97,103,101, 68,108,103, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, + 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, + 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, + 0, 22, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, + 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/messagedlg_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/messagedlg_le64w.loh b/iup/srclua5/loh/messagedlg_le64w.loh new file mode 100755 index 0000000..2d0aac4 --- /dev/null +++ b/iup/srclua5/loh/messagedlg_le64w.loh @@ -0,0 +1,60 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/messagedlg_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/messagedlg_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 64,109,101,115,115, 97,103,101,100,108,103, 46,108,117, 97, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, 22, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, + 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, + 9, 64, 0,132,100, 0, 0, 0, 9, 64,128,132,100, 64, 0, 0, 9, 64, 0,133, +100,128, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, 0, + 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,109,101,115,115, 97,103,101,100,108,103, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0, 77,101,115,115, 97,103,101, 68,108,103, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,112,111,112,117,112, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,100,101, +115,116,114,111,121, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 3, 0, + 7, 6, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, + 1,220, 64, 0, 2, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 80,111,112,117,112, 0, 0, 0, 0, 0, 6, 0, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, + 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,120, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, + 0, 0, 0, 0, 1, 0, 3, 5, 0, 0, 0, 69, 0, 0, 0,128, 0, 0, 0, 93, + 0, 0, 1, 94, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0, 68,101,115,116,114,111,121, 0, 0, 0, 0, 0, 5, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, + 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, + 0, 0, 0, 22, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, + 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0, 77,101,115,115, 97,103,101, 68,108,103, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, + 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, + 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, + 0, 22, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, + 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, + 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/messagedlg_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/multiline.loh b/iup/srclua5/loh/multiline.loh new file mode 100755 index 0000000..6792602 --- /dev/null +++ b/iup/srclua5/loh/multiline.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/multiline.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/multiline.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 15, 0, 0, 0, 64,109,117,108, +116,105,108,105,110,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9, +128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, + 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, + 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 10, 0, + 0, 0,109,117,108,116,105,108,105,110,101, 0, 4, 7, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 45, 0, 4, 9, 0, + 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 97, 99,116,105, +111,110, 0, 4, 3, 0, 0, 0,110,115, 0, 4, 9, 0, 0, 0,102,117,110, 99, +110, 97,109,101, 0, 4, 10, 0, 0, 0, 77,117,108,116,105, 76,105,110,101, 0, + 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, + 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, + 10, 0, 0, 0, 77,117,108,116,105, 76,105,110,101, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, + 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, + 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, + 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/multiline.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/multiline_be32.loh b/iup/srclua5/loh/multiline_be32.loh new file mode 100755 index 0000000..7c106df --- /dev/null +++ b/iup/srclua5/loh/multiline_be32.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/multiline_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/multiline_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 15, 64,109,117,108, +116,105,108,105,110,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 0, 0, 0, 19, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, + 0, 64, 9,130, 65, 64, 9, 0, 0, 64, 74,131,194, 0, 73,131, 0, 64, 9,132, +194,128, 9, 0, 0, 0,100,133,128, 64, 9, 0, 3, 0, 69, 0, 0, 0,128, 1, + 0, 64, 92, 0, 3, 64, 69, 0, 0, 0,128, 0, 3,128,193, 1,128, 64, 92, 0, +128, 0, 30, 0, 0, 0, 15, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, + 0, 10,109,117,108,116,105,108,105,110,101, 0, 4, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, + 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 2, 45, 0, 4, 0, 0, + 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 7, 97, 99,116,105, +111,110, 0, 4, 0, 0, 0, 3,110,115, 0, 4, 0, 0, 0, 9,102,117,110, 99, +110, 97,109,101, 0, 4, 0, 0, 0, 10, 77,117,108,116,105, 76,105,110,101, 0, + 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 2, 0, 3, 0, 0, 0, 4, 0, + 0, 0,133, 0,128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, + 0, 0, 0, 10, 77,117,108,116,105, 76,105,110,101, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, + 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, + 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 9, 0, 0, 0, + 18, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/multiline_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/multiline_be64.loh b/iup/srclua5/loh/multiline_be64.loh new file mode 100755 index 0000000..c386eb2 --- /dev/null +++ b/iup/srclua5/loh/multiline_be64.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/multiline_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/multiline_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64,109,117,108,116,105,108,105,110,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, + 64, 0,131, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, + 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, + 64,128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +110,105, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,109,117,108,116,105,108, +105,110,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, + 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99,110, 97,109,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 77,117, +108,116,105, 76,105,110,101, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, + 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, + 0,128, 0, 1, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 77,117,108,116, +105, 76,105,110,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, + 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, + 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/multiline_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/multiline_le64.loh b/iup/srclua5/loh/multiline_le64.loh new file mode 100755 index 0000000..cbae6db --- /dev/null +++ b/iup/srclua5/loh/multiline_le64.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/multiline_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/multiline_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64,109,117,108,116,105,108,105,110,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, + 64, 0,131, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, + 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, + 64,128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +110,105, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,109,117,108,116,105,108, +105,110,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, + 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99,110, 97,109,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 77,117, +108,116,105, 76,105,110,101, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, + 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, + 0,128, 0, 1, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 77,117,108,116, +105, 76,105,110,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, + 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, + 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/multiline_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/multiline_le64w.loh b/iup/srclua5/loh/multiline_le64w.loh new file mode 100755 index 0000000..8c729f6 --- /dev/null +++ b/iup/srclua5/loh/multiline_le64w.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/multiline_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/multiline_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64,109,117,108,116,105,108,105,110,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, + 64, 0,131, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, + 0, 0, 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, + 64,128, 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, +110,105, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,109,117,108,116,105,108, +105,110,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, + 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99,110, 97,109,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 77,117, +108,116,105, 76,105,110,101, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, + 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, + 0,128, 0, 1, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 77,117,108,116, +105, 76,105,110,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 15, 0, + 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, + 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, + 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/multiline_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/normalizer.loh b/iup/srclua5/loh/normalizer.loh new file mode 100755 index 0000000..1e757fc --- /dev/null +++ b/iup/srclua5/loh/normalizer.loh @@ -0,0 +1,63 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/normalizer.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/normalizer.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 16, 0, 0, 0, 64,110,111,114, +109, 97,108,105,122,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, + 9, 64,128,131,100, 64, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, + 92, 64, 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, + 30, 0,128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 11, + 0, 0, 0,110,111,114,109, 97,108,105,122,101,114, 0, 4, 7, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 45, 0, 4, + 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0,115,101, +116, 65,116,116,114,105, 98,117,116,101,115, 0, 4, 14, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32, +119,105,100,103,101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 21, + 0, 0, 0, 0, 2, 0, 10, 23, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 1, + 65, 0, 0,156,128,128, 1,212, 0,128, 0, 1,129, 0, 0, 64, 1,128, 1,129, +129, 0, 0, 32,129, 1,128, 5,194, 0, 0, 70,194,129, 0, 28,130, 0, 1, 23, + 0, 65, 4, 22, 64, 0,128, 6,194,129, 0, 9, 0,130,130, 31,193,253,127, 5, +129, 1, 0, 6,193, 65, 2, 64, 1, 0, 0,128, 1,128, 0, 28, 65,128, 1, 30, + 0,128, 0, 8, 0, 0, 0, 4, 7, 0, 0, 0,114, 97,119,103,101,116, 0, 4, + 7, 0, 0, 0,104, 97,110,100,108,101, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 4, 12, 0, 0, 0,105,117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 11, 0, 0, 0, 97,100, +100, 99,111,110,116,114,111,108, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, + 0, 4, 14, 0, 0, 0,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, + 0, 0, 0, 0, 23, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 15, 0, 0, 0, 20, 0, 0, 0, + 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, + 8, 0, 0, 0, 7, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 22, + 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 22, 0, 0, 0, 7, + 0, 0, 0,104, 97,110,100,108,101, 0, 4, 0, 0, 0, 22, 0, 0, 0, 2, 0, + 0, 0,110, 0, 5, 0, 0, 0, 22, 0, 0, 0, 12, 0, 0, 0, 40,102,111,114, + 32,105,110,100,101,120, 41, 0, 8, 0, 0, 0, 17, 0, 0, 0, 12, 0, 0, 0, + 40,102,111,114, 32,108,105,109,105,116, 41, 0, 8, 0, 0, 0, 17, 0, 0, 0, + 11, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, 8, 0, 0, 0, 17, + 0, 0, 0, 2, 0, 0, 0,105, 0, 9, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, + 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, + 0, 4, 11, 0, 0, 0, 78,111,114,109, 97,108,105,122,101,114, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 19, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 21, 0, 0, 0, 12, + 0, 0, 0, 25, 0, 0, 0, 23, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, + 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/normalizer.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/normalizer_be32.loh b/iup/srclua5/loh/normalizer_be32.loh new file mode 100755 index 0000000..ecdb222 --- /dev/null +++ b/iup/srclua5/loh/normalizer_be32.loh @@ -0,0 +1,63 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/normalizer_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/normalizer_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 16, 64,110,111,114, +109, 97,108,105,122,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 0, 0, 0, 19, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69, +129, 0, 64, 9,130, 65, 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100, +131,128, 64, 9, 0, 0, 64,100,132, 0, 64, 9, 0, 2, 64, 69, 0, 0, 0,128, + 1, 0, 64, 92, 0, 2,128, 69, 0, 0, 0,128, 0, 2,192,193, 1,128, 64, 92, + 0,128, 0, 30, 0, 0, 0, 12, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, + 0, 0, 11,110,111,114,109, 97,108,105,122,101,114, 0, 4, 0, 0, 0, 7,112, + 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, + 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 2, 45, 0, 4, + 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 14,115,101, +116, 65,116,116,114,105, 98,117,116,101,115, 0, 4, 0, 0, 0, 14, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32, +119,105,100,103,101,116, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 12, 0, + 0, 0, 21, 0, 2, 0, 10, 0, 0, 0, 23, 0, 0, 0,133, 0, 0, 0,192, 0, + 0, 65, 1, 1,128,128,156, 0,128, 0,212, 0, 0,129, 1, 1,128, 1, 64, 0, + 0,129,129,128, 1,129, 32, 0, 0,194, 5, 0,129,194, 70, 1, 0,130, 28, 4, + 65, 0, 23,128, 0, 64, 22, 0,129,194, 6,130,130, 0, 9,127,253,193, 31, 0, + 1,129, 5, 2, 65,193, 6, 0, 0, 1, 64, 0,128, 1,128, 1,128, 65, 28, 0, +128, 0, 30, 0, 0, 0, 8, 4, 0, 0, 0, 7,114, 97,119,103,101,116, 0, 4, + 0, 0, 0, 7,104, 97,110,100,108,101, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 12,105,117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 0, 0, + 0, 11,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 0, 0, 0, 11, 97,100, +100, 99,111,110,116,114,111,108, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, + 0, 4, 0, 0, 0, 14,115,101,116, 65,116,116,114,105, 98,117,116,101,115, 0, + 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 15, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, + 0, 0, 0, 8, 0, 0, 0, 7,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, 0, + 0, 0, 22, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, + 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 4, 0, 0, 0, 22, 0, 0, + 0, 2,110, 0, 0, 0, 0, 5, 0, 0, 0, 22, 0, 0, 0, 12, 40,102,111,114, + 32,105,110,100,101,120, 41, 0, 0, 0, 0, 8, 0, 0, 0, 17, 0, 0, 0, 12, + 40,102,111,114, 32,108,105,109,105,116, 41, 0, 0, 0, 0, 8, 0, 0, 0, 17, + 0, 0, 0, 11, 40,102,111,114, 32,115,116,101,112, 41, 0, 0, 0, 0, 8, 0, + 0, 0, 17, 0, 0, 0, 2,105, 0, 0, 0, 0, 9, 0, 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 2, 0, 3, 0, 0, 0, + 4, 0, 0, 0,133, 0,128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, + 1, 4, 0, 0, 0, 11, 78,111,114,109, 97,108,105,122,101,114, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, + 25, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 21, 0, + 0, 0, 12, 0, 0, 0, 25, 0, 0, 0, 23, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, + 0, 0, 28, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 7, + 0, 0, 0, 18, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/normalizer_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/normalizer_be64.loh b/iup/srclua5/loh/normalizer_be64.loh new file mode 100755 index 0000000..2b0a199 --- /dev/null +++ b/iup/srclua5/loh/normalizer_be64.loh @@ -0,0 +1,70 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/normalizer_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/normalizer_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 64,110,111,114,109, 97,108,105,122,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, + 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,131,100, 64, 0, 0, 9, 64, 0,132, 69, 64, 2, 0, +128, 0, 0, 0, 92, 64, 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, + 92, 64,128, 1, 30, 0,128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,105, 99,107, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,110,111,114,109, 97, +108,105,122,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115,101,116, 65,116,116, +114,105, 98,117,116,101,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 21, 0, 0, 0, 0, + 2, 0, 10, 23, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 1, 65, 0, 0,156, +128,128, 1,212, 0,128, 0, 1,129, 0, 0, 64, 1,128, 1,129,129, 0, 0, 32, +129, 1,128, 5,194, 0, 0, 70,194,129, 0, 28,130, 0, 1, 23, 0, 65, 4, 22, + 64, 0,128, 6,194,129, 0, 9, 0,130,130, 31,193,253,127, 5,129, 1, 0, 6, +193, 65, 2, 64, 1, 0, 0,128, 1,128, 0, 28, 65,128, 1, 30, 0,128, 0, 8, + 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97,119,103,101,116, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 3, 0, 0, 0, 0, + 0, 0,240, 63, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97, +110,100,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 97,100,100, 99,111,110, +116,114,111,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115,101,116, 65,116,116,114,105, 98,117, +116,101,115, 0, 0, 0, 0, 0, 23, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 15, 0, 0, 0, + 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, + 21, 0, 0, 0, 8, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, + 99,116, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 22, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, + 97,110,100,108,101, 0, 4, 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0,110, 0, 5, 0, 0, 0, 22, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 40,102,111,114, 32,105,110,100,101,120, 41, 0, 8, 0, 0, 0, 17, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,108,105,109,105,116, 41, 0, + 8, 0, 0, 0, 17, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, + 32,115,116,101,112, 41, 0, 8, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0,105, 0, 9, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, + 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 78,111,114,109, 97,108,105,122,101,114, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, + 0, 25, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97, +115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, + 0, 0, 0, 9, 0, 0, 0, 21, 0, 0, 0, 12, 0, 0, 0, 25, 0, 0, 0, 23, + 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 1, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/normalizer_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/normalizer_le64.loh b/iup/srclua5/loh/normalizer_le64.loh new file mode 100755 index 0000000..cfaf13a --- /dev/null +++ b/iup/srclua5/loh/normalizer_le64.loh @@ -0,0 +1,70 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/normalizer_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/normalizer_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 64,110,111,114,109, 97,108,105,122,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, + 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,131,100, 64, 0, 0, 9, 64, 0,132, 69, 64, 2, 0, +128, 0, 0, 0, 92, 64, 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, + 92, 64,128, 1, 30, 0,128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,105, 99,107, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,110,111,114,109, 97, +108,105,122,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115,101,116, 65,116,116, +114,105, 98,117,116,101,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 21, 0, 0, 0, 0, + 2, 0, 10, 23, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 1, 65, 0, 0,156, +128,128, 1,212, 0,128, 0, 1,129, 0, 0, 64, 1,128, 1,129,129, 0, 0, 32, +129, 1,128, 5,194, 0, 0, 70,194,129, 0, 28,130, 0, 1, 23, 0, 65, 4, 22, + 64, 0,128, 6,194,129, 0, 9, 0,130,130, 31,193,253,127, 5,129, 1, 0, 6, +193, 65, 2, 64, 1, 0, 0,128, 1,128, 0, 28, 65,128, 1, 30, 0,128, 0, 8, + 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,114, 97,119,103,101,116, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 3, 0, 0, 0, 0, + 0, 0,240, 63, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, 97, +110,100,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 97,100,100, 99,111,110, +116,114,111,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115,101,116, 65,116,116,114,105, 98,117, +116,101,115, 0, 0, 0, 0, 0, 23, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 15, 0, 0, 0, + 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, + 21, 0, 0, 0, 8, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, + 99,116, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 22, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, + 97,110,100,108,101, 0, 4, 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0,110, 0, 5, 0, 0, 0, 22, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 40,102,111,114, 32,105,110,100,101,120, 41, 0, 8, 0, 0, 0, 17, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,108,105,109,105,116, 41, 0, + 8, 0, 0, 0, 17, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, + 32,115,116,101,112, 41, 0, 8, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0,105, 0, 9, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, + 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 78,111,114,109, 97,108,105,122,101,114, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, + 0, 25, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97, +115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, + 0, 0, 0, 9, 0, 0, 0, 21, 0, 0, 0, 12, 0, 0, 0, 25, 0, 0, 0, 23, + 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, + 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 1, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/normalizer_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/normalizer_le64w.loh b/iup/srclua5/loh/normalizer_le64w.loh new file mode 100755 index 0000000..e89daa2 --- /dev/null +++ b/iup/srclua5/loh/normalizer_le64w.loh @@ -0,0 +1,72 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/normalizer_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/normalizer_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 64,110,111,114,109, 97,108,105,122,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, + 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,131,100, 64, 0, 0, 9, 64, 0,132, 69, 64, 2, 0, +128, 0, 0, 0, 92, 64, 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, + 92, 64,128, 1, 30, 0,128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,105, 99,107, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,110,111,114,109, 97, +108,105,122,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115,101,116, 65,116,116, +114,105, 98,117,116,101,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 21, 0, 0, 0, 0, + 2, 0, 10, 26, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 1, 65, 0, 0,156, +128,128, 1,197,128, 0, 0,198,192,192, 1, 0, 1,128, 0,220,128, 0, 1, 1, + 1, 1, 0, 64, 1,128, 1,129, 1, 1, 0, 32,129, 1,128, 5, 66, 1, 0, 70, +194,129, 0, 28,130, 0, 1, 23,128, 65, 4, 22, 64, 0,128, 6,194,129, 0, 9, + 0,130,131, 31,193,253,127, 5, 1, 2, 0, 6, 65, 66, 2, 64, 1, 0, 0,128, + 1,128, 0, 28, 65,128, 1, 30, 0,128, 0, 10, 0, 0, 0, 4, 7, 0, 0, 0, + 0, 0, 0, 0,114, 97,119,103,101,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, +104, 97,110,100,108,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,108, +101, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,103,101,116,110, 0, 3, 0, 0, 0, + 0, 0, 0,240, 63, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 71,101,116, + 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,104, + 97,110,100,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 97,100,100, 99,111, +110,116,114,111,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, + 84, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115,101,116, 65,116,116,114,105, 98, +117,116,101,115, 0, 0, 0, 0, 0, 26, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, + 0, 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 15, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 8, 0, 0, + 0, 7, 0, 0, 0, 0, 0, 0, 0,111, 98,106,101, 99,116, 0, 0, 0, 0, 0, + 25, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, + 25, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 4, + 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 8, 0, 0, + 0, 25, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,105,110, +100,101,120, 41, 0, 11, 0, 0, 0, 20, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, + 0, 40,102,111,114, 32,108,105,109,105,116, 41, 0, 11, 0, 0, 0, 20, 0, 0, + 0, 11, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,115,116,101,112, 41, 0, + 11, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 12, 0, + 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, + 0, 0, 25, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0, +128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0, 78,111,114,109, 97,108,105,122,101,114, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 2, 0, + 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, + 21, 0, 0, 0, 12, 0, 0, 0, 25, 0, 0, 0, 23, 0, 0, 0, 27, 0, 0, 0, + 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, + 28, 0, 0, 0, 28, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/normalizer_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/olecontrol.loh b/iup/srclua5/loh/olecontrol.loh new file mode 100755 index 0000000..474d668 --- /dev/null +++ b/iup/srclua5/loh/olecontrol.loh @@ -0,0 +1,79 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluaole51/olecontrol.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluaole51/olecontrol.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 16, 0, 0, 0, 64,111,108,101, + 99,111,110,116,114,111,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 22, 0, 0, 0, 10,192, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, 0,132, + 9,128,194,132, 9, 0,195,133,100, 0, 0, 0, 9, 64,128,134,100, 64, 0, 0, + 9, 64, 0,135, 69,192, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 0, 4, 0, +128, 0, 0, 0,193, 64, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 18, 0, 0, 0, + 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 11, 0, 0, 0,111,108,101, 99,111, +110,116,114,111,108, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0,115, 0, 4, 9, 0, 0, 0,102,117,110, 99, +110, 97,109,101, 0, 4, 11, 0, 0, 0, 79,108,101, 67,111,110,116,114,111,108, + 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, +105,110, 99,108,117,100,101, 0, 4, 9, 0, 0, 0,105,117,112,111,108,101, 46, +104, 0, 4, 10, 0, 0, 0,101,120,116,114, 97, 99,111,100,101, 0, 4,164, 1, + 0, 0, 32, 10,105,110,116, 32,105,117,112,111,108,101,108,117, 97, 95,111,112, +101,110, 40,108,117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, + 32,105,102, 32, 40,105,117,112,108,117, 97, 95,111,112,101,110, 99, 97,108,108, + 95,105,110,116,101,114,110, 97,108, 40, 76, 41, 41, 10, 32, 32, 32, 32, 73,117, +112, 79,108,101, 67,111,110,116,114,111,108, 79,112,101,110, 40, 41, 59, 10, 32, + 32, 32, 32, 10, 32, 32,105,117,112,108,117, 97, 95, 99,104, 97,110,103,101, 69, +110,118, 40, 76, 41, 59, 10, 32, 32,105,117,112,111,108,101, 99,111,110,116,114, +111,108,108,117, 97, 95,111,112,101,110, 40, 76, 41, 59, 10, 32, 32,105,117,112, +108,117, 97, 95,114,101,116,117,114,110, 69,110,118, 40, 76, 41, 59, 10, 32, 32, +114,101,116,117,114,110, 32, 48, 59, 10,125, 10, 10, 47, 42, 32,111, 98,108,105, +103, 97,116,111,114,121, 32,116,111, 32,117,115,101, 32,114,101,113,117,105,114, +101, 34,105,117,112,108,117, 97,111,108,101, 34, 32, 42, 47, 10,105,110,116, 32, +108,117, 97,111,112,101,110, 95,105,117,112,108,117, 97,111,108,101, 40,108,117, + 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, 32,114,101,116,117, +114,110, 32,105,117,112,111,108,101,108,117, 97, 95,111,112,101,110, 40, 76, 41, + 59, 10,125, 10, 10, 47, 42, 32,111, 98,108,105,103, 97,116,111,114,121, 32,116, +111, 32,117,115,101, 32,114,101,113,117,105,114,101, 34,105,117,112,108,117, 97, +111,108,101, 53, 49, 34, 32, 42, 47, 10,105,110,116, 32,108,117, 97,111,112,101, +110, 95,105,117,112,108,117, 97,111,108,101, 53, 49, 40,108,117, 97, 95, 83,116, + 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, 32,114,101,116,117,114,110, 32,105, +117,112,111,108,101,108,117, 97, 95,111,112,101,110, 40, 76, 41, 59, 10,125, 10, + 10, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 13, 0, 0, 0, 67,114,101, 97,116,101, 76,117, 97, 67, 79, 77, 0, 4, + 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 38, 0, 0, 0, 40, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, + 0, 0, 0, 4, 11, 0, 0, 0, 79,108,101, 67,111,110,116,114,111,108, 0, 3, + 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 39, 0, 0, 0, + 39, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 40, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 42, 0, 0, 0, 51, 0, 0, 0, 0, 1, 0, 5, 15, 0, 0, 0, 69, 0, + 0, 0, 90, 0, 0, 0, 22,128, 2,128, 70, 64, 64, 0, 90, 0, 0, 0, 22,192, + 1,128,133, 0, 0, 0,134,192, 64, 1,197, 0, 0, 0,198, 0,193, 1, 0, 1, +128, 0,220, 0, 0, 1,156,128, 0, 0, 9,128, 0,129, 30, 0,128, 0, 5, 0, + 0, 0, 4, 7, 0, 0, 0,108,117, 97, 99,111,109, 0, 4, 9, 0, 0, 0,105, +117,110,107,110,111,119,110, 0, 4, 4, 0, 0, 0, 99,111,109, 0, 4, 13, 0, + 0, 0, 67,114,101, 97,116,101, 76,117, 97, 67, 79, 77, 0, 4, 15, 0, 0, 0, + 73,109,112,111,114,116, 73, 85,110,107,110,111,119,110, 0, 0, 0, 0, 0, 15, + 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, 0, 47, + 0, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, + 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 51, + 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, + 0, 0, 14, 0, 0, 0, 5, 0, 0, 0,112,117,110,107, 0, 4, 0, 0, 0, 14, + 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, + 0, 0, 0, 10, 0, 0, 0, 35, 0, 0, 0, 40, 0, 0, 0, 38, 0, 0, 0, 51, + 0, 0, 0, 42, 0, 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 54, + 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 10, 0, 0, 0, 21, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluaole51/olecontrol.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/olecontrol_be64.loh b/iup/srclua5/loh/olecontrol_be64.loh new file mode 100755 index 0000000..6599d53 --- /dev/null +++ b/iup/srclua5/loh/olecontrol_be64.loh @@ -0,0 +1,85 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluaole51/olecontrol_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iupluaole51/olecontrol_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 64,111,108,101, 99,111,110,116,114,111,108, 46,108,117, 97, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, 22, 0, 0, 0, 10,192, 1, 0, 9, 64, 64,128, + 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, + 9, 64, 0,132, 9,128,194,132, 9, 0,195,133,100, 0, 0, 0, 9, 64,128,134, +100, 64, 0, 0, 9, 64, 0,135, 69,192, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69, 0, 4, 0,128, 0, 0, 0,193, 64, 4, 0, 92, 64,128, 1, 30, 0,128, 0, + 18, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 11, + 0, 0, 0, 0, 0, 0, 0,111,108,101, 99,111,110,116,114,111,108, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109,101, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0, 79,108,101, 67,111,110,116,114,111,108, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0,105,117,112,111,108,101, 46,104, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,101, +120,116,114, 97, 99,111,100,101, 0, 4,164, 1, 0, 0, 0, 0, 0, 0, 32, 10, +105,110,116, 32,105,117,112,111,108,101,108,117, 97, 95,111,112,101,110, 40,108, +117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, 32,105,102, 32, + 40,105,117,112,108,117, 97, 95,111,112,101,110, 99, 97,108,108, 95,105,110,116, +101,114,110, 97,108, 40, 76, 41, 41, 10, 32, 32, 32, 32, 73,117,112, 79,108,101, + 67,111,110,116,114,111,108, 79,112,101,110, 40, 41, 59, 10, 32, 32, 32, 32, 10, + 32, 32,105,117,112,108,117, 97, 95, 99,104, 97,110,103,101, 69,110,118, 40, 76, + 41, 59, 10, 32, 32,105,117,112,111,108,101, 99,111,110,116,114,111,108,108,117, + 97, 95,111,112,101,110, 40, 76, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95, +114,101,116,117,114,110, 69,110,118, 40, 76, 41, 59, 10, 32, 32,114,101,116,117, +114,110, 32, 48, 59, 10,125, 10, 10, 47, 42, 32,111, 98,108,105,103, 97,116,111, +114,121, 32,116,111, 32,117,115,101, 32,114,101,113,117,105,114,101, 34,105,117, +112,108,117, 97,111,108,101, 34, 32, 42, 47, 10,105,110,116, 32,108,117, 97,111, +112,101,110, 95,105,117,112,108,117, 97,111,108,101, 40,108,117, 97, 95, 83,116, + 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, 32,114,101,116,117,114,110, 32,105, +117,112,111,108,101,108,117, 97, 95,111,112,101,110, 40, 76, 41, 59, 10,125, 10, + 10, 47, 42, 32,111, 98,108,105,103, 97,116,111,114,121, 32,116,111, 32,117,115, +101, 32,114,101,113,117,105,114,101, 34,105,117,112,108,117, 97,111,108,101, 53, + 49, 34, 32, 42, 47, 10,105,110,116, 32,108,117, 97,111,112,101,110, 95,105,117, +112,108,117, 97,111,108,101, 53, 49, 40,108,117, 97, 95, 83,116, 97,116,101, 42, + 32, 76, 41, 10,123, 10, 32, 32,114,101,116,117,114,110, 32,105,117,112,111,108, +101,108,117, 97, 95,111,112,101,110, 40, 76, 41, 59, 10,125, 10, 10, 0, 4, 14, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, 76,117, 97, 67, + 79, 77, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 38, 0, 0, 0, 40, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, + 0, 0, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 79,108,101, 67,111,110,116,114, +111,108, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, + 39, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 39, 0, 0, 0, 40, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, + 0, 0, 51, 0, 0, 0, 0, 1, 0, 5, 15, 0, 0, 0, 69, 0, 0, 0, 90, 0, + 0, 0, 22,128, 2,128, 70, 64, 64, 0, 90, 0, 0, 0, 22,192, 1,128,133, 0, + 0, 0,134,192, 64, 1,197, 0, 0, 0,198, 0,193, 1, 0, 1,128, 0,220, 0, + 0, 1,156,128, 0, 0, 9,128, 0,129, 30, 0,128, 0, 5, 0, 0, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,108,117, 97, 99,111,109, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0,105,117,110,107,110,111,119,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 99,111,109, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, + 76,117, 97, 67, 79, 77, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, 73,109,112,111, +114,116, 73, 85,110,107,110,111,119,110, 0, 0, 0, 0, 0, 15, 0, 0, 0, 45, + 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, 0, 47, 0, 0, 0, 47, + 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, + 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 51, 0, 0, 0, 2, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, + 0, 0, 14, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,112,117,110,107, 0, 4, + 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, + 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 35, 0, 0, 0, 40, 0, 0, 0, 38, + 0, 0, 0, 51, 0, 0, 0, 42, 0, 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 53, + 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 10, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluaole51/olecontrol_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/olecontrol_le64w.loh b/iup/srclua5/loh/olecontrol_le64w.loh new file mode 100755 index 0000000..a8ec614 --- /dev/null +++ b/iup/srclua5/loh/olecontrol_le64w.loh @@ -0,0 +1,80 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluaole51/olecontrol_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluaole51/olecontrol_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 64,111,108,101, 99,111,110,116,114,111,108, 46,108,117, 97, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, 20, 0, 0, 0, 10,192, 1, 0, 9, 64, 64,128, + 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, + 9, 64, 0,132, 9,128,194,132, 9, 0,195,133,100, 0, 0, 0, 9, 64,128,134, + 69,128, 3, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 3, 0,128, 0, 0, 0, +193, 0, 4, 0, 92, 64,128, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,111, +108,101, 99,111,110,116,114,111,108, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, + 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99,110, 97,109,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 79,108, +101, 67,111,110,116,114,111,108, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97, +108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108, +117,100,101, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,105,117,112,111,108,101, 46, +104, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97, 99,111,100,101, + 0, 4,164, 1, 0, 0, 0, 0, 0, 0, 32, 10,105,110,116, 32,105,117,112,111, +108,101,108,117, 97, 95,111,112,101,110, 40,108,117, 97, 95, 83,116, 97,116,101, + 42, 32, 76, 41, 10,123, 10, 32, 32,105,102, 32, 40,105,117,112,108,117, 97, 95, +111,112,101,110, 99, 97,108,108, 95,105,110,116,101,114,110, 97,108, 40, 76, 41, + 41, 10, 32, 32, 32, 32, 73,117,112, 79,108,101, 67,111,110,116,114,111,108, 79, +112,101,110, 40, 41, 59, 10, 32, 32, 32, 32, 10, 32, 32,105,117,112,108,117, 97, + 95, 99,104, 97,110,103,101, 69,110,118, 40, 76, 41, 59, 10, 32, 32,105,117,112, +111,108,101, 99,111,110,116,114,111,108,108,117, 97, 95,111,112,101,110, 40, 76, + 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95,114,101,116,117,114,110, 69,110, +118, 40, 76, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 48, 59, 10,125, 10, + 10, 47, 42, 32,111, 98,108,105,103, 97,116,111,114,121, 32,116,111, 32,117,115, +101, 32,114,101,113,117,105,114,101, 34,105,117,112,108,117, 97,111,108,101, 34, + 32, 42, 47, 10,105,110,116, 32,108,117, 97,111,112,101,110, 95,105,117,112,108, +117, 97,111,108,101, 40,108,117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, 10, +123, 10, 32, 32,114,101,116,117,114,110, 32,105,117,112,111,108,101,108,117, 97, + 95,111,112,101,110, 40, 76, 41, 59, 10,125, 10, 10, 47, 42, 32,111, 98,108,105, +103, 97,116,111,114,121, 32,116,111, 32,117,115,101, 32,114,101,113,117,105,114, +101, 34,105,117,112,108,117, 97,111,108,101, 53, 49, 34, 32, 42, 47, 10,105,110, +116, 32,108,117, 97,111,112,101,110, 95,105,117,112,108,117, 97,111,108,101, 53, + 49, 40,108,117, 97, 95, 83,116, 97,116,101, 42, 32, 76, 41, 10,123, 10, 32, 32, +114,101,116,117,114,110, 32,105,117,112,111,108,101,108,117, 97, 95,111,112,101, +110, 40, 76, 41, 59, 10,125, 10, 10, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, + 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 51, 0, 0, + 0, 0, 2, 0, 7, 19, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,156,128, 0, + 1,197,128, 0, 0,218, 0, 0, 0, 22,128, 2,128,198,192, 64, 1,218, 0, 0, + 0, 22,192, 1,128, 5,129, 0, 0, 6, 65, 65, 2, 69,129, 0, 0, 70,129,193, + 2,128, 1,128, 1, 92, 1, 0, 1, 28,129, 0, 0,137, 0, 1,130,158, 0, 0, + 1, 30, 0,128, 0, 7, 0, 0, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 79,108, +101, 67,111,110,116,114,111,108, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 7, + 0, 0, 0, 0, 0, 0, 0,108,117, 97, 99,111,109, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0,105,117,110,107,110,111,119,110, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 99,111,109, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 77, 97,107,101, 76,117, + 97, 67, 79, 77, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 77, 97,107,101, 73, 85, +110,107,110,111,119,110, 0, 0, 0, 0, 0, 19, 0, 0, 0, 39, 0, 0, 0, 39, + 0, 0, 0, 39, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, + 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, + 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, + 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 99,116,108, 0, 3, 0, 0, 0, 18, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0,112,117,110,107, 0, 7, 0, 0, 0, 17, 0, 0, 0, 0, 0, + 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 10, 0, + 0, 0, 35, 0, 0, 0, 51, 0, 0, 0, 38, 0, 0, 0, 53, 0, 0, 0, 53, 0, + 0, 0, 53, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, + 0, 0, 54, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116, +114,108, 0, 10, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluaole51/olecontrol_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/pplot.loh b/iup/srclua5/loh/pplot.loh new file mode 100755 index 0000000..34e0b43 --- /dev/null +++ b/iup/srclua5/loh/pplot.loh @@ -0,0 +1,58 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua_pplot51/pplot.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua_pplot51/pplot.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 11, 0, 0, 0, 64,112,112,108, +111,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 31, + 0, 0, 0, 10,192, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, + 64, 65,130, 9,192, 65,131, 74,192, 2, 0, 73,128,194,132, 73, 64,193,133, 73, + 64, 65,134, 73,128,195,134, 73,128,195,135, 73, 64, 68,136, 73, 64, 65,137, 73, + 64,193,137, 73, 64, 69,138, 73, 64, 65,139, 73, 64,193,139, 9, 64, 0,132, 9, + 64, 70,140, 9,192, 70,141,100, 0, 0, 0, 9, 64, 0,142, 69, 64, 7, 0,128, + 0, 0, 0, 92, 64, 0, 1, 69,128, 7, 0,128, 0, 0, 0,193,192, 7, 0, 92, + 64,128, 1, 30, 0,128, 0, 32, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, + 0, 4, 6, 0, 0, 0,112,112,108,111,116, 0, 4, 7, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 4, 9, 0, 0, + 0,102,117,110, 99,110, 97,109,101, 0, 4, 6, 0, 0, 0, 80, 80,108,111,116, + 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, +115,101,108,101, 99,116, 95, 99, 98, 0, 4, 6, 0, 0, 0,110,110,102,102,110, + 0, 4, 15, 0, 0, 0,115,101,108,101, 99,116, 98,101,103,105,110, 95, 99, 98, + 0, 4, 13, 0, 0, 0,115,101,108,101, 99,116,101,110,100, 95, 99, 98, 0, 4, + 11, 0, 0, 0,112,114,101,100,114, 97,119, 95, 99, 98, 0, 4, 2, 0, 0, 0, +110, 0, 4, 12, 0, 0, 0,112,111,115,116,100,114, 97,119, 95, 99, 98, 0, 4, + 8, 0, 0, 0,101,100,105,116, 95, 99, 98, 0, 4, 7, 0, 0, 0,110,110,102, +102,102,102, 0, 4, 13, 0, 0, 0,101,100,105,116, 98,101,103,105,110, 95, 99, + 98, 0, 4, 11, 0, 0, 0,101,100,105,116,101,110,100, 95, 99, 98, 0, 4, 10, + 0, 0, 0,100,101,108,101,116,101, 95, 99, 98, 0, 4, 5, 0, 0, 0,110,110, +102,102, 0, 4, 15, 0, 0, 0,100,101,108,101,116,101, 98,101,103,105,110, 95, + 99, 98, 0, 4, 13, 0, 0, 0,100,101,108,101,116,101,101,110,100, 95, 99, 98, + 0, 4, 8, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 12, 0, 0, 0,105, +117,112, 95,112,112,108,111,116, 46,104, 0, 4, 11, 0, 0, 0,101,120,116,114, + 97,102,117,110, 99,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 14, 0, 0, + 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 26, + 0, 0, 0, 28, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, + 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, + 6, 0, 0, 0, 80, 80,108,111,116, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111, +110, 0, 0, 0, 0, 0, 5, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, + 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, + 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, + 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 21, 0, 0, 0, 30, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua_pplot51/pplot.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/pplot_be32.loh b/iup/srclua5/loh/pplot_be32.loh new file mode 100755 index 0000000..bee507d --- /dev/null +++ b/iup/srclua5/loh/pplot_be32.loh @@ -0,0 +1,58 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua_pplot51/pplot_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua_pplot51/pplot_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 11, 64,112,112,108, +111,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, + 0, 0, 31, 0, 1,192, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, + 65, 64, 9,131, 65,192, 9, 0, 2,192, 74,132,194,128, 73,133,193, 64, 73,134, + 65, 64, 73,134,195,128, 73,135,195,128, 73,136, 68, 64, 73,137, 65, 64, 73,137, +193, 64, 73,138, 69, 64, 73,139, 65, 64, 73,139,193, 64, 73,132, 0, 64, 9,140, + 70, 64, 9,141, 70,192, 9, 0, 0, 0,100,142, 0, 64, 9, 0, 7, 64, 69, 0, + 0, 0,128, 1, 0, 64, 92, 0, 7,128, 69, 0, 0, 0,128, 0, 7,192,193, 1, +128, 64, 92, 0,128, 0, 30, 0, 0, 0, 32, 4, 0, 0, 0, 5,110,105, 99,107, + 0, 4, 0, 0, 0, 6,112,112,108,111,116, 0, 4, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, + 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, + 9,102,117,110, 99,110, 97,109,101, 0, 4, 0, 0, 0, 6, 80, 80,108,111,116, + 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 10, +115,101,108,101, 99,116, 95, 99, 98, 0, 4, 0, 0, 0, 6,110,110,102,102,110, + 0, 4, 0, 0, 0, 15,115,101,108,101, 99,116, 98,101,103,105,110, 95, 99, 98, + 0, 4, 0, 0, 0, 13,115,101,108,101, 99,116,101,110,100, 95, 99, 98, 0, 4, + 0, 0, 0, 11,112,114,101,100,114, 97,119, 95, 99, 98, 0, 4, 0, 0, 0, 2, +110, 0, 4, 0, 0, 0, 12,112,111,115,116,100,114, 97,119, 95, 99, 98, 0, 4, + 0, 0, 0, 8,101,100,105,116, 95, 99, 98, 0, 4, 0, 0, 0, 7,110,110,102, +102,102,102, 0, 4, 0, 0, 0, 13,101,100,105,116, 98,101,103,105,110, 95, 99, + 98, 0, 4, 0, 0, 0, 11,101,100,105,116,101,110,100, 95, 99, 98, 0, 4, 0, + 0, 0, 10,100,101,108,101,116,101, 95, 99, 98, 0, 4, 0, 0, 0, 5,110,110, +102,102, 0, 4, 0, 0, 0, 15,100,101,108,101,116,101, 98,101,103,105,110, 95, + 99, 98, 0, 4, 0, 0, 0, 13,100,101,108,101,116,101,101,110,100, 95, 99, 98, + 0, 4, 0, 0, 0, 8,105,110, 99,108,117,100,101, 0, 4, 0, 0, 0, 12,105, +117,112, 95,112,112,108,111,116, 46,104, 0, 4, 0, 0, 0, 11,101,120,116,114, + 97,102,117,110, 99,115, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, + 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11, +105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 26, 0, 0, 0, 28, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0, +192, 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 2, 4, + 0, 0, 0, 6, 80, 80,108,111,116, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111, +110, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, + 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, + 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 4, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, + 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, + 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 18, + 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, + 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, + 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, + 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 21, 0, 0, 0, + 30, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua_pplot51/pplot_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/pplot_be64.loh b/iup/srclua5/loh/pplot_be64.loh new file mode 100755 index 0000000..ff71da6 --- /dev/null +++ b/iup/srclua5/loh/pplot_be64.loh @@ -0,0 +1,65 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua_pplot51/pplot_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua_pplot51/pplot_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,112,112,108,111,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 31, 0, 0, 0, 10,192, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74,192, 2, 0, 73,128,194,132, 73, + 64,193,133, 73, 64, 65,134, 73,128,195,134, 73,128,195,135, 73, 64, 68,136, 73, + 64, 65,137, 73, 64,193,137, 73, 64, 69,138, 73, 64, 65,139, 73, 64,193,139, 9, + 64, 0,132, 9, 64, 70,140, 9,192, 70,141,100, 0, 0, 0, 9, 64, 0,142, 69, + 64, 7, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, 7, 0,128, 0, 0, 0,193, +192, 7, 0, 92, 64,128, 1, 30, 0,128, 0, 32, 0, 0, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,112, +108,111,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109, +101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80, 80,108,111,116, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, + 0, 0, 0, 0,115,101,108,101, 99,116, 95, 99, 98, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,110,110,102,102,110, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,115,101, +108,101, 99,116, 98,101,103,105,110, 95, 99, 98, 0, 4, 13, 0, 0, 0, 0, 0, + 0, 0,115,101,108,101, 99,116,101,110,100, 95, 99, 98, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,112,114,101,100,114, 97,119, 95, 99, 98, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0,110, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,112,111,115,116,100, +114, 97,119, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,101,100,105,116, + 95, 99, 98, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,110,102,102,102,102, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,101,100,105,116, 98,101,103,105,110, 95, 99, + 98, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,101,100,105,116,101,110,100, 95, 99, + 98, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,100,101,108,101,116,101, 95, 99, 98, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,110,102,102, 0, 4, 15, 0, 0, 0, + 0, 0, 0, 0,100,101,108,101,116,101, 98,101,103,105,110, 95, 99, 98, 0, 4, + 13, 0, 0, 0, 0, 0, 0, 0,100,101,108,101,116,101,101,110,100, 95, 99, 98, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 95,112,112,108,111,116, 46,104, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97,102,117,110, 99,115, 0, 3, + 0, 0, 0, 0, 0, 0,240, 63, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, + 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, + 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, + 80, 80,108,111,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111, +110, 0, 0, 0, 0, 0, 5, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 31, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, + 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, + 22, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, + 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 99,116,114,108, 0, 21, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua_pplot51/pplot_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/pplot_le64.loh b/iup/srclua5/loh/pplot_le64.loh new file mode 100755 index 0000000..cb64601 --- /dev/null +++ b/iup/srclua5/loh/pplot_le64.loh @@ -0,0 +1,65 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua_pplot51/pplot_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua_pplot51/pplot_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,112,112,108,111,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 31, 0, 0, 0, 10,192, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74,192, 2, 0, 73,128,194,132, 73, + 64,193,133, 73, 64, 65,134, 73,128,195,134, 73,128,195,135, 73, 64, 68,136, 73, + 64, 65,137, 73, 64,193,137, 73, 64, 69,138, 73, 64, 65,139, 73, 64,193,139, 9, + 64, 0,132, 9, 64, 70,140, 9,192, 70,141,100, 0, 0, 0, 9, 64, 0,142, 69, + 64, 7, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, 7, 0,128, 0, 0, 0,193, +192, 7, 0, 92, 64,128, 1, 30, 0,128, 0, 32, 0, 0, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,112, +108,111,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109, +101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80, 80,108,111,116, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, + 0, 0, 0, 0,115,101,108,101, 99,116, 95, 99, 98, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,110,110,102,102,110, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,115,101, +108,101, 99,116, 98,101,103,105,110, 95, 99, 98, 0, 4, 13, 0, 0, 0, 0, 0, + 0, 0,115,101,108,101, 99,116,101,110,100, 95, 99, 98, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,112,114,101,100,114, 97,119, 95, 99, 98, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0,110, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,112,111,115,116,100, +114, 97,119, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,101,100,105,116, + 95, 99, 98, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,110,102,102,102,102, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,101,100,105,116, 98,101,103,105,110, 95, 99, + 98, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,101,100,105,116,101,110,100, 95, 99, + 98, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,100,101,108,101,116,101, 95, 99, 98, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,110,102,102, 0, 4, 15, 0, 0, 0, + 0, 0, 0, 0,100,101,108,101,116,101, 98,101,103,105,110, 95, 99, 98, 0, 4, + 13, 0, 0, 0, 0, 0, 0, 0,100,101,108,101,116,101,101,110,100, 95, 99, 98, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 95,112,112,108,111,116, 46,104, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97,102,117,110, 99,115, 0, 3, + 0, 0, 0, 0, 0, 0,240, 63, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, + 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, + 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, + 80, 80,108,111,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111, +110, 0, 0, 0, 0, 0, 5, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 31, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, + 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, + 22, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, + 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 99,116,114,108, 0, 21, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua_pplot51/pplot_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/pplot_le64w.loh b/iup/srclua5/loh/pplot_le64w.loh new file mode 100755 index 0000000..28248bf --- /dev/null +++ b/iup/srclua5/loh/pplot_le64w.loh @@ -0,0 +1,65 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua_pplot51/pplot_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua_pplot51/pplot_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,112,112,108,111,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 31, 0, 0, 0, 10,192, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74,192, 2, 0, 73,128,194,132, 73, + 64,193,133, 73, 64, 65,134, 73,128,195,134, 73,128,195,135, 73, 64, 68,136, 73, + 64, 65,137, 73, 64,193,137, 73, 64, 69,138, 73, 64, 65,139, 73, 64,193,139, 9, + 64, 0,132, 9, 64, 70,140, 9,192, 70,141,100, 0, 0, 0, 9, 64, 0,142, 69, + 64, 7, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, 7, 0,128, 0, 0, 0,193, +192, 7, 0, 92, 64,128, 1, 30, 0,128, 0, 32, 0, 0, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,112,112, +108,111,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109, +101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 80, 80,108,111,116, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, + 0, 0, 0, 0,115,101,108,101, 99,116, 95, 99, 98, 0, 4, 6, 0, 0, 0, 0, + 0, 0, 0,110,110,102,102,110, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,115,101, +108,101, 99,116, 98,101,103,105,110, 95, 99, 98, 0, 4, 13, 0, 0, 0, 0, 0, + 0, 0,115,101,108,101, 99,116,101,110,100, 95, 99, 98, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,112,114,101,100,114, 97,119, 95, 99, 98, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 0,110, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,112,111,115,116,100, +114, 97,119, 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,101,100,105,116, + 95, 99, 98, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,110,110,102,102,102,102, 0, + 4, 13, 0, 0, 0, 0, 0, 0, 0,101,100,105,116, 98,101,103,105,110, 95, 99, + 98, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,101,100,105,116,101,110,100, 95, 99, + 98, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,100,101,108,101,116,101, 95, 99, 98, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,110,102,102, 0, 4, 15, 0, 0, 0, + 0, 0, 0, 0,100,101,108,101,116,101, 98,101,103,105,110, 95, 99, 98, 0, 4, + 13, 0, 0, 0, 0, 0, 0, 0,100,101,108,101,116,101,101,110,100, 95, 99, 98, + 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 95,112,112,108,111,116, 46,104, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97,102,117,110, 99,115, 0, 3, + 0, 0, 0, 0, 0, 0,240, 63, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, + 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, + 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, + 80, 80,108,111,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, 99,116,105,111, +110, 0, 0, 0, 0, 0, 5, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 31, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, + 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, + 22, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, + 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 99,116,114,108, 0, 21, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua_pplot51/pplot_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/progressbar.loh b/iup/srclua5/loh/progressbar.loh new file mode 100755 index 0000000..038ecb6 --- /dev/null +++ b/iup/srclua5/loh/progressbar.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/progressbar.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/progressbar.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 17, 0, 0, 0, 64,112,114,111, +103,114,101,115,115, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 18, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, 0, 9, 64, 0, +132,100, 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, + 1, 69,192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, + 0, 13, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 12, 0, 0, 0, +112,114,111,103,114,101,115,115, 98, 97,114, 0, 4, 7, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 4, 9, 0, 0, + 0,102,117,110, 99,110, 97,109,101, 0, 4, 12, 0, 0, 0, 80,114,111,103,114, +101,115,115, 66, 97,114, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103, +101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0, +133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, + 4, 12, 0, 0, 0, 80,114,111,103,114,101,115,115, 66, 97,114, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, + 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/progressbar.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/progressbar_be32.loh b/iup/srclua5/loh/progressbar_be32.loh new file mode 100755 index 0000000..f97d3cd --- /dev/null +++ b/iup/srclua5/loh/progressbar_be32.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/progressbar_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/progressbar_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 17, 64,112,114,111, +103,114,101,115,115, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 0, 0, 0, 18, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, + 69,129, 0, 64, 9,130, 65, 64, 9,131, 65,192, 9, 0, 0, 0, 74,132, 0, 64, + 9, 0, 0, 0,100,132,128, 64, 9, 0, 2,128, 69, 0, 0, 0,128, 1, 0, 64, + 92, 0, 2,192, 69, 0, 0, 0,128, 0, 3, 0,193, 1,128, 64, 92, 0,128, 0, + 30, 0, 0, 0, 13, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 12, +112,114,111,103,114,101,115,115, 98, 97,114, 0, 4, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, + 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, + 9,102,117,110, 99,110, 97,109,101, 0, 4, 0, 0, 0, 12, 80,114,111,103,114, +101,115,115, 66, 97,114, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103, +101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 2, 0, 3, 0, 0, 0, 4, + 0, 0, 0,133, 0,128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, + 4, 0, 0, 0, 12, 80,114,111,103,114,101,115,115, 66, 97,114, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, + 14, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, + 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 8, 0, 0, 0, 17, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/progressbar_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/progressbar_be64.loh b/iup/srclua5/loh/progressbar_be64.loh new file mode 100755 index 0000000..fab0e2d --- /dev/null +++ b/iup/srclua5/loh/progressbar_be64.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/progressbar_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/progressbar_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 64,112,114,111,103,114,101,115,115, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 4, 18, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64, +128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, + 0, 9, 64, 0,132,100, 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, + 0, 92, 64, 0, 1, 69,192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, + 1, 30, 0,128, 0, 13, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, + 99,107, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,112,114,111,103,114,101,115,115, + 98, 97,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109, +101, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111,103,114,101,115,115, 66, + 97,114, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0, +133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, + 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111,103,114,101,115,115, 66, 97,114, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 14, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97, +115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, + 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/progressbar_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/progressbar_le64.loh b/iup/srclua5/loh/progressbar_le64.loh new file mode 100755 index 0000000..f0bcaae --- /dev/null +++ b/iup/srclua5/loh/progressbar_le64.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/progressbar_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/progressbar_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 64,112,114,111,103,114,101,115,115, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 4, 18, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64, +128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, + 0, 9, 64, 0,132,100, 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, + 0, 92, 64, 0, 1, 69,192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, + 1, 30, 0,128, 0, 13, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, + 99,107, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,112,114,111,103,114,101,115,115, + 98, 97,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109, +101, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111,103,114,101,115,115, 66, + 97,114, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0, +133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, + 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111,103,114,101,115,115, 66, 97,114, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 14, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97, +115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, + 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/progressbar_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/progressbar_le64w.loh b/iup/srclua5/loh/progressbar_le64w.loh new file mode 100755 index 0000000..4c44c14 --- /dev/null +++ b/iup/srclua5/loh/progressbar_le64w.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/progressbar_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/progressbar_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 64,112,114,111,103,114,101,115,115, 98, 97,114, 46,108,117, 97, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 4, 18, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64, +128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 9,192, 65,131, 74, 0, 0, + 0, 9, 64, 0,132,100, 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, + 0, 92, 64, 0, 1, 69,192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, + 1, 30, 0,128, 0, 13, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, + 99,107, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,112,114,111,103,114,101,115,115, + 98, 97,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,102,117,110, 99,110, 97,109, +101, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111,103,114,101,115,115, 66, + 97,114, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0, +133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, + 4, 12, 0, 0, 0, 0, 0, 0, 0, 80,114,111,103,114,101,115,115, 66, 97,114, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 14, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97, +115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97, +114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, + 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/progressbar_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/radio.loh b/iup/srclua5/loh/radio.loh new file mode 100755 index 0000000..3a77edf --- /dev/null +++ b/iup/srclua5/loh/radio.loh @@ -0,0 +1,64 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/radio.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/radio.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 11, 0, 0, 0, 64,114, 97,100, +105,111, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 21, + 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, + 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 0, 0, 0, 0, 9, + 64,128,131,100, 64, 0, 0, 0, 0, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, + 0, 0, 0, 92, 64, 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, + 64,128, 1, 30, 0,128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, + 0, 4, 6, 0, 0, 0,114, 97,100,105,111, 0, 4, 7, 0, 0, 0,112, 97,114, +101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0,105, 0, 4, 9, 0, + 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 20, 0, 0, 0, 67,114,101, 97, +116,101, 67,104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 4, 14, 0, 0, + 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, 11, + 0, 0, 0, 25, 0, 0, 0, 1, 1, 0, 4, 31, 0, 0, 0, 26, 0, 0, 0, 22, +192, 6,128, 70, 0, 64, 0, 70, 0,192, 0,133, 64, 0, 0, 23,128,128, 0, 22, +128, 2,128, 65,128, 0, 0,134, 64, 0, 0,154, 0, 0, 0, 22,128, 4,128,132, + 0, 0, 0,134,192, 64, 1,198, 64, 0, 0,156, 64, 0, 1, 76,128,192, 0, 22, +128,253,127, 22,192, 2,128, 70, 0, 64, 0,133, 0, 1, 0, 23,128,128, 0, 22, + 0, 1,128, 68, 0, 0, 0, 70,192,192, 0,134,128, 64, 0, 92, 64, 0, 1, 22, +128, 0,128, 69, 64, 1, 0,128, 0, 0, 0, 92, 64, 0, 1, 30, 0,128, 0, 6, + 0, 0, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, + 66, 79, 88, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 20, 0, 0, 0, 67,114, +101, 97,116,101, 67,104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 4, 9, + 0, 0, 0, 73, 85, 80, 70, 82, 65, 77, 69, 0, 4, 16, 0, 0, 0,105,104, 97, +110,100,108,101, 95,115,101,116,110, 97,109,101, 0, 0, 0, 0, 0, 31, 0, 0, + 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, + 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, + 0, 25, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0,111, 98,106, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 2, 0, 0, 0,105, 0, 8, 0, 0, 0, 17, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 0, 0, 0, 0, 27, 0, 0, 0, + 30, 0, 0, 0, 1, 2, 0, 4, 9, 0, 0, 0,132, 0, 0, 0,134, 0, 64, 1, +198, 64,192, 0,156, 64, 0, 1,133,128, 0, 0,198, 64,192, 0,157, 0, 0, 1, +158, 0, 0, 0, 30, 0,128, 0, 3, 0, 0, 0, 4, 20, 0, 0, 0, 67,114,101, + 97,116,101, 67,104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 3, 0, 0, + 0, 0, 0, 0,240, 63, 4, 6, 0, 0, 0, 82, 97,100,105,111, 0, 0, 0, 0, + 0, 9, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, + 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 30, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 8, + 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 8, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 21, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 8, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 11, 0, 0, 0, 30, 0, 0, 0, + 30, 0, 0, 0, 27, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, + 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 20, 0, 0, + 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/radio.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/radio_be32.loh b/iup/srclua5/loh/radio_be32.loh new file mode 100755 index 0000000..5e063f0 --- /dev/null +++ b/iup/srclua5/loh/radio_be32.loh @@ -0,0 +1,64 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/radio_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/radio_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 11, 64,114, 97,100, +105,111, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, + 0, 0, 21, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, + 65, 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100, 0, 0, 0, 0,131, +128, 64, 9, 0, 0, 64,100, 0, 0, 0, 0,132, 0, 64, 9, 0, 2, 64, 69, 0, + 0, 0,128, 1, 0, 64, 92, 0, 2,128, 69, 0, 0, 0,128, 0, 2,192,193, 1, +128, 64, 92, 0,128, 0, 30, 0, 0, 0, 12, 4, 0, 0, 0, 5,110,105, 99,107, + 0, 4, 0, 0, 0, 6,114, 97,100,105,111, 0, 4, 0, 0, 0, 7,112, 97,114, +101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, + 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 2,105, 0, 4, 0, 0, + 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 20, 67,114,101, 97, +116,101, 67,104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 4, 0, 0, 0, + 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, + 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11, +105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0, 11, 0, 0, 0, 25, 1, 1, 0, 4, 0, 0, 0, 31, 0, 0, 0, 26,128, + 6,192, 22, 0, 64, 0, 70, 0,192, 0, 70, 0, 0, 64,133, 0,128,128, 23,128, + 2,128, 22, 0, 0,128, 65, 0, 0, 64,134, 0, 0, 0,154,128, 4,128, 22, 0, + 0, 0,132, 1, 64,192,134, 0, 0, 64,198, 1, 0, 64,156, 0,192,128, 76,127, +253,128, 22,128, 2,192, 22, 0, 64, 0, 70, 0, 1, 0,133, 0,128,128, 23,128, + 1, 0, 22, 0, 0, 0, 68, 0,192,192, 70, 0, 64,128,134, 1, 0, 64, 92,128, + 0,128, 22, 0, 1, 64, 69, 0, 0, 0,128, 1, 0, 64, 92, 0,128, 0, 30, 0, + 0, 0, 6, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 4, + 66, 79, 88, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 20, 67,114, +101, 97,116,101, 67,104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 4, 0, + 0, 0, 9, 73, 85, 80, 70, 82, 65, 77, 69, 0, 4, 0, 0, 0, 16,105,104, 97, +110,100,108,101, 95,115,101,116,110, 97,109,101, 0, 0, 0, 0, 0, 0, 0, 0, + 31, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, + 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, + 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, + 22, 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, 0, 4,111, 98,106, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 0, 0, 0, 2,105, 0, 0, 0, 0, 8, 0, 0, 0, 17, 0, + 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 0, 0, 0, 0, 27, + 0, 0, 0, 30, 1, 2, 0, 4, 0, 0, 0, 9, 0, 0, 0,132, 1, 64, 0,134, + 0,192, 64,198, 1, 0, 64,156, 0, 0,128,133, 0,192, 64,198, 1, 0, 0,157, + 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 20, 67,114,101, + 97,116,101, 67,104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 3, 63,240, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 6, 82, 97,100,105,111, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, + 28, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, + 30, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, + 0, 0, 8, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, + 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 21, 0, 0, 0, 4, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, + 0, 0, 0, 8, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 11, 0, 0, 0, 30, + 0, 0, 0, 30, 0, 0, 0, 27, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, + 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 7, 0, 0, 0, + 20, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/radio_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/radio_be64.loh b/iup/srclua5/loh/radio_be64.loh new file mode 100755 index 0000000..f84561b --- /dev/null +++ b/iup/srclua5/loh/radio_be64.loh @@ -0,0 +1,70 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/radio_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/radio_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,114, 97,100,105,111, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 21, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 0, + 0, 0, 0, 9, 64,128,131,100, 64, 0, 0, 0, 0, 0, 0, 9, 64, 0,132, 69, + 64, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, 2, 0,128, 0, 0, 0,193, +192, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,114, 97, +100,105,111, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, + 0, 0, 0,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, 67,104, +105,108,100,114,101,110, 78, 97,109,101,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103, +101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 25, + 0, 0, 0, 1, 1, 0, 4, 31, 0, 0, 0, 26, 0, 0, 0, 22,192, 6,128, 70, + 0, 64, 0, 70, 0,192, 0,133, 64, 0, 0, 23,128,128, 0, 22,128, 2,128, 65, +128, 0, 0,134, 64, 0, 0,154, 0, 0, 0, 22,128, 4,128,132, 0, 0, 0,134, +192, 64, 1,198, 64, 0, 0,156, 64, 0, 1, 76,128,192, 0, 22,128,253,127, 22, +192, 2,128, 70, 0, 64, 0,133, 0, 1, 0, 23,128,128, 0, 22, 0, 1,128, 68, + 0, 0, 0, 70,192,192, 0,134,128, 64, 0, 92, 64, 0, 1, 22,128, 0,128, 69, + 64, 1, 0,128, 0, 0, 0, 92, 64, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, + 0, 0, 0, 0, 66, 79, 88, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 20, 0, + 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 73, 85, 80, 70, 82, + 65, 77, 69, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, + 95,115,101,116,110, 97,109,101, 0, 0, 0, 0, 0, 31, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, + 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 25, 0, 0, + 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,111, 98,106, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 8, 0, 0, 0, 17, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 30, 0, 0, 0, 1, 2, 0, 4, + 9, 0, 0, 0,132, 0, 0, 0,134, 0, 64, 1,198, 64,192, 0,156, 64, 0, 1, +133,128, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 3, 0, 0, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, 67, +104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 3, 0, 0, 0, 0, 0, 0, +240, 63, 4, 6, 0, 0, 0, 0, 0, 0, 0, 82, 97,100,105,111, 0, 0, 0, 0, + 0, 9, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, + 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 30, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99, +116,114,108, 0, 21, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, + 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 11, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 27, 0, 0, 0, + 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, + 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, + 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/radio_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/radio_le64.loh b/iup/srclua5/loh/radio_le64.loh new file mode 100755 index 0000000..daf1502 --- /dev/null +++ b/iup/srclua5/loh/radio_le64.loh @@ -0,0 +1,70 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/radio_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/radio_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,114, 97,100,105,111, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 21, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 0, + 0, 0, 0, 9, 64,128,131,100, 64, 0, 0, 0, 0, 0, 0, 9, 64, 0,132, 69, + 64, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, 2, 0,128, 0, 0, 0,193, +192, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,114, 97, +100,105,111, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, + 0, 0, 0,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, 67,104, +105,108,100,114,101,110, 78, 97,109,101,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103, +101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 25, + 0, 0, 0, 1, 1, 0, 4, 31, 0, 0, 0, 26, 0, 0, 0, 22,192, 6,128, 70, + 0, 64, 0, 70, 0,192, 0,133, 64, 0, 0, 23,128,128, 0, 22,128, 2,128, 65, +128, 0, 0,134, 64, 0, 0,154, 0, 0, 0, 22,128, 4,128,132, 0, 0, 0,134, +192, 64, 1,198, 64, 0, 0,156, 64, 0, 1, 76,128,192, 0, 22,128,253,127, 22, +192, 2,128, 70, 0, 64, 0,133, 0, 1, 0, 23,128,128, 0, 22, 0, 1,128, 68, + 0, 0, 0, 70,192,192, 0,134,128, 64, 0, 92, 64, 0, 1, 22,128, 0,128, 69, + 64, 1, 0,128, 0, 0, 0, 92, 64, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, + 0, 0, 0, 0, 66, 79, 88, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 20, 0, + 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 73, 85, 80, 70, 82, + 65, 77, 69, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, + 95,115,101,116,110, 97,109,101, 0, 0, 0, 0, 0, 31, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, + 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 25, 0, 0, + 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,111, 98,106, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 8, 0, 0, 0, 17, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 30, 0, 0, 0, 1, 2, 0, 4, + 9, 0, 0, 0,132, 0, 0, 0,134, 0, 64, 1,198, 64,192, 0,156, 64, 0, 1, +133,128, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 3, 0, 0, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, 67, +104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 3, 0, 0, 0, 0, 0, 0, +240, 63, 4, 6, 0, 0, 0, 0, 0, 0, 0, 82, 97,100,105,111, 0, 0, 0, 0, + 0, 9, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, + 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 30, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99, +116,114,108, 0, 21, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, + 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 11, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 27, 0, 0, 0, + 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, + 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, + 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/radio_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/radio_le64w.loh b/iup/srclua5/loh/radio_le64w.loh new file mode 100755 index 0000000..5ada88f --- /dev/null +++ b/iup/srclua5/loh/radio_le64w.loh @@ -0,0 +1,70 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/radio_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/radio_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,114, 97,100,105,111, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 21, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 0, + 0, 0, 0, 9, 64,128,131,100, 64, 0, 0, 0, 0, 0, 0, 9, 64, 0,132, 69, + 64, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, 2, 0,128, 0, 0, 0,193, +192, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,114, 97, +100,105,111, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, + 0, 0, 0,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, 67,104, +105,108,100,114,101,110, 78, 97,109,101,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103, +101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 25, + 0, 0, 0, 1, 1, 0, 4, 31, 0, 0, 0, 26, 0, 0, 0, 22,192, 6,128, 70, + 0, 64, 0, 70, 0,192, 0,133, 64, 0, 0, 23,128,128, 0, 22,128, 2,128, 65, +128, 0, 0,134, 64, 0, 0,154, 0, 0, 0, 22,128, 4,128,132, 0, 0, 0,134, +192, 64, 1,198, 64, 0, 0,156, 64, 0, 1, 76,128,192, 0, 22,128,253,127, 22, +192, 2,128, 70, 0, 64, 0,133, 0, 1, 0, 23,128,128, 0, 22, 0, 1,128, 68, + 0, 0, 0, 70,192,192, 0,134,128, 64, 0, 92, 64, 0, 1, 22,128, 0,128, 69, + 64, 1, 0,128, 0, 0, 0, 92, 64, 0, 1, 30, 0,128, 0, 6, 0, 0, 0, 4, + 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, + 0, 0, 0, 0, 66, 79, 88, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 20, 0, + 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, 67,104,105,108,100,114,101,110, + 78, 97,109,101,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 73, 85, 80, 70, 82, + 65, 77, 69, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, + 95,115,101,116,110, 97,109,101, 0, 0, 0, 0, 0, 31, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, + 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 22, 0, 0, 0, 25, 0, 0, + 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,111, 98,106, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 8, 0, 0, 0, 17, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 30, 0, 0, 0, 1, 2, 0, 4, + 9, 0, 0, 0,132, 0, 0, 0,134, 0, 64, 1,198, 64,192, 0,156, 64, 0, 1, +133,128, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 3, 0, 0, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 67,114,101, 97,116,101, 67, +104,105,108,100,114,101,110, 78, 97,109,101,115, 0, 3, 0, 0, 0, 0, 0, 0, +240, 63, 4, 6, 0, 0, 0, 0, 0, 0, 0, 82, 97,100,105,111, 0, 0, 0, 0, + 0, 9, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, + 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 30, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99, +116,114,108, 0, 21, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, + 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 11, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 27, 0, 0, 0, + 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, + 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, + 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/radio_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/sbox.loh b/iup/srclua5/loh/sbox.loh new file mode 100755 index 0000000..250c754 --- /dev/null +++ b/iup/srclua5/loh/sbox.loh @@ -0,0 +1,37 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/sbox.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/sbox.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,115, 98,111, +120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 17, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,131, 69, 0, + 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, 0, 0,193,128, + 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0,115, 98,111,120, 0, 4, 7, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0,105, 0, 4, + 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 99,114, +101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, + 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, + 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, + 13, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, +157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 5, 0, 0, + 0, 83, 98,111,120, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, + 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, + 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, + 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/sbox.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/sbox_be32.loh b/iup/srclua5/loh/sbox_be32.loh new file mode 100755 index 0000000..6ab085b --- /dev/null +++ b/iup/srclua5/loh/sbox_be32.loh @@ -0,0 +1,37 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/sbox_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/sbox_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,115, 98,111, +120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 17, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131,128, 64, 9, 0, 2, + 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2, 64, 69, 0, 0, 0,128, 0, 2, +128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 11, 4, 0, 0, 0, 5,110, +105, 99,107, 0, 4, 0, 0, 0, 5,115, 98,111,120, 0, 4, 0, 0, 0, 7,112, + 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, + 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 2,105, 0, 4, + 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 14, 99,114, +101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, + 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, + 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 11, + 0, 0, 0, 13, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0,192, 64,198, + 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, + 5, 83, 98,111,120, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, + 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, + 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, + 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 7, 0, 0, 0, 16, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/sbox_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/sbox_be64.loh b/iup/srclua5/loh/sbox_be64.loh new file mode 100755 index 0000000..0acf695 --- /dev/null +++ b/iup/srclua5/loh/sbox_be64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/sbox_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/sbox_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,115, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, + 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,115, 98,111,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, + 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, + 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, 4, + 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, + 30, 0,128, 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 83, 98,111, +120, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 12, + 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, + 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, + 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, + 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/sbox_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/sbox_le64.loh b/iup/srclua5/loh/sbox_le64.loh new file mode 100755 index 0000000..88cb639 --- /dev/null +++ b/iup/srclua5/loh/sbox_le64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/sbox_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/sbox_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,115, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, + 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,115, 98,111,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, + 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, + 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, 4, + 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, + 30, 0,128, 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 83, 98,111, +120, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 12, + 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, + 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, + 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, + 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/sbox_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/sbox_le64w.loh b/iup/srclua5/loh/sbox_le64w.loh new file mode 100755 index 0000000..440c7f2 --- /dev/null +++ b/iup/srclua5/loh/sbox_le64w.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/sbox_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/sbox_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,115, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, + 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,115, 98,111,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, + 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, + 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, 4, + 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, + 30, 0,128, 0, 2, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 83, 98,111, +120, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 12, + 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, + 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, + 0, 13, 0, 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, + 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, + 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/sbox_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/separator.loh b/iup/srclua5/loh/separator.loh new file mode 100755 index 0000000..d27e0d7 --- /dev/null +++ b/iup/srclua5/loh/separator.loh @@ -0,0 +1,36 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/separator.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/separator.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 15, 0, 0, 0, 64,115,101,112, + 97,114, 97,116,111,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, + 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, + 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, + 5, 0, 0, 0,110,105, 99,107, 0, 4, 10, 0, 0, 0,115,101,112, 97,114, 97, +116,111,114, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, + 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, + 0, 4, 10, 0, 0, 0, 83,101,112, 97,114, 97,116,111,114, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, + 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/separator.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/separator_be32.loh b/iup/srclua5/loh/separator_be32.loh new file mode 100755 index 0000000..d262bf7 --- /dev/null +++ b/iup/srclua5/loh/separator_be32.loh @@ -0,0 +1,36 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/separator_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/separator_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 15, 64,115,101,112, + 97,114, 97,116,111,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 0, 0, 0, 17, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, + 0, 64, 9,130, 65, 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131, +128, 64, 9, 0, 2, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2, 64, 69, 0, + 0, 0,128, 0, 2,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 11, 4, + 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 10,115,101,112, 97,114, 97, +116,111,114, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, + 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111, +110, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, + 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 2, 0, 3, 0, 0, 0, + 4, 0, 0, 0,133, 0,128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, + 1, 4, 0, 0, 0, 10, 83,101,112, 97,114, 97,116,111,114, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, + 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, + 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, + 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, + 0, 5, 99,116,114,108, 0, 0, 0, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/separator_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/separator_be64.loh b/iup/srclua5/loh/separator_be64.loh new file mode 100755 index 0000000..5d4eb22 --- /dev/null +++ b/iup/srclua5/loh/separator_be64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/separator_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/separator_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64,115,101,112, 97,114, 97,116,111,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, + 0, 0, 0, 9, 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, + 64, 2, 0,128, 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0,115,101,112, 97,114, 97,116,111,114, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, + 0, 13, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, + 0, 0, 83,101,112, 97,114, 97,116,111,114, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, + 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/separator_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/separator_le64.loh b/iup/srclua5/loh/separator_le64.loh new file mode 100755 index 0000000..53aa721 --- /dev/null +++ b/iup/srclua5/loh/separator_le64.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/separator_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/separator_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64,115,101,112, 97,114, 97,116,111,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, + 0, 0, 0, 9, 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, + 64, 2, 0,128, 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0,115,101,112, 97,114, 97,116,111,114, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, + 0, 13, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, + 0, 0, 83,101,112, 97,114, 97,116,111,114, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, + 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/separator_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/separator_le64w.loh b/iup/srclua5/loh/separator_le64w.loh new file mode 100755 index 0000000..c0f7c76 --- /dev/null +++ b/iup/srclua5/loh/separator_le64w.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/separator_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/separator_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 64,115,101,112, 97,114, 97,116,111,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69, +192, 0, 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, + 0, 0, 0, 9, 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, + 64, 2, 0,128, 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0,115,101,112, 97,114, 97,116,111,114, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, + 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100, +103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67, +108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, + 0, 13, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, + 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 10, 0, 0, 0, 0, 0, + 0, 0, 83,101,112, 97,114, 97,116,111,114, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, + 0, 0, 11, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/separator_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/spin.loh b/iup/srclua5/loh/spin.loh new file mode 100755 index 0000000..1a19ff2 --- /dev/null +++ b/iup/srclua5/loh/spin.loh @@ -0,0 +1,38 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/spin.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/spin.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,115,112,105, +110, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 18, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 2, 0,128, 0, + 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, 0, 0, 4, 5, + 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0,115,112,105,110, 0, 4, 7, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, + 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, + 0, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, + 0,115,112,105,110, 95, 99, 98, 0, 4, 2, 0, 0, 0,110, 0, 4, 14, 0, 0, + 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 13, + 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, + 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, + 5, 0, 0, 0, 83,112,105,110, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, + 0, 14, 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97, +115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, + 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, + 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/spin.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/spin_be32.loh b/iup/srclua5/loh/spin_be32.loh new file mode 100755 index 0000000..345cb29 --- /dev/null +++ b/iup/srclua5/loh/spin_be32.loh @@ -0,0 +1,38 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/spin_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/spin_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,115,112,105, +110, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 18, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0, 64, 74,131,194, 0, 73,131, 0, 64, 9, 0, 0, 0,100,132,128, + 64, 9, 0, 2,128, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2,192, 69, 0, 0, + 0,128, 0, 3, 0,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 13, 4, 0, + 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 5,115,112,105,110, 0, 4, 0, + 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, + 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, + 1, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, + 8,115,112,105,110, 95, 99, 98, 0, 4, 0, 0, 0, 2,110, 0, 4, 0, 0, 0, + 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18, +105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, + 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11, +105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 13, 0, 0, 0, 15, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0, +192, 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 2, 4, + 0, 0, 0, 5, 83,112,105,110, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, + 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97, +115,115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, + 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, + 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, + 0, 0, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/spin_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/spin_be64.loh b/iup/srclua5/loh/spin_be64.loh new file mode 100755 index 0000000..7980327 --- /dev/null +++ b/iup/srclua5/loh/spin_be64.loh @@ -0,0 +1,42 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/spin_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/spin_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131,100, 0, + 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, + 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0,115,112,105,110, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, + 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, + 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115,112,105, +110, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, 14, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87, +105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101, +116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32, +119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, + 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, + 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0, 83,112,105,110, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 97, 99,116,105,111,110, 0, 0, 0, 0, 0, 5, 0, 0, 0, 14, 0, 0, + 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, + 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/spin_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/spin_le64.loh b/iup/srclua5/loh/spin_le64.loh new file mode 100755 index 0000000..e171149 --- /dev/null +++ b/iup/srclua5/loh/spin_le64.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/spin_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/spin_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128, +194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,115,112,105,110, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, 0, 0, 0, + 0,115,112,105,110, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0,105,117,112,115,112,105,110, 46,104, 0, 4, 14, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87, +105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101, +116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32, +119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, + 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, + 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0, 83,112,105,110, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 97, 99,116,105,111,110, 0, 0, 0, 0, 0, 5, 0, 0, 0, 15, 0, 0, + 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, + 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99, +116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/spin_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/spin_le64w.loh b/iup/srclua5/loh/spin_le64w.loh new file mode 100755 index 0000000..eb5820d --- /dev/null +++ b/iup/srclua5/loh/spin_le64w.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/spin_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/spin_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,115,112,105,110, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128, +194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,115,112,105,110, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 8, 0, 0, 0, 0, 0, 0, + 0,115,112,105,110, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, + 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100,101, 0, 4, 10, 0, + 0, 0, 0, 0, 0, 0,105,117,112,115,112,105,110, 46,104, 0, 4, 14, 0, 0, + 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87, +105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101, +116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32, +119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, + 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, + 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0, 83,112,105,110, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 97, 99,116,105,111,110, 0, 0, 0, 0, 0, 5, 0, 0, 0, 15, 0, 0, + 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, + 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, 0, 0, 18, + 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99, +116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/spin_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/spinbox.loh b/iup/srclua5/loh/spinbox.loh new file mode 100755 index 0000000..b8c060d --- /dev/null +++ b/iup/srclua5/loh/spinbox.loh @@ -0,0 +1,38 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/spinbox.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/spinbox.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 13, 0, 0, 0, 64,115,112,105, +110, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0, +129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131,100, 0, 0, + 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 2, + 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, 0, + 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 8, 0, 0, 0,115,112,105,110, + 98,111,120, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 2, 0, 0, 0,105, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 8, 0, 0, 0,115,112,105,110, 95, 99, 98, 0, 4, 2, 0, 0, + 0,110, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110, +116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105, +100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115, +115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, + 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0, +128, 0, 2, 0, 0, 0, 4, 8, 0, 0, 0, 83,112,105,110, 98,111,120, 0, 3, + 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 14, 0, 0, 0, + 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, 0, + 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/spinbox.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/spinbox_be32.loh b/iup/srclua5/loh/spinbox_be32.loh new file mode 100755 index 0000000..84a7f50 --- /dev/null +++ b/iup/srclua5/loh/spinbox_be32.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/spinbox_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/spinbox_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 13, 64,115,112,105, +110, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 0, 0, 0, 19, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, + 9,130, 65, 64, 9, 0, 0, 64, 74,131,194, 0, 73,131, 0, 64, 9,132,194,128, + 9, 0, 0, 0,100,133,128, 64, 9, 0, 3, 0, 69, 0, 0, 0,128, 1, 0, 64, + 92, 0, 3, 64, 69, 0, 0, 0,128, 0, 3,128,193, 1,128, 64, 92, 0,128, 0, + 30, 0, 0, 0, 15, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 8, +115,112,105,110, 98,111,120, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, + 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, + 97,116,105,111,110, 0, 4, 0, 0, 0, 2,105, 0, 4, 0, 0, 0, 9, 99, 97, +108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 8,115,112,105,110, 95, 99, 98, 0, + 4, 0, 0, 0, 2,110, 0, 4, 0, 0, 0, 8,105,110, 99,108,117,100,101, 0, + 4, 0, 0, 0, 10,105,117,112,115,112,105,110, 46,104, 0, 4, 0, 0, 0, 14, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, + 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105, +117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 16, 0, 2, 0, 4, 0, 0, 0, 5, 0, 0, 0,133, 0,192, + 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 2, 4, 0, + 0, 0, 8, 83,112,105,110, 98,111,120, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, + 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, + 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 99,116, +114,108, 0, 0, 0, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/spinbox_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/spinbox_be64.loh b/iup/srclua5/loh/spinbox_be64.loh new file mode 100755 index 0000000..6669e34 --- /dev/null +++ b/iup/srclua5/loh/spinbox_be64.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/spinbox_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/spinbox_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,115,112,105,110, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0, +131, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, + 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, + 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, + 99,107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115,112,105,110, 98,111,120, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,105, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0,115,112,105,110, 95, 99, 98, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108, +117,100,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,105,117,112,115,112,105,110, + 46,104, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108, +101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101, +103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 4, 5, 0, + 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0, +128, 0, 2, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 83,112,105,110, 98, +111,120, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/spinbox_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/spinbox_le64.loh b/iup/srclua5/loh/spinbox_le64.loh new file mode 100755 index 0000000..bca8d74 --- /dev/null +++ b/iup/srclua5/loh/spinbox_le64.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/spinbox_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/spinbox_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,115,112,105,110, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0, +131, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, + 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, + 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, + 99,107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115,112,105,110, 98,111,120, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,105, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0,115,112,105,110, 95, 99, 98, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108, +117,100,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,105,117,112,115,112,105,110, + 46,104, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108, +101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101, +103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 4, 5, 0, + 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0, +128, 0, 2, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 83,112,105,110, 98, +111,120, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/spinbox_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/spinbox_le64w.loh b/iup/srclua5/loh/spinbox_le64w.loh new file mode 100755 index 0000000..2293c4a --- /dev/null +++ b/iup/srclua5/loh/spinbox_le64w.loh @@ -0,0 +1,44 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/spinbox_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/spinbox_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,115,112,105,110, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 19, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0, +131, 9,128,194,132,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, + 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, + 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, + 99,107, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,115,112,105,110, 98,111,120, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,105, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0,115,112,105,110, 95, 99, 98, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 0,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108, +117,100,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,105,117,112,115,112,105,110, + 46,104, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108, +101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101, +103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 4, 5, 0, + 0, 0,133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0, +128, 0, 2, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 83,112,105,110, 98, +111,120, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/spinbox_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/submenu.loh b/iup/srclua5/loh/submenu.loh new file mode 100755 index 0000000..9be8849 --- /dev/null +++ b/iup/srclua5/loh/submenu.loh @@ -0,0 +1,38 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/submenu.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/submenu.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 13, 0, 0, 0, 64,115,117, 98, +109,101,110,117, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0, +129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128, +131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, 0, + 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, 0, + 0, 0,110,105, 99,107, 0, 4, 8, 0, 0, 0,115,117, 98,109,101,110,117, 0, + 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 3, + 0, 0, 0, 83,105, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, + 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 14, 0, 0, 0, 16, 0, 0, 0, 0, 2, 0, 5, 6, 0, 0, 0,133, + 0, 0, 0,198, 64,192, 0, 6,129,192, 0,157, 0,128, 1,158, 0, 0, 0, 30, + 0,128, 0, 3, 0, 0, 0, 4, 8, 0, 0, 0, 83,117, 98,109,101,110,117, 0, + 4, 6, 0, 0, 0,116,105,116,108,101, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 0, 0, 0, 0, 6, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 97,114, +103, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, + 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, + 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, + 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 7, + 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/submenu.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/submenu_be32.loh b/iup/srclua5/loh/submenu_be32.loh new file mode 100755 index 0000000..8c727dc --- /dev/null +++ b/iup/srclua5/loh/submenu_be32.loh @@ -0,0 +1,38 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/submenu_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/submenu_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 13, 64,115,117, 98, +109,101,110,117, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 0, 0, 0, 17, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, + 9,130, 65, 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131,128, 64, + 9, 0, 2, 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2, 64, 69, 0, 0, 0, +128, 0, 2,128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 11, 4, 0, 0, + 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 8,115,117, 98,109,101,110,117, 0, + 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, + 0, 0, 3, 83,105, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, + 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, + 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, + 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, 0, 2, 0, 5, 0, 0, 0, 6, 0, + 0, 0,133, 0,192, 64,198, 0,192,129, 6, 1,128, 0,157, 0, 0, 0,158, 0, +128, 0, 30, 0, 0, 0, 3, 4, 0, 0, 0, 8, 83,117, 98,109,101,110,117, 0, + 4, 0, 0, 0, 6,116,105,116,108,101, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, + 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 4, 97,114, +103, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 18, 0, 0, + 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, + 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, + 0, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/submenu_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/submenu_be64.loh b/iup/srclua5/loh/submenu_be64.loh new file mode 100755 index 0000000..959cf94 --- /dev/null +++ b/iup/srclua5/loh/submenu_be64.loh @@ -0,0 +1,42 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/submenu_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/submenu_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,115,117, 98,109,101,110,117, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, + 0, 9, 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, + 0,128, 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,115,117, 98,109,101,110,117, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83,105, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103, +101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, + 0, 0, 0, 0, 2, 0, 5, 6, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, 6, +129,192, 0,157, 0,128, 1,158, 0, 0, 0, 30, 0,128, 0, 3, 0, 0, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 83,117, 98,109,101,110,117, 0, 4, 6, 0, 0, + 0, 0, 0, 0, 0,116,105,116,108,101, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 0, 0, 0, 0, 6, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 5, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/submenu_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/submenu_le64.loh b/iup/srclua5/loh/submenu_le64.loh new file mode 100755 index 0000000..d60c660 --- /dev/null +++ b/iup/srclua5/loh/submenu_le64.loh @@ -0,0 +1,42 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/submenu_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/submenu_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,115,117, 98,109,101,110,117, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, + 0, 9, 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, + 0,128, 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,115,117, 98,109,101,110,117, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83,105, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103, +101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, + 0, 0, 0, 0, 2, 0, 5, 6, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, 6, +129,192, 0,157, 0,128, 1,158, 0, 0, 0, 30, 0,128, 0, 3, 0, 0, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 83,117, 98,109,101,110,117, 0, 4, 6, 0, 0, + 0, 0, 0, 0, 0,116,105,116,108,101, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 0, 0, 0, 0, 6, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 5, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/submenu_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/submenu_le64w.loh b/iup/srclua5/loh/submenu_le64w.loh new file mode 100755 index 0000000..7634bdf --- /dev/null +++ b/iup/srclua5/loh/submenu_le64w.loh @@ -0,0 +1,42 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/submenu_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/submenu_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 64,115,117, 98,109,101,110,117, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, + 0, 9, 64, 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, + 0, 9, 64,128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, + 0,128, 0, 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 8, 0, 0, 0, + 0, 0, 0, 0,115,117, 98,109,101,110,117, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83,105, 0, 4, 9, 0, 0, 0, 0, + 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103, +101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, + 0, 0, 0, 0, 2, 0, 5, 6, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0, 6, +129,192, 0,157, 0,128, 1,158, 0, 0, 0, 30, 0,128, 0, 3, 0, 0, 0, 4, + 8, 0, 0, 0, 0, 0, 0, 0, 83,117, 98,109,101,110,117, 0, 4, 6, 0, 0, + 0, 0, 0, 0, 0,116,105,116,108,101, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, + 0, 0, 0, 0, 6, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 5, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 14, 0, + 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 19, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, 0, + 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/submenu_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/tabs.loh b/iup/srclua5/loh/tabs.loh new file mode 100755 index 0000000..0b9ca1c --- /dev/null +++ b/iup/srclua5/loh/tabs.loh @@ -0,0 +1,51 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/tabs.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/tabs.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,116, 97, 98, +115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 20, 0, + 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128,194,132, 9, 0, +195,133,100, 0, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64,128, 1, 30, 0, +128, 0, 17, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, + 0,116, 97, 98,115, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0,118, 0, 4, 9, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 13, 0, 0, 0,116, 97, 98, 99,104, 97,110,103,101, 95, + 99, 98, 0, 4, 3, 0, 0, 0,105,105, 0, 4, 9, 0, 0, 0,102,117,110, 99, +110, 97,109,101, 0, 4, 6, 0, 0, 0, 84, 97, 98,115,118, 0, 4, 11, 0, 0, + 0, 99,114,101, 97,116,101,102,117,110, 99, 0, 4,207, 0, 0, 0,115,116, 97, +116,105, 99, 32,105,110,116, 32, 84, 97, 98,115,118, 40,108,117, 97, 95, 83,116, + 97,116,101, 32, 42, 76, 41, 10,123, 10, 32, 32, 73,104, 97,110,100,108,101, 32, + 42, 42,104,108,105,115,116, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, + 99,107,105,104, 97,110,100,108,101, 95, 97,114,114, 97,121, 40, 76, 44, 32, 49, + 41, 59, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42,104, 32, 61, 32, 73,117, +112, 84, 97, 98,115,118, 40,104,108,105,115,116, 41, 59, 10, 32, 32,105,117,112, +108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,104, 41, 59, + 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100,108, +101, 95,114, 97,119, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,102,114,101,101, 40, +104,108,105,115,116, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10, +125, 10, 10, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87, +105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, 2, 0, 4, 5, + 0, 0, 0,133, 0, 0, 0,192, 0,128, 0,157, 0, 0, 1,158, 0, 0, 0, 30, + 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 84, 97, 98,115,118, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, + 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, + 10, 0, 0, 0, 11, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 26, 0, 0, 0, + 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, + 99,116,114,108, 0, 10, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/tabs.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/tabs_be32.loh b/iup/srclua5/loh/tabs_be32.loh new file mode 100755 index 0000000..3a88da2 --- /dev/null +++ b/iup/srclua5/loh/tabs_be32.loh @@ -0,0 +1,51 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/tabs_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/tabs_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,116, 97, 98, +115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 20, 0, 1,128, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0, 64, 74,131,194, 0, 73,131, 0, 64, 9,132,194,128, 9,133,195, + 0, 9, 0, 0, 0,100,134,128, 64, 9, 0, 3,128, 69, 0, 0, 0,128, 1, 0, + 64, 92, 0, 3,192, 69, 0, 0, 0,128, 0, 4, 0,193, 1,128, 64, 92, 0,128, + 0, 30, 0, 0, 0, 17, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, + 5,116, 97, 98,115, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116, +105,111,110, 0, 4, 0, 0, 0, 2,118, 0, 4, 0, 0, 0, 9, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 0, 0, 0, 13,116, 97, 98, 99,104, 97,110,103,101, 95, + 99, 98, 0, 4, 0, 0, 0, 3,105,105, 0, 4, 0, 0, 0, 9,102,117,110, 99, +110, 97,109,101, 0, 4, 0, 0, 0, 6, 84, 97, 98,115,118, 0, 4, 0, 0, 0, + 11, 99,114,101, 97,116,101,102,117,110, 99, 0, 4, 0, 0, 0,207,115,116, 97, +116,105, 99, 32,105,110,116, 32, 84, 97, 98,115,118, 40,108,117, 97, 95, 83,116, + 97,116,101, 32, 42, 76, 41, 10,123, 10, 32, 32, 73,104, 97,110,100,108,101, 32, + 42, 42,104,108,105,115,116, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, + 99,107,105,104, 97,110,100,108,101, 95, 97,114,114, 97,121, 40, 76, 44, 32, 49, + 41, 59, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42,104, 32, 61, 32, 73,117, +112, 84, 97, 98,115,118, 40,104,108,105,115,116, 41, 59, 10, 32, 32,105,117,112, +108,117, 97, 95,112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,104, 41, 59, + 10, 32, 32,105,117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100,108, +101, 95,114, 97,119, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,102,114,101,101, 40, +104,108,105,115,116, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10, +125, 10, 10, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87, +105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 28, 0, 2, 0, 4, 0, + 0, 0, 5, 0, 0, 0,133, 0,128, 0,192, 1, 0, 0,157, 0, 0, 0,158, 0, +128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 6, 84, 97, 98,115,118, 0, 0, 0, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, + 0, 27, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, + 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, + 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 26, + 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, + 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 5, + 99,116,114,108, 0, 0, 0, 0, 10, 0, 0, 0, 19, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/tabs_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/tabs_be64.loh b/iup/srclua5/loh/tabs_be64.loh new file mode 100755 index 0000000..536d55a --- /dev/null +++ b/iup/srclua5/loh/tabs_be64.loh @@ -0,0 +1,56 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/tabs_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/tabs_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,116, 97, 98,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 20, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128, +194,132, 9, 0,195,133,100, 0, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, + 0, 0, 92, 64, 0, 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64, +128, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,115, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,118, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 13, 0, + 0, 0, 0, 0, 0, 0,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,105,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99,110, 97,109,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 84, 97, + 98,115,118, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101,102, +117,110, 99, 0, 4,207, 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,105, 99, 32, +105,110,116, 32, 84, 97, 98,115,118, 40,108,117, 97, 95, 83,116, 97,116,101, 32, + 42, 76, 41, 10,123, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42, 42,104,108, +105,115,116, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107,105,104, + 97,110,100,108,101, 95, 97,114,114, 97,121, 40, 76, 44, 32, 49, 41, 59, 10, 32, + 32, 73,104, 97,110,100,108,101, 32, 42,104, 32, 61, 32, 73,117,112, 84, 97, 98, +115,118, 40,104,108,105,115,116, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95, +112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,105, +117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100,108,101, 95,114, 97, +119, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,102,114,101,101, 40,104,108,105,115, +116, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 10, 10, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,192, 0,128, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 1, + 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 84, 97, 98,115,118, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 23, 0, 0, 0, + 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 10, 0, 0, + 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/tabs_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/tabs_le64.loh b/iup/srclua5/loh/tabs_le64.loh new file mode 100755 index 0000000..9d6ecff --- /dev/null +++ b/iup/srclua5/loh/tabs_le64.loh @@ -0,0 +1,56 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/tabs_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/tabs_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,116, 97, 98,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 20, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128, +194,132, 9, 0,195,133,100, 0, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, + 0, 0, 92, 64, 0, 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64, +128, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,115, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,118, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 13, 0, + 0, 0, 0, 0, 0, 0,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,105,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99,110, 97,109,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 84, 97, + 98,115,118, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101,102, +117,110, 99, 0, 4,207, 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,105, 99, 32, +105,110,116, 32, 84, 97, 98,115,118, 40,108,117, 97, 95, 83,116, 97,116,101, 32, + 42, 76, 41, 10,123, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42, 42,104,108, +105,115,116, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107,105,104, + 97,110,100,108,101, 95, 97,114,114, 97,121, 40, 76, 44, 32, 49, 41, 59, 10, 32, + 32, 73,104, 97,110,100,108,101, 32, 42,104, 32, 61, 32, 73,117,112, 84, 97, 98, +115,118, 40,104,108,105,115,116, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95, +112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,105, +117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100,108,101, 95,114, 97, +119, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,102,114,101,101, 40,104,108,105,115, +116, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 10, 10, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,192, 0,128, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 1, + 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 84, 97, 98,115,118, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 23, 0, 0, 0, + 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 10, 0, 0, + 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/tabs_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/tabs_le64w.loh b/iup/srclua5/loh/tabs_le64w.loh new file mode 100755 index 0000000..346d99f --- /dev/null +++ b/iup/srclua5/loh/tabs_le64w.loh @@ -0,0 +1,56 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/tabs_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/tabs_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,116, 97, 98,115, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 20, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, 9,128, +194,132, 9, 0,195,133,100, 0, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, + 0, 0, 92, 64, 0, 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64, +128, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,115, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,118, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 13, 0, + 0, 0, 0, 0, 0, 0,116, 97, 98, 99,104, 97,110,103,101, 95, 99, 98, 0, 4, + 3, 0, 0, 0, 0, 0, 0, 0,105,105, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, +102,117,110, 99,110, 97,109,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 84, 97, + 98,115,118, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101,102, +117,110, 99, 0, 4,207, 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,105, 99, 32, +105,110,116, 32, 84, 97, 98,115,118, 40,108,117, 97, 95, 83,116, 97,116,101, 32, + 42, 76, 41, 10,123, 10, 32, 32, 73,104, 97,110,100,108,101, 32, 42, 42,104,108, +105,115,116, 32, 61, 32,105,117,112,108,117, 97, 95, 99,104,101, 99,107,105,104, + 97,110,100,108,101, 95, 97,114,114, 97,121, 40, 76, 44, 32, 49, 41, 59, 10, 32, + 32, 73,104, 97,110,100,108,101, 32, 42,104, 32, 61, 32, 73,117,112, 84, 97, 98, +115,118, 40,104,108,105,115,116, 41, 59, 10, 32, 32,105,117,112,108,117, 97, 95, +112,108,117,103,115,116, 97,116,101, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,105, +117,112,108,117, 97, 95,112,117,115,104,105,104, 97,110,100,108,101, 95,114, 97, +119, 40, 76, 44, 32,104, 41, 59, 10, 32, 32,102,114,101,101, 40,104,108,105,115, +116, 41, 59, 10, 32, 32,114,101,116,117,114,110, 32, 49, 59, 10,125, 10, 10, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 26, 0, 0, 0, 28, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,192, 0,128, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 1, + 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 84, 97, 98,115,118, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, + 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 23, 0, 0, 0, + 28, 0, 0, 0, 26, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 10, 0, 0, + 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/tabs_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/text.loh b/iup/srclua5/loh/text.loh new file mode 100755 index 0000000..b84c5df --- /dev/null +++ b/iup/srclua5/loh/text.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/text.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/text.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,116,101,120, +116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 20, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74,192, 0, 0, 73, 0,194,131, 73,128,194,132, 73, 0,195,133, 9, 64, + 0,131,100, 0, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64,128, 1, 30, 0, +128, 0, 17, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, + 0,116,101,120,116, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 3, 0, + 0, 0,110,115, 0, 4, 9, 0, 0, 0, 99, 97,114,101,116, 95, 99, 98, 0, 4, + 4, 0, 0, 0,110,110,110, 0, 4, 16, 0, 0, 0,118, 97,108,117,101, 99,104, + 97,110,103,101,100, 95, 99, 98, 0, 4, 1, 0, 0, 0, 0, 4, 14, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, + 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 15, 0, + 0, 0, 17, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0, +128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 84, +101,120,116, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, + 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, 15, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 5, 0, + 0, 0, 99,116,114,108, 0, 10, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/text.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/text_be32.loh b/iup/srclua5/loh/text_be32.loh new file mode 100755 index 0000000..95d0d1d --- /dev/null +++ b/iup/srclua5/loh/text_be32.loh @@ -0,0 +1,40 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/text_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/text_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,116,101,120, +116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 20, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0,192, 74,131,194, 0, 73,132,194,128, 73,133,195, 0, 73,131, 0, + 64, 9, 0, 0, 0,100,134,128, 64, 9, 0, 3,128, 69, 0, 0, 0,128, 1, 0, + 64, 92, 0, 3,192, 69, 0, 0, 0,128, 0, 4, 0,193, 1,128, 64, 92, 0,128, + 0, 30, 0, 0, 0, 17, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, + 5,116,101,120,116, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, + 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116, +105,111,110, 0, 4, 0, 0, 0, 2, 45, 0, 4, 0, 0, 0, 9, 99, 97,108,108, + 98, 97, 99,107, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 4, 0, 0, + 0, 3,110,115, 0, 4, 0, 0, 0, 9, 99, 97,114,101,116, 95, 99, 98, 0, 4, + 0, 0, 0, 4,110,110,110, 0, 4, 0, 0, 0, 16,118, 97,108,117,101, 99,104, + 97,110,103,101,100, 95, 99, 98, 0, 4, 0, 0, 0, 1, 0, 4, 0, 0, 0, 14, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105, +117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, + 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105, +117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 15, 0, 0, 0, 17, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0,133, 0,128, + 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 5, 84, +101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, + 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, + 0, 5, 99,116,114,108, 0, 0, 0, 0, 10, 0, 0, 0, 19, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/text_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/text_be64.loh b/iup/srclua5/loh/text_be64.loh new file mode 100755 index 0000000..08f9c73 --- /dev/null +++ b/iup/srclua5/loh/text_be64.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/text_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/text_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,116,101,120,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 20, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,192, 0, 0, 73, 0,194,131, 73,128,194,132, 73, 0, +195,133, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, + 0, 0, 92, 64, 0, 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64, +128, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,101,120,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,114,101,116, 95, + 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110,110, 0, 4, 16, 0, 0, + 0, 0, 0, 0, 0,118, 97,108,117,101, 99,104, 97,110,103,101,100, 95, 99, 98, + 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, + 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115, +115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101, +116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, + 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, + 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 84, +101,120,116, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 20, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, + 0, 0, 17, 0, 0, 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 10, + 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/text_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/text_le64.loh b/iup/srclua5/loh/text_le64.loh new file mode 100755 index 0000000..d0a7678 --- /dev/null +++ b/iup/srclua5/loh/text_le64.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/text_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/text_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,116,101,120,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 20, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,192, 0, 0, 73, 0,194,131, 73,128,194,132, 73, 0, +195,133, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,134, 69,128, 3, 0,128, 0, + 0, 0, 92, 64, 0, 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, 0, 92, 64, +128, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,101,120,116, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, +114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, + 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, + 0, 0, 0, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, + 0, 0,110,115, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,114,101,116, 95, + 99, 98, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,110,110,110, 0, 4, 16, 0, 0, + 0, 0, 0, 0, 0,118, 97,108,117,101, 99,104, 97,110,103,101,100, 95, 99, 98, + 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, + 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115, +115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101, +116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, + 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, + 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 84, +101,120,116, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, + 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 20, 0, + 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, + 0, 0, 17, 0, 0, 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 10, + 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/text_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/text_le64w.loh b/iup/srclua5/loh/text_le64w.loh new file mode 100755 index 0000000..a78caf2 --- /dev/null +++ b/iup/srclua5/loh/text_le64w.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/text_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/text_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,116,101,120,116, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,128, 0, 0, 73, 0,194,131, 73,128,194,132, 9, 64, + 0,131,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0, +128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,116,101,120,116, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, + 0, 0, 97, 99,116,105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,115, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,114,101,116, 95, 99, 98, 0, 4, + 4, 0, 0, 0, 0, 0, 0, 0,110,110,110, 0, 4, 14, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101, +116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103, +101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 16, + 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, + 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, + 84,101,120,116, 0, 0, 0, 0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, + 0, 15, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, + 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 16, + 0, 0, 0, 14, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 9, 0, 0, 0, + 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/text_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/timer.loh b/iup/srclua5/loh/timer.loh new file mode 100755 index 0000000..2d6dfca --- /dev/null +++ b/iup/srclua5/loh/timer.loh @@ -0,0 +1,37 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/timer.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/timer.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 11, 0, 0, 0, 64,116,105,109, +101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 18, + 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, + 64, 65,130, 74, 64, 0, 0, 73, 64,193,131, 9, 64, 0,131,100, 0, 0, 0, 9, + 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, 2, 0,128, + 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 12, 0, 0, 0, 4, + 5, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, 0, 0,116,105,109,101,114, 0, + 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, + 0, 0, 0, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, + 0, 0, 0, 97, 99,116,105,111,110, 95, 99, 98, 0, 4, 14, 0, 0, 0, 99,114, +101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, + 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, + 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, + 15, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0, +158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 84,105,109, +101,114, 0, 0, 0, 0, 0, 4, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, + 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, + 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, + 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 8, 0, + 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/timer.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/timer_be32.loh b/iup/srclua5/loh/timer_be32.loh new file mode 100755 index 0000000..073d341 --- /dev/null +++ b/iup/srclua5/loh/timer_be32.loh @@ -0,0 +1,37 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/timer_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/timer_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 11, 64,116,105,109, +101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, + 0, 0, 18, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, + 65, 64, 9, 0, 0, 64, 74,131,193, 64, 73,131, 0, 64, 9, 0, 0, 0,100,132, + 0, 64, 9, 0, 2, 64, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2,128, 69, 0, + 0, 0,128, 0, 2,192,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 12, 4, + 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 6,116,105,109,101,114, 0, + 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, + 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, + 0, 0, 1, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, + 0, 0, 10, 97, 99,116,105,111,110, 95, 99, 98, 0, 4, 0, 0, 0, 14, 99,114, +101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, + 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, + 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 13, + 0, 0, 0, 15, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0,133, 0,128, 0,157, + 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 6, 84,105,109, +101,114, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 14, 0, 0, 0, 14, 0, + 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, + 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/timer_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/timer_be64.loh b/iup/srclua5/loh/timer_be64.loh new file mode 100755 index 0000000..182b3fd --- /dev/null +++ b/iup/srclua5/loh/timer_be64.loh @@ -0,0 +1,41 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/timer_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/timer_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,116,105,109,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 64,193,131, 9, 64, 0,131,100, + 0, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, +128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 12, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,116,105,109,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 97, + 99,116,105,111,110, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114, +101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, + 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, + 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, + 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 84,105,109, +101,114, 0, 0, 0, 0, 0, 4, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, + 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/timer_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/timer_le64.loh b/iup/srclua5/loh/timer_le64.loh new file mode 100755 index 0000000..fddb2b5 --- /dev/null +++ b/iup/srclua5/loh/timer_le64.loh @@ -0,0 +1,41 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/timer_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/timer_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,116,105,109,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 64,193,131, 9, 64, 0,131,100, + 0, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, +128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 12, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,116,105,109,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 97, + 99,116,105,111,110, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114, +101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, + 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, + 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, + 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 84,105,109, +101,114, 0, 0, 0, 0, 0, 4, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, + 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/timer_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/timer_le64w.loh b/iup/srclua5/loh/timer_le64w.loh new file mode 100755 index 0000000..26126ce --- /dev/null +++ b/iup/srclua5/loh/timer_le64w.loh @@ -0,0 +1,41 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/timer_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/timer_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 64,116,105,109,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, + 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 64,193,131, 9, 64, 0,131,100, + 0, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, +128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 12, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 6, 0, + 0, 0, 0, 0, 0, 0,116,105,109,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, + 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 97, + 99,116,105,111,110, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114, +101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, + 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, + 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, + 30, 0,128, 0, 1, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 84,105,109, +101,114, 0, 0, 0, 0, 0, 4, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, + 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, + 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/timer_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/toggle.loh b/iup/srclua5/loh/toggle.loh new file mode 100755 index 0000000..c1580f0 --- /dev/null +++ b/iup/srclua5/loh/toggle.loh @@ -0,0 +1,38 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/toggle.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/toggle.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 12, 0, 0, 0, 64,116,111,103, +103,108,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, + 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131,100, 0, 0, 0, + 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 2, 0, +128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, 0, 0, + 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 7, 0, 0, 0,116,111,103,103,108, +101, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 3, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 7, 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 2, 0, 0, 0,110, + 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103, +101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0, +133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 7, 0, 0, 0, 84,111,103,103,108,101, 0, 4, 6, 0, 0, + 0,116,105,116,108,101, 0, 0, 0, 0, 0, 5, 0, 0, 0, 14, 0, 0, 0, 14, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 2, 0, 0, 0, 6, + 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, + 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, + 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/toggle.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/toggle_be32.loh b/iup/srclua5/loh/toggle_be32.loh new file mode 100755 index 0000000..1aef13a --- /dev/null +++ b/iup/srclua5/loh/toggle_be32.loh @@ -0,0 +1,38 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/toggle_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/toggle_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 12, 64,116,111,103, +103,108,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 0, 0, 0, 18, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9, +130, 65, 64, 9, 0, 0, 64, 74,131,194, 0, 73,131, 0, 64, 9, 0, 0, 0,100, +132,128, 64, 9, 0, 2,128, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2,192, 69, + 0, 0, 0,128, 0, 3, 0,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 13, + 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 7,116,111,103,103,108, +101, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, + 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, + 4, 0, 0, 0, 3, 83, 45, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 0, 0, 0, 7, 97, 99,116,105,111,110, 0, 4, 0, 0, 0, 2,110, + 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103, +101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 2, 0, 4, 0, 0, 0, 5, + 0, 0, 0,133, 0,192, 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, 0, 30, + 0, 0, 0, 2, 4, 0, 0, 0, 7, 84,111,103,103,108,101, 0, 4, 0, 0, 0, + 6,116,105,116,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 14, 0, + 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 2, 0, + 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 18, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, + 13, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, + 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, + 5, 99,116,114,108, 0, 0, 0, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/toggle_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/toggle_be64.loh b/iup/srclua5/loh/toggle_be64.loh new file mode 100755 index 0000000..523e6c2 --- /dev/null +++ b/iup/srclua5/loh/toggle_be64.loh @@ -0,0 +1,42 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/toggle_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/toggle_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,116,111,103,103,108,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69,192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, + 13, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,116,111,103,103,108,101, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0, +133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 84,111,103,103,108,101, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, + 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, + 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/toggle_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/toggle_le64.loh b/iup/srclua5/loh/toggle_le64.loh new file mode 100755 index 0000000..41686fb --- /dev/null +++ b/iup/srclua5/loh/toggle_le64.loh @@ -0,0 +1,42 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/toggle_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/toggle_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,116,111,103,103,108,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69,192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, + 13, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,116,111,103,103,108,101, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0, +133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 84,111,103,103,108,101, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, + 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, + 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/toggle_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/toggle_le64w.loh b/iup/srclua5/loh/toggle_le64w.loh new file mode 100755 index 0000000..21b2417 --- /dev/null +++ b/iup/srclua5/loh/toggle_le64w.loh @@ -0,0 +1,42 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/toggle_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/toggle_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 64,116,111,103,103,108,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 18, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, + 9, 64, 0,129, 9, 64, 65,130, 74, 64, 0, 0, 73, 0,194,131, 9, 64, 0,131, +100, 0, 0, 0, 9, 64,128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, + 69,192, 2, 0,128, 0, 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, + 13, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 7, + 0, 0, 0, 0, 0, 0, 0,116,111,103,103,108,101, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, + 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +105,111,110, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 83, 45, 0, 4, 9, 0, 0, + 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0, 97, 99,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, + 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109, +101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105, +115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0, +133, 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 84,111,103,103,108,101, 0, + 4, 6, 0, 0, 0, 0, 0, 0, 0,116,105,116,108,101, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, 15, + 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 15, 0, 0, 0, 13, 0, 0, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, + 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 99,116,114,108, 0, 8, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/toggle_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/tree.loh b/iup/srclua5/loh/tree.loh new file mode 100755 index 0000000..160153d --- /dev/null +++ b/iup/srclua5/loh/tree.loh @@ -0,0 +1,177 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/tree.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/tree.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,116,114,101, +101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 37, 0, + 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74,192, 2, 0, 73, 0,194,131, 73, 0,194,132, 73,192, 66,133, 73,192, + 66,134, 73,192,194,134, 73,192, 67,135, 73,192, 67,136, 73,192,195,136, 73,192, + 66,137, 73,192,194,137, 73, 64, 69,138, 9, 64, 0,131, 9,192, 69,139,100, 0, + 0, 0,164, 64, 0, 0, 0, 0,128, 0,135, 0, 6, 0,164,128, 0, 0,135, 64, + 6, 0,164,192, 0, 0,135,128, 6, 0,164, 0, 1, 0, 9,128,128,141,133, 0, + 7, 0,192, 0, 0, 0,156, 64, 0, 1,133, 64, 7, 0,192, 0, 0, 0, 1,129, + 7, 0,156, 64,128, 1, 30, 0,128, 0, 31, 0, 0, 0, 4, 5, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0,116,114,101,101, 0, 4, 7, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 4, 9, + 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 13, 0, 0, 0,115,101,108, +101, 99,116,105,111,110, 95, 99, 98, 0, 4, 3, 0, 0, 0,110,110, 0, 4, 18, + 0, 0, 0,109,117,108,116,105,115,101,108,101, 99,116,105,111,110, 95, 99, 98, + 0, 4, 14, 0, 0, 0, 98,114, 97,110, 99,104,111,112,101,110, 95, 99, 98, 0, + 4, 2, 0, 0, 0,110, 0, 4, 15, 0, 0, 0, 98,114, 97,110, 99,104, 99,108, +111,115,101, 95, 99, 98, 0, 4, 15, 0, 0, 0,101,120,101, 99,117,116,101,108, +101, 97,102, 95, 99, 98, 0, 4, 14, 0, 0, 0,114,101,110, 97,109,101,110,111, +100,101, 95, 99, 98, 0, 4, 3, 0, 0, 0,110,115, 0, 4, 15, 0, 0, 0,110, +111,100,101,114,101,109,111,118,101,100, 95, 99, 98, 0, 4, 10, 0, 0, 0,114, +101,110, 97,109,101, 95, 99, 98, 0, 4, 14, 0, 0, 0,115,104,111,119,114,101, +110, 97,109,101, 95, 99, 98, 0, 4, 14, 0, 0, 0,114,105,103,104,116, 99,108, +105, 99,107, 95, 99, 98, 0, 4, 12, 0, 0, 0,100,114, 97,103,100,114,111,112, + 95, 99, 98, 0, 4, 5, 0, 0, 0,110,110,110,110, 0, 4, 11, 0, 0, 0,101, +120,116,114, 97,102,117,110, 99,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, + 18, 0, 0, 0, 84,114,101,101, 83,101,116, 78,111,100,101, 65,116,116,114,105, + 98, 0, 4, 16, 0, 0, 0, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82, +101, 99, 0, 4, 13, 0, 0, 0, 84,114,101,101, 83,101,116, 86, 97,108,117,101, + 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103, +101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 24, 0, 0, 0, 27, 0, 0, 0, 0, 3, 0, 7, 15, 0, 0, 0, +197, 0, 0, 0, 0, 1, 0, 1,220,128, 0, 1, 23, 64,192, 1, 22,192, 0,128, +197,128, 0, 0, 0, 1, 0, 1,220,128, 0, 1,128, 0,128, 1,197,192, 0, 0, + 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, 0, + 4, 0, 0, 0, 4, 12, 0, 0, 0,105,117,112, 71,101,116, 67,108, 97,115,115, + 0, 4, 11, 0, 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 16, 0, + 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109,101, 0, 4, 13, + 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, + 27, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 14, 0, 0, 0, 5, 0, 0, 0,110, 97,109,101, 0, 0, 0, 0, 0, + 14, 0, 0, 0, 6, 0, 0, 0,118, 97,108,117,101, 0, 0, 0, 0, 0, 14, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 37, 0, 0, 0, 1, 3, + 0, 7, 69, 0, 0, 0,198, 0,192, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65,129, 0, 0,128, 1, 0, 1, 85,129,129, 2,134, 1, +192, 0,220, 64, 0, 2,198,192,192, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65, 1, 1, 0,128, 1, 0, 1, 85,129,129, 2,134,193, +192, 0,220, 64, 0, 2,198, 64,193, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65,129, 1, 0,128, 1, 0, 1, 85,129,129, 2,134, 65, +193, 0,220, 64, 0, 2,198,192,193, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65, 1, 2, 0,128, 1, 0, 1, 85,129,129, 2,134,193, +193, 0,220, 64, 0, 2,198, 64,194, 0,218, 0, 0, 0, 22,128, 1,128,196, 0, + 0, 0, 0, 1, 0, 0, 65,129, 2, 0,128, 1, 0, 1, 85,129,129, 2,134, 65, +194, 0,220, 64, 0, 2,198,192,194, 0,218, 0, 0, 0, 22,128, 1,128,196, 0, + 0, 0, 0, 1, 0, 0, 65, 1, 3, 0,128, 1, 0, 1, 85,129,129, 2,134,193, +194, 0,220, 64, 0, 2,198, 64,195, 0,218, 0, 0, 0, 22, 0, 1,128,197,128, + 3, 0, 0, 1, 0, 0, 64, 1, 0, 1,134, 65,195, 0,220, 64, 0, 2, 30, 0, +128, 0, 15, 0, 0, 0, 4, 6, 0, 0, 0, 99,111,108,111,114, 0, 4, 13, 0, + 0, 0, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 6, 0, 0, 0, + 67, 79, 76, 79, 82, 0, 4, 6, 0, 0, 0,115,116, 97,116,101, 0, 4, 6, 0, + 0, 0, 83, 84, 65, 84, 69, 0, 4, 10, 0, 0, 0,116,105,116,108,101,102,111, +110,116, 0, 4, 10, 0, 0, 0, 84, 73, 84, 76, 69, 70, 79, 78, 84, 0, 4, 7, + 0, 0, 0,109, 97,114,107,101,100, 0, 4, 7, 0, 0, 0, 77, 65, 82, 75, 69, + 68, 0, 4, 6, 0, 0, 0,105,109, 97,103,101, 0, 4, 6, 0, 0, 0, 73, 77, + 65, 71, 69, 0, 4, 14, 0, 0, 0,105,109, 97,103,101,101,120,112, 97,110,100, +101,100, 0, 4, 14, 0, 0, 0, 73, 77, 65, 71, 69, 69, 88, 80, 65, 78, 68, 69, + 68, 0, 4, 7, 0, 0, 0,117,115,101,114,105,100, 0, 4, 14, 0, 0, 0, 84, +114,101,101, 83,101,116, 85,115,101,114, 73,100, 0, 0, 0, 0, 0, 69, 0, 0, + 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, + 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, + 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, + 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, + 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, + 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, + 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, + 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, + 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 3, 0, 0, + 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 68, 0, 0, 0, + 5, 0, 0, 0,110,111,100,101, 0, 0, 0, 0, 0, 68, 0, 0, 0, 3, 0, 0, + 0,105,100, 0, 0, 0, 0, 0, 68, 0, 0, 0, 1, 0, 0, 0, 23, 0, 0, 0, + 84,114,101,101, 83,101,116, 65,116,116,114,105, 98,117,116,101, 72, 97,110,100, +108,101, 0, 0, 0, 0, 0, 39, 0, 0, 0, 60, 0, 0, 0, 0, 3, 0, 9, 61, + 0, 0, 0, 23, 0,192, 0, 22, 0, 0,128, 30, 0,128, 0,212, 0,128, 0, 25, +192,128,128, 22, 64, 13,128, 6,193,128, 0, 69,129, 0, 0,128, 1, 0, 2, 92, +129, 0, 1, 23,192,192, 2, 22, 0, 9,128, 70, 1, 65, 2, 90, 1, 0, 0, 22, + 64, 4,128, 69, 65, 1, 0,128, 1, 0, 0,193,129, 1, 0, 0, 2, 0, 1,213, + 1,130, 3, 6, 2, 65, 2, 92, 65, 0, 2, 69,193, 1, 0,128, 1, 0, 0,192, + 1, 0, 2, 12, 2, 66, 1, 92, 65, 0, 2, 69, 65, 2, 0,128, 1, 0, 0,192, + 1, 0, 2, 12, 2, 66, 1, 92, 65, 0, 2, 22, 0, 6,128, 70,129, 66, 2, 90, + 1, 0, 0, 22, 64, 5,128, 69, 65, 1, 0,128, 1, 0, 0,193,193, 2, 0, 0, + 2, 0, 1,213, 1,130, 3, 6,130, 66, 2, 92, 65, 0, 2, 69,193, 1, 0,128, + 1, 0, 0,192, 1, 0, 2, 12, 2, 66, 1, 92, 65, 0, 2, 22, 0, 2,128, 26, + 1, 0, 0, 22,128, 1,128, 69, 65, 1, 0,128, 1, 0, 0,193,193, 2, 0, 0, + 2, 0, 1,213, 1,130, 3, 0, 2, 0, 2, 92, 65, 0, 2,205, 0,194, 1, 22, +192,241,127, 30, 0,128, 0, 12, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 5, 0, 0, 0,116,121,112,101, 0, 4, 6, 0, 0, 0,116, 97, 98,108, +101, 0, 4, 11, 0, 0, 0, 98,114, 97,110, 99,104,110, 97,109,101, 0, 4, 13, + 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 10, 0, 0, + 0, 65, 68, 68, 66, 82, 65, 78, 67, 72, 0, 4, 18, 0, 0, 0, 84,114,101,101, + 83,101,116, 78,111,100,101, 65,116,116,114,105, 98, 0, 3, 0, 0, 0, 0, 0, + 0,240, 63, 4, 16, 0, 0, 0, 84,114,101,101, 83,101,116, 86, 97,108,117,101, + 82,101, 99, 0, 4, 9, 0, 0, 0,108,101, 97,102,110, 97,109,101, 0, 4, 8, + 0, 0, 0, 65, 68, 68, 76, 69, 65, 70, 0, 0, 0, 0, 0, 61, 0, 0, 0, 40, + 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 41, 0, 0, 0, 42, 0, 0, 0, 42, + 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, + 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, + 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, + 0, 0, 0, 46, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, + 0, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, + 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, + 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, + 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, + 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 54, 0, 0, 0, 54, + 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, + 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 60, + 0, 0, 0, 5, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, + 0, 0, 60, 0, 0, 0, 2, 0, 0, 0,116, 0, 0, 0, 0, 0, 60, 0, 0, 0, + 3, 0, 0, 0,105,100, 0, 0, 0, 0, 0, 60, 0, 0, 0, 5, 0, 0, 0, 99, +111,110,116, 0, 4, 0, 0, 0, 60, 0, 0, 0, 5, 0, 0, 0,110,111,100,101, + 0, 7, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, + 0, 69, 0, 0, 0, 0, 3, 0, 7, 22, 0, 0, 0,154, 64, 0, 0, 22, 64, 3, +128,129, 0, 0, 0,198, 64,192, 0,218, 0, 0, 0, 22, 0, 1,128,197,128, 0, + 0, 0, 1, 0, 0, 65,193, 0, 0,134, 65,192, 0,220, 64, 0, 2,197, 0, 1, + 0, 0, 1, 0, 0, 64, 1,128, 0,129, 1, 0, 0,220, 64, 0, 2,197, 64, 1, + 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, + 0, 6, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 11, 0, 0, 0, 98, +114, 97,110, 99,104,110, 97,109,101, 0, 4, 13, 0, 0, 0, 83,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 4, 7, 0, 0, 0, 84, 73, 84, 76, 69, 48, 0, + 4, 18, 0, 0, 0, 84,114,101,101, 83,101,116, 78,111,100,101, 65,116,116,114, +105, 98, 0, 4, 16, 0, 0, 0, 84,114,101,101, 83,101,116, 86, 97,108,117,101, + 82,101, 99, 0, 0, 0, 0, 0, 22, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, + 64, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, + 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 66, 0, 0, 0, + 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 68, 0, 0, 0, + 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 0, + 3, 0, 0, 0, 7, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 21, + 0, 0, 0, 2, 0, 0, 0,116, 0, 0, 0, 0, 0, 21, 0, 0, 0, 3, 0, 0, + 0,105,100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 71, 0, 0, 0, 73, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0, +157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, + 0, 84,114,101,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 72, 0, 0, 0, 72, 0, + 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, + 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, + 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, + 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 27, 0, 0, 0, 37, 0, 0, 0, + 37, 0, 0, 0, 29, 0, 0, 0, 60, 0, 0, 0, 39, 0, 0, 0, 69, 0, 0, 0, + 62, 0, 0, 0, 73, 0, 0, 0, 71, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, + 75, 0, 0, 0, 76, 0, 0, 0, 76, 0, 0, 0, 76, 0, 0, 0, 76, 0, 0, 0, + 76, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 19, 0, 0, + 0, 36, 0, 0, 0, 23, 0, 0, 0, 84,114,101,101, 83,101,116, 65,116,116,114, +105, 98,117,116,101, 72, 97,110,100,108,101, 0, 20, 0, 0, 0, 36, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/tree.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/tree_be32.loh b/iup/srclua5/loh/tree_be32.loh new file mode 100755 index 0000000..3f6adfa --- /dev/null +++ b/iup/srclua5/loh/tree_be32.loh @@ -0,0 +1,177 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/tree_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/tree_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,116,114,101, +101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, + 0, 37, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 2,192, 74,131,194, 0, 73,132,194, 0, 73,133, 66,192, 73,134, 66, +192, 73,134,194,192, 73,135, 67,192, 73,136, 67,192, 73,136,195,192, 73,137, 66, +192, 73,137,194,192, 73,138, 69, 64, 73,131, 0, 64, 9,139, 69,192, 9, 0, 0, + 0,100, 0, 0, 64,164, 0,128, 0, 0, 0, 6, 0,135, 0, 0,128,164, 0, 6, + 64,135, 0, 0,192,164, 0, 6,128,135, 0, 1, 0,164,141,128,128, 9, 0, 7, + 0,133, 0, 0, 0,192, 1, 0, 64,156, 0, 7, 64,133, 0, 0, 0,192, 0, 7, +129, 1, 1,128, 64,156, 0,128, 0, 30, 0, 0, 0, 31, 4, 0, 0, 0, 5,110, +105, 99,107, 0, 4, 0, 0, 0, 5,116,114,101,101, 0, 4, 0, 0, 0, 7,112, + 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, + 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 1, 0, 4, 0, + 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 13,115,101,108, +101, 99,116,105,111,110, 95, 99, 98, 0, 4, 0, 0, 0, 3,110,110, 0, 4, 0, + 0, 0, 18,109,117,108,116,105,115,101,108,101, 99,116,105,111,110, 95, 99, 98, + 0, 4, 0, 0, 0, 14, 98,114, 97,110, 99,104,111,112,101,110, 95, 99, 98, 0, + 4, 0, 0, 0, 2,110, 0, 4, 0, 0, 0, 15, 98,114, 97,110, 99,104, 99,108, +111,115,101, 95, 99, 98, 0, 4, 0, 0, 0, 15,101,120,101, 99,117,116,101,108, +101, 97,102, 95, 99, 98, 0, 4, 0, 0, 0, 14,114,101,110, 97,109,101,110,111, +100,101, 95, 99, 98, 0, 4, 0, 0, 0, 3,110,115, 0, 4, 0, 0, 0, 15,110, +111,100,101,114,101,109,111,118,101,100, 95, 99, 98, 0, 4, 0, 0, 0, 10,114, +101,110, 97,109,101, 95, 99, 98, 0, 4, 0, 0, 0, 14,115,104,111,119,114,101, +110, 97,109,101, 95, 99, 98, 0, 4, 0, 0, 0, 14,114,105,103,104,116, 99,108, +105, 99,107, 95, 99, 98, 0, 4, 0, 0, 0, 12,100,114, 97,103,100,114,111,112, + 95, 99, 98, 0, 4, 0, 0, 0, 5,110,110,110,110, 0, 4, 0, 0, 0, 11,101, +120,116,114, 97,102,117,110, 99,115, 0, 3, 63,240, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 18, 84,114,101,101, 83,101,116, 78,111,100,101, 65,116,116,114,105, + 98, 0, 4, 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82, +101, 99, 0, 4, 0, 0, 0, 13, 84,114,101,101, 83,101,116, 86, 97,108,117,101, + 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, 0, + 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103, +101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 27, 0, 3, 0, 7, 0, 0, 0, 15, + 0, 0, 0,197, 1, 0, 1, 0, 1, 0,128,220, 1,192, 64, 23,128, 0,192, 22, + 0, 0,128,197, 1, 0, 1, 0, 1, 0,128,220, 1,128, 0,128, 0, 0,192,197, + 0, 0, 1, 0, 0,128, 1, 64, 1, 0, 1,128, 2, 0, 64,220, 0,128, 0, 30, + 0, 0, 0, 4, 4, 0, 0, 0, 12,105,117,112, 71,101,116, 67,108, 97,115,115, + 0, 4, 0, 0, 0, 11,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 0, 0, + 0, 16,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109,101, 0, 4, 0, + 0, 0, 13, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 0, 0, 0, 0, + 0, 0, 0, 15, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, + 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, + 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, + 0, 0, 0, 27, 0, 0, 0, 3, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 5,110, 97,109,101, 0, 0, 0, 0, 0, + 0, 0, 0, 14, 0, 0, 0, 6,118, 97,108,117,101, 0, 0, 0, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 37, 1, 3, + 0, 7, 0, 0, 0, 69, 0,192, 0,198, 0, 0, 0,218,128, 1,128, 22, 0, 0, + 64,197, 0, 0, 1, 0, 0, 0,129, 65, 1, 0, 1,128, 2,129,129, 85, 0,192, + 1,134, 2, 0, 64,220, 0,192,192,198, 0, 0, 0,218,128, 1,128, 22, 0, 0, + 64,197, 0, 0, 1, 0, 0, 1, 1, 65, 1, 0, 1,128, 2,129,129, 85, 0,192, +193,134, 2, 0, 64,220, 0,193, 64,198, 0, 0, 0,218,128, 1,128, 22, 0, 0, + 64,197, 0, 0, 1, 0, 0, 1,129, 65, 1, 0, 1,128, 2,129,129, 85, 0,193, + 65,134, 2, 0, 64,220, 0,193,192,198, 0, 0, 0,218,128, 1,128, 22, 0, 0, + 64,197, 0, 0, 1, 0, 0, 2, 1, 65, 1, 0, 1,128, 2,129,129, 85, 0,193, +193,134, 2, 0, 64,220, 0,194, 64,198, 0, 0, 0,218,128, 1,128, 22, 0, 0, + 0,196, 0, 0, 1, 0, 0, 2,129, 65, 1, 0, 1,128, 2,129,129, 85, 0,194, + 65,134, 2, 0, 64,220, 0,194,192,198, 0, 0, 0,218,128, 1,128, 22, 0, 0, + 0,196, 0, 0, 1, 0, 0, 3, 1, 65, 1, 0, 1,128, 2,129,129, 85, 0,194, +193,134, 2, 0, 64,220, 0,195, 64,198, 0, 0, 0,218,128, 1, 0, 22, 0, 3, +128,197, 0, 0, 1, 0, 1, 0, 1, 64, 0,195, 65,134, 2, 0, 64,220, 0,128, + 0, 30, 0, 0, 0, 15, 4, 0, 0, 0, 6, 99,111,108,111,114, 0, 4, 0, 0, + 0, 13, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 0, 0, 0, 6, + 67, 79, 76, 79, 82, 0, 4, 0, 0, 0, 6,115,116, 97,116,101, 0, 4, 0, 0, + 0, 6, 83, 84, 65, 84, 69, 0, 4, 0, 0, 0, 10,116,105,116,108,101,102,111, +110,116, 0, 4, 0, 0, 0, 10, 84, 73, 84, 76, 69, 70, 79, 78, 84, 0, 4, 0, + 0, 0, 7,109, 97,114,107,101,100, 0, 4, 0, 0, 0, 7, 77, 65, 82, 75, 69, + 68, 0, 4, 0, 0, 0, 6,105,109, 97,103,101, 0, 4, 0, 0, 0, 6, 73, 77, + 65, 71, 69, 0, 4, 0, 0, 0, 14,105,109, 97,103,101,101,120,112, 97,110,100, +101,100, 0, 4, 0, 0, 0, 14, 73, 77, 65, 71, 69, 69, 88, 80, 65, 78, 68, 69, + 68, 0, 4, 0, 0, 0, 7,117,115,101,114,105,100, 0, 4, 0, 0, 0, 14, 84, +114,101,101, 83,101,116, 85,115,101,114, 73,100, 0, 0, 0, 0, 0, 0, 0, 0, + 69, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, + 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, + 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, + 31, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, + 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, + 32, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, + 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, + 33, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, + 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, + 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, + 35, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, + 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, + 3, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 68, + 0, 0, 0, 5,110,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, + 3,105,100, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 1, 0, 0, 0, 23, + 84,114,101,101, 83,101,116, 65,116,116,114,105, 98,117,116,101, 72, 97,110,100, +108,101, 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 60, 0, 3, 0, 9, 0, + 0, 0, 61, 0,192, 0, 23,128, 0, 0, 22, 0,128, 0, 30, 0,128, 0,212,128, +128,192, 25,128, 13, 64, 22, 0,128,193, 6, 0, 0,129, 69, 2, 0, 1,128, 1, + 0,129, 92, 2,192,192, 23,128, 9, 0, 22, 2, 65, 1, 70, 0, 0, 1, 90,128, + 4, 64, 22, 0, 1, 65, 69, 0, 0, 1,128, 0, 1,129,193, 1, 0, 2, 0, 3, +130, 1,213, 2, 65, 2, 6, 2, 0, 65, 92, 0, 1,193, 69, 0, 0, 1,128, 2, + 0, 1,192, 1, 66, 2, 12, 2, 0, 65, 92, 0, 2, 65, 69, 0, 0, 1,128, 2, + 0, 1,192, 1, 66, 2, 12, 2, 0, 65, 92,128, 6, 0, 22, 2, 66,129, 70, 0, + 0, 1, 90,128, 5, 64, 22, 0, 1, 65, 69, 0, 0, 1,128, 0, 2,193,193, 1, + 0, 2, 0, 3,130, 1,213, 2, 66,130, 6, 2, 0, 65, 92, 0, 1,193, 69, 0, + 0, 1,128, 2, 0, 1,192, 1, 66, 2, 12, 2, 0, 65, 92,128, 2, 0, 22, 0, + 0, 1, 26,128, 1,128, 22, 0, 1, 65, 69, 0, 0, 1,128, 0, 2,193,193, 1, + 0, 2, 0, 3,130, 1,213, 2, 0, 2, 0, 2, 0, 65, 92, 1,194, 0,205,127, +241,192, 22, 0,128, 0, 30, 0, 0, 0, 12, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 5,116,121,112,101, 0, 4, 0, 0, 0, 6,116, 97, 98,108, +101, 0, 4, 0, 0, 0, 11, 98,114, 97,110, 99,104,110, 97,109,101, 0, 4, 0, + 0, 0, 13, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 0, 0, 0, + 10, 65, 68, 68, 66, 82, 65, 78, 67, 72, 0, 4, 0, 0, 0, 18, 84,114,101,101, + 83,101,116, 78,111,100,101, 65,116,116,114,105, 98, 0, 3, 63,240, 0, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, + 82,101, 99, 0, 4, 0, 0, 0, 9,108,101, 97,102,110, 97,109,101, 0, 4, 0, + 0, 0, 8, 65, 68, 68, 76, 69, 65, 70, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, + 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 41, 0, 0, 0, 42, 0, + 0, 0, 42, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, + 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, + 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, + 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, + 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, + 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 49, 0, 0, 0, 49, 0, + 0, 0, 49, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, + 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 51, 0, + 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 54, 0, + 0, 0, 54, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, + 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 58, 0, 0, 0, 58, 0, + 0, 0, 60, 0, 0, 0, 5, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, + 0, 0, 0, 0, 0, 60, 0, 0, 0, 2,116, 0, 0, 0, 0, 0, 0, 0, 0, 60, + 0, 0, 0, 3,105,100, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 5, 99, +111,110,116, 0, 0, 0, 0, 4, 0, 0, 0, 60, 0, 0, 0, 5,110,111,100,101, + 0, 0, 0, 0, 7, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 62, 0, 0, 0, 69, 0, 3, 0, 7, 0, 0, 0, 22, 0, 0, 64,154,128, 3, 64, + 22, 0, 0, 0,129, 0,192, 64,198, 0, 0, 0,218,128, 1, 0, 22, 0, 0,128, +197, 0, 0, 1, 0, 0, 0,193, 65, 0,192, 65,134, 2, 0, 64,220, 0, 1, 0, +197, 0, 0, 1, 0, 0,128, 1, 64, 0, 0, 1,129, 2, 0, 64,220, 0, 1, 64, +197, 0, 0, 1, 0, 0,128, 1, 64, 1, 0, 1,128, 2, 0, 64,220, 0,128, 0, + 30, 0, 0, 0, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 11, 98, +114, 97,110, 99,104,110, 97,109,101, 0, 4, 0, 0, 0, 13, 83,101,116, 65,116, +116,114,105, 98,117,116,101, 0, 4, 0, 0, 0, 7, 84, 73, 84, 76, 69, 48, 0, + 4, 0, 0, 0, 18, 84,114,101,101, 83,101,116, 78,111,100,101, 65,116,116,114, +105, 98, 0, 4, 0, 0, 0, 16, 84,114,101,101, 83,101,116, 86, 97,108,117,101, + 82,101, 99, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 64, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, + 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 66, + 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 68, + 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 69, + 0, 0, 0, 3, 0, 0, 0, 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, + 0, 0, 21, 0, 0, 0, 2,116, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, + 3,105,100, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 71, 0, 0, 0, 73, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0,133, + 0,128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, + 5, 84,114,101,101, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 72, 0, 0, + 0, 72, 0, 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, + 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 4, + 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, + 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, + 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 18, + 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 27, 0, 0, 0, 37, + 0, 0, 0, 37, 0, 0, 0, 29, 0, 0, 0, 60, 0, 0, 0, 39, 0, 0, 0, 69, + 0, 0, 0, 62, 0, 0, 0, 73, 0, 0, 0, 71, 0, 0, 0, 75, 0, 0, 0, 75, + 0, 0, 0, 75, 0, 0, 0, 76, 0, 0, 0, 76, 0, 0, 0, 76, 0, 0, 0, 76, + 0, 0, 0, 76, 0, 0, 0, 2, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, + 19, 0, 0, 0, 36, 0, 0, 0, 23, 84,114,101,101, 83,101,116, 65,116,116,114, +105, 98,117,116,101, 72, 97,110,100,108,101, 0, 0, 0, 0, 20, 0, 0, 0, 36, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/tree_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/tree_be64.loh b/iup/srclua5/loh/tree_be64.loh new file mode 100755 index 0000000..49a23fa --- /dev/null +++ b/iup/srclua5/loh/tree_be64.loh @@ -0,0 +1,195 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/tree_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/tree_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,116,114,101,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 5, 37, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,192, 2, 0, 73, 0,194,131, 73, 0,194,132, 73,192, + 66,133, 73,192, 66,134, 73,192,194,134, 73,192, 67,135, 73,192, 67,136, 73,192, +195,136, 73,192, 66,137, 73,192,194,137, 73, 64, 69,138, 9, 64, 0,131, 9,192, + 69,139,100, 0, 0, 0,164, 64, 0, 0, 0, 0,128, 0,135, 0, 6, 0,164,128, + 0, 0,135, 64, 6, 0,164,192, 0, 0,135,128, 6, 0,164, 0, 1, 0, 9,128, +128,141,133, 0, 7, 0,192, 0, 0, 0,156, 64, 0, 1,133, 64, 7, 0,192, 0, + 0, 0, 1,129, 7, 0,156, 64,128, 1, 30, 0,128, 0, 31, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,116,114,101,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, + 97, 99,107, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,115,101,108,101, 99,116,105, +111,110, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, 4, 18, + 0, 0, 0, 0, 0, 0, 0,109,117,108,116,105,115,101,108,101, 99,116,105,111, +110, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 98,114, 97,110, 99,104, +111,112,101,110, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, + 15, 0, 0, 0, 0, 0, 0, 0, 98,114, 97,110, 99,104, 99,108,111,115,101, 95, + 99, 98, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,101,120,101, 99,117,116,101,108, +101, 97,102, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,114,101,110, 97, +109,101,110,111,100,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110, +115, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,110,111,100,101,114,101,109,111,118, +101,100, 95, 99, 98, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,114,101,110, 97,109, +101, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115,104,111,119,114,101, +110, 97,109,101, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,114,105,103, +104,116, 99,108,105, 99,107, 95, 99, 98, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +100,114, 97,103,100,114,111,112, 95, 99, 98, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,110,110,110, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97, +102,117,110, 99,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 18, 0, 0, 0, + 0, 0, 0, 0, 84,114,101,101, 83,101,116, 78,111,100,101, 65,116,116,114,105, + 98, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, 83,101,116, 86, 97, +108,117,101, 82,101, 99, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, + 83,101,116, 86, 97,108,117,101, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114, +101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, + 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 27, 0, 0, 0, + 0, 3, 0, 7, 15, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 1,220,128, 0, 1, + 23, 64,192, 1, 22,192, 0,128,197,128, 0, 0, 0, 1, 0, 1,220,128, 0, 1, +128, 0,128, 1,197,192, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1, +220, 64, 0, 2, 30, 0,128, 0, 4, 0, 0, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 16, 0, 0, 0, 0, 0, + 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109,101, 0, 4, 13, + 0, 0, 0, 0, 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, + 0, 0, 0, 0, 15, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, + 26, 0, 0, 0, 27, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 14, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,110, 97,109,101, 0, 0, 0, 0, 0, 14, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0,118, 97,108,117,101, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 37, 0, 0, 0, 1, 3, + 0, 7, 69, 0, 0, 0,198, 0,192, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65,129, 0, 0,128, 1, 0, 1, 85,129,129, 2,134, 1, +192, 0,220, 64, 0, 2,198,192,192, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65, 1, 1, 0,128, 1, 0, 1, 85,129,129, 2,134,193, +192, 0,220, 64, 0, 2,198, 64,193, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65,129, 1, 0,128, 1, 0, 1, 85,129,129, 2,134, 65, +193, 0,220, 64, 0, 2,198,192,193, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65, 1, 2, 0,128, 1, 0, 1, 85,129,129, 2,134,193, +193, 0,220, 64, 0, 2,198, 64,194, 0,218, 0, 0, 0, 22,128, 1,128,196, 0, + 0, 0, 0, 1, 0, 0, 65,129, 2, 0,128, 1, 0, 1, 85,129,129, 2,134, 65, +194, 0,220, 64, 0, 2,198,192,194, 0,218, 0, 0, 0, 22,128, 1,128,196, 0, + 0, 0, 0, 1, 0, 0, 65, 1, 3, 0,128, 1, 0, 1, 85,129,129, 2,134,193, +194, 0,220, 64, 0, 2,198, 64,195, 0,218, 0, 0, 0, 22, 0, 1,128,197,128, + 3, 0, 0, 1, 0, 0, 64, 1, 0, 1,134, 65,195, 0,220, 64, 0, 2, 30, 0, +128, 0, 15, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, + 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 67, 79, 76, 79, 82, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,101, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 83, 84, 65, 84, 69, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,116,105,116, +108,101,102,111,110,116, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 84, 73, 84, 76, + 69, 70, 79, 78, 84, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97,114,107,101, +100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 77, 65, 82, 75, 69, 68, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 73, 77, 65, 71, 69, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,105,109, 97, +103,101,101,120,112, 97,110,100,101,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 73, 77, 65, 71, 69, 69, 88, 80, 65, 78, 68, 69, 68, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,117,115,101,114,105,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 84, +114,101,101, 83,101,116, 85,115,101,114, 73,100, 0, 0, 0, 0, 0, 69, 0, 0, + 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, + 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, + 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, + 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, + 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, + 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, + 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, + 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, + 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 3, 0, 0, + 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, + 68, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110,111,100,101, 0, 0, 0, 0, + 0, 68, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,105,100, 0, 0, 0, 0, 0, + 68, 0, 0, 0, 1, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, + 83,101,116, 65,116,116,114,105, 98,117,116,101, 72, 97,110,100,108,101, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 60, 0, 0, 0, 0, 3, 0, 9, 61, + 0, 0, 0, 23, 0,192, 0, 22, 0, 0,128, 30, 0,128, 0,212, 0,128, 0, 25, +192,128,128, 22, 64, 13,128, 6,193,128, 0, 69,129, 0, 0,128, 1, 0, 2, 92, +129, 0, 1, 23,192,192, 2, 22, 0, 9,128, 70, 1, 65, 2, 90, 1, 0, 0, 22, + 64, 4,128, 69, 65, 1, 0,128, 1, 0, 0,193,129, 1, 0, 0, 2, 0, 1,213, + 1,130, 3, 6, 2, 65, 2, 92, 65, 0, 2, 69,193, 1, 0,128, 1, 0, 0,192, + 1, 0, 2, 12, 2, 66, 1, 92, 65, 0, 2, 69, 65, 2, 0,128, 1, 0, 0,192, + 1, 0, 2, 12, 2, 66, 1, 92, 65, 0, 2, 22, 0, 6,128, 70,129, 66, 2, 90, + 1, 0, 0, 22, 64, 5,128, 69, 65, 1, 0,128, 1, 0, 0,193,193, 2, 0, 0, + 2, 0, 1,213, 1,130, 3, 6,130, 66, 2, 92, 65, 0, 2, 69,193, 1, 0,128, + 1, 0, 0,192, 1, 0, 2, 12, 2, 66, 1, 92, 65, 0, 2, 22, 0, 2,128, 26, + 1, 0, 0, 22,128, 1,128, 69, 65, 1, 0,128, 1, 0, 0,193,193, 2, 0, 0, + 2, 0, 1,213, 1,130, 3, 0, 2, 0, 2, 92, 65, 0, 2,205, 0,194, 1, 22, +192,241,127, 30, 0,128, 0, 12, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,116, 97, 98,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 98, +114, 97,110, 99,104,110, 97,109,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 83, +101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, + 0, 65, 68, 68, 66, 82, 65, 78, 67, 72, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, + 84,114,101,101, 83,101,116, 78,111,100,101, 65,116,116,114,105, 98, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 4, 16, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, + 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0,108,101, 97,102,110, 97,109,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 65, + 68, 68, 76, 69, 65, 70, 0, 0, 0, 0, 0, 61, 0, 0, 0, 40, 0, 0, 0, 40, + 0, 0, 0, 40, 0, 0, 0, 41, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, + 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, + 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, 0, 46, + 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, + 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, + 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, + 0, 0, 0, 48, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 50, + 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, + 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, + 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 55, + 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, + 0, 0, 0, 55, 0, 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 60, 0, 0, 0, 5, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, + 0, 0, 60, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0, 0, + 60, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,105,100, 0, 0, 0, 0, 0, 60, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,111,110,116, 0, 4, 0, 0, 0, + 60, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110,111,100,101, 0, 7, 0, 0, + 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, + 0, 69, 0, 0, 0, 0, 3, 0, 7, 22, 0, 0, 0,154, 64, 0, 0, 22, 64, 3, +128,129, 0, 0, 0,198, 64,192, 0,218, 0, 0, 0, 22, 0, 1,128,197,128, 0, + 0, 0, 1, 0, 0, 65,193, 0, 0,134, 65,192, 0,220, 64, 0, 2,197, 0, 1, + 0, 0, 1, 0, 0, 64, 1,128, 0,129, 1, 0, 0,220, 64, 0, 2,197, 64, 1, + 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, + 0, 6, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0, 98,114, 97,110, 99,104,110, 97,109,101, 0, 4, 13, 0, 0, 0, 0, + 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 84, 73, 84, 76, 69, 48, 0, 4, 18, 0, 0, 0, 0, 0, 0, + 0, 84,114,101,101, 83,101,116, 78,111,100,101, 65,116,116,114,105, 98, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, 83,101,116, 86, 97,108,117,101, + 82,101, 99, 0, 0, 0, 0, 0, 22, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, + 64, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, + 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 66, 0, 0, 0, + 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 68, 0, 0, 0, + 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 0, + 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 21, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0, + 0, 21, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,105,100, 0, 0, 0, 0, 0, + 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, + 73, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0, +158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0, 84,114,101,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 72, 0, 0, 0, 72, 0, + 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 37, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, + 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, + 27, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 29, 0, 0, 0, 60, 0, 0, 0, + 39, 0, 0, 0, 69, 0, 0, 0, 62, 0, 0, 0, 73, 0, 0, 0, 71, 0, 0, 0, + 75, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 76, 0, 0, 0, 76, 0, 0, 0, + 76, 0, 0, 0, 76, 0, 0, 0, 76, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 99,116,114,108, 0, 19, 0, 0, 0, 36, 0, 0, 0, 23, 0, 0, + 0, 0, 0, 0, 0, 84,114,101,101, 83,101,116, 65,116,116,114,105, 98,117,116, +101, 72, 97,110,100,108,101, 0, 20, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, + +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/tree_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/tree_le64.loh b/iup/srclua5/loh/tree_le64.loh new file mode 100755 index 0000000..dbfc0a1 --- /dev/null +++ b/iup/srclua5/loh/tree_le64.loh @@ -0,0 +1,195 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/tree_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/tree_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,116,114,101,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 5, 37, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,192, 2, 0, 73, 0,194,131, 73, 0,194,132, 73,192, + 66,133, 73,192, 66,134, 73,192,194,134, 73,192, 67,135, 73,192, 67,136, 73,192, +195,136, 73,192, 66,137, 73,192,194,137, 73, 64, 69,138, 9, 64, 0,131, 9,192, + 69,139,100, 0, 0, 0,164, 64, 0, 0, 0, 0,128, 0,135, 0, 6, 0,164,128, + 0, 0,135, 64, 6, 0,164,192, 0, 0,135,128, 6, 0,164, 0, 1, 0, 9,128, +128,141,133, 0, 7, 0,192, 0, 0, 0,156, 64, 0, 1,133, 64, 7, 0,192, 0, + 0, 0, 1,129, 7, 0,156, 64,128, 1, 30, 0,128, 0, 31, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,116,114,101,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, + 97, 99,107, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,115,101,108,101, 99,116,105, +111,110, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110,110, 0, 4, 18, + 0, 0, 0, 0, 0, 0, 0,109,117,108,116,105,115,101,108,101, 99,116,105,111, +110, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 98,114, 97,110, 99,104, +111,112,101,110, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,110, 0, 4, + 15, 0, 0, 0, 0, 0, 0, 0, 98,114, 97,110, 99,104, 99,108,111,115,101, 95, + 99, 98, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,101,120,101, 99,117,116,101,108, +101, 97,102, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,114,101,110, 97, +109,101,110,111,100,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110, +115, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,110,111,100,101,114,101,109,111,118, +101,100, 95, 99, 98, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,114,101,110, 97,109, +101, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115,104,111,119,114,101, +110, 97,109,101, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,114,105,103, +104,116, 99,108,105, 99,107, 95, 99, 98, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +100,114, 97,103,100,114,111,112, 95, 99, 98, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,110,110,110, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97, +102,117,110, 99,115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 18, 0, 0, 0, + 0, 0, 0, 0, 84,114,101,101, 83,101,116, 78,111,100,101, 65,116,116,114,105, + 98, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, 83,101,116, 86, 97, +108,117,101, 82,101, 99, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, + 83,101,116, 86, 97,108,117,101, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114, +101, 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, + 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, + 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 27, 0, 0, 0, + 0, 3, 0, 7, 15, 0, 0, 0,197, 0, 0, 0, 0, 1, 0, 1,220,128, 0, 1, + 23, 64,192, 1, 22,192, 0,128,197,128, 0, 0, 0, 1, 0, 1,220,128, 0, 1, +128, 0,128, 1,197,192, 0, 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1, +220, 64, 0, 2, 30, 0,128, 0, 4, 0, 0, 0, 4, 12, 0, 0, 0, 0, 0, 0, + 0,105,117,112, 71,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, + 0, 0,105,117,112, 32,104, 97,110,100,108,101, 0, 4, 16, 0, 0, 0, 0, 0, + 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109,101, 0, 4, 13, + 0, 0, 0, 0, 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, + 0, 0, 0, 0, 15, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, + 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, + 26, 0, 0, 0, 27, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 14, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0,110, 97,109,101, 0, 0, 0, 0, 0, 14, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0,118, 97,108,117,101, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 37, 0, 0, 0, 1, 3, + 0, 7, 69, 0, 0, 0,198, 0,192, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65,129, 0, 0,128, 1, 0, 1, 85,129,129, 2,134, 1, +192, 0,220, 64, 0, 2,198,192,192, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65, 1, 1, 0,128, 1, 0, 1, 85,129,129, 2,134,193, +192, 0,220, 64, 0, 2,198, 64,193, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65,129, 1, 0,128, 1, 0, 1, 85,129,129, 2,134, 65, +193, 0,220, 64, 0, 2,198,192,193, 0,218, 0, 0, 0, 22,128, 1,128,197, 64, + 0, 0, 0, 1, 0, 0, 65, 1, 2, 0,128, 1, 0, 1, 85,129,129, 2,134,193, +193, 0,220, 64, 0, 2,198, 64,194, 0,218, 0, 0, 0, 22,128, 1,128,196, 0, + 0, 0, 0, 1, 0, 0, 65,129, 2, 0,128, 1, 0, 1, 85,129,129, 2,134, 65, +194, 0,220, 64, 0, 2,198,192,194, 0,218, 0, 0, 0, 22,128, 1,128,196, 0, + 0, 0, 0, 1, 0, 0, 65, 1, 3, 0,128, 1, 0, 1, 85,129,129, 2,134,193, +194, 0,220, 64, 0, 2,198, 64,195, 0,218, 0, 0, 0, 22, 0, 1,128,197,128, + 3, 0, 0, 1, 0, 0, 64, 1, 0, 1,134, 65,195, 0,220, 64, 0, 2, 30, 0, +128, 0, 15, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 99,111,108,111,114, + 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117, +116,101, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 67, 79, 76, 79, 82, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,115,116, 97,116,101, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 83, 84, 65, 84, 69, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,116,105,116, +108,101,102,111,110,116, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0, 84, 73, 84, 76, + 69, 70, 79, 78, 84, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,109, 97,114,107,101, +100, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 77, 65, 82, 75, 69, 68, 0, 4, 6, + 0, 0, 0, 0, 0, 0, 0,105,109, 97,103,101, 0, 4, 6, 0, 0, 0, 0, 0, + 0, 0, 73, 77, 65, 71, 69, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,105,109, 97, +103,101,101,120,112, 97,110,100,101,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, + 73, 77, 65, 71, 69, 69, 88, 80, 65, 78, 68, 69, 68, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,117,115,101,114,105,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 84, +114,101,101, 83,101,116, 85,115,101,114, 73,100, 0, 0, 0, 0, 0, 69, 0, 0, + 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, + 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, + 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, + 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, + 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, + 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, + 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, + 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, + 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, + 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 37, 0, 0, 0, 3, 0, 0, + 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, + 68, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110,111,100,101, 0, 0, 0, 0, + 0, 68, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,105,100, 0, 0, 0, 0, 0, + 68, 0, 0, 0, 1, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, + 83,101,116, 65,116,116,114,105, 98,117,116,101, 72, 97,110,100,108,101, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 60, 0, 0, 0, 0, 3, 0, 9, 61, + 0, 0, 0, 23, 0,192, 0, 22, 0, 0,128, 30, 0,128, 0,212, 0,128, 0, 25, +192,128,128, 22, 64, 13,128, 6,193,128, 0, 69,129, 0, 0,128, 1, 0, 2, 92, +129, 0, 1, 23,192,192, 2, 22, 0, 9,128, 70, 1, 65, 2, 90, 1, 0, 0, 22, + 64, 4,128, 69, 65, 1, 0,128, 1, 0, 0,193,129, 1, 0, 0, 2, 0, 1,213, + 1,130, 3, 6, 2, 65, 2, 92, 65, 0, 2, 69,193, 1, 0,128, 1, 0, 0,192, + 1, 0, 2, 12, 2, 66, 1, 92, 65, 0, 2, 69, 65, 2, 0,128, 1, 0, 0,192, + 1, 0, 2, 12, 2, 66, 1, 92, 65, 0, 2, 22, 0, 6,128, 70,129, 66, 2, 90, + 1, 0, 0, 22, 64, 5,128, 69, 65, 1, 0,128, 1, 0, 0,193,193, 2, 0, 0, + 2, 0, 1,213, 1,130, 3, 6,130, 66, 2, 92, 65, 0, 2, 69,193, 1, 0,128, + 1, 0, 0,192, 1, 0, 2, 12, 2, 66, 1, 92, 65, 0, 2, 22, 0, 2,128, 26, + 1, 0, 0, 22,128, 1,128, 69, 65, 1, 0,128, 1, 0, 0,193,193, 2, 0, 0, + 2, 0, 1,213, 1,130, 3, 0, 2, 0, 2, 92, 65, 0, 2,205, 0,194, 1, 22, +192,241,127, 30, 0,128, 0, 12, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 4, 6, 0, 0, 0, + 0, 0, 0, 0,116, 97, 98,108,101, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 98, +114, 97,110, 99,104,110, 97,109,101, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 83, +101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, + 0, 65, 68, 68, 66, 82, 65, 78, 67, 72, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0, + 84,114,101,101, 83,101,116, 78,111,100,101, 65,116,116,114,105, 98, 0, 3, 0, + 0, 0, 0, 0, 0,240, 63, 4, 16, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, + 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0,108,101, 97,102,110, 97,109,101, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 65, + 68, 68, 76, 69, 65, 70, 0, 0, 0, 0, 0, 61, 0, 0, 0, 40, 0, 0, 0, 40, + 0, 0, 0, 40, 0, 0, 0, 41, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 43, + 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, + 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 45, 0, 0, 0, 46, 0, 0, 0, 46, + 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, + 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, 0, 0, 0, 47, + 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, + 0, 0, 0, 48, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 50, + 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, + 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, + 0, 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 55, + 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, 0, 0, 0, 55, + 0, 0, 0, 55, 0, 0, 0, 58, 0, 0, 0, 58, 0, 0, 0, 60, 0, 0, 0, 5, + 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, + 0, 0, 60, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0, 0, + 60, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,105,100, 0, 0, 0, 0, 0, 60, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,111,110,116, 0, 4, 0, 0, 0, + 60, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,110,111,100,101, 0, 7, 0, 0, + 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, + 0, 69, 0, 0, 0, 0, 3, 0, 7, 22, 0, 0, 0,154, 64, 0, 0, 22, 64, 3, +128,129, 0, 0, 0,198, 64,192, 0,218, 0, 0, 0, 22, 0, 1,128,197,128, 0, + 0, 0, 1, 0, 0, 65,193, 0, 0,134, 65,192, 0,220, 64, 0, 2,197, 0, 1, + 0, 0, 1, 0, 0, 64, 1,128, 0,129, 1, 0, 0,220, 64, 0, 2,197, 64, 1, + 0, 0, 1, 0, 0, 64, 1,128, 0,128, 1, 0, 1,220, 64, 0, 2, 30, 0,128, + 0, 6, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0, 98,114, 97,110, 99,104,110, 97,109,101, 0, 4, 13, 0, 0, 0, 0, + 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 84, 73, 84, 76, 69, 48, 0, 4, 18, 0, 0, 0, 0, 0, 0, + 0, 84,114,101,101, 83,101,116, 78,111,100,101, 65,116,116,114,105, 98, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, 83,101,116, 86, 97,108,117,101, + 82,101, 99, 0, 0, 0, 0, 0, 22, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, + 64, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, + 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 65, 0, 0, 0, 66, 0, 0, 0, + 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 66, 0, 0, 0, 68, 0, 0, 0, + 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 0, + 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 21, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0, + 0, 21, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,105,100, 0, 0, 0, 0, 0, + 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, + 73, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0, +158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0, 84,114,101,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 72, 0, 0, 0, 72, 0, + 0, 0, 72, 0, 0, 0, 73, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 37, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, + 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, + 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, + 27, 0, 0, 0, 37, 0, 0, 0, 37, 0, 0, 0, 29, 0, 0, 0, 60, 0, 0, 0, + 39, 0, 0, 0, 69, 0, 0, 0, 62, 0, 0, 0, 73, 0, 0, 0, 71, 0, 0, 0, + 75, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 76, 0, 0, 0, 76, 0, 0, 0, + 76, 0, 0, 0, 76, 0, 0, 0, 76, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 99,116,114,108, 0, 19, 0, 0, 0, 36, 0, 0, 0, 23, 0, 0, + 0, 0, 0, 0, 0, 84,114,101,101, 83,101,116, 65,116,116,114,105, 98,117,116, +101, 72, 97,110,100,108,101, 0, 20, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, + +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/tree_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/tree_le64w.loh b/iup/srclua5/loh/tree_le64w.loh new file mode 100755 index 0000000..ebc6aae --- /dev/null +++ b/iup/srclua5/loh/tree_le64w.loh @@ -0,0 +1,112 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/tree_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/tree_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,116,114,101,101, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 33, 0, 0, 0, 10,128, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74,128, 2, 0, 73, 0,194,131, 73, 0,194,132, 73,192, + 66,133, 73,192, 66,134, 73,192,194,134, 73,192, 67,135, 73,192, 67,136, 73,192, +194,136, 73,192, 66,137, 73, 0,197,137, 9, 64, 0,131, 9,128,197,138, 9, 0, +198,139,100, 0, 0, 0, 71, 64, 6, 0,100, 64, 0, 0, 71,128, 6, 0,100,128, + 0, 0, 9, 64,128,141, 69, 0, 7, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, + 7, 0,128, 0, 0, 0,193,128, 7, 0, 92, 64,128, 1, 30, 0,128, 0, 31, 0, + 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, + 0, 0, 0, 0, 0,116,114,101,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, + 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, + 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, + 97,108,108, 98, 97, 99,107, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0,115,101,108, +101, 99,116,105,111,110, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0,110, +110, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,109,117,108,116,105,115,101,108,101, + 99,116,105,111,110, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 98,114, + 97,110, 99,104,111,112,101,110, 95, 99, 98, 0, 4, 2, 0, 0, 0, 0, 0, 0, + 0,110, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, 98,114, 97,110, 99,104, 99,108, +111,115,101, 95, 99, 98, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0,101,120,101, 99, +117,116,101,108,101, 97,102, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, +114,101,110, 97,109,101,110,111,100,101, 95, 99, 98, 0, 4, 3, 0, 0, 0, 0, + 0, 0, 0,110,115, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,114,101,110, 97,109, +101, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,115,104,111,119,114,101, +110, 97,109,101, 95, 99, 98, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0,114,105,103, +104,116, 99,108,105, 99,107, 95, 99, 98, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0, +100,114, 97,103,100,114,111,112, 95, 99, 98, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,110,110,110,110, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117, +100,101, 0, 4, 10, 0, 0, 0, 0, 0, 0, 0,105,117,112,116,114,101,101, 46, +104, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,101,120,116,114, 97,102,117,110, 99, +115, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 16, 0, 0, 0, 0, 0, 0, 0, + 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, 4, 13, 0, 0, + 0, 0, 0, 0, 0, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 0, 4, 14, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110,116, + 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101, +114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117,112, + 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 24, 0, 0, 0, 40, 0, 0, 0, 0, 3, 0, 8, 45, 0, 0, 0, 23, 0,192, + 0, 22, 0, 0,128, 30, 0,128, 0,197, 64, 0, 0,198,128,192, 1, 0, 1,128, + 0,220,128, 0, 1, 25,192,128,129, 22,128, 8,128, 5, 1, 1, 0, 70,193,128, + 0, 28,129, 0, 1, 23, 64, 64, 2, 22, 64, 4,128, 6,193,128, 0, 6, 65, 65, + 2, 87, 0, 64, 2, 22,192, 5,128, 5,129, 1, 0, 64, 1, 0, 0,129,193, 1, + 0,192, 1, 0, 1,149,193, 1, 3,198,193,128, 0,198, 65,193, 3, 28, 65, 0, + 2, 5, 1, 2, 0, 64, 1, 0, 0,134,193,128, 0,204, 65, 66, 1, 28, 65, 0, + 2, 22, 64, 2,128, 6,193,128, 0, 26, 1, 0, 0, 22,128, 1,128, 5,129, 1, + 0, 64, 1, 0, 0,129,129, 2, 0,192, 1, 0, 1,149,193, 1, 3,198,193,128, + 0, 28, 65, 0, 2,205, 64,194, 1, 22,128,246,127, 30, 0,128, 0, 11, 0, 0, + 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0,116, 97, 98,108,101, 0, 4, 5, 0, + 0, 0, 0, 0, 0, 0,103,101,116,110, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,116,121,112,101, 0, 4, 11, 0, 0, 0, 0, + 0, 0, 0, 98,114, 97,110, 99,104,110, 97,109,101, 0, 4, 13, 0, 0, 0, 0, + 0, 0, 0, 83,101,116, 65,116,116,114,105, 98,117,116,101, 0, 4, 10, 0, 0, + 0, 0, 0, 0, 0, 65, 68, 68, 66, 82, 65, 78, 67, 72, 0, 4, 16, 0, 0, 0, + 0, 0, 0, 0, 84,114,101,101, 83,101,116, 86, 97,108,117,101, 82,101, 99, 0, + 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 8, 0, 0, 0, 0, 0, 0, 0, 65, 68, + 68, 76, 69, 65, 70, 0, 0, 0, 0, 0, 45, 0, 0, 0, 25, 0, 0, 0, 25, 0, + 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, + 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, + 0, 0, 29, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, + 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, + 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, 0, + 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 34, 0, 0, 0, 35, 0, 0, 0, 35, 0, + 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, 0, 0, 35, 0, + 0, 0, 38, 0, 0, 0, 38, 0, 0, 0, 40, 0, 0, 0, 4, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 44, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0, 0, 44, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0,105,100, 0, 0, 0, 0, 0, 44, 0, 0, 0, 5, 0, + 0, 0, 0, 0, 0, 0, 99,111,110,116, 0, 7, 0, 0, 0, 44, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 47, 0, 0, 0, 0, + 2, 0, 6, 14, 0, 0, 0,134, 0,192, 0, 87, 64, 64, 1, 22, 0, 1,128,133, +128, 0, 0,192, 0, 0, 0, 1,193, 0, 0, 70, 1,192, 0,156, 64, 0, 2,133, + 0, 1, 0,192, 0, 0, 0, 0, 1,128, 0, 65, 65, 1, 0,156, 64, 0, 2, 30, + 0,128, 0, 6, 0, 0, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 98,114, 97,110, + 99,104,110, 97,109,101, 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, 0, 83,101,116, + 65,116,116,114,105, 98,117,116,101, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 78, + 65, 77, 69, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 84,114,101,101, 83,101,116, + 86, 97,108,117,101, 82,101, 99, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 14, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 44, 0, + 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 44, 0, 0, 0, 46, 0, + 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 46, 0, 0, 0, 47, 0, + 0, 0, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, + 0, 0, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, + 0, 0, 0, 51, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, + 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, + 0, 0, 0, 0, 84,114,101,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 50, 0, 0, + 0, 50, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 33, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, + 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, + 0, 0, 0, 40, 0, 0, 0, 24, 0, 0, 0, 47, 0, 0, 0, 42, 0, 0, 0, 51, + 0, 0, 0, 49, 0, 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 53, 0, 0, 0, 54, + 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 19, 0, 0, 0, + 32, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/tree_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/user.loh b/iup/srclua5/loh/user.loh new file mode 100755 index 0000000..79e6b0d --- /dev/null +++ b/iup/srclua5/loh/user.loh @@ -0,0 +1,36 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/user.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/user.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,117,115,101, +114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 17, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,131, 69, 0, + 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, 0, 0,193,128, + 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0,117,115,101,114, 0, 4, 7, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, 0, 0, 4, 9, + 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 14, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32, +119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, + 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, + 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 85,115,101,114, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, + 0, 14, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 14, + 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/user.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/user_be32.loh b/iup/srclua5/loh/user_be32.loh new file mode 100755 index 0000000..953c75d --- /dev/null +++ b/iup/srclua5/loh/user_be32.loh @@ -0,0 +1,36 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/user_be32.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/user_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,117,115,101, +114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 17, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131,128, 64, 9, 0, 2, + 0, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2, 64, 69, 0, 0, 0,128, 0, 2, +128,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 11, 4, 0, 0, 0, 5,110, +105, 99,107, 0, 4, 0, 0, 0, 5,117,115,101,114, 0, 4, 0, 0, 0, 7,112, + 97,114,101,110,116, 0, 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, + 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 1, 0, 4, 0, + 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 14, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32, +119,105,100,103,101,116, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 12, 0, + 0, 0, 14, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0,133, 0,128, 0,157, 0, + 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 5, 85,115,101,114, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 0, 14, 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 5, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, 0, + 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, + 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, + 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 7, 0, 0, 0, 16, + 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/user_be32.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/user_be64.loh b/iup/srclua5/loh/user_be64.loh new file mode 100755 index 0000000..a53b5c1 --- /dev/null +++ b/iup/srclua5/loh/user_be64.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/user_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/user_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,117,115,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, + 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,117,115,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, + 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69, +108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 3, 4, + 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 85,115,101,114, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, + 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/user_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/user_le64.loh b/iup/srclua5/loh/user_le64.loh new file mode 100755 index 0000000..3a16a8e --- /dev/null +++ b/iup/srclua5/loh/user_le64.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/user_le64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/user_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,117,115,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, + 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,117,115,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, + 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69, +108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 3, 4, + 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 85,115,101,114, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, + 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/user_le64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/user_le64w.loh b/iup/srclua5/loh/user_le64w.loh new file mode 100755 index 0000000..8357384 --- /dev/null +++ b/iup/srclua5/loh/user_le64w.loh @@ -0,0 +1,39 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/user_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/user_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,117,115,101,114, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 17, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131, 69, 0, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69, 64, 2, 0,128, 0, + 0, 0,193,128, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 11, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,117,115,101,114, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, + 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, + 97, 99,107, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69, +108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 3, 4, + 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, + 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 85,115,101,114, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 9, + 0, 0, 0, 14, 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, + 7, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/user_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/val.loh b/iup/srclua5/loh/val.loh new file mode 100755 index 0000000..7eff35b --- /dev/null +++ b/iup/srclua5/loh/val.loh @@ -0,0 +1,41 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/val.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/val.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 9, 0, 0, 0, 64,118, 97,108, + 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 20, 0, 0, + 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, 65, +130, 74,192, 0, 0, 73, 0,194,131, 73, 0,194,132, 73, 0, 66,133, 9, 64, 0, +131,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, 0, 92, 64, 0, + 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, 1, 30, 0,128, + 0, 15, 0, 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 4, 0, 0, 0, +118, 97,108, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111, +110, 0, 4, 2, 0, 0, 0,115, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, + 99,107, 0, 4, 13, 0, 0, 0,109,111,117,115,101,109,111,118,101, 95, 99, 98, + 0, 4, 2, 0, 0, 0,100, 0, 4, 16, 0, 0, 0, 98,117,116,116,111,110, 95, +112,114,101,115,115, 95, 99, 98, 0, 4, 18, 0, 0, 0, 98,117,116,116,111,110, + 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, 4, 14, 0, 0, 0, 99,114,101, + 97,116,101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32, +119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 17, + 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, 0, 0,198, 64,192, 0,157, + 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, 0, 0, 4, 4, 0, 0, 0, + 86, 97,108, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, + 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, + 10, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/val.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/val_be32.loh b/iup/srclua5/loh/val_be32.loh new file mode 100755 index 0000000..3bb4c4f --- /dev/null +++ b/iup/srclua5/loh/val_be32.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/val_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/val_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 9, 64,118, 97,108, + 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, + 21, 0, 1, 64, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, 64, + 9, 0, 0,192, 74,131,194, 0, 73,132,194, 0, 73,133, 66, 0, 73,131, 0, 64, + 9,133,195, 0, 9, 0, 0, 0,100,134,128, 64, 9, 0, 3,128, 69, 0, 0, 0, +128, 1, 0, 64, 92, 0, 3,192, 69, 0, 0, 0,128, 0, 4, 0,193, 1,128, 64, + 92, 0,128, 0, 30, 0, 0, 0, 17, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, + 0, 0, 0, 4,118, 97,108, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, + 4, 0, 0, 0, 7, 87, 73, 68, 71, 69, 84, 0, 4, 0, 0, 0, 9, 99,114,101, + 97,116,105,111,110, 0, 4, 0, 0, 0, 2,115, 0, 4, 0, 0, 0, 9, 99, 97, +108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 13,109,111,117,115,101,109,111,118, +101, 95, 99, 98, 0, 4, 0, 0, 0, 2,100, 0, 4, 0, 0, 0, 16, 98,117,116, +116,111,110, 95,112,114,101,115,115, 95, 99, 98, 0, 4, 0, 0, 0, 18, 98,117, +116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, 4, 0, 0, 0, + 8,105,110, 99,108,117,100,101, 0, 4, 0, 0, 0, 9,105,117,112,118, 97,108, + 46,104, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101,110, +116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87,105, +100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97,115, +115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 18, 0, 2, 0, 4, 0, 0, + 0, 5, 0, 0, 0,133, 0,192, 64,198, 1, 0, 0,157, 0, 0, 0,158, 0,128, + 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 4, 86, 97,108, 0, 3, 63,240, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, + 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 2, 0, 0, 0, 6, + 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 97,114, +103, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, + 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, + 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 11, 0, + 0, 0, 20, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/val_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/val_be64.loh b/iup/srclua5/loh/val_be64.loh new file mode 100755 index 0000000..15ecb4c --- /dev/null +++ b/iup/srclua5/loh/val_be64.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/val_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/val_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 9, 0, 0, 0, 0, 0, 0, 0, + 64,118, 97,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 20, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0, +129, 9, 64, 65,130, 74,192, 0, 0, 73, 0,194,131, 73, 0,194,132, 73, 0, 66, +133, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, + 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, + 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, + 99,107, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,118, 97,108, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 13, 0, 0, 0, + 0, 0, 0, 0,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 4, 2, 0, + 0, 0, 0, 0, 0, 0,100, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 98,117,116, +116,111,110, 95,112,114,101,115,115, 95, 99, 98, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0, 98,117,116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 15, 0, 0, 0, 17, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, + 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 86, 97,108, 0, 3, 0, 0, 0, + 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, + 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99, +116,114,108, 0, 10, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/val_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/val_le64.loh b/iup/srclua5/loh/val_le64.loh new file mode 100755 index 0000000..5567d6f --- /dev/null +++ b/iup/srclua5/loh/val_le64.loh @@ -0,0 +1,47 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iupluacontrols51/val_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iupluacontrols51/val_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 9, 0, 0, 0, 0, 0, 0, 0, + 64,118, 97,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 21, 0, 0, 0, 10, 64, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0, +129, 9, 64, 65,130, 74,192, 0, 0, 73, 0,194,131, 73, 0,194,132, 73, 0, 66, +133, 9, 64, 0,131, 9, 0,195,133,100, 0, 0, 0, 9, 64,128,134, 69,128, 3, + 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 3, 0,128, 0, 0, 0,193, 0, 4, + 0, 92, 64,128, 1, 30, 0,128, 0, 17, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, + 0, 0,110,105, 99,107, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,118, 97,108, 0, + 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,115, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, + 13, 0, 0, 0, 0, 0, 0, 0,109,111,117,115,101,109,111,118,101, 95, 99, 98, + 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,100, 0, 4, 16, 0, 0, 0, 0, 0, 0, + 0, 98,117,116,116,111,110, 95,112,114,101,115,115, 95, 99, 98, 0, 4, 18, 0, + 0, 0, 0, 0, 0, 0, 98,117,116,116,111,110, 95,114,101,108,101, 97,115,101, + 95, 99, 98, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0,105,110, 99,108,117,100,101, + 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,105,117,112,118, 97,108, 46,104, 0, 4, + 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101,110, +116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115,116, +101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 18, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, 0, + 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, 0, + 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 86, 97,108, 0, 3, 0, 0, 0, 0, + 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, + 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 21, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, + 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 18, 0, 0, 0, 16, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 11, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iupluacontrols51/val_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/val_le64w.loh b/iup/srclua5/loh/val_le64w.loh new file mode 100755 index 0000000..f9c6e3f --- /dev/null +++ b/iup/srclua5/loh/val_le64w.loh @@ -0,0 +1,45 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/val_le64w.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/val_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 9, 0, 0, 0, 0, 0, 0, 0, + 64,118, 97,108, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 4, 20, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0, +129, 9, 64, 65,130, 74,192, 0, 0, 73, 0,194,131, 73, 0,194,132, 73, 0, 66, +133, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,133, 69, 0, 3, 0,128, 0, 0, + 0, 92, 64, 0, 1, 69, 64, 3, 0,128, 0, 0, 0,193,128, 3, 0, 92, 64,128, + 1, 30, 0,128, 0, 15, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, + 99,107, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0,118, 97,108, 0, 4, 7, 0, 0, + 0, 0, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 7, 0, 0, 0, 0, 0, 0, + 0, 87, 73, 68, 71, 69, 84, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, + 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0,115, 0, 4, 9, 0, + 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 13, 0, 0, 0, + 0, 0, 0, 0,109,111,117,115,101,109,111,118,101, 95, 99, 98, 0, 4, 2, 0, + 0, 0, 0, 0, 0, 0,100, 0, 4, 16, 0, 0, 0, 0, 0, 0, 0, 98,117,116, +116,111,110, 95,112,114,101,115,115, 95, 99, 98, 0, 4, 18, 0, 0, 0, 0, 0, + 0, 0, 98,117,116,116,111,110, 95,114,101,108,101, 97,115,101, 95, 99, 98, 0, + 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82,101,103,105,115, +116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, 0, 0, 0,105, +117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, +105,117,112, 32,119,105,100,103,101,116, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 15, 0, 0, 0, 17, 0, 0, 0, 0, 2, 0, 4, 5, 0, 0, 0,133, + 0, 0, 0,198, 64,192, 0,157, 0, 0, 1,158, 0, 0, 0, 30, 0,128, 0, 2, + 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 86, 97,108, 0, 3, 0, 0, 0, + 0, 0, 0,240, 63, 0, 0, 0, 0, 5, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, + 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, + 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, + 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, + 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, + 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99, +116,114,108, 0, 10, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/val_le64w.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/vbox.loh b/iup/srclua5/loh/vbox.loh new file mode 100755 index 0000000..efc2bc0 --- /dev/null +++ b/iup/srclua5/loh/vbox.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/vbox.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/vbox.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,118, 98,111, +120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 19, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,131,100, 64, + 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,128, + 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0,128, 0, 12, 0, + 0, 0, 4, 5, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0,118, 98,111, +120, 0, 4, 7, 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, 66, + 79, 88, 0, 4, 9, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, + 0, 0, 45, 0, 4, 9, 0, 0, 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, + 0, 0, 0, 97,112,112,101,110,100, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103, +105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, + 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105, +100,103,101,116, 0, 2, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, + 0, 0, 2, 0, 5, 5, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, + 0,156, 64,128, 1, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 65,112, +112,101,110,100, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, + 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, +101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 0, 0, 0, 17, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, + 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, + 0, 0, 86, 98,111,120, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 97,114,103, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 4, 0, 0, + 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, + 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 17, 0, 0, 0, 15, 0, 0, + 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, + 0, 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/vbox.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/vbox_be32.loh b/iup/srclua5/loh/vbox_be32.loh new file mode 100755 index 0000000..44e3024 --- /dev/null +++ b/iup/srclua5/loh/vbox_be32.loh @@ -0,0 +1,43 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/vbox_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/vbox_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,118, 98,111, +120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 19, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131,128, 64, 9, 0, 0, + 64,100,132, 0, 64, 9, 0, 2, 64, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2, +128, 69, 0, 0, 0,128, 0, 2,192,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, + 0, 12, 4, 0, 0, 0, 5,110,105, 99,107, 0, 4, 0, 0, 0, 5,118, 98,111, +120, 0, 4, 0, 0, 0, 7,112, 97,114,101,110,116, 0, 4, 0, 0, 0, 4, 66, + 79, 88, 0, 4, 0, 0, 0, 9, 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, + 0, 2, 45, 0, 4, 0, 0, 0, 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, + 0, 0, 7, 97,112,112,101,110,100, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103, +105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, + 83,101,116, 67,108, 97,115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105, +100,103,101,116, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, + 13, 0, 2, 0, 5, 0, 0, 0, 5, 0, 0, 0,133, 0, 0, 0,192, 0,128, 1, + 0, 1,128, 64,156, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, 0, 7, 65,112, +112,101,110,100, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, + 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, + 7,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 5, +101,108,101,109, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0, +133, 0,128, 0,157, 0, 0, 0,158, 0,128, 0, 30, 0, 0, 0, 1, 4, 0, 0, + 0, 5, 86, 98,111,120, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, + 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 97,114,103, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, + 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 17, 0, 0, 0, + 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, + 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, + 5, 99,116,114,108, 0, 0, 0, 0, 7, 0, 0, 0, 18, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/vbox_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/vbox_be64.loh b/iup/srclua5/loh/vbox_be64.loh new file mode 100755 index 0000000..92962ee --- /dev/null +++ b/iup/srclua5/loh/vbox_be64.loh @@ -0,0 +1,48 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/vbox_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/vbox_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,118, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131,100, 64, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0, +128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,118, 98,111,120, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, + 79, 88, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, + 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, +112,112,101,110,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, + 5, 5, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, + 1, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112, +112,101,110,100, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0,101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 86, 98, +111,120, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 17, 0, 0, + 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/vbox_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/vbox_le64.loh b/iup/srclua5/loh/vbox_le64.loh new file mode 100755 index 0000000..b10314c --- /dev/null +++ b/iup/srclua5/loh/vbox_le64.loh @@ -0,0 +1,48 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/vbox_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/vbox_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,118, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131,100, 64, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0, +128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,118, 98,111,120, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, + 79, 88, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, + 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, +112,112,101,110,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, + 5, 5, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, + 1, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112, +112,101,110,100, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0,101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 86, 98, +111,120, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 17, 0, 0, + 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/vbox_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/vbox_le64w.loh b/iup/srclua5/loh/vbox_le64w.loh new file mode 100755 index 0000000..c3a3f70 --- /dev/null +++ b/iup/srclua5/loh/vbox_le64w.loh @@ -0,0 +1,48 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/vbox_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/vbox_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,118, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 19, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131,100, 64, 0, 0, 9, 64, 0,132, 69, 64, 2, 0,128, 0, 0, 0, 92, 64, + 0, 1, 69,128, 2, 0,128, 0, 0, 0,193,192, 2, 0, 92, 64,128, 1, 30, 0, +128, 0, 12, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, + 4, 5, 0, 0, 0, 0, 0, 0, 0,118, 98,111,120, 0, 4, 7, 0, 0, 0, 0, + 0, 0, 0,112, 97,114,101,110,116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, + 79, 88, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, + 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97, +112,112,101,110,100, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116, +101, 69,108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117, +112, 82,101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, + 0, 0, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, + 0, 0, 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2, 0, + 5, 5, 0, 0, 0,133, 0, 0, 0,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, + 1, 30, 0,128, 0, 1, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112, +112,101,110,100, 0, 0, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0,101,108,101,109, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 17, 0, 0, + 0, 0, 2, 0, 3, 4, 0, 0, 0,133, 0, 0, 0,157, 0,128, 0,158, 0, 0, + 0, 30, 0,128, 0, 1, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 86, 98, +111,120, 0, 0, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 16, + 0, 0, 0, 17, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99, +108, 97,115,115, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, + 0, 97,114,103, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, + 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 8, 0, 0, 0, 13, 0, 0, 0, 11, 0, 0, 0, 17, 0, 0, + 0, 15, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, 18, 0, + 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/vbox_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/zbox.loh b/iup/srclua5/loh/zbox.loh new file mode 100755 index 0000000..ad51b1c --- /dev/null +++ b/iup/srclua5/loh/zbox.loh @@ -0,0 +1,61 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/zbox.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/zbox.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 10, 0, 0, 0, 64,122, 98,111, +120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 22, 0, + 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, 0,129, 9, 64, + 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64,128,131,100, 64, + 0, 0, 9, 64, 0,132,100,128, 0, 0, 0, 0, 0, 0, 9, 64,128,132, 69,128, + 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 2, 0,128, 0, 0, 0,193, 0, + 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, 0, 0, 4, 5, 0, 0, 0,110, +105, 99,107, 0, 4, 5, 0, 0, 0,122, 98,111,120, 0, 4, 7, 0, 0, 0,112, + 97,114,101,110,116, 0, 4, 4, 0, 0, 0, 66, 79, 88, 0, 4, 9, 0, 0, 0, + 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 45, 0, 4, 9, 0, 0, + 0, 99, 97,108,108, 98, 97, 99,107, 0, 4, 7, 0, 0, 0, 97,112,112,101,110, +100, 0, 4, 17, 0, 0, 0, 83,101,116, 67,104,105,108,100,114,101,110, 78, 97, +109,101,115, 0, 4, 14, 0, 0, 0, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 18, 0, 0, 0,105,117,112, 82,101,103,105,115,116,101,114, 87, +105,100,103,101,116, 0, 4, 12, 0, 0, 0,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 11, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 5, 8, + 0, 0, 0,133, 0, 0, 0,192, 0,128, 0,156, 64, 0, 1,133, 64, 0, 0,192, + 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, + 16, 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109,101, 0, + 4, 7, 0, 0, 0, 65,112,112,101,110,100, 0, 0, 0, 0, 0, 8, 0, 0, 0, + 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 2, 0, 0, 0, 7, 0, 0, 0, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 7, 0, 0, 0, 5, 0, 0, 0,101, +108,101,109, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 24, 0, 0, 0, 0, 1, 0, 4, 12, 0, 0, 0, 26, 0, 0, 0, + 22, 0, 2,128, 65, 0, 0, 0,134, 64, 0, 0,154, 0, 0, 0, 22, 0, 1,128, +133, 64, 0, 0,198, 64, 0, 0,156, 64, 0, 1, 76, 0,192, 0, 22,192,253,127, + 30, 0,128, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 16, 0, + 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109,101, 0, 0, 0, + 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 19, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 24, 0, 0, 0, 2, 0, 0, 0, 4, 0, + 0, 0,111, 98,106, 0, 0, 0, 0, 0, 11, 0, 0, 0, 2, 0, 0, 0,105, 0, + 3, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, + 29, 0, 0, 0, 1, 2, 0, 4, 8, 0, 0, 0,132, 0, 0, 0,134, 0, 64, 1, +192, 0,128, 0,156, 64, 0, 1,133, 64, 0, 0,157, 0,128, 0,158, 0, 0, 0, + 30, 0,128, 0, 2, 0, 0, 0, 4, 17, 0, 0, 0, 83,101,116, 67,104,105,108, +100,114,101,110, 78, 97,109,101,115, 0, 4, 5, 0, 0, 0, 90, 98,111,120, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, + 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, + 2, 0, 0, 0, 6, 0, 0, 0, 99,108, 97,115,115, 0, 0, 0, 0, 0, 7, 0, + 0, 0, 4, 0, 0, 0, 97,114,103, 0, 0, 0, 0, 0, 7, 0, 0, 0, 1, 0, + 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, + 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, + 0, 0, 0, 14, 0, 0, 0, 11, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 29, + 0, 0, 0, 29, 0, 0, 0, 26, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, + 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/zbox.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/zbox_be32.loh b/iup/srclua5/loh/zbox_be32.loh new file mode 100755 index 0000000..9c39f71 --- /dev/null +++ b/iup/srclua5/loh/zbox_be32.loh @@ -0,0 +1,61 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/zbox_be32.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/zbox_be32.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 64,122, 98,111, +120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, + 0, 22, 0, 1, 0, 10,128, 64, 64, 9, 0, 0,192, 69,129, 0, 64, 9,130, 65, + 64, 9, 0, 0, 0, 74,131, 0, 64, 9, 0, 0, 0,100,131,128, 64, 9, 0, 0, + 64,100,132, 0, 64, 9, 0, 0,128,100, 0, 0, 0, 0,132,128, 64, 9, 0, 2, +128, 69, 0, 0, 0,128, 1, 0, 64, 92, 0, 2,192, 69, 0, 0, 0,128, 0, 3, + 0,193, 1,128, 64, 92, 0,128, 0, 30, 0, 0, 0, 13, 4, 0, 0, 0, 5,110, +105, 99,107, 0, 4, 0, 0, 0, 5,122, 98,111,120, 0, 4, 0, 0, 0, 7,112, + 97,114,101,110,116, 0, 4, 0, 0, 0, 4, 66, 79, 88, 0, 4, 0, 0, 0, 9, + 99,114,101, 97,116,105,111,110, 0, 4, 0, 0, 0, 2, 45, 0, 4, 0, 0, 0, + 9, 99, 97,108,108, 98, 97, 99,107, 0, 4, 0, 0, 0, 7, 97,112,112,101,110, +100, 0, 4, 0, 0, 0, 17, 83,101,116, 67,104,105,108,100,114,101,110, 78, 97, +109,101,115, 0, 4, 0, 0, 0, 14, 99,114,101, 97,116,101, 69,108,101,109,101, +110,116, 0, 4, 0, 0, 0, 18,105,117,112, 82,101,103,105,115,116,101,114, 87, +105,100,103,101,116, 0, 4, 0, 0, 0, 12,105,117,112, 83,101,116, 67,108, 97, +115,115, 0, 4, 0, 0, 0, 11,105,117,112, 32,119,105,100,103,101,116, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 14, 0, 2, 0, 5, 0, + 0, 0, 8, 0, 0, 0,133, 0,128, 0,192, 1, 0, 64,156, 0, 0, 64,133, 0, + 0, 0,192, 0,128, 1, 0, 1,128, 64,156, 0,128, 0, 30, 0, 0, 0, 2, 4, + 0, 0, 0, 16,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109,101, 0, + 4, 0, 0, 0, 7, 65,112,112,101,110,100, 0, 0, 0, 0, 0, 0, 0, 0, 8, + 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 2, 0, 0, 0, 7, +104, 97,110,100,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 5,101, +108,101,109, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 24, 0, 1, 0, 4, 0, 0, 0, 12, 0, 0, 0, 26, +128, 2, 0, 22, 0, 0, 0, 65, 0, 0, 64,134, 0, 0, 0,154,128, 1, 0, 22, + 0, 0, 64,133, 0, 0, 64,198, 1, 0, 64,156, 0,192, 0, 76,127,253,192, 22, + 0,128, 0, 30, 0, 0, 0, 2, 3, 63,240, 0, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 16,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109,101, 0, 0, 0, + 0, 0, 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, + 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, + 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 24, 0, 0, 0, 2, 0, 0, + 0, 4,111, 98,106, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 2,105, 0, + 0, 0, 0, 3, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, + 0, 0, 0, 29, 1, 2, 0, 4, 0, 0, 0, 8, 0, 0, 0,132, 1, 64, 0,134, + 0,128, 0,192, 1, 0, 64,156, 0, 0, 64,133, 0,128, 0,157, 0, 0, 0,158, + 0,128, 0, 30, 0, 0, 0, 2, 4, 0, 0, 0, 17, 83,101,116, 67,104,105,108, +100,114,101,110, 78, 97,109,101,115, 0, 4, 0, 0, 0, 5, 90, 98,111,120, 0, + 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, + 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 29, + 0, 0, 0, 2, 0, 0, 0, 6, 99,108, 97,115,115, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 0, 0, 0, 4, 97,114,103, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, + 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 22, 0, 0, 0, 4, 0, + 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, + 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 11, 0, 0, 0, 24, 0, 0, 0, 16, 0, + 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 26, 0, 0, 0, 31, 0, 0, 0, 31, 0, + 0, 0, 31, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, + 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 5, 99,116,114,108, 0, 0, 0, 0, 7, + 0, 0, 0, 21, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/zbox_be32.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/zbox_be64.loh b/iup/srclua5/loh/zbox_be64.loh new file mode 100755 index 0000000..df7ee45 --- /dev/null +++ b/iup/srclua5/loh/zbox_be64.loh @@ -0,0 +1,67 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/zbox_be64.lo")==0) lua_call(L, 0, 0); +*/ +/* ../obj/iuplua51/zbox_be64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,122, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 22, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131,100, 64, 0, 0, 9, 64, 0,132,100,128, 0, 0, 0, 0, 0, 0, 9, 64, +128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 2, 0,128, 0, + 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,122, 98,111,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, 79, 88, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, + 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,112,112,101,110,100, 0, 4, 17, + 0, 0, 0, 0, 0, 0, 0, 83,101,116, 67,104,105,108,100,114,101,110, 78, 97, +109,101,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69, +108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 5, 8, + 0, 0, 0,133, 0, 0, 0,192, 0,128, 0,156, 64, 0, 1,133, 64, 0, 0,192, + 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, + 97,109,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101,110,100, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, + 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 7, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,101,108,101,109, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 24, 0, 0, 0, 0, 1, 0, 4, 12, 0, 0, 0, 26, 0, 0, 0, + 22, 0, 2,128, 65, 0, 0, 0,134, 64, 0, 0,154, 0, 0, 0, 22, 0, 1,128, +133, 64, 0, 0,198, 64, 0, 0,156, 64, 0, 1, 76, 0,192, 0, 22,192,253,127, + 30, 0,128, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 16, 0, + 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109, +101, 0, 0, 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 24, 0, 0, 0, 2, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,111, 98,106, 0, 0, 0, 0, 0, 11, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 3, 0, 0, 0, 11, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 29, 0, 0, 0, + 1, 2, 0, 4, 8, 0, 0, 0,132, 0, 0, 0,134, 0, 64, 1,192, 0,128, 0, +156, 64, 0, 1,133, 64, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 67,104,105,108, +100,114,101,110, 78, 97,109,101,115, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 90, + 98,111,120, 0, 0, 0, 0, 0, 8, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, + 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, + 29, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 7, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114, +103, 0, 0, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 14, + 0, 0, 0, 11, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 26, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, + 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/zbox_be64.lo")==0) lua_call(L, 0, 0); +} diff --git a/iup/srclua5/loh/zbox_le64.loh b/iup/srclua5/loh/zbox_le64.loh new file mode 100755 index 0000000..138b8c7 --- /dev/null +++ b/iup/srclua5/loh/zbox_le64.loh @@ -0,0 +1,67 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/zbox_le64.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/zbox_le64.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,122, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 22, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131,100, 64, 0, 0, 9, 64, 0,132,100,128, 0, 0, 0, 0, 0, 0, 9, 64, +128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 2, 0,128, 0, + 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,122, 98,111,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, 79, 88, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, + 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,112,112,101,110,100, 0, 4, 17, + 0, 0, 0, 0, 0, 0, 0, 83,101,116, 67,104,105,108,100,114,101,110, 78, 97, +109,101,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69, +108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 5, 8, + 0, 0, 0,133, 0, 0, 0,192, 0,128, 0,156, 64, 0, 1,133, 64, 0, 0,192, + 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, + 97,109,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101,110,100, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, + 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 7, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,101,108,101,109, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 24, 0, 0, 0, 0, 1, 0, 4, 12, 0, 0, 0, 26, 0, 0, 0, + 22, 0, 2,128, 65, 0, 0, 0,134, 64, 0, 0,154, 0, 0, 0, 22, 0, 1,128, +133, 64, 0, 0,198, 64, 0, 0,156, 64, 0, 1, 76, 0,192, 0, 22,192,253,127, + 30, 0,128, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 16, 0, + 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109, +101, 0, 0, 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 24, 0, 0, 0, 2, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,111, 98,106, 0, 0, 0, 0, 0, 11, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 3, 0, 0, 0, 11, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 29, 0, 0, 0, + 1, 2, 0, 4, 8, 0, 0, 0,132, 0, 0, 0,134, 0, 64, 1,192, 0,128, 0, +156, 64, 0, 1,133, 64, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 67,104,105,108, +100,114,101,110, 78, 97,109,101,115, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 90, + 98,111,120, 0, 0, 0, 0, 0, 8, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, + 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, + 29, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 7, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114, +103, 0, 0, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 14, + 0, 0, 0, 11, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 26, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, + 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/zbox_le64.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/loh/zbox_le64w.loh b/iup/srclua5/loh/zbox_le64w.loh new file mode 100755 index 0000000..0a80b36 --- /dev/null +++ b/iup/srclua5/loh/zbox_le64w.loh @@ -0,0 +1,67 @@ +/* code automatically generated by bin2c -- DO NOT EDIT */ +{ +/* #include'ing this file in a C program is equivalent to calling + if (luaL_loadfile(L,"../obj/iuplua51/zbox_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +*/ +/* ../obj/iuplua51/zbox_le64w.lo */ +static const unsigned char B1[]={ + 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 64,122, 98,111,120, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 4, 22, 0, 0, 0, 10, 0, 1, 0, 9, 64, 64,128, 69,192, 0, 0, 9, 64, + 0,129, 9, 64, 65,130, 74, 0, 0, 0, 9, 64, 0,131,100, 0, 0, 0, 9, 64, +128,131,100, 64, 0, 0, 9, 64, 0,132,100,128, 0, 0, 0, 0, 0, 0, 9, 64, +128,132, 69,128, 2, 0,128, 0, 0, 0, 92, 64, 0, 1, 69,192, 2, 0,128, 0, + 0, 0,193, 0, 3, 0, 92, 64,128, 1, 30, 0,128, 0, 13, 0, 0, 0, 4, 5, + 0, 0, 0, 0, 0, 0, 0,110,105, 99,107, 0, 4, 5, 0, 0, 0, 0, 0, 0, + 0,122, 98,111,120, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0,112, 97,114,101,110, +116, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 66, 79, 88, 0, 4, 9, 0, 0, 0, + 0, 0, 0, 0, 99,114,101, 97,116,105,111,110, 0, 4, 2, 0, 0, 0, 0, 0, + 0, 0, 45, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 99, 97,108,108, 98, 97, 99, +107, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 97,112,112,101,110,100, 0, 4, 17, + 0, 0, 0, 0, 0, 0, 0, 83,101,116, 67,104,105,108,100,114,101,110, 78, 97, +109,101,115, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 99,114,101, 97,116,101, 69, +108,101,109,101,110,116, 0, 4, 18, 0, 0, 0, 0, 0, 0, 0,105,117,112, 82, +101,103,105,115,116,101,114, 87,105,100,103,101,116, 0, 4, 12, 0, 0, 0, 0, + 0, 0, 0,105,117,112, 83,101,116, 67,108, 97,115,115, 0, 4, 11, 0, 0, 0, + 0, 0, 0, 0,105,117,112, 32,119,105,100,103,101,116, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 14, 0, 0, 0, 0, 2, 0, 5, 8, + 0, 0, 0,133, 0, 0, 0,192, 0,128, 0,156, 64, 0, 1,133, 64, 0, 0,192, + 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 30, 0,128, 0, 2, 0, 0, 0, 4, + 16, 0, 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, + 97,109,101, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101,110,100, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, + 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,110,100,108,101, 0, 0, + 0, 0, 0, 7, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,101,108,101,109, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 24, 0, 0, 0, 0, 1, 0, 4, 12, 0, 0, 0, 26, 0, 0, 0, + 22, 0, 2,128, 65, 0, 0, 0,134, 64, 0, 0,154, 0, 0, 0, 22, 0, 1,128, +133, 64, 0, 0,198, 64, 0, 0,156, 64, 0, 1, 76, 0,192, 0, 22,192,253,127, + 30, 0,128, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,240, 63, 4, 16, 0, + 0, 0, 0, 0, 0, 0,105,104, 97,110,100,108,101, 95,115,101,116,110, 97,109, +101, 0, 0, 0, 0, 0, 12, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, 0, 18, 0, + 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 20, 0, + 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 24, 0, 0, 0, 2, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0,111, 98,106, 0, 0, 0, 0, 0, 11, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,105, 0, 3, 0, 0, 0, 11, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 29, 0, 0, 0, + 1, 2, 0, 4, 8, 0, 0, 0,132, 0, 0, 0,134, 0, 64, 1,192, 0,128, 0, +156, 64, 0, 1,133, 64, 0, 0,157, 0,128, 0,158, 0, 0, 0, 30, 0,128, 0, + 2, 0, 0, 0, 4, 17, 0, 0, 0, 0, 0, 0, 0, 83,101,116, 67,104,105,108, +100,114,101,110, 78, 97,109,101,115, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 90, + 98,111,120, 0, 0, 0, 0, 0, 8, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, + 27, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, + 29, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 99,108, 97,115, +115, 0, 0, 0, 0, 0, 7, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 97,114, +103, 0, 0, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 99,116,114,108, 0, 22, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, + 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 14, + 0, 0, 0, 11, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 29, 0, 0, 0, 29, + 0, 0, 0, 26, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 1, + 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 99,116,114,108, 0, 7, 0, 0, 0, + 21, 0, 0, 0, 0, 0, 0, 0, +}; + + if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"../obj/iuplua51/zbox_le64w.lo")==0) lua_pcall(L, 0, 0, 0); +} diff --git a/iup/srclua5/make_uname b/iup/srclua5/make_uname new file mode 100755 index 0000000..4e01bd9 --- /dev/null +++ b/iup/srclua5/make_uname @@ -0,0 +1,9 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake $1 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iupcd $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iupcontrols $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iup_pplot $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iupgl $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iupim $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=iupimglib $2 $3 $4 $5 $6 $7 $8 diff --git a/iup/srclua5/make_uname.bat b/iup/srclua5/make_uname.bat new file mode 100755 index 0000000..ecf9de1 --- /dev/null +++ b/iup/srclua5/make_uname.bat @@ -0,0 +1,11 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +call tecmake %1 %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupcd" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupcontrols" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iup_pplot" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupgl" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupim" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupimglib" %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "MF=iupole" %2 %3 %4 %5 %6 %7 %8 diff --git a/iup/srclua5/matrix.lua b/iup/srclua5/matrix.lua new file mode 100755 index 0000000..81aa732 --- /dev/null +++ b/iup/srclua5/matrix.lua @@ -0,0 +1,46 @@ +------------------------------------------------------------------------------ +-- Matrix class +------------------------------------------------------------------------------ +local ctrl = { + nick = "matrix", + parent = WIDGET, + creation = "-", + callback = { + action_cb = "nnnns", + click_cb = "nns", + release_cb = "nns", + drop_cb = "inn", + dropcheck_cb = "nn", + draw_cb = "nnnnnnn", -- fake definitions to be replaced by matrixfuncs module + dropselect_cb = "nnisnn", + edition_cb = "nnnn", + enteritem_cb = "nn", + leaveitem_cb = "nn", + mousemove_cb = "nn", + scrolltop_cb = "nn", + fgcolor_cb = "nn", -- fake definitions to be replaced by matrixfuncs module + bgcolor_cb = "nn", + font_cb = {"nn", ret = "s"}, -- ret is return type + value_cb = {"nn", ret = "s"}, -- ret is return type + value_edit_cb = "nns", + mark_cb = "nn", + markedit_cb = "nnn", + }, + include = "iupcontrols.h", + extrafuncs = 1, +} + +function ctrl.createElement(class, arg) + return Matrix(arg.action) +end + +function ctrl.setcell(handle, l, c, val) + SetAttribute(handle,l..":"..c,val) +end + +function ctrl.getcell(handle, l, c) + return GetAttribute(handle,l..":"..c) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/menu.lua b/iup/srclua5/menu.lua new file mode 100755 index 0000000..89cd241 --- /dev/null +++ b/iup/srclua5/menu.lua @@ -0,0 +1,55 @@ +------------------------------------------------------------------------------ +-- Menu class +------------------------------------------------------------------------------ +local ctrl = { + nick = "menu", + parent = BOX, + creation = "-", + callback = { + open_cb = "", + menuclose_cb = "", + } +} + +function ctrl.popup(handle, x, y) + Popup(handle, x, y) +end + +function ctrl.append(handle, elem) + Append(handle, elem) +end + +function ctrl.createElement(class, arg) + local n = #arg + for i=1,n do + if type(arg[i]) == "table" then + itemarg = {} + for u,v in pairs(arg[i]) do + if type(u) ~= "number" then + itemarg[u] = v + end + end + if type(arg[i][1]) == "string" and (type(arg[i][2]) == "function" or type(arg[i][2]) == "string") then + itemarg.title = arg[i][1] + itemarg.action = arg[i][2] + arg[i] = item(itemarg) + elseif type(arg[i][1]) == "string" and type(arg[i][2]) == "userdata" then + itemarg[1] = arg[i][2] + itemarg.title = arg[i][1] + arg[i] = submenu(itemarg) + end + end + end + return Menu() +end + +function ctrl.showxy(handle, x, y) + return ShowXY(handle, x, y) +end + +function ctrl.destroy(handle) + return Destroy(handle) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/messagedlg.lua b/iup/srclua5/messagedlg.lua new file mode 100755 index 0000000..e81eede --- /dev/null +++ b/iup/srclua5/messagedlg.lua @@ -0,0 +1,26 @@ +------------------------------------------------------------------------------ +-- MessageDlg class +------------------------------------------------------------------------------ +local ctrl = { + nick = "messagedlg", + parent = WIDGET, + creation = "", + funcname = "MessageDlg", + callback = {} +} + +function ctrl.popup(handle, x, y) + Popup(handle,x,y) +end + +function ctrl.destroy(handle) + return Destroy(handle) +end + +function ctrl.createElement(class, arg) + return MessageDlg() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") + diff --git a/iup/srclua5/multiline.lua b/iup/srclua5/multiline.lua new file mode 100755 index 0000000..9ae766e --- /dev/null +++ b/iup/srclua5/multiline.lua @@ -0,0 +1,19 @@ +------------------------------------------------------------------------------ +-- Multiline class +------------------------------------------------------------------------------ +local ctrl = { + nick = "multiline", + parent = WIDGET, + creation = "-", + callback = { + action = "ns", + }, + funcname = "MultiLine", +} + +function ctrl.createElement(class, arg) + return MultiLine() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/normalizer.lua b/iup/srclua5/normalizer.lua new file mode 100755 index 0000000..201aab0 --- /dev/null +++ b/iup/srclua5/normalizer.lua @@ -0,0 +1,28 @@ + +------------------------------------------------------------------------------ +-- Normalizer class +------------------------------------------------------------------------------ +local ctrl = { + nick = "normalizer", + parent = WIDGET, + creation = "-", + callback = {} +} + +function ctrl.setAttributes(object, arg) + local handle = rawget(object, "handle") + local n = #arg + for i = 1, n do + if iupGetClass(arg[i]) == "iup handle" then + object.addcontrol = arg[i] + end + end + WIDGET.setAttributes(object, arg) +end + +function ctrl.createElement(class, arg) + return Normalizer() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/olecontrol.lua b/iup/srclua5/olecontrol.lua new file mode 100755 index 0000000..902977b --- /dev/null +++ b/iup/srclua5/olecontrol.lua @@ -0,0 +1,54 @@ +------------------------------------------------------------------------------ +-- OleControl class +------------------------------------------------------------------------------ +local ctrl = { + nick = "olecontrol", + parent = WIDGET, + creation = "s", + funcname = "OleControl", + callback = {}, + include = "iupole.h", + extracode = [[ +int iupolelua_open(lua_State* L) +{ + if (iuplua_opencall_internal(L)) + IupOleControlOpen(); + + iuplua_changeEnv(L); + iupolecontrollua_open(L); + iuplua_returnEnv(L); + return 0; +} + +/* obligatory to use require"iupluaole" */ +int luaopen_iupluaole(lua_State* L) +{ + return iupolelua_open(L); +} + +/* obligatory to use require"iupluaole51" */ +int luaopen_iupluaole51(lua_State* L) +{ + return iupolelua_open(L); +} + +]] +} + +function ctrl.createElement(class, arg) + return OleControl(arg[1]) +end + +function ctrl.CreateLuaCOM(handle) + -- if luacom is loaded, use it to access methods and properties + -- of the control + if luacom then + local punk = handle.iunknown + if punk then + handle.com = luacom.CreateLuaCOM(luacom.ImportIUnknown(punk)) + end + end +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/pplot.lua b/iup/srclua5/pplot.lua new file mode 100755 index 0000000..5d6a2f4 --- /dev/null +++ b/iup/srclua5/pplot.lua @@ -0,0 +1,31 @@ +------------------------------------------------------------------------------ +-- PPlot class +------------------------------------------------------------------------------ +local ctrl = { + nick = "pplot", + parent = WIDGET, + creation = "", + funcname = "PPlot", + callback = { + select_cb = "nnffn", + selectbegin_cb = "", + selectend_cb = "", + predraw_cb = "n", -- fake definitions to be replaced by pplotfuncs module + postdraw_cb = "n", -- fake definitions to be replaced by pplotfuncs module + edit_cb = "nnffff", -- fake definitions to be replaced by pplotfuncs module + editbegin_cb = "", + editend_cb = "", + delete_cb = "nnff", + deletebegin_cb = "", + deleteend_cb = "", + }, + include = "iup_pplot.h", + extrafuncs = 1, +} + +function ctrl.createElement(class, arg) + return PPlot(arg.action) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/progressbar.lua b/iup/srclua5/progressbar.lua new file mode 100755 index 0000000..16b4a09 --- /dev/null +++ b/iup/srclua5/progressbar.lua @@ -0,0 +1,17 @@ +------------------------------------------------------------------------------ +-- ProgressBar class +------------------------------------------------------------------------------ +local ctrl = { + nick = "progressbar", + parent = WIDGET, + creation = "", + funcname = "ProgressBar", + callback = {} +} + +function ctrl.createElement(class, arg) + return ProgressBar() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/radio.lua b/iup/srclua5/radio.lua new file mode 100755 index 0000000..1cdd3a6 --- /dev/null +++ b/iup/srclua5/radio.lua @@ -0,0 +1,33 @@ +------------------------------------------------------------------------------ +-- Radio class +------------------------------------------------------------------------------ +local ctrl = { + nick = "radio", + parent = WIDGET, + creation = "i", + callback = {} +} + +function ctrl.CreateChildrenNames(obj) + if obj then + if obj.parent.parent == BOX then + local i = 1 + while obj[i] do + ctrl.CreateChildrenNames (obj[i]) + i = i+1 + end + elseif obj.parent == IUPFRAME then + ctrl.CreateChildrenNames (obj[1]) + else + ihandle_setname(obj) + end + end +end + +function ctrl.createElement(class, arg) + ctrl.CreateChildrenNames(arg[1]) + return Radio(arg[1]) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/sbox.lua b/iup/srclua5/sbox.lua new file mode 100755 index 0000000..9ee63ba --- /dev/null +++ b/iup/srclua5/sbox.lua @@ -0,0 +1,16 @@ +------------------------------------------------------------------------------ +-- Sbox class +------------------------------------------------------------------------------ +local ctrl = { + nick = "sbox", + parent = WIDGET, + creation = "i", + callback = {} +} + +function ctrl.createElement(class, arg) + return Sbox(arg[1]) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/separator.lua b/iup/srclua5/separator.lua new file mode 100755 index 0000000..1841d6a --- /dev/null +++ b/iup/srclua5/separator.lua @@ -0,0 +1,16 @@ +------------------------------------------------------------------------------ +-- Separator class +------------------------------------------------------------------------------ +local ctrl = { + nick = "separator", + parent = WIDGET, + creation = "", + callback = {} +} + +function ctrl.createElement(class, arg) + return Separator() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/spin.lua b/iup/srclua5/spin.lua new file mode 100755 index 0000000..b6e2044 --- /dev/null +++ b/iup/srclua5/spin.lua @@ -0,0 +1,18 @@ +------------------------------------------------------------------------------ +-- Spin class +------------------------------------------------------------------------------ +local ctrl = { + nick = "spin", + parent = WIDGET, + creation = "", + callback = { + spin_cb = "n", + }, +} + +function ctrl.createElement(class, arg) + return Spin(arg.action) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/spinbox.lua b/iup/srclua5/spinbox.lua new file mode 100755 index 0000000..c671e6a --- /dev/null +++ b/iup/srclua5/spinbox.lua @@ -0,0 +1,18 @@ +------------------------------------------------------------------------------ +-- SpinBox class +------------------------------------------------------------------------------ +local ctrl = { + nick = "spinbox", + parent = WIDGET, + creation = "i", + callback = { + spin_cb = "n", + }, +} + +function ctrl.createElement(class, arg) + return Spinbox(arg[1]) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/submenu.lua b/iup/srclua5/submenu.lua new file mode 100755 index 0000000..5dc76d4 --- /dev/null +++ b/iup/srclua5/submenu.lua @@ -0,0 +1,19 @@ +------------------------------------------------------------------------------ +-- Submenu class +------------------------------------------------------------------------------ +local ctrl = { + nick = "submenu", + parent = WIDGET, + creation = "Si", + callback = { +-- open_cb = "", -- already registered by the menu +-- menuclose_cb = "", -- already registered by the menu + } +} + +function ctrl.createElement(class, arg) + return Submenu(arg.title, arg[1]) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/tabs.lua b/iup/srclua5/tabs.lua new file mode 100755 index 0000000..3dc69bb --- /dev/null +++ b/iup/srclua5/tabs.lua @@ -0,0 +1,31 @@ +------------------------------------------------------------------------------ +-- Tabs class +------------------------------------------------------------------------------ +local ctrl = { + nick = "tabs", + parent = WIDGET, + creation = "v", + callback = { + tabchange_cb = "ii", + }, + funcname = "Tabsv", + createfunc = [[ +static int Tabsv(lua_State *L) +{ + Ihandle **hlist = iuplua_checkihandle_array(L, 1); + Ihandle *h = IupTabsv(hlist); + iuplua_plugstate(L, h); + iuplua_pushihandle_raw(L, h); + free(hlist); + return 1; +} + +]], +} + +function ctrl.createElement(class, arg) + return Tabsv(arg) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/text.lua b/iup/srclua5/text.lua new file mode 100755 index 0000000..e01dab5 --- /dev/null +++ b/iup/srclua5/text.lua @@ -0,0 +1,20 @@ +------------------------------------------------------------------------------ +-- Text class +------------------------------------------------------------------------------ +local ctrl = { + nick = "text", + parent = WIDGET, + creation = "-", + callback = { + action = "ns", + caret_cb = "nnn", + valuechanged_cb = "", -- used by many other controls + } +} + +function ctrl.createElement(class, arg) + return Text() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/timer.lua b/iup/srclua5/timer.lua new file mode 100755 index 0000000..53cda70 --- /dev/null +++ b/iup/srclua5/timer.lua @@ -0,0 +1,18 @@ +------------------------------------------------------------------------------ +-- Timer class +------------------------------------------------------------------------------ +local ctrl = { + nick = "timer", + parent = WIDGET, + creation = "", + callback = { + action_cb = "", + }, +} + +function ctrl.createElement(class, arg) + return Timer() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/toggle.lua b/iup/srclua5/toggle.lua new file mode 100755 index 0000000..da9380b --- /dev/null +++ b/iup/srclua5/toggle.lua @@ -0,0 +1,18 @@ +------------------------------------------------------------------------------ +-- Toggle class +------------------------------------------------------------------------------ +local ctrl = { + nick = "toggle", + parent = WIDGET, + creation = "S-", + callback = { + action = "n", + } +} + +function ctrl.createElement(class, arg) + return Toggle(arg.title) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/tree.lua b/iup/srclua5/tree.lua new file mode 100755 index 0000000..bd8daf7 --- /dev/null +++ b/iup/srclua5/tree.lua @@ -0,0 +1,76 @@ +------------------------------------------------------------------------------ +-- Tree class +------------------------------------------------------------------------------ +local ctrl = { + nick = "tree", + parent = WIDGET, + creation = "", + callback = { + selection_cb = "nn", + multiselection_cb = "nn", -- fake definition to be replaced by treefuncs module + branchopen_cb = "n", + branchclose_cb = "n", + executeleaf_cb = "n", + renamenode_cb = "ns", + noderemoved_cb = "ns", -- fake definition to be replaced by treefuncs module + rename_cb = "ns", + showrename_cb = "n", + rightclick_cb = "n", + dragdrop_cb = "nnnn", + }, + extrafuncs = 1, +} + +local function TreeSetAttributeHandle(handle, name, value) + if iupGetClass(value) == "iup handle" then value = ihandle_setname(value) end + SetAttribute(handle, name, value) +end + +function TreeSetNodeAttrib(handle, node, id) + if node.color then SetAttribute(handle, "COLOR"..id, node.color) end + if node.state then SetAttribute(handle, "STATE"..id, node.state) end + if node.titlefont then SetAttribute(handle, "TITLEFONT"..id, node.titlefont) end + if node.marked then SetAttribute(handle, "MARKED"..id, node.marked) end + if node.image then TreeSetAttributeHandle(handle, "IMAGE"..id, node.image) end + if node.imageexpanded then TreeSetAttributeHandle(handle, "IMAGEEXPANDED"..id, node.imageexpanded) end + if node.userid then TreeSetUserId(handle, id, node.userid) end +end + +function TreeSetValueRec(handle, t, id) + if t == nil then return end + local cont = #t + while cont >= 0 do + local node = t[cont] + if type(node) == "table" then + if node.branchname then + SetAttribute(handle, "ADDBRANCH"..id, node.branchname) + TreeSetNodeAttrib(handle, node, id+1) + TreeSetValueRec(handle, node, id+1) + elseif node.leafname then + SetAttribute(handle, "ADDLEAF"..id, node.leafname) + TreeSetNodeAttrib(handle, node, id+1) + end + else + if node then + SetAttribute(handle, "ADDLEAF"..id, node) + end + end + cont = cont - 1 + end +end + +function TreeSetValue(handle, t, id) + if (not id) then + id = 0 -- default is the root + if t.branchname then SetAttribute(handle, "TITLE0", t.branchname) end + TreeSetNodeAttrib(handle, t, 0) + end + TreeSetValueRec(handle, t, id) +end + +function ctrl.createElement(class, arg) + return Tree() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/user.lua b/iup/srclua5/user.lua new file mode 100755 index 0000000..c202be3 --- /dev/null +++ b/iup/srclua5/user.lua @@ -0,0 +1,17 @@ + +------------------------------------------------------------------------------ +-- User class +------------------------------------------------------------------------------ +local ctrl = { + nick = "user", + parent = WIDGET, + creation = "", + callback = {} +} + +function ctrl.createElement(class, arg) + return User() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/val.lua b/iup/srclua5/val.lua new file mode 100755 index 0000000..ba94255 --- /dev/null +++ b/iup/srclua5/val.lua @@ -0,0 +1,20 @@ +------------------------------------------------------------------------------ +-- Val class +------------------------------------------------------------------------------ +local ctrl = { + nick = "val", + parent = WIDGET, + creation = "s", + callback = { + mousemove_cb = "d", + button_press_cb = "d", + button_release_cb = "d", + }, +} + +function ctrl.createElement(class, arg) + return Val(arg[1]) +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/vbox.lua b/iup/srclua5/vbox.lua new file mode 100755 index 0000000..b98984c --- /dev/null +++ b/iup/srclua5/vbox.lua @@ -0,0 +1,20 @@ +------------------------------------------------------------------------------ +-- VBox class +------------------------------------------------------------------------------ +local ctrl = { + nick = "vbox", + parent = BOX, + creation = "-", + callback = {} +} + +function ctrl.append (handle, elem) + Append(handle, elem) +end + +function ctrl.createElement(class, arg) + return Vbox() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srclua5/zbox.lua b/iup/srclua5/zbox.lua new file mode 100755 index 0000000..579c00b --- /dev/null +++ b/iup/srclua5/zbox.lua @@ -0,0 +1,32 @@ +------------------------------------------------------------------------------ +-- ZBox class +------------------------------------------------------------------------------ +local ctrl = { + nick = "zbox", + parent = BOX, + creation = "-", + callback = {} +} + +function ctrl.append (handle, elem) + ihandle_setname(elem) + Append(handle, elem) +end + +function ctrl.SetChildrenNames(obj) + if obj then + local i = 1 + while obj[i] do + ihandle_setname(obj[i]) + i = i+1 + end + end +end + +function ctrl.createElement(class, arg) + ctrl.SetChildrenNames(arg) + return Zbox() +end + +iupRegisterWidget(ctrl) +iupSetClass(ctrl, "iup widget") diff --git a/iup/srcole/config.mak b/iup/srcole/config.mak new file mode 100755 index 0000000..af0ef50 --- /dev/null +++ b/iup/srcole/config.mak @@ -0,0 +1,17 @@ +PROJNAME = iup +LIBNAME = iupole +OPT = YES + +INCLUDES = ../include ../src +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup + +SRC = iup_olecontrol.cpp \ + tLegacy.cpp \ + tAmbientProperties.cpp \ + tDispatch.cpp \ + tOleClientSite.cpp \ + tOleControlSite.cpp \ + tOleHandler.cpp \ + tOleInPlaceFrame.cpp \ + tOleInPlaceSite.cpp diff --git a/iup/srcole/iup_olecontrol.cpp b/iup/srcole/iup_olecontrol.cpp new file mode 100755 index 0000000..20431c5 --- /dev/null +++ b/iup/srcole/iup_olecontrol.cpp @@ -0,0 +1,200 @@ +/* + * iupolectl.cpp + * + * CPI que implementa um container OLE + */ + +#include "tOleHandler.h" + +#include +#include +#include +#include + +#include "iup.h" +#include "iupole.h" + +#include "iup_object.h" +#include "iup_register.h" +#include "iup_attrib.h" +#include "iup_stdcontrols.h" +#include "iup_str.h" +#include "iup_layout.h" + + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + + tOleHandler* olehandler; +}; + +static char* iOleControlGetDesignModeAttrib(Ihandle* ih) +{ + if (ih->data->olehandler->m_ambientProp.getDesignMode()) + return "YES"; + else + return "NO"; +} + +static int iOleControlSetDesignModeAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + ih->data->olehandler->m_ambientProp.setDesignMode(true, true); + else + ih->data->olehandler->m_ambientProp.setDesignMode(false, true); + return 1; +} + +static int iOleControlSetDesignModeDontNotifyAttrib(Ihandle* ih, const char* value) +{ + if (iupStrBoolean(value)) + ih->data->olehandler->m_ambientProp.setDesignMode(true, false); + else + ih->data->olehandler->m_ambientProp.setDesignMode(false, false); + return 1; +} + +static char* iOleControlGetIUnknownAttrib(Ihandle* ih) +{ + IUnknown *punk = NULL; + ih->data->olehandler->ObjectGet(&punk); + return (char*)punk; +} + +static int iOleControlResize_CB(Ihandle *ih) +{ + if (!ih->data->olehandler->m_hWnd) + return IUP_DEFAULT; + + ih->data->olehandler->OnShow(); + + return IUP_DEFAULT; +} + +static void iOleControlComputeNaturalSizeMethod(Ihandle* ih, int *w, int *h, int *expand) +{ + long natural_w = 0, natural_h = 0; + (void)expand; /* unset if not a container */ + + ih->data->olehandler->GetNaturalSize(&natural_w, &natural_h); + + *w = natural_w; + *h = natural_h; +} + +static void iOleControlLayoutUpdateMethod(Ihandle* ih) +{ + SIZEL szl; + szl.cx = ih->currentwidth; + szl.cy = ih->currentheight; + ih->data->olehandler->SizeSet(&szl, TRUE, TRUE); + ih->data->olehandler->UpdateInPlaceObjectRects(NULL, TRUE); +} + +static int iOleControlMapMethod(Ihandle* ih) +{ + /* reset the canvas BGCOLOR */ + IupSetAttribute(ih, "BACKGROUND", NULL); + + ih->data->olehandler->m_hWnd = ih->handle; + + return IUP_NOERROR; +} + +static int iOleControlCreateMethod(Ihandle* ih, void **params) +{ + CLSID clsid; + + if (!params || !(params[0])) + return IUP_ERROR; + + char *progID = (char*)params[0]; + + /* free the data alocated by IupCanvas */ + if (ih->data) free(ih->data); + ih->data = iupALLOCCTRLDATA(); + + /* change the IupCanvas default values */ + iupAttribSetStr(ih, "BORDER", "NO"); + + /* IupCanvas callbacks */ + IupSetCallback(ih,"RESIZE_CB",(Icallback)iOleControlResize_CB); + + size_t len = strlen(progID)+1; + wchar_t* wcProgId = (wchar_t*) malloc(len * sizeof(wchar_t)); + mbstowcs(wcProgId, progID, len); + HRESULT hr = CLSIDFromProgID(wcProgId, &clsid); + free(wcProgId); + if(FAILED(hr)) + return IUP_ERROR; + + ih->data->olehandler = new tOleHandler(); + if (ih->data->olehandler->Create(&clsid) == CREATE_FAILED) + return IUP_ERROR; + + return IUP_NOERROR; +} + +static void iOleControlDestroyMethod(Ihandle* ih) +{ + ih->data->olehandler->Close(true); + delete ih->data->olehandler; +} + +static void iOleControlRelease(Iclass* ic) +{ + (void)ic; + OleUninitialize(); +} + +static Iclass* iOleControlGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "olecontrol"; + ic->format = "s"; /* one string */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + + /* Class functions */ + ic->Create = iOleControlCreateMethod; + ic->Destroy = iOleControlDestroyMethod; + ic->Release = iOleControlRelease; + ic->Map = iOleControlMapMethod; + ic->LayoutUpdate = iOleControlLayoutUpdateMethod; + ic->ComputeNaturalSize = iOleControlComputeNaturalSizeMethod; + + iupClassRegisterAttribute(ic, "DESIGNMODE", iOleControlGetDesignModeAttrib, iOleControlSetDesignModeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DESIGNMODE_DONT_NOTIFY", iOleControlGetDesignModeAttrib, iOleControlSetDesignModeDontNotifyAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "IUNKNOWN", iOleControlGetIUnknownAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING); + + /* Overwrite the canvas implementation */ + iupClassRegisterAttribute(ic, "BGCOLOR", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED); + + return ic; +} + +Ihandle *IupOleControl(const char *ProgID) +{ + void *params[2]; + params[0] = (void*)ProgID; + params[1] = NULL; + return IupCreatev("olecontrol", params); +} + +int IupOleControlOpen(void) +{ + if (IupGetGlobal("_IUP_OLECONTROL_OPEN")) + return IUP_OPENED; + + HRESULT retval = OleInitialize(NULL); + if (retval != S_OK && retval != S_FALSE) + return IUP_ERROR; + + iupRegisterClass(iOleControlGetClass()); + + IupSetGlobal("_IUP_OLECONTROL_OPEN", "1"); + return IUP_NOERROR; +} diff --git a/iup/srcole/iupole.def b/iup/srcole/iupole.def new file mode 100755 index 0000000..d5fd72a --- /dev/null +++ b/iup/srcole/iupole.def @@ -0,0 +1,3 @@ +EXPORTS +IupOleControl +IupOleControlOpen diff --git a/iup/srcole/make_uname.bat b/iup/srcole/make_uname.bat new file mode 100755 index 0000000..f0a0722 --- /dev/null +++ b/iup/srcole/make_uname.bat @@ -0,0 +1,4 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +call tecmake %1 %2 %3 %4 %5 %6 diff --git a/iup/srcole/tAmbientProperties.cpp b/iup/srcole/tAmbientProperties.cpp new file mode 100755 index 0000000..c9968a7 --- /dev/null +++ b/iup/srcole/tAmbientProperties.cpp @@ -0,0 +1,157 @@ +// tAmbientProperties.cpp: implementation of the tAmbientProperties class. +// +////////////////////////////////////////////////////////////////////// + +#include + +#include "tAmbientProperties.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +tAmbientProperties::tAmbientProperties() +{ + //0x80000000 in OLE_COLOR indicates low byte is color index. + m_clrBack=0x80000000+COLOR_WINDOW; + m_clrFore=0x80000000+COLOR_WINDOWTEXT; + m_lcid=LOCALE_USER_DEFAULT; + m_fDesignMode = TRUE; + + m_pIOleControl = NULL; + +#if 0 + { + int cy=MulDiv(-14, LOMETRIC_PER_INCH, 72); + //CHAPTER24MOD + //End CHAPTER24MOD + + HFONT m_hFont=CreateFont(cy, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE + , ANSI_CHARSET, OUT_TT_PRECIS, CLIP_TT_ALWAYS, PROOF_QUALITY + , VARIABLE_PITCH | FF_SWISS, TEXT("Arial")); + + + //m_hFont=(HFONT)GetStockObject(ANSI_VAR_FONT); + + //Need a standard font object for ambient properties + + FONTDESC fd={sizeof(FONTDESC), L"Arial" + , FONTSIZE(14), FW_NORMAL, DEFAULT_CHARSET + , FALSE, FALSE, FALSE}; + + OleCreateFontIndirect( + &fd, IID_IFontDisp, (void **)&m_pIFont + ); +#endif + m_pIFont = NULL; +} + +tAmbientProperties::~tAmbientProperties() +{ + if(m_pIOleControl) + m_pIOleControl->Release(); + + if(m_pIFont) + m_pIFont->Release(); +} + +void tAmbientProperties::setDesignMode(bool value, bool notify) +{ + switch(value) + { + case true: + m_fDesignMode = FALSE; + break; + + case false: + m_fDesignMode = FALSE; + break; + } + + assert(m_pIOleControl); + if(m_pIOleControl == NULL) + return; + + + // Notifica controle da mudanca + + if(notify) + m_pIOleControl->OnAmbientPropertyChange(DISPID_AMBIENT_USERMODE); +} + +OLE_COLOR tAmbientProperties::getBackColor() +{ + return m_clrBack; +} + +OLE_COLOR tAmbientProperties::getForeColor() +{ + return m_clrFore; +} + +bool tAmbientProperties::has_font() +{ + if(m_pIFont != NULL) + return true; + else + return false; +} + +IFontDisp * tAmbientProperties::getFontRef() +{ + m_pIFont->AddRef(); + return m_pIFont; +} + +LCID tAmbientProperties::getLCID() +{ + return m_lcid; +} + +BOOL tAmbientProperties::getDesignMode() +{ + return m_fDesignMode; +} + +void tAmbientProperties::setForeColor(int red, + int green, + int blue, + bool notify) +{ + m_clrFore = blue << 16 | green << 8 | red; + + assert(m_pIOleControl); + if(m_pIOleControl == NULL) + return; + + if(notify) + m_pIOleControl-> + OnAmbientPropertyChange(DISPID_AMBIENT_FORECOLOR); +} + +void tAmbientProperties::setBackColor(int red, + int green, + int blue, + bool notify) +{ + m_clrBack = blue << 16 | green << 8 | red; + + assert(m_pIOleControl); + if(m_pIOleControl == NULL) + return; + + if(notify) + m_pIOleControl-> + OnAmbientPropertyChange(DISPID_AMBIENT_BACKCOLOR); +} + +void tAmbientProperties::setControl(IOleControl * olecontrol) +{ + assert(olecontrol && m_pIOleControl == NULL); + + if(m_pIOleControl != NULL) + return; + + olecontrol->AddRef(); + m_pIOleControl = olecontrol; +} diff --git a/iup/srcole/tAmbientProperties.h b/iup/srcole/tAmbientProperties.h new file mode 100755 index 0000000..359e733 --- /dev/null +++ b/iup/srcole/tAmbientProperties.h @@ -0,0 +1,47 @@ +// tAmbientProperties.h: interface for the tAmbientProperties class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TAMBIENTPROPERTIES_H__FC01B4C7_4918_11D4_9DF5_0000B45D6611__INCLUDED_) +#define AFX_TAMBIENTPROPERTIES_H__FC01B4C7_4918_11D4_9DF5_0000B45D6611__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include +#include + + +class tAmbientProperties +{ +public: + void setControl(IOleControl *olecontrol); + void setBackColor(int red, int green, int blue, bool notify); + void setForeColor(int red, int green, int blue, bool notify); + BOOL getDesignMode(void); + LCID getLCID(void); + IFontDisp * getFontRef(void); + bool has_font(void); + OLE_COLOR getForeColor(void); + OLE_COLOR getBackColor(void); + void setDesignMode(bool value, bool notify); + tAmbientProperties(); + virtual ~tAmbientProperties(); + +protected: + + // Utilizado para notificar mudancas nas propriedades + LPOLECONTROL m_pIOleControl; + + // propriedades + OLE_COLOR m_clrBack; + OLE_COLOR m_clrFore; + IFontDisp *m_pIFont; + LCID m_lcid; + BOOL m_fDesignMode; + BOOL m_fUIDead; + BOOL m_fHatchHandles; +}; + +#endif // !defined(AFX_TAMBIENTPROPERTIES_H__FC01B4C7_4918_11D4_9DF5_0000B45D6611__INCLUDED_) diff --git a/iup/srcole/tDispatch.cpp b/iup/srcole/tDispatch.cpp new file mode 100755 index 0000000..9db30a3 --- /dev/null +++ b/iup/srcole/tDispatch.cpp @@ -0,0 +1,236 @@ +// tDispatch.cpp: implementation of the tDispatch class. +// +////////////////////////////////////////////////////////////////////// + +#include "tDispatch.h" +#include "tOleHandler.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + + +/* + * tDispatch::tDispatch + * tDispatch::~tDispatch + * + * Parameters (Constructor): + * pTen PCTenant of the tenant we're in. + * pUnkOuter LPUNKNOWN to which we delegate. + */ + +tDispatch::tDispatch(tOleHandler *pTen, LPUNKNOWN pUnkOuter) + { + m_cRef=0; + m_pTen=pTen; + m_pUnkOuter=pUnkOuter; + return; + } + +tDispatch::~tDispatch(void) + { + return; + } + + + + +/* + * tDispatch::QueryInterface + * tDispatch::AddRef + * tDispatch::Release + */ + +STDMETHODIMP tDispatch::QueryInterface(REFIID riid, PPVOID ppv) + { + return m_pUnkOuter->QueryInterface(riid, ppv); + } + +STDMETHODIMP_(ULONG) tDispatch::AddRef(void) + { + ++m_cRef; + return m_pUnkOuter->AddRef(); + } + +STDMETHODIMP_(ULONG) tDispatch::Release(void) + { + m_cRef--; + return m_pUnkOuter->Release(); + } + + + + +/* + * tDispatch::GetTypeInfoCount + * tDispatch::GetTypeInfo + * tDispatch::GetIDsOfNames + * + * Unimplemented members, not needed for ambient properties. + */ + +STDMETHODIMP tDispatch::GetTypeInfoCount(UINT *pctInfo) + { + *pctInfo=0; + return NOERROR; + } + +STDMETHODIMP tDispatch::GetTypeInfo(UINT itinfo + , LCID lcid, ITypeInfo **pptInfo) + { + *pptInfo=NULL; + return ResultFromScode(E_NOTIMPL); + } + +STDMETHODIMP tDispatch::GetIDsOfNames(REFIID riid + , OLECHAR **rgszNames, UINT cNames, LCID lcid, DISPID *rgDispID) + { + *rgszNames=NULL; + *rgDispID=NULL; + return ResultFromScode(E_NOTIMPL); + } + + + + +/* + * tDispatch::Invoke + * + * Purpose: + * Calls a method in the dispatch interface or manipulates a + * property. + * + * Parameters: + * dispIDMember DISPID of the method or property of interest. + * riid REFIID reserved, must be NULL. + * lcid LCID of the locale. + * wFlags USHORT describing the context of the invocation. + * pDispParams DISPPARAMS * to the array of arguments. + * pVarResult VARIANT * in which to store the result. Is + * NULL if the caller is not interested. + * pExcepInfo EXCEPINFO * to exception information. + * puArgErr UINT * in which to store the index of an + * invalid parameter if DISP_E_TYPEMISMATCH + * is returned. + * + * Return Value: + * HRESULT NOERROR or a general error code. + */ + + +STDMETHODIMP tDispatch::Invoke(DISPID dispIDMember, REFIID riid + , LCID lcid, unsigned short wFlags, DISPPARAMS *pDispParams + , VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) + { + HRESULT hr; + VARIANT varResult; + + if (IID_NULL!=riid) + return ResultFromScode(E_INVALIDARG); + + /* + * We ignore lcid in this function. A multilingual application + * might use it to determine the meaning of certain parameters + * or perhaps as an indication of how to format data like + * time, date, and currency or any other language or locale- + * sensitive data. + */ + + /* + * Variable handling: since ambient properties is just a + * collection of singular read-only values, we don't have to + * worry about input parameters. + */ + + /* + * If the caller is not interested in the return value, then + * pVarResult is NULL. But since we're dealing with ambient + * properties, there should always be an interest. In any case, + * if we're given a NULL, we'll point it to a dummy structure so + * the rest of the code can assume that pVarResult is non-NULL. + */ + if(NULL==pVarResult) + pVarResult=&varResult; + + VariantInit(pVarResult); + + //The most common case is boolean, use as an initial type + V_VT(pVarResult)=VT_BOOL; + + /* + * Process the requested ambient property. Anything but a + * request for a property is invalid, so we can check that + * before looking at the specific ID. We can only get away + * with this because all properties are read-only. + */ + + if (!(DISPATCH_PROPERTYGET & wFlags)) + return ResultFromScode(DISP_E_MEMBERNOTFOUND); + + hr=NOERROR; + + switch (dispIDMember) + { + case DISPID_AMBIENT_BACKCOLOR: + V_I4(pVarResult)=m_pTen->m_ambientProp.getBackColor(); + V_VT(pVarResult)=VT_I4; + break; + + case DISPID_AMBIENT_FORECOLOR: + V_I4(pVarResult)=m_pTen->m_ambientProp.getForeColor(); + V_VT(pVarResult)=VT_I4; + break; + + case DISPID_AMBIENT_FONT: + /* + * If we failed to create the font, act like we + * don't support it. + */ + if (!m_pTen->m_ambientProp.has_font()) + return ResultFromScode(DISP_E_MEMBERNOTFOUND); + + //The correct type is an IFontDisp pointer + V_DISPATCH(pVarResult)=m_pTen->m_ambientProp.getFontRef(); + V_VT(pVarResult)=VT_FONT; + break; + + case DISPID_AMBIENT_LOCALEID: + V_I4(pVarResult)=m_pTen->m_ambientProp.getLCID(); + V_VT(pVarResult)=VT_I4; + break; + + case DISPID_AMBIENT_USERMODE: + V_BOOL(pVarResult)=!m_pTen->m_ambientProp.getDesignMode(); + V_VT(pVarResult) = VT_BOOL; + break; + + case DISPID_AMBIENT_UIDEAD: + //V_BOOL(pVarResult)=m_pTen->m_ambientProp.getUIDead(); + V_BOOL(pVarResult)=FALSE; + V_VT(pVarResult) = VT_BOOL; + + break; + + case DISPID_AMBIENT_SUPPORTSMNEMONICS: + V_BOOL(pVarResult)=TRUE; + break; + + case DISPID_AMBIENT_SHOWGRABHANDLES: + //V_BOOL(pVarResult)=m_pTen->m_ambientProp.m_fHatchHandles; + V_BOOL(pVarResult)=FALSE; + V_VT(pVarResult) = VT_BOOL; + break; + + case DISPID_AMBIENT_SHOWHATCHING: +// V_BOOL(pVarResult)=m_pTen->m_ambientProp.m_fHatchHandles; + V_BOOL(pVarResult)=FALSE; + V_VT(pVarResult) = VT_BOOL; + break; + + default: + hr=ResultFromScode(DISP_E_MEMBERNOTFOUND); + break; + } + + return hr; + } diff --git a/iup/srcole/tDispatch.h b/iup/srcole/tDispatch.h new file mode 100755 index 0000000..c061d75 --- /dev/null +++ b/iup/srcole/tDispatch.h @@ -0,0 +1,40 @@ +// tDispatch.h: interface for the tDispatch class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TDISPATCH_H__37A5ADED_91FB_11D3_A906_0004AC252223__INCLUDED_) +#define AFX_TDISPATCH_H__37A5ADED_91FB_11D3_A906_0004AC252223__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include + +class tDispatch : public IDispatch +{ +public: + protected: + ULONG m_cRef; + class tOleHandler *m_pTen; + LPUNKNOWN m_pUnkOuter; + + public: + tDispatch(class tOleHandler *, LPUNKNOWN); + ~tDispatch(void); + + STDMETHODIMP QueryInterface(REFIID, LPVOID *); + STDMETHODIMP_(ULONG) AddRef(void); + STDMETHODIMP_(ULONG) Release(void); + + STDMETHODIMP GetTypeInfoCount(UINT *); + STDMETHODIMP GetTypeInfo(UINT, LCID, ITypeInfo **); + STDMETHODIMP GetIDsOfNames(REFIID, OLECHAR **, UINT + , LCID, DISPID *); + STDMETHODIMP Invoke(DISPID, REFIID, LCID, USHORT + , DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT *); + + +}; + +#endif // !defined(AFX_TDISPATCH_H__37A5ADED_91FB_11D3_A906_0004AC252223__INCLUDED_) diff --git a/iup/srcole/tLegacy.cpp b/iup/srcole/tLegacy.cpp new file mode 100755 index 0000000..c310865 --- /dev/null +++ b/iup/srcole/tLegacy.cpp @@ -0,0 +1,240 @@ +// legacy.cpp + +#include +#include "tLegacy.h" + + +/* + * RectConvertMappings + * + * Purpose: + * Converts the contents of a rectangle from device to logical + * coordinates where the hDC defines the logical coordinates. + * + * Parameters: + * pRect LPRECT containing the rectangle to convert. + * hDC HDC describing the logical coordinate system. + * if NULL, uses a screen DC in MM_LOMETRIC. + * fToDevice BOOL TRUE to convert from uConv to device, + * FALSE to convert device to uConv. + * + * Return Value: + * None + */ + + +void RectConvertMappings(LPRECT pRect, HDC hDC, BOOL fToDevice) + { + POINT rgpt[2]; + BOOL fSysDC=FALSE; + + if (NULL==pRect) + return; + + rgpt[0].x=pRect->left; + rgpt[0].y=pRect->top; + rgpt[1].x=pRect->right; + rgpt[1].y=pRect->bottom; + + if (NULL==hDC) + { + hDC=GetDC(NULL); + SetMapMode(hDC, MM_LOMETRIC); + fSysDC=TRUE; + } + + if (fToDevice) + LPtoDP(hDC, rgpt, 2); + else + DPtoLP(hDC, rgpt, 2); + + if (fSysDC) + ReleaseDC(NULL, hDC); + + pRect->left=rgpt[0].x; + pRect->top=rgpt[0].y; + pRect->right=rgpt[1].x; + pRect->bottom=rgpt[1].y; + + return; + } + +STDAPI_(void) XformRectInHimetricToPixels(HDC hDC, LPRECT prcHiMetric + , LPRECT prcPix) + { + int iXppli; //Pixels per logical inch along width + int iYppli; //Pixels per logical inch along height + int iXextInHiMetric=(prcHiMetric->right-prcHiMetric->left); + int iYextInHiMetric=(prcHiMetric->bottom-prcHiMetric->top); + BOOL fSystemDC=FALSE; + + if (NULL==hDC || GetDeviceCaps(hDC, LOGPIXELSX) == 0) + { + hDC=GetDC(NULL); + fSystemDC=TRUE; + } + + iXppli=GetDeviceCaps (hDC, LOGPIXELSX); + iYppli=GetDeviceCaps (hDC, LOGPIXELSY); + + //We got pixel units, convert them to logical HIMETRIC along the display + prcPix->right=MAP_LOGHIM_TO_PIX(iXextInHiMetric, iXppli); + prcPix->top =MAP_LOGHIM_TO_PIX(iYextInHiMetric, iYppli); + + prcPix->left =0; + prcPix->bottom= 0; + + if (fSystemDC) + ReleaseDC(NULL, hDC); + + return; + } +/* + * INOLE_SetIconInCache + * + * Purpose: + * Stores an iconic presentation metafile in the cache. + * + * Parameters: + * pObj IUnknown * of the object. + * hMetaPict HGLOBAL containing the presentation. + * + * Return Value: + * HRESULT From IOleCache::SetData. + */ + +#if 0 +STDAPI INOLE_SetIconInCache(IUnknown *pObj, HGLOBAL hMetaPict) + { + IOleCache *pCache; + FORMATETC fe; + STGMEDIUM stm; + HRESULT hr; + + if (NULL==hMetaPict) + return ResultFromScode(E_INVALIDARG); + + if (FAILED(pObj->QueryInterface(IID_IOleCache, (void **)&pCache))) + return ResultFromScode(E_NOINTERFACE); + + SETFormatEtc(fe, CF_METAFILEPICT, DVASPECT_ICON, NULL + , TYMED_MFPICT, -1); + + stm.tymed=TYMED_MFPICT; + stm.hGlobal=hMetaPict; + stm.pUnkForRelease=NULL; + + hr=pCache->SetData(&fe, &stm, FALSE); + pCache->Release(); + + return hr; + } +#endif + + + +/* + * XformRectInPixelsToHimetric + * XformRectInHimetricToPixels + * + * Purpose: + * Convert a rectangle between pixels of a given hDC and HIMETRIC units + * as manipulated in OLE. If the hDC is NULL, then a screen DC is used + * and assumes the MM_TEXT mapping mode. + * + * Parameters: + * hDC HDC providing reference to the pixel mapping. If + * NULL, a screen DC is used. + * prcPix LPRECT containng the rectangles to convert. + * prcHiMetric + * + * Return Value: + * None + * + * NOTE: + * When displaying on the screen, Window apps display everything enlarged + * from its actual size so that it is easier to read. For example, if an + * app wants to display a 1in. horizontal line, that when printed is + * actually a 1in. line on the printed page, then it will display the line + * on the screen physically larger than 1in. This is described as a line + * that is "logically" 1in. along the display width. Windows maintains as + * part of the device-specific information about a given display device: + * LOGPIXELSX -- no. of pixels per logical in along the display width + * LOGPIXELSY -- no. of pixels per logical in along the display height + * + * The following formula converts a distance in pixels into its equivalent + * logical HIMETRIC units: + * + * DistInHiMetric=(HIMETRIC_PER_INCH * DistInPix) + * ------------------------------- + * PIXELS_PER_LOGICAL_IN + * + * Rect in Pixels (MM_TEXT): + * + * 0---------- X + * | + * | 1) ------------------ ( 2 P1=(rc.left, rc.top) + * | | | P2=(rc.right, rc.top) + * | | | P3=(rc.left, rc.bottom) + * | | | P4=(rc.right, rc.bottom) + * | | + * Y | | + * 3) ------------------ ( 4 + * + * NOTE: Origin =(P1x, P1y) + * X extent=P4x - P1x + * Y extent=P4y - P1y + * + * + * Rect in Himetric (MM_HIMETRIC): + * + * + * 1) ------------------ ( 2 P1=(rc.left, rc.top) + * Y | | P2=(rc.right, rc.top) + * | | P3=(rc.left, rc.bottom) + * | | | P4=(rc.right, rc.bottom) + * | | | + * | | | + * | 3) ------------------ ( 4 + * | + * 0---------- X + * + * NOTE: Origin =(P3x, P3y) + * X extent=P2x - P3x + * Y extent=P2y - P3y + * + * + */ + +STDAPI_(void) XformRectInPixelsToHimetric(HDC hDC, LPRECT prcPix + , LPRECT prcHiMetric) + { + int iXppli; //Pixels per logical inch along width + int iYppli; //Pixels per logical inch along height + int iXextInPix=(prcPix->right-prcPix->left); + int iYextInPix=(prcPix->bottom-prcPix->top); + BOOL fSystemDC=FALSE; + + if (NULL==hDC || GetDeviceCaps(hDC, LOGPIXELSX) == 0) + { + hDC=GetDC(NULL); + fSystemDC=TRUE; + } + + iXppli=GetDeviceCaps (hDC, LOGPIXELSX); + iYppli=GetDeviceCaps (hDC, LOGPIXELSY); + + //We got pixel units, convert them to logical HIMETRIC along the display + prcHiMetric->right=MAP_PIX_TO_LOGHIM(iXextInPix, iXppli); + prcHiMetric->top =MAP_PIX_TO_LOGHIM(iYextInPix, iYppli); + + prcHiMetric->left =0; + prcHiMetric->bottom =0; + + if (fSystemDC) + ReleaseDC(NULL, hDC); + + return; + } + + diff --git a/iup/srcole/tLegacy.h b/iup/srcole/tLegacy.h new file mode 100755 index 0000000..3294e20 --- /dev/null +++ b/iup/srcole/tLegacy.h @@ -0,0 +1,550 @@ +/* + * INOLE.H + * + * Master header file for all Inside OLE samples. + * + * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved + * + * Kraig Brockschmidt, Microsoft + * Internet : kraigb@microsoft.com + * Compuserve: >INTERNET:kraigb@microsoft.com + */ + + +#ifndef _INOLE_H_ +#define _INOLE_H_ + +#define INC_OLE2 +#include +#include +#include + +#ifdef INC_OLEUI +#ifdef WIN32 +/* + * Comment the next line and remove the comment from the + * line after it to compile for Windows NT 3.5. + */ +#include +//#include +#else +#include +#endif +#endif + +#ifdef INC_CONTROLS +#define INC_AUTOMATION +#endif + +#ifdef INC_AUTOMATION +#ifndef WIN32 +#include +#include +#else +#include +#endif +#endif + +#ifdef INC_CONTROLS +#include +#ifndef INITGUIDS +#include +#endif +#endif + +#ifdef WIN32 +#include +#ifdef UNICODE +#include +#endif +#endif + +#ifndef WIN32 +#include +#include +#endif + +#ifdef INC_CLASSLIB +extern "C" + { + #include + #ifndef WIN32 + #include + #include + #endif + } + +#include +#endif + + +//Types that OLE2.H et. al. leave out + +#ifndef PPVOID +typedef LPVOID * PPVOID; +#endif //PPVOID + + +#ifdef _OLE2_H_ //May not include ole2.h at all times. + +#ifndef PPOINTL +typedef POINTL * PPOINTL; +#endif //PPOINTL + + +#ifndef _WIN32 +#ifndef OLECHAR +typedef char OLECHAR; +typedef OLECHAR FAR* LPOLESTR; +typedef const OLECHAR FAR* LPCOLESTR; +#endif //OLECHAR +#endif //_WIN32 + + +//Useful macros. +#define SETFormatEtc(fe, cf, asp, td, med, li) \ + {\ + (fe).cfFormat=cf;\ + (fe).dwAspect=asp;\ + (fe).ptd=td;\ + (fe).tymed=med;\ + (fe).lindex=li;\ + } + +#define SETDefFormatEtc(fe, cf, med) \ + {\ + (fe).cfFormat=cf;\ + (fe).dwAspect=DVASPECT_CONTENT;\ + (fe).ptd=NULL;\ + (fe).tymed=med;\ + (fe).lindex=-1;\ + } + + +#define SETRECTL(rcl, l, t, r, b) \ + {\ + (rcl).left=l;\ + (rcl).top=t;\ + (rcl).right=r;\ + (rcl).bottom=b;\ + } + +#define SETSIZEL(szl, h, v) \ + {\ + (szl).cx=h;\ + (szl).cy=v;\ + } + + +#define RECTLFROMRECT(rcl, rc)\ + {\ + (rcl).left=(long)(rc).left;\ + (rcl).top=(long)(rc).top;\ + (rcl).right=(long)(rc).right;\ + (rcl).bottom=(long)(rc).bottom;\ + } + + +#define RECTFROMRECTL(rc, rcl)\ + {\ + (rc).left=(int)(rcl).left;\ + (rc).top=(int)(rcl).top;\ + (rc).right=(int)(rcl).right;\ + (rc).bottom=(int)(rcl).bottom;\ + } + + +#define POINTLFROMPOINT(ptl, pt) \ + { \ + (ptl).x=(long)(pt).x; \ + (ptl).y=(long)(pt).y; \ + } + + +#define POINTFROMPOINTL(pt, ptl) \ + { \ + (pt).x=(int)(ptl).x; \ + (pt).y=(int)(ptl).y; \ + } + +//Here's one that should be in windows.h +#define SETPOINT(pt, h, v) \ + {\ + (pt).x=h;\ + (pt).y=v;\ + } + +#define SETPOINTL(ptl, h, v) \ + {\ + (ptl).x=h;\ + (ptl).y=v;\ + } + +#endif //_OLE2_H_ + +#ifdef INC_AUTOMATION + +//Macros for setting DISPPARAMS structures +#define SETDISPPARAMS(dp, numArgs, pvArgs, numNamed, pNamed) \ + {\ + (dp).cArgs=numArgs;\ + (dp).rgvarg=pvArgs;\ + (dp).cNamedArgs=numNamed;\ + (dp).rgdispidNamedArgs=pNamed;\ + } + +#define SETNOPARAMS(dp) SETDISPPARAMS(dp, 0, NULL, 0, NULL) + +//Macros for setting EXCEPINFO structures +#define SETEXCEPINFO(ei, excode, src, desc, file, ctx, func, scd) \ + {\ + (ei).wCode=excode;\ + (ei).wReserved=0;\ + (ei).bstrSource=src;\ + (ei).bstrDescription=desc;\ + (ei).bstrHelpFile=file;\ + (ei).dwHelpContext=ctx;\ + (ei).pvReserved=NULL;\ + (ei).pfnDeferredFillIn=func;\ + (ei).scode=scd;\ + } + + +#define INITEXCEPINFO(ei) \ + SETEXCEPINFO(ei,0,NULL,NULL,NULL,0L,NULL,S_OK) + +#endif + + +/* + * State flags for IPersistStorage implementations. These + * are kept here to avoid repeating the code in all samples. + */ + +typedef enum + { + PSSTATE_UNINIT, //Uninitialized + PSSTATE_SCRIBBLE, //Scribble + PSSTATE_ZOMBIE, //No scribble + PSSTATE_HANDSOFF //Hand-off + } PSSTATE; + + +/* + * Identifers to describe which persistence model an object + * is using, along with a union type that holds on the the + * appropriate pointers that a client may need. + */ +typedef enum + { + PERSIST_UNKNOWN=0, + PERSIST_STORAGE, + PERSIST_STREAM, + PERSIST_STREAMINIT, + PERSIST_FILE + } PERSIST_MODEL; + +typedef struct + { + PERSIST_MODEL psModel; + union + { + IPersistStorage *pIPersistStorage; + IPersistStream *pIPersistStream; + #ifdef INC_CONTROLS + IPersistStreamInit *pIPersistStreamInit; + #endif + IPersistFile *pIPersistFile; + } pIP; + + } PERSISTPOINTER, *PPERSISTPOINTER; + + +//To identify a storage in which to save, load, or create. +typedef struct + { + PERSIST_MODEL psModel; + union + { + IStorage *pIStorage; + IStream *pIStream; + } pIS; + + } STGPOINTER, *PSTGPOINTER; + + + +//Type for an object-destroyed callback +typedef void (*PFNDESTROYED)(void); + + +//DeleteInterfaceImp calls 'delete' and NULLs the pointer +#define DeleteInterfaceImp(p)\ + {\ + if (NULL!=p)\ + {\ + delete p;\ + p=NULL;\ + }\ + } + + +//ReleaseInterface calls 'Release' and NULLs the pointer +#define ReleaseInterface(p)\ + {\ + IUnknown *pt=(IUnknown *)p;\ + p=NULL;\ + if (NULL!=pt)\ + pt->Release();\ + } + + +//OLE Documents Clipboard Formats + +#define CFSTR_EMBEDSOURCE TEXT("Embed Source") +#define CFSTR_EMBEDDEDOBJECT TEXT("Embedded Object") +#define CFSTR_LINKSOURCE TEXT("Link Source") +#define CFSTR_CUSTOMLINKSOURCE TEXT("Custom Link Source") +#define CFSTR_OBJECTDESCRIPTOR TEXT("Object Descriptor") +#define CFSTR_LINKSRCDESCRIPTOR TEXT("Link Source Descriptor") + + + +//Functions in the helper DLL, INOLE.DLL + +//UI Effects +STDAPI_(void) UIDrawHandles(LPRECT, HDC, DWORD, UINT, BOOL); +STDAPI_(void) UIDrawShading(LPRECT, HDC, DWORD, UINT); +STDAPI_(void) UIShowObject(LPCRECT, HDC, BOOL); + +//For UIDrawHandles +#define UI_HANDLES_USEINVERSE 0x00000001L +#define UI_HANDLES_NOBORDER 0x00000002L +#define UI_HANDLES_INSIDE 0x00000004L +#define UI_HANDLES_OUTSIDE 0x00000008L + +//For UIDrawShading +#define UI_SHADE_FULLRECT 1 +#define UI_SHADE_BORDERIN 2 +#define UI_SHADE_BORDEROUT 3 + +//Coordinate Munging +STDAPI_(int) XformWidthInHimetricToPixels(HDC, int); +STDAPI_(int) XformWidthInPixelsToHimetric(HDC, int); +STDAPI_(int) XformHeightInHimetricToPixels(HDC, int); +STDAPI_(int) XformHeightInPixelsToHimetric(HDC, int); + +STDAPI_(void) XformRectInPixelsToHimetric(HDC, LPRECT, LPRECT); +STDAPI_(void) XformRectInHimetricToPixels(HDC, LPRECT, LPRECT); +STDAPI_(void) XformSizeInPixelsToHimetric(HDC, LPSIZEL, LPSIZEL); +STDAPI_(void) XformSizeInHimetricToPixels(HDC, LPSIZEL, LPSIZEL); + + +//Helpers +STDAPI_(void) INOLE_MetafilePictIconFree(HGLOBAL); +STDAPI INOLE_SetIconInCache(IUnknown *, HGLOBAL); +STDAPI_(UINT) INOLE_GetUserTypeOfClass(REFCLSID, UINT, LPTSTR + , UINT); +STDAPI INOLE_DoConvert(IStorage *, REFCLSID); +STDAPI_(LPTSTR) INOLE_CopyString(LPTSTR); +STDAPI_(HGLOBAL) INOLE_ObjectDescriptorFromOleObject(IOleObject * + , DWORD, POINTL, LPSIZEL); +STDAPI_(HGLOBAL) INOLE_AllocObjectDescriptor(CLSID, DWORD + , SIZEL, POINTL, DWORD, LPTSTR, LPTSTR); +STDAPI_(IStorage *) INOLE_CreateStorageOnHGlobal(DWORD); +STDAPI INOLE_GetLinkSourceData(IMoniker *, LPCLSID + , LPFORMATETC, LPSTGMEDIUM); +STDAPI_(void) INOLE_RegisterAsRunning(IUnknown *, IMoniker * + , DWORD, LPDWORD); +STDAPI_(void) INOLE_RevokeAsRunning(LPDWORD); +STDAPI_(void) INOLE_NoteChangeTime(DWORD, FILETIME *, LPTSTR); + + + +/* + * These are for ANSI compilations on Win32. Source code assumes + * a Win32 Unicode environment (or Win16 Ansi). These macros + * route Win32 ANSI compiled functions to wrappers which do the + * proper Unicode conversion. + */ + + +#ifdef WIN32ANSI +STDAPI INOLE_ConvertStringToANSI(LPCWSTR, LPSTR *); +STDAPI INOLE_StringFromCLSID(REFCLSID, LPSTR *); +STDAPI INOLE_StringFromGUID2(REFGUID, LPSTR, int); +STDAPI INOLE_ProgIDFromCLSID(REFCLSID, LPSTR *); + +STDAPI INOLE_ReadFmtUserTypeStg(IStorage *, CLIPFORMAT *, LPSTR *); +STDAPI INOLE_WriteFmtUserTypeStg(IStorage *, CLIPFORMAT, LPSTR); + +STDAPI INOLE_StgIsStorageFile(LPCSTR); +STDAPI INOLE_StgCreateDocfile(LPCSTR, DWORD, DWORD, IStorage **); +STDAPI INOLE_StgOpenStorage(LPCSTR, IStorage *, DWORD, SNB + , DWORD, IStorage **); + + +STDAPI INOLE_CreateFileMoniker(LPCSTR, LPMONIKER *); +STDAPI INOLE_CreateItemMoniker(LPCSTR, LPCSTR, LPMONIKER *); +STDAPI INOLE_MkParseDisplayName(LPBC, LPCSTR, ULONG *, LPMONIKER *); + +STDAPI INOLE_OleCreateLinkToFile(LPCSTR, REFIID, DWORD, LPFORMATETC + , LPOLECLIENTSITE, LPSTORAGE, LPVOID *); +STDAPI INOLE_OleCreateFromFile(REFCLSID, LPCSTR, REFIID + , DWORD, LPFORMATETC, LPOLECLIENTSITE, LPSTORAGE, LPVOID *); + + +#ifndef NOMACROREDIRECT +#undef StringFromCLSID +#define StringFromCLSID(c, pp) INOLE_StringFromCLSID(c, pp) + +#undef StringFromGUID2 +#define StringFromGUID2(r, p, i) INOLE_StringFromGUID2(r, p, i) + +#undef ProgIDFromCLSID +#define ProgIDFromCLSID(c, pp) INOLE_ProgIDFromCLSID(c, pp) + +#undef ReadFmtUserTypeStg +#define ReadFmtUserTypeStg(p, c, s) INOLE_ReadFmtUserTypeStg(p, c, s) + +#undef WriteFmtUserTypeStg +#define WriteFmtUserTypeStg(p, c, s) INOLE_WriteFmtUserTypeStg(p, c, s) + +#undef StgIsStorageFile +#define StgIsStorageFile(s) INOLE_StgIsStorageFile(s) + +#undef StgCreateDocfile +#define StgCreateDocfile(a, b, c, d) INOLE_StgCreateDocfile(a, b, c, d) + +#undef StgOpenStorage +#define StgOpenStorage(a,b,c,d,e,f) INOLE_StgOpenStorage(a,b,c,d,e,f) + +#undef CreateFileMoniker +#define CreateFileMoniker(p, i) INOLE_CreateFileMoniker(p, i) + +#undef CreateItemMoniker +#define CreateItemMoniker(p1, p2, i) INOLE_CreateItemMoniker(p1, p2, i) + +#undef MkParseDisplayName +#define MkParseDisplayName(b, p, u, i) INOLE_MkParseDisplayName(b, p, u, i) + +#undef OleCreateLinkToFile +#define OleCreateLinkToFile(s, i, d, fe, cs, st, pv) INOLE_OleCreateLinkToFile(s, i, d, fe, cs, st, pv) + +#undef OleCreateFromFile +#define OleCreateFromFile(c, s, i, d, fe, cs, st, pv) INOLE_OleCreateFromFile(c, s, i, d, fe, cs, st, pv) + + +#endif + +#endif + +//Versioning. +#define VERSIONMAJOR 2 +#define VERSIONMINOR 0 +#define VERSIONCURRENT 0x00020000 + +#define HIMETRIC_PER_INCH 2540 +#define LOMETRIC_PER_INCH 254 +#define LOMETRIC_BORDER 60 //Border around page + +#define CREATE_FAILED 0 +#define CREATE_GRAPHICONLY 1 + +//State flags +//CHAPTER24MOD +//Switched #defines to an enum +enum + { + TENANTSTATE_DEFAULT =0x00000000, + TENANTSTATE_SELECTED=0x00000001, + TENANTSTATE_OPEN =0x00000002, + TENANTSTATE_SHOWTYPE=0x00000004, + + //New ones for controls. + TENANTSTATE_CONTROL =0x00000100, + TENANTSTATE_EVENTS =0x00000200, + TENANTSTATE_BUTTON =0x00000400, + TENANTSTATE_LABEL =0x00000800, + TENANTSTATE_DEFBUTTON =0x00001000, + TENANTSTATE_CANCELBUTTON=0x00002000 + }; + +//To mask off non-control flags +#define STATEMASK_CONTROLS 0xFFFFFF00 + + + +/* + * Structures to save with the document describing the device + * configuration and pages that we have. This is followed by + * a list of DWORD IDs for the individual pages. + */ + +typedef struct tagDEVICECONFIG + { + DWORD cb; //Size of structure + TCHAR szDriver[CCHDEVICENAME]; + TCHAR szDevice[CCHDEVICENAME]; + TCHAR szPort[CCHDEVICENAME]; + DWORD cbDevMode; //Size of actual DEVMODE + DEVMODE dm; //Variable + } DEVICECONFIG, *PDEVICECONFIG; + +//Offset to cbDevMode +#define CBSEEKOFFSETCBDEVMODE (sizeof(DWORD) \ + +(3*CCHDEVICENAME*sizeof(TCHAR))) + +//Combined OLE and Patron device structures. +typedef struct tagCOMBINEDEVICE + { + DVTARGETDEVICE td; + DEVICECONFIG dc; + } COMBINEBDEVICE, *PCOMBINEDEVICE; + + + +void RectConvertMappings(LPRECT, HDC, BOOL); + + +//CHAPTER24MOD + + +#ifdef WIN32 +#define PROP_POINTER TEXT("Pointer") +#else +#define PROP_SELECTOR "Selector" +#define PROP_OFFSET "Offset" +#endif + +//End CHAPTER24MOD + +BOOL ObjectEventsIID(LPUNKNOWN pObj, IID *piid); +BOOL InterfaceConnect(LPUNKNOWN pObj, REFIID riid + , LPUNKNOWN pIUnknownSink, LPDWORD pdwConn); +BOOL InterfaceDisconnect(LPUNKNOWN pObj, REFIID riid + , LPDWORD pdwConn); +BOOL ObjectTypeInfo(LPUNKNOWN pObj, LPTYPEINFO *ppITypeInfo); +BOOL ObjectTypeInfoEvents(LPUNKNOWN pObj, LPTYPEINFO *ppITypeInfo); +BOOL ObjectEventsIID(LPUNKNOWN pObj, IID *piid); + +#define HIMETRIC_PER_INCH 2540 //Number HIMETRIC units per inch +#define PTS_PER_INCH 72 //Number points (font size) per inch + +#define MAP_PIX_TO_LOGHIM(x,ppli) MulDiv(HIMETRIC_PER_INCH, (x), (ppli)) +#define MAP_LOGHIM_TO_PIX(x,ppli) MulDiv((ppli), (x), HIMETRIC_PER_INCH) + +//Useful macros. +#define SETFormatEtc(fe, cf, asp, td, med, li) \ + {\ + (fe).cfFormat=cf;\ + (fe).dwAspect=asp;\ + (fe).ptd=td;\ + (fe).tymed=med;\ + (fe).lindex=li;\ + } + +STDAPI_(void) XformRectInHimetricToPixels(HDC hDC, LPRECT prcHiMetric + , LPRECT prcPix); + +#endif //_INOLE_H_ diff --git a/iup/srcole/tOleClientSite.cpp b/iup/srcole/tOleClientSite.cpp new file mode 100755 index 0000000..314b172 --- /dev/null +++ b/iup/srcole/tOleClientSite.cpp @@ -0,0 +1,148 @@ +////////////////////////////////////////////////////////////////////// +// +// tOleClientSite.cpp: implementation of the tOleClientSite class. +// +////////////////////////////////////////////////////////////////////// + + +#include +#include + +#include "tOleClientSite.h" +#include "tOleHandler.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +tOleClientSite::tOleClientSite(LPUNKNOWN pUnkOuter, + tOleHandler *olehandler) +{ + m_cRef=0; + m_pUnkOuter = pUnkOuter; + handler = olehandler; + return; +} + +tOleClientSite::~tOleClientSite() +{ + +} + +STDMETHODIMP tOleClientSite::QueryInterface(REFIID riid, + LPVOID *ppv) +{ + return m_pUnkOuter->QueryInterface(riid, ppv); +} + + +STDMETHODIMP_(ULONG) tOleClientSite::AddRef(void) +{ + ++m_cRef; + return m_pUnkOuter->AddRef(); +} + +STDMETHODIMP_(ULONG) tOleClientSite::Release(void) +{ + --m_cRef; + return m_pUnkOuter->Release(); +} + +STDMETHODIMP tOleClientSite::SaveObject(void) +{ + // persistencia ainda nao suportada + return E_FAIL; +} + + +STDMETHODIMP tOleClientSite::GetMoniker(DWORD dwAssign, + DWORD dwWhich, + LPMONIKER *ppmk) +{ + // Linking nao suportado + return E_FAIL; +} + + +STDMETHODIMP tOleClientSite::GetContainer(LPOLECONTAINER * ppContainer) +{ + + *ppContainer=NULL; + + return E_NOINTERFACE; +} + + +/* + * tOleClientSite::ShowObject + * + * Purpose: + * Tells the container to bring the object fully into view as much + * as possible, that is, scroll the document. + * + * Parameters: + * None + * + * Return Value: + * HRESULT Standard. + */ + +STDMETHODIMP tOleClientSite::ShowObject(void) +{ + return NOERROR; +} + + +STDMETHODIMP tOleClientSite::OnShowWindow(BOOL fShow) +{ + return NOERROR; +} + +/* + * tOleClientSite::RequestNewObjectLayout + * + * Purpose: + * Called when the object would like to have its layout + * reinitialized. This is used by OLE Controls. + * + * Parameters: + * None + * + * Return Value: + * HRESULT Standard. + */ + +STDMETHODIMP tOleClientSite::RequestNewObjectLayout(void) +{ + RECT rc, rcT; + SIZEL szl; + HRESULT hr; + + /* + * This function is called by a control that is not in-place + * active or UI active and therefore doesn't have our + * IOleInPlaceSite interface in which to call OnPosRectChange. + * Therefore we do pretty much the same thing we do in that + * function although we ask the control for the size it wants. + */ + + if (!handler->m_pIViewObject2) + return E_FAIL; + + //Get the size from the control + hr=handler->m_pIViewObject2->GetExtent(handler->m_fe.dwAspect, -1, NULL, &szl); + if (FAILED(hr)) + return hr; + + //Add these extents to the existing tenant position. + SetRect(&rcT, 0, 0, szl.cx*10, -szl.cy*10); + RectConvertMappings(&rcT, NULL, TRUE); + + rc=handler->m_rcPos; + rc.right=rc.left+rcT.right; + rc.bottom=rc.top+rcT.bottom; + + handler->UpdateInPlaceObjectRects(&rc, FALSE); + return NOERROR; +} + diff --git a/iup/srcole/tOleClientSite.h b/iup/srcole/tOleClientSite.h new file mode 100755 index 0000000..1525b9e --- /dev/null +++ b/iup/srcole/tOleClientSite.h @@ -0,0 +1,40 @@ +// tOleClientSite.h: interface for the tOleClientSite class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TOLECLIENTSITE_H__49B97C0A_8DEB_11D3_A906_0004ACE655F9__INCLUDED_) +#define AFX_TOLECLIENTSITE_H__49B97C0A_8DEB_11D3_A906_0004ACE655F9__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include + +class tOleHandler; + +class tOleClientSite : public IOleClientSite +{ +public: + tOleClientSite(LPUNKNOWN pUnkOuter, tOleHandler *olehandler); + virtual ~tOleClientSite(); + + STDMETHODIMP QueryInterface(REFIID, LPVOID *); + STDMETHODIMP_(ULONG) AddRef(void); + STDMETHODIMP_(ULONG) Release(void); + + STDMETHODIMP SaveObject(void); + STDMETHODIMP GetMoniker(DWORD, DWORD, LPMONIKER *); + STDMETHODIMP GetContainer(LPOLECONTAINER *); + STDMETHODIMP ShowObject(void); + STDMETHODIMP OnShowWindow(BOOL); + STDMETHODIMP RequestNewObjectLayout(void); + +protected: + tOleHandler * handler; + ULONG m_cRef; + //class CTenant *m_pTen; + LPUNKNOWN m_pUnkOuter; +}; + +#endif // !defined(AFX_TOLECLIENTSITE_H__49B97C0A_8DEB_11D3_A906_0004ACE655F9__INCLUDED_) diff --git a/iup/srcole/tOleControlSite.cpp b/iup/srcole/tOleControlSite.cpp new file mode 100755 index 0000000..71f3519 --- /dev/null +++ b/iup/srcole/tOleControlSite.cpp @@ -0,0 +1,301 @@ +// tOleControlSite.cpp: implementation of the tOleControlSite class. +// +////////////////////////////////////////////////////////////////////// + +#include "tOleControlSite.h" +#include "tOleHandler.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +/* + * tOleControlSite::tOleControlSite + * tOleControlSite::~tOleControlSite + * + * Parameters (Constructor): + * pTen PCTenant of the object we're in. + * pUnkOuter LPUNKNOWN to which we delegate. + */ + +tOleControlSite::tOleControlSite(tOleHandler *pTen + , LPUNKNOWN pUnkOuter) + { + m_cRef=0; + m_pTen=pTen; + m_pUnkOuter=pUnkOuter; + return; + } + +tOleControlSite::~tOleControlSite(void) + { + return; + } + + + + +/* + * tOleControlSite::QueryInterface + * tOleControlSite::AddRef + * tOleControlSite::Release + * + * Purpose: + * Delegating IUnknown members for tOleControlSite. + */ + +STDMETHODIMP tOleControlSite::QueryInterface(REFIID riid + , LPVOID *ppv) + { + return m_pUnkOuter->QueryInterface(riid, ppv); + } + + +STDMETHODIMP_(ULONG) tOleControlSite::AddRef(void) + { + ++m_cRef; + return m_pUnkOuter->AddRef(); + } + +STDMETHODIMP_(ULONG) tOleControlSite::Release(void) + { + --m_cRef; + return m_pUnkOuter->Release(); + } + + + + + +/* + * tOleControlSite::OnControlInfoChanged + * + * Purpose: + * Informs the site that the CONTROLINFO for the control has + * changed and we thus need to reload the data. + * + * Parameters: + * None + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleControlSite::OnControlInfoChanged(void) + { + //We also update our "have info" flag here. + if(m_pTen->m_pIOleControl != NULL) + { + m_pTen->m_fHaveControlInfo=SUCCEEDED(m_pTen->m_pIOleControl + ->GetControlInfo(&m_pTen->m_ctrlInfo)); + } + + return NOERROR; + } + + + + + +/* + * tOleControlSite::LockInPlaceActive + * + * Purpose: + * Forces the container to keep this control in-place active + * (but not UI active) regardless of other considerations, or + * removes this lock. + * + * Parameters: + * fLock BOOL indicating to lock (TRUE) or unlock (FALSE) + * in-place activation. + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleControlSite::LockInPlaceActive(BOOL fLock) + { + if (fLock) + m_pTen->m_cLockInPlace++; + else + { + if (0==--m_pTen->m_cLockInPlace) + { + //If there's a pending deactivate, do it now. + if (m_pTen->m_fPendingDeactivate) + m_pTen->DeactivateInPlaceObject(TRUE); + } + } + + return NOERROR; + } + + + + + +/* + * tOleControlSite::GetExtendedControl + * + * Purpose: + * Returns a pointer to the container's extended control that wraps + * the actual control in this site, if one exists. + * + * Parameters: + * ppDispatch LPDISPATCH * in which to return the pointer + * to the extended control's IDispatch interface. + * + * Return Value: + * HRESULT NOERROR or a general error value. + */ + +STDMETHODIMP tOleControlSite::GetExtendedControl(LPDISPATCH + * ppDispatch) + { + *ppDispatch=NULL; + return ResultFromScode(E_NOTIMPL); + } + + + + + + +/* + * tOleControlSite::TransformCoords + * + * Purpose: + * Converts coordinates in HIMETRIC units into those used by the + * container. + * + * Parameters: + * pptlHiMet POINTL * containing either the coordinates to + * transform to container or where to store the + * transformed container coordinates. + * pptlCont POINTF * containing the container coordinates. + * dwFlags DWORD containing instructional flags. + * + * Return Value: + * HRESULT NOERROR or a general error value. + */ + +STDMETHODIMP tOleControlSite::TransformCoords(POINTL *pptlHiMet + , POINTF *pptlCont, DWORD dwFlags) + { + if (NULL==pptlHiMet || NULL==pptlCont) + return ResultFromScode(E_POINTER); + + /* + * Convert coordinates. We use MM_LOMETRIC which means that + * to convert from HIMETRIC we divide by 10 and negate the y + * coordinate. Conversion to HIMETRIC means negate the y + * and multiply by 10. Note that size and position are + * considered the same thing, that is, we don't differentiate + * the two. + */ + + if (XFORMCOORDS_HIMETRICTOCONTAINER & dwFlags) + { + pptlCont->x=(float)(pptlHiMet->x/10); + pptlCont->y=(float)-(pptlHiMet->y/10); + } + else + { + pptlHiMet->x=(long)(pptlCont->x*10); + pptlHiMet->y=(long)-(pptlCont->y*10); + } + + return NOERROR; + } + + + + + +/* + * tOleControlSite::TranslateAccelerator + * + * Purpose: + * Instructs the container to translate a keyboard accelerator + * message that the control has picked up instead. + * + * Parameters: + * pMsg LPMSG to the message to translate. + * grfModifiers DWORD flags with additional instructions. + * + * Return Value: + * HRESULT NOERROR or a general error value. + */ + +STDMETHODIMP tOleControlSite::TranslateAccelerator(LPMSG pMsg + , DWORD grfModifiers) + { + /* + * The control has picked up a keystroke through its own + * TranslateAccelerator and is now giving us the change to + * play with it. Currently there are no flags for + * grfModifiers, so we ignore them. Especially since + * we have nothing to do here ourselves anyway. + */ + return ResultFromScode(S_FALSE); + } + + + + +/* + * tOleControlSite::OnFocus + * + * Purpose: + * Informs the container that focus has either been lost or + * gained in the control. + * + * Parameters: + * fGotFocus BOOL indicating that the control gained (TRUE) + * or lost (FALSE) focus. + * + * Return Value: + * HRESULT NOERROR or a general error value. + */ + +STDMETHODIMP tOleControlSite::OnFocus(BOOL fGotFocus) + { + /* + * Patron doesn't do this, but to handle the default + * and cancel buttons properly, we normally process RETURN + * and ESC accelerators to press the right button. + * This behavior must be disabled when the control with + * the focus has either CTRLINFO_EATS_RETURN or + * CTRLINFO_EATS_ESCAPE set. We tell the frame as + * we need to when a new control gets the focus. We + * do nothing when a control loses the focus. + */ + return NOERROR; + } + + + +/* + * tOleControlSite::ShowPropertyFrame + * + * Purpose: + * Instructs the container to show the property frame if + * this is an extended object and requires its own property + * pages. + * + * Parameters: + * None + * + * Return Value: + * HRESULT NOERROR or a general error value. + */ + +STDMETHODIMP tOleControlSite::ShowPropertyFrame(void) + { + /* + * Returning an error here means that the container has + * no property pages itself for the control, so the + * control should display its own. + */ + return ResultFromScode(E_NOTIMPL); + } diff --git a/iup/srcole/tOleControlSite.h b/iup/srcole/tOleControlSite.h new file mode 100755 index 0000000..8e805d3 --- /dev/null +++ b/iup/srcole/tOleControlSite.h @@ -0,0 +1,39 @@ +// tOleControlSite.h: interface for the tOleControlSite class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TOLECONTROLSITE_H__37A5ADEC_91FB_11D3_A906_0004AC252223__INCLUDED_) +#define AFX_TOLECONTROLSITE_H__37A5ADEC_91FB_11D3_A906_0004AC252223__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include +#include + +class tOleControlSite : public IOleControlSite +{ + protected: + ULONG m_cRef; + class tOleHandler *m_pTen; + LPUNKNOWN m_pUnkOuter; + + public: + tOleControlSite(class tOleHandler *, LPUNKNOWN); + ~tOleControlSite(void); + + STDMETHODIMP QueryInterface(REFIID, LPVOID *); + STDMETHODIMP_(ULONG) AddRef(void); + STDMETHODIMP_(ULONG) Release(void); + + STDMETHODIMP OnControlInfoChanged(void); + STDMETHODIMP LockInPlaceActive(BOOL); + STDMETHODIMP GetExtendedControl(LPDISPATCH *); + STDMETHODIMP TransformCoords(POINTL *, POINTF *, DWORD); + STDMETHODIMP TranslateAccelerator(LPMSG, DWORD); + STDMETHODIMP OnFocus(BOOL); + STDMETHODIMP ShowPropertyFrame(void); +}; + +#endif // !defined(AFX_TOLECONTROLSITE_H__37A5ADEC_91FB_11D3_A906_0004AC252223__INCLUDED_) diff --git a/iup/srcole/tOleHandler.cpp b/iup/srcole/tOleHandler.cpp new file mode 100755 index 0000000..688ba30 --- /dev/null +++ b/iup/srcole/tOleHandler.cpp @@ -0,0 +1,1123 @@ +// tOleHandler.cpp: implementation of the tOleHandler class. +// +////////////////////////////////////////////////////////////////////// + +#include +#include + +#ifndef _OLE2_H_ +#define _OLE2_H_ +#endif + +#include "tOleHandler.h" +#include "tDispatch.h" + +/* + * tOleHandler::tOleHandler + * tOleHandler::~tOleHandler + * + */ + +tOleHandler::tOleHandler() +{ + natural_width = 0; + natural_height = 0; + + m_hWnd=NULL; + + m_fInitialized=0; + m_cOpens=0; + + m_pObj=NULL; + m_clsID=CLSID_NULL; + m_fSetExtent=FALSE; + + m_cRef=0; + m_pIOleObject=NULL; + m_pIViewObject2=NULL; + m_grfMisc=0; + + m_rcl.right = m_rcl.left = 0; + m_rcl.top = m_rcl.bottom = 0; + + m_pImpIOleClientSite=NULL; + + m_fRepaintEnabled=TRUE; + + + m_pImpIOleIPSite=NULL; + m_pIOleIPObject=NULL; + m_rcPos.left=-1; + m_fInRectSet=FALSE; + + //CHAPTER24MOD + m_pImpIOleControlSite=NULL; + m_pImpIDispatch=NULL; + + m_pIOleControl=NULL; + + m_fHaveControlInfo=FALSE; + m_cLockInPlace=0; + m_fPendingDeactivate=FALSE; + //End CHAPTER24MOD + + return; +} + + +tOleHandler::~tOleHandler(void) + { + + //Object pointers cleaned up in Close. + + //CHAPTER24MOD + + DeleteInterfaceImp(m_pImpIOleControlSite); + DeleteInterfaceImp(m_pImpIDispatch); + + //End CHAPTER24MOD + + DeleteInterfaceImp(m_pImpIOleIPSite); + DeleteInterfaceImp(m_pImpIOleClientSite); + return; + } + + + + +/* + * tOleHandler::QueryInterface + * tOleHandler::AddRef + * tOleHandler::Release + * + * Purpose: + * IUnknown members for tOleHandler object. + */ + +STDMETHODIMP tOleHandler::QueryInterface(REFIID riid, LPVOID *ppv) + { + *ppv=NULL; + + if (IID_IUnknown==riid) + *ppv=this; + + if (IID_IOleClientSite==riid) + *ppv=m_pImpIOleClientSite; + + if (IID_IOleWindow==riid || IID_IOleInPlaceSite==riid) + *ppv=m_pImpIOleIPSite; + + //CHAPTER24MOD + if (IID_IOleControlSite==riid) + *ppv=m_pImpIOleControlSite; + + //Queries for IDispatch return the ambient properties interface + if (IID_IDispatch==riid) + *ppv=m_pImpIDispatch; + //End CHAPTER24MOD + + if (NULL!=*ppv) + { + ((LPUNKNOWN)*ppv)->AddRef(); + return NOERROR; + } + + return ResultFromScode(E_NOINTERFACE); + } + + +STDMETHODIMP_(ULONG) tOleHandler::AddRef(void) + { + return ++m_cRef; + } + +STDMETHODIMP_(ULONG) tOleHandler::Release(void) + { + if (0!=--m_cRef) + return m_cRef; + + delete this; + return 0; + } + + + + + + +/* + * tOleHandler::Create + * + * Purpose: + * Creates a new tenant of the given CLSID, which can be either a + * static bitmap or metafile or any compound document object. + * + * Parameters: + * tType TENANTTYPE to create, either a static metafile, + * bitmap, or some kind of compound document object + * This determines which OleCreate* call we use. + * pvType LPVOID providing the relevant pointer from which + * to create the tenant, depending on iType. + * pFE LPFORMATETC specifying the type of renderings + * to use. + * pptl PPOINTL in which we store offset coordinates. + * pszl LPSIZEL where this object should store its + * lometric extents. + * pIStorage LPSTORAGE of the page we live in. We have to + * create another storage in this for the tenant. + * ppo PPATRONOBJECT containing placement data. + * dwData DWORD with extra data, sensitive to iType. + * + * Return Value: + * UINT A CREATE_* value depending on what we + * actually do. + */ + +UINT tOleHandler::Create(LPVOID pvType) + { + HRESULT hr; + LPUNKNOWN pObj; + UINT uRet=CREATE_GRAPHICONLY; + DWORD dwMode=STGM_READWRITE + | STGM_SHARE_EXCLUSIVE + | STGM_DELETEONRELEASE; + + + IPersistStorage *persist_storage = NULL; + + StgCreateDocfile(NULL, dwMode, 0, &m_pIStorage); + + if(m_pIStorage == NULL) + return CREATE_FAILED; + + if (NULL==pvType) + return CREATE_FAILED; + + hr=ResultFromScode(E_FAIL); + + Open(NULL); + + //CHAPTER24MOD + /* + * The OLE Control specifications mention that a + * a control might implement IPersistStream[Init] + * instead of IPersistStorage. In that case you + * cannot use OleCreate on a control but must rather + * use CoCreateInstance since OleCreate assumes + * that IPersistStorage is available. With a control, + * you would have to create the object first, then + * check if OLEMISC_SETCLIENTSITEFIRST is set, then + * send it your IOleClientSite first. Then you check + * for IPersistStorage and failing that, try + * IPersistStream[Init]. + * + * For simplicity we'll assume storage-based + * controls in this sample. + */ + //End CHAPTER24MOD + + hr = CoCreateInstance(*((LPCLSID)pvType), NULL, + CLSCTX_ALL, IID_IUnknown, (LPVOID *)&pObj); + + if(FAILED(hr)) + return CREATE_FAILED; + + if(pObj->QueryInterface(IID_IPersistStorage, (void **) &persist_storage) != S_OK) + return CREATE_FAILED; + + //We need an IOleObject most of the time, so get one here. + m_pIOleObject=NULL; + hr = pObj->QueryInterface(IID_IOleObject, (LPVOID*)&m_pIOleObject); + + if(FAILED(hr)) + return CREATE_FAILED; + + // seta o client site + m_pIOleObject->SetClientSite(m_pImpIOleClientSite); + + // inicializa o objeto + hr = persist_storage->InitNew(m_pIStorage); + + if(FAILED(hr)) + return CREATE_FAILED; + + + //We don't get the size if PatronObject data was seen already. + if (!ObjectInitialize(pObj)) + { + return CREATE_FAILED; + } + + SIZEL szl; + + hr=ResultFromScode(E_FAIL); + + CalcNaturalSize(); + + //CHAPTER24MOD + //Make sure this happens + /*if ((OLEMISC_ACTIVATEWHENVISIBLE & m_grfMisc)) + Activate(OLEIVERB_INPLACEACTIVATE, NULL);*/ + //End CHAPTER24MOD + + return uRet; + } + + + + + + + +/* + * tOleHandler::ObjectInitialize + * (Protected) + * + * Purpose: + * Performs operations necessary after creating an object or + * reloading one from storage. + * + * Parameters: + * pObj LPUNKNOWN of the object in this tenant. + * pFE LPFORMATETC describing the graphic here. + * dwData DWORD extra data. If pFE->dwAspect== + * DVASPECT_ICON then this is the iconic metafile. + * + * Return Value: + * BOOL TRUE if the function succeeded, FALSE otherwise. + */ + +BOOL tOleHandler::ObjectInitialize(LPUNKNOWN pObj) + { + HRESULT hr; + FORMATETC fe; + + SETDefFormatEtc(fe, 0, TYMED_NULL); + LPFORMATETC pFE = &fe; + + + if (NULL==pObj || NULL==pFE) + return FALSE; + + m_pObj=pObj; + m_fe=*pFE; + m_fe.ptd=NULL; + m_dwState=TENANTSTATE_DEFAULT; + + m_pIViewObject2=NULL; + hr=pObj->QueryInterface(IID_IViewObject2 + , (LPVOID*)&m_pIViewObject2); + + if (FAILED(hr)) + return FALSE; + + /* + * Get the MiscStatus bits and check for OLEMISC_ONLYICONIC. + * If set, force dwAspect in m_fe to DVASPECT_ICON so we + * remember to draw it properly and do extents right. + */ + m_pIOleObject->GetMiscStatus(m_fe.dwAspect, &m_grfMisc); + + + //CHAPTER24MOD + //Run the object if it says to do so + if (OLEMISC_ALWAYSRUN & m_grfMisc) + OleRun(pObj); + //End CHAPTER24MOD + + + + //CHAPTER24MOD + //Go try initializing control-related things. + ControlInitialize(); + //End CHAPTER24MOD + + return TRUE; + } + + + + +/* + * tOleHandler::Open + * + * Purpose: + * Retrieves the IStorage associated with this tenant. The + * IStorage is owned by the tenant and thus the tenant always + * holds a reference count. + * + * If the storage is already open for this tenant, then this + * function will AddRef it; therefore the caller must always + * match an Open with a Close. + * + * Parameters: + * pIStorage LPSTORAGE above this tenant (which has its + * own storage). + * + * Return Value: + * BOOL TRUE if opening succeeds, FALSE otherwise. + */ + +BOOL tOleHandler::Open(LPSTORAGE pIStorage) + { + HRESULT hr=NOERROR; + DWORD dwMode=STGM_TRANSACTED | STGM_READWRITE + | STGM_SHARE_EXCLUSIVE; + + + //Create these if we don't have them already. + if (NULL==m_pImpIOleClientSite) + { + m_pImpIOleClientSite=new tOleClientSite(this, this); + m_pImpIOleIPSite=new tOleInPlaceSite(this, this); + + //CHAPTER24MOD + m_pImpIOleControlSite=new tOleControlSite(this, this); + m_pImpIDispatch=new tDispatch(this, this); + + if (NULL==m_pImpIOleClientSite + || NULL==m_pImpIOleIPSite || NULL==m_pImpIOleControlSite + || NULL==m_pImpIDispatch) + return FALSE; + //End CHAPTER24MOD + } + + return TRUE; + } + + + + +/* + * tOleHandler::Close + * + * Purpose: + * Possibly commits the storage, then releases it reversing the + * reference count from Open. If the reference on the storage + * goes to zero, the storage is forgotten. However, the object we + * contain is still held and as long as it's active the storage + * remains alive. + * + * Parameters: + * fCommit BOOL indicating if we're to commit. + * + * Return Value: + * None + */ + +void tOleHandler::Close(BOOL fCommit) + { + /* + * We can't use a zero reference count to know when to NULL + * this since other things might have AddRef'd the storage. + */ + //OnInPlaceDeactivate releases this pointer. + if (NULL!=m_pIOleIPObject) + m_pIOleIPObject->InPlaceDeactivate(); + + //Close the object saving if necessary + if (NULL!=m_pIOleObject) + { + m_pIOleObject->Close(OLECLOSE_SAVEIFDIRTY); + ReleaseInterface(m_pIOleObject); + } + + //Release all other held pointers + //CHAPTER24MOD + ReleaseInterface(m_pIOleControl); + + //End CHAPTER24MOD + + //Release all other held pointers + if (NULL!=m_pIViewObject2) + { + m_pIViewObject2->SetAdvise(m_fe.dwAspect, 0, NULL); + ReleaseInterface(m_pIViewObject2); + } + + //We know we only hold one ref from Create or Load + ReleaseInterface(m_pObj); + + return; + } + + +/* + * tOleHandler::Activate + * + * Purpose: + * Activates a verb on the object living in the tenant. Does + * nothing for static objects. + * + * Parameters: + * iVerb LONG of the verb to execute. + * pMSG LPMSG to the message causing the invocation. + * + * Return Value: + * BOOL TRUE if the object changed due to this verb + * execution. + */ + +BOOL tOleHandler::Activate(LONG iVerb, LPMSG pMSG) + { + RECT rc, rcH; + SIZEL szl; + + //Can't activate statics. +/* if (TENANTTYPE_STATIC==m_tType || NULL==m_pIOleObject) + { + MessageBeep(0); + return FALSE; + }*/ + + RECTFROMRECTL(rc, m_rcl); + RectConvertMappings(&rc, NULL, TRUE); + XformRectInPixelsToHimetric(NULL, &rc, &rcH); + + //Get the server running first, then do a SetExtent, then show it + OleRun(m_pIOleObject); + + if (m_fSetExtent) + { + SETSIZEL(szl, rcH.right-rcH.left, rcH.top-rcH.bottom); + m_pIOleObject->SetExtent(m_fe.dwAspect, &szl); + m_fSetExtent=FALSE; + } + + //CHAPTER24MOD + /* + * If we have a pending deactivation, but we're activating + * again, clear the pending flag. + */ + if (OLEIVERB_UIACTIVATE==iVerb + || OLEIVERB_INPLACEACTIVATE==iVerb) + m_fPendingDeactivate=FALSE; + //End CHAPTER24MOD + + m_pIOleObject->DoVerb(iVerb, pMSG, m_pImpIOleClientSite, 0 + , m_hWnd, &rcH); + + //If object changes, IAdviseSink::OnViewChange will see it. + return FALSE; + } + + + + + + +/* + * tOleHandler::ObjectGet + * + * Purpose: + * Retrieves the LPUNKNOWN of the object in use by this tenant + * + * Parameters: + * ppUnk LPUNKNOWN * in which to return the object + * pointer. + * + * Return Value: + * None + */ + +void tOleHandler::ObjectGet(LPUNKNOWN *ppUnk) + { + if (NULL!=ppUnk) + { + *ppUnk=m_pObj; + m_pObj->AddRef(); + } + + return; + } + + + + + +/* + * tOleHandler::SizeGet + * tOleHandler::SizeSet + * tOleHandler::RectGet + * tOleHandler::RectSet + * + * Purpose: + * Returns or sets the size/position of the object contained here. + * + * Parameters: + * pszl/prcl LPSIZEL (Size) or LPRECTL (Rect) with the + * extents of interest. In Get situations, + * this will receive the extents; in Set it + * contains the extents. + * fDevice BOOL indicating that pszl/prcl is expressed + * in device units. Otherwise it's LOMETRIC. + * fInformObj (Set Only) BOOL indicating if we need to inform + * the object all. + * + * Return Value: + * None + */ + +void tOleHandler::SizeGet(LPSIZEL pszl, BOOL fDevice) + { + if (!fDevice) + { + pszl->cx=m_rcl.right-m_rcl.left; + pszl->cy=m_rcl.bottom-m_rcl.top; + } + else + { + RECT rc; + + SetRect(&rc, (int)(m_rcl.right-m_rcl.left) + , (int)(m_rcl.bottom-m_rcl.top), 0, 0); + + RectConvertMappings(&rc, NULL, TRUE); + + pszl->cx=(long)rc.left; + pszl->cy=(long)rc.top; + } + + return; + } + + +void tOleHandler::SizeSet(LPSIZEL pszl, BOOL fDevice, BOOL fInformObj) + { + SIZEL szl; + + if (!fDevice) + { + szl=*pszl; + m_rcl.right =pszl->cx+m_rcl.left; + m_rcl.bottom=pszl->cy+m_rcl.top; + } + else + { + RECT rc; + + SetRect(&rc, (int)pszl->cx, (int)pszl->cy, 0, 0); + RectConvertMappings(&rc, NULL, FALSE); + + m_rcl.right =(long)rc.left+m_rcl.left; + m_rcl.bottom=(long)rc.top+m_rcl.top; + + SETSIZEL(szl, (long)rc.left, (long)rc.top); + } + + //Tell OLE that this object was resized. + if (NULL!=m_pIOleObject && fInformObj) + { + HRESULT hr; + BOOL fRun=FALSE; + + //Convert our LOMETRIC into HIMETRIC by *=10 + szl.cx*=10; + szl.cy*=-10; //Our size is stored negative. + + /* + * If the MiscStatus bit of OLEMISC_RECOMPOSEONRESIZE + * is set, then we need to run the object before calling + * SetExtent to make sure it has a real chance to + * re-render the object. We have to update and close + * the object as well after this happens. + */ + + if (OLEMISC_RECOMPOSEONRESIZE & m_grfMisc) + { + if (!OleIsRunning(m_pIOleObject)) + { + OleRun(m_pIOleObject); + fRun=TRUE; + } + } + + hr=m_pIOleObject->SetExtent(m_fe.dwAspect, &szl); + + /* + * If the object is not running and it does not have + * RECOMPOSEONRESIZE, then SetExtent fails. Make + * sure that we call SetExtent again (by just calling + * SizeSet here again) when we next run the object. + */ + if (SUCCEEDED(hr)) + { + m_fSetExtent=FALSE; + + if (fRun) + { + m_pIOleObject->Update(); + m_pIOleObject->Close(OLECLOSE_SAVEIFDIRTY); + } + } + else + { + if (OLE_E_NOTRUNNING==GetScode(hr)) + m_fSetExtent=TRUE; + } + } + + return; + } + + +void tOleHandler::RectGet(LPRECTL prcl, BOOL fDevice) + { + if (!fDevice) + *prcl=m_rcl; + else + { + RECT rc; + + RECTFROMRECTL(rc, m_rcl); + RectConvertMappings(&rc, NULL, TRUE); + RECTLFROMRECT(*prcl, rc); + } + + return; + } + + +void tOleHandler::RectSet(LPRECTL prcl, BOOL fDevice, BOOL fInformObj) + { + SIZEL szl; + LONG cx, cy; + + /* + * Prevent reentrant calls that may come from calling + * UpdateInPlaceObjectRects here and elsewhere. + */ + if (m_fInRectSet) + return; + + m_fInRectSet=TRUE; + + cx=m_rcl.right-m_rcl.left; + cy=m_rcl.bottom-m_rcl.top; + + if (!fDevice) + m_rcl=*prcl; + else + { + RECT rc; + + RECTFROMRECTL(rc, *prcl); + RectConvertMappings(&rc, NULL, FALSE); + RECTLFROMRECT(m_rcl, rc); + } + + /* + * Tell ourselves that the size changed, if it did. SizeSet + * will call IOleObject::SetExtent for us. + */ + if ((m_rcl.right-m_rcl.left)!=cx || (m_rcl.bottom-m_rcl.top)!=cy) + { + SETSIZEL(szl, m_rcl.right-m_rcl.left, m_rcl.bottom-m_rcl.top); + SizeSet(&szl, FALSE, fInformObj); + } + + //Tell an in-place active object it moved too + UpdateInPlaceObjectRects(NULL, TRUE); + m_fInRectSet=FALSE; + return; + } + + + + + + + + +/* + * tOleHandler::DeactivateInPlaceObject + * + * Purpose: + * Deactivates an in-place object if there is one in this tenant. + * + * Parameters: + * fFull BOOL indicating full deactivation of UI + * deactivate only. + * + * Return Value: + * None + */ + +void tOleHandler::DeactivateInPlaceObject(BOOL fFull) + { + if (NULL!=m_pIOleIPObject) + { + /* + * Activate-when-visible objects only UI deactivate + * unless we're fully deactivating on purpose. + */ + if ((OLEMISC_ACTIVATEWHENVISIBLE & m_grfMisc) && !fFull) + m_pIOleIPObject->UIDeactivate(); + else + { + //CHAPTER24MOD + /* + * Only deactivate when there's no locks. If there + * is a lock, then remember that we need to deactivate + * when all the locks go away. + */ + if (0==m_cLockInPlace) + m_pIOleIPObject->InPlaceDeactivate(); + else + m_fPendingDeactivate=TRUE; + //End CHAPTER24MOD + } + } + + return; + } + + + +/* + * tOleHandler::UpdateInPlaceObjectRects + * + * Purpose: + * Generates a call to IOleInPlaceObject::SetObjectRects to allow + * it to show it's shading and its object adornments properly. + * This function deals in HIMETRIC units. + * + * Parameters: + * prcPos LPCRECT to the size the object wants. Ignored + * if NULL in which case we use the size of the + * tenant. This rect is in client coordinates of + * the pages window. + * fUseTenantRect BOOL indicating if we need to use the tenant + * rectangle offset for scrolling regardless. + * + * Return Value: + * None + */ + +void tOleHandler::UpdateInPlaceObjectRects(LPCRECT prcPos + , BOOL fUseTenantRect) + { + RECTL rcl; + RECT rc; + RECT rcClip; + BOOL fResizeTenant=TRUE; + + //We don't clip special anywhere in our window. + SetRect(&rcClip, 0, 0, 32767, 32767); + + /* + * Note that if the object here is activate-when-visible + * we'll always have this pointer. + */ + if (NULL!=m_pIOleIPObject) + { + /* + * This uses the last position rectangle from + * IOleInPlaceSite::OnPosRectChange if it's been + * initialized + */ + if (NULL==prcPos && -1!=m_rcPos.left && !fUseTenantRect) + prcPos=&m_rcPos; + + //This code is normally called from OnPosRectChange direct. + if (NULL!=prcPos && !fUseTenantRect) + { + rc=*prcPos; + + //Calculate the boundaries of the full page + //m_pPG->CalcBoundingRect(&rcClip, FALSE); + + //Make sure we limit object to page boundaries. + IntersectRect(&rc, &rc, &rcClip); + } + else + { + /* + * We have no rectangle of the object on which to + * base the position, so just use the tenant rectangle. + * This code is also used when scrolling objects. + */ + RectGet(&rcl, TRUE); + RECTFROMRECTL(rc, rcl); + + //Account for scrolling +// OffsetRect(&rc, -(int)m_pPG->m_xPos, -(int)m_pPG->m_yPos); + fResizeTenant=FALSE; + } + + + /* + * NOTE: The rectangles to SetObjectRects is in client + * coordinates of the pages window. + */ + if (NULL!=m_pIOleIPObject) + m_pIOleIPObject->SetObjectRects(&rc, &rcClip); + + if (fResizeTenant) + { + //Need to tell the tenant to change position too + RECTLFROMRECT(rcl, rc); + RectSet(&rcl, TRUE, FALSE); + } + } + + return; + } + + +/* + * tOleHandler::ObjectWindow + * + * Purpose: + * Returns the window handle of the in-place object. + * + * Parameters: + * None + * + * Return Value: + * HWND Handle of the object window. + */ + +HWND tOleHandler::ObjectWindow(void) + { + HWND hWnd=NULL; + + if (NULL!=m_pIOleIPObject) + m_pIOleIPObject->GetWindow(&hWnd); + + return hWnd; + } + + + + +/* + * tOleHandler::ControlInitialize + * + * Purpose: + * Initializes the control if that's the type of object we have + * in the site. + * + * Parameters: + * None + * + * Return Value: + * BOOL TRUE if initialization worked, FALSE otherwise. + */ + +BOOL tOleHandler::ControlInitialize(void) + { + HRESULT hr; + BOOL fEvents; + + if (NULL==m_pObj) + return FALSE; + + hr=m_pObj->QueryInterface(IID_IOleControl + , (PPVOID)&m_pIOleControl); + + //Failure means not a control. + if (FAILED(hr)) + return FALSE; + + m_ambientProp.setControl(m_pIOleControl); + + m_dwState |= TENANTSTATE_CONTROL; + + if (OLEMISC_ACTSLIKEBUTTON & m_grfMisc) + m_dwState |= TENANTSTATE_BUTTON; + + //We don't use this, but might as well store it. + if (OLEMISC_ACTSLIKELABEL & m_grfMisc) + m_dwState |= TENANTSTATE_LABEL; + + /* + * Call IOleControl::GetControlInfo to retrieve the keyboard + * information for this control. We have to reload this + * information in IOleControlSite::OnControlInfoChanged. + */ + /*m_fHaveControlInfo=SUCCEEDED(m_pIOleControl + ->GetControlInfo(&m_ctrlInfo));*/ //!!! + + + /* + * If you wanted to receive IPropertyNotifySink notifications + * for a control, establish that advisory connection here + * through the object's IConnectionPointContainer and + * IConnectionPoint. + */ + + return TRUE; + } + + + +/* + * tOleHandler::GetControlFlags + * + * Purpose: + * Requests flags describing the control inside this tenant + * if there is, in fact a control. + * + * Parameters: + * None + * + * Return Value: + * DWORD Flags describing the control from the + * TENANT + */ + +DWORD tOleHandler::GetControlFlags(void) + { + return m_dwState & STATEMASK_CONTROLS; + } + + + + + +/* + * tOleHandler::TryMnemonic + * + * Purpose: + * Asks the tenant to check the given keyboard message against + * one that its control might want, passing it to + * IOleControl::OnMnemonic if there is a match. + * + * Parameters: + * pMsg LPMSG containing the message to check. + * + * Return Value: + * BOOL TRUE if the mnemonic was a match, + * FALSE otherwise. + */ + +BOOL tOleHandler::TryMnemonic(LPMSG pMsg) + { + UINT i; + BOOL fRet=FALSE; + LPACCEL pACC; + BYTE fVirt=FVIRTKEY; + + if (!m_fHaveControlInfo) //False for non-controls + return FALSE; + + if (0==m_ctrlInfo.cAccel) + return FALSE; + + pACC=(LPACCEL)GlobalLock(m_ctrlInfo.hAccel); + + if (NULL==pACC) + return FALSE; + + /* + * We'll come here on WM_KEYDOWN messages and WM_SYSKEYDOWN + * messages. The control's accelerator table will contain + * entries that each have the desired key and the various + * modifier flags. We the create the current modifier flags + * then look for entries that match those flags and the key + * that is in the message itself. + */ + + fVirt |= (WM_SYSKEYDOWN==pMsg->message) ? FALT : 0; + + //GetKeyState works on the last message + fVirt |= (0x8000 & GetKeyState(VK_CONTROL)) ? FCONTROL : 0; + fVirt |= (0x8000 & GetKeyState(VK_SHIFT)) ? FSHIFT : 0; + + for (i=0; i < m_ctrlInfo.cAccel; i++) + { + if (pACC[i].key==pMsg->wParam && pACC[i].fVirt==fVirt) + { + m_pIOleControl->OnMnemonic(pMsg); + fRet=TRUE; + break; + } + } + + GlobalUnlock(m_ctrlInfo.hAccel); + return fRet; + } + + + + + +/* + * tOleHandler::AmbientChange + * + * Purpose: + * Notifes a control that an ambient property has changed in + * the control site. + * + * Parameters: + * dispID DISPID of the property that changed. + * + * Return Value: + * None + */ + +void tOleHandler::AmbientChange(DISPID dispID) + { + if (NULL!=m_pIOleControl) + m_pIOleControl->OnAmbientPropertyChange(dispID); + + return; + } + +//End CHAPTER24MOD + +void tOleHandler::OnShow() +{ + // Se objeto ja' tive sido ativado, ignora chamada + // Alguns controles reagem mal quando ativados + // mais de uma vez + if(m_pIOleIPObject != NULL) + return; + + if ((OLEMISC_ACTIVATEWHENVISIBLE & m_grfMisc)) + Activate(OLEIVERB_INPLACEACTIVATE, NULL); +} + + +void tOleHandler::GetNaturalSize(long *pWidth, long *pHeight) +{ + assert(pWidth && pHeight); + if(!pWidth || !pHeight) + return; + + *pWidth = natural_width; + *pHeight = natural_height; +} + +/* + * CalcNaturalSize + * Obtem o tamanho desejado pelo objeto + */ + +void tOleHandler::CalcNaturalSize() +{ + HRESULT hr; + SIZEL sizel; + RECTL rcl; + + assert(m_pIViewObject2 != NULL); + + if(!m_pIViewObject2) + return; + + hr = m_pIViewObject2->GetExtent(m_fe.dwAspect, -1, NULL, &sizel); + + if(FAILED(hr)) + return; + + SETRECTL(rcl, 0, 0, sizel.cx/10, -sizel.cy/10); + RectSet(&rcl, FALSE, TRUE); + + // Obtem medidas ja' convertidas para pixels + SizeGet(&sizel, TRUE); + + natural_width = sizel.cx; + natural_height = sizel.cy; +} + diff --git a/iup/srcole/tOleHandler.h b/iup/srcole/tOleHandler.h new file mode 100755 index 0000000..966cb30 --- /dev/null +++ b/iup/srcole/tOleHandler.h @@ -0,0 +1,139 @@ +// tOleHandler.h: interface for the tOleHandler class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TOLEHANDLER_H__49B97C12_8DEB_11D3_A906_0004ACE655F9__INCLUDED_) +#define AFX_TOLEHANDLER_H__49B97C12_8DEB_11D3_A906_0004ACE655F9__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include +#include + +#include "tOleClientSite.h" +#include "tOleInPlaceSite.h" +#include "tOleControlSite.h" +#include "tDispatch.h" +#include "tAmbientProperties.h" +#include "tLegacy.h" + +#ifndef LPOLEINPLACEOBJECT +typedef interface IOleInPlaceObject *LPOLEINPLACEOBJECT; +#endif + +class tOleClientSite; + +class tOleHandler : public IUnknown +{ +public: + friend class tOleClientSite; + friend class tOleInPlaceSite; + friend class tOleControlSite; + friend class tDispatch; + tOleHandler(); + virtual ~tOleHandler(); + tAmbientProperties m_ambientProp; + + HWND m_hWnd; +private: + + DWORD m_cOpens; //Count calls to Open + + BOOL m_fInitialized; //Something here? + LPUNKNOWN m_pObj; //The object here + LPSTORAGE m_pIStorage; //Sub-storage for tenant + + FORMATETC m_fe; //Used to create the object + DWORD m_dwState; //State flags + RECTL m_rcl; //Space of this object + CLSID m_clsID; //Object class (for statics) + BOOL m_fSetExtent; //Call SetExtent on next run + + ULONG m_cRef; //We're an object now + LPOLEOBJECT m_pIOleObject; //IOleObject on m_pObj + LPVIEWOBJECT2 m_pIViewObject2; //IViewObject2 on m_pObj + ULONG m_grfMisc; //OLEMISC flags + BOOL m_fRepaintEnabled; //No redundant paints + + //Our interfaces + tOleClientSite *m_pImpIOleClientSite; + + tOleInPlaceSite *m_pImpIOleIPSite; //Our interface + LPOLEINPLACEOBJECT m_pIOleIPObject; //The object + RECT m_rcPos; //Last object rect + BOOL m_fInRectSet; //Prevent reentrancy + + //CHAPTER24MOD + tOleControlSite *m_pImpIOleControlSite; //Implemented + tDispatch *m_pImpIDispatch; //Implemented + + //Control interfaces + LPOLECONTROL m_pIOleControl; //Used + + //Other state information + BOOL m_fHaveControlInfo; + CONTROLINFO m_ctrlInfo; + ULONG m_cLockInPlace; + BOOL m_fPendingDeactivate; + //End CHAPTER24MOD + + +/* +* This flag is used exculsively by the implementation of +* IOleUILinkContainer on the page we're in for the Links +* Dialog. Since we never use it ourselves, public here +* is no big deal. +*/ +public: + BOOL m_fLinkAvail; + +protected: + void CalcNaturalSize(void); + long natural_height; + long natural_width; + BOOL ObjectInitialize(LPUNKNOWN); + + //CHAPTER24MOD + BOOL ControlInitialize(void); + //End CHAPTER24MOD + +public: + void setDesignMode(bool value, bool notify); + void GetNaturalSize(long *pWidth, long *pHeight); + void OnShow(void); + //Gotta have an IUnknown for delegation + STDMETHODIMP QueryInterface(REFIID, LPVOID *); + STDMETHODIMP_(ULONG) AddRef(void); + STDMETHODIMP_(ULONG) Release(void); + + UINT Create(LPVOID); + BOOL Open(LPSTORAGE); + void Close(BOOL); + + + BOOL Activate(LONG, LPMSG); + + void EnableRepaint(BOOL); + + void ObjectGet(LPUNKNOWN *); + void SizeGet(LPSIZEL, BOOL); + void SizeSet(LPSIZEL, BOOL, BOOL); + void RectGet(LPRECTL, BOOL); + void RectSet(LPRECTL, BOOL, BOOL); + + void DeactivateInPlaceObject(BOOL); + void UpdateInPlaceObjectRects(LPCRECT, BOOL); + HWND ObjectWindow(void); + + //CHAPTER24MOD + DWORD GetControlFlags(); + BOOL TryMnemonic(LPMSG); + void AmbientChange(DISPID); + //End CHAPTER24MOD + + +}; + +#endif // !defined(AFX_TOLEHANDLER_H__49B97C12_8DEB_11D3_A906_0004ACE655F9__INCLUDED_) diff --git a/iup/srcole/tOleInPlaceFrame.cpp b/iup/srcole/tOleInPlaceFrame.cpp new file mode 100755 index 0000000..15fc9b4 --- /dev/null +++ b/iup/srcole/tOleInPlaceFrame.cpp @@ -0,0 +1,429 @@ +// tOleInPlaceFrame.cpp: implementation of the tOleInPlaceFrame class. +// +////////////////////////////////////////////////////////////////////// + +#include "tOleInPlaceFrame.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +/* + * tOleInPlaceFrame::tOleInPlaceFrame + * tOleInPlaceFrame::~tOleInPlaceFrame + * + * Constructor Parameters: + * hInst HINSTANCE from WinMain + * hInstPrev HINSTANCE from WinMain + * pszCmdLine LPSTR from WinMain + * nCmdShow int from WInMain + */ + +tOleInPlaceFrame::tOleInPlaceFrame(HWND hwnd) + { + m_cRef=0; + m_hAccelIP=NULL; + m_fInContextHelp=FALSE; + m_pIOleIPActiveObject=NULL; + m_hWnd = hwnd; + + return; + } + + +tOleInPlaceFrame::~tOleInPlaceFrame(void) + { + } + + +/* + * tOleInPlaceFrame::QueryInterface + * tOleInPlaceFrame::AddRef + * tOleInPlaceFrame::Release + */ + +STDMETHODIMP tOleInPlaceFrame::QueryInterface(REFIID riid, PPVOID ppv) + { + //We only know IUnknown and IOleInPlaceFrame + *ppv=NULL; + + if (IID_IUnknown==riid || IID_IOleInPlaceUIWindow==riid + || IID_IOleWindow==riid || IID_IOleInPlaceFrame==riid) + *ppv=(LPOLEINPLACEFRAME)this; + + if (NULL!=*ppv) + { + ((LPUNKNOWN)*ppv)->AddRef(); + return NOERROR; + } + + return ResultFromScode(E_NOINTERFACE); + } + + +STDMETHODIMP_(ULONG) tOleInPlaceFrame::AddRef(void) + { + return ++m_cRef; + } + +STDMETHODIMP_(ULONG) tOleInPlaceFrame::Release(void) + { + /* + * We don't do anything with this since we're not controlled + * by a reference count as far as in-place stuff is concerned. + */ + return --m_cRef; + } + + + + +/* + * tOleInPlaceFrame::GetWindow + * + * Purpose: + * Retrieves the handle of the window associated with the object + * on which this interface is implemented. + * + * Parameters: + * phWnd HWND * in which to store the window handle. + * + * Return Value: + * HRESULT NOERROR if successful, E_FAIL if there is no + * window. + */ + +STDMETHODIMP tOleInPlaceFrame::GetWindow(HWND *phWnd) + { + *phWnd=m_hWnd; + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::ContextSensitiveHelp + * + * Purpose: + * Instructs the object on which this interface is implemented to + * enter or leave a context-sensitive help mode. + * + * Parameters: + * fEnterMode BOOL TRUE to enter the mode, FALSE otherwise. + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceFrame::ContextSensitiveHelp(BOOL fEnterMode) + { + /* + * Don't bother if there is no active object since we don't do + * context help on our own. + */ + if (NULL==m_pIOleIPActiveObject) + return NOERROR; + + /* + * If the state changes, an MDI frame should call the same + * function in all documents. An SDI frame should just call + * the active object, if it has one. + */ + + if (m_fInContextHelp!=fEnterMode) + { + m_fInContextHelp=fEnterMode; + + m_pIOleIPActiveObject->ContextSensitiveHelp(fEnterMode); + + } + + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::GetBorder + * + * Purpose: + * Returns the rectangle in which the container is willing to + * negotiate about an object's adornments. + * + * Parameters: + * prcBorder LPRECT in which to store the rectangle. + * + * Return Value: + * HRESULT NOERROR if all is well, INPLACE_E_NOTOOLSPACE + * if there is no negotiable space. + */ + +STDMETHODIMP tOleInPlaceFrame::GetBorder(LPRECT prcBorder) + { + if (NULL==prcBorder) + return ResultFromScode(E_INVALIDARG); + + /* + * We return all the client area space sans the StatStrip, + * which we control + */ + GetClientRect(m_hWnd, prcBorder); + + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::RequestBorderSpace + * + * Purpose: + * Asks the container if it can surrender the amount of space + * in pBW that the object would like for it's adornments. The + * container does nothing but validate the spaces on this call. + * + * Parameters: + * pBW LPCBORDERWIDTHS containing the requested space. + * The values are the amount of space requested + * from each side of the relevant window. + * + * Return Value: + * HRESULT NOERROR if we can give up space, + * INPLACE_E_NOTOOLSPACE otherwise. + */ + +STDMETHODIMP tOleInPlaceFrame::RequestBorderSpace(LPCBORDERWIDTHS pBW) + { + //Everything is fine with us, so always return an OK. + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::SetBorderSpace + * + * Purpose: + * Called when the object now officially requests that the + * container surrender border space it previously allowed + * in RequestBorderSpace. The container should resize windows + * appropriately to surrender this space. + * + * Parameters: + * pBW LPCBORDERWIDTHS containing the amount of space + * from each side of the relevant window that the + * object is now reserving. + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceFrame::SetBorderSpace(LPCBORDERWIDTHS pBW) + { + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::SetActiveObject + * + * Purpose: + * Provides the container with the object's IOleInPlaceActiveObject + * pointer + * + * Parameters: + * pIIPActiveObj LPOLEINPLACEACTIVEOBJECT of interest. + * pszObj LPCOLESTR naming the object. Not used. + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceFrame::SetActiveObject + (LPOLEINPLACEACTIVEOBJECT pIIPActiveObj, LPCOLESTR pszObj) + { + if (NULL!=m_pIOleIPActiveObject) + m_pIOleIPActiveObject->Release(); + + //NULLs m_pIOleIPActiveObject if pIIPActiveObj is NULL + m_pIOleIPActiveObject=pIIPActiveObj; + + if (NULL!=m_pIOleIPActiveObject) + m_pIOleIPActiveObject->AddRef(); + + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::InsertMenus + * + * Purpose: + * Instructs the container to place its in-place menu items where + * necessary in the given menu and to fill in elements 0, 2, and 4 + * of the OLEMENUGROUPWIDTHS array to indicate how many top-level + * items are in each group. + * + * Parameters: + * hMenu HMENU in which to add popups. + * pMGW LPOLEMENUGROUPWIDTHS in which to store the + * width of each container menu group. + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceFrame::InsertMenus(HMENU hMenu + , LPOLEMENUGROUPWIDTHS pMGW) + { + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::SetMenu + * + * Purpose: + * Instructs the container to replace whatever menu it's currently + * using with the given menu and to call OleSetMenuDescritor so OLE + * knows to whom to dispatch messages. + * + * Parameters: + * hMenu HMENU to show. + * hOLEMenu HOLEMENU to the menu descriptor. + * hWndObj HWND of the active object to which messages are + * dispatched. + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceFrame::SetMenu(HMENU hMenu + , HOLEMENU hOLEMenu, HWND hWndObj) + { + HRESULT hr; + + /* + * Our responsibilities here are to put the menu on the frame + * window and call OleSetMenuDescriptor. + * CPatronClient::SetMenu which we call here takes care of + * MDI/SDI differences. + * + * We also want to save the object's hWnd for use in WM_SETFOCUS + * processing. + */ + + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::RemoveMenus + * + * Purpose: + * Asks the container to remove any menus it put into hMenu in + * InsertMenus. + * + * Parameters: + * hMenu HMENU from which to remove the container's + * items. + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceFrame::RemoveMenus(HMENU hMenu) + { + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::SetStatusText + * + * Purpose: + * Asks the container to place some text in a status line, if one + * exists. If the container does not have a status line it + * should return E_FAIL here in which case the object could + * display its own. + * + * Parameters: + * pszText LPCOLESTR to display. + * + * Return Value: + * HRESULT NOERROR if successful, S_TRUNCATED if not all + * of the text could be displayed, or E_FAIL if + * the container has no status line. + */ + +STDMETHODIMP tOleInPlaceFrame::SetStatusText(LPCOLESTR pszText) + { + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::EnableModeless + * + * Purpose: + * Instructs the container to show or hide any modeless popup + * windows that it may be using. + * + * Parameters: + * fEnable BOOL indicating to enable/show the windows + * (TRUE) or to hide them (FALSE). + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceFrame::EnableModeless(BOOL fEnable) + { + return NOERROR; + } + + + + +/* + * tOleInPlaceFrame::TranslateAccelerator + * + * Purpose: + * When dealing with an in-place object from an EXE server, this + * is called to give the container a chance to process accelerators + * after the server has looked at the message. + * + * Parameters: + * pMSG LPMSG for the container to examine. + * wID WORD the identifier in the container's + * accelerator table (from IOleInPlaceSite + * ::GetWindowContext) for this message (OLE does + * some translation before calling). + * + * Return Value: + * HRESULT NOERROR if the keystroke was used, + * S_FALSE otherwise. + */ + +STDMETHODIMP tOleInPlaceFrame::TranslateAccelerator(LPMSG pMSG, WORD wID) + { + SCODE sc; + + sc=S_OK; + return ResultFromScode(sc); + } diff --git a/iup/srcole/tOleInPlaceFrame.h b/iup/srcole/tOleInPlaceFrame.h new file mode 100755 index 0000000..4048f12 --- /dev/null +++ b/iup/srcole/tOleInPlaceFrame.h @@ -0,0 +1,67 @@ +// tOleInPlaceFrame.h: interface for the tOleInPlaceFrame class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TOLEINPLACEFRAME_H__76ABD328_9D90_11D3_A906_0004ACE655F9__INCLUDED_) +#define AFX_TOLEINPLACEFRAME_H__76ABD328_9D90_11D3_A906_0004ACE655F9__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "tLegacy.h" + +/* + * UINT value such that adding one produces zero. Portable to Win32. + * This is used to represent a non-existent zero-based UINT value + */ +#define NOVALUE ((UINT)-1) + + +//PATRON.CPP: Frame object that creates a main window + +class tOleInPlaceFrame : public IOleInPlaceFrame + { + private: + BOOL m_fInitialized; //OleInitialize worked + + DWORD m_cRef; + HWND m_hWnd; //Object window + + BOOL m_fInContextHelp; //In context help mode? + + LPOLEINPLACEACTIVEOBJECT m_pIOleIPActiveObject; + + //This is for access from IOleInPlaceSite::GetWindowContext + public: + HACCEL m_hAccelIP; //Accelerators for in-place + + protected: + + public: + tOleInPlaceFrame(HWND); + virtual ~tOleInPlaceFrame(void); + + //IOleInPlaceFrame implementation + STDMETHODIMP QueryInterface(REFIID, LPVOID *); + STDMETHODIMP_(ULONG) AddRef(void); + STDMETHODIMP_(ULONG) Release(void); + + STDMETHODIMP GetWindow(HWND *); + STDMETHODIMP ContextSensitiveHelp(BOOL); + STDMETHODIMP GetBorder(LPRECT); + STDMETHODIMP RequestBorderSpace(LPCBORDERWIDTHS); + STDMETHODIMP SetBorderSpace(LPCBORDERWIDTHS); + STDMETHODIMP SetActiveObject(LPOLEINPLACEACTIVEOBJECT + , LPCOLESTR); + STDMETHODIMP InsertMenus(HMENU, LPOLEMENUGROUPWIDTHS); + STDMETHODIMP SetMenu(HMENU, HOLEMENU, HWND); + STDMETHODIMP RemoveMenus(HMENU); + STDMETHODIMP SetStatusText(LPCOLESTR); + STDMETHODIMP EnableModeless(BOOL); + STDMETHODIMP TranslateAccelerator(LPMSG, WORD); + }; + + + +#endif // !defined(AFX_TOLEINPLACEFRAME_H__76ABD328_9D90_11D3_A906_0004ACE655F9__INCLUDED_) diff --git a/iup/srcole/tOleInPlaceSite.cpp b/iup/srcole/tOleInPlaceSite.cpp new file mode 100755 index 0000000..977777c --- /dev/null +++ b/iup/srcole/tOleInPlaceSite.cpp @@ -0,0 +1,485 @@ +// tOleInPlaceSite.cpp: implementation of the tOleInPlaceSite class. +// +////////////////////////////////////////////////////////////////////// + +#include "tOleInPlaceSite.h" +#include "tOleHandler.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +BOOL g_fSwitchingActive=FALSE; + +/* + * tOleInPlaceSite::tOleInPlaceSite + * tOleInPlaceSite::~tOleInPlaceSite + * + * Parameters (Constructor): + * pTen PCTenant of the tenant we're in. + * pUnkOuter LPUNKNOWN to which we delegate. + */ + +tOleInPlaceSite::tOleInPlaceSite(class tOleHandler *pTen + , LPUNKNOWN pUnkOuter) + { + m_cRef=0; + m_pTen=pTen; + m_pUnkOuter=pUnkOuter; + m_oleinplaceframe = new tOleInPlaceFrame(m_pTen->m_hWnd); + return; + } + +tOleInPlaceSite::~tOleInPlaceSite(void) + { + return; + } + + + +/* + * tOleInPlaceSite::QueryInterface + * tOleInPlaceSite::AddRef + * tOleInPlaceSite::Release + * + * Purpose: + * IUnknown members for tOleInPlaceSite object. + */ + +STDMETHODIMP tOleInPlaceSite::QueryInterface(REFIID riid + , LPVOID *ppv) + { + return m_pUnkOuter->QueryInterface(riid, ppv); + } + + +STDMETHODIMP_(ULONG) tOleInPlaceSite::AddRef(void) + { + ++m_cRef; + return m_pUnkOuter->AddRef(); + } + +STDMETHODIMP_(ULONG) tOleInPlaceSite::Release(void) + { + --m_cRef; + return m_pUnkOuter->Release(); + } + + + + +/* + * tOleInPlaceActiveObject::GetWindow + * + * Purpose: + * Retrieves the handle of the window associated with the object + * on which this interface is implemented. + * + * Parameters: + * phWnd HWND * in which to store the window handle. + * + * Return Value: + * HRESULT NOERROR if successful, E_FAIL if there is no + * window. + */ + +STDMETHODIMP tOleInPlaceSite::GetWindow(HWND *phWnd) + { + *phWnd=m_pTen->m_hWnd; + return NOERROR; + } + + + + +/* + * tOleInPlaceActiveObject::ContextSensitiveHelp + * + * Purpose: + * Instructs the object on which this interface is implemented to + * enter or leave a context-sensitive help mode. + * + * Parameters: + * fEnterMode BOOL TRUE to enter the mode, FALSE otherwise. + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceSite::ContextSensitiveHelp + (BOOL fEnterMode) + { + return E_NOTIMPL; + } + + + + +/* + * tOleInPlaceSite::CanInPlaceActivate + * + * Purpose: + * Answers the server whether or not we can currently in-place + * activate its object. By implementing this interface we say + * that we support in-place activation, but through this function + * we indicate whether the object can currently be activated + * in-place. Iconic aspects, for example, cannot, meaning we + * return S_FALSE. + * + * Parameters: + * None + * + * Return Value: + * HRESULT NOERROR if we can in-place activate the object + * in this site, S_FALSE if not. + */ + +STDMETHODIMP tOleInPlaceSite::CanInPlaceActivate(void) + { + if (DVASPECT_CONTENT!=m_pTen->m_fe.dwAspect) + return ResultFromScode(S_FALSE); + + return NOERROR; + } + + + + +/* + * tOleInPlaceSite::OnInPlaceActivate + * + * Purpose: + * Informs the container that an object is being activated in-place + * such that the container can prepare appropriately. The + * container does not, however, make any user interface changes at + * this point. See OnUIActivate. + * + * Parameters: + * None + * + * Return Value: + * HRESULT NOERROR or an appropriate error code. + */ + +STDMETHODIMP tOleInPlaceSite::OnInPlaceActivate(void) + { + //CHAPTER24MOD + m_pTen->m_fPendingDeactivate=FALSE; + //End CHAPTER24MOD + + //m_pIOleIPObject is our in-place flag. + m_pTen->m_pObj->QueryInterface(IID_IOleInPlaceObject + , (PPVOID)&m_pTen->m_pIOleIPObject); + + return NOERROR; + } + + + + +/* + * tOleInPlaceSite::OnInPlaceDeactivate + * + * Purpose: + * Notifies the container that the object has deactivated itself + * from an in-place state. Opposite of OnInPlaceActivate. The + * container does not change any UI at this point. + * + * Parameters: + * None + * + * Return Value: + * HRESULT NOERROR or an appropriate error code. + */ + +STDMETHODIMP tOleInPlaceSite::OnInPlaceDeactivate(void) + { + /* + * Since we don't have an Undo command, we can tell the object + * right away to discard its Undo state. + */ + m_pTen->Activate(OLEIVERB_DISCARDUNDOSTATE, NULL); + ReleaseInterface(m_pTen->m_pIOleIPObject); + return NOERROR; + } + + + + +/* + * tOleInPlaceSite::OnUIActivate + * + * Purpose: + * Informs the container that the object is going to start munging + * around with user interface, like replacing the menu. The + * container should remove any relevant UI in preparation. + * + * Parameters: + * None + * + * Return Value: + * HRESULT NOERROR or an appropriate error code. + */ + +STDMETHODIMP tOleInPlaceSite::OnUIActivate(void) + { + //CHAPTER24MOD + m_pTen->m_fPendingDeactivate=FALSE; + //End CHAPTER24MOD + + /* + * Change the currently selected tenant in the page. This + * will UIDeactivate the currently UI Active tenant. + */ + g_fSwitchingActive=TRUE; + //m_pTen->m_pPG->m_pPageCur->SwitchActiveTenant(m_pTen); + g_fSwitchingActive=FALSE; + + return NOERROR; + } + + + + +/* + * tOleInPlaceSite::OnUIDeactivate + * + * Purpose: + * Informs the container that the object is deactivating its + * in-place user interface at which time the container may + * reinstate its own. Opposite of OnUIActivate. + * + * Parameters: + * fUndoable BOOL indicating if the object will actually + * perform an Undo if the container calls + * ReactivateAndUndo. + * + * Return Value: + * HRESULT NOERROR or an appropriate error code. + */ + +STDMETHODIMP tOleInPlaceSite::OnUIDeactivate(BOOL fUndoable) + { + MSG msg; + + /* + * Ignore this notification if we're switching between + * multiple active objects. + */ + if (g_fSwitchingActive) + return NOERROR; + + //If in shutdown (NULL storage), don't check messages. +/* if (NULL==m_pTen->m_pIStorage) + { + g_pFR->ReinstateUI(); + return NOERROR; + }*/ + + //If there's a pending double-click, delay showing our UI +/* if (!PeekMessage(&msg, pDoc->Window(), WM_LBUTTONDBLCLK + , WM_LBUTTONDBLCLK, PM_NOREMOVE | PM_NOYIELD)) + { + //Turn everything back on. + g_pFR->ReinstateUI(); + } + else*/ + + return NOERROR; + } + + + + +/* + * tOleInPlaceSite::DeactivateAndUndo + * + * Purpose: + * If immediately after activation the object does an Undo, the + * action being undone is the activation itself, and this call + * informs the container that this is, in fact, what happened. + * The container should call IOleInPlaceObject::UIDeactivate. + * + * Parameters: + * None + * + * Return Value: + * HRESULT NOERROR or an appropriate error code. + */ + +STDMETHODIMP tOleInPlaceSite::DeactivateAndUndo(void) + { + //CHAPTER24MOD + /* + * Note that we don't pay attention to the locking + * from IOleControlSite::LockInPlaceActive since only + * the object calls this function and should know + * that it's going to be deactivated. + */ + //End CHAPTER24MOD + + m_pTen->m_pIOleIPObject->InPlaceDeactivate(); + return NOERROR; + } + + + + +/* + * tOleInPlaceSite::DiscardUndoState + * + * Purpose: + * Informs the container that something happened in the object + * that means the container should discard any undo information + * it currently maintains for the object. + * + * Parameters: + * None + * + * Return Value: + * HRESULT NOERROR or an appropriate error code. + */ + +STDMETHODIMP tOleInPlaceSite::DiscardUndoState(void) + { + return ResultFromScode(E_NOTIMPL); + } + + + + +/* + * tOleInPlaceSite::GetWindowContext + * + * Purpose: + * Provides an in-place object with pointers to the frame and + * document level in-place interfaces (IOleInPlaceFrame and + * IOleInPlaceUIWindow) such that the object can do border + * negotiation and so forth. Also requests the position and + * clipping rectangles of the object in the container and a + * pointer to an OLEINPLACEFRAME info structure which contains + * accelerator information. + * + * Note that the two interfaces this call returns are not + * available through QueryInterface on IOleInPlaceSite since they + * live with the frame and document, but not the site. + * + * Parameters: + * ppIIPFrame LPOLEINPLACEFRAME * in which to return the + * AddRef'd pointer to the container's + * IOleInPlaceFrame. + * ppIIPUIWindow LPOLEINPLACEUIWINDOW * in which to return + * the AddRef'd pointer to the container document's + * IOleInPlaceUIWindow. + * prcPos LPRECT in which to store the object's position. + * prcClip LPRECT in which to store the object's visible + * region. + * pFI LPOLEINPLACEFRAMEINFO to fill with accelerator + * stuff. + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceSite::GetWindowContext + (LPOLEINPLACEFRAME *ppIIPFrame, LPOLEINPLACEUIWINDOW + *ppIIPUIWindow, LPRECT prcPos, LPRECT prcClip + , LPOLEINPLACEFRAMEINFO pFI) + { + RECTL rcl; + + *ppIIPUIWindow=NULL; + *ppIIPFrame=m_oleinplaceframe; + m_oleinplaceframe->AddRef(); + + GetClientRect(m_pTen->m_hWnd, prcPos); + GetClientRect(m_pTen->m_hWnd, prcClip); + +/* *ppIIPFrame=(LPOLEINPLACEFRAME)g_pFR; + g_pFR->AddRef();*/ + +/* if (NULL!=pDoc) + { + pDoc->QueryInterface(IID_IOleInPlaceUIWindow + , (PPVOID)ppIIPUIWindow); + }*/ + + //Now get the rectangles and frame information. + /*m_pTen->RectGet(&rcl, TRUE); + RECTFROMRECTL(*prcPos, rcl); + 0 + //Include scroll position here. + OffsetRect(prcPos, -(int)m_pTen->m_pPG->m_xPos + , -(int)m_pTen->m_pPG->m_yPos); + + SetRect(prcClip, 0, 0, 32767, 32767); +*/ + pFI->cb=sizeof(OLEINPLACEFRAMEINFO); + pFI->fMDIApp=FALSE; + + pFI->hwndFrame=m_pTen->m_hWnd; + + pFI->haccel=NULL; + pFI->cAccelEntries=0; + + return NOERROR; + } + + + + +/* + * tOleInPlaceSite::Scroll + * + * Purpose: + * Asks the container to scroll the document, and thus the object, + * by the given amounts in the sz parameter. + * + * Parameters: + * sz SIZE containing signed horizontal and vertical + * extents by which the container should scroll. + * These are in device units. + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceSite::Scroll(SIZE sz) + { + /*int x, y; + + x=m_pTen->m_pPG->m_xPos+sz.cx; + y=m_pTen->m_pPG->m_yPos+sz.cy; + + SendScrollPosition(m_pTen->m_hWnd, WM_HSCROLL, x); + SendScrollPosition(m_pTen->m_hWnd, WM_VSCROLL, y);*/ + return NOERROR; + } + + + + +/* + * tOleInPlaceSite::OnPosRectChange + * + * Purpose: + * Informs the container that the in-place object was resized. + * The container must call IOleInPlaceObject::SetObjectRects. + * This does not change the site's rectangle in any case. + * + * Parameters: + * prcPos LPCRECT containing the new size of the object. + * + * Return Value: + * HRESULT NOERROR + */ + +STDMETHODIMP tOleInPlaceSite::OnPosRectChange(LPCRECT prcPos) + { + if (NULL!=prcPos) + m_pTen->m_rcPos=*prcPos; + + m_pTen->UpdateInPlaceObjectRects(prcPos, FALSE); + return NOERROR; + } + diff --git a/iup/srcole/tOleInPlaceSite.h b/iup/srcole/tOleInPlaceSite.h new file mode 100755 index 0000000..d559df2 --- /dev/null +++ b/iup/srcole/tOleInPlaceSite.h @@ -0,0 +1,47 @@ +// tOleInPlaceSite.h: interface for the tOleInPlaceSite class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TOLEINPLACESITE_H__37A5ADEB_91FB_11D3_A906_0004AC252223__INCLUDED_) +#define AFX_TOLEINPLACESITE_H__37A5ADEB_91FB_11D3_A906_0004AC252223__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include +#include "tOleInPlaceFrame.h" + +class tOleInPlaceSite : public IOleInPlaceSite +{ +protected: + ULONG m_cRef; + class tOleHandler *m_pTen; + LPUNKNOWN m_pUnkOuter; + +public: + tOleInPlaceFrame * m_oleinplaceframe; + tOleInPlaceSite(class tOleHandler *, LPUNKNOWN); + ~tOleInPlaceSite(void); + + STDMETHODIMP QueryInterface(REFIID, LPVOID*); + STDMETHODIMP_(ULONG) AddRef(void); + STDMETHODIMP_(ULONG) Release(void); + + STDMETHODIMP GetWindow(HWND *); + STDMETHODIMP ContextSensitiveHelp(BOOL); + STDMETHODIMP CanInPlaceActivate(void); + STDMETHODIMP OnInPlaceActivate(void); + STDMETHODIMP OnUIActivate(void); + STDMETHODIMP GetWindowContext(LPOLEINPLACEFRAME * + , LPOLEINPLACEUIWINDOW *, LPRECT, LPRECT + , LPOLEINPLACEFRAMEINFO); + STDMETHODIMP Scroll(SIZE); + STDMETHODIMP OnUIDeactivate(BOOL); + STDMETHODIMP OnInPlaceDeactivate(void); + STDMETHODIMP DiscardUndoState(void); + STDMETHODIMP DeactivateAndUndo(void); + STDMETHODIMP OnPosRectChange(LPCRECT); +}; + +#endif // !defined(AFX_TOLEINPLACESITE_H__37A5ADEB_91FB_11D3_A906_0004AC252223__INCLUDED_) diff --git a/iup/srcpplot/Makefile b/iup/srcpplot/Makefile new file mode 100755 index 0000000..e10ef19 --- /dev/null +++ b/iup/srcpplot/Makefile @@ -0,0 +1,6 @@ + +.PHONY: do_all iup_pplot +do_all: iup_pplot + +iup_pplot: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak diff --git a/iup/srcpplot/config.mak b/iup/srcpplot/config.mak new file mode 100755 index 0000000..7c3975b --- /dev/null +++ b/iup/srcpplot/config.mak @@ -0,0 +1,25 @@ +PROJNAME = iup +LIBNAME = iup_pplot +OPT = YES + +USE_CD = Yes + +ifdef DBG + DEFINES += IUP_ASSERT +endif + +INCLUDES = ../include ../src +LDIR = ../lib/$(TEC_UNAME) +LIBS = iup iupcd + +DEFINES = _IUP_PPLOT_ CD_NO_OLD_INTERFACE + +SRC = iupPPlot.cpp iupPPlotInteraction.cpp iup_pplot.cpp + +ifneq ($(findstring owc, $(TEC_UNAME)), ) + CPPFLAGS = -xr -xst +endif + +ifeq "$(TEC_UNAME)" "vc6" + INCLUDES += C:\LNG\STLport\include +endif diff --git a/iup/srcpplot/iupPPlot.cpp b/iup/srcpplot/iupPPlot.cpp new file mode 100755 index 0000000..c0d07c9 --- /dev/null +++ b/iup/srcpplot/iupPPlot.cpp @@ -0,0 +1,2470 @@ +/*************************************************************************** + * * + * Copyright notice: * + * * + * This is free Pier ware. You may do whatever you want with this code, * + * except that you should not remove this copyright notice. * + * * + ***************************************************************************/ + +#ifdef _MSC_VER +#pragma warning(disable: 4100) +#pragma warning(disable: 4512) +#endif + +#include +#include +#include + +#include "iupPPlot.h" + +const float kFloatSmall = 1e-20f; +const float kLogMin = 1e-10f;// min argument for log10 function +const float kExpMax = 1e10f;// max argument for pow10 function +const float kLogMinClipValue = 1e-10f;// pragmatism to avoid problems with small values in log plot +const float kEps = 1e-4f; +const float kRelMajorTickSize = 0.02f; +const float kRelMinorTickSize = 0.01f; +const int kMinMinorTickScreenSize = 1;// minor ticks should not become smaller than this +const float kMaxMajorTickSizeInFontHeight = 0.5f;// not larger than half the font height +const float kLittleIncrease = 1.0001f; +const float kLittleDecrease = 0.9999f; +const float kTickValueVeryBig = 1.0e4;// switch to scientific format +const float kTickValueVerySmall = (float)1.0e-3; +const float kMajorTickXInitialFac = 2.0f; +const float kMajorTickYInitialFac = 3.0f; +const PMargins kDefaultMargins = PMargins (40,20,5,42); + +const float PPlot::kRangeVerySmall = (float)1.0e-3; // also in ZoomInteraction + +template const T & PMax (const T &a, const T &b) { + return b> a ? b: a; +} + +inline float SafeLog (float inFloat, float inBase, float inFac) { + if (inFloatkExpMax) { + inFloat = kExpMax; + } + return pow(inBase, inFloat/inFac); +} + +long PlotDataBase::GetSize () const { + if (GetRealPlotData ()) { + return GetRealPlotData ()->size (); + } + if (GetCalculatedData ()) { + return GetCalculatedData ()->GetSize (); + } + return 0; +} + +float PlotDataBase::GetValue (long inIndex) const { + if (GetRealPlotData ()) { + return (*GetRealPlotData ())[inIndex]; + } + if (GetCalculatedData ()) { + return GetCalculatedData ()->GetValue (inIndex); + } + return 0; +} + +bool PlotDataBase::CalculateRange (float &outXMin, float &outXMax) { + const RealData *theData = GetRealPlotData (); + if (theData && theData->size () >0) { + vector::const_iterator imin = min_element (theData->begin (), theData->end ()); + vector::const_iterator imax = max_element (theData->begin (), theData->end ()); + outXMin = *imin; + outXMax = *imax; + return true; + } + else { + const CalculatedDataBase *theCalculated = GetCalculatedData (); + if (theCalculated) { + outXMin = theCalculated->GetValue (0); + outXMax = theCalculated->GetValue (theCalculated->GetSize () - 1); + return true; + } + } + + return false; +} + +DummyPlotData::DummyPlotData (long inSize) { + for (int theI=0;theI0; +} + +long PlotDataSelection::GetSelectedCount () const { + long theCount = 0; + for (int theI=0;theI1) { + while (theSpan>10) { + theSpan/=10; + if (theSpan == inSpan) { // not a number + return (float)-1.234567; + } + thePow++; + } + } + else { + while (theSpan<1) { + theSpan*=10; + thePow--; + } + } + int theRoundedFirstDigit = PPlot::Round (theSpan); + int thePreferredFirstDigit = 1; + switch (theRoundedFirstDigit) { + case 1: + thePreferredFirstDigit = 1; + break; + case 2: + case 3: + case 4: + thePreferredFirstDigit = 2; + break; + case 5: + case 6: + case 7: + case 8: + case 9: + thePreferredFirstDigit = 5; + break; + case 10: + thePreferredFirstDigit = 1; + thePow++; + break; + default: + // error + return (float)-1.234567; + break; + } + float theRes = thePreferredFirstDigit*pow (10., thePow); /* M.T. changed to force a double cast */ + return theRes; +} + +void TickInfo::MakeFormatString (float inValue, string &outFormatString) { + if (inValue<0) { + inValue = - inValue; + } + if (inValue > kTickValueVeryBig || inValue < kTickValueVerySmall) { + outFormatString = "%.1e"; + } + else { + + int thePrecision = 0; + if (inValue<1) { + float theSpan = inValue; + while (theSpan<1) { + thePrecision++; + theSpan *=10; + } + } + + char theBuf[128] = "%.0f"; + theBuf[2] = '0'+thePrecision; + + outFormatString = theBuf; + } +} + + +PlotDataBase::~PlotDataBase (){ +}; + + +PlotDataContainer::PlotDataContainer (){ +} +PlotDataContainer::~PlotDataContainer (){ + ClearData (); +} + +PlotDataBase * PlotDataContainer::GetXData (int inIndex) { + if (inIndex < 0 || inIndex >= mXDataList.size ()) { + return 0; + } + return mXDataList[inIndex]; +} + +PlotDataBase * PlotDataContainer::GetYData (int inIndex) { + if (inIndex < 0 || inIndex >= mYDataList.size ()) { + return 0; + } + return mYDataList[inIndex]; +} + +LegendData * PlotDataContainer::GetLegendData (int inIndex) { + if (inIndex < 0 || inIndex >= mLegendDataList.size ()) { + return 0; + } + return mLegendDataList[inIndex]; +} + +DataDrawerBase * PlotDataContainer::GetDataDrawer (int inIndex) { + if (inIndex < 0 || inIndex >= mDataDrawerList.size ()) { + return 0; + } + return mDataDrawerList[inIndex]; +} + +PlotDataSelection * PlotDataContainer::GetPlotDataSelection (int inIndex) { + if (inIndex < 0 || inIndex >= mPlotDataSelectionList.size ()) { + return 0; + } + return mPlotDataSelectionList[inIndex]; +} + +const PlotDataBase * PlotDataContainer::GetConstXData (int inIndex) const { + if (inIndex < 0 || inIndex >= mXDataList.size ()) { + return 0; + } + return mXDataList[inIndex]; +} + +const PlotDataBase * PlotDataContainer::GetConstYData (int inIndex) const { + if (inIndex < 0 || inIndex >= mYDataList.size ()) { + return 0; + } + return mYDataList[inIndex]; +} + +const LegendData * PlotDataContainer::GetConstLegendData (int inIndex) const { + if (inIndex < 0 || inIndex >= mLegendDataList.size ()) { + return 0; + } + return mLegendDataList[inIndex]; +} + +const DataDrawerBase * PlotDataContainer::GetConstDataDrawer (int inIndex) const { + if (inIndex < 0 || inIndex >= mDataDrawerList.size ()) { + return 0; + } + return mDataDrawerList[inIndex]; +} + +const PlotDataSelection * PlotDataContainer::GetConstPlotDataSelection (int inIndex) const { + if (inIndex < 0 || inIndex >= mPlotDataSelectionList.size ()) { + return 0; + } + return mPlotDataSelectionList[inIndex]; +} + +void PlotDataContainer::RemoveElement (int inIndex) { + if (!(inIndex < mXDataList.size () && inIndex < mYDataList.size () && + inIndex < mLegendDataList.size () && inIndex < mDataDrawerList.size ())) { + // Invalid index + return; + } + + PlotDataList::iterator theXI = mXDataList.begin () + inIndex; + PlotDataList::iterator theYI = mYDataList.begin () + inIndex; + LegendDataList::iterator theLI = mLegendDataList.begin () + inIndex; + DataDrawerList::iterator theDI = mDataDrawerList.begin () + inIndex; + PlotDataSelectionList::iterator thePI = mPlotDataSelectionList.begin () + inIndex; + + delete *theXI; + delete *theYI; + delete *theLI; + delete *theDI; + delete *thePI; + + mXDataList.erase (theXI); + mYDataList.erase (theYI); + mLegendDataList.erase (theLI); + mDataDrawerList.erase (theDI); + mPlotDataSelectionList.erase (thePI); +} + +void PlotDataContainer::ClearData () { + PlotDataList::iterator theXI = mXDataList.begin (); + PlotDataList::iterator theYI = mYDataList.begin (); + LegendDataList::iterator theLI = mLegendDataList.begin (); + DataDrawerList::iterator theDI = mDataDrawerList.begin (); + PlotDataSelectionList::iterator thePI = mPlotDataSelectionList.begin (); + + for (;theXI!=mXDataList.end () && theYI!=mYDataList.end () && theLI!=mLegendDataList.end () && theDI != mDataDrawerList.end () && thePI != mPlotDataSelectionList.end ();) { + PlotDataBase *theX = *theXI; + PlotDataBase *theY = *theYI; + LegendData *theL = *theLI; + DataDrawerBase *theD = *theDI; + PlotDataSelection *theP = *thePI; + + delete theX; + delete theY; + delete theL; + delete theD; + delete theP; + + theXI++; + theYI++; + theLI++; + theDI++; + thePI++; + } + mXDataList.clear (); + mYDataList.clear (); + mLegendDataList.clear (); + mDataDrawerList.clear (); + mPlotDataSelectionList.clear (); +} + +/* M.T. - changed to return the index of the added plot; returns -1 on error */ +int PlotDataContainer::AddXYPlot (PlotDataBase *inXData, PlotDataBase *inYData, LegendData *inLegendData, DataDrawerBase *inDataDrawer, PlotDataSelection *inPlotDataSelection) { + if (!inYData || (!inYData->GetRealPlotData () && !inYData->GetCalculatedData ())) { + return -1; + } + PlotDataBase *theXData = inXData; + if (!theXData) { + theXData = new DummyPlotData (inYData->GetSize ()); + } + mXDataList.push_back (theXData); + mYDataList.push_back (inYData); + + LegendData *theLegendData = inLegendData; + if (!theLegendData) { + theLegendData = new LegendData (); + theLegendData->SetDefaultValues (mLegendDataList.size ()); + } + mLegendDataList.push_back (theLegendData); + + DataDrawerBase *theDataDrawer = inDataDrawer; + if (!theDataDrawer) { + theDataDrawer = new LineDataDrawer (); + } + mDataDrawerList.push_back (theDataDrawer); + + PlotDataSelection *thePlotDataSelection = inPlotDataSelection; + if (!thePlotDataSelection) { + thePlotDataSelection = new PlotDataSelection (); + } + else { + thePlotDataSelection->resize (inYData->GetSize ()); + } + mPlotDataSelectionList.push_back (thePlotDataSelection); + return ( mYDataList.size() - 1 ); +} + +void PlotDataContainer::SetXYPlot (int inIndex, PlotDataBase *inXData, PlotDataBase *inYData, LegendData *inLegendData, DataDrawerBase *inDataDrawer, PlotDataSelection *inPlotDataSelection) { + if (!inYData || !inYData->GetRealPlotData ()) { + return; + } + if (!CheckState ()) { + return; + } + long thePlotCount = GetPlotCount (); + if (inIndex<0||inIndex>thePlotCount) { + return; + } + PlotDataBase *theXData = inXData; + + if (!theXData) { + theXData = new DummyPlotData (inYData->GetRealPlotData ()->size ()); + } + LegendData *theLegendData = inLegendData; + DataDrawerBase *theDataDrawer = inDataDrawer; + if (!theLegendData) { + theLegendData = new LegendData (); + if (inIndex >= 0 && inIndex < mYDataList.size () ) { + *theLegendData = *mLegendDataList[inIndex]; // copy old values... + } else { + theLegendData->SetDefaultValues (mLegendDataList.size ()); + } + } + if (!theDataDrawer) { + theDataDrawer = new LineDataDrawer (); + } + PlotDataSelection *thePlotDataSelection = inPlotDataSelection; + if (!thePlotDataSelection) { + thePlotDataSelection = new PlotDataSelection (inYData->GetSize ()); + // thePlotDataSelection = new PlotDataSelection (); + } + if (inIndex >= 0 && inIndex < mYDataList.size () ) { + delete mXDataList[inIndex]; + delete mYDataList[inIndex]; + delete mLegendDataList[inIndex]; + delete mDataDrawerList[inIndex]; + delete mPlotDataSelectionList[inIndex]; + + mXDataList[inIndex] = theXData; + mYDataList[inIndex] = inYData; + mLegendDataList[inIndex] = theLegendData; + mDataDrawerList[inIndex] = theDataDrawer; + mPlotDataSelectionList[inIndex] = thePlotDataSelection; + } else { // add at end + mXDataList.push_back (theXData); + mYDataList.push_back (inYData); + mLegendDataList.push_back (theLegendData); + mDataDrawerList.push_back (theDataDrawer); + mPlotDataSelectionList.push_back (thePlotDataSelection); + } +} + +bool PlotDataContainer::SetDataDrawer (int inIndex, DataDrawerBase* inDataDrawer) { + if (inIndex < 0 || inIndex >= mYDataList.size () ) { + return false; + } + DataDrawerBase* theDataDrawer = inDataDrawer; + if (!inDataDrawer) { + theDataDrawer = new LineDataDrawer; + } + delete mDataDrawerList[inIndex]; + mDataDrawerList[inIndex] = theDataDrawer; + return true; +} + +int PlotDataContainer::GetPlotIndexByName (const string &inName) const { + + if (CheckState ()) { + for (int theI=0;theImName == inName) { + return theI; + } + } + } + return -1; +} + + +bool PlotDataContainer::CalculateXRange (float &outXMin, float &outXMax) const { + bool theFirst = true; + outXMin = 0; + outXMax = 0; + for (PlotDataList::const_iterator theI=mXDataList.begin();theI!=mXDataList.end ();theI++) { + PlotDataBase *theXDataBase = *theI; + if (!theXDataBase) { + return false; + } + if (theXDataBase->GetSize () == 0) { + continue; + } + float theXMin; + float theXMax; + if (!theXDataBase->CalculateRange (theXMin, theXMax)) { + return false; + } + if (theXMax < theXMin) { + return false; + } + if (theFirst) { + outXMin = theXMin; + outXMax = theXMax; + theFirst = false; + } + if (theXMax>outXMax) { + outXMax = theXMax; + } + if (theXMinoutYMax) { + outYMax = theYMax; + } + + } + return true; +} + +bool PlotDataContainer::CalculateYRangePlot (float inXMin, float inXMax, const PlotDataBase &inXData, const PlotDataBase &inYData, float &outYMin, float &outYMax) const { + outYMin = 0; + outYMax = 0; + bool initialized = false; + + if (inXData.GetSize () != inYData.GetSize ()) { + return false; + } + + for (long theI = 0; theI < inXData.GetSize (); theI++) { + float theX = inXData.GetValue (theI); + float theY = inYData.GetValue (theI); + + if (theX>=inXMin && theX <= inXMax) { + if (!initialized) { + initialized = true; + outYMin = theY; + outYMax = theY; + } else { + if (theYoutYMax) { + outYMax = theY; + } + } + } + } + return true; +} + +bool PlotDataContainer::CheckState () const { + long theSize1 = mXDataList.size (); + long theSize2 = mYDataList.size (); + long theSize3 = mLegendDataList.size (); + long theSize4 = mDataDrawerList.size (); + long theSize5 = mPlotDataSelectionList.size (); + if (theSize1!=theSize2 || theSize1!=theSize3 || theSize1!=theSize4 || theSize1!=theSize5) { + return false; + } + return true; +} + +float LinTrafo::Transform (float inValue) const { + return inValue * mSlope + mOffset; +} +float LinTrafo::TransformBack (float inValue) const { + if (mSlope != 0) { + return (inValue - mOffset) / mSlope; + } else { + return 0; + } +} + + +float LogTrafo::Transform (float inValue) const{ + if (inValuemMin; + float theMajorTickSpan = mAxisSetup->mTickInfo.mMajorTickSpan; + int theDiv = mAxisSetup->mTickInfo.mTickDivision; + mDelta = theMajorTickSpan/theDiv; + mCount = ceil (theMin/mDelta); + mCurrentTick = mCount*mDelta; + + mFormatString = mAxisSetup->mTickInfo.mFormatString; + + return true; + +} + +bool LinTickIterator::GetNextTick (float &outTick, bool &outIsMajorTick, string &outFormatString) { + if (!mAxisSetup) { + return false; + } + if (mCurrentTick>mAxisSetup->mMax*kLittleIncrease) { + return false; + } + outTick = mCurrentTick; + outIsMajorTick = (mCount%mAxisSetup->mTickInfo.mTickDivision == 0); + outFormatString = mFormatString; + + mCurrentTick += mDelta; + mCount++; + return true; +} + +bool LinTickIterator::InitFromRanges (float inParRange, float inOrthoScreenRange, float inDivGuess, TickInfo &ioTickInfo) const { + if (inDivGuess <= kFloatSmall) { + return false; + } + float thePreferredSpan = TickInfo::RoundSpan (inParRange/inDivGuess); + if (thePreferredSpan < 0) { + return false; + } + + float thePreferredNrOfTicks = inParRange/thePreferredSpan; + if (thePreferredNrOfTicks <1) { + ioTickInfo.mMajorTickSpan = inParRange; + } + else { + ioTickInfo.mMajorTickSpan = thePreferredSpan; + } + + ioTickInfo.mTickDivision = 5; + if (ioTickInfo.mAutoTickSize) { + ioTickInfo.mMinorTickScreenSize = PMax (kMinMinorTickScreenSize, PPlot::Round (inOrthoScreenRange*kRelMinorTickSize)); + ioTickInfo.mMajorTickScreenSize = PMax (ioTickInfo.mMinorTickScreenSize+1, PPlot::Round (inOrthoScreenRange*kRelMajorTickSize)); + } + + TickInfo::MakeFormatString (ioTickInfo.mMajorTickSpan, ioTickInfo.mFormatString); + return true; +} + +bool LogTickIterator::Init () { + if (!mAxisSetup) { + return false; + } + + float theMin = mAxisSetup->mMin; + // float theMax = mAxisSetup->mMax; + float theMajorTickSpan = mAxisSetup->mTickInfo.mMajorTickSpan; + int theDiv = mAxisSetup->mTickInfo.mTickDivision; + mDelta = theMajorTickSpan/theDiv; + float theBase = mAxisSetup->mLogBase; + long theLogFac = 1;//mAxisSetup->mLogFactor; + long thePowMin = (long)floor(SafeLog(theMin, theBase, theLogFac)); + mCurrentTick = SafeExp (thePowMin, theBase, theLogFac); + mCount = 0; + + // walk to the first tick + + if (theMin<=0) { + return false; + // error + } + else { + // walk forward + float theNext = mCurrentTick+mDelta*SafeExp (thePowMin, theBase, theLogFac); + while (theNext<=theMin*kLittleDecrease) { + mCurrentTick = theNext; + theNext += mDelta*SafeExp (thePowMin,theBase, theLogFac); + mCount++; + } + } + return true; +} + +bool LogTickIterator::InitFromRanges (float inParRange, float inOrthoScreenRange, float inDivGuess, TickInfo &ioTickInfo) const { + if (inDivGuess<=kFloatSmall) { + return false; + } + /* + float thePreferredSpan = TickInfo::RoundSpan (inParRange/inDivGuess); + float thePreferredNrOfTicks = inParRange/thePreferredSpan; + if (thePreferredNrOfTicks <1) { + ioTickInfo.mMajorTickSpan = inParRange; + } + else { + ioTickInfo.mMajorTickSpan = thePreferredSpan; + } + */ + float theBase = mAxisSetup->mLogBase; + ioTickInfo.mMajorTickSpan = theBase-1;// relative + + ioTickInfo.mTickDivision = PPlot::Round (ioTickInfo.mMajorTickSpan); + ioTickInfo.mMinorTickScreenSize = PMax (kMinMinorTickScreenSize, PPlot::Round (inOrthoScreenRange*kRelMinorTickSize)); + ioTickInfo.mMajorTickScreenSize = PMax (ioTickInfo.mMinorTickScreenSize+1, PPlot::Round (inOrthoScreenRange*kRelMajorTickSize)); + + ioTickInfo.mFormatString = "%.1e"; + return true; +} + +bool LogTickIterator::GetNextTick (float &outTick, bool &outIsMajorTick, string &outFormatString) { + if (!mAxisSetup) { + return false; + } + if (mCurrentTick>mAxisSetup->mMax*kLittleIncrease) { + return false; + } + outTick = mCurrentTick; + outIsMajorTick = (mCount%mAxisSetup->mTickInfo.mTickDivision == 0); + TickInfo::MakeFormatString (outTick, outFormatString); + float theBase = mAxisSetup->mLogBase; + float theLogFac = 1;//mAxisSetup->mLogFactor; + float theLogNow = SafeLog(mCurrentTick, theBase, theLogFac); + int thePowNow = (int)floor(theLogNow); + outIsMajorTick = false; + if (fabs (theLogNow-thePowNow)mLogFactor>1) { + char theBuf[128]; + sprintf (theBuf, "%d", thePowNow*20); + outFormatString = theBuf; + } + + mCurrentTick += mDelta*SafeExp (thePowNow, theBase, theLogFac); + mCount++; + + return true; +} + +bool LogTickIterator::AdjustRange (float &ioMin, float &ioMax) const { + + float theBase = mAxisSetup->mLogBase; + long theLogFac = 1;//mAxisSetup->mLogFactor; + if (mAxisSetup->mMaxDecades > 0) { + ioMin = ioMax/SafeExp (mAxisSetup->mMaxDecades, theBase, theLogFac); + } + if (ioMin == 0 && ioMax == 0) { + ioMin = kLogMinClipValue; + ioMax = 1.0f; + } + if (ioMin <= 0 || ioMax<=0) { + return false; + } + ioMin = RoundDown (ioMin*kLittleIncrease); + ioMax = RoundUp (ioMax*kLittleDecrease); + + if (ioMinmMaxDecades > 0) { + ioMin = ioMax/SafeExp (mAxisSetup->mMaxDecades, theBase, theLogFac); + } + return true; +} + +float LogTickIterator::RoundUp (float inFloat) const { + float theBase = mAxisSetup->mLogBase; + float theLogFac = 1;//mAxisSetup->mLogFactor; + int thePow = (int)ceil(SafeLog(inFloat, theBase, theLogFac)); + return pow (theBase, thePow); +} + +float LogTickIterator::RoundDown (float inFloat) const { + float theBase = mAxisSetup->mLogBase; + long theLogFac = 1;//mAxisSetup->mLogFactor; + int thePow = (int)floor(SafeLog(inFloat,theBase, theLogFac)); + return pow (theBase, thePow); +} + +bool NamedTickIterator::GetNextTick (float &outTick, bool &outIsMajorTick, string &outFormatString) { + if (LinTickIterator::GetNextTick (outTick, outIsMajorTick, outFormatString)) { + int theIndex = PPlot::Round (outTick); + + // TO DO: improve this + if (fabs(outTick - (float)theIndex) > 0.1 ) { + outFormatString = ""; + return true; + } + + if (theIndex>=0 && theIndex < (int)mStringList.size ()) { + outFormatString = mStringList[theIndex]; + return true; + } + } + return false; +} + +bool NamedTickIterator::InitFromRanges (float inParRange, float inOrthoScreenRange, float inDivGuess, TickInfo &outTickInfo) const { + if (LinTickIterator::InitFromRanges (inParRange, inOrthoScreenRange, inDivGuess, outTickInfo)) { + outTickInfo.mTickDivision = 1; + return true; + } + return false; +} + +bool PainterTester::Draw (Painter &inPainter) { + + const char * theString = "The quick brown fox..."; + int theWidth = inPainter.CalculateTextDrawSize (theString); + int theOffset = theWidth/10; + + // a horizontal lines + int theHAscent_x = theOffset+2*inPainter.GetFontHeight (); + int theHAscent_y = 10; + int theHAscent_w = theWidth; + inPainter.DrawLine (theHAscent_x, theHAscent_y, theHAscent_x+theHAscent_w, theHAscent_y); + + int theHDescent_x = theHAscent_x; + int theHDescent_y = theHAscent_y+inPainter.GetFontHeight (); + int theHDescent_w = theHAscent_w; + inPainter.DrawLine (theHDescent_x, theHDescent_y, theHDescent_x+theHDescent_w, theHDescent_y); + + // a vertical lines + int theVAscent_x = theOffset; + int theVAscent_y = theHAscent_y+theWidth; + int theVAscent_h = -theWidth; + inPainter.DrawLine (theVAscent_x, theVAscent_y, theVAscent_x, theVAscent_y+theVAscent_h); + + int theVDescent_x = theVAscent_x+inPainter.GetFontHeight (); + int theVDescent_y = theVAscent_y; + int theVDescent_h = theVAscent_h; + inPainter.DrawLine (theVDescent_x, theVDescent_y, theVDescent_x, theVDescent_y+theVDescent_h); + + // Draw vertical text, followed by horizontal. +#ifdef _IUP_PPLOT_ /* M.T. - the alignment of the text is simply requested */ + inPainter.DrawRotatedText (theVDescent_x, theVDescent_y, -90, PPLOT_NORTH_WEST, theString); + inPainter.DrawText (theHDescent_x, theHDescent_y, PPLOT_NORTH_WEST, theString); +#else + inPainter.DrawRotatedText (theVDescent_x, theVDescent_y, -90, theString); + inPainter.DrawText (theHDescent_x, theHDescent_y, theString); +#endif + + return true; +} + +PPlot::PPlot (): + mShowLegend(true), // M.T. - show|hide legend + mLegendPos(PPLOT_TOPRIGHT), + mXTrafo (&mXLinTrafo), + mYTrafo (&mYLinTrafo), + mXTickIterator (&mXLinTickIterator), + mYTickIterator (&mYLinTickIterator), + mPPlotDrawer (0), + mOwnsPPlotDrawer (true), + mHasAnyModifyingCalculatorBeenActive (false) +{ + mMargins = kDefaultMargins; + mYAxisSetup.mAscending = false; +} + +PPlot::~PPlot () { + if (mOwnsPPlotDrawer) { + delete mPPlotDrawer; + } + mPPlotDrawer = 0; +} + +bool PPlot::Draw (Painter &inPainter) { + PRect theRect; + theRect.mX = mMargins.mLeft; + theRect.mY = mMargins.mTop; + theRect.mW = inPainter.GetWidth () - mMargins.mLeft - mMargins.mRight; + theRect.mH = inPainter.GetHeight () - mMargins.mTop - mMargins.mBottom; + + if (mPPlotDrawer) { + mPPlotDrawer->Prepare (inPainter, *this); + return mPPlotDrawer->Draw (inPainter); + } + if (!mPlotDataContainer.GetPlotCount ()) { + return true; + } + + if (!ConfigureSelf ()) { + return false; + } + bool theShouldRepeat = true; + long theRepeatCount = 0; + + while (theShouldRepeat && theRepeatCount<2) { + theRepeatCount++; + + if (!ValidateData ()) { + return false; + } + + if (!CalculateAxisRanges ()) { + return false; + } + + if (!this->CheckRange (mXAxisSetup)) { + return false; + } + + if (!this->CheckRange (mYAxisSetup)) { + return false; + } + + if (!CalculateTickInfo (theRect, inPainter)) { + return false; + } + + if (!CalculateXTransformation (theRect)) { + return false; + } + + if (!CalculateYTransformation (theRect)) { + return false; + } + if (theRepeatCount>1) { + break; + } + // hooks for some final calculations + bool theShouldRepeat = false; + for (PCalculator::tList::iterator theModifyingC=mModifyingCalculatorList.begin ();theModifyingC!=mModifyingCalculatorList.end();theModifyingC++) { + PCalculator *theModifyingCalculator = *theModifyingC; + if (theModifyingCalculator->ShouldCalculate ()) { + theShouldRepeat = true; + theModifyingCalculator->Calculate (inPainter, *this); + mHasAnyModifyingCalculatorBeenActive = true; + } + } +// theShouldRepeat = mModifyingCalculatorList.size ()>0; + } + + // hooks for some final calculations + for (PCalculator::tList::iterator thePostC=mPostCalculatorList.begin ();thePostC!=mPostCalculatorList.end();thePostC++) { + PCalculator *thePostCalculator = *thePostC; + thePostCalculator->Calculate (inPainter, *this); + } + + for (PDrawer::tList::iterator thePre1=mPreDrawerList.begin();thePre1!=mPreDrawerList.end ();thePre1++) { + PDrawer *thePreDrawer = *thePre1; + thePreDrawer->Prepare (inPainter, *this); + } + + // Drawing ! + + inPainter.SetLineColor (0,0,0); + inPainter.SetClipRect (0, 0, inPainter.GetWidth (), inPainter.GetHeight ()); + + // draw entire background, including the margins (for scrolling...) + PRect fullRect; + fullRect.mX = 0; + fullRect.mY = 0; + fullRect.mW = inPainter.GetWidth (); + fullRect.mH = inPainter.GetHeight (); + if (!DrawPlotBackground (fullRect, inPainter)) { + return false; + } + + for (PDrawer::tList::iterator thePre=mPreDrawerList.begin ();thePre!=mPreDrawerList.end();thePre++) { + PDrawer *thePreDrawer = *thePre; + thePreDrawer->Draw (inPainter); + } + + + if (!DrawGridXAxis (theRect, inPainter)) { + return false; + } + + if (!DrawGridYAxis (theRect, inPainter)) { + return false; + } + + if (!DrawXAxis (theRect, inPainter)) { + return false; + } + + if (!DrawYAxis (theRect, inPainter)) { + return false; + } + + // clip the plotregion while drawing plots + inPainter.SetClipRect (theRect.mX, theRect.mY, theRect.mW, theRect.mH); + + for (int theI=0;theIDraw (inPainter); + } + + return true; +} + +void PPlot::SetPPlotDrawer (PDrawer *inPDrawer) { + if (mOwnsPPlotDrawer) { + delete mPPlotDrawer;// delete (if any) + } + mOwnsPPlotDrawer = true; + mPPlotDrawer = inPDrawer; +} + +void PPlot::SetPPlotDrawer (PDrawer &inPDrawer) { + mOwnsPPlotDrawer = false; + mPPlotDrawer = &inPDrawer; +} + +bool PPlot::DrawPlotBackground (const PRect &inRect, Painter &inPainter) const { + if (!mPlotBackground.mTransparent) { + PColor theC = mPlotBackground.mPlotRegionBackColor; + inPainter.SetFillColor (theC.mR, theC.mG, theC.mB); + inPainter.FillRect (inRect.mX, inRect.mY, inRect.mW, inRect.mH); + } +#ifndef _IUP_PPLOT_ + string theTitle = mPlotBackground.mTitle; + if (theTitle.size ()>0) { + int theW = inPainter.CalculateTextDrawSize (theTitle.c_str()); + int theX = inRect.mX + (inRect.mW-theW)/2; + int theY = inRect.mY + mMargins.mTop; + inPainter.DrawText (theX, theY, theTitle.c_str ()); + } +#endif + return true; +} + +#ifdef _IUP_PPLOT_ +bool PPlot::DrawPlotTitle(const PRect &inRect, Painter &inPainter) const { + if (mPlotBackground.mTitle.size ()>0) { + inPainter.SetStyle (mPlotBackground.mStyle); + int theX = inRect.mX + inRect.mW/2; + int theY = inRect.mY + 5; // do not depend on margin + PColor theC = mPlotBackground.mPlotRegionBackColor; + inPainter.SetFillColor (theC.mR, theC.mG, theC.mB); + int textSize = inPainter.CalculateTextDrawSize(mPlotBackground.mTitle.c_str()); + inPainter.FillRect (theX-textSize/2-3, theY, textSize+6, inPainter.GetFontHeight()+3); + theC = mPlotBackground.mTitleColor; + inPainter.SetFillColor (theC.mR, theC.mG, theC.mB); + inPainter.DrawText (theX, theY, PPLOT_NORTH, mPlotBackground.mTitle.c_str()); + } + return true; +} +#endif + +bool PPlot::DrawGridXAxis (const PRect &inRect, Painter &inPainter) const { + + // ticks + inPainter.SetStyle (mXAxisSetup.mTickInfo.mStyle); + if (!mXTickIterator->Init ()) { + return false; + } + + float theX; + bool theIsMajorTick; + string theFormatString; + +/* M.T. - modified to allow customisation + inPainter.SetFillColor (200,200,200); + inPainter.SetLineColor (200,200,200); +*/ + inPainter.SetLineColor(mGridInfo.mGridColor.mR, + mGridInfo.mGridColor.mG, + mGridInfo.mGridColor.mB); + inPainter.SetStyle (mGridInfo.mStyle); + + // draw gridlines + if (mGridInfo.mXGridOn) { + while (mXTickIterator->GetNextTick (theX, theIsMajorTick, theFormatString)) { + + if (theIsMajorTick && mGridInfo.mXGridOn) { + float theScreenX = mXTrafo->Transform(theX); + inPainter.DrawLine (theScreenX, inRect.mY, theScreenX, inRect.mY + inRect.mH); + } + } + } + + return true; +} + +bool PPlot::DrawGridYAxis (const PRect &inRect, Painter &inPainter) const { + + // ticks + inPainter.SetStyle (mYAxisSetup.mTickInfo.mStyle); + if (!mYTickIterator->Init ()) { + return false; + } + + float theY; + bool theIsMajorTick; + string theFormatString; + PRect theTickRect; + +/* M.T. - modified to allow customisation + inPainter.SetFillColor (200,200,200); + inPainter.SetLineColor (200,200,200); +*/ + inPainter.SetLineColor(mGridInfo.mGridColor.mR, + mGridInfo.mGridColor.mG, + mGridInfo.mGridColor.mB); + inPainter.SetStyle (mGridInfo.mStyle); + + // draw gridlines + if (mYAxisSetup.mTickInfo.mTicksOn) { + while (mYTickIterator->GetNextTick (theY, theIsMajorTick, theFormatString)) { + + if (theIsMajorTick && mGridInfo.mYGridOn) { + float theScreenY = mYTrafo->Transform(theY); + inPainter.DrawLine (inRect.mX, theScreenY, inRect.mX + inRect.mW, theScreenY); + } + } + } + + return true; +} + +#ifdef _IUP_PPLOT_ +static void DrawArrow(Painter &inPainter, float rx, float ry, int vert, int ascen, int size) +{ + int x = (int)(rx + 0.5); + int y = (int)(ry + 0.5); + size += 2; // to avoid too small sizes + int size2 = (int)(size*0.7f + 0.5); + if (vert) + { + y-=ascen*size; + inPainter.DrawLine(x, y, x, y+ascen*size); + + int y2 = y+ascen*size2; + inPainter.FillArrow(x, y, x-size2, y2, x+size2, y2); + } + else + { + x+=ascen*size; + inPainter.DrawLine(x, y, x-ascen*size, y); + + int x2 = x-ascen*size2; + inPainter.FillArrow(x, y, x2, y-size2, x2, y+size2); + } +} +#endif + +bool PPlot::DrawXAxis (const PRect &inRect, Painter &inPainter) const { + inPainter.SetStyle (mXAxisSetup.mStyle); + + float theX1 = inRect.mX; + float theY1; + float theTargetY = 0; + if (!mXAxisSetup.mCrossOrigin) { + if (mYAxisSetup.mAscending) { + theTargetY = mYAxisSetup.mMax; + } else { + theTargetY = mYAxisSetup.mMin; + } + } + theY1 = mYTrafo->Transform (theTargetY); + + inPainter.SetLineColor(mXAxisSetup.mColor.mR, + mXAxisSetup.mColor.mG, + mXAxisSetup.mColor.mB); + + // x-axis + float theX2 = theX1+inRect.mW; + float theY2 = theY1; + inPainter.DrawLine (theX1, theY1, theX2, theY2); + +#ifdef _IUP_PPLOT_ + if (mXAxisSetup.mAscending) + DrawArrow(inPainter, theX2, theY2, 0, 1, mXAxisSetup.mTickInfo.mMinorTickScreenSize); + else + DrawArrow(inPainter, theX1, theY1, 0, -1, mXAxisSetup.mTickInfo.mMinorTickScreenSize); +#endif + + // ticks + inPainter.SetStyle (mXAxisSetup.mTickInfo.mStyle); + if (!mXTickIterator->Init ()) { + return false; + } + + float theX; + bool theIsMajorTick; + string theFormatString; + + int theYMax = 0; + PRect theTickRect; + PRect theRect = inRect; + + if (mXAxisSetup.mTickInfo.mTicksOn) { + while (mXTickIterator->GetNextTick (theX, theIsMajorTick, theFormatString)) { + if (!DrawXTick (theX, theY1, theIsMajorTick, theFormatString, inPainter, theTickRect)) { + return false; + } + + if (theTickRect.mY+theTickRect.mH>theYMax) { + theYMax = theTickRect.mY+theTickRect.mH; + } + } + } + + if (theYMax>theRect.mY+theRect.mH) { + theRect.mH = theYMax-theRect.mY; + } + +#ifdef _IUP_PPLOT_ /* M.T. - the alignment of the text is simply requested */ + if (mXAxisSetup.mLabel.size ()>0) { + inPainter.SetStyle (mXAxisSetup.mStyle); + int theY = theRect.mY + theRect.mH + 3*inPainter.GetFontHeight()/2; + if (mXAxisSetup.mLabelCentered) + { + int theX = theRect.mX + theRect.mW/2; + inPainter.DrawText (theX, theY, PPLOT_NORTH, mXAxisSetup.mLabel.c_str ()); + } + else + { + int theX = theRect.mX + theRect.mW; + inPainter.DrawText (theX, theY, PPLOT_NORTH_EAST, mXAxisSetup.mLabel.c_str ()); + } + } +#else + inPainter.SetStyle (mXAxisSetup.mStyle); + string theLabel = mXAxisSetup.mLabel; + if (theLabel.size ()>0) { + int theW = inPainter.CalculateTextDrawSize (theLabel.c_str ()); + int theX = theRect.mX + (theRect.mW-theW)/2; + int theY = 1 + theRect.mY + theRect.mH + inPainter.GetFontHeight (); // M.T. was too close to ticks + inPainter.DrawText (theX, theY, theLabel.c_str ()); + } +#endif + return true; +} + +bool PPlot::DrawXTick (float inX, int inScreenY, bool inMajor, const string &inFormatString, Painter &inPainter, PRect &outRect) const{ + char theBuf[128]; + int theTickSize; + float theScreenX = mXTrafo->Transform(inX); + outRect.mX = theScreenX; + outRect.mY = inScreenY; + outRect.mW = 0; + if (inMajor) { + theTickSize = mXAxisSetup.mTickInfo.mMajorTickScreenSize; + sprintf (theBuf, inFormatString.c_str (), inX); +#ifdef _IUP_PPLOT_ /* M.T. - the alignment of the text is simply requested */ + outRect.mH = theTickSize + mXAxisSetup.mTickInfo.mMinorTickScreenSize; + inPainter.DrawText (theScreenX, inScreenY+outRect.mH, PPLOT_NORTH, theBuf); +#else + outRect.mH = inPainter.GetFontHeight () + theTickSize + + mXAxisSetup.mTickInfo.mMinorTickScreenSize; + inPainter.DrawText (theScreenX, inScreenY+outRect.mH, theBuf); +#endif + } + else { + theTickSize = mXAxisSetup.mTickInfo.mMinorTickScreenSize; + outRect.mH = theTickSize; + } + + inPainter.DrawLine (theScreenX, inScreenY,theScreenX, inScreenY+theTickSize); + return true; +} + +bool PPlot::DrawYAxis (const PRect &inRect, Painter &inPainter) const { + inPainter.SetStyle (mYAxisSetup.mStyle); + float theX1; + float theTargetX = 0; + if (!mYAxisSetup.mCrossOrigin) { + if (mXAxisSetup.mAscending) { + theTargetX = mXAxisSetup.mMin; + } + else { + theTargetX = mXAxisSetup.mMax; + } + } + if (mXAxisSetup.mDiscrete) + theTargetX -= 0.5; + + theX1 = mXTrafo->Transform (theTargetX); + + int theY1 = inRect.mY; + float theX2 = theX1; + int theY2 = theY1+inRect.mH; + + inPainter.SetLineColor(mYAxisSetup.mColor.mR, + mYAxisSetup.mColor.mG, + mYAxisSetup.mColor.mB); + + // draw y axis + inPainter.DrawLine (theX1, theY1, theX2, theY2); + +#ifdef _IUP_PPLOT_ + if (mYAxisSetup.mAscending) + DrawArrow(inPainter, theX2, theY2, 1, -1, mYAxisSetup.mTickInfo.mMinorTickScreenSize); + else + DrawArrow(inPainter, theX1, theY1, 1, 1, mYAxisSetup.mTickInfo.mMinorTickScreenSize); +#endif + + // ticks + inPainter.SetStyle (mYAxisSetup.mTickInfo.mStyle); + if (!mYTickIterator->Init ()) { + return false; + } + + float theY; + bool theIsMajorTick; + string theFormatString; + PRect theTickRect; + PRect theRect = inRect; + + if (mYAxisSetup.mTickInfo.mTicksOn) { + while (mYTickIterator->GetNextTick (theY, theIsMajorTick, theFormatString)) { + if (!DrawYTick (theY, theX1, theIsMajorTick, theFormatString, inPainter, theTickRect)) { + return false; + } + + if (theTickRect.mX < theRect.mX) { + theRect.mX = theTickRect.mX; + } + } + } + + // draw label +#ifdef _IUP_PPLOT_ /* M.T. - the alignment of the text is simply requested */ + if (mYAxisSetup.mLabel.size ()>0) { + inPainter.SetStyle (mYAxisSetup.mStyle); + int theX = theRect.mX - 3*inPainter.GetFontHeight()/2; + if (mYAxisSetup.mLabelCentered) + { + int theY = theRect.mY + theRect.mH/2; + inPainter.DrawRotatedText (theX, theY, -90, PPLOT_NORTH, mYAxisSetup.mLabel.c_str ()); + } + else + { + int theY = theRect.mY; + inPainter.DrawRotatedText (theX, theY, -90, PPLOT_NORTH_EAST, mYAxisSetup.mLabel.c_str ()); + } + } +#else + inPainter.SetStyle (mYAxisSetup.mStyle); + string theLabel = mYAxisSetup.mLabel; + if (theLabel.size ()>0) { + int theW = inPainter.CalculateTextDrawSize (theLabel.c_str ()); + int theX = theRect.mX - 1; // M.T. - was too close to ticks + int theY = theRect.mY + theRect.mH - (theRect.mH-theW)/2; + inPainter.DrawRotatedText (theX, theY, -90, theLabel.c_str ()); + } +#endif + + return true; +} + +bool PPlot::DrawYTick (float inY, int inScreenX, bool inMajor, const string &inFormatString, Painter &inPainter, PRect &outRect) const { + char theBuf[128]; + int theTickSize; + float theScreenY = mYTrafo->Transform(inY); + outRect.mX = inScreenX; + outRect.mY = theScreenY; + outRect.mW = 0;// not used + outRect.mH = 0;// not used + if (inMajor) { + theTickSize = mYAxisSetup.mTickInfo.mMajorTickScreenSize; + sprintf (theBuf, inFormatString.c_str (), inY); +#ifdef _IUP_PPLOT_ /* M.T. - the alignment of the text is simply requested */ + outRect.mX -= (theTickSize + mYAxisSetup.mTickInfo.mMinorTickScreenSize); + inPainter.DrawText (outRect.mX, theScreenY, PPLOT_EAST, theBuf); + outRect.mX -= inPainter.CalculateTextDrawSize (theBuf); // update the position +#else + int theStringWidth = inPainter.CalculateTextDrawSize (theBuf); + outRect.mX -= (theStringWidth+theTickSize+mYAxisSetup.mTickInfo.mMinorTickScreenSize); + int theHalfFontHeight = inPainter.GetFontHeight ()/2;// for sort of vertical centralizing + inPainter.DrawText (outRect.mX, theScreenY+theHalfFontHeight, theBuf); +#endif + + } + else { + theTickSize = mYAxisSetup.mTickInfo.mMinorTickScreenSize; + outRect.mX -= theTickSize; + } + + inPainter.DrawLine (inScreenX, theScreenY, inScreenX-theTickSize, theScreenY); + return true; +} + +#ifdef _IUP_PPLOT_ +static void DrawRect(Painter &inPainter, int inX, int inY, int inW, int inH) +{ + inPainter.DrawLine(inX, inY, inX+inW-1, inY); + inPainter.DrawLine(inX+inW-1, inY, inX+inW-1, inY+inH-1); + inPainter.DrawLine(inX+inW-1, inY+inH-1, inX, inY+inH-1); + inPainter.DrawLine(inX, inY+inH-1, inX, inY); +} + +bool PPlot::DrawLegend (const PRect &inRect, Painter &inPainter) const { + PColor theC; + int theI; + + int theHeight = inPainter.GetFontHeight(); + int margin = theHeight/2; + int plotCount = mPlotDataContainer.GetPlotCount(); + int totalHeight = plotCount*(1.2*theHeight) - 0.2*theHeight + 2*margin; + + int maxWidth = 0; + for (theI=0; theImShow) { + inPainter.SetStyle (theLegendData->mStyle); + int size = inPainter.CalculateTextDrawSize(theLegendData->mName.c_str()); + + const DataDrawerBase* drawer = mPlotDataContainer.GetConstDataDrawer(theI); + if (drawer->mHasMarks) + { + LineDataDrawer* linedrawer = (LineDataDrawer*)drawer; + if (linedrawer->mDrawPoint) + size += linedrawer->mStyle.mMarkSize+8; + } + + if (size > maxWidth) + maxWidth = size; + } + } + + if (maxWidth == 0) + return false; + + maxWidth += 2*margin; + + int theX = inRect.mX; + int theY = inRect.mY; + + switch (mLegendPos) + { + case PPLOT_TOPLEFT: + theX += 2; + theY += 2; + break; + case PPLOT_BOTTOMLEFT: + theX += 2; + theY += inRect.mH - totalHeight - 2; + break; + case PPLOT_BOTTOMRIGHT: + theX += inRect.mW - maxWidth - 2; + theY += inRect.mH - totalHeight - 2; + break; + default: // PPLOT_TOPRIGHT + theX += inRect.mW - maxWidth - 2; + theY += 2; + break; + } + + theC = mPlotBackground.mPlotRegionBackColor; + inPainter.SetFillColor (theC.mR, theC.mG, theC.mB); + inPainter.FillRect(theX, theY, maxWidth, totalHeight); + inPainter.SetLineColor (theC.mR/1.5, theC.mG/1.5, theC.mB/1.5); + DrawRect(inPainter, theX, theY, maxWidth, totalHeight); + + for (theI=0; theImShow) { + theC = theLegendData->mColor; + inPainter.SetLineColor (theC.mR, theC.mG, theC.mB); + + int X = theX + margin; + int Y = theY + theI*(theHeight*1.2) + margin; + + int mark_size = 0; + const DataDrawerBase* drawer = mPlotDataContainer.GetConstDataDrawer(theI); + if (drawer->mHasMarks) + { + LineDataDrawer* linedrawer = (LineDataDrawer*)drawer; + if (linedrawer->mDrawPoint) + { + mark_size = linedrawer->mStyle.mMarkSize+8; + inPainter.SetStyle (linedrawer->mStyle); + linedrawer->DrawPoint(X+mark_size/2, Y+3*inPainter.GetFontHeight()/4, inRect, inPainter); + } + } + + inPainter.SetStyle (theLegendData->mStyle); + inPainter.DrawText (X+mark_size, Y, PPLOT_NORTH_WEST, theLegendData->mName.c_str ()); + } + } + return true; +} +#else +bool PPlot::DrawLegend (const PRect &inRect, Painter &inPainter) const { + const int kXoffsetLegend(20); + + for (int theI=0; theImStyle); + theC = theLegendData->mColor; + if (theLegendData->mShow) { + theText = theLegendData->mName; + } + } + inPainter.SetLineColor (theC.mR, theC.mG, theC.mB); + + // cut legend if it doesn't fit in plot + int theSize (0); + if (inPainter.CalculateTextDrawSize (theText.c_str ()) >= inRect.mW - kXoffsetLegend) { + theText.insert(0, "..."); + while (inPainter.CalculateTextDrawSize (theText.c_str ()) >= inRect.mW - kXoffsetLegend) { + theSize = theText.size (); + // display dots and at least 3 characters + if (theSize >= 9) { + theText.erase (3, 3); + } + else if (theSize >= 7) { + theText.erase (3, theSize - 6); + } else { + // keep dots only + theText.erase (3, theSize - 3); + break; + } + } + } + + int theHeight = inPainter.GetFontHeight (); + int theX = inRect.mX + kXoffsetLegend; + int theY = inRect.mY + theI*(theHeight*2)+theHeight; + inPainter.DrawText (theX, theY, theText.c_str ()); + } + return true; +} +#endif + +static float GetMaxFromRange (const PlotDataBase &inData, long inStartIndex, long inEndIndex) { + float max = 0; + float fabsMax = 0; + for (long theI = inStartIndex; theI <= inEndIndex; theI++) { + if (theI == inStartIndex) { + max = inData.GetValue (theI); + fabsMax = fabs (max); + } + else { + float data = inData.GetValue (theI); + if (fabs (data) > fabsMax) { + max = data; + fabsMax = fabs (data); + } + } + } + + return max; +} + +static void FindRange (const PlotDataBase &inData, float inMin, float inMax, long& outStartIndex, long& outEndIndex) { + outStartIndex = 0; + while (outStartIndex < inData.GetSize () && inData.GetValue (outStartIndex) <= inMin) { + outStartIndex++; + } + + if (outStartIndex == inData.GetSize ()) { + outStartIndex = inData.GetSize () - 1; + outEndIndex = outStartIndex; + assert (outStartIndex>-1); + return; + } + + // We want the value at outStartIndex smaller than or equal to inMin + if (outStartIndex > 0) { + outStartIndex--; + } + + outEndIndex = outStartIndex; + while (outEndIndex < inData.GetSize () && inData.GetValue (outEndIndex) < inMax) { + outEndIndex++; + } + + if (outEndIndex == inData.GetSize ()) { + outEndIndex--; + } + assert (outStartIndex>-1); +} + +static void DrawValue(int theTraX, int theTraY, float theX, float theY, const PlotDataBase &inXData, const AxisSetup &inXAxisSetup, Painter &inPainter) +{ + char theBuf[128]; + string FormatString; + if (inXData.IsString()) + { + const StringPlotData *theStringXData = (const StringPlotData *)(&inXData); + FormatString = "(%s, " + inXAxisSetup.mTickInfo.mFormatString + ")"; + const StringData* stdata = theStringXData->GetStringData(); + sprintf (theBuf, FormatString.c_str(), (*stdata)[(int)theX].c_str(), theY); + } + else + { + FormatString = "(" + inXAxisSetup.mTickInfo.mFormatString + ", " + inXAxisSetup.mTickInfo.mFormatString + ")"; + sprintf (theBuf, FormatString.c_str(), theX, theY); + } + inPainter.DrawRotatedText (theTraX, theTraY-10, -45, PPLOT_WEST, theBuf); +} + +bool LineDataDrawer::DrawData (const PlotDataBase &inXData, const PlotDataBase &inYData, const PlotDataSelection &inPlotDataSelection, const AxisSetup &inXAxisSetup, const PRect &inRect, Painter &inPainter) const { + if (!mXTrafo || !mYTrafo) { + return false; + } + if ((inXData.GetSize () == 0) || (inYData.GetSize () == 0)) { + return false; + } + long theXSize = inXData.GetSize (); + long theYSize = inYData.GetSize (); + if (theXSize>theYSize) { + return false; + } + inPainter.SetStyle (mStyle); + float thePrevX = 0; + float thePrevY = 0; + bool theFirst = true; + float theTraX, theTraY; + + long theStart = 0; + long theEnd = inXData.GetSize () - 1; + int theStride = 1; + if (mDrawFast) { + FindRange (inXData, inXAxisSetup.mMin, inXAxisSetup.mMax, theStart, theEnd); + + theStride = (theEnd - theStart + 1) / inPainter.GetWidth (); + if (theStride == 0) { + theStride = 1; + } + } + + for (int theI = theStart; theI <= theEnd; theI+=theStride) { + + float theY; + float theX = inXData.GetValue (theI); + theTraX = mXTrafo->Transform (theX); + if (theStride > 1) { + long theLast = theI + theStride - 1; + if (theLast>theEnd) { + theLast = theEnd; + } + theY = GetMaxFromRange (inYData, theI, theLast); + } + else { + theY = inYData.GetValue (theI); + } + theTraY = mYTrafo->Transform (theY); + + if (!theFirst && mDrawLine) { + inPainter.DrawLine (thePrevX, thePrevY, theTraX, theTraY); + } + else { + theFirst = false; + } + bool theDrawPoint = mDrawPoint; + + if (theDrawPoint && !DrawPoint (theTraX, theTraY, inRect, inPainter)) { + return false; + } + if (inPlotDataSelection.IsSelected (theI) && !DrawSelection (theTraX, theTraY, inRect, inPainter)) { + return false; + } +#ifdef _IUP_PPLOT_ + if (mShowValues) + DrawValue(theTraX, theTraY, theX, theY, inXData, inXAxisSetup, inPainter); +#endif + thePrevX = theTraX; + thePrevY = theTraY; + } + return true; +} + +DataDrawerBase* LineDataDrawer::Clone () const { + return new LineDataDrawer (*this); +} + +bool LineDataDrawer::DrawPoint (int inScreenX, int inScreenY, const PRect &inRect, Painter &inPainter) const { + inPainter.DrawLine (inScreenX-5, inScreenY+5, inScreenX+5, inScreenY-5); + inPainter.DrawLine (inScreenX-5, inScreenY-5, inScreenX+5, inScreenY+5); + return true; +} + +bool LineDataDrawer::DrawSelection (int inScreenX, int inScreenY, const PRect &inRect, Painter &inPainter) const { +// inPainter.DrawLine (inScreenX-5, inScreenY+5, inScreenX+5, inScreenY-5); +// inPainter.DrawLine (inScreenX-5, inScreenY-5, inScreenX+5, inScreenY+5); + inPainter.FillRect (inScreenX-5, inScreenY-5, 10, 10); + return true; +} + +bool DotDataDrawer::DrawPoint (int inScreenX, int inScreenY, const PRect &inRect, Painter &inPainter) const { + inPainter.DrawLine (inScreenX, inScreenY, inScreenX + 1, inScreenY); + return true; +} + +bool BarDataDrawer::DrawData (const PlotDataBase &inXData, const PlotDataBase &inYData, const PlotDataSelection &inPlotDataSelection, const AxisSetup &inXAxisSetup, const PRect &inRect, Painter &inPainter) const { + if (!mXTrafo || !mYTrafo) { + return false; + } + if (inXData.GetSize ()>inYData.GetSize ()) { + return false; + } + if (!mPlotCount) { + return false; + } + if (mDrawOnlyLastPoint) { + return DrawOnlyLastPoint (inXData, inYData, inPlotDataSelection, inXAxisSetup, inRect, inPainter); + } + + int theTraX, theTraY; + int theTraY0 = mYTrafo->Transform (0); + + int theLeft, theTop, theWidth, theHeight; + + theWidth = inRect.mW/inXData.GetSize (); + theWidth *= 0.9f; + + for (long theI=0;theITransform (theX); + theTraY = mYTrafo->Transform (theY); + + theLeft = theTraX-theWidth/2; + theTop = theTraY; + theHeight = theTraY0-theTop; + + inPainter.FillRect (theLeft, theTop, theWidth, theHeight); + +#ifdef _IUP_PPLOT_ + if (mShowValues) + DrawValue(theTraX, theTraY, theX, theY, inXData, inXAxisSetup, inPainter); +#endif + } + return true; +} + + +bool BarDataDrawer::DrawOnlyLastPoint (const PlotDataBase &inXData, const PlotDataBase &inYData, const PlotDataSelection &inPlotDataSelection, const AxisSetup &inXAxisSetup, const PRect &inRect, Painter &inPainter) const { + + PRect theRect = inRect; + theRect.mW = inRect.mW / mPlotCount; + theRect.mX = inRect.mX + mPlotIndex * theRect.mW; + + int theTraX, theTraY; + int theTraY0 = mYTrafo->Transform (0); + + int theLeft, theTop, theWidth, theHeight; + + theWidth = theRect.mW; + + // only draw last point: + long theI = inXData.GetSize () - 1; + if (theI >= 0) { + theTraX = mXTrafo->Transform (inXData.GetValue (theI)); + theTraY = mYTrafo->Transform (inYData.GetValue (theI)); + + theLeft = theRect.mX; + theTop = theTraY; + theHeight = theTraY0-theTop; + + inPainter.FillRect (theLeft, theTop, theWidth, theHeight); + } + return true; +} + + +DataDrawerBase* BarDataDrawer::Clone () const { + return new BarDataDrawer (*this); +} + +bool PPlot::DrawPlot (int inIndex, const PRect &inRect, Painter &inPainter) const { + + if (inIndex>=mPlotDataContainer.GetPlotCount ()) { + return false; + } + + const PlotDataBase *theXData = mPlotDataContainer.GetConstXData (inIndex); + const PlotDataBase *theYData = mPlotDataContainer.GetConstYData (inIndex); + if (!theXData || !theYData) { + return false; + } + const LegendData *theLegendData = mPlotDataContainer.GetConstLegendData (inIndex); + PColor theC; + if (theLegendData) { + theC = theLegendData->mColor; + } + inPainter.SetLineColor (theC.mR, theC.mG, theC.mB); + inPainter.SetFillColor (theC.mR, theC.mG, theC.mB); + + const DataDrawerBase *theD = mPlotDataContainer.GetConstDataDrawer (inIndex); + if (!theD) { + return false; + } + const PlotDataSelection *thePlotDataSelection = mPlotDataContainer.GetConstPlotDataSelection (inIndex); + if (!thePlotDataSelection) { + return false; + } + + return theD->DrawData (*theXData, *theYData, *thePlotDataSelection, mXAxisSetup, inRect, inPainter); + } + +bool PPlot::ConfigureSelf () { + long thePlotCount = mPlotDataContainer.GetPlotCount (); + if (thePlotCount == 0) { + return false; + } + if (mXAxisSetup.mLogScale) { + mXTickIterator = &mXLogTickIterator; + mXTrafo = &mXLogTrafo; + mYAxisSetup.mCrossOrigin = false; + } + else { + const PlotDataBase *theGlue = mPlotDataContainer.GetConstXData (0); + if (theGlue->IsString()) { + const StringPlotData *theStringXData = (const StringPlotData *)(theGlue); + mXTickIterator = &mXNamedTickIterator; + mXNamedTickIterator.SetStringList (*(theStringXData->GetStringData ())); + } + else { + mXTickIterator = &mXLinTickIterator; + } + mXTrafo = &mXLinTrafo; + } + if (mYAxisSetup.mLogScale) { + mYTickIterator = &mYLogTickIterator; + mYTrafo = &mYLogTrafo; + mXAxisSetup.mCrossOrigin = false; + } + else { + mYTickIterator = &mYLinTickIterator; + mYTrafo = &mYLinTrafo; + } + mXTickIterator->SetAxisSetup (&mXAxisSetup); + mYTickIterator->SetAxisSetup (&mYAxisSetup); + + // set trafo's for data drawers + for (int theI=0; theISetXTrafo (mXTrafo); + theD->SetYTrafo (mYTrafo); + theD->SetPlotCount (mPlotDataContainer.GetPlotCount ()); + theD->SetPlotIndex (theI); + } + } + + return true; +} + +bool PPlot::ValidateData () { + + /* check x data ascending + for (int theI=0; theI (mPlotDataContainer.GetConstXData (theI)); + if (theX && theX->size ()>0) { + float thePrev = (*theX)[0]; + for (RealData::const_iterator theJ=theX->begin ();theJ!=theX->end ();theJ++) { + float theNext = *theJ; + if (theNextAdjustRange (mXAxisSetup.mMin, mXAxisSetup.mMax)) { + return false; + } + } + + if (mYAxisSetup.mAutoScaleMin || mYAxisSetup.mAutoScaleMax) { + float theYMin; + float theYMax; + + mPlotDataContainer.CalculateYRange (mXAxisSetup.mMin, mXAxisSetup.mMax, + theYMin, theYMax); + + if (mYAxisSetup.mAutoScaleMin) { + mYAxisSetup.mMin = theYMin; + if (mYAxisSetup.mLogScale && (theYMin < kLogMinClipValue) ) { + mYAxisSetup.mMin = kLogMinClipValue; + } + } + if (mYAxisSetup.mAutoScaleMax) { + mYAxisSetup.mMax = theYMax; + } + + if (!mYTickIterator->AdjustRange (mYAxisSetup.mMin, mYAxisSetup.mMax)) { + return false; + } + } + + return true; +} + +bool PPlot::CheckRange (const AxisSetup &inAxisSetup) const { + if (inAxisSetup.mLogScale) { + if (inAxisSetup.mMin < kLogMinClipValue) { + return false; + } + + } + return true; +} + +bool PPlot::CalculateTickInfo (const PRect &inRect, Painter &inPainter) { + float theXRange = mXAxisSetup.mMax - mXAxisSetup.mMin; + float theYRange = mYAxisSetup.mMax - mYAxisSetup.mMin; + + if (theXRange <= 0 || theYRange < 0) { + return false; + } + + if ((mYAxisSetup.mMax != 0 && fabs (theYRange / mYAxisSetup.mMax) < kRangeVerySmall) || + theYRange == 0) { + float delta = 0.1f; + if (mYAxisSetup.mMax != 0) { + delta *= fabs(mYAxisSetup.mMax); + } + + mYAxisSetup.mMax += delta; + mYAxisSetup.mMin -= delta; + theYRange = mYAxisSetup.mMax - mYAxisSetup.mMin; + } + + if (mXAxisSetup.mTickInfo.mAutoTick) { + inPainter.SetStyle(mXAxisSetup.mTickInfo.mStyle); + int theTextWidth = inPainter.CalculateTextDrawSize ("12345"); + float theDivGuess = inRect.mW/(kMajorTickXInitialFac*theTextWidth); + if (!mXTickIterator->InitFromRanges (theXRange, inRect.mH, theDivGuess, mXAxisSetup.mTickInfo)) { + return false; + } + } + if (mYAxisSetup.mTickInfo.mAutoTick) { + float theTextHeight = inPainter.GetFontHeight (); + float theDivGuess = inRect.mH/(kMajorTickYInitialFac*theTextHeight); + if (!mYTickIterator->InitFromRanges (theYRange, inRect.mW, theDivGuess, mYAxisSetup.mTickInfo)) { + return false; + } + } + + SetTickSizes (inPainter.GetFontHeight (), mXAxisSetup.mTickInfo); + SetTickSizes (inPainter.GetFontHeight (), mYAxisSetup.mTickInfo); + + return true; +} + +void PPlot::SetTickSizes (int inFontHeight, TickInfo &ioTickInfo) { + if (ioTickInfo.mAutoTickSize) { + float theFac = kRelMinorTickSize/kRelMajorTickSize; + float theMax = Round (inFontHeight*kMaxMajorTickSizeInFontHeight); + if (ioTickInfo.mMajorTickScreenSize>theMax) { + ioTickInfo.mMajorTickScreenSize = theMax; + } + ioTickInfo.mMinorTickScreenSize = Round (ioTickInfo.mMajorTickScreenSize*theFac); + } +} + + +bool PPlot::CalculateLogTransformation (int inBegin, int inEnd, const AxisSetup& inAxisSetup, LogTrafo& outTrafo) { + + float theBase = inAxisSetup.mLogBase; + long theLogFac = 1;//inAxisSetup.mLogFactor; + float theDataRange = SafeLog (inAxisSetup.mMax, theBase, theLogFac) - SafeLog(inAxisSetup.mMin, theBase, theLogFac); + if (theDataRange < kFloatSmall) { + return false; + } + float theTargetRange = inEnd - inBegin; + float theScale = theTargetRange / theDataRange; + + if (inAxisSetup.mAscending ) { + outTrafo.mOffset = inBegin - SafeLog(inAxisSetup.mMin, theBase, theLogFac) * theScale; + } else { + outTrafo.mOffset = inEnd + SafeLog(inAxisSetup.mMin, theBase, theLogFac) * theScale; + } + outTrafo.mSlope = -theScale; + outTrafo.mBase = theBase; +// outTrafo.mFactor = inAxisSetup.mLogFactor; + + if (inAxisSetup.mAscending) { + outTrafo.mSlope *= -1; + } + return true; +} + +bool PPlot::CalculateLinTransformation (int inBegin, int inEnd, const AxisSetup& inAxisSetup, LinTrafo& outTrafo) { + float theDataRange = inAxisSetup.mMax - inAxisSetup.mMin; + if (theDataRange < kFloatSmall) { + return false; + } + float theMin = inAxisSetup.mMin; + if (inAxisSetup.mDiscrete) + { + theDataRange++; + theMin -= 0.5f; + } + + float theTargetRange = inEnd - inBegin; + float theScale = theTargetRange / theDataRange; + + if (inAxisSetup.mAscending) { + outTrafo.mOffset = inBegin - theMin * theScale; + } else { + outTrafo.mOffset = inEnd + theMin * theScale; + } + outTrafo.mSlope = -theScale; + + if (inAxisSetup.mAscending) { + outTrafo.mSlope *= -1; + } + return true; +} + +bool PPlot::CalculateXTransformation (const PRect &inRect) { + if (mXAxisSetup.mLogScale) { + return CalculateLogTransformation (inRect.mX, inRect.mX + inRect.mW, mXAxisSetup, mXLogTrafo); + } + else { + return CalculateLinTransformation (inRect.mX, inRect.mX + inRect.mW, mXAxisSetup, mXLinTrafo); + } +} + +bool PPlot::CalculateYTransformation (const PRect &inRect) { + if (mYAxisSetup.mLogScale) { + return CalculateLogTransformation (inRect.mY, inRect.mY + inRect.mH, mYAxisSetup, mYLogTrafo); + } + else { + return CalculateLinTransformation (inRect.mY, inRect.mY + inRect.mH, mYAxisSetup, mYLinTrafo); + } +} + +#ifndef _IUP_PPLOT_ +bool MakeExamplePlot (int inExample, PPlot &ioPPlot) { + switch (inExample) { + case 1: + MakeExamplePlot1 (ioPPlot); + return true; + break; + case 2: + MakeExamplePlot2 (ioPPlot); + return true; + break; + case 3: + MakeExamplePlot3 (ioPPlot); + return true; + break; + case 4: + MakeExamplePlot4 (ioPPlot); + return true; + break; + case 5: + MakeExamplePlot5 (ioPPlot); + return true; + break; + case 6: + MakeExamplePlot6 (ioPPlot); + return true; + break; + case 7: + MakeExamplePlot7 (ioPPlot); + return true; + break; + case 8: + MakeExamplePlot8 (ioPPlot); + return true; + break; + } + return false; +} + +void MakeExamplePlot1 (PPlot &ioPPlot) { + + int theI; + PlotData *theX1 = new PlotData (); + PlotData *theY1 = new PlotData (); + float theFac = (float)1.0/(100*100*100); + for (theI=-100;theI<=100;theI++) { + theX1->push_back (theI+50); + theY1->push_back (theFac*theI*theI*theI); + } + LineDataDrawer *theDataDrawer1 = new LineDataDrawer (); + theDataDrawer1->mStyle.mPenWidth = 3; + ioPPlot.mPlotDataContainer.AddXYPlot (theX1, theY1, 0, theDataDrawer1); + ioPPlot.mPlotBackground.mTitle = "Bar"; + ioPPlot.mPlotBackground.mStyle.mFontSize = 20; + ioPPlot.mMargins.mTop = 60; + ioPPlot.mXAxisSetup.mLabel = "gnu (Foo)"; + ioPPlot.mYAxisSetup.mLabel = "Space (m^3)"; + ioPPlot.mYAxisSetup.mStyle.mFontSize = 9; + ioPPlot.mYAxisSetup.mTickInfo.mStyle.mFontSize = 5; + ioPPlot.mYAxisSetup.mStyle.mPenWidth = 2; + ioPPlot.mXAxisSetup.mStyle = ioPPlot.mYAxisSetup.mStyle; + ioPPlot.mXAxisSetup.mTickInfo.mStyle = ioPPlot.mYAxisSetup.mTickInfo.mStyle; + + PlotData *theX2 = new PlotData (); + PlotData *theY2 = new PlotData (); + theFac = (float)2.0/100; + for (theI=-100;theI<=100;theI++) { + theX2->push_back (theI); + theY2->push_back (-theFac*theI); + } + ioPPlot.mPlotDataContainer.AddXYPlot (theX2, theY2); + LegendData *theLegendData2 = ioPPlot.mPlotDataContainer.GetLegendData (1); + theLegendData2->mStyle.mFontSize = 9; + + PlotData *theX3 = new PlotData (); + PlotData *theY3 = new PlotData (); + for (theI=-100;theI<=100;theI++) { + theY3->push_back (0.01*theI); + theX3->push_back (0.01*theI*theI-30); + } + ioPPlot.mPlotDataContainer.AddXYPlot (theX3, theY3); +} + +void MakeExamplePlot2 (PPlot &ioPPlot) { + + int theI; + PlotData *theX1 = new PlotData (); + PlotData *theY1 = new PlotData (); + float theFac = (float)1.0/(100*100*100); + for (theI=0;theI<=100;theI++) { + theX1->push_back (theI); + theY1->push_back (theFac*theI*theI*theI); + } + ioPPlot.mPlotDataContainer.AddXYPlot (theX1, theY1, 0); + + PlotData *theX2 = new PlotData (); + PlotData *theY2 = new PlotData (); + theFac = (float)2.0/100; + for (theI=0;theI<=100;theI++) { + theX2->push_back (theI); + theY2->push_back (-theFac*theI); + } + ioPPlot.mPlotDataContainer.AddXYPlot (theX2, theY2, 0); + + ioPPlot.mPlotBackground.mTitle = "no autoscale"; + ioPPlot.mPlotBackground.mStyle.mFontSize = 15; + ioPPlot.mPlotBackground.mTransparent = false; + ioPPlot.mPlotBackground.mPlotRegionBackColor = PColor (200,200,200); + ioPPlot.mMargins.mTop = 60; + ioPPlot.mMargins.mRight = 30; + ioPPlot.mXAxisSetup.mLabel = "Tg (X)"; + ioPPlot.mXAxisSetup.SetAutoScale (false); + ioPPlot.mXAxisSetup.mMin = 10; + ioPPlot.mXAxisSetup.mMax = 60; + ioPPlot.mYAxisSetup.SetAutoScale (false); + ioPPlot.mYAxisSetup.mMin = -0.5; + ioPPlot.mYAxisSetup.mMax = 0.5; + + ioPPlot.mXAxisSetup.mCrossOrigin = false; + ioPPlot.mYAxisSetup.mCrossOrigin = false; + ioPPlot.mXAxisSetup.mAscending = false; + ioPPlot.mYAxisSetup.mAscending = true; + + // M.T. - use a color different from background + ioPPlot.mGridInfo.mGridColor = PColor(128,255,128); // some sort of green +} + +void MakeExamplePlot3 (PPlot &ioPPlot) { + + PlotData *theX1 = new PlotData (); + PlotData *theY1 = new PlotData (); + float theFac = 1.0f/(100*100*100); + for (int theI=0;theI<=100;theI++) { + // theX1->push_back (theI*0.001); + theX1->push_back (theI); + theY1->push_back (theFac*theI*theI*theI); + } + ioPPlot.mPlotDataContainer.AddXYPlot (0, theY1, 0); + + ioPPlot.mPlotBackground.mTitle = "narrow margins"; + ioPPlot.mPlotBackground.mTransparent = false; + ioPPlot.mPlotBackground.mPlotRegionBackColor = PColor (200,200,200); + ioPPlot.mMargins.mTop = 50; + ioPPlot.mMargins.mRight = 10; + ioPPlot.mMargins.mLeft = 10; + ioPPlot.mMargins.mBottom = 10; + + // M.T. - use a color different from background + ioPPlot.mGridInfo.mGridColor = PColor(128,255,128); // some sort of green +} + +void MakeExamplePlot4 (PPlot &ioPPlot) { + + PlotData *theX1 = new PlotData (); + PlotData *theY1 = new PlotData (); + float theFac = 100.0f/(100*100*100); + for (int theI=0;theI<=100;theI++) { + theX1->push_back (0.0001+theI*0.001); + theY1->push_back (0.01+theFac*theI*theI*theI); + } + LegendData *theLegend = new LegendData (); + theLegend->mName = "foo"; + theLegend->mColor = PColor (100,100,200); + ioPPlot.mPlotDataContainer.AddXYPlot (theX1, theY1, theLegend); + ioPPlot.mXAxisSetup.mLogScale = true; + ioPPlot.mYAxisSetup.mLogScale = true; + ioPPlot.mYAxisSetup.mLogBase = 2; + ioPPlot.mMargins.mLeft = 50; + ioPPlot.mMargins.mTop = 20; + + ioPPlot.mGridInfo.mXGridOn = true; + ioPPlot.mGridInfo.mYGridOn = true; +} + +void MakeExamplePlot5 (PPlot &ioPPlot) { + + const char * kLables[12] = {"jan","feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"}; + const float kData[12] = {1,2,3,4,5,6,7,8,9,0,1,2}; + + StringPlotData *theX1 = new StringPlotData (); + PlotData *theY1 = new PlotData (); + for (int theI=0;theI<12;theI++) { + theX1->AddItem (kLables[theI]); + theY1->push_back (kData[theI]); + } + LegendData *theLegend = new LegendData (); + theLegend->mName = "bar"; + theLegend->mColor = PColor (100,100,200); + BarDataDrawer *theDataDrawer = new BarDataDrawer (); + ioPPlot.mPlotDataContainer.AddXYPlot (theX1, theY1, theLegend, theDataDrawer); + ioPPlot.mMargins.mLeft = 50; + ioPPlot.mMargins.mTop = 20; +} + +void MakeExamplePlot6 (PPlot &ioPPlot) { + + int theI; + + ioPPlot.mPlotBackground.mTitle = "line styles"; + PlotData *theX1 = new PlotData (); + PlotData *theY1 = new PlotData (); + float theFac = 100.0f/(100*100*100); + for (theI=0;theI<=10;theI++) { + theX1->push_back (0.0001+theI*0.001); + theY1->push_back (0.01+theFac*theI*theI); + } + LineDataDrawer *theDataDrawer1 = new LineDataDrawer (); + theDataDrawer1->mDrawPoint = true; + theDataDrawer1->mStyle.mPenWidth = 3; + ioPPlot.mPlotDataContainer.AddXYPlot (theX1, theY1, 0, theDataDrawer1); + + PlotData *theX2 = new PlotData (); + PlotData *theY2 = new PlotData (); + for (theI=0;theI<=10;theI++) { + theX2->push_back (0.0001+theI*0.001); + theY2->push_back (0.2-theFac*theI*theI); + } + LineDataDrawer *theDataDrawer2 = new LineDataDrawer (); + theDataDrawer2->mDrawPoint = true; + theDataDrawer2->mDrawLine = false; + ioPPlot.mPlotDataContainer.AddXYPlot (theX2, theY2, 0, theDataDrawer2); + + ioPPlot.mMargins.mLeft = 50; + ioPPlot.mMargins.mTop = 40; +} + +void MakeExamplePlot7 (PPlot &ioPPlot) { + + PlotData *theX1 = new PlotData (); + PlotData *theY1 = new PlotData (); + float theFac = 100.0f/(100*100*100); + for (int theI=0;theI<=100;theI++) { + theX1->push_back (0.0001+theI*0.001); + theY1->push_back (0.01+theFac*theI*theI*theI); + } + LegendData *theLegend = new LegendData (); + theLegend->mName = "foo"; + theLegend->mColor = PColor (100,100,200); + ioPPlot.mPlotDataContainer.AddXYPlot (theX1, theY1, theLegend); + ioPPlot.mYAxisSetup.mLogScale = true; + ioPPlot.mYAxisSetup.mLogFactor = 20; + ioPPlot.mMargins.mLeft = 50; + ioPPlot.mMargins.mTop = 20; + + ioPPlot.mGridInfo.mXGridOn = true; + ioPPlot.mGridInfo.mYGridOn = true; +} + +void MakeExamplePlot8 (PPlot &ioPPlot) { + + ioPPlot.mPlotBackground.mTitle = "data selection and editing"; + PlotData *theX1 = new PlotData (); + PlotData *theY1 = new PlotData (); + float theFac = 100.0f/(100*100*100); + for (int theI=-10;theI<=10;theI++) { + theX1->push_back (0.001*theI); + theY1->push_back (0.01+theFac*theI*theI*theI); + } + LegendData *theLegend = new LegendData (); + theLegend->mName = "foo"; + theLegend->mColor = PColor (100,100,200); + + PlotDataSelection *thePlotDataSelection = new PlotDataSelection (); + ioPPlot.mPlotDataContainer.AddXYPlot (theX1, theY1, theLegend, 0, thePlotDataSelection); + ioPPlot.mMargins.mLeft = 30; + ioPPlot.mMargins.mTop = 30; + ioPPlot.mMargins.mBottom = 30; + ioPPlot.mMargins.mRight = 30; +} + +void MakePainterTester (PPlot &ioPPlot) { + ioPPlot.SetPPlotDrawer (new PainterTester ()); +} + +static PPlot *sCurrentPPlot=0; + +void SetCurrentPPlot (PPlot *inPPlot) { + sCurrentPPlot = inPPlot; +} +#include +PPlot & GetCurrentPPlot () { + fprintf (stderr, "getplot\n"); + if (sCurrentPPlot) { + return *sCurrentPPlot; + } + assert (0); + fprintf (stderr, "aargh\n"); + + return *sCurrentPPlot;// this should not happen +} + + + +void MakeCopy (const PPlot &inPPlot, PPlot &outPPlot) { + // copy settings + outPPlot.mGridInfo = inPPlot.mGridInfo; + outPPlot.mMargins = inPPlot.mMargins; + outPPlot.mXAxisSetup = inPPlot.mXAxisSetup; + outPPlot.mYAxisSetup = inPPlot.mYAxisSetup; + outPPlot.mPlotBackground = inPPlot.mPlotBackground; + + // now the data + for (int theI=0;theIClone (); + + outPPlot.mPlotDataContainer.AddXYPlot (theNewXData, theNewYData, theNewLegendData, theNewDrawer); + + } + +} +#endif diff --git a/iup/srcpplot/iupPPlot.h b/iup/srcpplot/iupPPlot.h new file mode 100755 index 0000000..bab2f94 --- /dev/null +++ b/iup/srcpplot/iupPPlot.h @@ -0,0 +1,645 @@ +/*************************************************************************** + * * + * Copyright notice: * + * * + * This is free Pier ware. You may do whatever you want with this code. * + * You may cont(r)act me by email: pierphil@xs4all.nl * + * * + ***************************************************************************/ + +#ifndef __PPLOT_H__ +#define __PPLOT_H__ + + +#pragma warning (disable: 4786) + +#include +#include +#include +#include +#include +using namespace std; + +#ifdef __WATCOMC__ /* M.T. - 2006-09-26 - hacked to compile with OW ver. 1.5 */ +#pragma off (unreferenced); +#endif + +/* M.T. - these are text alignment values usable here */ +#ifdef _IUP_PPLOT_ +// Text alignment +enum { /* text alignment */ + PPLOT_NORTH, + PPLOT_SOUTH, + PPLOT_EAST, + PPLOT_WEST, + PPLOT_NORTH_EAST, + PPLOT_NORTH_WEST, + PPLOT_SOUTH_EAST, + PPLOT_SOUTH_WEST, + PPLOT_CENTER, + PPLOT_BASE_LEFT, + PPLOT_BASE_CENTER, + PPLOT_BASE_RIGHT +}; + +// Legend Position +enum PLegendPos {PPLOT_TOPLEFT, PPLOT_TOPRIGHT, PPLOT_BOTTOMLEFT, PPLOT_BOTTOMRIGHT}; +#endif + +typedef vector RealData; +typedef vector StringData; + +class PStyle { + public: +#ifdef _IUP_PPLOT_ + PStyle (): mFontSize(0), mFontStyle(-1), mPenWidth(1), mPenStyle(0), mMarkSize(7), mMarkStyle(3) {}; + int mFontSize; + int mFontStyle; + int mPenWidth; + int mPenStyle; + int mMarkStyle; + int mMarkSize; +#else + PStyle (): mFontSize(10), mPenWidth(1) {}; + int mFontSize; + string mFont; + int mPenWidth; + string mPenStyle; + map mVar; +#endif +}; + +class CalculatedDataBase { + public: + virtual float GetValue (long inIndex) const = 0; + virtual long GetSize () const = 0; +}; + +// data +class PlotDataBase { + public: + PlotDataBase(): mIsString(false) {}; + virtual ~PlotDataBase (); + virtual const RealData * GetRealPlotData () const = 0; + virtual const CalculatedDataBase * GetCalculatedData () const {return 0;} + bool IsString () const {return mIsString;} + long GetSize () const; + float GetValue (long inIndex) const; + virtual bool CalculateRange (float &outMin, float &outMax); +protected: + bool mIsString; +}; + +typedef vector PlotDataList; + +class PlotDataPointer: public PlotDataBase { + public: + PlotDataPointer (const PlotDataBase *inPlotData):mPlotData (inPlotData){};// does not own them + virtual const RealData * GetRealPlotData () const {return mPlotData->GetRealPlotData ();}; + virtual const CalculatedDataBase * GetCalculatedData () const {return mPlotData->GetCalculatedData ();} + private: + const PlotDataBase *mPlotData; +}; + +// default data class +class PlotData: public RealData, public PlotDataBase { + public: + virtual const RealData * GetRealPlotData () const {return this;}; +}; + +class CalculatedData: public CalculatedDataBase { + public: + CalculatedData (float inMin, float inDelta, long inSize): + mMin (inMin), mDelta (inDelta), mSize (inSize) {} + virtual float GetValue (long inIndex) const { return mMin + inIndex * mDelta; } + virtual long GetSize () const { return mSize; } + + float mMin; + float mDelta; + long mSize; +}; + +class CalculatedPlotData: public PlotDataBase { + public: + CalculatedPlotData (CalculatedDataBase* inCalculatedData): + mCalculatedData (inCalculatedData) {} + ~CalculatedPlotData () {delete mCalculatedData;} + virtual const RealData * GetRealPlotData () const {return 0;} + virtual const CalculatedDataBase * GetCalculatedData () const {return mCalculatedData;} + + CalculatedDataBase* mCalculatedData; +}; + +class DummyPlotData: public PlotDataBase { + public: + DummyPlotData (long inSize=0); + virtual const RealData * GetRealPlotData () const {return &mRealPlotData;}; + private: + RealData mRealPlotData; +}; + +class StringPlotData: public PlotDataBase { + public: + StringPlotData() {mIsString = true;} + void AddItem (const char *inString); + void InsertItem (int inIndex, const char *inString); + const StringData * GetStringData () const {return &mStringPlotData;}; + virtual const RealData * GetRealPlotData () const {return &mRealPlotData;}; +// private: + RealData mRealPlotData; + StringData mStringPlotData; +}; + + +float SafeLog (float inFloat, float inBase, float inFac=1); +float SafeExp (float inFloat, float inBase, float inFac=1); + +class PRect { + public: + PRect ():mX(0),mY(0),mW(0),mH(0){}; + long mX; + long mY; + long mW; + long mH; +}; + +class PMargins { + public: + PMargins ():mLeft (0), mRight(0), mTop (0), mBottom (0){}; + PMargins (long inLeft, long inRight, long inTop, long inBottom):mLeft (inLeft), mRight (inRight), mTop(inTop), mBottom (inBottom) {}; + long mLeft; + long mRight; + long mTop; + long mBottom; +}; + +class PColor { + public: + PColor (): mR(0), mG(0), mB(0){}; + PColor (int inR, int inG, int inB): mR((unsigned char)inR), mG((unsigned char)inG), mB((unsigned char)inB){}; // M.T. added typecast + unsigned char mR; + unsigned char mG; + unsigned char mB; +}; + +class LegendData { + public: + LegendData (): mShow (true) {}; + string mName; + PColor mColor; + bool mShow; + + void SetDefaultColor (int inPlotIndex); + void SetDefaultValues (int inPlotIndex); + static PColor GetDefaultColor (int inPlotIndex); + + PStyle mStyle; +}; + +typedef vector LegendDataList; + +class PlotDataSelection: public vector { + public: + PlotDataSelection (long inSize=0):vector(inSize){}; + bool IsSelected (long inIndex) const; + long GetSelectedCount () const; +}; + +typedef vector PlotDataSelectionList; + +class Painter { + public: + virtual void DrawLine (float inX1, float inY1, float inX2, float inY2)=0; + virtual void FillRect (int inX, int inY, int inW, int inH)=0; + virtual void InvertRect (int inX, int inY, int inW, int inH)=0; + virtual void SetClipRect (int inX, int inY, int inW, int inH)=0; + virtual long GetWidth () const=0; + virtual long GetHeight () const=0; + virtual void SetLineColor (int inR, int inG, int inB)=0; + virtual void SetFillColor (int inR, int inG, int inB)=0; + virtual long CalculateTextDrawSize (const char *inString)=0; + virtual long GetFontHeight () const =0; +#ifdef _IUP_PPLOT_ + virtual void FillArrow (int inX1, int inY1, int inX2, int inY2, int inX3, int inY3)=0; + virtual void DrawText (int inX, int inY, short align, const char *inString)=0; + virtual void DrawRotatedText (int inX, int inY, float inDegrees, + short align, const char *inString)=0; +#else + virtual void DrawText (int inX, int inY, const char *inString)=0; + virtual void DrawRotatedText (int inX, int inY, float inDegrees, const char *inString)=0; +#endif + virtual void SetStyle (const PStyle &inStyle){}; +}; + +class DummyPainter: public Painter { + public: + virtual void DrawLine (float inX1, float inY1, float inX2, float inY2){}; + virtual void FillRect (int inX, int inY, int inW, int inH){}; + virtual void InvertRect (int inX, int inY, int inW, int inH){}; + virtual void SetClipRect (int inX, int inY, int inW, int inH){}; + virtual long GetWidth () const {return 100;}; + virtual long GetHeight () const {return 100;}; + virtual void SetLineColor (int inR, int inG, int inB){}; + virtual void SetFillColor (int inR, int inG, int inB){}; + virtual long CalculateTextDrawSize (const char *inString){return 0;}; + virtual long GetFontHeight () const {return 10;}; +#ifdef _IUP_PPLOT_ + virtual void FillArrow (int inX1, int inY1, int inX2, int inY2, int inX3, int inY3){}; + virtual void DrawText (int inX, int inY, short align, const char *inString){}; + virtual void DrawRotatedText (int inX, int inY, float inDegrees, + short align, const char *inString){}; +#else + virtual void DrawText (int inX, int inY, const char *inString){}; + virtual void DrawRotatedText (int inX, int inY, float inDegrees, const char *inString){}; +#endif +}; + +class Trafo; +class AxisSetup; + +class DataDrawerBase { + public: + DataDrawerBase (): mXTrafo (0), mYTrafo (0), mDrawFast (false), mPlotCount (1), mPlotIndex (0), mHasMarks(false), mShowValues(false), mMode(0) {}; + virtual ~DataDrawerBase (){}; + void SetXTrafo (Trafo *inTrafo) {mXTrafo = inTrafo;}; + void SetYTrafo (Trafo *inTrafo) {mYTrafo = inTrafo;}; + void SetDrawFast (bool inDrawFast) {mDrawFast = inDrawFast;} + void SetPlotCount (int inPlotCount) {mPlotCount = inPlotCount;} + void SetPlotIndex (int inPlotIndex) {mPlotIndex = inPlotIndex;} + virtual bool DrawData (const PlotDataBase &inXData, const PlotDataBase &inYData, const PlotDataSelection &inPlotDataSelection, const AxisSetup &inXAxisSetup, const PRect &inRect, Painter &inPainter) const =0; + virtual DataDrawerBase* Clone () const = 0; + bool mHasMarks; + bool mShowValues; + PStyle mStyle; + const char* mMode; + protected: + Trafo *mXTrafo; + Trafo *mYTrafo; + bool mDrawFast; + int mPlotCount; + int mPlotIndex; +}; + +typedef vector DataDrawerList; + +class LineDataDrawer: public DataDrawerBase { + public: + LineDataDrawer ():mDrawLine (true), mDrawPoint (false) {mMode = "LINE"; mHasMarks = true;}; + virtual bool DrawData (const PlotDataBase &inXData, const PlotDataBase &inYData, const PlotDataSelection &inPlotDataSelection, const AxisSetup &inXAxisSetup, const PRect &inRect, Painter &inPainter) const; + + virtual DataDrawerBase* Clone () const; + virtual bool DrawPoint (int inScreenX, int inScreenY, const PRect &inRect, Painter &inPainter) const; + virtual bool DrawSelection (int inScreenX, int inScreenY, const PRect &inRect, Painter &inPainter) const; + + bool mDrawLine; + bool mDrawPoint; +}; + +class DotDataDrawer: public LineDataDrawer { + public: + DotDataDrawer () { mDrawLine = false; mDrawPoint = true;}; + virtual bool DrawPoint (int inScreenX, int inScreenY, const PRect &inRect, Painter &inPainter) const; +}; + +class BarDataDrawer: public DataDrawerBase { + public: + BarDataDrawer (bool inDrawOnlyLastPoint = false):mDrawOnlyLastPoint (inDrawOnlyLastPoint){ mMode = "BAR"; }; + virtual bool DrawData (const PlotDataBase &inXData, const PlotDataBase &inYData, const PlotDataSelection &inPlotDataSelection, const AxisSetup &inXAxisSetup, const PRect &inRect, Painter &inPainter) const; + virtual DataDrawerBase* Clone () const; + + protected: + bool mDrawOnlyLastPoint;// special mode + virtual bool DrawOnlyLastPoint (const PlotDataBase &inXData, const PlotDataBase &inYData, const PlotDataSelection &inPlotDataSelection, const AxisSetup &inXAxisSetup, const PRect &inRect, Painter &inPainter) const; +}; + + +class PlotDataContainer { + public: + PlotDataContainer (); + ~PlotDataContainer (); + + void RemoveElement (int inIndex); + void ClearData (); + + /* M.T. - changed to return the index of the added plot; returns -1 on error */ + int AddXYPlot (PlotDataBase *inXData, PlotDataBase *inYData, LegendData *inLegendData=0, DataDrawerBase *inDataDrawer=0, PlotDataSelection *inPlotDataSelection=0);//takes ownership + void SetXYPlot (int inIndex, PlotDataBase *inXData, PlotDataBase *inYData, LegendData *inLegendData=0, DataDrawerBase *inDataDrawer=0, PlotDataSelection *inPlotDataSelection=0);//takes ownership + + int GetPlotCount () const {return mYDataList.size ();}; + + PlotDataBase * GetXData (int inIndex); + PlotDataBase * GetYData (int inIndex); + LegendData * GetLegendData (int inIndex); + DataDrawerBase * GetDataDrawer (int inIndex); + PlotDataSelection * GetPlotDataSelection (int inIndex); + bool SetDataDrawer (int inIndex, DataDrawerBase* inDataDrawer); // takes ownership + + int GetPlotIndexByName (const string &inName) const;// negative value: not found + + const PlotDataBase * GetConstXData (int inIndex) const; + const PlotDataBase * GetConstYData (int inIndex) const; + const LegendData * GetConstLegendData (int inIndex) const; + const DataDrawerBase * GetConstDataDrawer (int inIndex) const; + const PlotDataSelection * GetConstPlotDataSelection (int inIndex) const; + + bool CalculateXRange (float &outXMin, float &outXMax) const; + bool CalculateYRange (float inXMin, float inXMax, float &outYMin, float &outYMax) const; + bool CalculateYRangePlot (float inXMin, float inXMax, const PlotDataBase &inXData, const PlotDataBase &inYData, float &outYMin, float &outYMax) const; + + protected: + bool CheckState () const; + PlotDataList mXDataList; + PlotDataList mYDataList; + LegendDataList mLegendDataList; + DataDrawerList mDataDrawerList; + PlotDataSelectionList mPlotDataSelectionList; +}; + +// M.T. - added custom grid color - was (200,200,200) +class GridInfo { + public: + GridInfo (const bool inXGridOn = false, const bool inYGridOn = false) : mXGridOn (inXGridOn), mYGridOn (inYGridOn), mGridColor(200,200,200) {}; + + bool mXGridOn; + bool mYGridOn; + PColor mGridColor; + PStyle mStyle; +}; + +class TickInfo { + public: + TickInfo ():mAutoTick (true), mAutoTickSize (true), mTickDivision(1), mMajorTickSpan(1), mMajorTickScreenSize (1), mMinorTickScreenSize (1), mFormatString ("%.0f"), mTicksOn (true) {}; + + + static float RoundSpan (float inSpan); + static void MakeFormatString (float inValue, string &outFormatString); + + bool mAutoTick; + bool mAutoTickSize; + bool mTicksOn; + + int mTickDivision; + float mMajorTickSpan; // in plot units + int mMajorTickScreenSize; + int mMinorTickScreenSize; + string mFormatString; + PStyle mStyle; +}; + +class AxisSetup { + + public: + AxisSetup (): mMin(0),mMax(0), mAutoScaleMin(true), mAutoScaleMax (true), mAscending (true), mLogScale(false), mCrossOrigin(true), mMaxDecades(-1), mLogFactor (1), mLogBase (10), mLabelCentered(true), mDiscrete(false) {}; + + void SetMin (float inMin) {mMin = inMin;}; + void SetMax (float inMax) {mMax = inMax;}; + void SetAutoScale (bool inBool) {mAutoScaleMin = mAutoScaleMax = inBool;}; + bool IsAutoScale () const {return mAutoScaleMin && mAutoScaleMax;}; + + float mMin; + float mMax; + bool mAutoScaleMin; + bool mAutoScaleMax; + bool mAscending; // not Ascending: Descending + bool mLogScale; + bool mCrossOrigin; + long mMaxDecades;// property for auto logscale + long mLogFactor;// to make db possible with logscale + float mLogBase; + bool mDiscrete; + + bool mLabelCentered; + PColor mColor; + string mLabel; + PStyle mStyle; + + TickInfo mTickInfo; + + private: +}; + +class Trafo { + public: + virtual ~Trafo (){}; + virtual float Transform (float inValue) const=0; + virtual float TransformBack (float inValue) const = 0; +}; + +class LinTrafo: public Trafo { + public: + LinTrafo ():mOffset (0), mSlope(0){}; + virtual float Transform (float inValue) const; + virtual float TransformBack (float inValue) const; + + float mOffset; + float mSlope; +}; + +class LogTrafo: public Trafo { + public: + LogTrafo ():mOffset (0), mSlope(0), mBase (10), mFactor (1){}; + virtual float Transform (float inValue) const; + virtual float TransformBack (float inValue) const; + + float mOffset; + float mSlope; + float mBase; + float mFactor; +}; + +class TickIterator { + public: + TickIterator ():mAxisSetup (0){}; + virtual ~TickIterator () {}; + virtual bool Init ()=0; + virtual bool GetNextTick (float &outTick, bool &outIsMajorTick, string &outFormatString)=0; + + virtual bool InitFromRanges (float inParRange, float inOrthoScreenRange, float inDivGuess, TickInfo &outTickInfo) const=0; + virtual bool AdjustRange (float &ioMin, float &ioMax) const{return true;}; + void SetAxisSetup (const AxisSetup *inAxisSetup) {mAxisSetup = inAxisSetup;}; + + protected: + const AxisSetup *mAxisSetup; +}; + +class LinTickIterator: public TickIterator { + public: + LinTickIterator ():mCurrentTick (0), mDelta (0){} + virtual bool Init (); + virtual bool GetNextTick (float &outTick, bool &outIsMajorTick, string &outFormatString); + bool InitFromRanges (float inParRange, float inOrthoScreenRange, float inDivGuess, TickInfo &outTickInfo) const; + protected: + float mCurrentTick; + long mCount; + float mDelta; + string mFormatString; +}; + +class LogTickIterator: public TickIterator { + public: + LogTickIterator ():mCurrentTick (0), mDelta (0){} + virtual bool Init (); + virtual bool GetNextTick (float &outTick, bool &outIsMajorTick, string &outFormatString); + + bool InitFromRanges (float inParRange, float inOrthoScreenRange, float inDivGuess, TickInfo &outTickInfo) const; + virtual bool AdjustRange (float &ioMin, float &ioMax) const; + float RoundUp (float inFloat) const; + float RoundDown (float inFloat) const; + + protected: + float mCurrentTick; + long mCount; + float mDelta; +}; + +class NamedTickIterator: public LinTickIterator { + public: + NamedTickIterator (){} + void SetStringList (const StringData &inStringList) {mStringList = inStringList;}; + + // virtual bool Init (); + virtual bool GetNextTick (float &outTick, bool &outIsMajorTick, string &outFormatString); + bool InitFromRanges (float inParRange, float inOrthoScreenRange, float inDivGuess, TickInfo &outTickInfo) const; + protected: + StringData mStringList; +}; + +class PlotBackground { + public: + PlotBackground ():mTransparent (true), mPlotRegionBackColor (255,255,255) {}; + bool mTransparent; + PColor mPlotRegionBackColor; + string mTitle; + PStyle mStyle; +#ifdef _IUP_PPLOT_ + PColor mTitleColor; +#endif +}; + +class PPlot; + +class PDrawer { + public: + typedef vector tList; + + virtual ~PDrawer (){}; + virtual bool Prepare (Painter &inPainter, PPlot& inPPlot) {return true;}; + virtual bool Draw (Painter &inPainter)=0; +}; + +class PCalculator {// base class to do additional calculations on a PPlot + public: + typedef vector tList; + + virtual ~PCalculator (){}; + + virtual bool ShouldCalculate () const {return true;}; + virtual bool Calculate (Painter &inPainter, PPlot& inPPlot) {return true;}; +}; + + +class PainterTester: public PDrawer { + public: + virtual bool Draw (Painter &inPainter); +}; + +class PPlot: public PDrawer { + public: + PPlot (); + virtual ~PPlot (); + + virtual bool Draw (Painter &inPainter); + + PlotDataContainer mPlotDataContainer; + AxisSetup mXAxisSetup; + AxisSetup mYAxisSetup; + GridInfo mGridInfo; + PMargins mMargins;// [pixels] + PlotBackground mPlotBackground; + bool mShowLegend; // M.T. - hide|show legend + PLegendPos mLegendPos; + + void SetPPlotDrawer (PDrawer *inPDrawer);// taker ownership. Used to bypass normal Draw function, i.e., set Draw function by composition. + void SetPPlotDrawer (PDrawer &inPDrawer);// same as above: does not take ownership + + bool mHasAnyModifyingCalculatorBeenActive; + PCalculator::tList mModifyingCalculatorList; + PCalculator::tList mPostCalculatorList; + PDrawer::tList mPreDrawerList; + PDrawer::tList mPostDrawerList; + + TickIterator *mXTickIterator; + TickIterator *mYTickIterator; + + virtual bool CalculateXTransformation (const PRect &inRect); + virtual bool CalculateYTransformation (const PRect &inRect); + virtual bool DrawGridXAxis (const PRect &inRect, Painter &inPainter) const; + virtual bool DrawGridYAxis (const PRect &inRect, Painter &inPainter) const; + virtual bool DrawXAxis (const PRect &inRect, Painter &inPainter) const; + virtual bool DrawYAxis (const PRect &inRect, Painter &inPainter) const; + virtual bool CalculateTickInfo (const PRect &inRect, Painter &inPainter); + + Trafo *mXTrafo; + Trafo *mYTrafo; + + static int Round (float inFloat); + static const float kRangeVerySmall; + + protected: + PPlot (const PPlot&); + PPlot& operator=(const PPlot&); + + static bool CalculateLogTransformation (int inBegin, int inEnd, const AxisSetup& inAxisSetup, LogTrafo& outTrafo); + static bool CalculateLinTransformation (int inBegin, int inEnd, const AxisSetup& inAxisSetup, LinTrafo& outTrafo); + + virtual bool DrawPlotBackground (const PRect &inRect, Painter &inPainter) const; +#ifdef _IUP_PPLOT_ + virtual bool DrawPlotTitle(const PRect &inRect, Painter &inPainter) const; +#endif + virtual bool DrawXTick (float inX, int inScreenY, bool inMajor, const string &inFormatString, Painter &inPainter, PRect &outRect) const; + virtual bool DrawYTick (float inY, int inScreenX, bool inMajor, const string &inFormatString, Painter &inPainter, PRect &outRect) const; + virtual bool DrawLegend (const PRect &inRect, Painter &inPainter) const; + virtual bool DrawPlot (int inIndex, const PRect &inRect, Painter &inPainter) const; + virtual bool ConfigureSelf ();// change here implementations of interfaces + virtual bool ValidateData ();// check preconditions here things like x is ascending + virtual bool CalculateAxisRanges (); + virtual bool CheckRange (const AxisSetup &inAxisSetup) const; + + void SetTickSizes (int inFontHeight, TickInfo &ioTickInfo); + + // trafo's between plot coordinates and screen coordinates. + LinTrafo mXLinTrafo; + LinTrafo mYLinTrafo; + LogTrafo mXLogTrafo; + LogTrafo mYLogTrafo; + + LinTickIterator mXLinTickIterator; + LinTickIterator mYLinTickIterator; + LogTickIterator mXLogTickIterator; + LogTickIterator mYLogTickIterator; + NamedTickIterator mXNamedTickIterator; + + PDrawer * mPPlotDrawer; + bool mOwnsPPlotDrawer; +}; + +#ifndef _IUP_PPLOT_ +bool MakeExamplePlot (int inExample, PPlot &ioPPlot); +void MakeExamplePlot1 (PPlot &ioPPlot); +void MakeExamplePlot2 (PPlot &ioPPlot); +void MakeExamplePlot3 (PPlot &ioPPlot); +void MakeExamplePlot4 (PPlot &ioPPlot); +void MakeExamplePlot5 (PPlot &ioPPlot); +void MakeExamplePlot6 (PPlot &ioPPlot); +void MakeExamplePlot7 (PPlot &ioPPlot); +void MakeExamplePlot8 (PPlot &ioPPlot); +void MakePainterTester (PPlot &ioPPlot); + +void MakeCopy (const PPlot &inPPlot, PPlot &outPPlot); + +// following functions can be used to interface with scripts +void SetCurrentPPlot (PPlot *inPPlot); +PPlot & GetCurrentPPlot (); +#endif + +#endif diff --git a/iup/srcpplot/iupPPlotInteraction.cpp b/iup/srcpplot/iupPPlotInteraction.cpp new file mode 100755 index 0000000..389dbcc --- /dev/null +++ b/iup/srcpplot/iupPPlotInteraction.cpp @@ -0,0 +1,832 @@ +/*************************************************************************** + * * + * Copyright notice: * + * * + * This is free Pier ware. You may do whatever you want with this code. * + * You may cont(r)act me by email: pierphil@xs4all.nl * + * * + ***************************************************************************/ + +#include +#include + +#include "iupPPlotInteraction.h" + +const float kHitDistance = (float)10.0;//pixels + +float pmax (float inX1, float inX2) { + if (inX1>inX2) { + return inX1; + } + return inX2; +} +float pmin (float inX1, float inX2) { + if (inX1 inY2) ? inY1 : inY2; + if (fabs (theYRange / theYMax) < PPlot::kRangeVerySmall) { + return; + } + + StoreCurrentAxisSetup (); + + if (IsZoomRegion () || IsZoomX ()) { + mPPlot.mXAxisSetup.SetAutoScale (false); + mPPlot.mXAxisSetup.mMin = pmin (inX1, inX2); + mPPlot.mXAxisSetup.mMax = pmax (inX1, inX2); + } + if (IsZoomRegion () || IsZoomY ()) { + mPPlot.mYAxisSetup.SetAutoScale (false); + mPPlot.mYAxisSetup.mMin = pmin (inY1, inY2); + mPPlot.mYAxisSetup.mMax = pmax (inY1, inY2); + } + + return; +} + +void PZoomInteraction::StoreCurrentAxisSetup () { + PAxisInfo theInfo;// store the current axis setup + + theInfo.mXAxisSetup = mPPlot.mXAxisSetup; + theInfo.mYAxisSetup = mPPlot.mYAxisSetup; + + mZoomHistory.push (theInfo); +} + +void PZoomInteraction::DoZoomIn () { + float theX1 = mPPlot.mXTrafo->TransformBack (mX1); + float theX2 = mPPlot.mXTrafo->TransformBack (mX2); + float theY1 = mPPlot.mYTrafo->TransformBack (mY1); + float theY2 = mPPlot.mYTrafo->TransformBack (mY2); + + DoZoomIn (theX1, theX2, theY1, theY2); +}; + +// arguments allow us to zoom out in X direction but change the Y-axis +void PZoomInteraction::DoZoomOut (float inY1, float inY2) { + if (mZoomHistory.size () == 0) { + return; + } + PAxisInfo theInfo = mZoomHistory.top (); + mZoomHistory.pop (); + + mPPlot.mXAxisSetup = theInfo.mXAxisSetup; + if (inY1 != -1) { + mPPlot.mYAxisSetup.mMin = pmin (inY1, inY2); + mPPlot.mYAxisSetup.mMax = pmax (inY1, inY2); + } else { + mPPlot.mYAxisSetup = theInfo.mYAxisSetup; + } +} + +PSelectionInteraction::PSelectionInteraction (PPlot &inPPlot): + PPlotInteraction (inPPlot), + mCommand (kNone), + mListener (0) +{ + inPPlot.mPostCalculatorList.push_back (this); +} + + +bool PSelectionInteraction::HandleKeyEvent (const PKeyEvent &inEvent) { + + mCommand = kNone; + if (inEvent.IsOnlyControlKeyDown () && inEvent.IsChar () && inEvent.GetChar () == 'a') { +// mCalculate = true; + mCommand = kSelectAll; + mKeyEvent = inEvent; + } + return mCommand != kNone; +}; + +void PSelectionInteraction::UpdateSelection (int inIndex, int inSampleIndex, PlotDataBase *inXData, PlotDataBase *inYData, bool inHit, PlotDataSelection *inPlotDataSelection) { + if ((*inPlotDataSelection)[inSampleIndex] != inHit) + { + if (SelectNotify(inIndex, inSampleIndex, inXData, inYData, inHit)) + (*inPlotDataSelection)[inSampleIndex] = inHit; + } +} + +void PSelectionInteraction::SelectAll (int inIndex, PlotDataBase *inXData, PlotDataBase *inYData, PlotDataSelection *inPlotDataSelection) { + for (long theI=0;theIsize ();theI++) { + UpdateSelection (inIndex, theI, inXData, inYData, true, inPlotDataSelection); + } +} + + +bool PSelectionInteraction::HandleMouseEvent (const PMouseEvent &inEvent) { + + mCommand = kNone; + if (inEvent.IsMouseDown ()) { + if (!(inEvent.IsOnlyControlKeyDown () || inEvent.IsOnlyShiftKeyDown ())) { + return false; + } +// fprintf (stderr, "selection\n"); +// mCalculate = true; + if (inEvent.IsOnlyControlKeyDown ()) { + mCommand = kPointwiseSelection; + } + else if (inEvent.IsOnlyShiftKeyDown ()) { + mCommand = kGlobalSelection; + } + mMouseEvent = inEvent; + return true; + } + return false; +} + +bool PSelectionInteraction::Calculate (Painter &inPainter, PPlot& inPPlot) { + + if (mCommand == kNone) { + return true; + } + + PlotDataContainer &theContainer = inPPlot.mPlotDataContainer; + long thePlotCount = theContainer.GetPlotCount (); + float theDist = -1; + + for (long theI=0;theIHandlePSelectionInteraction (); + } + + mCommand = kNone; + + return true; +} + +void PSelectionInteraction::HandleGlobalInteraction (int inIndex, PlotDataBase *inXData, PlotDataBase *inYData, bool inHit, long inNearestPointIndex, DataDrawerBase *inDataDrawer, PlotDataSelection *inPlotDataSelection) { + if (inPlotDataSelection->size ()>0) { + for (int theI=0;theIsize ();theI++) { + UpdateSelection (inIndex, theI, inXData, inYData, inHit, inPlotDataSelection); + } + } +} + +void PSelectionInteraction::HandlePointwiseInteraction (int inIndex, PlotDataBase *inXData, PlotDataBase *inYData, bool inHit, long inNearestPointIndex, DataDrawerBase *inDataDrawer, PlotDataSelection *inPlotDataSelection) { + if (!inHit) { + return; + } + if (inPlotDataSelection->size ()>inNearestPointIndex) { + bool theWasHit = (*inPlotDataSelection)[inNearestPointIndex] !=0; + UpdateSelection (inIndex, inNearestPointIndex, inXData, inYData, !theWasHit, inPlotDataSelection); + /* + for (int theI=0;theIsize ();theI++) { + bool theWasHit = (*inPlotDataSelection)[theI] !=0; + bool theIsHit = false; + if (theI==inNearestPointIndex) { + theIsHit = !theWasHit; + } + (*inPlotDataSelection)[theI] = theIsHit; + }*/ + } +} + +float PSelectionInteraction::CalculateDistanceToPlot (const PlotDataBase *inXData, const PlotDataBase *inYData, long &outNearestPointIndex) { + +// const RealData *theXData = inXData->GetRealPlotData (); +// const RealData *theYData = inYData->GetRealPlotData (); + outNearestPointIndex = -1; + float theDist = -1; + for (int theI=0;theIGetSize ();theI++) { +// float theX = (*theXData)[theI]; +// float theY = (*theYData)[theI]; + float theX = inXData->GetValue (theI); + float theY = inYData->GetValue (theI); + // transform to pixels + theX = mPPlot.mXTrafo->Transform (theX)-mMouseEvent.mX; + theY = mPPlot.mYTrafo->Transform (theY)-mMouseEvent.mY; + + float theTmp = theX*theX+theY*theY; + + if (theTmpmUpperBound) { + return false; + } + return true; +} + + +bool PlotDataIncrementer::Increment (const vector &inIncrementList, vector &inData, const PlotDataIncrementerBounds &inGlobalBounds, const vector &inBoundList) const { + bool theDontChange = true; + + if (!Impl_Increment (inIncrementList, inData, inGlobalBounds, inBoundList, theDontChange)) { + return false; + } + theDontChange = false; + Impl_Increment (inIncrementList, inData, inGlobalBounds, inBoundList, theDontChange); + return true; +} + +bool PlotDataIncrementer::Impl_Increment (const vector &inIncrementList, vector &inData, const PlotDataIncrementerBounds &inGlobalBounds, const vector &inBoundList, bool inDontChange) const { + + if (inBoundList.size ()>0 && inBoundList.size () != inData.size ()) { + return false; + } + if (inIncrementList.size () != inData.size ()) { + return false; + } + + for (int theI=0;theI0) { + if (!inBoundList[theI].CheckBounds (theIncrementedValue)) { + return false; + } + } + if (!inDontChange) { + *theValue = theIncrementedValue; + } + } + return true; +} + + + +PEditInteraction::PEditInteraction (PPlot &inPPlot): + PPlotInteraction (inPPlot), + mCalculate (false), + mListener (0) +{ + inPPlot.mModifyingCalculatorList.push_back (this); +} + +bool PEditInteraction::HandleKeyEvent (const PKeyEvent &inEvent) { + + mCalculate = Impl_HandleKeyEvent (inEvent); + mKeyEvent = inEvent; + return mCalculate; +}; + +bool PEditInteraction::Calculate (Painter &inPainter, PPlot& inPPlot) { + if (!mCalculate) { + return true; + } + + Impl_Calculate (inPainter, inPPlot); + + if (mListener) { + mListener->HandlePEditInteraction (); + } + mCalculate = false; + return true; +} + + + +PVerticalCursorInteraction::PVerticalCursorInteraction (PPlot &inPPlot): + PEditInteraction (inPPlot) +{ +} + +bool PVerticalCursorInteraction::Impl_HandleKeyEvent (const PKeyEvent &inEvent) { + + if (inEvent.IsArrowDown () || inEvent.IsArrowUp ()) { + return true; + } + return false; +}; + +bool PVerticalCursorInteraction::Impl_Calculate (Painter &inPainter, PPlot& inPPlot) { + + PlotDataContainer &theContainer = inPPlot.mPlotDataContainer; + long thePlotCount = theContainer.GetPlotCount (); + for (long theI=0;theI(inYData); + if (!theYData) { + return; + } + vector theIncrementList (inPlotDataSelection->GetSelectedCount ()); + vector theSelectedData (inPlotDataSelection->GetSelectedCount ()); + float theDelta = 1;// pixels + if (mKeyEvent.IsArrowDown ()) { + theDelta *= -1; + } + if (mKeyEvent.IsOnlyControlKeyDown ()) { + theDelta *= 10; + } + long theIndex = 0; + for (int theI=0;theIGetSize ();theI++) { + if (inPlotDataSelection->IsSelected (theI)) { + float *theNow = &((*theYData)[theI]); + float theNowPixels = mPPlot.mYTrafo->Transform (*theNow); + float theNow2 = mPPlot.mYTrafo->TransformBack (theNowPixels); + theNowPixels -= theDelta; + float theShiftedNow = mPPlot.mYTrafo->TransformBack (theNowPixels); + float theDeltaData = theShiftedNow-*theNow; + theIncrementList[theIndex] = theDeltaData; + theSelectedData[theIndex] = theNow; +// float theNew = theNow + theDelta; +// (*theYData)[theI] = theNew; + theIndex++; + } + } + PlotDataIncrementer theIncremter; + vector theDummyList; + theIncremter.Increment (theIncrementList, theSelectedData, mGlobalBounds, theDummyList); +} + + +PDeleteInteraction::PDeleteInteraction (PPlot &inPPlot): + PEditInteraction (inPPlot) +{ +} + +bool PDeleteInteraction::Impl_HandleKeyEvent (const PKeyEvent &inEvent) { + + if (inEvent.IsDelete ()) { + return true; + } + return false; +}; + +bool PDeleteInteraction::Impl_Calculate (Painter &inPainter, PPlot& inPPlot) { + + PlotDataContainer &theContainer = inPPlot.mPlotDataContainer; + long thePlotCount = theContainer.GetPlotCount (); + + if (!DeleteNotify(-1, 0, NULL, NULL)) + return true; + + for (long theI=0;theI vectorOfInt; + +template bool Erase (const vectorOfInt &inEraseList, T &ioVec) { + vectorOfInt theSortedList = inEraseList; + sort (theSortedList.begin (), theSortedList.end ()); + reverse (theSortedList.begin (), theSortedList.end ()); +// M.T. this is missing in OW: unique (theSortedList.begin (), theSortedList.end ());// remove duplicates + for (vectorOfInt::iterator theI=theSortedList.begin();theI!=theSortedList.end ();theI++) { + int theEraseIndex = *theI; + // vector ::iterator theX; + // theX = ioVec[theEraseIndex]; + // T *theX = &(ioVec[theEraseIndex]); + ioVec.erase (ioVec.begin ()+theEraseIndex); + } + + return true; +} + +/* + +bool Erase (const vectorOfInt &inEraseList, PlotData &ioVec) { + vectorOfInt theSortedList = inEraseList; + sort (theSortedList.begin (), theSortedList.end ()); + reverse (theSortedList.begin (), theSortedList.end ()); +// unique (theSortedList.begin (), theSortedList.end ());// remove duplicates + for (vectorOfInt::iterator theI=theSortedList.begin();theI!=theSortedList.end ();theI++) { + int theEraseIndex = *theI; + ioVec.erase (ioVec.begin ()+theEraseIndex); + } + + return true; +} + +bool Erase (const vectorOfInt &inEraseList, PlotDataSelection &ioVec) + { + vectorOfInt theSortedList = inEraseList; + sort (theSortedList.begin (), theSortedList.end ()); + reverse (theSortedList.begin (), theSortedList.end ()); +// unique (theSortedList.begin (), theSortedList.end ());// remove duplicates + for (vectorOfInt::iterator theI=theSortedList.begin();theI!=theSortedList.end ();theI++) { + int theEraseIndex = *theI; + ioVec.erase (ioVec.begin ()+theEraseIndex); + } + + return true; +} +*/ +#else +template bool Erase (const vector &inEraseList, vector &ioVec) { + vector theSortedList = inEraseList; + sort (theSortedList.begin (), theSortedList.end ()); + reverse (theSortedList.begin (), theSortedList.end ()); + unique (theSortedList.begin (), theSortedList.end ());// remove duplicates + for (vector::iterator theI=theSortedList.begin();theI!=theSortedList.end ();theI++) { + int theEraseIndex = *theI; + // vector ::iterator theX; + // theX = ioVec[theEraseIndex]; + // T *theX = &(ioVec[theEraseIndex]); + ioVec.erase (ioVec.begin ()+theEraseIndex); + } + + return true; +} +#endif + +void PDeleteInteraction::HandleDeleteKey (PlotDataBase *inXData, PlotDataBase *inYData, PlotDataSelection *inPlotDataSelection, int inIndex) { + vector theDeleteList (inPlotDataSelection->GetSelectedCount ()); + long theIndex = 0; + for (int theI=0;theIGetSize ();theI++) { + if (inPlotDataSelection->IsSelected (theI)) { + if (DeleteNotify(inIndex, theI, inXData, inYData)) + { + theDeleteList[theIndex] = theI; + theIndex++; + } + } + } + + if (inXData->IsString()) + { + StringPlotData *theXData = (StringPlotData*)(inXData); + PlotData *theYData = (PlotData*)(inYData); + Erase (theDeleteList, theXData->mRealPlotData); + Erase (theDeleteList, theXData->mStringPlotData); + Erase (theDeleteList, *theYData); + Erase (theDeleteList, *inPlotDataSelection); + } + else + { + PlotData *theXData = (PlotData*)(inXData); + PlotData *theYData = (PlotData*)(inYData); + Erase (theDeleteList, *theXData); + Erase (theDeleteList, *theYData); + Erase (theDeleteList, *inPlotDataSelection); + } +} + +PCrosshairInteraction::PCrosshairInteraction (PPlot &inPPlot): + PPlotInteraction (inPPlot), + mActive (false), + mX (0), + mListener (0) +{ + inPPlot.mPostDrawerList.push_back (this); +} + +bool PCrosshairInteraction::HandleMouseEvent (const PMouseEvent &inEvent) { + if (!mActive) { + if (inEvent.IsMouseDown ()) { + if (inEvent.IsShiftKeyDown () && inEvent.IsControlKeyDown ()) { + mActive = true; + mX = inEvent.mX; + return true; + } + } + } + else { + if (inEvent.IsMouseUp ()) { + mActive = false; + return true; + } + if (inEvent.IsMouseMove ()) { + mX = inEvent.mX; + return true; + } + } + return false; +} + +bool PCrosshairInteraction::Draw (Painter &inPainter) { + if (mActive) { + float theX1 = mX; + float theY1 = mPPlot.mMargins.mTop; + float theX2 = mX; + float theY2 = inPainter.GetHeight () - mPPlot.mMargins.mBottom; + + inPainter.SetLineColor (0, 0, 0); + inPainter.DrawLine (theX1, theY1, theX2, theY2); + + PlotDataContainer &theContainer = mPPlot.mPlotDataContainer; + long thePlotCount = theContainer.GetPlotCount (); + + for (long theI=0;theITransformBack (mX); + float theYTarget = mPPlot.mYTrafo->TransformBack (theY); + mListener->HandleCrosshair (theI, thePlotCount, theXTarget, theYTarget); + } + theX1 = mPPlot.mMargins.mLeft; + theX2 = inPainter.GetWidth ()-mPPlot.mMargins.mLeft; + theY1 = theY2 = theY; + PColor theC = theLegendData->mColor; + inPainter.SetLineColor (theC.mR, theC.mG, theC.mB); + inPainter.DrawLine (theX1, theY1, theX2, theY2); + } + } + } + return true; +} + +bool PCrosshairInteraction::GetCrossPoint (const PlotDataBase *inXData, const PlotDataBase *inYData, float &outY) { + if (inXData->GetSize ()==0 ){ + return false; + } + float theXTarget = mPPlot.mXTrafo->TransformBack (mX); + bool theFirstIsLess = inXData->GetValue (0) < theXTarget; + for (int theI=0;theIGetSize ();theI++) { + float theX = inXData->GetValue (theI); + float theY = inYData->GetValue (theI); + bool theCurrentIsLess = theX < theXTarget; + + if (theCurrentIsLess != theFirstIsLess) { + outY = mPPlot.mYTrafo->Transform (theY);// transform to pixels + return true; + } + } + return false; +} + + +bool InteractionContainer::HandleMouseEvent (const PMouseEvent &inEvent) { + for (int theI=0;theIIsEnabled () && theInteraction->HandleMouseEvent (inEvent)) { + return true; + } + } + return false; +} + +bool InteractionContainer::HandleKeyEvent (const PKeyEvent &inEvent) { + for (int theI=0;theIIsEnabled () && theInteraction->HandleKeyEvent (inEvent)) { + return true; + } + } + return false; +} + + +DefaultInteractionContainer::DefaultInteractionContainer (PPlot &inPPlot): + mZoomInteraction (inPPlot), + mSelectionInteraction (inPPlot), + mVerticalCursorInteraction (inPPlot), + mDeleteInteraction (inPPlot), + mCrosshairInteraction (inPPlot) +{ + AddInteraction (mZoomInteraction); + AddInteraction (mSelectionInteraction); + AddInteraction (mVerticalCursorInteraction); + AddInteraction (mDeleteInteraction); + AddInteraction (mCrosshairInteraction); +/* + mVerticalCursorInteraction.mGlobalBounds.mLowerBoundEnabled = true; + mVerticalCursorInteraction.mGlobalBounds.mLowerBound = 0; + mVerticalCursorInteraction.mGlobalBounds.mUpperBoundEnabled = true; + mVerticalCursorInteraction.mGlobalBounds.mUpperBound = 10;*/ +} diff --git a/iup/srcpplot/iupPPlotInteraction.h b/iup/srcpplot/iupPPlotInteraction.h new file mode 100755 index 0000000..eacf790 --- /dev/null +++ b/iup/srcpplot/iupPPlotInteraction.h @@ -0,0 +1,328 @@ +/*************************************************************************** + * * + * Copyright notice: * + * * + * This is free Pier ware. You may do whatever you want with this code. * + * You may cont(r)act me by email: pierphil@xs4all.nl * + * * + ***************************************************************************/ + +#ifndef __PPLOTINTERACTION_H__ +#define __PPLOTINTERACTION_H__ + +#include "iupPPlot.h" + +class PModifierKeys { +public: + enum { + kShift=1, + kControl=2, + kAlt=4 + }; + PModifierKeys (int inModifierKeys=0):mModifierKeys (inModifierKeys) {}; + + + bool IsShiftKeyDown () const {return mModifierKeys & kShift? true: false;}; + bool IsControlKeyDown () const {return mModifierKeys & kControl? true: false;}; + bool IsAltKeyDown () const {return mModifierKeys & kAlt? true: false;}; + bool IsOnlyShiftKeyDown () const {return mModifierKeys == kShift? true: false;}; + bool IsOnlyControlKeyDown () const {return mModifierKeys == kControl? true: false;}; + bool IsOnlyAltKeyDown () const {return mModifierKeys == kAlt? true: false;}; + + bool HasModifierKeys () const {return mModifierKeys != 0;}; + + void SetModifierKeys (int inModifierKeys) {mModifierKeys = inModifierKeys;}; +private: + int mModifierKeys;// values like kShift | kAlt +}; + +class PMouseEvent: public PModifierKeys { +public: + enum EType { + kNone, + kDown, + kUp, + kMove + }; + + PMouseEvent (int inX=0, int inY=0, EType inType=kNone, int inModifierKeys=0); + + int mX; + int mY; + + + EType mType; + + bool IsNone () const {return mType == kNone;}; + bool IsMouseDown () const {return mType == kDown;}; + bool IsMouseUp () const {return mType == kUp;}; + bool IsMouseMove () const {return mType == kMove;}; +}; + +class PKeyEvent: public PModifierKeys { +public: + + enum EKey { + kNone, + kArrowUp, + kArrowDown, + kArrowLeft, + kArrowRight, + kDelete, + kChar + }; + + PKeyEvent (EKey inKey=kNone, int inRepeatCount=0, int inModifierKeys=0, char inChar=0); + + + bool IsNone () const {return mKey == kNone;}; + bool IsArrowUp () const {return mKey == kArrowUp;}; + bool IsArrowDown () const {return mKey == kArrowDown;}; + bool IsArrowLeft () const {return mKey == kArrowLeft;}; + bool IsArrowRight () const {return mKey == kArrowRight;}; + bool IsDelete () const {return mKey == kDelete;}; + bool IsChar () const {return mKey == kChar;}; + + int GetRepeatCount () const {return mRepeatCount;}; + char GetChar () const {return mChar;}; +protected: + EKey mKey; + char mChar; + + int mRepeatCount; +}; + + +class PPlotInteraction { + public: + + typedef vectortList; + + PPlotInteraction (PPlot &inPPlot); + + virtual bool HandleMouseEvent (const PMouseEvent &inEvent)=0; + virtual bool HandleKeyEvent (const PKeyEvent &inEvent) {return false;}; + + void SetEnabled (bool inBool) {mIsEnabled = inBool;}; + bool IsEnabled () const {return mIsEnabled;}; +protected: + PPlot &mPPlot; + bool mIsEnabled; +}; + +class PAxisInfo { +public: + typedef vector tList; + AxisSetup mXAxisSetup; + AxisSetup mYAxisSetup; +}; + +class PZoomInteraction: public PPlotInteraction, public PDrawer { +public: + + enum EZoomMode { + kZoom_Region, + kZoom_X, + kZoom_Y + }; + + PZoomInteraction (PPlot &inPPlot); + + virtual bool HandleMouseEvent (const PMouseEvent &inEvent); + virtual bool HandleKeyEvent (const PKeyEvent &inEvent); + + void DoZoomIn (float inX1, float inX2, float inY1, float inY2); + void DoZoomOut (float inY1 = -1, float inY2 = -1); + bool CanZoomOut () { return !mZoomHistory.empty (); }; + int GetZoomStackSize () { return mZoomHistory.size (); }; + + stack mZoomHistory; + EZoomMode mZoomMode; + + bool IsZoomRegion () const {return mZoomMode == kZoom_Region;}; + bool IsZoomX () const {return mZoomMode == kZoom_X;}; + bool IsZoomY () const {return mZoomMode == kZoom_Y;}; +protected: + void StoreCurrentAxisSetup (); + virtual bool Draw (Painter &inPainter); + bool CheckRange (float inFloat1, float inFloat2); + + void DoZoomIn (); + + bool mDragging; + int mX1; + int mY1; + int mX2; + int mY2; + +}; + +class PlotDataIncrementerBounds { +public: + PlotDataIncrementerBounds (); + + bool CheckBounds (float inValue) const; + + bool mLowerBoundEnabled; + float mLowerBound; + bool mUpperBoundEnabled; + float mUpperBound; +}; + +class PlotDataIncrementer { +public: + + // all are none are incremented + bool Increment (const vector &inIncrementList, vector &inData, const PlotDataIncrementerBounds &inGlobalBounds, const vector &inBoundList) const; + +protected: + bool Impl_Increment (const vector &inIncrementList, vector &inData, const PlotDataIncrementerBounds &inGlobalBounds, const vector &inBoundList, bool inDontChange) const; +}; + +class PSelectionInteractionListener { +public: + virtual void HandlePSelectionInteraction ()=0; +}; + +class PSelectionInteraction: public PPlotInteraction, public PCalculator { +public: + + enum ECommand { + kNone, + kPointwiseSelection, + kGlobalSelection, + kSelectAll + }; + + PSelectionInteraction (PPlot &inPPlot); + + virtual bool HandleKeyEvent (const PKeyEvent &inEvent); + virtual bool HandleMouseEvent (const PMouseEvent &inEvent); + virtual bool Calculate (Painter &inPainter, PPlot& inPPlot); + + void SetCommand (ECommand inCommand, const PKeyEvent &inKeyEvent, const PMouseEvent &inMouseEvent); + void SetListener (PSelectionInteractionListener *inListener) {mListener = inListener;}; +protected: + PSelectionInteractionListener *mListener; + + virtual bool SelectNotify(int inIndex, int inSampleIndex, PlotDataBase *inXData, PlotDataBase *inYData, bool inSelect) {return true;} + void UpdateSelection (int inIndex, int inSampleIndex, PlotDataBase *inXData, PlotDataBase *inYData, bool inHit, PlotDataSelection *inPlotDataSelection); + void HandleGlobalInteraction (int inIndex, PlotDataBase *inXData, PlotDataBase *inYData, bool inHit, long inNearestPointIndex, DataDrawerBase *inDataDrawer, PlotDataSelection *inPlotDataSelection); + void HandlePointwiseInteraction (int inIndex, PlotDataBase *inXData, PlotDataBase *inYData, bool inHit, long inNearestPointIndex, DataDrawerBase *inDataDrawer, PlotDataSelection *inPlotDataSelection); + float CalculateDistanceToPlot (const PlotDataBase *inXData, const PlotDataBase *inYData, long &outNearestPointIndex); + void SelectAll (int inIndex, PlotDataBase *inXData, PlotDataBase *inYData, PlotDataSelection *inPlotDataSelection); +// int mX; +// int mY; + ECommand mCommand; + PMouseEvent mMouseEvent; + PKeyEvent mKeyEvent; +}; + + +class PKeySelectionInteraction: public PPlotInteraction, public PCalculator { +public: + PKeySelectionInteraction (PPlot &inPPlot); + + virtual bool Calculate (Painter &inPainter, PPlot& inPPlot); + +protected: + + bool mCalculate; +}; + +class PEditInteractionListener { +public: + virtual void HandlePEditInteraction ()=0; +}; + +class PEditInteraction: public PPlotInteraction, public PCalculator { +public: + PEditInteraction (PPlot &inPPlot); + + virtual bool HandleMouseEvent (const PMouseEvent &inEvent) {return false;}; + virtual bool HandleKeyEvent (const PKeyEvent &inEvent); + virtual bool ShouldCalculate () const {return mCalculate;}; + virtual bool Calculate (Painter &inPainter, PPlot& inPPlot); + + virtual bool Impl_HandleKeyEvent (const PKeyEvent &inEvent)=0; + virtual bool Impl_Calculate (Painter &inPainter, PPlot& inPPlot)=0; + void SetListener (PEditInteractionListener *inListener) {mListener = inListener;}; +protected: + PEditInteractionListener *mListener; + PKeyEvent mKeyEvent; +private: + bool mCalculate; +}; + +class PVerticalCursorInteraction: public PEditInteraction { +public: + + PVerticalCursorInteraction (PPlot &inPPlot); + + virtual bool Impl_HandleKeyEvent (const PKeyEvent &inEvent); + virtual bool Impl_Calculate (Painter &inPainter, PPlot& inPPlot); + + PlotDataIncrementerBounds mGlobalBounds; +protected: + void HandleVerticalCursorKey (const PlotDataSelection *inPlotDataSelection, PlotDataBase *inYData); +}; + +class PDeleteInteraction: public PEditInteraction { +public: + + PDeleteInteraction (PPlot &inPPlot); + + virtual bool Impl_HandleKeyEvent (const PKeyEvent &inEvent); + virtual bool Impl_Calculate (Painter &inPainter, PPlot& inPPlot); + +protected: + void HandleDeleteKey (PlotDataBase *inXData, PlotDataBase *inYData, PlotDataSelection *inPlotDataSelection, int inIndex); + virtual bool DeleteNotify(int inIndex, int inSampleIndex, PlotDataBase *inXData, PlotDataBase *inYData) {return true;} +}; + +class PCrosshairInteractionListener { +public: + virtual void HandleCrosshair (int inIndex, int inPlotCount, float inX, float inY)=0; +}; + +class PCrosshairInteraction: public PPlotInteraction, public PDrawer { +public: + PCrosshairInteraction (PPlot &inPPlot); + + void SetListener (PCrosshairInteractionListener *inListener) {mListener = inListener;}; +protected: + virtual bool HandleMouseEvent (const PMouseEvent &inEvent); + virtual bool Draw (Painter &inPainter); + + bool GetCrossPoint (const PlotDataBase *inXData, const PlotDataBase *inYData, float &outY); + bool mActive; + int mX; + PCrosshairInteractionListener *mListener; +}; + +class InteractionContainer { +public: + InteractionContainer (){}; + virtual ~InteractionContainer (){}; + + bool HandleMouseEvent (const PMouseEvent &inEvent); + bool HandleKeyEvent (const PKeyEvent &inEvent); + + void AddInteraction (PPlotInteraction &inInteraction){mList.push_back(&inInteraction);}; + +protected: + PPlotInteraction::tList mList; +}; + +class DefaultInteractionContainer: public InteractionContainer { +public: + DefaultInteractionContainer (PPlot &inPPlot); + + PZoomInteraction mZoomInteraction; + PSelectionInteraction mSelectionInteraction; + PVerticalCursorInteraction mVerticalCursorInteraction; + PDeleteInteraction mDeleteInteraction; + PCrosshairInteraction mCrosshairInteraction; +}; + +#endif diff --git a/iup/srcpplot/iup_pplot.cpp b/iup/srcpplot/iup_pplot.cpp new file mode 100755 index 0000000..6f5c93a --- /dev/null +++ b/iup/srcpplot/iup_pplot.cpp @@ -0,0 +1,2959 @@ +/* + * IupPPlot component + * + * Description : A component, derived from PPlot and IUP canvas + * Remark : Depend on libs IUP, CD, IUPCD + */ + + +#ifdef _MSC_VER +#pragma warning(disable: 4100) +#pragma warning(disable: 4512) +#endif + +#include +#include +#include +#include + +#include "iup.h" +#include "iupcbs.h" +#include "iup_pplot.h" +#include "iupkey.h" + +#include +#include +#include +#include +#include + +#include "iup_class.h" +#include "iup_register.h" +#include "iup_object.h" +#include "iup_attrib.h" +#include "iup_str.h" +#include "iup_drv.h" +#include "iup_stdcontrols.h" +#include "iup_assert.h" + +#include "iupPPlot.h" +#include "iupPPlotInteraction.h" +#include "iuppplot.hpp" + + +#ifndef M_E +#define M_E 2.71828182846 +#endif + +struct _IcontrolData +{ + iupCanvas canvas; /* from IupCanvas (must reserve it) */ + PPainterIup* plt; +}; + + +static int iPPlotGetCDFontStyle(const char* value); + + +/* PPlot function pointer typedefs. */ +typedef int (*IFnC)(Ihandle*, cdCanvas*); /* postdraw_cb, predraw_cb */ +typedef int (*IFniiff)(Ihandle*, int, int, float, float); /* delete_cb */ +typedef int (*IFniiffi)(Ihandle*, int, int, float, float, int); /* select_cb */ +typedef int (*IFniiffff)(Ihandle*, int, int, float, float, float*, float*); /* edit_cb */ + + +/* callback: forward redraw request to PPlot object */ +static int iPPlotRedraw_CB(Ihandle* ih) +{ + ih->data->plt->Draw(0); /* full redraw only if nothing changed */ + return IUP_DEFAULT; +} + +/* callback: forward resize request to PPlot object */ +static int iPPlotResize_CB(Ihandle* ih) +{ + ih->data->plt->Resize(); + return IUP_DEFAULT; +} + +/* callback: forward mouse button events to PPlot object */ +static int iPPlotMouseButton_CB(Ihandle* ih, int btn, int stat, int x, int y, char* r) +{ + ih->data->plt->MouseButton(btn, stat, x, y, r); + return IUP_DEFAULT; +} + +/* callback: forward mouse button events to PPlot object */ +static int iPPlotMouseMove_CB(Ihandle* ih, int x, int y) +{ + ih->data->plt->MouseMove(x, y); + return IUP_DEFAULT; +} + +/* callback: forward keyboard events to PPlot object */ +static int iPPlotKeyPress_CB(Ihandle* ih, int c, int press) +{ + ih->data->plt->KeyPress(c, press); + return IUP_DEFAULT; +} + +/* user level call: add dataset to plot */ +void IupPPlotBegin(Ihandle* ih, int strXdata) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (ih->iclass->nativetype != IUP_TYPECANVAS || + !iupStrEqual(ih->iclass->name, "pplot")) + return; + + PlotDataBase* inXData = (PlotDataBase*)iupAttribGet(ih, "_IUP_PPLOT_XDATA"); + PlotDataBase* inYData = (PlotDataBase*)iupAttribGet(ih, "_IUP_PPLOT_YDATA"); + + if (inXData) delete inXData; + if (inYData) delete inYData; + + if (strXdata) + inXData = (PlotDataBase*)(new StringPlotData()); + else + inXData = (PlotDataBase*)(new PlotData()); + + inYData = (PlotDataBase*)new PlotData(); + + iupAttribSetStr(ih, "_IUP_PPLOT_XDATA", (char*)inXData); + iupAttribSetStr(ih, "_IUP_PPLOT_YDATA", (char*)inYData); + iupAttribSetStr(ih, "_IUP_PPLOT_STRXDATA", (char*)(strXdata? "1": "0")); +} + +void IupPPlotAdd(Ihandle* ih, float x, float y) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (ih->iclass->nativetype != IUP_TYPECANVAS || + !iupStrEqual(ih->iclass->name, "pplot")) + return; + + PlotData* inXData = (PlotData*)iupAttribGet(ih, "_IUP_PPLOT_XDATA"); + PlotData* inYData = (PlotData*)iupAttribGet(ih, "_IUP_PPLOT_YDATA"); + int strXdata = iupAttribGetInt(ih, "_IUP_PPLOT_STRXDATA"); + + if (!inYData || !inXData || strXdata) + return; + + inXData->push_back(x); + inYData->push_back(y); +} + +void IupPPlotAddStr(Ihandle* ih, const char* x, float y) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (ih->iclass->nativetype != IUP_TYPECANVAS || + !iupStrEqual(ih->iclass->name, "pplot")) + return; + + StringPlotData *inXData = (StringPlotData*)iupAttribGet(ih, "_IUP_PPLOT_XDATA"); + PlotData *inYData = (PlotData*)iupAttribGet(ih, "_IUP_PPLOT_YDATA"); + int strXdata = iupAttribGetInt(ih, "_IUP_PPLOT_STRXDATA"); + + if (!inYData || !inXData || !strXdata) + return; + + inXData->AddItem(x); + inYData->push_back(y); +} + +void IupPPlotInsertStr(Ihandle* ih, int inIndex, int inSampleIndex, const char* inX, float inY) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (ih->iclass->nativetype != IUP_TYPECANVAS || + !iupStrEqual(ih->iclass->name, "pplot")) + return; + + PlotDataBase* theXDataBase = ih->data->plt->_plot.mPlotDataContainer.GetXData(inIndex); + PlotDataBase* theYDataBase = ih->data->plt->_plot.mPlotDataContainer.GetYData(inIndex); + StringPlotData *theXData = (StringPlotData*)theXDataBase; + PlotData *theYData = (PlotData*)theYDataBase; + if (!theYData || !theXData) + return; + + theXData->InsertItem(inSampleIndex, inX); + theYData->insert(theYData->begin()+inSampleIndex, inY); +} + +void IupPPlotInsert(Ihandle* ih, int inIndex, int inSampleIndex, float inX, float inY) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (ih->iclass->nativetype != IUP_TYPECANVAS || + !iupStrEqual(ih->iclass->name, "pplot")) + return; + + PlotDataBase* theXDataBase = ih->data->plt->_plot.mPlotDataContainer.GetXData(inIndex); + PlotDataBase* theYDataBase = ih->data->plt->_plot.mPlotDataContainer.GetYData(inIndex); + PlotData* theXData = (PlotData*)theXDataBase; + PlotData* theYData = (PlotData*)theYDataBase; + if (!theYData || !theXData) + return; + + theXData->insert(theXData->begin()+inSampleIndex, inX); + theYData->insert(theYData->begin()+inSampleIndex, inY); +} + +int IupPPlotEnd(Ihandle* ih) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return -1; + + if (ih->iclass->nativetype != IUP_TYPECANVAS || + !iupStrEqual(ih->iclass->name, "pplot")) + return -1; + + PlotDataBase* inXData = (PlotDataBase*)iupAttribGet(ih, "_IUP_PPLOT_XDATA"); + PlotDataBase* inYData = (PlotDataBase*)iupAttribGet(ih, "_IUP_PPLOT_YDATA"); + if (!inYData || !inXData) + return -1; + + /* add to plot */ + ih->data->plt->_currentDataSetIndex = ih->data->plt->_plot.mPlotDataContainer.AddXYPlot(inXData, inYData); + + LegendData* legend = ih->data->plt->_plot.mPlotDataContainer.GetLegendData(ih->data->plt->_currentDataSetIndex); + legend->mStyle.mFontStyle = iPPlotGetCDFontStyle(IupGetAttribute(ih, "LEGENDFONTSTYLE")); + legend->mStyle.mFontSize = IupGetInt(ih, "LEGENDFONTSIZE"); + + iupAttribSetStr(ih, "_IUP_PPLOT_XDATA", NULL); + iupAttribSetStr(ih, "_IUP_PPLOT_YDATA", NULL); + + ih->data->plt->_redraw = 1; + return ih->data->plt->_currentDataSetIndex; +} + +void IupPPlotTransform(Ihandle* ih, float x, float y, int *ix, int *iy) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (ih->iclass->nativetype != IUP_TYPECANVAS || + !iupStrEqual(ih->iclass->name, "pplot")) + return; + + if (ix) *ix = ih->data->plt->_plot.Round(ih->data->plt->_plot.mXTrafo->Transform(x)); + if (iy) *iy = ih->data->plt->_plot.Round(ih->data->plt->_plot.mYTrafo->Transform(y)); +} + +/* user level call: plot on the given device */ +void IupPPlotPaintTo(Ihandle* ih, void* _cnv) +{ + iupASSERT(iupObjectCheck(ih)); + if (!iupObjectCheck(ih)) + return; + + if (ih->iclass->nativetype != IUP_TYPECANVAS || + !iupStrEqual(ih->iclass->name, "pplot")) + return; + + ih->data->plt->DrawTo((cdCanvas *)_cnv); +} + +/* -------------------------------------------------------------------- + class implementation + -------------------------------------------------------------------- */ + +PostPainterCallbackIup::PostPainterCallbackIup (PPlot &inPPlot, Ihandle* inHandle): + _ih(inHandle) +{ + inPPlot.mPostDrawerList.push_back (this); +} + +bool PostPainterCallbackIup::Draw(Painter &inPainter) +{ + IFnC cb = (IFnC)IupGetCallback(_ih, "POSTDRAW_CB"); + + if (cb) + { + PPainterIup* iupPainter = (PPainterIup*)(&inPainter); + cb(_ih, iupPainter->_cddbuffer); + } + + return true; +} + +PrePainterCallbackIup::PrePainterCallbackIup (PPlot &inPPlot, Ihandle* inHandle): + _ih(inHandle) +{ + inPPlot.mPreDrawerList.push_back (this); +} + +bool PrePainterCallbackIup::Draw(Painter &inPainter) +{ + IFnC cb = (IFnC)IupGetCallback(_ih, "PREDRAW_CB"); + if (cb) + { + PPainterIup* iupPainter = (PPainterIup*)(&inPainter); + cb(_ih, iupPainter->_cddbuffer); + } + + return true; +} + +bool PDeleteInteractionIup::DeleteNotify(int inIndex, int inSampleIndex, PlotDataBase* inXData, PlotDataBase* inYData) +{ + IFniiff cb = (IFniiff)IupGetCallback(_ih, "DELETE_CB"); + if (cb) + { + if (inIndex == -1) + { + Icallback cbb = IupGetCallback(_ih, "DELETEBEGIN_CB"); + if (cbb && cbb(_ih) == IUP_IGNORE) + return false; + } + else if (inIndex == -2) + { + Icallback cbb = IupGetCallback(_ih, "DELETEEND_CB"); + if (cbb) + cbb(_ih); + } + else + { + float theX = inXData->GetValue(inSampleIndex); + float theY = inYData->GetValue(inSampleIndex); + int ret = cb(_ih, inIndex, inSampleIndex, theX, theY); + if (ret == IUP_IGNORE) + return false; + } + } + + return true; +} + +bool PSelectionInteractionIup::SelectNotify(int inIndex, int inSampleIndex, PlotDataBase* inXData, PlotDataBase* inYData, bool inSelect) +{ + IFniiffi cb = (IFniiffi)IupGetCallback(_ih, "SELECT_CB"); + if (cb) + { + if (inIndex == -1) + { + Icallback cbb = IupGetCallback(_ih, "SELECTBEGIN_CB"); + if (cbb && cbb(_ih) == IUP_IGNORE) + return false; + } + else if (inIndex == -2) + { + Icallback cbb = IupGetCallback(_ih, "SELECTEND_CB"); + if (cbb) + cbb(_ih); + } + else + { + float theX = inXData->GetValue(inSampleIndex); + float theY = inYData->GetValue(inSampleIndex); + int ret = cb(_ih, inIndex, inSampleIndex, theX, theY, (int)inSelect); + if (ret == IUP_IGNORE) + return false; + } + } + + return true; +} + +bool PEditInteractionIup::Impl_HandleKeyEvent (const PKeyEvent &inEvent) +{ + if (inEvent.IsArrowDown () || inEvent.IsArrowUp () || + inEvent.IsArrowLeft () || inEvent.IsArrowRight ()) + return true; + + return false; +}; + +bool PEditInteractionIup::Impl_Calculate (Painter &inPainter, PPlot& inPPlot) +{ + PlotDataContainer &theContainer = inPPlot.mPlotDataContainer; + long thePlotCount = theContainer.GetPlotCount(); + + if (!EditNotify(-1, 0, 0, 0, NULL, NULL)) + return false; + + for (long theI=0;theIGetSize ();theI++) + { + if (inPlotDataSelection->IsSelected (theI)) + { + float theX = inXData->GetValue(theI); + float newX = theX; + + if (theXDelta) + { + float theXPixels = mPPlot.mXTrafo->Transform(theX); + theXPixels += theXDelta; + newX = mPPlot.mXTrafo->TransformBack(theXPixels); + } + + float theY = inYData->GetValue(theI); + float newY = theY; + if (theYDelta) + { + float theYPixels = mPPlot.mYTrafo->Transform(theY); + theYPixels -= theYDelta; // in pixels Y is descending + newY = mPPlot.mYTrafo->TransformBack(theYPixels); + } + + if (!EditNotify(inIndex, theI, theX, theY, &newX, &newY)) + return; + + if (inXData->IsString()) + { + StringPlotData *theXData = (StringPlotData*)(inXData); + PlotData* theYData = (PlotData*)(inYData); + theXData->mRealPlotData[theI] = newX; + (*theYData)[theI] = newY; + } + else + { + PlotData* theXData = (PlotData*)(inXData); + PlotData* theYData = (PlotData*)(inYData); + (*theXData)[theI] = newX; + (*theYData)[theI] = newY; + } + } + } +} + +bool PEditInteractionIup::EditNotify(int inIndex, int inSampleIndex, float inX, float inY, float *inNewX, float *inNewY) +{ + IFniiffff cb = (IFniiffff)IupGetCallback(_ih, "EDIT_CB"); + if (cb) + { + if (inIndex == -1) + { + Icallback cbb = IupGetCallback(_ih, "EDITBEGIN_CB"); + if (cbb && cbb(_ih) == IUP_IGNORE) + return false; + } + else if (inIndex == -2) + { + Icallback cbb = IupGetCallback(_ih, "EDITEND_CB"); + if (cbb) + cbb(_ih); + } + else + { + int ret = cb(_ih, inIndex, inSampleIndex, inX, inY, inNewX, inNewY); + if (ret == IUP_IGNORE) + return false; + } + } + + return true; +} + +InteractionContainerIup::InteractionContainerIup(PPlot &inPPlot, Ihandle* inHandle): + mZoomInteraction (inPPlot), + mSelectionInteraction (inPPlot, inHandle), + mEditInteraction (inPPlot, inHandle), + mDeleteInteraction (inPPlot, inHandle), + mCrosshairInteraction (inPPlot), + mPostPainterCallback(inPPlot, inHandle), + mPrePainterCallback(inPPlot, inHandle) +{ + AddInteraction (mZoomInteraction); + AddInteraction (mSelectionInteraction); + AddInteraction (mEditInteraction); + AddInteraction (mDeleteInteraction); + AddInteraction (mCrosshairInteraction); +} + +PPainterIup::PPainterIup(Ihandle *ih) : + Painter(), + _ih(ih), + _cdcanvas(NULL), + _cddbuffer(NULL), + _mouseDown(0), + _currentDataSetIndex(-1), + _redraw(1) +{ + _plot.mShowLegend = false; // change default to hidden + _plot.mPlotBackground.mTransparent = false; // always draw the background + _plot.mMargins.mLeft = 15; + _plot.mMargins.mBottom = 15; + _plot.mMargins.mTop = 30; + _plot.mMargins.mRight = 15; + _plot.mXAxisSetup.mTickInfo.mTickDivision = 5; + _plot.mYAxisSetup.mTickInfo.mTickDivision = 5; + _plot.mXAxisSetup.mTickInfo.mMinorTickScreenSize = 5; + _plot.mYAxisSetup.mTickInfo.mMinorTickScreenSize = 5; + _plot.mXAxisSetup.mTickInfo.mMajorTickScreenSize = 8; + _plot.mYAxisSetup.mTickInfo.mMajorTickScreenSize = 8; + + _InteractionContainer = new InteractionContainerIup(_plot, _ih); + +} /* c-tor */ + + +PPainterIup::~PPainterIup() +{ + if (_cddbuffer != NULL) + cdKillCanvas(_cddbuffer); + + delete _InteractionContainer; +} /* d-tor */ + +class MarkDataDrawer: public LineDataDrawer +{ + public: + MarkDataDrawer (bool inDrawLine) + { + mDrawLine = inDrawLine; + mDrawPoint = true; + mMode = inDrawLine ? "MARKLINE" : "MARK"; + }; + virtual bool DrawPoint (int inScreenX, int inScreenY, const PRect &inRect, Painter &inPainter) const; +}; + +bool MarkDataDrawer::DrawPoint (int inScreenX, int inScreenY, const PRect &inRect, Painter &inPainter) const +{ + PPainterIup* painter = (PPainterIup*)&inPainter; + cdCanvasMark(painter->_cddbuffer, inScreenX, cdCanvasInvertYAxis(painter->_cddbuffer, inScreenY)); + + return true; +} + +static void RemoveSample(PPlot& inPPlot, int inIndex, int inSampleIndex) +{ + PlotDataBase* theXDataBase = inPPlot.mPlotDataContainer.GetXData(inIndex); + PlotDataBase* theYDataBase = inPPlot.mPlotDataContainer.GetYData(inIndex); + + if (theXDataBase->IsString()) + { + StringPlotData *theXData = (StringPlotData *)theXDataBase; + PlotData* theYData = (PlotData*)theYDataBase; + theXData->mRealPlotData.erase(theXData->mRealPlotData.begin()+inSampleIndex); + theXData->mStringPlotData.erase(theXData->mStringPlotData.begin()+inSampleIndex); + theYData->erase(theYData->begin()+inSampleIndex); + } + else + { + PlotData* theXData = (PlotData*)theXDataBase; + PlotData* theYData = (PlotData*)theYDataBase; + theXData->erase(theXData->begin()+inSampleIndex); + theYData->erase(theYData->begin()+inSampleIndex); + } +} + +/* -------------------------------------------------------------------- + CD Gets - size and style + -------------------------------------------------------------------- */ + +static int iPPlotGetCDFontStyle(const char* value) +{ + if (!value) + return -1; + if (iupStrEqualNoCase(value, "PLAIN")) + return CD_PLAIN; + if (iupStrEqualNoCase(value, "BOLD")) + return CD_BOLD; + if (iupStrEqualNoCase(value, "ITALIC")) + return CD_ITALIC; + if (iupStrEqualNoCase(value, "BOLDITALIC")) + return CD_BOLD_ITALIC; + return -1; +} + +static char* iPPlotGetPlotFontSize(int size) +{ + if (size) + { + char* buffer = iupStrGetMemory(50); + sprintf(buffer, "%d", size); + return buffer; + } + else + return NULL; +} + +static char* iPPlotGetPlotFontStyle(int style) +{ + if (style >= CD_PLAIN && style <= CD_BOLD_ITALIC) + { + char* style_str[4] = {"PLAIN", "BOLD", "ITALIC", "BOLDITALIC"}; + return style_str[style]; + } + else + return NULL; +} + +static char* iPPlotGetPlotPenStyle(int style) +{ + if (style >= CD_CONTINUOUS && style <= CD_DASH_DOT_DOT) + { + char* style_str[5] = {"CONTINUOUS", "DASHED", "DOTTED", "DASH_DOT", "DASH_DOT_DOT"}; + return style_str[style]; + } + else + return NULL; +} + +static int iPPlotGetCDPenStyle(const char* value) +{ + if (!value || iupStrEqualNoCase(value, "CONTINUOUS")) + return CD_CONTINUOUS; + else if (iupStrEqualNoCase(value, "DASHED")) + return CD_DASHED; + else if (iupStrEqualNoCase(value, "DOTTED")) + return CD_DOTTED; + else if (iupStrEqualNoCase(value, "DASH_DOT")) + return CD_DASH_DOT; + else if (iupStrEqualNoCase(value, "DASH_DOT_DOT")) + return CD_DASH_DOT_DOT; + else + return CD_CONTINUOUS; +} + +static char* iPPlotGetPlotMarkStyle(int style) +{ + if (style >= CD_PLUS && style <= CD_HOLLOW_DIAMOND) + { + char* style_str[9] = {"PLUS", "STAR", "CIRCLE", "X", "BOX", "DIAMOND", "HOLLOW_CIRCLE", "HOLLOW_BOX", "HOLLOW_DIAMOND"}; + return style_str[style]; + } + else + return NULL; +} + +static int iPPlotGetCDMarkStyle(const char* value) +{ + if (!value || iupStrEqualNoCase(value, "PLUS")) + return CD_PLUS; + else if (iupStrEqualNoCase(value, "STAR")) + return CD_STAR; + else if (iupStrEqualNoCase(value, "CIRCLE")) + return CD_CIRCLE; + else if (iupStrEqualNoCase(value, "X")) + return CD_X; + else if (iupStrEqualNoCase(value, "BOX")) + return CD_BOX; + else if (iupStrEqualNoCase(value, "DIAMOND")) + return CD_DIAMOND; + else if (iupStrEqualNoCase(value, "HOLLOW_CIRCLE")) + return CD_HOLLOW_CIRCLE; + else if (iupStrEqualNoCase(value, "HOLLOW_BOX")) + return CD_HOLLOW_BOX; + else if (iupStrEqualNoCase(value, "HOLLOW_DIAMOND")) + return CD_HOLLOW_DIAMOND; + else + return CD_PLUS; +} + +/*****************************************************************************/ +/***** SET AND GET ATTRIBUTES ************************************************/ +/*****************************************************************************/ + +/* refresh plot window (write only) */ +static int iPPlotSetRedrawAttrib(Ihandle* ih, const char* value) +{ + (void)value; /* not used */ + ih->data->plt->Draw(1); /* force a full redraw here */ + return 0; +} + +/* total number of datasets (read only) */ +static char* iPPlotGetCountAttrib(Ihandle* ih) +{ + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()); + return att_buffer; +} + +/* legend box visibility */ +static int iPPlotSetLegendShowAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + ih->data->plt->_plot.mShowLegend = true; + else + ih->data->plt->_plot.mShowLegend = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetLegendShowAttrib(Ihandle* ih) +{ + if (ih->data->plt->_plot.mShowLegend) + return "YES"; + else + return "NO"; +} + +/* legend box visibility */ +static int iPPlotSetLegendPosAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "TOPLEFT")) + ih->data->plt->_plot.mLegendPos = PPLOT_TOPLEFT; + if (iupStrEqualNoCase(value, "BOTTOMLEFT")) + ih->data->plt->_plot.mLegendPos = PPLOT_BOTTOMLEFT; + if (iupStrEqualNoCase(value, "BOTTOMRIGHT")) + ih->data->plt->_plot.mLegendPos = PPLOT_BOTTOMRIGHT; + else + ih->data->plt->_plot.mLegendPos = PPLOT_TOPRIGHT; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetLegendPosAttrib(Ihandle* ih) +{ + char* legendpos_str[4] = {"TOPLEFT", "TOPRIGHT", "BOTTOMLEFT", "BOTTOMRIGHT"}; + + return legendpos_str[ih->data->plt->_plot.mLegendPos]; +} + +/* background color */ +static int iPPlotSetBGColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char rr, gg, bb; + if (iupStrToRGB(value, &rr, &gg, &bb)) + { + ih->data->plt->_plot.mPlotBackground.mPlotRegionBackColor = PColor(rr, gg, bb); + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetBGColorAttrib(Ihandle* ih) +{ + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d %d %d", + ih->data->plt->_plot.mPlotBackground.mPlotRegionBackColor.mR, + ih->data->plt->_plot.mPlotBackground.mPlotRegionBackColor.mG, + ih->data->plt->_plot.mPlotBackground.mPlotRegionBackColor.mB); + return att_buffer; +} + + +/* title color */ +static int iPPlotSetFGColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char rr, gg, bb; + if (iupStrToRGB(value, &rr, &gg, &bb)) + { + ih->data->plt->_plot.mPlotBackground.mTitleColor = PColor(rr, gg, bb); + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetFGColorAttrib(Ihandle* ih) +{ + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d %d %d", + ih->data->plt->_plot.mPlotBackground.mTitleColor.mR, + ih->data->plt->_plot.mPlotBackground.mTitleColor.mG, + ih->data->plt->_plot.mPlotBackground.mTitleColor.mB); + return att_buffer; +} + + +/* plot title */ +static int iPPlotSetTitleAttrib(Ihandle* ih, const char* value) +{ + if (value && value[0] != 0) + ih->data->plt->_plot.mPlotBackground.mTitle = value; + else + ih->data->plt->_plot.mPlotBackground.mTitle.resize(0); + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetTitleAttrib(Ihandle* ih) +{ + char* att_buffer = iupStrGetMemory(256); + strncpy(att_buffer, ih->data->plt->_plot.mPlotBackground.mTitle.c_str(), 256); + att_buffer[255]='\0'; + return att_buffer; +} + + +/* plot title font size */ +static int iPPlotSetTitleFontSizeAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + ih->data->plt->_plot.mPlotBackground.mStyle.mFontSize = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetTitleFontSizeAttrib(Ihandle* ih) +{ + return iPPlotGetPlotFontSize(ih->data->plt->_plot.mPlotBackground.mStyle.mFontSize); +} + + +/* plot title font style */ +static int iPPlotSetTitleFontStyleAttrib(Ihandle* ih, const char* value) +{ + int style = iPPlotGetCDFontStyle(value); + if (style != -1) + { + ih->data->plt->_plot.mPlotBackground.mStyle.mFontStyle = style; + ih->data->plt->_redraw = 1; + } + return 0; +} + +/* legend font size */ +static int iPPlotSetLegendFontSizeAttrib(Ihandle* ih, const char* value) +{ + int ii, xx; + if (!iupStrToInt(value, &xx)) + return 0; + + for (ii = 0; ii < ih->data->plt->_plot.mPlotDataContainer.GetPlotCount(); ii++) + { + LegendData* legend = ih->data->plt->_plot.mPlotDataContainer.GetLegendData(ii); + legend->mStyle.mFontSize = xx; + } + + ih->data->plt->_redraw = 1; + return 1; +} + +/* legend font style */ +static int iPPlotSetLegendFontStyleAttrib(Ihandle* ih, const char* value) +{ + int ii; + int style = iPPlotGetCDFontStyle(value); + if (style == -1) + return 0; + + for (ii = 0; ii < ih->data->plt->_plot.mPlotDataContainer.GetPlotCount(); ii++) + { + LegendData* legend = ih->data->plt->_plot.mPlotDataContainer.GetLegendData(ii); + legend->mStyle.mFontStyle = style; + } + + ih->data->plt->_redraw = 1; + return 1; +} + +/* plot margins */ +static int iPPlotSetMarginLeftAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + ih->data->plt->_plot.mMargins.mLeft = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetMarginRightAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + ih->data->plt->_plot.mMargins.mRight = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetMarginTopAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + ih->data->plt->_plot.mMargins.mTop = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetMarginBottomAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + ih->data->plt->_plot.mMargins.mBottom = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetMarginLeftAttrib(Ihandle* ih) +{ + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", ih->data->plt->_plot.mMargins.mLeft); + return att_buffer; +} + +static char* iPPlotGetMarginRightAttrib(Ihandle* ih) +{ + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", ih->data->plt->_plot.mMargins.mRight); + return att_buffer; +} + +static char* iPPlotGetMarginTopAttrib(Ihandle* ih) +{ + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", ih->data->plt->_plot.mMargins.mTop); + return att_buffer; +} + +static char* iPPlotGetMarginBottomAttrib(Ihandle* ih) +{ + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", ih->data->plt->_plot.mMargins.mBottom); + return att_buffer; +} + +/* plot grid color */ +static int iPPlotSetGridColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char rr, gg, bb; + if (iupStrToRGB(value, &rr, &gg, &bb)) + { + ih->data->plt->_plot.mGridInfo.mGridColor = PColor(rr, gg, bb); + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetGridColorAttrib(Ihandle* ih) +{ + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d %d %d", + ih->data->plt->_plot.mGridInfo.mGridColor.mR, + ih->data->plt->_plot.mGridInfo.mGridColor.mG, + ih->data->plt->_plot.mGridInfo.mGridColor.mB); + return att_buffer; +} + +/* plot grid line style */ +static int iPPlotSetGridLineStyleAttrib(Ihandle* ih, const char* value) +{ + ih->data->plt->_plot.mGridInfo.mStyle.mPenStyle = iPPlotGetCDPenStyle(value); + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetGridLineStyleAttrib(Ihandle* ih) +{ + return iPPlotGetPlotPenStyle(ih->data->plt->_plot.mGridInfo.mStyle.mPenStyle); +} + +/* grid */ +static int iPPlotSetGridAttrib(Ihandle* ih, const char* value) +{ + if (iupStrEqualNoCase(value, "VERTICAL")) /* vertical grid - X axis */ + { + ih->data->plt->_plot.mGridInfo.mXGridOn = true; + ih->data->plt->_plot.mGridInfo.mYGridOn = false; + } + else if (iupStrEqualNoCase(value, "HORIZONTAL")) /* horizontal grid - Y axis */ + { + ih->data->plt->_plot.mGridInfo.mYGridOn = true; + ih->data->plt->_plot.mGridInfo.mXGridOn = false; + } + else if (iupStrEqualNoCase(value, "YES")) + { + ih->data->plt->_plot.mGridInfo.mXGridOn = true; + ih->data->plt->_plot.mGridInfo.mYGridOn = true; + } + else + { + ih->data->plt->_plot.mGridInfo.mYGridOn = false; + ih->data->plt->_plot.mGridInfo.mXGridOn = false; + } + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetGridAttrib(Ihandle* ih) +{ + if (ih->data->plt->_plot.mGridInfo.mXGridOn && ih->data->plt->_plot.mGridInfo.mYGridOn) + return "YES"; + else if (ih->data->plt->_plot.mGridInfo.mYGridOn) + return "HORIZONTAL"; + else if (ih->data->plt->_plot.mGridInfo.mXGridOn) + return "VERTICAL"; + else + return "NO"; +} + +/* current dataset index */ +static int iPPlotSetCurrentAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + int imax = ih->data->plt->_plot.mPlotDataContainer.GetPlotCount(); + ih->data->plt->_currentDataSetIndex = ( (ii>=0) && (iidata->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetCurrentAttrib(Ihandle* ih) +{ + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", ih->data->plt->_currentDataSetIndex); + return att_buffer; +} + +/* remove a dataset */ +static int iPPlotSetRemoveAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + ih->data->plt->_plot.mPlotDataContainer.RemoveElement(ii); + ih->data->plt->_redraw = 1; + } + return 0; +} + +/* clear all datasets */ +static int iPPlotSetClearAttrib(Ihandle* ih, const char* value) +{ + ih->data->plt->_plot.mPlotDataContainer.ClearData(); + ih->data->plt->_redraw = 1; + return 0; +} + +/* =============================== */ +/* current plot dataset attributes */ +/* =============================== */ + +/* current plot line style */ +static int iPPlotSetDSLineStyleAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return 0; + + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + drawer->mStyle.mPenStyle = iPPlotGetCDPenStyle(value); + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetDSLineStyleAttrib(Ihandle* ih) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return NULL; + + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + + return iPPlotGetPlotPenStyle(drawer->mStyle.mPenStyle); +} + +/* current plot line width */ +static int iPPlotSetDSLineWidthAttrib(Ihandle* ih, const char* value) +{ + int ii; + + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return 0; + + if (iupStrToInt(value, &ii)) + { + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + drawer->mStyle.mPenWidth = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetDSLineWidthAttrib(Ihandle* ih) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return NULL; + + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", drawer->mStyle.mPenWidth); + return att_buffer; +} + +/* current plot mark style */ +static int iPPlotSetDSMarkStyleAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return 0; + + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + drawer->mStyle.mMarkStyle = iPPlotGetCDMarkStyle(value); + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetDSMarkStyleAttrib(Ihandle* ih) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return NULL; + + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + + return iPPlotGetPlotMarkStyle(drawer->mStyle.mMarkStyle); +} + +/* current plot mark size */ +static int iPPlotSetDSMarkSizeAttrib(Ihandle* ih, const char* value) +{ + int ii; + + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return 0; + + if (iupStrToInt(value, &ii)) + { + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + drawer->mStyle.mMarkSize = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetDSMarkSizeAttrib(Ihandle* ih) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return NULL; + + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", drawer->mStyle.mMarkSize); + return att_buffer; +} + +/* current dataset legend */ +static int iPPlotSetDSLegendAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return 0; + + LegendData* legend = ih->data->plt->_plot.mPlotDataContainer.GetLegendData(ih->data->plt->_currentDataSetIndex); + + if (value) + legend->mName = value; + else + legend->mName.resize(0); + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetDSLegendAttrib(Ihandle* ih) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return NULL; + + LegendData* legend = ih->data->plt->_plot.mPlotDataContainer.GetLegendData(ih->data->plt->_currentDataSetIndex); + char* att_buffer = iupStrGetMemory(256); + strncpy(att_buffer, legend->mName.c_str(), 255); + att_buffer[255]='\0'; + return att_buffer; +} + +/* current dataset line and legend color */ +static int iPPlotSetDSColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char rr, gg, bb; + + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return 0; + + if (iupStrToRGB(value, &rr, &gg, &bb)) + { + LegendData* legend = ih->data->plt->_plot.mPlotDataContainer.GetLegendData(ih->data->plt->_currentDataSetIndex); + legend->mColor = PColor(rr, gg, bb); + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetDSColorAttrib(Ihandle* ih) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return NULL; + + LegendData* legend = ih->data->plt->_plot.mPlotDataContainer.GetLegendData(ih->data->plt->_currentDataSetIndex); + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d %d %d", legend->mColor.mR, legend->mColor.mG, legend->mColor.mB); + return att_buffer; +} + +/* show values */ +static int iPPlotSetDSShowValuesAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return 0; + + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + + if (iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + drawer->mShowValues = true; + else + drawer->mShowValues = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetDSShowValuesAttrib(Ihandle* ih) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return NULL; + + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + if (drawer->mShowValues) + return "YES"; + else + return "NO"; +} + +/* current dataset drawing mode */ +static int iPPlotSetDSModeAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return 0; + + DataDrawerBase *theDataDrawer = NULL; + ih->data->plt->_plot.mXAxisSetup.mDiscrete = false; + + if(iupStrEqualNoCase(value, "BAR")) + { + theDataDrawer = new BarDataDrawer(); + ih->data->plt->_plot.mXAxisSetup.mDiscrete = true; + } + else if(iupStrEqualNoCase(value, "MARK")) + theDataDrawer = new MarkDataDrawer(0); + else if(iupStrEqualNoCase(value, "MARKLINE")) + theDataDrawer = new MarkDataDrawer(1); + else /* LINE */ + theDataDrawer = new LineDataDrawer(); + + ih->data->plt->_plot.mPlotDataContainer.SetDataDrawer(ih->data->plt->_currentDataSetIndex, theDataDrawer); + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetDSModeAttrib(Ihandle* ih) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return NULL; + + DataDrawerBase* drawer = ih->data->plt->_plot.mPlotDataContainer.GetDataDrawer(ih->data->plt->_currentDataSetIndex); + + return (char*)drawer->mMode; +} + +/* allows selection and editing */ +static int iPPlotSetDSEditAttrib(Ihandle* ih, const char* value) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return 0; + + PlotDataSelection* dataselect = ih->data->plt->_plot.mPlotDataContainer.GetPlotDataSelection(ih->data->plt->_currentDataSetIndex); + + if (iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + dataselect->resize(ih->data->plt->_plot.mPlotDataContainer.GetConstYData(ih->data->plt->_currentDataSetIndex)->GetSize()); + else + dataselect->clear(); + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetDSEditAttrib(Ihandle* ih) +{ + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return NULL; + + PlotDataSelection* dataselect = ih->data->plt->_plot.mPlotDataContainer.GetPlotDataSelection(ih->data->plt->_currentDataSetIndex); + if (dataselect->empty()) + return "NO"; + else + return "YES"; +} + +/* remove a sample */ +static int iPPlotSetDSRemoveAttrib(Ihandle* ih, const char* value) +{ + int ii; + + if (ih->data->plt->_currentDataSetIndex < 0 || + ih->data->plt->_currentDataSetIndex >= ih->data->plt->_plot.mPlotDataContainer.GetPlotCount()) + return 0; + + if (iupStrToInt(value, &ii)) + { + RemoveSample(ih->data->plt->_plot, ih->data->plt->_currentDataSetIndex, ii); + ih->data->plt->_redraw = 1; + } + return 0; +} + +/* ========== */ +/* axis props */ +/* ========== */ + +/* ========== */ +/* axis props */ +/* ========== */ + +/* axis title */ +static int iPPlotSetAXSXLabelAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (value) + axis->mLabel = value; + else + axis->mLabel = ""; + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYLabelAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (value) + axis->mLabel = value; + else + axis->mLabel = ""; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXLabelAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + char* att_buffer = iupStrGetMemory(256); + strncpy(att_buffer, axis->mLabel.c_str(), 255); + att_buffer[255]='\0'; + return att_buffer; +} + +static char* iPPlotGetAXSYLabelAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + char* att_buffer = iupStrGetMemory(256); + strncpy(att_buffer, axis->mLabel.c_str(), 255); + att_buffer[255]='\0'; + return att_buffer; +} + +/* axis title position */ +static int iPPlotSetAXSXLabelCenteredAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mLabelCentered = true; + else + axis->mLabelCentered = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYLabelCenteredAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mLabelCentered = true; + else + axis->mLabelCentered = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXLabelCenteredAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (axis->mLabelCentered) + return "YES"; + else + return "NO"; +} + +static char* iPPlotGetAXSYLabelCenteredAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (axis->mLabelCentered) + return "YES"; + else + return "NO"; +} + +/* axis, ticks and label color */ +static int iPPlotSetAXSXColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char rr, gg, bb; + if (iupStrToRGB(value, &rr, &gg, &bb)) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mColor = PColor(rr, gg, bb); + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYColorAttrib(Ihandle* ih, const char* value) +{ + unsigned char rr, gg, bb; + if (iupStrToRGB(value, &rr, &gg, &bb)) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mColor = PColor(rr, gg, bb); + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXColorAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d %d %d", + axis->mColor.mR, + axis->mColor.mG, + axis->mColor.mB); + return att_buffer; +} + +static char* iPPlotGetAXSYColorAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d %d %d", + axis->mColor.mR, + axis->mColor.mG, + axis->mColor.mB); + return att_buffer; +} + +/* autoscaling */ +static int iPPlotSetAXSXAutoMinAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mAutoScaleMin = true; + else + axis->mAutoScaleMin = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYAutoMinAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mAutoScaleMin = true; + else + axis->mAutoScaleMin = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXAutoMinAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (axis->mAutoScaleMin) + return "YES"; + else + return "NO"; +} + +static char* iPPlotGetAXSYAutoMinAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (axis->mAutoScaleMin) + return "YES"; + else + return "NO"; +} + +/* autoscaling */ +static int iPPlotSetAXSXAutoMaxAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mAutoScaleMax = true; + else + axis->mAutoScaleMax = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYAutoMaxAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mAutoScaleMax = true; + else + axis->mAutoScaleMax = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXAutoMaxAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (axis->mAutoScaleMax) + return "YES"; + else + return "NO"; +} + +static char* iPPlotGetAXSYAutoMaxAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (axis->mAutoScaleMax) + return "YES"; + else + return "NO"; +} + +/* min visible val */ +static int iPPlotSetAXSXMinAttrib(Ihandle* ih, const char* value) +{ + float xx; + if (iupStrToFloat(value, &xx)) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mMin = xx; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYMinAttrib(Ihandle* ih, const char* value) +{ + float xx; + if (iupStrToFloat(value, &xx)) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mMin = xx; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXMinAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%g", axis->mMin); + return att_buffer; +} + +static char* iPPlotGetAXSYMinAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%g", axis->mMin); + return att_buffer; +} + +/* max visible val */ +static int iPPlotSetAXSXMaxAttrib(Ihandle* ih, const char* value) +{ + float xx; + if (iupStrToFloat(value, &xx)) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mMax = xx; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYMaxAttrib(Ihandle* ih, const char* value) +{ + float xx; + if (iupStrToFloat(value, &xx)) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mMax = xx; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXMaxAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%g", axis->mMax); + return att_buffer; +} + +static char* iPPlotGetAXSYMaxAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%g", axis->mMax); + return att_buffer; +} + +/* values from left/top to right/bottom */ +static int iPPlotSetAXSXReverseAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mAscending = false; // inverted + else + axis->mAscending = true; + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYReverseAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mAscending = false; // inverted + else + axis->mAscending = true; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXReverseAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (axis->mAscending) + return "NO"; /* inverted */ + else + return "YES"; +} + +static char* iPPlotGetAXSYReverseAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (axis->mAscending) + return "NO"; /* inverted */ + else + return "YES"; +} + +/* axis mode */ +static int iPPlotSetAXSXCrossOriginAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mCrossOrigin = true; + else + axis->mCrossOrigin = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYCrossOriginAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mCrossOrigin = true; + else + axis->mCrossOrigin = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXCrossOriginAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (axis->mCrossOrigin) + return "YES"; + else + return "NO"; +} + +static char* iPPlotGetAXSYCrossOriginAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (axis->mCrossOrigin) + return "YES"; + else + return "NO"; +} + +/* log/lin scale */ +static int iPPlotSetAXSXScaleAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if(iupStrEqualNoCase(value, "LIN")) + { + axis->mLogScale = false; + } + else if(iupStrEqualNoCase(value, "LOG10")) + { + axis->mLogScale = true; + axis->mLogBase = 10.0; + } + else if(iupStrEqualNoCase(value, "LOG2")) + { + axis->mLogScale = true; + axis->mLogBase = 2.0; + } + else + { + axis->mLogScale = true; + axis->mLogBase = (float)M_E; + } + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYScaleAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if(iupStrEqualNoCase(value, "LIN")) + { + axis->mLogScale = false; + } + else if(iupStrEqualNoCase(value, "LOG10")) + { + axis->mLogScale = true; + axis->mLogBase = 10.0; + } + else if(iupStrEqualNoCase(value, "LOG2")) + { + axis->mLogScale = true; + axis->mLogBase = 2.0; + } + else + { + axis->mLogScale = true; + axis->mLogBase = (float)M_E; + } + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXScaleAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + char* att_buffer = iupStrGetMemory(30); + + if (axis->mLogScale) + { + if (axis->mLogBase == 10.0) + strcpy(att_buffer, "LOG10"); + else if (axis->mLogBase == 2.0) + strcpy(att_buffer, "LOG2"); + else + strcpy(att_buffer, "LOGN"); + } + else + strcpy(att_buffer, "LIN"); + + return att_buffer; +} + +static char* iPPlotGetAXSYScaleAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + char* att_buffer = iupStrGetMemory(30); + + if (axis->mLogScale) + { + if (axis->mLogBase == 10.0) + strcpy(att_buffer, "LOG10"); + else if (axis->mLogBase == 2.0) + strcpy(att_buffer, "LOG2"); + else + strcpy(att_buffer, "LOGN"); + } + else + strcpy(att_buffer, "LIN"); + + return att_buffer; +} + +/* axis label font size */ +static int iPPlotSetAXSXFontSizeAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mStyle.mFontSize = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYFontSizeAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mStyle.mFontSize = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXFontSizeAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + return iPPlotGetPlotFontSize(axis->mStyle.mFontSize); +} + +static char* iPPlotGetAXSYFontSizeAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + return iPPlotGetPlotFontSize(axis->mStyle.mFontSize); +} + +/* axis label font style */ +static int iPPlotSetAXSXFontStyleAttrib(Ihandle* ih, const char* value) +{ + int style = iPPlotGetCDFontStyle(value); + if (style != -1) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mStyle.mFontStyle = style; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYFontStyleAttrib(Ihandle* ih, const char* value) +{ + int style = iPPlotGetCDFontStyle(value); + if (style != -1) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mStyle.mFontStyle = style; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXFontStyleAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + return iPPlotGetPlotFontStyle(axis->mStyle.mFontStyle); +} + +static char* iPPlotGetAXSYFontStyleAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + return iPPlotGetPlotFontStyle(axis->mStyle.mFontStyle); +} + +/* automatic tick size */ +static int iPPlotSetAXSXAutoTickSizeAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mTickInfo.mAutoTickSize = true; + else + axis->mTickInfo.mAutoTickSize = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYAutoTickSizeAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mTickInfo.mAutoTickSize = true; + else + axis->mTickInfo.mAutoTickSize = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXAutoTickSizeAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (axis->mTickInfo.mAutoTickSize) + return "YES"; + else + return "NO"; +} + +static char* iPPlotGetAXSYAutoTickSizeAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (axis->mTickInfo.mAutoTickSize) + return "YES"; + else + return "NO"; +} + +/* size of ticks (in pixels) */ +static int iPPlotSetAXSXTickSizeAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mTickInfo.mMinorTickScreenSize = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYTickSizeAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mTickInfo.mMinorTickScreenSize = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXTickSizeAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", axis->mTickInfo.mMinorTickScreenSize); + return att_buffer; +} + +static char* iPPlotGetAXSYTickSizeAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", axis->mTickInfo.mMinorTickScreenSize); + return att_buffer; +} + +/* size of major ticks (in pixels) */ +static int iPPlotSetAXSXTickMajorSizeAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mTickInfo.mMajorTickScreenSize = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYTickMajorSizeAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mTickInfo.mMajorTickScreenSize = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXTickMajorSizeAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", axis->mTickInfo.mMajorTickScreenSize); + return att_buffer; +} + +static char* iPPlotGetAXSYTickMajorSizeAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", axis->mTickInfo.mMajorTickScreenSize); + return att_buffer; +} + +/* axis ticks font size */ +static int iPPlotSetAXSXTickFontSizeAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mTickInfo.mStyle.mFontSize = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYTickFontSizeAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mTickInfo.mStyle.mFontSize = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXTickFontSizeAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + return iPPlotGetPlotFontSize(axis->mTickInfo.mStyle.mFontSize); +} + +static char* iPPlotGetAXSYTickFontSizeAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + return iPPlotGetPlotFontSize(axis->mTickInfo.mStyle.mFontSize); +} + +/* axis ticks number font style */ +static int iPPlotSetAXSXTickFontStyleAttrib(Ihandle* ih, const char* value) +{ + int style = iPPlotGetCDFontStyle(value); + if (style != -1) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mTickInfo.mStyle.mFontStyle = style; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYTickFontStyleAttrib(Ihandle* ih, const char* value) +{ + int style = iPPlotGetCDFontStyle(value); + if (style != -1) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mTickInfo.mStyle.mFontStyle = style; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXTickFontStyleAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + return iPPlotGetPlotFontSize(axis->mTickInfo.mStyle.mFontStyle); +} + +static char* iPPlotGetAXSYTickFontStyleAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + return iPPlotGetPlotFontSize(axis->mTickInfo.mStyle.mFontStyle); +} + +/* axis ticks number format */ +static int iPPlotSetAXSXTickFormatAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (value && value[0]!=0) + axis->mTickInfo.mFormatString = value; + else + axis->mTickInfo.mFormatString = "%.0f"; + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYTickFormatAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (value && value[0]!=0) + axis->mTickInfo.mFormatString = value; + else + axis->mTickInfo.mFormatString = "%.0f"; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXTickFormatAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + char* att_buffer = iupStrGetMemory(256); + strncpy(att_buffer, axis->mTickInfo.mFormatString.c_str(), 255); + att_buffer[255]='\0'; + return att_buffer; +} + +static char* iPPlotGetAXSYTickFormatAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + char* att_buffer = iupStrGetMemory(256); + strncpy(att_buffer, axis->mTickInfo.mFormatString.c_str(), 255); + att_buffer[255]='\0'; + return att_buffer; +} + +/* axis ticks */ +static int iPPlotSetAXSXTickAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mTickInfo.mTicksOn = true; + else + axis->mTickInfo.mTicksOn = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYTickAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mTickInfo.mTicksOn = true; + else + axis->mTickInfo.mTicksOn = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXTickAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (axis->mTickInfo.mTicksOn) + return "YES"; + else + return "NO"; +} + +static char* iPPlotGetAXSYTickAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (axis->mTickInfo.mTicksOn) + return "YES"; + else + return "NO"; +} + +/* major tick spacing */ +static int iPPlotSetAXSXTickMajorSpanAttrib(Ihandle* ih, const char* value) +{ + float xx; + if (iupStrToFloat(value, &xx)) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mTickInfo.mMajorTickSpan = xx; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYTickMajorSpanAttrib(Ihandle* ih, const char* value) +{ + float xx; + if (iupStrToFloat(value, &xx)) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mTickInfo.mMajorTickSpan = xx; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXTickMajorSpanAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%g", axis->mTickInfo.mMajorTickSpan); + return att_buffer; +} + +static char* iPPlotGetAXSYTickMajorSpanAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%g", axis->mTickInfo.mMajorTickSpan); + return att_buffer; +} + +/* number of ticks between major ticks */ +static int iPPlotSetAXSXTickDivisionAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + axis->mTickInfo.mTickDivision = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static int iPPlotSetAXSYTickDivisionAttrib(Ihandle* ih, const char* value) +{ + int ii; + if (iupStrToInt(value, &ii)) + { + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + axis->mTickInfo.mTickDivision = ii; + ih->data->plt->_redraw = 1; + } + return 0; +} + +static char* iPPlotGetAXSXTickDivisionAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", axis->mTickInfo.mTickDivision); + return att_buffer; +} + +static char* iPPlotGetAXSYTickDivisionAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + char* att_buffer = iupStrGetMemory(30); + sprintf(att_buffer, "%d", axis->mTickInfo.mTickDivision); + return att_buffer; +} + +/* auto tick spacing */ +static int iPPlotSetAXSXAutoTickAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mTickInfo.mAutoTick = true; + else + axis->mTickInfo.mAutoTick = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static int iPPlotSetAXSYAutoTickAttrib(Ihandle* ih, const char* value) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if(iupStrEqualNoCase(value, "YES") || iupStrEqualNoCase(value, "ON")) + axis->mTickInfo.mAutoTick = true; + else + axis->mTickInfo.mAutoTick = false; + + ih->data->plt->_redraw = 1; + return 0; +} + +static char* iPPlotGetAXSXAutoTickAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mXAxisSetup; + + if (axis->mTickInfo.mAutoTick) + return "YES"; + else + return "NO"; +} + +static char* iPPlotGetAXSYAutoTickAttrib(Ihandle* ih) +{ + AxisSetup* axis = &ih->data->plt->_plot.mYAxisSetup; + + if (axis->mTickInfo.mAutoTick) + return "YES"; + else + return "NO"; +} + +/* MouseButton */ +void PPainterIup::MouseButton(int btn, int stat, int x, int y, char *r) +{ + PMouseEvent theEvent; + int theModifierKeys = 0; + + theEvent.mX = x; + theEvent.mY = y; + + if(btn == IUP_BUTTON1) + { + theEvent.mType = ( stat!=0 ? (PMouseEvent::kDown) : (PMouseEvent::kUp) ); + _mouseDown = ( stat!=0 ? 1 : 0 ); + } + else return; + + _mouse_ALT = 0; + _mouse_SHIFT = 0; + _mouse_CTRL = 0; + + if (iup_isalt(r)) /* signal Alt */ + { + theModifierKeys = (theModifierKeys | PMouseEvent::kAlt); + _mouse_ALT = 1; + } + if (iup_iscontrol(r)) /* signal Ctrl */ + { + theModifierKeys = (theModifierKeys | PMouseEvent::kControl); + _mouse_SHIFT = 1; + } + if (iup_isshift(r)) /* signal Shift */ + { + theModifierKeys = (theModifierKeys | PMouseEvent::kShift); + _mouse_CTRL = 1; + } + theEvent.SetModifierKeys (theModifierKeys); + + if( _InteractionContainer->HandleMouseEvent(theEvent)) + { + this->Draw(1); + } + else + { + /* ignore the event */ + } +} + +/* MouseMove */ +void PPainterIup::MouseMove(int x, int y) +{ + PMouseEvent theEvent; + int theModifierKeys = 0; + + if(!_mouseDown ) return; + + theEvent.mX = x; + theEvent.mY = y; + + theEvent.mType = PMouseEvent::kMove; + if(_mouse_ALT) /* signal Alt */ + { + theModifierKeys = (theModifierKeys | PMouseEvent::kAlt); + } + if(_mouse_SHIFT) /* signal Shift */ + { + theModifierKeys = (theModifierKeys | PMouseEvent::kControl); + } + if(_mouse_CTRL) /* signal Ctrl */ + { + theModifierKeys = (theModifierKeys | PMouseEvent::kShift); + } + theEvent.SetModifierKeys (theModifierKeys); + + if(_InteractionContainer->HandleMouseEvent(theEvent)) + { + this->Draw(1); + } + else + { + /* ignore the event */ + } +} + +/* KeyPress */ +void PPainterIup::KeyPress(int c, int press) +{ + int theModifierKeys = 0; + int theRepeatCount = 0; + PKeyEvent::EKey theKeyCode = PKeyEvent::kNone; + char theChar = 0; + + if(!press) return; + + switch(c) + { + case K_cX: /* CTRL + X */ + theModifierKeys = PMouseEvent::kControl; + theKeyCode = PKeyEvent::kChar; + theChar = 'x'; + break; + case K_cY: /* CTRL + Y */ + theModifierKeys = PMouseEvent::kControl; + theKeyCode = PKeyEvent::kChar; + theChar = 'y'; + break; + case K_cR: /* CTRL + R */ + theModifierKeys = PMouseEvent::kControl; + theKeyCode = PKeyEvent::kChar; + theChar = 'r'; + break; + case K_cUP: /* CTRL + Arrow */ + theModifierKeys = PMouseEvent::kControl; + case K_UP: /* Arrow */ + theKeyCode = PKeyEvent::kArrowUp; + break; + case K_cDOWN: /* CTRL + Arrow */ + theModifierKeys = PMouseEvent::kControl; + case K_DOWN: /* Arrow */ + theKeyCode = PKeyEvent::kArrowDown; + break; + case K_cLEFT: /* CTRL + Arrow */ + theModifierKeys = PMouseEvent::kControl; + case K_LEFT: /* Arrow */ + theKeyCode = PKeyEvent::kArrowLeft; + break; + case K_cRIGHT: /* CTRL + Arrow */ + theModifierKeys = PMouseEvent::kControl; + case K_RIGHT: /* Arrow */ + theKeyCode = PKeyEvent::kArrowRight; + break; + case K_cDEL: /* CTRL + Arrow */ + theModifierKeys = PMouseEvent::kControl; + case K_DEL: /* Arrow */ + theKeyCode = PKeyEvent::kDelete; + break; + } + + PKeyEvent theEvent (theKeyCode, theRepeatCount, theModifierKeys, theChar); + + if(_InteractionContainer->HandleKeyEvent(theEvent)) + { + this->Draw(1); + } + else + { + /* ignore the event */ + } +} + +/* Draw */ +void PPainterIup::Draw(int force) +{ + if (!_cddbuffer) + return; + + cdCanvasActivate(_cddbuffer); + + if (force || _redraw) + { + cdCanvasClear(_cddbuffer); + _plot.Draw(*this); + _redraw = 0; + } + + cdCanvasFlush(_cddbuffer); +} + +/* Resize */ +void PPainterIup::Resize() +{ + if (!_cddbuffer) + { + /* update canvas size */ + cdCanvasActivate(_cdcanvas); + + /* this can fail if canvas size is zero */ + if (IupGetInt(_ih, "USE_IMAGERGB")) + _cddbuffer = cdCreateCanvas(CD_DBUFFERRGB, _cdcanvas); + else + _cddbuffer = cdCreateCanvas(CD_DBUFFER, _cdcanvas); + } + + if (!_cddbuffer) + return; + + /* update canvas size */ + cdCanvasActivate(_cddbuffer); + + _redraw = 1; + + return; +} + +/* send plot to some other device */ +void PPainterIup::DrawTo(cdCanvas *usrCnv) +{ + cdCanvas *old_cddbuffer = _cddbuffer; + cdCanvas *old_cdcanvas = _cdcanvas; + + _cdcanvas = _cddbuffer = usrCnv; + + if(!_cddbuffer) + return; + + Draw(1); + + _cddbuffer = old_cddbuffer; + _cdcanvas = old_cdcanvas; +} + +void PPainterIup::FillArrow(int inX1, int inY1, int inX2, int inY2, int inX3, int inY3) +{ + if (!_cddbuffer) + return; + + cdCanvasBegin(_cddbuffer, CD_FILL); + cdCanvasVertex(_cddbuffer, inX1, cdCanvasInvertYAxis(_cddbuffer, inY1)); + cdCanvasVertex(_cddbuffer, inX2, cdCanvasInvertYAxis(_cddbuffer, inY2)); + cdCanvasVertex(_cddbuffer, inX3, cdCanvasInvertYAxis(_cddbuffer, inY3)); + cdCanvasEnd(_cddbuffer); +} + +/* DrawLine */ +void PPainterIup::DrawLine(float inX1, float inY1, float inX2, float inY2) +{ + if (!_cddbuffer) + return; + + cdfCanvasLine(_cddbuffer, inX1, cdfCanvasInvertYAxis(_cddbuffer, inY1), + inX2, cdfCanvasInvertYAxis(_cddbuffer, inY2)); +} + +/* FillRect */ +void PPainterIup::FillRect(int inX, int inY, int inW, int inH) +{ + if (!_cddbuffer) + return; + + cdCanvasBox(_cddbuffer, inX, inX+inW, + cdCanvasInvertYAxis(_cddbuffer, inY), + cdCanvasInvertYAxis(_cddbuffer, inY + inH - 1)); +} + +/* InvertRect */ +void PPainterIup::InvertRect(int inX, int inY, int inW, int inH) +{ + long cprev; + + if (!_cddbuffer) + return; + + cdCanvasWriteMode(_cddbuffer, CD_XOR); + cprev = cdCanvasForeground(_cddbuffer, CD_WHITE); + cdCanvasRect(_cddbuffer, inX, inX + inW - 1, + cdCanvasInvertYAxis(_cddbuffer, inY), + cdCanvasInvertYAxis(_cddbuffer, inY + inH - 1)); + cdCanvasWriteMode(_cddbuffer, CD_REPLACE); + cdCanvasForeground(_cddbuffer, cprev); +} + +/* SetClipRect */ +void PPainterIup::SetClipRect(int inX, int inY, int inW, int inH) +{ + if (!_cddbuffer) + return; + + cdCanvasClipArea(_cddbuffer, inX, inX + inW - 1, + cdCanvasInvertYAxis(_cddbuffer, inY), + cdCanvasInvertYAxis(_cddbuffer, inY + inH - 1)); + cdCanvasClip(_cddbuffer, CD_CLIPAREA); +} + +/* GetWidth */ +long PPainterIup::GetWidth() const +{ + int iret; + + if (!_cddbuffer) + return IUP_DEFAULT; + + cdCanvasGetSize(_cddbuffer, &iret, NULL, NULL, NULL); + + return (long)iret; +} + +/* GetHeight */ +long PPainterIup::GetHeight() const +{ + int iret; + + if (!_cddbuffer) + return IUP_NOERROR; + + cdCanvasGetSize(_cddbuffer, NULL, &iret, NULL, NULL); + + return (long)iret; +} + +/* SetLineColor */ +void PPainterIup::SetLineColor(int inR, int inG, int inB) +{ + if (!_cddbuffer) + return; + + cdCanvasForeground(_cddbuffer, cdEncodeColor((unsigned char)inR, + (unsigned char)inG, + (unsigned char)inB)); +} + +/* SetFillColor */ +void PPainterIup::SetFillColor(int inR, int inG, int inB) +{ + if (!_cddbuffer) + return; + + cdCanvasForeground(_cddbuffer, cdEncodeColor((unsigned char)inR, + (unsigned char)inG, + (unsigned char)inB)); +} + +/* CalculateTextDrawSize */ +long PPainterIup::CalculateTextDrawSize(const char *inString) +{ + int iw; + + if (!_cddbuffer) + return IUP_NOERROR; + + cdCanvasGetTextSize(_cddbuffer, const_cast(inString), &iw, NULL); + + return iw; +} + +/* GetFontHeight */ +long PPainterIup::GetFontHeight() const +{ + int ih; + + if (!_cddbuffer) + return IUP_NOERROR; + + cdCanvasGetFontDim(_cddbuffer, NULL, &ih, NULL, NULL); + + return ih; +} + +/* DrawText */ +/* this call leave all the hard job of alignment on painter side */ +void PPainterIup::DrawText(int inX, int inY, short align, const char *inString) +{ + if (!_cddbuffer) + return; + + cdCanvasTextAlignment(_cddbuffer, align); + cdCanvasText(_cddbuffer, inX, cdCanvasInvertYAxis(_cddbuffer, inY), const_cast(inString)); +} + +/* DrawRotatedText */ +void PPainterIup::DrawRotatedText(int inX, int inY, float inDegrees, short align, const char *inString) +{ + double aprev; + + if (!_cddbuffer) + return; + + cdCanvasTextAlignment(_cddbuffer, align); + aprev = cdCanvasTextOrientation(_cddbuffer, -inDegrees); + cdCanvasText(_cddbuffer, inX, cdCanvasInvertYAxis(_cddbuffer, inY), const_cast(inString)); + cdCanvasTextOrientation(_cddbuffer, aprev); +} + +void PPainterIup::SetStyle(const PStyle &inStyle) +{ + if (!_cddbuffer) + return; + + cdCanvasLineWidth(_cddbuffer, inStyle.mPenWidth); + cdCanvasLineStyle(_cddbuffer, inStyle.mPenStyle); + + cdCanvasNativeFont(_cddbuffer, IupGetAttribute(_ih, "FONT")); + + if (inStyle.mFontStyle != -1 || inStyle.mFontSize != 0) + cdCanvasFont(_cddbuffer, NULL, inStyle.mFontStyle, inStyle.mFontSize); + + cdCanvasMarkType(_cddbuffer, inStyle.mMarkStyle); + cdCanvasMarkSize(_cddbuffer, inStyle.mMarkSize); +} + +int iPPlotMapMethod(Ihandle* ih) +{ + int old_gdi = 0; + + if (IupGetInt(ih, "USE_GDI+")) + old_gdi = cdUseContextPlus(1); + + ih->data->plt->_cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!ih->data->plt->_cdcanvas) + return IUP_ERROR; + + /* this can fail if canvas size is zero */ + if (IupGetInt(ih, "USE_IMAGERGB")) + ih->data->plt->_cddbuffer = cdCreateCanvas(CD_DBUFFERRGB, ih->data->plt->_cdcanvas); + else + ih->data->plt->_cddbuffer = cdCreateCanvas(CD_DBUFFER, ih->data->plt->_cdcanvas); + + if (IupGetInt(ih, "USE_GDI+")) + cdUseContextPlus(old_gdi); + + ih->data->plt->_redraw = 1; + + return IUP_NOERROR; +} + +void iPPlotDestroyMethod(Ihandle* ih) +{ + delete ih->data->plt; +} + +int iPPlotCreateMethod(Ihandle* ih, void **params) +{ + (void)params; + + /* free the data alocated by IupCanvas */ + if (ih->data) free(ih->data); + ih->data = iupALLOCCTRLDATA(); + + /* Initializing object with no cd canvases */ + ih->data->plt = new PPainterIup(ih); + + /* IupCanvas callbacks */ + IupSetCallback(ih, "ACTION", (Icallback)iPPlotRedraw_CB); + IupSetCallback(ih, "RESIZE_CB", (Icallback)iPPlotResize_CB); + IupSetCallback(ih, "BUTTON_CB", (Icallback)iPPlotMouseButton_CB); + IupSetCallback(ih, "MOTION_CB", (Icallback)iPPlotMouseMove_CB); + IupSetCallback(ih, "KEYPRESS_CB", (Icallback)iPPlotKeyPress_CB); + + return IUP_NOERROR; +} + +static Iclass* iupPPlotGetClass(void) +{ + Iclass* ic = iupClassNew(iupCanvasGetClass()); + + ic->name = "pplot"; + ic->format = NULL; /* none */ + ic->nativetype = IUP_TYPECANVAS; + ic->childtype = IUP_CHILDNONE; + ic->is_interactive = 1; + ic->has_attrib_id = 1; /* has attributes with IDs that must be parsed */ + + /* Class functions */ + ic->Create = iPPlotCreateMethod; + ic->Destroy = iPPlotDestroyMethod; + ic->Map = iPPlotMapMethod; + + /* IupPPlot Callbacks */ + iupClassRegisterCallback(ic, "POSTDRAW_CB", "v"); + iupClassRegisterCallback(ic, "PREDRAW_CB", "v"); + iupClassRegisterCallback(ic, "DELETE_CB", "iiff"); + iupClassRegisterCallback(ic, "DELETEBEGIN_CB", ""); + iupClassRegisterCallback(ic, "DELETEEND_CB", ""); + iupClassRegisterCallback(ic, "SELECT_CB", "iiffi"); + iupClassRegisterCallback(ic, "SELECTBEGIN_CB", ""); + iupClassRegisterCallback(ic, "SELECTEND_CB", ""); + iupClassRegisterCallback(ic, "EDIT_CB", "iiffvv"); + iupClassRegisterCallback(ic, "EDITBEGIN_CB", ""); + iupClassRegisterCallback(ic, "EDITEND_CB", ""); + + /* Visual */ + iupClassRegisterAttribute(ic, "BGCOLOR", iPPlotGetBGColorAttrib, iPPlotSetBGColorAttrib, IUPAF_SAMEASSYSTEM, "255 255 255", IUPAF_NOT_MAPPED); + iupClassRegisterAttribute(ic, "FGCOLOR", iPPlotGetFGColorAttrib, iPPlotSetFGColorAttrib, IUPAF_SAMEASSYSTEM, "0 0 0", IUPAF_NOT_MAPPED); + + /* IupPPlot only */ + + iupClassRegisterAttribute(ic, "REDRAW", NULL, iPPlotSetRedrawAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TITLE", iPPlotGetTitleAttrib, iPPlotSetTitleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TITLEFONTSIZE", iPPlotGetTitleFontSizeAttrib, iPPlotSetTitleFontSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "TITLEFONTSTYLE", NULL, iPPlotSetTitleFontStyleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "LEGENDSHOW", iPPlotGetLegendShowAttrib, iPPlotSetLegendShowAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "LEGENDPOS", iPPlotGetLegendPosAttrib, iPPlotSetLegendPosAttrib, IUPAF_SAMEASSYSTEM, "TOPRIGHT", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "LEGENDFONTSIZE", NULL, iPPlotSetLegendFontSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "LEGENDFONTSTYLE", NULL, iPPlotSetLegendFontStyleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MARGINLEFT", iPPlotGetMarginLeftAttrib, iPPlotSetMarginLeftAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MARGINRIGHT", iPPlotGetMarginRightAttrib, iPPlotSetMarginRightAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MARGINTOP", iPPlotGetMarginTopAttrib, iPPlotSetMarginTopAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "MARGINBOTTOM", iPPlotGetMarginBottomAttrib, iPPlotSetMarginBottomAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "GRIDLINESTYLE", iPPlotGetGridLineStyleAttrib, iPPlotSetGridLineStyleAttrib, IUPAF_SAMEASSYSTEM, "CONTINUOUS", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "GRIDCOLOR", iPPlotGetGridColorAttrib, iPPlotSetGridColorAttrib, IUPAF_SAMEASSYSTEM, "200 200 200", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "GRID", iPPlotGetGridAttrib, iPPlotSetGridAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "DS_LINESTYLE", iPPlotGetDSLineStyleAttrib, iPPlotSetDSLineStyleAttrib, IUPAF_SAMEASSYSTEM, "CONTINUOUS", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DS_LINEWIDTH", iPPlotGetDSLineWidthAttrib, iPPlotSetDSLineWidthAttrib, IUPAF_SAMEASSYSTEM, "1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DS_MARKSTYLE", iPPlotGetDSMarkStyleAttrib, iPPlotSetDSMarkStyleAttrib, IUPAF_SAMEASSYSTEM, "X", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DS_MARKSIZE", iPPlotGetDSMarkSizeAttrib, iPPlotSetDSMarkSizeAttrib, IUPAF_SAMEASSYSTEM, "7", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DS_LEGEND", iPPlotGetDSLegendAttrib, iPPlotSetDSLegendAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DS_COLOR", iPPlotGetDSColorAttrib, iPPlotSetDSColorAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DS_SHOWVALUES", iPPlotGetDSShowValuesAttrib, iPPlotSetDSShowValuesAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DS_MODE", iPPlotGetDSModeAttrib, iPPlotSetDSModeAttrib, IUPAF_SAMEASSYSTEM, "LINE", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DS_EDIT", iPPlotGetDSEditAttrib, iPPlotSetDSEditAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "DS_REMOVE", NULL, iPPlotSetDSRemoveAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "AXS_XLABEL", iPPlotGetAXSXLabelAttrib, iPPlotSetAXSXLabelAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YLABEL", iPPlotGetAXSYLabelAttrib, iPPlotSetAXSYLabelAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XLABELCENTERED", iPPlotGetAXSXLabelCenteredAttrib, iPPlotSetAXSXLabelCenteredAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YLABELCENTERED", iPPlotGetAXSYLabelCenteredAttrib, iPPlotSetAXSYLabelCenteredAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XCOLOR", iPPlotGetAXSXColorAttrib, iPPlotSetAXSXColorAttrib, IUPAF_SAMEASSYSTEM, "0 0 0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YCOLOR", iPPlotGetAXSYColorAttrib, iPPlotSetAXSYColorAttrib, IUPAF_SAMEASSYSTEM, "0 0 0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XAUTOMIN", iPPlotGetAXSXAutoMinAttrib, iPPlotSetAXSXAutoMinAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YAUTOMIN", iPPlotGetAXSYAutoMinAttrib, iPPlotSetAXSYAutoMinAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XAUTOMAX", iPPlotGetAXSXAutoMaxAttrib, iPPlotSetAXSXAutoMaxAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YAUTOMAX", iPPlotGetAXSYAutoMaxAttrib, iPPlotSetAXSYAutoMaxAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XMIN", iPPlotGetAXSXMinAttrib, iPPlotSetAXSXMinAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YMIN", iPPlotGetAXSYMinAttrib, iPPlotSetAXSYMinAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XMAX", iPPlotGetAXSXMaxAttrib, iPPlotSetAXSXMaxAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YMAX", iPPlotGetAXSYMaxAttrib, iPPlotSetAXSYMaxAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XREVERSE", iPPlotGetAXSXReverseAttrib, iPPlotSetAXSXReverseAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YREVERSE", iPPlotGetAXSYReverseAttrib, iPPlotSetAXSYReverseAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XCROSSORIGIN", iPPlotGetAXSXCrossOriginAttrib, iPPlotSetAXSXCrossOriginAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YCROSSORIGIN", iPPlotGetAXSYCrossOriginAttrib, iPPlotSetAXSYCrossOriginAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XSCALE", iPPlotGetAXSXScaleAttrib, iPPlotSetAXSXScaleAttrib, IUPAF_SAMEASSYSTEM, "LIN", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YSCALE", iPPlotGetAXSYScaleAttrib, iPPlotSetAXSYScaleAttrib, IUPAF_SAMEASSYSTEM, "LIN", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XFONTSIZE", iPPlotGetAXSXFontSizeAttrib, iPPlotSetAXSXFontSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YFONTSIZE", iPPlotGetAXSYFontSizeAttrib, iPPlotSetAXSYFontSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XFONTSTYLE", iPPlotGetAXSXFontStyleAttrib, iPPlotSetAXSXFontStyleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YFONTSTYLE", iPPlotGetAXSYFontStyleAttrib, iPPlotSetAXSYFontStyleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XTICK", iPPlotGetAXSXTickAttrib, iPPlotSetAXSXTickAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YTICK", iPPlotGetAXSYTickAttrib, iPPlotSetAXSYTickAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XTICKSIZE", iPPlotGetAXSXTickSizeAttrib, iPPlotSetAXSXTickSizeAttrib, IUPAF_SAMEASSYSTEM, "5", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YTICKSIZE", iPPlotGetAXSYTickSizeAttrib, iPPlotSetAXSYTickSizeAttrib, IUPAF_SAMEASSYSTEM, "5", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XTICKFORMAT", iPPlotGetAXSXTickFormatAttrib, iPPlotSetAXSXTickFormatAttrib, IUPAF_SAMEASSYSTEM, "%.0f", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YTICKFORMAT", iPPlotGetAXSYTickFormatAttrib, iPPlotSetAXSYTickFormatAttrib, IUPAF_SAMEASSYSTEM, "%.0f", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XTICKFONTSIZE", iPPlotGetAXSXTickFontSizeAttrib, iPPlotSetAXSXTickFontSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YTICKFONTSIZE", iPPlotGetAXSYTickFontSizeAttrib, iPPlotSetAXSYTickFontSizeAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XTICKFONTSTYLE", iPPlotGetAXSXTickFontStyleAttrib, iPPlotSetAXSXTickFontStyleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YTICKFONTSTYLE", iPPlotGetAXSYTickFontStyleAttrib, iPPlotSetAXSYTickFontStyleAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XAUTOTICK", iPPlotGetAXSXAutoTickAttrib, iPPlotSetAXSXAutoTickAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YAUTOTICK", iPPlotGetAXSYAutoTickAttrib, iPPlotSetAXSYAutoTickAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XAUTOTICKSIZE", iPPlotGetAXSXAutoTickSizeAttrib, iPPlotSetAXSXAutoTickSizeAttrib, IUPAF_SAMEASSYSTEM, "5", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YAUTOTICKSIZE", iPPlotGetAXSYAutoTickSizeAttrib, iPPlotSetAXSYAutoTickSizeAttrib, IUPAF_SAMEASSYSTEM, "5", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XTICKMAJORSPAN", iPPlotGetAXSXTickMajorSpanAttrib, iPPlotSetAXSXTickMajorSpanAttrib, IUPAF_SAMEASSYSTEM, "1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YTICKMAJORSPAN", iPPlotGetAXSYTickMajorSpanAttrib, iPPlotSetAXSYTickMajorSpanAttrib, IUPAF_SAMEASSYSTEM, "1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XTICKDIVISION", iPPlotGetAXSXTickDivisionAttrib, iPPlotSetAXSXTickDivisionAttrib, IUPAF_SAMEASSYSTEM, "5", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YTICKDIVISION", iPPlotGetAXSYTickDivisionAttrib, iPPlotSetAXSYTickDivisionAttrib, IUPAF_SAMEASSYSTEM, "5", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XAUTOTICKSIZE", iPPlotGetAXSXAutoTickSizeAttrib, iPPlotSetAXSXAutoTickSizeAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YAUTOTICKSIZE", iPPlotGetAXSYAutoTickSizeAttrib, iPPlotSetAXSYAutoTickSizeAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_XTICKMAJORSIZE", iPPlotGetAXSXTickMajorSizeAttrib, iPPlotSetAXSXTickMajorSizeAttrib, IUPAF_SAMEASSYSTEM, "8", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "AXS_YTICKMAJORSIZE", iPPlotGetAXSYTickMajorSizeAttrib, iPPlotSetAXSYTickMajorSizeAttrib, IUPAF_SAMEASSYSTEM, "8", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + iupClassRegisterAttribute(ic, "REMOVE", NULL, iPPlotSetRemoveAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CLEAR", NULL, iPPlotSetClearAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "COUNT", iPPlotGetCountAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + iupClassRegisterAttribute(ic, "CURRENT", iPPlotGetCurrentAttrib, iPPlotSetCurrentAttrib, IUPAF_SAMEASSYSTEM, "-1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); + + return ic; +} + +/* user level call: create control */ +Ihandle* IupPPlot(void) +{ + return IupCreate("pplot"); +} + +void IupPPlotOpen(void) +{ + if (!IupGetGlobal("_IUP_PPLOT_OPEN")) + { + iupRegisterClass(iupPPlotGetClass()); + IupSetGlobal("_IUP_PPLOT_OPEN", "1"); + } +} diff --git a/iup/srcpplot/iup_pplot.def b/iup/srcpplot/iup_pplot.def new file mode 100755 index 0000000..8143bab --- /dev/null +++ b/iup/srcpplot/iup_pplot.def @@ -0,0 +1,11 @@ +EXPORTS + IupPPlotOpen + IupPPlot + IupPPlotBegin + IupPPlotAdd + IupPPlotAddStr + IupPPlotEnd + IupPPlotInsertStr + IupPPlotInsert + IupPPlotTransform + IupPPlotPaintTo diff --git a/iup/srcpplot/iup_pplot.dep b/iup/srcpplot/iup_pplot.dep new file mode 100644 index 0000000..6542ce3 --- /dev/null +++ b/iup/srcpplot/iup_pplot.dep @@ -0,0 +1,12 @@ +$(OBJDIR)/iupPPlot.o: iupPPlot.cpp iupPPlot.h +$(OBJDIR)/iupPPlotInteraction.o: iupPPlotInteraction.cpp iupPPlotInteraction.h \ + iupPPlot.h +$(OBJDIR)/iup_pplot.o: iup_pplot.cpp ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcbs.h ../include/iup_pplot.h \ + ../../cd/include/cd.h ../../cd/include/cdiup.h \ + ../../cd/include/cddbuf.h ../../cd/include/cdirgb.h \ + ../../cd/include/cdgdiplus.h ../src/iup_class.h ../src/iup_table.h \ + ../src/iup_classbase.h ../src/iup_register.h ../src/iup_object.h \ + ../src/iup_class.h ../src/iup_attrib.h ../src/iup_str.h \ + ../src/iup_drv.h ../src/iup_stdcontrols.h ../src/iup_assert.h \ + iupPPlot.h iupPPlotInteraction.h iuppplot.hpp diff --git a/iup/srcpplot/iuppplot.hpp b/iup/srcpplot/iuppplot.hpp new file mode 100755 index 0000000..62e3db7 --- /dev/null +++ b/iup/srcpplot/iuppplot.hpp @@ -0,0 +1,137 @@ +/* + * IupPPlot component - private include file + * + * Description : A component, derived from PPlot and IUP canvas + * Remark : Depend on libs IUP, CD, IUPCD + */ + + +#ifndef __IUP_PPLOT_H +#define __IUP_PPLOT_H + +/* + PPainterIup class definition +*/ + + +class PostPainterCallbackIup: public PDrawer +{ + public: + PostPainterCallbackIup(PPlot &inPPlot, Ihandle* inHandle); + virtual bool Draw (Painter &inPainter); + protected: + Ihandle *_ih; // IUP handle +}; + +class PrePainterCallbackIup: public PDrawer +{ + public: + PrePainterCallbackIup(PPlot &inPPlot, Ihandle* inHandle); + virtual bool Draw (Painter &inPainter); + protected: + Ihandle *_ih; // IUP handle +}; + +class PDeleteInteractionIup: public PDeleteInteraction +{ + public: + PDeleteInteractionIup(PPlot &inPPlot, Ihandle* inHandle): + PDeleteInteraction(inPPlot), _ih(inHandle) {} + + protected: + Ihandle *_ih; // IUP handle + bool DeleteNotify(int inIndex, int inSampleIndex, PlotDataBase *inXData, PlotDataBase *inYData); +}; + +class PSelectionInteractionIup: public PSelectionInteraction +{ + public: + PSelectionInteractionIup(PPlot &inPPlot, Ihandle* inHandle): + PSelectionInteraction(inPPlot), _ih(inHandle) {} + + protected: + Ihandle *_ih; // IUP handle + bool SelectNotify(int inIndex, int inSampleIndex, PlotDataBase *inXData, PlotDataBase *inYData, bool inSelect); +}; + +class PEditInteractionIup: public PEditInteraction +{ + public: + PEditInteractionIup (PPlot &inPPlot, Ihandle* inHandle): + PEditInteraction(inPPlot), _ih(inHandle) {} + + virtual bool Impl_HandleKeyEvent (const PKeyEvent &inEvent); + virtual bool Impl_Calculate (Painter &inPainter, PPlot& inPPlot); + + protected: + Ihandle *_ih; // IUP handle + void HandleCursorKey (const PlotDataSelection *inPlotDataSelection, PlotDataBase *inXData, PlotDataBase *inYData, int inIndex); + bool EditNotify(int inIndex, int inSampleIndex, float inX, float inY, float *inNewX, float *inNewY); +}; + +class InteractionContainerIup: public InteractionContainer +{ + public: + InteractionContainerIup(PPlot &inPPlot, Ihandle* inHandle); + + PZoomInteraction mZoomInteraction; + PSelectionInteractionIup mSelectionInteraction; + PEditInteractionIup mEditInteraction; + PDeleteInteractionIup mDeleteInteraction; + PCrosshairInteraction mCrosshairInteraction; + + PostPainterCallbackIup mPostPainterCallback; + PrePainterCallbackIup mPrePainterCallback; +}; + +class PPainterIup: public Painter +{ + public: + PPainterIup(Ihandle *ih); + virtual ~PPainterIup(); + cdCanvas *_cdcanvas; /* iup drawing surface */ + cdCanvas *_cddbuffer; /* double buffer drawing surface */ + PPlot _plot; /* plot data holder */ + int _redraw; /* must update the double buffer before flush */ + int _currentDataSetIndex; /* dataset index used for DS_ attributes in SetAttribute and GetAttribute */ + + // Called from C functions + void Draw(int force); // paint the stuff + void Resize(); // called when resizing + void MouseButton(int btn, int stat, int x, int y, char *r); // mouse event + void MouseMove(int x, int y); // mouse event + void KeyPress(int c, int press); // keyboard event + void DrawTo(cdCanvas *usrCnv); // send plot to some user defined device + + protected: + InteractionContainer *_InteractionContainer; + Ihandle *_ih; // IUP handle + short int _mouseDown; + short int _mouse_ALT; + short int _mouse_SHIFT; + short int _mouse_CTRL; + + PPainterIup() { }; + + virtual void FillArrow(int inX1, int inY1, int inX2, int inY2, int inX3, int inY3); + virtual void DrawLine(float inX1, float inY1, float inX2, float inY2); + virtual void FillRect(int inX, int inY, int inW, int inH); + virtual void InvertRect(int inX, int inY, int inW, int inH); + virtual void SetClipRect(int inX, int inY, int inW, int inH); + virtual long GetWidth() const; + virtual long GetHeight() const; + virtual void SetLineColor(int inR, int inG, int inB); + virtual void SetFillColor(int inR, int inG, int inB); + virtual long CalculateTextDrawSize(const char *inString); + virtual long GetFontHeight() const; + virtual void DrawText(int inX, int inY, short align, const char *inString); + virtual void DrawRotatedText(int inX, int inY, float inDegrees, + short align, const char *inString); + virtual void SetStyle(const PStyle &inStyle); + + private: + +}; // PPainterIup + + +#endif /* #ifndef __IUP_PPLOT_HPP */ diff --git a/iup/srcpplot/make_uname b/iup/srcpplot/make_uname new file mode 100755 index 0000000..cc4b881 --- /dev/null +++ b/iup/srcpplot/make_uname @@ -0,0 +1,3 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake $1 $2 $3 $4 $5 $6 $7 diff --git a/iup/srcpplot/make_uname.bat b/iup/srcpplot/make_uname.bat new file mode 100755 index 0000000..f0a0722 --- /dev/null +++ b/iup/srcpplot/make_uname.bat @@ -0,0 +1,4 @@ +@echo off +REM This builds all the libraries of the folder for 1 uname + +call tecmake %1 %2 %3 %4 %5 %6 diff --git a/iup/srcview/Makefile b/iup/srcview/Makefile new file mode 100755 index 0000000..1779960 --- /dev/null +++ b/iup/srcview/Makefile @@ -0,0 +1,9 @@ + +.PHONY: do_all iupview iupviewgtk +do_all: iupview + +iupview: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak + +iupviewgtk: + @$(MAKE) --no-print-directory -f ../tecmake_compact.mak USE_GTK=Yes diff --git a/iup/srcview/config.mak b/iup/srcview/config.mak new file mode 100755 index 0000000..4967582 --- /dev/null +++ b/iup/srcview/config.mak @@ -0,0 +1,59 @@ +PROJNAME = iup +APPNAME = iupview +OPT = YES + +SRC = iup_view.c + +IUP := .. + +LINKER = $(CPPC) + +USE_CD = Yes +USE_IUPCONTROLS = Yes +USE_IUP3 = Yes + +# ifdef USE_GTK +# ifndef GTK_DEFAULT +# # Build GTK version in IRIX,SunOS,AIX,Win32 +# APPNAME = iupviewgtk +# endif +# else +# ifdef GTK_DEFAULT +# # Build Motif version in Linux,Darwin,FreeBSD +# USE_MOTIF = Yes +# APPNAME = iupviewmot +# endif +# endif + +ifeq "$(TEC_UNAME)" "SunOS510x86" + DEFINES = USE_NO_OPENGL +else + USE_OPENGL = Yes +endif + +USE_IM = Yes +ifdef USE_IM + DEFINES += USE_IM + ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + LIBS = iupim iupimglib + else + IUPLIB = $(IUP)/lib/$(TEC_UNAME) + SLIB = $(IUPLIB)/libiupim.a $(IUPLIB)/libiupimglib.a + endif +endif + +USE_STATIC = Yes + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + SRC += ../etc/iup.rc +endif + +INCLUDES = ../src + +ifeq ($(TEC_UNAME), vc8) + ifdef DBG + #debug info not working for vc8 linker + define DBG + endef + endif +endif diff --git a/iup/srcview/iup_view.c b/iup/srcview/iup_view.c new file mode 100755 index 0000000..f6d400b --- /dev/null +++ b/iup/srcview/iup_view.c @@ -0,0 +1,851 @@ +#include +#include +#include +#include +#include + +#include "iup.h" +#include "iupcontrols.h" +#include "iupgl.h" +#include "iup_str.h" + + +#define MAX_NAMES 500 + +#ifdef USE_IM +#include "iupim.h" +#endif + +/* IupImage internal function, used only here */ +int iupSaveImageAsText(Ihandle* ih, FILE* packfile, const char* format, const char* name); + +/* IupImageLib internal function, used only here */ +void iupImageLibLoadAll(void); + +static int close_cb(void) +{ + return IUP_CLOSE; +} + +static int about_cb(void) +{ + IupMessage("About", " IupView\n\n" + "Show dialogs and popup menus\n" + "defined in LED files.\n" + "Can show all defined images.\n" + "Can import and export images.\n" + ); + return IUP_DEFAULT; +} + +static int inactivetoggle_cb(Ihandle* self, int v) +{ + Ihandle* tabs = (Ihandle*)IupGetAttribute(self, "TABS"); + Ihandle* child = IupGetNextChild(tabs, NULL); + while(child) + { + IupSetAttribute(child, "ACTIVE", v?"NO":"YES"); + child = IupGetNextChild(tabs, child); + } + return IUP_DEFAULT; +} + +static int imagebutton_cb(Ihandle* self) +{ + Ihandle* label = (Ihandle*)IupGetAttribute(self, "_INFO_LABEL"); + IupSetAttribute(label, "TITLE", IupGetAttribute(self, "_INFO")); + return IUP_DEFAULT; +} + +static int showallimages_cb(void) +{ + Ihandle *dialog, *box, *files, *tabs, *toggle, *label; + Ihandle* params[500]; + char *names[MAX_NAMES]; + int i, n = 0, num_names = IupGetAllNames(names, MAX_NAMES); + files = IupUser(); + for (i = 0; i < num_names; i++) + { + Ihandle* elem = IupGetHandle(names[i]); + char* type = IupGetClassType(elem); + + if (iupStrEqual(type, "image")) + { + Ihandle *tbox, *lbox, *button; + + /* show only loaded images */ + char* file_title = IupGetAttribute(elem, "_FILE_TITLE"); + if (!file_title) + continue; + + tbox = (Ihandle*)IupGetAttribute(files, file_title); + if (!tbox) + { + tbox = IupVbox(NULL); + IupSetAttribute(files, file_title, (char*)tbox); + IupSetAttribute(tbox, "TABTITLE", file_title); + params[n] = tbox; + n++; + } + + lbox = (Ihandle*)IupGetAttribute(tbox, file_title); + if (!lbox || IupGetInt(lbox, "LINE_COUNT") == 10) + { + lbox = IupHbox(NULL); + IupAppend(tbox, lbox); + IupSetAttribute(tbox, file_title, (char*)lbox); + IupSetAttribute(lbox, "LINE_COUNT", "0"); + } + + button = IupButton("", NULL); + IupSetAttribute(button, "IMAGE", names[i]); + IupSetfAttribute(button, "_INFO", "%s [%d,%d]", names[i], IupGetInt(elem, "WIDTH"), IupGetInt(elem, "HEIGHT")); + IupSetCallback(button, "ACTION", (Icallback)imagebutton_cb); + IupAppend(lbox, button); + IupSetfAttribute(lbox, "LINE_COUNT", "%d", IupGetInt(lbox, "LINE_COUNT")+1); + } + } + + if (n == 0) + { + IupMessage("Error", "No images."); + return IUP_DEFAULT; + } + + params[n] = NULL; + + box = IupVbox(toggle = IupToggle("INACTIVE", NULL), + tabs = IupTabsv(params), + label = IupLabel(""), + NULL); + IupSetAttribute(box, "MARGIN", "10x10"); + IupSetAttribute(box, "GAP", "10"); + IupSetAttribute(tabs, "ALIGNMENT", "NW"); + IupSetAttribute(tabs, "SIZE", "150x80"); + IupSetCallback(toggle, "ACTION", (Icallback)inactivetoggle_cb); + IupSetAttribute(toggle, "TABS", (char*)tabs); + IupSetAttribute(label, "EXPAND", "HORIZONTAL"); + + dialog = IupDialog(box); + IupSetAttribute(dialog, "TITLE", "All Images"); + IupSetCallback(dialog, "CLOSE_CB", (Icallback)close_cb); + IupSetAttribute(dialog, "_INFO_LABEL", (char*)label); + + IupPopup(dialog, IUP_CENTER, IUP_CENTER); + + IupDestroy(dialog); + IupDestroy(files); + + return IUP_DEFAULT; +} + +static char* getfileformat(int all) +{ +#define NUM_FORMATS 8 + int ret, count = NUM_FORMATS; + static char *options[NUM_FORMATS] = { + "led", + "lua", + "c", + "h", + "ico", + "bmp", + "gif", + "png" + }; + + if (!all) + count = 4; + + ret = IupListDialog(1,"File Format",count,options,1,10,count+1,NULL); + if (ret == -1) + return NULL; + else + return options[ret]; +} + +static char* StrUpper(const char* sstr) +{ + static char buf[10]; + char* dstr = &buf[0]; + for (; *sstr; sstr++, dstr++) + *dstr = (char)toupper(*sstr); + *dstr = 0; + return buf; +} + +static char* getfolder(void) +{ + static char folder[1024]; + Ihandle *filedlg = IupFileDlg(); + + IupSetAttribute(filedlg, "DIALOGTYPE", "DIR"); + IupSetAttribute(filedlg, "TITLE", "Select Folder for Images"); + + IupPopup(filedlg, IUP_CENTER, IUP_CENTER); + + if (IupGetInt(filedlg, "STATUS") != -1) + { + strcpy(folder, IupGetAttribute(filedlg, "VALUE")); + IupDestroy(filedlg); + return folder; + } + + IupDestroy(filedlg); + return NULL; +} + +static int saveallimages_cb(void) +{ + char *names[MAX_NAMES]; + char* folder; + int i, n = 0, num_names = IupGetAllNames(names, MAX_NAMES); + + char* imgtype = getfileformat(1); + if (!imgtype) + return IUP_DEFAULT; + + folder = getfolder(); + if (!folder) + return IUP_DEFAULT; + + for (i = 0; i < num_names; i++) + { + Ihandle* elem = IupGetHandle(names[i]); + char* type = IupGetClassType(elem); + + if (iupStrEqual(type, "image")) + { + char file_name[1024] = ""; + + /* save only loaded images */ + char* file_title = IupGetAttribute(elem, "_FILE_TITLE"); + if (!file_title) + continue; + + strcpy(file_name, folder); + strcat(file_name, "/"); + strcat(file_name, file_title); + strcat(file_name, "_"); + strcat(file_name, names[i]); + strcat(file_name, "."); + strcat(file_name, imgtype); + + if (!IupSaveImageAsText(elem, file_name, imgtype, names[i])) + { +#ifdef USE_IM + if (!IupSaveImage(elem, file_name, StrUpper(imgtype))) /* already displayed an error message */ + return IUP_DEFAULT; +#else + IupMessage("Error", "Failed to save the image."); + return IUP_DEFAULT; +#endif + } + + n++; + } + } + + if (n == 0) + { + IupMessage("Error", "No images."); + return IUP_DEFAULT; + } + + return IUP_DEFAULT; +} + +static int GetSaveAsFile(char* file, const char* imgtype) +{ + Ihandle *gf; + int ret; + char *value; + + gf = IupFileDlg(); + IupSetAttribute(gf, "DIALOGTYPE", "SAVE"); + IupSetfAttribute(gf, "TITLE", "Save %s File", imgtype); + IupSetfAttribute(gf, "FILTER", "*.%s", imgtype); + IupSetAttribute(gf, "FILE", file); + IupPopup(gf, IUP_CENTER, IUP_CENTER); + + value = IupGetAttribute( gf, "VALUE" ); + if (value) strcpy( file, value ); + ret = IupGetInt( gf, "STATUS" ); + + IupDestroy(gf); + + return ret; +} + +static void replaceDot(char* file_name) +{ + /* replace all "." by "_" */ + /* replace all "-" by "_" */ + while(*file_name) + { + if (*file_name == '.') + *file_name = '_'; + if (*file_name == '-') + *file_name = '_'; + + file_name++; + } +} + +static char* strdup_free(const char* str, char* str_ptr) +{ + int len = strlen(str); + char* tmp = malloc(len+1); + memcpy(tmp, str, len+1); + free(str_ptr); + return tmp; +} + +static char* mainGetFileTitle(const char* file_name) +{ + int i, last = 1, len = strlen(file_name); + char* file_title = malloc(len+1); + char* dot, *ft_str = file_title; + + memcpy(file_title, file_name, len+1); + + dot = strchr(file_title, '.'); + if (dot) *dot = 0; + + for(i = len-1; i >= 0; i--) + { + if (last && file_title[i] == '.') + { + /* cut last "." forward */ + file_title[i] = 0; + last = 0; + } + + if (file_title[i] == '\\' || file_title[i] == '/') + { + replaceDot(file_title+i+1); + return strdup_free(file_title+i+1, ft_str); + } + } + + replaceDot(file_title); + return strdup_free(file_title, ft_str); +} + +static int saveallimagesone_cb(void) +{ + char file_name[1024] = "*."; + char *names[MAX_NAMES]; + int i, n = 0, num_names = IupGetAllNames(names, MAX_NAMES); + FILE* packfile = NULL; + + char* imgtype = getfileformat(0); + if (!imgtype) + return IUP_DEFAULT; + + strcat(file_name, imgtype); + if (GetSaveAsFile(file_name, imgtype) == -1) + return IUP_DEFAULT; + + for (i = 0; i < num_names; i++) + { + Ihandle* elem = IupGetHandle(names[i]); + char* type = IupGetClassType(elem); + + if (iupStrEqual(type, "image")) + { + /* save only loaded images */ + char* file_title = IupGetAttribute(elem, "_FILE_TITLE"); + if (!file_title) + { + names[i] = NULL; + continue; + } + + if (!packfile) + packfile = fopen(file_name, "wb"); + + if (!packfile) + { + IupMessage("Error", "Failed to open the file."); + return IUP_DEFAULT; + } + + if (!iupSaveImageAsText(elem, packfile, imgtype, names[i])) + { + fclose(packfile); + IupMessage("Error", "Failed to write to the file."); + return IUP_DEFAULT; + } + + n++; + } + else + names[i] = NULL; + } + + if (packfile) + { + if (iupStrEqualNoCase(imgtype, "c")) /* only for C files */ + { + char* title = mainGetFileTitle(file_name); + fprintf(packfile, "void load_all_images_%s(void)\n{\n", title); + free(title); + + for (i = 0; i < num_names; i++) + { + if (names[i]) + fprintf(packfile, " IupSetHandle(\"IUP_%s\", load_image_%s());\n", names[i], names[i]); + } + fprintf(packfile, "}\n\n"); + } + + fclose(packfile); + } + + if (n == 0) + { + IupMessage("Error", "No images."); + return IUP_DEFAULT; + } + + return IUP_DEFAULT; +} + +static int saveimage_cb(Ihandle* self) +{ + Ihandle* list = (Ihandle*)IupGetAttribute(self, "mainList"); + char* name = IupGetAttribute(list, IupGetAttribute(list, "VALUE")); + + if (name) /* the list may be empty */ + { + Ihandle* elem = IupGetHandle(name); + char* type = IupGetClassType(elem); + + if (iupStrEqual(type, "image")) + { + char file_name[1024]; + + char* imgtype = getfileformat(1); + if (!imgtype) + return IUP_DEFAULT; + + sprintf(file_name, "%s.%s", name, imgtype); + if (GetSaveAsFile(file_name, imgtype) != -1) + { + if (!IupSaveImageAsText(elem, file_name, imgtype, name)) +#ifdef USE_IM + IupSaveImage(elem, file_name, StrUpper(imgtype)); /* already displayed an error message */ +#else + IupMessage("Error", "Failed to save the image."); +#endif + } + } + else + IupMessage("Error", "Not an image."); + } + else + IupMessage("Error", "No elements."); + + return IUP_DEFAULT; +} + +static int hideelem_cb(Ihandle* self) +{ + Ihandle* list = (Ihandle*)IupGetAttribute(self, "mainList"); + char* name = IupGetAttribute(list, IupGetAttribute(list, "VALUE")); + + if (name) /* the list may be empty */ + { + Ihandle* elem = IupGetHandle(name); + char* type = IupGetClassName(elem); + + if (iupStrEqual(type, "dialog")) + IupHide(elem); + else + { + Ihandle* dialog = IupGetDialog(elem); + if (dialog) + IupHide(dialog); + else + IupMessage("Error", "Will only hide dialogs."); + } + } + else + IupMessage("Error", "No elements."); + + return IUP_DEFAULT; +} + +static int showelem_cb(Ihandle* self) +{ + Ihandle* list = (Ihandle*)IupGetAttribute(self, "mainList"); + char* name = IupGetAttribute(list, IupGetAttribute(list, "VALUE")); + + if (name) /* the list may be empty */ + { + Ihandle* elem = IupGetHandle(name); + char* type = IupGetClassName(elem); + + if (iupStrEqual(type, "dialog")) + IupShow(elem); + else + { + Ihandle* dialog = IupGetDialog(elem); + if (dialog) + IupShow(dialog); + else + { + if (iupStrEqual(type, "menu")) + IupPopup(elem, IUP_MOUSEPOS, IUP_MOUSEPOS); + else + IupMessage("Error", "Will only show dialogs and independent menus."); + } + } + } + else + IupMessage("Error", "No elements."); + + return IUP_DEFAULT; +} + +static int list_dbclick_cb(Ihandle* self, int i, char *t) +{ + (void)i; + (void)t; + showelem_cb(self); + return IUP_DEFAULT; +} + +static int list_cb(Ihandle* self, char *t, int i, int v) +{ + if (v == 1) + { + char str_elem[100]; + Ihandle* elem = IupGetHandle(t); + Ihandle* label = (Ihandle*)IupGetAttribute(self, "mainLabel"); + sprintf(str_elem, "FileTitle: %s - Type: %s", IupGetAttribute(elem, "_FILE_TITLE"), IupGetClassName(elem)); + IupStoreAttribute(label, "TITLE", str_elem); + } + (void)i; + return IUP_DEFAULT; +} + +static void mainUpdateInternals(void) +{ + char *names[MAX_NAMES]; + int i, num_names = IupGetAllNames(names, MAX_NAMES); + for (i = 0; i < num_names; i++) + { + Ihandle* elem = IupGetHandle(names[i]); + + if (!IupGetAttribute(elem, "_FILE_TITLE")) + IupSetAttribute(elem, "_INTERNAL", "YES"); + } +} + +static int destroyall_cb(Ihandle* self) +{ + char *names[MAX_NAMES]; + Ihandle* list = (Ihandle*)IupGetAttribute(self, "mainList"); + int i, num_names = IupGetAllNames(names, MAX_NAMES); + for (i = 0; i < num_names; i++) + { + Ihandle* elem = IupGetHandle(names[i]); + + if (elem && IupGetInt(elem, "_INTERNAL") == 0) + { + char* type = IupGetClassName(elem); + + if (iupStrEqual(type, "dialog")) + IupDestroy(elem); + else + { + Ihandle* dialog = IupGetDialog(elem); + if (!dialog) + IupDestroy(elem); + } + } + } + IupSetAttribute(list, "1", NULL); + IupSetAttribute(list, "VALUE", "1"); + return IUP_DEFAULT; +} + +static void mainUpdateList(Ihandle* self, const char* file_name) +{ + char *names[MAX_NAMES]; + char str_item[20]; + Ihandle* list = (Ihandle*)IupGetAttribute(self, "mainList"); + int i, n = 0, num_names = IupGetAllNames(names, MAX_NAMES); + char* file_title = mainGetFileTitle(file_name); + for (i = 0; i < num_names; i++) + { + Ihandle* elem = IupGetHandle(names[i]); + + if (IupGetInt(elem, "_INTERNAL") == 0) + { + sprintf(str_item, "%d", n+1); + IupSetAttribute(list, str_item, names[i]); + + if (!IupGetAttribute(elem, "_FILE_TITLE")) + IupStoreAttribute(elem, "_FILE_TITLE", file_title); + n++; + } + } + sprintf(str_item, "%d", n+1); + IupSetAttribute(list, str_item, NULL); + + if (n != 0) + { + IupSetAttribute(list, "VALUE", "1"); + list_cb(list, IupGetAttribute(list, "1"), -1, 1); + } + + free(file_title); +} + +static int loadimagelib_cb(Ihandle* self) +{ + mainUpdateInternals(); + + iupImageLibLoadAll(); + + mainUpdateList(self, "ImageLib"); + + return IUP_DEFAULT; +} + +static int loadled_cb(Ihandle* self) +{ + char file_name[1024] = "./*.led"; + int ret = IupGetFile(file_name); + if (ret == 0) + { + char* error; + + mainUpdateInternals(); + + error = IupLoad(file_name); + if (error) + IupMessage("Error", error); + else + mainUpdateList(self, file_name); + } + return IUP_DEFAULT; +} + +#ifdef USE_IM +#ifdef WIN32 +static char* ParseFile(const char* dir, const char* FileName, int *offset) +{ + const char* file = FileName; + while (*file != 0 && *file != '|') + file++; + + if (file == FileName) + return NULL; + + { + int size = file - FileName + 1; + int dir_size = strlen(dir); + char* file_name = malloc(size+dir_size+1); + memcpy(file_name, dir, dir_size); + file_name[dir_size] = '\\'; + memcpy(file_name+dir_size+1, FileName, size-1); + file_name[size+dir_size] = 0; + *offset += size; + return file_name; + } +} + +static char* ParseDir(const char* FileName, int *offset) +{ + const char* file = FileName; + while (*file != 0 && *file != '|') + file++; + + if (*file == 0) + return NULL; + + { + int size = file - FileName + 1; + char* dir = malloc(size); + memcpy(dir, FileName, size-1); + dir[size-1] = 0; + *offset = size; + return dir; + } +} +#endif + +static void LoadImageFile(Ihandle* self, const char* file_name) +{ + Ihandle* new_image = IupLoadImage(file_name); + if (new_image) + { + char* file_title = mainGetFileTitle(file_name); + IupSetHandle(file_title, new_image); + free(file_title); + mainUpdateList(self, file_name); + } +} + +static int GetOpenFileName(char* file) +{ + Ihandle *gf; + int ret; + char *value; + + gf = IupFileDlg(); + IupSetAttribute(gf, "DIALOGTYPE", "OPEN"); + IupSetAttribute(gf, "TITLE", "Load Image File(s)"); + IupSetAttribute(gf, "MULTIPLEFILES", "YES"); + IupPopup(gf, IUP_CENTER, IUP_CENTER); + + value = IupGetAttribute(gf, "VALUE"); + if (value) strcpy(file, value); + ret = IupGetInt(gf, "STATUS"); + + IupDestroy(gf); + + return ret; +} + +static int loadimage_cb(Ihandle* self) +{ + char FileName[2000] = "*.*"; + + /* Retrieve a file name */ + if (GetOpenFileName(FileName) == -1) + return IUP_DEFAULT; + + mainUpdateInternals(); + +#ifdef WIN32 + /* parse multiple files */ + { + int offset; + char* file_name; + char* dir = ParseDir(FileName, &offset); + if (dir) + { + while ((file_name = ParseFile(dir, FileName + offset, &offset)) != NULL) + { + LoadImageFile(self, file_name); + free(file_name); + } + free(dir); + } + else + LoadImageFile(self, FileName); + } +#else + LoadImageFile(self, FileName); +#endif + + return IUP_DEFAULT; +} +#endif + +static int dropfile_cb(Ihandle *self, char* file_name) +{ + char* error; + + mainUpdateInternals(); + + error = IupLoad(file_name); + if (error) + IupMessage("Error", error); + else + mainUpdateList(self, file_name); + + return IUP_DEFAULT; +} + +static Ihandle* mainDialog(void) +{ + Ihandle *main_dialog, *box, *menu, *list, *label; + + menu = IupMenu( + IupSubmenu("File", IupMenu( + IupSetCallbacks(IupItem("Load Led...", NULL), "ACTION", (Icallback)loadled_cb, NULL), + IupSetCallbacks(IupItem("Load Image Lib", NULL), "ACTION", (Icallback)loadimagelib_cb, NULL), + IupSeparator(), +#ifdef USE_IM + IupSetCallbacks(IupItem("Import Image(s)...", NULL), "ACTION", (Icallback)loadimage_cb, NULL), +#endif + IupSeparator(), + IupSetCallbacks(IupItem("Exit", NULL), "ACTION", (Icallback)close_cb, NULL), + NULL)), + IupSubmenu("Element", IupMenu( + IupSetCallbacks(IupItem("Show...", NULL), "ACTION", (Icallback)showelem_cb, NULL), + IupSetCallbacks(IupItem("Hide...", NULL), "ACTION", (Icallback)hideelem_cb, NULL), + IupSeparator(), + IupSetCallbacks(IupItem("Destroy All...", NULL), "ACTION", (Icallback)destroyall_cb, NULL), + IupSetCallbacks(IupItem("Show All Images...", NULL), "ACTION", (Icallback)showallimages_cb, NULL), + IupSeparator(), + IupSetCallbacks(IupItem("Save Image...", NULL), "ACTION", (Icallback)saveimage_cb, NULL), + IupSetCallbacks(IupItem("Save All Images...", NULL), "ACTION", (Icallback)saveallimages_cb, NULL), + IupSetCallbacks(IupItem("Save All Images (One File)...", NULL), "ACTION", (Icallback)saveallimagesone_cb, NULL), + NULL)), + IupSubmenu("Help", IupMenu( + IupSetCallbacks(IupItem("About...", NULL), "ACTION", (Icallback)about_cb, NULL), + NULL)), + NULL + ); + IupSetHandle("mainMenu", menu); + + box = IupVbox( + IupLabel("Elements:"), + list = IupList(NULL), + IupSetAttributes(IupFill(), "SIZE=2"), + IupFrame(label = IupLabel("")), + NULL); + IupSetAttribute(box, "MARGIN", "10x10"); + IupSetCallback(list, "ACTION", (Icallback)list_cb); + IupSetCallback(list, "DBLCLICK_CB", (Icallback)list_dbclick_cb); + + IupSetAttribute(list, "SIZE", "150x80"); + IupSetAttribute(list, "EXPAND", "YES"); + IupSetAttribute(label, "EXPAND", "HORIZONTAL"); + + main_dialog = IupDialog(box); + IupSetAttribute(main_dialog, "TITLE", "IupView"); + IupSetAttribute(main_dialog, "MENU", "mainMenu"); + IupSetAttribute(main_dialog, "mainList", (char*)list); + IupSetAttribute(main_dialog, "mainLabel", (char*)label); + IupSetCallback(main_dialog, "CLOSE_CB", (Icallback)close_cb); + IupSetCallback(main_dialog, "DROPFILES_CB", (Icallback)dropfile_cb); + + IupSetAttribute(menu, "mainList", (char*)list); + IupSetAttribute(menu, "mainLabel", (char*)label); + + return main_dialog; +} + +int main (int argc, char **argv) +{ + Ihandle* main_dialog; + + IupOpen(&argc, &argv); +#ifndef USE_NO_OPENGL + IupGLCanvasOpen(); +#endif + IupControlsOpen(); + IupImageLibOpen(); + + mainUpdateInternals(); + + main_dialog = mainDialog(); + IupShow(main_dialog); + + IupMainLoop(); + destroyall_cb(main_dialog); + IupDestroy(main_dialog); + + IupControlsClose(); + IupClose(); + return 0; +} + diff --git a/iup/srcview/iupview b/iup/srcview/iupview new file mode 100755 index 0000000..940f9ab --- /dev/null +++ b/iup/srcview/iupview @@ -0,0 +1,6 @@ +#!/bin/csh +# Script generated automatically by tecmake v3.19 +# Remove the comment bellow to set the LD_LIBRARY_PATH if needed. +#setenv LD_LIBRARY_PATH /lib/${TEC_UNAME}:/lib/${TEC_UNAME}:$LD_LIBRARY_PATH +if ( -r app.env ) source app.env +exec ../bin/$TEC_UNAME/iupview $* diff --git a/iup/srcview/iupview.bat b/iup/srcview/iupview.bat new file mode 100644 index 0000000..22f8434 --- /dev/null +++ b/iup/srcview/iupview.bat @@ -0,0 +1,3 @@ +@echo off +REM Script generated automatically by tecmake v3.20 +..\bin\Win64\iupview.exe %* diff --git a/iup/srcview/iupview.dep b/iup/srcview/iupview.dep new file mode 100644 index 0000000..4e8b9dc --- /dev/null +++ b/iup/srcview/iupview.dep @@ -0,0 +1,3 @@ +$(OBJDIR)/iup_view.o: iup_view.c ../include/iup.h ../include/iupkey.h \ + ../include/iupdef.h ../include/iupcontrols.h ../include/iupgl.h \ + ../src/iup_str.h ../include/iupim.h diff --git a/iup/srcview/make_uname b/iup/srcview/make_uname new file mode 100755 index 0000000..153c2d7 --- /dev/null +++ b/iup/srcview/make_uname @@ -0,0 +1,4 @@ +# This builds the executable for 1 uname + +tecmake relink $1 $2 $3 $4 $5 $6 $7 $8 +#tecmake USE_GTK=Yes relink $1 $2 $3 $4 $5 $6 $7 $8 diff --git a/iup/srcview/make_uname.bat b/iup/srcview/make_uname.bat new file mode 100755 index 0000000..ab63bd3 --- /dev/null +++ b/iup/srcview/make_uname.bat @@ -0,0 +1,26 @@ +@echo off + +if "%1"=="" goto iupexe32 +if "%1"=="vc8" goto iupexe32 +if "%1"=="vc8_64" goto iupexe64 +if "%1"=="all" goto iupexe +goto end + +:iupexe32 +call tecmake vc8 relink %2 %3 %4 %5 %6 %7 +#call tecmake vc8 "USE_GTK=Yes" relink %2 %3 %4 %5 %6 %7 +goto end + +:iupexe64 +call tecmake vc8_64 relink %2 %3 %4 %5 %6 %7 +#call tecmake vc8_64 "USE_GTK=Yes" relink %2 %3 %4 %5 %6 %7 +goto end + +:iupexe +call tecmake vc8 relink %2 %3 %4 %5 %6 %7 +#call tecmake vc8 "USE_GTK=Yes" relink %2 %3 %4 %5 %6 %7 +call tecmake vc8_64 relink %2 %3 %4 %5 %6 %7 +#call tecmake vc8_64 "USE_GTK=Yes" relink %2 %3 %4 %5 %6 %7 +goto end + +:end diff --git a/iup/tecmake_compact.mak b/iup/tecmake_compact.mak new file mode 100755 index 0000000..08e642e --- /dev/null +++ b/iup/tecmake_compact.mak @@ -0,0 +1,1172 @@ +#-------------------------------------------------------------------------# +#- Tecmake (Compact Version) -# +#- Generic Makefile to build applications and libraries at TeCGraf -# +#- The user makefile usually has the name "config.mak". -# +#-------------------------------------------------------------------------# + +# Tecmake Version +VERSION = 3.19 + +# First target +.PHONY: build +build: tecmake + + +#---------------------------------# +# System Variables Definitions + +# Base Defintions +TEC_SYSNAME:=$(shell uname -s) +TEC_SYSVERSION:=$(shell uname -r|cut -f1 -d.) +TEC_SYSMINOR:=$(shell uname -r|cut -f2 -d.) +TEC_SYSARCH:=$(shell uname -m) + +# Fixes +ifeq ($(TEC_SYSNAME), SunOS) + TEC_SYSARCH:=$(shell uname -p) +endif +ifeq ($(TEC_SYSNAME), IRIX) + TEC_SYSARCH:=$(shell uname -p) +endif +ifeq ($(TEC_SYSNAME), FreeBSD) + TEC_SYSMINOR:=$(shell uname -r|cut -f2 -d.|cut -f1 -d-) +endif +ifeq ($(TEC_SYSNAME), AIX) + TEC_SYSVERSION:=$(shell uname -v) + TEC_SYSMINOR:=$(shell uname -r) + TEC_SYSARCH:=ppc +endif +ifeq ($(TEC_SYSNAME), Darwin) + TEC_SYSARCH:=$(shell uname -p) +endif + +ifeq ($(TEC_SYSARCH), powerpc) + TEC_SYSARCH:=ppc +endif +ifeq ($(TEC_SYSARCH), i686) + TEC_SYSARCH:=x86 +endif +ifeq ($(TEC_SYSARCH), i386) + TEC_SYSARCH:=x86 +endif +ifeq ($(TEC_SYSARCH), x86_64) + TEC_SYSARCH:=x64 +endif + +# Compose +TEC_SYSRELEASE:=$(TEC_SYSVERSION).$(TEC_SYSMINOR) +TEC_UNAME:=$(TEC_SYSNAME)$(TEC_SYSVERSION)$(TEC_SYSMINOR) + +# Linux 2.4 and GCC 3.x +ifeq ($(TEC_UNAME), Linux24) + GCCVER:=$(shell gcc -dumpversion|cut -f1 -d.) + ifeq ($(GCCVER), 3) + TEC_UNAME:=$(TEC_UNAME)g3 + endif +endif + +# Linux 2.6 and GCC 4.x +ifeq ($(TEC_UNAME), Linux26) + GCCVER:=$(shell gcc -dumpversion|cut -f1 -d.) + ifeq ($(GCCVER), 4) + TEC_UNAME:=$(TEC_UNAME)g4 + endif +endif + +# Linux and PowerPC +ifeq ($(TEC_SYSNAME), Linux) + ifeq ($(TEC_SYSARCH), ppc) + TEC_UNAME:=$(TEC_UNAME)ppc + endif +endif + +# 64-bits Linux +ifeq ($(TEC_SYSARCH), x64) + BUILD_64=Yes + TEC_UNAME:=$(TEC_UNAME)_64 +endif + +ifeq ($(TEC_SYSARCH), ia64) + BUILD_64=Yes + TEC_UNAME:=$(TEC_UNAME)_ia64 +endif + +# Solaris and Intel +ifeq ($(TEC_SYSNAME), SunOS) + ifeq ($(TEC_SYSARCH) , x86) + TEC_UNAME:=$(TEC_UNAME)x86 + endif +endif + +# Darwin and Intel +ifeq ($(TEC_SYSNAME), Darwin) +ifeq ($(TEC_SYSARCH), x86) + TEC_UNAME:=$(TEC_UNAME)x86 + endif +endif + +# System Info +.PHONY: sysinfo +sysinfo: + @echo ''; echo 'Tecmake - System Info' + @echo 'TEC_SYSNAME = $(TEC_SYSNAME)' + @echo 'TEC_SYSVERSION = $(TEC_SYSVERSION)' + @echo 'TEC_SYSMINOR = $(TEC_SYSMINOR)' + @echo 'TEC_SYSARCH = $(TEC_SYSARCH)' + @echo 'TEC_UNAME = $(TEC_UNAME)'; echo '' + +#---------------------------------# +# Directories Definitions +PROJDIR = .. +SRCDIR = . +OBJROOT = $(PROJDIR)/obj + + +#---------------------------------# +# Byte Order and Word Size + +ifneq ($(findstring x86, $(TEC_SYSARCH)), ) + TEC_BYTEORDER = TEC_LITTLEENDIAN +else +ifeq ($(TEC_SYSARCH), arm) + TEC_BYTEORDER = TEC_LITTLEENDIAN +else + TEC_BYTEORDER = TEC_LITTLEENDIAN +endif +endif + +ifeq ($(TEC_SYSARCH), x64) + TEC_WORDSIZE = TEC_64 +else +ifdef BUILD_64 + TEC_WORDSIZE = TEC_64 +else + TEC_WORDSIZE = TEC_32 +endif +endif + +# Itanium Exception +ifeq ($(TEC_SYSARCH), ia64) + TEC_BYTEORDER = TEC_LITTLEENDIAN + TEC_WORDSIZE = TEC_64 +endif + + +#---------------------------------# +# Compilation Flags +STDFLAGS := -Wall +STDDEFS := -DTEC_UNAME=$(TEC_UNAME) -DTEC_SYSNAME=$(TEC_SYSNAME) -D$(TEC_SYSNAME)=$(TEC_SYSRELEASE) -D$(TEC_BYTEORDER) -D$(TEC_WORDSIZE) -DFUNCPROTO=15 +STDINCS := +OPTFLAGS := -O3 +STDLFLAGS := r +DEBUGFLAGS := -g +STDLDFLAGS := -shared +DLIBEXT := so + +ifneq ($(findstring Linux, $(TEC_UNAME)), ) + GTK_DEFAULT := +endif +ifneq ($(findstring Darwin, $(TEC_UNAME)), ) + GTK_DEFAULT := +endif +ifneq ($(findstring FreeBSD, $(TEC_UNAME)), ) + GTK_DEFAULT := +endif +ifneq ($(findstring Linux24, $(TEC_UNAME)), ) + GTK_DEFAULT := +endif + +#---------------------------------# +# Build Tools + +CC := $(TEC_TOOLCHAIN)gcc +CPPC := $(TEC_TOOLCHAIN)g++ +FF := $(TEC_TOOLCHAIN)g77 +RANLIB := $(TEC_TOOLCHAIN)ranlib +AR := $(TEC_TOOLCHAIN)ar +DEBUGGER := $(TEC_TOOLCHAIN)gdb +RCC := $(TEC_TOOLCHAIN)windres +LD := $(TEC_TOOLCHAIN)gcc + +ifeq ($(TEC_UNAME), gcc2) + ifdef USE_GCC_2 + CC := $(CC)-2 + CPPC := $(CPPC)-2 + FF := $(FF)-2 + endif +endif + + +#---------------------------------# +# User Configuration File + +MAKENAME = config.mak + +ifdef MF + MAKENAME = $(MF).mak +endif + +################### +include $(MAKENAME) +################### + + +#---------------------------------# +# Definitions of public variables + +ifdef LIBNAME + TARGETNAME = $(LIBNAME) + MAKETYPE = LIB +else + TARGETNAME = $(APPNAME) + MAKETYPE = APP +endif + +ifndef TARGETNAME + $(error LIBNAME nor APPNAME defined in $(MAKENAME)) +endif + +PROJNAME ?= $(TARGETNAME) + +DEPEND := $(TARGETNAME).dep + +ifdef DEPENDDIR + DEPEND := $(DEPENDDIR)/$(TARGETNAME).dep.$(TEC_UNAME) +endif + +SRCLUADIR ?= $(SRCDIR) +LOHDIR ?= $(SRCLUADIR) + +ifeq ($(MAKETYPE), APP) + TARGETROOT ?= $(PROJDIR)/bin +else + TARGETROOT ?= $(PROJDIR)/lib +endif + +ifneq ($(PROJNAME), $(TARGETNAME)) + OBJROOT := $(OBJROOT)/$(TARGETNAME) +endif + +ifdef DBG + STDFLAGS += $(DEBUGFLAGS) + STDDEFS += -DDEBUG +else + STDDEFS += -DNDEBUG + ifdef OPT + STDFLAGS += $(OPTFLAGS) + ifeq ($(findstring gcc, $(TEC_UNAME)), ) + STRIP ?= Yes + endif + endif +endif + +ifdef BUILD_64 + ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + USE_CC = Yes + BUILD_64_DIR = Yes + endif + ifneq ($(findstring AIX, $(TEC_UNAME)), ) + USE_CC = Yes + BUILD_64_DIR = Yes + endif + ifneq ($(findstring IRIX, $(TEC_UNAME)), ) + USE_CC = Yes + BUILD_64_DIR = Yes + endif +endif + +ifdef USE_CC + CC := cc + CPPC := CC + STDFLAGS = + ifdef USE_CC_DIR + TEC_UNAME := $(TEC_UNAME)cc + endif +endif + +ifdef BUILD_64 + ifdef BUILD_64_DIR + TEC_UNAME := $(TEC_UNAME)_64 + endif +endif + +ifneq ($(findstring gcc, $(TEC_UNAME)), ) + ifeq ($(MAKETYPE), APP) + TEC_UNAME_DIR ?= $(TEC_SYSNAME) + endif +endif + +TEC_UNAME_DIR ?= $(TEC_UNAME) +ifdef DBG + ifdef DBG_DIR + TEC_UNAME_DIR := $(TEC_UNAME_DIR)d + endif +endif + +OBJDIR := $(OBJROOT)/$(TEC_UNAME_DIR) +TARGETDIR := $(TARGETROOT)/$(TEC_UNAME_DIR) + +# Change linker if any C++ source +ifndef LINKER + ifneq "$(findstring .cpp, $(SRC))" "" + LINKER := $(CPPC) + else + LINKER := $(CC) + endif +endif + + +#---------------------------------# +# LO and LOH Suffix + +ifeq ($(TEC_BYTEORDER), TEC_BIGENDIAN) + ifeq ($(TEC_WORDSIZE), TEC_64) + LO_SUFFIX ?= _be64 + else + LO_SUFFIX ?= _be32 + endif +else + ifeq ($(TEC_WORDSIZE), TEC_64) + LO_SUFFIX ?= _le64 + else + LO_SUFFIX ?= + endif +endif + + +#---------------------------------# +# Platform specific variables + +# Definicoes para o X11 +X11_LIBS := Xmu Xt Xext X11 +#X11_LIB := +#X11_INC := #include + +# Definicoes para o OpenGL +OPENGL_LIBS := GLU GL +#OPENGL_LIB := +#OPENGL_INC := #include and possibly +MOTIFGL_LIB := GLw #include + +# Definicoes para o Motif +#MOTIF_LIB := +#MOTIF_INC := #include + +# Definicoes para o GLUT +#GLUT_LIB := +#GLUT_INC := + + +ifneq ($(findstring cygw, $(TEC_UNAME)), ) + NO_DYNAMIC ?= Yes + ifdef BUILD_64 + X11_LIB := /usr/X11R6/lib64 + else + X11_LIB := /usr/X11R6/lib + endif + X11_INC := /usr/X11R6/include + MOTIFGL_LIB := +endif + +ifneq ($(findstring Linux, $(TEC_UNAME)), ) + ifdef BUILD_64 + ifeq ($(TEC_SYSARCH), ia64) + STDFLAGS += -fPIC + X11_LIB := /usr/X11R6/lib + else + STDFLAGS += -m64 -fPIC + X11_LIB := /usr/X11R6/lib64 + endif + else + X11_LIB := /usr/X11R6/lib + endif + X11_INC := /usr/X11R6/include + MOTIFGL_LIB := +endif + +ifneq ($(findstring IRIX, $(TEC_UNAME)), ) # any IRIX + LD = ld + STDLDFLAGS := -elf -shared -rdata_shared -soname lib$(TARGETNAME).so + RANLIB := /bin/true + X11_LIBS := Xmu Xt X11 + ifdef BUILD_64 + ifdef USE_CC + STDFLAGS += -64 -KPIC + STDLDFLAGS += -64 + LINKER += -64 + endif + X11_LIB := /usr/lib64 + MOTIF_LIB := /usr/Motif-2.1/lib64 + else + X11_LIB := /usr/lib32 + MOTIF_LIB := /usr/Motif-2.1/lib32 + endif + MOTIF_INC = /usr/Motif-2.1/include +endif + +ifneq ($(findstring AIX, $(TEC_UNAME)), ) + NO_DYNAMIC ?= Yes + ifdef BUILD_64 + ifdef USE_CC + STDFLAGS += -q64 # to compilers C and C++ + STDLFLAGS := -X64 $(STDLFLAGS) # to librarian + STDLDFLAGS += -64 + LINKER += -q64 # to linker + endif + endif +endif + +ifneq ($(findstring HP-UX, $(TEC_UNAME)), ) + NO_DYNAMIC ?= Yes + MOTIF_INC := /usr/include/Motif2.1 + X11_LIBS := Xt Xext X11 + OPENGL_LIB := /opt/graphics/OpenGL/lib + OPENGL_INC := /opt/graphics/OpenGL/include + STDDEFS := -DTEC_UNAME=$(TEC_UNAME) -DTEC_SYSNAME=$(TEC_SYSNAME) -D$(TEC_BYTEORDER) -D$(TEC_WORDSIZE) -DFUNCPROTO=15 + CC := aCC + CPPC := aCC + LINKER := aCC +endif + +ifneq ($(findstring SunOS, $(TEC_UNAME)), ) + LD = ld + STDLDFLAGS := -G + X11_INC := /usr/openwin/share/include + X11_LIB := /usr/openwin/lib + MOTIF_INC := /usr/dt/share/include + MOTIF_LIB := /usr/dt/lib + OPENGL_INC := /usr/openwin/share/include/X11 + GLUT_LIB := /usr/local/glut-3.7/lib/glut + GLUT_INC := /usr/local/glut-3.7/include + ifdef BUILD_64 + ifdef USE_CC + STDFLAGS += -xarch=v9 -KPIC + # have to force these PATHs because of a conflict with standard PATHs + STDLDFLAGS += -64 -L/usr/lib/64 -L/usr/ucblib/sparcv9 + LINKER += -xarch=v9 + endif + endif +endif + +ifneq ($(findstring Darwin, $(TEC_UNAME)), ) + X11_LIBS := Xmu Xp Xt Xext X11 + X11_LIB := /usr/X11R6/lib + X11_INC := /usr/X11R6/include + MOTIF_INC := /usr/OpenMotif/include + MOTIF_LIB := /usr/OpenMotif/lib + ifdef BUILD_DYLIB + STDLDFLAGS := -dynamiclib -install_name lib$(TARGETNAME).dylib + DLIBEXT := dylib + else + STDLDFLAGS := -bundle -undefined dynamic_lookup + endif +endif + +ifneq ($(findstring FreeBSD, $(TEC_UNAME)), ) + X11_LIB := /usr/X11R6/lib + X11_INC := /usr/X11R6/include +endif + + +################################ +# Allows an extra configuration file. +ifdef EXTRA_CONFIG +include $(EXTRA_CONFIG) +endif +################################ + + +#---------------------------------# +# Tecgraf Libraries Location +TECTOOLS_HOME ?= ../.. + +IUP ?= $(TECTOOLS_HOME)/iup +CD ?= $(TECTOOLS_HOME)/cd +IM ?= $(TECTOOLS_HOME)/im +LUA ?= $(TECTOOLS_HOME)/lua +LUA51 ?= $(TECTOOLS_HOME)/lua5.1 + + +#---------------------------------# +# Pre-defined libraries + +# Library order: +# user + iupcd + cd + iup + motif + X +# Library path order is the oposite + +USE_MOTIF = Yes + +ifdef USE_LUA + LUASUFX := + LIBLUASUFX := 3 +endif + +ifdef USE_LUA4 + LUASUFX := 4 + LIBLUASUFX := 4 + override USE_LUA = Yes + LUA := $(LUA4) +endif + +ifdef USE_LUA5 + LUASUFX := 5 + LIBLUASUFX := 5 + override USE_LUA = Yes + LUA := $(LUA5) +endif + +ifdef USE_LUA50 + LUASUFX := 50 + LIBLUASUFX := 5 + override USE_LUA = Yes + LUA := $(LUA50) + NO_LUALIB := Yes +endif + +ifdef USE_LUA51 + LUASUFX := 5.1 + LIBLUASUFX := 51 + override USE_LUA = Yes + LUA := $(LUA51) + NO_LUALIB := Yes +endif + +ifdef USE_IUP3 + override USE_IUP = Yes +endif + +ifdef USE_IUP3BETA + IUP := $(IUP)3 +endif + +ifdef USE_IUPBETA + IUP := $(IUP)/beta +endif + +ifdef USE_CDBETA + CD := $(CD)/beta +endif + +ifdef USE_IMBETA + IM := $(IM)/beta +endif + +ifdef USE_GLUT + override USE_OPENGL = Yes +endif + +ifdef USE_IUPCONTROLS + override USE_CD = Yes + override USE_IUP = Yes + ifdef USE_IUPLUA + ifdef USE_STATIC + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupluacontrols$(LIBLUASUFX).a + else + LIBS += iupluacontrols$(LIBLUASUFX) + endif + override USE_CDLUA = Yes + endif + ifdef USE_STATIC + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupcontrols.a + else + LIBS += iupcontrols + endif +endif + +ifdef USE_IMLUA + override USE_IM = Yes + ifdef USE_STATIC + SLIB += $(IM)/lib/$(TEC_UNAME)/libimlua$(LIBLUASUFX).a + else + LIBS += imlua$(LIBLUASUFX) + endif +endif + +ifdef USE_CDLUA + override USE_CD = Yes + ifdef USE_STATIC + ifdef USE_IUP + ifdef USE_OLDNAMES + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdluaiup$(LIBLUASUFX).a + endif + endif + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdlua$(LIBLUASUFX).a + else + ifdef USE_IUP + ifdef USE_OLDNAMES + LIBS += cdluaiup$(LIBLUASUFX) + endif + endif + LIBS += cdlua$(LIBLUASUFX) + endif +endif + +ifdef USE_IUPLUA + override USE_IUP = Yes + ifdef USE_STATIC + ifdef USE_CD + ifndef USE_OLDNAMES + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupluacd$(LIBLUASUFX).a + endif + endif + ifdef USE_OPENGL + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupluagl$(LIBLUASUFX).a + endif + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiuplua$(LIBLUASUFX).a + else + ifdef USE_CD + ifndef USE_OLDNAMES + LIBS += iupluacd$(LIBLUASUFX) + endif + endif + ifdef USE_OPENGL + LIBS += iupluagl$(LIBLUASUFX) + endif + LIBS += iuplua$(LIBLUASUFX) + endif +endif + +ifdef USE_LUA + LUA_LIB ?= $(LUA)/lib/$(TEC_UNAME) + ifdef USE_STATIC + ifndef NO_LUALIB + SLIB += $(LUA_LIB)/liblualib$(LUASUFX).a + endif + SLIB += $(LUA_LIB)/liblua$(LUASUFX).a + else + ifndef NO_LUALIB + LIBS += lualib$(LUASUFX) + endif + ifndef NO_LUALINK + LIBS += lua$(LUASUFX) + LDIR += $(LUA_LIB) + endif + endif + + LUA_INC ?= $(LUA)/include + INCLUDES += $(LUA_INC) + + LUA_BIN ?= $(LUA)/bin/$(TEC_UNAME) + BIN2C := $(LUA_BIN)/bin2c$(LUASUFX) + LUAC := $(LUA_BIN)/luac$(LUASUFX) + LUABIN := $(LUA_BIN)/lua$(LUASUFX) +endif + +ifdef USE_IUP + IUPSUFX := + ifdef USE_IUP3 + ifdef GTK_DEFAULT + ifdef USE_MOTIF + IUPSUFX := mot + else + override USE_GTK = Yes + endif + else + ifdef USE_GTK + IUPSUFX := gtk + else + override USE_MOTIF = Yes + endif + endif + else + override USE_MOTIF = Yes + endif + ifdef USE_STATIC + ifdef USE_CD + ifndef USE_OLDNAMES + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupcd.a + endif + endif + ifdef USE_OPENGL + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupgl.a + endif + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiup$(IUPSUFX).a + else + ifdef USE_CD + ifndef USE_OLDNAMES + LIBS += iupcd + endif + endif + ifdef USE_OPENGL + LIBS += iupgl + endif + LIBS += iup$(IUPSUFX) + LDIR += $(IUP)/lib/$(TEC_UNAME) + endif + INCLUDES += $(IUP)/include +endif + +ifdef USE_CD + override USE_X11 = Yes + ifdef USE_STATIC + ifdef USE_IUP + ifdef USE_OLDNAMES + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdiup.a + endif + endif + ifdef USE_XRENDER + ifdef USE_OLDNAMES + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdxrender.a + else + SLIB += $(CD)/lib/$(TEC_UNAME)/libcdcontextplus.a + endif + endif + SLIB += $(CD)/lib/$(TEC_UNAME)/libcd.a + ifdef USE_XRENDER + LIBS += Xrender Xft + else + ifndef USE_GTK + ifndef USE_OLDNAMES + # Freetype is included in GTK +# SLIB += $(CD)/lib/$(TEC_UNAME)/libfreetype.a + endif + endif + endif + else + ifdef USE_XRENDER + ifdef USE_OLDNAMES + LIBS += cdxrender + else + LIBS += cdcontextplus + endif + endif + LIBS += cd + LDIR += $(CD)/lib/$(TEC_UNAME) + ifdef USE_XRENDER + LIBS += Xrender Xft + else + ifndef USE_GTK + ifndef USE_OLDNAMES + # Freetype is included in GTK + LIBS += freetype + endif + endif + endif + endif + INCLUDES += $(CD)/include +endif + +ifdef USE_IM + ifdef USE_STATIC + SLIB += $(IM)/lib/$(TEC_UNAME)/libim.a + else + LIBS += im + LDIR += $(IM)/lib/$(TEC_UNAME) + endif + INCLUDES += $(IM)/include +endif + +# All except gcc in Windows (Cygwin) +ifeq ($(findstring gcc, $(TEC_UNAME)), ) + +ifdef USE_GLUT + LIBS += glut + LDIR += $(GLUT_LIB) + STDINCS += $(GLUT_INC) +endif + +ifdef USE_OPENGL + override USE_X11 = Yes + ifdef USE_MOTIF + LIBS += $(MOTIFGL_LIB) + endif + LIBS += $(OPENGL_LIBS) + LDIR += $(OPENGL_LIB) + STDINCS += $(OPENGL_INC) +endif + +ifdef USE_MOTIF + override USE_X11 = Yes + LIBS += Xm + LDIR += $(MOTIF_LIB) + STDINCS += $(MOTIF_INC) + ifneq ($(findstring Linux, $(TEC_UNAME)), ) + X11_LIBS := Xpm $(X11_LIBS) + endif + ifneq ($(findstring cygw, $(TEC_UNAME)), ) + X11_LIBS := Xpm $(X11_LIBS) + endif +endif + +ifdef USE_GTK +# ifneq ($(findstring Darwin, $(TEC_UNAME)), ) +# STDINCS += /Library/Frameworks/Gtk.framework/Headers +# STDINCS += /Library/Frameworks/GLib.framework/Headers +# STDINCS += /Library/Frameworks/Cairo.framework/Headers +# LFLAGS += -framework Gtk +# else + ifneq ($(findstring Darwin, $(TEC_UNAME)), ) + GTK_BASE := /sw + LDIR += /sw/lib + LIBS += freetype + else + GTK_BASE := /usr + endif + override USE_X11 = Yes + LIBS += gtk-x11-2.0 gdk-x11-2.0 gdk_pixbuf-2.0 pango-1.0 pangox-1.0 gobject-2.0 gmodule-2.0 glib-2.0 + STDINCS += $(GTK_BASE)/include/atk-1.0 $(GTK_BASE)/include/gtk-2.0 $(GTK_BASE)/include/cairo $(GTK_BASE)/include/pango-1.0 $(GTK_BASE)/include/glib-2.0 + ifeq ($(TEC_SYSARCH), x64) + STDINCS += $(GTK_BASE)/lib64/glib-2.0/include $(GTK_BASE)/lib64/gtk-2.0/include + else + ifeq ($(TEC_SYSARCH), ia64) + STDINCS += $(GTK_BASE)/lib64/glib-2.0/include $(GTK_BASE)/lib64/gtk-2.0/include + else + STDINCS += $(GTK_BASE)/lib/glib-2.0/include $(GTK_BASE)/lib/gtk-2.0/include + endif + endif + ifneq ($(findstring FreeBSD, $(TEC_UNAME)), ) + STDINCS += /lib/X11R6/include/gtk-2.0 + endif +# endif +endif + +ifdef USE_QT + override USE_X11 = Yes + LIBS += QtGui QtCore + QT_BASE_INC := /usr/include/qt4 + STDINCS += $(QT_BASE_INC) $(QT_BASE_INC)/QtCore $(QT_BASE_INC)/QtGui + STDDEFS += -DQT_DLL -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT +endif + +ifdef USE_X11 + LIBS += $(X11_LIBS) + LDIR += $(X11_LIB) + STDINCS += $(X11_INC) +endif + +LIBS += m + +else + # gcc in Windows + NO_DYNAMIC ?= Yes + STDDEFS += -DWIN32 + + ifdef USE_NOCYGWIN + STDFLAGS += -mno-cygwin + endif + + ifdef USE_GLUT + LIBS += glut32 + endif + + ifdef USE_OPENGL + LIBS += opengl32 glu32 glaux + endif + + LIBS += gdi32 winspool comdlg32 comctl32 ole32 + + ifdef USE_GTK + LIBS += gtk-win32-2.0 gdk-win32-2.0 gdk_pixbuf-2.0 pango-1.0 pangowin32-1.0 gobject-2.0 gmodule-2.0 glib-2.0 + #LDIR += $(GTK)/lib + GTK_INC = /usr + STDINCS += $(GTK_INC)/include/atk-1.0 $(GTK_INC)/include/gtk-2.0 $(GTK_INC)/include/cairo $(GTK_INC)/include/pango-1.0 $(GTK_INC)/include/glib-2.0 $(GTK_INC)/lib/glib-2.0/include $(GTK_INC)/lib/gtk-2.0/include + endif + + APPTYPE ?= windows + + ifeq ($(APPTYPE), windows) + LFLAGS += -mwindows + + ifdef USE_NOCYGWIN + LFLAGS += -mno-cygwin + endif + endif +endif + + +#---------------------------------# +# Building compilation flags that are sets + +INCLUDES := $(addprefix -I, $(INCLUDES)) +STDINCS := $(addprefix -I, $(STDINCS)) +EXTRAINCS := $(addprefix -I, $(EXTRAINCS)) +DEFINES := $(addprefix -D, $(DEFINES)) + +LIBS := $(addprefix -l, $(LIBS)) +ifdef LDIR + LDIR := $(addprefix -L, $(LDIR)) +endif + + +#---------------------------------# +# Definitions of private variables + +# Library flags for application and dynamic library linker +LFLAGS += $(LDIR) $(LIBS) +# C compiler flags +CFLAGS = $(FLAGS) $(STDFLAGS) $(INCLUDES) $(STDINCS) $(EXTRAINCS) $(DEFINES) $(STDDEFS) +# C++ compiler flags +CXXFLAGS = $(CPPFLAGS) $(STDFLAGS) $(INCLUDES) $(STDINCS) $(EXTRAINCS) $(DEFINES) $(STDDEFS) + +# Sources with relative path +SOURCES := $(addprefix $(SRCDIR)/, $(SRC)) + +# Target for applications or libraries +ifeq ($(MAKETYPE), APP) + TARGET := $(TARGETDIR)/$(TARGETNAME) +else + ifeq ($(NO_DYNAMIC), Yes) + TARGET := $(TARGETDIR)/lib$(TARGETNAME).a + else + TARGET := $(TARGETDIR)/lib$(TARGETNAME).a $(TARGETDIR)/lib$(TARGETNAME).$(DLIBEXT) + endif +endif + +# OBJ: list of .o, without path +# OBJS: list of .o with relative path +OBJ = $(notdir $(SRC)) +OBJ := $(OBJ:.c=.o) +OBJ := $(OBJ:.cpp=.o) +OBJ := $(OBJ:.cxx=.o) +OBJ := $(OBJ:.cc=.o) +OBJ := $(OBJ:.f=.o) +OBJ := $(OBJ:.for=.o) +OBJ := $(OBJ:.rc=.ro) +OBJS = $(addprefix $(OBJDIR)/, $(OBJ)) + +# LOH: list of .loh, without path +# LOHS: list of .loh, with relative path +LO = $(notdir $(SRCLUA)) +LO := $(LO:.lua=$(LO_SUFFIX).lo) +LOS = $(addprefix $(OBJROOT)/, $(LO)) + +LOH = $(notdir $(SRCLUA)) +LOH := $(LOH:.lua=$(LO_SUFFIX).loh) +LOHS = $(addprefix $(LOHDIR)/, $(LOH)) + +# Construct VPATH variable +P-SRC = $(dir $(SRC)) +P-SRC += $(dir $(SRCLUA)) +VPATH = .:$(foreach dir,$(P-SRC),$(if $(dir)="./",:$(dir))) + + +#---------------------------------# +# Main Rule - Build Everything that it is necessary + +.PHONY: tecmake +ifeq ($(MAKETYPE), APP) + tecmake: print-start directories application scripts +else + ifeq ($(NO_DYNAMIC), Yes) + tecmake: print-start directories static-lib + else + tecmake: print-start directories static-lib dynamic-lib + endif +endif + +.PHONY: print-start +print-start: + @echo ''; echo 'Tecmake - Starting [ $(TARGETNAME):$(TEC_UNAME) ]' + + +#---------------------------------# +# Dynamic Library Build + +.PHONY: dynamic-lib +dynamic-lib: $(TARGETDIR)/lib$(TARGETNAME).$(DLIBEXT) + +$(TARGETDIR)/lib$(TARGETNAME).$(DLIBEXT) : $(LOHS) $(OBJS) $(EXTRADEPS) + $(LD) $(STDLDFLAGS) -o $@ $(OBJS) $(SLIB) $(LFLAGS) + @echo 'Tecmake - Dynamic Library ($@) Done.'; echo '' + + +#---------------------------------# +# Static Library Build + +.PHONY: static-lib +static-lib: $(TARGETDIR)/lib$(TARGETNAME).a + +$(TARGETDIR)/lib$(TARGETNAME).a : $(LOHS) $(OBJS) $(EXTRADEPS) + $(AR) $(STDLFLAGS) $@ $(OBJS) $(SLIB) $(LCFLAGS) + -$(RANLIB) $@ + @echo 'Tecmake - Static Library ($@) Done.'; echo '' + + +#---------------------------------# +# Application Build + +.PHONY: application +application: $(TARGETDIR)/$(TARGETNAME) + +$(TARGETDIR)/$(TARGETNAME) : $(LOHS) $(OBJS) $(EXTRADEPS) + $(LINKER) -o $@ $(OBJS) $(SLIB) $(LFLAGS) + @if [ ! -z "$(STRIP)" ]; then \ + echo "Striping debug information" ;\ + strip $@ ;\ + fi + @echo 'Tecmake - Application ($@) Done.'; echo '' + + +#---------------------------------# +# Application Scripts + +# Script name +SRELEASE := $(SRCDIR)/$(TARGETNAME) + +.PHONY: scripts +ifdef NO_SCRIPTS + scripts: ; +else + scripts: $(SRELEASE) ; +endif + +$(SRELEASE): $(MAKENAME) + @echo 'Building script $(@F)' + @echo "#!/bin/csh" > $@ + @echo "# Script generated automatically by tecmake v$(VERSION)" >> $@ + @echo "# Remove the comment bellow to set the LD_LIBRARY_PATH if needed." >> $@ + @echo '#setenv LD_LIBRARY_PATH $(MYLIB1)/lib/$${TEC_UNAME}:$(MYLIB2)/lib/$${TEC_UNAME}:$$LD_LIBRARY_PATH' >> $@ + @echo 'if ( -r app.env ) source app.env' >> $@ + @echo 'exec $(TARGETROOT)/$$TEC_UNAME/$(TARGETNAME) $$*' >> $@ + @chmod a+x $@ + + +#---------------------------------# +# Directories Creation + +.PHONY: directories +directories: $(OBJDIR) $(TARGETDIR) $(EXTRADIR) $(LOHDIR) + +$(OBJDIR) $(TARGETDIR): + if [ ! -d $@ ] ; then mkdir -p $@ ; fi + +ifdef EXTRADIR + $(EXTRADIR): + if [ ! -d $@ ] ; then mkdir -p $@ ; fi +else + $(EXTRADIR): ; +endif + +ifdef LOHDIR + $(LOHDIR): + if [ ! -d $@ ] ; then mkdir -p $@ ; fi +else + $(LOHDIR): ; +endif + + +#---------------------------------# +# Compilation Rules + +$(OBJDIR)/%.o: $(SRCDIR)/%.c + @echo Compiling $( $@ + +$(OBJROOT)/%$(LO_SUFFIX).lo: $(SRCLUADIR)/%.lua + @echo Compiling $( $(DEPEND) + @which $(CPPC) 2> /dev/null 1>&2 ;\ + if [ $$? -eq 0 ]; then \ + echo "Building dependencies... (can be slow)" ;\ + $(CPPC) $(INCLUDES) $(DEFINES) $(STDDEFS) -MM $(SOURCES) | \ + sed -e '1,$$s/^\([^ ]\)/$$(OBJDIR)\/\1/' > $(DEPEND) ;\ + else \ + echo "" ;\ + echo "$(CPPC) not found. Dependencies can not be built." ;\ + echo "Must set USE_NODEPEND=Yes." ;\ + echo "" ;\ + exit 1 ;\ + fi + endif + +################### +ifndef USE_NODEPEND +include $(DEPEND) +endif +################### + + +#---------------------------------# +# Management Rules + +# make clean-extra +# Remove extra files +.PHONY: clean-extra +clean-extra: + rm -f $(DEPEND) $(SRELEASE) so_locations + +# make clean-lohs +# Remove Lua object inclusion files +.PHONY: clean-lohs +clean-lohs: + rm -f $(LOS) $(LOHS) + +# make clean-obj +# Remove object files +.PHONY: clean-obj +clean-obj: + rm -f $(OBJS) + +# make clean-target +# Remove target +.PHONY: clean-target +clean-target: + rm -f $(TARGET) + +# make clean +# Remove target and object files +.PHONY: clean +clean: clean-target clean-obj + +# make rebuild +# Remove symbols from executables +.PHONY: strip +strip: + test -r $(TARGETDIR)/$(TARGETNAME) && strip $(TARGETDIR)/$(TARGETNAME) + +# make rebuild +# Rebuild target and object files +.PHONY: rebuild +rebuild: clean-extra clean-lohs clean-obj clean-target tecmake + +# make relink +# Rebuild target without rebuilding object files +.PHONY: relink +relink: clean-target tecmake + +.PHONY: version +version: + @echo "Tecmake Compact Version $(VERSION)" + +#---------------------------------# diff --git a/iup/test/bigtest.c b/iup/test/bigtest.c new file mode 100755 index 0000000..713e752 --- /dev/null +++ b/iup/test/bigtest.c @@ -0,0 +1,194 @@ +#if 0 +/* To check for memory leaks */ +#define VLD_MAX_DATA_DUMP 80 +#include +#endif + +#include +#include +#include "iup.h" +#include "iupcontrols.h" +#include "iupkey.h" + +/* Must define BIG_TEST on the Project and include in the build all test files */ +#ifdef BIG_TEST +void ButtonTest(void); +void CanvasScrollbarTest(void); +void CanvasTest(void); +void CanvasCDDBufferTest(void); +void CanvasCDSimpleTest(void); +void DialogTest(void); +void FrameTest(void); +void TabsTest(void); +void SysInfoTest(void); +void GetColorTest(void); +#ifdef USE_OPENGL +void GLCanvasTest(void); +void GLCanvasCubeTest(void); +#endif +void HboxTest(void); +void IdleTest(void); +void LabelTest(void); +void ListTest(void); +void MatrixTest(void); +void MatrixCbModeTest(void); +void MatrixCbsTest(void); +void MdiTest(void); +void VboxTest(void); +void MenuTest(void); +void ColorBrowserTest(void); +void ColorbarTest(void); +void CellsNumberingTest(void); +void DialTest(void); +void GaugeTest(void); +void CellsDegradeTest(void); +void CellsCheckboardTest(void); +void ValTest(void); +void TreeTest(void); +void TrayTest(void); +void ToggleTest(void); +void TimerTest(void); +void TextSpinTest(void); +void TextTest(void); +void SpinTest(void); +void SampleTest(void); +void ProgressbarTest(void); +void PreDialogsTest(void); +#ifdef PPLOT_TEST +void PPlotTest(void); +#endif +void GetParamTest(void); +void ConfTest(void); +void ZboxTest(void); +void ScanfTest(void); +void SboxTest(void); +void ClipboardTest(void); + +void HelpTest(void) +{ + IupHelp("http://www.tecgraf.puc-rio.br/iup"); + //IupHelp("..\\html\\index.html"); +} + +typedef struct _TestItems{ + char* title; + void (*func)(void); +}TestItems; + +static TestItems test_list[] = { + {"Button", ButtonTest}, + {"Canvas", CanvasTest}, + {"CanvasCDSimpleTest", CanvasCDSimpleTest}, + {"CanvasCDDBuffer", CanvasCDDBufferTest}, + {"CanvasScrollbar", CanvasScrollbarTest}, + {"CellsCheckboard", CellsCheckboardTest}, + {"CellsDegrade", CellsDegradeTest}, + {"CellsNumbering", CellsNumberingTest}, + {"Class Conference", ConfTest}, + {"Clipboard", ClipboardTest}, + {"ColorBrowser", ColorBrowserTest}, + {"Colorbar", ColorbarTest}, + {"Dial", DialTest}, + {"Dialog", DialogTest}, + {"Frame", FrameTest}, +#ifdef USE_OPENGL + {"GLCanvas", GLCanvasTest}, + {"GLCanvasCube", GLCanvasCubeTest}, +#endif + {"Gauge", GaugeTest}, + {"GetColor", GetColorTest}, + {"GetParam", GetParamTest}, + {"Help", HelpTest}, + {"Hbox", HboxTest}, + {"Idle", IdleTest}, + {"Label", LabelTest}, + {"List", ListTest}, + {"Matrix", MatrixTest}, + {"MatrixCbMode", MatrixCbModeTest}, + {"MatrixCbs", MatrixCbsTest}, + {"Mdi", MdiTest}, + {"Menu", MenuTest}, +#ifdef PPLOT_TEST + {"PPlot", PPlotTest}, +#endif + {"PreDialogs", PreDialogsTest}, + {"Progressbar", ProgressbarTest}, + {"Sample", SampleTest}, + {"Sbox", SboxTest}, + {"Scanf", ScanfTest}, + {"Spin", SpinTest}, + {"SysInfo", SysInfoTest}, + {"Tabs", TabsTest}, + {"Text", TextTest}, + {"TextSpin", TextSpinTest}, + {"Timer", TimerTest}, + {"Toggle", ToggleTest}, + {"Tray", TrayTest}, + {"Tree", TreeTest}, + {"Val", ValTest}, + {"Vbox", VboxTest}, + {"Zbox", ZboxTest}, +}; + +static int k_enter_cb(Ihandle*ih) +{ + int pos = IupGetInt(ih, "VALUE"); + if (pos > 0) + test_list[pos-1].func(); + return IUP_DEFAULT; +} + +static int button_cb(Ihandle *ih,int but,int pressed,int x,int y,char* status) +{ + (void)pressed; + if (but==IUP_BUTTON1 && iup_isdouble(status)) + { + int pos = IupConvertXYToPos(ih, x, y); + test_list[pos-1].func(); + return IUP_IGNORE; + } + return IUP_DEFAULT; +} + +static int close_cb(Ihandle *ih) +{ + (void)ih; + return IUP_CLOSE; +} + +int main(int argc, char* argv[]) +{ + int i, count = sizeof(test_list)/sizeof(TestItems); + char str[50]; + Ihandle *dlg, *list; + + IupOpen(&argc, &argv); + IupControlsOpen(); +// IupOldValOpen(); +// IupOldTabsOpen(); + + dlg = IupDialog(IupVbox(list = IupList(NULL), NULL)); + IupSetAttribute(dlg, "MARGIN", "10x10"); + IupSetAttribute(dlg, "TITLE", "IupTests"); + IupSetCallback(dlg, "CLOSE_CB", close_cb); + + IupSetAttribute(list, "VISIBLELINES", "15"); + IupSetAttribute(list, "EXPAND", "YES"); + IupSetCallback(list, "BUTTON_CB", (Icallback)button_cb); + IupSetCallback(list, "K_CR", k_enter_cb); + + for (i=0; i +#include +#include "iup.h" +#include "iupkey.h" + +#define TEST_IMAGE_SIZE 20 + +static Ihandle* load_image_FileSave(void) +{ + unsigned char imgdata[] = { + 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 183, 182, 245, 255, 183, 182, 245, 255, 179, 178, 243, 255, 174, 173, 241, 255, 168, 167, 238, 255, 162, 161, 234, 255, 155, 154, 231, 255, 148, 147, 228, 255, 143, 142, 224, 255, 136, 135, 221, 255, 129, 128, 218, 255, 123, 122, 214, 255, 117, 116, 211, 255, 112, 111, 209, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 179, 178, 243, 255, 190, 189, 255, 255, 147, 146, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 75, 88, 190, 255, 89, 88, 176, 255, 89, 88, 176, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 173, 172, 240, 255, 190, 189, 255, 255, 138, 137, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 63, 82, 184, 255, 51, 51, 103, 255, 86, 85, 170, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 167, 166, 237, 255, 190, 189, 255, 255, 129, 128, 230, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 52, 77, 179, 255, 122, 121, 223, 255, 83, 82, 164, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 159, 158, 233, 255, 190, 189, 255, 255, 119, 118, 220, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 210, 219, 234, 255, 40, 71, 173, 255, 114, 113, 215, 255, 80, 79, 159, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 152, 151, 229, 255, 190, 189, 255, 255, 110, 109, 211, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 210, 219, 234, 255, 198, 209, 229, 255, 28, 65, 167, 255, 103, 103, 204, 255, 77, 77, 154, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 146, 145, 226, 255, 190, 189, 255, 255, 103, 102, 204, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 210, 219, 234, 255, 198, 209, 229, 255, 189, 202, 225, 255, 17, 59, 161, 255, 92, 93, 194, 255, 74, 74, 148, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 139, 138, 223, 255, 188, 187, 255, 255, 183, 182, 255, 255, 96, 99, 201, 255, 86, 94, 196, 255, 75, 88, 190, 255, 63, 82, 184, 255, 52, 77, 179, 255, 40, 71, 173, 255, 28, 65, 167, 255, 17, 59, 161, 255, 92, 93, 193, 255, 84, 86, 186, 255, 71, 71, 143, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 132, 131, 219, 255, 180, 179, 255, 255, 174, 173, 255, 255, 164, 163, 252, 255, 143, 142, 244, 255, 135, 134, 236, 255, 129, 128, 230, 255, 122, 121, 223, 255, 114, 113, 215, 255, 108, 107, 209, 255, 92, 93, 193, 255, 84, 86, 186, 255, 76, 80, 178, 255, 68, 68, 137, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 124, 123, 215, 255, 170, 169, 255, 255, 160, 159, 251, 255, 148, 147, 245, 255, 75, 91, 113, 255, 75, 91, 113, 255, 75, 91, 113, 255, 75, 91, 113, 255, 82, 98, 118, 255, 91, 106, 125, 255, 84, 86, 186, 255, 76, 79, 178, 255, 68, 73, 170, 255, 65, 65, 131, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 118, 117, 212, 255, 160, 159, 255, 255, 145, 144, 245, 255, 135, 134, 236, 255, 75, 91, 113, 255, 0, 0, 0, 255, 52, 60, 71, 255, 206, 217, 233, 255, 212, 221, 236, 255, 103, 116, 133, 255, 67, 75, 174, 255, 68, 73, 170, 255, 60, 66, 163, 255, 62, 62, 125, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 112, 111, 209, 255, 154, 153, 255, 255, 135, 134, 236, 255, 129, 128, 230, 255, 75, 91, 113, 255, 52, 60, 71, 255, 104, 120, 141, 255, 216, 224, 237, 255, 224, 231, 241, 255, 115, 127, 143, 255, 53, 65, 163, 255, 60, 66, 162, 255, 53, 61, 156, 255, 60, 59, 120, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 108, 107, 207, 255, 143, 142, 243, 255, 129, 128, 230, 255, 36, 68, 170, 255, 33, 50, 71, 255, 171, 180, 195, 255, 179, 187, 198, 255, 188, 193, 202, 255, 196, 200, 206, 255, 72, 77, 86, 255, 51, 62, 158, 255, 54, 61, 156, 255, 49, 57, 152, 255, 57, 57, 114, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 108, 107, 207, 84, 101, 100, 195, 255, 86, 85, 170, 255, 83, 82, 164, 255, 80, 79, 159, 255, 77, 77, 154, 255, 74, 74, 148, 255, 71, 71, 143, 255, 68, 68, 137, 255, 65, 65, 131, 255, 60, 59, 120, 255, 60, 59, 120, 255, 57, 57, 114, 255, 55, 54, 110, 255, 255, 0, 255, 255, + 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static unsigned char image_data_8 [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE] = +{ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +}; + +static unsigned char image_data_8_pressed [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE] = +{ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,5,1,1,1,1,1,2,2,2,2,2,5,0,0,0,5, + 5,0,0,0,1,5,1,1,1,1,2,2,2,2,5,2,0,0,0,5, + 5,0,0,0,1,1,5,1,1,1,2,2,2,5,2,2,0,0,0,5, + 5,0,0,0,1,1,1,5,1,1,2,2,5,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,5,1,2,5,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,5,5,2,2,2,2,2,0,0,0,5, + 5,0,0,0,3,3,3,3,3,5,5,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,5,3,4,5,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,5,3,3,4,4,5,4,4,4,0,0,0,5, + 5,0,0,0,3,3,5,3,3,3,4,4,4,5,4,4,0,0,0,5, + 5,0,0,0,3,5,3,3,3,3,4,4,4,4,5,4,0,0,0,5, + 5,0,0,0,5,3,3,3,3,3,4,4,4,4,4,5,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +}; + +static unsigned char image_data_8_inactive [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE] = +{ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,5,5,1,1,1,1,1,1,1,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,1,1,1,1,1,1,1,5,5,5,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +}; + +static unsigned char image_data_24 [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE*3] = +{ + 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000, +}; + +static unsigned char image_data_32 [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE*4] = +{ + 000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255, +}; + +static char* get_name(Ihandle* ih) +{ + return IupGetAttribute(ih, "NAME"); +} + +static int action_cb(Ihandle *ih) +{ + printf("ACTION(%s)\n", get_name(ih)); + return IUP_DEFAULT; +} + +static int getfocus_cb(Ihandle *ih) +{ + printf("GETFOCUS_CB(%s)\n", get_name(ih)); + return IUP_DEFAULT; +} + +static int help_cb(Ihandle* ih) +{ + printf("HELP_CB(%s)\n", get_name(ih)); + return IUP_DEFAULT; +} + +static int killfocus_cb(Ihandle *ih) +{ + printf("KILLFOCUS_CB(%s)\n", get_name(ih)); + return IUP_DEFAULT; +} + +static int leavewindow_cb(Ihandle *ih) +{ + printf("LEAVEWINDOW_CB(%s)\n", get_name(ih)); + return IUP_DEFAULT; +} + +static int enterwindow_cb(Ihandle *ih) +{ + printf("ENTERWINDOW_CB(%s)\n", get_name(ih)); + return IUP_DEFAULT; +} + +static int button_cb(Ihandle *ih,int but,int pressed,int x,int y,char* status) +{ + printf("BUTTON_CB(%s, but=%c (%d), x=%d, y=%d [%s])\n", get_name(ih),(char)but,pressed,x,y, status); + return IUP_DEFAULT; +} + +char *iupKeyCodeToName(int code); + +static int k_any(Ihandle *ih, int c) +{ + if (iup_isprint(c)) + printf("K_ANY(%s, %d = %s \'%c\')\n", get_name(ih), c, iupKeyCodeToName(c), (char)c); + else + printf("K_ANY(%s, %d = %s)\n", get_name(ih), c, iupKeyCodeToName(c)); + printf(" MODKEYSTATE(%s)\n", IupGetGlobal("MODKEYSTATE")); + return IUP_DEFAULT; +} + +static int active_cb(Ihandle *ih) +{ + static int active = 1; + Ihandle* dlg = IupGetDialog(ih); + Ihandle* box = IupGetChild(dlg, 0); + if (active) + IupSetAttribute(box, "ACTIVE", "NO"); + else + IupSetAttribute(box, "ACTIVE", "YES"); + active = !active; + IupSetAttribute(ih, "ACTIVE", "YES"); + return IUP_DEFAULT; +} + +static void set_callbacks(Ihandle* button) +{ + IupSetCallback(button, "ACTION", action_cb); +// IupSetCallback(button, "BUTTON_CB", (Icallback)button_cb); + + IupSetCallback(button, "K_ANY", (Icallback)k_any); + IupSetCallback(button, "HELP_CB", (Icallback)help_cb); + +// IupSetCallback(button, "GETFOCUS_CB", (Icallback)getfocus_cb); +// IupSetCallback(button, "KILLFOCUS_CB", (Icallback)killfocus_cb); +// IupSetCallback(button, "ENTERWINDOW_CB", (Icallback)enterwindow_cb); +// IupSetCallback(button, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb); +} + +static int show_cb(Ihandle *ih, int state) +{ + char* state_str[5] ={ + "SHOW", + "RESTORE", + "MINIMIZE", + "MAXIMIZE", + "HIDE" + }; + printf("SHOW_CB(%s, %s)\n", IupGetAttribute(ih, "TESTTITLE"), state_str[state]); + return IUP_DEFAULT; +} + +void ButtonTest(void) +{ + Ihandle *dlg, *button, *label, *image1, *image1i, *image1p, *image2, *image3, + *box1, *box2; + + /* IupImageLibOpen(); */ + + box1 = IupVbox(NULL); + IupSetAttribute(box1, "MARGIN", "5x5"); + IupSetAttribute(box1, "GAP", "5"); +// IupSetAttribute(box1, "BGCOLOR", "75 150 170"); +// IupSetAttribute(box1, "PADDING", "15x15"); + + button = IupButton("ACTIVE", NULL); + IupSetAttribute(button, "TITLE", "Button Text"); + IupSetCallback(button, "ACTION", active_cb); + IupAppend(box1, button); + + button = IupButton(NULL, NULL); + IupSetAttribute(button, "TITLE", "Text (çãí)"); +// IupSetAttribute(button, "TITLE", "Text"); + //IupSetAttribute(button, "TITLE", "Text &Button\nSecond Line"); + IupSetAttribute(button, "TIP", "Button Tip"); + //IupSetAttribute(button, "PADDING", "15x15"); + //IupSetAttribute(button, "BGCOLOR", "128 128 255"); + IupSetAttribute(button, "SIZE", "40"); +// IupSetAttribute(button, "FGCOLOR", "0 0 255"); +// IupSetAttribute(button, "RASTERSIZE", "200x100"); + IupSetAttribute(button, "ALIGNMENT", "ACENTER:ACENTER"); +// IupSetAttribute(button, "ALIGNMENT", "ALEFT:ATOP"); + IupSetAttribute(button, "NAME", "button1"); + set_callbacks(button); + IupAppend(box1, button); + + button = IupButton(NULL, NULL); + IupSetAttribute(button, "TITLE", "Text Button\nSecond Line"); + IupSetAttribute(button, "RASTERSIZE", "200x100"); + IupSetAttribute(button, "ALIGNMENT", "ACENTER:ACENTER"); + IupSetAttribute(button, "FONT", "Helvetica, 14"); + IupSetAttribute(button, "FLAT", "YES"); + IupSetAttribute(button, "NAME", "button2"); + set_callbacks(button); + IupAppend(box1, button); + + button = IupButton(NULL, NULL); + IupSetAttribute(button, "TITLE", "Text Button\nSecond Line"); + IupSetAttribute(button, "RASTERSIZE", "200x100"); + IupSetAttribute(button, "ALIGNMENT", "ARIGHT:ABOTTOM"); + IupSetAttribute(button, "MARKUP", "YES"); + IupSetAttribute(button, "NAME", "button3"); + IupSetAttribute(button, "CANFOCUS", "NO"); + set_callbacks(button); + IupAppend(box1, button); + + box2 = IupVbox(NULL); + IupSetAttribute(box2, "MARGIN", "5x5"); + IupSetAttribute(box2, "GAP", "5"); +// IupSetAttribute(box2, "BGCOLOR", "75 150 170"); +// IupSetAttribute(box2, "PADDING", "15x15"); + + image1 = IupImage(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_8); + IupSetAttribute(image1, "0", "BGCOLOR"); + IupSetAttribute(image1, "1", "255 0 0"); + IupSetAttribute(image1, "2", "0 255 0"); + IupSetAttribute(image1, "3", "0 0 255"); + IupSetAttribute(image1, "4", "255 255 255"); + IupSetAttribute(image1, "5", "0 0 0"); + + image1i = IupImage(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_8_inactive); + IupSetAttribute(image1i, "0", "BGCOLOR"); + IupSetAttribute(image1i, "1", "255 0 0"); + IupSetAttribute(image1i, "2", "0 255 0"); + IupSetAttribute(image1i, "3", "0 0 255"); + IupSetAttribute(image1i, "4", "255 255 255"); + IupSetAttribute(image1i, "5", "0 0 0"); + + image1p = IupImage(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_8_pressed); + IupSetAttribute(image1p, "0", "BGCOLOR"); + IupSetAttribute(image1p, "1", "255 0 0"); + IupSetAttribute(image1p, "2", "0 255 0"); + IupSetAttribute(image1p, "3", "0 0 255"); + IupSetAttribute(image1p, "4", "255 255 255"); + IupSetAttribute(image1p, "5", "0 0 0"); + + image2 = IupImageRGB(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_24); + + image3 = IupImageRGBA(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_32); + + button = IupButton(NULL, NULL); + IupSetAttribute(button, "TITLE", "Images"); + IupSetAttributeHandle(button, "IMAGE", load_image_FileSave()); + IupAppend(box2, button); + + button = IupButton(NULL, NULL); +// IupSetAttribute(button, "ALIGNMENT", "ALEFT:ATOP"); +// IupSetAttribute(button, "RASTERSIZE", "200x100"); +// IupSetAttribute(button, "IMAGEPOSITION", "BOTTOM"); + IupSetAttribute(button, "PADDING", "5x5"); +// IupSetAttribute(button, "TITLE", "Text1"); + IupSetAttribute(button, "FONT", "Helvetica, 14"); +// IupSetAttribute(button, "IMAGE", "IUP_Tecgraf"); + IupSetAttributeHandle(button, "IMAGE", image1); +// IupSetAttributeHandle(button, "IMINACTIVE", image1i); +// IupSetAttributeHandle(button, "XXX__IMPRESS", image1p); + IupSetAttribute(button, "TIP", "Image Label"); + IupSetAttribute(button, "NAME", "button4"); + set_callbacks(button); + IupAppend(box2, button); + + button = IupButton(NULL, NULL); + IupSetAttributeHandle(button, "IMAGE", image2); + IupSetAttribute(button, "TITLE", "Text2"); +// IupSetAttribute(button, "IMAGEPOSITION", "TOP"); +// IupSetAttribute(button, "SPACING", "30"); +// IupSetAttribute(button, "ALIGNMENT", "ALEFT"); +// IupSetAttribute(button, "RASTERSIZE", "200x100"); + IupSetAttribute(button, "FLAT", "YES"); + IupSetAttribute(button, "FOCUSONCLICK", "NO"); + IupSetAttribute(button, "NAME", "button5"); + set_callbacks(button); + IupAppend(box2, button); + + button = IupButton(NULL, NULL); + IupSetAttributeHandle(button, "IMAGE", image3); + IupSetAttribute(button, "TITLE", "Text3"); +// IupSetAttribute(button, "RASTERSIZE", "200x100"); +// IupSetAttribute(button, "ALIGNMENT", "ARIGHT"); + IupSetAttribute(button, "NAME", "button6"); + set_callbacks(button); + IupAppend(box2, button); + + label = IupLabel(NULL); + IupSetAttribute(label, "SEPARATOR", "VERTICAL"); + + dlg = IupDialog(IupHbox(box1, label, box2, NULL)); + IupSetAttribute(dlg, "TITLE", "IupButton Test"); +// IupSetAttribute(box1, "BGCOLOR", "128 0 0"); +// IupSetAttribute(dlg, "BGCOLOR", "0 128 0"); +// IupSetAttribute(dlg, "BACKGROUND", "0 0 128"); +// IupSetAttributeHandle(dlg, "BACKGROUND", image2); + + IupSetAttributeHandle(dlg, "STARTFOCUS", button); + + IupShow(dlg); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + ButtonTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/canvas.c b/iup/test/canvas.c new file mode 100755 index 0000000..d13945c --- /dev/null +++ b/iup/test/canvas.c @@ -0,0 +1,346 @@ +#include +#include +#include "iup.h" +#include "iupkey.h" + +static unsigned char matrx_img_cur_excel[15*15] = + { + 0,0,0,0,1,1,1,1,1,1,0,0,0,0,0, + 0,0,0,0,1,2,2,2,2,1,1,0,0,0,0, + 0,0,0,0,1,2,2,2,2,1,1,0,0,0,0, + 0,0,0,0,1,2,2,2,2,1,1,0,0,0,0, + 1,1,1,1,1,2,2,2,2,1,1,1,1,1,0, + 1,2,2,2,2,2,2,2,2,2,2,2,2,1,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,1,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,1,1, + 1,1,1,1,1,2,2,2,2,1,1,1,1,1,1, + 0,1,1,1,1,2,2,2,2,1,1,1,1,1,1, + 0,0,0,0,1,2,2,2,2,1,1,0,0,0,0, + 0,0,0,0,1,2,2,2,2,1,1,0,0,0,0, + 0,0,0,0,1,1,1,1,1,1,1,0,0,0,0, + 0,0,0,0,0,1,1,1,1,1,1,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }; + +static unsigned char pixmap_cursor [ ] = +{ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,2,2,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +} ; + +//#define USE_GTK + +/* draw a rectangle that has w=600 always, white background and a red X */ +#ifdef USE_GTK +#include +static void drawTest(Ihandle *ih, int posx) +{ + GtkWidget* widget = (GtkWidget*)IupGetAttribute(ih, "WID"); + gdk_draw_arc (widget->window, + widget->style->fg_gc[GTK_WIDGET_STATE (widget)], + TRUE, + 0, 0, widget->allocation.width, widget->allocation.height, + 0, 64 * 360); +} +#else +#ifdef WIN32 +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#include +static void drawTest(Ihandle *ih, int posx) +{ + RECT rect; + int w, h; + HWND hWnd = (HWND)IupGetAttribute(ih, "HWND"); + HDC hDC = GetDC(hWnd); + + IupGetIntInt(ih, "DRAWSIZE", &w, &h); + + SetRect(&rect, 0, 0, w, h); + FillRect(hDC, &rect, GetStockObject(WHITE_BRUSH)); + + SelectObject(hDC, GetStockObject(DC_PEN)); + SetDCPenColor(hDC, RGB(255, 0, 0)); + + w = 600; /* virtual size */ + MoveToEx(hDC, -posx, 0, NULL); + LineTo(hDC, w-posx, h); + MoveToEx(hDC, -posx, h, NULL); + LineTo(hDC, w-posx, 0); + + ReleaseDC(hWnd, hDC); +} +#else +#include + +#define xCOLOR8TO16(_x) (_x*257) /* 65535/255 = 257 */ +static unsigned long xGetPixel(Display* dpy, unsigned char cr, unsigned char cg, unsigned char cb) +{ + XColor xc; + xc.red = xCOLOR8TO16(cr); + xc.green = xCOLOR8TO16(cg); + xc.blue = xCOLOR8TO16(cb); + xc.flags = DoRed | DoGreen | DoBlue; + + XAllocColor(dpy, DefaultColormap(dpy, XDefaultScreen(dpy)), &xc); + return xc.pixel; +} + +static void drawTest(Ihandle *ih, int posx) +{ + int w, h; + Display* dpy = (Display*)IupGetAttribute(ih, "XDISPLAY"); /* works for Motif and GTK */ + Drawable wnd = (Drawable)IupGetAttribute(ih, "XWINDOW"); + GC gc = XCreateGC(dpy, wnd, 0, NULL); + + IupGetIntInt(ih, "DRAWSIZE", &w, &h); + + XSetForeground(dpy, gc, xGetPixel(dpy, 255, 255, 255)); + XFillRectangle(dpy, wnd, gc, 0, 0, w, h); + + XSetForeground(dpy, gc, xGetPixel(dpy, 255, 0, 0)); + + w = 600; /* virtual size */ + XDrawLine(dpy, wnd, gc, -posx, 0, w-posx, h); + XDrawLine(dpy, wnd, gc, -posx, h, w-posx, 0); + + XFreeGC(dpy, gc); +} +#endif +#endif + +static int map_cb(Ihandle *ih) +{ + printf("MAP_CB()\n"); + return IUP_DEFAULT; +} + +static int action(Ihandle *ih, float posx, float posy) +{ + printf("ACTION(posx=%.2f, posy=%.2f)\n", posx, posy); + drawTest(ih, (int)posx); + return IUP_DEFAULT; +} + +static int scroll_cb(Ihandle *ih, int op, float posx, float posy) +{ + char* op2str[12] = {"SBUP", "SBDN", "SBPGUP", "SBPGDN", "SBPOSV", "SBDRAGV", + "SBLEFT", "SBRIGHT", "SBPGLEFT", "SBPGRIGHT", "SBPOSH", "SBDRAGH"}; + printf("SCROLL_CB(%s, posx=%.2f, posy=%.2f)\n", op2str[op], posx, posy); + IupRedraw(ih, 0); + return IUP_DEFAULT; +} + +static int dropfiles_cb(Ihandle *ih, const char* filename, int num, int x, int y) +{ + printf("DROPFILES_CB(%s, %d, x=%d, y=%d)\n", filename, num, x, y); + return IUP_DEFAULT; +} + +static int resize_cb(Ihandle *ih, int w, int h) +{ + printf("RESIZE_CB(%d, %d) RASTERSIZE=%s CLIENTSIZE=%s\n", w, h, IupGetAttribute(ih, "RASTERSIZE"), IupGetAttribute(ih, "CLIENTSIZE")); + + /* update page size */ + IupSetfAttribute(ih, "DX", "%d", w); + + return IUP_DEFAULT; +} + +static int getfocus_cb(Ihandle *ih) +{ + printf("GETFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int help_cb(Ihandle* ih) +{ + printf("HELP_CB()\n"); + return IUP_DEFAULT; +} + +static int killfocus_cb(Ihandle *ih) +{ + printf("KILLFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int focus_cb(Ihandle *ih, int focus) +{ + printf("FOCUS_CB(%d)\n", focus); + return IUP_DEFAULT; +} + +static int leavewindow_cb(Ihandle *ih) +{ + printf("LEAVEWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +static int enterwindow_cb(Ihandle *ih) +{ + printf("ENTERWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +static int button_cb(Ihandle *ih,int but,int pressed,int x,int y,char* status) +{ + if (but==IUP_BUTTON1 && pressed) + IupSetAttribute(ih, "CURSOR", "CROSS"); + if (but==IUP_BUTTON1 && !pressed) + IupSetAttribute(ih, "CURSOR", NULL); + printf("BUTTON_CB(but=%c (%d), x=%d, y=%d [%s])\n",(char)but,pressed,x,y, status); + return IUP_DEFAULT; +} + +static int wheel_cb(Ihandle *ih,float delta,int x,int y,char* status) +{ + printf("WHEEL_CB(delta=%.2f, x=%d, y=%d [%s])\n",delta,x,y, status); + return IUP_DEFAULT; +} + +static int motion_cb(Ihandle *ih,int x,int y,char* status) +{ + printf("MOTION_CB(x=%d, y=%d [%s])\n",x,y, status); + return IUP_DEFAULT; +} + +char *iupKeyCodeToName(int code); + +static int k_any(Ihandle *ih, int c) +{ + if (c == K_a) + IupSetAttribute(ih, "POSX", "100"); + + if (iup_isprint(c)) + printf("K_ANY(%d = %s \'%c\')\n", c, iupKeyCodeToName(c), (char)c); + else + printf("K_ANY(%d = %s)\n", c, iupKeyCodeToName(c)); + printf(" MODKEYSTATE(%s)\n", IupGetGlobal("MODKEYSTATE")); + return IUP_DEFAULT; +} + +static int keypress_cb(Ihandle *ih, int c, int pressed) +{ + if (iup_isprint(c)) + printf("KEYPRESS_CB(%d = %s \'%c\' (%d))\n", c, iupKeyCodeToName(c), (char)c, pressed); + else + printf("KEYPRESS_CB(%d = %s (%d))\n", c, iupKeyCodeToName(c), pressed); + return IUP_DEFAULT; +} + +void CanvasTest(void) +{ + Ihandle *dlg, *canvas, *box, *image; + + //image = IupImage(32, 32, pixmap_cursor); + //IupSetAttribute(image, "1", "255 0 0"); + //IupSetAttribute(image, "2", "128 0 0"); + //IupSetAttribute(image, "HOTSPOT", "21:10"); + + image = IupImage(15,15, matrx_img_cur_excel); + IupSetAttribute (image, "0", "BGCOLOR"); + IupSetAttribute (image, "1", "0 0 0"); + IupSetAttribute (image, "2", "255 255 255"); + IupSetAttribute (image, "HOTSPOT", "7:7"); + + box = IupVbox(NULL); + IupSetAttribute(box, "MARGIN", "5x5"); + + canvas = IupCanvas(NULL); + IupAppend(box, canvas); + IupSetAttribute(canvas, "RASTERSIZE", "300x200"); + IupSetAttribute(canvas, "TIP", "Canvas Tip"); + IupSetAttribute(canvas, "SCROLLBAR", "YES"); +// IupSetAttribute(canvas, "XAUTOHIDE", "NO"); + IupSetAttribute(canvas, "XMAX", "600"); + IupSetAttribute(canvas, "DX", "300"); /* use a 1x1 scale, this value is updated in RESIZE_CB, + so when the canvas is larger than 600 + it will hide the scrollbar */ + IupSetAttributeHandle(canvas, "CURSOR", image); + +// IupSetAttribute(canvas, "BORDER", "NO"); +// IupSetAttribute(canvas, "CURSOR", "CROSS"); + + IupSetCallback(canvas, "MAP_CB", (Icallback)map_cb); + + IupSetCallback(canvas, "KEYPRESS_CB", (Icallback)keypress_cb); + IupSetCallback(canvas, "K_ANY", (Icallback)k_any); + IupSetCallback(canvas, "HELP_CB", (Icallback)help_cb); + + IupSetCallback(canvas, "GETFOCUS_CB", (Icallback)getfocus_cb); + IupSetCallback(canvas, "KILLFOCUS_CB", (Icallback)killfocus_cb); + IupSetCallback(canvas, "FOCUS_CB", (Icallback)focus_cb); + IupSetCallback(canvas, "ENTERWINDOW_CB", (Icallback)enterwindow_cb); + IupSetCallback(canvas, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb); + + IupSetCallback(canvas, "BUTTON_CB", (Icallback)button_cb); +// IupSetCallback(canvas, "MOTION_CB", (Icallback)motion_cb); + IupSetCallback(canvas, "SCROLL_CB", (Icallback)scroll_cb); +// IupSetCallback(canvas, "WHEEL_CB", (Icallback)wheel_cb); + + IupSetCallback(canvas, "RESIZE_CB", (Icallback)resize_cb); +// IupSetAttribute(canvas, "BGCOLOR", "255 128 128"); + IupSetCallback(canvas, "ACTION", (Icallback)action); + + // Windows and GTK Only + IupSetCallback(canvas, "DROPFILES_CB", (Icallback)dropfiles_cb); + +//{ +// Ihandle* cnv = IupCanvas(NULL); +// IupAppend(box, cnv); +// IupSetAttribute(cnv, "RASTERSIZE", "300x200"); +// IupSetAttribute(cnv, "CURSOR", "NONE"); +//} + + dlg = IupDialog(box); + IupSetAttribute(dlg, "TITLE", "IupCanvas Test"); + + IupShow(dlg); + IupSetAttribute(canvas, "RASTERSIZE", NULL); /* release the minimum limitation */ +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + CanvasTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/canvas_cddbuffer.c b/iup/test/canvas_cddbuffer.c new file mode 100755 index 0000000..dd7ce3e --- /dev/null +++ b/iup/test/canvas_cddbuffer.c @@ -0,0 +1,124 @@ +#include +#include +#include "iup.h" +#include "cd.h" +#include "cdiup.h" +#include "cddbuf.h" + + +static void appUpdateRender(cdCanvas *cddbuffer) +{ + int width, height; + + cdCanvasBackground(cddbuffer, CD_WHITE); + cdCanvasClear(cddbuffer); + + cdCanvasForeground(cddbuffer, CD_RED); + cdCanvasGetSize(cddbuffer, &width, &height, NULL, NULL); + cdCanvasLine(cddbuffer, 0, 0, width-1, height-1); + cdCanvasLine(cddbuffer, 0, height-1, width-1, 0); +} + +static int redraw_cb(Ihandle *ih) +{ + cdCanvas *cddbuffer = (cdCanvas*)IupGetAttribute(ih, "_APP_CDDBUFFER"); + if (!cddbuffer) + return IUP_DEFAULT; + + /* update display */ + cdCanvasFlush(cddbuffer); + return IUP_DEFAULT; +} + +static int resize_cb(Ihandle *ih) +{ + cdCanvas *cddbuffer = (cdCanvas*)IupGetAttribute(ih, "_APP_CDDBUFFER"); + if (!cddbuffer) + { + cdCanvas *cdcanvas = (cdCanvas*)IupGetAttribute(ih, "_APP_CDCANVAS"); + + /* update canvas size */ + cdCanvasActivate(cdcanvas); + + /* this can fail if canvas size is zero */ + cddbuffer = cdCreateCanvas(CD_DBUFFER, cdcanvas); + } + + if (!cddbuffer) + return IUP_DEFAULT; + + /* update size */ + cdCanvasActivate(cddbuffer); + + /* update render */ + appUpdateRender(cddbuffer); + + return IUP_DEFAULT; +} + +static int map_cb(Ihandle *ih) +{ + cdCanvas *cddbuffer, *cdcanvas; + + cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!cdcanvas) + return IUP_DEFAULT; + + /* this can fail if canvas size is zero */ + cddbuffer = cdCreateCanvas(CD_DBUFFER, cdcanvas); + + IupSetAttribute(ih, "_APP_CDCANVAS", (char*)cdcanvas); + IupSetAttribute(ih, "_APP_CDDBUFFER", (char*)cddbuffer); + + return IUP_DEFAULT; +} + +static int unmap_cb(Ihandle *ih) +{ + cdCanvas *cddbuffer = (cdCanvas*)IupGetAttribute(ih, "_APP_CDDBUFFER"); + cdCanvas *cdcanvas = (cdCanvas*)IupGetAttribute(ih, "_APP_CDCANVAS"); + + if (cddbuffer) + cdKillCanvas(cddbuffer); + + if (cdcanvas) + cdKillCanvas(cdcanvas); + + return IUP_DEFAULT; +} + +void CanvasCDDBufferTest(void) +{ + Ihandle *dlg, *canvas; + + canvas = IupCanvas(NULL); + IupSetAttribute(canvas, "RASTERSIZE", "300x200"); /* initial size */ + + IupSetCallback(canvas, "RESIZE_CB", (Icallback)resize_cb); + IupSetCallback(canvas, "ACTION", (Icallback)redraw_cb); + IupSetCallback(canvas, "MAP_CB", (Icallback)map_cb); + IupSetCallback(canvas, "UNMAP_CB", (Icallback)unmap_cb); + + dlg = IupDialog(canvas); + IupSetAttribute(dlg, "TITLE", "CD Double Buffer Test"); + + IupMap(dlg); + IupSetAttribute(canvas, "RASTERSIZE", NULL); /* release the minimum limitation */ + + IupShowXY(dlg,IUP_CENTER,IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + CanvasCDDBufferTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/canvas_cdsimple.c b/iup/test/canvas_cdsimple.c new file mode 100755 index 0000000..3a73c22 --- /dev/null +++ b/iup/test/canvas_cdsimple.c @@ -0,0 +1,91 @@ +#include +#include +#include "iup.h" +#include "cd.h" +#include "cdiup.h" +#include "cddbuf.h" + + +static int redraw_cb(Ihandle *ih) +{ + int width, height; + cdCanvas *cdcanvas = (cdCanvas*)IupGetAttribute(ih, "_APP_CDCANVAS"); + + cdCanvasBackground(cdcanvas, CD_WHITE); + cdCanvasClear(cdcanvas); + + cdCanvasForeground(cdcanvas, CD_RED); + cdCanvasGetSize(cdcanvas, &width, &height, NULL, NULL); + cdCanvasLine(cdcanvas, 0, 0, width-1, height-1); + cdCanvasLine(cdcanvas, 0, height-1, width-1, 0); + return IUP_DEFAULT; +} + +static int resize_cb(Ihandle *ih) +{ + cdCanvas *cdcanvas = (cdCanvas*)IupGetAttribute(ih, "_APP_CDCANVAS"); + + /* update canvas size */ + cdCanvasActivate(cdcanvas); + + return IUP_DEFAULT; +} + +static int map_cb(Ihandle *ih) +{ + cdCanvas *cdcanvas; + + cdcanvas = cdCreateCanvas(CD_IUP, ih); + if (!cdcanvas) + return IUP_DEFAULT; + + IupSetAttribute(ih, "_APP_CDCANVAS", (char*)cdcanvas); + + return IUP_DEFAULT; +} + +static int unmap_cb(Ihandle *ih) +{ + cdCanvas *cdcanvas = (cdCanvas*)IupGetAttribute(ih, "_APP_CDCANVAS"); + + if (cdcanvas) + cdKillCanvas(cdcanvas); + + return IUP_DEFAULT; +} + +void CanvasCDSimpleTest(void) +{ + Ihandle *dlg, *canvas; + + canvas = IupCanvas(NULL); + IupSetAttribute(canvas, "RASTERSIZE", "300x200"); /* initial size */ + + IupSetCallback(canvas, "RESIZE_CB", (Icallback)resize_cb); + IupSetCallback(canvas, "ACTION", (Icallback)redraw_cb); + IupSetCallback(canvas, "MAP_CB", (Icallback)map_cb); + IupSetCallback(canvas, "UNMAP_CB", (Icallback)unmap_cb); + + dlg = IupDialog(canvas); + IupSetAttribute(dlg, "TITLE", "CD Simple Buffer Test"); + + IupMap(dlg); + IupSetAttribute(canvas, "RASTERSIZE", NULL); /* release the minimum limitation */ + + IupShowXY(dlg,IUP_CENTER,IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + CanvasCDSimpleTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/canvas_scrollbar.c b/iup/test/canvas_scrollbar.c new file mode 100755 index 0000000..72749de --- /dev/null +++ b/iup/test/canvas_scrollbar.c @@ -0,0 +1,191 @@ +#include +#include +#include "iup.h" +#include "cd.h" +#include "cdiup.h" +#include "wd.h" + + +/* World: (0-600)x(0-400) + The canvas will be a window into that space. + If canvas is smaller than the virtual space, scrollbars are active. + The drawing is a red X connecting the corners of the world. +*/ +#define WORLD_W 600 +#define WORLD_H 400 +static int scale = 1; + +static void update_scrollbar(Ihandle* ih, int canvas_w, int canvas_h) +{ + /* update page size, it is always the client size of the canvas, + but must convert it to world coordinates. + If you change canvas size or scale must call this function. */ + double ww, wh; + if (scale > 0) + { + ww = (double)canvas_w/scale; + wh = (double)canvas_h/scale; + } + else + { + ww = canvas_w*abs(scale); + wh = canvas_h*abs(scale); + } + IupSetfAttribute(ih, "DX", "%f", ww); + IupSetfAttribute(ih, "DY", "%f", wh); +} + +static void update_viewport(Ihandle* ih, cdCanvas *canvas, float posx, float posy) +{ + int view_x, view_y, view_w, view_h; + + /* The CD viewport is the same area represented by the virtual space of the scrollbar, + but not using the same coordinates. */ + + /* posy is top-bottom, CD is bottom-top. + invert posy reference (YMAX-DY - POSY) */ + posy = WORLD_H-IupGetFloat(ih, "DY") - posy; + if (posy < 0) posy = 0; + + if (scale > 0) + { + view_w = WORLD_W*scale; + view_h = WORLD_H*scale; + view_x = (int)(posx*scale); + view_y = (int)(posy*scale); + } + else + { + view_w = WORLD_W/abs(scale); + view_h = WORLD_H/abs(scale); + view_x = (int)(posx/abs(scale)); + view_y = (int)(posy/abs(scale)); + } + + wdCanvasViewport(canvas, -view_x, view_w-1 - view_x, -view_y, view_h-1 - view_y); +} + +/************************************************************************************/ + +static int action(Ihandle *ih) +{ + cdCanvas *canvas = (cdCanvas*)IupGetAttribute(ih, "_CD_CANVAS"); + + cdCanvasClear(canvas); + + cdCanvasForeground(canvas, CD_RED); + wdCanvasLine(canvas, 0, 0, WORLD_W, WORLD_H); + wdCanvasLine(canvas, 0, WORLD_H, WORLD_W, 0); + wdCanvasArc(canvas, WORLD_W/2, WORLD_H/2+WORLD_H/10, WORLD_W/10, WORLD_H/10, 0, 360); + + return IUP_DEFAULT; +} + +static int resize_cb(Ihandle *ih, int canvas_w, int canvas_h) +{ + cdCanvas *canvas = (cdCanvas*)IupGetAttribute(ih, "_CD_CANVAS"); + + /* update CD canvas */ + cdCanvasActivate(canvas); + + update_scrollbar(ih, canvas_w, canvas_h); + update_viewport(ih, canvas, IupGetFloat(ih, "POSX"), IupGetFloat(ih, "POSY")); + return IUP_DEFAULT; +} + +static int scroll_cb(Ihandle *ih, int op, float posx, float posy) +{ + cdCanvas *canvas = (cdCanvas*)IupGetAttribute(ih, "_CD_CANVAS"); + update_viewport(ih, canvas, posx, posy); + IupRedraw(ih, 0); + (void)op; + return IUP_DEFAULT; +} + +static int wheel_cb(Ihandle *ih,float delta,int x,int y,char* status) +{ + int canvas_w, canvas_h; + cdCanvas *canvas = (cdCanvas*)IupGetAttribute(ih, "_CD_CANVAS"); + (void)x; + (void)y; + (void)status; + + if (scale+delta==0) /* skip 0 */ + { + if (scale > 0) + scale = -1; + else + scale = 1; + } + else + scale += (int)delta; + + cdCanvasGetSize(canvas, &canvas_w, &canvas_h, NULL, NULL); + update_scrollbar(ih, canvas_w, canvas_h); + update_viewport(ih, canvas, IupGetFloat(ih, "POSX"), IupGetFloat(ih, "POSY")); + IupRedraw(ih, 0); + return IUP_DEFAULT; +} + +static int map_cb(Ihandle *ih) +{ + cdCanvas *canvas = cdCreateCanvas(CD_IUP, ih); + + /* World size is fixed */ + wdCanvasWindow(canvas, 0, WORLD_W, 0, WORLD_H); + + /* handle scrollbar in world coordinates, so we only have to update DX/DY */ + IupSetAttribute(ih, "XMIN", "0"); + IupSetAttribute(ih, "YMIN", "0"); + IupSetfAttribute(ih, "XMAX", "%d", WORLD_W); + IupSetfAttribute(ih, "YMAX", "%d", WORLD_H); + + return IUP_DEFAULT; +} + +static int unmap_cb(Ihandle *ih) +{ + cdCanvas *canvas = (cdCanvas*)IupGetAttribute(ih, "_CD_CANVAS"); + cdKillCanvas(canvas); + return IUP_DEFAULT; +} + +void CanvasScrollbarTest(void) +{ + Ihandle *dlg, *cnv; + + cnv = IupCanvas(NULL); + IupSetAttribute(cnv, "RASTERSIZE", "300x200"); /* initial size */ + IupSetAttribute(cnv, "SCROLLBAR", "YES"); + + IupSetCallback(cnv, "RESIZE_CB", (Icallback)resize_cb); + IupSetCallback(cnv, "ACTION", (Icallback)action); + IupSetCallback(cnv, "MAP_CB", (Icallback)map_cb); + IupSetCallback(cnv, "UNMAP_CB", (Icallback)unmap_cb); + IupSetCallback(cnv, "WHEEL_CB", (Icallback)wheel_cb); + IupSetCallback(cnv, "SCROLL_CB", (Icallback)scroll_cb); + + dlg = IupDialog(IupVbox(cnv, NULL)); + IupSetAttribute(dlg, "TITLE", "Scrollbar Test"); + IupSetAttribute(dlg, "MARGIN", "10x10"); + + IupMap(dlg); + IupSetAttribute(cnv, "RASTERSIZE", NULL); /* release the minimum limitation */ + + IupShowXY(dlg,IUP_CENTER,IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + CanvasScrollbarTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/cells_checkboard.c b/iup/test/cells_checkboard.c new file mode 100755 index 0000000..40cc0ef --- /dev/null +++ b/iup/test/cells_checkboard.c @@ -0,0 +1,83 @@ +#include +#include +#include + +#include "iup.h" +#include "cd.h" +#include "iupcontrols.h" + + +static int nlines_cb(Ihandle* ih) +{ + return 8; +} + +static int ncols_cb(Ihandle* ih) +{ + return 8; +} + +static int height_cb(Ihandle* ih, int i) +{ + return 50; +} + +static int width_cb(Ihandle* ih, int j) +{ + return 50; +} + +static int draw_cb(Ihandle* ih, int i, int j, int xmin, int xmax, int ymin, int ymax) +{ + if (((i%2) && (j%2)) || (((i+1)%2) && ((j+1)%2))) + cdForeground(CD_WHITE); + else + cdForeground(CD_BLACK); + + cdBox(xmin, xmax, ymin, ymax); + return IUP_DEFAULT; +} + +static Ihandle* create(void) +{ + Ihandle* cells = IupCells(); + + IupSetCallback(cells, "DRAW_CB", (Icallback)draw_cb); + IupSetCallback(cells, "WIDTH_CB", (Icallback)width_cb); + IupSetCallback(cells, "HEIGHT_CB", (Icallback)height_cb); + IupSetCallback(cells, "NLINES_CB", (Icallback)nlines_cb); + IupSetCallback(cells, "NCOLS_CB", (Icallback)ncols_cb); + + return cells; +} + +void CellsCheckboardTest(void) +{ + Ihandle* dlg = NULL; + Ihandle* cells = NULL; + + cells = create(); + dlg = IupDialog(cells); + + IupSetAttribute(dlg, "RASTERSIZE", "400x400"); + IupSetAttribute(dlg, "TITLE", "IupCells"); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER) ; + IupSetAttribute(dlg, "RASTERSIZE", NULL); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupControlsOpen(); + + CellsCheckboardTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/cells_degrade.c b/iup/test/cells_degrade.c new file mode 100755 index 0000000..30e969b --- /dev/null +++ b/iup/test/cells_degrade.c @@ -0,0 +1,150 @@ +#include +#include +#include + +#include "iup.h" +#include "cd.h" +#include "iupcontrols.h" + + +static int nlines_cb(Ihandle* ih) +{ + return 7; +} + +static int ncols_cb(Ihandle* ih) +{ + return 7; +} + +static int height_cb(Ihandle* ih, int i) +{ + return (int)(30 + i * 1.5); +} + +static int width_cb(Ihandle* ih, int j) +{ + return (int)(50 + j * 1.5); +} + +static int mouseclick_cb(Ihandle* ih, int b, char* m, int i, int j, int x, int y, char* r) +{ + printf("CLICK: %d: (%02d, %02d)\n", b, i, j); + return IUP_DEFAULT; +} + +static int scrolling_cb(Ihandle* ih, int i, int j) +{ + printf("SCROLL: (%02d, %02d)\n", i, j); + return IUP_DEFAULT; +} + +static int vspan_cb(Ihandle* ih, int i, int j) +{ + if (i == 1 && j == 1) + return 2; + + if (i == 5 && j == 5) + return 2; + + return 1; +} + +static int hspan_cb(Ihandle* ih, int i, int j) +{ + if (i == 1 && j == 1) + return 2; + + if (i == 5 && j == 5) + return 2; + + return 1; +} + +static int draw_cb(Ihandle* ih, int i, int j, int xmin, int xmax, int ymin, int ymax) +{ + static char buffer[64]; + int xm = (xmax + xmin) / 2; + int ym = (ymax + ymin) / 2; + + if (i == 1 && j == 2) + return IUP_DEFAULT; + if (i == 2 && j == 1) + return IUP_DEFAULT; + if (i == 2 && j == 2) + return IUP_DEFAULT; + if (i == 5 && j == 6) + return IUP_DEFAULT; + if (i == 6 && j == 5) + return IUP_DEFAULT; + if (i == 6 && j == 6) + return IUP_DEFAULT; + + if (i == 1 && j == 1) + cdForeground(CD_WHITE); + else + cdForeground(cdEncodeColor((unsigned char)(i*20), (unsigned char)(j*100), (unsigned char)(i+100))); + + cdBox(xmin, xmax, ymin, ymax); + cdTextAlignment(CD_CENTER); + cdForeground(CD_BLACK); + sprintf(buffer, "(%02d, %02d)", i, j); + cdText(xm, ym, buffer); + + return IUP_DEFAULT; +} + +static Ihandle* create(void) +{ + Ihandle* cells = IupCells(); + + IupSetCallback(cells, "MOUSECLICK_CB", (Icallback)mouseclick_cb); + IupSetCallback(cells, "DRAW_CB", (Icallback)draw_cb); + IupSetCallback(cells, "WIDTH_CB", (Icallback)width_cb); + IupSetCallback(cells, "HEIGHT_CB", (Icallback)height_cb); + IupSetCallback(cells, "NLINES_CB", (Icallback)nlines_cb); + IupSetCallback(cells, "NCOLS_CB", (Icallback)ncols_cb); + IupSetCallback(cells, "HSPAN_CB", (Icallback)hspan_cb); + IupSetCallback(cells, "VSPAN_CB", (Icallback)vspan_cb); + IupSetCallback(cells, "SCROLLING_CB", (Icallback)scrolling_cb); + + IupSetAttribute(cells, "BOXED", "NO"); + IupSetAttribute(cells, "RASTERSIZE", "395x255"); + + return cells; +} + +void CellsDegradeTest(void) +{ + Ihandle* dlg = NULL; + Ihandle* cells = NULL; + Ihandle* box = NULL; + + cells = create(); + + box = IupVbox(cells, NULL); + IupSetAttribute(box, "MARGIN", "10x10"); + + dlg = IupDialog(box); + + IupSetAttribute(dlg, "TITLE", "IupCells"); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER) ; + IupSetAttribute(cells, "RASTERSIZE", NULL); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupControlsOpen(); + + CellsDegradeTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/cells_numbering.c b/iup/test/cells_numbering.c new file mode 100755 index 0000000..7cb303f --- /dev/null +++ b/iup/test/cells_numbering.c @@ -0,0 +1,102 @@ +#include +#include +#include + +#include "iup.h" +#include "cd.h" +#include "iupcontrols.h" + + +static int nlines_cb(Ihandle* ih) +{ + return 20; +} + +static int ncols_cb(Ihandle* ih) +{ + return 50; +} + +static int height_cb(Ihandle* ih, int i) +{ + return 30; +} + +static int width_cb(Ihandle* ih, int j) +{ + return 70; +} + +static int mouseclick_cb(Ihandle* ih, int b, char* m, int i, int j, int x, int y, char* r) +{ + static char buffer[128]; + sprintf(buffer, "CLICK: %d: (%02d, %02d)\n", b, i, j); + + IupMessage("Hi!", buffer); + return IUP_DEFAULT; +} + +static int draw_cb(Ihandle* ih, int i, int j, int xmin, int xmax, int ymin, int ymax) +{ + static char buffer[64]; + int xm = (xmax + xmin) / 2; + int ym = (ymax + ymin) / 2; + + cdForeground(cdEncodeColor((unsigned char)(i*20), (unsigned char)(j*100), (unsigned char)(i+100))); + + cdBox(xmin, xmax, ymin, ymax); + cdTextAlignment(CD_CENTER); + cdForeground(CD_BLACK); + sprintf(buffer, "(%02d, %02d)", i, j); + cdText(xm, ym, buffer); + + return IUP_DEFAULT; +} + +static Ihandle* create(void) +{ + Ihandle* cells = IupCells(); + + IupSetCallback(cells, "MOUSECLICK_CB", (Icallback)mouseclick_cb); + IupSetCallback(cells, "DRAW_CB", (Icallback)draw_cb); + IupSetCallback(cells, "WIDTH_CB", (Icallback)width_cb); + IupSetCallback(cells, "HEIGHT_CB", (Icallback)height_cb); + IupSetCallback(cells, "NLINES_CB", (Icallback)nlines_cb); + IupSetCallback(cells, "NCOLS_CB", (Icallback)ncols_cb); + + IupSetAttribute(cells, "BOXED", "NO"); + + return cells; +} + +void CellsNumberingTest(void) +{ + Ihandle* dlg = NULL; + Ihandle* cells = NULL; + + IupControlsOpen(); + + cells = create(); + dlg = IupDialog(cells); + + IupSetAttribute(cells, "RASTERSIZE", "500x500"); + IupSetAttribute(dlg, "TITLE", "IupCells"); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER) ; + IupSetAttribute(cells, "RASTERSIZE", NULL); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + CellsNumberingTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/class_conf.c b/iup/test/class_conf.c new file mode 100755 index 0000000..4e73f3d --- /dev/null +++ b/iup/test/class_conf.c @@ -0,0 +1,278 @@ +#include +#include +#include + +#include + +#include "../src/iup_class.h" +#include "../src/iup_register.h" + +#define MAX_ITEMS 200 + +char* callback_str[] = {"idle", "", "Ii", "ccc", "d", "iiiic", + "ff", "fiis", "i", "iff", "ii", "iic", + "iiIII", "iii", "iiii", "iiiiii", "iiiiiis", + "iiiis", "iinsii", "iis", "is", "nii", + "nn", "s", "sii", "siii", "ss", "i=s", "ii=s", + "iiiiiiv"}; + +char currentClassName[256]; + +int compare(const void *a, const void *b) +{ + return strcmp( * ( char** ) a, * ( char** ) b ); +} + +/* Update callback labels */ +static int callbacksList_ActionCB (Ihandle *ih, char *callName, int pos, int state) +{ + char* temp; + char params[256], copy[2]; + int i = 0; + int returns = 0; + + if(!callName) + return 0; + + temp = iupClassGetDefaultAttribute(currentClassName, callName); + + copy[1] = '\0'; + sprintf(params, "%s", "Ihandle*"); + + IupSetAttribute(IupGetHandle("labelCallback"), "TITLE", callName); + + while(i < (int)strlen(temp)) + { + strncpy(copy, temp+i, 1); + + if(!strcmp(copy, "i")) + sprintf(params, "%s, %s", params, "int"); + else if(!strcmp(copy, "c")) + sprintf(params, "%s, %s", params, "unsigned char"); + else if(!strcmp(copy, "s")) + sprintf(params, "%s, %s", params, "char*"); + else if(!strcmp(copy, "f")) + sprintf(params, "%s, %s", params, "float"); + else if(!strcmp(copy, "d")) + sprintf(params, "%s, %s", params, "double"); + else if(!strcmp(copy, "I")) + sprintf(params, "%s, %s", params, "int*"); + else if(!strcmp(copy, "n")) + sprintf(params, "%s, %s", params, "Ihandle*"); + else if(!strcmp(copy, "v")) + sprintf(params, "%s, %s", params, "cdCanvas*"); + else if(!strcmp(copy, "=")) + { + returns = 1; + break; + } + + i++; + } + + if(returns) + sprintf(params, "%s (= char*)", params); + else if(!strcmp(callName, "HELP_CB")) + sprintf(params, "%s (= void)", params); + else + sprintf(params, "%s (= int)", params); + + if(!strcmp(temp, "idle")) + IupSetAttribute(IupGetHandle("labelParams"), "TITLE", "void"); + else + IupSetAttribute(IupGetHandle("labelParams"), "TITLE", params); + + (void)ih; + (void)pos; + (void)state; + + return IUP_DEFAULT; +} + +/* Update attribute labels */ +static int attributesList_ActionCB (Ihandle *ih, char *attribName, int pos, int state) +{ + char* temp; + + if(!attribName) + return 0; + + temp = iupClassGetDefaultAttribute(currentClassName, attribName); + + IupSetAttribute(IupGetHandle("labelAttribute"), "TITLE", attribName); + + if(!temp) + IupSetAttribute(IupGetHandle("labelDefault"), "TITLE", "NULL"); + else + IupSetAttribute(IupGetHandle("labelDefault"), "TITLE", temp); + + (void)ih; + (void)pos; + (void)state; + + return IUP_DEFAULT; +} + +static int classesList_ActionCB (Ihandle *ih, char *className, int pos, int state) +{ + int i, j, n; + char* temp; + char **names = (char **) malloc(MAX_ITEMS * sizeof(char *)); + int call_str = sizeof(callback_str) / sizeof(char*); + + n = IupGetClassAttributes(className, names, MAX_ITEMS); + + /* Sort names */ + qsort(names, n, sizeof(char*), compare); + + /* Clear lists */ + IupSetAttribute(IupGetHandle("listAttributes"), "REMOVEITEM", NULL); + IupSetAttribute(IupGetHandle("listCallbacks"), "REMOVEITEM", NULL); + + /* Populate attribute and callback lists */ + for (i = 0; i < n; i++) + { + temp = iupClassGetDefaultAttribute(className, names[i]); + + if(!temp) + { + /* No default value */ + IupSetAttribute(IupGetHandle("listAttributes"), "APPENDITEM", names[i]); + } + else + { + for(j = 0; j < call_str; j++) + { + /* callback attribute */ + if(!strcmp(temp, callback_str[j])) + { + IupSetAttribute(IupGetHandle("listCallbacks"), "APPENDITEM", names[i]); + break; + } + } + + if(j == call_str) + { + /* attribute w/ default value */ + IupSetAttribute(IupGetHandle("listAttributes"), "APPENDITEM", names[i]); + } + } + } + + /* Update labels (values) */ + IupSetAttribute(IupGetHandle("labelClass"), "TITLE", className); + strcpy(currentClassName, className); + + IupSetAttribute(IupGetHandle("labelAttribute"), "TITLE", NULL); + IupSetAttribute(IupGetHandle("labelDefault"), "TITLE", NULL); + IupSetAttribute(IupGetHandle("labelCallback"), "TITLE", NULL); + IupSetAttribute(IupGetHandle("labelParams"), "TITLE", NULL); + + + (void)ih; + (void)pos; + (void)state; + + return IUP_DEFAULT; +} + +void PopulateListOfClasses(void) +{ + int i, n; + char **list = (char **) malloc(MAX_ITEMS * sizeof(char *)); + + n = iupRegisterGetClasses(list, MAX_ITEMS); + + qsort(list, n, sizeof(char*), compare); + + for(i = 0; i < n; i++) + IupSetAttribute(IupGetHandle("listClasses"), "APPENDITEM", list[i]); +} + +void ConfTest(void) +{ + Ihandle *dialog, *box, *lists, *listClasses, *listAttributes, *listCallbacks; + Ihandle *labelAttribute, *labelDefault, *labelCallback, *labelParams, *labelClass; + + listClasses = IupList(NULL); /* list of registered classes */ + listAttributes = IupList(NULL); /* list of attributes of the selected class */ + listCallbacks = IupList(NULL); /* list of callbacks of the selected class */ + + labelClass = IupLabel(NULL); + + labelAttribute = IupLabel(NULL); + labelDefault = IupLabel(NULL); + labelCallback = IupLabel(NULL); + labelParams = IupLabel(NULL); + + IupSetAttributes(listClasses, "EDITBOX=NO, DROPDOWN=NO, NAME=listClasses, SIZE= 70x85"); + IupSetAttributes(listAttributes, "EDITBOX=NO, DROPDOWN=NO, NAME=listAttributes, SIZE=120x85"); + IupSetAttributes(listCallbacks, "EDITBOX=NO, DROPDOWN=NO, NAME=listCallbacks, SIZE=120x85"); + + IupSetAttribute(labelClass, "FONTSTYLE", "Bold"); + IupSetAttribute(labelClass, "FGCOLOR", "255 0 0"); + + IupSetAttribute(labelClass, "SIZE", "100x"); + IupSetAttribute(labelAttribute, "SIZE", "100x"); + IupSetAttribute(labelDefault, "SIZE", "100x"); + IupSetAttribute(labelCallback, "SIZE", "100x"); + IupSetAttribute(labelParams, "SIZE", "280x"); + + IupSetCallback(listClasses, "ACTION", (Icallback) classesList_ActionCB); + IupSetCallback(listAttributes, "ACTION", (Icallback) attributesList_ActionCB); + IupSetCallback(listCallbacks, "ACTION", (Icallback) callbacksList_ActionCB); + + IupSetHandle("listClasses", listClasses); + IupSetHandle("listAttributes", listAttributes); + IupSetHandle("listCallbacks", listCallbacks); + + IupSetHandle("labelClass", labelClass); + IupSetHandle("labelAttribute", labelAttribute); + IupSetHandle("labelDefault", labelDefault); + IupSetHandle("labelCallback", labelCallback); + IupSetHandle("labelParams", labelParams); + + lists = IupVbox( + IupHbox( + IupSetAttributes(IupFrame(IupVbox(listClasses, NULL)), "TITLE=CLASSES"), + IupSetAttributes(IupFrame(IupVbox(listAttributes, NULL)), "TITLE=ATTRIBUTES"), + IupSetAttributes(IupFrame(IupVbox(listCallbacks, NULL)), "TITLE=CALLBACKS"), + NULL), + IupHbox( + IupSetAttributes(IupFrame(IupHbox(IupVbox(IupLabel("Class: "), IupLabel("Attribute: "), + IupLabel("Default: "), IupLabel("Callback: "), + IupLabel("Parameters: "), NULL), + IupVbox(labelClass, labelAttribute, + labelDefault, labelCallback, + labelParams, NULL), + NULL)), "TITLE=DETAILS"), + NULL), + NULL); + + box = IupHbox(lists, NULL); + + IupSetAttributes(lists,"MARGIN=10x10, GAP=10"); + + dialog = IupDialog(box); + + IupSetAttribute(dialog, "TITLE", "Class Conference and Documentation"); + + IupShowXY(dialog, IUP_CENTER, IUP_CENTER); + + PopulateListOfClasses(); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + ConfTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/clipboard.c b/iup/test/clipboard.c new file mode 100755 index 0000000..e4ea8c8 --- /dev/null +++ b/iup/test/clipboard.c @@ -0,0 +1,53 @@ +#include +#include + +#include "iup.h" +#include "iupkey.h" + + +static int copy_cb(Ihandle* ih) +{ + Ihandle* text = IupGetDialogChild(ih, "text"); + Ihandle* clipboard = IupClipboard(); + IupSetAttribute(clipboard, "TEXT", IupGetAttribute(text, "VALUE")); + IupDestroy(clipboard); + return IUP_DEFAULT; +} + +static int paste_cb(Ihandle* ih) +{ + Ihandle* text = IupGetDialogChild(ih, "text"); + Ihandle* clipboard = IupClipboard(); + IupSetAttribute(text, "VALUE", IupGetAttribute(clipboard, "TEXT")); + IupDestroy(clipboard); + return IUP_DEFAULT; +} + +void ClipboardTest(void) +{ + Ihandle *dlg = IupDialog(IupVbox( + IupSetAttributes(IupText(NULL), "SIZE=80x60, MULTILINE=YES, NAME=text, EXPAND=YES"), + IupSetCallbacks(IupButton("Copy", NULL), "ACTION", copy_cb, NULL), + IupSetCallbacks(IupButton("Paste", NULL), "ACTION", paste_cb, NULL), + NULL)); + IupSetAttribute(dlg, "GAP", "10"); + IupSetAttribute(dlg, "MARGIN", "20x20"); + + IupSetAttribute(dlg, "TITLE", "Clipboard Test"); + IupShow(dlg); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + ClipboardTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/colorbar.c b/iup/test/colorbar.c new file mode 100755 index 0000000..a24bbb1 --- /dev/null +++ b/iup/test/colorbar.c @@ -0,0 +1,162 @@ + +#include +#include + +#include "iup.h" +#include "cd.h" +#include "cdiup.h" +#include "iupcontrols.h" + +static Ihandle *canvas = NULL; +static cdCanvas *cdcanvas = NULL; + +static int redraw_cb(Ihandle* ih) +{ + if (!cdcanvas) + return IUP_DEFAULT; + + /* Activates canvas cdcanvas */ + cdActivate(cdcanvas); + cdClear(); + + /* Draws a rectangle on the canvas */ + cdBegin(CD_FILL); + cdVertex(50, 50); + cdVertex(150, 50); + cdVertex(100, 150); + cdEnd(); + + /* Function executed sucessfully */ + return IUP_DEFAULT; +} + +static int extended_cb(Ihandle* ih, int cell) +{ + printf("extended_cb(%d)\n", cell); + return IUP_DEFAULT; +} + +static char* cell_cb(Ihandle* ih, int cell) +{ + int ri, gi, bi; + static char str[30]; + + sprintf(str, "CELL%d", cell); + sscanf(IupGetAttribute(ih, str), "%d %d %d", &ri, &gi, &bi); + printf("cell_cb(%d): %d, %d, %d\n", cell, ri, gi, bi); + +/* + unsigned char r, g, b; + r = (unsigned char)ri; + g = (unsigned char)gi; + b = (unsigned char)bi; + if (IupGetColor(IUP_MOUSEPOS, IUP_MOUSEPOS, &r, &g, &b)) + { + sprintf(str, "%d %d %d", (int)r, (int)g, (int)b); + cdActivate( cdcanvas ) ; + cdForeground(cdEncodeColor(r, g, b)); + redraw_cb(canvas); + return str; + } +*/ + return NULL; +} + +static int select_cb(Ihandle* ih, int cell, int type) +{ + long cd_color; + char str[30]; + int ri, gi, bi; + + sprintf(str, "CELL%d", cell); + sscanf(IupGetAttribute(ih, str), "%d %d %d", &ri, &gi, &bi); + printf("select_cb(%d, %d): %d, %d, %d\n", cell, type, ri, gi, bi); + + cd_color = cdEncodeColor((unsigned char)ri,(unsigned char)gi,(unsigned char)bi); + + if (!cdcanvas) + return IUP_DEFAULT; + + cdActivate( cdcanvas ) ; + if (type == -1) + cdForeground(cd_color); + else + cdBackground(cd_color); + + redraw_cb(canvas); + + return IUP_DEFAULT; +} + +static int switch_cb(Ihandle* ih, int primcell, int seccell) +{ + long fgcolor; + if (!cdcanvas) + return IUP_DEFAULT; + printf("switch_cb(%d, %d)\n", primcell, seccell); + cdActivate(cdcanvas) ; + fgcolor = cdForeground(CD_QUERY); + cdForeground(cdBackground(CD_QUERY)); + cdBackground(fgcolor); + redraw_cb(canvas); + return IUP_DEFAULT; +} + +void ColorbarTest(void) +{ + Ihandle *dlg, *cb; + + IupControlsOpen(); + + /* Creates a canvas associated with the redraw action */ + canvas = IupCanvas(NULL) ; + IupSetCallback(canvas, "ACTION", (Icallback)redraw_cb); + IupSetAttribute(canvas, "RASTERSIZE", "200x300"); + + cb = IupColorbar(); + IupSetAttribute(cb, "RASTERSIZE", "70x"); + IupSetAttribute(cb, "EXPAND", "VERTICAL"); + IupSetAttribute(cb, "NUM_PARTS", "2"); + IupSetAttribute(cb, "SHOW_SECONDARY", "YES"); + IupSetAttribute(cb, "PREVIEW_SIZE", "60"); +// IupSetAttribute(cb, "ACTIVE", "NO"); +// IupSetAttribute(cb, "BGCOLOR", "128 0 255"); + + IupSetCallback(cb, "SELECT_CB", (Icallback)select_cb); + IupSetCallback(cb, "CELL_CB", (Icallback)cell_cb); + IupSetCallback(cb, "SWITCH_CB", (Icallback)switch_cb); + IupSetCallback(cb, "EXTENDED_CB", (Icallback)extended_cb); + + dlg = IupDialog(IupHbox(canvas, cb, NULL)); + IupSetAttribute(dlg, "MARGIN", "5x5"); + + IupSetAttribute(dlg, "TITLE", "IupColorbar"); + + /* Maps the dlg. This must be done before the creation of the CD canvas. + Could also use MAP_CB callback. */ + IupMap(dlg); + + cdcanvas = cdCreateCanvas(CD_IUP, canvas); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); + + IupMainLoop(); + + IupDestroy(dlg); + IupClose(); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + ColorbarTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/colorbrowser.c b/iup/test/colorbrowser.c new file mode 100755 index 0000000..9ee594a --- /dev/null +++ b/iup/test/colorbrowser.c @@ -0,0 +1,91 @@ +#include +#include + +#include "iup.h" +#include "iupcontrols.h" + +static Ihandle *label_red, *label_green, *label_blue, *label_color; + +static void clrbrwsr_update_text(unsigned char r, unsigned char g, unsigned char b, char* hsi) +{ + float h, s, i; + sscanf(hsi, "%f %f %f", &h, &s, &i); + IupSetfAttribute(label_red, "TITLE", "R:%3d H:%3.0f", (int)r, (double)h); + IupSetfAttribute(label_green, "TITLE", "G:%3d S:%1.2f", (int)g, (double)s); + IupSetfAttribute(label_blue, "TITLE", "B:%3d I:%1.2f", (int)b, (double)i); + IupSetfAttribute(label_color, "BGCOLOR", "%d %d %d", (int)r, (int)g, (int)b); +} + +static int clrbrwsr_drag_cb(Ihandle* ih, unsigned char r, unsigned char g, unsigned char b) +{ + (void)ih; + printf("DRAG_CB(%d, %d, %d)\n", (int)r, (int)g, (int)b); + clrbrwsr_update_text(r, g, b, IupGetAttribute(ih, "HSI")); + return IUP_DEFAULT; +} + +static int clrbrwsr_change_cb(Ihandle* ih, unsigned char r, unsigned char g, unsigned char b) +{ + (void)ih; + printf("CHANGE_CB(%d, %d, %d)\n", (int)r, (int)g, (int)b); + clrbrwsr_update_text(r, g, b, IupGetAttribute(ih, "HSI")); + return IUP_DEFAULT; +} + +void ColorBrowserTest(void) +{ + Ihandle *dlg, *hbox_final, *vbox, *clrbrwsr; + + label_red = IupLabel(NULL); + IupSetAttribute(label_red, "SIZE", "100x10"); + IupSetAttribute(label_red, "FONT", "Courier, 12"); + label_green = IupLabel(NULL); + IupSetAttribute(label_green, "SIZE", "100x10"); + IupSetAttribute(label_green, "FONT", "Courier, 12"); + label_blue = IupLabel(NULL); + IupSetAttribute(label_blue, "SIZE", "100x10"); + IupSetAttribute(label_blue, "FONT", "Courier, 12"); + + label_color = IupLabel(NULL); + IupSetAttribute(label_color, "RASTERSIZE", "50x50"); + + clrbrwsr = IupColorBrowser(); +// IupSetAttribute(clrbrwsr, "ACTIVE", "NO"); +// IupSetAttribute(clrbrwsr, "BGCOLOR", "128 128 255"); + IupSetAttribute(clrbrwsr, "EXPAND", "YES"); + IupSetAttribute(clrbrwsr, "RGB", "128 0 128"); + clrbrwsr_update_text(128, 0, 128, IupGetAttribute(clrbrwsr, "HSI")); + + IupSetCallback(clrbrwsr, "CHANGE_CB", (Icallback)clrbrwsr_change_cb); + IupSetCallback(clrbrwsr, "DRAG_CB", (Icallback)clrbrwsr_drag_cb); + + vbox = IupVbox( + label_red, + label_green, + label_blue, + label_color, + NULL); + + hbox_final = IupHbox (clrbrwsr, vbox, NULL); + IupSetAttribute(hbox_final, "MARGIN", "10x10"); + + dlg = IupDialog (hbox_final); + IupSetAttribute(dlg, "TITLE", "IupColorBrowser Test"); + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupControlsOpen(); + + ColorBrowserTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/config.mak b/iup/test/config.mak new file mode 100755 index 0000000..2764e6c --- /dev/null +++ b/iup/test/config.mak @@ -0,0 +1,115 @@ +APPNAME = iuptest +APPTYPE = CONSOLE + +INCLUDES = ../include + +ifdef USE_GTK + ifndef GTK_DEFAULT + # Build GTK version in IRIX,SunOS,AIX,Win32 + APPNAME = iuptestgtk + endif +else + ifdef GTK_DEFAULT + # Build Motif version in Linux,Darwin,FreeBSD + USE_MOTIF = Yes + APPNAME = iuptestmot + endif +endif + +USE_IUP3 = Yes +USE_STATIC = Yes +IUP = .. + +#TEC_UNAME_DIR = Win32.$(TEC_UNAME) +#DBG = Yes + +# Must uncomment all SRC lines +DEFINES = BIG_TEST +SRC += bigtest.c + +SRC += tray.c +SRC += dialog.c +SRC += predialogs.c +SRC += timer.c +SRC += label.c +SRC += canvas.c +SRC += frame.c +SRC += idle.c +SRC += button.c +SRC += toggle.c +SRC += vbox.c +SRC += hbox.c +SRC += progressbar.c +SRC += text.c +SRC += val.c +SRC += tabs.c +SRC += sample.c +SRC += menu.c +SRC += spin.c +SRC += text_spin.c +SRC += list.c +SRC += sysinfo.c +SRC += mdi.c +SRC += getparam.c +SRC += getcolor.c +SRC += class_conf.c +SRC += tree.c +SRC += zbox.c +SRC += scanf.c +SRC += sbox.c +SRC += clipboard.c + + +#ifneq ($(findstring Win, $(TEC_SYSNAME)), ) +# LIBS += iupimglib +#else +# SLIB += $(IUP)/lib/$(TEC_UNAME)/libiupimglib.a +#endif + +USE_CD = Yes +SRC += canvas_scrollbar.c +SRC += canvas_cddbuffer.c +SRC += canvas_cdsimple.c + +USE_OPENGL = Yes +DEFINES += USE_OPENGL +SRC += glcanvas.c +SRC += glcanvas_cube.c + +USE_IUPCONTROLS = Yes +SRC += colorbrowser.c +SRC += dial.c +SRC += colorbar.c +SRC += cells_numbering.c +SRC += cells_degrade.c +SRC += cells_checkboard.c +SRC += gauge.c +SRC += matrix.c +SRC += matrix_cbs.c +SRC += matrix_cbmode.c + +LINKER = g++ +DEFINES += PPLOT_TEST +SRC += pplot.c +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + LIBS += iup_pplot +# LIBS += cdpdflib +# LDIR += $(IUP)/lib/$(TEC_UNAME) +else + SLIB += $(IUP)/lib/$(TEC_UNAME)/libiup_pplot.a +# SLIB += $(CD)/lib/$(TEC_UNAME)/libcdpdflib.a +endif + +ifneq ($(findstring Win, $(TEC_SYSNAME)), ) + SRC += iuptest.rc +else + ifneq ($(findstring cygw, $(TEC_UNAME)), ) + SRC += iuptest.rc + endif +endif + +#ifneq ($(findstring Win, $(TEC_SYSNAME)), ) +# USE_GDIPLUS=Yes +#else +# USE_XRENDER=Yes +#endif diff --git a/iup/test/dial.c b/iup/test/dial.c new file mode 100755 index 0000000..727934c --- /dev/null +++ b/iup/test/dial.c @@ -0,0 +1,111 @@ +#include +#include + +#include "iup.h" +#include "iupcontrols.h" + +static int help_cb(Ihandle* ih) +{ + printf("HELP_CB(%s)\n", IupGetName(ih)); + return IUP_DEFAULT; +} + +static void printdial(Ihandle* ih, double a, char* color) +{ + Ihandle* label = NULL; + char* u = NULL; + char* type = IupGetAttribute(ih, "TYPE"); + + switch(type[0]) + { + case 'V': + label = IupGetHandle("lbl_v"); + u = "deg"; + break; + case 'H': + label = IupGetHandle("lbl_h"); + u = "rad"; + break; + case 'C': + label = IupGetHandle("lbl_c"); + u = "deg"; + break; + } + + if (label) + { + IupSetfAttribute(label, "TITLE", "%.3g %s", a, u); + IupSetAttribute(label, "BGCOLOR", color); + } +} + +static int mousemove(Ihandle* ih, double a) +{ + printdial(ih, a, "0 255 0"); + return IUP_DEFAULT; +} + +static int button_press(Ihandle* ih, double a) +{ + printdial(ih, a, "255 0 0"); + return IUP_DEFAULT; +} + +static int button_release(Ihandle* ih, double a) +{ + printdial(ih, a, NULL); + return IUP_DEFAULT; +} + +void DialTest(void) +{ + char *error = NULL; + Ihandle *dlg, *dial_h, *dial_v, *dial_c; + + error = IupLoad("dial.led"); + if (error) + { + error = IupLoad("../test/dial.led"); + if (error) + { + IupMessage("%s\n", error); + return; + } + } + + dlg = IupGetHandle("dlg"); + dial_h = IupGetHandle("dial_h"); + dial_v = IupGetHandle("dial_v"); + dial_c = IupGetHandle("dial_c"); + + IupSetFunction("dial_mousemove", (Icallback)mousemove); + IupSetFunction("dial_buttonpress", (Icallback)button_press); + IupSetFunction("dial_buttonrelease", (Icallback)button_release); + + IupSetCallback(dial_h, "HELP_CB", help_cb); + IupSetCallback(dial_v, "HELP_CB", help_cb); + + IupSetAttribute(dial_h, "EXPAND", "HORIZONTAL"); + IupSetAttribute(dial_v, "EXPAND", "VERTICAL"); + +// IupSetAttribute(dlg, "HELPBUTTON", "YES"); +// IupSetAttribute(dlg, "DIALOGFRAME", "YES"); + + IupShow(dlg); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupControlsOpen(); + + DialTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/dial.led b/iup/test/dial.led new file mode 100755 index 0000000..8157cb7 --- /dev/null +++ b/iup/test/dial.led @@ -0,0 +1,49 @@ +lbl_h = LABEL[SIZE=50x]("0") +lbl_v = LABEL[SIZE=50x]("0") +lbl_c = LABEL[SIZE=50x]("0") + +dial_v = DIAL +[ + UNIT=DEGREES, + MOUSEMOVE_CB="dial_mousemove", + BUTTON_PRESS_CB="dial_buttonpress", + BUTTON_RELEASE_CB="dial_buttonrelease" +] ("VERTICAL") + +dial_h = DIAL +[ + DENSITY=0.1, + MOUSEMOVE_CB="dial_mousemove", + BUTTON_PRESS_CB="dial_buttonpress", + BUTTON_RELEASE_CB="dial_buttonrelease" +] ("HORIZONTAL") + +dial_c = DIAL +[ + UNIT=DEGREES, + MOUSEMOVE_CB="dial_mousemove", + BUTTON_PRESS_CB="dial_buttonpress", + BUTTON_RELEASE_CB="dial_buttonrelease" +] ("CIRCULAR") + +dlg = DIALOG[TITLE="IupDial Test"] +( + VBOX[MARGIN=10x10, GAP=10] + ( + HBOX[ALIGNMENT=ACENTER] + ( + dial_v, + lbl_v + ), + HBOX[ALIGNMENT=ACENTER] + ( + dial_h, + lbl_h + ), + HBOX[ALIGNMENT=ACENTER] + ( + dial_c, + lbl_c + ) + ) +) diff --git a/iup/test/dialog.c b/iup/test/dialog.c new file mode 100755 index 0000000..f8097c9 --- /dev/null +++ b/iup/test/dialog.c @@ -0,0 +1,473 @@ +#if 0 +/* To check for memory leaks */ +#define VLD_MAX_DATA_DUMP 80 +#include +#endif + +#include +#include +#include "iup.h" +#include "iupkey.h" + +static unsigned char pixmap_x [ ] = +{ + 1,2,3,3,3,3,3,3,3,2,1, + 2,1,2,3,3,3,3,3,2,1,2, + 0,2,1,2,3,3,3,2,1,2,0, + 0,0,2,1,2,3,2,1,2,0,0, + 0,0,0,2,1,2,1,2,0,0,0, + 0,0,0,0,2,1,2,0,0,0,0, + 0,0,0,2,1,2,1,2,0,0,0, + 0,0,2,1,2,3,2,1,2,0,0, + 0,2,1,2,3,3,3,2,1,2,0, + 2,1,2,3,3,3,3,3,2,1,2, + 1,2,3,3,3,3,3,3,3,2,1 +}; + +static unsigned char pixmap_cursor [ ] = +{ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,2,2,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +} ; + +static int close_cb(Ihandle *ih) +{ + printf("CLOSE_CB(%s) with IupDestroy\n", IupGetAttribute(ih, "TESTTITLE")); + IupDestroy(ih); + return IUP_IGNORE; +} + +static int close_cb2(Ihandle *ih) +{ + printf("CLOSE_CB(%s) with IUP_IGNORE\n", IupGetAttribute(ih, "TESTTITLE")); + return IUP_IGNORE; +} + +static int show_cb(Ihandle *ih, int state) +{ + char* state_str[5] ={ + "SHOW", + "RESTORE", + "MINIMIZE", + "MAXIMIZE", + "HIDE" + }; + printf("SHOW_CB(%s, %s)\n", IupGetAttribute(ih, "TESTTITLE"), state_str[state]); + return IUP_DEFAULT; +} + +static int map_cb(Ihandle *ih) +{ + printf("MAP_CB(%s)\n", IupGetAttribute(ih, "TESTTITLE")); + return IUP_DEFAULT; +} + +static int dropfiles_cb(Ihandle *ih, const char* filename, int num, int x, int y) +{ + printf("DROPFILES_CB(%s, %s, %d, %d, %d)\n", IupGetAttribute(ih, "TESTTITLE"), filename, num, x, y); + return IUP_DEFAULT; +} + +static int resize_cb(Ihandle *ih, int w, int h) +{ + printf("RESIZE_CB(%s, %d, %d) RASTERSIZE=%s\n", IupGetAttribute(ih, "TESTTITLE"), w, h, IupGetAttribute(ih, "RASTERSIZE")); + return IUP_DEFAULT; +} + +static int move_cb(Ihandle *ih, int x, int y) +{ + printf("MOVE_CB(%s, %d, %d)\n", IupGetAttribute(ih, "TESTTITLE"), x, y); + return IUP_DEFAULT; +} + +static int getfocus_cb(Ihandle *ih) +{ + printf("GETFOCUS_CB(%s)\n", IupGetAttribute(ih, "TESTTITLE")); + return IUP_DEFAULT; +} + +static int help_cb(Ihandle* ih) +{ + printf("HELP_CB(%s)\n", IupGetAttribute(ih, "TESTTITLE")); + return IUP_DEFAULT; +} + +static int killfocus_cb(Ihandle *ih) +{ + printf("KILLFOCUS_CB(%s)\n", IupGetAttribute(ih, "TESTTITLE")); + return IUP_DEFAULT; +} + +static int leavewindow_cb(Ihandle *ih) +{ + printf("LEAVEWINDOW_CB(%s)\n", IupGetAttribute(ih, "TESTTITLE")); + return IUP_DEFAULT; +} + +static int enterwindow_cb(Ihandle *ih) +{ + printf("ENTERWINDOW_CB(%s)\n", IupGetAttribute(ih, "TESTTITLE")); + return IUP_DEFAULT; +} + +char *iupKeyCodeToName(int code); + +static void new_dialog(int test, char* tip); + +static int k_any(Ihandle *ih, int c) +{ + if (iup_isprint(c)) + printf("K_ANY(%s, %d = %s \'%c\')", IupGetAttribute(ih, "TESTTITLE"), c, iupKeyCodeToName(c), (char)c); + else + printf("K_ANY(%s, %d = %s)", IupGetAttribute(ih, "TESTTITLE"), c, iupKeyCodeToName(c)); + printf(" MODKEYSTATE(%s)\n", IupGetGlobal("MODKEYSTATE")); + + switch(c) + { + case K_r: + IupSetAttribute(ih, "RASTERSIZE", "300x300"); + IupRefresh(ih); + break; + case K_1: + new_dialog(1, "SIZE=FULLxFULL + IupShow.\n" + "Check also F1 = RASTERSIZE+IupRefresh.\n" + "close_cb returns IGNORE."); + break; + case K_2: + new_dialog(2, "Only common dlg decorations.\n" + "ShowXY.\n" + "min/max size."); + break; + case K_3: + new_dialog(3, "NO decorations"); + break; + case K_4: + new_dialog(4, "PLACEMENT.\n" + "Repeat key to test variations."); + break; + case K_5: + new_dialog(5, "IupPopup"); + break; + case K_6: + new_dialog(6, "FULLSCREEN"); + break; + case K_p: + { + static int count = 0; + if (count == 0) + IupSetAttribute(ih, "PLACEMENT", "MAXIMIZED"); + else if (count == 1) + IupSetAttribute(ih, "PLACEMENT", "MINIMIZED"); + else if (count == 2) + IupSetAttribute(ih, "PLACEMENT", "NORMAL"); + else + IupSetAttribute(ih, "PLACEMENT", "FULL"); + + count++; + if (count == 4) // cicle from 0 to 3 + count = 0; + + IupShow(ih); + } + break; + case K_s: + IupShow(IupGetHandle("_MAIN_DIALOG_TEST_")); + break; + case K_f: + if (IupGetInt(ih, "FULLSCREEN")) + IupSetAttribute(ih, "FULLSCREEN", "NO"); + else + IupSetAttribute(ih, "FULLSCREEN", "YES"); + break; + case K_ESC: + IupDestroy(ih); + return IUP_IGNORE; + case K_c: + return IUP_CLOSE; + case K_h: + IupHide(ih); + break; + } + return IUP_DEFAULT; +} + +static void new_dialog(int test, char* tip) +{ + Ihandle *dlg = IupDialog(NULL); + IupSetAttribute(dlg, "TIP", tip); + IupSetfAttribute(dlg, "_TEST_", "%d", test); + + if (test == 0) + { + char* msg = "Press a key for a dialog test:\n" + "1 = new with SIZE=FULLxFULL\n" + "2 = new with dialog decorations\n" + "3 = new with NO decorations\n" + "4 = new changing PLACEMENT\n" + "5 = new using IupPopup\n" + "6 = new with FULLSCREEN=YES\n" + "p = PLACEMENT=MAXIMIZED\n" + "pp = PLACEMENT=MINIMIZED\n" + "ppp = PLACEMENT=NORMAL\n" + "pppp = PLACEMENT=FULL\n" + "s = IupShow(main)\n" + "f = toggle FULLSCREEN state\n" + "c = return IUP_CLOSE;\n" + "h = IupHide\n" + "r = RASTERSIZE+IupRefresh\n" + "Esc = quit"; + IupAppend(dlg, IupVbox(IupLabel(msg), NULL)); + + IupSetHandle("_MAIN_DIALOG_TEST_", dlg); + } + else + { + IupSetAttribute(dlg, "PARENTDIALOG", "_MAIN_DIALOG_TEST_"); + IupSetAttribute(dlg, "CURSOR", "CROSS"); + } + + if (test != 3) + IupSetfAttribute(dlg, "TITLE", "dlg%d", test); + IupSetfAttribute(dlg, "TESTTITLE", "dlg%d", test); + + if (test == 1) + IupSetAttribute(dlg, "SIZE", "FULLxFULL"); + else if (test != 6) + IupSetAttribute(dlg, "RASTERSIZE", "500x500"); + + if (test == 2) + { + IupSetAttribute(dlg, "CURSOR", "DLG_CURSOR"); + IupSetAttribute(dlg, "ICON", "DLG_ICON"); + IupSetAttribute(dlg, "MINSIZE", "300x300"); + IupSetAttribute(dlg, "MAXSIZE", "600x600"); +// IupSetAttribute(dlg, "FONTSIZE", "20"); + + { + static int count = 0; + if (count == 1) + { +// IupSetAttribute(dlg, "FONT", "TIMES_ITALIC_14"); + IupSetAttribute(dlg, "FONT", "Times, Italic 14"); +// IupSetAttribute(dlg, "FONT", "Times, Underline Italic Strikeout -14"); + IupSetAttribute(dlg, "TIPBGCOLOR", "255 128 128"); + IupSetAttribute(dlg, "TIPFGCOLOR", "0 92 255"); + + // Windows Only + IupSetAttribute(dlg, "TIPBALLON", "YES"); + IupSetAttribute(dlg, "TIPBALLONTITLE", "Tip Title Test"); + IupSetAttribute(dlg, "TIPBALLONTITLEICON", "2"); + //IupSetAttribute(dlg, "TIPDELAY", "5000"); + } + if (count == 2) + { + // Windows Only + IupSetAttribute(dlg, "TOPMOST", "YES"); + IupSetAttribute(dlg, "OPACITY", "128"); + IupSetAttribute(dlg, "TOOLBOX", "YES"); + } + count++; + } + } + + if (test == 3) + { + IupSetAttribute(dlg, "BGCOLOR", "255 0 255"); + IupSetAttribute(dlg, "RESIZE", "NO"); + IupSetAttribute(dlg, "MENUBOX", "NO"); + IupSetAttribute(dlg, "MAXBOX", "NO"); + IupSetAttribute(dlg, "MINBOX", "NO"); + IupSetAttribute(dlg, "BORDER", "NO"); + + IupSetAttribute(dlg, "RASTERSIZE", "500x500"); + } + + if (test == 5) + { + IupSetAttribute(dlg, "DIALOGFRAME", "YES"); + + // Windows Only + IupSetAttribute(dlg, "HELPBUTTON", "YES"); + } + + if (test == 1) + IupSetCallback(dlg, "CLOSE_CB", (Icallback)close_cb2); + else + IupSetCallback(dlg, "CLOSE_CB", (Icallback)close_cb); + + IupSetCallback(dlg, "SHOW_CB", (Icallback)show_cb); + IupSetCallback(dlg, "MAP_CB", (Icallback)map_cb); + IupSetCallback(dlg, "K_ANY", (Icallback)k_any); + IupSetCallback(dlg, "GETFOCUS_CB", (Icallback)getfocus_cb); + IupSetCallback(dlg, "KILLFOCUS_CB", (Icallback)killfocus_cb); + IupSetCallback(dlg, "HELP_CB", (Icallback)help_cb); + IupSetCallback(dlg, "ENTERWINDOW_CB", (Icallback)enterwindow_cb); + IupSetCallback(dlg, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb); + IupSetCallback(dlg, "RESIZE_CB", (Icallback)resize_cb); + IupSetCallback(dlg, "MOVE_CB", (Icallback)move_cb); + + // Windows and GTK Only + IupSetCallback(dlg, "DROPFILES_CB", (Icallback)dropfiles_cb); + + if (test == 0 || test == 1) + IupShow(dlg); + else if (test == 3) + IupShowXY(dlg, IUP_RIGHT, IUP_CENTER); + else if (test == 2) + IupShowXY(dlg, 100, 100); + else if (test == 4) + { + static int count = 0; + if (count == 0) + { + IupSetAttribute(dlg, "PLACEMENT", "MINIMIZED"); + IupSetfAttribute(dlg, "TIP", "%s%s", IupGetAttribute(dlg, "TIP"), "\n.PLACEMENT=MINIMIZED."); + } + else if (count == 1) + { + IupSetAttribute(dlg, "PLACEMENT", "MAXIMIZED"); + IupSetfAttribute(dlg, "TIP", "%s%s", IupGetAttribute(dlg, "TIP"), "\n.PLACEMENT=MAXIMIZED."); + } + else + { + IupSetAttribute(dlg, "PLACEMENT", "FULL"); + IupSetfAttribute(dlg, "TIP", "%s%s", IupGetAttribute(dlg, "TIP"), "\n.PLACEMENT=FULL."); + } + + count++; + if (count == 3) // cicle from 0 to 2 + count = 0; + + IupShow(dlg); + } + else if (test == 5) + { + IupPopup(dlg, IUP_CURRENT, IUP_CURRENT); + } + else if (test == 6) + { + IupSetAttribute(dlg, "FULLSCREEN", "YES"); + IupShow(dlg); + } +} + +static void create_images(void) +{ + Ihandle *image; + + image = IupImage(11, 11, pixmap_x); + IupSetAttribute(image, "0", "BGCOLOR"); + IupSetAttribute(image, "1", "0 1 0"); + IupSetAttribute(image, "2", "255 0 0"); + IupSetAttribute(image, "3", "255 255 0"); + IupSetHandle("DLG_ICON", image); + + image = IupImage(32, 32, pixmap_cursor); + IupSetAttribute(image, "0", "BGCOLOR"); /* always for cursor */ + IupSetAttribute(image, "1", "255 0 0"); + IupSetAttribute(image, "2", "128 0 0"); + IupSetAttribute(image, "HOTSPOT", "21:10"); + IupSetHandle("DLG_CURSOR", image); +} + +void DialogTest(void) +{ + create_images(); + + new_dialog(0, "IupDialog as a main window,\n" + "all decorations.\n" + "rastersize+centered."); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + DialogTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif + +/***************************************** +--------------TESTS------------------- + +to check IUP sizes x Native sizes: +in UNIX use xwininfo +in Windows use Spy++ +take screen shots, measure dlg sizes if necessary + +0- with all decorations + check: TITLE + TIP + CURSOR + BGCOLOR + RASTERSIZE (check window real size - 500x500) + CLOSE_CB, SHOW_CB, MAP_CB, K_ANY, GETFOCUS_CB, KILLFOCUS_CB, + HELP_CB, ENTERWINDOW_CB, LEAVEWINDOW_CB, RESIZE_CB + Close_cb using IupDestroy + closing main window will close child dialogs + Esc - call IupDestroy + 'h' = IupHide - no destroy + 'c' = return IUP_CLOSE - no destroy + +1- SIZE = FULLxFULL (check window real size) + press 'r' to change - RASTERSIZE+IupRefresh (300x300) + close_cb with IGNORE + +2- ShowXY (check position) + MINSIZE (300x300) and MAXSIZE (600x600) + Custom Icon and Cursor + +3- no decorations + +4- 1o. PLACEMENT MINIMIZED + 2o. PLACEMENT MAXIMIZED + 3o. PLACEMENT FULL + (press 'p' to change placement any time) + +5- only "dlg" decorations + IupPopup + 'c' = return IUP_CLOSE - no destroy + 'h' = IupHide - no destroy + 's' = IupShow for dialog0 + +6- FULLSCREEN + (press 'f' to change fullscreen any time) + +*/ diff --git a/iup/test/file_large.xbm b/iup/test/file_large.xbm new file mode 100755 index 0000000..c2095e9 --- /dev/null +++ b/iup/test/file_large.xbm @@ -0,0 +1,14 @@ +#define file_large_xbm_width 32 +#define file_large_xbm_height 32 +static char file_large_xbm_bits[] = { + 0xF0, 0xFF, 0x3F, 0x00, 0x10, 0x00, 0x60, 0x00, 0x10, 0x00, 0xA0, 0x00, + 0x10, 0x00, 0x20, 0x01, 0x10, 0x00, 0x20, 0x02, 0x10, 0x00, 0x20, 0x04, + 0x10, 0x00, 0x20, 0x08, 0x10, 0x00, 0xE0, 0x1F, 0x10, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x10, 0xF0, 0xFF, 0xFF, 0x1F }; diff --git a/iup/test/frame.c b/iup/test/frame.c new file mode 100755 index 0000000..2bcd128 --- /dev/null +++ b/iup/test/frame.c @@ -0,0 +1,68 @@ +#include +#include +#include "iup.h" + +void FrameTest(void) +{ + Ihandle *dlg, *frame1, *frame2; + + frame1 = IupFrame + ( + IupVbox + ( + IupLabel("Label1"), + IupSetAttributes(IupLabel("Label2"), "SIZE=70x"), + IupLabel("Label3"), + NULL + ) + ); + + frame2 = IupFrame + ( + IupVbox + ( + IupSetAttributes(IupLabel("Label4"), "EXPAND=HORIZONTAL"), + IupLabel("Label5"), + IupLabel("Label6"), + NULL + ) + ); + + IupSetAttribute(frame1, "TITLE", "Title Text"); +// IupSetAttribute(frame1, "FGCOLOR", "255 0 0"); +// IupSetAttribute(frame1, "BGCOLOR", "0 128 0"); + IupSetAttribute(frame2, "SUNKEN", "YES"); + + IupSetAttribute(frame1, "MARGIN", "0x0"); + IupSetAttribute(frame2, "MARGIN", "0x0"); +// IupSetAttribute(frame2, "BGCOLOR", "0 128 0"); + dlg = IupDialog(IupHbox(frame1, frame2, NULL)); + + IupSetAttribute(dlg, "TITLE", "IupFrame Test"); + IupSetAttribute(dlg, "MARGIN", "10x10"); + IupSetAttribute(dlg, "GAP", "5"); + IupSetAttribute(dlg, "FONTSIZE", "14"); +// IupSetAttribute(dlg, "RASTERSIZE", "300x200"); +// IupSetAttribute(dlg, "BGCOLOR", "0 128 0"); + + IupShow(dlg); + printf("RASTERSIZE(%s)\n", IupGetAttribute(frame1, "RASTERSIZE")); + printf("CLIENTSIZE(%s)\n", IupGetAttribute(frame1, "CLIENTSIZE")); + printf("RASTERSIZE(%s)\n", IupGetAttribute(frame2, "RASTERSIZE")); + printf("CLIENTSIZE(%s)\n", IupGetAttribute(frame2, "CLIENTSIZE")); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + FrameTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/gauge.c b/iup/test/gauge.c new file mode 100755 index 0000000..12e3c76 --- /dev/null +++ b/iup/test/gauge.c @@ -0,0 +1,305 @@ +#include +#include + +#include "iup.h" +#include "iupcontrols.h" + +static float increment = 0.01f; +static Ihandle *gauge; +static Ihandle *btn_pause; +static Ihandle *timer; + +static unsigned char pixmap_play[] = +{ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 }; + +static unsigned char pixmap_restart[] = +{ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,2,2,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,1,1,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,1,1,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,2,2,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 }; + +static unsigned char pixmap_rewind[] = +{ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,1,2,2,2,2,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,1,1,2,2,2,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,2,2,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,2,1,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,2,1,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,2,2,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,1,1,2,2,2,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,1,2,2,2,2,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 }; + +static unsigned char pixmap_forward[] = +{ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,2,2,2,2,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,2,1,1,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,2,2,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,1,2,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,1,2,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,2,2,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,2,1,1,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,2,2,2,2,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 }; + +static unsigned char pixmap_pause[] = +{ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 }; + +static void createimg_s (void) +{ + Ihandle *img_restart, *img_play, *img_forward, *img_rewind, *img_pause; + + img_restart = IupImage(22,22, pixmap_restart); + img_play = IupImage(22,22, pixmap_play); + img_forward = IupImage(22,22, pixmap_forward); + img_rewind = IupImage(22,22, pixmap_rewind); + img_pause = IupImage(22,22, pixmap_pause); + + IupSetHandle ("img_restart", img_restart); + IupSetHandle ("img_play", img_play); + IupSetHandle ("img_forward", img_forward); + IupSetHandle ("img_rewind", img_rewind); + IupSetHandle ("img_pause", img_pause); + + IupSetAttribute (img_restart, "1", "0 0 0"); + IupSetAttribute (img_restart, "2", "BGCOLOR"); + IupSetAttribute (img_play, "1", "0 0 0"); + IupSetAttribute (img_play, "2", "BGCOLOR"); + IupSetAttribute (img_forward, "1", "0 0 0"); + IupSetAttribute (img_forward, "2", "BGCOLOR"); + IupSetAttribute (img_rewind, "1", "0 0 0"); + IupSetAttribute (img_rewind, "2", "BGCOLOR"); + IupSetAttribute (img_pause, "1", "0 0 0"); + IupSetAttribute (img_pause, "2", "BGCOLOR"); +} + +static int time_cb(void) +{ + float value = IupGetFloat(gauge, "VALUE"); + value += increment; + if (value > 1) value = 0; /* start over */ + IupSetfAttribute(gauge, "VALUE", "%f", (double)value); + return IUP_DEFAULT; +} + +static int btn_pause_cb(void) +{ + if (!IupGetInt(timer, "RUN")) + { + IupSetAttribute(timer, "RUN", "YES"); + IupSetAttribute(btn_pause, "IMAGE", "img_pause"); + } + else + { + IupSetAttribute(timer, "RUN", "NO"); + IupSetAttribute(btn_pause, "IMAGE", "img_play"); + } + + return IUP_DEFAULT; +} + +static int btn_restart_cb(void) +{ + IupSetAttribute(gauge, "VALUE", "0"); + return IUP_DEFAULT; +} + +static int btn_accelerate_cb(void) +{ + increment *= 2; + return IUP_DEFAULT; +} + +static int btn_decelerate_cb(void) +{ + increment /= 2; + return IUP_DEFAULT; +} + +static int btn_show1_cb(void) +{ + if (!IupGetInt(gauge, "DASHED")) + IupSetAttribute(gauge, "DASHED", "YES"); + else + IupSetAttribute(gauge, "DASHED", "NO"); + + return IUP_DEFAULT; +} + +static int btn_show2_cb(void) +{ + if (!IupGetInt(gauge, "SHOW_TEXT")) + IupSetAttribute(gauge, "SHOW_TEXT", "YES"); + else + IupSetAttribute(gauge, "SHOW_TEXT", "NO"); + + return IUP_DEFAULT; +} + +void GaugeTest(void) +{ + Ihandle *dlg, *vbox, *hbox; + Ihandle *btn_restart, *btn_accelerate, *btn_decelerate, *btn_show1, *btn_show2; + + timer = IupTimer(); + IupSetCallback(timer, "ACTION_CB", (Icallback)time_cb); + IupSetAttribute(timer, "TIME", "100"); + + gauge = IupGauge(); + + IupSetAttribute(gauge, "EXPAND", "YES"); +// IupSetAttribute(gauge, "BGCOLOR", "255 0 128"); +// IupSetAttribute(gauge, "FGCOLOR", "0 128 0"); + + btn_restart = IupButton(NULL, NULL); + btn_pause = IupButton(NULL, NULL); + btn_accelerate = IupButton(NULL, NULL); + btn_decelerate = IupButton(NULL, NULL); + btn_show1 = IupButton("Dashed", NULL); + btn_show2 = IupButton("Text", NULL); + + createimg_s(); + + IupSetAttribute(btn_restart, "IMAGE", "img_restart"); + IupSetAttribute(btn_restart, "TIP", "Restart" ); + IupSetAttribute(btn_pause, "IMAGE", "img_pause"); + IupSetAttribute(btn_pause, "TIP", "Play/Pause"); + IupSetAttribute(btn_accelerate, "IMAGE", "img_forward"); + IupSetAttribute(btn_accelerate, "TIP", "Accelerate"); + IupSetAttribute(btn_decelerate, "IMAGE", "img_rewind"); + IupSetAttribute(btn_decelerate, "TIP", "Decelerate"); + IupSetAttribute(btn_show1, "TIP", "Dashed or Continuous"); + IupSetAttribute(btn_show2, "TIP", "Text or None"); + + hbox = IupHbox + ( + IupFill(), + btn_pause, + btn_restart, + btn_decelerate, + btn_accelerate, + btn_show1, + btn_show2, + IupFill(), + NULL + ); + + vbox = IupVbox(gauge, hbox, NULL); + IupSetAttribute(vbox, "MARGIN", "10x10"); + IupSetAttribute(vbox, "GAP", "5"); + + dlg = IupDialog(vbox); + + IupSetAttribute(dlg, "TITLE", "IupGauge Test"); + + IupSetCallback(btn_pause, "ACTION", (Icallback) btn_pause_cb); + IupSetCallback(btn_restart, "ACTION", (Icallback) btn_restart_cb); + IupSetCallback(btn_accelerate, "ACTION", (Icallback) btn_accelerate_cb); + IupSetCallback(btn_decelerate, "ACTION", (Icallback) btn_decelerate_cb); + IupSetCallback(btn_show1, "ACTION", (Icallback) btn_show1_cb); + IupSetCallback(btn_show2, "ACTION", (Icallback) btn_show2_cb); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); + + IupSetAttribute(timer, "RUN", "YES"); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupControlsOpen(); + + GaugeTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/getcolor.c b/iup/test/getcolor.c new file mode 100755 index 0000000..02ceb8d --- /dev/null +++ b/iup/test/getcolor.c @@ -0,0 +1,28 @@ +#include +#include + +#include "iup.h" +#include "iupcontrols.h" + +void GetColorTest(void) +{ + unsigned char r = 10, g = 100, b = 25; + if (IupGetColor(100, 100, &r, &g, &b)) + printf("RGB = %d, %d, %d Hex=[%.2X%.2X%.2X]\n", r, g, b, r, g, b); +} + + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + GetColorTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/getparam.c b/iup/test/getparam.c new file mode 100755 index 0000000..fbda6bb --- /dev/null +++ b/iup/test/getparam.c @@ -0,0 +1,98 @@ +/* IupGetParam Example in C + Shows a dialog with all the possible fields. +*/ +#include +#include + +#include +#include + +static int param_action(Ihandle* dialog, int param_index, void* user_data) +{ + switch(param_index) + { + case -1: + printf("IupGetParam - OK\n"); + break; + case -2: + printf("IupGetParam - Map\n"); + break; + case -3: + printf("IupGetParam - Cancel\n"); + break; +// case 1: +// return 0; + default: + { + Ihandle* param; + char param_str[50]; + sprintf(param_str, "PARAM%d", param_index); + param = (Ihandle*)IupGetAttribute(dialog, param_str); + printf("%s = %s\n", param_str, IupGetAttribute(param, "VALUE")); + break; + } + } + return 1; +} + +void GetParamTest(void) +{ + int pboolean = 1; + int pinteger = 3456; + float preal = 3.543f; + int pinteger2 = 192; + float preal2 = 0.5f; + float pangle = 90; + char pstring[100] = "string text"; + char pcolor[100] = "255 0 128"; + int plist = 2; + char pstring2[200] = "second text\nsecond line"; + char file_name[500] = "test.jpg"; + + if (!IupGetParam("Title", param_action, 0, + "Boolean: %b[No,Yes]\n" + "Integer: %i\n" + "Real 1: %r\n" + "Sep1 %t\n" + "Integer: %i[0,255]\n" + "Real 2: %r[-1.5,1.5,0.05]\n" + "Sep2 %t\n" + "Angle: %a[0,360]\n" + "String: %s\n" + "List: %l|item1|item2|item3|\n" + "File: %f[OPEN|*.bmp;*.jpg|CURRENT|NO|NO]\n" + "Color: %c{Color Tip}\n" + "Sep3 %t\n" + "Multiline: %m\n", + &pboolean, &pinteger, &preal, &pinteger2, &preal2, &pangle, pstring, &plist, file_name, pcolor, pstring2, NULL)) + return; + + IupMessagef("IupGetParam", + "Boolean Value: %d\n" + "Integer: %d\n" + "Real 1: %g\n" + "Integer: %d\n" + "Real 2: %g\n" + "Angle: %g\n" + "String: %s\n" + "List Index: %d\n" + "FileName: %s\n" + "Color: %s\n" + "Multiline: %s", + pboolean, pinteger, (double)preal, pinteger2, (double)preal2, (double)pangle, pstring, plist, file_name, pcolor, pstring2); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + GetParamTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/glcanvas.c b/iup/test/glcanvas.c new file mode 100755 index 0000000..6a34c29 --- /dev/null +++ b/iup/test/glcanvas.c @@ -0,0 +1,77 @@ +#ifdef USE_OPENGL +#ifdef WIN32 +#include +#endif +#include + +#include +#include + +#include "iup.h" +#include "iupgl.h" + + +static int action(Ihandle *ih) +{ + IupGLMakeCurrent(ih); + + glClearColor(1.0, 0.0, 1.0, 1.f); /* pink */ + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glColor3f(1.0,0.0,0.0); /* red */ + glBegin(GL_QUADS); + glVertex2f(0.9f,0.9f); + glVertex2f(0.9f,-0.9f); + glVertex2f(-0.9f,-0.9f); + glVertex2f(-0.9f,0.9f); + glEnd(); + + IupGLSwapBuffers(ih); + + return IUP_DEFAULT; +} + +void GLCanvasTest(void) +{ + Ihandle *dlg, *canvas, *box; + + IupGLCanvasOpen(); + + box = IupVbox(NULL); + IupSetAttribute(box, "MARGIN", "5x5"); + + canvas = IupGLCanvas(NULL); + IupSetCallback(canvas, "ACTION", action); + IupSetAttribute(canvas, "BUFFER", "DOUBLE"); + IupSetAttribute(canvas, "BORDER", "NO"); + IupSetAttribute(canvas, "RASTERSIZE", "300x200"); + IupAppend(box, canvas); + + dlg = IupDialog(box); + IupSetAttribute(dlg, "TITLE", "IupGLCanvas Test"); + + IupMap(dlg); + IupGLMakeCurrent(canvas); + printf("Vendor: %s\n", glGetString(GL_VENDOR)); + printf("Renderer: %s\n", glGetString(GL_RENDERER)); + printf("Version: %s\n", glGetString(GL_VERSION)); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupGLCanvasOpen(); + + GLCanvasTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif +#endif diff --git a/iup/test/glcanvas_cube.c b/iup/test/glcanvas_cube.c new file mode 100755 index 0000000..3bd5ec5 --- /dev/null +++ b/iup/test/glcanvas_cube.c @@ -0,0 +1,234 @@ +#ifdef USE_OPENGL +#ifdef WIN32 +#include +#endif +#include +#include + +#include +#include +#include + +#include "iup.h" +#include "iupgl.h" + + +typedef struct _color3D +{ + double r; + double g; + double b; +} color3D; + +static void add_color_vertex(const color3D* c) +{ + glColor3d(c->r, c->g, c->b); + glVertex3d(c->r, c->g, c->b); +} + +static void draw_cube_face(const color3D* c1, const color3D* c2, const color3D* c3, const color3D* c4) +{ + color3D cm; + cm.r = (c1->r + c2->r + c3->r + c4->r)/4; + cm.g = (c1->g + c2->g + c3->g + c4->g)/4; + cm.b = (c1->b + c2->b + c3->b + c4->b)/4; + + add_color_vertex(&cm); + add_color_vertex(c1); + add_color_vertex(c2); + + add_color_vertex(&cm); + add_color_vertex(c2); + add_color_vertex(c3); + + add_color_vertex(&cm); + add_color_vertex(c3); + add_color_vertex(c4); + + add_color_vertex(&cm); + add_color_vertex(c4); + add_color_vertex(c1); +} + +const color3D c3D_black = {0.0, 0.0, 0.0}; +const color3D c3D_red = {1.0, 0.0, 0.0}; +const color3D c3D_green = {0.0, 1.0, 0.0}; +const color3D c3D_blue = {0.0, 0.0, 1.0}; +const color3D c3D_cian = {0.0, 1.0, 1.0}; +const color3D c3D_magenta = {1.0, 0.0, 1.0}; +const color3D c3D_yellow = {1.0, 1.0, 0.0}; +const color3D c3D_white = {1.0, 1.0, 1.0}; + +static void draw_cube(void) +{ + glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glBegin(GL_TRIANGLES); + + draw_cube_face(&c3D_black, &c3D_blue, &c3D_magenta, &c3D_red); + draw_cube_face(&c3D_black, &c3D_green, &c3D_cian, &c3D_blue); + draw_cube_face(&c3D_black, &c3D_red, &c3D_yellow, &c3D_green); + draw_cube_face(&c3D_white, &c3D_cian, &c3D_blue, &c3D_magenta); + draw_cube_face(&c3D_white, &c3D_cian, &c3D_green, &c3D_yellow); + draw_cube_face(&c3D_white, &c3D_magenta, &c3D_red, &c3D_yellow); + + glEnd(); +} + +static void init(void) +{ + glClearColor(0.5,0.5,0.5,0.0); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(45, 1, 1, 10); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + gluLookAt (0.5, 0.5, 3.0, /* posicao do observador */ + 0.5, 0.5, 0.0, /* ponto de referencia */ + 0.0, 1.0, 0.0); /* vup */ + glEnable(GL_DEPTH_TEST); + glClearDepth (1.0); +} + +static void unproject (double x2, double y2, double *x3, double *y3, double *z3) +{ + double mv[16]; + double pm[16]; + int vp[4]; + + glGetDoublev (GL_MODELVIEW_MATRIX, mv); + glGetDoublev (GL_PROJECTION_MATRIX, pm); + glGetIntegerv (GL_VIEWPORT, vp); + gluUnProject (x2, y2, 0.0, + mv, pm, vp, + x3, y3, z3); +} + +static int pos_x, pos_y; +static int move = 0; + +static int button_cb(Ihandle *ih,int but,int pressed,int x,int y,char* status) +{ + (void)ih; + (void)status; + + if (but==IUP_BUTTON1) + { + if (pressed) + { + pos_x = x; + pos_y = y; + move = 1; + } + else + { + move = 0; + } + } + return IUP_DEFAULT; +} + +#define INVERT_Y(_y) (height-y) + +static int motion_cb(Ihandle *ih,int x,int y,char* status) +{ + (void)status; + + if (move) + { + double dif_x, dif_y; + double dx, dy, dz; + double x1, y1, z1; + double x2, y2, z2; + double angle, norma; + int height = IupGetInt2(ih, "RASTERSIZE"); + + IupGLMakeCurrent(ih); + + dif_x = x - pos_x; + dif_y = y - pos_y; + + pos_x = x; + pos_y = y; + + angle = sqrt(dif_x*dif_x + dif_y*dif_y); + + unproject (pos_x, INVERT_Y(pos_y), &x1, &y1, &z1); + unproject ((double)(dif_y+pos_x), (double)(dif_x+INVERT_Y(pos_y)), &x2, &y2, &z2); + dx = x2-x1; dy = y2-y1; dz = z2-z1; + norma = sqrt(dx*dx + dy*dy + dz*dz); + dx /= norma; dy /= norma; dz /= norma; + + glTranslated(0.5, 0.5, 0.5); + glRotated (angle, dx, dy, dz); + glTranslated(-0.5, -0.5, -0.5); + + draw_cube(); + + IupGLSwapBuffers(ih); + } + return IUP_DEFAULT; +} + +static int action(Ihandle *ih) +{ + IupGLMakeCurrent(ih); + + glClear (GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); + + draw_cube(); + + IupGLSwapBuffers(ih); + + return IUP_DEFAULT; +} + +void GLCanvasCubeTest(void) +{ + Ihandle *dlg, *canvas, *box; + + IupGLCanvasOpen(); + + box = IupVbox(NULL); + IupSetAttribute(box, "MARGIN", "5x5"); + + canvas = IupGLCanvas(NULL); + IupSetCallback(canvas, "ACTION", action); + IupSetCallback(canvas, "BUTTON_CB", (Icallback)button_cb); + IupSetCallback(canvas, "MOTION_CB", (Icallback)motion_cb); + IupSetAttribute(canvas, "BUFFER", "DOUBLE"); + IupSetAttribute(canvas, "RASTERSIZE", "300x300"); + IupAppend(box, canvas); + + dlg = IupDialog(IupSetAttributes(IupFrame(box), "TITLE=Teste")); + IupSetAttribute(dlg, "TITLE", "IupGLCanvas Test"); + IupSetAttribute(dlg, "COMPOSITED", "NO"); + + IupMap(dlg); + + IupGLMakeCurrent(canvas); + init(); + printf("Vendor: %s\n", glGetString(GL_VENDOR)); + printf("Renderer: %s\n", glGetString(GL_RENDERER)); + printf("Version: %s\n", glGetString(GL_VERSION)); + IupSetAttribute(canvas, "RASTERSIZE", NULL); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + GLCanvasCubeTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif +#endif diff --git a/iup/test/hbox.c b/iup/test/hbox.c new file mode 100755 index 0000000..44f0f02 --- /dev/null +++ b/iup/test/hbox.c @@ -0,0 +1,114 @@ +#include +#include +#include "iup.h" + +void HboxTest(void) +{ + /* IUP identifiers */ + Ihandle *fr1, *fr2, *fr3, *dlg; + Ihandle *b11, *b12, *b13; + Ihandle *b21, *b22, *b23; + Ihandle *b31, *b32, *b33; + Ihandle *h1, *h2, *h3; + + /* Creates frame with three top aligned buttons */ + fr1 = IupFrame + ( + h1 = IupHbox + ( +// IupFill(), + b11=IupButton("1", NULL), + b12=IupButton("2", NULL), + b13=IupButton("3", NULL), +// IupFill(), + NULL + ) + ); +// IupSetAttribute(fr1, "TITLE", "ALIGNMENT=ATOP"); + IupSetAttribute(fr1, "TITLE", "IupHbox"); + IupSetAttribute(b11, "SIZE", "10x10"); + IupSetAttribute(b12, "SIZE", "20x16"); + IupSetAttribute(b13, "SIZE", "30x20"); + IupSetAttributes(h1, "ALIGNMENT=ATOP"); /* Sets hbox's alignment, gap and size */ + IupSetAttribute(h1, "HOMOGENEOUS", "YES"); + IupSetAttribute(h1, "EXPANDCHILDREN", "YES"); +// IupSetAttribute(b12, "VISIBLE", "NO"); +// IupSetAttribute(b12, "FLOATING", "YES"); + + /* Creates frame with three buttons */ + fr2 = IupFrame + ( + h2=IupHbox + ( + IupFill(), + b21=IupButton("1", NULL), + b22=IupButton("2", NULL), + b23=IupButton("3", NULL), + IupFill(), + NULL + ) + ); + IupSetAttribute(fr2, "TITLE", "ALIGNMENT=ACENTER, GAP=20"); + IupSetAttribute(b21, "SIZE", "30x30"); + IupSetAttribute(b22, "SIZE", "30x40"); + IupSetAttribute(b23, "SIZE", "30x50"); + IupSetAttributes(h2, "ALIGNMENT=ACENTER, GAP=20"); /* Sets hbox's alignment and gap */ + + /* Creates frame with three bottom aligned buttons */ + fr3 = IupFrame + ( + h3=IupHbox + ( + IupFill(), + b31=IupButton ("1", NULL), + b32=IupButton ("2", NULL), + b33=IupButton ("3", NULL), + IupFill(), + NULL + ) + ); + IupSetAttribute(fr3, "TITLE", "ALIGNMENT=ABOTTOM, MARGIN=10x10"); + IupSetAttribute(b31, "SIZE", "30x30"); + IupSetAttribute(b32, "SIZE", "30x40"); + IupSetAttribute(b33, "SIZE", "30x50"); + IupSetAttributes(h3, "ALIGNMENT=ABOTTOM, MARGIN=10x10"); /* Sets hbox's alignment and size */ + + /* Creates dlg with the three frames */ + dlg = IupDialog + ( + IupVbox + ( + fr1, + fr2, + fr3, + NULL + ) + ); + + IupSetAttribute(dlg, "TITLE", "IupHbox Test"); /* Sets dlg's title */ + IupSetAttribute(dlg, "MARGIN", "10x10"); + IupSetAttribute(dlg, "GAP", "10"); + IupSetAttribute(fr1, "MARGIN", "0x0"); /* avoid attribute propagation */ + IupSetAttribute(fr2, "MARGIN", "0x0"); + IupSetAttribute(fr3, "MARGIN", "0x0"); + IupSetAttribute(fr1, "GAP", "0"); + IupSetAttribute(fr2, "GAP", "0"); + IupSetAttribute(fr3, "GAP", "0"); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); /* Shows dlg in the center of the screen */ +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + HboxTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/idle.c b/iup/test/idle.c new file mode 100755 index 0000000..f9681ba --- /dev/null +++ b/iup/test/idle.c @@ -0,0 +1,55 @@ +#include +#include +#include "iup.h" + +static int idle_count = 0; + +static int idle(void) +{ + printf("IDLE_ACTION(count = %d)\n", idle_count); + idle_count++; + +// if (idle_count == 10000) +// return IUP_IGNORE; + + return IUP_DEFAULT; +} + +static int motion_cb(Ihandle* ih) +{ + printf("MOTION_CB()\n"); + if (idle_count > 30000) + IupSetFunction ("IDLE_ACTION", NULL); + return IUP_DEFAULT; +} + +void IdleTest(void) +{ + Ihandle* dlg, *canvas; + + canvas = IupCanvas(NULL); + IupSetCallback(canvas, "MOTION_CB", motion_cb); + + dlg = IupDialog(canvas); + IupSetAttribute(dlg, "TITLE", "Idle Test"); + IupSetAttribute(dlg, "RASTERSIZE", "500x500"); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); + + IupSetFunction ("IDLE_ACTION", (Icallback)idle); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + IdleTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/iuptest.rc b/iup/test/iuptest.rc new file mode 100755 index 0000000..94e5ca1 --- /dev/null +++ b/iup/test/iuptest.rc @@ -0,0 +1,31 @@ +TECGRAF_ICON ICON "../etc/tecgraf.ico" +TECGRAF_BITMAP BITMAP "../test/tecgraf.bmp" + +CURSOR_PEN CURSOR "../etc/pen.cur" + +/* To avoid the inclusion of */ +#define WS_CHILD 0x40000000L +#define WS_VISIBLE 0x10000000L +#define WS_CLIPSIBLINGS 0x04000000L +#define DS_3DLOOK 0x0004L +#define DS_CONTROL 0x0400L +#define SS_OWNERDRAW 0x0000000DL +#define WS_EX_STATICEDGE 0x00020000L + +#define IUP_PREVIEWCANVAS 3000 + +iupPreviewDlg DIALOG DISCARDABLE 0, 0, 250, 95 +STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | DS_3DLOOK | DS_CONTROL +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IUP_PREVIEWCANVAS, "STATIC", SS_OWNERDRAW, 70, 0, 120, 90, WS_EX_STATICEDGE +END + +#ifndef IUP_DLL +/* The following line will enable Windows XP Visual Styles */ +#ifdef WIN64 +1 24 "../etc/iup64.manifest" +#else +1 24 "../etc/iup.manifest" +#endif +#endif diff --git a/iup/test/label.c b/iup/test/label.c new file mode 100755 index 0000000..1eea959 --- /dev/null +++ b/iup/test/label.c @@ -0,0 +1,217 @@ +#include +#include +#include "iup.h" + + +#define TEST_IMAGE_SIZE 20 + +static unsigned char image_data_8 [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE] = +{ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +}; + +static unsigned char image_data_24 [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE*3] = +{ + 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000, + 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000, +}; + +static unsigned char image_data_32 [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE*4] = +{ + 000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,000,000,255,255,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,255,255,255,192,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,255, + 000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255,000,000,000,255, +}; + +static int enter_cb(Ihandle *ih) +{ + Ihandle *box = IupGetChild(ih, 0); + if (IupGetInt(box, "ACTIVE")) + IupSetAttribute(box, "ACTIVE", "NO"); + else + IupSetAttribute(box, "ACTIVE", "YES"); + return IUP_DEFAULT; +} + +void LabelTest(void) +{ + Ihandle *dlg, *label, *image1, *image2, *image3, + *box1, *box2, *fill; + + box1 = IupVbox(NULL); + IupSetAttribute(box1, "MARGIN", "5x5"); + IupSetAttribute(box1, "GAP", "5"); + IupSetAttribute(box1, "BGCOLOR", "75 150 170"); + IupSetAttribute(box1, "PADDING", "5x5"); + + label = IupLabel(NULL); + IupSetAttribute(label, "TITLE", "Text Labels (çãí)"); + IupSetAttribute(label, "BGCOLOR", IupGetGlobal("DLGBGCOLOR")); + IupSetAttribute(label, "PADDING", "0x0"); + IupSetAttribute(label, "TIP", "Text Label"); + IupAppend(box1, label); + + label = IupLabel(NULL); + IupSetAttribute(label, "SEPARATOR", "HORIZONTAL"); + IupAppend(box1, label); + + label = IupLabel(NULL); + IupSetAttribute(label, "TITLE", "Text &Label\nSecond Line"); + IupSetAttribute(label, "FGCOLOR", "0 0 255"); + IupSetAttribute(label, "RASTERSIZE", "150x70"); +// IupSetAttribute(label, "RASTERSIZE", "30x70"); +// IupSetAttribute(label, "WORDWRAP", "YES"); +// IupSetAttribute(label, "ELLIPSIS", "YES"); + IupSetAttribute(label, "ALIGNMENT", "ALEFT:ATOP"); + IupAppend(box1, label); + + label = IupLabel(NULL); + IupSetAttribute(label, "TITLE", "Text Label\nSecond Line"); + IupSetAttribute(label, "RASTERSIZE", "150x70"); + IupSetAttribute(label, "ALIGNMENT", "ACENTER:ACENTER"); + IupSetAttribute(label, "FONT", "Helvetica, 14"); +// IupSetAttribute(label, "FONTSIZE", "14"); +// IupSetAttribute(label, "FONTSTYLE", "Italic"); + IupAppend(box1, label); + + label = IupLabel(NULL); + IupSetAttribute(label, "TITLE", "Text Label\nSecond Line"); + IupSetAttribute(label, "RASTERSIZE", "150x70"); + IupSetAttribute(label, "ALIGNMENT", "ARIGHT:ABOTTOM"); + IupSetAttribute(label, "MARKUP", "YES"); + IupAppend(box1, label); + + box2 = IupVbox(NULL); + IupSetAttribute(box2, "MARGIN", "5x5"); + IupSetAttribute(box2, "GAP", "5"); + IupSetAttribute(box2, "BGCOLOR", "75 150 170"); + IupSetAttribute(box2, "PADDING", "5x5"); + + image1 = IupImage(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_8); + IupSetAttribute(image1, "0", "BGCOLOR"); + IupSetAttribute(image1, "1", "255 0 0"); + IupSetAttribute(image1, "2", "0 255 0"); + IupSetAttribute(image1, "3", "0 0 255"); + IupSetAttribute(image1, "4", "255 255 255"); + IupSetAttribute(image1, "5", "0 0 0"); + + label = IupLabel(NULL); + IupSetAttributeHandle(label, "IMAGE", image1); + //IupSetAttribute(label, "IMAGE", "TECGRAF_BITMAP"); + //IupSetAttribute(label, "IMAGE", "../test/tecgraf.bmp"); + //IupSetAttribute(label, "IMAGE", "../test/file_large.xbm"); + //IupSetAttribute(label, "IMAGE", "gtk-open"); + IupSetAttribute(label, "BGCOLOR", IupGetGlobal("DLGBGCOLOR")); + IupSetAttribute(label, "PADDING", "0x0"); + IupSetAttribute(label, "TIP", "Image Label"); + IupAppend(box2, label); + + label = IupLabel(NULL); + IupSetAttribute(label, "SEPARATOR", "HORIZONTAL"); + IupAppend(box2, label); + + fill = IupFill(); + IupSetAttribute(fill, "SIZE", "20"); + IupAppend(box2, fill); + + label = IupLabel(NULL); + IupSetAttributeHandle(label, "IMAGE", image1); + IupSetAttribute(label, "RASTERSIZE", "150x50"); + IupAppend(box2, label); + + image2 = IupImageRGB(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_24); + + label = IupLabel(NULL); + IupSetAttributeHandle(label, "IMAGE", image2); + IupSetAttribute(label, "RASTERSIZE", "150x50"); + IupSetAttribute(label, "ALIGNMENT", "ACENTER"); + IupAppend(box2, label); + + image3 = IupImageRGBA(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_32); + + label = IupLabel(NULL); + IupSetAttributeHandle(label, "IMAGE", image3); + IupSetAttribute(label, "RASTERSIZE", "150x50"); + IupSetAttribute(label, "ALIGNMENT", "ARIGHT"); + IupAppend(box2, label); + + label = IupLabel(NULL); + IupSetAttribute(label, "SEPARATOR", "VERTICAL"); + + dlg = IupDialog(IupHbox(box1, label, box2, NULL)); + IupSetAttribute(dlg, "TITLE", "IupLabel Test"); +// IupSetAttribute(dlg, "BACKGROUND", "0 0 128"); +// IupSetAttributeHandle(dlg, "BACKGROUND", image2); + IupSetCallback(dlg, "ENTERWINDOW_CB", enter_cb); + + IupShow(dlg); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + LabelTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/list.c b/iup/test/list.c new file mode 100755 index 0000000..5db582b --- /dev/null +++ b/iup/test/list.c @@ -0,0 +1,366 @@ +#include +#include +#include +#include + +static int button_cb(Ihandle *ih,int but,int pressed,int x,int y,char* status) +{ + printf("BUTTON_CB(but=%c (%d), x=%d, y=%d [%s]) - [pos=%d]\n",(char)but,pressed,x,y, status, IupConvertXYToPos(ih, x, y)); + return IUP_DEFAULT; +} + +static int motion_cb(Ihandle *ih,int x,int y,char* status) +{ + printf("MOTION_CB(x=%d, y=%d [%s]) - [pos=%d]\n",x,y, status,IupConvertXYToPos(ih, x, y)); + return IUP_DEFAULT; +} + +static int multilist_cb (Ihandle *ih, char *s) +{ + printf("MULTISELECT_CB(%s)\n", s); + return IUP_DEFAULT; +} + +static int list_cb (Ihandle *ih, char *t, int i, int v) +{ + printf("ACTION(%s - %d %d)\n", t, i, v); + return IUP_DEFAULT; +} + +static int dropdown_cb(Ihandle *ih, int state) +{ + printf("DROPDOWN_CB(%d)\n", state); + return IUP_DEFAULT; +} + +static int dblclick_cb(Ihandle *ih, int pos, char *text) +{ + printf("DBLCLICK_CB(%d - %s)\n", pos, text); + return IUP_DEFAULT; +} + +static int edit_cb (Ihandle *ih, int c, char *after) +{ + printf("EDIT_CB(%d - %s)\n", c, after); + return IUP_DEFAULT; +} + +static int caret_cb(Ihandle *ih, int lin, int col) +{ + printf("CARET_CB(%d, %d)\n", lin, col); + return IUP_DEFAULT; +} + +static int btok_cb(Ihandle *ih) +{ + printf("Default Enter\n"); + return IUP_DEFAULT; +} + +static int btcancel_cb(Ihandle *ih) +{ + printf("Default Esc\n"); + return IUP_DEFAULT; +} + +static int selectedtext_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(text, "VALUE", IupGetAttribute(list, "SELECTEDTEXT")); + return IUP_DEFAULT; +} + +static int selection_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(text, "VALUE", IupGetAttribute(list, "SELECTION")); + return IUP_DEFAULT; +} + +static int getcaret_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(text, "VALUE", IupGetAttribute(list, "CARET")); + return IUP_DEFAULT; +} + +static int getvalue_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(text, "VALUE", IupGetAttribute(list, "VALUE")); + return IUP_DEFAULT; +} + +static int getcount_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + printf("COUNT=%s\n", IupGetAttribute(list, "COUNT")); + return IUP_DEFAULT; +} + +static int append_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(list, "APPEND", IupGetAttribute(text, "VALUE")); + return IUP_DEFAULT; +} + +static int readonly_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(list, "READONLY", IupGetAttribute(text, "VALUE")); + return IUP_DEFAULT; +} + +static int setvalue_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(list, "VALUE", IupGetAttribute(text, "VALUE")); + return IUP_DEFAULT; +} + +static int insertitem_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(list, "INSERTITEM3", IupGetAttribute(text, "VALUE")); + return IUP_DEFAULT; +} + +static int appenditem_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(list, "APPENDITEM", IupGetAttribute(text, "VALUE")); + return IUP_DEFAULT; +} + +static int removeitem_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(list, "REMOVEITEM", IupGetAttribute(text, "VALUE")); + return IUP_DEFAULT; +} + +static int topitem_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute(list, "TOPITEM", IupGetAttribute(text, "VALUE")); + return IUP_DEFAULT; +} + +static int showdropdown_cb(Ihandle *ih) +{ + Ihandle *list = (Ihandle*)IupGetAttribute(IupGetDialog(ih), "_ACTIVE_LIST"); + IupSetAttribute(list, "SHOWDROPDOWN", "YES"); + return IUP_DEFAULT; +} + +static void setactivelist(Ihandle* ih) +{ + Ihandle* dialog = IupGetDialog(ih); + Ihandle* label = (Ihandle*)IupGetAttribute(dialog, "_LABEL"); + IupSetAttribute(dialog, "_ACTIVE_LIST", (char*)ih); + IupSetAttribute(label, "TITLE", IupGetAttribute(IupGetParent(IupGetParent(ih)), "TITLE")); +} + +static int getfocus_cb(Ihandle *ih) +{ + setactivelist(ih); + printf("GETFOCUS_CB(%s)\n", IupGetAttribute(IupGetParent(IupGetParent(ih)), "TITLE")); + return IUP_DEFAULT; +} + +static int killfocus_cb(Ihandle *ih) +{ + printf("KILLFOCUS_CB(%s)\n", IupGetAttribute(IupGetParent(IupGetParent(ih)), "TITLE")); + return IUP_DEFAULT; +} + +static int leavewindow_cb(Ihandle *ih) +{ + printf("LEAVEWINDOW_CB(%s)\n", IupGetAttribute(IupGetParent(IupGetParent(ih)), "TITLE")); + return IUP_DEFAULT; +} + +static int enterwindow_cb(Ihandle *ih) +{ + setactivelist(ih); + printf("ENTERWINDOW_CB(%s)\n", IupGetAttribute(IupGetParent(IupGetParent(ih)), "TITLE")); + return IUP_DEFAULT; +} + +char *iupKeyCodeToName(int code); + +static int k_any(Ihandle *ih, int c) +{ + if (iup_isprint(c)) + printf("K_ANY(%s, %d = %s \'%c\')\n", IupGetAttribute(IupGetParent(IupGetParent(ih)), "TITLE"), c, iupKeyCodeToName(c), (char)c); + else + printf("K_ANY(%s, %d = %s)\n", IupGetAttribute(IupGetParent(IupGetParent(ih)), "TITLE"), c, iupKeyCodeToName(c)); + return IUP_CONTINUE; +} + +static int help_cb(Ihandle* ih) +{ + printf("HELP_CB(%s)\n", IupGetAttribute(IupGetParent(IupGetParent(ih)), "TITLE")); + return IUP_DEFAULT; +} + +static void set_callbacks(Ihandle* list) +{ + IupSetCallback(list, "ACTION", (Icallback)list_cb); + IupSetCallback(list, "DBLCLICK_CB", (Icallback)dblclick_cb); + IupSetCallback(list, "DROPDOWN_CB", (Icallback)dropdown_cb); + IupSetCallback(list, "EDIT_CB", (Icallback)edit_cb); + IupSetCallback(list, "CARET_CB", (Icallback)caret_cb); +// IupSetCallback(list, "BUTTON_CB", (Icallback)button_cb); +// IupSetCallback(list, "MOTION_CB", (Icallback)motion_cb); + + //IupSetCallback(list, "GETFOCUS_CB", getfocus_cb); + //IupSetCallback(list, "KILLFOCUS_CB", killfocus_cb); + + IupSetCallback(list, "ENTERWINDOW_CB", (Icallback)enterwindow_cb); + //IupSetCallback(list, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb); + + //IupSetCallback(list, "K_ANY", (Icallback)k_any); + //IupSetCallback(list, "HELP_CB", (Icallback)help_cb); + +// IupSetAttribute(list, "DROPEXPAND", "NO"); +// IupSetAttribute(list, "AUTOHIDE", "NO"); +// IupSetAttribute(list, "SCROLLBAR", "NO"); + + IupSetAttribute(list, "VISIBLE_ITEMS", "3"); +// IupSetAttribute(list, "VISIBLECOLUMNS", "7"); + IupSetAttribute(list, "VISIBLELINES", "4"); +} + +void ListTest(void) +{ + Ihandle *dlg, *list1, *list2, *list3, *list4, *text, *btok, *btcancel, + *box, *lists, *buttons1, *buttons2, *buttons3, *label; + + list1 = IupList(NULL); + list2 = IupList(NULL); + list3 = IupList(NULL); + list4 = IupList(NULL); + + IupSetAttributes(list1, "1=\"US$ 1000\", 2=\"US$ 2000\", 3=\"US$ 300.000.000\", 4=\"US$ 4000\"," + "EDITBOX=YES, DROPDOWN=YES, TIP=Edit+Drop, VALUE=\"Edit Here\", NAME=list1"); + IupSetAttributes(list2, "1=\"Banana\", 2=\"Apple\", 3=\"Orange\", 4=\"Strawberry\", 5=\"Grape\"," + "DROPDOWN=YES, NAME=list2, TIP=Drop, VALUE=2, SORT=YES"); + IupSetAttributes(list3, "1=\"Char A\", 2=\"Char B\", 3=\"Char CCCCC\", 4=\"Char D\", 5=\"Char E\", 6=\"Char F\"," + "EDITBOX=YES, NAME=list3, TIP=Edit+List, VALUE=\"Edit Here\""); +// IupSetAttributes(list4, "1=\"Number 1\", 2=\"Number 2\", 3=\"Number 3\", 4=\"Number 4\", 5=\"Number 5\", 6=\"Number 6\", 7=\"Number 7\"," +// "MULTIPLE=YES, NAME=list4, TIP=List, VALUE=+--++--"); + IupSetAttributes(list4, "1=\"Number 3\", 2=\"Number 4\", 3=\"Number 2\", 4=\"Number 1\", 5=\"Number 6\", 6=\"Number 5\", 7=\"Number 7\"," + "MULTIPLE=YES, NAME=list4, TIP=List, SORT=YES, VALUE=+--++--"); + + set_callbacks(list1); + set_callbacks(list2); + set_callbacks(list3); + set_callbacks(list4); + + //IupSetAttributes(list2, "6=\"R$ 1000\", 7=\"R$ 2000\", 8=\"R$ 123456789\", 9=\"R$ 4000\", 10=\"R$ 5000\","); + //IupSetAttributes(list2, "11=\"R$ 1000\", 12=\"R$ 2000\", 13=\"R$ 123456789\", 14=\"R$ 4000\", 15=\"R$ 5000\","); + //IupSetAttributes(list2, "16=\"R$ 1000\", 17=\"R$ 2000\", 18=\"R$ 123456789\", 19=\"R$ 4000\", 20=\"R$ 5000\","); + + IupSetCallback(list4, "MULTISELECT_CB", (Icallback)multilist_cb); + +// IupSetAttribute(list1, "READONLY", "YES"); +// IupSetAttribute(list3, "READONLY", "YES"); +// IupSetAttribute(list1, "PADDING", "10x10"); +// IupSetAttribute(list3, "PADDING", "10x10"); + +// IupSetAttribute(list3, "SPACING", "10"); +// IupSetAttribute(list4, "SPACING", "10"); + + printf("COUNT(list1)=%s\n", IupGetAttribute(list1, "COUNT")); + printf("COUNT(list2)=%s\n", IupGetAttribute(list2, "COUNT")); + printf("COUNT(list3)=%s\n", IupGetAttribute(list3, "COUNT")); + printf("COUNT(list4)=%s\n", IupGetAttribute(list4, "COUNT")); + + lists = IupHbox( + IupVbox( + IupSetAttributes(IupFrame(IupVbox(list1, NULL)), "TITLE=EDITBOX+DROPDOWN"), + IupSetAttributes(IupFrame(IupVbox(list2, NULL)), "TITLE=DROPDOWN"), + NULL), + IupSetAttributes(IupFrame(IupVbox(list3, NULL)), "TITLE=EDITBOX"), + IupSetAttributes(IupFrame(IupVbox(list4, NULL)), "TITLE=MULTIPLE"), + IupVbox( + btok = IupSetCallbacks(IupButton("Default Enter", NULL), "ACTION", btok_cb, NULL), + btcancel = IupSetCallbacks(IupButton("Default Esc", NULL), "ACTION", btcancel_cb, NULL), + NULL), + NULL); + + text = IupText(NULL); + IupSetAttribute(text, "EXPAND", "HORIZONTAL"); + IupSetAttribute(text, "NAME", "text"); + + buttons1 = IupHbox( + IupSetCallbacks(IupButton("Get(VALUE)", NULL), "ACTION", getvalue_cb, NULL), + IupSetCallbacks(IupButton("Set(VALUE)", NULL), "ACTION", setvalue_cb, NULL), + IupSetCallbacks(IupButton("Get(COUNT)", NULL), "ACTION", getcount_cb, NULL), + NULL); + buttons2 = IupHbox( + IupSetCallbacks(IupButton("INSERTITEM3", NULL), "ACTION", insertitem_cb, NULL), + IupSetCallbacks(IupButton("APPENDITEM", NULL), "ACTION", appenditem_cb, NULL), + IupSetCallbacks(IupButton("REMOVEITEM", NULL), "ACTION", removeitem_cb, NULL), + IupSetCallbacks(IupButton("SHOWDROPDOWN", NULL), "ACTION", showdropdown_cb, NULL), + IupSetCallbacks(IupButton("TOPITEM", NULL), "ACTION", topitem_cb, NULL), + NULL); + buttons3 = IupHbox( + IupSetCallbacks(IupButton("APPEND", NULL), "ACTION", append_cb, NULL), + IupSetCallbacks(IupButton("Get(CARET)", NULL), "ACTION", getcaret_cb, NULL), + IupSetCallbacks(IupButton("Set(READONLY)", NULL), "ACTION", readonly_cb, NULL), + IupSetCallbacks(IupButton("Get(SELECTEDTEXT)", NULL), "ACTION", selectedtext_cb, NULL), + IupSetCallbacks(IupButton("Get(SELECTION)", NULL), "ACTION", selection_cb, NULL), + NULL); + + box = IupVbox(lists, IupHbox(IupLabel("Attrib. Value: "), text, NULL), buttons1, buttons2, buttons3, IupHbox(IupLabel("Current List: "), label = IupLabel(NULL), NULL), NULL); + IupSetAttributes(buttons1,"MARGIN=5x5, GAP=5"); + IupSetAttributes(buttons2,"MARGIN=5x5, GAP=5"); + IupSetAttributes(buttons3,"MARGIN=5x5, GAP=5"); + IupSetAttributes(lists,"MARGIN=10x10, GAP=10"); + IupSetAttribute(label,"EXPAND", "HORIZONTAL"); + + dlg = IupDialog(box); + IupSetAttribute(dlg, "TITLE", "IupList Test"); + IupSetAttributeHandle(dlg, "DEFAULTENTER", btok); + IupSetAttributeHandle(dlg, "DEFAULTESC", btcancel); + IupSetAttribute(dlg, "_LABEL", (char*)label); + +// IupSetAttribute(box, "BGCOLOR", "92 92 255"); +// IupSetAttribute(dlg, "BGCOLOR", "92 92 255"); +// IupSetAttribute(dlg, "BACKGROUND", "200 10 80"); +// IupSetAttribute(dlg, "BGCOLOR", "173 177 194"); // Motif BGCOLOR for documentation + +// IupSetAttribute(dlg, "FONT", "Helvetica, 24"); +// IupSetAttribute(box, "FGCOLOR", "255 0 0"); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + ListTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/make_uname b/iup/test/make_uname new file mode 100755 index 0000000..ae0ab49 --- /dev/null +++ b/iup/test/make_uname @@ -0,0 +1,4 @@ +#This builds all the libraries of the folder for 1 uname + +tecmake relink $1 $2 $3 $4 $5 $6 $7 +tecmake USE_GTK=Yes relink $1 $2 $3 $4 $5 $6 $7 diff --git a/iup/test/matrix.c b/iup/test/matrix.c new file mode 100755 index 0000000..280ffdb --- /dev/null +++ b/iup/test/matrix.c @@ -0,0 +1,115 @@ +#include +#include +#include +#include + +#undef __IUPDEF_H +#include "iup.h" +#include "iupcontrols.h" + +static int dropcheck_cb(Ihandle *self, int lin, int col) +{ + if (lin == 3 && col == 1) + return IUP_DEFAULT; + return IUP_IGNORE; +} + +static Ihandle* create_matrix(void) +{ + Ihandle* mat = IupMatrix(NULL); + + IupSetAttribute(mat, "NUMCOL", "15"); + IupSetAttribute(mat, "NUMLIN", "20"); +// IupSetAttribute(mat, "NUMCOL", "2"); +// IupSetAttribute(mat, "NUMLIN", "3"); + + IupSetAttribute(mat, "0:0", "Inflation"); + IupSetAttribute(mat, "1:0", "Medicine\nPharma"); + IupSetAttribute(mat, "2:0", "Food"); + IupSetAttribute(mat, "3:0", "Energy"); + IupSetAttribute(mat, "0:1", "January 2000"); + IupSetAttribute(mat, "0:2", "February 2000"); + IupSetAttribute(mat, "1:1", "5.6\n3.33"); + IupSetAttribute(mat, "2:1", "2.2"); + IupSetAttribute(mat, "3:1", "7.2"); + IupSetAttribute(mat, "1:2", "4.5"); + IupSetAttribute(mat, "2:2", "8.1"); + IupSetAttribute(mat, "3:2", "3.4"); + IupSetAttribute(mat, "3:3", "Font Test"); + IupSetAttribute(mat, "WIDTH2", "90"); + IupSetAttribute(mat, "HEIGHT2", "30"); + IupSetAttribute(mat,"SORTSIGN2","DOWN"); +// IupSetAttribute(mat, "WIDTHDEF", "34"); + IupSetAttribute(mat,"MULTILINE", "YES"); + IupSetAttribute(mat,"RESIZEMATRIX", "YES"); + IupSetAttribute(mat,"USETITLESIZE", "YES"); + //IupSetAttribute(mat,"SCROLLBAR", "NO"); + //IupSetAttribute(mat, "BGCOLOR1:2", "255 92 255"); + //IupSetAttribute(mat, "BGCOLOR2:*", "92 92 255"); + //IupSetAttribute(mat, "BGCOLOR*:3", "255 92 92"); + //IupSetAttribute(mat, "FGCOLOR1:2", "255 0 0"); + //IupSetAttribute(mat, "FGCOLOR2:*", "0 128 0"); + //IupSetAttribute(mat, "FGCOLOR*:3", "0 0 255"); + //IupSetAttribute(mat, "FONT1:2", "Helvetica, 24"); + //IupSetAttribute(mat, "FONT2:*", "Courier, 14"); + //IupSetAttribute(mat, "FONT*:3", "Times, Bold 14"); + //IupSetAttribute(mat, "ALIGNMENT2", "ARIGHT"); +// IupSetAttribute(mat, "ACTIVE", "NO"); + + IupSetAttribute(mat,"MARKMODE","CELL"); +// IupSetAttribute(mat,"MARKMODE","LIN"); +// IupSetAttribute(mat,"MARKMULTIPLE","NO"); + IupSetAttribute(mat,"MARKMULTIPLE","YES"); +// IupSetAttribute(mat,"MARKAREA","NOT_CONTINUOUS"); + IupSetAttribute(mat,"MARK2:2","YES"); + IupSetAttribute(mat,"MARK2:3","YES"); + IupSetAttribute(mat,"MARK3:3","YES"); + + +// IupSetAttribute(mat,"MARKMODE","LINCOL"); + + //IupSetAttribute(mat, "NUMCOL_VISIBLE_LAST", "YES"); + //IupSetAttribute(mat, "NUMLIN_VISIBLE_LAST", "YES"); + IupSetAttribute(mat, "WIDTHDEF", "15"); + IupSetAttribute(mat, "20:15", "The End"); + IupSetAttribute(mat, "10:0", "Middle Line"); + IupSetAttribute(mat, "15:0", "Middle Line"); + IupSetAttribute(mat, "0:7", "Middle Column"); + IupSetAttribute(mat, "0:11", "Middle Column"); + IupSetAttribute(mat, "20:0", "Line Title Test"); + IupSetAttribute(mat, "0:15", "Column Title Test"); + IupSetAttribute(mat, "NUMCOL_VISIBLE", "6"); + IupSetAttribute(mat, "NUMLIN_VISIBLE", "8"); + + IupSetCallback(mat, "DROPCHECK_CB", (Icallback)dropcheck_cb); + + return mat; +} + +void MatrixTest(void) +{ + Ihandle* dlg, *box; + + box = IupVbox(create_matrix(), NULL); + IupSetAttribute(box, "MARGIN", "10x10"); + + dlg = IupDialog(box); + IupSetAttribute(dlg, "TITLE", "IupMatrix Simple Test"); + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupControlsOpen(); + + MatrixTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/matrix_cbmode.c b/iup/test/matrix_cbmode.c new file mode 100755 index 0000000..0d0e17c --- /dev/null +++ b/iup/test/matrix_cbmode.c @@ -0,0 +1,85 @@ +#include +#include +#include + +#include "iup.h" +#include "iupcontrols.h" + +static char data[3][3][50] = +{ + {"1:1", "1:2", "1:3"}, + {"2:1", "2:2", "2:3"}, + {"3:1", "3:2", "3:3"}, +}; + + +static char* value_cb(Ihandle *self, int lin, int col) +{ + if (lin == 0 || col == 0) + return "Title"; + return data[lin-1][col-1]; +} + +static int value_edit_cb(Ihandle *self, int lin, int col, char* newvalue) +{ + strcpy(data[lin-1][col-1], newvalue); + return IUP_DEFAULT; +} + +static Ihandle* create_matrix(void) +{ + Ihandle* mat = IupMatrix(NULL); + + IupSetAttribute(mat, "NUMCOL", "3"); + IupSetAttribute(mat, "NUMLIN", "3"); + + IupSetAttribute(mat, "NUMCOL_VISIBLE", "3"); + IupSetAttribute(mat, "NUMLIN_VISIBLE", "3"); + +// IupSetAttribute(mat, "WIDTH2", "90"); +// IupSetAttribute(mat, "HEIGHT2", "30"); +// IupSetAttribute(mat, "WIDTHDEF", "34"); +// IupSetAttribute(mat,"RESIZEMATRIX", "YES"); + IupSetAttribute(mat,"SCROLLBAR", "NO"); + IupSetCallback(mat,"VALUE_CB",(Icallback)value_cb); + IupSetCallback(mat,"VALUE_EDIT_CB",(Icallback)value_edit_cb); + +// IupSetAttribute(mat, "HEIGHT0", "10"); +// IupSetAttribute(mat, "WIDTH0", "90"); +// IupSetAttribute(mat,"MARKMODE","LIN"); +// IupSetAttribute(mat,"MARKMULTIPLE","NO"); + + //IupSetAttribute(mat, "NUMCOL_VISIBLE_LAST", "YES"); + //IupSetAttribute(mat, "NUMLIN_VISIBLE_LAST", "YES"); +// IupSetAttribute(mat, "WIDTHDEF", "15"); + + return mat; +} + +void MatrixCbModeTest(void) +{ + Ihandle* dlg, *box; + + box = IupVbox(create_matrix(), NULL); + IupSetAttribute(box, "MARGIN", "10x10"); + + dlg = IupDialog(box); + IupSetAttribute(dlg, "TITLE", "IupMatrix Simple Test"); + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupControlsOpen(); + + MatrixCbModeTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/matrix_cbs.c b/iup/test/matrix_cbs.c new file mode 100755 index 0000000..1b7afb9 --- /dev/null +++ b/iup/test/matrix_cbs.c @@ -0,0 +1,341 @@ +#include +#include +#include + +#include "iup.h" +#include "iupcontrols.h" +#include + +static int leave(Ihandle *self, int lin, int col) +{ + printf("leaveitem_cb(%d, %d)\n", lin, col); + //if(lin == 3 && col ==2) + // return IUP_IGNORE; /* notice that this will lock the matrix in this cell */ + return IUP_DEFAULT; +} + +static char* value(Ihandle *self, int lin, int col) +{ + static char str[50]; + sprintf(str, "%d-%d", lin, col); + return str; +} + +static int enter(Ihandle *self, int lin, int col) +{ + printf("enteritem_cb(%d, %d)\n", lin, col); + if(lin == 2 && col == 2) + { + IupSetAttribute(IupGetHandle("mat1"), "REDRAW", "ALL"); + IupSetAttribute(IupGetHandle("mat2"), "REDRAW", "ALL"); + IupSetAttribute(IupGetHandle("mat3"), "REDRAW", "ALL"); + IupSetAttribute(IupGetHandle("mat4"), "REDRAW", "ALL"); + IupSetAttribute(IupGetHandle("mat5"), "REDRAW", "ALL"); + IupSetAttribute(IupGetHandle("mat6"), "REDRAW", "ALL"); + } + return IUP_DEFAULT; +} + +static int dropselect(Ihandle *self, int lin, int col, Ihandle *drop, char *t, int i, int v) +{ + printf("dropselect_cb(%d, %d)\n", lin, col); + return IUP_DEFAULT; +} + +int mdrop = 1; +static int dropcheck(Ihandle *self, int lin, int col) +{ + if(lin == 1 && col == 1) + { + if (mdrop) + return IUP_DEFAULT; + else + return IUP_IGNORE; + } + return IUP_IGNORE; +} + +static int click(Ihandle *self, int lin, int col) +{ + char* value = IupMatGetAttribute(self, "", lin, col); + if (!value) value = "NULL"; + printf("click_cb(%d, %d)\n", lin, col); + printf(" VALUE%d:%d = %s\n", lin, col, value); + return IUP_DEFAULT; +} + +static int drop(Ihandle *self, Ihandle *drop, int lin, int col) +{ + printf("drop_cb(%d, %d)\n", lin, col); + if(lin == 1 && col == 1 && mdrop) + { + IupSetAttribute(drop, "1", "A - Test of Very Big String for Dropdown!"); + IupSetAttribute(drop, "2", "B"); + IupSetAttribute(drop, "3", "C"); + IupSetAttribute(drop, "4", "XXX"); + IupSetAttribute(drop, "5", "5"); + IupSetAttribute(drop, "6", "6"); + IupSetAttribute(drop, "7", "7"); + IupSetAttribute(drop, "8", NULL); + return IUP_DEFAULT; + } + return IUP_IGNORE; +} + +static int edition(Ihandle *self, int lin, int col, int mode) +{ + printf("edition_cb(lin=%d, col=%d, mode=%d)\n", lin, col, mode); + if (mode==1) + { + IupSetAttribute(self, "CARET", "3"); + + if(lin == 3 && col == 2) + return IUP_IGNORE; + } + + //if(lin == 1 && col == 1 && mode==0 && mdrop == 1) + //{ + // mdrop = 0; + // IupSetAttribute(self, "EDIT_MODE", "NO"); + // IupSetAttribute(self, "EDIT_MODE", "YES"); + // return IUP_IGNORE; + //} + + return IUP_DEFAULT; +} + +static int drawcb(Ihandle *h, int lin, int col,int x1, int x2, int y1, int y2) +{ + if (lin < 4) + return IUP_IGNORE; + + cdForeground(CD_RED); + cdLine(x1, y1, x2, y2); + cdLine(x1, y2, x2, y1); + + { + char s[50]; + sprintf(s, "%d:%d", lin, col); + cdTextAlignment(CD_CENTER); + cdText((x1+x2)/2, (y1+y2)/2, s); + } + + return IUP_DEFAULT; +} + +static int actioncb(Ihandle *h, int c, int lin, int col, int active, char* after) +{ + printf("action_cb(lin=%d, col=%d, active=%d, after=%s)\n", lin, col, active, after); + if (lin == 2 && col == 3 && active && after) + { + char str[100]; + strcpy(str, after); + strcat(str, "xxx"); + IupStoreAttribute(h,"VALUE", str); + + IupSetAttribute(h,"CARET","1"); + + IupSetAttribute(h,"REDRAW","ALL"); + } + + return IUP_DEFAULT; +} + + +static Ihandle *create_mat(void) +{ + Ihandle *mat = IupMatrix(NULL); + static int mati = 1; + char name[30]; + + sprintf(name, "mat%d", mati); + mati++; + + IupSetHandle(name, mat); + + IupSetAttribute(mat,"NUMCOL","15"); + IupSetAttribute(mat,"NUMLIN","18"); + + IupSetAttribute(mat,"NUMCOL_VISIBLE","5"); + IupSetAttribute(mat,"NUMLIN_VISIBLE","8"); + +// IupSetAttribute(mat,"EXPAND", "NO"); +// IupSetAttribute(mat,"SCROLLBAR", "NO"); + IupSetAttribute(mat,"RESIZEMATRIX", "YES"); + + IupSetAttribute(mat,"MARKMODE", "CELL"); +// IupSetAttribute(mat,"MARKMODE", "LINCOL"); + IupSetAttribute(mat,"MARKMULTIPLE", "YES"); +// IupSetAttribute(mat,"MARKAREA", "NOT_CONTINUOUS"); + IupSetAttribute(mat, "MARKAREA", "CONTINUOUS"); + + IupSetAttribute(mat,"0:0","Inflation"); + IupSetAttribute(mat,"1:0","Medicine "); + IupSetAttribute(mat,"2:0","Food"); + IupSetAttribute(mat,"3:0","Energy"); + IupSetAttribute(mat,"0:1","January 2000"); + IupSetAttribute(mat,"0:2","February 2000"); + IupSetAttribute(mat,"1:1","5.6"); + IupSetAttribute(mat,"2:1","2.2"); + IupSetAttribute(mat,"3:1","7.2"); + IupSetAttribute(mat,"1:2","4.5"); + IupSetAttribute(mat,"2:2","8.1"); + IupSetAttribute(mat,"3:2","3.4 (RO)"); + +// IupSetAttribute(mat,"BGCOLOR1:*","255 128 0"); + IupSetAttribute(mat,"BGCOLOR2:1","255 128 0"); + IupSetAttribute(mat,"FGCOLOR2:0","255 0 128"); +// IupSetAttribute(mat,"BGCOLOR0:*","255 0 128"); + IupSetAttribute(mat,"FGCOLOR1:1","255 0 128"); + IupSetAttribute(mat,"BGCOLOR3:*","255 128 0"); + IupSetAttribute(mat,"BGCOLOR*:4","255 128 0"); + //IupSetAttribute(mat,"FONT2:*", "Times New Roman:BOLD:8"); + //IupSetAttribute(mat,"FONT*:2", "Courier::12"); + IupSetAttribute(mat,"SORTSIGN1","UP"); +// IupSetAttribute(mat,"SORTSIGN2","DOWN"); + IupSetAttribute(mat,"FRAMEVERTCOLOR2:2","255 255 255"); + +// IupSetAttribute(mat,"MARKAREA","NOT_CONTINUOUS"); +// IupSetAttribute(mat,"MARKMULTIPLE","YES"); + + IupSetCallback(mat,"LEAVEITEM_CB",(Icallback)leave); + IupSetCallback(mat,"ENTERITEM_CB",(Icallback)enter); + IupSetCallback(mat,"DROPSELECT_CB",(Icallback)dropselect); + IupSetCallback(mat,"DROP_CB",(Icallback)drop); + IupSetCallback(mat,"DROPCHECK_CB",(Icallback)dropcheck); + IupSetCallback(mat,"EDITION_CB",(Icallback)edition); + IupSetCallback(mat,"CLICK_CB",(Icallback)click); + IupSetCallback(mat,"DRAW_CB",(Icallback)drawcb); + IupSetCallback(mat,"ACTION_CB",(Icallback)actioncb); + +// IupSetCallback(mat,"VALUE_CB",(Icallback)value); +// IupSetAttribute(mat,"WIDTH0","24"); +// IupSetAttribute(mat,"HEIGHT0","8"); + +// iupmaskMatSet(mat, IUPMASK_FLOAT, 0, 1, 2, 1) ; + + return mat; +} + + +static int redraw(Ihandle *self) +{ + IupSetAttribute(IupGetHandle("mat1"),"REDRAW","ALL"); + IupSetAttribute(IupGetHandle("mat2"),"REDRAW","ALL"); + //IupSetAttribute(IupGetHandle("mat3"),"REDRAW","ALL"); + //IupSetAttribute(IupGetHandle("mat4"),"REDRAW","ALL"); + //IupSetAttribute(IupGetHandle("mat5"),"REDRAW","ALL"); + //IupSetAttribute(IupGetHandle("mat6"),"REDRAW","ALL"); + + //Ihandle* mat = IupGetHandle("mat1"); + //if (IupGetInt(mat, "VISIBLE")) + //{ + // IupSetAttribute(mat,"VISIBLE","NO"); + // IupStoreAttribute(mat, "OLD_SIZE", IupGetAttribute(mat, "RASTERSIZE")); + // IupSetAttribute(mat, "RASTERSIZE", "1x1"); + //} + //else + //{ + // IupStoreAttribute(mat, "RASTERSIZE", IupGetAttribute(mat, "OLD_SIZE")); + // IupSetAttribute(mat,"VISIBLE","YES"); + //} + + return IUP_DEFAULT; +} + +static int removeline(Ihandle *self) +{ + IupSetAttribute(IupGetHandle("mat1"),"DELLIN","1"); + return IUP_DEFAULT; +} + +static int addline(Ihandle *self) +{ + IupSetAttribute(IupGetHandle("mat1"),"ADDLIN","0"); + return IUP_DEFAULT; +} + +static int removecol(Ihandle *self) +{ + IupSetAttribute(IupGetHandle("mat1"),"DELCOL","1"); + return IUP_DEFAULT; +} + +static int addcol(Ihandle *self) +{ + IupSetAttribute(IupGetHandle("mat1"),"ADDCOL","0"); + return IUP_DEFAULT; +} + +static int bt_cb(Ihandle *self) +{ + printf("DEFAULTENTER\n"); + return IUP_DEFAULT; +} + +static void createmenu(void) +{ + Ihandle* menu = IupMenu( + IupSubmenu("submenu", IupMenu(IupItem("item1","x"), IupItem("item2","x"), NULL)), + IupItem("remove line","removeline"), + IupItem("add line","addline"), + IupItem("remove col","removecol"), + IupItem("add col","addcol"), + IupItem("redraw","redraw"), + NULL); + IupSetHandle("mymenu", menu); +} + +void MatrixCbsTest(void) +{ + Ihandle *dlg, *bt; + + IupSetFunction("removeline", (Icallback)removeline); + IupSetFunction("addline", (Icallback)addline); + IupSetFunction("removecol", (Icallback)removecol); + IupSetFunction("addcol", (Icallback)addcol); + IupSetFunction("redraw", (Icallback)redraw); + + createmenu(); + + bt = IupButton("Button", NULL); + IupSetCallback(bt, "ACTION", bt_cb); + + dlg = IupDialog( +// IupZbox( + IupTabs( + IupSetAttributes( + IupVbox((create_mat()), bt, IupText(""), IupLabel("Label Text"), IupVal("HORIZONTAL"), + NULL), "MARGIN=10x10, GAP=10, TABTITLE=Test1"), + IupSetAttributes( + IupVbox(IupFrame(create_mat()), IupText(""), IupLabel("Label Text"), IupVal("HORIZONTAL"), +// NULL), "BGCOLOR=\"0 255 255\", MARGIN=10x10, GAP=10, TABTITLE=Test2,FONT=HELVETICA_ITALIC_14"), +// NULL), "FONT=HELVETICA_NORMAL_12, BGCOLOR=\"0 255 255\", MARGIN=10x10, GAP=10, TABTITLE=Test2"), + NULL), "BGCOLOR=\"0 255 255\", MARGIN=10x10, GAP=10, TABTITLE=Test2"), + NULL)); + IupSetAttribute(dlg,"TITLE", "IupMatrix"); + IupSetAttribute(dlg,"MENU", "mymenu"); + IupSetAttributeHandle(dlg,"DEFAULTENTER", bt); +// IupSetAttribute(dlg,"BGCOLOR", "255 0 255"); + + //IupSetAttribute(dlg,"COMPOSITED", "YES"); + //IupSetAttribute(dlg,"OPACITY", "192"); + + IupShowXY(dlg,IUP_CENTER,IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupControlsOpen(); + + MatrixCbsTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/mdi.c b/iup/test/mdi.c new file mode 100755 index 0000000..e483ba8 --- /dev/null +++ b/iup/test/mdi.c @@ -0,0 +1,150 @@ +#include +#include +#include + + +static int mdi_tilehoriz(Ihandle* ih) +{ + IupSetAttribute(IupGetDialog(ih), "MDIARRANGE", "TILEHORIZONTAL"); + return IUP_DEFAULT; +} + +static int mdi_tilevert(Ihandle* ih) +{ + IupSetAttribute(IupGetDialog(ih), "MDIARRANGE", "TILEVERTICAL"); + return IUP_DEFAULT; +} + +static int mdi_cascade(Ihandle* ih) +{ + IupSetAttribute(IupGetDialog(ih), "MDIARRANGE", "CASCADE"); + return IUP_DEFAULT; +} + +static int mdi_icon(Ihandle* ih) +{ + IupSetAttribute(IupGetDialog(ih), "MDIARRANGE", "ICON"); + return IUP_DEFAULT; +} + +static int mdi_next(Ihandle* ih) +{ + IupSetAttribute(IupGetDialog(ih), "MDIACTIVATE", "NEXT"); + return IUP_DEFAULT; +} + +static int mdi_previous(Ihandle* ih) +{ + IupSetAttribute(IupGetDialog(ih), "MDIACTIVATE", "PREVIOUS"); + return IUP_DEFAULT; +} + +static int mdi_closeall(Ihandle* ih) +{ + IupSetAttribute(IupGetDialog(ih), "MDICLOSEALL", NULL); + return IUP_DEFAULT; +} + +static int mdi_activate(Ihandle* ih) +{ + printf("mdi_activate(%s)\n", IupGetName(ih)); + return IUP_DEFAULT; +} + +static int mdi_new(Ihandle* ih) +{ + static int id = 0; + Ihandle *box, *cnv, *dlg; + + cnv = IupCanvas(NULL); + IupSetAttribute(cnv,"BGCOLOR","128 255 0"); + + box = IupVbox(cnv, NULL); + IupSetAttribute(box,"MARGIN","5x5"); + + dlg = IupDialog(box); + IupSetfAttribute(dlg,"TITLE","MDI Child (%d)", id); id++; + IupSetAttribute(dlg,"MDICHILD","YES"); + IupSetAttribute(dlg,"PARENTDIALOG","mdiFrame"); + IupSetCallback(dlg,"MDIACTIVATE_CB",(Icallback)mdi_activate); + IupSetAttribute(dlg,"RASTERSIZE","300x300"); +// IupSetAttribute(dlg, "PLACEMENT", "MAXIMIZED"); + + IupShow(dlg); + + return IUP_DEFAULT; +} + +static void createMenu(void) +{ + Ihandle* winmenu; + Ihandle* mnu = IupMenu( + IupSubmenu("MDI",IupMenu( + IupItem("New", "mdi_new"), + NULL)), + IupSubmenu("Window", winmenu = IupMenu( + IupItem("Tile Horizontal", "mdi_tilehoriz"), + IupItem("Tile Vertical", "mdi_tilevert"), + IupItem("Cascade", "mdi_cascade"), + IupItem("Icon Arrange", "mdi_icon"), + IupItem("Close All", "mdi_closeall"), + IupSeparator(), + IupItem("Next", "mdi_next"), + IupItem("Previous", "mdi_previous"), + NULL)), + NULL); + IupSetHandle("mnu",mnu); + IupSetHandle("mdiMenu",winmenu); + + IupSetFunction("mdi_new", (Icallback)mdi_new); + IupSetFunction("mdi_tilehoriz", (Icallback)mdi_tilehoriz); + IupSetFunction("mdi_tilevert", (Icallback)mdi_tilevert); + IupSetFunction("mdi_cascade", (Icallback)mdi_cascade); + IupSetFunction("mdi_icon", (Icallback)mdi_icon); + IupSetFunction("mdi_next", (Icallback)mdi_next); + IupSetFunction("mdi_previous", (Icallback)mdi_previous); + IupSetFunction("mdi_closeall", (Icallback)mdi_closeall); +} + +static Ihandle* createFrame(void) +{ + Ihandle *dlg, *cnv; + cnv = IupCanvas( NULL); + IupSetAttribute(cnv,"MDICLIENT","YES"); + IupSetAttribute(cnv,"MDIMENU","mdiMenu"); + + dlg = IupDialog(cnv); + IupSetAttribute(dlg,"TITLE","MDI Frame"); + IupSetAttribute(dlg,"MDIFRAME","YES"); + IupSetAttribute(dlg,"RASTERSIZE","800x600"); + IupSetAttribute(dlg,"MENU","mnu"); + IupSetHandle("mdiFrame", dlg); + + return dlg; +} + +void MdiTest(void) +{ + Ihandle* dlg; + + createMenu(); + + dlg = createFrame(); +// IupSetAttribute(dlg, "PLACEMENT", "MAXIMIZED"); + IupShow(dlg); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + MdiTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/menu.c b/iup/test/menu.c new file mode 100755 index 0000000..6f20b9e --- /dev/null +++ b/iup/test/menu.c @@ -0,0 +1,396 @@ +#include +#include + +#include + +static Ihandle* load_image_Tecgraf(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 95, 108, 1, 90, 100, 117, 99, 123, 138, 166, 126, 137, 152, 181, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 105, 123, 147, 122, 137, 165, 255, 136, 152, 183, 255, 132, 149, 179, 250, 133, 149, 178, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 100, 115, 43, 111, 125, 150, 253, 140, 158, 190, 255, 135, 151, 182, 255, 132, 149, 179, 255, 131, 147, 177, 217, 153, 164, 188, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 113, 134, 148, 134, 151, 182, 255, 137, 154, 185, 255, 115, 129, 154, 252, 114, 128, 155, 255, 130, 146, 175, 255, 132, 147, 175, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 159, 162, 3, 108, 121, 145, 230, 144, 162, 195, 255, 137, 154, 185, 197, 74, 79, 86, 45, 41, 46, 55, 246, 120, 134, 162, 255, 129, 145, 174, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 101, 113, 48, 124, 139, 167, 255, 144, 161, 194, 255, 138, 155, 186, 67, 0, 0, 0, 0, 49, 54, 62, 150, 87, 98, 118, 255, 128, 144, 173, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 113, 132, 105, 137, 154, 185, 255, 139, 156, 188, 231, 143, 159, 187, 3, 0, 0, 0, 0, 64, 68, 76, 61, 70, 79, 95, 255, 127, 143, 172, 254, 134, 149, 175, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 121, 142, 153, 141, 159, 191, 255, 139, 156, 188, 164, 0, 0, 0, 0, 0, 0, 0, 0, 79, 82, 87, 3, 69, 77, 92, 241, 122, 137, 165, 255, 127, 142, 170, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 122, 146, 191, 145, 163, 196, 255, 139, 156, 188, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 86, 101, 190, 115, 129, 156, 255, 126, 141, 170, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 125, 149, 227, 150, 168, 201, 255, 141, 157, 188, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 91, 107, 144, 113, 127, 153, 255, 125, 140, 169, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163, 165, 167, 2, 112, 125, 150, 252, 155, 173, 203, 255, 143, 159, 189, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 94, 110, 109, 114, 128, 155, 255, 125, 140, 168, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 167, 181, 1, 120, 130, 149, 33, 48, 53, 59, 69, 43, 46, 52, 100, 50, 54, 59, 137, 116, 130, 156, 255, 155, 171, 201, 255, 105, 118, 142, 155, 104, 117, 141, 151, 105, 118, 141, 151, 105, 118, 142, 151, 101, 113, 136, 185, 111, 124, 150, 255, 116, 130, 156, 220, 112, 125, 148, 95, 115, 127, 150, 67, 123, 134, 156, 33, 168, 176, 190, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 129, 147, 5, 109, 121, 142, 71, 106, 118, 140, 140, 105, 117, 140, 197, 107, 120, 144, 242, 120, 135, 162, 255, 123, 137, 163, 255, 44, 49, 58, 255, 28, 32, 39, 255, 125, 139, 164, 255, 150, 167, 197, 255, 138, 155, 186, 255, 131, 148, 178, 255, 125, 141, 170, 255, 119, 134, 162, 255, 114, 128, 154, 255, 108, 122, 147, 255, 104, 117, 141, 255, 102, 115, 138, 255, 103, 116, 139, 255, 107, 120, 145, 255, 111, 124, 149, 245, 113, 126, 151, 200, 113, 127, 152, 140, 116, 129, 154, 71, 122, 135, 158, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 118, 128, 145, 14, 106, 118, 140, 130, 104, 116, 139, 234, 105, 118, 142, 255, 128, 144, 173, 255, 147, 165, 199, 255, 157, 177, 213, 255, 150, 168, 202, 255, 140, 156, 187, 229, 41, 45, 52, 196, 39, 43, 51, 183, 130, 143, 168, 255, 144, 161, 192, 233, 109, 122, 145, 109, 105, 116, 138, 109, 99, 110, 130, 109, 92, 103, 123, 109, 91, 100, 117, 145, 97, 109, 131, 255, 95, 106, 128, 248, 74, 83, 97, 193, 64, 72, 85, 227, 56, 63, 75, 255, 55, 62, 75, 255, 65, 73, 88, 255, 90, 101, 121, 255, 111, 125, 150, 255, 114, 128, 154, 236, 116, 129, 155, 130, 127, 140, 165, 16, 0, 0, 0, 0, + 95, 101, 113, 22, 103, 115, 137, 220, 103, 116, 140, 255, 110, 123, 148, 255, 146, 165, 198, 255, 147, 165, 197, 232, 142, 158, 188, 147, 131, 144, 169, 78, 115, 123, 139, 20, 0, 0, 0, 0, 0, 0, 0, 0, 91, 97, 108, 68, 128, 142, 167, 255, 144, 162, 193, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 100, 107, 31, 120, 135, 163, 255, 133, 150, 180, 231, 0, 0, 0, 0, 0, 0, 0, 0, 86, 89, 93, 20, 50, 54, 61, 73, 37, 40, 46, 141, 33, 36, 42, 230, 46, 52, 63, 255, 107, 120, 144, 255, 116, 130, 157, 255, 118, 133, 159, 223, 132, 147, 174, 24, + 76, 83, 95, 114, 104, 117, 140, 255, 105, 117, 141, 255, 118, 133, 160, 253, 139, 155, 184, 116, 134, 143, 161, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 100, 110, 74, 122, 137, 163, 255, 143, 160, 191, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 114, 120, 31, 123, 138, 166, 255, 136, 153, 183, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 93, 97, 5, 42, 45, 51, 111, 86, 97, 117, 253, 118, 133, 160, 255, 119, 133, 161, 255, 133, 149, 180, 116, + 46, 50, 56, 109, 67, 76, 91, 255, 105, 118, 142, 255, 107, 120, 145, 254, 112, 125, 149, 131, 127, 139, 161, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 98, 109, 74, 116, 130, 156, 255, 142, 159, 190, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 115, 122, 31, 128, 143, 172, 255, 141, 157, 185, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 137, 163, 7, 122, 136, 162, 122, 120, 135, 162, 254, 121, 136, 164, 255, 136, 152, 184, 255, 126, 141, 168, 116, + 71, 74, 79, 17, 31, 35, 41, 206, 42, 47, 57, 255, 77, 87, 105, 255, 103, 116, 140, 255, 110, 124, 149, 239, 112, 125, 150, 157, 115, 128, 153, 89, 122, 134, 158, 30, 147, 158, 177, 2, 0, 0, 0, 0, 81, 87, 96, 65, 109, 123, 148, 255, 141, 158, 190, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 103, 112, 31, 135, 151, 180, 255, 141, 156, 183, 231, 0, 0, 0, 0, 153, 164, 183, 1, 134, 147, 171, 30, 124, 138, 165, 84, 123, 138, 165, 154, 122, 137, 164, 235, 127, 143, 172, 255, 140, 157, 189, 255, 144, 162, 195, 255, 129, 144, 172, 218, 126, 138, 161, 22, + 0, 0, 0, 0, 64, 68, 73, 7, 39, 43, 49, 118, 32, 36, 42, 225, 30, 35, 42, 255, 50, 57, 68, 255, 72, 81, 97, 255, 91, 102, 123, 255, 105, 118, 142, 255, 113, 127, 152, 240, 115, 129, 155, 204, 111, 124, 149, 196, 111, 125, 150, 255, 126, 141, 170, 234, 119, 133, 159, 120, 120, 134, 160, 116, 121, 135, 161, 117, 121, 135, 162, 119, 116, 130, 155, 152, 127, 142, 170, 255, 125, 140, 168, 248, 123, 138, 166, 199, 130, 145, 173, 235, 140, 155, 183, 255, 143, 160, 190, 255, 143, 161, 193, 255, 147, 165, 199, 255, 145, 164, 197, 255, 132, 148, 177, 230, 127, 140, 166, 126, 124, 134, 151, 12, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 141, 144, 3, 55, 58, 63, 58, 37, 40, 46, 126, 34, 38, 44, 184, 34, 38, 44, 235, 35, 39, 47, 254, 49, 55, 66, 255, 64, 72, 87, 255, 77, 87, 104, 255, 88, 98, 118, 255, 96, 108, 130, 255, 103, 116, 139, 255, 108, 122, 147, 255, 113, 127, 153, 255, 118, 133, 160, 255, 124, 140, 168, 255, 133, 148, 176, 255, 141, 156, 183, 255, 146, 161, 187, 255, 144, 159, 186, 255, 131, 146, 174, 254, 127, 141, 168, 237, 126, 141, 168, 188, 123, 137, 162, 131, 112, 123, 143, 61, 128, 132, 140, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 94, 98, 19, 64, 68, 73, 56, 53, 57, 65, 82, 62, 67, 76, 116, 66, 74, 89, 255, 95, 107, 129, 255, 80, 88, 103, 155, 81, 90, 105, 151, 86, 95, 112, 151, 95, 104, 122, 151, 98, 109, 128, 180, 124, 139, 166, 255, 109, 122, 146, 218, 100, 110, 128, 84, 96, 104, 118, 56, 105, 109, 117, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 176, 2, 74, 83, 98, 252, 131, 147, 178, 255, 140, 155, 184, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 134, 157, 114, 151, 169, 203, 255, 123, 138, 165, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 76, 90, 224, 122, 137, 165, 255, 136, 152, 182, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 139, 165, 147, 146, 164, 198, 255, 122, 137, 165, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 69, 81, 191, 110, 124, 149, 255, 134, 151, 181, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 143, 170, 193, 142, 160, 192, 255, 122, 137, 164, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 63, 74, 150, 94, 105, 127, 255, 133, 149, 179, 166, 0, 0, 0, 0, 0, 0, 0, 0, 115, 119, 128, 5, 130, 145, 174, 242, 137, 154, 186, 255, 125, 139, 166, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 58, 66, 102, 72, 81, 97, 255, 132, 148, 178, 236, 148, 161, 187, 5, 0, 0, 0, 0, 110, 121, 140, 64, 140, 157, 189, 255, 127, 142, 171, 254, 131, 144, 169, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 65, 71, 43, 47, 52, 63, 255, 127, 143, 172, 255, 132, 148, 177, 75, 0, 0, 0, 0, 121, 134, 158, 160, 139, 156, 188, 255, 123, 138, 165, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 156, 158, 1, 36, 39, 46, 227, 106, 119, 143, 255, 130, 145, 175, 203, 114, 125, 147, 51, 123, 138, 166, 247, 131, 147, 177, 255, 123, 138, 165, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 41, 47, 143, 68, 77, 93, 255, 128, 144, 174, 255, 126, 141, 170, 252, 129, 145, 174, 255, 123, 138, 166, 255, 127, 141, 167, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 68, 73, 40, 34, 38, 46, 250, 117, 131, 158, 255, 126, 142, 171, 255, 124, 140, 168, 255, 125, 139, 166, 214, 140, 152, 172, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 44, 50, 134, 58, 66, 79, 255, 123, 138, 166, 255, 123, 138, 166, 250, 127, 140, 165, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 156, 158, 1, 46, 50, 55, 83, 82, 89, 102, 123, 106, 116, 136, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(32, 32, imgdata); + return image; +} + +static Ihandle* load_image_LogoTecgraf(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 120, 143, 125, 132, 148, 178, 173, 133, 149, 178, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 110, 130, 48, 130, 147, 177, 254, 124, 139, 167, 254, 131, 147, 176, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 128, 153, 134, 142, 159, 191, 194, 47, 52, 61, 110, 114, 128, 154, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 143, 172, 192, 140, 156, 188, 99, 65, 69, 76, 16, 97, 109, 131, 251, 129, 144, 172, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 147, 175, 232, 140, 157, 188, 43, 0, 0, 0, 0, 100, 112, 134, 211, 126, 141, 169, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 78, 88, 26, 48, 52, 57, 60, 135, 150, 178, 254, 108, 121, 145, 83, 105, 118, 142, 76, 106, 119, 143, 201, 118, 133, 159, 122, 117, 129, 152, 25, 168, 176, 190, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 118, 128, 145, 3, 104, 117, 140, 92, 114, 127, 152, 180, 131, 147, 177, 237, 133, 149, 178, 249, 38, 42, 50, 222, 137, 152, 180, 249, 126, 142, 170, 182, 114, 128, 154, 182, 104, 117, 140, 227, 95, 107, 128, 238, 83, 93, 112, 248, 84, 95, 113, 239, 104, 117, 141, 180, 115, 129, 155, 93, 127, 140, 165, 4, + 98, 109, 130, 153, 109, 123, 147, 254, 145, 163, 195, 153, 138, 154, 182, 56, 115, 123, 138, 5, 92, 99, 109, 35, 134, 149, 177, 230, 0, 0, 0, 0, 0, 0, 0, 0, 120, 133, 159, 143, 135, 151, 181, 115, 86, 89, 93, 5, 41, 45, 51, 54, 40, 45, 53, 150, 107, 120, 144, 254, 122, 137, 164, 154, + 51, 57, 66, 147, 83, 93, 112, 255, 108, 121, 145, 159, 113, 126, 151, 62, 123, 136, 159, 8, 87, 93, 103, 35, 125, 141, 169, 230, 0, 0, 0, 0, 0, 0, 0, 0, 129, 143, 169, 143, 140, 156, 184, 115, 134, 147, 172, 8, 124, 138, 165, 60, 124, 139, 167, 155, 131, 147, 177, 255, 131, 147, 176, 153, + 64, 68, 73, 2, 36, 39, 45, 86, 41, 46, 54, 173, 60, 67, 80, 232, 75, 84, 101, 251, 89, 100, 120, 228, 105, 118, 142, 250, 110, 123, 148, 187, 118, 132, 158, 187, 126, 141, 169, 229, 134, 149, 177, 239, 136, 152, 179, 250, 136, 152, 181, 234, 139, 156, 186, 175, 130, 145, 173, 90, 124, 134, 151, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 74, 79, 19, 60, 64, 73, 50, 92, 103, 124, 254, 86, 95, 111, 84, 90, 100, 117, 76, 126, 141, 168, 201, 113, 126, 150, 119, 99, 105, 117, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 105, 125, 231, 135, 151, 181, 46, 0, 0, 0, 0, 137, 154, 184, 212, 123, 137, 164, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 83, 98, 191, 133, 149, 179, 102, 111, 121, 139, 17, 134, 150, 180, 252, 126, 140, 166, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 48, 57, 132, 121, 136, 164, 197, 121, 135, 161, 115, 130, 146, 175, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 47, 52, 46, 87, 98, 118, 254, 126, 142, 170, 254, 124, 139, 166, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 57, 67, 118, 115, 128, 152, 170, 127, 140, 164, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static Ihandle* load_image_Test(void) +{ + unsigned char imgdata[] = + { + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,1,1,1,1,1,1,2,2,2,2,2,2,0,5, + 5,0,1,1,1,1,1,1,2,2,2,2,2,2,0,5, + 5,0,1,1,1,1,1,1,2,2,2,2,2,2,0,5, + 5,0,1,1,1,1,1,1,2,2,2,2,2,2,0,5, + 5,0,1,1,1,1,1,1,2,2,2,2,2,2,0,5, + 5,0,1,1,1,1,1,1,2,2,2,2,2,2,0,5, + 5,0,3,3,3,3,3,3,4,4,4,4,4,4,0,5, + 5,0,3,3,3,3,3,3,4,4,4,4,4,4,0,5, + 5,0,3,3,3,3,3,3,4,4,4,4,4,4,0,5, + 5,0,3,3,3,3,3,3,4,4,4,4,4,4,0,5, + 5,0,3,3,3,3,3,3,4,4,4,4,4,4,0,5, + 5,0,3,3,3,3,3,3,4,4,4,4,4,4,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + }; + + Ihandle* image = IupImage(16, 16, imgdata); + IupSetAttribute(image, "0", "BGCOLOR"); + IupSetAttribute(image, "1", "255 0 0"); + IupSetAttribute(image, "2", "0 255 0"); + IupSetAttribute(image, "3", "0 0 255"); + IupSetAttribute(image, "4", "255 255 255"); + IupSetAttribute(image, "5", "0 0 0"); + return image; +} + +static Ihandle* load_image_Test_pressed(void) +{ + static unsigned char imgdata[] = + { + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,5,1,1,1,1,1,2,2,2,2,2,5,0,5, + 5,0,1,5,1,1,1,1,2,2,2,2,5,2,0,5, + 5,0,1,1,5,1,1,1,2,2,2,5,2,2,0,5, + 5,0,1,1,1,5,1,1,2,2,5,2,2,2,0,5, + 5,0,1,1,1,1,5,1,2,5,2,2,2,2,0,5, + 5,0,1,1,1,1,1,5,5,2,2,2,2,2,0,5, + 5,0,3,3,3,3,3,5,5,4,4,4,4,4,0,5, + 5,0,3,3,3,3,5,3,4,5,4,4,4,4,0,5, + 5,0,3,3,3,5,3,3,4,4,5,4,4,4,0,5, + 5,0,3,3,5,3,3,3,4,4,4,5,4,4,0,5, + 5,0,3,5,3,3,3,3,4,4,4,4,5,4,0,5, + 5,0,5,3,3,3,3,3,4,4,4,4,4,5,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + }; + + Ihandle* image = IupImage(16, 16, imgdata); + IupSetAttribute(image, "0", "BGCOLOR"); + IupSetAttribute(image, "1", "255 0 0"); + IupSetAttribute(image, "2", "0 255 0"); + IupSetAttribute(image, "3", "0 0 255"); + IupSetAttribute(image, "4", "255 255 255"); + IupSetAttribute(image, "5", "0 0 0"); + return image; +} + +static int item_add_cb(Ihandle* ih) +{ + Ihandle* item = IupItem("New Appended Item", "item_cb"); + printf("ACTION(%s)\n", IupGetAttribute(ih, "TITLE")); + IupAppend(IupGetParent(ih), item); /* after the last item */ + IupMap(item); + return IUP_DEFAULT; +} + +static int item_insert_cb(Ihandle* ih) +{ + Ihandle* ref_item = IupGetChild(IupGetParent(ih), 4); /* before the first appended item, just after the separator */ + printf("ACTION(%s)\n", IupGetAttribute(ih, "TITLE")); + if (ref_item) + { + Ihandle* item = IupItem("New Inserted Item", "item_cb"); + IupInsert(IupGetParent(ih), ref_item, item); + IupMap(item); + } + return IUP_DEFAULT; +} + +static int item_remove_cb(Ihandle* ih) +{ + Ihandle* item = IupGetNextChild(IupGetParent(ih), IupGetNextChild(IupGetParent(ih), ih)); /* the next after the separator */ + printf("ACTION(%s)\n", IupGetAttribute(ih, "TITLE")); + if (item) + IupDestroy(item); + return IUP_DEFAULT; +} + +static int item_image_cb(Ihandle* ih) +{ + printf("ACTION(%s)\n", IupGetAttribute(ih, "TITLE")); + ih = IupGetNextChild(IupGetParent(ih), ih); + if (IupGetAttributeHandle(ih, "IMAGE")) + IupSetAttribute(ih, "IMAGE", NULL); + else + IupSetAttribute(ih, "IMAGE", "image_test"); + return IUP_DEFAULT; +} + +static int item_active_cb(Ihandle* ih) +{ + printf("ACTION(%s)\n", IupGetAttribute(ih, "TITLE")); + ih = IupGetNextChild(IupGetParent(ih), ih); + if (IupGetInt(ih, "ACTIVE")) + IupSetAttribute(ih, "ACTIVE", "NO"); + else + IupSetAttribute(ih, "ACTIVE", "YES"); + return IUP_DEFAULT; +} + +static int item_rename_cb(Ihandle* ih) +{ + printf("ACTION(%s)\n", IupGetAttribute(ih, "TITLE")); + ih = IupGetNextChild(IupGetParent(ih), ih); + IupSetAttribute(ih, "TITLE", "New Title"); + return IUP_DEFAULT; +} + +static int item_toggle_cb(Ihandle* ih) +{ + printf("ACTION(%s)\n", IupGetAttribute(ih, "TITLE")); + if (IupGetInt(ih, "VALUE")) + IupSetAttribute(ih, "VALUE", "OFF"); + else + IupSetAttribute(ih, "VALUE", "ON"); + + return IUP_DEFAULT; +} + +static int item_cb (Ihandle* ih) +{ + printf("ACTION(%s)\n", IupGetAttribute(ih, "TITLE")); + return IUP_DEFAULT; +} + +static int item_close_cb (Ihandle* ih) +{ + printf("ACTION(%s)\n", IupGetAttribute(ih, "TITLE")); + return IUP_CLOSE; +} + +static int item_help_cb (Ihandle* ih) +{ + printf("HELP_CB(%s)\n", IupGetAttribute(ih, "TITLE")); + return IUP_DEFAULT; +} + +static int item_destroy_cb (Ihandle* ih) +{ + printf("ACTION(%s)\n", IupGetAttribute(ih, "TITLE")); + IupDestroy(IupGetDialog(ih)); + return IUP_DEFAULT; +} + +static int highlight_cb(Ihandle* ih) +{ + printf("HIGHLIGHT_CB(%s)\n", IupGetAttribute(ih, "TITLE")); + return IUP_DEFAULT; +} + +static int open_cb(Ihandle* ih) +{ + printf("OPEN_CB(Menu of %s)\n", IupGetAttribute(IupGetParent(ih), "TITLE")); + return IUP_DEFAULT; +} + +static int menuclose_cb(Ihandle* ih) +{ + printf("MENUCLOSE_CB(Menu of %s)\n", IupGetAttribute(IupGetParent(ih), "TITLE")); + return IUP_DEFAULT; +} + +static void show_popup(void) +{ + Ihandle* menu_file = IupMenu( + IupSetAttributes(IupItem("Item with Image", "item_cb"), "IMAGE=image_tec"), + IupSetCallbacks(IupSetAttributes(IupItem("Toggle using VALUE", NULL), "VALUE=ON, KEY=K_V"), "ACTION", item_toggle_cb, "HIGHLIGHT_CB", highlight_cb, NULL), + IupSetAttributes(IupItem("Auto &Toggle", "item_cb"), "AUTOTOGGLE=YES, VALUE=OFF, IMAGE=image_test, IMPRESS=image_test_pressed"), + IupSeparator(), + IupSetCallbacks(IupItem("E&xit (Close)", NULL), "ACTION", item_close_cb, NULL), + NULL); + Ihandle* menu = IupMenu( + IupSetCallbacks(IupSetAttributes(IupSubmenu("Submenu", menu_file), "KEY=K_S, IMAGE=image_tec"), "HIGHLIGHT_CB", highlight_cb, NULL), + IupSetCallbacks(IupItem("Item", "item_cb"), "HIGHLIGHT_CB", highlight_cb, NULL), + IupSetCallbacks(IupSetAttributes(IupItem("Item", "item_cb"), "VALUE=ON"), "HIGHLIGHT_CB", highlight_cb, NULL), + IupSetCallbacks(IupSetAttributes(IupItem("Item", "item_cb"), "KEY=K_I, IMAGE=image_tec"), "HIGHLIGHT_CB", highlight_cb, NULL), + NULL); + IupSetCallbacks(menu_file, "OPEN_CB", open_cb, "MENUCLOSE_CB", menuclose_cb, NULL); + IupSetCallbacks(menu, "OPEN_CB", open_cb, "MENUCLOSE_CB", menuclose_cb, NULL); + IupPopup(menu, IUP_MOUSEPOS, IUP_MOUSEPOS); + IupDestroy(menu); +} + +static int k_m(Ihandle *ih) +{ + (void)ih; + show_popup(); + return IUP_DEFAULT; +} + +static int button(Ihandle *ih,int but,int pressed,int x,int y,char* status) +{ + (void)x; + (void)y; + (void)status; + (void)ih; + + if (but==IUP_BUTTON3 && pressed) + show_popup(); + + return IUP_DEFAULT; +} + +static int killfocus(Ihandle *ih) +{ + (void)ih; + printf("KILLFOCUS(canvas)\n"); + return IUP_DEFAULT; +} + +static int getfocus(Ihandle *ih) +{ + (void)ih; + printf("GETFOCUS(canvas)\n"); + return IUP_DEFAULT; +} + +void MenuTest(void) +{ + Ihandle *dlg, *canvas, *menu, + *menu_file, *menu_edit, *menu_help, + *menu_create; + + IupSetHandle("image_tec", load_image_LogoTecgraf()); + IupSetHandle("image_test", load_image_Test()); + IupSetHandle("image_test_pressed", load_image_Test_pressed()); + + /* Creates menu create */ + menu_create = IupMenu( + IupItem("Line", "item_cb"), + IupItem("Circle", "item_cb"), + IupSetCallbacks(IupSubmenu("Triangle", IupSetAttributes(IupMenu( + IupSetCallbacks(IupSetAttributes(IupItem("Equilateral", "item_cb"), "VALUE=ON"), "HIGHLIGHT_CB", highlight_cb, NULL), + IupSetCallbacks(IupItem("Isoceles", "item_cb"), "HIGHLIGHT_CB", highlight_cb, NULL), + IupSetCallbacks(IupItem("Scalenus", "item_cb"), "HIGHLIGHT_CB", highlight_cb, NULL), + NULL), "RADIO=YES")), "HIGHLIGHT_CB", highlight_cb, NULL), + NULL); + IupSetCallbacks(menu_create, "OPEN_CB", open_cb, "MENUCLOSE_CB", menuclose_cb, NULL); +// IupSetAttribute(menu_create, "BGCOLOR", "92 92 255"); + + /* Creates three menus that will be inside submenus */ + menu_file = IupMenu( + IupSetAttributes(IupItem("Item with Image \tCtrl+M", "item_cb"), "IMAGE=image_tec"), + IupSetCallbacks(IupSetAttributes(IupItem("Toggle using &VALUE", NULL), "VALUE=ON, KEY=KcV"), "ACTION", item_toggle_cb, NULL), + IupSetAttributes(IupItem("Auto &Toggle Text", "item_cb"), "AUTOTOGGLE=YES, VALUE=OFF"), + IupSetAttributes(IupItem("Auto &Toggle Image", "item_cb"), "AUTOTOGGLE=YES, VALUE=OFF, IMAGE=image_test, IMPRESS=image_test_pressed"), + IupItem("Big Image", "item_cb"), + IupSeparator(), + IupSetCallbacks(IupItem("Exit (Destroy)", NULL), "ACTION", item_destroy_cb, NULL), + IupSetCallbacks(IupItem("E&xit (Close)", NULL), "ACTION", item_close_cb, NULL), + NULL); + menu_edit = IupMenu( + IupSetCallbacks(IupItem("Active Next", NULL), "ACTION", item_active_cb, NULL), + IupSetCallbacks(IupItem("Rename Next", NULL), "ACTION", item_rename_cb, NULL), + IupSetCallbacks(IupItem("Set Next Image", NULL), "ACTION", item_image_cb, NULL), + IupSetAttributes(IupItem("Item w/ Acc\tCtrl+A", "item_cb"), "IMAGE=dummy"), + IupSeparator(), + IupSetAttributes(IupSubmenu("Create", menu_create), "IMAGE=image_tec"), + NULL); + menu_help = IupMenu( + IupSetCallbacks(IupItem("Append", NULL), "ACTION", item_add_cb, "HELP_CB", item_help_cb, NULL), + IupSetCallbacks(IupItem("Insert", NULL), "ACTION", item_insert_cb, "HELP_CB", item_help_cb, NULL), + IupSetCallbacks(IupItem("Remove", NULL), "ACTION", item_remove_cb, "HELP_CB", item_help_cb, NULL), + IupSeparator(), + NULL); + + IupSetAttributeHandle(IupGetChild(menu_file, 4), "TITLEIMAGE", load_image_Tecgraf()); + IupSetCallbacks(menu_edit, "OPEN_CB", open_cb, "MENUCLOSE_CB", menuclose_cb, NULL); + + /* Creates main menu with file menu */ + menu = IupMenu( + IupSetCallbacks(IupSetAttributes(IupSubmenu("Submenu", menu_file), "KEY=K_S, IMAGE=image_tec"), "HIGHLIGHT_CB", highlight_cb, NULL), + IupSetCallbacks(IupSubmenu("&Edit", menu_edit), "HIGHLIGHT_CB", highlight_cb, NULL), + IupSubmenu("Help", menu_help), + IupSetCallbacks(IupSetAttributes(IupItem("Item", "item_cb"), "KEY=K_I, IMAGE=image_tec"), "HIGHLIGHT_CB", highlight_cb, NULL), + NULL); + + /* Registers callbacks */ + IupSetFunction("item_cb", item_cb); + //IupSetAttribute(menu, "BGCOLOR", "92 92 255"); + //IupSetAttribute(menu, "BGCOLOR", "173 177 194"); // Motif BGCOLOR for documentation + + canvas = IupCanvas(NULL); + IupSetCallback(canvas, "BUTTON_CB", (Icallback)button); + IupSetCallback(canvas, "K_m", (Icallback)k_m); +// IupSetCallback(canvas, "KILLFOCUS_CB", killfocus); +// IupSetCallback(canvas, "GETFOCUS_CB", getfocus); + + dlg = IupDialog(canvas); + IupSetAttributeHandle(dlg, "MENU", menu); + IupSetAttributes(dlg, "TITLE=\"IupMenu Test\", SIZE=QUARTERxQUARTER"); + + /* Shows dlg in the center of the screen */ + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + MenuTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/ole.cpp b/iup/test/ole.cpp new file mode 100755 index 0000000..c3da5fc --- /dev/null +++ b/iup/test/ole.cpp @@ -0,0 +1,108 @@ +#include +#include + +#include +#include + +#include +#include + + +#ifndef BIG_TEST +static Ihandle *IupOleCreateBrowser(void) +{ + Ihandle *browser=IupOleControl("Shell.Explorer.2"); + IupSetAttribute(browser,"DESIGNMODE", "NO"); + return browser; +} + +static WCHAR* Char2Wide(const char* str) +{ + if (str) + { + int n = strlen(str)+1; + WCHAR* wstr = (WCHAR*)malloc(n * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, str, -1, wstr, n); + return wstr; + } + return NULL; +} + +static IWebBrowser2 *IupOleGetWebBrowserInterface(Ihandle *browser) +{ + IWebBrowser2 *pweb = (IWebBrowser2*)IupGetAttribute(browser, "IUP_IWebBrowser2"); + if (!pweb) + { + IUnknown *punk = (IUnknown*)IupGetAttribute(browser,"IUNKNOWN"); + punk->QueryInterface(IID_IWebBrowser2, (void **) &pweb); + punk->Release(); + IupSetAttribute(browser, "IUP_IWebBrowser2", (char*)pweb); + } + return pweb; +} + +static void IupOleNavigate(Ihandle *browser,char *fname) +{ + IWebBrowser2 *pweb = IupOleGetWebBrowserInterface(browser); + WCHAR* url = Char2Wide(fname); + pweb->Navigate(url, NULL, NULL, NULL, NULL); + free(url); +} + +static void IupOleClose(Ihandle* browser) +{ + IWebBrowser2 *pweb = IupOleGetWebBrowserInterface(browser); + pweb->Release(); +} + +static int load_cb(Ihandle* ih) +{ + Ihandle* txt = (Ihandle*)IupGetAttribute(ih, "MY_TEXT"); + Ihandle* browser = (Ihandle*)IupGetAttribute(ih, "MY_BROWSER"); + IupOleNavigate(browser, IupGetAttribute(txt, "VALUE")); + return IUP_DEFAULT; +} + +static int close_cb(Ihandle* ih) +{ + Ihandle* browser = (Ihandle*)IupGetAttribute(ih, "MY_BROWSER"); + IupOleClose(browser); + return IUP_DEFAULT; +} + +void OleTest(void) +{ + Ihandle* txt, *bt; + Ihandle * browser = IupOleCreateBrowser(); + + // Creates a dlg containing the OLE control + Ihandle* dlg = IupDialog(IupVbox(IupHbox(txt = IupText(""), bt = IupButton("Load", NULL), NULL), browser, NULL)); + IupSetAttribute(dlg, "MARGIN", "10x10"); + IupSetAttribute(dlg, "GAP", "10"); + IupSetAttribute(dlg, "TITLE", "IupOle"); + IupSetAttribute(dlg, "MY_TEXT", (char*)txt); + IupSetAttribute(dlg, "MY_BROWSER", (char*)browser); + IupSetAttribute(txt, "EXPAND", "HORIZONTAL"); +// IupSetAttribute(txt, "VALUE", "d:/test.doc"); + IupSetCallback(bt, "ACTION", (Icallback)load_cb); + IupSetCallback(dlg, "CLOSE_CB", (Icallback)close_cb); + IupSetAttributeHandle(dlg, "DEFAULTENTER", bt); + + // Shows dlg + IupShow(dlg); +} + +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupOleControlOpen(); + + OleTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/pplot.c b/iup/test/pplot.c new file mode 100755 index 0000000..639aa34 --- /dev/null +++ b/iup/test/pplot.c @@ -0,0 +1,699 @@ +/* + * IupPPlot Test + * Description : Create all built-in plots. + * It is organised as two side-by-side panels: + * - left panel for current plot control + * - right panel containg tabbed plots + * Remark : depend on libs IUP, CD, IUP_PPLOT + */ + +#include +#include +#include +#include + + +#include "iup.h" +#include "iupcontrols.h" +#include "iup_pplot.h" + +#include +#include +#include +#include + + +#define MAXPLOT 6 /* room for examples */ + + +static Ihandle *plot[MAXPLOT] = {NULL}; /* PPlot controls */ +static Ihandle *dial1, *dial2, /* dials for zooming */ + *tgg1, *tgg2, /* autoscale on|off toggles */ + *tgg3, *tgg4, /* grid show|hide toggles */ + *tgg5, /* legend show|hide toggle */ + *tabs; /* tabbed control */ + +static int delete_cb(Ihandle* ih, int index, int sample_index, float x, float y) +{ + printf("DELETE_CB(%d, %d, %g, %g)\n", index, sample_index, x, y); + return IUP_DEFAULT; +} + +static int select_cb(Ihandle* ih, int index, int sample_index, float x, float y, int select) +{ + printf("SELECT_CB(%d, %d, %g, %g, %d)\n", index, sample_index, x, y, select); + return IUP_DEFAULT; +} + +static int edit_cb(Ihandle* ih, int index, int sample_index, float x, float y, float *new_x, float *new_y) +{ + printf("EDIT_CB(%d, %d, %g, %g, %g, %g)\n", index, sample_index, x, y, *new_x, *new_y); + return IUP_DEFAULT; +} + +static int postdraw_cb(Ihandle* ih, cdCanvas* cnv) +{ + int ix, iy; + + IupPPlotTransform(ih, 0.003f, 0.02f, &ix, &iy); + cdCanvasFont(cnv, NULL, CD_BOLD, 10); + cdCanvasTextAlignment(cnv, CD_SOUTH); + cdCanvasText(cnv, ix, iy, "My Inline Legend"); + printf("POSTDRAW_CB()\n"); + + return IUP_DEFAULT; +} + +static int predraw_cb(Ihandle* ih, cdCanvas* cnv) +{ + printf("PREDRAW_CB()\n"); + return IUP_DEFAULT; +} + +static void InitPlots(void) +{ + int theI; + float x, y, theFac; + + /* PLOT 0 - MakeExamplePlot1 */ + IupSetAttribute(plot[0], "TITLE", "AutoScale"); + IupSetAttribute(plot[0], "MARGINTOP", "40"); + IupSetAttribute(plot[0], "MARGINLEFT", "40"); + IupSetAttribute(plot[0], "MARGINBOTTOM", "50"); + IupSetAttribute(plot[0], "TITLEFONTSIZE", "16"); + IupSetAttribute(plot[0], "LEGENDSHOW", "YES"); + IupSetAttribute(plot[0], "AXS_XLABEL", "gnu (Foo)"); + IupSetAttribute(plot[0], "AXS_YLABEL", "Space (m^3)"); + IupSetAttribute(plot[0], "AXS_YFONTSIZE", "8"); + IupSetAttribute(plot[0], "AXS_YTICKFONTSIZE", "8"); + IupSetAttribute(plot[0], "AXS_XFONTSIZE", "10"); + IupSetAttribute(plot[0], "AXS_YFONTSIZE", "10"); + IupSetAttribute(plot[0], "AXS_XLABELCENTERED", "NO"); + IupSetAttribute(plot[0], "AXS_YLABELCENTERED", "NO"); + +// IupSetAttribute(plot[0], "USE_IMAGERGB", "YES"); +// IupSetAttribute(plot[0], "USE_GDI+", "YES"); + + theFac = (float)1.0/(100*100*100); + IupPPlotBegin(plot[0], 0); + for (theI=-100; theI<=100; theI++) + { + x = (float)(theI+50); + y = theFac*theI*theI*theI; + IupPPlotAdd(plot[0], x, y); + } + IupPPlotEnd(plot[0]); + IupSetAttribute(plot[0], "DS_LINEWIDTH", "3"); + IupSetAttribute(plot[0], "DS_LEGEND", "Line"); + + theFac = (float)2.0/100; + IupPPlotBegin(plot[0], 0); + for (theI=-100; theI<=100; theI++) + { + x = (float)theI; + y = -theFac*theI; + IupPPlotAdd(plot[0], x, y); + } + IupPPlotEnd(plot[0]); + IupSetAttribute(plot[0], "DS_LEGEND", "Curve 1"); + + IupPPlotBegin(plot[0], 0); + for (theI=-100; theI<=100; theI++) + { + x = (float)(0.01*theI*theI-30); + y = (float)0.01*theI; + IupPPlotAdd(plot[0], x, y); + } + IupPPlotEnd(plot[0]); + IupSetAttribute(plot[0], "DS_LEGEND", "Curve 2"); + + + /* PLOT 1 - MakeExamplePlot2 */ + IupSetAttribute(plot[1], "TITLE", "No Autoscale+No CrossOrigin"); + IupSetAttribute(plot[1], "TITLEFONTSIZE", "16"); + IupSetAttribute(plot[1], "MARGINTOP", "40"); + IupSetAttribute(plot[1], "MARGINLEFT", "65"); + IupSetAttribute(plot[1], "MARGINBOTTOM", "60"); + IupSetAttribute(plot[1], "BGCOLOR", "0 192 192"); + IupSetAttribute(plot[1], "AXS_XLABEL", "Tg (X)"); + IupSetAttribute(plot[1], "AXS_YLABEL", "Tg (Y)"); + IupSetAttribute(plot[1], "AXS_XAUTOMIN", "NO"); + IupSetAttribute(plot[1], "AXS_XAUTOMAX", "NO"); + IupSetAttribute(plot[1], "AXS_YAUTOMIN", "NO"); + IupSetAttribute(plot[1], "AXS_YAUTOMAX", "NO"); + IupSetAttribute(plot[1], "AXS_XMIN", "10"); + IupSetAttribute(plot[1], "AXS_XMAX", "60"); + IupSetAttribute(plot[1], "AXS_YMIN", "-0.5"); + IupSetAttribute(plot[1], "AXS_YMAX", "0.5"); + IupSetAttribute(plot[1], "AXS_XCROSSORIGIN", "NO"); + IupSetAttribute(plot[1], "AXS_YCROSSORIGIN", "NO"); + IupSetAttribute(plot[1], "AXS_XFONTSTYLE", "BOLD"); + IupSetAttribute(plot[1], "AXS_YFONTSTYLE", "BOLD"); + IupSetAttribute(plot[1], "AXS_XREVERSE", "YES"); + IupSetAttribute(plot[1], "GRIDCOLOR", "128 255 128"); + IupSetAttribute(plot[1], "GRIDLINESTYLE", "DOTTED"); + IupSetAttribute(plot[1], "GRID", "YES"); + IupSetAttribute(plot[1], "LEGENDSHOW", "YES"); + + theFac = (float)1.0/(100*100*100); + IupPPlotBegin(plot[1], 0); + for (theI=0; theI<=100; theI++) + { + x = (float)(theI); + y = theFac*theI*theI*theI; + IupPPlotAdd(plot[1], x, y); + } + IupPPlotEnd(plot[1]); + + theFac = (float)2.0/100; + IupPPlotBegin(plot[1], 0); + for (theI=0; theI<=100; theI++) + { + x = (float)(theI); + y = -theFac*theI; + IupPPlotAdd(plot[1], x, y); + } + IupPPlotEnd(plot[1]); + + /* PLOT 2 - MakeExamplePlot4 */ + IupSetAttribute(plot[2], "TITLE", "Log Scale"); + IupSetAttribute(plot[2], "TITLEFONTSIZE", "16"); + IupSetAttribute(plot[2], "MARGINTOP", "40"); + IupSetAttribute(plot[2], "MARGINLEFT", "70"); + IupSetAttribute(plot[2], "MARGINBOTTOM", "60"); + IupSetAttribute(plot[2], "GRID", "YES"); + IupSetAttribute(plot[2], "AXS_XSCALE", "LOG10"); + IupSetAttribute(plot[2], "AXS_YSCALE", "LOG2"); + IupSetAttribute(plot[2], "AXS_XLABEL", "Tg (X)"); + IupSetAttribute(plot[2], "AXS_YLABEL", "Tg (Y)"); + IupSetAttribute(plot[2], "AXS_XFONTSTYLE", "BOLD"); + IupSetAttribute(plot[2], "AXS_YFONTSTYLE", "BOLD"); + + theFac = (float)100.0/(100*100*100); + IupPPlotBegin(plot[2], 0); + for (theI=0; theI<=100; theI++) + { + x = (float)(0.0001+theI*0.001); + y = (float)(0.01+theFac*theI*theI*theI); + IupPPlotAdd(plot[2], x, y); + } + IupPPlotEnd(plot[2]); + IupSetAttribute(plot[2], "DS_COLOR", "100 100 200"); + + /* PLOT 3 - MakeExamplePlot5 */ + IupSetAttribute(plot[3], "TITLE", "Bar Mode"); + IupSetAttribute(plot[3], "TITLEFONTSIZE", "16"); + IupSetAttribute(plot[3], "MARGINTOP", "40"); + IupSetAttribute(plot[3], "MARGINLEFT", "30"); + IupSetAttribute(plot[3], "MARGINBOTTOM", "30"); + + { + const char * kLables[12] = {"jan","feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"}; + const float kData[12] = {1,2,3,4,5,6,7,8,9,0,1,2}; + IupPPlotBegin(plot[3], 1); + for (theI=0; theI<12; theI++) + IupPPlotAddStr(plot[3], kLables[theI], kData[theI]); + } + IupPPlotEnd(plot[3]); + IupSetAttribute(plot[3], "DS_COLOR", "100 100 200"); + IupSetAttribute(plot[3], "DS_MODE", "BAR"); + + /* PLOT 4 - MakeExamplePlot6 */ + IupSetAttribute(plot[4], "TITLE", "Marks Mode"); + IupSetAttribute(plot[4], "TITLEFONTSIZE", "16"); + IupSetAttribute(plot[4], "MARGINTOP", "40"); + IupSetAttribute(plot[4], "MARGINLEFT", "45"); + IupSetAttribute(plot[4], "MARGINBOTTOM", "40"); + IupSetAttribute(plot[4], "AXS_XAUTOMIN", "NO"); + IupSetAttribute(plot[4], "AXS_XAUTOMAX", "NO"); + IupSetAttribute(plot[4], "AXS_YAUTOMIN", "NO"); + IupSetAttribute(plot[4], "AXS_YAUTOMAX", "NO"); + IupSetAttribute(plot[4], "AXS_XMIN", "0"); + IupSetAttribute(plot[4], "AXS_XMAX", "0.011"); + IupSetAttribute(plot[4], "AXS_YMIN", "0"); + IupSetAttribute(plot[4], "AXS_YMAX", "0.22"); + IupSetAttribute(plot[4], "AXS_XCROSSORIGIN", "NO"); + IupSetAttribute(plot[4], "AXS_YCROSSORIGIN", "NO"); + IupSetAttribute(plot[4], "AXS_XTICKFORMAT", "%1.3f"); + IupSetAttribute(plot[4], "LEGENDSHOW", "YES"); + IupSetAttribute(plot[4], "LEGENDPOS", "BOTTOMRIGHT"); + + theFac = (float)100.0/(100*100*100); + IupPPlotBegin(plot[4], 0); + for (theI=0; theI<=10; theI++) + { + x = (float)(0.0001+theI*0.001); + y = (float)(0.01+theFac*theI*theI); + IupPPlotAdd(plot[4], x, y); + } + IupPPlotEnd(plot[4]); + IupSetAttribute(plot[4], "DS_MODE", "MARKLINE"); + IupSetAttribute(plot[4], "DS_SHOWVALUES", "YES"); + + IupPPlotBegin(plot[4], 0); + for (theI=0; theI<=10; theI++) + { + x = (float)(0.0001+theI*0.001); + y = (float)(0.2-theFac*theI*theI); + IupPPlotAdd(plot[4], x, y); + } + IupPPlotEnd(plot[4]); + IupSetAttribute(plot[4], "DS_MODE", "MARK"); + IupSetAttribute(plot[4], "DS_MARKSTYLE", "HOLLOW_CIRCLE"); + + /* PLOT 5 - MakeExamplePlot8 */ + IupSetAttribute(plot[5], "TITLE", "Data Selection and Editing"); + IupSetAttribute(plot[5], "TITLEFONTSIZE", "16"); + IupSetAttribute(plot[5], "MARGINTOP", "40"); + + theFac = (float)100.0/(100*100*100); + IupPPlotBegin(plot[5], 0); + for (theI=-10; theI<=10; theI++) + { + x = (float)(0.001*theI); + y = (float)(0.01+theFac*theI*theI*theI); + IupPPlotAdd(plot[5], x, y); + } + IupPPlotEnd(plot[5]); + IupSetAttribute(plot[5], "DS_COLOR", "100 100 200"); + IupSetAttribute(plot[5], "DS_EDIT", "YES"); + IupSetCallback(plot[5], "DELETE_CB", (Icallback)delete_cb); + IupSetCallback(plot[5], "SELECT_CB", (Icallback)select_cb); + IupSetCallback(plot[5], "POSTDRAW_CB", (Icallback)postdraw_cb); + IupSetCallback(plot[5], "PREDRAW_CB", (Icallback)predraw_cb); + IupSetCallback(plot[5], "EDIT_CB", (Icallback)edit_cb); + +} + +static int tabs_get_index(void) +{ + Ihandle *curr_tab = IupGetHandle(IupGetAttribute(tabs, "VALUE")); + char *ss = IupGetAttribute(curr_tab, "TABTITLE"); + ss += 5; /* Skip "Plot " */ + return atoi(ss); +} + +/* Some processing required by current tab change: the controls at left + will be updated according to current plot props */ +static int tabs_tabchange_cb(Ihandle* self, Ihandle* new_tab) +{ + int ii=0; + + char *ss = IupGetAttribute(new_tab, "TABTITLE"); + ss += 5; /* Skip "Plot " */ + ii = atoi(ss); + + /* autoscaling X axis */ + if (IupGetInt(plot[ii], "AXS_XAUTOMIN") && IupGetInt(plot[ii], "AXS_XAUTOMAX")) { + IupSetAttribute(tgg2, "VALUE", "ON"); + IupSetAttribute(dial2, "ACTIVE", "NO"); + } + else { + IupSetAttribute(tgg2, "VALUE", "OFF"); + IupSetAttribute(dial2, "ACTIVE", "YES"); + } + /* autoscaling Y axis */ + if (IupGetInt(plot[ii], "AXS_YAUTOMIN") && IupGetInt(plot[ii], "AXS_YAUTOMAX")) { + IupSetAttribute(tgg1, "VALUE", "ON"); + IupSetAttribute(dial1, "ACTIVE", "NO"); + } + else { + IupSetAttribute(tgg1, "VALUE", "OFF"); + IupSetAttribute(dial1, "ACTIVE", "YES"); + } + + /* grid */ + if (IupGetInt(plot[ii], "GRID")) + { + IupSetAttribute(tgg3, "VALUE", "ON"); + IupSetAttribute(tgg4, "VALUE", "ON"); + } + else + { + /* X axis */ + if (*IupGetAttribute(plot[ii], "GRID") == 'V') + IupSetAttribute(tgg3, "VALUE", "ON"); + else + IupSetAttribute(tgg3, "VALUE", "OFF"); + /* Y axis */ + if (*IupGetAttribute(plot[ii], "GRID") == 'H') + IupSetAttribute(tgg4, "VALUE", "ON"); + else + IupSetAttribute(tgg4, "VALUE", "OFF"); + } + + /* legend */ + if (IupGetInt(plot[ii], "LEGENDSHOW")) + IupSetAttribute(tgg5, "VALUE", "ON"); + else + IupSetAttribute(tgg5, "VALUE", "OFF"); + + return IUP_DEFAULT; +} + +/* show/hide V grid */ +static int tgg3_cb(Ihandle *self, int v) +{ + int ii = tabs_get_index(); + + if (v) + { + if (IupGetInt(tgg4, "VALUE")) + IupSetAttribute(plot[ii], "GRID", "YES"); + else + IupSetAttribute(plot[ii], "GRID", "VERTICAL"); + } + else + { + if (!IupGetInt(tgg4, "VALUE")) + IupSetAttribute(plot[ii], "GRID", "NO"); + else + IupSetAttribute(plot[ii], "GRID", "HORIZONTAL"); + } + + IupSetAttribute(plot[ii], "REDRAW", NULL); + + return IUP_DEFAULT; +} + + +/* show/hide H grid */ +static int tgg4_cb(Ihandle *self, int v) +{ + int ii = tabs_get_index(); + + if (v) + { + if (IupGetInt(tgg3, "VALUE")) + IupSetAttribute(plot[ii], "GRID", "YES"); + else + IupSetAttribute(plot[ii], "GRID", "HORIZONTAL"); + } + else + { + if (!IupGetInt(tgg3, "VALUE")) + IupSetAttribute(plot[ii], "GRID", "NO"); + else + IupSetAttribute(plot[ii], "GRID", "VERTICAL"); + } + + IupSetAttribute(plot[ii], "REDRAW", NULL); + + return IUP_DEFAULT; +} + + +/* show/hide legend */ +static int tgg5_cb(Ihandle *self, int v) +{ + int ii = tabs_get_index(); + + if (v) + IupSetAttribute(plot[ii], "LEGENDSHOW", "YES"); + else + IupSetAttribute(plot[ii], "LEGENDSHOW", "NO"); + + IupSetAttribute(plot[ii], "REDRAW", NULL); + + return IUP_DEFAULT; +} + + +/* autoscale Y */ +static int tgg1_cb(Ihandle *self, int v) +{ + int ii = tabs_get_index(); + + if (v) { + IupSetAttribute(dial1, "ACTIVE", "NO"); + IupSetAttribute(plot[ii], "AXS_YAUTOMIN", "YES"); + IupSetAttribute(plot[ii], "AXS_YAUTOMAX", "YES"); + } + else { + IupSetAttribute(dial1, "ACTIVE", "YES"); + IupSetAttribute(plot[ii], "AXS_YAUTOMIN", "NO"); + IupSetAttribute(plot[ii], "AXS_YAUTOMAX", "NO"); + } + + IupSetAttribute(plot[ii], "REDRAW", NULL); + + return IUP_DEFAULT; +} + + +/* autoscale X */ +static int tgg2_cb(Ihandle *self, int v) +{ + int ii = tabs_get_index(); + + if (v) { + IupSetAttribute(dial2, "ACTIVE", "NO"); + IupSetAttribute(plot[ii], "AXS_XAUTOMIN", "YES"); + IupSetAttribute(plot[ii], "AXS_XAUTOMAX", "YES"); + } + else { + IupSetAttribute(dial2, "ACTIVE", "YES"); + IupSetAttribute(plot[ii], "AXS_XAUTOMIN", "NO"); + IupSetAttribute(plot[ii], "AXS_XAUTOMAX", "NO"); + } + + IupSetAttribute(plot[ii], "REDRAW", NULL); + + return IUP_DEFAULT; +} + + +/* Y zoom */ +static int dial1_btndown_cb(Ihandle *self, double angle) +{ + int ii = tabs_get_index(); + + IupStoreAttribute(plot[ii], "OLD_YMIN", IupGetAttribute(plot[ii], "AXS_YMIN")); + IupStoreAttribute(plot[ii], "OLD_YMAX", IupGetAttribute(plot[ii], "AXS_YMAX")); + + return IUP_DEFAULT; +} + +static int dial1_btnup_cb(Ihandle *self, double angle) +{ + int ii = tabs_get_index(); + double x1, x2, xm; + char *ss; + + x1 = IupGetFloat(plot[ii], "OLD_YMIN"); + x2 = IupGetFloat(plot[ii], "OLD_YMAX"); + + ss = IupGetAttribute(plot[ii], "AXS_YMODE"); + if ( ss && ss[3]=='2' ) { + /* LOG2: one circle will zoom 2 times */ + xm = 4.0 * fabs(angle) / 3.141592; + if (angle>0.0) { x2 /= xm; x1 *= xm; } + else { x2 *= xm; x1 /= xm; } + } + if ( ss && ss[3]=='1' ) { + /* LOG10: one circle will zoom 10 times */ + xm = 10.0 * fabs(angle) / 3.141592; + if (angle>0.0) { x2 /= xm; x1 *= xm; } + else { x2 *= xm; x1 /= xm; } + } + else { + /* LIN: one circle will zoom 2 times */ + xm = (x1 + x2) / 2.0; + x1 = xm - (xm - x1)*(1.0-angle*1.0/3.141592); + x2 = xm + (x2 - xm)*(1.0-angle*1.0/3.141592); + } + + if (x1 +#include +#include + +#include "iup.h" +#include "iupkey.h" +#include "iupcontrols.h" + + +#ifdef WIN32 +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#include +static void drawTest(Ihandle* ih) +{ + RECT rect; + HDC hDC = (HDC)IupGetAttribute(ih, "PREVIEWDC"); + int w = IupGetInt(ih, "PREVIEWWIDTH"); + int h = IupGetInt(ih, "PREVIEWHEIGHT"); + + SetRect(&rect, 0, 0, w, h); + FillRect(hDC, &rect, GetStockObject(WHITE_BRUSH)); + + SelectObject(hDC, GetStockObject(DC_PEN)); + SetDCPenColor(hDC, RGB(255, 0, 0)); + + MoveToEx(hDC, 0, 0, NULL); + LineTo(hDC, w-1, h-1); + MoveToEx(hDC, 0, h-1, NULL); + LineTo(hDC, w-1, 0); +} +#else +#include + +#define xCOLOR8TO16(_x) (_x*257) /* 65535/255 = 257 */ +static unsigned long xGetPixel(Display* dpy, unsigned char cr, unsigned char cg, unsigned char cb) +{ + XColor xc; + xc.red = xCOLOR8TO16(cr); + xc.green = xCOLOR8TO16(cg); + xc.blue = xCOLOR8TO16(cb); + xc.flags = DoRed | DoGreen | DoBlue; + + XAllocColor(dpy, DefaultColormap(dpy, XDefaultScreen(dpy)), &xc); + return xc.pixel; +} + +static void drawTest(Ihandle* ih) +{ + GC gc = (GC)IupGetAttribute(ih, "PREVIEWDC"); + Display* dpy = (Display*)IupGetAttribute(ih, "XDISPLAY"); + Drawable wnd = (Drawable)IupGetAttribute(ih, "XWINDOW"); + int w = IupGetInt(ih, "PREVIEWWIDTH"); + int h = IupGetInt(ih, "PREVIEWHEIGHT"); + + XSetForeground(dpy, gc, xGetPixel(dpy, 255, 255, 255)); + XFillRectangle(dpy, wnd, gc, 0, 0, w, h); + + XSetForeground(dpy, gc, xGetPixel(dpy, 255, 0, 0)); + + XDrawLine(dpy, wnd, gc, 0, 0, w-1, h-1); + XDrawLine(dpy, wnd, gc, 0, h-1, w-1, 0); +} +#endif + +#ifdef USE_OPENGL +#include +#include "iupgl.h" + +static void drawTestGL(Ihandle* ih) +{ + Ihandle* glcanvas = IupGetAttributeHandle(ih, "PREVIEWGLCANVAS"); + if (glcanvas) + { + int w = IupGetInt(ih, "PREVIEWWIDTH"); + int h = IupGetInt(ih, "PREVIEWHEIGHT"); + + IupGLMakeCurrent(glcanvas); + glViewport(0,0,w,h); + + glClearColor(1.0, 0.0, 1.0, 1.f); /* pink */ + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glColor3f(1.0,0.0,0.0); /* red */ + glBegin(GL_QUADS); + glVertex2f(0.9f,0.9f); + glVertex2f(0.9f,-0.9f); + glVertex2f(-0.9f,-0.9f); + glVertex2f(-0.9f,0.9f); + glEnd(); + + IupGLSwapBuffers(glcanvas); + } + else + drawTest(ih); +} + +#endif + +static int close_cb(Ihandle *ih) +{ + printf("CLOSE_CB\n"); + IupDestroy(ih); + return IUP_IGNORE; +} + +static int help_cb(Ihandle* ih) +{ + (void)ih; + printf("HELP_CB\n"); + return IUP_DEFAULT; +} + +static int file_cb(Ihandle* ih, const char* filename, const char* status) +{ + (void)ih; + printf("FILE_CB(%s - %s)\n", status, filename); + + if (strcmp(status, "PAINT")==0) + { + printf(" SIZE(%s x %s)\n", IupGetAttribute(ih, "PREVIEWWIDTH"), IupGetAttribute(ih, "PREVIEWHEIGHT")); +#ifdef USE_OPENGL + drawTestGL(ih); +#else + drawTest(ih); +#endif + } + return IUP_DEFAULT; +} + +static void new_message(char* type, char* buttons) +{ + Ihandle* dlg = IupMessageDlg(); + + if (strcmp(type, "ERROR")!=0) + IupSetAttribute(dlg, "PARENTDIALOG", "_MAIN_DIALOG_TEST_"); + IupSetAttribute(dlg, "DIALOGTYPE", type); + IupSetAttribute(dlg, "TITLE", "IupMessageDlg Test"); + IupSetAttribute(dlg, "BUTTONS", buttons); + IupSetAttribute(dlg, "VALUE", "Message Text\nSecond Line"); + if (strcmp(type, "WARNING")==0) + IupSetAttribute(dlg, "BUTTONDEFAULT", "2"); + if (strcmp(type, "INFORMATION")!=0) + IupSetCallback(dlg, "HELP_CB", (Icallback)help_cb); + + IupPopup(dlg, IUP_CENTERPARENT, IUP_CENTERPARENT); + + printf("BUTTONRESPONSE(%s)\n", IupGetAttribute(dlg, "BUTTONRESPONSE")); + + IupDestroy(dlg); +} + +static void new_color(void) +{ + Ihandle* dlg = IupColorDlg(); + + IupSetAttribute(dlg, "PARENTDIALOG", "_MAIN_DIALOG_TEST_"); + IupSetAttribute(dlg, "VALUE", "128 0 255"); + IupSetAttribute(dlg, "ALPHA", "142"); + //IupSetAttribute(dlg, "COLORTABLE", ";;177 29 234;;;0 0 23;253 20 119"); + IupSetAttribute(dlg, "SHOWHEX", "YES"); + IupSetAttribute(dlg, "SHOWCOLORTABLE", "YES"); + //IupSetAttribute(dlg, "SHOWALPHA", "YES"); + IupSetAttribute(dlg, "TITLE", "IupColorDlg Test"); + IupSetCallback(dlg, "HELP_CB", (Icallback)help_cb); + + IupPopup(dlg, IUP_CENTERPARENT, IUP_CENTERPARENT); + + if (IupGetInt(dlg, "STATUS")) + { + printf("OK\n"); + printf(" VALUE(%s)\n", IupGetAttribute(dlg, "VALUE")); + printf(" COLORTABLE(%s)\n", IupGetAttribute(dlg, "COLORTABLE")); + } + else + printf("CANCEL\n"); + + IupDestroy(dlg); +} + +static void new_font(void) +{ + Ihandle* dlg = IupFontDlg(); + + IupSetAttribute(dlg, "PARENTDIALOG", "_MAIN_DIALOG_TEST_"); + IupSetAttribute(dlg, "COLOR", "128 0 255"); + IupSetAttribute(dlg, "VALUE", "Times New Roman, Bold 20"); + IupSetAttribute(dlg, "TITLE", "IupFontDlg Test"); + IupSetCallback(dlg, "HELP_CB", (Icallback)help_cb); + + IupPopup(dlg, IUP_CENTERPARENT, IUP_CENTERPARENT); + + if (IupGetInt(dlg, "STATUS")) + { + printf("OK\n"); + printf(" VALUE(%s)\n", IupGetAttribute(dlg, "VALUE")); + printf(" COLOR(%s)\n", IupGetAttribute(dlg, "COLOR")); + } + else + printf("CANCEL\n"); + + IupDestroy(dlg); +} + +static void new_file(char* dialogtype, int preview) +{ + Ihandle *dlg = IupFileDlg(); + + IupSetAttribute(dlg, "PARENTDIALOG", "_MAIN_DIALOG_TEST_"); + IupSetAttribute(dlg, "DIALOGTYPE", dialogtype); + IupSetAttribute(dlg, "TITLE", "IupFileDlg Test"); + IupSetAttribute(dlg, "DIRECTORY", "/tecgraf/iup"); + if (strcmp(dialogtype, "DIR")!=0) + { + IupSetAttributes(dlg, "FILTER = \"*.bmp\", FILTERINFO = \"Bitmap Files\""); + IupSetAttribute(dlg, "EXTFILTER", "Text files|*.txt;*.doc|Image files|*.jpg;*.bmp;*.gif|"); +// IupSetAttribute(dlg, "FILE", "/tecgraf/im/test.bmp"); + IupSetAttribute(dlg, "FILE", "test.bmp"); + } + IupSetCallback(dlg, "HELP_CB", (Icallback)help_cb); +// IupSetAttributes(dlg, "FILE = \"\\tecgraf\\iup\\test.bmp\""); // OK +// IupSetAttributes(dlg, "FILE = \"/tecgraf/iup/test.bmp\""); // OK +// IupSetAttributes(dlg, "FILE = \"test.bmp\", DIRECTORY = \"/tecgraf/iup\""); // OK +// IupSetAttributes(dlg, "FILE = \"test.bmp\", DIRECTORY = \"\\tecgraf\\iup\""); // OK +// IupSetAttribute(dlg, "NOCHANGEDIR", "NO"); +// IupSetAttribute(dlg, "MULTIPLEFILES", "YES"); + + if (preview) + { + IupSetAttribute(dlg, "SHOWPREVIEW", "YES"); + IupSetCallback(dlg, "FILE_CB", (Icallback)file_cb); + +#ifdef USE_OPENGL + if (preview==2) + { + Ihandle* glcanvas = IupGLCanvas(NULL); + IupSetAttribute(glcanvas, "BUFFER", "DOUBLE"); + IupSetAttributeHandle(dlg, "PREVIEWGLCANVAS", glcanvas); + } +#endif + } + + IupPopup(dlg, IUP_CENTERPARENT, IUP_CENTERPARENT); + + switch(IupGetInt(dlg, "STATUS")) + { + case 1: + printf("OK\n"); + printf(" New file - VALUE(%s)\n", IupGetAttribute(dlg, "VALUE")); + break; + case 0 : + printf("OK\n"); + printf(" File exists - VALUE(%s)\n", IupGetAttribute(dlg, "VALUE")); + break; + case -1 : + printf("CANCEL\n"); + break; + } + + IupDestroy(dlg); +} + +static void new_alarm(void) +{ + int ret; + IupSetGlobal("PARENTDIALOG", "_MAIN_DIALOG_TEST_"); + ret = IupAlarm ("IupAlarm Test", "Message Text\nSecond Line", "But 1", "Button 2", "B3"); + IupSetGlobal("PARENTDIALOG", NULL); + //int ret = IupAlarm ("IupAlarm Test", "Message Text\nSecond Line\nVery long long long long long long long long long long long long text", "But 1", "Button 2", "B3"); + printf("Button(%d)\n", ret); +} + +static void new_gettext(void) +{ + int ret; + char text[1024] = "text first line\nsecond line"; + IupSetGlobal("PARENTDIALOG", "_MAIN_DIALOG_TEST_"); + ret = IupGetText("IupGetText Text", text); + IupSetGlobal("PARENTDIALOG", NULL); + if (ret) + { + printf("OK\n"); + printf("Text(%s)\n", text); + } + else + printf("CANCEL\n"); +} + +static void new_getfile(void) +{ + int ret; + char filename[1024] = "*.*"; + IupSetGlobal("PARENTDIALOG", "_MAIN_DIALOG_TEST_"); + ret = IupGetFile(filename); + IupSetGlobal("PARENTDIALOG", NULL); + if (ret!=-1) + { + printf("OK\n"); + if (ret == 0) + printf("File(%s)\n", filename); + else + printf("New File(%s)\n", filename); + } + else + printf("CANCEL\n"); +} + +static void new_list(void) +{ + int ret; + int size = 8 ; + int marks[8] = { 0,0,0,0,1,1,0,0 }; + const char *options[] = { + "Blue" , + "Red" , + "Green" , + "Yellow" , + "Black" , + "White" , + "Gray" , + "Brown" } ; + + IupSetGlobal("PARENTDIALOG", "_MAIN_DIALOG_TEST_"); + ret = IupListDialog(2,"IupListDialog Test",size,options,0,8,5,marks); + IupSetGlobal("PARENTDIALOG", NULL); + + if (ret == -1) + { + printf("CANCEL\n"); + } + else + { + int i; + char selection[80] = ""; + printf("OK\n"); + + for(i = 0 ; i < size ; i++) + { + if(marks[i]) + { + char temp[10]; + sprintf(temp,"%s\n",options[i]); + strcat(selection,temp); + } + } + + printf(" Options (%s)\n", selection); + } +} + +static int k_any(Ihandle *ih, int c) +{ + switch(c) + { + case K_m: + IupSetGlobal("PARENTDIALOG", "_MAIN_DIALOG_TEST_"); + IupMessage("IupMessage Test", "Message Text\nSecond Line."); + IupSetGlobal("PARENTDIALOG", NULL); + break; + case K_e: + new_message("ERROR", NULL); + break; + case K_i: + new_message("INFORMATION", NULL); + break; + case K_w: + new_message("WARNING", "OKCANCEL"); + break; + case K_q: + new_message("QUESTION", "YESNO"); + break; + case K_c: + new_color(); + break; + case K_f: + new_font(); + break; + case K_o: + new_file("OPEN", 0); + break; + case K_O: + new_file("OPEN", 1); + break; + case K_G: + new_file("OPEN", 2); + break; + case K_s: + new_file("SAVE", 0); + break; + case K_d: + new_file("DIR", 0); + break; + case K_a: + new_alarm(); + break; + case K_g: + new_getfile(); + break; + case K_t: + new_gettext(); + break; + case K_l: + new_list(); + break; + case K_ESC: + IupDestroy(ih); + return IUP_IGNORE; + } + return IUP_DEFAULT; +} + +void PreDialogsTest(void) +{ + char* msg = "Press a key for a pre-defined dialog:\n" + "e = IupMessageDlg(ERROR)\n" + "i = IupMessageDlg(INFORMATION)\n" + "w = IupMessageDlg(WARNING)\n" + "q = IupMessageDlg(QUESTION)\n" + "--------------------\n" + "o = IupFileDlg(OPEN)\n" + "O = IupFileDlg(OPEN+PREVIEW)\n" + "G = IupFileDlg(OPEN+PREVIEW+OPENGL)\n" + "s = IupFileDlg(SAVE)\n" + "d = IupFileDlg(DIR)\n" + "--------------------\n" + "c = IupColorDlg\n" + "f = IupFontDlg\n" + "--------------------\n" + "m = IupMessage\n" + "a = IupAlarm\n" + "t = IupGetText\n" + "g = IupGetFile\n" + "l = IupListDialog\n" + "--------------------\n" + "Esc = quit"; + Ihandle *dlg = IupDialog(IupVbox(IupLabel(msg), NULL)); + +#ifdef USE_OPENGL + IupGLCanvasOpen(); +#endif + + IupSetHandle("_MAIN_DIALOG_TEST_", dlg); + + IupSetAttribute(dlg, "TITLE", "Pre-defined Dialogs Test"); + IupSetAttribute(dlg, "MARGIN", "10x10"); + + IupSetCallback(dlg, "K_ANY", (Icallback)k_any); + IupSetCallback(dlg, "CLOSE_CB", (Icallback)close_cb); + + IupShow(dlg); +} + + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupControlsOpen(); + +#ifdef USE_OPENGL + IupGLCanvasOpen(); +#endif + + PreDialogsTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/progressbar.c b/iup/test/progressbar.c new file mode 100755 index 0000000..26b8bfd --- /dev/null +++ b/iup/test/progressbar.c @@ -0,0 +1,330 @@ +#include +#include + +#include "iup.h" +#include "iupcontrols.h" + +static float increment = 0.01f; +static Ihandle *progressbar1; +static Ihandle *progressbar2; +static Ihandle *btn_pause; +static Ihandle *timer = NULL; + +static unsigned char pixmap_play[] = +{ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 }; + +static unsigned char pixmap_restart[] = +{ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,2,2,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,1,1,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,1,1,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,1,1,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,2,2,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,1,1,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 }; + +static unsigned char pixmap_rewind[] = +{ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,1,2,2,2,2,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,1,1,2,2,2,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,2,2,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,2,1,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,1,1,1,1,2,1,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,2,2,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,1,1,2,2,2,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,1,2,2,2,2,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 }; + +static unsigned char pixmap_forward[] = +{ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,2,2,2,2,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,2,1,1,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,2,2,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,1,2,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,1,2,1,1,1,1,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,1,2,2,1,1,1,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,2,1,1,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,2,2,2,2,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 }; + +static unsigned char pixmap_pause[] = +{ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,1,1,2,2,1,1,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 + ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 }; + +static void createimg_s (void) +{ + Ihandle *img_restart, *img_play, *img_forward, *img_rewind, *img_pause; + + img_restart = IupImage(22,22, pixmap_restart); + img_play = IupImage(22,22, pixmap_play); + img_forward = IupImage(22,22, pixmap_forward); + img_rewind = IupImage(22,22, pixmap_rewind); + img_pause = IupImage(22,22, pixmap_pause); + + IupSetHandle ("img_restart", img_restart); + IupSetHandle ("img_play", img_play); + IupSetHandle ("img_forward", img_forward); + IupSetHandle ("img_rewind", img_rewind); + IupSetHandle ("img_pause", img_pause); + + IupSetAttribute (img_restart, "1", "0 0 0"); + IupSetAttribute (img_restart, "2", "BGCOLOR"); + IupSetAttribute (img_play, "1", "0 0 0"); + IupSetAttribute (img_play, "2", "BGCOLOR"); + IupSetAttribute (img_forward, "1", "0 0 0"); + IupSetAttribute (img_forward, "2", "BGCOLOR"); + IupSetAttribute (img_rewind, "1", "0 0 0"); + IupSetAttribute (img_rewind, "2", "BGCOLOR"); + IupSetAttribute (img_pause, "1", "0 0 0"); + IupSetAttribute (img_pause, "2", "BGCOLOR"); +} + +static int time_cb(void) +{ + float value = IupGetFloat(progressbar1, "VALUE"); + value += increment; + if (value > 1) value = 0; /* start over */ + IupSetfAttribute(progressbar1, "VALUE", "%f", (double)value); + + value = IupGetFloat(progressbar2, "VALUE"); + value += increment*50; + if (value > 50) value = 0; /* start over */ + IupSetfAttribute(progressbar2, "VALUE", "%f", (double)value); + return IUP_DEFAULT; +} + +static int btn_pause_cb(void) +{ + if (!IupGetInt(timer, "RUN")) + { + IupSetAttribute(timer, "RUN", "YES"); + IupSetAttribute(btn_pause, "IMAGE", "img_pause"); + } + else + { + IupSetAttribute(timer, "RUN", "NO"); + IupSetAttribute(btn_pause, "IMAGE", "img_play"); + } + + return IUP_DEFAULT; +} + + +static int unmap_cb(Ihandle* ih) +{ + IupDestroy(timer); + timer = NULL; + return IUP_DEFAULT; +} + +static int btn_restart_cb(void) +{ + IupSetAttribute(progressbar1, "VALUE", "0"); + IupSetAttribute(progressbar2, "VALUE", "0"); + return IUP_DEFAULT; +} + +static int btn_accelerate_cb(void) +{ + increment *= 2; + return IUP_DEFAULT; +} + +static int btn_decelerate_cb(void) +{ + increment /= 2; + return IUP_DEFAULT; +} + +static int btn_show1_cb(void) +{ + if (!IupGetInt(progressbar1, "DASHED")) + IupSetAttribute(progressbar1, "DASHED", "YES"); + else + IupSetAttribute(progressbar1, "DASHED", "NO"); + + return IUP_DEFAULT; +} + +static int btn_show2_cb(void) +{ + if (!IupGetInt(progressbar1, "MARQUEE")) + IupSetAttribute(progressbar1, "MARQUEE", "YES"); + else + IupSetAttribute(progressbar1, "MARQUEE", "NO"); + + return IUP_DEFAULT; +} + +void ProgressbarTest(void) +{ + Ihandle *dlg, *vbox, *hbox; + Ihandle *btn_restart, *btn_accelerate, *btn_decelerate, *btn_show1, *btn_show2; + + if (timer) + IupDestroy(timer); + timer = IupTimer(); + IupSetCallback(timer, "ACTION_CB", (Icallback)time_cb); + IupSetAttribute(timer, "TIME", "100"); + + progressbar1 = IupProgressBar(); + progressbar2 = IupProgressBar(); + + IupSetAttribute(progressbar1, "EXPAND", "YES"); + //IupSetAttribute(progressbar1, "DASHED", "YES"); + IupSetAttribute(progressbar1, "MARQUEE", "YES"); + + IupSetAttribute(progressbar2, "ORIENTATION", "VERTICAL"); + IupSetAttribute(progressbar2, "BGCOLOR", "255 0 128"); + IupSetAttribute(progressbar2, "FGCOLOR", "0 128 0"); + IupSetAttribute(progressbar2, "RASTERSIZE", "30x100"); + IupSetAttribute(progressbar2, "MAX", "50"); + IupSetAttribute(progressbar2, "VALUE", "25"); + + btn_restart = IupButton(NULL, NULL); + btn_pause = IupButton(NULL, NULL); + btn_accelerate = IupButton(NULL, NULL); + btn_decelerate = IupButton(NULL, NULL); + btn_show1 = IupButton("Dashed", NULL); + btn_show2 = IupButton("Marquee", NULL); + + createimg_s(); + + IupSetAttribute(btn_restart, "IMAGE", "img_restart"); + IupSetAttribute(btn_restart, "TIP", "Restart" ); + IupSetAttribute(btn_pause, "IMAGE", "img_pause"); + IupSetAttribute(btn_pause, "TIP", "Play/Pause"); + IupSetAttribute(btn_accelerate, "IMAGE", "img_forward"); + IupSetAttribute(btn_accelerate, "TIP", "Accelerate"); + IupSetAttribute(btn_decelerate, "IMAGE", "img_rewind"); + IupSetAttribute(btn_decelerate, "TIP", "Decelerate"); + IupSetAttribute(btn_show1, "TIP", "Dashed or Continuous"); + IupSetAttribute(btn_show2, "TIP", "Marquee or Defined"); + + hbox = IupHbox + ( + IupFill(), + btn_pause, + btn_restart, + btn_decelerate, + btn_accelerate, + btn_show1, + btn_show2, + IupFill(), + NULL + ); + + vbox = IupHbox(IupVbox(progressbar1, hbox, NULL), progressbar2, NULL); + IupSetAttribute(vbox, "MARGIN", "10x10"); + IupSetAttribute(vbox, "GAP", "5"); + + dlg = IupDialog(vbox); + + IupSetAttribute(dlg, "TITLE", "IupProgressBar Test"); + IupSetCallback(dlg, "UNMAP_CB", (Icallback) unmap_cb); + + IupSetCallback(btn_pause, "ACTION", (Icallback) btn_pause_cb); + IupSetCallback(btn_restart, "ACTION", (Icallback) btn_restart_cb); + IupSetCallback(btn_accelerate, "ACTION", (Icallback) btn_accelerate_cb); + IupSetCallback(btn_decelerate, "ACTION", (Icallback) btn_decelerate_cb); + IupSetCallback(btn_show1, "ACTION", (Icallback) btn_show1_cb); + IupSetCallback(btn_show2, "ACTION", (Icallback) btn_show2_cb); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); + + IupSetAttribute(timer, "RUN", "YES"); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + ProgressbarTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/sample.c b/iup/test/sample.c new file mode 100755 index 0000000..e99617d --- /dev/null +++ b/iup/test/sample.c @@ -0,0 +1,407 @@ +#include +#include +#include + +static Ihandle* load_image_Tecgraf(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 95, 108, 1, 90, 100, 117, 99, 123, 138, 166, 126, 137, 152, 181, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 105, 123, 147, 122, 137, 165, 255, 136, 152, 183, 255, 132, 149, 179, 250, 133, 149, 178, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 100, 115, 43, 111, 125, 150, 253, 140, 158, 190, 255, 135, 151, 182, 255, 132, 149, 179, 255, 131, 147, 177, 217, 153, 164, 188, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 113, 134, 148, 134, 151, 182, 255, 137, 154, 185, 255, 115, 129, 154, 252, 114, 128, 155, 255, 130, 146, 175, 255, 132, 147, 175, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 159, 162, 3, 108, 121, 145, 230, 144, 162, 195, 255, 137, 154, 185, 197, 74, 79, 86, 45, 41, 46, 55, 246, 120, 134, 162, 255, 129, 145, 174, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 101, 113, 48, 124, 139, 167, 255, 144, 161, 194, 255, 138, 155, 186, 67, 0, 0, 0, 0, 49, 54, 62, 150, 87, 98, 118, 255, 128, 144, 173, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 113, 132, 105, 137, 154, 185, 255, 139, 156, 188, 231, 143, 159, 187, 3, 0, 0, 0, 0, 64, 68, 76, 61, 70, 79, 95, 255, 127, 143, 172, 254, 134, 149, 175, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 121, 142, 153, 141, 159, 191, 255, 139, 156, 188, 164, 0, 0, 0, 0, 0, 0, 0, 0, 79, 82, 87, 3, 69, 77, 92, 241, 122, 137, 165, 255, 127, 142, 170, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 122, 146, 191, 145, 163, 196, 255, 139, 156, 188, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 86, 101, 190, 115, 129, 156, 255, 126, 141, 170, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 125, 149, 227, 150, 168, 201, 255, 141, 157, 188, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 91, 107, 144, 113, 127, 153, 255, 125, 140, 169, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163, 165, 167, 2, 112, 125, 150, 252, 155, 173, 203, 255, 143, 159, 189, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 94, 110, 109, 114, 128, 155, 255, 125, 140, 168, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 167, 181, 1, 120, 130, 149, 33, 48, 53, 59, 69, 43, 46, 52, 100, 50, 54, 59, 137, 116, 130, 156, 255, 155, 171, 201, 255, 105, 118, 142, 155, 104, 117, 141, 151, 105, 118, 141, 151, 105, 118, 142, 151, 101, 113, 136, 185, 111, 124, 150, 255, 116, 130, 156, 220, 112, 125, 148, 95, 115, 127, 150, 67, 123, 134, 156, 33, 168, 176, 190, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 129, 147, 5, 109, 121, 142, 71, 106, 118, 140, 140, 105, 117, 140, 197, 107, 120, 144, 242, 120, 135, 162, 255, 123, 137, 163, 255, 44, 49, 58, 255, 28, 32, 39, 255, 125, 139, 164, 255, 150, 167, 197, 255, 138, 155, 186, 255, 131, 148, 178, 255, 125, 141, 170, 255, 119, 134, 162, 255, 114, 128, 154, 255, 108, 122, 147, 255, 104, 117, 141, 255, 102, 115, 138, 255, 103, 116, 139, 255, 107, 120, 145, 255, 111, 124, 149, 245, 113, 126, 151, 200, 113, 127, 152, 140, 116, 129, 154, 71, 122, 135, 158, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 118, 128, 145, 14, 106, 118, 140, 130, 104, 116, 139, 234, 105, 118, 142, 255, 128, 144, 173, 255, 147, 165, 199, 255, 157, 177, 213, 255, 150, 168, 202, 255, 140, 156, 187, 229, 41, 45, 52, 196, 39, 43, 51, 183, 130, 143, 168, 255, 144, 161, 192, 233, 109, 122, 145, 109, 105, 116, 138, 109, 99, 110, 130, 109, 92, 103, 123, 109, 91, 100, 117, 145, 97, 109, 131, 255, 95, 106, 128, 248, 74, 83, 97, 193, 64, 72, 85, 227, 56, 63, 75, 255, 55, 62, 75, 255, 65, 73, 88, 255, 90, 101, 121, 255, 111, 125, 150, 255, 114, 128, 154, 236, 116, 129, 155, 130, 127, 140, 165, 16, 0, 0, 0, 0, + 95, 101, 113, 22, 103, 115, 137, 220, 103, 116, 140, 255, 110, 123, 148, 255, 146, 165, 198, 255, 147, 165, 197, 232, 142, 158, 188, 147, 131, 144, 169, 78, 115, 123, 139, 20, 0, 0, 0, 0, 0, 0, 0, 0, 91, 97, 108, 68, 128, 142, 167, 255, 144, 162, 193, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 100, 107, 31, 120, 135, 163, 255, 133, 150, 180, 231, 0, 0, 0, 0, 0, 0, 0, 0, 86, 89, 93, 20, 50, 54, 61, 73, 37, 40, 46, 141, 33, 36, 42, 230, 46, 52, 63, 255, 107, 120, 144, 255, 116, 130, 157, 255, 118, 133, 159, 223, 132, 147, 174, 24, + 76, 83, 95, 114, 104, 117, 140, 255, 105, 117, 141, 255, 118, 133, 160, 253, 139, 155, 184, 116, 134, 143, 161, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 100, 110, 74, 122, 137, 163, 255, 143, 160, 191, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 114, 120, 31, 123, 138, 166, 255, 136, 153, 183, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 93, 97, 5, 42, 45, 51, 111, 86, 97, 117, 253, 118, 133, 160, 255, 119, 133, 161, 255, 133, 149, 180, 116, + 46, 50, 56, 109, 67, 76, 91, 255, 105, 118, 142, 255, 107, 120, 145, 254, 112, 125, 149, 131, 127, 139, 161, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 98, 109, 74, 116, 130, 156, 255, 142, 159, 190, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 115, 122, 31, 128, 143, 172, 255, 141, 157, 185, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 137, 163, 7, 122, 136, 162, 122, 120, 135, 162, 254, 121, 136, 164, 255, 136, 152, 184, 255, 126, 141, 168, 116, + 71, 74, 79, 17, 31, 35, 41, 206, 42, 47, 57, 255, 77, 87, 105, 255, 103, 116, 140, 255, 110, 124, 149, 239, 112, 125, 150, 157, 115, 128, 153, 89, 122, 134, 158, 30, 147, 158, 177, 2, 0, 0, 0, 0, 81, 87, 96, 65, 109, 123, 148, 255, 141, 158, 190, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 103, 112, 31, 135, 151, 180, 255, 141, 156, 183, 231, 0, 0, 0, 0, 153, 164, 183, 1, 134, 147, 171, 30, 124, 138, 165, 84, 123, 138, 165, 154, 122, 137, 164, 235, 127, 143, 172, 255, 140, 157, 189, 255, 144, 162, 195, 255, 129, 144, 172, 218, 126, 138, 161, 22, + 0, 0, 0, 0, 64, 68, 73, 7, 39, 43, 49, 118, 32, 36, 42, 225, 30, 35, 42, 255, 50, 57, 68, 255, 72, 81, 97, 255, 91, 102, 123, 255, 105, 118, 142, 255, 113, 127, 152, 240, 115, 129, 155, 204, 111, 124, 149, 196, 111, 125, 150, 255, 126, 141, 170, 234, 119, 133, 159, 120, 120, 134, 160, 116, 121, 135, 161, 117, 121, 135, 162, 119, 116, 130, 155, 152, 127, 142, 170, 255, 125, 140, 168, 248, 123, 138, 166, 199, 130, 145, 173, 235, 140, 155, 183, 255, 143, 160, 190, 255, 143, 161, 193, 255, 147, 165, 199, 255, 145, 164, 197, 255, 132, 148, 177, 230, 127, 140, 166, 126, 124, 134, 151, 12, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 141, 144, 3, 55, 58, 63, 58, 37, 40, 46, 126, 34, 38, 44, 184, 34, 38, 44, 235, 35, 39, 47, 254, 49, 55, 66, 255, 64, 72, 87, 255, 77, 87, 104, 255, 88, 98, 118, 255, 96, 108, 130, 255, 103, 116, 139, 255, 108, 122, 147, 255, 113, 127, 153, 255, 118, 133, 160, 255, 124, 140, 168, 255, 133, 148, 176, 255, 141, 156, 183, 255, 146, 161, 187, 255, 144, 159, 186, 255, 131, 146, 174, 254, 127, 141, 168, 237, 126, 141, 168, 188, 123, 137, 162, 131, 112, 123, 143, 61, 128, 132, 140, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 94, 98, 19, 64, 68, 73, 56, 53, 57, 65, 82, 62, 67, 76, 116, 66, 74, 89, 255, 95, 107, 129, 255, 80, 88, 103, 155, 81, 90, 105, 151, 86, 95, 112, 151, 95, 104, 122, 151, 98, 109, 128, 180, 124, 139, 166, 255, 109, 122, 146, 218, 100, 110, 128, 84, 96, 104, 118, 56, 105, 109, 117, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 176, 2, 74, 83, 98, 252, 131, 147, 178, 255, 140, 155, 184, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 134, 157, 114, 151, 169, 203, 255, 123, 138, 165, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 76, 90, 224, 122, 137, 165, 255, 136, 152, 182, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 139, 165, 147, 146, 164, 198, 255, 122, 137, 165, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 69, 81, 191, 110, 124, 149, 255, 134, 151, 181, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 143, 170, 193, 142, 160, 192, 255, 122, 137, 164, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 63, 74, 150, 94, 105, 127, 255, 133, 149, 179, 166, 0, 0, 0, 0, 0, 0, 0, 0, 115, 119, 128, 5, 130, 145, 174, 242, 137, 154, 186, 255, 125, 139, 166, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 58, 66, 102, 72, 81, 97, 255, 132, 148, 178, 236, 148, 161, 187, 5, 0, 0, 0, 0, 110, 121, 140, 64, 140, 157, 189, 255, 127, 142, 171, 254, 131, 144, 169, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 65, 71, 43, 47, 52, 63, 255, 127, 143, 172, 255, 132, 148, 177, 75, 0, 0, 0, 0, 121, 134, 158, 160, 139, 156, 188, 255, 123, 138, 165, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 156, 158, 1, 36, 39, 46, 227, 106, 119, 143, 255, 130, 145, 175, 203, 114, 125, 147, 51, 123, 138, 166, 247, 131, 147, 177, 255, 123, 138, 165, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 41, 47, 143, 68, 77, 93, 255, 128, 144, 174, 255, 126, 141, 170, 252, 129, 145, 174, 255, 123, 138, 166, 255, 127, 141, 167, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 68, 73, 40, 34, 38, 46, 250, 117, 131, 158, 255, 126, 142, 171, 255, 124, 140, 168, 255, 125, 139, 166, 214, 140, 152, 172, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 44, 50, 134, 58, 66, 79, 255, 123, 138, 166, 255, 123, 138, 166, 250, 127, 140, 165, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 156, 158, 1, 46, 50, 55, 83, 82, 89, 102, 123, 106, 116, 136, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(32, 32, imgdata); + return image; +} + +static Ihandle* load_image_LogoTecgraf(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 120, 143, 125, 132, 148, 178, 173, 133, 149, 178, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 110, 130, 48, 130, 147, 177, 254, 124, 139, 167, 254, 131, 147, 176, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 128, 153, 134, 142, 159, 191, 194, 47, 52, 61, 110, 114, 128, 154, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 143, 172, 192, 140, 156, 188, 99, 65, 69, 76, 16, 97, 109, 131, 251, 129, 144, 172, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 147, 175, 232, 140, 157, 188, 43, 0, 0, 0, 0, 100, 112, 134, 211, 126, 141, 169, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 78, 88, 26, 48, 52, 57, 60, 135, 150, 178, 254, 108, 121, 145, 83, 105, 118, 142, 76, 106, 119, 143, 201, 118, 133, 159, 122, 117, 129, 152, 25, 168, 176, 190, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 118, 128, 145, 3, 104, 117, 140, 92, 114, 127, 152, 180, 131, 147, 177, 237, 133, 149, 178, 249, 38, 42, 50, 222, 137, 152, 180, 249, 126, 142, 170, 182, 114, 128, 154, 182, 104, 117, 140, 227, 95, 107, 128, 238, 83, 93, 112, 248, 84, 95, 113, 239, 104, 117, 141, 180, 115, 129, 155, 93, 127, 140, 165, 4, + 98, 109, 130, 153, 109, 123, 147, 254, 145, 163, 195, 153, 138, 154, 182, 56, 115, 123, 138, 5, 92, 99, 109, 35, 134, 149, 177, 230, 0, 0, 0, 0, 0, 0, 0, 0, 120, 133, 159, 143, 135, 151, 181, 115, 86, 89, 93, 5, 41, 45, 51, 54, 40, 45, 53, 150, 107, 120, 144, 254, 122, 137, 164, 154, + 51, 57, 66, 147, 83, 93, 112, 255, 108, 121, 145, 159, 113, 126, 151, 62, 123, 136, 159, 8, 87, 93, 103, 35, 125, 141, 169, 230, 0, 0, 0, 0, 0, 0, 0, 0, 129, 143, 169, 143, 140, 156, 184, 115, 134, 147, 172, 8, 124, 138, 165, 60, 124, 139, 167, 155, 131, 147, 177, 255, 131, 147, 176, 153, + 64, 68, 73, 2, 36, 39, 45, 86, 41, 46, 54, 173, 60, 67, 80, 232, 75, 84, 101, 251, 89, 100, 120, 228, 105, 118, 142, 250, 110, 123, 148, 187, 118, 132, 158, 187, 126, 141, 169, 229, 134, 149, 177, 239, 136, 152, 179, 250, 136, 152, 181, 234, 139, 156, 186, 175, 130, 145, 173, 90, 124, 134, 151, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 74, 79, 19, 60, 64, 73, 50, 92, 103, 124, 254, 86, 95, 111, 84, 90, 100, 117, 76, 126, 141, 168, 201, 113, 126, 150, 119, 99, 105, 117, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 105, 125, 231, 135, 151, 181, 46, 0, 0, 0, 0, 137, 154, 184, 212, 123, 137, 164, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 83, 98, 191, 133, 149, 179, 102, 111, 121, 139, 17, 134, 150, 180, 252, 126, 140, 166, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 48, 57, 132, 121, 136, 164, 197, 121, 135, 161, 115, 130, 146, 175, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 47, 52, 46, 87, 98, 118, 254, 126, 142, 170, 254, 124, 139, 166, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 57, 67, 118, 115, 128, 152, 170, 127, 140, 164, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +static unsigned char img_bits1[] = +{ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1 +,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1 +,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1 +,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1 +,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1 +,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1 +,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1 +,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1 +,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +,2,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +,2,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +,2,2,2,0,2,0,2,0,2,2,0,2,2,2,0,0,0,2,2,2,0,0,2,0,2,2,0,0,0,2,2,2 +,2,2,2,0,2,0,0,2,0,0,2,0,2,0,2,2,2,0,2,0,2,2,0,0,2,0,2,2,2,0,2,2 +,2,2,2,0,2,0,2,2,0,2,2,0,2,2,2,2,2,0,2,0,2,2,2,0,2,0,2,2,2,0,2,2 +,2,2,2,0,2,0,2,2,0,2,2,0,2,2,0,0,0,0,2,0,2,2,2,0,2,0,0,0,0,0,2,2 +,2,2,2,0,2,0,2,2,0,2,2,0,2,0,2,2,2,0,2,0,2,2,2,0,2,0,2,2,2,2,2,2 +,2,2,2,0,2,0,2,2,0,2,2,0,2,0,2,2,2,0,2,0,2,2,0,0,2,0,2,2,2,0,2,2 +,2,2,2,0,2,0,2,2,0,2,2,0,2,2,0,0,0,0,2,2,0,0,2,0,2,2,0,0,0,2,2,2 +,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2 +,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,0,2,2,2,2,2,2,2,2 +,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,2,2,2,2,2,2,2,2,2 +,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1 +,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +}; + +static unsigned char img_bits2[] = +{ + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2 +,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2 +,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2 +,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2 +,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2 +,2,2,2,2,2,2,2,2,2,2,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2 +,2,2,2,2,2,2,2,2,2,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2 +,2,2,2,2,2,2,2,2,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2 +,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 +,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 +,3,3,3,0,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 +,3,3,3,0,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 +,3,3,3,0,3,0,3,0,3,3,0,3,3,3,1,1,0,3,3,3,0,0,3,0,3,3,0,0,0,3,3,3 +,3,3,3,0,3,0,0,3,0,0,3,0,3,0,1,1,3,0,3,0,3,3,0,0,3,0,3,3,3,0,3,3 +,3,3,3,0,3,0,3,3,0,3,3,0,3,3,1,1,3,0,3,0,3,3,3,0,3,0,3,3,3,0,3,3 +,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +,3,3,3,0,3,0,3,3,0,3,3,0,3,0,1,1,3,0,3,0,3,3,0,0,3,0,3,3,3,0,3,3 +,3,3,3,0,3,0,3,3,0,3,3,0,3,3,1,1,0,0,3,3,0,0,3,0,3,3,0,0,0,3,3,3 +,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,0,3,3,3,3,3,3,3,3 +,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,0,3,3,3,0,3,3,3,3,3,3,3,3 +,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,0,0,0,3,3,3,3,3,3,3,3,3 +,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 +,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 +,2,2,2,2,2,2,2,3,3,3,3,3,3,3,1,1,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2 +,2,2,2,2,2,2,3,3,3,3,3,3,3,3,1,1,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2 +,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2 +,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +}; + +static int valuechanged_cb(Ihandle *ih) +{ + printf("VALUECHANGED_CB(%s)=%s\n", IupGetClassName(ih), IupGetAttribute(ih, "VALUE")); + return IUP_DEFAULT; +} + +static int getfocus_cb(Ihandle *ih) +{ + printf("GETFOCUS_CB(%s)\n", IupGetClassName(ih)); + return IUP_DEFAULT; +} + +static int killfocus_cb(Ihandle *ih) +{ + printf("KILLFOCUS_CB(%s)\n", IupGetClassName(ih)); + return IUP_DEFAULT; +} + +static int leavewindow_cb(Ihandle *ih) +{ + printf("LEAVEWINDOW_CB(%s)\n", IupGetClassName(ih)); + return IUP_DEFAULT; +} + +static int enterwindow_cb(Ihandle *ih) +{ + printf("ENTERWINDOW_CB(%s)\n", IupGetClassName(ih)); + return IUP_DEFAULT; +} + +char *iupKeyCodeToName(int code); + +static int k_any(Ihandle *ih, int c) +{ + if (iup_isprint(c)) + printf("K_ANY(%s, %d = %s \'%c\')\n", IupGetClassName(ih), c, iupKeyCodeToName(c), (char)c); + else + printf("K_ANY(%s, %d = %s)\n", IupGetClassName(ih), c, iupKeyCodeToName(c)); + return IUP_CONTINUE; +} + +static int help_cb(Ihandle* ih) +{ + printf("HELP_CB(%s)\n", IupGetClassName(ih)); + return IUP_DEFAULT; +} + +static Ihandle* set_callbacks(Ihandle* ih) +{ + IupSetCallback(ih, "VALUECHANGED_CB", (Icallback)valuechanged_cb); + +// IupSetCallback(ih, "GETFOCUS_CB", (Icallback)getfocus_cb); +// IupSetCallback(ih, "KILLFOCUS_CB", (Icallback)killfocus_cb); + +// IupSetCallback(ih, "ENTERWINDOW_CB", (Icallback)enterwindow_cb); +// IupSetCallback(ih, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb); + +// IupSetCallback(ih, "K_ANY", (Icallback)k_any); +// IupSetCallback(ih, "HELP_CB", (Icallback)help_cb); + + return ih; +} + +void SampleTest(void) +{ + Ihandle *mnu, *_hbox_1, *_cnv_1, *_vbox_1, *dlg, *img, + *_frm_1, *_frm_2, *_frm_3, *_frm_4, *_frm_5, *pbar, *val, *tabs, + *_list_1, *_list_2, *_list_3, *_text_1, *_ml_1, *tree; + + //img = IupImage(32,32, img_bits1); + //IupSetHandle ("img1", img); + //IupSetAttribute (img, "0", "0 0 0"); + //IupSetAttribute (img, "1", "BGCOLOR"); + //IupSetAttribute (img, "2", "255 0 0"); + + img = load_image_Tecgraf(); + IupSetHandle ("img1", img); + + img = IupImage(32,32, img_bits2); + IupSetHandle ("img2", img); + IupSetAttribute (img, "0", "0 0 0"); + IupSetAttribute (img, "1", "0 255 0"); + IupSetAttribute (img, "2", "BGCOLOR"); + IupSetAttribute (img, "3", "255 0 0"); + + mnu = IupMenu( + IupSubmenu("IupSubmenu 1", IupMenu( + IupSetAttributes(IupItem("IupItem 1 Checked", NULL), "VALUE=ON"), + IupSeparator(), + IupSetAttributes(IupItem("IupItem 2 Disabled", NULL), "ACTIVE=NO"), + NULL)), + IupItem("IupItem 3", NULL), + IupItem("IupItem 4", NULL), + NULL); + IupSetHandle("mnu",mnu); + + _frm_1 = IupFrame( + IupVbox( + set_callbacks(IupSetAttributes(IupButton("Button Text", NULL), "PADDING=5x5")), + set_callbacks(IupSetAttributes(IupButton("Text", NULL), "IMAGE=img1, PADDING=5x5")), + set_callbacks(IupSetAttributes(IupButton(NULL, NULL), "IMAGE=img1")), + set_callbacks(IupSetAttributes(IupButton("", NULL), "IMAGE=img1,IMPRESS=img2")), + NULL)); + IupSetAttribute(_frm_1,"TITLE","IupButton"); + + _frm_2 = IupFrame( + IupVbox( + IupLabel("Label Text"), + IupSetAttributes(IupLabel(NULL), "SEPARATOR=HORIZONTAL, MAXSIZE=150, NAME=SAMP_SEP"), + IupSetAttributes(IupLabel(NULL), "IMAGE=img1"), + NULL)); + IupSetAttribute(_frm_2,"TITLE","IupLabel"); + + _frm_3 = IupFrame( + IupVbox( + set_callbacks(IupSetAttributes(IupToggle("Toggle Text", NULL), "VALUE=ON")), + set_callbacks(IupSetAttributes(IupToggle(NULL, NULL), "VALUE=ON,IMAGE=img1,IMPRESS=img2")), + set_callbacks(IupSetAttributes(IupToggle(NULL, NULL), "VALUE=ON,IMAGE=img1")), + IupSetAttributes(IupFrame(IupRadio(IupVbox( + set_callbacks(IupToggle("Toggle Text", NULL)), + set_callbacks(IupToggle("Toggle Text", NULL)), + NULL))), "TITLE=IupRadio"), + NULL)); + IupSetAttribute(_frm_3,"TITLE","IupToggle"); + + _text_1 = IupText( NULL); + IupSetAttribute(_text_1,"VALUE","Single Line Text"); + IupSetAttribute(_text_1,"SIZE","80x"); + + _ml_1 = IupMultiLine( NULL); + IupSetAttribute(_ml_1,"VALUE","Multiline Text\nSecond Line\nThird Line"); + IupSetAttribute(_ml_1,"EXPAND","YES"); + IupSetAttribute(_ml_1,"SIZE","80x40"); + + _frm_4 = IupFrame(IupVbox( + set_callbacks(_text_1), + set_callbacks(_ml_1), + NULL)); + IupSetAttribute(_frm_4,"TITLE","IupText"); + + _list_1 = IupList( NULL); +// IupSetAttribute(_list_1,"EXPAND","YES"); + IupSetAttribute(_list_1,"VALUE","1"); + IupSetAttribute(_list_1,"1","Item 1 Text"); + IupSetAttribute(_list_1,"2","Item 2 Text"); + IupSetAttribute(_list_1,"3","Item 3 Text"); + + _list_2 = IupList( NULL); + IupSetAttribute(_list_2,"DROPDOWN","YES"); +// IupSetAttribute(_list_2,"EXPAND","YES"); + IupSetAttribute(_list_2,"VALUE","2"); + IupSetAttribute(_list_2,"1","Item 1 Text"); + IupSetAttribute(_list_2,"2","Item 2 Text"); + IupSetAttribute(_list_2,"3","Item 3 Text"); + + _list_3 = IupList( NULL); + IupSetAttribute(_list_3,"EDITBOX","YES"); +// IupSetAttribute(_list_3,"EXPAND","YES"); + IupSetAttribute(_list_3,"VALUE","3"); + IupSetAttribute(_list_3,"1","Item 1 Text"); + IupSetAttribute(_list_3,"2","Item 2 Text"); + IupSetAttribute(_list_3,"3","Item 3 Text"); + + _frm_5 = IupFrame(IupVbox( + set_callbacks(_list_1), + set_callbacks(_list_2), + set_callbacks(_list_3), + NULL)); + IupSetAttribute(_frm_5,"TITLE","IupList"); + + _hbox_1 = IupHbox( + _frm_1, + _frm_2, + _frm_3, + _frm_4, + _frm_5, + NULL); + + val = IupVal(NULL); + set_callbacks(val); + + pbar = IupProgressBar(); + IupSetAttribute(pbar, "VALUE", "0.5"); + set_callbacks(pbar); + + tabs = IupTabs(IupVbox(NULL), IupVbox(NULL), IupVbox(NULL), NULL); + IupSetAttribute(tabs,"TABTITLE0","Tab Title 0"); + IupSetAttribute(tabs,"TABTITLE1","Tab Title 1"); + IupSetAttributeHandle(tabs,"TABIMAGE1", load_image_LogoTecgraf()); + IupSetAttribute(tabs,"TABTITLE2","Tab Title 2"); + IupSetAttribute(tabs,"RASTERSIZE","300x50"); +// IupSetAttribute(tabs,"PADDING","5x5"); + set_callbacks(tabs); + + tree = IupTree(); + IupSetAttribute(tree, "SHOWRENAME", "YES"); + IupSetAttribute(tree,"RASTERSIZE","100x150"); + set_callbacks(tree); + + _cnv_1 = IupCanvas(NULL); + IupSetAttribute(_cnv_1,"BGCOLOR","128 255 0"); + IupSetAttribute(_cnv_1,"SCROLLBAR","YES"); + IupSetAttribute(_cnv_1,"EXPAND","HORIZONTAL"); + IupSetAttribute(_cnv_1,"RASTERSIZE","x100"); +// IupSetAttribute(_cnv_1,"CANFOCUS","NO"); + set_callbacks(_cnv_1); + + _vbox_1 = IupVbox( + _hbox_1, + IupHbox(IupSetAttributes(IupFrame(IupHbox(val, NULL)), "TITLE=IupVal"), + IupSetAttributes(IupFrame(IupHbox(pbar, NULL)), "TITLE=IupProgressBar"), + IupSetAttributes(IupFrame(IupHbox(tabs, NULL)), "TITLE=IupTabs"), + NULL), + IupHbox(IupSetAttributes(IupFrame(IupHbox(_cnv_1, NULL)), "TITLE=IupCanvas"), + IupSetAttributes(IupFrame(IupHbox(tree, NULL)), "TITLE=IupTree"), + NULL), + NULL); + IupSetAttribute(_vbox_1,"MARGIN","5x5"); + IupSetAttribute(_vbox_1,"GAP","5"); + + dlg = IupDialog(_vbox_1); + IupSetHandle("dlg",dlg); + IupSetAttribute(dlg,"MENU","mnu"); + IupSetAttribute(dlg,"TITLE","IupDialog Title"); +// IupSetAttribute(dlg,"COMPOSITED","YES"); /* Windows Only */ +// IupSetAttribute(dlg, "OPACITY", "192"); + +// IupSetAttribute(dlg, "BGCOLOR", "173 177 194"); // Motif BGCOLOR for documentation +// IupSetAttribute(_vbox_1, "BGCOLOR", "92 92 255"); +// IupSetAttribute(dlg, "BGCOLOR", "92 92 255"); +// IupSetAttribute(dlg, "BACKGROUND", "200 10 80"); + + //IupSetGlobal("DLGBGCOLOR", "92 92 255"); + //IupSetGlobal("TXTFGCOLOR", "255 92 92"); + //IupSetGlobal("TXTBGCOLOR", "92 92 255"); + +// IupSetAttribute(dlg, "FONT", "Helvetica, 24"); +// IupSetAttribute(dlg, "FONT", "-*-helvetica-*-r-*-*-18-*-*-*-*-*-*-*"); + +// IupSetAttribute(box, "FGCOLOR", "255 0 0"); + + IupMap(dlg); + + IupSetAttribute(tree, "TITLE0", "Figures"); + IupSetAttribute(tree, "ADDLEAF0", "Other"); /* new id=1 */ + IupSetAttribute(tree, "ADDBRANCH1", "triangle"); /* new id=2 */ + IupSetAttribute(tree, "ADDLEAF2", "equilateral"); /* ... */ + IupSetAttribute(tree, "ADDLEAF3", "isoceles"); + IupSetAttribute(tree, "ADDLEAF4", "scalenus"); + + IupShow(dlg); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + SampleTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/sbox.c b/iup/test/sbox.c new file mode 100755 index 0000000..13b5582 --- /dev/null +++ b/iup/test/sbox.c @@ -0,0 +1,46 @@ +#include +#include +#include "iup.h" + +void SboxTest(void) +{ + Ihandle *dlg, *bt, *box, *lbl, *ml, *vbox; + + bt = IupButton("Button", NULL); + //IupSetAttribute(bt, "EXPAND", "VERTICAL"); /* This is the only necessary EXPAND */ + IupSetAttribute(bt, "EXPAND", "YES"); + + box = IupSbox(bt); + IupSetAttribute(box, "DIRECTION", "SOUTH"); /* place at the bottom of the button */ +// IupSetAttribute(box, "COLOR", "0 255 0"); + + ml = IupMultiLine(NULL); + IupSetAttribute(ml, "EXPAND", "YES"); + IupSetAttribute(ml, "VISIBLELINES", "5"); + vbox = IupVbox(box, ml, NULL); + + lbl = IupLabel("Label"); + IupSetAttribute(lbl, "EXPAND", "VERTICAL"); + + dlg = IupDialog(IupHbox(vbox, lbl, NULL)); + IupSetAttribute(dlg, "TITLE", "IupSbox Example"); + IupSetAttribute(dlg, "MARGIN", "10x10"); + IupSetAttribute(dlg, "GAP", "10"); + + IupShow(dlg); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + SboxTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/scanf.c b/iup/test/scanf.c new file mode 100755 index 0000000..2ea7663 --- /dev/null +++ b/iup/test/scanf.c @@ -0,0 +1,39 @@ +#include +#include +#include "iup.h" + +void ScanfTest(void) +{ + int ret; + int integer = 12; + float real = 1e-3f; + char text[300]="This is a vector of characters"; + char *fmt = + { + "IupScanf Example\n" + "Text: %300.5%s\n" + "Real: %20.10%g\n" + "Integer: %20.10%d\n" + }; + +// IupSetLanguage("ENGLISH"); + + ret = IupScanf(fmt, text, &real, &integer); + if (ret == -1) + IupMessage("IupScanf","Operation canceled"); + else + IupMessagef("IupScanf","Text: %s\nReal: %f\nInteger: %d\nFields read successfully: %d",text,real,integer,ret); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + ScanfTest(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/spin.c b/iup/test/spin.c new file mode 100755 index 0000000..63a3bbc --- /dev/null +++ b/iup/test/spin.c @@ -0,0 +1,43 @@ +#include +#include + +#include "iup.h" + + +static int spin_cb(Ihandle* ih, int inc) +{ + (void)ih; + /* does nothing, just print the call */ + printf("SPIN_CB(%d)\n", inc); + return IUP_DEFAULT; +} + +void SpinTest(void) +{ + Ihandle *dlg, *spinbox; + + spinbox = IupSpinbox(IupSetAttributes(IupText(NULL), "SIZE=50x")); + + IupSetCallback(spinbox, "SPIN_CB", (Icallback)spin_cb); + + dlg = IupDialog(IupVbox(spinbox, NULL)); + IupSetAttribute(dlg, "MARGIN", "10x10"); + + IupSetAttribute(dlg, "TITLE", "IupSpin Test"); + IupShow(dlg); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + SpinTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/sysinfo.c b/iup/test/sysinfo.c new file mode 100755 index 0000000..2f0d9c0 --- /dev/null +++ b/iup/test/sysinfo.c @@ -0,0 +1,60 @@ +#include +#include +#include "iup.h" + +void SysInfoTest(void) +{ + char* sysver; + int motif = 0; + + printf("IUP System Info:\n"); + printf(" Version: %s\n", IupVersion()); + printf(" Copyright: %s\n", IUP_COPYRIGHT); + printf(" Driver: %s\n", IupGetGlobal("DRIVER")); + printf(" System: %s\n", IupGetGlobal("SYSTEM")); + printf(" System Version: %s\n\n", IupGetGlobal("SYSTEMVERSION")); + printf(" System Language: %s\n\n", IupGetGlobal("SYSTEMLANGUAGE")); + + sysver = IupGetGlobal("MOTIFVERSION"); + if (sysver) + { + printf(" Motif Version: %s\n", sysver); + printf(" Motif Number: %s\n", IupGetGlobal("MOTIFNUMBER")); + printf(" X Server Vendor: %s\n", IupGetGlobal("XSERVERVENDOR")); + printf(" X Vendor Release: %s\n\n", IupGetGlobal("XVENDORRELEASE")); + motif = 1; + } + + sysver = IupGetGlobal("GTKVERSION"); + if (sysver) + printf(" GTK Version: %s\n", sysver); + + printf(" Screen Depth: %s\n", IupGetGlobal("SCREENDEPTH")); + printf(" Screen Size: %s\n", IupGetGlobal("SCREENSIZE")); + printf(" Full Screen Size: %s\n", IupGetGlobal("FULLSIZE")); + printf(" True Color Canvas: %s\n\n", IupGetGlobal("TRUECOLORCANVAS")); + + if (!motif) + { + printf(" Virtual Screen: %s\n", IupGetGlobal("VIRTUALSCREEN")); + printf(" Monitors Info: %s\n", IupGetGlobal("MONITORSINFO")); + } + + printf(" Computer Name: %s\n", IupGetGlobal("COMPUTERNAME")); + printf(" User Name: %s\n", IupGetGlobal("USERNAME")); + printf(" Default Font: %s\n", IupGetGlobal("DEFAULTFONT")); +} + + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + SysInfoTest(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/tabs.c b/iup/test/tabs.c new file mode 100755 index 0000000..a069f01 --- /dev/null +++ b/iup/test/tabs.c @@ -0,0 +1,403 @@ +#include +#include + +#include "iup.h" +#include "iupkey.h" + +static Ihandle* load_image_LogoTecgraf(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 120, 143, 125, 132, 148, 178, 173, 133, 149, 178, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 110, 130, 48, 130, 147, 177, 254, 124, 139, 167, 254, 131, 147, 176, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 128, 153, 134, 142, 159, 191, 194, 47, 52, 61, 110, 114, 128, 154, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 143, 172, 192, 140, 156, 188, 99, 65, 69, 76, 16, 97, 109, 131, 251, 129, 144, 172, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 147, 175, 232, 140, 157, 188, 43, 0, 0, 0, 0, 100, 112, 134, 211, 126, 141, 169, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 78, 88, 26, 48, 52, 57, 60, 135, 150, 178, 254, 108, 121, 145, 83, 105, 118, 142, 76, 106, 119, 143, 201, 118, 133, 159, 122, 117, 129, 152, 25, 168, 176, 190, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 118, 128, 145, 3, 104, 117, 140, 92, 114, 127, 152, 180, 131, 147, 177, 237, 133, 149, 178, 249, 38, 42, 50, 222, 137, 152, 180, 249, 126, 142, 170, 182, 114, 128, 154, 182, 104, 117, 140, 227, 95, 107, 128, 238, 83, 93, 112, 248, 84, 95, 113, 239, 104, 117, 141, 180, 115, 129, 155, 93, 127, 140, 165, 4, + 98, 109, 130, 153, 109, 123, 147, 254, 145, 163, 195, 153, 138, 154, 182, 56, 115, 123, 138, 5, 92, 99, 109, 35, 134, 149, 177, 230, 0, 0, 0, 0, 0, 0, 0, 0, 120, 133, 159, 143, 135, 151, 181, 115, 86, 89, 93, 5, 41, 45, 51, 54, 40, 45, 53, 150, 107, 120, 144, 254, 122, 137, 164, 154, + 51, 57, 66, 147, 83, 93, 112, 255, 108, 121, 145, 159, 113, 126, 151, 62, 123, 136, 159, 8, 87, 93, 103, 35, 125, 141, 169, 230, 0, 0, 0, 0, 0, 0, 0, 0, 129, 143, 169, 143, 140, 156, 184, 115, 134, 147, 172, 8, 124, 138, 165, 60, 124, 139, 167, 155, 131, 147, 177, 255, 131, 147, 176, 153, + 64, 68, 73, 2, 36, 39, 45, 86, 41, 46, 54, 173, 60, 67, 80, 232, 75, 84, 101, 251, 89, 100, 120, 228, 105, 118, 142, 250, 110, 123, 148, 187, 118, 132, 158, 187, 126, 141, 169, 229, 134, 149, 177, 239, 136, 152, 179, 250, 136, 152, 181, 234, 139, 156, 186, 175, 130, 145, 173, 90, 124, 134, 151, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 74, 79, 19, 60, 64, 73, 50, 92, 103, 124, 254, 86, 95, 111, 84, 90, 100, 117, 76, 126, 141, 168, 201, 113, 126, 150, 119, 99, 105, 117, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 105, 125, 231, 135, 151, 181, 46, 0, 0, 0, 0, 137, 154, 184, 212, 123, 137, 164, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 83, 98, 191, 133, 149, 179, 102, 111, 121, 139, 17, 134, 150, 180, 252, 126, 140, 166, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 48, 57, 132, 121, 136, 164, 197, 121, 135, 161, 115, 130, 146, 175, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 47, 52, 46, 87, 98, 118, 254, 126, 142, 170, 254, 124, 139, 166, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 57, 67, 118, 115, 128, 152, 170, 127, 140, 164, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +#define TEST_IMAGE_SIZE 16 + +static Ihandle* load_image_TestImage(void) +{ + unsigned char image_data_8 [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE] = + { + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,1,1,1,1,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,2,2,2,2,0,0,0,5, + 5,0,0,0,3,3,3,3,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,4,4,4,4,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + }; + + Ihandle* image = IupImage(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_8); + IupSetAttribute(image, "0", "BGCOLOR"); + IupSetAttribute(image, "1", "255 0 0"); + IupSetAttribute(image, "2", "0 255 0"); + IupSetAttribute(image, "3", "0 0 255"); + IupSetAttribute(image, "4", "255 255 255"); + IupSetAttribute(image, "5", "0 0 0"); + + return image; +} + +static int cbChildButton(Ihandle* ih) +{ + printf("button(%s)\n", IupGetAttribute(ih, "TITLE")); + return IUP_DEFAULT; +} + +static int cbValuePos(Ihandle* ih) +{ + Ihandle* tabs = (Ihandle*)IupGetAttribute(ih, "APP_TABS"); + IupSetAttribute(tabs, "VALUEPOS", "0"); +// printf("VALUE=%s\n", IupGetAttribute(tabs, "VALUE")); + return IUP_DEFAULT; +} + +static int cbType(Ihandle* ih, int v) +{ + if (v) + { + char* title = IupGetAttribute(ih, "TITLE"); + Ihandle* tabs = (Ihandle*)IupGetAttribute(ih, "APP_TABS"); + + switch(*title) + { + case 'L': + IupSetAttribute(tabs, "TABTYPE", "LEFT"); + break; + case 'R': + IupSetAttribute(tabs, "TABTYPE", "RIGHT"); + break; + case 'T': + IupSetAttribute(tabs, "TABTYPE", "TOP"); + break; + case 'B': + IupSetAttribute(tabs, "TABTYPE", "BOTTOM"); + break; + } + + IupSetAttribute(tabs, "UPDATE", NULL); + IupRefresh(tabs); /* update children layout */ + } + return IUP_DEFAULT; +} + +static int cbOrientation(Ihandle* ih, int v) +{ + if (v) + { + char* title = IupGetAttribute(ih, "TITLE"); + Ihandle* tabs = (Ihandle*)IupGetAttribute(ih, "APP_TABS"); + + switch(*title) + { + case 'H': + IupSetAttribute(tabs, "TABORIENTATION", "HORIZONTAL"); + break; + case 'V': + IupSetAttribute(tabs, "TABORIENTATION", "VERTICAL"); + break; + } + + IupSetAttribute(tabs, "UPDATE", NULL); + IupRefresh(tabs); /* update children layout */ + } + return IUP_DEFAULT; +} + +static int cbAddTab(Ihandle* ih) +{ + Ihandle* tabs = (Ihandle*)IupGetAttribute(ih, "APP_TABS"); + Ihandle *vbox; + + vbox = IupFrame(IupVbox(IupLabel("Label XXX"), IupButton("Button XXX", "cbChildButton"), NULL)); + IupSetAttribute(vbox, "TABTITLE", "XXX"); + IupSetAttribute(vbox, "TITLE", "TABS XXX"); + + IupAppend(tabs, vbox); + IupMap(vbox); + + IupSetAttribute(tabs, "UPDATE", NULL); + IupRefresh(tabs); /* update children layout */ + + return IUP_DEFAULT; +} + +static int cbInsertTab(Ihandle* ih) +{ + Ihandle* tabs = (Ihandle*)IupGetAttribute(ih, "APP_TABS"); + Ihandle* ref_vbox = IupGetHandle(IupGetAttribute(tabs, "VALUE")); + Ihandle *vbox; + + vbox = IupFrame(IupVbox(IupLabel("Label YYY"), IupButton("Button YYY", "cbChildButton"), NULL)); + IupSetAttribute(vbox, "TABTITLE", "YYY"); + IupSetAttribute(vbox, "TITLE", "TABS YYY"); + + IupInsert(tabs, ref_vbox, vbox); + IupMap(vbox); + + IupSetAttribute(tabs, "UPDATE", NULL); + IupRefresh(tabs); /* update children layout */ + + return IUP_DEFAULT; +} + +static int cbRemoveTab(Ihandle* ih) +{ + Ihandle* tabs = (Ihandle*)IupGetAttribute(ih, "APP_TABS"); + Ihandle* vbox = IupGetHandle(IupGetAttribute(tabs, "VALUE")); + + IupDestroy(vbox); + + IupSetAttribute(tabs, "UPDATE", NULL); + IupRefresh(tabs); /* update children layout */ + + return IUP_DEFAULT; +} + +static int cbTabChange(Ihandle* ih, Ihandle* new_tab, Ihandle* old_tab) +{ + printf("new Tab: %s, old Tab: %s\n", IupGetAttribute(new_tab, "TABTITLE"), IupGetAttribute(old_tab, "TABTITLE")); + return IUP_DEFAULT; +} + +static int cbInactive(Ihandle *ih, int state) +{ + Ihandle* tabs = (Ihandle*)IupGetAttribute(ih, "APP_TABS"); + IupSetAttribute(tabs, "ACTIVE", state? "NO": "YES"); + IupSetAttribute(tabs, "UPDATE", NULL); + return IUP_DEFAULT; +} + +char *iupKeyCodeToName(int code); + +static int k_any(Ihandle *ih, int c) +{ + if (iup_isprint(c)) + printf("K_ANY(%d = %s \'%c\')\n", c, iupKeyCodeToName(c), (char)c); + else + printf("K_ANY(%d = %s)\n", c, iupKeyCodeToName(c)); + printf(" MODKEYSTATE(%s)\n", IupGetGlobal("MODKEYSTATE")); + return IUP_DEFAULT; +} + +static int getfocus_cb(Ihandle *ih) +{ + printf("GETFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int help_cb(Ihandle* ih) +{ + printf("HELP_CB()\n"); + return IUP_DEFAULT; +} + +static int killfocus_cb(Ihandle *ih) +{ + printf("KILLFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int leavewindow_cb(Ihandle *ih) +{ + printf("LEAVEWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +static int enterwindow_cb(Ihandle *ih) +{ + printf("ENTERWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +//#define IupFrame(_x) (_x) + +static Ihandle* CreateTabs(int tab) +{ + Ihandle *vboxA, *vboxB, *vboxG, + *vboxC, *vboxD,*vboxE, *vboxF, *vboxH, *vboxI, + *tabs; + +// if (tab) // to test Tabs inside Tabs + // vboxA = IupVbox(CreateTabs(0), NULL); +// else + vboxA = IupFrame(IupVbox(IupFill(), IupLabel("Label AAA"), IupButton("Button AAA", "cbChildButton"), //NULL)); + IupText(NULL), IupToggle("Button TTTT", "cbChildButton"), + IupVal(NULL), IupSetAttributes(IupProgressBar(), "VALUE=0.5"), NULL)); + vboxB = IupFrame(IupVbox(IupLabel("Label BBB"), IupButton("Button BBB", "cbChildButton"), NULL)); + vboxC = IupFrame(IupVbox(IupLabel("Label CCC"), IupButton("Button CCC", "cbChildButton"), NULL)); + vboxD = IupFrame(IupVbox(IupLabel("Label DDD"), IupButton("Button DDD", "cbChildButton"), NULL)); + vboxE = IupVbox(IupFill(), IupLabel("Label EEE"), IupButton("Button EEE", "cbChildButton"), + IupButton("Button EEE", "cbChildButton"), IupButton("Button EEE", "cbChildButton"), NULL); + vboxF = IupVbox(IupLabel("Label FFF"), IupButton("Button FFF", "cbChildButton"), NULL); + vboxG = IupVbox(IupLabel("Label GGG"), IupButton("Button GGG", "cbChildButton"), NULL); + vboxH = IupVbox(IupLabel("Label HHH"), IupButton("Button HHH", "cbChildButton"), NULL); + vboxI = IupVbox(IupLabel("Canvas"), IupCanvas(NULL), NULL); + + IupSetAttribute(vboxA, "TABTITLE", "A"); + IupSetAttributeHandle(vboxA, "TABIMAGE", load_image_LogoTecgraf()); + IupSetAttribute(vboxB, "TABTITLE", "BB"); +// IupSetAttribute(vboxC, "TABTITLE", "CCC"); + IupStoreAttribute(vboxC, "TABIMAGE", IupGetAttribute(vboxA, "TABIMAGE")); + IupSetAttribute(vboxD, "TABTITLE", "DDDD"); + IupSetAttribute(vboxE, "TABTITLE", "EEEEE"); + IupSetAttribute(vboxF, "TABTITLE", "FFFFFF"); + IupSetAttribute(vboxG, "TABTITLE", "GGGGGGG"); + IupSetAttribute(vboxH, "TABTITLE", "HHHHHHHH"); + IupSetAttribute(vboxI, "TABTITLE", "Canvas"); + IupSetAttribute(vboxA, "TITLE", "TABS A"); + IupSetAttribute(vboxB, "TITLE", "TABS BB"); + IupSetAttribute(vboxC, "TITLE", "TABS CCC"); + IupSetAttribute(vboxC, "ACTIVE", "NO"); + IupSetAttribute(vboxF, "TABSIZE", "100"); + IupSetAttribute(vboxI, "BGCOLOR", "32 192 32"); + + tabs = IupTabs(vboxA, vboxB, vboxC, vboxD, vboxE, vboxF, vboxG, vboxH, vboxI, NULL); + + IupSetCallback(tabs, "TABCHANGE_CB", (Icallback)cbTabChange); + + //IupSetAttributeHandle(tabs, "TABIMAGE1", load_image_LogoTecgraf()); + IupSetAttributeHandle(tabs, "TABIMAGE1", load_image_TestImage()); + + + // In Windows, must be set before map +// IupSetAttribute(tabs, "TABTYPE", "LEFT"); +// IupSetAttribute(tabs, "TABTYPE", "RIGHT"); +// IupSetAttribute(tabs, "TABTYPE", "BOTTOM"); +// IupSetAttribute(tabs, "TABORIENTATION", "VERTICAL"); +// IupSetAttribute(tabs, "MULTILINE", "YES"); + + IupSetAttribute(tabs, "MARGIN", "0x0"); /* for children */ +// IupSetAttribute(tabs, "EXPAND", "YES"); + IupSetAttribute(tabs, "RASTERSIZE", "300x200"); /* initial size */ +// IupSetAttribute(tabs, "ALIGNMENT", "NW"); +// IupSetAttribute(tabs, "ALIGNMENT", "NORTH"); +// IupSetAttribute(tabs, "ALIGNMENT", "WEST"); +// IupSetAttribute(tabs, "ALIGNMENT", "EAST"); +// IupSetAttribute(tabs, "ALIGNMENT", "SOUTH"); +// IupSetAttribute(tabs, "ALIGNMENT", "SE"); + +// IupSetAttribute(tabs, "BACKGROUND", "10 150 200"); +// IupSetAttribute(tabs, "BGCOLOR", "92 92 255"); +// IupSetAttribute(tabs, "FGCOLOR", "250 0 0"); +// IupSetAttribute(tabs, "FONT", "Helvetica, Italic 16"); + + IupSetAttribute(tabs, "TIP", "IupTabs Tip"); +// IupSetAttribute(tabs, "TIPFONT", "SYSTEM"); +// IupSetAttribute(tabs, "TIPBGCOLOR", "255 128 128"); +// IupSetAttribute(tabs, "TIPFGCOLOR", "0 92 255"); + + // Windows Only + //IupSetAttribute(tabs, "TIPBALLON", "YES"); + //IupSetAttribute(tabs, "TIPBALLONTITLE", "Tip Title"); + //IupSetAttribute(tabs, "TIPBALLONTITLEICON", "2"); + //IupSetAttribute(tabs, "TIPDELAY", "5000"); + + //IupSetCallback(tabs, "K_ANY", (Icallback)k_any); + //IupSetCallback(tabs, "HELP_CB", (Icallback)help_cb); + + //IupSetCallback(tabs, "GETFOCUS_CB", (Icallback)getfocus_cb); + //IupSetCallback(tabs, "KILLFOCUS_CB", (Icallback)killfocus_cb); + //IupSetCallback(tabs, "ENTERWINDOW_CB", (Icallback)enterwindow_cb); + //IupSetCallback(tabs, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb); + + return tabs; +} + +void TabsTest(void) +{ + Ihandle *box, *frm1, *frm2, *dlg, *tabs; + + tabs = CreateTabs(1); + + box = IupHbox(tabs, + frm1 = IupFrame(IupRadio(IupVbox(IupToggle("TOP", "cbType"), + IupToggle("LEFT", "cbType"), + IupToggle("BOTTOM", "cbType"), + IupToggle("RIGHT", "cbType"), + NULL))), + frm2 = IupFrame(IupRadio(IupVbox(IupToggle("HORIZONTAL", "cbOrientation"), + IupToggle("VERTICAL", "cbOrientation"), + NULL))), + IupVbox(IupSetAttributes(IupButton("Add Tab", "cbAddTab"), "TIP=\"Button Tip\""), + IupButton("Insert Tab", "cbInsertTab"), + IupButton("Remove Tab", "cbRemoveTab"), + IupToggle("Inactive", "cbInactive"), + IupButton("VALUEPOS=0", "cbValuePos"), + NULL), + NULL); + + IupSetAttribute(frm1, "MARGIN", "5x5"); + IupSetAttribute(frm2, "MARGIN", "5x5"); + IupSetAttribute(frm1, "GAP", "0"); + IupSetAttribute(frm2, "GAP", "0"); + IupSetAttribute(frm1, "TITLE", "Type"); + IupSetAttribute(frm2, "TITLE", "Orientation"); + + IupSetAttribute(box, "MARGIN", "10x10"); + IupSetAttribute(box, "GAP", "10"); + dlg = IupDialog(box); + + IupSetAttribute(dlg, "TITLE", "IupTabs Test"); + IupSetAttribute(dlg, "APP_TABS", (char*)tabs); +// IupSetAttribute(box, "BGCOLOR", "92 92 255"); +// IupSetAttribute(dlg, "BGCOLOR", "92 92 255"); +// IupSetAttribute(dlg, "BACKGROUND", "200 10 80"); +// IupSetAttributeHandle(dlg, "BACKGROUND", load_image_LogoTecgraf()); +// IupSetAttribute(dlg, "FGCOLOR", "10 200 80"); +// IupSetAttribute(dlg, "BGCOLOR", "173 177 194"); // Motif BGCOLOR for documentation +// IupSetAttribute(dlg,"COMPOSITED","NO"); + + IupMap(dlg); + IupSetAttribute(dlg, "SIZE", NULL); + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); + + IupSetFunction("cbOrientation", (Icallback)cbOrientation); + IupSetFunction("cbType", (Icallback)cbType); + IupSetFunction("cbAddTab", (Icallback)cbAddTab); + IupSetFunction("cbInsertTab", (Icallback)cbInsertTab); + IupSetFunction("cbRemoveTab", (Icallback)cbRemoveTab); + IupSetFunction("cbInactive", (Icallback)cbInactive); + IupSetFunction("cbChildButton", (Icallback)cbChildButton); + IupSetFunction("cbValuePos", (Icallback)cbValuePos); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + TabsTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/tecgraf.bmp b/iup/test/tecgraf.bmp new file mode 100755 index 0000000..e6dcbdd Binary files /dev/null and b/iup/test/tecgraf.bmp differ diff --git a/iup/test/text.c b/iup/test/text.c new file mode 100755 index 0000000..f1c29a2 --- /dev/null +++ b/iup/test/text.c @@ -0,0 +1,433 @@ +#include +#include +#include +#include + +static void text2multiline (Ihandle* ih, char* attribute) +{ + Ihandle *mltline = IupGetDialogChild(ih, "mltline"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute (mltline, attribute, IupGetAttribute (text, "VALUE")); +} + +static void multiline2text (Ihandle* ih, char* attribute) +{ + Ihandle *mltline = IupGetDialogChild(ih, "mltline"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetAttribute (text, "VALUE", IupGetAttribute(mltline, attribute)); +} + +static int btn_append_cb (Ihandle* ih) +{ + text2multiline(ih, "APPEND"); + return IUP_DEFAULT; +} + +static int btn_insert_cb (Ihandle* ih) +{ + text2multiline(ih, "INSERT"); + return IUP_DEFAULT; +} + +static int btn_clip_cb (Ihandle* ih) +{ + text2multiline(ih, "CLIPBOARD"); + return IUP_DEFAULT; +} + +int iupKeyNameToCode(const char *name); + +static int btn_key_cb (Ihandle* ih) +{ + Ihandle *mltline = IupGetDialogChild(ih, "mltline"); + Ihandle *text = IupGetDialogChild(ih, "text"); + IupSetFocus(mltline); + IupFlush(); + IupSetfAttribute(NULL, "KEY", "%d", iupKeyNameToCode(IupGetAttribute(text, "VALUE"))); + return IUP_DEFAULT; +} + +static int btn_caret_cb (Ihandle* ih) +{ + Ihandle *opt = IupGetHandle("text2multi"); + if (IupGetInt(opt, "VALUE")) + text2multiline(ih, "CARET"); + else + multiline2text(ih, "CARET"); + return IUP_DEFAULT; +} + +static int btn_readonly_cb (Ihandle* ih) +{ + Ihandle *opt = IupGetHandle("text2multi"); + if (IupGetInt(opt, "VALUE")) + text2multiline(ih, "READONLY"); + else + multiline2text(ih, "READONLY"); + return IUP_DEFAULT; +} + +static int btn_selection_cb (Ihandle* ih) +{ + Ihandle *opt = IupGetHandle ("text2multi"); + if (IupGetInt (opt, "VALUE")) + text2multiline (ih, "SELECTION"); + else + multiline2text (ih, "SELECTION"); + return IUP_DEFAULT; +} + +static int btn_selectedtext_cb (Ihandle* ih) +{ + Ihandle *opt = IupGetHandle ("text2multi"); + if (IupGetInt (opt, "VALUE")) + text2multiline (ih, "SELECTEDTEXT"); + else + multiline2text (ih, "SELECTEDTEXT"); + return IUP_DEFAULT; +} + +static int btn_overwrite_cb (Ihandle* ih) +{ + Ihandle *opt = IupGetHandle ("text2multi"); + if (IupGetInt (opt, "VALUE")) + text2multiline (ih, "OVERWRITE"); + else + multiline2text (ih, "OVERWRITE"); + return IUP_DEFAULT; +} + +static int btn_active_cb(Ihandle *ih) +{ + Ihandle *opt = IupGetHandle ("text2multi"); + if (IupGetInt (opt, "VALUE")) + text2multiline (ih, "ACTIVE"); + else + multiline2text (ih, "ACTIVE"); + return IUP_DEFAULT; +} + +static int btn_remformat_cb(Ihandle *ih) +{ + text2multiline (ih, "REMOVEFORMATTING"); + return IUP_DEFAULT; +} + +static int btn_nc_cb (Ihandle* ih) +{ + Ihandle *opt = IupGetHandle ("text2multi"); + if (IupGetInt (opt, "VALUE")) + text2multiline (ih, "NC"); + else + multiline2text (ih, "NC"); + return IUP_DEFAULT; +} + +static int btn_value_cb (Ihandle* ih) +{ + Ihandle *opt = IupGetHandle ("text2multi"); + if (IupGetInt (opt, "VALUE")) + text2multiline (ih, "VALUE"); + else + multiline2text (ih, "VALUE"); + return IUP_DEFAULT; +} + +static int btn_tabsize_cb (Ihandle* ih) +{ + Ihandle *opt = IupGetHandle ("text2multi"); + if (IupGetInt (opt, "VALUE")) + text2multiline (ih, "TABSIZE"); + else + multiline2text (ih, "TABSIZE"); + return IUP_DEFAULT; +} + +static int k_f2(void) +{ + printf("K_F2\n"); + return IUP_DEFAULT; +} + +static int file_open(void) +{ + char filename[100] = ""; + IupGetFile(filename); // test key after dlg in multiline + printf(filename); + return IUP_DEFAULT; +} + +char *iupKeyCodeToName(int code); + +static int k_any(Ihandle *ih, int c) +{ + if (iup_isprint(c)) + printf("K_ANY(%d = %s \'%c\')\n", c, iupKeyCodeToName(c), (char)c); + else + printf("K_ANY(%d = %s)\n", c, iupKeyCodeToName(c)); + printf(" CARET(%s)\n", IupGetAttribute(ih, "CARET")); + if (c == K_cA) + return IUP_IGNORE; // Sound a beep in Windows + if (c == K_cP) + { + file_open(); + return IUP_IGNORE; // Sound a beep in Windows + } + return IUP_CONTINUE; +} + +static int action(Ihandle *ih, int c, char* after) +{ + if (iup_isprint(c)) + printf("ACTION(%d = %s \'%c\', %s)\n", c, iupKeyCodeToName(c), (char)c, after); + else + printf("ACTION(%d = %s, %s)\n", c, iupKeyCodeToName(c), after); + if (c == K_i) + return IUP_IGNORE; // OK + if (c == K_cD) + return IUP_IGNORE; // Sound a beep in Windows + if (c == K_h) + return K_j; + return IUP_DEFAULT; +} + +static int caret_cb(Ihandle *ih, int lin, int col, int pos) +{ + printf("CARET_CB(%d, %d - %d)\n", lin, col, pos); + printf(" CARET(%s - %s)\n", IupGetAttribute(ih, "CARET"), IupGetAttribute(ih, "CARETPOS")); + return IUP_DEFAULT; +} + +static int getfocus_cb(void) +{ + printf("GETFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int help_cb(void) +{ + printf("HELP_CB()\n"); + return IUP_DEFAULT; +} + +static int killfocus_cb(void) +{ + printf("KILLFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int leavewindow_cb(void) +{ + printf("LEAVEWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +static int enterwindow_cb(void) +{ + printf("ENTERWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +static int btn_def_esc_cb(void) +{ + printf("DEFAULTESC\n"); + return IUP_DEFAULT; +} + +static int btn_def_enter_cb(void) +{ + printf("DEFAULTENTER\n"); + return IUP_DEFAULT; +} + +static int dropfiles_cb(Ihandle *ih, const char* filename, int num, int x, int y) +{ + printf("DROPFILES_CB(%s, %d, x=%d, y=%d)\n", filename, num, x, y); + return IUP_DEFAULT; +} + +static int button_cb(Ihandle *ih,int but,int pressed,int x,int y,char* status) +{ + int lin, col, pos; + printf("BUTTON_CB(but=%c (%d), x=%d, y=%d [%s])\n",(char)but,pressed,x,y, status); + pos = IupConvertXYToPos(ih, x, y); + IupTextConvertPosToLinCol(ih, pos, &lin, &col); + printf(" (lin=%d, col=%d, pos=%d)\n", lin, col, pos); + return IUP_DEFAULT; +} + +static int motion_cb(Ihandle *ih,int x,int y,char* status) +{ + int lin, col, pos; + printf("MOTION_CB(x=%d, y=%d [%s])\n",x,y, status); + pos = IupConvertXYToPos(ih, x, y); + IupTextConvertPosToLinCol(ih, pos, &lin, &col); + printf(" (lin=%d, col=%d, pos=%d)\n", lin, col, pos); + return IUP_DEFAULT; +} + +void TextTest(void) +{ + int formatting = 0; + Ihandle *dlg, *mltline, *text, *opt, *btn_def_enter, *btn_def_esc, *btn_active, *btn_overwrite, + *btn_append, *btn_insert, *btn_caret, *btn_clip, *btn_key, *btn_readonly, *btn_tabsize, + *btn_selection, *btn_selectedtext, *btn_nc, *btn_value, *lbl, *formattag, *btn_remformat; + +// IupSetGlobal("UTF8AUTOCONVERT", "NO"); + + text = IupText (NULL); + IupSetAttribute(text, "EXPAND", "HORIZONTAL"); +// IupSetAttribute(text, "VALUE", "Single Line Text"); + IupSetAttribute(text, "CUEBANNER", "Enter Attribute Value Here"); + IupSetAttribute(text, "NAME", "text"); + IupSetAttribute(text, "TIP", "Attribute Value"); + + opt = IupToggle("Set/Get", NULL); + IupSetAttribute (opt, "VALUE", "ON"); + IupSetHandle ("text2multi", opt); + + mltline = IupMultiLine(NULL); +// mltline = IupText(NULL); +// IupSetAttribute(mltline, "MULTILINE", "YES"); + IupSetAttribute(mltline, "NAME", "mltline"); + + IupSetCallback(mltline, "DROPFILES_CB", (Icallback)dropfiles_cb); + IupSetCallback(mltline, "BUTTON_CB", (Icallback)button_cb); +// IupSetCallback(mltline, "MOTION_CB", (Icallback)motion_cb); + IupSetCallback(mltline, "HELP_CB", (Icallback)help_cb); + IupSetCallback(mltline, "GETFOCUS_CB", (Icallback)getfocus_cb); + IupSetCallback(mltline, "KILLFOCUS_CB", (Icallback)killfocus_cb); + IupSetCallback(mltline, "ENTERWINDOW_CB", (Icallback)enterwindow_cb); + IupSetCallback(mltline, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb); + //IupSetCallback(mltline, "ACTION", (Icallback)action); + IupSetCallback(mltline, "K_ANY", (Icallback)k_any); + IupSetCallback(mltline, "K_F2", (Icallback)k_f2); + IupSetCallback(mltline, "CARET_CB", (Icallback)caret_cb); +// IupSetAttribute(mltline, "WORDWRAP", "YES"); +// IupSetAttribute(mltline, "BORDER", "NO"); +// IupSetAttribute(mltline, "AUTOHIDE", "YES"); +// IupSetAttribute(mltline, "BGCOLOR", "255 0 128"); +// IupSetAttribute(mltline, "FGCOLOR", "0 128 192"); +// IupSetAttribute(mltline, "PADDING", "15x15"); +// IupSetAttribute(mltline, "VALUE", "First Line\nSecond Line Big Big Big\nThird Line\nmore\nmore\nçãõáóé"); // UTF-8 + IupSetAttribute(mltline, "VALUE", "First Line\nSecond Line Big Big Big\nThird Line\nmore\nmore\nçãõáóé"); // Windows-1252 + IupSetAttribute(mltline, "TIP", "First Line\nSecond Line\nThird Line"); +// IupSetAttribute(mltline, "FONT", "Helvetica, 14"); +// IupSetAttribute(mltline, "MASK", IUP_MASK_FLOAT); +// IupSetAttribute(mltline, "FILTER", "UPPERCASE"); +// IupSetAttribute(mltline, "ALIGNMENT", "ACENTER"); + + /* Turns on multiline expand and text horizontal expand */ + IupSetAttribute(mltline, "SIZE", "80x40"); + IupSetAttribute(mltline, "EXPAND", "YES"); + + formatting = 0; + if (formatting) /* just to make easier to comment this section */ + { + /* formatting before Map */ + IupSetAttribute(mltline, "FORMATTING", "YES"); + + formattag = IupUser(); + IupSetAttribute(formattag, "ALIGNMENT", "CENTER"); + IupSetAttribute(formattag, "SPACEAFTER", "10"); + IupSetAttribute(formattag, "FONTSIZE", "24"); + IupSetAttribute(formattag, "SELECTION", "3,1:3,50"); + IupSetAttribute(mltline, "ADDFORMATTAG_HANDLE", (char*)formattag); + + formattag = IupUser(); + IupSetAttribute(formattag, "BGCOLOR", "255 128 64"); + IupSetAttribute(formattag, "UNDERLINE", "SINGLE"); + IupSetAttribute(formattag, "WEIGHT", "BOLD"); + IupSetAttribute(formattag, "SELECTION", "3,7:3,11"); + IupSetAttribute(mltline, "ADDFORMATTAG_HANDLE", (char*)formattag); + } + + /* Creates buttons */ +// btn_append = IupButton ("APPEND çãõáóé", NULL); // Windows-1252 +// btn_append = IupButton ("APPEND çãõáóé", NULL); // UTF-8 + btn_append = IupButton ("&APPEND", NULL); + btn_insert = IupButton ("INSERT", NULL); + btn_caret = IupButton ("CARET", NULL); + btn_readonly = IupButton ("READONLY", NULL); + btn_selection = IupButton ("SELECTION", NULL); + btn_selectedtext = IupButton ("SELECTEDTEXT", NULL); + btn_nc = IupButton ("NC", NULL); + btn_value = IupButton ("VALUE", NULL); + btn_tabsize = IupButton ("TABSIZE", NULL); + btn_clip = IupButton ("CLIPBOARD", NULL); + btn_key = IupButton ("KEY", NULL); + btn_def_enter = IupButton ("Default Enter", NULL); + btn_def_esc = IupButton ("Default Esc", NULL); + btn_active = IupButton("ACTIVE", NULL); + btn_remformat = IupButton("REMOVEFORMATTING", NULL); + btn_overwrite = IupButton("OVERWRITE", NULL); + + IupSetAttribute(btn_append, "TIP", "First Line\nSecond Line\nThird Line"); + + /* Registers callbacks */ + IupSetCallback(btn_append, "ACTION", (Icallback) btn_append_cb); + IupSetCallback(btn_insert, "ACTION", (Icallback) btn_insert_cb); + IupSetCallback(btn_caret, "ACTION", (Icallback) btn_caret_cb); + IupSetCallback(btn_readonly, "ACTION", (Icallback) btn_readonly_cb); + IupSetCallback(btn_selection, "ACTION", (Icallback) btn_selection_cb); + IupSetCallback(btn_selectedtext, "ACTION", (Icallback) btn_selectedtext_cb); + IupSetCallback(btn_nc, "ACTION", (Icallback) btn_nc_cb); + IupSetCallback(btn_value, "ACTION", (Icallback) btn_value_cb); + IupSetCallback(btn_tabsize, "ACTION", (Icallback) btn_tabsize_cb); + IupSetCallback(btn_clip, "ACTION", (Icallback) btn_clip_cb); + IupSetCallback(btn_key, "ACTION", (Icallback) btn_key_cb); + IupSetCallback(btn_def_enter, "ACTION", (Icallback) btn_def_enter_cb); + IupSetCallback(btn_def_esc, "ACTION", (Icallback) btn_def_esc_cb); + IupSetCallback(btn_active, "ACTION", (Icallback) btn_active_cb); + IupSetCallback(btn_remformat, "ACTION", (Icallback) btn_remformat_cb); + IupSetCallback(btn_overwrite, "ACTION", (Icallback) btn_overwrite_cb); + + lbl = IupLabel("&Multiline:"); + IupSetAttribute(lbl, "PADDING", "2x2"); + + /* Creates dlg */ + dlg = IupDialog(IupVbox(lbl, + mltline, + IupHbox (text, opt, NULL), + IupHbox (btn_append, btn_insert, btn_caret, btn_readonly, btn_selection, NULL), + IupHbox (btn_selectedtext, btn_nc, btn_value, btn_tabsize, btn_clip, btn_key, NULL), + IupHbox (btn_def_enter, btn_def_esc, btn_active, btn_remformat, btn_overwrite, NULL), + NULL)); + IupSetCallback(dlg, "K_cO", (Icallback)file_open); + IupSetAttribute(dlg, "TITLE", "IupText Test"); + IupSetAttribute(dlg, "MARGIN", "10x10"); + IupSetAttribute(dlg, "GAP", "5"); + IupSetAttributeHandle(dlg, "DEFAULTENTER", btn_def_enter); + IupSetAttributeHandle(dlg, "DEFAULTESC", btn_def_esc); + IupSetAttribute(dlg, "SHRINK", "YES"); + + if (formatting) /* just to make easier to comment this section */ + { + IupMap(dlg); + /* formatting after Map */ + + formattag = IupUser(); + IupSetAttribute(formattag, "ITALIC", "YES"); + IupSetAttribute(formattag, "STRIKEOUT", "YES"); + IupSetAttribute(formattag, "SELECTION", "2,1:2,12"); + IupSetAttribute(mltline, "ADDFORMATTAG_HANDLE", (char*)formattag); + } + + /* Shows dlg in the center of the screen */ + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + TextTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/text_spin.c b/iup/test/text_spin.c new file mode 100755 index 0000000..114c1ed --- /dev/null +++ b/iup/test/text_spin.c @@ -0,0 +1,74 @@ +#include +#include + +#include "iup.h" +#include "iupkey.h" + + +static int spin_cb(Ihandle* ih, int pos) +{ + (void)ih; + printf("SPIN_CB(%d)\n", pos); + if (!IupGetInt(ih, "SPINAUTO")) + IupSetfAttribute(ih, "VALUE", "%s(%d)", "Test", pos); + return IUP_DEFAULT; +} + +static int action_cb(Ihandle* ih, int c, char* after) +{ + printf("ACTION(%d, %s)\n", c, after); + return IUP_DEFAULT; +} + +static int setspinvalue(Ihandle* ih) +{ + IupSetAttribute(IupGetDialogChild(ih, "spin"), "SPINVALUE", "25"); + return IUP_DEFAULT; +} + +void TextSpinTest(void) +{ + Ihandle *dlg, *text; + + text = IupText(NULL); + IupSetAttribute(text, "SIZE", "60x"); +// IupSetAttribute(text, "EXPAND", "HORIZONTAL"); + + IupSetAttribute(text, "SPIN", "YES"); +// IupSetAttribute(text, "SPINMIN", "10"); +// IupSetAttribute(text, "SPINMAX", "60"); +// IupSetAttribute(text, "SPININC", "5"); +// IupSetAttribute(text, "SPINWRAP", "YES"); +// IupSetAttribute(text, "SPINALIGN", "LEFT"); +// IupSetAttribute(text, "SPINVALUE", "25"); +// IupSetAttribute(text, "SPINAUTO", "NO"); + IupSetAttribute(text, "NAME", "spin"); + + IupSetCallback(text, "SPIN_CB", (Icallback)spin_cb); + IupSetCallback(text, "ACTION", (Icallback)action_cb); + + dlg = IupDialog(IupVbox(text, IupButton("SPINVALUE", "setspinvalue"), NULL)); + IupSetAttribute(dlg, "GAP", "20"); + IupSetAttribute(dlg, "MARGIN", "20x20"); +// IupSetAttribute(dlg, "BGCOLOR", "173 177 194"); // Motif BGCOLOR for documentation + + IupSetFunction("setspinvalue", (Icallback)setspinvalue); + + IupSetAttribute(dlg, "TITLE", "Text Spin Test"); + IupShow(dlg); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + TextSpinTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/timer.c b/iup/test/timer.c new file mode 100755 index 0000000..f570b63 --- /dev/null +++ b/iup/test/timer.c @@ -0,0 +1,70 @@ +#include +#include +#include "iup.h" + +static Ihandle *timer1, *timer2, *timer3; + +static int timer_cb(Ihandle *ih) +{ + if (ih == timer1) + printf("timer 1 called\n"); + + if (ih == timer2) + { + printf("timer 2 called and stopped\n"); + IupSetAttribute(ih, "RUN", "NO"); + } + + if (ih == timer3) + { + printf("timer 3 called and CLOSE returned.\n"); + IupDestroy(timer1); + IupDestroy(timer2); + IupDestroy(timer3); + return IUP_CLOSE; + } + + return IUP_DEFAULT; +} + +void TimerTest(void) +{ + Ihandle *dlg; + + dlg = IupDialog(NULL); + IupSetAttribute(dlg, "TITLE", "IupTimer Test"); + IupSetAttribute(dlg, "SIZE", "200x100"); + + IupShow(dlg); + + timer1 = IupTimer(); + timer2 = IupTimer(); + timer3 = IupTimer(); + + IupSetAttribute(timer1, "TIME", "100"); + IupSetAttribute(timer1, "RUN", "YES"); + IupSetCallback(timer1, "ACTION_CB", (Icallback)timer_cb); + + IupSetAttribute(timer2, "TIME", "400"); + IupSetAttribute(timer2, "RUN", "YES"); + IupSetCallback(timer2, "ACTION_CB", (Icallback)timer_cb); + + IupSetAttribute(timer3, "TIME", "5000"); + IupSetAttribute(timer3, "RUN", "YES"); + IupSetCallback(timer3, "ACTION_CB", (Icallback)timer_cb); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + TimerTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/toggle.c b/iup/test/toggle.c new file mode 100755 index 0000000..e504eb1 --- /dev/null +++ b/iup/test/toggle.c @@ -0,0 +1,306 @@ +#include +#include +#include "iup.h" + +#define TEST_IMAGE_SIZE 20 + +static unsigned char image_data_32[16*16*4] = { + 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, + 255, 0, 255, 0, 183, 182, 245, 255, 183, 182, 245, 255, 179, 178, 243, 255, 174, 173, 241, 255, 168, 167, 238, 255, 162, 161, 234, 255, 155, 154, 231, 255, 148, 147, 228, 255, 143, 142, 224, 255, 136, 135, 221, 255, 129, 128, 218, 255, 123, 122, 214, 255, 117, 116, 211, 255, 112, 111, 209, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 179, 178, 243, 255, 190, 189, 255, 255, 147, 146, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 75, 88, 190, 255, 89, 88, 176, 255, 89, 88, 176, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 173, 172, 240, 255, 190, 189, 255, 255, 138, 137, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 63, 82, 184, 255, 51, 51, 103, 255, 86, 85, 170, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 167, 166, 237, 255, 190, 189, 255, 255, 129, 128, 230, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 52, 77, 179, 255, 122, 121, 223, 255, 83, 82, 164, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 159, 158, 233, 255, 190, 189, 255, 255, 119, 118, 220, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 210, 219, 234, 255, 40, 71, 173, 255, 114, 113, 215, 255, 80, 79, 159, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 152, 151, 229, 255, 190, 189, 255, 255, 110, 109, 211, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 210, 219, 234, 255, 198, 209, 229, 255, 28, 65, 167, 255, 103, 103, 204, 255, 77, 77, 154, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 146, 145, 226, 255, 190, 189, 255, 255, 103, 102, 204, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 248, 251, 255, 234, 238, 246, 255, 222, 229, 240, 255, 210, 219, 234, 255, 198, 209, 229, 255, 189, 202, 225, 255, 17, 59, 161, 255, 92, 93, 194, 255, 74, 74, 148, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 139, 138, 223, 255, 188, 187, 255, 255, 183, 182, 255, 255, 96, 99, 201, 255, 86, 94, 196, 255, 75, 88, 190, 255, 63, 82, 184, 255, 52, 77, 179, 255, 40, 71, 173, 255, 28, 65, 167, 255, 17, 59, 161, 255, 92, 93, 193, 255, 84, 86, 186, 255, 71, 71, 143, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 132, 131, 219, 255, 180, 179, 255, 255, 174, 173, 255, 255, 164, 163, 252, 255, 143, 142, 244, 255, 135, 134, 236, 255, 129, 128, 230, 255, 122, 121, 223, 255, 114, 113, 215, 255, 108, 107, 209, 255, 92, 93, 193, 255, 84, 86, 186, 255, 76, 80, 178, 255, 68, 68, 137, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 124, 123, 215, 255, 170, 169, 255, 255, 160, 159, 251, 255, 148, 147, 245, 255, 75, 91, 113, 255, 75, 91, 113, 255, 75, 91, 113, 255, 75, 91, 113, 255, 82, 98, 118, 255, 91, 106, 125, 255, 84, 86, 186, 255, 76, 79, 178, 255, 68, 73, 170, 255, 65, 65, 131, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 118, 117, 212, 255, 160, 159, 255, 255, 145, 144, 245, 255, 135, 134, 236, 255, 75, 91, 113, 255, 0, 0, 0, 255, 52, 60, 71, 255, 206, 217, 233, 255, 212, 221, 236, 255, 103, 116, 133, 255, 67, 75, 174, 255, 68, 73, 170, 255, 60, 66, 163, 255, 62, 62, 125, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 112, 111, 209, 255, 154, 153, 255, 255, 135, 134, 236, 255, 129, 128, 230, 255, 75, 91, 113, 255, 52, 60, 71, 255, 104, 120, 141, 255, 216, 224, 237, 255, 224, 231, 241, 255, 115, 127, 143, 255, 53, 65, 163, 255, 60, 66, 162, 255, 53, 61, 156, 255, 60, 59, 120, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 108, 107, 207, 255, 143, 142, 243, 255, 129, 128, 230, 255, 36, 68, 170, 255, 33, 50, 71, 255, 171, 180, 195, 255, 179, 187, 198, 255, 188, 193, 202, 255, 196, 200, 206, 255, 72, 77, 86, 255, 51, 62, 158, 255, 54, 61, 156, 255, 49, 57, 152, 255, 57, 57, 114, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 108, 107, 207, 84, 101, 100, 195, 255, 86, 85, 170, 255, 83, 82, 164, 255, 80, 79, 159, 255, 77, 77, 154, 255, 74, 74, 148, 255, 71, 71, 143, 255, 68, 68, 137, 255, 65, 65, 131, 255, 60, 59, 120, 255, 60, 59, 120, 255, 57, 57, 114, 255, 55, 54, 110, 255, 255, 0, 255, 0, + 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0}; + +static unsigned char image_data_8 [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE] = +{ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,3,3,4,4,4,4,4,4,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +}; + +static unsigned char image_data_8_pressed [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE] = +{ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,5,1,1,1,1,1,2,2,2,2,2,5,0,0,0,5, + 5,0,0,0,1,5,1,1,1,1,2,2,2,2,5,2,0,0,0,5, + 5,0,0,0,1,1,5,1,1,1,2,2,2,5,2,2,0,0,0,5, + 5,0,0,0,1,1,1,5,1,1,2,2,5,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,5,1,2,5,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,1,5,5,2,2,2,2,2,0,0,0,5, + 5,0,0,0,3,3,3,3,3,5,5,4,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,5,3,4,5,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,5,3,3,4,4,5,4,4,4,0,0,0,5, + 5,0,0,0,3,3,5,3,3,3,4,4,4,5,4,4,0,0,0,5, + 5,0,0,0,3,5,3,3,3,3,4,4,4,4,5,4,0,0,0,5, + 5,0,0,0,5,3,3,3,3,3,4,4,4,4,4,5,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +}; + +static unsigned char image_data_8_inactive [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE] = +{ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,5,5,1,1,1,1,1,1,1,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,5,5,5,1,5,5,5,5,5,5,0,0,0,5, + 5,0,0,0,5,5,1,1,1,1,1,1,1,5,5,5,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +}; + +static void createimgs(void) +{ + Ihandle *image; + + image = IupImageRGBA(16, 16, image_data_32); + IupSetHandle ("image2", image); + + image = IupImage(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_8); + IupSetAttribute(image, "0", "BGCOLOR"); + IupSetAttribute(image, "1", "255 0 0"); + IupSetAttribute(image, "2", "0 255 0"); + IupSetAttribute(image, "3", "0 0 255"); + IupSetAttribute(image, "4", "255 255 255"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetHandle ("image1", image); + + image = IupImage(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_8_inactive); + IupSetAttribute(image, "0", "BGCOLOR"); + IupSetAttribute(image, "1", "255 0 0"); + IupSetAttribute(image, "2", "0 255 0"); + IupSetAttribute(image, "3", "0 0 255"); + IupSetAttribute(image, "4", "255 255 255"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetHandle ("image1i", image); + + image = IupImage(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_8_pressed); + IupSetAttribute(image, "0", "BGCOLOR"); + IupSetAttribute(image, "1", "255 0 0"); + IupSetAttribute(image, "2", "0 255 0"); + IupSetAttribute(image, "3", "0 0 255"); + IupSetAttribute(image, "4", "255 255 255"); + IupSetAttribute(image, "5", "0 0 0"); + IupSetHandle ("image1p", image); +} + +static int togglecb(Ihandle *self, int v) +{ + if (v == 1) printf("Toggle %s - ON\n", IupGetAttribute(self, "NAME")); + else printf("Toggle %s - OFF\n", IupGetAttribute(self, "NAME")); + return IUP_DEFAULT; +} + +static int toggle9cb(Ihandle *self, int v) +{ + Ihandle* ih = IupGetHandle("radio test"); + if (v == 1) printf("Toggle 9 - ON\n"); + else if (v == -1) printf("Toggle 9 - NOTDEF\n"); + else printf("Toggle 9 - OFF\n"); + + if (v == 1) + IupSetAttribute(ih, "VALUE", "ON"); + else + IupSetAttribute(ih, "VALUE", "OFF"); + + return IUP_DEFAULT; +} + +static int toggle7cb(Ihandle *ih, int v) +{ + Ihandle* dlg = IupGetDialog(ih); + Ihandle* box = IupGetChild(dlg, 0); + if (v) + IupSetAttribute(box, "ACTIVE", "NO"); + else + IupSetAttribute(box, "ACTIVE", "YES"); + IupSetAttribute(ih, "ACTIVE", "YES"); + return IUP_DEFAULT; +} + +static int k_any(Ihandle *ih, int c) +{ + printf("K_ANY(%d)\n", c); + return IUP_DEFAULT; +} + +static int getfocus_cb(Ihandle *ih) +{ + printf("GETFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int help_cb(Ihandle* ih) +{ + printf("HELP_CB()\n"); + return IUP_DEFAULT; +} + +static int killfocus_cb(Ihandle *ih) +{ + printf("KILLFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int leavewindow_cb(Ihandle *ih) +{ + printf("LEAVEWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +static int enterwindow_cb(Ihandle *ih) +{ + printf("ENTERWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +void ToggleTest(void) +{ + Ihandle *dlg, *box; + Ihandle *toggle1, *toggle2, *toggle3, *toggle4, *toggle5, *toggle6, *toggle7, *toggle8, *toggle9; + + createimgs(); + + toggle1 = IupToggle(NULL, NULL); + toggle2 = IupToggle(NULL, NULL); + toggle3 = IupToggle("Text Toggle", NULL); +// toggle4 = IupToggle("blue foreground color", NULL); + toggle4 = IupToggle("Radio &Text", NULL); + toggle5 = IupToggle("red background color", NULL); + toggle6 = IupToggle("multiple lines\nsecond line", NULL); + toggle7 = IupToggle("INACTIVE", NULL); + toggle8 = IupToggle("Courier 14 Bold font", NULL); + toggle9 = IupToggle("3 State", NULL); + + IupSetHandle("radio test", toggle8); + + IupSetCallback(toggle1, "ACTION", (Icallback)togglecb); + IupSetCallback(toggle2, "ACTION", (Icallback)togglecb); + IupSetCallback(toggle3, "ACTION", (Icallback)togglecb); + IupSetCallback(toggle4, "ACTION", (Icallback)togglecb); + IupSetCallback(toggle5, "ACTION", (Icallback)togglecb); + IupSetCallback(toggle6, "ACTION", (Icallback)togglecb); + IupSetCallback(toggle8, "ACTION", (Icallback)togglecb); + IupSetCallback(toggle7, "ACTION", (Icallback)toggle7cb); + IupSetCallback(toggle9, "ACTION", (Icallback)toggle9cb); + + IupSetCallback(toggle3, "K_ANY", (Icallback)k_any); + IupSetCallback(toggle3, "HELP_CB", (Icallback)help_cb); + IupSetCallback(toggle3, "GETFOCUS_CB", (Icallback)getfocus_cb); + IupSetCallback(toggle3, "KILLFOCUS_CB", (Icallback)killfocus_cb); + IupSetCallback(toggle3, "ENTERWINDOW_CB", (Icallback)enterwindow_cb); + IupSetCallback(toggle3, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb); + + IupSetAttribute(toggle1, "IMAGE", "image1"); + IupSetAttribute(toggle1, "IMPRESS", "image1p"); + IupSetAttribute(toggle1, "IMINACTIVE", "image1i"); +// IupSetAttribute(toggle1, "PADDING", "10x10"); +// IupSetAttribute(toggle1, "RASTERSIZE", "160x160"); +// IupSetAttribute(toggle2, "RASTERSIZE", "60x60"); +// IupSetAttribute(toggle1, "ALIGNMENT", "ARIGHT"); +// IupSetAttribute(toggle2, "ALIGNMENT", "ARIGHT"); + IupSetAttribute(toggle2, "IMAGE", "image2"); + IupSetAttribute(toggle1, "NAME", "1"); + IupSetAttribute(toggle2, "NAME", "2"); + IupSetAttribute(toggle3, "NAME", "3"); + IupSetAttribute(toggle4, "NAME", "4"); + IupSetAttribute(toggle5, "NAME", "5"); + IupSetAttribute(toggle6, "NAME", "6"); + IupSetAttribute(toggle8, "NAME", "8"); +// IupSetAttribute(toggle4, "FGCOLOR", "0 0 255"); + IupSetAttribute(toggle5, "BGCOLOR", "255 0 0"); + IupSetAttribute(toggle8, "FONT", "COURIER_BOLD_14"); + IupSetAttribute(toggle9, "3STATE", "YES"); + IupSetAttribute(toggle6, "TIP", "Toggle Tip"); + IupSetAttribute(toggle7, "RIGHTBUTTON", "YES"); + IupSetAttribute(toggle5, "RIGHTBUTTON", "YES"); + + /* Creating box that contains the toggles */ + box = IupHbox( + IupVbox( + toggle1, + toggle2, + toggle3, + toggle7, + toggle9, + NULL), + IupFrame(IupRadio(IupVbox( + toggle4, + toggle5, + toggle6, + toggle8, + NULL))), + NULL); + + IupSetAttribute(IupGetChild(box, 1), "TITLE", "Radio in a Frame"); + +// IupSetAttribute(box, "BGCOLOR", "255 0 0"); + + /* Dialog */ + dlg = IupDialog(box); + IupSetAttribute (dlg, "TITLE", "IupToggle Test"); + IupSetAttributes(dlg, "MARGIN=5x5, GAP=5"); + + /* Associates a menu to the dlg */ + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + ToggleTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/tray.c b/iup/test/tray.c new file mode 100755 index 0000000..58b7daf --- /dev/null +++ b/iup/test/tray.c @@ -0,0 +1,120 @@ +#include +#include +#include "iup.h" + +static unsigned char pixmap [ ] = +{ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,2,3,3,3,3,3,3,3,2,1,0,0,0, + 0,0,2,1,2,3,3,3,3,3,2,1,2,0,0,0, + 0,0,3,2,1,2,3,3,3,2,1,2,3,0,0,0, + 0,0,3,3,2,1,2,3,2,1,2,3,3,0,0,0, + 0,0,3,3,3,2,1,2,1,2,3,3,3,0,0,0, + 0,0,3,3,3,3,2,1,2,3,3,3,3,0,0,0, + 0,0,3,3,3,2,1,2,1,2,3,3,3,0,0,0, + 0,0,3,3,2,1,2,3,2,1,2,3,3,0,0,0, + 0,0,3,2,1,2,3,3,3,2,1,2,3,0,0,0, + 0,0,2,1,2,3,3,3,3,3,2,1,2,0,0,0, + 0,0,1,2,3,3,3,3,3,3,3,2,1,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +}; + +static int close(Ihandle* ih) +{ + IupDestroy((Ihandle*)IupGetAttribute(ih, "_DIALOG")); + return IUP_DEFAULT; +// return IUP_CLOSE; +} + +static int hide(Ihandle* ih) +{ + IupSetAttribute((Ihandle*)IupGetAttribute(ih, "_DIALOG"), "HIDETASKBAR", "YES"); + return IUP_DEFAULT; +} + +static int show(Ihandle* ih) +{ + IupSetAttribute((Ihandle*)IupGetAttribute(ih, "_DIALOG"), "HIDETASKBAR", "NO"); + return IUP_DEFAULT; +} + +static int showmenu(Ihandle* ih) +{ + Ihandle* menu = IupMenu(IupItem("Show", "show"), IupItem("Hide", "hide"), IupItem("Exit", "close"), NULL); + IupSetAttribute(menu, "_DIALOG", (char*)ih); + IupSetFunction("show", (Icallback) show); + IupSetFunction("hide", (Icallback) hide); + IupSetFunction("close", (Icallback) close); + IupPopup(menu, IUP_MOUSEPOS, IUP_MOUSEPOS); + IupDestroy(menu); + return IUP_DEFAULT; +} + +static int k_esc(Ihandle* ih) +{ + IupDestroy(ih); + return IUP_DEFAULT; +} + +static int close_cb(Ihandle* ih) +{ + IupSetAttribute(ih, "HIDETASKBAR", "YES"); + return IUP_IGNORE; +} + +static int trayclick(Ihandle *ih, int button, int pressed, int dclick) +{ +printf("trayclick_cb(button=%d, pressed=%d, dclick=%d)\n", button, pressed, dclick); + if (button == 1 && pressed) + IupSetAttribute(ih, "HIDETASKBAR", "NO"); + else if (button == 3 && pressed) + showmenu(ih); + return IUP_DEFAULT; +} + +void TrayTest(void) +{ + Ihandle *dlg, *img; + + img = IupImage(16, 16, pixmap); + IupSetAttribute(img, "0", "BGCOLOR"); + IupSetAttribute(img, "1", "255 255 0"); + IupSetAttribute(img, "2", "255 0 0"); + IupSetAttribute(img, "3", "255 255 0"); + IupSetHandle ("img", img); + + dlg = IupDialog(NULL); + + IupSetAttribute(dlg, "TITLE", "Tray Test"); + IupSetAttribute(dlg, "TRAY", "YES"); + IupSetAttribute(dlg, "TRAYTIP", "Tip at Tray"); + IupSetAttribute(dlg, "TRAYIMAGE", "img"); + IupSetAttribute(dlg, "SIZE", "100x100"); + IupSetCallback(dlg, "TRAYCLICK_CB", (Icallback)trayclick); + IupSetCallback(dlg, "CLOSE_CB", (Icallback)close_cb); + IupSetCallback(dlg, "K_ESC", (Icallback)k_esc); + + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); + + /* start only the task bar icon */ + IupSetAttribute(dlg, "HIDETASKBAR", "YES"); +} + + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + TrayTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/tree.c b/iup/test/tree.c new file mode 100755 index 0000000..009c97f --- /dev/null +++ b/iup/test/tree.c @@ -0,0 +1,518 @@ +/*IupTree Example in C +Creates a tree with some branches and leaves. +Two callbacks are registered: one deletes marked nodes when the Del key is pressed, +and the other, called when the right mouse button is pressed, opens a menu with options. */ + +#include +#include +#include + +#include "iup.h" +#include "iupkey.h" + + +static Ihandle* load_image_LogoTecgraf(void) +{ + unsigned char imgdata[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 120, 143, 125, 132, 148, 178, 173, 133, 149, 178, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 110, 130, 48, 130, 147, 177, 254, 124, 139, 167, 254, 131, 147, 176, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 128, 153, 134, 142, 159, 191, 194, 47, 52, 61, 110, 114, 128, 154, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 143, 172, 192, 140, 156, 188, 99, 65, 69, 76, 16, 97, 109, 131, 251, 129, 144, 172, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 147, 175, 232, 140, 157, 188, 43, 0, 0, 0, 0, 100, 112, 134, 211, 126, 141, 169, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 78, 88, 26, 48, 52, 57, 60, 135, 150, 178, 254, 108, 121, 145, 83, 105, 118, 142, 76, 106, 119, 143, 201, 118, 133, 159, 122, 117, 129, 152, 25, 168, 176, 190, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 118, 128, 145, 3, 104, 117, 140, 92, 114, 127, 152, 180, 131, 147, 177, 237, 133, 149, 178, 249, 38, 42, 50, 222, 137, 152, 180, 249, 126, 142, 170, 182, 114, 128, 154, 182, 104, 117, 140, 227, 95, 107, 128, 238, 83, 93, 112, 248, 84, 95, 113, 239, 104, 117, 141, 180, 115, 129, 155, 93, 127, 140, 165, 4, + 98, 109, 130, 153, 109, 123, 147, 254, 145, 163, 195, 153, 138, 154, 182, 56, 115, 123, 138, 5, 92, 99, 109, 35, 134, 149, 177, 230, 0, 0, 0, 0, 0, 0, 0, 0, 120, 133, 159, 143, 135, 151, 181, 115, 86, 89, 93, 5, 41, 45, 51, 54, 40, 45, 53, 150, 107, 120, 144, 254, 122, 137, 164, 154, + 51, 57, 66, 147, 83, 93, 112, 255, 108, 121, 145, 159, 113, 126, 151, 62, 123, 136, 159, 8, 87, 93, 103, 35, 125, 141, 169, 230, 0, 0, 0, 0, 0, 0, 0, 0, 129, 143, 169, 143, 140, 156, 184, 115, 134, 147, 172, 8, 124, 138, 165, 60, 124, 139, 167, 155, 131, 147, 177, 255, 131, 147, 176, 153, + 64, 68, 73, 2, 36, 39, 45, 86, 41, 46, 54, 173, 60, 67, 80, 232, 75, 84, 101, 251, 89, 100, 120, 228, 105, 118, 142, 250, 110, 123, 148, 187, 118, 132, 158, 187, 126, 141, 169, 229, 134, 149, 177, 239, 136, 152, 179, 250, 136, 152, 181, 234, 139, 156, 186, 175, 130, 145, 173, 90, 124, 134, 151, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 74, 79, 19, 60, 64, 73, 50, 92, 103, 124, 254, 86, 95, 111, 84, 90, 100, 117, 76, 126, 141, 168, 201, 113, 126, 150, 119, 99, 105, 117, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 105, 125, 231, 135, 151, 181, 46, 0, 0, 0, 0, 137, 154, 184, 212, 123, 137, 164, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 83, 98, 191, 133, 149, 179, 102, 111, 121, 139, 17, 134, 150, 180, 252, 126, 140, 166, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 48, 57, 132, 121, 136, 164, 197, 121, 135, 161, 115, 130, 146, 175, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 47, 52, 46, 87, 98, 118, 254, 126, 142, 170, 254, 124, 139, 166, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 57, 67, 118, 115, 128, 152, 170, 127, 140, 164, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + Ihandle* image = IupImageRGBA(16, 16, imgdata); + return image; +} + +#define TEST_IMAGE_SIZE 16 + +static Ihandle* load_image_TestImage(void) +{ + unsigned char image_data_8 [TEST_IMAGE_SIZE*TEST_IMAGE_SIZE] = + { + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,1,1,1,1,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,2,2,2,2,0,0,0,5, + 5,0,0,0,1,1,1,1,2,2,2,2,0,0,0,5, + 5,0,0,0,3,3,3,3,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,4,4,4,4,0,0,0,5, + 5,0,0,0,3,3,3,3,4,4,4,4,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + }; + + Ihandle* image = IupImage(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, image_data_8); + IupSetAttribute(image, "0", "BGCOLOR"); + IupSetAttribute(image, "1", "255 0 0"); + IupSetAttribute(image, "2", "0 255 0"); + IupSetAttribute(image, "3", "0 0 255"); + IupSetAttribute(image, "4", "255 255 255"); + IupSetAttribute(image, "5", "0 0 0"); + + return image; +} + +static int addleaf(void) +{ + char attr[50]; + Ihandle* tree = IupGetHandle("tree"); + int id = IupGetInt(tree, "VALUE"); + sprintf(attr, "ADDLEAF%d", id); + IupSetAttribute(tree, attr, ""); + return IUP_DEFAULT; +} + +static int insertleaf(void) +{ + char attr[50]; + Ihandle* tree = IupGetHandle("tree"); + int id = IupGetInt(tree, "VALUE"); + sprintf(attr, "INSERTLEAF%d", id); + IupSetAttribute(tree, attr, ""); + return IUP_DEFAULT; +} + +static int addbranch(void) +{ + char attr[50]; + Ihandle* tree = IupGetHandle("tree"); + int id = IupGetInt(tree, "VALUE"); + sprintf(attr, "ADDBRANCH%d", id); + IupSetAttribute(tree, attr, ""); + return IUP_DEFAULT; +} + +static int insertbranch(void) +{ + char attr[50]; + Ihandle* tree = IupGetHandle("tree"); + int id = IupGetInt(tree, "VALUE"); + sprintf(attr, "INSERTBRANCH%d", id); + IupSetAttribute(tree, attr, ""); + return IUP_DEFAULT; +} + +static int text_cb(Ihandle* ih, int c, char *after) +{ + if (c == K_ESC) + return IUP_CLOSE; + + if (c == K_CR) + { + Ihandle *tree = IupGetHandle("tree"); + IupSetAttribute(tree, "NAME", after); + return IUP_CLOSE; + } + + return IUP_DEFAULT; +} + +static int removenode(void) +{ + Ihandle* tree = IupGetHandle("tree"); + IupSetAttribute(tree, "DELNODE", "SELECTED"); + return IUP_DEFAULT; +} + +static int removechild(void) +{ + Ihandle* tree = IupGetHandle("tree"); + IupSetAttribute(tree, "DELNODE", "CHILDREN"); + return IUP_DEFAULT; +} + +int renamenode(void) +{ + Ihandle* tree = IupGetHandle("tree"); + IupSetAttribute(tree, "RENAME", "YES"); + return IUP_DEFAULT; +} + +static int button_cb(Ihandle *ih,int but,int pressed,int x,int y,char* status) +{ + printf("BUTTON_CB(but=%c (%d), x=%d, y=%d [%s]) - [id=%d]\n",(char)but,pressed,x,y, status, IupConvertXYToPos(ih, x, y)); + return IUP_DEFAULT; +} + +static int motion_cb(Ihandle *ih,int x,int y,char* status) +{ + printf("MOTION_CB(x=%d, y=%d [%s]) - [id=%d]\n",x,y, status,IupConvertXYToPos(ih, x, y)); + return IUP_DEFAULT; +} + +static int showrename_cb(Ihandle* ih, int id) +{ + (void)ih; + printf("SHOWRENAME_CB(%d)\n", id); + return IUP_DEFAULT; +} + +static int selection_cb(Ihandle *ih, int id, int status) +{ + (void)ih; + printf("SELECTION_CB(%d, %d)\n", id, status); + return IUP_DEFAULT; +} + +static int multiselection_cb(Ihandle *ih, int* ids, int n) +{ + int i; + (void)ih; + printf("MULTISELECTION_CB("); + for (i = 0; i < n; i++) + printf("%d, ", ids[i]); + printf("n=%d)\n", n); + return IUP_DEFAULT; +} + +static int executeleaf_cb(Ihandle* ih, int id) +{ + printf("EXECUTELEAF_CB (%d)\n", id); + return IUP_DEFAULT; +} + +static int renamenode_cb(Ihandle* ih, int id, char* title) +{ + printf("RENAMENODE_CB (%d=%s)\n", id, title); + return IUP_DEFAULT; +} + +static int rename_cb(Ihandle* ih, int id, char* title) +{ + printf("RENAME_CB (%d=%s)\n", id, title); + if (strcmp(title, "fool") == 0) + return IUP_IGNORE; + return IUP_DEFAULT; +} + +static int branchopen_cb(Ihandle* ih, int id) +{ + printf("BRANCHOPEN_CB (%d)\n", id); +// if (id == 6) +// return IUP_IGNORE; + return IUP_DEFAULT; +} + +static int branchclose_cb(Ihandle* ih, int id) +{ + printf("BRANCHCLOSE_CB (%d)\n", id); +// if (id == 6) +// return IUP_IGNORE; + return IUP_DEFAULT; +} + +static int dragdrop_cb(Ihandle* ih, int drag_id, int drop_id, int shift, int control) +{ + printf("DRAGDROP_CB (%d)->(%d)\n", drag_id, drop_id); + return IUP_CONTINUE; +// return IUP_DEFAULT; +} + +static int getfocus_cb(Ihandle* ih) +{ + printf("GETFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int killfocus_cb(Ihandle* ih) +{ + printf("KILLFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int leavewindow_cb(Ihandle *ih) +{ + printf("LEAVEWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +static int enterwindow_cb(Ihandle* ih) +{ + printf("ENTERWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +static int k_any_cb(Ihandle* ih, int c) +{ + if (c == K_DEL) + IupSetAttribute(ih, "DELNODE", "MARKED"); + if (iup_isprint(c)) + printf("K_ANY(%s, %d = %s \'%c\')\n", IupGetAttribute(IupGetParent(IupGetParent(ih)), "TITLE"), c, iupKeyCodeToName(c), (char)c); + else + printf("K_ANY(%s, %d = %s)\n", IupGetAttribute(IupGetParent(IupGetParent(ih)), "TITLE"), c, iupKeyCodeToName(c)); + return IUP_CONTINUE; +} + +static int help_cb(Ihandle* ih) +{ + printf("HELP_CB()\n"); + return IUP_DEFAULT; +} + +static int selectnode(Ihandle* ih) +{ + Ihandle* tree = IupGetHandle("tree"); + IupSetAttribute(tree, "VALUE", IupGetAttribute(ih, "TITLE")); + return IUP_DEFAULT; +} + +static int nodeinfo(Ihandle* ih) +{ + char attr[50], *kind; + Ihandle* tree = IupGetHandle("tree"); + int branch = 0, id = IupGetInt(tree, "VALUE"); + printf("\nTree Info:\n"); + printf(" TOTALCOUNT=%s\n", IupGetAttribute(tree, "COUNT")); + printf("Node Info:\n"); + printf(" ID=%d\n", id); + printf(" TITLE=%s\n", IupGetAttribute(tree, "TITLE")); + printf(" DEPTH=%s\n", IupGetAttribute(tree, "DEPTH")); + sprintf(attr, "KIND%d", id); + kind = IupGetAttribute(tree, "KIND"); + printf(" KIND=%s\n", kind); + if (strcmp(kind, "BRANCH")==0) branch = 1; + if (branch) + printf(" STATE=%s\n", IupGetAttribute(tree, "STATE")); + printf(" IMAGE=%s\n", IupGetAttribute(tree, "IMAGE")); + if (branch) + printf(" IMAGEBRANCHEXPANDED=%s\n", IupGetAttribute(tree, "IMAGEBRANCHEXPANDED")); + printf(" MARKED=%s\n", IupGetAttribute(tree, "MARKED")); + printf(" COLOR=%s\n", IupGetAttribute(tree, "COLOR")); + printf(" PARENT=%s\n", IupGetAttribute(tree, "PARENT")); + printf(" COUNT=%s\n", IupGetAttribute(tree, "CHILDCOUNT")); + printf(" USERDATA=%p\n", IupGetAttribute(tree, "USERDATA")); + return IUP_DEFAULT; +} + +static int rightclick_cb(Ihandle* ih, int id) +{ + Ihandle *popup_menu; + char attr[50]; + + popup_menu = IupMenu( + IupItem ("Node Info","nodeinfo"), + IupItem ("Rename Node","renamenode"), + IupSeparator(), + IupItem ("Add Leaf","addleaf"), + IupItem ("Add Branch","addbranch"), + IupItem ("Insert Leaf","insertleaf"), + IupItem ("Insert Branch","insertbranch"), + IupItem ("Remove Node","removenode"), + IupItem ("Remove Children","removechild"), + IupSubmenu("Focus", IupMenu( + IupItem ("ROOT", "selectnode"), + IupItem ("LAST", "selectnode"), + IupItem ("PGUP", "selectnode"), + IupItem ("PGDN", "selectnode"), + IupItem ("NEXT", "selectnode"), + IupItem ("PREVIOUS", "selectnode"), + NULL)), + IupSubmenu("Mark", IupMenu( + IupItem ("INVERT", "selectnode"), + IupItem ("BLOCK", "selectnode"), + IupItem ("CLEARALL", "selectnode"), + IupItem ("MARKALL", "selectnode"), + IupItem ("INVERTALL", "selectnode"), + NULL)), + NULL); + + IupSetFunction("nodeinfo", (Icallback) nodeinfo); + IupSetFunction("selectnode", (Icallback) selectnode); + IupSetFunction("addleaf", (Icallback) addleaf); + IupSetFunction("addbranch", (Icallback) addbranch); + IupSetFunction("insertleaf", (Icallback) insertleaf); + IupSetFunction("insertbranch", (Icallback) insertbranch); + IupSetFunction("removenode", (Icallback) removenode); + IupSetFunction("removechild", (Icallback) removechild); + IupSetFunction("renamenode", (Icallback) renamenode); + +// sprintf(attr, "%d", id); +// IupSetAttribute(ih, "VALUE", attr); + IupPopup(popup_menu, IUP_MOUSEPOS, IUP_MOUSEPOS); + + IupDestroy(popup_menu); + + return IUP_DEFAULT; +} + +static int active(Ihandle *ih) +{ + Ihandle* tree = IupGetHandle("tree"); + if (IupGetInt(tree, "ACTIVE")) + IupSetAttribute(tree, "ACTIVE", "NO"); + else + IupSetAttribute(tree, "ACTIVE", "YES"); + return IUP_DEFAULT; +} + +static int next(Ihandle *ih) +{ + Ihandle* tree = IupGetHandle("tree"); + IupSetAttribute(tree, "VALUE", "NEXT"); + //IupSetAttribute(tree, "TOPITEM", "8"); + return IUP_DEFAULT; +} + +static int prev(Ihandle *ih) +{ + Ihandle* tree = IupGetHandle("tree"); + IupSetAttribute(tree, "VALUE", "PREVIOUS"); + return IUP_DEFAULT; +} + +/* Initializes IupTree and registers callbacks */ +static void init_tree(void) +{ + Ihandle* tree = IupTree(); + + IupSetCallback(tree, "EXECUTELEAF_CB", (Icallback) executeleaf_cb); + IupSetCallback(tree, "RENAMENODE_CB", (Icallback) renamenode_cb); + IupSetCallback(tree, "RENAME_CB", (Icallback) rename_cb); + IupSetCallback(tree, "BRANCHCLOSE_CB", (Icallback) branchclose_cb); + IupSetCallback(tree, "BRANCHOPEN_CB", (Icallback) branchopen_cb); + IupSetCallback(tree, "DRAGDROP_CB", (Icallback) dragdrop_cb); + IupSetCallback(tree, "RIGHTCLICK_CB", (Icallback) rightclick_cb); + IupSetCallback(tree, "K_ANY", (Icallback) k_any_cb); + IupSetCallback(tree, "SHOWRENAME_CB", (Icallback) showrename_cb); + IupSetCallback(tree, "SELECTION_CB", (Icallback) selection_cb); + IupSetCallback(tree, "MULTISELECTION_CB", (Icallback) multiselection_cb); + IupSetCallback(tree, "GETFOCUS_CB", (Icallback) getfocus_cb); + IupSetCallback(tree, "KILLFOCUS_CB", (Icallback) killfocus_cb); + //IupSetCallback(tree, "ENTERWINDOW_CB", (Icallback) enterwindow_cb); + //IupSetCallback(tree, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb); + //IupSetCallback(tree, "BUTTON_CB", (Icallback)button_cb); + //IupSetCallback(tree, "MOTION_CB", (Icallback)motion_cb); + + IupSetCallback(tree, "HELP_CB", (Icallback)help_cb); + +// IupSetAttribute(tree, "FONT", "COURIER_NORMAL_14"); +// IupSetAttribute(tree, "FGCOLOR", "255 0 0"); +// IupSetAttribute(tree, "SPACING", "10"); +// IupSetAttribute(tree, "BGCOLOR", "255 255 255"); + + IupSetAttribute(tree, "MARKMODE", "MULTIPLE"); + //IupSetAttribute(tree, "SHOWDRAGDROP", "YES"); + IupSetAttribute(tree, "SHOWRENAME", "YES"); + //IupSetAttribute(tree, "AUTODRAGDROP", "YES"); /* Gtk Only */ + + //IupSetAttribute(tree, "ADDEXPANDED", "NO"); +// IupSetAttribute(tree, "HIDELINES", "YES"); +// IupSetAttribute(tree, "HIDEBUTTONS", "YES"); +// IupSetAttribute(tree, "INDENTATION", "40"); + + IupSetHandle("tree", tree); +} + +/* Initializes the dlg */ +static void init_dlg(void) +{ + Ihandle* butactv, *butnext, *butprev, *butmenu; + Ihandle* tree = IupGetHandle("tree"); + Ihandle* box = IupHbox(tree, IupVbox(butactv = IupButton("Active", NULL), + butnext = IupButton("Next", NULL), + butprev = IupButton("Prev", NULL), + butmenu = IupButton("Menu", NULL), + NULL), NULL); + Ihandle* dlg = IupDialog(box) ; + IupSetAttribute(dlg, "TITLE", "IupTree"); + IupSetAttribute(box, "MARGIN", "10x10"); + IupSetAttribute(box, "GAP", "10"); +// IupSetAttribute(box, "BGCOLOR", "92 92 255"); +// IupSetAttribute(dlg, "BGCOLOR", "92 92 255"); +// IupSetAttribute(dlg, "BACKGROUND", "200 10 80"); +// IupSetAttribute(dlg, "BGCOLOR", "173 177 194"); // Motif BGCOLOR for documentation + IupSetCallback(butactv, "ACTION", active); + IupSetCallback(butnext, "ACTION", next); + IupSetCallback(butprev, "ACTION", prev); + IupSetCallback(butmenu, "ACTION", (Icallback)rightclick_cb); + + IupSetHandle("dlg", dlg); +} + +static void init_tree_nodes(void) +{ + Ihandle* tree = IupGetHandle("tree"); + +#if 0 + /* create from bottom to top */ + /* the current node is the ROOT */ + //IupSetAttribute(tree, "VALUE", "0"); + IupSetAttribute(tree, "TITLE", "Figures"); /* title of the root, id=0 */ + IupSetAttribute(tree, "ADDBRANCH", "3D"); /* 3D=1 */ + IupSetAttribute(tree, "ADDBRANCH", "2D"); /* add to the root, so it will be before "3D", now 2D=1, 3D=2 */ + IupSetAttribute(tree, "ADDBRANCH", "parallelogram"); /* id=1 */ + IupSetAttribute(tree, "ADDLEAF1", "diamond"); + IupSetAttribute(tree, "ADDLEAF1", "square"); + IupSetAttribute(tree, "ADDBRANCH", "triangle"); + IupSetAttribute(tree, "ADDLEAF1", "scalenus"); + IupSetAttribute(tree, "ADDLEAF1", "isoceles"); + IupSetAttribute(tree, "ADDLEAF1", "equilateral"); + IupSetAttribute(tree, "ADDLEAF", "Other (çãé)"); +#else + /* create from top to bottom */ + IupSetAttribute(tree, "TITLE0", "Figures"); + IupSetAttribute(tree, "ADDLEAF0", "Other"); /* new id=1 */ + IupSetAttribute(tree, "ADDBRANCH1", "triangle"); /* new id=2 */ + IupSetAttribute(tree, "ADDLEAF2", "equilateral"); /* ... */ + IupSetAttribute(tree, "ADDLEAF3", "isoceles"); + IupSetAttribute(tree, "ADDLEAF4", "scalenus"); + IupSetAttribute(tree, "INSERTBRANCH2","parallelogram"); /* same depth as id=2, new id=6 */ + IupSetAttribute(tree, "ADDLEAF6", "square"); + IupSetAttribute(tree, "ADDLEAF7", "diamond"); + IupSetAttribute(tree, "INSERTBRANCH6","2D"); /* new id=9 */ + IupSetAttribute(tree, "INSERTBRANCH9","3D"); +#endif + + IupSetAttribute(tree, "VALUE", "6"); + IupSetAttribute(tree, "RASTERSIZE", NULL); /* remove the minimum size limitation */ + IupSetAttribute(tree, "COLOR8", "92 92 255"); + IupSetAttribute(tree, "TITLEFONT8", "Courier, 14"); + IupSetAttributeHandle(tree, "IMAGE8", load_image_LogoTecgraf()); + IupSetAttributeHandle(tree, "IMAGE7", load_image_TestImage()); + IupSetAttribute(tree, "IMAGE6", IupGetAttribute(tree, "IMAGE8")); +} + +void TreeTest(void) +{ + Ihandle* dlg; + + init_tree(); /* Initializes IupTree */ + init_dlg(); /* Initializes the dlg */ + dlg = IupGetHandle("dlg"); /* Retrieves the dlg handle */ + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); /* Displays the dlg */ + init_tree_nodes(); /* Initializes attributes, can be done here or anywhere */ +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + IupControlsOpen(); + + TreeTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/val.c b/iup/test/val.c new file mode 100755 index 0000000..2f0b500 --- /dev/null +++ b/iup/test/val.c @@ -0,0 +1,199 @@ +#include +#include + +#include "iup.h" +#include "iupkey.h" + + +static Ihandle *lbl_h=NULL, *lbl_v=NULL; + +static void print_value(Ihandle *ih, double a) +{ + char *type = IupGetAttribute(ih, "TYPE"); + + switch(type[0]) + { + case 'V': + IupSetfAttribute(lbl_v, "TITLE", "VALUE=%.2f", a); + break; + case 'H': + IupSetfAttribute(lbl_h, "TITLE", "VALUE=%.2f", a); + break; + } +} + +static int mousemove(Ihandle *ih, double a) +{ + printf("mousemove %.2f\n", a); + print_value(ih, a); + return IUP_DEFAULT; +} + +static int button_press(Ihandle *ih, double a) +{ + char *type = IupGetAttribute(ih, "TYPE"); + + printf("button_press %.2f\n", a); + + switch(type[0]) + { + case 'V': + IupSetAttribute(lbl_v, "FGCOLOR", "255 0 0"); + break; + + case 'H': + IupSetAttribute(lbl_h, "FGCOLOR", "255 0 0"); + break; + } + + print_value(ih, a); + + return IUP_DEFAULT; +} + +static int button_release(Ihandle *ih, double a) +{ + char *type = IupGetAttribute(ih, "TYPE"); + + printf("button_release %.2f\n", a); + + switch(type[0]) + { + case 'V': + IupSetAttribute(lbl_v, "FGCOLOR", "0 0 0"); + break; + + case 'H': + IupSetAttribute(lbl_h, "FGCOLOR", "0 0 0"); + break; + } + + print_value(ih, a); + + return IUP_DEFAULT; +} + +char *iupKeyCodeToName(int code); + +static int k_any(Ihandle *ih, int c) +{ + if (iup_isprint(c)) + printf("K_ANY(%d = %s \'%c\')\n", c, iupKeyCodeToName(c), (char)c); + else + printf("K_ANY(%d = %s)\n", c, iupKeyCodeToName(c)); + return IUP_CONTINUE; +} + +static int getfocus_cb(Ihandle *ih) +{ + printf("GETFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int help_cb(Ihandle* ih) +{ + printf("HELP_CB()\n"); + return IUP_DEFAULT; +} + +static int killfocus_cb(Ihandle *ih) +{ + printf("KILLFOCUS_CB()\n"); + return IUP_DEFAULT; +} + +static int leavewindow_cb(Ihandle *ih) +{ + printf("LEAVEWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +static int enterwindow_cb(Ihandle *ih) +{ + printf("ENTERWINDOW_CB()\n"); + return IUP_DEFAULT; +} + +void ValTest(void) +{ + Ihandle *dlg, *val_h, *val_v; + +// IupOldValOpen(); + + lbl_v = IupLabel("VALUE="); + IupSetAttribute(lbl_v, "SIZE", "70x"); + + lbl_h = IupLabel("VALUE="); + IupSetAttribute(lbl_h, "SIZE", "70x"); + + val_v = IupVal("VERTICAL"); + IupSetAttribute(val_v, "MAX", "10.0"); + IupSetAttribute(val_v, "STEP", ".02"); + IupSetAttribute(val_v, "PAGESTEP", ".2"); + IupSetAttribute(val_v, "SHOWTICKS", "5"); +// IupSetAttribute(val_v, "TICKSPOS", "REVERSE"); + IupSetCallback(val_v, "HELP_CB", (Icallback)help_cb); + IupSetCallback(val_v, "GETFOCUS_CB", (Icallback)getfocus_cb); + IupSetCallback(val_v, "KILLFOCUS_CB", (Icallback)killfocus_cb); + IupSetCallback(val_v, "ENTERWINDOW_CB", (Icallback)enterwindow_cb); + IupSetCallback(val_v, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb); + IupSetCallback(val_v, "K_ANY", (Icallback)k_any); +// IupSetAttribute(val_v, "INVERTED", "NO"); + IupSetAttribute(val_v, "EXPAND", "VERTICAL"); + + val_h = IupVal("HORIZONTAL"); + IupSetAttribute(val_h, "MAX", "100.0"); + IupSetAttribute(val_h, "SHOWTICKS", "10"); + IupSetAttribute(val_h, "TICKSPOS", "BOTH"); /* Windows Only */ +// IupSetAttribute(val_h, "INVERTED", "YES"); + IupSetAttribute(val_h, "EXPAND", "HORIZONTAL"); + + dlg = IupDialog + ( + IupHbox + ( + IupSetAttributes(IupHbox + ( + val_v, + lbl_v, + NULL + ), "ALIGNMENT=ACENTER"), + IupSetAttributes(IupVbox + ( + val_h, + lbl_h, + NULL + ), "ALIGNMENT=ACENTER"), + NULL + ) + ); + + IupSetCallback(val_v, "BUTTON_PRESS_CB", (Icallback) button_press); + IupSetCallback(val_v, "BUTTON_RELEASE_CB", (Icallback) button_release); + IupSetCallback(val_v, "MOUSEMOVE_CB", (Icallback) mousemove); + + IupSetCallback(val_h, "BUTTON_PRESS_CB", (Icallback) button_press); + IupSetCallback(val_h, "BUTTON_RELEASE_CB", (Icallback) button_release); + IupSetCallback(val_h, "MOUSEMOVE_CB", (Icallback) mousemove); + + IupSetAttribute(dlg, "TITLE", "IupVal Test"); +// IupSetAttribute(IupGetChild(dlg, 0), "BGCOLOR", "50 50 255"); +// IupSetAttribute(IupGetChild(dlg, 0), "ACTIVE", "NO"); + IupSetAttribute(dlg, "MARGIN", "10x10"); + IupShowXY(dlg,IUP_CENTER,IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + ValTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/vbox.c b/iup/test/vbox.c new file mode 100755 index 0000000..3040ea6 --- /dev/null +++ b/iup/test/vbox.c @@ -0,0 +1,122 @@ +#include +#include +#include + +void VboxTest(void) +{ + /* IUP identifiers */ + Ihandle *dlg; + Ihandle *fr1, *fr2, *fr3; + Ihandle *btn_11, *btn_12, *btn_13; + Ihandle *btn_21, *btn_22, *btn_23; + Ihandle *btn_31, *btn_32, *btn_33; + Ihandle *vbox_1, *vbox_2, *vbox_3; + + /* Creates frame 1 */ + fr1 = IupFrame + ( + vbox_1 = IupVbox + ( + IupFill(), + btn_11=IupButton("1", NULL), + btn_12=IupButton("2", NULL), + btn_13=IupButton("3", NULL), + IupFill(), + NULL + ) + ); + + IupSetAttribute(fr1, "TITLE", "ALIGNMENT=ALEFT"); + IupSetAttribute(btn_11, "SIZE", "20x10"); + IupSetAttribute(btn_12, "SIZE", "30x20"); + IupSetAttribute(btn_13, "SIZE", "40x30"); + IupSetAttribute(vbox_1, "ALIGNMENT", "ALEFT"); +// IupSetAttribute(vbox_1, "MARGIN", "20x20"); +// IupSetAttribute(vbox_1, "GAP", "10"); + IupSetAttribute(vbox_1, "HOMOGENEOUS", "YES"); + IupSetAttribute(vbox_1, "EXPANDCHILDREN", "YES"); +// IupSetAttribute(btn_12, "VISIBLE", "NO"); +// IupSetAttribute(btn_12, "FLOATING", "YES"); + + /* Creates frame 2 */ + fr2 = IupFrame + ( + vbox_2 = IupVbox + ( + IupFill(), + btn_21 = IupButton ("1", NULL), + btn_22 = IupButton ("2", NULL), + btn_23 = IupButton ("3", NULL), + IupFill(), + NULL + ) + ); + + IupSetAttribute(fr2, "TITLE", "ALIGNMENT=ACENTER"); + IupSetAttribute(btn_21, "SIZE", "20x30"); + IupSetAttribute(btn_22, "SIZE", "30x30"); + IupSetAttribute(btn_23, "SIZE", "40x30"); + IupSetAttribute(vbox_2, "ALIGNMENT", "ACENTER"); + + /* Creates frame 3 */ + fr3 = IupFrame + ( + vbox_3 = IupVbox + ( + IupFill (), + btn_31=IupButton ("1", NULL), + btn_32=IupButton ("2", NULL), + btn_33=IupButton ("3", NULL), + IupFill (), + NULL + ) + ); + + IupSetAttribute(fr3, "TITLE", "ALIGNMENT=ARIGHT"); + IupSetAttribute(btn_31, "SIZE", "20x30"); + IupSetAttribute(btn_32, "SIZE", "30x30"); + IupSetAttribute(btn_33, "SIZE", "40x30"); + IupSetAttribute(vbox_3, "ALIGNMENT", "ARIGHT"); + + dlg = IupDialog + ( + IupHbox + ( + fr1, + IupFill (), + fr2, + IupFill (), + fr3, + IupFill (), + NULL + ) + ); + + IupSetAttribute(dlg, "TITLE", "IupVbox Test"); /* Sets dlg's title */ + IupSetAttribute(dlg, "MARGIN", "10x10"); + IupSetAttribute(dlg, "GAP", "10"); + IupSetAttribute(fr1, "MARGIN", "0x0"); /* avoid attribute propagation */ + IupSetAttribute(fr2, "MARGIN", "0x0"); + IupSetAttribute(fr3, "MARGIN", "0x0"); + IupSetAttribute(fr1, "GAP", "0"); + IupSetAttribute(fr2, "GAP", "0"); + IupSetAttribute(fr3, "GAP", "0"); + + /* Shows dlg in the center of the screen */ + IupShowXY(dlg, IUP_CENTER, IUP_CENTER); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + VboxTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif diff --git a/iup/test/zbox.c b/iup/test/zbox.c new file mode 100755 index 0000000..0451277 --- /dev/null +++ b/iup/test/zbox.c @@ -0,0 +1,98 @@ +#include +#include +#include "iup.h" + +static int list_cb (Ihandle *h, char *t, int o, int selected) +{ + if (selected == 1) + { + Ihandle* zbox = IupGetHandle ("zbox"); + IupSetAttribute (zbox, "VALUE", t); + } + + return IUP_DEFAULT; +} + +void ZboxTest(void) +{ + Ihandle *dlg; + Ihandle *frm; + Ihandle *zbox; + Ihandle *text; + Ihandle *list; + Ihandle *lbl; + Ihandle *btn; + Ihandle *frame; + + frame = IupFrame(IupSetAttributes(IupList(NULL), "DROPDOWN=YES, 1=Test, 2=XXX, VALUE=1")); + IupSetAttribute (frame, "TITLE", "List"); + + text = IupText(""); + + IupSetAttributes (text, "EXPAND = YES, VALUE = \"Enter your text here\""); + + /* Creates a label */ + lbl = IupLabel("This element is a label"); + + /* Creatas a button */ + btn = IupButton ("This button does nothing", ""); + + /* Creates handles for manipulating the zbox VALUE */ + IupSetHandle ("frame", frame); + IupSetHandle ("text", text); + IupSetHandle ("lbl", lbl); + IupSetHandle ("btn", btn); + + /* Creates zbox with four elements */ + zbox = IupZbox (frame, text, lbl, btn, NULL); + + /* Associates handle "zbox" with zbox */ + IupSetHandle ("zbox", zbox); + + /* Sets zbox alignment */ + IupSetAttribute (zbox, "ALIGNMENT", "ACENTER"); + IupSetAttribute (zbox, "VALUE", "text"); + + /* Creates frame */ + frm = IupFrame + ( + IupHbox + ( + list = IupList(NULL), + NULL + ) + ), + + /* Creates dialog */ + dlg = IupDialog + ( + IupVbox + ( + frm, + zbox, + NULL + ) + ); + + IupSetAttributes (list, "1 = frame, 2 = text, 3 = lbl, 4 = btn, VALUE=2"); + IupSetAttribute (frm, "TITLE", "Select an element"); + IupSetAttributes (dlg, "MARGIN=10x10, GAP=10, TITLE = \"IupZbox Example\""); + IupSetCallback (list, "ACTION", (Icallback) list_cb); + + IupShowXY (dlg, IUP_CENTER, IUP_CENTER ); +} + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + ZboxTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif -- cgit v1.2.3